efficient-storefront-blocks 0.76.0 → 0.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/chunks/EditorPreviewCheckout-IEFQC4T3.js +4 -0
  3. package/dist/chunks/{SiteEditorProvider-AJUWZYHT.js → SiteEditorProvider-YTZPWUDV.js} +1 -1
  4. package/dist/chunks/chunk-4O66UMLS.js +1 -0
  5. package/dist/chunks/chunk-LZTJCQ4A.js +311 -0
  6. package/dist/chunks/chunk-MZPZ4B7Y.js +1 -0
  7. package/dist/chunks/chunk-TI4ZGDSG.js +1 -0
  8. package/dist/chunks/chunk-WC4XIVX3.js +1 -0
  9. package/dist/chunks/{fitment-data-IZYCNTET.js → fitment-data-VU5A7VKV.js} +1 -1
  10. package/dist/editor/components/CategorySource.js +1 -1
  11. package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/service/Events/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/service/FooterGroup/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/service/FooterSocial/fields.js +1 -1
  16. package/dist/index.js +31 -31
  17. package/dist/render/app/globals.css +44 -0
  18. package/dist/render/built-with.json +1 -1
  19. package/dist/render/components/ChatWidget.js +1 -1
  20. package/dist/render/components/ConsentPanel.js +1 -1
  21. package/dist/render/components/Events.d.ts +2 -1
  22. package/dist/render/components/Events.js +1 -1
  23. package/dist/render/components/FooterGroup.d.ts +2 -1
  24. package/dist/render/components/FooterGroup.js +1 -1
  25. package/dist/render/components/GalleryGrid.d.ts +2 -1
  26. package/dist/render/components/GalleryGrid.js +1 -1
  27. package/dist/render/components/Notice.d.ts +6 -0
  28. package/dist/render/components/Notice.js +1 -0
  29. package/dist/render/components/ProductGridSection.d.ts +2 -1
  30. package/dist/render/components/ProductGridSection.js +1 -1
  31. package/dist/render/components/SubscribePopup.js +2 -2
  32. package/dist/render/components/TyreFitVerdicts.d.ts +2 -1
  33. package/dist/render/components/TyreFitVerdicts.js +1 -1
  34. package/dist/render/components/TyreVehicleFitment.js +1 -1
  35. package/dist/render/components/WheelCardFrame.d.ts +3 -0
  36. package/dist/render/components/WheelCardFrame.js +1 -1
  37. package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
  38. package/dist/render/components/checkout/CheckoutPageClient.d.ts +4 -0
  39. package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
  40. package/dist/render/components/checkout/checkout-parts.js +1 -1
  41. package/dist/render/components/checkout/checkout-state.d.ts +14 -2
  42. package/dist/render/components/checkout/checkout-state.js +3 -3
  43. package/dist/render/components/product-hero/TyreHeroFitment.d.ts +2 -1
  44. package/dist/render/components/product-hero/TyreHeroFitment.js +1 -1
  45. package/dist/render/components/product-hero/VehicleQuestion.d.ts +0 -4
  46. package/dist/render/components/product-hero/VehicleQuestion.js +1 -1
  47. package/dist/render/components/product-hero/WheelHeroFitment.js +1 -1
  48. package/dist/render/components/product-hero/trust-bullets.js +1 -1
  49. package/dist/render/components/useTyreFitAnswer.d.ts +1 -0
  50. package/dist/render/components/useTyreFitAnswer.js +1 -1
  51. package/dist/render/lib/api/index.d.ts +7 -3
  52. package/dist/render/lib/api/index.js +1 -1
  53. package/dist/render/lib/api/types.d.ts +5 -0
  54. package/dist/render/lib/checkout/pay-first.d.ts +34 -0
  55. package/dist/render/lib/checkout/pay-first.js +1 -0
  56. package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
  57. package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
  58. package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
  59. package/dist/render/lib/document/blocks/service/FooterGroup/render.js +1 -1
  60. package/dist/render/lib/tyres/tyre-fit-copy.js +1 -1
  61. package/dist/render/lib/tyres/tyre-vehicle-fitment.d.ts +3 -1
  62. package/dist/render/lib/tyres/tyre-vehicle-fitment.js +1 -1
  63. package/dist/render/lib/wheels/plp-grid.d.ts +2 -1
  64. package/dist/render/lib/wheels/plp-grid.js +1 -1
  65. package/dist/words.d.ts +0 -5
  66. package/dist/words.js +2 -2
  67. package/package.json +3 -3
  68. package/dist/chunks/EditorPreviewCheckout-ANI7HUYX.js +0 -4
  69. package/dist/chunks/chunk-3IQQNZIM.js +0 -311
  70. package/dist/chunks/chunk-4F5CAFXO.js +0 -1
  71. package/dist/chunks/chunk-5NXOTPHK.js +0 -1
  72. package/dist/chunks/chunk-YAYHH5GY.js +0 -1
  73. package/dist/chunks/chunk-YFPWVNDB.js +0 -1
  74. /package/dist/chunks/{chunk-3IQQNZIM.js.LEGAL.txt → chunk-LZTJCQ4A.js.LEGAL.txt} +0 -0
@@ -1514,6 +1514,14 @@ body:has([data-page-width="full"]) footer {
1514
1514
  :where(.sf-section-stick ~ :not(.sf-section-stick)) {
1515
1515
  position: relative;
1516
1516
  }
1517
+ /* What comes after a pinned Scroll-Over Intro slides over it. The intro pins at
1518
+ z-index 1, so a position alone is not enough: every old section wears its own
1519
+ `relative z-[2]`, and this gives a Box the same. `:where()` weighs nothing, so
1520
+ a follower's own class keeps its position and layer (a second pinned intro). */
1521
+ :where(.sf-scroll-over ~ *) {
1522
+ position: relative;
1523
+ z-index: 2;
1524
+ }
1517
1525
  /* The phone's own answer (below 720px, VIEW_TABLET_MIN, written as in the
1518
1526
  phone padding block below). */
1519
1527
  @media not all and (min-width: 720px) {
@@ -1924,6 +1932,13 @@ em.text-accent {
1924
1932
  gap: var(--plp-grid-gap);
1925
1933
  grid-template-columns: var(--plp-grid-cols-mobile);
1926
1934
  }
1935
+ /* The site's phone gap reaches the gutter and the track arithmetic through this
1936
+ one property (PLP_GRID_GAP_TERM). A site with no phone value leaves it empty. */
1937
+ @media not all and (min-width: 720px) {
1938
+ .plp-card-grid {
1939
+ --plp-phone-gap: var(--sf-block-gap-phone-rem);
1940
+ }
1941
+ }
1927
1942
  @media (min-width: 720px) {
1928
1943
  .plp-card-grid {
1929
1944
  grid-template-columns: var(--plp-grid-cols-tablet);
@@ -2586,6 +2601,19 @@ em.text-accent {
2586
2601
  gap: var(--sf-gap-len-phone, calc(var(--sf-gap-len) / 2));
2587
2602
  }
2588
2603
  }
2604
+ /* A shared-rows card grid (`.sf-card-rows`, components/WheelCardFrame) moves
2605
+ its row gap onto the cards as a margin, so `gap` above does not reach it.
2606
+ Its phone answer is this property, named by the grid ONLY when it stores a
2607
+ phone Gap (`cardRowsGap`, C38): the desktop length above 800px, the phone's
2608
+ own below. A grid with no phone value never reads it. */
2609
+ .sf-card-rows {
2610
+ --sf-card-row-gap-auto: var(--sf-gap-len);
2611
+ }
2612
+ @media (max-width: 800px) {
2613
+ .sf-card-rows {
2614
+ --sf-card-row-gap-auto: var(--sf-gap-len-phone, var(--sf-gap-len));
2615
+ }
2616
+ }
2589
2617
 
2590
2618
  /* The overlap below zero halves on the same screen, for the same reason and by
2591
2619
  the same ruling. It needs its OWN derived property rather than redefining
@@ -3216,6 +3244,22 @@ em.text-accent {
3216
3244
  padding-block: 0;
3217
3245
  }
3218
3246
 
3247
+ /* …and a block with a Size value (Content width, Width) is still a block of the
3248
+ Box. The builder's `div.sf-block-size` goes OUTSIDE everything the block brings
3249
+ with it (its blockSize pass), so that wrapper is then the Box's direct child and
3250
+ the frame's `py-4` came back: +32px on the Hartes US Home and About text.
3251
+ Each shape above, through it. */
3252
+ .sf-box-gap-only > .sf-block-size > *,
3253
+ .sf-box-gap-only > .sf-block-size > .sf-entrance > *,
3254
+ .sf-box-gap-only > .sf-block-size > .sf-section-pad > *,
3255
+ .sf-box-gap-only > .sf-block-size > .sf-entrance > .sf-section-pad > *,
3256
+ .sf-box-gap-only > [data-easel-block] > [data-sf-part-host] > .sf-block-size > *,
3257
+ .sf-box-gap-only > [data-easel-block] > [data-sf-part-host] > .sf-block-size > .sf-entrance > *,
3258
+ .sf-box-gap-only > [data-easel-block] > [data-sf-part-host] > .sf-block-size > .sf-section-pad > *,
3259
+ .sf-box-gap-only > [data-easel-block] > [data-sf-part-host] > .sf-block-size > .sf-entrance > .sf-section-pad > * {
3260
+ padding-block: 0;
3261
+ }
3262
+
3219
3263
  /* ── THE VISITOR'S OWN "REDUCE MOTION" SETTING ──────────────────────────────
3220
3264
  [ADD] The Site Respects Reduce Motion.
3221
3265
 
@@ -1,3 +1,3 @@
1
1
  {
2
- "efficient-web-builder": "46.0.0"
2
+ "efficient-web-builder": "47.1.0"
3
3
  }
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useEffect as S,useRef as A,useState as u}from"react";import{stripMarkup as B}from"efficient-web-builder/format/lib/markup";import{sizedImage as z}from"efficient-web-builder/format/lib/sized-image";import D,{chatLauncherOnLeft as W}from"./ChatLauncher.js";import{useChat as U}from"./ChatContext.js";import{scrollBehavior as F}from"efficient-web-builder/render/components/useReducedMotion";const M="Chat with us",O="We usually reply within a few minutes",R="Hi! Ask us anything — about a wheel, an order, or fitment. Leave your details and we’ll reply.";function $({m:t}){if(t.sender_role==="system")return e("div",{className:"text-center text-[11px] text-fg/50 py-1",children:t.body});const a=t.sender_role==="bot",s=t.sender_role==="employee"||a;return e("div",{className:`flex ${s?"justify-start":"justify-end"}`,children:r("div",{className:`max-w-[80%] rounded-2xl px-3 py-2 text-sm ${s?"bg-fg/5 text-fg":"bg-accent text-accent-ink"}`,children:[s&&r("div",{className:"mb-0.5 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-fg/50",children:[a&&e("span",{"aria-hidden":"true",children:"✦"}),e("span",{children:a?t.sender_name||"Assistant":t.sender_name||"Support"}),a&&e("span",{className:"font-normal normal-case tracking-normal",children:"· automated"})]}),t.body&&e("p",{className:"whitespace-pre-wrap",children:t.body}),t.image_url&&e("a",{href:t.image_url,target:"_blank",rel:"noopener noreferrer",children:e("img",{...z(t.image_url,{fallbackWidth:640,maxWidth:1280}),sizes:"(max-width: 640px) 80vw, 320px",alt:"Attachment",className:"mt-2 max-h-48 w-auto rounded-lg"})})]})})}function G({title:t,subtitle:a,greeting:s,look:x}={}){const{isOpen:o,toggle:N,close:_,messages:l,sending:i,error:h,unread:f,hasConversation:k,isSignedIn:C,send:L}=U(),g=t?.trim()||M,E=a?.trim()||O,T=s?.trim()||R,[d,b]=u(""),[c,j]=u(""),[m,I]=u(""),y=A(null),p=!C&&!k;S(()=>{o&&y.current?.scrollIntoView({behavior:F(),block:"nearest"})},[l.length,o]);const v=d.trim().length>0&&(!p||c.trim()&&/.+@.+/.test(m)),w=()=>{!v||i||(L(d,p?{name:c.trim(),email:m.trim()}:void 0),b(""))};return o?r("aside",{role:"dialog","aria-label":"Chat with us","data-sf-floating":"",className:`fixed bottom-5 ${W(x)?"left-5":"right-5"} z-[61] flex h-[min(560px,80vh)] w-[min(380px,calc(100vw-2.5rem))] flex-col overflow-hidden rounded-2xl border border-line bg-bg shadow-[0_20px_60px_rgba(0,0,0,.45)]`,style:{color:"var(--fg)"},children:[r("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[r("div",{children:[e("div",{className:"text-sm font-semibold text-fg",children:g}),e("div",{className:"text-[11px] text-fg/50",children:E})]}),e("button",{type:"button",onClick:_,"aria-label":"Close chat",className:"rounded-md p-1 text-fg/60 hover:bg-fg/5",children:e("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 py-3",children:[l.length===0&&e("p",{className:"px-2 py-4 text-center text-sm text-fg/50",children:T}),l.map(n=>e($,{m:n},n.id)),e("div",{ref:y})]}),r("div",{className:"border-t border-line p-3",children:[p&&r("div",{className:"mb-2 grid grid-cols-2 gap-2",children:[e("input",{value:c,onChange:n=>j(n.target.value),placeholder:"Your name",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"}),e("input",{value:m,onChange:n=>I(n.target.value),type:"email",placeholder:"Email",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"})]}),h&&e("p",{className:"mb-2 text-xs text-red-600",children:h}),r("div",{className:"flex items-end gap-2",children:[e("textarea",{value:d,onChange:n=>b(n.target.value),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),w())},rows:1,placeholder:"Type a message…",className:"max-h-28 flex-1 resize-none rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"}),e("button",{type:"button",onClick:w,disabled:!v||i,className:"rounded-lg bg-btn px-3 py-2 text-sm font-semibold text-btn-ink disabled:opacity-40",children:i?"…":"Send"})]})]})]}):e(D,{label:B(g),onOpen:N,zIndex:60,look:x,badge:f>0&&e("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-red-600 px-1 text-[11px] font-bold text-white",children:f})})}export{R as DEFAULT_GREETING,O as DEFAULT_SUBTITLE,M as DEFAULT_TITLE,G as default};
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useEffect as S,useRef as A,useState as u}from"react";import{stripMarkup as B}from"efficient-web-builder/format/lib/markup";import{sizedImage as z}from"efficient-web-builder/format/lib/sized-image";import D,{chatLauncherOnLeft as W}from"./ChatLauncher.js";import{useChat as U}from"./ChatContext.js";import{scrollBehavior as F}from"efficient-web-builder/render/components/useReducedMotion";const M="Chat with us",O="We usually reply within a few minutes",R="Hi! Ask us anything — about a wheel, an order, or fitment. Leave your details and we’ll reply.";function $({m:t}){if(t.sender_role==="system")return e("div",{className:"text-center text-[11px] text-fg/50 py-1",children:t.body});const a=t.sender_role==="bot",s=t.sender_role==="employee"||a;return e("div",{className:`flex ${s?"justify-start":"justify-end"}`,children:r("div",{className:`max-w-[80%] rounded-2xl px-3 py-2 text-sm ${s?"bg-fg/5 text-fg":"bg-accent text-accent-ink"}`,children:[s&&r("div",{className:"mb-0.5 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-fg/50",children:[a&&e("span",{"aria-hidden":"true",children:"✦"}),e("span",{children:a?t.sender_name||"Assistant":t.sender_name||"Support"}),a&&e("span",{className:"font-normal normal-case tracking-normal",children:"· automated"})]}),t.body&&e("p",{className:"whitespace-pre-wrap",children:t.body}),t.image_url&&e("a",{href:t.image_url,target:"_blank",rel:"noopener noreferrer",children:e("img",{...z(t.image_url,{fallbackWidth:640,maxWidth:1280}),sizes:"(max-width: 640px) 80vw, 320px",alt:"Attachment",className:"mt-2 max-h-48 w-auto rounded-lg"})})]})})}function G({title:t,subtitle:a,greeting:s,look:x}={}){const{isOpen:l,toggle:N,close:_,messages:o,sending:i,error:h,unread:f,hasConversation:k,isSignedIn:C,send:L}=U(),g=t?.trim()||M,E=a?.trim()||O,T=s?.trim()||R,[d,b]=u(""),[c,j]=u(""),[m,I]=u(""),y=A(null),p=!C&&!k;S(()=>{l&&y.current?.scrollIntoView({behavior:F(),block:"nearest"})},[o.length,l]);const v=d.trim().length>0&&(!p||c.trim()&&/.+@.+/.test(m)),w=()=>{!v||i||(L(d,p?{name:c.trim(),email:m.trim()}:void 0),b(""))};return l?r("aside",{role:"dialog","aria-label":"Chat with us","data-sf-floating":"",className:`fixed bottom-5 ${W(x)?"left-5":"right-5"} z-[61] flex h-[min(560px,80vh)] w-[min(380px,calc(100vw-2.5rem))] flex-col overflow-hidden rounded-2xl border border-line bg-bg shadow-[0_20px_60px_rgba(0,0,0,.45)]`,style:{color:"var(--fg)"},children:[r("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[r("div",{children:[e("div",{className:"text-sm font-semibold text-fg",children:g}),e("div",{className:"text-[11px] text-fg/50",children:E})]}),e("button",{type:"button",onClick:_,"aria-label":"Close chat",className:"rounded-md p-1 text-fg/60 hover:bg-fg/5",children:e("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 py-3",children:[o.length===0&&e("p",{className:"px-2 py-4 text-center text-sm text-fg/50",children:T}),o.map(n=>e($,{m:n},n.id)),e("div",{ref:y})]}),r("div",{className:"border-t border-line p-3",children:[p&&r("div",{className:"mb-2 grid grid-cols-2 gap-2",children:[e("input",{value:c,onChange:n=>j(n.target.value),placeholder:"Your name",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"}),e("input",{value:m,onChange:n=>I(n.target.value),type:"email",placeholder:"Email",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"})]}),h&&e("p",{className:"mb-2 text-xs text-alert",children:h}),r("div",{className:"flex items-end gap-2",children:[e("textarea",{value:d,onChange:n=>b(n.target.value),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),w())},rows:1,placeholder:"Type a message…",className:"max-h-28 flex-1 resize-none rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"}),e("button",{type:"button",onClick:w,disabled:!v||i,className:"rounded-lg bg-btn px-3 py-2 text-sm font-semibold text-btn-ink disabled:opacity-40",children:i?"…":"Send"})]})]})]}):e(D,{label:B(g),onOpen:N,zIndex:60,look:x,badge:f>0&&e("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-red-600 px-1 text-[11px] font-bold text-white",children:f})})}export{R as DEFAULT_GREETING,O as DEFAULT_SUBTITLE,M as DEFAULT_TITLE,G as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useEffect as E,useRef as S,useState as N}from"react";import j from"./SiteSwitch.js";import{CONSENT_CHOICE_BUTTON as g,ConsentEyebrow as T}from"./ConsentBanner.js";import _ from"./PopupFrame.js";import{useEnglish as P}from"./EnglishVariant.js";import{useSiteSells as R}from"./SiteRecordContext.js";import{CONSENT_BUTTONS as c,GPC_HONOURED as C,PANEL_ROWS as a}from"../lib/consent/rules.js";const B="flex items-center justify-center gap-5 border border-btn bg-btn px-6 py-4 font-mono text-[14px] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",U="text-fg underline decoration-line underline-offset-4";function m({name:r,body:s,checked:o,onChange:t,locked:l=!1}){return n("div",{className:"flex items-start justify-between gap-6 border-t border-line py-5",children:[n("div",{className:"min-w-0",children:[e("div",{className:"font-display text-[17px] text-fg",children:r}),e("p",{className:"mt-1 font-body text-[14px] leading-[1.5] text-fg-dim",children:s})]}),e(j,{checked:o,onChange:i=>t?.(i),ariaLabel:r,disabled:l,className:"flex flex-none cursor-pointer items-center gap-3 pt-1",children:l&&e("span",{className:"order-first font-mono text-[11px] uppercase tracking-[0.18em] text-fg-dim",children:c.alwaysOn})})]})}function M({rule:r,analytics:s,ads:o,gpc:t,privacyHref:l,open:i=!0,onSave:d,onClose:k,inline:v=!1}){const[x,p]=N(s),[f,b]=N(o&&!t),u=R(),w=P(),h=S(null);if(E(()=>{i&&(p(s),b(o&&!t))},[i,s,o,t]),!i)return null;const y=n("div",{ref:h,tabIndex:-1,onClick:O=>O.stopPropagation(),className:"relative w-[min(640px,100%)] overflow-auto border border-line bg-bg p-10 outline-none [border-radius:var(--sf-section-radius,0px)] max-[880px]:max-h-[88dvh] max-[880px]:w-full max-[880px]:border-x-0 max-[880px]:border-b-0 max-[880px]:px-5 max-[880px]:pb-8 max-[880px]:pt-7 max-[880px]:[border-radius:0]",children:[e(T,{text:r.panelEyebrow}),n("h2",{id:"consent-panel-title",className:"mt-4 font-display text-[36px] leading-[1.05] tracking-[-0.01em] text-fg max-[880px]:text-[28px]",children:["Your privacy ",e("span",{className:"font-serif font-light italic text-accent",children:"choices."})]}),t&&n("div",{className:"mt-5 border border-line bg-surface px-4 py-3 font-body text-[14px] leading-[1.5] text-fg",children:[e("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-accent",children:w(C.title)}),e("br",{}),C.body]}),n("div",{className:"mt-6",children:[e(m,{name:a.necessary.name,body:u?a.necessary.body:a.necessary.bodyNoSale,checked:!0,locked:!0}),e(m,{name:a.analytics.name,body:a.analytics.body,checked:x,onChange:p}),e(m,{name:r.adsRowName,body:u?a.ads.body:a.ads.bodyNoSale,checked:f,onChange:b,locked:t})]}),n("div",{className:"mt-2 grid grid-cols-3 gap-3 border-t border-line pt-6 max-[880px]:grid-cols-1",children:[e("button",{type:"button",className:B,onClick:()=>d({analytics:x,ads:f&&!t}),children:c.save}),e("button",{type:"button",className:g,onClick:()=>d({analytics:!1,ads:!1}),children:c.reject}),e("button",{type:"button",className:g,onClick:()=>d({analytics:!0,ads:!t}),children:c.accept})]}),l&&n("p",{className:"mt-5 font-body text-[13px] text-fg-dim",children:["More in our"," ",e("a",{className:U,href:l,children:c.privacyPolicy}),"."]})]});return v?e("div",{className:"flex w-full justify-center p-6",children:y}):e(_,{site:{blur:8,layer:"consent",sheetOnPhone:!0,focusRef:h},labelledBy:"consent-panel-title",onClose:k,children:y})}export{M as ConsentPanelView};
1
+ "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useEffect as E,useRef as S,useState as N}from"react";import j from"./SiteSwitch.js";import{CONSENT_CHOICE_BUTTON as g,ConsentEyebrow as T}from"./ConsentBanner.js";import _ from"./PopupFrame.js";import{Notice as P}from"./Notice.js";import{useEnglish as R}from"./EnglishVariant.js";import{useSiteSells as B}from"./SiteRecordContext.js";import{CONSENT_BUTTONS as c,GPC_HONOURED as C,PANEL_ROWS as a}from"../lib/consent/rules.js";const U="flex items-center justify-center gap-5 border border-btn bg-btn px-6 py-4 font-mono text-[14px] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",I="text-fg underline decoration-line underline-offset-4";function m({name:r,body:s,checked:o,onChange:t,locked:l=!1}){return n("div",{className:"flex items-start justify-between gap-6 border-t border-line py-5",children:[n("div",{className:"min-w-0",children:[e("div",{className:"font-display text-[17px] text-fg",children:r}),e("p",{className:"mt-1 font-body text-[14px] leading-[1.5] text-fg-dim",children:s})]}),e(j,{checked:o,onChange:i=>t?.(i),ariaLabel:r,disabled:l,className:"flex flex-none cursor-pointer items-center gap-3 pt-1",children:l&&e("span",{className:"order-first font-mono text-[11px] uppercase tracking-[0.18em] text-fg-dim",children:c.alwaysOn})})]})}function W({rule:r,analytics:s,ads:o,gpc:t,privacyHref:l,open:i=!0,onSave:d,onClose:k,inline:v=!1}){const[p,x]=N(s),[f,b]=N(o&&!t),u=B(),w=R(),h=S(null);if(E(()=>{i&&(x(s),b(o&&!t))},[i,s,o,t]),!i)return null;const y=n("div",{ref:h,tabIndex:-1,onClick:O=>O.stopPropagation(),className:"relative w-[min(640px,100%)] overflow-auto border border-line bg-bg p-10 outline-none [border-radius:var(--sf-section-radius,0px)] max-[880px]:max-h-[88dvh] max-[880px]:w-full max-[880px]:border-x-0 max-[880px]:border-b-0 max-[880px]:px-5 max-[880px]:pb-8 max-[880px]:pt-7 max-[880px]:[border-radius:0]",children:[e(T,{text:r.panelEyebrow}),n("h2",{id:"consent-panel-title",className:"mt-4 font-display text-[36px] leading-[1.05] tracking-[-0.01em] text-fg max-[880px]:text-[28px]",children:["Your privacy ",e("span",{className:"font-serif font-light italic text-accent",children:"choices."})]}),t&&e("div",{className:"mt-5",children:n(P,{tone:"quiet",children:[e("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-accent",children:w(C.title)}),e("br",{}),C.body]})}),n("div",{className:"mt-6",children:[e(m,{name:a.necessary.name,body:u?a.necessary.body:a.necessary.bodyNoSale,checked:!0,locked:!0}),e(m,{name:a.analytics.name,body:a.analytics.body,checked:p,onChange:x}),e(m,{name:r.adsRowName,body:u?a.ads.body:a.ads.bodyNoSale,checked:f,onChange:b,locked:t})]}),n("div",{className:"mt-2 grid grid-cols-3 gap-3 border-t border-line pt-6 max-[880px]:grid-cols-1",children:[e("button",{type:"button",className:U,onClick:()=>d({analytics:p,ads:f&&!t}),children:c.save}),e("button",{type:"button",className:g,onClick:()=>d({analytics:!1,ads:!1}),children:c.reject}),e("button",{type:"button",className:g,onClick:()=>d({analytics:!0,ads:!t}),children:c.accept})]}),l&&n("p",{className:"mt-5 font-body text-[13px] text-fg-dim",children:["More in our"," ",e("a",{className:I,href:l,children:c.privacyPolicy}),"."]})]});return v?e("div",{className:"flex w-full justify-center p-6",children:y}):e(_,{site:{blur:8,layer:"consent",sheetOnPhone:!0,focusRef:h},labelledBy:"consent-panel-title",onClose:k,children:y})}export{W as ConsentPanelView};
@@ -60,6 +60,7 @@ export interface EventsProps {
60
60
  limit?: number;
61
61
  showAll?: boolean;
62
62
  gap?: number | string;
63
+ gapPhone?: unknown;
63
64
  layout?: string;
64
65
  featuredWidth?: number;
65
66
  listCover?: boolean;
@@ -72,4 +73,4 @@ export interface EventsProps {
72
73
  padBottom?: number;
73
74
  }
74
75
  export declare function matchesName(title: string, typed: string): boolean;
75
- export default function Events({ num, title, link, posts, columns, limit, showAll, editing, cardImage, gap: gapProp, layout, featuredWidth, listCover, featuredDarken, omitHead, sample, nameFilter, padTop, padBottom, }: EventsProps): import("react").JSX.Element | null;
76
+ export default function Events({ num, title, link, posts, columns, limit, showAll, editing, cardImage, gap: gapProp, gapPhone, layout, featuredWidth, listCover, featuredDarken, omitHead, sample, nameFilter, padTop, padBottom, }: EventsProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useState as G}from"react";import{useScopeClass as ge}from"../lib/use-scope-class.js";import{containerGapProps as ue}from"efficient-web-builder/format/lib/content/container-gap";import he from"efficient-web-builder/render/components/SectionHeader";import v from"efficient-web-builder/render/components/PostCard";import be from"efficient-web-builder/render/components/Placeholder";import{SiteLink as z}from"efficient-web-builder/render/lib/site-runtime";import{renderGold as x,renderHeadline as N}from"efficient-web-builder/render/components/goldPhrases";import{say as y}from"efficient-web-builder/format/lib/editor-words";import{cardImageShapeTokens as ve}from"efficient-web-builder/format/lib/content/card-image-shape";import{SITE_COLUMN as K}from"efficient-web-builder/format/lib/content/page-width";import{fillRowCss as Ne}from"../lib/sections/fill-row.js";import{headIsEmpty as ye,ownPadding as Ee}from"../lib/sections/own-padding.js";const Te=4;function rt(t){if(!Array.isArray(t))return;const a=t.filter(e=>typeof e=="string"&&!!e.trim()).map(e=>e.trim()).slice(0,Te);return a.length?a:void 0}function st(t){if(!t||typeof t!="object"||Array.isArray(t))return;const a={};for(const[e,r]of Object.entries(t))if(e.trim()){if(typeof r=="string")r.trim()&&(a[e]=r.trim());else if(Array.isArray(r)){const o=r.filter(c=>typeof c=="string"&&!!c.trim()).map(c=>c.trim());o.length&&(a[e]=o)}}return Object.keys(a).length?a:void 0}function H(t,a){const e=t.facets?.[a];return e===void 0?[]:typeof e=="string"?[e]:e}const Ae=new Intl.Collator("en",{numeric:!0,sensitivity:"base"});function _e(t){const a=[],e=new Map;for(const r of t)for(const o of Object.keys(r.facets??{})){e.has(o)||(a.push(o),e.set(o,new Set));for(const c of H(r,o))e.get(o).add(c)}return a.map(r=>({label:r,values:[...e.get(r)].sort(Ae.compare)}))}function Ce(t,a){return Object.entries(a).every(([e,r])=>r===""||H(t,e).includes(r))}const W=3,X="featured",J="tabs",q="portrait",u="spread",Q="count",ot=[{label:"Even grid",value:"even"},{label:"Featured first",value:X},{label:"Tabs",value:J},{label:"Photo cards",value:q},{label:"Staggered spread",value:u},{label:"Count",value:Q}],Le=[q,u],lt="even",k={min:2,max:11,step:1,fallback:7,unit:"of 12"},Se="bottom-left",$e=55,Oe="bottom";function we(t){const a=typeof t=="number"?t:Number.parseFloat(String(t??"")),e=Number.isFinite(a)?Math.min(k.max,Math.max(k.min,Math.round(a))):k.fallback;return`${e}fr ${12-e}fr`}const Z={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1"},ee={2:"grid-cols-2",3:"grid-cols-3 max-[800px]:grid-cols-2",4:"grid-cols-4 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-2"},Fe="Find by name",ze="Nobody by that name.",ke="Nobody matches.",Re="Any";function Me(t,a){const e=o=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim(),r=e(a);return r===""||e(t).includes(r)}function te({typed:t,onType:a,wide:e=!1}){return l("label",{className:`flex max-w-[360px] flex-col gap-1.5${e?" w-full":""}`,children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:Fe}),n("input",{type:"search",value:t,onChange:r=>a(r.target.value),autoComplete:"off",className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent"})]})}function ne({tags:t}){return n("ul",{"aria-label":"Details",className:"flex gap-1.5 overflow-hidden",children:t.map((a,e)=>n("li",{className:"shrink-0 rounded-[var(--sf-button-radius,4px)] border border-line px-2 py-0.5 text-[length:var(--size-label,12px)] text-fg-dim",children:a},`${a}-${e}`))})}function Ue({card:t,scaffold:a,lower:e=!1}){return l(z,{href:t.href||"#",className:`sf-card group relative isolate flex aspect-[3/4] overflow-hidden bg-surface${e?" min-[801px]:mt-16":""}`,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,children:[n("div",{className:"absolute inset-0 transition-transform duration-700 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",children:n(be,{label:`card-${t.slug}`,src:t.cover||void 0,sizes:"(max-width: 800px) 50vw, 25vw"})}),n("div",{"aria-hidden":!0,className:"absolute inset-0 z-0",style:{background:"linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 88%, transparent) 100%)"}}),t.meta&&n("span",{className:"absolute left-3 top-3 z-[1] rounded-[var(--sf-button-radius,999px)] bg-bg/85 px-2.5 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-accent",children:x(t.meta)}),l("div",{className:"relative z-[1] mt-auto flex w-full flex-col gap-1 p-4 max-[800px]:p-3",children:[n("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,24px)] leading-[1.1] tracking-[-0.01em] text-fg",children:N(t.title,!1)}),t.dateLabel&&n("p",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-accent",children:x(t.dateLabel)}),t.tags&&t.tags.length>0&&n(ne,{tags:t.tags}),t.excerpt&&n("p",{className:"line-clamp-2 text-[length:var(--size-body,14px)] leading-[1.45] text-fg-dim",children:x(t.excerpt)})]})]})}function De({cards:t,scaffold:a}){return n("nav",{"aria-label":"Days",className:"-mx-1 [scrollbar-width:none] max-[800px]:overflow-x-auto [&::-webkit-scrollbar]:hidden",children:n("ul",{className:"flex flex-wrap gap-2 px-1 pb-1 max-[800px]:min-w-max max-[800px]:flex-nowrap",children:t.map((e,r)=>{const o=!!e.meta;return n("li",{children:l(z,{href:e.href||"#","aria-current":o?"page":void 0,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,className:`flex flex-col gap-0.5 rounded-[var(--sf-button-radius,999px)] border px-5 py-2.5 transition-colors ${o?"border-accent bg-accent text-accent-ink":"border-line text-fg hover:border-accent hover:text-accent"}`,children:[n("span",{className:"font-heading3 text-[length:var(--size-body,15px)] leading-[1.2]",children:N(e.title,!1)}),e.excerpt&&n("span",{className:`font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] ${o?"opacity-80":"text-fg-dim"}`,children:x(e.excerpt)})]})},`${e.slug}-${r}`)})})})}function Ie({count:t,words:a,href:e}){const r=l("span",{className:"inline-flex items-baseline gap-3",children:[n("span",{className:"font-heading text-[length:var(--size-headingLarge,64px)] leading-none text-accent",children:t}),a!==void 0&&n("span",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg",children:a})]});return e?n(z,{href:e,className:"inline-flex hover:opacity-85",children:r}):r}const Pe="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",je="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",Ve="relative z-[2] bg-bg py-[32px] max-[800px]:py-[24px]";function Ye({num:t,title:a,link:e,posts:r,columns:o,limit:c,showAll:E=!1,editing:T=!1,cardImage:ae,gap:re,layout:f,featuredWidth:se,listCover:oe=!0,featuredDarken:le,omitHead:h=!1,sample:A,nameFilter:ie=!1,padTop:ce,padBottom:de}){const[_,R]=G(""),[M,pe]=G({}),C=ge("ev"),U=r??[],D=E?U.length:typeof c=="number"&&c>0?c:W,L=U.slice(0,D),m=T&&L.length===0;if(L.length===0&&!T)return null;const I=E?W:D,d=m?A?.length?A.slice(0,E?A.length:I):Array.from({length:I},(s,i)=>({slug:`placeholder-${i}`,title:y("Blog post title"),excerpt:y("A short summary of the post appears here."),cover:"",meta:y("Journal"),dateLabel:y("Date")})):L,p=ue("Events",re,"both"),S=f===X&&d.length>1,fe=we(se),$=f===J,P=f===Q,j=Le.includes(f??""),O=ie&&!$&&!P&&!S,w=O?_e(d):[],b=O?d.filter(s=>Me(s.title,_)&&Ce(s,M)):d,F=Ee(ce,de),me=!T&&ye(t,a,e?.text),V=f===u?"grid-cols-3 max-[800px]:grid-cols-2":ee[Math.min(4,Math.max(2,o??3))]??ee[3],Y=Z[Math.min(4,Math.max(1,o??3))]??Z[3],B=$||S||f===u?"":Ne(C,j?V:Y,{cards:b.length});return P?n("section",{className:Ve,style:Object.keys(F).length?F:void 0,children:n("div",{className:K,children:n(Ie,{count:d.length,words:h||a===void 0?void 0:N(a,!1),href:h?void 0:e?.href})})}):n("section",{className:h?je:Pe,style:{...ve(ae),...F},children:l("div",{className:K,children:[h||me?null:n(he,{num:t!==void 0?x(t):void 0,title:a!==void 0?N(a,!1):void 0,link:e?{text:x(e.text),href:e.href}:void 0}),O&&l("div",{className:"mb-6 flex flex-col gap-2",children:[w.length===0?n(te,{typed:_,onType:R}):l("div",{className:"flex flex-wrap items-end gap-3",children:[n(te,{typed:_,onType:R,wide:!0}),w.map(({label:s,values:i})=>l("label",{className:"flex min-w-[140px] flex-col gap-1.5 max-[800px]:flex-1",children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:s}),l("select",{value:M[s]??"",onChange:g=>pe(xe=>({...xe,[s]:g.target.value})),className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent",children:[n("option",{value:"",children:Re}),i.map(g=>n("option",{value:g,children:g},g))]})]},s))]}),b.length===0&&n("p",{role:"status",className:"text-[length:var(--size-body,14px)] text-fg-dim",children:w.length===0?ze:ke})]}),B&&n("style",{children:B}),$?n(De,{cards:d,scaffold:m}):j?n("div",{className:`${C} sf-card-grid grid${p.className} ${V}`,style:p.style,children:b.map((s,i)=>n(Ue,{card:s,scaffold:m,lower:f===u&&i%3===1},`${s.slug}-${i}`))}):S?l("div",{className:`sf-card-grid grid grid-cols-[var(--sf-events-split)] max-[800px]:grid-cols-1${p.className}`,style:{...p.style,"--sf-events-split":fe},children:[n(v,{post:d[0],href:d[0].href,scaffold:m,layout:"cover",darken:le??$e,darkenStyle:Oe,placement:Se},`${d[0].slug}-0`),n("div",{className:`grid auto-rows-min${p.className}`,style:p.style,children:d.slice(1).map((s,i)=>n(v,{post:s,href:s.href,scaffold:m,showCover:oe},`${s.slug}-${i+1}`))})]}):n("div",{className:`${C} sf-card-grid grid${p.className} ${Y}`,style:p.style,children:b.map((s,i)=>s.tags&&s.tags.length>0?l("div",{className:"flex flex-col gap-2",children:[n(v,{post:s,href:s.href,scaffold:m}),n(ne,{tags:s.tags})]},`${s.slug}-${i}`):n(v,{post:s,href:s.href,scaffold:m},`${s.slug}-${i}`))})]})})}export{k as EVENTS_FEATURED_WIDTH,ot as EVENTS_LAYOUTS,Q as EVENTS_LAYOUT_COUNT,lt as EVENTS_LAYOUT_FALLBACK,X as EVENTS_LAYOUT_FEATURED,q as EVENTS_LAYOUT_PORTRAIT,u as EVENTS_LAYOUT_SPREAD,J as EVENTS_LAYOUT_TABS,Le as EVENTS_PHOTO_LAYOUTS,Te as MAX_CARD_TAGS,Ye as default,_e as facetChoices,Ce as matchesFacets,Me as matchesName,st as readFacets,rt as readTags};
1
+ import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useState as G}from"react";import{useScopeClass as ue}from"../lib/use-scope-class.js";import{containerGapProps as he}from"efficient-web-builder/format/lib/content/container-gap";import be from"efficient-web-builder/render/components/SectionHeader";import v from"efficient-web-builder/render/components/PostCard";import ve from"efficient-web-builder/render/components/Placeholder";import{SiteLink as z}from"efficient-web-builder/render/lib/site-runtime";import{renderGold as x,renderHeadline as N}from"efficient-web-builder/render/components/goldPhrases";import{say as y}from"efficient-web-builder/format/lib/editor-words";import{cardImageShapeTokens as Ne}from"efficient-web-builder/format/lib/content/card-image-shape";import{SITE_COLUMN as K}from"efficient-web-builder/format/lib/content/page-width";import{fillRowCss as ye}from"../lib/sections/fill-row.js";import{headIsEmpty as Ee,ownPadding as Te}from"../lib/sections/own-padding.js";const Ae=4;function st(t){if(!Array.isArray(t))return;const a=t.filter(e=>typeof e=="string"&&!!e.trim()).map(e=>e.trim()).slice(0,Ae);return a.length?a:void 0}function ot(t){if(!t||typeof t!="object"||Array.isArray(t))return;const a={};for(const[e,r]of Object.entries(t))if(e.trim()){if(typeof r=="string")r.trim()&&(a[e]=r.trim());else if(Array.isArray(r)){const o=r.filter(c=>typeof c=="string"&&!!c.trim()).map(c=>c.trim());o.length&&(a[e]=o)}}return Object.keys(a).length?a:void 0}function H(t,a){const e=t.facets?.[a];return e===void 0?[]:typeof e=="string"?[e]:e}const _e=new Intl.Collator("en",{numeric:!0,sensitivity:"base"});function Ce(t){const a=[],e=new Map;for(const r of t)for(const o of Object.keys(r.facets??{})){e.has(o)||(a.push(o),e.set(o,new Set));for(const c of H(r,o))e.get(o).add(c)}return a.map(r=>({label:r,values:[...e.get(r)].sort(_e.compare)}))}function Le(t,a){return Object.entries(a).every(([e,r])=>r===""||H(t,e).includes(r))}const W=3,X="featured",J="tabs",q="portrait",u="spread",Q="count",lt=[{label:"Even grid",value:"even"},{label:"Featured first",value:X},{label:"Tabs",value:J},{label:"Photo cards",value:q},{label:"Staggered spread",value:u},{label:"Count",value:Q}],Se=[q,u],it="even",k={min:2,max:11,step:1,fallback:7,unit:"of 12"},$e="bottom-left",Oe=55,we="bottom";function Fe(t){const a=typeof t=="number"?t:Number.parseFloat(String(t??"")),e=Number.isFinite(a)?Math.min(k.max,Math.max(k.min,Math.round(a))):k.fallback;return`${e}fr ${12-e}fr`}const Z={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1"},ee={2:"grid-cols-2",3:"grid-cols-3 max-[800px]:grid-cols-2",4:"grid-cols-4 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-2"},ze="Find by name",ke="Nobody by that name.",Re="Nobody matches.",Me="Any";function Ue(t,a){const e=o=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase().trim(),r=e(a);return r===""||e(t).includes(r)}function te({typed:t,onType:a,wide:e=!1}){return l("label",{className:`flex max-w-[360px] flex-col gap-1.5${e?" w-full":""}`,children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:ze}),n("input",{type:"search",value:t,onChange:r=>a(r.target.value),autoComplete:"off",className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent"})]})}function ne({tags:t}){return n("ul",{"aria-label":"Details",className:"flex gap-1.5 overflow-hidden",children:t.map((a,e)=>n("li",{className:"shrink-0 rounded-[var(--sf-button-radius,4px)] border border-line px-2 py-0.5 text-[length:var(--size-label,12px)] text-fg-dim",children:a},`${a}-${e}`))})}function De({card:t,scaffold:a,lower:e=!1}){return l(z,{href:t.href||"#",className:`sf-card group relative isolate flex aspect-[3/4] overflow-hidden bg-surface${e?" min-[801px]:mt-16":""}`,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,children:[n("div",{className:"absolute inset-0 transition-transform duration-700 group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100",children:n(ve,{label:`card-${t.slug}`,src:t.cover||void 0,sizes:"(max-width: 800px) 50vw, 25vw"})}),n("div",{"aria-hidden":!0,className:"absolute inset-0 z-0",style:{background:"linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 88%, transparent) 100%)"}}),t.meta&&n("span",{className:"absolute left-3 top-3 z-[1] rounded-[var(--sf-button-radius,999px)] bg-bg/85 px-2.5 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-accent",children:x(t.meta)}),l("div",{className:"relative z-[1] mt-auto flex w-full flex-col gap-1 p-4 max-[800px]:p-3",children:[n("h3",{className:"font-heading3 text-[length:var(--size-headingSmall,24px)] leading-[1.1] tracking-[-0.01em] text-fg",children:N(t.title,!1)}),t.dateLabel&&n("p",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.16em] text-accent",children:x(t.dateLabel)}),t.tags&&t.tags.length>0&&n(ne,{tags:t.tags}),t.excerpt&&n("p",{className:"line-clamp-2 text-[length:var(--size-body,14px)] leading-[1.45] text-fg-dim",children:x(t.excerpt)})]})]})}function Ie({cards:t,scaffold:a}){return n("nav",{"aria-label":"Days",className:"-mx-1 [scrollbar-width:none] max-[800px]:overflow-x-auto [&::-webkit-scrollbar]:hidden",children:n("ul",{className:"flex flex-wrap gap-2 px-1 pb-1 max-[800px]:min-w-max max-[800px]:flex-nowrap",children:t.map((e,r)=>{const o=!!e.meta;return n("li",{children:l(z,{href:e.href||"#","aria-current":o?"page":void 0,"aria-disabled":a||void 0,tabIndex:a?-1:void 0,className:`flex flex-col gap-0.5 rounded-[var(--sf-button-radius,999px)] border px-5 py-2.5 transition-colors ${o?"border-accent bg-accent text-accent-ink":"border-line text-fg hover:border-accent hover:text-accent"}`,children:[n("span",{className:"font-heading3 text-[length:var(--size-body,15px)] leading-[1.2]",children:N(e.title,!1)}),e.excerpt&&n("span",{className:`font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] ${o?"opacity-80":"text-fg-dim"}`,children:x(e.excerpt)})]})},`${e.slug}-${r}`)})})})}function Pe({count:t,words:a,href:e}){const r=l("span",{className:"inline-flex items-baseline gap-3",children:[n("span",{className:"font-heading text-[length:var(--size-headingLarge,64px)] leading-none text-accent",children:t}),a!==void 0&&n("span",{className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg",children:a})]});return e?n(z,{href:e,className:"inline-flex hover:opacity-85",children:r}):r}const je="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",Ve="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",Ye="relative z-[2] bg-bg py-[32px] max-[800px]:py-[24px]";function Be({num:t,title:a,link:e,posts:r,columns:o,limit:c,showAll:E=!1,editing:T=!1,cardImage:ae,gap:re,gapPhone:se,layout:f,featuredWidth:oe,listCover:le=!0,featuredDarken:ie,omitHead:h=!1,sample:A,nameFilter:ce=!1,padTop:de,padBottom:pe}){const[_,R]=G(""),[M,fe]=G({}),C=ue("ev"),U=r??[],D=E?U.length:typeof c=="number"&&c>0?c:W,L=U.slice(0,D),m=T&&L.length===0;if(L.length===0&&!T)return null;const I=E?W:D,d=m?A?.length?A.slice(0,E?A.length:I):Array.from({length:I},(s,i)=>({slug:`placeholder-${i}`,title:y("Blog post title"),excerpt:y("A short summary of the post appears here."),cover:"",meta:y("Journal"),dateLabel:y("Date")})):L,p=he("Events",re,"both",se),S=f===X&&d.length>1,me=Fe(oe),$=f===J,P=f===Q,j=Se.includes(f??""),O=ce&&!$&&!P&&!S,w=O?Ce(d):[],b=O?d.filter(s=>Ue(s.title,_)&&Le(s,M)):d,F=Te(de,pe),xe=!T&&Ee(t,a,e?.text),V=f===u?"grid-cols-3 max-[800px]:grid-cols-2":ee[Math.min(4,Math.max(2,o??3))]??ee[3],Y=Z[Math.min(4,Math.max(1,o??3))]??Z[3],B=$||S||f===u?"":ye(C,j?V:Y,{cards:b.length});return P?n("section",{className:Ye,style:Object.keys(F).length?F:void 0,children:n("div",{className:K,children:n(Pe,{count:d.length,words:h||a===void 0?void 0:N(a,!1),href:h?void 0:e?.href})})}):n("section",{className:h?Ve:je,style:{...Ne(ae),...F},children:l("div",{className:K,children:[h||xe?null:n(be,{num:t!==void 0?x(t):void 0,title:a!==void 0?N(a,!1):void 0,link:e?{text:x(e.text),href:e.href}:void 0}),O&&l("div",{className:"mb-6 flex flex-col gap-2",children:[w.length===0?n(te,{typed:_,onType:R}):l("div",{className:"flex flex-wrap items-end gap-3",children:[n(te,{typed:_,onType:R,wide:!0}),w.map(({label:s,values:i})=>l("label",{className:"flex min-w-[140px] flex-col gap-1.5 max-[800px]:flex-1",children:[n("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:s}),l("select",{value:M[s]??"",onChange:g=>fe(ge=>({...ge,[s]:g.target.value})),className:"rounded-[var(--sf-button-radius,6px)] border border-line bg-bg px-4 py-2.5 text-[length:var(--size-body,15px)] text-fg outline-none focus:border-accent",children:[n("option",{value:"",children:Me}),i.map(g=>n("option",{value:g,children:g},g))]})]},s))]}),b.length===0&&n("p",{role:"status",className:"text-[length:var(--size-body,14px)] text-fg-dim",children:w.length===0?ke:Re})]}),B&&n("style",{children:B}),$?n(Ie,{cards:d,scaffold:m}):j?n("div",{className:`${C} sf-card-grid grid${p.className} ${V}`,style:p.style,children:b.map((s,i)=>n(De,{card:s,scaffold:m,lower:f===u&&i%3===1},`${s.slug}-${i}`))}):S?l("div",{className:`sf-card-grid grid grid-cols-[var(--sf-events-split)] max-[800px]:grid-cols-1${p.className}`,style:{...p.style,"--sf-events-split":me},children:[n(v,{post:d[0],href:d[0].href,scaffold:m,layout:"cover",darken:ie??Oe,darkenStyle:we,placement:$e},`${d[0].slug}-0`),n("div",{className:`grid auto-rows-min${p.className}`,style:p.style,children:d.slice(1).map((s,i)=>n(v,{post:s,href:s.href,scaffold:m,showCover:le},`${s.slug}-${i+1}`))})]}):n("div",{className:`${C} sf-card-grid grid${p.className} ${Y}`,style:p.style,children:b.map((s,i)=>s.tags&&s.tags.length>0?l("div",{className:"flex flex-col gap-2",children:[n(v,{post:s,href:s.href,scaffold:m}),n(ne,{tags:s.tags})]},`${s.slug}-${i}`):n(v,{post:s,href:s.href,scaffold:m},`${s.slug}-${i}`))})]})})}export{k as EVENTS_FEATURED_WIDTH,lt as EVENTS_LAYOUTS,Q as EVENTS_LAYOUT_COUNT,it as EVENTS_LAYOUT_FALLBACK,X as EVENTS_LAYOUT_FEATURED,q as EVENTS_LAYOUT_PORTRAIT,u as EVENTS_LAYOUT_SPREAD,J as EVENTS_LAYOUT_TABS,Se as EVENTS_PHOTO_LAYOUTS,Ae as MAX_CARD_TAGS,Be as default,Ce as facetChoices,Le as matchesFacets,Ue as matchesName,ot as readFacets,st as readTags};
@@ -2,7 +2,8 @@ import type { SlotComponent } from "efficient-easel/blocks";
2
2
  export interface FooterGroupProps {
3
3
  direction?: "vertical" | "horizontal";
4
4
  gap?: number | string;
5
+ gapPhone?: unknown;
5
6
  align?: "start" | "center" | "end" | "stretch";
6
7
  content: SlotComponent;
7
8
  }
8
- export default function FooterGroup({ direction, gap, align, content: Content, }: FooterGroupProps): import("react").JSX.Element;
9
+ export default function FooterGroup({ direction, gap, gapPhone, align, content: Content, }: FooterGroupProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{containerGapProps as a}from"efficient-web-builder/format/lib/content/container-gap";const l={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function i({direction:t="vertical",gap:o,align:s="start",content:n}){const e=a("FooterGroup",o,t==="horizontal"?"inline":"block");return r("div",{className:"min-w-0",children:r(n,{className:`flex ${t==="horizontal"?"flex-row flex-wrap":"flex-col"} ${l[s]}${e.className}`,style:e.style,minEmptyHeight:80})})}export{i as default};
1
+ import{jsx as r}from"react/jsx-runtime";import{containerGapProps as l}from"efficient-web-builder/format/lib/content/container-gap";const i={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function c({direction:t="vertical",gap:o,gapPhone:s,align:n="start",content:a}){const e=l("FooterGroup",o,t==="horizontal"?"inline":"block",s);return r("div",{className:"min-w-0",children:r(a,{className:`flex ${t==="horizontal"?"flex-row flex-wrap":"flex-col"} ${i[n]}${e.className}`,style:e.style,minEmptyHeight:80})})}export{c as default};
@@ -19,5 +19,6 @@ export interface GalleryGridProps {
19
19
  columnsMobile?: number | string;
20
20
  layout?: string;
21
21
  gap?: number | string;
22
+ gapPhone?: unknown;
22
23
  }
23
- export default function GalleryGrid({ items: Items, num, title, linkText, linkHref, galleryHref, submitHref, previewHover, display, displayPhone, styleOwner, layout, columns, columnsMobile, gap: gapProp, omitHead, padTop, padBottom, editing, }: GalleryGridProps): import("react").JSX.Element;
24
+ export default function GalleryGrid({ items: Items, num, title, linkText, linkHref, galleryHref, submitHref, previewHover, display, displayPhone, styleOwner, layout, columns, columnsMobile, gap: gapProp, gapPhone, omitHead, padTop, padBottom, editing, }: GalleryGridProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as I}from"react/jsx-runtime";import{usePathname as M}from"next/navigation";import{containerGapProps as R}from"efficient-web-builder/format/lib/content/container-gap";import j from"efficient-web-builder/render/components/Btn";import{GALLERY_GRID_ATTR as z,GalleryLinksContext as A}from"./GalleryItem.js";import{useSiteSells as $}from"./SiteRecordContext.js";import{SharedPartKinds as k}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as B}from"efficient-web-builder/render/components/goldPhrases";import O from"efficient-web-builder/render/components/SectionHeader";import{headIsEmpty as T,ownPadding as F}from"../lib/sections/own-padding.js";import{resolveGridColumns as K,resolveGridMobileColumns as D}from"efficient-web-builder/format/lib/content/grid-span";import{galleryLayoutClass as U,galleryLayoutCss as W,resolveGalleryLayout as X}from"efficient-web-builder/format/lib/content/gallery-layout";const Y="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",q="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",H="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";function J({items:i,num:o,title:a,linkText:n,linkHref:x,galleryHref:r="/gallery",submitHref:g="/contact",previewHover:f,display:y,displayPhone:h,styleOwner:u,layout:d,columns:t,columnsMobile:v,gap:N,omitHead:m=!1,padTop:G,padBottom:L,editing:S=!1}){const _=M(),b=$(),E=r!==_&&(b||r!=="/gallery"),p=X(d),l=p?d:null,w=!p&&t!=null&&t!=="",s=R("GalleryB",N,"both"),C=l?{className:`sf-card-grid sf-gallery-zone ${U(l)} grid${s.className}`,style:s.style}:w?{className:`sf-card-grid sf-grid-zone grid${s.className}`,style:{...s.style,"--sf-grid-cols":String(K(t)),"--sf-grid-cols-phone":String(D(v,t))}}:{className:`sf-card-grid grid grid-cols-4${s.className} max-[1500px]:grid-cols-3 max-[800px]:grid-cols-1`,style:s.style},c=n?{text:n,href:x||"#"}:void 0,P=a?B(a,!1):void 0;return e("section",{className:m?q:Y,style:F(G,L),children:I("div",{className:H,children:[m||!S&&T(o,a,c?.text)?null:e(O,{num:o,title:P,link:c}),l&&e("style",{dangerouslySetInnerHTML:{__html:W(l)}}),i&&e(A.Provider,{value:{galleryHref:r,submitHref:g,previewHover:f,display:y,displayPhone:h,styleOwner:u},children:e(k,{children:e("div",{[z]:"",style:{display:"contents"},children:e(i,{...C,minEmptyHeight:320})})})}),E&&e("div",{className:"mt-12 flex flex-col items-center gap-3",children:e(j,{href:r,variant:"ghost",children:"See Gallery"})})]})})}export{J as default};
1
+ "use client";import{jsx as e,jsxs as M}from"react/jsx-runtime";import{usePathname as R}from"next/navigation";import{containerGapProps as j}from"efficient-web-builder/format/lib/content/container-gap";import z from"efficient-web-builder/render/components/Btn";import{GALLERY_GRID_ATTR as A,GalleryLinksContext as $}from"./GalleryItem.js";import{useSiteSells as k}from"./SiteRecordContext.js";import{SharedPartKinds as B}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as O}from"efficient-web-builder/render/components/goldPhrases";import T from"efficient-web-builder/render/components/SectionHeader";import{headIsEmpty as F,ownPadding as K}from"../lib/sections/own-padding.js";import{resolveGridColumns as D,resolveGridMobileColumns as U}from"efficient-web-builder/format/lib/content/grid-span";import{galleryLayoutClass as W,galleryLayoutCss as X,resolveGalleryLayout as Y}from"efficient-web-builder/format/lib/content/gallery-layout";const q="relative z-[2] bg-bg py-[120px] max-[800px]:py-[70px]",H="relative z-[2] bg-bg pt-0 pb-[120px] max-[800px]:pt-0 max-[800px]:pb-[70px]",J="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]";function Q({items:i,num:o,title:a,linkText:n,linkHref:x,galleryHref:r="/gallery",submitHref:g="/contact",previewHover:f,display:y,displayPhone:h,styleOwner:u,layout:d,columns:t,columnsMobile:v,gap:N,gapPhone:G,omitHead:m=!1,padTop:L,padBottom:S,editing:_=!1}){const b=R(),E=k(),w=r!==b&&(E||r!=="/gallery"),p=Y(d),l=p?d:null,C=!p&&t!=null&&t!=="",s=j("GalleryB",N,"both",G),P=l?{className:`sf-card-grid sf-gallery-zone ${W(l)} grid${s.className}`,style:s.style}:C?{className:`sf-card-grid sf-grid-zone grid${s.className}`,style:{...s.style,"--sf-grid-cols":String(D(t)),"--sf-grid-cols-phone":String(U(v,t))}}:{className:`sf-card-grid grid grid-cols-4${s.className} max-[1500px]:grid-cols-3 max-[800px]:grid-cols-1`,style:s.style},c=n?{text:n,href:x||"#"}:void 0,I=a?O(a,!1):void 0;return e("section",{className:m?H:q,style:K(L,S),children:M("div",{className:J,children:[m||!_&&F(o,a,c?.text)?null:e(T,{num:o,title:I,link:c}),l&&e("style",{dangerouslySetInnerHTML:{__html:X(l)}}),i&&e($.Provider,{value:{galleryHref:r,submitHref:g,previewHover:f,display:y,displayPhone:h,styleOwner:u},children:e(B,{children:e("div",{[A]:"",style:{display:"contents"},children:e(i,{...P,minEmptyHeight:320})})})}),w&&e("div",{className:"mt-12 flex flex-col items-center gap-3",children:e(z,{href:r,variant:"ghost",children:"See Gallery"})})]})})}export{Q as default};
@@ -0,0 +1,6 @@
1
+ import type { AriaRole, ReactNode } from "react";
2
+ export declare function Notice({ tone, role, children, }: {
3
+ tone?: "good" | "bad" | "quiet";
4
+ role?: AriaRole;
5
+ children: ReactNode;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ import{jsx as d}from"react/jsx-runtime";function t({tone:e="bad",role:r,children:o}){return d("div",{role:r,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:o})}export{t as Notice};
@@ -28,6 +28,7 @@ export declare const TITLE_SIZES: readonly [{
28
28
  export type TitleSize = (typeof TITLE_SIZES)[number]["value"];
29
29
  interface Props {
30
30
  gap?: number | string;
31
+ gapPhone?: unknown;
31
32
  num?: string;
32
33
  title?: string;
33
34
  titleSize?: TitleSize;
@@ -60,5 +61,5 @@ interface Props {
60
61
  showCardBuy?: boolean;
61
62
  showCardPage?: boolean;
62
63
  }
63
- export default function ProductGridSection({ num, catalog, kinds, title, titleSize, padTop, description, link, products: Products, wheels, source, columns, limit, editing, contentCapped, imageBackground, spinOnHover, coverIndex, indexBadge, outline, showBadge, fieldUsage, showCardPrice, showCardFinishes, showCardSizes, showCardBuy, showCardPage, cardImage, gap: gapProp, }: Props): import("react").JSX.Element | null;
64
+ export default function ProductGridSection({ num, catalog, kinds, title, titleSize, padTop, description, link, products: Products, wheels, source, columns, limit, editing, contentCapped, imageBackground, spinOnHover, coverIndex, indexBadge, outline, showBadge, fieldUsage, showCardPrice, showCardFinishes, showCardSizes, showCardBuy, showCardPage, cardImage, gap: gapProp, gapPhone, }: Props): import("react").JSX.Element | null;
64
65
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as h,Fragment as Fe}from"react/jsx-runtime";import{GRID_CARD_SHOW as D}from"../lib/sections/card-show-defaults.js";import{useScopeClass as Be}from"../lib/use-scope-class.js";import{useEffect as _,useMemo as p,useState as He}from"react";import{CARD_IMAGE_BG_OFF as ke,resolveCardImageBackground as De}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as Ge}from"efficient-web-builder/format/lib/content/card-image-shape";import{containerGapProps as Ue,GAP_LENGTH_VAR as je,GAP_ZONE_CLASS as We}from"efficient-web-builder/format/lib/content/container-gap";import Xe from"next/link";import Ke from"./ProductCard.js";import{CARD_ROWS_GRID_CLASS as Ze,cardRowsGridStyle as Ve}from"./WheelCardFrame.js";import{ProductCardChromeProvider as qe}from"./ProductCardChrome.js";import{gridClassImageSizes as Ye}from"../lib/sections/card-image-sizes.js";import{fillRowCss as Je}from"../lib/sections/fill-row.js";import{noHoleBands as re,noHoleCss as te,showsASetCard as ne}from"../lib/sections/grid-no-hole.js";import{setIsWide as Qe,summarySetBuild as er}from"../lib/wheels/set-mode.js";import{answersForKind as se}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as rr}from"./ProductCardEyebrow.js";import tr from"./NoCurrencyNote.js";import{DEFAULT_CARD_OUTLINE as nr,cardIndexCss as sr,parseCardIndexFormat as ar}from"efficient-web-builder/format/lib/sections/product-card-style";import{DEFAULT_COVER_INDEX as or}from"../lib/wheels/cover-rendering.js";import{SITE_WIDTH_CAP as ir,centredCap as lr}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as mr,SectionWheelsProvider as dr}from"./ProductRef.js";import{useCurrency as pr}from"./CurrencyContext.js";import{COLLECTION_ATTR as cr,useCatalogFilter as gr}from"./catalog/CatalogFilterContext.js";import{renderGold as G,renderHeadline as ur}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as xr}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as hr}from"../lib/wheels/wheel-summary-casing.js";import fr from"./TyreSummaryCard.js";import{itemKind as U,plpKindNoun as yr}from"../lib/catalog/plp-item.js";import{filterBarCategoryOf as Cr,gridKindsOf as vr,gridRowsOf as br}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as wr}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as Sr}from"efficient-web-builder/render/lib/document/header-clearance";import{finishFamiliesOf as Mr}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as $r}from"../lib/wheels/lug-count.js";import{diametersOf as Nr}from"../lib/wheels/size-range.js";import{say as _r}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as Er}from"../lib/sections/product-grid-title.js";const s={headingMediumUpTo800Xs:"max-[800px]:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-[800px]:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-[800px]:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},ae={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},oe=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${s.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium1} ${s.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium2} ${s.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium3} ${s.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium4} ${s.headingMediumUpTo800Xl}`}];function Tr(f){return(oe.find(c=>c.value===f)??oe.find(c=>c.value===Er)).cls}function Lr({num:f,catalog:c,kinds:E,title:T,titleSize:ie,padTop:j,description:b,link:y,products:le,wheels:me,source:m,columns:de,limit:a,editing:C,contentCapped:pe=!1,imageBackground:ce,spinOnHover:ge,coverIndex:ue,indexBadge:xe,outline:he,showBadge:fe,fieldUsage:g,showCardPrice:ye,showCardFinishes:Ce,showCardSizes:ve,showCardBuy:be,showCardPage:we,cardImage:Se,gap:Me}){const L=p(()=>g?se(g,"alloy-wheel"):void 0,[g]),$e=p(()=>g?se(g,"tyre"):void 0,[g]),e=Be("pg"),d=ae[Math.min(6,Math.max(1,de??4))]??ae[4],W=typeof a=="number"&&a>0,X=pe,K=wr(C===!0&&!!m),i=p(()=>m?hr(br(m,E,K??c??[])):null,[c,K,m,E]),u=Cr(m),x=u!==null,{filters:w,reportCount:z,reportLugs:I,reportSizes:A,reportFinishes:P,reportCategories:R,vehicle:Z}=gr(),{currency:O}=pr(),F=x&&!!w.process&&w.process!==u,t=p(()=>i?x?xr(i,w,O,Z.fit):i:null,[i,x,w,O,Z.fit]);_(()=>(R(e,u===null?[]:[u]),()=>R(e,[])),[u,R,e]),_(()=>{if(x)return z(e,F?0:t?.length??0),()=>z(e,0)},[x,F,t,z,e]);const Ne=p(()=>{const n=(t??[]).filter(l=>U(l)!=="tyre");if(n.length===0)return!1;const o=n.some(l=>!!l.process);return n.some(l=>!!l.setWords)||rr({kind:!1,brand:!1,process:o},L??[])},[t,L]),S=p(()=>({lugs:$r(i??[]),sizes:Nr(i??[]),finishes:Mr(i??[])}),[i]);_(()=>(I(e,S.lugs),A(e,S.sizes),P(e,S.finishes),()=>{I(e,[]),A(e,[]),P(e,[])}),[S,I,A,P,e]);const v=Ue("ProductGrid",Me,"both"),V=v.className.includes(We),B=`${e} grid${v.className} bg-[var(--catalog-grid-bg)] ${d}`,_e=V?`${B} ${Ze}`:B,Ee=V?{...v.style,...Ve(`var(${je})`)}:v.style,Te=t?t.length>0?r("div",{className:_e,style:Ee,children:t.map((n,o)=>U(n)==="tyre"?r(fr,{item:n,currency:O,editing:C,fieldUsage:$e},`tyre:${n.slug}-${o}`):r(Ke,{wheel:n,variant:"catalog"},`${n.slug}-${o}`))}):C?r("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:r("span",{className:`font-mono ${s.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:_r("No products in “{name}” yet",{name:m?.name??""})})}):null:r(le,{className:B,style:v.style,minEmptyHeight:320}),M=t?t.length:null,q=yr(vr(m,E)),Le=f||T||b||y?h("div",{className:`${Sr} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${X?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[h("div",{className:"flex min-w-0 items-end gap-6 max-[800px]:flex-col max-[800px]:items-stretch max-[800px]:gap-3",children:[f&&r("span",{className:`font-mono ${s.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:G(f)}),T&&r("h2",{className:`${Tr(ie)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:ur(T,!1)})]}),(b||y||M!==null)&&h("div",{className:"flex items-center gap-5 max-[800px]:gap-3 min-[800px]:grow min-[800px]:justify-end",children:[b&&r("span",{className:`max-w-[340px] truncate font-display ${s.body} leading-[1.4] text-fg-dim max-[800px]:hidden min-[800px]:w-0 min-[800px]:grow min-[800px]:text-right`,children:G(b)}),y&&h(Xe,{href:y.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${s.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[G(y.text),r("span",{"aria-hidden":!0,children:"→"})]}),M!==null&&h("span",{className:`whitespace-nowrap font-mono ${s.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:[M," ",M===1?q.one:q.many]})]})]}):null,ze=typeof j=="number"?j:120,Y=ar(xe),$=p(()=>{if(!t)return null;const n=t.map(o=>U(o)!=="tyre"&&Qe(er(o))?2:1);return ne(n,a)?re(d,n,a):null},[t,d,a]),[Ie,Ae]=He("");_(()=>{if(t)return;const n=document.querySelector(`.${e}`);if(!n)return;const o=()=>{const l=[...n.children].map(Oe=>Oe.classList.contains("col-span-2")?2:1);Ae(ne(l,a)?te(e,re(d,l,a,!1),l.length):"")};o();const k=new MutationObserver(o);return k.observe(n,{childList:!0}),()=>k.disconnect()},[t,e,d,a]);const Pe=$?$[0].tracks:t?W?Math.min(t.length,a):t.length:void 0,N=$?te(e,$,t.length):Ie,J=N?"":Je(e,d,{limit:a,cards:t?.length}),Q=sr(e,Y),ee=h(Fe,{children:[W&&!N&&r("style",{children:`.${e} > *:nth-child(n+${a+1}){display:none}`}),N&&r("style",{children:N}),J&&r("style",{children:J}),Q&&r("style",{children:Q}),Le,Te,r(tr,{editing:C})]});if(F)return null;const H=r("section",{...x?{[cr]:u}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${ze}px`,...Ge(Se)},children:X?r("div",{style:lr(ir),children:ee}):ee}),Re=i?H:C?r(mr,{children:H}):r(dr,{wheels:me,children:H});return r(qe,{imageSizes:Ye(d,Pe),imageBackgroundFill:De(ce,ke),spinOnHover:ge??!0,coverIndex:ue??or,indexBadge:Y,outline:he??nr,showBadge:fe??!0,fieldUsage:L,reserveEyebrow:Ne,showCardPrice:ye??!0,showCardFinishes:Ce??!0,showCardSizes:ve??D.showCardSizes,showCardBuy:be??D.showCardBuy,showCardPage:we??D.showCardPage,children:Re})}export{oe as TITLE_SIZES,Lr as default};
1
+ "use client";import{jsx as r,jsxs as f,Fragment as Be}from"react/jsx-runtime";import{GRID_CARD_SHOW as D}from"../lib/sections/card-show-defaults.js";import{useScopeClass as He}from"../lib/use-scope-class.js";import{useEffect as _,useMemo as p,useState as ke}from"react";import{CARD_IMAGE_BG_OFF as De,resolveCardImageBackground as Ge}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as Ue}from"efficient-web-builder/format/lib/content/card-image-shape";import{containerGapProps as je,GAP_ZONE_CLASS as We}from"efficient-web-builder/format/lib/content/container-gap";import Xe from"next/link";import Ke from"./ProductCard.js";import{CARD_ROWS_GRID_CLASS as Ze,cardRowsGap as qe,cardRowsGridStyle as Ve}from"./WheelCardFrame.js";import{ProductCardChromeProvider as Ye}from"./ProductCardChrome.js";import{gridClassImageSizes as Je}from"../lib/sections/card-image-sizes.js";import{fillRowCss as Qe}from"../lib/sections/fill-row.js";import{noHoleBands as re,noHoleCss as te,showsASetCard as ne}from"../lib/sections/grid-no-hole.js";import{setIsWide as er,summarySetBuild as rr}from"../lib/wheels/set-mode.js";import{answersForKind as se}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as tr}from"./ProductCardEyebrow.js";import nr from"./NoCurrencyNote.js";import{DEFAULT_CARD_OUTLINE as sr,cardIndexCss as ar,parseCardIndexFormat as or}from"efficient-web-builder/format/lib/sections/product-card-style";import{DEFAULT_COVER_INDEX as ir}from"../lib/wheels/cover-rendering.js";import{SITE_WIDTH_CAP as lr,centredCap as mr}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as dr,SectionWheelsProvider as pr}from"./ProductRef.js";import{useCurrency as cr}from"./CurrencyContext.js";import{COLLECTION_ATTR as gr,useCatalogFilter as ur}from"./catalog/CatalogFilterContext.js";import{renderGold as G,renderHeadline as xr}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as hr}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as fr}from"../lib/wheels/wheel-summary-casing.js";import yr from"./TyreSummaryCard.js";import{itemKind as U,plpKindNoun as Cr}from"../lib/catalog/plp-item.js";import{filterBarCategoryOf as wr,gridKindsOf as br,gridRowsOf as vr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as Sr}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as Mr}from"efficient-web-builder/render/lib/document/header-clearance";import{finishFamiliesOf as $r}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as Nr}from"../lib/wheels/lug-count.js";import{diametersOf as _r}from"../lib/wheels/size-range.js";import{say as Er}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as Tr}from"../lib/sections/product-grid-title.js";const s={headingMediumUpTo800Xs:"max-[800px]:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-[800px]:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-[800px]:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},ae={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},oe=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${s.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium1} ${s.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium2} ${s.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium3} ${s.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium4} ${s.headingMediumUpTo800Xl}`}];function zr(y){return(oe.find(c=>c.value===y)??oe.find(c=>c.value===Tr)).cls}function Lr({num:y,catalog:c,kinds:E,title:T,titleSize:ie,padTop:j,description:b,link:C,products:le,wheels:me,source:m,columns:de,limit:a,editing:w,contentCapped:pe=!1,imageBackground:ce,spinOnHover:ge,coverIndex:ue,indexBadge:xe,outline:he,showBadge:fe,fieldUsage:g,showCardPrice:ye,showCardFinishes:Ce,showCardSizes:we,showCardBuy:be,showCardPage:ve,cardImage:Se,gap:Me,gapPhone:$e}){const z=p(()=>g?se(g,"alloy-wheel"):void 0,[g]),Ne=p(()=>g?se(g,"tyre"):void 0,[g]),e=He("pg"),d=ae[Math.min(6,Math.max(1,de??4))]??ae[4],W=typeof a=="number"&&a>0,X=pe,K=Sr(w===!0&&!!m),i=p(()=>m?fr(vr(m,E,K??c??[])):null,[c,K,m,E]),u=wr(m),x=u!==null,{filters:v,reportCount:L,reportLugs:I,reportSizes:A,reportFinishes:P,reportCategories:R,vehicle:Z}=ur(),{currency:O}=cr(),F=x&&!!v.process&&v.process!==u,t=p(()=>i?x?hr(i,v,O,Z.fit):i:null,[i,x,v,O,Z.fit]);_(()=>(R(e,u===null?[]:[u]),()=>R(e,[])),[u,R,e]),_(()=>{if(x)return L(e,F?0:t?.length??0),()=>L(e,0)},[x,F,t,L,e]);const _e=p(()=>{const n=(t??[]).filter(l=>U(l)!=="tyre");if(n.length===0)return!1;const o=n.some(l=>!!l.process);return n.some(l=>!!l.setWords)||tr({kind:!1,brand:!1,process:o},z??[])},[t,z]),S=p(()=>({lugs:Nr(i??[]),sizes:_r(i??[]),finishes:$r(i??[])}),[i]);_(()=>(I(e,S.lugs),A(e,S.sizes),P(e,S.finishes),()=>{I(e,[]),A(e,[]),P(e,[])}),[S,I,A,P,e]);const h=je("ProductGrid",Me,"both",$e),q=h.className.includes(We),B=`${e} grid${h.className} bg-[var(--catalog-grid-bg)] ${d}`,Ee=q?`${B} ${Ze}`:B,Te=q?{...h.style,...Ve(qe(h))}:h.style,ze=t?t.length>0?r("div",{className:Ee,style:Te,children:t.map((n,o)=>U(n)==="tyre"?r(yr,{item:n,currency:O,editing:w,fieldUsage:Ne},`tyre:${n.slug}-${o}`):r(Ke,{wheel:n,variant:"catalog"},`${n.slug}-${o}`))}):w?r("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:r("span",{className:`font-mono ${s.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:Er("No products in “{name}” yet",{name:m?.name??""})})}):null:r(le,{className:B,style:h.style,minEmptyHeight:320}),M=t?t.length:null,V=Cr(br(m,E)),Le=y||T||b||C?f("div",{className:`${Mr} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${X?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[f("div",{className:"flex min-w-0 items-end gap-6 max-[800px]:flex-col max-[800px]:items-stretch max-[800px]:gap-3",children:[y&&r("span",{className:`font-mono ${s.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:G(y)}),T&&r("h2",{className:`${zr(ie)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:xr(T,!1)})]}),(b||C||M!==null)&&f("div",{className:"flex items-center gap-5 max-[800px]:gap-3 min-[800px]:grow min-[800px]:justify-end",children:[b&&r("span",{className:`max-w-[340px] truncate font-display ${s.body} leading-[1.4] text-fg-dim max-[800px]:hidden min-[800px]:w-0 min-[800px]:grow min-[800px]:text-right`,children:G(b)}),C&&f(Xe,{href:C.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${s.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[G(C.text),r("span",{"aria-hidden":!0,children:"→"})]}),M!==null&&f("span",{className:`whitespace-nowrap font-mono ${s.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:[M," ",M===1?V.one:V.many]})]})]}):null,Ie=typeof j=="number"?j:120,Y=or(xe),$=p(()=>{if(!t)return null;const n=t.map(o=>U(o)!=="tyre"&&er(rr(o))?2:1);return ne(n,a)?re(d,n,a):null},[t,d,a]),[Ae,Pe]=ke("");_(()=>{if(t)return;const n=document.querySelector(`.${e}`);if(!n)return;const o=()=>{const l=[...n.children].map(Fe=>Fe.classList.contains("col-span-2")?2:1);Pe(ne(l,a)?te(e,re(d,l,a,!1),l.length):"")};o();const k=new MutationObserver(o);return k.observe(n,{childList:!0}),()=>k.disconnect()},[t,e,d,a]);const Re=$?$[0].tracks:t?W?Math.min(t.length,a):t.length:void 0,N=$?te(e,$,t.length):Ae,J=N?"":Qe(e,d,{limit:a,cards:t?.length}),Q=ar(e,Y),ee=f(Be,{children:[W&&!N&&r("style",{children:`.${e} > *:nth-child(n+${a+1}){display:none}`}),N&&r("style",{children:N}),J&&r("style",{children:J}),Q&&r("style",{children:Q}),Le,ze,r(nr,{editing:w})]});if(F)return null;const H=r("section",{...x?{[gr]:u}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${Ie}px`,...Ue(Se)},children:X?r("div",{style:mr(lr),children:ee}):ee}),Oe=i?H:w?r(dr,{children:H}):r(pr,{wheels:me,children:H});return r(Ye,{imageSizes:Je(d,Re),imageBackgroundFill:Ge(ce,De),spinOnHover:ge??!0,coverIndex:ue??ir,indexBadge:Y,outline:he??sr,showBadge:fe??!0,fieldUsage:z,reserveEyebrow:_e,showCardPrice:ye??!0,showCardFinishes:Ce??!0,showCardSizes:we??D.showCardSizes,showCardBuy:be??D.showCardBuy,showCardPage:ve??D.showCardPage,children:Oe})}export{oe as TITLE_SIZES,Lr as default};
@@ -1,7 +1,7 @@
1
- "use client";import{jsx as r,jsxs as t,Fragment as Q}from"react/jsx-runtime";import{useEffect as u,useRef as ee,useState as d}from"react";import{ApiError as re}from"../lib/api/index.js";import{sectionCornerStyle as ae}from"efficient-web-builder/format/lib/content/section-corners";import{nestedAccentValue as te,sectionThemeWrap as oe}from"efficient-web-builder/format/lib/content/section-surface";import{SUBSCRIBE_POPUP_DEFAULTS as ne}from"efficient-web-builder/format/lib/content/subscribe";import{NEWSLETTER_SOURCE as ie}from"../lib/newsletter-signup.js";import{popupKindStyle as se}from"../lib/popup/text-kind-style.js";import{FormBody as le}from"./FormBlock.js";import{useBoundForm as pe}from"./formSubmission.js";import I from"efficient-web-builder/render/components/SectionEyebrow";import O,{FieldCaption as R}from"./WebFormField.js";import{renderGold as n,renderHeadline as k}from"efficient-web-builder/render/components/goldPhrases";import{useNewsletterSignup as me}from"./useNewsletterSignup.js";import{useSubscribePopup as ce}from"./SubscribePopupContext.js";import de from"./PopupFrame.js";const U={eyebrow:"[&>span]:text-[length:var(--pp-eyebrow-size,var(--size-label,12px))]",formEyebrow:"[&>span]:text-[length:var(--pp-formeyebrow-size,var(--size-label,13px))]"},fe=50,b="font-[family-name:var(--pp-fieldlabel-font,var(--font-mono))] text-[length:var(--pp-fieldlabel-size,12px)]";function xe(e){const i=oe({sectionAccent:te(e.sectionAccent)}),p=ae(e.sectionCorners,e.sectionCornerSides);return{className:i?.className??"",style:{...i?.style??{},...p??{},...se(e.textStyles)}}}function ue({content:e,open:i=!0,onClose:p,onSent:f,inline:o=!1,prefillEmail:c="",source:g=ie.popup,mode:h="chosen",form:D}){const v=h==="chosen"?e.formSlug:"",y=pe(v||void 0,o?void 0:D??null),H=!!v&&!!y,[w,V]=d(""),[S,z]=d(""),[E,W]=d(()=>new Set(e.interests.slice(0,1))),[_,Y]=d(e.frequencies[0]??""),{status:m,error:C,submit:G,reset:F}=me({source:g,dryRun:o}),j=m==="sending",L=m==="invalid"?e.emailInvalidText:m==="error"?C instanceof re?C.message:e.submitErrorText:null,[K,M]=d(""),P=ee(null);if(u(()=>{i&&F()},[i,F]),u(()=>{m==="sent"&&!o&&f?.()},[m]),u(()=>{if(o||!i)return;const a=window.setTimeout(()=>P.current?.focus(),fe);return()=>window.clearTimeout(a)},[o,i]),u(()=>{!i||!c||z(c)},[i,c]),!o&&!i)return null;function X(a){W(s=>{const l=new Set(s);return l.has(a)?l.delete(a):l.add(a),l})}function Z(a){a.preventDefault();const s=S.trim().toLowerCase();M(s),G({email:s,firstName:w,interests:[...E],frequency:_})}const J=e.successBody.replace(/\{email\}/g,K).replace(/\{issue\}/g,e.issueNumber),T=xe(e),N=e.formSide==="left",B=t("div",{className:"flex flex-wrap items-center justify-between gap-5 uppercase tracking-[0.18em] text-fg-dim",children:[t("span",{className:"flex items-center gap-2 font-[family-name:var(--pp-fineprint-font,var(--font-mono))] text-[length:var(--pp-fineprint-size,12px)]",children:[r("span",{className:"block h-1.5 w-1.5 rounded-full bg-accent"}),n(e.finePrint)]}),!o&&r("button",{type:"button",onClick:p,className:"font-[family-name:var(--pp-dismiss-font,var(--font-mono))] text-[length:var(--pp-dismiss-size,12px)] uppercase tracking-[0.18em] text-fg-dim underline underline-offset-[3px] transition-colors hover:text-fg",children:n(e.dismissText)})]}),q=t(Q,{children:[r("span",{className:`contents [&>span]:font-[family-name:var(--pp-formeyebrow-font,var(--font-mono))] ${U.formEyebrow}`,children:r(I,{text:e.formLabel,scaled:!1,className:"mb-5"})}),r("h2",{id:"subscribe-modal-title",className:"font-[family-name:var(--pp-formheading-font,var(--font-display))] text-[length:var(--pp-formheading-size,34px)] font-medium uppercase leading-none tracking-[-0.025em] [&_em]:font-serif [&_em]:normal-case [&_em]:tracking-[-0.02em]",children:k(e.formHeading)}),r("p",{className:"mt-4 font-[family-name:var(--pp-formintro-font,var(--font-serif))] text-[length:var(--pp-formintro-size,17px)] italic leading-[1.55] text-fg-dim",children:n(e.formIntro,!0)})]}),$="px-12 py-12 max-[880px]:px-8 max-[880px]:py-8";let x;H&&y?x=t("div",{className:`relative flex min-h-[560px] flex-col max-[880px]:min-h-0 ${$}`,children:[q,r("div",{className:"mt-8",children:r(le,{form:y,formSlug:v,editing:o,onSent:f})}),r("div",{className:"mt-auto pt-8",children:B})]}):m!=="sent"?x=t("form",{onSubmit:Z,noValidate:!0,className:`relative flex min-h-[560px] flex-col max-[880px]:min-h-0 ${$}`,children:[q,t("div",{className:"mt-8 flex flex-col gap-5",children:[r(O,{label:n(e.firstNameLabel),required:!0,labelFace:b,children:r("input",{type:"text",value:w,onChange:a=>V(a.target.value),placeholder:e.firstNamePlaceholder,required:!0,className:"border border-line bg-surface px-4 py-4 font-display text-[15px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:tracking-[0.04em] placeholder:text-fg-dim focus:border-accent"})}),r(O,{label:n(e.emailLabel),required:!0,labelFace:b,children:r("input",{type:"email",value:S,onChange:a=>z(a.target.value),placeholder:e.emailPlaceholder,required:!0,className:"border border-line bg-surface px-4 py-4 font-display text-[15px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:tracking-[0.04em] placeholder:text-fg-dim focus:border-accent"})}),t("div",{className:"mt-2 flex flex-col gap-3",children:[r(R,{labelFace:b,children:n(e.interestsLabel)}),r("div",{className:"flex flex-wrap gap-2",children:e.interests.map((a,s)=>{const l=E.has(a);return r("button",{type:"button",onClick:()=>X(a),"aria-pressed":l,className:["select-none border px-4 py-3 font-[family-name:var(--pp-option-font,var(--font-mono))] text-[length:var(--pp-option-size,12px)] uppercase tracking-[0.22em] transition-all",l?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:a},`${a}-${s}`)})})]}),e.frequencies.length>0&&t("div",{className:"mt-2 flex flex-col gap-3",children:[r(R,{labelFace:b,children:n(e.frequencyLabel)}),r("div",{className:"flex border border-line",children:e.frequencies.map((a,s)=>{const l=_===a;return r("button",{type:"button",onClick:()=>Y(a),"aria-pressed":l,className:["flex-1 px-3 py-4 font-[family-name:var(--pp-option-font,var(--font-mono))] text-[length:var(--pp-option-size,12px)] uppercase tracking-[0.24em] transition-all",s<e.frequencies.length-1?"border-r border-line":"",l?"bg-accent text-bg":"text-fg-dim hover:text-fg"].join(" "),children:a},`${a}-${s}`)})})]})]}),t("div",{className:"mt-auto flex flex-col gap-4 pt-8",children:[L&&r("p",{role:"alert",className:"border border-red-300 bg-red-50 px-4 py-3 font-mono text-[12px] uppercase tracking-[0.18em] text-red-700",children:L}),t("button",{type:"submit",disabled:j,className:"group flex items-center justify-between gap-5 border border-btn bg-btn px-6 py-5 font-mono text-[14px] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg disabled:cursor-wait disabled:opacity-60 disabled:hover:border-btn disabled:hover:bg-btn",children:[r("span",{children:e.submitText}),r("span",{className:"transition-transform group-hover:translate-x-[4px]",children:j?"…":"→"})]}),B]})]}):x=t("div",{className:"flex min-h-[560px] flex-col justify-center gap-6 px-12 py-12 max-[880px]:min-h-0 max-[880px]:px-8 max-[880px]:py-8",style:{animation:"subscribe-fade 0.25s ease"},children:[r("div",{className:"flex h-16 w-16 items-center justify-center border border-accent font-display text-[32px] text-accent",children:"✓"}),r("h3",{className:"font-[family-name:var(--pp-doneheading-font,var(--font-display))] text-[length:var(--pp-doneheading-size,38px)] font-medium uppercase leading-none tracking-[-0.025em] [&_em]:font-serif [&_em]:normal-case [&_em]:tracking-[-0.02em]",children:k(e.successHeading)}),r("p",{className:"max-w-[440px] font-[family-name:var(--pp-donebody-font,var(--font-serif))] text-[length:var(--pp-donebody-size,18px)] italic leading-[1.55] text-fg-dim",children:n(J,!0)}),!o&&r("button",{type:"button",onClick:p,className:"self-start border border-line px-6 py-5 font-mono text-[14px] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:n(e.keepBrowsingText)})]});const A=t("div",{className:`relative w-[min(1100px,100%)] overflow-hidden border border-line bg-bg [border-radius:var(--sf-section-radius,0px)] max-[880px]:border-x-0 max-[880px]:border-b-0 ${T.className}`.trim(),style:{...T.style,background:"var(--bg)",color:"var(--fg)",boxShadow:o?"0 30px 80px -30px rgba(0,0,0,0.5)":"0 60px 120px -20px rgba(0,0,0,0.7)",animation:o?void 0:"subscribe-rise 0.35s cubic-bezier(.2,.7,.2,1)"},children:[!o&&r("button",{ref:P,type:"button",onClick:p,"aria-label":"Close popup",className:"absolute right-[18px] top-[18px] z-[5] flex h-[38px] w-[38px] items-center justify-center border border-line font-mono text-[14px] text-fg-dim transition-colors hover:border-accent hover:text-fg max-[880px]:right-3 max-[880px]:top-3 max-[880px]:h-11 max-[880px]:w-11",style:{background:"color-mix(in oklab, var(--bg) 85%, transparent)"},children:"✕"}),t("div",{className:["grid max-h-[calc(100vh-48px)] overflow-hidden max-[880px]:max-h-[88dvh] max-[880px]:grid-cols-1 max-[880px]:overflow-auto",N?"grid-cols-[1fr_1.05fr]":"grid-cols-[1.05fr_1fr]"].join(" "),children:[t("aside",{className:["relative flex min-h-[560px] flex-col justify-between overflow-hidden border-line px-[var(--sf-site-gutter,40px)] py-12 max-[880px]:min-h-[380px] max-[880px]:border-r-0 max-[880px]:border-l-0 max-[880px]:border-b max-[880px]:px-8 max-[880px]:py-8",N?"order-2 border-l max-[880px]:order-none":"border-r",e.valuePanelOnPhone?"":"max-[880px]:hidden"].join(" "),style:{background:"var(--subscribe-panel-bg)"},children:[r("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent 0 28px, color-mix(in oklab, var(--accent) 4%, transparent) 28px 29px), repeating-linear-gradient(90deg, transparent 0 28px, color-mix(in oklab, var(--accent) 3%, transparent) 28px 29px)"}}),t("div",{"aria-hidden":!0,className:"pointer-events-none absolute -right-[120px] -bottom-[120px] z-[1] h-[520px] w-[520px] rounded-full border opacity-50 max-[880px]:-right-[100px] max-[880px]:-bottom-[100px] max-[880px]:h-[340px] max-[880px]:w-[340px]",style:{borderColor:"color-mix(in oklab, var(--accent) 22%, transparent)"},children:[r("div",{className:"absolute inset-[60px] rounded-full border",style:{borderColor:"color-mix(in oklab, var(--accent) 18%, transparent)"}}),r("div",{className:"absolute inset-[140px] rounded-full border",style:{borderColor:"color-mix(in oklab, var(--accent) 14%, transparent)"}})]}),t("div",{className:["relative z-[2] flex items-start justify-between font-[family-name:var(--pp-meta-font,var(--font-mono))] text-[length:var(--pp-meta-size,12px)] uppercase tracking-[0.3em] text-fg-dim",N&&!o?"pr-[52px]":""].join(" "),children:[r("span",{children:n(e.metaLabel)}),(e.issueLabel||e.issueNumber)&&t("span",{children:[n(e.issueLabel)," ",r("strong",{className:"font-normal text-accent",children:e.issueNumber})]})]}),t("div",{className:"relative z-[2] flex flex-col gap-5 py-8",children:[r("span",{className:`contents [&>span]:font-[family-name:var(--pp-eyebrow-font,var(--font-mono))] ${U.eyebrow}`,children:r(I,{text:e.kicker,size:12,scaled:!1})}),r("h2",{className:"font-[family-name:var(--pp-heading-font,var(--font-display))] text-[length:var(--pp-heading-size,clamp(40px,4.8vw,68px))] font-medium uppercase leading-[0.92] tracking-[-0.04em] text-fg [&_em]:font-serif [&_em]:normal-case [&_em]:tracking-[-0.03em]",children:k(e.heading)}),r("p",{className:"max-w-[420px] font-[family-name:var(--pp-body-font,var(--font-serif))] text-[length:var(--pp-body-size,18px)] italic leading-[1.5]",style:{color:"color-mix(in oklab, var(--fg) 85%, transparent)"},children:n(e.deck,!0)})]}),e.stats.length>0&&r("div",{className:"relative z-[2] grid grid-cols-2 gap-5 border-t pt-6",style:{borderColor:"color-mix(in oklab, var(--accent) 18%, var(--site-line))"},children:e.stats.map((a,s)=>t("div",{children:[r("div",{className:"mb-2 font-[family-name:var(--pp-statname-font,var(--font-mono))] text-[length:var(--pp-statname-size,11px)] uppercase tracking-[0.24em] text-fg-dim",children:n(a.label)}),r("div",{className:"font-[family-name:var(--pp-statvalue-font,var(--font-display))] text-[length:var(--pp-statvalue-size,22px)] font-medium tracking-[-0.015em] text-fg",children:n(a.value)})]},`${a.label}-${s}`))})]}),x]})]});return o?r("div",{className:"flex w-full justify-center p-6","data-subscribe-preview":!0,children:A}):t(de,{site:{blur:8,sheetOnPhone:!0,animation:"subscribe-fade 0.25s ease"},labelledBy:"subscribe-modal-title",open:i,onClose:p,children:[A,r("style",{children:`
1
+ "use client";import{jsx as r,jsxs as t,Fragment as Q}from"react/jsx-runtime";import{useEffect as u,useRef as ee,useState as d}from"react";import{ApiError as re}from"../lib/api/index.js";import{sectionCornerStyle as ae}from"efficient-web-builder/format/lib/content/section-corners";import{nestedAccentValue as te,sectionThemeWrap as oe}from"efficient-web-builder/format/lib/content/section-surface";import{SUBSCRIBE_POPUP_DEFAULTS as ne}from"efficient-web-builder/format/lib/content/subscribe";import{NEWSLETTER_SOURCE as ie}from"../lib/newsletter-signup.js";import{popupKindStyle as se}from"../lib/popup/text-kind-style.js";import{FormBody as le}from"./FormBlock.js";import{useBoundForm as pe}from"./formSubmission.js";import I from"efficient-web-builder/render/components/SectionEyebrow";import O,{FieldCaption as R}from"./WebFormField.js";import{renderGold as n,renderHeadline as k}from"efficient-web-builder/render/components/goldPhrases";import{useNewsletterSignup as me}from"./useNewsletterSignup.js";import{useSubscribePopup as ce}from"./SubscribePopupContext.js";import de from"./PopupFrame.js";import{Notice as fe}from"./Notice.js";const U={eyebrow:"[&>span]:text-[length:var(--pp-eyebrow-size,var(--size-label,12px))]",formEyebrow:"[&>span]:text-[length:var(--pp-formeyebrow-size,var(--size-label,13px))]"},xe=50,b="font-[family-name:var(--pp-fieldlabel-font,var(--font-mono))] text-[length:var(--pp-fieldlabel-size,12px)]";function ue(e){const i=oe({sectionAccent:te(e.sectionAccent)}),p=ae(e.sectionCorners,e.sectionCornerSides);return{className:i?.className??"",style:{...i?.style??{},...p??{},...se(e.textStyles)}}}function be({content:e,open:i=!0,onClose:p,onSent:f,inline:o=!1,prefillEmail:c="",source:g=ie.popup,mode:h="chosen",form:D}){const v=h==="chosen"?e.formSlug:"",y=pe(v||void 0,o?void 0:D??null),H=!!v&&!!y,[w,V]=d(""),[S,z]=d(""),[E,W]=d(()=>new Set(e.interests.slice(0,1))),[_,Y]=d(e.frequencies[0]??""),{status:m,error:C,submit:G,reset:F}=me({source:g,dryRun:o}),j=m==="sending",L=m==="invalid"?e.emailInvalidText:m==="error"?C instanceof re?C.message:e.submitErrorText:null,[K,M]=d(""),P=ee(null);if(u(()=>{i&&F()},[i,F]),u(()=>{m==="sent"&&!o&&f?.()},[m]),u(()=>{if(o||!i)return;const a=window.setTimeout(()=>P.current?.focus(),xe);return()=>window.clearTimeout(a)},[o,i]),u(()=>{!i||!c||z(c)},[i,c]),!o&&!i)return null;function X(a){W(s=>{const l=new Set(s);return l.has(a)?l.delete(a):l.add(a),l})}function Z(a){a.preventDefault();const s=S.trim().toLowerCase();M(s),G({email:s,firstName:w,interests:[...E],frequency:_})}const J=e.successBody.replace(/\{email\}/g,K).replace(/\{issue\}/g,e.issueNumber),T=ue(e),N=e.formSide==="left",B=t("div",{className:"flex flex-wrap items-center justify-between gap-5 uppercase tracking-[0.18em] text-fg-dim",children:[t("span",{className:"flex items-center gap-2 font-[family-name:var(--pp-fineprint-font,var(--font-mono))] text-[length:var(--pp-fineprint-size,12px)]",children:[r("span",{className:"block h-1.5 w-1.5 rounded-full bg-accent"}),n(e.finePrint)]}),!o&&r("button",{type:"button",onClick:p,className:"font-[family-name:var(--pp-dismiss-font,var(--font-mono))] text-[length:var(--pp-dismiss-size,12px)] uppercase tracking-[0.18em] text-fg-dim underline underline-offset-[3px] transition-colors hover:text-fg",children:n(e.dismissText)})]}),q=t(Q,{children:[r("span",{className:`contents [&>span]:font-[family-name:var(--pp-formeyebrow-font,var(--font-mono))] ${U.formEyebrow}`,children:r(I,{text:e.formLabel,scaled:!1,className:"mb-5"})}),r("h2",{id:"subscribe-modal-title",className:"font-[family-name:var(--pp-formheading-font,var(--font-display))] text-[length:var(--pp-formheading-size,34px)] font-medium uppercase leading-none tracking-[-0.025em] [&_em]:font-serif [&_em]:normal-case [&_em]:tracking-[-0.02em]",children:k(e.formHeading)}),r("p",{className:"mt-4 font-[family-name:var(--pp-formintro-font,var(--font-serif))] text-[length:var(--pp-formintro-size,17px)] italic leading-[1.55] text-fg-dim",children:n(e.formIntro,!0)})]}),$="px-12 py-12 max-[880px]:px-8 max-[880px]:py-8";let x;H&&y?x=t("div",{className:`relative flex min-h-[560px] flex-col max-[880px]:min-h-0 ${$}`,children:[q,r("div",{className:"mt-8",children:r(le,{form:y,formSlug:v,editing:o,onSent:f})}),r("div",{className:"mt-auto pt-8",children:B})]}):m!=="sent"?x=t("form",{onSubmit:Z,noValidate:!0,className:`relative flex min-h-[560px] flex-col max-[880px]:min-h-0 ${$}`,children:[q,t("div",{className:"mt-8 flex flex-col gap-5",children:[r(O,{label:n(e.firstNameLabel),required:!0,labelFace:b,children:r("input",{type:"text",value:w,onChange:a=>V(a.target.value),placeholder:e.firstNamePlaceholder,required:!0,className:"border border-line bg-surface px-4 py-4 font-display text-[15px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:tracking-[0.04em] placeholder:text-fg-dim focus:border-accent"})}),r(O,{label:n(e.emailLabel),required:!0,labelFace:b,children:r("input",{type:"email",value:S,onChange:a=>z(a.target.value),placeholder:e.emailPlaceholder,required:!0,className:"border border-line bg-surface px-4 py-4 font-display text-[15px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:tracking-[0.04em] placeholder:text-fg-dim focus:border-accent"})}),t("div",{className:"mt-2 flex flex-col gap-3",children:[r(R,{labelFace:b,children:n(e.interestsLabel)}),r("div",{className:"flex flex-wrap gap-2",children:e.interests.map((a,s)=>{const l=E.has(a);return r("button",{type:"button",onClick:()=>X(a),"aria-pressed":l,className:["select-none border px-4 py-3 font-[family-name:var(--pp-option-font,var(--font-mono))] text-[length:var(--pp-option-size,12px)] uppercase tracking-[0.22em] transition-all",l?"border-accent bg-accent text-bg":"border-line text-fg-dim hover:text-fg"].join(" "),children:a},`${a}-${s}`)})})]}),e.frequencies.length>0&&t("div",{className:"mt-2 flex flex-col gap-3",children:[r(R,{labelFace:b,children:n(e.frequencyLabel)}),r("div",{className:"flex border border-line",children:e.frequencies.map((a,s)=>{const l=_===a;return r("button",{type:"button",onClick:()=>Y(a),"aria-pressed":l,className:["flex-1 px-3 py-4 font-[family-name:var(--pp-option-font,var(--font-mono))] text-[length:var(--pp-option-size,12px)] uppercase tracking-[0.24em] transition-all",s<e.frequencies.length-1?"border-r border-line":"",l?"bg-accent text-bg":"text-fg-dim hover:text-fg"].join(" "),children:a},`${a}-${s}`)})})]})]}),t("div",{className:"mt-auto flex flex-col gap-4 pt-8",children:[L&&r(fe,{role:"alert",children:L}),t("button",{type:"submit",disabled:j,className:"group flex items-center justify-between gap-5 border border-btn bg-btn px-6 py-5 font-mono text-[14px] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg disabled:cursor-wait disabled:opacity-60 disabled:hover:border-btn disabled:hover:bg-btn",children:[r("span",{children:e.submitText}),r("span",{className:"transition-transform group-hover:translate-x-[4px]",children:j?"…":"→"})]}),B]})]}):x=t("div",{className:"flex min-h-[560px] flex-col justify-center gap-6 px-12 py-12 max-[880px]:min-h-0 max-[880px]:px-8 max-[880px]:py-8",style:{animation:"subscribe-fade 0.25s ease"},children:[r("div",{className:"flex h-16 w-16 items-center justify-center border border-accent font-display text-[32px] text-accent",children:"✓"}),r("h3",{className:"font-[family-name:var(--pp-doneheading-font,var(--font-display))] text-[length:var(--pp-doneheading-size,38px)] font-medium uppercase leading-none tracking-[-0.025em] [&_em]:font-serif [&_em]:normal-case [&_em]:tracking-[-0.02em]",children:k(e.successHeading)}),r("p",{className:"max-w-[440px] font-[family-name:var(--pp-donebody-font,var(--font-serif))] text-[length:var(--pp-donebody-size,18px)] italic leading-[1.55] text-fg-dim",children:n(J,!0)}),!o&&r("button",{type:"button",onClick:p,className:"self-start border border-line px-6 py-5 font-mono text-[14px] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:n(e.keepBrowsingText)})]});const A=t("div",{className:`relative w-[min(1100px,100%)] overflow-hidden border border-line bg-bg [border-radius:var(--sf-section-radius,0px)] max-[880px]:border-x-0 max-[880px]:border-b-0 ${T.className}`.trim(),style:{...T.style,background:"var(--bg)",color:"var(--fg)",boxShadow:o?"0 30px 80px -30px rgba(0,0,0,0.5)":"0 60px 120px -20px rgba(0,0,0,0.7)",animation:o?void 0:"subscribe-rise 0.35s cubic-bezier(.2,.7,.2,1)"},children:[!o&&r("button",{ref:P,type:"button",onClick:p,"aria-label":"Close popup",className:"absolute right-[18px] top-[18px] z-[5] flex h-[38px] w-[38px] items-center justify-center border border-line font-mono text-[14px] text-fg-dim transition-colors hover:border-accent hover:text-fg max-[880px]:right-3 max-[880px]:top-3 max-[880px]:h-11 max-[880px]:w-11",style:{background:"color-mix(in oklab, var(--bg) 85%, transparent)"},children:"✕"}),t("div",{className:["grid max-h-[calc(100vh-48px)] overflow-hidden max-[880px]:max-h-[88dvh] max-[880px]:grid-cols-1 max-[880px]:overflow-auto",N?"grid-cols-[1fr_1.05fr]":"grid-cols-[1.05fr_1fr]"].join(" "),children:[t("aside",{className:["relative flex min-h-[560px] flex-col justify-between overflow-hidden border-line px-[var(--sf-site-gutter,40px)] py-12 max-[880px]:min-h-[380px] max-[880px]:border-r-0 max-[880px]:border-l-0 max-[880px]:border-b max-[880px]:px-8 max-[880px]:py-8",N?"order-2 border-l max-[880px]:order-none":"border-r",e.valuePanelOnPhone?"":"max-[880px]:hidden"].join(" "),style:{background:"var(--subscribe-panel-bg)"},children:[r("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent 0 28px, color-mix(in oklab, var(--accent) 4%, transparent) 28px 29px), repeating-linear-gradient(90deg, transparent 0 28px, color-mix(in oklab, var(--accent) 3%, transparent) 28px 29px)"}}),t("div",{"aria-hidden":!0,className:"pointer-events-none absolute -right-[120px] -bottom-[120px] z-[1] h-[520px] w-[520px] rounded-full border opacity-50 max-[880px]:-right-[100px] max-[880px]:-bottom-[100px] max-[880px]:h-[340px] max-[880px]:w-[340px]",style:{borderColor:"color-mix(in oklab, var(--accent) 22%, transparent)"},children:[r("div",{className:"absolute inset-[60px] rounded-full border",style:{borderColor:"color-mix(in oklab, var(--accent) 18%, transparent)"}}),r("div",{className:"absolute inset-[140px] rounded-full border",style:{borderColor:"color-mix(in oklab, var(--accent) 14%, transparent)"}})]}),t("div",{className:["relative z-[2] flex items-start justify-between font-[family-name:var(--pp-meta-font,var(--font-mono))] text-[length:var(--pp-meta-size,12px)] uppercase tracking-[0.3em] text-fg-dim",N&&!o?"pr-[52px]":""].join(" "),children:[r("span",{children:n(e.metaLabel)}),(e.issueLabel||e.issueNumber)&&t("span",{children:[n(e.issueLabel)," ",r("strong",{className:"font-normal text-accent",children:e.issueNumber})]})]}),t("div",{className:"relative z-[2] flex flex-col gap-5 py-8",children:[r("span",{className:`contents [&>span]:font-[family-name:var(--pp-eyebrow-font,var(--font-mono))] ${U.eyebrow}`,children:r(I,{text:e.kicker,size:12,scaled:!1})}),r("h2",{className:"font-[family-name:var(--pp-heading-font,var(--font-display))] text-[length:var(--pp-heading-size,clamp(40px,4.8vw,68px))] font-medium uppercase leading-[0.92] tracking-[-0.04em] text-fg [&_em]:font-serif [&_em]:normal-case [&_em]:tracking-[-0.03em]",children:k(e.heading)}),r("p",{className:"max-w-[420px] font-[family-name:var(--pp-body-font,var(--font-serif))] text-[length:var(--pp-body-size,18px)] italic leading-[1.5]",style:{color:"color-mix(in oklab, var(--fg) 85%, transparent)"},children:n(e.deck,!0)})]}),e.stats.length>0&&r("div",{className:"relative z-[2] grid grid-cols-2 gap-5 border-t pt-6",style:{borderColor:"color-mix(in oklab, var(--accent) 18%, var(--site-line))"},children:e.stats.map((a,s)=>t("div",{children:[r("div",{className:"mb-2 font-[family-name:var(--pp-statname-font,var(--font-mono))] text-[length:var(--pp-statname-size,11px)] uppercase tracking-[0.24em] text-fg-dim",children:n(a.label)}),r("div",{className:"font-[family-name:var(--pp-statvalue-font,var(--font-display))] text-[length:var(--pp-statvalue-size,22px)] font-medium tracking-[-0.015em] text-fg",children:n(a.value)})]},`${a.label}-${s}`))})]}),x]})]});return o?r("div",{className:"flex w-full justify-center p-6","data-subscribe-preview":!0,children:A}):t(de,{site:{blur:8,sheetOnPhone:!0,animation:"subscribe-fade 0.25s ease"},labelledBy:"subscribe-modal-title",open:i,onClose:p,children:[A,r("style",{children:`
2
2
  @keyframes subscribe-fade { from { opacity: 0 } to { opacity: 1 } }
3
3
  @keyframes subscribe-rise {
4
4
  from { transform: translateY(20px); opacity: 0 }
5
5
  to { transform: translateY(0); opacity: 1 }
6
6
  }
7
- `})]})}function be({content:e,form:i=null}){const{isOpen:p,mode:f,close:o,markSent:c,prefillEmail:g,signupSource:h}=ce();return r(ue,{content:e??ne,open:p,onClose:o,onSent:c,prefillEmail:g,source:h,mode:f,form:i})}export{ue as SubscribePopupView,be as default};
7
+ `})]})}function ge({content:e,form:i=null}){const{isOpen:p,mode:f,close:o,markSent:c,prefillEmail:g,signupSource:h}=ce();return r(be,{content:e??ne,open:p,onClose:o,onSent:c,prefillEmail:g,source:h,mode:f,form:i})}export{be as SubscribePopupView,ge as default};
@@ -1,7 +1,8 @@
1
1
  import { type TyreFitAnswer } from "../lib/tyres/tyre-vehicle-fitment.js";
2
2
  import type { TyreVariant } from "../lib/api/index.js";
3
- export default function TyreFitVerdicts({ variants, answer, loading, }: {
3
+ export default function TyreFitVerdicts({ variants, answer, loading, onRetry, }: {
4
4
  variants: TyreVariant[];
5
5
  answer: TyreFitAnswer | null;
6
6
  loading?: boolean;
7
+ onRetry?: () => void;
7
8
  }): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{TYRE_FIT_LABEL as m,tyreFitHeadline as o}from"../lib/tyres/tyre-fit-copy.js";import{variantFitStatus as d}from"../lib/tyres/tyre-vehicle-fitment.js";const t={body:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},g={fits:{className:"font-medium",style:{color:"var(--green)"}},doesNotFit:{className:"text-fg-dim"},unknown:{className:"text-fg-dim"}};function p({variants:n,answer:l,loading:c=!1}){return l?i("div",{className:"mt-10",children:[e("p",{className:`max-w-[68ch] font-serif ${t.body} italic leading-[1.55] text-fg-dim`,children:o(l)}),e("ul",{className:"mt-6 grid gap-[2px] border border-line bg-line",children:n.map(s=>{const a=d(l,s.sku),r=g[a];return i("li",{className:"flex items-baseline justify-between gap-6 bg-bg px-5 py-4",children:[e("span",{className:`font-mono ${t.labelLarge} uppercase tracking-[0.14em] text-fg`,children:s.size}),e("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] ${r.className}`,style:r.style,children:m[a]})]},s.sku)})})]}):c?e("p",{className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:"Checking your car…"}):null}export{p as default};
1
+ "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{TYRE_FIT_LABEL as m,tyreFitHeadline as d}from"../lib/tyres/tyre-fit-copy.js";import{variantFitStatus as g}from"../lib/tyres/tyre-vehicle-fitment.js";const t={body:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},p={fits:{className:"font-medium",style:{color:"var(--green)"}},doesNotFit:{className:"text-fg-dim"},unknown:{className:"text-fg-dim"}};function u({variants:c,answer:l,loading:o=!1,onRetry:s}){return l?i("div",{className:"mt-10",children:[e("p",{className:`max-w-[68ch] font-serif ${t.body} italic leading-[1.55] text-fg-dim`,children:d(l)}),l.failed&&s?e("button",{type:"button",onClick:s,className:`mt-4 cursor-pointer font-mono ${t.labelLarge} uppercase tracking-[0.18em] text-accent underline-offset-4 hover:underline`,children:"Try again"}):null,e("ul",{className:"mt-6 grid gap-[2px] border border-line bg-line",children:c.map(a=>{const r=g(l,a.sku),n=p[r];return i("li",{className:"flex items-baseline justify-between gap-6 bg-bg px-5 py-4",children:[e("span",{className:`font-mono ${t.labelLarge} uppercase tracking-[0.14em] text-fg`,children:a.size}),e("span",{className:`font-mono ${t.labelSmall} uppercase tracking-[0.24em] ${n.className}`,style:n.style,children:m[r]})]},a.sku)})})]}):o?e("p",{className:`mt-10 border border-line bg-bg p-6 font-mono ${t.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:"Checking your car…"}):null}export{u as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as l}from"react/jsx-runtime";import h from"./SectionBand.js";import{useEffect as y,useRef as T}from"react";import b from"efficient-web-builder/render/components/SectionHeader";import N from"./TyreFitVerdicts.js";import{useTyreFitAnswer as _}from"./useTyreFitAnswer.js";import E from"./fitment/FitmentPickerGrid.js";import{useVehicleFit as F}from"./fitment/useVehicleFit.js";import{tyreFitQuery as I}from"../lib/tyres/tyre-vehicle-fitment.js";const v="Will it fit *your car?*",w="Pick your vehicle and we’ll tell you which of these sizes matches what it came on.",g="border-b border-line py-[120px] max-[1100px]:py-20",j="border-b border-line pt-0 pb-[120px] max-[1100px]:pt-0 max-[1100px]:pb-20";function k({num:a,title:p=v,description:m=w,escapeText:r,escapeHref:o,omitHead:i=!1,capped:u=!0,slug:d,variants:f,onAnswer:n}){const c=F({autoApply:!0}),{answer:e,loading:x}=_(d,I(c.applied?.vehicle)),s=T(n);return s.current=n,y(()=>{s.current?.(e)},[e]),l(h,{className:i?j:g,capped:u,children:[i?null:t(b,{num:a,title:p,description:m,accent:!0}),t(E,{cascade:c.cascade}),r&&o?l("a",{href:o,className:"mt-6 inline-block font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-accent underline-offset-4 hover:underline",children:[r," →"]}):null,t(N,{variants:f,answer:e,loading:x})]})}export{g as BAND_INLINE,j as BAND_OWN_BOX,w as TYRE_FITMENT_DESCRIPTION,v as TYRE_FITMENT_TITLE,k as default};
1
+ "use client";import{jsx as r,jsxs as l}from"react/jsx-runtime";import y from"./SectionBand.js";import{useEffect as T,useRef as b}from"react";import N from"efficient-web-builder/render/components/SectionHeader";import _ from"./TyreFitVerdicts.js";import{useTyreFitAnswer as E}from"./useTyreFitAnswer.js";import F from"./fitment/FitmentPickerGrid.js";import{useVehicleFit as I}from"./fitment/useVehicleFit.js";import{tyreFitQuery as v}from"../lib/tyres/tyre-vehicle-fitment.js";const w="Will it fit *your car?*",R="Pick your vehicle and we’ll tell you which of these sizes matches what it came on.",g="border-b border-line py-[120px] max-[1100px]:py-20",j="border-b border-line pt-0 pb-[120px] max-[1100px]:pt-0 max-[1100px]:pb-20";function k({num:a,title:p=w,description:m=R,escapeText:t,escapeHref:o,omitHead:i=!1,capped:u=!0,slug:d,variants:f,onAnswer:n}){const c=I({autoApply:!0}),{answer:e,loading:x,retry:h}=E(d,v(c.applied?.vehicle)),s=b(n);return s.current=n,T(()=>{s.current?.(e)},[e]),l(y,{className:i?j:g,capped:u,children:[i?null:r(N,{num:a,title:p,description:m,accent:!0}),r(F,{cascade:c.cascade}),t&&o?l("a",{href:o,className:"mt-6 inline-block font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-accent underline-offset-4 hover:underline",children:[t," →"]}):null,r(_,{variants:f,answer:e,loading:x,onRetry:h})]})}export{g as BAND_INLINE,j as BAND_OWN_BOX,R as TYRE_FITMENT_DESCRIPTION,w as TYRE_FITMENT_TITLE,k as default};
@@ -2,6 +2,9 @@ import type { ComponentProps, CSSProperties, ReactNode } from "react";
2
2
  import { type CardOutline } from "efficient-web-builder/format/lib/sections/product-card-style";
3
3
  export declare const CARD_ROWS_GRID_CLASS = "sf-card-rows";
4
4
  export declare const cardRowsGridStyle: (rowGap: string) => CSSProperties;
5
+ export declare const cardRowsGap: (zone: {
6
+ style: CSSProperties;
7
+ }) => string;
5
8
  export declare const setPlateWidthCss: (gap: number | string) => string;
6
9
  export declare const GRID_GAP_PX = 2;
7
10
  export declare const CARD_PAD_X_PX = 32;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as a,Fragment as p}from"react/jsx-runtime";import N from"next/link";import{Fragment as z}from"react";import{CARD_TEXT_SIZE as d,CardLookContext as J,CardRow as n}from"./card-pieces/card-row.js";import{cardOutlineClass as Q}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as U,cardImageBackgroundPaints as V,THEME_CARD_IMAGE_BG as Y}from"efficient-web-builder/format/lib/content/card-image-background";const pe="sf-card-rows",fe=e=>({rowGap:0,"--sf-card-row-gap":e}),ee=e=>`calc((100% - ${typeof e=="number"?`${e}px`:e}) / 2)`,G=2,re=32,j=e=>G+2*re+(e?16:0),k=(e,t)=>t===void 0?`${j(e)}px`:`calc(${t} + ${j(e)-G}px)`,xe=252,ae=16,ge=800,te="whitespace-nowrap",se=e=>typeof e=="string"?e:e.text;function he(e,t="·"){return e.map((s,o)=>{const l=se(s),f=typeof s!="string"&&s.accent;return a(z,{children:[r("span",{className:`${te}${f?" text-accent":""}`,children:o<e.length-1?`${l} ${t}`:l}),o<e.length-1?" ":null]},l)})}function oe({variant:e="catalog",wide:t=!1,setGridGap:s,href:o,identityLink:l=!1,outline:f="none",imageBackgroundFill:x=U,containerProps:S,probes:g,indexBadge:h,badges:u,image:m,imageSecond:D,plate:A,eyebrow:$,reserveEyebrow:X=!1,name:F,spec:I,price:L,swatches:M,sizes:W,buy:q,wholeCardLink:O=!1}){const c=e==="catalog",i=V(x),E=i&&x===Y,y=E?"bg-[var(--wheel-stage)] p-2":i?"p-2":"",P=i&&!E?{backgroundColor:x}:{},R=C=>r("figure",{className:"m-0 aspect-square [flex:0_0_auto] max-w-full w-[var(--sf-set-plate-w)] max-[800px]:w-full",style:{"--sf-set-plate-w":ee(k(i,s))},children:C}),B=c?a("div",{className:t?`relative mt-2 mb-5 flex items-center justify-center [&_img]:object-top max-[800px]:flex-col ${y}`:`relative mt-2 mb-5 flex aspect-square items-center justify-center overflow-hidden [&_img]:object-top ${y}`,style:t?{...P,borderRadius:10,columnGap:k(i,s),rowGap:ae}:{...P,borderRadius:"var(--sf-card-image-radius, 10px)"},children:[t?a(p,{children:[R(m),R(D??m)]}):m,A]}):a("div",{className:"relative mb-5 aspect-square overflow-hidden bg-bg p-8 [&_img]:object-top",style:{borderRadius:"var(--sf-card-image-radius, 10px)"},children:[m,A]}),T=`font-mono ${d.label} uppercase text-accent ${c?"tracking-[0.3em]":"tracking-[0.25em]"}`,K=$?r("div",{className:T,children:$}):c&&X?r("div",{"aria-hidden":!0,className:T,children:" "}):null,Z=r("div",{className:c?`mt-2 h-[60px] overflow-hidden break-words [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[60px] font-heading3 ${d.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:`mt-2 font-heading3 ${d.headingSmall1} font-medium tracking-[-0.02em]`,children:F}),H=r("div",{className:c?`mt-2 h-[38px] overflow-hidden [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[76px] font-mono ${d.labelLarge} leading-[19px] tracking-[0.14em] text-fg-dim`:`mt-[4px] font-mono ${d.labelLarge} tracking-[0.1em] text-fg-dim`,children:I}),_=[c?"sf-card sf-card-fill group relative flex min-h-[460px] flex-col bg-[var(--card-bg)] px-8 pt-8 pb-8 transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:row-span-9 [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)] [.sf-card-rows>&]:grid [.sf-card-rows>&]:grid-rows-subgrid [.sf-card-rows>&]:gap-y-0":"sf-card sf-card-fill group relative block bg-[var(--card-bg)] p-5 transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",Q(f),t?"col-span-2 max-[800px]:col-span-1 @max-[720px]:col-span-1":""].filter(Boolean).join(" "),w=a(p,{children:[B,r(n,{children:K}),Z]}),b=a(p,{children:[H,L??a(p,{children:[r(n,{}),r(n,{})]}),M??r(n,{}),W??r(n,{}),q??r(n,{})]}),v=C=>r(J.Provider,{value:e,children:C});return v(o?l?a("article",{...S,className:_,children:[g,h,u,r(N,{href:o,className:`flex flex-col ${O?"after:absolute after:inset-0 after:content-['']":""} [.sf-card-rows>*>&]:row-span-3 [.sf-card-rows>*>&]:grid [.sf-card-rows>*>&]:grid-rows-subgrid [.sf-card-rows>*>&]:gap-y-0`,children:w}),b]}):a(N,{href:o,className:_,children:[g,h,u,w,b]}):a("article",{...S,className:_,children:[g,h,u,w,b]}))}export{re as CARD_PAD_X_PX,pe as CARD_ROWS_GRID_CLASS,te as CARD_SPEC_FIELD_CLASS,G as GRID_GAP_PX,xe as SET_PLATE_PX,ae as SET_STACK_GAP_PX,ge as SET_STACK_MAX_PX,fe as cardRowsGridStyle,he as cardSpecFields,oe as default,k as setBandGapCss,j as setBandGapPx,ee as setPlateWidthCss};
1
+ "use client";import{jsx as e,jsxs as a,Fragment as m}from"react/jsx-runtime";import{GAP_LENGTH_VAR as Z,GAP_PHONE_LENGTH_VAR as z}from"efficient-web-builder/format/lib/content/container-gap";import N from"next/link";import{Fragment as J}from"react";import{CARD_TEXT_SIZE as d,CardLookContext as Q,CardRow as n}from"./card-pieces/card-row.js";import{cardOutlineClass as U}from"efficient-web-builder/format/lib/sections/product-card-style";import{CARD_IMAGE_BG_OFF as Y,cardImageBackgroundPaints as rr,THEME_CARD_IMAGE_BG as er}from"efficient-web-builder/format/lib/content/card-image-background";const gr="sf-card-rows",ur=r=>({rowGap:0,"--sf-card-row-gap":r}),hr=r=>z in r.style?"var(--sf-card-row-gap-auto)":`var(${Z})`,ar=r=>`calc((100% - ${typeof r=="number"?`${r}px`:r}) / 2)`,T=2,tr=32,j=r=>T+2*tr+(r?16:0),k=(r,t)=>t===void 0?`${j(r)}px`:`calc(${t} + ${j(r)-T}px)`,_r=252,sr=16,wr=800,or="whitespace-nowrap",cr=r=>typeof r=="string"?r:r.text;function vr(r,t="·"){return r.map((s,o)=>{const l=cr(s),f=typeof s!="string"&&s.accent;return a(J,{children:[e("span",{className:`${or}${f?" text-accent":""}`,children:o<r.length-1?`${l} ${t}`:l}),o<r.length-1?" ":null]},l)})}function nr({variant:r="catalog",wide:t=!1,setGridGap:s,href:o,identityLink:l=!1,outline:f="none",imageBackgroundFill:x=Y,containerProps:A,probes:g,indexBadge:u,badges:h,image:p,imageSecond:D,plate:E,eyebrow:S,reserveEyebrow:L=!1,name:X,spec:F,price:I,swatches:H,sizes:M,buy:O,wholeCardLink:W=!1}){const c=r==="catalog",i=rr(x),$=i&&x===er,P=$?"bg-[var(--wheel-stage)] p-2":i?"p-2":"",R=i&&!$?{backgroundColor:x}:{},G=C=>e("figure",{className:"m-0 aspect-square [flex:0_0_auto] max-w-full w-[var(--sf-set-plate-w)] max-[800px]:w-full",style:{"--sf-set-plate-w":ar(k(i,s))},children:C}),q=c?a("div",{className:t?`relative mt-2 mb-5 flex items-center justify-center [&_img]:object-top max-[800px]:flex-col ${P}`:`relative mt-2 mb-5 flex aspect-square items-center justify-center overflow-hidden [&_img]:object-top ${P}`,style:t?{...R,borderRadius:10,columnGap:k(i,s),rowGap:sr}:{...R,borderRadius:"var(--sf-card-image-radius, 10px)"},children:[t?a(m,{children:[G(p),G(D??p)]}):p,E]}):a("div",{className:"relative mb-5 aspect-square overflow-hidden bg-bg p-8 [&_img]:object-top",style:{borderRadius:"var(--sf-card-image-radius, 10px)"},children:[p,E]}),y=`font-mono ${d.label} uppercase text-accent ${c?"tracking-[0.3em]":"tracking-[0.25em]"}`,B=S?e("div",{className:y,children:S}):c&&L?e("div",{"aria-hidden":!0,className:y,children:" "}):null,K=e("div",{className:c?`mt-2 h-[60px] overflow-hidden break-words [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[60px] font-heading3 ${d.headingSmall2} font-medium uppercase leading-none tracking-[-0.02em]`:`mt-2 font-heading3 ${d.headingSmall1} font-medium tracking-[-0.02em]`,children:X}),V=e("div",{className:c?`mt-2 h-[38px] overflow-hidden [.sf-card-rows_&]:h-auto [.sf-card-rows_&]:max-h-[76px] font-mono ${d.labelLarge} leading-[19px] tracking-[0.14em] text-fg-dim`:`mt-[4px] font-mono ${d.labelLarge} tracking-[0.1em] text-fg-dim`,children:F}),_=[c?"sf-card sf-card-fill group relative flex min-h-[460px] flex-col bg-[var(--card-bg)] px-8 pt-8 pb-8 transition-colors duration-200 hover:bg-[var(--card-bg-hover)] [.sf-card-rows>&]:row-span-9 [.sf-card-rows>&]:mb-[var(--sf-card-row-gap)] [.sf-card-rows>&]:grid [.sf-card-rows>&]:grid-rows-subgrid [.sf-card-rows>&]:gap-y-0":"sf-card sf-card-fill group relative block bg-[var(--card-bg)] p-5 transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",U(f),t?"col-span-2 max-[800px]:col-span-1 @max-[720px]:col-span-1":""].filter(Boolean).join(" "),w=a(m,{children:[q,e(n,{children:B}),K]}),v=a(m,{children:[V,I??a(m,{children:[e(n,{}),e(n,{})]}),H??e(n,{}),M??e(n,{}),O??e(n,{})]}),b=C=>e(Q.Provider,{value:r,children:C});return b(o?l?a("article",{...A,className:_,children:[g,u,h,e(N,{href:o,className:`flex flex-col ${W?"after:absolute after:inset-0 after:content-['']":""} [.sf-card-rows>*>&]:row-span-3 [.sf-card-rows>*>&]:grid [.sf-card-rows>*>&]:grid-rows-subgrid [.sf-card-rows>*>&]:gap-y-0`,children:w}),v]}):a(N,{href:o,className:_,children:[g,u,h,w,v]}):a("article",{...A,className:_,children:[g,u,h,w,v]}))}export{tr as CARD_PAD_X_PX,gr as CARD_ROWS_GRID_CLASS,or as CARD_SPEC_FIELD_CLASS,T as GRID_GAP_PX,_r as SET_PLATE_PX,sr as SET_STACK_GAP_PX,wr as SET_STACK_MAX_PX,hr as cardRowsGap,ur as cardRowsGridStyle,vr as cardSpecFields,nr as default,k as setBandGapCss,j as setBandGapPx,ar as setPlateWidthCss};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as i,Fragment as ue}from"react/jsx-runtime";import{useState as Q}from"react";import{withRMark as de}from"efficient-web-builder/render/components/RMark";import{FilterPill as w,OptButton as W,PanelTitle as A,PillButton as he}from"./FilterPill.js";import ee from"../ThemedSelect.js";import{useCatalogFilterLabels as ge}from"./CatalogFilterLabels.js";import{CatalogVehicleNextRow as fe,CatalogVehicleFieldRow as be,CatalogVehicleRow as le,CatalogVehicleSheet as xe}from"./CatalogVehiclePicker.js";import{facetFieldKey as re,keepForFilter as ve,orderByAnswers as Ce}from"../../lib/content/field-usage.js";import{PLP_ONE_VALUE_MAX as ie}from"../../lib/wheels/plp-filters.js";import{DEFAULT_FILTER_BAR_LAYOUT as Ne}from"../../lib/sections/catalog-filter-layout.js";import{SORT_LABELS as O}from"../../lib/wheels/catalog-filters.js";import{FINISH_FAMILY_SWATCHES as ne}from"../../lib/wheels/finish-defaults.js";import{VEHICLE_FIELD_ORDER as ye}from"../../lib/wheels/vehicle-field-focus.js";import{CONTENT_CAP_GUTTER as ae}from"../../lib/sections/content-cap-gutter.js";const u={body:"text-[length:var(--size-body,14px)]",labelXs:"text-[length:var(--size-label,10px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"};function H(t){return de(t)}const q={size:re("diameters","alloy-wheel"),finish:re("finishes","alloy-wheel")};function te(t,o){return Ce(t,s=>q[String(s.key)],o??[],"filterOrder")}function ke({processCount:t,sizeCount:o,lugCount:s,finishCount:d,optionsReported:f,fieldUsage:z}){const b=B=>!f||B>ie,k=ve(z??[]);return{process:t>ie,size:k(q.size)&&b(o),lugs:b(s),finish:k(q.finish)&&b(d)}}function N(t,o){return t===o?null:o}function oe({href:t,label:o}){return e("a",{href:t,"data-results-link":!0,className:`inline-block self-start border-0 border-b border-line bg-transparent pb-2 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg transition-colors hover:text-fg-dim`,children:o})}function Le({filters:t,setProcess:o,setSize:s,setLugs:d,setFinish:f,setPriceMin:z,setPriceMax:b,setSort:k,clearAll:B,total:x,scrollProcess:G,show:h,picker:c,lugOptions:M=[],sizeOptions:j=[],finishOptions:Y,layout:pe=Ne,processOptions:I=[],resultsLink:v,optionsReported:me=!1,fieldUsage:P}){const[p,g]=Q(null),[K,V]=Q(null),m=ge(),{process:L,size:F,lugs:_,finish:E,priceMin:X,priceMax:D,sort:Z}=t,U=Y?ne.filter(l=>Y.includes(l.f)):ne,R=ke({processCount:I.length,sizeCount:j.length,lugCount:M.length,finishCount:U.length,optionsReported:me,fieldUsage:P}),n={process:(h?.process??!0)&&R.process,size:(h?.size??!0)&&R.size,lugs:(h?.lugs??!0)&&R.lugs,finish:(h?.finish??!0)&&R.finish,price:h?.price??!0,vehicle:(h?.vehicle??!0)&&!!c,count:h?.count??!0,sort:h?.sort??!0},C={process:L?1:0,size:F?1:0,lugs:_?1:0,finish:E?1:0,price:X!=null||D!=null?1:0,vehicle:c?.appliedName?1:0},J=()=>{B(),c?.clear(),g(null),V(null)};if(pe==="columns"){const l=r=>V(K===r?null:r),a=[];n.vehicle&&c&&a.push(i(y,{name:"vehicle",label:m.vehicle,children:[ye.map(r=>e(be,{field:r,picker:c,open:K===r,onOpenRequest:l,onClose:()=>V(null)},r)),e(fe,{picker:c,onOpenRequest:l})]},"vehicle"));const $=[];return n.process&&$.push(e(y,{name:"process",label:m.process,rowsAreOptions:!0,children:I.map(r=>e(S,{active:L===r,onClick:()=>o(N(L,r)),children:H(r)},r))},"process")),n.size&&$.push(e(y,{name:"size",label:m.size,rowsAreOptions:!0,children:j.map(r=>i(S,{active:F===r,onClick:()=>s(N(F,r)),children:[r,'"']},r))},"size")),n.lugs&&$.push(e(y,{name:"lugs",label:m.lugs,rowsAreOptions:!0,children:M.map(r=>i(S,{active:_===r,onClick:()=>d(N(_,r)),children:[r,"-Lug"]},r))},"lugs")),n.finish&&$.push(e(y,{name:"finish",label:m.finish,rowsAreOptions:!0,children:U.map(r=>e(S,{active:E===r.f,onClick:()=>f(E===r.f?null:r.f),children:r.label},r.f))},"finish")),a.push(...te($,P)),n.price&&a.push(i(y,{name:"price",label:m.price,children:[e(ce,{label:"Min",value:X,onChange:z,ariaLabel:"Minimum price per wheel"}),e(ce,{label:"Max",value:D,onChange:b,ariaLabel:"Maximum price per wheel"})]},"price")),i("div",{className:"@container",children:[i("div",{className:`border-t border-line ${ae} pb-12 pt-10 @max-[720px]:px-4 @max-[720px]:pb-10 @max-[720px]:pt-8`,children:[(n.count||n.sort)&&i("div",{className:"mb-10 flex flex-wrap items-center gap-x-6 gap-y-3 @max-[720px]:mb-8",children:[n.count&&i("span",{className:`font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim`,children:[x," ",x===1?"result":"results"]}),n.sort&&i("div",{className:"ml-auto flex items-center gap-5",children:[e("button",{type:"button",onClick:J,className:`font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:"Clear All"}),e(ee,{"aria-label":"Sort results",value:Z,onChange:r=>k(r.target.value),className:`border-b border-line bg-transparent pb-2 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg`,children:Object.keys(O).map(r=>e("option",{value:r,children:O[r]},r))})]})]}),e("div",{"data-filter-columns":!0,className:`grid grid-cols-1 gap-x-[72px] gap-y-10 ${Fe[a.length]??""}`,children:a}),v&&e("div",{className:"mt-10 flex",children:e(oe,{href:v.href,label:v.label})})]}),n.vehicle&&c&&e(le,{picker:c,total:x})]})}const T=[];return n.process&&T.push(i(w,{name:"process",label:G?i(ue,{children:[e("span",{className:"text-accent @min-[720px]:hidden",children:H(G)}),e("span",{className:"hidden @min-[720px]:inline",children:m.process})]}):m.process,badge:C.process,open:p==="process",onToggle:()=>g(p==="process"?null:"process"),children:[e(A,{children:"Series · single-select"}),e("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":"Process series",children:I.map(l=>{const a=L===l;return e(W,{active:a,role:"radio",ariaChecked:a,onClick:()=>o(N(L,l)),children:H(l)},l)})})]},"process")),n.size&&T.push(i(w,{name:"size",label:m.size,badge:C.size,open:p==="size",onToggle:()=>g(p==="size"?null:"size"),children:[e(A,{children:"Diameter · single-select"}),e("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":"Wheel diameter",children:j.map(l=>{const a=F===l;return i(W,{active:a,role:"radio",ariaChecked:a,onClick:()=>s(N(F,l)),children:[l,'"']},l)})})]},"size")),n.lugs&&T.push(i(w,{name:"lugs",label:m.lugs,badge:C.lugs,open:p==="lugs",onToggle:()=>g(p==="lugs"?null:"lugs"),children:[e(A,{children:"Lug count · single-select"}),e("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":"Lug count",children:M.map(l=>{const a=_===l;return i(W,{active:a,role:"radio",ariaChecked:a,onClick:()=>d(N(_,l)),children:[l,"-Lug"]},l)})})]},"lugs")),n.finish&&T.push(i(w,{name:"finish",label:m.finish,badge:C.finish,open:p==="finish",onToggle:()=>g(p==="finish"?null:"finish"),children:[e(A,{children:"Color family · single-select"}),e("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":"Finish color family",children:U.map(l=>{const a=E===l.f;return i("button",{type:"button",role:"radio","aria-checked":a,onClick:()=>f(a?null:l.f),className:["flex items-center gap-3 border px-3 py-2 text-left transition-colors",a?"border-accent text-fg":"border-line hover:border-fg-dim"].join(" "),children:[e("span",{className:"block h-3.5 w-3.5 shrink-0 rounded-full border border-line",style:{background:l.hex}}),e("span",{className:`font-mono ${u.labelSmall} uppercase tracking-[0.18em]`,style:a?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:l.label}),a&&e("span",{"aria-hidden":!0,className:"ml-auto text-accent",children:"●"})]},l.f)})})]},"finish")),i("div",{className:"@container sticky top-[67px] z-40 border-b border-line backdrop-blur",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[i("div",{className:`flex items-center gap-6 ${ae} py-4 @max-[720px]:flex-wrap @max-[720px]:items-stretch @max-[720px]:gap-2 @max-[720px]:px-4 @max-[720px]:py-3`,children:[i("div",{className:"flex flex-wrap items-center gap-1 @max-[720px]:basis-full @max-[720px]:gap-2",children:[n.count&&i("span",{className:`mr-3 border-r border-line pr-4 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim @max-[720px]:hidden`,children:[x," ",x===1?"result":"results"]}),te(T,P),n.price&&i(w,{name:"price",label:m.price,badge:C.price,open:p==="price",onToggle:()=>g(p==="price"?null:"price"),children:[e(A,{children:"Price range (per wheel)"}),i("div",{className:"mt-1 flex items-center gap-2",children:[e("input",{type:"number",placeholder:"$ Min",value:X??"",onChange:l=>z(l.target.value?Number(l.target.value):null),className:`w-full bg-bg border border-line px-3 py-3 font-mono ${u.labelXl} text-fg`}),e("span",{className:`font-mono ${u.labelSmall} text-fg-dim`,children:"—"}),e("input",{type:"number",placeholder:"$ Max",value:D??"",onChange:l=>b(l.target.value?Number(l.target.value):null),className:`w-full bg-bg border border-line px-3 py-3 font-mono ${u.labelXl} text-fg`})]})]}),n.vehicle&&c&&e(he,{label:m.vehicle,badge:C.vehicle,open:p==="vehicle",onToggle:()=>g(p==="vehicle"?null:"vehicle")})]}),v&&e("div",{className:`flex items-center ${n.sort?"":"ml-auto"}`,children:e(oe,{href:v.href,label:v.label})}),n.sort&&i("div",{className:"ml-auto flex items-center gap-3",children:[e("button",{type:"button",onClick:J,className:`font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-accent`,children:"Clear All"}),e(ee,{"aria-label":"Sort results",value:Z,onChange:l=>k(l.target.value),className:`border border-line bg-transparent px-4 py-3 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg`,children:Object.keys(O).map(l=>e("option",{value:l,children:O[l]},l))})]})]}),n.vehicle&&c&&p==="vehicle"&&e(xe,{picker:c,onClose:()=>g(null)}),n.vehicle&&c&&e(le,{picker:c,total:x})]})}const Fe={1:"@min-[720px]:grid-cols-1",2:"@min-[720px]:grid-cols-2",3:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-3",4:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-4",5:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-3 @min-[1400px]:grid-cols-5",6:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-3 @min-[1400px]:grid-cols-6"},se=`flex w-full items-center justify-between gap-4 border-b py-3 text-left ${u.body}`;function y({name:t,label:o,rowsAreOptions:s,children:d}){return i("div",{"data-filter-column":t,className:"flex flex-col gap-6",children:[e("div",{className:`font-mono ${u.labelXs} uppercase tracking-[0.34em] text-fg-dim`,children:o}),e("div",{role:s?"radiogroup":void 0,"aria-label":s?o:void 0,children:d})]})}function S({active:t,onClick:o,children:s}){return e("button",{type:"button",role:"radio","aria-checked":t,onClick:o,className:[se,"transition-colors",t?"border-fg text-fg":"border-line text-fg-dim hover:text-fg"].join(" "),children:e("span",{children:s})})}function ce({label:t,value:o,onChange:s,ariaLabel:d}){return i("label",{className:`${se} border-line`,children:[e("span",{className:"text-fg-dim",children:t}),e("input",{type:"number",inputMode:"numeric","aria-label":d,placeholder:"Any",value:o??"",onChange:f=>s(f.target.value?Number(f.target.value):null),className:"w-24 bg-transparent text-right text-fg outline-none placeholder:text-fg-dim"})]})}export{Le as default,ke as filterBarFacetsWithChoice};
1
+ "use client";import{jsx as e,jsxs as i,Fragment as ue}from"react/jsx-runtime";import{useState as Q}from"react";import{withRMark as W}from"efficient-web-builder/render/components/RMark";import{FilterPill as A,OptButton as H,PanelTitle as z,PillButton as de}from"./FilterPill.js";import ee from"../ThemedSelect.js";import{useCatalogFilterLabels as he}from"./CatalogFilterLabels.js";import{CatalogVehicleNextRow as ge,CatalogVehicleFieldRow as fe,CatalogVehicleRow as le,CatalogVehicleSheet as be}from"./CatalogVehiclePicker.js";import{facetFieldKey as re,keepForFilter as xe,orderByAnswers as ve}from"../../lib/content/field-usage.js";import{PLP_ONE_VALUE_MAX as ie}from"../../lib/wheels/plp-filters.js";import{DEFAULT_FILTER_BAR_LAYOUT as Ce}from"../../lib/sections/catalog-filter-layout.js";import{SORT_LABELS as M}from"../../lib/wheels/catalog-filters.js";import{FINISH_FAMILY_SWATCHES as ae}from"../../lib/wheels/finish-defaults.js";import{VEHICLE_FIELD_ORDER as Ne}from"../../lib/wheels/vehicle-field-focus.js";import{CONTENT_CAP_GUTTER as ne}from"../../lib/sections/content-cap-gutter.js";const u={body:"text-[length:var(--size-body,14px)]",labelXs:"text-[length:var(--size-label,10px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"},q={size:re("diameters","alloy-wheel"),finish:re("finishes","alloy-wheel")};function te(o,t){return ve(o,s=>q[String(s.key)],t??[],"filterOrder")}function ye({processCount:o,sizeCount:t,lugCount:s,finishCount:d,optionsReported:f,fieldUsage:$}){const b=S=>!f||S>ie,k=xe($??[]);return{process:o>ie,size:k(q.size)&&b(t),lugs:b(s),finish:k(q.finish)&&b(d)}}function N(o,t){return o===t?null:t}function oe({href:o,label:t}){return e("a",{href:o,"data-results-link":!0,className:`inline-block self-start border-0 border-b border-line bg-transparent pb-2 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg transition-colors hover:text-fg-dim`,children:t})}function ke({filters:o,setProcess:t,setSize:s,setLugs:d,setFinish:f,setPriceMin:$,setPriceMax:b,setSort:k,clearAll:S,total:x,scrollProcess:G,show:h,picker:c,lugOptions:B=[],sizeOptions:j=[],finishOptions:Y,layout:pe=Ce,processOptions:I=[],resultsLink:v,optionsReported:me=!1,fieldUsage:P}){const[p,g]=Q(null),[K,V]=Q(null),m=he(),{process:L,size:F,lugs:_,finish:E,priceMin:X,priceMax:D,sort:Z}=o,U=Y?ae.filter(l=>Y.includes(l.f)):ae,R=ye({processCount:I.length,sizeCount:j.length,lugCount:B.length,finishCount:U.length,optionsReported:me,fieldUsage:P}),a={process:(h?.process??!0)&&R.process,size:(h?.size??!0)&&R.size,lugs:(h?.lugs??!0)&&R.lugs,finish:(h?.finish??!0)&&R.finish,price:h?.price??!0,vehicle:(h?.vehicle??!0)&&!!c,count:h?.count??!0,sort:h?.sort??!0},C={process:L?1:0,size:F?1:0,lugs:_?1:0,finish:E?1:0,price:X!=null||D!=null?1:0,vehicle:c?.appliedName?1:0},J=()=>{S(),c?.clear(),g(null),V(null)};if(pe==="columns"){const l=r=>V(K===r?null:r),n=[];a.vehicle&&c&&n.push(i(y,{name:"vehicle",label:m.vehicle,children:[Ne.map(r=>e(fe,{field:r,picker:c,open:K===r,onOpenRequest:l,onClose:()=>V(null)},r)),e(ge,{picker:c,onOpenRequest:l})]},"vehicle"));const w=[];return a.process&&w.push(e(y,{name:"process",label:m.process,rowsAreOptions:!0,children:I.map(r=>e(O,{active:L===r,onClick:()=>t(N(L,r)),children:W(r)},r))},"process")),a.size&&w.push(e(y,{name:"size",label:m.size,rowsAreOptions:!0,children:j.map(r=>i(O,{active:F===r,onClick:()=>s(N(F,r)),children:[r,'"']},r))},"size")),a.lugs&&w.push(e(y,{name:"lugs",label:m.lugs,rowsAreOptions:!0,children:B.map(r=>i(O,{active:_===r,onClick:()=>d(N(_,r)),children:[r,"-Lug"]},r))},"lugs")),a.finish&&w.push(e(y,{name:"finish",label:m.finish,rowsAreOptions:!0,children:U.map(r=>e(O,{active:E===r.f,onClick:()=>f(E===r.f?null:r.f),children:r.label},r.f))},"finish")),n.push(...te(w,P)),a.price&&n.push(i(y,{name:"price",label:m.price,children:[e(ce,{label:"Min",value:X,onChange:$,ariaLabel:"Minimum price per wheel"}),e(ce,{label:"Max",value:D,onChange:b,ariaLabel:"Maximum price per wheel"})]},"price")),i("div",{className:"@container",children:[i("div",{className:`border-t border-line ${ne} pb-12 pt-10 @max-[720px]:px-4 @max-[720px]:pb-10 @max-[720px]:pt-8`,children:[(a.count||a.sort)&&i("div",{className:"mb-10 flex flex-wrap items-center gap-x-6 gap-y-3 @max-[720px]:mb-8",children:[a.count&&i("span",{className:`font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim`,children:[x," ",x===1?"result":"results"]}),a.sort&&i("div",{className:"ml-auto flex items-center gap-5",children:[e("button",{type:"button",onClick:J,className:`font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:"Clear All"}),e(ee,{"aria-label":"Sort results",value:Z,onChange:r=>k(r.target.value),className:`border-b border-line bg-transparent pb-2 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg`,children:Object.keys(M).map(r=>e("option",{value:r,children:M[r]},r))})]})]}),e("div",{"data-filter-columns":!0,className:`grid grid-cols-1 gap-x-[72px] gap-y-10 ${Le[n.length]??""}`,children:n}),v&&e("div",{className:"mt-10 flex",children:e(oe,{href:v.href,label:v.label})})]}),a.vehicle&&c&&e(le,{picker:c,total:x})]})}const T=[];return a.process&&T.push(i(A,{name:"process",label:G?i(ue,{children:[e("span",{className:"text-accent @min-[720px]:hidden",children:W(G)}),e("span",{className:"hidden @min-[720px]:inline",children:m.process})]}):m.process,badge:C.process,open:p==="process",onToggle:()=>g(p==="process"?null:"process"),children:[e(z,{children:"Series · single-select"}),e("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":"Process series",children:I.map(l=>{const n=L===l;return e(H,{active:n,role:"radio",ariaChecked:n,onClick:()=>t(N(L,l)),children:W(l)},l)})})]},"process")),a.size&&T.push(i(A,{name:"size",label:m.size,badge:C.size,open:p==="size",onToggle:()=>g(p==="size"?null:"size"),children:[e(z,{children:"Diameter · single-select"}),e("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":"Wheel diameter",children:j.map(l=>{const n=F===l;return i(H,{active:n,role:"radio",ariaChecked:n,onClick:()=>s(N(F,l)),children:[l,'"']},l)})})]},"size")),a.lugs&&T.push(i(A,{name:"lugs",label:m.lugs,badge:C.lugs,open:p==="lugs",onToggle:()=>g(p==="lugs"?null:"lugs"),children:[e(z,{children:"Lug count · single-select"}),e("div",{className:"flex flex-wrap gap-2",role:"radiogroup","aria-label":"Lug count",children:B.map(l=>{const n=_===l;return i(H,{active:n,role:"radio",ariaChecked:n,onClick:()=>d(N(_,l)),children:[l,"-Lug"]},l)})})]},"lugs")),a.finish&&T.push(i(A,{name:"finish",label:m.finish,badge:C.finish,open:p==="finish",onToggle:()=>g(p==="finish"?null:"finish"),children:[e(z,{children:"Color family · single-select"}),e("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":"Finish color family",children:U.map(l=>{const n=E===l.f;return i("button",{type:"button",role:"radio","aria-checked":n,onClick:()=>f(n?null:l.f),className:["flex items-center gap-3 border px-3 py-2 text-left transition-colors",n?"border-accent text-fg":"border-line hover:border-fg-dim"].join(" "),children:[e("span",{className:"block h-3.5 w-3.5 shrink-0 rounded-full border border-line",style:{background:l.hex}}),e("span",{className:`font-mono ${u.labelSmall} uppercase tracking-[0.18em]`,style:n?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:l.label}),n&&e("span",{"aria-hidden":!0,className:"ml-auto text-accent",children:"●"})]},l.f)})})]},"finish")),i("div",{className:"@container sticky top-[67px] z-40 border-b border-line backdrop-blur",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[i("div",{className:`flex items-center gap-6 ${ne} py-4 @max-[720px]:flex-wrap @max-[720px]:items-stretch @max-[720px]:gap-2 @max-[720px]:px-4 @max-[720px]:py-3`,children:[i("div",{className:"flex flex-wrap items-center gap-1 @max-[720px]:basis-full @max-[720px]:gap-2",children:[a.count&&i("span",{className:`mr-3 border-r border-line pr-4 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim @max-[720px]:hidden`,children:[x," ",x===1?"result":"results"]}),te(T,P),a.price&&i(A,{name:"price",label:m.price,badge:C.price,open:p==="price",onToggle:()=>g(p==="price"?null:"price"),children:[e(z,{children:"Price range (per wheel)"}),i("div",{className:"mt-1 flex items-center gap-2",children:[e("input",{type:"number",placeholder:"Min","aria-label":"Minimum price",value:X??"",onChange:l=>$(l.target.value?Number(l.target.value):null),className:`w-full bg-bg border border-line px-3 py-3 font-mono ${u.labelXl} text-fg`}),e("span",{className:`font-mono ${u.labelSmall} text-fg-dim`,children:"—"}),e("input",{type:"number",placeholder:"Max","aria-label":"Maximum price",value:D??"",onChange:l=>b(l.target.value?Number(l.target.value):null),className:`w-full bg-bg border border-line px-3 py-3 font-mono ${u.labelXl} text-fg`})]})]}),a.vehicle&&c&&e(de,{label:m.vehicle,badge:C.vehicle,open:p==="vehicle",onToggle:()=>g(p==="vehicle"?null:"vehicle")})]}),v&&e("div",{className:`flex items-center ${a.sort?"":"ml-auto"}`,children:e(oe,{href:v.href,label:v.label})}),a.sort&&i("div",{className:"ml-auto flex items-center gap-3",children:[e("button",{type:"button",onClick:J,className:`font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-accent`,children:"Clear All"}),e(ee,{"aria-label":"Sort results",value:Z,onChange:l=>k(l.target.value),className:`border border-line bg-transparent px-4 py-3 font-mono ${u.labelLarge} uppercase tracking-[0.2em] text-fg`,children:Object.keys(M).map(l=>e("option",{value:l,children:M[l]},l))})]})]}),a.vehicle&&c&&p==="vehicle"&&e(be,{picker:c,onClose:()=>g(null)}),a.vehicle&&c&&e(le,{picker:c,total:x})]})}const Le={1:"@min-[720px]:grid-cols-1",2:"@min-[720px]:grid-cols-2",3:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-3",4:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-4",5:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-3 @min-[1400px]:grid-cols-5",6:"@min-[720px]:grid-cols-2 @min-[1100px]:grid-cols-3 @min-[1400px]:grid-cols-6"},se=`flex w-full items-center justify-between gap-4 border-b py-3 text-left ${u.body}`;function y({name:o,label:t,rowsAreOptions:s,children:d}){return i("div",{"data-filter-column":o,className:"flex flex-col gap-6",children:[e("div",{className:`font-mono ${u.labelXs} uppercase tracking-[0.34em] text-fg-dim`,children:t}),e("div",{role:s?"radiogroup":void 0,"aria-label":s?t:void 0,children:d})]})}function O({active:o,onClick:t,children:s}){return e("button",{type:"button",role:"radio","aria-checked":o,onClick:t,className:[se,"transition-colors",o?"border-fg text-fg":"border-line text-fg-dim hover:text-fg"].join(" "),children:e("span",{children:s})})}function ce({label:o,value:t,onChange:s,ariaLabel:d}){return i("label",{className:`${se} border-line`,children:[e("span",{className:"text-fg-dim",children:o}),e("input",{type:"number",inputMode:"numeric","aria-label":d,placeholder:"Any",value:t??"",onChange:f=>s(f.target.value?Number(f.target.value):null),className:"w-24 bg-transparent text-right text-fg outline-none placeholder:text-fg-dim"})]})}export{ke as default,ye as filterBarFacetsWithChoice};
@@ -1,2 +1,6 @@
1
+ import { type PayFirstResult } from "../../lib/checkout/pay-first.js";
1
2
  import { type CheckoutProps } from "./checkout-state.js";
2
3
  export default function CheckoutPageClient(props: CheckoutProps): import("react").JSX.Element;
4
+ export declare function PayFirstResultView({ result }: {
5
+ result: PayFirstResult;
6
+ }): import("react").JSX.Element;