efficient-storefront-blocks 0.84.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/chunks/{EditorPreviewCheckout-3NVDTH56.js → EditorPreviewCheckout-4XHYYAT2.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-77K7CGYZ.js → SiteEditorProvider-X4YKBAJ4.js} +1 -1
- package/dist/chunks/{chunk-F3MB7QCR.js → chunk-KKKMX6LH.js} +1 -1
- package/dist/chunks/{chunk-VJLQXB7I.js → chunk-NFXV7HDB.js} +1 -1
- package/dist/chunks/chunk-NNBMZAW4.js +340 -0
- package/dist/chunks/chunk-VG4SUIRK.js +1 -0
- package/dist/chunks/{chunk-VYOK2XBF.js → chunk-Y5LB56KB.js} +1 -1
- package/dist/chunks/{fitment-data-PWXEDMOA.js → fitment-data-2I2FDPXW.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/document/popup-look-fields.d.ts +4 -0
- package/dist/editor/lib/document/popup-look-fields.js +1 -0
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +8 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +124 -52
- package/dist/render/app/globals.css +156 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +1 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/CartDrawer.d.ts +4 -3
- package/dist/render/components/CartDrawer.js +1 -4
- package/dist/render/components/DetailRows.d.ts +6 -1
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/PopupFrame.d.ts +10 -1
- package/dist/render/components/PopupFrame.js +5 -1
- package/dist/render/components/Reviews.d.ts +1 -0
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.d.ts +2 -0
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/current-record.d.ts +4 -15
- package/dist/render/lib/document/current-record.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +1 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-detail.d.ts +2 -0
- package/dist/render/lib/document/section-to-box-rows-detail.js +1 -0
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
- package/dist/render/lib/document/storefront-root.js +1 -1
- package/dist/render/lib/sections/section-band.d.ts +6 -0
- package/dist/render/lib/sections/section-band.js +1 -1
- package/dist/render/lib/sections/spec-table-band.d.ts +4 -0
- package/dist/render/lib/sections/spec-table-band.js +1 -0
- package/dist/words.d.ts +34 -12
- package/dist/words.js +5 -5
- package/package.json +4 -3
- package/dist/chunks/chunk-5EQD5D3L.js +0 -340
- package/dist/chunks/chunk-DQFD2BJD.js +0 -1
- /package/dist/chunks/{chunk-5EQD5D3L.js.LEGAL.txt → chunk-NNBMZAW4.js.LEGAL.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as yt,i as he,q as bt,s as Ct,t as xt,v as G}from"./chunk-VJLQXB7I.js";import{Ka as ge,La as gt,Oa as qe,Pa as ht,Sa as We,Ta as Ge}from"./chunk-VYOK2XBF.js";import{j as mt,l as ae}from"./chunk-F3MB7QCR.js";import{createContext as Cn,useContext as _t,useEffect as xn,useMemo as be,useState as Pt}from"react";function vt(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function se(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var Ke=4,Ur=1,$r={unit:"set",spares:0,spareSide:"left"};function Et(e){return e.unit==="single"?1:Ke+e.spares}function Hr(e,t){return[{partNumber:e.partNumber,wheels:Et(t),prices:e.prices}]}function Br(e,t){let n=Et(t)-Ke;if(n<=0||e.length===0)return e;let r=hn(e),o=r?r[t.spareSide]:0;return e.map((i,a)=>a===o?{...i,wheels:i.wheels+n}:i)}function hn(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function yn(e,t){return t.spares>0?`${e} + spare`:e}function qr(e){return e.unit==="single"?"Single":yn(`Set of ${Ke}`,e)}var Wr="data-add-to-basket",ze=9,bn="en",St=new Map;function Le(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=St.get(r);return o||(o=new Intl.NumberFormat(bn,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),St.set(r,o)),o}function ye(e,t,n=0){return Le(t,0,n).format(e)}function Gr(e,t){return Le(t).format(e)}import{jsx as Pn}from"react/jsx-runtime";var Sn="storefront-country",wt=Sn,Xe=Cn(null);function vn(e){return Rt(e,"catalogue")}function En(e){return Rt(e,"money")}function Rt(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return Le(o,t==="money"?i:0,i).format(r)}}function Yr({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=be(()=>t??[],[t]),a=be(()=>n??[],[n]),l=be(()=>r||i.find(p=>p.isDefault)?.code||i[0]?.code||"",[r,i]),u=be(()=>o||a.find(p=>p.isDefault)?.code||a[0]?.code||"",[o,a]),[c,f]=Pt(u),[C,d]=Pt(!1);xn(()=>{let p=ae.getItem(wt);p&&a.some(M=>M.code===p)&&f(p),d(!0)},[a]);function w(p){f(p),ae.setItem(wt,p)}let v=be(()=>{let p=a.find(R=>R.code===c)??null,M=p?.currency,L=M&&i.some(R=>R.code===M)?M:l,F=vn(i),_=En(i);return{country:c,currency:L,setCountry:w,currencies:i,countries:a,activeCountry:p,formatPrice:(R,h)=>F(R,h??L),formatMoney:(R,h)=>_(R,h??L),ready:C}},[c,i,a,l,C]);return Pn(Xe.Provider,{value:v,children:e})}function Nt(){let e=_t(Xe);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}function Qr(){return _t(Xe)?.country??""}import{createContext as $n,useCallback as P,useContext as Hn,useEffect as V,useMemo as qt,useRef as xe,useState as N}from"react";function Lt(){return"/edit"}function It(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var Tt="We'll confirm this discount when you place your order.",to="Confirmed at checkout";function no(e){return e&&(e.valid||e.deferred)?e.code:void 0}var kt="coupon_code: ";function ro(e){return!(e instanceof he)||e.status!==400||!e.message.startsWith(kt)?null:e.message.slice(kt.length)}function At(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var ke="Price on request",_n="Request a quote",Rn="from ",so="From ",lo="each",Ot="Free";function Ve(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Ye(e,t){let n=e?.[t];return Ve(n)?n:null}function uo(e,t,n,r){let o=Ye(e,n),i=Ye(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function co(e,t,n,r){if(n==null&&r==null)return!0;let o=Ye(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var Nn={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function Ln(e,t,n){if(!Ve(e))return Nn;let r=Ve(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function fo(e,t,n=""){return!e.priced||e.unit==null?ke:`${n}${ye(e.unit,t)}`}function po(e,t){return e.was==null?null:ye(e.was,t)}function kn(e,t,n=1){let r=se(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((a,l)=>a+l.wheels,0),i=Math.min(...e.map(a=>a.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var In={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function mo(e,t,n,r=1){let o=Ln(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let a=kn(t.components,n,r);return a.priced?{priced:!0,unit:a.unit,isFrom:a.isFrom,was:null,onSale:!1,setTotal:a.setTotal,fromSetTotal:i}:{...In,fromSetTotal:i}}function Tn(e,t){return!e.priced||e.unit==null?ke:`${e.isFrom?Rn:""}${ye(e.unit,t)}`}function go(e,t){return e.was==null?null:ye(e.was,t)}function ho(e,t){return!e.priced||e.unit==null?_n:Tn(e,t)}var An=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Mt(e){return An.test(e.trim())}var Dt="sf:ga-purchases",On=20;function Ut(){return typeof window>"u"||window.parent!==window}function Ce(...e){try{if(Ut()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Mn(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:se(e.components,t)??0,quantity:e.qty}}function Qe(e,t){return e.filter(Ie).map(n=>Mn(n,t))}function vo(e){Ce("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function $t(e,t){let n=Qe([e],t);n.length!==0&&Ce("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Eo(e){let t=Qe(e.lines,e.currency);t.length!==0&&Ce("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Ft=new Set;function Dn(e){if(Ft.has(e))return!1;Ft.add(e);try{let t=JSON.parse(ae.getItem(Dt)??"[]");if(t.includes(e))return!1;ae.setItem(Dt,JSON.stringify([...t,e].slice(-On)))}catch{}return!0}function Po(e){let t=e.confirmation;if(Ut()||!Dn(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);Ce("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Qe(e.lines,n)}),e.adsSendTo&&Ce("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var Fn="Arranged after review",Ht="Calculated at checkout",Un=Ht,Ro=Ht;function Bt({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function No(e){switch(e){case"arranged":return Fn;case"pending":return Un;case"free":return Ot;case"charged":return null}}import{jsx as Gn}from"react/jsx-runtime";var Bn=400,qn=400,Wn=1500;function Ie(e){return(e.components?.length??0)>0}function Wt(e,t){return{code:e,valid:t.valid,deferred:It(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function Kt(e,t){return se(e.components,t)}function je(e,t){let n=Kt(e,t);return n===null?null:n*e.qty}function Gt(e){return e!=="tyre"}var zt=$n(null);function Bo({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=Nt(),[i,a]=N(t),[l,u]=N([]),[c,f]=N([]),[C,d]=N([]),[w,v]=N(!1),[p,M]=N(!1),[L,F]=N(!1),[_,R]=N(!1),[h,$]=N(null),[j,U]=N(0),b=P(()=>U(s=>s+1),[]),[E,x]=N(void 0),[K,Ue]=N(null),[S,T]=N(null),[le,ee]=N(!1),[A,ue]=N(null),Z=xe(void 0),H=P(()=>a(!0),[]),te=P(()=>a(!1),[]),B=P(()=>a(s=>!s),[]);V(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&H()},[H,t]);let ne=Lt(),D=xe(ne);V(()=>{D.current!==ne&&(D.current=ne,t||te())},[ne,t,te]);let we=P(s=>{Ue(m=>m?.country===s?.country&&m?.subdivision===s?.subdivision&&m?.postcode===s?.postcode?m:s)},[]),re=P(s=>{R(!0),Gt(s)&&F(!0)},[]),ce=L||l.some(s=>Gt(s.kind)),de=_||l.length>0;V(()=>{if(t||!ce||w)return;let s=!0;return G.listWheels().then(m=>{s&&(f(m),v(!0))}),()=>{s=!1}},[t,ce,w]),V(()=>{if(t||!de||p)return;let s=!0;return G.listBundles().then(m=>{s&&(d(m),M(!0))}),()=>{s=!1}},[t,de,p]);let q=h?.deliveryOptions??[],fe=h?.courier??null;V(()=>{h&&ue(s=>s&&q.some(m=>m.id===s)?s:q[0]?.id??null)},[h]);let X=P(()=>l.filter(Ie).flatMap(s=>vt(s.components,s.qty)),[l]),_e=P(async(s,m)=>{let y=s.trim().toUpperCase();if(!y)return;let g=X();if(g.length===0){T({code:y,valid:!1,message:"Add a wheel to the cart first."});return}ee(!0),Z.current=m;try{let I=await G.validateCoupon({code:y,items:g,currency:n,shippingMethodId:A??void 0,customerEmail:m});T(Wt(y,I))}catch{T({code:y,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{ee(!1)}},[X,n,A]),Re=P(()=>{T(null),Z.current=void 0},[]),k=P(s=>{if(!S)return;let{code:m}=S;T(y=>y&&y.code===m?{code:m,valid:!1,refused:!0,message:s}:y)},[S]);V(()=>{if(!S||S.refused)return;let s=S.code,m=g=>g!==null&&g.code===s&&!g.refused,y=setTimeout(async()=>{let g=X();if(g.length===0){T(I=>m(I)?{code:s,valid:!1,message:"Add a wheel to the cart first."}:I);return}ee(!0);try{let I=await G.validateCoupon({code:s,items:g,currency:n,shippingMethodId:A??void 0,customerEmail:Z.current});T(me=>m(me)?Wt(s,I):me)}catch{}finally{ee(!1)}},Bn);return()=>clearTimeout(y)},[l,n,A]);let z=S&&!S.refused?S.code:void 0;V(()=>{if(t)return;let s=!0,m=setTimeout(async()=>{let y=X();if(y.length===0){$(null),x(void 0);return}try{let g=await G.quoteCart({items:y,currency:n,shippingMethodId:A??void 0,couponCode:z,customerEmail:Z.current||void 0,country:K?.country||r||void 0,subdivision:K?.country&&K.subdivision||void 0,postcode:K?.country&&K.postcode||void 0});if(!s)return;$(g)}catch{if(!s)return}x(z)},qn);return()=>{s=!1,clearTimeout(m)}},[l,n,A,z,r,K,j]);let oe=P(s=>{u(m=>{let y=m.findIndex(g=>g.id===s.id);return y===-1?[...m,s]:m.map((g,I)=>I===y?{...g,qty:Math.min(ze,g.qty+s.qty)}:g)}),$t(s,n)},[n]),ot=P(s=>{u(m=>m.filter(y=>y.id!==s))},[]),it=P((s,m)=>{let y=Math.max(1,Math.min(ze,m));u(g=>g.map(I=>I.id===s?{...I,qty:y}:I))},[]),at=P(s=>{u(s)},[]),[pe,un]=N(null),st=xe(null);st.current=pe;let W=xe(null),$e=xe(""),lt=P((s,m)=>{let y=s.trim().toLowerCase();Mt(y)&&un(g=>g&&g.email===y&&g.firstName===(m??"")?g:{email:y,firstName:m??""})},[]);V(()=>{if(t||!pe)return;let s=At(l.filter(Ie),g=>je(g,n)===null?ke:o(je(g,n),n)),m={email:pe.email,firstName:pe.firstName,currency:n,items:s},y=JSON.stringify(m);if(y!==$e.current)return W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{W.current=null,$e.current=y,G.captureCart(m).catch(g=>{})},Wn),()=>{W.current&&(clearTimeout(W.current),W.current=null)}},[l,pe,n,t]);let ut=P(()=>{W.current&&(clearTimeout(W.current),W.current=null);let s=st.current;s&&($e.current="",G.captureCart({email:s.email,firstName:s.firstName,currency:n,items:[]}).catch(m=>{}))},[n]),ct=qt(()=>{let s=l.reduce((O,ie)=>{let Ne=je(ie,n);return Ne===null?O:O+Ne},0),m=l.some(O=>Kt(O,n)===null),y=l.reduce((O,ie)=>O+ie.qty,0),g=S?.valid?S.effects:void 0,I=g?Math.min(s,Number(g.discountAmount)):0,me=h?.bundleDiscount??0,dn=h?.appliedBundles??[],He=!!g?.freeShipping,ft=q.find(O=>O.id===A),pt=He?0:h?.shipping??ft?.amount??0,fn=Bt({quoted:h!==null,optionCount:q.length,chosenAmount:ft?.amount,couponWaivesFreight:He}),Be={};for(let O of g?.freeUnits??[])Be[O.partNumber]=(Be[O.partNumber]??0)+O.quantity;let pn=h?.tax??null,mn=h?h.grandTotal:s-I-me+pt;return{sets:y,units:l.reduce((O,ie)=>O+(ie.components??[]).reduce((Ne,gn)=>Ne+gn.wheels*ie.qty,0),0),subtotal:s,hasUnpricedLine:m,discount:I,bundleDiscount:me,appliedBundles:dn,shipping:pt,freeShipping:He,shippingStatus:fn,freeUnitsByPartNumber:Be,tax:pn,grand:mn,repricing:!!S?.refused&&h!==null&&E===S?.code,currency:n}},[l,n,S,q,A,h,E]),dt=P(s=>{oe(s),H()},[oe,H]),cn=qt(()=>({isOpen:i,preview:t,open:H,close:te,toggle:B,items:l,catalog:c,bundles:C,warmCatalog:re,add:oe,addAndOpen:dt,remove:ot,setQty:it,replaceItems:at,identify:lt,clearCapturedCart:ut,coupon:S,applyCoupon:_e,removeCoupon:Re,refuseCoupon:k,couponBusy:le,deliveryOptions:q,setQuoteDestination:we,courier:fe,requote:b,shippingMethodId:A,setShippingMethodId:ue,totals:ct}),[i,t,H,te,B,l,c,C,re,oe,dt,ot,it,at,lt,ut,S,_e,Re,k,le,q,we,fe,b,A,ct]);return Gn(zt.Provider,{value:cn,children:e})}function Xt(){let e=Hn(zt);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as tr}from"react";function Vt(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,u]of e){if(u.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let a=o??i??e.keys().next().value;if(a===void 0)return;e.delete(a)}}var Kn=6e4,zn=5e3,Xn=500,Te=new Map;async function Vn(e){let{host:t,matchesRequestHost:n}=await bt();if(!t)return"";let r=await Ct();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var Yn=e=>e.includes("|slug:")||e.includes("|xhost:");async function Yt(e,t){if(await xt()!==null)return t();let n=await Vn(e);if(!n)return t();let r=Date.now(),o=Te.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),a=i.outcome.state==="failed",l=a?zn:Kn,u=Te.get(n)?.lastGood,c=i.outcome.state==="ok"?i:a?u:void 0,f=a&&c?c:i;return Vt(Te,Xn,Yn,r),Te.set(n,{load:f,expiresAt:r+l,lastGood:c}),f}var Qn=404;function jn(e){if(e instanceof he&&e.status===Qn)return{state:"absent"};let t=e instanceof he?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var Zn="[storefront:chrome-load-failed]";function Jn(e,t){console.error(`${Zn} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function Qt(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=jn(o);return i.state==="failed"&&Jn(e,i),{value:n,outcome:i}}}function er(e){return e==="production"?"silent":"banner"}var Yo=er("production");function nr(e,t){return e?.trim()||t}function ri({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=nr(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var rr={name:ge,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:qe},oi=tr(async()=>Yt("site",()=>Qt("site",async()=>{let e=await G.getSite();return{name:gt(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,socialLinks:ht(e.socialLinks)}},rr)));var ii={name:ge,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:qe};import{jsx as ve,jsxs as Ze}from"react/jsx-runtime";import{useEffect as Ae,useId as sr,useRef as Zt,useState as Oe}from"react";import{useRootIsDark as lr}from"efficient-shell/theme";import{efficientClientOpen as or}from"efficient-easel/screen/lib/session";var Se=new Map,ir=64;async function ar(e){if(!or())return null;try{let t=await fetch(`${mt()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function jt(e){let t=Se.get(e);if(t)return t;let n=ar(e);if(Se.set(e,n),Se.size>ir){let r=Se.keys().next();r.done||Se.delete(r.value)}return n}var ur=202/22,cr=.88,Si=16,dr="invert(1)";function vi({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:a,inkIsDark:l,size:u="medium",sizePx:c,wordmark:f,siteName:C=ge,fitToContainer:d=!1,fitWordmarkToContainer:w=!1,fitFloorPx:v}){let p=f&&f.trim()?f.trim():C,[M,L]=Oe(null),F=Zt(null),_=k=>{F.current=k};Ae(()=>{L(F.current?.ownerDocument??null)},[]);let R=!lr({doc:M,whenUnset:!0}),h=n&&n.trim()?n.trim():null,$=!!h&&yt(h),j=i??(R&&t),U=o&&o.trim()?o.trim():null,b=r&&!U,E=`logo-color-${sr().replace(/[^A-Za-z0-9_-]/g,"")}`,x=b&&$&&h&&a!=null?{reversed:a,inkIsDark:l??null}:null,K=x!==null,[Ue,S]=Oe(null);Ae(()=>{if(!b||!h||!$||K){S(null);return}let k=!1;return S(null),jt(h).then(z=>{k||S(z)}),()=>{k=!0}},[b,h,$,K]);let T=x??Ue,le=!!T&&T.inkIsDark!==null&&(j?!T.inkIsDark:T.inkIsDark),ee=b&&!!h&&!$&&!j,A=le&&T?T.reversed:h,ue=A?[A]:[],[Z,H]=Oe(0);Ae(()=>{H(0)},[h,le]);let te=e==="footer"?Ge:We[u],B=c&&c>0?c:te,ne=Math.round(B*ur),D=Z<ue.length?ue[Z]:null,[we,re]=Oe(A),ce=D!==null&&D===we,de=Zt(null);Ae(()=>{let k=de.current;if(!k||!k.complete)return;if(k.naturalWidth>0||k.naturalHeight>0){re(D);return}let z=!1;return k.decode().then(()=>!z&&re(D),()=>!z&&H(oe=>oe+1)),()=>{z=!0}},[D]);let q=d||w,fe=`calc(100cqi / ${((p.length+1)*cr).toFixed(2)})`,X=q&&v&&v>0?Math.min(v,B):null,_e=q?X===null?`min(${B}px, ${fe})`:`clamp(${X}px, ${fe}, ${B}px)`:`${B}px`,Re=Ze("span",{className:`font-display font-bold tracking-[0.18em] ${X===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:_e,lineHeight:1,...U?{color:U}:{}},"aria-label":p,children:[p,ve("span",{className:"text-accent",style:U?{color:U}:void 0,children:"."})]});return Ze("span",{ref:_,className:"inline-flex items-center",children:[!ce&&Re,U&&D&&ve("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:Ze("filter",{id:E,colorInterpolationFilters:"sRGB",children:[ve("feFlood",{style:{floodColor:U}}),ve("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),D&&ve("img",{ref:de,src:D,alt:p,width:ne,height:B,className:"shrink-0 object-contain",style:{...ce?{height:`${B}px`,width:"auto",...d?{maxWidth:"100cqi"}:{}}:{display:"none"},...ee?{filter:dr}:{},...U?{filter:`url(#${E})`}:{}},onLoad:()=>re(D),onError:()=>H(k=>k+1)},D)]})}import{jsx as fr}from"react/jsx-runtime";function Pi({tone:e="bad",role:t,children:n}){return fr("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as Ee,jsxs as mr}from"react/jsx-runtime";function pr({spokes:e,mesh:t=!1,className:n}){let a=u=>Math.round(u*1e3)/1e3,l=[];for(let u=0;u<e;u++){let c=u/e*Math.PI*2-Math.PI/2;if(l.push({x1:a(100+Math.cos(c)*22),y1:a(100+Math.sin(c)*22),x2:a(100+Math.cos(c)*86),y2:a(100+Math.sin(c)*86),main:!0}),t){let f=c+Math.PI/e;l.push({x1:a(100+Math.cos(f)*22*1.4),y1:a(100+Math.sin(f)*22*1.4),x2:a(100+Math.cos(f)*78),y2:a(100+Math.sin(f)*78),main:!1})}}return mr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[Ee("circle",{cx:100,cy:100,r:92,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),Ee("circle",{cx:100,cy:100,r:22,strokeWidth:2}),Ee("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((u,c)=>Ee("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"currentColor",strokeWidth:u.main?6:3,strokeLinecap:"round",opacity:u.main?1:.5},c))]})}var Li="#c9a461",Jt=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],ki={name:"",color:"var(--fg)",family:"silver",src:""};function gr(e,t){let n=r=>{let o=Jt.findIndex(i=>i.f===r);return o===-1?Jt.length:o};return n(e)-n(t)||e.localeCompare(t)}function Ii(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(gr)}import{useState as hr}from"react";import{jsx as J,jsxs as Je}from"react/jsx-runtime";function yr({customerEmail:e}){let{coupon:t,applyCoupon:n,removeCoupon:r,couponBusy:o}=Xt(),[i,a]=hr("");async function l(){o||!i.trim()||(await n(i,e),a(""))}return Je("div",{className:"flex flex-col gap-2",children:[t===null?Je("div",{className:"flex border border-line",children:[J("input",{type:"text",value:i,onChange:u=>a(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),l())},placeholder:"Coupon code","aria-label":"Coupon code",className:"flex-1 bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim"}),J("button",{type:"button",onClick:()=>{l()},disabled:o,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Apply"})]}):Je("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",t.valid?"border-accent":"border-line"].join(" "),style:t.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[J("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",t.valid?"text-accent":t.deferred||t.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:t.code}),t.unchecked&&J("button",{type:"button",onClick:()=>{n(t.code,e)},disabled:o,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Try again"}),J("button",{type:"button",onClick:r,"aria-label":`Remove coupon ${t.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),t?.deferred?J("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:Tt}):t&&!t.valid&&t.message&&J("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:t.message})]})}var et="Ads on. Shopper can opt out.",Me="Ads and analytics off until Accept",br={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:et,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Me,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:et,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:et,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Me,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Me,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Me,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function Cr(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function Ui(e,t,n){let r=Cr(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var $i={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};var xr={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var Sr=xr;function Wi(e=Sr){if(e.asked)return e.ads?"granted":"denied"}function Ki(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as Er,isValidElement as Pr,useEffect as tn,useId as wr,useLayoutEffect as on,useRef as Y,useState as nn}from"react";var De=(e,t)=>!!e[t]&&!e[t].disabled;function tt(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if(De(e,i))return i}return t}function nt(e,t){return tt(e,t===1?-1:e.length,t)}function rt(e,t){return De(e,t)?t:Math.max(nt(e,1),0)}function en(e,t,n){let{open:r,focus:o}=e,i=a=>({...e,...a});if(t.length===1&&/\S/.test(t)){let a=e.typed+t.toLowerCase(),l=n.findIndex((u,c)=>De(n,c)&&u.label.toLowerCase().startsWith(a));return{state:i({open:!0,typed:a,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:tt(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:tt(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:nt(n,1)}),handled:!0};case"End":return{state:i({focus:nt(n,-1)}),handled:!0};case"Enter":case" ":return De(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as _r}from"efficient-shell/ui";import{Fragment as Ar,jsx as Q,jsxs as an}from"react/jsx-runtime";var rn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function Rr({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[a,l]=nn(!1),u=r!==void 0,c=u?r:a,[f,C]=nn(0),d=Y({text:"",timer:0}),w=Y(null),v=Y(null),p=Y(null),M=wr(),L=Y(null),F=e.findIndex(b=>b.value===t),_=b=>{b!==c&&(u||l(b),b?o?.():i?.())},R=b=>{let E=e[b];!E||E.disabled||(n(E.value),_(!1),v.current?.focus())},h=b=>{let E={open:c,focus:c?f:rt(e,F),typed:d.current.text},x=en(E,b,e);return!x.handled&&x.state.open===c?!1:(x.state.typed!==E.typed&&(d.current.text=x.state.typed,window.clearTimeout(d.current.timer),d.current.timer=window.setTimeout(()=>{d.current.text=""},500)),C(x.state.focus),x.commit!==void 0?R(x.commit):_(x.state.open),x.refocus&&v.current?.focus(),x.handled)},$=Y(h);$.current=h;let j=Y(()=>_(!1));j.current=()=>_(!1);let U=b=>{c||(L.current=b.nativeEvent,$.current(b.key)&&b.preventDefault())};return tn(()=>{if(!c)return;let b=x=>{w.current?.contains(x.target)||j.current()},E=x=>{x!==L.current&&$.current(x.key)&&x.preventDefault()};return document.addEventListener("mousedown",b),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",b),document.removeEventListener("keydown",E)}},[c]),tn(()=>{c&&(d.current.text||C(rt(e,F)))},[c]),on(()=>{if(!c||!p.current)return;p.current.children.item(f)?.scrollIntoView({block:"nearest"})},[f,c]),{open:c,toggle:()=>_(!c),close:()=>_(!1),focusIdx:f,setFocusIdx:C,pick:b=>R(e.findIndex(E=>E.value===b)),wrapRef:w,triggerRef:v,listRef:p,listId:M,onTriggerKeyDown:U,activeId:c?`${M}-${f}`:void 0}}var Nr={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${rn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${rn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function Lr(e,t){on(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let a=n.offsetParent??n.parentElement;if(!a)return;let l=a.getBoundingClientRect(),u=n.getBoundingClientRect(),c=Math.abs(u.right-l.right)<Math.abs(u.left-l.left)?"end":"start",f=_r({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:u.width,height:u.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:c,side:"bottom"});if(f.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let d=f.top+Math.min(u.height,f.maxHeight);i.marginBottom=`${Math.max(0,l.top-d)}px`}f.maxHeight<u.height&&(i.maxHeight=`${f.maxHeight}px`,i.overflowY="auto");let C=f.left-u.left;C&&(i.translate=`${C}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function kr(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function Ir({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:a,listRef:l,ariaLabel:u,align:c="start"}){let f=Nr[t],C=Y(null);return Lr(C,n.length),Q("ul",{ref:d=>{C.current=d,l&&(l.current=d)},id:e,role:"listbox","aria-label":u,...f.pickerMarker?{"data-picker-menu":""}:{},className:c==="end"?kr(f.list):f.list,children:n.map((d,w)=>{let v=d.value===r;return Q("li",{id:`${e}-${w}`,role:"option","aria-selected":v,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&i(w),onMouseDown:p=>{p.preventDefault(),d.disabled||a(d.value)},className:f.item(w===o,v&&d.value!=="",!!d.disabled,w===n.length-1),style:f.itemStyle?.(v),children:d.meta===void 0?d.label:an(Ar,{children:[d.lead,Q("span",{className:"flex-1 whitespace-nowrap",children:d.label}),Q("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${w}`)})})}function Tr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:a,id:l,"aria-label":u,align:c}){let f=Er.toArray(r).flatMap(p=>{if(!Pr(p))return[];if(p.type!=="option")return[];let L=p.props,F=L.value!==void 0?String(L.value):"",_=L.children,R=typeof _=="string"||typeof _=="number"?String(_):F;return[{value:F,label:R,disabled:!!L.disabled}]}),C=e??"",d=Rr({items:f,value:C,onPick:p=>t?.({target:{value:p}})}),v=f.find(p=>p.value===C)?.label??f[0]?.label??"";return an("div",{ref:d.wrapRef,className:"relative",children:[a&&Q("input",{type:"hidden",name:a,value:C}),Q("button",{ref:p=>{d.triggerRef.current=p},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":d.open,"aria-controls":d.open?d.listId:void 0,"aria-activedescendant":d.activeId,"aria-label":u,id:l,onClick:()=>!n&&d.toggle(),onKeyDown:p=>!n&&d.onTriggerKeyDown(p),className:`block w-full ${o??""}`,style:i,children:Q("span",{className:"block w-full truncate text-left",children:v})}),d.open&&Q(Ir,{id:d.listId,tone:"select",items:f,value:C,focusIdx:d.focusIdx,onFocus:d.setFocusIdx,onPick:d.pick,listRef:d.listRef,align:c})]})}import{jsx as Pe,jsxs as Fe}from"react/jsx-runtime";var Or="font-mono text-[length:var(--size-label,12px)]",Mr="font-semibold uppercase tracking-[0.22em] text-fg";function sn(e){return`${e??Or} ${Mr}`}function ln(){return Pe("span",{className:"text-accent",children:" *"})}function Dr({children:e,required:t,labelFace:n}){return Fe("span",{className:sn(n),children:[e,t?Pe(ln,{}):null]})}function Fr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:a,children:l}){let u=a?`flex flex-col gap-2 ${a}`:"flex flex-col gap-2",c=n?Pe("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?Fe("div",{className:u,children:[Fe("label",{htmlFor:o,className:sn(i),children:[e,t?Pe(ln,{}):null]}),l,c]}):Fe("label",{htmlFor:o,className:u,children:[Pe(Dr,{required:t,labelFace:i,children:e}),l]})}var ra="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";export{Lt as a,to as b,no as c,ro as d,vt as e,Ke as f,Ur as g,$r as h,Hr as i,Br as j,hn as k,yn as l,qr as m,Wr as n,ze as o,Le as p,ye as q,Gr as r,ke as s,_n as t,Rn as u,so as v,lo as w,Ot as x,Ye as y,uo as z,co as A,Ln as B,fo as C,po as D,kn as E,mo as F,Tn as G,go as H,ho as I,Mt as J,vo as K,Eo as L,Po as M,Ro as N,No as O,Yr as P,Nt as Q,Qr as R,Ie as S,je as T,Bo as U,Xt as V,ri as W,rr as X,ii as Y,Si as Z,vi as _,pr as $,Li as aa,Jt as ba,ki as ca,gr as da,Ii as ea,yr as fa,Pi as ga,br as ha,Ui as ia,$i as ja,xr as ka,Wi as la,Ki as ma,Rr as na,Ir as oa,Tr as pa,Dr as qa,Fr as ra,ra as sa};
|
|
File without changes
|