@forgebuild/hotal-ui 0.24.1 → 0.24.2
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/dist/components/booking-flow.js +26 -26
- package/dist/hotal-ui.js +117 -106
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import{B as e,C as t,E as n,F as r,G as i,H as a,L as o,M as s,N as c,O as l,P as u,Q as d,R as f,T as p,U as m,V as h,W as g,X as _,Y as v,Z as y,b,et as ee,f as x,h as S,i as C,j as w,n as T,o as te,q as E,s as ne,t as D,tt as O,u as re}from"./chunks/client-DNa0V682.js";import{i as ie,o as ae,r as oe,t as se}from"./chunks/calendar-B8eNjUm2.js";import{t as k}from"./chunks/stripe-BjXf5ZQJ.js";import{t as A}from"./chunks/preload-helper-Czpn1I53.js";var ce=l(`<div class="bf-loading svelte-gavyia"><div class="bf-spinner svelte-gavyia"></div></div>`),le=l(`<span class="svelte-gavyia"> </span>`),j=l(`<button type="button" class="bf-cal-cell svelte-gavyia"> </button>`),ue=l(`<div class="bf-empty svelte-gavyia"><p class="svelte-gavyia"> </p> <div class="bf-cal svelte-gavyia"><div class="bf-cal-header svelte-gavyia"><p class="bf-cal-month svelte-gavyia"> </p> <div class="bf-cal-nav svelte-gavyia"><button type="button" class="svelte-gavyia">‹</button> <button type="button" class="svelte-gavyia">›</button></div></div> <div class="bf-cal-weekdays svelte-gavyia"></div> <div class="bf-cal-grid svelte-gavyia"></div></div></div>`),de=l(`<button type="button"> </button>`),fe=l(`<option class="svelte-gavyia"> </option>`),pe=l(`<label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-select-wrap svelte-gavyia"><select class="svelte-gavyia"><option class="svelte-gavyia"> </option><!></select> <svg class="bf-select-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path d="m6 9 6 6 6-6" stroke-linecap="round" stroke-linejoin="round" class="svelte-gavyia"></path></svg></div></label>`),me=l(`<p class="bf-error svelte-gavyia"> </p>`),he=l(`<div class="bf-payment svelte-gavyia"><div class="bf-payment-header svelte-gavyia"><span class="svelte-gavyia"> </span> <span class="svelte-gavyia"> </span></div> <div class="bf-payment-slot-anchor svelte-gavyia"></div> <p class="bf-payment-hint svelte-gavyia"> </p> <!></div>`),ge=l(`<span class="bf-spinner svelte-gavyia"></span>`),_e=l(`<form class="bf-form svelte-gavyia"><label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-input-icon-wrap svelte-gavyia"><svg class="bf-input-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><circle cx="12" cy="8" r="3.5" class="svelte-gavyia"></circle><path stroke-linecap="round" d="M5 20c1.2-3.4 4-5 7-5s5.8 1.6 7 5" class="svelte-gavyia"></path></svg> <input type="text" name="name" autocomplete="name" required="" class="svelte-gavyia"/></div></label> <label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-input-icon-wrap svelte-gavyia"><svg class="bf-input-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2" class="svelte-gavyia"></rect><path stroke-linecap="round" stroke-linejoin="round" d="m4 6 8 7 8-7" class="svelte-gavyia"></path></svg> <input type="email" name="email" autocomplete="email" class="svelte-gavyia"/></div></label> <label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-input-icon-wrap svelte-gavyia"><svg class="bf-input-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92Z" class="svelte-gavyia"></path></svg> <input type="tel" name="phone" autocomplete="tel" class="svelte-gavyia"/></div></label> <!> <!> <label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <textarea name="notes" rows="3" class="svelte-gavyia"></textarea></label> <label class="bf-checkbox-row svelte-gavyia"><input type="checkbox" name="cancellation_policy" class="bf-checkbox svelte-gavyia" required=""/> <span class="svelte-gavyia"> </span></label> <button type="submit" class="bf-submit svelte-gavyia"><!> </button> <!></form>`),M=l(`<div class="bf-slots svelte-gavyia"><p class="bf-section-label svelte-gavyia"><svg class="bf-section-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><circle cx="12" cy="12" r="9" class="svelte-gavyia"></circle><path stroke-linecap="round" stroke-linejoin="round" d="M12 7v5l3.5 2" class="svelte-gavyia"></path></svg> </p> <div class="bf-slot-list svelte-gavyia"></div></div> <!>`,1),ve=l(`<div class="bf-confirmed svelte-gavyia"><div class="bf-check-circle svelte-gavyia">✓</div> <p class="bf-confirmed-title svelte-gavyia"> </p> <div class="bf-confirmed-card svelte-gavyia"><div class="bf-confirmed-row svelte-gavyia"><span class="svelte-gavyia"> </span><span class="svelte-gavyia"> </span></div> <div class="bf-confirmed-row svelte-gavyia"><span class="svelte-gavyia"> </span><span class="svelte-gavyia"> </span></div> <div class="bf-confirmed-row svelte-gavyia"><span class="svelte-gavyia"> </span><span class="svelte-gavyia"> </span></div></div></div>`),ye=l(`<div class="bf-root svelte-gavyia"><!></div>`),be={hash:`svelte-gavyia`,code:`.bf-root.svelte-gavyia {font-family:inherit;color:var(--bf-text-color, #1a1a1a);}.bf-loading.svelte-gavyia {display:flex;flex-direction:column;align-items:center;gap:0.75rem;padding:2rem 0;}.bf-spinner.svelte-gavyia {width:24px;height:24px;border-radius:9999px;border:2px solid var(--bf-spinner-track, rgba(0, 0, 0, 0.15));border-top-color:var(--bf-spinner-active, #1a1a1a)
|
|
2
|
-
animation: svelte-gavyia-bf-spin 0.7s linear infinite;}
|
|
3
|
-
@keyframes svelte-gavyia-bf-spin {
|
|
4
|
-
to {
|
|
5
|
-
transform: rotate(360deg)
|
|
6
|
-
}
|
|
7
|
-
}.bf-empty.svelte-gavyia {text-align:center;color:var(--bf-muted-text, rgba(0, 0, 0, 0.6));}.bf-section-label.svelte-gavyia {display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;margin:0 0 1rem;}.bf-section-icon.svelte-gavyia {width:1.25rem;height:1.25rem;flex-shrink:0;}.bf-slot-list.svelte-gavyia {display:flex;flex-wrap:wrap;justify-content:center;gap:0.75rem;}.bf-slot.svelte-gavyia {cursor:pointer;border-radius:2px;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));background:transparent;color:inherit;padding:0.5rem 1.25rem;font-size:0.875rem;font-weight:500;transition:background-color 150ms ease, color 150ms ease;}.bf-slot.svelte-gavyia:hover {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-slot-selected.svelte-gavyia {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-form.svelte-gavyia {display:flex;flex-direction:column;gap:1rem;margin-top:1.5rem;text-align:left;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) {display:flex;flex-direction:column;gap:0.375rem;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}.bf-form.svelte-gavyia input:where(.svelte-gavyia)
|
|
8
|
-
.bf-form.svelte-gavyia textarea:where(.svelte-gavyia)
|
|
9
|
-
.bf-form.svelte-gavyia select:where(.svelte-gavyia) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.65rem 0.9rem;font-size:0.875rem;font:inherit;color:inherit;background:transparent;width:100%;box-sizing:border-box;}.bf-select-wrap.svelte-gavyia {position:relative;display:block;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) {appearance:none;padding-right:2.5rem;cursor:pointer;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia):invalid
|
|
10
|
-
.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option[value='']:where(.svelte-gavyia) {color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));}
|
|
11
|
-
/* The closed <select> inherits the host theme's (often light-on-dark) text
|
|
12
|
-
color, but its open option list is native OS/browser chrome with a
|
|
13
|
-
background that can't be recolored to match -- typically white. Options
|
|
14
|
-
need their own explicit, background-appropriate color or inherited light
|
|
15
|
-
text becomes invisible against that white list once it's open. */.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option:where(.svelte-gavyia) {color:#1a1a1a;background:#fff;}.bf-select-icon.svelte-gavyia {position:absolute;top:50%;right:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-input-icon-wrap.svelte-gavyia {position:relative;display:block;}.bf-input-icon-wrap.svelte-gavyia input:where(.svelte-gavyia) {padding-left:2.5rem;}.bf-input-icon.svelte-gavyia {position:absolute;top:50%;left:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-checkbox-row.svelte-gavyia input.bf-checkbox:where(.svelte-gavyia) {appearance:none;margin:0;font:inherit;color:var(--bf-accent-bg, #1a1a1a);width:1.15em;height:1.15em;border:0.15em solid currentColor;border-radius:0.2em;display:grid;place-content:center;flex-shrink:0;cursor:pointer;}.bf-checkbox.svelte-gavyia::before {content:'';width:0.65em;height:0.65em;transform:scale(0);transition:120ms transform ease-in-out;box-shadow:inset 1em 1em currentColor;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);}.bf-checkbox.svelte-gavyia:checked::before {transform:scale(1);}.bf-checkbox.svelte-gavyia:focus-visible {outline:max(2px, 0.15em) solid currentColor;outline-offset:max(2px, 0.15em);}.bf-payment.svelte-gavyia {display:flex;flex-direction:column;gap:0.5rem;}.bf-payment-header.svelte-gavyia {display:flex;align-items:baseline;justify-content:space-between;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}
|
|
16
|
-
/* The mount node is a light-DOM child projected in via the slot above
|
|
17
|
-
(see setupStripeCard) — ::slotted() is required to style it from here. */.svelte-gavyia::slotted(.bf-card-element) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.9rem;display:block;}.bf-payment-hint.svelte-gavyia {font-size:0.75rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));margin:0;}.bf-error.svelte-gavyia {font-size:0.8rem;color:#dc2626;margin:0;}.bf-checkbox-row.svelte-gavyia {flex-direction:row !important;align-items:flex-start;gap:0.5rem;}.bf-checkbox-row.svelte-gavyia input:where(.svelte-gavyia) {margin-top:0.2rem;}.bf-checkbox-row.svelte-gavyia span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:400;text-transform:none;letter-spacing:normal;}.bf-submit.svelte-gavyia {display:flex;align-items:center;justify-content:center;gap:0.5rem;cursor:pointer;border:none;border-radius:2px;padding:0.9rem 1.5rem;font-size:0.8rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--bf-accent-text, #fff);background:var(--bf-accent-bg, #1a1a1a);}.bf-submit.svelte-gavyia:disabled {cursor:default;opacity:0.6;}.bf-spinner.svelte-gavyia {width:1rem;height:1rem;border-radius:50%;border:2px solid color-mix(in srgb, var(--bf-accent-text, #fff) 30%, transparent);border-top-color:var(--bf-accent-text, #fff)
|
|
18
|
-
animation: svelte-gavyia-bf-spin 0.7s linear infinite;}
|
|
19
|
-
@keyframes svelte-gavyia-bf-spin {
|
|
20
|
-
to {
|
|
21
|
-
transform: rotate(360deg)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
@media (prefers-reduced-motion: reduce) {.bf-spinner.svelte-gavyia {
|
|
25
|
-
animation: none;}
|
|
26
|
-
}.bf-confirmed.svelte-gavyia {text-align:center;}.bf-check-circle.svelte-gavyia {display:flex;align-items:center;justify-content:center;width:48px;height:48px;margin:0 auto 1rem;border-radius:9999px;background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);font-size:1.5rem;}.bf-confirmed-title.svelte-gavyia {font-size:1.1rem;}.bf-confirmed-card.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1.25rem;text-align:left;}.bf-confirmed-row.svelte-gavyia {display:flex;justify-content:space-between;padding:0.6rem 0;border-bottom:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.1));font-size:0.85rem;}.bf-confirmed-row.svelte-gavyia:last-child {border-bottom:none;}.bf-cal.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1rem;}.bf-cal-header.svelte-gavyia {display:flex;align-items:center;justify-content:space-between;}.bf-cal-month.svelte-gavyia {margin:0;font-size:0.875rem;font-weight:600;}.bf-cal-nav.svelte-gavyia {display:flex;gap:0.25rem;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia) {display:flex;height:28px;width:28px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;cursor:pointer;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia):disabled {cursor:default;opacity:0.3;}.bf-cal-weekdays.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);margin-top:0.75rem;text-align:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;opacity:0.4;}.bf-cal-grid.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);row-gap:0.25rem;justify-items:center;margin-top:0.25rem;}.bf-cal-cell.svelte-gavyia {display:flex;height:32px;width:32px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;font-size:0.875rem;cursor:pointer;}.bf-cal-cell.svelte-gavyia:disabled {cursor:default;opacity:0.25;}`};function N(l,w){d(w,!0),S(l,be);let D={pickDateEmpty:`Pick a date to see available times:`,errorEmpty:`Something went wrong checking availability. Pick a date to try again:`,noSlotsEmpty:`No tables available for that date. Pick another date below:`,previousMonth:`Previous month`,nextMonth:`Next month`,availableTimes:`Available Times`,nameLabel:`Name`,emailLabel:`Email`,phoneLabel:`Phone`,selectOption:`Select an option`,paymentMethod:`Payment Method`,holdSuffix:`hold`,paymentHint:`A hold is placed on your card and released when you arrive — you're only charged if you no-show.`,paymentUnavailable:`Payment form unavailable — refresh to try again.`,notesLabel:`Notes`,cancellationPolicy:`I understand a card hold will be placed for this reservation, released when I arrive, and only charged if I don't show up.`,confirmButton:`Confirm Reservation`,processingButton:`Processing…`,paymentNotReady:`Payment form is not ready yet — please wait a moment and try again.`,cardHoldFailed:`Your card hold could not be placed. Please try again.`,confirmedTitle:`You're booked! We look forward to seeing you.`,dateLabel:`Date`,timeLabel:`Time`,partySizeLabel:`Party Size`,guestSingular:`Guest`,guestPlural:`Guests`},N=T(w,`date`,7),P=T(w,`guests`,7,2),xe=T(w,`preferredTime`,7),Se=T(w,`closedWeekdays`,23,()=>[]),Ce=T(w,`customFields`,23,()=>[]),F=T(w,`locale`,7),we=T(w,`currency`,7,`USD`),Te=T(w,`strings`,7),I=T(w,`fetchAvailableDates`,7),L=T(w,`searchSlots`,7),R=T(w,`createPaymentIntent`,7),z=T(w,`book`,7),B=T(w,`stripePublishableKey`,7),Ee=T(w,`stripeAppearance`,7),V=v(()=>({...D,...Te()})),De=v(()=>oe(F())),Oe=v(()=>ie(F()));function ke(e,t){w.$$host?.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}let H=i(`loading`),Ae=i(m([])),U=i(null);function je(e,t){let n=k(e,t);return new Intl.NumberFormat(F(),{style:`currency`,currency:t,maximumFractionDigits:0}).format(n)}function Me(e){let[t,n]=e.split(`:`),r=Number(t),i=r>=12?`PM`:`AM`;return`${r%12==0?12:r%12}:${n} ${i}`}function Ne(e){let[t,n]=e.split(`:`);return Number(t)*60+Number(n)}function Pe(e){if(!e)return null;let t=e.match(/^(\d+):(\d+)\s*(AM|PM)$/i);if(!t)return null;let n=Number(t[1])%12;return t[3].toUpperCase()===`PM`&&(n+=12),n*60+Number(t[2])}function Fe(e){g(U,e,!0),g(H,`form`),Ge()}async function Ie(){if(!(!N()||!L())){g(H,`loading`);try{let e=await L()(N(),P());if(!e.length){await ct(`no-slots`);return}g(Ae,e,!0),g(H,`slots`);let t=Pe(xe()),n=e[0],r=1/0;for(let i of e){if(t===null)break;let e=Math.abs(Ne(i.time)-t);e<r&&(r=e,n=i)}Fe(n)}catch{await ct(`error`)}}}f(()=>{if(!N()){ct(`no-date`);return}Ie()});let W=null,Le=null,G=null,Re=null,ze=null,Be=null,Ve=i(``),He=i(``),K=i(!1),Ue=v(()=>!!(B()&&R()));async function We(){return B()?(Le||=A(async()=>{let{loadStripe:e}=await import(`./chunks/lib-Bd4dedte.js`);return{loadStripe:e}},[]).then(({loadStripe:e})=>e(B())),W=await Le,W):null}async function Ge(){if(!(Re||!N()||!R())){g(K,!0);try{await r();let e=await We();if(!e)throw Error(`Stripe failed to load`);let{clientSecret:t,paymentIntentId:n,amountCents:i}=await R()(N(),P());ze=t,Be=n,g(He,`${je(i,we())} ${u(V).holdSuffix}`),G=e.elements({clientSecret:t,appearance:Ee()});let a=G.create(`payment`,{layout:{type:`tabs`,defaultCollapsed:!1},fields:{billingDetails:{address:{country:`auto`,postalCode:`never`}}}}),o=w.$$host,s=(o?.shadowRoot)?.querySelector(`.bf-payment-slot-anchor`);if(!s)throw Error(`payment slot anchor not found`);if(!s.querySelector(`slot[name="payment-mount"]`)){let e=document.createElement(`slot`);e.setAttribute(`name`,`payment-mount`),s.appendChild(e)}let c=document.createElement(`div`);c.slot=`payment-mount`,c.className=`bf-card-element`,o.appendChild(c),a.mount(c),Re=a}catch{g(Ve,u(V).paymentUnavailable,!0)}finally{g(K,!1)}}}let q=i(``),J=i(``),Y=i(``),Ke=i(m({})),qe=i(``),X=i(``),Je=i(``),Ye=i(``),Xe=i(0),Ze=!1,Z=i(0),Q=i(0),$=i(null),Qe=i(`no-date`),$e=ae(new Date),et=v(()=>se(u(Z),u(Q),$e,Se())),tt=v(()=>u(Z)!==$e.getFullYear()||u(Q)!==$e.getMonth()),nt=v(()=>u(Qe)===`no-date`?u(V).pickDateEmpty:u(Qe)===`error`?u(V).errorEmpty:u(V).noSlotsEmpty);function rt(e){return!!(!e.inMonth||e.isPast||e.isClosedWeekday||I()&&u($)!==null&&!u($).has(e.iso))}async function it(){if(!I()){g($,null);return}try{g($,new Set(await I()(P())),!0)}catch{g($,new Set,!0)}}function at(){u(tt)&&(g(Q,u(Q)-1),u(Q)<0&&(g(Q,11),g(Z,u(Z)-1)))}function ot(){g(Q,u(Q)+1),u(Q)>11&&(g(Q,0),g(Z,u(Z)+1))}function st(e){rt(e)||N(e.iso)}async function ct(e){g(H,`empty`),g(Qe,e,!0);let t=N()?new Date(N()):new Date;g(Z,t.getFullYear(),!0),g(Q,t.getMonth(),!0),await it()}function lt(e){return new Date(`${e}T00:00:00`).toLocaleDateString(F(),{weekday:`long`,month:`long`,day:`numeric`})}async function ut(e){if(e.preventDefault(),g(X,``),!u(U)||!N()||!z())return;if(u(Ue)&&(!W||!G||!ze||!Be)){g(X,u(V).paymentNotReady,!0);return}if(g(K,!0),u(Ue)&&!Ze){let e;try{e=await W.confirmPayment({elements:G,confirmParams:{payment_method_data:{billing_details:{name:u(q),email:u(J)||void 0,phone:u(Y)||void 0,address:{postal_code:`00000`}}}},redirect:`if_required`})}catch{g(X,u(V).cardHoldFailed,!0),g(K,!1);return}let{error:t,paymentIntent:n}=e;if(t||n?.status!==`requires_capture`){g(X,t?.message??u(V).cardHoldFailed,!0),g(K,!1);return}Ze=!0}let t=Me(u(U).time),n=Object.fromEntries(Object.entries(u(Ke)).filter(([,e])=>e)),r=await z()({date:N(),startTime:u(U).time,timeDisplay:t,partySize:P(),contactName:u(q),contactEmail:u(J)||void 0,contactPhone:u(Y)||void 0,notes:u(qe)||void 0,customFieldValues:Object.keys(n).length?n:void 0,stripePaymentIntentId:Be??void 0,clerkUserId:window.Clerk?.user?.id||void 0});if(r.ok){g(Je,lt(N()),!0),g(Ye,t,!0),g(Xe,P()),g(H,`confirmed`),ke(`booking-confirmed`,{date:N(),time:t,guests:P()});return}g(X,r.message,!0),g(K,!1),r.status===409&&Ie()}var dt={get date(){return N()},set date(e){N(e),E()},get guests(){return P()},set guests(e=2){P(e),E()},get preferredTime(){return xe()},set preferredTime(e){xe(e),E()},get closedWeekdays(){return Se()},set closedWeekdays(e=[]){Se(e),E()},get customFields(){return Ce()},set customFields(e=[]){Ce(e),E()},get locale(){return F()},set locale(e){F(e),E()},get currency(){return we()},set currency(e=`USD`){we(e),E()},get strings(){return Te()},set strings(e){Te(e),E()},get fetchAvailableDates(){return I()},set fetchAvailableDates(e){I(e),E()},get searchSlots(){return L()},set searchSlots(e){L(e),E()},get createPaymentIntent(){return R()},set createPaymentIntent(e){R(e),E()},get book(){return z()},set book(e){z(e),E()},get stripePublishableKey(){return B()},set stripePublishableKey(e){B(e),E()},get stripeAppearance(){return Ee()},set stripeAppearance(e){Ee(e),E()}},ft=ye(),pt=e(ft),mt=e=>{var t=ce();n(e,t)},ht=t=>{var r=ue(),i=e(r),c=e(i,!0);O(i);var l=a(i,2),d=e(l),f=e(d),m=e(f);O(f);var h=a(f,2),g=e(h),_=a(g,2);O(h),O(d);var v=a(d,2);b(v,20,()=>u(Oe),e=>e,(t,r)=>{var i=le(),a=e(i,!0);O(i),o(()=>p(a,r)),n(t,i)}),O(v);var y=a(v,2);b(y,21,()=>u(et),e=>e.iso,(t,r)=>{var i=j(),a=e(i,!0);O(i),o(e=>{i.disabled=e,p(a,u(r).dayNumber)},[()=>rt(u(r))]),s(`click`,i,()=>st(u(r))),n(t,i)}),O(y),O(l),O(r),o(()=>{p(c,u(nt)),p(m,`${u(De)[u(Q)]??``} ${u(Z)??``}`),g.disabled=!u(tt),ne(g,`aria-label`,u(V).previousMonth),ne(_,`aria-label`,u(V).nextMonth)}),s(`click`,g,at),s(`click`,_,ot),n(t,r)},gt=r=>{var i=M(),l=h(i),d=e(l),f=a(e(d));O(d);var m=a(d,2);b(m,21,()=>u(Ae),e=>e.time,(t,r)=>{var i=de();let a;var c=e(i,!0);O(i),o(e=>{a=x(i,1,`bf-slot svelte-gavyia`,null,a,{"bf-slot-selected":u(U)?.time===u(r).time}),p(c,e)},[()=>Me(u(r).time)]),s(`click`,i,()=>Fe(u(r))),n(t,i)}),O(m),O(l);var v=a(l,2),y=r=>{var i=_e(),s=e(i),l=e(s),d=e(l,!0);O(l);var f=a(l,2),m=a(e(f),2);te(m),O(f),O(s);var h=a(s,2),v=e(h),y=e(v,!0);O(v);var x=a(v,2),S=a(e(x),2);te(S),O(x),O(h);var w=a(h,2),T=e(w),E=e(T,!0);O(T);var D=a(T,2),ie=a(e(D),2);te(ie),O(D),O(w);var ae=a(w,2);b(ae,17,Ce,e=>e.key,(t,r)=>{var i=pe(),s=e(i),c=e(s,!0);O(s);var l=a(s,2),d=e(l),f=e(d),m=e(f,!0);O(f),f.value=f.__value=``;var h=a(f);b(h,16,()=>u(r).options,e=>e,(t,r)=>{var i=fe(),a=e(i,!0);O(i);var s={};o(()=>{p(a,r),s!==(s=r)&&(i.value=(i.__value=r)??``)}),n(t,i)}),O(d),ee(2),O(l),O(i),o(()=>{p(c,u(r).label),ne(d,`name`,u(r).key),p(m,u(V).selectOption)}),re(d,()=>u(Ke)[u(r).key],e=>u(Ke)[u(r).key]=e),n(t,i)});var oe=a(ae,2),se=r=>{var i=he(),s=e(i),c=e(s),l=e(c,!0);O(c);var d=a(c,2),f=e(d,!0);O(d),O(s);var m=a(s,4),h=e(m,!0);O(m);var g=a(m,2),_=t=>{var r=me(),i=e(r,!0);O(r),o(()=>p(i,u(Ve))),n(t,r)};t(g,e=>{u(Ve)&&e(_)}),O(i),o(()=>{p(l,u(V).paymentMethod),p(f,u(He)),p(h,u(V).paymentHint)}),n(r,i)};t(oe,e=>{u(Ue)&&e(se)});var k=a(oe,2),A=e(k),ce=e(A,!0);O(A);var le=a(A,2);_(le),O(k);var j=a(k,2),ue=a(e(j),2),de=e(ue,!0);O(ue),O(j);var M=a(j,2),ve=e(M),ye=e=>{var t=ge();n(e,t)};t(ve,e=>{u(K)&&e(ye)});var be=a(ve);O(M);var N=a(M,2),P=t=>{var r=me(),i=e(r,!0);O(r),o(()=>p(i,u(X))),n(t,r)};t(N,e=>{u(X)&&e(P)}),O(i),o(()=>{p(d,u(V).nameLabel),p(y,u(V).emailLabel),p(E,u(V).phoneLabel),p(ce,u(V).notesLabel),p(de,u(V).cancellationPolicy),M.disabled=u(K),p(be,` ${(u(K)?u(V).processingButton:u(V).confirmButton)??``}`)}),c(`submit`,i,ut),C(m,()=>u(q),e=>g(q,e)),C(S,()=>u(J),e=>g(J,e)),C(ie,()=>u(Y),e=>g(Y,e)),C(le,()=>u(qe),e=>g(qe,e)),n(r,i)};t(v,e=>{u(H)===`form`&&e(y)}),o(()=>p(f,` ${u(V).availableTimes??``}`)),n(r,i)},_t=t=>{var r=ve(),i=a(e(r),2),s=e(i,!0);O(i);var c=a(i,2),l=e(c),d=e(l),f=e(d,!0);O(d);var m=a(d),h=e(m,!0);O(m),O(l);var g=a(l,2),_=e(g),v=e(_,!0);O(_);var y=a(_),b=e(y,!0);O(y),O(g);var ee=a(g,2),x=e(ee),S=e(x,!0);O(x);var C=a(x),w=e(C);O(C),O(ee),O(c),O(r),o(()=>{p(s,u(V).confirmedTitle),p(f,u(V).dateLabel),p(h,u(Je)),p(v,u(V).timeLabel),p(b,u(Ye)),p(S,u(V).partySizeLabel),p(w,`${u(Xe)??``} ${(u(Xe)===1?u(V).guestSingular:u(V).guestPlural)??``}`)}),n(t,r)};return t(pt,e=>{u(H)===`loading`?e(mt):u(H)===`empty`?e(ht,1):u(H)===`slots`||u(H)===`form`?e(gt,2):u(H)===`confirmed`&&e(_t,3)}),O(ft),n(l,ft),y(dt)}w([`click`]),customElements.define(`booking-flow`,D(N,{date:{type:`String`},guests:{type:`Number`},preferredTime:{type:`String`},closedWeekdays:{attribute:`closed-weekdays`,type:`Array`},customFields:{type:`Array`},locale:{attribute:`locale`,type:`String`},currency:{attribute:`currency`,type:`String`},strings:{type:`Object`},fetchAvailableDates:{type:`Object`},searchSlots:{type:`Object`},createPaymentIntent:{type:`Object`},book:{type:`Object`},stripePublishableKey:{type:`String`},stripeAppearance:{type:`Object`}},[],[],{mode:`open`}));
|
|
1
|
+
import{B as e,C as t,E as n,F as r,G as i,H as a,L as o,M as s,N as c,O as l,P as u,Q as d,R as f,T as p,U as m,V as h,W as g,X as _,Y as v,Z as y,b,et as ee,f as x,h as S,i as C,j as w,n as T,o as te,q as E,s as ne,t as D,tt as O,u as re}from"./chunks/client-DNa0V682.js";import{i as ie,o as ae,r as oe,t as se}from"./chunks/calendar-B8eNjUm2.js";import{t as k}from"./chunks/stripe-BjXf5ZQJ.js";import{t as A}from"./chunks/preload-helper-Czpn1I53.js";var ce=l(`<div class="bf-loading svelte-gavyia"><div class="bf-spinner svelte-gavyia"></div></div>`),le=l(`<span class="svelte-gavyia"> </span>`),j=l(`<button type="button" class="bf-cal-cell svelte-gavyia"> </button>`),ue=l(`<div class="bf-empty svelte-gavyia"><p class="svelte-gavyia"> </p> <div class="bf-cal svelte-gavyia"><div class="bf-cal-header svelte-gavyia"><p class="bf-cal-month svelte-gavyia"> </p> <div class="bf-cal-nav svelte-gavyia"><button type="button" class="svelte-gavyia">‹</button> <button type="button" class="svelte-gavyia">›</button></div></div> <div class="bf-cal-weekdays svelte-gavyia"></div> <div class="bf-cal-grid svelte-gavyia"></div></div></div>`),de=l(`<button type="button"> </button>`),fe=l(`<option class="svelte-gavyia"> </option>`),pe=l(`<label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-select-wrap svelte-gavyia"><select class="svelte-gavyia"><option class="svelte-gavyia"> </option><!></select> <svg class="bf-select-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path d="m6 9 6 6 6-6" stroke-linecap="round" stroke-linejoin="round" class="svelte-gavyia"></path></svg></div></label>`),me=l(`<p class="bf-error svelte-gavyia"> </p>`),he=l(`<div class="bf-payment svelte-gavyia"><div class="bf-payment-header svelte-gavyia"><span class="svelte-gavyia"> </span> <span class="svelte-gavyia"> </span></div> <div class="bf-payment-slot-anchor svelte-gavyia"></div> <p class="bf-payment-hint svelte-gavyia"> </p> <!></div>`),ge=l(`<span class="bf-spinner svelte-gavyia"></span>`),_e=l(`<form class="bf-form svelte-gavyia"><label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-input-icon-wrap svelte-gavyia"><svg class="bf-input-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><circle cx="12" cy="8" r="3.5" class="svelte-gavyia"></circle><path stroke-linecap="round" d="M5 20c1.2-3.4 4-5 7-5s5.8 1.6 7 5" class="svelte-gavyia"></path></svg> <input type="text" name="name" autocomplete="name" required="" class="svelte-gavyia"/></div></label> <label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-input-icon-wrap svelte-gavyia"><svg class="bf-input-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2" class="svelte-gavyia"></rect><path stroke-linecap="round" stroke-linejoin="round" d="m4 6 8 7 8-7" class="svelte-gavyia"></path></svg> <input type="email" name="email" autocomplete="email" class="svelte-gavyia"/></div></label> <label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <div class="bf-input-icon-wrap svelte-gavyia"><svg class="bf-input-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92Z" class="svelte-gavyia"></path></svg> <input type="tel" name="phone" autocomplete="tel" class="svelte-gavyia"/></div></label> <!> <!> <label class="svelte-gavyia"><span class="svelte-gavyia"> </span> <textarea name="notes" rows="3" class="svelte-gavyia"></textarea></label> <label class="bf-checkbox-row svelte-gavyia"><input type="checkbox" name="cancellation_policy" class="bf-checkbox svelte-gavyia" required=""/> <span class="svelte-gavyia"> </span></label> <button type="submit" class="bf-submit svelte-gavyia"><!> </button> <!></form>`),M=l(`<div class="bf-slots svelte-gavyia"><p class="bf-section-label svelte-gavyia"><svg class="bf-section-icon svelte-gavyia" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><circle cx="12" cy="12" r="9" class="svelte-gavyia"></circle><path stroke-linecap="round" stroke-linejoin="round" d="M12 7v5l3.5 2" class="svelte-gavyia"></path></svg> </p> <div class="bf-slot-list svelte-gavyia"></div></div> <!>`,1),ve=l(`<div class="bf-confirmed svelte-gavyia"><div class="bf-check-circle svelte-gavyia">✓</div> <p class="bf-confirmed-title svelte-gavyia"> </p> <div class="bf-confirmed-card svelte-gavyia"><div class="bf-confirmed-row svelte-gavyia"><span class="svelte-gavyia"> </span><span class="svelte-gavyia"> </span></div> <div class="bf-confirmed-row svelte-gavyia"><span class="svelte-gavyia"> </span><span class="svelte-gavyia"> </span></div> <div class="bf-confirmed-row svelte-gavyia"><span class="svelte-gavyia"> </span><span class="svelte-gavyia"> </span></div></div></div>`),ye=l(`<div class="bf-root svelte-gavyia"><!></div>`),be={hash:`svelte-gavyia`,code:`.bf-root.svelte-gavyia {font-family:inherit;color:var(--bf-text-color, #1a1a1a);}.bf-loading.svelte-gavyia {display:flex;flex-direction:column;align-items:center;gap:0.75rem;padding:2rem 0;}.bf-spinner.svelte-gavyia {width:24px;height:24px;border-radius:9999px;border:2px solid var(--bf-spinner-track, rgba(0, 0, 0, 0.15));border-top-color:var(--bf-spinner-active, #1a1a1a);\r
|
|
2
|
+
animation: svelte-gavyia-bf-spin 0.7s linear infinite;}\r
|
|
3
|
+
@keyframes svelte-gavyia-bf-spin {\r
|
|
4
|
+
to {\r
|
|
5
|
+
transform: rotate(360deg);\r
|
|
6
|
+
}\r
|
|
7
|
+
}.bf-empty.svelte-gavyia {text-align:center;color:var(--bf-muted-text, rgba(0, 0, 0, 0.6));}.bf-section-label.svelte-gavyia {display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;margin:0 0 1rem;}.bf-section-icon.svelte-gavyia {width:1.25rem;height:1.25rem;flex-shrink:0;}.bf-slot-list.svelte-gavyia {display:flex;flex-wrap:wrap;justify-content:center;gap:0.75rem;}.bf-slot.svelte-gavyia {cursor:pointer;border-radius:2px;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));background:transparent;color:inherit;padding:0.5rem 1.25rem;font-size:0.875rem;font-weight:500;transition:background-color 150ms ease, color 150ms ease;}.bf-slot.svelte-gavyia:hover {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-slot-selected.svelte-gavyia {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-form.svelte-gavyia {display:flex;flex-direction:column;gap:1rem;margin-top:1.5rem;text-align:left;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) {display:flex;flex-direction:column;gap:0.375rem;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}.bf-form.svelte-gavyia input:where(.svelte-gavyia),\r
|
|
8
|
+
.bf-form.svelte-gavyia textarea:where(.svelte-gavyia),\r
|
|
9
|
+
.bf-form.svelte-gavyia select:where(.svelte-gavyia) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.65rem 0.9rem;font-size:0.875rem;font:inherit;color:inherit;background:transparent;width:100%;box-sizing:border-box;}.bf-select-wrap.svelte-gavyia {position:relative;display:block;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) {appearance:none;padding-right:2.5rem;cursor:pointer;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia):invalid,\r
|
|
10
|
+
.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option[value='']:where(.svelte-gavyia) {color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));}\r
|
|
11
|
+
/* The closed <select> inherits the host theme's (often light-on-dark) text\r
|
|
12
|
+
color, but its open option list is native OS/browser chrome with a\r
|
|
13
|
+
background that can't be recolored to match -- typically white. Options\r
|
|
14
|
+
need their own explicit, background-appropriate color or inherited light\r
|
|
15
|
+
text becomes invisible against that white list once it's open. */.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option:where(.svelte-gavyia) {color:#1a1a1a;background:#fff;}.bf-select-icon.svelte-gavyia {position:absolute;top:50%;right:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-input-icon-wrap.svelte-gavyia {position:relative;display:block;}.bf-input-icon-wrap.svelte-gavyia input:where(.svelte-gavyia) {padding-left:2.5rem;}.bf-input-icon.svelte-gavyia {position:absolute;top:50%;left:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-checkbox-row.svelte-gavyia input.bf-checkbox:where(.svelte-gavyia) {appearance:none;margin:0;font:inherit;color:var(--bf-accent-bg, #1a1a1a);width:1.15em;height:1.15em;border:0.15em solid currentColor;border-radius:0.2em;display:grid;place-content:center;flex-shrink:0;cursor:pointer;}.bf-checkbox.svelte-gavyia::before {content:'';width:0.65em;height:0.65em;transform:scale(0);transition:120ms transform ease-in-out;box-shadow:inset 1em 1em currentColor;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);}.bf-checkbox.svelte-gavyia:checked::before {transform:scale(1);}.bf-checkbox.svelte-gavyia:focus-visible {outline:max(2px, 0.15em) solid currentColor;outline-offset:max(2px, 0.15em);}.bf-payment.svelte-gavyia {display:flex;flex-direction:column;gap:0.5rem;}.bf-payment-header.svelte-gavyia {display:flex;align-items:baseline;justify-content:space-between;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}\r
|
|
16
|
+
/* The mount node is a light-DOM child projected in via the slot above\r
|
|
17
|
+
(see setupStripeCard) — ::slotted() is required to style it from here. */.svelte-gavyia::slotted(.bf-card-element) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.9rem;display:block;}.bf-payment-hint.svelte-gavyia {font-size:0.75rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));margin:0;}.bf-error.svelte-gavyia {font-size:0.8rem;color:#dc2626;margin:0;}.bf-checkbox-row.svelte-gavyia {flex-direction:row !important;align-items:flex-start;gap:0.5rem;}.bf-checkbox-row.svelte-gavyia input:where(.svelte-gavyia) {margin-top:0.2rem;}.bf-checkbox-row.svelte-gavyia span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:400;text-transform:none;letter-spacing:normal;}.bf-submit.svelte-gavyia {display:flex;align-items:center;justify-content:center;gap:0.5rem;cursor:pointer;border:none;border-radius:2px;padding:0.9rem 1.5rem;font-size:0.8rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--bf-accent-text, #fff);background:var(--bf-accent-bg, #1a1a1a);}.bf-submit.svelte-gavyia:disabled {cursor:default;opacity:0.6;}.bf-spinner.svelte-gavyia {width:1rem;height:1rem;border-radius:50%;border:2px solid color-mix(in srgb, var(--bf-accent-text, #fff) 30%, transparent);border-top-color:var(--bf-accent-text, #fff);\r
|
|
18
|
+
animation: svelte-gavyia-bf-spin 0.7s linear infinite;}\r
|
|
19
|
+
@keyframes svelte-gavyia-bf-spin {\r
|
|
20
|
+
to {\r
|
|
21
|
+
transform: rotate(360deg);\r
|
|
22
|
+
}\r
|
|
23
|
+
}\r
|
|
24
|
+
@media (prefers-reduced-motion: reduce) {.bf-spinner.svelte-gavyia {\r
|
|
25
|
+
animation: none;}\r
|
|
26
|
+
}.bf-confirmed.svelte-gavyia {text-align:center;}.bf-check-circle.svelte-gavyia {display:flex;align-items:center;justify-content:center;width:48px;height:48px;margin:0 auto 1rem;border-radius:9999px;background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);font-size:1.5rem;}.bf-confirmed-title.svelte-gavyia {font-size:1.1rem;}.bf-confirmed-card.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1.25rem;text-align:left;}.bf-confirmed-row.svelte-gavyia {display:flex;justify-content:space-between;padding:0.6rem 0;border-bottom:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.1));font-size:0.85rem;}.bf-confirmed-row.svelte-gavyia:last-child {border-bottom:none;}.bf-cal.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1rem;}.bf-cal-header.svelte-gavyia {display:flex;align-items:center;justify-content:space-between;}.bf-cal-month.svelte-gavyia {margin:0;font-size:0.875rem;font-weight:600;}.bf-cal-nav.svelte-gavyia {display:flex;gap:0.25rem;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia) {display:flex;height:28px;width:28px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;cursor:pointer;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia):disabled {cursor:default;opacity:0.3;}.bf-cal-weekdays.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);margin-top:0.75rem;text-align:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;opacity:0.4;}.bf-cal-grid.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);row-gap:0.25rem;justify-items:center;margin-top:0.25rem;}.bf-cal-cell.svelte-gavyia {display:flex;height:32px;width:32px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;font-size:0.875rem;cursor:pointer;}.bf-cal-cell.svelte-gavyia:disabled {cursor:default;opacity:0.25;}`};function N(l,w){d(w,!0),S(l,be);let D={pickDateEmpty:`Pick a date to see available times:`,errorEmpty:`Something went wrong checking availability. Pick a date to try again:`,noSlotsEmpty:`No tables available for that date. Pick another date below:`,previousMonth:`Previous month`,nextMonth:`Next month`,availableTimes:`Available Times`,nameLabel:`Name`,emailLabel:`Email`,phoneLabel:`Phone`,selectOption:`Select an option`,paymentMethod:`Payment Method`,holdSuffix:`hold`,paymentHint:`A hold is placed on your card and released when you arrive — you're only charged if you no-show.`,paymentUnavailable:`Payment form unavailable — refresh to try again.`,notesLabel:`Notes`,cancellationPolicy:`I understand a card hold will be placed for this reservation, released when I arrive, and only charged if I don't show up.`,confirmButton:`Confirm Reservation`,processingButton:`Processing…`,paymentNotReady:`Payment form is not ready yet — please wait a moment and try again.`,cardHoldFailed:`Your card hold could not be placed. Please try again.`,confirmedTitle:`You're booked! We look forward to seeing you.`,dateLabel:`Date`,timeLabel:`Time`,partySizeLabel:`Party Size`,guestSingular:`Guest`,guestPlural:`Guests`},N=T(w,`date`,7),P=T(w,`guests`,7,2),xe=T(w,`preferredTime`,7),Se=T(w,`closedWeekdays`,23,()=>[]),Ce=T(w,`customFields`,23,()=>[]),F=T(w,`locale`,7),we=T(w,`currency`,7,`USD`),Te=T(w,`strings`,7),I=T(w,`fetchAvailableDates`,7),Ee=T(w,`searchSlots`,7),L=T(w,`createPaymentIntent`,7),R=T(w,`book`,7),z=T(w,`stripePublishableKey`,7),De=T(w,`stripeAppearance`,7),B=T(w,`contact`,7),V=v(()=>({...D,...Te()})),Oe=v(()=>oe(F())),ke=v(()=>ie(F()));function Ae(e,t){w.$$host?.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}let H=i(`loading`),je=i(m([])),U=i(null);function Me(e,t){let n=k(e,t);return new Intl.NumberFormat(F(),{style:`currency`,currency:t,maximumFractionDigits:0}).format(n)}function Ne(e){let[t,n]=e.split(`:`),r=Number(t),i=r>=12?`PM`:`AM`;return`${r%12==0?12:r%12}:${n} ${i}`}function Pe(e){let[t,n]=e.split(`:`);return Number(t)*60+Number(n)}function Fe(e){if(!e)return null;let t=e.match(/^(\d+):(\d+)\s*(AM|PM)$/i);if(!t)return null;let n=Number(t[1])%12;return t[3].toUpperCase()===`PM`&&(n+=12),n*60+Number(t[2])}function Ie(e){g(U,e,!0),g(H,`form`),Ke()}async function Le(){if(!(!N()||!Ee())){g(H,`loading`);try{let e=await Ee()(N(),P());if(!e.length){await lt(`no-slots`);return}g(je,e,!0),g(H,`slots`);let t=Fe(xe()),n=e[0],r=1/0;for(let i of e){if(t===null)break;let e=Math.abs(Pe(i.time)-t);e<r&&(r=e,n=i)}Ie(n)}catch{await lt(`error`)}}}f(()=>{if(!N()){lt(`no-date`);return}Le()});let W=null,Re=null,G=null,ze=null,Be=null,Ve=null,He=i(``),Ue=i(``),K=i(!1),We=v(()=>!!(z()&&L()));async function Ge(){return z()?(Re||=A(async()=>{let{loadStripe:e}=await import(`./chunks/lib-Bd4dedte.js`);return{loadStripe:e}},[]).then(({loadStripe:e})=>e(z())),W=await Re,W):null}async function Ke(){if(!(ze||!N()||!L())){g(K,!0);try{await r();let e=await Ge();if(!e)throw Error(`Stripe failed to load`);let{clientSecret:t,paymentIntentId:n,amountCents:i}=await L()(N(),P());Be=t,Ve=n,g(Ue,`${Me(i,we())} ${u(V).holdSuffix}`),G=e.elements({clientSecret:t,appearance:De()});let a=G.create(`payment`,{layout:{type:`tabs`,defaultCollapsed:!1},fields:{billingDetails:{address:{country:`auto`,postalCode:`never`}}}}),o=w.$$host,s=(o?.shadowRoot)?.querySelector(`.bf-payment-slot-anchor`);if(!s)throw Error(`payment slot anchor not found`);if(!s.querySelector(`slot[name="payment-mount"]`)){let e=document.createElement(`slot`);e.setAttribute(`name`,`payment-mount`),s.appendChild(e)}let c=document.createElement(`div`);c.slot=`payment-mount`,c.className=`bf-card-element`,o.appendChild(c),a.mount(c),ze=a}catch{g(He,u(V).paymentUnavailable,!0)}finally{g(K,!1)}}}let q=i(``),J=i(``),Y=i(``),qe=i(m({})),Je=i(``);f(()=>{B()&&(B().name&&g(q,B().name,!0),B().email&&g(J,B().email,!0),B().phone&&g(Y,B().phone,!0),B().notes&&g(Je,B().notes,!0))});let X=i(``),Ye=i(``),Xe=i(``),Ze=i(0),Qe=!1,Z=i(0),Q=i(0),$=i(null),$e=i(`no-date`),et=ae(new Date),tt=v(()=>se(u(Z),u(Q),et,Se())),nt=v(()=>u(Z)!==et.getFullYear()||u(Q)!==et.getMonth()),rt=v(()=>u($e)===`no-date`?u(V).pickDateEmpty:u($e)===`error`?u(V).errorEmpty:u(V).noSlotsEmpty);function it(e){return!!(!e.inMonth||e.isPast||e.isClosedWeekday||I()&&u($)!==null&&!u($).has(e.iso))}async function at(){if(!I()){g($,null);return}try{g($,new Set(await I()(P())),!0)}catch{g($,new Set,!0)}}function ot(){u(nt)&&(g(Q,u(Q)-1),u(Q)<0&&(g(Q,11),g(Z,u(Z)-1)))}function st(){g(Q,u(Q)+1),u(Q)>11&&(g(Q,0),g(Z,u(Z)+1))}function ct(e){it(e)||N(e.iso)}async function lt(e){g(H,`empty`),g($e,e,!0);let t=N()?new Date(N()):new Date;g(Z,t.getFullYear(),!0),g(Q,t.getMonth(),!0),await at()}function ut(e){return new Date(`${e}T00:00:00`).toLocaleDateString(F(),{weekday:`long`,month:`long`,day:`numeric`})}async function dt(e){if(e.preventDefault(),g(X,``),!u(U)||!N()||!R())return;if(u(We)&&(!W||!G||!Be||!Ve)){g(X,u(V).paymentNotReady,!0);return}if(g(K,!0),u(We)&&!Qe){let e;try{e=await W.confirmPayment({elements:G,confirmParams:{payment_method_data:{billing_details:{name:u(q),email:u(J)||void 0,phone:u(Y)||void 0,address:{postal_code:`00000`}}}},redirect:`if_required`})}catch{g(X,u(V).cardHoldFailed,!0),g(K,!1);return}let{error:t,paymentIntent:n}=e;if(t||n?.status!==`requires_capture`){g(X,t?.message??u(V).cardHoldFailed,!0),g(K,!1);return}Qe=!0}let t=Ne(u(U).time),n=Object.fromEntries(Object.entries(u(qe)).filter(([,e])=>e)),r=await R()({date:N(),startTime:u(U).time,timeDisplay:t,partySize:P(),contactName:u(q),contactEmail:u(J)||void 0,contactPhone:u(Y)||void 0,notes:u(Je)||void 0,customFieldValues:Object.keys(n).length?n:void 0,stripePaymentIntentId:Ve??void 0,clerkUserId:window.Clerk?.user?.id||void 0});if(r.ok){g(Ye,ut(N()),!0),g(Xe,t,!0),g(Ze,P()),g(H,`confirmed`),Ae(`booking-confirmed`,{date:N(),time:t,guests:P()});return}g(X,r.message,!0),g(K,!1),r.status===409&&Le()}var ft={get date(){return N()},set date(e){N(e),E()},get guests(){return P()},set guests(e=2){P(e),E()},get preferredTime(){return xe()},set preferredTime(e){xe(e),E()},get closedWeekdays(){return Se()},set closedWeekdays(e=[]){Se(e),E()},get customFields(){return Ce()},set customFields(e=[]){Ce(e),E()},get locale(){return F()},set locale(e){F(e),E()},get currency(){return we()},set currency(e=`USD`){we(e),E()},get strings(){return Te()},set strings(e){Te(e),E()},get fetchAvailableDates(){return I()},set fetchAvailableDates(e){I(e),E()},get searchSlots(){return Ee()},set searchSlots(e){Ee(e),E()},get createPaymentIntent(){return L()},set createPaymentIntent(e){L(e),E()},get book(){return R()},set book(e){R(e),E()},get stripePublishableKey(){return z()},set stripePublishableKey(e){z(e),E()},get stripeAppearance(){return De()},set stripeAppearance(e){De(e),E()},get contact(){return B()},set contact(e){B(e),E()}},pt=ye(),mt=e(pt),ht=e=>{var t=ce();n(e,t)},gt=t=>{var r=ue(),i=e(r),c=e(i,!0);O(i);var l=a(i,2),d=e(l),f=e(d),m=e(f);O(f);var h=a(f,2),g=e(h),_=a(g,2);O(h),O(d);var v=a(d,2);b(v,20,()=>u(ke),e=>e,(t,r)=>{var i=le(),a=e(i,!0);O(i),o(()=>p(a,r)),n(t,i)}),O(v);var y=a(v,2);b(y,21,()=>u(tt),e=>e.iso,(t,r)=>{var i=j(),a=e(i,!0);O(i),o(e=>{i.disabled=e,p(a,u(r).dayNumber)},[()=>it(u(r))]),s(`click`,i,()=>ct(u(r))),n(t,i)}),O(y),O(l),O(r),o(()=>{p(c,u(rt)),p(m,`${u(Oe)[u(Q)]??``} ${u(Z)??``}`),g.disabled=!u(nt),ne(g,`aria-label`,u(V).previousMonth),ne(_,`aria-label`,u(V).nextMonth)}),s(`click`,g,ot),s(`click`,_,st),n(t,r)},_t=r=>{var i=M(),l=h(i),d=e(l),f=a(e(d));O(d);var m=a(d,2);b(m,21,()=>u(je),e=>e.time,(t,r)=>{var i=de();let a;var c=e(i,!0);O(i),o(e=>{a=x(i,1,`bf-slot svelte-gavyia`,null,a,{"bf-slot-selected":u(U)?.time===u(r).time}),p(c,e)},[()=>Ne(u(r).time)]),s(`click`,i,()=>Ie(u(r))),n(t,i)}),O(m),O(l);var v=a(l,2),y=r=>{var i=_e(),s=e(i),l=e(s),d=e(l,!0);O(l);var f=a(l,2),m=a(e(f),2);te(m),O(f),O(s);var h=a(s,2),v=e(h),y=e(v,!0);O(v);var x=a(v,2),S=a(e(x),2);te(S),O(x),O(h);var w=a(h,2),T=e(w),E=e(T,!0);O(T);var D=a(T,2),ie=a(e(D),2);te(ie),O(D),O(w);var ae=a(w,2);b(ae,17,Ce,e=>e.key,(t,r)=>{var i=pe(),s=e(i),c=e(s,!0);O(s);var l=a(s,2),d=e(l),f=e(d),m=e(f,!0);O(f),f.value=f.__value=``;var h=a(f);b(h,16,()=>u(r).options,e=>e,(t,r)=>{var i=fe(),a=e(i,!0);O(i);var s={};o(()=>{p(a,r),s!==(s=r)&&(i.value=(i.__value=r)??``)}),n(t,i)}),O(d),ee(2),O(l),O(i),o(()=>{p(c,u(r).label),ne(d,`name`,u(r).key),p(m,u(V).selectOption)}),re(d,()=>u(qe)[u(r).key],e=>u(qe)[u(r).key]=e),n(t,i)});var oe=a(ae,2),se=r=>{var i=he(),s=e(i),c=e(s),l=e(c,!0);O(c);var d=a(c,2),f=e(d,!0);O(d),O(s);var m=a(s,4),h=e(m,!0);O(m);var g=a(m,2),_=t=>{var r=me(),i=e(r,!0);O(r),o(()=>p(i,u(He))),n(t,r)};t(g,e=>{u(He)&&e(_)}),O(i),o(()=>{p(l,u(V).paymentMethod),p(f,u(Ue)),p(h,u(V).paymentHint)}),n(r,i)};t(oe,e=>{u(We)&&e(se)});var k=a(oe,2),A=e(k),ce=e(A,!0);O(A);var le=a(A,2);_(le),O(k);var j=a(k,2),ue=a(e(j),2),de=e(ue,!0);O(ue),O(j);var M=a(j,2),ve=e(M),ye=e=>{var t=ge();n(e,t)};t(ve,e=>{u(K)&&e(ye)});var be=a(ve);O(M);var N=a(M,2),P=t=>{var r=me(),i=e(r,!0);O(r),o(()=>p(i,u(X))),n(t,r)};t(N,e=>{u(X)&&e(P)}),O(i),o(()=>{p(d,u(V).nameLabel),p(y,u(V).emailLabel),p(E,u(V).phoneLabel),p(ce,u(V).notesLabel),p(de,u(V).cancellationPolicy),M.disabled=u(K),p(be,` ${(u(K)?u(V).processingButton:u(V).confirmButton)??``}`)}),c(`submit`,i,dt),C(m,()=>u(q),e=>g(q,e)),C(S,()=>u(J),e=>g(J,e)),C(ie,()=>u(Y),e=>g(Y,e)),C(le,()=>u(Je),e=>g(Je,e)),n(r,i)};t(v,e=>{u(H)===`form`&&e(y)}),o(()=>p(f,` ${u(V).availableTimes??``}`)),n(r,i)},vt=t=>{var r=ve(),i=a(e(r),2),s=e(i,!0);O(i);var c=a(i,2),l=e(c),d=e(l),f=e(d,!0);O(d);var m=a(d),h=e(m,!0);O(m),O(l);var g=a(l,2),_=e(g),v=e(_,!0);O(_);var y=a(_),b=e(y,!0);O(y),O(g);var ee=a(g,2),x=e(ee),S=e(x,!0);O(x);var C=a(x),w=e(C);O(C),O(ee),O(c),O(r),o(()=>{p(s,u(V).confirmedTitle),p(f,u(V).dateLabel),p(h,u(Ye)),p(v,u(V).timeLabel),p(b,u(Xe)),p(S,u(V).partySizeLabel),p(w,`${u(Ze)??``} ${(u(Ze)===1?u(V).guestSingular:u(V).guestPlural)??``}`)}),n(t,r)};return t(mt,e=>{u(H)===`loading`?e(ht):u(H)===`empty`?e(gt,1):u(H)===`slots`||u(H)===`form`?e(_t,2):u(H)===`confirmed`&&e(vt,3)}),O(pt),n(l,pt),y(ft)}w([`click`]),customElements.define(`booking-flow`,D(N,{date:{type:`String`},guests:{type:`Number`},preferredTime:{type:`String`},closedWeekdays:{attribute:`closed-weekdays`,type:`Array`},customFields:{type:`Array`},locale:{attribute:`locale`,type:`String`},currency:{attribute:`currency`,type:`String`},strings:{type:`Object`},fetchAvailableDates:{type:`Object`},searchSlots:{type:`Object`},createPaymentIntent:{type:`Object`},book:{type:`Object`},stripePublishableKey:{type:`String`},stripeAppearance:{type:`Object`},contact:{type:`Object`}},[],[],{mode:`open`}));
|
package/dist/hotal-ui.js
CHANGED
|
@@ -4579,19 +4579,19 @@ function Tu(e, t) {
|
|
|
4579
4579
|
partySizeLabel: "Party Size",
|
|
4580
4580
|
guestSingular: "Guest",
|
|
4581
4581
|
guestPlural: "Guests"
|
|
4582
|
-
}, r = Z(t, "date", 7), i = Z(t, "guests", 7, 2), a = Z(t, "preferredTime", 7), o = Z(t, "closedWeekdays", 23, () => []), s = Z(t, "customFields", 23, () => []), c = Z(t, "locale", 7), l = Z(t, "currency", 7, "USD"), u = Z(t, "strings", 7), d = Z(t, "fetchAvailableDates", 7), f = Z(t, "searchSlots", 7), p = Z(t, "createPaymentIntent", 7), m = Z(t, "book", 7), h = Z(t, "stripePublishableKey", 7), g = Z(t, "stripeAppearance", 7), _ = /* @__PURE__ */ F(() => ({
|
|
4582
|
+
}, r = Z(t, "date", 7), i = Z(t, "guests", 7, 2), a = Z(t, "preferredTime", 7), o = Z(t, "closedWeekdays", 23, () => []), s = Z(t, "customFields", 23, () => []), c = Z(t, "locale", 7), l = Z(t, "currency", 7, "USD"), u = Z(t, "strings", 7), d = Z(t, "fetchAvailableDates", 7), f = Z(t, "searchSlots", 7), p = Z(t, "createPaymentIntent", 7), m = Z(t, "book", 7), h = Z(t, "stripePublishableKey", 7), g = Z(t, "stripeAppearance", 7), _ = Z(t, "contact", 7), v = /* @__PURE__ */ F(() => ({
|
|
4583
4583
|
...n,
|
|
4584
4584
|
...u()
|
|
4585
|
-
})),
|
|
4586
|
-
function
|
|
4585
|
+
})), y = /* @__PURE__ */ F(() => Ml(c())), b = /* @__PURE__ */ F(() => Nl(c()));
|
|
4586
|
+
function x(e, n) {
|
|
4587
4587
|
t.$$host?.dispatchEvent(new CustomEvent(e, {
|
|
4588
4588
|
detail: n,
|
|
4589
4589
|
bubbles: !0,
|
|
4590
4590
|
composed: !0
|
|
4591
4591
|
}));
|
|
4592
4592
|
}
|
|
4593
|
-
let
|
|
4594
|
-
function
|
|
4593
|
+
let S = /* @__PURE__ */ L("loading"), C = /* @__PURE__ */ L(or([])), w = /* @__PURE__ */ L(null);
|
|
4594
|
+
function T(e, t) {
|
|
4595
4595
|
let n = Yl(e, t);
|
|
4596
4596
|
return new Intl.NumberFormat(c(), {
|
|
4597
4597
|
style: "currency",
|
|
@@ -4599,70 +4599,70 @@ function Tu(e, t) {
|
|
|
4599
4599
|
maximumFractionDigits: 0
|
|
4600
4600
|
}).format(n);
|
|
4601
4601
|
}
|
|
4602
|
-
function
|
|
4602
|
+
function E(e) {
|
|
4603
4603
|
let [t, n] = e.split(":"), r = Number(t), i = r >= 12 ? "PM" : "AM";
|
|
4604
4604
|
return `${r % 12 == 0 ? 12 : r % 12}:${n} ${i}`;
|
|
4605
4605
|
}
|
|
4606
|
-
function
|
|
4606
|
+
function D(e) {
|
|
4607
4607
|
let [t, n] = e.split(":");
|
|
4608
4608
|
return Number(t) * 60 + Number(n);
|
|
4609
4609
|
}
|
|
4610
|
-
function
|
|
4610
|
+
function O(e) {
|
|
4611
4611
|
if (!e) return null;
|
|
4612
4612
|
let t = e.match(/^(\d+):(\d+)\s*(AM|PM)$/i);
|
|
4613
4613
|
if (!t) return null;
|
|
4614
4614
|
let n = Number(t[1]) % 12;
|
|
4615
4615
|
return t[3].toUpperCase() === "PM" && (n += 12), n * 60 + Number(t[2]);
|
|
4616
4616
|
}
|
|
4617
|
-
function
|
|
4618
|
-
R(
|
|
4617
|
+
function k(e) {
|
|
4618
|
+
R(w, e, !0), R(S, "form"), ce();
|
|
4619
4619
|
}
|
|
4620
|
-
async function
|
|
4620
|
+
async function A() {
|
|
4621
4621
|
if (!(!r() || !f())) {
|
|
4622
|
-
R(
|
|
4622
|
+
R(S, "loading");
|
|
4623
4623
|
try {
|
|
4624
4624
|
let e = await f()(r(), i());
|
|
4625
4625
|
if (!e.length) {
|
|
4626
|
-
await
|
|
4626
|
+
await Me("no-slots");
|
|
4627
4627
|
return;
|
|
4628
4628
|
}
|
|
4629
|
-
R(
|
|
4630
|
-
let t =
|
|
4629
|
+
R(C, e, !0), R(S, "slots");
|
|
4630
|
+
let t = O(a()), n = e[0], o = Infinity;
|
|
4631
4631
|
for (let r of e) {
|
|
4632
4632
|
if (t === null) break;
|
|
4633
|
-
let e = Math.abs(
|
|
4633
|
+
let e = Math.abs(D(r.time) - t);
|
|
4634
4634
|
e < o && (o = e, n = r);
|
|
4635
4635
|
}
|
|
4636
|
-
|
|
4636
|
+
k(n);
|
|
4637
4637
|
} catch {
|
|
4638
|
-
await
|
|
4638
|
+
await Me("error");
|
|
4639
4639
|
}
|
|
4640
4640
|
}
|
|
4641
4641
|
}
|
|
4642
4642
|
jr(() => {
|
|
4643
4643
|
if (!r()) {
|
|
4644
|
-
|
|
4644
|
+
Me("no-date");
|
|
4645
4645
|
return;
|
|
4646
4646
|
}
|
|
4647
|
-
|
|
4647
|
+
A();
|
|
4648
4648
|
});
|
|
4649
|
-
let
|
|
4650
|
-
async function oe() {
|
|
4651
|
-
return h() ? (j ||= Promise.resolve().then(() => (Cu(), Su)).then(({ loadStripe: e }) => e(h())), A = await j, A) : null;
|
|
4652
|
-
}
|
|
4649
|
+
let j = null, M = null, N = null, ee = null, te = null, ne = null, re = /* @__PURE__ */ L(""), ie = /* @__PURE__ */ L(""), ae = /* @__PURE__ */ L(!1), oe = /* @__PURE__ */ F(() => !!(h() && p()));
|
|
4653
4650
|
async function se() {
|
|
4654
|
-
|
|
4655
|
-
|
|
4651
|
+
return h() ? (M ||= Promise.resolve().then(() => (Cu(), Su)).then(({ loadStripe: e }) => e(h())), j = await M, j) : null;
|
|
4652
|
+
}
|
|
4653
|
+
async function ce() {
|
|
4654
|
+
if (!(ee || !r() || !p())) {
|
|
4655
|
+
R(ae, !0);
|
|
4656
4656
|
try {
|
|
4657
4657
|
await mi();
|
|
4658
|
-
let e = await
|
|
4658
|
+
let e = await se();
|
|
4659
4659
|
if (!e) throw Error("Stripe failed to load");
|
|
4660
4660
|
let { clientSecret: n, paymentIntentId: a, amountCents: o } = await p()(r(), i());
|
|
4661
|
-
|
|
4661
|
+
te = n, ne = a, R(ie, `${T(o, l())} ${H(v).holdSuffix}`), N = e.elements({
|
|
4662
4662
|
clientSecret: n,
|
|
4663
4663
|
appearance: g()
|
|
4664
4664
|
});
|
|
4665
|
-
let s =
|
|
4665
|
+
let s = N.create("payment", {
|
|
4666
4666
|
layout: {
|
|
4667
4667
|
type: "tabs",
|
|
4668
4668
|
defaultCollapsed: !1
|
|
@@ -4678,104 +4678,108 @@ function Tu(e, t) {
|
|
|
4678
4678
|
e.setAttribute("name", "payment-mount"), u.appendChild(e);
|
|
4679
4679
|
}
|
|
4680
4680
|
let d = document.createElement("div");
|
|
4681
|
-
d.slot = "payment-mount", d.className = "bf-card-element", c.appendChild(d), s.mount(d),
|
|
4681
|
+
d.slot = "payment-mount", d.className = "bf-card-element", c.appendChild(d), s.mount(d), ee = s;
|
|
4682
4682
|
} catch {
|
|
4683
|
-
R(
|
|
4683
|
+
R(re, H(v).paymentUnavailable, !0);
|
|
4684
4684
|
} finally {
|
|
4685
|
-
R(
|
|
4685
|
+
R(ae, !1);
|
|
4686
4686
|
}
|
|
4687
4687
|
}
|
|
4688
4688
|
}
|
|
4689
|
-
let
|
|
4690
|
-
|
|
4691
|
-
|
|
4689
|
+
let le = /* @__PURE__ */ L(""), ue = /* @__PURE__ */ L(""), de = /* @__PURE__ */ L(""), fe = /* @__PURE__ */ L(or({})), pe = /* @__PURE__ */ L("");
|
|
4690
|
+
jr(() => {
|
|
4691
|
+
_() && (_().name && R(le, _().name, !0), _().email && R(ue, _().email, !0), _().phone && R(de, _().phone, !0), _().notes && R(pe, _().notes, !0));
|
|
4692
|
+
});
|
|
4693
|
+
let me = /* @__PURE__ */ L(""), he = /* @__PURE__ */ L(""), ge = /* @__PURE__ */ L(""), _e = /* @__PURE__ */ L(0), ve = !1, ye = /* @__PURE__ */ L(0), be = /* @__PURE__ */ L(0), xe = /* @__PURE__ */ L(null), Se = /* @__PURE__ */ L("no-date"), Ce = Fl(/* @__PURE__ */ new Date()), we = /* @__PURE__ */ F(() => Rl(H(ye), H(be), Ce, o())), Te = /* @__PURE__ */ F(() => H(ye) !== Ce.getFullYear() || H(be) !== Ce.getMonth()), Ee = /* @__PURE__ */ F(() => H(Se) === "no-date" ? H(v).pickDateEmpty : H(Se) === "error" ? H(v).errorEmpty : H(v).noSlotsEmpty);
|
|
4694
|
+
function De(e) {
|
|
4695
|
+
return !!(!e.inMonth || e.isPast || e.isClosedWeekday || d() && H(xe) !== null && !H(xe).has(e.iso));
|
|
4692
4696
|
}
|
|
4693
|
-
async function
|
|
4697
|
+
async function Oe() {
|
|
4694
4698
|
if (!d()) {
|
|
4695
|
-
R(
|
|
4699
|
+
R(xe, null);
|
|
4696
4700
|
return;
|
|
4697
4701
|
}
|
|
4698
4702
|
try {
|
|
4699
|
-
R(
|
|
4703
|
+
R(xe, new Set(await d()(i())), !0);
|
|
4700
4704
|
} catch {
|
|
4701
|
-
R(
|
|
4705
|
+
R(xe, /* @__PURE__ */ new Set(), !0);
|
|
4702
4706
|
}
|
|
4703
4707
|
}
|
|
4704
|
-
function Oe() {
|
|
4705
|
-
H(we) && (R(ye, H(ye) - 1), H(ye) < 0 && (R(ye, 11), R(ve, H(ve) - 1)));
|
|
4706
|
-
}
|
|
4707
4708
|
function ke() {
|
|
4708
|
-
R(
|
|
4709
|
+
H(Te) && (R(be, H(be) - 1), H(be) < 0 && (R(be, 11), R(ye, H(ye) - 1)));
|
|
4710
|
+
}
|
|
4711
|
+
function Ae() {
|
|
4712
|
+
R(be, H(be) + 1), H(be) > 11 && (R(be, 0), R(ye, H(ye) + 1));
|
|
4709
4713
|
}
|
|
4710
|
-
function
|
|
4711
|
-
|
|
4714
|
+
function je(e) {
|
|
4715
|
+
De(e) || r(e.iso);
|
|
4712
4716
|
}
|
|
4713
|
-
async function
|
|
4714
|
-
R(
|
|
4717
|
+
async function Me(e) {
|
|
4718
|
+
R(S, "empty"), R(Se, e, !0);
|
|
4715
4719
|
let t = r() ? new Date(r()) : /* @__PURE__ */ new Date();
|
|
4716
|
-
R(
|
|
4720
|
+
R(ye, t.getFullYear(), !0), R(be, t.getMonth(), !0), await Oe();
|
|
4717
4721
|
}
|
|
4718
|
-
function
|
|
4722
|
+
function Ne(e) {
|
|
4719
4723
|
return (/* @__PURE__ */ new Date(`${e}T00:00:00`)).toLocaleDateString(c(), {
|
|
4720
4724
|
weekday: "long",
|
|
4721
4725
|
month: "long",
|
|
4722
4726
|
day: "numeric"
|
|
4723
4727
|
});
|
|
4724
4728
|
}
|
|
4725
|
-
async function
|
|
4726
|
-
if (e.preventDefault(), R(
|
|
4727
|
-
if (H(
|
|
4728
|
-
R(
|
|
4729
|
+
async function Pe(e) {
|
|
4730
|
+
if (e.preventDefault(), R(me, ""), !H(w) || !r() || !m()) return;
|
|
4731
|
+
if (H(oe) && (!j || !N || !te || !ne)) {
|
|
4732
|
+
R(me, H(v).paymentNotReady, !0);
|
|
4729
4733
|
return;
|
|
4730
4734
|
}
|
|
4731
|
-
if (R(
|
|
4735
|
+
if (R(ae, !0), H(oe) && !ve) {
|
|
4732
4736
|
let e;
|
|
4733
4737
|
try {
|
|
4734
|
-
e = await
|
|
4735
|
-
elements:
|
|
4738
|
+
e = await j.confirmPayment({
|
|
4739
|
+
elements: N,
|
|
4736
4740
|
confirmParams: { payment_method_data: { billing_details: {
|
|
4737
|
-
name: H(
|
|
4738
|
-
email: H(
|
|
4739
|
-
phone: H(
|
|
4741
|
+
name: H(le),
|
|
4742
|
+
email: H(ue) || void 0,
|
|
4743
|
+
phone: H(de) || void 0,
|
|
4740
4744
|
address: { postal_code: "00000" }
|
|
4741
4745
|
} } },
|
|
4742
4746
|
redirect: "if_required"
|
|
4743
4747
|
});
|
|
4744
4748
|
} catch {
|
|
4745
|
-
R(
|
|
4749
|
+
R(me, H(v).cardHoldFailed, !0), R(ae, !1);
|
|
4746
4750
|
return;
|
|
4747
4751
|
}
|
|
4748
4752
|
let { error: t, paymentIntent: n } = e;
|
|
4749
4753
|
if (t || n?.status !== "requires_capture") {
|
|
4750
|
-
R(
|
|
4754
|
+
R(me, t?.message ?? H(v).cardHoldFailed, !0), R(ae, !1);
|
|
4751
4755
|
return;
|
|
4752
4756
|
}
|
|
4753
|
-
|
|
4757
|
+
ve = !0;
|
|
4754
4758
|
}
|
|
4755
|
-
let t =
|
|
4759
|
+
let t = E(H(w).time), n = Object.fromEntries(Object.entries(H(fe)).filter(([, e]) => e)), a = await m()({
|
|
4756
4760
|
date: r(),
|
|
4757
|
-
startTime: H(
|
|
4761
|
+
startTime: H(w).time,
|
|
4758
4762
|
timeDisplay: t,
|
|
4759
4763
|
partySize: i(),
|
|
4760
|
-
contactName: H(
|
|
4761
|
-
contactEmail: H(
|
|
4762
|
-
contactPhone: H(
|
|
4763
|
-
notes: H(
|
|
4764
|
+
contactName: H(le),
|
|
4765
|
+
contactEmail: H(ue) || void 0,
|
|
4766
|
+
contactPhone: H(de) || void 0,
|
|
4767
|
+
notes: H(pe) || void 0,
|
|
4764
4768
|
customFieldValues: Object.keys(n).length ? n : void 0,
|
|
4765
|
-
stripePaymentIntentId:
|
|
4769
|
+
stripePaymentIntentId: ne ?? void 0,
|
|
4766
4770
|
clerkUserId: window.Clerk?.user?.id || void 0
|
|
4767
4771
|
});
|
|
4768
4772
|
if (a.ok) {
|
|
4769
|
-
R(
|
|
4773
|
+
R(he, Ne(r()), !0), R(ge, t, !0), R(_e, i()), R(S, "confirmed"), x("booking-confirmed", {
|
|
4770
4774
|
date: r(),
|
|
4771
4775
|
time: t,
|
|
4772
4776
|
guests: i()
|
|
4773
4777
|
});
|
|
4774
4778
|
return;
|
|
4775
4779
|
}
|
|
4776
|
-
R(
|
|
4780
|
+
R(me, a.message, !0), R(ae, !1), a.status === 409 && A();
|
|
4777
4781
|
}
|
|
4778
|
-
var
|
|
4782
|
+
var Fe = {
|
|
4779
4783
|
get date() {
|
|
4780
4784
|
return r();
|
|
4781
4785
|
},
|
|
@@ -4859,10 +4863,16 @@ function Tu(e, t) {
|
|
|
4859
4863
|
},
|
|
4860
4864
|
set stripeAppearance(e) {
|
|
4861
4865
|
g(e), I();
|
|
4866
|
+
},
|
|
4867
|
+
get contact() {
|
|
4868
|
+
return _();
|
|
4869
|
+
},
|
|
4870
|
+
set contact(e) {
|
|
4871
|
+
_(e), I();
|
|
4862
4872
|
}
|
|
4863
|
-
},
|
|
4873
|
+
}, Ie = zu(), Le = z(Ie), Re = (e) => {
|
|
4864
4874
|
G(e, Eu());
|
|
4865
|
-
},
|
|
4875
|
+
}, ze = (e) => {
|
|
4866
4876
|
var t = ku(), n = z(t), r = z(n, !0);
|
|
4867
4877
|
P(n);
|
|
4868
4878
|
var i = B(n, 2), a = z(i), o = z(a), s = z(o);
|
|
@@ -4870,30 +4880,30 @@ function Tu(e, t) {
|
|
|
4870
4880
|
var c = B(o, 2), l = z(c), u = B(l, 2);
|
|
4871
4881
|
P(c), P(a);
|
|
4872
4882
|
var d = B(a, 2);
|
|
4873
|
-
J(d, 20, () => H(
|
|
4883
|
+
J(d, 20, () => H(b), (e) => e, (e, t) => {
|
|
4874
4884
|
var n = Du(), r = z(n, !0);
|
|
4875
4885
|
P(n), V(() => K(r, t)), G(e, n);
|
|
4876
4886
|
}), P(d);
|
|
4877
4887
|
var f = B(d, 2);
|
|
4878
|
-
J(f, 21, () => H(
|
|
4888
|
+
J(f, 21, () => H(we), (e) => e.iso, (e, t) => {
|
|
4879
4889
|
var n = Ou(), r = z(n, !0);
|
|
4880
4890
|
P(n), V((e) => {
|
|
4881
4891
|
n.disabled = e, K(r, H(t).dayNumber);
|
|
4882
|
-
}, [() =>
|
|
4892
|
+
}, [() => De(H(t))]), U("click", n, () => je(H(t))), G(e, n);
|
|
4883
4893
|
}), P(f), P(i), P(t), V(() => {
|
|
4884
|
-
K(r, H(
|
|
4885
|
-
}), U("click", l,
|
|
4886
|
-
},
|
|
4894
|
+
K(r, H(Ee)), K(s, `${H(y)[H(be)] ?? ""} ${H(ye) ?? ""}`), l.disabled = !H(Te), X(l, "aria-label", H(v).previousMonth), X(u, "aria-label", H(v).nextMonth);
|
|
4895
|
+
}), U("click", l, ke), U("click", u, Ae), G(e, t);
|
|
4896
|
+
}, Be = (e) => {
|
|
4887
4897
|
var t = Lu(), n = hr(t), r = z(n), i = B(z(r));
|
|
4888
4898
|
P(r);
|
|
4889
4899
|
var a = B(r, 2);
|
|
4890
|
-
J(a, 21, () => H(
|
|
4900
|
+
J(a, 21, () => H(C), (e) => e.time, (e, t) => {
|
|
4891
4901
|
var n = Au();
|
|
4892
4902
|
let r;
|
|
4893
4903
|
var i = z(n, !0);
|
|
4894
4904
|
P(n), V((e) => {
|
|
4895
|
-
r = Y(n, 1, "bf-slot svelte-gavyia", null, r, { "bf-slot-selected": H(
|
|
4896
|
-
}, [() =>
|
|
4905
|
+
r = Y(n, 1, "bf-slot svelte-gavyia", null, r, { "bf-slot-selected": H(w)?.time === H(t).time }), K(i, e);
|
|
4906
|
+
}, [() => E(H(t).time)]), U("click", n, () => k(H(t))), G(e, n);
|
|
4897
4907
|
}), P(a), P(n);
|
|
4898
4908
|
var o = B(n, 2), c = (e) => {
|
|
4899
4909
|
var t = Iu(), n = z(t), r = z(n), i = z(r, !0);
|
|
@@ -4906,8 +4916,8 @@ function Tu(e, t) {
|
|
|
4906
4916
|
Jo(f), P(d), P(c);
|
|
4907
4917
|
var p = B(c, 2), m = z(p), h = z(m, !0);
|
|
4908
4918
|
P(m);
|
|
4909
|
-
var g = B(m, 2),
|
|
4910
|
-
Jo(
|
|
4919
|
+
var g = B(m, 2), _ = B(z(g), 2);
|
|
4920
|
+
Jo(_), P(g), P(p);
|
|
4911
4921
|
var y = B(p, 2);
|
|
4912
4922
|
J(y, 17, s, (e) => e.key, (e, t) => {
|
|
4913
4923
|
var n = Mu(), r = z(n), i = z(r, !0);
|
|
@@ -4921,8 +4931,8 @@ function Tu(e, t) {
|
|
|
4921
4931
|
K(r, t), i !== (i = t) && (n.value = (n.__value = t) ?? "");
|
|
4922
4932
|
}), G(e, n);
|
|
4923
4933
|
}), P(o), rt(2), P(a), P(n), V(() => {
|
|
4924
|
-
K(i, H(t).label), X(o, "name", H(t).key), K(c, H(
|
|
4925
|
-
}), Go(o, () => H(
|
|
4934
|
+
K(i, H(t).label), X(o, "name", H(t).key), K(c, H(v).selectOption);
|
|
4935
|
+
}), Go(o, () => H(fe)[H(t).key], (e) => H(fe)[H(t).key] = e), G(e, n);
|
|
4926
4936
|
});
|
|
4927
4937
|
var b = B(y, 2), x = (e) => {
|
|
4928
4938
|
var t = Pu(), n = z(t), r = z(n), i = z(r, !0);
|
|
@@ -4933,16 +4943,16 @@ function Tu(e, t) {
|
|
|
4933
4943
|
P(s);
|
|
4934
4944
|
var l = B(s, 2), u = (e) => {
|
|
4935
4945
|
var t = Nu(), n = z(t, !0);
|
|
4936
|
-
P(t), V(() => K(n, H(
|
|
4946
|
+
P(t), V(() => K(n, H(re))), G(e, t);
|
|
4937
4947
|
};
|
|
4938
4948
|
q(l, (e) => {
|
|
4939
|
-
H(
|
|
4949
|
+
H(re) && e(u);
|
|
4940
4950
|
}), P(t), V(() => {
|
|
4941
|
-
K(i, H(
|
|
4951
|
+
K(i, H(v).paymentMethod), K(o, H(ie)), K(c, H(v).paymentHint);
|
|
4942
4952
|
}), G(e, t);
|
|
4943
4953
|
};
|
|
4944
4954
|
q(b, (e) => {
|
|
4945
|
-
H(
|
|
4955
|
+
H(oe) && e(x);
|
|
4946
4956
|
});
|
|
4947
4957
|
var S = B(b, 2), C = z(S), w = z(C, !0);
|
|
4948
4958
|
P(C);
|
|
@@ -4954,24 +4964,24 @@ function Tu(e, t) {
|
|
|
4954
4964
|
G(e, Fu());
|
|
4955
4965
|
};
|
|
4956
4966
|
q(A, (e) => {
|
|
4957
|
-
H(
|
|
4967
|
+
H(ae) && e(j);
|
|
4958
4968
|
});
|
|
4959
4969
|
var M = B(A);
|
|
4960
4970
|
P(k);
|
|
4961
4971
|
var N = B(k, 2), ee = (e) => {
|
|
4962
4972
|
var t = Nu(), n = z(t, !0);
|
|
4963
|
-
P(t), V(() => K(n, H(
|
|
4973
|
+
P(t), V(() => K(n, H(me))), G(e, t);
|
|
4964
4974
|
};
|
|
4965
4975
|
q(N, (e) => {
|
|
4966
|
-
H(
|
|
4976
|
+
H(me) && e(ee);
|
|
4967
4977
|
}), P(t), V(() => {
|
|
4968
|
-
K(i, H(
|
|
4969
|
-
}), Fi("submit", t,
|
|
4978
|
+
K(i, H(v).nameLabel), K(u, H(v).emailLabel), K(h, H(v).phoneLabel), K(w, H(v).notesLabel), K(O, H(v).cancellationPolicy), k.disabled = H(ae), K(M, ` ${(H(ae) ? H(v).processingButton : H(v).confirmButton) ?? ""}`);
|
|
4979
|
+
}), Fi("submit", t, Pe), ms(o, () => H(le), (e) => R(le, e)), ms(f, () => H(ue), (e) => R(ue, e)), ms(_, () => H(de), (e) => R(de, e)), ms(T, () => H(pe), (e) => R(pe, e)), G(e, t);
|
|
4970
4980
|
};
|
|
4971
4981
|
q(o, (e) => {
|
|
4972
|
-
H(
|
|
4973
|
-
}), V(() => K(i, ` ${H(
|
|
4974
|
-
},
|
|
4982
|
+
H(S) === "form" && e(c);
|
|
4983
|
+
}), V(() => K(i, ` ${H(v).availableTimes ?? ""}`)), G(e, t);
|
|
4984
|
+
}, Ve = (e) => {
|
|
4975
4985
|
var t = Ru(), n = B(z(t), 2), r = z(n, !0);
|
|
4976
4986
|
P(n);
|
|
4977
4987
|
var i = B(n, 2), a = z(i), o = z(a), s = z(o, !0);
|
|
@@ -4982,21 +4992,21 @@ function Tu(e, t) {
|
|
|
4982
4992
|
P(d);
|
|
4983
4993
|
var p = B(d), m = z(p, !0);
|
|
4984
4994
|
P(p), P(u);
|
|
4985
|
-
var h = B(u, 2), g = z(h),
|
|
4995
|
+
var h = B(u, 2), g = z(h), _ = z(g, !0);
|
|
4986
4996
|
P(g);
|
|
4987
4997
|
var y = B(g), b = z(y);
|
|
4988
4998
|
P(y), P(h), P(i), P(t), V(() => {
|
|
4989
|
-
K(r, H(
|
|
4999
|
+
K(r, H(v).confirmedTitle), K(s, H(v).dateLabel), K(l, H(he)), K(f, H(v).timeLabel), K(m, H(ge)), K(_, H(v).partySizeLabel), K(b, `${H(_e) ?? ""} ${(H(_e) === 1 ? H(v).guestSingular : H(v).guestPlural) ?? ""}`);
|
|
4990
5000
|
}), G(e, t);
|
|
4991
5001
|
};
|
|
4992
|
-
return q(
|
|
4993
|
-
H(
|
|
4994
|
-
}), P(
|
|
5002
|
+
return q(Le, (e) => {
|
|
5003
|
+
H(S) === "loading" ? e(Re) : H(S) === "empty" ? e(ze, 1) : H(S) === "slots" || H(S) === "form" ? e(Be, 2) : H(S) === "confirmed" && e(Ve, 3);
|
|
5004
|
+
}), P(Ie), G(e, Ie), Tt(Fe);
|
|
4995
5005
|
}
|
|
4996
5006
|
var Eu, Du, Ou, ku, Au, ju, Mu, Nu, Pu, Fu, Iu, Lu, Ru, zu, Bu, Vu = o((() => {
|
|
4997
5007
|
f(), Vs(), Ea(), zl(), Zl(), Eu = /* @__PURE__ */ W("<div class=\"bf-loading svelte-gavyia\"><div class=\"bf-spinner svelte-gavyia\"></div></div>"), Du = /* @__PURE__ */ W("<span class=\"svelte-gavyia\"> </span>"), Ou = /* @__PURE__ */ W("<button type=\"button\" class=\"bf-cal-cell svelte-gavyia\"> </button>"), ku = /* @__PURE__ */ W("<div class=\"bf-empty svelte-gavyia\"><p class=\"svelte-gavyia\"> </p> <div class=\"bf-cal svelte-gavyia\"><div class=\"bf-cal-header svelte-gavyia\"><p class=\"bf-cal-month svelte-gavyia\"> </p> <div class=\"bf-cal-nav svelte-gavyia\"><button type=\"button\" class=\"svelte-gavyia\">‹</button> <button type=\"button\" class=\"svelte-gavyia\">›</button></div></div> <div class=\"bf-cal-weekdays svelte-gavyia\"></div> <div class=\"bf-cal-grid svelte-gavyia\"></div></div></div>"), Au = /* @__PURE__ */ W("<button type=\"button\"> </button>"), ju = /* @__PURE__ */ W("<option class=\"svelte-gavyia\"> </option>"), Mu = /* @__PURE__ */ W("<label class=\"svelte-gavyia\"><span class=\"svelte-gavyia\"> </span> <div class=\"bf-select-wrap svelte-gavyia\"><select class=\"svelte-gavyia\"><option class=\"svelte-gavyia\"> </option><!></select> <svg class=\"bf-select-icon svelte-gavyia\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\"><path d=\"m6 9 6 6 6-6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"svelte-gavyia\"></path></svg></div></label>"), Nu = /* @__PURE__ */ W("<p class=\"bf-error svelte-gavyia\"> </p>"), Pu = /* @__PURE__ */ W("<div class=\"bf-payment svelte-gavyia\"><div class=\"bf-payment-header svelte-gavyia\"><span class=\"svelte-gavyia\"> </span> <span class=\"svelte-gavyia\"> </span></div> <div class=\"bf-payment-slot-anchor svelte-gavyia\"></div> <p class=\"bf-payment-hint svelte-gavyia\"> </p> <!></div>"), Fu = /* @__PURE__ */ W("<span class=\"bf-spinner svelte-gavyia\"></span>"), Iu = /* @__PURE__ */ W("<form class=\"bf-form svelte-gavyia\"><label class=\"svelte-gavyia\"><span class=\"svelte-gavyia\"> </span> <div class=\"bf-input-icon-wrap svelte-gavyia\"><svg class=\"bf-input-icon svelte-gavyia\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"8\" r=\"3.5\" class=\"svelte-gavyia\"></circle><path stroke-linecap=\"round\" d=\"M5 20c1.2-3.4 4-5 7-5s5.8 1.6 7 5\" class=\"svelte-gavyia\"></path></svg> <input type=\"text\" name=\"name\" autocomplete=\"name\" required=\"\" class=\"svelte-gavyia\"/></div></label> <label class=\"svelte-gavyia\"><span class=\"svelte-gavyia\"> </span> <div class=\"bf-input-icon-wrap svelte-gavyia\"><svg class=\"bf-input-icon svelte-gavyia\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" class=\"svelte-gavyia\"></rect><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m4 6 8 7 8-7\" class=\"svelte-gavyia\"></path></svg> <input type=\"email\" name=\"email\" autocomplete=\"email\" class=\"svelte-gavyia\"/></div></label> <label class=\"svelte-gavyia\"><span class=\"svelte-gavyia\"> </span> <div class=\"bf-input-icon-wrap svelte-gavyia\"><svg class=\"bf-input-icon svelte-gavyia\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92Z\" class=\"svelte-gavyia\"></path></svg> <input type=\"tel\" name=\"phone\" autocomplete=\"tel\" class=\"svelte-gavyia\"/></div></label> <!> <!> <label class=\"svelte-gavyia\"><span class=\"svelte-gavyia\"> </span> <textarea name=\"notes\" rows=\"3\" class=\"svelte-gavyia\"></textarea></label> <label class=\"bf-checkbox-row svelte-gavyia\"><input type=\"checkbox\" name=\"cancellation_policy\" class=\"bf-checkbox svelte-gavyia\" required=\"\"/> <span class=\"svelte-gavyia\"> </span></label> <button type=\"submit\" class=\"bf-submit svelte-gavyia\"><!> </button> <!></form>"), Lu = /* @__PURE__ */ W("<div class=\"bf-slots svelte-gavyia\"><p class=\"bf-section-label svelte-gavyia\"><svg class=\"bf-section-icon svelte-gavyia\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"9\" class=\"svelte-gavyia\"></circle><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 7v5l3.5 2\" class=\"svelte-gavyia\"></path></svg> </p> <div class=\"bf-slot-list svelte-gavyia\"></div></div> <!>", 1), Ru = /* @__PURE__ */ W("<div class=\"bf-confirmed svelte-gavyia\"><div class=\"bf-check-circle svelte-gavyia\">✓</div> <p class=\"bf-confirmed-title svelte-gavyia\"> </p> <div class=\"bf-confirmed-card svelte-gavyia\"><div class=\"bf-confirmed-row svelte-gavyia\"><span class=\"svelte-gavyia\"> </span><span class=\"svelte-gavyia\"> </span></div> <div class=\"bf-confirmed-row svelte-gavyia\"><span class=\"svelte-gavyia\"> </span><span class=\"svelte-gavyia\"> </span></div> <div class=\"bf-confirmed-row svelte-gavyia\"><span class=\"svelte-gavyia\"> </span><span class=\"svelte-gavyia\"> </span></div></div></div>"), zu = /* @__PURE__ */ W("<div class=\"bf-root svelte-gavyia\"><!></div>"), Bu = {
|
|
4998
5008
|
hash: "svelte-gavyia",
|
|
4999
|
-
code: ".bf-root.svelte-gavyia {font-family:inherit;color:var(--bf-text-color, #1a1a1a);}.bf-loading.svelte-gavyia {display:flex;flex-direction:column;align-items:center;gap:0.75rem;padding:2rem 0;}.bf-spinner.svelte-gavyia {width:24px;height:24px;border-radius:9999px;border:2px solid var(--bf-spinner-track, rgba(0, 0, 0, 0.15));border-top-color:var(--bf-spinner-active, #1a1a1a);\n animation: svelte-gavyia-bf-spin 0.7s linear infinite;}\n @keyframes svelte-gavyia-bf-spin {\n to {\n transform: rotate(360deg);\n }\n }.bf-empty.svelte-gavyia {text-align:center;color:var(--bf-muted-text, rgba(0, 0, 0, 0.6));}.bf-section-label.svelte-gavyia {display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;margin:0 0 1rem;}.bf-section-icon.svelte-gavyia {width:1.25rem;height:1.25rem;flex-shrink:0;}.bf-slot-list.svelte-gavyia {display:flex;flex-wrap:wrap;justify-content:center;gap:0.75rem;}.bf-slot.svelte-gavyia {cursor:pointer;border-radius:2px;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));background:transparent;color:inherit;padding:0.5rem 1.25rem;font-size:0.875rem;font-weight:500;transition:background-color 150ms ease, color 150ms ease;}.bf-slot.svelte-gavyia:hover {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-slot-selected.svelte-gavyia {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-form.svelte-gavyia {display:flex;flex-direction:column;gap:1rem;margin-top:1.5rem;text-align:left;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) {display:flex;flex-direction:column;gap:0.375rem;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}.bf-form.svelte-gavyia input:where(.svelte-gavyia),\n .bf-form.svelte-gavyia textarea:where(.svelte-gavyia),\n .bf-form.svelte-gavyia select:where(.svelte-gavyia) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.65rem 0.9rem;font-size:0.875rem;font:inherit;color:inherit;background:transparent;width:100%;box-sizing:border-box;}.bf-select-wrap.svelte-gavyia {position:relative;display:block;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) {appearance:none;padding-right:2.5rem;cursor:pointer;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia):invalid,\n .bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option[value='']:where(.svelte-gavyia) {color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));}\n /* The closed <select> inherits the host theme's (often light-on-dark) text\n color, but its open option list is native OS/browser chrome with a\n background that can't be recolored to match -- typically white. Options\n need their own explicit, background-appropriate color or inherited light\n text becomes invisible against that white list once it's open. */.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option:where(.svelte-gavyia) {color:#1a1a1a;background:#fff;}.bf-select-icon.svelte-gavyia {position:absolute;top:50%;right:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-input-icon-wrap.svelte-gavyia {position:relative;display:block;}.bf-input-icon-wrap.svelte-gavyia input:where(.svelte-gavyia) {padding-left:2.5rem;}.bf-input-icon.svelte-gavyia {position:absolute;top:50%;left:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-checkbox-row.svelte-gavyia input.bf-checkbox:where(.svelte-gavyia) {appearance:none;margin:0;font:inherit;color:var(--bf-accent-bg, #1a1a1a);width:1.15em;height:1.15em;border:0.15em solid currentColor;border-radius:0.2em;display:grid;place-content:center;flex-shrink:0;cursor:pointer;}.bf-checkbox.svelte-gavyia::before {content:'';width:0.65em;height:0.65em;transform:scale(0);transition:120ms transform ease-in-out;box-shadow:inset 1em 1em currentColor;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);}.bf-checkbox.svelte-gavyia:checked::before {transform:scale(1);}.bf-checkbox.svelte-gavyia:focus-visible {outline:max(2px, 0.15em) solid currentColor;outline-offset:max(2px, 0.15em);}.bf-payment.svelte-gavyia {display:flex;flex-direction:column;gap:0.5rem;}.bf-payment-header.svelte-gavyia {display:flex;align-items:baseline;justify-content:space-between;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}\n /* The mount node is a light-DOM child projected in via the slot above\n (see setupStripeCard) — ::slotted() is required to style it from here. */.svelte-gavyia::slotted(.bf-card-element) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.9rem;display:block;}.bf-payment-hint.svelte-gavyia {font-size:0.75rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));margin:0;}.bf-error.svelte-gavyia {font-size:0.8rem;color:#dc2626;margin:0;}.bf-checkbox-row.svelte-gavyia {flex-direction:row !important;align-items:flex-start;gap:0.5rem;}.bf-checkbox-row.svelte-gavyia input:where(.svelte-gavyia) {margin-top:0.2rem;}.bf-checkbox-row.svelte-gavyia span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:400;text-transform:none;letter-spacing:normal;}.bf-submit.svelte-gavyia {display:flex;align-items:center;justify-content:center;gap:0.5rem;cursor:pointer;border:none;border-radius:2px;padding:0.9rem 1.5rem;font-size:0.8rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--bf-accent-text, #fff);background:var(--bf-accent-bg, #1a1a1a);}.bf-submit.svelte-gavyia:disabled {cursor:default;opacity:0.6;}.bf-spinner.svelte-gavyia {width:1rem;height:1rem;border-radius:50%;border:2px solid color-mix(in srgb, var(--bf-accent-text, #fff) 30%, transparent);border-top-color:var(--bf-accent-text, #fff);\n animation: svelte-gavyia-bf-spin 0.7s linear infinite;}\n @keyframes svelte-gavyia-bf-spin {\n to {\n transform: rotate(360deg);\n }\n }\n @media (prefers-reduced-motion: reduce) {.bf-spinner.svelte-gavyia {\n animation: none;}\n }.bf-confirmed.svelte-gavyia {text-align:center;}.bf-check-circle.svelte-gavyia {display:flex;align-items:center;justify-content:center;width:48px;height:48px;margin:0 auto 1rem;border-radius:9999px;background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);font-size:1.5rem;}.bf-confirmed-title.svelte-gavyia {font-size:1.1rem;}.bf-confirmed-card.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1.25rem;text-align:left;}.bf-confirmed-row.svelte-gavyia {display:flex;justify-content:space-between;padding:0.6rem 0;border-bottom:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.1));font-size:0.85rem;}.bf-confirmed-row.svelte-gavyia:last-child {border-bottom:none;}.bf-cal.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1rem;}.bf-cal-header.svelte-gavyia {display:flex;align-items:center;justify-content:space-between;}.bf-cal-month.svelte-gavyia {margin:0;font-size:0.875rem;font-weight:600;}.bf-cal-nav.svelte-gavyia {display:flex;gap:0.25rem;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia) {display:flex;height:28px;width:28px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;cursor:pointer;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia):disabled {cursor:default;opacity:0.3;}.bf-cal-weekdays.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);margin-top:0.75rem;text-align:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;opacity:0.4;}.bf-cal-grid.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);row-gap:0.25rem;justify-items:center;margin-top:0.25rem;}.bf-cal-cell.svelte-gavyia {display:flex;height:32px;width:32px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;font-size:0.875rem;cursor:pointer;}.bf-cal-cell.svelte-gavyia:disabled {cursor:default;opacity:0.25;}"
|
|
5009
|
+
code: ".bf-root.svelte-gavyia {font-family:inherit;color:var(--bf-text-color, #1a1a1a);}.bf-loading.svelte-gavyia {display:flex;flex-direction:column;align-items:center;gap:0.75rem;padding:2rem 0;}.bf-spinner.svelte-gavyia {width:24px;height:24px;border-radius:9999px;border:2px solid var(--bf-spinner-track, rgba(0, 0, 0, 0.15));border-top-color:var(--bf-spinner-active, #1a1a1a);\r\n animation: svelte-gavyia-bf-spin 0.7s linear infinite;}\r\n @keyframes svelte-gavyia-bf-spin {\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n }.bf-empty.svelte-gavyia {text-align:center;color:var(--bf-muted-text, rgba(0, 0, 0, 0.6));}.bf-section-label.svelte-gavyia {display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;margin:0 0 1rem;}.bf-section-icon.svelte-gavyia {width:1.25rem;height:1.25rem;flex-shrink:0;}.bf-slot-list.svelte-gavyia {display:flex;flex-wrap:wrap;justify-content:center;gap:0.75rem;}.bf-slot.svelte-gavyia {cursor:pointer;border-radius:2px;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));background:transparent;color:inherit;padding:0.5rem 1.25rem;font-size:0.875rem;font-weight:500;transition:background-color 150ms ease, color 150ms ease;}.bf-slot.svelte-gavyia:hover {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-slot-selected.svelte-gavyia {background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);}.bf-form.svelte-gavyia {display:flex;flex-direction:column;gap:1rem;margin-top:1.5rem;text-align:left;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) {display:flex;flex-direction:column;gap:0.375rem;}.bf-form.svelte-gavyia label:where(.svelte-gavyia) span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}.bf-form.svelte-gavyia input:where(.svelte-gavyia),\r\n .bf-form.svelte-gavyia textarea:where(.svelte-gavyia),\r\n .bf-form.svelte-gavyia select:where(.svelte-gavyia) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.65rem 0.9rem;font-size:0.875rem;font:inherit;color:inherit;background:transparent;width:100%;box-sizing:border-box;}.bf-select-wrap.svelte-gavyia {position:relative;display:block;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) {appearance:none;padding-right:2.5rem;cursor:pointer;}.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia):invalid,\r\n .bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option[value='']:where(.svelte-gavyia) {color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));}\r\n /* The closed <select> inherits the host theme's (often light-on-dark) text\r\n color, but its open option list is native OS/browser chrome with a\r\n background that can't be recolored to match -- typically white. Options\r\n need their own explicit, background-appropriate color or inherited light\r\n text becomes invisible against that white list once it's open. */.bf-select-wrap.svelte-gavyia select:where(.svelte-gavyia) option:where(.svelte-gavyia) {color:#1a1a1a;background:#fff;}.bf-select-icon.svelte-gavyia {position:absolute;top:50%;right:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-input-icon-wrap.svelte-gavyia {position:relative;display:block;}.bf-input-icon-wrap.svelte-gavyia input:where(.svelte-gavyia) {padding-left:2.5rem;}.bf-input-icon.svelte-gavyia {position:absolute;top:50%;left:0.9rem;transform:translateY(-50%);width:1rem;height:1rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.4));pointer-events:none;}.bf-checkbox-row.svelte-gavyia input.bf-checkbox:where(.svelte-gavyia) {appearance:none;margin:0;font:inherit;color:var(--bf-accent-bg, #1a1a1a);width:1.15em;height:1.15em;border:0.15em solid currentColor;border-radius:0.2em;display:grid;place-content:center;flex-shrink:0;cursor:pointer;}.bf-checkbox.svelte-gavyia::before {content:'';width:0.65em;height:0.65em;transform:scale(0);transition:120ms transform ease-in-out;box-shadow:inset 1em 1em currentColor;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);}.bf-checkbox.svelte-gavyia:checked::before {transform:scale(1);}.bf-checkbox.svelte-gavyia:focus-visible {outline:max(2px, 0.15em) solid currentColor;outline-offset:max(2px, 0.15em);}.bf-payment.svelte-gavyia {display:flex;flex-direction:column;gap:0.5rem;}.bf-payment-header.svelte-gavyia {display:flex;align-items:baseline;justify-content:space-between;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}\r\n /* The mount node is a light-DOM child projected in via the slot above\r\n (see setupStripeCard) — ::slotted() is required to style it from here. */.svelte-gavyia::slotted(.bf-card-element) {border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:0.9rem;display:block;}.bf-payment-hint.svelte-gavyia {font-size:0.75rem;color:var(--bf-muted-text, rgba(0, 0, 0, 0.5));margin:0;}.bf-error.svelte-gavyia {font-size:0.8rem;color:#dc2626;margin:0;}.bf-checkbox-row.svelte-gavyia {flex-direction:row !important;align-items:flex-start;gap:0.5rem;}.bf-checkbox-row.svelte-gavyia input:where(.svelte-gavyia) {margin-top:0.2rem;}.bf-checkbox-row.svelte-gavyia span:where(.svelte-gavyia) {font-size:0.75rem;font-weight:400;text-transform:none;letter-spacing:normal;}.bf-submit.svelte-gavyia {display:flex;align-items:center;justify-content:center;gap:0.5rem;cursor:pointer;border:none;border-radius:2px;padding:0.9rem 1.5rem;font-size:0.8rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--bf-accent-text, #fff);background:var(--bf-accent-bg, #1a1a1a);}.bf-submit.svelte-gavyia:disabled {cursor:default;opacity:0.6;}.bf-spinner.svelte-gavyia {width:1rem;height:1rem;border-radius:50%;border:2px solid color-mix(in srgb, var(--bf-accent-text, #fff) 30%, transparent);border-top-color:var(--bf-accent-text, #fff);\r\n animation: svelte-gavyia-bf-spin 0.7s linear infinite;}\r\n @keyframes svelte-gavyia-bf-spin {\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n }\r\n @media (prefers-reduced-motion: reduce) {.bf-spinner.svelte-gavyia {\r\n animation: none;}\r\n }.bf-confirmed.svelte-gavyia {text-align:center;}.bf-check-circle.svelte-gavyia {display:flex;align-items:center;justify-content:center;width:48px;height:48px;margin:0 auto 1rem;border-radius:9999px;background:var(--bf-accent-bg, #1a1a1a);color:var(--bf-accent-text, #fff);font-size:1.5rem;}.bf-confirmed-title.svelte-gavyia {font-size:1.1rem;}.bf-confirmed-card.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1.25rem;text-align:left;}.bf-confirmed-row.svelte-gavyia {display:flex;justify-content:space-between;padding:0.6rem 0;border-bottom:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.1));font-size:0.85rem;}.bf-confirmed-row.svelte-gavyia:last-child {border-bottom:none;}.bf-cal.svelte-gavyia {max-width:20rem;margin:1.5rem auto 0;border:1px solid var(--bf-border-color, rgba(0, 0, 0, 0.15));border-radius:2px;padding:1rem;}.bf-cal-header.svelte-gavyia {display:flex;align-items:center;justify-content:space-between;}.bf-cal-month.svelte-gavyia {margin:0;font-size:0.875rem;font-weight:600;}.bf-cal-nav.svelte-gavyia {display:flex;gap:0.25rem;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia) {display:flex;height:28px;width:28px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;cursor:pointer;}.bf-cal-nav.svelte-gavyia button:where(.svelte-gavyia):disabled {cursor:default;opacity:0.3;}.bf-cal-weekdays.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);margin-top:0.75rem;text-align:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;opacity:0.4;}.bf-cal-grid.svelte-gavyia {display:grid;grid-template-columns:repeat(7, 1fr);row-gap:0.25rem;justify-items:center;margin-top:0.25rem;}.bf-cal-cell.svelte-gavyia {display:flex;height:32px;width:32px;align-items:center;justify-content:center;border-radius:9999px;border:none;background:transparent;color:inherit;font-size:0.875rem;cursor:pointer;}.bf-cal-cell.svelte-gavyia:disabled {cursor:default;opacity:0.25;}"
|
|
5000
5010
|
}, Ii(["click"]), customElements.define("booking-flow", Ls(Tu, {
|
|
5001
5011
|
date: { type: "String" },
|
|
5002
5012
|
guests: { type: "Number" },
|
|
@@ -5020,7 +5030,8 @@ var Eu, Du, Ou, ku, Au, ju, Mu, Nu, Pu, Fu, Iu, Lu, Ru, zu, Bu, Vu = o((() => {
|
|
|
5020
5030
|
createPaymentIntent: { type: "Object" },
|
|
5021
5031
|
book: { type: "Object" },
|
|
5022
5032
|
stripePublishableKey: { type: "String" },
|
|
5023
|
-
stripeAppearance: { type: "Object" }
|
|
5033
|
+
stripeAppearance: { type: "Object" },
|
|
5034
|
+
contact: { type: "Object" }
|
|
5024
5035
|
}, [], [], { mode: "open" }));
|
|
5025
5036
|
}));
|
|
5026
5037
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -108,6 +108,9 @@ export interface BookingFlowElement extends HTMLElement {
|
|
|
108
108
|
book?: (details: BookingDetails) => Promise<BookResult>;
|
|
109
109
|
stripePublishableKey?: string;
|
|
110
110
|
stripeAppearance?: Record<string, unknown>;
|
|
111
|
+
/** Prefills the contact fields; the guest can still edit them and still
|
|
112
|
+
* confirms (and adds any card) themselves. */
|
|
113
|
+
contact?: { name?: string; email?: string; phone?: string; notes?: string };
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
export interface MenuItemBadge {
|