efficient-storefront-blocks 0.108.0 → 0.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/chunks/EditorPreviewCheckout-2JRQSG4O.js +4 -0
- package/dist/chunks/{SiteEditorProvider-HUBOWTZX.js → SiteEditorProvider-P4HVFXUX.js} +1 -1
- package/dist/chunks/chunk-CPAF23MT.js +1 -0
- package/dist/chunks/chunk-FRCI3FAV.js +80 -0
- package/dist/chunks/{chunk-S63IHMZT.js → chunk-GB6OHYUY.js} +1 -1
- package/dist/chunks/{chunk-QRXGHD3Z.js → chunk-MVJVIU2F.js} +1 -1
- package/dist/chunks/chunk-RFFTWKCU.js +340 -0
- package/dist/chunks/{fitment-data-SMH4TOUX.js → fitment-data-EGBXHTFW.js} +1 -1
- package/dist/contract.js +8 -2
- package/dist/editor/components/BlogSource.d.ts +1 -1
- package/dist/editor/components/BlogSource.js +1 -1
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/index.js +32 -32
- package/dist/links.js +1 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +3 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/Events.d.ts +2 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterLogo.js +1 -1
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/cart/drawer-parts.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
- package/dist/render/components/checkout/checkout-parts.d.ts +11 -0
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/components/checkout/checkout-state.d.ts +5 -0
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/lib/checkout/checkout-memory.d.ts +62 -0
- package/dist/render/lib/checkout/checkout-memory.js +1 -0
- package/dist/render/lib/content/event-post.d.ts +5 -0
- package/dist/render/lib/content/event-post.js +1 -0
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/wheels/price-display.d.ts +2 -0
- package/dist/render/lib/wheels/price-display.js +1 -1
- package/dist/render/lib/wheels/selected-ranges.d.ts +1 -0
- package/dist/render/lib/wheels/selected-ranges.js +1 -1
- package/dist/words.d.ts +1 -0
- package/dist/words.js +1 -1
- package/package.json +3 -3
- package/dist/chunks/EditorPreviewCheckout-R7YOGDSN.js +0 -4
- package/dist/chunks/chunk-3PIAT5RJ.js +0 -339
- package/dist/chunks/chunk-5VKKFDMK.js +0 -74
- package/dist/chunks/chunk-CS32ZWYC.js +0 -1
- /package/dist/chunks/{chunk-3PIAT5RJ.js.LEGAL.txt → chunk-RFFTWKCU.js.LEGAL.txt} +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import{jsx as ha}from"react/jsx-runtime";import{createContext as Dr,useCallback as u,useContext as Br,useMemo as Mr,useState as Fr}from"react";import{createContext as Kn,useContext as ot}from"react";import{createContext as Bi}from"react";var $n=Bi(null);var Mi=Kn(null),st=Kn({logo:null,placeholder:!1,wordmark:null});function Cu(){let e=ot($n),t=ot(Mi),n=ot(st),a=!e&&n.placeholder,o=e?e.logoUrl:n.logo?.logoUrl??t?.logoUrl??null;return{src:a?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}}import{contrastRatio as Yu,hexToRgb as Ce,parseHexColor as M,readableInk as qn,relativeLuminance as Le}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as $i,pictureShadowColor as Ki}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as Vi}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as Vn}from"efficient-easel/screen/lib/content/view-tiers";var H=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;import{VIEW_ABOVE as Ae,isLengthUnit as it,lengthOf as Fi,rowGrid as Gi}from"efficient-easel/screen/lib/content/length-units";var Wi=(()=>{let e=Object.keys(Ae),t=e.filter(n=>Ae[n]===null);for(let n=e.find(a=>Ae[a]===t[0]);n&&!t.includes(n);n=e.find(a=>Ae[a]===t[t.length-1]))t.push(n);return t})();function rt(e,t){let n=Fi(e,lt(t));return typeof n=="number"?`${n}px`:n}function lt(e,t="px"){return it(e)?e:t}function Du(e,t,n){return t.unitKey?lt(e[Vn(t.unitKey,n)],t.base??"px"):t.base??"px"}function Bu(e,t=Wi){return e.unitKey?t.map(n=>Vn(e.unitKey,n)):[]}function Ui(e,t,n){let a=Gi({kind:e},t,n);return t!=="px"&&n.min>0?{...a,min:a.step}:a}function ct(e,t,n,a){let o=H(e);if(!it(t)||t==="px"||o===void 0)return null;let s=Ui(n,t,a),i=Math.min(s.max,Math.max(s.min,o));return Math.round(i*100)/100}function Mu(e,t,n,a){let o=ct(e,t,n,a);return o===null?null:rt(o,t)}var Yi={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function Fu(e){let t=e;return Object.fromEntries(Object.entries(Yi).map(([n,a])=>[n,lt(t[a])]))}function Gu(e,t,n){let a=H(e);return it(t)&&t!=="px"&&a!==void 0?a:n(a??null)}import{DEFAULT_SHADOW_COLOR as Sp}from"efficient-easel/screen/lib/document/shadow-values";var Xu="storefront-theme",ju="sf:theme-mode",zu="sf:theme-switch",qu="hide",wt="light",bt=!1,Xi=7,ji=18;function zi(e){return e>=Xi&&e<ji}function Zu(e){let{mode:t,override:n,switchShown:a,hour:o}=e;return a&&(n==="light"||n==="dark")?n:t==="auto"?zi(o)?"light":"dark":t==="light"?"light":"dark"}var q={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},qi=[{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"}],Ne={selected:0,themes:qi};function Zn(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...Ne}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function dt(e,t,n){let a=Ce(e),o=Ce(t);if(a===null||o===null)return e;let s=(i,r)=>Math.max(0,Math.min(255,Math.round(i+(r-i)*n))).toString(16).padStart(2,"0");return`#${s(a.r,o.r)}${s(a.g,o.g)}${s(a.b,o.b)}`}var Zi={light:"#ffffff",dark:"#0a0a0a"},Qu=["light","dark"];function Ju(e,t){let n=Zi[t],a=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:dt(e,a,.1),line:dt(e,a,.22),muted:dt(n,e,.35),brandInk:t}}function Q(e){let t=Zn(e);return t.themes[t.selected]}function Z(e){return{text:e.text,accent:e.accent,background:e.background||q.background,surface:e.surface||q.surface,line:e.line||q.line,muted:e.muted||q.muted}}var Qi=.4,Ji="#f5f1e8",Xn="#0a0a0a";function er(e){let t=Q(e).text,n=Le(t);return n===null||n>=Qi?t:null}var tr=4.5,nr=3,ep={good:"Good","large-only":"Large text only",hard:"Hard to read"};function tp(e){return e>=tr?"good":e>=nr?"large-only":"hard"}var ar=["#000000","#ffffff"];function Ie(e){return qn(e,ar)}function Qn(e,t){let n=t!==void 0&&Le(t)!==null?t:Ji;return qn(e,[Xn,n])===n&&n!==Xn}var or=[.25,.4,.55];function np(e){let t=Ce(e);return t===null?[]:or.map(n=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-n)).toString(16).padStart(2,"0")).join(""))}function ap(e){let t={"--theme-fg":Q(e).text},n=er(e);return n!==null&&(t["--overlay-fg"]=n),t}var sr=82;function yt(e){return`color-mix(in srgb, ${e} ${sr}%, #000)`}function op(e){let t=Q(e);return{"--theme-accent":t.accent,"--theme-accent-2":yt(t.accent),"--theme-accent-ink":Ie(t.accent)}}function Et(e){let t=e?.button;return t&&M(t)===t.toLowerCase()?t.toLowerCase():null}function sp(e){let t=Q(e),n=Et(t),a=Jn(t);if(n===null&&a===null)return{};let o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=yt(n)),o["--theme-btn-ink"]=a??Ie(n),o}function Jn(e){let t=e?.buttonInk;return t&&M(t)===t.toLowerCase()?t.toLowerCase():null}function ir(e,t){return Jn(e)??Ie(Et(e)??t)}function ip(e){let t=Q(e);return{fill:Et(t)??t.accent.toLowerCase(),ink:ir(t,t.accent)}}function rp(e){let t={};return Zn(e).themes.forEach((n,a)=>{let o=Z(n);t[`--theme-preset-${a}-accent`]=o.accent,t[`--theme-preset-${a}-accent-2`]=yt(o.accent),t[`--theme-preset-${a}-accent-ink`]=Ie(o.accent),t[`--theme-preset-${a}-bg`]=o.background,t[`--theme-preset-${a}-fg`]=o.text,t[`--theme-preset-${a}-surface`]=o.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${a}-line`]=o.line,t[`--theme-preset-${a}-muted`]=o.muted}),t}var ht=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},ut=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function jn([e,t,n]){let[a,o,s]=[ht(e),ht(t),ht(n)],i=Math.cbrt(.4122214708*a+.5363325363*o+.0514459929*s),r=Math.cbrt(.2119034982*a+.6806995451*o+.1073969566*s),l=Math.cbrt(.0883024619*a+.2817188376*o+.6299787005*s);return[.2104542553*i+.793617785*r-.0040720468*l,1.9779984951*i-2.428592205*r+.4505937099*l,.0259040371*i+.7827717662*r-.808675766*l]}function rr([e,t,n]){let a=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,s=(e-.0894841775*t-1.291485548*n)**3;return[ut(4.0767416621*a-3.3077115913*o+.2309699292*s),ut(-1.2684380046*a+2.6097574011*o-.3413193965*s),ut(-.0041960863*a-.7034186147*o+1.707614701*s)]}var ft=e=>{let t=Ce(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},ea=(e,t,n)=>[e[0]*n+t[0]*(1-n),e[1]*n+t[1]*(1-n),e[2]*n+t[2]*(1-n)],ta=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,na=e=>ea(ft(e.surface),ft(e.line),.6);function lp(e){return ta(na(Z(e)))}function lr(e){let t=Z(e);return ta(rr(ea(jn(na(t)),jn(ft(t.text)),.92)))}function aa(e,t,n,a){let o=e[t];if(!o)return-1;let s=n(o);if(!s)return-1;let i=Z(o);return e.findIndex((r,l)=>{if(l===t)return!1;let d=Z(r);return M(d.background)!==s?!1:!a||M(d.text??"")===M(i.text??"")&&M(d.accent??"")===M(i.accent??"")})}function cp(e,t){return aa(e,t,lr,!1)}function dp(e,t){return aa(e,t,n=>M(n.surface??""),!0)}var cr=1;function dr(e,t){let n=(e??[]).flatMap((a,o)=>{let s=Le(a.background??""),i=Le(a.text??"");return s!==null&&i!==null&&s<i?[o]:[]});return n.find(a=>a!==t)??n[0]??cr}function hp(e){return dr(e?.themes,e?.selected)}var up=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function pp(e){let t=Z(Q(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,a={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==q.surface||t.line!==q.line)&&(a["--theme-surface-2"]=n),a}var hr=["heading","body","label"];function mp(e){if(!e)return null;for(let t of hr)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var oa=["headingLarge","headingMedium","headingSmall","accent","body","label"];var St={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ur=8,pr=200;function mr(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=ur&&t<=pr?t:null}function fr(e){let t={};for(let n of oa)t[n]=mr(e?.[n]);return t}function fp(e){let t=fr(e),n={};for(let a of oa){let o=t[a];o!==null&&(n[`--size-${a}`]=`${o}px`)}return n}var gr=["square","small","large"],wr="small";function gp(e){return gr.includes(e??"")?e:wr}var Pe=0,sa=40,br={min:Pe,max:sa,step:1},wp={square:0,small:null,large:16},gt={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function _t(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(sa,Math.max(Pe,Math.round(t))):null}function zn(e,t){if(Vi(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};let a=Math.max(0,e);return Object.fromEntries(Object.entries(gt).map(([o,s])=>{let i=Math.round(a*s*1e4)/1e4;return[o,i===0?"0":rt(i,t)]}))}let n=_t(e);return n===null?{}:Object.fromEntries(Object.entries(gt).map(([a,o])=>{let s=n*o/16;return[a,s===0?"0":`${s}rem`]}))}function bp(e){return(_t(e)??Pe)*gt["--sf-button-radius"]}function yp(e,t){let n=ct(e,t,"radius",br);return n!==null?zn(n,t):zn(_t(e)??Pe)}var yr=["none","soft","lifted"],Er="soft",ia="none",Sr=["tight","normal","roomy"],_r="normal",He="normal",Tr=["none","lift","highlight"],vr="lift",xr="highlight";function ra(e){return yr.includes(e??"")?e:Er}function Or(e){return Sr.includes(e??"")?e:_r}function la(e){return Tr.includes(e??"")?e:vr}function _p(e){let t=ra(e);return t===ia?void 0:t}function Tp(e){let t=Or(e);return t===He?void 0:t}function vp(e){let t=la(e);return t===xr?void 0:t}function xp(e,t,n){let a=Ki(t);return a===$i?{}:ra(e)!==ia||la(n)==="lift"?{"--sf-shadow-color":a}:{}}var kr=["normal","tight","compressed"],he="normal";function ca(e){return kr.includes(e??"")?e:he}function Op(e){let t=ca(e);return t===he?void 0:t}function kp(e){switch(ca(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var Tt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},pt=100,mt=900,Ar=24,Rr=200;function Re(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function da(e){let t=Re(e?.weight,pt,mt),n=e?.case==="sentence"?"sentence":"authored",a=s=>s==null?t:Re(s,pt,mt),o=s=>s==="sentence"?"sentence":s==="authored"?"authored":n;return{case:n,weight:t,weightStrong:Re(e?.weightStrong,pt,mt),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Re(e?.maxPx,Ar,Rr),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function Ap(e){let t=da(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 Rp(e){return da({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,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})}var ue=[{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:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"jost",label:"Jost",cssVar:"--font-jost",category:"sans",italic:!0,italicLoaded:!0},{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}],ee=new Map(ue.map(e=>[e.key,e]));function Lp(e){return ee.get(e)}var vt=["heading","heading2","heading3","body","accent","label"];function Np(e){return typeof e=="string"&&vt.includes(e)?e:null}var Ip={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},Cr=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Lr=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,Pp={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Nr={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function Hp(e){let t=e?Lr.exec(e):null;return t?Nr[t[1]]??null:Ir(e)}function Ir(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,a]of Cr)if(t.includes(n))return a;return null}var U={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function Pr(e){let t=n=>{let a=e?.[n];if(a&&ee.has(a))return a;if(n==="heading2"||n==="heading3"){let o=e?.heading;return o&&ee.has(o)?o:U.heading}return U[n]};return Object.fromEntries(vt.map(n=>[n,t(n)]))}function Hr(e,t){return ee.get(e[t])??ee.get(U[t])}function J(e,t){return`var(${Hr(e,t).cssVar})`}var Dp=[...new Set(vt.map(e=>ee.get(U[e]).cssVar))],Bp=[...new Set(ue.map(e=>e.cssVar))];function Mp(e){let t=Pr(e);return{"--font-role-heading":J(t,"heading"),"--font-role-heading2":J(t,"heading2"),"--font-role-heading3":J(t,"heading3"),"--font-role-body":J(t,"body"),"--font-role-accent":J(t,"accent"),"--font-role-label":J(t,"label"),fontFamily:"var(--font-role-body)"}}var ua={},pa=Dr({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:wt,setThemeMode:()=>{},themeSwitchShown:bt,setThemeSwitchShown:()=>{},theme:Ne,themeRow:"none",setTheme:()=>{},fonts:U,setFonts:()=>{},sizes:St,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:He,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:he,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:ua,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:Tt,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function Kp({children:e,websiteName:t=null,templateChrome:n=!1,templateName:a=null,chromePlaceholder:o=!1,themeMode:s=wt,onThemeModeChange:i,themeSwitchShown:r=bt,onThemeSwitchShownChange:l,theme:d=Ne,themeRow:p="none",onThemeChange:h,fonts:I=U,onFontsChange:P,sizes:W=St,onSizesChange:Oe,cornerRadiusPx:nt=null,onCornerRadiusPxChange:ke,cardShadow:at=null,onCardShadowChange:Sn,shadowColor:Ks=null,onShadowColorChange:_n,cardGap:Vs=He,onCardGapChange:Tn,hoverEffect:Xs=null,onHoverEffectChange:vn,headingCompression:js=he,onHeadingCompressionChange:xn,siteWidth:zs=null,onSiteWidthChange:On,siteGutter:qs=null,siteGutterPhone:Zs=null,blockGap:Qs=null,blockGapPhone:Js=null,siteLengthUnits:ei=ua,onSiteLengthUnitsChange:kn,onSiteGutterChange:An,onSiteGutterPhoneChange:Rn,onBlockGapChange:Cn,onBlockGapPhoneChange:Ln,headingTypography:ti=Tt,onHeadingTypographyChange:Nn,textStyles:ni=null,onTextStylesChange:In,wordStyles:ai=null,heroBackgroundFollowsWidth:oi=null,onHeroBackgroundFollowsWidthChange:Pn,sectionBackgroundWidth:si=null,onSectionBackgroundWidthChange:Hn,sectionContentWidth:ii=null,onSectionContentWidthChange:Dn,photographyGrayscale:ri=null,onPhotographyGrayscaleChange:Bn,shareButtonOnPosts:li=null,onShareButtonOnPostsChange:Mn,themeFromDocument:ci=!1}){let[de,Fn]=Fr(null),di=u(c=>Fn(Di=>Di??c),[]),hi=u(c=>i?.(c),[i]),ui=u(c=>l?.(c),[l]),pi=u(c=>h?.(c),[h]),mi=u(c=>P?.(c),[P]),fi=u(c=>Oe?.(c),[Oe]),gi=u(c=>On?.(c),[On]),wi=u(c=>An?.(c),[An]),bi=u(c=>Rn?.(c),[Rn]),yi=u(c=>Cn?.(c),[Cn]),Ei=u(c=>Ln?.(c),[Ln]),Si=u(c=>kn?.(c),[kn]),_i=u(c=>Pn?.(c),[Pn]),Ti=u(c=>Hn?.(c),[Hn]),vi=u(c=>Dn?.(c),[Dn]),xi=u(c=>Bn?.(c),[Bn]),Oi=u(c=>Mn?.(c),[Mn]),ki=u(c=>ke?.(c),[ke]),Ai=u(c=>Sn?.(c),[Sn]),Ri=u(c=>_n?.(c),[_n]),Ci=u(c=>Tn?.(c),[Tn]),Li=u(c=>vn?.(c),[vn]),Ni=u(c=>xn?.(c),[xn]),Ii=u(c=>Nn?.(c),[Nn]),Pi=u(c=>In?.(c),[In]),Gn=de?.logoUrl,Wn=de?.logoReversed,Un=de?.logoInkIsDark,Yn=de!==null,Hi=Mr(()=>({logo:Yn?{logoUrl:Gn,logoReversed:Wn,logoInkIsDark:Un}:null,placeholder:n||o,wordmark:n?a:t}),[Yn,Gn,Wn,Un,n,o,a,t]);return ha(st.Provider,{value:Hi,children:ha(pa.Provider,{value:{settings:de,setSettings:Fn,primeSettings:di,websiteName:t,templateChrome:n,templateName:a,chromePlaceholder:o,themeMode:s,setThemeMode:hi,themeSwitchShown:r,setThemeSwitchShown:ui,theme:d,themeRow:p,setTheme:pi,fonts:I,setFonts:mi,sizes:W,setSizes:fi,cornerRadiusPx:nt,setCornerRadiusPx:ki,cardShadow:at,setCardShadow:Ai,shadowColor:Ks,setShadowColor:Ri,cardGap:Vs,setCardGap:Ci,hoverEffect:Xs,setHoverEffect:Li,headingCompression:js,setHeadingCompression:Ni,siteWidth:zs,setSiteWidth:gi,siteGutter:qs,siteGutterPhone:Zs,blockGap:Qs,blockGapPhone:Js,siteLengthUnits:ei,setSiteLengthUnits:Si,setSiteGutter:wi,setSiteGutterPhone:bi,setBlockGap:yi,setBlockGapPhone:Ei,headingTypography:ti,setHeadingTypography:Ii,textStyles:ni,setTextStyles:Pi,wordStyles:ai,heroBackgroundFollowsWidth:oi,setHeroBackgroundFollowsWidth:_i,sectionBackgroundWidth:si,setSectionBackgroundWidth:Ti,sectionContentWidth:ii,setSectionContentWidth:vi,photographyGrayscale:ri,setPhotographyGrayscale:xi,shareButtonOnPosts:li,setShareButtonOnPosts:Oi,themeFromDocument:ci},children:e})})}var Gr=()=>Br(pa);function Vp(e,t,n){return e?t===n?"read":"loading":"none"}function Xp(e,t){return{value:e,readFor:t}}function jp(e,t,n){return{value:t,readFor:e.readFor===n?n:null}}function zp(){let{sectionContentWidth:e,themeFromDocument:t}=Gr();return t?null:e}var w=e=>typeof e=="string"&&e?e:void 0;function pe(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function te(e,t){return Object.hasOwn(e,t)}var em=["general","commerce","service"],ne=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{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"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function tm(){return Object.fromEntries(ne.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var Wr="2027-02-05",ma={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
|
|
2
|
-
|
|
3
|
-
WHAT REPLACES IT: Tab Bar, a Box pinned under the header that stays above the sections after it, with a line below, holding the Menu block (One row, Menu style Tabs, Current page). Set the Menu's content to Blog categories: the blog's own categories, most posts first, each with its count in its cell (the host seeds the count card, Count on). Its converter row (\`section-to-box-rows-tabbar\` \`categoryBar\`, OFF) draws that bar for a stored page that moves later.
|
|
4
|
-
|
|
5
|
-
WHAT A MERCHANT LOSES: typed tabs with typed counts (the Menu draws the blog's categories, or a Console menu); the Archive and RSS links at the bar's right end (a Box beside the Menu holds Buttons, if wanted); the first tab marked when no page matches (the Menu marks the page's own entry); the blur behind the bar.
|
|
6
|
-
|
|
7
|
-
0 Category Bars are stored on the US sites (34 pages, draft and published; read only, 2026-11-09). Old sites stay as they are (owner, 2026-11-06).
|
|
8
|
-
|
|
9
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A page holding a Category Bar still renders through it and can still be edited; no document is rewritten. Delete the component when CategoryBar is on SECTION_TO_BOX_ON and the stored count on the US sites is 0.`},Masthead:{label:"Issue Header",note:`Owner, 2026-10-10 (the page headers become ONE Layouts row): Issue Header and Document Header are one Page Header. Retired from the Add menu with no second preset (reviewer, 2026-11-06).
|
|
10
|
-
|
|
11
|
-
WHAT REPLACES IT: Page Header, a Box of Text blocks: a Header Box (the eyebrow, the title, a Details Box of one Text per line) over a Deck Box. Every Issue Header field is plain words with no data source, so the merchant makes the issue shape from Text blocks in that Box: the issue lines are Details lines, the lead is the Deck, and the "In this issue" panel is a Box of Texts beside it. Its converter row (\`section-to-box-rows-pageheader\` \`masthead\`, OFF) stays for a stored page that moves later.
|
|
12
|
-
|
|
13
|
-
WHAT A MERCHANT LOSES: a press that lays down the two-row issue shape with its "In this issue" panel; the merchant builds it from Boxes and Text blocks. No field is lost.
|
|
14
|
-
|
|
15
|
-
1 Issue Header is stored on the US sites (journal, draft and published; read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06).
|
|
16
|
-
|
|
17
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A page holding an Issue Header still renders through it and can still be edited; no document is rewritten.`},Grid:{label:"Grid",note:'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 Custom, and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.'},CompatibleTyres:{label:"Compatible Tyres",note:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.'},Spacer:{label:"Spacer",note:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
18
|
-
|
|
19
|
-
WHAT REPLACES IT: a Divider with Style set to None. It draws no line, only its space, and that space is the Divider's Padding row (top and bottom, each with its phone value): the Spacer's 24 / 48 / 96 / 160 px are None with Padding 12 + 12, 24 + 24, 48 + 48, 80 + 80. \`scripts/test-divider-holds-the-spacer.tsx\` \xA75 holds it.
|
|
20
|
-
|
|
21
|
-
WHAT A MERCHANT LOSES on a NEW space: nothing the Spacer had. Four fixed sizes become any number on the 4px grid, top and bottom apart, and a phone value.
|
|
22
|
-
|
|
23
|
-
NO CONVERTER ROW: 0 Spacer nodes on any page, draft or published, in any schema of the local production clone (read-only count, 2026-10-26), and none in the backend's seed files. This entry is its reason in the guard (\`scripts/test-section-to-box.tsx\` \xA75: a retired type is accounted for).
|
|
24
|
-
|
|
25
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A Spacer anywhere still renders through it and can still be edited; no document is rewritten.`},KeyFeatures:{label:"Key Features",note:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds Cards and Key Features; Key Features' diamond cells are the card style "Label only". Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).
|
|
26
|
-
|
|
27
|
-
WHAT REPLACES IT: a Cards section with Card style set to Label only. Every cell is a copy of the Label only card template (Cards/card-seed \`labelOnlyCardSeed\`): a cell Box (its link from the row's \`href\`), a 9px Mark Box in the main colour turned 45 degrees, and the label Text; the eyebrow starts on the pill look when none is stored. A cell's words are the card's \`title\` (row "Feature label"), its link the card's \`href\` (row "Link"). The Key Features conversion lands on the same card (\`scripts/test-key-features-diamond.tsx\`).
|
|
28
|
-
|
|
29
|
-
WHAT A MERCHANT LOSES on a NEW Label only section: nothing this section had. It GAINS the Cards head split (its head can move into a box of its own), which Key Features never had: that head draws the shared \`simple\` head, eyebrow ABOVE the heading, where Key Features drew it beside.
|
|
30
|
-
|
|
31
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT, until the stored nodes move (delete date ${Wr}). Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`},DeliveryOptions:{label:"Delivery Options",note:"Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids \u2014 Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).\n\nWHAT REPLACES IT: Cards with Card content set to Delivery options, drawn from its card template: the backend's `delivery-options` rows (name, price, time, note), one card each, in the website's own currency. The one Highlighted card row and the Highlight badge replace the per-option Highlight switch.\n\nWHAT A MERCHANT LOSES: more than one highlighted option (Lewis approved ONE Highlighted card row, 2026-10-10). No stored node held two.\n\nNO CONVERTER ROW: 0 DeliveryOptions nodes on the US sites, draft or published (read only, 2026-11-04). This entry is its reason in the guard (`scripts/test-section-to-box.tsx` \xA75).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks). A Delivery Options anywhere still renders through it and can still be edited; no document is rewritten.\n\nDELETE DATE 2026-12-18: the retired component in efficient-storefront-blocks (`components/DeliveryOptions`, `DeliveryOptionsSource`, `blocks/commerce/DeliveryOptions`) goes then, in a storefront-blocks follow-up. 0 stored DeliveryOptions nodes on the 34 US pages, draft or published (read only, 2026-11-08), and no converter row is coming."},Series:{label:"Recurring Columns",note:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids \u2014 Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
|
|
32
|
-
|
|
33
|
-
WHAT REPLACES IT: Cards drawn from its card template. A column's number is Number, its "Right Top Text" Corner note, its title Card title, its words Card body, its count and label one Count, and the one \`viewLabel\` a plain Text typed once in the template, so every card shows it; the background is the Box's. The converter row (\`section-to-box-rows-cards.ts\`, OFF) lays down that Cards inside a Box.
|
|
34
|
-
|
|
35
|
-
WHAT A MERCHANT LOSES (the LOOK GAPS in that file): the grid takes the Cards block's own gaps and breakpoints; a short row no longer keeps 4 columns; the count is one plain Text, its figure no longer in the text ink; a card with no count still draws the footer line.
|
|
36
|
-
|
|
37
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Recurring Columns still renders through it and can still be edited; no document is rewritten.`},DocMetaCards:{label:"Document Detail Cards",note:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids \u2014 Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
|
|
38
|
-
|
|
39
|
-
WHAT REPLACES IT: Cards drawn from its card template, each card a Label, a Value and a Card body. The converter row (\`section-to-box-rows-cards.ts\`, OFF) lays down that Cards inside a Box.
|
|
40
|
-
|
|
41
|
-
WHAT A MERCHANT LOSES (the LOOK GAPS in that file): the grid takes the Cards block's own gaps and breakpoints, not the old 40 (16 on a phone).
|
|
42
|
-
|
|
43
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Document Detail Cards still renders through it and can still be edited; no document is rewritten.`},StatsParagraph:{label:"Stats with Text",note:`Lewis, 2026-10-10 (approved): one Stats holds Stats and Stats with Text. Its head (eyebrow, heading, body) and each number's Prefix, Unit, Superscript, Label, "Use accent color" and text go into Stats; Card style Table (the old Stats with Text) or List (the old Stats). 2026-10-27: no Number block, the cards are Box + Text. Retired when the two became one Stats (2026-11-06).
|
|
44
|
-
|
|
45
|
-
WHAT REPLACES IT: a Stats press, a Box of real parts: three head Texts, then a Stats Box holding ONE Card list, Card style Table. Each number is a row of the Card list; its card is a figure Text (the prefix and number typed in it, the unit marked \`==_yr_==\`, which draws the section theme's Main colour; a whole number in that colour is \`==_8_==\`), a superscript Text beside it, a label Text and a body Text, each showing its row's field, and a row may link its own live number. The Stats Box's Card style row (Table / List) writes the Box's Gap and the card's own Border, Padding and Height.
|
|
46
|
-
|
|
47
|
-
WHAT A MERCHANT LOSES: the numbers do not count up (the Text block's Count up numbers setting is its own change, held); the figure has no tabular numbers; a unit is not a lighter weight than its number; rows of four stack below 800px, not two columns from 1100px.
|
|
48
|
-
|
|
49
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Stats with Text still renders through it and can still be edited; no document is rewritten (owner 2026-11-06: old sites stay as they are).`},Testimonials:{label:"Testimonials",note:"Lewis, 2026-10-10 (section-merges.md group 6, approved): Testimonials goes into Reviews, whose Review content is Manual (typed quotes) or Reviews (the store's approved reviews), with a product choice in place of the old Design code. Retired by card [MERGE] Remaining Section Merges (2026-11-06), after Reviews took typed quotes and a card template (efficient-storefront-blocks #242) and the product choice (#359).\n\nWHAT REPLACES IT: Reviews with Review content set to Manual. Every Testimonials key has the same key there: `eyebrow`, `eyebrowLook`, `title`, `items[]` (`quote`, `name`, `role`), `columns` 1-3 and `headPlacement` (both split their head). A typed review also has a `title` and a `rating`, empty for a quote that has none.\n\nWHAT A MERCHANT LOSES on a NEW quote list: nothing this section had. Reviews is in the service set where this section was general; no host narrows the sets (2026-11-06).\n\nNO CONVERTER ROW HERE: its Box row is efficient-storefront-blocks' (`section-to-box-rows-reviews`, OFF). 0 Testimonials nodes on the US sites, draft or published (read only, 2026-11-06). Old sites stay as they are (owner, 2026-11-06).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A Testimonials anywhere still renders through it and can still be edited; no document is rewritten."},SubscribeBlogs:{label:"Subscribe with Posts",note:"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."},RelatedProducts:{label:"Related Products",note:`Owner, 2026-11-06 (plan productgrid-card-template-2026-11-06, inovit row 19): a Product Grid with "Show the current product's related" on IS the related grid, so offering both asked a merchant to choose between two names for one section.
|
|
50
|
-
|
|
51
|
-
WHAT REPLACES IT: Product Grid, bound to the current product. Both draw every card through the grid's ONE card template (efficient-storefront-blocks, lib/content/product-card-seed).
|
|
52
|
-
|
|
53
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Related Products node is read as that grid by the host (\`relatedToGrid\`) and draws the same cards; no document is rewritten. Its footnote is the one value the grid has no home for.`},BundleOffer:{label:"Bundle Products",note:`Plan section-parts bundles grid source (2026-11-07): a Product Grid that shows "Bundles with this product" IS the bundle section, so offering both asked a merchant to choose between two names for one section.
|
|
54
|
-
|
|
55
|
-
WHAT REPLACES IT: Product Grid, bound to the current product, Show set to its bundles. Both draw every kit through the grid's ONE card template (efficient-storefront-blocks, lib/content/product-card-seed).
|
|
56
|
-
|
|
57
|
-
THE TYPE KEY STAYS AND SO DOES THE DRAWING. A stored Bundle Products node is read as that grid by the host (\`bundleToGrid\`) and draws its kits; no document is rewritten.`},TyreFitment:{label:"Tyre Fitment Form",note:`Owner, 2026-10-10 (approved): the Tyre Fitment Form goes into the Fitment Form, whose answer follows the page. One vehicle section, not two.
|
|
58
|
-
|
|
59
|
-
WHAT REPLACES IT: the Fitment Form, a Box of a head, the vehicle picker (\`FitmentPicker\`), its answer (\`StockFitment\`) and a Button. On a tyre product page the answer part draws one verdict per size against the picked car, the same \`TyreFitVerdicts\` drawing this section made; on every other page it draws the car's OEM fitment card (efficient-storefront-blocks 0.87.0). The old escape link is the Box's Button.
|
|
60
|
-
|
|
61
|
-
WHAT A MERCHANT LOSES: the tyre-only head copy ("Will it fit your car?"); a press seeds the Fitment Form's own head. The page decides the answer, so there is no mode row.
|
|
62
|
-
|
|
63
|
-
NO CONVERTER ROW: 0 TyreFitment nodes on the US sites, draft or published (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06).
|
|
64
|
-
|
|
65
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks). A stored Tyre Fitment Form still renders through it and can still be edited, its head split, width, heading level, settings groups and cover included; no document is rewritten.`},EuTyreLabel:{label:"EU Tyre Label",note:`Owner, 2026-10-10 (approved): the EU Tyre Label becomes a Spec Table display chip. One place for a tyre's sheet, not two sections.
|
|
66
|
-
|
|
67
|
-
WHAT REPLACES IT: the Spec Table's "EU tyre label" Display chip (efficient-storefront-blocks, default off), which draws this page's grades under the tyre sheet; and the EU Tyre Label block (\`EuTyreLabelBlock\`, efficient-storefront-blocks), the same grades as a block of their own. Both read the grades live through the one grades draw (\`EuTyreLabelGrades\`), as this section did. Default on for sites that sell to the EU or UK waits for a site market source (a later step).
|
|
68
|
-
|
|
69
|
-
WHAT A MERCHANT LOSES: the label as a section of its own, with its fixed head ("EU tyre label.") and its section number (\`num\`, its only field). The grades, their source line and the live read are not lost.
|
|
70
|
-
|
|
71
|
-
NO CONVERTER ROW: 0 EU Tyre Labels are stored on the US and AU sites (inovit_us and inovit_au, \`layout\` and \`published_layout\`; read only, 2026-11-10). Old sites stay as they are (owner, 2026-11-06).
|
|
72
|
-
|
|
73
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks EuTyreLabels). A stored EU Tyre Label still renders through it and can still be edited, its width, heading level, settings groups and cover included; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items \xB7 Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. \u26D4 A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},Ur=Object.fromEntries(Object.entries(ma).map(([e,t])=>[e,t.note])),nm=["Grid","Spacer","TyreFitment"],am=Array.from(new Set([...ne.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(Ur)])),Yr=Object.fromEntries(Object.entries(ma).map(([e,t])=>[e,t.label])),om={...Yr,...Object.fromEntries(ne.flatMap(e=>e.sections.map(t=>[t.type,t.label])))},$r={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",HostPart:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",WheelDiagram:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},xt={...$r,...Object.fromEntries(ne.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function sm(e){return pe(xt,e)}function Ot(e){return Object.keys(xt).filter(t=>pe(xt,t)===e).sort()}var im=Ot("general"),rm=Ot("commerce"),lm=Ot("service"),Kr="Flex",De="Box",cm=`${De}es`;function Vr(e){return e==="section"?"Blank section":De}function dm(e,t,n){return e===Kr?Vr(t):n}var Y=["highlight","strong","quiet"],$={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},R={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},pm=Object.fromEntries(Y.map(e=>[R[e].kind,e])),mm="data-sf-ws",Xr=["accent","text","labels"],jr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},zr=80,qr=120,Zr=100,Qr=900,Jr=.5,el=3,tl=-.1,nl=.5,al=3,kt={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},ol={highlight:{...kt},strong:{...kt},quiet:{...kt}};function fa(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function ga(e,t,n){if(typeof e!="number"||!Number.isFinite(e))return null;let a=10**al;return Math.round(Math.min(Math.max(e,t),n)*a)/a}function wa(e){return typeof e=="boolean"?e:null}function sl(e){let t=typeof e?.font=="string"&&ue.some(a=>a.key===e.font)?e.font:null,n=typeof e?.colour=="string"&&Xr.includes(e.colour)?e.colour:null;return{font:t,size:fa(e?.size,zr,qr),weight:fa(e?.weight,Zr,Qr),bold:wa(e?.bold),italic:wa(e?.italic),lineGap:ga(e?.lineGap,Jr,el),textGap:ga(e?.textGap,tl,nl),colour:n}}function ba(e){let t={};for(let n of Y)t[n]=e&&n in e&&e[n]?sl(e[n]):{...ol[n]};return t}function fm(e){let t=ba(e),n={};for(let a of Y){let o=t[a],s=`--sf-ws-${a}`;if(o.font){let i=ue.find(r=>r.key===o.font);i&&(n[`${s}-font`]=`var(${i.cssVar})`)}o.size!==null&&(n[`${s}-size`]=`${o.size/100}em`),o.weight!==null&&(n[`${s}-weight`]=String(o.weight)),o.bold!==null&&(n[`${s}-weight-bold`]=o.bold?"700":"400"),o.italic!==null&&(n[`${s}-style`]=o.italic?"italic":"normal"),o.lineGap!==null&&(n[`${s}-line`]=String(o.lineGap)),o.textGap!==null&&(n[`${s}-track`]=`${o.textGap}em`),o.colour!==null&&(n[`${s}-color`]=jr[o.colour])}return n}function gm(e){let t=e?.word_styles??void 0,n={};for(let a of Y)t&&a in t&&(n[a]=t[a]??null);return ba(n)}import{applyMark as ym,markupTools as Em,MARKUP_TOOLS as Sm,COPY_FIELD_TOOLS as _m,STOREFRONT_MARKUP as Tm,tokenizeInline as vm,stripInline as xm,isSafeLinkHref as Om}from"efficient-shell/markup";import{applyMark as il,clearStyle as rl,markedAt as ll,markupTools as cl,MARKUP_TOOLS as dl,parseMarkup as hl,RETIRED_MARKS as ul,STOREFRONT_MARKUP as pl,tokenizeInline as Am}from"efficient-shell/markup";var ml=new Set(["strong"]),ya=Y.map(e=>({open:R[e].delimiter,close:R[e].delimiter,kind:R[e].kind,...ml.has(e)?{wordStart:!0}:{}})),Cm=[{style:R.highlight.kind,label:$.highlight,title:`${$.highlight} word style`},{style:R.strong.kind,label:$.strong,title:`${$.strong} word style`},{style:R.quiet.kind,label:$.quiet,title:`${$.quiet} word style`}],fl=new Set(ya.map(e=>e.open)),At=[...pl.filter(e=>!fl.has(e.open)),...ya];function gl(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Ea(e){return hl(typeof e=="string"?e:"",At)}var wl=dl.map(e=>e.style).filter(e=>!ul.includes(e)).filter(e=>At.some(t=>t.kind===e));function Lm(){return cl(wl)}var Sa=Object.fromEntries(Y.map(e=>[R[e].kind,R[e].delimiter]));function Nm(e,t,n,a){let o=Sa[a];if(!o)return il(e,t,n,a);let s=e.slice(t,n),i=e.slice(Math.max(0,t-o.length),t),r=e.slice(n,n+o.length);if(i===o&&r===o)return{text:e.slice(0,t-o.length)+s+e.slice(n+o.length),selectionStart:t-o.length,selectionEnd:t-o.length+s.length};let l=s||"styled text";return{text:e.slice(0,t)+o+l+o+e.slice(n),selectionStart:t+o.length,selectionEnd:t+o.length+l.length}}function Im(e,t,n,a){let o=Sa[a];return o?t>=o.length&&e.slice(t-o.length,t)===o&&e.slice(n,n+o.length)===o:ll(e,t,n,a)}function _a(e){return e.replace(/==(.+?)==/g,(t,n)=>n.startsWith("_")&&n.endsWith("_")?t:`==_${n}_==`)}function Pm(e){return Ea(e).map(t=>gl(t)+Ta(t.children)).join(`
|
|
74
|
-
`)}function Hm(e,t,n){return rl(e,t,n,At)}function Ta(e){return e.map(t=>t.kind==="text"?t.text:Ta(t.children)).join("")}function Dm(e){let t=n=>n.some(a=>a.kind==="link"||"children"in a&&t(a.children));return Ea(e).some(n=>t(n.children))}import{isNodeList as bl}from"efficient-easel/data";var Be=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],xa="bottom-left",ae=4,yl=ae+1,va=40,El=30,Sl=100,_l=60,Fm=100;var Rt={"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 Tl(e){let t=Be.indexOf(me(e));return{band:Math.floor(t/3),column:["start","center","end"][t%3]}}function vl(e){return 1+Tl(e).band*(yl+1)}function Gm(e){return vl(e)+1}function me(e){return Be.includes(e)?e:xa}function Wm(e){let t=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-va,Math.min(va,Math.round(t)))}function Um(e,t=_l){let n=typeof e=="number"&&Number.isFinite(e)?e:t;return Math.max(El,Math.min(Sl,Math.round(n)))}function Ct(e,t){let n=me(t);return e.filter(a=>me(a?.props?.placement)===n).length}function Oa(e){return`${Rt[me(e)]} already holds ${ae} boxes. Move one somewhere else first.`}function Ym(e,t){let n=e.filter(a=>a?.props?.id!==t);return Be.map(a=>{let o=Ct(n,a)>=ae,s=Rt[a];return o?{value:a,label:s,disabled:!0,title:Oa(a)}:{value:a,label:s}})}function xl(e,t){let n=t===void 0?xa:me(t?.props?.placement);return Ct(e,n)>=ae?Oa(n):null}var ka="HeroGroup";function Ol(e){return Be.map(t=>{let n=Ct(e,t);return{anchor:t,total:n,hidden:n-ae}}).filter(t=>t.hidden>0)}function $m(e){let t=Ol(e);return t.length===0?null:t.map(({anchor:n,total:a,hidden:o})=>{let s=Rt[n],i=o===1?"1 is not shown":`${o} are not shown`;return`${s} holds ${a} boxes. The published page draws the first ${ae}, so ${i}. ${o===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function Km(e,t){let n=t;if(n?.type!==ka)return null;let a=n.props?.id===void 0?"":String(n.props.id);return a?xl(kl(e,a),n):null}function kl(e,t){let n=Aa(e,t);return n&&n.ownerType===Rl?n.siblings:[]}function Vm(e,t){let n=Aa(e,t);return n?n.ancestorTypes.filter(a=>a===ka).length:Al}var Al=1,Rl="HeroSlide";function Aa(e,t){let n=(a,o,s)=>{if(o>12||!a||typeof a!="object")return null;if(bl(a)){if(a.some(i=>i?.props?.id===t))return{siblings:a,ownerType:s.at(-1)??null,ancestorTypes:s};for(let i of a){let r=i.type,l=n(i,o+1,[...s,String(r)]);if(l)return l}return null}for(let i of Object.values(a)){let r=n(i,o+1,s);if(r)return r}return null};return n(e,0,[])}import{forwardRef as Cl}from"react";import{jsx as Il}from"react/jsx-runtime";function Ll(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 Nl=Cl(function({href:t,prefetch:n,replace:a,scroll:o,shallow:s,legacyBehavior:i,passHref:r,locale:l,onClick:d,children:p,...h},I){let P=W=>{d?.(W),!(W.defaultPrevented||h.target==="_blank")&&W.preventDefault()};return Il("a",{ref:I,href:Ll(t),onClick:P,...h,children:p})}),zm=Nl;var Pl="Website";function Qm(e){return e?.trim()||Pl}var Ra=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp","telegram","line","wechat"],Hl={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE",wechat:"WeChat"},Dl={};function ef(e){if(!e||typeof e!="object")return Dl;let t={};for(let n of Ra){let a=e[n];if(typeof a!="string")continue;let o=a.trim();!o||!/^https?:\/\//i.test(o)||(t[n]=o)}return t}function tf(e){return Ra.flatMap(t=>{let n=e[t];return n?[{platform:t,href:n,label:Hl[t]}]:[]})}var nf=e=>`${e}_url`;function oe(e,t){let n=globalThis,a=Symbol.for(e),o=n[a];return o===void 0&&(o=t(),n[a]=o),o}function fe(){return oe("efficient.slot-field-blocks",()=>new Set)}var Bl="dataSource",hf="dataSourceOptions",Ml="dataRows",uf="countKey",pf="counts",mf="location-payment-methods",ff="shop-payment-methods",gf="delivery-options",wf="blog-categories",Lt="dealers";function Fl(e){return typeof e.open=="function"}var Na=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function bf(e){return typeof e=="string"&&Na.test(e)}var Ca=new Set([Lt]);function ge(){return oe("efficient.block-sources",()=>({sources:new Map,revision:0}))}var Gl=e=>[e?.key,e?.label,e?.value].every(t=>typeof t=="string"&&t.trim()!==""),Wl=e=>[e?.key,e?.label].every(t=>typeof t=="string"&&t.trim()!==""),La=e=>typeof e=="string"&&e.trim()!=="";function Ul(e){if(!e||!La(e.label))return null;if(Fl(e))return{label:e.label.trim(),open:e.open};let t=e.href;return La(t)?{label:e.label.trim(),href:t.trim()}:null}function Yl(e){if(typeof e.key!="string"||!Na.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(a=>typeof a!="string"||!a))throw new Error(`The block source ${e.key} names no block it can fill.`);let t=e.blocks.find(a=>fe().has(a));if(t)throw new Error(`The block source ${e.key} names ${t}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);let n=Ul(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(a=>Pa(a)).filter(a=>a!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(Gl)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(Wl).map(a=>({...a}))}:{},...n?{edit:n}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(a=>typeof a=="string"&&a.trim()!=="").map(a=>a.trim())}:{}}}function yf(e){let t=e.map(Yl),n=ge();for(let a of t)n.sources.set(a.key,a);t.length&&(n.revision+=1)}function Ia(e){let t=[...ge().sources.values()],n=[...t.filter(a=>!Ca.has(a.key)),...t.filter(a=>Ca.has(a.key))];return e===void 0?n:n.filter(a=>a.blocks.includes(e))}function Me(e){return ge().sources.get(e)??null}function Ef(e){return ge().sources.get(e)?.choices??[]}function Sf(){return ge().revision}function v(e){let t=e?.[Bl];return typeof t=="string"?t.trim():""}function Pa(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t={};for(let[n,a]of Object.entries(e)){let o=w(a);o&&(t[n]=o)}return Object.keys(t).length?t:null}function $l(e){let t=e?.[Ml];return Array.isArray(t)?t.map(Pa).filter(n=>n!==null):null}function _f(e,t,n=[]){let a=$l(e);if(a!==null&&(a.length||!t))return{rows:a,sample:!1};if(!t)return{rows:[],sample:!1};let o=Me(v(e))?.sample;return{rows:o?.length?o:n,sample:!0}}var m="content",g="Flex",Kl="Text & media",Vl="Layout & structure",Da=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"},{type:"Contents",label:"Contents"}],Xl=[...Da,{type:"ListSearch",label:"List search"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats",retired:!0},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos",retired:!0},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:Kl})),jl=(ne.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:Vl})),Ha=[...Xl,...jl],Nt=[...Da,{type:"HeroGroup",label:De}],Of=Nt.map(e=>e.type),zl=1,ql=Nt.filter(e=>e.type!=="HeroGroup");function Zl(e){return e<zl?Nt:ql}var Ql={Flex:{slot:m,choices:()=>Ha},Grid:{slot:m,choices:()=>Ha},HeroGroup:{slot:m,choices:Zl}};function kf(e,t=0){let n=pe(Ql,e);return n?{slot:n.slot,choices:n.choices(t)}:null}import{AUTO_RULES as ac,FOLLOW_RULES as oc,isAuto as sc,resolveViewValue as ic}from"efficient-easel/screen/lib/content/view-tiers";import{VIEW_DESKTOP_MIN as Jl,VIEW_TABLET_MIN as ec}from"efficient-easel/screen/lib/content/view-tiers";var Ma="v1",Fa=800,Ba={"view-tablet":ec,"view-desktop":Jl,"view-wide":Fa};function Cf(e){let t=e.startsWith("max-"),n=t?e.slice(4):e;if(n in Ba)return{px:Ba[n],max:t};let a=/^(max|min)-\[(\d+)px\]$/.exec(e);return a?{px:Number(a[2]),max:a[1]==="max"}:void 0}var Lf=`(min-width: ${Fa}px)`,tc="data-sf-line",nc="edge",Nf={[tc]:nc},we=(e,t)=>e==="edge"||e!=="section"&&t;function rc(){return Ma==="v2"?ac:oc}function Ga(e,t,n,a,o=rc()){let s=ic(e,t,n,a,o),i={},r=(l,d)=>!sc(l)||d!=null&&d!==t;return r(n,s.tablet)&&(i.tablet=s.tablet),r(a,s.phone)&&(i.phone=s.phone),i}var It="rowImageField",lc="boxOutsideCopy",cc={all:[{field:It,set:!0},{not:{context:lc,is:!0}}]},Bf={any:[{field:"bgImage",set:!0},cc]},Wa="boxInCopy",dc={any:[{not:{field:It,set:!0}},{not:{context:Wa,is:!0}}]},Mf={all:[{not:{field:"bgImage",set:!0}},dc]},Ua={all:[{not:{context:"parent.bgImage",set:!0}},{any:[{not:{context:`parent.${It}`,set:!0}},{not:{context:Wa,is:!0}}]}]};function be(e,t,n){return e.some(a=>(typeof a=="object"?a.value:a)===n)?n:t}var hc="small",uc="dot",pc=[{label:"Small",value:"small"},{label:"Display",value:"display"}],Pt=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],Ya={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},mc={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},fc={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 Uf(e){return be(pc,hc,e)}function $a(e){return be(Pt,uc,e)}function Yf(e){return mc[e]}function Ka(e,t){return fc[e][t]}var Vf=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function Va(e){return Pt.some(t=>t.value===e)?$a(e):void 0}var gc="overflow-x-clip [&>*]:shrink-0 [&>[data-sf-box-items]>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>[data-sf-box-items]>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>[data-sf-box-items]>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function K(e,t){return e==="row"&&Va(t)!==void 0}function Xf(e,t){return K(e,t)?gc:""}var wc="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)] [&>[data-sf-box-items]:last-child>*:not(:last-child)_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-none";function jf(e,t){return K(e,t)?wc:""}function zf(e,t){if(!K(e,t))return{};let n=Va(t),a=/^text-\[([\d.]+)em\]$/.exec(Ka("small",n))?.[1],o=Ya[n];return{"--sf-sep-mark":o===""?"none":JSON.stringify(o),...a?{"--sf-sep-k":a}:{}}}var qa={sectionPaddingTop:0,sectionPaddingBottom:0},ye={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},Ee={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function tg(e,t){let n=typeof e=="string"&&te(ye,e)?ye[e]:"",a=typeof t=="string"&&te(Ee,t)?Ee[t]:"";return[n,a].filter(Boolean).join(" ")}function bc(e){return e===!0||e==="wrap"?"flex-wrap":""}var yc={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},Ec={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},Sc={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},_c={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},Tc={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function j(e,t){return typeof t=="string"&&te(e,t)?t:void 0}function Dt(e,t,n){let a=Ga("same",e,t,n),o={};return a.tablet!==void 0&&a.tablet!==e&&(o.tablet=a.tablet),a.phone!==void 0&&a.phone!==e&&(o.phone=a.phone),o}function Bt(e,t,n){return[e.tablet?t[e.tablet]:"",e.phone?n[e.phone]:""].filter(Boolean).join(" ")}function vc(e,t,n){return Dt(j(ye,e)??"start",j(ye,t),j(ye,n))}function ng(e,t,n){return Bt(vc(e,t,n),yc,Ec)}function ag(e,t,n){let a=j(Ee,e)??"stretch";if(a==="stretch")return"";let o=Dt(a,j(Ee,t),j(Ee,n));return Bt(o,Sc,_c)}function Ht(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function og(e,t){let n=bc(e)===""?"nowrap":"wrap",a=Ht(t);return a&&a!==n?Tc[a]:""}var sg="Block widths",Za=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],xc="data-sf-box-items",ig=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${xc}\\][^\\s"'\`]*`,"g");var rg=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function lg(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in Fe?"custom":"content"}var Qa=4,Xa=10;function Oc(e,t){if(!Number.isInteger(t)||t<2||t>Qa||e.length!==t-1||!e.every(o=>typeof o=="number"&&Number.isFinite(o)))return;let n=[],a=0;return e.forEach((o,s)=>{let i=100-a-Xa*(t-1-s),r=Math.min(i,Math.max(Xa,Math.round(o)));n.push(r),a+=r}),n}function ja(e,t,n){if(!Array.isArray(t))return;let a=Oc(t,n),o=a?[...a,100-a.reduce((i,r)=>i+r,0)]:[],s={};for(let i=0;i<Qa;i+=1)s[`--${e}-${i+1}`]=o[i]??1;return s}function cg(e,t,n){let a=ja("sf-share",e,n),o=ja("sf-share-tablet",t,n);return a||o?{...a,...o}:void 0}function kc(e,t){let n=Array.from({length:t},()=>1),a=Za.find(i=>i.value===e);if(!a?.weights||t<1)return n;let[o,s]=a.weights;return o>1&&(n[0]=o),s>1&&(n[t-1]=s),n}function dg(e,t){if(typeof e!="string"||!(e in Fe)||e==="equal")return e;let n=kc(e,t),a=n.reduce((o,s)=>o+s,0);return n.slice(0,-1).map(o=>Math.round(o/a*100))}var V="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",Fe={equal:V,bigLeft:`${V} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${V} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${V} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${V} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${V} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},Ac=`${V} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function Rc(e){return Array.isArray(e)?Ac:typeof e=="string"?Fe[e]??"":""}var Ja={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},Ua,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(Fe)}]}]}]},eo="view-wide:max-view-desktop:flex-row!",X=`${eo} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,to={content:`${eo} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:X,bigLeft:`${X} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${X} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${X} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${X} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${X} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},Cc=`${X} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function Lc(e){return Array.isArray(e)||typeof e=="string"&&e in to?e:null}function hg(e){if(e.direction!=="row"||K(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||no(e.columns)!==""||ao(e.columnsTablet)!=="")return"";let t=Lc(e.shareTablet);return t===null?"":typeof t=="string"?to[t]:Cc}var Nc="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function ug(e){return Rc(e)===""?Nc:""}var pg="Columns",mg=1,fg=3,Mt={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},gg=Za.filter(e=>e.value==="content"||e.value==="equal"),wg="equal",bg=1,yg=6,se="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",Ic={1:`${se} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${se} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${se} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${se} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${se} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${se} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function no(e){return typeof e=="number"?Ic[e]??"":""}var Pc={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function ao(e){return typeof e=="number"?Pc[e]??"":""}function Eg(e){return e.direction!=="row"||K(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":ao(e.columnsTablet)}function Sg(e){return e.direction!=="row"||K(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":no(e.columns)}var oo={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},so={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},_g=Object.keys(oo).map(Number),Tg=Object.keys(so).map(Number);function vg(e,t,n=!1){let a=typeof e=="number"?oo[e]??"":"",o=so[Number(t)]??"";return!a&&!o?"":[a,o,n?"gap-y-0!":""].filter(Boolean).join(" ")}var Hc="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",Dc={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Bc="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function Mc(e,t){return(Ht(e)??Ht(t)??"wrap")==="nowrap"}function xg(e,t,n,a){let o=Mt[Number(e)];if(!o)return"max-view-wide:flex-col";let s=Mc(n,a);return io(e,t)?s?Bc:Hc:s?Dc[Number(e)]:o}function Og(e,t){return Number(e)in Mt&&!io(e,t)}function io(e,t){return Number(e)in Mt&&t==="content"}var kg="Block spacing",Ag=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],Fc="sf-box-gap-only";function Rg(e){return e==="gap"?Fc:""}var za={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},Gc={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Cg(e,t,n){let a=s=>j(za,s),o=Dt(e==="gap"?"gap":"each",a(t),a(n));return Bt(o,za,Gc)}var ro={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0}};var{text:Hg,tag:Dg,...Wc}=ro.defaultProps,b=Wc,x={...b,tone:"dim"},Uc={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},y={...Uc,direction:"column",...qa},D=(e,t=e,n=e,a=t)=>({sectionPaddingTop:e,sectionPaddingRight:t,sectionPaddingBottom:e,sectionPaddingLeft:t,sectionPaddingTopPhone:n,sectionPaddingRightPhone:a,sectionPaddingBottomPhone:n,sectionPaddingLeftPhone:a}),Yc=e=>({fillColor:e}),lo=(e,t,n={})=>({...y,widthFit:"fixed",width:e,minWidth:e,sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",...t?Yc(t):{},...n}),_=(e,t,n,a)=>({sizeToken:{step:e,px:t,...a?{stepPhone:a}:{},...n?{pxPhone:n}:{}}}),co={case:"upper"},Ft={textStyle:"body-5",...co},Gt=(e,t)=>({..._("label",e,t),letterSpacing:.2,...co}),Bg=(e,t)=>({...Ft,...Gt(e,t)});function S(e,t,n=""){return e.map((a,o)=>{let s=n?`${n}.${o}`:String(o),i={...a.props??{}};for(let[r,l]of Object.entries(a.slots??{}))i[r]=S(l,t,s);return{type:a.type,props:{...i,id:t(a.type,s)}}})}import{isNodeList as yd}from"efficient-easel/data";function fo(e,t){if(e!=="Cards")return t;if(t.template!==void 0)return ho(t);let n=w(t.id)??"Cards",a=po(n);if(t.cardStyle==="label-only"){let s=Array.isArray(t.items)&&t.items.some(i=>w(i?.href)!==void 0);return ho({...t,template:mo(a,s)})}let o=v(t)?Ge:ie;return{...t,template:uo(a,o)}}var $c=e=>{let[t,n]=e?[ie,Ge]:[Ge,ie];return new Map([[t.title,n.title],[t.body,n.body]])};function go(e,t){let n=null;return e.forEach((a,o)=>{let s=a?.props;if(!s)return;let i=s,r=s[E];a.type==="Text"&&typeof r=="string"&&t.has(r)&&(i={...i,[E]:t.get(r)});let l=s[m];if(Array.isArray(l)){let d=go(l,t);d!==l&&(i={...i,[m]:d})}i!==s&&(n??=[...e],n[o]={...a,props:i})}),n??e}function ho(e,t){if(!Array.isArray(e.template))return e;let n=$c(!!v(e)),a=t?new Map([...n].filter(([s,i])=>t(i)&&!t(s))):n;if(!a.size)return e;let o=go(e.template,a);return o===e.template?e:{...e,template:o}}var Kc="label";function wo(e){if(e.template!==void 0)return e;let t=w(e.id)??"CardList",n={type:g,props:{...y,name:"Item"},slots:{[m]:[f(Kc,{...b,tag:"p"},Se)]}};return{...e,template:S([n],(a,o)=>o==="0"?`${t}~item`:`${t}~item.${o.slice(2)}`)}}var Wt="ArticleBody",Vc={textStyle:"heading-3",..._("headingSmall",20),weight:500,lineHeight:1.4,align:"center"},Xc={...Se,align:"center"},bo=640,jc=()=>[f("heading",{...b,tag:"h2",align:"center",maxWidth:bo},Vc),f("paragraph",{...x,tag:"p",align:"center",maxWidth:bo},Xc)],zc=e=>S(jc(),e);function qc(e){return zc((t,n)=>`${e}~${n==="0"?"heading":"paragraph"}`)}function yo(e){if(e.template!==void 0)return e;let t=typeof e.id=="string"&&e.id.trim()?e.id:Wt;return{...e,template:qc(t)}}var Zc="label",Qc=()=>({type:"LogoBlock",props:{[E]:Zc}}),Eo=e=>{let t=w(e.id)??"Logos";return{...e,template:S([Qc()],()=>`${t}~logo`)}};function So(e){return!v(e)||e.template!==void 0?e:Eo(e)}function aw(e){if(!v(e))return e;let t=e.template;return t!==void 0&&!(Array.isArray(t)&&t.length===0)?e:Eo(e)}import{addShowWhenFacts as Jc}from"efficient-shell/format";import{showWhenOf as rw,shownForOption as lw,truthy as cw,withRowRules as dw,withRowsShownWhen as _o,withShowWhen as hw}from"efficient-shell/format";var uw=Jc;function pw(e,t,n){return e.slice(0,-1).reduceRight((a,o)=>({any:[{all:[t(o),n(o)]},{all:[{not:t(o)},a]}]}),n(e[e.length-1]))}var ed="inline",td=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var nd={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},Subscribe:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Subscribe"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},bw="SectionHeader";function yw(e){return te(nd,e)}function To(e){return be(td,ed,e)}var ad=new Set(["Flex"]);function Ew(e){return!!e?.type&&ad.has(e.type)}var vo={not:{field:"headPlacement",is:"own-box"}},Sw={not:vo};function _w(e,t,n){return _o(e,n,vo)}var vw="data-sf-spec-region";function xw(e){return e.writable===!0&&e.sized===!0}function Ow(e,t,n){if(!e)return;let a=n[e];if(a)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${a}, ${t.builtIn})`}}function kw(e){let t=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(e);if(!t)throw new Error(`builtInOf: no --size-* fallback in ${e}`);return t[1]}function xo(e){return`@${e}`}function Aw(e,t){if(!t.startsWith("@"))return null;let n=t.slice(1);return n in e?n:null}function Rw(e,t){return t&&t in e?t:null}var Ut={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0,sized:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0,sized:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0,sized:!0}},Lw=Ut;var od="question",sd="answer",id={textStyle:"body-1",fontRole:"heading",..._("body",18,15),weight:500,case:"upper",letterSpacing:.02,lineHeight:1.5},rd={textStyle:"body-1",..._("body",15),lineHeight:1.7};function Gw(){return Object.keys(Ut).map(xo)}var ld=()=>({type:g,props:{...y,gap:0,name:"Question"},slots:{rowTitle:[f(od,{...b,tag:"p",widthFit:"fill"},id)],[m]:[f(sd,{...x,tag:"p",widthFit:"fill",maxWidth:760},rd)]}});function cd(e){return To(e.headPlacement)==="own-box"?!1:["num","title","linkText"].some(t=>w(e[t])!==void 0)}function Oo(e){if(e.template!==void 0||cd(e))return e;let t=w(e.id)??"FAQ",n=0;return{...e,template:S([ld()],a=>a===g?`${t}~row`:`${t}~row.${n++}`)}}var dd=["below","left","right"];function hd(e){return dd.includes(e)?e:"below"}function Yt(e){return hd(e)!=="below"}function $t(e){return Array.isArray(e)?e.map($t):!e||typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([t,n])=>t!=="id"&&n!==void 0&&!(Array.isArray(n)&&n.length===0)).sort(([t],[n])=>t<n?-1:t>n?1:0).map(([t,n])=>[t,$t(n)]))}var F=e=>JSON.stringify($t(e));var Ro=e=>v(e)===Lt,We=Gt(11),ud={textStyle:"body-1",..._("body",18),weight:500,lineHeight:1.2},Qw=()=>({type:g,props:{...y,gap:8,gapPhone:8,...D(20,24,20,20),name:"Office"},slots:{[m]:[f("badge",{...b,tag:"p",widthFit:"fill"},We,!0),f("role",{...b,tag:"p",widthFit:"fill"},We,!0),f("city",{...b,tag:"p",widthFit:"fill"},ud),f("country",{...x,tag:"p",widthFit:"fill"},We),f("address",{...x,tag:"p",widthFit:"fill"},We),{type:"ButtonBlock",props:{variant:"link",label:"",href:"",[E]:"linkLabel",[C]:"href"}}]}}),Co={textStyle:"body-1",fontRole:"heading",..._("body",16),weight:500,lineHeight:1.25},Vt={textStyle:"body-1",..._("body",14),lineHeight:1.5},pd=()=>({type:g,props:{...y,gap:4,gapPhone:4,...D(16,4),sectionBorder:{bottom:1},name:"Office"},slots:{[m]:[f("city",{...b,tag:"p",widthFit:"fill"},Co),f("address",{...x,tag:"p",widthFit:"fill"},Vt),f("phone",{...x,tag:"p",widthFit:"fill"},Vt)]}});function Lo(e){let t=w(e.id)??"Footprint",n=0;return S([pd()],a=>a===g?`${t}~office`:`${t}~office.${n++}`)}function No(e){return Array.isArray(e.template)&&e.template.length>0&&F(e.template)===F(Lo(e))}var Io=e=>e===void 0||Array.isArray(e)&&e.length===0;function ko(e){return Yt(e.listPosition)?!Io(e.template)||Ro(e)?e:{...e,template:Lo(e)}:No(e)?{...e,template:[]}:e}var md=Co,fd=Vt,gd={textFit:"line"},Xt=(e,t,n="",a={},o={})=>{let s=f(e,{...t?x:b,tag:"p",...a},{...fd,...o});return n?{...s,props:{...s.props,[C]:n}}:s},Kt=(e,t,n,a)=>({type:g,props:{...y,gap:0,gapPhone:0,[zt]:[e],name:a},slots:{[m]:[Xt(e,t,n,gd,{align:"right"})]}}),wd=e=>({type:g,props:{...y,direction:"row",justify:"between",share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",gap:12,gapPhone:12,...e?D(20,24):{...D(16,4),sectionBorder:{bottom:1}},name:"Dealer"},slots:{[m]:[{type:g,props:{...y,justify:"center",gap:0,gapPhone:0,widthFit:"fill",name:"Dealer words"},slots:{[m]:[{type:g,props:{...y,gap:4,gapPhone:4,widthFit:"fill",name:"Dealer name"},slots:{[m]:[f("name",{...b,tag:"p",widthFit:"fill"},md),Xt("address",!0)]}},Xt("place",!0,"",{widthFit:"fill"})]}},{type:g,props:{...y,align:"end",gap:4,gapPhone:4,name:"Dealer contact"},slots:{[m]:[Kt("distance",!0,"","Dealer distance"),Kt("phone",!1,"phoneHref","Dealer phone"),Kt("website",!1,"websiteHref","Dealer website")]}}]}}),bd=e=>{let t=wd(e),n={type:g,props:{...y,...D(0,12),name:"Dealer"},slots:{[m]:[{...t,props:{...t.props,name:"Dealer row"}}]}};return e?t:n};function jt(e,t){let n=w(e.id)??"Footprint",a=0;return S([bd(t)],(o,s)=>s==="0"?`${n}~dealer`:`${n}~dealer.${a++}`)}function Ao(e){if(!Array.isArray(e.template)||e.template.length===0)return!1;let t=F(e.template);return t===F(jt(e,!0))||t===F(jt(e,!1))}function Po(e){if(Ro(e)){let n=jt(e,!Yt(e.listPosition));return!(Io(e.template)||No(e)||Ao(e))||F(e.template??[])===F(n)?e:{...e,template:n}}if(!Ao(e))return ko(e);let t={...e,template:[]};return ko(t)}var Ho="template",Ed="Card template",Ue="CardList",Do=["Text","ImageBlock","ButtonBlock","Flex"],E="rowField",C="rowLinkField";function pb(){return{type:"slot",allow:[...Do]}}var Sd=Do.filter(e=>e!=="ButtonBlock"),Bo="items",Mo="itemFields";function mb(){return{type:"slot",allow:[...Sd]}}var _d=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>Oo(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region \xB7 country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>Po(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>fo("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:Ue,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>So(e)},{block:Ue,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:Bo,seed:e=>wo(e)},{block:Wt,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>yo(e)}];function T(){return oe("efficient.card-templates",()=>new Map(_d.map(e=>[e.block,e])))}function fb(e){for(let t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");let n=[];for(let i of t.blocks??[]){if(typeof i?.type!="string"||!i.type)throw new Error(`The card template of ${t.block} names an empty block.`);if(i.type===Ye)throw new Error(`The card template of ${t.block} names "${Ye}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);n.some(r=>r.type===i.type)||n.push({type:i.type,label:i.label||i.type})}let a=[];for(let i of t.slots??[]){if(typeof i?.slot!="string"||!i.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);let r=w(i.label),l=Array.isArray(i.fields)?{fields:i.fields.map(d=>({...d}))}:null;a.some(d=>d.slot===i.slot)||a.push({slot:i.slot,...r?{label:r}:null,...l})}let o=a.some(i=>i.fields);if(o&&(t.fields.some(i=>i.everySource)||Ia(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);o?fe().add(t.block):fe().delete(t.block);let s=w(t.typedRows);T().set(t.block,{block:t.block,...a.length?{slots:a}:{},fields:t.fields.map(i=>({...i})),blocks:n,typedRows:s,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function Td(e,t){let n=e?T().get(e)?.seed:void 0;return n?n(t):t}function gb(e,t){let n=xd(e),a=(n.length?n:[Ho]).filter(r=>t[r]===void 0||Array.isArray(t[r])&&t[r].length===0);if(!a.length)return t;let o={...t};for(let r of a)delete o[r];let s=e?T().get(e)?.seedOnInsert:void 0,i=s?s(o):Td(e,o);return i===o?t:i}function wb(){for(let e of T().values())if(e.blocks?.length)return!0;return!1}function bb(e){return T().get(e)?.blocks??[]}function yb(e){for(let t of T().values())if(t.blocks?.some(n=>n.type===e))return!0;return!1}function Eb(e){return typeof e=="string"&&T().get(e)?.typedRows||""}function Sb(e){return typeof e=="string"&&T().get(e)?.linesBetween===!0}function _b(e){return typeof e=="string"&&T().has(e)}var vd=[{slot:Ho}];function $e(e){if(typeof e!="string")return[];let t=T().get(e);return t?t.slots??vd:[]}function xd(e){return $e(e).map(t=>t.slot)}function Od(e,t){return $e(e).some(n=>n.slot===t)}function Tb(e,t){let n=$e(e).find(a=>a.slot===t);return n?n.label??Ed:null}function qt(e,t){return t?$e(e).find(n=>n.slot===t)?.fields:void 0}function kd(e,t){let n=T().get(e)?.fields??[];return t?n.filter(a=>(a.kind??"text")===t):n}function Ad(e,t){if(typeof e!="string")return"";let n=qt(e,t);return(n?n.filter(a=>a.kind==="list"):kd(e,"list"))[0]?.key??""}function Rd(e,t,n){return Zt(e)||Ad(t,n)}function Fo(e,t,n){let a=typeof e?.type=="string"?e.type:"";if(!a)return[];let o=qt(a,n);if(o)return t?o.filter(l=>(l.kind??"text")===t):o;let s=T().get(a)?.fields??[],i=Me(v(e?.props))?.fields,r=i?.length?[...i.map(l=>({...l})),...s.filter(l=>l.everySource&&!i.some(d=>d.key===l.key))]:s;return t?r.filter(l=>(l.kind??"text")===t):r}function Cd(e,t,n,a){if(!e)return null;let o=qt(e,a);return o?o.find(s=>s.key===t)??null:n?Fo(n).find(s=>s.key===t)??null:T().get(e)?.fields.find(s=>s.key===t)??null}function Go(e,t){return!e||!t?null:e.fields?.find(n=>n.key===t)??Cd(e.ownerType,t,e.owner,e.slot)}function vb(e,t){return Go(e,t)?.plain===!0}function Zt(e,t=E){let n=e?.[t];return typeof n=="string"?n.trim():""}function xb(e,t){return e.key||String(t+1)}function Ob(e){let t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(let[n,a]of Object.entries(e))typeof a=="string"&&(t[n]=a);return t}var zt="hideWhenRowEmpty";function kb(e,t){let n=e[zt];return!t||!Array.isArray(n)||!n.length?!1:n.every(a=>typeof a!="string"||!t[a]?.trim())}var Wo={Text:{text:E,href:C},ImageBlock:{src:E,href:C},ButtonBlock:{label:E,href:C},LogoBlock:{alt:E,href:C},Breadcrumb:{currentCrumb:E}};var Ld=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Ab(e,t,n){return Nd(e,t,n)&&!Ld.has(`${e}.${n}`)}function Nd(e,t,n){return Id(e,t,n)!==""}function Id(e,t,n){let a=Wo[e]?.[n];return a?Zt(t,a):""}function Uo(e,t){return!t||!e?null:e[t]??""}function Pd(e,t){return Uo(e,t)?.trim()||void 0}function Rb(e,t,n,a,o,s){if(!n)return t;let i=null;for(let[r,l]of Object.entries(Wo[e]??{})){let d=Zt(t,l),p=Uo(n,d);if(p!==null){if(i??={...t},l===C){i[r]=Pd(n,d);continue}i[r]=Go({ownerType:a,fields:o,slot:s},d)?.mark==="accentItalic"?_a(p):p}}return i??t}function Ke(e,t){let n=e?.data?.content;if(!Array.isArray(n)||typeof t!="string")return;let a=(s,i)=>{for(let r of s){if(r?.props?.id===t)return i;for(let[l,d]of Object.entries(r?.props??{})){if(!yd(d))continue;let p=Od(r.type,l)?{owner:r,slot:l,direct:!0,nested:i!==null,underBox:!1}:i&&{owner:i.owner,slot:i.slot,direct:!1,nested:i.nested,underBox:i.underBox||r.type===g},h=a(d,p);if(h!==void 0)return h}}},o=a(n,null);return o===void 0?null:o}function Hd(e,t){let n=Ke(e,t);return n&&n.owner}function Dd(e,t){let n=Ke(e,t);return n&&n.slot}function Cb(e,t){let n=Ke(e,t);return n&&(n.direct?n.owner:null)}function Lb(e,t){let n=Ke(e,t);if(n!==void 0)return n===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:n.nested,underBox:n.underBox}}function Nb(e,t,n){if(t?.type!==Ue)return[];let a=Hd(e,t.props?.id);if(!a){let r=Me(v(t.props))?.fields,l=r?.length?r.map(h=>({...h})):Bd(t.props),d=(T().get(Ue)?.fields??[]).filter(h=>h.everySource&&!l.some(I=>I.key===h.key)),p=[...l,...d];return n?p.filter(h=>(h.kind??"text")===n):p}let o=Dd(e,t.props?.id)??void 0,s=Rd(t.props,a.type,o),i=s&&Fo(a,"list",o).find(r=>r.key===s)?.fields||[];return n?i.filter(r=>(r.kind??"text")===n):i}function Ib(e,t){return{[E]:"",[Bo]:e.map(n=>({...n})),[Mo]:t.map(n=>({...n}))}}function Bd(e,t){let n=e?.[Mo];if(!Array.isArray(n))return[];let a=n.flatMap(o=>{if(!o||typeof o!="object")return[];let{key:s,label:i,kind:r,multiline:l,alt:d,next:p}=o;if(typeof s!="string"||!s||typeof i!="string")return[];let h=r==="image"||r==="link"||r==="colour"?r:void 0;return[{key:s,label:i,...h?{kind:h}:{},...l===!0?{multiline:!0}:{},...typeof d=="string"&&d?{alt:d}:{},...typeof p=="string"&&p?{next:p}:{}}]});return t?a.filter(o=>(o.kind??"text")===t):a}var Ye="HostPart";var re={min:0,max:360,step:1},Yo="angle";function Db(e){let t=H(e);if(t===void 0)return null;let n=Math.min(re.max,Math.max(re.min,t));return n===re.min||n===re.max?null:{rotate:`${n}deg`}}import{MEDIA_ZONES as Md,MEDIA_ZONE_LABELS as Fd}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as Gd,hoverKindsOf as Xe,motionSeconds as Ve}from"efficient-shell/format";var k="hover",Ub="_gHover",Wd={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},z="highlight",Ud="Highlight",Yb=["none",z],$b={none:Wd.none,[z]:Ud};function Yd(e){return e[k]===z?z:"none"}var Kb="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",Vb="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function Xb(e,t){return Yd(e)!==z?null:{"--sf-hl-bg":t("surface"),"--sf-hl-ink":t("main")}}var $d=Xe(["none","lift"]);function jb(e){let t=e[k];return $d.includes(t)?t:"none"}var Vo=Xe(["none","nextImage","rotate"]),O={kind:k,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},tn="spinOnHover",$o=re,Xo={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},zb=Object.keys(Xo);function Kd(e){return Xo[e]??"none"}var Vd=Gd.rotateFallbackDeg,Xd=e=>e==="rendering"?"renderings":e,jd=e=>e==="renderings"?"rendering":e,jo=Object.freeze(Md.filter(e=>e!=="videos").map(Xd)),qb=Object.freeze(Object.fromEntries(jo.map(e=>[e,Fd[jd(e)]]))),zd=["finish","first"],Zb={finish:"Same finish",first:"First group"},qd=["card","picture"],Qb={card:"Whole card",picture:"Picture"},Qt={kind:"photos",group:"finish",cover:"card"},Jt=(e,t,n)=>e.includes(t)?t:n;function zo(e){return{kind:Jt(jo,e[O.mediaKind],Qt.kind),group:Jt(zd,e[O.mediaGroup],Qt.group),cover:Jt(qd,e[O.cover],Qt.cover)}}function Jb(){return{field:O.kind,is:"nextImage"}}function Zd(e,t){let n=e[O.kind];if(Vo.includes(n))return n;let a=e[tn];return typeof a=="boolean"?a?"rotate":"none":t}function Qd(e){let t=H(e);return t===void 0?Vd:Math.min($o.max,Math.max($o.min,t))}function ey(e,t){let n=Kd(t),a=Zd(e,n);return{kind:a,angle:a==="rotate"?Qd(e[O.angle]):null,duration:Ve("hover","duration",a==="rotate"?e[O.duration]:void 0),delay:Ve("hover","delay",a==="rotate"?e[O.delay]:void 0),...a==="nextImage"?{media:zo(e)}:{}}}function ty(e){let t={field:O.kind,in:[...Vo]};return{any:[{field:O.kind,is:"rotate"},{all:[{not:t},e==="rotate"?{not:{field:tn,is:!1}}:{field:tn,is:!0}]}]}}var qo=Xe(["none","mono"]),Jd=Xe(["none","nextImage","mono"]),Zo={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},ny=Object.keys(Zo);function eh(e){return Zo[e]??"none"}var Qo={zoom:"hoverZoom",darken:"hoverDarken"},en={min:100,max:150,step:1,unit:"%"};function th(e){let t=H(e[Qo.zoom]);if(t===void 0)return null;let n=Math.min(en.max,Math.max(en.min,t));return n===en.min?null:String(n/100)}function nh(e){let t=H(e[Qo.darken]);return t!==void 0&&t>0?t:null}var ay="hoverShow",oy="cardHover",sy="always",ah=["ImageBlock","Flex"];function oh(e,t,n=qo){let a=e[k];return n.includes(a)?a:t}function iy(e,t=""){let n=ah.includes(t)?Jd:qo,a=oh(e,eh(t),n),o=a==="mono";return{kind:a,duration:Ve("hover","duration",o?e[O.duration]:void 0),delay:Ve("hover","delay",o?e[O.delay]:void 0),...a==="nextImage"?{media:zo(e),...t==="Flex"?Ko(e):{}}:Ko(e)}}function Ko(e){let t=th(e),n=nh(e);return{...t?{zoom:t}:{},...n?{darken:n}:{}}}function ry(){return{not:{field:k,is:"nextImage"}}}function ly(e){return e==="none"?{field:k,in:["mono","nextImage"]}:{not:{field:k,is:"none"}}}function cy(e){return e==="none"?{field:k,is:"mono"}:{not:{field:k,in:["none","nextImage"]}}}var uy=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Jo=()=>({_partStyles:{text:{...Ft,color:"accent",letterSpacing:.3,lineHeight:1.5}}});var sh={...y,gap:12,gapPhone:12,...D(32,32,28,28)},ih={textStyle:"heading-3",..._("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02},Se={textStyle:"body-1",..._("body",15),lineHeight:1.6},f=(e,t,n,a=!1)=>({type:"Text",props:{...t,text:"",[E]:e,_partStyles:{text:{...a?Jo()._partStyles?.text??{}:{},...n}}}}),ie={title:"title",body:"body"},Ge={title:"name",body:"note"},rh=(e=ie)=>({type:g,props:{...sh,name:"Card"},slots:{[m]:[f(e.title,{...b,tag:"p",widthFit:"fill"},ih),f(e.body,{...x,tag:"p",widthFit:"fill"},Se)]}}),uo=(e,t)=>S([rh(t)],e),es={label:ie.title,href:"href"},lh={textStyle:"body-1",fontRole:"heading",color:"text",..._("body",17),weight:500,case:"upper",letterSpacing:.06,lineHeight:1.5},ch=lo(9,"main",{[Yo]:45}),dh=(e=!1)=>({type:g,props:{...y,name:"Card",direction:"row",align:"center",gap:16,gapPhone:16,phoneRow:2,sharePhone:"content",wrapPhone:!1,...D(32,28),[C]:es.href,...e?{[k]:z}:{}},slots:{[m]:[{type:g,props:{...ch,name:"Mark"}},f(es.label,{...b,tag:"p",widthFit:"fill"},lh)]}}),po=e=>(t,n)=>n==="0"?`${e}~card`:`${e}~card.${n.slice(2)}`,mo=(e,t=!1)=>S([dh(t)],e);import{parseHexColor as hh}from"efficient-shell/format";var nn=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],uh=nn.filter(e=>e.ink);function ts(e){let t={color:e.fg};for(let{role:n,token:a}of uh)t[a]=e[n];return t}var ph={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},mh=Object.freeze(ts(ph)),fh={fg:"var(--overlay-fg-on-light)",line:"color-mix(in srgb, var(--overlay-fg-on-light) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg-on-light) 76%, transparent)"},gh=Object.freeze(ts(fh));function Ty(e,t){let n=e?hh(e):null;return n?Qn(n,t)?mh:gh:null}var ns=-1,wh="sf-section-accent",Oy="Color",as=new Set(["CategoryBar","DocTabs"]),ky=new Set(["Flex"]),bh=0;function yh(e){return e===ns?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:bh}function Ay(e){return e??ns}function Eh(e){let t=`--theme-preset-${e}`,n={"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`};for(let{role:a}of nn)n[`--sf-sec-${a}`]=`var(${t}-${a}, var(--theme-${a}))`;return n}function Ry(e){let t=yh(e.sectionAccent);return t===null?null:{className:wh,style:Eh(t)}}import{FOLLOW_RULES as _h,resolveViewValue as Th,viewKeyAt as vh}from"efficient-easel/screen/lib/content/view-tiers";var an={desktop:"desktop",tablet:"tablet",phone:"mobile"},Sh=Object.keys(an);function os(e){return an[e??"desktop"]}function Ly(e){return Sh.find(t=>an[t]===e)??"desktop"}var rn=["desktop","tablet","phone"],sn=(e,t)=>vh(e,os(t)),ss=e=>e.flatMap(t=>rn.map(n=>sn(t,n))),on=e=>e===null||e===""?void 0:e,xh=(e,t,n)=>Th("same",on(e),on(t),on(n),_h);function is(e,t,n,a=e[t]){return xh(a,e[sn(t,"tablet")],e[sn(t,"phone")])[n]}import{createContext as Bs,createElement as ve,useContext as xe}from"react";import{Fragment as pu,jsx as L}from"react/jsx-runtime";import{createContext as bn,useContext as N}from"react";import{jsx as ce,Fragment as bs}from"react/jsx-runtime";import{createContext as Wh,useContext as ys,useEffect as Uh,useRef as Yh,useState as $h}from"react";import{SCROLL_ZOOM_VAR as gs}from"efficient-shell/format";import{readEntrance as kh}from"efficient-shell/format";var _e={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},ln="sectionAnimation",Oh=ss(Object.values(_e));var rs="sf-entrance",Ah=e=>e!=null&&e!=="";function Rh(e,t){let n=e[_e[t]];return t==="kind"&&!Ah(n)?e[ln]:n}var je=(e,t,n)=>is(e,_e[t],n,Rh(e,t));function cn(e,t){return kh(je(e,"kind",t),je(e,"from",t),je(e,"duration",t),je(e,"delay",t))}var Ch=e=>({desktop:cn(e,"desktop"),tablet:cn(e,"tablet"),phone:cn(e,"phone")});function $y(e){let t=Ch(e);return rn.every(n=>t[n].kind==="none")?null:t}var Lh={...Object.fromEntries([...as].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)",[Ye]:"a host part draws its data block's answer with no element of its own (lib/content/card-template HOST_PART_TYPE); a wrapper would be one, and the host's content is not the merchant's to animate"},Ky=new Set(Object.keys(Lh));function ls(e,t,n,a){return t<=0?1/0:a?2*(e-4)/(t+n):2*(e-n/2-4)/t}function cs(e,t,n){let a=r=>r.width>0&&r.height>0;if(!a(e)||t.some(r=>r.mark&&!a(r.rect)))return 1;let o=e.left+e.width/2,s=e.top+e.height/2,i=n;for(let{rect:r,mark:l}of t){let d=Math.abs(r.left+r.width/2-o),p=Math.abs(r.top+r.height/2-s),h=Math.max(ls(d,e.width,r.width,l),ls(p,e.height,r.height,l));i=Math.min(i,Math.max(1,h))}return i}var ds=["cover","contain"],Nh={cover:"Cover",contain:"Contain"},jy="Image fit";function dn(e,t){return ds.includes(e)?e:t}function zy(){return ds.map(e=>({label:Nh[e],value:e}))}function qy(e){return e==="contain"?"object-contain":"object-cover"}function hn(e,t){return e!=="auto"&&t==="cover"}function ze(e){return`color-mix(in srgb, var(--overlay-scrim) ${Math.round(Math.min(1,Math.max(0,e))*1e3)/10}%, transparent)`}function eE(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"screen":return"aspect-[16/10]";case"portrait":return"aspect-[4/5]";case"video":return"aspect-[16/9]";case"panorama":return"aspect-[21/9]";case"story":return"aspect-[9/16]";case"poster":return"aspect-[2/3]";case"auto":return"";default:return"aspect-square"}}var qe=[{shape:"auto",image:"auto",ratio:null,label:"Auto"},{shape:"story",image:"9/16",ratio:[9,16],label:"Story 9:16"},{shape:"poster",image:"2/3",ratio:[2,3],label:"Poster 2:3"},{shape:"tall",image:"3/4",ratio:[3,4],label:"Tall 3:4"},{shape:"portrait",image:"4/5",ratio:[4,5],label:"Portrait 4:5"},{shape:"square",image:"1/1",ratio:[1,1],label:"Square 1:1"},{shape:"landscape",image:"4/3",ratio:[4,3],label:"Landscape 4:3"},{shape:"screen",image:"16/10",ratio:[16,10],label:"Screen 16:10"},{shape:"video",image:"16/9",ratio:[16,9],label:"Video 16:9"},{shape:"wide",image:"2/1",ratio:[2,1],label:"Wide 2:1"},{shape:"panorama",image:"21/9",ratio:[21,9],label:"Panorama 21:9"}];function tE(e){return qe.filter(t=>e.includes(t.shape))}function nE(e){return e==="below"}var aE=`linear-gradient(180deg, transparent 40%, ${ze(.85)} 100%)`,oE=`linear-gradient(0deg, transparent 40%, ${ze(.85)} 100%)`,sE=ze(.45);var Ih=qe.map(e=>e.image),B="fill",dE={label:"Fill row",value:B,showWhen:Ja},un="4/3",hs={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},ps={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:hs,tablet:hs,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function hE(e,t,n){return t&&!le(n)?"all":e??"wide"}function us(e){return ps[e]}var uE=ps.all;function ms(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}var Ph={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]"},Hh={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]"},Dh={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]"},Bh={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!"},pn=e=>Ih.includes(e),le=pn;function pE(e){let t=pn(e)?qe.find(n=>n.image===e)?.ratio:null;return t?`${t[0]} / ${t[1]}`:null}function mE(e,t,n){return n==="contain"?!0:[e,t??e].every(a=>a!==B&&(!pn(a)||a==="auto"))}function fE(e,t){return e===B&&!t?un:e}function gE(e){return e===B?un:le(e)?e:void 0}function fs(e,t){return le(t)?t===e?null:t:e===B?un:null}function Mh(e,t){let n=fs(e,t);return hn(e,"cover")||n!==null&&hn(n,"cover")}function Fh(e,t,n){return dn(e,"cover")==="cover"&&Mh(t,n)}function wE(e,t,n,a){return e==="desktop"?Fh(t,n,a):dn(t,"cover")!=="cover"?!1:Gh(e==="tablet"?n:fs(n,a)??n)}var Gh=e=>e===B||le(e)&&e!=="auto";function bE(e,t,n="wide"){return e===B&&n==="all"?us("all").frame:t===null?le(e)?Ph[e]:"":[e===B?us(n).frame:le(e)?Hh[e]:"",e===B&&n==="desktop"?Bh[t]:Dh[t]].filter(Boolean).join(" ")}var Qe=Wh(null);function OE({attrs:e,style:t,children:n}){return ce(Qe.Provider,{value:{attrs:e,style:t},children:n})}function Es({children:e}){return ce(Qe.Provider,{value:null,children:e})}function kE({fill:e=null,children:t}){let n=ys(Qe);return n?ce("div",{className:ms(e),...n.attrs,style:n.style,children:t}):ce(bs,{children:t})}var Ze="data-sf-mark";function ws(e){let t=e.getBoundingClientRect(),n=e.firstElementChild,a=n&&typeof n.offsetWidth=="number"?n:e,o=Math.max(a.offsetWidth,e.offsetWidth),s=Math.max(a.offsetHeight,e.offsetHeight);return{left:t.left+t.width/2-o/2,top:t.top+t.height/2-s/2,width:o,height:s}}function Kh(e){return e.closest(`[${Ze}]`)||e.closest("style, script")?!1:[...e.childNodes].some(t=>t.nodeType===3&&(t.textContent??"").trim()!=="")}var Ss=e=>e.closest(`.${rs}`)??e.ownerDocument.body;function Vh(e,t){let n=Ss(e),a=[];for(let o of n.querySelectorAll(`[${Ze}]`))o!==e&&a.push({rect:ws(o),mark:!0});for(let o of n.querySelectorAll("*")){if(o.contains(e)||!Kh(o))continue;let s=o.getBoundingClientRect();s.width===0||s.height===0||a.push({rect:{left:s.left,top:s.top,width:s.width,height:s.height},mark:!1})}return cs(ws(e),a,t)}function AE({inCell:e=!1,children:t}){let n=ys(Qe),a=Yh(null),[o,s]=$h(null),i=n?Number.parseFloat(String(n.style[gs])):Number.NaN;if(Uh(()=>{let l=a.current;if(!l||!Number.isFinite(i))return;let d=()=>s(Vh(l,i));d();let p=l.ownerDocument.defaultView?.ResizeObserver;if(!p)return;let h=new p(d),I=Ss(l);h.observe(l),h.observe(I);for(let P of I.querySelectorAll(`[${Ze}]`))P!==l&&h.observe(P);return()=>h.disconnect()},[i]),!n)return ce(bs,{children:t});let r=Number.isFinite(i)?{...n.style,[gs]:String(o??1)}:n.style;return ce("span",{ref:a,className:e?"inline-flex min-w-0 max-w-full items-center justify-center":"inline-flex items-center justify-center",[Ze]:"",...n.attrs,style:r,children:t})}import{FOLLOW_RULES as Xh,resolveViewValue as jh}from"efficient-easel/screen/lib/content/view-tiers";import{LENGTH_UNITS as zh}from"efficient-easel/screen/lib/content/length-units";var qh=["auto","fixed","screen","fill"],Zh=zh.filter(e=>e==="px"||e==="%"),Qh="svh",Jh="vh",eu="var(--sf-header-h, 88px)",tu={min:40,max:2e3,step:10,fallback:600},nu={min:10,max:200,step:5,fallback:100},au="sf-section-minh",Te="grid-cols-[minmax(0,1fr)]",_s={base:"--sf-section-minh",small:"--sf-section-minh-s"},fn=e=>typeof e=="string"&&qh.includes(e),ou=e=>typeof e=="string"&&Zh.includes(e);function Je(e){let t=fn(e.sectionHeightMode)?e.sectionHeightMode:"auto",n=t==="screen"?"%":ou(e.sectionHeightUnit)?e.sectionHeightUnit:"px",a=t==="screen"?nu.fallback:tu.fallback,o=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:a;return{mode:t,value:o,unit:n}}function xs(e){let{mode:t,value:n,unit:a}=Je(e);if(t==="auto"||t==="fill")return;if(t==="fixed"&&a==="px")return[`${n}px`,null];let o=n/100,s=i=>t==="screen"?`(100${i} - ${eu})`:`100${i}`;return[`calc(${s(Jh)} * ${o})`,`calc(${s(Qh)} * ${o})`]}function Os(e){let t=xs(e);if(!t)return;let[n,a]=t;return{display:"grid",[_s.base]:n,...a?{[_s.small]:a}:{}}}var NE=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),IE="Height",ks="sf-section-minh-phone",Ts={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function As(e){return fn(e.sectionHeightModePhone)}function su(e){return Je({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}var Rs="sf-section-minh-tablet",vs={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function Cs(e){return fn(e.sectionHeightModeTablet)}function iu(e){return Je({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function gn(e){let t=Os(e),n=(r,l,d)=>xs({sectionHeightMode:r,sectionHeightValue:l,sectionHeightUnit:d})??(t?["auto",null]:void 0),a=Cs(e)?n(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,o=As(e)?n(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):a;if(!t&&!a&&!o)return null;let s=[au,Te],i={...t??{}};return a&&(s.push(Rs),i[vs.base]=a[0],a[1]&&(i[vs.small]=a[1])),o&&(s.push(ks),i[Ts.base]=o[0],o[1]&&(i[Ts.small]=o[1])),{className:s.join(" "),style:i}}function PE(e){return gn(e)!==null||et(e).length>0}var mn=`grid ${Te}`,Ls="h-full",ru="view-tablet:max-view-desktop:grid",Ns="max-view-tablet:grid",lu="view-wide:max-view-desktop:grid",cu="max-view-wide:grid",du=`${Ns} ${Te}`;function HE(e,{atSectionLine:t=!1}={}){if(et(e).length>0)return mn;let n=gn(e);if(!n)return"";if(Os(e))return mn;let a=n.className.split(" "),o=t?ru:lu,s=t?Ns:cu;if(!a.includes(Rs))return t?du:`${s} ${Te}`;let i=a.includes(ks);return[o,i?s:"",Te].filter(Boolean).join(" ")}var Is="data-sf-height-fill",hu=["desktop","tablet","mobile"],uu={desktop:"view-desktop:[.flex-col>&]:grow! view-desktop:[.flex-row>&]:self-stretch",tablet:"view-wide:max-view-desktop:[.flex-col>&]:grow! view-wide:max-view-desktop:[.flex-row>&]:self-stretch",mobile:"max-view-wide:[.flex-col>&]:grow!"};function et(e){let t=e,n=jh("heightMode",Je(t).mode,Cs(t)?iu(t).mode:null,As(t)?su(t).mode:null,Xh),a={desktop:n.desktop==="fill",tablet:n.tablet==="fill",mobile:n.phone==="fill"};return hu.filter(o=>a[o])}function DE(e){return et(e).map(t=>uu[t]).join(" ")}function BE(e){let t=gn(e);return et(e).length===0?t:t?{className:`${t.className} grid`,style:t.style}:{className:mn}}var Ps={stretchedRow:!1,fillingColumn:!1},A=bn(null),Hs=()=>N(A)!==null;function KE({line:e,draw:t}){return L(pu,{children:t(we(e,Hs()))})}var VE=(e="by-box")=>we(e,Hs()),XE=()=>N(A),jE=()=>N(A)?.id??null,G=bn(!1);function mu(){let e=N(A)?.stretchedRow===!0,t=N(G);return e&&!t}var fu=()=>N(G);function gu(){let e=N(A),t=mu(),n=fu();return{fill:n?` ${Ls}`:"",inner:a=>{let o=t||n?L(G.Provider,{value:!0,children:a}):a;return e?.columnsRow?L(A.Provider,{value:{...e,columnsRow:!1},children:o}):o}}}function zE({className:e,style:t,attrs:n,children:a}){let{fill:o,inner:s}=gu(),i=yn();return i.scope(L("div",{className:En(`${e}${o}`,i.className),...t?{style:t}:{},...n,...i.attrs,children:s(a)}))}var wn=bn(!1);function qE({children:e}){return L(wn.Provider,{value:!0,children:L(G.Provider,{value:!0,children:e})})}function ZE({children:e,ownPictures:t=!1}){let n=N(A),a=N(wn),o=N(G),s=a&&o,i=n===null?null:n.id===void 0?Ps:{...Ps,id:n.id};return L(A.Provider,{value:i,children:L(wn.Provider,{value:!1,children:L(G.Provider,{value:s,children:t?e:L(Es,{children:e})})})})}var tt=Bs(null),Ds="data-sf-view-hide",Ms=e=>ve(tt.Provider,{value:null},e),Fs={className:"",attrs:{},scope:Ms},wu=Fs,Gs=Bs(null),aS=(e,t)=>e?{className:e,views:t}:null,bu=e=>ve(tt.Provider,{value:null},ve(Gs.Provider,{value:null},ve(G.Provider,{value:!0},e))),oS=(e,t,n={})=>e?{className:e,words:t,...n}:null,Ws=(e,t)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:we(e.line??"by-box",t)?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function yn(){let e=xe(tt),t=xe(Gs),n=xe(A)!==null;if(e===null&&t===null)return wu;let a=e===null?null:Ws(e,n);return t===null?{className:a.className,attrs:{[Ds]:a.words},scope:Ms}:{className:a?`${a.className} ${t.className}`:t.className,attrs:{...a?{[Ds]:a.words}:{},[Is]:t.views},scope:bu}}function sS(){let e=xe(tt),t=xe(A)!==null;return e===null?"":Ws(e,t).className}var En=(e,t)=>t?e?`${e} ${t}`:t:e;function iS(e){let t=yn(),n=e.takes===!1?Fs:t,a={},o=!1;for(let[s,i]of Object.entries(e))s==="as"||s==="takes"||s==="children"||(s==="className"?(a.className=En(i,n.className),o=!0):a[s]=i);return!o&&n.className&&(a.className=n.className),n.scope(ve(e.as??"div",{...a,...n.attrs},e.children))}var lS={small:54,medium:66,large:84},yu=44,Eu=16,Su=140,cS={min:Eu,max:Su,step:1},dS=yu*4;import{forwardRef as _u}from"react";import{imageCopyUrl as Us,imageSrcSet as Ys}from"efficient-shell/image-copies";import{jsx as xu}from"react/jsx-runtime";var Tu={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"};function $s(e,t,n){if(n){let a=Ys(e);return a?{src:Us(e,1280),srcSet:a,sizes:n}:{src:e,sizes:n}}if(t&&t>0){let a=Ys(e,{maxWidth:t*3});return a?{src:Us(e,t*2),srcSet:a,sizes:`${t}px`}:{src:e}}return{src:e}}var vu=_u(function({src:t,width:n,height:a,fill:o,priority:s,loading:i,style:r,quality:l,placeholder:d,blurDataURL:p,unoptimized:h,loader:I,overrideSrc:P,sizes:W,...Oe},nt){let ke=P??(typeof t=="string"?t:t.src),at=$s(ke,o?void 0:Number(n)||void 0,W??(o?"100vw":void 0));return xu("img",{ref:nt,...at,width:o?void 0:n,height:o?void 0:a,loading:s?"eager":i??"lazy",fetchPriority:s?"high":void 0,decoding:"async",style:o?{...Tu,...r}:{color:"transparent",...r},...Oe})}),mS=vu;function fS(e){let t=e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),n=e.fill?void 0:Number(e.width)||void 0;return{props:$s(t,n,e.sizes??(e.fill?"100vw":void 0))}}export{oe as a,w as b,Bl as c,hf as d,Ml as e,uf as f,pf as g,mf as h,ff as i,gf as j,wf as k,Lt as l,Fl as m,bf as n,yf as o,Ia as p,Me as q,Ef as r,Sf as s,v as t,$l as u,_f as v,pe as w,te as x,em as y,ne as z,tm as A,Ur as B,nm as C,am as D,om as E,sm as F,Kr as G,De as H,dm as I,m as J,g as K,Ha as L,Of as M,kf as N,ue as O,Lp as P,vt as Q,Np as R,Ip as S,Pp as T,Hp as U,Ir as V,U as W,Pr as X,Mp as Y,pm as Z,mm as _,jr as $,fm as aa,gm as ba,Om as ca,At as da,gl as ea,Ea as fa,Lm as ga,Nm as ha,Im as ia,_a as ja,Pm as ka,Hm as la,Dm as ma,H as na,re as oa,Yo as pa,Db as qa,k as ra,Ub as sa,Wd as ta,z as ua,Ud as va,Yb as wa,$b as xa,Kb as ya,Vb as za,Xb as Aa,$d as Ba,jb as Ca,Vo as Da,O as Ea,tn as Fa,zb as Ga,Kd as Ha,Vd as Ia,jo as Ja,qb as Ka,zd as La,Zb as Ma,qd as Na,Qb as Oa,Qt as Pa,Jb as Qa,Zd as Ra,Qd as Sa,ey as Ta,ty as Ua,qo as Va,Jd as Wa,ny as Xa,eh as Ya,Qo as Za,en as _a,ay as $a,oy as ab,sy as bb,ah as cb,oh as db,iy as eb,ry as fb,ly as gb,cy as hb,It as ib,lc as jb,Bf as kb,Wa as lb,Mf as mb,be as nb,hc as ob,uc as pb,pc as qb,Ya as rb,Uf as sb,$a as tb,Yf as ub,Ka as vb,Vf as wb,Va as xb,K as yb,Xf as zb,jf as Ab,zf as Bb,Fa as Cb,Ba as Db,Cf as Eb,Lf as Fb,Nf as Gb,rc as Hb,Ga as Ib,qa as Jb,Ee as Kb,tg as Lb,bc as Mb,vc as Nb,ng as Ob,ag as Pb,Ht as Qb,og as Rb,sg as Sb,xc as Tb,rg as Ub,lg as Vb,cg as Wb,dg as Xb,Rc as Yb,Lc as Zb,hg as _b,ug as $b,pg as ac,mg as bc,fg as cc,gg as dc,wg as ec,bg as fc,yg as gc,no as hc,ao as ic,Eg as jc,Sg as kc,_g as lc,Tg as mc,vg as nc,Mc as oc,xg as pc,Og as qc,io as rc,kg as sc,Ag as tc,Fc as uc,Rg as vc,Cg as wc,ro as xc,b as yc,x as zc,Uc as Ac,y as Bc,D as Cc,Yc as Dc,lo as Ec,_ as Fc,Ft as Gc,Gt as Hc,Bg as Ic,S as Jc,uy as Kc,Jo as Lc,Se as Mc,f as Nc,ie as Oc,Ge as Pc,rh as Qc,uo as Rc,es as Sc,dh as Tc,po as Uc,ho as Vc,wo as Wc,Wt as Xc,zc as Yc,Qc as Zc,aw as _c,rw as $c,lw as ad,cw as bd,dw as cd,_o as dd,hw as ed,uw as fd,pw as gd,nd as hd,bw as id,yw as jd,To as kd,Ew as ld,vo as md,Sw as nd,_w as od,vw as pd,xw as qd,Ow as rd,kw as sd,xo as td,Aw as ud,Rw as vd,Ut as wd,Lw as xd,Gw as yd,ld as zd,hd as Ad,F as Bd,Qw as Cd,Po as Dd,Ho as Ed,Ue as Fd,E as Gd,C as Hd,pb as Id,Bo as Jd,Mo as Kd,mb as Ld,fb as Md,Td as Nd,gb as Od,wb as Pd,bb as Qd,yb as Rd,Eb as Sd,Sb as Td,_b as Ud,xd as Vd,Od as Wd,Tb as Xd,kd as Yd,Rd as Zd,Fo as _d,Go as $d,vb as ae,Zt as be,xb as ce,Ob as de,zt as ee,kb as fe,Ab as ge,Nd as he,Id as ie,Uo as je,Pd as ke,Rb as le,Hd as me,Dd as ne,Cb as oe,Lb as pe,Nb as qe,Ib as re,Ye as se,rt as te,lt as ue,Du as ve,Bu as we,Ui as xe,ct as ye,Mu as ze,Yi as Ae,Fu as Be,Gu as Ce,Yu as De,Xu as Ee,ju as Fe,zu as Ge,qu as He,wt as Ie,bt as Je,Zu as Ke,q as Le,qi as Me,Zn as Ne,Qu as Oe,Ju as Pe,Q as Qe,Z as Re,er as Se,ep as Te,tp as Ue,Ie as Ve,Qn as We,np as Xe,ap as Ye,op as Ze,Et as _e,sp as $e,Jn as af,ir as bf,ip as cf,rp as df,lp as ef,lr as ff,cp as gf,dp as hf,hp as if,up as jf,pp as kf,mp as lf,St as mf,fr as nf,fp as of,gp as pf,Pe as qf,sa as rf,br as sf,wp as tf,_t as uf,zn as vf,bp as wf,yp as xf,yr as yf,Er as zf,ia as Af,He as Bf,Tr as Cf,vr as Df,xr as Ef,ra as Ff,Or as Gf,la as Hf,_p as If,Tp as Jf,vp as Kf,xp as Lf,he as Mf,ca as Nf,Op as Of,kp as Pf,Tt as Qf,da as Rf,Ap as Sf,Rp as Tf,nn as Uf,uh as Vf,mh as Wf,Ty as Xf,ns as Yf,Oy as Zf,as as _f,ky as $f,bh as ag,yh as bg,Ay as cg,Eh as dg,Ry as eg,Be as fg,xa as gg,va as hg,El as ig,Sl as jg,_l as kg,Fm as lg,Tl as mg,Gm as ng,me as og,Wm as pg,Um as qg,Ym as rg,xl as sg,ka as tg,$m as ug,Km as vg,kl as wg,Vm as xg,ze as yg,eE as zg,qe as Ag,tE as Bg,nE as Cg,an as Dg,os as Eg,Ly as Fg,rn as Gg,sn as Hg,ss as Ig,xh as Jg,is as Kg,_e as Lg,ln as Mg,Oh as Ng,rs as Og,cn as Pg,Ch as Qg,$y as Rg,Ky as Sg,Nh as Tg,jy as Ug,dn as Vg,zy as Wg,qy as Xg,B as Yg,dE as Zg,hE as _g,us as $g,uE as ah,ms as bh,pE as ch,mE as dh,fE as eh,gE as fh,fs as gh,Mh as hh,Fh as ih,wE as jh,bE as kh,OE as lh,Es as mh,kE as nh,AE as oh,qh as ph,tu as qh,nu as rh,Te as sh,Je as th,NE as uh,IE as vh,As as wh,Cs as xh,iu as yh,PE as zh,mn as Ah,Ls as Bh,HE as Ch,et as Dh,DE as Eh,BE as Fh,A as Gh,KE as Hh,VE as Ih,XE as Jh,jE as Kh,G as Lh,mu as Mh,fu as Nh,gu as Oh,zE as Ph,qE as Qh,ZE as Rh,tt as Sh,Fs as Th,Gs as Uh,aS as Vh,oS as Wh,yn as Xh,sS as Yh,En as Zh,iS as _h,lS as $h,yu as ai,Eu as bi,cS as ci,dS as di,mS as ei,fS as fi,zm as gi,$n as hi,Cu as ii,Kp as ji,Gr as ki,Vp as li,Xp as mi,jp as ni,zp as oi,Pl as pi,Qm as qi,Ra as ri,Hl as si,Dl as ti,ef as ui,tf as vi,nf as wi};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as xe,X as Et,Z as Pt,_ as wt,aa as B,g as vt}from"./chunk-QRXGHD3Z.js";import{$h as Ke,Zh as yt,ai as ze,ci as bt,pi as Ce,qi as xt,ti as Ve,ui as St,ze as ht}from"./chunk-5VKKFDMK.js";import{c as Ct,o as de}from"./chunk-S63IHMZT.js";import{createContext as _n,useContext as It,useEffect as Rn,useMemo as Se,useState as kt}from"react";function Rt(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function fe(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 Xe=4,qr=1,Gr={unit:"set",spares:0,spareSide:"left"};function Nt(e){return e.unit==="single"?1:Xe+e.spares}function Kr(e,t){return[{partNumber:e.partNumber,wheels:Nt(t),prices:e.prices}]}function zr(e,t){let n=Nt(t)-Xe;if(n<=0||e.length===0)return e;let r=En(e),o=r?r[t.spareSide]:0;return e.map((i,a)=>a===o?{...i,wheels:i.wheels+n}:i)}function En(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 Pn(e,t){return t.spares>0?`${e} + spare`:e}function Vr(e){return e.unit==="single"?"Single":Pn(`Set of ${Xe}`,e)}var Xr="data-add-to-basket",Ye=9,wn="en",_t=new Map;function Ae(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=_t.get(r);return o||(o=new Intl.NumberFormat(wn,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),_t.set(r,o)),o}function Q(e,t,n=0){return Ae(t,0,n).format(e)}function Yr(e,t){return Ae(t).format(e)}function Qr(e,t){let n=e.savings[t];if(n===void 0)return null;let r=Q(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as In}from"react/jsx-runtime";var Nn="storefront-country",Lt=Nn,Qe=_n(null);function kn(e){return At(e,"catalogue")}function Ln(e){return At(e,"money")}function At(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return Ae(o,t==="money"?i:0,i).format(r)}}function to({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=Se(()=>t??[],[t]),a=Se(()=>n??[],[n]),l=Se(()=>r||i.find(m=>m.isDefault)?.code||i[0]?.code||"",[r,i]),c=Se(()=>o||a.find(m=>m.isDefault)?.code||a[0]?.code||"",[o,a]),[u,g]=kt(c),[x,f]=kt(!1);Rn(()=>{let m=de.getItem(Lt);m&&a.some(A=>A.code===m)&&g(m),f(!0)},[a]);function w(m){g(m),de.setItem(Lt,m)}let N=Se(()=>{let m=a.find(b=>b.code===u)??null,A=m?.currency,k=A&&i.some(b=>b.code===A)?A:l,T=kn(i),R=Ln(i);return{country:u,currency:k,setCountry:w,currencies:i,countries:a,activeCountry:m,formatPrice:(b,F)=>T(b,F??k),formatMoney:(b,F)=>R(b,F??k),ready:x}},[u,i,a,l,x]);return In(Qe.Provider,{value:N,children:e})}function Tt(e){let t=It(Qe);if(!t&&!e?.optional)throw new Error("useCurrency must be used within a CurrencyProvider");return t}function no(){return It(Qe)?.country??""}import{createContext as Kn,useCallback as P,useContext as zn,useEffect as G,useMemo as Xt,useRef as j,useState as I}from"react";function Ot(){return"/edit"}function Dt(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Ft="We'll confirm this discount when you place your order.",so="Confirmed at checkout";function lo(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Mt="coupon_code: ";function uo(e){return!(e instanceof xe)||e.status!==400||!e.message.startsWith(Mt)?null:e.message.slice(Mt.length)}function Ut(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 Te="Price on request",Tn="Request a quote",$t="from ",mo="From ",go="each",Ht="Free";function je(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Ze(e,t){let n=e?.[t];return je(n)?n:null}function ho(e,t,n,r){let o=Ze(e,n),i=Ze(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function yo(e,t,n,r){if(n==null&&r==null)return!0;let o=Ze(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var On={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function Mn(e,t,n){if(!je(e))return On;let r=je(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function bo(e,t,n=""){return!e.priced||e.unit==null?Te:`${n}${Q(e.unit,t)}`}function Co(e,t){return e.was==null?null:Q(e.was,t)}function Dn(e,t,n=1){let r=fe(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((a,l)=>a+l.wheels,0),i=Math.min(...e.map(a=>a.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var Fn={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function xo(e,t,n,r=1){let o=Mn(e.prices[n],e.msrpPrices?.[n],4),i=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:i};let a=Dn(t.components,n,r);return a.priced?{priced:!0,unit:a.unit,isFrom:a.isFrom,was:null,onSale:!1,setTotal:a.setTotal,fromSetTotal:i}:{...Fn,fromSetTotal:i}}function Un(e,t){return!e.priced||e.unit==null?Te:`${e.isFrom?$t:""}${Q(e.unit,t)}`}function So(e,t){return e.was==null?null:Q(e.was,t)}function vo(e,t){return!e.priced||e.unit==null?Tn:Un(e,t)}function Eo(e,t){let n=e.savings[t];if(n===void 0||e.components.length===0)return null;let r=0;for(let i of e.components){let a=i.prices?.[t];if(typeof a!="number")return null;r+=a*i.quantity}let o=Q(r-n,t);return{was:Q(r,t),amount:e.savingIsFrom?`${$t}${o}`:o}}var $n=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Bt(e){return $n.test(e.trim())}var Wt="sf:ga-purchases",Hn=20;function Gt(){return typeof window>"u"||window.parent!==window}function ve(...e){try{if(Gt()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Bn(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:fe(e.components,t)??0,quantity:e.qty}}function Je(e,t){return e.filter(Oe).map(n=>Bn(n,t))}function ko(e){ve("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 Kt(e,t){let n=Je([e],t);n.length!==0&&ve("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Lo(e){let t=Je(e.lines,e.currency);t.length!==0&&ve("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var qt=new Set;function Wn(e){if(qt.has(e))return!1;qt.add(e);try{let t=JSON.parse(de.getItem(Wt)??"[]");if(t.includes(e))return!1;de.setItem(Wt,JSON.stringify([...t,e].slice(-Hn)))}catch{}return!0}function Io(e){let t=e.confirmation;if(Gt()||!Wn(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);ve("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Je(e.lines,n)}),e.adsSendTo&&ve("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var qn="Arranged after review",zt="Calculated at checkout",Gn=zt,Oo=zt;function Vt({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function Mo(e){switch(e){case"arranged":return qn;case"pending":return Gn;case"free":return Ht;case"charged":return null}}import{jsx as Qn}from"react/jsx-runtime";var Vn=400,Xn=400,Yn=1500;function Oe(e){return(e.components?.length??0)>0}function Yt(e,t){return{code:e,valid:t.valid,deferred:Dt(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function jt(e,t){return fe(e.components,t)}function et(e,t){let n=jt(e,t);return n===null?null:n*e.qty}function Qt(e){return e!=="tyre"}var Zt=Kn(null);function Xo({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=Tt(),[i,a]=I(t),[l,c]=I([]),[u,g]=I([]),[x,f]=I([]),[w,N]=I(!1),m=j(new Set),[A,k]=I([]),[T,R]=I(!1),[b,F]=I(null),[ee,ie]=I(0),O=P(()=>ie(s=>s+1),[]),[C,_]=I(void 0),[y,ae]=I(null),[S,$]=I(null),[pe,se]=I(!1),[M,W]=I(null),te=j(void 0),K=P(()=>a(!0),[]),z=P(()=>a(!1),[]),me=P(()=>a(s=>!s),[]);G(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&K()},[K,t]);let ne=Ot(),le=j(ne);G(()=>{le.current!==ne&&(le.current=ne,t||z())},[ne,t,z]);let Re=P(s=>{ae(p=>p?.country===s?.country&&p?.subdivision===s?.subdivision&&p?.postcode===s?.postcode?p:s)},[]),V=P((s,p)=>{R(!0),!(!p||!Qt(s))&&k(d=>d.includes(p)?d:[...d,p])},[]),q=T||l.length>0,ge=j(!0);G(()=>(ge.current=!0,()=>{ge.current=!1}),[]),G(()=>{if(t)return;let s=[...A,...l.filter(d=>Qt(d.kind)).map(d=>d.slug)],p=[...new Set(s)].filter(d=>d&&!m.current.has(d));if(p.length!==0){for(let d of p)m.current.add(d);B.listWheelsBySlug(p).then(d=>{if(!ge.current||d.length===0)return;let h=new Set(d.map(v=>v.slug));g(v=>[...v.filter(re=>!h.has(re.slug)),...d])})}},[t,A,l]),G(()=>{if(t||!q||w)return;let s=!0;return B.listBundles().then(p=>{s&&(f(p),N(!0))}),()=>{s=!1}},[t,q,w]);let E=b?.deliveryOptions??[],Ne=b?.courier??null;G(()=>{b&&W(s=>s&&E.some(p=>p.id===s)?s:E[0]?.id??null)},[b]);let X=P(()=>l.filter(Oe).flatMap(s=>Rt(s.components,s.qty)),[l]),he=P(async(s,p)=>{let d=s.trim().toUpperCase();if(!d)return;let h=X();if(h.length===0){$({code:d,valid:!1,message:"Add a wheel to the cart first."});return}se(!0),te.current=p;try{let v=await B.validateCoupon({code:d,items:h,currency:n,shippingMethodId:M??void 0,customerEmail:p});$(Yt(d,v))}catch{$({code:d,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{se(!1)}},[X,n,M]),ye=P(()=>{$(null),te.current=void 0},[]),be=P(s=>{if(!S)return;let{code:p}=S;$(d=>d&&d.code===p?{code:p,valid:!1,refused:!0,message:s}:d)},[S]);G(()=>{if(!S||S.refused)return;let s=S.code,p=h=>h!==null&&h.code===s&&!h.refused,d=setTimeout(async()=>{let h=X();if(h.length===0){$(v=>p(v)?{code:s,valid:!1,message:"Add a wheel to the cart first."}:v);return}se(!0);try{let v=await B.validateCoupon({code:s,items:h,currency:n,shippingMethodId:M??void 0,customerEmail:te.current});$(re=>p(re)?Yt(s,v):re)}catch{}finally{se(!1)}},Vn);return()=>clearTimeout(d)},[l,n,M]);let ue=S&&!S.refused?S.code:void 0;G(()=>{if(t)return;let s=!0,p=setTimeout(async()=>{let d=X();if(d.length===0){F(null),_(void 0);return}try{let h=await B.quoteCart({items:d,currency:n,shippingMethodId:M??void 0,couponCode:ue,customerEmail:te.current||void 0,country:y?.country||r||void 0,subdivision:y?.country&&y.subdivision||void 0,postcode:y?.country&&y.postcode||void 0});if(!s)return;F(h)}catch{if(!s)return}_(ue)},Xn);return()=>{s=!1,clearTimeout(p)}},[l,n,M,ue,r,y,ee]);let Y=P(s=>{c(p=>{let d=p.findIndex(h=>h.id===s.id);return d===-1?[...p,s]:p.map((h,v)=>v===d?{...h,qty:Math.min(Ye,h.qty+s.qty)}:h)}),Kt(s,n)},[n]),ke=P(s=>{c(p=>p.filter(d=>d.id!==s))},[]),Le=P((s,p)=>{let d=Math.max(1,Math.min(Ye,p));c(h=>h.map(v=>v.id===s?{...v,qty:d}:v))},[]),L=P(s=>{c(s)},[]),[U,Be]=I(null),st=j(null);st.current=U;let H=j(null),We=j(""),lt=P((s,p)=>{let d=s.trim().toLowerCase();Bt(d)&&Be(h=>h&&h.email===d&&h.firstName===(p??"")?h:{email:d,firstName:p??""})},[]);G(()=>{if(t||!U)return;let s=Ut(l.filter(Oe),h=>et(h,n)===null?Te:o(et(h,n),n)),p={email:U.email,firstName:U.firstName,currency:n,items:s},d=JSON.stringify(p);if(d!==We.current)return H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{H.current=null,We.current=d,B.captureCart(p).catch(h=>{})},Yn),()=>{H.current&&(clearTimeout(H.current),H.current=null)}},[l,U,n,t]);let ut=P(()=>{H.current&&(clearTimeout(H.current),H.current=null);let s=st.current;s&&(We.current="",B.captureCart({email:s.email,firstName:s.firstName,currency:n,items:[]}).catch(p=>{}))},[n]),ct=Xt(()=>{let s=l.reduce((D,ce)=>{let Ie=et(ce,n);return Ie===null?D:D+Ie},0),p=l.some(D=>jt(D,n)===null),d=l.reduce((D,ce)=>D+ce.qty,0),h=S?.valid?S.effects:void 0,v=h?Math.min(s,Number(h.discountAmount)):0,re=b?.bundleDiscount??0,bn=b?.appliedBundles??[],qe=!!h?.freeShipping,mt=E.find(D=>D.id===M),gt=qe?0:b?.shipping??mt?.amount??0,Cn=Vt({quoted:b!==null,optionCount:E.length,chosenAmount:mt?.amount,couponWaivesFreight:qe}),Ge={};for(let D of h?.freeUnits??[])Ge[D.partNumber]=(Ge[D.partNumber]??0)+D.quantity;let xn=b?.tax??null,Sn=b?b.grandTotal:s-v-re+gt;return{sets:d,units:l.reduce((D,ce)=>D+(ce.components??[]).reduce((Ie,vn)=>Ie+vn.wheels*ce.qty,0),0),subtotal:s,hasUnpricedLine:p,discount:v,bundleDiscount:re,appliedBundles:bn,shipping:gt,freeShipping:qe,shippingStatus:Cn,freeUnitsByPartNumber:Ge,tax:xn,grand:Sn,repricing:!!S?.refused&&b!==null&&C===S?.code,currency:n}},[l,n,S,E,M,b,C]),dt=j(!0),ft=P(s=>{dt.current=s},[]),pt=P(s=>{Y(s),dt.current&&K()},[Y,K]),yn=Xt(()=>({isOpen:i,preview:t,open:K,close:z,toggle:me,items:l,catalog:u,bundles:x,warmCatalog:V,add:Y,addAndOpen:pt,setAutoOpen:ft,remove:ke,setQty:Le,replaceItems:L,identify:lt,clearCapturedCart:ut,coupon:S,applyCoupon:he,removeCoupon:ye,refuseCoupon:be,couponBusy:pe,deliveryOptions:E,setQuoteDestination:Re,courier:Ne,requote:O,shippingMethodId:M,setShippingMethodId:W,totals:ct}),[i,t,K,z,me,l,u,x,V,Y,pt,ft,ke,Le,L,lt,ut,S,he,ye,be,pe,E,Re,Ne,O,M,ct]);return Qn(Zt.Provider,{value:yn,children:e})}function Jt(){let e=zn(Zt);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as ar}from"react";function en(e){return/(?:^|\|)(?:slug|xhost):/.test(e)}function tn(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,c]of e){if(c.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let a=o??i??e.keys().next().value;if(a===void 0)return;e.delete(a)}}var jn=6e4,Zn=5e3,Jn=500,Me=new Map;async function er(e){let{host:t,matchesRequestHost:n}=await Et();if(!t)return"";let r=await Pt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}async function nn(e,t){if(await wt()!==null)return t();let n=await er(e);if(!n)return t();let r=Date.now(),o=Me.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),a=i.outcome.state==="failed",l=a?Zn:jn,c=Me.get(n)?.lastGood,u=i.outcome.state==="ok"?i:a?c:void 0,g=a&&u?u:i;return tn(Me,Jn,en,r),Me.set(n,{load:g,expiresAt:r+l,lastGood:u}),g}var tr=404;function nr(e){if(e instanceof xe&&e.status===tr)return{state:"absent"};let t=e instanceof xe?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var rr="[storefront:chrome-load-failed]";function or(e,t){console.error(`${rr} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function rn(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 i=nr(o);return i.state==="failed"&&or(e,i),{value:n,outcome:i}}}function ir(e){return e==="production"?"silent":"banner"}var ni=ir("production");function sr(e,t){return e?.trim()||t}function ci({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=sr(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var lr={name:Ce,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,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:Ve},di=ar(async()=>nn("site",()=>rn("site",async()=>{let e=await B.getSite();return{name:xt(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,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,privacyPage:e.privacyPage??null,termsPage:e.termsPage??null,footerCookieSettings:e.footerCookieSettings??!0,footerSitemap:e.footerSitemap??!0,socialLinks:St(e.socialLinks)}},lr)));var fi={name:Ce,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,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:Ve};import{jsx as ur}from"react/jsx-runtime";function mi({tone:e="bad",role:t,children:n}){return ur("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as Pe,jsxs as tt}from"react/jsx-runtime";import{useEffect as De,useId as pr,useRef as an,useState as Fe}from"react";import{useRootIsDark as mr}from"efficient-shell/theme";import{efficientClientOpen as cr}from"efficient-easel/screen/lib/session";var Ee=new Map,dr=64;async function fr(e){if(!cr())return null;try{let t=await fetch(`${Ct()}/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 on(e){let t=Ee.get(e);if(t)return t;let n=fr(e);if(Ee.set(e,n),Ee.size>dr){let r=Ee.keys().next();r.done||Ee.delete(r.value)}return n}var gr=202/22,hr=.88,Ti=16,yr="invert(1)";function Oi({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:a,inkIsDark:l,size:c="medium",sizePx:u,sizeUnit:g,wordmark:x,siteName:f=Ce,fitToContainer:w=!1,fitWordmarkToContainer:N=!1,fitFloorPx:m,hideClass:A,hideAttrs:k}){let T=x&&x.trim()?x.trim():f,[R,b]=Fe(null),F=an(null),ee=L=>{F.current=L};De(()=>{b(F.current?.ownerDocument??null)},[]);let ie=!mr({doc:R,whenUnset:!0}),O=n&&n.trim()?n.trim():null,C=!!O&&vt(O),_=i??(ie&&t),y=o&&o.trim()?o.trim():null,ae=r&&!y,S=`logo-color-${pr().replace(/[^A-Za-z0-9_-]/g,"")}`,$=ae&&C&&O&&a!=null?{reversed:a,inkIsDark:l??null}:null,pe=$!==null,[se,M]=Fe(null);De(()=>{if(!ae||!O||!C||pe){M(null);return}let L=!1;return M(null),on(O).then(U=>{L||M(U)}),()=>{L=!0}},[ae,O,C,pe]);let W=$??se,te=!!W&&W.inkIsDark!==null&&(_?!W.inkIsDark:W.inkIsDark),K=ae&&!!O&&!C&&!_,z=te&&W?W.reversed:O,me=z?[z]:[],[ne,le]=Fe(0);De(()=>{le(0)},[O,te]);let Re=e==="footer"?ze:Ke[c],V=u&&u>0?u:Re,q=(u&&u>0?ht(u,g,"size",bt):null)??`${V}px`,ge=Math.round(V*gr),E=ne<me.length?me[ne]:null,[Ne,X]=Fe(z),he=E!==null&&E===Ne,ye=an(null);De(()=>{let L=ye.current;if(!L||!L.complete)return;if(L.naturalWidth>0||L.naturalHeight>0){X(E);return}let U=!1;return L.decode().then(()=>!U&&X(E),()=>!U&&le(Be=>Be+1)),()=>{U=!0}},[E]);let be=w||N,ue=`calc(100cqi / ${((T.length+1)*hr).toFixed(2)})`,Y=be&&m&&m>0?q===`${V}px`?`${Math.min(m,V)}px`:`min(${m}px, ${q})`:null,ke=be?Y===null?`min(${q}, ${ue})`:`clamp(${Y}, ${ue}, ${q})`:q,Le=tt("span",{className:`font-display font-bold tracking-[0.18em] ${Y===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:ke,lineHeight:1,...y?{color:y}:{}},"aria-label":T,children:[T,Pe("span",{className:"text-accent",style:y?{color:y}:void 0,children:"."})]});return tt("span",{ref:ee,className:yt("inline-flex items-center",A??""),...k,children:[!he&&Le,y&&E&&Pe("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:tt("filter",{id:S,colorInterpolationFilters:"sRGB",children:[Pe("feFlood",{style:{floodColor:y}}),Pe("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),E&&Pe("img",{ref:ye,src:E,alt:T,width:ge,height:V,className:"shrink-0 object-contain",style:{...he?{height:q,width:"auto",...w?{maxWidth:"100cqi"}:{}}:{display:"none"},...K?{filter:yr}:{},...y?{filter:`url(#${S})`}:{}},onLoad:()=>X(E),onError:()=>le(L=>L+1)},E)]})}var Di="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",sn="w-0 min-w-0 flex-1",Fi="w-0 min-w-[7rem] flex-1";import{jsx as we,jsxs as Cr}from"react/jsx-runtime";function br({spokes:e,mesh:t=!1,className:n}){let a=c=>Math.round(c*1e3)/1e3,l=[];for(let c=0;c<e;c++){let u=c/e*Math.PI*2-Math.PI/2;if(l.push({x1:a(100+Math.cos(u)*22),y1:a(100+Math.sin(u)*22),x2:a(100+Math.cos(u)*86),y2:a(100+Math.sin(u)*86),main:!0}),t){let g=u+Math.PI/e;l.push({x1:a(100+Math.cos(g)*22*1.4),y1:a(100+Math.sin(g)*22*1.4),x2:a(100+Math.cos(g)*78),y2:a(100+Math.sin(g)*78),main:!1})}}return Cr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[we("circle",{cx:100,cy:100,r:92,strokeWidth:2}),we("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),we("circle",{cx:100,cy:100,r:22,strokeWidth:2}),we("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((c,u)=>we("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:c.main?6:3,strokeLinecap:"round",opacity:c.main?1:.5},u))]})}var Bi="#c9a461",ln=[{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"}],Wi={name:"",color:"var(--fg)",family:"silver",src:""};function xr(e,t){let n=r=>{let o=ln.findIndex(i=>i.f===r);return o===-1?ln.length:o};return n(e)-n(t)||e.localeCompare(t)}function qi(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(xr)}import{useState as Sr}from"react";import{jsx as oe,jsxs as nt}from"react/jsx-runtime";function vr({customerEmail:e,disabled:t=!1}){let{coupon:n,applyCoupon:r,removeCoupon:o,couponBusy:i}=Jt(),[a,l]=Sr("");async function c(){t||i||!a.trim()||(await r(a,e),l(""))}return nt("div",{className:"flex flex-col gap-2",children:[n===null?nt("div",{className:"flex border border-line",children:[oe("input",{type:"text",value:a,onChange:u=>l(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),c())},placeholder:"Coupon code","aria-label":"Coupon code",disabled:t,className:`${sn} bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim`}),oe("button",{type:"button",onClick:()=>{c()},disabled:i||t,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Apply"})]}):nt("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",n.valid?"border-accent":"border-line"].join(" "),style:n.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[oe("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",n.valid?"text-accent":n.deferred||n.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:n.code}),n.unchecked&&oe("button",{type:"button",onClick:()=>{r(n.code,e)},disabled:i||t,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Try again"}),!t&&oe("button",{type:"button",onClick:o,"aria-label":`Remove coupon ${n.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),n?.deferred?oe("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:Ft}):n&&!n.valid&&n.message&&oe("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:n.message})]})}var rt="Ads on. Shopper can opt out.",Ue="Ads and analytics off until Accept",Er={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:rt,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Ue,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:rt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:rt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function Pr(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function ji(e,t,n){let r=Pr(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var Zi={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on",close:"Close",cookieSettings:"Cookie settings"};var wr={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var _r=wr;function na(e=_r){if(e.asked)return e.ads?"granted":"denied"}function oa(){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)}`}import{Children as Nr,isValidElement as kr,useEffect as cn,useId as Lr,useLayoutEffect as pn,useRef as Z,useState as dn}from"react";var $e=(e,t)=>!!e[t]&&!e[t].disabled;function ot(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if($e(e,i))return i}return t}function it(e,t){return ot(e,t===1?-1:e.length,t)}function at(e,t){return $e(e,t)?t:Math.max(it(e,1),0)}function un(e,t,n){let{open:r,focus:o}=e,i=a=>({...e,...a});if(t.length===1&&/\S/.test(t)){let a=e.typed+t.toLowerCase(),l=n.findIndex((c,u)=>$e(n,u)&&c.label.toLowerCase().startsWith(a));return{state:i({open:!0,typed:a,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:ot(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:ot(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:it(n,1)}),handled:!0};case"End":return{state:i({focus:it(n,-1)}),handled:!0};case"Enter":case" ":return $e(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Ir}from"efficient-shell/ui";import{Fragment as Ur,jsx as J,jsxs as mn}from"react/jsx-runtime";var fn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function Ar({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[a,l]=dn(!1),c=r!==void 0,u=c?r:a,[g,x]=dn(0),f=Z({text:"",timer:0}),w=Z(null),N=Z(null),m=Z(null),A=Lr(),k=Z(null),T=e.findIndex(C=>C.value===t),R=C=>{C!==u&&(c||l(C),C?o?.():i?.())},b=C=>{let _=e[C];!_||_.disabled||(n(_.value),R(!1),N.current?.focus())},F=C=>{let _={open:u,focus:u?g:at(e,T),typed:f.current.text},y=un(_,C,e);return!y.handled&&y.state.open===u?!1:(y.state.typed!==_.typed&&(f.current.text=y.state.typed,window.clearTimeout(f.current.timer),f.current.timer=window.setTimeout(()=>{f.current.text=""},500)),x(y.state.focus),y.commit!==void 0?b(y.commit):R(y.state.open),y.refocus&&N.current?.focus(),y.handled)},ee=Z(F);ee.current=F;let ie=Z(()=>R(!1));ie.current=()=>R(!1);let O=C=>{u||(k.current=C.nativeEvent,ee.current(C.key)&&C.preventDefault())};return cn(()=>{if(!u)return;let C=y=>{w.current?.contains(y.target)||ie.current()},_=y=>{y!==k.current&&ee.current(y.key)&&y.preventDefault()};return document.addEventListener("mousedown",C),document.addEventListener("keydown",_),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",_)}},[u]),cn(()=>{u&&(f.current.text||x(at(e,T)))},[u]),pn(()=>{if(!u||!m.current)return;m.current.children.item(g)?.scrollIntoView({block:"nearest"})},[g,u]),{open:u,toggle:()=>R(!u),close:()=>R(!1),focusIdx:g,setFocusIdx:x,pick:C=>b(e.findIndex(_=>_.value===C)),wrapRef:w,triggerRef:N,listRef:m,listId:A,onTriggerKeyDown:O,activeId:u?`${A}-${g}`:void 0}}var Tr={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${fn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${fn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function Or(e,t){pn(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let a=n.offsetParent??n.parentElement;if(!a)return;let l=a.getBoundingClientRect(),c=n.getBoundingClientRect(),u=Math.abs(c.right-l.right)<Math.abs(c.left-l.left)?"end":"start",g=Ir({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:c.width,height:c.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:u,side:"bottom"});if(g.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let f=g.top+Math.min(c.height,g.maxHeight);i.marginBottom=`${Math.max(0,l.top-f)}px`}g.maxHeight<c.height&&(i.maxHeight=`${g.maxHeight}px`,i.overflowY="auto");let x=g.left-c.left;x&&(i.translate=`${x}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Mr(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function Dr({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:a,listRef:l,ariaLabel:c,align:u="start"}){let g=Tr[t],x=Z(null);return Or(x,n.length),J("ul",{ref:f=>{x.current=f,l&&(l.current=f)},id:e,role:"listbox","aria-label":c,...g.pickerMarker?{"data-picker-menu":""}:{},className:u==="end"?Mr(g.list):g.list,children:n.map((f,w)=>{let N=f.value===r;return J("li",{id:`${e}-${w}`,role:"option","aria-selected":N,"aria-disabled":f.disabled||void 0,onMouseEnter:()=>!f.disabled&&i(w),onMouseDown:m=>{m.preventDefault(),f.disabled||a(f.value)},className:g.item(w===o,N&&f.value!=="",!!f.disabled,w===n.length-1),style:g.itemStyle?.(N),children:f.meta===void 0?f.label:mn(Ur,{children:[f.lead,J("span",{className:"flex-1 whitespace-nowrap",children:f.label}),J("span",{className:"ml-auto text-[12px] opacity-50",children:f.meta})]})},`${f.value}_${w}`)})})}function Fr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:a,id:l,"aria-label":c,align:u}){let g=Nr.toArray(r).flatMap(m=>{if(!kr(m))return[];if(m.type!=="option")return[];let k=m.props,T=k.value!==void 0?String(k.value):"",R=k.children,b=typeof R=="string"||typeof R=="number"?String(R):T;return[{value:T,label:b,disabled:!!k.disabled}]}),x=e??"",f=Ar({items:g,value:x,onPick:m=>t?.({target:{value:m}})}),N=g.find(m=>m.value===x)?.label??g[0]?.label??"";return mn("div",{ref:f.wrapRef,className:"relative",children:[a&&J("input",{type:"hidden",name:a,value:x}),J("button",{ref:m=>{f.triggerRef.current=m},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":f.open,"aria-controls":f.open?f.listId:void 0,"aria-activedescendant":f.activeId,"aria-label":c,id:l,onClick:()=>!n&&f.toggle(),onKeyDown:m=>!n&&f.onTriggerKeyDown(m),className:`block w-full ${o??""}`,style:i,children:J("span",{className:"block w-full truncate text-left",children:N})}),f.open&&J(Dr,{id:f.listId,tone:"select",items:g,value:x,focusIdx:f.focusIdx,onFocus:f.setFocusIdx,onPick:f.pick,listRef:f.listRef,align:u})]})}import{jsx as _e,jsxs as He}from"react/jsx-runtime";var $r="font-mono text-[length:var(--size-label,12px)]",Hr="font-semibold uppercase tracking-[0.22em] text-fg";function gn(e){return`${e??$r} ${Hr}`}function hn(){return _e("span",{className:"text-accent",children:" *"})}function Br({children:e,required:t,labelFace:n}){return He("span",{className:gn(n),children:[e,t?_e(hn,{}):null]})}function Wr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:a,children:l}){let c=a?`flex flex-col gap-2 ${a}`:"flex flex-col gap-2",u=n?_e("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?He("div",{className:c,children:[He("label",{htmlFor:o,className:gn(i),children:[e,t?_e(hn,{}):null]}),l,u]}):He("label",{htmlFor:o,className:c,children:[_e(Br,{required:t,labelFace:i,children:e}),l]})}export{Ot as a,so as b,lo as c,uo as d,Rt as e,Xe as f,qr as g,Gr as h,Kr as i,zr as j,En as k,Pn as l,Vr as m,Xr as n,Ye as o,Ae as p,Q as q,Yr as r,Qr as s,Te as t,Tn as u,$t as v,mo as w,go as x,Ht as y,Ze as z,ho as A,yo as B,Mn as C,bo as D,Co as E,Dn as F,xo as G,Un as H,So as I,vo as J,Eo as K,Bt as L,ko as M,Lo as N,Io as O,Oo as P,Mo as Q,to as R,Tt as S,no as T,Oe as U,et as V,Xo as W,Jt as X,ci as Y,lr as Z,fi as _,Di as $,sn as aa,Fi as ba,br as ca,Bi as da,ln as ea,Wi as fa,xr as ga,qi as ha,vr as ia,mi as ja,Ti as ka,Oi as la,Er as ma,ji as na,Zi as oa,wr as pa,na as qa,oa as ra,Ar as sa,Dr as ta,Fr as ua,Br as va,Wr as wa};
|
|
File without changes
|