efficient-storefront-blocks 0.43.0 → 0.45.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.
@@ -0,0 +1,255 @@
1
+ import{A as $o,B as Rt,Ba as Wa,C as At,Ca as lu,Da as su,E as jd,H as Or,J as Kd,K as us,M as Vd,N as Yd,P as Xd,Q as ps,S as Zd,T as to,U as lt,V as Qd,W as Io,X as za,Z as Jd,_ as ms,a as Nd,ba as eu,c as Md,ca as xs,d as no,e as Lt,ea as Is,f as Eo,g as Ha,h as Wd,ia as ou,l as Lr,n as cs,oa as st,qa as tu,s as Gd,sa as ru,t as Ud,u as ds,ua as au,v as Qe,w as $d,x as qd,y as Ot,ya as Z,z as xo,za as nu}from"./chunk-BAR34RXF.js";import{a as Dd,c as ao,l as Hd,m as Pr,n as zd,q as iu,u as hs}from"./chunk-BG52UY3U.js";var Ga=null,xC="en",cu=null;function RM(e,o,t){Ga=e??null,xC=o||"en",cu=t??null}function j(){return cu}function du(){return Ga}function fu(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=Ga?Ga[e]:void 0;if(typeof t=="function"){try{let r=t(o??{});if(typeof r=="string"&&r)return r}catch{}return fu(e,o)}return fu(typeof t=="string"&&t?t:e,o)}function it(e,o,t,r){return l(t===1?e:o,{...r,n:t})}import{EaselSessionProvider as _M,useEaselSession as Ae}from"efficient-easel/screen/lib/session-context";import{hostLoadRefusalOf as IC,hostUnreachableMessage as hC,isBackendError as gC,provideHostFailures as bC,readHostFailure as yC,STATUS_UNREACHABLE as SC,WebsiteBackendError as gs}from"efficient-easel/screen/lib/backend-error";import{createEaselHost as GM,DETACHED_EASEL_HOST as UM,EaselHostContext as $M,EaselHostProvider as qM,useEaselHost as Bt}from"efficient-easel/screen/lib/host";function Me(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 uu(e,o){return typeof e=="number"&&Number.isFinite(e)?e:o}function pu(e,o){return typeof e=="boolean"?e:o}function Ua(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:Me(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var mu="cart-drawer",YM="cart-drawer";var CC={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 XM(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function ZM(e){let o=e??{},t=CC;return{kickerBadge:Me(o.kickerBadge,t.kickerBadge),kickerText:Me(o.kickerText,t.kickerText),titleLead:Me(o.titleLead,t.titleLead),titleAccent:Me(o.titleAccent,t.titleAccent),subtitleEmpty:Me(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Me(o.subtitleOne,t.subtitleOne),subtitleMany:Me(o.subtitleMany,t.subtitleMany),leadTimeValue:Me(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Me(o.shipsToFallback,t.shipsToFallback),promises:Ua(o.promises,t.promises),emptyKicker:Me(o.emptyKicker,t.emptyKicker),emptyBody:Me(o.emptyBody,t.emptyBody)}}var vC=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],e2={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"},wC={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"},o2={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 kC(e){return typeof e=="string"&&Eo.includes(e)?e:null}function xu(e){let o={};for(let t of vC){let r=kC(e[wC[t]]);r&&(o[t]=r)}return o}var _t="site-footer";var r2=_t,a2={desktop:!0,tablet:!0,mobile:!0},n2={desktop:!1,tablet:!1,mobile:!1},bs=1,Iu=6,l2=Array.from({length:Iu-bs+1},(e,o)=>bs+o),$a={desktop:6,tablet:3,mobile:2},TC={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}},ft=e=>Math.min(Math.max(Math.round(e),bs),Iu);function s2(e){if(typeof e=="number")return TC[ft(e)]??{desktop:ft(e),tablet:ft(e),mobile:ft(e)};if(e&&typeof e=="object"){let o=e;return{desktop:ft(o.desktop??$a.desktop),tablet:ft(o.tablet??$a.tablet),mobile:ft(o.mobile??$a.mobile)}}return{...$a}}var FC="subscribe-popup",p2="subscribe-popup";var EC=[FC,_t,mu];function bu(e){return EC.includes(e)}var PC=["delay","scroll","exit"],LC=["all","chosen"],OC=["visit","days","never"],RC=["right","left"],AC={min:0,max:60},BC={min:10,max:90},_C={min:1,max:90},Ss={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
2
+ *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:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},he=Me,DC=uu,hu=pu,yu=Ua;function qa(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function ys(e,o,t){let r=DC(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function NC(e){return typeof e.hideAfter=="string"?qa(OC,e.hideAfter,Ss.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Ss.hideAfter}function MC(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function gu(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 HC(e,o){return Array.isArray(e)?yu(e,[]):o}function zC(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:he(r.label,""),value:he(r.value,"")}}).filter(t=>t.label||t.value):o}function m2(e){let o=e??{},t=Ss;return{metaLabel:he(o.metaLabel,t.metaLabel),issueLabel:gu(o.issueLabel,t.issueLabel),issueNumber:gu(o.issueNumber,t.issueNumber),kicker:he(o.kicker,t.kicker),heading:he(o.heading,t.heading),deck:he(o.deck,t.deck),stats:zC(o.stats,t.stats),formLabel:he(o.formLabel,t.formLabel),formHeading:he(o.formHeading,t.formHeading),formIntro:he(o.formIntro,t.formIntro),firstNameLabel:he(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:he(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:he(o.emailLabel,t.emailLabel),emailPlaceholder:he(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:he(o.interestsLabel,t.interestsLabel),interests:yu(o.interests,t.interests),frequencyLabel:he(o.frequencyLabel,t.frequencyLabel),frequencies:HC(o.frequencies,t.frequencies),submitText:he(o.submitText,t.submitText),finePrint:he(o.finePrint,t.finePrint),dismissText:he(o.dismissText,t.dismissText),emailInvalidText:he(o.emailInvalidText,t.emailInvalidText),submitErrorText:he(o.submitErrorText,t.submitErrorText),successHeading:he(o.successHeading,t.successHeading),successBody:he(o.successBody,t.successBody),keepBrowsingText:he(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:hu(o.autoOpen,t.autoOpen),autoOpenDelaySec:ys(o.autoOpenDelaySec,AC,t.autoOpenDelaySec),trigger:qa(PC,o.trigger,t.trigger),scrollPercent:ys(o.scrollPercent,BC,t.scrollPercent),showOn:qa(LC,o.showOn,t.showOn),showOnPages:MC(o.showOnPages),hideAfter:NC(o),hideDays:ys(o.hideDays,_C,t.hideDays),formSide:qa(RC,o.formSide,t.formSide),valuePanelOnPhone:hu(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:xu(o)}}import{jsx as Cs,Fragment as WC,jsxs as GC}from"react/jsx-runtime";import{createContext as UC,useContext as $C}from"react";var qC={mirrorHostStyles:!0,css:null,fontHrefs:[]},Su=UC(qC);function g2({value:e,children:o}){return Cs(Su.Provider,{value:e,children:o})}function vs(){return $C(Su)}function Cu(){let{css:e,fontHrefs:o}=vs();return GC(WC,{children:[o.map(t=>Cs("link",{rel:"stylesheet",href:t},t)),e?Cs("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as jC}from"react/jsx-runtime";import{createContext as KC,useContext as VC}from"react";var vu=KC(void 0);function C2({metadata:e,children:o}){return jC(vu.Provider,{value:e,children:o})}var wu=()=>VC(vu);import{jsx as ue,Fragment as lC,jsxs as _a}from"react/jsx-runtime";import{useCallback as Da,useEffect as To,useRef as sM,useState as iM}from"react";import{Button as fM,Tooltip as cM}from"efficient-shell/ui";import{SettingsSwitch as dM}from"efficient-easel/panel";import{PagesIcon as uM,StylesIcon as pM}from"efficient-easel/rail";import{TemplateIcon as mM}from"efficient-easel/icons";import{Subtree as xM,TreeRow as sC}from"efficient-easel/tree";import{useEasel as IM}from"efficient-easel/easel";import{useEaselStrings as iC}from"efficient-easel/strings";import{createContext as YC,useContext as XC}from"react";var ws=YC(!1),k2=()=>XC(ws);import{jsx as fe,Fragment as XI,jsxs as ll}from"react/jsx-runtime";import{Fragment as jP,useEffect as KP,useId as VP,useMemo as ZI,useState as ar}from"react";import{ScreenDocumentContext as Dt,ScreenDocumentProvider as E2,useScreenDocument as Se}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as sl}from"efficient-easel/draw/client";import{default as ja,PanelHideButton as ks,PanelModeExit as O2,PanelShowStrip as R2}from"efficient-easel/screen/components/SidePanelHead";import{jsx as J,jsxs as St,Fragment as tr}from"react/jsx-runtime";import{useEasel as UI}from"efficient-easel/easel";import{useState as Of}from"react";import{jsx as Xt,jsxs as Dx,Fragment as WF}from"react/jsx-runtime";import{useState as Nx}from"react";import{SettingsDefaultReset as GF,SettingsField as UF}from"efficient-easel/panel";import{useEaselStrings as $F}from"efficient-easel/strings";import{AddIcon as qF}from"efficient-easel/icons";import{jsx as I,jsxs as bt,Fragment as _o}from"react/jsx-runtime";import{cloneElement as Xm,useId as N0,useRef as Oi,useState as kn}from"react";import{useEasel as Kr,useSelectedFields as Zm}from"efficient-easel/easel";import{readHidable as Qo,hidableText as M0}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ri,LINK_FIELD_MARKER as H0,MEDIA_FIELD_MARKER as z0,SCAFFOLD_FIELD_MARKER as W0,TEXT_FIELD_MARKER as Bo,foldMetaOf as Do,textFieldIdentifier as xz}from"efficient-easel/draw";import{jsx as Ou}from"react/jsx-runtime";import{useCallback as ov,useEffect as tv,useRef as rv,useState as av}from"react";import{useEasel as nv}from"efficient-easel/easel";import{SettingsAction as lv}from"efficient-easel/panel";function Ts(e){return typeof e=="number"&&Number.isFinite(e)}function _2(e,o){if(!Ts(e))return;let t=za(Io(e));if(Object.keys(t).length===0)return;let r=t[Ka];if(typeof r!="string")return t;let a=Rr(o)?Ar(r,Po(o)??[]):r;return{...t,[ZC]:a}}var ZC="--sf-section-radius",Ka="--sf-card-radius",ct=["tl","tr","br","bl"];function Po(e){if(!Array.isArray(e))return null;let o=e.filter(t=>ct.includes(t));return ct.filter(t=>o.includes(t))}function Rr(e){let o=Po(e);return o!==null&&o.length<ct.length}function Ar(e,o){return ct.map(t=>o.includes(t)?e:"0").join(" ")}var ku=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var QC="--sf-card-box-radius",JC="--sf-site-card-radius",H2="sf-section-bleeds";function Fs(e){return typeof e=="number"&&Number.isFinite(e)}function z2(e,o){if(!Fs(e))return;let t=za(Io(e))[Ka];if(typeof t!="string")return;let r=Rr(o)?Ar(t,Po(o)??[]):t;return{[QC]:r}}function W2(e){let o=e[Ka];return typeof o=="string"?{[JC]:o}:{}}function Tu(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 ev}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 Va(e,o,t){let r=Br(t?.zone),a=r?ev(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function Fu(e,o,t){let r=Va(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,c=i?.props?.id?String(i.props.id):"",u=Math.max(n.length-1,0);return!r||!c?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:u}:Fs(i?.props?.cardCorners)?{can:!0,others:u,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:Tu(n,c)}}}:{can:!1,reason:"unset",others:u}}function Eu(e){return e.can?it("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 Pu(e){return it("Applied to {n} card","Applied to {n} cards",e)}function Lu(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as qo}from"efficient-easel/screen/lib/puck/use-section-ops";var sv=2200,iv="apply-corners-to-siblings",fv="Apply to all cards";function cv({plan:e,doneCount:o,onPress:t}){return Ou(lv,{id:iv,label:l(fv),note:Eu(e),disabled:!e.can,done:o!==null,doneLabel:Pu(o??0),onPress:t})}function Ru(){let{appState:e,config:o}=nv(c=>c),t=qo(),[r,a]=av(null),n=rv(null);tv(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=Fu(o,e.data.content??[],e.ui.itemSelector),i=ov(()=>{Lu(s,t.replaceComponent),s.can&&(a(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>a(null),sv))},[s,t]);return Ou(cv,{plan:s,doneCount:r,onPress:i})}var Au=1;function dv(e){return Io(e)}function lH(e){let o=dv(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var Bu=1,_u="Corners";function uv(e){return Io(e)}function cH(e,o){let t=uv(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:Rr(o)?Ar(r,Po(o)??[]):r}}var Lo={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]]}},Es=Object.keys(Lo),Nu=[2,3,4,6];function Mu(e){return typeof e!="string"||e===""?null:Lo[e]??null}function Du(e,o){return o?6/e.acrossPhone:12/e.across}var pv="sf-wall--";function mv(e){return`${pv}${e}`}function uH(e){let o=Lo[e],t=`.${mv(e)}`,r=[],a=(n,s)=>{let i=[],c=n.length;n.forEach(([u,p],m)=>{i.push(`${t} > :nth-child(${c}n+${m+1}){grid-column:span ${u};grid-row:span ${p}}`)});for(let u=1;u<c;u+=1)i.push(`${t}:has(> :nth-child(${c}n+${u}):last-child) > :nth-last-child(-n+${u}){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,Du(o,!1))),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,Du(o,!0))),r.push("}"),r.join("")}var Ya=12,Hu=1,xv=3;var Iv=3;function Ps(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 hv(e){return Ps(e,1,Ya)??Iv}function xH(e,o){return Ps(e,Hu,xv)??(hv(o)===4?2:Hu)}function IH(e){return e==null||e===""?null:Ps(e,1,Ya)}var hH="data-sf-span";function gH(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(Mu(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}var ho=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],Xa="bottom-left";var Za={"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 gv(e){let o=ho.indexOf(dt(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function bv(e){return 1+gv(e).band*6}function yH(e){return bv(e)+1}function dt(e){return ho.includes(e)?e:Xa}function SH(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function CH(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function Ls(e,o){let t=dt(o);return e.filter(r=>dt(r?.props?.placement)===t).length}function zu(e){return`${Za[dt(e)]} already holds 4 boxes. Move one somewhere else first.`}function Os(e,o){let t=e.filter(r=>r?.props?.id!==o);return ho.map(r=>{let a=Ls(t,r)>=4,n=Za[r];return a?{value:r,label:n,disabled:!0,title:zu(r)}:{value:r,label:n}})}function Qa(e,o){let t=o===void 0?Xa:dt(o?.props?.placement);return Ls(e,t)>=4?zu(t):null}var Ja="HeroGroup";function yv(e){return ho.map(o=>{let t=Ls(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function Rs(e){let o=yv(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=Za[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 Wu(e,o){let t=o;if(t?.type!==Ja)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?Qa(As(e,r),t):null}function As(e,o){let t=Uu(e,o);return t&&t.ownerType===Cv?t.siblings:[]}function Gu(e,o){let t=Uu(e,o);return t?t.ancestorTypes.filter(r=>r===Ja).length:Sv}var Sv=1,Cv="HeroSlide";function Uu(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 c=i.type,u=r(i,n+1,[...s,String(c)]);if(u)return u}return null}for(let i of Object.values(a)){let c=r(i,n+1,s);if(c)return c}return null};return r(e,0,[])}import{jsx as vv}from"react/jsx-runtime";var wv="sf-hint-keep";function $u({children:e}){return vv("span",{className:wv,children:e})}import{AdjustIcon as G0,AlignLeftIcon as U0,EyeIcon as $0,AlignSeparateIcon as q0,AnimationIcon as Qm,BackgroundIcon as j0,BorderAllIcon as K0,BlockSectionIcon as V0,CartIcon as Y0,ColumnWidthsIcon as Jm,ColumnsIcon as X0,CornerIcon as Z0,DirectionDownIcon as Q0,DirectionLeftIcon as J0,DirectionRightIcon as eT,DirectionUpIcon as oT,DollarIcon as tT,FinishIcon as rT,GapIcon as ex,GridIcon as aT,GroundIcon as nT,HashIcon as ox,HeightIcon as lT,ImageIcon as sT,ListIcon as iT,LocationIcon as Li,PaddingAllIcon as fT,PaddingBottomIcon as tx,PaddingLeftIcon as rx,PaddingRightIcon as ax,PaddingTopIcon as nx,PageIcon as lx,PhoneIcon as cT,PlacementIcon as dT,ProductSizeIcon as uT,StickyIcon as pT,RotateIcon as mT,SquareIcon as xT,TypeIcon as IT,WidthIcon as hT,WrapIcon as gT}from"efficient-easel/icons";import{jsx as Q,Fragment as go,jsxs as bo}from"react/jsx-runtime";import{TitleIcon as kv,ButtonIcon as Tv,DollarIcon as Fv,HashIcon as Ev,LinkIcon as Pv,NoteIcon as Lv,TagIcon as Ov,TextLinesIcon as Rv}from"efficient-easel/icons";var qu={body:Rv,button:Tv,link:Pv,label:Ov,number:Ev,price:Fv,note:Lv,title:kv},ju={eyebrow:bo(go,{children:[Q("path",{d:"M5 6.5h5"}),Q("path",{d:"M5 12.5h14"}),Q("path",{d:"M5 18h11"})]}),heading:bo(go,{children:[Q("path",{d:"M6.5 5v14"}),Q("path",{d:"M17.5 5v14"}),Q("path",{d:"M6.5 12h11"})]}),intro:bo(go,{children:[Q("path",{d:"M4 5.5v13"}),Q("path",{d:"M8 7.5h12"}),Q("path",{d:"M8 12h12"}),Q("path",{d:"M8 16.5h8"})]}),value:bo(go,{children:[Q("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),Q("path",{d:"M6.5 12h7"})]}),name:bo(go,{children:[Q("path",{d:"M6 3.5v17"}),Q("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:bo(go,{children:[Q("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),Q("path",{d:"M4 10.5h16"}),Q("path",{d:"M9 3.2v4.4"}),Q("path",{d:"M15 3.2v4.4"})]}),caption:bo(go,{children:[Q("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),Q("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),Q("path",{d:"M6.5 19.5h11"})]}),quote:bo(go,{children:[Q("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),Q("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:bo(go,{children:[Q("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),Q("path",{d:"M8 9.5h8"}),Q("path",{d:"M12 9.5v5"})]}),meta:bo(go,{children:[Q("path",{d:"M4 7h16"}),Q("path",{d:"M4 14h3.5"}),Q("path",{d:"M10.5 14h3"}),Q("path",{d:"M17 14h3"})]})};function Bs({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=qu[e];return n?Q("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:Q(n,{size:o})}):Q("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:ju[e]})}var EH=Object.keys(qu);var PH=Object.keys(ju);var Av="#ffffff",Bv=/^#[0-9a-fA-F]{6}$/;function _s(e){return _v(e)?e:Av}function _v(e){return typeof e=="string"&&Bv.test(e)}function OH(e){return{"--bg":_s(e)}}var Ds=[{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}],Dv=Ds.filter(e=>e.ink);function Nv(e){let o={color:e.fg};for(let{role:t,token:r}of Dv)o[r]=e[t];return o}var Mv={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},Ku=Object.freeze(Nv(Mv));var en=-1,Hv="sf-section-accent",Vu="Color",Yu=new Set(["CategoryBar","DocTabs"]),_H=new Set(["Flex"]),zv=0;function Ns(e){return e===en?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:zv}function DH(e){return e??en}function Wv(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 Ds)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function NH(e){let o=Ns(e.sectionAccent);return o===null?null:{className:Hv,style:Wv(o)}}var Gv=["fade","rise","scale"],Ms="none",Xu=[{label:"None",value:Ms},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function zH(e){return Gv.includes(e)?e:null}var Zu="data-sf-anim",_r="data-sf-anim-state";function WH(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(Zu))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(),Uv(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(_r)}}function Uv(e){if(!e.getAttribute(Zu))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 GH=Yu;function zs(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(Hs(r,o,0))return a??{}}return null}function Hs(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Hs(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>Hs(a,o,t+1))}import{SettingsDefaultReset as qe,SettingsField as ne,SettingsGroupHead as bT,SettingsGroupSub as yT,SettingsBorder as ST,SettingsSegmented as CT,SettingsSides as vT,SettingsSidesEach as sx,sidesStartEach as wT,SettingsSwitch as ix,borderSides as kT,borderStartEach as TT}from"efficient-easel/panel";import{FieldSelect as FT,ListField as ET}from"efficient-easel/fields";import{DisplayChips as PT}from"efficient-shell/ui";function Nt(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 on(e,o){return Nt(e)[o]!==!1}function Ws(e,o,t){let r=Nt(o)[t];return typeof r=="boolean"?r:on(e,t)}function Qu(e){return Object.values(Nt(e)).some(o=>o===!1)}function Ju(e){return Object.keys(Nt(e)).length>0}function ep(e,o,t){let r={...Nt(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function op(e,o,t){return{...Nt(e),[o]:t}}function qH(e,o,t){let r=on(e,t),a=Ws(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as LT,Checkbox as Bz,CornersInput as OT,DateTimePicker as RT,FOCAL_DEFAULT as _z,PictureTiles as fx,Slider as AT,Tooltip as cx}from"efficient-shell/ui";import{jsx as Dr,jsxs as qv}from"react/jsx-runtime";import{ColorPicker as jv,HexInput as Kv}from"efficient-shell/ui";import{typedHex as Gs}from"efficient-easel/pick";import{typedHex as $v}from"efficient-easel/pick";function tp(e){let o=new Set,t=[];return Qe(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 c=i?$v(i):null;!c||o.has(c)||(o.add(c),t.push({name:s,value:c}))}}),t}function Je({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,after:s,ariaLabel:i}){return Dr(Yv,{value:e,onChange:o,label:l(i??t),id:r,caption:a,inherited:n,after:s})}function Vv(){let{theme:e}=Z();return tp(e).map(o=>({value:o.value,label:o.name}))}function Yv({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,after:s}){let i=Vv(),c=e?null:Gs(n??""),u=a!==void 0&&(!e||Gs(a)!==Gs(e))?a:null,p=m=>{m!==e&&o(m)};return qv("div",{className:"sf-colour",children:[Dr(jv,{id:r,value:e,onChange:p,label:t,presets:i,fallback:c??void 0,size:"sm",align:"end"}),u!==null?Dr("span",{className:"sf-colour-caption",children:u}):Dr("span",{className:"sf-colour-hexwrap",children:Dr(Kv,{value:e||c||"",onChange:p,label:l("{label} hex code",{label:t}),placeholder:e||c?void 0:l("Not set"),className:c?"sf-colour-hex is-inherited":"sf-colour-hex",size:"sm"})}),s]})}import{jsx as Nr}from"react/jsx-runtime";import{useEffect as hw,useState as gw}from"react";import{markSelection as bw,useCaretEdit as yw}from"efficient-easel/copy";import{RevertIcon as Sw}from"efficient-easel/icons";import{IconButton as Cw,TextToolbar as vw,Tooltip as ww}from"efficient-shell/ui";import{applyMark as f5,markupTools as c5,MARKUP_TOOLS as d5,COPY_FIELD_TOOLS as u5,STOREFRONT_MARKUP as p5,tokenizeInline as m5,stripInline as x5,isSafeLinkHref as I5}from"efficient-shell/markup";import{applyMark as sw,markedAt as iw,markupTools as fw,MARKUP_TOOLS as cw,parseMarkup as dw,RETIRED_MARKS as uw,STOREFRONT_MARKUP as pw,tokenizeInline as g5}from"efficient-shell/markup";var ut=["highlight","strong","quiet"],pt={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},yo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},lp=Object.fromEntries(ut.map(e=>[yo[e].kind,e])),sp="data-sf-ws",tn=["accent","text","labels"],ip={accent:"Accent",text:"Text",labels:"Labels"},Oo={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},Xv=80,Zv=120,Qv=100,Jv=900,ew=.5,ow=3,tw=-.1,rw=.5,aw=3,Us={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},nw={highlight:{...Us},strong:{...Us},quiet:{...Us}};function rp(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function ap(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**aw;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function np(e){return typeof e=="boolean"?e:null}function lw(e){let o=typeof e?.font=="string"&&no.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&tn.includes(e.colour)?e.colour:null;return{font:o,size:rp(e?.size,Xv,Zv),weight:rp(e?.weight,Qv,Jv),bold:np(e?.bold),italic:np(e?.italic),lineGap:ap(e?.lineGap,ew,ow),textGap:ap(e?.textGap,tw,rw),colour:t}}function fp(e){let o={};for(let t of ut)o[t]=e&&t in e&&e[t]?lw(e[t]):{...nw[t]};return o}function n5(e){let o=fp(e),t={};for(let r of ut){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=no.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`]=Oo[a.colour])}return t}function l5(e){let o=e?.word_styles??void 0,t={};for(let r of ut)o&&r in o&&(t[r]=o[r]??null);return fp(t)}var mw=new Set(["strong"]),cp=ut.map(e=>({open:yo[e].delimiter,close:yo[e].delimiter,kind:yo[e].kind,...mw.has(e)?{wordStart:!0}:{}})),y5=[{style:yo.highlight.kind,label:pt.highlight,title:`${pt.highlight} word style`},{style:yo.strong.kind,label:pt.strong,title:`${pt.strong} word style`},{style:yo.quiet.kind,label:pt.quiet,title:`${pt.quiet} word style`}],xw=new Set(cp.map(e=>e.open)),Mt=[...pw.filter(e=>!xw.has(e.open)),...cp];function $s(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function qs(e){return dw(typeof e=="string"?e:"",Mt)}var Iw=cw.map(e=>e.style).filter(e=>!uw.includes(e)).filter(e=>Mt.some(o=>o.kind===e));function dp(){return fw(Iw)}var up=Object.fromEntries(ut.map(e=>[yo[e].kind,yo[e].delimiter]));function pp(e,o,t,r){let a=up[r];if(!a)return sw(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 c=n||"styled text";return{text:e.slice(0,o)+a+c+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+c.length}}function mp(e,o,t,r){let a=up[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:iw(e,o,t,r)}function mt(e){return qs(e).map(o=>$s(o)+xp(o.children)).join(`
3
+ `)}function xp(e){return e.map(o=>o.kind==="text"?o.text:xp(o.children)).join("")}var Ip="Clear formatting";function kw(e,o,t){return bw(e,o,t,pp)}function Tw(e){let[o,t]=gw(null);return hw(()=>{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(c=>c&&c.start===s&&c.end===i?c:{start:s,end:i})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function Fw({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=yw({target:e,onChange:t}),[s,i]=Tw(e),c=x=>n(h=>{let b=kw(o,x,h);return i({start:b.selectionStart,end:b.selectionEnd}),b}),u=dp(),p={};if(s)for(let x of u)p[x.style]=mp(o,s.start,s.end,x.style);let m=mt(o);return Nr(vw,{offered:new Set(u.map(x=>x.style)),onMark:x=>c(x),pressed:p,disabled:r,"aria-label":l(a),className:"sf-markup-bar",last:Nr("span",{className:"sf-markup-clear",children:Nr(ww,{content:l(Ip),children:Nr(Cw,{size:"sm",onMouseDown:x=>x.preventDefault(),onClick:()=>t(m),disabled:r||m===o,"aria-label":l(Ip),children:Nr(Sw,{size:14})})})})})}var js=Fw;import{DEVICE_FIELD_MARKER as O5,DEVICE_HIDDEN_ATTR as R5,DEVICE_NOTE as A5,deviceField as ve,deviceMetaOf as Ks,deviceNote as B5,shownTier as _5,withoutDeviceGate as D5}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_ATTR as H5,NO_CONTROL_FIELD as hp,noControlField as Mr,NoControlMark as Ht,noControlMetaOf as z5}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var Vs="__ownBox";function gp(e){return!!e&&typeof e=="object"&&e[Vs]===!0}function Ro(e){return`${e}Phone`}function rn(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var an=void 0;import{jsx as Xs,Fragment as Lw}from"react/jsx-runtime";import{createContext as Ow,useContext as Rw}from"react";var nn={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},ln={Events:["posts"],SubscribeBlogs:["posts"]};var Ew=["anchor"],Pw=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Hr(e){return Ew.includes(e)||Pw.test(e)}var Ys={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:[]}},BrandStrip:{picks:{verb:"reference"}},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"}}};Ys.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var j5=Object.fromEntries(Object.entries(nn).map(([e,o])=>[e,Object.keys(o)])),K5=Object.fromEntries(Object.entries(ln).map(([e,o])=>[e,[...o]]));var bp=Ow(!1);function yp({children:e}){return Xs(bp.Provider,{value:!0,children:e})}function Aw(){return Rw(bp)}function Sp({name:e,children:o}){return!Aw()||!e||Hr(e)?Xs(Lw,{children:o}):Xs(Ht,{})}function eo(e,o,t){return e.some(r=>(typeof r=="object"?r.value:r)===t)?t:o}var Zs="off",Qs="none",Js=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],ei=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function t3(e){return eo(Js,Zs,e)}function r3(e){return eo(ei,Qs,e)}var Cp="sf-card-index",zr="sf-card-index",a3="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",Bw={plain:`counter(${zr})`,padded:`counter(${zr}, decimal-leading-zero)`,numero:`"N\xB0" counter(${zr}, decimal-leading-zero)`};function n3(e,o){return o==="off"?"":`.${e}{counter-reset:${zr}}.${e} .${Cp}{counter-increment:${zr}}.${e} .${Cp}::before{content:${Bw[o]}}`}function l3(e){return e==="hairline"?"border border-line hover:border-accent":""}var vp=[{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 BT}from"efficient-easel/draw";import{jsx as Ao}from"react/jsx-runtime";import{SettingsDefaultReset as _w,SettingsField as Tp}from"efficient-easel/panel";import{useSelectedFields as Dw}from"efficient-easel/easel";import{FOCAL_DEFAULT as Nw}from"efficient-shell/format";import{ImageIcon as Fp,PlayIcon as Ep}from"efficient-easel/icons";import{ImageBox as Mw}from"efficient-easel/pick";import{useEaselStrings as Hw}from"efficient-easel/strings";import{useContext as zw}from"react";import{usePreviewDevice as Ww}from"efficient-easel/draw/client";import{requestMediaPick as wp,resolveMediaPick as c3}from"efficient-easel/screen/lib/media-picker";var Ue=Dd,kp=e=>e.blocks;function Gw(e,o){let t=null;try{t=Dw()}catch{t=null}let r=Ww()==="mobile";if(!e||!t||o&&!o(t.values??{}))return null;let a=typeof t.values?.[e]=="string"&&t.values[e]?String(t.values[e]):Nw,n=Ro(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:c=>i(r?n:e,c),clear:()=>i(n,an)}}function Pp({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s}){let i=Bt(),c=Ae(),u=Hw(),p=l(t),m=r.startsWith("video"),x=Gw(m?void 0:n,s),h=zw(Dt),b=k=>wp(i,{accept:r,title:p,...k?{file:k}:{}}).then(v=>v?.url??null);if(h&&!h.capabilities.mediaEditing)return Ao(Tp,{label:p,icon:m?Ao(Ep,{}):Ao(Fp,{}),children:Ao("div",{className:"sf-image-slot-inert",children:m?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 C=x?.phone&&e?Ao(_w,{words:j()?.panel,label:l("Image focus"),changed:!!x.own,detail:l("{value} on desktop",{value:x.desktop}),onReset:x.clear}):void 0;return Ao(Tp,{label:p,icon:m?Ao(Ep,{}):Ao(Fp,{}),action:C,children:Ao(Mw,{value:e,onChange:o,label:p,kind:m?"video":"image",placeholder:a===void 0?void 0:l(a),openLibrary:b,maxSizeBytes:Ue(c).media.maxUploadBytes,...x?{focus:x.focus,onFocusChange:x.set}:{},words:u.pick.image})})}import{jsx as Lp}from"react/jsx-runtime";import{useId as Uw}from"react";import{FieldSelect as $w}from"efficient-easel/fields";import{SettingsField as qw}from"efficient-easel/panel";function jw(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function Op({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let i=Uw(),c=`${i}-label`,u=`${i}-button`,p=Array.isArray(t)?t:[];return Lp(qw,{label:l(e),labelId:c,icon:n,hint:s,children:Lp($w,{id:u,multiple:!0,value:p,options:jw(o),onChange:r,placeholder:a===void 0?l("None"):l(a),ariaLabelledBy:`${c} ${u}`,inline:!0})})}import{jsx as Te,jsxs as xt,Fragment as pk}from"react/jsx-runtime";import{useCallback as mk,useContext as xk,useEffect as Ik,useId as Wp,useRef as Hp,useState as zp}from"react";import{ThemeIcon as hk}from"efficient-easel/icons";import{SettingsField as gk}from"efficient-easel/panel";import{jsx as $,jsxs as Ko,Fragment as ek}from"react/jsx-runtime";import{SettingsField as ri,SettingsGroupSub as ok}from"efficient-easel/panel";import{Button as ti}from"efficient-shell/ui";import{jsx as jo,jsxs as Rp}from"react/jsx-runtime";import{SettingsField as Kw}from"efficient-easel/panel";import{AccentIcon as Vw}from"efficient-easel/icons";import{Tooltip as Yw}from"efficient-shell/ui";function oi(e){return xo(e).background}function Xw(e){let o=$o(e.accent,oi(e));return o===null?null:{ratio:o,grade:At(o)}}function Zw(e){let o=oi(e),t=$o(e.accent,o);return t===null?[]:jd(e.accent).filter(r=>{let a=$o(r,o);return a!==null&&a>t&&At(a)==="good"})}var Qw={good:"Easy to read","large-only":Rt["large-only"],hard:Rt.hard};function Ap({value:e,onChange:o}){let t=Xw(e),r=t?.grade,a=t&&t.grade!=="good"?Zw(e):[];return jo(Kw,{label:l("Main color"),icon:jo(Vw,{}),hint:t?l(Qw[t.grade]):void 0,action:jo(Je,{value:e.accent,onChange:n=>o({...e,accent:n}),label:l("Main color")}),children:a.length>0?jo("div",{className:"w-full min-w-0",children:Rp("div",{className:"sf-readability",children:[jo("p",{className:"sf-readability-advice",children:Jw(r,!0)}),jo("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=$o(n,oi(e));return jo(Yw,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:Rp("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>o({...e,accent:n}),children:[jo("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),s?`${s.toFixed(1)}:1`:n.toUpperCase()]})},n)})})]})}):null})}function Jw(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 tk,GroundIcon as rk,LayoutIcon as ak,SquareIcon as nk,TextSmallIcon as lk,TypeIcon as Bp}from"efficient-easel/icons";var Wr=e=>l("Theme {n}",{n:e+1});function _p({colors:e}){let o=xo(e),t=Or(e)??o.accent;return Ko("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[$("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),Ko("span",{className:"sf-theme-headline",children:[l("Heading")," ",$("span",{style:{color:o.accent},children:l("accent")})]}),$("span",{className:"sf-theme-body",children:l("body text")}),Ko("span",{className:"sf-theme-row",children:[$("span",{className:"sf-theme-btn",style:{background:t,color:us(e,o.accent)},children:l("button")}),$("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var ai={"Text color":$(Bp,{}),"Label color":$(lk,{}),Background:$(rk,{}),"Panels & cards":$(ak,{}),Borders:$(nk,{}),"Button color":$(tk,{}),"Button text color":$(Bp,{})};function sk({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return $(ri,{label:l(e),icon:ai[e],htmlFor:n,action:$(Je,{id:n,label:l(e),value:t,onChange:s=>r(o,s)})})}function ik({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 $(ri,{label:l("Button color"),icon:ai["Button color"],htmlFor:a,action:$(Je,{id:a,label:l("Button color"),value:s,caption:n?s:l("Main"),onChange:t})})}function fk({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=Kd(e),s=us(e,o),i=Or(e)??o,c=At($o(s,i)??0);return $(ri,{label:l("Button text color"),icon:ai["Button text color"],hint:n&&c!=="good"?l("{grade} on the button",{grade:l(Rt[c])}):void 0,htmlFor:a,action:$(Je,{id:a,label:l("Button text color"),value:s,caption:n?s:l("Auto"),onChange:t})})}var ck=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{group:"Surfaces"},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function ni({colors:e,onChange:o,idPrefix:t}){let r=xo(e);return $(ek,{children:ck.map(a=>"colour"in a?$(Ap,{value:e,onChange:o},"colour"):"group"in a?$(ok,{title:l(a.group)},a.group):"button"in a?$(ik,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?$(fk,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):$(sk,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function sn({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:i,onChangeColors:c}){let u=xo(o),p=Wr(e),m=e<ds.length&&!o.brandInk?ds[e]:null,x=At($o(u.text,u.background)??0),h=m?JSON.stringify(o)!==JSON.stringify(m):!1,b=a!==void 0;return Ko("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[$("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:$(_p,{colors:o})}),Ko("div",{className:"sf-theme-foot",children:[$("span",{className:"sf-theme-name",children:p}),x!=="good"&&$("span",{className:"sf-theme-warn",children:l(Rt[x])}),n&&i&&$(ti,{variant:a?"primary":"secondary",size:"sm",className:"sf-theme-edit","aria-expanded":b?a:void 0,"aria-controls":b?`sf-theme-colours-${e}`:void 0,"aria-label":a?l("Done {name}",{name:p}):l("Edit {name}",{name:p}),onClick:i,children:a?l("Done"):l("Edit")})]}),a&&Ko("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[$(ni,{colors:o,onChange:C=>c?.(C)}),m&&$(ti,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!h,onClick:()=>c?.({...m}),children:h?l("Reset {name} to the preset",{name:p}):l("Not changed")})]})]})}function Dp({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:i,onKeyDown:c,onEdit:u}){return Ko("div",{className:"sf-secttheme-btn",children:[$("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:i,onKeyDown:c,children:e?$(_p,{colors:e}):$("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Ko("div",{className:"sf-theme-foot",children:[$("span",{id:t,className:"sf-theme-name",children:o}),u&&$(ti,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:u,children:l("Edit")}),$("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:$("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as li,useEffect as dk,useRef as fn}from"react";function Np(e=ao()){return(o,t,r)=>{let a=Ue(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new gs("invalid","This backend stores no site theme."))}}function Mp(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function uk(e,o=Np()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=Mp({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 zt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=fn(null),n=fn({}),s=Ae(),i=fn(r);i.current=r;let c=fn(null),u=li(x=>{if(x.status==="skipped"){let h=`skipped:${x.reason}`;if(c.current===h)return;c.current=h}else c.current=null;i.current?.(x)},[]),p=li(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let x=n.current;n.current={};let h=await uk({themeFromDocument:e,token:o?.current,siteId:t,patch:x},Np(s));return u(h),h},[e,o,t,u,s]),m=li((x,h=!1)=>{let b=Mp({themeFromDocument:e,token:o?.current});if(b){u(b);return}n.current={...n.current,...x},a.current&&clearTimeout(a.current),h?p():a.current=setTimeout(()=>{p()},500)},[e,o,p,u]);return dk(()=>()=>{p()},[p]),{persist:m,flush:p}}var bk="Follow the page",h4="Follow the slideshow",yk=e=>l("Editing {name} changes it everywhere.",{name:e});function Sk({colors:e}){if(!e)return Te("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=xo(e);return xt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Te("i",{style:{background:o.background}}),Te("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function Ck({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return xt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&xt(pk,{children:[xt("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(en),children:[Te(Sk,{}),Te("span",{className:"sf-secttheme-name",children:l(n)})]}),Te("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&Te("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:Wr(o)})}),e.map((s,i)=>i===o?null:Te(sn,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>r(i)},i))]})}function vk({index:e,colors:o,onChange:t,onDone:r}){let a=Wr(e),n=Wp();return xt("div",{className:"sf-secttheme-sheet",children:[xt("div",{className:"sf-secttheme-sheet-head",children:[Te("span",{children:a}),Te("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:l("Done")})]}),Te("div",{className:"sf-secttheme-rows",children:Te(ni,{colors:o,onChange:t,idPrefix:n})}),Te("p",{className:"sf-secttheme-warn",children:yk(a)})]})}function Gp({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=Z(),s=Qe(a),i=xk(Dt),c=i?.tokenRef,u=i?.siteId??null,p=!i?.capabilities?.hasSiteTheme,{persist:m,flush:x}=zt({themeFromDocument:p,tokenRef:c,siteId:u}),h=Qe(s),b=h.themes,C=Ns(e),k=C!==null?b[C]:void 0,v=k??(b.length?Ot(h):void 0),[w,g]=zp(!1),[y,E]=zp(null),F=Hp(null),L=Hp(null),B=Wp(),O=mk(()=>{g(!1),E(null)},[]);Ik(()=>{if(!w&&y===null)return;let H=W=>{F.current&&!F.current.contains(W.target)&&(x(),O())};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[w,y,O,x]);let M=H=>{o(H),O()},re=H=>{if(y===null)return;let W=b.map((oe,Oe)=>Oe===y?H:oe),A={...h,themes:W};n(A),m({selected_preset:A.selected,theme_presets:A.themes})};return xt("div",{className:"sf-secttheme",ref:F,children:[Te(gk,{label:l("Theme"),icon:Te(hk,{}),labelId:`${B}-label`,hint:r,children:Te(Dp,{colors:v,onEdit:C!==null?()=>{E(C),g(!1)}:void 0,name:k?Wr(C):l(t??bk),nameId:`${B}-value`,labelId:`${B}-label`,open:w,menuId:B,buttonRef:L,onClick:()=>{E(null),g(H=>!H)},onKeyDown:H=>{H.key==="Escape"&&(w||y!==null)&&(H.preventDefault(),O())}})}),w&&y===null&&Te("div",{onKeyDown:H=>{H.key==="Escape"&&(H.preventDefault(),O(),L.current?.focus())},children:Te(Ck,{themes:b,value:C,onPick:M,onEdit:H=>{E(H),g(!1)},menuId:B,followLabel:t})}),y!==null&&b[y]&&Te(vk,{index:y,colors:b[y],onChange:re,onDone:()=>{x(),O(),L.current?.focus()}})]})}import{jsx as Up}from"react/jsx-runtime";import{useId as wk}from"react";import{FieldSelect as kk}from"efficient-easel/fields";import{SettingsField as Tk}from"efficient-easel/panel";function Fk(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 w4({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:i}){let c=wk(),u=`${c}-label`,p=`${c}-button`,m=r??"",x=o.some(k=>k.value===m)?m:t,h=l(e),b=n===void 0?void 0:l(n),C=Up(kk,{id:p,value:x,options:Fk(o),onChange:a,placeholder:b,searchPlaceholder:b,...s?{ariaLabel:h}:{ariaLabelledBy:`${u} ${p}`},searchable:!0,groupCount:!0,inline:!0});return s?C:Up(Tk,{label:h,labelId:u,icon:i,children:C})}import{jsx as It,jsxs as Ok}from"react/jsx-runtime";import{SettingsField as Jp}from"efficient-easel/panel";import{LinkIcon as Rk}from"efficient-easel/icons";import{LinkPicker as Ak,TextLinkField as Bk}from"efficient-shell/ui";import{useEffect as Qp,useMemo as un,useRef as _k,useState as dn}from"react";function $p(){return ao().auth.token}var cn="homepage";function qp(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var jp=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"custom",label:"Custom URL"}];function Kp(e){return e.offersCommerce&&e.offersService?jp:jp.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}function Gr(e){return e===cn?"/":`/${e}`}function Vp(e){return`/journal/${e}`}function R4(e){return`/wheels/${e}`}function Yp(e,o){return`${Gr(e)}#${o}`}function Ek(e){return qp(e)}function Pk(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function Xp(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=Pk(a?.props?.anchor);if(!n)continue;let s=Ek(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function A4(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}var Lk=()=>({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")});function Zp(e,o,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(e.startsWith("/wheels/"))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 si(e,o){let t=Lk(),r=e.pages.map(p=>({value:Gr(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:Xp(...p.docs).map(m=>({value:Yp(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:Vp(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"custom":return{type:"text"}}},c=Kp(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"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:c,rules:{kindOf:p=>Zp(p,n),targetOf:p=>p,readFilter:()=>null,withFilter:p=>p}};let u=p=>{let m=o.withFilter(p,null);return o.listingPaths.includes(m)?m:p};return{kinds:c,rules:{kindOf:p=>Zp(p,n,{listingPaths:o.listingPaths,targetOf:u}),targetOf:u,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:p=>o.listingPaths.includes(p)?o.filtersFor(p):null}}function em(e){let o=new Map;return(t="")=>{let r=$p(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!ao().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var Dk=em(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=Ue();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),Nk=em(async(e,o)=>await Ue().blog?.posts(o?{siteId:o}:void 0)??[]);function Mk({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=un(()=>si(r,a),[r,a]),s=l(t);return It(Jp,{label:s,icon:It(Rk,{}),children:It(Ak,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function om(){let{siteId:e,capabilities:o}=Se(),{offersCommerce:t,hasBlog:r}=o,[a,n]=dn([]),[s,i]=dn([]),[c,u]=dn([]),[p,m]=dn(null),x=Ae().chrome,h=x?.products?.list,b=x?.linkFilters,C=b?void 0:x?.linkRow,k=_k(!0);Qp(()=>(k.current=!0,()=>{k.current=!1}),[]),Qp(()=>{let g=!0;return Dk(e??void 0).then(y=>g&&k.current&&n(y)),r&&Nk(e??void 0).then(y=>g&&k.current&&i(y)),t&&h?.().then(y=>g&&k.current&&u(y)),t&&b?b.load(e).catch(()=>null).then(y=>g&&k.current&&m(()=>y)):m(null),()=>{g=!1}},[e,t,r,h,b]);let v=un(()=>({pages:a.filter(g=>!bu(g.slug)).map(g=>({slug:g.slug,title:g.label,docs:[g.layout]})),posts:r?s.map(g=>({slug:g.slug,title:g.title})):[],products:t?c.map(g=>({href:g.href,name:g.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,c,t,r]),w=un(()=>p?p(v.pages):null,[p,v]);return{data:v,filters:w,pages:a,offersCommerce:t,HostLinkRow:C}}function Q4({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:i}=om(),c=un(()=>si(s,i),[s,i]),u=l(e);return It(Jp,{label:u,icon:o,children:It(Bk,{label:u,text:t,onTextChange:r,link:a,onLinkChange:p=>n(p),kinds:c.kinds,rules:c.rules,filtersFor:c.filtersFor})})}function tm({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:i,HostLinkRow:c}=om(),u=a.pages.map(m=>Gr(m.slug)),p=i&&c&&(r==="/"||u.includes(r))?c:void 0;return Ok("div",{children:[It(Mk,{value:r,onChange:o,label:t,data:a,filters:n}),p&&It(p,{value:r,onChange:o,pages:s})]})}import{UiIcon as qm}from"efficient-easel/draw/client";var lo={min:10,max:200,step:10};function rm(e,o){let t=typeof e=="number"?e:void 0,r=typeof o=="number"?o:void 0;if(!(t===void 0&&r===void 0))return{paddingTop:t,paddingBottom:r}}var Hk="sf-pad-top-phone",zk="sf-pad-bottom-phone",Wk="--sf-pad-t-phone",Gk="--sf-pad-b-phone",Uk="sf-pad-left-phone",$k="sf-pad-right-phone",qk="--sf-pad-l-phone",jk="--sf-pad-r-phone";function lm(e,o,t,r,a,n,s,i){let c=rm(e,o)??{},u={},p=["sf-section-pad"];typeof t=="number"&&(p.push(Hk),u[Wk]=`${t}px`),typeof r=="number"&&(p.push(zk),u[Gk]=`${r}px`);let m={};return typeof a=="number"&&(m.paddingLeft=a),typeof n=="number"&&(m.paddingRight=n),typeof s=="number"&&(p.push(Uk),u[qk]=`${s}px`),typeof i=="number"&&(p.push($k),u[jk]=`${i}px`),p.length===1&&rm(e,o)===void 0&&!Object.keys(m).length?null:{className:p.join(" "),style:{...c,...m,...u}}}var am=e=>typeof e=="number"?e:void 0;function nm(e,o,t){let r=am(e)??t,a=am(o);return r===void 0?a:a===void 0?r:r+a}function e6(e,o={}){return{top:nm(e.padTop,e.sectionPaddingTop,o.top),bottom:nm(e.padBottom,e.sectionPaddingBottom,o.bottom)}}function o6(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 t6(e){return lm(e.top,e.bottom,e.topPhone,e.bottomPhone,e.left,e.right,e.leftPhone,e.rightPhone)}function r6(e,o){let t=r=>typeof r=="number"?r+o:void 0;return lm(t(e.top),t(e.bottom),t(e.topPhone),t(e.bottomPhone),e.left,e.right,e.leftPhone,e.rightPhone)}var Kk=["auto","fixed","screen"],Vk=["px","%"];var Yk="var(--sf-header-h, 88px)",ii={min:40,max:2e3,step:10,fallback:600},fi={min:10,max:200,step:5,fallback:100},Xk="sf-section-minh",sm={base:"--sf-section-minh",small:"--sf-section-minh-s"},fm=e=>typeof e=="string"&&Kk.includes(e),Zk=e=>typeof e=="string"&&Vk.includes(e);function pn(e){let o=fm(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":Zk(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?fi.fallback:ii.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function cm(e){let{mode:o,value:t,unit:r}=pn(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${Yk})`:`100${s}`;return[`calc(${n("vh")} * ${a})`,`calc(${n("svh")} * ${a})`]}function Qk(e){let o=cm(e);if(!o)return;let[t,r]=o;return{display:"grid",[sm.base]:t,...r?{[sm.small]:r}:{}}}var n6=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Wt="Height",Jk="sf-section-minh-phone",im={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function ci(e){return fm(e.sectionHeightModePhone)}function l6(e){return pn({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function e0(e){let o=Qk(e),t=ci(e)?cm({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!o&&!t)return null;let r=[Xk],a={...o??{}};return t&&(r.push(Jk),a[im.base]=t[0],t[1]&&(a[im.small]=t[1])),{className:r.join(" "),style:a}}function s6(e){return e0(e)!==null}var mn="Stick to top",Vo={min:0,max:200,step:4,fallback:0},o0="sf-section-stick",t0="sf-section-stick-phone-on",r0="sf-section-stick-phone-off",dm={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},f6=new Set(["CategoryBar","DocTabs","IntroBleed"]);function um(e){let o=typeof e=="number"&&Number.isFinite(e)?e:Vo.fallback;return Math.min(Vo.max,Math.max(Vo.min,Math.round(o)))}function di(e){return typeof e.stickTopPhone=="boolean"}function ui(e){let o=e.stickTop===!0,t=um(e.stickTopDistance),r=di(e),a=r?e.stickTopPhone===!0:o,n=r?um(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:a,phoneDistance:n,ownPhone:r}}function c6(e){let o=ui(e);if(!o.desktop&&!o.phone)return null;let t=[o0],r={};return o.desktop&&(r[dm.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?t0:r0),o.phone&&(r[dm.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:r}}var a0=["column","row","tabs"],pm="Direction",n0={column:"Stacked",row:"One row",tabs:"Tabs"},mm={Flex:a0,HeroGroup:["column","row"]},l0={Flex:"row",HeroGroup:"column"},s0={column:"flex-col",row:"flex-row",tabs:"flex-col"};function xn(e,o){return mm[e].includes(o)?o:l0[e]}function u6(e,o){return s0[xn(e,o)]}function xm(e){return mm[e].map(o=>({label:n0[o],value:o}))}var pi=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],gm=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"}],bm="Wrap",mi=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],Im={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},hm={start:"items-start",center:"items-center",stretch:"items-stretch"};function m6(e,o){let t=typeof e=="string"&&e in Im?Im[e]:"",r=typeof o=="string"&&o in hm?hm[o]:"";return[t,r].filter(Boolean).join(" ")}function x6(e){return e===!0||e==="wrap"?"flex-wrap":""}var xi="Block widths",In=[{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]}],Ur="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",i0={equal:Ur,bigLeft:`${Ur} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${Ur} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${Ur} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${Ur} [&>*:last-child]:min-[800px]:grow-[3]`};function I6(e){return typeof e=="string"?i0[e]??"":""}var ym="Columns on phone",Ii=1,Sm=3,f0={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 h6(e){let o=Number(e);return f0[o]??"max-[800px]:flex-col"}var Cm="Block spacing",hi=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],c0="sf-box-gap-only";function g6(e){return e==="gap"?c0:""}var d0=["solid","dashed","dotted"],u0=["top","right","bottom","left"],y6="sf-section-border",S6="sf-section-border-self",p0=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,vm=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function wm(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",r={};for(let a of u0){let n=vm(e[a])??vm(e.width);n!==void 0&&(r[`--sf-border-${a}-width${t}`]=n)}return typeof e.style=="string"&&d0.includes(e.style)&&(r[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&p0.test(e.color)&&(r[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(r).length?r:void 0}function C6(e,o){let t=wm(e),r=wm(o,{phone:!0});return t||r?{...t,...r}:void 0}var Fm="sf.gapContainer",Yo={min:-32,max:64,step:2},Em={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},Gt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},m0=new Set(["Events","GalleryB"]);function gi(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Yo.min)return o;if(typeof o=="string"){let r=Em[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:Gt[e]}var x0="sf-gap-overlap",I0="--sf-gap-overlap",Pm="--sf-block-gap",h0="--sf-block-gap-rem",ht={min:0,max:Yo.max,step:Yo.step};function g0(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),ht.min),ht.max);return o-o%ht.step}function w6(e){let o=g0(e);return o===null?{}:{[Pm]:`${o}px`,[h0]:`${o/16}rem`}}var km="sf-gap-zone",Tm="--sf-gap-len";function bi(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Yo.min?!0:typeof o=="string"&&typeof Em[e]?.[o]=="number"}var b0={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function k6(e,o,t){if(!bi(e,o)){let a=`${Gt[e]}px`,n=m0.has(e)?`var(--sf-card-gap, ${a})`:a;return{className:` ${km}`,style:{[Tm]:`var(${Pm}, ${n})`}}}let r=gi(e,o);return r>=0?{className:` ${km}`,style:{[Tm]:`${r}px`}}:{className:` ${x0} ${b0[t]}`,style:{gap:"0px",[I0]:`${-r/2}px`}}}var Lm=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],Om={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},hn="var(--section-bg)",gn="inherit";function F6(e,o){return e===gn?hn:e===void 0?o:bn(e)}var y0=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function bn(e){return e.replace(y0,"var(--site-$1")}function Rm(e,o){return e===gn?!0:e===void 0&&o===hn}var Am=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],Bm={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Ut="var(--wheel-stage)",yn="transparent",$r="inherit";function L6(e,o){return bn(yi(e,o))}function yi(e,o){return e===$r?Ut:e==null?o:e===!0?Ut:e===!1?yn:e}function O6(e){return typeof e=="string"&&e!==$r?bn(e):Ut}function R6(e){return e!==yn&&e!=="none"&&e!==""}function _m(e,o){return e===$r||e===!0?!0:e==null?o===Ut:!1}var Dm="inherit",Sn="fixed",Nm=e=>typeof e!="number"&&e!==Sn,S0="var(--sf-heading-max, 9999px)";function B6(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===Sn)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${S0})`:a}var Be={min:1e3,max:2e3,step:50,default:1600};function Mm(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function D6(e,o){if(e!==!1)return null;let t=typeof o=="number"?o:Be.default;return Mm(t)}var Hm="--sf-site-width",Cn=`var(${Hm},${Be.default}px)`,N6=`max-w-[${Cn}]`,M6=`max-w-[${Be.default}px]`;function C0(e){return typeof e!="number"||!Number.isFinite(e)?Be.default:Math.round(Math.min(Math.max(e,Be.min),Be.max))}function H6(e){let o=C0(e);return o===Be.default?{}:{[Hm]:`${o}px`}}var So={min:0,max:80,step:4,default:40},zm="--sf-site-gutter",$e=`var(${zm},${So.default}px)`,v0=`px-[${$e}]`;var Xo={md:`min(24px,${$e})`,sm:`min(20px,${$e})`,frame:`min(24px,${$e})`,tabs:`min(16px,${$e})`},z6=[[`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-[${$e}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${$e})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${$e})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${$e})]`,"max-[720px]:-mx-5"],[`-mx-[${$e}]`,"-mx-10"],[v0,"px-10"]];var W6="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))]";function w0(e){return typeof e!="number"||!Number.isFinite(e)?So.default:Math.round(Math.min(Math.max(e,So.min),So.max))}function G6(e){let o=w0(e);return o===So.default?{}:{[zm]:`${o}px`}}var vn=`min(var(--sf-page-cap,${Cn}),${Cn})`,U6=`max-w-[${vn}]`,$6=`max-w-[min(var(--sf-page-cap,${Be.default}px),${Be.default}px)]`,Wm="--sf-hero-cap",k0=`var(${Wm},none)`,q6=`max-w-[${k0}]`,Si="--sf-hero-bleed-m",Ci="--sf-hero-bleed-w",j6=`var(${Si},calc(50% - 50vw))`,K6=`var(${Ci},100vw)`,V6=`mx-[var(${Si},calc(50%_-_50vw))]`,Y6=`w-[var(${Ci},100vw)]`,vi="--sf-hero-chrome-x",wi="--sf-hero-chrome-cap";function X6(e){return e===!0?{[Wm]:vn,[Si]:"auto",[Ci]:"100%",[vi]:"24px",[wi]:"none"}:{}}var ki=`calc(${Cn} - ${$e}*2)`,Z6=`max-w-[${ki.replace(/ /g,"_")}]`;var T0="--sf-chrome-cap",F0=`var(${T0},${ki})`,Q6="data-page-width";function J6(e){return e==="full"?"full":null}function ez(e){return e==="full"?null:Mm(e==="content"?ki:F0)}function oz(e){if(e==="full")return"full";if(e==="content")return"content"}var E0=["contained","page","full"],Gm=["full","page"],qr={full:"Full width",page:"Content width"},Ti="inherit",P0=e=>typeof e=="string"&&E0.includes(e),L0=e=>e===Ti;function Fi(e,o){let t=typeof e.pageWidth=="number"?e.pageWidth:Be.default;return L0(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:P0(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 Ei(e){return Fi(e,"page").mode==="full"}import{jsx as O0}from"react/jsx-runtime";import{createContext as R0,useContext as A0}from"react";var B0=2,_0=B0+1,Um=R0(2);function $m({tier:e,children:o}){return O0(Um.Provider,{value:e,children:o})}function Pi(e){let o=A0(Um);return _0+Math.max(0,e-o)}import{withStyleKind as _T}from"efficient-easel/style-clipboard";import{TEXT_CONTROL_KINDS as gW,SCALAR_TEXT_CONTROLS as bW}from"efficient-easel/draw";function jt(e){for(let[o,t]of Object.entries(e))t&&typeof t=="object"&&!Do(t)&&_T(t,`section:${o}`);return e}function dx(){return null}function Ai(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return I(dx,{},e)}function DT(e){return e.type===dx}function Co(e){return DT(e)?void 0:e}function qt(e,o){return l("{value} from {from}",{value:e,from:o})}function NT(){let{appState:e}=Kr(a=>a),o=e.data.root?.props??{},{mode:t,pageWidth:r}=Fi(o,"full");return t==="page"?qt(`${r}px`,l("the page")):t==="contained"?qt(l("Contained"),l("the page")):qt(l("Full"),l("the page"))}function MT(){let{blockGap:e}=Z();return e===null?l("this container's own spacing"):qt(`${e}px`,l("Site styles"))}function HT({inherited:e,onReset:o,label:t}){return I(qe,{words:j()?.panel,label:l(t),changed:!e,detail:MT(),onReset:o})}function zT({inherited:e,onReset:o,label:t}){return I(qe,{words:j()?.panel,label:l(t),changed:!e,detail:NT(),onReset:o})}function Kt({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:i=!0}){let{text:c,hidden:u}=Qo(e),p=Oi(null),m=Oi(null),x=w=>o(s?{text:w,hidden:u}:w),h=()=>o({text:c,hidden:!u}),b=s&&u,C=N0(),k=a?jT(a)?I("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(a)}):I($u,{children:l(a)}):void 0,v=u?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return I(ne,{label:l(t),icon:I(IT,{}),htmlFor:C,className:b?"is-hidden":void 0,hint:k,action:s?I(cx,{content:v,children:I("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":v,onClick:h,children:u?I(qm,{name:"eye-off",size:14}):I(qm,{name:"eye",size:14})})}):void 0,children:bt("div",{className:"sf-copybox",children:[i&&I(js,{target:n?m:p,value:c,onChange:x}),n?I("textarea",{id:C,ref:m,value:c,placeholder:r===void 0?void 0:l(r),onChange:w=>x(w.target.value)}):I("input",{id:C,ref:p,type:"text",value:c,placeholder:r===void 0?void 0:l(r),onChange:w=>x(w.target.value)})]})})}function pW(e,o){return{...e,[W0]:o}}function mW(e){let o=e[Bo];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[Bo]:{...o,offPage:!0}}}function Tn(e){return!e||typeof e!="object"?!1:e[Bo]?.offPage===!0}var ux="sfPanelOnly";function xW(e){if(!e[Bo])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ux]:!0}}function px(e){return!!e&&typeof e=="object"&&e[ux]===!0}function IW(e){let o=e[Bo];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Bo]:{...o,identifier:!0}}}function yW(e,o){if(!e[Bo])throw new Error("inOwnBox: the field holds no authored text");let{[hp]:t,...r}=e;return{...r,[Vs]:!0,render:o}}var WT=new Set(BT),Vt=(e,o)=>{let t={...o,[Bo]:e};if(!WT.has(e.control))return t;let r=o.render;return{...Mr(t,"authored-copy"),render:a=>I(Sp,{name:a.name,children:r(a)})}},SW="Everything else on this block comes from the linked post. Unlink it to edit by hand.",GT={field:"source.slug",set:!0},CW={not:GT},UT="Select a word, then press the highlighter.",$T="A short name so a link can jump straight to this section, like yoursite.com/page#about.",qT=new Set([UT]),jT=e=>qT.has(e);function vW(e,o,t){return Vt({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Kt,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function wW(e,o,t){return Vt({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Kt,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function KT(e,o,t){return Vt({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Kt,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function kW(e,o,t){return Vt({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Kt,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function TW(e){return{type:"custom",[H0]:{label:e},render:({value:o,onChange:t})=>I(tm,{value:M0(o),onChange:t,label:e})}}function FW(e,o,t){return Vt({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Kt,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var mx={Design:G0,Animation:Qm};function xx(e,o){return e.includes("Design")?o!=="Design":null}function VT({label:e}){return I(bT,{title:l(e),level:Pi(1)})}function YT({level:e,label:o}){return e===1?I(VT,{label:o}):I(Yt,{label:o})}function Ix(e,o){return{type:"custom",[Ri]:{label:e,level:o},render:()=>I(YT,{level:o,label:e})}}function He(e){return Ix(e,2)}function EW(e){return{type:"custom",render:()=>I(XT,{text:e})}}function XT({text:e}){return I("p",{className:"sf-note",children:l(e)})}function PW(e){return Ix(e,1)}function LW(e){return Do(e)!==null&&e?.tabs!==void 0}var jm=new Map;function Fn(e,o){let t=`${e}\0${o?o.join(""):""}`,r=jm.get(t)??{type:"custom",tabs:o,[Ri]:{label:e,level:1},bucket:e,marker:!0,render:()=>I(_o,{})};return jm.set(t,r),r}var Km=new Map;function Bi(e){let o=Km.get(e)??{type:"custom",[Ri]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>I(_o,{})};return Km.set(e,o),o}function ZT(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function hx(e,o){return ZT(e)===o?e:{...e,marker:!0,fold:o,render:()=>I(_o,{})}}function gx(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>I(_o,{})}}function Yt({label:e}){return I(yT,{title:l(e),level:Pi(2)})}function bx({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 bt("div",{className:"sf-swatches",children:[e.map(i=>{let c=r?.[i]?l(r[i]):i;return I(cx,{content:c,children:I("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":c})},i)}),I("span",{className:"sf-swatch-hex",children:s})]})}function OW(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=Rm(t,o);return I(ne,{label:l(e),icon:I(j0,{}),changed:!a,action:I(qe,{words:j()?.panel,label:l(e),changed:!a,detail:l("the theme's section background"),onReset:()=>r(gn)}),children:bx({swatches:Lm,current:a?hn:t??o??"",onPick:r,names:Om})})}}}function QT(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=_m(a,o);return I(ne,{label:l(e),icon:I(nT,{}),changed:!n,action:I(qe,{words:j()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>r($r)}),children:bx({swatches:Am,current:n?Ut:yi(a,o),onPick:r,names:Bm})})}}}function En(e=t=>t,o){return jt({_gSectionTheme:He(Vu),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>I(Gp,{value:e(t),onChange:r,followLabel:o})}})}function je({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:i,ariaLabel:c,disabled:u=!1}){let p=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=o;return I("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(i-e)/(o-e)}:void 0,children:I(AT,{min:e,max:o,step:t,value:r,suffix:n||void 0,showInput:s,label:c===void 0?void 0:l(c),disabled:u,size:"sm",className:"sf-slider-track",onChange:m=>{m!==null&&m!==r&&a(m)}})})}function $t(e,o,t,r,a,n,s="",i){return{type:"custom",render:c=>I(ne,{label:l(e),icon:Co(o),action:i?i("storedValue"in c?c.storedValue:c.value,c.onChange):void 0,children:je({min:t,max:r,step:a,value:typeof c.value=="number"?c.value:n,suffix:s,ariaLabel:e,onChange:c.onChange})})}}function yx(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:i,unsetMark:c,icon:u}=o;return{type:"custom",render:({value:p,onChange:m})=>{let x=typeof p=="number"?p:null,h=x===null;return I(ne,{label:l(e),icon:u?Co(u):void 0,value:h?c||n===void 0?void 0:l(n):`${x}px`,changed:!h,action:c?Xm(c,{changed:!h,onReset:()=>m(null)}):I(qe,{words:j()?.panel,label:l(e),changed:!h,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}):je({min:t,max:r,step:a,value:x??t,readout:!1,ariaLabel:e,onChange:m})})}}}function RW(e){let o=$t("Gap",I(ex,{}),Yo.min,Yo.max,Yo.step,Gt[e],"px",(t,r)=>I(HT,{inherited:!bi(e,t),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[Fm]:e,render:t=>o.render({...t,value:gi(e,t.value,t.field?.siteGap),storedValue:t.value,onChange:r=>t.onChange(r)})}}var Pn="Corners";function _i(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return I(ne,{label:l(Pn),icon:I(Z0,{}),changed:a,action:Xm(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:I(JT,{tier:e,px:r,onRadius:t})})}}}function Sx(e){let o=null;try{o=Zm()}catch{o=null}return[o?.values?.[e],t=>o?.onChange(e,t)]}function JT({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),a=e.useClosedReason?e.useClosedReason():null,[n,s]=Sx(e.sidesKey),i=Po(n)??[...ct];return I(OT,{label:l(Pn),value:i,corners:ku,onChange:c=>{let u=Po(c)??[];s(u.length===ct.length?null:u)},radius:o,onRadiusChange:t,radiusMin:to,radiusMax:lt,radiusStep:e.step??1,radiusPlaceholder:String(r),disabled:a!==null,disabledReason:a??void 0})}function Cx(){return Mr({type:"custom",render:()=>I(Ht,{})},"always")}function eF({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=Z(),a=typeof r=="number"?`${r}px`:l("not set");return I(qe,{words:j()?.panel,label:l(e),changed:o,detail:r==null?l("the built-in corners"):qt(a,l("Site styles")),onReset:t})}function oF(){let{cornerRadiusPx:e}=Z();return typeof e=="number"?e:to}function tF(){return _i({sidesKey:"sectionCornerSides",useFollowed:oF,useClosedReason:()=>wx()?l(vx):null,mark:I(eF,{label:Pn}),hint:I(rF,{})})}var vx="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function wx(){return Ei(yt())}function rF(){return I(_o,{children:wx()?vx:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function Ln(){return jt({_gShape:He("Shape"),sectionCorners:tF(),sectionCornerSides:Cx(),sectionBorder:Vm("desktop"),sectionBorderPhone:Vm("mobile")})}var aF=()=>({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 nF(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function lF(){let e;try{let o=Qe(Z().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||Ud.line}function sF({value:e,onChange:o,tier:t}){let[r]=Sx("sectionBorder"),a=lF(),n=e&&typeof e=="object"?e:{},s=t==="mobile"?r&&typeof r=="object"?r:{}:{},[i,c]=kn(()=>TT(n,s)),u=aF();return I(ne,{label:l("Border"),icon:I(K0,{}),action:I(sx,{each:i,label:l("Each side"),onChange:c}),children:I(ST,{label:l("Border"),value:n,each:i,onChange:p=>o(nF(p)),placeholder:{sides:kT(s),style:s.style??"solid",color:s.color||a},presets:[a],words:u,max:20})})}function Vm(e){return ve(e,{type:"custom",render:({value:o,onChange:t})=>I(sF,{value:o,onChange:t,tier:e})})}function On(){return{_gMotion:He("Motion"),sectionAnimation:Mi("Entrance",I(Qm,{}),[...Xu],Ms)}}function Di(){let e=null;try{let{appState:o,selectedItem:t}=Kr(a=>a),r=t?.props?.id?String(t.props.id):void 0;e=r?zs(o?.data,r):null}catch{e=null}return e!==null&&Ei(e)}function kx(e){let{cornerRadiusPx:o}=Z(),t=Di(),r=typeof o=="number"?o:e,a=null;try{let{appState:s,selectedItem:i}=Kr(u=>u),c=i?.props?.id?String(i.props.id):void 0;a=c?zs(s?.data,c):null}catch{a=null}if(t||!a)return r;let n=a.sectionCorners;return Ts(n)?n:r}function iF({label:e,changed:o=!1,onReset:t=()=>{}}){let r=Di(),a=kx(to),n=r?"Site":"Section";return I(qe,{words:j()?.panel,label:l(e),changed:o,detail:qt(`${a}px`,r?l("Site styles"):l("the section")),onReset:t})}function fF(){return I(_o,{children:Di()?l("The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners."):l("Follows the section's Corners until you set a number here.")})}function cF(){return _i({sidesKey:"cardCornerSides",useFollowed:()=>kx(to),mark:I(iF,{label:Pn}),hint:I(fF,{})})}function dF(){return{type:"custom",render:()=>I(Ru,{})}}function AW(){return{_gShape:He("Shape"),cardCorners:cF(),cardCornerSides:Cx(),cardCornersApplyAll:dF()}}function BW(){return Zo("Justify",I(q0,{}),pi,pi[0].value)}function _W(){return Zo("Item alignment",I(U0,{}),gm,"stretch")}function DW(){return Zo(bm,I(gT,{}),mi,mi[0].value)}function NW(){return{type:"custom",render:({value:e,onChange:o})=>{let t=In.find(r=>r.value===e)??In[0];return I(ne,{label:l(xi),icon:I(Jm,{}),value:l(t.label),children:I(fx,{className:"sf-gallery-layouts",label:l(xi),value:t.value,onChange:o,options:In.map(r=>({value:r.value,label:l(r.label),picture:I("span",{className:"sf-gallery-pic",children:uF(r.weights).map((a,n)=>I("i",{style:{gridColumn:`span ${a}`}},n))})}))})})}}}function uF(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 MW(){return Zo(Cm,I(ex,{}),hi,hi[0].value)}function HW(){return $t(ym,I(cT,{}),Ii,Sm,1,Ii)}function zW(e){let o=Mi(pm,Ai("`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)."),xm(e),xn(e,void 0));return{type:"custom",render:t=>o.render({...t,value:xn(e,t.value),onChange:r=>t.onChange(r)})}}function WW(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:i})=>I(ne,{label:l(e),icon:I(Bs,{noun:n}),action:I(qe,{words:j()?.panel,label:l(e),changed:!Nm(s),detail:l("the Text style in Site styles"),onReset:()=>i(Dm),defaultAction:{onPress:()=>i(Sn),title:l("Keep this section's own built-in size"),icon:I(V0,{})}}),children:je({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:i})})}}function GW(){return{_gCellWidth:He("Cell width"),gridSpan:Zo("Positions",I(Jm,{}),[{label:"Auto",value:""},...Array.from({length:Ya},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function yt(){let e=null;try{e=Kr(o=>o).selectedItem}catch{e=null}return e?.props??{}}function pF({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:i}){let c=yt()[s],u=rn(void 0,c,i);return I(_o,{children:je({min:e,max:o,step:t,value:rn(r,c,i),readout:!1,ariaLabel:a,notch:u,onChange:n})})}function mF({label:e,desktopKey:o,fallback:t,changed:r=!1,onReset:a=()=>{}}){let n=yt()[o],s=rn(void 0,n,t);return I(qe,{words:j()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${s}px`}),onReset:a})}function xF(e){return yx(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:I(mF,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:o=>I(pF,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}function UW(e){return{type:"custom",render:({value:o,onChange:t})=>I(hF,{...e,value:o,onChange:t})}}function IF({label:e,icon:o,options:t,value:r,resolved:a,restWord:n,onChange:s}){let i=t.some(c=>c.value===r);return I(ne,{label:l(e),icon:Co(o),action:I(qe,{words:j()?.panel,label:l(e),changed:i,detail:l("{value} on desktop",{value:l(n)}),onReset:()=>s(void 0)}),children:Dn({options:t,value:i?r:a,onChange:c=>s(c),ariaLabel:e})})}function hF({label:e,icon:o,options:t,desktopKey:r,resolve:a,value:n,onChange:s}){let i=yt()[r],c=a(void 0,i),u=t.find(p=>p.value===c)?.label??"";return I(IF,{label:e,icon:o,options:t,value:n,resolved:c,restWord:u,onChange:s})}var gF={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},bF={Top:nx,Bottom:tx,Left:rx,Right:ax},yF=e=>{let o=bF[e];return I(o,{})};function $W(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=k=>gF[k],n=k=>$t(a("Top"),I(nx,{}),lo.min,lo.max,lo.step,k,"px"),s=(k,v,w,g=lo)=>ve("mobile",xF({label:a(k),icon:yF(k),desktopKey:v,min:g.min,max:g.max,step:g.step,fallback:w})),i=e.top??lo.min,c=e.bottom??lo.min,u="sectionPaddingLeft",p="sectionPaddingRight",m=e.sideBounds??lo,x=e.side??m.min,h=e.sidePhone??x,b=e.phone===!0,C=k=>b?ve("desktop",k):k;return jt({...r?{_gSpacing:He("Padding")}:{},[o]:C(n(i)),...b?{[Ro(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:C($t(a("Bottom"),I(tx,{}),lo.min,lo.max,lo.step,c,"px")),...b?{[Ro(t)]:s("Bottom",t,c)}:{}},...e.sides?{[u]:C($t(a("Left"),I(rx,{}),m.min,m.max,m.step,x,"px")),...b?{[Ro(u)]:s("Left",u,h,m)}:{},[p]:C($t(a("Right"),I(ax,{}),m.min,m.max,m.step,x,"px")),...b?{[Ro(p)]:s("Right",p,h,m)}:{}}:{}})}var jr=["top","right","bottom","left"],SF={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},Ym=e=>typeof e=="number"?e:null;function CF(e,o,t){let r={};for(let a of jr)t[a]!==o[a]&&(r[e[a]]=t[a]??void 0);return r}function vF({tier:e,o}){let t=null;try{t=Zm()}catch{t=null}let r=t?.values??{},a=e==="mobile"?o.phoneKeys:o.keys,n=Object.fromEntries(jr.map(u=>[u,Ym(r[a[u]])])),s=Object.fromEntries(jr.map(u=>[u,String(e==="mobile"?Ym(r[o.keys[u]])??o.fallback[u]:o.fallback[u])])),[i,c]=kn(()=>wT(n,s));return I(ne,{label:l("Padding"),icon:I(fT,{}),action:I(sx,{each:i,label:l("Each side"),onChange:c}),children:I(vT,{label:l("Padding"),each:i,value:n,placeholder:s,min:o.min,max:o.max,step:o.step,onChange:u=>{let p=CF(a,n,u);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 Rn(e={}){let o={...SF,...e.keys},t={keys:o,phoneKeys:Object.fromEntries(jr.map(i=>[i,Ro(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 c={type:"custom",render:()=>I(vF,{tier:i,o:t})};return r?ve(i,c):c},n=()=>Mr({type:"custom",render:()=>I(Ht,{})},"always"),s=jr.filter(i=>i!=="top");return jt({...e.group===!1?{}:{_gSpacing:He("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],ve("mobile",n())])):{}})}var wF={contained:"Contained",page:"Page",full:"Full"},wn="Width";function An(e,o=Gm,t=!0){let r=o.map(a=>({label:qr[a]??wF[a],value:a}));return jt({...t?{_gWidth:He(wn)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>I(ne,{label:l(wn),icon:I(hT,{}),action:t?I(zT,{inherited:n?.inherited??!1,onReset:()=>a(Ti),label:wn}):void 0,children:Dn({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:wn})})}})}function Bn(){let e=r=>({type:"custom",render:({value:a,onChange:n})=>I(ne,{label:Wt,icon:Co(I(lT,{})),action:r?r(n):void 0,children:Dn({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(a)?a:"auto",onChange:n,ariaLabel:Wt})})}),o=()=>({type:"custom",render:({value:r,onChange:a,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?fi:ii;return I("div",{className:"sf-field",children:je({min:i.min,max:i.max,step:i.step,value:typeof r=="number"?r:i.fallback,suffix:s,ariaLabel:Wt,onChange:a})})}}),t=()=>Mi("Unit",I(ox,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return jt({_gHeight:He(Wt),sectionHeightMode:ve("desktop",e()),sectionHeightValue:ve("desktop",o()),sectionHeightUnit:ve("desktop",t()),sectionHeightModePhone:ve("mobile",e(r=>I(kF,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:ve("mobile",o()),sectionHeightUnitPhone:ve("mobile",t())})}function kF({onClear:e}){let o=yt(),t=ci(o),r=pn(o),a=l("{value} on desktop",{value:r.mode==="auto"?l("Auto"):`${r.value}${r.unit}`});return I(qe,{words:j()?.panel,label:l(Wt),changed:t,detail:a,onReset:e})}function Ni(){let e=t=>({type:"custom",render:({value:r,onChange:a,id:n,name:s})=>I(TF,{value:r,onChange:a,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:r})=>I("div",{className:"sf-field",children:je({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:He(mn),stickTop:ve("desktop",e(!1)),stickTopDistance:ve("desktop",o()),stickTopPhone:ve("mobile",e(!0)),stickTopDistancePhone:ve("mobile",o())}}function TF({value:e,onChange:o,labelId:t,phone:r}){let a=yt(),n=ui(a),s=r?n.phone:e===!0;return I(ne,{label:l(mn),labelId:t,icon:Co(I(pT,{})),action:bt(_o,{children:[r?I(qe,{words:j()?.panel,label:l(mn),changed:di(a),detail:l("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:l("Off")}),onReset:()=>o(void 0)}):null,I(ix,{checked:s,onChange:o,ariaLabelledBy:t})]})})}function _n(){return{_gAnchor:He("Anchor"),anchor:KT("Anchor name","e.g. about",$T)}}function qW(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let i=`${n??s??e}-datetime`,c=Date.parse(typeof r=="string"?r:"");return I(ne,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:I(RT,{id:i,value:Number.isFinite(c)?new Date(c):null,onChange:u=>a(u?u.toISOString():"")})})}}}function gt(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let i=typeof r=="boolean"?r:o,c=`${n??s??e}-label`;return I(ne,{label:l(e),labelId:c,icon:t,action:I(ix,{checked:i,onChange:a,ariaLabelledBy:c})})}}}function jW(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return I(ne,{label:l("Background"),icon:I(lx,{}),htmlFor:a,action:I(Je,{id:a,label:"Background",value:_s(e),onChange:o})})}}}function KW(e,o){return{type:"custom",render:({value:t,onChange:r})=>I(ne,{label:l(e),action:Je({value:t||o,onChange:r,label:e})})}}var FF=[{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 Tx({label:e,value:o,onChange:t,points:r=FF}){let a=r.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return I(LT,{label:l(e),value:o,points:a,onChange:t})}function VW(){return Mr({type:"custom",render:()=>I(Ht,{})},"always")}var EF=Os([]);function YW(e,{stacking:o,fallback:t=Xa}){return{type:"custom",render:({value:r,onChange:a})=>{let n=ho.includes(r)?r:t;return o?I(PF,{label:e,value:n,onChange:a}):Fx({label:e,value:n,onChange:a,points:EF})}}}function PF({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?As(r?.data,n):[];return Fx({label:e,value:o,onChange:t,points:Os(s,n)})}function Fx({label:e,value:o,onChange:t,points:r}){let a=r.find(n=>n.disabled);return I(ne,{label:l(e),icon:I(dT,{}),hint:a?.title?l(a.title):void 0,children:Tx({label:e,value:dt(o),onChange:t,points:r})})}var XW={top:I(oT,{}),right:I(eT,{}),bottom:I(Q0,{}),left:I(J0,{})};function ZW(e,o,t,r,a,n){let s=p=>o.find(m=>m.value===p),i=p=>({value:p,label:"",disabled:!0,title:r}),c=p=>{let m=o.find(h=>h.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}},u=[i("corner-top-left"),c("top"),i("corner-top-right"),c("left"),i("centre"),c("right"),i("corner-bottom-left"),c("bottom"),i("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:m})=>{let x=o.some(h=>h.value===p)?p:t;return I(ne,{label:l(e),icon:a,value:s(x)?.label?l(s(x).label):"",children:Tx({label:e,value:x,onChange:m,points:u})})}}}var LF="\0note";function Zo(e,o,t,r,a){return{type:"custom",options:t,fallback:r,...a?{note:a}:{},render:({value:n,onChange:s,field:i})=>{let c=i.options??t,u=i.fallback??r,p=c.some(m=>m.value===n)?n:u;return I(ne,{label:l(e),icon:Co(o),children:I(FT,{value:p,ariaLabel:l(e),onChange:s,options:[...a?[{label:l(a),value:LF,disabled:!0}]:[],...c.map(m=>({label:l(m.label),value:m.value}))]})})}}}function QW(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>I(Op,{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 JW(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return I(e,{...a})}}}function Dn({options:e,value:o,onChange:t,ariaLabel:r,disabled:a=!1}){return I(CT,{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 eG=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Mi(e,o,t,r){let a=t.map(n=>typeof n=="string"?{label:n,value:n}:n);return{type:"custom",render:({value:n,onChange:s,field:i})=>I(ne,{label:l(e),icon:Co(o),children:Dn({options:a,value:a.some(c=>c.value===n)?n:n||i?.currentValue||r,onChange:s,ariaLabel:e})})}}function oG(e,o,t,r={}){return{type:"custom",[z0]:!0,render:({value:a,onChange:n})=>I(Pp,{value:a||"",onChange:n,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen})}}function tG({value:e,onChange:o,label:t}){let r=e||{},a=!!r.pending,n=a?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",s=(i,c)=>o({...r,[i]:c===""?void 0:Number(c)});return bt(ne,{label:l(t),icon:I(Li,{}),children:[I("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&&I("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:n},children:l(r.status)}),I("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),I("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&&bt("div",{style:{marginTop:8,display:"grid",gap:8},children:[I(ne,{label:l("Latitude"),icon:I(Li,{}),children:I("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof r.lat=="number"?r.lat:"",onChange:i=>s("lat",i.target.value)})}),I(ne,{label:l("Longitude"),icon:I(Li,{}),children:I("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof r.lng=="number"?r.lng:"",onChange:i=>s("lng",i.target.value)})})]})]})}function OF(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function RF(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 AF(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 Hi={label:"Ticker items",icon:I(iT,{})};function rG(e,o,t,r){return{type:"custom",[Bo]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},render:({value:a,onChange:n})=>I(zi,{label:e,icon:Co(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function zi({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=Oi(null),[i,c]=kn(null),u=m=>m.map(x=>({text:x?.text??""})),p=m=>{let x=AF(t,m,i);x===null&&(s.current=null),c(x),a(u(m))};return I(ET,{label:l(e),icon:o,noun:l("item"),items:t,onChange:p,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?I(js,{target:s,value:OF(t,i),onChange:m=>a(RF(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,h)=>I("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=>h({text:b.target.value}),onFocus:b=>{s.current=b.currentTarget,c(x)}})})}function Ex(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Vt({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>I(Kt,{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 Px(e){return{_gCards:He("Cards"),coverIndex:Zo("Cover image",I(sT,{}),vp,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:QT("Image background",yn),cardImage:_F(),spinOnHover:gt("Rotate on hover",e?.spinDefault??!0,I(mT,{}))}}function Lx(){return{outline:Zo("Card outline",I(xT,{}),ei,Qs),indexBadge:Zo("Card number",I(ox,{}),Js,Zs),showBadge:gt("Product badge",!0,I(Bs,{noun:"tag"}))}}function Ox(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:He("Show on a card"),showCardPrice:gt("Price",!0,I(tT,{})),showCardFinishes:gt("Finish swatches",!0,I(rT,{})),showCardSizes:gt("Sizes",t.showCardSizes,I(uT,{})),showCardBuy:gt("Buy button",t.showCardBuy,I(Y0,{})),showCardPage:gt("Page button",t.showCardPage,I(lx,{}))}}function aG(e,o="display"){let t=Ro(o);return{[o]:ve("desktop",{type:"custom",render:({value:r,onChange:a})=>I(Rx,{parts:e,changed:Qu(r),shown:n=>on(r,n),onPress:(n,s)=>a(ep(r,n,s)),onReset:()=>a(void 0)})}),[t]:ve("mobile",{type:"custom",render:({value:r,onChange:a})=>I(BF,{parts:e,desktopKey:o,value:r,onChange:a})})}}function Rx({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n}){let s=l("Display");return I(ne,{label:s,icon:I($0,{}),changed:o,action:I(qe,{words:j()?.panel,label:s,changed:o,detail:n,onReset:a}),children:I(PT,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:r})})}function BF({parts:e,desktopKey:o,value:t,onChange:r}){let a=yt()[o];return I(Rx,{parts:e,changed:Ju(t),shown:n=>Ws(a,t,n),onPress:(n,s)=>r(op(t,n,s)),onReset:()=>r(an),detail:l("the same as Desktop")})}function _F(){return yx("Card image",{min:to,max:lt,step:Au,hint:"Rounds the picture. The card's own corner is in Site styles."})}function nG(){return _i({sidesKey:"cornerSides",step:Bu,useFollowed:()=>to,mark:I(DF,{label:_u}),hint:l("Rounds the picture. Left alone it stays square.")})}function DF({label:e,changed:o=!1,onReset:t=()=>{}}){return I(qe,{words:j()?.panel,label:l(e),changed:o,onReset:t})}function lG(){return{type:"custom",render:({value:e,onChange:o})=>I(NF,{value:typeof e=="string"?e:"",onChange:o})}}function NF({value:e,onChange:o}){let[t,r]=kn(null),a=Es.filter(s=>t===null||Lo[s].across===t),n=e&&e in Lo?Lo[e]:null;return bt(_o,{children:[I(ne,{label:l("Photos in a row"),icon:I(X0,{}),children:bt("div",{className:"sf-gallery-filter",children:[I("button",{type:"button","aria-pressed":t===null,onClick:()=>r(null),children:l("All")}),Nu.map(s=>I("button",{type:"button","aria-pressed":t===s,onClick:()=>r(s),children:s},s))]})}),I(ne,{label:l("Layout"),icon:I(aT,{}),value:n?l(n.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:a.length,total:Es.length}),children:I(fx,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:o,onClear:()=>o(""),options:a.map(s=>({value:s,label:l(Lo[s].label),picture:I("span",{className:"sf-gallery-pic",children:Lo[s].desktop.map(([i,c],u)=>I("i",{style:{gridColumn:`span ${i}`,gridRow:`span ${c}`}},u))})}))})})]})}import{jsx as Nn,Fragment as MF,jsxs as Ax}from"react/jsx-runtime";import{Button as Bx,Dialog as HF}from"efficient-shell/ui";function zF(e){return it("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 _x({count:e,onCancel:o,onConfirm:t}){return Ax(HF,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:Ax(MF,{children:[Nn(Bx,{variant:"secondary",onClick:o,children:l("Cancel")}),Nn(Bx,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[Nn("p",{children:zF(e)}),Nn("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var jF=Ai("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"),KF="Reset color",VF={selected:0,themes:[]};function YF(e){e(VF)}function Mx({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=Qe(e),[n,s]=Nx(!1),i=$F(),[c,u]=Nx(null),p=(v,w)=>{o({...a,themes:a.themes.map((g,y)=>y===v?w:g)})},m=Ot(a).accent,x=new Set(a.themes.map(v=>v.brandInk).filter(Boolean)),h=$d.filter(v=>!x.has(v)).map(v=>qd(m,v)),b=[...a.themes,...h],C=v=>{if(v<a.themes.length)return o({...a,selected:v});let w=[...a.themes,b[v]];o({...a,themes:w,selected:w.length-1})},k=()=>{let v=[...a.themes,{...xo(a.themes[a.selected])}];o({...a,themes:v,selected:v.length-1}),u(v.length-1)};return Dx(WF,{children:[r?null:Xt(UF,{label:l(KF),icon:Co(jF),labelId:"sf-theme-reset",action:Xt(GF,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&Xt(_x,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),YF(o)}}),Xt("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:b.map((v,w)=>Xt(sn,{index:w,colors:v,selected:w===a.selected,open:c===w&&w<a.themes.length,editable:w<a.themes.length,onPick:()=>C(w),onEdit:()=>u(g=>g===w?null:w),onChangeColors:g=>p(w,g)},w))}),Dx("button",{type:"button",onClick:k,className:"sf-theme-add",children:[Xt(qF,{size:12}),l("Add new theme")]})]})}import{jsx as Mn}from"react/jsx-runtime";import{SettingsDefaultReset as XF,SettingsField as ZF}from"efficient-easel/panel";import{SquareIcon as QF}from"efficient-easel/icons";var JF="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Wi="Corners";function Hx({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Mn(ZF,{label:l(Wi),icon:Mn(QF,{}),value:r?void 0:`${e}px`,changed:!r,action:Mn(XF,{words:j()?.panel,label:l(Wi),changed:!r,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(JF):void 0,children:Mn(je,{min:to,max:lt,step:1,value:e??to,readout:!1,ariaLabel:l(Wi),onChange:o})})}import{jsx as Vr}from"react/jsx-runtime";import{SettingsDefaultReset as eE,SettingsField as oE,SettingsSegmented as tE}from"efficient-easel/panel";import{ShadowIcon as rE}from"efficient-easel/icons";var Gi={none:"None",soft:"Soft",lifted:"Lifted"},aE="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",nE={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)"},lE={labelsPx:90.25,widestLabelPx:34.6};function zx({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??ms;return Vr(oE,{label:l("Card shadow"),icon:Vr(rE,{}),value:l(Gi[a]),changed:!r,action:Vr(eE,{words:j()?.panel,label:l("Card shadow"),changed:!r,detail:l(Gi[ms]),onReset:()=>o(null)}),hint:t?l(aE):void 0,children:Vr(tE,{options:Jd.map(n=>({id:n,label:l(Gi[n]),icon:Vr("span",{className:"sf-shadow-chip",style:{boxShadow:nE[n]}})})),value:a,ariaLabel:l("Card shadow"),fit:lE,onChange:o})})}import{jsx as Ui}from"react/jsx-runtime";import{SettingsDefaultReset as sE,SettingsField as iE}from"efficient-easel/panel";import{ShadowIcon as fE}from"efficient-easel/icons";var cE="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 Wx({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Ui(iE,{label:l("Shadow color"),icon:Ui(fE,{}),changed:!r,action:Je({value:e??"",inherited:r?Is:void 0,onChange:o,label:"Shadow color",after:Ui(sE,{words:j()?.panel,label:l("Shadow color"),changed:!r,detail:Is,onReset:()=>o(null)})}),hint:t?l(cE):void 0})}import{jsx as Hn}from"react/jsx-runtime";import{SettingsDefaultReset as dE,SettingsField as uE}from"efficient-easel/panel";import{AlignSeparateIcon as pE}from"efficient-easel/icons";var mE="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",$i="Block gap",xE=Gt.Grid;function Gx({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Hn(uE,{label:l($i),labelId:"sf-block-gap",icon:Hn(pE,{}),value:r?void 0:`${e}px`,changed:!r,action:Hn(dE,{words:j()?.panel,label:l($i),changed:!r,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l(mE):void 0,children:Hn(je,{min:ht.min,max:ht.max,step:ht.step,value:r?xE:e,readout:!1,ariaLabel:l($i),onChange:o})})}import{jsx as zn}from"react/jsx-runtime";import{SettingsDefaultReset as IE,SettingsField as hE,SettingsSegmented as gE}from"efficient-easel/panel";import{HoverIcon as bE}from"efficient-easel/icons";var qi={none:"None",lift:"Lift",highlight:"Highlight"},yE="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 Ux({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??xs;return zn(hE,{label:l("Hover effect"),icon:zn(bE,{}),value:l(qi[a]),changed:!r,action:zn(IE,{words:j()?.panel,label:l("Hover effect"),changed:!r,detail:l(qi[xs]),onReset:()=>o(null)}),hint:t?l(yE):void 0,children:zn(gE,{options:eu.map(n=>({id:n,label:l(qi[n])})),value:a,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as Wn}from"react/jsx-runtime";import{SettingsDefaultReset as SE,SettingsField as CE,SettingsSegmented as vE}from"efficient-easel/panel";import{ImageIcon as wE}from"efficient-easel/icons";var ji="Hero image",Ki=[{followsWidth:!1,label:qr.full},{followsWidth:!0,label:qr.page}],kE="Whether the big picture at the top of a page runs edge to edge, or sits inside the page width. The words follow the page width either way.";function $x({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return Wn(CE,{label:l(ji),icon:Wn(wE,{}),value:l(Ki.find(n=>n.followsWidth===a).label),changed:!r,action:Wn(SE,{words:j()?.panel,label:l(ji),changed:!r,detail:l(Ki.find(n=>!n.followsWidth).label),onReset:()=>o(null)}),hint:t?l(kE):void 0,children:Wn(vE,{options:Ki.map(n=>({id:n.followsWidth,label:l(n.label)})),value:a,ariaLabel:l(ji),onChange:o})})}import{jsx as Gn}from"react/jsx-runtime";import{SettingsDefaultReset as TE,SettingsField as FE,SettingsSegmented as EE}from"efficient-easel/panel";import{DropIcon as PE}from"efficient-easel/icons";var Vi="Photography",qx={shot:"As shot",mono:"Black and white"},Yi=[{grayscale:!1,label:qx.shot},{grayscale:!0,label:qx.mono}],LE="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function jx({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return Gn(FE,{label:l(Vi),icon:Gn(PE,{}),value:l(Yi.find(n=>n.grayscale===a).label),changed:!r,action:Gn(TE,{words:j()?.panel,label:l(Vi),changed:!r,detail:l(Yi.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(LE):void 0,children:Gn(EE,{options:Yi.map(n=>({id:n.grayscale,label:l(n.label)})),value:a,ariaLabel:l(Vi),onChange:o})})}import{jsx as Xi}from"react/jsx-runtime";import{useId as OE}from"react";import{SettingsField as RE,SettingsSwitch as AE}from"efficient-easel/panel";import{ShareIcon as BE}from"efficient-easel/icons";var _E="Share button",DE="On every blog post.";function Kx({value:e,onChange:o,showHint:t=!0}){let r=OE();return Xi(RE,{label:l(_E),labelId:r,icon:Xi(BE,{}),action:Xi(AE,{checked:e===!0,onChange:o,ariaLabelledBy:r}),hint:t?l(DE):void 0})}import{jsx as Un}from"react/jsx-runtime";import{SettingsDefaultReset as NE,SettingsField as ME}from"efficient-easel/panel";import{PaddingXIcon as HE}from"efficient-easel/icons";var Zi="Side space",Qi=So.default,zE="The room left at the left and right edge of every page.";function Vx({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Un(ME,{label:l(Zi),labelId:"sf-side-space",icon:Un(HE,{}),value:`${e??Qi}px`,changed:!r,action:Un(NE,{words:j()?.panel,label:l(Zi),changed:!r,detail:`${Qi}px`,onReset:()=>o(null)}),hint:t?l(zE):void 0,children:Un(je,{min:So.min,max:So.max,step:So.step,value:e??Qi,readout:!1,ariaLabel:l(Zi),onChange:o})})}import{jsx as $n}from"react/jsx-runtime";import{SettingsDefaultReset as WE,SettingsField as GE}from"efficient-easel/panel";import{WidthIcon as UE}from"efficient-easel/icons";var Ji="Content width",ef=Be.default,$E="The standard width every page on this site renders at.";function Yx({value:e,onChange:o,showHint:t=!0}){let r=e===null;return $n(GE,{label:l(Ji),labelId:"sf-site-width",icon:$n(UE,{}),value:`${e??ef}px`,changed:!r,action:$n(WE,{words:j()?.panel,label:l(Ji),changed:!r,detail:`${ef}px`,onReset:()=>o(null)}),hint:t?l($E):void 0,children:$n(je,{min:Be.min,max:Be.max,step:Be.step,value:e??ef,readout:!1,ariaLabel:l(Ji),onChange:o})})}import{jsx as NI}from"react/jsx-runtime";import{TextStyleItem as eP,TextStylesGroup as oP}from"efficient-easel/text-styles";import{jsx as V1}from"react/jsx-runtime";import{useState as Y1}from"react";import{TextStylesList as X1}from"efficient-easel/text-styles";import{usePreviewDevice as Z1}from"efficient-easel/draw/client";import{textStyleCaseCss as G1}from"efficient-easel/draw";import{textStyleCaseCss as o1,textStyleCaseOfCss as t1}from"efficient-easel/draw";function of(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function so(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 Vn,encodePartId as Yn}from"efficient-easel/draw";import{LINK_FIELD_MARKER as nI,SCAFFOLD_FIELD_MARKER as rI,TEXT_FIELD_MARKER as Xn}from"efficient-easel/draw";import{readHidable as lI}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as ZE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as XE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as Xx}from"efficient-easel/draw";import{readHidable as Zx}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as qE}from"efficient-easel/draw";var jE=qE,KE=["text","textarea"],VE=["textarea","plainTextarea"];function YE(e){return!e||typeof e!="object"?null:e[Xx]?.control??null}function Zt(e){let o=YE(e);return o&&jE.includes(o)?o:null}function qn(e){return VE.includes(e)}function Qx(e){return!e||typeof e!="object"?void 0:e[Xx]?.placeholder}function jn(e){return Zx(e).text}function tf(e,o,t){return KE.includes(e)?{text:t,hidden:Zx(o).hidden}:t}function Jx(e,o,t,r){return jn(e[o])===r?null:{...e,[o]:tf(t,e[o],r)}}function rf(e){if(!(!e||typeof e!="object"))return e[XE]}function af(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function eI(e,o){if(!Array.isArray(o))return[];let t=rf(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,i)=>{let c=s?.[n];typeof c=="string"&&c&&r.push({row:{index:i,rowKey:n},text:c})}),r}let a=af(e);return a?(o.forEach((n,s)=>{for(let[i,c]of Object.entries(a)){if(!Zt(c))continue;let u=jn(n?.[i]);u&&r.push({row:{index:s,rowKey:i},text:u})}}),r):[]}function Yr(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function nf(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 oI(e,o,t,r,a){let n=Yr(e[o],t);return jn(n)===a?null:nf(e,o,t,tf(r,n,a))}function tI(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var io="data-sf-part",Ke="data-sf-part-selected",XU="data-sf-part-kind",QE="data-sf-part-style-owner",JE="data-sf-part-style-kind";function ZU(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(QE),r=o.getAttribute(JE);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-puck-component"))return null}return null}var aI=2;function sI(e,o){if(!e)return!1;let t=Vn(e);return!!t?.propKey&&t.nodeId===o}function Qt(e){return mt(e).replace(/\s+/gu,"")}function Kn(e,o,t){let r=e[Xn];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}=lI(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[nI]){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))Kn(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))Kn(n,o[a],t)}}function iI(e){if(!e||typeof e!="object")return!1;let o=e;return o[nI]?!1:!!o[Xn]||o.type==="text"||o.type==="textarea"}function Zn(e,o){let t=e[Xn];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 QU(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){if(!a||typeof a!="object"||Hr(r))continue;let n=a,s=[];Kn(n,o?.[r],s),!s.length&&n[rI]!==void 0&&Kn(n,n[rI],s);let i=Zn(n,r),c=new Set;for(let{row:m,text:x}of eI(n,o?.[r])){let h=Qt(x);h.length<aI||(c.add(h),t.push({key:r,label:i,texts:[h],row:m}))}let u=new Set(c),p=[];for(let m of s){let x=Qt(m);x.length<aI||u.has(x)||(u.add(x),p.push(x))}p.length&&t.push({key:r,label:i,texts:p})}return t}var e1=ZE;function fI(e,o){if(!o||typeof o!="object"||Hr(e)||gp(o))return null;let t=o[Xn];return!t||!e1.includes(t.control)?null:t}function JU(e,o){let t=fI(e,o);return t!==null&&t.identifier!==!0}function cI(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=fI(r,a);if(!n)continue;let{text:s,hidden:i}=lI(o?.[r]),c=s||n.placeholder||"",u=mt(c).replace(/\s+/gu," ").trim();t.push({key:r,label:lf(Zn(a,r)),preview:u,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}var cf="_partStyles",uf="data-sf-part-styled",r1=[400,500,600,700],gI=["left","center","right","justify"],dI=5,uI=1e3,a1=-5,n1=10,pf=0,mf=64,xf=2,If=120,Jo=1280,hf=10,pI={size:{min:dI,max:uI,step:1},sizePhone:{min:dI,max:uI,step:1},padding:{min:pf,max:mf,step:xf},width:{min:If,max:Jo,step:hf}},l1=.05,s1=.01,i1=["line","letter"],f1=.5,c1=2.5,d1=-1,u1=1,p1=0,m1=400;function Zr(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function bI(e){return Zr(e?.[cf])??{}}function Jn(e,o){let t=bI(e);return Object.hasOwn(t,o)?Zr(t[o])??{}:{}}function yI(e,o,t){let r={...bI(e)};if(x1(t).length?r[o]=t:delete r[o],!Object.keys(r).length){let{[cf]:a,...n}=e;return n}return{...e,[cf]:r}}function x1(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function I1(e){return i1.includes(e)}var Xr=(e,o,t)=>Math.min(t,Math.max(o,e));function h1(e,o){if(I1(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:Xr(t,a1,n1)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?Jt(Xr(t,f1,c1),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?Jt(Xr(t,d1,u1),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:Xr(t,p1,m1)}if(Object.hasOwn(pI,e)){let{min:t,max:r}=pI[e],a=Math.round(Number(o));return Number.isFinite(a)?Xr(a,t,r):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"?Eo.includes(String(o))?o:null:o}var g1=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function SI(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of g1){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}return e.align!==void 0&&!gI.includes(e.align)&&t("align"),o??e}var b1=[["font","role"],["line","lineHeight"],["letter","letterSpacing"]];function y1(e){let o=[];for(let[t,r]of b1)t===e?o.push(r):r===e&&o.push(t);return o}function Jr(e,o,t,r){let a={...Jn(e,o)},n=r==null?null:h1(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of y1(t))delete a[s]}return yI(e,o,a)}function CI(e,o){return yI(e,o,{})}function S1(e){return t1(e)??"none"}function C1(e){return o1(e)??""}var v1={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 w1(e){let o=e.role;return o&&Eo.includes(o)?o:null}var k1={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 T1(e){let o=Wd[e],t=k1[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=Jt(F1+e.line*l1,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=Jt(e.letter*s1,4)),o}var F1=1,oa="--sf-part-para",gf="(max-width: 719.98px)";function mI(e){return e=SI(e),typeof e.sizePhone=="number"&&e.sizePhone>0?{fontSize:`${e.sizePhone}px`}:{}}function E1(e,o){return o&&typeof e.sizePhone=="number"&&e.sizePhone>0?{...e,size:e.sizePhone}:e}function Qn(e,o){e=SI(e);let t=w1(e),r=ea(e),a=e.size?`${e.size}px`:t?T1(t):"";return{fontFamily:e.font?R1(e.font):t?`var(${v1[t]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:a,minWidth:a?"0":"",overflowWrap:a?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[oa]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:C1(e.case),textAlign:e.align??"",paddingTop:sf(e.padding),paddingBottom:sf(e.padding),maxWidth:sf(e.width),color:P1(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var P1=e=>e===void 0||e===""?"":Object.hasOwn(Oo,e)?Oo[e]:vI.test(e)?e:"",vI=/^#[0-9a-fA-F]{6}$/;function wI(e){return vI.test(e)}var sf=e=>e===void 0?"":`${e}px`,Jt=(e,o)=>Number(e.toFixed(o));function l7(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:L1(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?Jt(r/t,3):1.2,letterEm:Number.isFinite(a)?Jt(a/t,4):0,align:O1(e.textAlign),case:S1(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0,widthPx:Number.isFinite(s)&&s<Jo?Math.round(s):Jo}}function L1(e){return Number.isFinite(e)?r1.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function O1(e){for(let o of gI)if(o===e)return o;return e==="end"?"right":"left"}function s7(e,o){let t=xI(e);if(!t)return"";for(let r of no)if(xI(o(r.cssVar))===t)return r.key;return""}var xI=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function R1(e){let o=Lt(e);return o?`var(${o.cssVar})`:""}function i7(e,o,t,r){return!o||Vn(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function f7(e,o,t=()=>Qr,r=s=>s,a=_1,n=!1){let s=0;for(let{element:i,partId:c}of e){let u=Vn(c)?.propKey;if(!u)continue;let p=r(u),m=Object.hasOwn(o,p)?Zr(o[p])??{}:{},x=Qn(E1(m,n),Qr),h=ff.some(C=>i.style[C]),b=!1;for(let[C,k]of Object.entries(x))D1(i,C,k),k&&(b=!0);if(h||ff.some(C=>x[C]))for(let C of A1(i,a))for(let k of ff)C.style[k]=x[k]??"";b&&(s+=1)}return s}function A1(e,o){let t=Qt(e.textContent??""),r=[],a=e;for(let n=0;n<B1&&o(a);n+=1){let s=a.parentElement;if(!s||Qt(s.textContent??"")!==t)break;r.push(s),a=s}return r}var B1=8;function _1(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Qr={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:Jo};function D1(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?.(II,""):a.removeAttribute?.(II))}var II="data-sf-part-para",N1=Object.keys(Qn({},Qr)),df=new Set(["color","overflowWrap",oa,"fontStyle"]),ff=N1.filter(e=>!df.has(e));function kI(e,o,t,r=a=>a){let a=new Map;for(let i of e){let c=of(i.key,i.row);for(let u of i.texts){let p=a.get(u);p?(p.keys.add(i.key),p.partKeys.add(c)):a.set(u,{keys:new Set([i.key]),partKeys:new Set([c])})}}let n=new Map;for(let i of Object.keys(o)){if(!M1(i))continue;let c=Zr(o[i])??{},u=Qn(c,Qr),p=mI(c);!Object.values(u).some(Boolean)&&!Object.keys(p).length||n.set(i,{stamp:hI(t,i),declarations:u,...Object.keys(p).length?{phone:p}:{}})}let s=new Map;for(let[i,{keys:c,partKeys:u}]of a){let p=u.size===1?[...u][0]:c.size===1?[...c][0]:null;if(!p)continue;let m=r(p);if(!Object.hasOwn(o,m))continue;let x=Zr(o[m])??{},h=Qn(x,Qr),b=mI(x);!Object.values(h).some(Boolean)&&!Object.keys(b).length||s.set(i,{stamp:hI(t,p),declarations:h,...Object.keys(b).length?{phone:b}:{}})}return s.size||n.size?{rules:s,kindRules:n,drawn:new Set(a.keys())}:null}function M1(e){return e.startsWith("@")}function bf(e,o){return e?.kindRules.get(o)??null}function hI(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function TI(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(([,h])=>h!==""),c=h=>h.map(([b,C])=>`${z1(b)}: ${C}`).join("; "),u=`[${uf}="${n}"]`,p=i.filter(([h])=>!df.has(h)),m=i.filter(([h])=>df.has(h));p.length&&o.push(`${u}, *:has(> ${u}) { ${c(p)} }`),m.length&&o.push(`${u} { ${c(m)} }`),s[oa]&&o.push(...H1(u));let x=Object.entries(a.phone??{}).filter(([,h])=>h!=="");x.length&&o.push(`@media ${gf} { ${u}, *:has(> ${u}) { ${c(x)} } }`)};for(let a of e.rules.values())r(a);for(let a of e.kindRules.values())r(a);return o.join(`
4
+ `)}function H1(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 z1=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function FI(e,o){if(!e)return null;let t=Qt(o),r=e.rules.get(t);if(r)return r;if(t.length<W1||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 W1=8;var yf=e=>e==="sentence"?"none":void 0,No=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,ta=e=>typeof e=="string"&&e?e:void 0,PI=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function fo(e){let o={};for(let t of PI)e[t]!==void 0&&(o[t]=e[t]);return o}function Cf(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=PI.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function vf(e){let o=e.fonts,t=e.sizes,r=e.typography,a=tu(e.compression),n=(i,c)=>({id:`heading-${i}`,kind:"heading",name:`Heading ${i}`,values:fo(c)}),s=(i,c={})=>({id:`body-${i}`,kind:"body",name:`Body ${i}`,values:fo(c)});return[n(1,{font:ta(o.heading),size:No(t.headingLarge),weight:No(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:yf(r.case),largestSize:No(r.maxPx)}),n(2,{font:ta(o.heading2),size:No(t.headingMedium),weight:No(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:yf(r.case2)}),n(3,{font:ta(o.heading3),size:No(t.headingSmall),weight:No(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:yf(r.case3)}),s(1,{font:ta(o.body),size:No(t.body)}),s(2),s(3),s(4),s(5,{font:ta(o.label),size:No(t.label)})]}function el(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=>Cf({...o,values:fo(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function x7(e){return el(e)??[]}function et(e,o){let t=vf(o),r=el(e);return r?r.map(a=>{let n={...Sf(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:fo({...n,...a.values})}}):t}var Sf=(e,o)=>e.find(t=>t.id===o)?.values??{},EI=["heading-1","heading-2","heading-3"];function LI({saved:e,old:o,cur:t,next:r,sizeOf:a}){let n=vf(o),s=el(e)??n.map(m=>({...m,values:{}})),i=et(s,o),c=[],u=r.map(m=>{let x=t.find(g=>g.id===m.id),h=s.find(g=>g.id===m.id);if(!x||!h)return U1([m],a)[0];let b={...h.values},C=new Set(h.auto??[]),k=m.values,v=x.values,w=[...new Set([...Object.keys(k),...Object.keys(v)])].filter(g=>JSON.stringify(k[g])!==JSON.stringify(v[g]));w.sort((g,y)=>+(g==="letterSpacing")-+(y==="letterSpacing"));for(let g of w){let y=g==="lineSpacing"?"lineHeight":g,E=k[g];if(E===void 0){delete b[y],Sf(n,m.id)[y]!==void 0&&(c.push([m.id,y]),C.add(y));continue}if(C.delete(y),g==="lineSpacing")b.lineHeight=er(E/100,3);else if(g==="letterSpacing"){let F=i.find(B=>B.id===m.id),L=a({...m,values:fo({...F?.values??{},...b})});b.letterSpacing=L?er(E/L,4):0}else b[y]=E}return Cf({id:m.id,kind:m.kind,name:m.name,values:fo(b)},C)}),p=o.compression;if(c.some(([m,x])=>(x==="lineHeight"||x==="letterSpacing")&&EI.includes(m))&&st(p)!=="normal"){for(let m of EI){let x=u.find(b=>b.id===m);if(!x)continue;let h={...x.values};for(let b of["lineHeight","letterSpacing"])c.some(([C,k])=>C===m&&k===b)||h[b]===void 0&&!(x.auto??[]).includes(b)&&(h[b]=Sf(n,m)[b]);x.values=fo(h)}p="normal"}return{saved:u,old:{...o,compression:p}}}function OI(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=st(e.old.compression)),t}var er=(e,o)=>Number(e.toFixed(o));function RI(e,o){return e.map(t=>{let{lineHeight:r,letterSpacing:a,...n}=t.values,s={...n};return r!==void 0&&(s.lineSpacing=er(r*100,1)),a!==void 0&&(s.letterSpacing=er(a*o(t),2)),{id:t.id,kind:t.kind,name:t.name,values:s}})}function U1(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:fo({...n})},i={...s.values};if(r!==void 0&&(i.lineHeight=er(r/100,3)),a!==void 0){let c=o({...s,values:{...s.values}});i.letterSpacing=c?er(a/c,4):0}return{...s,values:fo(i)}})}function I7(e){let o={fonts:Lr({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:ps({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:st(e.heading_compression),typography:au(e)},t=e.text_styles??null,r=Array.isArray(t)?wf(et(t,o),o):o;return{fonts:Lr(r.fonts),sizes:ps(r.sizes),compression:st(r.compression),typography:r.typography,textStyles:t}}function wf(e,o){let t=x=>e.find(h=>h.id===x)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),i=t("body-5"),c=o.fonts,u=o.sizes,p=o.typography,m=x=>x==="none"?"sentence":"authored";return{fonts:{...c,heading:r.font??c.heading,heading2:a.font??r.font??c.heading2,heading3:n.font??r.font??c.heading3,body:s.font??c.body,label:i.font??c.label},sizes:{...u,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 $1(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}`}}function q1(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 j1(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 h7(e){let o=[];for(let t of e){let r=t.values,a=`.${$1(t)}`,n=[],s=r.font!==void 0?no.find(p=>p.key===r.font)?.cssVar:void 0;if(s&&n.push(`font-family: var(${s})`),r.size!==void 0){let p=r.largestSize!==void 0?Math.min(r.size,r.largestSize):r.size;n.push(`font-size: ${p}px`)}let i=r.color!==void 0?q1(r.color):null;i&&n.push(`color: ${i}`),r.italic===!0&&n.push("font-style: italic"),r.weight!==void 0&&n.push(`font-weight: ${r.weight}`);let c=[];r.lineHeight!==void 0&&c.push(`line-height: ${r.lineHeight}`),r.letterSpacing!==void 0&&c.push(`letter-spacing: ${r.letterSpacing}em`),t.kind==="body"&&n.push(...c);let u=G1(r.letterCase);if(u&&n.push(`text-transform: ${u}`),r.paragraphSpacing&&n.push(`--sf-part-para: ${r.paragraphSpacing}px`),n.length&&o.push(`${a} { ${n.join("; ")} }`),t.kind==="heading"&&c.length&&o.push(`${a}, ${a}:is(h1, h2, h3, h4) { ${c.join("; ")} }`),r.paragraphSpacing&&o.push(...j1(a)),r.sizePhone!==void 0){let p=K1[t.id],m=[`${a} { font-size: ${r.sizePhone}px }`];p&&m.push(`.sf-themed-content { --size-${p}: ${r.sizePhone}px !important }`),o.push(`@media ${gf} { ${m.join(" ")} }`)}}return o.join(`
5
+ `)}var K1={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function g7(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function kf(e){switch(e){case"heading":return"heading-1";case"heading2":return"heading-2";case"heading3":return"heading-3";case"body":return"body-1";case"label":return"body-5";default:return}}function Tf(e){let o=ea(e);return fo({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 AI(e){return Object.keys(Tf(e)).length>0}function BI({saved:e,old:o,styleId:t,values:r}){return{saved:(el(e)??vf(o).map(a=>({...a,values:{}}))).map(a=>a.id===t?Cf({...a,values:fo({...a.values,...r})},a.auto):a),old:o}}var _I=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],Q1=["size","lineSpacing","letterSpacing","letterCase"],J1=500,Ff=no.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function DI({saved:e,old:o,colours:t,sizeOf:r,onChange:a,openId:n,onOpenChange:s,readOnly:i=!1,withoutSize:c=!1}){let[u,p]=Y1(null),m=Z1()==="mobile",x=et(e,o),h=RI(x,r);return V1(X1,{styles:h,onChange:b=>a(LI({saved:e,old:o,cur:h,next:b,sizeOf:r})),fonts:Ff,colours:t,settings:c?_I.filter(b=>b!=="size"):_I,auto:Q1,openId:n===void 0?u:n,onOpenChange:s??p,readOnly:i,device:m?"phone":"desktop",fallback:b=>{let C=x.find(v=>v.id===(b.kind==="heading"?"heading-1":"body-1")),k={};return C?.values.font&&b.id!==C.id&&(k.font=C.values.font),b.kind==="heading"&&(k.weight=J1),k}})}var MI=["font","size","weight","emphasis"],tP=500;function rP({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 aP(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 HI(e){let{headingWeight:o,open:t,onOpenChange:r,onChange:a,withoutSize:n=!1}=e,s=rP(e);return NI(oP,{label:l("Accent"),children:NI(eP,{style:s,fonts:Ff,settings:n?MI.filter(i=>i!=="size"):MI,auto:["size"],fallback:()=>({weight:o??tP}),open:t,onOpenChange:r,onChange:i=>aP(s,i).forEach(a)})})}import{SettingsTabs as lP}from"efficient-easel/panel";import{Tooltip as c$,tabButtonId as sP,tabPanelId as iP}from"efficient-shell/ui";import{ContrastIcon as fP,NoteIcon as cP,SettingsIcon as dP,TypeIcon as uP}from"efficient-easel/icons";function zI(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{gotoPreviewSlide as _7,pinPreviewToBottom as D7,pinPreviewToSection as N7,previewFrame as WI,scrollPreviewToSection as GI,scrollPreviewToTop as Ef}from"efficient-easel/screen/lib/puck/preview-dom";import{useEasel as nP}from"efficient-easel/easel";function ol({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=nP(L=>L),{fonts:a,setFonts:n,sizes:s,setSizes:i,headingCompression:c,setHeadingCompression:u,headingTypography:p,setHeadingTypography:m,textStyles:x,setTextStyles:h}=Z(),b=t.data,C=b.root?.props??{},k=e?Lr(C.fonts):a,v=e?Xd:s,w=e?st(C.headingCompression):c,g=e?ru(C.headingTypography):p,y={fonts:k,sizes:v,compression:w,typography:g},E=e?C.textStyles:x,F=L=>r({type:"replaceRoot",root:{...b.root,props:{...C,...L}},recordHistory:!0});return{fonts:k,sizes:v,compression:w,typography:g,old:y,saved:E,write:(L,B)=>{let O=wf(et(L.saved,L.old),L.old);e?F({textStyles:L.saved,fonts:O.fonts,headingCompression:O.compression,headingTypography:O.typography}):(h(L.saved),n(O.fonts),i(O.sizes),u(O.compression),m(O.typography)),o(OI(L,y),B)},writeRoot:F}}var Pf="sf-site-styles",pP="sf-site-styles-tabpanel",Rf=!1,mP="Show hints";function Af({shown:e,onChange:o}){return J("div",{className:"sf-hints",children:St("button",{type:"button","aria-pressed":e,onClick:()=>o(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[J(cP,{size:13}),l(mP)]})})}var $I="text",or=[{id:"basics",label:"Basics",icon:J(dP,{})},{id:"theme",label:"Theme",icon:J(fP,{})},{id:"text",label:"Text",icon:J(uP,{})}];function xP({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=UI(u=>u),{theme:a,setTheme:n}=Z(),s=t.data,i=s.root?.props??{},c=u=>{if(e){let p={...i,theme:u};r({type:"replaceRoot",root:{...s.root,props:p},recordHistory:!0})}else n(u);o({selected_preset:u.selected,theme_presets:u.themes})};return J(Mx,{value:e?i.theme:a,onChange:c})}function IP({themeFromDocument:e,persist:o}){let[t,r]=Of(null),{theme:a,setFonts:n,setSizes:s,setHeadingTypography:i}=Z(),c=ol({themeFromDocument:e,persist:o}),{old:u,saved:p,writeRoot:m}=c,x=c.fonts,h=c.sizes,b=c.typography,C=F=>F.values.size??SP(gP[F.id]??"body")??bP[F.kind],k=F=>c.write(F),v=hP(a),w=F=>{let L={...x,accent:F};e?m({fonts:L}):n(L),o({accent_font:F})},g=F=>{s({...h,accent:F}),o({accent_size_px:F})},y=F=>{let L={...b,weightStrong:F};e?m({headingTypography:L}):i(L),o({heading_weight_strong:F})},E=F=>{let L={...b,italicStrong:F};e?m({headingTypography:L}):i(L),o({accent_italic:F})};return St(tr,{children:[J(DI,{saved:p,old:u,colours:v,sizeOf:C,onChange:k,openId:t===Lf?null:t,onOpenChange:r,withoutSize:e}),J(HI,{font:x.accent,size:h.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:t===Lf,onOpenChange:F=>r(F?Lf:null),onChange:F=>{F.key==="font"?w(F.value):F.key==="size"?g(F.value):F.key==="weight"?y(F.value):E(F.value)},withoutSize:e})]})}var Lf="accent";function hP(e){let o=Ot(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 gP={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},bP={heading:32,body:14},yP={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 SP(e){if(typeof document>"u")return null;let o=(WI()?.contentDocument??document).querySelector(yP[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function CP({themeFromDocument:e,persist:o,showHint:t}){let{appState:r,dispatch:a}=UI(x=>x),{cornerRadiusPx:n,setCornerRadiusPx:s}=Z(),i=r.data,c=i.root?.props??{},u=c.cornerRadiusPx===void 0?Qd[Zd(c.cornerStyle)]:Io(c.cornerRadiusPx),p=e?u:n,m=x=>a({type:"replaceRoot",root:{...i.root,props:{...c,...x}},recordHistory:!0});return J(Hx,{value:p,onChange:x=>{e?m({cornerRadiusPx:x}):s(x),o({corner_radius_px:x})},showHint:t})}function vP(e){return{site_width:e}}function wP({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:r}=Z();return J(Yx,{value:t,onChange:a=>{r(a),e(vP(a),a===null)},showHint:o})}function kP(e){return{block_gap:e}}function TP(e){return{site_gutter:e}}function FP({persist:e,showHint:o}){let{siteGutter:t,setSiteGutter:r}=Z();return J(Vx,{value:t,onChange:a=>{r(a),e(TP(a),a===null)},showHint:o})}function EP({persist:e,showHint:o}){let{blockGap:t,setBlockGap:r}=Z();return J(Gx,{value:t,onChange:a=>{r(a),e(kP(a),a===null)},showHint:o})}function PP({persist:e,showHint:o}){let{heroBackgroundFollowsWidth:t,setHeroBackgroundFollowsWidth:r}=Z();return J($x,{value:t,onChange:a=>{r(a),e({hero_background_follows_width:a},!0)},showHint:o})}function LP({persist:e,showHint:o=!0}){return St(tr,{children:[J(wP,{persist:e,showHint:o}),J(FP,{persist:e,showHint:o}),J(EP,{persist:e,showHint:o}),J(PP,{persist:e,showHint:o})]})}function OP(e){return{card_shadow:e}}function RP(e){return e===null?{shadow_color:null}:{shadow_color:ou(e)}}function AP(e){return{hover_effect:e}}function BP({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:r,shadowColor:a,setShadowColor:n,hoverEffect:s,setHoverEffect:i}=Z();return St(tr,{children:[J(zx,{value:t,onChange:c=>{r(c),e(OP(c),!0)},showHint:o}),J(Wx,{value:a,onChange:c=>{n(c),e(RP(c),c===null)},showHint:o}),J(Ux,{value:s,onChange:c=>{i(c),e(AP(c),!0)},showHint:o})]})}function _P(e){return{photography_grayscale:e}}function DP({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:r}=Z();return J(jx,{value:t,onChange:a=>{r(a),e(_P(a),!0)},showHint:o})}function NP({persist:e,showHint:o=!0}){return J(tr,{children:J(DP,{persist:e,showHint:o})})}function MP(e){return{share_button_on_posts:e}}function HP({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:r}=Z();return J(Kx,{value:t,onChange:a=>{r(a),e(MP(a),!0)},showHint:o})}function rr(){let{websiteName:e}=Z();return e?.trim()||nu}function tl({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n}){let{persist:s}=zt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:C=>{let k=zI(C);k&&r?.(k.msg,k.tone)}}),[i,c]=Of(or[0].id),u=a!==void 0,p=u?a:i,m=u?n??(()=>{}):c,x=or.find(C=>C.id===p)??or[0],[h,b]=Of(Rf);return St(tr,{children:[J(lP,{items:or.map(C=>({...C,label:l(C.label)})),activeId:x.id,onSelect:m,ariaLabel:l("Site styles"),idPrefix:Pf}),St("div",{id:iP(Pf,x.id),className:pP,role:"tabpanel","aria-labelledby":sP(Pf,x.id),children:[p==="basics"&&St(tr,{children:[J(CP,{themeFromDocument:e,persist:s,showHint:h}),!e&&J(BP,{persist:s,showHint:h}),!e&&J(LP,{persist:s,showHint:h}),!e&&J(NP,{persist:s,showHint:h}),!e&&J(HP,{persist:s,showHint:h}),J(Af,{shown:h,onChange:b})]}),p==="theme"&&J(xP,{themeFromDocument:e,persist:s}),p==="text"&&J(IP,{themeFromDocument:e,persist:s})]})]})}import{InspectorIconButton as YP}from"efficient-easel/chrome";import{Button as QI,Dialog as XP,FormField as ZP,Input as JI,toast as eh}from"efficient-shell/ui";import{LayersTree as QP,TreeGroupLabel as JP,TreeRow as oh,TreeRowAction as Hf}from"efficient-easel/tree";import{AddIcon as eL,PageIcon as oL}from"efficient-easel/icons";import{PagesIcon as tL}from"efficient-easel/rail";var Bf="Main Pages",zP="Dynamic Pages",_f="dynamic",WP="dynamic";function Df(e){return e.kind===WP}function qI(e){let o=[],t=[];for(let r of e){if(Df(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??Bf,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:_f,label:zP,rows:t})}return o}import{useCallback as rl,useEffect as GP,useSyncExternalStore as UP}from"react";var jI=new WeakMap;function ra(e){let o=jI.get(e);return o||(o={rows:null,loading:null,listeners:new Set},jI.set(e,o)),o}function Nf(e,o){e.rows=o;for(let t of e.listeners)t()}var al=new Set;function nl(e,o){o?al.add(e):al.delete(e)}function KI(e){let o=ra(e),t=e.listPages().then(r=>Nf(o,al.size?r.filter(a=>!al.has(a.id)):r),()=>Nf(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var VI=()=>null,$P=()=>()=>{};function Mf(){let{adapter:e,ready:o}=Se(),t=rl(i=>{let{listeners:c}=ra(e);return c.add(i),()=>c.delete(i)},[e]),r=rl(()=>ra(e).rows,[e]),a=UP(o?t:$P,o?r:VI,VI);GP(()=>{if(!o)return;let i=ra(e);i.rows===null&&!i.loading&&KI(e)},[e,o]);let n=rl(()=>o?KI(e):Promise.resolve(),[e,o]),s=rl(i=>Nf(ra(e),i),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function qP(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function YI(){let{currentSlug:e}=Se(),{rows:o}=Mf();return qP(o,e)}var th="sf-editor-pages-collapsed-groups",rL=e=>e.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),rh=(e,o)=>{let t=rL(e)||"page";if(!o.has(t))return t;let r=2;for(;o.has(`${t}-${r}`);)r+=1;return`${t}-${r}`};function ah({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=Ae().chrome?.pageRows,n=Bt(),{adapter:s,capabilities:i,ready:c,currentSlug:u}=Se(),p=rr(),{rows:m,reload:x,setRows:h,getRows:b}=Mf(),[C,k]=ar(""),[v,w]=ar(!1),[g,y]=ar(null),[E,F]=ar(!1),[L,B]=ar(""),O=VP(),[M,re]=ar(()=>{if(typeof window>"u")return new Set;try{let P=window.localStorage.getItem(th);return new Set(P?JSON.parse(P):[])}catch{return new Set}});KP(()=>{try{window.localStorage.setItem(th,JSON.stringify([...M]))}catch{}},[M]);let H=P=>re(le=>{let Y=new Set(le);return Y.has(P)?Y.delete(P):Y.add(P),Y}),W=ZI(()=>qI(m??[]),[m]),A=C.trim().toLowerCase(),oe=P=>!A||P.toLowerCase().includes(A),Oe=P=>A?!0:!M.has(P),Xe=ZI(()=>new Set((m??[]).map(P=>P.slug)),[m]),ro=()=>{if(i.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}B(""),y(null),F(!0)},We=async()=>{let P=L.trim();if(!(!P||!c||v||!s.createPage)){w(!0),y(null);try{let le=await s.createPage({slug:rh(P,Xe),title:P,layout:{}});await x(),F(!1),B(""),e(le.slug)}catch{y(l("Couldn\u2019t add the page \u2014 please retry."))}finally{w(!1)}}},Re=P=>{let le=m??[],Y=s.deletePage;if(!c||v||!Y||le.length<=1)return;let te=le.findIndex(ye=>ye.id===P.id),ae=le.filter(ye=>ye.id!==P.id),pe=P.slug===u;nl(P.id,!0),h(ae),y(null),pe&&ae[0]&&e(ae[0].slug);let Ne=()=>{nl(P.id,!1);let ye=b()??[];if(ye.some(Fo=>Fo.id===P.id))return;let po=[...ye];po.splice(Math.max(0,Math.min(te,po.length)),0,P),h(po)};eh.undoable(l("Deleted \u201C{name}\u201D",{name:P.label}),{actionLabel:l("Undo"),commit:async ye=>{await Y(P.id,ye),nl(P.id,!1)},undo:()=>{Ne(),pe&&e(P.slug)},onFail:()=>{Ne(),eh.error(l("Couldn\u2019t delete the page \u2014 please retry."))}})},Ge=P=>n.send("storefront-editor:open-page",{slug:P}),De=P=>{if(!oe(P.label))return null;let le=!t&&P.slug===u,Y=i.canDeletePagesInline&&(m??[]).length>1,te=Df(P),ae=P.kind==="lightbox",pe=[...te?[{label:l("Dynamic"),tone:"info"}]:[],...ae?[{label:l("Lightbox"),tone:"success"}]:[],...P.draft?[{label:l("draft"),tone:"draft"}]:[]],Ne=pe.length>0?pe:void 0,ye=i.pageCreationInAdminForm||Y?ll(XI,{children:[i.pageCreationInAdminForm&&fe(Hf,{kind:"plain",label:l("Edit \u201C{name}\u201D in {place}",{name:P.label,place:l("the admin")}),onClick:()=>Ge(P.slug),children:fe(sl,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),Y&&fe(Hf,{kind:"delete",label:l("Delete \u201C{name}\u201D",{name:P.label}),disabled:v,onClick:()=>Re(P),children:fe(sl,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return fe(oh,{icon:fe(oL,{size:14}),name:P.label,selected:le,onSelect:()=>e(P.slug),badge:Ne,actions:ye,rowProps:{"data-page-slug":P.slug}},P.id)},Ce=(P,le,Y)=>{let te=Y.filter(Boolean);if(te.length===0)return null;let ae=Oe(P);return ll(jP,{children:[fe(JP,{count:te.length,expanded:ae,onToggle:()=>H(P),children:le}),ae&&te]},P)},ge=(a?.rows??[]).filter(P=>oe(P.label)).map(P=>{let le=t===P.key;return fe(oh,{icon:P.icon,name:P.label,selected:le,onSelect:()=>r(P.key),badge:{label:l("Preview"),tone:"warning"},actions:fe(Hf,{kind:"plain",label:l("Open the {name} in a new tab",{name:P.label}),onClick:()=>window.open(P.href,"_blank","noopener,noreferrer"),children:fe(sl,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":P.key}},P.key)}),Ie=i.hasSiteSettings&&!!a,Ze=(()=>{if(m===null)return null;let P=[],le=!1;for(let Y of W){Ie&&!le&&Y.key.startsWith("system:")&&(P.push(Ce("shop",a.title,ge)),le=!0);let te=Y.key===_f||Y.label===Bf?l(Y.label):Y.label;P.push(Ce(Y.key,te,Y.rows.map(De)))}return Ie&&!le&&P.push(Ce("shop",a.title,ge)),P})();return ll("div",{className:"sf-pages",children:[fe(ja,{icon:fe(tL,{}),title:l("Pages"),context:p,actions:fe(YP,{label:l("New page"),onClick:ro,children:fe(eL,{size:15})}),onHide:o}),fe("div",{className:"sf-pages-find",children:fe(JI,{type:"search",leftIcon:fe(sl,{name:"search",size:14,rounded:!0}),placeholder:l("Search all pages\u2026"),value:C,onChange:P=>k(P.target.value),"aria-label":l("Search all pages")})}),g&&!E&&fe("div",{className:"sf-note sf-note--error",role:"alert",children:g}),Ze===null?fe("div",{className:"sf-note",children:l("Loading\u2026")}):Ze.some(Boolean)?fe(QP,{ariaLabel:l("Pages"),className:"sf-scroll",children:Ze}):fe("div",{className:"sf-note",children:C.trim()?l("No pages match your search"):l("No pages yet. Add one with + above.")}),fe(XP,{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:ll(XI,{children:[fe(QI,{variant:"secondary",onClick:()=>F(!1),children:l("Cancel")}),fe(QI,{onClick:()=>{We()},disabled:v||!L.trim(),loading:v,children:l("Add page")})]}),children:fe(ZP,{label:l("Page name"),htmlFor:O,hint:L.trim()?l("URL: /{slug}",{slug:rh(L,Xe)}):void 0,error:g??void 0,children:fe(JI,{id:O,value:L,invalid:!!g,onChange:P=>B(P.target.value),onKeyDown:P=>{P.key==="Enter"&&We()},placeholder:l("e.g. About")})})})]})}import{jsx as aL}from"react/jsx-runtime";import{createContext as nL,useCallback as lL,useContext as sL,useState as iL}from"react";import{useSelectHandler as fL}from"efficient-easel/draw/client";var il=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],nr=il[0];var Ct="right";function fl(e){return il.includes(e??"")?e:nr}function nh(e){return e==="left"?"left":Ct}function lh(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():""}var cl={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:Ct,launcherLabel:"",showOnPhones:!0};function j$(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:lh(e.launcherColor),launcherIcon:e.launcherIcon?fl(e.launcherIcon):"",launcherPosition:nh(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var sh=nL({chat:cl,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function K$({children:e,chat:o=cl,onChatChange:t}){let[r,a]=iL(!1),n=lL(c=>t?.(c),[t]),{select:s,setSelectHandler:i}=fL();return aL(sh.Provider,{value:{chat:o,setChat:n,selected:r,setSelected:a,select:s,setSelectHandler:i},children:e})}var dl=()=>sL(sh);import{jsx as zf}from"react/jsx-runtime";import{DesktopIcon as cL,PhoneIcon as dL,TabletIcon as uL}from"efficient-easel/icons";import{VIEW_TIERS as pL,VIEW_TIER_LABEL as mL}from"efficient-easel/draw";var xL={desktop:zf(cL,{}),tablet:zf(uL,{}),mobile:zf(dL,{})},ih=pL.map(e=>({id:e,get label(){return l(mL[e])},icon:xL[e]}));import{PreviewDeviceContext as hM}from"efficient-easel/draw/client";import{jsx as IL}from"react/jsx-runtime";import{createContext as hL,useCallback as fh,useContext as gL,useMemo as bL,useRef as yL}from"react";var SL=Object.fromEntries(Wa.map(e=>[e,{value:"",error:null}])),ch=hL({links:su,rows:SL,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function r8({children:e,value:o}){let t=yL(()=>{}),r=fh(()=>t.current(),[]),a=fh(s=>{t.current=s},[]),n=bL(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return IL(ch.Provider,{value:n,children:e})}var aa=()=>gL(ch);import{jsx as CL}from"react/jsx-runtime";import{createContext as vL,useContext as wL,useMemo as kL,useState as TL}from"react";var dh=vL(null);function s8({children:e}){let[o,t]=TL(null),r=kL(()=>({surface:o,setSurface:t}),[o]);return CL(dh.Provider,{value:r,children:e})}function uh(){return wL(dh)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as FL}from"efficient-easel/draw/client";var na="Scrolling Bar",{Provider:c8,useSelection:ul}=FL("selectedHeroId");import{createPreviewSelectionContext as EL}from"efficient-easel/draw/client";var{Provider:p8,useSelection:pl}=EL("selectedHeroPart");import{isShown as $L,lazyShowWhenContext as qL}from"efficient-shell/format";var ml="product",PL="recordType",LL={key:ml,label:"Product",fields:[]};var OL=new Map,RL=0;function x8(){return[LL,...OL.values()]}function I8(){return RL}function AL(e){let o=e?.[PL];return typeof o!="string"?ml:o.trim()||ml}function Wf(e){return AL(e)===ml}var Gf="product",BL="tyre";var _L="productType",DL={[Gf]:"alloy-wheel",[BL]:"tyre"},NL=["alloy-wheel","tyre"];function ph(e,o){return Wf(o)?ML(o)??DL[e]??null:null}function ML(e){if(!Wf(e))return null;let o=e?.[_L];return typeof o=="string"&&NL.includes(o)?o:null}var xl=null,mh=null;function HL(e,o){xl=e,mh=o}function S8(e){HL(e,null)}function C8(){return xl}function xh(){return mh==="dynamic"||xl===Gf}function v8(e){return ph(xl??"",e)??"alloy-wheel"}import{addShowWhenFacts as zL}from"efficient-shell/format";import{showWhenOf as Uf,shownForOption as WL,truthy as GL,withRowRules as UL,withRowsShownWhen as Il,withShowWhen as hl}from"efficient-shell/format";var F8=zL;function hh(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e))$L(Uf(s),o??{},t)?a[n]=s:r=!0;return r?a:e}function gh(e,o,t,r){let a=Va(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function Ih(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 Ih(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>Ih(a,o)))return!0;return!1}function B8(e,o={}){return qL({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>xh(),root:()=>e.appState?.data?.root?.props,...o})}var yh=["one","side","stacked"];var D8={one:"One",side:"Side by side",stacked:"Stacked"};function Sh(e){return yh.includes(e)?e:"one"}function bh(e){return e==="one"?1:2}function jL(e,o){if(yh.includes(e))return e;let t=Sh(o);return t==="side"?"stacked":t}function $f(e){let o=Sh(e.mediaLayout);return Math.max(bh(o),bh(jL(e.mediaLayoutPhone,o)))}var la=["media","image","image2"],lr={media:"Media",image:"Image",image2:"Image 2"},sa={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function gl(e,o){return e==="image"&&$f(o)>1?"Image 1":lr[e]}var z8="Video file",W8="Upload a video file";function KL(e,o){return{field:"mediaType",is:e,default:o}}var VL=new Set(["HeroSingle"]),Ch="heroPart";function YL(e,o){return{...o,[Ch]:e}}function G8(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]=hl(n[i],KL(s,r));for(let[s,i]of Object.entries(a??{}))i&&(n[s]=hl(n[s],i));for(let s of la)for(let i of o[s]??[])n[i]=YL(s,n[i]);return n}function XL(e){let o=e?.[Ch];return la.includes(o)?o:null}function vh(e,o){let t={};for(let[r,a]of Object.entries(e))XL(a)===o&&(t[r]=a);return t}function wh(e){if(!VL.has(e.type))return[];let o=[{part:"media",label:lr.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:gl("image",e.props),depth:1}),$f(e.props)>1&&o.push({part:"image2",label:gl("image2",e.props),depth:1})),o}function ia(e,o){return`${e}::${o}`}function kh(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return la.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var U8="data-sf-hero-part";import{jsx as ee,jsxs as kt,Fragment as td}from"react/jsx-runtime";import{useState as J_}from"react";import{useEasel as eD}from"efficient-easel/easel";import{headWords as py,InspectorHead as oD,InspectorIconButton as dy}from"efficient-easel/chrome";import{DuplicateIcon as tD,TrashIcon as rD}from"efficient-easel/icons";import{panelFieldsOf as Th}from"efficient-easel/screen/lib/puck/panel-fields";import{jsx as T,Fragment as K,jsxs as V}from"react/jsx-runtime";import{BlockBannerIcon as JL,BlockBoxIcon as eO,BlockButtonIcon as oO,BlockDividerIcon as Eh,BlockFooterIcon as Ph,BlockHeadingIcon as tO,BlockProductIcon as rO,BlockSocialIcon as aO,BlockTextIcon as nO,ChatIcon as lO,GridIcon as sO,ImageIcon as jf,MediaIcon as iO,PageIcon as fO}from"efficient-easel/icons";import{jsx as qf,Fragment as ZL,jsxs as QL}from"react/jsx-runtime";var Fh=QL(ZL,{children:[qf("circle",{cx:"9",cy:"20",r:"1.3"}),qf("circle",{cx:"18",cy:"20",r:"1.3"}),qf("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 cO={header:V(K,{children:[T("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),T("path",{d:"M3 9.5h18"})]}),website:V(K,{children:[T("circle",{cx:"12",cy:"12",r:"9"}),T("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:V(K,{children:[T("circle",{cx:"6",cy:"12",r:"2.5"}),T("circle",{cx:"18",cy:"6",r:"2.5"}),T("circle",{cx:"18",cy:"18",r:"2.5"}),T("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:V(K,{children:[T("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),T("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:V(K,{children:[T("path",{d:"M4 15.5h6M4 18h4"}),T("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:T("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:V(K,{children:[T("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),T("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:T("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:V(K,{children:[T("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),T("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:V(K,{children:[T("circle",{cx:"11",cy:"11",r:"6"}),T("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:Fh,CountrySwitchBlock:V(K,{children:[T("circle",{cx:"12",cy:"12",r:"8.5"}),T("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),LegalLineBlock:V(K,{children:[T("path",{d:"M3 9h18"}),T("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:V(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:V(K,{children:[T("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),T("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:V(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),T("path",{d:"M7 17h7"})]}),Collections:V(K,{children:[T("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),T("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),T("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:V(K,{children:[T("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),T("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:V(K,{children:[T("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),T("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:V(K,{children:[T("path",{d:"M3 7h9M15.5 7H21"}),T("circle",{cx:"13.5",cy:"7",r:"1.7"}),T("path",{d:"M3 12h4M10.5 12H21"}),T("circle",{cx:"8.5",cy:"12",r:"1.7"}),T("path",{d:"M3 17h9M15.5 17H21"}),T("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:V(K,{children:[T("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:V(K,{children:[T("path",{d:"M3 5h10"}),T("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),T("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),T("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:V(K,{children:[T("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),T("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),T("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:V(K,{children:[T("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:V(K,{children:[T("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),T("circle",{cx:"9",cy:"10",r:"1.6"}),T("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:V(K,{children:[T("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),T("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:V(K,{children:[T("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),T("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),T("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:V(K,{children:[T("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),T("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:V(K,{children:[T("path",{d:"M3.5 20h17"}),T("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:V(K,{children:[T("circle",{cx:"6",cy:"12",r:"2.6"}),T("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),T("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:V(K,{children:[T("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),T("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:V(K,{children:[T("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),T("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:V(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:V(K,{children:[T("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),T("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:V(K,{children:[T("path",{d:"M4 8.5h4.5M11 8.5h9"}),T("path",{d:"M4 14.5h16"})]}),HeroGroup:V(K,{children:[T("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),T("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:V(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M6.5 9h11M6.5 12.5h11"}),T("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:T(K,{children:T("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:V(K,{children:[T("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),T("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:V(K,{children:[T("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),T("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),T("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),T("path",{d:"M4 13.5h11M4 17.5h7"}),T("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:T("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},dO=T("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),uO={footer:Ph,Footer:Ph,Divider:Eh,FooterDivider:Eh,Banner:JL,Flex:eO,FooterSocial:aO,page:fO,chat:lO,Heading:tO,Text:nO,ImageBlock:jf,ButtonBlock:oO,Grid:sO,ProductRef:rO,heroMedia:iO,heroImage:jf,heroImage2:jf},pO={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function vt({type:e,size:o=16,className:t}){let r=pO[e]??e,a=uO[r];return a?T(a,{size:o,className:t}):T("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:cO[r]??dO})}import{jsx as X,jsxs as Kf,Fragment as mO}from"react/jsx-runtime";import{useEffect as xO,useId as Lh,useState as IO}from"react";import{IconPicker as hO}from"efficient-shell/ui";import{SettingsDefaultReset as gO,SettingsField as sr,SettingsSegmented as bO,SettingsSwitch as Oh}from"efficient-easel/panel";import*as yO from"efficient-easel/icons";import{ButtonIcon as SO,ButtonIconIcon as CO,EyeIcon as vO,PhoneIcon as wO,PlacementIcon as kO,TypeIcon as TO}from"efficient-easel/icons";var FO="Chat with us",EO="We usually reply within a few minutes",PO="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function bl({label:e,value:o,placeholder:t,onCommit:r,multiline:a=!1,hint:n}){let[s,i]=IO(o);xO(()=>i(o),[o]);let c=()=>{s!==o&&r(s)};return X(sr,{label:e,icon:X(TO,{}),changed:o!=="",action:X(ir,{label:e,changed:o!=="",onReset:()=>r("")}),hint:n,children:a?X("textarea",{value:s,placeholder:t,rows:3,onChange:u=>i(u.target.value),onBlur:c,"aria-label":e}):X("input",{type:"text",value:s,placeholder:t,onChange:u=>i(u.target.value),onBlur:c,onKeyDown:u=>{u.key==="Enter"&&u.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function ir({label:e,changed:o,onReset:t}){return X(gO,{words:j()?.panel,label:e,changed:o,onReset:t})}function LO({label:e,icon:o,checked:t,fallback:r,onChange:a,hint:n}){let s=Lh();return X(sr,{label:e,labelId:s,icon:o,changed:t!==r,action:Kf("span",{className:"inline-flex items-center gap-2",children:[X(Oh,{checked:t,onChange:a,ariaLabelledBy:s}),X(ir,{label:e,changed:t!==r,onReset:()=>a(r)})]}),hint:n})}function OO(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=yO[`${o}Icon`];return t?X(t,{size:16}):null}var RO=il.map(e=>({value:e,icon:OO(e)}));function AO(){let{theme:e}=Z(),o=Qe(e).themes[0];return Or(o)??o?.accent??""}function Rh(){let{chat:e,setChat:o}=dl(),t=Lh(),r=AO(),a=e.launcherIcon?fl(e.launcherIcon):nr;return Kf(mO,{children:[X(sr,{label:l("Show the chat bubble"),labelId:t,icon:X(vO,{}),changed:!e.enabled,action:Kf("span",{className:"inline-flex items-center gap-2",children:[X(Oh,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),X(ir,{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.")}),X(Yt,{label:"Look"}),X(sr,{label:l("Button color"),icon:X(SO,{}),changed:e.launcherColor!=="",action:X(Je,{label:l("Button color"),value:e.launcherColor,inherited:r,caption:e.launcherColor?void 0:l("Site button color"),onChange:n=>o({launcherColor:n}),after:X(ir,{label:l("Button color"),changed:e.launcherColor!=="",onReset:()=>o({launcherColor:""})})})}),X(sr,{label:l("Icon"),icon:X(CO,{}),changed:a!==nr,action:X(ir,{label:l("Icon"),changed:a!==nr,onReset:()=>o({launcherIcon:""})}),children:X(hO,{label:l("Icon"),value:a,options:RO,onChange:n=>o({launcherIcon:n===nr?"":n})})}),X(sr,{label:l("Position"),icon:X(kO,{}),changed:e.launcherPosition!==Ct,action:X(ir,{label:l("Position"),changed:e.launcherPosition!==Ct,onReset:()=>o({launcherPosition:Ct})}),children:X(bO,{options:[{label:l("Right"),id:"right"},{label:l("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:l("Position"),onChange:n=>o({launcherPosition:n})})}),X(bl,{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")}),X(LO,{label:l("Show on phones"),icon:X(wO,{}),checked:e.showOnPhones,fallback:cl.showOnPhones,onChange:n=>o({showOnPhones:n})}),X(Yt,{label:"Wording"}),X(bl,{label:l("Title"),value:e.title,placeholder:FO,onCommit:n=>o({title:n})}),X(bl,{label:l("Subtitle"),value:e.subtitle,placeholder:EO,onCommit:n=>o({subtitle:n})}),X(bl,{label:l("Greeting message"),value:e.greeting,placeholder:PO,onCommit:n=>o({greeting:n}),multiline:!0}),X("p",{className:"es-field-hint sf-hint-keep",children:l("Leave a field blank to use the built-in wording.")})]})}import{jsx as wt,Fragment as xc,jsxs as Nh}from"react/jsx-runtime";import{useEffect as fR,useId as _h,useState as Dh}from"react";import{SettingsField as cR}from"efficient-easel/panel";import{jsx as eR}from"react/jsx-runtime";import{forwardRef as BO,createElement as Vf}from"react";var Ah={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 G=(e,o,t,r)=>{let a=BO(({color:n="currentColor",size:s=24,stroke:i=2,title:c,className:u,children:p,...m},x)=>Vf("svg",{ref:x,...Ah[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,u].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:i,stroke:n},...m},[c&&Vf("title",{key:"svg-title"},c),...r.map(([h,b])=>Vf(h,b)),...Array.isArray(p)?p:[p]]));return a.displayName=`${t}`,a};var _O=[["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"}]],Yf=G("outline","brand-facebook","BrandFacebook",_O);var DO=[["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"}]],Xf=G("outline","brand-instagram","BrandInstagram",DO);var NO=[["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"}]],Zf=G("outline","brand-line","BrandLine",NO);var MO=[["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"}]],Qf=G("outline","brand-linkedin","BrandLinkedin",MO);var HO=[["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"}]],Jf=G("outline","brand-pinterest","BrandPinterest",HO);var zO=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],ec=G("outline","brand-telegram","BrandTelegram",zO);var WO=[["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"}]],oc=G("outline","brand-tiktok","BrandTiktok",WO);var GO=[["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"}]],tc=G("outline","brand-wechat","BrandWechat",GO);var UO=[["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"}]],rc=G("outline","brand-whatsapp","BrandWhatsapp",UO);var $O=[["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"}]],ac=G("outline","brand-x","BrandX",$O);var qO=[["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"}]],nc=G("outline","brand-youtube","BrandYoutube",qO);var jO=[["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"}]],lc=G("filled","brand-facebook-filled","BrandFacebookFilled",jO);var KO=[["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"}]],sc=G("filled","brand-instagram-filled","BrandInstagramFilled",KO);var VO=[["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"}]],ic=G("filled","brand-linkedin-filled","BrandLinkedinFilled",VO);var YO=[["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"}]],fc=G("filled","brand-pinterest-filled","BrandPinterestFilled",YO);var XO=[["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"}]],cc=G("filled","brand-tiktok-filled","BrandTiktokFilled",XO);var ZO=[["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"}]],dc=G("filled","brand-whatsapp-filled","BrandWhatsappFilled",ZO);var QO=[["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"}]],uc=G("filled","brand-x-filled","BrandXFilled",QO);var JO=[["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"}]],pc=G("filled","brand-youtube-filled","BrandYoutubeFilled",JO);var v9="outline",yl={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},oR={},mc={fillRule:"evenodd"},tR=[["path",{...yl,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...mc,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],rR=[["path",{...yl,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",{...oR,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("")}]],aR=[["path",{...yl,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",{...yl,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",{...mc,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",{...mc,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("")}]],nR=G("filled","brand-telegram-filled","BrandTelegramFilled",tR),lR=G("filled","brand-line-filled","BrandLineFilled",rR),sR=G("filled","brand-wechat-filled","BrandWechatFilled",aR),iR={instagram:{outline:Xf,solid:sc},facebook:{outline:Yf,solid:lc},tiktok:{outline:oc,solid:cc},youtube:{outline:nc,solid:pc},x:{outline:ac,solid:uc},linkedin:{outline:Qf,solid:ic},pinterest:{outline:Jf,solid:fc},whatsapp:{outline:rc,solid:dc},telegram:{outline:ec,solid:nR},line:{outline:Zf,solid:lR},wechat:{outline:tc,solid:sR}};function Bh({platform:e,iconStyle:o,size:t}){let r=iR[e][o];return eR(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var dR={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 uR({platform:e}){let{rows:o,saveLink:t}=aa(),{value:r,error:a}=o[e],[n,s]=Dh(r),[i,c]=Dh(!1),u=_h(),p=_h();fR(()=>s(r),[r]);let m=async()=>{if(n.trim()===r){n!==r&&s(r);return}c(!0),await t(e,n),c(!1)},x=lu[e];return Nh(xc,{children:[wt(cR,{label:l(x),htmlFor:u,icon:wt(Bh,{platform:e,iconStyle:"outline",size:18}),children:wt("input",{id:u,type:"text",inputMode:"url",value:n,placeholder:dR[e],onChange:h=>s(h.target.value),onBlur:()=>{m()},onKeyDown:h=>{h.key==="Enter"&&h.currentTarget.blur(),h.key==="Escape"&&(s(r),h.currentTarget.blur())},"aria-invalid":a?!0:void 0,"aria-describedby":a?p:void 0,"aria-busy":i||void 0,autoComplete:"off",spellCheck:!1})}),a&&wt("p",{id:p,className:"sf-note sf-note--error",role:"alert",children:a})]})}function Mh({unavailable:e}){let{canSave:o}=aa();return!o&&e?wt(xc,{children:e}):Nh(xc,{children:[wt("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.")}),Wa.map(t=>wt(uR,{platform:t},t))]})}import{jsx as pr,jsxs as tB}from"react/jsx-runtime";import{useId as rB,useMemo as aB}from"react";import{useEasel as nB}from"efficient-easel/easel";import{SettingsField as lB,SettingsSwitch as sB}from"efficient-easel/panel";import{EyeIcon as iB}from"efficient-easel/icons";import{jsx as vo,jsxs as Pl}from"react/jsx-runtime";import{useCallback as dr,useEffect as ur,useId as YA,useRef as Mo,useState as ha}from"react";var Hh="data-puck-overlay-portal";function Sl(e){return e.setAttribute(Hh,"true"),()=>e.removeAttribute(Hh)}import{jsx as pa,jsxs as ng}from"react/jsx-runtime";var Ic="small",hc="dot",pR=[{label:"Small",value:"small"},{label:"Display",value:"display"}],mR=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],zh={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},xR={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},IR={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function Wh(e){return eo(pR,Ic,e)}function Gh(e){return eo(mR,hc,e)}function Uh(e){return xR[e]}function $h(e,o){return IR[e][o]}var gc="left",hR=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],gR={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function qh(e){return eo(hR,gc,e)}function jh(e){return e==="up"||e==="down"}function Kh(e,o){return`${gR[e]} ${o}s linear infinite`}import{jsx as ce,jsxs as Cc}from"react/jsx-runtime";import{Fragment as rg}from"react";import{Fragment as wR,jsx as yc}from"react/jsx-runtime";import{Fragment as Xh,jsx as ca,jsxs as SR}from"react/jsx-runtime";import{createContext as bc,useContext as da,useId as CR,useMemo as vR}from"react";var fa="@name",Vh="@body",Yh="@value",H9={[fa]:"Name",[Vh]:"Body",[Yh]:"Value"},bR={TimelineTrack:{"entries.date":fa,"entries.title":fa,"entries.blurb":Vh},Footprint:{"offices.city":fa},Stats:{"items.label":fa,"items.value":Yh}};function yR(e){let{key:o,row:t}=so(e);return t?`${o}.${t.rowKey}`:null}function Cl(e,o){if(!e)return o;let t=yR(o);return t?bR[e]?.[t]??o:o}var vl=bc(null),Zh=bc(null),Qh=bc(null);function q9({needles:e,styles:o,type:t,children:r}){let a=CR(),n=JSON.stringify([a,e,o,t]),s=vR(()=>kI(e,o,a,i=>Cl(t,i)),[n]);return s?SR(Xh,{children:[ca("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:TI(s).replace(/</g,"\\3c ")}}),ca(vl.Provider,{value:s,children:r})]}):ca(Xh,{children:r})}function Jh(e){let o=da(vl),t=da(Zh),r=FI(o,e);return r&&r.stamp!==t?r:null}function j9(e){return bf(da(vl),e)}function eg({stamp:e,children:o}){return ca(Zh.Provider,{value:e,children:o})}function K9({children:e}){let o=da(vl);return ca(Qh.Provider,{value:o,children:e})}function V9(e){return bf(da(Qh),e)}function ua({value:e,children:o}){let t=Jh(e);return t?yc(eg,{stamp:t.stamp,children:yc("span",{[uf]:t.stamp,children:o})}):yc(wR,{children:o})}import{jsx as Sc,Fragment as kR}from"react/jsx-runtime";function og({className:e=""}){return Sc("sup",{className:`text-accent tracking-normal text-[length:min(1em,max(0.75em,11px))] ${e}`,children:"\xAE"})}function wl(e){if(!e.includes("\xAE"))return e;let o=e.split("\xAE"),t=[];return o.forEach((r,a)=>{r&&t.push(r),a<o.length-1&&t.push(Sc(og,{},`r${a}`))}),Sc(kR,{children:t})}var oj=og;function vc(e,o=!1){let t=AR(o),r=qs(e);if(r.length===1){let[n]=r,s=$s(n),i=s?OR(s,n.children):n.children;return ce(ua,{value:e,children:kl(i,t)})}let a=[];return r.forEach((n,s)=>{if(n.bullet){a.push(ce("span",{"data-sf-bullet":"",className:TR,children:kl(n.children,t)},s));return}if(n.number!=null){a.push(Cc("span",{"data-sf-number":n.number,className:FR,children:[Cc("span",{className:ER,children:[n.number,"."]}),kl(n.children,t)]},s));return}s>0&&!PR(r[s-1])&&a.push(ce("br",{},`br${s}`)),a.push(ce(rg,{children:kl(n.children,t)},s))}),ce(ua,{value:e,children:a})}var TR="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",FR="relative block pl-[2em]",ER="absolute left-0 w-[1.6em] text-right tabular-nums";function PR(e){return e.bullet||e.number!=null}var LR="text-accent underline underline-offset-[0.18em]";function OR(e,o){let[t,...r]=o;return t?.kind==="text"?[{kind:"text",text:`${e}${t.text}`},...r]:[{kind:"text",text:e},...o]}function RR(e){if(e)return wI(e)?e:Object.hasOwn(Oo,e)?Oo[e]:void 0}function kl(e,o){let t=[],r=!1;return e.forEach((a,n)=>{if(a.kind==="text"){t.push(ce("span",{children:wl(a.text)},n)),r=!0;return}r||t.push(ce("span",{},`e${n}`)),t.push(ag(a,n,o)),r=!1}),r||t.push(ce("span",{},"end")),t}function tg(e,o){return e.length===1&&e[0].kind==="text"?wl(e[0].text):e.map((t,r)=>t.kind==="text"?ce(rg,{children:wl(t.text)},r):ag(t,r,o))}function AR(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function cj(e){return ce(ua,{value:e,children:ce("span",{children:e})})}function ag(e,o,t){if(e.kind==="link")return ce("a",{href:e.href,className:LR,children:tg(e.children,t)},o);let r=tg(e.children,t),a=lp[e.kind];if(a)return ce("span",{[sp]:a,children:r},o);switch(e.kind){case"underline":return ce("u",{children:r},o);case"sup":return ce("sup",{children:r},o);case"sub":return ce("sub",{children:r},o);case"color":{let n=RR(e.color);return n?ce("span",{style:{color:n},children:r},o):ce("span",{children:r},o)}case"accent":case"highlight":return ce("em",{className:t,children:r},o);case"bold":return ce("strong",{className:"font-semibold",children:r},o);case"italic":return ce("em",{className:"italic",children:r},o);case"strike":return ce("s",{className:"line-through",children:r},o);default:return ce("span",{children:r},o)}}function dj(e,o=!0){let t=e.split(`
6
+ `);return ce(ua,{value:e,children:t.map((r,a)=>Cc("span",{children:[vc(r,o),a<t.length-1?ce("br",{}):null]},a))})}function uj(e){return e.split(/\n\s*\n/).map(o=>o.trim()).filter(Boolean)}var BR={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function lg({items:e,separator:o=hc,size:t=Ic,durationSec:r=50,scroll:a=gc,backdrop:n="themed-band",className:s}){let i=Wh(t),c=qh(a),u=Gh(o),p=`text-accent ${$h(i,u)}`.trim(),m=zh[u],x=m===""?pa("span",{}):pa("span",{className:p,children:m}),h=jh(c),b=h?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-[800px]:gap-8 max-[800px]:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-[800px]:gap-8 max-[800px]:pr-8",C=h?"inline-flex flex-col items-center gap-[60px] max-[800px]:gap-8":"inline-flex items-center gap-[60px] max-[800px]:gap-8",k=v=>pa("span",{className:b,children:e.map((w,g)=>{let y=typeof w=="string"?w:w.text,E=typeof w=="object"&&w.gold;return ng("span",{className:C,children:[pa("span",{className:E?"text-accent":void 0,children:vc(y)}),x]},g)})},v);return pa("div",{className:`overflow-hidden ${s??""}`,children:ng("div",{className:`flex ${h?"flex-col ":""}whitespace-nowrap ${Uh(i)} ${BR[n]}`,style:{animation:Kh(c,r)},children:[k("a"),k("b")]})})}import{jsx as xa,jsxs as fA}from"react/jsx-runtime";import{createContext as cA,useContext as dA}from"react";import{jsx as fr,jsxs as hg}from"react/jsx-runtime";import{useEffect as kc,useRef as ZR,useState as ma}from"react";import{jsx as sg}from"react/jsx-runtime";import{createContext as _R,lazy as vj,Suspense as wj,useContext as DR}from"react";var NR={Link:Md,Image:Nd},MR=_R(NR);function ig(){return DR(MR)}function kj(e){let{Link:o}=ig();return sg(o,{...e})}function fg(e){let{Image:o}=ig();return sg(o,{...e})}import{jsx as cg,Fragment as HR,jsxs as zR}from"react/jsx-runtime";import{useEffect as WR,useRef as dg,useState as GR}from"react";var UR="#t=0.001",$R=2;function qR(e,o){if(e.readyState<$R||!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 ug({src:e,objectPosition:o="50% 50%",onError:t}){let r=dg(null),a=dg(null),[n,s]=GR(!1);return WR(()=>{let i=r.current,c=a.current;if(n||!i||!c)return;let u=()=>{qR(i,c)&&s(!0)};return u(),i.addEventListener("loadeddata",u),i.addEventListener("seeked",u),()=>{i.removeEventListener("loadeddata",u),i.removeEventListener("seeked",u)}},[n]),zR(HR,{children:[cg("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&&cg("video",{ref:r,src:`${e}${UR}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as mg,imageSrcSet as jR}from"efficient-shell/image-copies";var pg;function wc(){return pg===void 0?{}:{host:pg}}var Oj="(max-width: 800px) 100vw, min(100vw, 1600px)";function xg(e,{fallbackWidth:o=1280,maxWidth:t}={}){let r=jR(e,{...wc(),...t===void 0?{}:{maxWidth:t}});return r?{src:mg(e,o,wc()),srcSet:r}:{src:e}}function Rj(e){let o=mg(e,1920,wc());return o===e?`url(${e})`:`url("${o}")`}import{formatFocal as KR,parseFocal as VR}from"efficient-shell/format";var YR="sf-focus-phone",XR="--sf-focus-phone";function Ig(e){if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return{className:"",style:{}};let{x:o,y:t}=VR(e);return{className:YR,style:{[XR]:KR(o,t)}}}var QR=.5;function gg({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:r=QR,objectPosition:a="50% 50%",objectPositionPhone:n,quiet:s=!1}){let i=Ig(n),c=o||"",u=e||"",[p,m]=ma(!1),[x,h]=ma(!1),[b,C]=ma(!1),[k,v]=ma(!1),[w,g]=ma(!1),y=ZR(null);kc(()=>{m(!1),h(!1),C(!1),v(!1)},[e,o]),kc(()=>{if(typeof window>"u")return;let L=()=>{let B=window;B.requestIdleCallback?B.requestIdleCallback(()=>g(!0),{timeout:2e3}):setTimeout(()=>g(!0),800)};if(document.readyState==="complete"){L();return}return window.addEventListener("load",L,{once:!0}),()=>window.removeEventListener("load",L)},[]),kc(()=>{let L=y.current;if(!L)return;let B=()=>{L.playbackRate=r};return B(),L.addEventListener("loadedmetadata",B),()=>L.removeEventListener("loadedmetadata",B)},[e,r]);let E=Hd(c),F=c&&E&&!x?xg(c):{src:c};return hg("div",{className:"absolute inset-0 z-[1]",children:[fr("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),c&&(E?fr("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?h(!0):m(!0)},c):fr(fg,{src:c,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)},c)),t&&!s&&u&&w&&!b&&hg("video",{ref:y,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:()=>C(!0),children:[zd(u)&&fr("source",{src:u.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),fr("source",{src:u,type:"video/mp4"})]},u),t&&s&&u&&w&&!k&&(!c||p)&&fr(ug,{src:u,objectPosition:a,onError:()=>v(!0)},u)]})}var bg=["top","middle","bottom"],yg=["left","center","right"],Sg="bottom",Cg="left",JR={top:"Top",middle:"Middle",bottom:"Bottom"},eA={left:"Left",center:"Center",right:"Right"};var $j="Up and down",qj="Sideways",oA={top:"flex-start",middle:"center",bottom:"flex-end"},tA={left:"flex-start",center:"center",right:"flex-end"},rA="--sf-hero-phone-y",aA="--sf-hero-phone-x";function nA(e){return bg.includes(e)?e:Sg}function lA(e){return yg.includes(e)?e:Cg}function vg(e,o){let t=nA(e),r=lA(o),a={};return t!==Sg&&(a[rA]=oA[t]),r!==Cg&&(a[aA]=tA[r]),a}function jj(){return bg.map(e=>({label:JR[e],value:e}))}function Kj(){return yg.map(e=>({label:eA[e],value:e}))}var sA="#0A0A0A",iA=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function wg(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 kg(e){return e==null?!0:e!==!1}function Tg(e){let o=(e?wg(e):null)??wg(sA);return`linear-gradient(180deg, ${iA.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}var Tc=cA({});function rK({name:e,process:o,mediaType:t="video",mediaSrc:r,videoSpeed:a,poster:n,objectPosition:s,objectPositionPhone:i,tintColor:c="#000000",tintOpacity:u=0,groups:p,editing:m=!1,themeClassName:x,themeStyle:h}){let{alignment:b="left",textureOpacity:C,textureOn:k,textureColor:v,quietVideo:w,phoneUpDown:g,phoneSideways:y}=dA(Tc),E=t==="video",F=E?Pr(r):void 0,L=E?Pr(n):Pr(r)??Pr(n),B=typeof a=="number"?a/100:1;return fA("section",{className:x?`relative h-full w-full overflow-hidden ${x}`:"relative h-full w-full overflow-hidden",style:h,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":F?"video":"still",children:[xa(gg,{videoSrc:F,posterSrc:L,showVideo:E,playbackRate:B,objectPosition:s,objectPositionPhone:E?void 0:i,quiet:w}),u>0&&xa("div",{className:"absolute inset-0 z-[2]",style:{background:c,opacity:Math.min(Math.max(u,0),100)/100}}),kg(k)&&xa("div",{className:"absolute inset-0 z-[2]",style:{background:Tg(v),...C!==void 0?{opacity:C/100}:null}}),xa("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[min(var(--sf-page-cap,var(--sf-site-width,1600px)),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:{...Ku,...vg(g,y)},children:p&&xa(p,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var Fg=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{jsx as Fc}from"react/jsx-runtime";import{UiIcon as SA}from"efficient-easel/draw/client";var uA={"top-left":"left-0 top-[120px]","top-center":"left-1/2 top-[120px] -translate-x-1/2","top-right":"right-0 top-[120px]",left:"left-0 top-1/2 -translate-y-1/2",center:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",right:"right-0 top-1/2 -translate-y-1/2","bottom-left":"left-0 bottom-[120px]","bottom-center":"left-1/2 bottom-[120px] -translate-x-1/2","bottom-right":"right-0 bottom-[120px]"},pA=`calc(${vn} - ${$e}*2)`,Eg=`var(${vi},${$e})`,sK=`pointer-events-none absolute inset-y-0 left-[${Eg}] right-[${Eg}] z-[6] mx-auto max-w-[var(${wi},${pA.replace(/ /g,"_")})]`;function Tl(e,o){return`pointer-events-auto absolute ${uA[e]} z-[6] sf-hero-overlay-rail flex ${o}`}function Pg(e){return ho.includes(e)?e:null}var mA="bottom-right",xA=["outline","solid","square","bare"],IA="outline",cK={outline:"Outline",solid:"Solid",square:"Square",bare:"Bare"},dK=!1,Lg=["prev","next"],Og={prev:"Previous slide",next:"Next slide"};function hA(e){return xA.includes(e)?e:IA}function gA(e){return Pg(e)??mA}var bA="flex-row items-center gap-2";function Rg(e){return Tl(gA(e),bA)}var yA={outline:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",solid:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome bg-overlay-chrome text-overlay-scrim transition-colors hover:bg-overlay-chrome/85",square:"grid h-10 w-10 cursor-pointer place-items-center rounded-md border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",bare:"grid h-10 w-10 cursor-pointer place-items-center text-overlay-fg transition-colors hover:text-overlay-chrome"};function Ag(e){return yA[hA(e)]}function Bg(e){return e.shown===!0&&(e.count??0)>1}function Fl(e,o,t){if(t<=1)return o;let r=Math.min(Math.max(o,0),t-1);return e==="prev"?(r-1+t)%t:(r+1)%t}function _g({shape:e,placement:o,ref:t}){let r=Ag(e);return Fc("div",{ref:t,className:Rg(o),style:{color:"var(--overlay-fg)"},children:Lg.map(a=>Fc("button",{type:"button","data-hero-nav":a,"aria-label":Og[a],className:r,children:Fc(SA,{name:"chevron-right",size:18,rounded:!0,style:a==="prev"?{rotate:"180deg"}:void 0})},a))})}import{jsx as we,jsxs as Ec,Fragment as cr}from"react/jsx-runtime";var CA=ho;var vA="top-right",wA=["cards","dots","numbers","bar","squares","tabs"],kA=["cards","dots","numbers","bar","squares"],Dg="cards",bK={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",squares:"Squares",tabs:"Tabs"},yK=!0;function El(e){return wA.includes(e)?e:Dg}function Ng(e){return kA.includes(e)?e:Dg}function TA(e){return CA.includes(e)?e:vA}var Mg={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",squares:"flex-col gap-0",tabs:"flex-row items-stretch w-full overflow-x-auto"};function Hg(e,o){return Tl(TA(o),Mg[El(e)])}function zg(e){return`flex ${Mg[El(e)]}`}function Wg(e){return e.shown!==!1&&(e.count??0)>1}function FA(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function EA(e,o){return e===o?!0:e.length!==o.length?!1:e.every((t,r)=>t.name===o[r].name&&t.process===o[r].process&&t.video===o[r].video)}function Gg(e,o){let t=Array.from(o,FA);return EA(e,t)?e:t}function Ug({slides:e,active:o,shape:t,placement:r,ref:a,tone:n="media",label:s}){let i=El(t),c=n==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--site-surface-2)"}:void 0;return Ec("aside",{ref:a,"aria-label":s??"Featured slides",className:n==="surface"?zg(i):Hg(i,r),style:{color:"var(--overlay-fg)",...c},children:[i==="cards"&&we(PA,{slides:e,active:o}),i==="dots"&&we(LA,{count:e.length,active:o}),i==="numbers"&&we(OA,{count:e.length,active:o}),i==="bar"&&we(AA,{count:e.length,active:o}),i==="squares"&&we(RA,{count:e.length,active:o}),i==="tabs"&&we(BA,{slides:e,active:o})]})}function PA({slides:e,active:o}){return Ec(cr,{children:[we("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel \xB7 pick a slide"}),e.map((t,r)=>{let a=r===o;return Ec("button",{type:"button","data-idx":r,"aria-pressed":a,"aria-label":`Go to ${t.name||`slide ${r+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",a?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[we("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",a?"text-accent":"text-overlay-fg"].join(" "),children:t.name||`Slide ${r+1}`}),we("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:a?"\u25B6 Now playing":t.process||" "})]},r)})]})}function LA({count:e,active:o}){return we(cr,{children:Array.from({length:e},(t,r)=>we("button",{type:"button","data-idx":r,"aria-pressed":r===o,"aria-label":`Go to slide ${r+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${r===o?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},r))})}function OA({count:e,active:o}){return we(cr,{children:Array.from({length:e},(t,r)=>we("button",{type:"button","data-idx":r,"aria-pressed":r===o,"aria-label":`Go to slide ${r+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${r===o?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(r+1).padStart(2,"0")},r))})}function RA({count:e,active:o}){return we(cr,{children:Array.from({length:e},(t,r)=>we("button",{type:"button","data-idx":r,"aria-pressed":r===o,"aria-label":`Go to slide ${r+1}`,className:`grid h-8 w-8 cursor-pointer place-items-center border border-overlay-chrome/25 text-[length:var(--size-label,14px)] font-bold leading-none transition-colors motion-reduce:transition-none ${r===o?"bg-accent text-[color:var(--accent-ink)]":"bg-overlay-scrim/45 text-overlay-chrome/75 hover:text-overlay-chrome"}`,children:r+1},r))})}function AA({count:e,active:o}){return we(cr,{children:Array.from({length:e},(t,r)=>we("button",{type:"button","data-idx":r,"aria-pressed":r===o,"aria-label":`Go to slide ${r+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${r<=o?"bg-overlay-fg":"bg-overlay-chrome/25"}`},r))})}function BA({slides:e,active:o}){return we(cr,{children:e.map((t,r)=>{let a=r===o;return we("button",{type:"button","data-idx":r,"aria-pressed":a,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",r>0?"border-l border-overlay-chrome/15":"",a?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:we("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",a?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:t.name})},r)})})}import{useEffect as _A,useState as DA}from"react";var $g="(prefers-reduced-motion: reduce)";function NA(){return globalThis.window?.matchMedia?.($g)?.matches??!1}function TK(){return NA()?"auto":"smooth"}function qg(){let[e,o]=DA(!1);return _A(()=>{let t=globalThis.window?.matchMedia?.($g);if(!t||(o(t.matches),typeof t.addEventListener!="function"))return;let r=a=>o(a.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[]),e}var Ia={accent:"#2563eb",accentTint:"#eff6ff",accentText:"#1d4ed8",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",fieldBg:"#ffffff",inputBorder:"#d1d5db",text:"#111827",text2:"#374151",muted:"#6b7280",line:"#e5e7eb",chipBg:"#f3f4f6",chipFg:"#6b7280",panelRadius:12,rowRadius:8,panelShadow:"0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06)",topbarShadow:"0 1px 3px rgba(0,0,0,.06)",panelGap:10,leftWidth:288,rightWidth:308,topbarHeight:52,labelFont:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"};var jg={min:40,max:100,step:5,fallback:100,unit:"vh"};function Pc(e){return`${typeof e=="number"?e:jg.fallback}${jg.unit}`}function Kg(...e){return e.some(o=>typeof o=="number")}import{HEADER_TYPE as Lc,FOOTER_TYPE as MA}from"efficient-easel/draw";var HA=new Set(["Hero","HeroSingle","IntroBleed"]),Vg={min:56,max:140,default:88},OK={min:0,max:120,step:2,default:32},Yg=`var(--sf-header-h, ${Vg.default}px)`,zA="--sf-header-set-h",RK="--sf-header-h",AK=`var(${zA}, ${Vg.default}px)`,BK="sf-header-clearance",_K="sf-sticky-underheader";function WA(e){return e?.find(o=>o?.type&&o.type!==Lc)??null}function Xg(e){let o=WA(e)?.type;return!o||!HA.has(o)}function DK(e){return!Xg(e)}function NK(e){return!!e?.some(o=>o?.type===Lc)}function MK(e){return!e||e.length===0?!1:!e.some(o=>o?.type===Lc||o?.type===MA)}var GA=["auto","shared","own"],UA="auto",$A="topSpace",HK="data-top-space";function qA(e){return GA.includes(e)?e:UA}function jA(e,o){let t=qA(e?.props?.[$A]);return t==="own"?!0:t==="shared"?!1:Xg(o)}function zK(e,o){return jA(e,o)?"own":null}var KA=40;function VA(e,o){return Math.abs(e)<=KA||Math.abs(e)<=Math.abs(o)?null:e<0?"next":"prev"}function Zg(e,o,t,r){let a=VA(e,o);return a?Fl(a,t,r):t}function Qg(e){return(e.count??0)>1&&e.editing!==!0}function Jg(e){return e.editing!==!0?!1:(e.slides??[])[e.shown??0]?.video===!0}function eb(e){return e.editing!==!0?!1:!(e.playing===!0&&e.controlShown===!0)}import{HERO_SLIDER_GOTO_EVENT as ob}from"efficient-easel/draw";var XA=`
7
+ .hero-ticker-pick { cursor: pointer; }
8
+ .hero-ticker-pick:hover {
9
+ outline: 2px solid color-mix(in srgb, ${Ia.accent} 45%, transparent);
10
+ outline-offset: -2px;
11
+ }
12
+ .hero-ticker-pick[data-selected] {
13
+ outline: 2px solid ${Ia.accent};
14
+ outline-offset: -2px;
15
+ }
16
+ `,ZA="Play video",QA="Hold video",JA="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",eB=()=>l("item"),Oc=["","","","","",""],tb=new Map;function oB(e,o){let t=e?.ownerDocument?.defaultView;if(t)return t.addEventListener(ob,o),()=>t.removeEventListener(ob,o)}function fV({slides:e,alignment:o,textureOpacity:t,showTexture:r,textureColor:a,phoneUpDown:n,phoneSideways:s,autoplay:i,autoplayInterval:c,showTicker:u,tickerItems:p,heightDesktop:m,heightMobile:x,showPicker:h,pickerShape:b,pickerPlacement:C,showArrows:k,arrowsShape:v,arrowsPlacement:w,editing:g}){let y=Kg(m,x),E=y?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",F=y?{"--sf-hero-h-d":Pc(m),"--sf-hero-h-m":Pc(x)}:void 0,L=(p??Oc.map(N=>({text:N}))).map(N=>N?.text?.trim()?N.text:g?eB():"").filter(Boolean),B=u!==!1,O=Mo(null),M=Mo(null),re=Mo(null),H=Mo(null),W=Mo(null),A=YA(),oe=Mo(A),[Oe,Xe]=ha([]),[ro,We]=ha(0),Re=Mo(0),[Ge,De]=ha(!1),[Ce,ge]=ha(!1),[Ie,Ze]=ha(null),P=qg(),{selectedHeroId:le,select:Y}=ul(),te=dr(()=>O.current?.querySelector(".hero-track")??null,[]),ae=dr((N,U=!1)=>{We(N),Re.current=N,tb.set(oe.current,N);let q=O.current?.querySelector(".hero-track");if(q)if(U){let se=q.style.transition;q.style.transition="none",q.style.transform=`translateX(-${Math.max(0,N)*100}%)`,q.offsetHeight,q.style.transition=se}else q.style.transform=`translateX(-${Math.max(0,N)*100}%)`},[]);ur(()=>{let N=O.current,U=N?.getAttribute("data-puck-component")||N?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||A;oe.current=U,Ze(U);let q=tb.get(U);typeof q=="number"&&(We(q),Re.current=q)},[]),ur(()=>{let N=te();if(!N)return;let U=()=>{Xe(se=>Gg(se,N.querySelectorAll("[data-slide-name]")))};U();let q=new MutationObserver(U);return q.observe(N,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{q.disconnect()}},[te]),ur(()=>{if(!g)return;let N=U=>{let q=U.detail;if(!q||typeof q.index!="number")return;let se=O.current,oo=se?.getAttribute("data-puck-component")||se?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||oe.current;q.id&&q.id!==oo||ae(q.index,!0)};return oB(O.current,N)},[g,ae]);let pe=Oe.length,Ne=Math.min(Math.max(ro,0),Math.max(0,pe-1)),ye=Wg({shown:h,count:pe}),po=Bg({shown:k,count:pe}),Fo=Jg({editing:g,shown:Ne,slides:Oe}),Wo=eb({editing:g,playing:Ce,controlShown:Fo}),Pe=Qg({count:pe,editing:g}),Go=Mo(null),rt=Mo(null),at=dr(N=>{if(Go.current=null,rt.current=null,!Pe||N.touches.length!==1)return;let U=N.touches[0];Go.current={x:U.clientX,y:U.clientY},rt.current={x:U.clientX,y:U.clientY}},[Pe]),ss=dr(N=>{if(!Go.current)return;if(N.touches.length!==1){Go.current=null;return}let U=N.touches[0];rt.current={x:U.clientX,y:U.clientY}},[]),Na=dr(()=>{let N=Go.current,U=rt.current;if(Go.current=null,rt.current=null,!Pe||!N||!U)return;let q=Zg(U.x-N.x,U.y-N.y,Re.current,pe);q!==Re.current&&ae(q)},[Pe,pe,ae]);ur(()=>{if(g||!i||Ge||P||pe<=1)return;let N=Math.max(1,typeof c=="number"?c:6)*1e3,U=window.setTimeout(()=>ae((Ne+1)%pe),N);return()=>window.clearTimeout(U)},[g,i,c,Ge,P,pe,Ne,ae]),ur(()=>{let N=[M.current,re.current,H.current].filter(Boolean),U=N.map(se=>Sl(se)),q=se=>{let oo=se.target,Uo=oo.closest("[data-hero-nav]"),Ma=Uo??oo.closest("[data-idx]");if(!Ma)return;se.stopPropagation(),se.preventDefault();let Pt=Uo?Fl(Uo.dataset.heroNav,Re.current,pe):Number(Ma.dataset.idx);Number.isNaN(Pt)||(ae(Pt,g),te()?.querySelectorAll("[data-slide-name]")[Pt]?.click())};return N.forEach(se=>se.addEventListener("click",q,{capture:!0})),()=>{U.forEach(se=>se?.()),N.forEach(se=>se.removeEventListener("click",q,{capture:!0}))}},[pe,ae,te,g]),ur(()=>{if(!g)return;let N=W.current;if(!N)return;let U=Sl(N),q=se=>{se.stopPropagation(),se.preventDefault();let oo=O.current,Uo=oo?.getAttribute("data-puck-component")||oo?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||oe.current;Y(Uo)};return N.addEventListener("click",q,{capture:!0}),()=>{U?.(),N.removeEventListener("click",q,{capture:!0})}},[g,Y,B,L.length]);let Fr=dr(N=>{if(!N)return;let U=Sl(N),q=se=>{se.stopPropagation(),se.preventDefault(),ge(oo=>!oo)};return N.addEventListener("click",q,{capture:!0}),()=>{U?.(),N.removeEventListener("click",q,{capture:!0})}},[]);return vo(Tc.Provider,{value:{alignment:o,textureOpacity:t,textureOn:r,textureColor:a,quietVideo:Wo,phoneUpDown:n,phoneSideways:s},children:Pl("div",{ref:O,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${E} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:F,onMouseEnter:()=>De(!0),onMouseLeave:()=>De(!1),onTouchStart:at,onTouchMove:ss,onTouchEnd:Na,children:[vo(e,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${Ne*100}%)`,transition:P?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Fo&&vo("div",{ref:Fr,"data-hero-video-control":Ce?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Yg} + 16px)`},children:Pl("button",{type:"button",className:JA,children:[vo("span",{"aria-hidden":"true",children:Ce?"\u275A\u275A":"\u25B6"}),l(Ce?QA:ZA)]})}),(ye||po)&&Pl("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[ye&&vo(Ug,{ref:M,slides:Oe,active:Ne,shape:Ng(b),placement:C}),po&&vo(_g,{ref:H,shape:v,placement:w})]}),ye&&vo("div",{ref:re,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:Oe.map((N,U)=>vo("button",{type:"button","data-idx":U,"aria-label":`Go to slide ${U+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${U===Ne?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},U))}),B&&L.length>0&&Pl("div",{ref:W,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${g?" hero-ticker-pick":""}`,"data-selected":g&&Ie!=null&&le===Ie?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[g&&vo("style",{children:XA}),vo(lg,{items:L,backdrop:"dark-media"})]})]})})}var fB="root:default-zone";function rb({heroId:e}){let{appState:o,dispatch:t}=nB(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=aB(()=>{let p=n?.props.tickerItems;return Array.isArray(p)?p:Oc.map(m=>({text:m}))},[n]),c=rB();if(!n)return pr("p",{className:"sf-note",children:l("This ticker\u2019s hero is no longer on the page.")});let u=p=>t({type:"replace",destinationZone:fB,destinationIndex:a,data:{...n,props:{...n.props,...p}}});return tB("div",{children:[pr(Yt,{label:"Ticker"}),pr(lB,{label:l("Show ticker"),labelId:c,icon:pr(iB,{}),action:pr(sB,{checked:s,onChange:p=>u({showTicker:p}),ariaLabelledBy:c})}),pr(zi,{label:Hi.label,icon:Hi.icon,items:i,placeholder:"item",onChange:p=>u({tickerItems:p}),markup:!0})]})}import{jsx as z,Fragment as Gc,jsxs as wo}from"react/jsx-runtime";import{useContext as HB,useEffect as Hc,useRef as zB,useState as Tb}from"react";import{FieldSelect as WB,InspectorField as GB}from"efficient-easel/fields";import{SettingsField as UB}from"efficient-easel/panel";import{InspectorUpLevel as Dl}from"efficient-easel/chrome";import{StylesIcon as $B,TypeIcon as qB}from"efficient-easel/icons";import{useEasel as jB}from"efficient-easel/easel";import{TextPartPanel as KB}from"efficient-easel/copy";import{Tooltip as VB}from"efficient-shell/ui";import{jsx as Dc,jsxs as hB}from"react/jsx-runtime";import{COPY_CELLS as ga,CopyBox as gB}from"efficient-easel/copy";import{PaddingYIcon as bB,WidthIcon as yB}from"efficient-easel/icons";import{useSyncExternalStore as cB}from"react";import{decodePartId as dB}from"efficient-easel/draw";function mr(e,o){let t=rf(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?Ex(t,o.index):null:af(e)?.[o.rowKey]??null}function Ll(e,o,t){let r=e.node.props,{key:a,row:n}=so(e.propKey),s=n?oI(r,a,n,e.kind,o):Jx(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}var uB=["bold","italic","underline","strike","link","sup","sub"],pB=["bullet","number"];function Bc(e,o){return e?[...uB,...o?pB:[]]:[]}function ab(e,o){let t=dB(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:c}=so(a),u=o.components[n.type]?.fields?.[i],p=c?mr(u,c):u,m=Zt(p);if(!m)return null;let x=n.props??{};if(c&&!(Array.isArray(x[i])&&c.index<x[i].length))return null;let h=c?Yr(x[i],c):x[i];return{node:n,selector:s,propKey:a,kind:m,stored:h,offPage:Tn(p)}}function nb(e,o){let t=ab(e,o);if(!t||t.offPage)return null;let{text:r,hidden:a}=Qo(t.stored);if(a)return null;let n=qn(t.kind);return{partId:e,value:r,rules:Mt,multiline:n,offered:Bc(t.kind!=="plainText",n),write:s=>{let i=ab(e,o);i&&Ll({node:i.node,propKey:i.propKey,kind:i.kind,zone:i.selector.zone,index:i.selector.index},s,o.replace)}}}function lb(e,o,t){return e?.isConnected&&e.getAttribute(io)===t?e:o?.querySelector(`[${io}="${mB(t)}"]`)??null}function mB(e){return e.replace(/["\\]/g,"\\$&")}function sb(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Rc=null,Ac=new Set;function xB(){return Rc}function _c(e){if(e!==Rc){Rc=e;for(let o of Ac)o()}}function IB(e){return Ac.add(e),()=>{Ac.delete(e)}}function ib(){return cB(IB,xB,()=>null)}var SB=["left","center","right","justify"];function Nc(e,o,t,r={}){let a=ea(e),n=(r.phone?e.sizePhone:void 0)??e.size??o.sizePx;return[r.phone?{...ga.fontSize,value:e.sizePhone,styleValue:Math.round(o.sizePx),onChange:s=>t({sizePhone:s??null})}:{...ga.fontSize,value:e.size,styleValue:Math.round(o.sizePx),onChange:s=>t({size:s??null})},{...ga.lineHeight,value:a.lineHeight,styleValue:o.lineRatio,onChange:s=>t(s===void 0?{lineHeight:null,line:null}:{lineHeight:s})},{...ga.letterSpacing,scale:n,value:a.letterSpacingEm,styleValue:o.letterEm,onChange:s=>t(s===void 0?{letterSpacing:null,letter:null}:{letterSpacing:s})},{...ga.paragraphSpacing,value:e.paragraphSpacing,styleValue:0,onChange:s=>t({paragraphSpacing:s??null})},{key:"padding",name:l("Padding"),icon:Dc(bB,{}),unit:"px",step:xf,shiftStep:10,min:pf,max:mf,value:e.padding,styleValue:o.paddingPx,onChange:s=>t({padding:s??null})},{key:"width",name:l("Width"),icon:Dc(yB,{}),unit:"px",step:hf,shiftStep:100,min:If,max:Jo,value:e.width,styleValue:o.widthPx,onChange:s=>t({width:s??null})}]}function fb({text:e,onTextChange:o,multiline:t,markup:r=!0,styled:a=!0,style:n,base:s,setValue:i,colors:c,placeholder:u,ariaLabel:p,head:m,typedOnCanvas:x=!1}){let h=Nc(n,s,i),b=Bc(r,t);return hB("div",{className:"sf-part-textbox",children:[m,Dc(gB,{value:e,onChange:o,multiline:t,placeholder:u,ariaLabel:p,rules:Mt,tools:b,barShows:x?"focus":"always",colors:r?c:[],align:a?{value:n.align??s.align,allow:SB,onChange:C=>i({align:C})}:void 0,letterCase:a?{value:n.case==="capitalize"?"":n.case??"",onChange:C=>i({case:C||null})}:void 0,cells:a?h:void 0})]})}import{UiIcon as Fb}from"efficient-easel/draw/client";import{jsx as Ol,Fragment as CB,jsxs as vB}from"react/jsx-runtime";import{Button as cb,Dialog as wB}from"efficient-shell/ui";function db({styleName:e,onCancel:o,onConfirm:t}){return Ol(wB,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Update {style}?",{style:e}),footer:vB(CB,{children:[Ol(cb,{variant:"secondary",onClick:o,children:l("Cancel")}),Ol(cb,{variant:"primary",onClick:t,children:l("Update style")})]}),children:Ol("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{usePreviewDevice as YB}from"efficient-easel/draw/client";import{jsx as kB}from"react/jsx-runtime";import{createContext as TB,useContext as FB,useMemo as EB,useState as PB}from"react";var LB={partStyle:null,setPartStyle:()=>{}},ub=TB(LB);function XV({children:e}){let[o,t]=PB(null),r=EB(()=>({partStyle:o,setPartStyle:t}),[o]);return kB(ub.Provider,{value:r,children:e})}function pb(){return FB(ub)}import{TEXT_FIELD_MARKER as XB}from"efficient-easel/draw";var OB="#9ca3af";function RB(e){return tn.map(o=>({key:o,name:ip[o],value:e?.[o]||OB}))}function Rl(e){return RB(e).map(o=>({name:o.key,label:l(o.name),value:o.value}))}function xb(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 tn){let i=Oo[s].replace(/^var\((--[\w-]+)\)$/,"$1"),c=a.getPropertyValue(i).trim();if(!c)continue;let u=mb(c);!u&&n&&(n.fillStyle="#000000",n.fillStyle=c,u=mb(String(n.fillStyle))),u&&(o[s]=u)}return o}function mb(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}function AB(e){let o=new Set([...Object.keys(nn[e]??{}),...ln[e]??[]]);for(let[t,r]of Object.entries(Ys[e]??{}))r.verb==="snapshot"&&o.add(t);return[...o].sort()}var BB={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},Ib={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},hb="Open",gb={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 ba(e){let o=e?.source?.slug;return typeof o=="string"&&o.length>0?o:void 0}function ya(e){return BB[e]??null}function bb(e,o){let t=ya(e);return t&&AB(e).includes(o)?t:null}function Al(e){let o=e?.menu?.id;return typeof o=="string"&&o.length>0?o:void 0}var Bl="data-sf-spec-region";function aY(e,o,t){if(!e)return;let r=t[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${o.builtIn})`}}function xr(e){let o=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(e);if(!o)throw new Error(`builtInOf: no --size-* fallback in ${e}`);return o[1]}function _B(e){return`@${e}`}function Mc(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function yb(e,o){return o&&o in e?o:null}function DB(e,o){let t=o?.closest(`[${Bl}]`)?.getAttribute(Bl);return yb(e,t??null)}var Sa={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)]"},NB={tag:{label:"Tag",follows:"Labels",builtIn:xr(Sa.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:xr(Sa.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:xr(Sa.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:xr(Sa.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:xr(Sa.link),writable:!0}},Sb=NB;var MB={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}},Cb=MB;var dY=Bl;var vb={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 wb={SpecTable:vb,FAQ:Cb,Collections:Sb};function kb(e){return e&&Object.hasOwn(wb,e)?wb[e]:null}function Wc(e){return e?l(e):null}function Eb(e){return e.kind==="role"?Ha[e.role]:e.kind==="custom"?"Custom":null}function ZB(e){let o=e.role;return o&&Eo.includes(o)?{kind:"role",role:o}:null}function QB(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 zc(e,o,t,r){return ZB(Jn(e,o))??QB(t,r)}function JB(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}var _l="";function e_({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:_l,a=[{label:l("No style"),value:_l},...Eo.map(n=>({label:l(Ha[n]),value:n}))];return z(WB,{ariaLabel:l("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===_l?null:n),renderOption:n=>n.value===_l?wo(Gc,{children:[z("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),z("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section\u2019s own")})]}):z("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>z("span",{style:{fontFamily:o?.fontKey?`var(${Lt(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Wc(Eb(e))}),valueText:n=>Wc(Eb(e))??n?.label??""})}function o_({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a}){return wo("div",{className:"sf-part-panel",children:[z(Dl,{inline:!0,name:l(e),onSelect:o}),t,r,a]})}function Nl({source:e,slug:o,menuId:t}){let r=Bt(),a=gb[e],n=!a.needsSlug||!!o;return z("div",{className:"sf-note sf-note--source",children:wo("p",{className:"es-field-hint sf-hint-keep",children:[l(Ib[e]),n?wo(Gc,{children:[" ",z("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(hb)})]}):null]})})}var Pb=4,t_=120;function r_({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:i}){let c=e.follows;return wo("div",{className:"sf-note",children:[z("p",{children:z("strong",{children:l(e.label)})}),z("p",{children:o?l("Its size follows Site styles \u25B8 {follows} \u2014 {px}px right now.",{follows:l(c),px:Math.round(o)}):l("Its size follows Site styles \u25B8 {follows}.",{follows:l(c)})}),a?z(Gc,{children:z(UB,{label:l("Style"),icon:z($B,{}),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:z(e_,{face:t,base:r,onPick:a})})}):z("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?z(Nl,{source:n,slug:s}):null,z(Dl,{inline:!0,name:l("Page"),onSelect:i})]})}function a_({onBack:e}){return wo("div",{className:"sf-note",children:[z("p",{children:z("strong",{children:l("This part is no longer here.")})}),z("p",{children:l("The section it belonged to has been changed or removed.")}),z(Dl,{inline:!0,name:l("Page"),onSelect:e})]})}function n_({onBack:e,partId:o,why:t}){return wo("div",{className:"sf-note",children:[z("p",{children:z("strong",{children:l("This part's settings did not open.")})}),z("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.")}),z("p",{className:"sf-note-detail",children:wo("code",{children:[o," \u2014 ",t]})}),z(Dl,{inline:!0,name:l("Page"),onSelect:e})]})}function Lb({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=jB(D=>D),i=qo(),c=ib(),{partStyle:u}=pb(),{fonts:p,textStyles:m}=Z(),x=HB(Dt),h=!x?.capabilities?.hasSiteTheme,{persist:b}=zt({themeFromDocument:h,tokenRef:x?.tokenRef,siteId:x?.siteId??null}),C=ol({themeFromDocument:h,persist:b}),[k,v]=Tb(!1),w=YB()==="mobile",g=zB(null),y=a(e),E=n(e),F=y?s.components[y.type]:void 0,{key:L,row:B}=so(o),O=F?.fields?.[L],M=B?mr(O,B):O,re=Yn(e,o),H=y?.props??{},W=Zt(M),A=Tn(M),oe=iI(M),Oe=y?ya(y.type):null,Xe=y?bb(y.type,L):null,ro=B?Yr(H[L],B):H[L],We=!!B&&!(Array.isArray(H[L])&&B.index<H[L].length);Hc(()=>{sb(document)||g.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[re]);let[Re,Ge]=Tb(0);Hc(()=>Ge(0),[re]);let De=!!y&&!We&&(!E||!M);Hc(()=>{if(!De||Re>=Pb)return;let D=setTimeout(()=>Ge(ke=>ke+1),t_);return()=>clearTimeout(D)},[De,Re]);let Ce=De&&Re<Pb;if(!y||We)return z(a_,{onBack:t});let ge=kb(y.type),Ie=ge?Mc(ge,o):null;if(ge&&Ie){let D=u?.partId===re?u:null,ke=ge[Ie],mo=ke.writable===!0&&!!E,Er=fs=>{E&&i.replaceComponent(E.zone,E.index,{...y,props:Jr(H,o,"role",fs)})};return z(r_,{region:ke,sizePx:D?.base.sizePx??null,face:zc(H,o,D,p),base:D?.base??null,onFollowStyle:mo?Er:void 0,source:Oe,slug:ba(H),onBack:t})}if(!E||!M)return Ce?z("div",{className:"sf-note","aria-busy":"true"}):z(n_,{onBack:t,partId:re,why:E?"no field":"no selector"});let Ze=D=>{i.replaceComponent(E.zone,E.index,{...y,props:D})},P=D=>{if(Qo(D).hidden!==Qo(ro).hidden||!W){let ke=B?nf(H,L,B,D):{...H,[L]:D};ke&&Ze(ke);return}Ll({node:y,propKey:o,kind:W,zone:E.zone,index:E.index},Qo(D).text,i.replaceComponent)},le=ro,Y=u?.partId===re?u:null,te=Y?.styleOwner,ae=te?a(te.owner):null,pe=te&&ae?n(te.owner):null,Ne=!!(te&&ae&&pe),ye=Ne?ae.props??{}:H,po=Ne?D=>i.replaceComponent(pe.zone,pe.index,{...ae,props:D}):Ze,Fo=Ne?te.kind:Cl(y?.type,o),Wo=Jn(ye,Fo),Pe=[{partKey:Fo,face:zc(ye,Fo,Y,p),sizeGroup:Y?.sizeGroup??null,base:Y?.base??s_,style:Wo}],Go=JB(Pe,D=>D.sizeGroup),rt=Rl(Y?.inks),at=(D,ke)=>{let mo=ye;for(let Er of Pe)mo=Jr(mo,Er.partKey,D,ke);po(mo)},ss=D=>at("role",D),Na=D=>{let ke=ye;for(let mo of Pe)for(let[Er,fs]of Object.entries(D))ke=Jr(ke,mo.partKey,Er,fs??null);po(ke)},Fr=W==="text"||W==="textarea",{text:N,hidden:U}=Qo(ro),q=M?.[XB]?.label??o,se=U?l("Show {label} on the slide",{label:l(q)}):l("Hide {label} on the slide",{label:l(q)}),oo=wo("div",{className:"sf-field-head",children:[z(qB,{}),z("span",{className:"sf-field-label sf-field-label--inline",children:l(q)}),Fr&&z(VB,{content:se,children:z("button",{type:"button",className:"sf-field-eye","aria-pressed":U,"aria-label":se,onClick:()=>P({text:N,hidden:!U}),children:U?z(Fb,{name:"eye-off",size:14}):z(Fb,{name:"eye",size:14})})})]}),Uo=!A&&oe,Ma=!!W&&(px(M)||A||U||!oe),Pt=zc(ye,Fo,Y,p),is=Pt.kind==="role"?Pt.role:null,Bd=Object.entries(Wo).filter(([D,ke])=>D!=="role"&&ke!==void 0).length,_d=()=>{let D=ye;for(let ke of Pe){let mo=ke.style.role;D=CI(D,ke.partKey),mo&&(D=Jr(D,ke.partKey,"role",mo))}po(D)},nt=kf(is),uC=AI(Pe[0].style),pC=nt?et(C.saved,C.old).find(D=>D.id===nt)?.name??nt:"",mC=()=>{v(!1),nt&&(C.write(BI({saved:C.saved,old:C.old,styleId:nt,values:Tf(Pe[0].style)}),!0),_d())};return wo(o_,{sectionName:F?.label??y.type,onBack:t,textEditor:z("div",{ref:g,className:"sf-part-text",children:Ma?z(fb,{text:N,onTextChange:D=>P(Fr?{text:D,hidden:U}:D),multiline:qn(W),markup:W!=="plainText",styled:!1,style:Pe[0].style,base:Pe[0].base,setValue:Na,colors:rt,placeholder:Wc(Qx(M))??void 0,ariaLabel:l(q),head:oo,typedOnCanvas:c===re}):W?Fr?oo:null:z(GB,{field:M,name:o,value:le,onChange:P,id:`sf-part-${e}-${o}`})}),children:[Xe&&z(Nl,{source:Xe,slug:ba(H),menuId:Al(H)}),Uo&&z(KB,{style:{value:is??"",options:[{value:"",label:l("No style"),description:l("Section\u2019s own")},...Eo.map(D=>({value:D,label:l(Ha[D]),description:Lt(p[D])?.label}))],onChange:D=>ss(D||null),changed:Bd>0,onClearChanges:Bd>0?_d:void 0,onEditStyles:r,onUpdateStyle:nt&&uC?()=>v(!0):void 0},font:{value:Wo.font??"",styleValue:Lt(Pe[0].base.fontKey)?.label,options:no.map(D=>({label:D.label,value:D.key})),onChange:D=>at("font",D||null)},italic:{value:Wo.italic,styleValue:l_(m,is),onChange:D=>at("italic",D??null)},cells:Nc(Pe[0].style,Pe[0].base,Na,{phone:w}),align:{value:Wo.align??"",styleValue:Pe[0].base.align,onChange:D=>at("align",D||null)},letterCase:{value:Wo.case??"",styleValue:Pe[0].base.case,onChange:D=>at("case",D||null)}}),k&&nt&&z(db,{styleName:pC,onCancel:()=>v(!1),onConfirm:mC}),Uo&&Go===null&&z("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")})]})}function l_(e,o){let t=kf(o);return!t||!Array.isArray(e)?!1:e.find(r=>r?.id===t)?.values?.italic===!0}var s_={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:Jo};import{jsx as co,jsxs as Uc,Fragment as i_}from"react/jsx-runtime";import{useCallback as f_,useRef as c_,useState as Ca}from"react";import{InspectorIconButton as d_}from"efficient-easel/chrome";import{PopupMenu as u_,PopupMenuItem as p_,PopupMenuLabel as Ml}from"efficient-shell/ui";import{CopyToPageIcon as m_}from"efficient-easel/icons";import{cloneNodeWithFreshIds as Ob,docToNode as tX,nodeToDoc as rX}from"efficient-easel/screen/lib/puck/section-doc";import{FOOTER_TYPE as x_}from"efficient-easel/draw";function Rb({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,i]=Ca(!1),[c,u]=Ca(null),p=Ae(),[m,x]=Ca(!1),[h,b]=Ca(null),C=c_(null),[k,v]=Ca(null),w=f_(async()=>{if(p.usesBridgedToken&&!r.current){x(!0);return}try{u(await Ue(p).pages.list(t?{siteId:t}:void 0))}catch{x(!0)}},[r,t,p]),g=()=>{if(s){i(!1);return}let F=C.current?.getBoundingClientRect();F&&v({top:F.bottom+6,right:Math.max(8,window.innerWidth-F.right)}),u(null),x(!1),w(),i(!0)},y=(c??[]).filter(F=>F.slug!==o),E=async F=>{if(h)return;b(F.slug);let L=Ob(e),B=p.documentHooks?.storedNode?.(L)??L,O=Ue(p).pages,M=await a(async()=>{let re=await O.load({id:F.id});if(!re)throw new Error(`Page "${F.slug}" no longer exists.`);let H=re.layout??{},W=Array.isArray(H.content)?[...H.content]:[],A=W.findIndex(oe=>oe?.type===x_);W.splice(A===-1?W.length:A,0,B),await O.save(F.id,{layout:{root:{},zones:{},...H,content:W}},{version:re.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 Uc(i_,{children:[co("span",{"data-menu-toggle":!0,style:{display:"contents"},children:co(d_,{buttonRef:C,label:l("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:g,children:co(m_,{size:15})})}),s&&k&&co(u_,{portal:!0,style:{top:k.top,right:k.right},onClose:()=>i(!1),children:Uc("div",{role:"menu","aria-label":l("Duplicate to page"),children:[co(Ml,{children:l("Duplicate to page")}),m?co(Ml,{children:l("Couldn\u2019t load pages")}):c===null?co(Ml,{children:l("Loading\u2026")}):y.length===0?co(Ml,{children:l("No other pages")}):y.map(F=>Uc(p_,{role:"menuitem",disabled:h!==null,onClick:()=>{E(F)},children:[co("span",{className:"min-w-0 flex-1 truncate",children:F.label}),h===F.slug?co("span",{className:"shrink-0 text-xs",children:l("Copying\u2026")}):F.draft&&co("span",{className:"shrink-0 text-xs",children:l("draft")})]},F.id))]})})]})}import{ScreenPartsProvider as hX,sameInspectorMode as gX,SELECTION_MODE as Ab,useScreenParts as bX,useScreenBlockLook as yX,useScreenBlockRules as SX,useScreenBridges as CX,useScreenCanvasFrame as vX,useScreenDevices as wX,useScreenDocumentPass as kX,useScreenInspectorPanel as TX,useScreenLeftView as FX,useScreenOwnerName as EX,useScreenPinned as PX,useStandaloneScreenBridges as LX}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as aD}from"efficient-easel/draw/client";import{jsx as va,jsxs as I_}from"react/jsx-runtime";import{SettingsDrill as h_}from"efficient-easel/panel";import{UiIcon as g_}from"efficient-easel/draw/client";var b_="Not shown on the page";function y_({part:e,onOpen:o}){return va(h_,{name:l(e.label),preview:e.offPage?l(b_):e.preview||l("Empty"),offPage:e.offPage,status:e.hidden?va("span",{className:"sf-entry-eye",role:"img","aria-label":l("Hidden on the page"),children:va(g_,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function $c(e){return e.filter(o=>!o.identifier)}function Bb({parts:e,onOpen:o,heading:t=!0}){let r=$c(e);return r.length?I_("div",{className:"sf-entries",children:[t?va("h3",{className:"sf-entries-head",children:l("Text")}):null,r.map(a=>va(y_,{part:a,onOpen:o},a.key))]}):null}import{HEADER_TYPE as nD,ROOT_ZONE as uy}from"efficient-easel/draw";import{HEADER_TYPE as Ve,FOOTER_TYPE as me,newNodeId as S_}from"efficient-easel/draw";function Hl(){return{type:Ve,props:{id:S_(Ve)}}}var _b=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],C_=_b.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),v_="FooterGroup",Db="blocks";function Nb(e){return e===me?_b:e===v_?C_:null}function zl(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterGroup",{direction:"vertical",align:"start",blocks:[e("FooterText",{text:"Join our email list",size:"md",tone:"default"}),e("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}var _e="SiteHeader",de="SiteFooter",qc="sections",HX=[_e,de],Ir=e=>e===_e||e===de,Mb=e=>`${e}:${qc}`;function Hb(e,o,t=[]){return{type:e,props:{id:o,[qc]:t}}}var w_=new Set(["Footer",_e,de]);function hr(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):w_.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function zb(e,o){return e.some(t=>t?.type===o.type)?e:o.type===_e?[o,...e]:[...e,o]}var Wb={[_e]:{max:3,takes:["Flex","Ticker"]},[de]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function Gb(e,o,t){if(!Ir(e))return!0;let r=Wb[e];return t<r.max&&r.takes.includes(o)}function Ub(e,o){let t=o,r=t?.props?.id;if(r==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let n of a){if(!Ir(n?.type))continue;let s=n.props?.[qc];if(!Array.isArray(s)||!s.some(c=>c?.props?.id===r))continue;let i=Wb[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 $b(e){switch(e?.type){case _e:return l("Header \xB7 on every page");case de:return l("Footer \xB7 on every page");case Ve:return l("Header \xB7 on every page \xB7 old style");case me:return l("Footer \xB7 on every page \xB7 old style");default:return null}}var qb=()=>l("Every page"),jb=()=>l("Changed on every page");function Wl(e,o){let t=Wu(e,o);if(t)return t;let r=Ub(e,o);if(!r)return null;let a=r.group===_e;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 Ul,Fragment as F_,jsxs as E_}from"react/jsx-runtime";import{useState as P_}from"react";import{createNode as L_,newId as O_}from"efficient-easel/data";import{useEasel as R_}from"efficient-easel/easel";import{Banner as A_,Button as jc}from"efficient-shell/ui";var Gl="Flex",k_={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},T_=e=>{let{id:o,...t}=e;return t},Kb=e=>typeof e=="string"?e:"";function Vb(e,o){let t=e.props??{},r=k_[e.type];if(r)return[o(r,T_(t))];switch(e.type){case"FooterLogo":{let a=o("LogoBlock",t.reverse?{reverse:t.reverse}:{}),n=Kb(t.tagline).trim();return n?[a,o("Text",{text:n,tone:"dim",align:t.align==="center"?"center":"left"})]:[a]}case"FooterText":return[o("Text",{text:Kb(t.text),tone:typeof t.tone=="string"?t.tone:"default"})];case"FooterDivider":return[o("Divider")];case"FooterGroup":{let a=Array.isArray(t.blocks)?t.blocks:[];return[o(Gl,{direction:t.direction==="horizontal"?"row":"column",content:a.flatMap(n=>Vb(n,o))})]}default:return[]}}function wa(e,o,t){let r=(e&&Array.isArray(e.props?.blocks)?e.props.blocks:[]).flatMap(s=>{let i=Vb(s,o);return i.length<=1?i:[o(Gl,{direction:"column",content:i})]}),a=o(Gl,{direction:"row",wrap:!0,share:"equal",content:r}),n=o(Gl,{direction:"column",content:[o("LegalLineBlock")]});return Hb(de,t,[a,n])}function Yb(){let{appState:e,dispatch:o,config:t}=R_(p=>p),{readOnly:r}=Se(),[a,n]=P_(!1),s=e.data.content;if(r||s.some(p=>p.type===de))return null;let i=s.find(p=>p.type===me)??null,c=(p,m)=>L_(t,p,m),u=()=>{let p=wa(i,c,O_(de));o({type:"setData",data:m=>({...m,content:[...zb(m.content,p)]}),recordHistory:!0}),n(!1)};return Ul(A_,{tone:"info",title:l("This footer uses the old layout"),action:a?E_(F_,{children:[Ul(jc,{variant:"primary",size:"sm",onClick:u,children:l("Switch now")}),Ul(jc,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Cancel")})]}):Ul(jc,{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 ed}from"react/jsx-runtime";import{useLayoutEffect as $_,useMemo as sy,useRef as q_,useState as Qc}from"react";import{useEasel as j_,useSelectedFields as K_}from"efficient-easel/easel";import{Inspector as V_,planFields as iy}from"efficient-easel/fields";import{DESIGN_GROUPS as Vc,SETTINGS_BUCKETS as B_}from"efficient-easel/panel";import{BUCKET_KEY as Ye,DESIGN_GROUP_KEY as gr}from"efficient-easel/screen/lib/puck/field-buckets";var ka=B_;var __="Editor only \u2014 not shown live",Yc={"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",[__]:"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"},Zb={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},Qb={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function Kc(e,o,t){let r=`${e}.${o}`;return Qb[r]??Zb[r]??Yc[t]}function Jb(e){return e==="Animation"?[Ye.Animation]:[Ye.Design,gr[e]]}function $l(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=Ks(r),n=Do(a?a.inner:r),s=n?Yc[n.label]:void 0;if(s)for(let i of Jb(s))o.includes(i)||o.push(i)}return o}var dZ=[...$l(Rn(),An("full"),Bn(),_n(),Ni()),...Object.keys(Rn()),...Object.keys(An("full")),...Object.keys(Bn()),...Object.keys(_n()),...Object.keys(Ni())],uZ=[...$l(En()),...Object.keys(En())],pZ=[...$l(Ln()),...Object.keys(Ln())],mZ=[...$l(On()),...Object.keys(On())],D_=Object.keys(Px()),N_=new Set(["cardImage","imageBackground"]),xZ=[...Jb(Kc("ProductGrid","_gCards","Cards")??"Design"),...D_.filter(e=>e.startsWith("_g")||N_.has(e))],IZ=Object.keys(Lx()),hZ=Object.keys(Ox({bottomDefault:!0})),M_={"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)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","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)"},ey={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},oy={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Rn(),...An("full"),...Bn(),..._n(),...En(),...Ln(),...On()};for(let o of Object.keys(oy)){let t=Do(e[o]),r=t?Yc[t.label]:void 0;if(!t||t.level!==2||!r||!ey[r].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${o}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale \u2014 a list that quietly matches nothing is worse than no list.`)}}var H_=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),z_=new Map([[Ye.Design,"Content"],[Ye.Animation,"Animation"],...Vc.map(e=>[gr[e],e])]);function ty(e){let o=new Set([...Object.values(Ye),gr.Content]);for(let[t,r]of Object.entries(e))if(!o.has(t)&&Do(r)?.level===1)return 1;return 2}function W_(e){let o=`${e}.`;return Object.keys(M_).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function G_(e,o){let t=Ks(e),r=He(o);return t?ve(t.tier,r):r}function U_(e,o){let t=Do(o);return t?e==="Content"||e==="Animation"?hx(o,t.label):gx(o):o}function Xb(e){return e==="Design"?Vc:["Animation"]}function gZ(e,o){let t=[],r=new Set(W_(o)),a=new Set,n=!1,s=null;for(let[x,h]of Object.entries(e)){let b=Do(h);if(H_.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 C=z_.get(x);if(C!==void 0){if(b?.level!==1)throw new Error(`${o}.${x}: that key is reserved for the ${C} 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===Ye.Design||x===Ye.Animation)&&(n=!0),t.push(s={place:C,entries:[],adopted:!0});continue}if(!b){s||t.push(s={place:"Content",entries:[]}),s.entries.push([x,h]);continue}if(r.has(x)||x in oy){let v=Kc(o,x,b.label);if(b.level!==2||!v||!ey[v].includes(b.label))throw new Error(`${o}.${x}: ${r.has(x)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${b.level} "${b.label}" header in the ${v??"(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:v,entries:[]});continue}let k=Kc(o,x,b.label);if(!k)throw new Error(`${o}.${x}: the inspector group "${b.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...Vc,"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?h:G_(h,b.label)]]})}let i=new Set(Object.entries(e).filter(([,x])=>Do(x)).map(([x])=>x));for(let[x,h]of[["BLOCK_KEY_GROUP",Qb],["KEY_GROUP",Zb]]){let b=Object.keys(h).filter(C=>C.startsWith(`${o}.`)).filter(C=>!i.has(C.slice(o.length+1)));if(b.length)throw new Error(`${o}: ${x} (lib/puck/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 c=n?[]:[...r].filter(x=>!a.has(x));if(c.length)throw new Error(`${o}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.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 u=new Set(t.filter(x=>x.entries.length>0).map(x=>x.place)),p=ka.filter(x=>Xb(x).some(h=>u.has(h))),m={};for(let x of p){m[Ye[x]]=Fn(x,x===p[0]?p:null);for(let h of Xb(x)){if(!u.has(h))continue;let b=t.filter(k=>k.place===h),C=b.findIndex(k=>k.adopted);C>0&&b.unshift(...b.splice(C,1)),x==="Design"&&(m[gr[h]]=Bi(h));for(let k of b)for(let[v,w]of k.entries)m[v]=U_(h,w)}}return m}function bZ(e){return Ye.Design in e?e:{[Ye.Design]:Fn("Design",null),[gr.Content]:Bi("Content"),...e}}function yZ(e){return ka.some(o=>Ye[o]in e)}function SZ(e){let o=ka.filter(r=>Ye[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[Ye[r]]=Fn(r,r===o[0]?o:null);return t}import{usePreviewDevice as Y_}from"efficient-easel/draw/client";var Xc=" text",ry="Text";function Zc(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function ay(e){return e.filter(Zc).map(o=>o.key)}function ny(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 ly(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var Jc=new Map,ql=new Set;function X_(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),c=!!i&&[...i.children].some(p=>!p.hidden),u=i?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:c,labelled:c&&!!u}})});return r}var Z_=Object.fromEntries(ka.map(e=>{let o=mx[e];return[e,ed(o,{},e)]}));function Ta({entries:e,entryCount:o=0,part:t=null}){let{id:r,fields:a,values:n,readOnly:s,onChange:i}=K_(),c=Y_(),{appState:u,config:p}=j_(W=>W),m=gh(c,p,u.data.content??[],u.ui.itemSelector),x=vh(a,t),h=hh(x,n,m),[b,C]=Qc(()=>new Set(ql)),[k,v]=Qc(()=>new Set),w=q_(null),g=sy(()=>{let W=new Map;for(let A of iy(h).rows){if(!A.fold)continue;let oe=W.get(A.fold.key)??[];oe.push(A.name),W.set(A.fold.key,oe)}return W},[h]);$_(()=>{let W=w.current?.parentElement;if(!W)return;let A=new Set(ay(X_(W,g)));v(oe=>ly(oe,A)?oe:A)});let y=sy(()=>ny(h,k),[h,k]),E={key:Xc,rows:Array.from({length:o},()=>({shown:!0,labelled:!0}))},F=Zc(E)?void 0:{key:Xc,title:ry},[L,B]=Qc(()=>Jc.get(r)),O=Jc.get(r),M=iy(h).buckets,re=O&&M.includes(O)?O:L&&M.includes(L)?L:M[0],H=re===void 0||xx(M,re)!==!0;return ed(V_,{fields:y,values:n,onChange:i,readOnly:s,showWhenContext:{...m,node:n},tab:re,onTab:W=>{Jc.set(r,W),B(W)},tabIcons:Z_,idPrefix:r,ariaLabel:l("Section settings"),lead:H?e:null,leadFold:F,closedFolds:b,onFold:(W,A)=>{A?ql.delete(W):ql.add(W),C(new Set(ql))},children:ed("span",{ref:w,hidden:!0})})}import{jsx as od,jsxs as Q_}from"react/jsx-runtime";import{InspectorUpLevel as fy}from"efficient-easel/chrome";function cy({nodeId:e,part:o,sectionName:t,onUpToSection:r}){let{select:a}=pl();return Q_("div",{children:[o!=="media"?od(fy,{inline:!0,name:l(lr.media),onSelect:()=>a(ia(e,"media"))}):od(fy,{inline:!0,name:l(t),onSelect:r}),od(Ta,{part:o})]})}import{SettingsSwitch as lD}from"efficient-easel/panel";var my=Ab,ad={kind:"header"},nd={kind:"website"},xy={kind:"chat"},Iy={kind:"social"},Fa="Part";function sD(e){return l("Part of {name}",{name:l(e)})}function iD(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?sD(r.label):l(Fa)}}function fD(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 hy({what:e}){let o=fD(e);return kt("div",{className:"sf-note",children:[ee("p",{children:ee("strong",{children:o.title})}),kt("p",{children:[l("A template is a blueprint \u2014 it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function rd(e){let o=sa[e];return{name:lr[e],kindLabel:Fa,icon:o,head:(t,r)=>{if(t.kind!==o)return null;let a=r.describeNode(t.nodeId);if(!a)return null;let n=py({name:l(gl(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?ee(cy,{nodeId:t.nodeId,part:e,sectionName:r.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>r.onSelectNode(t.nodeId)}):null}}var cD={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?ee(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)=>ee(tl,{themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify})},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>ee(Rh,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>ee(Mh,{unavailable:ee(hy,{what:"Social link"})})},ticker:{name:na,kindLabel:Fa,icon:"ticker",head:(e,o)=>e.kind==="ticker"?iD(o,e.heroId,l(na)):null,render:e=>ee(rb,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:rd("media"),heroImage:rd("image"),heroImage2:rd("image2"),part:{name:Fa,kindLabel:Fa,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}=so(e.propKey),n=a?mr(t.fields[r],a):t.fields[r],s=tI(l(lf(Zn(n??{},r))),a),i=py({name:s,tier:"part",of:l(t.label)},{partOf:({name:c})=>l("Part of {name}",{name:c})});return{name:i.name,kindLabel:i.kind}},render:(e,o)=>e.kind==="part"?ee(Lb,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},dD=new Set(["header","website","chat"]);function uD(e,o){if(e==="puck")return null;let t=cD[e];return dD.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>ee(hy,{what:t.name})}:t}function gy({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r,hideNodeActions:a=!1,onNotify:n,onHidePanel:s}){let{capabilities:i,tokenRef:c,notifyParent:u,currentSlug:p,siteId:m,runAuthed:x,readOnly:h}=Se(),{websiteName:b}=Z(),C=qo({readOnly:h}),{select:k}=aD(),{selectedItem:v,getItemById:w,getSelectorForId:g,config:y,appState:E}=eD(te=>te),F=Th(y,v?{type:v.type,props:v.props}:null),L=v?cI(F??y.components[v.type]?.fields,v.props):[],B=te=>y.components[te]?.label??te,O=v?g(v.props.id):void 0,M=uD(e.kind,i),re=Ae(),H={capabilities:i,tokenRef:c,hostPanels:re.chrome?.panels,describeNode:te=>{let ae=w(te);if(!ae)return null;let pe=y.components[ae.type];return{type:ae.type,label:pe?.label??ae.type,fields:pe?.fields??{},props:ae.props??{}}},siteId:m,websiteName:b??null,notifyParent:u,onNotify:n,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r},W=M?.head?.(e,H)??null,A=W?.name??(M?l(M.name):v?l(B(v.type)):l("Page settings")),oe=W?.kindLabel??(M?l(M.kindLabel):v?O&&O.zone!==uy?l("Block"):l("Section"):l("Page")),Oe=M?M.icon:v?v.type:"page",Xe=M?null:v?y.components[v.type]?.fields??null:y.root?.fields??null,ro=Xe?ty(Xe):2,We=e.kind==="puck"&&v?ya(v.type):null,Re=!!v&&!!O&&O.zone===uy&&v.type!==me&&v.type!==nD,Ge=Wl(E?.data,v),De=()=>{Ge||O&&C.duplicateComponent(O.zone,O.index)},Ce=()=>{O&&(C.removeComponent(O.zone,O.index),C.select(null))},ge=v?y.components[v.type]?.defaultProps?.previewHover:void 0,Ie=e.kind==="puck"&&!!v&&!!O&&ge!==void 0,Ze=Ie&&v.props.previewHover===!0,P=()=>{!v||!O||C.replaceComponent(O.zone,O.index,{...v,props:{...v.props,previewHover:!Ze}})},[le,Y]=J_(Rf);return kt("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${le||!(!M&&v)?"":" sf-hints-folded"}`,children:[ee(oD,{icon:ee(vt,{type:Oe,size:15}),name:A,kind:oe,actions:!a&&e.kind==="puck"&&v&&v.type!==me?kt(td,{children:[ee(dy,{label:l("Duplicate section"),title:Ge??void 0,disabled:Ge!==null,onClick:De,children:ee(tD,{size:15})}),Re&&i.hasSiteSettings&&ee(Rb,{node:v,currentSlug:p,siteId:m??void 0,tokenRef:c,runAuthed:x,onNotify:n}),ee(dy,{label:l("Remove section"),danger:!0,onClick:Ce,children:ee(rD,{size:15})}),s?ee(ks,{side:"right",onHide:s,divider:!0}):null]}):s?ee(ks,{side:"right",onHide:s}):void 0}),Ie&&kt("div",{className:"sf-preview-pin",children:[kt("div",{className:"sf-preview-pin-text",children:[ee("span",{className:"sf-preview-pin-label",children:l("Preview hover state")}),ee("span",{className:"sf-preview-pin-hint",children:l("not shown live")})]}),ee(lD,{checked:Ze,onChange:P,ariaLabel:l("Preview hover state")})]}),ee($m,{tier:ro,children:ee("div",{className:"sf-insp-body es-insp-body sf-scroll",children:M?M.render(e,H):v?kt(td,{children:[v.type===me&&i.hasSiteSettings&&ee(Yb,{}),ee(yp,{children:ee(Ta,{entries:ee(Bb,{parts:L,heading:!1,onOpen:te=>k(Yn(v.props.id,te))}),entryCount:$c(L).length})}),We&&ee(Nl,{source:We,slug:ba(v?.props),menuId:Al(v?.props)}),ee(Af,{shown:le,onChange:Y})]}):ee(td,{children:ee(Ta,{})})})})]})}import{jsx as f,jsxs as S,Fragment as vy}from"react/jsx-runtime";var Fe={dark:"var(--sf-thumb-bar-dark)",soft:"var(--sf-thumb-bar-light)",accent:"var(--sf-thumb-accent)",tint:"var(--sf-thumb-accent-tint)",block:"var(--sf-thumb-block)",line:"var(--sf-thumb-border)",card:"var(--sf-thumb-card)"},ld="repeating-linear-gradient(135deg,var(--sf-thumb-hatch1) 0,var(--sf-thumb-hatch1) 5px,var(--sf-thumb-hatch2) 5px,var(--sf-thumb-hatch2) 10px)";function R({w:e,h:o,tone:t="dark",r=2,style:a}){return f("div",{style:{width:e,height:o,borderRadius:r,background:Fe[t],flex:"none",...a}})}var pD={Hero:"hero",HeroSingle:"herosingle",IntroBleed:"intro",Collections:"collections",AlloyWheelsListing:"wheelslisting",CatalogFilterBar:"catalogfilterbar",ProductGrid:"productgrid",BrandStrip:"brandstrip",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"},_={position:"absolute",inset:0},d={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)"},xe=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function zo({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:[f("span",{style:r("8% 26% 30% 6%",d.mark1)}),f("span",{style:r("26% 6% 8% 30%",d.mark2,"multiply")})]})}function Pa({children:e}){return f("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:d.muted},children:e})}function by({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:i}){return S(vy,{children:[e&&f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),f("span",{style:{fontSize:r,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:i},children:t}),a&&f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:n,color:s},children:a})]})}function sd({name:e,price:o}){return S("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...xe(d.paper,d.paper2,150)},children:f(zo,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.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 ${d.rule}`,fontSize:"3.98cqw",color:d.muted},children:[f("span",{children:e}),S("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("b",{style:{color:d.text,fontWeight:700},children:o}),t&&f("span",{style:{color:d.rust,fontWeight:700},children:"\u2713"})]})]})}function ie({title:e,children:o}){return S("div",{style:{..._,background:d.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[f(Pa,{children:e}),o]})}function yy({size:e=14}){return f("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${d.mark1},${d.mark2})`}})}function id({filled:e=5,size:o=6}){return S("span",{style:{fontSize:o,letterSpacing:"0.06em",color:d.rust,lineHeight:1},children:["\u2605".repeat(e),f("span",{style:{color:d.mark1},children:"\u2605".repeat(5-e)})]})}function Ea({n:e,label:o,tone:t=d.text}){return S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function Le({children:e,w:o}){return f("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:d.muted,width:o,display:"block"},children:e})}function jl({label:e,w:o="100%",filled:t}){return S("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:e}),f("span",{style:{height:9,borderRadius:3,border:`1px solid ${d.rule}`,background:t?d.paper:d.card}})]})}function Sy({children:e}){return f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.text,color:d.onInk},children:e})}var mD={wheelslisting:f(ie,{title:"All wheels",children:f("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:[f("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...xe(d.paper,d.paper2,150)},children:f(zo,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("b",{style:{flex:1,fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:d.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:S("div",{style:{..._,background:d.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:d.text,color:d.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,f("span",{style:{opacity:.6},children:"\u2715"})]},e)),f("span",{style:{fontSize:"3.65cqw",color:d.rust,fontWeight:700},children:"Clear"})]}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"128 results"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted,border:`1px solid ${d.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:S("div",{style:{..._,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...xe(d.ink,d.inkSoft)},children:[f("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:d.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:d.text,background:d.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",f("span",{style:{color:d.muted},children:"\u25BE"})]},e)),f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:d.warm,color:d.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:f(ie,{title:"Tyres that suit",children:f("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:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:d.ink},children:f("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${d.mark2}`,boxSizing:"border-box"}})}),f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:d.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),f("span",{style:{fontSize:"3.32cqw",color:d.muted},children:o})]},e))})}),tyresizes:f(ie,{title:"Available sizes",children:f("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>f("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?d.rust:d.rule}`,color:o===0?d.rust:d.text,background:o===0?d.paper:d.card},children:e},e))})}),tyrefitment:S(ie,{title:"Will it fit your car?",children:[f("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>S("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:d.muted,background:d.paper,border:`1px solid ${d.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",f("span",{style:{color:d.muted},children:"\u25BE"})]},e))}),f("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 ${d.rule}`,paddingTop:3},children:[f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:d.text},children:e}),f("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?d.warm:d.muted},children:o})]},e))})]}),eutyrelabel:S("div",{style:{..._,background:d.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[f("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:[f("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?d.rust:d.mark1}}),f("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?d.rust:d.muted},children:e})]},e))}),S("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[f("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:d.text},children:"72"}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:d.muted},children:"dB"})]})]}),bundleoffer:S("div",{style:{..._,background:d.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(Pa,{children:"Buy it with"}),S("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>f("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:d.card},children:f(zo,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:d.muted},children:"+"}),S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[f("span",{style:{fontSize:"3.65cqw",color:d.muted,textDecoration:"line-through"},children:"$1,024"}),f("b",{style:{fontSize:"6.02cqw",color:d.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:S("div",{style:{..._,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...xe(d.ink,d.ink2)},children:[S("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:d.warm,fontWeight:700},children:"READY TO ORDER"}),f("b",{style:{fontSize:"6.63cqw",color:d.onInk,lineHeight:1},children:"$1,956"}),f("span",{style:{fontSize:"3.65cqw",color:d.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:d.warm,color:d.ink,flex:"none"},children:"CHECKOUT"})]}),contact:f(ie,{title:"Who do you need?",children:f("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:[f("b",{style:{flex:1,fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o}),f("span",{style:{fontSize:"4.64cqw",color:d.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:f(ie,{title:"Find us",children:f("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 ${d.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.32cqw",color:d.muted},children:o}),f("span",{style:{fontSize:"3.32cqw",color:d.rust,fontWeight:700},children:t})]},e))})}),form:f(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:[f(jl,{label:"Name"}),f(jl,{label:"Email"})]}),f(jl,{label:"Message",filled:!0}),f(Sy,{children:"SEND"})]})}),appointmentbooking:f(ie,{title:"Book a fitting",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?d.text:d.paper,color:o===2?d.onInk:d.muted},children:e},e))}),f("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?d.rust:d.rule}`,color:o===1?d.rust:d.muted,background:o===3?d.paper:d.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:f(ie,{title:"Leave a review",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(id,{filled:4,size:14}),f(jl,{label:"Your review",filled:!0}),f(Sy,{children:"POST"})]})}),submitbuild:f(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 ${d.mark1}`,borderRadius:5,background:d.paper},children:[f("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:d.rust,fontWeight:300},children:"+"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"Drop a photo of your rig"})]})}),masthead:S("div",{style:{..._,background:d.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[f("span",{style:{height:1.5,background:d.text}}),f("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:d.text,lineHeight:1},children:"THE TRACK"}),S("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:d.muted},children:[f("span",{children:"Issue 14"}),f("span",{children:"Spring 2026"})]}),f("span",{style:{height:1,background:d.rule}})]}),featuredcover:S("div",{style:{..._,overflow:"hidden",...xe(d.ink,d.inkSoft2)},children:[f(zo,{size:92,style:{right:-18,top:-14}}),f("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${d.scrim},transparent 62%)`}}),S("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.warm},children:"FEATURE"}),f("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:d.onInk},children:"Four days on the Madigan Line"})]})]}),longread:S("div",{style:{..._,background:d.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:d.rust},children:"12 MIN READ"}),f("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:d.text},children:"What breaks first, and why"}),f(Le,{children:"Every failure starts in the same place \u2014 not the rim, not"}),f(Le,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:f(ie,{title:"Recurring columns",children:f("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:[f("span",{style:{width:3,height:12,borderRadius:2,background:d.rust,flex:"none"}}),f("b",{style:{flex:1,fontSize:"4.64cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:o})]},e))})}),events:f(ie,{title:"Latest posts",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[d.inkSoft,d.inkSoft2,"Madigan Line, four days"],[d.rust,d.warm,"Why offset beats width"]].map(([e,o,t])=>S("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...xe(e,o,150)}}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:t}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:S("div",{style:{..._,background:d.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.muted},children:"POLICY"}),f("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:d.text,lineHeight:1.1},children:"Returns & refunds"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),f("span",{style:{height:2,width:26,background:d.rust,borderRadius:1}})]}),docbody:f("div",{style:{..._,background:d.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:[f("b",{style:{fontSize:"3.98cqw",color:d.rust,flex:"none"},children:e}),f(Le,{children:o})]},e))}),docmetacards:f(ie,{title:"At a glance",children:f("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 ${d.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"5.31cqw",color:d.text,lineHeight:1},children:e}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:o})]},o))})}),doctabs:S("div",{style:{..._,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?d.text:d.muted,background:o===0?d.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?d.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),f("span",{style:{height:1,background:d.rule}}),S("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[f(Le,{children:"Unfitted wheels come back within 30 days, no questions."}),f(Le,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:S("div",{style:{..._,background:d.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[f("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:d.text},children:"The right wheel is the boring one."}),S("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(Le,{children:"Forged, correctly offset, rated for what you actually"}),f(Le,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:f(ie,{title:"Key features",children:f("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:[f("span",{style:{fontSize:"4.64cqw",color:d.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),f("span",{style:{fontSize:"4.31cqw",color:d.text},children:e})]},e))})}),statsparagraph:S("div",{style:{..._,background:d.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[S("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[f(Ea,{n:"27k",label:"Rigs"}),f(Ea,{n:"4.9",label:"Rating"})]}),S("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(Le,{children:"Twelve years of fitting the same three questions, and the"}),f(Le,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:S(ie,{title:"Load vs weight",children:[f("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>f("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?d.rust:d.mark1}},o))}),f("span",{style:{height:1,background:d.rule,marginTop:-4}})]}),mockup:f("div",{style:{..._,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...xe(d.inkSoft,d.ink)},children:S("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:d.card,boxShadow:`0 6px 14px ${d.scrim}`},children:[f("div",{style:{height:9,background:d.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>f("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:d.mark1}},e))}),S("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{height:4,width:"56%",borderRadius:1,background:d.mark2}}),f("span",{style:{height:14,borderRadius:2,...xe(d.paper,d.paper2,150)}}),f("span",{style:{height:3,width:"38%",borderRadius:1,background:d.rust}})]})]})}),manifesto:f("div",{style:{..._,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...xe(d.ink,d.ink2)},children:S("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:d.onInk},children:["We build for the ",f("span",{style:{color:d.warm},children:"last"})," ten percent of the track."]})}),timeline:f(ie,{title:"Our story",children:f("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&&f("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:d.rule}}),f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:d.rust,zIndex:1}}),S("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[f("b",{style:{fontSize:"4.64cqw",color:d.text},children:e}),f(Le,{children:o})]})]},e))})}),timelinetrack:S("div",{style:{..._,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...xe(d.ink,d.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"Milestones"}),S("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[f("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:d.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[f("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?d.warm:d.mark1}}),f("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?d.warm:d.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:S("div",{style:{..._,overflow:"hidden",...xe(d.paper,d.paper2,150)},children:[f("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:d.mark1,opacity:.75}}),f("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:d.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>f("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:d.rust}},e)),f("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:d.text},children:"3 fitting bays"})]}),banner:S("div",{style:{..._,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:d.rust},children:[S("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("b",{style:{fontSize:"6.02cqw",color:d.onInk},children:"End of season \xB7 20% off"}),f("span",{style:{fontSize:"3.98cqw",color:d.onInk,opacity:.8},children:"Fitted free, this month only."})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.onInk,color:d.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:S("div",{style:{..._,background:d.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[f("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:d.text},children:"Not sure what fits?"}),S("div",{style:{display:"flex",gap:5},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.text,color:d.onInk},children:"FIND MY FIT"}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${d.text}`,color:d.text},children:"CALL US"})]})]}),ticker:f("div",{style:{..._,overflow:"hidden",background:d.ink,display:"flex",alignItems:"center"},children:f("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:d.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:S("div",{style:{..._,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...xe(d.ink,d.ink2)},children:[f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:d.muted},children:"Back online in"}),f("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&&f("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:d.warm},children:":"}),S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[f("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:d.onInk,fontVariantNumeric:"tabular-nums"},children:e}),f("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:d.onInk},children:o})]})]},o))})]}),breadcrumb:f("div",{style:{..._,background:d.card,display:"flex",alignItems:"center",padding:"0 13px"},children:S("span",{style:{fontSize:"4.64cqw",color:d.muted},children:["Home ",f("span",{style:{opacity:.5},children:"/"})," Wheels ",f("span",{style:{opacity:.5},children:"/"})," ",f("span",{style:{color:d.text,fontWeight:700},children:"20 inch"})]})}),categorybar:S("div",{style:{..._,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?d.text:d.paper,color:o===0?d.onInk:d.muted},children:e},e))}),f("span",{style:{height:1,background:d.rule}})]}),intro:S("div",{style:{..._,overflow:"hidden",background:d.card},children:[f("div",{style:{position:"absolute",inset:0,...xe(d.ink,d.inkSoft2)}}),f(zo,{size:64,style:{right:8,top:6}}),S("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:d.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${d.scrim}`},children:[f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:d.text},children:"Since 1998"}),f(Le,{children:"One shed, one lathe, one idea."}),f(Le,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:f(ie,{title:"From our customers",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[d.rust,d.warm],[d.inkSoft,d.ink],[d.paper2,d.mark2],[d.ink,d.inkSoft2],[d.warm,d.paper2],[d.mark2,d.inkSoft]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...xe(e,o,140+t*22)}},t))})}),gallery:S(ie,{title:"Gallery",children:[f("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?d.text:d.muted,borderBottom:`1.5px solid ${o===0?d.rust:"transparent"}`,paddingBottom:2},children:e},e))}),f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[d.rust,d.warm],[d.ink,d.inkSoft],[d.paper2,d.mark2]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...xe(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:[f("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...xe(d.paper,d.paper2,150)},children:f(zo,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),S("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(Ho,{k:"Subtotal",v:"$1,956"}),f(Ho,{k:"Fitting",v:"Free"}),S("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[f("b",{style:{color:d.text},children:"Total"}),f("b",{style:{color:d.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:f(ie,{title:"Delivery",children:f("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?d.rust:d.rule}`,background:r?d.paper:d.card},children:[f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${r?d.rust:d.mark1}`,background:r?d.rust:"transparent"}}),f("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:d.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:d.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:d.text},children:t})]},e))})}),paymentbadges:S("div",{style:{..._,background:d.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[f(Pa,{children:"Ways to pay"}),f("div",{style:{display:"flex",gap:5},children:[["VISA",d.ink],["MC",d.rust],["AMEX",d.inkSoft],["PayPal",d.ink2]].map(([e,o])=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:d.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:S("div",{style:{..._,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...xe(d.ink,d.ink2)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"By the numbers"}),S("div",{style:{display:"flex",gap:8},children:[f(Ea,{n:"27k",label:"Rigs fitted",tone:d.onInk}),f(Ea,{n:"12",label:"Years",tone:d.onInk}),f(Ea,{n:"4.9",label:"Avg rating",tone:d.warm})]})]}),testimonials:S("div",{style:{..._,overflow:"hidden",background:d.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[f("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:d.rust,opacity:.16},children:"\u201D"}),f(id,{filled:5,size:7}),f("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:d.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:[f(yy,{}),f("span",{style:{fontSize:"3.98cqw",color:d.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:S(ie,{title:"Reviews",children:[f("div",{style:{display:"flex",gap:4,height:22},children:[[d.inkSoft,d.inkSoft2],[d.rust,d.warm],[d.ink,d.inkSoft],[d.mark2,d.mark1]].map(([e,o],t)=>f("div",{style:{flex:1,borderRadius:3,...xe(e,o,140+t*15)}},t))}),f("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:[f(yy,{size:12}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[S("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[f("b",{style:{fontSize:"3.98cqw",color:d.text},children:e}),f(id,{filled:o})]}),f(Le,{children:t})]})]},e))})]}),logos:S("div",{style:{..._,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...xe(d.ink,d.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"As fitted by"}),f("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>f("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:d.onInk,opacity:.82},children:e},e))})]}),prose:S("div",{style:{..._,background:d.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:d.text},children:"Why offset matters"}),S("div",{style:{display:"flex",gap:6},children:[f("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:d.rust,marginTop:1},children:"T"}),S("div",{style:{display:"flex",flexDirection:"column"},children:[f(Le,{children:"he number on the back of your wheel decides whether the"}),f(Le,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:f(ie,{title:"What you get",children:f("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 ${d.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{width:11,height:11,borderRadius:3,background:d.rust,opacity:.9}}),f("b",{style:{fontSize:"3.98cqw",color:d.text},children:e}),f(Le,{children:o})]},e))})}),faq:f(ie,{title:"Questions",children:f("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 ${d.rule}`,padding:"4px 2px"},children:[S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"4.64cqw",color:d.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&f(Le,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:S("div",{style:{..._,overflow:"hidden",...xe(d.ink,d.ink2)},children:[f("div",{style:{..._,background:`linear-gradient(90deg,${d.scrim},transparent 70%)`}}),f("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:f(by,{over:"NEW \xB7 SUMMER",overTone:d.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:d.warm,ctaFg:d.ink,tone:d.onInk})}),f(zo,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:S("div",{style:{..._,display:"flex",background:d.paper,overflow:"hidden"},children:[f("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:f(by,{over:"ALL-TERRAIN",overTone:d.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:d.text,ctaFg:d.onInk,tone:d.text})}),f("div",{style:{flex:1,position:"relative",...xe(d.inkSoft,d.inkSoft2)},children:f(zo,{size:74,style:{right:-14,top:16}})})]}),productgrid:f(ie,{title:"Best sellers",children:S("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[f(sd,{name:"Ridge 19",price:"$365"}),f(sd,{name:"Ridge 29",price:"$410"}),f(sd,{name:"Ridge 39",price:"$455"})]})}),collections:f(ie,{title:"Shop by category",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",d.inkSoft,d.inkSoft2],["Tyres",d.rust,d.warm],["Lift kits",d.ink,d.inkSoft]].map(([e,o,t])=>f("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:d.onInk,...xe(o,t)},children:f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:S("div",{style:{..._,display:"flex",background:d.card,overflow:"hidden"},children:[f("div",{style:{flex:1.1,position:"relative",...xe(d.paper,d.paper2,150)},children:f(zo,{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:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.rust},children:"NITTO"}),f("b",{style:{fontSize:"6.29cqw",color:d.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:d.text},children:"$489"}),f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:d.text,color:d.onInk},children:"ADD TO CART"})]})]}),spectable:f(ie,{title:"Specifications",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(Ho,{k:"Diameter",v:'20"'}),f(Ho,{k:"Width",v:"9.0J"}),f(Ho,{k:"Offset",v:"+12"}),f(Ho,{k:"Load",v:"1250 kg"})]})}),fitmenttable:f(ie,{title:"Will it fit?",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(Ho,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),f(Ho,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),f(Ho,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),brandstrip:S("div",{style:{..._,background:d.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[f(Pa,{children:"Brands we carry"}),f("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["NITTO","BFG","FUEL","TOYO"].map(e=>f("span",{style:{fontSize:"4.64cqw",fontWeight:800,letterSpacing:"0.1em",color:d.mark2},children:e},e))})]}),processsteps:S("div",{style:{..._,background:d.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[f(Pa,{children:"How it works"}),f("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:[f("span",{style:{width:11,height:11,borderRadius:"50%",background:d.text,color:d.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),f("span",{style:{fontSize:"3.98cqw",color:d.text,fontWeight:600},children:e})]},e))})]}),detailrows:f("div",{style:{..._,background:d.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=f("div",{style:{flex:1,...xe(t?d.rust:d.inkSoft,t?d.warm:d.inkSoft2)}},"art"),a=S("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[f("b",{style:{fontSize:"4.64cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:d.muted,lineHeight:1.3},children:o})]},"tx");return f("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[a,r]:[r,a]},e)})}),specstrip:f("div",{style:{..._,background:d.ink,color:d.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:[f("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},Cy={subscribe:S("div",{style:{..._,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:[f(R,{w:8,h:8,r:2,tone:"accent"}),f(R,{w:38,h:7,r:3,tone:"dark"}),f(R,{w:16,h:7,r:3,tone:"accent"})]}),f(R,{w:38,h:4,r:2,tone:"soft"})]}),f("div",{style:{height:1,background:Fe.line,marginBottom:10}}),S("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${Fe.line}`,borderRadius:7,padding:10},children:[S("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[f(R,{w:"46%",h:3,r:2,tone:"accent"}),f(R,{w:"84%",h:8,r:4,tone:"dark"}),f(R,{w:"56%",h:8,r:4,tone:"accent"}),f(R,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),S("div",{style:{display:"flex",gap:5,marginTop:4},children:[f("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${Fe.line}`,background:Fe.block}}),f(R,{w:34,h:13,r:5,tone:"accent"})]})]}),S("div",{style:{flex:1,background:Fe.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[f(R,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${Fe.line}`:"none",paddingTop:o?4:0},children:[f(R,{w:34,h:4,r:2,tone:"dark"}),f(R,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:S("div",{style:{..._,display:"flex"},children:[f("div",{style:{width:"44%",background:ld}}),S("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(R,{w:"44%",h:5,r:3,tone:"accent"}),f(R,{w:"88%",h:8,r:4,tone:"dark"}),f(R,{w:"70%",h:8,r:4,tone:"dark"}),f(R,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),f(R,{w:"80%",h:5,r:2,tone:"soft"}),f(R,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:S(vy,{children:[f(R,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),S("div",{style:{..._,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[S("div",{style:{display:"flex",alignItems:"center",gap:9},children:[f(R,{w:16,h:16,r:4,tone:"accent"}),f(R,{w:"20%",h:9,r:4,tone:"dark"})]}),f(R,{w:"62%",h:10,r:5,tone:"dark"}),f(R,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:f("div",{style:{..._,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:S("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[f(R,{w:"22%",h:12,r:4,tone:"dark"}),S("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[f(R,{w:26,h:6,r:3,tone:"soft"}),f(R,{w:26,h:6,r:3,tone:"soft"}),f(R,{w:26,h:6,r:3,tone:"soft"}),f(R,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:S("div",{style:{..._,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:[f(R,{w:"60%",h:9,r:4,tone:"dark"}),f(R,{w:"90%",h:5,r:2,tone:"soft"}),f(R,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[f(R,{w:"50%",h:6,r:3,tone:"dark"}),f(R,{w:"80%",h:5,r:2,tone:"soft"}),f(R,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),f("div",{style:{height:1,background:Fe.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(R,{w:"30%",h:5,r:2,tone:"soft"}),f(R,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:f("div",{style:{..._,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>f("div",{style:{borderRadius:6,background:Fe.block}},o))}),blanksection:f("div",{style:{..._,padding:14,display:"flex"},children:S("div",{style:{flex:1,border:`1px dashed ${Fe.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[f(R,{w:14,h:2,r:1,tone:"tint"}),f(R,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:S("div",{style:{..._,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[f(R,{w:"100%",h:6,r:3,tone:"soft"}),f(R,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),f(R,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:f("div",{style:{..._,padding:14,display:"flex",alignItems:"center"},children:f(R,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:S("div",{style:{..._,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:ld},children:[f(R,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),f(R,{w:16,h:10,r:3,tone:"accent"}),f(R,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:f("div",{style:{..._,padding:14,display:"flex",alignItems:"center"},children:f(R,{w:"64%",h:13,r:4,tone:"dark"})}),text:S("div",{style:{..._,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(R,{w:"100%",h:6,r:3,tone:"soft"}),f(R,{w:"96%",h:6,r:3,tone:"soft"}),f(R,{w:"100%",h:6,r:3,tone:"soft"}),f(R,{w:"58%",h:6,r:3,tone:"soft"})]}),image:f("div",{style:{position:"absolute",inset:14,borderRadius:7,background:ld}}),button:f("div",{style:{..._,display:"flex",alignItems:"center",justifyContent:"center"},children:f(R,{w:"34%",h:16,r:8,tone:"accent"})}),menu:S("div",{style:{..._,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(R,{w:"48%",h:7,r:3,tone:"dark"}),f(R,{w:"82%",h:5,r:2,tone:"soft"}),f(R,{w:"66%",h:5,r:2,tone:"soft"}),f(R,{w:"74%",h:5,r:2,tone:"soft"}),f(R,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:S("div",{style:{..._,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f(R,{w:"56%",h:8,r:3,tone:"dark"}),S("div",{style:{display:"flex",gap:6},children:[f("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${Fe.line}`}}),f(R,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:f("div",{style:{..._,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>f(R,{w:16,h:16,r:8,tone:"dark"},e))}),search:f("div",{style:{..._,padding:"0 18%",display:"flex",alignItems:"center"},children:S("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${Fe.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[f("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${Fe.dark}`}}),f(R,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:S("div",{style:{..._,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[f("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${Fe.dark}`}}),f("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${Fe.dark}`},children:f(R,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:S("div",{style:{..._,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 ${Fe.line}`},children:[f(R,{w:22,h:6,r:2,tone:"dark"}),f(R,{w:6,h:4,r:1,tone:"soft"})]}),S("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${Fe.line}`},children:[f(R,{w:"80%",h:4,r:2,tone:"accent"}),f(R,{w:"64%",h:4,r:2,tone:"soft"}),f(R,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:S("div",{style:{..._,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f("div",{style:{height:1,background:Fe.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(R,{w:"38%",h:5,r:2,tone:"soft"}),S("div",{style:{display:"flex",gap:5},children:[f(R,{w:14,h:5,r:2,tone:"soft"}),f(R,{w:14,h:5,r:2,tone:"soft"}),f(R,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:f("div",{style:{position:"absolute",inset:14,borderRadius:8,background:Fe.block}})};function wy({type:e}){let o=pD[e]??"",t=mD[o]??Cy[o]??Cy.fallback;return f("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{jsx as br,jsxs as xD}from"react/jsx-runtime";import{StylesIcon as ID}from"efficient-easel/rail";import{Tooltip as hD}from"efficient-shell/ui";function ky({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n}){let s=rr();return xD("div",{className:"sf-styles",children:[br(ja,{icon:br(ID,{}),title:l("Site styles"),context:br(hD,{content:l("{name} \u2014 renamed in the Console: {place}.",{name:s,place:l("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:br("span",{className:"sf-name-text",children:s})}),onHide:t}),br("div",{className:"sf-insp-body sf-scroll",children:br(tl,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n})})]})}import{jsx as Ee,jsxs as Ft,Fragment as vD}from"react/jsx-runtime";import{Fragment as zy,useEffect as Wy,useRef as md}from"react";import{useTreeDrag as Gy}from"efficient-easel/drag";import{GlobeIcon as wD,ImageIcon as kD,LocationIcon as TD,MapIcon as FD,TextLinesIcon as ED,TrashIcon as Uy}from"efficient-easel/icons";import{Subtree as $y,TreeRow as Oa,TreeRowAction as qy,TreeSeam as jy}from"efficient-easel/tree";import{useEaselStrings as PD}from"efficient-easel/strings";import{createPreviewSelectionContext as gD}from"efficient-easel/draw/client";var{Provider:MQ,useSelection:Ty}=gD("selectedLocationPartId");function Fy(e,o,t){return`${e}::${o}::${t}`}function Ey(e){if(!e)return null;let o=e.split("::");if(o.length<3)return null;let t=o[o.length-1];if(t!=="image"&&t!=="map")return null;let r=Number(o[o.length-2]);if(!Number.isInteger(r)||r<0)return null;let a=o.slice(0,-2).join("::");return a?{nodeId:a,index:r,part:t}:null}import{useSyncExternalStore as bD}from"react";var yD={level:"groups"},Ly=yD,fd=new Set;function uo(e){Ly=e;for(let o of fd)o()}function SD(e){return fd.add(e),()=>{fd.delete(e)}}var Py=()=>Ly;function Oy(){return bD(SD,Py,Py)}function Ry(e,o,t){let r=[];return e.forEach((a,n)=>{let s=o(a),i=r.find(c=>c.key===s);i||(i={key:s,name:t(a),items:[]},r.push(i)),i.items.push({item:a,index:n})}),r}function GQ(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 La=e=>String(e?.group??""),cd=new WeakMap,CD=0;function Kl(e){let o=cd.get(e);return o||(o=`loc${++CD}`,cd.set(e,o)),o}var Ay=(e,o)=>o||e||"Ungrouped",By={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
17
+ Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function Tt(e){return Ry(e,La,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var dd=e=>e.flatMap(o=>o.cards),_y=(e,o,t)=>Math.min(Math.max(e,o),t);function Vl(e,o,t){let r=0;for(let a=0;a<e.length;a++)if(La(e[a])===o){if(r===t)return a;r++}return-1}function ud(e,o,t){let r=Tt(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=_y(o<t?t-1:t,0,r.length);return r.splice(n,0,a),dd(r)}function pd(e,o,t,r,a){let n=Tt(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[c]=s.cards.splice(t,1),u=o===r?c:{...c,group:i.key,groupName:i.name};u!==c&&cd.set(u,Kl(c));let p=_y(s===i&&t<a?a-1:a,0,i.cards.length);return i.cards.splice(p,0,u),dd(n)}function Dy(e,o){let t=Tt(e),r=t.find(n=>n.key===o),a={...By,group:o,groupName:r?.name??""};return r?(r.cards.push(a),dd(t)):[...e,a]}function Ny(e){let o=new Set(Tt(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...By,group:r,groupName:""}],key:r}}function My(e,o){return e.filter(t=>La(t)!==o)}function Hy(e,o,t){let r=Vl(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function qQ(e,o,t){let r=e.flatMap((s,i)=>La(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 jQ(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>La(n)===r);return a.length?a:t(r)})}var Xl="ContactLocations",Yl=e=>({parentId:`locations-${e}`,slot:"groups"}),xd=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function Ky(e,o){let{readOnly:t,selected:r}=o,a=PD().tree,n=o.data?.content??[],s=e.kind===my.kind,i=md(null);Wy(()=>{let g=r?.type===Xl?String(r.props.id):null;g&&g!==i.current&&uo({level:"groups"}),i.current=g},[r?.props.id]);let{selectedLocationPartId:c,setSelectedLocationPartId:u,setSelectHandler:p}=Ty(),m=Oy(),x=(g,y)=>{let E=n[g];E&&o.replace(g,{type:E.type,props:{...E.props,locations:y}})},h=g=>{let y=n[g]?.props?.locations;return Array.isArray(y)?y:[]},b=Gy({keyOf:g=>`group:${g.si}:${g.index}`,readOnly:!!t,canDrop:(g,y)=>y.parentId===Yl(g.si).parentId&&y.slot==="groups",onDrop:(g,y)=>{x(g.si,ud(h(g.si),g.index,y.index)),m.level==="city"&&uo({level:"groups"})},onStep:(g,y)=>{x(g.si,ud(h(g.si),g.index,y<0?g.index-1:g.index+2)),m.level==="city"&&uo({level:"groups"})}}),C=Gy({keyOf:g=>`city:${g.si}:${g.group}:${g.index}`,readOnly:!!t,canDrop:(g,y)=>y.parentId===Yl(g.si).parentId&&y.slot.startsWith("cities:"),onDrop:(g,y)=>{let E=y.slot.slice(7);x(g.si,pd(h(g.si),g.group,g.index,E,y.index)),uo({level:"group",key:E})},onStep:(g,y)=>{x(g.si,pd(h(g.si),g.group,g.index,g.group,y<0?g.index-1:g.index+2)),m.level==="city"&&uo({level:"group",key:g.group})}}),k=md(n);k.current=n;let v=md(()=>{});Wy(()=>{p(g=>{let y=Ey(g);if(!y)return;let E=k.current.findIndex(F=>F.props?.id===y.nodeId);E<0||v.current(E,{level:y.part,index:y.index})})},[p]);let w=(g,y)=>{i.current=n[g]?.props?.id??null,o.select(g),uo(y),e.reveal();let E=n[g]?.props?.id;typeof E=="string"&&(y.level==="image"||y.level==="map")?u(Fy(E,y.index,y.level)):u(null),typeof E=="string"&&o.scrollTo(E)};return v.current=w,{renderLocationTree:(g,y,{rowClick:E,isCollapsed:F,toggleCollapse:L})=>{let B=h(y),O=Tt(B),M=String(g.props.id),re=s&&r?.props.id===M,H=A=>Ee(jy,{...t?{}:b.seam({place:{...Yl(y),index:A}})},`seam:${M}:groups:${A}`),W=(A,oe)=>Ee(jy,{...t?{}:C.seam({place:{...xd(y,A),index:oe}})},`seam:${M}:cities:${A}:${oe}`);return Ft(vD,{children:[Ee(Oa,{icon:Ee(ED,{size:13}),name:l("Texts"),words:a,onSelect:()=>w(y,{level:"texts"}),selected:re&&m.level==="texts",rowProps:{onClick:E(()=>w(y,{level:"texts"}))}}),O.map((A,oe)=>{let Oe=`${M}::grp::${A.key}`,Xe=F(Oe),ro=re&&m.level==="group"&&m.key===A.key,We=A.name||A.key?Ay(A.key,A.name):l("Ungrouped"),Re={...xd(y,A.key),index:A.cards.length},Ge=C.row({item:{si:y,group:A.key,index:-1},place:Re,into:Re,canDrag:!1},{onClick:E(()=>w(y,{level:"group",key:A.key}))}),De=b.row({item:{si:y,index:oe},place:{...Yl(y),index:oe}},Ge.rowProps);return Ft(zy,{children:[oe===0&&H(0),Ee(Oa,{icon:Ee(wD,{size:13}),name:We,words:a,onSelect:()=>w(y,{level:"group",key:A.key}),selected:ro,draggable:De.draggable,dragging:De.dragging,drop:De.drop??Ge.drop,fold:{open:!Xe,label:l("group"),onToggle:()=>L(Oe)},actions:Ee(qy,{kind:"delete",label:it("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",A.cards.length,{label:We}),onClick:()=>{x(y,My(B,A.key)),uo({level:"groups"})},children:Ee(Uy,{size:15})}),rowProps:De.rowProps,children:Ee("span",{className:"es-group-count",children:A.cards.length})}),!Xe&&Ft($y,{children:[A.cards.map((Ce,ge)=>{let Ie=Vl(B,A.key,ge),Ze=re&&m.level==="city"&&m.index===Ie,P=String(Ce?.name??"")||l("City"),le=`${M}::city::${Kl(Ce)}`,Y=F(le),{rowProps:te,...ae}=C.row({item:{si:y,group:A.key,index:ge},place:{...xd(y,A.key),index:ge}},{onClick:E(()=>w(y,{level:"city",index:Ie}))});return Ft(zy,{children:[ge===0&&W(A.key,0),Ee(Oa,{icon:Ee(TD,{size:13}),name:P,words:a,onSelect:()=>w(y,{level:"city",index:Ie}),selected:Ze,...ae,fold:{open:!Y,label:P,onToggle:()=>L(le)},actions:Ee(qy,{kind:"delete",label:l("Delete {name}",{name:P}),onClick:()=>{x(y,Hy(B,A.key,ge)),uo({level:"group",key:A.key})},children:Ee(Uy,{size:15})}),rowProps:te}),!Y&&Ft($y,{children:[Ee(Oa,{icon:Ee(kD,{size:13}),name:l("Image"),words:a,onSelect:()=>w(y,{level:"image",index:Ie}),selected:re&&m.level==="image"&&m.index===Ie,rowProps:{onClick:E(()=>w(y,{level:"image",index:Ie}))}}),Ee(Oa,{icon:Ee(FD,{size:13}),name:l("Map"),words:a,onSelect:()=>w(y,{level:"map",index:Ie}),selected:re&&m.level==="map"&&m.index===Ie,rowProps:{onClick:E(()=>w(y,{level:"map",index:Ie}))}})]}),W(A.key,ge+1)]},Kl(Ce))}),Ft("button",{type:"button",className:"sf-add-card",onClick:()=>{let Ce=Dy(B,A.key);x(y,Ce);let ge=Tt(Ce).find(Ie=>Ie.key===A.key);uo(ge&&ge.cards.length?{level:"city",index:Vl(Ce,A.key,ge.cards.length-1)}:{level:"group",key:A.key})},children:[Ee("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add city")]})]}),H(oe+1)]},Oe)}),Ft("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:A,key:oe}=Ny(B);x(y,A),w(y,{level:"group",key:oe})},children:[Ee("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add group")]})]})},sectionPressed:g=>{g?.type===Xl&&uo({level:"groups"})}}}import{useEffect as AD,useRef as BD}from"react";import{createNode as Xy,newId as Zy}from"efficient-easel/data";import{useEaselApi as _D}from"efficient-easel/easel";import{ROOT_ZONE as yr,missingPinnedTypes as DD,pinnedDuplicateIds as Id}from"efficient-easel/draw";import{resetForDocumentSwitch as LD,saveStatusForNewDocument as OD,saveStatusOf as RD}from"efficient-easel/screen/lib/document-switch";function Vy(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function Yy(e,o){let t=e.some(n=>n?.type===de),r=e[e.length-1],a=!t&&r?.type===me?r:null;return{remove:e.filter(n=>n?.type===me&&n!==a).map(n=>String(n.props?.id??"")).filter(Boolean),seedHeader:!e.some(n=>n?.type===Ve),seedFooter:o.hasChromeDoc&&!t&&!a}}function Qy(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:i}=Se(),{hasSiteSettings:c,hasPinnedChrome:u}=r,p=!!r.editsPinnedInPlace&&a!==_t,m=a===_t,x=_D().getState,h=BD(null);AD(()=>{if(!Vy({docId:n,saveStatus:i,seededDocId:h.current})||(h.current=n,!u))return;let b=x().appState.data,C=b.content,k=s?.content??[],v=(E,F)=>E.some(L=>L?.type===F);if(!c){let E=new Set(Id(C)),F=E.size?C.filter(B=>!E.has(B.props.id)):C;E.size&&e.setDocument({...b,content:F});let L=DD(F,k);if(L.includes(me)){let B=F.length,O=e.insertSection(me,B);e.replaceComponent(yr,B,{type:me,props:{id:O,blocks:zl()}})}L.includes(Ve)&&e.insertNode(yr,0,Hl());return}if(m){let E=hr(C);if(E!==C&&e.setDocument({...b,content:[...E]}),!E.find(F=>F.type===me)&&!v(k,me)&&!v(E,de)&&!v(k,de)){let F=(B,O)=>Xy(o,B,O),L={type:me,props:{blocks:zl()}};e.insertNode(yr,E.length,wa(L,F,Zy(de)))}return}if(p){let E=!!t?.pinnedChrome?.state().docId,F=Yy(C,{hasChromeDoc:E}),L=new Set([...F.remove,...Id(C.filter(O=>!F.remove.includes(String(O.props.id))))]),B=L.size?C.filter(O=>!L.has(String(O.props.id))):C;if(B.length!==C.length&&e.setDocument({...b,content:B}),F.seedFooter&&!v(k,me)&&!v(k,de)){let O=(re,H)=>Xy(o,re,H),M={type:me,props:{blocks:zl()}};e.insertNode(yr,B.length,wa(M,O,Zy(de)))}if(F.seedHeader&&!v(k,Ve)){let O=B[0]?.type==="SiteHeader"?1:0;e.insertNode(yr,O,Hl())}return}let w=C.filter(E=>E.type!==me),g=new Set(Id(w)),y=g.size?w.filter(E=>!g.has(E.props.id)):w;y.length!==C.length&&e.setDocument({...b,content:y}),!v(y,Ve)&&!v(k,Ve)&&e.insertNode(yr,0,Hl())},[n,i,s,x,e,c,u,m,p,t])}import{useEffect as oS,useState as tS}from"react";var Zl=new Map;async function ND(e,o){try{return(await Ue().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function Jy(e,o){let t=Zl.get(o);return t||(t=ND(e,o),Zl.set(o,t),t.catch(()=>{Zl.get(o)===t&&Zl.delete(o)})),t}var MD=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function hd(e){return!!e&&MD.test(e)}function eS(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===cn?"/":`/${encodeURIComponent(o)}`;if(!hd(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function rS(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=tS(null),[s,i]=tS(null),c=iu();oS(()=>i(c?new URL(c).hostname:window.location.hostname),[c]),oS(()=>{if(!hd(s)||!t||!r){n(null);return}let p=!1;return Jy(r,t).then(m=>{p||n(m)}),()=>{p=!0}},[s,t,r]);let u=eS({pageSlug:o,siteSlug:a,hostname:s});return c?`${c}${u}`:u}import{jsx as Ra,jsxs as HD}from"react/jsx-runtime";import{ExternalIcon as aS}from"efficient-easel/icons";import{Button as zD,Tooltip as nS,buttonClasses as WD}from"efficient-shell/ui";function GD({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 lS({liveHref:e,pageId:o,draftLink:t}){return t&&o?Ra(nS,{content:l("Open your saved draft in a new tab. Visitors don't see it."),children:Ra(zD,{variant:"secondary",onClick:()=>{GD({pageId:o,liveHref:e,draftLink:t})},rightIcon:Ra(aS,{size:15}),"aria-label":l("Preview your saved draft in a new tab"),children:l("Preview")})}):Ra(nS,{content:l("Preview the live site (opens in a new tab)"),children:HD("a",{className:WD({variant:"secondary"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:[l("Preview"),Ra(aS,{size:15})]})})}import{useCallback as KD,useEffect as VD,useRef as dS,useState as YD}from"react";import{useSyncExternalStore as UD}from"react";var $D=()=>()=>{},sS=()=>null;function Ql(e){return UD(e?e.subscribe:$D,e?e.state:sS,e?e.state:sS)}function Jl(){let{adapter:e}=Se();return e?.pinnedChrome}import{useSyncExternalStore as qD}from"react";var Sr=new Map,gd=new Set;function bd(e,o){if(!(Sr.has(e)&&Sr.get(e)===o)){Sr.set(e,o);for(let t of gd)t()}}function $J(e,o){bd(e,o)}function qJ(e,o){let t=Sr.get(e);bd(e,o??(t==="live"?"changed":t))}function jJ(e,o){bd(e,o??"live")}function KJ(e){return Sr.get(e)}function jD(e){return gd.add(e),()=>{gd.delete(e)}}function iS(e){let o=()=>e?Sr.get(e):void 0;return qD(jD,o,o)}function fS(e,o){return e==="live"&&o?"changed":e}function cS({live:e,onPress:o,busy:t=!1,pinnedUnpublished:r=!1}){let a=e==="live"&&!r,n=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:n,quiet:a?{label:l("Published"),reason:l("Everything is live")}:null,onPress:o,busy:t}}function uS(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a}=Se(),n=fS(iS(o??null),r),s=Ql(Jl()),[i,c]=YD(!1),u=dS(e);u.current=e;let p=dS(!0);VD(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=KD(()=>{c(!0),a(u.current).finally(()=>{p.current&&c(!1)})},[a]);if(t.canPublish)return cS({live:n,onPress:m,busy:i,pinnedUnpublished:s?.unpublished??!1})}var pS=["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:"BrandStrip",label:"Brand Strip",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:"TimelineTrack",label:"Milestone 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"},{type:"KeyFeatures",label:"Key Features",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"Countdown",label:"Countdown",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Series",label:"Recurring Columns",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"},{type:"DocMetaCards",label:"Document Detail Cards",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Spacer",label:"Spacer",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function eee(){return Object.fromEntries(Cr.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var XD={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns on phone`. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/puck/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/puck/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',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."},oee=["Grid"],tee=Array.from(new Set([...Cr.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(XD)])),ree=Object.fromEntries(Cr.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),ZD={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},es={...ZD,...Object.fromEntries(Cr.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function mS(e){return Object.prototype.hasOwnProperty.call(es,e)?es[e]:void 0}function yd(e){return Object.keys(es).filter(o=>es[o]===e).sort()}var aee=yd("general"),nee=yd("commerce"),lee=yd("service"),Sd="Flex",ot="Box",see=`${ot}es`;function QD(e){return e==="section"?"Blank section":ot}function Cd(e,o,t){return e===Sd?QD(o):t}var JD={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 xS(e){return JD[e]?.label}var IS=Sd;var eN={general:!0,commerce:!0,service:!0};function vd(e){let o=e?.sets;return o?Object.fromEntries(pS.map(t=>[t,o.includes(t)])):eN}function pee(e=ao()){return vd(e.blocks)}var vr="content",be="Flex",oN="Text & media",tN="Layout & structure",rN=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{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"}].map(e=>({...e,group:oN})),aN=(Cr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:tN})),hS=[...rN,...aN],wd=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:ot}],Iee=wd.map(e=>e.type),nN=1,lN=wd.filter(e=>e.type!=="HeroGroup");function sN(e){return e<nN?wd:lN}var iN={Flex:{slot:vr,choices:()=>hS},Grid:{slot:vr,choices:()=>hS},HeroGroup:{slot:vr,choices:sN}};function gS(e,o=0){let t=iN[e];return t?{slot:t.slot,choices:t.choices(o)}:null}function ze(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}function bS(e,o,t){return ze(be,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var fN={Manifesto:(e,o)=>({type:be,props:{...e(be),id:o(be),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[ze(be,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[ze("Eyebrow",e,o,{eyebrowLook:"plain"}),ze("Heading",e,o),ze("Text",e,o),ze("Stats",e,o)]}),bS(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:be,props:{...e(be),id:o(be),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[ze(be,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[ze("Eyebrow",e,o,{eyebrowLook:"plain"}),ze("Heading",e,o),ze("Text",e,o),ze("ButtonBlock",e,o)]}),bS(e,o,{direction:"column",name:"Image",content:[ze("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:be,props:{...e(be),id:o(be),direction:"column",name:"Subscribe",content:[ze("Heading",e,o),ze("Text",e,o),ze("Form",e,o)]}})};function os(e){return fN[e]??null}import{blockTypesIn as kd}from"efficient-easel/screen/lib/puck/block-types-in";import{newNodeId as yS}from"efficient-easel/draw";var cN="ImageBlock",dN=3,ts=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:yS(e),...t}}),uN=e=>({...e?.(be)??{},direction:"column",[vr]:[ts(cN,e),ts(be,e,{direction:"column",[vr]:[ts("Heading",e),ts("Text",e)]})]}),ko={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>Fg.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${ot.toLowerCase()}`,seeds:()=>[],addBlocked:Qa,notice:Rs},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${ot.toLowerCase()}`,seeds:()=>[],addBlocked:Qa,notice:Rs},ProcessSteps:{slot:"boxes",childType:be,addLabel:`Add ${ot.toLowerCase()}`,seeds:e=>Array.from({length:dN},()=>uN(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function Fee(e){for(let[o,t]of Object.entries(e)){if(o in ko&&ko[o]!==t)throw new Error(`lib/puck/slot-specs: "${o}" already has a slot spec`);ko[o]=t}}function Eee(e,o){let t=ko[e];return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:yS(t.childType),...r}}))}:null}var SS=()=>({}),CS=new Map;function pN(e){let o=CS.get(e);if(o)return o;let t=new Set,r=ko[e];if(r)for(let s of r.seeds(SS))for(let i of kd({type:r.childType,props:s}))t.add(i);let a=os(e);if(a){let s=0;for(let i of kd(a(SS,c=>`${c}-${s+=1}`)))t.add(i)}t.delete(e);let n=[...t].sort();return CS.set(e,n),n}function mN(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=vd(e),t=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),a=new Set(Object.keys(e.host??{})),n=c=>{if(r.has(c))return!1;if(a.has(c))return!0;let u=mS(c);return!u||!o[u]?!1:t?t.has(c):!0},s=new Map,i=c=>{let u=s.get(c);if(u!==void 0)return u;s.set(c,!1);let p=n(c)&&pN(c).every(i);return s.set(c,p),p};return{sets:o,offers:i}}var xN="block-offer";function Td(e=ao()){return e.cache(xN,()=>mN(kp(e)))}function vS(e,o=ao()){let t=Td(o);return t?t.offers(e):!0}function wS(e,o=0){let t=hN(e,o),r=t?Td():null;return t&&r?IN(t,r):t}function IN(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 hN(e,o){let t=ko[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let r=gS(e,o);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let a=Nb(e);return a?{source:"footer",slot:Db,choices:a,spec:null}:null}import{useSyncExternalStore as gN}from"react";var Fd=null,Ed=new Set;function kS(e){if(Fd!==e){Fd=e;for(let o of Ed)o()}}function bN(e){return Ed.add(e),()=>{Ed.delete(e)}}function qee(){return gN(bN,()=>Fd,()=>null)}function TS(e){return Br(e)?.ownerId??null}function FS(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 ES="sf-editor-left-view";function PS(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(ES);return e==="sections"||e==="styles"||e==="media"?e:"pages"}catch{return"pages"}}function LS(e){if(!(typeof window>"u"))try{window.localStorage.setItem(ES,e)}catch{}}function OS(e,o,t=!1){return e==="styles"&&!o||e==="media"&&!t?"sections":e}function RS(e,o){return e?"sections":o}var AS="Footer",yN=[_e,AS,de],wr=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Et=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},Aa=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},BS=e=>Br(e)?.ownerId??"";function _S(e){let o=hr(wr(e)),t=o.some(r=>r?.type===de);return o.filter(r=>r?.type===_e||r?.type===de||r?.type===AS&&!t)}function Pd(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=Aa(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(BS(s))||(n.add(s),r(i),a=!0)}}return t}function Ld(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(BS(a))?t:r)[a]=n;return{owned:t,rest:r}}function Qee(e,o){if(!o)return e;let t=_S(o);if(!t.length)return e;let r=t.filter(i=>i.type===_e),a=t.filter(i=>i.type!==_e),n={...e,content:[...r,...wr(e),...a]},{owned:s}=Ld(Et(o),Pd(t,Et(o)));return Object.keys(s).length&&(n.zones={...Et(e)??{},...s}),n}function Jee(e,o){if(!o)return{page:e,chrome:null};let t=_S(o),r=new Set(t.map(Aa).filter(w=>!!w)),a=[],n=[];for(let w of wr(e)){let g=Aa(w);g&&r.has(g)||Ir(w?.type)?n.push(w):a.push(w)}let s=new Map(n.map(w=>[Aa(w),w])),i=new Set,c=hr(wr(o)).flatMap(w=>{let g=Aa(w);if(!g||!r.has(g))return[w];let y=s.get(g);return y?(i.add(y),[y]):[]});for(let w of n)i.has(w)||c.some(g=>g?.type===w.type)||(c=w.type===_e?[w,...c]:[...c,w]);c=hr(c);let u=c.length===wr(o).length&&c.every((w,g)=>w===wr(o)[g]),p=Et(e),m=Pd(c,p),{owned:x,rest:h}=Ld(p,m),b=Ld(Et(o),Pd(t,Et(o))).owned,C={...o,content:u?o.content:[...c]},k=Et(o);if(k||Object.keys(x).length){let w={};for(let[g,y]of Object.entries(k??{}))g in b?g in x&&(w[g]=x[g]):w[g]=y;for(let[g,y]of Object.entries(x))g in w||(w[g]=y);C.zones=w,k&&SN(C.zones,k)&&(C.zones=k)}let v={...e,content:a};return p&&(Object.keys(h).length||!Object.keys(b).length?v.zones=h:delete v.zones),{page:v,chrome:C}}function SN(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 DS(e,o){return t=>e(t)||t!==void 0&&yN.includes(t)&&o()}var rs=null;function ooe(e){rs=e}function NS(){return!!(rs&&rs.state().lockHolder)}function kr(){return rs!==null}var CN=new Set(["BookingBox","SubmitBox"]);function vN(e){return typeof e=="string"&&CN.has(e)}var MS=DS(vN,NS);import{Fragment as Rd,jsx as ls,jsxs as qN}from"react/jsx-runtime";import{useMemo as jN,useRef as KS}from"react";import{EaselCanvas as KN,useEaselApi as VN}from"efficient-easel/easel";import{jsx as US,Fragment as RN,jsxs as AN}from"react/jsx-runtime";import{useEffect as $S,useLayoutEffect as BN}from"react";var as="data-theme",HS="light";function wN(e){return e.getAttribute(as)===HS?"light":"dark"}function kN(e,o){return wN(e)===o?!1:(o==="light"?e.setAttribute(as,HS):e.removeAttribute(as),!0)}function TN(e){return hs(e).getItem(cs)}function ioe(e,o){hs(e).setItem(cs,o)}function FN(e,o,t=new Date().getHours()){return Gd({mode:o.mode,override:TN(e),switchShown:o.switchShown,hour:t})}function zS(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>kN(t,FN(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[as]}),()=>n.disconnect()}var EN="style";function PN(e,o){let t=Yd(o),r=!1;for(let a of Vd){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function WS(e,o){let t=e.body;if(!t)return()=>{};let r=()=>PN(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[EN]}),()=>n.disconnect()}var LN=String.raw`(function (doc) {
18
+ if (doc.__sfFitWords) return;
19
+ var win = doc.defaultView;
20
+ var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
21
+ var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1;
22
+
23
+ function measure(el) {
24
+ var widest = 0, current = 0, last = null, split = false, lastBlock = null;
25
+ function blockOf(n) {
26
+ for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
27
+ var d = win.getComputedStyle(p).display;
28
+ if (d.indexOf("inline") !== 0 && d !== "contents") return p;
29
+ }
30
+ return el;
31
+ }
32
+ function close() { if (current > widest) widest = current; current = 0; last = null; }
33
+ var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
34
+ while ((node = walker.nextNode())) {
35
+ if (node.nodeType === 1) {
36
+ if (node.tagName === "BR" || node.tagName === "WBR") close();
37
+ continue;
38
+ }
39
+ var block = blockOf(node);
40
+ if (block !== lastBlock) close();
41
+ lastBlock = block;
42
+ var re = /(\S+)|(\s+)/g, m;
43
+ while ((m = re.exec(node.data))) {
44
+ if (m[2]) { close(); continue; }
45
+ range.setStart(node, m.index);
46
+ range.setEnd(node, m.index + m[0].length);
47
+ var rects = range.getClientRects();
48
+ for (var i = 0; i < rects.length; i++) {
49
+ var r = rects[i];
50
+ if (r.width <= 0) continue;
51
+ current += r.width;
52
+ if (last && r.top > last.top + last.height / 2) split = true;
53
+ last = r;
54
+ }
55
+ }
56
+ }
57
+ close();
58
+ return { widest: widest, split: split };
59
+ }
60
+
61
+ function lineWidth(el) {
62
+ var cs = win.getComputedStyle(el);
63
+ return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
64
+ - parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
65
+ }
66
+
67
+ // ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
68
+ // runs before React hydrates, and React 19 in development reports ANY
69
+ // attribute that differs from what it rendered ("a tree hydrated but some
70
+ // attributes didn't match"): first our inline font-size on the hero (which
71
+ // React owns via --heading-size), then, when that moved to a data-sf-fit
72
+ // attribute, the attribute itself. So the fitted size lives only in this
73
+ // script's own stylesheet, in <head>, addressed to each heading by its
74
+ // POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
75
+ // structure changes, so the rules are rewritten in the MutationObserver
76
+ // callback, which runs before the next paint. !important so the size also
77
+ // beats a part's own inline size.
78
+ var head = doc.head || doc.documentElement;
79
+ var fitEl = doc.createElement("style");
80
+ fitEl.id = "storefront-fit-words-sizes";
81
+ head.appendChild(fitEl);
82
+ var fitted = new Map(); // heading -> fitted size, e.g. "43.8px"
83
+
84
+ function pathOf(el) {
85
+ var parts = [];
86
+ for (var e = el; e && e.parentElement; e = e.parentElement) {
87
+ var i = 1, s = e;
88
+ while ((s = s.previousElementSibling)) i++;
89
+ parts.unshift("*:nth-child(" + i + ")");
90
+ }
91
+ return ":root>" + parts.join(">");
92
+ }
93
+ function writeRules() {
94
+ var css = "";
95
+ fitted.forEach(function (size, el) {
96
+ if (!el.isConnected) { fitted.delete(el); return; }
97
+ css += pathOf(el) + "{font-size:" + size + " !important}";
98
+ });
99
+ if (fitEl.textContent !== css) fitEl.textContent = css;
100
+ }
101
+
102
+ function unfit(el) {
103
+ if (fitted.delete(el)) writeRules();
104
+ }
105
+
106
+ function fits(el) {
107
+ var m = measure(el);
108
+ return !m.split && m.widest <= lineWidth(el) + SLACK;
109
+ }
110
+
111
+ function fit(el) {
112
+ unfit(el);
113
+ if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
114
+ if (fits(el)) return;
115
+ var set = parseFloat(win.getComputedStyle(el).fontSize);
116
+ if (!set) return;
117
+ var floor = Math.max(set * MIN_SCALE, MIN_PX);
118
+ if (floor >= set) return;
119
+ function size(px) { return Math.floor(px * 10) / 10 + "px"; }
120
+ // The SEARCH tries sizes on the element's own style and then puts that
121
+ // attribute back byte for byte (or removes it, if it had none), so nothing
122
+ // is left for React to see. A trial in a stylesheet instead restyles the
123
+ // whole page per step: a full pass on the Hartes home took 75–160ms at 4x
124
+ // CPU that way.
125
+ var hadStyle = el.hasAttribute("style"), origStyle = el.getAttribute("style");
126
+ function attempt(px) { el.style.setProperty("font-size", size(px), "important"); }
127
+ function done() { if (hadStyle) el.setAttribute("style", origStyle); else el.removeAttribute("style"); }
128
+ attempt(floor);
129
+ if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
130
+ var lo = floor, hi = set;
131
+ for (var i = 0; i < 8; i++) {
132
+ var mid = (lo + hi) / 2;
133
+ attempt(mid);
134
+ if (fits(el)) lo = mid; else hi = mid;
135
+ }
136
+ done();
137
+ fitted.set(el, size(lo));
138
+ writeRules();
139
+ }
140
+
141
+ // What each heading measured right after we last fitted it, so the
142
+ // ResizeObserver below can tell a real change (a font swap, a rotate, a
143
+ // container that moved) from the size change our own write just caused.
144
+ var seen = new WeakMap();
145
+ function remember(el) {
146
+ var b = el.getBoundingClientRect();
147
+ seen.set(el, b.width + "x" + b.height);
148
+ }
149
+ function fitAndRemember(el) { fit(el); remember(el); }
150
+
151
+ // ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
152
+ // WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
153
+ // fitted heading, and fonts.ready resolves only after that frame is painted —
154
+ // measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
155
+ // reported here is fitted in the same frame, so the broken state is never
156
+ // drawn. It also covers a container that resizes.
157
+ var ro = new win.ResizeObserver(function (entries) {
158
+ for (var i = 0; i < entries.length; i++) {
159
+ var el = entries[i].target;
160
+ var b = el.getBoundingClientRect();
161
+ if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
162
+ fitAndRemember(el);
163
+ }
164
+ });
165
+ // Its own set, not seen: fitAndRemember has written seen by the
166
+ // time watch runs, so a seen test observed no heading at all, and a
167
+ // heading fitted in the fallback face was never fitted again when the web
168
+ // font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
169
+ var watched = new WeakSet();
170
+ function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
171
+
172
+ function fitAll() {
173
+ var els = doc.querySelectorAll(SELECTOR);
174
+ for (var i = 0; i < els.length; i++) { fitAndRemember(els[i]); watch(els[i]); }
175
+ }
176
+
177
+ var queued = 0, all = false, touched = new Set();
178
+ function run() {
179
+ queued = 0;
180
+ if (all) { all = false; touched.clear(); fitAll(); return; }
181
+ var els = Array.from(touched);
182
+ touched.clear();
183
+ for (var i = 0; i < els.length; i++) if (els[i].isConnected) { fitAndRemember(els[i]); watch(els[i]); }
184
+ }
185
+ function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
186
+ function scheduleAll() { all = true; schedule(); }
187
+
188
+ fitAll();
189
+ // A backstop only: a font that changes widths without changing any
190
+ // heading's box is not seen by the ResizeObserver.
191
+ if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
192
+
193
+ // …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
194
+ // heading sized to its own text (fit-content, a flex item) keeps the SAME box
195
+ // when the phone turns to 844, so nothing reports a change and it would stay
196
+ // shrunk. The probe's rotate check caught exactly that.
197
+ var lastWidth = win.innerWidth;
198
+ function onResize() {
199
+ if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
200
+ lastWidth = win.innerWidth;
201
+ scheduleAll();
202
+ }
203
+ win.addEventListener("resize", onResize);
204
+
205
+ var mo = new win.MutationObserver(function (records) {
206
+ // Positions first: a node added or removed anywhere can shift the
207
+ // nth-child path of a fitted heading, and this callback runs before paint.
208
+ if (fitted.size) {
209
+ for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
210
+ }
211
+ for (var i = 0; i < records.length; i++) {
212
+ var r = records[i];
213
+ var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
214
+ var own = target && target.closest(SELECTOR);
215
+ if (own) touched.add(own);
216
+ for (var j = 0; j < r.addedNodes.length; j++) {
217
+ var n = r.addedNodes[j];
218
+ if (n.nodeType !== 1) continue;
219
+ if (n.matches(SELECTOR)) touched.add(n);
220
+ var inner = n.querySelectorAll(SELECTOR);
221
+ for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
222
+ }
223
+ }
224
+ if (touched.size) schedule();
225
+ });
226
+ mo.observe(doc.body, { childList: true, subtree: true, characterData: true });
227
+
228
+ doc.__sfFitWords = function stop() {
229
+ win.removeEventListener("resize", onResize);
230
+ ro.disconnect();
231
+ mo.disconnect();
232
+ if (queued) win.cancelAnimationFrame(queued);
233
+ fitted.clear();
234
+ fitEl.remove();
235
+ delete doc.__sfFitWords;
236
+ };
237
+ // For the probe and for debugging: which headings are fitted, at what size,
238
+ // and the sheet that holds it (disable it to read a heading's set size).
239
+ doc.__sfFitWords.fitted = fitted;
240
+ doc.__sfFitWords.sheet = fitEl;
241
+ })(document);`,ON="storefront-fit-words";function GS(e){let o=e.createElement("script");return o.id=ON,o.textContent=LN,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var _N=`
242
+ [${io}][${io}] { cursor: text; }
243
+ [${Ke}][${Ke}][${Ke}] {
244
+ outline: 1px solid ${Ia.accent};
245
+ outline-offset: 2px;
246
+ }
247
+ [${Ke}][${Ke}]:has([${Ke}]),
248
+ [data-puck-overlay-portal][data-puck-overlay-portal]:has([${Ke}]) {
249
+ outline: none;
250
+ }
251
+ [${Ke}][${Ke}][${Ke}][data-es-typing],
252
+ [data-es-typing] [${Ke}][${Ke}][${Ke}] {
253
+ outline: none;
254
+ }
255
+ `;function qS({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=Z(),n=Qe(t);return $S(()=>{if(o)return zS(o,{mode:r,switchShown:a})},[o,r,a]),$S(()=>{if(o)return WS(o,n)},[o,n]),BN(()=>{if(o)return GS(o)},[o]),AN(RN,{children:[US(Cu,{}),US("style",{children:_N}),e]})}import{jsx as Od}from"react/jsx-runtime";import{useEffect as DN,useState as NN}from"react";import{Banner as MN}from"efficient-shell/ui";var ns={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."},HN=ns.load,zN=ns.lock,WN=ns.conflict,GN=ns.save;function UN(e){return e?e.loadFailed?l(HN):e.lockHolder?l(zN,{name:e.lockHolder.name||l("Somebody else")}):e.conflict?l(WN):e.saveFailed?l(GN):null:null}function $N({report:e}){let o=UN(Ql(e)),[t,r]=NN(null);return DN(()=>{o||r(null)},[o]),!o||t===o?null:Od("aside",{className:"sf-canvas-notice",children:Od(MN,{tone:"warning",onDismiss:()=>r(o),children:o})})}function jS(){return Od($N,{report:Jl()})}import{usePreviewParts as VS}from"efficient-easel/draw/client";function YN({children:e,componentId:o}){let{selectedPartId:t}=VS();return sI(t,o)?ls(Rd,{}):ls(Rd,{children:e})}function YS(e){let{mirrorHostStyles:o}=vs(),t=wu(),r=KS(null),a=XN(r),{onDocument:n}=e,s=i=>{r.current=i,n?.(i)};return qN(Rd,{children:[ls(jS,{}),ls(KN,{...e,onDocument:s,typing:a,metadata:e.metadata??t,height:"fill",mirrorStyles:o,frameWrapper:qS,overlay:YN})]})}function XN(e){let o=VN(),t=qo(),r=VS(),a=KS({ops:t,parts:r});return a.current={ops:t,parts:r},jN(()=>{let n={getItemById:i=>o.getState().getItemById(i),getSelectorForId:i=>o.getState().getSelectorForId(i),get components(){return o.getState().config.components},replace:(i,c,u)=>a.current.ops.replaceComponent(i,c,u)},s=(i,c)=>{let u=nb(i,n);if(!u)return null;let p=c,m=()=>(p=lb(p,p?.ownerDocument??e.current,i),p),x=m();return x?{element:m,value:u.value,rules:u.rules,multiline:u.multiline,write:u.write,toolbar:{offered:u.offered,colors:u.offered.length>0?Rl(xb(x)):void 0}}:null};return{at:i=>{let c=i.closest(`[${io}]`),u=c?.getAttribute(io);return c&&u?s(u,c):null},atSelection:()=>{let i=a.current.parts.selectedPartId;return i?s(i,null):null},onChange:i=>{if(!i.typing){_c(null);return}let c=i.element.closest(`[${io}]`)?.getAttribute(io)??null;_c(c),c&&a.current.parts.selectedPartId!==c&&a.current.parts.select(c)}}},[o,e])}var XS={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 ZN="Save your page changes first";function ZS(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:ZN}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var QS="storefront-editor:save-as-template";var QN="plain",JS=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],JN="line",eM={KeyFeatures:"filled"};function Ba(e){return eM[e]??QN}function Uoe(e,o){return eo(JS,Ba(o),e)}function $oe(e){return eo(JS,JN,e)}var oM="inline",tM=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var tt={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"}},Tr="SectionHeader";function eC(e){return e in tt}function Voe(e){return eo(tM,oM,e)}var oC=new Set(["Flex"]);function Yoe(e){return!!e?.type&&oC.has(e.type)}var rM={not:{context:"parentType",in:[...oC]}};function Xoe(e,o,t){return Il(e,t,rM)}var aM={not:{field:"headPlacement",is:"own-box"}};function Zoe(e,o,t){return Il(e,t,aM)}function tC(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=os(e);return n?n(o,t):eC(e)&&a(be)&&a(Tr)?{type:be,props:{...o(be),id:t(be),direction:"column",name:`${r(e)} section`,content:[{type:Tr,props:{...o(Tr),id:t(Tr),...tt[e]?.headStyle?{headStyle:tt[e].headStyle}:{},...tt[e]?.headRowGap?{rowGap:tt[e].headRowGap}:{},...tt[e]?.headDescriptionSize?{descriptionSize:tt[e].headDescriptionSize}:{},...Ba(e)!==Ba(Tr)?{eyebrowLook:Ba(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:ko[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as nM,useState as lM}from"react";function rC(){let e=Ae().chrome?.products?.list,[o,t]=lM(null);return nM(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function fC({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=ul(),a=iC().tree,n=e,s=n.kind==="ticker"?n.heroId:null,i=Da(c=>{c&&(o({kind:"ticker",heroId:c}),GI(c))},[o]);return To(()=>{t(s)},[s,t]),To(()=>{r(i)},[r,i]),{partRows:(c,{rowClick:u})=>{let p=String(c.props.id);return c.type==="Hero"&&ue(sC,{icon:ue(vt,{type:"ticker",size:13}),name:l(na),onSelect:()=>i(p),selected:s===p,rowProps:{onClick:u(()=>i(p))},words:a})}}}function cC({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:r}=pl(),a=iC().tree,{appState:n}=IM(x=>x),s=n.data.content??[],i=sM(s);i.current=s;let c=e,u=la.find(x=>sa[x]===c.kind),p=u&&"nodeId"in c?ia(String(c.nodeId),u):null,m=Da(x=>{let h=kh(x);if(!h)return;let b=i.current.findIndex(k=>String(k.props.id)===h.nodeId);if(b<0)return;let C={kind:sa[h.part],nodeId:h.nodeId};o({index:b},C)},[o]);return To(()=>{t(p)},[p,t]),To(()=>{r(m)},[r,m]),{partRows:(x,{rowClick:h})=>{let b=String(x.props.id),C=wh(x);if(C.length===0)return null;let k=g=>{let y=ia(b,g.part);return ue(sC,{icon:ue(vt,{type:g.part==="media"?"heroMedia":"heroImage",size:13}),name:l(g.label),onSelect:()=>m(y),selected:p===y,rowProps:{onClick:h(()=>m(y))},words:a},y)},[v,...w]=C;return _a(lC,{children:[k(v),w.length>0&&ue(xM,{children:w.map(k)})]})}}}function dC(e,o){return{partRows:(t,r)=>_a(lC,{children:[e.partRows?.(t,r),o.partRows?.(t,r)]})}}function gM(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:i,notifyParent:c,token:u}=Se(),{hasPreviewLink:p}=t,m=Ue(Ae()).preview?.draftLink,x=uS(e.data),h=ZS({hasTrustedConsole:!!u,canCreatePlatformTemplate:i.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),b=Da(()=>{!a||!r||c(QS,{siteId:a,slug:r})},[c,a,r]),C=rS({pageSlug:r,siteId:a,token:u}),k=o.previewHref?.(r)??C;return{barLead:()=>h.visible&&ue(cM,{side:"bottom",content:h.enabled?l("Save this website as a platform template"):l(h.disabledReason),children:ue("span",{className:"sf-tip-disabled",tabIndex:h.enabled?void 0:0,children:ue(fM,{variant:"secondary",disabled:!h.enabled,onClick:b,rightIcon:ue(mM,{size:15}),children:l("Save as Template")})})}),barTrail:()=>p&&r&&ue(lS,{liveHref:k,pageId:n??null,draftLink:m}),mainAction:x}}function bM(){return _a("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[ue("path",{d:"M12 3a9 9 0 0 0 0 18 2.3 2.3 0 0 0 2.3-2.3c0-.55-.22-1.05-.57-1.42-.34-.37-.56-.87-.56-1.43A2.35 2.35 0 0 1 15.6 13.5H18a3 3 0 0 0 3-3c0-4.14-4-7.5-9-7.5z"}),ue("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),ue("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),ue("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function yM(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=Se(),{hasSiteTheme:i,explainsSiteSettings:c}=t,u=v=>o.setView(v),[p,m]=iM(or[0].id),{surface:x,setSurface:h}=uh(),b=()=>{if(i){u("styles"),o.reveal(),Ef();return}e.show(nd),e.reveal(),Ef()},C={id:"pages",label:l("Pages"),icon:ue(uM,{}),panel:({onHide:v})=>ue(ah,{activeSurface:x,onPreviewSurface:h,onNavigate:w=>{h(null),s(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:a??void 0})},onClose:v})},k=[];return!i&&c&&k.push({id:"appearance",label:l("Appearance"),icon:ue(bM,{}),active:e.kind==="website",onSelect:b}),i&&k.push({id:"styles",label:l("Site styles"),icon:ue(pM,{}),panel:({onHide:v,notify:w})=>ue(ky,{tokenRef:n,siteId:a??void 0,onClose:v,onNotify:w,tab:p,onTabChange:m})}),{railLead:[C],railTrail:k,resolveLeftView:(v,w)=>OS(v,i,w),openSettings:b,openStyles:()=>{m($I),u("styles")}}}function SM(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:i}=o;To(()=>{kS(s?.type==="BookingBox"&&s.props.region==="confirm"?TS(i(String(s.props.id))):null)},[s?.props.id]);let c=Ky(e,o),{capabilities:{hasSiteSettings:u}}=Se(),{setSelected:p,setSelectHandler:m}=Z(),{chat:x,setChat:h,setSelected:b,setSelectHandler:C}=dl(),k=a==="header";To(()=>{p(k)},[k,p]),To(()=>{m(()=>n(ad))},[m,n]);let v=Da(()=>n(xy),[n]),w=a==="chat";To(()=>{b(w)},[w,b]),To(()=>{C(v)},[C,v]);let{setOpenHandler:g}=aa(),y=Da(()=>n(Iy),[n]);To(()=>{g(y)},[g,y]);let E=dC(fC(e),cC(e)),F=gM(o),L=yM(e,r),B=t.device;return{...E,...F,...L,hasOwnRows:O=>O.type===Xl,ownRows:c.renderLocationTree,sectionPressed:c.sectionPressed,wrap:O=>ue(ws.Provider,{value:!0,children:ue(hM.Provider,{value:B,children:O})}),addPanelRow:O=>u?_a("div",{className:"sf-addside-sitewide",children:[ue("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:ue(vt,{type:"chat",size:16})}),_a("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{O(),v()},children:[l("Live chat"),ue("span",{className:"sf-addside-sitewide-desc",children:l("A chat bubble on every page")})]}),ue(dM,{checked:x.enabled,onChange:M=>h({enabled:M}),ariaLabel:l("Show the chat bubble on the whole site")})]}):void 0}}var aC=null,Ad=new WeakMap;function CM(e){let o=du();if(!e||!o)return e;aC!==o&&(aC=o,Ad=new WeakMap);let t=Ad.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},Ad.set(e,t)),t}var vM={isLockedBlock:MS,duplicateBlocked:Wl,nestDepth:(e,o,t)=>o===Ja?Gu(e,t):0,newSectionNode:tC,canAddTo:(e,o)=>CM(wS(e,o)),blockIsOffered:vS},wM=new Proxy(XS,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?l(t):t}}),kM={labelAtLevel:(e,o,t)=>l(Cd(e,o,t)),descriptions:wM,categoryLabel:e=>{let o=xS(e);return o===void 0?void 0:l(o)},firstSection:IS,blockRowName:FS,plainText:mt,Icon:vt,Thumbnail:wy,useProducts:rC},TM={desktop:2e3,tablet:800,mobile:390},nC="desktop",FM={options:ih,initial:nC,fluid:nC,widths:TM},EM={read:PS,write:e=>LS(e),forSelection:(e,o)=>RS(e,o)},PM={first:Ve,last:me,firstGroup:_e,lastGroup:de,isSectionGroup:Ir,sectionGroupZone:Mb,panelOf:e=>e===Ve?ad:null,get groupTab(){return kr()?$b:void 0},get groupBadge(){return kr()?qb():void 0},get changeNotice(){return kr()?jb():void 0},get band(){return kr()?LM:void 0},get groupAccepts(){return kr()?Gb:void 0}},LM={foldable:!0};function OM(e){return{...dC(fC(e),cC(e)),openSettings:()=>e.show(nd)}}var fre={useOwnerName:rr,useDocumentLabel:YI,useBridges:SM,useStandaloneBridges:OM,useDocumentPass:Qy,blockRules:vM,blockLook:kM,devices:FM,leftView:EM,pinned:PM,Canvas:YS,Inspector:gy};export{eee as a,oee as b,tee as c,ree as d,ot as e,vd as f,pee as g,Ue as h,kp as i,hS as j,Iee as k,kj as l,fg as m,Oj as n,xg as o,Rj as p,Ig as q,gg as r,Sg as s,Cg as t,$j as u,qj as v,jj as w,Kj as x,sA as y,Ku as z,rK as A,Xa as B,gv as C,yH as D,dt as E,SH as F,CH as G,Ja as H,Gu as I,Fee as J,Eee as K,mN as L,Mu as M,mv as N,uH as O,Ya as P,Hu as Q,xv as R,Iv as S,hv as T,xH as U,IH as V,hH as W,gH as X,Uf as Y,WL as Z,GL as _,UL as $,Il as aa,hl as ba,F8 as ca,_e as da,de as ea,HX as fa,Hb as ga,zb as ha,eo as ia,tt as ja,Voe as ka,Yoe as la,Xoe as ma,Zoe as na,of as oa,n5 as pa,l5 as qa,qs as ra,mt as sa,Hr as ta,Yn as ua,io as va,Ke as wa,XU as xa,QE as ya,JE as za,ZU as Aa,Qt as Ba,QU as Ca,JU as Da,uf as Ea,bI as Fa,Qn as Ga,l7 as Ha,s7 as Ia,i7 as Ja,f7 as Ka,N1 as La,fa as Ma,Vh as Na,Yh as Oa,Cl as Pa,q9 as Qa,j9 as Ra,K9 as Sa,V9 as Ta,_2 as Ua,H2 as Va,z2 as Wa,W2 as Xa,Be as Ya,Mm as Za,D6 as _a,Cn as $a,C0 as ab,H6 as bb,W6 as cb,w0 as db,G6 as eb,Wm as fb,vi as gb,wi as hb,X6 as ib,Q6 as jb,J6 as kb,ez as lb,oz as mb,qr as nb,Fi as ob,Ei as pb,cn as qb,qp as rb,Gr as sb,Vp as tb,R4 as ub,Ek as vb,A4 as wb,en as xb,Yu as yb,_H as zb,DH as Ab,Wv as Bb,NH as Cb,zH as Db,Zu as Eb,WH as Fb,Uv as Gb,GH as Hb,Kk as Ib,pn as Jb,n6 as Kb,ci as Lb,l6 as Mb,e0 as Nb,s6 as Ob,f6 as Pb,c6 as Qb,y6 as Rb,S6 as Sb,C6 as Tb,lm as Ub,e6 as Vb,o6 as Wb,t6 as Xb,r6 as Yb,n0 as Zb,xn as _b,u6 as $b,xm as ac,RM as bc,j as cc,l as dc,it as ec,xb as fc,Sl as gc,XV as hc,pb as ic,Dt as jc,Se as kc,_M as lc,Ae as mc,gC as nc,bC as oc,gs as pc,bk as qc,h4 as rc,Gp as sc,qo as tc,lH as uc,cH as vc,Bs as wc,_v as xc,OH as yc,qH as zc,ve as Ac,Ks as Bc,B5 as Cc,Mr as Dc,Ht as Ec,z5 as Fc,Zs as Gc,Qs as Hc,t3 as Ic,r3 as Jc,Cp as Kc,a3 as Lc,n3 as Mc,l3 as Nc,wp as Oc,GM as Pc,qM as Qc,Bt as Rc,Pp as Sc,Op as Tc,w4 as Uc,$p as Vc,Me as Wc,mu as Xc,YM as Yc,CC as Zc,XM as _c,ZM as $c,vC as ad,e2 as bd,wC as cd,o2 as dd,_t as ed,r2 as fd,a2 as gd,n2 as hd,l2 as id,$a as jd,s2 as kd,FC as ld,p2 as md,bu as nd,AC as od,BC as pd,_C as qd,Ss as rd,m2 as sd,Dk as td,Q4 as ud,m6 as vd,x6 as wd,I6 as xd,h6 as yd,g6 as zd,Fm as Ad,g0 as Bd,w6 as Cd,km as Dd,Tm as Ed,k6 as Fd,hn as Gd,gn as Hd,F6 as Id,Ut as Jd,yn as Kd,L6 as Ld,O6 as Md,R6 as Nd,Dm as Od,B6 as Pd,Qo as Qd,Do as Rd,Ai as Sd,Co as Td,pW as Ud,mW as Vd,xW as Wd,IW as Xd,yW as Yd,SW as Zd,GT as _d,CW as $d,vW as ae,wW as be,KT as ce,kW as de,TW as ee,FW as fe,He as ge,EW as he,XT as ie,PW as je,LW as ke,Yt as le,OW as me,En as ne,$t as oe,RW as pe,Cx as qe,Ln as re,On as se,AW as te,BW as ue,_W as ve,DW as we,NW as xe,MW as ye,HW as ze,zW as Ae,WW as Be,GW as Ce,UW as De,$W as Ee,Rn as Fe,An as Ge,Bn as He,Ni as Ie,_n as Je,qW as Ke,gt as Le,jW as Me,KW as Ne,VW as Oe,YW as Pe,XW as Qe,ZW as Re,Zo as Se,QW as Te,JW as Ue,Dn as Ve,eG as We,Mi as Xe,oG as Ye,tG as Ze,Hi as _e,rG as $e,Px as af,Lx as bf,Ox as cf,aG as df,_F as ef,nG as ff,lG as gf,Ye as hf,gr as if,__ as jf,Jb as kf,dZ as lf,uZ as mf,pZ as nf,mZ as of,xZ as pf,IZ as qf,hZ as rf,gZ as sf,bZ as tf,yZ as uf,SZ as vf,ml as wf,PL as xf,x8 as yf,I8 as zf,AL as Af,_L as Bf,ph as Cf,HL as Df,S8 as Ef,C8 as Ff,xh as Gf,v8 as Hf,Ih as If,B8 as Jf,cl as Kf,j$ as Lf,K$ as Mf,dl as Nf,SL as Of,r8 as Pf,aa as Qf,s8 as Rf,uh as Sf,$J as Tf,qJ as Uf,jJ as Vf,KJ as Wf,Qee as Xf,Jee as Yf,ooe as Zf,c8 as _f,p8 as $f,pl as ag,MQ as bg,Ty as cg,Fy as dg,k2 as eg,x7 as fg,I7 as gg,h7 as hg,g7 as ig,Rf as jg,Af as kg,yh as lg,D8 as mg,Sh as ng,jL as og,$f as pg,z8 as qg,W8 as rg,KL as sg,G8 as tg,ia as ug,kh as vg,U8 as wg,Fh as xg,v9 as yg,Bh as zg,Ic as Ag,hc as Bg,pR as Cg,mR as Dg,gc as Eg,hR as Fg,ua as Gg,wl as Hg,oj as Ig,vc as Jg,cj as Kg,dj as Lg,uj as Mg,lg as Ng,mA as Og,xA as Pg,IA as Qg,cK as Rg,dK as Sg,vA as Tg,kA as Ug,Dg as Vg,bK as Wg,yK as Xg,Ug as Yg,TK as Zg,Ia as _g,jg as $g,Pc as ah,Kg as bh,Vg as ch,OK as dh,Yg as eh,zA as fh,RK as gh,AK as hh,BK as ih,_K as jh,WA as kh,DK as lh,NK as mh,MK as nh,UA as oh,HK as ph,jA as qh,zK as rh,Oc as sh,fV as th,Bl as uh,aY as vh,_B as wh,yb as xh,DB as yh,Sa as zh,NB as Ah,MB as Bh,dY as Ch,kb as Dh,tX as Eh,rX as Fh,me as Gh,zl as Hh,uo as Ih,Oy as Jh,Ry as Kh,GQ as Lh,La as Mh,Ay as Nh,By as Oh,qQ as Ph,jQ as Qh,RD as Rh,Jy as Sh,hd as Th,eS as Uh,wS as Vh,qee as Wh,as as Xh,wN as Yh,kN as Zh,ioe as _h,g2 as $h,C2 as ai,QN as bi,JS as ci,JN as di,Ba as ei,Uoe as fi,$oe as gi,fre as hi};