efficient-storefront-blocks 0.93.0 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/chunks/{EditorPreviewCheckout-FSEFJZSO.js → EditorPreviewCheckout-OPDSFBJH.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-N76XROIW.js → SiteEditorProvider-ZP6NAWYT.js} +1 -1
- package/dist/chunks/{chunk-ITIVEB2I.js → chunk-ATCBSW73.js} +1 -1
- package/dist/chunks/{chunk-NSW5PCGW.js → chunk-CEFKTE5A.js} +1 -1
- package/dist/chunks/chunk-JKJ76CRT.js +388 -0
- package/dist/chunks/chunk-JTDOMQMQ.js +1 -0
- package/dist/chunks/{fitment-data-2SHEWSDK.js → fitment-data-IPAMN5IH.js} +1 -1
- package/dist/editor/components/GalleryPicturesSource.js +1 -1
- package/dist/editor/components/GalleryProductBinding.js +1 -1
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/storefront-document.js +1 -1
- package/dist/editor/lib/storefront-editor-words-kept.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +3 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +33 -33
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +37 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/DefaultProductHero.d.ts +12 -0
- package/dist/render/components/DefaultProductHero.js +1 -0
- package/dist/render/components/GridCardTemplate.d.ts +7 -4
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductHeroPanel.d.ts +2 -1
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/card-pieces/CardBuyButton.js +1 -1
- package/dist/render/components/card-pieces/CardName.js +1 -1
- package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
- package/dist/render/components/card-pieces/CardSizes.d.ts +10 -2
- package/dist/render/components/card-pieces/CardSizes.js +1 -1
- package/dist/render/components/card-pieces/CardSpecs.d.ts +2 -0
- package/dist/render/components/card-pieces/CardSpecs.js +1 -1
- package/dist/render/components/card-pieces/ProductCardState.d.ts +14 -4
- package/dist/render/components/card-pieces/ProductCardState.js +1 -1
- package/dist/render/components/catalog/ShopperChips.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/lib/content/hero-option-seed.d.ts +28 -0
- package/dist/render/lib/content/hero-option-seed.js +1 -0
- package/dist/render/lib/document/blocks/commerce/ProductEyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +4 -0
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductSpecs/render.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/sections/filter-option-rows.d.ts +14 -0
- package/dist/render/lib/sections/filter-option-rows.js +1 -1
- package/dist/render/lib/sections/product-pictures.d.ts +2 -2
- package/dist/render/lib/sections/product-pictures.js +1 -1
- package/dist/render/lib/wheels/plp-hydrate.d.ts +4 -1
- package/dist/render/lib/wheels/plp-hydrate.js +1 -1
- package/dist/words.d.ts +4 -0
- package/dist/words.js +2 -2
- package/package.json +3 -3
- package/dist/chunks/chunk-IZEIMAJI.js +0 -1
- package/dist/chunks/chunk-OERUEODX.js +0 -388
- package/dist/render/components/TyrePlpCard.d.ts +0 -20
- package/dist/render/components/TyrePlpCard.js +0 -1
- package/dist/render/components/TyreSummaryCard.d.ts +0 -12
- package/dist/render/components/TyreSummaryCard.js +0 -1
- /package/dist/chunks/{chunk-OERUEODX.js.LEGAL.txt → chunk-JKJ76CRT.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-XYG76Y4H.js → chunk-LRLOANKA.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.94.0 - 2026-11-09
|
|
4
|
+
|
|
5
|
+
**A major for hosts (major version zero, so a minor number):** the peers move to `efficient-web-builder` `^62.0.0` (was `^61.0.0`) (#448) and `efficient-easel` `^30.1.0` (was `^30.0.0`) (#446). `efficient-shell` `^12.18.0` does not change. Exports are removed (#447), and a hero with no stored node draws no option rows (#448). From main at `61c3c036`: #445, #446, #447, #448, #449, #452.
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- Install web-builder 62.0.0 and easel 30.1.0 or later, together (#446, #448). This release does not need web-builder 63; the storefront takes 63 only in the PR that mounts `ThemeLightInkProvider` (web-builder #651).
|
|
9
|
+
- A host that vendors `src/` (the storefront) re-vendors with `node scripts/sync-storefront-blocks.mjs`. In the same bump:
|
|
10
|
+
- `app/wheels/[slug]/PDPClient.tsx:156`: replace the bare `<ProductHeroPanel product selection onLightbox/>` with `<DefaultProductHero product={product} selection={sel} onLightbox={openLightbox} />` (from `components/DefaultProductHero`). Without it the wheel page shows no finish or size options (#448).
|
|
11
|
+
- `scripts/test-cart-catalog-gate.tsx` lines 210 and 427 import `TyrePlpCard`: port them to the card template (#447).
|
|
12
|
+
- Run `test-chosen-option-announced.tsx` and `test-theme-ink-tokens.ts:744` (#448).
|
|
13
|
+
- The pinned-section track reads `--sf-pin-on` and `--sf-pin-length` per view from this release (#449). It is the host rule that web-builder 64.0.0 (Scroll effects, Screens) needs: take this release before web-builder 64.
|
|
14
|
+
- No stored page moves.
|
|
15
|
+
|
|
16
|
+
- **BREAKING: peer `efficient-web-builder` `^62.0.0`** (#448). Peer and dev, here and in `package/`.
|
|
17
|
+
- **BREAKING: peer `efficient-easel` `^30.1.0`** (#446): the Gallery's media zones and their words come from easel `MEDIA_ZONES` / `MEDIA_ZONE_LABELS`. The Gallery Showcase hints say "Lifestyle photos".
|
|
18
|
+
- **BREAKING: `TyreSummaryCard`, `TyrePlpCard`, `TyrePlpCardProps` and `CARD_CHIP_LIST_CLASS` are removed** (#447). A tyre card draws through the product card template: `GridMixedCards` takes `tyreOf` (and `tyreFit`) in place of `isWheel` / `other`. Use `CARD_CHIP_LINE_CLASS`. `CARD_CHIP_ROW_CLASS` and `CARD_CHIP_CLASS` change value; `CardSizes` draws whole chips and one "+N".
|
|
19
|
+
- **BREAKING: the Product Hero's option rows draw through the Card list item action** (#448): each option is a copy of the hero's `optionTemplate` slot (Box and Text). `ProductHeroPanel` mounted with no node draws NO option rows; use `DefaultProductHero`.
|
|
20
|
+
- **The pinned section passes each view's Screens and on/off to the shell's track** (#449): `--sf-pin-on` -> `--motion-pin-on`, `--sf-pin-length` -> `--motion-pin-length`, with `-tablet` / `-phone`. No default here; the shell's default holds.
|
|
21
|
+
- **The editor canvas keeps every hover photo on its rows** (#445): `hydrateWheelsListing(data, rows, { everyHoverPhoto })`. A published page ships only the zone its cards show, as before.
|
|
22
|
+
- **The Gallery Showcase source falls back to `{}` for a missing `mediaGroups`** (#452): editor only.
|
|
23
|
+
|
|
3
24
|
## 0.93.0 - 2026-11-09
|
|
4
25
|
|
|
5
26
|
**A major for hosts (major version zero, so a minor number):** the peers move to `efficient-web-builder` `^61.0.0` (was `^59.3.0`), `efficient-easel` `^30.0.0` (was `^29.1.0`) and `efficient-shell` `^12.18.0` (was `^12.17.0`) (#440, #443). The render subpath `render/lib/document/published-chrome-data` is removed (#431). `StorefrontBlocksPhrase` loses seven keys (#440, #441). From main at `833462c1`: #431, #440, #442, #443, #439, #441.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{$ as mr,M as or,N as ir,O as sr,P as cr,Q as lr,R as be,T as ut,U as ur,V as dr,W as Pt,X as pr,Z as zt,aa as fr,b as nr,ba as gr,c as Ht,d as rr,e as ar,ga as yr,ha as Ke,ma as hr,na as Xe,qa as Gt,sa as ce,ta as re,y as wt}from"./chunk-
|
|
1
|
+
"use client";import{$ as mr,M as or,N as ir,O as sr,P as cr,Q as lr,R as be,T as ut,U as ur,V as dr,W as Pt,X as pr,Z as zt,aa as fr,b as nr,ba as gr,c as Ht,d as rr,e as ar,ga as yr,ha as Ke,ma as hr,na as Xe,qa as Gt,sa as ce,ta as re,y as wt}from"./chunk-ATCBSW73.js";import{i as de,o as Ve,v as U}from"./chunk-CEFKTE5A.js";import{lb as Qn,nb as he,rb as er}from"./chunk-JTDOMQMQ.js";import{k as tr,l as lt,m as ue}from"./chunk-LRLOANKA.js";import{a as Bt,b as uo}from"./chunk-Y6SLVHK3.js";var xr=Bt((ki,vr)=>{"use strict";var mo="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";vr.exports=mo});var Pr=Bt((wi,wr)=>{"use strict";var fo=xr();function Cr(){}function kr(){}kr.resetWarningCache=Cr;wr.exports=function(){function e(r,o,s,u,m,f){if(f!==fo){var d=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 d.name="Invariant Violation",d}}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:kr,resetWarningCache:Cr};return n.PropTypes=n,n}});var Sr=Bt((Si,Nr)=>{"use strict";Nr.exports=Pr()();var Pi,Ni});import{useEffect as _a,useMemo as Aa,useRef as et,useState as $e}from"react";import{rootIsDark as po}from"efficient-shell/format";function br(){if(typeof document>"u")return;let e=getComputedStyle(document.documentElement),t=(r,o)=>e.getPropertyValue(r).trim()||o,n=po({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"}}}var _=uo(Sr(),1);import I from"react";function Er(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 go(e){if(Array.isArray(e))return e}function Tr(e,t,n){return(t=Co(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yo(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,u,m=[],f=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(r=s.call(n)).done)&&(m.push(r.value),m.length!==t);f=!0);}catch(h){d=!0,o=h}finally{try{if(!f&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw o}}return m}}function ho(){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 Rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rr(Object(n),!0).forEach(function(r){Tr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bo(e,t){if(e==null)return{};var n,r,o=vo(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)&&(o[n]=e[n])}return o}function vo(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 Lr(e,t){return go(e)||yo(e,t)||ko(e,t)||ho()}function xo(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 Co(e){var t=xo(e,"string");return typeof t=="symbol"?t:t+""}function Jt(e){"@babel/helpers - typeof";return Jt=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},Jt(e)}function ko(e,t){if(e){if(typeof e=="string")return Er(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)?Er(e,t):void 0}}var H=function(t,n,r){var o=!!r,s=I.useRef(r);I.useEffect(function(){s.current=r},[r]),I.useEffect(function(){if(!o||!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)}},[o,n,t,s])},Vt=function(t){var n=I.useRef(t);return I.useEffect(function(){n.current=t},[t]),n.current},Ze=function(t){return t!==null&&Jt(t)==="object"},wo=function(t){return Ze(t)&&typeof t.then=="function"},Po=function(t){return Ze(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},Ar="[object Object]",No=function e(t,n){if(t===n)return!0;if(!Ze(t)||!Ze(n))return t===n;var r=Array.isArray(t),o=Array.isArray(n);if(r!==o)return!1;var s=Object.prototype.toString.call(t)===Ar,u=Object.prototype.toString.call(n)===Ar;if(s!==u)return!1;if(!s&&!r)return t===n;var m=Object.keys(t),f=Object.keys(n);if(m.length!==f.length)return!1;for(var d={},h=0;h<m.length;h+=1)d[m[h]]=!0;for(var C=0;C<f.length;C+=1)d[f[C]]=!0;var x=Object.keys(d);if(x.length!==m.length)return!1;var y=t,w=n,E=function(J){return e(y[J],w[J])};return x.every(E)},_r=function(t,n,r){return Ze(t)?Object.keys(t).reduce(function(o,s){var u=!Ze(n)||!No(t[s],n[s]);return r.includes(s)?(u&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),o):u?Or(Or({},o||{}),{},Tr({},s,t[s])):o},null):null},Fr="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.",Ir=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fr;if(t===null||Po(t))return t;throw new Error(n)},So=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fr;if(wo(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(o){return Ir(o,n)})};var r=Ir(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Eo=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"}))},Nt=I.createContext(null);Nt.displayName="ElementsContext";var qr=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},Zt=function(t){var n=t.stripe,r=t.options,o=t.children,s=I.useMemo(function(){return So(n)},[n]),u=I.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(r):null}}),m=Lr(u,2),f=m[0],d=m[1];I.useEffect(function(){var x=!0,y=function(E){d(function(A){return A.stripe?A:{stripe:E,elements:E.elements(r)}})};return s.tag==="async"&&!f.stripe?s.stripePromise.then(function(w){w&&x&&y(w)}):s.tag==="sync"&&!f.stripe&&y(s.stripe),function(){x=!1}},[s,f,r]);var h=Vt(n);I.useEffect(function(){h!==null&&h!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[h,n]);var C=Vt(r);return I.useEffect(function(){if(f.elements){var x=_r(r,C,["clientSecret","fonts"]);x&&f.elements.update(x)}},[r,C,f.elements]),I.useEffect(function(){Eo(f.stripe)},[f.stripe]),I.createElement(Nt.Provider,{value:f},o)};Zt.propTypes={stripe:_.default.any,options:_.default.object};var Mr=function(t){var n=I.useContext(Nt);return qr(n,t)},Dr=function(){var t=Mr("calls useElements()"),n=t.elements;return n},Ro=function(t){var n=t.children,r=Mr("mounts <ElementsConsumer>");return n(r)};Ro.propTypes={children:_.default.func.isRequired};var Oo=I.createContext(null);Oo.displayName="CheckoutContext";var jr=I.createContext(null);jr.displayName="CheckoutSdkContext";var Xt=function(t){var n=I.useContext(jr),r=I.useContext(Nt);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 qr(r,t)},Ao=["mode"],Io=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},F=function(t,n,r){var o="".concat(Io(t),"Element"),s=function(d){var h=d.id,C=d.className,x=d.options,y=x===void 0?{}:x,w=d.onBlur,E=d.onFocus,A=d.onReady,J=d.onChange,O=d.onEscape,k=d.onClick,W=d.onLoadError,V=d.onLoaderStart,M=d.onNetworksChange,ae=d.onConfirm,ve=d.onCancel,Te=d.onShippingAddressChange,pe=d.onShippingRateChange,B=d.onSavedPaymentMethodRemove,le=d.onSavedPaymentMethodUpdate,me=d.onAvailablePaymentMethodsChange,$=Xt("mounts <".concat(o,">")),v="elements"in $?$.elements:null,X="checkoutSdk"in $?$.checkoutSdk:null,tt=I.useState(null),Le=Lr(tt,2),D=Le[0],nt=Le[1],Z=I.useRef(null),fe=I.useRef(null);H(D,"blur",w),H(D,"focus",E),H(D,"escape",O),H(D,"click",k),H(D,"loaderror",W),H(D,"loaderstart",V),H(D,"networkschange",M),H(D,"confirm",ae),H(D,"cancel",ve),H(D,"shippingaddresschange",Te),H(D,"shippingratechange",pe),H(D,"savedpaymentmethodremove",B),H(D,"savedpaymentmethodupdate",le),H(D,"availablepaymentmethodschange",me),H(D,"change",J);var Ne;A&&(t==="expressCheckout"?Ne=A:Ne=function(){A(D)}),H(D,"ready",Ne),I.useLayoutEffect(function(){if(Z.current===null&&fe.current!==null&&(v||X)){var T=null;if(X){var ee=X,Ye=X;switch(t){case"paymentForm":T=Ye.createForm(y);break;case"payment":T=ee.createPaymentElement(y);break;case"address":if("mode"in y){var L=y.mode,_e=bo(y,Ao);if(L==="shipping")T=ee.createShippingAddressElement(_e);else if(L==="billing")T=ee.createBillingAddressElement(_e);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=ee.createExpressCheckoutElement(y);break;case"currencySelector":T=X.createCurrencySelectorElement();break;case"taxId":T=ee.createTaxIdElement(y);break;case"contactDetails":T=ee.createContactDetailsElement();break;case"linkSignup":if("createLinkSignupElement"in X)T=X.createLinkSignupElement(y);else throw new Error("<LinkSignupElement> requires <CheckoutElementsProvider> and is not supported inside <CheckoutFormProvider>.");break;case"terms":T=ee.createTermsElement(y);break;default:throw new Error("<".concat(o,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else v&&(T=v.create(t,y));Z.current=T,nt(T),T&&T.mount(fe.current)}},[v,X,y]);var ge=Vt(y);return I.useEffect(function(){if(Z.current){var T=_r(y,ge,["paymentRequest"]);T&&"update"in Z.current&&Z.current.update(T)}},[y,ge]),I.useLayoutEffect(function(){return function(){if(Z.current&&typeof Z.current.destroy=="function")try{Z.current.destroy(),Z.current=null}catch{}}},[]),I.createElement("div",{id:h,className:C,ref:fe})},u=function(d){Xt("mounts <".concat(o,">"));var h=d.id,C=d.className;return I.createElement("div",{id:h,className:C})},m=n?u:s;return m.propTypes={id:_.default.string,className:_.default.string,onChange:_.default.func,onBlur:_.default.func,onFocus:_.default.func,onReady:_.default.func,onEscape:_.default.func,onClick:_.default.func,onLoadError:_.default.func,onLoaderStart:_.default.func,onNetworksChange:_.default.func,onConfirm:_.default.func,onCancel:_.default.func,onShippingAddressChange:_.default.func,onShippingRateChange:_.default.func,onSavedPaymentMethodRemove:_.default.func,onSavedPaymentMethodUpdate:_.default.func,onAvailablePaymentMethodsChange:_.default.func,options:_.default.object},m.displayName=o,m.__elementType=t,m},q=typeof window>"u",To=I.createContext(null);To.displayName="EmbeddedCheckoutProviderContext";var Kr=function(){var t=Xt("calls useStripe()"),n=t.stripe;return n},Ri=F("auBankAccount",q),Oi=F("card",q),Ai=F("cardNumber",q),Ii=F("cardExpiry",q),Ti=F("cardCvc",q),Li=F("currencySelector",q),_i=F("iban",q),Ur=F("payment",q),Fi=F("expressCheckout",q),qi=F("paymentRequestButton",q),Mi=F("linkAuthentication",q),Di=F("linkSignup",q),ji=F("contactDetails",q),Ki=F("address",q),Ui=F("shippingAddress",q),Wi=F("paymentMethodMessaging",q),$i=F("taxId",q),Yi=F("issuingCardNumberDisplay",q),Bi=F("issuingCardCvcDisplay",q),Hi=F("issuingCardExpiryDisplay",q),zi=F("issuingCardPinDisplay",q),Gi=F("issuingCardCopyButton",q),Ji=F("terms",q);function Rt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rt=function(t){return typeof t}:Rt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rt(e)}var Yr="dahlia",Lo=function(t){return t===3?"v3":t},Br="https://js.stripe.com",_o="".concat(Br,"/").concat(Yr,"/stripe.js"),Fo=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,qo=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,Wr="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Mo=function(t){return Fo.test(t)||qo.test(t)},Do=function(){for(var t=document.querySelectorAll('script[src^="'.concat(Br,'"]')),n=0;n<t.length;n++){var r=t[n];if(Mo(r.src))return r}return null},$r=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(_o).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},jo=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.17.0",startTime:n})},dt=null,St=null,Et=null,Ko=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},Uo=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},Wo=function(t){return dt!==null?dt:(dt=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(Wr),window.Stripe){n(window.Stripe);return}try{var o=Do();if(o&&t)console.warn(Wr);else if(!o)o=$r(t);else if(o&&Et!==null&&St!==null){var s;o.removeEventListener("load",Et),o.removeEventListener("error",St),(s=o.parentNode)===null||s===void 0||s.removeChild(o),o=$r(t)}Et=Uo(n,r),St=Ko(r),o.addEventListener("load",Et),o.addEventListener("error",St)}catch(u){r(u);return}}),dt.catch(function(n){return dt=null,Promise.reject(n)}))},$o=function(t,n,r){if(t===null)return null;var o=n[0];if(typeof o!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Rt(o)," instead."));var s=o.match(/^pk_test/),u=Lo(t.version),m=Yr;s&&u!==m&&console.warn("Stripe.js@".concat(u," was loaded on the page, but @stripe/stripe-js@").concat("9.17.0"," expected Stripe.js@").concat(m,". 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 jo(f,r),f},pt,Hr=!1,zr=function(){return pt||(pt=Wo(null).catch(function(t){return pt=null,Promise.reject(t)}),pt)};Promise.resolve().then(function(){return zr()}).catch(function(e){Hr||console.warn(e)});var Ot=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Hr=!0;var o=Date.now();return zr().then(function(s){return $o(s,n,o)})};var Qt=2;function Gr(e){return e==="card"}var Yo="checkout_unavailable",Bo="checkout_waiting",Jr="committed",Oe="We could not check your payment. Please try again.",en="Your last change was not saved. This is your order as placed.",Vr="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.",Xr=1e4;async function Zr(e,t=Xr){let n,r=new Promise(s=>{n=setTimeout(()=>s(void 0),t)}),o=(async()=>{try{return(await(await Ot(e.publishableKey))?.retrievePaymentIntent(e.clientSecret))?.paymentIntent?.status}catch{return}})();try{return await Promise.race([o,r])}finally{clearTimeout(n)}}var Qr=new Set(["none","requires_payment_method","canceled"]);async function tn(e,t=Xr){let n,r=new Promise(o=>{n=setTimeout(()=>o(void 0),t)});try{return await Promise.race([U.releaseCheckout({idempotencyKey:e}).then(o=>o.status,()=>{}),r])}finally{clearTimeout(n)}}function ea(e,t){return e instanceof de&&typeof e.data=="object"&&e.data!==null&&e.data.code===t}function At(e){return ea(e,Yo)}function nn(e){return ea(e,Bo)}function rn(e){return e instanceof de&&e.status>=400&&e.status<500&&e.status!==408}function ta(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])}function It(e){return e.orderNumber||e.checkoutNumber}function Ho(e){return e.orderNumber?{kind:"placed",order:e}:{kind:e.status==="released"?"refunded":e.status==="expired"?"expired":"pending",checkoutNumber:e.checkoutNumber}}async function na({checkoutNumber:e,resend:t,page:n}){n.setConfirming(!0);let r;try{r=Ho(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 ni,useContext as ri,useEffect as G,useMemo as fa,useRef as z,useState as P}from"react";var zo="sf:gclid",Go="sf:fbclid",Jo=2160*60*60*1e3;function oa(){return typeof window<"u"}function ra(e){let t=lt.getItem(e);if(!t)return"";try{let{v:n,t:r}=JSON.parse(t);return!n||typeof r!="number"||Date.now()-r>Jo?"":n}catch{return""}}function aa(e){if(!oa())return"";let t=e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1"),n=document.cookie.match(new RegExp(`(?:^|; )${t}=([^;]*)`));return n?decodeURIComponent(n[1]):""}function ia(){if(!oa())return{};let e=ra(zo),t=ra(Go),n=aa("_fbp"),r=aa("_fbc");!r&&t&&(r=`fb.1.${Date.now()}.${t}`);let o={};return e&&(o.gclid=e),t&&(o.fbclid=t),n&&(o.fbp=n),r&&(o.fbc=r),o}var sa="sf:meta-purchases",Vo=20;function la(){return typeof window>"u"||window.parent!==window}function Xo(...e){try{if(la()||typeof window.fbq!="function")return;window.fbq(...e)}catch{}}var ca=new Set;function Zo(e){if(ca.has(e))return!1;ca.add(e);try{let t=JSON.parse(lt.getItem(sa)??"[]");if(t.includes(e))return!1;lt.setItem(sa,JSON.stringify([...t,e].slice(-Vo)))}catch{}return!0}function Qo(e){return[...new Set(e.filter(ut).flatMap(t=>t.components.map(n=>n.partNumber)))]}function ua(e){let t=e.confirmation;la()||!Zo(t.orderNumber)||Xo("track","Purchase",{value:Number(t.grandTotal),currency:t.currency,content_type:"product",content_ids:Qo(e.lines)},{eventID:t.orderNumber})}var an="checkout-afterpay-context",Tt="checkout-gocardless-context",on="checkout-zip-context",Lt="checkout-klarna-context";function ei({evidence:e,parked:t}){return e?{action:"capture",evidence:e,parked:t}:t?{action:"settle",parked:t}:{action:"ignore"}}function ti(e,t){let n=e.getItem(t);if(e.removeItem(t),!n)return null;try{return JSON.parse(n)}catch{return null}}var da={name:"Afterpay",legParam:"afterpay",legValues:["confirm","cancel"],storageKey:an,evidenceFrom(e,t){return t==="cancel"||(e.get("status")??"").toUpperCase()==="CANCELLED"?null:e.get("orderToken")},requestFrom:e=>({token:e})},pa={name:"Zip",legParam:"zip",legValues:["return"],storageKey:on,evidenceFrom(e){let t=(e.get("result")??"").toLowerCase();return t==="cancelled"||t==="declined"?null:e.get("checkoutId")},requestFrom:e=>({checkoutId:e})};async function sn(e,t){let n=new URLSearchParams(t.search),r=n.get(e.legParam);if(!r||!e.legValues.includes(r))return;let o=ti(t.storage,e.storageKey),s=e.evidenceFrom(n,r);t.scrubQuery();let u=ei({evidence:s,parked:o});if(u.action!=="ignore"){if(t.page.clearCart(),u.action==="settle"){t.page.note(`The ${e.name} payment was not completed \u2014 our team will follow up on payment.`),t.page.land(u.parked.confirmation);return}t.page.setConfirming(!0);try{let m=await t.capture(e.requestFrom(u.evidence));m.status==="paid"?t.page.markPaid():t.page.note(`${e.name} declined the payment \u2014 our team will follow up on payment.`),t.page.land(u.parked?.confirmation??m)}catch{u.parked?(t.page.note(`We could not confirm the ${e.name} payment \u2014 our team will follow up on payment.`),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 ma(e,t,n){let r=(t??"").trim();if(!r)return"";if(n.length===0)return r;let o=r.toUpperCase(),s=`${e.toUpperCase()}-${o}`,u=n.find(m=>m.code&&m.code.toUpperCase()===o)??n.find(m=>m.code&&m.code.toUpperCase()===s)??n.find(m=>m.name.toUpperCase()===o);return u?u.code||u.name:""}import{jsx as Pe}from"react/jsx-runtime";function ga(e){let t=e.indexOf(`
|
|
3
3
|
`);return t===-1?[e,""]:[e.slice(0,t),e.slice(t+1)]}function ya(e,{canParkContext:t}={canParkContext:!0}){let n=e.paymentMethods,r=[];return n.includes("card")&&r.push({key:"card",title:"Card",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("paypal")&&e.paypalClientId&&r.push({key:"paypal",title:"PayPal",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAYPAL \xB7 CARDS"})}),n.includes("afterpay")&&r.push({key:"afterpay",title:"Afterpay",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"4 \xD7 INTEREST-FREE"})}),n.includes("square")&&e.squareApplicationId&&e.squareLocationId&&r.push({key:"square",title:"Card (Square)",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("gocardless")&&t&&r.push({key:"gocardless",title:"Bank Direct Debit",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY BY BANK"})}),n.includes("zip")&&r.push({key:"zip",title:"Zip",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY IN 4"})}),n.includes("klarna")&&t&&r.push({key:"klarna",title:"Klarna",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY LATER"})}),n.includes("bank")&&r.push({key:"bank",title:"Bank transfer",body:null,price:Pe("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Invoiced"})}),r}var va="This shop does not take payment online yet. Please contact the shop to order.",Qe=class extends Error{};function ha(e,t){if(!e.orderNumber&&At(t))return t.message;let n=t instanceof de?` (${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 ba=new Set(["paypal","square","afterpay","gocardless","zip","klarna"]),Ue=e=>JSON.parse(e),xa="Shipping cannot be calculated right now. Please try again.";function ai({site:e,logo:t,preview:n=!1}){let{items:r,totals:o,coupon:s,refuseCoupon:u,deliveryOptions:m,shippingMethodId:f,setShippingMethodId:d,setQuoteDestination:h,courier:C,requote:x,identify:y,clearCapturedCart:w,replaceItems:E,removeCoupon:A}=Pt(),J=m.find(a=>a.id===f)?.pickupLocation??null,{country:O,countries:k,activeCountry:W,formatMoney:V}=be(),[M,ae]=P(()=>ya(e)[0]?.key??null),[ve,Te]=P(!0);G(()=>{Te(tr(ue))},[]);let[pe,B]=P(!1),[le,me]=P(""),[$,v]=P(""),[X,tt]=P(""),[Le,D]=P(""),[nt,Z]=P(""),[fe,Ne]=P(""),[ge,T]=P(""),[ee,Ye]=P(""),[L,_e]=P(()=>O||k[0]?.code||""),[Se,mt]=P(""),[rt,pn]=P([]),[Mt,Dt]=P(null),[ft,at]=P(null),mn=fa(()=>k.find(a=>a.code===L)??W,[k,L,W]),Fa=mn?.postalLabel||"Postal Code",qa=rt[0]?.divisionType||"State / Province";G(()=>{if(!L){pn([]),Dt(L);return}Dt(null);let a=!1;return U.listCountrySubdivisions(L).then(l=>{a||(pn(l),Dt(L),mt(""))}),()=>{a=!0}},[L]);let fn=Le.trim()!==""&&fe.trim()!==""&&ge.trim()!==""&&Mt===L&&(rt.length===0||Se!=="")?ge.trim():"";G(()=>{h(L?{country:L,subdivision:Se,postcode:fn}:null)},[L,Se,fn,h]),G(()=>()=>h(null),[h]);let Ma=C?.status==="unavailable",Da=x,[gt,gn]=P(null),[ja,yn]=P([]),[hn,jt]=P("new"),[bn,vn]=P(!1),[Kt,Ka]=P("Home"),[Ua,xn]=P(null),[Wa,Cn]=P(null),[ot,yt]=P(()=>Xe()),kn=z(null),[wn,ye]=P(null),[$a,oe]=P(null),[Pn,ht]=P(null),[Nn,Ya]=P(!1),[Sn,Ba]=P(!1),[Ee,Be]=P(null),[Ha,He]=P(!1),[ie,xe]=P(null),[za,Ce]=P(null),[Ga,Ja]=P(!1),[Va,En]=P(!1),[Xa,Za]=P(!1),[Qa,Rn]=P(!1),[On,eo]=P(!1),[to,Ut]=P(!1),[Wt,An]=P(null),Fe=z(null),it=z(r),qe=z(null),ze=z(null),In=!!(wn||Wt&&Wt.kind!=="processing"||On||Nn||Sn||Pn&&Ee?.orderNumber);G(()=>{In&&(E([]),A())},[In,E,A]);let Tn=z(!1);G(()=>{n||Tn.current||!r.some(ut)||(Tn.current=!0,or({lines:r,currency:o.currency,value:o.subtotal-o.discount,coupon:s?.valid?s.code:void 0}))},[r,o,s,n]),G(()=>{y(le,$.trim()||void 0)},[le,$,y]);let Ln=z(null),[bt,no]=P(null);G(()=>{let a=Ln.current;if(!bt||!a)return;let l=()=>a.style.setProperty("--sf-checkout-header-h",`${bt.offsetHeight}px`);l();let p=new ResizeObserver(l);return p.observe(bt),()=>p.disconnect()},[bt]),G(()=>{let a=p=>({setConfirming:p,land:ye,markPaid:()=>He(!0),note:Ce,fail:oe,clearCart:w}),l={search:window.location.search,storage:ue,scrubQuery:()=>window.history.replaceState(null,"",window.location.pathname)};sn(da,{...l,capture:U.captureAfterpayPayment,page:a(Ja)}),sn(pa,{...l,capture:U.captureZipPayment,page:a(Za)})},[]),G(()=>{let l=new URLSearchParams(window.location.search).get("gocardless");if(l!=="confirm"&&l!=="cancel")return;let p=ue.getItem(Tt);if(ue.removeItem(Tt),window.history.replaceState(null,"",window.location.pathname),!p)return;let N;try{N=JSON.parse(p)}catch{return}if(w(),l==="cancel"){Ce("The direct debit was not set up \u2014 our team will follow up on payment."),ye(N.confirmation);return}En(!0),U.completeGocardlessPayment({idempotencyKey:N.idempotencyKey}).then(g=>{g.status==="paid"?He(!0):g.status==="declined"?Ce("The direct debit was declined \u2014 our team will follow up on payment."):Ce("Your direct debit is set up \u2014 the payment is collecting and will clear in a few days.")}).catch(()=>{Ce("We could not confirm the direct debit \u2014 our team will follow up on payment.")}).finally(()=>{ye(N.confirmation),En(!1)})},[]),G(()=>{let a=new URLSearchParams(window.location.search),l=a.get("klarna");if(l!=="confirm"&&l!=="cancel")return;let p=ue.getItem(Lt);ue.removeItem(Lt);let N=a.get("authorization_token");if(window.history.replaceState(null,"",window.location.pathname),!p)return;let g;try{g=JSON.parse(p)}catch{return}if(w(),l==="cancel"||!N){Ce("The Klarna payment was not completed \u2014 our team will follow up on payment."),ye(g.confirmation);return}Rn(!0),U.captureKlarnaPayment({idempotencyKey:g.idempotencyKey,authorizationToken:N}).then(j=>{j.status==="paid"?He(!0):j.status==="declined"?Ce("Klarna declined the payment \u2014 our team will follow up on payment."):Ce("Your Klarna payment is being reviewed \u2014 we'll confirm the outcome shortly.")}).catch(()=>{Ce("We could not confirm the Klarna payment \u2014 our team will follow up on payment.")}).finally(()=>{ye(g.confirmation),Rn(!1)})},[]);function _n(a){let[l,p]=ga(a.address);D(l),Z(p),Ne(a.city),T(a.zip_code),a.country&&_e(a.country),a.phone&&Ye(a.phone),at({country:a.country||null,state:a.state??""})}G(()=>{if(ft){if((ft.country||L)!==L){at(null);return}Mt===L&&(mt(ma(L,ft.state,rt)),at(null))}},[ft,L,Mt,rt]),G(()=>{let a=!1;return(async()=>{try{let[l,p,N]=await Promise.all([Ve.me(),Ve.myProfile().catch(()=>null),Ve.myAddresses().catch(()=>[])]);if(a)return;gn(l);let g=N.filter(K=>K.is_active);yn(g),me(l.email);let j=(p?.contact_name??"").split(/\s+/);v(l.first_name||j[0]||""),tt(l.last_name||j.slice(1).join(" "));let R=l.phone||p?.phone;R&&Ye(R);let te=g.find(K=>K.id===l.default_delivery_location)??g[0];if(te)jt(te.id),_n(te);else if(p){let[K,ne]=ga(p.address??"");D(K),Z(ne),Ne(p.city??""),T(p.zip_code??""),p.country&&_e(p.country),at({country:p.country||null,state:p.state??""})}}catch{}})(),()=>{a=!0}},[]);function ro(){Ve.logout(),gn(null),yn([]),jt("new"),vn(!1),me(""),v(""),tt(""),D(""),Z(""),Ne(""),T(""),Ye(""),_e(O||k[0]?.code||""),mt(""),at(null)}let Ge=fa(()=>ya(e,{canParkContext:ve}),[e,ve]);G(()=>{Ge.some(a=>a.key===M)||ae(Ge[0]?.key??null)},[Ge,M]);let ao=Ge.length===0,vt=nt.trim()?`${Le}
|
|
4
4
|
${nt.trim()}`:Le,oo=ta({email:le,firstName:$,lastName:X,phone:ee,address:vt,city:fe,subdivision:Se,postcode:ge,country:L,lines:r.map(a=>[a.id,a.qty]),shippingMethodId:f,couponCode:Ht(s),currency:o.currency,shopperId:gt?.id??null}),Q=JSON.stringify([oo,M]),Re=z(null),$t=z(null),xt=z(!1),ke=z(!1),Je=z(null),Ct=z(!1),se=z(Q);se.current=Q;let Fn=z(pe);Fn.current=pe;let qn=()=>ke.current&&se.current!==Re.current,Me=z(null);G(()=>{Fn.current||(Q!==Me.current&&(Me.current=null),!(!ke.current||!ie||ie.orderNumber)&&(Q===Re.current||Q===Me.current||kt(ie)))},[Q,ie]);async function kt(a){if(Ct.current)return null;Ct.current=!0,B(!0);try{let l=Je.current?await Zr(Je.current):"none";if(l==="succeeded"||l==="processing")return ke.current=!1,xe(null),we("card"),l==="succeeded"?await De(void 0,a):Bn(a),null;if(l===void 0||!Qr.has(l))return Me.current=se.current,xe(a),oe(l==="requires_action"?Vr:Oe),null;let p=await tn(ot);if(p==="committed")return ke.current=!1,xe(null),we("card"),await De(void 0,a),null;if(p!=="released")return Me.current=se.current,xe(a),oe(Oe),null;ke.current=!1,Je.current=null,Me.current=null,oe(null),xe(null);let N=Xe();return yt(N),N}finally{Ct.current=!1,B(!1)}}async function io(){if(!(n||pe||Ct.current)){if(ie){if((ke.current?Q!==Re.current:st())&&!ie.orderNumber){let N=await kt(ie);N&&se.current===Q&&await Mn(N);return}B(!0),oe(null),xt.current=!1,await Yt();let l=Ue(se.current)[1],p=ie.orderNumber?l:"card";if(p&&ba.has(p)&&st()&&Ue(se.current)[0]!==$t.current){Dn(ie);return}we(p),p!==M&&ae(p),await Hn(ie,p,!ie.orderNumber);return}await Mn(ot)}}async function Mn(a){if(r.length===0||o.repricing||!M||!Ge.some(R=>R.key===M))return;let l=r.filter(ut).flatMap(R=>ar(R.components,R.qty));if(l.length===0){oe("Pick a size on each wheel's product page before checking out.");return}B(!0),oe(null);let p,N=a,g=M,j=!1;try{let R=gt?U.createOrderAuthed:U.createOrder,te=hr(),K={customer:{email:le,name:`${$} ${X}`.trim(),phone:ee.trim()||void 0,address:vt,city:fe,state:Se||void 0,zipCode:ge,country:L},items:l,currency:o.currency,idempotencyKey:a,shippingMethodId:f??void 0,couponCode:Ht(s),...te==="denied"?{}:ia(),...te?{adConsent:te}:{},...Gr(M)?{checkoutFlow:Qt}:{}};Fe.current=()=>R(K),Cn(null),$t.current=null,xt.current=!1,Je.current=null,ke.current=!1,Me.current=null,Re.current=Q,it.current=r;let ne=qe.current,Jn=ne?.key===K.idempotencyKey&&(ne.shape!==Q&&(!!K.checkoutFlow||!!ne.method||!!ne.plainMethod)||!!K.checkoutFlow&&!!ne.plainMethod);Jn&&(ze.current=K.idempotencyKey);let Vn=Wn(K,R),Xn=Jn||!K.checkoutFlow&&ze.current===K.idempotencyKey,Zn=!Vn&&!Xn&&!K.checkoutFlow&&!!ne&&!ne.method;Zn&&(ne.plainMethod=M,ne.plainLines=r,ne.plainShape=Q);let je=await(Xn?Kn(K,R):R(K).then(ct=>({answer:ct,request:K})).catch(ct=>(Vn?jn(ct,K.idempotencyKey):Zn&&rn(ct)&&(ne.plainMethod=""),so(ct,K,R))));if(!je)return;p=je.answer,N=je.request.idempotencyKey,g=je.method??g,we(g),j=st()||g!==Ue(se.current)[1],je.method&&je.method!==M&&ae(je.method),p.orderNumber&&($n(p),w()),await Yt()}catch(R){let te=rr(R);te?(u(te),oe(`${te} Your order has not been placed. Place it again to continue without the code.`)):R instanceof Qe?oe(Oe):oe(R instanceof de?R.message:"Could not place the order. Please try again."),B(!1);return}if(g&&ba.has(g)&&(j||st())){Dn(p);return}await Hn(p,g,!1,N)}function Dn(a){$t.current=Ue(se.current)[0],oe(`${ha(a,null)} ${en}`),xe(a),B(!1)}function jn(a,l){rn(a)&&!nn(a)&&qe.current?.key===l&&(qe.current=null)}async function so(a,l,p){if(At(a))return Un(l,p);if(!nn(a))throw a;return ze.current=l.idempotencyKey,Kn(l,p,!0)}async function Kn(a,l,p=!1){let N=await tn(a.idempotencyKey);if(N==="released")return se.current===Q?Un(a,l):(yt(Xe()),B(!1),null);if(N!=="committed")throw new Qe;let g=qe.current?.key===a.idempotencyKey?qe.current:null;if(it.current=g?.lines??r,g?.method&&!p){ze.current=null,Fe.current=g.send;let te=await g.send().catch(()=>{throw new Qe});return Re.current=g.shape,{answer:te,request:a,method:g.method}}let j=g&&!g.method?g.send:()=>l({...a,checkoutFlow:Qt});Fe.current=j;let R=await j().catch(()=>null);if(!R&&g?.plainMethod)throw new Qe;return R?.orderNumber&&R.status!==Jr?(ze.current=null,g?.plainMethod&&(it.current=g.plainLines),g&&(Re.current=g.plainMethod?g.plainShape:g.shape),{answer:R,request:a,method:g?.plainMethod||void 0}):(B(!1),g&&(Re.current=g.shape),we("card"),await Yn("",R?async()=>R:()=>Promise.reject(new Error("The order request did not answer."))),await Yt(),null)}function st(){let a=Re.current;return a!==null&&Ue(a)[0]!==Ue(se.current)[0]}function we(a){a!==Ue(se.current)[1]&&(xt.current=!0),Cn(xt.current||st()?en:null)}async function Un(a,l){let p={...a,idempotencyKey:Xe()};ze.current=null,yt(p.idempotencyKey),Fe.current=()=>l(p),Wn(p,l);try{return{answer:await l(p),request:p}}catch(N){throw jn(N,p.idempotencyKey),N}}function Wn(a,l){return qe.current?.key===a.idempotencyKey?!1:(qe.current={key:a.idempotencyKey,send:()=>l(a),lines:r,shape:Q,method:a.checkoutFlow?"":M??"",plainMethod:"",plainLines:r,plainShape:Q},!0)}function $n(a){ir({confirmation:a,lines:it.current,adsSendTo:e.googleAdsId&&e.googleAdsConversionLabel?`${e.googleAdsId}/${e.googleAdsConversionLabel}`:null}),ua({confirmation:a,lines:it.current})}async function De(a,l=Ee){if(!l)return;let p=a?async()=>a:Fe.current;if(l.orderNumber||!p){He(!0),ye(l);return}await Yn(l.checkoutNumber,p)}async function Yn(a,l){w(),await na({checkoutNumber:a,resend:l,page:{setConfirming:eo,land:ye,markPaid:()=>He(!0),track:$n,unplaced:An}})}function Bn(a=Ee){if(a){if(a.orderNumber){ye(a);return}w(),An({kind:"processing",checkoutNumber:a.checkoutNumber})}}async function Yt(){let a=JSON.stringify([Kt.trim(),$,X,ee.trim(),vt,fe,Se,ge,L]);if(!(!gt||!bn||hn!=="new"||kn.current===a))try{await Ve.createAddress({label:Kt.trim()||"Home",contact_name:`${$} ${X}`.trim(),phone:ee.trim(),address:vt,city:fe,zip_code:ge,state:Se,country:L}),kn.current=a,xn("Address saved to your account.")}catch{xn("We couldn't save the address to your account \u2014 you can add it under Account \u2192 Addresses.")}}async function Hn(a,l=M,p=!1,N=ot){xe(null);try{if(l==="card"&&e.paymentMethods.includes("card")){let g=await U.createPaymentIntent({idempotencyKey:N});if(Je.current=g,p&&qn()){await kt(a);return}let j=a;if(p){let R=await Fe.current?.().catch(()=>null);if(R?.orderNumber){we("card"),await De(R,a);return}if(j=zn(a,R)??{...a,expiresAt:null},qn()){await kt(a);return}}we("card"),Be(j),Ut(!1),ht(g)}else if(l==="paypal"&&e.paymentMethods.includes("paypal"))Be(a),Ya(!0);else if(l==="afterpay"&&e.paymentMethods.includes("afterpay")){let g=window.location.origin,j=await U.createAfterpayCheckout({idempotencyKey:N,confirmUrl:`${g}/checkout?afterpay=confirm`,cancelUrl:`${g}/checkout?afterpay=cancel`}),R={idempotencyKey:N,confirmation:a};ue.setItem(an,JSON.stringify(R)),window.location.assign(j.redirectCheckoutUrl);return}else if(l==="square"&&e.paymentMethods.includes("square"))Be(a),Ba(!0);else if(l==="gocardless"&&e.paymentMethods.includes("gocardless")){let g=window.location.origin,j=await U.createGocardlessBillingRequest({idempotencyKey:N,confirmUrl:`${g}/checkout?gocardless=confirm`,cancelUrl:`${g}/checkout?gocardless=cancel`}),R={idempotencyKey:N,confirmation:a};ue.setItem(Tt,JSON.stringify(R)),window.location.assign(j.authorisationUrl);return}else if(l==="zip"&&e.paymentMethods.includes("zip")){let g=window.location.origin,j=await U.createZipCheckout({idempotencyKey:N,redirectUrl:`${g}/checkout?zip=return`}),R={idempotencyKey:N,confirmation:a};ue.setItem(on,JSON.stringify(R)),window.location.assign(j.redirectUrl);return}else if(l==="klarna"&&e.paymentMethods.includes("klarna")){let g=window.location.origin,j=await U.createKlarnaCheckout({idempotencyKey:N,confirmUrl:`${g}/checkout?klarna=confirm`,cancelUrl:`${g}/checkout?klarna=cancel`}),R={idempotencyKey:N,confirmation:a};ue.setItem(Lt,JSON.stringify(R)),window.location.assign(j.redirectUrl);return}else we(l),ye(a)}catch(g){if((p||l==="card")&&g instanceof de&&g.status===409){we(l),await De(void 0,a);return}Gn(a,g),B(!1)}}function zn(a,l){return l&&!l.orderNumber&&l.status==="open"&&l.checkoutNumber===a.checkoutNumber?l:null}function Gn(a,l){oe(ha(a,l)),!a.orderNumber&&At(l)?(ke.current=!1,yt(Xe())):xe(a)}async function co(a){if(!Ee)return;let l=Ee;try{let p=await U.createPaymentIntent({idempotencyKey:ot}),N=await Fe.current?.().catch(()=>null);if(N?.orderNumber){await De(N);return}let g=zn(l,N);Be(g??{...l,expiresAt:null}),Ut(a&&g!==null),Je.current=p,ht(p)}catch(p){if(p instanceof de&&p.status===409){await De();return}ht(null),Be(null),Gn(l,p),B(!1)}}function lo(){Ee&&(ke.current=!0,xe(Ee),ht(null),Be(null),Ut(!1),B(!1))}return{site:e,logo:t,items:r,totals:o,coupon:s,deliveryOptions:m,courierUnavailable:Ma,retryCourier:Da,shippingMethodId:f,setShippingMethodId:d,pickupLocation:J,servedCountries:k,formatMoney:V,payChoice:M,setPayChoice:ae,placing:pe,email:le,setEmail:me,firstName:$,setFirstName:v,lastName:X,setLastName:tt,address1:Le,setAddress1:D,address2:nt,setAddress2:Z,city:fe,setCity:Ne,postcode:ge,setPostcode:T,phone:ee,setPhone:Ye,country:L,setCountry:_e,subdivision:Se,setSubdivision:mt,subdivisions:rt,destination:mn,postcodeLabel:Fa,subdivisionLabel:qa,me:gt,savedAddresses:ja,selectedAddressId:hn,setSelectedAddressId:jt,saveAddress:bn,setSaveAddress:vn,saveLabel:Kt,setSaveLabel:Ka,addressSaveNote:Ua,lostChangeNote:Wa,idemKey:ot,confirmation:wn,setConfirmation:ye,orderError:$a,payment:Pn,paypalStep:Nn,squareStep:Sn,pendingConf:Ee,paid:Ha,setPaid:He,unpaidOrder:ie,payNote:za,afterpayConfirming:Ga,gocardlessConfirming:Va,zipConfirming:Xa,klarnaConfirming:Qa,cardConfirming:On,checkoutResult:Wt,confirmCardPayment:De,cardStillProcessing:Bn,renewCardPayment:co,holdRenewed:to,leaveCardPayment:lo,checkoutRootRef:Ln,setCheckoutHeaderEl:no,fillFromAddress:_n,checkoutSignOut:ro,payOptions:Ge,noPaymentMethod:ao,placeOrder:io}}var Ca=ni(null);function ka({children:e,...t}){let n=ai(t);return Pe(Ca.Provider,{value:n,children:e})}function Ae(){let e=ri(Ca);if(!e)throw new Error("useCheckout must be used inside CheckoutStateProvider");return e}import{useId as cn}from"react";import{Fragment as Ie,jsx as i,jsxs as S}from"react/jsx-runtime";function Pa(){let{email:e,setEmail:t,firstName:n,setFirstName:r,lastName:o,setLastName:s,me:u,checkoutSignOut:m}=Ae(),f=cn();return S(Ft,{num:"N\xB0 01",title:"Contact",children:[i(ce,{label:"Email",htmlFor:f,hint:u?S(Ie,{children:["Signed in \xB7"," ",i("button",{type:"button",onClick:m,className:"underline transition-colors hover:text-accent",children:"Not you? Sign out"})]}):void 0,children:i("input",{id:f,type:"email",value:e,onChange:d=>t(d.target.value),placeholder:"you@example.com",readOnly:u!==null,className:re+(u?" opacity-70":"")})}),S(Oa,{children:[i(ce,{label:"First name",children:i("input",{type:"text",value:n,onChange:d=>r(d.target.value),className:re})}),i(ce,{label:"Last name",children:i("input",{type:"text",value:o,onChange:d=>s(d.target.value),className:re})})]})]})}function Na(){let{pickupLocation:e,servedCountries:t,address1:n,setAddress1:r,address2:o,setAddress2:s,city:u,setCity:m,postcode:f,setPostcode:d,phone:h,setPhone:C,country:x,setCountry:y,subdivision:w,setSubdivision:E,subdivisions:A,destination:J,postcodeLabel:O,subdivisionLabel:k,me:W,savedAddresses:V,selectedAddressId:M,setSelectedAddressId:ae,saveAddress:ve,setSaveAddress:Te,saveLabel:pe,setSaveLabel:B,fillFromAddress:le}=Ae(),me=cn(),$=cn();return S(Ft,{num:"N\xB0 02",title:e?"Collection":"Shipping address",children:[e?S("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.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"})]}):S(Ie,{children:[W!==null&&V.length>0&&S("div",{className:"grid gap-3",children:[V.map(v=>i(_t,{active:M===v.id,onClick:()=>{ae(v.id),le(v)},title:v.label,body:v.formatted_address,price:null},v.id)),i(_t,{active:M==="new",onClick:()=>ae("new"),title:"New address",body:null,price:null})]}),i(ce,{label:"Address line 1",children:i("input",{type:"text",value:n,onChange:v=>r(v.target.value),className:re})}),i(ce,{label:"Address line 2",children:i("input",{type:"text",value:o,onChange:v=>s(v.target.value),placeholder:"Apartment, unit, garage bay\u2026",className:re})}),S(Oa,{cols:"three",children:[i(ce,{label:"City",children:i("input",{type:"text",value:u,onChange:v=>m(v.target.value),className:re})}),i(ce,{label:O,children:i("input",{type:"text",value:f,onChange:v=>d(v.target.value),className:re})}),i(ce,{label:"Country",separate:!0,htmlFor:me,children:i(Gt,{id:me,value:x,onChange:v=>y(v.target.value),className:re+" pr-10",style:wa,children:t.map(v=>i("option",{value:v.code,children:v.name},v.code))})})]}),i(ce,{label:k,separate:!0,htmlFor:$,children:A.length>0?S(Gt,{id:$,value:w,onChange:v=>E(v.target.value),className:re+" pr-10",style:wa,children:[i("option",{value:"",children:"Select\u2026"}),A.map(v=>i("option",{value:v.code||v.name,children:v.name},v.code||v.name))]}):i("input",{id:$,type:"text",value:w,onChange:v=>E(v.target.value),className:re})})]}),i(ce,{label:"Phone",children:i("input",{type:"tel",value:h,onChange:v=>C(v.target.value),className:re})}),!e&&W!==null&&M==="new"&&S(Ie,{children:[i(oi,{checked:ve,onChange:Te,label:"Save this address to my account"}),ve&&i(ce,{label:"Address label",children:i("input",{type:"text",value:pe,onChange:v=>B(v.target.value),placeholder:"Home",className:re})})]})]})}function Sa(){let{totals:e,coupon:t,deliveryOptions:n,shippingMethodId:r,setShippingMethodId:o,pickupLocation:s,formatMoney:u,city:m,destination:f,courierUnavailable:d,retryCourier:h}=Ae();return i(Ft,{num:"N\xB0 03",title:"Shipping",children:S("div",{className:"grid gap-3",children:[n.map(C=>{let x=C.pickupLocation,y=x?[x.address,x.city,x.state,x.zipCode].filter(Boolean).join(", "):null;return i(_t,{active:r===C.id,onClick:()=>o(C.id),title:x?`${C.name} \u2014 ${x.name}`:C.name,body:x?[y,x.openingHours,x.instructions,C.description].filter(Boolean).join(" \xB7 "):C.description||null,price:e.freeShipping||C.amount===0?wt:u(C.amount,e.currency),tag:C.tag||void 0},C.id)}),d?S("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:[xa," ",i("button",{type:"button",onClick:h,className:"underline transition-colors hover:text-accent",children:"Try again"})]}):n.length===0&&i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Shipping is arranged after your order is reviewed."})]})})}function Ea(){let{payChoice:e,setPayChoice:t,placing:n,payment:r,payOptions:o,noPaymentMethod:s}=Ae();return S(Ft,{num:"N\xB0 04",title:"Payment",children:[s&&i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:va}),i("div",{className:"grid gap-3",children:o.map(u=>i(_t,{active:e===u.key,onClick:()=>t(u.key),title:u.title,body:u.body,price:u.price,tag:u.tag},u.key))}),e==="card"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="paypal"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll approve the payment with PayPal on the payment step after placing the order."}):e==="afterpay"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Afterpay to approve four interest-free payments, then brought straight back."}):e==="square"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="gocardless"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll set up a bank direct debit with GoCardless, then be brought straight back. Direct debits clear in a few days."}):e==="zip"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Zip to approve four instalments, then brought straight back."}):e==="klarna"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Klarna to choose how to pay, then brought straight back."}):e==="bank"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Our team emails you the invoice and bank details after review."}):null]})}function Ra(){let{site:e,items:t,totals:n,coupon:r,formatMoney:o,payChoice:s,placing:u,email:m,orderError:f,payment:d,noPaymentMethod:h,unpaidOrder:C,placeOrder:x}=Ae();return S("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:[S("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(he,{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?S("div",{className:"py-8 text-center font-serif text-[16px] italic leading-[1.5] text-fg-dim",children:["Your cart is empty. ",i(he,{href:"/wheels",className:"text-accent underline-offset-4 hover:underline",children:"Browse the catalog \u2192"})]}):t.map(y=>i(ii,{slug:y.slug,name:y.name,qty:y.qty,config:y.config,configSummary:si(y.config),price:ur(y,n.currency)??0,currency:n.currency},y.id))}),i("div",{className:"border-t border-line px-6 pt-5",children:i(yr,{customerEmail:m})}),S("div",{className:"flex flex-col gap-2 border-t border-line mt-5 px-6 pt-5",children:[i(We,{label:"Subtotal",value:o(n.subtotal,n.currency)}),n.discount>0&&r?.valid&&i(We,{label:`Coupon \xB7 ${r.code}`,value:S("span",{className:"font-semibold text-green",children:["\u2212 ",o(n.discount,n.currency)]})}),r?.deferred&&i(We,{label:`Coupon \xB7 ${r.code}`,value:nr}),r?.valid&&r.effects?.gift&&i(We,{label:`Free gift \xB7 ${r.effects.gift.partNumber}${r.effects.gift.quantity>1?` \xD7${r.effects.gift.quantity}`:""}`,value:i("span",{className:"font-semibold text-green",children:wt})}),i(We,{label:"Shipping",value:n.shippingStatus==="free"?i("span",{className:"font-semibold text-green",children:wt}):cr(n.shippingStatus)??o(n.shipping,n.currency)}),n.tax&&(n.tax.charged?i(We,{label:n.tax.inclusive?`${n.tax.name} included \xB7 ${n.tax.rate}%`:n.tax.name,value:o(n.tax.amount,n.currency)}):n.tax.name?i(We,{label:n.tax.name,value:sr}):null)]}),S("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?"\u2026":o(n.grand,n.currency)})]}),S("div",{className:"flex flex-col gap-3 px-6 pt-5 pb-6",children:[f&&i(Ke,{role:"alert",children:f}),n.hasUnpricedLine&&S(Ke,{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:x,disabled:u||!C&&(h||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",u||!C&&(t.length===0||h||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?S(Ie,{children:["Building order\u2026 ",i("span",{children:"\xB7"})]}):h?S(Ie,{children:["No online payment ",i("span",{children:"\xB7"})]}):C?S(Ie,{children:["Try payment again \xB7 ",It(C),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]}):n.repricing?S(Ie,{children:["Updating total\u2026 ",i("span",{children:"\xB7"})]}):S(Ie,{children:[s==="bank"?"Place order":"Continue to payment"," \xB7"," ",o(n.grand,n.currency),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})})]})]})}var wa={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 Ft({num:e,title:t,children:n}){return S("section",{className:"mb-6 border border-line bg-bg",children:[S("header",{className:"flex items-center gap-4 border-b border-line bg-surface px-6 py-4",children:[i("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e}),i("h2",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:t})]}),i("div",{className:"flex flex-col gap-4 px-6 py-6",children:n})]})}function Oa({cols:e="two",children:t}){return i("div",{className:["grid gap-3 max-[640px]:grid-cols-1",e==="two"?"grid-cols-2":"grid-cols-[1.2fr_1fr_1fr]"].join(" "),children:t})}function _t({active:e,onClick:t,title:n,body:r,price:o,tag:s}){return S("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 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"})}),S("span",{className:"flex min-w-0 flex-col gap-1",children:[S("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:o})]})}function oi({checked:e,onChange:t,label:n,sub:r}){return S("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"})}),S("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 ii({slug:e,name:t,qty:n,config:r,configSummary:o,price:s,currency:u}){let{catalog:m}=Pt(),{formatMoney:f}=be(),d=m.find(E=>E.slug===e),h=d?.spokes??5,C=d?.mesh??!1,x=r.find(E=>E.gold)?.label,y=d?.finishes.find(E=>E.name===x&&E.src)??d?.finishes.find(E=>E.src),w=d?.finishes[0]?.color??gr;return S("div",{className:"grid grid-cols-[60px_1fr_auto] items-center gap-4 border-b border-line py-4 last:border-b-0",children:[S("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:y?.src?i(Qn,{src:y.src,alt:`${t.lead}${t.accent} \u2014 ${y.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:w},children:i(fr,{spokes:h,mesh:C,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})]}),S("div",{className:"flex min-w-0 flex-col gap-0.5",children:[S("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:o})]}),i("span",{className:"text-right font-display text-[17px] font-bold tracking-[-0.005em] text-fg",children:f(s,u)})]})}function We({label:e,value:t}){return S("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 si(e){return e.map(t=>t.label).join(" \xB7 ")}import{Fragment as Y,jsx as c,jsxs as b}from"react/jsx-runtime";function dn(e){return c(ka,{...e,children:c(ui,{})})}function ci({order:e,paid:t}){let{formatMoney:n}=be();if(!e.grandTotal||!e.currency)return null;let r=u=>n(Number(u),e.currency),o=Number(e.freightCharge??0),s=Number(e.discountAmount??0);return b("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||o>0)&&b(Y,{children:[b("dt",{className:"text-fg-dim",children:["Delivery",e.shippingMethod?` \xB7 ${e.shippingMethod}`:""]}),c("dd",{className:"text-right font-mono",children:r(e.freightCharge??"0")})]}),s>0&&b(Y,{children:[b("dt",{className:"text-fg-dim",children:["Discount",e.couponCode?` \xB7 ${e.couponCode}`:""]}),b("dd",{className:"text-right font-mono",children:["\u2212",r(e.discountAmount??"0")]})]}),c("dt",{className:"text-fg",children:t?"Total paid":"Order total"}),c("dd",{className:"text-right font-mono text-fg",children:r(e.grandTotal)})]})}function li({result:e,lostChangeNote:t=null}){let n=c("span",{className:"font-mono text-fg",children:e.checkoutNumber});return b("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:e.kind==="refunded"||e.kind==="expired"?"Order not placed":e.kind==="processing"?"Payment processing":"Payment received"}),c("p",{className:"text-fg-dim",children:e.kind==="refunded"?b(Y,{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"?b(Y,{children:["The hold on checkout ",n," ran out before your payment arrived. Your payment goes back to your card."]}):e.kind==="processing"?b(Y,{children:["Your payment for checkout ",n," is being processed. When it goes through, we will email your order confirmation."]}):b(Y,{children:["Thank you \u2014 your payment",e.checkoutNumber?b(Y,{children:[" for checkout ",n]}):null," has gone through. We will email you the order number shortly."]})}),t&&e.kind!=="refunded"&&e.kind!=="expired"&&c("p",{className:"text-sm text-fg-dim",children:t}),c(he,{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 ui(){let{site:e,logo:t,items:n,placing:r,email:o,me:s,addressSaveNote:u,lostChangeNote:m,idemKey:f,confirmation:d,setConfirmation:h,payment:C,paypalStep:x,squareStep:y,pendingConf:w,paid:E,setPaid:A,payNote:J,afterpayConfirming:O,gocardlessConfirming:k,zipConfirming:W,klarnaConfirming:V,cardConfirming:M,checkoutResult:ae,confirmCardPayment:ve,cardStillProcessing:Te,renewCardPayment:pe,holdRenewed:B,leaveCardPayment:le,checkoutRootRef:me,setCheckoutHeaderEl:$}=Ae();return d?b("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:E?"Payment received":"Order received"}),b("p",{className:"text-fg-dim",children:[E?b(Y,{children:["Thank you \u2014 your payment for order"," ",c("span",{className:"font-mono text-fg",children:d.orderNumber})," has gone through."," "]}):b(Y,{children:["Thank you \u2014 your order ",c("span",{className:"font-mono text-fg",children:d.orderNumber})," is being reviewed by our team."," "]}),s?b(Y,{children:["Track it under"," ",c(he,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):c(Y,{children:"We\u2019ve emailed you a link to set a password and track it."})]}),c(ci,{order:d,paid:E}),m&&c("p",{className:"text-sm text-fg-dim",children:m}),J&&c("p",{className:"text-sm text-fg-dim",children:J}),u&&c("p",{className:"text-sm text-fg-dim",children:u}),!s&&b("p",{className:"text-sm text-fg-dim",children:["You can also"," ",c(he,{href:`/track?order=${encodeURIComponent(d.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email \u2014 no password needed."]}),c(he,{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"})]}):ae?c(li,{result:ae,lostChangeNote:m}):M?b("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Placing your order \u2014 one moment."})]}):O?b("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay \u2014 one moment."})]}):k?b("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Setting up your direct debit\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless \u2014 one moment."})]}):W?b("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip \u2014 one moment."})]}):V?b("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[c("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna \u2014 one moment."})]}):C&&w?c(di,{payment:C,checkout:w,holdRenewed:B,onPaid:ve,onProcessing:Te,onRenew:pe,onBack:le}):x&&w?c(gi,{confirmation:w,clientId:e.paypalClientId??"",idemKey:f,onPaid:()=>{A(!0),h(w)},onSkip:()=>h(w)}):y&&w?c(hi,{confirmation:w,applicationId:e.squareApplicationId??"",locationId:e.squareLocationId??"",environment:e.squareEnvironment??"production",idemKey:f,onPaid:()=>{A(!0),h(w)},onSkip:()=>h(w)}):b("div",{ref:me,className:"bg-bg text-fg",children:[b("header",{ref:$,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 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:[b(he,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[13px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",c("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),c(he,{href:"/","aria-label":`${e.name} home`,className:"inline-flex items-center justify-center",children:c(mr,{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,siteName:e.name})}),e.cardPayments?b("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[c("span",{className:"text-green",children:"\u25CF"}),c("span",{className:"max-[640px]:hidden",children:"Encrypted \xB7"})," Stripe"]}):c("span",{})]}),b("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:[c("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),c("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=>b("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:[c("span",{className:v.state==="done"?"text-accent font-bold":"",children:v.n}),c("span",{children:v.label})]},v.n))})]}),b("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:[b("div",{children:[c(Pa,{}),c(Na,{}),c(Sa,{}),c(Ea,{})]}),c(Ra,{})]}),c("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:c("span",{children:pr({legalName:e.legalName,foundedYear:e.foundedYear,siteName:e.name})})})]})}function di({payment:e,checkout:t,holdRenewed:n,onPaid:r,onProcessing:o,onRenew:s,onBack:u}){let{formatMoney:m}=be(),f=c("span",{className:"text-fg",children:m(Number(e.amount),e.currency)}),d=Aa(()=>Ot(e.publishableKey),[e.publishableKey]),h=Aa(()=>br(),[]);return c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:b("div",{className:"w-full max-w-xl border border-line bg-bg",children:[b("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[c("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:It(t)}),c("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),b("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:t.orderNumber?b(Y,{children:["Your order is placed. Pay ",f," by card to confirm it now."]}):n?b(Y,{children:["Your hold ran out, so your items are held again",t.expiresAt?` until ${Ia(t.expiresAt)}`:"",". Enter your card again, then pay ",f,"."]}):b(Y,{children:["Your items are held",t.expiresAt?` until ${Ia(t.expiresAt)}`:"",". Pay ",f," by card to place your order."]})}),c(Zt,{stripe:d,options:{clientSecret:e.clientSecret,appearance:h},children:c(mi,{payment:e,checkout:t,onPaid:r,onProcessing:o,onRenew:s,onBack:u})},e.clientSecret)]})]})})}function Ia(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}var pi=5;function mi({payment:e,checkout:t,onPaid:n,onProcessing:r,onRenew:o,onBack:s}){let{formatMoney:u}=be(),m=Kr(),f=Dr(),[d,h]=$e(!1),[C,x]=$e(null),y=et(!1);async function w(){try{return(await m.retrievePaymentIntent(e.clientSecret)).paymentIntent?.status}catch{return}}async function E(O){let k=O;for(let W=0;k==="processing"&&W<pi;W+=1)await new Promise(V=>setTimeout(V,1e3)),k=await w()??k;if(k==="succeeded"){n();return}if(k==="processing"){r();return}x("Payment did not complete. Please try again."),h(!1)}async function A(){if(!m||!f||d)return;h(!0),x(null),y.current=!0;let O=await m.confirmPayment({elements:f,redirect:"if_required"}).catch(()=>null);if(!O){let k=await w();if(k==="succeeded"||k==="processing"){await E(k);return}x(k===void 0?Oe:"Payment failed. Please try again."),h(!1);return}if(O.error){if(!t.orderNumber&&O.error.code==="payment_intent_unexpected_state"){let k=await w();if(k==="succeeded"||k==="processing"){await E(k);return}if(k===void 0){x(Oe),h(!1);return}await o(k==="canceled"),h(!1);return}x(O.error.message??"Payment failed. Please try again."),h(!1);return}await E(O.paymentIntent?.status)}async function J(){if(d)return;if(!y.current){s();return}h(!0),x(null);let O=await w();if(O==="succeeded"||O==="processing"){await E(O);return}if(h(!1),O===void 0){x(Oe);return}s()}return b("div",{className:"flex flex-col gap-4",children:[c(Ur,{}),C&&c(Ke,{role:"alert",children:C}),c("button",{type:"button",onClick:A,disabled:!m||!f||d,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!m||!f||d?"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:d?b(Y,{children:["Processing\u2026 ",c("span",{children:"\xB7"})]}):b(Y,{children:["Pay ",u(Number(e.amount),e.currency),c("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),!t.orderNumber&&!d&&b("button",{type:"button",onClick:J,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",c("span",{children:"Back to checkout"})]})]})}var Ta="paypal-sdk-js",ln=null;function fi(e,t){let n=`${e}|${t}`;if(ln?.key===n)return ln.promise;let r=new Promise((o,s)=>{document.getElementById(Ta)?.remove();let u=document.createElement("script");u.id=Ta;let m=new URLSearchParams({"client-id":e,currency:t,intent:"capture"});u.src=`https://www.paypal.com/sdk/js?${m}`,u.onload=()=>{let f=window.paypal;f?o(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 ln={key:n,promise:r},r}function gi({confirmation:e,clientId:t,idemKey:n,onPaid:r,onSkip:o}){let{formatMoney:s}=be(),u=et(null),[m,f]=$e(!1),[d,h]=$e(null),C=et(r);return C.current=r,_a(()=>{let x=!1,y=null;return fi(t,e.currency).then(w=>{if(!(x||!u.current))return y=w.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await U.createPaypalOrder({idempotencyKey:n})).paypalOrderId,onApprove:async E=>{try{if((await U.capturePaypalOrder({idempotencyKey:n,paypalOrderId:E.orderID})).status==="paid"){C.current();return}h("PayPal did not complete the payment. Please try again.")}catch(A){h(A instanceof de?A.message:"PayPal payment failed. Please try again.")}},onError:()=>{h("PayPal could not process the payment. Please try again.")}}),y.render(u.current).then(()=>{x||f(!0)})}).catch(()=>{x||h("PayPal could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{x=!0,y?.close?.()}},[t,e.currency,n]),c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:b("div",{className:"w-full max-w-xl border border-line bg-bg",children:[b("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[c("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}),c("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),b("div",{className:"flex flex-col gap-4 px-6 py-6",children:[b("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",c("span",{className:"text-fg",children:s(Number(e.grandTotal),e.currency)})," ","with PayPal to confirm it now."]}),!m&&!d&&c("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal\u2026"}),c("div",{ref:u}),d&&c(Ke,{role:"alert",children:d}),c("button",{type:"button",onClick:o,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 La="square-web-sdk",un=null;function yi(e){let t=e==="sandbox"?"sandbox":"production";if(un?.key===t)return un.promise;let n=new Promise((r,o)=>{document.getElementById(La)?.remove();let s=document.createElement("script");s.id=La,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):o(new Error("Square SDK loaded without its namespace"))},s.onerror=()=>o(new Error("Square SDK failed to load")),document.head.appendChild(s)});return un={key:t,promise:n},n}function hi({confirmation:e,applicationId:t,locationId:n,environment:r,idemKey:o,onPaid:s,onSkip:u}){let{formatMoney:m}=be(),f=et(null),d=et(null),h=et(null),[C,x]=$e(!1),[y,w]=$e(!1),[E,A]=$e(null);_a(()=>{let O=!1,k=null;return yi(r).then(async W=>{if(O||!f.current)return;let V=W.payments(t,n);h.current=V,k=await V.card(),await k.attach(f.current),d.current=k,O||x(!0)}).catch(()=>{O||A("Square could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{O=!0,k?.destroy?.()}},[t,n,r]);async function J(){let O=d.current;if(!(!O||y)){w(!0),A(null);try{let k=await O.tokenize();if(k.status!=="OK"||!k.token){A(k.errors?.[0]?.message??"Please check the card details and try again."),w(!1);return}let W;try{W=(await h.current?.verifyBuyer?.(k.token,{amount:String(e.grandTotal),currencyCode:e.currency,intent:"CHARGE"}))?.token}catch{}if((await U.chargeSquare({idempotencyKey:o,sourceId:k.token,...W?{verificationToken:W}:{}})).status==="paid"){s();return}A("Square did not complete the payment. Please try again.")}catch(k){A(k instanceof de?k.message:"Square payment failed. Please try again.")}w(!1)}}return c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:b("div",{className:"w-full max-w-xl border border-line bg-bg",children:[b("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[c("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}),c("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),b("div",{className:"flex flex-col gap-4 px-6 py-6",children:[b("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",c("span",{className:"text-fg",children:m(Number(e.grandTotal),e.currency)})," ","by card to confirm it now."]}),!C&&!E&&c("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form\u2026"}),c("div",{ref:f}),E&&c(Ke,{role:"alert",children:E}),c("button",{type:"button",onClick:J,disabled:!C||y,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!C||y?"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:y?b(Y,{children:["Processing\u2026 ",c("span",{children:"\xB7"})]}):b(Y,{children:["Pay ",m(Number(e.grandTotal),e.currency),c("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),c("button",{type:"button",onClick:u,disabled:y,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 qt}from"react/jsx-runtime";function bi(){let{settings:e,websiteName:t}=er(),n=t?{...zt,name:t}:zt,r=e?{url:e.logoUrl,reversed:e.logoReversed??null,inkIsDark:e.logoInkIsDark??null,reverse:e.reverseLogo,size:e.logoSize,sizePx:e.logoSizePx}:null;return qt("div",{style:{position:"fixed",inset:0,zIndex:2147482e3,overflowY:"auto",background:"var(--bg)",color:"var(--fg)"},children:qt(lr,{children:qt(dr,{preview:!0,children:qt(dn,{site:n,logo:r,preview:!0})})})})}export{bi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{$q as r}from"./chunk-JKJ76CRT.js";import"./chunk-JTDOMQMQ.js";import"./chunk-LRLOANKA.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 +1 @@
|
|
|
1
|
-
import{f as xt,i as be,q as St,s as vt,t as Et,v as q}from"./chunk-NSW5PCGW.js";import{Bb as ze,Cb as Ct,fb as ht,hb as Ge,ib as Ke,xb as ye,yb as bt}from"./chunk-IZEIMAJI.js";import{j as yt,l as le}from"./chunk-XYG76Y4H.js";import{createContext as vn,useContext as Lt,useEffect as En,useMemo as Ce,useState as Rt}from"react";function wt(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function ue(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var Xe=4,Br=1,qr={unit:"set",spares:0,spareSide:"left"};function _t(e){return e.unit==="single"?1:Xe+e.spares}function Wr(e,t){return[{partNumber:e.partNumber,wheels:_t(t),prices:e.prices}]}function Gr(e,t){let n=_t(t)-Xe;if(n<=0||e.length===0)return e;let r=Cn(e),o=r?r[t.spareSide]:0;return e.map((i,s)=>s===o?{...i,wheels:i.wheels+n}:i)}function Cn(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function xn(e,t){return t.spares>0?`${e} + spare`:e}function Kr(e){return e.unit==="single"?"Single":xn(`Set of ${Xe}`,e)}var zr="data-add-to-basket",Ve=9,Sn="en",Pt=new Map;function Ae(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=Pt.get(r);return o||(o=new Intl.NumberFormat(Sn,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),Pt.set(r,o)),o}function ce(e,t,n=0){return Ae(t,0,n).format(e)}function Xr(e,t){return Ae(t).format(e)}function Vr(e,t){let n=e.savings[t];if(n===void 0)return null;let r=ce(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as Rn}from"react/jsx-runtime";var Pn="storefront-country",Nt=Pn,Ye=vn(null);function wn(e){return kt(e,"catalogue")}function _n(e){return kt(e,"money")}function kt(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return Ae(o,t==="money"?i:0,i).format(r)}}function Jr({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=Ce(()=>t??[],[t]),s=Ce(()=>n??[],[n]),l=Ce(()=>r||i.find(m=>m.isDefault)?.code||i[0]?.code||"",[r,i]),u=Ce(()=>o||s.find(m=>m.isDefault)?.code||s[0]?.code||"",[o,s]),[c,f]=Rt(u),[x,d]=Rt(!1);En(()=>{let m=le.getItem(Nt);m&&s.some(O=>O.code===m)&&f(m),d(!0)},[s]);function N(m){f(m),le.setItem(Nt,m)}let w=Ce(()=>{let m=s.find(_=>_.code===c)??null,O=m?.currency,E=O&&i.some(_=>_.code===O)?O:l,F=wn(i),L=_n(i);return{country:c,currency:E,setCountry:N,currencies:i,countries:s,activeCountry:m,formatPrice:(_,S)=>F(_,S??E),formatMoney:(_,S)=>L(_,S??E),ready:x}},[c,i,s,l,x]);return Rn(Ye.Provider,{value:w,children:e})}function It(){let e=Lt(Ye);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}function eo(){return Lt(Ye)?.country??""}import{createContext as qn,useCallback as P,useContext as Wn,useEffect as Q,useMemo as Kt,useRef as de,useState as k}from"react";function At(){return"/edit"}function Ot(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Mt="We'll confirm this discount when you place your order.",io="Confirmed at checkout";function ao(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Tt="coupon_code: ";function so(e){return!(e instanceof be)||e.status!==400||!e.message.startsWith(Tt)?null:e.message.slice(Tt.length)}function Dt(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var Te="Price on request",Ln="Request a quote",kn="from ",fo="From ",po="each",Ft="Free";function Qe(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function je(e,t){let n=e?.[t];return Qe(n)?n:null}function mo(e,t,n,r){let o=je(e,n),i=je(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function go(e,t,n,r){if(n==null&&r==null)return!0;let o=je(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var In={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function An(e,t,n){if(!Qe(e))return In;let r=Qe(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function ho(e,t,n=""){return!e.priced||e.unit==null?Te:`${n}${ce(e.unit,t)}`}function yo(e,t){return e.was==null?null:ce(e.was,t)}function Tn(e,t,n=1){let r=ue(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((s,l)=>s+l.wheels,0),i=Math.min(...e.map(s=>s.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var On={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function bo(e,t,n,r=1){let o=An(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let s=Tn(t.components,n,r);return s.priced?{priced:!0,unit:s.unit,isFrom:s.isFrom,was:null,onSale:!1,setTotal:s.setTotal,fromSetTotal:i}:{...On,fromSetTotal:i}}function Mn(e,t){return!e.priced||e.unit==null?Te:`${e.isFrom?kn:""}${ce(e.unit,t)}`}function Co(e,t){return e.was==null?null:ce(e.was,t)}function xo(e,t){return!e.priced||e.unit==null?Ln:Mn(e,t)}var Dn=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Ut(e){return Dn.test(e.trim())}var $t="sf:ga-purchases",Fn=20;function Bt(){return typeof window>"u"||window.parent!==window}function xe(...e){try{if(Bt()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Un(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:ue(e.components,t)??0,quantity:e.qty}}function Ze(e,t){return e.filter(Oe).map(n=>Un(n,t))}function _o(e){xe("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function qt(e,t){let n=Ze([e],t);n.length!==0&&xe("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Ro(e){let t=Ze(e.lines,e.currency);t.length!==0&&xe("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Ht=new Set;function $n(e){if(Ht.has(e))return!1;Ht.add(e);try{let t=JSON.parse(le.getItem($t)??"[]");if(t.includes(e))return!1;le.setItem($t,JSON.stringify([...t,e].slice(-Fn)))}catch{}return!0}function No(e){let t=e.confirmation;if(Bt()||!$n(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);xe("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Ze(e.lines,n)}),e.adsSendTo&&xe("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var Hn="Arranged after review",Wt="Calculated at checkout",Bn=Wt,Io=Wt;function Gt({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function Ao(e){switch(e){case"arranged":return Hn;case"pending":return Bn;case"free":return Ft;case"charged":return null}}import{jsx as Xn}from"react/jsx-runtime";var Gn=400,Kn=400,zn=1500;function Oe(e){return(e.components?.length??0)>0}function zt(e,t){return{code:e,valid:t.valid,deferred:Ot(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function Vt(e,t){return ue(e.components,t)}function Je(e,t){let n=Vt(e,t);return n===null?null:n*e.qty}function Xt(e){return e!=="tyre"}var Yt=qn(null);function Ko({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=It(),[i,s]=k(t),[l,u]=k([]),[c,f]=k([]),[x,d]=k([]),[N,w]=k(!1),[m,O]=k(!1),[E,F]=k(!1),[L,_]=k(!1),[S,z]=k(null),[A,X]=k(0),y=P(()=>X(a=>a+1),[]),[C,b]=k(void 0),[W,we]=k(null),[v,G]=k(null),[ne,U]=k(!1),[M,_e]=k(null),V=de(void 0),K=P(()=>s(!0),[]),J=P(()=>s(!1),[]),re=P(()=>s(a=>!a),[]);Q(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&K()},[K,t]);let oe=At(),$=de(oe);Q(()=>{$.current!==oe&&($.current=oe,t||J())},[oe,t,J]);let Re=P(a=>{we(p=>p?.country===a?.country&&p?.subdivision===a?.subdivision&&p?.postcode===a?.postcode?p:a)},[]),D=P(a=>{_(!0),Xt(a)&&F(!0)},[]),Ne=E||l.some(a=>Xt(a.kind)),ie=L||l.length>0;Q(()=>{if(t||!Ne||N)return;let a=!0;return q.listWheels().then(p=>{a&&(f(p),w(!0))}),()=>{a=!1}},[t,Ne,N]),Q(()=>{if(t||!ie||m)return;let a=!0;return q.listBundles().then(p=>{a&&(d(p),O(!0))}),()=>{a=!1}},[t,ie,m]);let H=S?.deliveryOptions??[],fe=S?.courier??null;Q(()=>{S&&_e(a=>a&&H.some(p=>p.id===a)?a:H[0]?.id??null)},[S]);let ee=P(()=>l.filter(Oe).flatMap(a=>wt(a.components,a.qty)),[l]),pe=P(async(a,p)=>{let h=a.trim().toUpperCase();if(!h)return;let g=ee();if(g.length===0){G({code:h,valid:!1,message:"Add a wheel to the cart first."});return}U(!0),V.current=p;try{let I=await q.validateCoupon({code:h,items:g,currency:n,shippingMethodId:M??void 0,customerEmail:p});G(zt(h,I))}catch{G({code:h,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{U(!1)}},[ee,n,M]),ae=P(()=>{G(null),V.current=void 0},[]),Le=P(a=>{if(!v)return;let{code:p}=v;G(h=>h&&h.code===p?{code:p,valid:!1,refused:!0,message:a}:h)},[v]);Q(()=>{if(!v||v.refused)return;let a=v.code,p=g=>g!==null&&g.code===a&&!g.refused,h=setTimeout(async()=>{let g=ee();if(g.length===0){G(I=>p(I)?{code:a,valid:!1,message:"Add a wheel to the cart first."}:I);return}U(!0);try{let I=await q.validateCoupon({code:a,items:g,currency:n,shippingMethodId:M??void 0,customerEmail:V.current});G(he=>p(he)?zt(a,I):he)}catch{}finally{U(!1)}},Gn);return()=>clearTimeout(h)},[l,n,M]);let me=v&&!v.refused?v.code:void 0;Q(()=>{if(t)return;let a=!0,p=setTimeout(async()=>{let h=ee();if(h.length===0){z(null),b(void 0);return}try{let g=await q.quoteCart({items:h,currency:n,shippingMethodId:M??void 0,couponCode:me,customerEmail:V.current||void 0,country:W?.country||r||void 0,subdivision:W?.country&&W.subdivision||void 0,postcode:W?.country&&W.postcode||void 0});if(!a)return;z(g)}catch{if(!a)return}b(me)},Kn);return()=>{a=!1,clearTimeout(p)}},[l,n,M,me,r,W,A]);let R=P(a=>{u(p=>{let h=p.findIndex(g=>g.id===a.id);return h===-1?[...p,a]:p.map((g,I)=>I===h?{...g,qty:Math.min(Ve,g.qty+a.qty)}:g)}),qt(a,n)},[n]),Y=P(a=>{u(p=>p.filter(h=>h.id!==a))},[]),ke=P((a,p)=>{let h=Math.max(1,Math.min(Ve,p));u(g=>g.map(I=>I.id===a?{...I,qty:h}:I))},[]),at=P(a=>{u(a)},[]),[ge,fn]=k(null),st=de(null);st.current=ge;let B=de(null),Be=de(""),lt=P((a,p)=>{let h=a.trim().toLowerCase();Ut(h)&&fn(g=>g&&g.email===h&&g.firstName===(p??"")?g:{email:h,firstName:p??""})},[]);Q(()=>{if(t||!ge)return;let a=Dt(l.filter(Oe),g=>Je(g,n)===null?Te:o(Je(g,n),n)),p={email:ge.email,firstName:ge.firstName,currency:n,items:a},h=JSON.stringify(p);if(h!==Be.current)return B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null,Be.current=h,q.captureCart(p).catch(g=>{})},zn),()=>{B.current&&(clearTimeout(B.current),B.current=null)}},[l,ge,n,t]);let ut=P(()=>{B.current&&(clearTimeout(B.current),B.current=null);let a=st.current;a&&(Be.current="",q.captureCart({email:a.email,firstName:a.firstName,currency:n,items:[]}).catch(p=>{}))},[n]),ct=Kt(()=>{let a=l.reduce((T,se)=>{let Ie=Je(se,n);return Ie===null?T:T+Ie},0),p=l.some(T=>Vt(T,n)===null),h=l.reduce((T,se)=>T+se.qty,0),g=v?.valid?v.effects:void 0,I=g?Math.min(a,Number(g.discountAmount)):0,he=S?.bundleDiscount??0,mn=S?.appliedBundles??[],qe=!!g?.freeShipping,mt=H.find(T=>T.id===M),gt=qe?0:S?.shipping??mt?.amount??0,gn=Gt({quoted:S!==null,optionCount:H.length,chosenAmount:mt?.amount,couponWaivesFreight:qe}),We={};for(let T of g?.freeUnits??[])We[T.partNumber]=(We[T.partNumber]??0)+T.quantity;let hn=S?.tax??null,yn=S?S.grandTotal:a-I-he+gt;return{sets:h,units:l.reduce((T,se)=>T+(se.components??[]).reduce((Ie,bn)=>Ie+bn.wheels*se.qty,0),0),subtotal:a,hasUnpricedLine:p,discount:I,bundleDiscount:he,appliedBundles:mn,shipping:gt,freeShipping:qe,shippingStatus:gn,freeUnitsByPartNumber:We,tax:hn,grand:yn,repricing:!!v?.refused&&S!==null&&C===v?.code,currency:n}},[l,n,v,H,M,S,C]),dt=de(!0),ft=P(a=>{dt.current=a},[]),pt=P(a=>{R(a),dt.current&&K()},[R,K]),pn=Kt(()=>({isOpen:i,preview:t,open:K,close:J,toggle:re,items:l,catalog:c,bundles:x,warmCatalog:D,add:R,addAndOpen:pt,setAutoOpen:ft,remove:Y,setQty:ke,replaceItems:at,identify:lt,clearCapturedCart:ut,coupon:v,applyCoupon:pe,removeCoupon:ae,refuseCoupon:Le,couponBusy:ne,deliveryOptions:H,setQuoteDestination:Re,courier:fe,requote:y,shippingMethodId:M,setShippingMethodId:_e,totals:ct}),[i,t,K,J,re,l,c,x,D,R,pt,ft,Y,ke,at,lt,ut,v,pe,ae,Le,ne,H,Re,fe,y,M,ct]);return Xn(Yt.Provider,{value:pn,children:e})}function Qt(){let e=Wn(Yt);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as or}from"react";function jt(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,u]of e){if(u.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let s=o??i??e.keys().next().value;if(s===void 0)return;e.delete(s)}}var Vn=6e4,Yn=5e3,Qn=500,Me=new Map;async function jn(e){let{host:t,matchesRequestHost:n}=await St();if(!t)return"";let r=await vt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var Zn=e=>e.includes("|slug:")||e.includes("|xhost:");async function Zt(e,t){if(await Et()!==null)return t();let n=await jn(e);if(!n)return t();let r=Date.now(),o=Me.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),s=i.outcome.state==="failed",l=s?Yn:Vn,u=Me.get(n)?.lastGood,c=i.outcome.state==="ok"?i:s?u:void 0,f=s&&c?c:i;return jt(Me,Qn,Zn,r),Me.set(n,{load:f,expiresAt:r+l,lastGood:c}),f}var Jn=404;function er(e){if(e instanceof be&&e.status===Jn)return{state:"absent"};let t=e instanceof be?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var tr="[storefront:chrome-load-failed]";function nr(e,t){console.error(`${tr} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function Jt(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=er(o);return i.state==="failed"&&nr(e,i),{value:n,outcome:i}}}function rr(e){return e==="production"?"silent":"banner"}var Jo=rr("production");function ir(e,t){return e?.trim()||t}function si({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=ir(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var ar={name:ye,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:ze},li=or(async()=>Zt("site",()=>Jt("site",async()=>{let e=await q.getSite();return{name:bt(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,socialLinks:Ct(e.socialLinks)}},ar)));var ui={name:ye,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:ze};import{jsx as ve,jsxs as et}from"react/jsx-runtime";import{useEffect as De,useId as cr,useRef as tn,useState as Fe}from"react";import{useRootIsDark as dr}from"efficient-shell/theme";import{efficientClientOpen as sr}from"efficient-easel/screen/lib/session";var Se=new Map,lr=64;async function ur(e){if(!sr())return null;try{let t=await fetch(`${yt()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function en(e){let t=Se.get(e);if(t)return t;let n=ur(e);if(Se.set(e,n),Se.size>lr){let r=Se.keys().next();r.done||Se.delete(r.value)}return n}var fr=202/22,pr=.88,_i=16,mr="invert(1)";function Ri({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:s,inkIsDark:l,size:u="medium",sizePx:c,wordmark:f,siteName:x=ye,fitToContainer:d=!1,fitWordmarkToContainer:N=!1,fitFloorPx:w,hideClass:m,hideAttrs:O}){let E=f&&f.trim()?f.trim():x,[F,L]=Fe(null),_=tn(null),S=R=>{_.current=R};De(()=>{L(_.current?.ownerDocument??null)},[]);let z=!dr({doc:F,whenUnset:!0}),A=n&&n.trim()?n.trim():null,X=!!A&&xt(A),y=i??(z&&t),C=o&&o.trim()?o.trim():null,b=r&&!C,W=`logo-color-${cr().replace(/[^A-Za-z0-9_-]/g,"")}`,we=b&&X&&A&&s!=null?{reversed:s,inkIsDark:l??null}:null,v=we!==null,[G,ne]=Fe(null);De(()=>{if(!b||!A||!X||v){ne(null);return}let R=!1;return ne(null),en(A).then(Y=>{R||ne(Y)}),()=>{R=!0}},[b,A,X,v]);let U=we??G,M=!!U&&U.inkIsDark!==null&&(y?!U.inkIsDark:U.inkIsDark),_e=b&&!!A&&!X&&!y,V=M&&U?U.reversed:A,K=V?[V]:[],[J,re]=Fe(0);De(()=>{re(0)},[A,M]);let oe=e==="footer"?Ke:Ge[u],$=c&&c>0?c:oe,Re=Math.round($*fr),D=J<K.length?K[J]:null,[Ne,ie]=Fe(V),H=D!==null&&D===Ne,fe=tn(null);De(()=>{let R=fe.current;if(!R||!R.complete)return;if(R.naturalWidth>0||R.naturalHeight>0){ie(D);return}let Y=!1;return R.decode().then(()=>!Y&&ie(D),()=>!Y&&re(ke=>ke+1)),()=>{Y=!0}},[D]);let ee=d||N,pe=`calc(100cqi / ${((E.length+1)*pr).toFixed(2)})`,ae=ee&&w&&w>0?Math.min(w,$):null,Le=ee?ae===null?`min(${$}px, ${pe})`:`clamp(${ae}px, ${pe}, ${$}px)`:`${$}px`,me=et("span",{className:`font-display font-bold tracking-[0.18em] ${ae===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Le,lineHeight:1,...C?{color:C}:{}},"aria-label":E,children:[E,ve("span",{className:"text-accent",style:C?{color:C}:void 0,children:"."})]});return et("span",{ref:S,className:ht("inline-flex items-center",m??""),...O,children:[!H&&me,C&&D&&ve("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:et("filter",{id:W,colorInterpolationFilters:"sRGB",children:[ve("feFlood",{style:{floodColor:C}}),ve("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),D&&ve("img",{ref:fe,src:D,alt:E,width:Re,height:$,className:"shrink-0 object-contain",style:{...H?{height:`${$}px`,width:"auto",...d?{maxWidth:"100cqi"}:{}}:{display:"none"},..._e?{filter:mr}:{},...C?{filter:`url(#${W})`}:{}},onLoad:()=>ie(D),onError:()=>re(R=>R+1)},D)]})}import{jsx as gr}from"react/jsx-runtime";function Li({tone:e="bad",role:t,children:n}){return gr("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as Ee,jsxs as yr}from"react/jsx-runtime";function hr({spokes:e,mesh:t=!1,className:n}){let s=u=>Math.round(u*1e3)/1e3,l=[];for(let u=0;u<e;u++){let c=u/e*Math.PI*2-Math.PI/2;if(l.push({x1:s(100+Math.cos(c)*22),y1:s(100+Math.sin(c)*22),x2:s(100+Math.cos(c)*86),y2:s(100+Math.sin(c)*86),main:!0}),t){let f=c+Math.PI/e;l.push({x1:s(100+Math.cos(f)*22*1.4),y1:s(100+Math.sin(f)*22*1.4),x2:s(100+Math.cos(f)*78),y2:s(100+Math.sin(f)*78),main:!1})}}return yr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[Ee("circle",{cx:100,cy:100,r:92,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),Ee("circle",{cx:100,cy:100,r:22,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((u,c)=>Ee("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"currentColor",strokeWidth:u.main?6:3,strokeLinecap:"round",opacity:u.main?1:.5},c))]})}var Oi="#c9a461",nn=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],Mi={name:"",color:"var(--fg)",family:"silver",src:""};function br(e,t){let n=r=>{let o=nn.findIndex(i=>i.f===r);return o===-1?nn.length:o};return n(e)-n(t)||e.localeCompare(t)}function Di(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(br)}import{useState as Cr}from"react";import{jsx as te,jsxs as tt}from"react/jsx-runtime";function xr({customerEmail:e}){let{coupon:t,applyCoupon:n,removeCoupon:r,couponBusy:o}=Qt(),[i,s]=Cr("");async function l(){o||!i.trim()||(await n(i,e),s(""))}return tt("div",{className:"flex flex-col gap-2",children:[t===null?tt("div",{className:"flex border border-line",children:[te("input",{type:"text",value:i,onChange:u=>s(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),l())},placeholder:"Coupon code","aria-label":"Coupon code",className:"flex-1 bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim"}),te("button",{type:"button",onClick:()=>{l()},disabled:o,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Apply"})]}):tt("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",t.valid?"border-accent":"border-line"].join(" "),style:t.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[te("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",t.valid?"text-accent":t.deferred||t.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:t.code}),t.unchecked&&te("button",{type:"button",onClick:()=>{n(t.code,e)},disabled:o,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Try again"}),te("button",{type:"button",onClick:r,"aria-label":`Remove coupon ${t.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),t?.deferred?te("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:Mt}):t&&!t.valid&&t.message&&te("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:t.message})]})}var nt="Ads on. Shopper can opt out.",Ue="Ads and analytics off until Accept",Sr={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:nt,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Ue,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:nt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:nt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function vr(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function Wi(e,t,n){let r=vr(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var Gi={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};var Er={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var Pr=Er;function Vi(e=Pr){if(e.asked)return e.ads?"granted":"denied"}function Qi(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as _r,isValidElement as Rr,useEffect as on,useId as Nr,useLayoutEffect as ln,useRef as j,useState as an}from"react";var $e=(e,t)=>!!e[t]&&!e[t].disabled;function rt(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if($e(e,i))return i}return t}function ot(e,t){return rt(e,t===1?-1:e.length,t)}function it(e,t){return $e(e,t)?t:Math.max(ot(e,1),0)}function rn(e,t,n){let{open:r,focus:o}=e,i=s=>({...e,...s});if(t.length===1&&/\S/.test(t)){let s=e.typed+t.toLowerCase(),l=n.findIndex((u,c)=>$e(n,c)&&u.label.toLowerCase().startsWith(s));return{state:i({open:!0,typed:s,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:rt(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:rt(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:ot(n,1)}),handled:!0};case"End":return{state:i({focus:ot(n,-1)}),handled:!0};case"Enter":case" ":return $e(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Lr}from"efficient-shell/ui";import{Fragment as Dr,jsx as Z,jsxs as un}from"react/jsx-runtime";var sn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function kr({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[s,l]=an(!1),u=r!==void 0,c=u?r:s,[f,x]=an(0),d=j({text:"",timer:0}),N=j(null),w=j(null),m=j(null),O=Nr(),E=j(null),F=e.findIndex(y=>y.value===t),L=y=>{y!==c&&(u||l(y),y?o?.():i?.())},_=y=>{let C=e[y];!C||C.disabled||(n(C.value),L(!1),w.current?.focus())},S=y=>{let C={open:c,focus:c?f:it(e,F),typed:d.current.text},b=rn(C,y,e);return!b.handled&&b.state.open===c?!1:(b.state.typed!==C.typed&&(d.current.text=b.state.typed,window.clearTimeout(d.current.timer),d.current.timer=window.setTimeout(()=>{d.current.text=""},500)),x(b.state.focus),b.commit!==void 0?_(b.commit):L(b.state.open),b.refocus&&w.current?.focus(),b.handled)},z=j(S);z.current=S;let A=j(()=>L(!1));A.current=()=>L(!1);let X=y=>{c||(E.current=y.nativeEvent,z.current(y.key)&&y.preventDefault())};return on(()=>{if(!c)return;let y=b=>{N.current?.contains(b.target)||A.current()},C=b=>{b!==E.current&&z.current(b.key)&&b.preventDefault()};return document.addEventListener("mousedown",y),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",C)}},[c]),on(()=>{c&&(d.current.text||x(it(e,F)))},[c]),ln(()=>{if(!c||!m.current)return;m.current.children.item(f)?.scrollIntoView({block:"nearest"})},[f,c]),{open:c,toggle:()=>L(!c),close:()=>L(!1),focusIdx:f,setFocusIdx:x,pick:y=>_(e.findIndex(C=>C.value===y)),wrapRef:N,triggerRef:w,listRef:m,listId:O,onTriggerKeyDown:X,activeId:c?`${O}-${f}`:void 0}}var Ir={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${sn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${sn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function Ar(e,t){ln(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let s=n.offsetParent??n.parentElement;if(!s)return;let l=s.getBoundingClientRect(),u=n.getBoundingClientRect(),c=Math.abs(u.right-l.right)<Math.abs(u.left-l.left)?"end":"start",f=Lr({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:u.width,height:u.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:c,side:"bottom"});if(f.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let d=f.top+Math.min(u.height,f.maxHeight);i.marginBottom=`${Math.max(0,l.top-d)}px`}f.maxHeight<u.height&&(i.maxHeight=`${f.maxHeight}px`,i.overflowY="auto");let x=f.left-u.left;x&&(i.translate=`${x}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Tr(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function Or({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:s,listRef:l,ariaLabel:u,align:c="start"}){let f=Ir[t],x=j(null);return Ar(x,n.length),Z("ul",{ref:d=>{x.current=d,l&&(l.current=d)},id:e,role:"listbox","aria-label":u,...f.pickerMarker?{"data-picker-menu":""}:{},className:c==="end"?Tr(f.list):f.list,children:n.map((d,N)=>{let w=d.value===r;return Z("li",{id:`${e}-${N}`,role:"option","aria-selected":w,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&i(N),onMouseDown:m=>{m.preventDefault(),d.disabled||s(d.value)},className:f.item(N===o,w&&d.value!=="",!!d.disabled,N===n.length-1),style:f.itemStyle?.(w),children:d.meta===void 0?d.label:un(Dr,{children:[d.lead,Z("span",{className:"flex-1 whitespace-nowrap",children:d.label}),Z("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${N}`)})})}function Mr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:s,id:l,"aria-label":u,align:c}){let f=_r.toArray(r).flatMap(m=>{if(!Rr(m))return[];if(m.type!=="option")return[];let E=m.props,F=E.value!==void 0?String(E.value):"",L=E.children,_=typeof L=="string"||typeof L=="number"?String(L):F;return[{value:F,label:_,disabled:!!E.disabled}]}),x=e??"",d=kr({items:f,value:x,onPick:m=>t?.({target:{value:m}})}),w=f.find(m=>m.value===x)?.label??f[0]?.label??"";return un("div",{ref:d.wrapRef,className:"relative",children:[s&&Z("input",{type:"hidden",name:s,value:x}),Z("button",{ref:m=>{d.triggerRef.current=m},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":d.open,"aria-controls":d.open?d.listId:void 0,"aria-activedescendant":d.activeId,"aria-label":u,id:l,onClick:()=>!n&&d.toggle(),onKeyDown:m=>!n&&d.onTriggerKeyDown(m),className:`block w-full ${o??""}`,style:i,children:Z("span",{className:"block w-full truncate text-left",children:w})}),d.open&&Z(Or,{id:d.listId,tone:"select",items:f,value:x,focusIdx:d.focusIdx,onFocus:d.setFocusIdx,onPick:d.pick,listRef:d.listRef,align:c})]})}import{jsx as Pe,jsxs as He}from"react/jsx-runtime";var Fr="font-mono text-[length:var(--size-label,12px)]",Ur="font-semibold uppercase tracking-[0.22em] text-fg";function cn(e){return`${e??Fr} ${Ur}`}function dn(){return Pe("span",{className:"text-accent",children:" *"})}function $r({children:e,required:t,labelFace:n}){return He("span",{className:cn(n),children:[e,t?Pe(dn,{}):null]})}function Hr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:s,children:l}){let u=s?`flex flex-col gap-2 ${s}`:"flex flex-col gap-2",c=n?Pe("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?He("div",{className:u,children:[He("label",{htmlFor:o,className:cn(i),children:[e,t?Pe(dn,{}):null]}),l,c]}):He("label",{htmlFor:o,className:u,children:[Pe($r,{required:t,labelFace:i,children:e}),l]})}var la="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";export{At as a,io as b,ao as c,so as d,wt as e,Xe as f,Br as g,qr as h,Wr as i,Gr as j,Cn as k,xn as l,Kr as m,zr as n,Ve as o,Ae as p,ce as q,Xr as r,Vr as s,Te as t,Ln as u,kn as v,fo as w,po as x,Ft as y,je as z,mo as A,go as B,An as C,ho as D,yo as E,Tn as F,bo as G,Mn as H,Co as I,xo as J,Ut as K,_o as L,Ro as M,No as N,Io as O,Ao as P,Jr as Q,It as R,eo as S,Oe as T,Je as U,Ko as V,Qt as W,si as X,ar as Y,ui as Z,_i as _,Ri as $,hr as aa,Oi as ba,nn as ca,Mi as da,br as ea,Di as fa,xr as ga,Li as ha,Sr as ia,Wi as ja,Gi as ka,Er as la,Vi as ma,Qi as na,kr as oa,Or as pa,Mr as qa,$r as ra,Hr as sa,la as ta};
|
|
1
|
+
import{f as xt,i as be,q as St,s as vt,t as Et,v as q}from"./chunk-CEFKTE5A.js";import{Ab as ze,Bb as Ct,eb as ht,gb as Ge,hb as Ke,wb as ye,xb as bt}from"./chunk-JTDOMQMQ.js";import{j as yt,l as le}from"./chunk-LRLOANKA.js";import{createContext as vn,useContext as Lt,useEffect as En,useMemo as Ce,useState as Rt}from"react";function wt(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function ue(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var Xe=4,Br=1,qr={unit:"set",spares:0,spareSide:"left"};function _t(e){return e.unit==="single"?1:Xe+e.spares}function Wr(e,t){return[{partNumber:e.partNumber,wheels:_t(t),prices:e.prices}]}function Gr(e,t){let n=_t(t)-Xe;if(n<=0||e.length===0)return e;let r=Cn(e),o=r?r[t.spareSide]:0;return e.map((i,s)=>s===o?{...i,wheels:i.wheels+n}:i)}function Cn(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function xn(e,t){return t.spares>0?`${e} + spare`:e}function Kr(e){return e.unit==="single"?"Single":xn(`Set of ${Xe}`,e)}var zr="data-add-to-basket",Ve=9,Sn="en",Pt=new Map;function Ae(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=Pt.get(r);return o||(o=new Intl.NumberFormat(Sn,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),Pt.set(r,o)),o}function ce(e,t,n=0){return Ae(t,0,n).format(e)}function Xr(e,t){return Ae(t).format(e)}function Vr(e,t){let n=e.savings[t];if(n===void 0)return null;let r=ce(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as Rn}from"react/jsx-runtime";var Pn="storefront-country",Nt=Pn,Ye=vn(null);function wn(e){return kt(e,"catalogue")}function _n(e){return kt(e,"money")}function kt(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return Ae(o,t==="money"?i:0,i).format(r)}}function Jr({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=Ce(()=>t??[],[t]),s=Ce(()=>n??[],[n]),l=Ce(()=>r||i.find(m=>m.isDefault)?.code||i[0]?.code||"",[r,i]),u=Ce(()=>o||s.find(m=>m.isDefault)?.code||s[0]?.code||"",[o,s]),[c,f]=Rt(u),[x,d]=Rt(!1);En(()=>{let m=le.getItem(Nt);m&&s.some(O=>O.code===m)&&f(m),d(!0)},[s]);function N(m){f(m),le.setItem(Nt,m)}let w=Ce(()=>{let m=s.find(_=>_.code===c)??null,O=m?.currency,E=O&&i.some(_=>_.code===O)?O:l,F=wn(i),L=_n(i);return{country:c,currency:E,setCountry:N,currencies:i,countries:s,activeCountry:m,formatPrice:(_,S)=>F(_,S??E),formatMoney:(_,S)=>L(_,S??E),ready:x}},[c,i,s,l,x]);return Rn(Ye.Provider,{value:w,children:e})}function It(){let e=Lt(Ye);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}function eo(){return Lt(Ye)?.country??""}import{createContext as qn,useCallback as P,useContext as Wn,useEffect as Q,useMemo as Kt,useRef as de,useState as k}from"react";function At(){return"/edit"}function Ot(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Mt="We'll confirm this discount when you place your order.",io="Confirmed at checkout";function ao(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Tt="coupon_code: ";function so(e){return!(e instanceof be)||e.status!==400||!e.message.startsWith(Tt)?null:e.message.slice(Tt.length)}function Dt(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var Te="Price on request",Ln="Request a quote",kn="from ",fo="From ",po="each",Ft="Free";function Qe(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function je(e,t){let n=e?.[t];return Qe(n)?n:null}function mo(e,t,n,r){let o=je(e,n),i=je(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function go(e,t,n,r){if(n==null&&r==null)return!0;let o=je(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var In={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function An(e,t,n){if(!Qe(e))return In;let r=Qe(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function ho(e,t,n=""){return!e.priced||e.unit==null?Te:`${n}${ce(e.unit,t)}`}function yo(e,t){return e.was==null?null:ce(e.was,t)}function Tn(e,t,n=1){let r=ue(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((s,l)=>s+l.wheels,0),i=Math.min(...e.map(s=>s.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var On={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function bo(e,t,n,r=1){let o=An(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let s=Tn(t.components,n,r);return s.priced?{priced:!0,unit:s.unit,isFrom:s.isFrom,was:null,onSale:!1,setTotal:s.setTotal,fromSetTotal:i}:{...On,fromSetTotal:i}}function Mn(e,t){return!e.priced||e.unit==null?Te:`${e.isFrom?kn:""}${ce(e.unit,t)}`}function Co(e,t){return e.was==null?null:ce(e.was,t)}function xo(e,t){return!e.priced||e.unit==null?Ln:Mn(e,t)}var Dn=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Ut(e){return Dn.test(e.trim())}var $t="sf:ga-purchases",Fn=20;function Bt(){return typeof window>"u"||window.parent!==window}function xe(...e){try{if(Bt()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Un(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:ue(e.components,t)??0,quantity:e.qty}}function Ze(e,t){return e.filter(Oe).map(n=>Un(n,t))}function _o(e){xe("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function qt(e,t){let n=Ze([e],t);n.length!==0&&xe("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Ro(e){let t=Ze(e.lines,e.currency);t.length!==0&&xe("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Ht=new Set;function $n(e){if(Ht.has(e))return!1;Ht.add(e);try{let t=JSON.parse(le.getItem($t)??"[]");if(t.includes(e))return!1;le.setItem($t,JSON.stringify([...t,e].slice(-Fn)))}catch{}return!0}function No(e){let t=e.confirmation;if(Bt()||!$n(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);xe("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Ze(e.lines,n)}),e.adsSendTo&&xe("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var Hn="Arranged after review",Wt="Calculated at checkout",Bn=Wt,Io=Wt;function Gt({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function Ao(e){switch(e){case"arranged":return Hn;case"pending":return Bn;case"free":return Ft;case"charged":return null}}import{jsx as Xn}from"react/jsx-runtime";var Gn=400,Kn=400,zn=1500;function Oe(e){return(e.components?.length??0)>0}function zt(e,t){return{code:e,valid:t.valid,deferred:Ot(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function Vt(e,t){return ue(e.components,t)}function Je(e,t){let n=Vt(e,t);return n===null?null:n*e.qty}function Xt(e){return e!=="tyre"}var Yt=qn(null);function Ko({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=It(),[i,s]=k(t),[l,u]=k([]),[c,f]=k([]),[x,d]=k([]),[N,w]=k(!1),[m,O]=k(!1),[E,F]=k(!1),[L,_]=k(!1),[S,z]=k(null),[A,X]=k(0),y=P(()=>X(a=>a+1),[]),[C,b]=k(void 0),[W,we]=k(null),[v,G]=k(null),[ne,U]=k(!1),[M,_e]=k(null),V=de(void 0),K=P(()=>s(!0),[]),J=P(()=>s(!1),[]),re=P(()=>s(a=>!a),[]);Q(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&K()},[K,t]);let oe=At(),$=de(oe);Q(()=>{$.current!==oe&&($.current=oe,t||J())},[oe,t,J]);let Re=P(a=>{we(p=>p?.country===a?.country&&p?.subdivision===a?.subdivision&&p?.postcode===a?.postcode?p:a)},[]),D=P(a=>{_(!0),Xt(a)&&F(!0)},[]),Ne=E||l.some(a=>Xt(a.kind)),ie=L||l.length>0;Q(()=>{if(t||!Ne||N)return;let a=!0;return q.listWheels().then(p=>{a&&(f(p),w(!0))}),()=>{a=!1}},[t,Ne,N]),Q(()=>{if(t||!ie||m)return;let a=!0;return q.listBundles().then(p=>{a&&(d(p),O(!0))}),()=>{a=!1}},[t,ie,m]);let H=S?.deliveryOptions??[],fe=S?.courier??null;Q(()=>{S&&_e(a=>a&&H.some(p=>p.id===a)?a:H[0]?.id??null)},[S]);let ee=P(()=>l.filter(Oe).flatMap(a=>wt(a.components,a.qty)),[l]),pe=P(async(a,p)=>{let h=a.trim().toUpperCase();if(!h)return;let g=ee();if(g.length===0){G({code:h,valid:!1,message:"Add a wheel to the cart first."});return}U(!0),V.current=p;try{let I=await q.validateCoupon({code:h,items:g,currency:n,shippingMethodId:M??void 0,customerEmail:p});G(zt(h,I))}catch{G({code:h,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{U(!1)}},[ee,n,M]),ae=P(()=>{G(null),V.current=void 0},[]),Le=P(a=>{if(!v)return;let{code:p}=v;G(h=>h&&h.code===p?{code:p,valid:!1,refused:!0,message:a}:h)},[v]);Q(()=>{if(!v||v.refused)return;let a=v.code,p=g=>g!==null&&g.code===a&&!g.refused,h=setTimeout(async()=>{let g=ee();if(g.length===0){G(I=>p(I)?{code:a,valid:!1,message:"Add a wheel to the cart first."}:I);return}U(!0);try{let I=await q.validateCoupon({code:a,items:g,currency:n,shippingMethodId:M??void 0,customerEmail:V.current});G(he=>p(he)?zt(a,I):he)}catch{}finally{U(!1)}},Gn);return()=>clearTimeout(h)},[l,n,M]);let me=v&&!v.refused?v.code:void 0;Q(()=>{if(t)return;let a=!0,p=setTimeout(async()=>{let h=ee();if(h.length===0){z(null),b(void 0);return}try{let g=await q.quoteCart({items:h,currency:n,shippingMethodId:M??void 0,couponCode:me,customerEmail:V.current||void 0,country:W?.country||r||void 0,subdivision:W?.country&&W.subdivision||void 0,postcode:W?.country&&W.postcode||void 0});if(!a)return;z(g)}catch{if(!a)return}b(me)},Kn);return()=>{a=!1,clearTimeout(p)}},[l,n,M,me,r,W,A]);let R=P(a=>{u(p=>{let h=p.findIndex(g=>g.id===a.id);return h===-1?[...p,a]:p.map((g,I)=>I===h?{...g,qty:Math.min(Ve,g.qty+a.qty)}:g)}),qt(a,n)},[n]),Y=P(a=>{u(p=>p.filter(h=>h.id!==a))},[]),ke=P((a,p)=>{let h=Math.max(1,Math.min(Ve,p));u(g=>g.map(I=>I.id===a?{...I,qty:h}:I))},[]),at=P(a=>{u(a)},[]),[ge,fn]=k(null),st=de(null);st.current=ge;let B=de(null),Be=de(""),lt=P((a,p)=>{let h=a.trim().toLowerCase();Ut(h)&&fn(g=>g&&g.email===h&&g.firstName===(p??"")?g:{email:h,firstName:p??""})},[]);Q(()=>{if(t||!ge)return;let a=Dt(l.filter(Oe),g=>Je(g,n)===null?Te:o(Je(g,n),n)),p={email:ge.email,firstName:ge.firstName,currency:n,items:a},h=JSON.stringify(p);if(h!==Be.current)return B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null,Be.current=h,q.captureCart(p).catch(g=>{})},zn),()=>{B.current&&(clearTimeout(B.current),B.current=null)}},[l,ge,n,t]);let ut=P(()=>{B.current&&(clearTimeout(B.current),B.current=null);let a=st.current;a&&(Be.current="",q.captureCart({email:a.email,firstName:a.firstName,currency:n,items:[]}).catch(p=>{}))},[n]),ct=Kt(()=>{let a=l.reduce((T,se)=>{let Ie=Je(se,n);return Ie===null?T:T+Ie},0),p=l.some(T=>Vt(T,n)===null),h=l.reduce((T,se)=>T+se.qty,0),g=v?.valid?v.effects:void 0,I=g?Math.min(a,Number(g.discountAmount)):0,he=S?.bundleDiscount??0,mn=S?.appliedBundles??[],qe=!!g?.freeShipping,mt=H.find(T=>T.id===M),gt=qe?0:S?.shipping??mt?.amount??0,gn=Gt({quoted:S!==null,optionCount:H.length,chosenAmount:mt?.amount,couponWaivesFreight:qe}),We={};for(let T of g?.freeUnits??[])We[T.partNumber]=(We[T.partNumber]??0)+T.quantity;let hn=S?.tax??null,yn=S?S.grandTotal:a-I-he+gt;return{sets:h,units:l.reduce((T,se)=>T+(se.components??[]).reduce((Ie,bn)=>Ie+bn.wheels*se.qty,0),0),subtotal:a,hasUnpricedLine:p,discount:I,bundleDiscount:he,appliedBundles:mn,shipping:gt,freeShipping:qe,shippingStatus:gn,freeUnitsByPartNumber:We,tax:hn,grand:yn,repricing:!!v?.refused&&S!==null&&C===v?.code,currency:n}},[l,n,v,H,M,S,C]),dt=de(!0),ft=P(a=>{dt.current=a},[]),pt=P(a=>{R(a),dt.current&&K()},[R,K]),pn=Kt(()=>({isOpen:i,preview:t,open:K,close:J,toggle:re,items:l,catalog:c,bundles:x,warmCatalog:D,add:R,addAndOpen:pt,setAutoOpen:ft,remove:Y,setQty:ke,replaceItems:at,identify:lt,clearCapturedCart:ut,coupon:v,applyCoupon:pe,removeCoupon:ae,refuseCoupon:Le,couponBusy:ne,deliveryOptions:H,setQuoteDestination:Re,courier:fe,requote:y,shippingMethodId:M,setShippingMethodId:_e,totals:ct}),[i,t,K,J,re,l,c,x,D,R,pt,ft,Y,ke,at,lt,ut,v,pe,ae,Le,ne,H,Re,fe,y,M,ct]);return Xn(Yt.Provider,{value:pn,children:e})}function Qt(){let e=Wn(Yt);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as or}from"react";function jt(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,u]of e){if(u.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let s=o??i??e.keys().next().value;if(s===void 0)return;e.delete(s)}}var Vn=6e4,Yn=5e3,Qn=500,Me=new Map;async function jn(e){let{host:t,matchesRequestHost:n}=await St();if(!t)return"";let r=await vt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var Zn=e=>e.includes("|slug:")||e.includes("|xhost:");async function Zt(e,t){if(await Et()!==null)return t();let n=await jn(e);if(!n)return t();let r=Date.now(),o=Me.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),s=i.outcome.state==="failed",l=s?Yn:Vn,u=Me.get(n)?.lastGood,c=i.outcome.state==="ok"?i:s?u:void 0,f=s&&c?c:i;return jt(Me,Qn,Zn,r),Me.set(n,{load:f,expiresAt:r+l,lastGood:c}),f}var Jn=404;function er(e){if(e instanceof be&&e.status===Jn)return{state:"absent"};let t=e instanceof be?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var tr="[storefront:chrome-load-failed]";function nr(e,t){console.error(`${tr} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function Jt(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=er(o);return i.state==="failed"&&nr(e,i),{value:n,outcome:i}}}function rr(e){return e==="production"?"silent":"banner"}var Jo=rr("production");function ir(e,t){return e?.trim()||t}function si({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=ir(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var ar={name:ye,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:ze},li=or(async()=>Zt("site",()=>Jt("site",async()=>{let e=await q.getSite();return{name:bt(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,socialLinks:Ct(e.socialLinks)}},ar)));var ui={name:ye,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:ze};import{jsx as ve,jsxs as et}from"react/jsx-runtime";import{useEffect as De,useId as cr,useRef as tn,useState as Fe}from"react";import{useRootIsDark as dr}from"efficient-shell/theme";import{efficientClientOpen as sr}from"efficient-easel/screen/lib/session";var Se=new Map,lr=64;async function ur(e){if(!sr())return null;try{let t=await fetch(`${yt()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function en(e){let t=Se.get(e);if(t)return t;let n=ur(e);if(Se.set(e,n),Se.size>lr){let r=Se.keys().next();r.done||Se.delete(r.value)}return n}var fr=202/22,pr=.88,_i=16,mr="invert(1)";function Ri({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:s,inkIsDark:l,size:u="medium",sizePx:c,wordmark:f,siteName:x=ye,fitToContainer:d=!1,fitWordmarkToContainer:N=!1,fitFloorPx:w,hideClass:m,hideAttrs:O}){let E=f&&f.trim()?f.trim():x,[F,L]=Fe(null),_=tn(null),S=R=>{_.current=R};De(()=>{L(_.current?.ownerDocument??null)},[]);let z=!dr({doc:F,whenUnset:!0}),A=n&&n.trim()?n.trim():null,X=!!A&&xt(A),y=i??(z&&t),C=o&&o.trim()?o.trim():null,b=r&&!C,W=`logo-color-${cr().replace(/[^A-Za-z0-9_-]/g,"")}`,we=b&&X&&A&&s!=null?{reversed:s,inkIsDark:l??null}:null,v=we!==null,[G,ne]=Fe(null);De(()=>{if(!b||!A||!X||v){ne(null);return}let R=!1;return ne(null),en(A).then(Y=>{R||ne(Y)}),()=>{R=!0}},[b,A,X,v]);let U=we??G,M=!!U&&U.inkIsDark!==null&&(y?!U.inkIsDark:U.inkIsDark),_e=b&&!!A&&!X&&!y,V=M&&U?U.reversed:A,K=V?[V]:[],[J,re]=Fe(0);De(()=>{re(0)},[A,M]);let oe=e==="footer"?Ke:Ge[u],$=c&&c>0?c:oe,Re=Math.round($*fr),D=J<K.length?K[J]:null,[Ne,ie]=Fe(V),H=D!==null&&D===Ne,fe=tn(null);De(()=>{let R=fe.current;if(!R||!R.complete)return;if(R.naturalWidth>0||R.naturalHeight>0){ie(D);return}let Y=!1;return R.decode().then(()=>!Y&&ie(D),()=>!Y&&re(ke=>ke+1)),()=>{Y=!0}},[D]);let ee=d||N,pe=`calc(100cqi / ${((E.length+1)*pr).toFixed(2)})`,ae=ee&&w&&w>0?Math.min(w,$):null,Le=ee?ae===null?`min(${$}px, ${pe})`:`clamp(${ae}px, ${pe}, ${$}px)`:`${$}px`,me=et("span",{className:`font-display font-bold tracking-[0.18em] ${ae===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Le,lineHeight:1,...C?{color:C}:{}},"aria-label":E,children:[E,ve("span",{className:"text-accent",style:C?{color:C}:void 0,children:"."})]});return et("span",{ref:S,className:ht("inline-flex items-center",m??""),...O,children:[!H&&me,C&&D&&ve("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:et("filter",{id:W,colorInterpolationFilters:"sRGB",children:[ve("feFlood",{style:{floodColor:C}}),ve("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),D&&ve("img",{ref:fe,src:D,alt:E,width:Re,height:$,className:"shrink-0 object-contain",style:{...H?{height:`${$}px`,width:"auto",...d?{maxWidth:"100cqi"}:{}}:{display:"none"},..._e?{filter:mr}:{},...C?{filter:`url(#${W})`}:{}},onLoad:()=>ie(D),onError:()=>re(R=>R+1)},D)]})}import{jsx as gr}from"react/jsx-runtime";function Li({tone:e="bad",role:t,children:n}){return gr("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as Ee,jsxs as yr}from"react/jsx-runtime";function hr({spokes:e,mesh:t=!1,className:n}){let s=u=>Math.round(u*1e3)/1e3,l=[];for(let u=0;u<e;u++){let c=u/e*Math.PI*2-Math.PI/2;if(l.push({x1:s(100+Math.cos(c)*22),y1:s(100+Math.sin(c)*22),x2:s(100+Math.cos(c)*86),y2:s(100+Math.sin(c)*86),main:!0}),t){let f=c+Math.PI/e;l.push({x1:s(100+Math.cos(f)*22*1.4),y1:s(100+Math.sin(f)*22*1.4),x2:s(100+Math.cos(f)*78),y2:s(100+Math.sin(f)*78),main:!1})}}return yr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[Ee("circle",{cx:100,cy:100,r:92,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),Ee("circle",{cx:100,cy:100,r:22,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((u,c)=>Ee("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"currentColor",strokeWidth:u.main?6:3,strokeLinecap:"round",opacity:u.main?1:.5},c))]})}var Oi="#c9a461",nn=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],Mi={name:"",color:"var(--fg)",family:"silver",src:""};function br(e,t){let n=r=>{let o=nn.findIndex(i=>i.f===r);return o===-1?nn.length:o};return n(e)-n(t)||e.localeCompare(t)}function Di(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(br)}import{useState as Cr}from"react";import{jsx as te,jsxs as tt}from"react/jsx-runtime";function xr({customerEmail:e}){let{coupon:t,applyCoupon:n,removeCoupon:r,couponBusy:o}=Qt(),[i,s]=Cr("");async function l(){o||!i.trim()||(await n(i,e),s(""))}return tt("div",{className:"flex flex-col gap-2",children:[t===null?tt("div",{className:"flex border border-line",children:[te("input",{type:"text",value:i,onChange:u=>s(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),l())},placeholder:"Coupon code","aria-label":"Coupon code",className:"flex-1 bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim"}),te("button",{type:"button",onClick:()=>{l()},disabled:o,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Apply"})]}):tt("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",t.valid?"border-accent":"border-line"].join(" "),style:t.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[te("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",t.valid?"text-accent":t.deferred||t.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:t.code}),t.unchecked&&te("button",{type:"button",onClick:()=>{n(t.code,e)},disabled:o,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Try again"}),te("button",{type:"button",onClick:r,"aria-label":`Remove coupon ${t.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),t?.deferred?te("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:Mt}):t&&!t.valid&&t.message&&te("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:t.message})]})}var nt="Ads on. Shopper can opt out.",Ue="Ads and analytics off until Accept",Sr={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:nt,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Ue,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:nt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:nt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Ue,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function vr(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function Wi(e,t,n){let r=vr(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var Gi={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};var Er={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var Pr=Er;function Vi(e=Pr){if(e.asked)return e.ads?"granted":"denied"}function Qi(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as _r,isValidElement as Rr,useEffect as on,useId as Nr,useLayoutEffect as ln,useRef as j,useState as an}from"react";var $e=(e,t)=>!!e[t]&&!e[t].disabled;function rt(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if($e(e,i))return i}return t}function ot(e,t){return rt(e,t===1?-1:e.length,t)}function it(e,t){return $e(e,t)?t:Math.max(ot(e,1),0)}function rn(e,t,n){let{open:r,focus:o}=e,i=s=>({...e,...s});if(t.length===1&&/\S/.test(t)){let s=e.typed+t.toLowerCase(),l=n.findIndex((u,c)=>$e(n,c)&&u.label.toLowerCase().startsWith(s));return{state:i({open:!0,typed:s,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:rt(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:rt(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:ot(n,1)}),handled:!0};case"End":return{state:i({focus:ot(n,-1)}),handled:!0};case"Enter":case" ":return $e(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Lr}from"efficient-shell/ui";import{Fragment as Dr,jsx as Z,jsxs as un}from"react/jsx-runtime";var sn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function kr({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[s,l]=an(!1),u=r!==void 0,c=u?r:s,[f,x]=an(0),d=j({text:"",timer:0}),N=j(null),w=j(null),m=j(null),O=Nr(),E=j(null),F=e.findIndex(y=>y.value===t),L=y=>{y!==c&&(u||l(y),y?o?.():i?.())},_=y=>{let C=e[y];!C||C.disabled||(n(C.value),L(!1),w.current?.focus())},S=y=>{let C={open:c,focus:c?f:it(e,F),typed:d.current.text},b=rn(C,y,e);return!b.handled&&b.state.open===c?!1:(b.state.typed!==C.typed&&(d.current.text=b.state.typed,window.clearTimeout(d.current.timer),d.current.timer=window.setTimeout(()=>{d.current.text=""},500)),x(b.state.focus),b.commit!==void 0?_(b.commit):L(b.state.open),b.refocus&&w.current?.focus(),b.handled)},z=j(S);z.current=S;let A=j(()=>L(!1));A.current=()=>L(!1);let X=y=>{c||(E.current=y.nativeEvent,z.current(y.key)&&y.preventDefault())};return on(()=>{if(!c)return;let y=b=>{N.current?.contains(b.target)||A.current()},C=b=>{b!==E.current&&z.current(b.key)&&b.preventDefault()};return document.addEventListener("mousedown",y),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",C)}},[c]),on(()=>{c&&(d.current.text||x(it(e,F)))},[c]),ln(()=>{if(!c||!m.current)return;m.current.children.item(f)?.scrollIntoView({block:"nearest"})},[f,c]),{open:c,toggle:()=>L(!c),close:()=>L(!1),focusIdx:f,setFocusIdx:x,pick:y=>_(e.findIndex(C=>C.value===y)),wrapRef:N,triggerRef:w,listRef:m,listId:O,onTriggerKeyDown:X,activeId:c?`${O}-${f}`:void 0}}var Ir={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${sn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${sn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function Ar(e,t){ln(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let s=n.offsetParent??n.parentElement;if(!s)return;let l=s.getBoundingClientRect(),u=n.getBoundingClientRect(),c=Math.abs(u.right-l.right)<Math.abs(u.left-l.left)?"end":"start",f=Lr({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:u.width,height:u.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:c,side:"bottom"});if(f.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let d=f.top+Math.min(u.height,f.maxHeight);i.marginBottom=`${Math.max(0,l.top-d)}px`}f.maxHeight<u.height&&(i.maxHeight=`${f.maxHeight}px`,i.overflowY="auto");let x=f.left-u.left;x&&(i.translate=`${x}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Tr(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function Or({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:s,listRef:l,ariaLabel:u,align:c="start"}){let f=Ir[t],x=j(null);return Ar(x,n.length),Z("ul",{ref:d=>{x.current=d,l&&(l.current=d)},id:e,role:"listbox","aria-label":u,...f.pickerMarker?{"data-picker-menu":""}:{},className:c==="end"?Tr(f.list):f.list,children:n.map((d,N)=>{let w=d.value===r;return Z("li",{id:`${e}-${N}`,role:"option","aria-selected":w,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&i(N),onMouseDown:m=>{m.preventDefault(),d.disabled||s(d.value)},className:f.item(N===o,w&&d.value!=="",!!d.disabled,N===n.length-1),style:f.itemStyle?.(w),children:d.meta===void 0?d.label:un(Dr,{children:[d.lead,Z("span",{className:"flex-1 whitespace-nowrap",children:d.label}),Z("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${N}`)})})}function Mr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:s,id:l,"aria-label":u,align:c}){let f=_r.toArray(r).flatMap(m=>{if(!Rr(m))return[];if(m.type!=="option")return[];let E=m.props,F=E.value!==void 0?String(E.value):"",L=E.children,_=typeof L=="string"||typeof L=="number"?String(L):F;return[{value:F,label:_,disabled:!!E.disabled}]}),x=e??"",d=kr({items:f,value:x,onPick:m=>t?.({target:{value:m}})}),w=f.find(m=>m.value===x)?.label??f[0]?.label??"";return un("div",{ref:d.wrapRef,className:"relative",children:[s&&Z("input",{type:"hidden",name:s,value:x}),Z("button",{ref:m=>{d.triggerRef.current=m},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":d.open,"aria-controls":d.open?d.listId:void 0,"aria-activedescendant":d.activeId,"aria-label":u,id:l,onClick:()=>!n&&d.toggle(),onKeyDown:m=>!n&&d.onTriggerKeyDown(m),className:`block w-full ${o??""}`,style:i,children:Z("span",{className:"block w-full truncate text-left",children:w})}),d.open&&Z(Or,{id:d.listId,tone:"select",items:f,value:x,focusIdx:d.focusIdx,onFocus:d.setFocusIdx,onPick:d.pick,listRef:d.listRef,align:c})]})}import{jsx as Pe,jsxs as He}from"react/jsx-runtime";var Fr="font-mono text-[length:var(--size-label,12px)]",Ur="font-semibold uppercase tracking-[0.22em] text-fg";function cn(e){return`${e??Fr} ${Ur}`}function dn(){return Pe("span",{className:"text-accent",children:" *"})}function $r({children:e,required:t,labelFace:n}){return He("span",{className:cn(n),children:[e,t?Pe(dn,{}):null]})}function Hr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:s,children:l}){let u=s?`flex flex-col gap-2 ${s}`:"flex flex-col gap-2",c=n?Pe("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?He("div",{className:u,children:[He("label",{htmlFor:o,className:cn(i),children:[e,t?Pe(dn,{}):null]}),l,c]}):He("label",{htmlFor:o,className:u,children:[Pe($r,{required:t,labelFace:i,children:e}),l]})}var la="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";export{At as a,io as b,ao as c,so as d,wt as e,Xe as f,Br as g,qr as h,Wr as i,Gr as j,Cn as k,xn as l,Kr as m,zr as n,Ve as o,Ae as p,ce as q,Xr as r,Vr as s,Te as t,Ln as u,kn as v,fo as w,po as x,Ft as y,je as z,mo as A,go as B,An as C,ho as D,yo as E,Tn as F,bo as G,Mn as H,Co as I,xo as J,Ut as K,_o as L,Ro as M,No as N,Io as O,Ao as P,Jr as Q,It as R,eo as S,Oe as T,Je as U,Ko as V,Qt as W,si as X,ar as Y,ui as Z,_i as _,Ri as $,hr as aa,Oi as ba,nn as ca,Mi as da,br as ea,Di as fa,xr as ga,Li as ha,Sr as ia,Wi as ja,Gi as ka,Er as la,Vi as ma,Qi as na,kr as oa,Or as pa,Mr as qa,$r as ra,Hr as sa,la as ta};
|