efficient-storefront-blocks 0.0.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +397 -0
- package/LICENSE +10 -0
- package/README.md +279 -2
- package/dist/chunks/EditorPreviewCheckout-J27HMNBW.js +4 -0
- package/dist/chunks/PreviewFooter-BMBCVZQC.js +1 -0
- package/dist/chunks/SectionEditorShell-K4OEOAY4.js +1 -0
- package/dist/chunks/SiteEditorProvider-ECGZVKLG.js +1 -0
- package/dist/chunks/StorefrontEditorChrome-T6DTL7T7.js +1 -0
- package/dist/chunks/chunk-3J4FEDNZ.js +2 -0
- package/dist/chunks/chunk-6CP4D6VJ.js +1 -0
- package/dist/chunks/chunk-6XRKNA2E.js +1 -0
- package/dist/chunks/chunk-C2CHF6AL.js +15 -0
- package/dist/chunks/chunk-C2CHF6AL.js.LEGAL.txt +27 -0
- package/dist/chunks/chunk-ENDWECYV.js +1 -0
- package/dist/chunks/chunk-HVOO2GNE.js +1 -0
- package/dist/chunks/chunk-MYSIADXX.js +1 -0
- package/dist/chunks/chunk-NJXX5BI2.js +1 -0
- package/dist/chunks/chunk-RRHBLOH4.js +1 -0
- package/dist/chunks/chunk-TGIEMCNA.js +1 -0
- package/dist/chunks/chunk-THATLL5Z.js +230 -0
- package/dist/chunks/chunk-TOY67YUY.js +153 -0
- package/dist/chunks/chunk-TOY67YUY.js.LEGAL.txt +4 -0
- package/dist/chunks/chunk-UBWM4USZ.js +1 -0
- package/dist/chunks/chunk-Y6SLVHK3.js +1 -0
- package/dist/chunks/fitment-data-BXI7KQRZ.js +1 -0
- package/dist/chunks/gallery-builds-data-SWA6XKFF.js +1 -0
- package/dist/chunks/headers-VF4VTX37.js +1 -0
- package/dist/chunks/render-client-UQ5CUPRL.js +1 -0
- package/dist/contract.d.ts +48 -0
- package/dist/contract.js +1 -0
- package/dist/editor.css +1 -0
- package/dist/index.d.ts +721 -0
- package/dist/index.js +11361 -0
- package/dist/links.d.ts +86 -0
- package/dist/links.js +1 -0
- package/package.json +54 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as fr,b as qr}from"./chunk-MYSIADXX.js";import{B as Lr,C as Or,D as Me,E as Br,I as jo,J as Mr,L as Vo,M as Go,N as Ko,O as Uo,P as Hr,Q as Fr,R as $r,S as Wr,a as bt,b as Nt,c as Ms,i as nr,k as sr,m as lr,n as dr,o as cr,s as Wn,v as ur,x as xr,y as Sr,z as Ar}from"./chunk-3J4FEDNZ.js";import{a as lt,b as Oo,c as pr,d as mr,e as Fo,f as $o,g as dt,h as Wo,i as qo,j as _o,k as wr,l as kr,m as xe,n as Gn,o as Cr,p as Tr,q as Ir,r as Rr,s as Er,t as jr,u as Vr,v as Gr}from"./chunk-THATLL5Z.js";import{g as Bt,h as Ho,i as qn,j as _n,k as yr,n as hr,o as br,p as jn,q as vr,t as Vn}from"./chunk-NJXX5BI2.js";import{Bd as Ys,Bg as ar,Dg as me,Eg as Bo,F as nn,Fc as zt,Ff as er,Fg as gr,Ga as Hs,Gd as Xs,Gg as Mo,H as Es,Ha as Fs,Hd as zo,I as on,Ia as Hn,Jc as No,K as Mn,L as Eo,M as As,N as Ls,O as Dt,Oh as Pr,P as Ue,Q as ee,Qh as ye,R as T,Sh as Dr,T as Ao,Tc as qs,Tf as tr,Th as Nr,U as Ds,Uc as _s,Uh as zr,V as Ns,Wc as js,Z as zs,_ as Lo,ac as $s,dd as Vs,df as Qs,e as Is,fd as an,fg as $n,gd as Gs,h as Lt,hd as Ks,i as tn,l as Rs,la as Os,ld as Ot,m as Ps,ma as sn,oa as rn,pa as Do,pe as Ye,qe as Zs,ra as Bs,re as Js,ud as Us,vg as or,yg as ir,zg as rr}from"./chunk-C2CHF6AL.js";import{b as Fn}from"./chunk-HVOO2GNE.js";import{c as _r}from"./chunk-RRHBLOH4.js";import{Ma as Ws}from"./chunk-ENDWECYV.js";import"./chunk-6CP4D6VJ.js";import"./chunk-Y6SLVHK3.js";import{Fragment as Ft,useCallback as Se,useEffect as B,useLayoutEffect as Yd,useMemo as ci,useRef as te,useState as ie}from"react";import{PagesIcon as Xd,LayersIcon as Ma,StylesIcon as Zd,MediaIcon as Ha}from"efficient-easel/rail";import{LayersTree as Jd,Subtree as Je,TreeGroupLabel as Jn,TreeRow as fe,TreeRowAction as Qn,TreeSeam as pi}from"efficient-easel/tree";import{DeviceSwitch as Qd,EaselIconButton as Fa,EaselTopBar as ec,InspectorIconButton as tc,PanelResizeHandle as $a,SaveState as Wa,SaveStateToggle as nc,TopBarCluster as qa,TopBarDivider as oc,TopBarRail as ic}from"efficient-easel/chrome";import{ExternalIcon as sc,ImageIcon as rc,RedoIcon as ac,TextLinesIcon as lc,TrashIcon as ui,UndoIcon as dc}from"efficient-easel/icons";import{saveIndicator as cc}from"efficient-easel/autosave";import{EditNotice as Dl}from"efficient-easel/chrome";import{jsx as Nl}from"react/jsx-runtime";function Yo(){let{capabilities:o,access:r,takeOverEditing:a,viewReadOnly:m,saveConflict:g,reloadFromServer:y}=Ot();return o.hasEditGuard?Nl(Dl,{access:r,conflict:g,noun:"page",onTakeOver:a,onViewReadOnly:m,onReload:y}):null}import{DesktopIcon as zl,PhoneIcon as Ol,TabletIcon as Bl}from"efficient-easel/icons";import{jsx as Xo}from"react/jsx-runtime";var Ml={desktop:Xo(zl,{}),tablet:Xo(Bl,{}),mobile:Xo(Ol,{})},Kr=Zs.map(o=>({id:o,label:Js[o],icon:Ml[o]}));import{useEffect as Wl,useMemo as ia,useState as ql}from"react";import{useEasel as _l}from"efficient-easel/easel";import{AddPanel as jl}from"efficient-easel/drag";import{AddIcon as Vl}from"efficient-easel/icons";import{Fragment as Jr,jsx as t,jsxs as d}from"react/jsx-runtime";var J={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)"},Zo="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 x({w:o,h:r,tone:a="dark",r:m=2,style:g}){return t("div",{style:{width:o,height:r,borderRadius:m,background:J[a],flex:"none",...g}})}var Hl={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",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"},k={position:"absolute",inset:0},i={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)"},V=(o,r,a=160)=>({background:`linear-gradient(${a}deg,${o},${r})`});function Ze({size:o,style:r}){let a=Math.max(2,Math.round(o*.13)),m=(g,y,S)=>({position:"absolute",inset:g,background:y,borderRadius:a,...S?{mixBlendMode:S}:null});return d("span",{style:{position:"absolute",display:"block",width:o,height:o,...r},children:[t("span",{style:m("8% 26% 30% 6%",i.mark1)}),t("span",{style:m("26% 6% 8% 30%",i.mark2,"multiply")})]})}function dn({children:o}){return t("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:i.muted},children:o})}function Ur({over:o,overTone:r,head:a,headSize:m=11.5,cta:g,ctaBg:y,ctaFg:S,tone:P}){return d(Jr,{children:[o&&t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:r},children:o}),t("span",{style:{fontSize:m,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:P},children:a}),g&&t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:y,color:S},children:g})]})}function Jo({name:o,price:r}){return d("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[t("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...V(i.paper,i.paper2,150)},children:t(Ze,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),t("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:i.text},children:o}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:r})]})}function Xe({k:o,v:r,ok:a}){return d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${i.rule}`,fontSize:"3.98cqw",color:i.muted},children:[t("span",{children:o}),d("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("b",{style:{color:i.text,fontWeight:700},children:r}),a&&t("span",{style:{color:i.rust,fontWeight:700},children:"\u2713"})]})]})}function W({title:o,children:r}){return d("div",{style:{...k,background:i.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[t(dn,{children:o}),r]})}function Yr({size:o=14}){return t("span",{style:{width:o,height:o,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${i.mark1},${i.mark2})`}})}function Qo({filled:o=5,size:r=6}){return d("span",{style:{fontSize:r,letterSpacing:"0.06em",color:i.rust,lineHeight:1},children:["\u2605".repeat(o),t("span",{style:{color:i.mark1},children:"\u2605".repeat(5-o)})]})}function ln({n:o,label:r,tone:a=i.text}){return d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:a},children:o}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:a},children:r})]})}function oe({children:o,w:r}){return t("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:i.muted,width:r,display:"block"},children:o})}function Kn({label:o,w:r="100%",filled:a}){return d("div",{style:{width:r,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:o}),t("span",{style:{height:9,borderRadius:3,border:`1px solid ${i.rule}`,background:a?i.paper:i.card}})]})}function Xr({children:o}){return t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.text,color:i.onInk},children:o})}var Fl={wheelslisting:t(W,{title:"All wheels",children:t("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(([o,r,a])=>d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...V(i.paper,i.paper2,150)},children:t(Ze,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),t("b",{style:{flex:1,fontSize:"4.31cqw",color:i.text},children:o}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:r}),t("b",{style:{fontSize:"4.31cqw",color:i.text,width:26,textAlign:"right"},children:a})]},o))})}),catalogfilterbar:d("div",{style:{...k,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[d("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(o=>d("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:i.text,color:i.onInk,display:"flex",gap:4,alignItems:"center"},children:[o,t("span",{style:{opacity:.6},children:"\u2715"})]},o)),t("span",{style:{fontSize:"3.65cqw",color:i.rust,fontWeight:700},children:"Clear"})]}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"128 results"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted,border:`1px solid ${i.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:d("div",{style:{...k,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...V(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:i.onInk},children:"Will it fit your rig?"}),d("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(o=>d("span",{style:{flex:1,fontSize:"3.65cqw",color:i.text,background:i.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[o," ",t("span",{style:{color:i.muted},children:"\u25BE"})]},o)),t("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:i.warm,color:i.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:t(W,{title:"Tyres that suit",children:t("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(([o,r])=>d("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[t("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:i.ink},children:t("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${i.mark2}`,boxSizing:"border-box"}})}),t("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:i.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:o}),t("span",{style:{fontSize:"3.32cqw",color:i.muted},children:r})]},o))})}),tyresizes:t(W,{title:"Available sizes",children:t("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((o,r)=>t("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${r===0?i.rust:i.rule}`,color:r===0?i.rust:i.text,background:r===0?i.paper:i.card},children:o},o))})}),tyrefitment:d(W,{title:"Will it fit your car?",children:[t("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(o=>d("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:i.muted,background:i.paper,border:`1px solid ${i.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[o," ",t("span",{style:{color:i.muted},children:"\u25BE"})]},o))}),t("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(([o,r,a])=>d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${i.rule}`,paddingTop:3},children:[t("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:i.text},children:o}),t("span",{style:{fontSize:"3.32cqw",fontWeight:a?700:400,letterSpacing:"0.06em",color:a?i.warm:i.muted},children:r})]},o))})]}),eutyrelabel:d("div",{style:{...k,background:i.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([o,r],a)=>d("div",{style:{display:"flex",alignItems:"center",gap:3},children:[t("span",{style:{width:r,height:6,borderRadius:"0 2px 2px 0",background:a===1?i.rust:i.mark1}}),t("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:a===1?i.rust:i.muted},children:o})]},o))}),d("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[t("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:i.text},children:"72"}),t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:i.muted},children:"dB"})]})]}),bundleoffer:d("div",{style:{...k,background:i.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t(dn,{children:"Buy it with"}),d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(o=>t("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:i.card},children:t(Ze,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},o)),t("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:i.muted},children:"+"}),d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[t("span",{style:{fontSize:"3.65cqw",color:i.muted,textDecoration:"line-through"},children:"$1,024"}),t("b",{style:{fontSize:"6.02cqw",color:i.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:d("div",{style:{...k,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...V(i.ink,i.ink2)},children:[d("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:i.warm,fontWeight:700},children:"READY TO ORDER"}),t("b",{style:{fontSize:"6.63cqw",color:i.onInk,lineHeight:1},children:"$1,956"}),t("span",{style:{fontSize:"3.65cqw",color:i.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:i.warm,color:i.ink,flex:"none"},children:"CHECKOUT"})]}),contact:t(W,{title:"Who do you need?",children:t("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(([o,r])=>d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t("b",{style:{flex:1,fontSize:"4.31cqw",color:i.text},children:o}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:r}),t("span",{style:{fontSize:"4.64cqw",color:i.rust,lineHeight:1},children:"\u203A"})]},o))})}),contactlocations:t(W,{title:"Find us",children:t("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(([o,r,a])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:o}),t("span",{style:{fontSize:"3.32cqw",color:i.muted},children:r}),t("span",{style:{fontSize:"3.32cqw",color:i.rust,fontWeight:700},children:a})]},o))})}),form:t(W,{title:"Send us a message",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[d("div",{style:{display:"flex",gap:5},children:[t(Kn,{label:"Name"}),t(Kn,{label:"Email"})]}),t(Kn,{label:"Message",filled:!0}),t(Xr,{children:"SEND"})]})}),appointmentbooking:t(W,{title:"Book a fitting",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((o,r)=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:r===2?700:500,padding:"4px 0",borderRadius:3,background:r===2?i.text:i.paper,color:r===2?i.onInk:i.muted},children:o},o))}),t("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((o,r)=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${r===1?i.rust:i.rule}`,color:r===1?i.rust:i.muted,background:r===3?i.paper:i.card,textDecoration:r===3?"line-through":"none"},children:o},o))})]})}),reviewform:t(W,{title:"Leave a review",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t(Qo,{filled:4,size:14}),t(Kn,{label:"Your review",filled:!0}),t(Xr,{children:"POST"})]})}),submitbuild:t(W,{title:"Show us your build",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${i.mark1}`,borderRadius:5,background:i.paper},children:[t("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:i.rust,fontWeight:300},children:"+"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"Drop a photo of your rig"})]})}),masthead:d("div",{style:{...k,background:i.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[t("span",{style:{height:1.5,background:i.text}}),t("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:i.text,lineHeight:1},children:"THE TRACK"}),d("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:i.muted},children:[t("span",{children:"Issue 14"}),t("span",{children:"Spring 2026"})]}),t("span",{style:{height:1,background:i.rule}})]}),featuredcover:d("div",{style:{...k,overflow:"hidden",...V(i.ink,i.inkSoft2)},children:[t(Ze,{size:92,style:{right:-18,top:-14}}),t("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${i.scrim},transparent 62%)`}}),d("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.warm},children:"FEATURE"}),t("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:i.onInk},children:"Four days on the Madigan Line"})]})]}),longread:d("div",{style:{...k,background:i.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:i.rust},children:"12 MIN READ"}),t("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:i.text},children:"What breaks first, and why"}),t(oe,{children:"Every failure starts in the same place \u2014 not the rim, not"}),t(oe,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:t(W,{title:"Recurring columns",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([o,r])=>d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t("span",{style:{width:3,height:12,borderRadius:2,background:i.rust,flex:"none"}}),t("b",{style:{flex:1,fontSize:"4.64cqw",color:i.text},children:o}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:r})]},o))})}),events:t(W,{title:"Latest posts",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[i.inkSoft,i.inkSoft2,"Madigan Line, four days"],[i.rust,i.warm,"Why offset beats width"]].map(([o,r,a])=>d("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...V(o,r,150)}}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:a}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"4 Sep \xB7 Shed Notes"})]})]},a))})}),docmasthead:d("div",{style:{...k,background:i.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.muted},children:"POLICY"}),t("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:i.text,lineHeight:1.1},children:"Returns & refunds"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),t("span",{style:{height:2,width:26,background:i.rust,borderRadius:1}})]}),docbody:t("div",{style:{...k,background:i.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(([o,r])=>d("div",{style:{display:"flex",gap:5},children:[t("b",{style:{fontSize:"3.98cqw",color:i.rust,flex:"none"},children:o}),t(oe,{children:r})]},o))}),docmetacards:t(W,{title:"At a glance",children:t("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(([o,r])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[t("b",{style:{fontSize:"5.31cqw",color:i.text,lineHeight:1},children:o}),t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:r})]},r))})}),doctabs:d("div",{style:{...k,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[t("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((o,r)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:r===0?700:500,padding:"5px 8px",color:r===0?i.text:i.muted,background:r===0?i.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${r===0?i.rule:"transparent"}`,borderBottom:"none"},children:o},o))}),t("span",{style:{height:1,background:i.rule}}),d("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[t(oe,{children:"Unfitted wheels come back within 30 days, no questions."}),t(oe,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:d("div",{style:{...k,background:i.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[t("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:i.text},children:"The right wheel is the boring one."}),d("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[t(oe,{children:"Forged, correctly offset, rated for what you actually"}),t(oe,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:t(W,{title:"Key features",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(o=>d("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("span",{style:{fontSize:"4.64cqw",color:i.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),t("span",{style:{fontSize:"4.31cqw",color:i.text},children:o})]},o))})}),statsparagraph:d("div",{style:{...k,background:i.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[d("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[t(ln,{n:"27k",label:"Rigs"}),t(ln,{n:"4.9",label:"Rating"})]}),d("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[t(oe,{children:"Twelve years of fitting the same three questions, and the"}),t(oe,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:d(W,{title:"Load vs weight",children:[t("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((o,r)=>t("span",{style:{flex:1,height:`${o}%`,borderRadius:"2px 2px 0 0",background:r===4?i.rust:i.mark1}},r))}),t("span",{style:{height:1,background:i.rule,marginTop:-4}})]}),mockup:t("div",{style:{...k,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...V(i.inkSoft,i.ink)},children:d("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:i.card,boxShadow:`0 6px 14px ${i.scrim}`},children:[t("div",{style:{height:9,background:i.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(o=>t("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:i.mark1}},o))}),d("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[t("span",{style:{height:4,width:"56%",borderRadius:1,background:i.mark2}}),t("span",{style:{height:14,borderRadius:2,...V(i.paper,i.paper2,150)}}),t("span",{style:{height:3,width:"38%",borderRadius:1,background:i.rust}})]})]})}),manifesto:t("div",{style:{...k,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...V(i.ink,i.ink2)},children:d("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:i.onInk},children:["We build for the ",t("span",{style:{color:i.warm},children:"last"})," ten percent of the track."]})}),timeline:t(W,{title:"Our story",children:t("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(([o,r],a)=>d("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[a<2&&t("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:i.rule}}),t("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:i.rust,zIndex:1}}),d("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[t("b",{style:{fontSize:"4.64cqw",color:i.text},children:o}),t(oe,{children:r})]})]},o))})}),timelinetrack:d("div",{style:{...k,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...V(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"Milestones"}),d("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[t("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:i.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((o,r)=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[t("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:r===3?i.warm:i.mark1}}),t("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:r===3?i.warm:i.onInk,opacity:r===3?1:.75},children:o})]},o))]})]}),footprint:d("div",{style:{...k,overflow:"hidden",...V(i.paper,i.paper2,150)},children:[t("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:i.mark1,opacity:.75}}),t("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:i.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([o,r])=>t("span",{style:{position:"absolute",left:o,top:r,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:i.rust}},o)),t("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:i.text},children:"3 fitting bays"})]}),banner:d("div",{style:{...k,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:i.rust},children:[d("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t("b",{style:{fontSize:"6.02cqw",color:i.onInk},children:"End of season \xB7 20% off"}),t("span",{style:{fontSize:"3.98cqw",color:i.onInk,opacity:.8},children:"Fitted free, this month only."})]}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.onInk,color:i.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:d("div",{style:{...k,background:i.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[t("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:i.text},children:"Not sure what fits?"}),d("div",{style:{display:"flex",gap:5},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.text,color:i.onInk},children:"FIND MY FIT"}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${i.text}`,color:i.text},children:"CALL US"})]})]}),ticker:t("div",{style:{...k,overflow:"hidden",background:i.ink,display:"flex",alignItems:"center"},children:t("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:i.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),breadcrumb:t("div",{style:{...k,background:i.card,display:"flex",alignItems:"center",padding:"0 13px"},children:d("span",{style:{fontSize:"4.64cqw",color:i.muted},children:["Home ",t("span",{style:{opacity:.5},children:"/"})," Wheels ",t("span",{style:{opacity:.5},children:"/"})," ",t("span",{style:{color:i.text,fontWeight:700},children:"20 inch"})]})}),categorybar:d("div",{style:{...k,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[t("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((o,r)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:r===0?700:500,padding:"4px 7px",borderRadius:99,background:r===0?i.text:i.paper,color:r===0?i.onInk:i.muted},children:o},o))}),t("span",{style:{height:1,background:i.rule}})]}),intro:d("div",{style:{...k,overflow:"hidden",background:i.card},children:[t("div",{style:{position:"absolute",inset:0,...V(i.ink,i.inkSoft2)}}),t(Ze,{size:64,style:{right:8,top:6}}),d("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:i.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${i.scrim}`},children:[t("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:i.text},children:"Since 1998"}),t(oe,{children:"One shed, one lathe, one idea."}),t(oe,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:t(W,{title:"From our customers",children:t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[i.rust,i.warm],[i.inkSoft,i.ink],[i.paper2,i.mark2],[i.ink,i.inkSoft2],[i.warm,i.paper2],[i.mark2,i.inkSoft]].map(([o,r],a)=>t("div",{style:{borderRadius:3,...V(o,r,140+a*22)}},a))})}),gallery:d(W,{title:"Gallery",children:[t("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((o,r)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:r===0?700:500,color:r===0?i.text:i.muted,borderBottom:`1.5px solid ${r===0?i.rust:"transparent"}`,paddingBottom:2},children:o},o))}),t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[i.rust,i.warm],[i.ink,i.inkSoft],[i.paper2,i.mark2]].map(([o,r],a)=>t("div",{style:{borderRadius:3,...V(o,r,150+a*20)}},a))})]}),ordersummary:d(W,{title:"Order summary",children:[d("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[t("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...V(i.paper,i.paper2,150)},children:t(Ze,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:"Ridge Grappler"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),d("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(Xe,{k:"Subtotal",v:"$1,956"}),t(Xe,{k:"Fitting",v:"Free"}),d("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[t("b",{style:{color:i.text},children:"Total"}),t("b",{style:{color:i.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:t(W,{title:"Delivery",children:t("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(([o,r,a,m])=>d("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${m?i.rust:i.rule}`,background:m?i.paper:i.card},children:[t("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${m?i.rust:i.mark1}`,background:m?i.rust:"transparent"}}),t("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:i.text},children:o}),t("span",{style:{fontSize:"3.98cqw",color:i.muted},children:r}),t("b",{style:{fontSize:"4.31cqw",color:i.text},children:a})]},o))})}),paymentbadges:d("div",{style:{...k,background:i.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[t(dn,{children:"Ways to pay"}),t("div",{style:{display:"flex",gap:5},children:[["VISA",i.ink],["MC",i.rust],["AMEX",i.inkSoft],["PayPal",i.ink2]].map(([o,r])=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:i.onInk,borderRadius:3,padding:"6px 0",background:r},children:o},o))})]}),stats:d("div",{style:{...k,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...V(i.ink,i.ink2)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"By the numbers"}),d("div",{style:{display:"flex",gap:8},children:[t(ln,{n:"27k",label:"Rigs fitted",tone:i.onInk}),t(ln,{n:"12",label:"Years",tone:i.onInk}),t(ln,{n:"4.9",label:"Avg rating",tone:i.warm})]})]}),testimonials:d("div",{style:{...k,overflow:"hidden",background:i.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[t("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:i.rust,opacity:.16},children:"\u201D"}),t(Qo,{filled:5,size:7}),t("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:i.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t(Yr,{}),t("span",{style:{fontSize:"3.98cqw",color:i.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:d(W,{title:"Reviews",children:[t("div",{style:{display:"flex",gap:4,height:22},children:[[i.inkSoft,i.inkSoft2],[i.rust,i.warm],[i.ink,i.inkSoft],[i.mark2,i.mark1]].map(([o,r],a)=>t("div",{style:{flex:1,borderRadius:3,...V(o,r,140+a*15)}},a))}),t("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(([o,r,a])=>d("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[t(Yr,{size:12}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[d("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[t("b",{style:{fontSize:"3.98cqw",color:i.text},children:o}),t(Qo,{filled:r})]}),t(oe,{children:a})]})]},o))})]}),logos:d("div",{style:{...k,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...V(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"As fitted by"}),t("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(o=>t("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:i.onInk,opacity:.82},children:o},o))})]}),prose:d("div",{style:{...k,background:i.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:i.text},children:"Why offset matters"}),d("div",{style:{display:"flex",gap:6},children:[t("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:i.rust,marginTop:1},children:"T"}),d("div",{style:{display:"flex",flexDirection:"column"},children:[t(oe,{children:"he number on the back of your wheel decides whether the"}),t(oe,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:t(W,{title:"What you get",children:t("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(([o,r])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{width:11,height:11,borderRadius:3,background:i.rust,opacity:.9}}),t("b",{style:{fontSize:"3.98cqw",color:i.text},children:o}),t(oe,{children:r})]},o))})}),faq:t(W,{title:"Questions",children:t("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(([o,r])=>d("div",{style:{borderBottom:`1px solid ${i.rule}`,padding:"4px 2px"},children:[d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:o}),t("span",{style:{fontSize:"4.64cqw",color:i.muted,lineHeight:1},children:r?"\u2212":"+"})]}),r&&t(oe,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},o))})}),hero:d("div",{style:{...k,overflow:"hidden",...V(i.ink,i.ink2)},children:[t("div",{style:{...k,background:`linear-gradient(90deg,${i.scrim},transparent 70%)`}}),t("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:t(Ur,{over:"NEW \xB7 SUMMER",overTone:i.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:i.warm,ctaFg:i.ink,tone:i.onInk})}),t(Ze,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:d("div",{style:{...k,display:"flex",background:i.paper,overflow:"hidden"},children:[t("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:t(Ur,{over:"ALL-TERRAIN",overTone:i.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:i.text,ctaFg:i.onInk,tone:i.text})}),t("div",{style:{flex:1,position:"relative",...V(i.inkSoft,i.inkSoft2)},children:t(Ze,{size:74,style:{right:-14,top:16}})})]}),productgrid:t(W,{title:"Best sellers",children:d("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[t(Jo,{name:"Ridge 19",price:"$365"}),t(Jo,{name:"Ridge 29",price:"$410"}),t(Jo,{name:"Ridge 39",price:"$455"})]})}),collections:t(W,{title:"Shop by category",children:t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",i.inkSoft,i.inkSoft2],["Tyres",i.rust,i.warm],["Lift kits",i.ink,i.inkSoft]].map(([o,r,a])=>t("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:i.onInk,...V(r,a)},children:t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:o})},o))})}),producthero:d("div",{style:{...k,display:"flex",background:i.card,overflow:"hidden"},children:[t("div",{style:{flex:1.1,position:"relative",...V(i.paper,i.paper2,150)},children:t(Ze,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),d("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.rust},children:"NITTO"}),t("b",{style:{fontSize:"6.29cqw",color:i.text},children:"Ridge Grappler"}),t("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:i.text},children:"$489"}),t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:i.text,color:i.onInk},children:"ADD TO CART"})]})]}),spectable:t(W,{title:"Specifications",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(Xe,{k:"Diameter",v:'20"'}),t(Xe,{k:"Width",v:"9.0J"}),t(Xe,{k:"Offset",v:"+12"}),t(Xe,{k:"Load",v:"1250 kg"})]})}),fitmenttable:t(W,{title:"Will it fit?",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(Xe,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),t(Xe,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),t(Xe,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),brandstrip:d("div",{style:{...k,background:i.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[t(dn,{children:"Brands we carry"}),t("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["NITTO","BFG","FUEL","TOYO"].map(o=>t("span",{style:{fontSize:"4.64cqw",fontWeight:800,letterSpacing:"0.1em",color:i.mark2},children:o},o))})]}),processsteps:d("div",{style:{...k,background:i.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[t(dn,{children:"How it works"}),t("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((o,r)=>d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{width:11,height:11,borderRadius:"50%",background:i.text,color:i.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:r+1}),t("span",{style:{fontSize:"3.98cqw",color:i.text,fontWeight:600},children:o})]},o))})]}),detailrows:t("div",{style:{...k,background:i.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(([o,r,a])=>{let m=t("div",{style:{flex:1,...V(a?i.rust:i.inkSoft,a?i.warm:i.inkSoft2)}},"art"),g=d("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[t("b",{style:{fontSize:"4.64cqw",color:i.text},children:o}),t("span",{style:{fontSize:"3.98cqw",color:i.muted,lineHeight:1.3},children:r})]},"tx");return t("div",{style:{flex:1,display:"flex",minHeight:0},children:a?[g,m]:[m,g]},o)})}),specstrip:t("div",{style:{...k,background:i.ink,color:i.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([o,r])=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[t("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:o}),t("span",{style:{fontSize:"3.65cqw",color:i.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:r})]},r))})},Zr={subscribe:d("div",{style:{...k,padding:13,display:"flex",flexDirection:"column"},children:[d("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t(x,{w:8,h:8,r:2,tone:"accent"}),t(x,{w:38,h:7,r:3,tone:"dark"}),t(x,{w:16,h:7,r:3,tone:"accent"})]}),t(x,{w:38,h:4,r:2,tone:"soft"})]}),t("div",{style:{height:1,background:J.line,marginBottom:10}}),d("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${J.line}`,borderRadius:7,padding:10},children:[d("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[t(x,{w:"46%",h:3,r:2,tone:"accent"}),t(x,{w:"84%",h:8,r:4,tone:"dark"}),t(x,{w:"56%",h:8,r:4,tone:"accent"}),t(x,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),d("div",{style:{display:"flex",gap:5,marginTop:4},children:[t("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${J.line}`,background:J.block}}),t(x,{w:34,h:13,r:5,tone:"accent"})]})]}),d("div",{style:{flex:1,background:J.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[t(x,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((o,r)=>d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:r?`1px solid ${J.line}`:"none",paddingTop:r?4:0},children:[t(x,{w:34,h:4,r:2,tone:"dark"}),t(x,{w:16,h:3,r:2,tone:"soft"})]},r))]})]})]}),split:d("div",{style:{...k,display:"flex"},children:[t("div",{style:{width:"44%",background:Zo}}),d("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(x,{w:"44%",h:5,r:3,tone:"accent"}),t(x,{w:"88%",h:8,r:4,tone:"dark"}),t(x,{w:"70%",h:8,r:4,tone:"dark"}),t(x,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),t(x,{w:"80%",h:5,r:2,tone:"soft"}),t(x,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:d(Jr,{children:[t(x,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),d("div",{style:{...k,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[d("div",{style:{display:"flex",alignItems:"center",gap:9},children:[t(x,{w:16,h:16,r:4,tone:"accent"}),t(x,{w:"20%",h:9,r:4,tone:"dark"})]}),t(x,{w:"62%",h:10,r:5,tone:"dark"}),t(x,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:t("div",{style:{...k,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:d("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t(x,{w:"22%",h:12,r:4,tone:"dark"}),d("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[t(x,{w:26,h:6,r:3,tone:"soft"}),t(x,{w:26,h:6,r:3,tone:"soft"}),t(x,{w:26,h:6,r:3,tone:"soft"}),t(x,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:d("div",{style:{...k,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[d("div",{style:{display:"flex",gap:14},children:[d("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[t(x,{w:"60%",h:9,r:4,tone:"dark"}),t(x,{w:"90%",h:5,r:2,tone:"soft"}),t(x,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(o=>d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[t(x,{w:"50%",h:6,r:3,tone:"dark"}),t(x,{w:"80%",h:5,r:2,tone:"soft"}),t(x,{w:"66%",h:5,r:2,tone:"soft"})]},o))]}),t("div",{style:{height:1,background:J.line}}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t(x,{w:"30%",h:5,r:2,tone:"soft"}),t(x,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:t("div",{style:{...k,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((o,r)=>t("div",{style:{borderRadius:6,background:J.block}},r))}),blanksection:t("div",{style:{...k,padding:14,display:"flex"},children:d("div",{style:{flex:1,border:`1px dashed ${J.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[t(x,{w:14,h:2,r:1,tone:"tint"}),t(x,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:d("div",{style:{...k,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[t(x,{w:"100%",h:6,r:3,tone:"soft"}),t(x,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),t(x,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:t("div",{style:{...k,padding:14,display:"flex",alignItems:"center"},children:t(x,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:d("div",{style:{...k,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:Zo},children:[t(x,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),t(x,{w:16,h:10,r:3,tone:"accent"}),t(x,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:t("div",{style:{...k,padding:14,display:"flex",alignItems:"center"},children:t(x,{w:"64%",h:13,r:4,tone:"dark"})}),text:d("div",{style:{...k,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(x,{w:"100%",h:6,r:3,tone:"soft"}),t(x,{w:"96%",h:6,r:3,tone:"soft"}),t(x,{w:"100%",h:6,r:3,tone:"soft"}),t(x,{w:"58%",h:6,r:3,tone:"soft"})]}),image:t("div",{style:{position:"absolute",inset:14,borderRadius:7,background:Zo}}),button:t("div",{style:{...k,display:"flex",alignItems:"center",justifyContent:"center"},children:t(x,{w:"34%",h:16,r:8,tone:"accent"})}),menu:d("div",{style:{...k,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(x,{w:"48%",h:7,r:3,tone:"dark"}),t(x,{w:"82%",h:5,r:2,tone:"soft"}),t(x,{w:"66%",h:5,r:2,tone:"soft"}),t(x,{w:"74%",h:5,r:2,tone:"soft"}),t(x,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:d("div",{style:{...k,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[t(x,{w:"56%",h:8,r:3,tone:"dark"}),d("div",{style:{display:"flex",gap:6},children:[t("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${J.line}`}}),t(x,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:t("div",{style:{...k,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(o=>t(x,{w:16,h:16,r:8,tone:"dark"},o))}),search:t("div",{style:{...k,padding:"0 18%",display:"flex",alignItems:"center"},children:d("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${J.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[t("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${J.dark}`}}),t(x,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:d("div",{style:{...k,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[t("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${J.dark}`}}),t("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${J.dark}`},children:t(x,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:d("div",{style:{...k,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[d("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${J.line}`},children:[t(x,{w:22,h:6,r:2,tone:"dark"}),t(x,{w:6,h:4,r:1,tone:"soft"})]}),d("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${J.line}`},children:[t(x,{w:"80%",h:4,r:2,tone:"accent"}),t(x,{w:"64%",h:4,r:2,tone:"soft"}),t(x,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:d("div",{style:{...k,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[t("div",{style:{height:1,background:J.line}}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t(x,{w:"38%",h:5,r:2,tone:"soft"}),d("div",{style:{display:"flex",gap:5},children:[t(x,{w:14,h:5,r:2,tone:"soft"}),t(x,{w:14,h:5,r:2,tone:"soft"}),t(x,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:t("div",{style:{position:"absolute",inset:14,borderRadius:8,background:J.block}})};function Un({type:o}){let r=Hl[o]??"",a=Fl[r]??Zr[r]??Zr.fallback;return t("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:a})}var $l={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 Qr(o,r={}){let a=o.categories??{},m=o.components,g=[];for(let[y,S]of Object.entries(a))for(let P of S?.components??[]){let C=m[P];if(!C)continue;let M=C.label??P,D=Lt(P,"section",M);g.push({type:P,cat:y,catLabel:ei(o,y),name:D,desc:r[P]??"",...D===M?{}:{alias:M}})}return g}function ei(o,r){return $l[r]?.label??o.categories?.[r]?.title??r}var ea=Is;function ta(o){return o.find(r=>r.type===ea)??null}function na(o){return o.filter(r=>r.type!==ea)}import{SettingsSwitch as Gl}from"efficient-easel/panel";var oa={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.",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."};import{Fragment as Xl,jsx as He,jsxs as Yn}from"react/jsx-runtime";var Kl=o=>`section:${o}`,Ul=o=>`block:${o}`,Yl=o=>`template:${o}`;function ti({blocks:o,blocksOnly:r,at:a,onAdd:m,itemFor:g,session:y,siteWide:S,onClose:P,onHide:C,readOnly:M}){let D=_l(E=>E.config),H=zt(),[Y,we]=ql([]);Wl(()=>{let E=!1,K=zs(H);return fr.list().then(F=>{if(E)return;let _=D.components;we(F.filter(X=>X.node?.type&&_[X.node.type]&&(!K||Ps(X.node).every(K.offers))))}).catch(()=>{}),()=>{E=!0}},[D,H]);let Ae=ia(()=>Qr(D,oa),[D]),ke=E=>Lt(E,"section",D.components[E]?.label??E),re=E=>({type:Kl(E.type),label:E.name,cover:He(Un,{type:E.type}),title:E.desc?`${E.name} \u2014 ${E.desc}`:`Add ${E.name}`,keywords:[E.alias??"",E.desc,E.type,E.catLabel].filter(Boolean)}),Le=ia(()=>{let E=[];if(o&&o.choices.length>0&&gr(o.choices).forEach((_,X)=>{E.push({title:X===0?`Inside ${o.parentName}${_.group?` \xB7 ${_.group}`:""}`:_.group??"",tiles:_.items.map(ne=>({type:Ul(ne.type),label:ne.label,icon:He(me,{type:ne.type,size:18}),title:`Add ${ne.label}`}))})}),r)return E;let K=ta(Ae);K&&E.push({title:"Start blank",tiles:[re(K)]}),Y.length>0&&E.push({title:"Your templates",tiles:Y.map(_=>({type:Yl(_.id),label:_.name,cover:He(Un,{type:_.node.type}),keywords:[ke(_.node.type),_.node.type]}))});let F=na(Ae);for(let _ of Object.keys(D.categories??{})){let X=F.filter(ne=>ne.cat===_);X.length!==0&&E.push({title:ei(D,_),tiles:X.map(re)})}return E},[o,r,Y,Ae,D]),Ce=E=>{let K=E.indexOf(":"),F=E.slice(0,K),_=E.slice(K+1);if(F==="section")return{kind:"section",type:_};if(F==="block")return{kind:"block",type:_};if(F==="template"){let X=Y.find(ne=>ne.id===_);return X?{kind:"template",template:X}:null}return null};return Yn(Xl,{children:[He(lt,{icon:He(Vl,{size:15}),title:"Add",context:r?"Blocks for this place":"Sections and blocks",actions:He(pr,{label:"Done",description:"Close Add and go back",onClick:P}),onHide:C}),Yn("div",{className:"sf-addside sf-scroll",children:[He(jl,{groups:Le,session:y,itemFor:E=>g(Ce(E)??{kind:"section",type:E}),onInsert:E=>{let K=Ce(E);K&&m(K)},at:a,hint:r?"Drag into the page, or click to add.":"Drag onto the page, or click to add.",searchLabel:r?"Search blocks":"Search sections",readOnly:M}),S&&!r?Yn("div",{className:"sf-addside-sitewide",children:[He("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:He(me,{type:"chat",size:16})}),Yn("button",{type:"button",className:"sf-addside-sitewide-name",onClick:S.onOpenChat,children:["Live chat",He("span",{className:"sf-addside-sitewide-desc",children:"A chat bubble on every page"})]}),He(Gl,{checked:S.chatEnabled,onChange:S.onToggleChat,ariaLabel:"Show the chat bubble on the whole site"})]}):null]})]})}import{useCallback as Zl,useEffect as sa,useMemo as ra,useState as vt}from"react";import{InspectorIconButton as Jl}from"efficient-easel/chrome";import{AddIcon as Ql}from"efficient-easel/icons";import{PagesIcon as ed}from"efficient-easel/rail";import{jsx as L,jsxs as Ee}from"react/jsx-runtime";var aa="sf-editor-pages-collapsed-groups",td=o=>o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),la=(o,r)=>{let a=td(o)||"page";if(!r.has(a))return a;let m=2;for(;r.has(`${a}-${m}`);)m+=1;return`${a}-${m}`};function ni({onNavigate:o,onClose:r,activeSurface:a,onPreviewSurface:m}){let g=zt().chrome?.pageRows,y=Fn(),{adapter:S,capabilities:P,ready:C,currentSlug:M}=Ot(),D=jn(),[H,Y]=vt(null),[we,Ae]=vt(""),[ke,re]=vt(!1),[Le,Ce]=vt(null),[E,K]=vt(!1),[F,_]=vt(""),X=Zl(async()=>{if(C)try{Y(await S.listPages())}catch{Y([])}},[S,C]);sa(()=>{Y(null),X()},[X]);let[ne,pn]=vt(()=>{if(typeof window>"u")return new Set;try{let u=window.localStorage.getItem(aa);return new Set(u?JSON.parse(u):[])}catch{return new Set}});sa(()=>{try{window.localStorage.setItem(aa,JSON.stringify([...ne]))}catch{}},[ne]);let to=u=>pn(U=>{let N=new Set(U);return N.has(u)?N.delete(u):N.add(u),N}),pt=ra(()=>Sr(H??[]),[H]),$t=we.trim().toLowerCase(),un=u=>!$t||u.toLowerCase().includes($t),xt=u=>$t?!0:!ne.has(u),fn=ra(()=>new Set((H??[]).map(u=>u.slug)),[H]),le=()=>{if(P.pageCreationInAdminForm){y.send("storefront-editor:new-page");return}_(""),Ce(null),K(!0)},j=async()=>{let u=F.trim();if(!(!u||!C||ke||!S.createPage)){re(!0),Ce(null);try{let U=await S.createPage({slug:la(u,fn),title:u,layout:{}});await X(),K(!1),_(""),o(U.slug)}catch{Ce("Couldn\u2019t add the page \u2014 please retry.")}finally{re(!1)}}},Fe=async u=>{if(!(!C||ke||!S.deletePage||(H??[]).length<=1)){re(!0);try{await S.deletePage(u.id);let U=(H??[]).filter(N=>N.id!==u.id);Y(U),Ce(null),u.slug===M&&U[0]&&o(U[0].slug)}catch{Ce("Couldn\u2019t delete the page \u2014 please retry.")}finally{re(!1)}}},G=u=>y.send("storefront-editor:open-page",{slug:u}),St=u=>{if(!un(u.label))return null;let U=!a&&u.slug===M,N=P.canDeletePagesInline&&(H??[]).length>1;return Ee("div",{className:`sf-row sf-prow ${U?"is-selected":""}`,onClick:()=>o(u.slug),children:[L("span",{className:"sf-chip",children:L(nd,{})}),L("span",{className:"sf-row-name",children:u.label}),xr(u)&&L("span",{className:"sf-badge-dynamic",children:"Dynamic"}),u.kind==="lightbox"&&L("span",{className:"sf-badge-lightbox",children:"Lightbox"}),u.draft&&L("span",{className:"sf-page-draft",children:"draft"}),P.pageCreationInAdminForm&&L("button",{type:"button",className:"sf-page-edit",title:`Edit \u201C${u.label}\u201D in the admin`,"aria-label":`Edit ${u.label} in the admin`,onClick:ce=>{ce.stopPropagation(),G(u.slug)},children:L(Ye,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),N&&L("button",{type:"button",className:"sf-page-edit sf-page-edit--danger",disabled:ke,title:`Delete \u201C${u.label}\u201D`,"aria-label":`Delete ${u.label}`,onClick:ce=>{ce.stopPropagation(),Fe(u)},children:L(Ye,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]},u.id)},ae=(u,U,N)=>{let ce=N.filter(Boolean);if(ce.length===0)return null;let De=xt(u);return Ee("div",{className:"sf-pgroup",children:[Ee("button",{type:"button",className:"sf-pgroup-head","aria-expanded":De,onClick:()=>to(u),children:[L(Ye,{name:"chevron-right",size:10,strokeWidth:2.6,rounded:!0,style:{transform:De?"rotate(90deg)":"none",transition:"transform 0.14s"}}),L("span",{className:"sf-pgroup-label",children:U}),L("span",{className:"sf-pgroup-count",children:ce.length})]}),De&&L("div",{className:"sf-pgroup-body",children:ce})]},u)},de=(g?.rows??[]).filter(u=>un(u.label)).map(u=>{let U=a===u.key;return Ee("div",{className:`sf-row sf-prow sf-prow--shop ${U?"is-selected":""}`,onClick:()=>m(u.key),title:`Preview the ${u.label} in the canvas`,children:[L("span",{className:"sf-chip",children:u.icon}),L("span",{className:"sf-row-name",children:u.label}),L("span",{className:"sf-badge-preview",children:"Preview"}),L("a",{className:"sf-page-edit",href:u.href,target:"_blank",rel:"noopener noreferrer",title:`Open the ${u.label} in a new tab`,"aria-label":`Open the ${u.label} in a new tab`,onClick:N=>N.stopPropagation(),children:L(Ye,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})})]},u.key)}),wt=P.hasSiteSettings&&!!g,ut=(()=>{if(H===null)return null;let u=[],U=!1;for(let N of pt)wt&&!U&&N.key.startsWith("system:")&&(u.push(ae("shop",g.title,de)),U=!0),u.push(ae(N.key,N.label,N.rows.map(St)));return wt&&!U&&u.push(ae("shop",g.title,de)),u})();return Ee("div",{className:"sf-pages",children:[L(lt,{icon:L(ed,{}),title:"Pages",context:D,actions:L(Jl,{label:"New page",onClick:le,children:L(Ql,{size:15})}),onHide:r}),Ee("div",{className:"sf-pages-search",children:[L(Ye,{name:"search",size:14,rounded:!0}),L("input",{type:"search",className:"sf-pages-search-input",placeholder:"Search all pages\u2026",value:we,onChange:u=>Ae(u.target.value),"aria-label":"Search all pages"})]}),Ee("div",{className:"sf-pages-list sf-scroll",children:[Le&&!E&&L("div",{className:"sf-note sf-note--error",role:"alert",children:Le}),ut===null?L("div",{className:"sf-note",children:"Loading\u2026"}):ut.some(Boolean)?ut:L("div",{className:"sf-note",children:we.trim()?"No pages match your search":"No pages yet"})]}),Ee("button",{type:"button",className:"sf-pages-new",onClick:le,children:[L("span",{className:"sf-plus",children:"+"}),"New page"]}),E&&L("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/30 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"sf-add-page-title",onClick:()=>K(!1),children:Ee("div",{className:"w-full max-w-sm rounded-lg bg-white p-5 shadow-xl",onClick:u=>u.stopPropagation(),children:[L("h2",{id:"sf-add-page-title",className:"text-[15px] font-semibold text-zinc-900",children:"Add a page"}),L("p",{className:"mt-1 text-[13px] leading-relaxed text-zinc-600",children:"Give the new template page a name. It starts blank \u2014 add sections once it opens."}),L("input",{autoFocus:!0,value:F,onChange:u=>_(u.target.value),onKeyDown:u=>{u.key==="Enter"&&j(),u.key==="Escape"&&K(!1)},placeholder:"e.g. About",className:"mt-3 w-full rounded-md border border-zinc-300 px-3 py-2 text-[13px] text-zinc-900 outline-none focus:border-blue-500"}),F.trim()&&Ee("p",{className:"mt-1.5 text-[12px] text-zinc-400",children:["URL: /",la(F,fn)]}),Le&&L("p",{className:"mt-2 text-[12px] text-red-600",role:"alert",children:Le}),Ee("div",{className:"mt-4 flex justify-end gap-2",children:[L("button",{type:"button",onClick:()=>K(!1),className:"rounded-md border border-zinc-300 px-3 py-[7px] text-[13px] font-medium text-zinc-700 transition-colors hover:bg-zinc-100",children:"Cancel"}),L("button",{type:"button",onClick:()=>{j()},disabled:ke||!F.trim(),className:"rounded-md bg-blue-600 px-3 py-[7px] text-[13px] font-medium text-white transition-colors hover:bg-blue-700 disabled:opacity-60",children:ke?"Adding\u2026":"Add page"})]})]})})]})}function nd(){return Ee("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[L("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),L("path",{d:"M14 3v5h5"})]})}import{StylesIcon as od}from"efficient-easel/rail";import{jsx as cn,jsxs as id}from"react/jsx-runtime";function oi({tokenRef:o,siteId:r,onClose:a,onNotify:m,tab:g,onTabChange:y}){let S=jn();return id("div",{className:"sf-styles",children:[cn(lt,{icon:cn(od,{}),title:"Site styles",context:cn("span",{title:`${S} \u2014 renamed in the Console: Storefront \u25B8 Sites \u25B8 Settings.`,children:S}),onHide:a}),cn("div",{className:"sf-insp-body sf-scroll",children:cn(vr,{tokenRef:o,siteId:r,onNotify:m,tab:g,onTabChange:y})})]})}import{useEffect as sd,useState as rd}from"react";function da(){let o=zt().chrome?.products?.list,[r,a]=rd(null);return sd(()=>{if(!o)return;let m=!1;return o().then(g=>{m||a(g)}),()=>{m=!0}},[o]),r}import{useEasel as pd}from"efficient-easel/easel";function ad(o){return o.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function ld(o){let r=[],a=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1>/gi,m;for(;m=a.exec(o);)r.push({level:Number(m[1]),text:ad(m[2])||"(empty)"});return r}var dd=new Set(["SubmitBuild"]),cd={AlloyWheelsListing:1,DocMasthead:1,AppointmentBooking:2,BookingBox:2,SubmitBox:2,Banner:2,BundleOffer:2,Cards:2,Chart:2,CheckoutCTA:2,CollectionCard:3,Collections:2,CompatibleTyres:2,ContactLocations:2,ContactRouting:2,DeliveryOptions:2,DetailRows:2,DocBody:2,EuTyreLabel:2,Events:2,FAQ:2,FeaturedCover:2,FitmentFinder:2,FitmentTable:2,FooterEmailSignup:4,FooterMenu:4,Footprint:2,Form:2,Gallery:2,GalleryB:2,GalleryItem:2,Integrations:2,IntroBleed:2,KeyFeatures:2,Logos:2,LongRead:2,Manifesto:2,Mockup:2,OrderSummary:2,PostCard:2,ProcessSteps:2,ProductGrid:2,Prose:2,RelatedProducts:2,ReviewForm:2,Reviews:2,SectionHeader:2,Series:2,SpecTable:2,Split:2,StatsParagraph:2,SubmitBuild:2,Subscribe:2,SubscribeBlogs:2,Testimonials:2,Timeline:2,TimelineTrack:2,TitleWithButtons:2,TyreFitment:2,TyreSizes:2};function ii(o,r){let a=[];for(let m of o??[]){let g=m,y=g.props??{};switch(g.type){case"Heading":{let{text:S,hidden:P}=Hn(y.text);if(P)break;a.push({level:Number(y.level)||2,text:S||"(empty heading)"})}break;case"Hero":a.push({level:1,text:"Hero (brand headline)"});break;case"CustomHTML":a.push(...ld(Hn(y.html).text));break;default:{let S=cd[g.type??""],P=Hn(y.title??y.heading),C=P.text.trim();if(!S||P.hidden)break;C?a.push({level:S,text:C}):dd.has(g.type??"")&&a.push({level:S,text:String(g.type)});break}}for(let S of Mn(r,g.type??"")){let P=y[S];Array.isArray(P)&&a.push(...ii(P,r))}}return a}import{jsx as Mt,jsxs as Xn}from"react/jsx-runtime";function si(){let{appState:o,config:r}=pd(y=>y),a=o?.data,m=ii(a?.content??[],r),g=m.filter(y=>y.level===1).length;return Xn("div",{className:"px-4 py-3 text-[13px] text-zinc-600",children:[Xn("div",{className:"mb-2 flex items-center justify-between text-[11px] font-semibold uppercase tracking-wide text-zinc-500",children:[Mt("span",{children:"Heading outline"}),Mt("span",{children:m.length})]}),g!==1&&Mt("div",{className:"mb-2 rounded bg-amber-50 px-2 py-1 text-[12px] text-amber-700",children:g===0?"No H1 \u2014 add one for SEO.":`${g} H1s \u2014 a page should have exactly one.`}),m.length===0?Mt("p",{className:"text-zinc-400",children:"No headings yet."}):Mt("ul",{className:"space-y-1",children:m.map((y,S)=>Xn("li",{className:"flex items-baseline gap-2",style:{paddingLeft:`${(y.level-1)*12}px`},children:[Xn("span",{className:"shrink-0 font-mono text-[11px] text-zinc-400",children:["H",y.level]}),Mt("span",{className:"truncate text-zinc-700",children:y.text})]},S))})]})}var ud=new Set(["BookingBox","SubmitBox"]);function Ht(o){return typeof o=="string"&&ud.has(o)}import{useCallback as ca,useState as fd}from"react";import{EaselContextMenu as gd}from"efficient-easel/menu";import{AddIcon as md,CopyIcon as pa,LayersIcon as yd,PasteIcon as fa,RedoIcon as hd,SettingsIcon as bd,UndoIcon as vd}from"efficient-easel/icons";import{ROOT_ID as xd,ROOT_SLOT as Sd,zoneKey as ga}from"efficient-easel/data";import{createNodeClipboard as wd,nodeMenuItems as kd}from"efficient-easel/node-ops";import{styleMenuItems as Cd}from"efficient-easel/style-clipboard";import{framePointToHost as Td,useCanvasEvent as ri}from"efficient-easel/canvas";import{jsx as _e}from"react/jsx-runtime";function Id(o,r){let a=[],m=new Set,g={zone:r.zone,index:r.index};for(;g;){let y=o.nodeAt(g.zone,g.index);if(!y||m.has(y.props.id)||(m.add(y.props.id),a.push({zone:g.zone,index:g.index,node:y,parentType:null}),g.zone===T))break;let S=g.zone.lastIndexOf(":");if(S<=0)break;g=o.locate(g.zone.slice(0,S))}for(let y=0;y<a.length-1;y+=1)a[y].parentType=a[y+1].node.type;return a}var ma=wd();function ya(o,r,a){if(r===T){let{floor:g,cap:y}=o.sectionBand();return{parentId:xd,slot:Sd,index:Math.min(Math.max(a,g),y)}}let m=r.lastIndexOf(":");return{parentId:r.slice(0,m),slot:r.slice(m+1),index:a}}function Rd(o,r){let{zone:a,index:m}=r,g=o.nodeAt(a,m);if(!g)return[];let y=g.props.id,S=o.labelOf(g.type,a),P=!!g.props._hidden,C=o.nodeOps,M=o.isPinned(g,a),D=Ht(g.type),H=!M&&!D&&!Es(o.document,g),Y=Id(o,r),we=C.held,Ae=we&&!M&&ga(we.from)===a?ya(o,a,m+1):null,ke=o.style?Cd({held:o.style.held(),canCopy:o.style.canCopy(g,a),onCopy:()=>o.style?.copy(g,a),onPaste:()=>o.style?.paste(a,m,g)}):[];return kd({title:S,layer:{group:"pick",items:Y.map((re,Le)=>({label:o.rowNameOf(re.node,re.zone),checked:Le===0,onClick:()=>o.selectAt(re.zone,re.index,re.node.props.id,re.parentType)}))},actions:{addInside:ye(g.type)?()=>o.openAddInside(a,m):void 0,duplicate:H?()=>C.duplicate(y):void 0,moveUp:C.canStep(y,-1)?()=>C.step(y,-1):void 0,moveDown:C.canStep(y,1)?()=>C.step(y,1):void 0,copy:M?void 0:()=>C.copy(y,S),cut:H?()=>C.cut(y,S):void 0,paste:we&&Ae?{label:we.label,run:()=>C.paste(Ae)}:void 0,rename:o.renamePropOf(g,a)?()=>o.beginRename(a,m):void 0,hide:!D&&!M?{hidden:P,run:()=>C.setProps(y,{_hidden:!P})}:void 0,delete:H?()=>C.remove(y):void 0},style:ke,pinnedLine:M?"Pinned \u2014 can\u2019t be moved or deleted":void 0})}function Pd(o){let r=[];o.history.hasPast&&r.push({label:"Undo",icon:_e(vd,{}),shortcut:"\u2318Z",onClick:o.history.back}),o.history.hasFuture&&r.push({label:"Redo",icon:_e(hd,{}),shortcut:"\u21E7\u2318Z",onClick:o.history.forward});let a=[{label:"Add section",icon:_e(md,{}),onClick:o.openAddSection}],m=o.nodeOps.held;if(m&&ga(m.from)===T){let P=ya(o,T,o.sectionBand().cap);a.push({label:`Paste ${m.label}`,icon:_e(fa,{}),shortcut:"\u2318V",onClick:()=>o.nodeOps.paste(P)})}let g=[{label:"Page settings",icon:_e(bd,{}),onClick:o.openPageSettings},{label:"Collapse all layers",icon:_e(yd,{}),onClick:o.collapseAll}],y=[r,a,g].filter(P=>P.length>0),S={label:"\u2014",onClick:()=>{}};return y.flatMap((P,C)=>C?[S,...P]:P)}function Ed(o,r){let a=r.selectionStart??0,m=r.selectionEnd??0,g=r.value.slice(a,m),y=D=>{r.focus(),r.setRangeText(D,a,m,"end"),r.dispatchEvent(new Event("input",{bubbles:!0}))},S=[];g&&(S.push({label:"Copy",icon:_e(pa,{}),shortcut:"\u2318C",onClick:()=>navigator.clipboard?.writeText(g)}),S.push({label:"Cut",icon:_e(pa,{}),shortcut:"\u2318X",onClick:()=>{navigator.clipboard?.writeText(g),y("")}})),S.push({label:"Paste",icon:_e(fa,{}),shortcut:"\u2318V",onClick:()=>{navigator.clipboard?.readText().then(D=>{D&&y(D)}).catch(()=>o.onPasteRefused())}});let P=r.value?[{label:"Select all",shortcut:"\u2318A",onClick:()=>{r.focus(),r.select()}}]:[],C=[S,P].filter(D=>D.length>0),M={label:"\u2014",onClick:()=>{}};return C.flatMap((D,H)=>H?[M,...D]:D)}function Ad(o){let r=o?.closest?.("input, textarea");return!r||r instanceof HTMLInputElement&&!["text","search","url","email","tel","number",""].includes(r.type)?null:r}function ua(o){return o.shiftKey}function ha(o,r){let[a,m]=fd(null),g=ca(()=>m(null),[]),y=ca(C=>{if(ua(C))return;let M=C.target,D=Ad(M);if(D){C.preventDefault(),m({kind:"input",x:C.clientX,y:C.clientY,el:D});return}let H=M?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),Y=H?o.locate(H):null;C.preventDefault(),m(Y?{kind:"node",x:C.clientX,y:C.clientY,...Y}:{kind:"empty",x:C.clientX,y:C.clientY})},[o]);ri(r,"contextmenu",C=>{if(ua(C)||!r)return;let D=(C.target?.closest?.("[data-puck-component]")??null)?.getAttribute("data-puck-component"),H=D?o.locate(D):null;C.preventDefault();let Y=Td(r.frame,C.clientX,C.clientY);m(H?{kind:"node",...Y,...H}:{kind:"empty",...Y})}),ri(r,"mousedown",g),ri(r,"scroll",g,{on:"window"});let P=a?_e(gd,{x:a.x,y:a.y,items:a.kind==="node"?Rd(o,a):a.kind==="input"?Ed(o,a.el):Pd(o),onClose:g}):null;return{onEditorContextMenu:y,menu:P,closeMenu:g}}function ba(o,r){let a=!1,m={...o.props};for(let g of r){let y=Array.isArray(o.props[g])?o.props[g]:[],S=new Set,P=y.filter(C=>{let M=C?.props?.id;return!M||S.has(M)?!1:(S.add(M),!0)});P.length!==y.length&&(m[g]=P,a=!0)}return a?m:null}var Ld=".es-tree",Dd=".es-tree-row.is-selected";function va(o,r,a){return!o||!r?!1:o.index===r.index&&(o.zone??a)===(r.zone??a)}function Nd(o,r){if(typeof o.getBoundingClientRect!="function"||typeof r.getBoundingClientRect!="function")return!1;let a=o.getBoundingClientRect(),m=r.getBoundingClientRect();return!a.height||!m.height?!1:m.top>=a.top&&m.bottom<=a.bottom}function xa(o=typeof document>"u"?void 0:document){let r=o?.querySelector(Ld),a=r?.querySelector(Dd);return a?(Nd(r,a)||a.scrollIntoView({block:"center",inline:"nearest"}),!0):!1}function Sa(o,r){return o.kind==="part"?o.nodeId??null:o.kind!=="puck"||r==null?null:String(r)}import{useEffect as ka,useState as Ca}from"react";var zd=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function ai(o){return!!o&&zd.test(o)}function wa(o){let{pageSlug:r,siteSlug:a,hostname:m}=o,g=r===$s?"/":`/${encodeURIComponent(r)}`;if(!ai(m))return g;let y=a?.trim();return y?`${g}?site=${encodeURIComponent(y)}`:g}function Ta(o){let{pageSlug:r,siteId:a,token:m}=o,[g,y]=Ca(null),[S,P]=Ca(null),C=_r();ka(()=>P(C?new URL(C).hostname:window.location.hostname),[C]),ka(()=>{if(!ai(S)||!a||!m){y(null);return}let D=!1;return qr(m,a).then(H=>{D||y(H)}),()=>{D=!0}},[S,a,m]);let M=wa({pageSlug:r,siteSlug:g,hostname:S});return C?`${C}${M}`:M}var Ia="sf-editor-left-view";function Ra(){if(typeof window>"u")return"pages";try{let o=window.localStorage.getItem(Ia);return o==="sections"||o==="styles"||o==="media"?o:"pages"}catch{return"pages"}}function Pa(o){if(!(typeof window>"u"))try{window.localStorage.setItem(Ia,o)}catch{}}function Ea(o,r,a=!1){return o==="styles"&&!r||o==="media"&&!a?"sections":o}function Aa(o,r){return o?"sections":r}import{jsx as La}from"react/jsx-runtime";var Od="M6 3h12a1 1 0 0 1 1 1v17l-7-4-7 4V4a1 1 0 0 1 1-1z";function li({size:o=15,className:r,strokeWidth:a=1.7}){return La("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":"true",focusable:"false",children:La("path",{d:Od})})}var Bd="Save your page changes first";function Da(o){return o.hasTrustedConsole?o.canCreatePlatformTemplate?!o.capabilities.canPublish||!o.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:o.siteId?o.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:Bd}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var Na="storefront-editor:save-as-template";import{heldStyle as pc,styleShortcut as uc}from"efficient-easel/style-clipboard";import{BLOCK_SELECTOR as fc,useCanvasEvent as gc,useCanvasFrame as mc}from"efficient-easel/canvas";import{createNode as yc,DataError as hc,newId as bc,parseZoneKey as ct,ROOT_ID as vc,ROOT_SLOT as xc,zoneKey as je}from"efficient-easel/data";import{CanvasDragLayer as Sc,createDragSession as wc,gapToMoveIndex as kc,useTreeDrag as fi}from"efficient-easel/drag";import{toItemSelector as Cc,useNodeOps as Tc}from"efficient-easel/node-ops";import{useEasel as Ic,useEaselApi as Rc}from"efficient-easel/easel";import{fieldKind as Md,STYLE_KIND as za,copyStyle as Hd,heldStyle as Fd,pasteMessage as $d,planPaste as Wd}from"efficient-easel/style-clipboard";var qd=new Set([$n.Style,$n.Layout]),_d=new Set(Object.values($n)),jd=new Set(Object.keys(er())),Vd=new Set(["focal","imageFocal"]),Gd=[tr,Hs,Fs];function Oa(o){return`site:${o??""}`}function Kd(o){if(!o||typeof o!="object")return null;let r=o,a=zo(o)??o,m=r[za]??a[za];if(typeof m=="string")return m;let g=r.options??a.options;return Array.isArray(g)?`choice:${g.map(S=>String(S?.value)).sort().join("|")}`:Md(a)}function Ud(o){let r=o,a=zo(o);return Gd.some(m=>m in r||a&&m in a)}function Zn(o,r){let a=kr(o,r)??{},m=[],g=!1;for(let[y,S]of Object.entries(a)){if(_d.has(y)){g=qd.has(y);continue}!g||!S||typeof S!="object"||y.startsWith("_")||Qs(S)||jd.has(y)||Vd.has(y)||Ud(S)||S.type!=="slot"&&m.push({path:[y],kind:Kd(S),counted:Xs(S)?.tier!=="mobile"})}return m}function di(o,r,a,m){Hd({scope:r,type:a.type,label:m,rows:Zn(o,a),props:a.props})}function Ba(o,r,a,m){let g=Fd(r);if(!g)return null;let y=Wd(g,{type:a.type,rows:Zn(o,a),props:a.props});return{...y,message:$d(y,g.sourceLabel,m)}}import{Fragment as se,jsx as c,jsxs as I}from"react/jsx-runtime";function Pc({saveState:o,notSaving:r,onToggle:a,onRetry:m}){if(r)return c(Wa,{tone:o.pending?"off-unsaved":"off",label:"Not saving \u2014 see the notice above",role:"status"});let{tone:g,label:y}=cc(o);return I(se,{children:[c(nc,{pressed:o.paused,onToggle:a,title:o.paused?"Auto-save is off \u2014 click to turn it back on (saves your held edits)":"Auto-save is on \u2014 click to pause it",children:c(Wa,{tone:g,label:y})}),o.failed&&!o.paused&&c("button",{type:"button",className:"es-btn-ghost",onClick:m,children:"Retry now"})]})}function Ec(){return I("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[c("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"}),c("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),c("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),c("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function Ac({size:o=13}){return I("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("circle",{cx:"12",cy:"12",r:"9"}),c("path",{d:"M3 12h18M12 3c2.6 2.6 2.6 15.4 0 18M12 3c-2.6 2.6-2.6 15.4 0 18"})]})}function Lc({size:o=13}){return I("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("path",{d:"M12 21s6-5 6-10a6 6 0 10-12 0c0 5 6 10 6 10z"}),c("circle",{cx:"12",cy:"11",r:"2"})]})}function Dc({size:o=13}){return I("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("path",{d:"M9 4 3 6.5v13L9 17l6 3 6-2.5v-13L15 7z"}),c("path",{d:"M9 4v13M15 7v13"})]})}function Nc({expand:o}){return c("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round",children:o?I(se,{children:[c("path",{d:"M8 9l4-4 4 4"}),c("path",{d:"M8 15l4 4 4-4"})]}):I(se,{children:[c("path",{d:"M8 4l4 4 4-4"}),c("path",{d:"M8 20l4-4 4 4"}),c("path",{d:"M5 12h14"})]})})}var eo=o=>({parentId:`locations-${o}`,slot:"groups"}),gi=(o,r)=>({parentId:`locations-${o}`,slot:`cities:${r}`});function zc(o,r){if(o.length!==r.length)return!1;for(let a=0;a<o.length;a++)if(o[a].top!==r[a].top||o[a].index!==r[a].index)return!1;return!0}function Oc(){let o=Fn(),{adapter:r,capabilities:a,templateId:m,currentSlug:g,siteId:y,tokenRef:S,onPublish:P,saveStatus:C,saveState:M,saveConflict:D,retrySave:H,hasUnsavedEdits:Y,bridgeCapabilities:we,notifyParent:Ae,token:ke,toggleAutoSave:re,navigate:Le,docId:Ce,data:E,footerOriginSlug:K,readOnly:F}=Ot(),{canPublish:_,hasSiteSettings:X,hasSiteTheme:ne,mediaEditing:pn,hasEditGuard:to,hasPinnedChrome:pt,explainsSiteSettings:$t,hasPreviewLink:un}=a,xt=Da({hasTrustedConsole:!!ke,canCreatePlatformTemplate:we.canCreatePlatformTemplate,capabilities:a,siteId:y,hasUnsavedEdits:Y}),fn=Se(()=>{!y||!g||Ae(Na,{siteId:y,slug:g})},[Ae,y,g]),{appState:le,dispatch:j,history:Fe,selectedItem:G,getSelectorForId:St,config:ae}=Ic(e=>e),de=g===No,wt=Us({readOnly:F}),ut=te(null),u=ci(()=>({...wt,select:e=>{ut.current=e,wt.select(e)}}),[wt]),U=le.ui,N=U.leftSideBarVisible,ce=U.rightSideBarVisible,[De,_a]=ie("desktop"),Wt=Vs(),mi=pn&&Wt!==null,Ne=Gs(),[kt,gn]=ie(Ra),[ja,yi]=ie(br[0].id),ft=Ea(kt,ne,mi);B(()=>{Pa(kt)},[kt]);let[hi,Va]=ie(0),{surface:Ga,setSurface:bi}=sr(),no=te(null),qt=te(null),Ve=mc(qt,{readySelector:fc}),Te=jr(qt);Vr(qt);let[he,_t]=ie(!1),Qe=te(!1),et=te(!1),[q,Ge]=ie(null),mn=q&&q.zone===T?q.index:null,vi=e=>Ge(e===null?null:{zone:T,index:e}),[xi,Si]=ie([]),[ze,Q]=ie(xe),oo=ze.kind==="puck",io=ze.kind==="ticker"?ze.heroId:null,Ct=Sa(ze,G?.props.id),tt=te(null),so=te(null),[wi,ki]=ie(null);B(()=>{wi&&(xa(),ki(null))},[wi]);let Ci=te(St);Ci.current=St;let yn=Se((e,{scroll:n})=>{gn(p=>Aa(e,p)),n&&ki(e);let s=[],l=e;for(let p=0;p<4;p++){let f=Ci.current(l)?.zone;if(!f||!f.includes(":"))break;let b=f.split(":")[0];s.push(b),l=b}s.length!==0&&vn(p=>{if(s.every(b=>!p.has(b)))return p;let f=new Set(p);return s.forEach(b=>f.delete(b)),f})},[]);B(()=>{Q(G?.type===Ue?Gn:xe),Ar(G?.type==="BookingBox"&&G.props.region==="confirm"?Lr(St(String(G.props.id))?.zone):null);let e=G?.type==="ContactLocations"?String(G.props.id):null;e&&e!==so.current&&Me({level:"groups"}),so.current=e;let n=G?.props.id;de&&typeof n=="string"&&(tt.current?.(),tt.current=_n(n));let s=ut.current;if(ut.current=null,!n)return;let l=St(n);yn(String(n),{scroll:!va(s,l??null,T)})},[G?.props.id,de,yn]);let{setSelected:Ti,setSelectHandler:Ii}=Ws(),{chat:Ka,setChat:Ua,setSelected:Ri,setSelectHandler:Pi}=or(),{setSelectedHeroId:Ei,setSelectHandler:Ai}=ar(),{editFooter:Li}=nr(),{selectedLocationPartId:Ya,setSelectedLocationPartId:Di,setSelectHandler:Ni}=lr(),zi=ze.kind==="header";B(()=>{Ti(zi)},[zi,Ti]),B(()=>{Ii(()=>{Q(Gn),j({type:"setUi",ui:{rightSideBarVisible:!0}})})},[Ii,j]);let ro=Se(()=>{Q(e=>e.kind==="chat"?e:Tr),j({type:"setUi",ui:{rightSideBarVisible:!0}})},[j]),Oi=ze.kind==="chat";B(()=>{Ri(Oi)},[Oi,Ri]),B(()=>{Pi(ro)},[Pi,ro]);let{setOpenHandler:Bi}=ir(),Mi=Se(()=>{Q(e=>e.kind==="social"?e:Ir),j({type:"setUi",ui:{rightSideBarVisible:!0}})},[j]);B(()=>{Bi(Mi)},[Bi,Mi]);let hn=Se(e=>{e&&(Q(n=>n.kind==="ticker"&&n.heroId===e?n:{kind:"ticker",heroId:e}),j({type:"setUi",ui:{rightSideBarVisible:!0}}),Bt(e))},[j]);B(()=>{Ei(io)},[io,Ei]),B(()=>{Ai(hn)},[Ai,hn]);let Xa=Se(e=>{j({type:"setUi",ui:{rightSideBarVisible:!0}}),Bt(e),yn(e,{scroll:!0})},[j,yn]),{selectNode:Za,openPartId:Bc}=Er({mode:ze,setMode:Q,onOpenPart:Xa}),[Hi,Fi]=ie(null),$i="sf-editor-collapsed-sections",[bn,vn]=ie(()=>{if(typeof window>"u")return new Set;try{let e=window.localStorage.getItem($i);return new Set(e?JSON.parse(e):[])}catch{return new Set}});B(()=>{try{window.localStorage.setItem($i,JSON.stringify([...bn]))}catch{}},[bn]);let[Tt,Ja]=ie(()=>{if(typeof window>"u")return{...dt};try{let e=window.localStorage.getItem($o);if(!e)return{...dt};let n=JSON.parse(e);return{left:Wo(Number(n.left)||dt.left),right:Wo(Number(n.right)||dt.right)}}catch{return{...dt}}});B(()=>{let e=setTimeout(()=>{try{window.localStorage.setItem($o,JSON.stringify(Tt))}catch{}},300);return()=>clearTimeout(e)},[Tt]);let xn=Se((e,n)=>Ja(s=>{let l=typeof n=="function"?n(s[e]):n;return s[e]===l?s:{...s,[e]:l}}),[]),Qa=Se(e=>xn("left",e),[xn]),el=Se(e=>xn("right",e),[xn]),gt=e=>bn.has(e),nt=e=>vn(n=>{let s=new Set(n);return s.has(e)?s.delete(e):s.add(e),s}),Wi=te(!1),ao=te(null);B(()=>{if(Wi.current&&!he){let e=ao.current;((e&&e.isConnected&&!e.closest('[aria-hidden="true"]')?e:null)??qt.current?.querySelector('button[aria-label="Add"]'))?.focus(),ao.current=null}Wi.current=he},[he]),B(()=>{if(!he||!Te)return;let e=n=>{n.key==="Escape"&&En()};return Te.addEventListener("keydown",e),()=>Te.removeEventListener("keydown",e)},[he,Te]),B(()=>{N||!he||(_t(!1),Ge(null),Qe.current=!1)},[N]),B(()=>{if(!Ne){et.current&&j({type:"setUi",ui:{leftSideBarVisible:!1}}),et.current=!1;return}he&&(_t(!1),Ge(null),et.current=Qe.current,Qe.current=!1),N||(et.current=!0,j({type:"setUi",ui:{leftSideBarVisible:!0}}))},[Ne]),B(()=>{N||!Ne||(et.current=!1,an())},[N]),B(()=>{if(!Ne||!Te)return;let e=n=>{n.key==="Escape"&&an()};return Te.addEventListener("keydown",e),()=>Te.removeEventListener("keydown",e)},[Ne,Te]);let[Sn,qi]=ie(null),[tl,nl]=ie(0),jt=te(null),mt=(e,n="success")=>{qi({msg:e,tone:n}),nl(s=>s+1),jt.current&&clearTimeout(jt.current),jt.current=setTimeout(()=>qi(null),n==="error"?3200:1900)};B(()=>()=>{jt.current&&clearTimeout(jt.current)},[]);let Vt=te(null),[It,_i]=ie(0),[lo,ji]=ie(0),Ie=Br();B(()=>{let e=Vt.current;if(!e)return;let n=()=>{_i(e.clientWidth),ji(e.clientHeight)};n();let s=new ResizeObserver(n);return s.observe(e),()=>s.disconnect()},[]),Yd(()=>{Vt.current&&(_i(Vt.current.clientWidth),ji(Vt.current.clientHeight))},[Tt,N,ce]);let Vi={desktop:2e3,tablet:800,mobile:390},co=De==="desktop"?It>0?It:Vi.desktop:Vi[De],Gt=It>0?Math.min(It/co,2):1,Gi=co*Gt,ol=It>0&&Gi>It+1,il={width:Gi,height:lo||"100%",flex:"none",position:"relative"},sl={width:co,height:lo?lo/Gt:"100%",maxHeight:"none",transform:Gt!==1?`scale(${Gt})`:void 0,transformOrigin:"top left"},rl=Ta({pageSlug:g,siteId:y,token:ke}),al=r.previewHref?.(g)??rl,ot=()=>j({type:"setUi",ui:{leftSideBarVisible:!N}}),Ki=()=>j({type:"setUi",ui:{rightSideBarVisible:!ce}}),wn=e=>{if(!(he&&(_t(!1),Ge(null),Qe.current=!1,N&&kt===e))&&!(Ne&&(et.current=!1,an(),N&&kt===e))){if(N&&kt===e){ot();return}gn(e),N||j({type:"setUi",ui:{leftSideBarVisible:!0}})}},ll=()=>{Ks(o,{accept:"image/*",title:"Media library"})},Ui=()=>{Q(xe),u.select(null),qn()},Yi=()=>{Q(Gn),ce||j({type:"setUi",ui:{rightSideBarVisible:!0}})},Xi=()=>{if(ne){gn("styles"),N||j({type:"setUi",ui:{leftSideBarVisible:!0}}),qn();return}Q(Cr),ce||j({type:"setUi",ui:{rightSideBarVisible:!0}}),qn()},A=le.data.content??[],it=()=>{let e=A.findIndex(s=>s.type===Ue),n=A.findIndex(s=>s.type===ee);return{floor:e>=0?e+1:0,cap:n>=0?n:A.length}},Zi=ae,po=Tc({data:le.data,config:Zi,readOnly:!!F,clipboard:ma,afterRemove:"none",stepBounds:(e,n)=>{if(e.parentId!==vc||e.slot!==xc)return{min:0,max:n-1};let{floor:s,cap:l}=it();return{min:s,max:l-1}},commit:(e,{select:n})=>{if(n!==void 0){Q(xe);let s=n?.kind==="node"?Cc(e,Zi,n):null;u.select(s&&s.zone===T?{index:s.index}:s)}u.commitDocument(e)}}),dl=(e,n)=>{let s=Z(e)[n]?.props?.id;s!=null&&po.remove(String(s))},Oe=e=>ae.components[e]?.label??e,yt=Se(e=>ae.components[e]?.defaultProps??{},[ae]),be=e=>Lt(e,"section",Oe(e)),Kt=e=>zr({type:e.type,props:e.props??{}},be(e.type)),{nodeAddresses:kn,zoneItems:Ji}=ci(()=>{let e=new Map,n=new Map,s=(l,p,f)=>{n.set(p,l),l.forEach((b,v)=>{let h=String(b.props?.id??"");if(h&&e.set(h,{zone:p,index:v}),f>=As)return;let R=new Map;for(let{child:z,zone:w}of Eo(ae,b))R.set(w,[...R.get(w)??[],z]);for(let[z,w]of R)s(w,z,f+1)})};return s(A,T,0),{nodeAddresses:e,zoneItems:n}},[A,ae]),Z=Se(e=>Ji.get(e)??[],[Ji]),Qi=da(),cl=ci(()=>{let e=new Map;for(let n of Qi??[])e.set(n.slug,n.name);return e},[Qi]),Cn=e=>Dr(e,Oe,n=>cl.get(n)),es=(e,n)=>n===T?null:Nr(ae.components[e.type]?.fields),pl=(e,n,s)=>{let l=Z(e)[n];if(!l)return;let p=es(l,e);p&&u.replaceComponent(e,n,{...l,props:{...l.props,[p]:s.trim()}})},ul=(e,n,s,l)=>{if(!(Hi?.zone===e&&Hi.index===n))return;let f=(b,v)=>{Fi(null),v&&pl(e,n,b)};return c("input",{className:"es-tree-rename",defaultValue:l,autoFocus:!0,"aria-label":"Rename",onClick:b=>b.stopPropagation(),onBlur:b=>f(b.currentTarget.value,!0),onKeyDown:b=>{b.key==="Enter"?(b.preventDefault(),f(b.currentTarget.value,!0)):b.key==="Escape"&&(b.preventDefault(),f("",!1))}},s)},fl=()=>vn(new Set(Z(T).map(e=>String(e.props.id)))),Tn=Oa(y),In=ae,uo=(e,n)=>n===T?be(e):Oe(e),ts=(e,n,s)=>{let l=Ba(In,Tn,s,uo(s.type,e));l&&(l.changed&&u.replaceComponent(e,n,{...s,props:{...l.props,id:s.props.id}}),mt(l.message))},ns=ha({nodesIn:Z,nodeAt:(e,n)=>Z(e)[n]??null,labelOf:(e,n)=>n===T?be(e):Oe(e),renamePropOf:es,beginRename:(e,n)=>Fi({zone:e,index:n}),history:{hasPast:Fe.hasPast,hasFuture:Fe.hasFuture,back:()=>Fe.back(),forward:()=>Fe.forward()},openAddSection:()=>{u.select(null),Yt(null)},openPageSettings:()=>{u.select(null),Q(xe)},collapseAll:fl,onPasteRefused:()=>mt("Your browser won\u2019t let us read the clipboard \u2014 press \u2318V","error"),document:le.data,nodeOps:po,isPinned:(e,n)=>n===T&&(e.type===Ue||e.type===ee),sectionBand:it,openAddInside:(e,n)=>{e===T?st(n):u.select({zone:e,index:n}),Yt(null)},locate:e=>kn.get(e)??null,rowNameOf:(e,n)=>n===T?Kt(e):Cn(e),selectAt:(e,n,s,l)=>{e===T?st(n):Xt(e,n,s,l??"")},style:{held:()=>pc(Tn),canCopy:e=>Zn(In,e).some(n=>n.counted!==!1),copy:(e,n)=>di(In,Tn,e,uo(e.type,n)),paste:(e,n,s)=>ts(e,n,s)}},Ve),os=te({copy:(e,n)=>{},paste:(e,n,s)=>{},at:()=>null,readOnly:!1});B(()=>{os.current={copy:(e,n)=>di(In,Tn,e,uo(e.type,n)),paste:ts,at:()=>{let e=le.ui.itemSelector;if(!e)return null;let n=e.zone??T,s=Z(n)[e.index];return s?{zone:n,index:e.index,node:s}:null},readOnly:!!F}});let fo=Se(e=>{let n=uc(e);if(!n)return;let s=os.current,l=s.at();l&&(e.preventDefault(),n==="copy"?s.copy(l.node,l.zone):s.readOnly||s.paste(l.zone,l.index,l.node))},[]);B(()=>{if(!Te)return;let e=n=>fo(n);return Te.addEventListener("keydown",e),()=>Te.removeEventListener("keydown",e)},[fo,Te]),gc(Ve,"keydown",fo);let gl=A.map(e=>e.props.id).join("|");B(()=>{let e=Ve?.document??null,n=Ve?.window??null,s=0,l=[],p=()=>{if(!e){Si(w=>w.length?[]:w);return}let v=A.findIndex(w=>w.type===ee),h=v>=0?v:A.length,R=w=>{let O=A[w]?.props?.id;if(O==null)return null;let $=e.querySelector(`[data-puck-component="${CSS.escape(String(O))}"]`);return $?$.getBoundingClientRect():null},z=[];for(let w=1;w<=h;w++){let O=R(w),$=R(w-1);!O&&!$||z.push({top:Math.round(O?O.top:$.bottom),index:w})}Si(w=>zc(w,z)?w:z)},f=()=>{cancelAnimationFrame(s),s=requestAnimationFrame(p)};if(!e||!n){p();return}n.addEventListener("scroll",f,{passive:!0});let b=new ResizeObserver(f);return b.observe(e.documentElement),p(),l.push(setTimeout(p,150),setTimeout(p,450)),()=>{cancelAnimationFrame(s),l.forEach(clearTimeout),n.removeEventListener("scroll",f),b.disconnect()}},[Ve,gl,De,Gt,N,ce,G?.props.id]);let ml=()=>{let e=Ve?.document;if(!e)return null;let n=4,s=A.findIndex(f=>f.type===ee),l=s>=0?s:A.length,p=null;for(let f=0;f<l;f++){let b=A[f]?.props?.id;if(b==null)continue;let v=e.querySelector(`[data-puck-component="${CSS.escape(String(b))}"]`);if(!v)continue;let h=v.getBoundingClientRect().top;h<=n&&(p===null||h>p.offset)&&(p={id:String(b),offset:h})}if(!p){let f=G?.props?.id??A[0]?.props?.id;f!=null&&(p={id:String(f),offset:0})}return p},yl=()=>{no.current=ml(),Va(e=>e+1)},go=Ve?.document??null,Ut=Ve?.window??null;B(()=>{let e=no.current;if(!e||!go||!Ut)return;let n=[],s=()=>{let l=go.querySelector(`[data-puck-component="${CSS.escape(e.id)}"]`);if(!l)return!1;let p=l.getBoundingClientRect().top-e.offset;return Math.abs(p)>1&&Ut.scrollTo({left:Ut.scrollX,top:Ut.scrollY+p,behavior:"instant"}),!0};return no.current=null,s()&&n.push(setTimeout(s,150),setTimeout(s,450)),()=>n.forEach(clearTimeout)},[go,Ut]);let mo=e=>{if(!de){Bt(e);return}tt.current?.(),tt.current=_n(e)};B(()=>{if(!de||!K)return;let e=A.find(n=>n.type===ee)?.props?.id;if(e)return tt.current?.(),tt.current=_n(String(e)),()=>{tt.current?.(),tt.current=null}},[de,K,hi]),B(()=>{if(!(de||!qs()))return yr(()=>_s())},[]);let st=e=>{Q(xe),u.select({index:e}),A[e]?.type==="ContactLocations"&&Me({level:"groups"});let n=A[e]?.props?.id;n&&mo(n)},is=e=>{let{floor:n,cap:s}=it(),l=f=>Math.min(Math.max(n,f),s);if(typeof e=="number")return l(e);let p=G&&ze.kind!=="header"?A.findIndex(f=>f.props.id===G.props.id):-1;return l(p>=0?p+1:s)},ss=(e,n)=>{let{floor:s,cap:l}=it(),p=Math.min(Math.max(n,s),l),f=e<p?p-1:p;return f===e?{moved:!1,dest:e}:(u.reorderComponent(T,e,f),u.select({index:f}),{moved:!0,dest:f})},hl=(e,n)=>{let s=be(A[e]?.type??""),l=ss(e,n<0?e-1:e+2);if(!l.moved){mt(`\u201C${s}\u201D is already ${n<0?"first":"last"}`);return}let{floor:p,cap:f}=it();mt(`Moved \u201C${s}\u201D to position ${l.dest-p+1} of ${f-p}`)},Rn=(e,n,s)=>{Q(xe),u.select({index:e}),Bt(n),mt(`Added \u201C${s}\u201D section`)},yo=(e,n)=>{let s=is(n),l=Rs(e);if(l){let b=l(yt,Dt),v=u.insertNode(T,s,b);return Rn(s,v,be(e)),s}if(Ms(e)&&Lo(tn)&&Lo(Nt)){let b={type:tn,props:{...yt(tn),id:Dt(tn),direction:"column",name:`${be(e)} section`,content:[{type:Nt,props:{...yt(Nt),id:Dt(Nt),...bt[e]?.headStyle?{headStyle:bt[e].headStyle}:{},...bt[e]?.headRowGap?{rowGap:bt[e].headRowGap}:{},...bt[e]?.headDescriptionSize?{descriptionSize:bt[e].headDescriptionSize}:{},...Wn(e)!==Wn(Nt)?{eyebrowLook:Wn(e)}:{}}},{type:e,props:{...yt(e),id:Dt(e),headPlacement:"own-box"}}]}},v=u.insertNode(T,s,b);return Rn(s,v,be(e)),s}let f=Ns[e]?.fixed===!0?u.insertNode(T,s,{type:e,props:{...yt(e),id:Dt(e),layout:"boxes"}}):u.insertSection(e,s);return Rn(s,f,be(e)),s},ho=(e,n,s)=>{let l=is(s),p=u.insertNode(T,l,n);return Rn(l,p,e),l},Yt=e=>Pn(T,e),Pn=(e,n)=>{ao.current=document.activeElement??null,Ne&&(Qe.current=et.current,et.current=!1,an()),Ge(n===null?null:{zone:e,index:n}),_t(!0),N||(Qe.current=!0,j({type:"setUi",ui:{leftSideBarVisible:!0}}))},En=()=>{_t(!1),Ge(null),Qe.current&&j({type:"setUi",ui:{leftSideBarVisible:!1}}),Qe.current=!1},bl=e=>{if(mn===null){yo(e);return}let n=yo(e,mn);vi(n+1)},vl=(e,n)=>{if(mn===null){ho(e,n);return}let s=ho(e,n,mn);vi(s+1)},rs=(e,n,s)=>{if(e.kind==="section")u.insertComponent(n,e.type,s);else if(e.kind==="template")u.insertNode(n,s,Vn(e.template.node));else return;Q(xe),u.select({index:s,zone:n})},xl=e=>{let n=$e(e.zone);if(n)return`Adding to ${Oe(n.type)}`;if(e.zone===T){let l=A[e.index];return l&&l.type!==ee?`Adding before ${be(l.type)}`:"Adding at the end of the page"}let s=Et(e.zone);return s?`Adding to ${s.parentName}`:"Adding here"},Sl=e=>{if(q&&e.kind!=="block"&&$e(q.zone)){rs(e,q.zone,q.index),Ge({zone:q.zone,index:q.index+1});return}if(e.kind==="section")return bl(e.type);if(e.kind==="template")return vl(e.template.name,Vn(e.template.node));if(q&&q.zone!==T){let n=Et(q.zone);if(!n)return;n.target.spec?Rt(n.parentId,n.target.slot,e.type,q.index,n.parent.type):So(q.zone,e.type,q.index),Ge({zone:q.zone,index:q.index+1});return}Ts?.onPick(e.type)},pe=e=>n=>{n.target.closest(".es-tree-select")||e()},as=()=>Li?Li():Le({kind:"page",slug:No,siteId:y??void 0}),An=(e,n,s)=>c(Qn,{kind:"delete",label:`Delete ${s}`,onClick:()=>dl(e,n),children:c(ui,{size:15})}),Ln=(e,n,s,l)=>{let p=!!s.props._hidden;return c(Qn,{kind:"eye",label:p?`Show ${l}`:`Hide ${l}`,onClick:()=>wl(e,n,s),children:p?c(Ye,{name:"eye-off",size:14}):c(Ye,{name:"eye",size:14})})},ls=e=>{let n=be(A[e]?.type??""),s=n?`Add section before ${n}`:"Add section here";return zn(T,e,()=>Yt(e),s)},wl=(e,n,s)=>{u.replaceComponent(e,n,{...s,props:{...s.props,_hidden:!s.props._hidden}})},bo=e=>Mn(ae,e),rt=e=>Eo(ae,e),vo=(e,n,s)=>{let l=Ls(ae,e.type,n)&&(s||rt(e).length>0);return{collapsible:l,folded:l&>(String(e.props.id))}},xo=(e,n,s)=>rt(e).flatMap(({child:l})=>vo(l,n,s(l.type)).collapsible?[String(l.props.id),...xo(l,n+1,s)]:[]),Dn=e=>rt(e).length>0||!!ye(e.type),Nn=e=>!!ye(e),Xt=(e,n,s,l)=>{if(Q(xe),ye(l)?.spec?.slider){let p=e.split(":")[0];Ho(p,n),u.select({index:n,zone:e}),Bt(p)}else u.select({index:n,zone:e}),mo(s)},Rt=(e,n,s,l,p)=>{let f=`${e}:${n}`;u.insertComponent(f,s,l),ye(p)?.spec?.slider?requestAnimationFrame(()=>{Ho(e,l),u.select({index:l,zone:f})}):u.select({index:l,zone:f})},So=(e,n,s)=>{u.insertComponent(e,n,s),Q(xe),u.select({index:s,zone:e})},ds=te(new Set);B(()=>{A.forEach(e=>{let n=ye(e.type)?.spec;if(!n)return;let s=e.props.id;if(ds.current.has(s)||(ds.current.add(s),(Array.isArray(e.props[n.slot])?e.props[n.slot]:[]).length>0)||n.skipSeed?.(e.props))return;let p=`${s}:${n.slot}`,f=n.legacy?.(e.props)??[];(f.length?f:n.seeds(yt)).forEach((v,h)=>u.seedChild(p,h,n.childType,v))})},[A,u,yt]);let cs=te(new Set);B(()=>{A.forEach((e,n)=>{let s=e.props.id;if(cs.current.has(s))return;let l=ba(e,bo(e.type));cs.current.add(s),l&&u.replaceComponent(T,n,{...e,props:l})})},[A,u]);let ps=Rc().getState,us=te(null);B(()=>{if(!js({docId:Ce,saveStatus:C,seededDocId:us.current})||(us.current=Ce,!pt))return;let e=ps().appState.data,n=e.content,s=E?.content??[],l=(v,h)=>v.some(R=>R?.type===h);if(!X){let v=new Set(Ao(n)),h=v.size?n.filter(z=>!v.has(z.props.id)):n;v.size&&u.setDocument({...e,content:h});let R=Ds(h,s);if(R.includes(ee)){let z=h.length,w=u.insertSection(ee,z);u.replaceComponent(T,z,{type:ee,props:{id:w,blocks:Mo()}})}R.includes(Ue)&&u.insertNode(T,0,Bo());return}if(de){let v=Bs(n);if(v!==n&&u.setDocument({...e,content:[...v]}),!v.find(R=>R.type===ee)&&!l(s,ee)&&!l(v,sn)&&!l(s,sn)){let R=(w,O)=>yc(ae,w,O),z={type:ee,props:{blocks:Mo()}};u.insertNode(T,v.length,mr(z,R,bc(sn)))}return}let p=n.filter(v=>v.type!==ee),f=new Set(Ao(p)),b=f.size?p.filter(v=>!f.has(v.props.id)):p;b.length!==n.length&&u.setDocument({...e,content:b}),!l(b,Ue)&&!l(s,Ue)&&u.insertNode(T,0,Bo())},[Ce,C,E,ps,u,X,pt,de]);let Pt=A.findIndex(e=>e.type===ee),Re=Pt>=0?A[Pt]:null,fs=A.find(e=>e.type===Os)??null,gs=A.find(e=>e.type===sn)??null,ms=Pt>=0?Pt:A.length,Ke=[];A.forEach(e=>{e.type!==ee&&(Dn(e)&&Ke.push(String(e.props.id)),Ke.push(...xo(e,1,Nn)))}),Re&&(Ke.push(String(Re.props.id)),Ke.push(...xo(Re,1,Nn)));let wo=Ke.length>0&&Ke.every(e=>bn.has(e)),kl=()=>vn(e=>{let n=new Set(Ke);return wo?new Set([...e].filter(s=>!n.has(s))):new Set([...e,...Ke])}),ys=e=>{let n=e.props;if(e.type==="FooterMenu"){let s=n.menu;return n.heading||s?.name||"Menu"}if(e.type==="FooterText"){let s=typeof n.text=="string"?n.text.trim():"";return s?s.length>28?`${s.slice(0,28)}\u2026`:s:"Text"}return e.type==="FooterEmailSignup"?n.heading||"Email signup":Oe(e.type)},hs=(e,n,s,l)=>{let p=Z(e)[s];if(!p)return;let f={...ct(e),index:s},b={...ct(n),index:Math.min(Math.max(l,0),Z(n).length)},v=kc(f,b);if(!(e===n&&v===s))try{po.move(String(p.props.id),{...b,index:v})}catch(h){if(!(h instanceof hc))throw h}},Cl=(e,n,s)=>{if(e===n)return!0;let l=Z(e)[s];if(!l)return!1;let p=n.split(":")[0],f=kn.get(p),b=f?Z(f.zone)[f.index]:void 0;if(!b||Tl(l).has(n))return!1;let v=ye(b.type,b.type===nn?on(le?.data,p):0);return!(!v||!(v.choices?v.choices.some(R=>R.type===l.type):v.spec?.childType===l.type)||v.spec?.addBlocked?.(Z(n),l))},Tl=e=>{let n=new Set,s=l=>{for(let{child:p,zone:f}of rt(l))n.add(f),s(p)};for(let l of bo(e.type))n.add(`${e.props.id}:${l}`);return s(e),n},bs=e=>{let n=e.slice(0,e.indexOf(":"));for(let s=0;s<64;s++){let l=kn.get(n);if(!l)return null;if(l.zone===T)return n;n=l.zone.slice(0,l.zone.indexOf(":"))}return null},$e=e=>{let n=e.slice(0,e.indexOf(":")),s=A.find(l=>rn(l.type)&&String(l.props.id)===n);return s&&Do(n)===e?s:null},ko=(e,n)=>{if(e.add)return Il(e.add,n);let s=je(n);if(rn(e.type))return!1;let l=$e(s),p=$e(e.zone);if(l||p)return!l||!p?!1:n.index>=0&&n.index<=Z(s).length;if(e.zone===T||s===T){if(e.zone!==s)return!1;let{floor:b,cap:v}=it();return n.index>=b&&n.index<=v}if(n.index<0||n.index>Z(s).length)return!1;if(e.zone===s)return!0;let f=Re?String(Re.props.id):null;return f&&(bs(e.zone)===f||bs(s)===f)?!1:Cl(e.zone,s,e.index)},Et=e=>{let n=e.slice(0,e.indexOf(":")),s=kn.get(n),l=s?Z(s.zone)[s.index]:void 0;if(!s||!l)return null;let p=ye(l.type,l.type===nn?on(le?.data,n):0);if(!p||`${n}:${p.slot}`!==e||p.source==="footer")return null;let f=p.choices??(p.spec?[{type:p.spec.childType,label:Oe(p.spec.childType)}]:[]);return{parent:l,parentId:n,target:p,choices:f,parentName:s.zone===T?be(l.type):Oe(l.type)}},Il=(e,n)=>{let s=je(n);if(e.kind!=="block"){if($e(s))return n.index>=0&&n.index<=Z(s).length;if(s!==T)return!1;let{floor:p,cap:f}=it();return n.index>=p&&n.index<=f}if(s===T)return!1;let l=Et(s);return!l||!l.choices.some(p=>p.type===e.type)?!1:!l.target.spec?.addBlocked?.(Z(s))},Rl=(e,n)=>{if(e.kind!=="block"&&$e(je(n))){rs(e,je(n),n.index);return}if(e.kind==="section"){yo(e.type,n.index);return}if(e.kind==="template"){ho(e.template.name,Vn(e.template.node),n.index);return}let s=je(n),l=Et(s);l&&(l.target.spec?Rt(l.parentId,l.target.slot,e.type,n.index,l.parent.type):So(s,e.type,n.index))},vs=(e,n)=>{if(e.add){Rl(e.add,n);return}e.zone===T?ss(e.index,n.index):hs(e.zone,je(n),e.index,n.index)},[Co]=ie(()=>wc()),At=fi({keyOf:e=>e.id,readOnly:!!F,session:Co,canDrop:ko,onDrop:vs,onStep:(e,n)=>{e.zone===T?hl(e.index,n):hs(e.zone,e.zone,e.index,n<0?e.index-1:e.index+2)}}),Pl=Se(e=>{let{floor:n,cap:s}=it(),l=[];for(let f of e.nodes){let b=je(f.place),v=Z(b)[f.place.index];if(!v||String(v.props.id)!==f.id||v.type===Ue||v.type===ee||Ht(v.type)||rn(v.type))continue;let h=!!$e(b),R=b===T||h;b===T&&s-n<2||l.push({key:f.id,item:{id:f.id,zone:b,index:f.place.index,type:v.type},box:f.box,label:R?be(v.type):Cn(v),from:f.place})}let p=e.zones.filter(f=>f.children.length>0||!!Et(je(f.list))?.choices.length||!!$e(je(f.list)));return{sources:l,zones:p}},[le.data]),El=e=>{Q(xe),u.select(e.zone===T?{index:e.index}:{index:e.index,zone:e.zone})},zn=(e,n,s,l)=>c(pi,{...F?{}:At.seam({place:{...ct(e),index:n}}),onAdd:F?void 0:s,label:l},`seam:${e}:${n}`),at=(e,n)=>{let s=A[e];s&&u.replaceComponent(T,e,{type:s.type,props:{...s.props,locations:n}})},Zt=e=>{let n=A[e]?.props?.locations;return Array.isArray(n)?n:[]},xs=fi({keyOf:e=>`group:${e.si}:${e.index}`,readOnly:!!F,canDrop:(e,n)=>n.parentId===eo(e.si).parentId&&n.slot==="groups",onDrop:(e,n)=>{at(e.si,Ko(Zt(e.si),e.index,n.index)),Ie.level==="city"&&Me({level:"groups"})},onStep:(e,n)=>{at(e.si,Ko(Zt(e.si),e.index,n<0?e.index-1:e.index+2)),Ie.level==="city"&&Me({level:"groups"})}}),To=fi({keyOf:e=>`city:${e.si}:${e.group}:${e.index}`,readOnly:!!F,canDrop:(e,n)=>n.parentId===eo(e.si).parentId&&n.slot.startsWith("cities:"),onDrop:(e,n)=>{let s=n.slot.slice(7);at(e.si,Uo(Zt(e.si),e.group,e.index,s,n.index)),Me({level:"group",key:s})},onStep:(e,n)=>{at(e.si,Uo(Zt(e.si),e.group,e.index,e.group,n<0?e.index-1:e.index+2)),Ie.level==="city"&&Me({level:"group",key:e.group})}}),Ss=te(A);Ss.current=A;let ws=te(()=>{});B(()=>{Ni(e=>{let n=cr(e);if(!n)return;let s=Ss.current.findIndex(l=>l.props?.id===n.nodeId);s<0||ws.current(s,{level:n.part,index:n.index})})},[Ni]);let Pe=(e,n)=>{Q(xe),so.current=A[e]?.props?.id??null,u.select({index:e}),Me(n),ce||j({type:"setUi",ui:{rightSideBarVisible:!0}});let s=A[e]?.props?.id;typeof s=="string"&&(n.level==="image"||n.level==="map")?Di(dr(s,n.index,n.level)):Di(null),typeof s=="string"&&mo(s)};ws.current=Pe;let Al=(e,n)=>{let s=Zt(n),l=Vo(s),p=String(e.props.id),f=oo&&G?.props.id===p,b=h=>c(pi,{...F?{}:xs.seam({place:{...eo(n),index:h}})},`seam:${p}:groups:${h}`),v=(h,R)=>c(pi,{...F?{}:To.seam({place:{...gi(n,h),index:R}})},`seam:${p}:cities:${h}:${R}`);return I(se,{children:[c(fe,{icon:c(lc,{size:13}),name:"Texts",onSelect:()=>Pe(n,{level:"texts"}),selected:f&&Ie.level==="texts",rowProps:{onClick:pe(()=>Pe(n,{level:"texts"}))}}),l.map((h,R)=>{let z=`${p}::grp::${h.key}`,w=gt(z),O=f&&Ie.level==="group"&&Ie.key===h.key,$=Mr(h.key,h.name),We={...gi(n,h.key),index:h.cards.length},Be=To.row({item:{si:n,group:h.key,index:-1},place:We,into:We,canDrag:!1},{onClick:pe(()=>Pe(n,{level:"group",key:h.key}))}),ue=xs.row({item:{si:n,index:R},place:{...eo(n),index:R}},Be.rowProps);return I(Ft,{children:[R===0&&b(0),c(fe,{icon:c(Ac,{size:13}),name:$,onSelect:()=>Pe(n,{level:"group",key:h.key}),selected:O,draggable:ue.draggable,dragging:ue.dragging,drop:ue.drop??Be.drop,fold:{open:!w,label:"group",onToggle:()=>nt(z)},actions:c(Qn,{kind:"delete",label:`Delete ${$} group (${h.cards.length} ${h.cards.length===1?"city":"cities"})`,onClick:()=>{at(n,$r(s,h.key)),Me({level:"groups"})},children:c(ui,{size:15})}),rowProps:ue.rowProps,children:c("span",{className:"es-group-count",children:h.cards.length})}),!w&&I(Je,{children:[h.cards.map((qe,ve)=>{let ge=Go(s,h.key,ve),Qt=f&&Ie.level==="city"&&Ie.index===ge,ht=String(qe?.name??"")||"City",en=`${p}::city::${jo(qe)}`,On=gt(en),{rowProps:Bn,...Po}=To.row({item:{si:n,group:h.key,index:ve},place:{...gi(n,h.key),index:ve}},{onClick:pe(()=>Pe(n,{level:"city",index:ge}))});return I(Ft,{children:[ve===0&&v(h.key,0),c(fe,{icon:c(Lc,{size:13}),name:ht,onSelect:()=>Pe(n,{level:"city",index:ge}),selected:Qt,...Po,fold:{open:!On,label:ht,onToggle:()=>nt(en)},actions:c(Qn,{kind:"delete",label:`Delete ${ht}`,onClick:()=>{at(n,Wr(s,h.key,ve)),Me({level:"group",key:h.key})},children:c(ui,{size:15})}),rowProps:Bn}),!On&&I(Je,{children:[c(fe,{icon:c(rc,{size:13}),name:"Image",onSelect:()=>Pe(n,{level:"image",index:ge}),selected:f&&Ie.level==="image"&&Ie.index===ge,rowProps:{onClick:pe(()=>Pe(n,{level:"image",index:ge}))}}),c(fe,{icon:c(Dc,{size:13}),name:"Map",onSelect:()=>Pe(n,{level:"map",index:ge}),selected:f&&Ie.level==="map"&&Ie.index===ge,rowProps:{onClick:pe(()=>Pe(n,{level:"map",index:ge}))}})]}),v(h.key,ve+1)]},jo(qe))}),I("button",{type:"button",className:"sf-add-card",onClick:()=>{let qe=Hr(s,h.key);at(n,qe);let ve=Vo(qe).find(ge=>ge.key===h.key);Me(ve&&ve.cards.length?{level:"city",index:Go(qe,h.key,ve.cards.length-1)}:{level:"group",key:h.key})},children:[c("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add city"]})]}),b(R+1)]},z)}),I("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:h,key:R}=Fr(s);at(n,h),Pe(n,{level:"group",key:R})},children:[c("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add group"]})]})},ks=e=>{let n=String(e.props.id),s=A.findIndex(h=>String(h.props.id)===n),l=Do(n),p=Z(l),f=gt(n),b=Oe(e.type),v=h=>zn(l,h,()=>Pn(l,h),"Add section here");return I(se,{children:[c(fe,{icon:c(me,{type:e.type,size:13}),name:b,onSelect:()=>st(s),selected:Ct===n,rowProps:{"data-node-id":n,onClick:pe(()=>st(s))},fold:{open:!f,label:"section",onToggle:()=>nt(n)}}),!f&&I(Je,{children:[p.map((h,R)=>{let z=String(h.props.id),w=Kt(h),O=Dn(h),$=O&>(z),We=()=>Xt(l,R,z,e.type),{rowProps:Be,...ue}=At.row({item:{id:z,zone:l,index:R,type:h.type},place:{...ct(l),index:R}},{"data-node-id":z,onClick:pe(We)});return I(Ft,{children:[v(R),c(fe,{icon:c(me,{type:h.type,size:13}),name:w,onSelect:We,selected:Ct===z,hidden:!!h.props._hidden,...ue,fold:O?{open:!$,label:"section",onToggle:()=>nt(z)}:void 0,actions:I(se,{children:[An(l,R,w),Ln(l,R,h,w)]}),rowProps:Be}),O&&!$&&c(Je,{children:Io(h,2)})]},z)}),v(p.length)]})]})},Cs=(e,n)=>{let s=rt(e),l=(b,v)=>zn(b,v),p=ye(e.type),f=p?`${e.props.id}:${p.slot}`:null;return I(se,{children:[s.map(({child:b,zone:v,index:h})=>{let R=Ct===String(b.props.id),{collapsible:z,folded:w}=vo(b,n,Nn(b.type)),O=String(b.props.id),$=ys(b),We=()=>Xt(v,h,O,e.type),{rowProps:Be,...ue}=At.row({item:{id:O,zone:v,index:h,type:b.type},place:{...ct(v),index:h}},{"data-node-id":O,onClick:pe(We)});return I(Ft,{children:[h===0&&l(v,0),c(fe,{icon:c(me,{type:b.type,size:13}),name:$,onSelect:We,selected:R,hidden:!!b.props._hidden,...ue,fold:z?{open:!w,label:"group",onToggle:()=>nt(O)}:void 0,actions:I(se,{children:[An(v,h,$),Ln(v,h,b,$)]}),rowProps:Be}),z&&!w&&c(Je,{children:Cs(b,n+1)}),l(v,h+1)]},String(b.props.id??`${v}-${h}`))}),f&&!s.some(b=>b.zone===f)?l(f,0):null]})},Io=(e,n)=>{let s=rt(e),l=ye(e.type,e.type===nn?on(le?.data,String(e.props.id)):0),p=l?.spec??null,f=p&&Array.isArray(e.props[p.slot])?e.props[p.slot]:[],b=l&&l.choices?{slot:l.slot,choices:l.choices}:null,v=String(e.props.id),h=p&&!p.fixed?`${v}:${p.slot}`:null,R=b?`${v}:${b.slot}`:null,z=(w,O)=>{let $=w===h&&p&&!p.addBlocked?.(f)?()=>Rt(e.props.id,p.slot,p.childType,O,e.type):w===R?()=>Pn(w,O):void 0;return zn(w,O,$,w===h&&p?p.addLabel:"Add block here")};return I(se,{children:[s.map(({child:w,zone:O,index:$})=>{let We=Ct===String(w.props.id),Be=Cn(w),ue=String(w.props.id),{collapsible:qe,folded:ve}=vo(w,n,Nn(w.type)),ge=bo(w.type),Qt=ge.length===1?`${ue}:${ge[0]}`:null,ht=Qt?{...ct(Qt),index:Z(Qt).length}:void 0,en=At.dragging,On=ht&&en&&ko(en,ht)?ht:void 0,Bn=()=>Xt(O,$,ue,e.type),{rowProps:Po,...Ll}=At.row({item:{id:ue,zone:O,index:$,type:w.type},place:{...ct(O),index:$},into:On,canDrag:!Ht(w.type)},{"data-node-id":ue,onClick:pe(Bn)});return I(Ft,{children:[$===0&&z(O,0),c(fe,{icon:c(me,{type:w.type,size:13}),name:Be,onSelect:Bn,nameSlot:ul(O,$,ue,Be),selected:We,hidden:!!w.props._hidden,...Ll,fold:qe?{open:!ve,label:"group",onToggle:()=>nt(ue)}:void 0,actions:Ht(w.type)?void 0:I(se,{children:[An(O,$,Be),Ln(O,$,w,Be)]}),rowProps:Po}),qe&&!ve&&c(Je,{children:Io(w,n+1)}),z(O,$+1)]},String(w.props.id??`${O}-${$}`))}),p&&!p.fixed&&c(Or,{small:!0,label:p.addLabel,blocked:p.addBlocked?.(f)??null,onAdd:()=>Rt(e.props.id,p.slot,p.childType,f.length,e.type)}),R&&!s.some(w=>w.zone===R)?z(R,0):null]})},Ts=(()=>{if(!G||!oo)return null;let e=String(G.type),n=String(G.props.id),s=ye(e,e===nn?on(le?.data,n):0);if(!s||s.source==="footer")return null;let l=A.some(b=>String(b.props?.id)===n),p=Array.isArray(G.props[s.slot])?G.props[s.slot]:[];if(s.spec?.addBlocked?.(p))return null;let f=s.choices??(s.spec?[{type:s.spec.childType,label:Oe(s.spec.childType)}]:[]);return f.length===0?null:{parentName:l?be(e):Oe(e),choices:f,onPick:b=>{s.spec?Rt(n,s.slot,b,p.length,e):So(`${n}:${s.slot}`,b,p.length)}}})(),Ro=he||Ne!==null,Jt=[{id:"add",label:"Add",icon:c("span",{className:"sf-rail-plus","aria-hidden":"true",children:"+"}),active:he,onSelect:()=>he?En():Yt(null)},{id:"pages",label:"Pages",icon:c(Xd,{}),active:N&&!Ro&&ft==="pages",onSelect:()=>wn("pages")},{id:"sections",label:"Layers",icon:c(Ma,{}),active:N&&!Ro&&ft==="sections",onSelect:()=>wn("sections")}];return!ne&&$t&&Jt.push({id:"appearance",label:"Appearance",icon:c(Ec,{}),active:ze.kind==="website",onSelect:Xi}),ne&&Jt.push({id:"styles",label:"Site styles",icon:c(Zd,{}),active:N&&!Ro&&ft==="styles",onSelect:()=>wn("styles")}),mi?Jt.push({id:"media",label:"Media library",icon:c(Ha,{}),active:N&&!he&&(Ne!==null||ft==="media"),onSelect:()=>wn("media")}):pn&&Jt.push({id:"media",label:"Media library",icon:c(Ha,{}),onSelect:ll}),c(ur.Provider,{value:!0,children:c(Ys.Provider,{value:De,children:I("div",{ref:qt,className:"sf-editor es-editor",style:wr(Tt),onContextMenu:ns.onEditorContextMenu,children:[I(ec,{children:[c(ic,{items:Jt,ariaLabel:"Left panel views"}),I(qa,{children:[c(Fa,{label:"Undo",disabled:!Fe.hasPast,onClick:()=>Fe.back(),children:c(dc,{})}),c(Fa,{label:"Redo",disabled:!Fe.hasFuture,onClick:()=>Fe.forward(),children:c(ac,{})}),c(oc,{}),c(Qd,{devices:Kr,value:De,onChange:_a})]}),I(qa,{kind:"right",style:{minWidth:300},children:[c(Pc,{saveState:M,notSaving:!!F||D!=null,onToggle:re,onRetry:H}),xt.visible&&I("button",{type:"button",className:"es-btn-ghost",disabled:!xt.enabled,title:xt.enabled?"Save this website as a platform template":xt.disabledReason,onClick:fn,children:["Save as Template",c(li,{})]}),c("button",{type:"button",className:"es-btn-ghost",title:"Refresh the preview (reloads the canvas, keeps your place)",onClick:yl,children:"Refresh"}),un&&g&&I("a",{className:"es-btn-ghost",href:al,target:"_blank",rel:"noopener noreferrer",title:"Preview the live site (opens in a new tab)","aria-label":"Preview the live site in a new tab",children:["Preview",c(sc,{size:15})]}),c("button",{type:"button",className:"es-btn-primary",onClick:()=>{P(le.data)},children:_?"Publish":"Save"})]})]}),c(Yo,{}),I("div",{className:"sf-body",children:[N?I(se,{children:[c("div",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:he?c(ti,{blocks:q&&q.zone!==T&&!$e(q.zone)?Et(q.zone):Ts,blocksOnly:!!(q&&q.zone!==T&&!$e(q.zone)),at:q?{label:xl(q),onClear:()=>Ge(null)}:void 0,onAdd:Sl,itemFor:e=>({id:`new:${e.kind}:${e.kind==="template"?e.template.id:e.type}`,zone:"",index:-1,type:e.kind==="template"?e.template.node.type:e.type,add:e}),session:Co,siteWide:X?{chatEnabled:Ka.enabled,onToggleChat:e=>Ua({enabled:e}),onOpenChat:()=>{En(),ro()}}:void 0,onClose:En,onHide:ot,readOnly:!!F}):Ne&&Wt?c(Fo,{panel:Wt,pick:Ne,onHide:ot}):ft==="pages"?c(ni,{activeSurface:Ga,onPreviewSurface:bi,onNavigate:e=>{bi(null),Le(m?{kind:"template",id:m,pageSlug:e}:{kind:"page",slug:e,siteId:y??void 0})},onClose:ot}):ft==="styles"?c(oi,{tokenRef:S,siteId:y??void 0,onClose:ot,onNotify:mt,tab:ja,onTabChange:yi}):ft==="media"&&Wt?c(Fo,{panel:Wt,pick:null,onHide:ot}):I(se,{children:[c(lt,{icon:c(Ma,{}),title:"Layers",context:`/${g}`,actions:Ke.length>0?c(tc,{label:wo?"Expand all sections":"Collapse all sections",onClick:kl,children:c(Nc,{expand:wo})}):void 0,onHide:ot}),I(Jd,{className:"sf-tree sf-scroll",children:[c(fe,{icon:c(me,{type:"page",size:13}),name:"Page settings",onSelect:Ui,selected:!G&&oo,rowProps:{onClick:pe(Ui)}}),fs&&I(se,{children:[c(Jn,{children:"Header"}),ks(fs)]}),!de&&pt&&I(se,{children:[c(Jn,{children:"Header"}),c(fe,{icon:c(me,{type:"header",size:13}),name:"Header",onSelect:Yi,selected:ze.kind==="header",rowProps:{onClick:pe(Yi)}})]}),!de&&I(Jn,{children:["Template \xB7 ",to?"Home page":"Template"]}),A.map((e,n)=>{if(e.type===Ue||e.type===ee||rn(e.type))return null;let s=Ct===String(e.props.id),l=!!e.props._hidden,p=rt(e),f=String(e.props.id),b=e.type==="ContactLocations",v=Dn(e)||b,h=v&>(f),{rowProps:R,...z}=At.row({item:{id:f,zone:T,index:n,type:e.type},place:{...ct(T),index:n}},{"data-node-id":f,onClick:pe(()=>st(n))});return I(Ft,{children:[n>0&&ls(n),c(fe,{icon:c(me,{type:e.type,size:13}),name:Kt(e),onSelect:()=>st(n),selected:s,hidden:l,...z,fold:v?{open:!h,label:"section",onToggle:()=>nt(f)}:void 0,actions:I(se,{children:[An(T,n,Kt(e)),Ln(T,n,e,Kt(e))]}),rowProps:R}),Dn(e)&&!h&&I(Je,{children:[Io(e,1),e.type==="Hero"&&c(fe,{icon:c(me,{type:"ticker",size:13}),name:rr,onSelect:()=>hn(f),selected:io===f,rowProps:{onClick:pe(()=>hn(f))}})]}),b&&!h&&c(Je,{children:Al(e,n)})]},String(e.props.id??n))}),!de&&ms>0&&ls(ms),pt&&c(Jn,{children:"Footer"}),Re&&(()=>{let e=String(Re.props.id),n=rt(Re).length>0||!!ye(Re.type),s=n&>(e);return I(se,{children:[c(fe,{icon:c(me,{type:"footer",size:13}),name:"Footer",onSelect:()=>st(Pt),selected:Ct===String(Re.props.id),fold:n?{open:!s,label:"section",onToggle:()=>nt(e)}:void 0,rowProps:{onClick:pe(()=>st(Pt))}}),n&&!s&&c(Je,{children:Cs(Re,1)})]})})(),!de&&!Re&&pt&&c(fe,{icon:c(me,{type:"footer",size:13}),name:"Footer",onSelect:as,rowProps:{onClick:pe(as),title:"Edit the site footer"}}),gs&&ks(gs),c("div",{className:"sf-tree-tool",children:c(si,{})})]})]})}),c($a,{side:"left",width:Tt.left,min:_o,max:qo,defaultWidth:dt.left,label:"Resize Sections panel",onResize:Qa})]}):c(Oo,{side:"left",onShow:ot}),c("div",{ref:Vt,className:"sf-center sf-scroll",style:{overflowX:ol?"auto":"hidden",overflowY:"hidden"},children:c("div",{className:"sf-frame-scaler",style:il,children:c("div",{className:`sf-frame ${De==="desktop"?"":`sf-frame--${De}`}`,style:sl,children:I("div",{className:"sf-preview-host",children:[c(Gr,{},hi),c(Sc,{canvas:Ve,session:Co,model:Pl,canDrop:ko,onDrop:vs,onPick:El,onZoneAdd:e=>Pn(je(e),0),readOnly:!!F,revision:le.data}),xi.length>0&&c("div",{className:"sf-preview-gaps","aria-hidden":"true",children:xi.map(e=>I("button",{type:"button",tabIndex:-1,className:"sf-preview-gap",style:{top:e.top},title:"Add section here",onClick:()=>Yt(e.index),children:[c("span",{className:"sf-preview-gap-line"}),I("span",{className:"sf-preview-gap-pill",children:[c("span",{className:"sf-preview-gap-plus",children:"+"}),c("span",{className:"sf-preview-gap-label",children:"Add section"})]})]},e.index))})]})})})}),ce?I(se,{children:[c(Pr,{value:{selectChild:Xt,addChild:Rt,childRowName:Cn,blockRowName:ys},children:c(Rr,{mode:ze,onOpenWebsiteSettings:Xi,onOpenSiteStyles:()=>{yi(hr),gn("styles")},onSelectNode:Za,onNotify:mt,onHidePanel:Ki})}),c($a,{side:"right",width:Tt.right,min:_o,max:qo,defaultWidth:dt.right,label:"Resize settings panel",onResize:el})]}):c(Oo,{side:"right",onShow:Ki})]}),Sn&&I("div",{className:`sf-toast ${Sn.tone==="error"?"sf-toast--error":""}`,role:"status",children:[c("span",{className:"sf-toast-check","aria-hidden":"true",children:Sn.tone==="error"?"!":"\u2713"}),Sn.msg]},tl),ns.menu]})})})}export{Oc as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ta as u}from"./chunk-C2CHF6AL.js";import{t as C}from"./chunk-ENDWECYV.js";var F="inline",O=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var N={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"}},ge="SectionHeader";function ye(e){return e in N}function _(e){return u(O,F,e)}var B=new Set(["Flex"]);function G(e){return!!e?.type&&B.has(e.type)}function we(e,t,o){if(!G(t))return e;let n={};for(let[r,i]of Object.entries(e))o.includes(r)||(n[r]=i);return n}function be(e,t,o){if(_(t)!=="own-box")return e;let n={};for(let[r,i]of Object.entries(e))o.includes(r)||(n[r]=i);return n}import{createContext as I,useCallback as A,useContext as D,useState as f}from"react";import{jsx as H}from"react/jsx-runtime";var x=I({footerBlock:null,setFooterBlock:()=>{},headerGroup:null,setHeaderGroup:()=>{},refreshToken:0,refreshFooter:()=>{}});function xe({children:e,editFooter:t}){let[o,n]=f(null),[r,i]=f(null),[l,s]=f(0),a=A(()=>s(c=>c+1),[]);return H(x.Provider,{value:{footerBlock:o,setFooterBlock:n,headerGroup:r,setHeaderGroup:i,editFooter:t,refreshToken:l,refreshFooter:a},children:e})}var ke=()=>D(x);import{createContext as M,useContext as K,useMemo as U,useState as Y}from"react";import{jsx as W}from"react/jsx-runtime";var k=M(null);function Te({children:e}){let[t,o]=Y(null),n=U(()=>({surface:t,setSurface:o}),[t]);return W(k.Provider,{value:n,children:e})}function ve(){return K(k)??{surface:null,setSurface:()=>{}}}var{Provider:Oe,useSelection:Ne}=C("selectedLocationPartId");function _e(e,t,o){return`${e}::${t}::${o}`}function Be(e){if(!e)return null;let t=e.split("::");if(t.length<3)return null;let o=t[t.length-1];if(o!=="image"&&o!=="map")return null;let n=Number(t[t.length-2]);if(!Number.isInteger(n)||n<0)return null;let r=t.slice(0,-2).join("::");return r?{nodeId:r,index:n,part:o}:null}var $="plain",S=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],z="line",Q={KeyFeatures:"filled"};function j(e){return Q[e]??$}function Ae(e,t){return u(S,j(t),e)}function De(e){return u(S,z,e)}import{createContext as q,useContext as V}from"react";var Z=q(!1),Ke=()=>V(Z);import{useSyncExternalStore as J}from"react";var g=null,y=new Set;function We(e){if(g!==e){g=e;for(let t of y)t()}}function X(e){return y.add(e),()=>{y.delete(e)}}function $e(){return J(X,()=>g,()=>null)}function ze(e){if(!e)return null;let t=e.lastIndexOf(":");return t>0?e.slice(0,t):null}import{jsx as te,jsxs as ne}from"react/jsx-runtime";function ee({label:e,blocked:t,onAdd:o,small:n=!1}){return ne("button",{type:"button",className:"sf-add-card",disabled:t!==null,title:t??void 0,onClick:o,children:[te("span",{className:n?"sf-plus sf-plus--sm":"sf-plus",children:"+"}),e]})}import{useSyncExternalStore as oe}from"react";var re={level:"groups"},P=re,w=new Set;function Ze(e){P=e;for(let t of w)t()}function ie(e){return w.add(e),()=>{w.delete(e)}}var L=()=>P;function Je(){return oe(ie,L,L)}function T(e,t,o){let n=[];return e.forEach((r,i)=>{let l=t(r),s=n.find(a=>a.key===l);s||(s={key:l,name:o(r),items:[]},n.push(s)),s.items.push({item:r,index:i})}),n}function et(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 t=o=>e%o||o;return t(4)>=t(3)?"grid-cols-4":"grid-cols-3"}var d=e=>String(e?.group??""),b=new WeakMap,se=0;function le(e){let t=b.get(e);return t||(t=`loc${++se}`,b.set(e,t)),t}var ot=(e,t)=>t||e||"Ungrouped",v={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
2
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function p(e){return T(e,d,t=>String(t?.groupName??"")).map(t=>({key:t.key,name:t.name,cards:t.items.map(o=>o.item)}))}var h=e=>e.flatMap(t=>t.cards),R=(e,t,o)=>Math.min(Math.max(e,t),o);function ae(e,t,o){let n=0;for(let r=0;r<e.length;r++)if(d(e[r])===t){if(n===o)return r;n++}return-1}function rt(e,t,o){let n=p(e);if(t<0||t>=n.length)return e;let[r]=n.splice(t,1),i=R(t<o?o-1:o,0,n.length);return n.splice(i,0,r),h(n)}function it(e,t,o,n,r){let i=p(e),l=i.find(m=>m.key===t),s=i.find(m=>m.key===n);if(!l||!s||o<0||o>=l.cards.length)return e;let[a]=l.cards.splice(o,1),c=t===n?a:{...a,group:s.key,groupName:s.name};c!==a&&b.set(c,le(a));let E=R(l===s&&o<r?r-1:r,0,s.cards.length);return s.cards.splice(E,0,c),h(i)}function st(e,t){let o=p(e),n=o.find(i=>i.key===t),r={...v,group:t,groupName:n?.name??""};return n?(n.cards.push(r),h(o)):[...e,r]}function lt(e){let t=new Set(p(e).map(r=>r.key)),o=t.size+1,n=`Group ${o}`;for(;t.has(n);)n=`Group ${++o}`;return{cards:[...e,{...v,group:n,groupName:""}],key:n}}function at(e,t){return e.filter(o=>d(o)!==t)}function ct(e,t,o){let n=ae(e,t,o);return n<0?e:e.filter((r,i)=>i!==n)}function ut(e,t,o){let n=e.flatMap((l,s)=>d(l)===t?[s]:[]),r=e.slice();n.forEach((l,s)=>{r[l]=o[s]});let i=o.slice(n.length);return[...r.filter(l=>l!==void 0),...i]}function dt(e,t,o){return t.flatMap(n=>{let r=e.filter(i=>d(i)===n);return r.length?r:o(n)})}var ce="Main Pages",ue="Dynamic Pages",de="dynamic",pe="dynamic";function me(e){return e.kind===pe}function mt(e){let t=[],o=[];for(let n of e){if(me(n)){o.push(n);continue}let r=n.groupKey??(n.group?`folder:${n.group}`:"top"),i=t[t.length-1];i&&i.key===r?i.rows.push(n):t.push({key:r,label:n.group??ce,rows:[n]})}if(o.length){let n=t.findIndex(r=>r.key.startsWith("system:"));t.splice(n===-1?t.length:n,0,{key:de,label:ue,rows:o})}return t}export{N as a,ge as b,ye as c,_ as d,G as e,we as f,be as g,xe as h,ke as i,Te as j,ve as k,Oe as l,Ne as m,_e as n,Be as o,$ as p,S as q,z as r,j as s,Ae as t,De as u,Z as v,Ke as w,me as x,mt as y,We as z,$e as A,ze as B,ee as C,Ze as D,Je as E,T as F,et as G,d as H,le as I,ot as J,v as K,p as L,ae as M,rt as N,it as O,st as P,lt as Q,at as R,ct as S,ut as T,dt as U};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Symbol.for("efficient-web.efficient-backend");function E(e){return!!e&&e[h]===!0}function m(e){return e?.trim()||null}var u=null,g=new WeakMap;function _(e){u=e}function C(e=s()){if(e.hostBackend)return e.hostBackend;let t=g.get(e);if(!t){if(!u)throw new Error("efficient-web-builder: this editor was given no backend, and its host named no default one. Pass `backend`, or load the host's default backend first (the storefront's is lib/efficient-backend).");t=u(e),g.set(e,t)}return t}function T(e){if(!e.registry)throw new Error("efficient-web-builder: this editor was mounted with no block registry. Pass `registry` to createEditorSession (the storefront's is lib/puck/config).");return e.registry}function S(e={}){let t=e.backend??null,n=new Map,b={token:null,brandId:null},l={documentId:null,bridgedId:null};return{hostBackend:t,usesBridgedToken:t===null||E(t),blocks:e.blocks??null,registry:e.registry??null,chrome:e.chrome??null,documentHooks:e.documentHooks??null,auth:b,site:l,siteId:()=>l.documentId??l.bridgedId,cache(o,p){return n.has(o)||n.set(o,p()),n.get(o)},forget(o){o===void 0?n.clear():n.delete(o)}}}function D(e,t){e.site.documentId=m(t)}function L(e,t){e.site.bridgedId=m(t)}var I=S(),i=null,c=new Set;function s(){return i??I}function W(e){c.delete(e),i=e}function R(e){c.add(e),queueMicrotask(()=>{c.delete(e)&&i===e&&(i=null)})}function A(){return s().usesBridgedToken}var d="https://cdn.inovit.com"?.replace(/\/+$/,"");function a(e,t){let n=s().hostBackend?.media.resolve;if(!(!n||n===B))return n(e,t)??e}function y(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:data|blob):/i.test(e)}function x(e){return a(e)??k(e)}function k(e){return!d||y(e)?e:d+e.replace(/^\/media/,"")}var B=e=>k(e),v="";function P(e){if(!e)return null;let t=a(e);return t!==void 0?t:e.startsWith("/")?`${v}${e}`:e}function H(e){return/^https?:\/\//i.test(e)&&!(d&&e.startsWith(d+"/"))}function N(e){if(!e)return;let t=a(e);return t!==void 0?t:e.startsWith("/media/")?x(e):e}function O(e){let t=e.split("?")[0],n=t.substring(t.lastIndexOf("/")+1);try{return decodeURIComponent(n.replace(/^[0-9a-f]{32}_/i,""))||n}catch{return n}}var w="/videos/products/";function $(e){return!!e&&e.includes(w)}function f(e){return{getItem(t){try{return e()?.getItem(t)??null}catch{return null}},setItem(t,n){try{e()?.setItem(t,n)}catch{}},removeItem(t){try{e()?.removeItem(t)}catch{}}}}var r="__storefront_probe__";function V(e){try{e.setItem(r,r);let t=e.getItem(r)===r;return e.removeItem(r),t}catch{return!1}}var q=f(()=>typeof window>"u"?null:window.localStorage),K=f(()=>typeof window>"u"?null:window.sessionStorage);function X(e){return f(()=>e.defaultView?.localStorage??null)}export{h as a,E as b,_ as c,C as d,T as e,S as f,D as g,L as h,s as i,W as j,R as k,A as l,x as m,B as n,P as o,H as p,N as q,O as r,$ as s,V as t,q as u,K as v,X as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dg as l,Fg as p}from"./chunk-C2CHF6AL.js";import{Fragment as r,useState as d}from"react";import{Fragment as b,jsx as s,jsxs as o}from"react/jsx-runtime";function g({choices:m,onPick:c,open:i,onToggle:u}){let[f,a]=d(!1),n=i??f;return o(b,{children:[o("button",{type:"button",className:"sf-add-card","aria-expanded":n,onClick:u??(()=>a(e=>!e)),children:[s("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add block"]}),n&&s("div",{className:"sf-blockmenu",role:"menu",children:p(m).map(e=>o(r,{children:[e.group&&o("div",{className:"sf-menugroup-head",role:"presentation",children:[s("span",{className:"sf-menugroup-title",children:e.group}),s("span",{className:"sf-menugroup-count",children:e.items.length})]}),e.items.map(t=>o("button",{type:"button",className:"sf-blockmenu-item",role:"menuitem",onClick:()=>{a(!1),c(t.type)},children:[s("span",{className:"sf-chip",children:s(l,{type:t.type,size:13})}),s("span",{className:"sf-row-name",children:t.label})]},t.type))]},e.group??"all"))})]})}export{g as a};
|