efficient-storefront-blocks 0.125.6 → 0.125.8
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 +27 -0
- package/dist/chunks/{CustomHtmlCodeWindow-KAHNIUZO.js → CustomHtmlCodeWindow-ZSVS5DI6.js} +1 -1
- package/dist/chunks/{EditorPreviewCheckout-M5LLO3H2.js → EditorPreviewCheckout-NDZUORUC.js} +1 -1
- package/dist/chunks/SiteEditorProvider-CIZSA67M.js +1 -0
- package/dist/chunks/{chunk-UREPZPIT.js → chunk-3LWDFU5Y.js} +1 -1
- package/dist/chunks/{chunk-FD3ICZTF.js → chunk-HOKKFWPX.js} +1 -1
- package/dist/chunks/{chunk-L6MXM22Q.js → chunk-ICWPUDN3.js} +1 -1
- package/dist/chunks/{chunk-SQ6D33WV.js → chunk-R3WKYZOZ.js} +1 -1
- package/dist/chunks/{chunk-7ARO3R4C.js → chunk-RCOLM57Z.js} +1 -1
- package/dist/chunks/chunk-SPLS5ZLA.js +337 -0
- package/dist/chunks/{chunk-COR5IL6E.js → chunk-Y7DFVCVM.js} +1 -1
- package/dist/chunks/{chunk-4SIPG47B.js → chunk-YU4MIT6K.js} +1 -1
- package/dist/chunks/{fitment-data-BQFU5HN3.js → fitment-data-ANJWNG4T.js} +1 -1
- package/dist/chunks/{section-css-style-VF2FOE3B.js → section-css-style-7ROA6NKG.js} +1 -1
- package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +2 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +26 -26
- package/dist/render/app/globals.css +12 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/BoxHeaderBar.d.ts +3 -1
- package/dist/render/components/BoxHeaderBar.js +1 -1
- package/dist/render/components/PublishedHeader.js +1 -1
- package/dist/render/lib/content/header-bar.d.ts +8 -0
- package/dist/render/lib/content/header-bar.js +1 -1
- package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
- package/dist/render/lib/document/published-header-bar.d.ts +2 -0
- package/dist/render/lib/document/published-header-bar.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +2 -0
- package/dist/words.js +1 -1
- package/package.json +2 -2
- package/dist/chunks/SiteEditorProvider-6P7LYLL2.js +0 -1
- package/dist/chunks/chunk-7SLHEYYR.js +0 -337
- /package/dist/chunks/{chunk-ECMYL3O7.js → chunk-3DDOV7FZ.js} +0 -0
- /package/dist/chunks/{chunk-UREPZPIT.js.LEGAL.txt → chunk-3LWDFU5Y.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-SB3V6PTJ.js → chunk-RJM55KDO.js} +0 -0
- /package/dist/chunks/{chunk-7SLHEYYR.js.LEGAL.txt → chunk-SPLS5ZLA.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-VYXOE5FY.js → chunk-SRHU2S3G.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as oe,c as D,h as ae,j as L}from"./chunk-VYXOE5FY.js";import{b as W,c as se}from"./chunk-ECMYL3O7.js";var q="".replace(/\/+$/,"");var K="x-forwarded-for";function le(e){let t=(e??"").split(",").map(n=>n.trim()).filter(Boolean);return t.length>0?t[t.length-1]:null}var mt="x-forwarded-host";function ce(e,t,n){let r={};return e&&(r[mt]=e),t&&n==="uncached"&&(r[K]=t),r}function ue(e){if(e?.cache==="no-store"||e?.cache==="no-cache")return"uncached";if(e?.cache==="force-cache")return"data-cached";let t=e?.next?.revalidate;return typeof t=="number"&&t>0?"data-cached":"uncached"}var de="x-storefront-site",pe="x-storefront-host",me="x-storefront-preview";function h(e){return Array.isArray(e)?e:e?.results??[]}import{parseOption as Wt}from"efficient-shell/format";var gt="shop_access_token",ge="shop_refresh_token",J=null;function Y(){L.removeItem(gt),L.removeItem(ge)}var R={getAccess(){return J},takeLegacyRefresh(){let e=L.getItem(ge);return Y(),e},setTokens(e){J=e,Y()},clear(){J=null,Y()}};import{efficientClientOpen as qt}from"efficient-easel/screen/lib/session";function yt(e){return!!e.src}function C(e){let t=e.finishes.filter(yt);if(t.length===e.finishes.length)return e;let n=e.defaultFinish&&t.some(r=>r.name===e.defaultFinish)?e.defaultFinish:null;return{...e,finishes:t,defaultFinish:n}}function ht(e){return e.listable!==!1}function x(e){return e.map(C).filter(ht)}var Se=["fill","stroke","stop-color","color","flood-color","lighting-color","solid-color"],Pe=new Set(["none","transparent","currentcolor","inherit","initial","unset","context-fill","context-stroke"]),I={black:[0,0,0],white:[255,255,255],gray:[128,128,128],grey:[128,128,128],darkgray:[169,169,169],darkgrey:[169,169,169],dimgray:[105,105,105],dimgrey:[105,105,105],lightgray:[211,211,211],lightgrey:[211,211,211],gainsboro:[220,220,220],silver:[192,192,192],whitesmoke:[245,245,245]},be=12,we=/\burl\(/i,Re=new RegExp(`(?<![-\\w])(${Se.join("|")})(\\s*=\\s*)(["'])([^"']*)\\3`,"gi"),Ae=new RegExp(`((?:^|[;{\\s"'])(?:${Se.join("|")})\\s*:\\s*)([^;}"'<>]+)`,"gi"),ft=/<svg\b([^>]*)>/i,St=/\bfill\s*[=:]/i;function Pt(e){let t=e.replace(Re,(n,r,o,l,p)=>{let i=ye(p);return i===null?n:`${r}${o}${l}${i}${l}`}).replace(Ae,(n,r,o)=>{let l=ye(o);return l===null?n:`${r}${l}`});return t=t.replace(ft,(n,r)=>St.test(r)?n:`<svg fill="#ffffff"${r}>`),t}function ye(e){let t=/!important/i.test(e),n=e.replace(/!important/gi,"").trim().toLowerCase();if(!n||we.test(n)||Pe.has(n))return null;let r=n in I?[...I[n],1]:ke(n);if(!r)return null;let[o,l,p,i]=r;if(Math.max(o,l,p)-Math.min(o,l,p)>be)return null;let s=bt(255-o,255-l,255-p,i);return t?`${s} !important`:s}function bt(e,t,n,r){if(r<1)return`rgba(${e}, ${t}, ${n}, ${r})`;let o=l=>l.toString(16).padStart(2,"0");return`#${o(e)}${o(t)}${o(n)}`}function ke(e){return e.startsWith("#")?wt(e):e.startsWith("rgb")?Rt(e):e.startsWith("hsl")?kt(e):null}function wt(e){let t=e.slice(1),n=1;if(t.length===3||t.length===4)t.length===4&&(n=parseInt(t[3]+t[3],16)/255),t=t.slice(0,3).split("").map(r=>r+r).join("");else if(t.length===6||t.length===8)t.length===8&&(n=parseInt(t.slice(6,8),16)/255),t=t.slice(0,6);else return null;return/^[0-9a-f]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),n]:null}function Rt(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),o=n.split(/[\s,]+/).filter(Boolean).slice(0,3);if(o.length<3)return null;let l=o.map(i=>i.endsWith("%")?Math.round(parseFloat(i)/100*255):Math.round(parseFloat(i)));if(l.some(i=>Number.isNaN(i)))return null;let p=r?F(r):At(n);return[l[0],l[1],l[2],p]}function At(e){let t=e.split(/[\s,]+/).filter(Boolean);return t.length>=4?F(t[3]):1}function F(e){let t=e.trim().endsWith("%")?parseFloat(e)/100:parseFloat(e);return Number.isNaN(t)?1:t}function kt(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),o=n.split(/[\s,]+/).filter(Boolean);if(o.length<3)return null;let l=parseFloat(o[0]),p=parseFloat(o[1])/100,i=parseFloat(o[2])/100;if([l,p,i].some(w=>Number.isNaN(w)))return null;let s=r?F(r):o.length>=4?F(o[3]):1,[a,m,g]=Tt(l,p,i);return[a,m,g,s]}function Tt(e,t,n){let r=(1-Math.abs(2*n-1))*t,o=(e%360+360)%360/60,l=r*(1-Math.abs(o%2-1)),p=0,i=0,s=0;o<1?[p,i,s]=[r,l,0]:o<2?[p,i,s]=[l,r,0]:o<3?[p,i,s]=[0,r,l]:o<4?[p,i,s]=[0,l,r]:o<5?[p,i,s]=[l,0,r]:[p,i,s]=[r,0,l];let a=n-r/2;return[Math.round((p+a)*255),Math.round((i+a)*255),Math.round((s+a)*255)]}var he=512*1024;function Z(e){return/\.svg(\?|$)/i.test(e)}function _t(e){return`data:image/svg+xml,${encodeURIComponent(Pt(e))}`}function Ct(e){let t=e.replace(/!important/gi,"").trim().toLowerCase();if(!t||we.test(t)||Pe.has(t))return null;let n=t in I?[...I[t],1]:ke(t);if(!n)return null;let[r,o,l]=n;return Math.max(r,o,l)-Math.min(r,o,l)>be?null:(.2126*r+.7152*o+.0722*l)/255}function xt(e){let t=[],n=r=>{let o=Ct(r);o!==null&&t.push(o)};for(let r of e.matchAll(Re))n(r[4]);for(let r of e.matchAll(Ae))n(r[2]);return t.length?t.reduce((r,o)=>r+o,0)/t.length<.5:null}var fe=/^(?:\uFEFF|\s+|<\?xml[^>]*\?>|<!--[\s\S]*?-->|<!DOCTYPE\s+svg[^>[]*>)/i;function Ot(e){let t=e;for(let n=fe.exec(t);n&&n[0].length>0;n=fe.exec(t))t=t.slice(n[0].length);return/^<svg[\s>/]/i.test(t)}async function Et(e,t){if(!Z(e))return null;try{let n=await fetch(e,{signal:t,redirect:"manual"});if(!n.ok)return null;let r=Number(n.headers.get("content-length"));if(Number.isFinite(r)&&r>he)return null;let o=await n.text();return o.length>he?null:Ot(o)?o:null}catch{return null}}async function Te(e,t){let n=await Et(e,t);return n===null?null:{reversed:_t(n),inkIsDark:xt(n)}}import{currentEaselSession as Nt,setSessionBridgedSite as Bn,setSessionDocumentSite as Gn}from"efficient-easel/screen/lib/session";function _e(){return Nt().siteId()}var Ce={title:"Find a dealer",placeholder:"Postcode or suburb",search:"Search",searching:"Searching\u2026",none:"No dealers to show yet.",notFound:"We couldn't find that place. Check the postcode or suburb and search again.",tryAgain:"We couldn't look up that place just now. Please try again.",website:"Website",map:"Dealers on the map"},k=e=>typeof e=="string"?e:"",V=e=>typeof e=="number"&&Number.isFinite(e)?e:null,Ut=["found","not_found","try_again"];function Dt(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.name!="string"||!t.name?null:{id:k(t.id)||t.name,name:t.name,address:k(t.address),city:k(t.city),state:k(t.state),postcode:k(t.postcode),country:k(t.country),phone:k(t.phone),website:k(t.website),lat:V(t.lat),lng:V(t.lng),distanceKm:V(t.distanceKm)}}function xe(e){if(!e||typeof e!="object")return{near:null,dealers:[]};let t=e,n=typeof t.near=="string"&&Ut.includes(t.near)?t.near:null,r=Array.isArray(t.dealers)?t.dealers:[];return{near:n,dealers:r.map(Dt).filter(o=>o!==null)}}function $n(e){return e==="not_found"?Ce.notFound:e==="try_again"?Ce.tryAgain:null}function Wn(e){return e===null?null:e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function qn(e){return[e.city,e.state,e.postcode].filter(Boolean).join(" ")}function Kn(e){let t=e.map((a,m)=>({dealer:a,index:m})).filter(({dealer:a})=>a.lat!==null&&a.lng!==null);if(!t.length)return[];let n=t.map(({dealer:a})=>a.lat),r=t.map(({dealer:a})=>a.lng),[o,l]=[Math.min(...n),Math.max(...n)],[p,i]=[Math.min(...r),Math.max(...r)],s=(a,m,g)=>g===m?50:8+(a-m)/(g-m)*84;return t.map(({dealer:a,index:m})=>({id:a.id,index:m,left:s(a.lng,p,i),top:100-s(a.lat,o,l)}))}var Oe=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],Ee=["AED","AFN","ALL","AMD","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XCD","XCG","XOF","XPF","YER","ZAR","ZMW","ZWG"],Yn={AD:"EUR",AE:"AED",AF:"AFN",AL:"ALL",AM:"AMD",AO:"AOA",AR:"ARS",AT:"EUR",AU:"AUD",AW:"AWG",AZ:"AZN",BA:"BAM",BB:"BBD",BD:"BDT",BE:"EUR",BH:"BHD",BI:"BIF",BM:"BMD",BN:"BND",BO:"BOB",BR:"BRL",BS:"BSD",BT:"BTN",BW:"BWP",BY:"BYN",BZ:"BZD",CA:"CAD",CD:"CDF",CH:"CHE",CL:"CLF",CN:"CNY",CO:"COP",CR:"CRC",CU:"CUP",CV:"CVE",CY:"EUR",CZ:"CZK",DE:"EUR",DJ:"DJF",DK:"DKK",DO:"DOP",DZ:"DZD",EE:"EUR",EG:"EGP",ER:"ERN",ES:"EUR",ET:"ETB",FI:"EUR",FJ:"FJD",FK:"FKP",FR:"EUR",GB:"GBP",GE:"GEL",GH:"GHS",GI:"GIP",GM:"GMD",GN:"GNF",GR:"EUR",GT:"GTQ",GY:"GYD",HK:"HKD",HN:"HNL",HR:"EUR",HT:"HTG",HU:"HUF",ID:"IDR",IE:"EUR",IL:"ILS",IN:"INR",IQ:"IQD",IR:"IRR",IS:"ISK",IT:"EUR",JM:"JMD",JO:"JOD",JP:"JPY",KE:"KES",KG:"KGS",KH:"KHR",KM:"KMF",KP:"KPW",KR:"KRW",KW:"KWD",KY:"KYD",KZ:"KZT",LA:"LAK",LB:"LBP",LK:"LKR",LR:"LRD",LS:"LSL",LT:"EUR",LU:"EUR",LV:"EUR",LY:"LYD",MA:"MAD",MC:"EUR",MD:"MDL",ME:"EUR",MG:"MGA",MK:"MKD",MM:"MMK",MN:"MNT",MO:"MOP",MR:"MRU",MT:"EUR",MU:"MUR",MV:"MVR",MW:"MWK",MX:"MXN",MY:"MYR",MZ:"MZN",NA:"NAD",NG:"NGN",NI:"NIO",NL:"EUR",NO:"NOK",NP:"NPR",NZ:"NZD",OM:"OMR",PA:"PAB",PE:"PEN",PG:"PGK",PH:"PHP",PK:"PKR",PL:"PLN",PT:"EUR",PY:"PYG",QA:"QAR",RO:"RON",RS:"RSD",RU:"RUB",RW:"RWF",SA:"SAR",SB:"SBD",SC:"SCR",SD:"SDG",SE:"SEK",SG:"SGD",SH:"SHP",SI:"EUR",SK:"EUR",SL:"SLE",SM:"EUR",SO:"SOS",SR:"SRD",SS:"SSP",ST:"STN",SV:"SVC",SY:"SYP",SZ:"SZL",TH:"THB",TJ:"TJS",TM:"TMT",TN:"TND",TO:"TOP",TR:"TRY",TT:"TTD",TW:"TWD",TZ:"TZS",UA:"UAH",UG:"UGX",US:"USD",UY:"UYI",UZ:"UZS",VA:"EUR",VE:"VED",VN:"VND",VU:"VUV",WS:"WST",YE:"YER",ZA:"ZAR",ZM:"ZMW",ZW:"ZWG"};import{formatDateTime as It}from"efficient-shell/format";import{knownZone as Lt}from"efficient-shell/format";var Ne=()=>new Intl.DateTimeFormat().resolvedOptions().locale;function Ue(...e){return e.find(Lt)??""}var er={firstName:"",lastName:"",email:"",company:"",slug:"",country:"",currency:""},Ft=["slug_malformed","slug_reserved","slug_taken"],j=e=>typeof e=="string"&&Ft.includes(e),tr=400,P={title:"Create your {name} workspace",freeLine:"Free to start. No card needed.",firstName:"First name",lastName:"Last name",email:"Work email",company:"Company name",address:"Workspace address",country:"Country",currency:"Currency",countryHint:"Your shop sells in this currency. The country sets its tax and shipping defaults. Both can be changed later.",checking:"Checking",available:"Available",submit:"Create workspace",sending:"Sending\u2026",agree:"By creating a workspace you agree to the {terms} and {privacy}.",terms:"Terms",privacy:"Privacy Policy",haveOne:"Already have a workspace?",find:"Find my workspace",required:"Fill this in.",companyShort:"Use at least 2 characters.",emailWrong:"Enter an email address, like name@company.com.",notOffered:"That choice is not offered. Pick another.",wrong:"Check this and try again.",slugProblem:{slug_malformed:"Use 3 to 30 lower-case letters, digits or single hyphens, starting with a letter.",slug_reserved:"That address is kept for the platform. Choose another.",slug_taken:"That address is taken. Choose another."},trouble:{closed:"Signing up is closed just now.",dailyLimit:"Too many workspaces signed up today. Try again tomorrow.",unavailable:"Signing up is not available just now. Try again later.",tooMany:"You have asked a few times in a row. Wait a minute, then try again.",unreachable:"We couldn't reach the server. Check your connection and try again.",failed:"Something went wrong and nothing was sent. Try again."},closedTitle:"Signing up is closed just now",closedBody:"New {name} workspaces cannot be made just now.",closedLeave:"Leave your email and we'll tell you when it opens.",tellMe:"Tell me when it opens",waitingDone:"Thanks. We'll email {email} when sign-up opens.",sentTitle:"Check your email",sentBody:"We sent a link to {email}. Open it to set up {company}.",sentUntil:"The link works once, until {when}. Asking again sends a new link, and the old one stops working.",sendAgain:"Send it again",sendingAgain:"Sending\u2026",sentAgain:"A new link is on its way. The old one no longer works.",change:"Change the details"};function De(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>t[r]??n)}function Le(e){return e.trim().toLowerCase().replace(/_/g,"-")}function nr(e){return e.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-").replace(/^[^a-z]+/,"").slice(0,30).replace(/-+$/,"")}function rr(e,t){let n=(e??"").trim().toLowerCase().replace(/^\.+/,"").replace(/\.+$/,"");if(n)return`.${n}`;let r=t.toLowerCase().replace(/\.$/,"").replace(/^www\./,"");return r?`.${r}`:""}var A=e=>typeof e=="string"?e:"";function Ie(e,t){let n=new URLSearchParams;t&&n.set("slug",t),e&&n.set("product",e);let r=n.toString();return`/api/business-sign-ups/availability/${r?`?${r}`:""}`}var Fe="/api/business-sign-ups/",Me="/api/business-sign-ups/waiting-list/";function ir(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return n.code==="sign_up_open"?{open:!0,email:null,trouble:null}:n.code==="sign_up_waiting_list_unavailable"?{open:!1,email:null,trouble:"unavailable"}:e===400&&"email"in n?{open:!1,email:P.emailWrong,trouble:null}:e===0?{open:!1,email:null,trouble:"unreachable"}:e===429?{open:!1,email:null,trouble:"tooMany"}:{open:!1,email:null,trouble:"failed"}}function sr(e){let t=e.trim();return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?null:P.emailWrong:P.required}function ve(e){let t=e&&typeof e=="object"?e:{};return{open:t.open===!0,country:A(t.country),currency:A(t.currency),slugAvailable:typeof t.slug_available=="boolean"?t.slug_available:null,slugProblem:j(t.slug_problem)?t.slug_problem:null}}function or(e){return e.slugAvailable?{state:"available"}:e.slugProblem?{state:"problem",problem:e.slugProblem}:{state:"unknown"}}function Be(e){let t=e&&typeof e=="object"?e:{};return{slug:A(t.slug),expiresAt:A(t.expires_at)}}function ar(e,t,n){return{business_name:e.company.trim(),slug:Le(e.slug),first_name:e.firstName.trim(),last_name:e.lastName.trim(),email:e.email.trim(),...t?{product:t}:{},...n&&e.country?{country:e.country}:{},...n&&e.currency?{currency:e.currency}:{}}}function lr(e,t){let n={};e.firstName.trim()||(n.firstName=P.required);let r=e.email.trim();r?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(n.email=P.emailWrong):n.email=P.required;let o=e.company.trim();return o?o.length<2&&(n.company=P.companyShort):n.company=P.required,Le(e.slug)?t.state==="problem"&&(n.slug=P.slugProblem[t.problem]):n.slug=P.required,n}var Mt={business_name:"company",slug:"slug",first_name:"firstName",last_name:"lastName",email:"email",country:"country",currency:"currency"},v={self_sign_up_off:"closed",sign_up_daily_limit:"dailyLimit",sign_up_unavailable:"unavailable",sign_up_plan_missing:"unavailable"};function cr(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=n.code;if(j(r))return{fields:{slug:P.slugProblem[r]},trouble:null};if(typeof r=="string"&&v[r])return{fields:{},trouble:v[r]};if(e===0)return{fields:{},trouble:"unreachable"};if(e===429)return{fields:{},trouble:"tooMany"};if(e===400){let o={};for(let l of Object.keys(n)){let p=Mt[l];p&&(o[p]=p==="slug"?P.slugProblem.slug_malformed:p==="email"?P.emailWrong:p==="country"||p==="currency"?P.notOffered:P.wrong)}if(Object.keys(o).length)return{fields:o,trouble:null}}return{fields:{},trouble:"failed"}}function Ge(e,t){try{let n=new Intl.DisplayNames(t?[t]:void 0,{type:e,fallback:"code"});return r=>n.of(r)??r}catch{return n=>n}}var He=(e,t)=>t&&!e.includes(t)?[...e,t]:[...e],vt=(e,t)=>{let n=new Intl.Collator(t);return e.sort((r,o)=>n.compare(r.label,o.label))};function ur(e,t){let n=Ge("region",t);return vt(He(Oe,e).map(r=>({value:r,label:n(r)})),t)}function dr(e,t){let n=Ge("currency",t);return He(Ee,e).sort().map(r=>{let o=n(r);return{value:r,label:o===r?r:`${r} \xB7 ${o}`}})}function pr(e,t,n){let r=Ue(n??"");return!e||Number.isNaN(new Date(e).getTime())||!r?"":It(e,{locale:t||Ne(),timeZone:r,style:Bt})}var Bt={weekday:"long",day:"numeric",month:"long"},Gt=/^\/sign-up\/verify\/([^/?#]+)\/?$/;function mr(e){let t=Gt.exec(e??"");if(!t)return"";try{return decodeURIComponent(t[1])}catch{return t[1]}}var $e="/api/business-sign-ups/verifications/",Ht=["pending","provisioning","ready","failed"];function Q(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=A(n.code),o=A(n.slug);if(e===202||r==="sign_up_already_verified"){let l=A(n.provisioning_status),p=A(n.business_name);return Ht.includes(l)?l==="ready"?{kind:"ready",company:p,slug:o}:l==="failed"?{kind:"failed",company:p,slug:o}:{kind:"building",company:p,slug:o,status:l}:{kind:"gone"}}return j(r)?{kind:"taken",slug:o}:r==="sign_up_daily_limit"?{kind:"dailyLimit"}:r==="self_sign_up_off"?{kind:"closed"}:r&&v[r]?{kind:"trouble",trouble:v[r]}:e===400&&"token"in n?{kind:"gone"}:e===0?{kind:"trouble",trouble:"unreachable"}:e===429?{kind:"trouble",trouble:"tooMany"}:{kind:"trouble",trouble:"failed"}}function gr(e){return e.kind==="building"||e.kind==="trouble"&&e.trouble!=="failed"}function yr(e){return e<5?2e3:e<20?5e3:15e3}var hr=40;function fr(e,t,n){let r=e.kind==="failed"?"stopped":"running";return[{words:M.confirmed,at:"done"},{words:De(M.reserved,{address:`${e.slug}${n}`}),at:"done"},{words:M.building,at:r},...e.kind==="failed"?[]:[{words:De(M.adding,{name:t}),at:"waiting"}]]}var Sr=e=>e==="pending"?50:75,M={settingUp:"Setting up {company}",confirmed:"Email confirmed",reserved:"Address reserved: {address}",building:"Building your workspace",adding:"Adding {name}",aboutTen:"This takes about 10 seconds. You can close this page: we'll email you when it's ready.",readyTitle:"Your workspace is ready",workspace:"Workspace",address:"Address",plan:"Plan",planName:"{name} Free",readyNext:"We've emailed you a link to set your password. It's the next step.",failedBody:"We couldn't finish building your workspace. We've been told, and we'll email you when it's ready. You don't need to sign up again.",goneTitle:"This link has run out",goneBody:"This link is not right, or it has run out. Sign up again and we'll send a new one.",again:"Sign up again",takenTitle:"That address has gone",takenBody:"{address} was taken before you opened your link. Choose another address and we'll send a new link.",takenBodyBare:"That address was taken before you opened your link. Choose another address and we'll send a new link.",chooseAnother:"Choose another address",limitTitle:"Not today",limitNext:"Your link still works until it runs out. Open it again tomorrow.",checking:"Checking your link",troubleTitle:"We couldn't check your link",troubleFailed:"Something went wrong on our side. Your link still works, so nothing is lost.",tryAgain:"Try again"},We="/api/business-sign-ups/workspace-finds/",qe="/api/business-sign-ups/workspace-finds/openings/",$t=/^\/find\/([^/?#]+)\/?$/;function Pr(e){let t=$t.exec(e??"");if(!t)return"";try{return decodeURIComponent(t[1])}catch{return t[1]}}var br={title:"Find your workspace",intro:"Enter your work email. We'll send you the address of every workspace you belong to.",submit:"Email me my workspaces",newHere:"New to {name}?",create:"Create a workspace",sentTitle:"Check your email",sentBody:"If {email} belongs to a workspace, the links are on their way.",sentNote:"They work for 30 minutes. Nothing arrives if the address isn't in any workspace.",another:"Use another email",linkGone:"This link is not right, or it has run out. Ask for your workspaces again.",opening:"Opening your workspace",openFailed:"We couldn't open your workspace just now. Your link still works \u2014 try again.",retry:"Try again"};function wr(e){return e===0?"unreachable":e===429?"tooMany":"failed"}function Rr(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return n.code==="workspace_find_unavailable"?{email:null,trouble:"unavailable"}:e===400&&"email"in n?{email:P.emailWrong,trouble:null}:e===0?{email:null,trouble:"unreachable"}:e===429?{email:null,trouble:"tooMany"}:{email:null,trouble:"failed"}}function Ke(e){let t=e&&typeof e=="object"?A(e.sign_in_url):"";return/^https?:\/\/[^\s]+$/i.test(t)?t:""}var Kt="",S=class extends Error{constructor(t,n,r){super(n),this.status=t,this.data=r}},te="Unable to reach the server. This could be a problem with your internet connection, or the server may be undergoing maintenance or an upgrade. Please try again shortly.",Jt=new Set([502,503,504]),X=0,Yt="This editor runs on its host's own backend, which does not serve this request.",Zt=5e3,Vt=15e3,jt=()=>typeof window>"u"?Zt:Vt;function it(e){let t=(e.method??"GET").toUpperCase();if(!(e.body!=null||t!=="GET"&&t!=="HEAD")&&!(e.audience!=null&&e.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(jt())}var Je=e=>e instanceof Error&&e.name==="TimeoutError",Ye=(e,t)=>Jt.has(e)?te:t,Qt=["admin","venue"],st="admin";function Lr(e){st=Wt(Qt,"admin",e)}function Xt(){return st}var zt=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/,ot=null;function Ir(e){ot=e&&zt.test(e)?e:null}function en(){return ot}function tn(e){if(typeof window>"u"||!e.startsWith("/api/v1/"))return e;let t=W();return!t||/[?&]site=/.test(e)?e:$(e,`site=${encodeURIComponent(t)}`)}async function c(e,t={}){let{token:n,baseUrl:r,headers:o,audience:l,...p}=t;if(typeof window<"u"&&!qt())throw new S(X,Yt,null);if(typeof window>"u"&&r===void 0)throw new Error(`apiFetch(${JSON.stringify(e)}) ran on the server without an explicit baseUrl. The API_URL default it would inherit is browser-only (the prod image bakes NEXT_PUBLIC_API_URL="" for same-origin use, which a Node fetch cannot resolve). Pass a base explicitly: \`await backendOpts()\` (or baseUrl: PRODUCT_FETCH_BASE) for product reads, or the server-only PRODUCT_BACKEND_URL env for other backend surfaces.`);let i=typeof FormData<"u"&&p.body instanceof FormData,s;try{s=await fetch(`${r??Kt}${tn(e)}`,{...p,headers:{...i?{}:{"Content-Type":"application/json"},...n?{Authorization:`Bearer ${n}`}:{},...l===null?{}:{"X-Portal-Audience":l??"shop"},...o},signal:p.signal??it({...p,audience:l})})}catch(g){throw g instanceof TypeError||Je(g)?new S(X,te,null):g}let a;try{a=await s.text()}catch(g){throw Je(g)?new S(X,te,null):g}let m=null;if(a)try{m=JSON.parse(a)}catch{throw new S(s.status,s.ok?"Expected JSON but received a non-JSON response":Ye(s.status,s.statusText),a)}if(!s.ok){let g=(m&&typeof m=="object"&&"detail"in m&&typeof m.detail=="string"?m.detail:null)??Ye(s.status,s.statusText);throw new S(s.status,g,m)}return m}var O=null;async function at(){return O||(O=nn().finally(()=>{O=null}),O)}async function nn(){let e=R.takeLegacyRefresh(),t=await on.refresh(e??void 0);return R.setTokens(t.access),t.access}async function lt(){return R.getAccess()??at()}async function f(e,t={}){let n;try{n=await lt()}catch{throw R.clear(),new S(401,"Not signed in",null)}try{return await c(e,{...t,token:n})}catch(r){if(!(r instanceof S)||r.status!==401)throw r;try{let o=await at();return await c(e,{...t,token:o})}catch{throw R.clear(),r}}}var rn=100,Ze=20;function sn(e){if(!e)return null;try{return new URL(e,"http://page.invalid").searchParams.get("page")}catch{return null}}async function Ve(e,t){let[n,r=""]=e.split("?"),o=[],l="1";for(let p=0;p<Ze&&l;p++){let i=new URLSearchParams(r);i.set("page_size",String(rn)),l!=="1"&&i.set("page",l);let s=await f(`${n}?${i.toString()}`);o.push(...h(s)),l=sn(s.next)}return l&&console.warn(`[${t}] stopped at ${Ze} pages (${o.length} rows); list may be truncated`),o}async function je(e,t={}){if(R.getAccess())try{return{data:await f(e,t),asShopper:!0}}catch(n){if(!(n instanceof S)||n.status!==401)throw n}return{data:await c(e,t),asShopper:!1}}async function Qe(){let e=await f("/api/auth/me/");if(e.portal!=="shop")throw R.clear(),new S(403,"This session is not valid for this shop.",null);return e}var on={login:(e,t)=>c("/api/auth/login/",{method:"POST",body:JSON.stringify({email:e,password:t,portal:"shop"}),credentials:"include"}),refresh:e=>c("/api/auth/refresh/",{method:"POST",body:JSON.stringify(e?{refresh:e,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{R.clear();try{await c("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{let e=await lt();return await Qe(),e},me:Qe,updateMe:e=>f("/api/auth/me/",{method:"PATCH",body:JSON.stringify(e)}),changePassword:(e,t)=>f("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:t,old_password:e})}),changeEmail:(e,t)=>f("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:e,current_password:t})}),myProfile:()=>f("/api/shop-portal/profile/"),updateMyProfile:e=>f("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(e)}),myAddresses:()=>f("/api/shop-portal/delivery-locations/"),createAddress:e=>f("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(e)}),updateAddress:(e,t)=>f(`/api/shop-portal/delivery-locations/${e}/`,{method:"PATCH",body:JSON.stringify(t)}),deleteAddress:e=>f(`/api/shop-portal/delivery-locations/${e}/`,{method:"DELETE"}),passwordResetRequest:e=>c("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:e})}),passwordResetConfirm:(e,t,n)=>c("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:e,token:t,new_password:n})}),brands:()=>f("/api/products/brands/"),myOrders:()=>Ve("/api/shop-portal/orders/","api.myOrders"),myOrder:e=>f(`/api/shop-portal/orders/${e}/`),cancelOrder:e=>f(`/api/shop-portal/orders/${e}/cancel/`,{method:"POST"}),myReturns:e=>Ve(`/api/shop-portal/returns/${e?`?order=${encodeURIComponent(e)}`:""}`,"api.myReturns"),createReturn:e=>f("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(e)}),withdrawReturn:e=>f(`/api/shop-portal/returns/${e}/cancel/`,{method:"POST"}),uploadReturnPhoto:(e,t)=>{let n=new FormData;return n.append("claim_item",e),n.append("file",t),n.append("media_type",t.type.startsWith("video/")?"video":"image"),f("/api/shop-portal/return-media/",{method:"POST",body:n})}};function b(e){if(typeof e=="string")return e.startsWith("/media/")?oe(e):e;if(Array.isArray(e))return e.map(b);if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=n==="captions"&&r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).map(([o,l])=>[b(o),l])):b(r);return t}return e}var ct=typeof window>"u"&&q!=="",an=ct?q:"",ln=se,T=()=>({baseUrl:ln(),audience:null});function u(e,t){let n=t?`?process=${encodeURIComponent(t)}`:"";return`/api/v1${e}${n}`}var ut=100,Xe=50;function ie(e,t,n){let r=new URLSearchParams;for(let[o,l]of Object.entries(t))l!=null&&l!==""&&r.set(o,String(l));return r.set("pageSize",String(ut)),n&&r.set("cursor",n),`/api/v1${e}?${r.toString()}`}function cn(e,t){return ie("/wheels",{process:e},t)}var ze=ut;function un(e,t){return ie("/wheels",{slug:e.join(",")},t)}function dn(e,t,n){return ie("/products",{kind:e.join(","),make:t?.make,model:t?.model,year:t?.year,modification:t?.modification},n)}function pn(e){if(!e)return null;try{return new URL(e,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function z(e,t,n=()=>!1,r=()=>!1){let o=[],l=null;try{for(let p=0;p<Xe;p++){let i=await c(await t(l),await d());if(o.push(...h(i)),l=pn(i.next),!l)break;if(r(o))return o}l&&console.warn(`[${e}] stopped at ${Xe} pages (${o.length} rows); catalog may be truncated`)}catch(p){if(n(p))throw p;console.warn(`[${e}] product API unavailable, returning []`,p)}return o}var et=e=>e instanceof S&&e.status===400;function tt(e){return e.flatMap(t=>t.kind==="alloy-wheel"?x([t]):[t])}async function dt(){return(await mn()).host}async function mn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js"),t=await e(),n=l=>l?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,r=n(t.get(pe)??t.get("x-forwarded-host")??t.get("host")),o=n(t.get("host"));return{host:r,matchesRequestHost:r!==null&&r===o}}catch{return{host:null,matchesRequestHost:!1}}}async function gn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return le((await e()).get(K))}catch{return null}}async function yn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(de)||null}catch{return null}}async function hn(){let e=await yn();if(e)return`site=${encodeURIComponent(e)}`;let t=await dt();return t?`host=${encodeURIComponent(t)}`:""}async function y(e){if(typeof window<"u"){let t=W();return t?$(e,`site=${encodeURIComponent(t)}`):e}return $(e,await hn())}function $(e,t){return t?`${e}${e.includes("?")?"&":"?"}${t}`:e}var fn="preview";async function Sn(){if(typeof window<"u")return null;try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(me)}catch{return null}}async function Pn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get("user-agent")}catch{return null}}async function ee(e,t){let n=await Sn();if(n===null)return[await y(e),await d(t)];let r=$(await y(e),`${fn}=${encodeURIComponent(n)}`),{next:o,cache:l,...p}=t??{},i=await d({...p,cache:"no-store"}),s=await Pn();return s&&(i.headers={...i.headers,"user-agent":s}),[r,i]}async function bn(e){if(!ct)return;let[t,n]=await Promise.all([dt(),gn()]),r=ce(t,n,e);return Object.keys(r).length>0?r:void 0}async function d(e){let t=await bn(ue(e)),n={baseUrl:an,...e};return t&&(n.headers={...t,...e?.headers}),n}var E=typeof window>"u";function N(e,t){let n=new URLSearchParams;for(let[o,l]of Object.entries(t))l!==void 0&&l!==""&&n.set(o,String(l));let r=n.toString();return`/api/v1/fitment${e}${r?`?${r}`:""}`}var $r={listMakes:async e=>{if(E){let{fitmentData:n}=await import("./fitment-data-BQFU5HN3.js");return n.makes(e)}let t=await c(N("/makes",{region:e}),T());return h(t)},listModels:async(e,t)=>{if(E){let{fitmentData:r}=await import("./fitment-data-BQFU5HN3.js");return r.models(e,t)}let n=await c(N("/models",{make:e,region:t}),T());return h(n)},listYears:async(e,t,n)=>{if(E){let{fitmentData:o}=await import("./fitment-data-BQFU5HN3.js");return o.years(e,t,n)}let r=await c(N("/years",{make:e,model:t,region:n}),T());return h(r)},listModifications:async(e,t,n,r)=>{if(E){let{fitmentData:l}=await import("./fitment-data-BQFU5HN3.js");return l.modifications(e,t,n,r)}let o=await c(N("/modifications",{make:e,model:t,year:n,region:r}),T());return h(o)},getStockFitment:async(e,t,n,r,o)=>{if(E){let{fitmentData:l}=await import("./fitment-data-BQFU5HN3.js");return l.stockFitment(e,t,n,r,o)}return c(N("/stock-fitment",{make:e,model:t,year:n,modification:r,region:o}),T())}},Wr={listWheels:async(e,t={})=>{let n=await z("products.listWheels",async r=>await y(cn(e,r)),t.throwOnFailure?()=>!0:void 0,t.maxRows===void 0?void 0:r=>x([...r]).length>=t.maxRows);return x(b(n))},listWheelsBySlug:async(e,t={})=>{let n=[...new Set(e.map(i=>i.trim()).filter(Boolean))];if(n.length===0)return[];let r=[];for(let i=0;i<n.length;i+=ze)r.push(n.slice(i,i+ze));let o=await Promise.all(r.map(i=>z("products.listWheelsBySlug",async s=>await y(un(i,s)),t.throwOnFailure?()=>!0:et))),l=new Set(n),p=o.flat().filter(i=>l.has(i.slug));return x(b(p))},listCatalog:async(e,t,n={})=>{if(e.length===0)throw new Error("products.listCatalog() needs at least one kind. An empty list would omit `kind`, which the contract reads as `alloy-wheel` \u2014 so the call would silently return the wheel catalog instead of nothing.");let r=await z("products.listCatalog",async o=>await y(dn(e,t,o)),n.throwOnFailure?()=>!0:et,n.maxRows===void 0?void 0:o=>tt([...o]).length>=n.maxRows);return tt(b(r))},getWheel:async e=>C(b(await c(await y(u(`/wheels/${e}`)),await d()))),getTyre:async e=>b(await c(await y(u(`/tyres/${e}`)),await d())),listBundles:async(e={})=>{try{return await c(await y(u("/bundles")),await d())}catch(t){if(e.throwOnFailure)throw t;return[]}},getBundle:async e=>c(await y(u(`/bundles/${e}`)),await d()),listGalleryBuilds:async(e={})=>{let{process:t=null,wheelSlug:n=null}=e;if(typeof window>"u"){let{listGalleryBuilds:r}=await import("./gallery-builds-data-TD3QJK7L.js");return b(r(t,n))}try{let r=new URLSearchParams;t&&r.set("process",t),n&&r.set("wheelSlug",n);let o=r.toString(),l=await c(`/api/v1/gallery-builds${o?`?${o}`:""}`,T());return b(h(l))}catch(r){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",r),[]}},getSite:async()=>c(await y(u("/site")),await d()),getSiteBySlug:async e=>c(`${u("/site")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await d():void 0),listPages:async()=>b(await c(await y(u("/pages")),await d())),listPopups:async()=>c(await y(u("/popups")),await d()),listProductTemplates:async()=>{try{return await c(await y(u("/product-templates")),await d())}catch(e){return console.warn("[products.listProductTemplates] unavailable, returning []",e),[]}},listDynamicPages:async e=>{let t=e?`?recordType=${encodeURIComponent(e)}`:"";try{return await c(await y(`${u("/dynamic-pages")}${t}`),await d())}catch(n){if(n instanceof S&&n.status===404)return[];throw n}},getRecord:async(e,t)=>{try{return await c(await y(u(`/records/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)),await d())}catch(n){if(n instanceof S&&n.status===404)return null;throw n}},listRecordKeys:async e=>{try{let t=await c(await y(u(`/records/${encodeURIComponent(e)}`)),await d({cache:"no-store"}));return Array.isArray(t?.keys)?t.keys.filter(n=>typeof n=="string"&&n!==""):[]}catch(t){if(t instanceof S&&t.status===404)return[];throw t}},listProductTypeChoices:async()=>{try{return await c(await y(u("/product-type-choices")),await d())}catch(e){return console.warn("[products.listProductTypeChoices] unavailable, returning []",e),[]}},listFieldUsage:async()=>{try{return await c(await y(u("/field-usage")),await d())}catch(e){return console.warn("[products.listFieldUsage] unavailable, returning []",e),[]}},getPage:async(e,t={})=>{let n=t.record?`?record=${encodeURIComponent(t.record)}`:"",[r,o]=await ee(u(`/pages/${e}`)+n,t.revalidate!==void 0?{next:{revalidate:t.revalidate}}:void 0);return b(await c(r,o))},listBlogPosts:async(e={},{throwOnFailure:t=!1}={})=>{let n=e.category?`?category=${encodeURIComponent(e.category)}`:"";try{return(await c(u("/blog-posts")+n,await d())).map(o=>({...o,coverImage:D(o.coverImage)??""}))}catch(r){if(t)throw r;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",r),[]}},getBlogPost:async e=>{let t=await c(u(`/blog-posts/${e}`),await d());return{...t,coverImage:D(t.coverImage)??""}},createOrder:async e=>c(u("/orders"),await d({method:"POST",body:JSON.stringify(e)})),createOrderAuthed:async e=>f(u("/orders"),await d({method:"POST",body:JSON.stringify(e)})),lookupOrder:async e=>c(u("/orders/lookup"),await d({method:"POST",body:JSON.stringify(e)})),createPaymentIntent:async e=>c(u("/payments/intent"),await d({method:"POST",body:JSON.stringify(e)})),releaseCheckout:async e=>c(u("/checkouts/release"),await d({method:"POST",body:JSON.stringify(e)})),createPaypalOrder:async e=>c(u("/payments/paypal/order"),await d({method:"POST",body:JSON.stringify(e)})),capturePaypalOrder:async e=>c(u("/payments/paypal/capture"),await d({method:"POST",body:JSON.stringify(e)})),createAfterpayCheckout:async e=>c(u("/payments/afterpay/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureAfterpayPayment:async e=>c(u("/payments/afterpay/capture"),await d({method:"POST",body:JSON.stringify(e)})),chargeSquare:async e=>c(u("/payments/square/charge"),await d({method:"POST",body:JSON.stringify(e)})),createGocardlessBillingRequest:async e=>c(u("/payments/gocardless/billing-request"),await d({method:"POST",body:JSON.stringify(e)})),completeGocardlessPayment:async e=>c(u("/payments/gocardless/complete"),await d({method:"POST",body:JSON.stringify(e)})),createZipCheckout:async e=>c(u("/payments/zip/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureZipPayment:async e=>c(u("/payments/zip/capture"),await d({method:"POST",body:JSON.stringify(e)})),createKlarnaCheckout:async e=>c(u("/payments/klarna/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureKlarnaPayment:async e=>c(u("/payments/klarna/capture"),await d({method:"POST",body:JSON.stringify(e)})),createStockAlert:async e=>c(u("/stock-alerts"),await d({method:"POST",body:JSON.stringify(e)})),createPreOrderIntent:async e=>c(u("/pre-order-intents"),await d({method:"POST",body:JSON.stringify(e)})),createNewsletterSubscription:async e=>c(u("/newsletter-subscriptions"),await d({method:"POST",body:JSON.stringify(e)})),unsubscribeNewsletter:async e=>c(u("/newsletter-unsubscribe"),await d({method:"POST",body:JSON.stringify(e)})),captureCart:async e=>c(u("/carts"),await d({method:"POST",body:JSON.stringify(e)})),restoreCart:async e=>c(u("/carts/restore"),await d({method:"POST",body:JSON.stringify(e)})),unsubscribeCartReminders:async e=>c(u("/carts/unsubscribe"),await d({method:"POST",body:JSON.stringify(e)})),listReviews:async(e={})=>{let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.designCode&&t.set("designCode",e.designCode);let n=u("/reviews"),r=t.toString();try{return await c(await y(r?`${n}?${r}`:n),await d())}catch(o){return console.warn("[products.listReviews] product API unavailable, returning []",o),[]}},submitReview:async e=>c(u("/reviews"),await d({method:"POST",body:JSON.stringify(e)})),getForm:async e=>c(u(`/forms/${encodeURIComponent(e)}`),await d()),submitForm:async(e,t)=>c(u(`/forms/${encodeURIComponent(e)}/submissions`),await d({method:"POST",body:JSON.stringify(t)})),listShippingMethods:async()=>{try{return await c(u("/shipping-methods"),await d())}catch(e){return console.warn("[products.listShippingMethods] product API unavailable, returning []",e),[]}},listCountrySubdivisions:async e=>{try{return await c(u(`/countries/${encodeURIComponent(e)}/subdivisions`),await d())}catch(t){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",t),[]}},quoteCart:async e=>{let t=u("/cart/quote"),n=await d({method:"POST",body:JSON.stringify(e)});return e.couponCode?(await je(t,n)).data:c(t,n)},validateCoupon:async e=>{let{data:t,asShopper:n}=await je(u("/coupons/validate"),await d({method:"POST",body:JSON.stringify(e)}));return{...t,askedAsShopper:n}},getHeaderSettings:async()=>{let e=it({method:"GET"}),t=await c(...await ee(u("/header-settings"),{signal:e})),n=D(t.logoUrl),r=null,o=null;if(n&&Z(n)){let l=await Te(n,e);l&&(r=l.reversed,o=l.inkIsDark)}return{...t,logoUrl:n,logoReversed:r,logoInkIsDark:o}},getThemeSettings:async()=>c(...await ee(u("/theme-settings"))),getChatSettings:async()=>c(await y(u("/chat-settings")),await d())},qr={listServices:async()=>{try{return await c(u("/bookings/services"),await d())}catch(e){return console.warn("[bookings.listServices] API unavailable, returning []",e),{results:[],currency:"USD"}}},getAvailability:async(e,t)=>c(u(`/bookings/availability?service=${encodeURIComponent(e)}&date=${t}`),await d()),create:async e=>c(u("/bookings"),await d({method:"POST",body:JSON.stringify(e)})),get:async e=>c(u(`/bookings/manage/${encodeURIComponent(e)}`),await d()),cancel:async e=>c(u(`/bookings/manage/${encodeURIComponent(e)}/cancel`),await d({method:"POST"})),reschedule:async(e,t)=>c(u(`/bookings/manage/${encodeURIComponent(e)}/reschedule`),await d({method:"POST",body:JSON.stringify({startAt:t})})),createPaymentIntent:async e=>c(u("/bookings/payments/intent"),await d({method:"POST",body:JSON.stringify({manageToken:e})}))},ne=class extends Error{constructor(n,r){super(`Slug "${n}" exists on ${r} websites; a site is required to pick one.`);this.slug=n;this.count=r;this.name="AmbiguousPageSlugError"}},B=(e,t,n)=>{let r=new URLSearchParams({...t?{site:t}:{},...n?{draft:"1"}:{}}).toString();return`/api/storefront/${e}/${r?`?${r}`:""}`},H=e=>`/api/storefront/sites/${encodeURIComponent(e)}/`,wn=e=>`${H(e)}currencies/`,Rn="/api/storefront/media/ingest/",re=class extends Error{constructor(){super("This editor is not connected to a website, so an upload has nowhere to go. Open the page from the website the file should belong to, then try again."),this.name="MediaUploadDestinationError"}};function An(){let e=_e();if(!e)throw new re;return`${Rn}?${new URLSearchParams({site:e})}`}var kn="X-Puck-Media-Manifest",nt=ae.contentHash,G={"X-Media-Manifest":nt,[kn]:nt},Kr=pt({});function pt(e){return(t,n={})=>{let r=en(),o=e.headers||r?{...r?{"Accept-Language":r}:{},...e.headers,...n.headers}:void 0;return c(t,{...n,...e.baseUrl!==void 0?{baseUrl:e.baseUrl}:{},...o?{headers:o}:{},audience:e.audience??Xt()})}}function Tn(e={}){let t=pt(e),n=e.siteDrafts===!0,r=i=>B("header-settings",i,n),o=i=>B("theme-settings",i,n),l=i=>B("chat-settings",i,n),p=i=>B("social-settings",i,n);return{findPageBySlug:async(i,s,a)=>{let m=new URLSearchParams({slug:i});a&&m.set("site",a);let g=await t(`/api/storefront/pages/?${m.toString()}`,{token:s}),w=h(g);if(!a&&w.length>1)throw new ne(i,w.length);return w[0]??null},getPageById:(i,s)=>t(`/api/storefront/pages/${i}/`,{token:s}),saveLayout:(i,s,a,m,g)=>t(`/api/storefront/pages/${i}/`,{method:"PATCH",body:JSON.stringify({layout:s,expected_updated_at:m,...g?{client_id:g}:{}}),token:a}),duplicatePage:(i,s,a)=>t(`/api/storefront/pages/${i}/duplicate/`,{method:"POST",body:JSON.stringify({title:s.title,slug:s.slug}),token:a}),geocode:(i,s,a)=>t(`/api/storefront/geocode/?${new URLSearchParams(a?{q:i,country:a}:{q:i})}`,{token:s}),listBlockSources:i=>t("/api/storefront/block-sources/",{token:i}),listRecordTypes:i=>t("/api/storefront/record-types/",{token:i}),createPagePreviewLink:(i,s)=>t(`/api/storefront/pages/${i}/preview-link/`,{method:"POST",token:s}),claimPageEditLock:(i,s,a,m=!1)=>t(`/api/storefront/pages/${i}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:a,takeover:m}),token:s}),releasePageEditLock:(i,s)=>t(`/api/storefront/pages/${i}/edit-lock/`,{method:"DELETE",token:s}),createTemplate:(i,s,a)=>t("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:i,layout:s}),headers:G,token:a}),getTemplate:(i,s)=>t(`/api/storefront/page-templates/${i}/`,{token:s}),saveTemplateLayout:(i,s,a)=>t(`/api/storefront/page-templates/${i}/`,{method:"PATCH",body:JSON.stringify({layout:s}),headers:G,token:a}),listTemplatePages:async(i,s)=>{let a=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(i)}`,{token:s});return h(a)},getPageLibrary:async i=>{let s=await t("/api/storefront/page-templates/?is_page_library=true&is_active=true",{token:i});return h(s)[0]??null},getTemplateLibrary:(i,s)=>t(`/api/storefront/pages/template-library/?site=${encodeURIComponent(i)}`,{token:s}),createPageFromTemplate:(i,s)=>t(`/api/storefront/pages/from-template/${n?"?draft=1":""}`,{method:"POST",body:JSON.stringify(i),token:s}),findTemplatePageBySlug:async(i,s,a)=>{let m=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(i)}&slug=${encodeURIComponent(s)}`,{token:a});return h(m)[0]??null},createTemplatePage:(i,s,a)=>t("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:i,...s}),headers:G,token:a}),saveTemplatePageLayout:(i,s,a)=>t(`/api/storefront/template-pages/${i}/`,{method:"PATCH",body:JSON.stringify({layout:s}),headers:G,token:a}),deleteTemplatePage:(i,s,a)=>t(`/api/storefront/template-pages/${i}/`,{method:"DELETE",token:s,...a?.keepalive?{keepalive:!0}:{}}),listPages:async(i,s)=>{let a=new URLSearchParams({no_page:"true"});s&&a.set("site",s);let m=await t(`/api/storefront/pages/?${a.toString()}`,{token:i});return h(m)},createPage:(i,s,a,m)=>t("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:i,slug:s,layout:a}),token:m}),deletePage:(i,s)=>t(`/api/storefront/pages/${i}/`,{method:"DELETE",token:s}),getHeaderSettings:(i,s)=>t(r(s),{token:i}),listMenus:async(i,s)=>{let a=new URLSearchParams({no_page:"true"});s&&a.set("site",s);let m=await t(`/api/storefront/menus/?${a}`,{token:i});return h(m)},listBlogPosts:async(i,s={})=>{let a=new URLSearchParams({no_page:"true"});s.visibleOnly&&a.set("is_visible","true"),s.siteId&&a.set("site",s.siteId);let m=await t(`/api/storefront/blog-posts/?${a.toString()}`,{token:i});return h(m)},listFieldUsage:async(i,s)=>{let a=await t(`/api/storefront/field-usage/?site=${encodeURIComponent(s)}`,{token:i});return Array.isArray(a?.entries)?a.entries:[]},listCategories:async(i,s={})=>{let a=new URLSearchParams({no_page:"true"});s.visibleOnly&&a.set("is_visible","true"),s.siteId&&a.set("site",s.siteId);let m=await t(`/api/storefront/categories/?${a.toString()}`,{token:i});return[...h(m)].sort((w,U)=>w.sort_order-U.sort_order||w.name.localeCompare(U.name))},listForms:async(i,s={})=>{let a=new URLSearchParams({no_page:"true"});s.siteId&&a.set("site",s.siteId);let m=await t(`/api/storefront/forms/?${a.toString()}`,{token:i});return[...h(m)].sort((w,U)=>w.title.localeCompare(U.title))},listWheelSummaries:async(i,s={})=>{let a=new URLSearchParams;s.siteId&&a.set("site",s.siteId);let m=a.toString(),g=await t(`/api/storefront/wheel-curations/summaries/${m?`?${m}`:""}`,{token:i});return b(g)},listProducts:async(i,s={})=>{let a=new URLSearchParams;s.kinds?.length&&a.set("kind",s.kinds.join(",")),s.siteId&&a.set("site",s.siteId);let m=a.toString(),g=await t(`/api/storefront/products/${m?`?${m}`:""}`,{token:i});return b(g)},getWheelDetail:async(i,s,a={})=>{let m=new URLSearchParams({slug:s});return a.siteId&&m.set("site",a.siteId),C(b(await t(`/api/storefront/wheel-curations/detail/?${m.toString()}`,{token:i})))},updateHeaderSettings:(i,s,a)=>t(r(a),{method:"PATCH",body:JSON.stringify(i),token:s}),getSite:(i,s)=>t(H(i),{token:s}),listSites:async i=>{let s=await t("/api/storefront/sites/?no_page=true",{token:i});return h(s)},listSiteCurrencies:async(i,s)=>{let a=await t(wn(i),{token:s});return Array.isArray(a)?a:[]},publishSite:(i,s)=>t(`${H(i)}publish/`,{method:"POST",token:s}),getSiteLiveState:(i,s)=>t(`${H(i)}live-state/`,{token:s}),getThemeSettings:(i,s)=>t(o(s),{token:i}),updateThemeSettings:(i,s,a)=>t(o(a),{method:"PATCH",body:JSON.stringify(i),token:s}),getMyPreferences:async i=>(await t("/api/auth/me/",{token:i})).preferences??{},updateMyPreferences:(i,s)=>t("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:i}),token:s}),getChatSettings:(i,s)=>t(l(s),{token:i}),updateChatSettings:(i,s,a)=>t(l(a),{method:"PATCH",body:JSON.stringify(i),token:s}),getSocialSettings:(i,s)=>t(p(s),{token:i}),updateSocialSettings:(i,s,a)=>t(p(a),{method:"PATCH",body:JSON.stringify(i),token:s}),uploadHeaderLogo:(i,s,a)=>{let m=new FormData;return m.append("logo",i),t(r(a),{method:"PATCH",body:m,token:s})},clearHeaderLogo:(i,s)=>t(r(s),{method:"PATCH",body:JSON.stringify({logo:null}),token:i}),setHeaderLogoFromAsset:(i,s,a)=>t(r(a),{method:"PATCH",body:JSON.stringify({logo_asset_id:i}),token:s}),uploadMedia:async(i,s)=>{let a=new FormData;return a.append("file",i),t(An(),{method:"POST",body:a,token:s})},listMedia:async(i,s)=>{let a=new URLSearchParams({no_page:"true"});s&&a.set("kind",s);let m=await t(`/api/storefront/media-assets/?${a.toString()}`,{token:i});return h(m)}}}var Jr=Tn({siteDrafts:!0});function _n(e){let t=e.trim();return t?`/api/v1/dealers?${new URLSearchParams({near:t}).toString()}`:"/api/v1/dealers"}async function Yr(e){return xe(await c(_n(e)))}var _={audience:null,baseUrl:""};async function Zr(e,t){return ve(await c(Ie(e,t),_))}async function Vr(e){return Be(await c(Fe,{..._,method:"POST",body:JSON.stringify(e)}))}async function jr(e){try{let t=await c($e,{..._,method:"POST",body:JSON.stringify({token:e})});return Q(202,t)}catch(t){if(t instanceof S)return Q(t.status,t.data);throw t}}async function Qr(e,t){await c(Me,{..._,method:"POST",body:JSON.stringify({email:t.trim(),...e?{product:e}:{}})})}async function Xr(e,t){await c(We,{..._,method:"POST",body:JSON.stringify({email:t.trim(),...e?{product:e}:{}})})}async function zr(e){try{return Ke(await c(qe,{..._,method:"POST",body:JSON.stringify({token:e})}))}catch(t){if(t instanceof S&&Cn.has(t.status))return"";throw t}}var Cn=new Set([400,404,410]);export{q as a,h as b,ce as c,ue as d,R as e,yt as f,Z as g,_e as h,Ce as i,$n as j,Wn as k,qn as l,Kn as m,Yn as n,Ne as o,Ue as p,er as q,tr as r,P as s,De as t,Le as u,nr as v,rr as w,ir as x,sr as y,or as z,ar as A,lr as B,cr as C,ur as D,dr as E,pr as F,mr as G,gr as H,yr as I,hr as J,fr as K,Sr as L,M,Pr as N,br as O,wr as P,Rr as Q,Kt as R,S,te as T,X as U,Lr as V,Ir as W,c as X,on as Y,dt as Z,mn as _,gn as $,yn as aa,Sn as ba,$r as ca,Wr as da,qr as ea,ne as fa,Kr as ga,Jr as ha,Yr as ia,Zr as ja,Vr as ka,jr as la,Qr as ma,Xr as na,zr as oa};
|
|
1
|
+
import{a as oe,c as D,h as ae,j as L}from"./chunk-SRHU2S3G.js";import{b as W,c as se}from"./chunk-3DDOV7FZ.js";var q="".replace(/\/+$/,"");var K="x-forwarded-for";function le(e){let t=(e??"").split(",").map(n=>n.trim()).filter(Boolean);return t.length>0?t[t.length-1]:null}var mt="x-forwarded-host";function ce(e,t,n){let r={};return e&&(r[mt]=e),t&&n==="uncached"&&(r[K]=t),r}function ue(e){if(e?.cache==="no-store"||e?.cache==="no-cache")return"uncached";if(e?.cache==="force-cache")return"data-cached";let t=e?.next?.revalidate;return typeof t=="number"&&t>0?"data-cached":"uncached"}var de="x-storefront-site",pe="x-storefront-host",me="x-storefront-preview";function h(e){return Array.isArray(e)?e:e?.results??[]}import{parseOption as Wt}from"efficient-shell/format";var gt="shop_access_token",ge="shop_refresh_token",J=null;function Y(){L.removeItem(gt),L.removeItem(ge)}var R={getAccess(){return J},takeLegacyRefresh(){let e=L.getItem(ge);return Y(),e},setTokens(e){J=e,Y()},clear(){J=null,Y()}};import{efficientClientOpen as qt}from"efficient-easel/screen/lib/session";function yt(e){return!!e.src}function C(e){let t=e.finishes.filter(yt);if(t.length===e.finishes.length)return e;let n=e.defaultFinish&&t.some(r=>r.name===e.defaultFinish)?e.defaultFinish:null;return{...e,finishes:t,defaultFinish:n}}function ht(e){return e.listable!==!1}function x(e){return e.map(C).filter(ht)}var Se=["fill","stroke","stop-color","color","flood-color","lighting-color","solid-color"],Pe=new Set(["none","transparent","currentcolor","inherit","initial","unset","context-fill","context-stroke"]),I={black:[0,0,0],white:[255,255,255],gray:[128,128,128],grey:[128,128,128],darkgray:[169,169,169],darkgrey:[169,169,169],dimgray:[105,105,105],dimgrey:[105,105,105],lightgray:[211,211,211],lightgrey:[211,211,211],gainsboro:[220,220,220],silver:[192,192,192],whitesmoke:[245,245,245]},be=12,we=/\burl\(/i,Re=new RegExp(`(?<![-\\w])(${Se.join("|")})(\\s*=\\s*)(["'])([^"']*)\\3`,"gi"),Ae=new RegExp(`((?:^|[;{\\s"'])(?:${Se.join("|")})\\s*:\\s*)([^;}"'<>]+)`,"gi"),ft=/<svg\b([^>]*)>/i,St=/\bfill\s*[=:]/i;function Pt(e){let t=e.replace(Re,(n,r,o,l,p)=>{let i=ye(p);return i===null?n:`${r}${o}${l}${i}${l}`}).replace(Ae,(n,r,o)=>{let l=ye(o);return l===null?n:`${r}${l}`});return t=t.replace(ft,(n,r)=>St.test(r)?n:`<svg fill="#ffffff"${r}>`),t}function ye(e){let t=/!important/i.test(e),n=e.replace(/!important/gi,"").trim().toLowerCase();if(!n||we.test(n)||Pe.has(n))return null;let r=n in I?[...I[n],1]:ke(n);if(!r)return null;let[o,l,p,i]=r;if(Math.max(o,l,p)-Math.min(o,l,p)>be)return null;let s=bt(255-o,255-l,255-p,i);return t?`${s} !important`:s}function bt(e,t,n,r){if(r<1)return`rgba(${e}, ${t}, ${n}, ${r})`;let o=l=>l.toString(16).padStart(2,"0");return`#${o(e)}${o(t)}${o(n)}`}function ke(e){return e.startsWith("#")?wt(e):e.startsWith("rgb")?Rt(e):e.startsWith("hsl")?kt(e):null}function wt(e){let t=e.slice(1),n=1;if(t.length===3||t.length===4)t.length===4&&(n=parseInt(t[3]+t[3],16)/255),t=t.slice(0,3).split("").map(r=>r+r).join("");else if(t.length===6||t.length===8)t.length===8&&(n=parseInt(t.slice(6,8),16)/255),t=t.slice(0,6);else return null;return/^[0-9a-f]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),n]:null}function Rt(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),o=n.split(/[\s,]+/).filter(Boolean).slice(0,3);if(o.length<3)return null;let l=o.map(i=>i.endsWith("%")?Math.round(parseFloat(i)/100*255):Math.round(parseFloat(i)));if(l.some(i=>Number.isNaN(i)))return null;let p=r?F(r):At(n);return[l[0],l[1],l[2],p]}function At(e){let t=e.split(/[\s,]+/).filter(Boolean);return t.length>=4?F(t[3]):1}function F(e){let t=e.trim().endsWith("%")?parseFloat(e)/100:parseFloat(e);return Number.isNaN(t)?1:t}function kt(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),o=n.split(/[\s,]+/).filter(Boolean);if(o.length<3)return null;let l=parseFloat(o[0]),p=parseFloat(o[1])/100,i=parseFloat(o[2])/100;if([l,p,i].some(w=>Number.isNaN(w)))return null;let s=r?F(r):o.length>=4?F(o[3]):1,[a,m,g]=Tt(l,p,i);return[a,m,g,s]}function Tt(e,t,n){let r=(1-Math.abs(2*n-1))*t,o=(e%360+360)%360/60,l=r*(1-Math.abs(o%2-1)),p=0,i=0,s=0;o<1?[p,i,s]=[r,l,0]:o<2?[p,i,s]=[l,r,0]:o<3?[p,i,s]=[0,r,l]:o<4?[p,i,s]=[0,l,r]:o<5?[p,i,s]=[l,0,r]:[p,i,s]=[r,0,l];let a=n-r/2;return[Math.round((p+a)*255),Math.round((i+a)*255),Math.round((s+a)*255)]}var he=512*1024;function Z(e){return/\.svg(\?|$)/i.test(e)}function _t(e){return`data:image/svg+xml,${encodeURIComponent(Pt(e))}`}function Ct(e){let t=e.replace(/!important/gi,"").trim().toLowerCase();if(!t||we.test(t)||Pe.has(t))return null;let n=t in I?[...I[t],1]:ke(t);if(!n)return null;let[r,o,l]=n;return Math.max(r,o,l)-Math.min(r,o,l)>be?null:(.2126*r+.7152*o+.0722*l)/255}function xt(e){let t=[],n=r=>{let o=Ct(r);o!==null&&t.push(o)};for(let r of e.matchAll(Re))n(r[4]);for(let r of e.matchAll(Ae))n(r[2]);return t.length?t.reduce((r,o)=>r+o,0)/t.length<.5:null}var fe=/^(?:\uFEFF|\s+|<\?xml[^>]*\?>|<!--[\s\S]*?-->|<!DOCTYPE\s+svg[^>[]*>)/i;function Ot(e){let t=e;for(let n=fe.exec(t);n&&n[0].length>0;n=fe.exec(t))t=t.slice(n[0].length);return/^<svg[\s>/]/i.test(t)}async function Et(e,t){if(!Z(e))return null;try{let n=await fetch(e,{signal:t,redirect:"manual"});if(!n.ok)return null;let r=Number(n.headers.get("content-length"));if(Number.isFinite(r)&&r>he)return null;let o=await n.text();return o.length>he?null:Ot(o)?o:null}catch{return null}}async function Te(e,t){let n=await Et(e,t);return n===null?null:{reversed:_t(n),inkIsDark:xt(n)}}import{currentEaselSession as Nt,setSessionBridgedSite as Bn,setSessionDocumentSite as Gn}from"efficient-easel/screen/lib/session";function _e(){return Nt().siteId()}var Ce={title:"Find a dealer",placeholder:"Postcode or suburb",search:"Search",searching:"Searching\u2026",none:"No dealers to show yet.",notFound:"We couldn't find that place. Check the postcode or suburb and search again.",tryAgain:"We couldn't look up that place just now. Please try again.",website:"Website",map:"Dealers on the map"},k=e=>typeof e=="string"?e:"",V=e=>typeof e=="number"&&Number.isFinite(e)?e:null,Ut=["found","not_found","try_again"];function Dt(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.name!="string"||!t.name?null:{id:k(t.id)||t.name,name:t.name,address:k(t.address),city:k(t.city),state:k(t.state),postcode:k(t.postcode),country:k(t.country),phone:k(t.phone),website:k(t.website),lat:V(t.lat),lng:V(t.lng),distanceKm:V(t.distanceKm)}}function xe(e){if(!e||typeof e!="object")return{near:null,dealers:[]};let t=e,n=typeof t.near=="string"&&Ut.includes(t.near)?t.near:null,r=Array.isArray(t.dealers)?t.dealers:[];return{near:n,dealers:r.map(Dt).filter(o=>o!==null)}}function $n(e){return e==="not_found"?Ce.notFound:e==="try_again"?Ce.tryAgain:null}function Wn(e){return e===null?null:e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function qn(e){return[e.city,e.state,e.postcode].filter(Boolean).join(" ")}function Kn(e){let t=e.map((a,m)=>({dealer:a,index:m})).filter(({dealer:a})=>a.lat!==null&&a.lng!==null);if(!t.length)return[];let n=t.map(({dealer:a})=>a.lat),r=t.map(({dealer:a})=>a.lng),[o,l]=[Math.min(...n),Math.max(...n)],[p,i]=[Math.min(...r),Math.max(...r)],s=(a,m,g)=>g===m?50:8+(a-m)/(g-m)*84;return t.map(({dealer:a,index:m})=>({id:a.id,index:m,left:s(a.lng,p,i),top:100-s(a.lat,o,l)}))}var Oe=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],Ee=["AED","AFN","ALL","AMD","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XCD","XCG","XOF","XPF","YER","ZAR","ZMW","ZWG"],Yn={AD:"EUR",AE:"AED",AF:"AFN",AL:"ALL",AM:"AMD",AO:"AOA",AR:"ARS",AT:"EUR",AU:"AUD",AW:"AWG",AZ:"AZN",BA:"BAM",BB:"BBD",BD:"BDT",BE:"EUR",BH:"BHD",BI:"BIF",BM:"BMD",BN:"BND",BO:"BOB",BR:"BRL",BS:"BSD",BT:"BTN",BW:"BWP",BY:"BYN",BZ:"BZD",CA:"CAD",CD:"CDF",CH:"CHE",CL:"CLF",CN:"CNY",CO:"COP",CR:"CRC",CU:"CUP",CV:"CVE",CY:"EUR",CZ:"CZK",DE:"EUR",DJ:"DJF",DK:"DKK",DO:"DOP",DZ:"DZD",EE:"EUR",EG:"EGP",ER:"ERN",ES:"EUR",ET:"ETB",FI:"EUR",FJ:"FJD",FK:"FKP",FR:"EUR",GB:"GBP",GE:"GEL",GH:"GHS",GI:"GIP",GM:"GMD",GN:"GNF",GR:"EUR",GT:"GTQ",GY:"GYD",HK:"HKD",HN:"HNL",HR:"EUR",HT:"HTG",HU:"HUF",ID:"IDR",IE:"EUR",IL:"ILS",IN:"INR",IQ:"IQD",IR:"IRR",IS:"ISK",IT:"EUR",JM:"JMD",JO:"JOD",JP:"JPY",KE:"KES",KG:"KGS",KH:"KHR",KM:"KMF",KP:"KPW",KR:"KRW",KW:"KWD",KY:"KYD",KZ:"KZT",LA:"LAK",LB:"LBP",LK:"LKR",LR:"LRD",LS:"LSL",LT:"EUR",LU:"EUR",LV:"EUR",LY:"LYD",MA:"MAD",MC:"EUR",MD:"MDL",ME:"EUR",MG:"MGA",MK:"MKD",MM:"MMK",MN:"MNT",MO:"MOP",MR:"MRU",MT:"EUR",MU:"MUR",MV:"MVR",MW:"MWK",MX:"MXN",MY:"MYR",MZ:"MZN",NA:"NAD",NG:"NGN",NI:"NIO",NL:"EUR",NO:"NOK",NP:"NPR",NZ:"NZD",OM:"OMR",PA:"PAB",PE:"PEN",PG:"PGK",PH:"PHP",PK:"PKR",PL:"PLN",PT:"EUR",PY:"PYG",QA:"QAR",RO:"RON",RS:"RSD",RU:"RUB",RW:"RWF",SA:"SAR",SB:"SBD",SC:"SCR",SD:"SDG",SE:"SEK",SG:"SGD",SH:"SHP",SI:"EUR",SK:"EUR",SL:"SLE",SM:"EUR",SO:"SOS",SR:"SRD",SS:"SSP",ST:"STN",SV:"SVC",SY:"SYP",SZ:"SZL",TH:"THB",TJ:"TJS",TM:"TMT",TN:"TND",TO:"TOP",TR:"TRY",TT:"TTD",TW:"TWD",TZ:"TZS",UA:"UAH",UG:"UGX",US:"USD",UY:"UYI",UZ:"UZS",VA:"EUR",VE:"VED",VN:"VND",VU:"VUV",WS:"WST",YE:"YER",ZA:"ZAR",ZM:"ZMW",ZW:"ZWG"};import{formatDateTime as It}from"efficient-shell/format";import{knownZone as Lt}from"efficient-shell/format";var Ne=()=>new Intl.DateTimeFormat().resolvedOptions().locale;function Ue(...e){return e.find(Lt)??""}var er={firstName:"",lastName:"",email:"",company:"",slug:"",country:"",currency:""},Ft=["slug_malformed","slug_reserved","slug_taken"],j=e=>typeof e=="string"&&Ft.includes(e),tr=400,P={title:"Create your {name} workspace",freeLine:"Free to start. No card needed.",firstName:"First name",lastName:"Last name",email:"Work email",company:"Company name",address:"Workspace address",country:"Country",currency:"Currency",countryHint:"Your shop sells in this currency. The country sets its tax and shipping defaults. Both can be changed later.",checking:"Checking",available:"Available",submit:"Create workspace",sending:"Sending\u2026",agree:"By creating a workspace you agree to the {terms} and {privacy}.",terms:"Terms",privacy:"Privacy Policy",haveOne:"Already have a workspace?",find:"Find my workspace",required:"Fill this in.",companyShort:"Use at least 2 characters.",emailWrong:"Enter an email address, like name@company.com.",notOffered:"That choice is not offered. Pick another.",wrong:"Check this and try again.",slugProblem:{slug_malformed:"Use 3 to 30 lower-case letters, digits or single hyphens, starting with a letter.",slug_reserved:"That address is kept for the platform. Choose another.",slug_taken:"That address is taken. Choose another."},trouble:{closed:"Signing up is closed just now.",dailyLimit:"Too many workspaces signed up today. Try again tomorrow.",unavailable:"Signing up is not available just now. Try again later.",tooMany:"You have asked a few times in a row. Wait a minute, then try again.",unreachable:"We couldn't reach the server. Check your connection and try again.",failed:"Something went wrong and nothing was sent. Try again."},closedTitle:"Signing up is closed just now",closedBody:"New {name} workspaces cannot be made just now.",closedLeave:"Leave your email and we'll tell you when it opens.",tellMe:"Tell me when it opens",waitingDone:"Thanks. We'll email {email} when sign-up opens.",sentTitle:"Check your email",sentBody:"We sent a link to {email}. Open it to set up {company}.",sentUntil:"The link works once, until {when}. Asking again sends a new link, and the old one stops working.",sendAgain:"Send it again",sendingAgain:"Sending\u2026",sentAgain:"A new link is on its way. The old one no longer works.",change:"Change the details"};function De(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>t[r]??n)}function Le(e){return e.trim().toLowerCase().replace(/_/g,"-")}function nr(e){return e.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-").replace(/^[^a-z]+/,"").slice(0,30).replace(/-+$/,"")}function rr(e,t){let n=(e??"").trim().toLowerCase().replace(/^\.+/,"").replace(/\.+$/,"");if(n)return`.${n}`;let r=t.toLowerCase().replace(/\.$/,"").replace(/^www\./,"");return r?`.${r}`:""}var A=e=>typeof e=="string"?e:"";function Ie(e,t){let n=new URLSearchParams;t&&n.set("slug",t),e&&n.set("product",e);let r=n.toString();return`/api/business-sign-ups/availability/${r?`?${r}`:""}`}var Fe="/api/business-sign-ups/",Me="/api/business-sign-ups/waiting-list/";function ir(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return n.code==="sign_up_open"?{open:!0,email:null,trouble:null}:n.code==="sign_up_waiting_list_unavailable"?{open:!1,email:null,trouble:"unavailable"}:e===400&&"email"in n?{open:!1,email:P.emailWrong,trouble:null}:e===0?{open:!1,email:null,trouble:"unreachable"}:e===429?{open:!1,email:null,trouble:"tooMany"}:{open:!1,email:null,trouble:"failed"}}function sr(e){let t=e.trim();return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?null:P.emailWrong:P.required}function ve(e){let t=e&&typeof e=="object"?e:{};return{open:t.open===!0,country:A(t.country),currency:A(t.currency),slugAvailable:typeof t.slug_available=="boolean"?t.slug_available:null,slugProblem:j(t.slug_problem)?t.slug_problem:null}}function or(e){return e.slugAvailable?{state:"available"}:e.slugProblem?{state:"problem",problem:e.slugProblem}:{state:"unknown"}}function Be(e){let t=e&&typeof e=="object"?e:{};return{slug:A(t.slug),expiresAt:A(t.expires_at)}}function ar(e,t,n){return{business_name:e.company.trim(),slug:Le(e.slug),first_name:e.firstName.trim(),last_name:e.lastName.trim(),email:e.email.trim(),...t?{product:t}:{},...n&&e.country?{country:e.country}:{},...n&&e.currency?{currency:e.currency}:{}}}function lr(e,t){let n={};e.firstName.trim()||(n.firstName=P.required);let r=e.email.trim();r?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(n.email=P.emailWrong):n.email=P.required;let o=e.company.trim();return o?o.length<2&&(n.company=P.companyShort):n.company=P.required,Le(e.slug)?t.state==="problem"&&(n.slug=P.slugProblem[t.problem]):n.slug=P.required,n}var Mt={business_name:"company",slug:"slug",first_name:"firstName",last_name:"lastName",email:"email",country:"country",currency:"currency"},v={self_sign_up_off:"closed",sign_up_daily_limit:"dailyLimit",sign_up_unavailable:"unavailable",sign_up_plan_missing:"unavailable"};function cr(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=n.code;if(j(r))return{fields:{slug:P.slugProblem[r]},trouble:null};if(typeof r=="string"&&v[r])return{fields:{},trouble:v[r]};if(e===0)return{fields:{},trouble:"unreachable"};if(e===429)return{fields:{},trouble:"tooMany"};if(e===400){let o={};for(let l of Object.keys(n)){let p=Mt[l];p&&(o[p]=p==="slug"?P.slugProblem.slug_malformed:p==="email"?P.emailWrong:p==="country"||p==="currency"?P.notOffered:P.wrong)}if(Object.keys(o).length)return{fields:o,trouble:null}}return{fields:{},trouble:"failed"}}function Ge(e,t){try{let n=new Intl.DisplayNames(t?[t]:void 0,{type:e,fallback:"code"});return r=>n.of(r)??r}catch{return n=>n}}var He=(e,t)=>t&&!e.includes(t)?[...e,t]:[...e],vt=(e,t)=>{let n=new Intl.Collator(t);return e.sort((r,o)=>n.compare(r.label,o.label))};function ur(e,t){let n=Ge("region",t);return vt(He(Oe,e).map(r=>({value:r,label:n(r)})),t)}function dr(e,t){let n=Ge("currency",t);return He(Ee,e).sort().map(r=>{let o=n(r);return{value:r,label:o===r?r:`${r} \xB7 ${o}`}})}function pr(e,t,n){let r=Ue(n??"");return!e||Number.isNaN(new Date(e).getTime())||!r?"":It(e,{locale:t||Ne(),timeZone:r,style:Bt})}var Bt={weekday:"long",day:"numeric",month:"long"},Gt=/^\/sign-up\/verify\/([^/?#]+)\/?$/;function mr(e){let t=Gt.exec(e??"");if(!t)return"";try{return decodeURIComponent(t[1])}catch{return t[1]}}var $e="/api/business-sign-ups/verifications/",Ht=["pending","provisioning","ready","failed"];function Q(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=A(n.code),o=A(n.slug);if(e===202||r==="sign_up_already_verified"){let l=A(n.provisioning_status),p=A(n.business_name);return Ht.includes(l)?l==="ready"?{kind:"ready",company:p,slug:o}:l==="failed"?{kind:"failed",company:p,slug:o}:{kind:"building",company:p,slug:o,status:l}:{kind:"gone"}}return j(r)?{kind:"taken",slug:o}:r==="sign_up_daily_limit"?{kind:"dailyLimit"}:r==="self_sign_up_off"?{kind:"closed"}:r&&v[r]?{kind:"trouble",trouble:v[r]}:e===400&&"token"in n?{kind:"gone"}:e===0?{kind:"trouble",trouble:"unreachable"}:e===429?{kind:"trouble",trouble:"tooMany"}:{kind:"trouble",trouble:"failed"}}function gr(e){return e.kind==="building"||e.kind==="trouble"&&e.trouble!=="failed"}function yr(e){return e<5?2e3:e<20?5e3:15e3}var hr=40;function fr(e,t,n){let r=e.kind==="failed"?"stopped":"running";return[{words:M.confirmed,at:"done"},{words:De(M.reserved,{address:`${e.slug}${n}`}),at:"done"},{words:M.building,at:r},...e.kind==="failed"?[]:[{words:De(M.adding,{name:t}),at:"waiting"}]]}var Sr=e=>e==="pending"?50:75,M={settingUp:"Setting up {company}",confirmed:"Email confirmed",reserved:"Address reserved: {address}",building:"Building your workspace",adding:"Adding {name}",aboutTen:"This takes about 10 seconds. You can close this page: we'll email you when it's ready.",readyTitle:"Your workspace is ready",workspace:"Workspace",address:"Address",plan:"Plan",planName:"{name} Free",readyNext:"We've emailed you a link to set your password. It's the next step.",failedBody:"We couldn't finish building your workspace. We've been told, and we'll email you when it's ready. You don't need to sign up again.",goneTitle:"This link has run out",goneBody:"This link is not right, or it has run out. Sign up again and we'll send a new one.",again:"Sign up again",takenTitle:"That address has gone",takenBody:"{address} was taken before you opened your link. Choose another address and we'll send a new link.",takenBodyBare:"That address was taken before you opened your link. Choose another address and we'll send a new link.",chooseAnother:"Choose another address",limitTitle:"Not today",limitNext:"Your link still works until it runs out. Open it again tomorrow.",checking:"Checking your link",troubleTitle:"We couldn't check your link",troubleFailed:"Something went wrong on our side. Your link still works, so nothing is lost.",tryAgain:"Try again"},We="/api/business-sign-ups/workspace-finds/",qe="/api/business-sign-ups/workspace-finds/openings/",$t=/^\/find\/([^/?#]+)\/?$/;function Pr(e){let t=$t.exec(e??"");if(!t)return"";try{return decodeURIComponent(t[1])}catch{return t[1]}}var br={title:"Find your workspace",intro:"Enter your work email. We'll send you the address of every workspace you belong to.",submit:"Email me my workspaces",newHere:"New to {name}?",create:"Create a workspace",sentTitle:"Check your email",sentBody:"If {email} belongs to a workspace, the links are on their way.",sentNote:"They work for 30 minutes. Nothing arrives if the address isn't in any workspace.",another:"Use another email",linkGone:"This link is not right, or it has run out. Ask for your workspaces again.",opening:"Opening your workspace",openFailed:"We couldn't open your workspace just now. Your link still works \u2014 try again.",retry:"Try again"};function wr(e){return e===0?"unreachable":e===429?"tooMany":"failed"}function Rr(e,t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return n.code==="workspace_find_unavailable"?{email:null,trouble:"unavailable"}:e===400&&"email"in n?{email:P.emailWrong,trouble:null}:e===0?{email:null,trouble:"unreachable"}:e===429?{email:null,trouble:"tooMany"}:{email:null,trouble:"failed"}}function Ke(e){let t=e&&typeof e=="object"?A(e.sign_in_url):"";return/^https?:\/\/[^\s]+$/i.test(t)?t:""}var Kt="",S=class extends Error{constructor(t,n,r){super(n),this.status=t,this.data=r}},te="Unable to reach the server. This could be a problem with your internet connection, or the server may be undergoing maintenance or an upgrade. Please try again shortly.",Jt=new Set([502,503,504]),X=0,Yt="This editor runs on its host's own backend, which does not serve this request.",Zt=5e3,Vt=15e3,jt=()=>typeof window>"u"?Zt:Vt;function it(e){let t=(e.method??"GET").toUpperCase();if(!(e.body!=null||t!=="GET"&&t!=="HEAD")&&!(e.audience!=null&&e.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(jt())}var Je=e=>e instanceof Error&&e.name==="TimeoutError",Ye=(e,t)=>Jt.has(e)?te:t,Qt=["admin","venue"],st="admin";function Lr(e){st=Wt(Qt,"admin",e)}function Xt(){return st}var zt=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/,ot=null;function Ir(e){ot=e&&zt.test(e)?e:null}function en(){return ot}function tn(e){if(typeof window>"u"||!e.startsWith("/api/v1/"))return e;let t=W();return!t||/[?&]site=/.test(e)?e:$(e,`site=${encodeURIComponent(t)}`)}async function c(e,t={}){let{token:n,baseUrl:r,headers:o,audience:l,...p}=t;if(typeof window<"u"&&!qt())throw new S(X,Yt,null);if(typeof window>"u"&&r===void 0)throw new Error(`apiFetch(${JSON.stringify(e)}) ran on the server without an explicit baseUrl. The API_URL default it would inherit is browser-only (the prod image bakes NEXT_PUBLIC_API_URL="" for same-origin use, which a Node fetch cannot resolve). Pass a base explicitly: \`await backendOpts()\` (or baseUrl: PRODUCT_FETCH_BASE) for product reads, or the server-only PRODUCT_BACKEND_URL env for other backend surfaces.`);let i=typeof FormData<"u"&&p.body instanceof FormData,s;try{s=await fetch(`${r??Kt}${tn(e)}`,{...p,headers:{...i?{}:{"Content-Type":"application/json"},...n?{Authorization:`Bearer ${n}`}:{},...l===null?{}:{"X-Portal-Audience":l??"shop"},...o},signal:p.signal??it({...p,audience:l})})}catch(g){throw g instanceof TypeError||Je(g)?new S(X,te,null):g}let a;try{a=await s.text()}catch(g){throw Je(g)?new S(X,te,null):g}let m=null;if(a)try{m=JSON.parse(a)}catch{throw new S(s.status,s.ok?"Expected JSON but received a non-JSON response":Ye(s.status,s.statusText),a)}if(!s.ok){let g=(m&&typeof m=="object"&&"detail"in m&&typeof m.detail=="string"?m.detail:null)??Ye(s.status,s.statusText);throw new S(s.status,g,m)}return m}var O=null;async function at(){return O||(O=nn().finally(()=>{O=null}),O)}async function nn(){let e=R.takeLegacyRefresh(),t=await on.refresh(e??void 0);return R.setTokens(t.access),t.access}async function lt(){return R.getAccess()??at()}async function f(e,t={}){let n;try{n=await lt()}catch{throw R.clear(),new S(401,"Not signed in",null)}try{return await c(e,{...t,token:n})}catch(r){if(!(r instanceof S)||r.status!==401)throw r;try{let o=await at();return await c(e,{...t,token:o})}catch{throw R.clear(),r}}}var rn=100,Ze=20;function sn(e){if(!e)return null;try{return new URL(e,"http://page.invalid").searchParams.get("page")}catch{return null}}async function Ve(e,t){let[n,r=""]=e.split("?"),o=[],l="1";for(let p=0;p<Ze&&l;p++){let i=new URLSearchParams(r);i.set("page_size",String(rn)),l!=="1"&&i.set("page",l);let s=await f(`${n}?${i.toString()}`);o.push(...h(s)),l=sn(s.next)}return l&&console.warn(`[${t}] stopped at ${Ze} pages (${o.length} rows); list may be truncated`),o}async function je(e,t={}){if(R.getAccess())try{return{data:await f(e,t),asShopper:!0}}catch(n){if(!(n instanceof S)||n.status!==401)throw n}return{data:await c(e,t),asShopper:!1}}async function Qe(){let e=await f("/api/auth/me/");if(e.portal!=="shop")throw R.clear(),new S(403,"This session is not valid for this shop.",null);return e}var on={login:(e,t)=>c("/api/auth/login/",{method:"POST",body:JSON.stringify({email:e,password:t,portal:"shop"}),credentials:"include"}),refresh:e=>c("/api/auth/refresh/",{method:"POST",body:JSON.stringify(e?{refresh:e,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{R.clear();try{await c("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{let e=await lt();return await Qe(),e},me:Qe,updateMe:e=>f("/api/auth/me/",{method:"PATCH",body:JSON.stringify(e)}),changePassword:(e,t)=>f("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:t,old_password:e})}),changeEmail:(e,t)=>f("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:e,current_password:t})}),myProfile:()=>f("/api/shop-portal/profile/"),updateMyProfile:e=>f("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(e)}),myAddresses:()=>f("/api/shop-portal/delivery-locations/"),createAddress:e=>f("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(e)}),updateAddress:(e,t)=>f(`/api/shop-portal/delivery-locations/${e}/`,{method:"PATCH",body:JSON.stringify(t)}),deleteAddress:e=>f(`/api/shop-portal/delivery-locations/${e}/`,{method:"DELETE"}),passwordResetRequest:e=>c("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:e})}),passwordResetConfirm:(e,t,n)=>c("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:e,token:t,new_password:n})}),brands:()=>f("/api/products/brands/"),myOrders:()=>Ve("/api/shop-portal/orders/","api.myOrders"),myOrder:e=>f(`/api/shop-portal/orders/${e}/`),cancelOrder:e=>f(`/api/shop-portal/orders/${e}/cancel/`,{method:"POST"}),myReturns:e=>Ve(`/api/shop-portal/returns/${e?`?order=${encodeURIComponent(e)}`:""}`,"api.myReturns"),createReturn:e=>f("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(e)}),withdrawReturn:e=>f(`/api/shop-portal/returns/${e}/cancel/`,{method:"POST"}),uploadReturnPhoto:(e,t)=>{let n=new FormData;return n.append("claim_item",e),n.append("file",t),n.append("media_type",t.type.startsWith("video/")?"video":"image"),f("/api/shop-portal/return-media/",{method:"POST",body:n})}};function b(e){if(typeof e=="string")return e.startsWith("/media/")?oe(e):e;if(Array.isArray(e))return e.map(b);if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=n==="captions"&&r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).map(([o,l])=>[b(o),l])):b(r);return t}return e}var ct=typeof window>"u"&&q!=="",an=ct?q:"",ln=se,T=()=>({baseUrl:ln(),audience:null});function u(e,t){let n=t?`?process=${encodeURIComponent(t)}`:"";return`/api/v1${e}${n}`}var ut=100,Xe=50;function ie(e,t,n){let r=new URLSearchParams;for(let[o,l]of Object.entries(t))l!=null&&l!==""&&r.set(o,String(l));return r.set("pageSize",String(ut)),n&&r.set("cursor",n),`/api/v1${e}?${r.toString()}`}function cn(e,t){return ie("/wheels",{process:e},t)}var ze=ut;function un(e,t){return ie("/wheels",{slug:e.join(",")},t)}function dn(e,t,n){return ie("/products",{kind:e.join(","),make:t?.make,model:t?.model,year:t?.year,modification:t?.modification},n)}function pn(e){if(!e)return null;try{return new URL(e,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function z(e,t,n=()=>!1,r=()=>!1){let o=[],l=null;try{for(let p=0;p<Xe;p++){let i=await c(await t(l),await d());if(o.push(...h(i)),l=pn(i.next),!l)break;if(r(o))return o}l&&console.warn(`[${e}] stopped at ${Xe} pages (${o.length} rows); catalog may be truncated`)}catch(p){if(n(p))throw p;console.warn(`[${e}] product API unavailable, returning []`,p)}return o}var et=e=>e instanceof S&&e.status===400;function tt(e){return e.flatMap(t=>t.kind==="alloy-wheel"?x([t]):[t])}async function dt(){return(await mn()).host}async function mn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js"),t=await e(),n=l=>l?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,r=n(t.get(pe)??t.get("x-forwarded-host")??t.get("host")),o=n(t.get("host"));return{host:r,matchesRequestHost:r!==null&&r===o}}catch{return{host:null,matchesRequestHost:!1}}}async function gn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return le((await e()).get(K))}catch{return null}}async function yn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(de)||null}catch{return null}}async function hn(){let e=await yn();if(e)return`site=${encodeURIComponent(e)}`;let t=await dt();return t?`host=${encodeURIComponent(t)}`:""}async function y(e){if(typeof window<"u"){let t=W();return t?$(e,`site=${encodeURIComponent(t)}`):e}return $(e,await hn())}function $(e,t){return t?`${e}${e.includes("?")?"&":"?"}${t}`:e}var fn="preview";async function Sn(){if(typeof window<"u")return null;try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get(me)}catch{return null}}async function Pn(){try{let{headers:e}=await import("./headers-UYHEZDAT.js");return(await e()).get("user-agent")}catch{return null}}async function ee(e,t){let n=await Sn();if(n===null)return[await y(e),await d(t)];let r=$(await y(e),`${fn}=${encodeURIComponent(n)}`),{next:o,cache:l,...p}=t??{},i=await d({...p,cache:"no-store"}),s=await Pn();return s&&(i.headers={...i.headers,"user-agent":s}),[r,i]}async function bn(e){if(!ct)return;let[t,n]=await Promise.all([dt(),gn()]),r=ce(t,n,e);return Object.keys(r).length>0?r:void 0}async function d(e){let t=await bn(ue(e)),n={baseUrl:an,...e};return t&&(n.headers={...t,...e?.headers}),n}var E=typeof window>"u";function N(e,t){let n=new URLSearchParams;for(let[o,l]of Object.entries(t))l!==void 0&&l!==""&&n.set(o,String(l));let r=n.toString();return`/api/v1/fitment${e}${r?`?${r}`:""}`}var $r={listMakes:async e=>{if(E){let{fitmentData:n}=await import("./fitment-data-ANJWNG4T.js");return n.makes(e)}let t=await c(N("/makes",{region:e}),T());return h(t)},listModels:async(e,t)=>{if(E){let{fitmentData:r}=await import("./fitment-data-ANJWNG4T.js");return r.models(e,t)}let n=await c(N("/models",{make:e,region:t}),T());return h(n)},listYears:async(e,t,n)=>{if(E){let{fitmentData:o}=await import("./fitment-data-ANJWNG4T.js");return o.years(e,t,n)}let r=await c(N("/years",{make:e,model:t,region:n}),T());return h(r)},listModifications:async(e,t,n,r)=>{if(E){let{fitmentData:l}=await import("./fitment-data-ANJWNG4T.js");return l.modifications(e,t,n,r)}let o=await c(N("/modifications",{make:e,model:t,year:n,region:r}),T());return h(o)},getStockFitment:async(e,t,n,r,o)=>{if(E){let{fitmentData:l}=await import("./fitment-data-ANJWNG4T.js");return l.stockFitment(e,t,n,r,o)}return c(N("/stock-fitment",{make:e,model:t,year:n,modification:r,region:o}),T())}},Wr={listWheels:async(e,t={})=>{let n=await z("products.listWheels",async r=>await y(cn(e,r)),t.throwOnFailure?()=>!0:void 0,t.maxRows===void 0?void 0:r=>x([...r]).length>=t.maxRows);return x(b(n))},listWheelsBySlug:async(e,t={})=>{let n=[...new Set(e.map(i=>i.trim()).filter(Boolean))];if(n.length===0)return[];let r=[];for(let i=0;i<n.length;i+=ze)r.push(n.slice(i,i+ze));let o=await Promise.all(r.map(i=>z("products.listWheelsBySlug",async s=>await y(un(i,s)),t.throwOnFailure?()=>!0:et))),l=new Set(n),p=o.flat().filter(i=>l.has(i.slug));return x(b(p))},listCatalog:async(e,t,n={})=>{if(e.length===0)throw new Error("products.listCatalog() needs at least one kind. An empty list would omit `kind`, which the contract reads as `alloy-wheel` \u2014 so the call would silently return the wheel catalog instead of nothing.");let r=await z("products.listCatalog",async o=>await y(dn(e,t,o)),n.throwOnFailure?()=>!0:et,n.maxRows===void 0?void 0:o=>tt([...o]).length>=n.maxRows);return tt(b(r))},getWheel:async e=>C(b(await c(await y(u(`/wheels/${e}`)),await d()))),getTyre:async e=>b(await c(await y(u(`/tyres/${e}`)),await d())),listBundles:async(e={})=>{try{return await c(await y(u("/bundles")),await d())}catch(t){if(e.throwOnFailure)throw t;return[]}},getBundle:async e=>c(await y(u(`/bundles/${e}`)),await d()),listGalleryBuilds:async(e={})=>{let{process:t=null,wheelSlug:n=null}=e;if(typeof window>"u"){let{listGalleryBuilds:r}=await import("./gallery-builds-data-TD3QJK7L.js");return b(r(t,n))}try{let r=new URLSearchParams;t&&r.set("process",t),n&&r.set("wheelSlug",n);let o=r.toString(),l=await c(`/api/v1/gallery-builds${o?`?${o}`:""}`,T());return b(h(l))}catch(r){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",r),[]}},getSite:async()=>c(await y(u("/site")),await d()),getSiteBySlug:async e=>c(`${u("/site")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await d():void 0),listPages:async()=>b(await c(await y(u("/pages")),await d())),listPopups:async()=>c(await y(u("/popups")),await d()),listProductTemplates:async()=>{try{return await c(await y(u("/product-templates")),await d())}catch(e){return console.warn("[products.listProductTemplates] unavailable, returning []",e),[]}},listDynamicPages:async e=>{let t=e?`?recordType=${encodeURIComponent(e)}`:"";try{return await c(await y(`${u("/dynamic-pages")}${t}`),await d())}catch(n){if(n instanceof S&&n.status===404)return[];throw n}},getRecord:async(e,t)=>{try{return await c(await y(u(`/records/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)),await d())}catch(n){if(n instanceof S&&n.status===404)return null;throw n}},listRecordKeys:async e=>{try{let t=await c(await y(u(`/records/${encodeURIComponent(e)}`)),await d({cache:"no-store"}));return Array.isArray(t?.keys)?t.keys.filter(n=>typeof n=="string"&&n!==""):[]}catch(t){if(t instanceof S&&t.status===404)return[];throw t}},listProductTypeChoices:async()=>{try{return await c(await y(u("/product-type-choices")),await d())}catch(e){return console.warn("[products.listProductTypeChoices] unavailable, returning []",e),[]}},listFieldUsage:async()=>{try{return await c(await y(u("/field-usage")),await d())}catch(e){return console.warn("[products.listFieldUsage] unavailable, returning []",e),[]}},getPage:async(e,t={})=>{let n=t.record?`?record=${encodeURIComponent(t.record)}`:"",[r,o]=await ee(u(`/pages/${e}`)+n,t.revalidate!==void 0?{next:{revalidate:t.revalidate}}:void 0);return b(await c(r,o))},listBlogPosts:async(e={},{throwOnFailure:t=!1}={})=>{let n=e.category?`?category=${encodeURIComponent(e.category)}`:"";try{return(await c(u("/blog-posts")+n,await d())).map(o=>({...o,coverImage:D(o.coverImage)??""}))}catch(r){if(t)throw r;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",r),[]}},getBlogPost:async e=>{let t=await c(u(`/blog-posts/${e}`),await d());return{...t,coverImage:D(t.coverImage)??""}},createOrder:async e=>c(u("/orders"),await d({method:"POST",body:JSON.stringify(e)})),createOrderAuthed:async e=>f(u("/orders"),await d({method:"POST",body:JSON.stringify(e)})),lookupOrder:async e=>c(u("/orders/lookup"),await d({method:"POST",body:JSON.stringify(e)})),createPaymentIntent:async e=>c(u("/payments/intent"),await d({method:"POST",body:JSON.stringify(e)})),releaseCheckout:async e=>c(u("/checkouts/release"),await d({method:"POST",body:JSON.stringify(e)})),createPaypalOrder:async e=>c(u("/payments/paypal/order"),await d({method:"POST",body:JSON.stringify(e)})),capturePaypalOrder:async e=>c(u("/payments/paypal/capture"),await d({method:"POST",body:JSON.stringify(e)})),createAfterpayCheckout:async e=>c(u("/payments/afterpay/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureAfterpayPayment:async e=>c(u("/payments/afterpay/capture"),await d({method:"POST",body:JSON.stringify(e)})),chargeSquare:async e=>c(u("/payments/square/charge"),await d({method:"POST",body:JSON.stringify(e)})),createGocardlessBillingRequest:async e=>c(u("/payments/gocardless/billing-request"),await d({method:"POST",body:JSON.stringify(e)})),completeGocardlessPayment:async e=>c(u("/payments/gocardless/complete"),await d({method:"POST",body:JSON.stringify(e)})),createZipCheckout:async e=>c(u("/payments/zip/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureZipPayment:async e=>c(u("/payments/zip/capture"),await d({method:"POST",body:JSON.stringify(e)})),createKlarnaCheckout:async e=>c(u("/payments/klarna/checkout"),await d({method:"POST",body:JSON.stringify(e)})),captureKlarnaPayment:async e=>c(u("/payments/klarna/capture"),await d({method:"POST",body:JSON.stringify(e)})),createStockAlert:async e=>c(u("/stock-alerts"),await d({method:"POST",body:JSON.stringify(e)})),createPreOrderIntent:async e=>c(u("/pre-order-intents"),await d({method:"POST",body:JSON.stringify(e)})),createNewsletterSubscription:async e=>c(u("/newsletter-subscriptions"),await d({method:"POST",body:JSON.stringify(e)})),unsubscribeNewsletter:async e=>c(u("/newsletter-unsubscribe"),await d({method:"POST",body:JSON.stringify(e)})),captureCart:async e=>c(u("/carts"),await d({method:"POST",body:JSON.stringify(e)})),restoreCart:async e=>c(u("/carts/restore"),await d({method:"POST",body:JSON.stringify(e)})),unsubscribeCartReminders:async e=>c(u("/carts/unsubscribe"),await d({method:"POST",body:JSON.stringify(e)})),listReviews:async(e={})=>{let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.designCode&&t.set("designCode",e.designCode);let n=u("/reviews"),r=t.toString();try{return await c(await y(r?`${n}?${r}`:n),await d())}catch(o){return console.warn("[products.listReviews] product API unavailable, returning []",o),[]}},submitReview:async e=>c(u("/reviews"),await d({method:"POST",body:JSON.stringify(e)})),getForm:async e=>c(u(`/forms/${encodeURIComponent(e)}`),await d()),submitForm:async(e,t)=>c(u(`/forms/${encodeURIComponent(e)}/submissions`),await d({method:"POST",body:JSON.stringify(t)})),listShippingMethods:async()=>{try{return await c(u("/shipping-methods"),await d())}catch(e){return console.warn("[products.listShippingMethods] product API unavailable, returning []",e),[]}},listCountrySubdivisions:async e=>{try{return await c(u(`/countries/${encodeURIComponent(e)}/subdivisions`),await d())}catch(t){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",t),[]}},quoteCart:async e=>{let t=u("/cart/quote"),n=await d({method:"POST",body:JSON.stringify(e)});return e.couponCode?(await je(t,n)).data:c(t,n)},validateCoupon:async e=>{let{data:t,asShopper:n}=await je(u("/coupons/validate"),await d({method:"POST",body:JSON.stringify(e)}));return{...t,askedAsShopper:n}},getHeaderSettings:async()=>{let e=it({method:"GET"}),t=await c(...await ee(u("/header-settings"),{signal:e})),n=D(t.logoUrl),r=null,o=null;if(n&&Z(n)){let l=await Te(n,e);l&&(r=l.reversed,o=l.inkIsDark)}return{...t,logoUrl:n,logoReversed:r,logoInkIsDark:o}},getThemeSettings:async()=>c(...await ee(u("/theme-settings"))),getChatSettings:async()=>c(await y(u("/chat-settings")),await d())},qr={listServices:async()=>{try{return await c(u("/bookings/services"),await d())}catch(e){return console.warn("[bookings.listServices] API unavailable, returning []",e),{results:[],currency:"USD"}}},getAvailability:async(e,t)=>c(u(`/bookings/availability?service=${encodeURIComponent(e)}&date=${t}`),await d()),create:async e=>c(u("/bookings"),await d({method:"POST",body:JSON.stringify(e)})),get:async e=>c(u(`/bookings/manage/${encodeURIComponent(e)}`),await d()),cancel:async e=>c(u(`/bookings/manage/${encodeURIComponent(e)}/cancel`),await d({method:"POST"})),reschedule:async(e,t)=>c(u(`/bookings/manage/${encodeURIComponent(e)}/reschedule`),await d({method:"POST",body:JSON.stringify({startAt:t})})),createPaymentIntent:async e=>c(u("/bookings/payments/intent"),await d({method:"POST",body:JSON.stringify({manageToken:e})}))},ne=class extends Error{constructor(n,r){super(`Slug "${n}" exists on ${r} websites; a site is required to pick one.`);this.slug=n;this.count=r;this.name="AmbiguousPageSlugError"}},B=(e,t,n)=>{let r=new URLSearchParams({...t?{site:t}:{},...n?{draft:"1"}:{}}).toString();return`/api/storefront/${e}/${r?`?${r}`:""}`},H=e=>`/api/storefront/sites/${encodeURIComponent(e)}/`,wn=e=>`${H(e)}currencies/`,Rn="/api/storefront/media/ingest/",re=class extends Error{constructor(){super("This editor is not connected to a website, so an upload has nowhere to go. Open the page from the website the file should belong to, then try again."),this.name="MediaUploadDestinationError"}};function An(){let e=_e();if(!e)throw new re;return`${Rn}?${new URLSearchParams({site:e})}`}var kn="X-Puck-Media-Manifest",nt=ae.contentHash,G={"X-Media-Manifest":nt,[kn]:nt},Kr=pt({});function pt(e){return(t,n={})=>{let r=en(),o=e.headers||r?{...r?{"Accept-Language":r}:{},...e.headers,...n.headers}:void 0;return c(t,{...n,...e.baseUrl!==void 0?{baseUrl:e.baseUrl}:{},...o?{headers:o}:{},audience:e.audience??Xt()})}}function Tn(e={}){let t=pt(e),n=e.siteDrafts===!0,r=i=>B("header-settings",i,n),o=i=>B("theme-settings",i,n),l=i=>B("chat-settings",i,n),p=i=>B("social-settings",i,n);return{findPageBySlug:async(i,s,a)=>{let m=new URLSearchParams({slug:i});a&&m.set("site",a);let g=await t(`/api/storefront/pages/?${m.toString()}`,{token:s}),w=h(g);if(!a&&w.length>1)throw new ne(i,w.length);return w[0]??null},getPageById:(i,s)=>t(`/api/storefront/pages/${i}/`,{token:s}),saveLayout:(i,s,a,m,g)=>t(`/api/storefront/pages/${i}/`,{method:"PATCH",body:JSON.stringify({layout:s,expected_updated_at:m,...g?{client_id:g}:{}}),token:a}),duplicatePage:(i,s,a)=>t(`/api/storefront/pages/${i}/duplicate/`,{method:"POST",body:JSON.stringify({title:s.title,slug:s.slug}),token:a}),geocode:(i,s,a)=>t(`/api/storefront/geocode/?${new URLSearchParams(a?{q:i,country:a}:{q:i})}`,{token:s}),listBlockSources:i=>t("/api/storefront/block-sources/",{token:i}),listRecordTypes:i=>t("/api/storefront/record-types/",{token:i}),createPagePreviewLink:(i,s)=>t(`/api/storefront/pages/${i}/preview-link/`,{method:"POST",token:s}),claimPageEditLock:(i,s,a,m=!1)=>t(`/api/storefront/pages/${i}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:a,takeover:m}),token:s}),releasePageEditLock:(i,s)=>t(`/api/storefront/pages/${i}/edit-lock/`,{method:"DELETE",token:s}),createTemplate:(i,s,a)=>t("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:i,layout:s}),headers:G,token:a}),getTemplate:(i,s)=>t(`/api/storefront/page-templates/${i}/`,{token:s}),saveTemplateLayout:(i,s,a)=>t(`/api/storefront/page-templates/${i}/`,{method:"PATCH",body:JSON.stringify({layout:s}),headers:G,token:a}),listTemplatePages:async(i,s)=>{let a=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(i)}`,{token:s});return h(a)},getPageLibrary:async i=>{let s=await t("/api/storefront/page-templates/?is_page_library=true&is_active=true",{token:i});return h(s)[0]??null},getTemplateLibrary:(i,s)=>t(`/api/storefront/pages/template-library/?site=${encodeURIComponent(i)}`,{token:s}),createPageFromTemplate:(i,s)=>t(`/api/storefront/pages/from-template/${n?"?draft=1":""}`,{method:"POST",body:JSON.stringify(i),token:s}),findTemplatePageBySlug:async(i,s,a)=>{let m=await t(`/api/storefront/template-pages/?template=${encodeURIComponent(i)}&slug=${encodeURIComponent(s)}`,{token:a});return h(m)[0]??null},createTemplatePage:(i,s,a)=>t("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:i,...s}),headers:G,token:a}),saveTemplatePageLayout:(i,s,a)=>t(`/api/storefront/template-pages/${i}/`,{method:"PATCH",body:JSON.stringify({layout:s}),headers:G,token:a}),deleteTemplatePage:(i,s,a)=>t(`/api/storefront/template-pages/${i}/`,{method:"DELETE",token:s,...a?.keepalive?{keepalive:!0}:{}}),listPages:async(i,s)=>{let a=new URLSearchParams({no_page:"true"});s&&a.set("site",s);let m=await t(`/api/storefront/pages/?${a.toString()}`,{token:i});return h(m)},createPage:(i,s,a,m)=>t("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:i,slug:s,layout:a}),token:m}),deletePage:(i,s)=>t(`/api/storefront/pages/${i}/`,{method:"DELETE",token:s}),getHeaderSettings:(i,s)=>t(r(s),{token:i}),listMenus:async(i,s)=>{let a=new URLSearchParams({no_page:"true"});s&&a.set("site",s);let m=await t(`/api/storefront/menus/?${a}`,{token:i});return h(m)},listBlogPosts:async(i,s={})=>{let a=new URLSearchParams({no_page:"true"});s.visibleOnly&&a.set("is_visible","true"),s.siteId&&a.set("site",s.siteId);let m=await t(`/api/storefront/blog-posts/?${a.toString()}`,{token:i});return h(m)},listFieldUsage:async(i,s)=>{let a=await t(`/api/storefront/field-usage/?site=${encodeURIComponent(s)}`,{token:i});return Array.isArray(a?.entries)?a.entries:[]},listCategories:async(i,s={})=>{let a=new URLSearchParams({no_page:"true"});s.visibleOnly&&a.set("is_visible","true"),s.siteId&&a.set("site",s.siteId);let m=await t(`/api/storefront/categories/?${a.toString()}`,{token:i});return[...h(m)].sort((w,U)=>w.sort_order-U.sort_order||w.name.localeCompare(U.name))},listForms:async(i,s={})=>{let a=new URLSearchParams({no_page:"true"});s.siteId&&a.set("site",s.siteId);let m=await t(`/api/storefront/forms/?${a.toString()}`,{token:i});return[...h(m)].sort((w,U)=>w.title.localeCompare(U.title))},listWheelSummaries:async(i,s={})=>{let a=new URLSearchParams;s.siteId&&a.set("site",s.siteId);let m=a.toString(),g=await t(`/api/storefront/wheel-curations/summaries/${m?`?${m}`:""}`,{token:i});return b(g)},listProducts:async(i,s={})=>{let a=new URLSearchParams;s.kinds?.length&&a.set("kind",s.kinds.join(",")),s.siteId&&a.set("site",s.siteId);let m=a.toString(),g=await t(`/api/storefront/products/${m?`?${m}`:""}`,{token:i});return b(g)},getWheelDetail:async(i,s,a={})=>{let m=new URLSearchParams({slug:s});return a.siteId&&m.set("site",a.siteId),C(b(await t(`/api/storefront/wheel-curations/detail/?${m.toString()}`,{token:i})))},updateHeaderSettings:(i,s,a)=>t(r(a),{method:"PATCH",body:JSON.stringify(i),token:s}),getSite:(i,s)=>t(H(i),{token:s}),listSites:async i=>{let s=await t("/api/storefront/sites/?no_page=true",{token:i});return h(s)},listSiteCurrencies:async(i,s)=>{let a=await t(wn(i),{token:s});return Array.isArray(a)?a:[]},publishSite:(i,s)=>t(`${H(i)}publish/`,{method:"POST",token:s}),getSiteLiveState:(i,s)=>t(`${H(i)}live-state/`,{token:s}),getThemeSettings:(i,s)=>t(o(s),{token:i}),updateThemeSettings:(i,s,a)=>t(o(a),{method:"PATCH",body:JSON.stringify(i),token:s}),getMyPreferences:async i=>(await t("/api/auth/me/",{token:i})).preferences??{},updateMyPreferences:(i,s)=>t("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:i}),token:s}),getChatSettings:(i,s)=>t(l(s),{token:i}),updateChatSettings:(i,s,a)=>t(l(a),{method:"PATCH",body:JSON.stringify(i),token:s}),getSocialSettings:(i,s)=>t(p(s),{token:i}),updateSocialSettings:(i,s,a)=>t(p(a),{method:"PATCH",body:JSON.stringify(i),token:s}),uploadHeaderLogo:(i,s,a)=>{let m=new FormData;return m.append("logo",i),t(r(a),{method:"PATCH",body:m,token:s})},clearHeaderLogo:(i,s)=>t(r(s),{method:"PATCH",body:JSON.stringify({logo:null}),token:i}),setHeaderLogoFromAsset:(i,s,a)=>t(r(a),{method:"PATCH",body:JSON.stringify({logo_asset_id:i}),token:s}),uploadMedia:async(i,s)=>{let a=new FormData;return a.append("file",i),t(An(),{method:"POST",body:a,token:s})},listMedia:async(i,s)=>{let a=new URLSearchParams({no_page:"true"});s&&a.set("kind",s);let m=await t(`/api/storefront/media-assets/?${a.toString()}`,{token:i});return h(m)}}}var Jr=Tn({siteDrafts:!0});function _n(e){let t=e.trim();return t?`/api/v1/dealers?${new URLSearchParams({near:t}).toString()}`:"/api/v1/dealers"}async function Yr(e){return xe(await c(_n(e)))}var _={audience:null,baseUrl:""};async function Zr(e,t){return ve(await c(Ie(e,t),_))}async function Vr(e){return Be(await c(Fe,{..._,method:"POST",body:JSON.stringify(e)}))}async function jr(e){try{let t=await c($e,{..._,method:"POST",body:JSON.stringify({token:e})});return Q(202,t)}catch(t){if(t instanceof S)return Q(t.status,t.data);throw t}}async function Qr(e,t){await c(Me,{..._,method:"POST",body:JSON.stringify({email:t.trim(),...e?{product:e}:{}})})}async function Xr(e,t){await c(We,{..._,method:"POST",body:JSON.stringify({email:t.trim(),...e?{product:e}:{}})})}async function zr(e){try{return Ke(await c(qe,{..._,method:"POST",body:JSON.stringify({token:e})}))}catch(t){if(t instanceof S&&Cn.has(t.status))return"";throw t}}var Cn=new Set([400,404,410]);export{q as a,h as b,ce as c,ue as d,R as e,yt as f,Z as g,_e as h,Ce as i,$n as j,Wn as k,qn as l,Kn as m,Yn as n,Ne as o,Ue as p,er as q,tr as r,P as s,De as t,Le as u,nr as v,rr as w,ir as x,sr as y,or as z,ar as A,lr as B,cr as C,ur as D,dr as E,pr as F,mr as G,gr as H,yr as I,hr as J,fr as K,Sr as L,M,Pr as N,br as O,wr as P,Rr as Q,Kt as R,S,te as T,X as U,Lr as V,Ir as W,c as X,on as Y,dt as Z,mn as _,gn as $,yn as aa,Sn as ba,$r as ca,Wr as da,qr as ea,ne as fa,Kr as ga,Jr as ha,Yr as ia,Zr as ja,Vr as ka,jr as la,Qr as ma,Xr as na,zr as oa};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ah as P,Bh as I,Ch as X,Db as b,Dh as S,Fh as j,Gh as z,Mh as U,Oh as Z,Qh as J,Yg as V,ci as Q,ei as ee,nf as q,vc as K}from"./chunk-SQ6D33WV.js";import{forwardRef as Pe}from"react";import{jsx as He}from"react/jsx-runtime";function Ie(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",s=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${s}`}var Oe=Pe(function({href:t,prefetch:s,replace:a,scroll:n,shallow:r,legacyBehavior:i,passHref:o,locale:l,onClick:h,children:w,...u},_){let g=C=>{h?.(C),!(C.defaultPrevented||u.target==="_blank")&&C.preventDefault()};return He("a",{ref:_,href:Ie(t),onClick:g,...u,children:w})}),_t=Oe;var te=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp","telegram","line","wechat"],Fe={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE",wechat:"WeChat"},Me={};function At(e){if(!e||typeof e!="object")return Me;let t={};for(let s of te){let a=e[s];if(typeof a!="string")continue;let n=a.trim();!n||!/^https?:\/\//i.test(n)||(t[s]=n)}return t}function xt(e){return te.flatMap(t=>{let s=e[t];return s?[{platform:t,href:s,label:Fe[t]}]:[]})}var Nt=e=>`${e}_url`;import{createContext as _e,createElement as x,useContext as N}from"react";import{Fragment as it,jsx as m}from"react/jsx-runtime";import{createContext as W,useContext as d}from"react";import{jsx as E,Fragment as pe}from"react/jsx-runtime";import{createContext as et,useContext as fe,useEffect as tt,useRef as st,useState as at}from"react";import{SCROLL_ZOOM_VAR as me}from"efficient-shell/format";import{readEntrance as $e}from"efficient-shell/format";var A={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},O="sectionAnimation",De=Z(Object.values(A));var se="sf-entrance",Ge=e=>e!=null&&e!=="";function Ye(e,t){let s=e[A[t]];return t==="kind"&&!Ge(s)?e[O]:s}var y=(e,t,s)=>J(e,A[t],s,Ye(e,t));function H(e,t){return $e(y(e,"kind",t),y(e,"from",t),y(e,"duration",t),y(e,"delay",t))}var Be=e=>({desktop:H(e,"desktop"),tablet:H(e,"tablet"),phone:H(e,"phone")});function Ht(e){let t=Be(e);return U.every(s=>t[s].kind==="none")?null:t}var We={...Object.fromEntries([...V].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)",[q]:"a host part draws its data block's answer with no element of its own (lib/content/card-template HOST_PART_TYPE); a wrapper would be one, and the host's content is not the merchant's to animate"},Ft=new Set(Object.keys(We));function ae(e,t,s,a){return t<=0?1/0:a?2*(e-4)/(t+s):2*(e-s/2-4)/t}function ne(e,t,s){let a=o=>o.width>0&&o.height>0;if(!a(e)||t.some(o=>o.mark&&!a(o.rect)))return 1;let n=e.left+e.width/2,r=e.top+e.height/2,i=s;for(let{rect:o,mark:l}of t){let h=Math.abs(o.left+o.width/2-n),w=Math.abs(o.top+o.height/2-r),u=Math.max(ae(h,e.width,o.width,l),ae(w,e.height,o.height,l));i=Math.min(i,Math.max(1,u))}return i}import{parseOption as Ke}from"efficient-shell/format";var re=["cover","contain"],qe={cover:"Cover",contain:"Contain"},Gt="Image fit";function F(e,t){return Ke(re,t,e)}function Yt(){return re.map(e=>({label:qe[e],value:e}))}function Bt(e){return e==="contain"?"object-contain":"object-cover"}function M(e,t){return e!=="auto"&&t==="cover"}var Ve=P.map(e=>e.image).filter(e=>e!==I),R=e=>S(e)?I:e,p="fill",Xt={label:"Fill row",value:p,showWhen:K},D="4/3",ie={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},le={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:ie,tablet:ie,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function jt(e,t,s){return t&&!v(s)?"all":e??"wide"}function oe(e){return le[e]}var zt=le.all;function ce(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}var Xe={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]",custom:"aspect-[var(--shape-ratio)]"},je={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]",custom:"view-wide:aspect-[var(--shape-ratio)]"},ze={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]"},Ue={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]!"},$=e=>Ve.includes(e)||S(e),v=$;function Ut(e){let t=$(e)?S(e)?X(e):P.find(s=>s.image===e)?.ratio:null;return t?j(t):null}function Zt(e,t){return z({desktop:e,phone:t})}function Jt(e,t,s){return s==="contain"?!0:[e,t??e].every(a=>a!==p&&(!$(a)||a==="auto"))}function Qt(e,t){return e===p&&!t?D:e}function es(e){return e===p?D:v(e)?e:void 0}function ue(e,t){return v(t)?t===e?null:t:e===p?D:null}function Ze(e,t){let s=ue(e,t);return M(e,"cover")||s!==null&&M(s,"cover")}function Je(e,t,s){return F(e,"cover")==="cover"&&Ze(t,s)}function ts(e,t,s,a){return e==="desktop"?Je(t,s,a):F(t,"cover")!=="cover"?!1:Qe(e==="tablet"?s:ue(s,a)??s)}var Qe=e=>e===p||v(e)&&e!=="auto";function ss(e,t,s="wide"){return e===p&&s==="all"?oe("all").frame:t===null?v(e)?Xe[R(e)]:"":[e===p?oe(s).frame:v(e)?je[R(e)]:"",e===p&&s==="desktop"?Ue[R(t)]:ze[R(t)]].filter(Boolean).join(" ")}var T=et(null);function us({attrs:e,style:t,children:s}){return E(T.Provider,{value:{attrs:e,style:t},children:s})}function he({children:e}){return E(T.Provider,{value:null,children:e})}function ms({fill:e=null,children:t}){let s=fe(T);return s?E("div",{className:ce(e),...s.attrs,style:s.style,children:t}):E(pe,{children:t})}var L="data-sf-mark";function de(e){let t=e.getBoundingClientRect(),s=e.firstElementChild,a=s&&typeof s.offsetWidth=="number"?s:e,n=Math.max(a.offsetWidth,e.offsetWidth),r=Math.max(a.offsetHeight,e.offsetHeight);return{left:t.left+t.width/2-n/2,top:t.top+t.height/2-r/2,width:n,height:r}}function nt(e){return e.closest(`[${L}]`)||e.closest("style, script")?!1:[...e.childNodes].some(t=>t.nodeType===3&&(t.textContent??"").trim()!=="")}var we=e=>e.closest(`.${se}`)??e.ownerDocument.body;function rt(e,t){let s=we(e),a=[];for(let n of s.querySelectorAll(`[${L}]`))n!==e&&a.push({rect:de(n),mark:!0});for(let n of s.querySelectorAll("*")){if(n.contains(e)||!nt(n))continue;let r=n.getBoundingClientRect();r.width===0||r.height===0||a.push({rect:{left:r.left,top:r.top,width:r.width,height:r.height},mark:!1})}return ne(de(e),a,t)}function ds({inCell:e=!1,children:t}){let s=fe(T),a=st(null),[n,r]=at(null),i=s?Number.parseFloat(String(s.style[me])):Number.NaN;if(tt(()=>{let l=a.current;if(!l||!Number.isFinite(i))return;let h=()=>r(rt(l,i));h();let w=l.ownerDocument.defaultView?.ResizeObserver;if(!w)return;let u=new w(h),_=we(l);u.observe(l),u.observe(_);for(let g of _.querySelectorAll(`[${L}]`))g!==l&&u.observe(g);return()=>u.disconnect()},[i]),!s)return E(pe,{children:t});let o=Number.isFinite(i)?{...s.style,[me]:String(n??1)}:s.style;return E("span",{ref:a,className:e?"inline-flex min-w-0 max-w-full items-center justify-center":"inline-flex items-center justify-center",[L]:"",...s.attrs,style:o,children:t})}var ge={stretchedRow:!1,fillingColumn:!1},c=W(null),ve=()=>d(c)!==null;function _s({line:e,draw:t}){return m(it,{children:t(b(e,ve()))})}var Cs=(e="by-box")=>b(e,ve()),bs=()=>d(c),As=()=>d(c)?.id??null,f=W(!1);function ot(){let e=d(c)?.stretchedRow===!0,t=d(f);return e&&!t}var lt=()=>d(f);function ct(){let e=d(c),t=ot(),s=lt();return{fill:s?` ${Q}`:"",inner:a=>{let n=t||s?m(f.Provider,{value:!0,children:a}):a;return e?.columnsRow?m(c.Provider,{value:{...e,columnsRow:!1},children:n}):n}}}function xs({className:e,style:t,attrs:s,children:a}){let{fill:n,inner:r}=ct(),i=Y();return i.scope(m("div",{className:B(`${e}${n}`,i.className),...t?{style:t}:{},...s,...i.attrs,children:r(a)}))}var G=W(!1);function Ns({children:e}){return m(G.Provider,{value:!0,children:m(f.Provider,{value:!0,children:e})})}function Ss({children:e,ownPictures:t=!1}){let s=d(c),a=d(G),n=d(f),r=a&&n,i=s===null?null:s.id===void 0?ge:{...ge,id:s.id};return m(c.Provider,{value:i,children:m(G.Provider,{value:!1,children:m(f.Provider,{value:r,children:t?e:m(he,{children:e})})})})}var k=_e(null),Ee="data-sf-view-hide",Ce=e=>x(k.Provider,{value:null},e),be={className:"",attrs:{},scope:Ce},ut=be,Ae=_e(null),Ps=(e,t)=>e?{className:e,views:t}:null,mt=e=>x(k.Provider,{value:null},x(Ae.Provider,{value:null},x(f.Provider,{value:!0},e))),Is=(e,t,s={})=>e?{className:e,words:t,...s}:null,xe=(e,t)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:b(e.line??"by-box",t)?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function Y(){let e=N(k),t=N(Ae),s=N(c)!==null;if(e===null&&t===null)return ut;let a=e===null?null:xe(e,s);return t===null?{className:a.className,attrs:{[Ee]:a.words},scope:Ce}:{className:a?`${a.className} ${t.className}`:t.className,attrs:{...a?{[Ee]:a.words}:{},[ee]:t.views},scope:mt}}function Os(){let e=N(k),t=N(c)!==null;return e===null?"":xe(e,t).className}var B=(e,t)=>t?e?`${e} ${t}`:t:e;function Hs(e){let t=Y(),s=e.takes===!1?be:t,a={},n=!1;for(let[r,i]of Object.entries(e))r==="as"||r==="takes"||r==="children"||(r==="className"?(a.className=B(i,s.className),n=!0):a[r]=i);return!n&&s.className&&(a.className=s.className),s.scope(x(e.as??"div",{...a,...s.attrs},e.children))}var Ms={small:54,medium:66,large:84},dt=44,pt=16,ft=140,Ds={min:pt,max:ft,step:1},$s=dt*4;import{forwardRef as ht}from"react";import{imageCopyUrl as Ne,imageSrcSet as Se}from"efficient-shell/image-copies";import{jsx as vt}from"react/jsx-runtime";var wt={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"};function ye(e,t,s){if(s){let a=Se(e);return a?{src:Ne(e,1280),srcSet:a,sizes:s}:{src:e,sizes:s}}if(t&&t>0){let a=Se(e,{maxWidth:t*3});return a?{src:Ne(e,t*2),srcSet:a,sizes:`${t}px`}:{src:e}}return{src:e}}var gt=ht(function({src:t,width:s,height:a,fill:n,priority:r,loading:i,style:o,quality:l,placeholder:h,blurDataURL:w,unoptimized:u,loader:_,overrideSrc:g,sizes:C,...Re},Le){let Te=g??(typeof t=="string"?t:t.src),ke=ye(Te,n?void 0:Number(s)||void 0,C??(n?"100vw":void 0));return vt("img",{ref:Le,...ke,width:n?void 0:s,height:n?void 0:a,loading:r?"eager":i??"lazy",fetchPriority:r?"high":void 0,decoding:"async",style:n?{...wt,...o}:{color:"transparent",...o},...Re})}),Ws=gt;function Ks(e){let t=e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),s=e.fill?void 0:Number(e.width)||void 0;return{props:ye(t,s,e.sizes??(e.fill?"100vw":void 0))}}export{A as a,O as b,De as c,se as d,H as e,Be as f,Ht as g,Ft as h,qe as i,Gt as j,F as k,Yt as l,Bt as m,p as n,Xt as o,jt as p,oe as q,zt as r,ce as s,Ut as t,Zt as u,Jt as v,Qt as w,es as x,ue as y,Ze as z,Je as A,ts as B,ss as C,us as D,he as E,ms as F,ds as G,k as H,be as I,Ae as J,Ps as K,Is as L,Y as M,Os as N,B as O,Hs as P,c as Q,_s as R,Cs as S,bs as T,As as U,f as V,ot as W,lt as X,ct as Y,xs as Z,Ns as _,Ss as $,Ms as aa,dt as ba,pt as ca,Ds as da,$s as ea,Ws as fa,Ks as ga,_t as ha,te as ia,Fe as ja,Me as ka,At as la,xt as ma,Nt as na};
|
|
1
|
+
import{Ah as P,Bh as I,Ch as X,Db as b,Dh as S,Fh as j,Gh as z,Mh as U,Oh as Z,Qh as J,Yg as V,ci as Q,ei as ee,nf as q,vc as K}from"./chunk-R3WKYZOZ.js";import{forwardRef as Pe}from"react";import{jsx as He}from"react/jsx-runtime";function Ie(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",s=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${s}`}var Oe=Pe(function({href:t,prefetch:s,replace:a,scroll:n,shallow:r,legacyBehavior:i,passHref:o,locale:l,onClick:h,children:w,...u},_){let g=C=>{h?.(C),!(C.defaultPrevented||u.target==="_blank")&&C.preventDefault()};return He("a",{ref:_,href:Ie(t),onClick:g,...u,children:w})}),_t=Oe;var te=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp","telegram","line","wechat"],Fe={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE",wechat:"WeChat"},Me={};function At(e){if(!e||typeof e!="object")return Me;let t={};for(let s of te){let a=e[s];if(typeof a!="string")continue;let n=a.trim();!n||!/^https?:\/\//i.test(n)||(t[s]=n)}return t}function xt(e){return te.flatMap(t=>{let s=e[t];return s?[{platform:t,href:s,label:Fe[t]}]:[]})}var Nt=e=>`${e}_url`;import{createContext as _e,createElement as x,useContext as N}from"react";import{Fragment as it,jsx as m}from"react/jsx-runtime";import{createContext as W,useContext as d}from"react";import{jsx as E,Fragment as pe}from"react/jsx-runtime";import{createContext as et,useContext as fe,useEffect as tt,useRef as st,useState as at}from"react";import{SCROLL_ZOOM_VAR as me}from"efficient-shell/format";import{readEntrance as $e}from"efficient-shell/format";var A={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},O="sectionAnimation",De=Z(Object.values(A));var se="sf-entrance",Ge=e=>e!=null&&e!=="";function Ye(e,t){let s=e[A[t]];return t==="kind"&&!Ge(s)?e[O]:s}var y=(e,t,s)=>J(e,A[t],s,Ye(e,t));function H(e,t){return $e(y(e,"kind",t),y(e,"from",t),y(e,"duration",t),y(e,"delay",t))}var Be=e=>({desktop:H(e,"desktop"),tablet:H(e,"tablet"),phone:H(e,"phone")});function Ht(e){let t=Be(e);return U.every(s=>t[s].kind==="none")?null:t}var We={...Object.fromEntries([...V].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)",[q]:"a host part draws its data block's answer with no element of its own (lib/content/card-template HOST_PART_TYPE); a wrapper would be one, and the host's content is not the merchant's to animate"},Ft=new Set(Object.keys(We));function ae(e,t,s,a){return t<=0?1/0:a?2*(e-4)/(t+s):2*(e-s/2-4)/t}function ne(e,t,s){let a=o=>o.width>0&&o.height>0;if(!a(e)||t.some(o=>o.mark&&!a(o.rect)))return 1;let n=e.left+e.width/2,r=e.top+e.height/2,i=s;for(let{rect:o,mark:l}of t){let h=Math.abs(o.left+o.width/2-n),w=Math.abs(o.top+o.height/2-r),u=Math.max(ae(h,e.width,o.width,l),ae(w,e.height,o.height,l));i=Math.min(i,Math.max(1,u))}return i}import{parseOption as Ke}from"efficient-shell/format";var re=["cover","contain"],qe={cover:"Cover",contain:"Contain"},Gt="Image fit";function F(e,t){return Ke(re,t,e)}function Yt(){return re.map(e=>({label:qe[e],value:e}))}function Bt(e){return e==="contain"?"object-contain":"object-cover"}function M(e,t){return e!=="auto"&&t==="cover"}var Ve=P.map(e=>e.image).filter(e=>e!==I),R=e=>S(e)?I:e,p="fill",Xt={label:"Fill row",value:p,showWhen:K},D="4/3",ie={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},le={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:ie,tablet:ie,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function jt(e,t,s){return t&&!v(s)?"all":e??"wide"}function oe(e){return le[e]}var zt=le.all;function ce(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}var Xe={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]",custom:"aspect-[var(--shape-ratio)]"},je={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]",custom:"view-wide:aspect-[var(--shape-ratio)]"},ze={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]"},Ue={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]!"},$=e=>Ve.includes(e)||S(e),v=$;function Ut(e){let t=$(e)?S(e)?X(e):P.find(s=>s.image===e)?.ratio:null;return t?j(t):null}function Zt(e,t){return z({desktop:e,phone:t})}function Jt(e,t,s){return s==="contain"?!0:[e,t??e].every(a=>a!==p&&(!$(a)||a==="auto"))}function Qt(e,t){return e===p&&!t?D:e}function es(e){return e===p?D:v(e)?e:void 0}function ue(e,t){return v(t)?t===e?null:t:e===p?D:null}function Ze(e,t){let s=ue(e,t);return M(e,"cover")||s!==null&&M(s,"cover")}function Je(e,t,s){return F(e,"cover")==="cover"&&Ze(t,s)}function ts(e,t,s,a){return e==="desktop"?Je(t,s,a):F(t,"cover")!=="cover"?!1:Qe(e==="tablet"?s:ue(s,a)??s)}var Qe=e=>e===p||v(e)&&e!=="auto";function ss(e,t,s="wide"){return e===p&&s==="all"?oe("all").frame:t===null?v(e)?Xe[R(e)]:"":[e===p?oe(s).frame:v(e)?je[R(e)]:"",e===p&&s==="desktop"?Ue[R(t)]:ze[R(t)]].filter(Boolean).join(" ")}var T=et(null);function us({attrs:e,style:t,children:s}){return E(T.Provider,{value:{attrs:e,style:t},children:s})}function he({children:e}){return E(T.Provider,{value:null,children:e})}function ms({fill:e=null,children:t}){let s=fe(T);return s?E("div",{className:ce(e),...s.attrs,style:s.style,children:t}):E(pe,{children:t})}var L="data-sf-mark";function de(e){let t=e.getBoundingClientRect(),s=e.firstElementChild,a=s&&typeof s.offsetWidth=="number"?s:e,n=Math.max(a.offsetWidth,e.offsetWidth),r=Math.max(a.offsetHeight,e.offsetHeight);return{left:t.left+t.width/2-n/2,top:t.top+t.height/2-r/2,width:n,height:r}}function nt(e){return e.closest(`[${L}]`)||e.closest("style, script")?!1:[...e.childNodes].some(t=>t.nodeType===3&&(t.textContent??"").trim()!=="")}var we=e=>e.closest(`.${se}`)??e.ownerDocument.body;function rt(e,t){let s=we(e),a=[];for(let n of s.querySelectorAll(`[${L}]`))n!==e&&a.push({rect:de(n),mark:!0});for(let n of s.querySelectorAll("*")){if(n.contains(e)||!nt(n))continue;let r=n.getBoundingClientRect();r.width===0||r.height===0||a.push({rect:{left:r.left,top:r.top,width:r.width,height:r.height},mark:!1})}return ne(de(e),a,t)}function ds({inCell:e=!1,children:t}){let s=fe(T),a=st(null),[n,r]=at(null),i=s?Number.parseFloat(String(s.style[me])):Number.NaN;if(tt(()=>{let l=a.current;if(!l||!Number.isFinite(i))return;let h=()=>r(rt(l,i));h();let w=l.ownerDocument.defaultView?.ResizeObserver;if(!w)return;let u=new w(h),_=we(l);u.observe(l),u.observe(_);for(let g of _.querySelectorAll(`[${L}]`))g!==l&&u.observe(g);return()=>u.disconnect()},[i]),!s)return E(pe,{children:t});let o=Number.isFinite(i)?{...s.style,[me]:String(n??1)}:s.style;return E("span",{ref:a,className:e?"inline-flex min-w-0 max-w-full items-center justify-center":"inline-flex items-center justify-center",[L]:"",...s.attrs,style:o,children:t})}var ge={stretchedRow:!1,fillingColumn:!1},c=W(null),ve=()=>d(c)!==null;function _s({line:e,draw:t}){return m(it,{children:t(b(e,ve()))})}var Cs=(e="by-box")=>b(e,ve()),bs=()=>d(c),As=()=>d(c)?.id??null,f=W(!1);function ot(){let e=d(c)?.stretchedRow===!0,t=d(f);return e&&!t}var lt=()=>d(f);function ct(){let e=d(c),t=ot(),s=lt();return{fill:s?` ${Q}`:"",inner:a=>{let n=t||s?m(f.Provider,{value:!0,children:a}):a;return e?.columnsRow?m(c.Provider,{value:{...e,columnsRow:!1},children:n}):n}}}function xs({className:e,style:t,attrs:s,children:a}){let{fill:n,inner:r}=ct(),i=Y();return i.scope(m("div",{className:B(`${e}${n}`,i.className),...t?{style:t}:{},...s,...i.attrs,children:r(a)}))}var G=W(!1);function Ns({children:e}){return m(G.Provider,{value:!0,children:m(f.Provider,{value:!0,children:e})})}function Ss({children:e,ownPictures:t=!1}){let s=d(c),a=d(G),n=d(f),r=a&&n,i=s===null?null:s.id===void 0?ge:{...ge,id:s.id};return m(c.Provider,{value:i,children:m(G.Provider,{value:!1,children:m(f.Provider,{value:r,children:t?e:m(he,{children:e})})})})}var k=_e(null),Ee="data-sf-view-hide",Ce=e=>x(k.Provider,{value:null},e),be={className:"",attrs:{},scope:Ce},ut=be,Ae=_e(null),Ps=(e,t)=>e?{className:e,views:t}:null,mt=e=>x(k.Provider,{value:null},x(Ae.Provider,{value:null},x(f.Provider,{value:!0},e))),Is=(e,t,s={})=>e?{className:e,words:t,...s}:null,xe=(e,t)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:b(e.line??"by-box",t)?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function Y(){let e=N(k),t=N(Ae),s=N(c)!==null;if(e===null&&t===null)return ut;let a=e===null?null:xe(e,s);return t===null?{className:a.className,attrs:{[Ee]:a.words},scope:Ce}:{className:a?`${a.className} ${t.className}`:t.className,attrs:{...a?{[Ee]:a.words}:{},[ee]:t.views},scope:mt}}function Os(){let e=N(k),t=N(c)!==null;return e===null?"":xe(e,t).className}var B=(e,t)=>t?e?`${e} ${t}`:t:e;function Hs(e){let t=Y(),s=e.takes===!1?be:t,a={},n=!1;for(let[r,i]of Object.entries(e))r==="as"||r==="takes"||r==="children"||(r==="className"?(a.className=B(i,s.className),n=!0):a[r]=i);return!n&&s.className&&(a.className=s.className),s.scope(x(e.as??"div",{...a,...s.attrs},e.children))}var Ms={small:54,medium:66,large:84},dt=44,pt=16,ft=140,Ds={min:pt,max:ft,step:1},$s=dt*4;import{forwardRef as ht}from"react";import{imageCopyUrl as Ne,imageSrcSet as Se}from"efficient-shell/image-copies";import{jsx as vt}from"react/jsx-runtime";var wt={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"};function ye(e,t,s){if(s){let a=Se(e);return a?{src:Ne(e,1280),srcSet:a,sizes:s}:{src:e,sizes:s}}if(t&&t>0){let a=Se(e,{maxWidth:t*3});return a?{src:Ne(e,t*2),srcSet:a,sizes:`${t}px`}:{src:e}}return{src:e}}var gt=ht(function({src:t,width:s,height:a,fill:n,priority:r,loading:i,style:o,quality:l,placeholder:h,blurDataURL:w,unoptimized:u,loader:_,overrideSrc:g,sizes:C,...Re},Le){let Te=g??(typeof t=="string"?t:t.src),ke=ye(Te,n?void 0:Number(s)||void 0,C??(n?"100vw":void 0));return vt("img",{ref:Le,...ke,width:n?void 0:s,height:n?void 0:a,loading:r?"eager":i??"lazy",fetchPriority:r?"high":void 0,decoding:"async",style:n?{...wt,...o}:{color:"transparent",...o},...Re})}),Ws=gt;function Ks(e){let t=e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),s=e.fill?void 0:Number(e.width)||void 0;return{props:ye(t,s,e.sizes??(e.fill?"100vw":void 0))}}export{A as a,O as b,De as c,se as d,H as e,Be as f,Ht as g,Ft as h,qe as i,Gt as j,F as k,Yt as l,Bt as m,p as n,Xt as o,jt as p,oe as q,zt as r,ce as s,Ut as t,Zt as u,Jt as v,Qt as w,es as x,ue as y,Ze as z,Je as A,ts as B,ss as C,us as D,he as E,ms as F,ds as G,k as H,be as I,Ae as J,Ps as K,Is as L,Y as M,Os as N,B as O,Hs as P,c as Q,_s as R,Cs as S,bs as T,As as U,f as V,ot as W,lt as X,ct as Y,xs as Z,Ns as _,Ss as $,Ms as aa,dt as ba,pt as ca,Ds as da,$s as ea,Ws as fa,Ks as ga,_t as ha,te as ia,Fe as ja,Me as ka,At as la,xt as ma,Nt as na};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P,b as Q}from"./chunk-SB3V6PTJ.js";var A=e=>typeof e=="string"&&e?e:void 0;var Se=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"jost",label:"Jost",cssVar:"--font-jost",category:"sans",italic:!0,italicLoaded:!0},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],_e=new Map(Se.map(e=>[e.key,e])),Go="site-",fi="--font-site-",wi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,v={options:Se,byKey:_e,siteFonts:new Map};function gi(e){if(typeof e?.key!="string"||!e.key.startsWith(Go))return null;let t=e.key.slice(Go.length);if(!wi.test(t))return null;let o=e.italic===!0;return{key:e.key,label:A(e.label)??e.family,cssVar:`${fi}${t}`,category:Object.hasOwn(Wo,e.category)?e.category:"sans",italic:o,italicLoaded:o}}function hu(e){if(!e?.length)return v;let t=new Map(_e),o=[],a=new Map;for(let s of e){let n=gi(s);!n||t.has(n.key)||(t.set(n.key,n),o.push(n),a.set(n.key,s))}return a.size===0?v:{options:[...o,...Se],byKey:t,siteFonts:a}}var Wo={sans:"Sans",serif:"Serif",mono:"Mono"};function bi(e=v){return Object.keys(Wo).map(t=>[t,e.options.filter(o=>o.category===t)]).filter(([,t])=>t.length>0)}function uu(e=v){return bi(e).flatMap(([,t])=>t)}function pu(e,t=v){return t.byKey.get(e)}var Je=["heading","heading2","heading3","body","accent","label"];function mu(e){return typeof e=="string"&&Je.includes(e)?e:null}var fu={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},yi=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Ei=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,wu={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Ti={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function gu(e){let t=e?Ei.exec(e):null;return t?P(Ti,t[1])??null:Si(e)}function Si(e){if(!e)return null;let t=e.split(/\s+/).filter(o=>!o.slice(0,o.lastIndexOf(":")+1).includes("&")).map(o=>o.slice(o.lastIndexOf(":")+1));for(let[o,a]of yi)if(t.includes(o))return a;return null}var G={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function _i(e,t=v){let o=t.byKey,a=s=>{let n=e?.[s];if(n&&o.has(n))return n;if(s==="heading2"||s==="heading3"){let i=e?.heading;return i&&o.has(i)?i:G.heading}return G[s]};return Object.fromEntries(Je.map(s=>[s,a(s)]))}function Oi(e,t,o){return o.byKey.get(e[t])??_e.get(G[t])}function Z(e,t,o){return`var(${Oi(e,t,o).cssVar})`}var bu=[...new Set(Je.map(e=>_e.get(G[e]).cssVar))],yu=[...new Set(Se.map(e=>e.cssVar))];function Eu(e,t=v){let o=_i(e,t);return{"--font-role-heading":Z(o,"heading",t),"--font-role-heading2":Z(o,"heading2",t),"--font-role-heading3":Z(o,"heading3",t),"--font-role-body":Z(o,"body",t),"--font-role-accent":Z(o,"accent",t),"--font-role-label":Z(o,"label",t),fontFamily:"var(--font-role-body)"}}import{VIEW_DESKTOP_MIN as vi,VIEW_TABLET_MIN as xi}from"efficient-easel/screen/lib/content/view-tiers";var Uo="v1",Yo=800,Ou=961,ki={"view-tablet":xi,"view-desktop":vi,"view-wide":Yo};function vu(e){let t=e.startsWith("max-"),o=t?e.slice(4):e,a=P(ki,o);if(a!==void 0)return{px:a,max:t};let s=/^(max|min)-\[(\d+)px\]$/.exec(e);return s?{px:Number(s[2]),max:s[1]==="max"}:void 0}var xu=`(min-width: ${Yo}px)`,Ri="data-sf-line",Ai="edge",ku={[Ri]:Ai},Ru=(e,t)=>e==="edge"||e!=="section"&&t;import{contrastRatio as Wu,hexToRgb as ve,parseHexColor as D,readableInk as zo,relativeLuminance as xe,parseOption as ct}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as Hi,pictureShadowColor as Di}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as Bi}from"efficient-easel/screen/lib/content/length-units";import{CORNER_RADIUS_MAX as qo}from"efficient-easel/screen/lib/content/style-keys";import{VIEW_TIERS as Li,viewKeyAt as Ko}from"efficient-easel/screen/lib/content/view-tiers";var N=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;import{isLengthUnit as et,lengthOf as Ci,rowGrid as Ii}from"efficient-easel/screen/lib/content/length-units";function tt(e,t){let o=Ci(e,ot(t));return typeof o=="number"?`${o}px`:o}function ot(e,t="px"){return et(e)?e:t}function Nu(e,t,o){return t.unitKey?ot(e[Ko(t.unitKey,o)],t.base??"px"):t.base??"px"}function Hu(e,t=Li){return e.unitKey?t.map(o=>Ko(e.unitKey,o)):[]}function Pi(e,t,o){let a=Ii({kind:e},t,o);return t!=="px"&&o.min>0?{...a,min:a.step}:a}function at(e,t,o,a){let s=N(e);if(!et(t)||t==="px"||s===void 0)return null;let n=Pi(o,t,a),i=Math.min(n.max,Math.max(n.min,s));return Math.round(i*100)/100}function Du(e,t,o,a){let s=at(e,t,o,a);return s===null?null:tt(s,t)}var Ni={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function Bu(e){let t=e;return Object.fromEntries(Object.entries(Ni).map(([o,a])=>[o,ot(t[a])]))}function Mu(e,t,o){let a=N(e);return et(t)&&t!=="px"&&a!==void 0?a:o(a??null)}import{DEFAULT_SHADOW_COLOR as Tp}from"efficient-easel/screen/lib/document/shadow-values";var Vu="storefront-theme",ju="sf:theme-mode",Xu="sf:theme-switch",zu="hide",qu=["light","dark","auto"],pt="light",mt=!1,Mi=7,Fi=18;function Gi(e){return e>=Mi&&e<Fi}function Qu(e){let{mode:t,override:o,switchShown:a,hour:s}=e;return a&&(o==="light"||o==="dark")?o:t==="auto"?Gi(s)?"light":"dark":ct(["light","dark"],"dark",t)}var J={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Wi=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ke={selected:0,themes:Wi};function Qo(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ke}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function st(e,t,o){let a=ve(e),s=ve(t);if(a===null||s===null)return e;let n=(i,r)=>Math.max(0,Math.min(255,Math.round(i+(r-i)*o))).toString(16).padStart(2,"0");return`#${n(a.r,s.r)}${n(a.g,s.g)}${n(a.b,s.b)}`}var Ui={light:"#ffffff",dark:"#0a0a0a"},Zu=["light","dark"];function Ju(e,t){let o=Ui[t],a=t==="light"?"#ffffff":"#000000";return{text:o,accent:o,background:e,surface:st(e,a,.1),line:st(e,a,.22),muted:st(o,e,.35),brandInk:t}}function te(e){let t=Qo(e);return t.themes[t.selected]}function ee(e){return{text:e.text,accent:e.accent,background:e.background||J.background,surface:e.surface||J.surface,line:e.line||J.line,muted:e.muted||J.muted}}var Yi=.4,Ki="#f5f1e8",$o="#0a0a0a";function $i(e){let t=te(e).text,o=xe(t);return o===null||o>=Yi?t:null}var Vi=4.5,ji=3,ep={good:"Good","large-only":"Large text only",hard:"Hard to read"};function tp(e){return e>=Vi?"good":e>=ji?"large-only":"hard"}var Xi=["#000000","#ffffff"];function Re(e){return zo(e,Xi)}function Zo(e,t){let o=t!==void 0&&xe(t)!==null?t:Ki;return zo(e,[$o,o])===o&&o!==$o}var zi=[.25,.4,.55];function op(e){let t=ve(e);return t===null?[]:zi.map(o=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-o)).toString(16).padStart(2,"0")).join(""))}function ap(e){let t={"--theme-fg":te(e).text},o=$i(e);return o!==null&&(t["--overlay-fg"]=o),t}var qi=82;function ft(e){return`color-mix(in srgb, ${e} ${qi}%, #000)`}function sp(e){let t=te(e);return{"--theme-accent":t.accent,"--theme-accent-2":ft(t.accent),"--theme-accent-ink":Re(t.accent)}}function wt(e){let t=e?.button;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function np(e){let t=te(e),o=wt(t),a=Jo(t);if(o===null&&a===null)return{};let s={};return o!==null&&(s["--theme-btn"]=o,s["--theme-btn-2"]=ft(o)),s["--theme-btn-ink"]=a??Re(o),s}function Jo(e){let t=e?.buttonInk;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function Qi(e,t){return Jo(e)??Re(wt(e)??t)}function ip(e){let t=te(e);return{fill:wt(t)??t.accent.toLowerCase(),ink:Qi(t,t.accent)}}function rp(e){let t={};return Qo(e).themes.forEach((o,a)=>{let s=ee(o);t[`--theme-preset-${a}-accent`]=s.accent,t[`--theme-preset-${a}-accent-2`]=ft(s.accent),t[`--theme-preset-${a}-accent-ink`]=Re(s.accent),t[`--theme-preset-${a}-bg`]=s.background,t[`--theme-preset-${a}-fg`]=s.text,t[`--theme-preset-${a}-surface`]=s.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${s.surface} 60%, ${s.line})`,t[`--theme-preset-${a}-line`]=s.line,t[`--theme-preset-${a}-muted`]=s.muted}),t}var nt=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},it=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function Vo([e,t,o]){let[a,s,n]=[nt(e),nt(t),nt(o)],i=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*n),r=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*n),c=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*n);return[.2104542553*i+.793617785*r-.0040720468*c,1.9779984951*i-2.428592205*r+.4505937099*c,.0259040371*i+.7827717662*r-.808675766*c]}function Zi([e,t,o]){let a=(e+.3963377774*t+.2158037573*o)**3,s=(e-.1055613458*t-.0638541728*o)**3,n=(e-.0894841775*t-1.291485548*o)**3;return[it(4.0767416621*a-3.3077115913*s+.2309699292*n),it(-1.2684380046*a+2.6097574011*s-.3413193965*n),it(-.0041960863*a-.7034186147*s+1.707614701*n)]}var dt=e=>{let t=ve(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},ea=(e,t,o)=>[e[0]*o+t[0]*(1-o),e[1]*o+t[1]*(1-o),e[2]*o+t[2]*(1-o)],ta=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,oa=e=>ea(dt(e.surface),dt(e.line),.6);function lp(e){return ta(oa(ee(e)))}function Ji(e){let t=ee(e);return ta(Zi(ea(Vo(oa(t)),Vo(dt(t.text)),.92)))}function aa(e,t,o,a){let s=e[t];if(!s)return-1;let n=o(s);if(!n)return-1;let i=ee(s);return e.findIndex((r,c)=>{if(c===t)return!1;let h=ee(r);return D(h.background)!==n?!1:!a||D(h.text??"")===D(i.text??"")&&D(h.accent??"")===D(i.accent??"")})}function cp(e,t){return aa(e,t,Ji,!1)}function dp(e,t){return aa(e,t,o=>D(o.surface??""),!0)}var er=1;function tr(e,t){let o=(e??[]).flatMap((a,s)=>{let n=xe(a.background??""),i=xe(a.text??"");return n!==null&&i!==null&&n<i?[s]:[]});return o.find(a=>a!==t)??o[0]??er}function hp(e){return tr(e?.themes,e?.selected)}var up=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function pp(e){let t=ee(te(e)),o=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,a={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==J.surface||t.line!==J.line)&&(a["--theme-surface-2"]=o),a}var or=["heading","body","label"];function mp(e){if(!e)return null;for(let t of or)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var sa=["headingLarge","headingMedium","headingSmall","accent","body","label"];var gt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ar=8,sr=200;function nr(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=ar&&t<=sr?t:null}function ir(e){let t={};for(let o of sa)t[o]=nr(e?.[o]);return t}function fp(e){let t=ir(e),o={};for(let a of sa){let s=t[a];s!==null&&(o[`--size-${a}`]=`${s}px`)}return o}var rr=["square","small","large"],lr="small";function wp(e){return rr.includes(e??"")?e:lr}var Ae=0,cr={min:Ae,max:qo,step:1},gp={square:0,small:null,large:16},ht={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function bt(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(qo,Math.max(Ae,Math.round(t))):null}function jo(e,t){if(Bi(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};let a=Math.max(0,e);return Object.fromEntries(Object.entries(ht).map(([s,n])=>{let i=Math.round(a*n*1e4)/1e4;return[s,i===0?"0":tt(i,t)]}))}let o=bt(e);return o===null?{}:Object.fromEntries(Object.entries(ht).map(([a,s])=>{let n=o*s/16;return[a,n===0?"0":`${n}rem`]}))}function bp(e){return(bt(e)??Ae)*ht["--sf-button-radius"]}function yp(e,t){let o=at(e,t,"radius",cr);return o!==null?jo(o,t):jo(bt(e)??Ae)}var dr=["none","soft","lifted"],hr="soft",na="none",ur=["tight","normal","roomy"],pr="normal",Le="normal",mr=["none","lift","highlight"],fr="lift",wr="highlight";function ia(e){return dr.includes(e??"")?e:hr}function gr(e){return ur.includes(e??"")?e:pr}function ra(e){return mr.includes(e??"")?e:fr}function Sp(e){let t=ia(e);return t===na?void 0:t}function _p(e){let t=gr(e);return t===Le?void 0:t}function Op(e){let t=ra(e);return t===wr?void 0:t}function vp(e,t,o){let a=Di(t);return a===Hi?{}:ia(e)!==na||ra(o)==="lift"?{"--sf-shadow-color":a}:{}}var br=["normal","tight","compressed"],me="normal";function la(e){return br.includes(e??"")?e:me}function xp(e){let t=la(e);return t===me?void 0:t}function kp(e){switch(la(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var Xo=["authored","sentence"],yt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},rt=100,lt=900,yr=24,Er=200;function Oe(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function ca(e){let t=Oe(e?.weight,rt,lt),o=ct(Xo,"authored",e?.case),a=n=>n==null?t:Oe(n,rt,lt),s=n=>ct(Xo,o,n);return{case:o,weight:t,weightStrong:Oe(e?.weightStrong,rt,lt),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Oe(e?.maxPx,yr,Er),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:s(e?.case2),case3:s(e?.case3)}}function Rp(e){let t=ca(e),o={};return t.case==="sentence"&&(o["--sf-heading-case"]="none"),t.weight!==null&&(o["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(o["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(o["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(o["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(o["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(o["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(o["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),o}function Ap(e){return ca({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}var ut="siteTheme";function Tr(e){let t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(a=>!!a&&typeof a=="object"))return{};let o=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[ut]:{selected:o,themes:t.themes}}}function Lp(e){return Tr(e?.[ut])[ut]}import{parseHexColor as Sr}from"efficient-shell/format";var Et=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],_r=Et.filter(e=>e.ink);function da(e){let t={color:e.fg};for(let{role:o,token:a}of _r)t[a]=e[o];return t}var Or={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},vr=Object.freeze(da(Or)),xr={fg:"var(--overlay-fg-on-light)",line:"color-mix(in srgb, var(--overlay-fg-on-light) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg-on-light) 76%, transparent)"},kr=Object.freeze(da(xr));function Np(e,t){let o=e?Sr(e):null;return o?Zo(o,t)?vr:kr:null}import{jsx as pa}from"react/jsx-runtime";import{createContext as Lr,useCallback as m,useContext as Cr,useMemo as Ir,useState as Pr}from"react";import{createContext as ua,useContext as Tt}from"react";import{createContext as Rr}from"react";var ha=Rr(null);var Ar=ua(null),St=ua({logo:null,placeholder:!1,wordmark:null});function Gp(){let e=Tt(ha),t=Tt(Ar),o=Tt(St),a=!e&&o.placeholder,s=e?e.logoUrl:o.logo?.logoUrl??t?.logoUrl??null;return{src:a?null:s,reversedSrc:e?e.logoReversed:o.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:o.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:o.wordmark,siteName:e?.siteName??t?.siteName}}var ma={},fa=Lr({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:pt,setThemeMode:()=>{},themeSwitchShown:mt,setThemeSwitchShown:()=>{},theme:ke,themeRow:"none",setTheme:()=>{},fonts:G,setFonts:()=>{},sizes:gt,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:Le,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:me,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:ma,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:yt,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function jp({children:e,websiteName:t=null,templateChrome:o=!1,templateName:a=null,chromePlaceholder:s=!1,themeMode:n=pt,onThemeModeChange:i,themeSwitchShown:r=mt,onThemeSwitchShownChange:c,theme:h=ke,themeRow:_="none",onThemeChange:O,fonts:Ze=G,onFontsChange:mo,sizes:En=gt,onSizesChange:fo,cornerRadiusPx:Tn=null,onCornerRadiusPxChange:wo,cardShadow:Sn=null,onCardShadowChange:go,shadowColor:_n=null,onShadowColorChange:bo,cardGap:On=Le,onCardGapChange:yo,hoverEffect:vn=null,onHoverEffectChange:Eo,headingCompression:xn=me,onHeadingCompressionChange:To,siteWidth:kn=null,onSiteWidthChange:So,siteGutter:Rn=null,siteGutterPhone:An=null,blockGap:Ln=null,blockGapPhone:Cn=null,siteLengthUnits:In=ma,onSiteLengthUnitsChange:_o,onSiteGutterChange:Oo,onSiteGutterPhoneChange:vo,onBlockGapChange:xo,onBlockGapPhoneChange:ko,headingTypography:Pn=yt,onHeadingTypographyChange:Ro,textStyles:Nn=null,onTextStylesChange:Ao,wordStyles:Hn=null,heroBackgroundFollowsWidth:Dn=null,onHeroBackgroundFollowsWidthChange:Lo,sectionBackgroundWidth:Bn=null,onSectionBackgroundWidthChange:Co,sectionContentWidth:Mn=null,onSectionContentWidthChange:Io,photographyGrayscale:Fn=null,onPhotographyGrayscaleChange:Po,shareButtonOnPosts:Gn=null,onShareButtonOnPostsChange:No,themeFromDocument:Wn=!1}){let[pe,Ho]=Pr(null),Un=m(l=>Ho(mi=>mi??l),[]),Yn=m(l=>i?.(l),[i]),Kn=m(l=>c?.(l),[c]),$n=m(l=>O?.(l),[O]),Vn=m(l=>mo?.(l),[mo]),jn=m(l=>fo?.(l),[fo]),Xn=m(l=>So?.(l),[So]),zn=m(l=>Oo?.(l),[Oo]),qn=m(l=>vo?.(l),[vo]),Qn=m(l=>xo?.(l),[xo]),Zn=m(l=>ko?.(l),[ko]),Jn=m(l=>_o?.(l),[_o]),ei=m(l=>Lo?.(l),[Lo]),ti=m(l=>Co?.(l),[Co]),oi=m(l=>Io?.(l),[Io]),ai=m(l=>Po?.(l),[Po]),si=m(l=>No?.(l),[No]),ni=m(l=>wo?.(l),[wo]),ii=m(l=>go?.(l),[go]),ri=m(l=>bo?.(l),[bo]),li=m(l=>yo?.(l),[yo]),ci=m(l=>Eo?.(l),[Eo]),di=m(l=>To?.(l),[To]),hi=m(l=>Ro?.(l),[Ro]),ui=m(l=>Ao?.(l),[Ao]),Do=pe?.logoUrl,Bo=pe?.logoReversed,Mo=pe?.logoInkIsDark,Fo=pe!==null,pi=Ir(()=>({logo:Fo?{logoUrl:Do,logoReversed:Bo,logoInkIsDark:Mo}:null,placeholder:o||s,wordmark:o?a:t}),[Fo,Do,Bo,Mo,o,s,a,t]);return pa(St.Provider,{value:pi,children:pa(fa.Provider,{value:{settings:pe,setSettings:Ho,primeSettings:Un,websiteName:t,templateChrome:o,templateName:a,chromePlaceholder:s,themeMode:n,setThemeMode:Yn,themeSwitchShown:r,setThemeSwitchShown:Kn,theme:h,themeRow:_,setTheme:$n,fonts:Ze,setFonts:Vn,sizes:En,setSizes:jn,cornerRadiusPx:Tn,setCornerRadiusPx:ni,cardShadow:Sn,setCardShadow:ii,shadowColor:_n,setShadowColor:ri,cardGap:On,setCardGap:li,hoverEffect:vn,setHoverEffect:ci,headingCompression:xn,setHeadingCompression:di,siteWidth:kn,setSiteWidth:Xn,siteGutter:Rn,siteGutterPhone:An,blockGap:Ln,blockGapPhone:Cn,siteLengthUnits:In,setSiteLengthUnits:Jn,setSiteGutter:zn,setSiteGutterPhone:qn,setBlockGap:Qn,setBlockGapPhone:Zn,headingTypography:Pn,setHeadingTypography:hi,textStyles:Nn,setTextStyles:ui,wordStyles:Hn,heroBackgroundFollowsWidth:Dn,setHeroBackgroundFollowsWidth:ei,sectionBackgroundWidth:Bn,setSectionBackgroundWidth:ti,sectionContentWidth:Mn,setSectionContentWidth:oi,photographyGrayscale:Fn,setPhotographyGrayscale:ai,shareButtonOnPosts:Gn,setShareButtonOnPosts:si,themeFromDocument:Wn},children:e})})}var Nr=()=>Cr(fa);function Xp(e,t,o){return e?t===o?"read":"loading":"none"}function zp(e,t){return{value:e,readFor:t}}function qp(e,t,o){return{value:t,readFor:e.readFor===o?o:null}}function Qp(){let{sectionContentWidth:e,themeFromDocument:t}=Nr();return t?null:e}var em=["general","commerce","service"],oe=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function tm(){return Object.fromEntries(oe.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var Hr="2027-02-05",Dr="2027-02-14",wa={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
|
|
1
|
+
import{a as P,b as Q}from"./chunk-RJM55KDO.js";var A=e=>typeof e=="string"&&e?e:void 0;var Se=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"jost",label:"Jost",cssVar:"--font-jost",category:"sans",italic:!0,italicLoaded:!0},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],_e=new Map(Se.map(e=>[e.key,e])),Go="site-",fi="--font-site-",wi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,v={options:Se,byKey:_e,siteFonts:new Map};function gi(e){if(typeof e?.key!="string"||!e.key.startsWith(Go))return null;let t=e.key.slice(Go.length);if(!wi.test(t))return null;let o=e.italic===!0;return{key:e.key,label:A(e.label)??e.family,cssVar:`${fi}${t}`,category:Object.hasOwn(Wo,e.category)?e.category:"sans",italic:o,italicLoaded:o}}function hu(e){if(!e?.length)return v;let t=new Map(_e),o=[],a=new Map;for(let s of e){let n=gi(s);!n||t.has(n.key)||(t.set(n.key,n),o.push(n),a.set(n.key,s))}return a.size===0?v:{options:[...o,...Se],byKey:t,siteFonts:a}}var Wo={sans:"Sans",serif:"Serif",mono:"Mono"};function bi(e=v){return Object.keys(Wo).map(t=>[t,e.options.filter(o=>o.category===t)]).filter(([,t])=>t.length>0)}function uu(e=v){return bi(e).flatMap(([,t])=>t)}function pu(e,t=v){return t.byKey.get(e)}var Je=["heading","heading2","heading3","body","accent","label"];function mu(e){return typeof e=="string"&&Je.includes(e)?e:null}var fu={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},yi=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Ei=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,wu={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Ti={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function gu(e){let t=e?Ei.exec(e):null;return t?P(Ti,t[1])??null:Si(e)}function Si(e){if(!e)return null;let t=e.split(/\s+/).filter(o=>!o.slice(0,o.lastIndexOf(":")+1).includes("&")).map(o=>o.slice(o.lastIndexOf(":")+1));for(let[o,a]of yi)if(t.includes(o))return a;return null}var G={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function _i(e,t=v){let o=t.byKey,a=s=>{let n=e?.[s];if(n&&o.has(n))return n;if(s==="heading2"||s==="heading3"){let i=e?.heading;return i&&o.has(i)?i:G.heading}return G[s]};return Object.fromEntries(Je.map(s=>[s,a(s)]))}function Oi(e,t,o){return o.byKey.get(e[t])??_e.get(G[t])}function Z(e,t,o){return`var(${Oi(e,t,o).cssVar})`}var bu=[...new Set(Je.map(e=>_e.get(G[e]).cssVar))],yu=[...new Set(Se.map(e=>e.cssVar))];function Eu(e,t=v){let o=_i(e,t);return{"--font-role-heading":Z(o,"heading",t),"--font-role-heading2":Z(o,"heading2",t),"--font-role-heading3":Z(o,"heading3",t),"--font-role-body":Z(o,"body",t),"--font-role-accent":Z(o,"accent",t),"--font-role-label":Z(o,"label",t),fontFamily:"var(--font-role-body)"}}import{VIEW_DESKTOP_MIN as vi,VIEW_TABLET_MIN as xi}from"efficient-easel/screen/lib/content/view-tiers";var Uo="v1",Yo=800,Ou=961,ki={"view-tablet":xi,"view-desktop":vi,"view-wide":Yo};function vu(e){let t=e.startsWith("max-"),o=t?e.slice(4):e,a=P(ki,o);if(a!==void 0)return{px:a,max:t};let s=/^(max|min)-\[(\d+)px\]$/.exec(e);return s?{px:Number(s[2]),max:s[1]==="max"}:void 0}var xu=`(min-width: ${Yo}px)`,Ri="data-sf-line",Ai="edge",ku={[Ri]:Ai},Ru=(e,t)=>e==="edge"||e!=="section"&&t;import{contrastRatio as Wu,hexToRgb as ve,parseHexColor as D,readableInk as zo,relativeLuminance as xe,parseOption as ct}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as Hi,pictureShadowColor as Di}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as Bi}from"efficient-easel/screen/lib/content/length-units";import{CORNER_RADIUS_MAX as qo}from"efficient-easel/screen/lib/content/style-keys";import{VIEW_TIERS as Li,viewKeyAt as Ko}from"efficient-easel/screen/lib/content/view-tiers";var N=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;import{isLengthUnit as et,lengthOf as Ci,rowGrid as Ii}from"efficient-easel/screen/lib/content/length-units";function tt(e,t){let o=Ci(e,ot(t));return typeof o=="number"?`${o}px`:o}function ot(e,t="px"){return et(e)?e:t}function Nu(e,t,o){return t.unitKey?ot(e[Ko(t.unitKey,o)],t.base??"px"):t.base??"px"}function Hu(e,t=Li){return e.unitKey?t.map(o=>Ko(e.unitKey,o)):[]}function Pi(e,t,o){let a=Ii({kind:e},t,o);return t!=="px"&&o.min>0?{...a,min:a.step}:a}function at(e,t,o,a){let s=N(e);if(!et(t)||t==="px"||s===void 0)return null;let n=Pi(o,t,a),i=Math.min(n.max,Math.max(n.min,s));return Math.round(i*100)/100}function Du(e,t,o,a){let s=at(e,t,o,a);return s===null?null:tt(s,t)}var Ni={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function Bu(e){let t=e;return Object.fromEntries(Object.entries(Ni).map(([o,a])=>[o,ot(t[a])]))}function Mu(e,t,o){let a=N(e);return et(t)&&t!=="px"&&a!==void 0?a:o(a??null)}import{DEFAULT_SHADOW_COLOR as Tp}from"efficient-easel/screen/lib/document/shadow-values";var Vu="storefront-theme",ju="sf:theme-mode",Xu="sf:theme-switch",zu="hide",qu=["light","dark","auto"],pt="light",mt=!1,Mi=7,Fi=18;function Gi(e){return e>=Mi&&e<Fi}function Qu(e){let{mode:t,override:o,switchShown:a,hour:s}=e;return a&&(o==="light"||o==="dark")?o:t==="auto"?Gi(s)?"light":"dark":ct(["light","dark"],"dark",t)}var J={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Wi=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ke={selected:0,themes:Wi};function Qo(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ke}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function st(e,t,o){let a=ve(e),s=ve(t);if(a===null||s===null)return e;let n=(i,r)=>Math.max(0,Math.min(255,Math.round(i+(r-i)*o))).toString(16).padStart(2,"0");return`#${n(a.r,s.r)}${n(a.g,s.g)}${n(a.b,s.b)}`}var Ui={light:"#ffffff",dark:"#0a0a0a"},Zu=["light","dark"];function Ju(e,t){let o=Ui[t],a=t==="light"?"#ffffff":"#000000";return{text:o,accent:o,background:e,surface:st(e,a,.1),line:st(e,a,.22),muted:st(o,e,.35),brandInk:t}}function te(e){let t=Qo(e);return t.themes[t.selected]}function ee(e){return{text:e.text,accent:e.accent,background:e.background||J.background,surface:e.surface||J.surface,line:e.line||J.line,muted:e.muted||J.muted}}var Yi=.4,Ki="#f5f1e8",$o="#0a0a0a";function $i(e){let t=te(e).text,o=xe(t);return o===null||o>=Yi?t:null}var Vi=4.5,ji=3,ep={good:"Good","large-only":"Large text only",hard:"Hard to read"};function tp(e){return e>=Vi?"good":e>=ji?"large-only":"hard"}var Xi=["#000000","#ffffff"];function Re(e){return zo(e,Xi)}function Zo(e,t){let o=t!==void 0&&xe(t)!==null?t:Ki;return zo(e,[$o,o])===o&&o!==$o}var zi=[.25,.4,.55];function op(e){let t=ve(e);return t===null?[]:zi.map(o=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-o)).toString(16).padStart(2,"0")).join(""))}function ap(e){let t={"--theme-fg":te(e).text},o=$i(e);return o!==null&&(t["--overlay-fg"]=o),t}var qi=82;function ft(e){return`color-mix(in srgb, ${e} ${qi}%, #000)`}function sp(e){let t=te(e);return{"--theme-accent":t.accent,"--theme-accent-2":ft(t.accent),"--theme-accent-ink":Re(t.accent)}}function wt(e){let t=e?.button;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function np(e){let t=te(e),o=wt(t),a=Jo(t);if(o===null&&a===null)return{};let s={};return o!==null&&(s["--theme-btn"]=o,s["--theme-btn-2"]=ft(o)),s["--theme-btn-ink"]=a??Re(o),s}function Jo(e){let t=e?.buttonInk;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function Qi(e,t){return Jo(e)??Re(wt(e)??t)}function ip(e){let t=te(e);return{fill:wt(t)??t.accent.toLowerCase(),ink:Qi(t,t.accent)}}function rp(e){let t={};return Qo(e).themes.forEach((o,a)=>{let s=ee(o);t[`--theme-preset-${a}-accent`]=s.accent,t[`--theme-preset-${a}-accent-2`]=ft(s.accent),t[`--theme-preset-${a}-accent-ink`]=Re(s.accent),t[`--theme-preset-${a}-bg`]=s.background,t[`--theme-preset-${a}-fg`]=s.text,t[`--theme-preset-${a}-surface`]=s.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${s.surface} 60%, ${s.line})`,t[`--theme-preset-${a}-line`]=s.line,t[`--theme-preset-${a}-muted`]=s.muted}),t}var nt=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},it=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function Vo([e,t,o]){let[a,s,n]=[nt(e),nt(t),nt(o)],i=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*n),r=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*n),c=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*n);return[.2104542553*i+.793617785*r-.0040720468*c,1.9779984951*i-2.428592205*r+.4505937099*c,.0259040371*i+.7827717662*r-.808675766*c]}function Zi([e,t,o]){let a=(e+.3963377774*t+.2158037573*o)**3,s=(e-.1055613458*t-.0638541728*o)**3,n=(e-.0894841775*t-1.291485548*o)**3;return[it(4.0767416621*a-3.3077115913*s+.2309699292*n),it(-1.2684380046*a+2.6097574011*s-.3413193965*n),it(-.0041960863*a-.7034186147*s+1.707614701*n)]}var dt=e=>{let t=ve(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},ea=(e,t,o)=>[e[0]*o+t[0]*(1-o),e[1]*o+t[1]*(1-o),e[2]*o+t[2]*(1-o)],ta=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,oa=e=>ea(dt(e.surface),dt(e.line),.6);function lp(e){return ta(oa(ee(e)))}function Ji(e){let t=ee(e);return ta(Zi(ea(Vo(oa(t)),Vo(dt(t.text)),.92)))}function aa(e,t,o,a){let s=e[t];if(!s)return-1;let n=o(s);if(!n)return-1;let i=ee(s);return e.findIndex((r,c)=>{if(c===t)return!1;let h=ee(r);return D(h.background)!==n?!1:!a||D(h.text??"")===D(i.text??"")&&D(h.accent??"")===D(i.accent??"")})}function cp(e,t){return aa(e,t,Ji,!1)}function dp(e,t){return aa(e,t,o=>D(o.surface??""),!0)}var er=1;function tr(e,t){let o=(e??[]).flatMap((a,s)=>{let n=xe(a.background??""),i=xe(a.text??"");return n!==null&&i!==null&&n<i?[s]:[]});return o.find(a=>a!==t)??o[0]??er}function hp(e){return tr(e?.themes,e?.selected)}var up=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function pp(e){let t=ee(te(e)),o=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,a={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==J.surface||t.line!==J.line)&&(a["--theme-surface-2"]=o),a}var or=["heading","body","label"];function mp(e){if(!e)return null;for(let t of or)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var sa=["headingLarge","headingMedium","headingSmall","accent","body","label"];var gt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ar=8,sr=200;function nr(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=ar&&t<=sr?t:null}function ir(e){let t={};for(let o of sa)t[o]=nr(e?.[o]);return t}function fp(e){let t=ir(e),o={};for(let a of sa){let s=t[a];s!==null&&(o[`--size-${a}`]=`${s}px`)}return o}var rr=["square","small","large"],lr="small";function wp(e){return rr.includes(e??"")?e:lr}var Ae=0,cr={min:Ae,max:qo,step:1},gp={square:0,small:null,large:16},ht={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function bt(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(qo,Math.max(Ae,Math.round(t))):null}function jo(e,t){if(Bi(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};let a=Math.max(0,e);return Object.fromEntries(Object.entries(ht).map(([s,n])=>{let i=Math.round(a*n*1e4)/1e4;return[s,i===0?"0":tt(i,t)]}))}let o=bt(e);return o===null?{}:Object.fromEntries(Object.entries(ht).map(([a,s])=>{let n=o*s/16;return[a,n===0?"0":`${n}rem`]}))}function bp(e){return(bt(e)??Ae)*ht["--sf-button-radius"]}function yp(e,t){let o=at(e,t,"radius",cr);return o!==null?jo(o,t):jo(bt(e)??Ae)}var dr=["none","soft","lifted"],hr="soft",na="none",ur=["tight","normal","roomy"],pr="normal",Le="normal",mr=["none","lift","highlight"],fr="lift",wr="highlight";function ia(e){return dr.includes(e??"")?e:hr}function gr(e){return ur.includes(e??"")?e:pr}function ra(e){return mr.includes(e??"")?e:fr}function Sp(e){let t=ia(e);return t===na?void 0:t}function _p(e){let t=gr(e);return t===Le?void 0:t}function Op(e){let t=ra(e);return t===wr?void 0:t}function vp(e,t,o){let a=Di(t);return a===Hi?{}:ia(e)!==na||ra(o)==="lift"?{"--sf-shadow-color":a}:{}}var br=["normal","tight","compressed"],me="normal";function la(e){return br.includes(e??"")?e:me}function xp(e){let t=la(e);return t===me?void 0:t}function kp(e){switch(la(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var Xo=["authored","sentence"],yt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},rt=100,lt=900,yr=24,Er=200;function Oe(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function ca(e){let t=Oe(e?.weight,rt,lt),o=ct(Xo,"authored",e?.case),a=n=>n==null?t:Oe(n,rt,lt),s=n=>ct(Xo,o,n);return{case:o,weight:t,weightStrong:Oe(e?.weightStrong,rt,lt),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Oe(e?.maxPx,yr,Er),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:s(e?.case2),case3:s(e?.case3)}}function Rp(e){let t=ca(e),o={};return t.case==="sentence"&&(o["--sf-heading-case"]="none"),t.weight!==null&&(o["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(o["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(o["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(o["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(o["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(o["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(o["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),o}function Ap(e){return ca({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}var ut="siteTheme";function Tr(e){let t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(a=>!!a&&typeof a=="object"))return{};let o=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[ut]:{selected:o,themes:t.themes}}}function Lp(e){return Tr(e?.[ut])[ut]}import{parseHexColor as Sr}from"efficient-shell/format";var Et=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],_r=Et.filter(e=>e.ink);function da(e){let t={color:e.fg};for(let{role:o,token:a}of _r)t[a]=e[o];return t}var Or={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},vr=Object.freeze(da(Or)),xr={fg:"var(--overlay-fg-on-light)",line:"color-mix(in srgb, var(--overlay-fg-on-light) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg-on-light) 76%, transparent)"},kr=Object.freeze(da(xr));function Np(e,t){let o=e?Sr(e):null;return o?Zo(o,t)?vr:kr:null}import{jsx as pa}from"react/jsx-runtime";import{createContext as Lr,useCallback as m,useContext as Cr,useMemo as Ir,useState as Pr}from"react";import{createContext as ua,useContext as Tt}from"react";import{createContext as Rr}from"react";var ha=Rr(null);var Ar=ua(null),St=ua({logo:null,placeholder:!1,wordmark:null});function Gp(){let e=Tt(ha),t=Tt(Ar),o=Tt(St),a=!e&&o.placeholder,s=e?e.logoUrl:o.logo?.logoUrl??t?.logoUrl??null;return{src:a?null:s,reversedSrc:e?e.logoReversed:o.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:o.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:o.wordmark,siteName:e?.siteName??t?.siteName}}var ma={},fa=Lr({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:pt,setThemeMode:()=>{},themeSwitchShown:mt,setThemeSwitchShown:()=>{},theme:ke,themeRow:"none",setTheme:()=>{},fonts:G,setFonts:()=>{},sizes:gt,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:Le,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:me,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:ma,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:yt,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function jp({children:e,websiteName:t=null,templateChrome:o=!1,templateName:a=null,chromePlaceholder:s=!1,themeMode:n=pt,onThemeModeChange:i,themeSwitchShown:r=mt,onThemeSwitchShownChange:c,theme:h=ke,themeRow:_="none",onThemeChange:O,fonts:Ze=G,onFontsChange:mo,sizes:En=gt,onSizesChange:fo,cornerRadiusPx:Tn=null,onCornerRadiusPxChange:wo,cardShadow:Sn=null,onCardShadowChange:go,shadowColor:_n=null,onShadowColorChange:bo,cardGap:On=Le,onCardGapChange:yo,hoverEffect:vn=null,onHoverEffectChange:Eo,headingCompression:xn=me,onHeadingCompressionChange:To,siteWidth:kn=null,onSiteWidthChange:So,siteGutter:Rn=null,siteGutterPhone:An=null,blockGap:Ln=null,blockGapPhone:Cn=null,siteLengthUnits:In=ma,onSiteLengthUnitsChange:_o,onSiteGutterChange:Oo,onSiteGutterPhoneChange:vo,onBlockGapChange:xo,onBlockGapPhoneChange:ko,headingTypography:Pn=yt,onHeadingTypographyChange:Ro,textStyles:Nn=null,onTextStylesChange:Ao,wordStyles:Hn=null,heroBackgroundFollowsWidth:Dn=null,onHeroBackgroundFollowsWidthChange:Lo,sectionBackgroundWidth:Bn=null,onSectionBackgroundWidthChange:Co,sectionContentWidth:Mn=null,onSectionContentWidthChange:Io,photographyGrayscale:Fn=null,onPhotographyGrayscaleChange:Po,shareButtonOnPosts:Gn=null,onShareButtonOnPostsChange:No,themeFromDocument:Wn=!1}){let[pe,Ho]=Pr(null),Un=m(l=>Ho(mi=>mi??l),[]),Yn=m(l=>i?.(l),[i]),Kn=m(l=>c?.(l),[c]),$n=m(l=>O?.(l),[O]),Vn=m(l=>mo?.(l),[mo]),jn=m(l=>fo?.(l),[fo]),Xn=m(l=>So?.(l),[So]),zn=m(l=>Oo?.(l),[Oo]),qn=m(l=>vo?.(l),[vo]),Qn=m(l=>xo?.(l),[xo]),Zn=m(l=>ko?.(l),[ko]),Jn=m(l=>_o?.(l),[_o]),ei=m(l=>Lo?.(l),[Lo]),ti=m(l=>Co?.(l),[Co]),oi=m(l=>Io?.(l),[Io]),ai=m(l=>Po?.(l),[Po]),si=m(l=>No?.(l),[No]),ni=m(l=>wo?.(l),[wo]),ii=m(l=>go?.(l),[go]),ri=m(l=>bo?.(l),[bo]),li=m(l=>yo?.(l),[yo]),ci=m(l=>Eo?.(l),[Eo]),di=m(l=>To?.(l),[To]),hi=m(l=>Ro?.(l),[Ro]),ui=m(l=>Ao?.(l),[Ao]),Do=pe?.logoUrl,Bo=pe?.logoReversed,Mo=pe?.logoInkIsDark,Fo=pe!==null,pi=Ir(()=>({logo:Fo?{logoUrl:Do,logoReversed:Bo,logoInkIsDark:Mo}:null,placeholder:o||s,wordmark:o?a:t}),[Fo,Do,Bo,Mo,o,s,a,t]);return pa(St.Provider,{value:pi,children:pa(fa.Provider,{value:{settings:pe,setSettings:Ho,primeSettings:Un,websiteName:t,templateChrome:o,templateName:a,chromePlaceholder:s,themeMode:n,setThemeMode:Yn,themeSwitchShown:r,setThemeSwitchShown:Kn,theme:h,themeRow:_,setTheme:$n,fonts:Ze,setFonts:Vn,sizes:En,setSizes:jn,cornerRadiusPx:Tn,setCornerRadiusPx:ni,cardShadow:Sn,setCardShadow:ii,shadowColor:_n,setShadowColor:ri,cardGap:On,setCardGap:li,hoverEffect:vn,setHoverEffect:ci,headingCompression:xn,setHeadingCompression:di,siteWidth:kn,setSiteWidth:Xn,siteGutter:Rn,siteGutterPhone:An,blockGap:Ln,blockGapPhone:Cn,siteLengthUnits:In,setSiteLengthUnits:Jn,setSiteGutter:zn,setSiteGutterPhone:qn,setBlockGap:Qn,setBlockGapPhone:Zn,headingTypography:Pn,setHeadingTypography:hi,textStyles:Nn,setTextStyles:ui,wordStyles:Hn,heroBackgroundFollowsWidth:Dn,setHeroBackgroundFollowsWidth:ei,sectionBackgroundWidth:Bn,setSectionBackgroundWidth:ti,sectionContentWidth:Mn,setSectionContentWidth:oi,photographyGrayscale:Fn,setPhotographyGrayscale:ai,shareButtonOnPosts:Gn,setShareButtonOnPosts:si,themeFromDocument:Wn},children:e})})}var Nr=()=>Cr(fa);function Xp(e,t,o){return e?t===o?"read":"loading":"none"}function zp(e,t){return{value:e,readFor:t}}function qp(e,t,o){return{value:t,readFor:e.readFor===o?o:null}}function Qp(){let{sectionContentWidth:e,themeFromDocument:t}=Nr();return t?null:e}var em=["general","commerce","service"],oe=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function tm(){return Object.fromEntries(oe.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var Hr="2027-02-05",Dr="2027-02-14",wa={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
|
|
2
2
|
|
|
3
3
|
WHAT REPLACES IT: Tab Bar, a Box pinned under the header that stays above the sections after it, with a line below, holding the Menu block (One row, Menu style Tabs, Current page). Set the Menu's content to Blog categories: the blog's own categories, most posts first, each with its count in its cell (the host seeds the count card, Count on). Its converter row (\`section-to-box-rows-tabbar\` \`categoryBar\`, OFF) draws that bar for a stored page that moves later.
|
|
4
4
|
|