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.
@@ -0,0 +1,11 @@
1
+ import{C as Rn,E as qe,L as An,N as In,P as J,i as _n,u as Ue,w as Rt,z as wn}from"./chunk-PAXN7G3Y.js";function kn(e,t){let n=e.components?.[t]?.fields??{};return Object.keys(n).filter(r=>n[r]?.type==="slot")}function po(e,t){return kn(e,t.type).flatMap(n=>(Array.isArray(t.props[n])?t.props[n]:[]).map((o,s)=>({child:o,zone:`${t.props.id}:${n}`,index:s})))}function ya(e,t,n){let r=(o,s,i,a)=>{if(!o||typeof o!="object"||!o.props)return null;if(o.props.id===n)return{item:o,zone:s,index:i};if(a>=12)return null;for(let{child:u,zone:m,index:x}of po(e,o)){let d=r(u,m,x,a+1);if(d)return d}return null};for(let o=0;o<t.length;o+=1){let s=r(t[o],fo,o,0);if(s)return s}return null}var mo=6;function xa(e,t,n){return n<mo&&kn(e,t).length>0}var ba=e=>`${e}-${crypto.randomUUID()}`,Xe="Header",At="Footer",fo="root:default-zone",Ln=[Xe,At];function go(e){let t=new Set,n=[];return e.forEach((r,o)=>{let s=r?.type;s===void 0||!Ln.includes(s)||(t.has(s)?n.push(o):t.add(s))}),n}function Sa(e){return go(e).map(t=>e[t]?.props?.id).filter(t=>typeof t=="string")}function Ea(e,t){let n=(r,o)=>r.some(s=>s?.type===o);return Ln.filter(r=>!n(e,r)&&!n(t,r))}import{createContext as xo,useContext as bo,useEffect as So,useMemo as Ze,useState as Hn}from"react";function Pn(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function Ve(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var It=4,Ta=1,va={unit:"set",spares:0,spareSide:"left"};function Nn(e){return e.unit==="single"?1:It+e.spares}function _a(e,t){return[{partNumber:e.partNumber,wheels:Nn(t),prices:e.prices}]}function wa(e,t){let n=Nn(t)-It;if(n<=0||e.length===0)return e;let r=ho(e),o=r?r[t.spareSide]:0;return e.map((s,i)=>i===o?{...s,wheels:s.wheels+n}:s)}function ho(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function yo(e,t){return t.spares>0?`${e} + spare`:e}function Ra(e){return e.unit==="single"?"Single":yo(`Set of ${It}`,e)}var Aa="data-add-to-basket",kt=9,Lt="en";function je(e,t,n=0){return new Intl.NumberFormat(Lt,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:n}).format(e)}import{jsx as To}from"react/jsx-runtime";var On="storefront-country",Dn=xo(null);function Eo(e){return Mn(e,"catalogue")}function Co(e){return Mn(e,"money")}function Mn(e,t){let n=new Map(e.map(o=>[o.code,o.decimalPlaces])),r=new Map;return(o,s)=>{if(!s)return"";let i=r.get(s);if(!i){let a=n.get(s)??0;i=new Intl.NumberFormat(Lt,{style:"currency",currency:s,minimumFractionDigits:t==="money"?a:0,maximumFractionDigits:a}),r.set(s,i)}return i.format(o)}}function Na({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let s=Ze(()=>t??[],[t]),i=Ze(()=>n??[],[n]),a=Ze(()=>r||s.find(w=>w.isDefault)?.code||s[0]?.code||"",[r,s]),u=Ze(()=>o||i.find(w=>w.isDefault)?.code||i[0]?.code||"",[o,i]),[m,x]=Hn(u),[d,T]=Hn(!1);So(()=>{let w=Ue.getItem(On);w&&i.some(U=>U.code===w)&&x(w),T(!0)},[i]);function l(w){x(w),Ue.setItem(On,w)}let b=Ze(()=>{let w=i.find(f=>f.code===m)??null,U=w?.currency,H=U&&s.some(f=>f.code===U)?U:a,B=Eo(s),se=Co(s);return{country:m,currency:H,setCountry:l,currencies:s,countries:i,activeCountry:w,formatPrice:(f,L)=>B(f,L??H),formatMoney:(f,L)=>se(f,L??H),ready:d}},[m,s,i,a,d]);return To(Dn.Provider,{value:b,children:e})}function Qe(){let e=bo(Dn);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}import{createContext as Oo,useCallback as K,useContext as Do,useEffect as Ce,useMemo as Yn,useRef as Ge,useState as q}from"react";function $n(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Ma="We'll confirm this discount when you place your order.",Fa="Confirmed at checkout";function $a(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Fn="coupon_code: ";function Ua(e){return!(e instanceof qe)||e.status!==400||!e.message.startsWith(Fn)?null:e.message.slice(Fn.length)}function Un(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var at="Price on request",_o="Request a quote";function Pt(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Nt(e,t){let n=e?.[t];return Pt(n)?n:null}function Wa(e,t,n,r){let o=Nt(e,n),s=Nt(t,n);return o===null&&s===null?0:o===null?1:s===null?-1:r==="asc"?o-s:s-o}function za(e,t,n,r){if(n==null&&r==null)return!0;let o=Nt(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var wo={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function Ro(e,t,n){if(!Pt(e))return wo;let r=Pt(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function Ya(e,t,n=""){return!e.priced||e.unit==null?at:`${n}${je(e.unit,t)}`}function Ka(e,t){return e.was==null?null:je(e.was,t)}function Ao(e,t,n=1){let r=Ve(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((i,a)=>i+a.wheels,0),s=Math.min(...e.map(i=>i.prices[t]));return{priced:!0,unit:s,isFrom:s*o!==r,setTotal:r*n}}var Io={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function qa(e,t,n,r=1){let o=Ro(e.prices[n],e.msrpPrices?.[n],4),s=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:s};let i=Ao(t.components,n,r);return i.priced?{priced:!0,unit:i.unit,isFrom:i.isFrom,was:null,onSale:!1,setTotal:i.setTotal,fromSetTotal:s}:{...Io,fromSetTotal:s}}function ko(e,t){return!e.priced||e.unit==null?at:`${e.isFrom?"from ":""}${je(e.unit,t)}`}function Xa(e,t){return e.was==null?null:je(e.was,t)}function ja(e,t){return!e.priced||e.unit==null?_o:ko(e,t)}var Lo=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Vn(e){return Lo.test(e.trim())}var Gn="sf:ga-purchases",Po=20;function Wn(){return typeof window>"u"||window.parent!==window}function Je(...e){try{if(Wn()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function No(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:Ve(e.components,t)??0,quantity:e.qty}}function Ht(e,t){return e.filter(lt).map(n=>No(n,t))}function nl(e){Je("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function zn(e,t){let n=Ht([e],t);n.length!==0&&Je("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function rl(e){let t=Ht(e.lines,e.currency);t.length!==0&&Je("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Bn=new Set;function Ho(e){if(Bn.has(e))return!1;Bn.add(e);try{let t=JSON.parse(Ue.getItem(Gn)??"[]");if(t.includes(e))return!1;Ue.setItem(Gn,JSON.stringify([...t,e].slice(-Po)))}catch{}return!0}function ol(e){let t=e.confirmation;if(Wn()||!Ho(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);Je("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Ht(e.lines,n)}),e.adsSendTo&&Je("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}import{jsx as Uo}from"react/jsx-runtime";var Mo=400,Fo=400,$o=1500;function lt(e){return(e.components?.length??0)>0}function Kn(e,t){return{code:e,valid:t.valid,deferred:$n(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function Xn(e,t){return Ve(e.components,t)}function Ot(e,t){let n=Xn(e,t);return n===null?null:n*e.qty}function qn(e){return e!=="tyre"}var jn=Oo(null);function gl({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=Qe(),[s,i]=q(t),[a,u]=q([]),[m,x]=q([]),[d,T]=q([]),[l,b]=q(!1),[w,U]=q(!1),[H,B]=q(!1),[se,f]=q(!1),[L,S]=q(null),[ie,z]=q(void 0),ae=Ge(r),ye=Ge("");ae.current=ae.current||r;let[v,W]=q(null),[de,j]=q(!1),[D,Z]=q(null),ee=Ge(void 0),N=K(()=>i(!0),[]),xe=K(()=>i(!1),[]),Y=K(()=>i(c=>!c),[]);Ce(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&N()},[N,t]);let pe=K(c=>{f(!0),qn(c)&&B(!0)},[]),te=H||a.some(c=>qn(c.kind)),be=se||a.length>0;Ce(()=>{if(t||!te||l)return;let c=!0;return J.listWheels().then(h=>{c&&(x(h),b(!0))}),()=>{c=!1}},[t,te,l]),Ce(()=>{if(t||!be||w)return;let c=!0;return J.listBundles().then(h=>{c&&(T(h),U(!0))}),()=>{c=!1}},[t,be,w]);let M=L?.deliveryOptions??[];Ce(()=>{M.length!==0&&Z(c=>c&&M.some(h=>h.id===c)?c:M[0]?.id??null)},[L]);let R=K(()=>a.filter(lt).flatMap(c=>Pn(c.components,c.qty)),[a]),F=K(async(c,h)=>{let E=c.trim().toUpperCase();if(!E)return;let y=R();if(y.length===0){W({code:E,valid:!1,message:"Add a wheel to the cart first."});return}j(!0),ee.current=h;try{let A=await J.validateCoupon({code:E,items:y,currency:n,shippingMethodId:D??void 0,customerEmail:h});W(Kn(E,A))}catch{W({code:E,valid:!1,message:"Could not check that code. Please try again."})}finally{j(!1)}},[R,n,D]),k=K(()=>{W(null),ee.current=void 0},[]),_e=K(c=>{if(!v)return;let{code:h}=v;W(E=>E&&E.code===h?{code:h,valid:!1,refused:!0,message:c}:E)},[v]);Ce(()=>{if(!v||v.refused)return;let c=v.code,h=y=>y!==null&&y.code===c&&!y.refused,E=setTimeout(async()=>{let y=R();if(y.length===0){W(A=>h(A)?{code:c,valid:!1,message:"Add a wheel to the cart first."}:A);return}j(!0);try{let A=await J.validateCoupon({code:c,items:y,currency:n,shippingMethodId:D??void 0,customerEmail:ee.current});W(le=>h(le)?Kn(c,A):le)}catch{}finally{j(!1)}},Mo);return()=>clearTimeout(E)},[a,n,D]);let we=v&&!v.refused?v.code:void 0;Ce(()=>{if(t)return;let c=!0,h=setTimeout(async()=>{let E=R();if(E.length===0){S(null),z(void 0);return}try{let y=await J.quoteCart({items:E,currency:n,shippingMethodId:D??void 0,couponCode:we,customerEmail:ee.current||void 0,country:ae.current||void 0,subdivision:ye.current||void 0});if(!c)return;S(y)}catch{if(!c)return}z(we)},Fo);return()=>{c=!1,clearTimeout(h)}},[a,n,D,we,r]),Ce(()=>{if(t||!s)return;let c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=c}},[s,t]);let Ne=K(c=>{u(h=>{let E=h.findIndex(y=>y.id===c.id);return E===-1?[...h,c]:h.map((y,A)=>A===E?{...y,qty:Math.min(kt,y.qty+c.qty)}:y)}),zn(c,n)},[n]),He=K(c=>{u(h=>h.filter(E=>E.id!==c))},[]),Re=K((c,h)=>{let E=Math.max(1,Math.min(kt,h));u(y=>y.map(A=>A.id===c?{...A,qty:E}:A))},[]),me=K(c=>{u(c)},[]),[Q,Se]=q(null),Oe=Ge(null);Oe.current=Q;let $=Ge(null),fe=Ge(""),Ae=K((c,h)=>{let E=c.trim().toLowerCase();Vn(E)&&Se(y=>y&&y.email===E&&y.firstName===(h??"")?y:{email:E,firstName:h??""})},[]);Ce(()=>{if(t||!Q)return;let c=Un(a.filter(lt),y=>Ot(y,n)===null?at:o(Ot(y,n),n)),h={email:Q.email,firstName:Q.firstName,currency:n,items:c},E=JSON.stringify(h);if(E!==fe.current)return $.current&&clearTimeout($.current),$.current=setTimeout(()=>{$.current=null,fe.current=E,J.captureCart(h).catch(y=>{})},$o),()=>{$.current&&(clearTimeout($.current),$.current=null)}},[a,Q,n,t]);let De=K(()=>{$.current&&(clearTimeout($.current),$.current=null);let c=Oe.current;c&&(fe.current="",J.captureCart({email:c.email,firstName:c.firstName,currency:n,items:[]}).catch(h=>{}))},[n]),ge=Yn(()=>{let c=a.reduce((P,ce)=>{let ne=Ot(ce,n);return ne===null?P:P+ne},0),h=a.some(P=>Xn(P,n)===null),E=a.reduce((P,ce)=>P+ce.qty,0),y=v?.valid?v.effects:void 0,A=y?Math.min(c,Number(y.discountAmount)):0,le=L?.bundleDiscount??0,Ie=L?.appliedBundles??[],V=!!y?.freeShipping,Me=M.find(P=>P.id===D),Fe=V?0:L?.shipping??Me?.amount??0,g={};for(let P of y?.freeUnits??[])g[P.partNumber]=(g[P.partNumber]??0)+P.quantity;let ke=L?.tax??null,Ke=L?L.grandTotal:c-A-le+Fe;return{sets:E,units:a.reduce((P,ce)=>P+(ce.components??[]).reduce((ne,it)=>ne+it.wheels*ce.qty,0),0),subtotal:c,hasUnpricedLine:h,discount:A,bundleDiscount:le,appliedBundles:Ie,shipping:Fe,freeShipping:V,freeUnitsByPartNumber:g,tax:ke,grand:Ke,repricing:!!v?.refused&&L!==null&&ie===v?.code,currency:n}},[a,n,v,M,D,L,ie]),Ee=Yn(()=>({isOpen:s,open:N,close:xe,toggle:Y,items:a,catalog:m,bundles:d,warmCatalog:pe,add:Ne,remove:He,setQty:Re,replaceItems:me,identify:Ae,clearCapturedCart:De,coupon:v,applyCoupon:F,removeCoupon:k,refuseCoupon:_e,couponBusy:de,deliveryOptions:M,shippingMethodId:D,setShippingMethodId:Z,totals:ge}),[s,N,xe,Y,a,m,d,pe,Ne,He,Re,me,Ae,De,v,F,k,_e,de,M,D,ge]);return Uo(jn.Provider,{value:Ee,children:e})}function Zn(){let e=Do(jn);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}var Te="Storefront";import{Fragment as et,jsx as X,jsxs as tt}from"react/jsx-runtime";var Vo={eye:tt(et,{children:[X("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7S2 12 2 12z"}),X("circle",{cx:"12",cy:"12",r:"2.6"})]}),"eye-off":X("path",{d:"M3 3l18 18M10.6 10.6a2 2 0 002.8 2.8M9.4 5.2A9.7 9.7 0 0112 5c7 0 10 7 10 7a16 16 0 01-3.6 4.4M6.1 6.1A16 16 0 002 12s3 7 10 7a9.6 9.6 0 004.1-.9"}),search:tt(et,{children:[X("circle",{cx:"11",cy:"11",r:"7"}),X("path",{d:"M21 21l-3.8-3.8"})]}),"external-link":tt(et,{children:[X("path",{d:"M14 4h6v6"}),X("path",{d:"M20 4l-9 9"}),X("path",{d:"M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5"})]}),pencil:tt(et,{children:[X("path",{d:"M12 20h9"}),X("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"})]}),trash:tt(et,{children:[X("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),X("path",{d:"M10 11v6M14 11v6"})]}),"chevron-right":X("path",{d:"M9 6l6 6-6 6"})};function Dt({name:e,size:t,strokeWidth:n=1.8,rounded:r=!1,className:o,style:s}){return X("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:r?"round":void 0,strokeLinejoin:r?"round":void 0,className:o,style:s,"aria-hidden":"true",children:Vo[e]})}import{cache as Jo}from"react";function Qn(e,t,n,r){for(;e.size>=t;){let o,s;for(let[a,u]of e){if(u.expiresAt<=r){o=a;break}s===void 0&&n(a)&&(s=a)}let i=o??s??e.keys().next().value;if(i===void 0)return;e.delete(i)}}var Go=6e4,Bo=5e3,Wo=500,Mt=new Map;async function zo(e){let{host:t,matchesRequestHost:n}=await An();if(!t)return"";let r=await In();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var Yo=e=>e.includes("|slug:")||e.includes("|xhost:");async function Jn(e,t){let n=await zo(e);if(!n)return t();let r=Date.now(),o=Mt.get(n);if(o&&o.expiresAt>r)return o.load;let s=await t(),i=s.outcome.state==="failed"?Bo:Go;return Qn(Mt,Wo,Yo,r),Mt.set(n,{load:s,expiresAt:r+i}),s}var Ko=404;function qo(e){if(e instanceof qe&&e.status===Ko)return{state:"absent"};let t=e instanceof qe?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var Xo="[storefront:chrome-load-failed]";function jo(e,t){console.error(`${Xo} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function er(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let s=qo(o);return s.state==="failed"&&jo(e,s),{value:n,outcome:s}}}function Zo(e){return e==="production"?"silent":"banner"}var wl=Zo("production");var tr=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp"],Qo={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp"},ct={};function nr(e){if(!e||typeof e!="object")return ct;let t={};for(let n of tr){let r=e[n];if(typeof r!="string")continue;let o=r.trim();!o||!/^https?:\/\//i.test(o)||(t[n]=o)}return t}function Al(e){return tr.flatMap(t=>{let n=e[t];return n?[{platform:t,href:n,label:Qo[t]}]:[]})}var Il=e=>`${e}_url`;function es(e){return e?.trim()||Te}function ts(e,t){return e?.trim()||t}function Ml({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=ts(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var ns={name:Te,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,mapsApiKey:null,mapsMapId:null,socialLinks:ct},Fl=Jo(async()=>Jn("site",()=>er("site",async()=>{let e=await J.getSite();return{name:es(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,mapsApiKey:e.mapsApiKey??null,mapsMapId:e.mapsMapId??null,socialLinks:nr(e.socialLinks)}},ns)));var $l={name:Te,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,mapsApiKey:null,mapsMapId:null,socialLinks:ct};import{createContext as ia,useCallback as O,useContext as aa,useMemo as la,useState as lo}from"react";import{forwardRef as rs}from"react";import{jsx as is}from"react/jsx-runtime";function os(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",n=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${n}`}var ss=rs(function({href:t,prefetch:n,replace:r,scroll:o,shallow:s,legacyBehavior:i,passHref:a,locale:u,onClick:m,children:x,...d},T){let l=b=>{m?.(b),!(b.defaultPrevented||d.target==="_blank")&&b.preventDefault()};return is("a",{ref:T,href:os(t),onClick:l,...d,children:x})}),re=ss;function rr(){return"/edit"}import{useEffect as Ct,useState as Tt}from"react";import{createContext as as,useCallback as Ft,useContext as ls,useEffect as cs,useMemo as us,useState as ds}from"react";import{jsx as ms}from"react/jsx-runtime";var ps={isOpen:!1,open:()=>{},close:()=>{},toggle:()=>{}},or=as(ps);function Yl({children:e,shortcut:t=!0}){let[n,r]=ds(!1),o=Ft(()=>r(!0),[]),s=Ft(()=>r(!1),[]),i=Ft(()=>r(u=>!u),[]);cs(()=>{if(!t)return;let u=m=>{(m.metaKey||m.ctrlKey)&&(m.key==="k"||m.key==="K")&&(m.preventDefault(),r(x=>!x))};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[t]);let a=us(()=>({isOpen:n,open:o,close:s,toggle:i}),[n,o,s,i]);return ms(or.Provider,{value:a,children:e})}function sr(){return ls(or)}import{useEffect as hs,useRef as ys,useState as xs}from"react";var fs=[{code:"US",name:"United States"},{code:"GB",name:"United Kingdom"},{code:"AU",name:"Australia"},{code:"CA",name:"Canada"},{code:"IE",name:"Ireland"},{code:"NZ",name:"New Zealand"},{code:"DE",name:"Germany"},{code:"FR",name:"France"},{code:"IT",name:"Italy"},{code:"ES",name:"Spain"},{code:"NL",name:"Netherlands"},{code:"BE",name:"Belgium"},{code:"AT",name:"Austria"},{code:"CH",name:"Switzerland"},{code:"SE",name:"Sweden"},{code:"NO",name:"Norway"},{code:"DK",name:"Denmark"},{code:"FI",name:"Finland"},{code:"PT",name:"Portugal"},{code:"PL",name:"Poland"},{code:"JP",name:"Japan"},{code:"SG",name:"Singapore"},{code:"AE",name:"United Arab Emirates"},{code:"HK",name:"Hong Kong"},{code:"ZA",name:"South Africa"}],gs=Object.fromEntries(fs.map(e=>[e.code,e.name]));function ir(e){return gs[e]??e}import{jsx as Be,jsxs as $t}from"react/jsx-runtime";function ar(e,t,n){let r=new Map(e.map(o=>[o.code,o]));return(t?.length?t:e.map(o=>o.code)).map(o=>{let s=r.get(o);return{code:o,name:s?.name||ir(o),currency:s?.currency,url:s?.url||n?.[o]||""}})}function lr(e){let{countries:t}=Qe();return ar(t,e).length>0}function Ut({urls:e,countries:t}={}){let{country:n,setCountry:r,countries:o}=Qe(),[s,i]=xs(!1),a=ys(null);hs(()=>{if(!s)return;function d(l){a.current&&!a.current.contains(l.target)&&i(!1)}function T(l){l.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",d),document.addEventListener("keydown",T),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",T)}},[s]);let u=ar(o,t,e),m=u.find(d=>d.code===n)??u[0];if(!m)return null;function x(d){let T=(e?u.find(l=>l.code===d)?.url:"")?.trim();if(T){window.location.href=T;return}o.some(l=>l.code===d)&&r(d),i(!1)}return $t("div",{ref:a,className:"relative",children:[$t("button",{type:"button","aria-haspopup":"listbox","aria-expanded":s,"aria-label":`Region: ${m.name}. Click to change.`,onClick:()=>i(d=>!d),suppressHydrationWarning:!0,className:"inline-flex items-center gap-2 whitespace-nowrap border border-fg-dim px-2.5 py-1.5 font-mono text-[13px] uppercase tracking-[0.18em] transition-colors hover:border-fg",style:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:[Be("span",{children:m.name}),Be("span",{"aria-hidden":!0,className:`text-[11px] opacity-70 transition-transform ${s?"rotate-180":""}`,children:"\u25BE"})]}),s&&Be("ul",{role:"listbox","aria-label":"Choose region",className:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",children:u.map((d,T)=>{let l=d.code===n;return Be("li",{role:"option","aria-selected":l,children:$t("button",{type:"button",onClick:()=>x(d.code),className:["flex w-full items-center gap-3 px-3.5 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]","hover:bg-surface-2 hover:text-fg",T<u.length-1?"border-b border-line":"",l?"text-accent":""].join(" "),style:l?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:[Be("span",{className:"flex-1 whitespace-nowrap",children:d.name}),d.currency&&Be("span",{className:"ml-auto text-[12px] opacity-50",children:d.currency})]})},d.code)})})]})}import{useEffect as bs,useId as Ss,useRef as cr,useState as Es}from"react";function ut(e){let t=(e??"").trim();return t===""||t==="#"}import{jsx as G,jsxs as Vt}from"react/jsx-runtime";function dt({item:e,mobile:t=!1,onNavigate:n,dropdownAlign:r="start"}){let[o,s]=Es(!1),i=Ss(),a=cr(null),u=cr(null),m=e.dropdownItems.length>0,x=!ut(e.href);bs(()=>{if(!o)return;let l=a.current?.ownerDocument??document,b=w=>{a.current?.contains(w.target)||s(!1)};return l.addEventListener("pointerdown",b),()=>l.removeEventListener("pointerdown",b)},[o]);let d=()=>{s(!1),n?.()};if(!m)return x?G(re,{href:e.href,onClick:d,className:t?"flex min-h-11 items-center font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"whitespace-nowrap opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:t?"flex min-h-11 items-center font-display text-3xl":"whitespace-nowrap opacity-80",children:e.label});let T=G("button",{ref:u,type:"button","aria-label":`${o?"Close":"Open"} ${e.plainLabel} menu`,"aria-expanded":o,"aria-controls":i,onClick:()=>s(l=>!l),className:t?"flex h-11 w-11 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"flex h-8 w-8 shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:G("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",className:`transition-transform ${o?"rotate-180":""}`,children:G("path",{d:"m3 5 4 4 4-4"})})});return t?Vt("div",{ref:a,children:[Vt("div",{className:"flex min-h-11 items-center justify-between gap-3",children:[x?G(re,{href:e.href,onClick:d,className:"min-w-0 flex-1 font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:"min-w-0 flex-1 font-display text-3xl",children:e.label}),T]}),o?G("div",{id:i,className:"mt-3 flex flex-col border-l border-line pl-5",children:e.dropdownItems.map((l,b)=>ut(l.href)?G("span",{className:"flex min-h-11 items-center text-base opacity-80",children:l.label},`${l.href}-${b}`):G(re,{href:l.href,onClick:d,className:"flex min-h-11 items-center text-base opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:l.label},`${l.href}-${b}`))}):null]}):Vt("div",{ref:a,className:"relative flex items-center whitespace-nowrap",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onBlurCapture:l=>{l.currentTarget.contains(l.relatedTarget)||s(!1)},onKeyDown:l=>{l.key==="Escape"&&(s(!1),u.current?.focus())},children:[x?G(re,{href:e.href,onClick:d,onFocus:()=>s(!0),className:"opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:"opacity-80",children:e.label}),T,o?G("div",{id:i,className:`absolute top-full z-[60] w-72 pt-3 text-fg ${r==="end"?"right-0":r==="center"?"left-1/2 -translate-x-1/2":"left-0"}`,children:G("div",{className:"overflow-hidden rounded-lg border border-line bg-bg p-2 shadow-xl",children:e.dropdownItems.map((l,b)=>ut(l.href)?G("span",{className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80",children:l.label},`${l.href}-${b}`):G(re,{href:l.href,onClick:d,className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80 transition-[background,opacity] hover:bg-[var(--card-bg)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:l.label},`${l.href}-${b}`))})}):null]})}import{useEffect as pt,useRef as dr,useState as mt}from"react";var nt=new Map,Cs=64;async function Ts(e){if(!_n())return null;try{let t=await fetch(`${Rn()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function ur(e){let t=nt.get(e);if(t)return t;let n=Ts(e);if(nt.set(e,n),nt.size>Cs){let r=nt.keys().next();r.done||nt.delete(r.value)}return n}import{jsx as pr,jsxs as mr}from"react/jsx-runtime";var vs={small:54,medium:66,large:84},_s=44,ws=202/22,fc=16,gc=140,Rs=.88,As="invert(1)";function Gt({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,onLightSurface:o,reversedSrc:s,inkIsDark:i,size:a="medium",sizePx:u,wordmark:m,siteName:x=Te,fitToContainer:d=!1}){let T=m&&m.trim()?m.trim():x,[l,b]=mt(!1),w=dr(null),U=R=>{w.current=R};pt(()=>{let R=w.current?.ownerDocument??document,F=()=>{b(R.documentElement.getAttribute("data-theme")==="light")};F();let k=new MutationObserver(F);return k.observe(R.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>k.disconnect()},[]);let H=n&&n.trim()?n.trim():null,B=!!H&&wn(H),se=o??(l&&t),f=r&&B&&H&&s!=null?{reversed:s,inkIsDark:i??null}:null,L=f!==null,[S,ie]=mt(null);pt(()=>{if(!r||!H||!B||L){ie(null);return}let R=!1;return ie(null),ur(H).then(F=>{R||ie(F)}),()=>{R=!0}},[r,H,B,L]);let z=f??S,ae=!!z&&z.inkIsDark!==null&&(se?!z.inkIsDark:z.inkIsDark),ye=r&&!!H&&!B&&!se,v=ae&&z?z.reversed:H,W=v?[v]:[],[de,j]=mt(0);pt(()=>{j(0)},[H,ae]);let D=e==="footer"?_s:vs[a],Z=u&&u>0?u:D,ee=Math.round(Z*ws),N=de<W.length?W[de]:null,[xe,Y]=mt(v),pe=N!==null&&N===xe,te=dr(null);pt(()=>{let R=te.current;if(!R||!R.complete)return;if(R.naturalWidth>0||R.naturalHeight>0){Y(N);return}let F=!1;return R.decode().then(()=>!F&&Y(N),()=>!F&&j(k=>k+1)),()=>{F=!0}},[N]);let be=d?`min(${Z}px, calc(100cqi / ${((T.length+1)*Rs).toFixed(2)}))`:`${Z}px`;return mr("span",{ref:U,className:"inline-flex items-center",children:[!pe&&mr("span",{className:"font-display font-bold tracking-[0.18em] whitespace-nowrap",style:{fontSize:be,lineHeight:1},"aria-label":T,children:[T,pr("span",{className:"text-accent",children:"."})]}),N&&pr("img",{ref:te,src:N,alt:T,width:ee,height:Z,className:"shrink-0 object-contain",style:{...pe?{height:`${Z}px`,width:"auto",...d?{maxWidth:"100cqi"}:{}}:{display:"none"},...ye?{filter:As}:{}},onLoad:()=>Y(N),onError:()=>j(R=>R+1)},N)]})}var fr="Menu Item";var xc="Menu",bc="Link a menu in the inspector \u2192",Sc="This menu has no links yet \u2014 add them in Storefront \u2192 Menus.",Ec="This column isn't linked to a menu, so the preview shows placeholder links. Pick a menu above.";function Cc(e){return`\u201C${e}\u201D no longer exists in Storefront \u2192 Menus, so the preview shows placeholder links. Pick another menu.`}var Tc="The menu linked here no longer exists in Storefront \u2192 Menus, so the header shows placeholder links. Pick another menu.";import{jsx as Is}from"react/jsx-runtime";function Bt(){return Is("span",{className:"opacity-50",children:fr})}import{Fragment as ks,jsx as Wt}from"react/jsx-runtime";function gr({className:e=""}){return Wt("sup",{className:`text-accent tracking-normal ${e}`,children:"\xAE"})}function zt(e){if(!e.includes("\xAE"))return e;let t=e.split("\xAE"),n=[];return t.forEach((r,o)=>{r&&n.push(r),o<t.length-1&&n.push(Wt(gr,{},`r${o}`))}),Wt(ks,{children:n})}var Ac=gr;import{Fragment as Ls,jsx as Yt,jsxs as Ps}from"react/jsx-runtime";var hr=Ps(Ls,{children:[Yt("circle",{cx:"9",cy:"20",r:"1.3"}),Yt("circle",{cx:"18",cy:"20",r:"1.3"}),Yt("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});import{Fragment as Ns,jsx as ue,jsxs as Kt}from"react/jsx-runtime";var qt={search:"Search",account:"Account",cart:"Bag"},Xt="whitespace-nowrap";function yr({onClick:e,count:t,asText:n,className:r}){return ue("button",{type:"button",onClick:e,"aria-label":`Open cart, ${t} item${t===1?"":"s"}`,className:`mono-eyebrow-ctl inline-flex items-center gap-1.5 opacity-80 transition-opacity hover:opacity-100 ${r??""}`,children:n?Kt("span",{className:Xt,children:[qt.cart,t>0?` ${t}`:""]}):Kt(Ns,{children:[ue("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:hr}),ue("span",{className:"rounded-lg border border-current px-1.5 font-mono text-[12px]",children:t})]})})}function xr({asText:e,className:t}){return ue(re,{href:"/account","aria-label":"Account",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${t??""}`,children:e?ue("span",{className:Xt,children:qt.account}):Kt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[ue("circle",{cx:"12",cy:"8",r:"3.4"}),ue("path",{d:"M5 20a7 7 0 0 1 14 0"})]})})}function br({onClick:e,asText:t,className:n}){return ue("button",{type:"button",onClick:e,"aria-label":"Search",title:"Search (\u2318K)",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${n??""}`,children:t?ue("span",{className:Xt,children:qt.search}):ue(Dt,{name:"search",size:18,strokeWidth:1.6,rounded:!0})})}import{useEffect as rt,useRef as Us,useState as Tr}from"react";var Hs=new Set(["Hero","HeroSingle","IntroBleed"]),ft={min:56,max:140,default:88},$c={min:0,max:120,step:2,default:28},Uc=`var(--sf-header-h, ${ft.default}px)`,jt="--sf-header-set-h",Zt="--sf-header-h",Sr=`var(${jt}, ${ft.default}px)`,Vc="sf-header-clearance",Gc="sf-sticky-underheader";function Qt(e){return e?.find(t=>t?.type&&t.type!==Xe)??null}function Er(e){let t=Qt(e)?.type;return!t||!Hs.has(t)}function Cr(e){return!Er(e)}function Bc(e){return!!e?.some(t=>t?.type===Xe)}function Wc(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Xe||t?.type===At)}var Os=["auto","shared","own"],Ds="auto",Ms="topSpace",zc="data-top-space";function Fs(e){return Os.includes(e)?e:Ds}function $s(e,t){let n=Fs(e?.props?.[Ms]);return n==="own"?!0:n==="shared"?!1:Er(t)}function Yc(e,t){return $s(e,t)?"own":null}function vr({stickyMode:e,heightPx:t}){let n=Us(null),[r,o]=Tr(!1),[s,i]=Tr(!1);return rt(()=>{let a=n.current?.ownerDocument?.defaultView??window,u=t,m=a.scrollY;function x(){let d=a.scrollY;o(d>10),e==="on_scroll_up"&&(d<=u?i(!1):d>m+4?i(!0):d<m-4&&i(!1)),m=d}return x(),a.addEventListener("scroll",x,{passive:!0}),()=>a.removeEventListener("scroll",x)},[e,t]),rt(()=>{e!=="on_scroll_up"&&i(!1)},[e]),rt(()=>{let a=n.current?.ownerDocument?.documentElement;a&&a.style.setProperty(jt,`${t}px`)},[t]),rt(()=>{let a=n.current,u=a?.ownerDocument,m=u?.defaultView;if(!a||!u||!m)return;let x="",d=l=>{let b=`${Math.round(l)}px`;b!==x&&(x=b,u.documentElement.style.setProperty(Zt,b),u.body?.style.setProperty(Zt,b))};if(typeof m.ResizeObserver!="function"){d(a.getBoundingClientRect().height);return}let T=new m.ResizeObserver(l=>{let b=l[0]?.borderBoxSize?.[0];d(b?b.blockSize:a.getBoundingClientRect().height)});return T.observe(a),()=>T.disconnect()},[]),rt(()=>{let a=n.current?.ownerDocument?.documentElement;a&&a.setAttribute("data-header-sticky",e)},[e]),{headerRef:n,scrolled:r,navHidden:s}}import{useEffect as Ti,useRef as vi,useState as Ur}from"react";var on="storefront-theme",Zc="sf:theme-mode",Qc="sf:theme-switch",Jc="hide",sn="light";function Vs(e){return e>=7&&e<18}function _r(e){let{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?Vs(o)?"light":"dark":t==="light"?"light":"dark"}var We={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Gs=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],yt={selected:0,themes:Gs};function wr(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...yt}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function Jt(e,t,n){let r=ht(e),o=ht(t);if(r===null||o===null)return e;let s=i=>Math.max(0,Math.min(255,Math.round(i))).toString(16).padStart(2,"0");return`#${r.map((i,a)=>s(i+(o[a]-i)*n)).join("")}`}var Bs={light:"#ffffff",dark:"#0a0a0a"},eu=["light","dark"];function tu(e,t){let n=Bs[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:Jt(e,r,.1),line:Jt(e,r,.22),muted:Jt(n,e,.35),brandInk:t}}function xt(e){let t=wr(e);return t.themes[t.selected]}function Rr(e){return{text:e.text,accent:e.accent,background:e.background||We.background,surface:e.surface||We.surface,line:e.line||We.line,muted:e.muted||We.muted}}function ht(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let n=t[1].length===3?[...t[1]].map(i=>i+i).join(""):t[1],[r,o,s]=[0,2,4].map(i=>parseInt(n.slice(i,i+2),16));return[r,o,s]}function rn(e){let t=ht(e);if(t===null)return null;let[n,r,o]=t.map(s=>{let i=s/255;return i<=.04045?i/12.92:((i+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}var Ws=.4,zs=4.5,Ys=3;function Ks(e,t){let n=rn(e),r=rn(t);if(n===null||r===null)return null;let[o,s]=n>=r?[n,r]:[r,n];return(o+.05)/(s+.05)}var nu={good:"Good","large-only":"Large text only",hard:"Hard to read"};function ru(e){return e>=zs?"good":e>=Ys?"large-only":"hard"}var en=["#000000","#ffffff"];function bt(e){let t=en[0],n=-1;for(let r of en){let o=Ks(e,r);if(o===null)return en[0];o>n&&(n=o,t=r)}return t}var qs=[.25,.4,.55];function ou(e){let t=ht(e);return t===null?[]:qs.map(n=>"#"+t.map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function su(e){let t=xt(e),n={"--theme-fg":t.text},r=rn(t.text);return(r===null||r>=Ws)&&(n["--overlay-fg"]=t.text),n}var Xs=82;function an(e){return`color-mix(in srgb, ${e} ${Xs}%, #000)`}function iu(e){let t=xt(e);return{"--theme-accent":t.accent,"--theme-accent-2":an(t.accent),"--theme-accent-ink":bt(t.accent)}}function Ar(e){let t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function au(e){let t=xt(e),n=Ar(t),r=Ir(t);if(n===null&&r===null)return{};let o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=an(n)),o["--theme-btn-ink"]=r??bt(n),o}function Ir(e){let t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function lu(e,t){return Ir(e)??bt(Ar(e)??t)}function cu(e){let t={};return wr(e).themes.forEach((n,r)=>{let o=Rr(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=an(o.accent),t[`--theme-preset-${r}-accent-ink`]=bt(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}var kr=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Lr(e){let t=Rr(xt(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==We.surface||t.line!==We.line)&&(r["--theme-surface-2"]=n),r}var js=["heading","body","label"];function uu(e){if(!e)return null;for(let t of js)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var Pr=["headingLarge","headingMedium","headingSmall","accent","body","label"];var ln={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},Zs=8,Qs=200,du=1;function Js(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=Zs&&t<=Qs?t:null}function ei(e){let t={};for(let n of Pr)t[n]=Js(e?.[n]);return t}function pu(e){let t=ei(e),n={};for(let r of Pr){let o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}var ti=["square","small","large"],ni="small";function mu(e){return ti.includes(e??"")?e:ni}var ri=0,oi=40,fu={square:0,small:null,large:16},si={"--sf-card-radius":1,"--sf-button-radius":.5,"--radius":.5,"--radius-xs":.25,"--radius-sm":.5,"--radius-md":.75,"--radius-lg":1,"--radius-xl":1.25,"--radius-2xl":1.5,"--radius-3xl":2,"--radius-4xl":2.5};function ii(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(oi,Math.max(ri,Math.round(t))):null}function gu(e){let t=ii(e);return t===null?{}:Object.fromEntries(Object.entries(si).map(([n,r])=>{let o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}var ai=["none","soft","lifted"],li="soft",Nr="none",ci=["tight","normal","roomy"],ui="normal",St="normal",di=["none","lift","highlight"],pi="lift",mi="highlight",Hr="#141416";function Or(e){return ai.includes(e??"")?e:li}function fi(e){return ci.includes(e??"")?e:ui}function Dr(e){return di.includes(e??"")?e:pi}function gi(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():Hr}function hu(e){let t=Or(e);return t===Nr?void 0:t}function yu(e){let t=fi(e);return t===St?void 0:t}function xu(e){let t=Dr(e);return t===mi?void 0:t}function bu(e,t,n){let r=gi(t);return r===Hr?{}:Or(e)!==Nr||Dr(n)==="lift"?{"--sf-shadow-color":r}:{}}var hi=["normal","tight","compressed"],ot="normal";function Mr(e){return hi.includes(e??"")?e:ot}function Su(e){let t=Mr(e);return t===ot?void 0:t}function Eu(e){switch(Mr(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var cn={case:"authored",weight:null,weightStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},tn=100,nn=900,yi=24,xi=200;function gt(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function un(e){let t=gt(e?.weight,tn,nn),n=e?.case==="sentence"?"sentence":"authored",r=s=>s==null?t:gt(s,tn,nn),o=s=>s==="sentence"?"sentence":s==="authored"?"authored":n;return{case:n,weight:t,weightStrong:gt(e?.weightStrong,tn,nn),maxPx:gt(e?.maxPx,yi,xi),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function Cu(e){let t=un(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function Tu(e){return un({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function vu(e){let t=un(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}var ze="data-theme",Fr="light";function dn(e){return e.getAttribute(ze)===Fr?"light":"dark"}function pn(e,t){return dn(e)===t?!1:(t==="light"?e.setAttribute(ze,Fr):e.removeAttribute(ze),!0)}function bi(e){return Rt(e).getItem(on)}function $r(e,t){Rt(e).setItem(on,t)}function Si(e,t,n=new Date().getHours()){return _r({mode:t.mode,override:bi(e),switchShown:t.switchShown,hour:n})}function Au(e,t){let n=e.documentElement;if(!n)return()=>{};let r=()=>pn(n,Si(e,t));r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[ze]}),()=>s.disconnect()}var Ei="style";function Ci(e,t){let n=Lr(t),r=!1;for(let o of kr){let s=n[o]??"";e.style.getPropertyValue(o)!==s&&(s?e.style.setProperty(o,s):e.style.removeProperty(o),r=!0)}return r}function Iu(e,t){let n=e.body;if(!n)return()=>{};let r=()=>Ci(n,t);r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[Ei]}),()=>s.disconnect()}import{jsx as Vr}from"react/jsx-runtime";function mn(){let[e,t]=Ur("dark"),[n,r]=Ur(!1),o=vi(null),s=()=>o.current?.ownerDocument??document;Ti(()=>{let a=s().documentElement,u=()=>t(dn(a));u(),r(!0);let m=new MutationObserver(u);return m.observe(a,{attributes:!0,attributeFilter:[ze]}),()=>m.disconnect()},[]);function i(){let a=s(),u=e==="dark"?"light":"dark";t(u),pn(a.documentElement,u),$r(a,u)}return Vr("button",{ref:o,type:"button",onClick:i,"aria-label":`Switch to ${e==="dark"?"light":"dark"} theme`,"aria-pressed":e==="light",className:"relative inline-flex h-5 w-9 items-center rounded-full border border-line bg-surface-2 p-0.5",children:Vr("span",{className:"block h-3.5 w-3.5 rounded-full bg-accent transition-transform duration-200 ease-out",style:{transform:n&&e==="light"?"translateX(16px)":"translateX(0)"}})})}function Gr({editorPreview:e,hasPreviewSettings:t,hasInitialSettings:n}){return!e&&!t&&!n}var he={min:1e3,max:2e3,step:50,default:1600};function Br(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function Du(e,t){if(e!==!1)return null;let n=typeof t=="number"?t:he.default;return Br(n)}var Wr="--sf-site-width",Et=`var(${Wr},${he.default}px)`,Mu=`max-w-[${Et}]`,Fu=`max-w-[${he.default}px]`;function _i(e){return typeof e!="number"||!Number.isFinite(e)?he.default:Math.round(Math.min(Math.max(e,he.min),he.max))}function $u(e){let t=_i(e);return t===he.default?{}:{[Wr]:`${t}px`}}var st={min:0,max:80,step:4,default:40},zr="--sf-site-gutter",oe=`var(${zr},${st.default}px)`,wi=`px-[${oe}]`;var ve={md:`min(24px,${oe})`,sm:`min(20px,${oe})`,frame:`min(24px,${oe})`,tabs:`min(16px,${oe})`},Uu=[[`max-[1100px]:px-[${ve.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${ve.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${ve.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${ve.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${ve.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${ve.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${ve.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${ve.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${oe}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${oe})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${oe})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${oe})]`,"max-[720px]:-mx-5"],[`-mx-[${oe}]`,"-mx-10"],[wi,"px-10"]];function Ri(e){return typeof e!="number"||!Number.isFinite(e)?st.default:Math.round(Math.min(Math.max(e,st.min),st.max))}function Vu(e){let t=Ri(e);return t===st.default?{}:{[zr]:`${t}px`}}var Yr=`min(var(--sf-page-cap,${Et}),${Et})`,Gu=`max-w-[${Yr}]`,Bu=`max-w-[min(var(--sf-page-cap,${he.default}px),${he.default}px)]`,Kr="--sf-hero-cap",Ai=`var(${Kr},none)`,Wu=`max-w-[${Ai}]`,fn="--sf-hero-bleed-m",gn="--sf-hero-bleed-w",zu=`var(${fn},calc(50% - 50vw))`,Yu=`var(${gn},100vw)`,Ku=`mx-[var(${fn},calc(50%_-_50vw))]`,qu=`w-[var(${gn},100vw)]`,Ii="--sf-hero-chrome-x",ki="--sf-hero-chrome-cap";function Xu(e){return e===!0?{[Kr]:Yr,[fn]:"auto",[gn]:"100%",[Ii]:"24px",[ki]:"none"}:{}}var hn=`calc(${Et} - ${oe}*2)`,ju=`max-w-[${hn.replace(/ /g,"_")}]`;var Li="--sf-chrome-cap",Pi=`var(${Li},${hn})`,Zu="data-page-width";function Qu(e){return e==="full"?"full":null}function qr(e){return e==="full"?null:Br(e==="content"?hn:Pi)}function Xr(e){if(e==="full")return"full";if(e==="content")return"content"}var Ni="sf-section-accent",ed="Color",td=new Set(["CategoryBar","DocTabs"]),nd=new Set(["Flex"]),Hi=0;function Oi(e){return e===-1?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Hi}function rd(e){return e??-1}function yn(e){let t=`--theme-preset-${e}`;return{"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`,"--sf-sec-bg":`var(${t}-bg, var(--theme-bg))`,"--sf-sec-fg":`var(${t}-fg, var(--theme-fg))`,"--sf-sec-surface":`var(${t}-surface, var(--theme-surface))`,"--sf-sec-surface-2":`var(${t}-surface-2, var(--theme-surface-2))`,"--sf-sec-line":`var(${t}-line, var(--theme-line))`,"--sf-sec-muted":`var(${t}-muted, var(--theme-muted))`}}function od(e){let t=Oi(e.sectionAccent);return t===null?null:{className:Ni,style:yn(t)}}var ad=-1,Mi="sf-header-theme";function Fi(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function jr(e){let t=Fi(e);return t===null?null:{className:Mi,style:yn(t)}}function Zr(e,t,n){return e.some(o=>(typeof o=="object"?o.value:o)===n)?n:t}var $i="overlay",Ui=[{label:"Copy over image",value:"overlay"},{label:"Copy above image",value:"stacked"}];function Qr(e){return Zr(Ui,$i,e)}var dd={desktop:40,mobile:45,min:20,max:80,step:5};function pd(e,t){return`${typeof e=="number"?e:t}%`}var Jr="data-lead-ink",eo="data-header-ink";var Vi="auto";function Gi(e){return e.type==="IntroBleed"?Qr(e.props?.layout)!=="stacked":!0}function hd(e){let t=Qt(e);return t&&Cr(e)&&Gi(t)?"light":null}function to(e){return e==="light"||e==="dark"?e:Vi}import{Fragment as vt,jsx as _,jsxs as I}from"react/jsx-runtime";var no={stacked:{grid:"hidden min-[1501px]:grid",flex:"hidden min-[1501px]:flex"},inline:{grid:"hidden min-[801px]:grid",flex:"hidden min-[801px]:flex"}},Wi=Array.from({length:6},()=>({href:"#",label:_(Bt,{})}));function xn({previewSettings:e,initialSettings:t,editorPreview:n,showThemeToggle:r,wordmark:o,hideLogo:s,hideMenu:i,siteName:a,commerceEnabled:u=!0}={}){let m=rr(),[x,d]=Tt(!1);Ct(()=>{let p=fe.current?.ownerDocument??document,C=()=>d(p.querySelector(`[${Jr}="light"]`)!=null);C();let $e=requestAnimationFrame(C);return()=>cancelAnimationFrame($e)},[m]);let T=m.startsWith("/wheels/")&&m!=="/wheels",[l,b]=Tt(!1),{open:w,totals:U}=Zn(),{open:H}=sr(),[B,se]=Tt(!1),[f,L]=Tt(t??null),S=e??(f?{logoUrl:f.logoUrl,reverseLogo:f.reverseLogo,logoReversed:f.logoReversed,logoInkIsDark:f.logoInkIsDark,logoPosition:f.logoPosition,logoSize:f.logoSize,logoSizePx:f.logoSizePx,menuItems:(f.menuItems??[]).map(p=>({label:p.label,url:p.url,dropdown_menu:null,dropdown_items:p.dropdownItems??[]})),menuSplit:f.menuSplit??3,menuPosition:f.menuPosition,menuRow:f.menuRow,menuGapPx:f.menuGapPx??null,searchEnabled:f.searchEnabled,searchPosition:f.searchPosition,searchRow:f.searchRow,countrySelectorEnabled:f.countrySelectorEnabled,countryUrls:f.countryUrls,accountEnabled:f.accountEnabled,cartEnabled:f.cartEnabled,utilStyle:f.utilStyle,navTextCase:f.navTextCase,lightReverseText:f.lightReverseText,topTextColor:f.topTextColor,transparentTop:f.transparentTop,surface:f.surface,theme:f.theme,width:f.width,heightPx:f.heightPx,sticky:f.sticky}:null),ie=s?null:S?.logoUrl??null,z=S?.reverseLogo??!1,ae=S?.logoReversed??null,ye=S?.logoInkIsDark??null,v=S?.logoPosition??"center",W=S?.logoSize??"medium",de=S?.logoSizePx??null,j=Math.min(Math.max(S?.menuSplit??3,1),4),D=(S?.menuPosition??"left")==="center",Z=(S?.menuPosition??"left")==="beside",ee=(S?.menuRow??"top")==="inline",N=S?.menuGapPx??null,xe=N!=null?{gap:`${N}px`}:void 0,Y=ee?no.inline:no.stacked,pe=S?.searchEnabled??!1,te=S?.searchPosition??"right",be=S?.countrySelectorEnabled??!0,M=S?.accountEnabled??!0,R=S?.cartEnabled??!0,F=(S?.utilStyle??"icon")==="text",k=`mono-eyebrow${(S?.navTextCase??"uppercase")==="capitalised"?" mono-eyebrow-plain":""}`,_e=S?.countryUrls??{},we=Xr(S?.width),Ne=qr(we)??void 0,He=S?.heightPx??ft.default,Re=S?.sticky??"always",me=to(S?.topTextColor),Q=jr(S?.theme),Se=Object.keys(_e),Oe=lr(Se.length?Se:void 0),$=be?_(Ut,{countries:Se.length?Se:void 0,urls:e?void 0:_e}):null,{headerRef:fe,scrolled:Ae,navHidden:De}=vr({stickyMode:Re,heightPx:He});Ct(()=>{let p=fe.current?.ownerDocument??document,C=()=>{se(p.documentElement.getAttribute("data-theme")==="light")};C();let $e=new MutationObserver(C);return $e.observe(p.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>$e.disconnect()},[]);let ge=r??!1?_(mn,{}):null;Ct(()=>{if(!Gr({editorPreview:!!n,hasPreviewSettings:!!e,hasInitialSettings:!!t}))return;let p=!1;return J.getHeaderSettings().then(C=>!p&&L(C)).catch(C=>{console.warn("[header] settings fetch failed; using built-in defaults",C)}),()=>{p=!0}},[n,e,t]);let Ee=Ae||T,c=me==="auto"?x:me==="light",h=Ee||!c,E=Ee?B:B&&!c,y=me==="auto"?null:{[eo]:me};Ct(()=>{if(!l)return;let p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[l]);let A=(p,C,$e="start")=>_(dt,{item:p,dropdownAlign:$e},C),le=!i&&(S?.menuItems?.length??0)>0,Ie=!!n||!!e,V=le?S.menuItems.map(p=>({href:p.url||"",label:zt(p.label),plainLabel:p.label,dropdownItems:(p.dropdown_items??[]).map(C=>({href:C.url||"",label:zt(C.label),plainLabel:C.label}))})):Ie?Wi.map(p=>({...p,plainLabel:"Menu item",dropdownItems:[]})):[],Me=v==="center"?V.slice(0,j):v==="right"?V:[],Fe=v==="center"?V.slice(j):v==="left"?V:[],g=pe?_(br,{onClick:Ie?void 0:H,asText:F}):null,ke=u&&M?_(xr,{asText:F}):null,Ke=p=>u&&R?_(yr,{onClick:w,count:U.sets,asText:F,className:p}):null,P=I(vt,{children:[te==="left"?g:null,$,ge,ke,Ke(),te==="right"?g:null]}),ce=(p,C=!1)=>_(re,{href:"/","aria-label":a?`${a} home`:"Home",className:p,children:_(Gt,{variant:"header",scrolled:h,src:ie,reverse:z,onLightSurface:E,reversedSrc:ae,inkIsDark:ye,size:W,sizePx:de,wordmark:o,siteName:a,fitToContainer:C})}),ne=ce("inline-flex shrink-0 items-center justify-center"),it="flex min-w-0 flex-1 items-center overflow-x-clip [container-type:inline-size]";return I(vt,{children:[_("header",{ref:fe,"data-scrolled":Ae||void 0,...y,className:["sf-site-header",...Q?[Q.className]:[],Re==="none"?"absolute":"fixed","inset-x-0 top-0 z-50","flex items-center","px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",Ee?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...Q?Q.style:null,minHeight:Sr,...De?{transform:"translateY(-100%)"}:null,...Ee?{background:!B&&T?"var(--section-bg)":"var(--bg)",color:"var(--fg)"}:{color:"var(--sf-header-overlay-fg)"}},children:I("div",{className:"w-full",style:Ne,children:[D?I("div",{className:`${Y.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[v==="right"?_("nav",{className:`${k} flex items-center gap-7`,children:P}):_("div",{className:"flex items-center",children:ne}),_("nav",{className:`${k} flex items-center justify-center gap-7`,children:V.map((p,C)=>A(p,`${p.href}-${C}`,"center"))}),v==="right"?_("div",{className:"flex items-center justify-end",children:ne}):_("nav",{className:`${k} flex items-center justify-end gap-7`,children:P})]}):v==="center"?I("div",{className:`${Y.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[_("nav",{className:`${k} flex items-center gap-7`,children:Me.map((p,C)=>A(p,`${p.href}-${C}`))}),ne,I("nav",{className:`${k} flex items-center justify-end gap-7`,children:[Fe.map((p,C)=>A(p,`${p.href}-${C}`,"end")),P]})]}):Z?I("div",{className:`${Y.flex} items-center justify-between gap-8`,children:[I("div",{className:"flex items-center gap-7",style:xe,children:[ne,_("nav",{className:`${k} flex items-center gap-7`,children:V.map((p,C)=>A(p,`${p.href}-${C}`))})]}),_("nav",{className:`${k} flex items-center justify-end gap-7`,children:P})]}):_("div",{className:`${Y.flex} items-center justify-between gap-8`,children:v==="right"?I(vt,{children:[I("nav",{className:`${k} flex items-center gap-7`,children:[V.map((p,C)=>A(p,`${p.href}-${C}`)),P]}),ne]}):I(vt,{children:[ne,I("nav",{className:`${k} flex items-center gap-7`,children:[V.map((p,C)=>A(p,`${p.href}-${C}`)),P]})]})}),!ee&&I("div",{className:"hidden min-[801px]:max-[1500px]:flex flex-col gap-3",children:[I("div",{className:"flex items-center justify-between",children:[ce(it,!0),I("div",{className:`${k} flex shrink-0 items-center gap-5`,children:[g,$,ge,ke,Ke()]})]}),_("nav",{className:`${k} flex items-center gap-6 border-t border-line/60 pt-2.5`,children:V.map((p,C)=>A(p,`${p.href}-${C}`))})]}),I("div",{className:"hidden max-[800px]:flex items-center justify-between",children:[ce(it,!0),I("div",{className:"flex shrink-0 items-center gap-4",children:[g,ke,Ke(k),I("button",{type:"button","aria-label":l?"Close menu":"Open menu","aria-expanded":l,onClick:()=>b(p=>!p),className:"flex h-11 w-11 flex-col items-center justify-center gap-1.5",children:[_("span",{className:`block h-px w-5 bg-current transition-transform ${l?"translate-y-[3px] rotate-45":""}`}),_("span",{className:`block h-px w-5 bg-current transition-transform ${l?"opacity-0":""}`}),_("span",{className:`block h-px w-5 bg-current transition-transform ${l?"-translate-y-[3px] -rotate-45":""}`})]})]})]})]})}),l&&I("div",{className:"fixed inset-x-0 top-0 bottom-0 z-40 hidden overflow-y-auto max-[800px]:flex max-[800px]:flex-col max-[800px]:gap-7 max-[800px]:bg-bg max-[800px]:px-6 max-[800px]:pt-24 max-[800px]:pb-10",children:[V.map((p,C)=>_(dt,{item:p,mobile:!0,onNavigate:()=>b(!1)},`${p.href}-${C}`)),I("div",{className:"mt-auto flex flex-col gap-4 border-t border-line pt-6",children:[u&&M&&I("div",{className:"flex items-center justify-between",children:[_("span",{className:"mono-eyebrow text-fg-dim",children:"Account"}),_(re,{href:"/account",onClick:()=>b(!1),className:"mono-eyebrow underline",children:"Your account"})]}),$&&Oe&&I("div",{className:"flex items-center justify-between",children:[_("span",{className:"mono-eyebrow text-fg-dim",children:"Region"}),$]}),ge&&I("div",{className:"flex items-center justify-between",children:[_("span",{className:"mono-eyebrow text-fg-dim",children:"Theme"}),ge]})]})]})]})}import{createContext as oo,useContext as bn}from"react";import{createContext as zi}from"react";var ro=zi(null);var Yi=oo(null),Sn=oo({logo:null,placeholder:!1,wordmark:null});function zd(){let e=bn(ro),t=bn(Yi),n=bn(Sn),r=!e&&n.placeholder,o=e?e.logoUrl:n.logo?.logoUrl??t?.logoUrl??null;return{src:r?null:o,reversedSrc:e?e.logoReversed:n.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:n.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:n.wordmark,siteName:e?.siteName??t?.siteName}}var En={accent:"#2563eb",accentTint:"#eff6ff",accentText:"#1d4ed8",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",fieldBg:"#ffffff",inputBorder:"#d1d5db",text:"#111827",text2:"#374151",muted:"#6b7280",line:"#e5e7eb",chipBg:"#f3f4f6",chipFg:"#6b7280",panelRadius:12,rowRadius:8,panelShadow:"0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06)",topbarShadow:"0 1px 3px rgba(0,0,0,.06)",panelGap:10,leftWidth:288,rightWidth:308,topbarHeight:52,labelFont:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"};import{createContext as Ki,useCallback as io,useContext as qi,useRef as Xi,useState as ji}from"react";var Cn=0;function so(e){Cn+=1;try{return e()}finally{Cn-=1}}function qd(){return Cn>0}import{jsx as Zi}from"react/jsx-runtime";function Tn(){let e=Xi(()=>{}),t=io((...r)=>so(()=>e.current(...r)),[]),n=io(r=>{e.current=r},[]);return{select:t,setSelectHandler:n}}function Qd(e){let t=`set${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=(i,a,u,m)=>({[e]:i,[t]:a,select:u,setSelectHandler:m}),r=Ki(n(null,()=>{},()=>{},()=>{}));function o({children:i}){let[a,u]=ji(null),{select:m,setSelectHandler:x}=Tn();return Zi(r.Provider,{value:n(a,u,m,x),children:i})}return{Provider:o,useSelection:()=>qi(r)}}var vn=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],Le=new Map(vn.map(e=>[e.key,e])),Qi={sans:"Sans",serif:"Serif",mono:"Mono"};function tp(){return Object.keys(Qi).map(e=>[e,vn.filter(t=>t.category===e)]).filter(([,e])=>e.length>0)}function np(e){return Le.get(e)?.italicLoaded??!1}function rp(e){return Le.get(e)}var ao=["heading","heading2","heading3","body","accent","label"],op={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Accent",label:"Labels"},Ji=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],ea=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,sp={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},ta={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function ip(e){let t=e?ea.exec(e):null;return t?ta[t[1]]??null:na(e)}function na(e){if(!e)return null;let t=e.split(/\s+/).filter(n=>!n.slice(0,n.lastIndexOf(":")+1).includes("&")).map(n=>n.slice(n.lastIndexOf(":")+1));for(let[n,r]of Ji)if(t.includes(n))return r;return null}var ra=["heading","heading2","heading3"];function ap(e){return ra.includes(e)}var Pe={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function oa(e){let t=n=>{let r=e?.[n];if(r&&Le.has(r))return r;if(n==="heading2"||n==="heading3"){let o=e?.heading;return o&&Le.has(o)?o:Pe.heading}return Pe[n]};return Object.fromEntries(ao.map(n=>[n,t(n)]))}function sa(e,t){return Le.get(e[t])??Le.get(Pe[t])}function Ye(e,t){return`var(${sa(e,t).cssVar})`}var lp=[...new Set(ao.map(e=>Le.get(Pe[e]).cssVar))],cp=[...new Set(vn.map(e=>e.cssVar))];function up(e){let t=oa(e);return{"--font-role-heading":Ye(t,"heading"),"--font-role-heading2":Ye(t,"heading2"),"--font-role-heading3":Ye(t,"heading3"),"--font-role-body":Ye(t,"body"),"--font-role-accent":Ye(t,"accent"),"--font-role-label":Ye(t,"label"),fontFamily:"var(--font-role-body)"}}import{jsx as wt,jsxs as da}from"react/jsx-runtime";var co=ia({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:sn,setThemeMode:()=>{},themeSwitchShown:!1,setThemeSwitchShown:()=>{},theme:yt,setTheme:()=>{},fonts:Pe,setFonts:()=>{},sizes:ln,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:St,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:ot,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:cn,setHeadingTypography:()=>{},heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function Tp({children:e,websiteName:t=null,templateChrome:n=!1,templateName:r=null,chromePlaceholder:o=!1,themeMode:s=sn,onThemeModeChange:i,themeSwitchShown:a=!1,onThemeSwitchShownChange:u,theme:m=yt,onThemeChange:x,fonts:d=Pe,onFontsChange:T,sizes:l=ln,onSizesChange:b,cornerRadiusPx:w=null,onCornerRadiusPxChange:U,cardShadow:H=null,onCardShadowChange:B,shadowColor:se=null,onShadowColorChange:f,cardGap:L=St,onCardGapChange:S,hoverEffect:ie=null,onHoverEffectChange:z,headingCompression:ae=ot,onHeadingCompressionChange:ye,siteWidth:v=null,onSiteWidthChange:W,siteGutter:de=null,blockGap:j=null,onSiteGutterChange:D,onBlockGapChange:Z,headingTypography:ee=cn,onHeadingTypographyChange:N,heroBackgroundFollowsWidth:xe=null,onHeroBackgroundFollowsWidthChange:Y,photographyGrayscale:pe=null,onPhotographyGrayscaleChange:te,themeFromDocument:be=!1}){let[M,R]=lo(null),F=O(g=>R(ke=>ke??g),[]),[k,_e]=lo(!1),we=O(g=>i?.(g),[i]),Ne=O(g=>u?.(g),[u]),He=O(g=>x?.(g),[x]),Re=O(g=>T?.(g),[T]),me=O(g=>b?.(g),[b]),Q=O(g=>W?.(g),[W]),Se=O(g=>D?.(g),[D]),Oe=O(g=>Z?.(g),[Z]),$=O(g=>Y?.(g),[Y]),fe=O(g=>te?.(g),[te]),Ae=O(g=>U?.(g),[U]),De=O(g=>B?.(g),[B]),ge=O(g=>f?.(g),[f]),Ee=O(g=>S?.(g),[S]),c=O(g=>z?.(g),[z]),h=O(g=>ye?.(g),[ye]),E=O(g=>N?.(g),[N]),{select:y,setSelectHandler:A}=Tn(),le=M?.logoUrl,Ie=M?.logoReversed,V=M?.logoInkIsDark,Me=M!==null,Fe=la(()=>({logo:Me?{logoUrl:le,logoReversed:Ie,logoInkIsDark:V}:null,placeholder:n||o,wordmark:n?r:t}),[Me,le,Ie,V,n,o,r,t]);return wt(Sn.Provider,{value:Fe,children:wt(co.Provider,{value:{settings:M,setSettings:R,primeSettings:F,websiteName:t,templateChrome:n,templateName:r,chromePlaceholder:o,themeMode:s,setThemeMode:we,themeSwitchShown:a,setThemeSwitchShown:Ne,theme:m,setTheme:He,fonts:d,setFonts:Re,sizes:l,setSizes:me,cornerRadiusPx:w,setCornerRadiusPx:Ae,cardShadow:H,setCardShadow:De,shadowColor:se,setShadowColor:ge,cardGap:L,setCardGap:Ee,hoverEffect:ie,setHoverEffect:c,headingCompression:ae,setHeadingCompression:h,siteWidth:v,setSiteWidth:Q,siteGutter:de,blockGap:j,setSiteGutter:Se,setBlockGap:Oe,headingTypography:ee,setHeadingTypography:E,heroBackgroundFollowsWidth:xe,setHeroBackgroundFollowsWidth:$,photographyGrayscale:pe,setPhotographyGrayscale:fe,themeFromDocument:be,selected:k,setSelected:_e,select:y,setSelectHandler:A},children:e})})}var ca=()=>aa(co),ua=`
2
+ .sf-preview-header-pick header { cursor: pointer; }
3
+ .sf-preview-header-pick header:hover {
4
+ outline: 2px solid color-mix(in srgb, ${En.accent} 45%, transparent);
5
+ outline-offset: -2px;
6
+ }
7
+ .sf-preview-header-pick[data-selected] header {
8
+ outline: 2px solid ${En.accent};
9
+ outline-offset: -2px;
10
+ }
11
+ `;function vp(){let{settings:e,selected:t,select:n,websiteName:r,templateChrome:o,templateName:s,chromePlaceholder:i,themeSwitchShown:a}=ca(),u=o?s?.trim()||"Template":r?.trim()||Te,m=o||i;return da("div",{className:"sf-preview-header-pick sf-theme-surfaces","data-selected":t||void 0,onClick:x=>{x.stopPropagation(),n()},children:[wt("style",{children:ua}),wt(xn,{previewSettings:e??void 0,editorPreview:!0,showThemeToggle:a,wordmark:u,hideLogo:m,hideMenu:m})]})}import{forwardRef as pa}from"react";import{jsx as ga}from"react/jsx-runtime";var ma={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"},fa=pa(function({src:t,width:n,height:r,fill:o,priority:s,loading:i,style:a,quality:u,placeholder:m,blurDataURL:x,unoptimized:d,loader:T,overrideSrc:l,...b},w){let U=l??(typeof t=="string"?t:t.src);return ga("img",{ref:w,src:U,width:o?void 0:n,height:o?void 0:r,loading:s?"eager":i??"lazy",fetchPriority:s?"high":void 0,decoding:"async",style:o?{...ma,...a}:{color:"transparent",...a},...b})}),Ap=fa;function Ip(e){return{props:{src:e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),sizes:e.sizes}}}var Pp="#c9a461",uo=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],Np={name:"",color:"var(--fg)",family:"silver",src:""};function ha(e,t){let n=r=>{let o=uo.findIndex(s=>s.f===r);return o===-1?uo.length:o};return n(e)-n(t)||e.localeCompare(t)}function Hp(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(ha)}function Dp(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}export{re as a,Ap as b,Ip as c,vn as d,Qi as e,tp as f,np as g,rp as h,ao as i,op as j,sp as k,ip as l,na as m,ap as n,Pe as o,oa as p,up as q,zt as r,Ac as s,on as t,Zc as u,Qc as v,Jc as w,sn as x,Gs as y,wr as z,eu as A,tu as B,xt as C,Rr as D,Ks as E,nu as F,ru as G,ou as H,su as I,iu as J,Ar as K,au as L,Ir as M,lu as N,cu as O,Lr as P,uu as Q,ln as R,Zs as S,Qs as T,du as U,ei as V,pu as W,mu as X,ri as Y,oi as Z,fu as _,ii as $,gu as aa,ai as ba,li as ca,Nr as da,St as ea,di as fa,pi as ga,mi as ha,Hr as ia,Or as ja,fi as ka,Dr as la,gi as ma,hu as na,yu as oa,xu as pa,bu as qa,ot as ra,Mr as sa,Su as ta,Eu as ua,cn as va,tn as wa,nn as xa,yi as ya,xi as za,un as Aa,Cu as Ba,Tu as Ca,vu as Da,kn as Ea,po as Fa,ya as Ga,mo as Ha,xa as Ia,ba as Ja,Xe as Ka,At as La,fo as Ma,go as Na,Sa as Oa,Ea as Pa,ed as Qa,td as Ra,nd as Sa,Oi as Ta,rd as Ua,od as Va,he as Wa,Br as Xa,Du as Ya,Et as Za,_i as _a,$u as $a,st as ab,oe as bb,Ri as cb,Vu as db,Yr as eb,Kr as fb,Ii as gb,ki as hb,Xu as ib,Zu as jb,Qu as kb,qr as lb,Xr as mb,Pn as nb,It as ob,Ta as pb,va as qb,_a as rb,wa as sb,ho as tb,yo as ub,Ra as vb,Aa as wb,kt as xb,Lt as yb,je as zb,at as Ab,_o as Bb,Nt as Cb,Wa as Db,za as Eb,Ro as Fb,Ya as Gb,Ka as Hb,Ao as Ib,qa as Jb,ko as Kb,Xa as Lb,ja as Mb,Zr as Nb,Na as Ob,Qe as Pb,Ma as Qb,Fa as Rb,$a as Sb,Ua as Tb,Vn as Ub,nl as Vb,rl as Wb,ol as Xb,lt as Yb,Ot as Zb,gl as _b,Zn as $b,Pp as ac,uo as bc,Np as cc,ha as dc,Hp as ec,ft as fc,$c as gc,Uc as hc,Sr as ic,Vc as jc,Gc as kc,Bc as lc,Wc as mc,Ds as nc,zc as oc,$s as pc,Yc as qc,rr as rc,Yl as sc,sr as tc,lr as uc,Ut as vc,ut as wc,Te as xc,vs as yc,_s as zc,fc as Ac,gc as Bc,Gt as Cc,xc as Dc,bc as Ec,Sc as Fc,Ec as Gc,Cc as Hc,Tc as Ic,Bt as Jc,hr as Kc,Dt as Lc,qt as Mc,yr as Nc,br as Oc,vr as Pc,Au as Qc,Iu as Rc,ad as Sc,$i as Tc,Ui as Uc,Qr as Vc,dd as Wc,pd as Xc,Jr as Yc,eo as Zc,hd as _c,to as $c,ro as ad,zd as bd,En as cd,tr as dd,Qo as ed,ct as fd,nr as gd,Al as hd,Il as id,es as jd,Ml as kd,ns as ld,$l as md,qd as nd,Tn as od,Qd as pd,Tp as qd,ca as rd,vp as sd,Dp as td};
@@ -0,0 +1 @@
1
+ import{wj as l,yj as p}from"./chunk-QVG6K5WY.js";import{Fragment as r,useState as d}from"react";import{Fragment as b,jsx as s,jsxs as o}from"react/jsx-runtime";function g({choices:m,onPick:c,open:i,onToggle:u}){let[f,a]=d(!1),n=i??f;return o(b,{children:[o("button",{type:"button",className:"sf-add-card","aria-expanded":n,onClick:u??(()=>a(e=>!e)),children:[s("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add block"]}),n&&s("div",{className:"sf-blockmenu",role:"menu",children:p(m).map(e=>o(r,{children:[e.group&&o("div",{className:"sf-menugroup-head",role:"presentation",children:[s("span",{className:"sf-menugroup-title",children:e.group}),s("span",{className:"sf-menugroup-count",children:e.items.length})]}),e.items.map(t=>o("button",{type:"button",className:"sf-blockmenu-item",role:"menuitem",onClick:()=>{a(!1),c(t.type)},children:[s("span",{className:"sf-chip",children:s(l,{type:t.type,size:13})}),s("span",{className:"sf-row-name",children:t.label})]},t.type))]},e.group??"all"))})]})}export{g as a};