@alfadocs/ui-kit-debug 1.125.2 → 1.125.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- import { jsx as m, jsxs as N, Fragment as ht } from "react/jsx-runtime";
2
- import { forwardRef as gt, useRef as k, useMemo as R, useId as Oe, useState as C, useEffect as $, useCallback as D, useImperativeHandle as vt, useContext as je, useLayoutEffect as ce, createContext as bt } from "react";
1
+ import { jsx as m, jsxs as R, Fragment as ft } from "react/jsx-runtime";
2
+ import { forwardRef as ht, useRef as k, useMemo as P, useId as Oe, useState as C, useEffect as $, useCallback as D, useImperativeHandle as gt, useContext as je, useLayoutEffect as ce, createContext as vt } from "react";
3
3
  import { createPortal as Ge } from "react-dom";
4
4
  import { c as Y } from "./index-D2ZczOXr.js";
5
5
  import { useTranslation as B } from "react-i18next";
6
- import { M as wt, A as yt, a as kt, b as Mt, u as De, c as W, d as Ze, e as Fe } from "./maps-core-gate-DKx96CC_.js";
6
+ import { M as bt, A as wt, a as yt, b as kt, u as De, c as W, d as Ze, e as Fe } from "./maps-core-gate-DKx96CC_.js";
7
7
  import { B as Ue } from "./button-DohK_Ak_.js";
8
- import { S as xt } from "./skeleton-tTWJpvAq.js";
8
+ import { S as Mt } from "./skeleton-tTWJpvAq.js";
9
9
  import { V as We } from "./visually-hidden-BHxEUGyT.js";
10
- import { E as zt } from "./error-boundary-tAn_GuCu.js";
10
+ import { E as xt } from "./error-boundary-tAn_GuCu.js";
11
11
  import { u as Et } from "./registry-DvAUVLHh.js";
12
- import { l as ge } from "./length-token-DwMnGEYT.js";
12
+ import { l as he } from "./length-token-DwMnGEYT.js";
13
13
  import { M as _t } from "./map-pin-BaY37-Km.js";
14
- import { E as Be } from "./external-link-CY6zAXXU.js";
14
+ import { E as zt } from "./external-link-CY6zAXXU.js";
15
15
  const St = {
16
16
  id: "map-view",
17
17
  // pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
@@ -154,7 +154,7 @@ const St = {
154
154
  description: "Sourced from the id prop."
155
155
  }
156
156
  }
157
- }, X = 32, J = 40, ie = "M16 38C16 38 2 26 2 16A14 14 0 0 1 30 16C30 26 16 38 16 38Z", Ke = 2, He = 4, qe = "translate(8.25 8.25) scale(0.10473)", Xe = [
157
+ }, X = 32, J = 40, ie = "M16 38C16 38 2 26 2 16A14 14 0 0 1 30 16C30 26 16 38 16 38Z", Be = 2, Ke = 4, He = "translate(8.25 8.25) scale(0.10473)", qe = [
158
158
  {
159
159
  tag: "rect",
160
160
  attrs: {
@@ -202,12 +202,12 @@ function It(e, t, n, r = {
202
202
  width: X,
203
203
  height: J
204
204
  }) {
205
- const o = Xe.map(
205
+ const o = qe.map(
206
206
  ({ tag: s, attrs: i }) => `<${s} ${$t(i)}/>`
207
207
  ).join("");
208
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${r.width}" height="${r.height}" viewBox="0 0 ${X} ${J}"><path d="${ie}" fill="none" stroke="${n}" stroke-width="${He}" stroke-linejoin="round"/><path d="${ie}" fill="${e}" stroke="${t}" stroke-width="${Ke}" stroke-linejoin="round"/><g fill="${t}" transform="${qe}">${o}</g></svg>`;
208
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${r.width}" height="${r.height}" viewBox="0 0 ${X} ${J}"><path d="${ie}" fill="none" stroke="${n}" stroke-width="${Ke}" stroke-linejoin="round"/><path d="${ie}" fill="${e}" stroke="${t}" stroke-width="${Be}" stroke-linejoin="round"/><g fill="${t}" transform="${He}">${o}</g></svg>`;
209
209
  }
210
- const Je = 1.4, Ct = [
210
+ const Xe = 1.4, Ct = [
211
211
  "ds:[gmp-advanced-marker:focus-visible_&]:outline-[length:var(--focus-ring-width)]",
212
212
  "ds:[gmp-advanced-marker:focus-visible_&]:outline-solid",
213
213
  "ds:[gmp-advanced-marker:focus-visible_&]:outline-[color:var(--map-marker-hover-color)]",
@@ -215,13 +215,13 @@ const Je = 1.4, Ct = [
215
215
  "ds:[gmp-advanced-marker:focus-visible_&]:forced-colors:outline-[CanvasText]"
216
216
  ].join(" ");
217
217
  function Lt({ hovered: e }) {
218
- const t = e ? Je : 1, n = e ? "ds:fill-[var(--map-marker-selected-color)]" : "ds:fill-[var(--map-marker-color)]";
218
+ const t = e ? Xe : 1, n = e ? "ds:fill-[var(--map-marker-selected-color)]" : "ds:fill-[var(--map-marker-color)]";
219
219
  return /* @__PURE__ */ m(
220
220
  "span",
221
221
  {
222
222
  "data-component": "map-view-pin",
223
223
  className: "ds:flex ds:items-end ds:justify-center ds:[min-inline-size:var(--min-target-size)] ds:[min-block-size:var(--min-target-size)]",
224
- children: /* @__PURE__ */ N(
224
+ children: /* @__PURE__ */ R(
225
225
  "svg",
226
226
  {
227
227
  "aria-hidden": "true",
@@ -237,7 +237,7 @@ function Lt({ hovered: e }) {
237
237
  {
238
238
  d: ie,
239
239
  fill: "none",
240
- strokeWidth: He,
240
+ strokeWidth: Ke,
241
241
  strokeLinejoin: "round",
242
242
  className: "ds:stroke-[color:var(--map-marker-hover-color)] ds:forced-colors:stroke-[ButtonText]"
243
243
  }
@@ -246,12 +246,12 @@ function Lt({ hovered: e }) {
246
246
  "path",
247
247
  {
248
248
  d: ie,
249
- strokeWidth: Ke,
249
+ strokeWidth: Be,
250
250
  strokeLinejoin: "round",
251
251
  className: `${n} ds:stroke-[color:var(--map-marker-hover-ring)] ds:forced-colors:fill-[ButtonText] ds:forced-colors:stroke-[Canvas]`
252
252
  }
253
253
  ),
254
- /* @__PURE__ */ m("g", { transform: qe, children: Xe.map(
254
+ /* @__PURE__ */ m("g", { transform: He, children: qe.map(
255
255
  ({ tag: r, attrs: o }, s) => r === "path" ? /* @__PURE__ */ m("path", { d: o.d }, s) : /* @__PURE__ */ m(
256
256
  "rect",
257
257
  {
@@ -272,7 +272,7 @@ function Lt({ hovered: e }) {
272
272
  }
273
273
  );
274
274
  }
275
- const Nt = 30, Tt = 56, he = 17, Pt = 256, Rt = (e) => e * Math.PI / 180;
275
+ const Tt = 30, Nt = 56, fe = 17, Pt = 256, Rt = (e) => e * Math.PI / 180;
276
276
  function At(e, t, n) {
277
277
  const r = Pt * 2 ** n, o = Math.min(Math.max(Math.sin(Rt(e)), -0.9999), 0.9999), s = Math.log((1 + o) / (1 - o)) / 2;
278
278
  return {
@@ -281,20 +281,20 @@ function At(e, t, n) {
281
281
  };
282
282
  }
283
283
  function Vt(e, t) {
284
- return e === "auto" ? t > Nt : e && t > 1;
284
+ return e === "auto" ? t > Tt : e && t > 1;
285
285
  }
286
- function Ot(e, t, n = Tt) {
287
- if (t >= he || e.length < 2)
286
+ function Ot(e, t, n = Nt) {
287
+ if (t >= fe || e.length < 2)
288
288
  return { singles: [...e], clusters: [] };
289
289
  const r = e.map((a) => ({
290
290
  marker: a,
291
291
  ...At(a.position.lat, a.position.lng, t)
292
292
  })).sort(
293
293
  (a, l) => a.x - l.x || a.y - l.y || (a.marker.id < l.marker.id ? -1 : 1)
294
- ), o = [], s = /* @__PURE__ */ new Map(), i = (a) => Math.floor(a / n), u = n * n;
294
+ ), o = [], s = /* @__PURE__ */ new Map(), i = (a) => Math.floor(a / n), d = n * n;
295
295
  for (const a of r) {
296
296
  const l = i(a.x), p = i(a.y);
297
- let g = null, c = u;
297
+ let g = null, c = d;
298
298
  for (let h = -1; h <= 1; h += 1)
299
299
  for (let w = -1; w <= 1; w += 1)
300
300
  for (const b of s.get(`${l + h}:${p + w}`) ?? []) {
@@ -324,16 +324,16 @@ function Ot(e, t, n = Tt) {
324
324
  b ? b.push(h) : s.set(w, [h]);
325
325
  }
326
326
  }
327
- const f = [], d = [];
327
+ const f = [], u = [];
328
328
  for (const a of o)
329
- a.members.length === 1 ? f.push(a.members[0]) : d.push({
329
+ a.members.length === 1 ? f.push(a.members[0]) : u.push({
330
330
  id: a.members[0].id,
331
331
  position: { lat: a.lat, lng: a.lng },
332
332
  members: a.members
333
333
  });
334
- return { singles: f, clusters: d };
334
+ return { singles: f, clusters: u };
335
335
  }
336
- function Ne(e) {
336
+ function Te(e) {
337
337
  if (!(e instanceof Element)) return !1;
338
338
  try {
339
339
  return e.matches(":focus-visible");
@@ -351,26 +351,26 @@ function Gt(e, t) {
351
351
  function Dt(e, t) {
352
352
  const [n, r] = C(null), o = (e ?? []).map((s) => `${s.width}x${s.height}`).join();
353
353
  return ce(() => {
354
- const s = t.current, i = o ? o.split(",").map((d) => {
355
- const [a, l] = d.split("x").map(Number);
354
+ const s = t.current, i = o ? o.split(",").map((u) => {
355
+ const [a, l] = u.split("x").map(Number);
356
356
  return Math.log(a / l);
357
357
  }) : [];
358
- if (!s || i.length === 0 || i.some((d) => !isFinite(d))) {
358
+ if (!s || i.length === 0 || i.some((u) => !isFinite(u))) {
359
359
  r(null);
360
360
  return;
361
361
  }
362
362
  r(null);
363
- const u = (d) => {
363
+ const d = (u) => {
364
364
  const { width: a, height: l } = s.getBoundingClientRect();
365
365
  if (!(a > 0 && l > 0)) {
366
- d && r(null);
366
+ u && r(null);
367
367
  return;
368
368
  }
369
369
  const p = Math.log(a / l), g = Gt(i, p);
370
370
  r((c) => c === null || c >= i.length || Math.abs(i[c] - p) - Math.abs(i[g] - p) > jt ? g : c);
371
371
  };
372
- if (u(!0), typeof ResizeObserver > "u") return;
373
- const f = new ResizeObserver(() => u(!1));
372
+ if (d(!0), typeof ResizeObserver > "u") return;
373
+ const f = new ResizeObserver(() => d(!1));
374
374
  return f.observe(s), () => f.disconnect();
375
375
  }, [t, o]), n;
376
376
  }
@@ -422,7 +422,7 @@ const Zt = Y(
422
422
  "ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
423
423
  "ds:text-center"
424
424
  ].join(" ")
425
- ), Wt = Y("type-heading-3 ds:m-0"), Te = Y(
425
+ ), Wt = Y("type-heading-3 ds:m-0"), Ne = Y(
426
426
  "type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
427
427
  );
428
428
  function Bt({
@@ -472,8 +472,8 @@ function Kt({
472
472
  };
473
473
  };
474
474
  i();
475
- let u;
476
- const f = /* @__PURE__ */ new Set(), d = (c) => {
475
+ let d;
476
+ const f = /* @__PURE__ */ new Set(), u = (c) => {
477
477
  if (c instanceof PointerEvent && c.pointerType === "touch" && (c.type === "pointerdown" && f.add(c.pointerId), c.type === "pointerup" || c.type === "pointercancel")) {
478
478
  f.delete(c.pointerId);
479
479
  return;
@@ -495,7 +495,7 @@ function Kt({
495
495
  return;
496
496
  const h = document.fullscreenElement, w = !!(h && (h.contains(o) || o.contains(h)));
497
497
  let b = c.type === "dblclick";
498
- c instanceof PointerEvent && c.type === "pointermove" && (b = c.pointerType !== "touch" || f.size >= 2 || w), c.type === "touchmove" && (b = c.touches.length >= 2 || w), c instanceof KeyboardEvent && (b = c.key !== "Enter" && c.key !== " "), c instanceof WheelEvent && (b = c.ctrlKey || c.metaKey || w), c.type === "click" && (b = c.target instanceof Element && c.target.closest('button, [role="button"]') != null), b && (t.current.programmatic = !1), t.current.pendingInput = !0, clearTimeout(u), u = setTimeout(() => {
498
+ c instanceof PointerEvent && c.type === "pointermove" && (b = c.pointerType !== "touch" || f.size >= 2 || w), c.type === "touchmove" && (b = c.touches.length >= 2 || w), c instanceof KeyboardEvent && (b = c.key !== "Enter" && c.key !== " "), c instanceof WheelEvent && (b = c.ctrlKey || c.metaKey || w), c.type === "click" && (b = c.target instanceof Element && c.target.closest('button, [role="button"]') != null), b && (t.current.programmatic = !1), t.current.pendingInput = !0, clearTimeout(d), d = setTimeout(() => {
499
499
  t.current.pendingInput = !1;
500
500
  }, 250);
501
501
  }, a = () => {
@@ -503,7 +503,7 @@ function Kt({
503
503
  }, l = () => {
504
504
  var A, j;
505
505
  const c = (A = n.getBounds()) == null ? void 0 : A.toJSON(), h = (j = n.getCenter()) == null ? void 0 : j.toJSON(), w = n.getZoom(), b = t.current.moved;
506
- if (i(), clearTimeout(u), !c || !h || w == null) return;
506
+ if (i(), clearTimeout(d), !c || !h || w == null) return;
507
507
  const M = !s || Object.keys(c).some(
508
508
  (G) => c[G] !== s.bounds[G]
509
509
  ), L = s != null && (w !== s.zoom || h.lat !== s.center.lat || h.lng !== s.center.lng);
@@ -521,7 +521,7 @@ function Kt({
521
521
  "keydown"
522
522
  ];
523
523
  p.forEach(
524
- (c) => o.addEventListener(c, d, { capture: !0, passive: !0 })
524
+ (c) => o.addEventListener(c, u, { capture: !0, passive: !0 })
525
525
  );
526
526
  const g = [
527
527
  n.addListener("dragstart", () => {
@@ -533,8 +533,8 @@ function Kt({
533
533
  ];
534
534
  return l(), () => {
535
535
  g.forEach((c) => c.remove()), p.forEach(
536
- (c) => o.removeEventListener(c, d, !0)
537
- ), clearTimeout(u), i();
536
+ (c) => o.removeEventListener(c, u, !0)
537
+ ), clearTimeout(d), i();
538
538
  };
539
539
  }, [n, t]), null;
540
540
  }
@@ -542,27 +542,27 @@ function Ht(e, t) {
542
542
  const n = W(), [r, o] = C(null), { lat: s, lng: i } = t;
543
543
  return $(() => {
544
544
  if (!n || typeof n.getCenter != "function") return;
545
- const u = () => {
545
+ const d = () => {
546
546
  var h, w;
547
- const d = (h = n.getCenter()) == null ? void 0 : h.toJSON(), a = n.getZoom(), l = (w = n.getDiv) == null ? void 0 : w.call(n);
548
- if (!d || a == null || !l) {
547
+ const u = (h = n.getCenter()) == null ? void 0 : h.toJSON(), a = n.getZoom(), l = (w = n.getDiv) == null ? void 0 : w.call(n);
548
+ if (!u || a == null || !l) {
549
549
  o(null);
550
550
  return;
551
551
  }
552
- const p = l.clientWidth, g = l.clientHeight, c = Ye * 2 ** a;
552
+ const p = l.clientWidth, g = l.clientHeight, c = Je * 2 ** a;
553
553
  o({
554
554
  id: e,
555
555
  width: p,
556
556
  height: g,
557
- x: p / 2 + (i - d.lng) / 360 * c,
558
- y: g / 2 - (ae(s) - ae(d.lat)) * c / (2 * Math.PI)
557
+ x: p / 2 + (i - u.lng) / 360 * c,
558
+ y: g / 2 - (ae(s) - ae(u.lat)) * c / (2 * Math.PI)
559
559
  });
560
560
  };
561
- u();
561
+ d();
562
562
  const f = ["bounds_changed", "zoom_changed", "center_changed", "idle"].flatMap(
563
- (d) => typeof n.addListener == "function" ? [n.addListener(d, u)] : []
563
+ (u) => typeof n.addListener == "function" ? [n.addListener(u, d)] : []
564
564
  );
565
- return () => f.forEach((d) => d.remove());
565
+ return () => f.forEach((u) => u.remove());
566
566
  }, [n, e, s, i]), (r == null ? void 0 : r.id) === e ? r : null;
567
567
  }
568
568
  function qt({
@@ -592,7 +592,7 @@ function Yt({
592
592
  (h) => (h == null ? void 0 : h.width) === c.offsetWidth && h.height === c.offsetHeight ? h : { width: c.offsetWidth, height: c.offsetHeight }
593
593
  );
594
594
  }, [t, e.id]), !(e.x >= 0 && e.x <= e.width && e.y >= 0 && e.y <= e.height)) return null;
595
- const u = (o == null ? void 0 : o.width) ?? 0, f = (o == null ? void 0 : o.height) ?? 0, d = Math.max(se, e.width - u - se), a = Math.min(Math.max(e.x - u / 2, se), d), l = e.y - Xt - f, p = l < se, g = p ? e.y + Jt : l;
595
+ const d = (o == null ? void 0 : o.width) ?? 0, f = (o == null ? void 0 : o.height) ?? 0, u = Math.max(se, e.width - d - se), a = Math.min(Math.max(e.x - d / 2, se), u), l = e.y - Xt - f, p = l < se, g = p ? e.y + Jt : l;
596
596
  return (
597
597
  // The layer is `ltr` because the map is geographic: x is always measured
598
598
  // from the physical left. The card inside takes the page direction.
@@ -638,28 +638,28 @@ function Qt({
638
638
  onHover: s,
639
639
  elements: i
640
640
  }) {
641
- const [u, f] = C(null), { id: d } = e, a = k(!1);
641
+ const [d, f] = C(null), { id: u } = e, a = k(!1);
642
642
  return $(() => {
643
- const l = re(u);
643
+ const l = re(d);
644
644
  if (l && (l.style.outline = "none"), !l || !i) return;
645
645
  const p = i.current;
646
646
  return p.set(`pin:${e.id}`, l), () => {
647
647
  p.delete(`pin:${e.id}`);
648
648
  };
649
- }, [u, i, e.id]), $(() => {
650
- const l = re(u);
649
+ }, [d, i, e.id]), $(() => {
650
+ const l = re(d);
651
651
  if (!l || !s) return;
652
652
  const p = (h) => {
653
- Ne(h.target) && s(d, !0, "focus");
653
+ Te(h.target) && s(u, !0, "focus");
654
654
  }, g = (h) => {
655
- l.contains(h.relatedTarget) || a.current || s(d, !1, "focus");
655
+ l.contains(h.relatedTarget) || a.current || s(u, !1, "focus");
656
656
  }, c = (h) => {
657
- h.key === "Escape" && s(d, !1, "focus");
657
+ h.key === "Escape" && s(u, !1, "focus");
658
658
  };
659
659
  return l.addEventListener("focusin", p), l.addEventListener("focusout", g), l.addEventListener("keydown", c), () => {
660
660
  l.removeEventListener("focusin", p), l.removeEventListener("focusout", g), l.removeEventListener("keydown", c);
661
661
  };
662
- }, [u, d, s]), /* @__PURE__ */ m(
662
+ }, [d, u, s]), /* @__PURE__ */ m(
663
663
  Ze,
664
664
  {
665
665
  ref: f,
@@ -669,20 +669,20 @@ function Qt({
669
669
  "data-selected": n ? "true" : "false",
670
670
  "data-hovered": r ? "true" : "false",
671
671
  zIndex: r ? 1e3 : n ? 500 : void 0,
672
- onClick: () => o(d),
672
+ onClick: () => o(u),
673
673
  onMouseEnter: s ? () => {
674
- a.current = !0, s(d, !0, "pointer");
674
+ a.current = !0, s(u, !0, "pointer");
675
675
  } : void 0,
676
676
  onMouseLeave: s ? () => {
677
677
  a.current = !1;
678
- const l = re(u), p = document.activeElement;
679
- l && p && l.contains(p) && Ne(p) || s(d, !1, "pointer");
678
+ const l = re(d), p = document.activeElement;
679
+ l && p && l.contains(p) && Te(p) || s(u, !1, "pointer");
680
680
  } : void 0,
681
681
  children: /* @__PURE__ */ m(Lt, { hovered: r })
682
682
  }
683
683
  );
684
684
  }
685
- const Ye = 256, en = (e) => e * Math.PI / 180;
685
+ const Je = 256, en = (e) => e * Math.PI / 180;
686
686
  function ae(e) {
687
687
  const t = Math.min(Math.max(Math.sin(en(e)), -0.9999), 0.9999);
688
688
  return Math.log((1 + t) / (1 - t)) / 2;
@@ -694,67 +694,67 @@ function nn(e) {
694
694
  t = Math.max(t, s), n = Math.min(n, s), r = Math.max(r, i), o = Math.min(o, i);
695
695
  return { north: t, south: n, east: r, west: o };
696
696
  }
697
- function Qe(e, t, n, r, o) {
698
- const { north: s, south: i, east: u, west: f } = nn(e);
699
- if (s === i && u === f)
700
- return { center: { lat: s, lng: u }, zoom: o };
701
- const d = ae(s), a = ae(i), l = {
702
- lat: tn((d + a) / 2),
703
- lng: (u + f) / 2
704
- }, p = (c, h) => h > 0 ? Math.log2(Math.max(c, 1) / Ye / h) : o, g = Math.min(
705
- p(t - 2 * r, (u - f) / 360),
706
- p(n - 2 * r, (d - a) / (2 * Math.PI)),
697
+ function Ye(e, t, n, r, o) {
698
+ const { north: s, south: i, east: d, west: f } = nn(e);
699
+ if (s === i && d === f)
700
+ return { center: { lat: s, lng: d }, zoom: o };
701
+ const u = ae(s), a = ae(i), l = {
702
+ lat: tn((u + a) / 2),
703
+ lng: (d + f) / 2
704
+ }, p = (c, h) => h > 0 ? Math.log2(Math.max(c, 1) / Je / h) : o, g = Math.min(
705
+ p(t - 2 * r, (d - f) / 360),
706
+ p(n - 2 * r, (u - a) / (2 * Math.PI)),
707
707
  o
708
708
  );
709
709
  return { center: l, zoom: Math.max(0, Math.floor(g)) };
710
710
  }
711
- const et = ({ id: e, lat: t, lng: n }) => e != null ? `id:${e}` : `at:${t},${n}`;
711
+ const Qe = ({ id: e, lat: t, lng: n }) => e != null ? `id:${e}` : `at:${t},${n}`;
712
712
  function on({
713
713
  points: e,
714
714
  fitKey: t,
715
715
  maxZoom: n,
716
716
  onCameraMove: r
717
717
  }) {
718
- const o = W(), s = k(null), i = k(!1), u = k(null);
718
+ const o = W(), s = k(null), i = k(!1), d = k(null);
719
719
  return $(() => {
720
720
  if (!o) return;
721
721
  const f = () => {
722
722
  var c;
723
- const a = u.current, l = (c = o.getCenter()) == null ? void 0 : c.toJSON(), p = o.getZoom();
723
+ const a = d.current, l = (c = o.getCenter()) == null ? void 0 : c.toJSON(), p = o.getZoom();
724
724
  a != null && p === a.zoom && l != null && Math.abs(l.lat - a.center.lat) < 1e-6 && Math.abs(l.lng - a.center.lng) < 1e-6 || (i.current = !0);
725
- }, d = [
725
+ }, u = [
726
726
  o.addListener("dragstart", () => {
727
727
  i.current = !0;
728
728
  }),
729
729
  o.addListener("center_changed", f),
730
730
  o.addListener("zoom_changed", f)
731
731
  ];
732
- return () => d.forEach((a) => a.remove());
732
+ return () => u.forEach((a) => a.remove());
733
733
  }, [o]), $(() => {
734
734
  var w;
735
735
  if (!o) return;
736
736
  const f = ((w = s.current) == null ? void 0 : w.map) === o ? s.current : null;
737
737
  if ((f == null ? void 0 : f.key) === t) return;
738
- const d = new Set(e.map(et)), a = (b, M) => {
739
- u.current = { center: b, zoom: M }, r(), o.moveCamera({ center: b, zoom: M }), i.current = !1;
738
+ const u = new Set(e.map(Qe)), a = (b, M) => {
739
+ d.current = { center: b, zoom: M }, r(), o.moveCamera({ center: b, zoom: M }), i.current = !1;
740
740
  };
741
741
  if (e.length === 0) {
742
- s.current = { map: o, key: t, points: d };
742
+ s.current = { map: o, key: t, points: u };
743
743
  return;
744
744
  }
745
- if (f != null && f.points.size > 0 && [...f.points].every((b) => d.has(b)) && i.current) {
746
- s.current = { map: o, key: t, points: d };
745
+ if (f != null && f.points.size > 0 && [...f.points].every((b) => u.has(b)) && i.current) {
746
+ s.current = { map: o, key: t, points: u };
747
747
  return;
748
748
  }
749
749
  const p = o.getDiv();
750
750
  if (!(p instanceof Element)) return;
751
751
  const g = () => {
752
- s.current = { map: o, key: t, points: d };
752
+ s.current = { map: o, key: t, points: u };
753
753
  const b = Math.min(
754
- ge("--spacing-2xl", p, 48),
754
+ he("--spacing-2xl", p, 48),
755
755
  p.clientWidth / 4,
756
756
  p.clientHeight / 4
757
- ), { center: M, zoom: L } = Qe(
757
+ ), { center: M, zoom: L } = Ye(
758
758
  e,
759
759
  p.clientWidth,
760
760
  p.clientHeight,
@@ -840,52 +840,52 @@ function cn(e) {
840
840
  ring: q("--map-marker-hover-ring", s),
841
841
  hover: q("--map-marker-hover-color", s),
842
842
  selected: q("--map-marker-selected-color", s),
843
- target: ge("--min-target-size", s, 44)
843
+ target: he("--min-target-size", s, 44)
844
844
  };
845
845
  r(
846
846
  (p) => p && p.fill === l.fill && p.ink === l.ink && p.ring === l.ring && p.hover === l.hover && p.selected === l.selected && p.target === l.target ? p : l
847
847
  );
848
848
  };
849
849
  i();
850
- const u = new MutationObserver(i), f = {
850
+ const d = new MutationObserver(i), f = {
851
851
  attributes: !0,
852
852
  attributeFilter: ["class", "data-theme"]
853
853
  };
854
- u.observe(document.documentElement, f);
855
- const d = s.closest('[data-component="theme-root"]');
856
- return d && u.observe(d, f), () => u.disconnect();
854
+ d.observe(document.documentElement, f);
855
+ const u = s.closest('[data-component="theme-root"]');
856
+ return u && d.observe(u, f), () => d.disconnect();
857
857
  }, [t, e]), n;
858
858
  }
859
859
  function ln(e, { fill: t, ink: n, ring: r, hover: o, target: s }) {
860
860
  var l;
861
- const i = Math.max(s, 20 + String(e).length * 12), u = `x="2" y="2" width="${i - 4}" height="${s - 4}" rx="${s / 2}"`, f = `<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${s}"><rect ${u} fill="none" stroke="${o}" stroke-width="4"/><rect ${u} fill="${t}" stroke="${r}" stroke-width="2"/></svg>`, d = (l = globalThis.google) == null ? void 0 : l.maps;
861
+ const i = Math.max(s, 20 + String(e).length * 12), d = `x="2" y="2" width="${i - 4}" height="${s - 4}" rx="${s / 2}"`, f = `<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${s}"><rect ${d} fill="none" stroke="${o}" stroke-width="4"/><rect ${d} fill="${t}" stroke="${r}" stroke-width="2"/></svg>`, u = (l = globalThis.google) == null ? void 0 : l.maps;
862
862
  return {
863
863
  icon: {
864
864
  url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(f)}`,
865
- scaledSize: d ? new d.Size(i, s) : void 0,
866
- anchor: d ? new d.Point(i / 2, s / 2) : void 0
865
+ scaledSize: u ? new u.Size(i, s) : void 0,
866
+ anchor: u ? new u.Point(i / 2, s / 2) : void 0
867
867
  },
868
868
  label: { text: String(e), color: n, fontWeight: "600" }
869
869
  };
870
870
  }
871
- const ve = bt(null);
871
+ const ge = vt(null);
872
872
  function dn({
873
873
  enabled: e,
874
874
  children: t
875
875
  }) {
876
876
  const n = cn(e);
877
- return /* @__PURE__ */ m(ve.Provider, { value: n, children: t });
877
+ return /* @__PURE__ */ m(ge.Provider, { value: n, children: t });
878
878
  }
879
879
  function un({ fill: e, ring: t, hover: n, selected: r }, o) {
880
880
  var a;
881
- const s = o ? Je : 1, i = X * s, u = J * s, f = It(o ? r : e, t, n, {
881
+ const s = o ? Xe : 1, i = X * s, d = J * s, f = It(o ? r : e, t, n, {
882
882
  width: i,
883
- height: u
884
- }), d = (a = globalThis.google) == null ? void 0 : a.maps;
883
+ height: d
884
+ }), u = (a = globalThis.google) == null ? void 0 : a.maps;
885
885
  return {
886
886
  url: `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(f)}`,
887
- scaledSize: d ? new d.Size(i, u) : void 0,
888
- anchor: d ? new d.Point(i / 2, u) : void 0
887
+ scaledSize: u ? new u.Size(i, d) : void 0,
888
+ anchor: u ? new u.Point(i / 2, d) : void 0
889
889
  };
890
890
  }
891
891
  function mn({
@@ -896,16 +896,16 @@ function mn({
896
896
  onSelect: o,
897
897
  onHover: s
898
898
  }) {
899
- const i = je(ve), u = R(
899
+ const i = je(ge), d = P(
900
900
  () => i ? un(i, r) : void 0,
901
901
  [i, r]
902
902
  );
903
- return u ? /* @__PURE__ */ m(
903
+ return d ? /* @__PURE__ */ m(
904
904
  Fe,
905
905
  {
906
906
  position: e.position,
907
907
  title: t,
908
- icon: u,
908
+ icon: d,
909
909
  zIndex: r ? 1e3 : n ? 500 : void 0,
910
910
  onClick: () => o(e.id),
911
911
  onMouseOver: s ? () => s(e.id, !0, "pointer") : void 0,
@@ -921,7 +921,7 @@ function pn({
921
921
  elements: o,
922
922
  onActivate: s
923
923
  }) {
924
- const [i, u] = C(null), f = `cluster:${e.id}`;
924
+ const [i, d] = C(null), f = `cluster:${e.id}`;
925
925
  $(() => {
926
926
  const l = re(i);
927
927
  if (!l) return;
@@ -930,21 +930,21 @@ function pn({
930
930
  p.delete(f);
931
931
  };
932
932
  }, [i, o, f]);
933
- const d = e.members.length, a = R(
934
- () => n || !r ? null : ln(d, r),
935
- [n, d, r]
933
+ const u = e.members.length, a = P(
934
+ () => n || !r ? null : ln(u, r),
935
+ [n, u, r]
936
936
  );
937
937
  return n ? /* @__PURE__ */ m(
938
938
  Ze,
939
939
  {
940
- ref: u,
940
+ ref: d,
941
941
  position: e.position,
942
942
  title: t,
943
943
  "aria-label": t,
944
944
  zIndex: Pe,
945
945
  anchorPoint: ["50%", "50%"],
946
946
  onClick: () => s(e),
947
- children: /* @__PURE__ */ m(an, { count: d })
947
+ children: /* @__PURE__ */ m(an, { count: u })
948
948
  }
949
949
  ) : /* @__PURE__ */ m(
950
950
  Fe,
@@ -967,40 +967,40 @@ function gn({
967
967
  renderMarker: o,
968
968
  mapId: s,
969
969
  frame: i,
970
- elements: u,
970
+ elements: d,
971
971
  labelFor: f,
972
- onCameraMove: d,
972
+ onCameraMove: u,
973
973
  onClusterClick: a
974
974
  }) {
975
- const l = W(), { t: p } = B("ui"), g = sn(t), c = je(ve), h = R(
975
+ const l = W(), { t: p } = B("ui"), g = sn(t), c = je(ge), h = P(
976
976
  () => Ot(e, g),
977
977
  [e, g]
978
- ), { singles: w, clusters: b } = R(() => {
979
- const y = (z) => z.id === n || z.id === r, E = h.singles.slice(), V = [];
980
- for (const z of h.clusters) {
981
- const P = z.members.filter((I) => !y(I));
982
- E.push(...z.members.filter(y)), P.length > 1 ? V.push({ ...z, members: P }) : E.push(...P);
978
+ ), { singles: w, clusters: b } = P(() => {
979
+ const y = (E) => E.id === n || E.id === r, _ = h.singles.slice(), V = [];
980
+ for (const E of h.clusters) {
981
+ const N = E.members.filter((I) => !y(I));
982
+ _.push(...E.members.filter(y)), N.length > 1 ? V.push({ ...E, members: N }) : _.push(...N);
983
983
  }
984
- return { singles: E, clusters: V };
984
+ return { singles: _, clusters: V };
985
985
  }, [h, n, r]), [M, L] = C(""), A = k(null), j = k(void 0);
986
986
  $(() => () => clearTimeout(j.current), []);
987
987
  const G = (y) => {
988
- var _;
989
- const E = (_ = l == null ? void 0 : l.getDiv) == null ? void 0 : _.call(l);
990
- if (!l || !(E instanceof Element)) return;
988
+ var z;
989
+ const _ = (z = l == null ? void 0 : l.getDiv) == null ? void 0 : z.call(l);
990
+ if (!l || !(_ instanceof Element)) return;
991
991
  const V = Math.min(
992
- ge("--spacing-2xl", E, 48),
993
- E.clientWidth / 4,
994
- E.clientHeight / 4
995
- ), z = Qe(
992
+ he("--spacing-2xl", _, 48),
993
+ _.clientWidth / 4,
994
+ _.clientHeight / 4
995
+ ), E = Ye(
996
996
  y.members.map((S) => S.position),
997
- E.clientWidth,
998
- E.clientHeight,
997
+ _.clientWidth,
998
+ _.clientHeight,
999
999
  V,
1000
- he
1001
- ), P = l.getZoom() ?? g, I = Math.min(
1002
- he,
1003
- Math.max(z.zoom, Math.ceil(P + 1))
1000
+ fe
1001
+ ), N = l.getZoom() ?? g, I = Math.min(
1002
+ fe,
1003
+ Math.max(E.zoom, Math.ceil(N + 1))
1004
1004
  ), T = y.members.length;
1005
1005
  A.current = {
1006
1006
  ids: new Set(y.members.map((S) => S.id)),
@@ -1008,42 +1008,42 @@ function gn({
1008
1008
  }, L(""), clearTimeout(j.current), j.current = setTimeout(
1009
1009
  () => L(p("mapView.clusterZoomed", { label: f(T) })),
1010
1010
  fn
1011
- ), d(), a == null || a({
1011
+ ), u(), a == null || a({
1012
1012
  count: T,
1013
1013
  markerIds: y.members.map((S) => S.id)
1014
- }), l.moveCamera({ center: z.center, zoom: I });
1014
+ }), l.moveCamera({ center: E.center, zoom: I });
1015
1015
  };
1016
1016
  return $(() => {
1017
1017
  const y = A.current;
1018
1018
  if (!y) return;
1019
- let E = 0, V = 0;
1020
- const z = () => {
1019
+ let _ = 0, V = 0;
1020
+ const E = () => {
1021
1021
  let I = null;
1022
- for (const _ of b) {
1023
- if (!_.members.some((Q) => y.ids.has(Q.id)))
1022
+ for (const z of b) {
1023
+ if (!z.members.some((Q) => y.ids.has(Q.id)))
1024
1024
  continue;
1025
- const S = (_.position.lat - y.centre.lat) ** 2 + (_.position.lng - y.centre.lng) ** 2;
1026
- (!I || S < I.distance) && (I = { key: `cluster:${_.id}`, distance: S });
1025
+ const S = (z.position.lat - y.centre.lat) ** 2 + (z.position.lng - y.centre.lng) ** 2;
1026
+ (!I || S < I.distance) && (I = { key: `cluster:${z.id}`, distance: S });
1027
1027
  }
1028
1028
  if (I) return I.key;
1029
- const T = w.find((_) => y.ids.has(_.id));
1029
+ const T = w.find((z) => y.ids.has(z.id));
1030
1030
  return T ? `pin:${T.id}` : null;
1031
- }, P = () => {
1032
- const I = z(), T = I ? u.current.get(I) : null;
1031
+ }, N = () => {
1032
+ const I = E(), T = I ? d.current.get(I) : null;
1033
1033
  if (T && (T.focus({ preventScroll: !0 }), T.contains(document.activeElement))) {
1034
1034
  A.current = null;
1035
1035
  return;
1036
1036
  }
1037
1037
  if (V += 1, V < hn && s) {
1038
- E = requestAnimationFrame(P);
1038
+ _ = requestAnimationFrame(N);
1039
1039
  return;
1040
1040
  }
1041
1041
  A.current = null;
1042
- const _ = i == null ? void 0 : i.closest('[data-component="map-view"]');
1043
- _ && (_.hasAttribute("tabindex") || _.setAttribute("tabindex", "-1"), _.focus({ preventScroll: !0 }));
1042
+ const z = i == null ? void 0 : i.closest('[data-component="map-view"]');
1043
+ z && (z.hasAttribute("tabindex") || z.setAttribute("tabindex", "-1"), z.focus({ preventScroll: !0 }));
1044
1044
  };
1045
- return E = requestAnimationFrame(P), () => cancelAnimationFrame(E);
1046
- }, [b, w, u, i, s]), /* @__PURE__ */ N(ht, { children: [
1045
+ return _ = requestAnimationFrame(N), () => cancelAnimationFrame(_);
1046
+ }, [b, w, d, i, s]), /* @__PURE__ */ R(ft, { children: [
1047
1047
  w.map(o),
1048
1048
  b.map((y) => /* @__PURE__ */ m(
1049
1049
  pn,
@@ -1052,7 +1052,7 @@ function gn({
1052
1052
  label: f(y.members.length),
1053
1053
  mapId: s,
1054
1054
  iconTheme: c,
1055
- elements: u,
1055
+ elements: d,
1056
1056
  onActivate: G
1057
1057
  },
1058
1058
  `${Math.floor(g)}:${y.id}`
@@ -1063,20 +1063,20 @@ function gn({
1063
1063
  ) : null
1064
1064
  ] });
1065
1065
  }
1066
- const tt = (e) => {
1066
+ const et = (e) => {
1067
1067
  var t, n;
1068
1068
  return typeof ((n = (t = globalThis.google) == null ? void 0 : t.maps) == null ? void 0 : n[e]) == "function";
1069
1069
  };
1070
1070
  function Re() {
1071
1071
  const { t: e } = B("ui");
1072
- return /* @__PURE__ */ N(
1072
+ return /* @__PURE__ */ R(
1073
1073
  "div",
1074
1074
  {
1075
1075
  role: "status",
1076
1076
  "data-testid": "map-view-loading",
1077
1077
  className: "ds:[inline-size:100%] ds:[block-size:100%]",
1078
1078
  children: [
1079
- /* @__PURE__ */ m(xt, { variant: "rectangular", width: "100%", height: "100%" }),
1079
+ /* @__PURE__ */ m(Mt, { variant: "rectangular", width: "100%", height: "100%" }),
1080
1080
  /* @__PURE__ */ m(We, { children: e("common.loading") })
1081
1081
  ]
1082
1082
  }
@@ -1087,35 +1087,35 @@ function Ae({
1087
1087
  onError: t
1088
1088
  }) {
1089
1089
  const { t: n } = B("ui");
1090
- return /* @__PURE__ */ N(
1090
+ return /* @__PURE__ */ R(
1091
1091
  "div",
1092
1092
  {
1093
1093
  "data-testid": "map-view-loading",
1094
1094
  className: "ds:relative ds:[inline-size:100%] ds:[block-size:100%]",
1095
1095
  children: [
1096
- /* @__PURE__ */ m(nt, { preview: e, onError: t }),
1096
+ /* @__PURE__ */ m(tt, { preview: e, onError: t }),
1097
1097
  /* @__PURE__ */ m("div", { role: "status", children: /* @__PURE__ */ m(We, { children: n("common.loading") }) })
1098
1098
  ]
1099
1099
  }
1100
1100
  );
1101
1101
  }
1102
- function nt({
1102
+ function tt({
1103
1103
  preview: e,
1104
1104
  onError: t
1105
1105
  }) {
1106
- var d, a;
1107
- const n = (((d = e.sources) == null ? void 0 : d.length) ?? 0) > 0, r = k(null), o = Dt(e.sources, r), [s, i] = C(!n);
1106
+ var u, a;
1107
+ const n = (((u = e.sources) == null ? void 0 : u.length) ?? 0) > 0, r = k(null), o = Dt(e.sources, r), [s, i] = C(!n);
1108
1108
  ce(() => {
1109
1109
  i(!0);
1110
1110
  }, []);
1111
- const u = (o !== null ? (a = e.sources) == null ? void 0 : a[o] : void 0) ?? e, f = /* @__PURE__ */ m(
1111
+ const d = (o !== null ? (a = e.sources) == null ? void 0 : a[o] : void 0) ?? e, f = /* @__PURE__ */ m(
1112
1112
  "img",
1113
1113
  {
1114
- src: u.src,
1115
- srcSet: u.srcSet,
1114
+ src: d.src,
1115
+ srcSet: d.srcSet,
1116
1116
  alt: e.alt,
1117
- width: u.width,
1118
- height: u.height,
1117
+ width: d.width,
1118
+ height: d.height,
1119
1119
  loading: "lazy",
1120
1120
  decoding: "async",
1121
1121
  onError: t,
@@ -1138,13 +1138,13 @@ function vn({
1138
1138
  pending: t,
1139
1139
  holdUntilLoaded: n = !1
1140
1140
  }) {
1141
- const r = Mt();
1142
- return De("maps") || tt("Map") || !r && !n ? e : t;
1141
+ const r = kt();
1142
+ return De("maps") || et("Map") || !r && !n ? e : t;
1143
1143
  }
1144
1144
  function bn({ children: e }) {
1145
- return De("marker") || tt("Marker") ? e : null;
1145
+ return De("marker") || et("Marker") ? e : null;
1146
1146
  }
1147
- function ot(e, t) {
1147
+ function nt(e, t) {
1148
1148
  ce(() => {
1149
1149
  const n = e.current;
1150
1150
  return () => {
@@ -1158,19 +1158,18 @@ function wn({
1158
1158
  consentCta: n,
1159
1159
  onImageError: r,
1160
1160
  description: o,
1161
- openInGoogleMapsHref: s,
1162
- onUnmount: i
1161
+ onUnmount: s
1163
1162
  }) {
1164
- const { t: u } = B("ui"), f = Oe(), d = k(null);
1165
- return ot(d, i), /* @__PURE__ */ N(
1163
+ const { t: i } = B("ui"), d = Oe(), f = k(null);
1164
+ return nt(f, s), /* @__PURE__ */ R(
1166
1165
  "div",
1167
1166
  {
1168
- ref: d,
1167
+ ref: f,
1169
1168
  className: "ds:absolute ds:inset-0 ds:@container/mapbar ds:bg-[var(--muted)]",
1170
1169
  "data-testid": "map-view-preview",
1171
1170
  children: [
1172
- /* @__PURE__ */ m(nt, { preview: e, onError: r }),
1173
- /* @__PURE__ */ m("div", { className: "ds:absolute ds:start-0 ds:end-0 ds:top-[var(--map-preview-inset-block-start,var(--spacing-sm))] ds:px-[var(--spacing-sm)]", children: /* @__PURE__ */ N(
1171
+ /* @__PURE__ */ m(tt, { preview: e, onError: r }),
1172
+ /* @__PURE__ */ m("div", { className: "ds:absolute ds:start-0 ds:end-0 ds:top-[var(--map-preview-inset-block-start,var(--spacing-sm))] ds:px-[var(--spacing-sm)]", children: /* @__PURE__ */ R(
1174
1173
  "div",
1175
1174
  {
1176
1175
  "data-testid": "map-view-preview-plate",
@@ -1179,39 +1178,24 @@ function wn({
1179
1178
  /* @__PURE__ */ m(
1180
1179
  "p",
1181
1180
  {
1182
- id: f,
1181
+ id: d,
1183
1182
  className: "type-meta ds:m-0 ds:min-w-0 ds:text-[var(--foreground)] ds:@[640px]/mapbar:text-start",
1184
1183
  children: o
1185
1184
  }
1186
1185
  ),
1187
- /* @__PURE__ */ N("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)]", children: [
1188
- n ?? /* @__PURE__ */ m(
1189
- Ue,
1190
- {
1191
- type: "button",
1192
- intent: "primary",
1193
- size: "sm",
1194
- className: "ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
1195
- onClick: t,
1196
- "aria-describedby": f,
1197
- "data-testid": "map-view-load-cta",
1198
- children: u("mapView.consentTitle")
1199
- }
1200
- ),
1201
- /* @__PURE__ */ N(
1202
- "a",
1203
- {
1204
- href: s,
1205
- target: "_blank",
1206
- rel: "noopener noreferrer",
1207
- className: "ds:inline-flex ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)] ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2 ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1208
- children: [
1209
- /* @__PURE__ */ m("span", { className: "ds:sr-only ds:@[640px]/mapbar:not-sr-only", children: u("mapView.openInGoogleMaps") }),
1210
- /* @__PURE__ */ m(Be, { "aria-hidden": "true", className: "ds:size-4" })
1211
- ]
1212
- }
1213
- )
1214
- ] })
1186
+ /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)]", children: n ?? /* @__PURE__ */ m(
1187
+ Ue,
1188
+ {
1189
+ type: "button",
1190
+ intent: "primary",
1191
+ size: "sm",
1192
+ className: "ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)]",
1193
+ onClick: t,
1194
+ "aria-describedby": d,
1195
+ "data-testid": "map-view-load-cta",
1196
+ children: i("mapView.consentTitle")
1197
+ }
1198
+ ) })
1215
1199
  ]
1216
1200
  }
1217
1201
  ) })
@@ -1228,8 +1212,8 @@ function Ve({
1228
1212
  consentCta: s,
1229
1213
  onUnmount: i
1230
1214
  }) {
1231
- const { t: u } = B("ui"), f = k(null);
1232
- return ot(f, i), /* @__PURE__ */ N(
1215
+ const { t: d } = B("ui"), f = k(null);
1216
+ return nt(f, i), /* @__PURE__ */ R(
1233
1217
  "div",
1234
1218
  {
1235
1219
  ref: f,
@@ -1243,18 +1227,18 @@ function Ve({
1243
1227
  className: "ds:size-6 ds:text-[var(--muted-foreground)]"
1244
1228
  }
1245
1229
  ),
1246
- /* @__PURE__ */ m("p", { className: Wt(), children: u("mapView.consentTitle") }),
1230
+ /* @__PURE__ */ m("p", { className: Wt(), children: d("mapView.consentTitle") }),
1247
1231
  e ? /* @__PURE__ */ m(
1248
1232
  "p",
1249
1233
  {
1250
- className: Te(),
1234
+ className: Ne(),
1251
1235
  "data-testid": "map-view-address",
1252
1236
  lang: t,
1253
1237
  children: e
1254
1238
  }
1255
1239
  ) : null,
1256
- /* @__PURE__ */ m("p", { className: Te(), children: n }),
1257
- /* @__PURE__ */ N(
1240
+ /* @__PURE__ */ m("p", { className: Ne(), children: n }),
1241
+ /* @__PURE__ */ R(
1258
1242
  "div",
1259
1243
  {
1260
1244
  className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center",
@@ -1268,10 +1252,10 @@ function Ve({
1268
1252
  size: "sm",
1269
1253
  onClick: r,
1270
1254
  "data-testid": "map-view-load-cta",
1271
- children: u("mapView.consentCta")
1255
+ children: d("mapView.consentCta")
1272
1256
  }
1273
1257
  ),
1274
- /* @__PURE__ */ N(
1258
+ /* @__PURE__ */ R(
1275
1259
  "a",
1276
1260
  {
1277
1261
  href: o,
@@ -1279,8 +1263,8 @@ function Ve({
1279
1263
  rel: "noopener noreferrer",
1280
1264
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
1281
1265
  children: [
1282
- u("mapView.openInGoogleMaps"),
1283
- /* @__PURE__ */ m(Be, { "aria-hidden": "true", className: "ds:size-3" })
1266
+ d("mapView.openInGoogleMaps"),
1267
+ /* @__PURE__ */ m(zt, { "aria-hidden": "true", className: "ds:size-3" })
1284
1268
  ]
1285
1269
  }
1286
1270
  )
@@ -1291,7 +1275,7 @@ function Ve({
1291
1275
  }
1292
1276
  );
1293
1277
  }
1294
- const yn = gt(
1278
+ const yn = ht(
1295
1279
  ({
1296
1280
  id: e,
1297
1281
  apiKey: t,
@@ -1300,9 +1284,9 @@ const yn = gt(
1300
1284
  markers: o,
1301
1285
  selectedMarkerId: s,
1302
1286
  hoveredMarkerId: i,
1303
- renderMarkerCard: u,
1287
+ renderMarkerCard: d,
1304
1288
  onMarkerHover: f,
1305
- onMarkerClick: d,
1289
+ onMarkerClick: u,
1306
1290
  onBoundsChange: a,
1307
1291
  consentGranted: l = !1,
1308
1292
  onConsentRequest: p,
@@ -1317,26 +1301,26 @@ const yn = gt(
1317
1301
  ariaLabel: j,
1318
1302
  fitToPoints: G,
1319
1303
  fitKey: y,
1320
- fitMaxZoom: E = 15,
1304
+ fitMaxZoom: _ = 15,
1321
1305
  clusterMarkers: V = "auto",
1322
- clusterLabel: z,
1323
- onClusterClick: P,
1306
+ clusterLabel: E,
1307
+ onClusterClick: N,
1324
1308
  className: I,
1325
1309
  ...T
1326
- }, _) => {
1327
- const { t: S, i18n: Q } = B("ui"), be = k(/* @__PURE__ */ new Map()), ee = R(() => G ?? [], [G]), st = R(
1328
- () => y ?? ee.map((v) => `${et(v)}@${v.lat},${v.lng}`).sort().join("|"),
1310
+ }, z) => {
1311
+ const { t: S, i18n: Q } = B("ui"), ve = k(/* @__PURE__ */ new Map()), ee = P(() => G ?? [], [G]), ot = P(
1312
+ () => y ?? ee.map((v) => `${Qe(v)}@${v.lat},${v.lng}`).sort().join("|"),
1329
1313
  [y, ee]
1330
- ), Z = ee.length > 0, we = k(Z), ye = Oe(), rt = R(
1331
- () => `map-${ye.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1332
- [ye]
1333
- ), [ke, it] = C(!1);
1314
+ ), Z = ee.length > 0, be = k(Z), we = Oe(), st = P(
1315
+ () => `map-${we.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1316
+ [we]
1317
+ ), [ye, rt] = C(!1);
1334
1318
  $(() => {
1335
1319
  if (typeof window > "u") return;
1336
- const v = window.matchMedia("(prefers-reduced-motion: reduce)"), x = () => it(v.matches);
1320
+ const v = window.matchMedia("(prefers-reduced-motion: reduce)"), x = () => rt(v.matches);
1337
1321
  return x(), v.addEventListener("change", x), () => v.removeEventListener("change", x);
1338
1322
  }, []);
1339
- const le = R(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${n.lat},${n.lng}`}`, [c, n.lat, n.lng]), O = k(null), Me = k({
1323
+ const ke = P(() => `https://www.google.com/maps/search/?api=1&query=${c ? encodeURIComponent(c) : `${n.lat},${n.lng}`}`, [c, n.lat, n.lng]), O = k(null), Me = k({
1340
1324
  pendingInput: !1,
1341
1325
  moved: !1,
1342
1326
  programmatic: !1
@@ -1348,15 +1332,15 @@ const yn = gt(
1348
1332
  };
1349
1333
  }, []), te = D(
1350
1334
  (v) => {
1351
- K(), d == null || d(v);
1335
+ K(), u == null || u(v);
1352
1336
  },
1353
- [K, d]
1354
- ), [xe, at] = C(null), de = R(
1355
- () => i != null && u ? (o ?? []).find((v) => v.id === i) ?? null : null,
1356
- [i, u, o]
1357
- ), ct = D((v) => {
1337
+ [K, u]
1338
+ ), [xe, it] = C(null), le = P(
1339
+ () => i != null && d ? (o ?? []).find((v) => v.id === i) ?? null : null,
1340
+ [i, d, o]
1341
+ ), at = D((v) => {
1358
1342
  O.current = v;
1359
- }, []), ze = k(!1), Ee = k(null), _e = k(0), ne = D(
1343
+ }, []), Ee = k(!1), _e = k(null), ze = k(0), ne = D(
1360
1344
  () => ({
1361
1345
  panTo: (v) => {
1362
1346
  var x;
@@ -1375,7 +1359,7 @@ const yn = gt(
1375
1359
  // than applied: under the default (`consentGranted={false}`) the
1376
1360
  // whole Maps subtree is unmounted and every action optional-chains
1377
1361
  // into nothing.
1378
- isConsentGranted: () => ze.current,
1362
+ isConsentGranted: () => Ee.current,
1379
1363
  getCenter: () => {
1380
1364
  var v;
1381
1365
  return ((v = O.current) == null ? void 0 : v.getCenter()) ?? null;
@@ -1384,45 +1368,45 @@ const yn = gt(
1384
1368
  var v;
1385
1369
  return ((v = O.current) == null ? void 0 : v.getZoom()) ?? null;
1386
1370
  },
1387
- getSelectedMarkerId: () => Ee.current,
1388
- getMarkerCount: () => _e.current
1371
+ getSelectedMarkerId: () => _e.current,
1372
+ getMarkerCount: () => ze.current
1389
1373
  }),
1390
1374
  []
1391
1375
  );
1392
- vt(_, ne, [ne]);
1393
- const lt = R(
1376
+ gt(z, ne, [ne]);
1377
+ const ct = P(
1394
1378
  () => ne(),
1395
1379
  [ne]
1396
1380
  );
1397
- Et(St, lt, e), $(() => {
1381
+ Et(St, ct, e), $(() => {
1398
1382
  var x, U;
1399
- const v = we.current && !Z;
1400
- if (we.current = Z, !Z) {
1383
+ const v = be.current && !Z;
1384
+ if (be.current = Z, !Z) {
1401
1385
  if (v) {
1402
1386
  (x = O.current) == null || x.jumpTo(n, r);
1403
1387
  return;
1404
1388
  }
1405
- ke || (U = O.current) == null || U.panTo(n);
1389
+ ye || (U = O.current) == null || U.panTo(n);
1406
1390
  }
1407
- }, [n.lat, n.lng, ke, Z]), $(() => {
1391
+ }, [n.lat, n.lng, ye, Z]), $(() => {
1408
1392
  var v;
1409
1393
  Z || (v = O.current) == null || v.setZoom(r);
1410
1394
  }, [r, Z]);
1411
- const [dt, Se] = C(!1), oe = l || dt;
1412
- ze.current = oe, Ee.current = s ?? null, _e.current = (o ?? []).length;
1413
- const [ut, mt] = C(null), F = g && g.src !== ut ? g : void 0, ue = g == null ? void 0 : g.src, me = D(() => {
1414
- ue && mt(ue);
1415
- }, [ue]), $e = k(null), pe = k(!1), fe = k(!1), Ie = D((v) => {
1416
- fe.current = v;
1395
+ const [lt, Se] = C(!1), oe = l || lt;
1396
+ Ee.current = oe, _e.current = s ?? null, ze.current = (o ?? []).length;
1397
+ const [dt, ut] = C(null), F = g && g.src !== dt ? g : void 0, de = g == null ? void 0 : g.src, ue = D(() => {
1398
+ de && ut(de);
1399
+ }, [de]), $e = k(null), me = k(!1), pe = k(!1), Ie = D((v) => {
1400
+ pe.current = v;
1417
1401
  }, []);
1418
1402
  $(() => {
1419
1403
  var H;
1420
1404
  if (!oe) return;
1421
- const v = document.activeElement, x = !v || v === document.body, U = pe.current || fe.current && x;
1422
- pe.current = !1, fe.current = !1, U && ((H = $e.current) == null || H.focus({ preventScroll: !0 }));
1405
+ const v = document.activeElement, x = !v || v === document.body, U = me.current || pe.current && x;
1406
+ me.current = !1, pe.current = !1, U && ((H = $e.current) == null || H.focus({ preventScroll: !0 }));
1423
1407
  }, [oe]);
1424
1408
  const Ce = D(() => {
1425
- if (pe.current = !0, p) {
1409
+ if (me.current = !0, p) {
1426
1410
  p(), Se(!0);
1427
1411
  return;
1428
1412
  }
@@ -1440,7 +1424,7 @@ const yn = gt(
1440
1424
  isHovered: U,
1441
1425
  onSelect: te,
1442
1426
  onHover: f,
1443
- elements: be
1427
+ elements: ve
1444
1428
  },
1445
1429
  v.id
1446
1430
  ) : /* @__PURE__ */ m(
@@ -1455,17 +1439,17 @@ const yn = gt(
1455
1439
  },
1456
1440
  v.id
1457
1441
  );
1458
- }, pt = D(
1459
- (v) => typeof z == "function" ? z(v) : typeof z == "string" ? z.replaceAll("{count}", String(v)) : S("mapView.clusterLabel", { count: v }),
1460
- [z, S]
1461
- ), ft = Vt(V, (o ?? []).length);
1442
+ }, mt = D(
1443
+ (v) => typeof E == "function" ? E(v) : typeof E == "string" ? E.replaceAll("{count}", String(v)) : S("mapView.clusterLabel", { count: v }),
1444
+ [E, S]
1445
+ ), pt = Vt(V, (o ?? []).length);
1462
1446
  return /* @__PURE__ */ m(
1463
1447
  "div",
1464
1448
  {
1465
1449
  ref: $e,
1466
1450
  className: Zt({ size: L, surface: A, className: I }),
1467
1451
  "data-component": "map-view",
1468
- "data-component-id": e ?? rt,
1452
+ "data-component-id": e ?? st,
1469
1453
  role: "region",
1470
1454
  "aria-label": j ?? S("mapView.label"),
1471
1455
  tabIndex: -1,
@@ -1473,7 +1457,7 @@ const yn = gt(
1473
1457
  children: /* @__PURE__ */ m(
1474
1458
  "div",
1475
1459
  {
1476
- ref: at,
1460
+ ref: it,
1477
1461
  className: Ft({ size: L, className: "ds:relative" }),
1478
1462
  children: oe ? (
1479
1463
  // A provider failure shows the consent placeholder (its "Open in
@@ -1482,7 +1466,7 @@ const yn = gt(
1482
1466
  // starts the provider only once Google's `core` and `maps`
1483
1467
  // libraries have arrived.
1484
1468
  /* @__PURE__ */ m(
1485
- zt,
1469
+ xt,
1486
1470
  {
1487
1471
  fallback: ({ reset: v }) => /* @__PURE__ */ m(
1488
1472
  Ve,
@@ -1492,22 +1476,22 @@ const yn = gt(
1492
1476
  description: w ?? S("mapView.consentDescription"),
1493
1477
  onLoadMap: v,
1494
1478
  consentCta: void 0,
1495
- openInGoogleMapsHref: le
1479
+ openInGoogleMapsHref: ke
1496
1480
  }
1497
1481
  ),
1498
1482
  children: /* @__PURE__ */ m(
1499
- wt,
1483
+ bt,
1500
1484
  {
1501
1485
  libraries: ["maps"],
1502
1486
  pending: F ? /* @__PURE__ */ m(
1503
1487
  Ae,
1504
1488
  {
1505
1489
  preview: F,
1506
- onError: me
1490
+ onError: ue
1507
1491
  }
1508
1492
  ) : /* @__PURE__ */ m(Re, {}),
1509
1493
  children: /* @__PURE__ */ m(
1510
- yt,
1494
+ wt,
1511
1495
  {
1512
1496
  apiKey: t,
1513
1497
  language: Q.language,
@@ -1519,11 +1503,11 @@ const yn = gt(
1519
1503
  Ae,
1520
1504
  {
1521
1505
  preview: F,
1522
- onError: me
1506
+ onError: ue
1523
1507
  }
1524
1508
  ) : /* @__PURE__ */ m(Re, {}),
1525
- children: /* @__PURE__ */ N(
1526
- kt,
1509
+ children: /* @__PURE__ */ R(
1510
+ yt,
1527
1511
  {
1528
1512
  defaultCenter: n,
1529
1513
  defaultZoom: r,
@@ -1536,7 +1520,7 @@ const yn = gt(
1536
1520
  /* @__PURE__ */ m(
1537
1521
  Bt,
1538
1522
  {
1539
- onHandleReady: ct,
1523
+ onHandleReady: at,
1540
1524
  onMarkerSelect: te,
1541
1525
  onCameraMove: K
1542
1526
  }
@@ -1552,21 +1536,21 @@ const yn = gt(
1552
1536
  on,
1553
1537
  {
1554
1538
  points: ee,
1555
- fitKey: st,
1556
- maxZoom: E,
1539
+ fitKey: ot,
1540
+ maxZoom: _,
1557
1541
  onCameraMove: K
1558
1542
  }
1559
1543
  ) : null,
1560
- de && u ? /* @__PURE__ */ m(
1544
+ le && d ? /* @__PURE__ */ m(
1561
1545
  qt,
1562
1546
  {
1563
- marker: de,
1547
+ marker: le,
1564
1548
  frame: xe,
1565
1549
  direction: Q.dir(),
1566
- children: u(de.id)
1550
+ children: d(le.id)
1567
1551
  }
1568
1552
  ) : null,
1569
- /* @__PURE__ */ m(bn, { children: /* @__PURE__ */ m(dn, { enabled: !M, children: ft ? /* @__PURE__ */ m(
1553
+ /* @__PURE__ */ m(bn, { children: /* @__PURE__ */ m(dn, { enabled: !M, children: pt ? /* @__PURE__ */ m(
1570
1554
  gn,
1571
1555
  {
1572
1556
  markers: o ?? [],
@@ -1576,10 +1560,10 @@ const yn = gt(
1576
1560
  renderMarker: Le,
1577
1561
  mapId: !!M,
1578
1562
  frame: xe,
1579
- elements: be,
1580
- labelFor: pt,
1563
+ elements: ve,
1564
+ labelFor: mt,
1581
1565
  onCameraMove: K,
1582
- onClusterClick: P
1566
+ onClusterClick: N
1583
1567
  }
1584
1568
  ) : (o ?? []).map(Le) }) })
1585
1569
  ]
@@ -1599,9 +1583,8 @@ const yn = gt(
1599
1583
  preview: F,
1600
1584
  onLoadMap: Ce,
1601
1585
  consentCta: b,
1602
- onImageError: me,
1586
+ onImageError: ue,
1603
1587
  description: w ?? S("mapView.consentDescription"),
1604
- openInGoogleMapsHref: le,
1605
1588
  onUnmount: Ie
1606
1589
  }
1607
1590
  ) : /* @__PURE__ */ m(
@@ -1612,7 +1595,7 @@ const yn = gt(
1612
1595
  description: w ?? S("mapView.consentDescription"),
1613
1596
  onLoadMap: Ce,
1614
1597
  consentCta: b,
1615
- openInGoogleMapsHref: le,
1598
+ openInGoogleMapsHref: ke,
1616
1599
  onUnmount: Ie
1617
1600
  }
1618
1601
  )
@@ -1625,6 +1608,6 @@ const yn = gt(
1625
1608
  yn.displayName = "MapView";
1626
1609
  export {
1627
1610
  yn as M,
1628
- Ne as i
1611
+ Te as i
1629
1612
  };
1630
- //# sourceMappingURL=map-view-CO4F0hMV.js.map
1613
+ //# sourceMappingURL=map-view-DkL58SRp.js.map