efficient-storefront-blocks 0.132.1 → 0.133.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-2WCOBTZI.js → CustomHtmlCodeWindow-VMHVWWU4.js} +1 -1
  3. package/dist/chunks/EditorPreviewCheckout-ZZWN45X3.js +4 -0
  4. package/dist/chunks/SiteEditorProvider-XQBBIEX4.js +1 -0
  5. package/dist/chunks/{chunk-3P4XQK3S.js → chunk-6YESFEQM.js} +1 -1
  6. package/dist/chunks/{chunk-OBAUAKZL.js → chunk-C2YDFOCO.js} +1 -1
  7. package/dist/chunks/{chunk-UFQDBLLF.js → chunk-DI3WYPQW.js} +1 -1
  8. package/dist/chunks/{chunk-TNWF32DT.js → chunk-DO5FAI7I.js} +1 -1
  9. package/dist/chunks/{chunk-WCEMPYVI.js → chunk-GXZNWNY6.js} +1 -1
  10. package/dist/chunks/{chunk-XXVOKKJV.js → chunk-NQZ3O6A3.js} +1 -1
  11. package/dist/chunks/chunk-PDLGLUEV.js +337 -0
  12. package/dist/chunks/{chunk-PB4FLVPH.js → chunk-Z5XT44JU.js} +1 -1
  13. package/dist/chunks/{fitment-data-MW7I7F7T.js → fitment-data-6FBUVM5L.js} +1 -1
  14. package/dist/chunks/{section-css-style-7OKHUI7L.js → section-css-style-YWXTU6HK.js} +1 -1
  15. package/dist/index.js +39 -18
  16. package/dist/links.js +1 -1
  17. package/dist/render/app/globals.css +3 -1
  18. package/dist/render/built-with.json +1 -1
  19. package/dist/render/components/card-pieces/CardProductPicture.d.ts +1 -0
  20. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  21. package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
  22. package/dist/render/components/checkout/checkout-parts.js +1 -1
  23. package/dist/render/components/checkout/checkout-state.d.ts +2 -1
  24. package/dist/render/components/checkout/checkout-state.js +3 -3
  25. package/dist/render/lib/api/index.d.ts +5 -0
  26. package/dist/render/lib/api/index.js +1 -1
  27. package/dist/render/lib/api/types.d.ts +138 -1
  28. package/dist/render/lib/checkout/wallet-return.d.ts +3 -1
  29. package/dist/render/lib/checkout/wallet-return.js +1 -1
  30. package/dist/render/lib/content/site.d.ts +1 -1
  31. package/dist/routine-index.json +1 -1
  32. package/dist/value-index.json +1 -1
  33. package/package.json +3 -3
  34. package/dist/chunks/EditorPreviewCheckout-LWCGOB7R.js +0 -4
  35. package/dist/chunks/SiteEditorProvider-IOAQH4S4.js +0 -1
  36. package/dist/chunks/chunk-3RAPOAJE.js +0 -337
  37. /package/dist/chunks/{chunk-2NWFNMO3.js → chunk-454ZVMST.js} +0 -0
  38. /package/dist/chunks/{chunk-OBAUAKZL.js.LEGAL.txt → chunk-C2YDFOCO.js.LEGAL.txt} +0 -0
  39. /package/dist/chunks/{chunk-AHUOASUP.js → chunk-IHBF4FM5.js} +0 -0
  40. /package/dist/chunks/{chunk-YDV7IGPY.js → chunk-LN6M3FAM.js} +0 -0
  41. /package/dist/chunks/{chunk-3RAPOAJE.js.LEGAL.txt → chunk-PDLGLUEV.js.LEGAL.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.133.0 — 2026-11-27 — Peers move to efficient-web-builder ^77 and efficient-shell ^16.10 · Checkout: Worldpay hosted payment page
4
+
5
+ ### Peers move to efficient-web-builder ^77 and efficient-shell ^16.10
6
+
7
+ **For hosts:** install `efficient-web-builder` 77.0.0 or newer and `efficient-shell` 16.10.0 or newer, then re-vendor `src/` with `node scripts/sync-storefront-blocks.mjs`.
8
+
9
+ - **Peer ranges narrowed**: `efficient-web-builder` `^76.2.0` -> `^77.0.0` (the pin steps on published pages with a pinned track), and `efficient-shell` `^16.7.0` -> `^16.10.0` (the first shell with the pin steps, the floor web-builder 77 needs). No block code changes.
10
+
11
+ ### Checkout: Worldpay hosted payment page
12
+
13
+ - The shop checkout offers **Visa / Mastercard / American Express via Worldpay** when the tenant has Worldpay switched on (`paymentMethods` includes `worldpay`). The shopper enters their card on Worldpay's secure page and is brought back to `/checkout?worldpay=return`.
14
+ - The return confirms from the `worldpayRef` the backend puts on the result URL (`POST /payments/worldpay/confirm`), so it works in a browser that blocks site data, like Afterpay and Zip (#582). It answers paid, refused (`failed`) or still confirming (`collecting`).
15
+ - New API client calls `createWorldpayCheckout` and `confirmWorldpayPayment`, with types from the storefront contract. Needs efficient-backend #5306.
16
+
17
+ ## 0.132.2 — 2026-11-27 — A Studio card with a hover Zoom keeps its wheel in place and grows it
18
+
19
+ **For hosts:** no peer change. The storefront re-vendors `src/` with
20
+ `node scripts/sync-storefront-blocks.mjs`.
21
+
22
+ - **Card ground: Studio** with a Picture **Zoom** (Animation tab): the wheel
23
+ now sits at Studio's place on the grey ground, and grows about that place
24
+ while the card is pointed at. Before, the wheel filled the top of the
25
+ picture and the grow was cut at the picture's edge.
26
+ - A card with no Zoom draws the same bytes as before.
27
+
3
28
  ## 0.132.1 — 2026-11-27 — A part-off-delivery coupon shows its saving before the quote
4
29
 
5
30
  **For hosts:** no peer change. The storefront re-vendors `src/` with
@@ -1,4 +1,4 @@
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(`
1
+ "use client";import{b as ee,d as te,e as se}from"./chunk-C2YDFOCO.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-Z5XT44JU.js";import{d as Z}from"./chunk-DO5FAI7I.js";import{Lf as J,Tg as B,cg as Y,la as X,mi as le,yb as K}from"./chunk-6YESFEQM.js";import"./chunk-IHBF4FM5.js";import"./chunk-454ZVMST.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 zr,Da as Gr,Ia as Vr,Ja as me,Ka as Jr,La as Xr,Qa as Zr,Ra as bt,Ua as hn,W as _t,Wa as ie,X as Ft,b as _r,c as yn,d as Fr,e as qt,ja as Mr,ka as Kr,la as Dr,ma as Ur,na as Wr,oa as jr,pa as Yr,qa as ge,sa as ht,ta as $r,ua as Br,va as Mt,wa as Hr,ya as gn,za as re}from"./chunk-GXZNWNY6.js";import{S as pe,Y as et,da as M,o as Tr,p as qr}from"./chunk-NQZ3O6A3.js";import{fa as Ar,ha as We}from"./chunk-DI3WYPQW.js";import{i as Ir,j as gt,k as Le}from"./chunk-LN6M3FAM.js";import{mi as Lr}from"./chunk-6YESFEQM.js";import"./chunk-IHBF4FM5.js";import"./chunk-454ZVMST.js";import{a as fn,b as Ni}from"./chunk-Y6SLVHK3.js";var no=fn((tc,to)=>{"use strict";var Ei="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";to.exports=Ei});var io=fn((nc,ao)=>{"use strict";var Ri=no();function ro(){}function oo(){}oo.resetWarningCache=ro;ao.exports=function(){function e(r,a,s,u,y,f){if(f!==Ri){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:oo,resetWarningCache:ro};return n.PropTypes=n,n}});var co=fn((ac,so)=>{"use strict";so.exports=io()();var rc,oc});import{useEffect as _a,useMemo as Ia,useRef as at,useState as $e}from"react";import{formatTime as wi}from"efficient-shell/format";function Qr(e,t){let n=qr(t);return!n||Number.isNaN(new Date(e).getTime())?"":wi(e,{locale:Tr(),timeZone:n})}import{rootIsDark as Si}from"efficient-shell/format";function eo(){if(typeof document>"u")return;let e=getComputedStyle(document.documentElement),t=(r,a)=>e.getPropertyValue(r).trim()||a,n=Si({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 _s,parseOption as Fs}from"efficient-shell/format";var K=Ni(co(),1);import I from"react";function lo(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 Oi(e){if(Array.isArray(e))return e}function yo(e,t,n){return(t=_i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ai(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,u,y=[],f=!0,p=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(r=s.call(n)).done)&&(y.push(r.value),y.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 y}}function Li(){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 uo(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 po(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uo(Object(n),!0).forEach(function(r){yo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ii(e,t){if(e==null)return{};var n,r,a=Ti(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 Ti(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 go(e,t){return Oi(e)||Ai(e,t)||Fi(e,t)||Li()}function qi(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 _i(e){var t=qi(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 Fi(e,t){if(e){if(typeof e=="string")return lo(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)?lo(e,t):void 0}}var Q=function(t,n,r){var a=!!r,s=I.useRef(r);I.useEffect(function(){s.current=r},[r]),I.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=I.useRef(t);return I.useEffect(function(){n.current=t},[t]),n.current},tt=function(t){return t!==null&&bn(t)==="object"},Mi=function(t){return tt(t)&&typeof t.then=="function"},Ki=function(t){return tt(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},mo="[object Object]",Di=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)===mo,u=Object.prototype.toString.call(n)===mo;if(s!==u)return!1;if(!s&&!r)return t===n;var y=Object.keys(t),f=Object.keys(n);if(y.length!==f.length)return!1;for(var p={},b=0;b<y.length;b+=1)p[y[b]]=!0;for(var g=0;g<f.length;g+=1)p[f[g]]=!0;var v=Object.keys(p);if(v.length!==y.length)return!1;var k=t,E=n,C=function(H){return e(k[H],E[H])};return v.every(C)},ho=function(t,n,r){return tt(t)?Object.keys(t).reduce(function(a,s){var u=!tt(n)||!Di(t[s],n[s]);return r.includes(s)?(u&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),a):u?po(po({},a||{}),{},yo({},s,t[s])):a},null):null},bo="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.",fo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bo;if(t===null||Ki(t))return t;throw new Error(n)},Ui=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bo;if(Mi(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(a){return fo(a,n)})};var r=fo(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Wi=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=I.createContext(null);Kt.displayName="ElementsContext";var vo=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=I.useMemo(function(){return Ui(n)},[n]),u=I.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(r):null}}),y=go(u,2),f=y[0],p=y[1];I.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);I.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 g=vn(r);return I.useEffect(function(){if(f.elements){var v=ho(r,g,["clientSecret","fonts"]);v&&f.elements.update(v)}},[r,g,f.elements]),I.useEffect(function(){Wi(f.stripe)},[f.stripe]),I.createElement(Kt.Provider,{value:f},a)};xn.propTypes={stripe:K.default.any,options:K.default.object};var ko=function(t){var n=I.useContext(Kt);return vo(n,t)},xo=function(){var t=ko("calls useElements()"),n=t.elements;return n},ji=function(t){var n=t.children,r=ko("mounts <ElementsConsumer>");return n(r)};ji.propTypes={children:K.default.func.isRequired};var Yi=I.createContext(null);Yi.displayName="CheckoutContext";var Co=I.createContext(null);Co.displayName="CheckoutSdkContext";var kn=function(t){var n=I.useContext(Co),r=I.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 vo(r,t)},$i=["mode"],Bi=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},D=function(t,n,r){var a="".concat(Bi(t),"Element"),s=function(p){var b=p.id,g=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,ce=p.onNetworksChange,Se=p.onConfirm,W=p.onCancel,le=p.onShippingAddressChange,Ee=p.onShippingRateChange,Te=p.onSavedPaymentMethodRemove,ne=p.onSavedPaymentMethodUpdate,ve=p.onAvailablePaymentMethodsChange,X=kn("mounts <".concat(a,">")),ee="elements"in X?X.elements:null,h="checkoutSdk"in X?X.checkoutSdk:null,V=I.useState(null),ke=go(V,2),j=ke[0],Be=ke[1],oe=I.useRef(null),xe=I.useRef(null);Q(j,"blur",E),Q(j,"focus",C),Q(j,"escape",R),Q(j,"click",P),Q(j,"loaderror",z),Q(j,"loaderstart",G),Q(j,"networkschange",ce),Q(j,"confirm",Se),Q(j,"cancel",W),Q(j,"shippingaddresschange",le),Q(j,"shippingratechange",Ee),Q(j,"savedpaymentmethodremove",Te),Q(j,"savedpaymentmethodupdate",ne),Q(j,"availablepaymentmethodschange",ve),Q(j,"change",H);var Ce;O&&(t==="expressCheckout"?Ce=O:Ce=function(){O(j)}),Q(j,"ready",Ce),I.useLayoutEffect(function(){if(oe.current===null&&xe.current!==null&&(ee||h)){var T=null;if(h){var te=h,_e=h;switch(t){case"paymentForm":T=_e.createForm(k);break;case"payment":T=te.createPaymentElement(k);break;case"address":if("mode"in k){var ue=k.mode,Re=Ii(k,$i);if(ue==="shipping")T=te.createShippingAddressElement(Re);else if(ue==="billing")T=te.createBillingAddressElement(Re);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":T=te.createExpressCheckoutElement(k);break;case"currencySelector":T=h.createCurrencySelectorElement();break;case"taxId":T=te.createTaxIdElement(k);break;case"contactDetails":T=te.createContactDetailsElement();break;case"linkSignup":if("createLinkSignupElement"in h)T=h.createLinkSignupElement(k);else throw new Error("<LinkSignupElement> requires <CheckoutElementsProvider> and is not supported inside <CheckoutFormProvider>.");break;case"terms":T=te.createTermsElement(k);break;default:throw new Error("<".concat(a,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else ee&&(T=ee.create(t,k));oe.current=T,Be(T),T&&T.mount(xe.current)}},[ee,h,k]);var qe=vn(k);return I.useEffect(function(){if(oe.current){var T=ho(k,qe,["paymentRequest"]);T&&"update"in oe.current&&oe.current.update(T)}},[k,qe]),I.useLayoutEffect(function(){return function(){if(oe.current&&typeof oe.current.destroy=="function")try{oe.current.destroy(),oe.current=null}catch{}}},[]),I.createElement("div",{id:b,className:g,ref:xe})},u=function(p){kn("mounts <".concat(a,">"));var b=p.id,g=p.className;return I.createElement("div",{id:b,className:g})},y=n?u:s;return y.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},y.displayName=a,y.__elementType=t,y},U=typeof window>"u",Hi=I.createContext(null);Hi.displayName="EmbeddedCheckoutProviderContext";var Po=function(){var t=kn("calls useStripe()"),n=t.stripe;return n},sc=D("auBankAccount",U),cc=D("card",U),lc=D("cardNumber",U),uc=D("cardExpiry",U),dc=D("cardCvc",U),pc=D("currencySelector",U),mc=D("iban",U),No=D("payment",U),fc=D("expressCheckout",U),yc=D("paymentRequestButton",U),gc=D("linkAuthentication",U),hc=D("linkSignup",U),bc=D("contactDetails",U),vc=D("address",U),kc=D("shippingAddress",U),xc=D("paymentMethodMessaging",U),Cc=D("taxId",U),Pc=D("issuingCardNumberDisplay",U),Nc=D("issuingCardCvcDisplay",U),wc=D("issuingCardExpiryDisplay",U),Sc=D("issuingCardPinDisplay",U),Ec=D("issuingCardCopyButton",U),Rc=D("terms",U);function Wt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wt=function(t){return typeof t}:Wt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(e)}var Eo="dahlia",zi=function(t){return t===3?"v3":t},Ro="https://js.stripe.com",Gi="".concat(Ro,"/").concat(Eo,"/stripe.js"),Vi=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Ji=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,wo="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Xi=function(t){return Vi.test(t)||Ji.test(t)},Zi=function(){for(var t=document.querySelectorAll('script[src^="'.concat(Ro,'"]')),n=0;n<t.length;n++){var r=t[n];if(Xi(r.src))return r}return null},So=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(Gi).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},Qi=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.17.0",startTime:n})},vt=null,Dt=null,Ut=null,es=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},ts=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},ns=function(t){return vt!==null?vt:(vt=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(wo),window.Stripe){n(window.Stripe);return}try{var a=Zi();if(a&&t)console.warn(wo);else if(!a)a=So(t);else if(a&&Ut!==null&&Dt!==null){var s;a.removeEventListener("load",Ut),a.removeEventListener("error",Dt),(s=a.parentNode)===null||s===void 0||s.removeChild(a),a=So(t)}Ut=ts(n,r),Dt=es(r),a.addEventListener("load",Ut),a.addEventListener("error",Dt)}catch(u){r(u);return}}),vt.catch(function(n){return vt=null,Promise.reject(n)}))},rs=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(Wt(a)," instead."));var s=a.match(/^pk_test/),u=zi(t.version),y=Eo;s&&u!==y&&console.warn("Stripe.js@".concat(u," was loaded on the page, but @stripe/stripe-js@").concat("9.17.0"," expected Stripe.js@").concat(y,". 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 Qi(f,r),f},kt,Oo=!1,Ao=function(){return kt||(kt=ns(null).catch(function(t){return kt=null,Promise.reject(t)}),kt)};Promise.resolve().then(function(){return Ao()}).catch(function(e){Oo||console.warn(e)});var jt=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Oo=!0;var a=Date.now();return Ao().then(function(s){return rs(s,n,a)})};var Yt=2;function Lo(e){return e==="card"}var os="checkout_unavailable",as="checkout_waiting",Io="committed",Ie="We could not check your payment. Please try again.",$t="Your last change was not saved. This is your order as placed.",To="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.",qo=1e4;async function _o(e,t=qo){let n,r=new Promise(s=>{n=setTimeout(()=>s(void 0),t)}),a=(async()=>{try{return(await(await jt(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=qo){let n,r=new Promise(a=>{n=setTimeout(()=>a(void 0),t)});try{return await Promise.race([M.releaseCheckout({idempotencyKey:e}).then(a=>a.status,()=>{}),r])}finally{clearTimeout(n)}}function Mo(e,t){return e instanceof pe&&typeof e.data=="object"&&e.data!==null&&e.data.code===t}function Bt(e){return Mo(e,os)}function Pn(e){return Mo(e,as)}function Nn(e){return e instanceof pe&&e.status>=400&&e.status<500&&e.status!==408}function Ko(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 is(e){return e.orderNumber?{kind:"placed",order:e}:{kind:e.status==="released"?"refunded":e.status==="expired"?"expired":"pending",checkoutNumber:e.checkoutNumber}}async function Do({checkoutNumber:e,resend:t,page:n}){n.setConfirming(!0);let r;try{r=is(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 Ps,useContext as Ns,useEffect as B,useMemo as pa,useRef as $,useState as w}from"react";var ss="sf:gclid",cs="sf:fbclid",ls=2160*60*60*1e3;function jo(){return typeof window<"u"}function Uo(e){let t=gt.getItem(e);if(!t)return"";try{let{v:n,t:r}=JSON.parse(t);return!n||typeof r!="number"||Date.now()-r>ls?"":n}catch{return""}}function Wo(e){if(!jo())return"";let t=e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1"),n=document.cookie.match(new RegExp(`(?:^|; )${t}=([^;]*)`));return n?decodeURIComponent(n[1]):""}function Yo(){if(!jo())return{};let e=Uo(ss),t=Uo(cs),n=Wo("_fbp"),r=Wo("_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",us=20;function Ho(){return typeof window>"u"||window.parent!==window}function ds(...e){try{if(Ho()||typeof window.fbq!="function")return;window.fbq(...e)}catch{}}var Bo=new Set;function ps(e){if(Bo.has(e))return!1;Bo.add(e);try{let t=JSON.parse(gt.getItem($o)??"[]");if(t.includes(e))return!1;gt.setItem($o,JSON.stringify([...t,e].slice(-us)))}catch{}return!0}function ms(e){return[...new Set(e.filter(ht).flatMap(t=>t.components.map(n=>n.partNumber)))]}function zo(e){let t=e.confirmation;Ho()||!ps(t.orderNumber)||ds("track","Purchase",{value:Number(t.grandTotal),currency:t.currency,content_type:"product",content_ids:ms(e.lines)},{eventID:t.orderNumber})}var wn="checkout-afterpay-context",Sn="checkout-gocardless-context",En="checkout-zip-context",Rn="checkout-klarna-context",On="checkout-worldpay-context";function fs(e){return e?.lostChange===!0}function ys({evidence:e,parked:t}){return e?{action:"capture",evidence:e,parked:t}:t?{action:"settle",parked:t}:{action:"ignore"}}function gs(e,t){let n=e.getItem(t);if(e.removeItem(t),!n)return null;try{return JSON.parse(n)}catch{return null}}function hs(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 Go={name:"Afterpay",legParam:"afterpay",legValues:["confirm","cancel"],storageKey:wn,evidenceFrom(e,t){return t==="cancel"||(e.get("status")??"").toUpperCase()==="CANCELLED"?null:e.get("orderToken")},requestFrom:e=>({token:e})},Vo={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})},Jo={name:"Worldpay",legParam:"worldpay",legValues:["return","cancel"],storageKey:On,evidenceFrom:(e,t)=>t==="cancel"?null:e.get("worldpayRef"),requestFrom:e=>({transactionReference:e}),words:{declined:"Worldpay did not take the payment \u2014 our team will follow up on payment.",collecting:"We're confirming your payment with Worldpay \u2014 we'll email you once it's through."}},Xo={name:"GoCardless",legParam:"gocardless",legValues:["confirm","cancel"],storageKey:Sn,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."}},Zo={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 nt(e,t){let n=new URLSearchParams(t.search),r=n.get(e.legParam);if(!r||!e.legValues.includes(r))return;let a=gs(t.storage,e.storageKey),s=e.evidenceFrom(n,r);t.scrubQuery();let u=ys({evidence:s,parked:a});if(u.action==="ignore"||e.keyedByParked&&!u.parked)return;let y=hs(e);if(t.page.clearCart(),fs(u.parked)&&t.page.lostChange(),u.action==="settle"){t.page.note(y.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(y.collecting,!e.words?.collecting):t.page.note(y.declined,!0),t.page.land(u.parked?.confirmation??f)}catch{u.parked?(t.page.note(y.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 Qo(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(y=>y.code&&y.code.toUpperCase()===a)??n.find(y=>y.code&&y.code.toUpperCase()===s)??n.find(y=>y.name.toUpperCase()===a);return u?u.code||u.name:""}var Ln="checkout-memory-context",na="Prices have changed since this checkout started. The total shows today's prices.",ra="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.",oa=3,bs=3600*1e3;function vs(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(vs);function aa(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 ia(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 In(e){return{...ia(e),payFirst:!!e.checkoutFlow}}function sa(e){return ia(e)}var ks={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null};function Tn(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 qn(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 _n(e){return e.lastPress!==null||e.unpaidOrder!==null||e.keptCardKey!==null}function xs(e){let t=e.parkedAt+bs,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 ca(e){try{let t={...e,lines:zt(e.lines),press:ua(e.press)};Le.setItem(Ln,JSON.stringify({v:oa,...t}))}catch{}}var je=e=>!!e&&typeof e=="object"&&!Array.isArray(e),la=e=>je(e)&&typeof e.idempotencyKey=="string"&&Array.isArray(e.items)&&e.items.every(t=>je(t)&&typeof t.partNumber=="string"&&typeof t.quantity=="number")&&je(e.customer)&&typeof e.payFirst=="boolean",An=e=>je(e)&&typeof e.id=="string"&&typeof e.qty=="number"&&Array.isArray(e.components);function Cs(e){return je(e)&&typeof e.key=="string"&&la(e.request)&&Array.isArray(e.lines)&&e.lines.every(An)&&Array.isArray(e.plainLines)&&e.plainLines.every(An)?{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 ea=e=>typeof e=="string"?e:null,ta={lastPress:Cs,keptCardKey:ea,placedShape:ea,placedRequest:e=>la(e)?e:null,unpaidOrder:e=>je(e)?qn(e):null};function ua(e){let t=je(e)?e:{},n={...ks};for(let r of Object.keys(ta))n[r]=ta[r](t[r]);return n}function da(){let e;try{e=Le.getItem(Ln)}catch{return null}if(!e)return null;try{let t=JSON.parse(e);if(t.v!==oa||typeof t.key!="string"||!t.key||!Array.isArray(t.lines)||!t.lines.every(An)||typeof t.parkedAt!="number")return null;let n={key:t.key,authed:t.authed===!0,parkedAt:t.parkedAt,press:ua(t.press),lines:zt(t.lines),form:t.form&&typeof t.form=="object"?Tn(t.form):null};return Date.now()>=xs(n)?(Fn(),null):_n(n.press)?n:null}catch{return null}}function Fn(){try{Le.removeItem(Ln)}catch{}}import{jsx as he}from"react/jsx-runtime";function ma(e){let t=e.indexOf(`
3
+ `);return t===-1?[e,""]:[e.slice(0,t),e.slice(t+1)]}function fa(e,{canParkContext:t}={canParkContext:!0}){let n=e.paymentMethods,r=[];return n.includes("card")&&r.push({key:"card",title:"Card",body:null,price:he("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:he("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:he("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:he("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:he("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:he("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:he("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY LATER"})}),n.includes("worldpay")&&r.push({key:"worldpay",title:"Visa / Mastercard / American Express",body:null,price:he("span",{className:"font-mono text-xs uppercase tracking-[0.2em] text-accent",children:"VIA WORLDPAY"})}),n.includes("bank")&&r.push({key:"bank",title:"Bank transfer",body:null,price:he("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Invoiced"})}),r}var va="This shop does not take payment online yet. Please contact the shop to order.",rt=class extends Error{};function ya(e,t){if(!e.orderNumber&&Bt(t))return t.message;let n=t instanceof pe?` (${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 ws=3e3,Ss=.005,ga=new Set(["paypal","square","afterpay","gocardless","zip","klarna","worldpay"]);function ha(){let e=Zr();return{...e==="denied"?{}:Yo(),...e?{adConsent:e}:{}}}var be=e=>JSON.parse(e),Es={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null},Rs={lastPress:e=>e&&{key:e.key,request:In(e.request),lines:e.lines,goods:be(e.shape)[0],plainPressed:!!e.plainMethod,plainLines:e.plainLines,plainGoods:be(e.plainShape)[0]},keptCardKey:e=>e,placedShape:e=>e===null?null:be(e)[0],placedRequest:e=>e&&In(e.body),unpaidOrder:e=>e&&qn(e)};function ba(e,t){let n={};for(let r of Object.keys(e))n[r]=e[r](t[r]);return n}var ka="Shipping cannot be calculated right now. Please try again.";function xa(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 Os({site:e,logo:t,signInHref:n=null,preview:r=!1}){let{items:a,totals:s,coupon:u,refuseCoupon:y,deliveryOptions:f,shippingMethodId:p,setShippingMethodId:b,setQuoteDestination:g,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:ce,formatMoney:Se}=ge(),[W,le]=w(()=>fa(e)[0]?.key??null),[Ee,Te]=w(!0);B(()=>{Te(Ir(Le))},[]);let[ne,ve]=w(!1),[X,ee]=w(""),[h,V]=w(""),[ke,j]=w(""),[Be,oe]=w(""),[xe,Ce]=w(""),[qe,T]=w(""),[te,_e]=w(""),[ue,Re]=w(""),[He,it]=w(""),[Y,st]=w(()=>z||G[0]?.code||""),[Pe,xt]=w(""),[ct,Wn]=w([]),[Zt,Qt]=w(null),[Ct,ze]=w(null),jn=pa(()=>G.find(o=>o.code===Y)??ce,[G,Y,ce]),Fa=jn?.postalLabel||"Postal Code",Ma=ct[0]?.divisionType||"State / Province";B(()=>{if(!Y){Wn([]),Qt(Y);return}Qt(null);let o=!1;return M.listCountrySubdivisions(Y).then(c=>{o||(Wn(c),Qt(Y),xt(""))}),()=>{o=!0}},[Y]);let Yn=xe.trim()!==""&&te.trim()!==""&&ue.trim()!==""&&Zt===Y&&(ct.length===0||Pe!=="")?ue.trim():"";B(()=>{g(Y?{country:Y,subdivision:Pe,postcode:Yn}:null)},[Y,Pe,Yn,g]),B(()=>()=>g(null),[g]);let Ka=v?.status==="unavailable",Da=k,[lt,$n]=w(null),[Ua,Bn]=w([]),[en,Pt]=w("new"),[Hn,zn]=w(!1),[tn,Wa]=w("Home"),[ja,Gn]=w(null),[Ya,nn]=w(null),[Fe,Nt]=w(()=>bt()),Vn=$(null),[rn,Ge]=w(null),[$a,se]=w(null),[Jn,wt]=w(null),[Xn,Ba]=w(!1),[Zn,Ha]=w(!1),[Oe,Ve]=w(null),[za,St]=w(!1),[Z,de]=w(null),Qn=!!Z?.orderNumber,Ga=Qn||ne,[Va,Ja]=w(null),[Xa,Za]=w(!1),[Qa,ei]=w(!1),[ti,ni]=w(!1),[ri,oi]=w(!1),[ai,ii]=w(!1),[er,si]=w(!1),[ci,on]=w(!1),[ut,tr]=w(null),A=$({...Es});A.current.unpaidOrder=Z;let an=$(!1),Me=$(a),nr=!!(rn||ut&&ut.kind!=="processing"||er||Xn||Zn||Jn&&Oe?.orderNumber);B(()=>{nr&&(O([]),H())},[nr,O,H]);let rr=$(!1);B(()=>{r||rr.current||!a.some(ht)||(rr.current=!0,Mr({lines:a,currency:s.currency,value:s.subtotal-s.discount,coupon:u?.valid?u.code:void 0}))},[a,s,u,r]),B(()=>{E(X,h.trim()||void 0)},[X,h,E]);let or=$(null),[Et,li]=w(null);B(()=>{let o=or.current;if(!Et||!o)return;let c=()=>o.style.setProperty("--sf-checkout-header-h",`${Et.offsetHeight}px`);c();let m=new ResizeObserver(c);return m.observe(Et),()=>m.disconnect()},[Et]),B(()=>{let o=m=>({setConfirming:m,land:Ge,markPaid:()=>St(!0),note:(S,d)=>Ja({text:S,warning:d}),fail:se,clearCart:C,lostChange:()=>nn($t)}),c={search:window.location.search,storage:Le,scrubQuery:()=>window.history.replaceState(null,"",window.location.pathname)};nt(Go,{...c,capture:M.captureAfterpayPayment,page:o(Za)}),nt(Vo,{...c,capture:M.captureZipPayment,page:o(ni)}),nt(Xo,{...c,capture:M.completeGocardlessPayment,page:o(ei)}),nt(Zo,{...c,capture:M.captureKlarnaPayment,page:o(oi)}),nt(Jo,{...c,capture:M.confirmWorldpayPayment,page:o(ii)})},[]);function ar(o){let[c,m]=ma(o.address);Ce(c),T(m),_e(o.city),Re(o.zip_code),o.country&&st(o.country),o.phone&&it(o.phone),ze({country:o.country||null,state:o.state??""})}B(()=>{if(Ct){if((Ct.country||Y)!==Y){ze(null);return}Zt===Y&&(xt(Qo(Y,Ct.state,ct)),ze(null))}},[Ct,Y,Zt,ct]),B(()=>{let o=!1;return(async()=>{try{let[c,m,S]=await Promise.all([et.me(),et.myProfile().catch(()=>null),et.myAddresses().catch(()=>[])]);if(o)return;$n(c);let d=S.filter(F=>F.is_active);Bn(d),ee(c.email);let L=(m?.contact_name??"").split(/\s+/);V(c.first_name||L[0]||""),j(c.last_name||L.slice(1).join(" "));let _=c.phone||m?.phone;_&&it(_);let q=d.find(F=>F.id===c.default_delivery_location)??d[0];if(q)Pt(q.id),ar(q);else if(m){let[F,Qe]=ma(m.address??"");Ce(F),T(Qe),_e(m.city??""),Re(m.zip_code??""),m.country&&st(m.country),ze({country:m.country||null,state:m.state??""})}Tt.current&&pr(Tt.current,!1)}catch{}})(),()=>{o=!0}},[]);function ui(){et.logout(),pt.current=!0,Tt.current=null,It.current=null,mt(),$n(null),Bn([]),Pt("new"),zn(!1),ee(""),V(""),j(""),oe(""),Ce(""),T(""),_e(""),Re(""),it(""),st(z||G[0]?.code||""),xt(""),ze(null)}let Je=pa(()=>fa(e,{canParkContext:Ee}),[e,Ee]);B(()=>{Je.some(o=>o.key===W)||le(Je[0]?.key??null)},[Je,W]);let di=Je.length===0,Rt=qe.trim()?`${xe}
4
+ ${qe.trim()}`:xe,pi=Ko({email:X,firstName:h,lastName:ke,company:Be.trim(),phone:He,address:Rt,city:te,subdivision:Pe,postcode:ue,country:Y,lines:a.map(o=>[o.id,o.qty]),shippingMethodId:p,couponCode:yn(u),currency:s.currency,shopperId:lt?.id??null}),ae=JSON.stringify([pi,W]),sn=$(null),Ot=$(!1),Ae=$(!1),Xe=$(null),At=$(!1),ye=$(ae);ye.current=ae;let ir=$(ne);ir.current=ne;let Lt=$(null);B(()=>{let o=()=>{let c=Lt.current;c&&(Lt.current=null,de(c),ve(!1))};return window.addEventListener("pageshow",o),()=>window.removeEventListener("pageshow",o)},[]);function dt(o,c,m,S){let d={idempotencyKey:c,confirmation:m};br()&&(d.lostChange=!0),Le.setItem(o,JSON.stringify(d)),window.location.assign(S),Lt.current=m}async function sr(o){ve(!0);try{await o()}finally{Lt.current||ve(!1)}}let cr=$(!1),lr=!!(rn||ut&&ut.kind!=="processing");B(()=>{lr&&(cr.current=!0,mt())},[lr]);let It=$(null),pt=$(!1),cn=$(null);function mt(){cn.current=null,Fn()}let Tt=$(null),[Ze,mi]=w(!1);function ln(o){if(cr.current||r||pt.current)return;let c={key:o,authed:an.current,parkedAt:cn.current??=Date.now(),press:ba(Rs,A.current),lines:a.length>0?a:Me.current,form:Tn({email:X,firstName:h,lastName:ke,company:Be,address1:xe,address2:qe,city:te,postcode:ue,phone:He,country:Y,subdivision:Pe,selectedAddressId:en,shippingMethodId:p,couponCode:u?.valid?u.code:null})};_n(c.press)?ca(c):mt()}let ur=$(W);ur.current=W;function un(o){return{...sa(o),...ha(),...o.payFirst?{checkoutFlow:Yt}:{}}}function fi(o,c){let m=o.request.payFirst?"":null,S=o.plainPressed?null:"",d=()=>ur.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(L){m=L},get plainMethod(){return S??d()},set plainMethod(L){S=L},plainLines:o.plainLines,plainShape:JSON.stringify([o.plainGoods,null])}}let[yi,gi]=w(!1),dr=yi?!s.quoted||s.serverSubtotal===null?"waiting":Math.abs(s.serverSubtotal-s.subtotal)<Ss?"same":"changed":null,dn=!Z&&dr==="waiting",hi=dn?{...s,repricing:!0}:s,pn=dn&&s.quoteFailed;B(()=>{if(!pn)return;let o=setInterval(k,ws);return()=>clearInterval(o)},[pn,k]);let bi=k;function pr(o,c=!0){ee(o.email),V(o.firstName),j(o.lastName),oe(o.company),Ce(o.address1),T(o.address2),_e(o.city),Re(o.postcode),it(o.phone),o.country&&st(o.country),ze({country:o.country||null,state:o.subdivision}),Pt(o.selectedAddressId),o.shippingMethodId&&b(o.shippingMethodId),c&&(It.current=o.couponCode)}B(()=>{let o=r?null:da(),c=!!(o&&a.length>0);if(o&&c&&!aa(o.lines,a)&&(mt(),o=null),o){let m=o.authed?M.createOrderAuthed:M.createOrder;Nt(o.key),cn.current=o.parkedAt,an.current=o.authed;let S={lastPress:d=>d&&fi(d,m),keptCardKey:d=>d,placedShape:d=>d===null?null:JSON.stringify([d,null]),placedRequest:d=>{if(!d)return null;let L=un(d);return{body:L,send:()=>m(L)}},unpaidOrder:d=>d};A.current=ba(S,o.press),o.press.unpaidOrder&&de(o.press.unpaidOrder),o.lines.length>0&&!c&&(O(o.lines),Me.current=o.lines,gi(!0)),o.form&&(Tt.current=o.form,pr(o.form))}mi(!0)},[]),B(()=>{!Ze||a.length>0||A.current.unpaidOrder||ne||(pt.current=!0,mt())},[Ze,a.length]),B(()=>{let o=It.current;!Ze||!o||a.length===0||(It.current=null,R(o,X||void 0))},[Ze,a.length]),B(()=>{!Ze||ne||ln(Fe)},[Ze,ne,Fe,Z]);let Ke=$(null);B(()=>{ir.current||(ae!==Ke.current&&(Ke.current=null),!(!Ae.current||!Z||Z.orderNumber)&&(ae===A.current.placedShape||ae===Ke.current||sr(()=>mr(Z))))},[ae,Z]);async function mr(o){if(At.current)return null;At.current=!0;try{let c=Xe.current?await _o(Xe.current):"none";if(c==="succeeded"||c==="processing")return Ae.current=!1,de(null),Ne("card"),c==="succeeded"?await De(void 0,o):Pr(o),null;if(c===void 0||!Fo.has(c))return Ke.current=ye.current,de(o),se(c==="requires_action"?To:Ie),null;let m=await Cn(Fe);if(m==="committed")return Ae.current=!1,de(null),Ne("card"),await De(void 0,o),null;if(m!=="released")return Ke.current=ye.current,de(o),se(Ie),null;Ae.current=!1,Xe.current=null,Ke.current=null,se(null),de(null);let S=bt();return Nt(S),S}finally{At.current=!1}}async function vi(){r||ne||At.current||await sr(ki)}async function ki(){if(Z){if((Ae.current?ae!==A.current.placedShape:ft())&&!Z.orderNumber){let S=await mr(Z);S&&ye.current===ae&&await fr(S);return}se(null),Ot.current=!1,await mn();let c=be(ye.current)[1],m=Z.orderNumber?c:"card";if(m&&ga.has(m)&&ft()&&be(ye.current)[0]!==sn.current){yr(Z);return}Ne(m),m!==W&&le(m),await Nr(Z,m,!Z.orderNumber);return}await fr(Fe)}async function fr(o){if(a.length===0||s.repricing||dn||!W||!Je.some(_=>_.key===W))return;let c=a.filter(ht).flatMap(_=>qt(_.components,_.qty));if(c.length===0){se("Pick a size on each wheel's product page before checking out.");return}se(null);let m,S=o,d=W,L=!1;try{let _=lt?M.createOrderAuthed:M.createOrder,q={customer:{email:X,name:`${h} ${ke}`.trim(),phone:He.trim()||void 0,companyName:Be.trim()||void 0,address:Rt,city:te,state:Pe||void 0,zipCode:ue,country:Y},items:c,currency:s.currency,idempotencyKey:o,shippingMethodId:p??void 0,couponCode:yn(u),...ha(),...Lo(W)?{checkoutFlow:Yt}:{}};A.current.placedRequest={body:q,send:()=>_(q)},an.current=!!lt,pt.current=!1,nn(null),sn.current=null,Ot.current=!1,Xe.current=null,Ae.current=!1,Ke.current=null,A.current.placedShape=ae,Me.current=a;let F=A.current.lastPress,Qe=F?.key===q.idempotencyKey&&(F.shape!==ae&&(!!q.checkoutFlow||!!F.method||!!F.plainMethod)||!!q.checkoutFlow&&!!F.plainMethod);Qe&&(A.current.keptCardKey=q.idempotencyKey);let Er=kr(q,_),Rr=Qe||!q.checkoutFlow&&A.current.keptCardKey===q.idempotencyKey,Or=!Er&&!Rr&&!q.checkoutFlow&&!!F&&!F.method;Or&&(F.plainMethod=W,F.plainLines=a,F.plainShape=ae,ln(q.idempotencyKey));let Ue=await(Rr?hr(q,_):_(q).then(yt=>({answer:yt,request:q})).catch(yt=>(Er?gr(yt,q.idempotencyKey):Or&&Nn(yt)&&(F.plainMethod=""),xi(yt,q,_))));if(!Ue)return;m=Ue.answer,S=Ue.request.idempotencyKey,d=Ue.method??d,Ne(d),L=ft()||d!==be(ye.current)[1],Ue.method&&Ue.method!==W&&le(Ue.method),m.orderNumber&&(xr(m),C()),await mn()}catch(_){let q=Fr(_);q?(y(q),se(`${q} Your order has not been placed. Place it again to continue without the code.`)):_ instanceof rt?se(Ie):se(_ instanceof pe?_.message:"Could not place the order. Please try again.");return}if(d&&ga.has(d)&&(L||ft())){yr(m);return}await Nr(m,d,!1,S)}function yr(o){sn.current=be(ye.current)[0],se(`${ya(o,null)} ${$t}`),de(o)}function gr(o,c){Nn(o)&&!Pn(o)&&A.current.lastPress?.key===c&&(A.current.lastPress=null)}async function xi(o,c,m){if(Bt(o))return vr(c,m);if(!Pn(o))throw o;return A.current.keptCardKey=c.idempotencyKey,hr(c,m,!0)}async function hr(o,c,m=!1){let S=await Cn(o.idempotencyKey);if(S==="released")return vr(o,c);if(S!=="committed")throw new rt;let d=A.current.lastPress?.key===o.idempotencyKey?A.current.lastPress:null;if(Me.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 rt});return A.current.placedShape=d.shape,{answer:Qe,request:o,method:d.method}}let L={...o,checkoutFlow:Yt},_=d&&!d.method?{body:d.request,send:d.send}:{body:L,send:()=>c(L)};A.current.placedRequest=_;let q=_.send,F=await q().catch(()=>null);if(!F&&d?.plainMethod)throw new rt;return F?.orderNumber&&F.status!==Io?(A.current.keptCardKey=null,d?.plainMethod&&(Me.current=d.plainLines),d&&(A.current.placedShape=d.plainMethod?d.plainShape:d.shape),{answer:F,request:o,method:d?.plainMethod||void 0}):(d&&(A.current.placedShape=d.shape),Ne("card"),await Cr("",F?async()=>F:()=>Promise.reject(new Error("The order request did not answer."))),await mn(),null)}function ft(){let o=A.current.placedShape;return o!==null&&be(o)[0]!==be(ye.current)[0]}function Ne(o){o!==be(ye.current)[1]&&(Ot.current=!0),nn(br()?$t:null)}function br(){return Ot.current||ft()}async function vr(o,c){let m={...o,idempotencyKey:bt()};A.current.keptCardKey=null,Nt(m.idempotencyKey),A.current.placedRequest={body:m,send:()=>c(m)},kr(m,c);try{return{answer:await c(m),request:m}}catch(S){throw gr(S,m.idempotencyKey),S}}function kr(o,c){return A.current.lastPress?.key===o.idempotencyKey?!1:(A.current.lastPress={key:o.idempotencyKey,send:()=>c(o),request:o,lines:a,shape:ae,method:o.checkoutFlow?"":W??"",plainMethod:"",plainLines:a,plainShape:ae},pt.current=!1,ln(o.idempotencyKey),!0)}function xr(o){Kr({confirmation:o,lines:Me.current,adsSendTo:e.googleAdsId&&e.googleAdsConversionLabel?`${e.googleAdsId}/${e.googleAdsConversionLabel}`:null}),zo({confirmation:o,lines:Me.current})}async function De(o,c=Oe){if(!c)return;let m=o?async()=>o:A.current.placedRequest?.send;if(c.orderNumber||!m){St(!0),Ge(c);return}await Cr(c.checkoutNumber,m)}async function Cr(o,c){C(),await Do({checkoutNumber:o,resend:c,page:{setConfirming:si,land:Ge,markPaid:()=>St(!0),track:xr,unplaced:tr}})}function Pr(o=Oe){if(o){if(o.orderNumber){Ge(o);return}C(),tr({kind:"processing",checkoutNumber:o.checkoutNumber})}}async function mn(){let o=JSON.stringify([tn.trim(),h,ke,He.trim(),Rt,te,Pe,ue,Y]);if(!(!lt||!Hn||en!=="new"||Vn.current===o))try{await et.createAddress({label:tn.trim()||"Home",contact_name:`${h} ${ke}`.trim(),phone:He.trim(),address:Rt,city:te,zip_code:ue,state:Pe,country:Y}),Vn.current=o,Gn("Address saved to your account.")}catch{Gn("We couldn't save the address to your account \u2014 you can add it under Account \u2192 Addresses.")}}async function Nr(o,c=W,m=!1,S=Fe){de(null);try{if(c==="card"&&e.paymentMethods.includes("card")){let d=await M.createPaymentIntent({idempotencyKey:S});Xe.current=d;let L=o;if(m){let _=await A.current.placedRequest?.send().catch(()=>null);if(_?.orderNumber){Ne("card"),await De(_,o);return}L=wr(o,_)??{...o,expiresAt:null}}Ne("card"),Ve(L),on(!1),wt(d)}else if(c==="paypal"&&e.paymentMethods.includes("paypal"))Ve(o),Ba(!0);else if(c==="afterpay"&&e.paymentMethods.includes("afterpay")){let d=window.location.origin,L=await M.createAfterpayCheckout({idempotencyKey:S,confirmUrl:`${d}/checkout?afterpay=confirm`,cancelUrl:`${d}/checkout?afterpay=cancel`});dt(wn,S,o,L.redirectCheckoutUrl);return}else if(c==="square"&&e.paymentMethods.includes("square"))Ve(o),Ha(!0);else if(c==="gocardless"&&e.paymentMethods.includes("gocardless")){let d=window.location.origin,L=await M.createGocardlessBillingRequest({idempotencyKey:S,confirmUrl:`${d}/checkout?gocardless=confirm`,cancelUrl:`${d}/checkout?gocardless=cancel`});dt(Sn,S,o,L.authorisationUrl);return}else if(c==="zip"&&e.paymentMethods.includes("zip")){let d=window.location.origin,L=await M.createZipCheckout({idempotencyKey:S,redirectUrl:`${d}/checkout?zip=return`});dt(En,S,o,L.redirectUrl);return}else if(c==="klarna"&&e.paymentMethods.includes("klarna")){let d=window.location.origin,L=await M.createKlarnaCheckout({idempotencyKey:S,confirmUrl:`${d}/checkout?klarna=confirm`,cancelUrl:`${d}/checkout?klarna=cancel`});dt(Rn,S,o,L.redirectUrl);return}else if(c==="worldpay"&&e.paymentMethods.includes("worldpay")){let d=window.location.origin,L=await M.createWorldpayCheckout({idempotencyKey:S,successUrl:`${d}/checkout?worldpay=return`,cancelUrl:`${d}/checkout?worldpay=cancel`});dt(On,S,o,L.redirectUrl);return}else Ne(c),Ge(o)}catch(d){if((m||c==="card")&&d instanceof pe&&d.status===409){Ne(c),await De(void 0,o);return}Sr(o,d)}}function wr(o,c){return c&&!c.orderNumber&&c.status==="open"&&c.checkoutNumber===o.checkoutNumber?c:null}function Sr(o,c){se(ya(o,c)),!o.orderNumber&&Bt(c)?(Ae.current=!1,Nt(bt())):de(o)}async function Ci(o){if(!Oe)return;let c=Oe;try{let m=await M.createPaymentIntent({idempotencyKey:Fe}),S=await A.current.placedRequest?.send().catch(()=>null);if(S?.orderNumber){await De(S);return}let d=wr(c,S);Ve(d??{...c,expiresAt:null}),on(o&&d!==null),Xe.current=m,wt(m)}catch(m){if(m instanceof pe&&m.status===409){await De();return}wt(null),Ve(null),Sr(c,m)}}function Pi(){Oe&&(Ae.current=!0,de(Oe),wt(null),Ve(null),on(!1))}return{site:e,logo:t,signInHref:n,items:a,totals:hi,coupon:u,deliveryOptions:f,courierUnavailable:Ka,retryCourier:Da,shippingMethodId:p,setShippingMethodId:b,pickupLocation:P,servedCountries:G,formatMoney:Se,payChoice:W,setPayChoice:le,placing:ne,email:X,setEmail:ee,firstName:h,setFirstName:V,lastName:ke,setLastName:j,company:Be,setCompany:oe,address1:xe,setAddress1:Ce,address2:qe,setAddress2:T,city:te,setCity:_e,postcode:ue,setPostcode:Re,phone:He,setPhone:it,country:Y,setCountry:st,subdivision:Pe,setSubdivision:xt,subdivisions:ct,destination:jn,postcodeLabel:Fa,subdivisionLabel:Ma,me:lt,savedAddresses:Ua,selectedAddressId:en,setSelectedAddressId:Pt,saveAddress:Hn,setSaveAddress:zn,saveLabel:tn,setSaveLabel:Wa,addressSaveNote:ja,lostChangeNote:Ya,idemKey:Fe,confirmation:rn,setConfirmation:Ge,orderError:$a,payment:Jn,paypalStep:Xn,squareStep:Zn,pendingConf:Oe,paid:za,setPaid:St,unpaidOrder:Z,orderLocked:Qn,formLocked:Ga,restoredPrices:dr,quoteFailed:pn,retryQuote:bi,payNote:Va,afterpayConfirming:Xa,gocardlessConfirming:Qa,zipConfirming:ti,klarnaConfirming:ri,worldpayConfirming:ai,cardConfirming:er,checkoutResult:ut,confirmCardPayment:De,cardStillProcessing:Pr,renewCardPayment:Ci,holdRenewed:ci,leaveCardPayment:Pi,checkoutRootRef:or,setCheckoutHeaderEl:li,fillFromAddress:ar,checkoutSignOut:ui,payOptions:Je,noPaymentMethod:di,placeOrder:vi}}var Ca=Ps(null);function Pa({children:e,...t}){let n=Os(t);return he(Ca.Provider,{value:n,children:e})}function we(){let e=Ns(Ca);if(!e)throw new Error("useCheckout must be used inside CheckoutStateProvider");return e}import{useId as Mn}from"react";import{Fragment as fe,jsx as i,jsxs as N}from"react/jsx-runtime";function Sa(){let{email:e,setEmail:t,firstName:n,setFirstName:r,lastName:a,setLastName:s,company:u,setCompany:y,me:f,signInHref:p,checkoutSignOut:b,orderLocked:g,unpaidOrder:v}=we(),k=Mn();return N(Jt,{num:"N\xB0 01",title:"Contact",children:[g&&v&&i(Ls,{orderNumber:v.orderNumber}),i(ie,{label:"Email",htmlFor:k,hint:f?N(fe,{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(fe,{children:["Have an account?"," ",i(ot,{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:re})}),N(La,{children:[i(ie,{label:"First name",children:i("input",{type:"text",value:n,onChange:E=>r(E.target.value),className:re})}),i(ie,{label:"Last name",children:i("input",{type:"text",value:a,onChange:E=>s(E.target.value),className:re})})]}),i(ie,{label:"Company (optional)",children:i("input",{type:"text",value:u,onChange:E=>y(E.target.value),autoComplete:"organization",className:re})})]})}function Ea(){let{pickupLocation:e,servedCountries:t,address1:n,setAddress1:r,address2:a,setAddress2:s,city:u,setCity:y,postcode:f,setPostcode:p,phone:b,setPhone:g,country:v,setCountry:k,subdivision:E,setSubdivision:C,subdivisions:O,destination:H,postcodeLabel:R,subdivisionLabel:P,me:z,savedAddresses:G,selectedAddressId:ce,setSelectedAddressId:Se,saveAddress:W,setSaveAddress:le,saveLabel:Ee,setSaveLabel:Te,fillFromAddress:ne,orderLocked:ve}=we(),X=Mn(),ee=Mn();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(fe,{children:[z!==null&&G.length>0&&N("div",{className:"grid gap-3",children:[G.map(h=>i(Gt,{active:ce===h.id,onClick:()=>{Se(h.id),ne(h)},title:h.label,body:h.formatted_address,price:null},h.id)),i(Gt,{active:ce==="new",onClick:()=>Se("new"),title:"New address",body:null,price:null})]}),i(ie,{label:"Address line 1",children:i("input",{type:"text",value:n,onChange:h=>r(h.target.value),className:re})}),i(ie,{label:"Address line 2",children:i("input",{type:"text",value:a,onChange:h=>s(h.target.value),placeholder:"Apartment, unit, garage bay\u2026",className:re})}),N(La,{cols:"three",children:[i(ie,{label:"City",children:i("input",{type:"text",value:u,onChange:h=>y(h.target.value),className:re})}),i(ie,{label:R,children:i("input",{type:"text",value:f,onChange:h=>p(h.target.value),className:re})}),i(ie,{label:"Country",separate:!0,htmlFor:X,children:i(hn,{id:X,value:v,onChange:h=>k(h.target.value),className:re+" pr-10",style:Na,children:t.map(h=>i("option",{value:h.code,children:h.name},h.code))})})]}),i(ie,{label:P,separate:!0,htmlFor:ee,children:O.length>0?N(hn,{id:ee,value:E,onChange:h=>C(h.target.value),className:re+" pr-10",style:Na,children:[i("option",{value:"",children:"Select\u2026"}),O.map(h=>i("option",{value:h.code||h.name,children:h.name},h.code||h.name))]}):i("input",{id:ee,type:"text",value:E,onChange:h=>C(h.target.value),className:re})})]}),i(ie,{label:"Phone",children:i("input",{type:"tel",value:b,onChange:h=>g(h.target.value),className:re})}),!e&&z!==null&&ce==="new"&&!ve&&N(fe,{children:[i(Is,{checked:W,onChange:le,label:"Save this address to my account"}),W&&i(ie,{label:"Address label",children:i("input",{type:"text",value:Ee,onChange:h=>Te(h.target.value),placeholder:"Home",className:re})})]})]})}function Ra(){let{totals:e,coupon:t,deliveryOptions:n,shippingMethodId:r,setShippingMethodId:a,pickupLocation:s,formatMoney:u,city:y,destination:f,courierUnavailable:p,retryCourier:b}=we();return i(Jt,{num:"N\xB0 03",title:"Shipping",children:N("div",{className:"grid gap-3",children:[n.map(g=>{let v=g.pickupLocation,k=v?[v.address,v.city,v.state,v.zipCode].filter(Boolean).join(", "):null;return i(Gt,{active:r===g.id,onClick:()=>a(g.id),title:v?`${g.name} \u2014 ${v.name}`:g.name,body:v?[k,v.openingHours,v.readyIn,v.instructions,g.description].filter(Boolean).join(" \xB7 "):g.description||null,price:e.freeShipping||g.amount===0?_t:e.deliveryDiscountPercent>0?N(fe,{children:[i("s",{className:"text-fg-dim",children:u(g.amount,e.currency)})," ",u(Ur(g.amount,e.deliveryDiscountPercent),e.currency)]}):u(g.amount,e.currency),tag:g.tag||void 0},g.id)}),p?N("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:[ka," ",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 Oa(){let{payChoice:e,setPayChoice:t,payment:n,payOptions:r,noPaymentMethod:a}=we();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:va}),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==="worldpay"?i("p",{className:"font-mono text-xs uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter your card on Worldpay\u2019s secure page, then be 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 Aa(){let{site:e,items:t,totals:n,coupon:r,formatMoney:a,payChoice:s,placing:u,email:y,orderError:f,payment:p,noPaymentMethod:b,unpaidOrder:g,formLocked:v,restoredPrices:k,quoteFailed:E,retryQuote:C,placeOrder:O}=we(),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(ot,{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(ot,{href:"/wheels",className:"text-accent underline-offset-4 hover:underline",children:"Browse the catalog \u2192"})]}):t.map(P=>i(Ts,{slug:P.slug,name:P.name,qty:P.qty,config:P.config,configSummary:qs(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(Vr,{customerEmail:y,disabled:v})}),N("div",{className:"flex flex-col gap-2 border-t border-line mt-5 px-6 pt-5",children:[i(Ye,{label:"Subtotal",value:H?Ft:a(R?n.serverSubtotal??0:n.subtotal,n.currency)}),(n.discount>0||n.deliverySaving>0)&&r?.valid&&i(Ye,{label:`Coupon \xB7 ${r.code}`,value:i("span",{className:"font-semibold text-green",children:Wr(n,P=>a(P,n.currency))})}),r?.deferred&&i(Ye,{label:`Coupon \xB7 ${r.code}`,value:_r}),r?.valid&&r.effects?.gift&&i(Ye,{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:_t})}),i(Ye,{label:"Shipping",value:n.shippingStatus==="free"?i("span",{className:"font-semibold text-green",children:_t}):jr(n.shippingStatus)??a(n.shipping,n.currency)}),n.tax&&(n.tax.charged?i(Ye,{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(Ye,{label:n.tax.name,value:Dr}):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?Ft:a(n.grand,n.currency)})]}),N("div",{className:"flex flex-col gap-3 px-6 pt-5 pb-6",children:[R&&i(me,{tone:"quiet",children:na}),E&&N(me,{role:"alert",children:[ra," ",i("button",{type:"button",onClick:C,className:"underline transition-colors enabled:hover:text-accent",children:"Try again"})]}),f&&i(me,{role:"alert",children:f}),n.hasUnpricedLine&&N(me,{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||!g&&(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||!g&&(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(fe,{children:["Building order\u2026 ",i("span",{children:"\xB7"})]}):b?N(fe,{children:["No online payment ",i("span",{children:"\xB7"})]}):g?N(fe,{children:[N("span",{children:["Try payment again",N(wa,{children:[" \xB7 ",Ht(g)]})]}),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]}):E?N(fe,{children:["Total not confirmed ",i("span",{children:"\xB7"})]}):n.repricing?N(fe,{children:[Ft," ",i("span",{children:"\xB7"})]}):N(fe,{children:[N("span",{children:[s==="bank"?"Place order":"Continue to payment",N(wa,{children:[" \xB7 ",a(n.grand,n.currency)]})]}),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})})]})]})}var As=" [&: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+As,children:n})}function ot({href:e,className:t="",children:n,...r}){let{placing:a}=we();return a?i("span",{"aria-disabled":"true","aria-label":r["aria-label"],className:t+" pointer-events-none",children:n}):i(We,{href:e,"aria-label":r["aria-label"],className:t,children:n})}function Ls({orderNumber:e}){return i(me,{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:xa(e)})]})})}var Na={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 La({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 Is({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 Ts({slug:e,name:t,qty:n,config:r,configSummary:a,price:s,currency:u}){let{catalog:y}=Mt(),{formatMoney:f}=ge(),p=y.find(C=>C.slug===e),b=p?.spokes??5,g=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??Gr;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(Ar,{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(zr,{spokes:b,mesh:g,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 wa({children:e}){return i("span",{className:"max-[640px]:sr-only",children:e})}function Ye({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 qs(e){return e.map(t=>t.label).join(" \xB7 ")}import{Fragment as J,jsx as l,jsxs as x}from"react/jsx-runtime";function Un(e){return l(Pa,{...e,children:l(Ds,{})})}function Ms({order:e,paid:t}){let{formatMoney:n}=ge();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(J,{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(J,{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 Ks({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(J,{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(J,{children:["The hold on checkout ",n," ran out before your payment arrived. Your payment goes back to your card."]}):e.kind==="processing"?x(J,{children:["Your payment for checkout ",n," is being processed. When it goes through, we will email your order confirmation."]}):x(J,{children:["Thank you \u2014 your payment",e.checkoutNumber?x(J,{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(We,{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 Ds(){let{site:e,logo:t,items:n,placing:r,formLocked:a,email:s,me:u,addressSaveNote:y,lostChangeNote:f,idemKey:p,confirmation:b,setConfirmation:g,payment:v,paypalStep:k,squareStep:E,pendingConf:C,paid:O,setPaid:H,payNote:R,afterpayConfirming:P,gocardlessConfirming:z,zipConfirming:G,klarnaConfirming:ce,worldpayConfirming:Se,cardConfirming:W,checkoutResult:le,confirmCardPayment:Ee,cardStillProcessing:Te,renewCardPayment:ne,holdRenewed:ve,leaveCardPayment:X,checkoutRootRef:ee,setCheckoutHeaderEl:h}=we();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(J,{children:["Thank you \u2014 your payment for order"," ",l("span",{className:"font-mono text-fg",children:b.orderNumber})," has gone through."," "]}):x(J,{children:["Thank you \u2014 your order ",l("span",{className:"font-mono text-fg",children:b.orderNumber})," is being reviewed by our team."," "]}),u?x(J,{children:["Track it under"," ",l(We,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):l(J,{children:"We\u2019ve emailed you a link to set a password and track it."})]}),l(Ms,{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(me,{tone:"bad",role:"alert",children:R.text})}):l("p",{className:"text-sm text-fg-dim",children:R.text})),y&&l("p",{className:"text-sm text-fg-dim",children:y}),!u&&x("p",{className:"text-sm text-fg-dim",children:["You can also"," ",l(We,{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(We,{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"})]}):le?l(Ks,{result:le,lostChangeNote:f}):W?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."})]}):ce?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."})]}):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-xs uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Worldpay \u2014 one moment."})]}):v&&C?l(Us,{payment:v,checkout:C,holdRenewed:ve,onPaid:Ee,onProcessing:Te,onRenew:ne,onBack:X}):k&&C?l($s,{confirmation:C,clientId:e.paypalClientId??"",idemKey:p,onPaid:()=>{H(!0),g(C)},onSkip:()=>g(C)}):E&&C?l(zs,{confirmation:C,applicationId:e.squareApplicationId??"",locationId:e.squareLocationId??"",environment:e.squareEnvironment??"production",idemKey:p,onPaid:()=>{H(!0),g(C)},onSkip:()=>g(C)}):x("div",{ref:ee,className:"bg-bg text-fg",children:[x("header",{ref:h,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(ot,{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(ot,{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(V=>l(Xr,{hideClass:V?"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:V,fitFloorPx:V?Jr:void 0},V?"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(V=>x("span",{className:["relative flex items-center gap-2 transition-colors",V.state==="pending"?"text-fg-dim":"text-fg",V.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[l("span",{className:V.state==="done"?"text-accent font-bold":"",children:V.n}),l("span",{children:V.label})]},V.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(Sa,{}),l(Ea,{}),l(Ra,{})]}),l(Vt,{locked:r,children:l(Oa,{})})]}),l(Aa,{})]}),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:Hr({legalName:e.legalName,foundedYear:e.foundedYear,siteName:e.name})})})]})}function Us({payment:e,checkout:t,holdRenewed:n,onPaid:r,onProcessing:a,onRenew:s,onBack:u}){let{formatMoney:y}=ge(),f=l("span",{className:"text-fg",children:y(Number(e.amount),e.currency)}),p=Ia(()=>jt(e.publishableKey),[e.publishableKey]),b=Ia(()=>eo(),[]),g=Qr(t.expiresAt??"",_s()??"");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(J,{children:["Your order is placed. Pay ",f," by card to confirm it now."]}):n?x(J,{children:["Your hold ran out, so your items are held again",g?` until ${g}`:"",". Enter your card again, then pay ",f,"."]}):x(J,{children:["Your items are held",g?` until ${g}`:"",". Pay ",f," by card to place your order."]})}),l(xn,{stripe:p,options:{clientSecret:e.clientSecret,appearance:b},children:l(js,{payment:e,checkout:t,onPaid:r,onProcessing:a,onRenew:s,onBack:u})},e.clientSecret)]})]})})}var Ws=5;function js({payment:e,checkout:t,onPaid:n,onProcessing:r,onRenew:a,onBack:s}){let{formatMoney:u}=ge(),y=Po(),f=xo(),[p,b]=$e(!1),[g,v]=$e(null),k=at(!1);async function E(){try{return(await y.retrievePaymentIntent(e.clientSecret)).paymentIntent?.status}catch{return}}async function C(R){let P=R;for(let z=0;P==="processing"&&z<Ws;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(!y||!f||p)return;b(!0),v(null),k.current=!0;let R=await y.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?Ie:"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(Ie),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(Ie);return}s()}return x("div",{className:"flex flex-col gap-4",children:[l(No,{}),g&&l(me,{role:"alert",children:g}),l("button",{type:"button",onClick:O,disabled:!y||!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",!y||!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(J,{children:["Processing\u2026 ",l("span",{children:"\xB7"})]}):x(J,{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 Ta="paypal-sdk-js",Kn=null;function Ys(e,t){let n=`${e}|${t}`;if(Kn?.key===n)return Kn.promise;let r=new Promise((a,s)=>{document.getElementById(Ta)?.remove();let u=document.createElement("script");u.id=Ta;let y=new URLSearchParams({"client-id":e,currency:t,intent:"capture"});u.src=`https://www.paypal.com/sdk/js?${y}`,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 Kn={key:n,promise:r},r}function $s({confirmation:e,clientId:t,idemKey:n,onPaid:r,onSkip:a}){let{formatMoney:s}=ge(),u=at(null),[y,f]=$e(!1),[p,b]=$e(null),g=at(r);return g.current=r,_a(()=>{let v=!1,k=null;return Ys(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 M.createPaypalOrder({idempotencyKey:n})).paypalOrderId,onApprove:async C=>{try{if((await M.capturePaypalOrder({idempotencyKey:n,paypalOrderId:C.orderID})).status==="paid"){g.current();return}b("PayPal did not complete the payment. Please try again.")}catch(O){b(O instanceof pe?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."]}),!y&&!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(me,{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 qa="square-web-sdk",Dn=null,Bs=["sandbox","production"];function Hs(e){let t=Fs(Bs,"production",e);if(Dn?.key===t)return Dn.promise;let n=new Promise((r,a)=>{document.getElementById(qa)?.remove();let s=document.createElement("script");s.id=qa,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 Dn={key:t,promise:n},n}function zs({confirmation:e,applicationId:t,locationId:n,environment:r,idemKey:a,onPaid:s,onSkip:u}){let{formatMoney:y}=ge(),f=at(null),p=at(null),b=at(null),[g,v]=$e(!1),[k,E]=$e(!1),[C,O]=$e(null);_a(()=>{let R=!1,P=null;return Hs(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 M.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 pe?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:y(Number(e.grandTotal),e.currency)})," ","by card to confirm it now."]}),!g&&!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(me,{role:"alert",children:C}),l("button",{type:"button",onClick:H,disabled:!g||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",!g||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(J,{children:["Processing\u2026 ",l("span",{children:"\xB7"})]}):x(J,{children:["Pay ",y(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 Gs(){let{settings:e,websiteName:t}=Lr(),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(Yr,{children:Xt(Br,{preview:!0,children:Xt(Un,{site:n,logo:r,preview:!0})})})})}export{Gs as default};
@@ -0,0 +1 @@
1
+ "use client";import{Xh as r}from"./chunk-PDLGLUEV.js";import"./chunk-DI3WYPQW.js";import"./chunk-LN6M3FAM.js";import"./chunk-Z5XT44JU.js";import"./chunk-DO5FAI7I.js";import"./chunk-6YESFEQM.js";import"./chunk-IHBF4FM5.js";import"./chunk-454ZVMST.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-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.
1
+ import{a as P,b as Q}from"./chunk-IHBF4FM5.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
 
@@ -1,4 +1,4 @@
1
- import{f as fs,g as hs}from"./chunk-TNWF32DT.js";import{a as T,b as Sr}from"./chunk-Y6SLVHK3.js";var Sn=T((ud,Ds)=>{"use strict";function Iu(i,e){this.v=i,this.k=e}function ps(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function Lu(i){if(Array.isArray(i))return i}function Du(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,s,o,l=[],a=!0,h=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=s.call(t)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(f){h=!0,n=f}finally{try{if(!a&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw n}}return l}}function Ru(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{f as fs,g as hs}from"./chunk-DO5FAI7I.js";import{a as T,b as Sr}from"./chunk-Y6SLVHK3.js";var Sn=T((ud,Ds)=>{"use strict";function Iu(i,e){this.v=i,this.k=e}function ps(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function Lu(i){if(Array.isArray(i))return i}function Du(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,s,o,l=[],a=!0,h=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=s.call(t)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(f){h=!0,n=f}finally{try{if(!a&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw n}}return l}}function Ru(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nu(i,e){return Lu(i)||Du(i,e)||ku(i,e)||Ru()}function ku(i,e){if(i){if(typeof i=="string")return ps(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ps(i,e):void 0}}function br(i){var e,t;function r(s,o){try{var l=i[s](o),a=l.value,h=a instanceof Iu;Promise.resolve(h?a.v:a).then(function(f){if(h){var _=s==="return"&&a.k?s:"next";if(!a.k||f.done)return r(_,f);f=i[_](f).value}n(!!l.done,f)},function(f){r("throw",f)})}catch(f){n(2,f)}}function n(s,o){s===2?e.reject(o):e.resolve({value:o,done:s}),(e=e.next)?r(e.key,e.arg):t=null}this._invoke=function(s,o){return new Promise(function(l,a){var h={key:s,arg:o,resolve:l,reject:a,next:null};t?t=t.next=h:(e=t=h,r(s,o))})},typeof i.return!="function"&&(this.return=void 0)}br.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},br.prototype.next=function(i){return this._invoke("next",i)},br.prototype.throw=function(i){return this._invoke("throw",i)},br.prototype.return=function(i){return this._invoke("return",i)};var xs=Object.entries,ds=Object.setPrototypeOf,Mu=Object.isFrozen,Fu=Object.getPrototypeOf,qu=Object.getOwnPropertyDescriptor,J=Object.freeze,re=Object.seal,vt=Object.create,Cs=typeof Reflect<"u"&&Reflect,vn=Cs.apply,wn=Cs.construct;J||(J=function(e){return e});re||(re=function(e){return e});vn||(vn=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];return e.apply(t,n)});wn||(wn=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});var Ge=X(Array.prototype.forEach);Array.prototype.indexOf;var ju=X(Array.prototype.lastIndexOf),ms=X(Array.prototype.pop),kt=X(Array.prototype.push);Array.prototype.slice;var Uu=X(Array.prototype.splice),wt=Array.isArray,qt=X(String.prototype.toLowerCase),pn=X(String.prototype.toString),gs=X(String.prototype.match),Mt=X(String.prototype.replace),ys=X(String.prototype.indexOf),Bu=X(String.prototype.trim),zu=X(Number.prototype.toString),Wu=X(Boolean.prototype.toString),_s=typeof BigInt>"u"?null:X(BigInt.prototype.toString),vs=typeof Symbol>"u"?null:X(Symbol.prototype.toString),ue=X(Object.prototype.hasOwnProperty),Ft=X(Object.prototype.toString),oe=X(RegExp.prototype.test),ke=Hu(TypeError);function X(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return vn(i,e,r)}}function Hu(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return wn(i,t)}}function D(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qt;if(ds&&ds(i,null),!wt(e))return i;let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){let s=t(n);s!==n&&(Mu(e)||(e[r]=s),n=s)}i[n]=!0}return i}function Gu(i){for(let e=0;e<i.length;e++)ue(i,e)||(i[e]=null);return i}function he(i){let e=vt(null);for(let r of xs(i)){var t=Nu(r,2);let n=t[0],s=t[1];ue(i,n)&&(wt(s)?e[n]=Gu(s):s&&typeof s=="object"&&s.constructor===Object?e[n]=he(s):e[n]=s)}return e}function Yu(i){switch(typeof i){case"string":return i;case"number":return zu(i);case"boolean":return Wu(i);case"bigint":return _s?_s(i):"0";case"symbol":return vs?vs(i):"Symbol()";case"undefined":return Ft(i);case"function":case"object":{if(i===null)return Ft(i);let e=i,t=me(e,"toString");if(typeof t=="function"){let r=t(e);return typeof r=="string"?r:Ft(r)}return Ft(i)}default:return Ft(i)}}function me(i,e){for(;i!==null;){let r=qu(i,e);if(r){if(r.get)return X(r.get);if(typeof r.value=="function")return X(r.value)}i=Fu(i)}function t(){return null}return t}function $u(i){try{return oe(i,""),!0}catch{return!1}}var ws=J(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dn=J(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mn=J(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Vu=J(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gn=J(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qu=J(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ss=J(["#text"]),bs=J(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),yn=J(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ts=J(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tr=J(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xu=re(/{{[\w\W]*|^[\w\W]*}}/g),Ku=re(/<%[\w\W]*|^[\w\W]*%>/g),Ju=re(/\${[\w\W]*/g),Zu=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),el=re(/^aria-[\-\w]+$/),Es=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tl=re(/^(?:\w+script|data):/i),rl=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nl=re(/^html$/i),il=re(/^[a-z][.\w]*(-[.\w]+)+$/i),Os=re(/<[/\w!]/g),As=re(/<[/\w]/g),sl=re(/<\/no(script|embed|frames)/i),ol=re(/\/>/i),fe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Is=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],al=J(D({},Is)),ul=(function(){let i={};return Ge(Is,e=>{i[e]=re(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),J(i)})(),ll=function(){return typeof window>"u"?null:window},cl=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Ps=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Me=function(e,t,r,n){return ue(e,t)&&wt(e[t])?D(n.base?he(n.base):{},e[t],n.transform):r},_n=function(e,t,r){let n=ue(e,t)?e[t]:void 0;return n&&typeof n=="object"?he(n):r()};function Ls(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ll(),e=y=>Ls(y);if(e.version="3.4.16",e.removed=[],!i||!i.document||i.document.nodeType!==fe.document||!i.Element)return e.isSupported=!1,e;let t=i.document,r=t,n=r.currentScript;i.DocumentFragment;let s=i.HTMLTemplateElement,o=i.Node,l=i.Element,a=i.NodeFilter;i.NamedNodeMap===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;let h=i.DOMParser,f=i.trustedTypes,_=l.prototype,p=me(_,"cloneNode"),d=me(_,"remove"),v=me(_,"removeAttributeNode"),x=me(_,"nextSibling"),E=me(_,"childNodes"),U=me(_,"parentNode"),Y=me(_,"shadowRoot"),K=me(_,"attributes"),k=o&&o.prototype?me(o.prototype,"nodeType"):null,V=o&&o.prototype?me(o.prototype,"nodeName"):null,Q=o&&o.prototype?me(o.prototype,"ownerDocument"):null,ee=function(u){return k?k(u):u.nodeType},Se=function(u){return V?V(u):u.nodeName};if(typeof s=="function"){let y=t.createElement("template");y.content&&y.content.ownerDocument&&(t=y.content.ownerDocument)}let te,pe="",Lt,ar=!1,Be=0,Ni=function(){if(Be>0)throw ke('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ct=function(u){Ni(),Be++;try{return te.createHTML(u)}finally{Be--}},ru=function(u){Ni(),Be++;try{return te.createScriptURL(u)}finally{Be--}},nu=function(){return ar||(Lt=cl(f,n),ar=!0),Lt},ur=t,Xr=ur.implementation,ki=ur.createNodeIterator,iu=ur.createDocumentFragment,su=ur.getElementsByTagName,ou=r.importNode,B=Ps();e.isSupported=typeof xs=="function"&&typeof U=="function"&&Xr&&Xr.createHTMLDocument!==void 0;let au=Xu,uu=Ku,lu=Ju,cu=Zu,fu=el,hu=tl,Mi=rl,pu=il,Fi=Es,z=null,Kr=D({},[...ws,...dn,...mn,...gn,...Ss]),W=null,Jr=D({},[...bs,...yn,...Ts,...Tr]),be=Object.seal(vt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,qi=null,De=Object.seal(vt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ji=!0,Zr=!0,Ui=!1,Bi=!0,Re=!1,ze=!0,We=!1,en=!1,lr=null,cr=null,tn=!1,ft=!1,fr=!1,hr=!1,zi=!0,Wi=!1,Hi="user-content-",rn=!0,nn=!1,ht={},pt=null,Gi=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Yi=null,$i=D({},["audio","video","img","source","image","track"]),Vi=null,Qi=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pr="http://www.w3.org/1998/Math/MathML",dr="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml",dt=Te,sn=!1,on=null,du=D({},[pr,dr,Te],pn),Xi=J(["mi","mo","mn","ms","mtext"]),an=D({},Xi),Ki=J(["annotation-xml"]),un=D({},Ki),mu=D({},["title","style","font","a","script"]),Rt=null,gu=["application/xhtml+xml","text/html"],yu="text/html",$=null,mt=null,_u=t.createElement("form"),Ji=function(u){return u instanceof RegExp||u instanceof Function},ln=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(mt&&mt===u)return;(!u||typeof u!="object")&&(u={}),u=he(u),Rt=gu.indexOf(u.PARSER_MEDIA_TYPE)===-1?yu:u.PARSER_MEDIA_TYPE,$=Rt==="application/xhtml+xml"?pn:qt,z=Me(u,"ALLOWED_TAGS",Kr,{transform:$}),W=Me(u,"ALLOWED_ATTR",Jr,{transform:$}),on=Me(u,"ALLOWED_NAMESPACES",du,{transform:pn}),Vi=Me(u,"ADD_URI_SAFE_ATTR",Qi,{transform:$,base:Qi}),Yi=Me(u,"ADD_DATA_URI_TAGS",$i,{transform:$,base:$i}),pt=Me(u,"FORBID_CONTENTS",Gi,{transform:$}),Dt=Me(u,"FORBID_TAGS",he({}),{transform:$}),qi=Me(u,"FORBID_ATTR",he({}),{transform:$}),ht=ue(u,"USE_PROFILES")?u.USE_PROFILES&&typeof u.USE_PROFILES=="object"?he(u.USE_PROFILES):u.USE_PROFILES:!1,ji=u.ALLOW_ARIA_ATTR!==!1,Zr=u.ALLOW_DATA_ATTR!==!1,Ui=u.ALLOW_UNKNOWN_PROTOCOLS||!1,Bi=u.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=u.SAFE_FOR_TEMPLATES||!1,ze=u.SAFE_FOR_XML!==!1,We=u.WHOLE_DOCUMENT||!1,ft=u.RETURN_DOM||!1,fr=u.RETURN_DOM_FRAGMENT||!1,hr=u.RETURN_TRUSTED_TYPE||!1,tn=u.FORCE_BODY||!1,zi=u.SANITIZE_DOM!==!1,Wi=u.SANITIZE_NAMED_PROPS||!1,rn=u.KEEP_CONTENT!==!1,nn=u.IN_PLACE||!1,Fi=$u(u.ALLOWED_URI_REGEXP)?u.ALLOWED_URI_REGEXP:Es,dt=typeof u.NAMESPACE=="string"?u.NAMESPACE:Te,an=_n(u,"MATHML_TEXT_INTEGRATION_POINTS",()=>D({},Xi)),un=_n(u,"HTML_INTEGRATION_POINTS",()=>D({},Ki));let c=_n(u,"CUSTOM_ELEMENT_HANDLING",()=>vt(null));if(be=vt(null),ue(c,"tagNameCheck")&&Ji(c.tagNameCheck)&&(be.tagNameCheck=c.tagNameCheck),ue(c,"attributeNameCheck")&&Ji(c.attributeNameCheck)&&(be.attributeNameCheck=c.attributeNameCheck),ue(c,"allowCustomizedBuiltInElements")&&typeof c.allowCustomizedBuiltInElements=="boolean"&&(be.allowCustomizedBuiltInElements=c.allowCustomizedBuiltInElements),re(be),Re&&(Zr=!1),fr&&(ft=!0),ht&&(z=D({},Ss),W=vt(null),ht.html===!0&&(D(z,ws),D(W,bs)),ht.svg===!0&&(D(z,dn),D(W,yn),D(W,Tr)),ht.svgFilters===!0&&(D(z,mn),D(W,yn),D(W,Tr)),ht.mathMl===!0&&(D(z,gn),D(W,Ts),D(W,Tr))),De.tagCheck=null,De.attributeCheck=null,ue(u,"ADD_TAGS")&&(typeof u.ADD_TAGS=="function"?De.tagCheck=u.ADD_TAGS:wt(u.ADD_TAGS)&&(z===Kr&&(z=he(z)),D(z,u.ADD_TAGS,$))),ue(u,"ADD_ATTR")&&(typeof u.ADD_ATTR=="function"?De.attributeCheck=u.ADD_ATTR:wt(u.ADD_ATTR)&&(W===Jr&&(W=he(W)),D(W,u.ADD_ATTR,$))),ue(u,"ADD_FORBID_CONTENTS")&&wt(u.ADD_FORBID_CONTENTS)&&(pt===Gi&&(pt=he(pt)),D(pt,u.ADD_FORBID_CONTENTS,$)),rn&&(z["#text"]=!0),We&&D(z,["html","head","body"]),z.table&&(D(z,["tbody"]),delete Dt.tbody),u.TRUSTED_TYPES_POLICY){if(typeof u.TRUSTED_TYPES_POLICY.createHTML!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof u.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let g=te;te=u.TRUSTED_TYPES_POLICY;try{pe=ct("")}catch(w){throw te=g,w}}else u.TRUSTED_TYPES_POLICY===null?(te=void 0,pe=""):(te===void 0&&(te=nu()),te&&typeof pe=="string"&&(pe=ct("")));J&&J(u),mt=u},Zi=D({},[...dn,...mn,...Vu]),es=D({},[...gn,...Qu]),vu=function(u,c,g){return c.namespaceURI===Te?u==="svg":c.namespaceURI===pr?u==="svg"&&(g==="annotation-xml"||an[g]):!!Zi[u]},wu=function(u,c,g){return c.namespaceURI===Te?u==="math":c.namespaceURI===dr?u==="math"&&un[g]:!!es[u]},Su=function(u,c,g){return c.namespaceURI===dr&&!un[g]||c.namespaceURI===pr&&!an[g]?!1:!es[u]&&(mu[u]||!Zi[u])},bu=function(u){let c=U(u);(!c||!c.tagName)&&(c={namespaceURI:dt,tagName:"template"});let g=qt(u.tagName),w=qt(c.tagName);return on[u.namespaceURI]?u.namespaceURI===dr?vu(g,c,w):u.namespaceURI===pr?wu(g,c,w):u.namespaceURI===Te?Su(g,c,w):!!(Rt==="application/xhtml+xml"&&on[u.namespaceURI]):!1},Ne=function(u){kt(e.removed,{element:u});try{U(u).removeChild(u)}catch{if(d(u),!U(u))throw ke("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ts=function(u,c,g){try{v(u,c)}catch{try{u.removeAttribute(g)}catch{}}},mr=function(u){gr(u);let c=E(u);if(c){let w=[];Ge(c,A=>{kt(w,A)}),Ge(w,A=>{try{d(A)}catch{}})}let g=K(u);if(g)for(let w=g.length-1;w>=0;--w){let A=g[w],C=A&&A.name;typeof C=="string"&&ts(u,A,C)}},He=function(u,c,g){if(!g)try{g=c.getAttributeNode(u)}catch{g=null}kt(e.removed,{attribute:g||null,from:c});try{g?v(c,g):c.removeAttribute(u)}catch{try{c.removeAttribute(u)}catch{}}if(u==="is")if(ft||fr)try{Ne(c)}catch{}else try{c.setAttribute(u,"")}catch{}},Tu=function(u){let c=K(u);if(c)for(let g=c.length-1;g>=0;--g){let w=c[g],A=w&&w.name;typeof A!="string"||W[$(A)]||ts(u,w,A)}},gr=function(u){let c=[u];for(;c.length>0;){let g=c.pop();ee(g)===fe.element&&Tu(g);let w=E(g);if(w)for(let A=w.length-1;A>=0;--A)c.push(w[A])}},rs=function(u,c){return ze?u==="patchsrc"?!0:u==="for"&&c!=="label"&&c!=="output":!1},Eu=function(u){if(!ze)return;let c=[u];for(;c.length>0;){let g=c.pop(),w=ee(g);if(w===fe.processingInstruction||w===fe.comment&&oe(As,g.data)){try{d(g)}catch{}continue}if(w===fe.element){let C=g,L=$(Se(g));try{C.hasAttribute&&C.hasAttribute("patchsrc")&&C.removeAttribute("patchsrc"),C.hasAttribute&&C.hasAttribute("for")&&rs("for",L)&&C.removeAttribute("for")}catch{}}let A=E(g);if(A)for(let C=A.length-1;C>=0;--C)c.push(A[C])}},ns=function(u){let c=null,g=null;if(tn)u="<remove></remove>"+u;else{let C=gs(u,/^[\r\n\t ]+/);g=C&&C[0]}Rt==="application/xhtml+xml"&&dt===Te&&(u='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+u+"</body></html>");let w=te?ct(u):u;if(dt===Te)try{c=new h().parseFromString(w,Rt)}catch{}if(!c||!c.documentElement){c=Xr.createDocument(dt,"template",null);try{c.documentElement.innerHTML=sn?pe:w}catch{}}let A=c.body||c.documentElement;return u&&g&&A.insertBefore(t.createTextNode(g),A.childNodes[0]||null),dt===Te?su.call(c,We?"html":"body")[0]:We?c.documentElement:A},is=function(u){let c=Q?Q(u):u.ownerDocument;return ki.call(c||u,u,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},yr=function(u){return u=Mt(u,au," "),u=Mt(u,uu," "),u=Mt(u,lu," "),u},cn=function(u){var c;u.normalize();let g=Q?Q(u):u.ownerDocument,w=ki.call(g||u,u,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null),A=w.nextNode();for(;A;)A.data=yr(A.data),A=w.nextNode();let C=(c=u.querySelectorAll)===null||c===void 0?void 0:c.call(u,"template");C&&Ge(C,L=>{gt(L.content)&&cn(L.content)})},_r=function(u){let c=V?V(u):null;return typeof c!="string"||$(c)!=="form"?!1:typeof u.nodeName!="string"||typeof u.textContent!="string"||typeof u.removeChild!="function"||u.attributes!==K(u)||typeof u.removeAttribute!="function"||typeof u.removeAttributeNode!="function"||typeof u.getAttributeNode!="function"||typeof u.setAttribute!="function"||typeof u.namespaceURI!="string"||typeof u.insertBefore!="function"||typeof u.hasChildNodes!="function"||u.nodeType!==k(u)||u.childNodes!==E(u)},gt=function(u){if(!k||typeof u!="object"||u===null)return!1;try{return k(u)===fe.documentFragment}catch{return!1}},Nt=function(u){if(!k||typeof u!="object"||u===null)return!1;try{return typeof k(u)=="number"}catch{return!1}};function Ee(y,u,c){y.length!==0&&Ge(y,g=>{g.call(e,u,c,mt)})}let Ou=function(u,c){return!!(ze&&u.hasChildNodes()&&!Nt(u.firstElementChild)&&oe(Os,u.textContent)&&oe(Os,u.innerHTML)||ze&&u.namespaceURI===Te&&al[c]&&(Nt(u.firstElementChild)||typeof u.textContent=="string"&&oe(ul[c],u.textContent))||u.nodeType===fe.processingInstruction||ze&&u.nodeType===fe.comment&&oe(As,u.data))},vr=function(u,c){if(u instanceof RegExp)return oe(u,c);if(u instanceof Function){for(var g=arguments.length,w=new Array(g>2?g-2:0),A=2;A<g;A++)w[A-2]=arguments[A];return!!u(c,...w)}return!1},Au=function(u,c,g){if(!Dt[c]&&us(c)&&vr(be.tagNameCheck,c))return!1;if(rn&&!pt[c]){let w=U(u),A=E(u);if(A&&w){let C=A.length;for(let L=C-1;L>=0;--L){let G=u===g?p(A[L],!0):A[L];w.insertBefore(G,x(u))}}}return Ne(u),!0},ss=function(u,c,g,w){return u.length===0?c:c===g||c===w?he(c):c},yt=function(u,c){return u===c||U(u)!==null?!1:(nn&&gr(u),!0)},os=function(u,c){if(Ee(B.beforeSanitizeElements,u,null),yt(u,c))return!0;if(_r(u))return Ne(u),!0;let g=$(Se(u));if(z=ss(B.uponSanitizeElement,z,Kr,lr),Ee(B.uponSanitizeElement,u,{tagName:g,allowedTags:z}),yt(u,c))return!0;if(Ou(u,g))return Ne(u),!0;if(Dt[g]||!(De.tagCheck instanceof Function&&De.tagCheck(g))&&!z[g]){let w=Au(u,g,c);return w===!1&&(Ee(B.afterSanitizeElements,u,null),yt(u,c))?!0:w}if(ee(u)===fe.element&&!bu(u)||(g==="noscript"||g==="noembed"||g==="noframes")&&oe(sl,u.innerHTML))return Ne(u),!0;if(Re&&u.nodeType===fe.text){let w=yr(u.textContent);u.textContent!==w&&(kt(e.removed,{element:u.cloneNode()}),u.textContent=w)}return Ee(B.afterSanitizeElements,u,null),yt(u,c)},as=function(u,c,g){if(qi[c]||rs(c,u)||zi&&(c==="id"||c==="name")&&(g in t||g in _u))return!1;let w=W[c]||De.attributeCheck instanceof Function&&De.attributeCheck(c,u);return Zr&&oe(cu,c)||ji&&oe(fu,c)?!0:w?Vi[c]||oe(Fi,Mt(g,Mi,""))||(c==="src"||c==="xlink:href"||c==="href")&&u!=="script"&&ys(g,"data:")===0&&Yi[u]||Ui&&!oe(hu,Mt(g,Mi,""))?!0:!g:us(u)&&vr(be.tagNameCheck,u)&&vr(be.attributeNameCheck,c,u)||c==="is"&&be.allowCustomizedBuiltInElements&&vr(be.tagNameCheck,g)},Pu=D({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),us=function(u){return!Pu[qt(u)]&&oe(pu,u)},xu=function(u,c,g,w){if(te&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!g)switch(f.getAttributeType(u,c)){case"TrustedHTML":return ct(w);case"TrustedScriptURL":return ru(w)}return w},Cu=function(u,c,g,w){try{return g?u.setAttributeNS(g,c,w):u.setAttribute(c,w),_r(u)?(Ne(u),!1):!0}catch{return He(c,u),!1}},ls=function(u,c){if(Ee(B.beforeSanitizeAttributes,u,null),yt(u,c))return;let g=u.attributes;if(!g||_r(u))return;W=ss(B.uponSanitizeAttribute,W,Jr,cr);let w={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0},A=g.length,C=$(u.nodeName);for(;A--;){let L=g[A],G=L.name,de=L.namespaceURI,ce=L.value,_t=$(G),hn=ce,ae=G==="value"?hn:Bu(hn),cs=!1;if(w.attrName=_t,w.attrValue=ae,w.keepAttr=!0,w.forceKeepAttr=void 0,Ee(B.uponSanitizeAttribute,u,w),ae=w.attrValue,Wi&&(_t==="id"||_t==="name")&&ys(ae,Hi)!==0&&(He(G,u,L),ae=Hi+ae,cs=!0),ze&&oe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ae)){He(G,u,L);continue}if(_t==="attributename"&&gs(ae,"href")){He(G,u,L);continue}if(!w.forceKeepAttr){if(!w.keepAttr){He(G,u,L);continue}if(!Bi&&oe(ol,ae)){He(G,u,L);continue}if(Re&&(ae=yr(ae)),!as(C,_t,ae)){He(G,u,L);continue}ae=xu(C,_t,de,ae),ae!==hn&&Cu(u,G,de,ae)&&cs&&ms(e.removed)}}Ee(B.afterSanitizeAttributes,u,null),yt(u,c)},wr=function(u){let c=null,g=is(u);for(Ee(B.beforeSanitizeShadowDOM,u,null);c=g.nextNode();)if(Ee(B.uponSanitizeShadowNode,c,null),os(c,u),ls(c,u),gt(c.content)&&wr(c.content),ee(c)===fe.element){let w=Y(c);gt(w)&&(fn(w),wr(w))}Ee(B.afterSanitizeShadowDOM,u,null)},fn=function(u){let c=[{node:u,shadow:null}];for(;c.length>0;){let g=c.pop();if(g.shadow){wr(g.shadow);continue}let w=g.node,A=ee(w)===fe.element,C=E(w);if(C)for(let L=C.length-1;L>=0;--L)c.push({node:C[L],shadow:null});if(A){let L=V?V(w):null;if(typeof L=="string"&&$(L)==="template"){let G=w.content;gt(G)&&c.push({node:G,shadow:null})}}if(A){let L=Y(w);gt(L)&&c.push({node:null,shadow:L},{node:L,shadow:null})}}};return e.sanitize=function(y){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=null,g=null,w=null,A=null;if(sn=!y,sn&&(y="<!-->"),typeof y!="string"&&!Nt(y)&&(y=Yu(y),typeof y!="string"))throw ke("dirty is not a string, aborting");if(!e.isSupported)return y;en?(z=lr,W=cr):ln(u),(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&(z=he(z)),B.uponSanitizeAttribute.length>0&&(W=he(W)),e.removed=[];let C=nn&&typeof y!="string"&&Nt(y);if(C){Eu(y);let de=Se(y);if(typeof de=="string"){let ce=$(de);if(!z[ce]||Dt[ce])throw mr(y),ke("root node is forbidden and cannot be sanitized in-place")}if(_r(y))throw mr(y),ke("root node is clobbered and cannot be sanitized in-place");try{fn(y)}catch(ce){throw mr(y),ce}}else if(Nt(y))c=ns("<!---->"),g=c.ownerDocument.importNode(y,!0),g.nodeType===fe.element&&g.nodeName==="BODY"||g.nodeName==="HTML"?c=g:c.appendChild(g),fn(c);else{if(!ft&&!Re&&!We&&y.indexOf("<")===-1)return te&&hr?ct(y):y;if(c=ns(y),!c)return ft?null:hr?pe:""}c&&tn&&Ne(c.firstChild);let L=C?y:c;try{let de=is(L);for(;w=de.nextNode();)os(w,L),ls(w,L),gt(w.content)&&wr(w.content)}catch(de){throw C&&(mr(y),Ge(e.removed,ce=>{ce.element&&gr(ce.element)})),de}if(C){let de=!1;if(Ge(e.removed,ce=>{ce.element&&(ce.element===y&&(de=!0),gr(ce.element))}),de)throw ke("a node selected for removal could not be safely returned; refusing to sanitize in place");return Re&&cn(y),y}if(ft){if(Re&&cn(c),fr)for(A=iu.call(c.ownerDocument);c.firstChild;)A.appendChild(c.firstChild);else A=c;return(W.shadowroot||W.shadowrootmode)&&(A=ou.call(r,A,!0)),A}let G=We?c.outerHTML:c.innerHTML;return We&&z["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&oe(nl,c.ownerDocument.doctype.name)&&(G="<!DOCTYPE "+c.ownerDocument.doctype.name+`>
3
3
  `+G),Re&&(G=yr(G)),te&&hr?ct(G):G},e.setConfig=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ln(y),en=!0,lr=z,cr=W},e.clearConfig=function(){mt=null,en=!1,lr=null,cr=null,te=Lt,pe=""},e.isValidAttribute=function(y,u,c){mt||ln({});let g=$(y),w=$(u);return as(g,w,c)},e.addHook=function(y,u){typeof u=="function"&&ue(B,y)&&kt(B[y],u)},e.removeHook=function(y,u){if(ue(B,y)){if(u!==void 0){let c=ju(B[y],u);return c===-1?void 0:Uu(B[y],c,1)[0]}return ms(B[y])}},e.removeHooks=function(y){ue(B,y)&&(B[y]=[])},e.removeAllHooks=function(){B=Ps()},e}var fl=Ls();Ds.exports=fl});var Ns=T((ld,bn)=>{"use strict";var P=String,Rs=function(){return{isColorSupported:!1,reset:P,bold:P,dim:P,italic:P,underline:P,inverse:P,hidden:P,strikethrough:P,black:P,red:P,green:P,yellow:P,blue:P,magenta:P,cyan:P,white:P,gray:P,bgBlack:P,bgRed:P,bgGreen:P,bgYellow:P,bgBlue:P,bgMagenta:P,bgCyan:P,bgWhite:P,blackBright:P,redBright:P,greenBright:P,yellowBright:P,blueBright:P,magentaBright:P,cyanBright:P,whiteBright:P,bgBlackBright:P,bgRedBright:P,bgGreenBright:P,bgYellowBright:P,bgBlueBright:P,bgMagentaBright:P,bgCyanBright:P,bgWhiteBright:P}};bn.exports=Rs();bn.exports.createColors=Rs});var Tn=T(()=>{"use strict"});var Er=T((hd,Fs)=>{"use strict";var ks=Ns(),Ms=Tn(),jt=class i extends Error{constructor(e,t,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=ks.isColorSupported);let r=f=>f,n=f=>f,s=f=>f;if(e){let{bold:f,gray:_,red:p}=ks.createColors(!0);n=d=>f(p(d)),r=d=>_(d),Ms&&(s=d=>Ms(d))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),h=String(a).length;return o.slice(l,a).map((f,_)=>{let p=l+1+_,d=" "+(" "+p).slice(-h)+" | ";if(p===this.line){if(f.length>160){let x=20,E=typeof this.endColumn=="number"?this.endColumn:this.column,U=Math.max(0,this.column-x),Y=Math.max(this.column+x,E+x),K=f.slice(U,Y),k=r(d.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return n(">")+r(d)+s(K)+`
4
4
  `+k+n("^")}let v=r(d.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(d)+s(f)+`