@alfadocs/ui-kit 1.54.0 → 1.54.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- import { jsxs as f, jsx as e, Fragment as I } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as e, Fragment as T } from "react/jsx-runtime";
2
2
  import { forwardRef as le, useId as se, useMemo as ce } from "react";
3
3
  import { c as de } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as pe } from "react-i18next";
5
5
  import { B as P } from "./badge-hnBt8o7n.js";
6
- import { C as T } from "./card-DPmk26CL.js";
6
+ import { C as F } from "./card-DPmk26CL.js";
7
7
  import { K as fe, a as ue } from "./key-value-pair-BkXjt88Z.js";
8
8
  import { L as d } from "./link-2HokYuIi.js";
9
9
  import { b as me } from "./format-price-DAbh61Lz.js";
10
10
  import { u as he } from "./registry-DvAUVLHh.js";
11
- import { S as F } from "./stethoscope-sZXGC43m.js";
12
- import { H as O } from "./heart--qCA4ffe.js";
13
- import { B as H, L as _ } from "./languages-CZqBaPwI.js";
11
+ import { S as O } from "./stethoscope-sZXGC43m.js";
12
+ import { H } from "./heart--qCA4ffe.js";
13
+ import { B as V, L as _ } from "./languages-CZqBaPwI.js";
14
14
  import { S as z } from "./shield-check-DCJALLVh.js";
15
15
  import { G as B } from "./globe-sHBW1JN5.js";
16
16
  import { M as E } from "./mail-BqXVF2zH.js";
@@ -27,7 +27,7 @@ const ge = {
27
27
  type: "string",
28
28
  descriptionKey: "ui.agent.contactProfileCard.state.profession",
29
29
  description: "Profession string the card is currently rendering — undefined when the consumer omitted it.",
30
- read: (n) => n.getProfession()
30
+ read: (o) => o.getProfession()
31
31
  }
32
32
  },
33
33
  actions: {},
@@ -59,23 +59,23 @@ const ge = {
59
59
  defaultVariants: { surface: "elevated" }
60
60
  }
61
61
  );
62
- function Ce(n) {
63
- return n.replace(/[^\d+]/g, "");
62
+ function Ce(o) {
63
+ return o.replace(/[^\d+]/g, "");
64
64
  }
65
- function be(n, r) {
66
- const a = `https://wa.me/${n}`;
65
+ function be(o, r) {
66
+ const a = `https://wa.me/${o}`;
67
67
  return r ? `${a}?text=${encodeURIComponent(r)}` : a;
68
68
  }
69
- function xe(n) {
70
- return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(n.line)}`;
69
+ function xe(o) {
70
+ return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(o.line)}`;
71
71
  }
72
72
  function Pe() {
73
73
  if (typeof document > "u") return "4945a3";
74
- const n = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), r = /^#?([0-9a-fA-F]{6})$/.exec(n);
74
+ const o = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), r = /^#?([0-9a-fA-F]{6})$/.exec(o);
75
75
  return r ? r[1] : "4945a3";
76
76
  }
77
- function ye({ apiKey: n, center: r, zoom: a, altText: s }) {
78
- const c = Pe(), u = `https://maps.googleapis.com/maps/api/staticmap?center=${r.lat},${r.lng}&zoom=${a}&size=640x192&scale=2&markers=color:0x${c}%7C${r.lat},${r.lng}&key=${encodeURIComponent(n)}`;
77
+ function ye({ apiKey: o, center: r, zoom: a, altText: s }) {
78
+ const c = Pe(), u = `https://maps.googleapis.com/maps/api/staticmap?center=${r.lat},${r.lng}&zoom=${a}&size=640x192&scale=2&markers=color:0x${c}%7C${r.lat},${r.lng}&key=${encodeURIComponent(o)}`;
79
79
  return /* @__PURE__ */ e(
80
80
  "img",
81
81
  {
@@ -91,7 +91,7 @@ function ye({ apiKey: n, center: r, zoom: a, altText: s }) {
91
91
  }
92
92
  const ke = le(
93
93
  ({
94
- heading: n,
94
+ heading: o,
95
95
  description: r,
96
96
  address: a,
97
97
  phone: s,
@@ -121,7 +121,7 @@ const ke = le(
121
121
  className: ee,
122
122
  ...ae
123
123
  }, te) => {
124
- const { t, i18n: M } = pe("ui"), $ = se(), A = M.language ?? "en", N = n ?? t("contactProfileCard.heading"), re = Z ?? N, R = ce(() => {
124
+ const { t, i18n: M } = pe("ui"), $ = se(), A = M.language ?? "en", N = o ?? t("contactProfileCard.heading"), re = Z ?? N, R = ce(() => {
125
125
  if (C != null)
126
126
  return me(
127
127
  C,
@@ -129,8 +129,8 @@ const ke = le(
129
129
  A,
130
130
  t("common.freeOfCharge")
131
131
  );
132
- }, [C, y, A, t]), o = [];
133
- if (a && o.push({
132
+ }, [C, y, A, t]), n = [];
133
+ if (a && n.push({
134
134
  key: "address",
135
135
  icon: /* @__PURE__ */ e(G, { "aria-hidden": "true" }),
136
136
  label: t("contactProfileCard.label.address"),
@@ -147,7 +147,7 @@ const ke = le(
147
147
  }
148
148
  ) : null
149
149
  ] })
150
- }), s && o.push({
150
+ }), s && n.push({
151
151
  key: "phone",
152
152
  icon: /* @__PURE__ */ e(U, { "aria-hidden": "true" }),
153
153
  label: t("contactProfileCard.label.phone"),
@@ -160,7 +160,7 @@ const ke = le(
160
160
  children: s
161
161
  }
162
162
  )
163
- }), c && o.push({
163
+ }), c && n.push({
164
164
  key: "whatsapp",
165
165
  icon: /* @__PURE__ */ e(K, { "aria-hidden": "true" }),
166
166
  label: t("contactProfileCard.label.whatsapp"),
@@ -174,7 +174,7 @@ const ke = le(
174
174
  children: c
175
175
  }
176
176
  )
177
- }), m && o.push({
177
+ }), m && n.push({
178
178
  key: "email",
179
179
  icon: /* @__PURE__ */ e(E, { "aria-hidden": "true" }),
180
180
  label: t("contactProfileCard.label.email"),
@@ -187,7 +187,7 @@ const ke = le(
187
187
  children: m
188
188
  }
189
189
  )
190
- }), h && o.push({
190
+ }), h && n.push({
191
191
  key: "website",
192
192
  icon: /* @__PURE__ */ e(B, { "aria-hidden": "true" }),
193
193
  label: t("contactProfileCard.label.website"),
@@ -195,35 +195,34 @@ const ke = le(
195
195
  }), g && g.length > 0) {
196
196
  const i = (l) => {
197
197
  if (p != null && p[l]) return p[l];
198
- const V = `languages.${l}`;
199
- return M.exists(V) ? t(V) : l.toUpperCase();
198
+ const I = `languages.${l}`;
199
+ return M.exists(I) ? t(I) : l.toUpperCase();
200
200
  };
201
- o.push({
201
+ n.push({
202
202
  key: "languages",
203
203
  icon: /* @__PURE__ */ e(_, { "aria-hidden": "true" }),
204
204
  label: t("contactProfileCard.label.languages"),
205
205
  value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: g.map((l) => /* @__PURE__ */ e(P, { variant: "neutral", children: i(l) }, l)) })
206
206
  });
207
207
  }
208
- v && v.length > 0 && o.push({
208
+ v && v.length > 0 && n.push({
209
209
  key: "insurances",
210
210
  icon: /* @__PURE__ */ e(z, { "aria-hidden": "true" }),
211
211
  label: t("contactProfileCard.label.insurances"),
212
212
  value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: v.map((i) => /* @__PURE__ */ e(P, { variant: "info", children: i }, i)) })
213
- }), R && o.push({
213
+ }), R && n.push({
214
214
  key: "firstVisitPrice",
215
- icon: /* @__PURE__ */ e(H, { "aria-hidden": "true" }),
215
+ icon: /* @__PURE__ */ e(V, { "aria-hidden": "true" }),
216
216
  label: t("contactProfileCard.label.firstVisitPrice"),
217
- value: /* @__PURE__ */ e(P, { variant: "accentSoft", size: "lg", children: R }),
218
- alignValue: "end"
219
- }), L && o.push({
217
+ value: /* @__PURE__ */ e(P, { variant: "accentSoft", size: "lg", children: R })
218
+ }), L && n.push({
220
219
  key: "expertForAnxiousPatients",
221
- icon: /* @__PURE__ */ e(O, { "aria-hidden": "true" }),
220
+ icon: /* @__PURE__ */ e(H, { "aria-hidden": "true" }),
222
221
  label: t("contactProfileCard.label.expertForAnxiousPatients"),
223
222
  value: t("contactProfileCard.value.yesShort")
224
- }), b && o.push({
223
+ }), b && n.push({
225
224
  key: "profession",
226
- icon: /* @__PURE__ */ e(F, { "aria-hidden": "true" }),
225
+ icon: /* @__PURE__ */ e(O, { "aria-hidden": "true" }),
227
226
  label: t("contactProfileCard.label.profession"),
228
227
  value: b
229
228
  }), he(
@@ -231,7 +230,7 @@ const ke = le(
231
230
  { getProfession: () => b },
232
231
  x
233
232
  );
234
- const ne = !!k && (a == null ? void 0 : a.lat) !== void 0 && (a == null ? void 0 : a.lng) !== void 0 ? /* @__PURE__ */ e(
233
+ const oe = !!k && (a == null ? void 0 : a.lat) !== void 0 && (a == null ? void 0 : a.lng) !== void 0 ? /* @__PURE__ */ e(
235
234
  ye,
236
235
  {
237
236
  apiKey: k,
@@ -242,21 +241,20 @@ const ke = le(
242
241
  defaultValue: "Map showing {{address}}"
243
242
  })
244
243
  }
245
- ) : null, oe = X ?? ne, ie = /* @__PURE__ */ f(I, { children: [
244
+ ) : null, ne = X ?? oe, ie = /* @__PURE__ */ f(T, { children: [
246
245
  r ? /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-line", children: r }) : null,
247
- o.length > 0 ? /* @__PURE__ */ e(fe, { rowGap: "md", children: o.map((i) => /* @__PURE__ */ e(
246
+ n.length > 0 ? /* @__PURE__ */ e(fe, { rowGap: "md", children: n.map((i) => /* @__PURE__ */ e(
248
247
  ue,
249
248
  {
250
249
  icon: i.icon,
251
250
  label: i.label,
252
- value: i.value,
253
- alignValue: i.alignValue
251
+ value: i.value
254
252
  },
255
253
  i.key
256
254
  )) }) : null,
257
- oe,
255
+ ne,
258
256
  Q
259
- ] }), S = /* @__PURE__ */ f(I, { children: [
257
+ ] }), S = /* @__PURE__ */ f(T, { children: [
260
258
  /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
261
259
  J,
262
260
  /* @__PURE__ */ e(
@@ -282,7 +280,7 @@ const ke = le(
282
280
  id: x,
283
281
  className: ve({ surface: w, className: ee }),
284
282
  ...ae,
285
- children: w === "elevated" ? /* @__PURE__ */ e(T, { variant: "elevated", children: /* @__PURE__ */ e(T.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: S }) }) : /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: S })
283
+ children: w === "elevated" ? /* @__PURE__ */ e(F, { variant: "elevated", children: /* @__PURE__ */ e(F.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: S }) }) : /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: S })
286
284
  }
287
285
  );
288
286
  }
@@ -307,9 +305,9 @@ const Le = [
307
305
  website: B,
308
306
  languages: _,
309
307
  insurances: z,
310
- firstVisitPrice: H,
311
- expertForAnxiousPatients: O,
312
- profession: F
308
+ firstVisitPrice: V,
309
+ expertForAnxiousPatients: H,
310
+ profession: O
313
311
  };
314
312
  export {
315
313
  je as C,
@@ -317,4 +315,4 @@ export {
317
315
  ke as b,
318
316
  ge as c
319
317
  };
320
- //# sourceMappingURL=contact-profile-card-h0QX4_5B.js.map
318
+ //# sourceMappingURL=contact-profile-card-B-HzocbB.js.map
@@ -0,0 +1,312 @@
1
+ import { jsx as r, jsxs as E } from "react/jsx-runtime";
2
+ import { forwardRef as ee, useMemo as re, useState as I, useEffect as T, useRef as z } from "react";
3
+ import { useTranslation as oe } from "react-i18next";
4
+ import { c as ae } from "./index-D2ZczOXr.js";
5
+ import { B as L } from "./button-CYPx2xFq.js";
6
+ import { L as te } from "./logo-CuaqxTGK.js";
7
+ import { i as ne } from "./safe-href-5dbsfbQn.js";
8
+ import { a as se } from "./error-page-illustration-bFti0VEc.js";
9
+ import { loadLocale as ie, LOCALES_WITH_BUNDLES as de } from "../i18n/config.js";
10
+ import { R as ce } from "./rotate-ccw-BBQnIVTr.js";
11
+ import { L as le } from "./log-in-OQUEoGhX.js";
12
+ import { c as M } from "./createLucideIcon-DhHxpK9K.js";
13
+ /**
14
+ * @license lucide-react v1.22.0 - ISC
15
+ *
16
+ * This source code is licensed under the ISC license.
17
+ * See the LICENSE file in the root directory of this source tree.
18
+ */
19
+ const me = [
20
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
21
+ ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
22
+ ["path", { d: "M12 17h.01", key: "p32p05" }]
23
+ ], ue = M("circle-question-mark", me);
24
+ /**
25
+ * @license lucide-react v1.22.0 - ISC
26
+ *
27
+ * This source code is licensed under the ISC license.
28
+ * See the LICENSE file in the root directory of this source tree.
29
+ */
30
+ const ge = [
31
+ ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
32
+ [
33
+ "path",
34
+ {
35
+ d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
36
+ key: "r6nss1"
37
+ }
38
+ ]
39
+ ], pe = M("house", ge), fe = [
40
+ 400,
41
+ 401,
42
+ 403,
43
+ 404,
44
+ 405,
45
+ 410,
46
+ 419,
47
+ 429,
48
+ 500,
49
+ 502,
50
+ 503,
51
+ 504,
52
+ "offline",
53
+ "maintenance"
54
+ ], A = {
55
+ 400: { key: "badRequest", mood: "jumbled", primary: "home" },
56
+ 401: { key: "unauthorised", mood: "locked", primary: "login" },
57
+ 403: { key: "forbidden", mood: "roped", primary: "home" },
58
+ 404: { key: "notFound", mood: "lost", primary: "home" },
59
+ 405: { key: "methodNotAllowed", mood: "wrong-way", primary: "home" },
60
+ 410: { key: "gone", mood: "vanished", primary: "home" },
61
+ 419: { key: "expired", mood: "asleep", primary: "login" },
62
+ 429: { key: "tooManyRequests", mood: "melt", primary: "retry" },
63
+ 500: { key: "serverError", mood: "patched", primary: "retry" },
64
+ 502: { key: "badGateway", mood: "unplugged", primary: "retry" },
65
+ 503: { key: "maintenance", mood: "rebuild", primary: "retry" },
66
+ 504: { key: "timeout", mood: "snail", primary: "retry" },
67
+ offline: { key: "offline", mood: "adrift", primary: "retry" },
68
+ maintenance: { key: "maintenance", mood: "rebuild", primary: "retry" },
69
+ generic: { key: "generic", mood: "puzzled", primary: "home" }
70
+ };
71
+ function ye(e) {
72
+ return fe.includes(e) ? A[e] : A.generic;
73
+ }
74
+ const he = "alfadocs-ui.locale", ve = "it", ke = (e) => {
75
+ if (!e) return;
76
+ const o = e.toLowerCase().replaceAll("_", "-").split("-")[0], a = o === "cn" ? "zh" : o;
77
+ return de.includes(a) ? a : void 0;
78
+ }, be = () => {
79
+ try {
80
+ return window.localStorage.getItem(he);
81
+ } catch {
82
+ return null;
83
+ }
84
+ };
85
+ function xe(e = {}) {
86
+ var f;
87
+ const o = typeof window < "u", a = e.saved !== void 0 ? e.saved : o ? be() : null, d = e.browser ?? (o && typeof navigator < "u" ? (f = navigator.languages) != null && f.length ? navigator.languages : [navigator.language] : []), p = e.document ?? (typeof document < "u" ? document.documentElement.lang : ""), v = [
88
+ e.locale,
89
+ a,
90
+ ...d,
91
+ e.hostLocaleIsDefault ? void 0 : p
92
+ ];
93
+ for (const k of v) {
94
+ const y = ke(k);
95
+ if (y) return y;
96
+ }
97
+ return ve;
98
+ }
99
+ const B = (e, o) => ie(e, o), we = ae(
100
+ "ds:flex ds:flex-col ds:items-center ds:justify-center ds:bg-[var(--background)] ds:text-[var(--foreground)] ds:px-[var(--spacing-md)] ds:py-[var(--spacing-2xl)]",
101
+ {
102
+ variants: {
103
+ layout: {
104
+ /** Fills the viewport: the whole page is the error. */
105
+ page: "ds:min-h-screen",
106
+ /** Fills its container, under the host's own header. */
107
+ embedded: "ds:[min-block-size:100%]"
108
+ },
109
+ surface: {
110
+ /** The page background. */
111
+ background: "",
112
+ /** A card's surface, for a page set inside a `Card`. The mark
113
+ * cuts its holes with `--background`, so that is re-pointed too. */
114
+ card: "ds:[--background:var(--card)] ds:[--foreground:var(--card-foreground)]"
115
+ }
116
+ },
117
+ defaultVariants: { layout: "page", surface: "background" }
118
+ }
119
+ ), Ee = /* @__PURE__ */ new Set(["ar"]), Le = 1500;
120
+ function Ne(e, o) {
121
+ const a = e instanceof Date ? e : new Date(e);
122
+ if (Number.isNaN(a.getTime())) return;
123
+ const d = /* @__PURE__ */ new Date(), p = d.toDateString() === a.toDateString() ? {} : {
124
+ day: "numeric",
125
+ month: "short",
126
+ ...d.getFullYear() === a.getFullYear() ? {} : { year: "numeric" }
127
+ };
128
+ return new Intl.DateTimeFormat(o === "en" ? "en-GB" : o, {
129
+ ...p,
130
+ hour: "2-digit",
131
+ minute: "2-digit"
132
+ }).format(a);
133
+ }
134
+ const D = (e, o) => !!e.getResource(o, "ui", "errorPage"), F = (e) => ne(e) ? e : "#", Se = ee(
135
+ ({
136
+ status: e,
137
+ homeHref: o = "/",
138
+ loginHref: a,
139
+ supportHref: d,
140
+ onRetry: p,
141
+ requestId: v,
142
+ backAt: f,
143
+ locale: k,
144
+ hostLocaleIsDefault: y = !1,
145
+ title: G,
146
+ message: j,
147
+ primaryAction: s,
148
+ mood: O,
149
+ showStatusLabel: $ = !0,
150
+ showLogo: H = !0,
151
+ as: U = "main",
152
+ focusHeading: P = !0,
153
+ headingLevel: V = 1,
154
+ layout: Y,
155
+ surface: q,
156
+ className: K,
157
+ ...Q
158
+ }, W) => {
159
+ const { i18n: g } = oe("ui"), c = re(
160
+ () => xe({ locale: k, hostLocaleIsDefault: y }),
161
+ [k, y]
162
+ ), [n, b] = I(
163
+ () => D(g, c) ? c : null
164
+ ), [, J] = I(0);
165
+ T(() => {
166
+ let t = !0;
167
+ const u = D(g, c);
168
+ b(u ? c : null);
169
+ const w = () => t && J((h) => h + 1);
170
+ B("en", g).then(w).catch(() => {
171
+ });
172
+ const S = u ? void 0 : setTimeout(
173
+ () => t && b((h) => h ?? "en"),
174
+ Le
175
+ );
176
+ return B(c, g).then(() => {
177
+ t && (b(c), w());
178
+ }).catch(() => t && b((h) => h ?? "en")), () => {
179
+ t = !1, clearTimeout(S);
180
+ };
181
+ }, [g, c]);
182
+ const i = g.getFixedT(
183
+ n && n !== "en" ? [n, "en"] : "en",
184
+ "ui"
185
+ ), l = ye(e), R = l.key === "maintenance" && f ? Ne(f, n ?? "en") : void 0, C = z(null), _ = z(null);
186
+ T(() => {
187
+ var u;
188
+ const t = String(e);
189
+ !n || !P || _.current === t || (_.current = t, (u = C.current) == null || u.focus({ preventScroll: !0 }));
190
+ }, [n, P, e]);
191
+ const X = ["h1", "h2", "h3"][V - 1], Z = p ?? (() => window.location.reload()), x = l.primary === "login" && !a ? "retry" : l.primary, N = (t, u, w, S) => /* @__PURE__ */ r(
192
+ L,
193
+ {
194
+ intent: S,
195
+ size: "lg",
196
+ flipIconInRtl: t === "login",
197
+ asChild: !0,
198
+ startIcon: w,
199
+ "data-action": t,
200
+ children: /* @__PURE__ */ r("a", { href: F(u), children: i(`errorPage.actions.${t}`) })
201
+ },
202
+ t
203
+ ), m = [];
204
+ return s ? m.push(
205
+ typeof s.href == "string" ? /* @__PURE__ */ r(
206
+ L,
207
+ {
208
+ intent: "primary",
209
+ size: "lg",
210
+ asChild: !0,
211
+ startIcon: s.icon,
212
+ "data-action": "custom",
213
+ children: /* @__PURE__ */ r("a", { href: F(s.href), children: s.label })
214
+ },
215
+ "custom"
216
+ ) : /* @__PURE__ */ r(
217
+ L,
218
+ {
219
+ intent: "primary",
220
+ size: "lg",
221
+ startIcon: s.icon,
222
+ onClick: s.onClick,
223
+ "data-action": "custom",
224
+ children: s.label
225
+ },
226
+ "custom"
227
+ )
228
+ ) : x === "retry" ? m.push(
229
+ /* @__PURE__ */ r(
230
+ L,
231
+ {
232
+ intent: "primary",
233
+ size: "lg",
234
+ startIcon: /* @__PURE__ */ r(ce, { "aria-hidden": "true" }),
235
+ onClick: Z,
236
+ "data-action": "retry",
237
+ children: i("errorPage.actions.retry")
238
+ },
239
+ "retry"
240
+ )
241
+ ) : x === "login" && a && m.push(
242
+ N("login", a, /* @__PURE__ */ r(le, { "aria-hidden": "true" }), "primary")
243
+ ), e !== "offline" && l.key !== "maintenance" && !(s && x === "home") && m.push(
244
+ N(
245
+ "home",
246
+ o,
247
+ /* @__PURE__ */ r(pe, { "aria-hidden": "true" }),
248
+ x === "home" ? "primary" : "secondary"
249
+ )
250
+ ), d && m.push(
251
+ N(
252
+ "support",
253
+ d,
254
+ /* @__PURE__ */ r(ue, { "aria-hidden": "true" }),
255
+ "ghost"
256
+ )
257
+ ), /* @__PURE__ */ r(
258
+ U,
259
+ {
260
+ ref: W,
261
+ "data-component": "error-page",
262
+ "data-status": String(e),
263
+ lang: n ?? void 0,
264
+ "aria-busy": n ? void 0 : !0,
265
+ dir: n && Ee.has(n) ? "rtl" : "ltr",
266
+ className: we({ layout: Y, surface: q, className: K }),
267
+ ...Q,
268
+ children: /* @__PURE__ */ E(
269
+ "div",
270
+ {
271
+ className: n ? "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center ds:[max-inline-size:32rem]" : "ds:invisible",
272
+ children: [
273
+ /* @__PURE__ */ r(se, { mood: O ?? l.mood }),
274
+ /* @__PURE__ */ E("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
275
+ /* @__PURE__ */ E(
276
+ X,
277
+ {
278
+ ref: C,
279
+ tabIndex: -1,
280
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:outline-none",
281
+ children: [
282
+ $ && typeof e == "number" && /* @__PURE__ */ r("span", { className: "type-label ds:text-[var(--muted-foreground)]", children: i("errorPage.statusLabel", { status: e }) }),
283
+ /* @__PURE__ */ r("span", { className: "type-title-page", children: G ?? i(`errorPage.status.${l.key}.title`) })
284
+ ]
285
+ }
286
+ ),
287
+ /* @__PURE__ */ r("p", { className: "type-body ds:text-[var(--muted-foreground)]", children: j ?? i(`errorPage.status.${l.key}.message`) }),
288
+ R && /* @__PURE__ */ r("p", { className: "type-body ds:font-semibold", children: i("errorPage.backAt", { time: R }) })
289
+ ] }),
290
+ m.length > 0 && /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)]", children: m }),
291
+ v && /* @__PURE__ */ E("p", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: [
292
+ i("errorPage.reference", { id: v }),
293
+ /* @__PURE__ */ r("br", {}),
294
+ i("errorPage.referenceHint")
295
+ ] }),
296
+ H && /* @__PURE__ */ r(te, { decorative: !0, size: "sm", className: "ds:opacity-70" })
297
+ ]
298
+ }
299
+ )
300
+ }
301
+ );
302
+ }
303
+ );
304
+ Se.displayName = "ErrorPage";
305
+ export {
306
+ ve as E,
307
+ fe as a,
308
+ Se as b,
309
+ ye as e,
310
+ xe as r
311
+ };
312
+ //# sourceMappingURL=error-page-C15GfNEj.js.map