@nok-integration/storefront-react 0.18.5 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5913,8 +5913,228 @@ const styles$L = {
5913
5913
  row: row$9,
5914
5914
  action: action$2
5915
5915
  };
5916
+ const MINOR_UNIT_EXPONENT = {
5917
+ JPY: 0,
5918
+ KRW: 0,
5919
+ VND: 0,
5920
+ CLP: 0,
5921
+ ISK: 0,
5922
+ BHD: 3,
5923
+ KWD: 3,
5924
+ OMR: 3,
5925
+ TND: 3,
5926
+ JOD: 3
5927
+ };
5928
+ function minorUnitExponent(currency) {
5929
+ return MINOR_UNIT_EXPONENT[currency.toUpperCase()] ?? 2;
5930
+ }
5931
+ function formatMoney(money2, locale) {
5932
+ const exponent = minorUnitExponent(money2.currency);
5933
+ const major = money2.amount / 10 ** exponent;
5934
+ try {
5935
+ return new Intl.NumberFormat(locale, {
5936
+ style: "currency",
5937
+ currency: money2.currency
5938
+ }).format(major);
5939
+ } catch {
5940
+ return `${major.toFixed(exponent)} ${money2.currency}`;
5941
+ }
5942
+ }
5943
+ function discountPct(price2, compareAt2) {
5944
+ if (!compareAt2) return void 0;
5945
+ if (compareAt2.currency !== price2.currency) return void 0;
5946
+ if (compareAt2.amount <= price2.amount) return void 0;
5947
+ const pct = Math.round((compareAt2.amount - price2.amount) / compareAt2.amount * 100);
5948
+ return pct > 0 ? pct : void 0;
5949
+ }
5950
+ function useMoney(defaultLocale) {
5951
+ const locale = useLocale(defaultLocale);
5952
+ const format = useCallback(
5953
+ (money2, localeOverride) => formatMoney(money2, localeOverride ?? locale),
5954
+ [locale]
5955
+ );
5956
+ return { format };
5957
+ }
5958
+ function useLocale(override) {
5959
+ const shop = useShopOptional();
5960
+ return override ?? shop?.locale ?? shop?.market?.lang ?? (typeof navigator !== "undefined" ? navigator.language : void 0);
5961
+ }
5962
+ const ES = {
5963
+ "(opens {0} in a new tab)": "(abre {0} en una nueva pestaña)",
5964
+ "(out of stock)": "(agotado)",
5965
+ "14 days returns": "Devoluciones en 14 días",
5966
+ "Add something to your basket to carry on.": "Añade algún artículo a tu cesta para continuar.",
5967
+ "Add to cart": "Añadir a la cesta",
5968
+ "All items": "Todos los artículos",
5969
+ "and {0} more items": "y {0} artículos más",
5970
+ "Back": "Atrás",
5971
+ "Calculated at checkout": "Se calculará al finalizar la compra",
5972
+ "Cart": "Cesta",
5973
+ "Cart, empty": "Cesta vacía",
5974
+ "Cart, {0} item{1}": "Cesta, {0} artículo{1}",
5975
+ "Category unavailable": "Categoría no disponible",
5976
+ "Checkout in progress": "Finalización de la compra en curso",
5977
+ "Clear": "Borrar",
5978
+ "Clear filters": "Borrar filtros",
5979
+ "Close": "Cerrar",
5980
+ "Close size guide": "Cerrar la guía de tallas",
5981
+ "Color": "Color",
5982
+ "Color:": "Color:",
5983
+ "Complete the look with everyday essentials and finishing details": "Completa tu look con básicos para el día a día y detalles que marcan la diferencia",
5984
+ "Continue shopping": "Seguir comprando",
5985
+ "DAZN": "DAZN",
5986
+ "DAZN Shop": "Tienda DAZN",
5987
+ "DAZN SHOP": "TIENDA DAZN",
5988
+ "Decrease quantity": "Reducir cantidad",
5989
+ "Delivery": "Envío",
5990
+ "Delivery status": "Estado del envío",
5991
+ "Everyday essentials with sport-inspired fits and minimal branding": "Artículos básicos para el día a día con cortes de inspiración deportiva y logotipos discretos",
5992
+ "Explore": "Explorar",
5993
+ "Filters": "Filtros",
5994
+ "Finish signing up": "Finalizar el registro",
5995
+ "Free": "Gratis",
5996
+ "Fresh drops inspired by sport, culture, and everyday movement": "Novedades inspiradas en el deporte, la cultura y el movimiento diario",
5997
+ "Gallery pagination": "Paginación de la galería",
5998
+ "Go to image {0}": "Ir a la imagen {0}",
5999
+ "Heavyweight comfort built for training days and off-duty moments": "Comodidad y resistencia pensadas para los días de entrenamiento y los momentos de ocio",
6000
+ "Help & Support": "Ayuda y asistencia",
6001
+ "Hoodies": "Sudaderas con capucha",
6002
+ "Increase quantity": "Aumentar la cantidad",
6003
+ "Item unavailable": "Artículo no disponible",
6004
+ "Items": "Artículos",
6005
+ "Jackets": "Chaquetas",
6006
+ "Loading": "Cargando",
6007
+ "Manage orders": "Gestionar pedidos",
6008
+ "More options": "Más opciones",
6009
+ "No products": "Sin productos",
6010
+ "Not available to you": "No disponible para ti",
6011
+ "Nothing here yet": "Aún no hay nada aquí",
6012
+ "One moment": "Un momento",
6013
+ "One or more items just sold out. Adjust your cart to continue.": "Uno o más artículos se han agotado. Ajusta tu carrito para continuar.",
6014
+ "Only {0} left": "Solo quedan {0}",
6015
+ "Order #{0}": "Pedido n.º {0}",
6016
+ "Order already placed": "Pedido ya realizado",
6017
+ "Order not found": "Pedido no encontrado",
6018
+ "Order summary": "Resumen del pedido",
6019
+ "Order {0}, {1}": "Pedido {0}, {1}",
6020
+ "Out of stock": "Agotado",
6021
+ "Placed {0}": "Realizado {0}",
6022
+ "Please check the details and try again.": "Por favor, comprueba los datos e inténtalo de nuevo.",
6023
+ "Please select a size": "Selecciona una talla",
6024
+ "Please try again.": "Inténtalo de nuevo.",
6025
+ "Price updated": "Precio actualizado",
6026
+ "Proceed to checkout": "Pasar por caja",
6027
+ "Product details": "Detalles del producto",
6028
+ "Qty: {0}": "Cantidad: {0}",
6029
+ "Quantity {0}": "Cantidad {0}",
6030
+ "Reconnecting…": "Restableciendo la conexión…",
6031
+ "Redeem a code": "Canjear un código",
6032
+ "Remind me when available": "Avísame cuando esté disponible",
6033
+ "Remove item": "Eliminar artículo",
6034
+ "Restoring your session.": "Restaurando tu sesión.",
6035
+ "Reviews": "Opiniones",
6036
+ "Seasonal": "De temporada",
6037
+ "See all": "Ver todo",
6038
+ "See more": "Ver más",
6039
+ "Select an option": "Selecciona una opción",
6040
+ "Share": "Compartir",
6041
+ "Shipping": "Envío",
6042
+ "Shipping address": "Dirección de envío",
6043
+ "Shipping and returns": "Envíos y devoluciones",
6044
+ "Shop menu": "Menú de la tienda",
6045
+ "Shop now": "Comprar ahora",
6046
+ "Size": "Talla",
6047
+ "Size guide": "Guía de tallas",
6048
+ "Something looks off": "Algo no va bien",
6049
+ "Something went wrong": "Ha surgido un error",
6050
+ "Standard or express delivery": "Envío estándar o urgente",
6051
+ "Subtotal": "Subtotal",
6052
+ "Swipe down for more": "Desliza hacia abajo para ver más",
6053
+ "T-Shirts": "Camisetas",
6054
+ "Tax": "Impuestos",
6055
+ "That is not possible right now": "Eso no es posible en este momento",
6056
+ "The total changed since you started. Review the updated amount and try again.": "El total ha cambiado desde que empezaste. Revisa el importe actualizado e inténtalo de nuevo.",
6057
+ "This category is no longer available.": "Esta categoría ya no está disponible.",
6058
+ "This has already moved on. Refresh to see where it is.": "Esto ya se ha movido. Actualiza la página para ver dónde está.",
6059
+ "This order has already been despatched.": "Este pedido ya se ha enviado.",
6060
+ "This order was already confirmed.": "Este pedido ya se ha confirmado.",
6061
+ "This product is no longer available.": "Este producto ya no está disponible.",
6062
+ "Too late to change this": "Es demasiado tarde para cambiarlo",
6063
+ "Too many requests. Retrying shortly.": "Demasiadas solicitudes. Lo volveremos a intentar en breve.",
6064
+ "Total": "Total",
6065
+ "Try again": "Inténtalo de nuevo",
6066
+ "Undo": "Deshacer",
6067
+ "Variant": "Variante",
6068
+ "View cart": "Ver carrito",
6069
+ "View your order history and track shipments": "Consulta tu historial de pedidos y realiza el seguimiento de los envíos",
6070
+ "Was {0}": "Era {0}",
6071
+ "We could not find that order.": "No hemos podido encontrar ese pedido.",
6072
+ "We hit a snag. Please try again.": "Hemos tenido un problema. Inténtalo de nuevo.",
6073
+ "We'll remind you": "Te lo recordaremos",
6074
+ "Why shop with us": "¿Por qué comprar con nosotros?",
6075
+ "You do not have access to this.": "No tienes acceso a esto.",
6076
+ "You may also like": "Quizá te guste",
6077
+ "Your basket is empty": "Tu cesta está vacía",
6078
+ "Your checkout is still open. Return to it to finish or cancel your order.": "Tu proceso de pago sigue abierto. Vuelve a él para finalizar o cancelar tu pedido.",
6079
+ "{0} images": "{0} imágenes",
6080
+ "{0} left": "{0} restantes",
6081
+ "{0} — image {1} of {2}": "{0} — imagen {1} de {2}",
6082
+ /*
6083
+ * ── Order status badges ──────────────────────────────────────────────────────────
6084
+ *
6085
+ * **These seven are ours, not the translator's.** The workbook carries no row for any of
6086
+ * them: it was extracted from the rendered UAT build, and an order list only renders the
6087
+ * statuses its orders happened to be in that day, so a status nothing was sitting in was
6088
+ * never collected.
6089
+ *
6090
+ * Added on instruction rather than left in English, and grouped here so they can be
6091
+ * reviewed as a set when DAZN's translator next looks at this file. Two of the seven are
6092
+ * anchored in the translator's own vocabulary rather than chosen freely: `en curso` is how
6093
+ * they rendered "Checkout in progress", and `confirmado` is the stem they used for "This
6094
+ * order was already confirmed."
6095
+ *
6096
+ * All seven describe `el pedido`, so they are masculine singular throughout.
6097
+ *
6098
+ * `Preparado` rather than `Empaquetado` for "Packed": the fulfilment vocabulary already
6099
+ * translates that state to a fan as preparing the order, not as boxing it, and the
6100
+ * notification copy says `estamos preparando`. A fan should not meet two different words
6101
+ * for the same moment.
6102
+ */
6103
+ "Confirmed": "Confirmado",
6104
+ "Packed": "Preparado",
6105
+ "Shipped": "Enviado",
6106
+ "Delivered": "Entregado",
6107
+ "Cancelled": "Cancelado",
6108
+ "Refunded": "Reembolsado",
6109
+ "In progress": "En curso"
6110
+ };
6111
+ const CATALOGUES = { es: ES };
6112
+ function catalogueFor(locale) {
6113
+ if (!locale) return null;
6114
+ const tag = locale.toLowerCase();
6115
+ return CATALOGUES[tag] ?? CATALOGUES[tag.split("-")[0]] ?? null;
6116
+ }
6117
+ function interpolate(template, args) {
6118
+ if (args.length === 0) return template;
6119
+ return template.replace(/\{(\d)\}/g, (whole, digit) => {
6120
+ const value2 = args[Number(digit)];
6121
+ return value2 === void 0 ? whole : String(value2);
6122
+ });
6123
+ }
6124
+ function translate(locale, source, ...args) {
6125
+ const catalogue = catalogueFor(locale);
6126
+ return interpolate(catalogue?.[source] ?? source, args);
6127
+ }
6128
+ function useT() {
6129
+ const locale = useLocale();
6130
+ return useCallback(
6131
+ (source, ...args) => translate(locale, source, ...args),
6132
+ [locale]
6133
+ );
6134
+ }
5916
6135
  function ScreenSkeleton({ tone, shape = "media" }) {
5917
- return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$L.root, children: /* @__PURE__ */ jsx("div", { className: styles$L.inner, role: "status", "aria-label": "Loading", children: shape === "media" ? /* @__PURE__ */ jsxs(Fragment, { children: [
6136
+ const t = useT();
6137
+ return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$L.root, children: /* @__PURE__ */ jsx("div", { className: styles$L.inner, role: "status", "aria-label": t("Loading"), children: shape === "media" ? /* @__PURE__ */ jsxs(Fragment, { children: [
5918
6138
  /* @__PURE__ */ jsx(Skeleton, { className: styles$L.media }),
5919
6139
  /* @__PURE__ */ jsxs("div", { className: styles$L.lines, children: [
5920
6140
  /* @__PURE__ */ jsx(Skeleton, { height: 22, className: styles$L.lineWide }),
@@ -6110,12 +6330,13 @@ const styles$J = {
6110
6330
  body: body$7
6111
6331
  };
6112
6332
  function ErrorState({ code, title: title2, body: body3, onRetry, retryLabel }) {
6333
+ const t = useT();
6113
6334
  const treatment = treatmentFor(code);
6114
6335
  const showRetry = Boolean(onRetry) && treatment.retriable;
6115
6336
  return /* @__PURE__ */ jsxs("div", { className: styles$J.root, role: "alert", children: [
6116
- /* @__PURE__ */ jsx("h2", { className: styles$J.title, children: title2 ?? treatment.title }),
6117
- /* @__PURE__ */ jsx("p", { className: styles$J.body, children: body3 ?? treatment.body }),
6118
- showRetry && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, children: retryLabel ?? "Try again" })
6337
+ /* @__PURE__ */ jsx("h2", { className: styles$J.title, children: title2 ?? t(treatment.title) }),
6338
+ /* @__PURE__ */ jsx("p", { className: styles$J.body, children: body3 ?? t(treatment.body) }),
6339
+ showRetry && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, children: retryLabel ?? t("Try again") })
6119
6340
  ] });
6120
6341
  }
6121
6342
  const STATUS_LABEL = {
@@ -6135,9 +6356,10 @@ const STATUS_TONE = {
6135
6356
  refunded: "critical"
6136
6357
  };
6137
6358
  function StatusBadge({ status }) {
6359
+ const t = useT();
6138
6360
  const tone = STATUS_TONE[status] ?? "neutral";
6139
6361
  const label2 = STATUS_LABEL[status] ?? status;
6140
- return /* @__PURE__ */ jsx(Badge, { tone, children: label2 });
6362
+ return /* @__PURE__ */ jsx(Badge, { tone, children: t(label2) });
6141
6363
  }
6142
6364
  const viewport = "_viewport_5aafz_14";
6143
6365
  const anchor = "_anchor_5aafz_41";
@@ -6307,52 +6529,6 @@ function ToastProvider({ children }) {
6307
6529
  }) })
6308
6530
  ] });
6309
6531
  }
6310
- const MINOR_UNIT_EXPONENT = {
6311
- JPY: 0,
6312
- KRW: 0,
6313
- VND: 0,
6314
- CLP: 0,
6315
- ISK: 0,
6316
- BHD: 3,
6317
- KWD: 3,
6318
- OMR: 3,
6319
- TND: 3,
6320
- JOD: 3
6321
- };
6322
- function minorUnitExponent(currency) {
6323
- return MINOR_UNIT_EXPONENT[currency.toUpperCase()] ?? 2;
6324
- }
6325
- function formatMoney(money2, locale) {
6326
- const exponent = minorUnitExponent(money2.currency);
6327
- const major = money2.amount / 10 ** exponent;
6328
- try {
6329
- return new Intl.NumberFormat(locale, {
6330
- style: "currency",
6331
- currency: money2.currency
6332
- }).format(major);
6333
- } catch {
6334
- return `${major.toFixed(exponent)} ${money2.currency}`;
6335
- }
6336
- }
6337
- function discountPct(price2, compareAt2) {
6338
- if (!compareAt2) return void 0;
6339
- if (compareAt2.currency !== price2.currency) return void 0;
6340
- if (compareAt2.amount <= price2.amount) return void 0;
6341
- const pct = Math.round((compareAt2.amount - price2.amount) / compareAt2.amount * 100);
6342
- return pct > 0 ? pct : void 0;
6343
- }
6344
- function useMoney(defaultLocale) {
6345
- const locale = useLocale(defaultLocale);
6346
- const format = useCallback(
6347
- (money2, localeOverride) => formatMoney(money2, localeOverride ?? locale),
6348
- [locale]
6349
- );
6350
- return { format };
6351
- }
6352
- function useLocale(override) {
6353
- const shop = useShopOptional();
6354
- return override ?? shop?.locale ?? shop?.market?.lang ?? (typeof navigator !== "undefined" ? navigator.language : void 0);
6355
- }
6356
6532
  const badge$4 = "_badge_156ya_2";
6357
6533
  const icon$3 = "_icon_156ya_18";
6358
6534
  const styles$H = {
@@ -6649,26 +6825,27 @@ function OrderSummary({
6649
6825
  rows = CART_ROWS,
6650
6826
  discount: discount2
6651
6827
  }) {
6828
+ const t = useT();
6652
6829
  const { format } = useMoney();
6653
6830
  const isDeferred = (key) => deferred.includes(key);
6654
6831
  const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "discount" || discount2 !== void 0);
6655
6832
  return /* @__PURE__ */ jsx("dl", { className: styles$E.summary, children: visible.map(({ label: label2, key }) => {
6656
6833
  if (key === "discount" && discount2) {
6657
6834
  return /* @__PURE__ */ jsxs("div", { className: [styles$E.row, styles$E.discount].join(" "), children: [
6658
- /* @__PURE__ */ jsx("dt", { children: label2 }),
6835
+ /* @__PURE__ */ jsx("dt", { children: t(label2) }),
6659
6836
  /* @__PURE__ */ jsx("dd", { children: `−${format(discount2)}` })
6660
6837
  ] }, key);
6661
6838
  }
6662
6839
  const pending2 = key !== "total" && isDeferred(key);
6663
6840
  return /* @__PURE__ */ jsxs("div", { className: styles$E.row, children: [
6664
- /* @__PURE__ */ jsx("dt", { children: label2 }),
6665
- /* @__PURE__ */ jsx("dd", { className: pending2 ? styles$E.pending : void 0, children: pending2 ? "Calculated at checkout" : renderValue(key, pricing, format) })
6841
+ /* @__PURE__ */ jsx("dt", { children: t(label2) }),
6842
+ /* @__PURE__ */ jsx("dd", { className: pending2 ? styles$E.pending : void 0, children: pending2 ? t("Calculated at checkout") : renderValue(key, pricing, format, t) })
6666
6843
  ] }, key);
6667
6844
  }) });
6668
6845
  }
6669
- function renderValue(key, pricing, format) {
6846
+ function renderValue(key, pricing, format, t) {
6670
6847
  if (key === "shipping" && pricing.shipping.amount === 0) {
6671
- return /* @__PURE__ */ jsx("span", { className: styles$E.free, children: "Free" });
6848
+ return /* @__PURE__ */ jsx("span", { className: styles$E.free, children: t("Free") });
6672
6849
  }
6673
6850
  return key === "discount" ? null : format(pricing[key]);
6674
6851
  }
@@ -6714,9 +6891,10 @@ const SUMMARY_ROWS = [
6714
6891
  ];
6715
6892
  function OrderLine({ item: item2 }) {
6716
6893
  const { format } = useMoney();
6894
+ const t = useT();
6717
6895
  const compareAt2 = item2.compare_at_unit_price;
6718
6896
  const pct = compareAt2 ? discountPct(item2.unit_price, compareAt2) : void 0;
6719
- const details2 = detailsOf(item2);
6897
+ const details2 = detailsOf(item2, t);
6720
6898
  return /* @__PURE__ */ jsxs("li", { className: styles$D.line, children: [
6721
6899
  /* @__PURE__ */ jsx("div", { className: styles$D.thumb, children: item2.image ? /* @__PURE__ */ jsx(ShopImage, { src: item2.image, alt: "", fill: true, sizes: "48px", className: styles$D.image }) : /* @__PURE__ */ jsx("div", { className: styles$D.placeholder, "aria-hidden": "true" }) }),
6722
6900
  /* @__PURE__ */ jsxs("div", { className: styles$D.lineBody, children: [
@@ -6738,23 +6916,26 @@ function OrderLine({ item: item2 }) {
6738
6916
  ] });
6739
6917
  }
6740
6918
  function OrderLines({ order }) {
6741
- return /* @__PURE__ */ jsx("ul", { className: styles$D.lines, "aria-label": "Items", children: order.items.map((item2) => /* @__PURE__ */ jsx(OrderLine, { item: item2 }, item2.line_ref)) });
6919
+ const t = useT();
6920
+ return /* @__PURE__ */ jsx("ul", { className: styles$D.lines, "aria-label": t("Items"), children: order.items.map((item2) => /* @__PURE__ */ jsx(OrderLine, { item: item2 }, item2.line_ref)) });
6742
6921
  }
6743
6922
  function ShippingAddressCard({ order }) {
6744
- return /* @__PURE__ */ jsxs("section", { className: styles$D.card, "aria-label": "Shipping address", children: [
6923
+ const t = useT();
6924
+ return /* @__PURE__ */ jsxs("section", { className: styles$D.card, "aria-label": t("Shipping address"), children: [
6745
6925
  /* @__PURE__ */ jsx("h2", { className: styles$D.cardTitle, children: "Shipping address" }),
6746
6926
  /* @__PURE__ */ jsx("p", { className: styles$D.cardBody, children: formatAddress(order.ship_to) })
6747
6927
  ] });
6748
6928
  }
6749
6929
  function OrderSummaryCard({ order }) {
6750
- return /* @__PURE__ */ jsxs("section", { className: [styles$D.card, styles$D.summaryCard].join(" "), "aria-label": "Order summary", children: [
6930
+ const t = useT();
6931
+ return /* @__PURE__ */ jsxs("section", { className: [styles$D.card, styles$D.summaryCard].join(" "), "aria-label": t("Order summary"), children: [
6751
6932
  /* @__PURE__ */ jsx("h2", { className: styles$D.cardTitle, children: "Order summary" }),
6752
6933
  /* @__PURE__ */ jsx(OrderSummary, { pricing: toPricing(order), rows: rowsFor(order), discount: order.totals.discount })
6753
6934
  ] });
6754
6935
  }
6755
- function detailsOf(item2) {
6756
- const pairs = variantPairs(item2.attributes).map((p) => `${p.label}: ${p.value}`);
6757
- return item2.qty > 1 ? [...pairs, `Qty: ${item2.qty}`] : pairs;
6936
+ function detailsOf(item2, t) {
6937
+ const pairs = variantPairs(item2.attributes).map((p) => `${t(p.label)}: ${p.value}`);
6938
+ return item2.qty > 1 ? [...pairs, t("Qty: {0}", item2.qty)] : pairs;
6758
6939
  }
6759
6940
  function rowsFor(order) {
6760
6941
  if (order.totals.tax.amount === 0) return SUMMARY_ROWS;
@@ -7014,6 +7195,7 @@ function OrderTrackingContent({
7014
7195
  onCancelled,
7015
7196
  onReorder
7016
7197
  }) {
7198
+ const t = useT();
7017
7199
  const { api } = useShop();
7018
7200
  const locale = useLocale(localeProp);
7019
7201
  const [order, setOrder] = useState(null);
@@ -7057,7 +7239,7 @@ function OrderTrackingContent({
7057
7239
  emit({ type: "order_cancellation_requested", orderRef, reason: reason2 });
7058
7240
  onCancelled?.(updated);
7059
7241
  } catch (err) {
7060
- setCancelError(treatmentFor(codeOf(err)).body);
7242
+ setCancelError(t(treatmentFor(codeOf(err)).body));
7061
7243
  } finally {
7062
7244
  setCancelling(false);
7063
7245
  }
@@ -7086,7 +7268,7 @@ function OrderTrackingContent({
7086
7268
  ] });
7087
7269
  }
7088
7270
  return /* @__PURE__ */ jsxs("div", { className: styles$A.page, children: [
7089
- /* @__PURE__ */ jsxs("section", { className: styles$A.widget, "aria-label": "Delivery status", children: [
7271
+ /* @__PURE__ */ jsxs("section", { className: styles$A.widget, "aria-label": t("Delivery status"), children: [
7090
7272
  /* @__PURE__ */ jsxs("div", { className: styles$A.titleRow, children: [
7091
7273
  /* @__PURE__ */ jsx("h1", { className: styles$A.headline, children: `Order #${shortRef$1(order.order_ref)}` }),
7092
7274
  order.tracking?.url && /* @__PURE__ */ jsxs(
@@ -7684,9 +7866,10 @@ const TONE = {
7684
7866
  cancelled: "cancelled"
7685
7867
  };
7686
7868
  function OrderStatusBadge({ status }) {
7869
+ const t = useT();
7687
7870
  const label2 = LABEL[status] ?? status.replace(/_/g, " ");
7688
7871
  const tone = TONE[status] ?? "progress";
7689
- return /* @__PURE__ */ jsx("span", { className: [styles$v.badge, styles$v[tone]].join(" "), children: label2 });
7872
+ return /* @__PURE__ */ jsx("span", { className: [styles$v.badge, styles$v[tone]].join(" "), children: t(label2) });
7690
7873
  }
7691
7874
  const page$1 = "_page_6xodo_2";
7692
7875
  const empty = "_empty_6xodo_22";
@@ -7736,6 +7919,7 @@ function OrderListView(props) {
7736
7919
  return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(OrderListContent, { ...props }) });
7737
7920
  }
7738
7921
  function OrderListContent({ onOpenOrder, onStartShopping, locale: localeProp }) {
7922
+ const t = useT();
7739
7923
  const { api } = useShop();
7740
7924
  const locale = useLocale(localeProp);
7741
7925
  const [orders2, setOrders] = useState([]);
@@ -7769,7 +7953,7 @@ function OrderListContent({ onOpenOrder, onStartShopping, locale: localeProp })
7769
7953
  return /* @__PURE__ */ jsx("div", { className: styles$u.empty, children: /* @__PURE__ */ jsx(
7770
7954
  EmptyState,
7771
7955
  {
7772
- title: "Nothing here yet",
7956
+ title: t("Nothing here yet"),
7773
7957
  body: "Your orders will show up here once you've shopped.",
7774
7958
  ...onStartShopping ? {
7775
7959
  action: /* @__PURE__ */ jsx("button", { type: "button", className: styles$u.cta, onClick: onStartShopping, children: "Continue shopping" })
@@ -8011,8 +8195,9 @@ const styles$r = {
8011
8195
  clear
8012
8196
  };
8013
8197
  function FilterBar({ options: options2, active, onToggle, onClear }) {
8198
+ const t = useT();
8014
8199
  const hasActive = active.length > 0;
8015
- return /* @__PURE__ */ jsxs("div", { className: styles$r.bar, role: "group", "aria-label": "Filters", children: [
8200
+ return /* @__PURE__ */ jsxs("div", { className: styles$r.bar, role: "group", "aria-label": t("Filters"), children: [
8016
8201
  /* @__PURE__ */ jsx("div", { className: styles$r.chips, children: options2.map((opt) => {
8017
8202
  const on2 = active.includes(opt.value);
8018
8203
  return /* @__PURE__ */ jsx(
@@ -8042,6 +8227,7 @@ function ProductGrid({
8042
8227
  initialCursor,
8043
8228
  filters = []
8044
8229
  }) {
8230
+ const t = useT();
8045
8231
  const { api, market, emit } = useShop();
8046
8232
  const [products, setProducts] = useState(initialProducts);
8047
8233
  const [cursor, setCursor] = useState(initialCursor);
@@ -8090,7 +8276,7 @@ function ProductGrid({
8090
8276
  visible.length === 0 ? /* @__PURE__ */ jsx(
8091
8277
  EmptyState,
8092
8278
  {
8093
- title: "No products",
8279
+ title: t("No products"),
8094
8280
  body: "Nothing matches these filters.",
8095
8281
  action: active.length > 0 ? /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: () => setActive([]), children: "Clear filters" }) : void 0
8096
8282
  }
@@ -8149,6 +8335,7 @@ const styles$o = {
8149
8335
  };
8150
8336
  const DISMISS_THRESHOLD_PX = 96;
8151
8337
  function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }) {
8338
+ const t = useT();
8152
8339
  const sheetRef = useRef(null);
8153
8340
  const dragStartY = useRef(null);
8154
8341
  const dragDistance = useRef(0);
@@ -8202,7 +8389,7 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
8202
8389
  ),
8203
8390
  /* @__PURE__ */ jsxs("div", { className: styles$o.header, children: [
8204
8391
  /* @__PURE__ */ jsx("h2", { id: titleId, className: styles$o.title, children: title2 }),
8205
- /* @__PURE__ */ jsx("button", { type: "button", className: styles$o.close, onClick: onClose, "aria-label": "Close", children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
8392
+ /* @__PURE__ */ jsx("button", { type: "button", className: styles$o.close, onClick: onClose, "aria-label": t("Close"), children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
8206
8393
  "path",
8207
8394
  {
8208
8395
  d: "M6 6l12 12M18 6L6 18",
@@ -8223,9 +8410,6 @@ const LOW_STOCK_THRESHOLD = 5;
8223
8410
  function isLowStock(available) {
8224
8411
  return available !== void 0 && available > 0 && available <= LOW_STOCK_THRESHOLD;
8225
8412
  }
8226
- function lowStockLabel(available) {
8227
- return `Only ${available} left`;
8228
- }
8229
8413
  let idCounter = 0;
8230
8414
  function useStableId(prefix) {
8231
8415
  const [id] = useState(() => `${prefix}-${idCounter += 1}`);
@@ -8283,6 +8467,7 @@ function QtyStepper({
8283
8467
  disabled: disabled2,
8284
8468
  capDescribedBy
8285
8469
  }) {
8470
+ const t = useT();
8286
8471
  const ownCapId = useStableId("qty-cap");
8287
8472
  const atMax = max !== void 0 && qty >= max;
8288
8473
  const capId = capDescribedBy ?? ownCapId;
@@ -8306,7 +8491,7 @@ function QtyStepper({
8306
8491
  className: styles$n.button,
8307
8492
  onClick: decrement,
8308
8493
  disabled: disabled2,
8309
- "aria-label": willDelete ? "Remove item" : "Decrease quantity",
8494
+ "aria-label": willDelete ? t("Remove item") : t("Decrease quantity"),
8310
8495
  children: willDelete ? /* @__PURE__ */ jsx(TrashIcon, {}) : /* @__PURE__ */ jsx(MinusIcon, {})
8311
8496
  }
8312
8497
  ),
@@ -8318,13 +8503,13 @@ function QtyStepper({
8318
8503
  className: styles$n.button,
8319
8504
  onClick: increment,
8320
8505
  disabled: disabled2 || atMax,
8321
- "aria-label": "Increase quantity",
8506
+ "aria-label": t("Increase quantity"),
8322
8507
  "aria-describedby": atMax ? capId : void 0,
8323
8508
  children: /* @__PURE__ */ jsx(PlusIcon, {})
8324
8509
  }
8325
8510
  )
8326
8511
  ] }),
8327
- atMax && capDescribedBy === void 0 && /* @__PURE__ */ jsx("span", { id: ownCapId, className: styles$n.cap, role: "status", children: max === 0 ? "Out of stock" : lowStockLabel(max) })
8512
+ atMax && capDescribedBy === void 0 && /* @__PURE__ */ jsx("span", { id: ownCapId, className: styles$n.cap, role: "status", children: max === 0 ? t("Out of stock") : t("Only {0} left", max) })
8328
8513
  ] });
8329
8514
  }
8330
8515
  const line = "_line_1s2s6_6";
@@ -8378,6 +8563,7 @@ function CartLineItem({
8378
8563
  onRemove,
8379
8564
  pending: pending2
8380
8565
  }) {
8566
+ const t = useT();
8381
8567
  const { format } = useMoney();
8382
8568
  const displayTitle = title2 ?? item2.title ?? item2.sku;
8383
8569
  const displayImage = image2 ?? item2.image;
@@ -8399,7 +8585,7 @@ function CartLineItem({
8399
8585
  /* @__PURE__ */ jsxs("div", { className: styles$m.meta, children: [
8400
8586
  /* @__PURE__ */ jsx("span", { className: styles$m.title, children: displayTitle }),
8401
8587
  pairs.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$m.details, children: pairs.map(({ key, label: label2, value: value2 }) => /* @__PURE__ */ jsxs("span", { className: styles$m.detail, children: [
8402
- label2,
8588
+ t(label2),
8403
8589
  ": ",
8404
8590
  value2
8405
8591
  ] }, key)) })
@@ -8422,7 +8608,7 @@ function CartLineItem({
8422
8608
  )
8423
8609
  ] })
8424
8610
  ] }),
8425
- lowStock2 && /* @__PURE__ */ jsx("div", { className: styles$m.labels, children: /* @__PURE__ */ jsx("span", { id: noticeId, className: styles$m.lowStock, role: "status", children: lowStockLabel(available) }) })
8611
+ lowStock2 && /* @__PURE__ */ jsx("div", { className: styles$m.labels, children: /* @__PURE__ */ jsx("span", { id: noticeId, className: styles$m.lowStock, role: "status", children: t("Only {0} left", available) }) })
8426
8612
  ] });
8427
8613
  }
8428
8614
  const box$1 = "_box_1cf1a_1";
@@ -8438,7 +8624,8 @@ const styles$l = {
8438
8624
  divider: divider$1
8439
8625
  };
8440
8626
  function ShippingInfo() {
8441
- return /* @__PURE__ */ jsxs("section", { className: styles$l.box, "aria-label": "Shipping and returns", children: [
8627
+ const t = useT();
8628
+ return /* @__PURE__ */ jsxs("section", { className: styles$l.box, "aria-label": t("Shipping and returns"), children: [
8442
8629
  /* @__PURE__ */ jsxs("div", { className: styles$l.row, children: [
8443
8630
  /* @__PURE__ */ jsxs("svg", { className: styles$l.icon, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
8444
8631
  /* @__PURE__ */ jsx(
@@ -8520,13 +8707,15 @@ const styles$j = {
8520
8707
  lines
8521
8708
  };
8522
8709
  function CartView(props = {}) {
8523
- useSetScreenTitle("Cart");
8710
+ const t = useT();
8711
+ useSetScreenTitle(t("Cart"));
8524
8712
  return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, className: styles$j.surface, children: /* @__PURE__ */ jsx(CartViewContent, { ...props }) });
8525
8713
  }
8526
8714
  function CartViewContent({
8527
8715
  onContinueShopping,
8528
- checkoutLabel = "Proceed to checkout"
8716
+ checkoutLabel
8529
8717
  } = {}) {
8718
+ const t = useT();
8530
8719
  const toast2 = useToast();
8531
8720
  const { api, emit } = useShop();
8532
8721
  const [cart2, setCart] = useState(null);
@@ -8576,7 +8765,7 @@ function CartViewContent({
8576
8765
  } catch (err) {
8577
8766
  if (optimistic) setCart(snapshot);
8578
8767
  const code = codeOf(err);
8579
- toast2.show(treatmentFor(code).body, code === "out_of_stock" ? "critical" : "neutral");
8768
+ toast2.show(t(treatmentFor(code).body), code === "out_of_stock" ? "critical" : "neutral");
8580
8769
  return false;
8581
8770
  } finally {
8582
8771
  setPendingSku(null);
@@ -8602,7 +8791,7 @@ function CartViewContent({
8602
8791
  description: describeLine(removed),
8603
8792
  image: removed.image,
8604
8793
  action: {
8605
- label: "Undo",
8794
+ label: t("Undo"),
8606
8795
  onAction: () => {
8607
8796
  void mutate(sku, () => api.cart.addItem({ sku, qty: removed.qty })).then((undone) => {
8608
8797
  if (undone) emit({ type: "add_to_cart", sku, qty: removed.qty });
@@ -8636,7 +8825,7 @@ function CartViewContent({
8636
8825
  /* @__PURE__ */ jsx(
8637
8826
  EmptyState,
8638
8827
  {
8639
- title: "Nothing here yet",
8828
+ title: t("Nothing here yet"),
8640
8829
  body: "Your items will show up here once you've added to your cart.",
8641
8830
  action: (
8642
8831
  // One label, because the design gives one. In the sheet, "continue shopping"
@@ -8658,7 +8847,7 @@ function CartViewContent({
8658
8847
  window.location.assign(checkout_url);
8659
8848
  } catch (err) {
8660
8849
  const code = codeOf(err);
8661
- toast2.show(treatmentFor(code).body, "critical");
8850
+ toast2.show(t(treatmentFor(code).body), "critical");
8662
8851
  setHandingOff(false);
8663
8852
  }
8664
8853
  }
@@ -8667,7 +8856,7 @@ function CartViewContent({
8667
8856
  /* @__PURE__ */ jsxs("div", { className: styles$j.body, children: [
8668
8857
  /* @__PURE__ */ jsxs("section", { className: styles$j.items, children: [
8669
8858
  /* @__PURE__ */ jsxs("div", { className: styles$j.sectionHeader, children: [
8670
- /* @__PURE__ */ jsx("h2", { className: styles$j.sectionTitle, children: "Items" }),
8859
+ /* @__PURE__ */ jsx("h2", { className: styles$j.sectionTitle, children: t("Items") }),
8671
8860
  /* @__PURE__ */ jsx("span", { className: styles$j.count, children: itemCount })
8672
8861
  ] }),
8673
8862
  /* @__PURE__ */ jsx("ul", { className: styles$j.lines, children: cart2.items.map((item2) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
@@ -8693,7 +8882,7 @@ function CartViewContent({
8693
8882
  }
8694
8883
  )
8695
8884
  ] }),
8696
- /* @__PURE__ */ jsx(StickyCtaBar, { variant: "divider", children: /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: () => void handOff(cart2), disabled: handingOff, children: checkoutLabel }) })
8885
+ /* @__PURE__ */ jsx(StickyCtaBar, { variant: "divider", children: /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: () => void handOff(cart2), disabled: handingOff, children: checkoutLabel ?? t("Proceed to checkout") }) })
8697
8886
  ] });
8698
8887
  }
8699
8888
  function describeLine(item2) {
@@ -8705,13 +8894,14 @@ function useCartSheet() {
8705
8894
  return useContext(CartSheetContext);
8706
8895
  }
8707
8896
  function CartSheetProvider({ children }) {
8897
+ const t = useT();
8708
8898
  const [isOpen, setIsOpen] = useState(false);
8709
8899
  const open = useCallback(() => setIsOpen(true), []);
8710
8900
  const close2 = useCallback(() => setIsOpen(false), []);
8711
8901
  const api = useMemo(() => ({ open, close: close2, isOpen }), [open, close2, isOpen]);
8712
8902
  return /* @__PURE__ */ jsxs(CartSheetContext.Provider, { value: api, children: [
8713
8903
  children,
8714
- isOpen && /* @__PURE__ */ jsx(BottomSheet, { open: true, onClose: close2, title: "Cart", children: /* @__PURE__ */ jsx(NoScreenTitle, { children: /* @__PURE__ */ jsx(CartView, { onContinueShopping: close2 }) }) })
8904
+ isOpen && /* @__PURE__ */ jsx(BottomSheet, { open: true, onClose: close2, title: t("Cart"), children: /* @__PURE__ */ jsx(NoScreenTitle, { children: /* @__PURE__ */ jsx(CartView, { onContinueShopping: close2 }) }) })
8715
8905
  ] });
8716
8906
  }
8717
8907
  const gallery = "_gallery_10mch_1";
@@ -8735,6 +8925,7 @@ const styles$i = {
8735
8925
  dotActive: dotActive$2
8736
8926
  };
8737
8927
  function MediaGallery({ media: media2, alt }) {
8928
+ const t = useT();
8738
8929
  const trackRef = useRef(null);
8739
8930
  const [active, setActive] = useState(0);
8740
8931
  useEffect(() => {
@@ -8770,7 +8961,7 @@ function MediaGallery({ media: media2, alt }) {
8770
8961
  }
8771
8962
  }
8772
8963
  return /* @__PURE__ */ jsxs("div", { className: styles$i.gallery, children: [
8773
- /* @__PURE__ */ jsx("button", { type: "button", className: styles$i.share, onClick: share2, "aria-label": "Share", children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
8964
+ /* @__PURE__ */ jsx("button", { type: "button", className: styles$i.share, onClick: share2, "aria-label": t("Share"), children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
8774
8965
  "path",
8775
8966
  {
8776
8967
  d: "M12 3v12M12 3 8 7m4-4 4 4M5 12v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6",
@@ -8791,7 +8982,7 @@ function MediaGallery({ media: media2, alt }) {
8791
8982
  priority: i === 0
8792
8983
  }
8793
8984
  ) }, src)) }),
8794
- media2.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$i.dots, role: "tablist", "aria-label": "Gallery pagination", children: media2.map((src, i) => /* @__PURE__ */ jsx(
8985
+ media2.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$i.dots, role: "tablist", "aria-label": t("Gallery pagination"), children: media2.map((src, i) => /* @__PURE__ */ jsx(
8795
8986
  "button",
8796
8987
  {
8797
8988
  type: "button",
@@ -8869,6 +9060,7 @@ function convert(cell, from, to) {
8869
9060
  return (to === "in" ? n / CM_PER_INCH : n * CM_PER_INCH).toFixed(1);
8870
9061
  }
8871
9062
  function SizeGuideSheet({ guide, onClose }) {
9063
+ const t = useT();
8872
9064
  const sheetRef = useRef(null);
8873
9065
  const columns = guide.columns ?? [];
8874
9066
  const rows = useMemo(() => guide.rows ?? [], [guide.rows]);
@@ -8893,7 +9085,7 @@ function SizeGuideSheet({ guide, onClose }) {
8893
9085
  "aria-labelledby": "size-guide-title",
8894
9086
  onClick: (e) => e.stopPropagation(),
8895
9087
  children: [
8896
- /* @__PURE__ */ jsx(SheetHeader, { onClose, closeLabel: "Close size guide" }),
9088
+ /* @__PURE__ */ jsx(SheetHeader, { onClose, closeLabel: t("Close size guide") }),
8897
9089
  /* @__PURE__ */ jsxs("div", { className: styles$h.body, children: [
8898
9090
  /* @__PURE__ */ jsxs("div", { className: styles$h.titles, children: [
8899
9091
  /* @__PURE__ */ jsx("h2", { id: "size-guide-title", className: styles$h.title, children: guide.title }),
@@ -8973,10 +9165,11 @@ function SizeSelector({
8973
9165
  error: error2 = false,
8974
9166
  guide
8975
9167
  }) {
9168
+ const t = useT();
8976
9169
  const [guideOpen, setGuideOpen] = useState(false);
8977
9170
  return /* @__PURE__ */ jsxs("section", { className: styles$g.root, "aria-labelledby": "size-heading", children: [
8978
9171
  /* @__PURE__ */ jsx("div", { className: styles$g.header, children: /* @__PURE__ */ jsx("h2", { id: "size-heading", className: styles$g.title, children: "Size" }) }),
8979
- /* @__PURE__ */ jsx("div", { className: styles$g.chips, role: "radiogroup", "aria-label": "Size", "aria-required": "true", children: sizes.map((size) => {
9172
+ /* @__PURE__ */ jsx("div", { className: styles$g.chips, role: "radiogroup", "aria-label": t("Size"), "aria-required": "true", children: sizes.map((size) => {
8980
9173
  const isSelected = size.value === selected2;
8981
9174
  const disabled2 = !size.available;
8982
9175
  return /* @__PURE__ */ jsxs(
@@ -9062,13 +9255,14 @@ const styles$f = {
9062
9255
  stockBadge
9063
9256
  };
9064
9257
  function ColorSelector({ colours, selected: selected2, onSelect }) {
9258
+ const t = useT();
9065
9259
  return /* @__PURE__ */ jsxs("section", { className: styles$f.root, "aria-labelledby": "colour-heading", children: [
9066
9260
  /* @__PURE__ */ jsxs("p", { className: styles$f.header, children: [
9067
9261
  /* @__PURE__ */ jsx("span", { id: "colour-heading", className: styles$f.title, children: "Color:" }),
9068
9262
  " ",
9069
9263
  /* @__PURE__ */ jsx("span", { className: styles$f.value, children: selected2 ?? "Select" })
9070
9264
  ] }),
9071
- /* @__PURE__ */ jsx("div", { className: styles$f.tiles, role: "radiogroup", "aria-label": "Color", "aria-required": "true", children: colours.map((c) => {
9265
+ /* @__PURE__ */ jsx("div", { className: styles$f.tiles, role: "radiogroup", "aria-label": t("Color"), "aria-required": "true", children: colours.map((c) => {
9072
9266
  const isSelected = c.value === selected2;
9073
9267
  const soldOut = !c.available;
9074
9268
  const lowStock2 = !soldOut && isLowStock(c.remaining);
@@ -9114,6 +9308,7 @@ function VariantSelector({
9114
9308
  onSelect,
9115
9309
  labelAttribute
9116
9310
  }) {
9311
+ const t = useT();
9117
9312
  function labelFor(variant) {
9118
9313
  if (labelAttribute && variant.attributes[labelAttribute]) {
9119
9314
  return variant.attributes[labelAttribute];
@@ -9123,7 +9318,7 @@ function VariantSelector({
9123
9318
  }
9124
9319
  return /* @__PURE__ */ jsxs("fieldset", { className: styles$e.fieldset, children: [
9125
9320
  /* @__PURE__ */ jsx("legend", { className: styles$e.legend, children: "Select an option" }),
9126
- /* @__PURE__ */ jsx("div", { className: styles$e.options, role: "radiogroup", "aria-label": "Variant", children: variants.map((variant) => {
9321
+ /* @__PURE__ */ jsx("div", { className: styles$e.options, role: "radiogroup", "aria-label": t("Variant"), children: variants.map((variant) => {
9127
9322
  const selected2 = variant.sku === selectedSku;
9128
9323
  const disabled2 = !variant.in_stock;
9129
9324
  return /* @__PURE__ */ jsxs(
@@ -9286,6 +9481,7 @@ const styles$a = {
9286
9481
  oos
9287
9482
  };
9288
9483
  function ProductDetail({ product, inventory: inventory2, recommendations = [] }) {
9484
+ const t = useT();
9289
9485
  const toast2 = useToast();
9290
9486
  const { api, emit } = useShop();
9291
9487
  const cartSheet = useCartSheet();
@@ -9364,7 +9560,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
9364
9560
  return false;
9365
9561
  }
9366
9562
  emit({ type: "error", code, scope: "cart.addItem" });
9367
- toast2.show(treatmentFor(code).body, code === "out_of_stock" ? "critical" : "neutral");
9563
+ toast2.show(t(treatmentFor(code).body), code === "out_of_stock" ? "critical" : "neutral");
9368
9564
  return false;
9369
9565
  }
9370
9566
  }
@@ -9387,7 +9583,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
9387
9583
  return;
9388
9584
  }
9389
9585
  emit({ type: "error", code, scope: "stockAlerts.create" });
9390
- toast2.show(treatmentFor(code).body, "neutral");
9586
+ toast2.show(t(treatmentFor(code).body), "neutral");
9391
9587
  } finally {
9392
9588
  setBusy(null);
9393
9589
  }
@@ -9419,7 +9615,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
9419
9615
  description: [product.title, size && `Size ${size}`].filter(Boolean).join(" · "),
9420
9616
  image: variant?.image ?? product.media[0],
9421
9617
  // Falls back to the /cart route where the sheet provider isn't mounted.
9422
- action: cartSheet || navigate ? { label: "View cart", onAction: openCart } : void 0,
9618
+ action: cartSheet || navigate ? { label: t("View cart"), onAction: openCart } : void 0,
9423
9619
  // Points the caret at the cart icon this just landed in.
9424
9620
  anchor: "cart"
9425
9621
  });
@@ -9429,7 +9625,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
9429
9625
  const available = selectedVariant?.available ?? inventory2?.available ?? 0;
9430
9626
  const lowStock2 = isLowStock(available);
9431
9627
  const stockNotice = !purchasable || lowStock2;
9432
- const availabilityLabel = !purchasable ? "Out of stock" : lowStock2 ? lowStockLabel(available) : "";
9628
+ const availabilityLabel = !purchasable ? t("Out of stock") : lowStock2 ? t("Only {0} left", available) : "";
9433
9629
  const cta2 = purchasable ? (
9434
9630
  /*
9435
9631
  * Three labels, one button (5241:71382 / 5295:75115 / 5268:72907). "Adding to cart"
@@ -9448,7 +9644,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
9448
9644
  onClick: inCart ? openCart : handleAdd,
9449
9645
  loading: busy === "add",
9450
9646
  disabled: busy !== null,
9451
- children: busy === "add" ? "Adding to cart" : inCart ? "Go to cart" : "Add to cart"
9647
+ children: busy === "add" ? t("Adding to cart") : inCart ? t("Go to cart") : t("Add to cart")
9452
9648
  }
9453
9649
  )
9454
9650
  ) : /* @__PURE__ */ jsx(
@@ -9458,7 +9654,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
9458
9654
  onClick: handleRemind,
9459
9655
  loading: busy === "remind",
9460
9656
  disabled: alerted || busy !== null,
9461
- children: alerted ? "We'll remind you" : "Remind me when available"
9657
+ children: alerted ? t("We'll remind you") : t("Remind me when available")
9462
9658
  }
9463
9659
  );
9464
9660
  return /* @__PURE__ */ jsxs(ShopSurface, { tone: "light", fill: true, className: styles$a.page, children: [
@@ -9515,7 +9711,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
9515
9711
  /* @__PURE__ */ jsx(
9516
9712
  RailCarousel,
9517
9713
  {
9518
- title: "You may also like",
9714
+ title: t("You may also like"),
9519
9715
  products: recommendations.filter((p) => p.sku !== product.sku),
9520
9716
  inset: true
9521
9717
  }
@@ -9643,6 +9839,7 @@ const styles$6 = {
9643
9839
  disclaimer
9644
9840
  };
9645
9841
  function ReviewCarousel({ quotes, disclaimer: disclaimer2 }) {
9842
+ const t = useT();
9646
9843
  const trackRef = useRef(null);
9647
9844
  const [active, setActive] = useState(0);
9648
9845
  useEffect(() => {
@@ -9652,7 +9849,7 @@ function ReviewCarousel({ quotes, disclaimer: disclaimer2 }) {
9652
9849
  track2.addEventListener("scroll", onScroll, { passive: true });
9653
9850
  return () => track2.removeEventListener("scroll", onScroll);
9654
9851
  }, []);
9655
- return /* @__PURE__ */ jsxs("section", { className: styles$6.section, "aria-label": "Reviews", children: [
9852
+ return /* @__PURE__ */ jsxs("section", { className: styles$6.section, "aria-label": t("Reviews"), children: [
9656
9853
  /* @__PURE__ */ jsx("ul", { className: styles$6.track, ref: trackRef, children: quotes.map((q, i) => /* @__PURE__ */ jsxs("li", { className: styles$6.card, children: [
9657
9854
  /* @__PURE__ */ jsxs("blockquote", { className: styles$6.quote, children: [
9658
9855
  "“",
@@ -9676,7 +9873,8 @@ const styles$5 = {
9676
9873
  body
9677
9874
  };
9678
9875
  function WhyUs({ items: items2 }) {
9679
- return /* @__PURE__ */ jsx("section", { className: styles$5.section, "aria-label": "Why shop with us", children: items2.map((it, i) => /* @__PURE__ */ jsxs("div", { className: styles$5.row, children: [
9876
+ const t = useT();
9877
+ return /* @__PURE__ */ jsx("section", { className: styles$5.section, "aria-label": t("Why shop with us"), children: items2.map((it, i) => /* @__PURE__ */ jsxs("div", { className: styles$5.row, children: [
9680
9878
  /* @__PURE__ */ jsx("p", { className: styles$5.title, children: it.title }),
9681
9879
  /* @__PURE__ */ jsx("p", { className: styles$5.body, children: it.body })
9682
9880
  ] }, i)) });
@@ -9751,6 +9949,7 @@ function CategoryContent({ page: page2 }) {
9751
9949
  ] });
9752
9950
  }
9753
9951
  function CategoryView({ code, initialData, onNotFound }) {
9952
+ const t = useT();
9754
9953
  const { api, market, emit } = useShop();
9755
9954
  const [page2, setPage] = useState(initialData ?? null);
9756
9955
  const [error2, setError] = useState();
@@ -9774,7 +9973,7 @@ function CategoryView({ code, initialData, onNotFound }) {
9774
9973
  if (error2 === "category_not_found" && onNotFound) return /* @__PURE__ */ jsx(Fragment, { children: onNotFound() });
9775
9974
  if (page2) return /* @__PURE__ */ jsx(CategoryContent, { page: page2 });
9776
9975
  if (loading) return /* @__PURE__ */ jsx(ScreenSkeleton, { tone: "dark" });
9777
- return /* @__PURE__ */ jsx(ShopSurface, { tone: "dark", fill: true, children: error2 ? /* @__PURE__ */ jsx(ErrorState, { code: error2 }) : /* @__PURE__ */ jsx(EmptyState, { title: "Category unavailable", body: "Check back soon." }) });
9976
+ return /* @__PURE__ */ jsx(ShopSurface, { tone: "dark", fill: true, children: error2 ? /* @__PURE__ */ jsx(ErrorState, { code: error2 }) : /* @__PURE__ */ jsx(EmptyState, { title: t("Category unavailable"), body: "Check back soon." }) });
9778
9977
  }
9779
9978
  function ProductView({
9780
9979
  sku,
@@ -9782,6 +9981,7 @@ function ProductView({
9782
9981
  showRecommendations = true,
9783
9982
  onNotFound
9784
9983
  }) {
9984
+ const t = useT();
9785
9985
  const { api, market, emit } = useShop();
9786
9986
  const [product, setProduct] = useState(initialData?.product ?? null);
9787
9987
  const [inventory2, setInventory] = useState(initialData?.inventory ?? null);
@@ -9817,7 +10017,7 @@ function ProductView({
9817
10017
  live = false;
9818
10018
  };
9819
10019
  }, [api, sku, market, emit, showRecommendations]);
9820
- const unavailable = /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(EmptyState, { title: "Item unavailable", body: "This product is no longer available." }) });
10020
+ const unavailable = /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(EmptyState, { title: t("Item unavailable"), body: t("This product is no longer available.") }) });
9821
10021
  if (error2 === "sku_not_found") {
9822
10022
  if (onNotFound) return /* @__PURE__ */ jsx(Fragment, { children: onNotFound() });
9823
10023
  return unavailable;
@@ -9936,15 +10136,25 @@ function CategoryPanel({ panel: panel2 }) {
9936
10136
  ] });
9937
10137
  }
9938
10138
  function useSlides() {
10139
+ const t = useT();
9939
10140
  const shop = useShopOptional();
9940
- const [panels, setPanels] = useState(FALLBACK_PANELS);
10141
+ const [fetched, setFetched] = useState(null);
10142
+ const fallback = useMemo(
10143
+ () => FALLBACK_PANELS.map((p) => ({
10144
+ ...p,
10145
+ title: t(p.title),
10146
+ subtitle: t(p.subtitle),
10147
+ cta: t(p.cta)
10148
+ })),
10149
+ [t]
10150
+ );
9941
10151
  useEffect(() => {
9942
10152
  const api = shop?.api;
9943
10153
  if (!api) return;
9944
10154
  let live = true;
9945
10155
  void api.content.home().then((home) => {
9946
10156
  if (!live || home.slides.length === 0) return;
9947
- setPanels(
10157
+ setFetched(
9948
10158
  home.slides.map((s) => ({
9949
10159
  key: s.key,
9950
10160
  title: s.title,
@@ -9960,9 +10170,10 @@ function useSlides() {
9960
10170
  live = false;
9961
10171
  };
9962
10172
  }, [shop]);
9963
- return panels;
10173
+ return fetched ?? fallback;
9964
10174
  }
9965
10175
  function HomeShowcase() {
10176
+ const t = useT();
9966
10177
  const assetUrl = useAssetUrl();
9967
10178
  const panels = useSlides();
9968
10179
  const showcaseRef = useRef(null);
@@ -9975,7 +10186,7 @@ function HomeShowcase() {
9975
10186
  * for the surface to fill.
9976
10187
  */
9977
10188
  /* @__PURE__ */ jsx(ShopSurface, { tone: "dark", children: /* @__PURE__ */ jsxs("div", { className: styles$2.showcase, ref: showcaseRef, children: [
9978
- /* @__PURE__ */ jsxs("section", { className: `${styles$2.panel} ${styles$2.hero}`, "aria-label": "DAZN Shop", children: [
10189
+ /* @__PURE__ */ jsxs("section", { className: `${styles$2.panel} ${styles$2.hero}`, "aria-label": t("DAZN Shop"), children: [
9979
10190
  /* @__PURE__ */ jsx("div", { className: styles$2.heroImageBox, children: /* @__PURE__ */ jsx(
9980
10191
  ShopImage,
9981
10192
  {
@@ -9993,7 +10204,7 @@ function HomeShowcase() {
9993
10204
  "img",
9994
10205
  {
9995
10206
  src: assetUrl("/figma/home/dazn-logo.svg"),
9996
- alt: "DAZN",
10207
+ alt: t("DAZN"),
9997
10208
  className: styles$2.logo
9998
10209
  }
9999
10210
  ),
@@ -10037,11 +10248,12 @@ function CartTrigger({ className, children, ...rest }) {
10037
10248
  );
10038
10249
  }
10039
10250
  function IdentityGate({ returnTo }) {
10251
+ const t = useT();
10040
10252
  const emit = useShopEvent();
10041
10253
  return /* @__PURE__ */ jsx(
10042
10254
  EmptyState,
10043
10255
  {
10044
- title: "Finish signing up",
10256
+ title: t("Finish signing up"),
10045
10257
  body: "Complete your DAZN sign-up to check out. Your cart is saved.",
10046
10258
  action: /* @__PURE__ */ jsx(Button, { onClick: () => emit({ type: "session_required", action: `sign_in:${returnTo}` }), children: "Finish signing up" })
10047
10259
  }
@@ -10072,22 +10284,24 @@ function useCartCount() {
10072
10284
  }, [subscribe]);
10073
10285
  return count2;
10074
10286
  }
10075
- const header$1 = "_header_1yjrk_25";
10076
- const floating = "_floating_1yjrk_44";
10077
- const scrolled = "_scrolled_1yjrk_79";
10078
- const title$1 = "_title_1yjrk_172";
10079
- const right = "_right_1yjrk_185";
10080
- const spacer = "_spacer_1yjrk_198";
10081
- const iconBtn = "_iconBtn_1yjrk_203";
10082
- const menuBtn = "_menuBtn_1yjrk_230";
10083
- const badge = "_badge_1yjrk_258";
10084
- const closeSlot = "_closeSlot_1yjrk_285";
10085
- const centred = "_centred_1yjrk_300";
10287
+ const header$1 = "_header_8o3d7_25";
10288
+ const floating = "_floating_8o3d7_44";
10289
+ const scrolled = "_scrolled_8o3d7_79";
10290
+ const title$1 = "_title_8o3d7_172";
10291
+ const leading = "_leading_8o3d7_199";
10292
+ const right = "_right_8o3d7_205";
10293
+ const spacer = "_spacer_8o3d7_218";
10294
+ const iconBtn = "_iconBtn_8o3d7_223";
10295
+ const menuBtn = "_menuBtn_8o3d7_250";
10296
+ const badge = "_badge_8o3d7_278";
10297
+ const closeSlot = "_closeSlot_8o3d7_305";
10298
+ const centred = "_centred_8o3d7_320";
10086
10299
  const styles$1 = {
10087
10300
  header: header$1,
10088
10301
  floating,
10089
10302
  scrolled,
10090
10303
  title: title$1,
10304
+ leading,
10091
10305
  right,
10092
10306
  spacer,
10093
10307
  iconBtn,
@@ -10160,9 +10374,10 @@ function ShopHeader(props) {
10160
10374
  function CheckoutBar({
10161
10375
  title: title2,
10162
10376
  onClose,
10163
- closeLabel = "Close",
10377
+ closeLabel,
10164
10378
  className
10165
10379
  }) {
10380
+ const t = useT();
10166
10381
  const classes = [styles$1.header, className ?? ""].filter(Boolean).join(" ");
10167
10382
  return /* @__PURE__ */ jsxs("header", { className: classes, children: [
10168
10383
  /* @__PURE__ */ jsx("span", { className: styles$1.closeSlot, "aria-hidden": "true" }),
@@ -10172,7 +10387,7 @@ function CheckoutBar({
10172
10387
  {
10173
10388
  type: "button",
10174
10389
  className: [styles$1.iconBtn, styles$1.closeSlot].join(" "),
10175
- "aria-label": closeLabel,
10390
+ "aria-label": closeLabel ?? t("Close"),
10176
10391
  onClick: onClose,
10177
10392
  children: /* @__PURE__ */ jsx(CloseMedium, {})
10178
10393
  }
@@ -10186,16 +10401,18 @@ function ShopBar({
10186
10401
  showCart = true,
10187
10402
  floating: floating2 = false,
10188
10403
  scrolled: scrolled2,
10189
- backLabel = "Back",
10190
- menuLabel = "More options",
10404
+ backLabel,
10405
+ menuLabel,
10191
10406
  className
10192
10407
  }) {
10408
+ const t = useT();
10193
10409
  const cartCount = useCartCount();
10194
10410
  const screenTitle = useScreenTitle();
10195
10411
  const shownTitle = title2 ?? screenTitle;
10412
+ const hasTrailing = showCart || Boolean(onMenu);
10196
10413
  const atTop = useScrolledUnder(floating2 && scrolled2 === void 0);
10197
10414
  const isScrolled = scrolled2 ?? atTop;
10198
- const cartLabel = cartCount === null ? "Cart" : cartCount === 0 ? "Cart, empty" : `Cart, ${cartCount} item${cartCount === 1 ? "" : "s"}`;
10415
+ const cartLabel = cartCount === null ? t("Cart") : cartCount === 0 ? t("Cart, empty") : t("Cart, {0} item{1}", cartCount, cartCount === 1 ? "" : "s");
10199
10416
  const classes = [
10200
10417
  styles$1.header,
10201
10418
  floating2 ? styles$1.floating : "",
@@ -10203,8 +10420,14 @@ function ShopBar({
10203
10420
  className ?? ""
10204
10421
  ].filter(Boolean).join(" ");
10205
10422
  return /* @__PURE__ */ jsxs("header", { className: classes, children: [
10206
- onBack ? /* @__PURE__ */ jsx("button", { type: "button", className: styles$1.iconBtn, "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx(ChevronLeft, {}) }) : /* @__PURE__ */ jsx("span", { className: styles$1.spacer, "aria-hidden": "true" }),
10207
- shownTitle ? /* @__PURE__ */ jsx("span", { className: styles$1.title, children: shownTitle }) : null,
10423
+ onBack ? /* @__PURE__ */ jsx("button", { type: "button", className: styles$1.iconBtn, "aria-label": backLabel ?? t("Back"), onClick: onBack, children: /* @__PURE__ */ jsx(ChevronLeft, {}) }) : /* @__PURE__ */ jsx("span", { className: styles$1.spacer, "aria-hidden": "true" }),
10424
+ shownTitle ? /* @__PURE__ */ jsx(
10425
+ "span",
10426
+ {
10427
+ className: hasTrailing ? styles$1.title : `${styles$1.title} ${styles$1.leading}`,
10428
+ children: shownTitle
10429
+ }
10430
+ ) : null,
10208
10431
  /* @__PURE__ */ jsxs("div", { className: styles$1.right, children: [
10209
10432
  showCart ? /* @__PURE__ */ jsxs(CartTrigger, { className: styles$1.iconBtn, "aria-label": cartLabel, children: [
10210
10433
  /* @__PURE__ */ jsx(CartIcon, {}),
@@ -10215,7 +10438,7 @@ function ShopBar({
10215
10438
  {
10216
10439
  type: "button",
10217
10440
  className: `${styles$1.iconBtn} ${styles$1.menuBtn}`,
10218
- "aria-label": menuLabel,
10441
+ "aria-label": menuLabel ?? t("More options"),
10219
10442
  onClick: onMenu,
10220
10443
  children: /* @__PURE__ */ jsx(MenuIcon, {})
10221
10444
  }
@@ -10327,24 +10550,25 @@ function ShopMenuSheet({
10327
10550
  onClose,
10328
10551
  onManageOrders,
10329
10552
  onHelp,
10330
- closeLabel = "Close",
10331
- label: label2 = "Shop menu"
10553
+ closeLabel,
10554
+ label: label2
10332
10555
  }) {
10333
10556
  const sheetRef = useRef(null);
10557
+ const t = useT();
10334
10558
  useModalDialog(open, onClose, sheetRef);
10335
10559
  if (!open) return null;
10336
10560
  const rows = [
10337
10561
  {
10338
10562
  key: "orders",
10339
10563
  icon: /* @__PURE__ */ jsx(OrderIcon, {}),
10340
- title: "Manage orders",
10341
- subtitle: "View your order history and track shipments",
10564
+ title: t("Manage orders"),
10565
+ subtitle: t("View your order history and track shipments"),
10342
10566
  ...onManageOrders ? { onSelect: onManageOrders } : {}
10343
10567
  },
10344
10568
  {
10345
10569
  key: "help",
10346
10570
  icon: /* @__PURE__ */ jsx(HelpIcon, {}),
10347
- title: "Help & Support",
10571
+ title: t("Help & Support"),
10348
10572
  ...onHelp ? { onSelect: onHelp } : {}
10349
10573
  }
10350
10574
  ];
@@ -10357,10 +10581,10 @@ function ShopMenuSheet({
10357
10581
  className: styles.sheet,
10358
10582
  role: "dialog",
10359
10583
  "aria-modal": "true",
10360
- "aria-label": label2,
10584
+ "aria-label": label2 ?? t("Shop menu"),
10361
10585
  ref: sheetRef,
10362
10586
  children: [
10363
- /* @__PURE__ */ jsx("div", { className: styles.header, children: /* @__PURE__ */ jsx("button", { type: "button", className: styles.close, onClick: onClose, "aria-label": closeLabel, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) }),
10587
+ /* @__PURE__ */ jsx("div", { className: styles.header, children: /* @__PURE__ */ jsx("button", { type: "button", className: styles.close, onClick: onClose, "aria-label": closeLabel ?? t("Close"), children: /* @__PURE__ */ jsx(CloseIcon, {}) }) }),
10364
10588
  /* @__PURE__ */ jsx("ul", { className: styles.list, children: rows.map((row2) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
10365
10589
  "button",
10366
10590
  {