efficient-storefront-blocks 0.131.1 → 0.132.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-JINOMDUB.js → CustomHtmlCodeWindow-2WCOBTZI.js} +1 -1
  3. package/dist/chunks/EditorPreviewCheckout-LWCGOB7R.js +4 -0
  4. package/dist/chunks/SiteEditorProvider-IOAQH4S4.js +1 -0
  5. package/dist/chunks/{chunk-3QCDDPXL.js → chunk-3P4XQK3S.js} +1 -1
  6. package/dist/chunks/{chunk-QYTBEMMG.js → chunk-3RAPOAJE.js} +2 -2
  7. package/dist/chunks/{chunk-43XANC6T.js → chunk-OBAUAKZL.js} +1 -1
  8. package/dist/chunks/{chunk-GVSVEV2H.js → chunk-PB4FLVPH.js} +8 -8
  9. package/dist/chunks/{chunk-SV3VVDBH.js → chunk-TNWF32DT.js} +1 -1
  10. package/dist/chunks/{chunk-7W33H2GG.js → chunk-UFQDBLLF.js} +1 -1
  11. package/dist/chunks/chunk-WCEMPYVI.js +1 -0
  12. package/dist/chunks/{chunk-R5FDAR72.js → chunk-XXVOKKJV.js} +1 -1
  13. package/dist/chunks/{fitment-data-FRSLYOCL.js → fitment-data-MW7I7F7T.js} +1 -1
  14. package/dist/chunks/{section-css-style-3IQWMPDP.js → section-css-style-7OKHUI7L.js} +1 -1
  15. package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
  16. package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
  17. package/dist/editor/lib/storefront-editor-words.js +1 -1
  18. package/dist/index.js +28 -28
  19. package/dist/render/built-with.json +1 -1
  20. package/dist/render/components/CartContext.d.ts +2 -0
  21. package/dist/render/components/CartContext.js +1 -1
  22. package/dist/render/components/GalleryCard.d.ts +2 -1
  23. package/dist/render/components/GalleryCard.js +1 -1
  24. package/dist/render/components/GalleryGrid.d.ts +2 -1
  25. package/dist/render/components/GalleryGrid.js +3 -3
  26. package/dist/render/components/GalleryItem.d.ts +1 -0
  27. package/dist/render/components/GalleryItem.js +1 -1
  28. package/dist/render/components/cart/drawer-parts.js +1 -1
  29. package/dist/render/components/checkout/checkout-parts.js +1 -1
  30. package/dist/render/components/checkout/checkout-state.d.ts +2 -0
  31. package/dist/render/lib/api/types.d.ts +1 -0
  32. package/dist/render/lib/cart/shipping-status.d.ts +5 -0
  33. package/dist/render/lib/cart/shipping-status.js +1 -1
  34. package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
  35. package/dist/render/lib/sections/gallery-mosaic.d.ts +3 -0
  36. package/dist/render/lib/sections/gallery-mosaic.js +1 -0
  37. package/dist/render/lib/sections/gallery-toolbar.js +1 -1
  38. package/dist/routine-index.json +1 -1
  39. package/dist/value-index.json +1 -1
  40. package/dist/words.d.ts +2 -0
  41. package/dist/words.js +2 -2
  42. package/package.json +2 -2
  43. package/dist/chunks/EditorPreviewCheckout-B5B4BHEG.js +0 -4
  44. package/dist/chunks/SiteEditorProvider-CJRYE2LF.js +0 -1
  45. package/dist/chunks/chunk-PJVO662Y.js +0 -1
  46. /package/dist/chunks/{chunk-TICXZI44.js → chunk-2NWFNMO3.js} +0 -0
  47. /package/dist/chunks/{chunk-QYTBEMMG.js.LEGAL.txt → chunk-3RAPOAJE.js.LEGAL.txt} +0 -0
  48. /package/dist/chunks/{chunk-FVHAKC6L.js → chunk-AHUOASUP.js} +0 -0
  49. /package/dist/chunks/{chunk-43XANC6T.js.LEGAL.txt → chunk-OBAUAKZL.js.LEGAL.txt} +0 -0
  50. /package/dist/chunks/{chunk-T5PQ7BY4.js → chunk-YDV7IGPY.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.132.1 — 2026-11-27 — A part-off-delivery coupon shows its saving before the quote
4
+
5
+ **For hosts:** no peer change. The storefront re-vendors `src/` with
6
+ `node scripts/sync-storefront-blocks.mjs`, then declares
7
+ `CouponEffects.deliveryDiscountPercent` in its `openapi.yml` (the API types
8
+ here now carry it) and drops its known-gaps entry.
9
+
10
+ - **A coupon that takes part of the delivery fee off shows it at once**
11
+ (SG#03140): the cart reads the coupon preview's `deliveryDiscountPercent`.
12
+ Each delivery choice at checkout shows its full price struck through with
13
+ the reduced price beside it, the Shipping row shows the reduced fee until
14
+ the quote priced with the code lands (then the server's figure, which can
15
+ differ by a rounding cent), and the coupon line in the drawer and the
16
+ checkout names the delivery saving. A free-delivery coupon still says Free.
17
+
18
+ ## 0.132.0 — 2026-11-26 — The Gallery gains Mosaic and Image sets
19
+
20
+ **For hosts:** the `efficient-web-builder` peer narrows to `^76.2.0` (its
21
+ `mosaic` layout and `galleryCellAt`). The storefront pins web-builder
22
+ 76.1.0 today: move that pin to 76.2.0 in the same change that re-vendors
23
+ `src/` with `node scripts/sync-storefront-blocks.mjs`, then run `just check`.
24
+
25
+ - **Layout ▸ Mosaic** (Gallery ▸ Arrangement, the builder's choice; no
26
+ switch of its own): big, wide and small images in a run of ten, 4 across
27
+ with 260 px rows on a computer, 2 across with 150 px rows on a phone. The
28
+ run and its tail are the builder's `mosaic` layout; the fixed rows are
29
+ lib/sections/gallery-mosaic and follow that choice. A filtered wall places
30
+ its tiles by the builder's `galleryCellAt`, so a layout's own tail holds
31
+ there too. No Layout chosen: the wall as before.
32
+ - **Image sets** (Gallery ▸ Images): each image is one set (its cover and its
33
+ photos). The tile shows the wheel and the car at rest and an "N photos"
34
+ chip; a press opens the set in the one lightbox, in a light side layout:
35
+ the photo, the wheel, the car, n / N, a thumbnail of each photo and
36
+ "See <wheel>" to the image's link. Off by default: today's tile and popup.
37
+
3
38
  ## 0.131.1 — 2026-11-26 — Form button and title settings, and Menu letters
4
39
 
5
40
  - **Button width on a Form.** The Form's Design tab has the Button block's
@@ -1,4 +1,4 @@
1
- "use client";import{b as ee,d as te,e as se}from"./chunk-43XANC6T.js";import{Ce as re,Dl as pe,Hh as ie,Rb as oe,Uk as ce,Xk as de,bl as me,fe as ne,g as i,he as I,je as ae,xl as ue,yl as fe,zl as he}from"./chunk-GVSVEV2H.js";import{d as Z}from"./chunk-SV3VVDBH.js";import{Lf as J,Tg as B,cg as Y,la as X,mi as le,yb as K}from"./chunk-3QCDDPXL.js";import"./chunk-FVHAKC6L.js";import"./chunk-TICXZI44.js";import"./chunk-Y6SLVHK3.js";import{jsx as n,jsxs as w,Fragment as Ue}from"react/jsx-runtime";import{Suspense as We,useContext as Ve,useEffect as Te,useMemo as _,useRef as Ne,useState as S}from"react";import{AccordionHeading as H,Banner as qe,Button as D,Card as Qe,Dialog as Xe,DropdownMenu as Ke,Segmented as Je,Text as b,buttonClasses as Ye,colorFill as Ze,colorSwatchClasses as et,fitFrameStyle as tt,fitScale as st}from"efficient-shell/ui";import{CodeEditor as ot}from"efficient-shell/code";import{ChevronDownIcon as nt}from"efficient-shell/icons/efficient";import{AlignSeparateIcon as at}from"efficient-easel/icons";import{ScreenDocumentContext as rt}from"efficient-easel/screen/components/ScreenDocumentContext";var ye=".my-part";function ve(e,t,o,s){let a=De(e,t);if(a)return Pe(e,t,o,s,a);let r=je(e,t);return r?Be(e,t,o,s,r):A(e,t,we(s))}function De(e,t){let o=/<style\b[^>]*>/gi;for(let s=o.exec(e);s;s=o.exec(e)){let a=s.index+s[0].length,r=e.toLowerCase().indexOf("</style",a),c=r<0?e.length:r;if(t>=a&&t<=c)return{start:a,end:c,close:r};o.lastIndex=c}return null}function Le(e){return e.replace(/\/\*[\s\S]*?(\*\/|$)/g,t=>" ".repeat(t.length))}function Pe(e,t,o,s,a){let r=Le(e.slice(a.start,a.end)),c=t-a.start,m=r[c-1]===" "&&e.slice(a.start,a.end)[c-1]!==" ",d=0,u="";for(let v=0;v<c;v++){let k=r[v];k==="{"?(d++,u=k):k==="}"?(d=Math.max(0,d-1),u=k):(k===";"||k===":")&&(u=k)}let f=r.slice(r.lastIndexOf(":",c-1)+1,c).trim();if(s.kind==="value"&&d>0&&u===":"&&!m&&(f===""||o>t))return{from:t,to:o,insert:s.value,selectFrom:t,selectTo:t+s.value.length};if(s.kind!=="value"){let v=a.close<0?e.length:e.indexOf(">",a.close)+1;return A(e,v-1,s.kind==="class"?we(s):s.code)}let h=-1;if(d>0)h=ge(r,c,d);else{let v=r.slice(c).search(/[{}]/);v>=0&&r[c+v]==="{"&&(h=ge(r,c+v+1,1))}let p=h<0?t:a.start+h,g=h<0?-1:Fe(r,h),x=g<0?ye:Re(r,g)||ye,$=be(e,g<0?p:a.start+g);return A(e,p,`${$}${x} { ${s.property}: ${s.value}; }`,!0)}function ge(e,t,o){for(let s=t;s<e.length;s++)if(e[s]==="{")o++;else if(e[s]==="}"&&--o===0)return s;return-1}function Fe(e,t){let o=0;for(let s=t;s>=0;s--)if(e[s]==="}")o++;else if(e[s]==="{"&&--o===0)return s;return-1}function Re(e,t){let o=Math.max(e.lastIndexOf("}",t-1),e.lastIndexOf(";",t-1),e.lastIndexOf("{",t-1))+1;return e.slice(o,t).replace(/\s+/g," ").trim()}function je(e,t){let o=e.lastIndexOf("<",t-1);if(o<0||e.lastIndexOf(">",t-1)>o||/[/!?]/.test(e[o+1]??""))return null;let s=e.indexOf(">",t);return s<0?null:{lt:o,gt:s}}function Be(e,t,o,s,a){if(s.kind==="block")return A(e,a.gt,s.code);let r=s.kind==="value"?"style":"class",c=e.slice(a.lt,a.gt),m=new RegExp(`\\s${r}\\s*=\\s*(["'])([\\s\\S]*?)\\1`,"i").exec(c);if(m){let f=a.lt+m.index+m[0].length-1-m[2].length,h=f+m[2].length;if(t>=f&&t<=h){let $=e.slice(f,t);if(s.kind==="value"&&(/:\s*$/.test($)||o>t&&/:[^;]*$/.test($)))return M(t,o,s.value);if(s.kind==="class"&&!(/\S$/.test($)&&/^\S/.test(e.slice(t,h)))){let v=`${/\S$/.test($)?" ":""}${s.className}${/^\S/.test(e.slice(t,h))?" ":""}`;return M(t,t,v)}}let p=m[2].trimEnd(),g=s.kind==="value"?`${p&&!p.endsWith(";")?";":""}${p?" ":""}${s.property}: ${s.value}`:`${p?" ":""}${s.className}`,x=f+p.length;return M(x,x,g)}let d=e[a.gt-1]==="/"?a.gt-1:a.gt,u=s.kind==="value"?` style="${s.property}: ${s.value}"`:` class="${s.className}"`;return M(d,d,u)}function we(e){return e.kind==="block"?e.code:e.kind==="class"?`<p class="${e.className}">Text</p>`:`<div style="${e.property}: ${e.value}">Text</div>`}function M(e,t,o){return{from:e,to:t,insert:o,selectFrom:e,selectTo:e+o.length}}function be(e,t){let o=e.lastIndexOf(`
1
+ "use client";import{b as ee,d as te,e as se}from"./chunk-OBAUAKZL.js";import{Al as he,De as re,El as pe,Ih as ie,Sb as oe,Vk as ce,Yk as de,cl as me,g as i,ge as ne,ie as I,ke as ae,yl as ue,zl as fe}from"./chunk-PB4FLVPH.js";import{d as Z}from"./chunk-TNWF32DT.js";import{Lf as J,Tg as B,cg as Y,la as X,mi as le,yb as K}from"./chunk-3P4XQK3S.js";import"./chunk-AHUOASUP.js";import"./chunk-2NWFNMO3.js";import"./chunk-Y6SLVHK3.js";import{jsx as n,jsxs as w,Fragment as Ue}from"react/jsx-runtime";import{Suspense as We,useContext as Ve,useEffect as Te,useMemo as _,useRef as Ne,useState as S}from"react";import{AccordionHeading as H,Banner as qe,Button as D,Card as Qe,Dialog as Xe,DropdownMenu as Ke,Segmented as Je,Text as b,buttonClasses as Ye,colorFill as Ze,colorSwatchClasses as et,fitFrameStyle as tt,fitScale as st}from"efficient-shell/ui";import{CodeEditor as ot}from"efficient-shell/code";import{ChevronDownIcon as nt}from"efficient-shell/icons/efficient";import{AlignSeparateIcon as at}from"efficient-easel/icons";import{ScreenDocumentContext as rt}from"efficient-easel/screen/components/ScreenDocumentContext";var ye=".my-part";function ve(e,t,o,s){let a=De(e,t);if(a)return Pe(e,t,o,s,a);let r=je(e,t);return r?Be(e,t,o,s,r):A(e,t,we(s))}function De(e,t){let o=/<style\b[^>]*>/gi;for(let s=o.exec(e);s;s=o.exec(e)){let a=s.index+s[0].length,r=e.toLowerCase().indexOf("</style",a),c=r<0?e.length:r;if(t>=a&&t<=c)return{start:a,end:c,close:r};o.lastIndex=c}return null}function Le(e){return e.replace(/\/\*[\s\S]*?(\*\/|$)/g,t=>" ".repeat(t.length))}function Pe(e,t,o,s,a){let r=Le(e.slice(a.start,a.end)),c=t-a.start,m=r[c-1]===" "&&e.slice(a.start,a.end)[c-1]!==" ",d=0,u="";for(let v=0;v<c;v++){let k=r[v];k==="{"?(d++,u=k):k==="}"?(d=Math.max(0,d-1),u=k):(k===";"||k===":")&&(u=k)}let f=r.slice(r.lastIndexOf(":",c-1)+1,c).trim();if(s.kind==="value"&&d>0&&u===":"&&!m&&(f===""||o>t))return{from:t,to:o,insert:s.value,selectFrom:t,selectTo:t+s.value.length};if(s.kind!=="value"){let v=a.close<0?e.length:e.indexOf(">",a.close)+1;return A(e,v-1,s.kind==="class"?we(s):s.code)}let h=-1;if(d>0)h=ge(r,c,d);else{let v=r.slice(c).search(/[{}]/);v>=0&&r[c+v]==="{"&&(h=ge(r,c+v+1,1))}let p=h<0?t:a.start+h,g=h<0?-1:Fe(r,h),x=g<0?ye:Re(r,g)||ye,$=be(e,g<0?p:a.start+g);return A(e,p,`${$}${x} { ${s.property}: ${s.value}; }`,!0)}function ge(e,t,o){for(let s=t;s<e.length;s++)if(e[s]==="{")o++;else if(e[s]==="}"&&--o===0)return s;return-1}function Fe(e,t){let o=0;for(let s=t;s>=0;s--)if(e[s]==="}")o++;else if(e[s]==="{"&&--o===0)return s;return-1}function Re(e,t){let o=Math.max(e.lastIndexOf("}",t-1),e.lastIndexOf(";",t-1),e.lastIndexOf("{",t-1))+1;return e.slice(o,t).replace(/\s+/g," ").trim()}function je(e,t){let o=e.lastIndexOf("<",t-1);if(o<0||e.lastIndexOf(">",t-1)>o||/[/!?]/.test(e[o+1]??""))return null;let s=e.indexOf(">",t);return s<0?null:{lt:o,gt:s}}function Be(e,t,o,s,a){if(s.kind==="block")return A(e,a.gt,s.code);let r=s.kind==="value"?"style":"class",c=e.slice(a.lt,a.gt),m=new RegExp(`\\s${r}\\s*=\\s*(["'])([\\s\\S]*?)\\1`,"i").exec(c);if(m){let f=a.lt+m.index+m[0].length-1-m[2].length,h=f+m[2].length;if(t>=f&&t<=h){let $=e.slice(f,t);if(s.kind==="value"&&(/:\s*$/.test($)||o>t&&/:[^;]*$/.test($)))return M(t,o,s.value);if(s.kind==="class"&&!(/\S$/.test($)&&/^\S/.test(e.slice(t,h)))){let v=`${/\S$/.test($)?" ":""}${s.className}${/^\S/.test(e.slice(t,h))?" ":""}`;return M(t,t,v)}}let p=m[2].trimEnd(),g=s.kind==="value"?`${p&&!p.endsWith(";")?";":""}${p?" ":""}${s.property}: ${s.value}`:`${p?" ":""}${s.className}`,x=f+p.length;return M(x,x,g)}let d=e[a.gt-1]==="/"?a.gt-1:a.gt,u=s.kind==="value"?` style="${s.property}: ${s.value}"`:` class="${s.className}"`;return M(d,d,u)}function we(e){return e.kind==="block"?e.code:e.kind==="class"?`<p class="${e.className}">Text</p>`:`<div style="${e.property}: ${e.value}">Text</div>`}function M(e,t,o){return{from:e,to:t,insert:o,selectFrom:e,selectTo:e+o.length}}function be(e,t){let o=e.lastIndexOf(`
2
2
  `,t-1)+1;return/^[ \t]*/.exec(e.slice(o))[0]}function A(e,t,o,s=!1){let a=e.lastIndexOf(`
3
3
  `,t-1)+1,r=e.indexOf(`
4
4
  `,t);r<0&&(r=e.length);let c=be(e,t),m=s?o:o.split(`
@@ -0,0 +1,4 @@
1
+ "use client";import{Ca as Hr,Da as zr,Ia as Gr,Ja as de,Ka as Vr,La as Jr,Qa as Xr,Ra as gt,Ua as hn,W as Ft,Wa as ae,X as _t,b as qr,c as yn,d as Fr,e as qt,ja as _r,ka as Mr,la as Kr,ma as Dr,na as jr,oa as Ur,pa as Wr,qa as ye,sa as yt,ta as $r,ua as Yr,va as Mt,wa as Br,ya as gn,za as ne}from"./chunk-WCEMPYVI.js";import{S as ue,Y as et,da as $,o as Ir,p as Tr}from"./chunk-XXVOKKJV.js";import{fa as Or,ha as je}from"./chunk-UFQDBLLF.js";import{i as Lr,j as ft,k as Ae}from"./chunk-YDV7IGPY.js";import{mi as Ar}from"./chunk-3P4XQK3S.js";import"./chunk-AHUOASUP.js";import"./chunk-2NWFNMO3.js";import{a as fn,b as ki}from"./chunk-Y6SLVHK3.js";var to=fn((Xs,eo)=>{"use strict";var Pi="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";eo.exports=Pi});var ao=fn((Zs,oo)=>{"use strict";var Ni=to();function no(){}function ro(){}ro.resetWarningCache=no;oo.exports=function(){function e(r,a,s,u,g,f){if(f!==Ni){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ro,resetWarningCache:no};return n.PropTypes=n,n}});var so=fn((tc,io)=>{"use strict";io.exports=ao()();var Qs,ec});import{useEffect as Ta,useMemo as Aa,useRef as ot,useState as $e}from"react";import{formatTime as xi}from"efficient-shell/format";function Zr(e,t){let n=Tr(t);return!n||Number.isNaN(new Date(e).getTime())?"":xi(e,{locale:Ir(),timeZone:n})}import{rootIsDark as Ci}from"efficient-shell/format";function Qr(){if(typeof document>"u")return;let e=getComputedStyle(document.documentElement),t=(r,a)=>e.getPropertyValue(r).trim()||a,n=Ci({whenUnset:!0});return{theme:n?"night":"stripe",variables:{colorPrimary:t("--accent",n?"#c9a461":"#8a6a2a"),colorBackground:t("--site-surface",n?"#131313":"#ffffff"),colorText:t("--fg",n?"#f5f1e8":"#0a0a0a"),borderRadius:"0px"}}}import{userZone as Ls,parseOption as Is}from"efficient-shell/format";var K=ki(so(),1);import L from"react";function co(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Si(e){if(Array.isArray(e))return e}function fo(e,t,n){return(t=Li(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wi(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,u,g=[],f=!0,p=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(r=s.call(n)).done)&&(g.push(r.value),g.length!==t);f=!0);}catch(b){p=!0,a=b}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(p)throw a}}return g}}function Ei(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function uo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lo(Object(n),!0).forEach(function(r){fo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ri(e,t){if(e==null)return{};var n,r,a=Oi(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Oi(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function yo(e,t){return Si(e)||wi(e,t)||Ii(e,t)||Ei()}function Ai(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Li(e){var t=Ai(e,"string");return typeof t=="symbol"?t:t+""}function bn(e){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(e)}function Ii(e,t){if(e){if(typeof e=="string")return co(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?co(e,t):void 0}}var Z=function(t,n,r){var a=!!r,s=L.useRef(r);L.useEffect(function(){s.current=r},[r]),L.useEffect(function(){if(!a||!t)return function(){};var u=function(){if(s.current)return s.current.apply(s,arguments)};return t.on(n,u),function(){t.off(n,u)}},[a,n,t,s])},vn=function(t){var n=L.useRef(t);return L.useEffect(function(){n.current=t},[t]),n.current},tt=function(t){return t!==null&&bn(t)==="object"},Ti=function(t){return tt(t)&&typeof t.then=="function"},qi=function(t){return tt(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},po="[object Object]",Fi=function e(t,n){if(t===n)return!0;if(!tt(t)||!tt(n))return t===n;var r=Array.isArray(t),a=Array.isArray(n);if(r!==a)return!1;var s=Object.prototype.toString.call(t)===po,u=Object.prototype.toString.call(n)===po;if(s!==u)return!1;if(!s&&!r)return t===n;var g=Object.keys(t),f=Object.keys(n);if(g.length!==f.length)return!1;for(var p={},b=0;b<g.length;b+=1)p[g[b]]=!0;for(var h=0;h<f.length;h+=1)p[f[h]]=!0;var v=Object.keys(p);if(v.length!==g.length)return!1;var k=t,E=n,C=function(H){return e(k[H],E[H])};return v.every(C)},go=function(t,n,r){return tt(t)?Object.keys(t).reduce(function(a,s){var u=!tt(n)||!Fi(t[s],n[s]);return r.includes(s)?(u&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),a):u?uo(uo({},a||{}),{},fo({},s,t[s])):a},null):null},ho="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",mo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;if(t===null||qi(t))return t;throw new Error(n)},_i=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;if(Ti(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(a){return mo(a,n)})};var r=mo(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Mi=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"6.12.0"}),t.registerAppInfo({name:"react-stripe-js",version:"6.12.0",url:"https://stripe.com/docs/stripe-js/react"}))},Kt=L.createContext(null);Kt.displayName="ElementsContext";var bo=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t},xn=function(t){var n=t.stripe,r=t.options,a=t.children,s=L.useMemo(function(){return _i(n)},[n]),u=L.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(r):null}}),g=yo(u,2),f=g[0],p=g[1];L.useEffect(function(){var v=!0,k=function(C){p(function(O){return O.stripe?O:{stripe:C,elements:C.elements(r)}})};return s.tag==="async"&&!f.stripe?s.stripePromise.then(function(E){E&&v&&k(E)}):s.tag==="sync"&&!f.stripe&&k(s.stripe),function(){v=!1}},[s,f,r]);var b=vn(n);L.useEffect(function(){b!==null&&b!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[b,n]);var h=vn(r);return L.useEffect(function(){if(f.elements){var v=go(r,h,["clientSecret","fonts"]);v&&f.elements.update(v)}},[r,h,f.elements]),L.useEffect(function(){Mi(f.stripe)},[f.stripe]),L.createElement(Kt.Provider,{value:f},a)};xn.propTypes={stripe:K.default.any,options:K.default.object};var vo=function(t){var n=L.useContext(Kt);return bo(n,t)},ko=function(){var t=vo("calls useElements()"),n=t.elements;return n},Ki=function(t){var n=t.children,r=vo("mounts <ElementsConsumer>");return n(r)};Ki.propTypes={children:K.default.func.isRequired};var Di=L.createContext(null);Di.displayName="CheckoutContext";var xo=L.createContext(null);xo.displayName="CheckoutSdkContext";var kn=function(t){var n=L.useContext(xo),r=L.useContext(Kt);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both a checkout provider and <Elements> provider."));return n}else return bo(r,t)},ji=["mode"],Ui=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},D=function(t,n,r){var a="".concat(Ui(t),"Element"),s=function(p){var b=p.id,h=p.className,v=p.options,k=v===void 0?{}:v,E=p.onBlur,C=p.onFocus,O=p.onReady,H=p.onChange,R=p.onEscape,P=p.onClick,z=p.onLoadError,G=p.onLoaderStart,se=p.onNetworksChange,Se=p.onConfirm,M=p.onCancel,me=p.onShippingAddressChange,we=p.onShippingRateChange,Ie=p.onSavedPaymentMethodRemove,te=p.onSavedPaymentMethodUpdate,he=p.onAvailablePaymentMethodsChange,J=kn("mounts <".concat(a,">")),Q="elements"in J?J.elements:null,y="checkoutSdk"in J?J.checkoutSdk:null,Ye=L.useState(null),be=yo(Ye,2),U=be[0],Be=be[1],re=L.useRef(null),ve=L.useRef(null);Z(U,"blur",E),Z(U,"focus",C),Z(U,"escape",R),Z(U,"click",P),Z(U,"loaderror",z),Z(U,"loaderstart",G),Z(U,"networkschange",se),Z(U,"confirm",Se),Z(U,"cancel",M),Z(U,"shippingaddresschange",me),Z(U,"shippingratechange",we),Z(U,"savedpaymentmethodremove",Ie),Z(U,"savedpaymentmethodupdate",te),Z(U,"availablepaymentmethodschange",he),Z(U,"change",H);var ke;O&&(t==="expressCheckout"?ke=O:ke=function(){O(U)}),Z(U,"ready",ke),L.useLayoutEffect(function(){if(re.current===null&&ve.current!==null&&(Q||y)){var I=null;if(y){var ee=y,qe=y;switch(t){case"paymentForm":I=qe.createForm(k);break;case"payment":I=ee.createPaymentElement(k);break;case"address":if("mode"in k){var ce=k.mode,Ee=Ri(k,ji);if(ce==="shipping")I=ee.createShippingAddressElement(Ee);else if(ce==="billing")I=ee.createBillingAddressElement(Ee);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":I=ee.createExpressCheckoutElement(k);break;case"currencySelector":I=y.createCurrencySelectorElement();break;case"taxId":I=ee.createTaxIdElement(k);break;case"contactDetails":I=ee.createContactDetailsElement();break;case"linkSignup":if("createLinkSignupElement"in y)I=y.createLinkSignupElement(k);else throw new Error("<LinkSignupElement> requires <CheckoutElementsProvider> and is not supported inside <CheckoutFormProvider>.");break;case"terms":I=ee.createTermsElement(k);break;default:throw new Error("<".concat(a,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else Q&&(I=Q.create(t,k));re.current=I,Be(I),I&&I.mount(ve.current)}},[Q,y,k]);var Te=vn(k);return L.useEffect(function(){if(re.current){var I=go(k,Te,["paymentRequest"]);I&&"update"in re.current&&re.current.update(I)}},[k,Te]),L.useLayoutEffect(function(){return function(){if(re.current&&typeof re.current.destroy=="function")try{re.current.destroy(),re.current=null}catch{}}},[]),L.createElement("div",{id:b,className:h,ref:ve})},u=function(p){kn("mounts <".concat(a,">"));var b=p.id,h=p.className;return L.createElement("div",{id:b,className:h})},g=n?u:s;return g.propTypes={id:K.default.string,className:K.default.string,onChange:K.default.func,onBlur:K.default.func,onFocus:K.default.func,onReady:K.default.func,onEscape:K.default.func,onClick:K.default.func,onLoadError:K.default.func,onLoaderStart:K.default.func,onNetworksChange:K.default.func,onConfirm:K.default.func,onCancel:K.default.func,onShippingAddressChange:K.default.func,onShippingRateChange:K.default.func,onSavedPaymentMethodRemove:K.default.func,onSavedPaymentMethodUpdate:K.default.func,onAvailablePaymentMethodsChange:K.default.func,options:K.default.object},g.displayName=a,g.__elementType=t,g},j=typeof window>"u",Wi=L.createContext(null);Wi.displayName="EmbeddedCheckoutProviderContext";var Co=function(){var t=kn("calls useStripe()"),n=t.stripe;return n},rc=D("auBankAccount",j),oc=D("card",j),ac=D("cardNumber",j),ic=D("cardExpiry",j),sc=D("cardCvc",j),cc=D("currencySelector",j),lc=D("iban",j),Po=D("payment",j),uc=D("expressCheckout",j),dc=D("paymentRequestButton",j),pc=D("linkAuthentication",j),mc=D("linkSignup",j),fc=D("contactDetails",j),yc=D("address",j),gc=D("shippingAddress",j),hc=D("paymentMethodMessaging",j),bc=D("taxId",j),vc=D("issuingCardNumberDisplay",j),kc=D("issuingCardCvcDisplay",j),xc=D("issuingCardExpiryDisplay",j),Cc=D("issuingCardPinDisplay",j),Pc=D("issuingCardCopyButton",j),Nc=D("terms",j);function Ut(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ut=function(t){return typeof t}:Ut=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(e)}var wo="dahlia",$i=function(t){return t===3?"v3":t},Eo="https://js.stripe.com",Yi="".concat(Eo,"/").concat(wo,"/stripe.js"),Bi=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Hi=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,No="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",zi=function(t){return Bi.test(t)||Hi.test(t)},Gi=function(){for(var t=document.querySelectorAll('script[src^="'.concat(Eo,'"]')),n=0;n<t.length;n++){var r=t[n];if(zi(r.src))return r}return null},So=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(Yi).concat(n);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(r),r},Vi=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.17.0",startTime:n})},ht=null,Dt=null,jt=null,Ji=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},Xi=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},Zi=function(t){return ht!==null?ht:(ht=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(No),window.Stripe){n(window.Stripe);return}try{var a=Gi();if(a&&t)console.warn(No);else if(!a)a=So(t);else if(a&&jt!==null&&Dt!==null){var s;a.removeEventListener("load",jt),a.removeEventListener("error",Dt),(s=a.parentNode)===null||s===void 0||s.removeChild(a),a=So(t)}jt=Xi(n,r),Dt=Ji(r),a.addEventListener("load",jt),a.addEventListener("error",Dt)}catch(u){r(u);return}}),ht.catch(function(n){return ht=null,Promise.reject(n)}))},Qi=function(t,n,r){if(t===null)return null;var a=n[0];if(typeof a!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Ut(a)," instead."));var s=a.match(/^pk_test/),u=$i(t.version),g=wo;s&&u!==g&&console.warn("Stripe.js@".concat(u," was loaded on the page, but @stripe/stripe-js@").concat("9.17.0"," expected Stripe.js@").concat(g,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var f=t.apply(void 0,n);return Vi(f,r),f},bt,Ro=!1,Oo=function(){return bt||(bt=Zi(null).catch(function(t){return bt=null,Promise.reject(t)}),bt)};Promise.resolve().then(function(){return Oo()}).catch(function(e){Ro||console.warn(e)});var Wt=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Ro=!0;var a=Date.now();return Oo().then(function(s){return Qi(s,n,a)})};var $t=2;function Ao(e){return e==="card"}var es="checkout_unavailable",ts="checkout_waiting",Lo="committed",Le="We could not check your payment. Please try again.",Yt="Your last change was not saved. This is your order as placed.",Io="Your bank is still waiting for you to approve this payment, so your order stays as it was. Finish the approval, or try again in a few minutes.",To=1e4;async function qo(e,t=To){let n,r=new Promise(s=>{n=setTimeout(()=>s(void 0),t)}),a=(async()=>{try{return(await(await Wt(e.publishableKey))?.retrievePaymentIntent(e.clientSecret))?.paymentIntent?.status}catch{return}})();try{return await Promise.race([a,r])}finally{clearTimeout(n)}}var Fo=new Set(["none","requires_payment_method","canceled"]);async function Cn(e,t=To){let n,r=new Promise(a=>{n=setTimeout(()=>a(void 0),t)});try{return await Promise.race([$.releaseCheckout({idempotencyKey:e}).then(a=>a.status,()=>{}),r])}finally{clearTimeout(n)}}function _o(e,t){return e instanceof ue&&typeof e.data=="object"&&e.data!==null&&e.data.code===t}function Bt(e){return _o(e,es)}function Pn(e){return _o(e,ts)}function Nn(e){return e instanceof ue&&e.status>=400&&e.status<500&&e.status!==408}function Mo(e){return JSON.stringify([e.email,e.firstName,e.lastName,e.phone,e.address,e.city,e.subdivision,e.postcode,e.country,e.lines,e.shippingMethodId,e.couponCode,e.currency,e.shopperId,e.company])}function Ht(e){return e.orderNumber||e.checkoutNumber}function ns(e){return e.orderNumber?{kind:"placed",order:e}:{kind:e.status==="released"?"refunded":e.status==="expired"?"expired":"pending",checkoutNumber:e.checkoutNumber}}async function Ko({checkoutNumber:e,resend:t,page:n}){n.setConfirming(!0);let r;try{r=ns(await t())}catch{r={kind:"pending",checkoutNumber:e}}r.kind==="placed"?(n.markPaid(),n.track(r.order),n.land(r.order)):n.unplaced({...r,checkoutNumber:r.checkoutNumber||e}),n.setConfirming(!1)}import{createContext as vs,useContext as ks,useEffect as B,useMemo as ua,useRef as Y,useState as S}from"react";var rs="sf:gclid",os="sf:fbclid",as=2160*60*60*1e3;function Uo(){return typeof window<"u"}function Do(e){let t=ft.getItem(e);if(!t)return"";try{let{v:n,t:r}=JSON.parse(t);return!n||typeof r!="number"||Date.now()-r>as?"":n}catch{return""}}function jo(e){if(!Uo())return"";let t=e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1"),n=document.cookie.match(new RegExp(`(?:^|; )${t}=([^;]*)`));return n?decodeURIComponent(n[1]):""}function Wo(){if(!Uo())return{};let e=Do(rs),t=Do(os),n=jo("_fbp"),r=jo("_fbc");!r&&t&&(r=`fb.1.${Date.now()}.${t}`);let a={};return e&&(a.gclid=e),t&&(a.fbclid=t),n&&(a.fbp=n),r&&(a.fbc=r),a}var $o="sf:meta-purchases",is=20;function Bo(){return typeof window>"u"||window.parent!==window}function ss(...e){try{if(Bo()||typeof window.fbq!="function")return;window.fbq(...e)}catch{}}var Yo=new Set;function cs(e){if(Yo.has(e))return!1;Yo.add(e);try{let t=JSON.parse(ft.getItem($o)??"[]");if(t.includes(e))return!1;ft.setItem($o,JSON.stringify([...t,e].slice(-is)))}catch{}return!0}function ls(e){return[...new Set(e.filter(yt).flatMap(t=>t.components.map(n=>n.partNumber)))]}function Ho(e){let t=e.confirmation;Bo()||!cs(t.orderNumber)||ss("track","Purchase",{value:Number(t.grandTotal),currency:t.currency,content_type:"product",content_ids:ls(e.lines)},{eventID:t.orderNumber})}var Sn="checkout-afterpay-context",wn="checkout-gocardless-context",En="checkout-zip-context",Rn="checkout-klarna-context";function us(e){return e?.lostChange===!0}function ds({evidence:e,parked:t}){return e?{action:"capture",evidence:e,parked:t}:t?{action:"settle",parked:t}:{action:"ignore"}}function ps(e,t){let n=e.getItem(t);if(e.removeItem(t),!n)return null;try{return JSON.parse(n)}catch{return null}}function ms(e){let t=e.words?.declined??`${e.name} declined the payment \u2014 our team will follow up on payment.`;return{settled:e.words?.settled??`The ${e.name} payment was not completed \u2014 our team will follow up on payment.`,declined:t,collecting:e.words?.collecting??t,unconfirmed:e.words?.unconfirmed??`We could not confirm the ${e.name} payment \u2014 our team will follow up on payment.`}}var zo={name:"Afterpay",legParam:"afterpay",legValues:["confirm","cancel"],storageKey:Sn,evidenceFrom(e,t){return t==="cancel"||(e.get("status")??"").toUpperCase()==="CANCELLED"?null:e.get("orderToken")},requestFrom:e=>({token:e})},Go={name:"Zip",legParam:"zip",legValues:["return"],storageKey:En,evidenceFrom(e){let t=(e.get("result")??"").toLowerCase();return t==="cancelled"||t==="declined"?null:e.get("checkoutId")},requestFrom:e=>({checkoutId:e})},Vo={name:"GoCardless",legParam:"gocardless",legValues:["confirm","cancel"],storageKey:wn,evidenceFrom:(e,t)=>t==="confirm"?t:null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??""}),keyedByParked:!0,words:{settled:"The direct debit was not set up \u2014 our team will follow up on payment.",declined:"The direct debit was declined \u2014 our team will follow up on payment.",collecting:"Your direct debit is set up \u2014 the payment is collecting and will clear in a few days.",unconfirmed:"We could not confirm the direct debit \u2014 our team will follow up on payment."}},Jo={name:"Klarna",legParam:"klarna",legValues:["confirm","cancel"],storageKey:Rn,evidenceFrom:(e,t)=>t==="confirm"?e.get("authorization_token"):null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??"",authorizationToken:e}),keyedByParked:!0,words:{collecting:"Your Klarna payment is being reviewed \u2014 we'll confirm the outcome shortly."}};async function vt(e,t){let n=new URLSearchParams(t.search),r=n.get(e.legParam);if(!r||!e.legValues.includes(r))return;let a=ps(t.storage,e.storageKey),s=e.evidenceFrom(n,r);t.scrubQuery();let u=ds({evidence:s,parked:a});if(u.action==="ignore"||e.keyedByParked&&!u.parked)return;let g=ms(e);if(t.page.clearCart(),us(u.parked)&&t.page.lostChange(),u.action==="settle"){t.page.note(g.settled,!0),t.page.land(u.parked.confirmation);return}t.page.setConfirming(!0);try{let f=await t.capture(e.requestFrom(u.evidence,u.parked));f.status==="paid"?t.page.markPaid():f.status==="collecting"?t.page.note(g.collecting,!e.words?.collecting):t.page.note(g.declined,!0),t.page.land(u.parked?.confirmation??f)}catch{u.parked?(t.page.note(g.unconfirmed,!0),t.page.land(u.parked.confirmation)):t.page.fail(`We could not confirm your ${e.name} payment. Please contact us before trying again \u2014 your payment may already have been taken.`)}finally{t.page.setConfirming(!1)}}function Xo(e,t,n){let r=(t??"").trim();if(!r)return"";if(n.length===0)return r;let a=r.toUpperCase(),s=`${e.toUpperCase()}-${a}`,u=n.find(g=>g.code&&g.code.toUpperCase()===a)??n.find(g=>g.code&&g.code.toUpperCase()===s)??n.find(g=>g.name.toUpperCase()===a);return u?u.code||u.name:""}var An="checkout-memory-context",ea="Prices have changed since this checkout started. The total shows today's prices.",ta="We couldn't check today's prices for your basket. Try again in a moment \u2014 you can place the order once the total is confirmed.",na=3,fs=3600*1e3;function ys(e){return{id:e.id,slug:e.slug,name:{lead:e.name?.lead,accent:e.name?.accent},process:e.process,positionNo:e.positionNo,config:(e.config??[]).map(t=>({label:t.label,gold:t.gold})),finishName:e.finishName,size:e.size,qty:e.qty,href:e.href,kind:e.kind,sku:e.sku,components:e.components.map(t=>({partNumber:t.partNumber,wheels:t.wheels,prices:{...t.prices},hand:t.hand}))}}var zt=e=>e.map(ys);function ra(e,t){let n=r=>JSON.stringify(r.map(a=>[a.id,a.qty]).sort(([a],[s])=>a<s?-1:a>s?1:0));return n(e)===n(t)}function oa(e){let t=e.customer;return{customer:{email:t.email,name:t.name,phone:t.phone,companyName:t.companyName,address:t.address,city:t.city,state:t.state,zipCode:t.zipCode,country:t.country},items:e.items.flatMap(n=>qt([{partNumber:n.partNumber,wheels:n.quantity,prices:{}}],1)),currency:e.currency,idempotencyKey:e.idempotencyKey,shippingMethodId:e.shippingMethodId,couponCode:e.couponCode}}function Ln(e){return{...oa(e),payFirst:!!e.checkoutFlow}}function aa(e){return oa(e)}var gs={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null};function In(e){let t=n=>typeof n=="string"?n:"";return{email:t(e.email),firstName:t(e.firstName),lastName:t(e.lastName),company:t(e.company),address1:t(e.address1),address2:t(e.address2),city:t(e.city),postcode:t(e.postcode),phone:t(e.phone),country:t(e.country),subdivision:t(e.subdivision),selectedAddressId:t(e.selectedAddressId),shippingMethodId:typeof e.shippingMethodId=="string"?e.shippingMethodId:null,couponCode:typeof e.couponCode=="string"?e.couponCode:null}}function Tn(e){return{orderNumber:e.orderNumber,checkoutNumber:e.checkoutNumber,expiresAt:e.expiresAt,status:e.status,total:e.total,currency:e.currency,freightCharge:e.freightCharge,discountAmount:e.discountAmount,grandTotal:e.grandTotal,shippingMethod:e.shippingMethod,couponCode:e.couponCode}}function qn(e){return e.lastPress!==null||e.unpaidOrder!==null||e.keptCardKey!==null}function hs(e){let t=e.parkedAt+fs,n=e.press.unpaidOrder,r=n&&!n.orderNumber?n.expiresAt:null,a=r?Date.parse(r):NaN;return Number.isNaN(a)?t:Math.min(t,a)}function ia(e){try{let t={...e,lines:zt(e.lines),press:ca(e.press)};Ae.setItem(An,JSON.stringify({v:na,...t}))}catch{}}var Ue=e=>!!e&&typeof e=="object"&&!Array.isArray(e),sa=e=>Ue(e)&&typeof e.idempotencyKey=="string"&&Array.isArray(e.items)&&e.items.every(t=>Ue(t)&&typeof t.partNumber=="string"&&typeof t.quantity=="number")&&Ue(e.customer)&&typeof e.payFirst=="boolean",On=e=>Ue(e)&&typeof e.id=="string"&&typeof e.qty=="number"&&Array.isArray(e.components);function bs(e){return Ue(e)&&typeof e.key=="string"&&sa(e.request)&&Array.isArray(e.lines)&&e.lines.every(On)&&Array.isArray(e.plainLines)&&e.plainLines.every(On)?{key:e.key,request:e.request,lines:zt(e.lines),goods:typeof e.goods=="string"?e.goods:"",plainPressed:e.plainPressed===!0,plainLines:zt(e.plainLines),plainGoods:typeof e.plainGoods=="string"?e.plainGoods:""}:null}var Zo=e=>typeof e=="string"?e:null,Qo={lastPress:bs,keptCardKey:Zo,placedShape:Zo,placedRequest:e=>sa(e)?e:null,unpaidOrder:e=>Ue(e)?Tn(e):null};function ca(e){let t=Ue(e)?e:{},n={...gs};for(let r of Object.keys(Qo))n[r]=Qo[r](t[r]);return n}function la(){let e;try{e=Ae.getItem(An)}catch{return null}if(!e)return null;try{let t=JSON.parse(e);if(t.v!==na||typeof t.key!="string"||!t.key||!Array.isArray(t.lines)||!t.lines.every(On)||typeof t.parkedAt!="number")return null;let n={key:t.key,authed:t.authed===!0,parkedAt:t.parkedAt,press:ca(t.press),lines:zt(t.lines),form:t.form&&typeof t.form=="object"?In(t.form):null};return Date.now()>=hs(n)?(Fn(),null):qn(n.press)?n:null}catch{return null}}function Fn(){try{Ae.removeItem(An)}catch{}}import{jsx as Pe}from"react/jsx-runtime";function da(e){let t=e.indexOf(`
3
+ `);return t===-1?[e,""]:[e.slice(0,t),e.slice(t+1)]}function pa(e,{canParkContext:t}={canParkContext:!0}){let n=e.paymentMethods,r=[];return n.includes("card")&&r.push({key:"card",title:"Card",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("paypal")&&e.paypalClientId&&r.push({key:"paypal",title:"PayPal",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAYPAL \xB7 CARDS"})}),n.includes("afterpay")&&r.push({key:"afterpay",title:"Afterpay",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"4 \xD7 INTEREST-FREE"})}),n.includes("square")&&e.squareApplicationId&&e.squareLocationId&&r.push({key:"square",title:"Card (Square)",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("gocardless")&&t&&r.push({key:"gocardless",title:"Bank Direct Debit",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY BY BANK"})}),n.includes("zip")&&r.push({key:"zip",title:"Zip",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY IN 4"})}),n.includes("klarna")&&t&&r.push({key:"klarna",title:"Klarna",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY LATER"})}),n.includes("bank")&&r.push({key:"bank",title:"Bank transfer",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Invoiced"})}),r}var ha="This shop does not take payment online yet. Please contact the shop to order.",nt=class extends Error{};function ma(e,t){if(!e.orderNumber&&Bt(t))return t.message;let n=t instanceof ue?` (${t.message})`:"";return e.orderNumber?`Your order ${e.orderNumber} is saved, but the payment did not start${n}. Try the payment again \u2014 your order will not be placed twice.`:`Your items are held under ${e.checkoutNumber}, but the payment did not start${n}. Try the payment again \u2014 you will not be charged twice.`}var xs=3e3,Cs=.005,fa=new Set(["paypal","square","afterpay","gocardless","zip","klarna"]);function ya(){let e=Xr();return{...e==="denied"?{}:Wo(),...e?{adConsent:e}:{}}}var ge=e=>JSON.parse(e),Ps={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null},Ns={lastPress:e=>e&&{key:e.key,request:Ln(e.request),lines:e.lines,goods:ge(e.shape)[0],plainPressed:!!e.plainMethod,plainLines:e.plainLines,plainGoods:ge(e.plainShape)[0]},keptCardKey:e=>e,placedShape:e=>e===null?null:ge(e)[0],placedRequest:e=>e&&Ln(e.body),unpaidOrder:e=>e&&Tn(e)};function ga(e,t){let n={};for(let r of Object.keys(e))n[r]=e[r](t[r]);return n}var ba="Shipping cannot be calculated right now. Please try again.";function va(e){return`Your order is saved, so its contact, address, delivery and discount can't change here. To change any of them, contact the shop and quote ${e}.`}function Ss({site:e,logo:t,signInHref:n=null,preview:r=!1}){let{items:a,totals:s,coupon:u,refuseCoupon:g,deliveryOptions:f,shippingMethodId:p,setShippingMethodId:b,setQuoteDestination:h,courier:v,requote:k,identify:E,clearCapturedCart:C,replaceItems:O,removeCoupon:H,applyCoupon:R}=Mt(),P=f.find(o=>o.id===p)?.pickupLocation??null,{country:z,countries:G,activeCountry:se,formatMoney:Se}=ye(),[M,me]=S(()=>pa(e)[0]?.key??null),[we,Ie]=S(!0);B(()=>{Ie(Lr(Ae))},[]);let[te,he]=S(!1),[J,Q]=S(""),[y,Ye]=S(""),[be,U]=S(""),[Be,re]=S(""),[ve,ke]=S(""),[Te,I]=S(""),[ee,qe]=S(""),[ce,Ee]=S(""),[He,at]=S(""),[W,it]=S(()=>z||G[0]?.code||""),[xe,kt]=S(""),[st,jn]=S([]),[Zt,Qt]=S(null),[xt,ze]=S(null),Un=ua(()=>G.find(o=>o.code===W)??se,[G,W,se]),qa=Un?.postalLabel||"Postal Code",Fa=st[0]?.divisionType||"State / Province";B(()=>{if(!W){jn([]),Qt(W);return}Qt(null);let o=!1;return $.listCountrySubdivisions(W).then(c=>{o||(jn(c),Qt(W),kt(""))}),()=>{o=!0}},[W]);let Wn=ve.trim()!==""&&ee.trim()!==""&&ce.trim()!==""&&Zt===W&&(st.length===0||xe!=="")?ce.trim():"";B(()=>{h(W?{country:W,subdivision:xe,postcode:Wn}:null)},[W,xe,Wn,h]),B(()=>()=>h(null),[h]);let _a=v?.status==="unavailable",Ma=k,[ct,$n]=S(null),[Ka,Yn]=S([]),[en,Ct]=S("new"),[Bn,Hn]=S(!1),[tn,Da]=S("Home"),[ja,zn]=S(null),[Ua,nn]=S(null),[Fe,Pt]=S(()=>gt()),Gn=Y(null),[rn,Ge]=S(null),[Wa,ie]=S(null),[Vn,Nt]=S(null),[Jn,$a]=S(!1),[Xn,Ya]=S(!1),[Re,Ve]=S(null),[Ba,St]=S(!1),[X,le]=S(null),Zn=!!X?.orderNumber,Ha=Zn||te,[za,Ga]=S(null),[Va,Ja]=S(!1),[Xa,Za]=S(!1),[Qa,ei]=S(!1),[ti,ni]=S(!1),[Qn,ri]=S(!1),[oi,on]=S(!1),[lt,er]=S(null),A=Y({...Ps});A.current.unpaidOrder=X;let an=Y(!1),_e=Y(a),tr=!!(rn||lt&&lt.kind!=="processing"||Qn||Jn||Xn||Vn&&Re?.orderNumber);B(()=>{tr&&(O([]),H())},[tr,O,H]);let nr=Y(!1);B(()=>{r||nr.current||!a.some(yt)||(nr.current=!0,_r({lines:a,currency:s.currency,value:s.subtotal-s.discount,coupon:u?.valid?u.code:void 0}))},[a,s,u,r]),B(()=>{E(J,y.trim()||void 0)},[J,y,E]);let rr=Y(null),[wt,ai]=S(null);B(()=>{let o=rr.current;if(!wt||!o)return;let c=()=>o.style.setProperty("--sf-checkout-header-h",`${wt.offsetHeight}px`);c();let m=new ResizeObserver(c);return m.observe(wt),()=>m.disconnect()},[wt]),B(()=>{let o=m=>({setConfirming:m,land:Ge,markPaid:()=>St(!0),note:(w,d)=>Ga({text:w,warning:d}),fail:ie,clearCart:C,lostChange:()=>nn(Yt)}),c={search:window.location.search,storage:Ae,scrubQuery:()=>window.history.replaceState(null,"",window.location.pathname)};vt(zo,{...c,capture:$.captureAfterpayPayment,page:o(Ja)}),vt(Go,{...c,capture:$.captureZipPayment,page:o(ei)}),vt(Vo,{...c,capture:$.completeGocardlessPayment,page:o(Za)}),vt(Jo,{...c,capture:$.captureKlarnaPayment,page:o(ni)})},[]);function or(o){let[c,m]=da(o.address);ke(c),I(m),qe(o.city),Ee(o.zip_code),o.country&&it(o.country),o.phone&&at(o.phone),ze({country:o.country||null,state:o.state??""})}B(()=>{if(xt){if((xt.country||W)!==W){ze(null);return}Zt===W&&(kt(Xo(W,xt.state,st)),ze(null))}},[xt,W,Zt,st]),B(()=>{let o=!1;return(async()=>{try{let[c,m,w]=await Promise.all([et.me(),et.myProfile().catch(()=>null),et.myAddresses().catch(()=>[])]);if(o)return;$n(c);let d=w.filter(_=>_.is_active);Yn(d),Q(c.email);let T=(m?.contact_name??"").split(/\s+/);Ye(c.first_name||T[0]||""),U(c.last_name||T.slice(1).join(" "));let F=c.phone||m?.phone;F&&at(F);let q=d.find(_=>_.id===c.default_delivery_location)??d[0];if(q)Ct(q.id),or(q);else if(m){let[_,Qe]=da(m.address??"");ke(_),I(Qe),qe(m.city??""),Ee(m.zip_code??""),m.country&&it(m.country),ze({country:m.country||null,state:m.state??""})}Tt.current&&dr(Tt.current,!1)}catch{}})(),()=>{o=!0}},[]);function ii(){et.logout(),ut.current=!0,Tt.current=null,It.current=null,dt(),$n(null),Yn([]),Ct("new"),Hn(!1),Q(""),Ye(""),U(""),re(""),ke(""),I(""),qe(""),Ee(""),at(""),it(z||G[0]?.code||""),kt(""),ze(null)}let Je=ua(()=>pa(e,{canParkContext:we}),[e,we]);B(()=>{Je.some(o=>o.key===M)||me(Je[0]?.key??null)},[Je,M]);let si=Je.length===0,Et=Te.trim()?`${ve}
4
+ ${Te.trim()}`:ve,ci=Mo({email:J,firstName:y,lastName:be,company:Be.trim(),phone:He,address:Et,city:ee,subdivision:xe,postcode:ce,country:W,lines:a.map(o=>[o.id,o.qty]),shippingMethodId:p,couponCode:yn(u),currency:s.currency,shopperId:ct?.id??null}),oe=JSON.stringify([ci,M]),sn=Y(null),Rt=Y(!1),Oe=Y(!1),Xe=Y(null),Ot=Y(!1),fe=Y(oe);fe.current=oe;let ar=Y(te);ar.current=te;let At=Y(null);B(()=>{let o=()=>{let c=At.current;c&&(At.current=null,le(c),he(!1))};return window.addEventListener("pageshow",o),()=>window.removeEventListener("pageshow",o)},[]);function Lt(o,c,m,w){let d={idempotencyKey:c,confirmation:m};hr()&&(d.lostChange=!0),Ae.setItem(o,JSON.stringify(d)),window.location.assign(w),At.current=m}async function ir(o){he(!0);try{await o()}finally{At.current||he(!1)}}let sr=Y(!1),cr=!!(rn||lt&&lt.kind!=="processing");B(()=>{cr&&(sr.current=!0,dt())},[cr]);let It=Y(null),ut=Y(!1),cn=Y(null);function dt(){cn.current=null,Fn()}let Tt=Y(null),[Ze,li]=S(!1);function ln(o){if(sr.current||r||ut.current)return;let c={key:o,authed:an.current,parkedAt:cn.current??=Date.now(),press:ga(Ns,A.current),lines:a.length>0?a:_e.current,form:In({email:J,firstName:y,lastName:be,company:Be,address1:ve,address2:Te,city:ee,postcode:ce,phone:He,country:W,subdivision:xe,selectedAddressId:en,shippingMethodId:p,couponCode:u?.valid?u.code:null})};qn(c.press)?ia(c):dt()}let lr=Y(M);lr.current=M;function un(o){return{...aa(o),...ya(),...o.payFirst?{checkoutFlow:$t}:{}}}function ui(o,c){let m=o.request.payFirst?"":null,w=o.plainPressed?null:"",d=()=>lr.current??"";return{key:o.key,send:()=>c(un(o.request)),request:un(o.request),lines:o.lines,shape:JSON.stringify([o.goods,null]),get method(){return m??d()},set method(T){m=T},get plainMethod(){return w??d()},set plainMethod(T){w=T},plainLines:o.plainLines,plainShape:JSON.stringify([o.plainGoods,null])}}let[di,pi]=S(!1),ur=di?!s.quoted||s.serverSubtotal===null?"waiting":Math.abs(s.serverSubtotal-s.subtotal)<Cs?"same":"changed":null,dn=!X&&ur==="waiting",mi=dn?{...s,repricing:!0}:s,pn=dn&&s.quoteFailed;B(()=>{if(!pn)return;let o=setInterval(k,xs);return()=>clearInterval(o)},[pn,k]);let fi=k;function dr(o,c=!0){Q(o.email),Ye(o.firstName),U(o.lastName),re(o.company),ke(o.address1),I(o.address2),qe(o.city),Ee(o.postcode),at(o.phone),o.country&&it(o.country),ze({country:o.country||null,state:o.subdivision}),Ct(o.selectedAddressId),o.shippingMethodId&&b(o.shippingMethodId),c&&(It.current=o.couponCode)}B(()=>{let o=r?null:la(),c=!!(o&&a.length>0);if(o&&c&&!ra(o.lines,a)&&(dt(),o=null),o){let m=o.authed?$.createOrderAuthed:$.createOrder;Pt(o.key),cn.current=o.parkedAt,an.current=o.authed;let w={lastPress:d=>d&&ui(d,m),keptCardKey:d=>d,placedShape:d=>d===null?null:JSON.stringify([d,null]),placedRequest:d=>{if(!d)return null;let T=un(d);return{body:T,send:()=>m(T)}},unpaidOrder:d=>d};A.current=ga(w,o.press),o.press.unpaidOrder&&le(o.press.unpaidOrder),o.lines.length>0&&!c&&(O(o.lines),_e.current=o.lines,pi(!0)),o.form&&(Tt.current=o.form,dr(o.form))}li(!0)},[]),B(()=>{!Ze||a.length>0||A.current.unpaidOrder||te||(ut.current=!0,dt())},[Ze,a.length]),B(()=>{let o=It.current;!Ze||!o||a.length===0||(It.current=null,R(o,J||void 0))},[Ze,a.length]),B(()=>{!Ze||te||ln(Fe)},[Ze,te,Fe,X]);let Me=Y(null);B(()=>{ar.current||(oe!==Me.current&&(Me.current=null),!(!Oe.current||!X||X.orderNumber)&&(oe===A.current.placedShape||oe===Me.current||ir(()=>pr(X))))},[oe,X]);async function pr(o){if(Ot.current)return null;Ot.current=!0;try{let c=Xe.current?await qo(Xe.current):"none";if(c==="succeeded"||c==="processing")return Oe.current=!1,le(null),Ce("card"),c==="succeeded"?await Ke(void 0,o):Cr(o),null;if(c===void 0||!Fo.has(c))return Me.current=fe.current,le(o),ie(c==="requires_action"?Io:Le),null;let m=await Cn(Fe);if(m==="committed")return Oe.current=!1,le(null),Ce("card"),await Ke(void 0,o),null;if(m!=="released")return Me.current=fe.current,le(o),ie(Le),null;Oe.current=!1,Xe.current=null,Me.current=null,ie(null),le(null);let w=gt();return Pt(w),w}finally{Ot.current=!1}}async function yi(){r||te||Ot.current||await ir(gi)}async function gi(){if(X){if((Oe.current?oe!==A.current.placedShape:pt())&&!X.orderNumber){let w=await pr(X);w&&fe.current===oe&&await mr(w);return}ie(null),Rt.current=!1,await mn();let c=ge(fe.current)[1],m=X.orderNumber?c:"card";if(m&&fa.has(m)&&pt()&&ge(fe.current)[0]!==sn.current){fr(X);return}Ce(m),m!==M&&me(m),await Pr(X,m,!X.orderNumber);return}await mr(Fe)}async function mr(o){if(a.length===0||s.repricing||dn||!M||!Je.some(F=>F.key===M))return;let c=a.filter(yt).flatMap(F=>qt(F.components,F.qty));if(c.length===0){ie("Pick a size on each wheel's product page before checking out.");return}ie(null);let m,w=o,d=M,T=!1;try{let F=ct?$.createOrderAuthed:$.createOrder,q={customer:{email:J,name:`${y} ${be}`.trim(),phone:He.trim()||void 0,companyName:Be.trim()||void 0,address:Et,city:ee,state:xe||void 0,zipCode:ce,country:W},items:c,currency:s.currency,idempotencyKey:o,shippingMethodId:p??void 0,couponCode:yn(u),...ya(),...Ao(M)?{checkoutFlow:$t}:{}};A.current.placedRequest={body:q,send:()=>F(q)},an.current=!!ct,ut.current=!1,nn(null),sn.current=null,Rt.current=!1,Xe.current=null,Oe.current=!1,Me.current=null,A.current.placedShape=oe,_e.current=a;let _=A.current.lastPress,Qe=_?.key===q.idempotencyKey&&(_.shape!==oe&&(!!q.checkoutFlow||!!_.method||!!_.plainMethod)||!!q.checkoutFlow&&!!_.plainMethod);Qe&&(A.current.keptCardKey=q.idempotencyKey);let wr=vr(q,F),Er=Qe||!q.checkoutFlow&&A.current.keptCardKey===q.idempotencyKey,Rr=!wr&&!Er&&!q.checkoutFlow&&!!_&&!_.method;Rr&&(_.plainMethod=M,_.plainLines=a,_.plainShape=oe,ln(q.idempotencyKey));let De=await(Er?gr(q,F):F(q).then(mt=>({answer:mt,request:q})).catch(mt=>(wr?yr(mt,q.idempotencyKey):Rr&&Nn(mt)&&(_.plainMethod=""),hi(mt,q,F))));if(!De)return;m=De.answer,w=De.request.idempotencyKey,d=De.method??d,Ce(d),T=pt()||d!==ge(fe.current)[1],De.method&&De.method!==M&&me(De.method),m.orderNumber&&(kr(m),C()),await mn()}catch(F){let q=Fr(F);q?(g(q),ie(`${q} Your order has not been placed. Place it again to continue without the code.`)):F instanceof nt?ie(Le):ie(F instanceof ue?F.message:"Could not place the order. Please try again.");return}if(d&&fa.has(d)&&(T||pt())){fr(m);return}await Pr(m,d,!1,w)}function fr(o){sn.current=ge(fe.current)[0],ie(`${ma(o,null)} ${Yt}`),le(o)}function yr(o,c){Nn(o)&&!Pn(o)&&A.current.lastPress?.key===c&&(A.current.lastPress=null)}async function hi(o,c,m){if(Bt(o))return br(c,m);if(!Pn(o))throw o;return A.current.keptCardKey=c.idempotencyKey,gr(c,m,!0)}async function gr(o,c,m=!1){let w=await Cn(o.idempotencyKey);if(w==="released")return br(o,c);if(w!=="committed")throw new nt;let d=A.current.lastPress?.key===o.idempotencyKey?A.current.lastPress:null;if(_e.current=d?.lines??a,d?.method&&!m){A.current.keptCardKey=null,A.current.placedRequest={body:d.request,send:d.send};let Qe=await d.send().catch(()=>{throw new nt});return A.current.placedShape=d.shape,{answer:Qe,request:o,method:d.method}}let T={...o,checkoutFlow:$t},F=d&&!d.method?{body:d.request,send:d.send}:{body:T,send:()=>c(T)};A.current.placedRequest=F;let q=F.send,_=await q().catch(()=>null);if(!_&&d?.plainMethod)throw new nt;return _?.orderNumber&&_.status!==Lo?(A.current.keptCardKey=null,d?.plainMethod&&(_e.current=d.plainLines),d&&(A.current.placedShape=d.plainMethod?d.plainShape:d.shape),{answer:_,request:o,method:d?.plainMethod||void 0}):(d&&(A.current.placedShape=d.shape),Ce("card"),await xr("",_?async()=>_:()=>Promise.reject(new Error("The order request did not answer."))),await mn(),null)}function pt(){let o=A.current.placedShape;return o!==null&&ge(o)[0]!==ge(fe.current)[0]}function Ce(o){o!==ge(fe.current)[1]&&(Rt.current=!0),nn(hr()?Yt:null)}function hr(){return Rt.current||pt()}async function br(o,c){let m={...o,idempotencyKey:gt()};A.current.keptCardKey=null,Pt(m.idempotencyKey),A.current.placedRequest={body:m,send:()=>c(m)},vr(m,c);try{return{answer:await c(m),request:m}}catch(w){throw yr(w,m.idempotencyKey),w}}function vr(o,c){return A.current.lastPress?.key===o.idempotencyKey?!1:(A.current.lastPress={key:o.idempotencyKey,send:()=>c(o),request:o,lines:a,shape:oe,method:o.checkoutFlow?"":M??"",plainMethod:"",plainLines:a,plainShape:oe},ut.current=!1,ln(o.idempotencyKey),!0)}function kr(o){Mr({confirmation:o,lines:_e.current,adsSendTo:e.googleAdsId&&e.googleAdsConversionLabel?`${e.googleAdsId}/${e.googleAdsConversionLabel}`:null}),Ho({confirmation:o,lines:_e.current})}async function Ke(o,c=Re){if(!c)return;let m=o?async()=>o:A.current.placedRequest?.send;if(c.orderNumber||!m){St(!0),Ge(c);return}await xr(c.checkoutNumber,m)}async function xr(o,c){C(),await Ko({checkoutNumber:o,resend:c,page:{setConfirming:ri,land:Ge,markPaid:()=>St(!0),track:kr,unplaced:er}})}function Cr(o=Re){if(o){if(o.orderNumber){Ge(o);return}C(),er({kind:"processing",checkoutNumber:o.checkoutNumber})}}async function mn(){let o=JSON.stringify([tn.trim(),y,be,He.trim(),Et,ee,xe,ce,W]);if(!(!ct||!Bn||en!=="new"||Gn.current===o))try{await et.createAddress({label:tn.trim()||"Home",contact_name:`${y} ${be}`.trim(),phone:He.trim(),address:Et,city:ee,zip_code:ce,state:xe,country:W}),Gn.current=o,zn("Address saved to your account.")}catch{zn("We couldn't save the address to your account \u2014 you can add it under Account \u2192 Addresses.")}}async function Pr(o,c=M,m=!1,w=Fe){le(null);try{if(c==="card"&&e.paymentMethods.includes("card")){let d=await $.createPaymentIntent({idempotencyKey:w});Xe.current=d;let T=o;if(m){let F=await A.current.placedRequest?.send().catch(()=>null);if(F?.orderNumber){Ce("card"),await Ke(F,o);return}T=Nr(o,F)??{...o,expiresAt:null}}Ce("card"),Ve(T),on(!1),Nt(d)}else if(c==="paypal"&&e.paymentMethods.includes("paypal"))Ve(o),$a(!0);else if(c==="afterpay"&&e.paymentMethods.includes("afterpay")){let d=window.location.origin,T=await $.createAfterpayCheckout({idempotencyKey:w,confirmUrl:`${d}/checkout?afterpay=confirm`,cancelUrl:`${d}/checkout?afterpay=cancel`});Lt(Sn,w,o,T.redirectCheckoutUrl);return}else if(c==="square"&&e.paymentMethods.includes("square"))Ve(o),Ya(!0);else if(c==="gocardless"&&e.paymentMethods.includes("gocardless")){let d=window.location.origin,T=await $.createGocardlessBillingRequest({idempotencyKey:w,confirmUrl:`${d}/checkout?gocardless=confirm`,cancelUrl:`${d}/checkout?gocardless=cancel`});Lt(wn,w,o,T.authorisationUrl);return}else if(c==="zip"&&e.paymentMethods.includes("zip")){let d=window.location.origin,T=await $.createZipCheckout({idempotencyKey:w,redirectUrl:`${d}/checkout?zip=return`});Lt(En,w,o,T.redirectUrl);return}else if(c==="klarna"&&e.paymentMethods.includes("klarna")){let d=window.location.origin,T=await $.createKlarnaCheckout({idempotencyKey:w,confirmUrl:`${d}/checkout?klarna=confirm`,cancelUrl:`${d}/checkout?klarna=cancel`});Lt(Rn,w,o,T.redirectUrl);return}else Ce(c),Ge(o)}catch(d){if((m||c==="card")&&d instanceof ue&&d.status===409){Ce(c),await Ke(void 0,o);return}Sr(o,d)}}function Nr(o,c){return c&&!c.orderNumber&&c.status==="open"&&c.checkoutNumber===o.checkoutNumber?c:null}function Sr(o,c){ie(ma(o,c)),!o.orderNumber&&Bt(c)?(Oe.current=!1,Pt(gt())):le(o)}async function bi(o){if(!Re)return;let c=Re;try{let m=await $.createPaymentIntent({idempotencyKey:Fe}),w=await A.current.placedRequest?.send().catch(()=>null);if(w?.orderNumber){await Ke(w);return}let d=Nr(c,w);Ve(d??{...c,expiresAt:null}),on(o&&d!==null),Xe.current=m,Nt(m)}catch(m){if(m instanceof ue&&m.status===409){await Ke();return}Nt(null),Ve(null),Sr(c,m)}}function vi(){Re&&(Oe.current=!0,le(Re),Nt(null),Ve(null),on(!1))}return{site:e,logo:t,signInHref:n,items:a,totals:mi,coupon:u,deliveryOptions:f,courierUnavailable:_a,retryCourier:Ma,shippingMethodId:p,setShippingMethodId:b,pickupLocation:P,servedCountries:G,formatMoney:Se,payChoice:M,setPayChoice:me,placing:te,email:J,setEmail:Q,firstName:y,setFirstName:Ye,lastName:be,setLastName:U,company:Be,setCompany:re,address1:ve,setAddress1:ke,address2:Te,setAddress2:I,city:ee,setCity:qe,postcode:ce,setPostcode:Ee,phone:He,setPhone:at,country:W,setCountry:it,subdivision:xe,setSubdivision:kt,subdivisions:st,destination:Un,postcodeLabel:qa,subdivisionLabel:Fa,me:ct,savedAddresses:Ka,selectedAddressId:en,setSelectedAddressId:Ct,saveAddress:Bn,setSaveAddress:Hn,saveLabel:tn,setSaveLabel:Da,addressSaveNote:ja,lostChangeNote:Ua,idemKey:Fe,confirmation:rn,setConfirmation:Ge,orderError:Wa,payment:Vn,paypalStep:Jn,squareStep:Xn,pendingConf:Re,paid:Ba,setPaid:St,unpaidOrder:X,orderLocked:Zn,formLocked:Ha,restoredPrices:ur,quoteFailed:pn,retryQuote:fi,payNote:za,afterpayConfirming:Va,gocardlessConfirming:Xa,zipConfirming:Qa,klarnaConfirming:ti,cardConfirming:Qn,checkoutResult:lt,confirmCardPayment:Ke,cardStillProcessing:Cr,renewCardPayment:bi,holdRenewed:oi,leaveCardPayment:vi,checkoutRootRef:rr,setCheckoutHeaderEl:ai,fillFromAddress:or,checkoutSignOut:ii,payOptions:Je,noPaymentMethod:si,placeOrder:yi}}var ka=vs(null);function xa({children:e,...t}){let n=Ss(t);return Pe(ka.Provider,{value:n,children:e})}function Ne(){let e=ks(ka);if(!e)throw new Error("useCheckout must be used inside CheckoutStateProvider");return e}import{useId as _n}from"react";import{Fragment as pe,jsx as i,jsxs as N}from"react/jsx-runtime";function Na(){let{email:e,setEmail:t,firstName:n,setFirstName:r,lastName:a,setLastName:s,company:u,setCompany:g,me:f,signInHref:p,checkoutSignOut:b,orderLocked:h,unpaidOrder:v}=Ne(),k=_n();return N(Jt,{num:"N\xB0 01",title:"Contact",children:[h&&v&&i(Es,{orderNumber:v.orderNumber}),i(ae,{label:"Email",htmlFor:k,hint:f?N(pe,{children:["Signed in \xB7"," ",i("button",{type:"button",onClick:b,className:"underline transition-colors enabled:hover:text-accent",children:"Not you? Sign out"})]}):p?N(pe,{children:["Have an account?"," ",i(rt,{href:p,className:"underline transition-colors hover:text-accent",children:"Sign in"})]}):void 0,children:i("input",{id:k,type:"email",value:e,onChange:E=>t(E.target.value),placeholder:"you@example.com",readOnly:f!==null,className:ne})}),N(Oa,{children:[i(ae,{label:"First name",children:i("input",{type:"text",value:n,onChange:E=>r(E.target.value),className:ne})}),i(ae,{label:"Last name",children:i("input",{type:"text",value:a,onChange:E=>s(E.target.value),className:ne})})]}),i(ae,{label:"Company (optional)",children:i("input",{type:"text",value:u,onChange:E=>g(E.target.value),autoComplete:"organization",className:ne})})]})}function Sa(){let{pickupLocation:e,servedCountries:t,address1:n,setAddress1:r,address2:a,setAddress2:s,city:u,setCity:g,postcode:f,setPostcode:p,phone:b,setPhone:h,country:v,setCountry:k,subdivision:E,setSubdivision:C,subdivisions:O,destination:H,postcodeLabel:R,subdivisionLabel:P,me:z,savedAddresses:G,selectedAddressId:se,setSelectedAddressId:Se,saveAddress:M,setSaveAddress:me,saveLabel:we,setSaveLabel:Ie,fillFromAddress:te,orderLocked:he}=Ne(),J=_n(),Q=_n();return N(Jt,{num:"N\xB0 02",title:e?"Collection":"Shipping address",children:[e?N("div",{className:"grid gap-2 text-[14px] leading-[1.6]",children:[i("span",{className:"font-medium",children:e.name}),[e.address,e.city,e.state,e.zipCode,e.country].filter(Boolean).length>0&&i("span",{className:"opacity-80",children:[e.address,e.city,e.state,e.zipCode,e.country].filter(Boolean).join(", ")}),e.openingHours&&i("span",{className:"opacity-80",children:e.openingHours}),e.readyIn&&i("span",{className:"opacity-80",children:e.readyIn}),e.instructions&&i("span",{className:"opacity-80",children:e.instructions}),i("span",{className:"mt-1 font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"No delivery address needed"})]}):N(pe,{children:[z!==null&&G.length>0&&N("div",{className:"grid gap-3",children:[G.map(y=>i(Gt,{active:se===y.id,onClick:()=>{Se(y.id),te(y)},title:y.label,body:y.formatted_address,price:null},y.id)),i(Gt,{active:se==="new",onClick:()=>Se("new"),title:"New address",body:null,price:null})]}),i(ae,{label:"Address line 1",children:i("input",{type:"text",value:n,onChange:y=>r(y.target.value),className:ne})}),i(ae,{label:"Address line 2",children:i("input",{type:"text",value:a,onChange:y=>s(y.target.value),placeholder:"Apartment, unit, garage bay\u2026",className:ne})}),N(Oa,{cols:"three",children:[i(ae,{label:"City",children:i("input",{type:"text",value:u,onChange:y=>g(y.target.value),className:ne})}),i(ae,{label:R,children:i("input",{type:"text",value:f,onChange:y=>p(y.target.value),className:ne})}),i(ae,{label:"Country",separate:!0,htmlFor:J,children:i(hn,{id:J,value:v,onChange:y=>k(y.target.value),className:ne+" pr-10",style:Ca,children:t.map(y=>i("option",{value:y.code,children:y.name},y.code))})})]}),i(ae,{label:P,separate:!0,htmlFor:Q,children:O.length>0?N(hn,{id:Q,value:E,onChange:y=>C(y.target.value),className:ne+" pr-10",style:Ca,children:[i("option",{value:"",children:"Select\u2026"}),O.map(y=>i("option",{value:y.code||y.name,children:y.name},y.code||y.name))]}):i("input",{id:Q,type:"text",value:E,onChange:y=>C(y.target.value),className:ne})})]}),i(ae,{label:"Phone",children:i("input",{type:"tel",value:b,onChange:y=>h(y.target.value),className:ne})}),!e&&z!==null&&se==="new"&&!he&&N(pe,{children:[i(Rs,{checked:M,onChange:me,label:"Save this address to my account"}),M&&i(ae,{label:"Address label",children:i("input",{type:"text",value:we,onChange:y=>Ie(y.target.value),placeholder:"Home",className:ne})})]})]})}function wa(){let{totals:e,coupon:t,deliveryOptions:n,shippingMethodId:r,setShippingMethodId:a,pickupLocation:s,formatMoney:u,city:g,destination:f,courierUnavailable:p,retryCourier:b}=Ne();return i(Jt,{num:"N\xB0 03",title:"Shipping",children:N("div",{className:"grid gap-3",children:[n.map(h=>{let v=h.pickupLocation,k=v?[v.address,v.city,v.state,v.zipCode].filter(Boolean).join(", "):null;return i(Gt,{active:r===h.id,onClick:()=>a(h.id),title:v?`${h.name} \u2014 ${v.name}`:h.name,body:v?[k,v.openingHours,v.readyIn,v.instructions,h.description].filter(Boolean).join(" \xB7 "):h.description||null,price:e.freeShipping||h.amount===0?Ft:e.deliveryDiscountPercent>0?N(pe,{children:[i("s",{className:"text-fg-dim",children:u(h.amount,e.currency)})," ",u(Dr(h.amount,e.deliveryDiscountPercent),e.currency)]}):u(h.amount,e.currency),tag:h.tag||void 0},h.id)}),p?N("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:[ba," ",i("button",{type:"button",onClick:b,className:"underline transition-colors enabled:hover:text-accent",children:"Try again"})]}):n.length===0&&i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Shipping is arranged after your order is reviewed."})]})})}function Ea(){let{payChoice:e,setPayChoice:t,payment:n,payOptions:r,noPaymentMethod:a}=Ne();return N(Jt,{num:"N\xB0 04",title:"Payment",children:[a&&i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:ha}),i("div",{className:"grid gap-3",children:r.map(s=>i(Gt,{active:e===s.key,onClick:()=>t(s.key),title:s.title,body:s.body,price:s.price,tag:s.tag},s.key))}),e==="card"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="paypal"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll approve the payment with PayPal on the payment step after placing the order."}):e==="afterpay"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Afterpay to approve four interest-free payments, then brought straight back."}):e==="square"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="gocardless"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll set up a bank direct debit with GoCardless, then be brought straight back. Direct debits clear in a few days."}):e==="zip"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Zip to approve four instalments, then brought straight back."}):e==="klarna"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Klarna to choose how to pay, then brought straight back."}):e==="bank"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Our team emails you the invoice and bank details after review."}):null]})}function Ra(){let{site:e,items:t,totals:n,coupon:r,formatMoney:a,payChoice:s,placing:u,email:g,orderError:f,payment:p,noPaymentMethod:b,unpaidOrder:h,formLocked:v,restoredPrices:k,quoteFailed:E,retryQuote:C,placeOrder:O}=Ne(),H=k==="waiting",R=k==="changed";return N("aside",{className:"sticky top-[var(--sf-checkout-header-h,88px)] border border-line max-view-desktop:static",style:{background:"linear-gradient(180deg, color-mix(in oklab, var(--site-surface) 70%, var(--bg)) 0%, var(--bg) 100%)"},children:[N("header",{className:"flex items-center justify-between border-b border-accent bg-accent px-6 py-4 font-mono text-[13px] font-bold uppercase tracking-[0.28em] text-bg",children:[i("span",{children:"Your order"}),i(rt,{href:"/wheels",className:"text-bg/80 transition-colors hover:text-bg",children:"Edit \u2197"})]}),i("div",{className:"flex flex-col px-6 py-2",children:t.length===0?N("div",{className:"py-8 text-center font-serif text-[16px] italic leading-[1.5] text-fg-dim",children:["Your cart is empty. ",i(rt,{href:"/wheels",className:"text-accent underline-offset-4 hover:underline",children:"Browse the catalog \u2192"})]}):t.map(P=>i(Os,{slug:P.slug,name:P.name,qty:P.qty,config:P.config,configSummary:As(P.config),price:R||H?null:$r(P,n.currency)??0,currency:n.currency},P.id))}),i(Vt,{locked:v,className:"border-t border-line px-6 pt-5",children:i(Gr,{customerEmail:g,disabled:v})}),N("div",{className:"flex flex-col gap-2 border-t border-line mt-5 px-6 pt-5",children:[i(We,{label:"Subtotal",value:H?_t:a(R?n.serverSubtotal??0:n.subtotal,n.currency)}),(n.discount>0||n.deliverySaving>0)&&r?.valid&&i(We,{label:`Coupon \xB7 ${r.code}`,value:i("span",{className:"font-semibold text-green",children:jr(n,P=>a(P,n.currency))})}),r?.deferred&&i(We,{label:`Coupon \xB7 ${r.code}`,value:qr}),r?.valid&&r.effects?.gift&&i(We,{label:`Free gift \xB7 ${r.effects.gift.partNumber}${r.effects.gift.quantity>1?` \xD7${r.effects.gift.quantity}`:""}`,value:i("span",{className:"font-semibold text-green",children:Ft})}),i(We,{label:"Shipping",value:n.shippingStatus==="free"?i("span",{className:"font-semibold text-green",children:Ft}):Ur(n.shippingStatus)??a(n.shipping,n.currency)}),n.tax&&(n.tax.charged?i(We,{label:n.tax.inclusive?`${n.tax.name} included \xB7 ${n.tax.rate}%`:n.tax.name,value:a(n.tax.amount,n.currency)}):n.tax.name?i(We,{label:n.tax.name,value:Kr}):null)]}),N("div",{className:"mt-4 flex items-end justify-between border-y-2 border-accent px-6 py-4",style:{background:"color-mix(in oklab, var(--accent) 10%, var(--bg))"},children:[i("span",{className:"font-display text-[20px] font-bold uppercase tracking-[0.04em] text-fg",children:"Total"}),i("span",{className:"text-right font-display text-[34px] font-bold leading-none tracking-[-0.025em] text-fg",children:n.repricing?_t:a(n.grand,n.currency)})]}),N("div",{className:"flex flex-col gap-3 px-6 pt-5 pb-6",children:[R&&i(de,{tone:"quiet",children:ea}),E&&N(de,{role:"alert",children:[ta," ",i("button",{type:"button",onClick:C,className:"underline transition-colors enabled:hover:text-accent",children:"Try again"})]}),f&&i(de,{role:"alert",children:f}),n.hasUnpricedLine&&N(de,{role:"status",children:["One or more items have no price in ",n.currency,". Remove them, or switch region, to continue."]}),i("button",{type:"button",onClick:O,disabled:u||!h&&(b||t.length===0||n.hasUnpricedLine||n.repricing),className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all max-[640px]:whitespace-nowrap max-[640px]:tracking-[0.04em]",u||!h&&(t.length===0||b||n.hasUnpricedLine||n.repricing)?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:u?N(pe,{children:["Building order\u2026 ",i("span",{children:"\xB7"})]}):b?N(pe,{children:["No online payment ",i("span",{children:"\xB7"})]}):h?N(pe,{children:[N("span",{children:["Try payment again",N(Pa,{children:[" \xB7 ",Ht(h)]})]}),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]}):E?N(pe,{children:["Total not confirmed ",i("span",{children:"\xB7"})]}):n.repricing?N(pe,{children:[_t," ",i("span",{children:"\xB7"})]}):N(pe,{children:[N("span",{children:[s==="bank"?"Place order":"Continue to payment",N(Pa,{children:[" \xB7 ",a(n.grand,n.currency)]})]}),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})})]})]})}var ws=" [&:disabled_:disabled]:cursor-not-allowed! [&:disabled_:disabled]:opacity-70! [&_input[readonly]]:cursor-not-allowed [&_input[readonly]]:opacity-70";function Vt({locked:e,className:t="",children:n}){return i("fieldset",{disabled:e,className:"m-0 min-w-0 border-0 p-0 "+t+ws,children:n})}function rt({href:e,className:t="",children:n,...r}){let{placing:a}=Ne();return a?i("span",{"aria-disabled":"true","aria-label":r["aria-label"],className:t+" pointer-events-none",children:n}):i(je,{href:e,"aria-label":r["aria-label"],className:t,children:n})}function Es({orderNumber:e}){return i(de,{tone:"quiet",role:"status",children:N("span",{className:"flex items-start gap-2",children:[N("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"mt-[3px] shrink-0",children:[i("rect",{x:"3",y:"7",width:"10",height:"7",rx:"1"}),i("path",{d:"M5 7V5a3 3 0 0 1 6 0v2"})]}),i("span",{children:va(e)})]})})}var Ca={backgroundImage:"linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%)",backgroundPosition:"calc(100% - 18px) 50%, calc(100% - 12px) 50%",backgroundSize:"6px 6px",backgroundRepeat:"no-repeat"};function Jt({num:e,title:t,children:n}){return N("section",{className:"mb-6 border border-line bg-bg",children:[N("header",{className:"flex items-center gap-4 border-b border-line bg-surface px-6 py-4",children:[i("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e}),i("h2",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:t})]}),i("div",{className:"flex flex-col gap-4 px-6 py-6",children:n})]})}function Oa({cols:e="two",children:t}){return i("div",{className:["grid gap-3 max-[640px]:grid-cols-1",e==="two"?"grid-cols-2":"grid-cols-[1.2fr_1fr_1fr]"].join(" "),children:t})}function Gt({active:e,onClick:t,title:n,body:r,price:a,tag:s}){return N("button",{type:"button",onClick:t,"aria-pressed":e,className:["relative grid grid-cols-[auto_1fr_auto] items-center gap-5 border bg-bg px-6 py-5 text-left transition-colors",e?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-line enabled:hover:border-[color-mix(in_oklab,var(--accent)_50%,var(--site-line))]"].join(" "),style:e?{background:"color-mix(in oklab, var(--accent) 14%, var(--bg))"}:void 0,children:[e&&i("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),i("span",{className:["flex h-[18px] w-[18px] items-center justify-center rounded-full border-2",e?"border-accent":"border-fg-dim"].join(" "),children:e&&i("span",{className:"block h-2.5 w-2.5 rounded-full bg-accent"})}),N("span",{className:"flex min-w-0 flex-col gap-1",children:[N("span",{className:"flex flex-wrap items-baseline gap-3 font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:[n,s&&i("span",{className:"border px-2 py-0.5 font-mono text-[11px] font-normal uppercase tracking-[0.24em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)",borderColor:"color-mix(in oklab, var(--accent) 45%, var(--site-line))"},children:s})]}),r&&i("span",{className:"font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim",children:r})]}),i("span",{className:"whitespace-nowrap font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:a})]})}function Rs({checked:e,onChange:t,label:n,sub:r}){return N("div",{className:"flex items-start gap-3 border-t border-line py-4 first:border-t-0 first:pt-0",children:[i("button",{type:"button",onClick:()=>t(!e),"aria-pressed":e,"aria-label":n,className:["mt-px flex h-5 w-5 flex-shrink-0 items-center justify-center border transition-colors",e?"border-accent":"border-line"].join(" "),style:e?{background:"color-mix(in oklab, var(--accent) 18%, transparent)"}:void 0,children:e&&i("span",{className:"text-[13px] text-accent",children:"\u2713"})}),N("span",{className:"flex-1 font-display text-[16px] leading-[1.5] text-fg",children:[n,r&&i("small",{className:"mt-1 block font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:r})]})]})}function Os({slug:e,name:t,qty:n,config:r,configSummary:a,price:s,currency:u}){let{catalog:g}=Mt(),{formatMoney:f}=ye(),p=g.find(C=>C.slug===e),b=p?.spokes??5,h=p?.mesh??!1,v=r.find(C=>C.gold)?.label,k=p?.finishes.find(C=>C.name===v&&C.src)??p?.finishes.find(C=>C.src),E=p?.finishes[0]?.color??zr;return N("div",{className:"grid grid-cols-[60px_1fr_auto] items-center gap-4 border-b border-line py-4 last:border-b-0",children:[N("div",{className:"relative aspect-square",children:[i("div",{className:"flex h-full w-full items-center justify-center overflow-hidden border border-line bg-surface",children:k?.src?i(Or,{src:k.src,alt:`${t.lead}${t.accent} \u2014 ${k.name}`,width:120,height:120,sizes:"60px",className:"block h-full w-full object-contain p-2"}):i("div",{className:"block w-[78%]",style:{color:E},children:i(Hr,{spokes:b,mesh:h,className:"block w-full"})})}),i("span",{className:"absolute -right-1.5 -top-1.5 z-[2] flex h-[18px] w-[18px] items-center justify-center rounded-full bg-accent font-mono text-[11px] font-bold text-bg",children:n})]}),N("div",{className:"flex min-w-0 flex-col gap-0.5",children:[N("span",{className:"font-display text-[17px] font-bold uppercase leading-none tracking-[-0.005em] text-fg",children:[t.lead,i("em",{className:"font-serif font-normal italic text-accent tracking-[-0.005em] normal-case",children:t.accent})]}),i("span",{className:"font-mono text-[12px] uppercase leading-[1.5] tracking-[0.18em] text-fg-dim",children:a})]}),i("span",{className:"text-right font-display text-[17px] font-bold tracking-[-0.005em] text-fg",children:s===null?null:f(s,u)})]})}function Pa({children:e}){return i("span",{className:"max-[640px]:sr-only",children:e})}function We({label:e,value:t}){return N("div",{className:"flex items-center justify-between font-mono text-[13px] font-medium uppercase tracking-[0.18em] text-fg",children:[i("span",{children:e}),i("strong",{className:"font-display text-[16px] font-medium tracking-[-0.005em] normal-case text-fg",children:t})]})}function As(e){return e.map(t=>t.label).join(" \xB7 ")}import{Fragment as V,jsx as l,jsxs as x}from"react/jsx-runtime";function Dn(e){return l(xa,{...e,children:l(Fs,{})})}function Ts({order:e,paid:t}){let{formatMoney:n}=ye();if(!e.grandTotal||!e.currency)return null;let r=u=>n(Number(u),e.currency),a=Number(e.freightCharge??0),s=Number(e.discountAmount??0);return x("dl",{className:"grid w-full max-w-sm grid-cols-[1fr_auto] gap-x-6 gap-y-1 border-y border-line py-3 text-left text-sm",children:[(e.shippingMethod||a>0)&&x(V,{children:[x("dt",{className:"text-fg-dim",children:["Delivery",e.shippingMethod?` \xB7 ${e.shippingMethod}`:""]}),l("dd",{className:"text-right font-mono",children:r(e.freightCharge??"0")})]}),s>0&&x(V,{children:[x("dt",{className:"text-fg-dim",children:["Discount",e.couponCode?` \xB7 ${e.couponCode}`:""]}),x("dd",{className:"text-right font-mono",children:["\u2212",r(e.discountAmount??"0")]})]}),l("dt",{className:"text-fg",children:t?"Total paid":"Order total"}),l("dd",{className:"text-right font-mono text-fg",children:r(e.grandTotal)})]})}function qs({result:e,lostChangeNote:t=null}){let n=l("span",{className:"font-mono text-fg",children:e.checkoutNumber});return x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:e.kind==="refunded"||e.kind==="expired"?"Order not placed":e.kind==="processing"?"Payment processing":"Payment received"}),l("p",{className:"text-fg-dim",children:e.kind==="refunded"?x(V,{children:["An item sold out or an offer ended while you paid for checkout ",n,". Your payment goes back to your card."]}):e.kind==="expired"?x(V,{children:["The hold on checkout ",n," ran out before your payment arrived. Your payment goes back to your card."]}):e.kind==="processing"?x(V,{children:["Your payment for checkout ",n," is being processed. When it goes through, we will email your order confirmation."]}):x(V,{children:["Thank you \u2014 your payment",e.checkoutNumber?x(V,{children:[" for checkout ",n]}):null," has gone through. We will email you the order number shortly."]})}),t&&e.kind!=="refunded"&&e.kind!=="expired"&&l("p",{className:"text-sm text-fg-dim",children:t}),l(je,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]})}function Fs(){let{site:e,logo:t,items:n,placing:r,formLocked:a,email:s,me:u,addressSaveNote:g,lostChangeNote:f,idemKey:p,confirmation:b,setConfirmation:h,payment:v,paypalStep:k,squareStep:E,pendingConf:C,paid:O,setPaid:H,payNote:R,afterpayConfirming:P,gocardlessConfirming:z,zipConfirming:G,klarnaConfirming:se,cardConfirming:Se,checkoutResult:M,confirmCardPayment:me,cardStillProcessing:we,renewCardPayment:Ie,holdRenewed:te,leaveCardPayment:he,checkoutRootRef:J,setCheckoutHeaderEl:Q}=Ne();return b?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:O?"Payment received":"Order received"}),x("p",{className:"text-fg-dim",children:[O?x(V,{children:["Thank you \u2014 your payment for order"," ",l("span",{className:"font-mono text-fg",children:b.orderNumber})," has gone through."," "]}):x(V,{children:["Thank you \u2014 your order ",l("span",{className:"font-mono text-fg",children:b.orderNumber})," is being reviewed by our team."," "]}),u?x(V,{children:["Track it under"," ",l(je,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):l(V,{children:"We\u2019ve emailed you a link to set a password and track it."})]}),l(Ts,{order:b,paid:O}),f&&l("p",{className:"text-sm text-fg-dim",children:f}),R&&(R.warning?l("div",{className:"w-full max-w-sm text-left",children:l(de,{tone:"bad",role:"alert",children:R.text})}):l("p",{className:"text-sm text-fg-dim",children:R.text})),g&&l("p",{className:"text-sm text-fg-dim",children:g}),!u&&x("p",{className:"text-sm text-fg-dim",children:["You can also"," ",l(je,{href:`/track?order=${encodeURIComponent(b.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email \u2014 no password needed."]}),l(je,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]}):M?l(qs,{result:M,lostChangeNote:f}):Se?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Placing your order \u2014 one moment."})]}):P?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay \u2014 one moment."})]}):z?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Setting up your direct debit\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless \u2014 one moment."})]}):G?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip \u2014 one moment."})]}):se?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna \u2014 one moment."})]}):v&&C?l(_s,{payment:v,checkout:C,holdRenewed:te,onPaid:me,onProcessing:we,onRenew:Ie,onBack:he}):k&&C?l(js,{confirmation:C,clientId:e.paypalClientId??"",idemKey:p,onPaid:()=>{H(!0),h(C)},onSkip:()=>h(C)}):E&&C?l($s,{confirmation:C,applicationId:e.squareApplicationId??"",locationId:e.squareLocationId??"",environment:e.squareEnvironment??"production",idemKey:p,onPaid:()=>{H(!0),h(C)},onSkip:()=>h(C)}):x("div",{ref:J,className:"bg-bg text-fg",children:[x("header",{ref:Q,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 max-[640px]:grid-cols-[auto_minmax(0,1fr)_auto] max-[640px]:gap-3 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 backdrop-blur-md max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[640px]:py-4",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[x(rt,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[14px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",l("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),l("div",{className:"flex min-w-0 justify-center max-[640px]:[container-type:inline-size]",children:l(rt,{href:"/","aria-label":`${e.name} home`,className:"inline-flex max-w-full items-center justify-center max-[640px]:overflow-x-clip",children:[!0,!1].map(y=>l(Jr,{hideClass:y?"min-[641px]:hidden":"max-[640px]:hidden",variant:"header",scrolled:!0,src:t?.url??null,reverse:t?.reverse??!1,reversedSrc:t?.reversed??null,inkIsDark:t?.inkIsDark??null,size:t?.size??"medium",sizePx:t?.sizePx??null,sizeUnit:t?.sizeUnit??null,siteName:e.name,fitWordmarkToContainer:y,fitFloorPx:y?Vr:void 0},y?"phone":"wide"))})}),e.cardPayments?x("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[l("span",{className:"text-green",children:"\u25CF"}),l("span",{className:"max-[640px]:hidden",children:"Encrypted \xB7"})," Stripe"]}):l("span",{})]}),x("section",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-center justify-between gap-x-8 gap-y-3 border-b border-line bg-surface px-[var(--sf-site-gutter,40px)] py-4 font-mono text-[13px] font-medium uppercase tracking-[0.24em] text-fg max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[l("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),l("nav",{"aria-label":"Checkout steps",className:"flex flex-wrap items-center gap-5",children:[{n:"01",label:"Cart",state:"done"},{n:"02",label:"Ship & pay",state:"active"},{n:"03",label:"Confirmed",state:"pending"}].map(y=>x("span",{className:["relative flex items-center gap-2 transition-colors",y.state==="pending"?"text-fg-dim":"text-fg",y.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[l("span",{className:y.state==="done"?"text-accent font-bold":"",children:y.n}),l("span",{children:y.label})]},y.n))})]}),x("main",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_420px] items-start gap-16 px-[var(--sf-site-gutter,40px)] pt-10 pb-[100px] max-view-desktop:grid-cols-1 max-view-desktop:gap-10 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-8 max-view-desktop:pb-20",children:[x("div",{children:[x(Vt,{locked:a,children:[l(Na,{}),l(Sa,{}),l(wa,{})]}),l(Vt,{locked:r,children:l(Ea,{})})]}),l(Ra,{})]}),l("footer",{className:"flex flex-wrap items-center justify-between gap-4 border-t border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:l("span",{children:Br({legalName:e.legalName,foundedYear:e.foundedYear,siteName:e.name})})})]})}function _s({payment:e,checkout:t,holdRenewed:n,onPaid:r,onProcessing:a,onRenew:s,onBack:u}){let{formatMoney:g}=ye(),f=l("span",{className:"text-fg",children:g(Number(e.amount),e.currency)}),p=Aa(()=>Wt(e.publishableKey),[e.publishableKey]),b=Aa(()=>Qr(),[]),h=Zr(t.expiresAt??"",Ls()??"");return l("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:x("div",{className:"w-full max-w-xl border border-line bg-bg",children:[x("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[l("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:Ht(t)}),l("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),x("div",{className:"flex flex-col gap-4 px-6 py-6",children:[l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:t.orderNumber?x(V,{children:["Your order is placed. Pay ",f," by card to confirm it now."]}):n?x(V,{children:["Your hold ran out, so your items are held again",h?` until ${h}`:"",". Enter your card again, then pay ",f,"."]}):x(V,{children:["Your items are held",h?` until ${h}`:"",". Pay ",f," by card to place your order."]})}),l(xn,{stripe:p,options:{clientSecret:e.clientSecret,appearance:b},children:l(Ks,{payment:e,checkout:t,onPaid:r,onProcessing:a,onRenew:s,onBack:u})},e.clientSecret)]})]})})}var Ms=5;function Ks({payment:e,checkout:t,onPaid:n,onProcessing:r,onRenew:a,onBack:s}){let{formatMoney:u}=ye(),g=Co(),f=ko(),[p,b]=$e(!1),[h,v]=$e(null),k=ot(!1);async function E(){try{return(await g.retrievePaymentIntent(e.clientSecret)).paymentIntent?.status}catch{return}}async function C(R){let P=R;for(let z=0;P==="processing"&&z<Ms;z+=1)await new Promise(G=>setTimeout(G,1e3)),P=await E()??P;if(P==="succeeded"){n();return}if(P==="processing"){r();return}v("Payment did not complete. Please try again."),b(!1)}async function O(){if(!g||!f||p)return;b(!0),v(null),k.current=!0;let R=await g.confirmPayment({elements:f,redirect:"if_required"}).catch(()=>null);if(!R){let P=await E();if(P==="succeeded"||P==="processing"){await C(P);return}v(P===void 0?Le:"Payment failed. Please try again."),b(!1);return}if(R.error){if(!t.orderNumber&&R.error.code==="payment_intent_unexpected_state"){let P=await E();if(P==="succeeded"||P==="processing"){await C(P);return}if(P===void 0){v(Le),b(!1);return}await a(P==="canceled"),b(!1);return}v(R.error.message??"Payment failed. Please try again."),b(!1);return}await C(R.paymentIntent?.status)}async function H(){if(p)return;if(!k.current){s();return}b(!0),v(null);let R=await E();if(R==="succeeded"||R==="processing"){await C(R);return}if(b(!1),R===void 0){v(Le);return}s()}return x("div",{className:"flex flex-col gap-4",children:[l(Po,{}),h&&l(de,{role:"alert",children:h}),l("button",{type:"button",onClick:O,disabled:!g||!f||p,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!g||!f||p?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:p?x(V,{children:["Processing\u2026 ",l("span",{children:"\xB7"})]}):x(V,{children:["Pay ",u(Number(e.amount),e.currency),l("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),!t.orderNumber&&!p&&x("button",{type:"button",onClick:H,className:"inline-flex items-center gap-3 self-start font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",l("span",{children:"Back to checkout"})]})]})}var La="paypal-sdk-js",Mn=null;function Ds(e,t){let n=`${e}|${t}`;if(Mn?.key===n)return Mn.promise;let r=new Promise((a,s)=>{document.getElementById(La)?.remove();let u=document.createElement("script");u.id=La;let g=new URLSearchParams({"client-id":e,currency:t,intent:"capture"});u.src=`https://www.paypal.com/sdk/js?${g}`,u.onload=()=>{let f=window.paypal;f?a(f):s(new Error("PayPal SDK loaded without its namespace"))},u.onerror=()=>s(new Error("PayPal SDK failed to load")),document.head.appendChild(u)});return Mn={key:n,promise:r},r}function js({confirmation:e,clientId:t,idemKey:n,onPaid:r,onSkip:a}){let{formatMoney:s}=ye(),u=ot(null),[g,f]=$e(!1),[p,b]=$e(null),h=ot(r);return h.current=r,Ta(()=>{let v=!1,k=null;return Ds(t,e.currency).then(E=>{if(!(v||!u.current))return k=E.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await $.createPaypalOrder({idempotencyKey:n})).paypalOrderId,onApprove:async C=>{try{if((await $.capturePaypalOrder({idempotencyKey:n,paypalOrderId:C.orderID})).status==="paid"){h.current();return}b("PayPal did not complete the payment. Please try again.")}catch(O){b(O instanceof ue?O.message:"PayPal payment failed. Please try again.")}},onError:()=>{b("PayPal could not process the payment. Please try again.")}}),k.render(u.current).then(()=>{v||f(!0)})}).catch(()=>{v||b("PayPal could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{v=!0,k?.close?.()}},[t,e.currency,n]),l("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:x("div",{className:"w-full max-w-xl border border-line bg-bg",children:[x("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[l("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e.orderNumber}),l("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),x("div",{className:"flex flex-col gap-4 px-6 py-6",children:[x("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",l("span",{className:"text-fg",children:s(Number(e.grandTotal),e.currency)})," ","with PayPal to confirm it now."]}),!g&&!p&&l("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal\u2026"}),l("div",{ref:u}),p&&l(de,{role:"alert",children:p}),l("button",{type:"button",onClick:a,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}var Ia="square-web-sdk",Kn=null,Us=["sandbox","production"];function Ws(e){let t=Is(Us,"production",e);if(Kn?.key===t)return Kn.promise;let n=new Promise((r,a)=>{document.getElementById(Ia)?.remove();let s=document.createElement("script");s.id=Ia,s.src=t==="sandbox"?"https://sandbox.web.squarecdn.com/v1/square.js":"https://web.squarecdn.com/v1/square.js",s.onload=()=>{let u=window.Square;u?r(u):a(new Error("Square SDK loaded without its namespace"))},s.onerror=()=>a(new Error("Square SDK failed to load")),document.head.appendChild(s)});return Kn={key:t,promise:n},n}function $s({confirmation:e,applicationId:t,locationId:n,environment:r,idemKey:a,onPaid:s,onSkip:u}){let{formatMoney:g}=ye(),f=ot(null),p=ot(null),b=ot(null),[h,v]=$e(!1),[k,E]=$e(!1),[C,O]=$e(null);Ta(()=>{let R=!1,P=null;return Ws(r).then(async z=>{if(R||!f.current)return;let G=z.payments(t,n);b.current=G,P=await G.card(),await P.attach(f.current),p.current=P,R||v(!0)}).catch(()=>{R||O("Square could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{R=!0,P?.destroy?.()}},[t,n,r]);async function H(){let R=p.current;if(!(!R||k)){E(!0),O(null);try{let P=await R.tokenize();if(P.status!=="OK"||!P.token){O(P.errors?.[0]?.message??"Please check the card details and try again."),E(!1);return}let z;try{z=(await b.current?.verifyBuyer?.(P.token,{amount:String(e.grandTotal),currencyCode:e.currency,intent:"CHARGE"}))?.token}catch{}if((await $.chargeSquare({idempotencyKey:a,sourceId:P.token,...z?{verificationToken:z}:{}})).status==="paid"){s();return}O("Square did not complete the payment. Please try again.")}catch(P){O(P instanceof ue?P.message:"Square payment failed. Please try again.")}E(!1)}}return l("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:x("div",{className:"w-full max-w-xl border border-line bg-bg",children:[x("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[l("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e.orderNumber}),l("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),x("div",{className:"flex flex-col gap-4 px-6 py-6",children:[x("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",l("span",{className:"text-fg",children:g(Number(e.grandTotal),e.currency)})," ","by card to confirm it now."]}),!h&&!C&&l("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form\u2026"}),l("div",{ref:f}),C&&l(de,{role:"alert",children:C}),l("button",{type:"button",onClick:H,disabled:!h||k,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!h||k?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:k?x(V,{children:["Processing\u2026 ",l("span",{children:"\xB7"})]}):x(V,{children:["Pay ",g(Number(e.grandTotal),e.currency),l("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),l("button",{type:"button",onClick:u,disabled:k,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}import{jsx as Xt}from"react/jsx-runtime";function Ys(){let{settings:e,websiteName:t}=Ar(),n=t?{...gn,name:t}:gn,r=e?{url:e.logoUrl,reversed:e.logoReversed??null,inkIsDark:e.logoInkIsDark??null,reverse:e.reverseLogo,size:e.logoSize,sizePx:e.logoSizePx,sizeUnit:e.logoSizeUnit??null}:null;return Xt("div",{style:{position:"fixed",inset:0,zIndex:2147482e3,overflowY:"auto",background:"var(--bg)",color:"var(--fg)"},children:Xt(Wr,{children:Xt(Yr,{preview:!0,children:Xt(Dn,{site:n,logo:r,preview:!0})})})})}export{Ys as default};
@@ -0,0 +1 @@
1
+ "use client";import{Xh as r}from"./chunk-3RAPOAJE.js";import"./chunk-UFQDBLLF.js";import"./chunk-YDV7IGPY.js";import"./chunk-PB4FLVPH.js";import"./chunk-TNWF32DT.js";import"./chunk-3P4XQK3S.js";import"./chunk-AHUOASUP.js";import"./chunk-2NWFNMO3.js";import"./chunk-Y6SLVHK3.js";import{jsx as o}from"react/jsx-runtime";import e from"efficient-easel/screen/components/ScreenStoreProvider";function a(t){return o(e,{...t,parts:r})}export{a as default};
@@ -1,4 +1,4 @@
1
- import{a as P,b as Q}from"./chunk-FVHAKC6L.js";var A=e=>typeof e=="string"&&e?e:void 0;var Se=[{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}],_e=new Map(Se.map(e=>[e.key,e])),Go="site-",fi="--font-site-",wi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,v={options:Se,byKey:_e,siteFonts:new Map};function gi(e){if(typeof e?.key!="string"||!e.key.startsWith(Go))return null;let t=e.key.slice(Go.length);if(!wi.test(t))return null;let o=e.italic===!0;return{key:e.key,label:A(e.label)??e.family,cssVar:`${fi}${t}`,category:Object.hasOwn(Wo,e.category)?e.category:"sans",italic:o,italicLoaded:o}}function hu(e){if(!e?.length)return v;let t=new Map(_e),o=[],a=new Map;for(let s of e){let n=gi(s);!n||t.has(n.key)||(t.set(n.key,n),o.push(n),a.set(n.key,s))}return a.size===0?v:{options:[...o,...Se],byKey:t,siteFonts:a}}var Wo={sans:"Sans",serif:"Serif",mono:"Mono"};function bi(e=v){return Object.keys(Wo).map(t=>[t,e.options.filter(o=>o.category===t)]).filter(([,t])=>t.length>0)}function uu(e=v){return bi(e).flatMap(([,t])=>t)}function pu(e,t=v){return t.byKey.get(e)}var Je=["heading","heading2","heading3","body","accent","label"];function mu(e){return typeof e=="string"&&Je.includes(e)?e:null}var fu={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},yi=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Ei=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,wu={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Ti={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function gu(e){let t=e?Ei.exec(e):null;return t?P(Ti,t[1])??null:Si(e)}function Si(e){if(!e)return null;let t=e.split(/\s+/).filter(o=>!o.slice(0,o.lastIndexOf(":")+1).includes("&")).map(o=>o.slice(o.lastIndexOf(":")+1));for(let[o,a]of yi)if(t.includes(o))return a;return null}var G={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function _i(e,t=v){let o=t.byKey,a=s=>{let n=e?.[s];if(n&&o.has(n))return n;if(s==="heading2"||s==="heading3"){let i=e?.heading;return i&&o.has(i)?i:G.heading}return G[s]};return Object.fromEntries(Je.map(s=>[s,a(s)]))}function Oi(e,t,o){return o.byKey.get(e[t])??_e.get(G[t])}function Z(e,t,o){return`var(${Oi(e,t,o).cssVar})`}var bu=[...new Set(Je.map(e=>_e.get(G[e]).cssVar))],yu=[...new Set(Se.map(e=>e.cssVar))];function Eu(e,t=v){let o=_i(e,t);return{"--font-role-heading":Z(o,"heading",t),"--font-role-heading2":Z(o,"heading2",t),"--font-role-heading3":Z(o,"heading3",t),"--font-role-body":Z(o,"body",t),"--font-role-accent":Z(o,"accent",t),"--font-role-label":Z(o,"label",t),fontFamily:"var(--font-role-body)"}}import{VIEW_DESKTOP_MIN as vi,VIEW_TABLET_MIN as xi}from"efficient-easel/screen/lib/content/view-tiers";var Uo="v1",Yo=800,Ou=961,ki={"view-tablet":xi,"view-desktop":vi,"view-wide":Yo};function vu(e){let t=e.startsWith("max-"),o=t?e.slice(4):e,a=P(ki,o);if(a!==void 0)return{px:a,max:t};let s=/^(max|min)-\[(\d+)px\]$/.exec(e);return s?{px:Number(s[2]),max:s[1]==="max"}:void 0}var xu=`(min-width: ${Yo}px)`,Ri="data-sf-line",Ai="edge",ku={[Ri]:Ai},Ru=(e,t)=>e==="edge"||e!=="section"&&t;import{contrastRatio as Wu,hexToRgb as ve,parseHexColor as D,readableInk as zo,relativeLuminance as xe,parseOption as ct}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as Hi,pictureShadowColor as Di}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as Bi}from"efficient-easel/screen/lib/content/length-units";import{CORNER_RADIUS_MAX as qo}from"efficient-easel/screen/lib/content/style-keys";import{VIEW_TIERS as Li,viewKeyAt as Ko}from"efficient-easel/screen/lib/content/view-tiers";var N=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;import{isLengthUnit as et,lengthOf as Ci,rowGrid as Ii}from"efficient-easel/screen/lib/content/length-units";function tt(e,t){let o=Ci(e,ot(t));return typeof o=="number"?`${o}px`:o}function ot(e,t="px"){return et(e)?e:t}function Nu(e,t,o){return t.unitKey?ot(e[Ko(t.unitKey,o)],t.base??"px"):t.base??"px"}function Hu(e,t=Li){return e.unitKey?t.map(o=>Ko(e.unitKey,o)):[]}function Pi(e,t,o){let a=Ii({kind:e},t,o);return t!=="px"&&o.min>0?{...a,min:a.step}:a}function at(e,t,o,a){let s=N(e);if(!et(t)||t==="px"||s===void 0)return null;let n=Pi(o,t,a),i=Math.min(n.max,Math.max(n.min,s));return Math.round(i*100)/100}function Du(e,t,o,a){let s=at(e,t,o,a);return s===null?null:tt(s,t)}var Ni={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 Bu(e){let t=e;return Object.fromEntries(Object.entries(Ni).map(([o,a])=>[o,ot(t[a])]))}function Mu(e,t,o){let a=N(e);return et(t)&&t!=="px"&&a!==void 0?a:o(a??null)}import{DEFAULT_SHADOW_COLOR as Tp}from"efficient-easel/screen/lib/document/shadow-values";var Vu="storefront-theme",ju="sf:theme-mode",Xu="sf:theme-switch",zu="hide",qu=["light","dark","auto"],pt="light",mt=!1,Mi=7,Fi=18;function Gi(e){return e>=Mi&&e<Fi}function Qu(e){let{mode:t,override:o,switchShown:a,hour:s}=e;return a&&(o==="light"||o==="dark")?o:t==="auto"?Gi(s)?"light":"dark":ct(["light","dark"],"dark",t)}var J={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Wi=[{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"}],ke={selected:0,themes:Wi};function Qo(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ke}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function st(e,t,o){let a=ve(e),s=ve(t);if(a===null||s===null)return e;let n=(i,r)=>Math.max(0,Math.min(255,Math.round(i+(r-i)*o))).toString(16).padStart(2,"0");return`#${n(a.r,s.r)}${n(a.g,s.g)}${n(a.b,s.b)}`}var Ui={light:"#ffffff",dark:"#0a0a0a"},Zu=["light","dark"];function Ju(e,t){let o=Ui[t],a=t==="light"?"#ffffff":"#000000";return{text:o,accent:o,background:e,surface:st(e,a,.1),line:st(e,a,.22),muted:st(o,e,.35),brandInk:t}}function te(e){let t=Qo(e);return t.themes[t.selected]}function ee(e){return{text:e.text,accent:e.accent,background:e.background||J.background,surface:e.surface||J.surface,line:e.line||J.line,muted:e.muted||J.muted}}var Yi=.4,Ki="#f5f1e8",$o="#0a0a0a";function $i(e){let t=te(e).text,o=xe(t);return o===null||o>=Yi?t:null}var Vi=4.5,ji=3,ep={good:"Good","large-only":"Large text only",hard:"Hard to read"};function tp(e){return e>=Vi?"good":e>=ji?"large-only":"hard"}var Xi=["#000000","#ffffff"];function Re(e){return zo(e,Xi)}function Zo(e,t){let o=t!==void 0&&xe(t)!==null?t:Ki;return zo(e,[$o,o])===o&&o!==$o}var zi=[.25,.4,.55];function op(e){let t=ve(e);return t===null?[]:zi.map(o=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-o)).toString(16).padStart(2,"0")).join(""))}function ap(e){let t={"--theme-fg":te(e).text},o=$i(e);return o!==null&&(t["--overlay-fg"]=o),t}var qi=82;function ft(e){return`color-mix(in srgb, ${e} ${qi}%, #000)`}function sp(e){let t=te(e);return{"--theme-accent":t.accent,"--theme-accent-2":ft(t.accent),"--theme-accent-ink":Re(t.accent)}}function wt(e){let t=e?.button;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function np(e){let t=te(e),o=wt(t),a=Jo(t);if(o===null&&a===null)return{};let s={};return o!==null&&(s["--theme-btn"]=o,s["--theme-btn-2"]=ft(o)),s["--theme-btn-ink"]=a??Re(o),s}function Jo(e){let t=e?.buttonInk;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function Qi(e,t){return Jo(e)??Re(wt(e)??t)}function ip(e){let t=te(e);return{fill:wt(t)??t.accent.toLowerCase(),ink:Qi(t,t.accent)}}function rp(e){let t={};return Qo(e).themes.forEach((o,a)=>{let s=ee(o);t[`--theme-preset-${a}-accent`]=s.accent,t[`--theme-preset-${a}-accent-2`]=ft(s.accent),t[`--theme-preset-${a}-accent-ink`]=Re(s.accent),t[`--theme-preset-${a}-bg`]=s.background,t[`--theme-preset-${a}-fg`]=s.text,t[`--theme-preset-${a}-surface`]=s.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${s.surface} 60%, ${s.line})`,t[`--theme-preset-${a}-line`]=s.line,t[`--theme-preset-${a}-muted`]=s.muted}),t}var nt=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},it=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function Vo([e,t,o]){let[a,s,n]=[nt(e),nt(t),nt(o)],i=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*n),r=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*n),c=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*n);return[.2104542553*i+.793617785*r-.0040720468*c,1.9779984951*i-2.428592205*r+.4505937099*c,.0259040371*i+.7827717662*r-.808675766*c]}function Zi([e,t,o]){let a=(e+.3963377774*t+.2158037573*o)**3,s=(e-.1055613458*t-.0638541728*o)**3,n=(e-.0894841775*t-1.291485548*o)**3;return[it(4.0767416621*a-3.3077115913*s+.2309699292*n),it(-1.2684380046*a+2.6097574011*s-.3413193965*n),it(-.0041960863*a-.7034186147*s+1.707614701*n)]}var dt=e=>{let t=ve(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},ea=(e,t,o)=>[e[0]*o+t[0]*(1-o),e[1]*o+t[1]*(1-o),e[2]*o+t[2]*(1-o)],ta=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,oa=e=>ea(dt(e.surface),dt(e.line),.6);function lp(e){return ta(oa(ee(e)))}function Ji(e){let t=ee(e);return ta(Zi(ea(Vo(oa(t)),Vo(dt(t.text)),.92)))}function aa(e,t,o,a){let s=e[t];if(!s)return-1;let n=o(s);if(!n)return-1;let i=ee(s);return e.findIndex((r,c)=>{if(c===t)return!1;let h=ee(r);return D(h.background)!==n?!1:!a||D(h.text??"")===D(i.text??"")&&D(h.accent??"")===D(i.accent??"")})}function cp(e,t){return aa(e,t,Ji,!1)}function dp(e,t){return aa(e,t,o=>D(o.surface??""),!0)}var er=1;function tr(e,t){let o=(e??[]).flatMap((a,s)=>{let n=xe(a.background??""),i=xe(a.text??"");return n!==null&&i!==null&&n<i?[s]:[]});return o.find(a=>a!==t)??o[0]??er}function hp(e){return tr(e?.themes,e?.selected)}var up=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function pp(e){let t=ee(te(e)),o=`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!==J.surface||t.line!==J.line)&&(a["--theme-surface-2"]=o),a}var or=["heading","body","label"];function mp(e){if(!e)return null;for(let t of or)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var sa=["headingLarge","headingMedium","headingSmall","accent","body","label"];var gt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ar=8,sr=200;function nr(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=ar&&t<=sr?t:null}function ir(e){let t={};for(let o of sa)t[o]=nr(e?.[o]);return t}function fp(e){let t=ir(e),o={};for(let a of sa){let s=t[a];s!==null&&(o[`--size-${a}`]=`${s}px`)}return o}var rr=["square","small","large"],lr="small";function wp(e){return rr.includes(e??"")?e:lr}var Ae=0,cr={min:Ae,max:qo,step:1},gp={square:0,small:null,large:16},ht={"--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 bt(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(qo,Math.max(Ae,Math.round(t))):null}function jo(e,t){if(Bi(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};let a=Math.max(0,e);return Object.fromEntries(Object.entries(ht).map(([s,n])=>{let i=Math.round(a*n*1e4)/1e4;return[s,i===0?"0":tt(i,t)]}))}let o=bt(e);return o===null?{}:Object.fromEntries(Object.entries(ht).map(([a,s])=>{let n=o*s/16;return[a,n===0?"0":`${n}rem`]}))}function bp(e){return(bt(e)??Ae)*ht["--sf-button-radius"]}function yp(e,t){let o=at(e,t,"radius",cr);return o!==null?jo(o,t):jo(bt(e)??Ae)}var dr=["none","soft","lifted"],hr="soft",na="none",ur=["tight","normal","roomy"],pr="normal",Le="normal",mr=["none","lift","highlight"],fr="lift",wr="highlight";function ia(e){return dr.includes(e??"")?e:hr}function gr(e){return ur.includes(e??"")?e:pr}function ra(e){return mr.includes(e??"")?e:fr}function Sp(e){let t=ia(e);return t===na?void 0:t}function _p(e){let t=gr(e);return t===Le?void 0:t}function Op(e){let t=ra(e);return t===wr?void 0:t}function vp(e,t,o){let a=Di(t);return a===Hi?{}:ia(e)!==na||ra(o)==="lift"?{"--sf-shadow-color":a}:{}}var br=["normal","tight","compressed"],me="normal";function la(e){return br.includes(e??"")?e:me}function xp(e){let t=la(e);return t===me?void 0:t}function kp(e){switch(la(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var Xo=["authored","sentence"],yt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},rt=100,lt=900,yr=24,Er=200;function Oe(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function ca(e){let t=Oe(e?.weight,rt,lt),o=ct(Xo,"authored",e?.case),a=n=>n==null?t:Oe(n,rt,lt),s=n=>ct(Xo,o,n);return{case:o,weight:t,weightStrong:Oe(e?.weightStrong,rt,lt),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Oe(e?.maxPx,yr,Er),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:s(e?.case2),case3:s(e?.case3)}}function Rp(e){let t=ca(e),o={};return t.case==="sentence"&&(o["--sf-heading-case"]="none"),t.weight!==null&&(o["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(o["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(o["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(o["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(o["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(o["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(o["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),o}function Ap(e){return ca({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 ut="siteTheme";function Tr(e){let t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(a=>!!a&&typeof a=="object"))return{};let o=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[ut]:{selected:o,themes:t.themes}}}function Lp(e){return Tr(e?.[ut])[ut]}import{parseHexColor as Sr}from"efficient-shell/format";var Et=[{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}],_r=Et.filter(e=>e.ink);function da(e){let t={color:e.fg};for(let{role:o,token:a}of _r)t[a]=e[o];return t}var Or={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},vr=Object.freeze(da(Or)),xr={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)"},kr=Object.freeze(da(xr));function Np(e,t){let o=e?Sr(e):null;return o?Zo(o,t)?vr:kr:null}import{jsx as pa}from"react/jsx-runtime";import{createContext as Lr,useCallback as m,useContext as Cr,useMemo as Ir,useState as Pr}from"react";import{createContext as ua,useContext as Tt}from"react";import{createContext as Rr}from"react";var ha=Rr(null);var Ar=ua(null),St=ua({logo:null,placeholder:!1,wordmark:null});function Gp(){let e=Tt(ha),t=Tt(Ar),o=Tt(St),a=!e&&o.placeholder,s=e?e.logoUrl:o.logo?.logoUrl??t?.logoUrl??null;return{src:a?null:s,reversedSrc:e?e.logoReversed:o.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:o.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:o.wordmark,siteName:e?.siteName??t?.siteName}}var ma={},fa=Lr({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:pt,setThemeMode:()=>{},themeSwitchShown:mt,setThemeSwitchShown:()=>{},theme:ke,themeRow:"none",setTheme:()=>{},fonts:G,setFonts:()=>{},sizes:gt,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:Le,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:me,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:ma,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:yt,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function jp({children:e,websiteName:t=null,templateChrome:o=!1,templateName:a=null,chromePlaceholder:s=!1,themeMode:n=pt,onThemeModeChange:i,themeSwitchShown:r=mt,onThemeSwitchShownChange:c,theme:h=ke,themeRow:_="none",onThemeChange:O,fonts:Ze=G,onFontsChange:mo,sizes:En=gt,onSizesChange:fo,cornerRadiusPx:Tn=null,onCornerRadiusPxChange:wo,cardShadow:Sn=null,onCardShadowChange:go,shadowColor:_n=null,onShadowColorChange:bo,cardGap:On=Le,onCardGapChange:yo,hoverEffect:vn=null,onHoverEffectChange:Eo,headingCompression:xn=me,onHeadingCompressionChange:To,siteWidth:kn=null,onSiteWidthChange:So,siteGutter:Rn=null,siteGutterPhone:An=null,blockGap:Ln=null,blockGapPhone:Cn=null,siteLengthUnits:In=ma,onSiteLengthUnitsChange:_o,onSiteGutterChange:Oo,onSiteGutterPhoneChange:vo,onBlockGapChange:xo,onBlockGapPhoneChange:ko,headingTypography:Pn=yt,onHeadingTypographyChange:Ro,textStyles:Nn=null,onTextStylesChange:Ao,wordStyles:Hn=null,heroBackgroundFollowsWidth:Dn=null,onHeroBackgroundFollowsWidthChange:Lo,sectionBackgroundWidth:Bn=null,onSectionBackgroundWidthChange:Co,sectionContentWidth:Mn=null,onSectionContentWidthChange:Io,photographyGrayscale:Fn=null,onPhotographyGrayscaleChange:Po,shareButtonOnPosts:Gn=null,onShareButtonOnPostsChange:No,themeFromDocument:Wn=!1}){let[pe,Ho]=Pr(null),Un=m(l=>Ho(mi=>mi??l),[]),Yn=m(l=>i?.(l),[i]),Kn=m(l=>c?.(l),[c]),$n=m(l=>O?.(l),[O]),Vn=m(l=>mo?.(l),[mo]),jn=m(l=>fo?.(l),[fo]),Xn=m(l=>So?.(l),[So]),zn=m(l=>Oo?.(l),[Oo]),qn=m(l=>vo?.(l),[vo]),Qn=m(l=>xo?.(l),[xo]),Zn=m(l=>ko?.(l),[ko]),Jn=m(l=>_o?.(l),[_o]),ei=m(l=>Lo?.(l),[Lo]),ti=m(l=>Co?.(l),[Co]),oi=m(l=>Io?.(l),[Io]),ai=m(l=>Po?.(l),[Po]),si=m(l=>No?.(l),[No]),ni=m(l=>wo?.(l),[wo]),ii=m(l=>go?.(l),[go]),ri=m(l=>bo?.(l),[bo]),li=m(l=>yo?.(l),[yo]),ci=m(l=>Eo?.(l),[Eo]),di=m(l=>To?.(l),[To]),hi=m(l=>Ro?.(l),[Ro]),ui=m(l=>Ao?.(l),[Ao]),Do=pe?.logoUrl,Bo=pe?.logoReversed,Mo=pe?.logoInkIsDark,Fo=pe!==null,pi=Ir(()=>({logo:Fo?{logoUrl:Do,logoReversed:Bo,logoInkIsDark:Mo}:null,placeholder:o||s,wordmark:o?a:t}),[Fo,Do,Bo,Mo,o,s,a,t]);return pa(St.Provider,{value:pi,children:pa(fa.Provider,{value:{settings:pe,setSettings:Ho,primeSettings:Un,websiteName:t,templateChrome:o,templateName:a,chromePlaceholder:s,themeMode:n,setThemeMode:Yn,themeSwitchShown:r,setThemeSwitchShown:Kn,theme:h,themeRow:_,setTheme:$n,fonts:Ze,setFonts:Vn,sizes:En,setSizes:jn,cornerRadiusPx:Tn,setCornerRadiusPx:ni,cardShadow:Sn,setCardShadow:ii,shadowColor:_n,setShadowColor:ri,cardGap:On,setCardGap:li,hoverEffect:vn,setHoverEffect:ci,headingCompression:xn,setHeadingCompression:di,siteWidth:kn,setSiteWidth:Xn,siteGutter:Rn,siteGutterPhone:An,blockGap:Ln,blockGapPhone:Cn,siteLengthUnits:In,setSiteLengthUnits:Jn,setSiteGutter:zn,setSiteGutterPhone:qn,setBlockGap:Qn,setBlockGapPhone:Zn,headingTypography:Pn,setHeadingTypography:hi,textStyles:Nn,setTextStyles:ui,wordStyles:Hn,heroBackgroundFollowsWidth:Dn,setHeroBackgroundFollowsWidth:ei,sectionBackgroundWidth:Bn,setSectionBackgroundWidth:ti,sectionContentWidth:Mn,setSectionContentWidth:oi,photographyGrayscale:Fn,setPhotographyGrayscale:ai,shareButtonOnPosts:Gn,setShareButtonOnPosts:si,themeFromDocument:Wn},children:e})})}var Nr=()=>Cr(fa);function Xp(e,t,o){return e?t===o?"read":"loading":"none"}function zp(e,t){return{value:e,readFor:t}}function qp(e,t,o){return{value:t,readFor:e.readFor===o?o:null}}function Qp(){let{sectionContentWidth:e,themeFromDocument:t}=Nr();return t?null:e}var em=["general","commerce","service"],oe=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"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:"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(oe.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var Hr="2027-02-05",Dr="2027-02-14",wa={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.
1
+ import{a as P,b as Q}from"./chunk-AHUOASUP.js";var A=e=>typeof e=="string"&&e?e:void 0;var Se=[{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}],_e=new Map(Se.map(e=>[e.key,e])),Go="site-",fi="--font-site-",wi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,v={options:Se,byKey:_e,siteFonts:new Map};function gi(e){if(typeof e?.key!="string"||!e.key.startsWith(Go))return null;let t=e.key.slice(Go.length);if(!wi.test(t))return null;let o=e.italic===!0;return{key:e.key,label:A(e.label)??e.family,cssVar:`${fi}${t}`,category:Object.hasOwn(Wo,e.category)?e.category:"sans",italic:o,italicLoaded:o}}function hu(e){if(!e?.length)return v;let t=new Map(_e),o=[],a=new Map;for(let s of e){let n=gi(s);!n||t.has(n.key)||(t.set(n.key,n),o.push(n),a.set(n.key,s))}return a.size===0?v:{options:[...o,...Se],byKey:t,siteFonts:a}}var Wo={sans:"Sans",serif:"Serif",mono:"Mono"};function bi(e=v){return Object.keys(Wo).map(t=>[t,e.options.filter(o=>o.category===t)]).filter(([,t])=>t.length>0)}function uu(e=v){return bi(e).flatMap(([,t])=>t)}function pu(e,t=v){return t.byKey.get(e)}var Je=["heading","heading2","heading3","body","accent","label"];function mu(e){return typeof e=="string"&&Je.includes(e)?e:null}var fu={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},yi=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Ei=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,wu={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Ti={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function gu(e){let t=e?Ei.exec(e):null;return t?P(Ti,t[1])??null:Si(e)}function Si(e){if(!e)return null;let t=e.split(/\s+/).filter(o=>!o.slice(0,o.lastIndexOf(":")+1).includes("&")).map(o=>o.slice(o.lastIndexOf(":")+1));for(let[o,a]of yi)if(t.includes(o))return a;return null}var G={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function _i(e,t=v){let o=t.byKey,a=s=>{let n=e?.[s];if(n&&o.has(n))return n;if(s==="heading2"||s==="heading3"){let i=e?.heading;return i&&o.has(i)?i:G.heading}return G[s]};return Object.fromEntries(Je.map(s=>[s,a(s)]))}function Oi(e,t,o){return o.byKey.get(e[t])??_e.get(G[t])}function Z(e,t,o){return`var(${Oi(e,t,o).cssVar})`}var bu=[...new Set(Je.map(e=>_e.get(G[e]).cssVar))],yu=[...new Set(Se.map(e=>e.cssVar))];function Eu(e,t=v){let o=_i(e,t);return{"--font-role-heading":Z(o,"heading",t),"--font-role-heading2":Z(o,"heading2",t),"--font-role-heading3":Z(o,"heading3",t),"--font-role-body":Z(o,"body",t),"--font-role-accent":Z(o,"accent",t),"--font-role-label":Z(o,"label",t),fontFamily:"var(--font-role-body)"}}import{VIEW_DESKTOP_MIN as vi,VIEW_TABLET_MIN as xi}from"efficient-easel/screen/lib/content/view-tiers";var Uo="v1",Yo=800,Ou=961,ki={"view-tablet":xi,"view-desktop":vi,"view-wide":Yo};function vu(e){let t=e.startsWith("max-"),o=t?e.slice(4):e,a=P(ki,o);if(a!==void 0)return{px:a,max:t};let s=/^(max|min)-\[(\d+)px\]$/.exec(e);return s?{px:Number(s[2]),max:s[1]==="max"}:void 0}var xu=`(min-width: ${Yo}px)`,Ri="data-sf-line",Ai="edge",ku={[Ri]:Ai},Ru=(e,t)=>e==="edge"||e!=="section"&&t;import{contrastRatio as Wu,hexToRgb as ve,parseHexColor as D,readableInk as zo,relativeLuminance as xe,parseOption as ct}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as Hi,pictureShadowColor as Di}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as Bi}from"efficient-easel/screen/lib/content/length-units";import{CORNER_RADIUS_MAX as qo}from"efficient-easel/screen/lib/content/style-keys";import{VIEW_TIERS as Li,viewKeyAt as Ko}from"efficient-easel/screen/lib/content/view-tiers";var N=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;import{isLengthUnit as et,lengthOf as Ci,rowGrid as Ii}from"efficient-easel/screen/lib/content/length-units";function tt(e,t){let o=Ci(e,ot(t));return typeof o=="number"?`${o}px`:o}function ot(e,t="px"){return et(e)?e:t}function Nu(e,t,o){return t.unitKey?ot(e[Ko(t.unitKey,o)],t.base??"px"):t.base??"px"}function Hu(e,t=Li){return e.unitKey?t.map(o=>Ko(e.unitKey,o)):[]}function Pi(e,t,o){let a=Ii({kind:e},t,o);return t!=="px"&&o.min>0?{...a,min:a.step}:a}function at(e,t,o,a){let s=N(e);if(!et(t)||t==="px"||s===void 0)return null;let n=Pi(o,t,a),i=Math.min(n.max,Math.max(n.min,s));return Math.round(i*100)/100}function Du(e,t,o,a){let s=at(e,t,o,a);return s===null?null:tt(s,t)}var Ni={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 Bu(e){let t=e;return Object.fromEntries(Object.entries(Ni).map(([o,a])=>[o,ot(t[a])]))}function Mu(e,t,o){let a=N(e);return et(t)&&t!=="px"&&a!==void 0?a:o(a??null)}import{DEFAULT_SHADOW_COLOR as Tp}from"efficient-easel/screen/lib/document/shadow-values";var Vu="storefront-theme",ju="sf:theme-mode",Xu="sf:theme-switch",zu="hide",qu=["light","dark","auto"],pt="light",mt=!1,Mi=7,Fi=18;function Gi(e){return e>=Mi&&e<Fi}function Qu(e){let{mode:t,override:o,switchShown:a,hour:s}=e;return a&&(o==="light"||o==="dark")?o:t==="auto"?Gi(s)?"light":"dark":ct(["light","dark"],"dark",t)}var J={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Wi=[{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"}],ke={selected:0,themes:Wi};function Qo(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ke}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function st(e,t,o){let a=ve(e),s=ve(t);if(a===null||s===null)return e;let n=(i,r)=>Math.max(0,Math.min(255,Math.round(i+(r-i)*o))).toString(16).padStart(2,"0");return`#${n(a.r,s.r)}${n(a.g,s.g)}${n(a.b,s.b)}`}var Ui={light:"#ffffff",dark:"#0a0a0a"},Zu=["light","dark"];function Ju(e,t){let o=Ui[t],a=t==="light"?"#ffffff":"#000000";return{text:o,accent:o,background:e,surface:st(e,a,.1),line:st(e,a,.22),muted:st(o,e,.35),brandInk:t}}function te(e){let t=Qo(e);return t.themes[t.selected]}function ee(e){return{text:e.text,accent:e.accent,background:e.background||J.background,surface:e.surface||J.surface,line:e.line||J.line,muted:e.muted||J.muted}}var Yi=.4,Ki="#f5f1e8",$o="#0a0a0a";function $i(e){let t=te(e).text,o=xe(t);return o===null||o>=Yi?t:null}var Vi=4.5,ji=3,ep={good:"Good","large-only":"Large text only",hard:"Hard to read"};function tp(e){return e>=Vi?"good":e>=ji?"large-only":"hard"}var Xi=["#000000","#ffffff"];function Re(e){return zo(e,Xi)}function Zo(e,t){let o=t!==void 0&&xe(t)!==null?t:Ki;return zo(e,[$o,o])===o&&o!==$o}var zi=[.25,.4,.55];function op(e){let t=ve(e);return t===null?[]:zi.map(o=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-o)).toString(16).padStart(2,"0")).join(""))}function ap(e){let t={"--theme-fg":te(e).text},o=$i(e);return o!==null&&(t["--overlay-fg"]=o),t}var qi=82;function ft(e){return`color-mix(in srgb, ${e} ${qi}%, #000)`}function sp(e){let t=te(e);return{"--theme-accent":t.accent,"--theme-accent-2":ft(t.accent),"--theme-accent-ink":Re(t.accent)}}function wt(e){let t=e?.button;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function np(e){let t=te(e),o=wt(t),a=Jo(t);if(o===null&&a===null)return{};let s={};return o!==null&&(s["--theme-btn"]=o,s["--theme-btn-2"]=ft(o)),s["--theme-btn-ink"]=a??Re(o),s}function Jo(e){let t=e?.buttonInk;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function Qi(e,t){return Jo(e)??Re(wt(e)??t)}function ip(e){let t=te(e);return{fill:wt(t)??t.accent.toLowerCase(),ink:Qi(t,t.accent)}}function rp(e){let t={};return Qo(e).themes.forEach((o,a)=>{let s=ee(o);t[`--theme-preset-${a}-accent`]=s.accent,t[`--theme-preset-${a}-accent-2`]=ft(s.accent),t[`--theme-preset-${a}-accent-ink`]=Re(s.accent),t[`--theme-preset-${a}-bg`]=s.background,t[`--theme-preset-${a}-fg`]=s.text,t[`--theme-preset-${a}-surface`]=s.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${s.surface} 60%, ${s.line})`,t[`--theme-preset-${a}-line`]=s.line,t[`--theme-preset-${a}-muted`]=s.muted}),t}var nt=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},it=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function Vo([e,t,o]){let[a,s,n]=[nt(e),nt(t),nt(o)],i=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*n),r=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*n),c=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*n);return[.2104542553*i+.793617785*r-.0040720468*c,1.9779984951*i-2.428592205*r+.4505937099*c,.0259040371*i+.7827717662*r-.808675766*c]}function Zi([e,t,o]){let a=(e+.3963377774*t+.2158037573*o)**3,s=(e-.1055613458*t-.0638541728*o)**3,n=(e-.0894841775*t-1.291485548*o)**3;return[it(4.0767416621*a-3.3077115913*s+.2309699292*n),it(-1.2684380046*a+2.6097574011*s-.3413193965*n),it(-.0041960863*a-.7034186147*s+1.707614701*n)]}var dt=e=>{let t=ve(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},ea=(e,t,o)=>[e[0]*o+t[0]*(1-o),e[1]*o+t[1]*(1-o),e[2]*o+t[2]*(1-o)],ta=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,oa=e=>ea(dt(e.surface),dt(e.line),.6);function lp(e){return ta(oa(ee(e)))}function Ji(e){let t=ee(e);return ta(Zi(ea(Vo(oa(t)),Vo(dt(t.text)),.92)))}function aa(e,t,o,a){let s=e[t];if(!s)return-1;let n=o(s);if(!n)return-1;let i=ee(s);return e.findIndex((r,c)=>{if(c===t)return!1;let h=ee(r);return D(h.background)!==n?!1:!a||D(h.text??"")===D(i.text??"")&&D(h.accent??"")===D(i.accent??"")})}function cp(e,t){return aa(e,t,Ji,!1)}function dp(e,t){return aa(e,t,o=>D(o.surface??""),!0)}var er=1;function tr(e,t){let o=(e??[]).flatMap((a,s)=>{let n=xe(a.background??""),i=xe(a.text??"");return n!==null&&i!==null&&n<i?[s]:[]});return o.find(a=>a!==t)??o[0]??er}function hp(e){return tr(e?.themes,e?.selected)}var up=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function pp(e){let t=ee(te(e)),o=`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!==J.surface||t.line!==J.line)&&(a["--theme-surface-2"]=o),a}var or=["heading","body","label"];function mp(e){if(!e)return null;for(let t of or)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var sa=["headingLarge","headingMedium","headingSmall","accent","body","label"];var gt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ar=8,sr=200;function nr(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=ar&&t<=sr?t:null}function ir(e){let t={};for(let o of sa)t[o]=nr(e?.[o]);return t}function fp(e){let t=ir(e),o={};for(let a of sa){let s=t[a];s!==null&&(o[`--size-${a}`]=`${s}px`)}return o}var rr=["square","small","large"],lr="small";function wp(e){return rr.includes(e??"")?e:lr}var Ae=0,cr={min:Ae,max:qo,step:1},gp={square:0,small:null,large:16},ht={"--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 bt(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(qo,Math.max(Ae,Math.round(t))):null}function jo(e,t){if(Bi(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};let a=Math.max(0,e);return Object.fromEntries(Object.entries(ht).map(([s,n])=>{let i=Math.round(a*n*1e4)/1e4;return[s,i===0?"0":tt(i,t)]}))}let o=bt(e);return o===null?{}:Object.fromEntries(Object.entries(ht).map(([a,s])=>{let n=o*s/16;return[a,n===0?"0":`${n}rem`]}))}function bp(e){return(bt(e)??Ae)*ht["--sf-button-radius"]}function yp(e,t){let o=at(e,t,"radius",cr);return o!==null?jo(o,t):jo(bt(e)??Ae)}var dr=["none","soft","lifted"],hr="soft",na="none",ur=["tight","normal","roomy"],pr="normal",Le="normal",mr=["none","lift","highlight"],fr="lift",wr="highlight";function ia(e){return dr.includes(e??"")?e:hr}function gr(e){return ur.includes(e??"")?e:pr}function ra(e){return mr.includes(e??"")?e:fr}function Sp(e){let t=ia(e);return t===na?void 0:t}function _p(e){let t=gr(e);return t===Le?void 0:t}function Op(e){let t=ra(e);return t===wr?void 0:t}function vp(e,t,o){let a=Di(t);return a===Hi?{}:ia(e)!==na||ra(o)==="lift"?{"--sf-shadow-color":a}:{}}var br=["normal","tight","compressed"],me="normal";function la(e){return br.includes(e??"")?e:me}function xp(e){let t=la(e);return t===me?void 0:t}function kp(e){switch(la(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var Xo=["authored","sentence"],yt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},rt=100,lt=900,yr=24,Er=200;function Oe(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function ca(e){let t=Oe(e?.weight,rt,lt),o=ct(Xo,"authored",e?.case),a=n=>n==null?t:Oe(n,rt,lt),s=n=>ct(Xo,o,n);return{case:o,weight:t,weightStrong:Oe(e?.weightStrong,rt,lt),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Oe(e?.maxPx,yr,Er),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:s(e?.case2),case3:s(e?.case3)}}function Rp(e){let t=ca(e),o={};return t.case==="sentence"&&(o["--sf-heading-case"]="none"),t.weight!==null&&(o["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(o["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(o["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(o["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(o["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(o["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(o["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),o}function Ap(e){return ca({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 ut="siteTheme";function Tr(e){let t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(a=>!!a&&typeof a=="object"))return{};let o=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[ut]:{selected:o,themes:t.themes}}}function Lp(e){return Tr(e?.[ut])[ut]}import{parseHexColor as Sr}from"efficient-shell/format";var Et=[{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}],_r=Et.filter(e=>e.ink);function da(e){let t={color:e.fg};for(let{role:o,token:a}of _r)t[a]=e[o];return t}var Or={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},vr=Object.freeze(da(Or)),xr={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)"},kr=Object.freeze(da(xr));function Np(e,t){let o=e?Sr(e):null;return o?Zo(o,t)?vr:kr:null}import{jsx as pa}from"react/jsx-runtime";import{createContext as Lr,useCallback as m,useContext as Cr,useMemo as Ir,useState as Pr}from"react";import{createContext as ua,useContext as Tt}from"react";import{createContext as Rr}from"react";var ha=Rr(null);var Ar=ua(null),St=ua({logo:null,placeholder:!1,wordmark:null});function Gp(){let e=Tt(ha),t=Tt(Ar),o=Tt(St),a=!e&&o.placeholder,s=e?e.logoUrl:o.logo?.logoUrl??t?.logoUrl??null;return{src:a?null:s,reversedSrc:e?e.logoReversed:o.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:o.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:o.wordmark,siteName:e?.siteName??t?.siteName}}var ma={},fa=Lr({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:pt,setThemeMode:()=>{},themeSwitchShown:mt,setThemeSwitchShown:()=>{},theme:ke,themeRow:"none",setTheme:()=>{},fonts:G,setFonts:()=>{},sizes:gt,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:Le,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:me,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:ma,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:yt,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function jp({children:e,websiteName:t=null,templateChrome:o=!1,templateName:a=null,chromePlaceholder:s=!1,themeMode:n=pt,onThemeModeChange:i,themeSwitchShown:r=mt,onThemeSwitchShownChange:c,theme:h=ke,themeRow:_="none",onThemeChange:O,fonts:Ze=G,onFontsChange:mo,sizes:En=gt,onSizesChange:fo,cornerRadiusPx:Tn=null,onCornerRadiusPxChange:wo,cardShadow:Sn=null,onCardShadowChange:go,shadowColor:_n=null,onShadowColorChange:bo,cardGap:On=Le,onCardGapChange:yo,hoverEffect:vn=null,onHoverEffectChange:Eo,headingCompression:xn=me,onHeadingCompressionChange:To,siteWidth:kn=null,onSiteWidthChange:So,siteGutter:Rn=null,siteGutterPhone:An=null,blockGap:Ln=null,blockGapPhone:Cn=null,siteLengthUnits:In=ma,onSiteLengthUnitsChange:_o,onSiteGutterChange:Oo,onSiteGutterPhoneChange:vo,onBlockGapChange:xo,onBlockGapPhoneChange:ko,headingTypography:Pn=yt,onHeadingTypographyChange:Ro,textStyles:Nn=null,onTextStylesChange:Ao,wordStyles:Hn=null,heroBackgroundFollowsWidth:Dn=null,onHeroBackgroundFollowsWidthChange:Lo,sectionBackgroundWidth:Bn=null,onSectionBackgroundWidthChange:Co,sectionContentWidth:Mn=null,onSectionContentWidthChange:Io,photographyGrayscale:Fn=null,onPhotographyGrayscaleChange:Po,shareButtonOnPosts:Gn=null,onShareButtonOnPostsChange:No,themeFromDocument:Wn=!1}){let[pe,Ho]=Pr(null),Un=m(l=>Ho(mi=>mi??l),[]),Yn=m(l=>i?.(l),[i]),Kn=m(l=>c?.(l),[c]),$n=m(l=>O?.(l),[O]),Vn=m(l=>mo?.(l),[mo]),jn=m(l=>fo?.(l),[fo]),Xn=m(l=>So?.(l),[So]),zn=m(l=>Oo?.(l),[Oo]),qn=m(l=>vo?.(l),[vo]),Qn=m(l=>xo?.(l),[xo]),Zn=m(l=>ko?.(l),[ko]),Jn=m(l=>_o?.(l),[_o]),ei=m(l=>Lo?.(l),[Lo]),ti=m(l=>Co?.(l),[Co]),oi=m(l=>Io?.(l),[Io]),ai=m(l=>Po?.(l),[Po]),si=m(l=>No?.(l),[No]),ni=m(l=>wo?.(l),[wo]),ii=m(l=>go?.(l),[go]),ri=m(l=>bo?.(l),[bo]),li=m(l=>yo?.(l),[yo]),ci=m(l=>Eo?.(l),[Eo]),di=m(l=>To?.(l),[To]),hi=m(l=>Ro?.(l),[Ro]),ui=m(l=>Ao?.(l),[Ao]),Do=pe?.logoUrl,Bo=pe?.logoReversed,Mo=pe?.logoInkIsDark,Fo=pe!==null,pi=Ir(()=>({logo:Fo?{logoUrl:Do,logoReversed:Bo,logoInkIsDark:Mo}:null,placeholder:o||s,wordmark:o?a:t}),[Fo,Do,Bo,Mo,o,s,a,t]);return pa(St.Provider,{value:pi,children:pa(fa.Provider,{value:{settings:pe,setSettings:Ho,primeSettings:Un,websiteName:t,templateChrome:o,templateName:a,chromePlaceholder:s,themeMode:n,setThemeMode:Yn,themeSwitchShown:r,setThemeSwitchShown:Kn,theme:h,themeRow:_,setTheme:$n,fonts:Ze,setFonts:Vn,sizes:En,setSizes:jn,cornerRadiusPx:Tn,setCornerRadiusPx:ni,cardShadow:Sn,setCardShadow:ii,shadowColor:_n,setShadowColor:ri,cardGap:On,setCardGap:li,hoverEffect:vn,setHoverEffect:ci,headingCompression:xn,setHeadingCompression:di,siteWidth:kn,setSiteWidth:Xn,siteGutter:Rn,siteGutterPhone:An,blockGap:Ln,blockGapPhone:Cn,siteLengthUnits:In,setSiteLengthUnits:Jn,setSiteGutter:zn,setSiteGutterPhone:qn,setBlockGap:Qn,setBlockGapPhone:Zn,headingTypography:Pn,setHeadingTypography:hi,textStyles:Nn,setTextStyles:ui,wordStyles:Hn,heroBackgroundFollowsWidth:Dn,setHeroBackgroundFollowsWidth:ei,sectionBackgroundWidth:Bn,setSectionBackgroundWidth:ti,sectionContentWidth:Mn,setSectionContentWidth:oi,photographyGrayscale:Fn,setPhotographyGrayscale:ai,shareButtonOnPosts:Gn,setShareButtonOnPosts:si,themeFromDocument:Wn},children:e})})}var Nr=()=>Cr(fa);function Xp(e,t,o){return e?t===o?"read":"loading":"none"}function zp(e,t){return{value:e,readFor:t}}function qp(e,t,o){return{value:t,readFor:e.readFor===o?o:null}}function Qp(){let{sectionContentWidth:e,themeFromDocument:t}=Nr();return t?null:e}var em=["general","commerce","service"],oe=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"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:"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(oe.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var Hr="2027-02-05",Dr="2027-02-14",wa={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
2
 
3
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
4