@bigz-app/booking-widget 1.4.1 → 1.4.3

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/index.esm.js CHANGED
@@ -213,6 +213,7 @@ const de$1 = {
213
213
  // Buttons
214
214
  "button.bookNow": "Jetzt buchen",
215
215
  "button.selectDate": "Jetzt Termin auswählen",
216
+ "button.viewDates": "Termine ansehen",
216
217
  "button.moreDetails": "Mehr Details",
217
218
  "button.toPayment": "Zur Zahlung ↓",
218
219
  "button.redeem": "Einlösen",
@@ -251,7 +252,7 @@ const de$1 = {
251
252
  "nextEvents.subtitle": "Wähle einen Termin aus oder zeige alle verfügbaren Termine an",
252
253
  "nextEvents.noUpcoming": "Keine bevorstehenden Termine",
253
254
  "nextEvents.noUpcomingMessage": "Aktuell sind keine Termine verfügbar. Bitte schaue später noch einmal vorbei oder kontaktiere uns direkt.",
254
- "nextEvents.showAll": "Alle Events anzeigen",
255
+ "nextEvents.showAll": "Weitere Termine ansehen...",
255
256
  "nextEvents.priceOnRequest": "Preis auf Anfrage",
256
257
  // Specials view
257
258
  "specials.title": "Sonderangebote",
@@ -502,6 +503,7 @@ const en = {
502
503
  // Buttons
503
504
  "button.bookNow": "Book now",
504
505
  "button.selectDate": "Select a date",
506
+ "button.viewDates": "View dates",
505
507
  "button.moreDetails": "More details",
506
508
  "button.toPayment": "To payment ↓",
507
509
  "button.redeem": "Redeem",
@@ -540,7 +542,7 @@ const en = {
540
542
  "nextEvents.subtitle": "Select a date or view all available dates",
541
543
  "nextEvents.noUpcoming": "No upcoming dates",
542
544
  "nextEvents.noUpcomingMessage": "There are currently no dates available. Please check back later or contact us directly.",
543
- "nextEvents.showAll": "Show all events",
545
+ "nextEvents.showAll": "See more dates...",
544
546
  "nextEvents.priceOnRequest": "Price on request",
545
547
  // Specials view
546
548
  "specials.title": "Special Offers",
@@ -791,6 +793,7 @@ const es = {
791
793
  // Buttons
792
794
  "button.bookNow": "Reservar ahora",
793
795
  "button.selectDate": "Seleccionar fecha",
796
+ "button.viewDates": "Ver fechas",
794
797
  "button.moreDetails": "Más detalles",
795
798
  "button.toPayment": "Al pago ↓",
796
799
  "button.redeem": "Canjear",
@@ -829,7 +832,7 @@ const es = {
829
832
  "nextEvents.subtitle": "Selecciona una fecha o consulta todas las fechas disponibles",
830
833
  "nextEvents.noUpcoming": "Sin próximas fechas",
831
834
  "nextEvents.noUpcomingMessage": "Actualmente no hay fechas disponibles. Por favor, vuelve más tarde o contáctanos directamente.",
832
- "nextEvents.showAll": "Mostrar todos los eventos",
835
+ "nextEvents.showAll": "Ver más fechas...",
833
836
  "nextEvents.priceOnRequest": "Precio bajo consulta",
834
837
  // Specials view
835
838
  "specials.title": "Ofertas especiales",
@@ -1080,6 +1083,7 @@ const pt = {
1080
1083
  // Buttons
1081
1084
  "button.bookNow": "Reservar agora",
1082
1085
  "button.selectDate": "Selecionar data",
1086
+ "button.viewDates": "Ver datas",
1083
1087
  "button.moreDetails": "Mais detalhes",
1084
1088
  "button.toPayment": "Para pagamento ↓",
1085
1089
  "button.redeem": "Resgatar",
@@ -1118,7 +1122,7 @@ const pt = {
1118
1122
  "nextEvents.subtitle": "Selecione uma data ou veja todas as datas disponíveis",
1119
1123
  "nextEvents.noUpcoming": "Sem próximas datas",
1120
1124
  "nextEvents.noUpcomingMessage": "Atualmente não há datas disponíveis. Por favor, volte mais tarde ou contacte-nos diretamente.",
1121
- "nextEvents.showAll": "Mostrar todos os eventos",
1125
+ "nextEvents.showAll": "Ver mais datas...",
1122
1126
  "nextEvents.priceOnRequest": "Preço sob consulta",
1123
1127
  // Specials view
1124
1128
  "specials.title": "Ofertas especiais",
@@ -1369,6 +1373,7 @@ const sv = {
1369
1373
  // Buttons
1370
1374
  "button.bookNow": "Boka nu",
1371
1375
  "button.selectDate": "Välj datum",
1376
+ "button.viewDates": "Visa datum",
1372
1377
  "button.moreDetails": "Mer information",
1373
1378
  "button.toPayment": "Till betalning ↓",
1374
1379
  "button.redeem": "Lös in",
@@ -1407,7 +1412,7 @@ const sv = {
1407
1412
  "nextEvents.subtitle": "Välj ett datum eller visa alla tillgängliga datum",
1408
1413
  "nextEvents.noUpcoming": "Inga kommande datum",
1409
1414
  "nextEvents.noUpcomingMessage": "Det finns för närvarande inga datum tillgängliga. Kom tillbaka senare eller kontakta oss direkt.",
1410
- "nextEvents.showAll": "Visa alla evenemang",
1415
+ "nextEvents.showAll": "Se fler datum...",
1411
1416
  "nextEvents.priceOnRequest": "Pris på förfrågan",
1412
1417
  // Specials view
1413
1418
  "specials.title": "Specialerbjudanden",
@@ -2295,7 +2300,7 @@ const createApiHeaders = (_config, locale) => {
2295
2300
  return {
2296
2301
  "Content-Type": "application/json",
2297
2302
  "X-Origin-Url": window.location.href,
2298
- "X-Language": locale ?? navigator.language,
2303
+ "X-Language": locale,
2299
2304
  "X-User-Agent": navigator.userAgent,
2300
2305
  };
2301
2306
  };
@@ -6282,6 +6287,7 @@ const IconChevronRight = ({ size = 20, color = "white", className, }) => (jsx("s
6282
6287
 
6283
6288
  function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, giftCards, onSuccess, onError, upsellSelections = [], }) {
6284
6289
  const t = useTranslations();
6290
+ const { locale } = useLocale();
6285
6291
  const [isLoading, setIsLoading] = useState(false);
6286
6292
  const [error, setError] = useState(null);
6287
6293
  const handleBooking = async () => {
@@ -6303,7 +6309,7 @@ function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, gif
6303
6309
  };
6304
6310
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-gift-card-booking"), {
6305
6311
  method: "POST",
6306
- headers: createApiHeaders(config),
6312
+ headers: createApiHeaders(config, locale),
6307
6313
  body: JSON.stringify(createRequestBody(config, requestData)),
6308
6314
  });
6309
6315
  const data = await response.json();
@@ -6454,7 +6460,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
6454
6460
  try {
6455
6461
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/mollie-methods"), {
6456
6462
  method: "POST",
6457
- headers: createApiHeaders(config),
6463
+ headers: createApiHeaders(config, locale),
6458
6464
  body: JSON.stringify(createRequestBody(config, {
6459
6465
  organizationId: config.organizationId,
6460
6466
  amount: Math.round(totalAmount),
@@ -6597,7 +6603,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
6597
6603
  }
6598
6604
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
6599
6605
  method: "POST",
6600
- headers: createApiHeaders(config),
6606
+ headers: createApiHeaders(config, locale),
6601
6607
  body: JSON.stringify(createRequestBody(config, buildRequestData(token))),
6602
6608
  });
6603
6609
  const data = await response.json();
@@ -6633,7 +6639,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
6633
6639
  }
6634
6640
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
6635
6641
  method: "POST",
6636
- headers: createApiHeaders(config),
6642
+ headers: createApiHeaders(config, locale),
6637
6643
  body: JSON.stringify(createRequestBody(config, buildRequestData())),
6638
6644
  });
6639
6645
  const data = await response.json();
@@ -6831,6 +6837,7 @@ function PaymentFormInner({ eventDetails, formData, totalAmount, onSuccess, onEr
6831
6837
  }
6832
6838
  function StripePaymentForm({ config, eventDetails, formData, totalAmount, discountCode, giftCards, onSuccess, onError, systemConfig, stripePromise, stripeAppearance, upsellSelections = [], }) {
6833
6839
  const t = useTranslations();
6840
+ const { locale } = useLocale();
6834
6841
  const [clientSecret, setClientSecret] = useState(null);
6835
6842
  const [paymentIntentId, setPaymentIntentId] = useState(null);
6836
6843
  const [isCreatingPaymentIntent, setIsCreatingPaymentIntent] = useState(false);
@@ -6933,7 +6940,7 @@ function StripePaymentForm({ config, eventDetails, formData, totalAmount, discou
6933
6940
  }
6934
6941
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-stripe-payment"), {
6935
6942
  method: "POST",
6936
- headers: createApiHeaders(config),
6943
+ headers: createApiHeaders(config, locale),
6937
6944
  body: JSON.stringify(createRequestBody(config, requestData)),
6938
6945
  });
6939
6946
  const data = await response.json();
@@ -7362,6 +7369,7 @@ function FlowProgress({ currentStep, hasUpsellsStep }) {
7362
7369
  const IconSpinner = ({ size = 16, color = "currentColor" }) => (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { animation: "spin 1s linear infinite" }, children: jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
7363
7370
  function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
7364
7371
  const t = useTranslations();
7372
+ const { locale } = useLocale();
7365
7373
  const [inputValue, setInputValue] = useState("");
7366
7374
  const [isLoading, setIsLoading] = useState(false);
7367
7375
  const [error, setError] = useState(null);
@@ -7381,7 +7389,7 @@ function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVo
7381
7389
  try {
7382
7390
  const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/validate-voucher"), {
7383
7391
  method: "POST",
7384
- headers: createApiHeaders(config),
7392
+ headers: createApiHeaders(config, locale),
7385
7393
  body: JSON.stringify(createRequestBody(config, {
7386
7394
  code: code.trim(),
7387
7395
  orderValue: orderValue,
@@ -12986,37 +12994,28 @@ const ImageCarousel = ({ images, eventName }) => {
12986
12994
  };
12987
12995
 
12988
12996
  function PaymentLogosStrip() {
12989
- const logoHeight = 20;
12997
+ const logoHeight = 34;
12990
12998
  const logoCellStyle = {
12991
12999
  display: "inline-flex",
12992
13000
  alignItems: "center",
12993
13001
  justifyContent: "center",
12994
- padding: "0px 6px",
12995
- minHeight: "29px", // +7px from previous 22px
13002
+ padding: "0px 1px",
13003
+ minHeight: "36px",
12996
13004
  borderRadius: "6px",
12997
13005
  };
12998
13006
  return (jsxs("div", { style: {
12999
- padding: "6px 14px 10px 14px",
13000
- backgroundColor: "color-mix(in srgb, var(--bw-text-color) 100%, var(--bw-surface-color) 18%)",
13007
+ padding: "8px 5px",
13008
+ backgroundColor: "var(--bw-background-color)",
13009
+ border: "1px solid var(--bw-border-color)",
13001
13010
  display: "flex",
13002
13011
  alignItems: "center",
13003
13012
  justifyContent: "center",
13004
13013
  borderRadius: "var(--bw-border-radius)",
13005
- gap: "4px",
13014
+ gap: "0px",
13006
13015
  flexWrap: "wrap",
13007
13016
  width: "fit-content",
13008
13017
  margin: "20px auto",
13009
- }, children: [jsxs("span", { style: logoCellStyle, children: [jsx("span", { style: { color: "#003087", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pay" }), jsx("span", { style: { color: "#009cde", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pal" })] }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: "34", height: logoHeight, viewBox: "0 0 34 20", "aria-label": "Maestro", children: [jsx("circle", { cx: "13", cy: "10", r: "8", fill: "#eb001b" }), jsx("circle", { cx: "21", cy: "10", r: "8", fill: "#00a2e5", fillOpacity: "0.92" })] }) }), jsx("span", { style: logoCellStyle, children: jsx("span", { style: { color: "#1434CB", fontSize: "14px", fontStyle: "italic", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "VISA" }) }), jsx("span", { style: logoCellStyle, children: jsx("span", { style: { color: "purple", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Klarna" }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: "74", height: logoHeight, viewBox: "0 0 74 20", "aria-label": "Amazon Pay", children: [jsx("text", { x: "0", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "amazon" }), jsx("text", { x: "45", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "pay" }), jsx("path", { d: "M5 15 C17 20, 35 20, 48 15", stroke: "#f59e0b", strokeWidth: "1.6", fill: "none", strokeLinecap: "round" })] }) }), jsxs("span", { style: logoCellStyle, children: [jsx("span", { style: {
13010
- fontSize: "16px",
13011
- fontWeight: 800,
13012
- fontFamily: "Arial, sans-serif",
13013
- lineHeight: 1,
13014
- background: "conic-gradient(from 25deg, #4285F4 0 24%, #DB4437 24% 48%, #F4B400 48% 73%, #0F9D58 73% 100%)",
13015
- WebkitBackgroundClip: "text",
13016
- backgroundClip: "text",
13017
- color: "transparent",
13018
- WebkitTextFillColor: "transparent",
13019
- }, children: "G" }), jsx("span", { style: { color: "#5f6368", fontSize: "14px", fontWeight: 600, fontFamily: "Arial, sans-serif", marginLeft: "3px", lineHeight: 1 }, children: "Pay" })] }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: "60", height: logoHeight, viewBox: "0 0 60 20", "aria-label": "Apple Pay", children: [jsx("text", { x: "0", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "\uF8FF" }), jsx("text", { x: "14", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "Pay" })] }) })] }));
13018
+ }, children: [jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight, height: logoHeight, viewBox: "0 0 48 48", fill: "none", "aria-label": "PayPal", children: [jsx("circle", { cx: "24", cy: "24", r: "20", fill: "#0070BA" }), jsx("path", { d: "M32.3305 18.0977C32.3082 18.24 32.2828 18.3856 32.2542 18.5351C31.2704 23.5861 27.9046 25.331 23.606 25.331H21.4173C20.8916 25.331 20.4486 25.7127 20.3667 26.2313L19.2461 33.3381L18.9288 35.3527C18.8755 35.693 19.1379 36 19.4815 36H23.3634C23.8231 36 24.2136 35.666 24.286 35.2127L24.3241 35.0154L25.055 30.3772L25.1019 30.1227C25.1735 29.6678 25.5648 29.3338 26.0245 29.3338H26.6051C30.3661 29.3338 33.3103 27.8068 34.1708 23.388C34.5303 21.5421 34.3442 20.0008 33.393 18.9168C33.1051 18.59 32.748 18.3188 32.3305 18.0977Z", fill: "white", fillOpacity: "0.6" }), jsx("path", { d: "M31.3009 17.6871C31.1506 17.6434 30.9955 17.6036 30.8364 17.5678C30.6766 17.5328 30.5127 17.5018 30.3441 17.4748C29.754 17.3793 29.1074 17.334 28.4147 17.334H22.5676C22.4237 17.334 22.2869 17.3666 22.1644 17.4254C21.8948 17.5551 21.6944 17.8104 21.6459 18.1229L20.402 26.0013L20.3662 26.2311C20.4481 25.7126 20.8911 25.3308 21.4168 25.3308H23.6055C27.9041 25.3308 31.2699 23.5851 32.2537 18.5349C32.2831 18.3854 32.3078 18.2398 32.33 18.0975C32.0811 17.9655 31.8115 17.8525 31.5212 17.7563C31.4496 17.7324 31.3757 17.7094 31.3009 17.6871Z", fill: "white", fillOpacity: "0.8" }), jsx("path", { d: "M21.6461 18.1231C21.6946 17.8105 21.895 17.5552 22.1646 17.4264C22.2879 17.3675 22.4239 17.3349 22.5678 17.3349H28.4149C29.1077 17.3349 29.7542 17.3803 30.3444 17.4757C30.513 17.5027 30.6768 17.5338 30.8367 17.5687C30.9957 17.6045 31.1508 17.6443 31.3011 17.688C31.3759 17.7103 31.4498 17.7334 31.5222 17.7564C31.8125 17.8527 32.0821 17.9664 32.331 18.0976C32.6237 16.231 32.3287 14.9601 31.3194 13.8093C30.2068 12.5424 28.1986 12 25.629 12H18.169C17.6441 12 17.1963 12.3817 17.1152 12.9011L14.0079 32.5969C13.9467 32.9866 14.2473 33.3381 14.6402 33.3381H19.2458L20.4022 26.0014L21.6461 18.1231Z", fill: "white" })] }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight * 2.2, height: logoHeight, viewBox: "0 -139.5 750 750", fill: "none", "aria-label": "Mastercard", children: [jsx("rect", { fill: "#000000", x: "0", y: "0", width: "750", height: "471", rx: "40" }), jsx("path", { d: "M434.008334,235.5 C434.008334,334.641668 353.6375,415.004169 254.499999,415.004169 C155.362498,415.004169 74.9999973,334.641668 74.9999973,235.5 C74.9999973,136.366666 155.362498,55.9958324 254.499999,55.9958324 C353.6375,55.9958324 434.008334,136.366666 434.008334,235.5", fill: "#D9222A" }), jsx("path", { d: "M495.491667,55.9958324 C449.1125,55.9958324 406.85,73.5916658 374.991666,102.462499 C368.504166,108.345833 362.445833,114.7 356.866666,121.458333 L393.133333,121.458333 C398.091667,127.4875 402.658333,133.829166 406.816667,140.470833 L343.183333,140.470833 C339.370833,146.575 335.908333,152.916666 332.841666,159.479167 L417.154167,159.479167 C420.033333,165.6375 422.575,171.975 424.754167,178.483333 L325.241666,178.483333 C323.166666,184.675 321.420833,191.0125 320.024999,197.491667 L429.966667,197.491667 C432.604167,209.741667 434.008334,222.458334 434.008334,235.5 C434.008334,255.433334 430.754167,274.612501 424.754167,292.520834 L325.241666,292.520834 C327.416666,299.033334 329.958333,305.375001 332.837499,311.529168 L417.154167,311.529168 C414.079167,318.091668 410.625,324.433335 406.808333,330.541668 L343.183333,330.541668 C347.3375,337.170835 351.9125,343.520835 356.866666,349.537501 L393.125,349.537501 C387.554167,356.308335 381.491666,362.670835 374.995833,368.550002 C406.854167,397.416668 449.1125,415.004169 495.491667,415.004169 C594.629168,415.004169 675.000002,334.641668 675.000002,235.5 C675.000002,136.370833 594.629168,55.9958324 495.491667,55.9958324", fill: "#EE9F2D" })] }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight * 1.1, height: logoHeight, viewBox: "0 0 750 471", fill: "none", "aria-label": "Visa", children: [jsx("rect", { fill: "#0E4595", x: "0", y: "0", width: "750", height: "471", rx: "40" }), jsx("polygon", { fill: "#FFFFFF", points: "278.1975 334.2275 311.5585 138.4655 364.9175 138.4655 331.5335 334.2275" }), jsx("path", { d: "M524.3075,142.6875 C513.7355,138.7215 497.1715,134.4655 476.4845,134.4655 C423.7605,134.4655 386.6205,161.0165 386.3045,199.0695 C386.0075,227.1985 412.8185,242.8905 433.0585,252.2545 C453.8275,261.8495 460.8105,267.9695 460.7115,276.5375 C460.5795,289.6595 444.1255,295.6545 428.7885,295.6545 C407.4315,295.6545 396.0855,292.6875 378.5625,285.3785 L371.6865,282.2665 L364.1975,326.0905 C376.6605,331.5545 399.7065,336.2895 423.6355,336.5345 C479.7245,336.5345 516.1365,310.2875 516.5505,269.6525 C516.7515,247.3835 502.5355,230.4355 471.7515,216.4645 C453.1005,207.4085 441.6785,201.3655 441.7995,192.1955 C441.7995,184.0585 451.4675,175.3575 472.3565,175.3575 C489.8055,175.0865 502.4445,178.8915 512.2925,182.8575 L517.0745,185.1165 L524.3075,142.6875", fill: "#FFFFFF" }), jsx("path", { d: "M661.6145,138.4655 L620.3835,138.4655 C607.6105,138.4655 598.0525,141.9515 592.4425,154.6995 L513.1975,334.1025 L569.2285,334.1025 C569.2285,334.1025 578.3905,309.9805 580.4625,304.6845 C586.5855,304.6845 641.0165,304.7685 648.7985,304.7685 C650.3945,311.6215 655.2905,334.1025 655.2905,334.1025 L704.8025,334.1025 L661.6145,138.4655 Z M596.1975,264.8725 C600.6105,253.5935 617.4565,210.1495 617.4565,210.1495 C617.1415,210.6705 621.8365,198.8155 624.5315,191.4655 L628.1385,208.3435 C628.1385,208.3435 638.3555,255.0725 640.4905,264.8715 L596.1975,264.8715 L596.1975,264.8725 Z", fill: "#FFFFFF" }), jsx("path", { d: "M45.878906 138.46484L45.197266 142.53906C66.288263 147.64458 85.126465 155.03257 101.61914 164.22461L148.96484 333.91602L205.41992 333.84961L289.42383 138.46484L232.90234 138.46484L180.66211 271.96094L175.0957 244.83203C174.83824 244.00408 174.55942 243.17304 174.27344 242.3418L156.10742 154.99219C152.87742 142.59619 143.50892 138.89684 131.91992 138.46484L45.878906 138.46484Z", fill: "#FFFFFF" })] }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: logoHeight * 2, height: logoHeight, viewBox: "0 -9 58 58", fill: "none", "aria-label": "Klarna", children: [jsx("rect", { x: "0.5", y: "0.5", width: "57", height: "39", rx: "3.5", fill: "#F4B6C7", stroke: "#F3F3F3" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.41299 25.7963H5V15H7.41299V25.7963ZM13.4398 15H11.0784C11.0784 16.9868 10.1885 18.8104 8.63709 20.0034L7.70155 20.7226L11.3264 25.7967H14.3068L10.9714 21.1277C12.5525 19.5116 13.4398 17.3373 13.4398 15ZM17.289 25.7933H15.0102V15.0021H17.289V25.7933ZM24.1766 18.3286V18.8061C23.5616 18.3754 22.8192 18.1223 22.0185 18.1223C19.8993 18.1223 18.1815 19.8857 18.1815 22.0611C18.1815 24.2365 19.8993 26 22.0185 26C22.8192 26 23.5616 25.7469 24.1766 25.3163V25.7933H26.3539V18.3286H24.1766ZM24.1694 22.0611C24.1694 23.1218 23.2861 23.9818 22.1966 23.9818C21.1071 23.9818 20.2238 23.1218 20.2238 22.0611C20.2238 21.0004 21.1071 20.1407 22.1966 20.1407C23.2861 20.1407 24.1694 21.0004 24.1694 22.0611ZM47.1454 18.8061V18.3286H49.3226V25.7933H47.1454V25.3163C46.5304 25.7469 45.788 26 44.9872 26C42.868 26 41.1502 24.2365 41.1502 22.0611C41.1502 19.8857 42.868 18.1223 44.9872 18.1223C45.788 18.1223 46.5304 18.3754 47.1454 18.8061ZM45.1654 23.9818C46.255 23.9818 47.1381 23.1218 47.1381 22.0611C47.1381 21.0004 46.255 20.1407 45.1654 20.1407C44.0758 20.1407 43.1926 21.0004 43.1926 22.0611C43.1926 23.1218 44.0758 23.9818 45.1654 23.9818ZM50.2675 24.5482C50.2675 23.7736 50.8792 23.1457 51.6337 23.1457C52.3882 23.1457 53 23.7736 53 24.5482C53 25.3227 52.3882 25.9507 51.6337 25.9507C50.8792 25.9507 50.2675 25.3227 50.2675 24.5482ZM37.2814 18.1278C36.4117 18.1278 35.5887 18.405 35.0384 19.1697V18.329H32.8706V25.7933H35.065V21.8706C35.065 20.7354 35.8065 20.1796 36.6993 20.1796C37.6562 20.1796 38.2063 20.7663 38.2063 21.8551V25.7933H40.3809V21.0463C40.3809 19.3092 39.0354 18.1278 37.2814 18.1278ZM29.7219 18.3287V19.3009C30.1583 18.7177 30.9715 18.3291 31.8557 18.3291V20.5013L31.8298 20.5003C30.9684 20.5003 29.7269 21.1323 29.7269 22.3082V25.7933H27.4928V18.3287H29.7219Z", fill: "#17120F" })] }) }), jsx("span", { style: { ...logoCellStyle, marginLeft: "-10px" }, children: jsxs("svg", { width: logoHeight * 1.9, height: logoHeight, viewBox: "0 -11 70 70", fill: "none", "aria-label": "Google Pay", children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M33.0603 31.5161V25.4741H36.1786C37.4564 25.4741 38.535 25.046 39.4142 24.2015L39.6252 23.9875C41.2313 22.2391 41.1258 19.5155 39.4142 17.898C38.5584 17.0416 37.3861 16.5778 36.1786 16.6016H31.1729V31.5161H33.0603ZM33.0605 23.6425V18.4332H36.2262C36.9063 18.4332 37.5512 18.6948 38.0319 19.1706C39.052 20.1696 39.0754 21.8347 38.0905 22.8694C37.6098 23.3809 36.9297 23.6663 36.2262 23.6425H33.0605ZM48.4293 22.1083C47.6204 21.359 46.5185 20.9784 45.1234 20.9784C43.3298 20.9784 41.9816 21.6444 41.0906 22.9646L42.7553 24.0231C43.3649 23.1192 44.1973 22.6673 45.2524 22.6673C45.9206 22.6673 46.5653 22.9171 47.0694 23.369C47.5618 23.7972 47.8432 24.4156 47.8432 25.0698V25.5098C47.1163 25.1055 46.2019 24.8914 45.0765 24.8914C43.7635 24.8914 42.7084 25.2006 41.923 25.831C41.1375 26.4613 40.739 27.2939 40.739 28.3524C40.7155 29.3158 41.1258 30.2316 41.8527 30.85C42.5912 31.5161 43.5291 31.8491 44.631 31.8491C45.9323 31.8491 46.9639 31.2663 47.7494 30.1007H47.8314V31.5161H49.6368V25.2244C49.6368 23.9042 49.2382 22.8576 48.4293 22.1083ZM43.3066 29.6369C42.9197 29.3514 42.6852 28.8876 42.6852 28.3881C42.6852 27.8291 42.9432 27.3652 43.4473 26.9965C43.9632 26.6278 44.6081 26.4375 45.3702 26.4375C46.4255 26.4256 47.2462 26.6635 47.8325 27.1392C47.8325 27.948 47.5159 28.6497 46.8945 29.2444C46.3317 29.8153 45.5696 30.1364 44.7723 30.1364C44.2446 30.1483 43.7287 29.9699 43.3066 29.6369ZM53.693 35.9999L60.0001 21.3114H57.9485L55.0295 28.6378H54.9943L52.0049 21.3114H49.9534L54.0916 30.8619L51.747 35.9999H53.693Z", fill: "#3C4043" }), jsx("path", { d: "M26.544 24.1659C26.544 23.5831 26.4971 23.0003 26.4034 22.4294H18.4434V25.7239H23.0037C22.8161 26.7825 22.2065 27.734 21.3155 28.3286V30.4695H24.0353C25.6296 28.9828 26.544 26.7825 26.544 24.1659Z", fill: "#4285F4" }), jsx("path", { d: "M18.4442 32.539C20.7185 32.539 22.6411 31.7778 24.0361 30.4695L21.3164 28.3287C20.5544 28.852 19.5814 29.1493 18.4442 29.1493C16.2403 29.1493 14.3763 27.6388 13.7081 25.6169H10.9062V27.8291C12.3365 30.7193 15.2555 32.539 18.4442 32.539Z", fill: "#34A853" }), jsx("path", { d: "M13.708 25.6169C13.3563 24.5584 13.3563 23.4048 13.708 22.3343V20.134H10.9058C9.69808 22.5484 9.69808 25.4029 10.9058 27.8172L13.708 25.6169Z", fill: "#FBBC04" }), jsx("path", { d: "M18.4442 18.8019C19.6517 18.7781 20.8123 19.242 21.6798 20.0864L24.0948 17.6363C22.559 16.1853 20.5427 15.3885 18.4442 15.4123C15.2555 15.4123 12.3365 17.2439 10.9062 20.134L13.7081 22.3462C14.3763 20.3124 16.2403 18.8019 18.4442 18.8019Z", fill: "#EA4335" })] }) }), jsx("span", { style: { ...logoCellStyle, marginLeft: "10px" }, children: jsxs("svg", { width: logoHeight * 1, height: logoHeight, viewBox: "0 0 70 48", fill: "none", "aria-label": "Apple Pay", children: [jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsx("g", { transform: "translate(12,8)", children: jsx("path", { d: "M31.099 17.255a4.646 4.646 0 0 1 1.421-3.315c.437-.43.95-.764 1.51-.983-.27-.715-.669-1.375-1.177-1.946a5.4 5.4 0 0 0-1.773-1.3 4.975 4.975 0 0 0-2.119-.464c-.786.011-1.562.185-2.276.512-.598.286-1.25.453-1.91.488a4.495 4.495 0 0 1-1.75-.488 5.5 5.5 0 0 0-2.346-.536 5.66 5.66 0 0 0-3.047.887 6.168 6.168 0 0 0-2.229 2.412 7.501 7.501 0 0 0-.839 3.498c.024 1.224.289 2.434.78 3.556a20.964 20.964 0 0 0 2.019 3.854c.444.664.95 1.284 1.515 1.853a3.045 3.045 0 0 0 2.041.948c.579-.006 1.149-.147 1.665-.41a4.928 4.928 0 0 1 2.217-.538c.795 0 1.58.184 2.292.538.53.261 1.11.402 1.7.41.696-.013 1.365-.265 1.9-.715.67-.545 1.252-1.192 1.724-1.92a12.29 12.29 0 0 0 1.197-2.246 4.95 4.95 0 0 1-2.113-1.852 4.573 4.573 0 0 1-.76-2.668M29.42 5.207a4.252 4.252 0 0 0 .98-2.697 3.76 3.76 0 0 0-.026-.51 4.359 4.359 0 0 0-2.79 1.424 4.124 4.124 0 0 0-1.05 2.63c-.005.171.005.343.032.513.157.021.315.03.474.024a3.67 3.67 0 0 0 2.38-1.384", fill: "#000000" }) })] }) })] }));
13020
13019
  }
13021
13020
 
13022
13021
  function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
@@ -14133,7 +14132,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14133
14132
  padding: "2px 8px",
14134
14133
  borderRadius: "var(--bw-border-radius)",
14135
14134
  fontFamily: "var(--bw-font-family)",
14136
- }, children: eventType.category.name }) }), jsx("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: jsx(ImageCarousel, { images: eventType.images, eventName: eventType.name }) }), jsxs("div", { className: "event-type-content", style: {
14135
+ }, children: eventType.category.name }) }), eventType.images && eventType.images.length > 0 && (jsx("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: jsx(ImageCarousel, { images: eventType.images, eventName: eventType.name }) })), jsxs("div", { className: "event-type-content", style: {
14137
14136
  padding: "12px 18px",
14138
14137
  display: "flex",
14139
14138
  flexDirection: "column",
@@ -14276,8 +14275,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14276
14275
  alignItems: "center",
14277
14276
  marginTop: "10px",
14278
14277
  gap: "12px",
14279
- }, children: [(eventType.description ||
14280
- (eventType.highlights && eventType.highlights.length > 0)) && (jsx("button", { onClick: (e) => {
14278
+ }, children: [eventType.description && (jsx("button", { onClick: (e) => {
14281
14279
  e.stopPropagation();
14282
14280
  handleShowDetails(eventType);
14283
14281
  }, style: {
@@ -14738,6 +14736,47 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14738
14736
  const { locale } = useLocale();
14739
14737
  const timezone = useTimezone();
14740
14738
  const [selectedEventInstanceId, setSelectedEventInstanceId] = useState(null);
14739
+ const normalizedShowAllButtonText = showAllButtonText.trim() || t("nextEvents.showAll");
14740
+ function InfoBadge({ text }) {
14741
+ const [open, setOpen] = useState(false);
14742
+ return (jsxs("span", { onClick: (event) => {
14743
+ event.stopPropagation();
14744
+ setOpen((current) => !current);
14745
+ }, style: {
14746
+ position: "relative",
14747
+ display: "inline-flex",
14748
+ alignItems: "center",
14749
+ justifyContent: "center",
14750
+ width: "16px",
14751
+ height: "16px",
14752
+ borderRadius: "50%",
14753
+ border: "1px solid var(--bw-highlight-color)",
14754
+ color: "var(--bw-highlight-color)",
14755
+ fontSize: "9px",
14756
+ fontWeight: 700,
14757
+ cursor: "pointer",
14758
+ flexShrink: 0,
14759
+ userSelect: "none",
14760
+ }, children: ["i", open && (jsx("span", { style: {
14761
+ position: "absolute",
14762
+ bottom: "calc(100% + 6px)",
14763
+ right: 0,
14764
+ backgroundColor: "var(--bw-surface-color)",
14765
+ border: "1px solid var(--bw-border-color)",
14766
+ borderRadius: "var(--bw-border-radius-small)",
14767
+ boxShadow: "var(--bw-shadow-md)",
14768
+ padding: "6px 10px",
14769
+ fontSize: "13px",
14770
+ color: "var(--bw-text-color)",
14771
+ fontWeight: 400,
14772
+ whiteSpace: "normal",
14773
+ width: "180px",
14774
+ lineHeight: 1.4,
14775
+ zIndex: 100,
14776
+ textAlign: "left",
14777
+ pointerEvents: "none",
14778
+ }, children: text }))] }));
14779
+ }
14741
14780
  const handleEventSelect = (eventInstanceId) => {
14742
14781
  setSelectedEventInstanceId(eventInstanceId);
14743
14782
  onEventSelect(eventInstanceId);
@@ -14800,54 +14839,39 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14800
14839
  gap: "8px",
14801
14840
  }, children: [jsx("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), t("common.reload")] })] }) }));
14802
14841
  }
14842
+ const today = new Date();
14803
14843
  return (jsxs("div", { style: {
14804
14844
  maxWidth: "500px",
14805
14845
  margin: "0 auto",
14806
- padding: "16px",
14846
+ padding: "12px 16px",
14807
14847
  fontFamily: "var(--bw-font-family)",
14808
- }, children: [jsxs("div", { style: { textAlign: "center", marginBottom: "24px" }, children: [jsx("h2", { style: {
14809
- fontWeight: 600,
14810
- margin: "0 0 8px 0",
14811
- fontSize: "18px",
14812
- color: "var(--bw-text-color)",
14813
- fontFamily: "var(--bw-font-family)",
14814
- }, children: t("nextEvents.title") }), jsx("p", { style: {
14815
- margin: 0,
14816
- fontSize: "16px",
14817
- color: "var(--bw-text-muted)",
14818
- fontFamily: "var(--bw-font-family)",
14819
- }, children: t("nextEvents.subtitle") })] }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "24px" }, children: events.map((event) => {
14848
+ }, children: [jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "10px" }, children: events.map((event) => {
14820
14849
  const availableSpots = event.maxParticipants - event.participantCount;
14821
14850
  const isFullyBooked = availableSpots === 0;
14822
14851
  const startDate = new Date(event.startTime);
14823
- const today = new Date();
14824
14852
  const isPastEvent = today.toISOString() >= startDate.toISOString();
14825
- const isFullAvailability = availableSpots / event.maxParticipants >= 0.8;
14826
- const isHighAvailability = availableSpots / event.maxParticipants >= 0.5;
14827
- const isMediumAvailability = availableSpots / event.maxParticipants >= 0.3;
14828
- const isLowAvailability = availableSpots / event.maxParticipants >= 0.15;
14829
- const getAvailabilityColor = () => {
14830
- if (isFullAvailability)
14831
- return "var(--bw-success-color)";
14832
- if (isHighAvailability)
14833
- return "var(--bw-warning-color)";
14834
- if (isMediumAvailability)
14835
- return "var(--bw-availability-medium-color, #f97316)";
14836
- if (isLowAvailability)
14837
- return "var(--bw-availability-low-color, #8b5cf6)";
14838
- return "var(--bw-highlight-color)";
14839
- };
14840
14853
  const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14854
+ const availabilityRatio = availableSpots / event.maxParticipants;
14855
+ const allocationBadge = (() => {
14856
+ if (availabilityRatio >= 0.6)
14857
+ return null;
14858
+ if (availabilityRatio === 0)
14859
+ return { text: t("events.soldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
14860
+ if (availabilityRatio <= 0.3)
14861
+ return { text: t("instances.almostSoldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
14862
+ return { text: t("instances.popularDate"), backgroundColor: "#b45309", textColor: "#fbbf24" };
14863
+ })();
14864
+ const sameDay = formatWeekday(event.startTime, timezone, locale) === formatWeekday(event.endTime, timezone, locale);
14841
14865
  return (jsxs("div", { style: {
14842
14866
  position: "relative",
14867
+ border: "1px solid var(--bw-border-color)",
14843
14868
  backgroundColor: "var(--bw-surface-color)",
14844
14869
  borderRadius: "var(--bw-border-radius)",
14845
- padding: "8px 10px",
14870
+ padding: "16px 10px",
14846
14871
  transition: "all 0.2s ease",
14847
- border: `1px solid ${getAvailabilityColor()}`,
14848
14872
  fontFamily: "var(--bw-font-family)",
14849
14873
  opacity: isDisabled ? 0.3 : 1,
14850
- filter: isDisabled ? "grayscale(100%)" : "none",
14874
+ filter: isDisabled ? "grayscale(40%)" : "none",
14851
14875
  cursor: isDisabled ? "not-allowed" : "pointer",
14852
14876
  }, onClick: () => {
14853
14877
  if (!isDisabled) {
@@ -14861,13 +14885,22 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14861
14885
  justifyContent: "center",
14862
14886
  backgroundColor: "rgba(15, 23, 42, 0.8)",
14863
14887
  borderRadius: "var(--bw-border-radius)",
14864
- }, children: jsx("div", { style: {
14865
- width: "32px",
14866
- height: "32px",
14867
- color: "var(--bw-highlight-color)",
14868
- fontSize: "32px",
14869
- animation: "spin 1s linear infinite",
14870
- }, children: "\u27F3" }) })), jsxs("div", { style: {
14888
+ }, children: jsx("div", { style: { width: "32px", height: "32px", color: "var(--bw-highlight-color)", opacity: 0.8, fontSize: "32px" }, children: "\u27F3" }) })), jsx("div", { style: {
14889
+ display: "flex",
14890
+ marginLeft: "auto",
14891
+ marginTop: "-20px",
14892
+ marginBottom: "4px",
14893
+ borderRadius: "var(--bw-border-radius-small)",
14894
+ fontFamily: "var(--bw-font-family)",
14895
+ zIndex: 50,
14896
+ whiteSpace: "nowrap",
14897
+ width: "fit-content",
14898
+ fontSize: "11px",
14899
+ fontWeight: 700,
14900
+ padding: "2px 8px",
14901
+ backgroundColor: allocationBadge?.backgroundColor || "transparent",
14902
+ color: allocationBadge?.textColor || "transparent",
14903
+ }, children: allocationBadge?.text || " - " }), jsxs("div", { style: {
14871
14904
  display: "flex",
14872
14905
  justifyContent: "space-between",
14873
14906
  width: "100%",
@@ -14875,73 +14908,59 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14875
14908
  gap: "12px",
14876
14909
  marginBottom: "4px",
14877
14910
  }, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
14878
- display: "flex",
14879
- alignItems: "center",
14880
- justifyContent: "center",
14881
- fontWeight: 700,
14882
14911
  fontSize: "16px",
14912
+ transition: "all 0.2s ease",
14883
14913
  borderRadius: "var(--bw-border-radius-small)",
14914
+ borderTop: "4px solid var(--bw-border-color)",
14915
+ border: "1px solid var(--bw-border-color)",
14884
14916
  width: "40px",
14885
14917
  height: "40px",
14918
+ display: "flex",
14919
+ alignItems: "center",
14920
+ justifyContent: "center",
14921
+ fontWeight: 700,
14886
14922
  color: "var(--bw-text-color)",
14887
14923
  backgroundColor: "var(--bw-background-color)",
14888
- border: "1px solid var(--bw-border-color)",
14889
- borderTopWidth: "4px",
14890
- borderTopColor: getAvailabilityColor(),
14891
- transition: "all 0.2s ease",
14892
14924
  }, children: startDate.getDate() }), jsxs("div", { style: {
14925
+ fontSize: "16px",
14926
+ color: "var(--bw-text-color)",
14893
14927
  display: "flex",
14894
14928
  flexDirection: "column",
14895
14929
  alignItems: "flex-start",
14896
14930
  justifyContent: "flex-start",
14931
+ lineHeight: 1.25,
14932
+ }, children: [jsxs("div", { children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), !sameDay && (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsx("div", { children: sameDay ? (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxs("span", { style: {
14933
+ fontSize: "12px",
14934
+ fontWeight: 400,
14935
+ color: "var(--bw-text-muted)",
14936
+ marginLeft: "6px",
14937
+ backgroundColor: "rgba(0, 0, 0, 0.05)",
14938
+ whiteSpace: "nowrap",
14939
+ padding: "2px 6px",
14940
+ borderRadius: "var(--bw-border-radius-small)",
14941
+ }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsxs("div", { style: { textAlign: "right", display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "4px" }, children: [jsx("span", { style: {
14942
+ display: "inline-flex",
14943
+ alignItems: "center",
14897
14944
  fontSize: "16px",
14945
+ fontWeight: 600,
14946
+ padding: "2px 8px",
14947
+ borderRadius: "var(--bw-border-radius-small)",
14948
+ fontFamily: "var(--bw-font-family)",
14949
+ backgroundColor: "var(--bw-background-color)",
14898
14950
  color: "var(--bw-text-color)",
14899
- lineHeight: 1.25,
14900
- }, children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) })] })] }), jsxs("div", { style: {
14901
- display: "flex",
14902
- flexDirection: "column",
14903
- alignItems: "flex-end",
14904
- textAlign: "right",
14905
- }, children: [jsx("div", { style: {
14906
- fontWeight: 700,
14907
- color: "var(--bw-highlight-color)",
14908
- fontSize: "18px",
14909
- }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.deposit && event.deposit > 0 && (jsxs("div", { style: { fontSize: "12px", color: "var(--bw-text-muted)" }, children: [t("common.from"), " ", formatCurrency(event.deposit)] }))] })] }), jsxs("h4", { style: {
14910
- display: "flex",
14911
- alignItems: "center",
14912
- fontWeight: 600,
14913
- margin: "0 0 2px 0",
14914
- fontSize: "16px",
14915
- color: "var(--bw-text-color)",
14916
- lineHeight: 1.25,
14917
- gap: "8px",
14918
- }, children: [event.name, jsxs("span", { style: {
14919
- fontSize: "12px",
14920
- fontWeight: 400,
14921
- color: "var(--bw-text-muted)",
14922
- marginLeft: "6px",
14923
- backgroundColor: "rgba(0, 0, 0, 0.05)",
14924
- borderRadius: "16px",
14925
- padding: "2px 8px",
14926
- }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), event.notes && (jsx("p", { style: {
14927
- margin: "8px 0 0 0",
14928
- fontSize: "12px",
14929
- color: "var(--bw-text-muted)",
14930
- overflow: "hidden",
14931
- lineHeight: 1.375,
14932
- display: "-webkit-box",
14933
- WebkitBoxOrient: "vertical",
14934
- WebkitLineClamp: 2,
14935
- }, children: event.notes }))] }, event.id));
14951
+ border: "1px solid var(--bw-border-color)",
14952
+ }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes && jsx(InfoBadge, { text: event.notes })] })] })] }, event.id));
14936
14953
  }) }), showAllButton && (jsx("div", { style: { textAlign: "center" }, children: jsx("button", { type: "button", disabled: isLoadingShowAll, style: {
14937
- position: "relative",
14954
+ display: "inline-flex",
14955
+ alignItems: "center",
14956
+ justifyContent: "center",
14938
14957
  backgroundColor: "var(--bw-surface-color)",
14939
14958
  color: "var(--bw-highlight-color)",
14940
14959
  border: "1px solid var(--bw-highlight-color)",
14941
- padding: "12px 24px",
14942
- borderRadius: "var(--bw-border-radius)",
14943
- fontSize: "16px",
14944
- fontWeight: 500,
14960
+ padding: "6px 10px",
14961
+ borderRadius: "var(--bw-border-radius-small)",
14962
+ fontSize: "13px",
14963
+ fontWeight: 600,
14945
14964
  fontFamily: "var(--bw-font-family)",
14946
14965
  transition: "all 0.2s ease",
14947
14966
  cursor: isLoadingShowAll ? "not-allowed" : "pointer",
@@ -14952,7 +14971,7 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14952
14971
  color: "var(--bw-highlight-color)",
14953
14972
  fontSize: "16px",
14954
14973
  animation: "spin 1s linear infinite",
14955
- }, children: "\u27F3" }), t("common.loading")] })) : (showAllButtonText) }) }))] }));
14974
+ }, children: "\u27F3" }), t("common.loading")] })) : (normalizedShowAllButtonText) }) }))] }));
14956
14975
  }
14957
14976
 
14958
14977
  function SpecialsView({ specials, onEventSelect, isLoading = false, showSavingsAmount = true, showSavingsPercent = false, emptyStateText, isLoadingEventDetails = false, }) {
@@ -15751,6 +15770,8 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
15751
15770
  const [isSuccess, setIsSuccess] = useState(false);
15752
15771
  const [successPaymentId, setSuccessPaymentId] = useState(null);
15753
15772
  const [systemConfig, setSystemConfig] = useState(null);
15773
+ // When true, loadEventInstances skips the single-instance auto-select (used by handleShowAllEvents)
15774
+ const skipInstanceAutoSelectRef = useRef(false);
15754
15775
  // PERFORMANCE OPTIMIZATION: Lazy component loading
15755
15776
  const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = useState(false);
15756
15777
  const [shouldRenderUpsells, setShouldRenderUpsells] = useState(false);
@@ -16246,7 +16267,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16246
16267
  }
16247
16268
  setStripePromise(loadStripe(data.stripePublishableKey, stripeOptions));
16248
16269
  }
16249
- if (data.eventInstances.length === 1) {
16270
+ if (!skipInstanceAutoSelectRef.current && data.eventInstances.length === 1) {
16250
16271
  setSelectedEventInstance(data.eventInstances[0]);
16251
16272
  setCurrentStep("booking");
16252
16273
  await loadEventDetails(data.eventInstances[0].id);
@@ -16641,12 +16662,30 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16641
16662
  const handleShowAllEvents = async () => {
16642
16663
  setIsLoadingShowAll(true);
16643
16664
  try {
16644
- if (isSingleEventTypeMode && selectedEventType) {
16665
+ if (isSingleEventTypeMode) {
16666
+ // Lock in the correct render branch before any async work so no
16667
+ // intermediate state can accidentally show the cards view.
16645
16668
  setShouldRenderInstanceSelection(true);
16646
- setIsLoadingEventInstances(true);
16647
- await loadEventInstances(selectedEventType.id);
16648
16669
  setCurrentStep("eventInstances");
16649
16670
  setShowingPreview(false);
16671
+ setIsLoadingEventInstances(true);
16672
+ // Suppress the single-instance auto-select inside loadEventInstances
16673
+ // so it doesn't override currentStep to "booking" mid-flight.
16674
+ skipInstanceAutoSelectRef.current = true;
16675
+ try {
16676
+ if (selectedEventType) {
16677
+ await loadEventInstances(selectedEventType.id);
16678
+ }
16679
+ else {
16680
+ // next-events mode skips event type loading on init.
16681
+ // loadEventTypes sets selectedEventType (for the sidebar title)
16682
+ // and internally calls loadEventInstances (auto-select suppressed).
16683
+ await loadEventTypes();
16684
+ }
16685
+ }
16686
+ finally {
16687
+ skipInstanceAutoSelectRef.current = false;
16688
+ }
16650
16689
  setIsLoadingEventInstances(false);
16651
16690
  }
16652
16691
  else {
@@ -16809,12 +16848,17 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16809
16848
  }, config: config, googleAdsConfig: googleAdsConfig, onError: setError, paymentIntentId: successPaymentId })] }), showPromoDialog && config.promo && (jsx(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
16810
16849
  }
16811
16850
  if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
16851
+ const isButtonBusy = (isDirectInstanceMode && isLoadingEventDetails) ||
16852
+ (!isDirectInstanceMode && (isLoadingEventInstances || (shouldRenderInstanceSelection && !sidebarOpen)));
16812
16853
  return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, style: {
16813
16854
  display: "flex",
16814
16855
  justifyContent: "center",
16815
16856
  alignItems: "center",
16816
16857
  minHeight: "120px",
16817
- }, children: [jsx("button", { type: "button", style: {
16858
+ }, children: [jsxs("button", { type: "button", disabled: isButtonBusy, style: {
16859
+ display: "inline-flex",
16860
+ alignItems: "center",
16861
+ gap: "10px",
16818
16862
  backgroundColor: "var(--bw-highlight-color)",
16819
16863
  color: "white",
16820
16864
  padding: "16px 32px",
@@ -16824,18 +16868,21 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16824
16868
  fontWeight: 600,
16825
16869
  fontFamily: "var(--bw-font-family)",
16826
16870
  boxShadow: "var(--bw-shadow-md)",
16827
- cursor: "pointer",
16871
+ cursor: isButtonBusy ? "default" : "pointer",
16872
+ opacity: isButtonBusy ? 0.85 : 1,
16873
+ transition: "opacity 0.2s ease",
16828
16874
  }, onClick: () => {
16829
16875
  if (isDirectInstanceMode) {
16830
16876
  setCurrentStep("booking");
16831
16877
  setShouldRenderBookingForm(true);
16832
16878
  }
16833
16879
  else {
16880
+ setCurrentStep("eventInstances");
16834
16881
  setSidebarOpen(true);
16835
16882
  setShouldRenderInstanceSelection(true);
16836
16883
  }
16837
- }, children: config.buttonText ||
16838
- (isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16884
+ }, children: [isButtonBusy && jsx(Spinner, { size: 20, borderColor: "white" }), config.buttonText ||
16885
+ (isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates"))] }), shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16839
16886
  setIsSuccess(false);
16840
16887
  setCurrentStep("eventTypes");
16841
16888
  setSidebarOpen(false);