efficient-storefront-blocks 0.90.0 → 0.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/chunks/{EditorPreviewCheckout-M4LID5YF.js → EditorPreviewCheckout-VHPWPS3N.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-2JWQZN2Q.js → SiteEditorProvider-C4HT4BT4.js} +1 -1
- package/dist/chunks/chunk-7L5DVQZ4.js +1 -0
- package/dist/chunks/chunk-PW7BA4ZJ.js +1 -0
- package/dist/chunks/{chunk-3XIZADE6.js → chunk-RAOSZKA3.js} +1 -1
- package/dist/chunks/chunk-S2WLJ6H2.js +388 -0
- package/dist/chunks/{fitment-data-3VLLTJW6.js → fitment-data-URJZ24LU.js} +1 -1
- package/dist/contract.js +11 -19
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/lib/document/block-align-row.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/AlloyWheelsListing/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryItem/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/AppointmentBooking/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Events/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/config.d.ts +2 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/storefront-editor-words-kept.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +8 -7
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +53 -39
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +10 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/AppointmentBooking.d.ts +2 -1
- package/dist/render/components/AppointmentBooking.js +1 -1
- package/dist/render/components/ContactRouting.d.ts +2 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/Events.d.ts +3 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterMenu.d.ts +3 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/FooterPayment.js +1 -1
- package/dist/render/components/FooterSocial.js +1 -1
- package/dist/render/components/GridCardTemplate.d.ts +30 -1
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/components/ProductGridSection.d.ts +2 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/PublishedFooter.js +1 -1
- package/dist/render/components/PublishedHeader.js +1 -1
- package/dist/render/components/RatingBlockView.d.ts +5 -0
- package/dist/render/components/RatingBlockView.js +1 -0
- package/dist/render/components/ReviewForm.js +1 -1
- package/dist/render/components/TyrePlpCard.d.ts +2 -1
- package/dist/render/components/TyrePlpCard.js +1 -1
- package/dist/render/components/TyreSummaryCard.d.ts +2 -1
- package/dist/render/components/TyreSummaryCard.js +1 -1
- package/dist/render/components/WheelCardFrame.d.ts +1 -2
- package/dist/render/components/WheelCardFrame.js +1 -1
- package/dist/render/components/card-pieces/CardPicture.d.ts +1 -1
- package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.d.ts +2 -1
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +5 -14
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/lib/api/index.d.ts +3 -1
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/chrome-cache.d.ts +1 -0
- package/dist/render/lib/chrome-cache.js +1 -1
- package/dist/render/lib/content/events-featured-look.d.ts +3 -0
- package/dist/render/lib/content/events-featured-look.js +1 -0
- package/dist/render/lib/content/menu-card-seed.d.ts +4 -0
- package/dist/render/lib/content/menu-card-seed.js +1 -1
- package/dist/render/lib/content/menu-entry-type.d.ts +2 -0
- package/dist/render/lib/content/menu-entry-type.js +1 -0
- package/dist/render/lib/content/product-card-seed.d.ts +7 -0
- package/dist/render/lib/content/product-card-seed.js +1 -1
- package/dist/render/lib/content/rating.d.ts +1 -0
- package/dist/render/lib/content/rating.js +1 -0
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductColour/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductEyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductPrice/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductSpecs/render.js +1 -1
- package/dist/render/lib/document/blocks/service/AppointmentBooking/render.js +1 -1
- package/dist/render/lib/document/blocks/service/ContactRouting/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Events/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/service/Events/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/document/blocks/service/RatingBlock/meta.d.ts +2 -1
- package/dist/render/lib/document/blocks/service/RatingBlock/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/RatingBlock/render.js +1 -1
- package/dist/render/lib/document/card-templates.d.ts +3 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/footer-page-blocks.js +1 -1
- package/dist/render/lib/document/published-chrome-data.d.ts +2 -0
- package/dist/render/lib/document/published-chrome-data.js +1 -0
- package/dist/render/lib/document/render-config.d.ts +2 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-detail.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-events.d.ts +1 -0
- package/dist/render/lib/document/section-to-box-rows-events.js +1 -0
- package/dist/render/lib/document/section-to-box-rows-reviews.d.ts +2 -1
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-service.d.ts +1 -0
- package/dist/render/lib/document/section-to-box-rows-service.js +1 -0
- package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
- package/dist/render/lib/sections/grid-no-hole.d.ts +1 -1
- package/dist/render/lib/sections/product-pictures.d.ts +2 -1
- package/dist/render/lib/sections/product-pictures.js +1 -1
- package/dist/render/lib/wheels/plp-hydrate.d.ts +3 -0
- package/dist/render/lib/wheels/plp-hydrate.js +1 -1
- package/dist/words.d.ts +19 -7
- package/dist/words.js +5 -5
- package/package.json +4 -2
- package/dist/chunks/chunk-6TDIG6W3.js +0 -395
- package/dist/chunks/chunk-JMUP4FBL.js +0 -1
- package/dist/chunks/chunk-U6UPMVSX.js +0 -1
- package/dist/render/components/wheels-plp/PlpCard.d.ts +0 -29
- package/dist/render/components/wheels-plp/PlpCard.js +0 -1
- package/dist/render/lib/content/legacy-block-align.d.ts +0 -2
- package/dist/render/lib/content/legacy-block-align.js +0 -1
- /package/dist/chunks/{chunk-N445XY3W.js → chunk-JB6ISWYA.js} +0 -0
- /package/dist/chunks/{chunk-6TDIG6W3.js.LEGAL.txt → chunk-S2WLJ6H2.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PREVIEW_TOKEN_HEADER as at,SITE_HOST_HEADER as st,SITE_SLUG_HEADER as nt}from"../site-headers.js";import{PRODUCT_API_BASE as ot,PRODUCT_BACKEND_URL as D}from"./origins.js";import{backendHopHeaders as it,clientIpFromForwardedFor as ct,FORWARDED_FOR_HEADER as dt,hopCachingOf as ut}from"../forwarded-for.js";import lt from"efficient-web-builder/format/lib/document/media-manifest.json";import{auth as P}from"../auth.js";import{efficientClientOpen as pt}from"efficient-easel/screen/lib/session";import{listableWheelSummaries as U}from"../wheels/listable-wheels.js";import{dropRenderlessFinishes as x}from"../wheels/renderable-finishes.js";const yt=process.env.NEXT_PUBLIC_API_URL??"http://localhost:8000";class m extends Error{status;data;constructor(e,s,o){super(s),this.status=e,this.data=o}}const N="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.",ht=new Set([502,503,504]),I=0,ft="This editor runs on its host's own backend, which does not serve this request.",gt=5e3,wt=15e3,mt=()=>typeof window>"u"?gt:wt;function H(t){const e=(t.method??"GET").toUpperCase();if(!(t.body!=null||e!=="GET"&&e!=="HEAD")&&!(t.audience!=null&&t.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(mt())}const F=t=>t instanceof Error&&t.name==="TimeoutError",M=(t,e)=>ht.has(t)?N:e,St=["admin","venue"];let B="admin";function ie(t){B=St.includes(t)?t:"admin"}function Pt(){return B}const Ot=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/;let q=null;function ce(t){q=t&&Ot.test(t)?t:null}function bt(){return q}function At(t){if(typeof window>"u"||!t.startsWith("/api/v1/"))return t;const e=K();return!e||/[?&]site=/.test(t)?t:E(t,`site=${encodeURIComponent(e)}`)}async function i(t,e={}){const{token:s,baseUrl:o,headers:l,audience:p,...w}=e;if(typeof window<"u"&&!pt())throw new m(I,ft,null);if(typeof window>"u"&&o===void 0)throw new Error(`apiFetch(${JSON.stringify(t)}) 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.`);const r=typeof FormData<"u"&&w.body instanceof FormData;let a;try{a=await fetch(`${o??yt}${At(t)}`,{...w,headers:{...r?{}:{"Content-Type":"application/json"},...s?{Authorization:`Bearer ${s}`}:{},...p===null?{}:{"X-Portal-Audience":p??"shop"},...l},signal:w.signal??H({...w,audience:p})})}catch(y){throw y instanceof TypeError||F(y)?new m(I,N,null):y}let n;try{n=await a.text()}catch(y){throw F(y)?new m(I,N,null):y}let c=null;if(n)try{c=JSON.parse(n)}catch{throw new m(a.status,a.ok?"Expected JSON but received a non-JSON response":M(a.status,a.statusText),n)}if(!a.ok){const y=(c&&typeof c=="object"&&"detail"in c&&typeof c.detail=="string"?c.detail:null)??M(a.status,a.statusText);throw new m(a.status,y,c)}return c}let b=null;async function G(){return b||(b=Tt().finally(()=>{b=null}),b)}async function Tt(){const t=P.takeLegacyRefresh(),e=await Rt.refresh(t??void 0);return P.setTokens(e.access),e.access}async function W(){return P.getAccess()??G()}async function h(t,e={}){let s;try{s=await W()}catch{throw P.clear(),new m(401,"Not signed in",null)}try{return await i(t,{...e,token:s})}catch(o){if(!(o instanceof m)||o.status!==401)throw o;try{const l=await G();return await i(t,{...e,token:l})}catch{throw P.clear(),o}}}async function j(t,e={}){if(P.getAccess())try{return{data:await h(t,e),asShopper:!0}}catch(s){if(!(s instanceof m)||s.status!==401)throw s}return{data:await i(t,e),asShopper:!1}}async function z(){const t=await h("/api/auth/me/");if(t.portal!=="shop")throw P.clear(),new m(403,"This session is not valid for this shop.",null);return t}const Rt={login:(t,e)=>i("/api/auth/login/",{method:"POST",body:JSON.stringify({email:t,password:e,portal:"shop"}),credentials:"include"}),refresh:t=>i("/api/auth/refresh/",{method:"POST",body:JSON.stringify(t?{refresh:t,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{P.clear();try{await i("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{const t=await W();return await z(),t},me:z,updateMe:t=>h("/api/auth/me/",{method:"PATCH",body:JSON.stringify(t)}),changePassword:(t,e)=>h("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:e,old_password:t})}),changeEmail:(t,e)=>h("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:t,current_password:e})}),myProfile:()=>h("/api/shop-portal/profile/"),updateMyProfile:t=>h("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(t)}),myAddresses:()=>h("/api/shop-portal/delivery-locations/"),createAddress:t=>h("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(t)}),updateAddress:(t,e)=>h(`/api/shop-portal/delivery-locations/${t}/`,{method:"PATCH",body:JSON.stringify(e)}),deleteAddress:t=>h(`/api/shop-portal/delivery-locations/${t}/`,{method:"DELETE"}),passwordResetRequest:t=>i("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:t})}),passwordResetConfirm:(t,e,s)=>i("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:t,token:e,new_password:s})}),brands:()=>h("/api/products/brands/"),myOrders:()=>h("/api/shop-portal/orders/").then(t=>t.results),myOrder:t=>h(`/api/shop-portal/orders/${t}/`),cancelOrder:t=>h(`/api/shop-portal/orders/${t}/cancel/`,{method:"POST"}),myReturns:t=>h(`/api/shop-portal/returns/${t?`?order=${encodeURIComponent(t)}`:""}`).then(e=>e.results),createReturn:t=>h("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(t)}),withdrawReturn:t=>h(`/api/shop-portal/returns/${t}/cancel/`,{method:"POST"}),uploadReturnPhoto:(t,e)=>{const s=new FormData;return s.append("claim_item",t),s.append("file",e),s.append("media_type",e.type.startsWith("video/")?"video":"image"),h("/api/shop-portal/return-media/",{method:"POST",body:s})}};import{media as Et,absolutizeApiUrl as v}from"efficient-web-builder/render/lib/media";import{analyzeLogoSvg as Ct,isSvgUrl as $t}from"efficient-web-builder/format/lib/logo/reverse-svg";import{getEditorSiteId as _t}from"efficient-web-builder/render/lib/editor-site";import{shopRouteBase as Ut,webRuntimeSiteSlug as K}from"efficient-web-builder/format/lib/web-runtime";function g(t){if(typeof t=="string")return t.startsWith("/media/")?Et(t):t;if(Array.isArray(t))return t.map(g);if(t&&typeof t=="object"){const e={};for(const[s,o]of Object.entries(t))e[s]=s==="captions"&&o&&typeof o=="object"&&!Array.isArray(o)?Object.fromEntries(Object.entries(o).map(([l,p])=>[g(l),p])):g(o);return e}return t}import{PRODUCT_API_BASE as Pe}from"./origins.js";const V=typeof window>"u"&&D!=="",Nt=V?D:ot,It=Ut,O=()=>({baseUrl:It(),audience:null});function d(t,e){const s=e?`?process=${encodeURIComponent(e)}`:"";return`/api/v1${t}${s}`}const X=100,Z=50;function k(t,e,s){const o=new URLSearchParams;for(const[l,p]of Object.entries(e))p!=null&&p!==""&&o.set(l,String(p));return o.set("pageSize",String(X)),s&&o.set("cursor",s),`/api/v1${t}?${o.toString()}`}function vt(t,e){return k("/wheels",{process:t},e)}const Y=X;function kt(t,e){return k("/wheels",{slug:t.join(",")},e)}function Jt(t,e,s){return k("/products",{kind:t.join(","),make:e?.make,model:e?.model,year:e?.year,modification:e?.modification},s)}function Lt(t){if(!t)return null;try{return new URL(t,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function J(t,e,s=()=>!1){const o=[];let l=null;try{for(let p=0;p<Z;p++){const w=await i(await e(l),await u());if(o.push(...w.results),l=Lt(w.next),!l)break}l&&console.warn(`[${t}] stopped at ${Z} pages (${o.length} rows); catalog may be truncated`)}catch(p){if(s(p))throw p;console.warn(`[${t}] product API unavailable, returning []`,p)}return o}const Q=t=>t instanceof m&&t.status===400;function Dt(t){return t.flatMap(e=>e.kind==="alloy-wheel"?U([e]):[e])}async function tt(){return(await xt()).host}async function xt(){try{const{headers:t}=await import("next/headers"),e=await t(),s=p=>p?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,o=s(e.get(st)??e.get("x-forwarded-host")??e.get("host")),l=s(e.get("host"));return{host:o,matchesRequestHost:o!==null&&o===l}}catch{return{host:null,matchesRequestHost:!1}}}async function Ht(){try{const{headers:t}=await import("next/headers");return ct((await t()).get(dt))}catch{return null}}async function Ft(){try{const{headers:t}=await import("next/headers");return(await t()).get(nt)||null}catch{return null}}async function Mt(){const t=await Ft();if(t)return`site=${encodeURIComponent(t)}`;const e=await tt();return e?`host=${encodeURIComponent(e)}`:""}async function f(t){if(typeof window<"u"){const e=K();return e?E(t,`site=${encodeURIComponent(e)}`):t}return E(t,await Mt())}function E(t,e){return e?`${t}${t.includes("?")?"&":"?"}${e}`:t}const Bt="preview";async function qt(){if(typeof window<"u")return null;try{const{headers:t}=await import("next/headers");return(await t()).get(at)}catch{return null}}async function Gt(){try{const{headers:t}=await import("next/headers");return(await t()).get("user-agent")}catch{return null}}async function L(t,e){const s=await qt();if(s===null)return[await f(t),await u(e)];const o=E(await f(t),`${Bt}=${encodeURIComponent(s)}`),{next:l,cache:p,...w}=e??{},r=await u({...w,cache:"no-store"}),a=await Gt();return a&&(r.headers={...r.headers,"user-agent":a}),[o,r]}async function Wt(t){if(!V)return;const[e,s]=await Promise.all([tt(),Ht()]),o=it(e,s,t);return Object.keys(o).length>0?o:void 0}async function u(t){const e=await Wt(ut(t)),s={baseUrl:Nt,...t};return e&&(s.headers={...e,...t?.headers}),s}const A=typeof window>"u";function T(t,e){const s=new URLSearchParams;for(const[l,p]of Object.entries(e))p!==void 0&&p!==""&&s.set(l,String(p));const o=s.toString();return`/api/v1/fitment${t}${o?`?${o}`:""}`}const ye={listMakes:async t=>{if(A){const{fitmentData:s}=await import("./fitment-data.js");return s.makes(t)}return(await i(T("/makes",{region:t}),O())).results},listModels:async(t,e)=>{if(A){const{fitmentData:o}=await import("./fitment-data.js");return o.models(t,e)}return(await i(T("/models",{make:t,region:e}),O())).results},listYears:async(t,e,s)=>{if(A){const{fitmentData:l}=await import("./fitment-data.js");return l.years(t,e,s)}return(await i(T("/years",{make:t,model:e,region:s}),O())).results},listModifications:async(t,e,s,o)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.modifications(t,e,s,o)}return(await i(T("/modifications",{make:t,model:e,year:s,region:o}),O())).results},getStockFitment:async(t,e,s,o,l)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.stockFitment(t,e,s,o,l)}return i(T("/stock-fitment",{make:t,model:e,year:s,modification:o,region:l}),O())}},he={listWheels:async(t,e={})=>{const s=await J("products.listWheels",async o=>await f(vt(t,o)),e.throwOnFailure?()=>!0:void 0);return U(g(s))},listWheelsBySlug:async(t,e={})=>{const s=[...new Set(t.map(r=>r.trim()).filter(Boolean))];if(s.length===0)return[];const o=[];for(let r=0;r<s.length;r+=Y)o.push(s.slice(r,r+Y));const l=await Promise.all(o.map(r=>J("products.listWheelsBySlug",async a=>await f(kt(r,a)),e.throwOnFailure?()=>!0:Q))),p=new Set(s),w=l.flat().filter(r=>p.has(r.slug));return U(g(w))},listCatalog:async(t,e)=>{if(t.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` — so the call would silently return the wheel catalog instead of nothing.");const s=await J("products.listCatalog",async o=>await f(Jt(t,e,o)),Q);return Dt(g(s))},getWheel:async t=>x(g(await i(await f(d(`/wheels/${t}`)),await u()))),getTyre:async t=>g(await i(await f(d(`/tyres/${t}`)),await u())),listBundles:async(t={})=>{try{return await i(await f(d("/bundles")),await u())}catch(e){if(t.throwOnFailure)throw e;return[]}},getBundle:async t=>i(await f(d(`/bundles/${t}`)),await u()),listGalleryBuilds:async(t={})=>{const{process:e=null,wheelSlug:s=null}=t;if(typeof window>"u"){const{listGalleryBuilds:o}=await import("./gallery-builds-data.js");return g(o(e,s))}try{const o=new URLSearchParams;e&&o.set("process",e),s&&o.set("wheelSlug",s);const l=o.toString(),p=await i(`/api/v1/gallery-builds${l?`?${l}`:""}`,O());return g(p.results)}catch(o){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",o),[]}},getSite:async()=>i(await f(d("/site")),await u()),getSiteBySlug:async t=>i(`${d("/site")}?${new URLSearchParams({site:t})}`,typeof window>"u"?await u():void 0),listPages:async()=>g(await i(await f(d("/pages")),await u())),listPopups:async()=>i(await f(d("/popups")),await u()),listProductTemplates:async()=>{try{return await i(await f(d("/product-templates")),await u())}catch(t){return console.warn("[products.listProductTemplates] unavailable, returning []",t),[]}},listDynamicPages:async t=>{const e=t?`?recordType=${encodeURIComponent(t)}`:"";try{return await i(await f(`${d("/dynamic-pages")}${e}`),await u())}catch(s){if(s instanceof m&&s.status===404)return[];throw s}},getRecord:async(t,e)=>{try{return await i(await f(d(`/records/${encodeURIComponent(t)}/${encodeURIComponent(e)}`)),await u())}catch(s){if(s instanceof m&&s.status===404)return null;throw s}},listRecordKeys:async t=>{try{const e=await i(await f(d(`/records/${encodeURIComponent(t)}`)),await u({cache:"no-store"}));return Array.isArray(e?.keys)?e.keys.filter(s=>typeof s=="string"&&s!==""):[]}catch(e){if(e instanceof m&&e.status===404)return[];throw e}},listProductTypeChoices:async()=>{try{return await i(await f(d("/product-type-choices")),await u())}catch(t){return console.warn("[products.listProductTypeChoices] unavailable, returning []",t),[]}},listFieldUsage:async()=>{try{return await i(await f(d("/field-usage")),await u())}catch(t){return console.warn("[products.listFieldUsage] unavailable, returning []",t),[]}},getPage:async(t,e={})=>{const s=e.record?`?record=${encodeURIComponent(e.record)}`:"",[o,l]=await L(d(`/pages/${t}`)+s,e.revalidate!==void 0?{next:{revalidate:e.revalidate}}:void 0);return g(await i(o,l))},listBlogPosts:async(t={},{throwOnFailure:e=!1}={})=>{const s=t.category?`?category=${encodeURIComponent(t.category)}`:"";try{return(await i(d("/blog-posts")+s,await u())).map(l=>({...l,coverImage:v(l.coverImage)??""}))}catch(o){if(e)throw o;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",o),[]}},getBlogPost:async t=>{const e=await i(d(`/blog-posts/${t}`),await u());return{...e,coverImage:v(e.coverImage)??""}},createOrder:async t=>i(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),createOrderAuthed:async t=>h(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),lookupOrder:async t=>i(d("/orders/lookup"),await u({method:"POST",body:JSON.stringify(t)})),createPaymentIntent:async t=>i(d("/payments/intent"),await u({method:"POST",body:JSON.stringify(t)})),releaseCheckout:async t=>i(d("/checkouts/release"),await u({method:"POST",body:JSON.stringify(t)})),createPaypalOrder:async t=>i(d("/payments/paypal/order"),await u({method:"POST",body:JSON.stringify(t)})),capturePaypalOrder:async t=>i(d("/payments/paypal/capture"),await u({method:"POST",body:JSON.stringify(t)})),createAfterpayCheckout:async t=>i(d("/payments/afterpay/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureAfterpayPayment:async t=>i(d("/payments/afterpay/capture"),await u({method:"POST",body:JSON.stringify(t)})),chargeSquare:async t=>i(d("/payments/square/charge"),await u({method:"POST",body:JSON.stringify(t)})),createGocardlessBillingRequest:async t=>i(d("/payments/gocardless/billing-request"),await u({method:"POST",body:JSON.stringify(t)})),completeGocardlessPayment:async t=>i(d("/payments/gocardless/complete"),await u({method:"POST",body:JSON.stringify(t)})),createZipCheckout:async t=>i(d("/payments/zip/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureZipPayment:async t=>i(d("/payments/zip/capture"),await u({method:"POST",body:JSON.stringify(t)})),createKlarnaCheckout:async t=>i(d("/payments/klarna/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureKlarnaPayment:async t=>i(d("/payments/klarna/capture"),await u({method:"POST",body:JSON.stringify(t)})),createStockAlert:async t=>i(d("/stock-alerts"),await u({method:"POST",body:JSON.stringify(t)})),createPreOrderIntent:async t=>i(d("/pre-order-intents"),await u({method:"POST",body:JSON.stringify(t)})),createNewsletterSubscription:async t=>i(d("/newsletter-subscriptions"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeNewsletter:async t=>i(d("/newsletter-unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),captureCart:async t=>i(d("/carts"),await u({method:"POST",body:JSON.stringify(t)})),restoreCart:async t=>i(d("/carts/restore"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeCartReminders:async t=>i(d("/carts/unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),listReviews:async(t={})=>{const e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.designCode&&e.set("designCode",t.designCode);const s=d("/reviews"),o=e.toString();try{return await i(await f(o?`${s}?${o}`:s),await u())}catch(l){return console.warn("[products.listReviews] product API unavailable, returning []",l),[]}},submitReview:async t=>i(d("/reviews"),await u({method:"POST",body:JSON.stringify(t)})),getForm:async t=>i(d(`/forms/${encodeURIComponent(t)}`),await u()),submitForm:async(t,e)=>i(d(`/forms/${encodeURIComponent(t)}/submissions`),await u({method:"POST",body:JSON.stringify(e)})),listShippingMethods:async()=>{try{return await i(d("/shipping-methods"),await u())}catch(t){return console.warn("[products.listShippingMethods] product API unavailable, returning []",t),[]}},listCountrySubdivisions:async t=>{try{return await i(d(`/countries/${encodeURIComponent(t)}/subdivisions`),await u())}catch(e){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",e),[]}},quoteCart:async t=>{const e=d("/cart/quote"),s=await u({method:"POST",body:JSON.stringify(t)});return t.couponCode?(await j(e,s)).data:i(e,s)},validateCoupon:async t=>{const{data:e,asShopper:s}=await j(d("/coupons/validate"),await u({method:"POST",body:JSON.stringify(t)}));return{...e,askedAsShopper:s}},getHeaderSettings:async()=>{const t=H({method:"GET"}),e=await i(...await L(d("/header-settings"),{signal:t})),s=v(e.logoUrl);let o=null,l=null;if(s&&$t(s)){const p=await Ct(s,t);p&&(o=p.reversed,l=p.inkIsDark)}return{...e,logoUrl:s,logoReversed:o,logoInkIsDark:l}},getThemeSettings:async()=>i(...await L(d("/theme-settings"))),getChatSettings:async()=>i(await f(d("/chat-settings")),await u())},fe={listServices:async()=>{try{return await i(d("/bookings/services"),await u())}catch(t){return console.warn("[bookings.listServices] API unavailable, returning []",t),{results:[],currency:"USD"}}},getAvailability:async(t,e)=>i(d(`/bookings/availability?service=${encodeURIComponent(t)}&date=${e}`),await u()),create:async t=>i(d("/bookings"),await u({method:"POST",body:JSON.stringify(t)})),get:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}`),await u()),cancel:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}/cancel`),await u({method:"POST"})),createPaymentIntent:async t=>i(d("/bookings/payments/intent"),await u({method:"POST",body:JSON.stringify({manageToken:t})}))};class jt extends Error{slug;count;constructor(e,s){super(`Slug "${e}" exists on ${s} websites; a site is required to pick one.`),this.slug=e,this.count=s,this.name="AmbiguousPageSlugError"}}const C=(t,e,s)=>{const o=new URLSearchParams({...e?{site:e}:{},...s?{draft:"1"}:{}}).toString();return`/api/storefront/${t}/${o?`?${o}`:""}`},$=t=>`/api/storefront/sites/${encodeURIComponent(t)}/`,zt=t=>`${$(t)}currencies/`,Kt="/api/storefront/media/ingest/";class Vt 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 Xt(){const t=_t();if(!t)throw new Vt;return`${Kt}?${new URLSearchParams({site:t})}`}const Zt="X-Puck-Media-Manifest",et=lt.contentHash,_={"X-Media-Manifest":et,[Zt]:et},ge=rt({});function rt(t){return(e,s={})=>{const o=bt(),l=t.headers||o?{...o?{"Accept-Language":o}:{},...t.headers,...s.headers}:void 0;return i(e,{...s,...t.baseUrl!==void 0?{baseUrl:t.baseUrl}:{},...l?{headers:l}:{},audience:t.audience??Pt()})}}function Yt(t={}){const e=rt(t),s=t.siteDrafts===!0,o=r=>C("header-settings",r,s),l=r=>C("theme-settings",r,s),p=r=>C("chat-settings",r,s),w=r=>C("social-settings",r,s);return{findPageBySlug:async(r,a,n)=>{const c=new URLSearchParams({slug:r});n&&c.set("site",n);const y=await e(`/api/storefront/pages/?${c.toString()}`,{token:a}),S=Array.isArray(y)?y:y.results??[];if(!n&&S.length>1)throw new jt(r,S.length);return S[0]??null},getPageById:(r,a)=>e(`/api/storefront/pages/${r}/`,{token:a}),saveLayout:(r,a,n,c,y)=>e(`/api/storefront/pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a,expected_updated_at:c,...y?{client_id:y}:{}}),token:n}),duplicatePage:(r,a,n)=>e(`/api/storefront/pages/${r}/duplicate/`,{method:"POST",body:JSON.stringify({title:a.title,slug:a.slug}),token:n}),geocode:(r,a,n)=>e(`/api/storefront/geocode/?${new URLSearchParams(n?{q:r,country:n}:{q:r})}`,{token:a}),listBlockSources:r=>e("/api/storefront/block-sources/",{token:r}),listRecordTypes:r=>e("/api/storefront/record-types/",{token:r}),createPagePreviewLink:(r,a)=>e(`/api/storefront/pages/${r}/preview-link/`,{method:"POST",token:a}),claimPageEditLock:(r,a,n,c=!1)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:n,takeover:c}),token:a}),releasePageEditLock:(r,a)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"DELETE",token:a}),createTemplate:(r,a,n)=>e("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:r,layout:a}),headers:_,token:n}),getTemplate:(r,a)=>e(`/api/storefront/page-templates/${r}/`,{token:a}),saveTemplateLayout:(r,a,n)=>e(`/api/storefront/page-templates/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:_,token:n}),listTemplatePages:async(r,a)=>{const n=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}`,{token:a});return Array.isArray(n)?n:n.results??[]},findTemplatePageBySlug:async(r,a,n)=>{const c=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}&slug=${encodeURIComponent(a)}`,{token:n});return(Array.isArray(c)?c:c.results??[])[0]??null},createTemplatePage:(r,a,n)=>e("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:r,...a}),headers:_,token:n}),saveTemplatePageLayout:(r,a,n)=>e(`/api/storefront/template-pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:_,token:n}),deleteTemplatePage:(r,a,n)=>e(`/api/storefront/template-pages/${r}/`,{method:"DELETE",token:a,...n?.keepalive?{keepalive:!0}:{}}),listPages:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("site",a);const c=await e(`/api/storefront/pages/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},createPage:(r,a,n,c)=>e("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:r,slug:a,layout:n}),token:c}),deletePage:(r,a)=>e(`/api/storefront/pages/${r}/`,{method:"DELETE",token:a}),getHeaderSettings:(r,a)=>e(o(a),{token:r}),listMenus:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("site",a);const c=await e(`/api/storefront/menus/?${n}`,{token:r});return Array.isArray(c)?c:c.results??[]},listBlogPosts:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.visibleOnly&&n.set("is_visible","true"),a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/blog-posts/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},listFieldUsage:async(r,a)=>{const n=await e(`/api/storefront/field-usage/?site=${encodeURIComponent(a)}`,{token:r});return Array.isArray(n?.entries)?n.entries:[]},listCategories:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.visibleOnly&&n.set("is_visible","true"),a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/categories/?${n.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.sort_order-R.sort_order||S.name.localeCompare(R.name))},listForms:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/forms/?${n.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.title.localeCompare(R.title))},listWheelSummaries:async(r,a={})=>{const n=new URLSearchParams;a.siteId&&n.set("site",a.siteId);const c=n.toString(),y=await e(`/api/storefront/wheel-curations/summaries/${c?`?${c}`:""}`,{token:r});return g(y)},listProducts:async(r,a={})=>{const n=new URLSearchParams;a.kinds?.length&&n.set("kind",a.kinds.join(",")),a.siteId&&n.set("site",a.siteId);const c=n.toString(),y=await e(`/api/storefront/products/${c?`?${c}`:""}`,{token:r});return g(y)},getWheelDetail:async(r,a,n={})=>{const c=new URLSearchParams({slug:a});return n.siteId&&c.set("site",n.siteId),x(g(await e(`/api/storefront/wheel-curations/detail/?${c.toString()}`,{token:r})))},updateHeaderSettings:(r,a,n)=>e(o(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getSite:(r,a)=>e($(r),{token:a}),listSites:async r=>{const a=await e("/api/storefront/sites/?no_page=true",{token:r});return Array.isArray(a)?a:a.results??[]},listSiteCurrencies:async(r,a)=>{const n=await e(zt(r),{token:a});return Array.isArray(n)?n:[]},publishSite:(r,a)=>e(`${$(r)}publish/`,{method:"POST",token:a}),getSiteLiveState:(r,a)=>e(`${$(r)}live-state/`,{token:a}),getThemeSettings:(r,a)=>e(l(a),{token:r}),updateThemeSettings:(r,a,n)=>e(l(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getMyPreferences:async r=>(await e("/api/auth/me/",{token:r})).preferences??{},updateMyPreferences:(r,a)=>e("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:r}),token:a}),getChatSettings:(r,a)=>e(p(a),{token:r}),updateChatSettings:(r,a,n)=>e(p(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getSocialSettings:(r,a)=>e(w(a),{token:r}),updateSocialSettings:(r,a,n)=>e(w(n),{method:"PATCH",body:JSON.stringify(r),token:a}),uploadHeaderLogo:(r,a,n)=>{const c=new FormData;return c.append("logo",r),e(o(n),{method:"PATCH",body:c,token:a})},clearHeaderLogo:(r,a)=>e(o(a),{method:"PATCH",body:JSON.stringify({logo:null}),token:r}),setHeaderLogoFromAsset:(r,a,n)=>e(o(n),{method:"PATCH",body:JSON.stringify({logo_asset_id:r}),token:a}),uploadMedia:async(r,a)=>{const n=new FormData;return n.append("file",r),e(Xt(),{method:"POST",body:n,token:a})},listMedia:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("kind",a);const c=await e(`/api/storefront/media-assets/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]}}}const we=Yt({siteDrafts:!0});export{yt as API_URL,jt as AmbiguousPageSlugError,m as ApiError,wt as BROWSER_READ_TIMEOUT_MS,ft as EFFICIENT_CLIENT_CLOSED_MESSAGE,Vt as MediaUploadDestinationError,Bt as PREVIEW_PARAM,Pe as PRODUCT_API_BASE,gt as SERVER_READ_TIMEOUT_MS,N as SERVER_UNREACHABLE_MESSAGE,I as STATUS_NETWORK_ERROR,ge as adminFetch,Rt as api,i as apiFetch,E as appendSiteQuery,fe as bookings,Yt as createStorefrontAdmin,H as defaultRequestDeadline,Xt as editorMediaUploadPath,Pt as editorPortalAudience,bt as editorRequestLanguage,ye as fitment,he as products,mt as readDeadlineMs,Ht as resolveClientIp,g as resolveMediaUrls,qt as resolvePreviewToken,tt as resolveSiteHost,xt as resolveSiteHostSource,Ft as resolveSiteSlug,ce as setEditorLanguage,ie as setEditorPortalAudience,we as storefrontAdmin};
|
|
1
|
+
import{PREVIEW_TOKEN_HEADER as st,SITE_HOST_HEADER as nt,SITE_SLUG_HEADER as ot}from"../site-headers.js";import{PRODUCT_API_BASE as it,PRODUCT_BACKEND_URL as D}from"./origins.js";import{backendHopHeaders as ct,clientIpFromForwardedFor as dt,FORWARDED_FOR_HEADER as ut,hopCachingOf as lt}from"../forwarded-for.js";import pt from"efficient-web-builder/format/lib/document/media-manifest.json";import{auth as P}from"../auth.js";import{efficientClientOpen as yt}from"efficient-easel/screen/lib/session";import{listableWheelSummaries as U}from"../wheels/listable-wheels.js";import{dropRenderlessFinishes as x}from"../wheels/renderable-finishes.js";const ht=process.env.NEXT_PUBLIC_API_URL??"http://localhost:8000";class m extends Error{status;data;constructor(e,s,o){super(s),this.status=e,this.data=o}}const N="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.",ft=new Set([502,503,504]),I=0,gt="This editor runs on its host's own backend, which does not serve this request.",wt=5e3,mt=15e3,St=()=>typeof window>"u"?wt:mt;function H(t){const e=(t.method??"GET").toUpperCase();if(!(t.body!=null||e!=="GET"&&e!=="HEAD")&&!(t.audience!=null&&t.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(St())}const F=t=>t instanceof Error&&t.name==="TimeoutError",M=(t,e)=>ft.has(t)?N:e,Pt=["admin","venue"];let B="admin";function ie(t){B=Pt.includes(t)?t:"admin"}function Ot(){return B}const bt=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/;let q=null;function ce(t){q=t&&bt.test(t)?t:null}function At(){return q}function Tt(t){if(typeof window>"u"||!t.startsWith("/api/v1/"))return t;const e=K();return!e||/[?&]site=/.test(t)?t:E(t,`site=${encodeURIComponent(e)}`)}async function i(t,e={}){const{token:s,baseUrl:o,headers:l,audience:p,...g}=e;if(typeof window<"u"&&!yt())throw new m(I,gt,null);if(typeof window>"u"&&o===void 0)throw new Error(`apiFetch(${JSON.stringify(t)}) 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.`);const r=typeof FormData<"u"&&g.body instanceof FormData;let a;try{a=await fetch(`${o??ht}${Tt(t)}`,{...g,headers:{...r?{}:{"Content-Type":"application/json"},...s?{Authorization:`Bearer ${s}`}:{},...p===null?{}:{"X-Portal-Audience":p??"shop"},...l},signal:g.signal??H({...g,audience:p})})}catch(y){throw y instanceof TypeError||F(y)?new m(I,N,null):y}let n;try{n=await a.text()}catch(y){throw F(y)?new m(I,N,null):y}let c=null;if(n)try{c=JSON.parse(n)}catch{throw new m(a.status,a.ok?"Expected JSON but received a non-JSON response":M(a.status,a.statusText),n)}if(!a.ok){const y=(c&&typeof c=="object"&&"detail"in c&&typeof c.detail=="string"?c.detail:null)??M(a.status,a.statusText);throw new m(a.status,y,c)}return c}let b=null;async function G(){return b||(b=Rt().finally(()=>{b=null}),b)}async function Rt(){const t=P.takeLegacyRefresh(),e=await Et.refresh(t??void 0);return P.setTokens(e.access),e.access}async function W(){return P.getAccess()??G()}async function h(t,e={}){let s;try{s=await W()}catch{throw P.clear(),new m(401,"Not signed in",null)}try{return await i(t,{...e,token:s})}catch(o){if(!(o instanceof m)||o.status!==401)throw o;try{const l=await G();return await i(t,{...e,token:l})}catch{throw P.clear(),o}}}async function j(t,e={}){if(P.getAccess())try{return{data:await h(t,e),asShopper:!0}}catch(s){if(!(s instanceof m)||s.status!==401)throw s}return{data:await i(t,e),asShopper:!1}}async function z(){const t=await h("/api/auth/me/");if(t.portal!=="shop")throw P.clear(),new m(403,"This session is not valid for this shop.",null);return t}const Et={login:(t,e)=>i("/api/auth/login/",{method:"POST",body:JSON.stringify({email:t,password:e,portal:"shop"}),credentials:"include"}),refresh:t=>i("/api/auth/refresh/",{method:"POST",body:JSON.stringify(t?{refresh:t,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{P.clear();try{await i("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{const t=await W();return await z(),t},me:z,updateMe:t=>h("/api/auth/me/",{method:"PATCH",body:JSON.stringify(t)}),changePassword:(t,e)=>h("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:e,old_password:t})}),changeEmail:(t,e)=>h("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:t,current_password:e})}),myProfile:()=>h("/api/shop-portal/profile/"),updateMyProfile:t=>h("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(t)}),myAddresses:()=>h("/api/shop-portal/delivery-locations/"),createAddress:t=>h("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(t)}),updateAddress:(t,e)=>h(`/api/shop-portal/delivery-locations/${t}/`,{method:"PATCH",body:JSON.stringify(e)}),deleteAddress:t=>h(`/api/shop-portal/delivery-locations/${t}/`,{method:"DELETE"}),passwordResetRequest:t=>i("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:t})}),passwordResetConfirm:(t,e,s)=>i("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:t,token:e,new_password:s})}),brands:()=>h("/api/products/brands/"),myOrders:()=>h("/api/shop-portal/orders/").then(t=>t.results),myOrder:t=>h(`/api/shop-portal/orders/${t}/`),cancelOrder:t=>h(`/api/shop-portal/orders/${t}/cancel/`,{method:"POST"}),myReturns:t=>h(`/api/shop-portal/returns/${t?`?order=${encodeURIComponent(t)}`:""}`).then(e=>e.results),createReturn:t=>h("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(t)}),withdrawReturn:t=>h(`/api/shop-portal/returns/${t}/cancel/`,{method:"POST"}),uploadReturnPhoto:(t,e)=>{const s=new FormData;return s.append("claim_item",t),s.append("file",e),s.append("media_type",e.type.startsWith("video/")?"video":"image"),h("/api/shop-portal/return-media/",{method:"POST",body:s})}};import{media as Ct,absolutizeApiUrl as v}from"efficient-web-builder/render/lib/media";import{analyzeLogoSvg as $t,isSvgUrl as _t}from"efficient-web-builder/format/lib/logo/reverse-svg";import{getEditorSiteId as Ut}from"efficient-web-builder/render/lib/editor-site";import{shopRouteBase as Nt,webRuntimeSiteSlug as K}from"efficient-web-builder/format/lib/web-runtime";function w(t){if(typeof t=="string")return t.startsWith("/media/")?Ct(t):t;if(Array.isArray(t))return t.map(w);if(t&&typeof t=="object"){const e={};for(const[s,o]of Object.entries(t))e[s]=s==="captions"&&o&&typeof o=="object"&&!Array.isArray(o)?Object.fromEntries(Object.entries(o).map(([l,p])=>[w(l),p])):w(o);return e}return t}import{PRODUCT_API_BASE as Pe}from"./origins.js";const V=typeof window>"u"&&D!=="",It=V?D:it,vt=Nt,O=()=>({baseUrl:vt(),audience:null});function d(t,e){const s=e?`?process=${encodeURIComponent(e)}`:"";return`/api/v1${t}${s}`}const X=100,Z=50;function k(t,e,s){const o=new URLSearchParams;for(const[l,p]of Object.entries(e))p!=null&&p!==""&&o.set(l,String(p));return o.set("pageSize",String(X)),s&&o.set("cursor",s),`/api/v1${t}?${o.toString()}`}function kt(t,e){return k("/wheels",{process:t},e)}const Y=X;function Jt(t,e){return k("/wheels",{slug:t.join(",")},e)}function Lt(t,e,s){return k("/products",{kind:t.join(","),make:e?.make,model:e?.model,year:e?.year,modification:e?.modification},s)}function Dt(t){if(!t)return null;try{return new URL(t,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function J(t,e,s=()=>!1,o=()=>!1){const l=[];let p=null;try{for(let g=0;g<Z;g++){const r=await i(await e(p),await u());if(l.push(...r.results),p=Dt(r.next),!p)break;if(o(l))return l}p&&console.warn(`[${t}] stopped at ${Z} pages (${l.length} rows); catalog may be truncated`)}catch(g){if(s(g))throw g;console.warn(`[${t}] product API unavailable, returning []`,g)}return l}const Q=t=>t instanceof m&&t.status===400;function tt(t){return t.flatMap(e=>e.kind==="alloy-wheel"?U([e]):[e])}async function et(){return(await xt()).host}async function xt(){try{const{headers:t}=await import("next/headers"),e=await t(),s=p=>p?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,o=s(e.get(nt)??e.get("x-forwarded-host")??e.get("host")),l=s(e.get("host"));return{host:o,matchesRequestHost:o!==null&&o===l}}catch{return{host:null,matchesRequestHost:!1}}}async function Ht(){try{const{headers:t}=await import("next/headers");return dt((await t()).get(ut))}catch{return null}}async function Ft(){try{const{headers:t}=await import("next/headers");return(await t()).get(ot)||null}catch{return null}}async function Mt(){const t=await Ft();if(t)return`site=${encodeURIComponent(t)}`;const e=await et();return e?`host=${encodeURIComponent(e)}`:""}async function f(t){if(typeof window<"u"){const e=K();return e?E(t,`site=${encodeURIComponent(e)}`):t}return E(t,await Mt())}function E(t,e){return e?`${t}${t.includes("?")?"&":"?"}${e}`:t}const Bt="preview";async function qt(){if(typeof window<"u")return null;try{const{headers:t}=await import("next/headers");return(await t()).get(st)}catch{return null}}async function Gt(){try{const{headers:t}=await import("next/headers");return(await t()).get("user-agent")}catch{return null}}async function L(t,e){const s=await qt();if(s===null)return[await f(t),await u(e)];const o=E(await f(t),`${Bt}=${encodeURIComponent(s)}`),{next:l,cache:p,...g}=e??{},r=await u({...g,cache:"no-store"}),a=await Gt();return a&&(r.headers={...r.headers,"user-agent":a}),[o,r]}async function Wt(t){if(!V)return;const[e,s]=await Promise.all([et(),Ht()]),o=ct(e,s,t);return Object.keys(o).length>0?o:void 0}async function u(t){const e=await Wt(lt(t)),s={baseUrl:It,...t};return e&&(s.headers={...e,...t?.headers}),s}const A=typeof window>"u";function T(t,e){const s=new URLSearchParams;for(const[l,p]of Object.entries(e))p!==void 0&&p!==""&&s.set(l,String(p));const o=s.toString();return`/api/v1/fitment${t}${o?`?${o}`:""}`}const ye={listMakes:async t=>{if(A){const{fitmentData:s}=await import("./fitment-data.js");return s.makes(t)}return(await i(T("/makes",{region:t}),O())).results},listModels:async(t,e)=>{if(A){const{fitmentData:o}=await import("./fitment-data.js");return o.models(t,e)}return(await i(T("/models",{make:t,region:e}),O())).results},listYears:async(t,e,s)=>{if(A){const{fitmentData:l}=await import("./fitment-data.js");return l.years(t,e,s)}return(await i(T("/years",{make:t,model:e,region:s}),O())).results},listModifications:async(t,e,s,o)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.modifications(t,e,s,o)}return(await i(T("/modifications",{make:t,model:e,year:s,region:o}),O())).results},getStockFitment:async(t,e,s,o,l)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.stockFitment(t,e,s,o,l)}return i(T("/stock-fitment",{make:t,model:e,year:s,modification:o,region:l}),O())}},he={listWheels:async(t,e={})=>{const s=await J("products.listWheels",async o=>await f(kt(t,o)),e.throwOnFailure?()=>!0:void 0);return U(w(s))},listWheelsBySlug:async(t,e={})=>{const s=[...new Set(t.map(r=>r.trim()).filter(Boolean))];if(s.length===0)return[];const o=[];for(let r=0;r<s.length;r+=Y)o.push(s.slice(r,r+Y));const l=await Promise.all(o.map(r=>J("products.listWheelsBySlug",async a=>await f(Jt(r,a)),e.throwOnFailure?()=>!0:Q))),p=new Set(s),g=l.flat().filter(r=>p.has(r.slug));return U(w(g))},listCatalog:async(t,e,s={})=>{if(t.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` — so the call would silently return the wheel catalog instead of nothing.");const o=await J("products.listCatalog",async l=>await f(Lt(t,e,l)),Q,s.maxRows===void 0?void 0:l=>tt([...l]).length>=s.maxRows);return tt(w(o))},getWheel:async t=>x(w(await i(await f(d(`/wheels/${t}`)),await u()))),getTyre:async t=>w(await i(await f(d(`/tyres/${t}`)),await u())),listBundles:async(t={})=>{try{return await i(await f(d("/bundles")),await u())}catch(e){if(t.throwOnFailure)throw e;return[]}},getBundle:async t=>i(await f(d(`/bundles/${t}`)),await u()),listGalleryBuilds:async(t={})=>{const{process:e=null,wheelSlug:s=null}=t;if(typeof window>"u"){const{listGalleryBuilds:o}=await import("./gallery-builds-data.js");return w(o(e,s))}try{const o=new URLSearchParams;e&&o.set("process",e),s&&o.set("wheelSlug",s);const l=o.toString(),p=await i(`/api/v1/gallery-builds${l?`?${l}`:""}`,O());return w(p.results)}catch(o){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",o),[]}},getSite:async()=>i(await f(d("/site")),await u()),getSiteBySlug:async t=>i(`${d("/site")}?${new URLSearchParams({site:t})}`,typeof window>"u"?await u():void 0),listPages:async()=>w(await i(await f(d("/pages")),await u())),listPopups:async()=>i(await f(d("/popups")),await u()),listProductTemplates:async()=>{try{return await i(await f(d("/product-templates")),await u())}catch(t){return console.warn("[products.listProductTemplates] unavailable, returning []",t),[]}},listDynamicPages:async t=>{const e=t?`?recordType=${encodeURIComponent(t)}`:"";try{return await i(await f(`${d("/dynamic-pages")}${e}`),await u())}catch(s){if(s instanceof m&&s.status===404)return[];throw s}},getRecord:async(t,e)=>{try{return await i(await f(d(`/records/${encodeURIComponent(t)}/${encodeURIComponent(e)}`)),await u())}catch(s){if(s instanceof m&&s.status===404)return null;throw s}},listRecordKeys:async t=>{try{const e=await i(await f(d(`/records/${encodeURIComponent(t)}`)),await u({cache:"no-store"}));return Array.isArray(e?.keys)?e.keys.filter(s=>typeof s=="string"&&s!==""):[]}catch(e){if(e instanceof m&&e.status===404)return[];throw e}},listProductTypeChoices:async()=>{try{return await i(await f(d("/product-type-choices")),await u())}catch(t){return console.warn("[products.listProductTypeChoices] unavailable, returning []",t),[]}},listFieldUsage:async()=>{try{return await i(await f(d("/field-usage")),await u())}catch(t){return console.warn("[products.listFieldUsage] unavailable, returning []",t),[]}},getPage:async(t,e={})=>{const s=e.record?`?record=${encodeURIComponent(e.record)}`:"",[o,l]=await L(d(`/pages/${t}`)+s,e.revalidate!==void 0?{next:{revalidate:e.revalidate}}:void 0);return w(await i(o,l))},listBlogPosts:async(t={},{throwOnFailure:e=!1}={})=>{const s=t.category?`?category=${encodeURIComponent(t.category)}`:"";try{return(await i(d("/blog-posts")+s,await u())).map(l=>({...l,coverImage:v(l.coverImage)??""}))}catch(o){if(e)throw o;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",o),[]}},getBlogPost:async t=>{const e=await i(d(`/blog-posts/${t}`),await u());return{...e,coverImage:v(e.coverImage)??""}},createOrder:async t=>i(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),createOrderAuthed:async t=>h(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),lookupOrder:async t=>i(d("/orders/lookup"),await u({method:"POST",body:JSON.stringify(t)})),createPaymentIntent:async t=>i(d("/payments/intent"),await u({method:"POST",body:JSON.stringify(t)})),releaseCheckout:async t=>i(d("/checkouts/release"),await u({method:"POST",body:JSON.stringify(t)})),createPaypalOrder:async t=>i(d("/payments/paypal/order"),await u({method:"POST",body:JSON.stringify(t)})),capturePaypalOrder:async t=>i(d("/payments/paypal/capture"),await u({method:"POST",body:JSON.stringify(t)})),createAfterpayCheckout:async t=>i(d("/payments/afterpay/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureAfterpayPayment:async t=>i(d("/payments/afterpay/capture"),await u({method:"POST",body:JSON.stringify(t)})),chargeSquare:async t=>i(d("/payments/square/charge"),await u({method:"POST",body:JSON.stringify(t)})),createGocardlessBillingRequest:async t=>i(d("/payments/gocardless/billing-request"),await u({method:"POST",body:JSON.stringify(t)})),completeGocardlessPayment:async t=>i(d("/payments/gocardless/complete"),await u({method:"POST",body:JSON.stringify(t)})),createZipCheckout:async t=>i(d("/payments/zip/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureZipPayment:async t=>i(d("/payments/zip/capture"),await u({method:"POST",body:JSON.stringify(t)})),createKlarnaCheckout:async t=>i(d("/payments/klarna/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureKlarnaPayment:async t=>i(d("/payments/klarna/capture"),await u({method:"POST",body:JSON.stringify(t)})),createStockAlert:async t=>i(d("/stock-alerts"),await u({method:"POST",body:JSON.stringify(t)})),createPreOrderIntent:async t=>i(d("/pre-order-intents"),await u({method:"POST",body:JSON.stringify(t)})),createNewsletterSubscription:async t=>i(d("/newsletter-subscriptions"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeNewsletter:async t=>i(d("/newsletter-unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),captureCart:async t=>i(d("/carts"),await u({method:"POST",body:JSON.stringify(t)})),restoreCart:async t=>i(d("/carts/restore"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeCartReminders:async t=>i(d("/carts/unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),listReviews:async(t={})=>{const e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.designCode&&e.set("designCode",t.designCode);const s=d("/reviews"),o=e.toString();try{return await i(await f(o?`${s}?${o}`:s),await u())}catch(l){return console.warn("[products.listReviews] product API unavailable, returning []",l),[]}},submitReview:async t=>i(d("/reviews"),await u({method:"POST",body:JSON.stringify(t)})),getForm:async t=>i(d(`/forms/${encodeURIComponent(t)}`),await u()),submitForm:async(t,e)=>i(d(`/forms/${encodeURIComponent(t)}/submissions`),await u({method:"POST",body:JSON.stringify(e)})),listShippingMethods:async()=>{try{return await i(d("/shipping-methods"),await u())}catch(t){return console.warn("[products.listShippingMethods] product API unavailable, returning []",t),[]}},listCountrySubdivisions:async t=>{try{return await i(d(`/countries/${encodeURIComponent(t)}/subdivisions`),await u())}catch(e){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",e),[]}},quoteCart:async t=>{const e=d("/cart/quote"),s=await u({method:"POST",body:JSON.stringify(t)});return t.couponCode?(await j(e,s)).data:i(e,s)},validateCoupon:async t=>{const{data:e,asShopper:s}=await j(d("/coupons/validate"),await u({method:"POST",body:JSON.stringify(t)}));return{...e,askedAsShopper:s}},getHeaderSettings:async()=>{const t=H({method:"GET"}),e=await i(...await L(d("/header-settings"),{signal:t})),s=v(e.logoUrl);let o=null,l=null;if(s&&_t(s)){const p=await $t(s,t);p&&(o=p.reversed,l=p.inkIsDark)}return{...e,logoUrl:s,logoReversed:o,logoInkIsDark:l}},getThemeSettings:async()=>i(...await L(d("/theme-settings"))),getChatSettings:async()=>i(await f(d("/chat-settings")),await u())},fe={listServices:async()=>{try{return await i(d("/bookings/services"),await u())}catch(t){return console.warn("[bookings.listServices] API unavailable, returning []",t),{results:[],currency:"USD"}}},getAvailability:async(t,e)=>i(d(`/bookings/availability?service=${encodeURIComponent(t)}&date=${e}`),await u()),create:async t=>i(d("/bookings"),await u({method:"POST",body:JSON.stringify(t)})),get:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}`),await u()),cancel:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}/cancel`),await u({method:"POST"})),createPaymentIntent:async t=>i(d("/bookings/payments/intent"),await u({method:"POST",body:JSON.stringify({manageToken:t})}))};class jt extends Error{slug;count;constructor(e,s){super(`Slug "${e}" exists on ${s} websites; a site is required to pick one.`),this.slug=e,this.count=s,this.name="AmbiguousPageSlugError"}}const C=(t,e,s)=>{const o=new URLSearchParams({...e?{site:e}:{},...s?{draft:"1"}:{}}).toString();return`/api/storefront/${t}/${o?`?${o}`:""}`},$=t=>`/api/storefront/sites/${encodeURIComponent(t)}/`,zt=t=>`${$(t)}currencies/`,Kt="/api/storefront/media/ingest/";class Vt 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 Xt(){const t=Ut();if(!t)throw new Vt;return`${Kt}?${new URLSearchParams({site:t})}`}const Zt="X-Puck-Media-Manifest",rt=pt.contentHash,_={"X-Media-Manifest":rt,[Zt]:rt},ge=at({});function at(t){return(e,s={})=>{const o=At(),l=t.headers||o?{...o?{"Accept-Language":o}:{},...t.headers,...s.headers}:void 0;return i(e,{...s,...t.baseUrl!==void 0?{baseUrl:t.baseUrl}:{},...l?{headers:l}:{},audience:t.audience??Ot()})}}function Yt(t={}){const e=at(t),s=t.siteDrafts===!0,o=r=>C("header-settings",r,s),l=r=>C("theme-settings",r,s),p=r=>C("chat-settings",r,s),g=r=>C("social-settings",r,s);return{findPageBySlug:async(r,a,n)=>{const c=new URLSearchParams({slug:r});n&&c.set("site",n);const y=await e(`/api/storefront/pages/?${c.toString()}`,{token:a}),S=Array.isArray(y)?y:y.results??[];if(!n&&S.length>1)throw new jt(r,S.length);return S[0]??null},getPageById:(r,a)=>e(`/api/storefront/pages/${r}/`,{token:a}),saveLayout:(r,a,n,c,y)=>e(`/api/storefront/pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a,expected_updated_at:c,...y?{client_id:y}:{}}),token:n}),duplicatePage:(r,a,n)=>e(`/api/storefront/pages/${r}/duplicate/`,{method:"POST",body:JSON.stringify({title:a.title,slug:a.slug}),token:n}),geocode:(r,a,n)=>e(`/api/storefront/geocode/?${new URLSearchParams(n?{q:r,country:n}:{q:r})}`,{token:a}),listBlockSources:r=>e("/api/storefront/block-sources/",{token:r}),listRecordTypes:r=>e("/api/storefront/record-types/",{token:r}),createPagePreviewLink:(r,a)=>e(`/api/storefront/pages/${r}/preview-link/`,{method:"POST",token:a}),claimPageEditLock:(r,a,n,c=!1)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:n,takeover:c}),token:a}),releasePageEditLock:(r,a)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"DELETE",token:a}),createTemplate:(r,a,n)=>e("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:r,layout:a}),headers:_,token:n}),getTemplate:(r,a)=>e(`/api/storefront/page-templates/${r}/`,{token:a}),saveTemplateLayout:(r,a,n)=>e(`/api/storefront/page-templates/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:_,token:n}),listTemplatePages:async(r,a)=>{const n=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}`,{token:a});return Array.isArray(n)?n:n.results??[]},findTemplatePageBySlug:async(r,a,n)=>{const c=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}&slug=${encodeURIComponent(a)}`,{token:n});return(Array.isArray(c)?c:c.results??[])[0]??null},createTemplatePage:(r,a,n)=>e("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:r,...a}),headers:_,token:n}),saveTemplatePageLayout:(r,a,n)=>e(`/api/storefront/template-pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:_,token:n}),deleteTemplatePage:(r,a,n)=>e(`/api/storefront/template-pages/${r}/`,{method:"DELETE",token:a,...n?.keepalive?{keepalive:!0}:{}}),listPages:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("site",a);const c=await e(`/api/storefront/pages/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},createPage:(r,a,n,c)=>e("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:r,slug:a,layout:n}),token:c}),deletePage:(r,a)=>e(`/api/storefront/pages/${r}/`,{method:"DELETE",token:a}),getHeaderSettings:(r,a)=>e(o(a),{token:r}),listMenus:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("site",a);const c=await e(`/api/storefront/menus/?${n}`,{token:r});return Array.isArray(c)?c:c.results??[]},listBlogPosts:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.visibleOnly&&n.set("is_visible","true"),a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/blog-posts/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},listFieldUsage:async(r,a)=>{const n=await e(`/api/storefront/field-usage/?site=${encodeURIComponent(a)}`,{token:r});return Array.isArray(n?.entries)?n.entries:[]},listCategories:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.visibleOnly&&n.set("is_visible","true"),a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/categories/?${n.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.sort_order-R.sort_order||S.name.localeCompare(R.name))},listForms:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/forms/?${n.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.title.localeCompare(R.title))},listWheelSummaries:async(r,a={})=>{const n=new URLSearchParams;a.siteId&&n.set("site",a.siteId);const c=n.toString(),y=await e(`/api/storefront/wheel-curations/summaries/${c?`?${c}`:""}`,{token:r});return w(y)},listProducts:async(r,a={})=>{const n=new URLSearchParams;a.kinds?.length&&n.set("kind",a.kinds.join(",")),a.siteId&&n.set("site",a.siteId);const c=n.toString(),y=await e(`/api/storefront/products/${c?`?${c}`:""}`,{token:r});return w(y)},getWheelDetail:async(r,a,n={})=>{const c=new URLSearchParams({slug:a});return n.siteId&&c.set("site",n.siteId),x(w(await e(`/api/storefront/wheel-curations/detail/?${c.toString()}`,{token:r})))},updateHeaderSettings:(r,a,n)=>e(o(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getSite:(r,a)=>e($(r),{token:a}),listSites:async r=>{const a=await e("/api/storefront/sites/?no_page=true",{token:r});return Array.isArray(a)?a:a.results??[]},listSiteCurrencies:async(r,a)=>{const n=await e(zt(r),{token:a});return Array.isArray(n)?n:[]},publishSite:(r,a)=>e(`${$(r)}publish/`,{method:"POST",token:a}),getSiteLiveState:(r,a)=>e(`${$(r)}live-state/`,{token:a}),getThemeSettings:(r,a)=>e(l(a),{token:r}),updateThemeSettings:(r,a,n)=>e(l(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getMyPreferences:async r=>(await e("/api/auth/me/",{token:r})).preferences??{},updateMyPreferences:(r,a)=>e("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:r}),token:a}),getChatSettings:(r,a)=>e(p(a),{token:r}),updateChatSettings:(r,a,n)=>e(p(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getSocialSettings:(r,a)=>e(g(a),{token:r}),updateSocialSettings:(r,a,n)=>e(g(n),{method:"PATCH",body:JSON.stringify(r),token:a}),uploadHeaderLogo:(r,a,n)=>{const c=new FormData;return c.append("logo",r),e(o(n),{method:"PATCH",body:c,token:a})},clearHeaderLogo:(r,a)=>e(o(a),{method:"PATCH",body:JSON.stringify({logo:null}),token:r}),setHeaderLogoFromAsset:(r,a,n)=>e(o(n),{method:"PATCH",body:JSON.stringify({logo_asset_id:r}),token:a}),uploadMedia:async(r,a)=>{const n=new FormData;return n.append("file",r),e(Xt(),{method:"POST",body:n,token:a})},listMedia:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("kind",a);const c=await e(`/api/storefront/media-assets/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]}}}const we=Yt({siteDrafts:!0});export{ht as API_URL,jt as AmbiguousPageSlugError,m as ApiError,mt as BROWSER_READ_TIMEOUT_MS,gt as EFFICIENT_CLIENT_CLOSED_MESSAGE,Vt as MediaUploadDestinationError,Bt as PREVIEW_PARAM,Pe as PRODUCT_API_BASE,wt as SERVER_READ_TIMEOUT_MS,N as SERVER_UNREACHABLE_MESSAGE,I as STATUS_NETWORK_ERROR,ge as adminFetch,Et as api,i as apiFetch,E as appendSiteQuery,fe as bookings,Yt as createStorefrontAdmin,H as defaultRequestDeadline,Xt as editorMediaUploadPath,Ot as editorPortalAudience,At as editorRequestLanguage,ye as fitment,he as products,St as readDeadlineMs,Ht as resolveClientIp,w as resolveMediaUrls,qt as resolvePreviewToken,et as resolveSiteHost,xt as resolveSiteHostSource,Ft as resolveSiteSlug,ce as setEditorLanguage,ie as setEditorPortalAudience,we as storefrontAdmin};
|
|
@@ -3,4 +3,5 @@ export declare const CHROME_CACHE_TTL_MS = 60000;
|
|
|
3
3
|
export declare const CHROME_CACHE_FAILURE_TTL_MS = 5000;
|
|
4
4
|
export declare const CHROME_CACHE_MAX = 500;
|
|
5
5
|
export declare function cachedChrome<T>(name: ChromeLoadName, load: () => Promise<ChromeLoad<T>>): Promise<ChromeLoad<T>>;
|
|
6
|
+
export declare function cachedSiteRead<T>(name: string, load: () => Promise<T>): Promise<T>;
|
|
6
7
|
export declare function clearChromeCache(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolvePreviewToken as
|
|
1
|
+
import{resolvePreviewToken as l,resolveSiteHostSource as m,resolveSiteSlug as _}from"./api/index.js";import{evictForInsert as d}from"./cache-evict.js";const C=6e4,A=5e3,f=500,s=new Map;async function h(t){const{host:e,matchesRequestHost:o}=await m();if(!e)return"";const n=await _();return n?`${t}|slug:${encodeURIComponent(e)}/${encodeURIComponent(n)}`:o?`${t}|host:${e}`:`${t}|xhost:${e}`}const p=t=>t.includes("|slug:")||t.includes("|xhost:");async function g(t,e){if(await l()!==null)return e();const o=await h(t);if(!o)return e();const n=Date.now(),c=s.get(o);if(c&&c.expiresAt>n)return c.load;const r=await e(),a=r.outcome.state==="failed",w=a?A:C,x=s.get(o)?.lastGood,i=r.outcome.state==="ok"?r:a?x:void 0,u=a&&i?i:r;return d(s,f,p,n),s.set(o,{load:u,expiresAt:n+w,lastGood:i}),u}async function v(t,e){if(await l()!==null)return e();const o=await h(t);if(!o)return e();const n=s.get(o);if(n&&n.expiresAt>Date.now())return n.load;const c=await e(),r=Date.now();return d(s,f,p,r),s.set(o,{load:c,expiresAt:r+C}),c}function E(){s.clear()}export{A as CHROME_CACHE_FAILURE_TTL_MS,f as CHROME_CACHE_MAX,C as CHROME_CACHE_TTL_MS,g as cachedChrome,v as cachedSiteRead,E as clearChromeCache};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const E="bottom-left",t=55,o="bottom";export{t as EVENTS_FEATURED_DARKEN,o as EVENTS_FEATURED_DARKEN_STYLE,E as EVENTS_FEATURED_PLACEMENT};
|
|
@@ -2,5 +2,9 @@ import { type SeededNode } from "efficient-web-builder/format/lib/document/seed-
|
|
|
2
2
|
type Props = Record<string, unknown>;
|
|
3
3
|
export declare const MENU_LINK_BLOCK = "MenuLinkBlock";
|
|
4
4
|
export declare function menuCardSeed(nodeId: string): SeededNode[];
|
|
5
|
+
export declare const MENU_BLOG_CATEGORIES_SOURCE = "blog-categories";
|
|
6
|
+
export declare const MENU_COUNT_FIELD = "count";
|
|
7
|
+
export declare function menuCountCardSeed(nodeId: string): SeededNode[];
|
|
8
|
+
export declare function menuTemplateFollowsContent(props: Props): Props;
|
|
5
9
|
export declare function withMenuTemplate(props: Props): Props;
|
|
6
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{seedNodes as
|
|
1
|
+
import{INNER_BOX as g,TEXT as N,seedNodes as i}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as c,CONTAINER_BLOCKS_SLOT as _}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as O}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{declaredBlockSource as d}from"efficient-web-builder/format/lib/content/block-sources";import{MENU_ENTRY_SIZE_PX as C}from"./menu-entry-type.js";const r="MenuLinkBlock";function l(t){return i([{type:r}],()=>`${t}~link`)}const E="blog-categories",T="count",y={...g,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,sharePhone:"content",wrapPhone:!1,name:"Card"},S="main",h={size:C,lineHeight:1,color:S};function a(t){const e={0:`${t}~card`,"0.0":`${t}~link`,"0.1":`${t}~count`};return i([{type:c,props:y,slots:{[_]:[{type:r},O(T,{...N,tag:"p"},h)]}}],(o,n)=>e[n]??`${t}~${n}`)}const s=t=>typeof t.id=="string"&&t.id.trim()?t.id:"Menu",u=t=>d(t)===E,m=t=>(u(t)?a:l)(s(t)),w=(t,e)=>Array.isArray(t)&&t.length===e.length&&JSON.stringify(t)===JSON.stringify(e);function x(t){const e=t.template;if(!Array.isArray(e)||e.length!==1)return t;const o=e[0]?.type;if(o!==r&&o!==c)return t;const n=s(t),f=u(t)?l(n):a(n);return w(e,f)?{...t,template:m(t)}:t}function $(t){return t.template!==void 0?x(t):{...t,template:m(t)}}export{E as MENU_BLOG_CATEGORIES_SOURCE,T as MENU_COUNT_FIELD,r as MENU_LINK_BLOCK,l as menuCardSeed,a as menuCountCardSeed,x as menuTemplateFollowsContent,$ as withMenuTemplate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=13,E="text-[13px]";export{E as MENU_ENTRY_SIZE_CLASS,t as MENU_ENTRY_SIZE_PX};
|
|
@@ -25,10 +25,17 @@ export declare const PRODUCT_CARD_FIELDS: readonly [{
|
|
|
25
25
|
}];
|
|
26
26
|
export interface ProductCardSeedOptions {
|
|
27
27
|
legacyWellHonoured?: boolean;
|
|
28
|
+
showRest?: {
|
|
29
|
+
showCardSizes: boolean;
|
|
30
|
+
showCardBuy: boolean;
|
|
31
|
+
showCardPage: boolean;
|
|
32
|
+
};
|
|
33
|
+
section?: string;
|
|
28
34
|
}
|
|
29
35
|
export declare function productCardSeed(props: Props, options?: ProductCardSeedOptions): BlockSeed;
|
|
30
36
|
export declare function kitCardSeed(props: Props): BlockSeed;
|
|
31
37
|
export declare function withKitCardTemplate(props: Props): Props;
|
|
32
38
|
export declare function productCardTemplate(props: Props, options?: ProductCardSeedOptions): SeededNode[];
|
|
39
|
+
export declare function withListingCardTemplate(props: Props): Props;
|
|
33
40
|
export declare function withProductCardTemplate(props: Props, options?: ProductCardSeedOptions): Props;
|
|
34
41
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_TYPE as
|
|
1
|
+
import{BOX_TYPE as s,CONTAINER_BLOCKS_SLOT as u}from"efficient-web-builder/format/lib/document/container-blocks";import{DIM as D,INNER_BOX as C,boxPadding as _,seedNodes as y,token as x}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as S}from"efficient-web-builder/format/lib/content/card-template";import{CARDS_BODY_LOOK as w}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{THEME_CARD_IMAGE_BG as E,resolveBoundCardImageBackground as I}from"efficient-web-builder/format/lib/content/card-image-background";import{SHARED_ROWS_KEY as L}from"efficient-web-builder/render/lib/content/box-shared-columns";import{GRID_CARD_SHOW as K,LISTING_CARD_SHOW as b}from"../sections/card-show-defaults.js";const g="ProductPicture",P="ProductSpecs",m="ProductBuy",p="ProductPrice",f="ProductColour",k="ProductSize",h="ProductEyebrow",l="ProductName",J=[g,h,l,P,p,f,k,m],Q=[{key:"name",label:"Name"},{key:"eyebrow",label:"Eyebrow"},{key:"note",label:"Note"},{key:"href",label:"Product page",kind:"link"}],A={...C,gap:0,gapPhone:0,..._(32,32,32,32),[L]:"shared"},R=(e,t="ProductGrid")=>typeof e.id=="string"&&e.id.trim()?e.id:t,a=(e,t)=>typeof e=="boolean"?e:t,U={type:"Text",props:{...D,tag:"p",text:"",[S]:"note",_partStyles:{text:{...w,...x("body",14),lineHeight:1.375}}}};function N(e,t={}){const n=e.dynamic===!0,o={},i=n?t.legacyWellHonoured?e.imageBackground??E:I(e.imageBackground):e.imageBackground;i!==void 0&&(o.imageBackground=i);for(const c of["cardImage","coverIndex","indexBadge","showBadge"])e[c]!==void 0&&(o[c]=e[c]);const d=t.showRest??K,r={price:a(e.showCardPrice,!0),finishes:a(e.showCardFinishes,!0),sizes:a(e.showCardSizes,d.showCardSizes),buy:a(e.showCardBuy,d.showCardBuy),page:a(e.showCardPage,d.showCardPage)},O={...A,name:"Card"};e.outline==="hairline"&&(O.sectionBorder={width:1,style:"solid"});const T=[{type:g,props:o},{type:h},{type:l},{type:P,props:{sizes:r.sizes}},...r.price?[{type:p}]:[],...r.finishes?[{type:f}]:[],...r.buy||r.page?[{type:m,props:{buy:r.buy,page:r.page}}]:[]];return{type:s,props:O,slots:{[u]:T}}}const H={...C,gap:0,gapPhone:0,..._(0,0,0,0)},z={...C,gap:8,gapPhone:8,..._(16,20,16,20)},G={role:"heading",size:18,weight:500,case:"none",letterSpacing:-.015,lineHeight:1.2},B=24;function W(e){const t={frame:"full"};for(const o of["cardImage","showBadge"])e[o]!==void 0&&(t[o]=e[o]);const n={type:s,props:{...z,name:"Copy"},slots:{[u]:[{type:l,props:{fixedHeight:!1,_partStyles:{"@name":G}}},U,{type:p}]}};return{type:s,props:{...H,name:"Card"},slots:{[u]:[{type:g,props:t},n]}}}function V(e){if(e.template!==void 0)return e;const t=R(e);return{...e,gap:e.gap??B,gapPhone:e.gapPhone??B,template:y([W(e)],(n,o)=>`${t}~card-${o}-${n}`)}}function X(e,t={}){const n=R(e,t.section);return y([N(e,t)],(o,i)=>`${n}~card-${i}-${o}`)}function ee(e){return Y(e,{showRest:b,section:"AlloyWheelsListing"})}function Y(e,t={}){return e.template!==void 0?e:{...e,template:X(e,t)}}export{m as PRODUCT_BUY_BLOCK,Q as PRODUCT_CARD_FIELDS,J as PRODUCT_CARD_SLOT_BLOCKS,f as PRODUCT_COLOUR_BLOCK,h as PRODUCT_EYEBROW_BLOCK,l as PRODUCT_NAME_BLOCK,g as PRODUCT_PICTURE_BLOCK,p as PRODUCT_PRICE_BLOCK,k as PRODUCT_SIZE_BLOCK,P as PRODUCT_SPECS_BLOCK,W as kitCardSeed,N as productCardSeed,X as productCardTemplate,V as withKitCardTemplate,ee as withListingCardTemplate,Y as withProductCardTemplate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RATING_NONE = 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const N=0;export{N as RATING_NONE};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { BlockRender } from "efficient-web-builder/format/lib/document/blocks/block-types";
|
|
2
|
+
export declare const AlloyWheelsListingSlots: {
|
|
3
|
+
template: {
|
|
4
|
+
allow: string[];
|
|
5
|
+
type: "slot";
|
|
6
|
+
};
|
|
7
|
+
};
|
|
2
8
|
export declare const ALLOYWHEELSLISTING_PH: {
|
|
3
9
|
heading: string;
|
|
4
10
|
intro: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PLP_DEFAULT_KINDS as
|
|
1
|
+
import{PLP_DEFAULT_KINDS as t}from"../../../../catalog/plp-item.js";import{PLP_COLUMNS_DEFAULT as e}from"../../../../wheels/plp-grid.js";import{ProductGridSlots as o}from"../ProductGrid/meta.js";const r={template:o.template},n={heading:"Alloy wheels",intro:"Filter by brand, colour, size and fitment to find your set."},a={label:"List",fields:r,defaultProps:{heading:"",intro:"",askForCar:!0,gateHeading:"",gateIntro:"",kinds:[...t],perPage:24,columns:e,defaultSort:"recommended",showInStock:!0,showCollection:!0,showPrice:!0}};export{n as ALLOYWHEELSLISTING_PH,a as AlloyWheelsListingMeta,r as AlloyWheelsListingSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import l from"../../../../../components/wheels-plp/AlloyWheelsListing.js";import{hidableText as t}from"efficient-easel/screen/lib/document/hidable";import{asPlpSortKey as n,listingHiddenFacets as o}from"../../../../wheels/plp-filters.js";import{cardHoverOf as g}from"efficient-web-builder/format/lib/animation/hover";import{phHide as i}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{AlloyWheelsListingMeta as r,ALLOYWHEELSLISTING_PH as a}from"./meta.js";const w={...r,render:e=>d(l,{titleLevel:e.titleLevel,heading:i(e.heading,a.heading,e.editor),intro:i(e.intro,a.intro,e.editor),askForCar:e.askForCar!==!1,gateHeading:t(e.gateHeading),gateIntro:t(e.gateIntro),perPage:e.perPage,columns:e.columns,defaultSort:n(e.defaultSort),ownerId:typeof e.id=="string"?e.id:"",template:e.template,cardImage:e.cardImage,hover:g(e,"AlloyWheelsListing"),hiddenFacets:o(e),showPrice:e.showPrice,showInStock:e.showInStock!==!1,kinds:e.kinds,products:e.products,wheels:e.wheels,fieldUsage:e.fieldUsage,editing:e.editor?.isEditing})};export{w as AlloyWheelsListingRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import t from"../../../../../components/card-pieces/CardFinishSwatches.js";import{useGridCard as i}from"../../../../../components/GridCardTemplate.js";import n from"../../../../../components/card-pieces/HostPart.js";import{ProductColourMeta as o}from"./meta.js";function s(){return r(t,{showSingle:i().rules.showSingle})}const c={...o,render:e=>r(n,{label:o.label??"",editing:!!e.editor?.isEditing,children:r(s,{})})};export{c as ProductColourRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import{withRMark as d}from"efficient-web-builder/render/components/RMark";import c from"../../../../../components/card-pieces/CardEyebrow.js";import{readPartStyles as u}from"efficient-web-builder/render/lib/document/part-styles";import b from"../../../../../components/card-pieces/HostPart.js";import{useProductCardState as f}from"../../../../../components/card-pieces/ProductCardState.js";import{useGridCard as w}from"../../../../../components/GridCardTemplate.js";import{itemBrand as p}from"../../../../catalog/plp-item.js";import{wheelCardEyebrow as y}from"../../../../../components/ProductCardEyebrow.js";import{ProductEyebrowMeta as s}from"./meta.js";function g({region:r}){const o=f(),{fieldUsage:l,reserveEyebrow:a,eyebrow:t}=w(),e=o.kind==="wheel"?o.wheel:null,i=e&&t.brand?p(e):null,m={kindLabel:e?t.kindLabel:null,brand:i?d(i):null,process:e&&t.process&&e.process?d(e.process):null};return n(c,{reserve:a,region:r,children:y(m,l)})}const L={...s,render:r=>{const o=!!r.editor?.isEditing;return n(b,{label:s.label??"",editing:o,children:n(g,{region:{nodeId:typeof r.id=="string"?r.id:void 0,partStyles:u(r),editing:o}})})}};export{L as ProductEyebrowRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as g}from"react/jsx-runtime";import{gridLimitOf as
|
|
1
|
+
import{jsx as g}from"react/jsx-runtime";import{gridLimitOf as I}from"../../../../sections/product-grid-pages.js";import{FIRST_COUNT_IN_CHIPS_PROP as H}from"../../../../wheels/shopper-first-paint.js";import{phoneKey as d,tabletKey as P}from"efficient-easel/draw";import b from"../../../../../components/pdp-dynamic/DynamicRelatedProducts.js";import{DEFAULT_RELATIONSHIP as y}from"../../../../catalog/relationships.js";import{resolveWidth as C}from"efficient-web-builder/format/lib/content/section-width";import k from"../../../../../components/ProductGridSection.js";import{relatedCardCount as s}from"../../../../catalog/related-cards.js";import{hidableText as R}from"efficient-easel/screen/lib/document/hidable";import{cardHoverOf as h}from"efficient-web-builder/format/lib/animation/hover";import{parseSectionHeadPlacement as T}from"efficient-web-builder/format/lib/sections/section-head-placement";import{PH as o}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{phHide as t}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{PRODUCTGRID_PH as a}from"../placeholders.js";import{parseMoreProducts as S}from"../../../../sections/product-grid-pages.js";import{ProductGridMeta as _}from"./meta.js";const Q={..._,render:e=>{const l=typeof e.id=="string"?e.id:"",c=e.template;if(e.dynamic){const n=T(e.headPlacement)==="own-box",m=x=>n?void 0:x;return g(b,{num:m(t(e.num,a.num,e.editor)),title:m(t(e.title,o.sectionHeading,e.editor)),description:m(t(e.description,o.body,e.editor)),omitHead:n,columns:typeof e.columns=="number"?e.columns:3,columnsPhone:e[d("columns")],columnsTablet:e[P("columns")],gap:e.gap,gapPhone:e[d("gap")],cardCount:s(e.limit),relationship:typeof e.relationship=="string"?e.relationship:y,hover:h(e,"ProductGrid"),ownerId:l,template:c,cardImage:e.cardImage,outline:e.outline,indexBadge:e.indexBadge,editing:e.editor?.isEditing})}const r=t(e.linkText,a.link,e.editor),u=e.source,w=C(e,"full"),f=T(e.headPlacement)==="own-box",i=n=>f?void 0:n;return g(k,{gap:e.gap,gapPhone:e[d("gap")],contentCapped:w.mode==="page",num:i(t(e.num,a.num,e.editor)),title:i(t(e.title,o.sectionHeading,e.editor)),titleSize:e.titleSize,padTop:f?0:e.padTop,description:i(t(e.description,o.body,e.editor)),link:i(r?{text:r,href:R(e.linkHref)||"#"}:void 0),products:e.products,wheels:e.wheels,source:u?.slug?u:void 0,catalog:e.catalog,catalogTotal:e.catalogTotal,firstCountInChips:e[H]===!0,kinds:e.kinds,fieldUsage:e.fieldUsage,columns:e.columns,columnsPhone:e[d("columns")],columnsTablet:e[P("columns")],limit:I({limit:e.limit,showAll:e.showAll}),moreProducts:S(e.moreProducts),perPage:e.perPage,editing:e.editor?.isEditing,hover:h(e,"ProductGrid"),ownerId:l,template:c})}};export{Q as ProductGridRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,Fragment as n}from"react/jsx-runtime";import d from"../../../../../components/card-pieces/CardPrice.js";import{useGridCard as o}from"../../../../../components/GridCardTemplate.js";import a from"../../../../../components/card-pieces/HostPart.js";import{readPartStyles as s}from"efficient-web-builder/render/lib/document/part-styles";import{HideTaker as l}from"efficient-web-builder/render/components/ViewHideRoot";import{ProductPriceMeta as i}from"./meta.js";function m({children:e}){return o().ownerId?t(l,{children:e}):t(n,{children:e})}function c({region:e}){const{rules:r}=o();return t(d,{quoteSets:r.quoteSets,setTotal:r.setTotal,wasFollowsSize:r.wasFollowsSize,region:e})}const F={...i,render:e=>{const r=!!e.editor?.isEditing;return t(a,{label:i.label??"",editing:r,onHero:!0,children:t(m,{children:t(c,{region:{nodeId:typeof e.id=="string"?e.id:void 0,partStyles:s(e),editing:r}})})})}};export{F as ProductPriceRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import o from"../../../../../components/card-pieces/HostPart.js";import{CardSpecFacts as c,CardSpecLine as d}from"../../../../../components/card-pieces/CardSpecs.js";import{useGridCard as n}from"../../../../../components/GridCardTemplate.js";import{ProductSpecsMeta as i}from"./meta.js";function a({sizes:e}){const{fieldUsage:t,fit:s}=n();return r(d,{children:r(c,{sizes:e,fieldUsage:t,car:s})})}const S={...i,render:e=>r(o,{label:i.label??"",editing:!!e.editor?.isEditing,children:r(a,{sizes:e.sizes===!0})})};export{S as ProductSpecsRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import a from"../../../../../components/AppointmentBooking.js";import{PH as o}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{parseSectionHeadPlacement as r}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as t}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{AppointmentBookingMeta as b}from"./meta.js";const h={...b,render:e=>{const n=r(e.headPlacement)==="own-box",i=d=>n?void 0:d;return m(a,{eyebrow:i(t(e.eyebrow,o.eyebrow,e.editor)),heading:i(t(e.heading,o.heading,e.editor)),intro:i(t(e.intro,o.body,e.editor)),omitHead:n,buttonLabel:t(e.buttonLabel,o.button,e.editor),successMessage:t(e.successMessage,o.bookingConfirmation,e.editor),boxes:e.boxes,inBoxes:e.layout==="boxes",nodeId:typeof e.id=="string"?e.id:void 0,editing:e.editor?.isEditing})}};export{h as AppointmentBookingRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import d from"../../../../../components/ContactRouting.js";import{CONTACT_ROUTING_DEFAULTS as t}from"efficient-web-builder/format/lib/content/contact";import{hidableText as i}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as u}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as o}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{ContactRoutingMeta as g}from"./meta.js";const x={...g,render:e=>{const r=u(e.headPlacement)==="own-box",m=n=>r?void 0:n;return a(d,{routingNumber:m(o(e.routingNumber,t.routingNumber,e.editor)),routingTagline:m(o(e.routingTagline,t.routingTagline,e.editor)),omitHead:r,groups:e.groups??[],formNumber:o(e.formNumber,t.formNumber,e.editor),formHeading:o(e.formHeading,t.formHeading,e.editor),metaLines:(e.metaItems??[]).map(n=>n?.text??"").filter(Boolean),showOther:e.showOther,otherLabel:i(e.otherLabel)||t.otherLabel,otherNoteTitle:o(e.otherNoteTitle,t.otherNoteTitle,e.editor),otherNoteBody:o(e.otherNoteBody,t.otherNoteBody,e.editor),buttonText:i(e.buttonText)||t.buttonText,consent:o(e.consent,t.consent,e.editor),channels:e.channels??[],formSlug:i(e.formSlug)||void 0,form:e.form,editing:e.editor?.isEditing})}};export{x as ContactRoutingRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PH as t}from"efficient-web-builder/format/lib/document/blocks/placeholders";const
|
|
1
|
+
import{PH as t}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{cardTemplateSlot as e}from"efficient-web-builder/format/lib/content/card-template";const i={num:t.sectionNumber,title:"Section title",link:t.viewAll},l={template:e()},n={label:"Latest Posts",fields:l,defaultProps:{num:"",title:"",linkText:"",linkHref:"/journal",columns:3,limit:3,showAll:!1}};export{i as EVENTS_PH,n as EventsMeta,l as EventsSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as f}from"react/jsx-runtime";import{phoneKey as h}from"efficient-easel/draw";import g,{readFacets as x,readTags as k}from"../../../../../components/Events.js";import{declaredBlockSource as y,sourcedRows as b}from"efficient-web-builder/format/lib/content/block-sources";import{servedListOf as v,servedRowLists as T}from"../../../../content/served-lists.js";import{hidableText as E}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import{phoneKey as h}from"efficient-easel/draw";import g,{readFacets as x,readTags as k}from"../../../../../components/Events.js";import{declaredBlockSource as y,sourcedRows as b}from"efficient-web-builder/format/lib/content/block-sources";import{servedListOf as v,servedRowLists as T}from"../../../../content/served-lists.js";import{hidableText as E}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as S}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as m}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{say as a}from"efficient-web-builder/format/lib/editor-words";import{EventsMeta as A,EVENTS_PH as r}from"./meta.js";const B=()=>[{key:"sample-1",title:a("First card"),excerpt:a("A line about it appears here.")},{key:"sample-2",title:a("Second card"),excerpt:a("A line about it appears here.")},{key:"sample-3",title:a("Third card"),excerpt:a("A line about it appears here.")},{key:"sample-4",title:a("Fourth card"),excerpt:a("A line about it appears here.")}],c=(e,i,t)=>({slug:e.key||`card-${i}`,title:e.title??"",excerpt:e.excerpt??"",cover:e.cover??"",meta:e.meta||void 0,dateLabel:e.dateLabel||void 0,href:e.href||"#",...t?.facets?{facets:t.facets}:{},...t?.tags?{tags:t.tags}:{}}),F=e=>T(e,i=>({facets:x(i.facets),tags:k(i.tags)})),K={...A,render:e=>{const i=S(e.headPlacement)==="own-box",t=d=>i?void 0:d,o=m(e.linkText,r.link,e.editor),n=y(e)!==""?b(e,!!e.editor?.isEditing,B()):null,s=n&&!n.sample?F(e):null,u=n?n.sample?[]:n.rows.map((d,l)=>c(d,l,v(s,d,l))):e.posts;return f(g,{num:t(m(e.num,r.num,e.editor)),title:t(m(e.title,r.title,e.editor)),link:t(o?{text:o,href:E(e.linkHref)||"/journal"}:void 0),omitHead:i,posts:u,sample:n?.sample?n.rows.map((d,l)=>c(d,l)):void 0,columns:e.columns,limit:e.limit,showAll:e.showAll,layout:e.layout,featuredWidth:e.featuredWidth,listCover:e.listCover,featuredDarken:e.featuredDarken,cardImage:e.cardImage,gap:e.gap,gapPhone:e[h("gap")],nameFilter:e.nameFilter===!0,padTop:typeof e.padTop=="number"?e.padTop:void 0,padBottom:typeof e.padBottom=="number"?e.padBottom:void 0,editing:e.editor?.isEditing,template:e.template,ownerId:String(e.id??"")})}};export{K as EventsRender};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { BlockRender } from "efficient-web-builder/format/lib/document/blocks/block-types";
|
|
2
|
-
|
|
2
|
+
import { RATING_NONE } from "../../../../content/rating.js";
|
|
3
|
+
export { RATING_NONE };
|
|
3
4
|
export declare const RatingBlockMeta: Omit<BlockRender, "render">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{RATING_NONE as t}from"../../../../content/rating.js";const a={label:"Rating",defaultProps:{rating:t}};export{t as RATING_NONE,a as RatingBlockMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import n from"../../../../../components/RatingBlockView.js";import{namedRowField as r}from"efficient-web-builder/format/lib/content/card-template";import{RATING_NONE as t,RatingBlockMeta as o}from"./meta.js";function m(i){return typeof i=="number"&&Number.isFinite(i)&&i>t?i:t}const l={...o,render:i=>e(n,{rating:m(i.rating),field:r(i),editing:!!i.editor?.isEditing})};export{l as RatingBlockRender};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type CardTemplateSpec } from "efficient-web-builder/format/lib/content/card-template";
|
|
2
|
-
import type
|
|
2
|
+
import { type BlockSeed } from "efficient-web-builder/format/lib/document/seed-parts";
|
|
3
|
+
export declare const eventsCardSeeds: () => BlockSeed[];
|
|
4
|
+
export declare function withEventsTemplate(props: Record<string, unknown>): Record<string, unknown>;
|
|
3
5
|
export declare const drawsKits: (props: Record<string, unknown>) => boolean;
|
|
4
6
|
export declare const productGridCardSeed: (props?: Record<string, unknown>) => BlockSeed;
|
|
5
7
|
export declare const STOREFRONT_CARD_TEMPLATES: readonly CardTemplateSpec[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerCardTemplates as
|
|
1
|
+
import{CARD_ROW_FIELD_PROP as h,CARD_ROW_LINK_PROP as g,registerCardTemplates as D}from"efficient-web-builder/format/lib/content/card-template";import{DIM as o,INNER_BOX as a,TEXT as s,boxPadding as d,fillSlot as w,labelLook as N,labelStyle as B,seedNodes as A,token as p}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as i,CONTAINER_BLOCKS_SLOT as n}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as F}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as I}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as K,EVENTS_FEATURED_DARKEN_STYLE as P,EVENTS_FEATURED_PLACEMENT as U}from"../content/events-featured-look.js";import{SH_LINK as H}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as b}from"../sections/product-grid-columns.js";import{bundleColumns as x}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as M,withHeroPriceTemplate as V}from"../content/hero-price-seed.js";import{CARD_LIST_TYPE as E}from"efficient-web-builder/format/lib/content/card-template";import{FILTER_OPTIONS_FIELD as v,withFilterChipsTemplate as W,withFilterTemplate as G}from"../content/filter-card-seed.js";import{MENU_LINK_BLOCK as Y,withMenuTemplate as $}from"../content/menu-card-seed.js";import{ARTICLE_BODY_BLOCK as X,withArticleBodyTemplate as j}from"../content/article-body-seed.js";import{PRODUCT_BUY_BLOCK as z,PRODUCT_CARD_FIELDS as q,PRODUCT_COLOUR_BLOCK as Q,PRODUCT_EYEBROW_BLOCK as Z,PRODUCT_NAME_BLOCK as J,PRODUCT_PICTURE_BLOCK as ee,PRODUCT_PRICE_BLOCK as te,PRODUCT_SIZE_BLOCK as le,PRODUCT_SPECS_BLOCK as oe,productCardSeed as ae,withKitCardTemplate as m,withListingCardTemplate as ie,withProductCardTemplate as T}from"../content/product-card-seed.js";const u="tags",r=N(12),O={textStyle:"heading-3",...p("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},C={textStyle:"body-1",...p("body",14),lineHeight:1.55},ne={...O,...p("headingSmall",30)},re={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},se=I.fallback,de=480,ce=70,pe=()=>({type:i,props:{...a,name:"Featured",[F]:"cover",darken:K,darkenStyle:P,darkenPhone:ce,darkenStylePhone:P,placement:U,direction:"column",gap:8,gapPhone:8,...d(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:se,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:de,sectionHeightUnitPhone:"px",[g]:"href"},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("title",{...s,tag:"h3",widthFit:"fill"},ne),l("excerpt",{...o,tag:"p",widthFit:"fill",maxWidth:384},C),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"})]}}),be=()=>({type:i,props:{...a,name:"Post",gap:0,gapPhone:0,...d(0,0,0,0),...w("surface"),shadow:!0},slots:{[n]:[{type:"ImageBlock",props:{[h]:"cover",aspect:"16/10",contained:!1}},{type:i,props:{...a,name:"Words",gap:12,gapPhone:12,...re},slots:{[n]:[{type:i,props:{...a,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...d(0,0,0,0)},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"},!0)]}},l("title",{...s,tag:"h3",widthFit:"fill"},O),l("excerpt",{...o,tag:"p",widthFit:"fill"},C),{type:E,props:{[h]:u},slots:{template:[{type:i,props:{...a,name:"Chip",...d(4,8,4,8),sectionBorder:{width:1}},slots:{[n]:[l("label",{...o,tag:"p"},r)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[g]:"href",...H,icon:"arrow-right",iconPosition:"after",_partStyles:{label:B(12)}}}]}}]}}),Ee=()=>[pe(),be()];function me(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Events",L=["featured","post"];return{...e,template:A(Ee(),(he,S)=>{const[_,...k]=S.split("."),y=L[Number(_)]??`card${_}`;return k.length?`${t}~${y}.${k.join(".")}`:`${t}~${y}`})}}const Te={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:u,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:E,label:"Card list"}],seedOnInsert:me},_e=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],ke=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!_e.includes(t))),R={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Y,label:"Menu link"}],seed:$},f=e=>e.dynamic===!0&&e.relationship==="bundles",Ke=(e={})=>ae(e),c={fields:q,blocks:[{type:ee,label:"Picture"},{type:Z,label:"Eyebrow"},{type:J,label:"Name"},{type:oe,label:"Specs"},{type:te,label:"Price"},{type:Q,label:"Colour"},{type:le,label:"Size"},{type:z,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return T(e);const t=b(e);return f(e)?m(t):T(t)}},ye=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...R},{block:"MenuBlock",...R},{block:"ProductGrid",...c},{block:"AlloyWheelsListing",...c,seed:ie},{block:"RelatedProducts",...c,seed:e=>{const t=b({...ke(e),dynamic:!0});return f(t)?m(t):T(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...c,seed:e=>m(b({...e,columns:x(e),dynamic:!0}))},{block:"ProductHero",fields:[],blocks:[{type:M,label:"Price"}],seed:V},{block:"FilterBlock",fields:[{key:"label",label:"Filter name"},{key:v,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],blocks:[{type:E,label:"Card list"}],seed:G},{block:"FilterChipsBlock",fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:W},{block:X,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:j},{block:"Events",...Te}];D(ye);export{ye as STOREFRONT_CARD_TEMPLATES,f as drawsKits,Ee as eventsCardSeeds,Ke as productGridCardSeed,me as withEventsTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as f}from"react/jsx-runtime";import{declaredBlockSource as k,sourcedRows as B}from"efficient-web-builder/format/lib/content/block-sources";import F from"../../components/FooterMenu.js";const p={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment"},E="column";function M({id:o,template:e,menu:r,dataSource:n,dataRows:i,heading:l,accordionMobile:c,showDividers:u,direction:a,linkAlign:d,linkRange:s,menuStyle:m,currentPage:g,editor:t}){return f(F,{owner:{id:String(o??""),type:"MenuBlock",template:e},menu:r,served:k({dataSource:n})?B({dataSource:n,dataRows:i},!!t?.isEditing).rows:void 0,heading:l||void 0,accordionMobile:c,showDividers:u,layout:a==="row"?"row":"column",linkAlign:d,linkRange:s,menuStyle:m,currentPage:g,editing:t?.isEditing})}function _(o){for(const[r,n]of Object.entries(p))o[r]={...o[n]};const e=o.MenuBlock;e.defaultProps={...e.defaultProps,direction:E},e.render=M}export{p as PAGE_BLOCKS_FROM_FOOTER,E as PAGE_MENU_DIRECTION_DEFAULT,_ as addPageBlocksFromFooter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{migrateRenamedProps as o}from"efficient-web-builder/format/lib/document/renamed-props";import{dropEmptySourcedBoxes as m}from"efficient-web-builder/render/lib/document/head-core-boxes";import{markWallLabels as e}from"efficient-web-builder/render/lib/document/wall-labels";function i(r){return e(m(o(r)))}export{i as publishedChromeData};
|
|
@@ -4,6 +4,8 @@ import "./card-templates.js";
|
|
|
4
4
|
import "./section-to-box-rows-reviews.js";
|
|
5
5
|
import "./section-to-box-rows-spec.js";
|
|
6
6
|
import "./section-to-box-rows-productgrid.js";
|
|
7
|
+
import "./section-to-box-rows-events.js";
|
|
7
8
|
import "./section-to-box-rows-detail.js";
|
|
9
|
+
import "./section-to-box-rows-service.js";
|
|
8
10
|
export declare function renderConfig(): Config;
|
|
9
11
|
export declare function headerRenderConfig(): Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as u,jsx as E}from"react/jsx-runtime";import{generalRenderMetas as h}from"efficient-web-builder/format/lib/document/blocks/general/metas";import{finishRenderRegistry as g}from"efficient-web-builder/render/lib/document/render-registry";import{buildBlockCategories as S}from"efficient-web-builder/format/lib/document/section-catalog";import{SITE_HEADER_TYPE as a}from"efficient-web-builder/format/lib/document/section-groups";import"./slot-seeds.js";import"./card-templates.js";import"./section-to-box-rows-reviews.js";import"./section-to-box-rows-spec.js";import"./section-to-box-rows-productgrid.js";import"./section-to-box-rows-detail.js";import{COMMERCE_METAS as R}from"./blocks/commerce/metas.js";import{SERVICE_METAS as _}from"./blocks/service/metas.js";import P from"./blocks/text-part-shapes.json";import{addPageBlocksFromFooter as y}from"./footer-page-blocks.js";import{LAZY_DRAWS as f}from"./lazy-draws.js";import{drawPublishedStorefrontRoot as T}from"./storefront-root.js";import{withShopperAddressMark as b}from"../../components/catalog/ShopperScope.js";import{SHOPPER_BLOCK_TYPES as k}from"../wheels/shopper-first-paint.js";const A=P,O=(t,e)=>{const r=A[t];return{...e,...r?{textParts:r}:null}};let p=null;function l(){if(p)return p;const t={},e=h();for(const o of Object.keys(e))t[o]={...e[o],render:f[o]};const r={...R,..._};for(const o of Object.keys(r)){const
|
|
1
|
+
import{Fragment as u,jsx as E}from"react/jsx-runtime";import{generalRenderMetas as h}from"efficient-web-builder/format/lib/document/blocks/general/metas";import{finishRenderRegistry as g}from"efficient-web-builder/render/lib/document/render-registry";import{buildBlockCategories as S}from"efficient-web-builder/format/lib/document/section-catalog";import{SITE_HEADER_TYPE as a}from"efficient-web-builder/format/lib/document/section-groups";import"./slot-seeds.js";import"./card-templates.js";import"./section-to-box-rows-reviews.js";import"./section-to-box-rows-spec.js";import"./section-to-box-rows-productgrid.js";import"./section-to-box-rows-events.js";import"./section-to-box-rows-detail.js";import"./section-to-box-rows-service.js";import{COMMERCE_METAS as R}from"./blocks/commerce/metas.js";import{SERVICE_METAS as _}from"./blocks/service/metas.js";import P from"./blocks/text-part-shapes.json";import{addPageBlocksFromFooter as y}from"./footer-page-blocks.js";import{LAZY_DRAWS as f}from"./lazy-draws.js";import{drawPublishedStorefrontRoot as T}from"./storefront-root.js";import{withShopperAddressMark as b}from"../../components/catalog/ShopperScope.js";import{SHOPPER_BLOCK_TYPES as k}from"../wheels/shopper-first-paint.js";const A=P,O=(t,e)=>{const r=A[t];return{...e,...r?{textParts:r}:null}};let p=null;function l(){if(p)return p;const t={},e=h();for(const o of Object.keys(e))t[o]={...e[o],render:f[o]};const r={...R,..._};for(const o of Object.keys(r)){const m=k.has(o)?b(f[o]):f[o];t[o]=O(o,{...r[o],render:m})}y(t);const n={root:{render:T},categories:S(),components:t};return g(n),p=n,n}function j(t=l()){const e=t.components,r=Object.keys(e),n=new Set([a]),o=[a];for(;o.length;){const m=o.shift();for(const c of Object.values(e[m]?.fields??{})){if(c?.type!=="slot")continue;const d=c.allow??r.filter(s=>!c.disallow?.includes(s));for(const s of d)n.has(s)||!(s in e)||(n.add(s),o.push(s))}}return[...n]}let i=null;function N(){if(i)return i;const t=l(),e=t.components;return i={...t,root:{render:({children:r})=>E(u,{children:r})},components:Object.fromEntries(j(t).map(r=>[r,e[r]]))},i}export{N as headerRenderConfig,l as renderConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_BOX_SLOT as o,SECTION_BOX_TYPE as i,registerSectionToBox as
|
|
1
|
+
import{SECTION_BOX_SLOT as o,SECTION_BOX_TYPE as i,registerSectionToBox as c}from"efficient-web-builder/render/lib/sections/section-to-box";import{DIM as a,INNER_BOX as r,NO_PAD as d,SAME_KEYS as l,SECTION_BOX as m,TEXT as p}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{token as n}from"efficient-web-builder/render/lib/document/blocks/general/section-head-looks";import{CARD_ROW_FIELD_PROP as g}from"efficient-web-builder/format/lib/content/card-template";import{rowFieldTextSeed as t}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";const s=e=>({textStyle:"body-5",...n("label",e),letterSpacing:.2,case:"upper"}),S=e=>({type:i,props:{...r,name:"Row",mirrorCards:e?"odd":"even",direction:"row",share:"equal",align:"center",gap:48,sectionPaddingTop:60,sectionPaddingBottom:60,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60},slots:{[o]:[{type:i,props:{...r,name:"Words",direction:"column",gap:16},slots:{[o]:[t("eyebrow",p,{...s(13),color:"accent"}),t("title",p,{textStyle:"heading-2",...n("headingMedium",42,28),lineHeight:1.1,letterSpacing:-.02}),t("copy",a,{textStyle:"body-1",...n("body",15),lineHeight:1.6})]}},{type:i,props:{...r,name:"Picture",direction:"column",gap:12},slots:{[o]:[{type:"ImageBlock",props:{[g]:"image",aspect:"1/1",fit:"contain"}},t("tag",{...a,align:"right"},{...s(11),align:"right"})]}}]}}),y={name:"Feature Rows",boxProps:{...m,...d,direction:"column",gap:0},box:l,parts:[{kind:"core",keep:"rest",slots:e=>({template:[S(e.startLeft===!0)]})}]};c({DetailRows:y});export{S as detailRowSeed};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerSectionToBox as o}from"efficient-web-builder/render/lib/sections/section-to-box";import{headOnlyRow as e}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-rows-head";import{CARD_TEMPLATE_SLOT as r}from"efficient-web-builder/format/lib/content/card-template";import{SECTION_ACCENT_INHERIT as t}from"efficient-web-builder/format/lib/content/section-surface";import{eventsCardSeeds as m}from"./card-templates.js";o({Events:e("Events",{slots:{[r]:m()},coreProps:{sectionAccent:t},roomBelow:{bottom:120,bottomPhone:70},pressHeading:!0})});
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { type OwnPad } from "efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";
|
|
2
|
+
export declare const REVIEWS_BAND_OWN: OwnPad;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_BOX_SLOT as
|
|
1
|
+
import{SECTION_BOX_SLOT as i,SECTION_BOX_TYPE as n,headParts as d,registerSectionToBox as l}from"efficient-web-builder/render/lib/sections/section-to-box";import{DIM as s,DROP_COMMON as c,DROP_SIDE_PADDING as m,INNER_BOX as t,SAME_KEYS as g,SECTION_BOX as h,TEXT as e,headingCaseOf as P,wrapperPad as T,wrapperPadKeys as O}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as o}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{FRAME_OWN_BOX as S}from"../../components/Reviews.js";import{bandRoomBelow as b}from"../sections/section-band.js";const a=b(S),y={top:84,bottom:a.bottom,topPhone:84,bottomPhone:a.bottomPhone},r=y,[x,_]=d("Testimonials"),w={type:n,props:{...t,name:"Card",gap:20,sectionPaddingTop:36,sectionPaddingBottom:36,sectionPaddingLeft:36,sectionPaddingRight:36,sectionPaddingTopPhone:28,sectionPaddingBottomPhone:28,sectionPaddingLeftPhone:28,sectionPaddingRightPhone:28,sectionAccent:0},slots:{[i]:[{type:"Text",props:{...e,text:"“",_partStyles:{text:{textStyle:"heading-2",color:"accent",lineHeight:1}}}},o("quote",s,{size:16,lineHeight:1.6}),{type:n,props:{...t,name:"Name",gap:4,sectionPaddingTop:20,sectionBorder:{top:1}},slots:{[i]:[o("name",e,{textStyle:"body-5",weight:500,case:"upper",letterSpacing:.04}),o("role",s,{textStyle:"body-5"})]}}]}},E={name:"Testimonials",boxProps:p=>({...h,direction:"column",gap:44,sectionBorder:{top:1},...T(p,r)}),box:[...g,...O(r)],parts:[{kind:"group",name:"Heading",props:{...t,gap:16},parts:[{...x,props:e},{..._,props:e,style:{textStyle:"heading-2",lineHeight:1,letterSpacing:-.02}}]},{kind:"core",as:"Reviews",keep:["items","columns"],slots:{template:[w]}}],site:P("title"),drop:{...c,...m,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Testimonials' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the Reviews block, which is always own-box here"}};l({Testimonials:E});export{y as REVIEWS_BAND_OWN};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|