efficient-web-builder 0.0.0 → 0.7.1
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 +230 -0
- package/LICENSE +10 -0
- package/README.md +230 -2
- package/dist/chunks/EditorPreviewCheckout-NMJHO2WR.js +4 -0
- package/dist/chunks/PreviewFooter-E3AVT663.js +1 -0
- package/dist/chunks/SectionEditorShell-CNJJULHO.js +1 -0
- package/dist/chunks/SiteEditorProvider-4NZYBEVE.js +1 -0
- package/dist/chunks/StorefrontEditorChrome-OF6DKLWG.js +1 -0
- package/dist/chunks/chunk-6C5FL63W.js +2 -0
- package/dist/chunks/chunk-A2QNXDQ6.js +11 -0
- package/dist/chunks/chunk-G3X5WFSD.js +1 -0
- package/dist/chunks/chunk-INA2LIFW.js +230 -0
- package/dist/chunks/chunk-JSOIOPWC.js +1 -0
- package/dist/chunks/chunk-NTGUUW2T.js +1 -0
- package/dist/chunks/chunk-PAXN7G3Y.js +1 -0
- package/dist/chunks/chunk-QVG6K5WY.js +15 -0
- package/dist/chunks/chunk-QVG6K5WY.js.LEGAL.txt +27 -0
- package/dist/chunks/chunk-UBYBQ3KR.js +1 -0
- package/dist/chunks/chunk-V2G3QFLM.js +143 -0
- package/dist/chunks/chunk-V2G3QFLM.js.LEGAL.txt +4 -0
- package/dist/chunks/chunk-Y6SLVHK3.js +1 -0
- package/dist/chunks/chunk-YMLSAFSM.js +1 -0
- package/dist/chunks/fitment-data-6OYGRNMJ.js +1 -0
- package/dist/chunks/gallery-builds-data-SWA6XKFF.js +1 -0
- package/dist/chunks/headers-3CAQXQEY.js +1 -0
- package/dist/chunks/render-client-O7623TWA.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 +541 -0
- package/dist/index.js +10844 -0
- package/package.json +47 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{$ as co,$b as aa,Ab as iu,Bb as cu,C as Kd,Cb as ta,D as lo,Db as ar,E as so,Eb as oa,F as or,Fb as ra,G as rr,Ga as qd,Gb as na,H as $d,Hb as fu,Ib as du,Ja as _o,Jb as uu,K as ps,Ka as xs,Kb as pu,Kc as yu,La as Jn,Lc as Zr,M as Vd,Ma as Yd,N as ms,Nb as Xe,Pb as fo,Qa as Xd,Ra as jd,Ta as Jd,Ub as mu,Wa as Zn,Y as io,Ya as Zd,Z as Eo,a as Pe,aa as jn,b as no,bb as gs,cc as xu,cd as hs,d as fs,dc as gu,dd as Su,eb as Qd,ec as Iu,fd as Cu,gb as eu,h as Md,hb as tu,hc as hu,i as Kt,k as Qo,kc as bu,ob as nr,od as Pu,pb as ou,pd as la,qb as ru,r as et,rb as nu,rd as uo,s as Hd,sb as Is,tb as au,td as bs,ub as lu,vb as Qn,wb as ea,y as us,z as Jr,zb as su}from"./chunk-A2QNXDQ6.js";import{A as Ro,E as at,F as Gd,G as er,H as Wd,J as Ud,P as Tt,Q as Fo,R as zd,S as tr,T as oe,a as Ed,b as is,d as _d,e as Ad,f as Ye,g as cs,h as Ld,j as Od,k as Nd,l as Bd,m as Yn,n as zt,p as Dd,u as ds,y as Xn}from"./chunk-PAXN7G3Y.js";import{b as ao}from"./chunk-UBYBQ3KR.js";import{useEffect as hS,useState as bS}from"react";function lr(){return Ye().auth.token}function ku({fetch:e,keyBy:t}){let o=null,r=null,n=null;return(a=!1)=>{let l=lr(),s=t?t():null;return(a||!o||r===null&&l!==null||n!==s)&&(r=l,n=s,o=l?e(l,s).catch(()=>[]):Promise.resolve([])),o}}var sa=ku({fetch:(e,t)=>oe.listProducts(e,{siteId:t,kinds:["alloy-wheel","tyre"]}),keyBy:Ro}),Ao=(e=!1)=>sa(e).then(t=>t.filter(o=>o.kind==="alloy-wheel"));function wu(e){let[t,o]=bS(null);return hS(()=>{let r=!1;return e().then(n=>{r||o(n)}),()=>{r=!0}},[e]),t}function QO(){return wu(Ao)}function eN(){return wu(sa)}import{useMemo as yS}from"react";import{useEasel as SS}from"efficient-easel/easel";function vu(e={}){let{dispatch:t}=SS(r=>r),o=e.readOnly===!0;return yS(()=>{let r=(a,l,s)=>{let i=_o(l);return o||t({type:"insert",componentType:l,destinationZone:a,destinationIndex:s,id:i}),i},n=(a,l,s)=>{o||t({type:"replace",destinationZone:a,destinationIndex:l,data:s})};return{insertComponent:r,insertSection:(a,l)=>r(Yd,a,l),replaceComponent:n,seedChild:(a,l,s,i)=>{let c=r(a,s,l);n(a,l,{type:s,props:{id:c,...i}})},insertNode:(a,l,s)=>{let i=r(a,s.type,l);return n(a,l,{type:s.type,props:{...s.props,id:i}}),i},removeComponent:(a,l)=>{o||t({type:"remove",index:l,zone:a})},reorderComponent:(a,l,s)=>{o||t({type:"reorder",sourceIndex:l,destinationIndex:s,destinationZone:a})},duplicateComponent:(a,l)=>{o||t({type:"duplicate",sourceIndex:l,sourceZone:a})},select:a=>t({type:"setUi",ui:{itemSelector:a}}),setDocument:a=>{o||t({type:"setData",data:a})},commitDocument:a=>{o||t({type:"setData",data:()=>a,recordHistory:!0})}}},[t,o])}var bt=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],ia="bottom-left";var Qr={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function CS(e){let t=bt.indexOf(po(e));return{band:Math.floor(t/3),column:["start","center","end"][t%3]}}function PS(e){return 1+CS(e).band*6}function lN(e){return PS(e)+1}function po(e){return bt.includes(e)?e:ia}function sN(e){let t=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(t)))}function iN(e,t=60){let o=typeof e=="number"&&Number.isFinite(e)?e:t;return Math.max(30,Math.min(100,Math.round(o)))}function ys(e,t){let o=po(t);return e.filter(r=>po(r?.props?.placement)===o).length}function Tu(e){return`${Qr[po(e)]} already holds 4 boxes. Move one somewhere else first.`}function Ss(e,t){let o=e.filter(r=>r?.props?.id!==t);return bt.map(r=>{let n=ys(o,r)>=4,a=Qr[r];return n?{value:r,label:a,disabled:!0,title:Tu(r)}:{value:r,label:a}})}function ca(e,t){let o=t===void 0?ia:po(t?.props?.placement);return ys(e,o)>=4?Tu(o):null}var Ru="HeroGroup";function cN(e){let t=new Map,o=!1,r=e.filter(n=>{let a=po(n?.props?.placement),l=(t.get(a)??0)+1;return t.set(a,l),l<=4?!0:(o=!0,!1)});return o?r:e}function kS(e){return bt.map(t=>{let o=ys(e,t);return{anchor:t,total:o,hidden:o-4}}).filter(t=>t.hidden>0)}function Cs(e){let t=kS(e);return t.length===0?null:t.map(({anchor:o,total:r,hidden:n})=>{let a=Qr[o],l=n===1?"1 is not shown":`${n} are not shown`;return`${a} holds ${r} boxes. The published page draws the first 4, so ${l}. ${n===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function fN(e,t){let o=t;if(o?.type!==Ru)return null;let r=o.props?.id===void 0?"":String(o.props.id);return r?ca(Ps(e,r),o):null}function Ps(e,t){let o=Fu(e,t);return o&&o.ownerType===vS?o.siblings:[]}function dN(e,t){let o=Fu(e,t);return o?o.ancestorTypes.filter(r=>r===Ru).length:wS}var wS=1,vS="HeroSlide";function Fu(e,t){let o=n=>Array.isArray(n)&&n.length>0&&n.every(a=>!!a&&typeof a=="object"&&typeof a.type=="string"),r=(n,a,l)=>{if(a>12||!n||typeof n!="object")return null;if(o(n)){if(n.some(s=>s?.props?.id===t))return{siblings:n,ownerType:l.at(-1)??null,ancestorTypes:l};for(let s of n){let i=s.type,c=r(s,a+1,[...l,String(i)]);if(c)return c}return null}for(let s of Object.values(n)){let i=r(s,a+1,l);if(i)return i}return null};return r(e,0,[])}var lt="site-footer";var pN=lt,mN={desktop:!0,tablet:!0,mobile:!0},xN={desktop:!1,tablet:!1,mobile:!1},ks=1,Eu=6,gN=Array.from({length:Eu-ks+1},(e,t)=>ks+t),fa={desktop:6,tablet:3,mobile:2},TS={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},Lo=e=>Math.min(Math.max(Math.round(e),ks),Eu);function IN(e){if(typeof e=="number")return TS[Lo(e)]??{desktop:Lo(e),tablet:Lo(e),mobile:Lo(e)};if(e&&typeof e=="object"){let t=e;return{desktop:Lo(t.desktop??fa.desktop),tablet:Lo(t.tablet??fa.tablet),mobile:Lo(t.mobile??fa.mobile)}}return{...fa}}function RS(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type==="Footer")??null:null}function hN(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type===FS)??RS(e):null}var FS="SiteFooter",ES="SiteHeader";function bN(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type===ES)??null:null}function je(e,t){if(typeof e=="string")return e||t;if(e&&typeof e=="object"&&"text"in e){let o=e.text;return typeof o=="string"&&o?o:t}return t}function _u(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function Au(e,t){return typeof e=="boolean"?e:t}function da(e,t){if(!Array.isArray(e))return t;let o=e.map(r=>typeof r=="string"?r:je(r?.text,"")).map(r=>r.trim()).filter(Boolean);return o.length?o:t}var ua="cart-drawer",PN="cart-drawer";var _S={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function kN(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function wN(e){let t=e??{},o=_S;return{kickerBadge:je(t.kickerBadge,o.kickerBadge),kickerText:je(t.kickerText,o.kickerText),titleLead:je(t.titleLead,o.titleLead),titleAccent:je(t.titleAccent,o.titleAccent),subtitleEmpty:je(t.subtitleEmpty,o.subtitleEmpty),subtitleOne:je(t.subtitleOne,o.subtitleOne),subtitleMany:je(t.subtitleMany,o.subtitleMany),leadTimeValue:je(t.leadTimeValue,o.leadTimeValue),shipsToFallback:je(t.shipsToFallback,o.shipsToFallback),promises:da(t.promises,o.promises),emptyKicker:je(t.emptyKicker,o.emptyKicker),emptyBody:je(t.emptyBody,o.emptyBody)}}var AS=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],RN={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},LS={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},FN={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function OS(e){return typeof e=="string"&&Kt.includes(e)?e:null}function Lu(e){let t={};for(let o of AS){let r=OS(e[LS[o]]);r&&(t[o]=r)}return t}var Ts="subscribe-popup",NN="subscribe-popup";var NS=[Ts,lt,ua];function en(e){return NS.includes(e)}var BS=["delay","scroll","exit"],DS=["all","chosen"],MS=["visit","days","never"],HS=["right","left"],GS={min:0,max:60},WS={min:10,max:90},US={min:1,max:90},vs={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
2
|
+
*Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},xe=je,zS=_u,Ou=Au,Bu=da;function pa(e,t,o){return typeof t=="string"&&e.includes(t)?t:o}function ws(e,t,o){let r=zS(e,o);return Math.min(t.max,Math.max(t.min,Math.round(r)))}function KS(e){return typeof e.hideAfter=="string"?pa(MS,e.hideAfter,vs.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":vs.hideAfter}function $S(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Nu(e,t){if(e==null)return t;let o=r=>r.trim()?r:"";if(typeof e=="string")return o(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?o(r):""}return t}function VS(e,t){return Array.isArray(e)?Bu(e,[]):t}function qS(e,t){return Array.isArray(e)?e.map(o=>{let r=o??{};return{label:xe(r.label,""),value:xe(r.value,"")}}).filter(o=>o.label||o.value):t}function BN(e){let t=e??{},o=vs;return{metaLabel:xe(t.metaLabel,o.metaLabel),issueLabel:Nu(t.issueLabel,o.issueLabel),issueNumber:Nu(t.issueNumber,o.issueNumber),kicker:xe(t.kicker,o.kicker),heading:xe(t.heading,o.heading),deck:xe(t.deck,o.deck),stats:qS(t.stats,o.stats),formLabel:xe(t.formLabel,o.formLabel),formHeading:xe(t.formHeading,o.formHeading),formIntro:xe(t.formIntro,o.formIntro),firstNameLabel:xe(t.firstNameLabel,o.firstNameLabel),firstNamePlaceholder:xe(t.firstNamePlaceholder,o.firstNamePlaceholder),emailLabel:xe(t.emailLabel,o.emailLabel),emailPlaceholder:xe(t.emailPlaceholder,o.emailPlaceholder),interestsLabel:xe(t.interestsLabel,o.interestsLabel),interests:Bu(t.interests,o.interests),frequencyLabel:xe(t.frequencyLabel,o.frequencyLabel),frequencies:VS(t.frequencies,o.frequencies),submitText:xe(t.submitText,o.submitText),finePrint:xe(t.finePrint,o.finePrint),dismissText:xe(t.dismissText,o.dismissText),emailInvalidText:xe(t.emailInvalidText,o.emailInvalidText),submitErrorText:xe(t.submitErrorText,o.submitErrorText),successHeading:xe(t.successHeading,o.successHeading),successBody:xe(t.successBody,o.successBody),keepBrowsingText:xe(t.keepBrowsingText,o.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():o.formSlug,autoOpen:Ou(t.autoOpen,o.autoOpen),autoOpenDelaySec:ws(t.autoOpenDelaySec,GS,o.autoOpenDelaySec),trigger:pa(BS,t.trigger,o.trigger),scrollPercent:ws(t.scrollPercent,WS,o.scrollPercent),showOn:pa(DS,t.showOn,o.showOn),showOnPages:$S(t.showOnPages),hideAfter:KS(t),hideDays:ws(t.hideDays,US,o.hideDays),formSide:pa(HS,t.formSide,o.formSide),valuePanelOnPhone:Ou(t.valuePanelOnPhone,o.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Lu(t)}}var mo=class extends Error{constructor(t,o,r={}){super(o??YS[t],r.cause===void 0?void 0:{cause:r.cause}),this.name="WebsiteBackendError",this.kind=t,this.conflict=r.conflict,this.holder=r.holder}},YS={unauthorized:"The editor's sign-in was refused.","changed-elsewhere":"This page was changed somewhere else.","lock-taken":"Somebody else is editing this page.","not-found":"This no longer exists.",invalid:"The request was refused.",unavailable:"The server could not be reached."};function ma(e,t){if(!e||typeof e!="object")return!1;let o=e;return o.name!=="WebsiteBackendError"||typeof o.kind!="string"?!1:t===void 0||o.kind===t}import{readLockHolder as pC}from"efficient-easel/edit-lock";var Fs="/api/storefront/section-templates/",Rs=e=>`${Fs}${encodeURIComponent(e)}/`,Es=e=>e.node!=null;function xa(e){if(!Es(e))throw new Error(`Section template ${e.id} has no design`);return e}var As=(e,t)=>e instanceof at&&e.status===t;function XS(e){return{list:()=>tr(`${Fs}?no_page=true`,{token:e()}).then(t=>Array.isArray(t)?t:t.results??[]),get:t=>tr(Rs(t),{token:e()}).catch(o=>{if(As(o,404))return null;throw o}),create:t=>tr(Fs,{method:"POST",token:e(),body:JSON.stringify(t)}),patch:(t,o)=>tr(Rs(t),{method:"PATCH",token:e(),body:JSON.stringify(o)}),remove:t=>tr(Rs(t),{method:"DELETE",token:e()})}}var _s="sf:section-templates",Du=`${_s}.imported`,jS="Untitled section",JS=160,ga=e=>(typeof e=="string"?e.trim().slice(0,JS):"")||jS;function ZS(e){try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(o=>{let r=o?.node;return typeof o?.id=="string"&&typeof r?.type=="string"}):[]}catch{return[]}}async function QS(e,t=ds){let o={created:0,seeded:0,left:0,skipped:0,kept:!1},r=t.getItem(_s);if(r===null)return o;for(let n of ZS(r))try{let a=await e.get(n.id);if(a)a.node==null?(await e.patch(n.id,{node:n.node}),o.seeded+=1):o.left+=1;else try{await e.create({id:n.id,name:ga(n.name),node:n.node}),o.created+=1}catch(l){if(!As(l,400))throw l;o.skipped+=1}}catch{return{...o,kept:!0}}return t.setItem(Du,r),t.getItem(Du)===r&&t.removeItem(_s),o}var Ia=class{constructor(t,o=ds){this.readToken=t;this.storage=o;this.imported=null;this.http=XS(t)}ready(){return this.imported?this.imported:this.readToken()?(this.imported=QS(this.http,this.storage).catch(()=>{}),this.imported):Promise.resolve()}async list(){return await this.ready(),(await this.http.list()).filter(Es)}async get(t){return await this.ready(),this.http.get(t)}async ensure(t,o,r){await this.ready();let n=async l=>l?Es(l)?l:xa(await this.http.patch(t,{node:r})):null,a=await n(await this.http.get(t));if(a)return a;try{return xa(await this.http.create({id:t,name:ga(o),node:r}))}catch(l){if(As(l,400)){let s=await n(await this.http.get(t));if(s)return s}throw l}}async save(t,o){return await this.ready(),xa(await this.http.create({name:ga(t),node:o}))}async update(t,o){return await this.ready(),xa(await this.http.patch(t,{node:o}))}async rename(t,o){return await this.ready(),this.http.patch(t,{name:ga(o)})}async remove(t){await this.ready(),await this.http.remove(t)}};var dt="homepage";var eC="product",tC="tyre";var oC="productType",rC={[eC]:"alloy-wheel",[tC]:"tyre"},nC=["alloy-wheel","tyre"];function zN(e,t){return aC(t)??rC[e]??null}function aC(e){let t=e?.[oC];return typeof t=="string"&&nC.includes(t)?t:null}var lC=["home","products","gallery","about","contact"],sC=e=>{let t=e.slug.trim().toLowerCase(),o=(e.title??"").trim().toLowerCase(),r=lC.findIndex(n=>n===t||n===o);return r===-1?Number.POSITIVE_INFINITY:r},Mu=e=>e.map((t,o)=>({page:t,idx:o,rank:sC(t)})).sort((t,o)=>t.rank-o.rank||t.idx-o.idx).map(t=>t.page);var Wu="Popups",Hu="Site",iC="Main Pages",cC="Dynamic Pages",fC="dynamic",dC="dynamic";function uC(e){return e.kind===dC}var Uu={[Ts]:{label:"Site popup",group:Wu},[lt]:{label:"Footer",group:Hu},[ua]:{label:"Cart drawer",group:Hu}};function tn(e){return Uu[e.slug]?.label||e.title||e.slug}function Ls(e){let t=e.group?.trim();return t||null}function Gu(e,t){let o=new Map;for(let r of e){let n=t(r),a=o.get(n);a?a.push(r):o.set(n,[r])}return o}function zu(e){let t=Mu(e),o=[],r=t.filter(s=>!en(s.slug)),n=r.filter(s=>!Ls(s));n.length&&o.push({key:"top",group:null,pages:n});let a=r.filter(s=>Ls(s));for(let[s,i]of Gu(a,c=>Ls(c)))o.push({key:`folder:${s}`,group:s,pages:i});let l=t.filter(s=>en(s.slug));for(let[s,i]of Gu(l,c=>Uu[c.slug]?.group??Wu))o.push({key:`system:${s}`,group:s,pages:i});return o}function ZN(e){let t=[],o=[];for(let r of e){if(uC(r)){o.push(r);continue}let n=r.groupKey??(r.group?`folder:${r.group}`:"top"),a=t[t.length-1];a&&a.key===n?a.rows.push(r):t.push({key:n,label:r.group??iC,rows:[r]})}if(o.length){let r=t.findIndex(n=>n.key.startsWith("system:"));t.splice(r===-1?t.length:r,0,{key:fC,label:cC,rows:o})}return t}var rn="page_changed_elsewhere",on=e=>e.layout_updated_at??e.updated_at??null;function mC(e){if(!e||typeof e!="object")return null;let t=e;return t.code!==rn?null:{savedBy:typeof t.saved_by=="string"?t.saved_by:"",savedByYou:t.saved_by_you===!0,secondsAgo:typeof t.seconds_ago=="number"?t.seconds_ago:0}}function xC(e){return e===401||e===403?"unauthorized":e===404?"not-found":e===er||e>=500?"unavailable":"invalid"}function gC(e){if(!(e instanceof at))return e;if(e.status===409){let t=mC(e.data);if(t)return new mo("changed-elsewhere",e.message,{conflict:t,cause:e});let o=pC(e.data);if(o)return new mo("lock-taken",e.message,{holder:o,cause:e})}return new mo(xC(e.status),e.message,{cause:e})}var IC={group:"Template pages",groupKey:"template"},Ku=e=>({id:e.id,slug:e.slug,label:e.title||e.slug,...IC,draft:!1});function Vu(e){let t=async s=>{let i=e.token();if(!i)throw new mo("unauthorized","The editor has no sign-in yet.");try{return await s(i)}catch(c){throw gC(c)}},o={list:s=>t(async i=>{let c=await oe.listPages(i,s?.siteId);return zu(c.filter(f=>f.slug!==lt)).flatMap(f=>f.pages.map(u=>({id:u.id,slug:u.slug,label:tn(u),group:f.group,groupKey:f.key,draft:!u.is_published,kind:u.kind??null})))}),load:s=>t(async i=>{let c="id"in s?s.id:(await oe.findPageBySlug(s.slug,i,s.siteId))?.id,f=c?await oe.getPageById(c,i):null;return f?{id:f.id,layout:f.layout,kind:f.kind,version:on(f)}:null}),save:(s,i,c)=>{let{version:f}=c;return f?t(async u=>({version:on(await oe.saveLayout(s,i.layout,u,f,c.clientId||void 0))})):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:s=>t(i=>oe.getPageById(s,i).then(on)),publish:(s,i)=>t(async c=>({version:on(await oe.publishPage(s,c,i?.version))}))},r=s=>({list:()=>t(async i=>(await oe.listTemplatePages(s,i)).map(Ku)),load:i=>t(async c=>{let f=x=>"id"in i?x.id===i.id:x.slug===i.slug,u=x=>({id:x.id,layout:x.layout,version:null}),d=await oe.listTemplatePages(s,c);if(d.length)return u(d.find(f)??d[0]);let p=await oe.getTemplate(s,c).catch(()=>null);try{return u(await oe.createTemplatePage(s,{slug:dt,title:"Home",layout:p?.layout??{}},c))}catch{let x=await oe.listTemplatePages(s,c),g=x.find(f)??x[0];return g?u(g):null}}),save:(i,c)=>t(async f=>(await oe.saveTemplatePageLayout(i,c.layout,f),{version:null})),create:i=>t(async c=>Ku(await oe.createTemplatePage(s,{slug:i.slug,title:i.title,layout:i.layout},c))),remove:i=>t(c=>oe.deleteTemplatePage(i,c))}),n=s=>{let i=s?.siteId??e.siteId();if(!i)throw new mo("not-found","This editor is not connected to a website.");return i},a=s=>({name:s.name,slug:s.slug,mapsApiKey:s.maps_api_key,mapsMapId:s.maps_map_id}),l={pages:o,lock:{claim:(s,i,c)=>t(async f=>({heartbeatSeconds:(await oe.claimPageEditLock(s,f,i,c)).heartbeat_seconds})),release:s=>t(i=>oe.releasePageEditLock(s,i))},site:{get:s=>t(async i=>a(await oe.getSite(n(s),i))),update:(s,i)=>t(async c=>a(await oe.updateSite(n(i),s.mapsApiKey===void 0?{}:{maps_api_key:s.mapsApiKey},c)))},media:{resolve:Nd},sectionTemplates:new Ia(e.token),templates:{get:s=>t(async i=>{let c=await oe.getTemplate(s,i);return{id:c.id,name:c.name}}),pages:r}};return l[Ed]=!0,l}var $u=new WeakMap;function nn(e=Ye()){if(e.hostBackend)return e.hostBackend;let t=$u.get(e);return t||(t=Vu({token:()=>e.auth.token,siteId:()=>e.siteId()}),$u.set(e,t)),t}function cB(e={}){return Vu({token:()=>Ye().auth.token,siteId:()=>e.siteId??Ye().siteId()})}var qu=["general","commerce","service"],sr=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero Slideshow",set:"general"},{type:"HeroSingle",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"BrandStrip",label:"Brand Strip",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"},{type:"SpecStrip",label:"Spec Strip",set:"general"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"DeliveryOptions",label:"Delivery Options",set:"commerce"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Cards",label:"Cards",set:"general"},{type:"KeyFeatures",label:"Key Features",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Series",label:"Recurring Columns",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"},{type:"DocMetaCards",label:"Document Detail Cards",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Spacer",label:"Spacer",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function dB(){return Object.fromEntries(sr.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var hC={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns on phone`. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/puck/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/puck/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},uB=["Grid"],pB=Array.from(new Set([...sr.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(hC)])),mB=Object.fromEntries(sr.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),bC={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},ha={...bC,...Object.fromEntries(sr.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function Yu(e){return Object.prototype.hasOwnProperty.call(ha,e)?ha[e]:void 0}function Os(e){return Object.keys(ha).filter(t=>ha[t]===e).sort()}var xB=Os("general"),gB=Os("commerce"),IB=Os("service"),yC="Flex",xo="Box",hB=`${xo}es`;function SC(e){return e==="section"?"Blank section":xo}function bB(e,t,o){return e===yC?SC(t):o}import{createContext as CC,useContext as PC,useEffect as kC}from"react";import{jsx as wC}from"react/jsx-runtime";var Xu=CC(null);function PB({session:e,children:t}){return cs(e),kC(()=>(cs(e),()=>Ld(e)),[e]),wC(Xu.Provider,{value:e,children:t})}function ba(){return PC(Xu)??Ye()}var Ns="sf-editor-footer-return";function vB(e){if(!(typeof window>"u"))try{window.sessionStorage.setItem(Ns,e)}catch{}}function Bs(){if(typeof window>"u")return null;try{return window.sessionStorage.getItem(Ns)}catch{return null}}function Ds(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(Ns)}catch{}}import{accessForNewDocument as vC}from"efficient-easel/edit-lock";function ju(e){return e.failed?"error":e.pending?"saving":e.saved?"saved":"idle"}function FB(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function Ju(e,t){t.resetAutosave(),t.setVersion(null),t.setSaveConflict(null),t.setAccess(vC(e))}import{createContext as TC,useContext as RC,useEffect as FC,useSyncExternalStore as EC}from"react";import{jsx as OC}from"react/jsx-runtime";var Zu=TC(null),an=null;function AB({panel:e,children:t}){return an=e,FC(()=>(an=e,()=>{an===e&&(an=null,op(Rt?.request.requestId??"",null))}),[e]),OC(Zu.Provider,{value:e,children:t})}function LB(){return RC(Zu)}function Qu(){return an!==null}var Rt=null,Ms=new Set,ep=()=>{for(let e of[...Ms])e()};function tp(e){return new Promise(t=>{let o=Rt;Rt={request:e,resolve:t},ep(),o?.resolve(null)})}function op(e,t){if(!Rt||Rt.request.requestId!==e)return;let{resolve:o}=Rt;Rt=null,ep(),o(t)}function OB(){Rt&&op(Rt.request.requestId,null)}function _C(e){return Ms.add(e),()=>{Ms.delete(e)}}var AC=()=>Rt?.request??null,LC=()=>null;function NB(){return EC(_C,AC,LC)}var Hs=new Map,rp=0;function NC(){return rp+=1,`mp-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(rp)}`}function Gs(e,t){if(!e.connected)return Promise.resolve(null);let o=NC();return Qu()?tp({requestId:o,accept:t.accept,title:t.title,file:t.file??null}):new Promise(r=>{Hs.set(o,r),e.send("storefront-editor:open-media-picker",{requestId:o,accept:t.accept,title:t.title,...t.file?{file:t.file}:{}})})}function Ws(e,t){let o=Hs.get(e);o&&(Hs.delete(e),o(t))}var BC={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"};function DC(e){return Array.isArray(e)&&e.length>0&&e.every(t=>!!t&&typeof t=="object"&&typeof t.type=="string")}function Us(e){let t=e.props,o=!1;if(e.type&&t)for(let[r,n]of Object.entries(BC)){let a=r.indexOf("."),l=r.slice(0,a),s=r.slice(a+1);if(l!==e.type||!(s in t))continue;let i=t[s],c={...t};delete c[s],(!(n in c)||c[n]===void 0)&&(c[n]=i),t=c,o=!0}if(t){let r=t;for(let[n,a]of Object.entries(t)){if(!DC(a))continue;let l=a.map(Us);l.some((s,i)=>s!==a[i])&&(r===t&&(r={...t}),r[n]=l,o=!0)}t=r}return o?{...e,props:t}:e}function np(e){let t=e;if(!t||typeof t!="object")return e;let o=!1,r={...e};if(Array.isArray(t.content)){let n=t.content.map(Us);n.some((a,l)=>a!==t.content[l])&&(r.content=n,o=!0)}if(t.zones&&typeof t.zones=="object"){let n=!1,a=Object.fromEntries(Object.entries(t.zones).map(([l,s])=>{if(!Array.isArray(s))return[l,s];let i=s.map(Us);return i.some((c,f)=>c!==s[f])&&(n=!0),[l,i]}));n&&(r.zones=a,o=!0)}return o?r:e}import{createContext as IT,useCallback as ke,useContext as hT,useEffect as ut,useMemo as Ic,useRef as ot,useState as St}from"react";var MC={general:!0,commerce:!0,service:!0};function zs(e){let t=e?.sets;return t?Object.fromEntries(qu.map(o=>[o,t.includes(o)])):MC}function ln(e=Ye()){return zs(e.blocks)}function ap(e,t){let o=t?{siteId:t}:void 0;return{resolve:r=>e.load({slug:r,...o}),saveLayout:(r,n,a,l)=>e.save(r,{layout:n},{version:a,clientId:l??""}),rereadVersion:e.version?r=>e.version(r):void 0,publish:e.publish?(r,n)=>e.publish(r,n?{version:n}:void 0):void 0,listPages:()=>e.list(o),createPage:e.create?r=>e.create({...r,...o}):void 0,deletePage:e.remove?r=>e.remove(r):void 0}}function lp(e,t=nn(),o=ln()){let r=is(t),n=e?{siteId:e}:void 0,a=r?!!e:!0,l=t.site.update;return{capabilities:{canPublish:!!t.pages.publish,hasSiteSettings:r,hasSiteTheme:r,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!t.pages.create,canDeletePagesInline:!!t.pages.remove,hasEditLock:!!t.lock,hasEditGuard:!0,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:!1,hasSiteRecord:a,canEditSiteRecord:a&&!!l,hasPreviewLink:r||!!t.preview,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...ap(t.pages,e),lock:t.lock,site:a?()=>t.site.get(n):void 0,updateSite:a&&l?s=>l(s,n):void 0,previewHref:t.preview?s=>t.preview.href(s):void 0}}function sp(e,t=nn(),o=ln()){let r=is(t),n=t.templates,a=n?n.pages(e):{list:()=>Promise.reject(new Error(Ks)),load:()=>Promise.reject(new Error(Ks)),save:()=>Promise.reject(new Error(Ks))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!a.create,canDeletePagesInline:!!a.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...ap(a,void 0),publish:void 0,templateName:n?()=>n.get(e).then(l=>l.name):void 0}}var Ks="This editor's backend has no website templates.";import{EDIT_LOCK_TAKEN as HC}from"efficient-easel/edit-lock";var GC={unauthorized:401,"changed-elsewhere":409,"lock-taken":409,"not-found":404,invalid:400,unavailable:er};function $s(e){if(e instanceof at)return{status:e.status,data:e.data};if(!ma(e))return null;if(e.cause instanceof at)return{status:e.cause.status,data:e.cause.data};let t=GC[e.kind];return e.kind==="changed-elsewhere"?{status:t,data:{code:rn,saved_by:e.conflict?.savedBy??"",saved_by_you:e.conflict?.savedByYou===!0,seconds_ago:e.conflict?.secondsAgo??0}}:e.kind==="lock-taken"?{status:t,data:{code:HC,holder_name:e.holder?.name??"",seconds_since_seen:e.holder?.secondsSinceSeen??0,seconds_since_held:e.holder?.secondsSinceHeld??0}}:{status:t,data:null}}function ip(e){return $s(e)?.status===401}import{Fragment as WC}from"react";function ya(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}import{jsx as UC,jsxs as zC}from"react/jsx-runtime";var Sa=["FusionForge\xAE","Precision Forged","Monoblock Cast"];function Vs(e){return ya(e)}function cp(e){let t=e.split("\xAE");return t.length===1?e:t.map((o,r)=>zC(WC,{children:[o,r<t.length-1&&UC(Hd,{})]},r))}var fp=Sa.map((e,t)=>({key:e,num:String(t+1).padStart(2,"0"),title:cp(e)}));function qs(e){if(e.length===0)return[...Sa];let t=new Set(e.map(o=>o.process));return Sa.filter(o=>t.has(o))}function dp(e){return qs(e).map((t,o)=>({key:t,num:String(o+1).padStart(2,"0"),title:cp(t)}))}var r1=Object.fromEntries(Sa.map(e=>[e,Vs(e)]));var up=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],pp={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Ft="var(--wheel-stage)",Et="transparent",sn="inherit";function Ca(e,t){return e===sn?Ft:e==null?t:e===!0?Ft:e===!1?Et:e}function l1(e){return typeof e=="string"&&e!==sn?e:Ft}function mp(e){return e!==Et&&e!=="none"&&e!==""}function xp(e,t){return e===sn||e===!0?!0:e==null?t===Ft:!1}import{useEffect as Tg,useId as $v,useMemo as Pr}from"react";var gp=1;function KC(e){return co(e)}function Ip(e){let t=KC(e);return t===null?{}:{"--sf-card-image-radius":`${t}px`}}var yp="sf.gapContainer",go={min:-32,max:64,step:2},Sp={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},Pa={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},$C=new Set(["Events","GalleryB"]);function Xs(e,t,o){if(typeof t=="number"&&Number.isFinite(t)&&t>=go.min)return t;if(typeof t=="string"){let r=Sp[e]?.[t];if(typeof r=="number")return r}return typeof o=="number"&&Number.isFinite(o)?o:Pa[e]}var VC="sf-gap-overlap",qC="--sf-gap-overlap",Cp="--sf-block-gap",YC="--sf-block-gap-rem",Ys={min:0,max:go.max,step:go.step};function XC(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),Ys.min),Ys.max);return t-t%Ys.step}function f1(e){let t=XC(e);return t===null?{}:{[Cp]:`${t}px`,[YC]:`${t/16}rem`}}var hp="sf-gap-zone",bp="--sf-gap-len";function js(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=go.min?!0:typeof t=="string"&&typeof Sp[e]?.[t]=="number"}var jC={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function Pp(e,t,o){if(!js(e,t)){let n=`${Pa[e]}px`,a=$C.has(e)?`var(--sf-card-gap, ${n})`:n;return{className:` ${hp}`,style:{[bp]:`var(${Cp}, ${a})`}}}let r=Xs(e,t);return r>=0?{className:` ${hp}`,style:{[bp]:`${r}px`}}:{className:` ${VC} ${jC[o]}`,style:{gap:"0px",[qC]:`${-r/2}px`}}}import{useMemo as dk,useState as uk}from"react";function JC(e){return(e.components??[]).reduce((o,r)=>o+r.wheels,0)>4}function p1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(JC)}var ZC=150,QC="Front + rear",kp="L/R pair",wp="Not handed",eP="L/R";function tP(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function oP(e){return tP(e)>=ZC}function m1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(oP)}function ir(e){return e.directional===!0}function vp(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function Tp(e){return{twoObjects:nP(e),handed:e.handed??!1,staggered:!1}}function Rp(e){let t=[e.twoObjects?QC:"",e.handed?eP:""].filter(Boolean);return t.length?t.join(" \xB7 "):null}function Fp(e){return e.handed}function rP(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function x1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(rP)}function nP(e){return(e.setWheelCount??0)>4}var aP=new Set(["boltPattern"]);function g1(e,t){return e&&aP.has(t)}function lP(e){return typeof e=="number"?String(e):""}function Ep(e){let t=lP(e);return t&&`${t} LUG`}function Js(e){let t=e.spec?.lugs;return typeof t=="number"?t:null}function _p(e){let t=new Set;for(let o of e){let r=Js(o);r!==null&&t.add(r)}return[...t].sort((o,r)=>o-r)}function Be(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(2)))}function Ap(e,t){return e===t?`ET ${e}`:`ET ${e}\u2013${t}`}function Lp(e,t){return e===t?`${Be(e)}"`:`${Be(e)}"\u2013${Be(t)}"`}function b1(e){return e==="\u2014"?e:`${e}"`}function sP(e){return e.length===0?null:{min:Math.min(...e),max:Math.max(...e)}}function ka(e){let t=sP(e);return t?Lp(t.min,t.max):null}function Op(e){let t=new Set;for(let o of e)for(let r of o.sizes??[])typeof r=="number"&&t.add(r);return[...t].sort((o,r)=>o-r)}var Np=5,Mp=.2;function Hp(e){if(!e)return{holes:null,circles:[]};let t=e.replace(/\([^)]*\)?/g," ").trim(),o=t.match(/^\s*(\d+)\s*[x×*]\s*(.+)$/i),r=o?Number(o[1]):null,a=(o?o[2]:t).split(/[-/,]/).map(l=>Number(l.trim().replace(/[^\d.]/g,""))).filter(l=>Number.isFinite(l)&&l>0);return{holes:r,circles:a}}function Zs(e){if(!e||e.length<2)return null;let[t,o]=e;return!Number.isFinite(t)||!Number.isFinite(o)?null:[Math.min(t,o),Math.max(t,o)]}function v1(e){if(!e)return null;let t=Hp(e.pcd||e.boltPattern);if(t.holes===null||t.circles.length===0)return null;let o=t.circles[0],r=Zs(e.etRange),n=r?[r[0]-Np,r[1]+Np]:null;return{holes:t.holes,circle:o,centreBore:typeof e.centreBore=="number"&&e.centreBore>0?e.centreBore:null,etRange:n}}function iP(e,t){return Math.abs(e-t)<=Mp}function Gp(e,t,o){let r=Hp(e);return(r.holes??t)!==o.holes?!1:r.circles.some(a=>iP(a,o.circle))}function Wp(e,t){return t.centreBore===null?!0:e+Mp>=t.centreBore}function cP(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function wa(e,t){let o=`${t.holes}\xD7${t.circle}`;return e.pcds.length===0?{key:"unverifiable",wheel:"",vehicle:o}:e.pcds.some(r=>Gp(r,e.lugs,t))?t.etRange!==null&&e.etRange!==null&&!cP(e.etRange,t.etRange)?{key:"et",wheel:va(e.etRange),vehicle:va(t.etRange)}:e.centreBores.length>0&&!e.centreBores.some(r=>Wp(r,t))?{key:"bore",wheel:`${e.centreBores.join(" / ")} mm`,vehicle:`${t.centreBore} mm`}:null:{key:"pcd",wheel:e.pcds.join(" / "),vehicle:o}}function Up(e){return{pcds:e.spec?.pcds??[],lugs:e.spec?.lugs??null,etRange:Zs(e.spec?.etRange),centreBores:e.spec?.centreBores??[]}}function zp(e){let t=e.et,o=e.rearEt??e.et;return{pcds:e.boltPattern?[e.boltPattern]:[],lugs:null,etRange:t==null||o==null?null:[Math.min(t,o),Math.max(t,o)],centreBores:e.centreBore==null?[]:[e.centreBore]}}function Kp(e,t){let o=wa(e,t);return o===null||o.key!=="et"?o:wa(e,{...t,etRange:null})}function T1(e,t){return wa(Up(e),t)}function R1(e,t){return wa(zp(e),t)}function fP(e,t){return Kp(zp(e),t)===null}function $p(e,t){return t?e.filter(o=>fP(o,t)):[...e]}function dP(e,t){return Kp(Up(e),t)===null}function Vp(e,t){return t?e.filter(o=>dP(o,t)):e}var Bp=1;function uP(e,t){let o=e.spec?.pcds??[],r=e.spec?.centreBores??[],n=Zs(e.spec?.etRange);if(!t)return{pcds:o,etRange:n,centreBores:r};let a=e.spec?.lugs??null,l=o.filter(i=>Gp(i,a,t)),s=r.filter(i=>Wp(i,t));return{pcds:l.length>0?l:o,etRange:n,centreBores:s.length>0?s:r}}function va(e){return Ap(e[0],e[1])}function Dp(e){let t=e.slice(0,Bp).join(" / "),o=e.length-Bp;return o>0?`${t} +${o}`:t}var F1="\xB7";function qp(e){return[{fieldKey:"diameter",text:ka(e.sizes)},{fieldKey:"holes",text:Ep(e.spec?.lugs)}].filter(t=>!!t.text)}function E1(e,t){let{pcds:o,etRange:r,centreBores:n}=uP(e,t),a=[];return o.length>0&&a.push({fieldKey:"pcd",text:`PCD ${Dp(o)}`}),r!==null&&a.push({fieldKey:"et",text:va(r)}),n.length>0&&a.push({fieldKey:"center_bore",text:`C/B ${Dp(n)} mm`}),a}function pP(e){return e?[{key:"pcd",name:"Bolt pattern",value:`${e.holes}\xD7${e.circle}`},{key:"bore",name:"Hub bore",value:e.centreBore!==null?`${e.centreBore} mm bore`:null},{key:"et",name:"Offset",value:e.etRange!==null?va(e.etRange):null}]:[]}function _1(e){return pP(e).map(t=>t.value).filter(t=>t!==null).join(" \xB7 ")}var cr="off",Io="none",Qs=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],ei=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function Yp(e){return Xe(Qs,cr,e)}function O1(e){return Xe(ei,Io,e)}var Ta="sf-card-index",cn="sf-card-index",Xp="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",mP={plain:`counter(${cn})`,padded:`counter(${cn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${cn}, decimal-leading-zero)`};function jp(e,t){return t==="off"?"":`.${e}{counter-reset:${cn}}.${e} .${Ta}{counter-increment:${cn}}.${e} .${Ta}::before{content:${mP[t]}}`}function Jp(e){return e==="hairline"?"border border-line hover:border-accent":""}var Zp=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];function B1(e){let t=typeof e=="number"?e:Number.parseInt(String(e??""),10);return!Number.isFinite(t)||t<1||t>5?1:Math.trunc(t)}function xP(e,t){if(!e||!t||!Number.isFinite(t)||t<=0)return null;let o=e.lugRenderings?.[String(t)];if(!Array.isArray(o))return null;let r=o.filter(n=>typeof n=="string"&&n.length>0);return r.length>0?r:null}function gP({carRenderings:e,renderings:t,coverIndex:o,shownFinishName:r,defaultFinishName:n,shownSrc:a}){if(e&&e.length>0){let s=Math.min(Math.max(o,1)-1,e.length-1);return e[s]??a}if(o<=1||!t||t.length===0||!n||r!==n)return a;let l=Math.min(o-1,t.length-1);return t[l]??a}function Qp({overrideSrc:e,hookSrc:t,failed:o}){return e&&!o.has(e)?e:t&&t!==e&&!o.has(t)?t:null}function em(e,t,o,r,n){let a=o===void 0?void 0:e.finishes?.find(l=>l.name===o);return gP({carRenderings:xP(a,n),renderings:e.defaultFinishRenderings,coverIndex:t,shownFinishName:o,defaultFinishName:e.defaultFinish,shownSrc:r})}function fr(e,t){return e.length===0?e:e.filter(o=>o.kind===void 0||o.kind===t)}function tm(e,t){if(t.length===0)return e;let o=dr(t);return Ra(e.filter(r=>o(r.fieldKey)),r=>r.fieldKey,t,"cardOrder")}function om(e,t){let o=t==="filter"?"filterOrder":"cardOrder",r=new Map;for(let n of e){let a=n[o];if(typeof a!="number"||!Number.isFinite(a))continue;let l=r.get(n.fieldKey);(l===void 0||a<l)&&r.set(n.fieldKey,a)}return n=>n?r.get(n):void 0}function IP(e){return Ea(e,"spec")}function M1(e){return Ea(e,"fitment")}function H1(e,t){if(t.length===0)return e;let o=IP(t),r=e.filter(n=>o(n.fieldKey));return Ra(r,n=>n.fieldKey,t,"specOrder")}function Ra(e,t,o,r){let n=new Map;for(let i of o){let c=i[r];typeof c=="number"&&n.set(i.fieldKey,c)}if(n.size===0)return e;let a=[],l=[];e.forEach((i,c)=>{let f=t(i);f&&(a.push(c),l.push({item:i,index:c,order:n.get(f)}))}),l.sort((i,c)=>i.order!==void 0&&c.order!==void 0?i.order-c.order||i.index-c.index:i.order!==void 0?-1:c.order!==void 0?1:i.index-c.index);let s=[...e];return a.forEach((i,c)=>{s[i]=l[c].item}),s.every((i,c)=>i===e[c])?e:s}function dr(e){return Ea(e,"card")}function rm(e){return Ea(e,"filter")}var Fa="collection";function ti(e,t){return{tyreSizes:{},brands:{"alloy-wheel":"brand",tyre:"brand"},finishes:{"alloy-wheel":"wheel_finish_ref"},diameters:{"alloy-wheel":"diameter",tyre:"rim_diameter"},collections:{"alloy-wheel":Fa},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[t]}function Ea(e,t){let o=new Set(e.filter(r=>r[t]===!1).map(r=>r.fieldKey));return r=>!r||!o.has(r)}import{Fragment as hP,jsx as nm,jsxs as bP}from"react/jsx-runtime";function oi(e,t){return!e&&!t?null:bP(hP,{children:[e&&nm("span",{className:"text-fg",children:e}),e&&t?nm("span",{className:"mx-[6px] text-fg-dim",children:"\xB7"}):null,t]})}function ri(e,t){let o=dr(t);return e.kind||e.brand&&o("brand")?!0:e.process&&o(Fa)}function am({kindLabel:e,brand:t,process:o},r){if(!ri({kind:!!e,brand:!!t,process:!!o},r))return null;let n=dr(r);return oi(e,n("brand")?t:null)??(n(Fa)?o:null)}import{jsx as ni,jsxs as yP}from"react/jsx-runtime";function ai({finishes:e,availability:t,selectedIdx:o,hoverIdx:r,activeFinish:n,onSelect:a,onHover:l,showLabel:s=!0,className:i}){return yP("div",{className:["mt-4",i].filter(Boolean).join(" "),children:[ni("div",{className:"flex flex-wrap items-center gap-2",onMouseLeave:()=>l(null),onClick:c=>c.preventDefault(),children:e.map((c,f)=>{if(!t[f])return null;let u=f===o,d=r===f&&r!==o;return ni("button",{type:"button",title:c.name,"aria-label":c.name,"aria-pressed":u,onMouseEnter:()=>l(f),onFocus:()=>l(f),onBlur:()=>l(null),onClick:p=>{p.preventDefault(),p.stopPropagation(),a(f)},className:["h-4 w-4 shrink-0 rounded-full transition-all",u?"ring-2 ring-accent ring-offset-2 ring-offset-surface":d?"ring-1 ring-fg ring-offset-2 ring-offset-surface":"ring-1 ring-fg/30 ring-offset-1 ring-offset-surface"].join(" "),style:{background:c.color,border:"1px solid var(--swatch-border)"}},c.name)})}),s&&n&&ni("div",{className:"mt-2 truncate font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:n.name})]})}import{useEffect as SP,useMemo as CP,useState as li}from"react";import{jsx as lm}from"react/jsx-runtime";function _a(e,t,o){let[r,n]=li(()=>{let I=o?e.findIndex(h=>h.name===o):-1;return I>=0?I:0}),[a,l]=li(null),[s,i]=li(()=>e.map(()=>!0)),c=I=>{i(h=>{if(h[I]===!1)return h;let k=[...h];return k[I]=!1,k})},f=CP(()=>s.map((I,h)=>I?h:-1).filter(I=>I!==-1),[s]);SP(()=>{if(f.length===0){r!==-1&&n(-1),a!==null&&l(null);return}r>=0&&!f.includes(r)&&n(f[0]),a!==null&&!f.includes(a)&&l(null)},[f,r,a]);let u=a??r,d=u>=0?e[u]:void 0,p=d?.src??t,x=f.length>=2,g=e.length>0?lm("div",{className:"hidden","aria-hidden":!0,children:e.map((I,h)=>lm(no,{src:I.src,alt:"",width:16,height:16,loading:"eager",onError:()=>c(h)},I.src))}):null;return{selectedIdx:r,setSelectedIdx:n,hoverIdx:a,setHoverIdx:l,availability:s,finish:d,shownSrc:p,showSwatches:x,probes:g}}import{useState as PP}from"react";import{jsx as ur,jsxs as sm}from"react/jsx-runtime";function si({src:e,alt:t=""}){let[o,r]=PP(!1),n=e||"";return ur("div",{className:"relative aspect-square overflow-hidden bg-bg",children:sm("div",{className:"absolute inset-0 flex items-center justify-center transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:rotate-[60deg]",children:[ur("div",{className:"absolute inset-0 z-[1] flex items-center justify-center",children:sm("div",{className:"relative flex h-[70%] w-[70%] items-center justify-center rounded-full border-2",style:{borderColor:"var(--accent)"},children:[ur("div",{className:"absolute inset-[10%] rounded-full border",style:{borderColor:"var(--accent)",opacity:.4}}),ur("div",{className:"absolute left-1/2 top-1/2 h-[18%] w-[18%] -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{borderColor:"var(--accent)"}}),ur("div",{className:"absolute left-1/2 top-1/2 h-[6%] w-[6%] -translate-x-1/2 -translate-y-1/2 rounded-full",style:{background:"var(--accent)"}})]})}),n&&ur("img",{src:n,alt:t,className:"absolute inset-0 z-[2] h-full w-full object-contain",style:{display:o?"none":"block"},onError:()=>r(!0)})]})})}import{createContext as kP,useContext as wP,useMemo as vP}from"react";import{jsx as RP}from"react/jsx-runtime";var im=[],TP={imageBackgroundFill:Ft,spinOnHover:!0,coverIndex:1,indexBadge:cr,outline:Io,showBadge:!0,fieldUsage:im,reserveEyebrow:!1,showCardPrice:!0,showCardFinishes:!0,showCardSizes:!1,showCardBuy:!1,showCardPage:!1},cm=kP(TP);function fm({imageBackgroundFill:e,spinOnHover:t,coverIndex:o=1,indexBadge:r=cr,outline:n=Io,showBadge:a=!0,fieldUsage:l=im,reserveEyebrow:s=!1,showCardPrice:i=!0,showCardFinishes:c=!0,showCardSizes:f=!1,showCardBuy:u=!1,showCardPage:d=!1,children:p}){let x=vP(()=>({imageBackgroundFill:e,spinOnHover:t,coverIndex:o,indexBadge:r,outline:n,showBadge:a,fieldUsage:l,reserveEyebrow:s,showCardPrice:i,showCardFinishes:c,showCardSizes:f,showCardBuy:u,showCardPage:d}),[e,t,o,r,n,a,l,s,i,c,f,u,d]);return RP(cm.Provider,{value:x,children:p})}function dm(){return wP(cm)}import{useCallback as ym,useEffect as di,useMemo as Na,useRef as ui,useState as Sm}from"react";import{useEffect as FP,useState as um}from"react";var ii=new Map;function EP(e){let t=ii.get(e);if(t)return t;let o=Tt.getWheel(e).catch(r=>{throw ii.delete(e),r});return ii.set(e,o),o}function pm(e,t){let[o,r]=um("idle"),[n,a]=um(null);return FP(()=>{if(!t)return;let l=!1;return r("loading"),EP(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,wheel:n}}function mm(e,t){return t.length===0?-1:e.findIndex(o=>t.includes(o.family))}function xm(e){if(e.diameter==null||e.width==null)return e.size;let t=e.rearWidth!=null?`${Be(e.width)}/${Be(e.rearWidth)}`:Be(e.width);return`${e.diameter}" \xD7 ${t}`}function Aa(e){return e.et==null?null:e.rearEt!=null&&e.rearEt!==e.et?`${e.et}/${e.rearEt}`:String(e.et)}function ci(e){return e.diameter==null||e.width==null?JSON.stringify([e.size]):JSON.stringify([e.kind,e.diameter,e.width,e.rearWidth??null])}function gm(e){return e.diameter==null||e.width==null?e.size:`${e.diameter}" ${e.kind}`}function Im(e){return e.diameter==null||e.width==null?"":e.rearWidth!=null?`${Be(e.width)} front / ${Be(e.rearWidth)} rear`:`${Be(e.width)} all round`}function dD(e){if(e.diameter==null||e.width==null)return e.size;let t=(o,r)=>`${e.diameter} \xD7 ${Be(o)}${r!=null?` ET ${r}`:""}`;return vp(e)?`${t(e.width,e.et)} front \xB7 ${t(e.rearWidth??e.width,e.rearEt)} rear`:t(e.width,e.et)}function fi(e,t){return t?e.filter(o=>o.finishName===t):[]}var _P="dually";function La(e){let t=e.components.reduce((n,a)=>n+a.wheels,0)||4,o=e.kind,r=[o==="staggered"?"Staggered":o===_P?"Dually":"",ir(e)?"L/R":""].filter(Boolean);return r.length?`${r.join(" ")} set of ${t}`:`Set of ${t}`}function AP(e,t){return[...new Set(e.filter(o=>!t||o.finishName===t).map(o=>o.size))]}function Oa(e,t,o){if(!(!t||!o))return e.find(r=>r.finishName===t&&r.size===o)}function fn(e){return e!=null&&e.inStock===!1}function hm(e,t){return t?e.filter(o=>o.finishName===t&&fn(o)):[]}function bm(e,t,o){return t.findIndex((r,n)=>o[n]!==!1&&AP(e,r).length>0)}var LP=[];function Cm(e,t=LP){let o=Na(()=>e.finishes.filter(Xn),[e.finishes]),r=o.length>0,n=_a(o,e.coverImage??null,e.defaultFinish??void 0),[a,l]=Sm(!1),s=ym(()=>{r&&l(!0)},[r]),{state:i,wheel:c}=pm(e.slug,a),f=Na(()=>c?.variants??[],[c]),u=n.selectedIdx>=0?o[n.selectedIdx]?.name??null:null,[d,p]=Sm(null),{setSelectedIdx:x}=n,g=ui(!1),I=ym(R=>{g.current=!0,x(R)},[x]),h=t.join(","),k=ui(null);di(()=>{if(k.current===h)return;k.current=h;let R=mm(o,t);R<0||(g.current=!0,x(R))},[h,t,o,x]);let S=ui(!1);di(()=>{if(S.current||g.current||f.length===0||!u||(S.current=!0,fi(f,u).length>0))return;let R=bm(f,o.map(_=>_.name),n.availability);R>=0&&x(R)},[f,u,o,n.availability,x]);let C=Na(()=>fi(f,u),[f,u]);di(()=>{p(R=>R&&C.some(_=>_.size===R)?R:C.length===1?C[0].size:null)},[C]);let T=Oa(f,u,d),b=fn(T),w=T!=null&&!b,O=!r||i==="error"||i==="ready"&&C.length===0,D=Na(()=>hm(f,u),[f,u]);return{...n,setSelectedIdx:I,finishes:o,arm:s,detailState:i,confirmedFinishName:u,sizeOptions:C,size:d,setSize:p,selectedVariant:T,outOfStock:b,outOfStockVariants:D,canAdd:w,unsellable:O}}import{useEffect as sk,useState as ik}from"react";var Vt=["width","profile","rim"],Pm={width:"Width",profile:"Profile",rim:"Rim"},OP=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,NP={width:[100,500],profile:[20,100],rim:[10,30]};function qt(e){let t=OP.exec(e??"");if(!t)return null;let o={width:Number(t[1]),profile:Number(t[2]),rim:Number(t[3])};return Vt.every(n=>{let[a,l]=NP[n];return o[n]>=a&&o[n]<=l})?o:null}function $t(e){if(e.width==null)return"";if(e.profile==null)return String(e.width);let t=`${e.width}/${e.profile}`;return e.rim==null?t:`${t} R${e.rim}`}function km(e){return[$t({width:e.width}),$t({width:e.width,profile:e.profile}),$t(e)]}var No=["alloy-wheel","tyre"],wm=["alloy-wheel"],mr={"alloy-wheel":"Alloy wheels",tyre:"Tyres"},vm="All products",Tm="All product types";function Rm(e){return e.length===1&&e[0]==="alloy-wheel"?{one:"wheel",many:"wheels"}:e.length===1&&e[0]==="tyre"?{one:"tyre",many:"tyres"}:{one:"product",many:"products"}}var vD=No.map(e=>({value:e,label:mr[e]}));function Ba(e){return e==null?[...wm]:Array.isArray(e)?No.filter(t=>e.includes(t)):[...wm]}var Je=e=>e;function Ee(e){return Je(e).kind==="tyre"?"tyre":"alloy-wheel"}function TD(e,t){return e.filter(o=>t.includes(Ee(o)))}function RD(e){return Je(e).slug??""}function pi(e){return Je(e).name??""}function Da(e){return Je(e).brand??""}function FD(e){let t=new Set;for(let o of e)if(t.add(Da(o)),t.size>1)return!0;return!1}function BP(e){return Je(e).process??""}function ED(e){let t=new Set;for(let o of e)if(t.add(BP(o)),t.size>1)return!0;return!1}function Bo(e){return Je(e).prices??void 0}function mi(e){return Je(e).inStock!==!1}function Fm(e){let t=Je(e),o=Ee(e)==="tyre"?t.rimDiameters:t.sizes;return Array.isArray(o)?o.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function xi(e){return Ee(e)!=="tyre"&&Je(e).badge==="new"}function gi(e){return Ee(e)==="tyre"?[]:(Je(e).finishes??[]).filter(t=>typeof t?.family=="string").map(t=>({family:t.family,color:t.color??null}))}function Em(e){return gi(e).map(t=>t.family)}function _m(e){if(Ee(e)==="tyre")return[];let t=Je(e),o=t.categories;return o&&o.length>0?o:t.process?[t.process]:[]}function Am(e){return Ee(e)==="tyre"?[]:Je(e).spec?.pcds??[]}function Lm(e){return Ee(e)!=="tyre"?[]:Je(e).tyreTypes??[]}function Om(e){return Ee(e)!=="tyre"?[]:Je(e).speedRatings??[]}function Ma(e){if(Ee(e)!=="tyre")return[];let t=Je(e).sizes;return Array.isArray(t)?t.map(o=>qt(typeof o=="string"?o:null)).filter(o=>o!==null):[]}var DP={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},Nm=Object.keys(DP);function Bm(e){return Xe(Nm,"recommended",e)}function MP(e){return Nm.filter(t=>t!=="recommended"||e.length<=1)}function MD(e,t){let o=Bm(e);return MP(t).includes(o)?o:"name"}var dn=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],HP={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},GP={diameters:"tyreSizes"};function Dm(e){if(e.length===0)return[];let t=dn.filter(o=>e.every(r=>HP[o].includes(r)));return t.filter(o=>{let r=GP[o];return!r||!t.includes(r)})}function HD(e,t){return t&&e.includes(t)?[t]:[...e]}function Mm(e){let t=new Set;for(let o of e)t.add(Ee(o));return[...t]}var GD={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function WP(e){return`${UP(e.width)}\xD7${e.diameter}`}function Hm(e){return(e.sizePairs??[]).map(WP)}function UP(e){return Be(e)}function un(e,t,o,r=null){if(r!=="kind"&&t.kind&&Ee(e)!==t.kind)return!1;for(let n of dn){if(r===n)continue;let a=t[n];if(a.length===0)continue;let l=a.map(String);if(!Gm(e,n).some(s=>l.includes(s)))return!1}return!(r!=="price"&&!oa(Bo(e),o,null,t.priceMax)||r!=="inStock"&&t.inStockOnly&&!mi(e))}function WD(e,t,o){return e.filter(r=>mi(r)&&un(r,t,o,"inStock")).length}function zP(e,t,o){let r=[...e],n=(l,s)=>pi(l).localeCompare(pi(s)),a=Mm(e).length>1;switch(t){case"price-asc":return r.sort((l,s)=>ar(Bo(l),Bo(s),o,"asc"));case"price-desc":return r.sort((l,s)=>ar(Bo(l),Bo(s),o,"desc"));case"name":return r.sort(n);case"new":return r.sort((l,s)=>{let i=(xi(s)?1:0)-(xi(l)?1:0);return i!==0||!a?i:n(l,s)});default:return r}}function UD(e,t,o){return zP(e.filter(r=>un(r,t,o)),t.sort,o)}function zD(e){return dn.some(t=>e[t].length>0)||e.priceMax!=null||e.inStockOnly||e.kind!=null}var KP={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Gm(e,t){switch(t){case"tyreSizes":return[...new Set(Ma(e).flatMap(km))];case"brands":return Da(e)?[Da(e)]:[];case"finishes":return Em(e);case"diameters":return Fm(e).map(String);case"collections":return _m(e);case"pcds":return Am(e);case"tyreTypes":return Lm(e);case"speedRatings":return Om(e)}}function $P(e){let t=new Map;for(let o of e)for(let r of gi(o))r.color&&!t.has(r.family)&&t.set(r.family,r.color);return t}function KD(e,t,o,r=Mm(e),n=[]){let a=c=>VP(c,r,n),l=$P(e),s=Dm(r).filter(c=>c!=="tyreSizes").filter(a).map(c=>{let f=t[c].map(String),u=new Set,d=new Map,p=new Map;for(let g of e){let I=Gm(g,c);for(let h of I)u.add(h);for(let h of new Set(I))p.set(h,(p.get(h)??0)+1);if(un(g,t,o,c))for(let h of new Set(I))d.set(h,(d.get(h)??0)+1)}let x=[...u].map(g=>({value:g,label:c==="diameters"?`${g}\u2033`:g,count:d.get(g)??0,checked:f.includes(g),swatch:c==="finishes"?l.get(g)??null:null})).sort((g,I)=>{if(c==="diameters")return Number(g.value)-Number(I.value);let h=(p.get(I.value)??0)-(p.get(g.value)??0);return h!==0?h:g.value.localeCompare(I.value)});return{key:c,label:KP[c],options:x}}).filter(c=>c.options.length>Wm),i=[];for(let c of s){let f=qP(c.key,r,n);f!==void 0&&i.push({fieldKey:c.key,filterOrder:f})}return[...Ra(s,c=>c.key,i,"filterOrder")]}var Wm=1;function $D(e){return e.showCollection===!1?["collections"]:[]}function VP(e,t,o){return t.length===0||o.length===0?!0:t.some(r=>rm(fr(o,r))(ti(e,r)))}function qP(e,t,o){if(o.length===0)return;let r;for(let n of t){let a=om(fr(o,n),"filter")(ti(e,n));a!==void 0&&(r===void 0||a<r)&&(r=a)}return r}function YP(e){let t=new Set;for(let o of e)for(let r of Ma(o))t.add($t(r));return t.size}function VD(e,t){return Dm(t).includes("tyreSizes")?YP(e)>Wm:!1}function Um(e){let t=qt(e);if(t)return t;let[o,r]=e.split("/");return{width:o?Number(o):void 0,profile:r?Number(r):void 0}}function XP(e,t,o){return Vt.slice(0,Vt.indexOf(o)).every(r=>{let n=t[r];return n==null||e[r]===n})}function qD(e,t,o){let r=Um(t.tyreSizes[0]??""),n=new Set(e.filter(a=>un(a,t,o,"tyreSizes")));return Vt.map(a=>{let l=new Map;for(let i of e){let c=Ma(i).filter(f=>XP(f,r,a));for(let f of new Set(c.map(u=>u[a])))l.has(f)||l.set(f,0),n.has(i)&&l.set(f,(l.get(f)??0)+1)}let s=[...l.keys()].sort((i,c)=>i-c).map(i=>({value:i,label:a==="rim"?`R${i}`:String(i),count:l.get(i)??0}));return{part:a,label:Pm[a],value:r[a]??null,options:s}})}function YD(e,t,o,r){let n={...Um(t)},a=Vt.indexOf(o);n[o]=r??void 0;for(let l of Vt.slice(a+1))n[l]!=null&&e.some(c=>Vt.slice(0,Vt.indexOf(l)+1).every(f=>n[f]==null||c[f]===n[f]))||(n[l]=void 0);return $t(n)}function XD(e,t,o,r){if(t.length<2)return[];let n=e.filter(a=>un(a,o,r,"kind"));return[{kind:null,label:vm,count:n.length,checked:o.kind===null},...t.map(a=>({kind:a,label:mr[a],count:n.filter(l=>Ee(l)===a).length,checked:o.kind===a}))]}function jD(e,t){if(e.length===0)return null;let o=e.map(a=>ta(Bo(a),t)).filter(a=>a!==null);if(o.length===0)return null;let r=Math.floor(Math.min(...o)),n=Math.ceil(Math.max(...o));return n>r?{min:r,max:n}:null}function JD(e,t,o){let r=[];e.kind&&r.push({key:"kind",value:e.kind,label:mr[e.kind]}),e.inStockOnly&&r.push({key:"inStock",value:"",label:"In stock"});for(let n of dn)for(let a of e[n]){let l=String(a);r.push({key:n,value:l,label:n==="diameters"?`${l}\u2033`:n==="pcds"?`PCD ${l}`:l})}return e.priceMax!=null&&r.push({key:"price",value:"",label:`Up to ${o(e.priceMax,t)}`}),r}var Yt={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},xr="type",zm="maxPrice",Km="inStock",$m="sort",Vm="page";function ZD(e){let t=a=>e.getAll(a).flatMap(l=>l.split(",")).filter(Boolean),o=Number(e.get(zm)),r=Number(e.get(Vm)),n=e.get(xr);return{tyreSizes:t(Yt.tyreSizes),brands:t(Yt.brands),finishes:t(Yt.finishes),diameters:t(Yt.diameters).map(Number).filter(Number.isFinite),collections:t(Yt.collections),pcds:t(Yt.pcds),tyreTypes:t(Yt.tyreTypes),speedRatings:t(Yt.speedRatings),priceMax:Number.isFinite(o)&&o>0?o:null,inStockOnly:e.get(Km)==="1",kind:No.find(a=>a===n)??null,sort:Bm(e.get($m)),page:Number.isFinite(r)&&r>=1?Math.floor(r):1}}function QD(e){let t=new URLSearchParams;for(let o of dn){let r=e[o];r.length>0&&t.set(Yt[o],r.join(","))}return e.priceMax!=null&&t.set(zm,String(e.priceMax)),e.inStockOnly&&t.set(Km,"1"),e.kind&&t.set(xr,e.kind),e.sort!=="recommended"&&t.set($m,e.sort),e.page>1&&t.set(Vm,String(e.page)),t}function eM(e,t){if(e<=7)return Array.from({length:e},(a,l)=>l+1);let o=[1],r=Math.max(2,t-1),n=Math.min(e-1,t+1);r>2&&o.push(null);for(let a=r;a<=n;a++)o.push(a);return n<e-1&&o.push(null),o.push(e),o}function tM(e,t,o){let r=e.length,n=Math.max(1,Math.floor(o)),a=Math.max(1,Math.ceil(r/n)),l=Math.min(Math.max(1,Math.floor(t)),a),s=(l-1)*n;return{items:e.slice(s,s+n),page:l,pageCount:a,total:r,from:r===0?0:s+1,to:Math.min(s+n,r)}}function gr(e){let t=e.lastIndexOf(" ");return t===-1?{lead:"",accent:e}:{lead:e.slice(0,t+1),accent:e.slice(t+1)}}import{Fragment as jP}from"react";import{Fragment as Ii,jsx as yt,jsxs as _t}from"react/jsx-runtime";var Ha="mt-3 flex h-[26px] items-center gap-1",Ga="flex min-w-0 items-center gap-1 overflow-hidden",Wa="shrink-0 border border-line px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",pn="border px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] whitespace-nowrap",Ua=`${pn} border-accent/60 text-accent`,JP=e=>`calc((100% - ${e}px) / 2)`,ZP=2,QP=28,qm=e=>ZP+2*QP+(e?10:0);var ek=16;var tk="whitespace-nowrap",ok=e=>typeof e=="string"?e:e.text;function Ym(e,t="\xB7"){return e.map((o,r)=>{let n=ok(o),a=typeof o!="string"&&o.accent;return _t(jP,{children:[yt("span",{className:`${tk}${a?" text-accent":""}`,children:r<e.length-1?`${n} ${t}`:n}),r<e.length-1?" ":null]},n)})}var za="mt-3 flex flex-col gap-2",Ir="cursor-pointer bg-btn px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg",Ka="border border-btn px-4 py-2.5 text-center font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn transition-colors hover:bg-btn hover:text-btn-ink",rk="border px-2 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.3em]",hi="absolute right-[18px] top-[18px] z-10";function bi({tone:e,className:t,children:o}){return yt("span",{className:[t,rk,e==="solid"?"border-accent bg-accent text-bg":"border-accent text-accent"].filter(Boolean).join(" "),children:o})}function mn({variant:e="catalog",wide:t=!1,href:o,identityLink:r=!1,outline:n="none",imageBackgroundFill:a=Et,containerProps:l,probes:s,indexBadge:i,badges:c,image:f,imageSecond:u,plate:d,eyebrow:p,reserveEyebrow:x=!1,name:g,spec:I,was:h,price:k,metaLine:S,swatches:C,showPrice:T=!0,reserveSwatches:b=!0,extras:w}){let O=e==="catalog",D=mp(a),R=D&&a===Ft,_=R?"bg-[var(--wheel-stage)] p-[5px]":D?"p-[5px]":"",G=D&&!R?{backgroundColor:a}:{},Y=(he,de)=>yt("figure",{className:`m-0 aspect-square [flex:0_0_auto] max-w-full max-[800px]:w-[252px] ${de}`,style:{width:JP(qm(D))},children:he}),M=O?_t("div",{className:t?`relative mt-2 mb-5 flex items-center justify-center [&_img]:object-top max-[800px]:flex-col ${_}`:`relative mt-2 mb-5 flex aspect-square items-center justify-center overflow-hidden [&_img]:object-top ${_}`,style:t?{...G,borderRadius:10,columnGap:qm(D),rowGap:ek}:{...G,borderRadius:"var(--sf-card-image-radius, 10px)"},children:[t?_t(Ii,{children:[Y(f,"max-[800px]:-translate-x-[38px]"),Y(u??f,"max-[800px]:translate-x-[38px]")]}):f,d]}):_t("div",{className:"relative mb-[18px] aspect-square overflow-hidden bg-bg p-[30px] [&_img]:object-top",style:{borderRadius:"var(--sf-card-image-radius, 10px)"},children:[f,d]}),v=`font-mono text-[length:var(--size-label,12px)] uppercase text-accent ${O?"tracking-[0.3em]":"tracking-[0.25em]"}`,j=p?yt("div",{className:v,children:p}):O&&x?yt("div",{"aria-hidden":!0,className:v,children:"\xA0"}):null,F=yt("div",{className:O?"mt-2 h-[60px] overflow-hidden break-words font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]":"mt-[6px] font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium tracking-[-0.02em]",children:g}),E=yt("div",{className:O?"mt-2 h-[38px] overflow-hidden font-mono text-[length:var(--size-label,13px)] leading-[19px] tracking-[0.14em] text-fg-dim":"mt-[4px] font-mono text-[length:var(--size-label,13px)] tracking-[0.1em] text-fg-dim",children:I}),se=T?_t("div",{className:"mt-2 font-mono text-[length:var(--size-label,13px)]",children:[h&&yt("span",{className:"mr-2 text-fg-dim line-through",children:h}),k]}):null,N=T&&S?yt("div",{className:"mt-[2px] font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",children:S}):null,le=O&&!C?b?yt("div",{"aria-hidden":!0,className:"mt-4 h-4"}):null:C,ge=[O?"sf-card sf-card-fill group relative flex min-h-[460px] flex-col bg-[var(--card-bg)] px-7 pt-8 pb-7 transition-colors duration-200 hover:bg-[var(--card-bg-hover)]":"sf-card sf-card-fill group relative block bg-[var(--card-bg)] p-5 transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",Jp(n),t?"col-span-2 max-[800px]:col-span-1 @max-[720px]:col-span-1":""].filter(Boolean).join(" "),ie=_t(Ii,{children:[M,j,F]}),te=_t(Ii,{children:[E,se,N,le,w]});return o?r?_t("article",{...l,className:ge,children:[s,i,c,yt(Pe,{href:o,className:"flex flex-col",children:ie}),te]}):_t(Pe,{href:o,className:ge,children:[s,i,c,ie,te]}):_t("article",{...l,className:ge,children:[s,i,c,ie,te]})}import{useId as Qm,useRef as lk,useState as Si}from"react";import{useEffect as yi}from"react";function Xm({active:e,onDismiss:t,focusRef:o,lockScroll:r=!0}){yi(()=>{if(!e)return;let n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),yi(()=>{if(!e||!r)return;let n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e,r]),yi(()=>{e&&o?.current?.focus()},[e,o])}import{useCallback as Jm,useRef as nk,useState as ak}from"react";function uM({email:e,firstName:t,interests:o,frequency:r},n){return{email:e.trim(),firstName:t?.trim()||void 0,interests:o&&o.length?o:void 0,frequency:r||void 0,source:n}}var jm={popup:"shop_popup",subscribeSection:"subscribe_section",subscribeBlogsSection:"subscribe_blogs_section",footerSignup:"footer_signup",stockAlertOptIn:"stock_alert_optin"};function Zm(){let[e,t]=ak("idle"),o=nk(!1),r=Jm(()=>{o.current=!1,t("idle")},[]),n=Jm(async({partNumbers:a,email:l,productSlug:s,subscribeToOffers:i=!1,dryRun:c=!1})=>{if(o.current)return;let f=l.trim();if(!mu(f)){t("invalid");return}o.current=!0,t("sending");try{if(!c)for(let u of a)await Tt.createStockAlert({partNumber:u,email:f,productSlug:s})}catch{o.current=!1,t("error");return}if(i&&!c)try{await Tt.createNewsletterSubscription({email:f,source:jm.stockAlertOptIn})}catch{}o.current=!1,t("sent")},[]);return{status:e,submit:n,reset:r}}import{jsx as ae,jsxs as Ge}from"react/jsx-runtime";function Ci({wheelName:e,productSlug:t,finishName:o,variants:r,initialSize:n,onClose:a,editing:l=!1}){let s=Qm(),i=Qm(),c=lk(null),{currency:f}=fo(),u=Zm(),[d,p]=Si(()=>n??r[0]?.size??""),[x,g]=Si(""),[I,h]=Si(!1);Xm({active:!0,onDismiss:a,focusRef:c});let k=r.find(w=>w.size===d)??r[0];if(!k)return null;let S=u.status==="sent",C=u.status==="sending",T=u.status==="invalid"?"Please enter a valid email address.":u.status==="error"?"Couldn't save that \u2014 please try again.":null;function b(){k&&u.submit({partNumbers:k.components.map(w=>w.partNumber),email:x,productSlug:t,subscribeToOffers:I,dryRun:l})}return ae("div",{role:"dialog","aria-modal":"true","aria-labelledby":s,onClick:w=>{w.target===w.currentTarget&&a()},className:"fixed inset-0 z-[90] flex items-center justify-center overflow-y-auto p-6 backdrop-blur-[6px]",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:Ge("div",{ref:c,tabIndex:-1,className:"relative w-[420px] max-w-full border-2 border-accent bg-surface text-left shadow-[0_24px_60px_rgba(0,0,0,0.55)] outline-none",children:[ae("button",{type:"button",onClick:a,"aria-label":"Close",className:"absolute right-[10px] top-[10px] z-[2] flex h-9 w-9 cursor-pointer items-center justify-center text-fg-dim transition-colors hover:text-accent",children:ae("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:ae("path",{d:"M6 6l12 12M18 6 6 18"})})}),S?Ge("div",{className:"px-6 py-8 text-center",children:[ae("span",{className:"mx-auto mb-4 grid h-16 w-16 place-items-center rounded-full border-[1.5px] border-accent bg-accent/15",children:ae("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.5","aria-hidden":!0,children:ae("path",{d:"M20 6 9 17l-5-5"})})}),ae("h3",{id:s,className:"font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"You're on the list"}),Ge("p",{className:"mx-auto mt-2 max-w-[34ch] text-[13px] leading-[1.6] text-fg-dim",children:["We'll alert ",ae("strong",{className:"font-normal text-fg",children:x.trim()})," as soon as the ",et(e)," in ",k.size," is back. Keep an eye on your inbox."]}),ae("button",{type:"button",onClick:a,className:"mt-6 w-full cursor-pointer border border-line px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-fg transition-colors hover:border-accent hover:text-accent",children:"Continue browsing"})]}):Ge("form",{className:"p-6",noValidate:!0,onSubmit:w=>{w.preventDefault(),b()},children:[Ge("div",{className:"mb-2 flex items-center gap-3",children:[ae("span",{className:"grid h-11 w-11 flex-none place-items-center border-[1.5px] border-accent bg-accent/15",children:Ge("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"}),ae("path",{d:"M13.7 21a2 2 0 0 1-3.4 0"})]})}),Ge("div",{children:[ae("div",{className:"font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:"Back-in-stock alert"}),ae("h3",{id:s,className:"mt-0.5 font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"Notify me"})]})]}),Ge("p",{className:"mb-5 text-[13px] leading-[1.6] text-fg-dim",children:["We'll email you the moment the"," ",ae("strong",{className:"font-normal text-fg",children:et(e)}),o?` in ${o}`:""," ","is back in stock. No spam \u2014 one alert, then we're done."]}),Ge("fieldset",{className:"mb-4 border-0 p-0",children:[ae("legend",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Which fitment?"}),ae("div",{className:"flex flex-wrap gap-2",children:r.map(w=>{let O=w.size===k.size;return Ge("button",{type:"button","aria-pressed":O,onClick:()=>p(w.size),className:["flex min-w-[calc(50%-4px)] flex-1 cursor-pointer flex-col items-start gap-0.5 border-[1.5px] px-3 py-2.5 text-left transition-colors",O?"border-accent bg-accent/15":"border-line hover:border-accent/60"].join(" "),children:[ae("span",{className:"font-mono text-[12px] font-bold tracking-[0.08em] text-fg",children:w.size}),ae("span",{className:"font-mono text-[10px] tracking-[0.08em] text-fg-dim",children:(()=>{let D=du(w.components,f);return D.setTotal!=null?su(D.setTotal,f):iu})()})]},w.size)})})]}),Ge("div",{className:"mb-4",children:[ae("label",{htmlFor:i,className:"mb-2 block font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Email address"}),ae("input",{id:i,type:"email",value:x,onChange:w=>{g(w.target.value),(u.status==="invalid"||u.status==="error")&&u.reset()},placeholder:"you@example.com",disabled:C,className:"w-full border-2 border-line bg-bg px-3.5 py-3 font-display text-[15px] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent disabled:opacity-60"})]}),Ge("label",{className:"mb-5 flex cursor-pointer items-start gap-2.5 text-[12px] leading-[1.5] text-fg-dim",children:[ae("input",{type:"checkbox",checked:I,onChange:w=>h(w.target.checked),className:"mt-0.5 h-[18px] w-[18px] flex-none cursor-pointer accent-[var(--accent)]"}),ae("span",{children:"Also send me fitment tips and occasional offers for my vehicle."})]}),Ge("button",{type:"submit",disabled:C,className:"flex h-[50px] w-full cursor-pointer items-center justify-center gap-2 bg-btn px-4 font-mono text-[12px] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-btn",children:[Ge("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"m22 2-7 20-4-9-9-4Z"}),ae("path",{d:"M22 2 11 13"})]}),C?"Sending\u2026":"Notify me when available"]}),T&&ae("p",{role:"alert",className:"mt-2.5 text-[12px] leading-[1.5]",style:{color:"var(--alert)"},children:T}),Ge("div",{className:"mt-3 flex items-center justify-center gap-1.5 text-[11px] text-fg-dim",children:[Ge("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("rect",{x:"3",y:"11",width:"18",height:"11",rx:"1"}),ae("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"We never share your details."]})]})]})})}import{Fragment as fk,jsx as Xt,jsxs as $a}from"react/jsx-runtime";var Pi=3;function ck({wheel:e,sel:t,price:o,editing:r,detailReady:n}){let{add:a,open:l,warmCatalog:s}=aa();sk(()=>{r||s()},[r,s]);function i(){let c=t.selectedVariant;!c||!t.canAdd||o.priced&&(r||(a({id:`${e.slug}|${c.finishName}|${c.size}|quick`,slug:e.slug,name:gr(e.name),process:e.process,positionNo:"01",config:[{label:c.size},{label:c.finishName,gold:!0},{label:La(c)}],finishName:c.finishName,size:c.size,components:c.components,qty:1}),l()))}return Xt("button",{type:"button",onClick:i,[ea]:"",disabled:!t.canAdd,className:t.canAdd?Ir:n?"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70":`${Ir} opacity-80`,children:n&&!t.canAdd?"Select a size":"Add to basket"})}function ex({wheel:e,sel:t,price:o,editing:r,show:n,href:a}){let[l,s]=ik(!1),i=Hm(e),c=i.length>0?i:e.sizes.map(S=>`${S}\u2033`),f=t.detailState==="ready",u=t.unsellable,d=S=>["cursor-pointer transition-colors",pn,S?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" "),p=f&&!u?t.sizeOptions.length:c.length,x=Math.max(0,p-Pi),g=n.sizes?$a("div",{className:Ha,children:[Xt("div",{className:Ga,children:f&&!u?t.sizeOptions.slice(0,Pi).map(S=>Xt("button",{type:"button",title:S.size,"aria-label":S.size,"aria-pressed":t.size===S.size,onClick:()=>t.setSize(S.size),className:d(t.size===S.size),children:xm(S)},S.size)):u?Xt("span",{className:"truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-fg-dim",children:"Options on the product page"}):c.slice(0,Pi).map(S=>Xt("span",{className:Ua,children:S},S))}),!u&&x>0&&$a("span",{className:Wa,children:["+",x]})]}):null,I=n.buy&&!u?t.outOfStock?Xt("button",{type:"button",onClick:()=>s(!0),className:Ir,children:"Notify me when back"}):o.priced?Xt(ck,{wheel:e,sel:t,price:o,editing:r,detailReady:f}):null:null,h=n.page?Xt(Pe,{href:a,className:Ka,children:"Open product page"}):null,k=I||h?$a("div",{className:za,children:[I,h]}):null;return{extras:g||k?$a(fk,{children:[g,k]}):null,dialog:l?Xt(Ci,{wheelName:e.name,productSlug:e.slug,finishName:t.confirmedFinishName,variants:t.outOfStockVariants,initialSize:t.selectedVariant?.size,onClose:()=>s(!1),editing:r}):null}}import{Fragment as tx,jsx as ho,jsxs as ox}from"react/jsx-runtime";function xn({wheel:e,variant:t="compact",defaultFinish:o}){let r=t==="catalog",n=dk(()=>e.finishes.filter(Xn),[e.finishes]),a=e.coverImage??null,{currency:l}=fo(),{imageBackgroundFill:s,spinOnHover:i,coverIndex:c,indexBadge:f,outline:u,showBadge:d,fieldUsage:p,reserveEyebrow:x,showCardPrice:g,showCardFinishes:I,showCardSizes:h,showCardBuy:k,showCardPage:S}=dm(),C=r&&(h||k||S),T=ra(e.prices[l],e.msrpPrices?.[l]),b=na(T,l,"from "),w=fu(T,l),O=Tp(e),D=Fp(O),R=Rp(O),_=tm([...qp(e).map(Ne=>({fieldKey:Ne.fieldKey,field:Ne.text})),...R?[{field:{text:R,accent:!0}}]:[]],p).map(Ne=>Ne.field),{selectedIdx:G,setSelectedIdx:Y,hoverIdx:M,setHoverIdx:v,availability:j,finish:F,shownSrc:E,showSwatches:se,probes:N}=_a(n,a,o??e.defaultFinish??void 0),le=em(e,c,F?.name,E),ge="h-full w-full",ie=i?`transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] ${r?"group-hover:rotate-[72deg]":"group-hover:rotate-[60deg]"}`:"",[te,he]=uk(()=>new Set),de=Ne=>he(Ve=>Ve.has(Ne)?Ve:new Set(Ve).add(Ne)),z=Qp({overrideSrc:le,hookSrc:E,failed:te}),Le=z?ho(no,{src:z,alt:F?`${e.name} \u2014 ${F.name}`:e.name,width:1e3,height:1e3,sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 300px",className:`block object-contain ${ie} ${ge}`,draggable:!1,onError:()=>de(z)},z):ho(si,{imageLabel:e.name}),Re=r&&d&&e.badge?ho(bi,{className:hi,tone:e.badge==="new"?"solid":"outline",children:e.badge==="new"?"New":"Bestseller"}):null,Oe=R&&r?ho(bi,{className:hi,tone:"outline",children:R}):Re,ne=am({kindLabel:null,brand:null,process:e.process?et(e.process):null},p),K=D?ox(tx,{children:[ne,ho("span",{className:`${ne?"ml-2":""} inline-block bg-accent px-1.5 py-[2px] align-middle font-mono text-[10px] font-bold uppercase tracking-[0.18em] text-bg`,children:"Set"})]}):ne,H=f!=="off"?ho("span",{"aria-hidden":!0,className:`${Ta} ${Xp}`}):null,He=Cm(e),Ze=uu(e,He.selectedVariant,l,1),It=ex({wheel:e,sel:He,price:Ze,href:`/wheels/${e.slug}`,show:{sizes:C&&h,buy:C&&k,page:C&&S}}),oo=I&&se?ho(ai,{finishes:n,availability:j,selectedIdx:G,hoverIdx:M,activeFinish:F,onSelect:Y,onHover:v,showLabel:!1}):null;return ox(tx,{children:[ho(mn,{variant:t,wide:D&&r,href:`/wheels/${e.slug}`,outline:u,imageBackgroundFill:s,probes:N,reserveEyebrow:x,indexBadge:H,badges:Oe,image:Le,imageSecond:void 0,eyebrow:K,name:et(e.name),spec:Ym(_),was:D?void 0:w,price:D?T.priced?b:cu:C?pu(Ze,l):b,metaLine:D?"the set":void 0,swatches:oo,reserveSwatches:I,showPrice:g,identityLink:C,extras:It.extras}),It.dialog]})}import{Fragment as zx}from"react";import{applyMark as I2,markupTools as h2,MARKUP_TOOLS as b2,COPY_FIELD_TOOLS as y2,STOREFRONT_MARKUP as S2,tokenizeInline as C2,stripInline as P2,isSafeLinkHref as k2}from"efficient-easel/markup";import{applyMark as pk,markedAt as mk,markupTools as xk,MARKUP_TOOLS as gk,parseMarkup as Ik,STOREFRONT_MARKUP as hk,tokenizeInline as p2}from"efficient-easel/markup";var Va=["highlight","strong","quiet"],Do={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},At={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},rx=Object.fromEntries(Va.map(e=>[At[e].kind,e])),nx="data-sf-ws",i2=["accent","text","labels"],c2={accent:"Accent",text:"Text",labels:"Labels"},hr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"};var ki={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},f2={highlight:{...ki},strong:{...ki},quiet:{...ki}};var lx=Va.map(e=>({open:At[e].delimiter,close:At[e].delimiter,kind:At[e].kind})),sx=[{style:At.highlight.kind,label:Do.highlight,title:`${Do.highlight} word style`},{style:At.strong.kind,label:Do.strong,title:`${Do.strong} word style`},{style:At.quiet.kind,label:Do.quiet,title:`${Do.quiet} word style`}],bk=new Set(lx.map(e=>e.open)),ix=[...hk.filter(e=>!bk.has(e.open)),...lx];function wi(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function vi(e){return Ik(typeof e=="string"?e:"",ix)}var yk=["quiet"],ax=[...gk.map(e=>e.style).filter(e=>!yk.includes(e)),...sx.map(e=>e.style)].filter(e=>ix.some(t=>t.kind===e));function cx(){return[...xk(ax),...sx].filter(e=>ax.includes(e.style))}var fx=Object.fromEntries(Va.map(e=>[At[e].kind,At[e].delimiter]));function dx(e,t,o,r){let n=fx[r];if(!n)return pk(e,t,o,r);let a=e.slice(t,o),l=e.slice(Math.max(0,t-n.length),t),s=e.slice(o,o+n.length);if(l===n&&s===n)return{text:e.slice(0,t-n.length)+a+e.slice(o+n.length),selectionStart:t-n.length,selectionEnd:t-n.length+a.length};let i=a||"styled text";return{text:e.slice(0,t)+n+i+n+e.slice(o),selectionStart:t+n.length,selectionEnd:t+n.length+i.length}}function ux(e,t,o,r){let n=fx[r];return n?t>=n.length&&e.slice(t-n.length,t)===n&&e.slice(o,o+n.length)===n:mk(e,t,o,r)}function jt(e){return vi(e).map(t=>wi(t)+px(t.children)).join(`
|
|
3
|
+
`)}function px(e){return e.map(t=>t.kind==="text"?t.text:px(t.children)).join("")}function Ti(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function Ri(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}var _e="__text",gn="__link",In="__scaffold";function Jt(e){return e&&typeof e=="object"?{text:e.text??"",hidden:!!e.hidden}:{text:typeof e=="string"?e:"",hidden:!1}}function br(e){return Jt(e).text}var mx={text:"scalar",textarea:"scalar",plainText:"scalar",copyText:"scalar",plainTextarea:"scalar",textList:"list"},Mo=Object.entries(mx).filter(([,e])=>e==="scalar").map(([e])=>e);var xx={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},gx={Events:["posts"],SubscribeBlogs:["posts"]};var Sk=["anchor"],Ck=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function hn(e){return Sk.includes(e)||Ck.test(e)}var Pk={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},BrandStrip:{picks:{verb:"reference"}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};Pk.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var _2=Object.fromEntries(Object.entries(xx).map(([e,t])=>[e,Object.keys(t)])),A2=Object.fromEntries(Object.entries(gx).map(([e,t])=>[e,[...t]]));var kk=Mo,wk=["text","textarea"];function vk(e){return!e||typeof e!="object"?null:e[_e]?.control??null}function Ix(e){let t=vk(e);return t&&kk.includes(t)?t:null}function qa(e){return Jt(e).text}function Fi(e,t,o){return wk.includes(e)?{text:o,hidden:Jt(t).hidden}:o}function D2(e,t,o,r){return qa(e[t])===r?null:{...e,[t]:Fi(o,e[t],r)}}function Tk(e){if(!(!e||typeof e!="object"))return e[_e]}function Rk(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function hx(e,t){if(!Array.isArray(t))return[];let o=Tk(e),r=[];if(o?.control==="textList"){let a=o.itemKey??"text";return t.forEach((l,s)=>{let i=l?.[a];typeof i=="string"&&i&&r.push({row:{index:s,rowKey:a},text:i})}),r}let n=Rk(e);return n?(t.forEach((a,l)=>{for(let[s,i]of Object.entries(n)){if(!Ix(i))continue;let c=qa(a?.[s]);c&&r.push({row:{index:l,rowKey:s},text:c})}}),r):[]}function Fk(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function Ek(e,t,o,r){let n=e[t];return!Array.isArray(n)||o.index<0||o.index>=n.length?null:{...e,[t]:n.map((a,l)=>l===o.index?{...a,[o.rowKey]:r}:a)}}function W2(e,t,o,r,n){let a=Fk(e[t],o);return qa(a)===n?null:Ek(e,t,o,Fi(r,a,n))}function U2(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var J2="data-sf-part",Z2="data-sf-part-selected",Q2="data-sf-part-kind",Ei="::",bx=2;function eH(e,t){return`${e}${Ei}${t??""}`}function Xa(e){let t=e.indexOf(Ei);return t<=0?null:{nodeId:e.slice(0,t),propKey:e.slice(t+Ei.length)||null}}function tH(e,t){if(!e)return!1;let o=Xa(e);return!!o?.propKey&&o.nodeId===t}function yr(e){return jt(e).replace(/\s+/gu,"")}function Ya(e,t,o){let r=e[_e];if(r){if(r.control==="textList"){let a=r.itemKey??"text";if(!Array.isArray(t))return;for(let l of t){let s=l?.[a];typeof s=="string"&&o.push(s)}return}let{text:n}=Jt(t);n?o.push(n):r.placeholder&&o.push(r.placeholder);return}if(!e[gn]){if(e.type==="text"||e.type==="textarea"){typeof t=="string"&&t&&o.push(t);return}if(e.arrayFields&&Array.isArray(t)){for(let n of t)for(let[a,l]of Object.entries(e.arrayFields))Ya(l,n?.[a],o);return}if(e.objectFields&&t&&typeof t=="object")for(let[n,a]of Object.entries(e.objectFields))Ya(a,t[n],o)}}function oH(e){if(!e||typeof e!="object")return!1;let t=e;return t[gn]?!1:!!t[_e]||t.type==="text"||t.type==="textarea"}function yx(e,t){let o=e[_e];return o?.label?o.label:typeof e.label=="string"?e.label:t}function _k(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function rH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){if(!n||typeof n!="object"||hn(r))continue;let a=n,l=[];Ya(a,t?.[r],l),!l.length&&a[In]!==void 0&&Ya(a,a[In],l);let s=yx(a,r),i=new Set;for(let{row:u,text:d}of hx(a,t?.[r])){let p=yr(d);p.length<bx||(i.add(p),o.push({key:r,label:s,texts:[p],row:u}))}let c=new Set(i),f=[];for(let u of l){let d=yr(u);d.length<bx||c.has(d)||(c.add(d),f.push(d))}f.length&&o.push({key:r,label:s,texts:f})}return o}var Ak=Mo;function Sx(e,t){if(!t||typeof t!="object"||hn(e))return null;let o=t[_e];return!o||!Ak.includes(o.control)?null:o}function nH(e,t){let o=Sx(e,t);return o!==null&&o.identifier!==!0}function aH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){let a=Sx(r,n);if(!a)continue;let{text:l,hidden:s}=Jt(t?.[r]),i=l||a.placeholder||"",c=jt(i).replace(/\s+/gu," ").trim();o.push({key:r,label:_k(yx(n,r)),preview:c,offPage:a.offPage===!0,identifier:a.identifier===!0,hidden:!!s})}return o}var Li="_partStyles",Bi="data-sf-part-styled",Lk=["none","upper","lower"],Ok=[400,500,600,700],Nk=["left","center","right"],Bk=9,Dk=144,Mk=-5,Hk=10,Gk=0,Wk=64,Uk=2,zk=200,ja=900,Kk=10,Cx={size:{min:Bk,max:Dk,step:1},padding:{min:Gk,max:Wk,step:Uk},width:{min:zk,max:ja,step:Kk}},$k=.05,Vk=.01,qk=["line","letter"],Oi={none:"none",upper:"uppercase",lower:"lowercase"};function bn(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function vx(e){return bn(e?.[Li])??{}}function Yk(e,t){let o=vx(e);return Object.hasOwn(o,t)?bn(o[t])??{}:{}}function Tx(e,t,o){let r={...vx(e)};if(Xk(o).length?r[t]=o:delete r[t],!Object.keys(r).length){let{[Li]:n,...a}=e;return a}return{...e,[Li]:r}}function Xk(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function jk(e){return qk.includes(e)}var Px=(e,t,o)=>Math.min(o,Math.max(t,e));function Jk(e,t){if(jk(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:Px(o,Mk,Hk)}if(Object.hasOwn(Cx,e)){let{min:o,max:r}=Cx[e],n=Math.round(Number(t));return Number.isFinite(n)?Px(n,o,r):null}return e==="role"?Kt.includes(String(t))?t:null:t}var Zk=[["font","role"]];function Qk(e){let t=[];for(let[o,r]of Zk)o===e?t.push(r):r===e&&t.push(o);return t}function dH(e,t,o,r){let n={...Yk(e,t)},a=r==null?null:Jk(o,r);if(a===null)delete n[o];else{n[o]=a;for(let l of Qk(o))delete n[l]}return Tx(e,t,n)}function uH(e,t){return Tx(e,t,{})}function ew(e){for(let t of Lk)if(Oi[t]===e)return t;return"none"}function tw(e){return!e||!Object.hasOwn(Oi,e)?"":Oi[e]}var ow={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function rw(e){let t=e.role;return t&&Kt.includes(t)?t:null}var nw={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function bo(e,t,o){let r=rw(e),n=e.size?`${e.size}px`:r?o?.has(Qo[r])?`var(--size-${Qo[r]})`:nw[Qo[r]]??"":"";return{fontFamily:e.font?iw(e.font):r?`var(${ow[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:e.line?String(Ja(t.lineRatio+e.line*$k,3)):"",letterSpacing:e.letter?`${Ja(t.letterEm+e.letter*Vk,4)}em`:"",textTransform:tw(e.case),textAlign:e.align??"",paddingTop:_i(e.padding),paddingBottom:_i(e.padding),maxWidth:_i(e.width),color:aw(e.color)}}var aw=e=>e===void 0||e===""?"":Object.hasOwn(hr,e)?hr[e]:Rx.test(e)?e:"",Rx=/^#[0-9a-fA-F]{6}$/;function Fx(e){return Rx.test(e)}var _i=e=>e===void 0?"":`${e}px`,Ja=(e,t)=>Number(e.toFixed(t));function pH(e,t){let o=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),n=Number.parseFloat(e.letterSpacing),a=Number.parseFloat(e.paddingTop),l=Number.parseFloat(e.maxWidth);return{fontKey:t,sizePx:o,weight:lw(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?Ja(r/o,3):1.2,letterEm:Number.isFinite(n)?Ja(n/o,4):0,align:sw(e.textAlign),case:ew(e.textTransform),paddingPx:Number.isFinite(a)?Math.round(a):0,widthPx:Number.isFinite(l)&&l<ja?Math.round(l):ja}}function lw(e){return Number.isFinite(e)?Ok.reduce((t,o)=>Math.abs(o-e)<Math.abs(t-e)?o:t):400}function sw(e){for(let t of Nk)if(t===e)return t;return e==="end"?"right":"left"}function mH(e,t){let o=kx(e);if(!o)return"";for(let r of fs)if(kx(t(r.cssVar))===o)return r.key;return""}var kx=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function iw(e){let t=Md(e);return t?`var(${t.cssVar})`:""}function xH(e,t,o,r){return!t||Xa(t)?.nodeId!==e?null:o.find(a=>r(a.getAttribute("class")))??o[0]??null}function cw(e){let t=new Set,o=e;if(typeof window>"u"||!o?.ownerDocument)return t;let r=window.getComputedStyle(o);for(let n of fw)r.getPropertyValue(`--size-${n}`).trim()&&t.add(n);return t}var fw=["headingLarge","headingMedium","headingSmall","accent","body","label"];function gH(e,t,o=()=>yn,r=a=>a,n=pw){let a=0;for(let{element:l,partId:s}of e){let i=Xa(s)?.propKey;if(!i)continue;let c=r(i),f=Object.hasOwn(t,c)?bn(t[c])??{}:{},u=!!f.line||!!f.letter,d=bo(f,u?o(l):yn,cw(l)),p=Ai.some(I=>l.style[I]),x=!1;for(let[I,h]of Object.entries(d))l.style[I]=h,h&&(x=!0);if(p||Ai.some(I=>d[I]))for(let I of dw(l,n))for(let h of Ai)I.style[h]=d[h]??"";x&&(a+=1)}return a}function dw(e,t){let o=yr(e.textContent??""),r=[],n=e;for(let a=0;a<uw&&t(n);a+=1){let l=n.parentElement;if(!l||yr(l.textContent??"")!==o)break;r.push(l),n=l}return r}var uw=8;function pw(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var yn={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ja},mw=Object.keys(bo({},yn)),Ni=new Set(["color","overflowWrap"]),Ai=mw.filter(e=>!Ni.has(e));function Ex(e,t,o,r=n=>n){let n=new Map;for(let s of e){let i=Ti(s.key,s.row);for(let c of s.texts){let f=n.get(c);f?(f.keys.add(s.key),f.partKeys.add(i)):n.set(c,{keys:new Set([s.key]),partKeys:new Set([i])})}}let a=new Map;for(let s of Object.keys(t)){if(!xw(s))continue;let i=bn(t[s])??{},c=bo(i,yn);Object.values(c).some(Boolean)&&a.set(s,{stamp:wx(o,s),declarations:c})}let l=new Map;for(let[s,{keys:i,partKeys:c}]of n){let f=c.size===1?[...c][0]:i.size===1?[...i][0]:null;if(!f)continue;let u=r(f);if(!Object.hasOwn(t,u))continue;let d=bn(t[u])??{},p=bo(d,yn);Object.values(p).some(Boolean)&&l.set(s,{stamp:wx(o,f),declarations:p})}return l.size||a.size?{rules:l,kindRules:a,drawn:new Set(n.keys())}:null}function xw(e){return e.startsWith("@")}function _x(e,t){return e?.kindRules.get(t)??null}function wx(e,t){let o=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${o(e)}~${o(t)}`}function Ax(e){let t=[],o=new Set,r=n=>{let{stamp:a,declarations:l}=n;if(o.has(a))return;o.add(a);let s=Object.entries(l).filter(([,d])=>d!==""),i=d=>d.map(([p,x])=>`${gw(p)}: ${x}`).join("; "),c=`[${Bi}="${a}"]`,f=s.filter(([d])=>!Ni.has(d)),u=s.filter(([d])=>Ni.has(d));f.length&&t.push(`${c}, *:has(> ${c}) { ${i(f)} }`),u.length&&t.push(`${c} { ${i(u)} }`)};for(let n of e.rules.values())r(n);for(let n of e.kindRules.values())r(n);return t.join(`
|
|
4
|
+
`)}var gw=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function Lx(e,t){if(!e)return null;let o=yr(t),r=e.rules.get(o);if(r)return r;if(o.length<Iw||e.drawn.has(o))return null;let n=null;for(let[a,l]of e.rules)if(a.includes(o)){if(n&&n.stamp!==l.stamp)return null;n=l}return n}var Iw=8;import{createContext as Mx,useContext as Di,useId as yw,useMemo as Sw}from"react";var Sn="@name",Ox="@body",Nx="@value",bH={[Sn]:"Name",[Ox]:"Body",[Nx]:"Value"},hw={TimelineTrack:{"entries.date":Sn,"entries.title":Sn,"entries.blurb":Ox},Footprint:{"offices.city":Sn},Stats:{"items.label":Sn,"items.value":Nx}};function bw(e){let{key:t,row:o}=Ri(e);return o?`${t}.${o.rowKey}`:null}function Bx(e,t){if(!e)return t;let o=bw(t);return o?hw[e]?.[o]??t:t}import{Fragment as Dx,jsx as Za,jsxs as Cw}from"react/jsx-runtime";var Mi=Mx(null),Hx=Mx(null);function wH({needles:e,styles:t,type:o,children:r}){let n=yw(),a=JSON.stringify([n,e,t,o]),l=Sw(()=>Ex(e,t,n,s=>Bx(o,s)),[a]);return l?Cw(Dx,{children:[Za("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:Ax(l)}}),Za(Mi.Provider,{value:l,children:r})]}):Za(Dx,{children:r})}function Gx(e){let t=Di(Mi),o=Di(Hx),r=Lx(t,e);return r&&r.stamp!==o?r:null}function vH(e){return _x(Di(Mi),e)}function Wx({stamp:e,children:t}){return Za(Hx.Provider,{value:e,children:t})}import{Fragment as Pw,jsx as Hi}from"react/jsx-runtime";function Sr({value:e,children:t}){let o=Gx(e);return o?Hi(Wx,{stamp:o.stamp,children:Hi("span",{[Bi]:o.stamp,children:t})}):Hi(Pw,{children:t})}import{jsx as ue,jsxs as Gi}from"react/jsx-runtime";function re(e,t=!1){let o=_w(t),r=vi(e);if(r.length===1){let[a]=r,l=wi(a),s=l?Fw(l,a.children):a.children;return ue(Sr,{value:e,children:Qa(s,o)})}let n=[];return r.forEach((a,l)=>{if(a.bullet){n.push(ue("span",{"data-sf-bullet":"",className:kw,children:Qa(a.children,o)},l));return}if(a.number!=null){n.push(Gi("span",{"data-sf-number":a.number,className:ww,children:[Gi("span",{className:vw,children:[a.number,"."]}),Qa(a.children,o)]},l));return}l>0&&!Tw(r[l-1])&&n.push(ue("br",{},`br${l}`)),n.push(ue(zx,{children:Qa(a.children,o)},l))}),ue(Sr,{value:e,children:n})}var kw="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",ww="relative block pl-[2em]",vw="absolute left-0 w-[1.6em] text-right tabular-nums";function Tw(e){return e.bullet||e.number!=null}var Rw="text-accent underline underline-offset-[0.18em]";function Fw(e,t){let[o,...r]=t;return o?.kind==="text"?[{kind:"text",text:`${e}${o.text}`},...r]:[{kind:"text",text:e},...t]}function Ew(e){if(e)return Fx(e)?e:Object.hasOwn(hr,e)?hr[e]:void 0}function Qa(e,t){let o=[],r=!1;return e.forEach((n,a)=>{if(n.kind==="text"){o.push(ue("span",{children:et(n.text)},a)),r=!0;return}r||o.push(ue("span",{},`e${a}`)),o.push(Kx(n,a,t)),r=!1}),r||o.push(ue("span",{},"end")),o}function Ux(e,t){return e.length===1&&e[0].kind==="text"?et(e[0].text):e.map((o,r)=>o.kind==="text"?ue(zx,{children:et(o.text)},r):Kx(o,r,t))}function _w(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function HH(e){return ue(Sr,{value:e,children:ue("span",{children:e})})}function Kx(e,t,o){if(e.kind==="link")return ue("a",{href:e.href,className:Rw,children:Ux(e.children,o)},t);let r=Ux(e.children,o),n=rx[e.kind];if(n)return ue("span",{[nx]:n,children:r},t);switch(e.kind){case"underline":return ue("u",{children:r},t);case"sup":return ue("sup",{children:r},t);case"sub":return ue("sub",{children:r},t);case"color":{let a=Ew(e.color);return a?ue("span",{style:{color:a},children:r},t):ue("span",{children:r},t)}case"accent":case"highlight":return ue("em",{className:o,children:r},t);case"bold":return ue("strong",{className:"font-semibold",children:r},t);case"italic":return ue("em",{className:"italic",children:r},t);case"strike":return ue("s",{className:"line-through",children:r},t);default:return ue("span",{children:r},t)}}function Lt(e,t=!0){let o=e.split(`
|
|
5
|
+
`);return ue(Sr,{value:e,children:o.map((r,n)=>Gi("span",{children:[re(r,t),n<o.length-1?ue("br",{}):null]},n))})}function el(e){return e.split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean)}import{jsxs as $x}from"react/jsx-runtime";function Wi({text:e,linkText:t,linkHref:o}){let r=(t??"").trim(),n=(o??"").trim(),a=!!r&&!!n;return!e&&!a?null:$x("p",{className:"mt-5 font-mono text-[length:var(--size-label,13px)] tracking-[0.06em] text-fg-dim",children:[e?re(e):null,e&&a?" ":null,a&&$x(Pe,{href:n,className:"text-accent transition-colors hover:text-fg",children:[re(r)," \u2192"]})]})}import{createContext as Aw,useCallback as Vx,useContext as Lw,useEffect as Ow,useId as Nw,useMemo as Bw,useRef as Dw,useState as Mw}from"react";import{jsx as Hw}from"react/jsx-runtime";var qx=Aw(null);function qH({reason:e,children:t}){let[o,r]=Mw([]),n=Dw(null),a=Vx(c=>{r(f=>f.includes(c)?f:[...f,c])},[]),l=Vx(c=>{r(f=>f.filter(u=>u!==c))},[]),s=e==="none-configured",i=Bw(()=>({noCurrencyConfigured:s,live:o,firstRendered:n,join:a,leave:l}),[s,o,a,l]);return Hw(qx.Provider,{value:i,children:t})}function Yx(e){let t=Lw(qx),o=Nw(),r=!!e&&!!t?.noCurrencyConfigured;r&&t&&t.firstRendered.current===null&&(t.firstRendered.current=o);let n=t?.join,a=t?.leave;return Ow(()=>{if(!(!r||!n||!a))return n(o),()=>a(o)},[r,n,a,o]),!r||!t?!1:(t.live.length>0?t.live[0]:t.firstRendered.current)===o}import{jsx as Ww}from"react/jsx-runtime";var Gw="This website has no currency yet. Add one in Settings and these cards will price. Only you can see this line.";function Ui({editing:e}){return Yx(e)?Ww(Wi,{text:Gw}):null}import{createContext as Uw,useContext as zw,useEffect as Kw,useState as Xx}from"react";import{jsx as tl}from"react/jsx-runtime";var jx=Uw({wheels:[],loading:!1});function Jx({children:e}){let[t,o]=Xx([]),[r,n]=Xx(!0);return Kw(()=>{let a=!1;return Ao().then(l=>{a||(o(l),n(!1))}).catch(()=>{a||n(!1)}),()=>{a=!0}},[]),tl(jx.Provider,{value:{wheels:t,loading:r},children:e})}function $w({code:e,finish:t,wheel:o}){let{wheels:r,loading:n}=zw(jx),a=o??(e?r.find(l=>l.slug===e):void 0);return a?tl(xn,{wheel:a,variant:"catalog",defaultFinish:t},t??""):tl("div",{className:"sf-card flex aspect-square w-full items-center justify-center bg-surface-2 p-4 text-center",children:tl("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:n?"Loading\u2026":e||"Set a design code"})})}import{createContext as Yw,useCallback as tt,useContext as Xw,useEffect as jw,useMemo as Jw,useRef as tg,useState as Cr}from"react";var iG={default:"Sort \xB7 Featured",new:"Newest","price-asc":"Price \xB7 Low","price-desc":"Price \xB7 High",name:"Name A\u2013Z"},ol={process:null,size:null,lugs:null,finish:null,priceMin:null,priceMax:null,sort:"default"};function Vw(e,t,o){return!(t.process&&e.process!==t.process||t.size&&!e.sizes.includes(t.size)||t.lugs!=null&&Js(e)!==t.lugs||t.finish&&!e.finishes.some(r=>r.family===t.finish)||!oa(e.prices,o,t.priceMin,t.priceMax))}function qw(e,t,o){return[...e].sort((r,n)=>{switch(t){case"price-asc":return ar(r.prices,n.prices,o,"asc");case"price-desc":return ar(r.prices,n.prices,o,"desc");case"name":return r.name.localeCompare(n.name);case"new":return(n.badge==="new"?1:0)-(r.badge==="new"?1:0);default:return 0}})}function Zx(e,t,o,r=null){let n=Vp(e,r);return qw(n.filter(a=>Vw(a,t,o)),t.sort,o)}import{jsx as Qw}from"react/jsx-runtime";var og={fit:null,name:"",resolving:!1,unresolved:!1};function Zw(e,t){return e.fit===t.fit&&e.name===t.name&&e.resolving===t.resolving&&e.unresolved===t.unresolved}var st=()=>{},rg=Yw({filters:ol,setProcess:st,setSize:st,setLugs:st,setFinish:st,setPriceMin:st,setPriceMax:st,setSort:st,clearAll:st,reportCount:st,total:0,reportLugs:st,lugOptions:[],reportSizes:st,sizeOptions:[],reportFinishes:st,finishOptions:[],optionsReported:!1,scrollProcess:null,vehicle:og,publishVehicle:st}),rl="data-catalog-collection",Qx=(e,t)=>e-t;function eg(e,t){return e.length===t.length&&e.every((o,r)=>o===t[r])}function zi(e){let t=tg(new Map),[o,r]=Cr([]),n=tt((a,l)=>{let s=t.current.get(a);if(s&&eg(s,l))return;t.current.set(a,l);let i=new Set;for(let f of t.current.values())for(let u of f)i.add(u);let c=[...i].sort(e);r(f=>eg(f,c)?f:c)},[e]);return[o,n]}function pG({children:e,initial:t}){let[o,r]=Cr(t??ol),n=tt(F=>r(E=>({...E,process:F})),[]),a=tt(F=>r(E=>({...E,size:F})),[]),l=tt(F=>r(E=>({...E,lugs:F})),[]),s=tt(F=>r(E=>({...E,finish:F})),[]),i=tt(F=>r(E=>({...E,priceMin:F})),[]),c=tt(F=>r(E=>({...E,priceMax:F})),[]),f=tt(F=>r(E=>({...E,sort:F})),[]),u=tt(()=>r(F=>({...ol,sort:F.sort})),[]),[d,p]=Cr(og),x=tt(F=>{p(E=>Zw(E,F)?E:F)},[]),g=tg(new Map),[I,h]=Cr(0),k=tt((F,E)=>{if(g.current.get(F)===E)return;g.current.set(F,E);let N=0;for(let le of g.current.values())N+=le;h(N)},[]),[S,C]=zi(Qx),[T,b]=zi(Qx),[w,O]=zi(gu),[D,R]=Cr(!1),_=tt((F,E)=>{R(!0),C(F,E)},[C]),G=tt((F,E)=>{R(!0),b(F,E)},[b]),Y=tt((F,E)=>{R(!0),O(F,E)},[O]),[M,v]=Cr(null);jw(()=>{let E=0,se=()=>{E=0;let le=null,ge=document.querySelectorAll(`[${rl}]`);for(let ie of ge){let te=ie.getBoundingClientRect();if(te.top<=140&&te.bottom>140){le=ie.getAttribute(rl)??null;break}}v(le)},N=()=>{E||(E=requestAnimationFrame(se))};return se(),window.addEventListener("scroll",N,{passive:!0}),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N),window.removeEventListener("resize",N),E&&cancelAnimationFrame(E)}},[]);let j=Jw(()=>({filters:o,setProcess:n,setSize:a,setLugs:l,setFinish:s,setPriceMin:i,setPriceMax:c,setSort:f,clearAll:u,reportCount:k,total:I,reportLugs:_,lugOptions:S,reportSizes:G,sizeOptions:T,reportFinishes:Y,finishOptions:w,optionsReported:D,scrollProcess:M,vehicle:d,publishVehicle:x}),[o,n,a,l,s,i,c,f,u,k,I,_,S,G,T,Y,w,D,M,d,x]);return Qw(rg.Provider,{value:j,children:e})}function ng(){return Xw(rg)}function ev(e){if(!e.includes("_"))return e;let t=e.replace(/^_+/,""),o=e.slice(0,e.length-t.length),[r,...n]=t.split("_");return o+r+n.map(a=>a.slice(0,1).toUpperCase()+a.slice(1)).join("")}function Ki(e){if(Array.isArray(e))return e.map(Ki);if(e&&typeof e=="object"){let t={};for(let[o,r]of Object.entries(e))t[ev(o)]=Ki(r);return t}return e}function tv(e){return Ki(e)}function nl(e){return e.map(t=>Ee(t)==="tyre"?t:tv(t))}import{useCallback as Dv,useEffect as Mv,useMemo as Hv,useState as vg}from"react";import{useState as ov}from"react";import{jsx as $i}from"react/jsx-runtime";function Vi({brand:e,logo:t}){let[o,r]=ov(!1),n=(e??"").trim();if(!n)return null;let a=o?void 0:zt(t??void 0);return $i("div",{className:"sf-card-plate absolute inset-x-0 bottom-0 flex h-1/4 items-center justify-center bg-[var(--card-bg)] px-4 transition-colors duration-200 group-hover:bg-[var(--card-bg-hover)]",children:a?$i("img",{src:a,alt:n,className:"max-h-[52%] max-w-[78%] object-contain",draggable:!1,onError:()=>r(!0)}):$i("span",{className:"truncate font-display text-[length:var(--size-body,18px)] font-medium uppercase leading-none tracking-[-0.01em] text-fg",children:n})})}import{useEffect as cv,useState as fv}from"react";import{createContext as rv,lazy as nv,Suspense as av,useContext as lv}from"react";import{jsx as al}from"react/jsx-runtime";var sv={Link:Pe,Image:no},iv=rv(sv);function ag(){return lv(iv)}function ll(e){let{Link:t}=ag();return al(t,{...e})}function sl(e){let{Image:t}=ag();return al(t,{...e})}function wG(e){let t=nv(e);return function(r){return al(av,{fallback:null,children:al(t,{...r})})}}import{jsx as qi,jsxs as dv}from"react/jsx-runtime";function Ho({fallback:e,className:t,src:o,alt:r="",objectPosition:n,objectFit:a="cover",sizes:l="100vw",priority:s=!1,deferFetch:i=!1,showBackground:c=!0,treatment:f}){let[u,d]=fv(!1),p=o||"";cv(()=>{d(!1)},[p]);let x=Yn(p),g=!p||u;return dv("div",{className:`relative h-full w-full overflow-hidden ${t??""}`,children:[qi("div",{className:"absolute inset-0 flex items-center justify-center",style:c?{background:"var(--surface)"}:void 0,children:g?e:null}),p&&(x?qi("img",{src:p,alt:r,decoding:"async",...i?{loading:"lazy"}:{},className:`absolute inset-0 h-full w-full${f?.className?` ${f.className}`:""}`,style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}):qi(sl,{src:p,alt:r,fill:!0,sizes:l,priority:s,...f?.className?{className:f.className}:{},style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}))]})}import{useId as bv}from"react";var uv=25.4,Cn=400,cl=152,pv=58,lg=cl*Math.cos(pv*Math.PI/180),mv=14,xv=Cn/2,gv={sectionWidth:225,aspectRatio:60,rimDiameter:17};function ig(e){let t=qt(e);return t?{sectionWidth:t.width,aspectRatio:t.profile,rimDiameter:t.rim}:gv}function cg(e){let t=e.rimDiameter*uv/2,o=t+e.sectionWidth*e.aspectRatio/100,r=cl*(e.sectionWidth/o),n=t/o;return{cy:xv,rx:lg,ry:cl,cxf:Cn/2-r/2-mv,dx:r,rimRx:lg*n,rimRy:cl*n}}var X=e=>e.toFixed(1);function fl(e,t,o,r=!1){let n=e.cxf+t*e.dx,[a,l]=r?[e.cy+e.ry,e.cy-e.ry]:[e.cy-e.ry,e.cy+e.ry];return`M${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 ${o} ${X(n)} ${X(l)}`}function Yi(e,t,o){let r=e.cxf+t*e.dx,n=e.cxf+o*e.dx,a=e.cy-e.ry,l=e.cy+e.ry;return`M${X(r)} ${X(a)} L${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(n)} ${X(l)} L${X(r)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(r)} ${X(a)} Z`}function il(e,t,o){let r=o*Math.PI;return[e.cxf+t*e.dx+e.rx*Math.sin(r),e.cy-e.ry*Math.cos(r)]}function fg(e,t,o,r,n){let[a,l]=il(e,t,r),[s,i]=il(e,t,n),[c,f]=il(e,o,n),[u,d]=il(e,o,r);return`M${X(a)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(s)} ${X(i)} L${X(c)} ${X(f)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(u)} ${X(d)} L${X(a)} ${X(l)} Z`}var sg=[{f:[0,.215]},{f:[.245,.485]},{f:[.515,.755]},{f:[.785,1]}],Iv={COM:[{f:[0,.115]},{f:[.145,.26]},{f:[.29,.405]},{f:[.435,.55]},{f:[.58,.695]},{f:[.725,.84]},{f:[.87,1]}],P:[{f:[0,.17],blocks:{count:9,gap:.34}},{f:[.2,.38]},{f:[.42,.58]},{f:[.62,.8]},{f:[.83,1],blocks:{count:9,gap:.34,phase:.5}}],HP:[{f:[0,.3]},{f:[.34,.52]},{f:[.56,.7]},{f:[.74,1],blocks:{count:16,gap:.18}}],UHP:[{f:[0,.34]},{f:[.4,.56]},{f:[.62,1]}],SUV:[{f:[0,.16],blocks:{count:7,gap:.4}},{f:[.2,.36],blocks:{count:11,gap:.26,phase:.5}},{f:[.4,.6]},{f:[.64,.8],blocks:{count:11,gap:.26,phase:.5}},{f:[.84,1],blocks:{count:7,gap:.4}}],LT:[{f:[0,.22],blocks:{count:11,gap:.26}},{f:[.26,.48],blocks:{count:11,gap:.26,phase:.5}},{f:[.52,.74],blocks:{count:11,gap:.26}},{f:[.78,1],blocks:{count:11,gap:.26,phase:.5}}],AT:[{f:[0,.23],blocks:{count:6,gap:.46}},{f:[.29,.5],blocks:{count:6,gap:.46,phase:.5}},{f:[.56,.77],blocks:{count:6,gap:.46}},{f:[.83,1],blocks:{count:6,gap:.46,phase:.5}}],MT:[{f:[0,.29],blocks:{count:4,gap:.58}},{f:[.36,.64],blocks:{count:4,gap:.58,phase:.5}},{f:[.71,1],blocks:{count:4,gap:.58}}]},hv=[["ultra high performance","UHP"],["uhp","UHP"],["high performance","HP"],["hp","HP"],["performance","HP"],["sport","HP"],["mud terrain","MT"],["mud","MT"],["mt","MT"],["all terrain","AT"],["at","AT"],["light truck","LT"],["lt","LT"],["commercial","COM"],["com","COM"],["van","COM"],["cargo","COM"],["suv","SUV"],["4x4","SUV"],["crossover","SUV"],["cuv","SUV"],["passenger","P"],["touring","P"],["highway","P"],["p","P"]];function dg(e){let t=` ${(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()} `;if(t.trim()==="")return sg;for(let[o,r]of hv)if(t.includes(` ${o} `))return Iv[r];return sg}var OG="Illustrations are drawn to each tyre's listed size and represent its category; supplier photography replaces them where available.";import{Fragment as Pn,jsx as V,jsxs as Ot}from"react/jsx-runtime";var it={rib:.2,grooveWall:.16,shoulder:.22,silhouette:.26,relief:[.26,.15,.11],lettering:.1,dishFill:.06,dishEdge:.3,spoke:.3,hubFill:.16,hubEdge:.34},yv=[.8,.52,.24],ug=.4,pg=.88,mg=.3,xg=5,gg=.3,Ig=.84,Sv=7,Q=e=>Math.round(e*10)/10;function Xi({size:e,type:t,className:o}){let r=bv().replace(/[^a-zA-Z0-9]/g,""),n={tread:`${r}-tread`,wall:`${r}-wall`,rim:`${r}-rim`,shadow:`${r}-shadow`,crown:`${r}-crown`},a=cg(ig(e)),l=Yi(a,0,1),s=e?`${e} tyre illustration`:"Tyre illustration";return Ot("svg",{"data-tyre-placeholder":"",viewBox:`0 0 ${Cn} ${Cn}`,role:"img","aria-label":s,fill:"none",className:o??"block h-full w-full",children:[V("title",{children:s}),Ot("defs",{children:[V(Pv,{id:n}),V("clipPath",{id:n.crown,children:V("path",{d:l})})]}),V("ellipse",{cx:Q(a.cxf+a.dx/2),cy:Q(a.cy+a.ry-4),rx:Q(a.dx*1.5),ry:16,fill:`url(#${n.shadow})`}),V(kv,{g:a,id:n}),V(wv,{g:a,id:n}),V("path",{d:l,fill:`url(#${n.tread})`}),V("g",{clipPath:`url(#${n.crown})`,children:dg(t).map(i=>V(Cv,{g:a,column:i},i.f[0]))}),V("path",{d:fl(a,0,0,!0),stroke:"currentColor",strokeOpacity:it.shoulder,strokeWidth:1.2}),V("path",{d:fl(a,1,1),stroke:"currentColor",strokeOpacity:it.silhouette,strokeWidth:1.4})]})}function Cv({g:e,column:t}){let[o,r]=t.f;if(!t.blocks)return Ot(Pn,{children:[V("path",{d:Yi(e,o,r),fill:"currentColor",fillOpacity:it.rib}),V("path",{d:fl(e,o,1),stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1})]});let{count:n,gap:a,phase:l=0}=t.blocks,s=1/n,i=[];for(let c=-1;c<=n;c+=1){let f=Math.max((c+l+a/2)*s,0),u=Math.min((c+l+1-a/2)*s,1);u-f>s*.15&&i.push([f,u])}return V(Pn,{children:i.map(([c,f])=>V("path",{d:fg(e,o,r,c,f),fill:"currentColor",fillOpacity:it.rib,stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1},c))})}function Pv({id:e}){return Ot(Pn,{children:[Ot("linearGradient",{id:e.tread,x1:"0",y1:"0",x2:"1",y2:"0",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.07}),V("stop",{offset:"0.14",stopColor:"currentColor",stopOpacity:.24}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.18}),V("stop",{offset:"0.84",stopColor:"currentColor",stopOpacity:.1}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.05})]}),Ot("linearGradient",{id:e.wall,x1:"0.15",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.28}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.17}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.08})]}),Ot("linearGradient",{id:e.rim,x1:"0.1",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.46}),V("stop",{offset:"0.5",stopColor:"currentColor",stopOpacity:.26}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.12})]}),Ot("radialGradient",{id:e.shadow,children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.22}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:0})]})]})}function kv({g:e,id:t}){let o=e.rimRy/e.ry,r=a=>o+(1-o)*a,n=Math.max(6,(e.ry-e.rimRy)*.3);return Ot(Pn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx),ry:Q(e.ry),fill:`url(#${t.wall})`}),yv.map((a,l)=>{let s=r(a);return V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*s),ry:Q(e.ry*s),stroke:"currentColor",strokeOpacity:it.relief[l],strokeWidth:1},a)}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*r(ug)),ry:Q(e.ry*r(ug)),stroke:"currentColor",strokeOpacity:it.lettering,strokeWidth:Q(n)})]})}function wv({g:e,id:t}){let o=Array.from({length:xg},(r,n)=>{let a=(n*(360/xg)-90)*Math.PI/180;return{x1:e.cxf+e.rimRx*gg*Math.cos(a),y1:e.cy+e.rimRy*gg*Math.sin(a),x2:e.cxf+e.rimRx*Ig*Math.cos(a),y2:e.cy+e.rimRy*Ig*Math.sin(a)}});return Ot(Pn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx),ry:Q(e.rimRy),fill:`url(#${t.rim})`}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*pg),ry:Q(e.rimRy*pg),fill:"currentColor",fillOpacity:it.dishFill,stroke:"currentColor",strokeOpacity:it.dishEdge,strokeWidth:1}),o.map((r,n)=>V("line",{x1:Q(r.x1),y1:Q(r.y1),x2:Q(r.x2),y2:Q(r.y2),stroke:"currentColor",strokeOpacity:it.spoke,strokeWidth:Sv,strokeLinecap:"round"},n)),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*mg),ry:Q(e.rimRy*mg),fill:"currentColor",fillOpacity:it.hubFill,stroke:"currentColor",strokeOpacity:it.hubEdge,strokeWidth:1})]})}import{jsx as ji}from"react/jsx-runtime";function Ji({image:e,size:t,type:o,sizes:r,priority:n=!1,className:a="aspect-square",showBackground:l=!0}){return ji("div",{className:`text-fg ${a}`,style:{padding:"var(--sf-tyre-image-inset, 0)"},children:ji(Ho,{label:t||"Tyre",src:zt(e??void 0),alt:t?`${t} tyre`:"Tyre",objectFit:"contain",sizes:r,priority:n,showBackground:l,fallback:ji(Xi,{size:t,type:o,className:"block h-full w-full p-3"})})})}import{useEffect as vv,useState as hg}from"react";var Zi=new Map;function Tv(e){let t=Zi.get(e);if(t)return t;let o=Tt.getTyre(e).catch(r=>{throw Zi.delete(e),r});return Zi.set(e,o),o}function bg(e,t){let[o,r]=hg("idle"),[n,a]=hg(null);return vv(()=>{if(!t||!e)return;let l=!1;return r("loading"),Tv(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,tyre:n}}function jG(e){if(!e||e.year===null)return null;let{make:t,model:o,year:r,modification:n}=e;return!t||!o||!n?null:{make:t,model:o,year:r,modification:n}}function Rv(e,t){let o=new URLSearchParams({make:t.make,model:t.model,year:String(t.year),modification:t.modification});return`/api/v1/tyres/${encodeURIComponent(e)}/fitment?${o.toString()}`}function dl(e,t=""){return{vehicle:{...e,region:t},status:"unknown",oemSizes:[],variants:[]}}function Fv(e,t){if(typeof t!="object"||t===null)return dl(e);let o=t,r=typeof o.vehicle=="object"&&o.vehicle!==null?o.vehicle:{},n=typeof r.region=="string"?r.region:"",a=o.status;if(a!=="fits"&&a!=="doesNotFit")return dl(e,n);let l=Array.isArray(o.variants)?o.variants.filter(s=>typeof s=="object"&&s!==null&&typeof s.sku=="string"&&typeof s.fits=="boolean"):[];return l.length===0?dl(e,n):{vehicle:{make:typeof r.make=="string"?r.make:e.make,model:typeof r.model=="string"?r.model:e.model,year:typeof r.year=="number"?r.year:e.year,modification:typeof r.modification=="string"?r.modification:e.modification,region:n},status:a,oemSizes:Array.isArray(o.oemSizes)?o.oemSizes.filter(s=>typeof s=="string"):[],variants:l.map(s=>({sku:s.sku,size:typeof s.size=="string"?s.size:"",fits:s.fits}))}}async function JG(e,t){try{let o=await Wd(Rv(e,t),{baseUrl:Ud});return Fv(t,o)}catch{return dl(t)}}function ZG(e){if(!e)return[];let t=[];for(let o of[...e.frontTyres,...e.rearTyres]){let r=qt(o);if(!r)continue;let n=$t(r);t.includes(n)||t.push(n)}return t}function QG(e,t){if(t.length===0)return null;for(let o of e){let r=qt(o);if(!r)continue;let n=$t(r);if(t.includes(n))return n}return null}function Ev(e,t){if(!e||e.status==="unknown")return"unknown";let o=e.variants.find(r=>r.sku===t);return o?o.fits?"fits":"doesNotFit":"unknown"}var _v="/tyres";function ul(e){return e?`${_v}/${e}`:null}function Qi(e,t){return nu({partNumber:e.sku,prices:e.prices},t)}var Av="Tyre";function pl(e,t,o,r){return{id:`${e.slug}|${t.sku}|${o.unit}|${o.spares>0?"spare":"no-spare"}`,slug:e.slug,name:gr(e.name),process:e.brand||Av,positionNo:"01",config:[{label:t.size},{label:Qn(o)}],finishName:"",size:t.size,components:Qi(t,o),qty:r,href:ul(e.slug)??void 0,kind:"tyre",sku:t.sku,pack:o}}function l4(e){return e.kind==="tyre"}function yg(e,t){let o=e.prices?.[t];return typeof o!="number"||!Number.isFinite(o)||o<=0?!1:e.inStock}var Sg="handed",Cg="plain";function m4(e){let t=e.variants??[],o=e.finishes.map(d=>({value:d.name,label:d.name,swatch:d.color}));function r(d){let p=[];for(let x of t){let g=d(x);!g||p.some(I=>I.value===g.value)||p.push(g)}return p}let n=r(d=>({value:ci(d),label:gm(d),note:Im(d)})),a=r(d=>d.boltPattern?{value:d.boltPattern,label:d.boltPattern}:null),l=r(d=>{let p=Aa(d);return p===null?null:{value:p,label:`ET ${p}`}}),s=r(d=>d.centreBore==null?null:{value:Be(d.centreBore),label:`${Be(d.centreBore)} mm`}),i=r(d=>({value:ir(d)?Sg:Cg,label:ir(d)?kp:wp})),c=t.map(d=>({id:`${d.finishName}|${d.size}`,options:{finish:d.finishName,size:ci(d),variantSize:d.size,...d.boltPattern?{boltPattern:d.boltPattern}:{},...Aa(d)!==null?{et:Aa(d)}:{},...d.centreBore==null?{}:{centreBore:Be(d.centreBore)},pairing:ir(d)?Sg:Cg},inStock:!fn(d),image:null,components:d.components})),u=((e.defaultFinish?o.find(d=>d.value===e.defaultFinish):void 0)??o[0])?.value;return{kind:"alloy-wheel",source:e,slug:e.slug,name:e.name,eyebrow:e.process,badge:e.badge==="new"?"New 2026":e.badge?"Bestseller":"",href:`/wheels/${e.slug}`,crumbs:[{label:"Home",href:"/"},{label:"Wheels",href:"/wheels"},{label:e.process,href:"/wheels"},{label:e.name}],cover:e.coverImage??null,inStock:e.inStock===!0,mediaGroups:e.mediaGroups,optionFields:[{key:"finish",label:"Finish",prompt:"Select a finish",role:"resolves",display:"swatch",defaultValue:u},{key:"size",label:"Size",prompt:"Select a size",role:"resolves",display:"pill",empty:{text:"This wheel isn't available to order online in this finish.",linkText:"Contact us about it \u2192",href:"/contact"}},{key:"boltPattern",label:"Bolt pattern",prompt:"Select a bolt pattern",role:"describes",display:"pill"},{key:"et",label:"Offset",prompt:"Select an offset",role:"describes",display:"pill"},{key:"centreBore",label:"Centre bore",prompt:"Select a centre bore",role:"describes",display:"pill"},{key:"pairing",label:"Wheels",prompt:"Select a pairing",role:"describes",display:"pill"}],optionValues:{finish:o,size:n,boltPattern:a,et:l,centreBore:s,pairing:i},parts:c,anchorPrices:e.prices,anchorMsrpPrices:e.msrpPrices??{}}}function x4(e,t){if(e.kind!=="alloy-wheel"||t===null)return e;let o=new Set($p(e.source.variants??[],t));if(o.size===0)return e;let r=e.parts.filter(s=>{let i=ml(e.source,s);return i!==null&&o.has(i)});if(r.length===0||r.length===e.parts.length)return e;let n=(s,i)=>new Set(s.map(c=>c.options[i]).filter(c=>c!==void 0)),a={},l=[];for(let s of e.optionFields){let i=n(e.parts,s.key),c=n(r,s.key),f=(e.optionValues[s.key]??[]).filter(d=>c.has(d.value)||!i.has(d.value));a[s.key]=f;let u=s.defaultValue!==void 0&&!f.some(d=>d.value===s.defaultValue)?f[0]?.value:s.defaultValue;l.push(u===s.defaultValue?s:{...s,defaultValue:u})}return{...e,optionFields:l,optionValues:a,parts:r}}function ml(e,t){return t?Oa(e.variants??[],t.options.finish,t.options.variantSize)??null:null}function g4(e,t){return e.finishes.find(o=>o.name===t)??e.finishes[0]??xu}function P4(e){return e.kind==="tyre"?"advisory":"required"}var ec={choice:ru,qty:1};function Lv(e,t){if(e.kind!=="alloy-wheel")return`Set of ${4}`;let o=ml(e.source,t);return o?La(o):`Set of ${4}`}var Pg=(e,t)=>e===1?t:`${e} \xD7 ${t}`;function kg(e){return e.unit==="set"?{label:`Add a spare \u2014 ${nr+1} instead of ${nr}`}:null}var kn={howMany:"How many wheels",oneSet:"One set",oneSetPlusSpare:"One set + 1 spare",whichSide:"Which side is the spare?",left:"Left",right:"Right"};function Ov(e,t){return t.unit!=="set"||au(e)===null?null:{counts:[{value:nr,label:kn.oneSet},{value:nr+ou,label:kn.oneSetPlusSpare}],side:t.spares>0?{label:kn.whichSide,options:[{value:"left",label:kn.left},{value:"right",label:kn.right}]}:null}}function Nv(e,t,o){if(e.kind==="tyre")return{packs:[{value:"set",label:`A set of ${nr}`},{value:"single",label:"Just one"}],extra:kg(o.choice),spareCounts:[],spareSide:null,components:t?Qi({sku:t.id,prices:t.components[0].prices},o.choice):[],quantityLabel:Pg(o.qty,Qn(o.choice))};let r=t?Ov(t.components,o.choice):null;return{packs:[],extra:r?null:kg(o.choice),spareCounts:r?.counts??[],spareSide:r?.side??null,components:t?Is(t.components,o.choice):[],quantityLabel:Pg(o.qty,lu(Lv(e,t),o.choice))}}function k4(e,t,o,r,n){if(!t)return null;if(e.kind==="tyre"){let f=(e.source.variants??[]).find(u=>u.sku===t.id);return f?pl(e.source,f,r.choice,r.qty):null}let a=e.source,l=ml(a,t);if(!l)return null;let s=t.options.finish??"",i=l.size,c=r.choice.spares>0;return{id:`${a.slug}|${s}|${i}|${n.fitmentKey}${c?"|spare":""}`,slug:a.slug,name:gr(a.name),process:a.process,positionNo:"01",config:[{label:i},{label:s,gold:!0},{label:n.fitmentLabel},{label:Nv(e,t,r).quantityLabel}],finishName:s,size:i,components:Is(t.components,r.choice),qty:r.qty,...c?{pack:r.choice}:{}}}function wg(e,t){let o=t.trim(),r=e.trim();return!r||!Bv(o,r)?o:o.slice(r.length).replace(/^[^\p{L}\p{N}]+/u,"")||o}function Bv(e,t){if(e.length<t.length||e.slice(0,t.length).toLowerCase()!==t.toLowerCase())return!1;let o=e[t.length];return o===void 0||!/[\p{L}\p{N}]/u.test(o)}import{Fragment as zv,jsx as yo,jsxs as wn}from"react/jsx-runtime";var Gv="from ",Wv=2,Uv=[];function tc({brand:e,brandLogo:t,brandPlate:o=!0,kindLabel:r=null,showBrand:n=!0,name:a,slug:l,sizes:s,fitSize:i=null,rimDiameters:c,prices:f,image:u,currency:d,editing:p=!1,fieldUsage:x=Uv}){let g=dr(x),{add:I,open:h,warmCatalog:k}=aa();Mv(()=>{p||k("tyre")},[p,k]);let{currency:S}=fo(),C=ra(ta(f,d),null),T=na(C,d,Gv),b=[s.length>0?`${s.length} ${s.length===1?"size":"sizes"}`:null,g("rim_diameter")?ka(c):null].filter(Boolean).join(" \xB7 "),w=ul(l),[O,D]=vg(!1),R=Dv(()=>{l&&D(!0)},[l]),{state:_,tyre:G}=bg(l??null,O),Y=Hv(()=>G?.variants??[],[G]),[M,v]=vg(null),j=Y.length===1?Y[0].size:null,F=M??j,E=Y.find(z=>z.size===F),se=E!=null&&yg(E,S),N=_==="ready",le=!w||_==="error"||N&&Y.length===0;function ge(){!G||!E||!se||p||(I(pl(G,E,ec.choice,ec.qty)),h())}let ie=N&&Y.length>0?Y.map(z=>z.size):s,te=ie.slice(0,Wv),he=ie.length-te.length,de=z=>["cursor-pointer transition-colors",pn,z?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" ");return yo(mn,{href:w,identityLink:!0,containerProps:{onPointerEnter:R,onTouchStart:R,onFocusCapture:R},image:yo(Ji,{image:u,className:"h-full w-full",sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 280px",showBackground:!1}),plate:o?yo(Vi,{brand:e,logo:t}):null,eyebrow:oi(r,n&&g("brand")&&e||null),name:wg(e??"",a),spec:b,price:T,metaLine:C.priced?"each":null,extras:wn(zv,{children:[i&&wn("p",{className:"font-mono text-[length:var(--size-label,11px)] font-medium uppercase tracking-[0.14em] text-green",children:["Fits \xB7 ",i]}),wn("div",{className:Ha,children:[yo("div",{className:Ga,children:te.map(z=>N&&Y.length>0?yo("button",{type:"button",title:z,"aria-label":z,"aria-pressed":F===z,onClick:()=>v(z),className:de(F===z),children:z},z):yo("span",{className:Ua,children:z},z))}),he>0&&wn("span",{className:Wa,children:["+",he]})]}),wn("div",{className:za,children:[!le&&C.priced&&yo("button",{type:"button",onClick:ge,[ea]:"",disabled:N&&!se,className:se||!N?`${Ir}${se?"":" opacity-80"}`:"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70",children:N&&!se?"Select a size":"Add to basket"}),w&&yo(Pe,{href:w,className:Ka,children:"Open product page"})]})]})})}import{jsx as Kv}from"react/jsx-runtime";function oc({item:e,currency:t,kindLabel:o=null,showBrand:r=!0,fitSize:n=null,editing:a=!1,fieldUsage:l}){return Kv(tc,{brand:e.brand,brandLogo:e.brandLogo,kindLabel:o,showBrand:r,name:e.name,slug:e.slug,sizes:e.sizes,fitSize:n,rimDiameters:e.rimDiameters,prices:e.prices,image:e.coverImage,currency:t,editing:a,fieldUsage:l})}import{Fragment as Yv,jsx as We,jsxs as Go}from"react/jsx-runtime";var Rg={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},Fg=[{value:"para",label:"Paragraph size \u2014 13px",cls:"font-mono font-normal uppercase tracking-[0.22em] text-[length:var(--size-label,13px)]"},{value:"sm",label:"Small \u2014 40px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,40px)] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},{value:"md",label:"Medium \u2014 48px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,48px)] max-[800px]:text-[length:var(--size-headingMedium,32px)]"},{value:"lg",label:"Large \u2014 56px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,56px)] max-[800px]:text-[length:var(--size-headingMedium,36px)]"},{value:"xl",label:"Extra large \u2014 64px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,64px)] max-[800px]:text-[length:var(--size-headingMedium,40px)]"}],rc="lg";function Vv(e){return(Fg.find(t=>t.value===e)??Fg.find(t=>t.value===rc)).cls}function qv({num:e,catalog:t,kinds:o,title:r,titleSize:n,padTop:a,description:l,link:s,products:i,source:c,columns:f,limit:u,editing:d,capWidth:p,imageBackground:x,spinOnHover:g,coverIndex:I,indexBadge:h,outline:k,showBadge:S,fieldUsage:C,showCardPrice:T,showCardFinishes:b,showCardSizes:w,showCardBuy:O,showCardPage:D,cardImage:R,gap:_}){let G=Pr(()=>C?fr(C,"alloy-wheel"):void 0,[C]),Y=Pr(()=>C?fr(C,"tyre"):void 0,[C]),M=`pg-${$v().replace(/:/g,"")}`,v=Rg[Math.min(6,Math.max(1,f??4))]??Rg[4],j=typeof u=="number"&&u>0,F=typeof p=="number",E=Pr(()=>{let Fe=t??c?.wheels??null;return Fe?nl(Fe):null},[t,c]),se=c?.process,N=!!se,{filters:le,reportCount:ge,reportLugs:ie,reportSizes:te,reportFinishes:he,vehicle:de}=ng(),{currency:z}=fo(),Le=N&&!!le.process&&le.process!==se,Re=Pr(()=>E?N?Zx(E,le,z,de.fit):E:null,[E,N,le,z,de.fit]);Tg(()=>{if(N)return ge(M,Le?0:Re?.length??0),()=>ge(M,0)},[N,Le,Re,ge,M]);let Oe=Pr(()=>{let Fe=(Re??[]).filter(B=>Ee(B)!=="tyre");if(Fe.length===0)return!1;let L=Fe.some(B=>!!B.process);return Fe.some(B=>!!B.setWords)||ri({kind:!1,brand:!1,process:L},G??[])},[Re,G]),ne=Pr(()=>({lugs:_p(E??[]),sizes:Op(E??[]),finishes:Iu(E??[])}),[E]);Tg(()=>(ie(M,ne.lugs),te(M,ne.sizes),he(M,ne.finishes),()=>{ie(M,[]),te(M,[]),he(M,[])}),[ne,ie,te,he,M]);let K=Pp("ProductGrid",_,"both"),H=`${M} grid${K.className} bg-[var(--catalog-grid-bg)] ${v}`,He=Re?Re.length>0?We("div",{className:H,style:K.style,children:Re.map((Fe,L)=>Ee(Fe)==="tyre"?We(oc,{item:Fe,currency:z,editing:d,fieldUsage:Y},`tyre:${Fe.slug}-${L}`):We(xn,{wheel:Fe,variant:"catalog"},`${Fe.slug}-${L}`))}):d?We("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:Go("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:["No products in \u201C",c?.name,"\u201D yet"]})}):null:We(i,{className:H,style:K.style,minEmptyHeight:320}),Ze=Re?Re.length:null,It=Rm(Ba(o)),Ne=e||r||l||s?Go("div",{className:`${bu} sticky top-[var(--sf-header-h,88px)] z-30 mb-[18px] flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${F?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[Go("div",{className:"flex min-w-0 items-end gap-[21px]",children:[e&&We("span",{className:"font-mono text-[length:var(--size-label,13px)] leading-none uppercase tracking-[0.22em] text-fg-dim",children:re(e)}),r&&We("h2",{className:`${Vv(n)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:Lt(r,!1)})]}),(l||s||Ze!==null)&&Go("div",{className:"flex items-center gap-5 max-[800px]:gap-3",children:[l&&We("span",{className:"max-w-[340px] truncate font-display text-[length:var(--size-body,13px)] leading-[1.4] text-fg-dim max-[800px]:hidden",children:re(l)}),s&&Go(Pe,{href:s.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[re(s.text),We("span",{"aria-hidden":!0,children:"\u2192"})]}),Ze!==null&&Go("span",{className:"whitespace-nowrap font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:[Ze," ",Ze===1?It.one:It.many]})]})]}):null,Ve=typeof a=="number"?a:120,ht=Yp(h),rt=jp(M,ht),Ut=Go(Yv,{children:[j&&We("style",{children:`.${M} > *:nth-child(n+${u+1}){display:none}`}),rt&&We("style",{children:rt}),Ne,He,We(Ui,{editing:d})]});if(Le)return null;let Jo=We("section",{...N?{[rl]:se}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${Ve}px`,...Ip(R)},children:F?We("div",{style:Zd(!1,p)??void 0,children:Ut}):Ut}),Xr=d&&!E?We(Jx,{children:Jo}):Jo;return We(fm,{imageBackgroundFill:Ca(x,Et),spinOnHover:g??!0,coverIndex:I??1,indexBadge:ht,outline:k??Io,showBadge:S??!0,fieldUsage:G,reserveEyebrow:Oe,showCardPrice:T??!0,showCardFinishes:b??!0,showCardSizes:w??!1,showCardBuy:O??!1,showCardPage:D??!1,children:Xr})}var nc="wheels",Xv="collection:",jv=60;function Jv(e){let t=e?.props?.source;return e?.type==="ProductGrid"&&!!t?.process}function Zv(e){return e.some(t=>t?.type==="CatalogFilterBar"||Jv(t))}function Qv(){return{type:"CatalogFilterBar",props:{id:"CatalogFilterBar-wheels-seed",showProcess:!0,showLugs:!0,showPrice:!0,showCount:!0,showSort:!0}}}function eT(e,t){let o=Vs(e);return{type:"ProductGrid",props:{id:`ProductGrid-wheels-${o}`,dynamic:!1,num:t,title:e,titleSize:rc,padTop:100,description:"",linkText:"Explore the collection",linkHref:`/wheels/collections/${o}`,columns:4,showAll:!0,limit:8,imageBackground:Et,spinOnHover:!0,source:{slug:`${Xv}${o}`,name:e,process:e,wheels:[]},fullWidth:!0,pageWidth:Zn.default,products:[]}}}function tT(e){let t=e?dp(e):fp;return[Qv(),...t.map(o=>eT(o.key,o.num))]}function Eg(e,t,o){if(e!==nc)return t;let r=t?.content??[];if(Zv(r))return t;let n=tT(o),a=r.findIndex(s=>s?.type===Jn),l=a===-1?[...r,...n]:[...r.slice(0,a),...n,...r.slice(a)];return{...t,content:l}}function _g(e,t,o={}){let r=e?.content??[],n=o.scopeToCatalog?qs(t):null,a=r.map(l=>{let s=l?.props?.source;if(l?.type==="CatalogFilterBar"&&n)return{...l,props:{...l.props,processOptions:n}};if(l?.type!=="ProductGrid"||!s?.process)return l;if(n&&!n.includes(s.process))return null;if(o.onlyEmpty&&(s.wheels?.length??0)>0)return l;let i=t.filter(c=>c.process===s.process).slice(0,jv);return{...l,props:{...l.props,source:{...s,wheels:i}}}}).filter(l=>l!==null);return{...e,content:a}}var oT="__all__",F5="All products";function Ag(e){return e?.slug===oT}var kr="AlloyWheelsListing",rT="ProductGrid",Lg="catalog",nT="CatalogFilterBar",xl="fieldUsage";function wr(e){return e?.type===rT&&Ag(e.props?.source)}function ac(e){return e?.type===nT}function aT(e){return e?.type===kr||wr(e)||ac(e)}function lT(e){let t=e.content??[],o=e.zones??{};return[...t,...Object.values(o).flat()]}function gl(e){return e?lT(e).some(t=>t?.type===kr||wr(t)):!1}function Og(e,t){return iT(e,o=>wr(o)?{...o,props:{...sc(o).props,[Lg]:sT(t,Ba(o.props?.kinds))}}:{...o,props:{...ic(o).props,products:t}})}function lc(e){return Bg(e,aT,t=>ac(t)?Ng(t):wr(t)?sc(t):ic(t))}function Ng(e){if(!e.props||!(xl in e.props))return e;let{[xl]:t,...o}=e.props;return{...e,props:o}}function sc(e){let{[Lg]:t,[xl]:o,...r}=e.props??{};return{...e,props:r}}function sT(e,t){let o=new Set(t);return e.filter(r=>{let n=r.kind??"alloy-wheel";return o.has(n)})}function L5(e){return wr(e)?sc(e):ac(e)?Ng(e):e?.type===kr?ic(e):e}function ic(e){let{wheels:t,products:o,[xl]:r,...n}=e.props??{};return{...e,props:n}}function iT(e,t){return Bg(e,o=>o?.type===kr||wr(o),t)}function Bg(e,t,o){let r=l=>t(l)?o(l):l,n=e,a={...e};return n.content&&(a.content=n.content.map(r)),n.zones&&(a.zones=Object.fromEntries(Object.entries(n.zones).map(([l,s])=>[l,s.map(r)]))),a}import{useEffect as Mg,useRef as cc,useState as Hg}from"react";var cT="data-editor-theme";function Dg(e){typeof document>"u"||document.documentElement.setAttribute(cT,"light")}var fT=500,Gg={canCreatePlatformTemplate:!1};function dT(e){return!e||typeof e!="object"?Gg:{canCreatePlatformTemplate:e.canCreatePlatformTemplate===!0}}function uT(e,t={}){let o=t.session??Ye();o.auth.token=e.token,o.auth.brandId=e.brandId??null,Ad(o,e.siteId),(t.stampChromeTheme??!0)&&Dg(e.theme)}function Wg(e){let[t,o]=Hg(null),r=cc(null),[n,a]=Hg(Gg),l=cc(e?.onAuth),s=cc(e?.onMessage);Mg(()=>{l.current=e?.onAuth,s.current=e?.onMessage});let i=ao(),c=ba();return Mg(()=>{let f=i.subscribe(d=>{let p=d;if(p.type==="storefront-editor:auth"&&typeof p.token=="string"&&p.token){let x=!!r.current;r.current=p.token,o(p.token),uT({...p,token:p.token},{stampChromeTheme:i.ownsDocument,session:c}),a(dT(p.can)),l.current?.(x)}else s.current?.(d)});if(i.send("storefront-editor:ready"),!c.usesBridgedToken)return f;let u=window.setInterval(()=>{r.current?window.clearInterval(u):i.send("storefront-editor:ready")},fT);return()=>{f(),window.clearInterval(u)}},[i,c]),{token:t,tokenRef:r,capabilities:n}}var fc=new Set,dc=new Set,uc=new Set;function U5(e){return fc.add(e),()=>fc.delete(e)}function Ug(){fc.forEach(e=>e())}function z5(e){return dc.add(e),()=>dc.delete(e)}function zg(){dc.forEach(e=>e())}function Il(e){return uc.add(e),()=>uc.delete(e)}function pc(){uc.forEach(e=>e())}var mc=new Map,pT=9e5,Kg=0;function mT(){return Kg+=1,`fe-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(Kg)}`}function $g(e,t){e.connected&&e.send("storefront-editor:open-form",{mode:"edit",formId:t})}function Vg(e,t){if(!e.connected)return Promise.resolve({status:"closed"});let o=mT();return new Promise(r=>{let n=setTimeout(()=>qg(o,{status:"timeout"}),t.timeoutMs??pT);mc.set(o,a=>{clearTimeout(n),r(a)}),e.send("storefront-editor:open-form",{requestId:o,mode:t.mode,...t.formId?{formId:t.formId}:{}})})}function qg(e,t){let o=mc.get(e);o&&(mc.delete(e),o(t))}function xc(e,t){qg(e,t?{status:"saved",form:t}:{status:"closed"})}function Yg(e){switch(e?.type){case"storefront-editor:category-updated":return Ug(),!0;case"storefront-editor:menus-updated":return zg(),!0;case"storefront-editor:form-saved":{let o=e;return pc(),o.requestId&&xc(o.requestId,o.form??null),!0}case"storefront-editor:form-closed":{let o=e;return pc(),o.requestId&&xc(o.requestId,null),!0}case"storefront-editor:media-picked":{let o=e;return o.requestId&&Ws(o.requestId,o.media??null),!0}case"storefront-editor:media-pick-cancelled":{let o=e;return o.requestId&&Ws(o.requestId,null),!0}default:return!1}}var xT={unauthorized:"the editor's sign-in was refused (unauthorized).","changed-elsewhere":"the page changed while it was being opened (changed-elsewhere).","lock-taken":"somebody else holds this page (lock-taken).","not-found":"this page no longer exists (not-found).",invalid:"the backend refused the request (invalid).",unavailable:"the backend could not be reached (unavailable)."};function gc(e){return ma(e)?e.cause instanceof at?gc(e.cause):`${xT[e.kind]} ${e.message}`.trim():e instanceof at?e.status===er?`${Gd} (no response)`:e.status===401||e.status===403?`the editor's sign-in was refused (${e.status}). Reload the console and open the editor again; if it keeps happening the bridged token is not valid for this site.`:e.status===404?"this page no longer exists (404).":e.status>=500?`the server failed (${e.status}). ${e.message}`:`the server refused the request (${e.status}). ${e.message}`:e instanceof Error?`${e.name}: ${e.message}`:String(e)}import{canWriteDocument as Wo,holderOf as bT,newEaselClientId as yT,reloadIfVersionMoved as ST}from"efficient-easel/edit-lock";import{useAutosave as CT}from"efficient-easel/autosave";import{createEditLock as gT}from"efficient-easel/edit-lock";var hl=gT({readFailure:$s,conflictCode:rn});import{jsx as wT}from"react/jsx-runtime";var PT={content:[],root:{},zones:{}};function kT(e,t){if(e.kind!==t.kind)return!1;if(e.kind==="template"){let r=t;return e.id===r.id&&(e.pageSlug??dt)===(r.pageSlug??dt)}let o=t;return e.slug===o.slug&&e.siteId===o.siteId}var So=IT(null);function Xg(){let e=hT(So);if(!e)throw new Error("useStorefrontDocument must be used within StorefrontDocumentProvider");return e}function RW({target:e,children:t}){let[o,r]=St(e),n=ao(),a=ba(),l=Ic(()=>nn(a),[a]),s=o.kind==="template",i=o.kind==="template"?o.id:null,c=o.kind==="template"?o.pageSlug??dt:o.slug,f=o.kind==="page"?o.siteId??null:null,u=Ic(()=>ln(a),[a]),d=Ic(()=>o.kind==="template"?sp(o.id,l,u):lp(o.siteId,l,u),[l,u,o.kind,o.kind==="template"?o.id:o.siteId]),p=d.capabilities,x=o.kind==="page"?o.originSlug??null:null;ut(()=>{_d(a,f)},[a,f]);let g=ot(o);ut(()=>{g.current=o},[o]);let{token:I,tokenRef:h,capabilities:k}=Wg({onMessage:P=>{if(Yg(P))return;if(P?.type==="storefront-editor:navigate"){let ye=P;ye?.target&&Td(ye.target)}}}),S=a.usesBridgedToken?I!==null:!0,C=d.lock,T=!!l.lock,[b,w]=St(null),[O,D]=St(null),[R,_]=St(null),[G,Y]=St(null),M=ot(null),[v,j]=St(!1),F=ot(null),[E,se]=St(null),N=ot(null),[le,ge]=St(null),ie=ot(null);ut(()=>{ie.current=le},[le]);let[te,he]=St(p.hasEditLock?{kind:"checking"}:{kind:"editing"}),de=ot(te);ut(()=>{de.current=te},[te]);let z=ot(()=>Promise.resolve(!1)),Le=ke(P=>{M.current=P,j(!0)},[]),Re=CT({save:async({id:P,data:A})=>{if(!Wo(de.current)){Le({id:P,data:A});return}if(!await z.current(P,A)){if(!Wo(de.current)){Le({id:P,data:A});return}throw new Error("page save did not land")}},onFailure:(P,A)=>{A===0&&n.send("storefront-editor:save-failed")}}),{state:Oe,push:ne,flush:K,pause:H,resume:He,stop:Ze,reset:It,retryNow:oo,hasPending:Ne}=Re,Ve=ot(Oe);ut(()=>{Ve.current=Oe},[Oe]);let ht=ju(Oe),rt=ke(()=>{let P=M.current;P&&(M.current=null,j(!1),ne(P))},[ne]),Ut=ot("");Ut.current||(Ut.current=yT());let[Jo,Xr]=St(0),Fe=ot(!1),L=e.kind==="page"&&e.slug===lt,[W,B]=St(e.kind==="template"||L),ce=ot(!1);ut(()=>{if(ce.current)return;ce.current=!0;let P=n.address.search();if(e.kind==="page"&&e.slug===lt){let A=Bs(),ye=A&&A!==lt?A:dt;n.address.load({kind:"page",slug:ye,siteId:e.siteId});return}if(e.kind==="template"){if(new URLSearchParams(P).get("editTemplate")==="1"){B(!1);return}n.address.load({kind:"page",slug:dt})}},[e,n]);let Ie=n.send;ut(()=>{if(!S)return;let P=!1,A=d.resolve(c),Se=p.hasCatalog&&!s&&c===nc?Ao().catch(()=>[]):Promise.resolve([]);return Promise.all([A,Se]).then(async([me,qe])=>{if(P)return;if(!me){if(!s&&c!==dt){n.address.load({kind:"page",slug:dt,siteId:f??void 0});return}Y(s?"Couldn\u2019t open a page in this template.":`No storefront page with slug "${c}".`);return}w(me.id),D(me.kind??null),N.current=me.version??null;let Qe=me.layout,gS=Qe&&Object.keys(Qe).length?Qe:PT,IS=np(gS),Rd=Eg(s||!p.hasCatalog?"":c,IS,qe),ss=qe.length?_g(Rd,qe,{onlyEmpty:!0}):Rd;if(p.hasCatalog&&gl(ss)){let Fd=await sa().catch(()=>[]);if(P)return;if(Fd.length){_(Og(ss,nl(Fd)));return}}_(ss)}).catch(me=>{P||(console.error("[storefront-editor] document load failed",me),Y(me instanceof zd?`\u201C${c}\u201D exists on more than one website. Open it from the site you want to edit.`:`Could not load the document \u2014 ${gc(me)}`))}),()=>{P=!0}},[S,I,s,d,c]);let ro=ke(P=>new Promise(A=>{let ye=Date.now(),Se=setInterval(()=>{let me=h.current;me&&me!==P?(clearInterval(Se),A(me)):Date.now()-ye>6e3&&(clearInterval(Se),A(null))},200)}),[]),nt=ke(async P=>{let A=h.current;if(!A&&a.usesBridgedToken)return{ok:!1,error:new Error("no editor token")};try{return{ok:!0,value:await P(A??"")}}catch(ye){if(ip(ye)){Ie("storefront-editor:auth-expired");let Se=A?await ro(A):null;if(Se)try{return{ok:!0,value:await P(Se)}}catch(me){return{ok:!1,error:me}}}return{ok:!1,error:ye}}},[Ie,ro,a]),jr=ke(async P=>{let A=h.current?await nt(P):{ok:!1,error:new Error("no editor token")};return A.ok||Ie("storefront-editor:save-failed"),A.ok},[Ie,nt]),qn=ke(async(P,A,ye=!1)=>{if(!Wo(de.current)||ie.current)return!1;let Se=await nt(()=>d.saveLayout(P,A,N.current,Ut.current));if(Se.ok)return N.current=Se.value.version??N.current,!0;let me=hl.readLockTaken(Se.error);if(me){let Qe={kind:"takenover",holder:me};return de.current=Qe,he(Qe),!1}let qe=hl.readSaveConflict(Se.error);if(qe){if(qe.savedByYou&&!ye&&d.rereadVersion){let Qe=await nt(()=>d.rereadVersion(P));if(Qe.ok&&Qe.value)return N.current=Qe.value,z.current(P,A,!0)}Ze(),ie.current=qe,ge(qe)}return!1},[d,nt,Ze]);ut(()=>{z.current=qn},[qn]);let sS=ke(P=>{if(Ie("storefront-editor:dirty"),!b)return;let A=gl(P)?lc(P):P;if(F.current=A,!Wo(de.current)){Le({id:b,data:A});return}ne({id:b,data:A})},[b,Ie,Le,ne]),Zo=ke(async()=>(Wo(de.current)&&rt(),await K()&&M.current==null),[rt,K]),wd=ot(Zo);ut(()=>{wd.current=Zo},[Zo]);let as=ot(nt);ut(()=>{as.current=nt},[nt]);let ls=ke(()=>{n.address.reload()},[n]),vd=ot(()=>Promise.resolve(!1));ut(()=>{vd.current=()=>{let P=d.rereadVersion;return!b||!P?Promise.resolve(!1):ST({ours:N.current,stored:async()=>{let A=await as.current(()=>P(b));return A.ok?A.value:null},hasPending:()=>M.current!=null||Ne(),reload:ls})}},[d,b,Ne,ls]),ut(()=>{if(!C||!b||!S)return;let P=!1,A=null,ye=Ut.current,Se=hl.makeClaimBeat({claim:async qe=>{let Qe=await as.current(()=>C.claim(b,ye,qe));if(Qe.ok)return{heartbeat_seconds:Qe.value.heartbeatSeconds};throw Qe.error},cancelled:()=>P,currentAccess:()=>de.current,heldWrite:()=>({pending:M.current!=null||Ne(),autoSaveEnabled:!Ve.current.paused,saveConflict:ie.current!=null}),setAccess:qe=>{de.current=qe,he(qe)},releaseHeldWrite:()=>{wd.current()},startHeartbeat:qe=>{A=setInterval(()=>{Se(!1)},qe)},stopHeartbeat:()=>{A&&(clearInterval(A),A=null)},reloadIfMoved:()=>{vd.current()}}),me=Fe.current;return Fe.current=!1,me||he({kind:"checking"}),Se(me),()=>{P=!0,A&&clearInterval(A),C.release(b,ye).catch(()=>{})}},[b,C,S,I,Jo]);let iS=ke(()=>{!C||!b||(Fe.current=!0,Xr(P=>P+1))},[b,C]),cS=ke(()=>{he(P=>{let A=P.kind==="blocked"||P.kind==="takenover"?P.holder:null;return A?{kind:"readonly",holder:A}:P})},[]),fS=ke(()=>{Ve.current.paused?(Wo(de.current)&&rt(),He()):H()},[rt,H,He]),dS=ke(()=>{oo()},[oo]),To=ke(P=>{if(F.current=null,Ju(P.kind!=="template"&&T,{resetAutosave:()=>{It(),M.current=null,j(!1)},setVersion:A=>{N.current=A},setSaveConflict:ge,setAccess:he}),P.kind==="page"){let A=Bs();P.slug!==lt&&P.slug!==A&&Ds()}else Ds();r(P),w(null),D(null),_(null),Y(null),n.address.show(P),P.kind==="page"&&P.slug!==lt&&n.send("storefront-editor:navigated",{target:P})},[It,n,T]),Td=ke(P=>{if(kT(P,g.current))return;let A=M.current!=null;if(!A&&!Ne()){To(P);return}let ye=Ve.current;if(A||ye.paused||ye.failed||ye.stopped){se(P);return}K().then(Se=>{Se?To(P):se(P)})},[To,Ne,K]),uS=ke(()=>se(null),[]),pS=ke(()=>{se(P=>(P&&To(P),null))},[To]),mS=ke(async()=>{let P=E;if(!P)return;await Zo()&&(se(null),To(P))},[E,Zo,To]),xS=ke(async P=>{if(!b||!Wo(de.current)||ie.current)return;let A=gl(P)?lc(P):P;if(!await qn(b,A)){ie.current||Ie("storefront-editor:save-failed");return}let Se=d.publish;if(!p.canPublish||!Se){Ie("storefront-editor:saved");return}let me=await nt(()=>Se(b,N.current??void 0));if(!me.ok){Ie("storefront-editor:save-failed");return}N.current=me.value.version??N.current,Ie("storefront-editor:published")},[b,d,p.canPublish,Ie,qn,nt]);return wT(So.Provider,{value:{target:o,adapter:d,capabilities:p,templateId:i,currentSlug:c,currentKind:O,siteId:f,ready:S,token:I,tokenRef:h,notifyParent:Ie,bridgeCapabilities:k,runAuthed:jr,docId:b,data:R,getLiveData:()=>F.current??R,footerOriginSlug:x,error:G,redirecting:W,saveStatus:ht,saveState:Oe,autoSaveEnabled:!Oe.paused,autoSaveStoppedByConflict:Oe.stopped,hasUnsavedEdits:Oe.pending||v,toggleAutoSave:fS,retrySave:dS,onChange:sS,flushSave:Zo,onPublish:xS,access:te,readOnly:bT(te)!==null,takeOverEditing:iS,viewReadOnly:cS,saveConflict:le,reloadFromServer:ls,navigate:Td,pendingNav:E,cancelPendingNav:uS,discardAndNavigate:pS,saveAndNavigate:mS},children:t})}import{createContext as vT,useContext as TT}from"react";var RT=vT("desktop"),hc=()=>TT(RT);import{useRef as hf,useState as zl}from"react";import{useEasel as Nr}from"efficient-easel/easel";var jg="50% 50%";var Tr=e=>e<0?0:e>100?100:Math.round(e);function bc(e){let t=String(e??"").trim().split(/\s+/);if(t.length!==2)return{x:50,y:50};let o=a=>{let l=/^(-?\d+(?:\.\d+)?)%$/.exec(a);return l?Number(l[1]):null},r=o(t[0]),n=o(t[1]);return r===null||n===null?{x:50,y:50}:{x:Tr(r),y:Tr(n)}}function vr(e,t){return`${Tr(e)}% ${Tr(t)}%`}function Jg(e,t,o=!1){let r=o?10:1,{x:n,y:a}=bc(e);switch(t){case"ArrowLeft":return vr(n-r,a);case"ArrowRight":return vr(n+r,a);case"ArrowUp":return vr(n,a-r);case"ArrowDown":return vr(n,a+r);default:return null}}function Zg(e,t,o){return!(e.width>0)||!(e.height>0)?{x:50,y:50}:{x:Tr((t-e.left)/e.width*100),y:Tr((o-e.top)/e.height*100)}}import{useCallback as AT,useEffect as LT,useRef as OT,useState as NT}from"react";import{useEasel as BT}from"efficient-easel/easel";import{SettingsAction as DT}from"efficient-easel/panel";function yc(e){return typeof e=="number"&&Number.isFinite(e)}function NW(e,t){if(!yc(e))return;let o=jn(co(e));if(Object.keys(o).length===0)return;let r=o[bl];if(typeof r!="string")return o;let n=Rr(t)?Fr(r,pt(t)??[]):r;return{...o,[FT]:n}}var FT="--sf-section-radius",bl="--sf-card-radius",ct=["tl","tr","br","bl"];function pt(e){if(!Array.isArray(e))return null;let t=e.filter(o=>ct.includes(o));return ct.filter(o=>t.includes(o))}function Rr(e){let t=pt(e);return t!==null&&t.length<ct.length}function Fr(e,t){return ct.map(o=>t.includes(o)?e:"0").join(" ")}var Co="Which corners",Er=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];function yl(e){let t=o=>e.includes(o);if(e.length===ct.length)return"All four";if(e.length===0)return"None";if(e.length===1)return Er.find(o=>o.value===e[0])?.label??"1 corner";if(e.length===2){if(t("tl")&&t("tr"))return"Top two";if(t("bl")&&t("br"))return"Bottom two";if(t("tl")&&t("bl"))return"Left two";if(t("tr")&&t("br"))return"Right two"}return`${e.length} corners`}var ET="--sf-card-box-radius",_T="--sf-site-card-radius",HW="sf-section-bleeds";function vn(e){return typeof e=="number"&&Number.isFinite(e)}function GW(e,t){if(!vn(e))return;let o=jn(co(e))[bl];if(typeof o!="string")return;let r=Rr(t)?Fr(o,pt(t)??[]):o;return{[ET]:r}}function WW(e){let t=e[bl];return typeof t=="string"?{[_T]:t}:{}}function Qg(e,t){let o=e.find(a=>a?.props?.id===t);if(!o)return[...e];let r=o.props?.cardCorners,n=o.props?.cardCornerSides;return e.map(a=>a?.props?.id===t?a:{...a,props:{...a.props,cardCorners:r,cardCornerSides:n}})}function eI(e,t,o){let r=o?.zone??"",n=r.lastIndexOf(":"),a=n>0?r.slice(0,n):"",l=n>0?r.slice(n+1):"",s=a?qd(e,t,a):null,i=s&&Array.isArray(s.item.props[l])?s.item.props[l]:[],c=o?.index??-1,f=c>=0?i[c]:void 0,u=f?.props?.id?String(f.props.id):"",d=Math.max(i.length-1,0);return!s||!u?{can:!1,reason:"unreachable",others:0}:i.length<=1?{can:!1,reason:"alone",others:d}:vn(f?.props?.cardCorners)?{can:!0,others:d,zone:s.zone,index:s.index,data:{...s.item,props:{...s.item.props,[l]:Qg(i,u)}}}:{can:!1,reason:"unset",others:d}}function tI(e){if(!e.can)return e.reason==="alone"?"This is the only card in the section.":e.reason==="unset"?"Set this card's corners first.":"This card is not in a section that can share corners.";let t=e.others;return`Gives the other ${t===1?"card":`${t} cards`} this card's Corners and Which corners.`}function oI(e){return`Applied to ${e} ${e===1?"card":"cards"}`}function rI(e,t){e.can&&t(e.zone,e.index,e.data)}import{jsx as nI}from"react/jsx-runtime";var MT=2200,HT="apply-corners-to-siblings",GT="Apply to all cards";function WT({plan:e,doneCount:t,onPress:o}){return nI(DT,{id:HT,label:GT,note:tI(e),disabled:!e.can,done:t!==null,doneLabel:oI(t??0),onPress:o})}function Sc(){let{appState:e,config:t}=BT(i=>i),o=vu(),[r,n]=NT(null),a=OT(null);LT(()=>()=>{a.current&&clearTimeout(a.current)},[]);let l=eI(t,e.data.content??[],e.ui.itemSelector),s=AT(()=>{rI(l,o.replaceComponent),l.can&&(n(l.others),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>n(null),MT))},[l,o]);return nI(WT,{plan:l,doneCount:r,onPress:s})}import{jsx as Tn,jsxs as aI}from"react/jsx-runtime";function Sl({label:e,onClear:t,what:o="override"}){return Tn("button",{type:"button",className:"sf-part-mark",title:`Clear ${o}`,"aria-label":`Clear ${o}: ${e}`,onClick:t,children:Tn(UT,{})})}function UT(){return aI("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[Tn("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),aI("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[Tn("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),Tn("path",{d:"M13 2.5V5h-2.6"})]})]})}var lI=1,sI="Corners";function zT(e){return co(e)}function nU(e,t){let o=zT(e);if(o===null)return null;let r=`${o}px`;return{borderRadius:Rr(t)?Fr(r,pt(t)??[]):r}}import{createContext as $T,useContext as VT,useMemo as qT}from"react";var KT=["vehicle","process","size","lugs","finish","price"],Cl={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};function iI(e){if(!e)return Cl;let t={...Cl};for(let o of KT){let r=e[o];if(typeof r!="string")continue;let n=r.trim();n&&(t[o]=n)}return t}import{jsx as YT}from"react/jsx-runtime";var cI=$T(Cl);function cU({labels:e,children:t}){let o=qT(()=>iI(e),[e]);return YT(cI.Provider,{value:o,children:t})}function Cc(){return VT(cI)}var Nt={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]}},Pc=Object.keys(Nt),dI=[2,3,4,6];function uI(e){return typeof e!="string"||e===""?null:Nt[e]??null}function fI(e,t){return t?6/e.acrossPhone:12/e.across}var XT="sf-wall--";function jT(e){return`${XT}${e}`}function uU(e){let t=Nt[e],o=`.${jT(e)}`,r=[],n=(a,l)=>{let s=[],i=a.length;a.forEach(([c,f],u)=>{s.push(`${o} > :nth-child(${i}n+${u+1}){grid-column:span ${c};grid-row:span ${f}}`)});for(let c=1;c<i;c+=1)s.push(`${o}:has(> :nth-child(${i}n+${c}):last-child) > :nth-last-child(-n+${c}){grid-column:span ${l};grid-row:span 1}`);return s};return r.push(`${o}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...n(t.desktop,fI(t,!1))),r.push("@media (max-width:800px){"),r.push(`${o}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...n(t.phone,fI(t,!0))),r.push("}"),r.join("")}var Pl=12,pI=1,JT=3;var ZT=3;function kc(e,t,o){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(o,Math.max(t,Math.trunc(r))):null}function QT(e){return kc(e,1,Pl)??ZT}function xU(e,t){let o=kc(e,pI,JT);return o??(QT(t)===4?2:pI)}function gU(e){return e==null||e===""?null:kc(e,1,Pl)}var IU="data-sf-span";function hU(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(uI(e.props?.layout))return!1;let t=e.props?.columns;return t!=null&&t!==""}return!1}import{AlignLeftIcon as AE,AlignSeparateIcon as LE,AnimationIcon as Nh,BackgroundIcon as OE,CartIcon as NE,ColumnWidthsIcon as Bh,ColumnsIcon as BE,CornerIcon as Dh,DirectionDownIcon as DE,DirectionLeftIcon as ME,DirectionRightIcon as HE,DirectionUpIcon as GE,DollarIcon as WE,FinishIcon as UE,GapIcon as Mh,GridIcon as zE,GroundIcon as KE,HashIcon as Hh,ImageIcon as $E,LayoutIcon as VE,ListIcon as qE,LocationIcon as gf,PaddingBottomIcon as YE,PaddingLeftIcon as XE,PaddingRightIcon as jE,PaddingTopIcon as JE,PageIcon as Gh,PhoneIcon as ZE,PlacementIcon as QE,ProductSizeIcon as e_,RotateIcon as t_,SquareIcon as o_,StylesIcon as r_,TextLinesIcon as n_,WidthIcon as a_,WrapIcon as l_}from"efficient-easel/icons";import{TitleIcon as eR,ButtonIcon as tR,DollarIcon as oR,HashIcon as rR,LinkIcon as nR,NoteIcon as aR,TagIcon as lR,TextLinesIcon as sR}from"efficient-easel/icons";import{Fragment as Bt,jsx as J,jsxs as Dt}from"react/jsx-runtime";var mI={body:sR,button:tR,link:nR,label:lR,number:rR,price:oR,note:aR,title:eR},xI={eyebrow:Dt(Bt,{children:[J("path",{d:"M5 6.5h5"}),J("path",{d:"M5 12.5h14"}),J("path",{d:"M5 18h11"})]}),heading:Dt(Bt,{children:[J("path",{d:"M6.5 5v14"}),J("path",{d:"M17.5 5v14"}),J("path",{d:"M6.5 12h11"})]}),intro:Dt(Bt,{children:[J("path",{d:"M4 5.5v13"}),J("path",{d:"M8 7.5h12"}),J("path",{d:"M8 12h12"}),J("path",{d:"M8 16.5h8"})]}),value:Dt(Bt,{children:[J("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),J("path",{d:"M6.5 12h7"})]}),name:Dt(Bt,{children:[J("path",{d:"M6 3.5v17"}),J("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:Dt(Bt,{children:[J("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),J("path",{d:"M4 10.5h16"}),J("path",{d:"M9 3.2v4.4"}),J("path",{d:"M15 3.2v4.4"})]}),caption:Dt(Bt,{children:[J("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),J("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),J("path",{d:"M6.5 19.5h11"})]}),quote:Dt(Bt,{children:[J("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),J("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Dt(Bt,{children:[J("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),J("path",{d:"M8 9.5h8"}),J("path",{d:"M12 9.5v5"})]}),meta:Dt(Bt,{children:[J("path",{d:"M4 7h16"}),J("path",{d:"M4 14h3.5"}),J("path",{d:"M10.5 14h3"}),J("path",{d:"M17 14h3"})]})};function wc({noun:e,size:t=14,strokeWidth:o=1.8,className:r,style:n}){let a=mI[e];return a?J("span",{className:r,style:{display:"inline-flex",...n},"aria-hidden":"true",children:J(a,{size:t})}):J("svg",{className:r,style:n,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:xI[e]})}var SU=Object.keys(mI);var CU=Object.keys(xI);var iR="#ffffff",cR=/^#[0-9a-fA-F]{6}$/;function vc(e){return fR(e)?e:iR}function fR(e){return typeof e=="string"&&cR.test(e)}function wU(e){return{"--bg":vc(e)}}var dR=["fade","rise","scale"],Tc="none",gI=[{label:"None",value:Tc},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function RU(e){return dR.includes(e)?e:null}var II="data-sf-anim",Rn="data-sf-anim-state";function FU(e){let t=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(II))return t;let o=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<o)return t;e.setAttribute(Rn,"armed");let r=new IntersectionObserver(n=>{for(let a of n)if(a.isIntersecting){r.disconnect(),uR(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(Rn)}}function uR(e){if(!e.getAttribute(II))return;e.removeAttribute(Rn),e.offsetWidth,e.setAttribute(Rn,"play");let t=o=>{o.target===e&&(e.removeAttribute(Rn),e.removeEventListener("animationend",t))};e.addEventListener("animationend",t)}var EU=jd;function Fc(e,t){let o=e?.content;if(!Array.isArray(o))return null;for(let r of o){if(!r||typeof r!="object")continue;let n=r.props;if(n?.id===t)return null;if(Rc(r,t,0))return n??{}}return null}function Rc(e,t,o){if(o>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(n=>Rc(n,t,o+1));let r=e.props;return r&&typeof r=="object"&&r.id===t?!0:Object.values(e).some(n=>Rc(n,t,o+1))}import{SettingsCorners as Wh,SettingsField as be,SettingsGroupHead as s_,SettingsGroupSub as i_,SettingsPlacement as c_,SettingsSegmented as f_,SettingsSwitch as Uh}from"efficient-easel/panel";import{ListField as d_}from"efficient-easel/fields";import{useContext as gR,useEffect as yI,useRef as Rl,useState as Fl}from"react";import{useEffect as hI,useMemo as kl,useRef as pR,useState as Ec}from"react";import{jsx as Mt,jsxs as wl}from"react/jsx-runtime";function mR(e,t){let o=t.trim().toLowerCase(),r=o?e.filter(l=>l.label.toLowerCase().includes(o)):[...e],n=[],a;for(let l of r)l.group&&l.group!==a&&n.push({type:"group",label:l.group,count:r.filter(s=>s.group===l.group).length}),a=l.group,n.push({type:"option",option:l});return n}function vl({label:e,options:t,fallback:o,value:r,onChange:n,placeholder:a,bare:l=!1}){let[s,i]=Ec(!1),[c,f]=Ec(""),[u,d]=Ec(0),p=pR(null),x=r??"",g=kl(()=>t.find(b=>b.value===x)??t.find(b=>b.value===o)??null,[t,x,o]),I=kl(()=>mR(t,c),[t,c]),h=kl(()=>I.filter(b=>b.type==="option").map(b=>b.option),[I]),k=kl(()=>t.some(b=>b.thumb!==void 0),[t]);hI(()=>{if(!s)return;let b=w=>{p.current&&!p.current.contains(w.target)&&(i(!1),f(""))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s]),hI(()=>{d(b=>b>=h.length?0:b)},[h.length]);let S=b=>{n(b.value),i(!1),f("")},C=b=>{b.key==="Escape"?(i(!1),f("")):b.key==="ArrowDown"?(b.preventDefault(),i(!0),d(w=>Math.min(w+1,Math.max(h.length-1,0)))):b.key==="ArrowUp"?(b.preventDefault(),d(w=>Math.max(w-1,0))):b.key==="Enter"&&s&&h[u]&&(b.preventDefault(),S(h[u]))},T=-1;return wl("div",{className:l?"sf-combo":"sf-field sf-combo",ref:p,children:[!l&&Mt("div",{className:"sf-field-label",children:e}),wl("div",{className:"sf-combo-control",children:[Mt("input",{type:"text",className:"sf-combo-input",role:"combobox",...l?{"aria-label":e}:{},"aria-expanded":s,"aria-autocomplete":"list",value:s?c:g?.label??"",placeholder:a??"Search\u2026",onChange:b=>{f(b.target.value),i(!0),d(0)},onFocus:()=>{i(!0),f("")},onClick:()=>i(!0),onKeyDown:C}),Mt("span",{className:"sf-combo-caret","aria-hidden":"true",children:"\u25BE"})]}),s&&Mt("ul",{className:"sf-combo-menu",role:"listbox",children:h.length===0?Mt("li",{className:"sf-combo-empty",children:"No matches"}):I.map(b=>{if(b.type==="group")return wl("li",{className:"sf-combo-group",role:"presentation",children:[b.label,Mt("span",{className:"sf-combo-group-count",children:b.count})]},`group:${b.label}`);let w=b.option,O=++T;return wl("li",{role:"option","aria-selected":w.value===x,className:"sf-combo-option"+(O===u?" is-active":"")+(w.value===x?" is-selected":""),onMouseDown:D=>{D.preventDefault(),S(w)},onMouseEnter:()=>d(O),children:[k&&Mt("span",{className:"sf-combo-thumb","aria-hidden":"true",children:w.thumb?Mt("img",{src:w.thumb,alt:"",loading:"lazy"}):null}),Mt("span",{className:"sf-combo-option-label",children:w.label}),w.meta!==void 0&&Mt("span",{className:"sf-combo-meta",children:w.meta})]},w.value||"__none__")})})]})}var Fn=class extends Error{constructor(o){super("The storefront forms list could not be loaded.");this.cause=o;this.name="FormsUnavailableError"}},Tl=null,_c=null,Ac=null;function xR(){Tl=null,_c=null,Ac=null}function bI(e=!1){let t=lr(),o=Ro();return(e||!Tl||_c===null&&t!==null||Ac!==o)&&(_c=t,Ac=o,Tl=(t?oe.listForms(t,{siteId:o}):Promise.reject(new Fn)).catch(r=>{throw xR(),r instanceof Fn?r:new Fn(r)})),Tl}import{jsx as we,jsxs as Ct}from"react/jsx-runtime";var SI="__create-a-new-form__";function IR({value:e,forms:t,loadFailed:o,emptyLabel:r="No form yet"}){let n=t??[],a=e?n.some(u=>u.slug===e):!0,l=t===null&&!o,s={value:"",label:l?"Loading\u2026":o?"Forms couldn\u2019t be loaded":r},i=e&&!a?[{value:e,label:l||o?e:`${e} \u2014 no form with this name`}]:[],c=n.map(u=>({value:u.slug,label:u.is_active?u.title:`${u.title} (switched off)`})),f=l?[]:[{value:SI,label:"Create a new form\u2026"}];return[s,...i,...c,...f]}function hR(e){return e===SI?{action:"create"}:{action:"store",slug:e}}function bR({value:e,pickedId:t,forms:o}){if(!e||!t||o.some(n=>n.slug===e))return null;let r=o.find(n=>n.id===t);return r&&r.slug&&r.slug!==e?r.slug:null}function yR(e){let t=["Goes to Storefront \u2192 Forms"],o=(e.notify_email??"").trim();return o&&t.push(`Emails a copy to ${o}`),e.mailing_list_name&&t.push(e.subscribe_mode==="checkbox"?`Joins the \u201C${e.mailing_list_name}\u201D audience, but only when the consent box is ticked`:`Joins the \u201C${e.mailing_list_name}\u201D audience`),e.kind==="account_signup"&&t.push(e.signup_customer_type==="importer"?"Creates a wholesale account":"Creates a retail account"),t}function Lc({value:e,onChange:t,label:o="Form",emptyLabel:r}){let n=ao(),a=gR(So),l=a?a.capabilities.hasForms:!0,[s,i]=Fl(null),[c,f]=Fl(!1),[u,d]=Fl(!1),[p,x]=Fl(!1),g=Rl(!0),I=Rl(e);I.current=e;let h=Rl(t);h.current=t;let k=Rl(null),S=(R=!1)=>bI(R).then(_=>{if(g.current){i(_),f(!1);let G=bR({value:I.current,pickedId:k.current,forms:_});G&&h.current(G)}return _},()=>(g.current&&f(!0),[]));yI(()=>(g.current=!0,l&&S(),()=>{g.current=!1}),[l]),yI(()=>l?Il(()=>{S(!0)}):void 0,[l]);let T=e?(s??[]).find(R=>R.slug===e)??null:null;T?k.current=T.id:e||(k.current=null);let b=!!e&&!T&&s!==null&&!c,w=IR({value:e,forms:s,loadFailed:c,emptyLabel:r}),O=async()=>{d(!0),x(!1);try{let R=await Vg(n,{mode:"create"}),_=await S(!0);if(!g.current)return;if(R.status==="timeout"){x(!0);return}if(R.status!=="saved")return;let{form:G}=R;G.slug!==I.current&&h.current(G.slug),_.some(Y=>Y.id===G.id)||S(!0)}finally{g.current&&d(!1)}},D=R=>{let _=hR(R);_.action==="create"?O():(x(!1),t(_.slug))};return l?Ct("div",{className:"sf-formpicker",children:[we(vl,{label:o,options:w,fallback:"",value:e??"",onChange:D,placeholder:"Search forms\u2026"}),p&&we("p",{className:"sf-formsummary-warn",children:"That didn\u2019t come back \u2014 pick the form from the list, or try again."}),T?Ct("div",{className:"sf-blogsource sf-formsummary",children:[Ct("div",{children:[we("div",{className:"sf-formsummary-caption",children:T.fields.length===1?"1 field":`${T.fields.length} fields`}),T.fields.length?we("ol",{className:"sf-formsummary-fields",children:T.fields.map((R,_)=>we("li",{children:R.label},R.key||`${R.label}-${_}`))}):we("p",{className:"sf-blogsource-hint",children:"This form has no fields yet, so there is nothing for a visitor to fill in."})]}),Ct("div",{children:[we("div",{className:"sf-formsummary-caption",children:"Where the answers go"}),we("ul",{className:"sf-formsummary-fields",children:yR(T).map(R=>we("li",{children:R},R))})]}),!T.is_active&&we("p",{className:"sf-formsummary-warn",children:"This form is switched off, so it won\u2019t appear on the published page. Turn it back on in Storefront \u2192 Forms."}),Ct("div",{className:"sf-formsummary-actions",children:[we("button",{type:"button",className:"sf-blogsource-btn",onClick:()=>$g(n,T.id),children:"Edit form \u270E"}),we("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),we("p",{className:"sf-blogsource-hint",children:"The questions, the button text and the thank-you message all come from Storefront \u2192 Forms. Edit them there \u2014 this section updates to match."})]}):Ct("div",{className:"sf-blogsource sf-formsummary",children:[c?Ct("p",{className:"sf-blogsource-hint",children:["This website\u2019s forms couldn\u2019t be loaded, so there is nothing to choose from yet.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]}):b&&Ct("p",{className:"sf-formsummary-warn",children:["This section points at \u201C",e,"\u201D, and this website has no form with that name. Pick one from the list above, or leave it \u2014 nothing has been changed."]}),Ct("div",{className:"sf-formsummary-actions",children:[c&&we("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{S(!0)},children:"Try again"}),we("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),!c&&we("p",{className:"sf-blogsource-hint",children:"Pick a form to show here, or build a new one. Forms are made once in Storefront \u2192 Forms and can be shown on any number of pages."})]})]}):we("div",{className:"sf-formpicker",children:we("div",{className:"sf-blogsource sf-formsummary",children:Ct("div",{children:[we("div",{className:"sf-formsummary-caption",children:o}),Ct("p",{className:"sf-blogsource-hint",children:["Forms aren\u2019t available in this editor, so there is nothing to choose here.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]})]})})})}import{ColourPicker as CR}from"efficient-easel/pick";import{typedHex as SR}from"efficient-easel/pick";function CI(e){let t=new Set,o=[];return Jr(e).themes.forEach((r,n)=>{let a=[[`Theme ${n+1} main color`,r.accent],[`Theme ${n+1} text color`,r.text],[`Theme ${n+1} background`,r.background]];for(let[l,s]of a){let i=s?SR(s):null;!i||t.has(i)||(t.add(i),o.push({name:l,value:i}))}}),o}import{jsx as PI}from"react/jsx-runtime";function Zt({value:e,onChange:t,label:o,id:r,caption:n,ariaLabel:a}){return PI(PR,{value:e,onChange:t,label:a??o,id:r,caption:n})}function PR({value:e,onChange:t,label:o,id:r,caption:n}){let{theme:a}=uo();return PI(CR,{value:e,onChange:t,label:o,id:r,caption:n,theme:CI(a)})}import{useEffect as kR,useState as wR}from"react";import{MarkBar as vR,markSelection as TR,useCaretEdit as RR}from"efficient-easel/copy";import{RevertIcon as FR}from"efficient-easel/icons";import{Fragment as El,jsx as Ue,jsxs as _l}from"react/jsx-runtime";function ER({style:e}){let t=o=>Ue("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o});switch(e){case"bold":return t(Ue("path",{d:"M7 5h6.5a3.5 3.5 0 0 1 0 7H7zm0 7h7.5a3.5 3.5 0 0 1 0 7H7z"}));case"italic":return t(_l(El,{children:[Ue("line",{x1:"10",y1:"5",x2:"19",y2:"5"}),Ue("line",{x1:"5",y1:"19",x2:"14",y2:"19"}),Ue("line",{x1:"14",y1:"5",x2:"10",y2:"19"})]}));case"strike":return t(_l(El,{children:[Ue("path",{d:"M16.5 6.5A4.2 4.2 0 0 0 12.7 4.7C10 4.7 8.4 6 8.4 7.9c0 1.6 1.2 2.5 3.4 3.1"}),Ue("path",{d:"M7.6 17.4A4.4 4.4 0 0 0 11.7 19.3c2.8 0 4.5-1.4 4.5-3.4 0-1-.4-1.8-1.2-2.4"}),Ue("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}));case"highlight":return t(_l(El,{children:[Ue("path",{d:"M14.5 4.5l5 5-8 8H6.5v-5z"}),Ue("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}));case"quiet":return t(_l(El,{children:[Ue("path",{d:"M12 4.5l5.5 7.5L12 19.5 6.5 12z"}),Ue("line",{x1:"9.4",y1:"12",x2:"14.6",y2:"12"})]}));default:return null}}var _R=["bold","italic","strike","highlight"],AR=Object.fromEntries(_R.map(e=>[e,Ue(ER,{style:e},e)])),kI="Clear formatting";function LR(e,t,o){return TR(e,t,o,dx)}function OR(e){let[t,o]=wR(null);return kR(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let n=()=>{let a=e.current;if(!a||r.activeElement!==a)return;let l=a.selectionStart??a.value.length,s=a.selectionEnd??l;o(i=>i&&i.start===l&&i.end===s?i:{start:l,end:s})};return r.addEventListener("selectionchange",n),()=>r.removeEventListener("selectionchange",n)},[e]),[t,o]}function NR({target:e,value:t,onChange:o,disabled:r=!1,label:n="Formatting"}){let a=RR({target:e,onChange:o}),[l,s]=OR(e),i=d=>a(p=>{let x=LR(t,d,p);return s({start:x.selectionStart,end:x.selectionEnd}),x}),c=cx(),f={};if(l)for(let d of c)f[d.style]=ux(t,l.start,l.end,d.style);let u=jt(t);return Ue(vR,{tools:c,onApply:i,pressed:f,disabled:r,glyphs:AR,ariaLabel:n,actions:Ue("button",{type:"button",className:"sf-markup-btn sf-markup-clear",onMouseDown:d=>d.preventDefault(),onClick:()=>o(u),disabled:r||u===t,title:kI,"aria-label":kI,children:Ue(FR,{size:14})})})}var Oc=NR;import{jsx as DR}from"react/jsx-runtime";var BR="data-sf-no-control";function wI(){return DR("span",{[BR]:"",hidden:!0})}var vI="__noControl";function c6(e){return e?.[vI]??null}function Al(e,t){return{...e,[vI]:t}}import{jsx as Uo}from"react/jsx-runtime";function MR(e){return e==="mobile"?"mobile":"desktop"}var HR={desktop:null,tablet:"Tablet uses the desktop settings.",mobile:"Showing the phone settings for this section."},GR="data-sf-device-hidden";function TI(){return Uo("span",{hidden:!0,[GR]:""})}function WR({tier:e,render:t,...o}){let r=hc();return MR(r)===e?Uo(t,{...o}):Uo(TI,{})}var RI="__device";function Nc(e){return e?.[RI]??null}function m6(e){return Nc(e)?.inner??e}function Pt(e,t){let o=t.render,r=n=>Uo(WR,{tier:e,render:o,...n});return{...t,[RI]:{tier:e,inner:t},render:r}}function UR(){let e=HR[hc()];return e?Uo("div",{className:"sf-device-scope",children:e}):Uo(TI,{})}function x6(){return Al({type:"custom",render:()=>Uo(UR,{})},"always")}function En(e){return`${e}Phone`}function Ll(e,t,o){return typeof e=="number"?e:typeof t=="number"?t:o}import{createContext as zR,useContext as KR}from"react";import{Fragment as VR,jsx as Bc}from"react/jsx-runtime";var FI=zR(!1);function C6({children:e}){return Bc(FI.Provider,{value:!0,children:e})}function $R(){return KR(FI)}function EI({name:e,children:t}){return!$R()||!e||hn(e)?Bc(VR,{children:t}):Bc(wI,{})}var Dc="Enter",qR="Escape",YR=/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/,XR=/(px|%)$/i;function jR(e,t,o,r){let n=e.trim().replace(/\s+/g,"").replace(XR,"");if(!YR.test(n))return null;let a=Number(n);if(!Number.isFinite(a))return null;let l=Math.min(o,Math.max(t,a));if(!(r>0))return l;let s=t+Math.round((l-t)/r)*r,i=Math.min(o,Math.max(t,s));return Number(i.toFixed(4))}function Mc(e,t,o,r,n){return e===Dc?{handled:!0,editing:!1,commit:jR(t,o,r,n)}:e===qR?{handled:!0,editing:!1,commit:null}:{handled:!1,editing:!0,commit:null}}import{useRef as AI,useState as QR}from"react";import{ChevronIcon as JR}from"efficient-easel/icons";import{jsx as Ht,jsxs as _I}from"react/jsx-runtime";function Hc({styleKey:e,label:t,icon:o,value:r,sampleStyle:n,open:a,onToggle:l,saved:s=!1,children:i}){return _I("div",{"data-sf-style-row":e,className:`sf-style-row${a?" is-open":""}`,children:[_I("button",{type:"button",className:"sf-style-head","aria-expanded":a,onClick:l,children:[Ht("span",{className:"sf-style-caret","aria-hidden":"true",children:Ht(JR,{size:13})}),o?Ht("span",{className:"es-field-icon",children:o}):null,Ht("span",{className:"sf-style-name",children:t}),r!=null?Ht("span",{className:"sf-style-sample",style:n,title:typeof r=="string"?r:void 0,children:r}):null,Ht("span",{className:`sf-style-slot${s?" is-saved":""}`,children:Ht(ZR,{})})]}),a&&Ht("div",{className:"sf-style-body",children:i})]})}function ZR(){return Ht("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Ht("polyline",{points:"20 6 9 17 4 12"})})}import{Fragment as eF,jsx as Gt,jsxs as Gc}from"react/jsx-runtime";function Wc({label:e,value:t,onChange:o,image:r}){let[n,a]=QR(!1),l=AI(null),s=AI(!1),{x:i,y:c}=bc(t),f=(g,I)=>{let h=l.current?.getBoundingClientRect();if(!h)return;let k=Zg(h,g,I);o(vr(k.x,k.y))},u=g=>{let I=Jg(t,g.key,g.shiftKey);I!==null&&(g.preventDefault(),o(I))},d=g=>{g.currentTarget.setPointerCapture?.(g.pointerId),s.current=!0,f(g.clientX,g.clientY)},p=g=>{s.current&&f(g.clientX,g.clientY)},x=()=>{s.current=!1};return Gt(Hc,{styleKey:"imageFocal",label:e,value:t,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:n,onToggle:()=>a(g=>!g),children:n?Gt("div",{className:"sf-focus","data-sf-focusing":"",children:r?Gc(eF,{children:[Gt("button",{type:"button",className:"sf-focus-canvas","aria-label":`${e}: ${t}. Use the arrow keys to move the point.`,onKeyDown:u,onPointerDown:d,onPointerMove:p,onPointerUp:x,onPointerCancel:x,onLostPointerCapture:x,children:Gc("span",{className:"sf-focus-pane",ref:l,children:[Gt("img",{className:"sf-focus-img",src:r,alt:"",draggable:!1}),Gt("span",{className:"sf-focus-cross sf-focus-cross--h",style:{top:`${c}%`}}),Gt("span",{className:"sf-focus-cross sf-focus-cross--v",style:{left:`${i}%`}}),Gt("span",{className:"sf-focus-marker",style:{left:`${i}%`,top:`${c}%`}})]})}),Gc("div",{className:"sf-focus-bar",children:[Gt("span",{className:"sf-focus-hint",children:"Press the picture, or nudge the point with the arrow keys."}),Gt("button",{type:"button",className:"sf-image-btn",onClick:()=>a(!1),children:"Done"})]})]}):Gt("p",{className:"sf-field-hint",children:"Choose a background image first \u2014 there\u2019s nothing to focus yet."})}):null})}import{SettingsField as NI}from"efficient-easel/panel";import{ImageIcon as BI,PlayIcon as DI}from"efficient-easel/icons";import{ImageBox as tF}from"efficient-easel/pick";import{useContext as oF,useState as MI}from"react";import{FileIntakeAlert as rF,useFileIntake as nF}from"efficient-shell/file-intake";var LI={"PATCH /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PATCH /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/carton-groups/{group_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/pallets/{pallet_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/platform/brand-catalog/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PATCH /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PATCH /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PATCH /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/activity/note-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/activity/notes/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/auth/entities/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/auth/users/{id}/reset-password/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/bank-statements/{id}/import_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bank-statements/{id}/preview_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bug-reports/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/bookmark/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/careers/assessments/{token}/snapshots/":{image:{accept:"image/*",max_bytes:409600,max_files:1,policy:"proctoring_snapshot"}},"POST /api/careers/jobs/{slug}/apply/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/chat/conversations/{id}/thread/":{files:{accept:"*",max_bytes:26214400,max_files:10,policy:"chat_files"}},"POST /api/chat/public/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/warranty-claim-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/dealer-portal/wheel-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/employee-documents/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issue-files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/bulk_update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/actual_packing/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/carton-groups/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/generate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/pallets/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/refresh-tracking/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate_invoice/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/update_loaded/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/platform/brand-catalog/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/assign-owner/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/publish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/resync/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/unpublish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/feedback/reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"}},"POST /api/products/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/brands/{id}/generate-box-pns/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/design-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/products/moulds/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/project-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/proposals/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/proposals/{id}/approve-project/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/weight-logs/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/purchase-invoices/capture/":{file:{accept:"application/pdf,image/jpeg,image/png",hint:"PDF \xB7 JPG \xB7 PNG",max_bytes:15728640,max_files:1,policy:"bill_capture"}},"POST /api/purchase-invoices/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/purchase-orders/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/qc-reports/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/recruitment/candidates/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/analyze-cv/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/hire/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/move-stage/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reinstate/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reject/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/withdraw/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/reimbursements/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/rnd/images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/rnd/{id}/upload_image/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/sales-claims/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/sales/contacts/import-csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/sales/contacts/{id}/avatar/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/shop-portal/return-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/storefront/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/media/ingest/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/sites/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/address/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/duplicate/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/supplier-portal/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/utility/mail/send/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"}},"PUT /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PUT /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PUT /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PUT /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PUT /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/countries/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/currencies/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/part-prices/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}}};function OI(e,t){let o=LI[e][t];return{maxSizeBytes:o.max_bytes,maxFiles:o.max_files,accept:o.accept==="*"||o.accept==="*/*"?void 0:o.accept,acceptHint:o.hint}}import{jsx as kt,jsxs as HI}from"react/jsx-runtime";var aF=OI("POST /api/storefront/media/","file");function Uc({value:e,onChange:t,label:o,accept:r,placeholder:n}){let a=ao(),[l,s]=MI(!1),[i,c]=MI(null),f=r.startsWith("video"),u=oF(So),d=nF({accept:r,maxSizeBytes:aF.maxSizeBytes,acceptHint:f?"videos only":"images only",multiple:!1,disabled:l,onAccept:([x])=>{c(null),s(!0),Gs(a,{accept:r,title:o,file:x}).then(g=>{g&&t(g.url)}).catch(()=>c("Couldn\u2019t open the media picker \u2014 please try again.")).finally(()=>s(!1))}}),p=()=>(d.clearRejections(),c(null),Gs(a,{accept:r,title:o}).then(x=>x?.url??null));return u&&!u.capabilities.mediaEditing?kt(NI,{label:o,icon:f?kt(DI,{}):kt(BI,{}),children:HI("div",{className:"sf-image-slot-inert",children:["Templates don\u2019t store ",f?"videos":"images"," \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."]})}):HI("div",{children:[kt(NI,{label:o,icon:f?kt(DI,{}):kt(BI,{}),children:kt("div",{className:`sf-image-drop${d.dragOver?" is-dragover":""}`,...d.zoneProps,children:kt(tF,{value:e,onChange:t,label:o,kind:f?"video":"image",placeholder:n,openLibrary:l?void 0:p})})}),l&&kt("div",{className:"sf-image-status",role:"status",children:"Opening the picker\u2026"}),i&&kt("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:i}),kt(rF,{rejections:d.rejections,className:"sf-image-status sf-image-status--error"})]})}import{useEffect as lF,useId as sF,useRef as GI,useState as iF}from"react";import{jsx as zo,jsxs as zc}from"react/jsx-runtime";function Kc({label:e,options:t,value:o,onChange:r,emptyLabel:n="None"}){let[a,l]=iF(!1),s=GI(null),i=GI(null),c=sF(),f=Array.isArray(o)?o:[];lF(()=>{if(!a)return;let p=x=>{s.current&&!s.current.contains(x.target)&&l(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[a]);let u=(p,x)=>{let g=t.map(I=>I.value).filter(I=>I===p?x:f.includes(I));r(g)},d=t.filter(p=>f.includes(p.value)).map(p=>p.label).join(", ");return zc("div",{className:"sf-field sf-multi",ref:s,children:[zo("div",{className:"sf-field-label",id:`${c}-label`,children:e}),zc("button",{ref:i,type:"button",className:"sf-multi-btn","aria-expanded":a,"aria-controls":c,"aria-labelledby":`${c}-label ${c}-value`,onClick:()=>l(p=>!p),onKeyDown:p=>{p.key==="Escape"&&a&&(p.preventDefault(),l(!1))},children:[zo("span",{id:`${c}-value`,className:`sf-multi-value${d?"":" is-empty"}`,children:d||n}),zo("span",{className:"sf-multi-caret","aria-hidden":"true",children:"\u25BE"})]}),a&&zo("div",{className:"sf-multi-menu",id:c,role:"group","aria-labelledby":`${c}-label`,onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),l(!1),i.current?.focus())},children:t.map(p=>zc("label",{className:"sf-multi-option",children:[zo("input",{type:"checkbox",checked:f.includes(p.value),onChange:x=>u(p.value,x.target.checked)}),zo("span",{children:p.label}),p.note?zo("span",{className:"sf-note","aria-hidden":"true",children:p.note}):null]},p.value))})]})}import{useCallback as FF,useContext as EF,useEffect as _F,useId as jI,useRef as YI,useState as XI}from"react";import{ThemeIcon as AF}from"efficient-easel/icons";import{SettingsField as LF}from"efficient-easel/panel";import{SettingsField as qc,SettingsGroupSub as xF}from"efficient-easel/panel";import{SettingsField as cF}from"efficient-easel/panel";import{AccentIcon as fF}from"efficient-easel/icons";import{jsx as Ko,jsxs as WI}from"react/jsx-runtime";function $c(e){return lo(e).background}function dF(e){let t=so(e.accent,$c(e));return t===null?null:{ratio:t,grade:rr(t)}}function uF(e){let t=$c(e),o=so(e.accent,t);return o===null?[]:$d(e.accent).filter(r=>{let n=so(r,t);return n!==null&&n>o&&rr(n)==="good"})}var pF={good:"Easy to read","large-only":or["large-only"],hard:or.hard};function Vc({value:e,onChange:t}){let o=dF(e),r=o?.grade,n=o&&o.grade!=="good"?uF(e):[];return Ko(cF,{label:"Main color",icon:Ko(fF,{}),hint:o?pF[o.grade]:void 0,action:Ko(Zt,{value:e.accent,onChange:a=>t({...e,accent:a}),label:"Main color"}),children:n.length>0?Ko("div",{className:"w-full min-w-0",children:WI("div",{className:"sf-readability",children:[Ko("p",{className:"sf-readability-advice",children:mF(r,!0)}),Ko("div",{className:"sf-readability-suggestions",children:n.map(a=>{let l=so(a,$c(e));return WI("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>t({...e,accent:a}),title:`Use ${a.toUpperCase()}`,children:[Ko("span",{className:"sf-readability-chip",style:{background:a},"aria-hidden":!0}),l?`${l.toFixed(1)}:1`:a.toUpperCase()]},a)})})]})}):null})}function mF(e,t){return e?e==="good"?"This color reads clearly on your pages.":t?"This color is hard to read on this theme's page. The buttons below are the same hue, darkened.":"This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light.":"Pick a color to see how it reads."}import{ButtonIcon as gF,GroundIcon as IF,LayoutIcon as hF,SquareIcon as bF,TextSmallIcon as yF,TypeIcon as UI}from"efficient-easel/icons";import{Fragment as wF,jsx as U,jsxs as Po}from"react/jsx-runtime";var _n=e=>`Theme ${e+1}`;function zI({colors:e}){let t=lo(e),o=ps(e)??t.accent;return Po("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[U("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:"label"}),Po("span",{className:"sf-theme-headline",children:["Heading ",U("span",{style:{color:t.accent},children:"accent"})]}),U("span",{className:"sf-theme-body",children:"body text"}),Po("span",{className:"sf-theme-row",children:[U("span",{className:"sf-theme-btn",style:{background:o,color:ms(e,t.accent)},children:"button"}),U("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:"card"})]})]})}var Yc={"Text color":U(UI,{}),"Label color":U(yF,{}),Background:U(IF,{}),"Panels & cards":U(hF,{}),Borders:U(bF,{}),"Button color":U(gF,{}),"Button text color":U(UI,{})};function SF({label:e,colorKey:t,value:o,onChange:r,idPrefix:n="sf-theme-ink"}){let a=`${n}-${t}`;return U(qc,{label:e,icon:Yc[e],htmlFor:a,action:U(Zt,{id:a,label:e,value:o,onChange:l=>r(t,l)})})}function CF({value:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button`,a=/^#[0-9a-fA-F]{6}$/.test(e??""),l=a?e:t;return U(qc,{label:"Button color",icon:Yc["Button color"],htmlFor:n,action:U(Zt,{id:n,label:"Button color",value:l,caption:a?l:"Main",onChange:o})})}function PF({colors:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button-ink`,a=Vd(e),l=ms(e,t),s=ps(e)??t,i=rr(so(l,s)??0);return U(qc,{label:"Button text color",icon:Yc["Button text color"],hint:a&&i!=="good"?`${or[i]} on the button`:void 0,htmlFor:n,action:U(Zt,{id:n,label:"Button text color",value:l,caption:a?l:"Auto",onChange:o})})}var kF=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{group:"Surfaces"},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function Xc({colors:e,onChange:t,idPrefix:o}){let r=lo(e);return U(wF,{children:kF.map(n=>"colour"in n?U(Vc,{value:e,onChange:t},"colour"):"group"in n?U(xF,{title:n.group},n.group):"button"in n?U(CF,{value:e.button,accent:r.accent,onChange:a=>t({...e,button:a}),idPrefix:o},"button"):"buttonInk"in n?U(PF,{colors:e,accent:r.accent,onChange:a=>t({...e,buttonInk:a}),idPrefix:o},"buttonInk"):U(SF,{label:n.label,colorKey:n.key,value:r[n.key],onChange:(a,l)=>t({...e,[a]:l}),idPrefix:o},n.key))})}function KI({index:e,colors:t,selected:o,role:r="radio",open:n,editable:a=!0,onPick:l,onEdit:s,onChangeColors:i}){let c=lo(t),f=_n(e),u=e<us.length&&!t.brandInk?us[e]:null,d=rr(so(c.text,c.background)??0),p=u?JSON.stringify(t)!==JSON.stringify(u):!1,x=n!==void 0;return Po("div",{className:`sf-theme-card${o?" is-selected":""}`,children:[U("button",{type:"button",role:r,"aria-checked":r==="radio"?o:void 0,"aria-selected":r==="option"?o:void 0,"aria-label":f,className:"sf-theme-pick",onClick:l,children:U(zI,{colors:t})}),Po("div",{className:"sf-theme-foot",children:[U("span",{className:"sf-theme-name",children:f}),d!=="good"&&U("span",{className:"sf-theme-warn",children:or[d]}),a&&s&&U("button",{type:"button",className:`sf-theme-edit${n?" is-open":""}`,"aria-expanded":x?n:void 0,"aria-controls":x?`sf-theme-colours-${e}`:void 0,"aria-label":`${n?"Done":"Edit"} ${f}`,onClick:s,children:n?"Done":"Edit"})]}),n&&Po("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[U(Xc,{colors:t,onChange:g=>i?.(g)}),u&&U("button",{type:"button",className:"sf-theme-reset",disabled:!p,onClick:()=>i?.({...u}),children:p?`Reset ${f} to the preset`:"Not changed"})]})]})}function $I({colors:e,name:t,nameId:o,open:r,menuId:n,labelId:a,buttonRef:l,onClick:s,onKeyDown:i,onEdit:c}){return Po("div",{className:"sf-secttheme-btn",children:[U("button",{ref:l,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":n,"aria-labelledby":`${a} ${o}`,onClick:s,onKeyDown:i,children:e?U(zI,{colors:e}):U("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Po("div",{className:"sf-theme-foot",children:[U("span",{id:o,className:"sf-theme-name",children:t}),c&&U("button",{type:"button",className:"sf-theme-edit","aria-label":`Edit ${t}`,onClick:c,children:"Edit"}),U("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:s,children:U("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as jc,useEffect as vF,useRef as Ol}from"react";function VI(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function TF(e,t=oe.updateThemeSettings){let{themeFromDocument:o,token:r,siteId:n,patch:a}=e,l=VI({themeFromDocument:o,token:r});if(l)return l;if(Object.keys(a).length===0)return{status:"skipped",reason:"empty"};try{return await t(a,r,n??void 0),{status:"saved"}}catch(s){return{status:"failed",error:s}}}function qI({themeFromDocument:e,tokenRef:t,siteId:o,onResult:r}){let n=Ol(null),a=Ol({}),l=Ol(r);l.current=r;let s=Ol(null),i=jc(u=>{if(u.status==="skipped"){let d=`skipped:${u.reason}`;if(s.current===d)return;s.current=d}else s.current=null;l.current?.(u)},[]),c=jc(async()=>{n.current&&(clearTimeout(n.current),n.current=null);let u=a.current;a.current={};let d=await TF({themeFromDocument:e,token:t?.current,siteId:o,patch:u});return i(d),d},[e,t,o,i]),f=jc((u,d=!1)=>{let p=VI({themeFromDocument:e,token:t?.current});if(p){i(p);return}a.current={...a.current,...u},n.current&&clearTimeout(n.current),d?c():n.current=setTimeout(()=>{c()},500)},[e,t,c,i]);return vF(()=>()=>{c()},[c]),{persist:f,flush:c}}import{Fragment as HF,jsx as ve,jsxs as $o}from"react/jsx-runtime";var OF="Follow the page",Cz="Follow the slideshow",NF=e=>`Editing ${e} changes it everywhere.`;function BF({colors:e}){if(!e)return ve("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=lo(e);return $o("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[ve("i",{style:{background:t.background}}),ve("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function DF({themes:e,value:t,onPick:o,onEdit:r,menuId:n,followLabel:a}){return $o("div",{className:"sf-multi-menu sf-secttheme-menu",id:n,role:"listbox",children:[a!==void 0&&$o(HF,{children:[$o("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>o(-1),children:[ve(BF,{}),ve("span",{className:"sf-secttheme-name",children:a})]}),ve("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&ve("p",{className:"sf-secttheme-oncard",role:"presentation",children:`${_n(t)} is on this section`}),e.map((l,s)=>s===t?null:ve(KI,{role:"option",index:s,colors:l,selected:!1,onPick:()=>o(s),onEdit:()=>r(s)},s))]})}function MF({index:e,colors:t,onChange:o,onDone:r}){let n=_n(e),a=jI();return $o("div",{className:"sf-secttheme-sheet",children:[$o("div",{className:"sf-secttheme-sheet-head",children:[ve("span",{children:n}),ve("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:"Done"})]}),ve("div",{className:"sf-secttheme-rows",children:ve(Xc,{colors:t,onChange:o,idPrefix:a})}),ve("p",{className:"sf-secttheme-warn",children:NF(n)})]})}function Jc({value:e,onChange:t,followLabel:o}){let{theme:r,setTheme:n}=uo(),a=Jr(r),l=EF(So),s=l?.tokenRef,i=l?.siteId??null,c=!l?.capabilities?.hasSiteTheme,{persist:f,flush:u}=qI({themeFromDocument:c,tokenRef:s,siteId:i}),d=Jr(a),p=d.themes,x=Jd(e),g=x!==null?p[x]:void 0,I=g??(p.length?Kd(d):void 0),[h,k]=XI(!1),[S,C]=XI(null),T=YI(null),b=YI(null),w=jI(),O=FF(()=>{k(!1),C(null)},[]);_F(()=>{if(!h&&S===null)return;let _=G=>{T.current&&!T.current.contains(G.target)&&(u(),O())};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[h,S,O,u]);let D=_=>{t(_),O()},R=_=>{if(S===null)return;let G=p.map((M,v)=>v===S?_:M),Y={...d,themes:G};n(Y),f({selected_preset:Y.selected,theme_presets:Y.themes})};return $o("div",{className:"sf-secttheme",ref:T,children:[ve(LF,{label:"Theme",icon:ve(AF,{}),labelId:`${w}-label`,children:ve($I,{colors:I,onEdit:x!==null?()=>{C(x),k(!1)}:void 0,name:g?_n(x):o??OF,nameId:`${w}-value`,labelId:`${w}-label`,open:h,menuId:w,buttonRef:b,onClick:()=>{C(null),k(_=>!_)},onKeyDown:_=>{_.key==="Escape"&&(h||S!==null)&&(_.preventDefault(),O())}})}),h&&S===null&&ve("div",{onKeyDown:_=>{_.key==="Escape"&&(_.preventDefault(),O(),b.current?.focus())},children:ve(DF,{themes:p,value:x,onPick:D,onEdit:_=>{C(_),k(!1)},menuId:w,followLabel:o})}),S!==null&&p[S]&&ve(MF,{index:S,colors:p[S],onChange:R,onDone:()=>{u(),O(),b.current?.focus()}})]})}import{SettingsField as qF}from"efficient-easel/panel";import{LinkIcon as YF}from"efficient-easel/icons";import{useEffect as sh,useRef as XF,useState as Nl}from"react";var JI=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"custom",label:"Custom URL"}];function ZI(e){return e.offersCommerce&&e.offersService?JI:JI.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}function GF(e){return ya(e)}function An(e){return e===dt?"/":`/${e}`}function QI(e){return`/journal/${e}`}function eh(e){return`/wheels/${e}`}function Zc(e,t){return`${An(e)}#${t}`}function WF(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function th(...e){let t=new Set,o=[];for(let r of e){let n=r;for(let a of n?.content??[]){let l=WF(a?.props?.anchor);if(!l)continue;let s=GF(l);!s||t.has(s)||(t.add(s),o.push({slug:s,name:l}))}}return o}function Fz(){return"/wheels"}function UF(e){return(e.layout?.content??[]).some(o=>o?.type===kr)}function oh(e){return e.filter(UF).map(t=>An(t.slug))}function Qc(e){let t=e.indexOf("#"),o=t===-1?"":e.slice(t),r=t===-1?e:e.slice(0,t),n=r.indexOf("?");return{path:n===-1?r:r.slice(0,n),params:new URLSearchParams(n===-1?"":r.slice(n+1)),hash:o}}function rh(e){return Qc(e).path}function nh(e){return Qc(e).params.get(xr)||null}function ah(e,t){let{path:o,params:r,hash:n}=Qc(e);t?r.set(xr,t):r.delete(xr);let a=r.toString();return`${o}${a?`?${a}`:""}${n}`}function lh(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(e.startsWith("/wheels/"))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}import{SettingsField as zF}from"efficient-easel/panel";import{CategoryIcon as KF}from"efficient-easel/icons";import{Fragment as $F,jsx as _r,jsxs as VF}from"react/jsx-runtime";function ef({value:e,onChange:t}){let o=nh(e),r=o&&!No.some(n=>n===o)?o:null;return _r(zF,{label:"Product type",icon:_r(KF,{}),hint:_r($F,{children:"The same page can sit in the menu more than once, each entry opening it on a different type."}),children:VF("select",{value:o??"",onChange:n=>t(ah(e,n.target.value||null)),"aria-label":"Product type this link opens the listing on",children:[_r("option",{value:"",children:Tm}),No.map(n=>_r("option",{value:n,children:mr[n]},n)),r&&_r("option",{value:r,children:`${r} (unavailable)`})]})})}import{jsx as mt,jsxs as Bl}from"react/jsx-runtime";function ih(e){let t=new Map;return(o="")=>{let r=lr(),n=t.get(o);if(!n||n.token===null&&r!==null){let a=r?e(r,o).catch(()=>[]):Promise.resolve([]);return t.set(o,{promise:a,token:r}),a}return n.promise}}var jF=ih((e,t)=>oe.listPages(e,t||void 0)),JF=ih((e,t)=>oe.listBlogPosts(e,{visibleOnly:!0,siteId:t||void 0}));function tf(e,t){return e&&!t.some(o=>o.value===e)?[{value:e,label:`${e} (unavailable)`},...t]:t}function of({value:e,onChange:t,label:o="Link"}){let r=typeof e=="string"?e:"",{siteId:n,capabilities:a}=Xg(),{offersCommerce:l,offersService:s}=a,i=ZI({offersCommerce:l,offersService:s}),[c,f]=Nl([]),[u,d]=Nl([]),[p,x]=Nl([]),[g,I]=Nl(null),h=XF(!0);sh(()=>(h.current=!0,()=>{h.current=!1}),[]),sh(()=>{let v=!0;return jF(n??void 0).then(j=>v&&h.current&&f(j)),s&&JF(n??void 0).then(j=>v&&h.current&&d(j)),l&&Ao().then(j=>v&&h.current&&x(j)),()=>{v=!1}},[n,l,s]);let k=c.map(v=>An(v.slug)),S=g??lh(r,k),C=i.some(v=>v.value===S)?S:"custom",T=l&&C==="page"&&oh(c).includes(rh(r)),b=v=>{I(v),v!=="custom"&&t("")},w=c.filter(v=>!en(v.slug)),O=tf(r,w.map(v=>({value:An(v.slug),label:tn(v)}))),D=tf(r,u.map(v=>({value:QI(v.slug),label:v.title||v.slug}))),R=tf(r,p.map(v=>({value:eh(v.slug),label:v.name}))),_=(v,j)=>Bl("select",{value:r,onChange:F=>t(F.target.value),children:[mt("option",{value:"",children:j}),v.map((F,E)=>mt("option",{value:F.value,children:F.label},`${F.value}:${E}`))]}),G=w.map(v=>({page:v,anchors:th(v.layout)})).filter(v=>v.anchors.length>0),Y=G.flatMap(v=>v.anchors.map(j=>Zc(v.page.slug,j.slug))),M=Bl("select",{value:r,onChange:v=>t(v.target.value),children:[mt("option",{value:"",children:G.length?"Select a section\u2026":"No section anchors yet"}),r&&!Y.includes(r)&&mt("option",{value:r,children:`${r} (unavailable)`}),G.map(v=>mt("optgroup",{label:tn(v.page),children:v.anchors.map(j=>{let F=Zc(v.page.slug,j.slug);return mt("option",{value:F,children:j.name},F)})},v.page.id))]});return Bl("div",{children:[mt(qF,{label:o,icon:mt(YF,{}),children:Bl("div",{className:"sf-linkstack",children:[mt("select",{"aria-label":"Link type",value:C,onChange:v=>b(v.target.value),children:i.map(v=>mt("option",{value:v.value,children:v.label},v.value))}),C==="page"&&_(O,"Select a page\u2026"),C==="anchor"&&M,C==="blog"&&_(D,"Select a blog post\u2026"),C==="product"&&_(R,"Select a product\u2026"),C==="custom"&&mt("input",{type:"text",value:r,placeholder:"Link (e.g. /wheels or https://\u2026)",onChange:v=>t(v.target.value)})]})}),T&&mt(ef,{value:r,onChange:t})]})}var wt={min:10,max:200,step:10};function ch(e,t){let o=typeof e=="number"?e:void 0,r=typeof t=="number"?t:void 0;if(!(o===void 0&&r===void 0))return{paddingTop:o,paddingBottom:r}}var ZF="sf-pad-top-phone",QF="sf-pad-bottom-phone",eE="--sf-pad-t-phone",tE="--sf-pad-b-phone",oE="sf-pad-left-phone",rE="sf-pad-right-phone",nE="--sf-pad-l-phone",aE="--sf-pad-r-phone";function jz(e,t,o,r,n,a,l,s){let i=ch(e,t)??{},c={},f=["sf-section-pad"];typeof o=="number"&&(f.push(ZF),c[eE]=`${o}px`),typeof r=="number"&&(f.push(QF),c[tE]=`${r}px`);let u={};return typeof n=="number"&&(u.paddingLeft=n),typeof a=="number"&&(u.paddingRight=a),typeof l=="number"&&(f.push(oE),c[nE]=`${l}px`),typeof s=="number"&&(f.push(rE),c[aE]=`${s}px`),f.length===1&&ch(e,t)===void 0&&!Object.keys(u).length?null:{className:f.join(" "),style:{...i,...u,...c}}}var fh=e=>typeof e=="number"?e:void 0;function dh(e,t,o){let r=fh(e)??o,n=fh(t);return r===void 0?n:n===void 0?r:r+n}function Jz(e,t={}){return{top:dh(e.padTop,e.sectionPaddingTop,t.top),bottom:dh(e.padBottom,e.sectionPaddingBottom,t.bottom)}}var lE=["auto","fixed","screen"],sE=["px","%"];var iE="var(--sf-header-h, 88px)",rf={min:40,max:2e3,step:10,fallback:600},nf={min:10,max:200,step:5,fallback:100},cE="sf-section-minh",uh={base:"--sf-section-minh",small:"--sf-section-minh-s"},mh=e=>typeof e=="string"&&lE.includes(e),fE=e=>typeof e=="string"&&sE.includes(e);function Dl(e){let t=mh(e.sectionHeightMode)?e.sectionHeightMode:"auto",o=t==="screen"?"%":fE(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=t==="screen"?nf.fallback:rf.fallback,n=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:t,value:n,unit:o}}function xh(e){let{mode:t,value:o,unit:r}=Dl(e);if(t==="auto")return;if(t==="fixed"&&r==="px")return[`${o}px`,null];let n=o/100,a=l=>t==="screen"?`(100${l} - ${iE})`:`100${l}`;return[`calc(${a("vh")} * ${n})`,`calc(${a("svh")} * ${n})`]}function dE(e){let t=xh(e);if(!t)return;let[o,r]=t;return{display:"grid",[uh.base]:o,...r?{[uh.small]:r}:{}}}var Qz=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Ar="Height",uE="sf-section-minh-phone",ph={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function af(e){return mh(e.sectionHeightModePhone)}function e3(e){return Dl({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function pE(e){let t=dE(e),o=af(e)?xh({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!t&&!o)return null;let r=[cE],n={...t??{}};return o&&(r.push(uE),n[ph.base]=o[0],o[1]&&(n[ph.small]=o[1])),{className:r.join(" "),style:n}}function t3(e){return pE(e)!==null}var r3=["desktop","tablet","mobile"],Lr={desktop:"Desktop",tablet:"Tablet",mobile:"Mobile"},mE=720,xE=1100;function n3(e){return e>=xE?"desktop":e>=mE?"tablet":"mobile"}var gE=["column","row","tabs"],gh="Direction",IE={column:"Stacked",row:"One row",tabs:"Tabs"},Ih={Flex:gE,HeroGroup:["column","row"]},hE={Flex:"row",HeroGroup:"column"},bE={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Ml(e,t){return Ih[e].includes(t)?t:hE[e]}function l3(e,t){return bE[Ml(e,t)]}function hh(e){return Ih[e].map(t=>({label:IE[t],value:t}))}var lf=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Sh=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"}],Ch="Wrap",sf=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],bh={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},yh={start:"items-start",center:"items-center",stretch:"items-stretch"};function i3(e,t){let o=typeof e=="string"&&e in bh?bh[e]:"",r=typeof t=="string"&&t in yh?yh[t]:"";return[o,r].filter(Boolean).join(" ")}function c3(e){return e===!0||e==="wrap"?"flex-wrap":""}var cf="Block widths",Hl=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],Ln="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",yE={equal:Ln,bigLeft:`${Ln} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${Ln} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${Ln} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${Ln} [&>*:last-child]:min-[800px]:grow-[3]`};function f3(e){return typeof e=="string"?yE[e]??"":""}var Ph="Columns on phone",ff=1,kh=3,SE={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function d3(e){let t=Number(e);return SE[t]??"max-[800px]:flex-col"}var wh="Block spacing",df=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],CE="sf-box-gap-only";function u3(e){return e==="gap"?CE:""}var vh=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],Th={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Gl="var(--section-bg)",Wl="inherit";function m3(e,t){return e===Wl?Gl:e===void 0?t:e}function Rh(e,t){return e===Wl?!0:e===void 0&&t===Gl}var Fh="inherit",Ul="fixed",Eh=e=>typeof e!="number"&&e!==Ul,PE="var(--sf-heading-max, 9999px)";function g3(e,t,o,r){if(typeof e=="number")return`${e}px`;if(e===Ul)return t;let n=r?`var(--size-${r}, ${t})`:t;return o==="heading"?`min(${n}, ${PE})`:n}var kE=["contained","page","full"],_h=["full","page"],Ah={full:"Full width",page:"Content width"},uf="inherit",wE=e=>typeof e=="string"&&kE.includes(e),vE=e=>e===uf;function pf(e,t){let o=typeof e.pageWidth=="number"?e.pageWidth:Zn.default;return vE(e.widthMode)?{mode:"full",pageWidth:o,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:o,inherited:!1}:wE(e.widthMode)?{mode:e.widthMode,pageWidth:o,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:o,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:o,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:o,inherited:!1}:{mode:t,pageWidth:o,inherited:t==="full"}}function mf(e){return pf(e,"page").mode==="full"}import{createContext as TE,useContext as RE}from"react";import{jsx as _E}from"react/jsx-runtime";var FE=2,EE=FE+1,Lh=TE(2);function S3({tier:e,children:t}){return _E(Lh.Provider,{value:e,children:t})}function xf(e){let t=RE(Lh);return EE+Math.max(0,e-t)}import{withStyleKind as u_}from"efficient-easel/style-clipboard";import{Fragment as Qt,jsx as m,jsxs as Ce}from"react/jsx-runtime";function On(e){for(let[t,o]of Object.entries(e))o&&typeof o=="object"&&!Dr(o)&&u_(o,`section:${t}`);return e}function zh(){return null}function p_(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return m(zh,{},e)}function m_(e){return e.type===zh}function Kl(e){return m_(e)?void 0:e}function wo({inherited:e,source:t,detail:o,onReset:r,onOptOut:n,optOutTitle:a,label:l}){if(e){let i=o?`Following the ${t.toLowerCase()} setting \u2014 ${o}`:`Following the ${t.toLowerCase()} setting`;if(!n)return Ce("span",{className:"sf-inherit",title:o?i:void 0,children:["Inherits \xB7 ",t]});let c=`${i}. ${a??`Click to keep ${l} at this section's own size instead`}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--following",onClick:n,title:c,"aria-label":c,children:["Inherits \xB7 ",t,m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21F1"})]})}let s=`Reset ${l} to follow the ${t.toLowerCase()} setting${o?` (${o})`:""}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--over",onClick:r,title:s,"aria-label":s,children:["Overridden",m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21BA"})]})}function x_(){let{appState:e}=Nr(n=>n),t=e.data.root?.props??{},{mode:o,pageWidth:r}=pf(t,"full");return o==="page"?`Page width \u2014 ${r}px`:o==="contained"?"Page width \u2014 Contained":"Page width \u2014 Full"}function g_(){let{blockGap:e}=uo();return e===null?"Site block gap \u2014 not set, so this container keeps its own spacing":`Site block gap \u2014 ${e}px`}function I_({inherited:e,onReset:t,label:o}){return m(wo,{inherited:e,source:"Site",detail:g_(),onReset:t,label:o})}function h_({inherited:e,onReset:t,label:o}){return m(wo,{inherited:e,source:"Page",detail:x_(),onReset:t,label:o})}function b_(){return Ce("svg",{className:"sf-field-type",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,"aria-hidden":"true",children:[m("polyline",{points:"4 7 4 4 20 4 20 7"}),m("line",{x1:"9",x2:"15",y1:"20",y2:"20"}),m("line",{x1:"12",x2:"12",y1:"4",y2:"20"})]})}function qo({value:e,onChange:t,label:o,placeholder:r,hint:n,multiline:a,hideable:l=!0,markup:s=!0}){let{text:i,hidden:c}=Jt(e),f=hf(null),u=hf(null),d=g=>t(l?{text:g,hidden:c}:g),p=()=>t({text:i,hidden:!c});return Ce("div",{className:`sf-field${l&&c?" is-hidden":""}`,children:[Ce("div",{className:"sf-field-head",children:[m(b_,{}),m("span",{className:"sf-field-label sf-field-label--inline",children:o}),l&&m("button",{type:"button",className:"sf-field-eye","aria-pressed":c,"aria-label":c?`Show ${o} on the slide`:`Hide ${o} on the slide`,title:c?`Show ${o} on the slide`:`Hide ${o} on the slide`,onClick:p,children:c?m(Zr,{name:"eye-off",size:14}):m(Zr,{name:"eye",size:14})})]}),Ce("div",{className:"sf-copybox",children:[s&&m(Oc,{target:a?u:f,value:i,onChange:d}),a?m("textarea",{ref:u,value:i,placeholder:r,onChange:g=>d(g.target.value)}):m("input",{ref:f,type:"text",value:i,placeholder:r,onChange:g=>d(g.target.value)})]}),n&&m("p",{className:`sf-field-hint${k_(n)?" sf-field-hint--while-typing":""}`,children:n})]})}function _K(e,t){return{...e,[In]:t}}function AK(e){let t=e[_e];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[_e]:{...t,offPage:!0}}}function LK(e){return!e||typeof e!="object"?!1:e[_e]?.offPage===!0}function OK(e){let t=e[_e];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[_e]:{...t,identifier:!0}}}function Kh(e){return!e||typeof e!="object"?!1:e[_e]?.identifier===!0}var y_=new Set(Mo),Br=(e,t)=>{let o={...t,[_e]:e};if(!y_.has(e.control))return o;let r=t.render;return{...Al(o,"authored-copy"),render:n=>m(EI,{name:n.name,children:r(n)})}},NK="Everything else on this block comes from the linked post. Unlink it to edit by hand.",S_="Select a word, then press the highlighter.",C_="A short name so a link can jump straight to this section, like yoursite.com/page#about.",P_=new Set([S_]),k_=e=>P_.has(e);function BK(e,t,o){return Br({control:"text",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(qo,{value:r,onChange:n,label:e,placeholder:t,hint:o})})}function DK(e,t,o){return Br({control:"textarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0})})}function w_(e,t,o){return Br({control:"plainText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1,markup:!1})})}function MK(e,t,o){return Br({control:"copyText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1})})}function HK(e){return{type:"custom",[gn]:{label:e},render:({value:t,onChange:o})=>m(of,{value:br(t),onChange:o,label:e})}}function GK(e,t,o){return Br({control:"plainTextarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0,hideable:!1})})}var WK={Content:n_,Style:r_,Layout:VE,Animation:Nh};function UK(e,t){return e.includes("Content")?t!=="Content":null}function v_({label:e}){return m(s_,{title:e,level:xf(1)})}function T_({level:e,label:t}){return e===1?m(v_,{label:t}):m(R_,{label:t})}var bf="__fold";function Dr(e){return e?.[bf]??null}function $h(e,t){return{type:"custom",[bf]:{label:e,level:t},render:()=>m(T_,{level:t,label:e})}}function ft(e){return $h(e,2)}function zK(e){return{type:"custom",render:()=>m(Vh,{text:e})}}function Vh({text:e}){return m("p",{className:"sf-note",children:e})}function KK(e){return $h(e,1)}function $K(e){return Dr(e)!==null&&e?.tabs!==void 0}var Oh=new Map;function $l(e,t){let o=`${e}\0${t?t.join(""):""}`,r=Oh.get(o)??{type:"custom",tabs:t,[bf]:{label:e,level:1},bucket:e,marker:!0,render:()=>m(Qt,{})};return Oh.set(o,r),r}function R_({label:e}){return m(i_,{title:e,level:xf(2)})}function qh({swatches:e,current:t,onPick:o,names:r}){let n=e.find(l=>l.toLowerCase()===t.toLowerCase()),a=(n?r?.[n]:void 0)??t;return Ce("div",{className:"sf-swatches",children:[e.map(l=>{let s=r?.[l]??l;return m("button",{type:"button","aria-pressed":t.toLowerCase()===l.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===l.toLowerCase()?"is-active":""}`,style:{background:l},onClick:()=>o(l),"aria-label":s,title:s},l)}),m("span",{className:"sf-swatch-hex",children:a})]})}function VK(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=Rh(o,t);return m(be,{label:e,icon:m(OE,{}),action:m(wo,{inherited:n,source:"Theme",detail:"the theme's section background",onReset:()=>r(Wl),label:e}),children:qh({swatches:vh,current:n?Gl:o??t??"",onPick:r,names:Th})})}}}function F_(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=o,a=xp(n,t);return m(be,{label:e,icon:m(KE,{}),action:m(wo,{inherited:a,source:"Theme",detail:"the theme's image stage",onReset:()=>r(sn),label:e}),children:qh({swatches:up,current:a?Ft:Ca(n,t),onPick:r,names:pp})})}}}function Yh(e=o=>o,t){return On({_gSectionTheme:ft(Xd),sectionAccent:{type:"custom",render:({value:o,onChange:r})=>m(Jc,{value:e(o),onChange:r,followLabel:t})}})}function Yo({min:e,max:t,step:o,value:r,onChange:n,suffix:a="",readout:l=!0,notch:s,ariaLabel:i,disabled:c=!1}){let f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return Ce("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:[m("input",{type:"range",min:e,max:t,step:o,value:r,"aria-label":i,disabled:c||void 0,onChange:u=>n(Number(u.target.value))}),l&&m(E_,{value:r,min:e,max:t,step:o,suffix:a,ariaLabel:i,onChange:n})]})}function E_({value:e,min:t,max:o,step:r,onChange:n,suffix:a="",ariaLabel:l,children:s}){let[i,c]=zl(null),f=u=>{u.editing||c(null),u.commit!==null&&u.commit!==e&&n(u.commit)};return i===null?m("button",{type:"button",className:"sf-slider-val",title:"Click to type a value","aria-label":l?`${l}: type a value`:"Type a value",onClick:()=>c(String(e)),children:s??Ce(Qt,{children:[e,a]})}):m("input",{autoFocus:!0,type:"text",inputMode:"decimal",className:"sf-slider-val sf-slider-typed",value:i,"aria-label":l,onChange:u=>c(u.target.value),onFocus:u=>u.currentTarget.select(),onKeyDown:u=>{let d=Mc(u.key,i,t,o,r);d.handled&&(u.preventDefault(),u.stopPropagation(),f(d))},onBlur:()=>f(Mc(Dc,i,t,o,r))})}function Or(e,t,o,r,n,a,l="",s){return{type:"custom",render:i=>m(be,{label:e,icon:Kl(t),action:s?s("storedValue"in i?i.storedValue:i.value,i.onChange):void 0,children:Yo({min:o,max:r,step:n,value:typeof i.value=="number"?i.value:a,suffix:l,onChange:i.onChange})})}}function Xh({min:e,max:t,step:o,px:r,label:n,onChange:a,disabled:l=!1}){let{cornerRadiusPx:s}=uo();return m(Qt,{children:Yo({min:e,max:t,step:o,value:r??(typeof s=="number"?s:e),readout:!1,ariaLabel:n,disabled:l,onChange:a})})}function Nn(e,t){let{min:o,max:r,step:n=1,unsetLabel:a="Not set",hint:l,restAtSite:s=!1,restTrack:i,unsetMark:c}=t;return{type:"custom",render:({value:f,onChange:u})=>{let d=typeof f=="number"?f:null,p=d===null;return m(be,{label:e,value:p?c?"":a:`${d}px`,changed:!p,action:p?c??null:m(Sl,{label:e,what:"change",onClear:()=>u(null)}),hint:l,children:i?i({min:o,max:r,step:n,px:d,label:e,onChange:u}):s?m(Xh,{min:o,max:r,step:n,px:d,label:e,onChange:u}):Yo({min:o,max:r,step:n,value:d??o,readout:!1,ariaLabel:e,onChange:u})})}}}function qK(e){let t=Or("Gap",m(Mh,{}),go.min,go.max,go.step,Pa[e],"px",(o,r)=>m(I_,{inherited:!js(e,o),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[yp]:e,render:o=>t.render({...o,value:Xs(e,o.value,o.field?.siteGap),storedValue:o.value,onChange:r=>o.onChange(r)})}}function __(){return{type:"custom",render:({value:e,onChange:t})=>{let r=pt(e)??[...ct],n=r.length===ct.length;return m(be,{label:Co,icon:m(Dh,{}),value:yl(r),changed:!n,action:n?null:m(Sl,{label:Co,what:"change",onClear:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:m(N_,{value:r,onChange:a=>{let l=pt(a)??[];t(l.length===ct.length?null:l)}})})}}}function A_(){return Nn("Corners",{min:io,max:Eo,unsetLabel:"Inherits \xB7 Site",restTrack:e=>m(L_,{...e}),hint:m(O_,{})})}var jh="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function yf(){return mf(Vl())}function L_(e){return m(Xh,{...e,disabled:yf()})}function O_(){return m(Qt,{children:yf()?jh:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function N_({value:e,onChange:t}){let o=yf();return m(Wh,{label:Co,value:e,corners:o?Er.map(r=>({...r,disabled:!0,title:jh})):Er,onChange:t})}function Jh(){return On({_gShape:ft("Shape"),sectionCorners:A_(),sectionCornerSides:__()})}function Zh(){return{_gMotion:ft("Motion"),sectionAnimation:Pf("Entrance",m(Nh,{}),[...gI],Tc)}}function Sf(){let e=null;try{let{appState:t,selectedItem:o}=Nr(n=>n),r=o?.props?.id?String(o.props.id):void 0;e=r?Fc(t?.data,r):null}catch{e=null}return e!==null&&mf(e)}function Qh(e){let{cornerRadiusPx:t}=uo(),o=Sf(),r=typeof t=="number"?t:e,n=null;try{let{appState:l,selectedItem:s}=Nr(c=>c),i=s?.props?.id?String(s.props.id):void 0;n=i?Fc(l?.data,i):null}catch{n=null}if(o||!n)return r;let a=n.sectionCorners;return yc(a)?a:r}function B_({min:e,max:t,step:o,px:r,label:n,onChange:a}){let l=Qh(e);return m(Qt,{children:Yo({min:e,max:t,step:o,value:r??l,readout:!1,ariaLabel:n,onChange:a})})}function D_({label:e}){let t=Sf(),o=Qh(io);return m(wo,{inherited:!0,source:t?"Site":"Section",detail:`${t?"Site":"Section"} \u2014 ${o}px`,onReset:()=>{},label:e})}function M_(){return m(Qt,{children:Sf()?"The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners.":"Follows the section's Corners until you set a number here."})}function H_(){return Nn("Corners",{min:io,max:Eo,unsetLabel:"Inherits \xB7 Section",unsetMark:m(D_,{label:"Corners"}),restTrack:e=>m(B_,{...e}),hint:m(M_,{})})}function G_({value:e,onChange:t}){return m(Wh,{label:Co,value:e,corners:Er,onChange:t})}function W_({unset:e}){return m(Qt,{children:e?"Set a number above first \u2014 there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function U_(){return{type:"custom",render:({value:e,onChange:t})=>{let r=pt(e)??[...ct],n=r.length===ct.length;return m(be,{label:Co,icon:m(Dh,{}),value:yl(r),changed:!n,action:n?null:m(Sl,{label:Co,what:"change",onClear:()=>t(null)}),hint:m(W_,{unset:!vn(e)}),children:m(G_,{value:r,onChange:a=>{let l=pt(a)??[];t(l.length===ct.length?null:l)}})})}}}function z_(){return{type:"custom",render:()=>m(Sc,{})}}function YK(){return{_gShape:ft("Shape"),cardCorners:H_(),cardCornerSides:U_(),cardCornersApplyAll:z_()}}function XK(){return ko("Justify",m(LE,{}),lf,lf[0].value)}function jK(){return ko("Item alignment",m(AE,{}),Sh,"stretch")}function JK(){return ko(Ch,m(l_,{}),sf,sf[0].value)}function ZK(){return{type:"custom",render:({value:e,onChange:t})=>{let o=Hl.find(r=>r.value===e)??Hl[0];return m(be,{label:cf,icon:m(Bh,{}),value:o.label,children:m("div",{className:"sf-gallery-layouts",role:"group","aria-label":cf,children:Hl.map(r=>m("button",{type:"button","aria-pressed":o.value===r.value,"aria-label":r.label,title:r.label,onClick:()=>t(r.value),children:m("span",{className:"sf-gallery-pic",children:K_(r.weights).map((n,a)=>m("i",{style:{gridColumn:`span ${n}`}},a))})},r.value))})})}}}function K_(e){if(!e)return[3,4];let t=e.reduce((o,r)=>o+r,0);return e.map(o=>Math.round(o/t*12))}function QK(){return ko(wh,m(Mh,{}),df,df[0].value)}function e8(){return Or(Ph,m(ZE,{}),ff,kh,1,ff)}function t8(e){let t=Pf(gh,p_("`Direction` names how a container's children run \u2014 a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),hh(e),Ml(e,void 0));return{type:"custom",render:o=>t.render({...o,value:Ml(e,o.value),onChange:r=>o.onChange(r)})}}function o8(e,t,o,r,n,a){return{type:"custom",render:({value:l,onChange:s})=>m(be,{label:e,icon:m(wc,{noun:a}),action:m(wo,{inherited:Eh(l),source:"Text",detail:"Website settings \u2192 Text",onReset:()=>s(Fh),onOptOut:()=>s(Ul),optOutTitle:`Click to keep ${e} at this section's own built-in size instead`,label:e}),children:Yo({min:t,max:o,step:r,value:typeof l=="number"?l:n,suffix:"px",onChange:s})})}}function r8(){return{_gCellWidth:ft("Cell width"),gridSpan:ko("Positions",m(Bh,{}),[{label:"Auto",value:""},...Array.from({length:Pl},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function Vl(){let e=null;try{e=Nr(t=>t).selectedItem}catch{e=null}return e?.props??{}}function $_({min:e,max:t,step:o,px:r,label:n,onChange:a,desktopKey:l,fallback:s}){let i=Vl()[l],c=Ll(void 0,i,s);return m(Qt,{children:Yo({min:e,max:t,step:o,value:Ll(r,i,s),readout:!1,ariaLabel:n,notch:c,onChange:a})})}function V_({label:e,desktopKey:t,fallback:o}){let r=Vl()[t],n=Ll(void 0,r,o);return m(wo,{inherited:!0,source:Lr.desktop,detail:`${Lr.desktop} \u2014 ${n}px`,onReset:()=>{},label:e})}function q_(e){return Nn(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Inherits \xB7 ${Lr.desktop}`,unsetMark:m(V_,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>m($_,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function eb(e={}){let t=e.keys?.top??"sectionPaddingTop",o=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,n=I=>r?I:`Padding ${I.toLowerCase()}`,a=I=>Or(n("Top"),m(JE,{}),wt.min,wt.max,wt.step,I,"px"),l=(I,h,k,S=wt)=>Pt("mobile",q_({label:n(I),desktopKey:h,min:S.min,max:S.max,step:S.step,fallback:k})),s=e.top??wt.min,i=e.bottom??wt.min,c="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??wt,d=e.side??u.min,p=e.sidePhone??d,x=e.phone===!0,g=I=>x?Pt("desktop",I):I;return On({...r?{_gSpacing:ft("Padding")}:{},[t]:g(a(s)),...x?{[En(t)]:l("Top",t,s)}:{},...e.only==="top"?{}:{[o]:g(Or(n("Bottom"),m(YE,{}),wt.min,wt.max,wt.step,i,"px")),...x?{[En(o)]:l("Bottom",o,i)}:{}},...e.sides?{[c]:g(Or(n("Left"),m(XE,{}),u.min,u.max,u.step,d,"px")),...x?{[En(c)]:l("Left",c,p,u)}:{},[f]:g(Or(n("Right"),m(jE,{}),u.min,u.max,u.step,d,"px")),...x?{[En(f)]:l("Right",f,p,u)}:{}}:{}})}var Y_={contained:"Contained",page:"Page",full:"Full"},If="Width";function tb(e,t=_h,o=!0){let r=t.map(n=>({label:Ah[n]??Y_[n],value:n}));return On({...o?{_gWidth:ft(If)}:{},widthMode:{type:"custom",render:({onChange:n,field:a})=>m(be,{label:"Width",icon:m(a_,{}),action:o?m(h_,{inherited:a?.inherited??!1,onReset:()=>n(uf),label:If}):void 0,children:Cf({options:r,value:a?.currentValue||e,onChange:n,ariaLabel:If})})}})}function ob(){let e=r=>({type:"custom",render:({value:n,onChange:a})=>Ce("div",{className:"sf-field",children:[r?Ce("div",{className:"sf-field-head",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:Ar}),r(a)]}):null,m("div",{children:Cf({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(n)?n:"auto",onChange:a,ariaLabel:Ar})})]})}),t=()=>({type:"custom",render:({value:r,onChange:n,field:a})=>{let l=a?.unit==="%"?"%":"px",s=l==="%"?nf:rf;return m("div",{className:"sf-field",children:Yo({min:s.min,max:s.max,step:s.step,value:typeof r=="number"?r:s.fallback,suffix:l,ariaLabel:Ar,onChange:n})})}}),o=()=>Pf("Unit",m(Hh,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return On({_gHeight:ft(Ar),sectionHeightMode:Pt("desktop",e()),sectionHeightValue:Pt("desktop",t()),sectionHeightUnit:Pt("desktop",o()),sectionHeightModePhone:Pt("mobile",e(r=>m(X_,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:Pt("mobile",t()),sectionHeightUnitPhone:Pt("mobile",o())})}function X_({onClear:e}){let t=Vl(),o=af(t),r=Dl(t),n=`${Lr.desktop} \u2014 ${r.mode==="auto"?"Auto":`${r.value}${r.unit}`}`;return m(wo,{inherited:!o,source:Lr.desktop,detail:n,onReset:e,label:Ar})}function rb(){return{_gAnchor:ft("Anchor"),anchor:w_("Anchor name","e.g. about",C_)}}function n8({value:e,onChange:t,label:o,disabled:r=!1}){return m("button",{type:"button",role:"switch","aria-checked":e,"aria-label":o,disabled:r,className:`sf-toggle ${e?"is-on":""}`,onClick:()=>t(!e),children:m("span",{className:"sf-toggle-knob"})})}function Vo(e,t,o){return{type:"custom",render:({value:r,onChange:n,id:a,name:l})=>{let s=typeof r=="boolean"?r:t,i=`${a??l??e}-label`;return m(be,{label:e,labelId:i,icon:o,action:m(Uh,{checked:s,onChange:n,ariaLabelledBy:i})})}}}function a8(){return{type:"custom",render:({value:e,onChange:t,id:o,name:r})=>{let n=`${String(o??r??"pageBackground")}-colour`;return m(be,{label:"Background",icon:m(Gh,{}),htmlFor:n,action:m(Zt,{id:n,label:"Background",value:vc(e),onChange:t})})}}}function j_({facet:e,fallback:t,value:o,onChange:r,fieldId:n}){let l=Cc()[e],s=typeof o=="boolean"?o:t,i=`${n}-label`;return m(be,{label:l,labelId:i,action:m(Uh,{checked:s,onChange:r,ariaLabelledBy:i})})}function l8(e,t){return{type:"custom",render:({value:o,onChange:r,id:n,name:a})=>m(j_,{facet:e,fallback:t,value:o,onChange:r,fieldId:String(n??a??e)})}}function s8(e,t){return{type:"custom",render:()=>m(J_,{facets:e,rest:t})}}function J_({facets:e,rest:t}){let o=Cc(),r=e.map(a=>o[a]),n=r.length>1?`${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`:r.join("");return m(Vh,{text:`${n} ${t}`})}function i8(e,t){return{type:"custom",render:({value:o,onChange:r})=>Ce("div",{className:"sf-field sf-field--row",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:e}),Zt({value:o||t,onChange:r,label:e})]})}}var Z_=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function nb({label:e,value:t,onChange:o,points:r=Z_}){return m(c_,{label:e,value:t,points:r,onChange:o})}function c8(e,t=jg,o="mediaImage"){return{type:"custom",render:({value:r,onChange:n})=>m("div",{className:"sf-field",children:m(Q_,{label:e,value:r||t,onChange:n,imageProp:o})})}}function Q_({label:e,value:t,onChange:o,imageProp:r}){let{selectedItem:n}=Nr(l=>l),a=n?.props?.[r];return m(Wc,{label:e,value:t,onChange:o,image:typeof a=="string"?a:void 0})}var e0=Ss([]);function f8(e,{stacking:t,fallback:o=ia}){return{type:"custom",render:({value:r,onChange:n})=>{let a=bt.includes(r)?r:o;return t?m(t0,{label:e,value:a,onChange:n}):ab({label:e,value:a,onChange:n,points:e0})}}}function t0({label:e,value:t,onChange:o}){let{appState:r,selectedItem:n}=Nr(s=>s),a=n?.props?.id?String(n.props.id):void 0,l=a?Ps(r?.data,a):[];return ab({label:e,value:t,onChange:o,points:Ss(l,a)})}function ab({label:e,value:t,onChange:o,points:r}){let n=r.find(a=>a.disabled);return m(be,{label:e,icon:m(QE,{}),hint:n?n.title:void 0,children:nb({label:e,value:po(t),onChange:o,points:r})})}var d8={top:m(GE,{}),right:m(HE,{}),bottom:m(DE,{}),left:m(ME,{})};function u8(e,t,o,r,n,a){let l=f=>t.find(u=>u.value===f),s=f=>({value:f,label:"",disabled:!0,title:r}),i=f=>{let u=t.find(p=>p.cell===f);if(!u)return s(`missing-${f}`);let d=a?.[f];return d?{value:u.value,label:u.label,icon:d}:{value:u.value,label:u.label}},c=[s("corner-top-left"),i("top"),s("corner-top-right"),i("left"),s("centre"),i("right"),s("corner-bottom-left"),i("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{let d=t.some(p=>p.value===f)?f:o;return m(be,{label:e,icon:n,value:l(d)?.label??"",children:nb({label:e,value:d,onChange:u,points:c})})}}}function ko(e,t,o,r,n){return{type:"custom",options:o,fallback:r,render:({value:a,onChange:l,field:s})=>{let i=s.options??o,c=s.fallback??r,f=i.some(u=>u.value===a)?a:c;return m(be,{label:e,icon:Kl(t),children:Ce("select",{value:f,onChange:u=>l(u.target.value),children:[n?m("option",{disabled:!0,value:"",children:n}):null,i.map(u=>m("option",{value:u.value,children:u.label},u.value))]})})}}}function p8(e,t,o){return{type:"custom",options:t,render:({value:r,onChange:n,field:a})=>m(Kc,{label:e,options:a.options??t,value:Array.isArray(r)?r:[],onChange:n,...o?{emptyLabel:o}:{}})}}function m8(e,t){return{type:"custom",render:({value:o,onChange:r})=>m(Lc,{value:o,onChange:r,...e?{label:e}:{},...t?{emptyLabel:t}:{}})}}function x8(e,t={}){return{type:"custom",render:({value:o,onChange:r})=>{let n={value:o,onChange:r,...t};return m(e,{...n})}}}function Cf({options:e,value:t,onChange:o,ariaLabel:r,disabled:n=!1}){return m(f_,{options:e.map(a=>({id:a.value,label:a.label,title:a.title})),value:t,onChange:o,ariaLabel:r,disabled:n})}var g8=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Pf(e,t,o,r){let n=o.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:l,field:s})=>m(be,{label:e,icon:Kl(t),children:Cf({options:n,value:n.some(i=>i.value===a)?a:a||s?.currentValue||r,onChange:l,ariaLabel:e})})}}var o0="__media";function I8(e,t,o){return{type:"custom",[o0]:!0,render:({value:r,onChange:n})=>m(Uc,{value:r||"",onChange:n,label:e,accept:t,placeholder:o})}}function h8({value:e,onChange:t,label:o}){let r=e||{},n=!!r.pending,a=n?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",l=(s,i)=>t({...r,[s]:i===""?void 0:Number(i)});return Ce(be,{label:o,icon:m(gf,{}),children:[m("button",{type:"button",disabled:n,onClick:()=>t({...r,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:n?"default":"pointer",opacity:n?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:n?"Finding\u2026":"Find coordinates"}),r.status&&m("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:r.status}),m("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"Coordinates from OpenStreetMap"}),m("button",{type:"button",onClick:()=>t({...r,manual:!r.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:r.manual?"Hide manual coordinates":"Enter coordinates manually"}),r.manual&&Ce("div",{style:{marginTop:8,display:"grid",gap:8},children:[m(be,{label:"Latitude",icon:m(gf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof r.lat=="number"?r.lat:"",onChange:s=>l("lat",s.target.value)})}),m(be,{label:"Longitude",icon:m(gf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof r.lng=="number"?r.lng:"",onChange:s=>l("lng",s.target.value)})})]})]})}function b8({items:e,placeholder:t,onChange:o,markup:r=!1}){let n=hf(null),[a,l]=zl(null),s=u=>u.map(d=>({text:d?.text??""})),i=(u,d)=>o(n0(e,u,d)),c=u=>{let d=a0(a,u);d===null&&(n.current=null),l(d),o(s(e.filter((p,x)=>x!==u)))},f=()=>o([...s(e),{text:""}]);return Ce("div",{className:"sf-textlist",children:[r&&m(Oc,{target:n,value:r0(e,a),onChange:u=>i(a??-1,u),disabled:a===null,label:a===null?"Formatting \u2014 click a row first":`Formatting \u2014 row ${a+1}`}),e.map((u,d)=>Ce("div",{className:`sf-textlist-row${r&&a===d?" is-marking":""}`,children:[m("input",{type:"text",value:u?.text??"",placeholder:t,onChange:p=>i(d,p.target.value),onFocus:p=>{n.current=p.currentTarget,l(d)}}),m("button",{type:"button",className:"sf-textlist-x",onClick:()=>c(d),"aria-label":"Remove item",title:"Remove item",children:"\xD7"})]},d)),m("button",{type:"button",className:"sf-textlist-add",onClick:f,children:"+ Add item"})]})}function r0(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function n0(e,t,o){let r=e.map(n=>({text:n?.text??""}));return t===null||t<0||t>=e.length?r:r.map((n,a)=>a===t?{text:o}:n)}function a0(e,t){return e===null?null:t>e?e:null}var y8={label:"Ticker items",icon:m(qE,{})};function S8(e,t,o,r){return{type:"custom",[_e]:{control:"textList",label:e,placeholder:o,itemKey:"text",rendering:r},render:({value:n,onChange:a})=>m(l0,{label:e,icon:Kl(t),items:Array.isArray(n)?n:[],placeholder:o,onChange:a,markup:r==="markup"})}}function l0({label:e,icon:t,items:o,placeholder:r,onChange:n,markup:a=!1}){let[l,s]=zl(null),i=c=>c.map(f=>({text:f?.text??""}));return m(d_,{label:e,icon:t,noun:"line",items:o,onChange:c=>n(i(c)),newItem:()=>({text:""}),itemName:(c,f)=>`Line ${f+1}`,summary:c=>jt(c?.text??"")||r,open:l,onOpen:s,renderItem:(c,f,u)=>m(qo,{value:c?.text??"",onChange:d=>u({text:typeof d=="string"?d:d?.text??""}),label:`${e} \u2014 line ${f+1}`,placeholder:r,hideable:!1,markup:a})})}function C8(e,t){let o=`${e.label} \u2014 row ${t+1}`;return Br({control:"plainText",label:o,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:n})=>m(qo,{value:r,onChange:n,label:o,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function lb(e){return{_gCards:ft("Cards"),coverIndex:ko("Cover image",m($E,{}),Zp,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:F_("Image background",Et),cardImage:s0(),spinOnHover:Vo("Rotate on hover",e?.spinDefault??!0,m(t_,{}))}}function sb(){return{outline:ko("Card outline",m(o_,{}),ei,Io),indexBadge:ko("Card number",m(Hh,{}),Qs,cr),showBadge:Vo("Product badge",!0,m(wc,{noun:"tag"}))}}function ib(e){let t=e?.bottomDefault??!0;return{_gShowOnCard:ft("Show on a card"),showCardPrice:Vo("Price",!0,m(WE,{})),showCardFinishes:Vo("Finish swatches",!0,m(UE,{})),showCardSizes:Vo("Sizes",t,m(e_,{})),showCardBuy:Vo("Buy button",t,m(NE,{})),showCardPage:Vo("Page button",t,m(Gh,{}))}}function s0(){return Nn("Card image",{min:io,max:Eo,step:gp,hint:"Rounds the picture. The card's own corner is in Site styles."})}function P8(){return Nn(sI,{min:io,max:Eo,step:lI,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function k8(){return{type:"custom",render:({value:e,onChange:t})=>m(i0,{value:typeof e=="string"?e:"",onChange:t})}}function i0({value:e,onChange:t}){let[o,r]=zl(null),n=Pc.filter(l=>o===null||Nt[l].across===o),a=e&&e in Nt?Nt[e]:null;return Ce(Qt,{children:[m(be,{label:"Photos in a row",icon:m(BE,{}),children:Ce("div",{className:"sf-gallery-filter",children:[m("button",{type:"button","aria-pressed":o===null,onClick:()=>r(null),children:"All"}),dI.map(l=>m("button",{type:"button","aria-pressed":o===l,onClick:()=>r(l),children:l},l))]})}),m(be,{label:"Layout",icon:m(zE,{}),value:a?a.label:"Not chosen",hint:`${n.length} of ${Pc.length} layouts`,children:m("div",{className:"sf-gallery-layouts",children:n.map(l=>m("button",{type:"button","aria-pressed":e===l,"aria-label":Nt[l].label,title:Nt[l].label,onClick:()=>t(e===l?"":l),children:m("span",{className:"sf-gallery-pic",children:Nt[l].desktop.map(([s,i],c)=>m("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${i}`}},c))})},l))})})]})}function c0(e,t){let o=br(e.props.name);if(o)return o;let r=br(e.props.altName);if(r)return r;let n=e.props.collection?.name;if(n)return n;let a=e.props.source?.title;if(a)return a;let l=e.props.code;return l?t?.(l)??l:""}function E8(e,t,o){return jt(c0(e,o))||t(e.type)}function _8(e){if(!e)return null;for(let t of["name","altName"])if(Kh(e[t]))return t;return null}function A8(e,t){return br(e.props?.name).trim()||t}var Mr="content",Ae="Flex",f0="Text & media",d0="Layout & structure",u0=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats"},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"}].map(e=>({...e,group:f0})),p0=(sr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:d0})),cb=[...u0,...p0],kf=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:xo}],N8=kf.map(e=>e.type),m0=1,x0=kf.filter(e=>e.type!=="HeroGroup");function g0(e){return e<m0?kf:x0}var I0={Flex:{slot:Mr,choices:()=>cb},Grid:{slot:Mr,choices:()=>cb},HeroGroup:{slot:Mr,choices:g0}};function fb(e,t=0){let o=I0[e];return o?{slot:o.slot,choices:o.choices(t)}:null}var ql="SiteHeader",wf="SiteFooter",db="sections",D8=[ql,wf],M8=e=>e===ql||e===wf,H8=e=>`${e}:${db}`;function G8(e,t,o=[]){return{type:e,props:{id:t,[db]:o}}}var h0=new Set(["Footer",ql,wf]);function W8(e){let t=new Set,o=!1,r=e.filter(n=>{let a=n?.type??"";return a==="Header"?(o=!0,!1):h0.has(a)?t.has(a)?(o=!0,!1):(t.add(a),!0):!0});return o?r:e}function U8(e,t){return e.some(o=>o?.type===t.type)?e:t.type===ql?[t,...e]:[...e,t]}var vf="plain",ub=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],b0="line",y0={KeyFeatures:"filled"};function S0(e){return y0[e]??vf}function $8(e,t){return Xe(ub,S0(t),e)}function V8(e){return Xe(ub,b0,e)}import{createContext as C0,useCallback as pb,useContext as P0,useMemo as k0,useRef as w0}from"react";import{jsx as T0}from"react/jsx-runtime";var v0=Object.fromEntries(Su.map(e=>[e,{value:"",error:null}])),mb=C0({links:Cu,rows:v0,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function j8({children:e,value:t}){let o=w0(()=>{}),r=pb(()=>o.current(),[]),n=pb(l=>{o.current=l},[]),a=k0(()=>({...t,openPanel:r,setOpenHandler:n}),[t,r,n]);return T0(mb.Provider,{value:a,children:e})}var J8=()=>P0(mb);import{createContext as R0,useCallback as F0,useContext as E0,useState as _0}from"react";import{jsx as A0}from"react/jsx-runtime";var xb={enabled:!0,title:"",subtitle:"",greeting:""},gb=R0({chat:xb,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function o$({children:e,chat:t=xb,onChatChange:o}){let[r,n]=_0(!1),a=F0(i=>o?.(i),[o]),{select:l,setSelectHandler:s}=Pu();return A0(gb.Provider,{value:{chat:t,setChat:a,selected:r,setSelected:n,select:l,setSelectHandler:s},children:e})}var r$=()=>E0(gb);import{BlockBannerIcon as L0,BlockBoxIcon as O0,BlockButtonIcon as N0,BlockDividerIcon as Ib,BlockFooterIcon as hb,BlockHeadingIcon as B0,BlockProductIcon as D0,BlockSocialIcon as M0,BlockTextIcon as H0,ChatIcon as G0,GridIcon as W0,ImageIcon as U0,PageIcon as z0}from"efficient-easel/icons";import{Fragment as $,jsx as y,jsxs as q}from"react/jsx-runtime";var K0={header:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M3 9.5h18"})]}),website:q($,{children:[y("circle",{cx:"12",cy:"12",r:"9"}),y("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.5"}),y("circle",{cx:"18",cy:"6",r:"2.5"}),y("circle",{cx:"18",cy:"18",r:"2.5"}),y("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:q($,{children:[y("path",{d:"M4 15.5h6M4 18h4"}),y("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:y("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:q($,{children:[y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),y("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:y("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:q($,{children:[y("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),y("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:q($,{children:[y("circle",{cx:"11",cy:"11",r:"6"}),y("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:yu,CountrySwitchBlock:q($,{children:[y("circle",{cx:"12",cy:"12",r:"8.5"}),y("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),LegalLineBlock:q($,{children:[y("path",{d:"M3 9h18"}),y("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),y("path",{d:"M7 17h7"})]}),Collections:q($,{children:[y("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:q($,{children:[y("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),y("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:q($,{children:[y("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),y("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:q($,{children:[y("path",{d:"M3 7h9M15.5 7H21"}),y("circle",{cx:"13.5",cy:"7",r:"1.7"}),y("path",{d:"M3 12h4M10.5 12H21"}),y("circle",{cx:"8.5",cy:"12",r:"1.7"}),y("path",{d:"M3 17h9M15.5 17H21"}),y("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:q($,{children:[y("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:q($,{children:[y("path",{d:"M3 5h10"}),y("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:q($,{children:[y("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),y("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),y("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:q($,{children:[y("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),y("circle",{cx:"9",cy:"10",r:"1.6"}),y("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),y("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:q($,{children:[y("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),y("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),y("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:q($,{children:[y("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),y("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:q($,{children:[y("path",{d:"M3.5 20h17"}),y("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.6"}),y("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),y("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:q($,{children:[y("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),y("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:q($,{children:[y("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),y("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:q($,{children:[y("path",{d:"M4 8.5h4.5M11 8.5h9"}),y("path",{d:"M4 14.5h16"})]}),HeroGroup:q($,{children:[y("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),y("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M6.5 9h11M6.5 12.5h11"}),y("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:y($,{children:y("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:q($,{children:[y("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),y("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:q($,{children:[y("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),y("path",{d:"M4 13.5h11M4 17.5h7"}),y("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:y("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},$0=y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),V0={footer:hb,Footer:hb,Divider:Ib,FooterDivider:Ib,Banner:L0,Flex:O0,FooterSocial:M0,page:z0,chat:G0,Heading:B0,Text:H0,ImageBlock:U0,ButtonBlock:N0,Grid:W0,ProductRef:D0},q0={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function Y0({type:e,size:t=16,className:o}){let r=q0[e]??e,n=V0[r];return n?y(n,{size:t,className:o}):y("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:o,"aria-hidden":"true",children:K0[r]??$0})}function d$(){return{type:xs,props:{id:_o(xs)}}}function u$(e){let t=[];for(let o of e){let r=t[t.length-1];r&&r.group===o.group?r.items.push(o):t.push({group:o.group,items:[o]})}return t}var bb=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],X0=bb.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),j0="FooterGroup",yb="blocks";function Sb(e){return e===Jn?bb:e===j0?X0:null}function p$(){let e=(t,o)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...o}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterGroup",{direction:"vertical",align:"start",blocks:[e("FooterText",{text:"Join our email list",size:"md",tone:"default"}),e("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}import{createContext as J0,useContext as Z0}from"react";import{jsx as Q0}from"react/jsx-runtime";var Cb=J0(null);function g$({value:e,children:t}){return Q0(Cb.Provider,{value:e,children:t})}function I$(){return Z0(Cb)}function ze(e,t,o,r={}){return{type:e,props:{...t(e),id:o(e),...r}}}var eA={Manifesto:(e,t)=>({type:Ae,props:{...e(Ae),id:t(Ae),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[ze(Ae,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[ze("Eyebrow",e,t,{eyebrowLook:"plain"}),ze("Heading",e,t),ze("Text",e,t),ze("Stats",e,t)]}),ze(Ae,e,t,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,t)=>({type:Ae,props:{...e(Ae),id:t(Ae),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[ze(Ae,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[ze("Eyebrow",e,t,{eyebrowLook:"plain"}),ze("Heading",e,t),ze("Text",e,t),ze("ButtonBlock",e,t)]}),ze(Ae,e,t,{direction:"column",name:"Image",content:[ze("ImageBlock",e,t)]})]}}),Subscribe:(e,t)=>({type:Ae,props:{...e(Ae),id:t(Ae),direction:"column",name:"Subscribe",content:[ze("Heading",e,t),ze("Text",e,t),ze("Form",e,t)]}})};function Pb(e){return eA[e]??null}import{createContext as rA,useContext as nA}from"react";var Tf={tag:{label:"Tag",follows:"Labels",builtIn:"13px",writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:"48px",writable:!0},body:{label:"Body",follows:"Body",builtIn:"14px",writable:!0},price:{label:"Price",follows:"Labels",builtIn:"15px",writable:!0},link:{label:"Link",follows:"Labels",builtIn:"14px",writable:!0}},kb=Tf;var Hr="data-sf-spec-region";function wb(e,t,o){if(!e)return;let r=o[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${t.builtIn})`}}function Rf(e){return`@${e}`}function tA(e,t){if(!t.startsWith("@"))return null;let o=t.slice(1);return o in e?o:null}function vb(e,t){return t&&t in e?t:null}function oA(e,t){let o=t?.closest(`[${Hr}]`)?.getAttribute(Hr);return vb(e,o??null)}import{jsx as vo,jsxs as Ff}from"react/jsx-runtime";function aA(e){return Bd(e)??void 0}var lA=rA({}),Tb=3;function sA({tag:e,name:t,desc:o,href:r,imageSrc:n,imageLabel:a,price:l}){let{showPrice:s,cardStyle:i,partStyles:c,editing:f}=nA(lA),u=i==="bordered"?" border border-line":i==="shadow"?" shadow-[0_8px_30px_rgba(0,0,0,0.12)]":"",d=aA(n),p=g=>f?{[Hr]:g}:{},x=g=>wb(c?.[Rf(g)]?.role,Tf[g],Qo);return Ff(Pe,{href:r||"#",className:`sf-card group relative block w-full min-w-0 overflow-hidden bg-surface-2${u}`,children:[vo("div",{className:"relative z-0 aspect-[4/5] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:scale-[1.04]",children:vo(Ho,{label:a||"collection.jpg",src:d})}),vo("div",{className:"pointer-events-none absolute inset-0 z-[1] [background:rgba(0,0,0,0.4)] group-hover:[background:rgba(0,0,0,0.3)] max-[800px]:hidden",style:{transition:"none"}}),Ff("div",{className:"absolute inset-x-8 bottom-8 z-[2] flex flex-col gap-2.5 text-overlay-fg max-[800px]:relative max-[800px]:inset-auto max-[800px]:p-6 max-[800px]:gap-3 max-[800px]:text-fg",children:[e&&vo("span",{...p("tag"),style:x("tag"),className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.25em] opacity-70",children:re(e)}),t&&vo("h3",{...p("name"),style:x("name"),className:"font-heading2 text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))] font-medium leading-none tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",children:typeof t=="string"?Lt(t,!1):t}),o&&el(o).map((g,I)=>vo("p",{...p("body"),style:x("body"),className:"max-w-[420px] text-[length:var(--size-body,14px)] leading-[1.5] opacity-80",children:re(g)},I)),s&&l&&vo("span",{...p("price"),style:x("price"),className:"font-mono text-[length:var(--size-label,15px)] tracking-[0.05em] text-accent",children:re(l)}),Ff("span",{...p("link"),style:x("link"),className:"mt-2 inline-flex items-center gap-2.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em]",children:["Explore",vo("span",{className:"transition-transform group-hover:translate-x-[3px]","aria-hidden":!0,children:"\u2192"})]})]})]})}import{createContext as cA,useCallback as fA,useContext as dA,useEffect as Eb,useRef as uA,useState as _f}from"react";import{useState as iA}from"react";function Rb(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"auto":return"";default:return"aspect-square"}}function Fb(e){return e==="below"}import{jsx as vt,jsxs as Gr}from"react/jsx-runtime";function Ef({build:e,hiddenMobile:t,alwaysShowOverlay:o,forceHover:r,index:n,total:a,ratio:l,captionPlace:s}){let[i,c]=iA(!1),f=Fb(s),u=Gr("div",{className:["sf-card group relative overflow-hidden bg-surface-2",Rb(l),t?"max-[800px]:hidden":""].join(" "),children:[Gr("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",r?"scale-[1.06] opacity-0 [filter:brightness(0.5)]":"group-hover:scale-[1.06] group-hover:opacity-0 group-hover:[filter:brightness(0.5)]"].join(" "),children:[vt(Ho,{label:e.imageLabel,src:e.imageSrc}),vt("div",{className:"absolute inset-0",style:{background:"rgba(0,0,0,0.35)"}})]}),vt("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",r?"opacity-100 scale-[1.06] [filter:brightness(0.5)]":"opacity-0 group-hover:scale-[1.06] group-hover:opacity-100 group-hover:[filter:brightness(0.5)]"].join(" "),style:{background:"var(--surface)"},children:e.detailSrc&&vt(no,{src:e.detailSrc,alt:"",fill:!0,sizes:"(max-width: 800px) 100vw, (max-width: 1500px) 33vw, 25vw",loading:"lazy",className:"absolute inset-0 z-[3] object-cover",style:{display:i?"none":"block"},onError:()=>c(!0)})}),n!=null&&a!=null&&Gr("span",{className:"pointer-events-none absolute top-3 right-3 z-[3] font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] max-[800px]:top-2.5 max-[800px]:right-2.5",style:{color:"rgba(245,241,232,0.7)"},children:[String(n).padStart(2,"0")," / ",String(a).padStart(2,"0")]}),e.process&&vt("span",{className:["pointer-events-none absolute top-3 left-3 z-[3] inline-block max-w-[60%] truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] text-accent max-[800px]:top-2.5 max-[800px]:left-2.5","transition-opacity duration-300 ease-out",o||r?"opacity-100":"opacity-0 group-hover:opacity-100 max-[800px]:opacity-100"].join(" "),children:et(e.process)}),Gr("div",{className:["absolute inset-0 z-[2] flex flex-col justify-end gap-1 p-6","transition-[opacity,transform] duration-300 ease-out",o||r?"opacity-100 translate-y-0":"opacity-0 translate-y-2 group-hover:opacity-100 group-hover:translate-y-0 max-[800px]:opacity-100 max-[800px]:translate-y-0","max-[800px]:p-3.5"].join(" "),style:{color:"var(--overlay-fg)",background:"linear-gradient(180deg, transparent 40%, rgba(10,10,10,.85) 100%)"},children:[e.car&&vt("div",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-accent max-[800px]:text-[length:var(--size-label,11px)] max-[800px]:tracking-[0.15em]",children:e.car}),e.wheel&&vt("div",{className:"font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium leading-[1.05] tracking-[-0.02em] max-[800px]:text-[length:var(--size-body,16px)]",children:e.wheel}),e.finish&&vt("div",{className:"mt-1.5 flex gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.12em]",style:{color:"rgba(245,241,232,0.7)"},children:vt("span",{children:et(e.finish)})})]})]});return f?Gr("div",{className:t?"max-[800px]:hidden":"",children:[u,Gr("div",{className:"bg-surface px-3.5 pt-3 pb-3.5",children:[e.wheel&&vt("div",{className:"font-display text-[length:var(--size-body,15px)] font-medium leading-[1.25] tracking-[-0.01em] text-fg",children:e.wheel}),(e.finish||e.car)&&vt("div",{className:"mt-0.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] text-fg-dim",children:et(e.finish||e.car)})]})]}):u}import{Fragment as Wr,jsx as pe,jsxs as Ke}from"react/jsx-runtime";var pA=cA({}),mA="data-gallery-grid",Af="data-gallery-tile";function xA(e,t){let[o,r]=_f(null);return Eb(()=>{let n=e.current,a=n?.closest(`[${mA}]`);if(!n||!a)return;let l=()=>{let i=Array.from(a.querySelectorAll(`[${Af}]`)),c=i.indexOf(n),f=c>=0?{index:c+1,total:i.length}:null;r(u=>u?.index===f?.index&&u?.total===f?.total?u:f)};if(l(),!t)return;let s=new MutationObserver(l);return s.observe(a,{childList:!0,subtree:!0}),()=>s.disconnect()},[e,t]),o}var _b=[{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"}];function gA(e,t){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function IA(e){let t=(e.photos??[]).map(a=>a?.src).filter(a=>!!a),o=e.image||t[0]||"",r=[o,...t].filter(a=>!!a),n=gA(e.name,"gallery-item");return{car:e.eyebrow??"",wheel:e.name??"",process:e.process??"",finish:e.meta??"",imageLabel:`${n}.jpg`,detailLabel:`${n}-detail.jpg`,imageSrc:o||void 0,detailSrc:t[0]||o||void 0,photos:r,href:e.href}}function hA({editing:e=!1,previewHover:t,ratio:o,captionPlace:r,...n}){let{galleryHref:a="/gallery",submitHref:l="/contact",previewHover:s}=dA(pA),i=IA(n),c=i.photos??(i.imageSrc?[i.imageSrc]:[]),f=uA(null),u=fA(S=>{f.current=S},[]),d=xA(f,e),p=e&&(!!t||!!s),[x,g]=_f(!1),[I,h]=_f(0);Eb(()=>{if(!x)return;let S=T=>{T.key==="Escape"?g(!1):T.key==="ArrowLeft"&&c.length>1?h(b=>(b-1+c.length)%c.length):T.key==="ArrowRight"&&c.length>1&&h(b=>(b+1)%c.length)};window.addEventListener("keydown",S);let C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",S),document.body.style.overflow=C}},[x,c.length]);let k=pe(Ef,{build:i,forceHover:p,index:d?.index,total:d?.total,ratio:o,captionPlace:r});return Ke(Wr,{children:[e?pe("div",{ref:u,[Af]:"",className:"block w-full text-left",children:k}):pe("button",{ref:u,[Af]:"",type:"button","aria-label":`Open ${i.car||"build"} on ${i.wheel||"wheel"}`,onClick:()=>{h(0),g(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:k}),x&&(()=>{let S=c[I]??i.imageSrc??"",C=()=>h(b=>(b-1+c.length)%c.length),T=()=>h(b=>(b+1)%c.length);return pe("div",{role:"dialog","aria-modal":"true","aria-label":`${i.car} on ${i.wheel}`,onClick:()=>g(!1),className:"fixed inset-0 z-[100] flex items-center justify-center p-6 backdrop-blur-[8px] max-[700px]:p-3",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:Ke("div",{onClick:b=>b.stopPropagation(),className:"relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] grid-cols-[1.4fr_1fr] overflow-hidden border border-line bg-bg max-[1100px]:grid-cols-1 max-[1100px]:overflow-auto",style:{boxShadow:"0 60px 120px -20px rgba(0,0,0,0.7)"},children:[pe("button",{type:"button",onClick:()=>g(!1),"aria-label":"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:"color-mix(in oklab, var(--bg) 70%, transparent)"},children:"\u2715"}),Ke("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-[1100px]:min-h-[450px]",children:[S&&pe("img",{src:S,alt:`${i.car} \u2014 ${I+1} of ${c.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},S),c.length>1&&Ke(Wr,{children:[pe("button",{type:"button","aria-label":"Previous photo",onClick:C,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25C1"}),pe("button",{type:"button","aria-label":"Next photo",onClick:T,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25B7"}),Ke("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[I+1," / ",c.length]})]})]}),Ke("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[i.process&&pe("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:re(i.process)}),i.wheel&&pe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Lt(i.wheel,!1)}),i.car&&Ke("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",pe("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:re(i.car,!0)})]}),Ke("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[i.wheel&&Ke(Wr,{children:[pe("dt",{className:"text-fg-dim",children:"Wheel"}),pe("dd",{className:"text-fg",children:re(i.wheel)})]}),i.process&&Ke(Wr,{children:[pe("dt",{className:"text-fg-dim",children:"Process"}),pe("dd",{className:"text-fg",children:re(i.process)})]}),i.finish&&Ke(Wr,{children:[pe("dt",{className:"text-fg-dim",children:"Finish"}),pe("dd",{className:"text-fg",children:re(i.finish)})]}),i.car&&Ke(Wr,{children:[pe("dt",{className:"text-fg-dim",children:"Vehicle"}),pe("dd",{className:"text-fg",children:re(i.car)})]})]}),Ke("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[Ke(Pe,{href:i.href||"/wheels",onClick:()=>g(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[pe("span",{children:"View product"}),pe("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"\u2192"})]}),Ke(Pe,{href:a,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[pe("span",{children:"See more builds"}),pe("span",{children:"\u2192"})]}),Ke(Pe,{href:l,onClick:()=>g(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[pe("span",{children:"Submit your build"}),pe("span",{children:"\u2192"})]})]})]})]})})})()]})}import{createContext as _A,useContext as AA}from"react";import{useEffect as Lf,useRef as bA,useState as Of}from"react";import{jsx as Bn,jsxs as Ab}from"react/jsx-runtime";var yA=.5;function Nf({videoSrc:e,posterSrc:t,showVideo:o=!0,playbackRate:r=yA,objectPosition:n="50% 50%",quiet:a=!1}){let l=t||"",s=e||"",[i,c]=Of(!1),[f,u]=Of(!1),[d,p]=Of(!1),x=bA(null);Lf(()=>{c(!1),u(!1)},[e,t]),Lf(()=>{if(typeof window>"u")return;let I=()=>{let h=window;h.requestIdleCallback?h.requestIdleCallback(()=>p(!0),{timeout:2e3}):setTimeout(()=>p(!0),800)};if(document.readyState==="complete"){I();return}return window.addEventListener("load",I,{once:!0}),()=>window.removeEventListener("load",I)},[]),Lf(()=>{let I=x.current;if(!I)return;let h=()=>{I.playbackRate=r};return h(),I.addEventListener("loadedmetadata",h),()=>I.removeEventListener("loadedmetadata",h)},[e,r]);let g=Yn(l);return Ab("div",{className:"absolute inset-0 z-[1]",children:[Bn("div",{className:"absolute inset-0",style:{background:"var(--surface)"}}),l&&(g?Bn("img",{src:l,alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l):Bn(sl,{src:l,alt:"",fill:!0,priority:!0,sizes:"100vw",className:"z-[2] object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l)),o&&!a&&s&&d&&!f&&Ab("video",{ref:x,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:n},onError:()=>u(!0),children:[Dd(s)&&Bn("source",{src:s.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Bn("source",{src:s,type:"video/mp4"})]},s)]})}var Lb=["top","middle","bottom"],Ob=["left","center","right"],Nb="bottom",Bb="left",SA={top:"Top",middle:"Middle",bottom:"Bottom"},CA={left:"Left",center:"Center",right:"Right"};var Q$="Up and down",eV="Sideways",PA={top:"flex-start",middle:"center",bottom:"flex-end"},kA={left:"flex-start",center:"center",right:"flex-end"},wA="--sf-hero-phone-y",vA="--sf-hero-phone-x";function TA(e){return Lb.includes(e)?e:Nb}function RA(e){return Ob.includes(e)?e:Bb}function Db(e,t){let o=TA(e),r=RA(t),n={};return o!==Nb&&(n[wA]=PA[o]),r!==Bb&&(n[vA]=kA[r]),n}function tV(){return Lb.map(e=>({label:SA[e],value:e}))}function oV(){return Ob.map(e=>({label:CA[e],value:e}))}var FA="#0A0A0A",EA=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function Mb(e){let t=e.trim().replace(/^#/,""),o=t.length===3?t.split("").map(n=>n+n).join(""):t;if(!/^[0-9a-fA-F]{6}$/.test(o))return null;let r=Number.parseInt(o,16);return`${r>>16&255},${r>>8&255},${r&255}`}function Hb(e){return e==null?!0:e!==!1}function Gb(e){let t=(e?Mb(e):null)??Mb(FA);return`linear-gradient(180deg, ${EA.map(([r,n])=>`rgba(${t},${n}) ${r}%`).join(", ")})`}import{jsx as Dn,jsxs as OA}from"react/jsx-runtime";var Bf=_A({});function LA({name:e,process:t,mediaType:o="video",mediaSrc:r,videoSpeed:n,poster:a,objectPosition:l,tintColor:s="#000000",tintOpacity:i=0,groups:c,editing:f=!1,themeClassName:u,themeStyle:d}){let{alignment:p="left",textureOpacity:x,textureOn:g,textureColor:I,quietVideo:h,phoneUpDown:k,phoneSideways:S}=AA(Bf),C=o==="video",T=C?zt(r):void 0,b=C?zt(a):zt(r)??zt(a),w=typeof n=="number"?n/100:1;return OA("section",{className:u?`relative h-full w-full overflow-hidden ${u}`:"relative h-full w-full overflow-hidden",style:d,"data-slide-name":e??"","data-slide-process":t??"","data-slide-media":T?"video":"still",children:[Dn(Nf,{videoSrc:T,posterSrc:b,showVideo:C,playbackRate:w,objectPosition:l,quiet:h}),i>0&&Dn("div",{className:"absolute inset-0 z-[2]",style:{background:s,opacity:Math.min(Math.max(i,0),100)/100}}),Hb(g)&&Dn("div",{className:"absolute inset-0 z-[2]",style:{background:Gb(I),...x!==void 0?{opacity:x/100}:null}}),Dn("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",f?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{color:"var(--overlay-fg)",...Db(k,S)},children:c&&Dn(c,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var Wb=Array.from({length:3},(e,t)=>({name:`Slide ${t+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{createContext as MA,useContext as HA,useEffect as Yl,useId as GA,useMemo as WA,useState as Te}from"react";var NA=14,BA=3;function Df(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function DA(e,t){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+t),Df(o)}async function Ub(e,t,o={}){let r=o.days??NA,n=o.read??Fo.getAvailability,a=0,l=0;for(let s=0;s<r;s++){if(o.signal?.aborted)return{outcome:"unreadable"};let i=DA(t,s);try{let c=await n(e,i);if(a=0,l++,c.slots.length>0)return{outcome:"found",date:i,availability:c}}catch{if(a++,a>=BA)return{outcome:"unreadable"}}}return l===r?{outcome:"noneInWindow",days:r}:{outcome:"unreadable"}}import{jsx as KA}from"react/jsx-runtime";var zb=MA(null);function Ur(){let e=HA(zb);if(!e)throw new Error("useBookingForm must be used inside <BookingFormProvider>");return e}var Mf=[{id:"example-1",name:"Example service",durationMinutes:45,price:"80.00",description:"What this appointment includes, in a sentence."},{id:"example-2",name:"Second example",durationMinutes:30,price:"0",description:""}];function UA(e){return{timezone:"UTC",slots:[`${e}T09:00:00.000Z`,`${e}T10:30:00.000Z`,`${e}T13:00:00.000Z`].map(t=>({start:t}))}}var Hf={bookingNumber:"EXAMPLE-0000",service:"Example service",startAt:"2026-01-01T00:00:00.000Z",timezone:"UTC",customerTimezone:"",manageToken:"example"};function zA(e,t){return e&&t?.length===0}function hV({editing:e=!1,previewConfirmation:t=!1,children:o}){let r=GA(),n=WA(()=>Df(new Date),[]),[a,l]=Te(),[s,i]=Te(""),[c,f]=Te(""),[u,d]=Te(n),[p,x]=Te(n),[g,I]=Te(!1),[h,k]=Te(null),[S,C]=Te(),[T,b]=Te(""),[w,O]=Te(""),[D,R]=Te(""),[_,G]=Te(""),[Y,M]=Te(""),[v,j]=Te(()=>bs()),[F,E]=Te(null),[se,N]=Te(!1),[le,ge]=Te(!1),[ie,te]=Te(null),[he,de]=Te("");Yl(()=>{de(Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC")},[]),Yl(()=>{let K=!1;return Fo.listServices().then(H=>{K||(l(H.results),i(H.currency),f(He=>He||H.results[0]?.id||""))}).catch(()=>{K||l([])}),()=>{K=!0}},[]),Yl(()=>{if(g||!c)return;let K={aborted:!1};return b(""),C(void 0),te(null),k(null),N(!0),Ub(c,n,{signal:K}).then(H=>{if(!K.aborted){if(H.outcome==="found"){d(H.date),x(H.date),C(H.availability);return}k(H.outcome==="noneInWindow"?`No times are available in the next ${H.days} days.`:"We couldn't load available times. Please try again.")}}).finally(()=>{K.aborted||N(!1)}),()=>{K.aborted=!0}},[g,c,n]),Yl(()=>{if(!g||!c||!u)return;let K=!1;return b(""),C(void 0),te(null),k(null),N(!0),Fo.getAvailability(c,u).then(H=>{K||(C(H),H.slots.length===0&&k("No times are available on this date."))}).catch(()=>{K||k("We couldn't load available times. Please try again.")}).finally(()=>{K||N(!1)}),()=>{K=!0}},[u,g,c]);let z=a?.find(K=>K.id===c),Le=z?.depositAmountDue!=null,Re=!!(!e&&!le&&z&&T&&w.trim()&&D.trim()&&!Le);async function Oe(K){if(K.preventDefault(),!(!Re||!z)){ge(!0),te(null);try{let H=await Fo.create({serviceId:z.id,start:T,customer:{name:w.trim(),email:D.trim(),phone:_.trim()},notes:Y.trim(),idempotencyKey:v,customerTimezone:he});E(H),j(bs())}catch(H){te(H instanceof at&&H.status===409?"That time was just booked. Choose another available time.":"Your appointment wasn't submitted. Please check your details and try again."),H instanceof at&&H.status===409&&(b(""),Fo.getAvailability(z.id,u).then(C).catch(()=>{}))}finally{ge(!1)}}}let ne=zA(e,a);return KA(zb.Provider,{value:{fieldPrefix:r,editing:e,services:ne?Mf:a,currency:ne?"AUD":s,serviceId:ne?Mf[0].id:c,setServiceId:f,service:ne?Mf[0]:z,requiresPayment:ne?!1:Le,date:u,earliestDate:p,setDate:d,setDateTouched:I,availability:ne?UA(u):S,loadingSlots:ne?!1:se,noSlotsMessage:h,selectedStart:ne?`${u}T09:00:00.000Z`:T,setSelectedStart:b,customerTimezone:he,name:w,setName:O,email:D,setEmail:R,phone:_,setPhone:G,notes:Y,setNotes:M,confirmation:F??(t?Hf:null),submitting:le,error:ie,canSubmit:ne?!1:Re,handleSubmit:Oe,sample:!!ne},children:o})}import{Fragment as VA,jsx as Gf,jsxs as qA}from"react/jsx-runtime";var $A="sf-button group inline-flex items-center justify-center gap-2.5 border px-[22px] py-4 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors",Kb={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function Xl(e){let{variant:t="primary",arrow:o,className:r,style:n,children:a,href:l,newTab:s,...i}=e,c=`${$A} ${Kb[t]??Kb.primary} ${r??""}`,f=qA(VA,{children:[a,o!==null&&Gf("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:o??"\u2192"})]});return l?Gf(ll,{href:l,className:c,style:n,...s?{target:"_blank",rel:"noopener noreferrer"}:{},children:f}):Gf("button",{type:"button",className:c,style:n,...i,children:f})}import{jsx as Z,jsxs as De}from"react/jsx-runtime";var Mn="w-full border-2 border-line bg-bg px-4 py-3.5 font-[family-name:var(--bk-value-font,var(--font-display))] text-[length:var(--bk-value-size,17px)] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";function YA(e,t){let o=Number(e);if(o===0)return"Free";try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(o)}catch{return`${t} ${e}`}}function $b(e,t){try{return new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",timeZone:t}).format(new Date(e))}catch{return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}}function Vb(e,t){try{return new Intl.DateTimeFormat(void 0,{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:t,timeZoneName:"short"}).format(new Date(e))}catch{return new Date(e).toLocaleString()}}function Hn({id:e,label:t,required:o,children:r}){return De("div",{className:"flex flex-col gap-2",children:[De("label",{htmlFor:e,className:"font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:[t,o?Z("span",{className:"text-accent",children:" *"}):null]}),r]})}function Wf({number:e,children:t}){return De("div",{className:"mb-4 flex items-center gap-3",children:[Z("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full border border-line font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,11px)] font-semibold text-fg-dim",children:e}),Z("h3",{className:"font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:t})]})}function qb({eyebrow:e,heading:t,intro:o}){return De("div",{className:"mb-10 max-w-[760px]",children:[(e??"").trim()&&Z("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:e}),(t??"").trim()&&Z("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.98] tracking-[-0.025em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:t}),(o??"").trim()&&Z("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:o})]})}function Yb({style:e}={}){let{fieldPrefix:t,services:o,currency:r,serviceId:n,setServiceId:a,requiresPayment:l,date:s,earliestDate:i,setDate:c,setDateTouched:f,availability:u,loadingSlots:d,noSlotsMessage:p,selectedStart:x,setSelectedStart:g,customerTimezone:I}=Ur();return o?De("div",{className:"flex flex-col gap-9",style:e,children:[De("div",{children:[Z(Wf,{number:"01",children:"Choose a service"}),Z("div",{className:"grid gap-3 sm:grid-cols-2",children:o.map(h=>{let k=h.id===n;return De("button",{type:"button","aria-pressed":k,onClick:()=>a(h.id),className:`min-h-11 border p-4 text-left transition-colors ${k?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[Z("span",{className:"block font-[family-name:var(--bk-name-font,var(--font-display))] text-[length:var(--bk-name-size,18px)] font-medium text-fg",children:h.name}),De("span",{className:"mt-1 block font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,11px)] uppercase tracking-[0.14em] text-fg-dim",children:[h.durationMinutes," min \xB7 ",YA(h.price,r)]}),h.description&&Z("span",{className:"mt-3 block font-[family-name:var(--bk-note-font,var(--font-display))] text-[length:var(--bk-note-size,14px)] leading-[1.5] text-fg-dim",children:h.description})]},h.id)})}),l&&Z("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.14em] text-alert",role:"alert",children:"This service requires an upfront payment and cannot be booked through this form yet."})]}),De("div",{children:[Z(Wf,{number:"02",children:"Choose a date and time"}),Z(Hn,{id:`${t}-date`,label:"Date",required:!0,children:Z("input",{id:`${t}-date`,type:"date",min:i,value:s,onChange:h=>{f(!0),c(h.target.value)},className:Mn,required:!0})}),Z("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3 min-[1200px]:grid-cols-4",role:"group","aria-label":"Available appointment times",children:d?Z("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",children:"Loading times\u2026"}):u?.slots.length?u.slots.map(h=>De("button",{type:"button","aria-pressed":x===h.start,onClick:()=>g(h.start),className:`min-h-11 border px-3 py-2 font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,12px)] font-semibold uppercase tracking-[0.12em] transition-colors ${x===h.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[Z("span",{className:"block",children:$b(h.start,I||u.timezone)}),I&&I!==u.timezone&&De("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[$b(h.start,u.timezone)," business"]})]},h.start)):p?Z("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",role:"status",children:p}):null}),u?.timezone&&De("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,10px)] uppercase tracking-[0.16em] text-fg-dim",children:["Times shown in ",I||u.timezone,I&&I!==u.timezone?` \xB7 business timezone ${u.timezone}`:""]})]})]}):null}function Xb({buttonLabel:e,style:t}){let{fieldPrefix:o,editing:r,name:n,setName:a,email:l,setEmail:s,phone:i,setPhone:c,notes:f,setNotes:u,submitting:d,error:p,canSubmit:x}=Ur();return De("div",{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-7",style:t,children:[Z(Wf,{number:"03",children:"Your details"}),De("div",{className:"flex flex-col gap-4",children:[Z(Hn,{id:`${o}-name`,label:"Name",required:!0,children:Z("input",{id:`${o}-name`,type:"text",autoComplete:"name",value:n,onChange:g=>a(g.target.value),className:Mn,required:!0})}),Z(Hn,{id:`${o}-email`,label:"Email",required:!0,children:Z("input",{id:`${o}-email`,type:"email",inputMode:"email",autoComplete:"email",value:l,onChange:g=>s(g.target.value),className:Mn,required:!0})}),Z(Hn,{id:`${o}-phone`,label:"Phone",children:Z("input",{id:`${o}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:i,onChange:g=>c(g.target.value),className:Mn})}),Z(Hn,{id:`${o}-notes`,label:"What would you like to cover?",children:Z("textarea",{id:`${o}-notes`,rows:4,value:f,onChange:g=>u(g.target.value),className:`${Mn} resize-y`})})]}),p&&Z("p",{className:"mt-4 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.16em] text-alert",role:"alert",children:p}),Z(Xl,{type:r?"button":"submit",disabled:!x,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:d?"Submitting\u2026":(e??"").trim()||"Book appointment"})]})}function jb({successMessage:e}){let{confirmation:t,customerTimezone:o}=Ur();return t?De("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-9",role:"status",children:[De("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received \xB7 ",t.bookingNumber]}),Z("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),Z("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:Vb(t.startAt,t.customerTimezone||o||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&De("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",Vb(t.startAt,t.timezone)]}),(e??"").trim()&&Z("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:e}),Z(Xl,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==Hf,variant:"ghost",className:"mt-7",children:"Manage booking"})]}):null}var XA=["step","name","value","note"],EV={step:"Step",name:"Name",value:"Value",note:"Note"},jA={step:"styleStep",name:"styleName",value:"styleValue",note:"styleNote"},Jb={step:{font:"--bk-step-font",size:"--bk-step-size"},name:{font:"--bk-name-font",size:"--bk-name-size"},value:{font:"--bk-value-font",size:"--bk-value-size"},note:{font:"--bk-note-font",size:"--bk-note-size"}};function JA(e){return typeof e=="string"&&Kt.includes(e)?e:null}var ZA={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function Zb(e,t){let o={};for(let r of XA){let n=JA(e[jA[r]]);if(!n)continue;let a=bo({role:n},ZA,t);a.fontFamily&&(o[Jb[r].font]=a.fontFamily),a.fontSize&&(o[Jb[r].size]=a.fontSize)}return o}import{jsx as zr}from"react/jsx-runtime";var Qb=["head","booking","details","confirm"],ey={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function QA({region:e,eyebrow:t,heading:o,intro:r,buttonLabel:n,successMessage:a,...l}){let{confirmation:s,services:i}=Ur(),c=Zb(l);return e==="head"?zr("div",{className:"min-[960px]:col-span-2",style:c,children:zr(qb,{eyebrow:t,heading:o,intro:r})}):e==="confirm"?s?zr("div",{className:"min-[960px]:col-span-2",style:c,children:zr(jb,{successMessage:a})}):null:s||!i||i.length===0?null:e==="booking"?zr(Yb,{style:c}):e==="details"?zr(Xb,{buttonLabel:n,style:c}):null}import{useEffect as ty,useState as Xo}from"react";import{jsx as Kr,jsxs as tL}from"react/jsx-runtime";function oy(e,t){let[o,r]=Xo(void 0),[n,a]=Xo(0);return ty(()=>{if(t!==void 0)return;if(!e){r(null);return}let l=!1;return Tt.getForm(e).then(s=>{l||r(s)}).catch(()=>{l||r(null)}),()=>{l=!0}},[t,e,n]),ty(()=>{if(t===void 0)return Il(()=>a(l=>l+1))},[t]),t!==void 0?t:o}var eL="Something went wrong \u2014 your submission wasn't sent. Please try again.";function ry(e,t="Thanks \u2014 we've received your submission."){return e.successMessage?.trim()||t}function ny({form:e,formSlug:t,editing:o=!1}){let[r,n]=Xo({}),[a,l]=Xo(""),[s,i]=Xo(!1),[c,f]=Xo(!1),[u,d]=Xo(null);async function p(x){if(x.preventDefault(),!(o||s||!e||!t)){i(!0),d(null);try{let g=e.fields.map(I=>({fieldKey:I.key,value:r[I.key]??""}));await Tt.submitForm(t,{answers:g,...a?{company:a}:{}}),f(!0)}catch{d(eL)}finally{i(!1)}}}return{valueOf:x=>r[x]??"",set:(x,g)=>n(I=>({...I,[x]:g})),honeypot:a,setHoneypot:l,submitting:s,done:c,error:u,handleSubmit:p}}function ay({value:e,onChange:t}){return Kr("input",{type:"text",name:"company",tabIndex:-1,autoComplete:"off","aria-hidden":"true",className:"hidden",value:e,onChange:o=>t(o.target.value)})}function Uf({field:e,value:t,onChange:o,className:r,rows:n=5,placeholder:a}){let l=a??e.placeholder;return e.type==="textarea"?Kr("textarea",{required:e.required,rows:n,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r}):e.type==="select"?tL("select",{required:e.required,value:t,onChange:s=>o(s.target.value),className:r,children:[Kr("option",{value:"",children:l||"Select\u2026"}),e.options.map(s=>Kr("option",{value:s,children:s},s))]}):e.type==="checkbox"?Kr("input",{type:"checkbox",required:e.required,checked:t==="true",onChange:s=>o(s.target.checked?"true":""),className:r}):Kr("input",{type:e.type==="email"?"email":e.type==="tel"?"tel":"text",required:e.required,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r})}var zf="solid",oL=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function ly(e){return Xe(oL,zf,e)}var Kf="sf-secnum-outline",sy="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",iy=`@supports (-webkit-text-stroke: 1px currentColor){.${Kf}{color:var(--surface-2);-webkit-text-stroke:1px var(--line)}}`;import{jsx as rL}from"react/jsx-runtime";function $f(){return rL("span",{className:"block h-px w-[30px] bg-current"})}import{jsx as Vf,jsxs as sL}from"react/jsx-runtime";function nL(e,t){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var aL="inline-block w-fit bg-accent px-3.5 py-1.5 font-mono text-[length:var(--size-label,12px)] font-semibold uppercase tracking-[0.16em] text-bg",lL="flex items-center gap-3.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] opacity-80 max-[800px]:text-[length:var(--size-label,12px)] max-[800px]:tracking-[0.25em]";function eo({text:e,look:t="plain",size:o=13,scaled:r=!0,className:n="",classNameAfter:a=""}){if(t==="line")return sL("div",{className:[n,lL,a].filter(Boolean).join(" "),children:[Vf($f,{}),Vf("span",{children:re(e)})]});let l=t==="filled"?aL:nL(o,r);return Vf("span",{className:[n,l,a].filter(Boolean).join(" "),children:re(e)})}import{Fragment as iL,jsx as fe,jsxs as xt}from"react/jsx-runtime";var Gn=(e,t=!1)=>typeof e=="string"?Lt(e,t):e,$r=(e,t=!1)=>typeof e=="string"?re(e,t):e;function qf({num:e,title:t,link:o,logo:r,description:n,accent:a,accentNum:l,numStyle:s=zf,look:i="standard",titleAccent:c,accentTracking:f="-0.02em",spaceBelow:u,rowGap:d,descriptionSize:p,className:x="",eyebrowLook:g=vf}){let I=u??(i==="editorial"?"mb-[60px]":"");if(i==="editorial"){let b=!!t||!!c;return xt("header",{className:`${I} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-3.5 ${x}`.trim(),children:[e&&(typeof e=="string"?fe(eo,{text:e,className:"pb-2"}):fe("span",{className:"pb-2",children:e})),b&&xt("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[t,c&&xt(iL,{children:[" ",fe("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:f},children:c})]})]}),n&&fe("p",{className:"max-w-[360px] pb-1 text-right font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left",children:n})]})}if(i==="simple"){let b=`${I} ${x}`.trim();return xt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(eo,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:Gn(t)})]})}if(i==="statement"){let b=`${I} ${x}`.trim();return xt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(eo,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:Gn(t,!0)})]})}if(i==="natural"){let b=`flex max-w-[680px] flex-col ${d??"gap-5"} ${I} ${x}`.replace(/\s+/g," ").trim();return xt("div",{className:b,children:[e&&(typeof e=="string"?fe(eo,{text:e,look:g}):fe("span",{children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:Gn(t)}),n&&fe("p",{className:`${p??"text-[length:var(--size-body,16px)]"} leading-[1.6] opacity-85`,children:n})]})}if(i==="essay"){let b=`${I} ${x}`.trim();return xt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(eo,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg max-[800px]:text-[length:var(--size-headingSmall,28px)]",children:Gn(t)})]})}let h=!!n||!!o,k=!!t,S=ly(s)==="outlined",C="font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em]",T=null;if(e)if(S)T=fe("span",{className:`${sy} text-fg-dim ${Kf}`,children:$r(e)});else if(l&&!a&&typeof e=="string"){let b=e.indexOf("/"),w=b===-1?e:e.slice(0,b),O=b===-1?"":e.slice(b);T=xt("span",{className:C,children:[fe("span",{className:"text-accent",children:$r(w)}),O&&fe("span",{className:"text-fg-dim",children:$r(O)})]})}else T=fe("span",{className:`${C} ${a?"text-accent":"text-fg-dim"}`,children:$r(e)});return xt("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-[800px]:mb-9 max-[800px]:grid-cols-1 max-[800px]:gap-3 max-[800px]:pb-5",children:[S&&e&&fe("style",{children:iy}),xt("div",{className:"flex flex-col items-start gap-3",children:[r?.src&&fe("img",{src:Od(r.src),alt:r.alt,className:"h-8 w-auto object-contain"}),T]}),k&&fe("h2",{className:a?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":"font-heading2 text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))] max-[800px]:leading-[1]",children:Gn(t)}),h&&xt("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[n&&fe("p",{className:"max-w-[340px] font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left",children:$r(n)}),o&&xt(ll,{href:o.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[$r(o.text),fe("span",{"aria-hidden":!0,children:"\u2192"})]})]})]})}import{jsx as gt,jsxs as Wn}from"react/jsx-runtime";function cL(e){return e.type==="textarea"||e.type==="select"||e.type==="checkbox"}function sq({eyebrow:e,title:t}){return Wn("div",{className:"flex flex-col gap-4",children:[e&>(eo,{text:e,scaled:!1}),t&>("h2",{className:"font-display text-[min(clamp(40px,5vw,72px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:Lt(t,!0)})]})}function cy({body:e,buttonLabel:t,consent:o,form:r,submission:n,showForm:a,resolving:l,editing:s}){return Wn("div",{className:"flex flex-col gap-7",children:[e&&el(e).map((i,c)=>gt("p",{className:"max-w-[480px] font-display text-[16px] leading-[1.6] text-fg-dim",children:re(i)},c)),a&&(r?n.done?gt("p",{role:"status",className:"max-w-[480px] font-[family-name:var(--sb-thanks-font,var(--font-serif))] text-[length:var(--sb-thanks-size,17px)] italic leading-[1.6] text-fg-dim",children:ry(r)}):Wn("form",{className:"grid grid-cols-2 gap-2",onSubmit:n.handleSubmit,children:[r.fields.map(i=>{let c=["border border-line bg-transparent px-4 py-3.5 font-[family-name:var(--sb-field-font,var(--font-mono))] text-[length:var(--sb-field-size,14px)] tracking-[0.1em] text-fg outline-none focus:border-accent",cL(i)?"col-span-2":""].join(" ");return i.type==="checkbox"?Wn("label",{className:"col-span-2 flex items-start gap-3 font-[family-name:var(--sb-tick-font,var(--font-mono))] text-[length:var(--sb-tick-size,12px)] uppercase tracking-[0.18em] text-fg-dim",children:[gt(Uf,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),className:"mt-0.5 size-4 accent-accent"}),Wn("span",{children:[i.label,i.required?gt("span",{className:"text-accent",children:" *"}):null]})]},i.key):gt(Uf,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),rows:4,placeholder:i.placeholder||i.label,className:i.type==="textarea"?`${c} resize-y`:c},i.key)}),gt(ay,{value:n.honeypot,onChange:n.setHoneypot}),n.error&>("p",{role:"alert",className:"col-span-2 font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:n.error}),t&>("button",{type:s?"button":"submit",disabled:n.submitting,className:"col-span-2 cursor-pointer bg-btn px-6 py-4 font-mono text-[14px] uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg hover:text-bg disabled:cursor-wait disabled:opacity-60",children:n.submitting?"Sending\u2026":re(t)})]}):gt("p",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:l?"Loading form\u2026":"Choose a form in the inspector, under Form \u2014 until then this form is hidden on the live page and nothing can be submitted."})),a&&o&>("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim/70",children:re(o)})]})}var fL=["field","tick","thanks"],uq={field:"Form rows",tick:"Tick label",thanks:"Thank-you message"},dL={field:"styleField",tick:"styleTick",thanks:"styleThanks"},fy={field:{font:"--sb-field-font",size:"--sb-field-size"},tick:{font:"--sb-tick-font",size:"--sb-tick-size"},thanks:{font:"--sb-thanks-font",size:"--sb-thanks-size"}};function uL(e){return typeof e=="string"&&Kt.includes(e)?e:null}var pL={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function dy(e,t){let o={};for(let r of fL){let n=uL(e[dL[r]]);if(!n)continue;let a=bo({role:n},pL,t);a.fontFamily&&(o[fy[r].font]=a.fontFamily),a.fontSize&&(o[fy[r].size]=a.fontSize)}return o}import{jsx as jl}from"react/jsx-runtime";var uy=["head","form"],py={head:"Head",form:"Form"};function mL({region:e,eyebrow:t,title:o,body:r,buttonText:n,consent:a,formSlug:l,form:s,editing:i=!1,...c}){let f=oy(l,s),u=ny({form:f,formSlug:l,editing:i}),d=dy(c);return e==="head"?jl("div",{style:d,children:jl(qf,{look:"statement",num:t,title:o})}):jl("div",{style:d,children:jl(cy,{body:r??"",buttonLabel:n??"",consent:a??"",form:f,submission:u,showForm:!!f||i,resolving:f===void 0,editing:i})})}var xL="ImageBlock",gL=3,Jl=(e,t,o={})=>({type:e,props:{...t?.(e)??{},id:_o(e),...o}}),IL=e=>({...e?.(Ae)??{},direction:"column",[Mr]:[Jl(xL,e),Jl(Ae,e,{direction:"column",[Mr]:[Jl("Heading",e),Jl("Text",e)]})]}),Un={AppointmentBooking:{slot:"boxes",childType:"BookingBox",addLabel:"Add box",fixed:!0,seeds:()=>Qb.map(e=>({region:e,name:ey[e]})),addBlocked:()=>"A Booking Form is these three boxes. They cannot be added to or removed.",skipSeed:e=>e.layout!=="boxes"},SubmitBuild:{slot:"boxes",childType:"SubmitBox",addLabel:"Add box",fixed:!0,seeds:()=>uy.map(e=>({region:e,name:py[e]})),addBlocked:()=>"A Submit-a-build section is these two boxes. They cannot be added to or removed.",skipSeed:e=>e.layout!=="boxes"},Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>Wb.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:Cs},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:Cs},Collections:{slot:"cards",childType:"CollectionCard",addLabel:"Add card",seeds:()=>Array.from({length:Tb},()=>({collection:null}))},ProductGrid:{slot:"products",childType:"ProductRef",addLabel:"Add product",seeds:()=>[{code:""},{code:""},{code:""}],legacy:e=>Array.isArray(e.design_codes)?e.design_codes.map(t=>t?.code).filter(t=>!!t).map(t=>({code:t})):[]},GalleryB:{slot:"items",childType:"GalleryItem",addLabel:"Add image",seeds:()=>_b.map(e=>({...e})),legacy:e=>Array.isArray(e.cards)?e.cards.map(t=>({...t})):[]},ProcessSteps:{slot:"boxes",childType:Ae,addLabel:`Add ${xo.toLowerCase()}`,seeds:e=>Array.from({length:gL},()=>IL(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function Fq(e,t){let o=Un[e];return o?{slot:o.slot,children:o.seeds(t).map(r=>({type:o.childType,props:{id:_o(o.childType),...r}}))}:null}var jo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Yf(e){return jo(e)&&typeof e.type=="string"&&e.type!==""&&jo(e.props)}function my(e,t,o){if(Array.isArray(e))for(let r of e)Yf(r)?Xf(r,t,o):jo(r)&&typeof r.type=="string"&&r.type!==""&&t.add(r.type)}function Zl(e,t,o){if(Array.isArray(e)){if(o.has(e))return;o.add(e);for(let r of e)Yf(r)?Xf(r,t,o):Zl(r,t,o);return}if(!(!jo(e)||o.has(e))){o.add(e);for(let r of Object.values(e))Zl(r,t,o)}}function Xf(e,t,o){if(!o.has(e)){o.add(e),t.add(e.type);for(let r of Object.values(e.props))Zl(r,t,o)}}function jf(e){let t=new Set,o=new Set;if(Yf(e))Xf(e,t,o);else if(jo(e)){if(my(e.content,t,o),jo(e.zones))for(let r of Object.values(e.zones))my(r,t,o);jo(e.root)&&Zl(e.root,t,o)}return[...t].sort()}var xy=()=>({}),gy=new Map;function hL(e){let t=gy.get(e);if(t)return t;let o=new Set,r=Un[e];if(r)for(let l of r.seeds(xy))for(let s of jf({type:r.childType,props:l}))o.add(s);let n=Pb(e);if(n){let l=0;for(let s of jf(n(xy,i=>`${i}-${l+=1}`)))o.add(s)}o.delete(e);let a=[...o].sort();return gy.set(e,a),a}function bL(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let t=zs(e),o=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),n=new Set(Object.keys(e.host??{})),a=i=>{if(r.has(i))return!1;if(n.has(i))return!0;let c=Yu(i);return!c||!t[c]?!1:o?o.has(i):!0},l=new Map,s=i=>{let c=l.get(i);if(c!==void 0)return c;l.set(i,!1);let f=a(i)&&hL(i).every(s);return l.set(i,f),f};return{sets:t,offers:s}}var yL="block-offer";function Jf(e=Ye()){return e.cache(yL,()=>bL(e.blocks))}function Mq(e,t=Ye()){let o=Jf(t);return o?o.offers(e):!0}function Kq(e,t=0){let o=CL(e,t),r=o?Jf():null;return o&&r?SL(o,r):o}function SL(e,t){if(e.spec)return t.offers(e.spec.childType)?e:null;let o=e.choices??[],r=o.filter(n=>t.offers(n.type));return r.length===o.length?e:r.length>0?{...e,choices:r}:null}function CL(e,t){let o=Un[e];if(o)return{source:"section",slot:o.slot,choices:null,spec:o};let r=fb(e,t);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let n=Sb(e);return n?{source:"footer",slot:yb,choices:n,spec:null}:null}var qq="Scrolling Bar",{Provider:Yq,useSelection:Iy}=la("selectedHeroId");import{SETTINGS_BUCKETS as PL}from"efficient-easel/panel";var Vr=PL,$e={Content:"_sContent",Style:"_sStyle",Layout:"_sLayout",Animation:"_sAnimation"},Qq=[$e.Layout,...Object.keys(eb({phone:!0})),...Object.keys(tb("full")),...Object.keys(ob()),...Object.keys(rb())],e9=[$e.Style,...Object.keys(Yh())],t9=[$e.Style,...Object.keys(Jh())],o9=[$e.Animation,...Object.keys(Zh())],kL=Object.keys(lb()),wL=new Set(["cardImage","imageBackground"]),r9=[$e.Style,...kL.filter(e=>e.startsWith("_g")||wL.has(e))],n9=Object.keys(sb()),a9=Object.keys(ib({bottomDefault:!0})),vL="Editor only \u2014 not shown live",hy={"Archive link":"Content",Article:"Content",Boxes:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content","Opening filter":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Style",Gallery:"Style",Image:"Style","Image column":"Style",Images:"Style",Logo:"Style",Media:"Style","Background image":"Style",Color:"Style","Image tint":"Style",Style:"Style",Shape:"Style",Texture:"Style","Text style":"Style",Motion:"Animation",Animation:"Animation",Anchor:"Layout",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Layout",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[vL]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Layout","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Layout",Height:"Layout"},by={"AlloyWheelsListing._gCards":"Style","ProductGrid._gCards":"Style"};function TL(e,t,o){return by[`${e}.${t}`]??hy[o]}var RL={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"};function l9(e){let t=new Set(Object.values($e));for(let[o,r]of Object.entries(e))if(!t.has(o)&&Dr(r)?.level===1)return 1;return 2}function FL(e){let t=`${e}.`;return Object.keys(RL).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function EL(e,t){let o=Nc(e),r=ft(t);return o?Pt(o.tier,r):r}function s9(e,t){let o=[],r=new Set(FL(t)),n=new Set,a=null;for(let[d,p]of Object.entries(e)){let x=Dr(p);if(!x){a||o.push(a={bucket:"Content",entries:[]}),a.entries.push([d,p]);continue}if(r.has(d)){let h=hy[x.label];if(x.level!==2||!h||x.label!==h)throw new Error(`${t}.${d}: RETIRED (lib/puck/field-groups.ts) lists this sub-heading as one whose name duplicates its bucket, but it is a level-${x.level} "${x.label}" header in the ${h??"(unclassified)"} bucket. Only a level-2 header whose label IS its bucket's name may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);n.add(d),o.push(a={bucket:h,entries:[]});continue}let g=TL(t,d,x.label);if(!g)throw new Error(`${t}.${d}: the inspector group "${x.label}" is not classified in LABEL_BUCKET (lib/puck/field-groups.ts), so there is no way to say which of ${Vr.join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);let I=d===$e[g]&&x.level===1;if(!I&&d===$e[g])throw new Error(`${t}.${d}: that key is reserved for the ${g} bucket header, but this field is a level-${x.level} "${x.label}" header, so it cannot serve as one. Rename the section's own field.`);o.push(a={bucket:g,entries:[[d,I||x.level===2?p:EL(p,x.label)]],isBucketHeader:I})}let l=new Set(Object.entries(e).filter(([,d])=>Dr(d)).map(([d])=>d)),s=Object.keys(by).filter(d=>d.startsWith(`${t}.`)).filter(d=>!l.has(d.slice(t.length+1)));if(s.length)throw new Error(`${t}: KEY_BUCKET (lib/puck/field-groups.ts) lists ${JSON.stringify(s)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`);let c=o.some(d=>d.isBucketHeader)?[]:[...r].filter(d=>!n.has(d));if(c.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);for(let d of Vr){let p=$e[d];if(p in e&&!o.some(x=>x.isBucketHeader&&x.entries[0]?.[0]===p))throw new Error(`${t}.${p} is reserved for the ${d} bucket header but is not a level-1 "${d}" fold header. Rename the section's own field.`)}let f=Vr.filter(d=>o.some(p=>p.bucket===d)),u={};for(let d of Vr){let p=o.filter(I=>I.bucket===d);if(!p.length)continue;let x=p.findIndex(I=>I.isBucketHeader);x>0&&p.unshift(...p.splice(x,1));let g=$l(d,d===f[0]?f:null);x<0&&(u[$e[d]]=g);for(let I of p)for(let[h,k]of I.entries)u[h]=I.isBucketHeader&&h===$e[d]?g:k}return u}function i9(e){return $e.Content in e?e:{[$e.Content]:$l("Content",null),...e}}function c9(e){return Vr.some(t=>$e[t]in e)}function f9(e){let t=Vr.filter(r=>$e[r]in e);if(t.length===0)return e;let o={...e};for(let r of t)o[$e[r]]=$l(r,r===t[0]?t:null);return o}var{Provider:p9,useSelection:m9}=la("selectedPartId");import{createContext as _L,useContext as AL,useMemo as LL,useState as OL}from"react";import{jsx as BL}from"react/jsx-runtime";var NL={partStyle:null,setPartStyle:()=>{}},yy=_L(NL);function I9({children:e}){let[t,o]=OL(null),r=LL(()=>({partStyle:t,setPartStyle:o}),[t]);return BL(yy.Provider,{value:r,children:e})}function h9(){return AL(yy)}import{forwardRef as DL,createElement as Zf}from"react";var Sy={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var ee=(e,t,o,r)=>{let n=DL(({color:a="currentColor",size:l=24,stroke:s=2,title:i,className:c,children:f,...u},d)=>Zf("svg",{ref:d,...Sy[e],width:l,height:l,className:["tabler-icon",`tabler-icon-${t}`,c].join(" "),...e==="filled"?{fill:a}:{strokeWidth:s,stroke:a},...u},[i&&Zf("title",{key:"svg-title"},i),...r.map(([p,x])=>Zf(p,x)),...Array.isArray(f)?f:[f]]));return n.displayName=`${o}`,n};var ML=[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]],Qf=ee("outline","brand-facebook","BrandFacebook",ML);var HL=[["path",{d:"M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4l0 -8",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}],["path",{d:"M16.5 7.5v.01",key:"svg-2"}]],ed=ee("outline","brand-instagram","BrandInstagram",HL);var GL=[["path",{d:"M8 11v5",key:"svg-0"}],["path",{d:"M8 8v.01",key:"svg-1"}],["path",{d:"M12 16v-5",key:"svg-2"}],["path",{d:"M16 16v-3a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-4"}]],td=ee("outline","brand-linkedin","BrandLinkedin",GL);var WL=[["path",{d:"M8 20l4 -9",key:"svg-0"}],["path",{d:"M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7",key:"svg-1"}],["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],od=ee("outline","brand-pinterest","BrandPinterest",WL);var UL=[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917",key:"svg-0"}]],rd=ee("outline","brand-tiktok","BrandTiktok",UL);var zL=[["path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9",key:"svg-0"}],["path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1",key:"svg-1"}]],nd=ee("outline","brand-whatsapp","BrandWhatsapp",zL);var KL=[["path",{d:"M4 4l11.733 16h4.267l-11.733 -16l-4.267 0",key:"svg-0"}],["path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772",key:"svg-1"}]],ad=ee("outline","brand-x","BrandX",KL);var $L=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3l0 -6",key:"svg-1"}]],ld=ee("outline","brand-youtube","BrandYoutube",$L);var VL=[["path",{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z",key:"svg-0"}]],sd=ee("filled","brand-facebook-filled","BrandFacebookFilled",VL);var qL=[["path",{d:"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],id=ee("filled","brand-instagram-filled","BrandInstagramFilled",qL);var YL=[["path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1 -5 5h-10a5 5 0 0 1 -5 -5v-10a5 5 0 0 1 5 -5zm-9 8a1 1 0 0 0 -1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0 -1 -1m6 0a3 3 0 0 0 -1.168 .236l-.125 .057a1 1 0 0 0 -1.707 .707v5a1 1 0 0 0 2 0v-3a1 1 0 0 1 2 0v3a1 1 0 0 0 2 0v-3a3 3 0 0 0 -3 -3m-6 -3a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],cd=ee("filled","brand-linkedin-filled","BrandLinkedinFilled",YL);var XL=[["path",{d:"M17 3.34a10 10 0 0 1 -8.512 18.023l2.364 -5.315a3.5 3.5 0 0 0 2.398 .952c2.708 0 4.75 -2.089 4.75 -5a6 6 0 1 0 -11.64 2.041a1 1 0 1 0 1.88 -.682a4 4 0 1 1 7.76 -1.36c0 1.818 -1.156 3.001 -2.75 3.001c-.609 0 -1.153 -.361 -1.478 -1.022l1.142 -2.572a1 1 0 0 0 -1.828 -.812l-4.392 9.882a10 10 0 0 1 -4.694 -8.476l.005 -.324a10 10 0 0 1 14.995 -8.336",key:"svg-0"}]],fd=ee("filled","brand-pinterest-filled","BrandPinterestFilled",XL);var jL=[["path",{d:"M16.083 2h-4.083a1 1 0 0 0 -1 1v11.5a1.5 1.5 0 1 1 -2.519 -1.1l.12 -.1a1 1 0 0 0 .399 -.8v-4.326a1 1 0 0 0 -1.23 -.974a7.5 7.5 0 0 0 1.73 14.8l.243 -.005a7.5 7.5 0 0 0 7.257 -7.495v-2.7l.311 .153c1.122 .53 2.333 .868 3.59 .993a1 1 0 0 0 1.099 -.996v-4.033a1 1 0 0 0 -.834 -.986a5.005 5.005 0 0 1 -4.097 -4.096a1 1 0 0 0 -.986 -.835z",key:"svg-0"}]],dd=ee("filled","brand-tiktok-filled","BrandTiktokFilled",jL);var JL=[["path",{d:"M18.497 4.409a10 10 0 0 1 -10.36 16.828l-.223 -.098l-4.759 .849l-.11 .011a1 1 0 0 1 -.11 0l-.102 -.013l-.108 -.024l-.105 -.037l-.099 -.047l-.093 -.058l-.014 -.011l-.012 -.007l-.086 -.073l-.077 -.08l-.067 -.088l-.056 -.094l-.034 -.07l-.04 -.108l-.028 -.128l-.012 -.102a1 1 0 0 1 0 -.125l.012 -.1l.024 -.11l.045 -.122l1.433 -3.304l-.009 -.014a10 10 0 0 1 1.549 -12.454l.215 -.203a10 10 0 0 1 13.226 -.217m-8.997 3.09a1.5 1.5 0 0 0 -1.5 1.5v1a6 6 0 0 0 6 6h1a1.5 1.5 0 0 0 0 -3h-1l-.144 .007a1.5 1.5 0 0 0 -1.128 .697l-.042 .074l-.022 -.007a4.01 4.01 0 0 1 -2.435 -2.435l-.008 -.023l.075 -.041a1.5 1.5 0 0 0 .704 -1.272v-1a1.5 1.5 0 0 0 -1.5 -1.5",key:"svg-0"}]],ud=ee("filled","brand-whatsapp-filled","BrandWhatsappFilled",JL);var ZL=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],pd=ee("filled","brand-x-filled","BrandXFilled",ZL);var QL=[["path",{d:"M18 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-12a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-9 6v6a1 1 0 0 0 1.514 .857l5 -3a1 1 0 0 0 0 -1.714l-5 -3a1 1 0 0 0 -1.514 .857z",key:"svg-0"}]],md=ee("filled","brand-youtube-filled","BrandYoutubeFilled",QL);import{jsx as tO}from"react/jsx-runtime";var S7="outline",eO={instagram:{outline:ed,solid:id},facebook:{outline:Qf,solid:sd},tiktok:{outline:rd,solid:dd},youtube:{outline:ld,solid:md},x:{outline:ad,solid:pd},linkedin:{outline:td,solid:cd},pinterest:{outline:od,solid:fd},whatsapp:{outline:nd,solid:ud}};function C7({platform:e,iconStyle:t,size:o}){let r=eO[e][t];return tO(r,{size:o,stroke:1.75,"aria-hidden":"true",focusable:"false"})}import{useCallback as qr,useEffect as Yr,useId as NO,useRef as to,useState as $n}from"react";var Cy="data-puck-overlay-portal";function Ql(e){return e.setAttribute(Cy,"true"),()=>e.removeAttribute(Cy)}var xd="small",gd="dot",oO=[{label:"Small",value:"small"},{label:"Display",value:"display"}],rO=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],Py={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},nO={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},aO={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function ky(e){return Xe(oO,xd,e)}function wy(e){return Xe(rO,gd,e)}function vy(e){return nO[e]}function Ty(e,t){return aO[e][t]}var Id="left",lO=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],sO={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function Ry(e){return Xe(lO,Id,e)}function Fy(e){return e==="up"||e==="down"}function Ey(e,t){return`${sO[e]} ${t}s linear infinite`}import{jsx as zn,jsxs as _y}from"react/jsx-runtime";var iO={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function hd({items:e,separator:t=gd,size:o=xd,durationSec:r=50,scroll:n=Id,backdrop:a="themed-band",className:l}){let s=ky(o),i=Ry(n),c=wy(t),f=`text-accent ${Ty(s,c)}`.trim(),u=Py[c],d=u===""?zn("span",{}):zn("span",{className:f,children:u}),p=Fy(i),x=p?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-[800px]:gap-8 max-[800px]:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-[800px]:gap-8 max-[800px]:pr-8",g=p?"inline-flex flex-col items-center gap-[60px] max-[800px]:gap-8":"inline-flex items-center gap-[60px] max-[800px]:gap-8",I=h=>zn("span",{className:x,children:e.map((k,S)=>{let C=typeof k=="string"?k:k.text,T=typeof k=="object"&&k.gold;return _y("span",{className:g,children:[zn("span",{className:T?"text-accent":void 0,children:re(C)}),d]},S)})},h);return zn("div",{className:`overflow-hidden ${l??""}`,children:_y("div",{className:`flex ${p?"flex-col ":""}whitespace-nowrap ${vy(s)} ${iO[a]}`,style:{animation:Ey(i,r)},children:[I("a"),I("b")]})})}var cO={"top-left":"left-0 top-[120px]","top-center":"left-1/2 top-[120px] -translate-x-1/2","top-right":"right-0 top-[120px]",left:"left-0 top-1/2 -translate-y-1/2",center:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",right:"right-0 top-1/2 -translate-y-1/2","bottom-left":"left-0 bottom-[120px]","bottom-center":"left-1/2 bottom-[120px] -translate-x-1/2","bottom-right":"right-0 bottom-[120px]"},fO=`calc(${Qd} - ${gs}*2)`,Ay=`var(${eu},${gs})`,D7=`pointer-events-none absolute inset-y-0 left-[${Ay}] right-[${Ay}] z-[6] mx-auto max-w-[var(${tu},${fO.replace(/ /g,"_")})]`;function es(e,t){return`pointer-events-auto absolute ${cO[e]} z-[6] sf-hero-overlay-rail flex ${t}`}function Ly(e){return bt.includes(e)?e:null}var dO="bottom-right",uO=["outline","solid","square","bare"],pO="outline",W7={outline:"Outline",solid:"Solid",square:"Square",bare:"Bare"},U7=!1,Oy=["prev","next"],Ny={prev:"Previous slide",next:"Next slide"};function mO(e){return uO.includes(e)?e:pO}function xO(e){return Ly(e)??dO}var gO="flex-row items-center gap-2";function By(e){return es(xO(e),gO)}var IO={outline:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",solid:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome bg-overlay-chrome text-overlay-scrim transition-colors hover:bg-overlay-chrome/85",square:"grid h-10 w-10 cursor-pointer place-items-center rounded-md border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",bare:"grid h-10 w-10 cursor-pointer place-items-center text-overlay-fg transition-colors hover:text-overlay-chrome"};function Dy(e){return IO[mO(e)]}function My(e){return e.shown===!0&&(e.count??0)>1}function ts(e,t,o){if(o<=1)return t;let r=Math.min(Math.max(t,0),o-1);return e==="prev"?(r-1+o)%o:(r+1)%o}import{jsx as bd}from"react/jsx-runtime";function yd({shape:e,placement:t,ref:o}){let r=Dy(e);return bd("div",{ref:o,className:By(t),style:{color:"var(--overlay-fg)"},children:Oy.map(n=>bd("button",{type:"button","data-hero-nav":n,"aria-label":Ny[n],className:r,children:bd(Zr,{name:"chevron-right",size:18,rounded:!0,style:n==="prev"?{rotate:"180deg"}:void 0})},n))})}var hO=bt;var bO="top-right",yO=["cards","dots","numbers","bar","tabs"],SO=["cards","dots","numbers","bar"],Hy="cards",j7={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",tabs:"Tabs"},J7=!0;function os(e){return yO.includes(e)?e:Hy}function Gy(e){return SO.includes(e)?e:Hy}function CO(e){return hO.includes(e)?e:bO}var Wy={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",tabs:"flex-row items-stretch w-full overflow-x-auto"};function Uy(e,t){return es(CO(t),Wy[os(e)])}function zy(e){return`flex ${Wy[os(e)]}`}function Ky(e){return e.shown!==!1&&(e.count??0)>1}function PO(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function kO(e,t){return e===t?!0:e.length!==t.length?!1:e.every((o,r)=>o.name===t[r].name&&o.process===t[r].process&&o.video===t[r].video)}function $y(e,t){let o=Array.from(t,PO);return kO(e,o)?e:o}import{Fragment as Kn,jsx as Me,jsxs as Sd}from"react/jsx-runtime";function Cd({slides:e,active:t,shape:o,placement:r,ref:n,tone:a="media",label:l}){let s=os(o),i=a==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--surface-2)"}:void 0;return Sd("aside",{ref:n,"aria-label":l??"Featured slides",className:a==="surface"?zy(s):Uy(s,r),style:{color:"var(--overlay-fg)",...i},children:[s==="cards"&&Me(wO,{slides:e,active:t}),s==="dots"&&Me(vO,{count:e.length,active:t}),s==="numbers"&&Me(TO,{count:e.length,active:t}),s==="bar"&&Me(RO,{count:e.length,active:t}),s==="tabs"&&Me(FO,{slides:e,active:t})]})}function wO({slides:e,active:t}){return Sd(Kn,{children:[Me("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel \xB7 pick a slide"}),e.map((o,r)=>{let n=r===t;return Sd("button",{type:"button","data-idx":r,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${r+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[Me("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${r+1}`}),Me("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"\u25B6 Now playing":o.process||" "})]},r)})]})}function vO({count:e,active:t}){return Me(Kn,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${r===t?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},r))})}function TO({count:e,active:t}){return Me(Kn,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${r===t?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(r+1).padStart(2,"0")},r))})}function RO({count:e,active:t}){return Me(Kn,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${r<=t?"bg-overlay-fg":"bg-overlay-chrome/25"}`},r))})}function FO({slides:e,active:t}){return Me(Kn,{children:e.map((o,r)=>{let n=r===t;return Me("button",{type:"button","data-idx":r,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",r>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:Me("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},r)})})}import{useEffect as EO,useState as _O}from"react";var Vy="(prefers-reduced-motion: reduce)";function AO(){return globalThis.window?.matchMedia?.(Vy)?.matches??!1}function rY(){return AO()?"auto":"smooth"}function qy(){let[e,t]=_O(!1);return EO(()=>{let o=globalThis.window?.matchMedia?.(Vy);if(!o||(t(o.matches),typeof o.addEventListener!="function"))return;let r=n=>t(n.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var Yy={min:40,max:100,step:5,fallback:100,unit:"vh"};function Pd(e){return`${typeof e=="number"?e:Yy.fallback}${Yy.unit}`}function Xy(...e){return e.some(t=>typeof t=="number")}var LO=40;function OO(e,t){return Math.abs(e)<=LO||Math.abs(e)<=Math.abs(t)?null:e<0?"next":"prev"}function jy(e,t,o,r){let n=OO(e,t);return n?ts(n,o,r):o}function Jy(e){return(e.count??0)>1&&e.editing!==!0}function Zy(e){return e.editing!==!0?!1:(e.slides??[])[e.shown??0]?.video===!0}function Qy(e){return e.editing!==!0?!1:!(e.playing===!0&&e.controlShown===!0)}import{jsx as Wt,jsxs as rs}from"react/jsx-runtime";var BO=`
|
|
6
|
+
.hero-ticker-pick { cursor: pointer; }
|
|
7
|
+
.hero-ticker-pick:hover {
|
|
8
|
+
outline: 2px solid color-mix(in srgb, ${hs.accent} 45%, transparent);
|
|
9
|
+
outline-offset: -2px;
|
|
10
|
+
}
|
|
11
|
+
.hero-ticker-pick[data-selected] {
|
|
12
|
+
outline: 2px solid ${hs.accent};
|
|
13
|
+
outline-offset: -2px;
|
|
14
|
+
}
|
|
15
|
+
`,DO="Play video",MO="Hold video",HO="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",GO="item",WO=["","","","","",""],eS=new Map,tS="hero-slider:goto";function UO(e,t){let o=e?.ownerDocument?.defaultView;if(o)return o.addEventListener(tS,t),()=>o.removeEventListener(tS,t)}function zO({slides:e,alignment:t,textureOpacity:o,showTexture:r,textureColor:n,phoneUpDown:a,phoneSideways:l,autoplay:s,autoplayInterval:i,showTicker:c,tickerItems:f,heightDesktop:u,heightMobile:d,showPicker:p,pickerShape:x,pickerPlacement:g,showArrows:I,arrowsShape:h,arrowsPlacement:k,editing:S}){let C=Xy(u,d),T=C?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",b=C?{"--sf-hero-h-d":Pd(u),"--sf-hero-h-m":Pd(d)}:void 0,O=(f??WO.map(L=>({text:L}))).map(L=>L?.text?.trim()?L.text:S?GO:"").filter(Boolean),D=c!==!1,R=to(null),_=to(null),G=to(null),Y=to(null),M=to(null),v=NO(),j=to(v),[F,E]=$n([]),[se,N]=$n(0),le=to(0),[ge,ie]=$n(!1),[te,he]=$n(!1),[de,z]=$n(null),Le=qy(),{selectedHeroId:Re,select:Oe}=Iy(),ne=qr(()=>R.current?.querySelector(".hero-track")??null,[]),K=qr((L,W=!1)=>{N(L),le.current=L,eS.set(j.current,L);let B=R.current?.querySelector(".hero-track");if(B)if(W){let ce=B.style.transition;B.style.transition="none",B.style.transform=`translateX(-${Math.max(0,L)*100}%)`,B.offsetHeight,B.style.transition=ce}else B.style.transform=`translateX(-${Math.max(0,L)*100}%)`},[]);Yr(()=>{let L=R.current,W=L?.getAttribute("data-puck-component")||L?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||v;j.current=W,z(W);let B=eS.get(W);typeof B=="number"&&(N(B),le.current=B)},[]),Yr(()=>{let L=ne();if(!L)return;let W=()=>{E(ce=>$y(ce,L.querySelectorAll("[data-slide-name]")))};W();let B=new MutationObserver(W);return B.observe(L,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{B.disconnect()}},[ne]),Yr(()=>{if(!S)return;let L=W=>{let B=W.detail;if(!B||typeof B.index!="number")return;let ce=R.current,Ie=ce?.getAttribute("data-puck-component")||ce?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;B.id&&B.id!==Ie||K(B.index,!0)};return UO(R.current,L)},[S,K]);let H=F.length,He=Math.min(Math.max(se,0),Math.max(0,H-1)),Ze=Ky({shown:p,count:H}),It=My({shown:I,count:H}),oo=Zy({editing:S,shown:He,slides:F}),Ne=Qy({editing:S,playing:te,controlShown:oo}),Ve=Jy({count:H,editing:S}),ht=to(null),rt=to(null),Ut=qr(L=>{if(ht.current=null,rt.current=null,!Ve||L.touches.length!==1)return;let W=L.touches[0];ht.current={x:W.clientX,y:W.clientY},rt.current={x:W.clientX,y:W.clientY}},[Ve]),Jo=qr(L=>{if(!ht.current)return;if(L.touches.length!==1){ht.current=null;return}let W=L.touches[0];rt.current={x:W.clientX,y:W.clientY}},[]),Xr=qr(()=>{let L=ht.current,W=rt.current;if(ht.current=null,rt.current=null,!Ve||!L||!W)return;let B=jy(W.x-L.x,W.y-L.y,le.current,H);B!==le.current&&K(B)},[Ve,H,K]);Yr(()=>{if(S||!s||ge||Le||H<=1)return;let W=Math.max(1,typeof i=="number"?i:6)*1e3,B=window.setTimeout(()=>K((He+1)%H),W);return()=>window.clearTimeout(B)},[S,s,i,ge,Le,H,He,K]),Yr(()=>{let L=[_.current,G.current,Y.current].filter(Boolean),W=L.map(ce=>Ql(ce)),B=ce=>{let Ie=ce.target,ro=Ie.closest("[data-hero-nav]"),nt=ro??Ie.closest("[data-idx]");if(!nt)return;ce.stopPropagation(),ce.preventDefault();let jr=ro?ts(ro.dataset.heroNav,le.current,H):Number(nt.dataset.idx);Number.isNaN(jr)||(K(jr,S),ne()?.querySelectorAll("[data-slide-name]")[jr]?.click())};return L.forEach(ce=>ce.addEventListener("click",B,{capture:!0})),()=>{W.forEach(ce=>ce?.()),L.forEach(ce=>ce.removeEventListener("click",B,{capture:!0}))}},[H,K,ne,S]),Yr(()=>{if(!S)return;let L=M.current;if(!L)return;let W=Ql(L),B=ce=>{ce.stopPropagation(),ce.preventDefault();let Ie=R.current,ro=Ie?.getAttribute("data-puck-component")||Ie?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;Oe(ro)};return L.addEventListener("click",B,{capture:!0}),()=>{W?.(),L.removeEventListener("click",B,{capture:!0})}},[S,Oe,D,O.length]);let Fe=qr(L=>{if(!L)return;let W=Ql(L),B=ce=>{ce.stopPropagation(),ce.preventDefault(),he(Ie=>!Ie)};return L.addEventListener("click",B,{capture:!0}),()=>{W?.(),L.removeEventListener("click",B,{capture:!0})}},[]);return Wt(Bf.Provider,{value:{alignment:t,textureOpacity:o,textureOn:r,textureColor:n,quietVideo:Ne,phoneUpDown:a,phoneSideways:l},children:rs("div",{ref:R,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${T} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:b,onMouseEnter:()=>ie(!0),onMouseLeave:()=>ie(!1),onTouchStart:Ut,onTouchMove:Jo,onTouchEnd:Xr,children:[Wt(e,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${He*100}%)`,transition:Le?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),oo&&Wt("div",{ref:Fe,"data-hero-video-control":te?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${hu} + 16px)`},children:rs("button",{type:"button",className:HO,children:[Wt("span",{"aria-hidden":"true",children:te?"\u275A\u275A":"\u25B6"}),te?MO:DO]})}),(Ze||It)&&rs("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[Ze&&Wt(Cd,{ref:_,slides:F,active:He,shape:Gy(x),placement:g}),It&&Wt(yd,{ref:Y,shape:h,placement:k})]}),Ze&&Wt("div",{ref:G,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:F.map((L,W)=>Wt("button",{type:"button","data-idx":W,"aria-label":`Go to slide ${W+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${W===He?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},W))}),D&&O.length>0&&rs("div",{ref:M,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${S?" hero-ticker-pick":""}`,"data-selected":S&&de!=null&&Re===de?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[S&&Wt("style",{children:BO}),Wt(hd,{items:O,backdrop:"dark-media"})]})]})})}var RY=Hr;var oS={rowLabel:{label:"Spec row name",follows:"Labels",builtIn:"14px"},rowValue:{label:"Spec row value",follows:"Labels",builtIn:"14px"},diagramTitle:{label:"Diagram title",follows:"Labels",builtIn:"12px"},diagramCallout:{label:"Diagram measurement",follows:"Labels",builtIn:"12px"},diagramStatLabel:{label:"Diagram stat name",follows:"Labels",builtIn:"11px"},diagramStatValue:{label:"Diagram stat value",follows:"Labels",builtIn:"11px"}};var KO={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0}},rS=KO;var nS={SpecTable:oS,FAQ:rS,Collections:kb};function OY(e){return e&&Object.hasOwn(nS,e)?nS[e]:null}var Vn=new Map,aS=e=>e??"";function kd(e,t,o){o&&Vn.clear();let r=aS(t),n=Vn.get(r);if(!n){let a=oe.listMenus(e,t);Vn.set(r,a),a.catch(()=>{Vn.get(r)===a&&Vn.delete(r)}),n=a}return n}var ns=new Map;function lS(e,t){let o=aS(t),r=ns.get(o);if(!r){let n=kd(e,t,!0);ns.set(o,n);let a=()=>{ns.get(o)===n&&ns.delete(o)};n.then(a,a),r=n}return r}function MY(e,t=!1){return kd(e,Ro(),t)}function HY(e){return lS(e,Ro())}function GY(e,t=!1){return kd(e,null,t)}function WY(e){return lS(e,null)}var UY={ids:new Set,handles:new Set};function zY(e){return{ids:new Set(e.map(t=>t.id).filter(Boolean)),handles:new Set(e.map(t=>t.handle).filter(Boolean))}}function KY({id:e,handle:t,editing:o,ready:r,live:n}){if(!o)return!1;let a=e??"",l=t??"";return!a&&!l?!0:r?a?!n.ids.has(a):!n.handles.has(l):!1}function $Y(e,t){if(t){if(t.id)return e.find(o=>o.id===t.id);if(t.handle)return e.find(o=>o.handle===t.handle)}}export{ll as a,sl as b,wG as c,Ho as d,Hr as e,wb as f,Rf as g,tA as h,vb as i,oA as j,i2 as k,c2 as l,vi as m,jt as n,Ti as o,Ri as p,_e as q,gn as r,Jt as s,br as t,hn as u,Ix as v,D2 as w,Tk as x,Rk as y,Fk as z,Ek as A,W2 as B,U2 as C,J2 as D,Z2 as E,Q2 as F,eH as G,Xa as H,tH as I,yr as J,oH as K,yx as L,_k as M,rH as N,nH as O,aH as P,Bi as Q,Mk as R,Hk as S,ja as T,Cx as U,vx as V,Yk as W,dH as X,uH as Y,bo as Z,pH as _,mH as $,xH as aa,gH as ba,mw as ca,Sn as da,Ox as ea,bH as fa,Bx as ga,wH as ha,vH as ia,Sr as ja,re as ka,HH as la,Lt as ma,el as na,aA as oa,lA as pa,sA as qa,lr as ra,ku as sa,sa as ta,Ao as ua,QO as va,eN as wa,ya as xa,Vs as ya,fp as za,oT as Aa,F5 as Ba,Ag as Ca,U5 as Da,z5 as Ea,Kc as Fa,jg as Ga,NW as Ha,HW as Ia,GW as Ja,WW as Ka,vu as La,Sl as Ma,Ip as Na,nU as Oa,cU as Pa,Cc as Qa,uI as Ra,jT as Sa,uU as Ta,Pl as Ua,pI as Va,JT as Wa,ZT as Xa,QT as Ya,xU as Za,gU as _a,IU as $a,hU as ab,ia as bb,CS as cb,lN as db,po as eb,sN as fb,iN as gb,Ru as hb,cN as ib,fN as jb,dN as kb,vS as lb,wc as mb,fR as nb,wU as ob,RU as pb,II as qb,FU as rb,uR as sb,EU as tb,vl as ub,lt as vb,pN as wb,mN as xb,xN as yb,gN as zb,fa as Ab,IN as Bb,hN as Cb,bN as Db,dt as Eb,je as Fb,PN as Gb,_S as Hb,kN as Ib,wN as Jb,AS as Kb,RN as Lb,LS as Mb,FN as Nb,NN as Ob,en as Pb,GS as Qb,WS as Rb,US as Sb,vs as Tb,BN as Ub,eC as Vb,oC as Wb,zN as Xb,Mu as Yb,iC as Zb,uC as _b,tn as $b,zu as ac,ZN as bc,mo as cc,nn as dc,cB as ec,dB as fc,uB as gc,pB as hc,mB as ic,yC as jc,xo as kc,hB as lc,bB as mc,lp as nc,PB as oc,ba as pc,vB as qc,Bs as rc,Ds as sc,ju as tc,FB as uc,Ft as vc,Et as wc,Ca as xc,l1 as yc,yp as zc,Pa as Ac,Ys as Bc,XC as Cc,f1 as Dc,Pp as Ec,JC as Fc,p1 as Gc,m1 as Hc,x1 as Ic,g1 as Jc,lP as Kc,Be as Lc,Ap as Mc,b1 as Nc,Hp as Oc,v1 as Pc,wa as Qc,zp as Rc,Kp as Sc,T1 as Tc,R1 as Uc,Vp as Vc,F1 as Wc,qp as Xc,E1 as Yc,pP as Zc,_1 as _c,cr as $c,Io as ad,Yp as bd,O1 as cd,Ta as dd,Xp as ed,jp as fd,Jp as gd,B1 as hd,xP as id,Qp as jd,em as kd,fr as ld,tm as md,IP as nd,M1 as od,H1 as pd,Ra as qd,rm as rd,Fa as sd,ti as td,ri as ud,am as vd,ai as wd,si as xd,fm as yd,dD as zd,La as Ad,Oa as Bd,Cm as Cd,qt as Dd,$t as Ed,No as Fd,wm as Gd,mr as Hd,Tm as Id,Rm as Jd,vD as Kd,Ba as Ld,Ee as Md,TD as Nd,RD as Od,Da as Pd,FD as Qd,ED as Rd,Ma as Sd,DP as Td,Bm as Ud,MP as Vd,MD as Wd,HD as Xd,GD as Yd,WP as Zd,WD as _d,UD as $d,zD as ae,KP as be,KD as ce,Wm as de,$D as ee,VD as fe,qD as ge,YD as he,XD as ie,jD as je,JD as ke,ZD as le,QD as me,eM as ne,tM as oe,Ym as pe,hi as qe,bi as re,mn as se,Xm as te,uM as ue,jm as ve,Zm as we,ex as xe,xn as ye,Wi as ze,qH as Ae,Ui as Be,$w as Ce,iG as De,ol as Ee,pG as Fe,ng as Ge,Vi as He,OG as Ie,Ji as Je,jG as Ke,JG as Le,ZG as Me,QG as Ne,Ev as Oe,ul as Pe,l4 as Qe,m4 as Re,x4 as Se,ml as Te,g4 as Ue,P4 as Ve,ec as We,kn as Xe,Nv as Ye,k4 as Ze,wg as _e,oc as $e,Fg as af,rc as bf,qv as cf,lc as df,L5 as ef,Gg as ff,Wg as gf,AB as hf,LB as if,op as jf,OB as kf,NB as lf,Gs as mf,Yg as nf,np as of,So as pf,Xg as qf,RW as rf,Zt as sf,RT as tf,hc as uf,wI as vf,c6 as wf,Al as xf,Nc as yf,m6 as zf,Pt as Af,x6 as Bf,C6 as Cf,Hc as Df,Uc as Ef,KI as Ff,qI as Gf,OF as Hf,Cz as If,Jc as Jf,GF as Kf,An as Lf,Fz as Mf,rh as Nf,nh as Of,ah as Pf,jF as Qf,jz as Rf,Jz as Sf,Dl as Tf,Qz as Uf,af as Vf,e3 as Wf,pE as Xf,t3 as Yf,r3 as Zf,Lr as _f,n3 as $f,IE as ag,Ml as bg,l3 as cg,hh as dg,i3 as eg,c3 as fg,f3 as gg,d3 as hg,u3 as ig,Gl as jg,Wl as kg,m3 as lg,Fh as mg,g3 as ng,Ah as og,pf as pg,mf as qg,S3 as rg,p_ as sg,Kl as tg,_K as ug,AK as vg,LK as wg,OK as xg,NK as yg,S_ as zg,BK as Ag,DK as Bg,w_ as Cg,MK as Dg,HK as Eg,GK as Fg,WK as Gg,UK as Hg,Dr as Ig,ft as Jg,zK as Kg,KK as Lg,$K as Mg,R_ as Ng,VK as Og,Yh as Pg,Yo as Qg,E_ as Rg,Or as Sg,qK as Tg,__ as Ug,Jh as Vg,Zh as Wg,YK as Xg,XK as Yg,jK as Zg,JK as _g,ZK as $g,QK as ah,e8 as bh,t8 as ch,o8 as dh,r8 as eh,eb as fh,tb as gh,ob as hh,rb as ih,n8 as jh,Vo as kh,a8 as lh,l8 as mh,s8 as nh,i8 as oh,c8 as ph,f8 as qh,d8 as rh,u8 as sh,ko as th,p8 as uh,m8 as vh,x8 as wh,Cf as xh,g8 as yh,Pf as zh,o0 as Ah,I8 as Bh,h8 as Ch,b8 as Dh,y8 as Eh,S8 as Fh,C8 as Gh,lb as Hh,sb as Ih,ib as Jh,s0 as Kh,P8 as Lh,k8 as Mh,c0 as Nh,E8 as Oh,_8 as Ph,A8 as Qh,Vr as Rh,$e as Sh,Qq as Th,e9 as Uh,t9 as Vh,o9 as Wh,r9 as Xh,n9 as Yh,a9 as Zh,vL as _h,l9 as $h,s9 as ai,i9 as bi,c9 as ci,f9 as di,Ae as ei,cb as fi,N8 as gi,ql as hi,wf as ii,D8 as ji,M8 as ki,H8 as li,G8 as mi,W8 as ni,U8 as oi,Ql as pi,p9 as qi,m9 as ri,I9 as si,h9 as ti,zf as ui,oL as vi,vf as wi,ub as xi,b0 as yi,S0 as zi,$8 as Ai,V8 as Bi,eo as Ci,qf as Di,KO as Ei,RY as Fi,OY as Gi,oy as Hi,ry as Ii,ny as Ji,ay as Ki,Uf as Li,rY as Mi,Ur as Ni,hV as Oi,Xl as Pi,qb as Qi,Yb as Ri,Xb as Si,jb as Ti,XA as Ui,EV as Vi,jA as Wi,QA as Xi,Rb as Yi,pA as Zi,mA as _i,hA as $i,v0 as aj,j8 as bj,J8 as cj,MY as dj,HY as ej,GY as fj,WY as gj,UY as hj,zY as ij,KY as jj,$Y as kj,S7 as lj,C7 as mj,xb as nj,o$ as oj,r$ as pj,sq as qj,cy as rj,fL as sj,uq as tj,dL as uj,mL as vj,Y0 as wj,d$ as xj,u$ as yj,p$ as zj,g$ as Aj,I$ as Bj,Pb as Cj,jf as Dj,Nf as Ej,Nb as Fj,Bb as Gj,Q$ as Hj,eV as Ij,tV as Jj,oV as Kj,FA as Lj,LA as Mj,Un as Nj,Fq as Oj,bL as Pj,Jf as Qj,Mq as Rj,Kq as Sj,Yy as Tj,Pd as Uj,Xy as Vj,bO as Wj,SO as Xj,Hy as Yj,j7 as Zj,J7 as _j,Cd as $j,dO as ak,uO as bk,pO as ck,W7 as dk,U7 as ek,xd as fk,gd as gk,oO as hk,rO as ik,Id as jk,lO as kk,hd as lk,qq as mk,Yq as nk,Iy as ok,WO as pk,tS as qk,zO as rk};
|