@reblu/site-blocks 0.14.0 → 0.16.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.cjs CHANGED
@@ -28,10 +28,13 @@ __export(src_exports, {
28
28
  CheckoutForm: () => CheckoutForm,
29
29
  CheckoutLoginPrompt: () => CheckoutLoginPrompt,
30
30
  CourseDescription: () => CourseDescription,
31
+ DATA_REQUEST_TYPES: () => import_site_contracts.DATA_REQUEST_TYPES,
31
32
  DEFAULT_INVOICE_COUNTRIES: () => DEFAULT_INVOICE_COUNTRIES,
32
33
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
33
34
  DEFAULT_SHOP_ERROR_MESSAGES: () => DEFAULT_SHOP_ERROR_MESSAGES,
34
35
  DEFAULT_SHOP_PRICE_BANDS: () => DEFAULT_SHOP_PRICE_BANDS,
36
+ DEFAULT_TRUST_BADGE_HEADINGS: () => DEFAULT_TRUST_BADGE_HEADINGS,
37
+ DEFAULT_TRUST_BADGE_TYPE_ORDER: () => DEFAULT_TRUST_BADGE_TYPE_ORDER,
35
38
  DEFAULT_TRUST_ICONS: () => DEFAULT_TRUST_ICONS,
36
39
  EMPTY_FULL_INVOICE_VALUE: () => EMPTY_FULL_INVOICE_VALUE,
37
40
  FaqAccordion: () => FaqAccordion,
@@ -49,6 +52,7 @@ __export(src_exports, {
49
52
  ShopFilters: () => ShopFilters,
50
53
  Specialty: () => Specialty,
51
54
  Treatment: () => Treatment,
55
+ TrustBadges: () => TrustBadges,
52
56
  buildFaqPageJsonLd: () => buildFaqPageJsonLd,
53
57
  buildShareUrls: () => buildShareUrls,
54
58
  collectFaqItems: () => collectFaqItems,
@@ -13169,8 +13173,24 @@ function markdownToPlainText(markdown, { maxLength } = {}) {
13169
13173
  }
13170
13174
 
13171
13175
  // src/components/markdown-renderer.tsx
13172
- var import_utils = require("@reblu/site-ui/utils");
13173
13176
  var import_html_react_parser = require("html-react-parser");
13177
+
13178
+ // src/lib/slot-class-name.ts
13179
+ var import_utils = require("@reblu/site-ui/utils");
13180
+ var MERGE_SAFE_TEXT = /(?:^|:)!?text-(?:left|center|right|justify|start|end|wrap|nowrap|balance|pretty|ellipsis|clip)$/;
13181
+ var TEXT_UTILITY = /(?:^|:)!?-?text-/;
13182
+ function bypassesMerge(token) {
13183
+ return TEXT_UTILITY.test(token) && !MERGE_SAFE_TEXT.test(token);
13184
+ }
13185
+ function slotClassName(structural, defaults, consumer) {
13186
+ if (consumer === void 0 || consumer.trim() === "") return (0, import_utils.cn)(structural, defaults);
13187
+ const tokens = consumer.split(/\s+/).filter(Boolean);
13188
+ const verbatim = tokens.filter(bypassesMerge);
13189
+ const merged = (0, import_utils.cn)(structural, tokens.filter((token) => !bypassesMerge(token)));
13190
+ return [merged, ...verbatim].filter(Boolean).join(" ");
13191
+ }
13192
+
13193
+ // src/components/markdown-renderer.tsx
13174
13194
  var import_jsx_runtime = require("react/jsx-runtime");
13175
13195
  var HTML_TO_DOM_OPTIONS = { lowerCaseAttributeNames: false };
13176
13196
  function parse3(html5, options) {
@@ -13333,15 +13353,14 @@ function buildOptions(headingOffset) {
13333
13353
  function MarkdownRenderer({ content, className, headingOffset = 0 }) {
13334
13354
  const html5 = markdownToSafeHtml(content);
13335
13355
  if (!html5) return null;
13336
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_utils.cn)("max-w-none", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
13356
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
13337
13357
  }
13338
13358
  function SafeHtml({ html: html5, className, headingOffset = 0 }) {
13339
13359
  if (!html5) return null;
13340
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_utils.cn)("max-w-none", className), "data-slot": "safe-html", children: parse3(html5, buildOptions(headingOffset)) });
13360
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slotClassName("max-w-none", "", className), "data-slot": "safe-html", children: parse3(html5, buildOptions(headingOffset)) });
13341
13361
  }
13342
13362
 
13343
13363
  // src/components/course-description.tsx
13344
- var import_utils2 = require("@reblu/site-ui/utils");
13345
13364
  var import_jsx_runtime2 = require("react/jsx-runtime");
13346
13365
  function isVisiblyEmpty(html5) {
13347
13366
  if (/<(img|iframe|hr)\b/i.test(html5)) return false;
@@ -13366,7 +13385,7 @@ function CourseDescription({
13366
13385
  {
13367
13386
  html: html5,
13368
13387
  headingOffset: offset,
13369
- className: (0, import_utils2.cn)("text-muted-foreground", contentClassName)
13388
+ className: slotClassName("", "text-muted-foreground", contentClassName)
13370
13389
  }
13371
13390
  );
13372
13391
  if (!hasHeading) {
@@ -13378,9 +13397,9 @@ function CourseDescription({
13378
13397
  {
13379
13398
  "data-slot": "course-description",
13380
13399
  "aria-labelledby": headingId,
13381
- className: (0, import_utils2.cn)("space-y-3", className),
13400
+ className: slotClassName("space-y-3", "", className),
13382
13401
  children: [
13383
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { id: headingId, className: (0, import_utils2.cn)("text-xl font-semibold", headingClassName), children: heading }),
13402
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
13384
13403
  body3
13385
13404
  ]
13386
13405
  }
@@ -13388,10 +13407,10 @@ function CourseDescription({
13388
13407
  }
13389
13408
 
13390
13409
  // src/components/treatment.tsx
13391
- var import_utils4 = require("@reblu/site-ui/utils");
13410
+ var import_utils3 = require("@reblu/site-ui/utils");
13392
13411
 
13393
13412
  // src/components/_page-parts.tsx
13394
- var import_utils3 = require("@reblu/site-ui/utils");
13413
+ var import_utils2 = require("@reblu/site-ui/utils");
13395
13414
  var import_button_variants = require("@reblu/site-ui/button-variants");
13396
13415
  var import_jsx_runtime3 = require("react/jsx-runtime");
13397
13416
  var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
@@ -13431,7 +13450,7 @@ function SectionCta({ section }) {
13431
13450
  "data-slot": "button",
13432
13451
  "data-variant": variant,
13433
13452
  "data-size": "default",
13434
- className: (0, import_utils3.cn)((0, import_button_variants.buttonVariants)({ variant, size: "default" })),
13453
+ className: (0, import_utils2.cn)((0, import_button_variants.buttonVariants)({ variant, size: "default" })),
13435
13454
  ...section.ctaIsExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
13436
13455
  children: section.ctaLabel
13437
13456
  }
@@ -13439,7 +13458,7 @@ function SectionCta({ section }) {
13439
13458
  }
13440
13459
  function SectionImages({ section }) {
13441
13460
  if (section.images.length === 0) return null;
13442
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_utils3.cn)("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("figure", { className: "space-y-1", children: [
13461
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_utils2.cn)("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("figure", { className: "space-y-1", children: [
13443
13462
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
13444
13463
  img.caption && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
13445
13464
  ] }, `${img.url}-${img.order}`)) });
@@ -13476,17 +13495,17 @@ function PageSectionList({ sections }) {
13476
13495
  // src/components/treatment.tsx
13477
13496
  var import_jsx_runtime4 = require("react/jsx-runtime");
13478
13497
  function Treatment({ page, className }) {
13479
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("article", { className: (0, import_utils4.cn)("space-y-12", className), "data-slot": "treatment", children: [
13498
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("article", { className: (0, import_utils3.cn)("space-y-12", className), "data-slot": "treatment", children: [
13480
13499
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageHero, { page }),
13481
13500
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageSectionList, { sections: page.sections })
13482
13501
  ] });
13483
13502
  }
13484
13503
 
13485
13504
  // src/components/parent-page.tsx
13486
- var import_utils6 = require("@reblu/site-ui/utils");
13505
+ var import_utils5 = require("@reblu/site-ui/utils");
13487
13506
 
13488
13507
  // src/components/page-card-grid.tsx
13489
- var import_utils5 = require("@reblu/site-ui/utils");
13508
+ var import_utils4 = require("@reblu/site-ui/utils");
13490
13509
  var import_jsx_runtime5 = require("react/jsx-runtime");
13491
13510
  var defaultPageHref = (page) => `/${page.slug}`;
13492
13511
  var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
@@ -13502,7 +13521,7 @@ function PageCardGridSection({
13502
13521
  }) {
13503
13522
  if (pages.length === 0) return null;
13504
13523
  const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
13505
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: (0, import_utils5.cn)("space-y-6", className), children: [
13524
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: (0, import_utils4.cn)("space-y-6", className), children: [
13506
13525
  showHeading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
13507
13526
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
13508
13527
  "a",
@@ -13545,7 +13564,7 @@ function ParentPage({
13545
13564
  const pages = childPages ?? treatments ?? [];
13546
13565
  const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
13547
13566
  const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
13548
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("article", { className: (0, import_utils6.cn)("space-y-12", className), "data-slot": "specialty", children: [
13567
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("article", { className: (0, import_utils5.cn)("space-y-12", className), "data-slot": "specialty", children: [
13549
13568
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageHero, { page }),
13550
13569
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageSectionList, { sections: page.sections }),
13551
13570
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
@@ -13564,7 +13583,7 @@ function ParentPage({
13564
13583
  var Specialty = ParentPage;
13565
13584
 
13566
13585
  // src/components/profile-card.tsx
13567
- var import_utils7 = require("@reblu/site-ui/utils");
13586
+ var import_utils6 = require("@reblu/site-ui/utils");
13568
13587
  var import_jsx_runtime7 = require("react/jsx-runtime");
13569
13588
  function initials(name) {
13570
13589
  return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
@@ -13574,7 +13593,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
13574
13593
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
13575
13594
  "article",
13576
13595
  {
13577
- className: (0, import_utils7.cn)(
13596
+ className: (0, import_utils6.cn)(
13578
13597
  "flex flex-col items-center gap-3 rounded-lg border bg-card p-6 text-center",
13579
13598
  className
13580
13599
  ),
@@ -13606,7 +13625,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
13606
13625
  }
13607
13626
 
13608
13627
  // src/components/product-card.tsx
13609
- var import_utils8 = require("@reblu/site-ui/utils");
13628
+ var import_utils7 = require("@reblu/site-ui/utils");
13610
13629
  var import_jsx_runtime8 = require("react/jsx-runtime");
13611
13630
  function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
13612
13631
  const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
@@ -13614,7 +13633,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
13614
13633
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
13615
13634
  "article",
13616
13635
  {
13617
- className: (0, import_utils8.cn)(
13636
+ className: (0, import_utils7.cn)(
13618
13637
  "group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
13619
13638
  className
13620
13639
  ),
@@ -13837,7 +13856,6 @@ var __iconNode8 = [
13837
13856
  var Truck = createLucideIcon("truck", __iconNode8);
13838
13857
 
13839
13858
  // src/components/product-trust-items.tsx
13840
- var import_utils11 = require("@reblu/site-ui/utils");
13841
13859
  var import_jsx_runtime9 = require("react/jsx-runtime");
13842
13860
  var DEFAULT_TRUST_ICONS = Object.freeze({
13843
13861
  shipping: Truck,
@@ -13872,14 +13890,14 @@ function ProductTrustItems({
13872
13890
  return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
13873
13891
  });
13874
13892
  if (rows.length === 0) return null;
13875
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(List, { "data-slot": "product-trust-items", className: (0, import_utils11.cn)("space-y-2.5", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: (0, import_utils11.cn)("flex items-center gap-3 text-sm text-muted-foreground", itemClassName), children: [
13893
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
13876
13894
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
13877
13895
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: text3 })
13878
13896
  ] }, key2)) });
13879
13897
  }
13880
13898
 
13881
13899
  // src/components/faq-accordion.tsx
13882
- var import_utils12 = require("@reblu/site-ui/utils");
13900
+ var import_utils10 = require("@reblu/site-ui/utils");
13883
13901
 
13884
13902
  // src/components/_heading.tsx
13885
13903
  var import_jsx_runtime10 = require("react/jsx-runtime");
@@ -13907,7 +13925,7 @@ function FaqAccordion({
13907
13925
  }) {
13908
13926
  const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
13909
13927
  if (visible.length === 0) return null;
13910
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_utils12.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
13928
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_utils10.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
13911
13929
  heading && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
13912
13930
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
13913
13931
  "details",
@@ -13935,41 +13953,180 @@ function FaqAccordion({
13935
13953
  ] });
13936
13954
  }
13937
13955
 
13956
+ // src/components/trust-badges.tsx
13957
+ var import_utils11 = require("@reblu/site-ui/utils");
13958
+ var import_jsx_runtime12 = (
13959
+ // eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
13960
+ require("react/jsx-runtime")
13961
+ );
13962
+ var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
13963
+ {
13964
+ PARTNER: "Colaboradores",
13965
+ INSURANCE: "Aseguradoras",
13966
+ SUBVENTION: "Financiaci\xF3n",
13967
+ CERTIFICATION: "Certificaciones",
13968
+ AWARD: "Premios"
13969
+ }
13970
+ );
13971
+ var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
13972
+ "SUBVENTION",
13973
+ "CERTIFICATION",
13974
+ "AWARD",
13975
+ "PARTNER",
13976
+ "INSURANCE"
13977
+ ]);
13978
+ var KNOWN_TYPES = new Set(DEFAULT_TRUST_BADGE_TYPE_ORDER);
13979
+ function isUsable(value) {
13980
+ if (typeof value !== "object" || value === null) return false;
13981
+ const entry = value;
13982
+ return typeof entry.type === "string" && KNOWN_TYPES.has(entry.type) && typeof entry.name === "string" && entry.name.trim() !== "";
13983
+ }
13984
+ function safeHref(url) {
13985
+ if (typeof url !== "string") return null;
13986
+ try {
13987
+ const parsed = new URL(url);
13988
+ return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
13989
+ } catch {
13990
+ return null;
13991
+ }
13992
+ }
13993
+ function safeLogoSrc(url) {
13994
+ if (typeof url !== "string" || url === "") return null;
13995
+ if (url.startsWith("/")) return url.startsWith("//") || url.startsWith("/\\") ? null : url;
13996
+ return safeHref(url);
13997
+ }
13998
+ function BadgeContent({ badge, logoClassName }) {
13999
+ const src = safeLogoSrc(badge.logoUrl);
14000
+ if (src) {
14001
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14002
+ "img",
14003
+ {
14004
+ src,
14005
+ alt: badge.name,
14006
+ loading: "lazy",
14007
+ className: (0, import_utils11.cn)("h-12 w-auto object-contain", logoClassName)
14008
+ }
14009
+ );
14010
+ }
14011
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-sm font-medium", children: badge.name });
14012
+ }
14013
+ function TrustBadges({
14014
+ badges,
14015
+ headings,
14016
+ types = DEFAULT_TRUST_BADGE_TYPE_ORDER,
14017
+ heading,
14018
+ headingId = "trust-badges-heading",
14019
+ headingLevel = 2,
14020
+ newWindowLabel = "(se abre en una ventana nueva)",
14021
+ className,
14022
+ groupClassName,
14023
+ headingClassName,
14024
+ sectionHeadingClassName,
14025
+ listClassName,
14026
+ logoClassName
14027
+ }) {
14028
+ if (!Array.isArray(badges) || badges.length === 0) return null;
14029
+ const usable = badges.filter(isUsable);
14030
+ const groups = types.flatMap((type) => {
14031
+ const items = usable.filter((b2) => b2.type === type).map((b2, index) => ({ b: b2, index })).sort((x2, y2) => (x2.b.sortOrder ?? 0) - (y2.b.sortOrder ?? 0) || x2.index - y2.index).map(({ b: b2 }) => b2);
14032
+ if (items.length === 0) return [];
14033
+ const groupHeading = headings && Object.prototype.hasOwnProperty.call(headings, type) ? headings[type] : DEFAULT_TRUST_BADGE_HEADINGS[type];
14034
+ return [{ type, groupHeading, items }];
14035
+ });
14036
+ if (groups.length === 0) return null;
14037
+ const hasHeading = heading !== void 0 && heading !== null && heading !== "";
14038
+ const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
14039
+ const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14040
+ "div",
14041
+ {
14042
+ "data-slot": "trust-badge-group",
14043
+ "data-type": type,
14044
+ className: (0, import_utils11.cn)("space-y-3", groupClassName),
14045
+ children: [
14046
+ groupHeading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14047
+ Heading,
14048
+ {
14049
+ level: groupHeadingLevel,
14050
+ className: slotClassName(
14051
+ "",
14052
+ "text-sm font-semibold uppercase tracking-widest",
14053
+ headingClassName
14054
+ ),
14055
+ children: groupHeading
14056
+ }
14057
+ ) : null,
14058
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: (0, import_utils11.cn)("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
14059
+ const href = safeHref(badge.url);
14060
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
14061
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BadgeContent, { badge, logoClassName }),
14062
+ " ",
14063
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: newWindowLabel })
14064
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BadgeContent, { badge, logoClassName }) }, badge.id);
14065
+ }) })
14066
+ ]
14067
+ },
14068
+ type
14069
+ ));
14070
+ if (!hasHeading) {
14071
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { "data-slot": "trust-badges", className: (0, import_utils11.cn)("space-y-6", className), children: content });
14072
+ }
14073
+ const Tag = `h${headingLevel}`;
14074
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14075
+ "section",
14076
+ {
14077
+ "data-slot": "trust-badges",
14078
+ "aria-labelledby": headingId,
14079
+ className: (0, import_utils11.cn)("space-y-6", className),
14080
+ children: [
14081
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14082
+ Tag,
14083
+ {
14084
+ id: headingId,
14085
+ className: slotClassName("", "text-xl font-semibold", sectionHeadingClassName),
14086
+ children: heading
14087
+ }
14088
+ ),
14089
+ content
14090
+ ]
14091
+ }
14092
+ );
14093
+ }
14094
+
13938
14095
  // src/components/page-blocks.tsx
13939
- var import_utils13 = require("@reblu/site-ui/utils");
14096
+ var import_utils12 = require("@reblu/site-ui/utils");
13940
14097
  var import_button_variants2 = require("@reblu/site-ui/button-variants");
13941
- var import_jsx_runtime12 = require("react/jsx-runtime");
14098
+ var import_jsx_runtime13 = require("react/jsx-runtime");
13942
14099
  var ALIASES = {
13943
14100
  doctor_embed: "profile_embed",
13944
14101
  specialty_embed: "page_embed"
13945
14102
  };
13946
14103
  function HeroBlock({ block, headingLevel }) {
13947
14104
  const { title, subtitle, imageUrl } = block.data;
13948
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-4", children: [
13949
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
13950
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
13951
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
14105
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-4", children: [
14106
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
14107
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
14108
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
13952
14109
  ] });
13953
14110
  }
13954
14111
  function RichtextBlock({ block, headingLevel }) {
13955
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
14112
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
13956
14113
  }
13957
14114
  function FaqBlock({ block }) {
13958
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FaqAccordion, { items: block.data.items });
14115
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FaqAccordion, { items: block.data.items });
13959
14116
  }
13960
14117
  function StatsBlock({ block }) {
13961
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
13962
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
13963
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
14118
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
14119
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
14120
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
13964
14121
  ] }, i)) });
13965
14122
  }
13966
14123
  function TestimonialBlock({ block }) {
13967
14124
  const { quote, author, role, avatarUrl } = block.data;
13968
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("figure", { className: "space-y-4", children: [
13969
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: quote }) }),
13970
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
14125
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("figure", { className: "space-y-4", children: [
14126
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: quote }) }),
14127
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
13971
14128
  avatarUrl && // eslint-disable-next-line @next/next/no-img-element
13972
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14129
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13973
14130
  "img",
13974
14131
  {
13975
14132
  src: avatarUrl,
@@ -13978,9 +14135,9 @@ function TestimonialBlock({ block }) {
13978
14135
  className: "h-10 w-10 rounded-full object-cover"
13979
14136
  }
13980
14137
  ),
13981
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
13982
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-semibold", children: author }),
13983
- role && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "block text-sm opacity-80", children: role })
14138
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
14139
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "font-semibold", children: author }),
14140
+ role && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "block text-sm opacity-80", children: role })
13984
14141
  ] })
13985
14142
  ] })
13986
14143
  ] });
@@ -13989,19 +14146,19 @@ function CtaSlotBlock(_props) {
13989
14146
  return null;
13990
14147
  }
13991
14148
  function FeatureListBlock({ block }) {
13992
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: item.text }, i)) });
14149
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: item.text }, i)) });
13993
14150
  }
13994
14151
  function GalleryBlock({ block }) {
13995
14152
  const { images } = block.data;
13996
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14153
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
13997
14154
  "div",
13998
14155
  {
13999
- className: (0, import_utils13.cn)(
14156
+ className: (0, import_utils12.cn)(
14000
14157
  "grid gap-4",
14001
14158
  images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
14002
14159
  ),
14003
- children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("figure", { className: "space-y-1", children: [
14004
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14160
+ children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("figure", { className: "space-y-1", children: [
14161
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14005
14162
  "img",
14006
14163
  {
14007
14164
  src: img.url,
@@ -14010,7 +14167,7 @@ function GalleryBlock({ block }) {
14010
14167
  className: "h-full w-full object-cover"
14011
14168
  }
14012
14169
  ) }),
14013
- img.caption && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
14170
+ img.caption && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
14014
14171
  ] }, `${img.url}-${i}`))
14015
14172
  }
14016
14173
  );
@@ -14020,13 +14177,13 @@ function EmbedCard({
14020
14177
  headingLevel,
14021
14178
  embedHref
14022
14179
  }) {
14023
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14180
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
14024
14181
  "a",
14025
14182
  {
14026
14183
  href: embedHref(resolved),
14027
14184
  className: "group block overflow-hidden rounded-xl border border-border bg-card text-card-foreground transition-shadow hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
14028
14185
  children: [
14029
- resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14186
+ resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14030
14187
  "img",
14031
14188
  {
14032
14189
  src: resolved.coverImageUrl,
@@ -14035,24 +14192,24 @@ function EmbedCard({
14035
14192
  className: "h-full w-full object-cover"
14036
14193
  }
14037
14194
  ) }),
14038
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-1 p-4", children: [
14039
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14040
- resolved.role && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14041
- resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
14195
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1 p-4", children: [
14196
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
14197
+ resolved.role && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
14198
+ resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
14042
14199
  ] })
14043
14200
  ]
14044
14201
  }
14045
14202
  );
14046
14203
  }
14047
14204
  function PageEmbedBlock({ block, headingLevel, embedHref }) {
14048
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14205
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14049
14206
  }
14050
14207
  function ProfileEmbedBlock({
14051
14208
  block,
14052
14209
  headingLevel,
14053
14210
  embedHref
14054
14211
  }) {
14055
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14212
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
14056
14213
  }
14057
14214
  var DEFAULT_RENDERERS = {
14058
14215
  hero: HeroBlock,
@@ -14109,14 +14266,14 @@ function toIdFragment(value) {
14109
14266
  function SectionCta2({ cta }) {
14110
14267
  if (!hasUsableCta(cta)) return null;
14111
14268
  const variant = toButtonVariant(cta.variant);
14112
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14269
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14113
14270
  "a",
14114
14271
  {
14115
14272
  href: cta.url,
14116
14273
  "data-slot": "button",
14117
14274
  "data-variant": variant,
14118
14275
  "data-size": "default",
14119
- className: (0, import_utils13.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14276
+ className: (0, import_utils12.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
14120
14277
  ...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
14121
14278
  children: cta.label
14122
14279
  }
@@ -14142,17 +14299,17 @@ function PageBlocks({
14142
14299
  const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
14143
14300
  const background = block.backgroundColor;
14144
14301
  return [
14145
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
14302
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
14146
14303
  "section",
14147
14304
  {
14148
14305
  "data-slot": "page-block",
14149
14306
  "data-block-type": type,
14150
14307
  "aria-labelledby": headingId,
14151
14308
  style: surfaceStyle(background),
14152
- className: (0, import_utils13.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14309
+ className: (0, import_utils12.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
14153
14310
  children: [
14154
- block.heading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { id: headingId, children: block.heading }) }),
14155
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
14311
+ block.heading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { id: headingId, children: block.heading }) }),
14312
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14156
14313
  Renderer,
14157
14314
  {
14158
14315
  block,
@@ -14160,7 +14317,7 @@ function PageBlocks({
14160
14317
  embedHref
14161
14318
  }
14162
14319
  ),
14163
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SectionCta2, { cta: block.cta })
14320
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCta2, { cta: block.cta })
14164
14321
  ]
14165
14322
  },
14166
14323
  block.id
@@ -14168,12 +14325,12 @@ function PageBlocks({
14168
14325
  ];
14169
14326
  });
14170
14327
  if (sections.length === 0) return null;
14171
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: (0, import_utils13.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14328
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: (0, import_utils12.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
14172
14329
  }
14173
14330
 
14174
14331
  // src/components/shop-filters.tsx
14175
- var import_utils14 = require("@reblu/site-ui/utils");
14176
- var import_jsx_runtime13 = require("react/jsx-runtime");
14332
+ var import_utils13 = require("@reblu/site-ui/utils");
14333
+ var import_jsx_runtime14 = require("react/jsx-runtime");
14177
14334
  var DEFAULT_SHOP_PRICE_BANDS = [
14178
14335
  { max: 2500 },
14179
14336
  { min: 2500, max: 5e3 },
@@ -14217,7 +14374,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
14217
14374
  return "";
14218
14375
  }
14219
14376
  function OptionLink({ href, active, label, onActivate }) {
14220
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14377
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14221
14378
  "a",
14222
14379
  {
14223
14380
  href,
@@ -14226,7 +14383,7 @@ function OptionLink({ href, active, label, onActivate }) {
14226
14383
  event.preventDefault();
14227
14384
  onActivate();
14228
14385
  } : void 0,
14229
- className: (0, import_utils14.cn)(
14386
+ className: (0, import_utils13.cn)(
14230
14387
  "inline-flex items-center rounded-full border px-3 py-1 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
14231
14388
  active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
14232
14389
  ),
@@ -14235,9 +14392,9 @@ function OptionLink({ href, active, label, onActivate }) {
14235
14392
  );
14236
14393
  }
14237
14394
  function FilterFieldset({ legend, children: children2 }) {
14238
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("fieldset", { className: "space-y-2", children: [
14239
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14240
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
14395
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("fieldset", { className: "space-y-2", children: [
14396
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
14397
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
14241
14398
  ] });
14242
14399
  }
14243
14400
  function ShopFilters({
@@ -14260,11 +14417,11 @@ function ShopFilters({
14260
14417
  if (!shouldRenderShopFilters(facets, active)) {
14261
14418
  return null;
14262
14419
  }
14263
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_utils14.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14420
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_utils13.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
14264
14421
  visibleTaxonomies.map((axis) => {
14265
14422
  const activeSlug = active.taxonomy?.[axis.key];
14266
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(FilterFieldset, { legend: axis.label, children: [
14267
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14423
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FilterFieldset, { legend: axis.label, children: [
14424
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14268
14425
  OptionLink,
14269
14426
  {
14270
14427
  href: hrefs.taxonomy(axis.key, void 0),
@@ -14279,7 +14436,7 @@ function ShopFilters({
14279
14436
  ),
14280
14437
  axis.terms.map((term) => {
14281
14438
  const isActive = activeSlug === term.slug;
14282
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14439
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14283
14440
  OptionLink,
14284
14441
  {
14285
14442
  href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
@@ -14299,9 +14456,9 @@ function ShopFilters({
14299
14456
  }),
14300
14457
  visibleAttributes.map((attr) => {
14301
14458
  const activeValues = toValueArray(active.attr?.[attr.key]);
14302
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14459
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
14303
14460
  const isActive = activeValues.includes(opt.value);
14304
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14461
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14305
14462
  OptionLink,
14306
14463
  {
14307
14464
  href: hrefs.attr(attr.key, opt.value),
@@ -14319,11 +14476,11 @@ function ShopFilters({
14319
14476
  );
14320
14477
  }) }, attr.key);
14321
14478
  }),
14322
- showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14479
+ showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
14323
14480
  const isActive = active.priceMin === band.min && active.priceMax === band.max;
14324
14481
  const nextMin = isActive ? void 0 : band.min;
14325
14482
  const nextMax = isActive ? void 0 : band.max;
14326
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14483
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14327
14484
  OptionLink,
14328
14485
  {
14329
14486
  href: hrefs.price(nextMin, nextMax),
@@ -14334,7 +14491,7 @@ function ShopFilters({
14334
14491
  i
14335
14492
  );
14336
14493
  }) }),
14337
- hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14494
+ hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14338
14495
  OptionLink,
14339
14496
  {
14340
14497
  href: hrefs.onSale(!active.onSale),
@@ -14343,7 +14500,7 @@ function ShopFilters({
14343
14500
  onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
14344
14501
  }
14345
14502
  ),
14346
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
14503
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14347
14504
  "a",
14348
14505
  {
14349
14506
  href: hrefs.clearAll(),
@@ -14359,8 +14516,8 @@ function ShopFilters({
14359
14516
  }
14360
14517
 
14361
14518
  // src/components/cart-line-list.tsx
14362
- var import_utils15 = require("@reblu/site-ui/utils");
14363
- var import_jsx_runtime14 = require("react/jsx-runtime");
14519
+ var import_utils14 = require("@reblu/site-ui/utils");
14520
+ var import_jsx_runtime15 = require("react/jsx-runtime");
14364
14521
  var DEFAULT_LABELS2 = {
14365
14522
  quantityLabel: "Cantidad",
14366
14523
  decrease: "Reducir cantidad",
@@ -14386,9 +14543,9 @@ function CartLineList({
14386
14543
  }) {
14387
14544
  const t = { ...DEFAULT_LABELS2, ...labels };
14388
14545
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14389
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_utils15.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
14390
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14391
- noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14546
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_utils14.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
14547
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
14548
+ noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14392
14549
  "div",
14393
14550
  {
14394
14551
  role: "status",
@@ -14397,33 +14554,33 @@ function CartLineList({
14397
14554
  children: noticeContent
14398
14555
  }
14399
14556
  ),
14400
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14557
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
14401
14558
  const maxQty = item.maxStock ?? Infinity;
14402
14559
  const atMax = item.quantity >= maxQty;
14403
14560
  const atMin = item.quantity <= 1;
14404
14561
  const message = lineMessage?.(item);
14405
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
14562
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14406
14563
  "li",
14407
14564
  {
14408
14565
  className: "flex gap-4 rounded-xl border border-border bg-card p-4",
14409
14566
  children: [
14410
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14411
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
14412
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14413
- item.variantName && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14414
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14567
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
14568
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
14569
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
14570
+ item.variantName && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
14571
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
14415
14572
  formatPrice(item.unitPrice, currencyCode, locale),
14416
14573
  " ",
14417
14574
  t.unitPriceSuffix
14418
14575
  ] }),
14419
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
14576
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14420
14577
  "div",
14421
14578
  {
14422
14579
  role: "group",
14423
14580
  "aria-label": t.quantityLabel,
14424
14581
  className: "mt-3 flex items-center gap-3",
14425
14582
  children: [
14426
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14583
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14427
14584
  "button",
14428
14585
  {
14429
14586
  type: "button",
@@ -14434,8 +14591,8 @@ function CartLineList({
14434
14591
  children: "\u2212"
14435
14592
  }
14436
14593
  ),
14437
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
14438
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14594
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
14595
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14439
14596
  "button",
14440
14597
  {
14441
14598
  type: "button",
@@ -14446,7 +14603,7 @@ function CartLineList({
14446
14603
  children: "+"
14447
14604
  }
14448
14605
  ),
14449
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14606
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14450
14607
  "button",
14451
14608
  {
14452
14609
  type: "button",
@@ -14459,7 +14616,7 @@ function CartLineList({
14459
14616
  ]
14460
14617
  }
14461
14618
  ),
14462
- message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
14619
+ message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14463
14620
  "p",
14464
14621
  {
14465
14622
  className: "mt-2 text-sm text-destructive",
@@ -14468,7 +14625,7 @@ function CartLineList({
14468
14625
  }
14469
14626
  )
14470
14627
  ] }),
14471
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
14628
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
14472
14629
  ]
14473
14630
  },
14474
14631
  lineKey(item.productId, item.variantId)
@@ -14478,8 +14635,8 @@ function CartLineList({
14478
14635
  }
14479
14636
 
14480
14637
  // src/components/cart-summary.tsx
14481
- var import_utils16 = require("@reblu/site-ui/utils");
14482
- var import_jsx_runtime15 = require("react/jsx-runtime");
14638
+ var import_utils15 = require("@reblu/site-ui/utils");
14639
+ var import_jsx_runtime16 = require("react/jsx-runtime");
14483
14640
  var DEFAULT_LABELS3 = {
14484
14641
  subtotal: "Subtotal",
14485
14642
  discountPrefix: "Descuento",
@@ -14506,40 +14663,40 @@ function CartSummary({
14506
14663
  const hasDiscount = Boolean(discount && discount > 0);
14507
14664
  const noticeContent = notice === true ? t.cancelledNotice : notice;
14508
14665
  const hasNotice = noticeContent != null && noticeContent !== false;
14509
- const breakdown = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
14666
+ const breakdown = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
14510
14667
  "dl",
14511
14668
  {
14512
- className: (0, import_utils16.cn)("space-y-2 text-sm", !hasNotice && className),
14669
+ className: (0, import_utils15.cn)("space-y-2 text-sm", !hasNotice && className),
14513
14670
  "data-slot": "cart-summary",
14514
14671
  children: [
14515
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14516
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t.subtotal }),
14517
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
14672
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14673
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dt", { children: t.subtotal }),
14674
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
14518
14675
  ] }),
14519
- hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14520
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dt", { children: [
14676
+ hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
14677
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("dt", { children: [
14521
14678
  t.discountPrefix,
14522
14679
  discountCode ? ` (${discountCode})` : ""
14523
14680
  ] }),
14524
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
14681
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("dd", { children: [
14525
14682
  "-",
14526
14683
  formatPrice(discount, currencyCode, locale)
14527
14684
  ] })
14528
14685
  ] }),
14529
- shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14530
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t.shipping }),
14531
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
14686
+ shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
14687
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dt", { children: t.shipping }),
14688
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
14532
14689
  ] }),
14533
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14534
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t.total }),
14535
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
14690
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
14691
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dt", { children: t.total }),
14692
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
14536
14693
  ] })
14537
14694
  ]
14538
14695
  }
14539
14696
  );
14540
14697
  if (!hasNotice) return breakdown;
14541
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_utils16.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14542
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
14698
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: (0, import_utils15.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
14699
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14543
14700
  "div",
14544
14701
  {
14545
14702
  role: "status",
@@ -14553,8 +14710,8 @@ function CartSummary({
14553
14710
  }
14554
14711
 
14555
14712
  // src/components/cart-adjustments-notice.tsx
14556
- var import_utils17 = require("@reblu/site-ui/utils");
14557
- var import_jsx_runtime16 = require("react/jsx-runtime");
14713
+ var import_utils16 = require("@reblu/site-ui/utils");
14714
+ var import_jsx_runtime17 = require("react/jsx-runtime");
14558
14715
  var DEFAULT_LABELS4 = {
14559
14716
  removed: (names) => names.length === 1 ? `Hemos quitado del carrito: ${names[0]}, ya no est\xE1 disponible.` : `Hemos quitado del carrito: ${names.join(", ")}, ya no est\xE1n disponibles.`,
14560
14717
  quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
@@ -14588,20 +14745,20 @@ function CartAdjustmentsNotice({
14588
14745
  );
14589
14746
  }
14590
14747
  if (messages.length === 0) return null;
14591
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
14748
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
14592
14749
  "div",
14593
14750
  {
14594
14751
  role: "status",
14595
- className: (0, import_utils17.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
14752
+ className: (0, import_utils16.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
14596
14753
  "data-slot": "cart-adjustments-notice",
14597
- children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: message }, index)) })
14754
+ children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: message }, index)) })
14598
14755
  }
14599
14756
  );
14600
14757
  }
14601
14758
 
14602
14759
  // src/components/added-to-cart-toast.tsx
14603
- var import_utils18 = require("@reblu/site-ui/utils");
14604
- var import_jsx_runtime17 = (
14760
+ var import_utils17 = require("@reblu/site-ui/utils");
14761
+ var import_jsx_runtime18 = (
14605
14762
  // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
14606
14763
  require("react/jsx-runtime")
14607
14764
  );
@@ -14624,32 +14781,32 @@ function AddedToCartToast({
14624
14781
  const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
14625
14782
  const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
14626
14783
  const variant = status === "success" ? "success" : "error";
14627
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
14784
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14628
14785
  "div",
14629
14786
  {
14630
14787
  "data-slot": "added-to-cart-toast",
14631
14788
  "data-variant": variant,
14632
- className: (0, import_utils18.cn)(
14789
+ className: (0, import_utils17.cn)(
14633
14790
  "flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
14634
14791
  variant === "success" && "border-green-600/30 dark:border-green-400/30",
14635
14792
  variant === "error" && "border-destructive/30",
14636
14793
  className
14637
14794
  ),
14638
14795
  children: [
14639
- hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
14640
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0 flex-1", children: [
14641
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
14642
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
14796
+ hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
14797
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "min-w-0 flex-1", children: [
14798
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
14799
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
14643
14800
  ] }),
14644
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
14801
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
14645
14802
  ]
14646
14803
  }
14647
14804
  );
14648
14805
  }
14649
14806
 
14650
14807
  // src/components/checkout-login-prompt.tsx
14651
- var import_utils19 = require("@reblu/site-ui/utils");
14652
- var import_jsx_runtime18 = require("react/jsx-runtime");
14808
+ var import_utils18 = require("@reblu/site-ui/utils");
14809
+ var import_jsx_runtime19 = require("react/jsx-runtime");
14653
14810
  var DEFAULT_LABELS6 = {
14654
14811
  title: "Identificaci\xF3n",
14655
14812
  description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
@@ -14676,26 +14833,26 @@ function CheckoutLoginPrompt({
14676
14833
  if (!open) return null;
14677
14834
  const t = { ...DEFAULT_LABELS6, ...labels };
14678
14835
  const isValidEmail = EMAIL_PATTERN.test(email.trim());
14679
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
14680
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
14681
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
14836
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
14837
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
14838
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14682
14839
  "div",
14683
14840
  {
14684
14841
  role: "dialog",
14685
14842
  "aria-modal": "true",
14686
14843
  "aria-labelledby": "checkout-login-prompt-title",
14687
14844
  "data-slot": "checkout-login-prompt",
14688
- className: (0, import_utils19.cn)(
14845
+ className: (0, import_utils18.cn)(
14689
14846
  "fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 space-y-5 rounded-2xl border border-border bg-background p-6 shadow-2xl",
14690
14847
  className
14691
14848
  ),
14692
14849
  children: [
14693
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
14694
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
14695
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
14696
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
14850
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
14851
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
14852
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
14853
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
14697
14854
  ] }),
14698
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14855
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14699
14856
  "button",
14700
14857
  {
14701
14858
  type: "button",
@@ -14706,9 +14863,9 @@ function CheckoutLoginPrompt({
14706
14863
  }
14707
14864
  )
14708
14865
  ] }),
14709
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-2", children: [
14710
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
14711
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14866
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-2", children: [
14867
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
14868
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14712
14869
  "input",
14713
14870
  {
14714
14871
  id: "checkout-login-prompt-email",
@@ -14717,29 +14874,29 @@ function CheckoutLoginPrompt({
14717
14874
  value: email,
14718
14875
  onChange: (e) => onEmailChange(e.target.value),
14719
14876
  placeholder: t.emailPlaceholder,
14720
- className: (0, import_utils19.cn)(
14877
+ className: (0, import_utils18.cn)(
14721
14878
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14722
14879
  error ? "border-destructive" : "border-border focus:border-primary"
14723
14880
  )
14724
14881
  }
14725
14882
  ),
14726
- error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-destructive", children: error })
14883
+ error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: error })
14727
14884
  ] }),
14728
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-2", children: [
14729
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14885
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-2", children: [
14886
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14730
14887
  "button",
14731
14888
  {
14732
14889
  type: "button",
14733
14890
  onClick: onSubmitEmail,
14734
14891
  disabled: checking || !isValidEmail,
14735
- className: (0, import_utils19.cn)(
14892
+ className: (0, import_utils18.cn)(
14736
14893
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
14737
14894
  checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
14738
14895
  ),
14739
14896
  children: checking ? t.checking : t.continueWithEmail
14740
14897
  }
14741
14898
  ),
14742
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14899
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14743
14900
  "button",
14744
14901
  {
14745
14902
  type: "button",
@@ -14756,9 +14913,9 @@ function CheckoutLoginPrompt({
14756
14913
  }
14757
14914
 
14758
14915
  // src/components/checkout-form.tsx
14759
- var import_utils20 = require("@reblu/site-ui/utils");
14916
+ var import_utils19 = require("@reblu/site-ui/utils");
14760
14917
  var import_phone_input = require("@reblu/site-ui/phone-input");
14761
- var import_jsx_runtime19 = require("react/jsx-runtime");
14918
+ var import_jsx_runtime20 = require("react/jsx-runtime");
14762
14919
  var DEFAULT_LABELS7 = {
14763
14920
  contactTitle: "Datos de contacto",
14764
14921
  nameLabel: "Nombre completo",
@@ -14812,22 +14969,22 @@ function CheckoutForm({
14812
14969
  event.preventDefault();
14813
14970
  if (discountCode.trim() && !discountApplying) onApplyDiscount();
14814
14971
  }
14815
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
14972
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
14816
14973
  loginPrompt,
14817
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
14974
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
14818
14975
  "form",
14819
14976
  {
14820
14977
  "data-testid": "checkout-form",
14821
14978
  onSubmit,
14822
- className: (0, import_utils20.cn)("space-y-8", className),
14979
+ className: (0, import_utils19.cn)("space-y-8", className),
14823
14980
  "data-slot": "checkout-form",
14824
14981
  children: [
14825
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "space-y-4", children: [
14826
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
14827
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
14828
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-1", children: [
14829
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
14830
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14982
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "space-y-4", children: [
14983
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
14984
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
14985
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
14986
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
14987
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14831
14988
  "input",
14832
14989
  {
14833
14990
  id: "checkout-form-name",
@@ -14836,17 +14993,17 @@ function CheckoutForm({
14836
14993
  value: contact.name,
14837
14994
  onChange: (e) => patchContact({ name: e.target.value }),
14838
14995
  placeholder: t.namePlaceholder,
14839
- className: (0, import_utils20.cn)(
14996
+ className: (0, import_utils19.cn)(
14840
14997
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14841
14998
  contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
14842
14999
  )
14843
15000
  }
14844
15001
  ),
14845
- contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
15002
+ contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
14846
15003
  ] }),
14847
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-1", children: [
14848
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
14849
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15004
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1", children: [
15005
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
15006
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14850
15007
  "input",
14851
15008
  {
14852
15009
  id: "checkout-form-email",
@@ -14855,15 +15012,15 @@ function CheckoutForm({
14855
15012
  value: contact.email,
14856
15013
  onChange: (e) => patchContact({ email: e.target.value }),
14857
15014
  placeholder: t.emailPlaceholder,
14858
- className: (0, import_utils20.cn)(
15015
+ className: (0, import_utils19.cn)(
14859
15016
  "w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
14860
15017
  contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
14861
15018
  )
14862
15019
  }
14863
15020
  ),
14864
- contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
15021
+ contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
14865
15022
  ] }),
14866
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15023
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14867
15024
  import_phone_input.PhoneInput,
14868
15025
  {
14869
15026
  id: "checkout-form-phone",
@@ -14877,15 +15034,15 @@ function CheckoutForm({
14877
15034
  ] })
14878
15035
  ] }),
14879
15036
  children2,
14880
- generalError ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
14881
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("section", { className: "space-y-3", children: [
14882
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
14883
- appliedDiscount ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
14884
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
14885
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
14886
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
15037
+ generalError ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
15038
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "space-y-3", children: [
15039
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
15040
+ appliedDiscount ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
15041
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
15042
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
15043
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
14887
15044
  ] }),
14888
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15045
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14889
15046
  "button",
14890
15047
  {
14891
15048
  type: "button",
@@ -14895,9 +15052,9 @@ function CheckoutForm({
14895
15052
  children: t.removeDiscount
14896
15053
  }
14897
15054
  )
14898
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-2", children: [
14899
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
14900
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15055
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex gap-2", children: [
15056
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
15057
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14901
15058
  "input",
14902
15059
  {
14903
15060
  id: "checkout-form-discount-code",
@@ -14909,7 +15066,7 @@ function CheckoutForm({
14909
15066
  className: "flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm uppercase transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"
14910
15067
  }
14911
15068
  ),
14912
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15069
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14913
15070
  "button",
14914
15071
  {
14915
15072
  type: "button",
@@ -14920,14 +15077,14 @@ function CheckoutForm({
14920
15077
  }
14921
15078
  )
14922
15079
  ] }),
14923
- discountError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-destructive", children: discountError })
15080
+ discountError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-destructive", children: discountError })
14924
15081
  ] }),
14925
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15082
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14926
15083
  "button",
14927
15084
  {
14928
15085
  type: "submit",
14929
15086
  disabled: submitting || submitDisabled,
14930
- className: (0, import_utils20.cn)(
15087
+ className: (0, import_utils19.cn)(
14931
15088
  "flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
14932
15089
  submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
14933
15090
  ),
@@ -14941,11 +15098,11 @@ function CheckoutForm({
14941
15098
  }
14942
15099
 
14943
15100
  // src/components/order-confirmation.tsx
14944
- var import_utils22 = require("@reblu/site-ui/utils");
15101
+ var import_utils21 = require("@reblu/site-ui/utils");
14945
15102
 
14946
15103
  // src/components/order-invoice-link.tsx
14947
- var import_utils21 = require("@reblu/site-ui/utils");
14948
- var import_jsx_runtime20 = require("react/jsx-runtime");
15104
+ var import_utils20 = require("@reblu/site-ui/utils");
15105
+ var import_jsx_runtime21 = require("react/jsx-runtime");
14949
15106
  var DEFAULT_LABELS8 = {
14950
15107
  linkLabel: "Descargar la factura {number}",
14951
15108
  signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
@@ -14953,8 +15110,8 @@ var DEFAULT_LABELS8 = {
14953
15110
  function OrderInvoiceLink({ invoice, labels, className }) {
14954
15111
  if (!invoice) return null;
14955
15112
  const t = { ...DEFAULT_LABELS8, ...labels };
14956
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_utils21.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
14957
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
15113
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils20.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
15114
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
14958
15115
  "a",
14959
15116
  {
14960
15117
  href: invoice.url,
@@ -14962,12 +15119,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
14962
15119
  children: t.linkLabel.replace("{number}", invoice.number)
14963
15120
  }
14964
15121
  ),
14965
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
15122
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
14966
15123
  ] });
14967
15124
  }
14968
15125
 
14969
15126
  // src/components/order-confirmation.tsx
14970
- var import_jsx_runtime21 = require("react/jsx-runtime");
15127
+ var import_jsx_runtime22 = require("react/jsx-runtime");
14971
15128
  var DEFAULT_LABELS9 = {
14972
15129
  pollingTitle: "Confirmando tu pedido\u2026",
14973
15130
  pollingDescription: "Estamos procesando el pago, un momento\u2026",
@@ -15031,43 +15188,43 @@ function OrderConfirmation({
15031
15188
  const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
15032
15189
  const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
15033
15190
  const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
15034
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: (0, import_utils22.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15035
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15036
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15037
- showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "space-y-6", children: [
15038
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15039
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15040
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15191
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_utils21.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
15192
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { className: "text-3xl font-bold", children: title }),
15193
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
15194
+ showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-6", children: [
15195
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15196
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
15197
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15041
15198
  ] }),
15042
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15043
- order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
15199
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
15200
+ order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15044
15201
  "div",
15045
15202
  {
15046
15203
  className: "flex justify-between gap-4 text-sm",
15047
15204
  children: [
15048
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15205
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
15049
15206
  item.product.name,
15050
15207
  item.variant ? ` (${item.variant.name})` : "",
15051
15208
  " x",
15052
15209
  item.quantity
15053
15210
  ] }),
15054
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15211
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
15055
15212
  ]
15056
15213
  },
15057
15214
  idx
15058
15215
  )),
15059
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15060
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: t.totalLabel }),
15061
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15216
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
15217
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: t.totalLabel }),
15218
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
15062
15219
  ] }) })
15063
15220
  ] }),
15064
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15221
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
15065
15222
  t.confirmationEmailPrefix,
15066
15223
  " ",
15067
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15224
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
15068
15225
  "."
15069
15226
  ] }),
15070
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15227
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15071
15228
  OrderInvoiceLink,
15072
15229
  {
15073
15230
  invoice: order.invoice,
@@ -15075,11 +15232,11 @@ function OrderConfirmation({
15075
15232
  }
15076
15233
  )
15077
15234
  ] }),
15078
- showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15079
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15080
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15235
+ showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15236
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
15237
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
15081
15238
  ] }),
15082
- status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15239
+ status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15083
15240
  "a",
15084
15241
  {
15085
15242
  href: cartHref,
@@ -15087,7 +15244,7 @@ function OrderConfirmation({
15087
15244
  children: t.backToCartLabel
15088
15245
  }
15089
15246
  ),
15090
- showRecheck && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
15247
+ showRecheck && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15091
15248
  "button",
15092
15249
  {
15093
15250
  type: "button",
@@ -15096,16 +15253,16 @@ function OrderConfirmation({
15096
15253
  children: t.recheckLabel
15097
15254
  }
15098
15255
  ),
15099
- showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15100
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15101
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15256
+ showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
15257
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
15258
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
15102
15259
  ] })
15103
15260
  ] });
15104
15261
  }
15105
15262
 
15106
15263
  // src/components/full-invoice-fields.tsx
15107
- var import_utils23 = require("@reblu/site-ui/utils");
15108
- var import_jsx_runtime22 = require("react/jsx-runtime");
15264
+ var import_utils22 = require("@reblu/site-ui/utils");
15265
+ var import_jsx_runtime23 = require("react/jsx-runtime");
15109
15266
  var EMPTY_FULL_INVOICE_VALUE = {
15110
15267
  wantsFullInvoice: false,
15111
15268
  billingIdType: "NIF",
@@ -15222,12 +15379,12 @@ function FullInvoiceFields({
15222
15379
  const showFields = value.wantsFullInvoice || overCap;
15223
15380
  const isSpanishNif = value.billingIdType === "NIF";
15224
15381
  const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
15225
- const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15382
+ const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
15226
15383
  const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
15227
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("section", { className: (0, import_utils23.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15228
- overCap ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15229
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15230
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15384
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("section", { className: (0, import_utils22.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
15385
+ overCap ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15386
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
15387
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15231
15388
  "input",
15232
15389
  {
15233
15390
  type: "checkbox",
@@ -15237,12 +15394,12 @@ function FullInvoiceFields({
15237
15394
  ),
15238
15395
  t.toggle
15239
15396
  ] }),
15240
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15397
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
15241
15398
  ] }),
15242
- showFields && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15243
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15244
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15245
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15399
+ showFields && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
15400
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15401
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
15402
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15246
15403
  "select",
15247
15404
  {
15248
15405
  id: "full-invoice-id-type",
@@ -15251,14 +15408,14 @@ function FullInvoiceFields({
15251
15408
  value: value.billingIdType,
15252
15409
  onChange: (e) => set("billingIdType", e.target.value),
15253
15410
  ...invalid2("billingIdType"),
15254
- children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15411
+ children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
15255
15412
  }
15256
15413
  ),
15257
15414
  error("billingIdType")
15258
15415
  ] }),
15259
- !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15260
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15261
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
15416
+ !isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15417
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
15418
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
15262
15419
  "select",
15263
15420
  {
15264
15421
  id: "full-invoice-id-country",
@@ -15268,16 +15425,16 @@ function FullInvoiceFields({
15268
15425
  onChange: (e) => set("billingIdCountry", e.target.value),
15269
15426
  ...invalid2("billingIdCountry"),
15270
15427
  children: [
15271
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15272
- countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: c.code, children: c.name }, c.code))
15428
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
15429
+ countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: c.code, children: c.name }, c.code))
15273
15430
  ]
15274
15431
  }
15275
15432
  ),
15276
15433
  error("billingIdCountry")
15277
15434
  ] }),
15278
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15279
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15280
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15435
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15436
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
15437
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15281
15438
  "input",
15282
15439
  {
15283
15440
  id: "full-invoice-nif",
@@ -15290,9 +15447,9 @@ function FullInvoiceFields({
15290
15447
  ),
15291
15448
  error("billingNif")
15292
15449
  ] }),
15293
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15294
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15295
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15450
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15451
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
15452
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15296
15453
  "input",
15297
15454
  {
15298
15455
  id: "full-invoice-name",
@@ -15305,9 +15462,9 @@ function FullInvoiceFields({
15305
15462
  ),
15306
15463
  error("billingName")
15307
15464
  ] }),
15308
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
15309
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15310
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15465
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
15466
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
15467
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15311
15468
  "input",
15312
15469
  {
15313
15470
  id: "full-invoice-street",
@@ -15319,9 +15476,9 @@ function FullInvoiceFields({
15319
15476
  }
15320
15477
  )
15321
15478
  ] }),
15322
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15323
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15324
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15479
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15480
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
15481
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15325
15482
  "input",
15326
15483
  {
15327
15484
  id: "full-invoice-postal-code",
@@ -15332,9 +15489,9 @@ function FullInvoiceFields({
15332
15489
  }
15333
15490
  )
15334
15491
  ] }),
15335
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15336
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15337
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15492
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15493
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
15494
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15338
15495
  "input",
15339
15496
  {
15340
15497
  id: "full-invoice-city",
@@ -15345,9 +15502,9 @@ function FullInvoiceFields({
15345
15502
  }
15346
15503
  )
15347
15504
  ] }),
15348
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1", children: [
15349
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15350
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
15505
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1", children: [
15506
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
15507
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
15351
15508
  "select",
15352
15509
  {
15353
15510
  id: "full-invoice-country",
@@ -15355,14 +15512,17 @@ function FullInvoiceFields({
15355
15512
  required: true,
15356
15513
  value: value.country,
15357
15514
  onChange: (e) => set("country", e.target.value),
15358
- children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: c.code, children: c.name }, c.code))
15515
+ children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: c.code, children: c.name }, c.code))
15359
15516
  }
15360
15517
  )
15361
15518
  ] }),
15362
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15519
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "sm:col-span-2", children: error("address") })
15363
15520
  ] })
15364
15521
  ] });
15365
15522
  }
15523
+
15524
+ // src/index.ts
15525
+ var import_site_contracts = require("@reblu/site-contracts");
15366
15526
  // Annotate the CommonJS export names for ESM import in node:
15367
15527
  0 && (module.exports = {
15368
15528
  ALLOWED_YOUTUBE_HOSTS,
@@ -15373,10 +15533,13 @@ function FullInvoiceFields({
15373
15533
  CheckoutForm,
15374
15534
  CheckoutLoginPrompt,
15375
15535
  CourseDescription,
15536
+ DATA_REQUEST_TYPES,
15376
15537
  DEFAULT_INVOICE_COUNTRIES,
15377
15538
  DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
15378
15539
  DEFAULT_SHOP_ERROR_MESSAGES,
15379
15540
  DEFAULT_SHOP_PRICE_BANDS,
15541
+ DEFAULT_TRUST_BADGE_HEADINGS,
15542
+ DEFAULT_TRUST_BADGE_TYPE_ORDER,
15380
15543
  DEFAULT_TRUST_ICONS,
15381
15544
  EMPTY_FULL_INVOICE_VALUE,
15382
15545
  FaqAccordion,
@@ -15394,6 +15557,7 @@ function FullInvoiceFields({
15394
15557
  ShopFilters,
15395
15558
  Specialty,
15396
15559
  Treatment,
15560
+ TrustBadges,
15397
15561
  buildFaqPageJsonLd,
15398
15562
  buildShareUrls,
15399
15563
  collectFaqItems,