@factorialco/f0-react 16.39.1 → 16.40.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.
Files changed (54) hide show
  1. package/dist/{ArchiveThumbnail-BuomQ0jm.js → ArchiveThumbnail-fx1k9zF5.js} +1 -1
  2. package/dist/{ArchiveViewer-Cb1a_yK5.js → ArchiveViewer-4mkxdXyf.js} +2 -2
  3. package/dist/{ChatPostComposerDialog-BoMZ0Olp.js → ChatPostComposerDialog-ZGoAsax9.js} +2 -2
  4. package/dist/{CoachmarkProvider-w30wNBNx.js → CoachmarkProvider-BwLQ3v9f.js} +14091 -14093
  5. package/dist/{CodeThumbnail-bnwIB0Q2.js → CodeThumbnail-DIRVdTYf.js} +1 -1
  6. package/dist/{CodeViewer-DVL3P-jF.js → CodeViewer-BHA1Osng.js} +4 -4
  7. package/dist/{DocumentToolbar-7s9QNMWY.js → DocumentToolbar-C8_A4Bhd.js} +5 -5
  8. package/dist/{DocxViewer-Bn22Gst6.js → DocxViewer-C-UaGNXG.js} +1 -1
  9. package/dist/{F0AiProcessingOverlay-B6DLMrO7.js → F0AiProcessingOverlay-BQGg-wTQ.js} +502 -504
  10. package/dist/{F0Alert-m54uY33f.js → F0Alert-Cj4ufDl7.js} +3 -3
  11. package/dist/F0AudioPlayer-C5CokjE_.js +2 -0
  12. package/dist/{F0CanvasPanel-CfPdTW_o.js → F0CanvasPanel-D4PhLARb.js} +8987 -9185
  13. package/dist/{F0DocumentViewer-FuhnkhM-.js → F0DocumentViewer-382b-101.js} +1 -1
  14. package/dist/{F0DocumentViewer-C_E6pFUZ.js → F0DocumentViewer-De5STCB5.js} +2 -2
  15. package/dist/{F0Map-BwRUOPzu.js → F0Map-Dz_-4gAZ.js} +764 -697
  16. package/dist/{F0Select-BCUynP2p.js → F0Select-BQMaDPcg.js} +8266 -8522
  17. package/dist/{Ellipsis-Bxq1iUUk.js → F0Text-DmUg-CLb.js} +22 -14
  18. package/dist/F0VideoPlayer-AXw_DAL_.js +1 -0
  19. package/dist/{F0VideoPlayer-DGHxduSr.js → F0VideoPlayer-Dsna4Es9.js} +306 -307
  20. package/dist/{HtmlViewer-Q3xUMpkP.js → HtmlViewer-CIAxNnvP.js} +4 -4
  21. package/dist/{Map-Dt3tV3na.js → Map-DGd3Cl-3.js} +13 -13
  22. package/dist/{PdfThumbnail-QkmwtnOA.js → PdfThumbnail-BtzXcGHN.js} +1 -1
  23. package/dist/{PdfViewer-D4NjCixG.js → PdfViewer-BZVnaYKF.js} +6 -6
  24. package/dist/{SheetViewer-RsRTbw7A.js → SheetViewer-Bn3N9G4D.js} +3 -3
  25. package/dist/{TextViewer-BvwaMVDG.js → TextViewer-C9NBnJvl.js} +1 -1
  26. package/dist/ai.d.ts +2 -2
  27. package/dist/ai.js +2 -2
  28. package/dist/component-status.js +1 -1
  29. package/dist/{dist-CngBJJ6S.js → dist-CWrWx4g2.js} +4 -4
  30. package/dist/{dist-CUKjZKvr.js → dist-CZnQ15Wl.js} +1 -1
  31. package/dist/{dist-CGYo25BY.js → dist-DCb1475M.js} +151 -142
  32. package/dist/{dist-D83RDDAb.js → dist-DNltp03U.js} +6 -15
  33. package/dist/{dist-DDAe_kuu.js → dist-DxwodHyk.js} +1 -1
  34. package/dist/experimental.d.ts +2 -2
  35. package/dist/experimental.js +819 -821
  36. package/dist/{exports-DYl7Pf17.d.ts → exports-CbmGLzn6.d.ts} +1 -1
  37. package/dist/f0.d.ts +3 -3
  38. package/dist/f0.js +318 -320
  39. package/dist/{highlight-CJDVXMe_.js → highlight-u9A6kwy7.js} +1 -1
  40. package/dist/{index-DA_a_mE2.d.ts → index-CcbdFJRr.d.ts} +1 -1
  41. package/dist/{index-DOU2q_xI.d.ts → index-D0QIgPoz.d.ts} +7 -0
  42. package/dist/internal-CGrF2KLC.js +261 -0
  43. package/dist/{maplibre-BFO6CAl9.js → maplibre-Dqb2AOHT.js} +12 -13
  44. package/dist/{pdfWorker-BlDYyNbC.js → pdfWorker-C_2eH-2_.js} +1 -1
  45. package/dist/{popover-BGv1b-fc.js → popover-Y2y9anVX.js} +1282 -1247
  46. package/dist/styles.css +1 -1
  47. package/dist/{useData-CmFkOA0P.js → useData-OLWBwcfd.js} +5129 -4873
  48. package/package.json +1 -1
  49. package/tailwind.config.ts +4 -0
  50. package/dist/Check-Cg2vvL5g.js +0 -39
  51. package/dist/F0AudioPlayer-Ck9Vyjrb.js +0 -2
  52. package/dist/F0Text-CnmiWNAg.js +0 -14
  53. package/dist/F0VideoPlayer-BshnHziC.js +0 -1
  54. package/dist/LayoutGroup-OcrcUDNP.js +0 -57
@@ -1,21 +1,22 @@
1
- import { Si as e, a as t, o as n } from "./CoachmarkProvider-w30wNBNx.js";
1
+ import { Si as e, a as t, o as n } from "./CoachmarkProvider-BwLQ3v9f.js";
2
2
  import { i as r, r as i } from "./i18n-provider-Bx71VZQH.js";
3
3
  import { L as a, R as o } from "./tooltip-NXXT56H4.js";
4
4
  import { K as s, O as c, X as l, h as u, q as d, t as f, x as p } from "./F0Button-fMxOyyNk.js";
5
- import { Vs as m, Zc as h, _c as g, hl as _, in as v, p as y, r as b, un as x } from "./F0CanvasPanel-CfPdTW_o.js";
6
- import { a as S } from "./createIcon-iM5M-dE_.js";
7
- import { N as C, T as w, U as ee, p as T, z as E } from "./useData-CmFkOA0P.js";
8
- import { n as te, o as D, s as O, t as k } from "./dist-DMTFO2gF.js";
9
- import { createContext as A, forwardRef as j, useCallback as M, useContext as ne, useEffect as N, useId as re, useImperativeHandle as ie, useLayoutEffect as P, useMemo as F, useRef as I, useState as L } from "react";
10
- import { Fragment as ae, jsx as R, jsxs as z } from "react/jsx-runtime";
11
- import { createPortal as oe } from "react-dom";
5
+ import { Jc as m, Rs as h, fl as g, in as _, mc as v, p as y, r as b, un as x } from "./F0CanvasPanel-D4PhLARb.js";
6
+ import { n as S } from "./internal-CGrF2KLC.js";
7
+ import { a as C } from "./createIcon-iM5M-dE_.js";
8
+ import { I as w, O as ee, Q as T, g as E, q as D } from "./useData-OLWBwcfd.js";
9
+ import { n as te, o as ne, s as O, t as k } from "./dist-DMTFO2gF.js";
10
+ import { createContext as A, forwardRef as j, useCallback as M, useContext as N, useEffect as P, useId as re, useImperativeHandle as F, useLayoutEffect as I, useMemo as L, useRef as R, useState as z } from "react";
11
+ import { Fragment as ie, jsx as B, jsxs as V } from "react/jsx-runtime";
12
+ import { createPortal as ae } from "react-dom";
12
13
  //#region src/addons/map/F0Map/camera.ts
13
- var se = (e, t) => ({
14
+ var oe = (e, t) => ({
14
15
  top: Math.max(e?.top ?? 0, t?.top ?? 0),
15
16
  right: Math.max(e?.right ?? 0, t?.right ?? 0),
16
17
  bottom: Math.max(e?.bottom ?? 0, t?.bottom ?? 0),
17
18
  left: Math.max(e?.left ?? 0, t?.left ?? 0)
18
- }), ce = (e, { width: t, height: n }) => {
19
+ }), se = (e, { width: t, height: n }) => {
19
20
  let r = t > 0 && e.left + e.right >= t, i = n > 0 && e.top + e.bottom >= n;
20
21
  return {
21
22
  top: i ? 0 : e.top,
@@ -23,18 +24,18 @@ var se = (e, t) => ({
23
24
  left: r ? 0 : e.left,
24
25
  right: r ? 0 : e.right
25
26
  };
26
- }, le = (e) => ({
27
+ }, ce = (e) => ({
27
28
  x: (e.left - e.right) / 2,
28
29
  y: (e.top - e.bottom) / 2
29
- }), ue = (e, t, n, r = e.getZoom()) => {
30
- let i = le(n), a = e.project(t);
30
+ }), H = (e, t, n, r = e.getZoom()) => {
31
+ let i = ce(n), a = e.project(t);
31
32
  if (!a || i.x === 0 && i.y === 0) return t;
32
33
  let o = 2 ** (e.getZoom() - r);
33
34
  return e.unproject({
34
35
  x: a.x - i.x * o,
35
36
  y: a.y - i.y * o
36
37
  }) ?? t;
37
- }, de = ({ adapter: e, coordinates: t, inset: n, size: r, gutter: i, maxZoom: a }) => {
38
+ }, le = ({ adapter: e, coordinates: t, inset: n, size: r, gutter: i, maxZoom: a }) => {
38
39
  let o = e.cameraForCoordinates(t, { gutter: i });
39
40
  if (!o) return null;
40
41
  let s = (e, t, n) => e > 2 * i ? (e - t - n - 2 * i) / (e - 2 * i) : 1, c = Math.min(s(r.width, n.left, n.right), s(r.height, n.top, n.bottom)), l = o.zoom ?? e.getZoom();
@@ -44,17 +45,17 @@ var se = (e, t) => ({
44
45
  };
45
46
  let u = Math.min(l + Math.log2(c), a);
46
47
  return {
47
- center: ue(e, o.center, n, u),
48
+ center: H(e, o.center, n, u),
48
49
  zoom: u
49
50
  };
50
- }, fe = 6371008.8, pe = (e) => e * Math.PI / 180, me = (e) => e * 180 / Math.PI, he = (e, t, n = 64) => {
51
- let [r, i] = e, a = pe(i), o = pe(r), s = Math.max(t, 0) / fe, c = [];
51
+ }, ue = 6371008.8, de = (e) => e * Math.PI / 180, fe = (e) => e * 180 / Math.PI, pe = (e, t, n = 64) => {
52
+ let [r, i] = e, a = de(i), o = de(r), s = Math.max(t, 0) / ue, c = [];
52
53
  for (let e = 0; e < n; e++) {
53
54
  let t = 2 * Math.PI * e / n, r = Math.asin(Math.sin(a) * Math.cos(s) + Math.cos(a) * Math.sin(s) * Math.cos(t)), i = o + Math.atan2(Math.sin(t) * Math.sin(s) * Math.cos(a), Math.cos(s) - Math.sin(a) * Math.sin(r));
54
- c.push([me(i), me(r)]);
55
+ c.push([fe(i), fe(r)]);
55
56
  }
56
57
  return c.push(c[0]), c;
57
- }, ge = [
58
+ }, me = [
58
59
  "neutral",
59
60
  "grey",
60
61
  "radical",
@@ -72,15 +73,15 @@ var se = (e, t) => ({
72
73
  "army",
73
74
  "smoke",
74
75
  "barbie"
75
- ].filter((e) => e !== "neutral" && e !== "grey"), _e = {
76
+ ].filter((e) => e !== "neutral" && e !== "grey"), he = {
76
77
  neutral: k.grey[100],
77
78
  grey: k.grey.solid[50],
78
- ...Object.fromEntries(ge.map((e) => [e, k[e][50]]))
79
- }, ve = (e) => `hsl(${_e[e]})`, ye = {
79
+ ...Object.fromEntries(me.map((e) => [e, k[e][50]]))
80
+ }, ge = (e) => `hsl(${he[e]})`, _e = {
80
81
  neutral: k.grey[100],
81
82
  grey: "218 14% 30%",
82
- ...Object.fromEntries(ge.map((e) => [e, k[e][70]]))
83
- }, be = (e, t) => t ? ye[e] : _e[e], B = k.grey[100], V = {
83
+ ...Object.fromEntries(me.map((e) => [e, k[e][70]]))
84
+ }, U = (e, t) => t ? _e[e] : he[e], W = k.grey[100], ve = {
84
85
  sm: {
85
86
  d: 16,
86
87
  border: 1.5,
@@ -141,87 +142,87 @@ var se = (e, t) => ({
141
142
  icon: "lg",
142
143
  avatar: "lg"
143
144
  }
144
- }, xe = (e) => V[e], H = 5.6, U = 1.5, W = () => {
145
- let e = V.xl;
146
- return -(e.d - e.caretOverlap + e.caretH + H + U) + 3;
147
- }, G = "hsl(var(--white-100))", K = j(function(t, n) {
148
- let { size: i = "md", selected: s = !1, collapsed: c = !1, label: u, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color", b = V[s ? "xl" : i], x = !!m, C = y === "color" || y === "icon" || y === "letter", ee = y === "person" && "firstName" in t ? t.firstName + t.lastName : (y === "team" || y === "company") && "name" in t ? t.name : null, E = C ? t.color ?? "radical" : ee ? y === "person" && "src" in t && t.src ? "grey" : w(ee) ?? "grey" : "neutral", te = e(), D = s ? 32 : {
145
+ }, ye = (e) => ve[e], G = 5.6, K = 1.5, be = () => {
146
+ let e = ve.xl;
147
+ return -(e.d - e.caretOverlap + e.caretH + G + K) + 3;
148
+ }, q = "hsl(var(--white-100))", xe = j(function(t, n) {
149
+ let { size: i = "md", selected: s = !1, collapsed: c = !1, label: u, showLabel: f = !0, labelPlacement: p = "right", onClick: m, ariaLabel: h, presentational: g = !1, dataTestId: _, className: v } = t, y = t.variant ?? "color", b = ve[s ? "xl" : i], x = !!m, S = y === "color" || y === "icon" || y === "letter", w = y === "person" && "firstName" in t ? t.firstName + t.lastName : (y === "team" || y === "company") && "name" in t ? t.name : null, T = S ? t.color ?? "radical" : w ? y === "person" && "src" in t && t.src ? "grey" : ee(w) ?? "grey" : "neutral", D = e(), te = s ? 32 : {
149
150
  xs: 12,
150
151
  sm: 16,
151
152
  md: 20,
152
153
  lg: 24
153
- }[b.icon], O = {
154
+ }[b.icon], ne = {
154
155
  xs: 20,
155
156
  sm: 24,
156
157
  md: 32,
157
158
  lg: 40
158
- }, k = V[i].avatar, A = s ? O[b.avatar] / O[k] : 1, j = (e) => /* @__PURE__ */ R("span", {
159
+ }, O = ve[i].avatar, k = s ? ne[b.avatar] / ne[O] : 1, A = (e) => /* @__PURE__ */ B("span", {
159
160
  className: "flex shrink-0 items-center justify-center transition-transform duration-200 ease-out",
160
- style: { transform: `scale(${A})` },
161
+ style: { transform: `scale(${k})` },
161
162
  children: e
162
- }), M = y === "color" ? null : y === "icon" && "icon" in t ? /* @__PURE__ */ R(S, {
163
+ }), j = y === "color" ? null : y === "icon" && "icon" in t ? /* @__PURE__ */ B(C, {
163
164
  icon: t.icon,
164
165
  size: b.icon,
165
166
  color: "#ffffff",
166
167
  style: {
167
- width: D,
168
- height: D,
168
+ width: te,
169
+ height: te,
169
170
  transition: "width 200ms ease-out, height 200ms ease-out"
170
171
  }
171
- }) : y === "letter" && "letter" in t ? /* @__PURE__ */ R("span", {
172
+ }) : y === "letter" && "letter" in t ? /* @__PURE__ */ B("span", {
172
173
  "aria-hidden": !0,
173
174
  className: "font-semibold leading-none",
174
175
  style: {
175
- color: G,
176
- fontSize: Math.round(D * .78),
176
+ color: q,
177
+ fontSize: Math.round(te * .78),
177
178
  transition: "font-size 200ms ease-out"
178
179
  },
179
180
  children: t.letter.charAt(0).toUpperCase()
180
- }) : y === "person" && "firstName" in t ? j(/* @__PURE__ */ R(T, {
181
+ }) : y === "person" && "firstName" in t ? A(/* @__PURE__ */ B(E, {
181
182
  avatar: {
182
183
  type: "person",
183
184
  firstName: t.firstName,
184
185
  lastName: t.lastName,
185
186
  src: t.src
186
187
  },
187
- size: k
188
- })) : y === "team" && "name" in t ? j(/* @__PURE__ */ R(T, {
188
+ size: O
189
+ })) : y === "team" && "name" in t ? A(/* @__PURE__ */ B(E, {
189
190
  avatar: {
190
191
  type: "team",
191
192
  name: t.name,
192
193
  src: t.src
193
194
  },
194
- size: k
195
- })) : y === "company" && "name" in t ? j(/* @__PURE__ */ R(T, {
195
+ size: O
196
+ })) : y === "company" && "name" in t ? A(/* @__PURE__ */ B(E, {
196
197
  avatar: {
197
198
  type: "company",
198
199
  name: t.name,
199
200
  src: t.src
200
201
  },
201
- size: k
202
- })) : y === "image" && "src" in t ? /* @__PURE__ */ R("img", {
202
+ size: O
203
+ })) : y === "image" && "src" in t ? /* @__PURE__ */ B("img", {
203
204
  src: t.src,
204
205
  alt: "alt" in t ? t.alt ?? "" : "",
205
206
  className: "h-full w-full object-cover"
206
- }) : null, ne = y === "team" || y === "company" || y === "icon", N = /* @__PURE__ */ R("span", {
207
+ }) : null, M = y === "team" || y === "company" || y === "icon", N = /* @__PURE__ */ B("span", {
207
208
  className: "relative z-[1] flex shrink-0 items-center justify-center overflow-hidden border-solid transition-all duration-200 ease-out",
208
209
  style: {
209
210
  width: b.d,
210
211
  height: b.d,
211
- borderRadius: ne ? Math.round(b.d * .3) : 9999,
212
+ borderRadius: M ? Math.round(b.d * .3) : 9999,
212
213
  borderWidth: b.border,
213
- borderColor: G,
214
- backgroundColor: C ? ve(E) : G
214
+ borderColor: q,
215
+ backgroundColor: S ? ge(T) : q
215
216
  },
216
- children: y === "color" ? /* @__PURE__ */ R("span", {
217
+ children: y === "color" ? /* @__PURE__ */ B("span", {
217
218
  className: "rounded-full transition-all duration-200 ease-out",
218
219
  style: {
219
220
  width: b.d * .36,
220
221
  height: b.d * .36,
221
- backgroundColor: G
222
+ backgroundColor: q
222
223
  }
223
- }) : M
224
- }), re = /* @__PURE__ */ R(l, { children: s ? /* @__PURE__ */ R(d.svg, {
224
+ }) : j
225
+ }), P = /* @__PURE__ */ B(l, { children: s ? /* @__PURE__ */ B(d.svg, {
225
226
  width: b.caretW,
226
227
  height: b.caretH,
227
228
  viewBox: "0 0 16 13",
@@ -230,7 +231,7 @@ var se = (e, t) => ({
230
231
  style: {
231
232
  top: b.d - b.caretOverlap - 3,
232
233
  marginLeft: -b.caretW / 2,
233
- fill: G,
234
+ fill: q,
234
235
  transformOrigin: "50% 0%"
235
236
  },
236
237
  initial: {
@@ -245,84 +246,84 @@ var se = (e, t) => ({
245
246
  scaleY: 0,
246
247
  opacity: 0
247
248
  },
248
- transition: te ? { duration: 0 } : {
249
+ transition: D ? { duration: 0 } : {
249
250
  duration: .18,
250
251
  ease: "easeOut",
251
252
  opacity: { duration: .1 }
252
253
  },
253
- children: /* @__PURE__ */ R("path", { d: "M0 0h16c-4.2 3-6.6 6.9-7.4 11.7a0.62 0.62 0 0 1-1.2 0C6.6 6.9 4.2 3 0 0Z" })
254
- }, "caret") : null }), ie = /* @__PURE__ */ z("span", {
254
+ children: /* @__PURE__ */ B("path", { d: "M0 0h16c-4.2 3-6.6 6.9-7.4 11.7a0.62 0.62 0 0 1-1.2 0C6.6 6.9 4.2 3 0 0Z" })
255
+ }, "caret") : null }), re = /* @__PURE__ */ V("span", {
255
256
  className: "relative inline-flex",
256
- style: { filter: `drop-shadow(0 ${b.shadowY}px ${b.shadowBlur / 2}px hsl(${B} / 0.3))` },
257
- children: [re, N]
258
- }), P = V[i], F = b.d / 2, I = H, L = s ? W() : -F, oe = s ? "bottom" : p, se = `0 0 ${Math.max(2, Math.round(P.label * .28))}px ${G}`, ce = [
259
- se,
260
- se,
261
- `0 1px 2px ${G}`,
262
- `0 -1px 2px ${G}`,
263
- `1px 0 2px ${G}`,
264
- `-1px 0 2px ${G}`
265
- ].join(","), le = !s && (oe === "top" || oe === "bottom"), ue = le ? "line-clamp-4 text-center" : s ? "whitespace-nowrap text-center" : "whitespace-nowrap", de = P.d / 2, fe = {
257
+ style: { filter: `drop-shadow(0 ${b.shadowY}px ${b.shadowBlur / 2}px hsl(${W} / 0.3))` },
258
+ children: [P, N]
259
+ }), F = ve[i], I = b.d / 2, L = G, R = s ? be() : -I, z = s ? "bottom" : p, ae = `0 0 ${Math.max(2, Math.round(F.label * .28))}px ${q}`, oe = [
260
+ ae,
261
+ ae,
262
+ `0 1px 2px ${q}`,
263
+ `0 -1px 2px ${q}`,
264
+ `1px 0 2px ${q}`,
265
+ `-1px 0 2px ${q}`
266
+ ].join(","), se = !s && (z === "top" || z === "bottom"), ce = se ? "line-clamp-4 text-center" : s ? "whitespace-nowrap text-center" : "whitespace-nowrap", H = F.d / 2, le = {
266
267
  right: {
267
- transform: `translate(${de}px, -50%)`,
268
- style: { paddingLeft: P.gap }
268
+ transform: `translate(${H}px, -50%)`,
269
+ style: { paddingLeft: F.gap }
269
270
  },
270
271
  left: {
271
- transform: `translate(calc(-100% - ${de}px), -50%)`,
272
+ transform: `translate(calc(-100% - ${H}px), -50%)`,
272
273
  style: {
273
- paddingRight: P.gap,
274
+ paddingRight: F.gap,
274
275
  textAlign: "right"
275
276
  }
276
277
  },
277
278
  top: {
278
- transform: `translate(-50%, calc(-100% - ${de}px))`,
279
- style: { paddingBottom: P.gap }
279
+ transform: `translate(-50%, calc(-100% - ${H}px))`,
280
+ style: { paddingBottom: F.gap }
280
281
  },
281
282
  bottom: {
282
- transform: `translate(-50%, ${s ? I : de}px)`,
283
- style: { paddingTop: P.gap + (s ? 4 : 0) }
283
+ transform: `translate(-50%, ${s ? L : H}px)`,
284
+ style: { paddingTop: F.gap + (s ? 4 : 0) }
284
285
  }
285
- }[oe], pe = u && f && !c && /* @__PURE__ */ R("span", {
286
- className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out", ue),
286
+ }[z], ue = u && f && !c && /* @__PURE__ */ B("span", {
287
+ className: a("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out", ce),
287
288
  style: {
288
- color: `hsl(${ye[E]})`,
289
- fontSize: P.label,
290
- textShadow: ce,
291
- transform: fe.transform,
292
- maxWidth: le ? P.maxLabelW : void 0,
293
- ...fe.style
289
+ color: `hsl(${_e[T]})`,
290
+ fontSize: F.label,
291
+ textShadow: oe,
292
+ transform: le.transform,
293
+ maxWidth: se ? F.maxLabelW : void 0,
294
+ ...le.style
294
295
  },
295
296
  children: u
296
- }), me = /* @__PURE__ */ R("span", {
297
+ }), de = /* @__PURE__ */ B("span", {
297
298
  "aria-hidden": !0,
298
299
  className: "absolute left-0 top-0 rounded-full border-solid transition-all duration-200 ease-out",
299
300
  style: {
300
- width: I * 2,
301
- height: I * 2,
301
+ width: L * 2,
302
+ height: L * 2,
302
303
  marginLeft: -5.6,
303
304
  marginTop: -5.6,
304
305
  borderWidth: 1.5,
305
- borderColor: G,
306
- backgroundColor: ve(E),
307
- boxShadow: `0 1px 2px hsl(${B} / 0.3)`,
306
+ borderColor: q,
307
+ backgroundColor: ge(T),
308
+ boxShadow: `0 1px 2px hsl(${W} / 0.3)`,
308
309
  transform: `scale(${s || c ? 1 : 0})`,
309
310
  opacity: s || c ? 1 : 0
310
311
  }
311
- }), he = /* @__PURE__ */ z(ae, { children: [
312
- me,
313
- /* @__PURE__ */ R("span", {
312
+ }), fe = /* @__PURE__ */ V(ie, { children: [
313
+ de,
314
+ /* @__PURE__ */ B("span", {
314
315
  className: "absolute left-0 top-0 transition-all duration-200 ease-out",
315
316
  style: {
316
- transform: `translate(-50%, ${L}px) scale(${+!c})`,
317
+ transform: `translate(-50%, ${R}px) scale(${+!c})`,
317
318
  opacity: +!c
318
319
  },
319
- children: ie
320
+ children: re
320
321
  }),
321
- pe
322
+ ue
322
323
  ] });
323
- return /* @__PURE__ */ R(r, {
324
+ return /* @__PURE__ */ B(r, {
324
325
  dataTestId: _,
325
- children: x ? /* @__PURE__ */ R("button", {
326
+ children: x ? /* @__PURE__ */ B("button", {
326
327
  ref: n,
327
328
  type: "button",
328
329
  ...g ? {
@@ -334,27 +335,27 @@ var se = (e, t) => ({
334
335
  },
335
336
  onClick: m,
336
337
  className: a("relative inline-flex cursor-pointer border-0 bg-transparent p-0", "transition-transform duration-150 hover:scale-[1.05]", o("rounded-full"), v),
337
- children: he
338
- }) : /* @__PURE__ */ R("span", {
338
+ children: fe
339
+ }) : /* @__PURE__ */ B("span", {
339
340
  role: "img",
340
341
  "aria-label": h,
341
342
  className: a("relative inline-flex", v),
342
- children: he
343
+ children: fe
343
344
  })
344
345
  });
345
346
  });
346
- K.displayName = "BaseMapMarker";
347
- var Se = K, Ce = (e, t) => `hsl(${be(e, t).replace(/ /g, ", ")})`, we = (e, t) => ({
347
+ xe.displayName = "BaseMapMarker";
348
+ var Se = xe, Ce = (e, t) => `hsl(${U(e, t).replace(/ /g, ", ")})`, we = (e, t) => ({
348
349
  id: e.id,
349
- ring: he(e.center, e.radiusMeters),
350
+ ring: pe(e.center, e.radiusMeters),
350
351
  color: e.color ?? Ce(e.variant ?? "malibu", t),
351
352
  fillOpacity: .15,
352
353
  strokeWidth: 2
353
354
  }), Te = ({ adapter: e, areas: t, isDark: n }) => {
354
- let r = F(() => t.map((e) => we(e, n)), [t, n]);
355
- return N(function() {
355
+ let r = L(() => t.map((e) => we(e, n)), [t, n]);
356
+ return P(function() {
356
357
  e.setAreas(r);
357
- }, [e, r]), N(function() {
358
+ }, [e, r]), P(function() {
358
359
  return () => e.setAreas([]);
359
360
  }, [e]), null;
360
361
  }, Ee = {
@@ -365,16 +366,16 @@ var Se = K, Ce = (e, t) => `hsl(${be(e, t).replace(/ /g, ", ")})`, we = (e, t) =
365
366
  }, De = {
366
367
  control: "md",
367
368
  panel: "xl"
368
- }, Oe = {
369
+ }, J = {
369
370
  md: "rounded-md backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary",
370
371
  xl: "rounded-xl backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"
371
- }, q = (e) => Oe[e], J = {
372
+ }, Oe = (e) => J[e], Y = {
372
373
  inset: 8,
373
374
  gap: 8,
374
375
  listWidth: 214,
375
376
  detailWidth: 344,
376
377
  toggleSize: 38
377
- }, ke = "cubic-bezier(0.77, 0, 0.175, 1)", Y = {
378
+ }, ke = "cubic-bezier(0.77, 0, 0.175, 1)", Ae = {
378
379
  enter: {
379
380
  duration: "175ms",
380
381
  easing: ke
@@ -383,63 +384,63 @@ var Se = K, Ce = (e, t) => `hsl(${be(e, t).replace(/ /g, ", ")})`, we = (e, t) =
383
384
  duration: "250ms",
384
385
  easing: ke
385
386
  }
386
- }, Ae = ({ children: e }) => /* @__PURE__ */ R("div", {
387
- className: q(De.control),
388
- children: /* @__PURE__ */ R(C, {
387
+ }, je = ({ children: e }) => /* @__PURE__ */ B("div", {
388
+ className: Oe(De.control),
389
+ children: /* @__PURE__ */ B(w, {
389
390
  ...Ee,
390
391
  borderRadius: De.control,
391
392
  padding: "none",
392
- children: /* @__PURE__ */ R("div", {
393
+ children: /* @__PURE__ */ B("div", {
393
394
  className: "flex flex-col items-center gap-1 p-0.5",
394
395
  children: e
395
396
  })
396
397
  })
397
- }), je = j(({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: a, labels: o, dataTestId: s }, c) => {
398
- let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */ R(Ae, { children: e });
399
- return /* @__PURE__ */ R(r, {
398
+ }), Me = j(({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: a, labels: o, dataTestId: s }, c) => {
399
+ let l = i(), u = !!(a || n), d = !!(e || t), p = (e) => /* @__PURE__ */ B(je, { children: e });
400
+ return /* @__PURE__ */ B(r, {
400
401
  dataTestId: s,
401
- children: /* @__PURE__ */ z("div", {
402
+ children: /* @__PURE__ */ V("div", {
402
403
  ref: c,
403
404
  role: "toolbar",
404
405
  "aria-orientation": "vertical",
405
406
  "aria-label": l.map.navigation,
406
407
  className: "flex flex-col items-center gap-2",
407
- children: [u ? p(/* @__PURE__ */ z(ae, { children: [n ? /* @__PURE__ */ R(f, {
408
+ children: [u ? p(/* @__PURE__ */ V(ie, { children: [n ? /* @__PURE__ */ B(f, {
408
409
  variant: "ghost",
409
410
  size: "md",
410
411
  label: o?.fit ?? l.map.controls.fit,
411
- icon: h,
412
+ icon: m,
412
413
  hideLabel: !0,
413
414
  onClick: n
414
- }) : null, a ? /* @__PURE__ */ R(f, {
415
+ }) : null, a ? /* @__PURE__ */ B(f, {
415
416
  variant: "ghost",
416
417
  size: "md",
417
418
  label: o?.locate ?? l.map.controls.locate,
418
- icon: m,
419
+ icon: h,
419
420
  hideLabel: !0,
420
421
  onClick: a
421
- }) : null] })) : null, d ? p(/* @__PURE__ */ z(ae, { children: [e ? /* @__PURE__ */ R(f, {
422
+ }) : null] })) : null, d ? p(/* @__PURE__ */ V(ie, { children: [e ? /* @__PURE__ */ B(f, {
422
423
  variant: "ghost",
423
424
  size: "md",
424
425
  label: o?.zoomIn ?? l.map.controls.zoomIn,
425
- icon: ee,
426
+ icon: T,
426
427
  hideLabel: !0,
427
428
  onClick: e
428
- }) : null, t ? /* @__PURE__ */ R(f, {
429
+ }) : null, t ? /* @__PURE__ */ B(f, {
429
430
  variant: "ghost",
430
431
  size: "md",
431
432
  label: o?.zoomOut ?? l.map.controls.zoomOut,
432
- icon: E,
433
+ icon: D,
433
434
  hideLabel: !0,
434
435
  onClick: t
435
436
  }) : null] })) : null]
436
437
  })
437
438
  });
438
439
  });
439
- je.displayName = "F0MapControls";
440
+ Me.displayName = "F0MapControls";
440
441
  //#endregion
441
- //#region src/addons/map/F0Map/components/F0MapList/F0MapList.tsx
442
- var Me = (e, t) => {
442
+ //#region src/addons/map/F0Map/utils/pointLabel.ts
443
+ var Ne = (e, t) => {
443
444
  if (e.label) return e.label;
444
445
  switch (e.variant) {
445
446
  case "employee": return `${e.firstName} ${e.lastName}`.trim();
@@ -447,74 +448,83 @@ var Me = (e, t) => {
447
448
  case "stop": return e.letter.charAt(0).toUpperCase();
448
449
  default: return t;
449
450
  }
450
- }, Ne = j(function({ points: e, selectedId: t, onSelect: n, visible: o = !1, label: s, id: c, dataTestId: l, className: u }, d) {
451
+ }, Pe = j(function({ points: e, selectedId: t, onSelect: n, visible: o = !1, label: s, id: c, dataTestId: l, className: u }, d) {
451
452
  let f = i(), p = s ?? f.map.listLabel;
452
- return /* @__PURE__ */ R(r, {
453
+ return /* @__PURE__ */ B(r, {
453
454
  dataTestId: l,
454
- children: /* @__PURE__ */ z("nav", {
455
+ children: /* @__PURE__ */ V("nav", {
455
456
  ref: d,
456
457
  id: c,
457
458
  "aria-label": p,
458
459
  tabIndex: -1,
459
460
  className: a("outline-none", o ? "absolute inset-0 z-20 overflow-auto bg-f1-background p-4" : "sr-only", u),
460
- children: [o ? /* @__PURE__ */ R("h2", {
461
+ children: [o ? /* @__PURE__ */ B("h2", {
461
462
  className: "text-f1-foreground mb-2 text-base font-medium",
462
463
  children: p
463
- }) : null, /* @__PURE__ */ R("ul", {
464
+ }) : null, /* @__PURE__ */ B("ul", {
464
465
  className: o ? "flex flex-col gap-0.5" : void 0,
465
- children: e.map((e) => /* @__PURE__ */ R("li", { children: /* @__PURE__ */ R("button", {
466
+ children: e.map((e) => /* @__PURE__ */ B("li", { children: /* @__PURE__ */ B("button", {
466
467
  type: "button",
467
468
  "aria-current": e.id === t || void 0,
468
469
  onClick: () => n(e.id),
469
470
  className: a("w-full text-left", o && "text-f1-foreground hover:bg-f1-background-hover aria-[current=true]:bg-f1-background-selected rounded-md px-3 py-2 text-sm"),
470
- children: Me(e, f.map.unnamedLocation)
471
+ children: Ne(e, f.map.unnamedLocation)
471
472
  }) }, e.id))
472
473
  })]
473
474
  })
474
475
  });
475
476
  });
476
- Ne.displayName = "F0MapList";
477
+ Pe.displayName = "F0MapList";
477
478
  //#endregion
478
- //#region src/addons/map/F0Map/hooks/useClusters.ts
479
- var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i = 164 }) => {
480
- let [a, o] = L({
479
+ //#region src/addons/map/F0Map/hooks/useClusterPicker.ts
480
+ var Fe = (e) => {
481
+ let [t, n] = z(null);
482
+ return P(() => e.on("zoom", () => n(null)), [e]), [t, n];
483
+ }, Ie = (e, t, n, r) => {
484
+ let i = Array.from({ length: e }, (e, t) => t), a = (e) => {
485
+ for (; i[e] !== e;) e = i[e] = i[i[e]];
486
+ return e;
487
+ }, o = (e, t) => {
488
+ let n = a(e), r = a(t);
489
+ n !== r && (i[n] = r);
490
+ }, s = Array.from({ length: e }, () => !1);
491
+ for (let r = 0; r < e; r++) for (let i = r + 1; i < e; i++) t(r, i) <= n && (s[r] = s[i] = !0, o(r, i));
492
+ for (let n = 0; n < e; n++) for (let i = n + 1; i < e; i++) (s[n] || s[i]) && t(n, i) <= r && o(n, i);
493
+ return Array.from({ length: e }, (e, t) => a(t));
494
+ }, Le = ({ adapter: e, points: t, enabled: n, expandZoom: r, radius: i = 12, clusterRadius: a = 164 }) => {
495
+ let [o, s] = z({
481
496
  clusters: [],
482
497
  singles: t
483
498
  });
484
- return N(() => {
499
+ return P(() => {
485
500
  if (!e || !n) {
486
- o({
501
+ s({
487
502
  clusters: [],
488
503
  singles: t
489
504
  });
490
505
  return;
491
506
  }
492
- let a = 0, s = () => {
507
+ let o = 0, c = () => {
493
508
  let n = [];
494
509
  for (let r of t) {
495
510
  let t = e.project(r.coordinates);
496
511
  if (!t) return;
497
512
  n.push(t);
498
513
  }
499
- let a = t.length, s = r * r, c = i * i, l = (e, t) => {
514
+ let o = t.length, c = i * i, l = a * a, u = (e, t) => {
500
515
  let r = n[e].x - n[t].x, i = n[e].y - n[t].y;
501
516
  return r * r + i * i;
502
- }, u = Array.from({ length: a }, (e, t) => t), d = (e) => {
503
- for (; u[e] !== e;) e = u[e] = u[u[e]];
504
- return e;
505
- }, f = (e, t) => {
506
- let n = d(e), r = d(t);
507
- n !== r && (u[n] = r);
508
- }, p = Array.from({ length: a }, () => !1);
509
- for (let e = 0; e < a; e++) for (let t = e + 1; t < a; t++) l(e, t) <= s && (p[e] = p[t] = !0, f(e, t));
510
- for (let e = 0; e < a; e++) for (let t = e + 1; t < a; t++) (p[e] || p[t]) && l(e, t) <= c && f(e, t);
511
- let m = /* @__PURE__ */ new Map();
512
- for (let e = 0; e < a; e++) {
513
- let t = d(e), n = m.get(t);
514
- n ? n.push(e) : m.set(t, [e]);
515
- }
516
- let h = [], g = [];
517
- for (let e of m.values()) {
517
+ }, d = Ie(o, u, c, l), f = /* @__PURE__ */ new Map();
518
+ for (let e = 0; e < o; e++) {
519
+ let t = f.get(d[e]);
520
+ t ? t.push(e) : f.set(d[e], [e]);
521
+ }
522
+ let p = 2 ** (r - e.getZoom()), m = (e) => {
523
+ if (p <= 1) return !1;
524
+ let t = Ie(e.length, (t, n) => u(e[t], e[n]) * p * p, c, l);
525
+ return t.some((e) => e !== t[0]);
526
+ }, h = [], g = [];
527
+ for (let e of f.values()) {
518
528
  if (e.length === 1) {
519
529
  g.push(t[e[0]]);
520
530
  continue;
@@ -530,39 +540,41 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
530
540
  coordinates: [n / c, r / c],
531
541
  count: c,
532
542
  pointIds: e.map((e) => t[e].id),
533
- bounds: [[i, a], [o, s]]
543
+ bounds: [[i, a], [o, s]],
544
+ splits: m(e)
534
545
  });
535
546
  }
536
- o((e) => e.clusters.length === h.length && e.singles.length === g.length && e.clusters.every((e, t) => e.id === h[t].id) && e.singles.every((e, t) => e === g[t]) ? e : {
547
+ s((e) => e.clusters.length === h.length && e.singles.length === g.length && e.clusters.every((e, t) => e.id === h[t].id && e.splits === h[t].splits) && e.singles.every((e, t) => e === g[t]) ? e : {
537
548
  clusters: h,
538
549
  singles: g
539
550
  });
540
- }, c = () => {
541
- cancelAnimationFrame(a), a = requestAnimationFrame(s);
551
+ }, l = () => {
552
+ cancelAnimationFrame(o), o = requestAnimationFrame(c);
542
553
  };
543
- c();
544
- let l = [
545
- e.on("move", c),
546
- e.on("zoom", c),
547
- e.on("resize", c)
554
+ l();
555
+ let u = [
556
+ e.on("move", l),
557
+ e.on("zoom", l),
558
+ e.on("resize", l)
548
559
  ];
549
560
  return () => {
550
- cancelAnimationFrame(a), l.forEach((e) => e());
561
+ cancelAnimationFrame(o), u.forEach((e) => e());
551
562
  };
552
563
  }, [
553
564
  e,
554
565
  t,
555
566
  n,
556
567
  r,
557
- i
558
- ]), a;
559
- }, Fe = 4, Ie = 4, Le = [
568
+ i,
569
+ a
570
+ ]), o;
571
+ }, Re = 4, ze = 4, Be = [
560
572
  "right",
561
573
  "bottom",
562
574
  "left",
563
575
  "top"
564
- ], Re = 1.7, ze = (e, t) => e.x < t.x + t.w && e.x + e.w > t.x && e.y < t.y + t.h && e.y + e.h > t.y, Be = null, Ve = (e, t) => (!Be && typeof document < "u" && (Be = document.createElement("canvas").getContext("2d")), Be ? (Be.font = `600 ${t}px Inter, system-ui, sans-serif`, Be.measureText(e).width) : e.length * t * .55), He = ({ placement: e, cx: t, cy: n, point: r, size: i }) => {
565
- let a = xe(i), o = Ve(r.label ?? "", a.label) + 2, s = a.d / 2;
576
+ ], Ve = 1.7, X = (e, t) => e.x < t.x + t.w && e.x + e.w > t.x && e.y < t.y + t.h && e.y + e.h > t.y, He = null, Z = (e, t) => (!He && typeof document < "u" && (He = document.createElement("canvas").getContext("2d")), He ? (He.font = `600 ${t}px Inter, system-ui, sans-serif`, He.measureText(e).width) : e.length * t * .55), Ue = ({ placement: e, cx: t, cy: n, point: r, size: i }) => {
577
+ let a = ye(i), o = Z(r.label ?? "", a.label) + 2, s = a.d / 2;
566
578
  if (e === "right" || e === "left") {
567
579
  let r = o, i = a.lineH;
568
580
  return {
@@ -572,22 +584,22 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
572
584
  h: i
573
585
  };
574
586
  }
575
- let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW), Ie) * a.lineH, u = a.gap + Fe, d = e === "bottom" ? n + s + u : n - s - a.gap - l;
587
+ let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW), ze) * a.lineH, u = a.gap + Re, d = e === "bottom" ? n + s + u : n - s - a.gap - l;
576
588
  return {
577
589
  x: t - c / 2,
578
590
  y: d,
579
591
  w: c,
580
592
  h: l
581
593
  };
582
- }, Ue = (e, t, n = "md") => {
583
- let [r, i] = L({});
584
- return N(() => {
594
+ }, We = (e, t, n = "md") => {
595
+ let [r, i] = z({});
596
+ return P(() => {
585
597
  if (!e) {
586
598
  i({});
587
599
  return;
588
600
  }
589
601
  let r = 0, a = () => {
590
- let r = xe(n).d, a = [], o = [];
602
+ let r = ye(n).d, a = [], o = [];
591
603
  for (let n of t) {
592
604
  let t = e.project(n.coordinates);
593
605
  if (!t) return;
@@ -604,7 +616,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
604
616
  let s = t.length, c = Array.from({ length: s }, (e, t) => t), l = (e) => {
605
617
  for (; c[e] !== e;) e = c[e] = c[c[e]];
606
618
  return e;
607
- }, u = (r * Re) ** 2;
619
+ }, u = (r * Ve) ** 2;
608
620
  for (let e = 0; e < s; e++) for (let t = e + 1; t < s; t++) {
609
621
  let n = o[e].x - o[t].x, r = o[e].y - o[t].y;
610
622
  if (n * n + r * r <= u) {
@@ -616,15 +628,15 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
616
628
  for (let e = 0; e < s; e++) {
617
629
  let r = t[e];
618
630
  if (!r.label) continue;
619
- let i = o[e], s = "right", c = [s, ...Le.filter((e) => e !== s)], l = null;
631
+ let i = o[e], s = "right", c = [s, ...Be.filter((e) => e !== s)], l = null;
620
632
  for (let e of c) {
621
- let t = He({
633
+ let t = Ue({
622
634
  placement: e,
623
635
  cx: i.x,
624
636
  cy: i.y,
625
637
  point: r,
626
638
  size: n
627
- }), o = a.some((e) => ze(t, e)), s = f.some((e) => ze(t, e));
639
+ }), o = a.some((e) => X(t, e)), s = f.some((e) => X(t, e));
628
640
  if (!o && !s) {
629
641
  l = e, f.push(t);
630
642
  break;
@@ -656,19 +668,19 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
656
668
  t,
657
669
  n
658
670
  ]), r;
659
- }, X = 3, We = ({ adapter: e, el: t, markerRef: n, coordinates: r, drag: i }) => {
660
- let a = I({
671
+ }, Ge = 3, Ke = ({ adapter: e, el: t, markerRef: n, coordinates: r, drag: i }) => {
672
+ let a = R({
661
673
  coordinates: r,
662
674
  drag: i
663
675
  });
664
- P(function() {
676
+ I(function() {
665
677
  a.current = {
666
678
  coordinates: r,
667
679
  drag: i
668
680
  };
669
681
  });
670
682
  let o = !!i;
671
- N(function() {
683
+ P(function() {
672
684
  if (!o) return;
673
685
  let r = null, i = !1, s = null, c = (t) => r ? e.unproject({
674
686
  x: r.at.x + t.clientX - r.x,
@@ -683,7 +695,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
683
695
  }, u = (e) => {
684
696
  if (!r) return;
685
697
  let t = Math.hypot(e.clientX - r.x, e.clientY - r.y);
686
- !i && t < X || (i = !0, s = c(e), s && (n.current?.setPosition(s), a.current.drag?.onDrag?.(s)));
698
+ !i && t < Ge || (i = !0, s = c(e), s && (n.current?.setPosition(s), a.current.drag?.onDrag?.(s)));
687
699
  }, d = (e) => {
688
700
  t.releasePointerCapture?.(e.pointerId), t.style.setProperty("cursor", "grab"), r = null;
689
701
  }, f = () => n.current?.setPosition(a.current.coordinates), p = (e) => {
@@ -702,9 +714,9 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
702
714
  n,
703
715
  o
704
716
  ]);
705
- }, Ge = (e, t) => {
706
- let [n, r] = L(() => e ? e.getZoom() >= t : !1);
707
- return N(() => {
717
+ }, qe = (e, t) => {
718
+ let [n, r] = z(() => e ? e.getZoom() >= t : !1);
719
+ return P(() => {
708
720
  if (!e) {
709
721
  r(!1);
710
722
  return;
@@ -712,13 +724,16 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
712
724
  let n = () => r(e.getZoom() >= t);
713
725
  return n(), e.on("zoom", n);
714
726
  }, [e, t]), n;
715
- }, Ke = [
727
+ }, Q = (e) => {
728
+ let { id: t, coordinates: n, label: r, draggable: i, ...a } = e;
729
+ return a;
730
+ }, Je = [
716
731
  "default",
717
732
  "workplace",
718
733
  "employee",
719
734
  "company",
720
735
  "stop"
721
- ], qe = "malibu", Je = "radical", Z = (e) => {
736
+ ], Ye = "malibu", Xe = "radical", Ze = (e) => {
722
737
  switch (e.variant) {
723
738
  case "employee": return { variant: {
724
739
  variant: "person",
@@ -734,22 +749,22 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
734
749
  case "workplace": return {
735
750
  variant: {
736
751
  variant: "icon",
737
- icon: g
752
+ icon: v
738
753
  },
739
- color: qe
754
+ color: Ye
740
755
  };
741
756
  case "stop": return {
742
757
  variant: {
743
758
  variant: "letter",
744
759
  letter: e.letter
745
760
  },
746
- color: Je
761
+ color: Xe
747
762
  };
748
763
  default: return { variant: { variant: "color" } };
749
764
  }
750
- }, Ye = j(function(e, t) {
751
- let { variant: n, color: r } = Z(e);
752
- return /* @__PURE__ */ R(Se, {
765
+ }, Qe = j(function(e, t) {
766
+ let { variant: n, color: r } = Ze(e);
767
+ return /* @__PURE__ */ B(Se, {
753
768
  ref: t,
754
769
  ...n,
755
770
  color: r,
@@ -766,8 +781,8 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
766
781
  className: e.className
767
782
  });
768
783
  });
769
- Ye.displayName = "F0MapMarker";
770
- var Xe = Ye, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.3, 1)", nt = 72, Q = {
784
+ Qe.displayName = "F0MapMarker";
785
+ var $e = Qe, et = 4, tt = 3, nt = 1.3, rt = 1.08, $ = "cubic-bezier(0.16, 1, 0.3, 1)", it = 72, at = {
771
786
  1: [[0, 0]],
772
787
  2: [[-8, 0], [8, 0]],
773
788
  3: [
@@ -781,68 +796,69 @@ var Xe = Ye, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.
781
796
  [-8, 8],
782
797
  [8, 8]
783
798
  ]
784
- }, rt = j(function({ count: e, members: t, onClick: n, ariaLabel: o, dataTestId: s, className: c }, l) {
785
- let u = i(), [d, f] = L(!1), p = t.slice(0, e <= Ze ? Ze : Qe), m = Math.max(0, e - p.length), h = m > 0, g = m > 99 ? "+99" : `+${m}`, _ = Q[p.length + +!!h] ?? Q[4], v = d ? $e : 1, y = d ? et : 1, b = (e) => {
786
- let [t, n] = _[e] ?? [0, 0];
799
+ }, ot = j(function({ count: e, members: t, onClick: n, ariaLabel: o, dataTestId: s, className: c, ...l }, u) {
800
+ let d = i(), [f, p] = z(!1), m = t.slice(0, e <= et ? et : tt), h = Math.max(0, e - m.length), g = h > 0, _ = h > 99 ? "+99" : `+${h}`, v = at[m.length + +!!g] ?? at[4], y = f ? nt : 1, b = f ? rt : 1, x = (e) => {
801
+ let [t, n] = v[e] ?? [0, 0];
787
802
  return {
788
- transform: `translate(${t * v}px, ${n * v}px) scale(${y})`,
789
- transition: `transform 240ms ${tt}`
803
+ transform: `translate(${t * y}px, ${n * y}px) scale(${b})`,
804
+ transition: `transform 240ms ${$}`
790
805
  };
791
806
  };
792
- return /* @__PURE__ */ R(r, {
807
+ return /* @__PURE__ */ B(r, {
793
808
  dataTestId: s,
794
- children: /* @__PURE__ */ z("div", {
795
- ref: l,
809
+ children: /* @__PURE__ */ V("div", {
810
+ ...l,
811
+ ref: u,
796
812
  role: "button",
797
813
  tabIndex: 0,
798
- "aria-label": o ?? u.t("map.cluster", { count: e }),
814
+ "aria-label": o ?? d.t("map.cluster", { count: e }),
799
815
  onClick: n,
800
816
  onKeyDown: (e) => {
801
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.());
817
+ l.onKeyDown?.(e), n && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.());
802
818
  },
803
- onPointerEnter: () => f(!0),
804
- onPointerLeave: () => f(!1),
805
- onFocus: () => f(!0),
806
- onBlur: () => f(!1),
819
+ onPointerEnter: () => p(!0),
820
+ onPointerLeave: () => p(!1),
821
+ onFocus: () => p(!0),
822
+ onBlur: () => p(!1),
807
823
  className: a("group relative h-0 w-0 cursor-pointer outline-none", c),
808
824
  children: [
809
- /* @__PURE__ */ R("span", {
825
+ /* @__PURE__ */ B("span", {
810
826
  "aria-hidden": !0,
811
827
  className: "absolute rounded-lg group-focus-visible:ring-1 group-focus-visible:ring-f1-special-ring group-focus-visible:ring-offset-1",
812
828
  style: {
813
829
  left: -36,
814
830
  top: -36,
815
- width: nt,
816
- height: nt
831
+ width: it,
832
+ height: it
817
833
  }
818
834
  }),
819
- p.map((e, t) => /* @__PURE__ */ R("span", {
835
+ m.map((e, t) => /* @__PURE__ */ B("span", {
820
836
  className: "absolute left-0 top-0 flex leading-none",
821
837
  style: {
822
838
  zIndex: t,
823
- ...b(t)
839
+ ...x(t)
824
840
  },
825
- children: /* @__PURE__ */ R(Xe, {
841
+ children: /* @__PURE__ */ B($e, {
826
842
  ...e,
827
843
  showLabel: !1
828
844
  })
829
845
  }, t)),
830
- h ? (() => {
831
- let [e, t] = _[p.length] ?? [0, 0];
832
- return /* @__PURE__ */ z("span", {
846
+ g ? (() => {
847
+ let [e, t] = v[m.length] ?? [0, 0];
848
+ return /* @__PURE__ */ V("span", {
833
849
  className: a("absolute left-0 top-0 flex h-6 min-w-6 items-center justify-center overflow-hidden rounded-full px-1.5", "border border-solid border-f1-border-secondary", "text-f1-foreground-secondary text-sm font-medium leading-none"),
834
850
  style: {
835
- zIndex: Qe,
851
+ zIndex: tt,
836
852
  backgroundColor: "hsl(var(--white-90))",
837
- transform: `translate(${e * v}px, ${t * v}px) translate(-50%, -50%) scale(${y})`,
838
- transition: `transform 240ms ${tt}`
853
+ transform: `translate(${e * y}px, ${t * y}px) translate(-50%, -50%) scale(${b})`,
854
+ transition: `transform 240ms ${$}`
839
855
  },
840
- children: [/* @__PURE__ */ R("span", {
856
+ children: [/* @__PURE__ */ B("span", {
841
857
  "aria-hidden": !0,
842
858
  className: "absolute inset-0 bg-f1-background-hover"
843
- }), /* @__PURE__ */ R("span", {
859
+ }), /* @__PURE__ */ B("span", {
844
860
  className: "relative",
845
- children: g
861
+ children: _
846
862
  })]
847
863
  });
848
864
  })() : null
@@ -850,18 +866,51 @@ var Xe = Ye, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, tt = "cubic-bezier(0.16, 1, 0.
850
866
  })
851
867
  });
852
868
  });
853
- rt.displayName = "F0MapCluster";
854
- var $ = rt, it = 16, at = (e, t, n, r) => {
869
+ ot.displayName = "F0MapCluster";
870
+ var st = ot, ct = 28, lt = (e) => e.variant === "company" ? { avatar: {
871
+ type: "company",
872
+ name: e.name,
873
+ src: e.src
874
+ } } : e.variant === "employee" ? { avatar: {
875
+ type: "person",
876
+ firstName: e.firstName,
877
+ lastName: e.lastName,
878
+ src: e.src
879
+ } } : e.variant === "workplace" ? { icon: v } : {};
880
+ function ut({ members: e, splits: t, open: n, onOpenChange: r, onExpand: a, onSelect: o }) {
881
+ let s = i(), c = /* @__PURE__ */ B(st, {
882
+ count: e.length,
883
+ members: e.map(Q),
884
+ onClick: t ? a : void 0
885
+ });
886
+ return t ? c : /* @__PURE__ */ B(S, {
887
+ items: e.map((e) => ({
888
+ label: Ne(e, s.map.unnamedLocation),
889
+ ...lt(e),
890
+ onClick: () => o(e.id)
891
+ })),
892
+ open: n,
893
+ onOpenChange: r,
894
+ side: "bottom",
895
+ sideOffset: ct,
896
+ align: "center",
897
+ scrollable: !0,
898
+ children: c
899
+ });
900
+ }
901
+ //#endregion
902
+ //#region src/addons/map/F0Map/components/F0MapMarkersLayer.tsx
903
+ var dt = 16, ft = (e, t, n, r) => {
855
904
  let i = e.project(t.coordinates);
856
905
  if (!i) return null;
857
- let a = xe("xl"), o = xe(r), s = i.y + W(), c = {
906
+ let a = ye("xl"), o = ye(r), s = i.y + be(), c = {
858
907
  x: i.x - a.d / 2,
859
908
  y: s,
860
909
  w: a.d,
861
910
  h: a.d
862
- }, l = t.label ? Ve(t.label, o.label) : 0, u = {
911
+ }, l = t.label ? Z(t.label, o.label) : 0, u = {
863
912
  x: i.x - l / 2,
864
- y: i.y + H,
913
+ y: i.y + G,
865
914
  w: l,
866
915
  h: o.lineH
867
916
  }, d = o.d, f = /* @__PURE__ */ new Set();
@@ -874,18 +923,18 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
874
923
  w: d,
875
924
  h: d
876
925
  };
877
- (ze(r, c) || l > 0 && ze(r, u)) && f.add(t.id);
926
+ (X(r, c) || l > 0 && X(r, u)) && f.add(t.id);
878
927
  }
879
928
  return f;
880
- }, ot = (e, t, n, r) => {
881
- let [i, a] = L(null);
882
- return N(() => {
883
- if (!t || !n.some((e) => e.id === t.id)) {
929
+ }, pt = (e, t, n, r) => {
930
+ let [i, a] = z(null);
931
+ return P(() => {
932
+ if (!t) {
884
933
  a(null);
885
934
  return;
886
935
  }
887
936
  let i = 0, o = () => {
888
- let i = at(e, t, n.filter((e) => e.id !== t.id), r);
937
+ let i = ft(e, t, n.filter((e) => e.id !== t.id), r);
889
938
  i && a((e) => e !== null && e.size === i.size && [...i].every((t) => e.has(t)) ? e : i);
890
939
  }, s = () => {
891
940
  cancelAnimationFrame(i), i = requestAnimationFrame(o);
@@ -901,48 +950,53 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
901
950
  n,
902
951
  r
903
952
  ]), i;
904
- }, st = (e) => {
905
- let { id: t, coordinates: n, label: r, draggable: i, ...a } = e;
906
- return a;
907
- }, ct = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
908
- let [a] = L(() => document.createElement("div")), o = I(null);
909
- return N(() => {
953
+ }, mt = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
954
+ let [a] = z(() => document.createElement("div")), o = R(null);
955
+ return P(() => {
910
956
  let n = (e) => e.stopPropagation();
911
957
  a.style.cursor = "pointer", a.addEventListener("click", n);
912
958
  let r = e.addDomMarker(a, t);
913
959
  return o.current = r, () => {
914
960
  a.removeEventListener("click", n), r.remove(), o.current = null;
915
961
  };
916
- }, [e, a]), N(() => {
962
+ }, [e, a]), P(() => {
917
963
  o.current?.setPosition(t);
918
- }, [t]), We({
964
+ }, [t]), Ke({
919
965
  adapter: e,
920
966
  el: a,
921
967
  markerRef: o,
922
968
  coordinates: t,
923
969
  drag: r
924
- }), N(() => {
970
+ }), P(() => {
925
971
  a.style.zIndex = n ? "2" : "";
926
- }, [a, n]), oe(i, a);
927
- }, lt = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect: a, onMarkerDrag: o, onMarkerDragEnd: s, onClusterExpand: c }) => {
928
- let u = i(), f = !!s, p = F(() => f ? t.filter((e) => !e.draggable) : t, [t, f]), m = Pe({
929
- adapter: e,
930
- points: p,
931
- enabled: !0
932
- }), { clusters: h } = m, g = F(() => {
933
- if (p === t) return m.singles;
934
- let e = new Set(m.singles);
935
- return t.filter((t) => t.draggable || e.has(t));
972
+ }, [a, n]), ae(i, a);
973
+ }, ht = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect: a, onMarkerDrag: o, onMarkerDragEnd: s, onClusterExpand: c, expandZoom: u }) => {
974
+ let f = i(), p = !!s, m = L(() => {
975
+ let e = t.filter((e) => !(p && e.draggable) && e.id !== n);
976
+ return e.length === t.length ? t : e;
936
977
  }, [
937
- m.singles,
978
+ t,
938
979
  p,
980
+ n
981
+ ]), h = Le({
982
+ adapter: e,
983
+ points: m,
984
+ enabled: !0,
985
+ expandZoom: u
986
+ }), { clusters: g } = h, _ = L(() => {
987
+ if (m === t) return h.singles;
988
+ let e = new Set(h.singles);
989
+ return t.filter((t) => !m.includes(t) || e.has(t));
990
+ }, [
991
+ h.singles,
992
+ m,
939
993
  t
940
- ]), _ = Ge(e, it) ? "lg" : "md", v = Ue(e, g, _), y = new Map(t.map((e) => [e.id, e])), b = h.length > 0, x = ot(e, n ? y.get(n) : void 0, g, _);
941
- return /* @__PURE__ */ z(l, { children: [h.map((t) => /* @__PURE__ */ R(ct, {
994
+ ]), [v, y] = Fe(e), b = qe(e, dt) ? "lg" : "md", x = We(e, _, b), S = new Map(t.map((e) => [e.id, e])), C = g.length > 0, w = pt(e, n ? S.get(n) : void 0, _, b);
995
+ return /* @__PURE__ */ V(l, { children: [g.map((t) => /* @__PURE__ */ B(mt, {
942
996
  adapter: e,
943
997
  coordinates: t.coordinates,
944
- selected: !1,
945
- children: /* @__PURE__ */ R(d.span, {
998
+ selected: v === t.id,
999
+ children: /* @__PURE__ */ B(d.span, {
946
1000
  initial: {
947
1001
  scale: .8,
948
1002
  opacity: 0
@@ -966,23 +1020,26 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
966
1020
  ]
967
1021
  },
968
1022
  className: "absolute left-0 top-0 flex leading-none",
969
- children: /* @__PURE__ */ R($, {
970
- count: t.count,
971
- members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map(st),
972
- onClick: () => c(t.bounds)
1023
+ children: /* @__PURE__ */ B(ut, {
1024
+ members: t.pointIds.map((e) => S.get(e)).filter((e) => !!e),
1025
+ splits: t.splits,
1026
+ open: v === t.id,
1027
+ onOpenChange: (e) => y(e ? t.id : null),
1028
+ onExpand: () => c(t.bounds),
1029
+ onSelect: a
973
1030
  })
974
1031
  })
975
- }, t.id)), g.map((t) => {
976
- let i = v[t.id], c = x?.has(t.id) ?? !1, f = r === t.id;
977
- return /* @__PURE__ */ R(ct, {
1032
+ }, t.id)), _.map((t) => {
1033
+ let i = x[t.id], c = w?.has(t.id) ?? !1, u = r === t.id;
1034
+ return /* @__PURE__ */ B(mt, {
978
1035
  adapter: e,
979
1036
  coordinates: t.coordinates,
980
- selected: n === t.id || f,
1037
+ selected: n === t.id || u,
981
1038
  drag: t.draggable && s ? {
982
1039
  onDrag: o && ((e) => o(t.id, e)),
983
1040
  onDragEnd: (e) => s(t.id, e)
984
1041
  } : void 0,
985
- children: /* @__PURE__ */ R(d.span, {
1042
+ children: /* @__PURE__ */ B(d.span, {
986
1043
  initial: { opacity: 0 },
987
1044
  animate: { opacity: 1 },
988
1045
  exit: {
@@ -997,9 +1054,9 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
997
1054
  ease: "easeOut"
998
1055
  },
999
1056
  className: "absolute left-0 top-0",
1000
- children: /* @__PURE__ */ R(l, {
1057
+ children: /* @__PURE__ */ B(l, {
1001
1058
  initial: !1,
1002
- children: /* @__PURE__ */ R(d.span, {
1059
+ children: /* @__PURE__ */ B(d.span, {
1003
1060
  initial: { opacity: 0 },
1004
1061
  animate: { opacity: 1 },
1005
1062
  exit: { opacity: 0 },
@@ -1008,25 +1065,25 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
1008
1065
  ease: "easeOut"
1009
1066
  },
1010
1067
  className: "absolute left-0 top-0 flex leading-none",
1011
- children: /* @__PURE__ */ R(Xe, {
1012
- ...st(t),
1013
- size: _,
1068
+ children: /* @__PURE__ */ B($e, {
1069
+ ...Q(t),
1070
+ size: b,
1014
1071
  label: t.label,
1015
- showLabel: n === t.id || f || !b && i !== null,
1072
+ showLabel: n === t.id || u || !C && i !== null,
1016
1073
  labelPlacement: i ?? "right",
1017
1074
  selected: n === t.id,
1018
1075
  collapsed: c,
1019
1076
  onClick: () => a(t.id),
1020
1077
  presentational: !0,
1021
- ariaLabel: t.label ?? u.map.unnamedLocation
1078
+ ariaLabel: t.label ?? f.map.unnamedLocation
1022
1079
  })
1023
- }, _)
1080
+ }, b)
1024
1081
  })
1025
1082
  })
1026
1083
  }, t.id);
1027
1084
  })] });
1028
- }, ut = ({ children: e, open: t, offsetX: n, offsetY: o = J.inset, width: s, entrance: c = "slide", headerStart: l, headerEnd: d, ariaLabel: f, dataTestId: p }) => {
1029
- let m = i(), h = u(), g = t ? Y.enter : Y.exit, _ = n - J.inset, v = I({
1085
+ }, gt = ({ children: e, open: t, offsetX: n, offsetY: o = Y.inset, width: s, entrance: c = "slide", headerStart: l, headerEnd: d, ariaLabel: f, dataTestId: p }) => {
1086
+ let m = i(), h = u(), g = t ? Ae.enter : Ae.exit, _ = n - Y.inset, v = R({
1030
1087
  from: _,
1031
1088
  to: _
1032
1089
  });
@@ -1034,13 +1091,13 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
1034
1091
  from: v.current.to,
1035
1092
  to: _
1036
1093
  });
1037
- let y = _ > v.current.from ? Y.enter : Y.exit, b = c === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${J.inset}px))`;
1038
- return /* @__PURE__ */ R(r, {
1094
+ let y = _ > v.current.from ? Ae.enter : Ae.exit, b = c === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${Y.inset}px))`;
1095
+ return /* @__PURE__ */ B(r, {
1039
1096
  dataTestId: p,
1040
- children: /* @__PURE__ */ R("div", {
1097
+ children: /* @__PURE__ */ B("div", {
1041
1098
  className: "pointer-events-none absolute bottom-2 z-10",
1042
1099
  style: {
1043
- left: J.inset,
1100
+ left: Y.inset,
1044
1101
  top: o,
1045
1102
  width: s,
1046
1103
  transform: `translateX(${_}px)`,
@@ -1048,13 +1105,13 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
1048
1105
  transitionDuration: y.duration,
1049
1106
  transitionTimingFunction: y.easing
1050
1107
  },
1051
- children: /* @__PURE__ */ R("div", {
1108
+ children: /* @__PURE__ */ B("div", {
1052
1109
  role: "complementary",
1053
1110
  "aria-label": f ?? m.map.panel,
1054
1111
  ref: (e) => {
1055
1112
  t ? e?.removeAttribute("inert") : e?.setAttribute("inert", "");
1056
1113
  },
1057
- className: a("relative h-full overflow-hidden text-base", q(De.panel), t ? "pointer-events-auto" : "opacity-0"),
1114
+ className: a("relative h-full overflow-hidden text-base", Oe(De.panel), t ? "pointer-events-auto" : "opacity-0"),
1058
1115
  style: {
1059
1116
  transform: t || h ? "translateX(0px) scale(1)" : b,
1060
1117
  transformOrigin: c === "grow" ? "left center" : void 0,
@@ -1062,20 +1119,20 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
1062
1119
  transitionDuration: g.duration,
1063
1120
  transitionTimingFunction: g.easing
1064
1121
  },
1065
- children: /* @__PURE__ */ R(C, {
1122
+ children: /* @__PURE__ */ B(w, {
1066
1123
  ...Ee,
1067
1124
  borderRadius: De.panel,
1068
1125
  padding: "none",
1069
1126
  height: "full",
1070
- children: /* @__PURE__ */ z("div", {
1127
+ children: /* @__PURE__ */ V("div", {
1071
1128
  className: "flex h-full flex-col",
1072
- children: [l || d ? /* @__PURE__ */ z("div", {
1129
+ children: [l || d ? /* @__PURE__ */ V("div", {
1073
1130
  className: "flex shrink-0 items-center justify-between gap-1 p-0.5",
1074
- children: [/* @__PURE__ */ R("div", {
1131
+ children: [/* @__PURE__ */ B("div", {
1075
1132
  className: "flex min-w-0 flex-1 justify-start",
1076
1133
  children: l
1077
1134
  }), d]
1078
- }) : null, /* @__PURE__ */ R("div", {
1135
+ }) : null, /* @__PURE__ */ B("div", {
1079
1136
  className: "min-h-0 flex-1",
1080
1137
  children: e
1081
1138
  })]
@@ -1084,54 +1141,54 @@ var $ = rt, it = 16, at = (e, t, n, r) => {
1084
1141
  })
1085
1142
  })
1086
1143
  });
1087
- }, dt = (e, t, n = 320) => Math.max(216, Math.min(n, e - t - D.mainHardMin)), ft = (e, t = 320) => Math.min(t, Math.max(216, Math.round(e))), pt = 500, mt = "f0-secondary-sidebar-width", ht = O.primaryCompact, gt = (e) => e === null || typeof e == "number" && Number.isFinite(e), _t = A(null), vt = () => ne(_t);
1088
- function yt() {
1089
- let [e, t] = L(!1), n = I(0), r = M(function() {
1144
+ }, _t = (e, t, n = 320) => Math.max(216, Math.min(n, e - t - ne.mainHardMin)), vt = (e, t = 320) => Math.min(t, Math.max(216, Math.round(e))), yt = 500, bt = "f0-secondary-sidebar-width", xt = O.primaryCompact, St = (e) => e === null || typeof e == "number" && Number.isFinite(e), Ct = A(null), wt = () => N(Ct);
1145
+ function Tt() {
1146
+ let [e, t] = z(!1), n = R(0), r = M(function() {
1090
1147
  t(!0), cancelAnimationFrame(n.current), n.current = requestAnimationFrame(function() {
1091
1148
  n.current = requestAnimationFrame(function() {
1092
1149
  t(!1);
1093
1150
  });
1094
1151
  });
1095
1152
  }, []);
1096
- return N(function() {
1153
+ return P(function() {
1097
1154
  return () => cancelAnimationFrame(n.current);
1098
1155
  }, []), {
1099
1156
  isInstant: e,
1100
1157
  landInstantly: r
1101
1158
  };
1102
1159
  }
1103
- function bt() {
1104
- let [e, t] = L(() => window.innerWidth);
1105
- return N(function() {
1160
+ function Et() {
1161
+ let [e, t] = z(() => window.innerWidth);
1162
+ return P(function() {
1106
1163
  let e = () => t(window.innerWidth);
1107
1164
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
1108
1165
  }, []), e;
1109
1166
  }
1110
- function xt({ enabled: e, children: t, ...n }) {
1111
- return e ? /* @__PURE__ */ R(St, {
1167
+ function Dt({ enabled: e, children: t, ...n }) {
1168
+ return e ? /* @__PURE__ */ B(Ot, {
1112
1169
  ...n,
1113
1170
  children: t
1114
- }) : /* @__PURE__ */ R(_t.Provider, {
1171
+ }) : /* @__PURE__ */ B(Ct.Provider, {
1115
1172
  value: null,
1116
1173
  children: t
1117
1174
  });
1118
1175
  }
1119
- function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
1120
- let { isInstant: r, landInstantly: i } = yt(), a = bt(), [o, s] = L(O.panel), [c, l] = v({
1121
- key: mt,
1176
+ function Ot({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
1177
+ let { isInstant: r, landInstantly: i } = Tt(), a = Et(), [o, s] = z(O.panel), [c, l] = _({
1178
+ key: bt,
1122
1179
  fallback: null,
1123
- validate: gt,
1180
+ validate: St,
1124
1181
  debounceMs: 200
1125
- }), u = dt(a, ht, Math.max(320, o)), d = Math.min(o, u), f = c === null ? d : ft(c, u), m = I(o), h = M(function(e) {
1182
+ }), u = _t(a, xt, Math.max(320, o)), d = Math.min(o, u), f = c === null ? d : vt(c, u), m = R(o), h = M(function(e) {
1126
1183
  e !== m.current && (m.current = e, i(), s(e));
1127
1184
  }, [i]), g = M(function(e) {
1128
1185
  i(), l(e);
1129
- }, [i, l]), _ = M(function() {
1186
+ }, [i, l]), v = M(function() {
1130
1187
  i(), l(null);
1131
- }, [i, l]), y = p(`(max-width: ${ht + (e ? d : O.panel) + D.mainMin - 1}px)`, { initializeWithValue: !0 }) ? "overlay" : "docked", [b, x] = L(!1), S = I(0), C = M(function() {
1188
+ }, [i, l]), y = p(`(max-width: ${xt + (e ? d : O.panel) + ne.mainMin - 1}px)`, { initializeWithValue: !0 }) ? "overlay" : "docked", [b, x] = z(!1), S = R(0), C = M(function() {
1132
1189
  x(!1);
1133
1190
  }, []);
1134
- P(function() {
1191
+ I(function() {
1135
1192
  i(), y === "docked" && C();
1136
1193
  }, [
1137
1194
  y,
@@ -1139,19 +1196,19 @@ function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
1139
1196
  C
1140
1197
  ]);
1141
1198
  let w = y === "overlay" && b && e;
1142
- P(function() {
1199
+ I(function() {
1143
1200
  i(), e || C();
1144
1201
  }, [
1145
1202
  e,
1146
1203
  i,
1147
1204
  C
1148
1205
  ]);
1149
- let ee = I(e);
1150
- P(function() {
1206
+ let ee = R(e);
1207
+ I(function() {
1151
1208
  ee.current = e;
1152
1209
  });
1153
- let T = I(null);
1154
- N(function() {
1210
+ let T = R(null);
1211
+ P(function() {
1155
1212
  return () => {
1156
1213
  T.current && clearTimeout(T.current);
1157
1214
  };
@@ -1159,34 +1216,34 @@ function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
1159
1216
  let E = M(function() {
1160
1217
  y !== "docked" && (S.current = Date.now(), x(!0), T.current && clearTimeout(T.current), T.current = setTimeout(function() {
1161
1218
  ee.current || x(!1);
1162
- }, pt));
1163
- }, [y]), te = C, k = M(function() {
1219
+ }, yt));
1220
+ }, [y]), D = C, te = M(function() {
1164
1221
  w || (S.current = Date.now()), x(!w);
1165
1222
  }, [w]);
1166
- N(function() {
1223
+ P(function() {
1167
1224
  if (!w) return;
1168
1225
  let e = (e) => {
1169
1226
  e.key === "Escape" && !e.defaultPrevented && x(!1);
1170
1227
  };
1171
1228
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1172
1229
  }, [w]);
1173
- let A = M(function() {
1174
- Date.now() - S.current < pt || x(!1);
1175
- }, []), j = F(function() {
1230
+ let k = M(function() {
1231
+ Date.now() - S.current < yt || x(!1);
1232
+ }, []), A = L(function() {
1176
1233
  return {
1177
- primarySidebarWidth: ht,
1234
+ primarySidebarWidth: xt,
1178
1235
  hasSecondarySidebar: e,
1179
1236
  secondarySidebarWidth: f,
1180
1237
  secondarySidebarMaxWidth: u,
1181
1238
  declareSecondarySidebarWidth: h,
1182
1239
  resizeSecondarySidebar: g,
1183
- resetSecondarySidebarWidth: _,
1240
+ resetSecondarySidebarWidth: v,
1184
1241
  navigationMode: y,
1185
1242
  isOpenOverPage: w,
1186
1243
  openOverPage: E,
1187
- toggleOverPage: k,
1188
- closeOverPage: te,
1189
- closeOverPageAfterRouteChange: A,
1244
+ toggleOverPage: te,
1245
+ closeOverPage: D,
1246
+ closeOverPageAfterRouteChange: k,
1190
1247
  topBarHeight: t,
1191
1248
  isInstant: r,
1192
1249
  landInstantly: i
@@ -1197,32 +1254,32 @@ function St({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
1197
1254
  u,
1198
1255
  h,
1199
1256
  g,
1200
- _,
1257
+ v,
1201
1258
  y,
1202
1259
  w,
1203
1260
  E,
1204
- k,
1205
1261
  te,
1206
- A,
1262
+ D,
1263
+ k,
1207
1264
  t,
1208
1265
  r,
1209
1266
  i
1210
1267
  ]);
1211
- return /* @__PURE__ */ R(_t.Provider, {
1212
- value: j,
1268
+ return /* @__PURE__ */ B(Ct.Provider, {
1269
+ value: A,
1213
1270
  children: n
1214
1271
  });
1215
1272
  }
1216
1273
  //#endregion
1217
1274
  //#region src/blocks/ApplicationFrame/FrameProvider.tsx
1218
- var Ct = "one_sidebar_locked", wt = 32, Tt = 180, Et = 280, Dt = 300, Ot = A(void 0), kt = A({
1275
+ var kt = "one_sidebar_locked", At = 32, jt = 180, Mt = 280, Nt = 300, Pt = A(void 0), Ft = A({
1219
1276
  steppedAsideFor: null,
1220
1277
  takeCard: () => {}
1221
- }), At = () => ne(kt), jt = /* @__PURE__ */ new WeakSet(), Mt = (e) => {
1222
- jt.add(e.nativeEvent);
1278
+ }), It = () => N(Ft), Lt = /* @__PURE__ */ new WeakSet(), Rt = (e) => {
1279
+ Lt.add(e.nativeEvent);
1223
1280
  };
1224
- function Nt() {
1225
- let e = ne(Ot);
1281
+ function zt() {
1282
+ let e = N(Pt);
1226
1283
  return e === void 0 ? {
1227
1284
  isSmallScreen: !1,
1228
1285
  isLastToggleInvokedByUser: !0,
@@ -1236,24 +1293,24 @@ function Nt() {
1236
1293
  hasPrimarySidebar: !1
1237
1294
  } : e;
1238
1295
  }
1239
- var Pt = (e, t) => e.navigationMode === "overlay" ? e.isOpenOverPage ? "unlocked" : "hidden" : t ? "locked" : "hidden", Ft = (e, t, n) => e || !t ? n ? "unlocked" : "hidden" : "locked";
1240
- function It({ children: e }) {
1241
- let { currentPath: t } = s(), n = vt(), [r, i] = L(!1), [a, o] = L(!1), c = p(`(max-width: ${te.md}px)`, { initializeWithValue: !0 }), l = p(`(max-width: ${te.xl}px)`, { initializeWithValue: !0 }), u = r ? l : c, [d, f] = L(() => {
1242
- let e = localStorage.getItem(Ct);
1296
+ var Bt = (e, t) => e.navigationMode === "overlay" ? e.isOpenOverPage ? "unlocked" : "hidden" : t ? "locked" : "hidden", Vt = (e, t, n) => e || !t ? n ? "unlocked" : "hidden" : "locked";
1297
+ function Ht({ children: e }) {
1298
+ let { currentPath: t } = s(), n = wt(), [r, i] = z(!1), [a, o] = z(!1), c = p(`(max-width: ${te.md}px)`, { initializeWithValue: !0 }), l = p(`(max-width: ${te.xl}px)`, { initializeWithValue: !0 }), u = r ? l : c, [d, f] = z(() => {
1299
+ let e = localStorage.getItem(kt);
1243
1300
  return e === null || !!e;
1244
- }), [m, h] = L(!1), g = x(), [_, v] = L(null), [y, b] = L(null), S = g && n?.hasSecondarySidebar === !0 && n.navigationMode === "docked" && d && y !== _ ? _ : null, C = M(function(e) {
1301
+ }), [m, h] = z(!1), g = x(), [_, v] = z(null), [y, b] = z(null), S = g && n?.hasSecondarySidebar === !0 && n.navigationMode === "docked" && d && y !== _ ? _ : null, C = M(function(e) {
1245
1302
  v(e), o(!1);
1246
- }, []), [w, ee] = L(null), T = I(null), E = I(null), D = M(function() {
1303
+ }, []), [w, ee] = z(null), T = R(null), E = R(null), D = M(function() {
1247
1304
  T.current && clearTimeout(T.current), T.current = null, E.current = null;
1248
- }, []), O = M(function(e, t) {
1305
+ }, []), ne = M(function(e, t) {
1249
1306
  E.current !== e && (D(), E.current = e, T.current = setTimeout(() => {
1250
1307
  T.current = null, E.current = null, h(e);
1251
1308
  }, t));
1252
1309
  }, [D]);
1253
- N(() => D, [D]);
1254
- let k = M(function() {
1310
+ P(() => D, [D]);
1311
+ let O = M(function() {
1255
1312
  n ? n.closeOverPage() : (D(), h(!1));
1256
- }, [n, D]), A = M(function({ isInvokedByUser: e } = { isInvokedByUser: !0 }) {
1313
+ }, [n, D]), k = M(function({ isInvokedByUser: e } = { isInvokedByUser: !0 }) {
1257
1314
  n?.navigationMode === "overlay" ? n.toggleOverPage() : (o(e ?? !0), b(_), !S && (u && !n && h(!m), f(!d)));
1258
1315
  }, [
1259
1316
  n,
@@ -1262,70 +1319,70 @@ function It({ children: e }) {
1262
1319
  d,
1263
1320
  _,
1264
1321
  S
1265
- ]), j = M(function(e) {
1266
- u || n || d || (jt.has(e.nativeEvent) ? D() : !m && e.clientX < wt ? O(!0, Tt) : m && e.clientX > Et ? O(!1, Dt) : D());
1322
+ ]), A = M(function(e) {
1323
+ u || n || d || (Lt.has(e.nativeEvent) ? D() : !m && e.clientX < At ? ne(!0, jt) : m && e.clientX > Mt ? ne(!1, Nt) : D());
1267
1324
  }, [
1268
1325
  u,
1269
1326
  n,
1270
1327
  d,
1271
1328
  m,
1272
- O,
1329
+ ne,
1273
1330
  D
1274
- ]), ne = M(function() {
1331
+ ]), j = M(function() {
1275
1332
  E.current && D();
1276
- }, [D]), re = n ? Pt(n, d && S === null) : Ft(u, d, m), ie = n?.closeOverPageAfterRouteChange;
1277
- N(function() {
1278
- D(), h(!1), ie?.();
1333
+ }, [D]), N = n ? Bt(n, d && S === null) : Vt(u, d, m), re = n?.closeOverPageAfterRouteChange;
1334
+ P(function() {
1335
+ D(), h(!1), re?.();
1279
1336
  }, [
1280
1337
  t,
1281
- ie,
1338
+ re,
1282
1339
  D
1283
- ]), N(function() {
1284
- a && localStorage.setItem(Ct, d ? "1" : "");
1285
- }, [d, a]), N(function() {
1340
+ ]), P(function() {
1341
+ a && localStorage.setItem(kt, d ? "1" : "");
1342
+ }, [d, a]), P(function() {
1286
1343
  return () => {
1287
1344
  ee({
1288
- sidebarState: re,
1345
+ sidebarState: N,
1289
1346
  locked: d
1290
1347
  });
1291
1348
  };
1292
- }, [re, d]);
1293
- let P = w?.sidebarState ?? null, ae = a && w?.sidebarState === "hidden" && !w.locked && re === "locked", z = n !== null, oe = !z && l, se = F(function() {
1349
+ }, [N, d]);
1350
+ let F = w?.sidebarState ?? null, I = a && w?.sidebarState === "hidden" && !w.locked && N === "locked", ie = n !== null, V = !ie && l, ae = L(function() {
1294
1351
  return {
1295
1352
  isSmallScreen: u,
1296
1353
  isLastToggleInvokedByUser: a,
1297
- sidebarState: re,
1298
- hideSidebar: k,
1299
- toggleSidebar: A,
1300
- prevSidebarState: P,
1301
- isDockedByUser: ae,
1354
+ sidebarState: N,
1355
+ hideSidebar: O,
1356
+ toggleSidebar: k,
1357
+ prevSidebarState: F,
1358
+ isDockedByUser: I,
1302
1359
  setForceFloat: i,
1303
- floatsWhenForced: oe,
1304
- hasPrimarySidebar: z
1360
+ floatsWhenForced: V,
1361
+ hasPrimarySidebar: ie
1305
1362
  };
1306
1363
  }, [
1307
1364
  u,
1308
1365
  a,
1309
- re,
1366
+ N,
1367
+ O,
1310
1368
  k,
1311
- A,
1312
- P,
1313
- ae,
1314
- oe,
1315
- z
1316
- ]), ce = F(function() {
1369
+ F,
1370
+ I,
1371
+ V,
1372
+ ie
1373
+ ]), oe = L(function() {
1317
1374
  return {
1318
1375
  steppedAsideFor: S,
1319
1376
  takeCard: C
1320
1377
  };
1321
1378
  }, [S, C]);
1322
- return /* @__PURE__ */ R(Ot.Provider, {
1323
- value: se,
1324
- children: /* @__PURE__ */ R(kt.Provider, {
1325
- value: ce,
1326
- children: /* @__PURE__ */ R("div", {
1327
- onPointerMove: j,
1328
- onPointerLeave: ne,
1379
+ return /* @__PURE__ */ B(Pt.Provider, {
1380
+ value: ae,
1381
+ children: /* @__PURE__ */ B(Ft.Provider, {
1382
+ value: oe,
1383
+ children: /* @__PURE__ */ B("div", {
1384
+ onPointerMove: A,
1385
+ onPointerLeave: j,
1329
1386
  className: "h-screen w-screen",
1330
1387
  children: e
1331
1388
  })
@@ -1334,7 +1391,7 @@ function It({ children: e }) {
1334
1391
  }
1335
1392
  //#endregion
1336
1393
  //#region src/blocks/Navigation/Sidebar/Icon/Icon.tsx
1337
- var Lt = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667", Rt = {
1394
+ var Ut = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667", Wt = {
1338
1395
  open: {
1339
1396
  rest: {
1340
1397
  arrow: "opacity-0 translate-x-0",
@@ -1355,10 +1412,10 @@ var Lt = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.66
1355
1412
  line: "opacity-100 translate-x-0"
1356
1413
  }
1357
1414
  }
1358
- }, zt = "[transform-box:view-box] transition-[transform,opacity]";
1359
- function Bt({ isExpanded: e, isHovered: t = !1 }) {
1360
- let n = Rt[e ? "open" : "closed"][t ? "hover" : "rest"];
1361
- return /* @__PURE__ */ z("svg", {
1415
+ }, Gt = "[transform-box:view-box] transition-[transform,opacity]";
1416
+ function Kt({ isExpanded: e, isHovered: t = !1 }) {
1417
+ let n = Wt[e ? "open" : "closed"][t ? "hover" : "rest"];
1418
+ return /* @__PURE__ */ V("svg", {
1362
1419
  width: "20",
1363
1420
  height: "20",
1364
1421
  viewBox: "0 0 20 20",
@@ -1366,7 +1423,7 @@ function Bt({ isExpanded: e, isHovered: t = !1 }) {
1366
1423
  xmlns: "http://www.w3.org/2000/svg",
1367
1424
  className: "text-f1-icon-bold",
1368
1425
  children: [
1369
- /* @__PURE__ */ R("rect", {
1426
+ /* @__PURE__ */ B("rect", {
1370
1427
  id: "container",
1371
1428
  x: "3.33325",
1372
1429
  y: "5",
@@ -1376,27 +1433,27 @@ function Bt({ isExpanded: e, isHovered: t = !1 }) {
1376
1433
  strokeWidth: "1.3",
1377
1434
  className: "stroke-current"
1378
1435
  }),
1379
- /* @__PURE__ */ R("path", {
1436
+ /* @__PURE__ */ B("path", {
1380
1437
  id: "arrow",
1381
- d: Lt,
1438
+ d: Ut,
1382
1439
  strokeWidth: "1.3",
1383
1440
  strokeLinecap: "round",
1384
1441
  strokeLinejoin: "round",
1385
- className: a("stroke-current", zt, y, "origin-[10.5835px_10px]", e ? "scale-x-100" : "-scale-x-100", n.arrow)
1442
+ className: a("stroke-current", Gt, y, "origin-[10.5835px_10px]", e ? "scale-x-100" : "-scale-x-100", n.arrow)
1386
1443
  }),
1387
- /* @__PURE__ */ R("path", {
1444
+ /* @__PURE__ */ B("path", {
1388
1445
  id: "line",
1389
1446
  d: "M7.5 5L7.5 15",
1390
1447
  strokeWidth: "1.3",
1391
1448
  strokeLinecap: "round",
1392
- className: a("stroke-current", zt, y, n.line)
1449
+ className: a("stroke-current", Gt, y, n.line)
1393
1450
  })
1394
1451
  ]
1395
1452
  });
1396
1453
  }
1397
- function Vt() {
1398
- let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isLastToggleInvokedByUser: r } = Nt(), a = I(null), [o, s] = L(!1), l = b() === "two-level";
1399
- N(function() {
1454
+ function qt() {
1455
+ let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isLastToggleInvokedByUser: r } = zt(), a = R(null), [o, s] = z(!1), l = b() === "two-level";
1456
+ P(function() {
1400
1457
  l && e === "hidden" && (t === "unlocked" || t === "locked" && r) && a.current?.focus();
1401
1458
  }, [
1402
1459
  l,
@@ -1405,7 +1462,7 @@ function Vt() {
1405
1462
  r
1406
1463
  ]);
1407
1464
  let u = i(), d = t !== "hidden", f = d ? u.navigation.sidebar.closePanel : u.navigation.sidebar.openPanel;
1408
- return /* @__PURE__ */ R(c, {
1465
+ return /* @__PURE__ */ B(c, {
1409
1466
  variant: "ghost",
1410
1467
  size: "md",
1411
1468
  onClick: () => n(),
@@ -1417,14 +1474,14 @@ function Vt() {
1417
1474
  "aria-expanded": d,
1418
1475
  onMouseEnter: () => s(!0),
1419
1476
  onMouseLeave: () => s(!1),
1420
- children: /* @__PURE__ */ R(Bt, {
1477
+ children: /* @__PURE__ */ B(Kt, {
1421
1478
  isExpanded: d,
1422
1479
  isHovered: o
1423
1480
  })
1424
1481
  });
1425
1482
  }
1426
- function Ht({ isExpanded: e }) {
1427
- return /* @__PURE__ */ z("svg", {
1483
+ function Jt({ isExpanded: e }) {
1484
+ return /* @__PURE__ */ V("svg", {
1428
1485
  width: "20",
1429
1486
  height: "20",
1430
1487
  viewBox: "0 0 20 20",
@@ -1432,7 +1489,7 @@ function Ht({ isExpanded: e }) {
1432
1489
  xmlns: "http://www.w3.org/2000/svg",
1433
1490
  className: "text-f1-icon-bold",
1434
1491
  children: [
1435
- /* @__PURE__ */ R("rect", {
1492
+ /* @__PURE__ */ B("rect", {
1436
1493
  id: "container",
1437
1494
  x: "3.33325",
1438
1495
  y: "5",
@@ -1442,7 +1499,7 @@ function Ht({ isExpanded: e }) {
1442
1499
  strokeWidth: "1.3",
1443
1500
  className: "stroke-current"
1444
1501
  }),
1445
- /* @__PURE__ */ R("path", {
1502
+ /* @__PURE__ */ B("path", {
1446
1503
  id: "arrow",
1447
1504
  d: e ? "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667" : "M10.75 10L7 10M10.75 10L9.08333 8.33337M10.75 10L9.08333 11.6667",
1448
1505
  strokeWidth: "1.3",
@@ -1450,7 +1507,7 @@ function Ht({ isExpanded: e }) {
1450
1507
  strokeLinejoin: "round",
1451
1508
  className: a("translate-x-0 stroke-current transition-all duration-200 ease-out motion-reduce:transition-none", e ? "opacity-0 group-hover:-translate-x-1 group-hover:opacity-100" : "opacity-1 group-hover:translate-x-[3px]")
1452
1509
  }),
1453
- /* @__PURE__ */ R("path", {
1510
+ /* @__PURE__ */ B("path", {
1454
1511
  id: "line",
1455
1512
  d: "M7.5 5L7.5 15",
1456
1513
  strokeWidth: "1.3",
@@ -1460,11 +1517,11 @@ function Ht({ isExpanded: e }) {
1460
1517
  ]
1461
1518
  });
1462
1519
  }
1463
- function Ut() {
1464
- let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } = Nt(), i = I(null);
1465
- return N(() => {
1520
+ function Yt() {
1521
+ let { isDockedByUser: e, sidebarState: t, toggleSidebar: n, isSmallScreen: r } = zt(), i = R(null);
1522
+ return P(() => {
1466
1523
  e && i.current?.focus();
1467
- }, [e]), /* @__PURE__ */ z(c, {
1524
+ }, [e]), /* @__PURE__ */ V(c, {
1468
1525
  variant: "ghost",
1469
1526
  size: "md",
1470
1527
  onClick: () => n(),
@@ -1473,26 +1530,26 @@ function Ut() {
1473
1530
  ref: i,
1474
1531
  compact: !0,
1475
1532
  "aria-label": "Close Sidebar",
1476
- children: [/* @__PURE__ */ R("div", {
1533
+ children: [/* @__PURE__ */ B("div", {
1477
1534
  className: a("hidden", { flex: !r }),
1478
- children: /* @__PURE__ */ R(Ht, { isExpanded: t === "locked" })
1479
- }), /* @__PURE__ */ R("div", {
1535
+ children: /* @__PURE__ */ B(Jt, { isExpanded: t === "locked" })
1536
+ }), /* @__PURE__ */ B("div", {
1480
1537
  className: a("hidden", { flex: r }),
1481
- children: /* @__PURE__ */ R(S, {
1482
- icon: _,
1538
+ children: /* @__PURE__ */ B(C, {
1539
+ icon: g,
1483
1540
  size: "md"
1484
1541
  })
1485
1542
  })]
1486
1543
  });
1487
1544
  }
1488
- function Wt() {
1489
- let { hasPrimarySidebar: e } = Nt();
1490
- return R(e ? Vt : Ut, {});
1545
+ function Xt() {
1546
+ let { hasPrimarySidebar: e } = zt();
1547
+ return B(e ? qt : Yt, {});
1491
1548
  }
1492
1549
  //#endregion
1493
1550
  //#region src/addons/map/F0Map/components/F0MapSidebarToggle/F0MapSidebarToggle.tsx
1494
- var Gt = j(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o }, s) => {
1495
- let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */ R(c, {
1551
+ var Zt = j(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o }, s) => {
1552
+ let l = i(), u = n ?? (e ? l.map.controls.hidePanel : l.map.controls.showPanel), d = /* @__PURE__ */ B(c, {
1496
1553
  ref: s,
1497
1554
  variant: "ghost",
1498
1555
  size: "md",
@@ -1502,29 +1559,29 @@ var Gt = j(({ expanded: e, onToggle: t, label: n, bare: a = !1, dataTestId: o },
1502
1559
  title: u,
1503
1560
  "aria-label": u,
1504
1561
  "aria-expanded": e,
1505
- children: /* @__PURE__ */ R(Ht, { isExpanded: e })
1562
+ children: /* @__PURE__ */ B(Jt, { isExpanded: e })
1506
1563
  });
1507
- return /* @__PURE__ */ R(r, {
1564
+ return /* @__PURE__ */ B(r, {
1508
1565
  dataTestId: o,
1509
- children: a ? d : /* @__PURE__ */ R(Ae, { children: d })
1566
+ children: a ? d : /* @__PURE__ */ B(je, { children: d })
1510
1567
  });
1511
1568
  });
1512
- Gt.displayName = "F0MapSidebarToggle";
1569
+ Zt.displayName = "F0MapSidebarToggle";
1513
1570
  //#endregion
1514
1571
  //#region src/addons/map/F0Map/utils/arc.ts
1515
- var Kt = (e, t, n = .3, r = 64) => {
1572
+ var Qt = (e, t, n = .3, r = 64) => {
1516
1573
  let [i, a] = e, [o, s] = t, c = (i + o) / 2, l = (a + s) / 2, u = c - (s - a) * n, d = l + (o - i) * n, f = [];
1517
1574
  for (let e = 0; e <= r; e++) {
1518
1575
  let t = e / r, n = 1 - t, c = n * n, l = 2 * n * t, p = t * t;
1519
1576
  f.push([c * i + l * u + p * o, c * a + l * d + p * s]);
1520
1577
  }
1521
1578
  return f;
1522
- }, qt = (e, t) => e.color ?? Ce(e.variant ?? "radical", t), Jt = (e, t) => e.color ?? Ce(e.variant ?? "radical", !t), Yt = ({ id: e, kind: t, coordinates: n, style: r, isDark: i }) => {
1579
+ }, $t = (e, t) => e.color ?? Ce(e.variant ?? "radical", t), en = (e, t) => e.color ?? Ce(e.variant ?? "radical", !t), tn = ({ id: e, kind: t, coordinates: n, style: r, isDark: i }) => {
1523
1580
  let a = r.width ?? 3;
1524
1581
  return {
1525
1582
  id: e,
1526
1583
  coordinates: n,
1527
- color: qt(r, i),
1584
+ color: $t(r, i),
1528
1585
  width: a,
1529
1586
  opacity: r.opacity ?? 1,
1530
1587
  dashed: r.dashed ?? !1,
@@ -1532,28 +1589,28 @@ var Kt = (e, t, n = .3, r = 64) => {
1532
1589
  width: a * 1.6,
1533
1590
  opacity: 1
1534
1591
  } : {
1535
- color: Jt(r, i),
1592
+ color: en(r, i),
1536
1593
  opacity: 1
1537
1594
  }
1538
1595
  };
1539
- }, Xt = ({ adapter: e, routes: t, arcs: n, isDark: r, onRouteClick: i, onArcClick: a }) => {
1540
- let o = F(() => [...t.map((e) => Yt({
1596
+ }, nn = ({ adapter: e, routes: t, arcs: n, isDark: r, onRouteClick: i, onArcClick: a }) => {
1597
+ let o = L(() => [...t.map((e) => tn({
1541
1598
  id: e.id,
1542
1599
  kind: "route",
1543
1600
  coordinates: e.coordinates,
1544
1601
  style: e,
1545
1602
  isDark: r
1546
- })), ...n.map((e) => Yt({
1603
+ })), ...n.map((e) => tn({
1547
1604
  id: e.id,
1548
1605
  kind: "arc",
1549
- coordinates: Kt(e.from, e.to, e.curvature),
1606
+ coordinates: Qt(e.from, e.to, e.curvature),
1550
1607
  style: e,
1551
1608
  isDark: r
1552
1609
  }))], [
1553
1610
  t,
1554
1611
  n,
1555
1612
  r
1556
- ]), s = F(() => new Map([...t.map((e) => [e.id, "route"]), ...n.map((e) => [e.id, "arc"])]), [t, n]), c = I({
1613
+ ]), s = L(() => new Map([...t.map((e) => [e.id, "route"]), ...n.map((e) => [e.id, "arc"])]), [t, n]), c = R({
1557
1614
  onRouteClick: i,
1558
1615
  onArcClick: a,
1559
1616
  kinds: s
@@ -1564,7 +1621,7 @@ var Kt = (e, t, n = .3, r = 64) => {
1564
1621
  kinds: s
1565
1622
  };
1566
1623
  let l = !!(i || a);
1567
- return N(() => {
1624
+ return P(() => {
1568
1625
  e.setLines(o, l ? { onClick: (e) => {
1569
1626
  let { onRouteClick: t, onArcClick: n, kinds: r } = c.current;
1570
1627
  r.get(e) === "arc" ? n?.(e) : t?.(e);
@@ -1573,25 +1630,25 @@ var Kt = (e, t, n = .3, r = 64) => {
1573
1630
  e,
1574
1631
  o,
1575
1632
  l
1576
- ]), N(() => () => e.setLines([]), [e]), null;
1577
- }, Zt = ({ adapter: e, coords: t }) => (N(() => {
1633
+ ]), P(() => () => e.setLines([]), [e]), null;
1634
+ }, rn = ({ adapter: e, coords: t }) => (P(() => {
1578
1635
  e.setCurrentLocation(t);
1579
- }, [e, t]), N(() => () => e.setCurrentLocation(null), [e]), null);
1580
- Zt.displayName = "CurrentLocationLayer";
1636
+ }, [e, t]), P(() => () => e.setCurrentLocation(null), [e]), null);
1637
+ rn.displayName = "CurrentLocationLayer";
1581
1638
  //#endregion
1582
1639
  //#region src/addons/map/F0Map/constants.ts
1583
- var Qt = {
1640
+ var an = {
1584
1641
  curve: 1.42,
1585
1642
  duration: 1400
1586
- }, $t = 200, en = ({ dataTestId: e, className: t }) => /* @__PURE__ */ R(r, {
1643
+ }, on = 200, sn = ({ dataTestId: e, className: t }) => /* @__PURE__ */ B(r, {
1587
1644
  dataTestId: e,
1588
- children: /* @__PURE__ */ R("div", {
1645
+ children: /* @__PURE__ */ B("div", {
1589
1646
  "aria-busy": "true",
1590
1647
  "aria-live": "polite",
1591
1648
  className: a("h-full w-full animate-pulse bg-f1-background-secondary", t)
1592
1649
  })
1593
- }), tn = (e) => {
1594
- let [t, n] = L(null), r = M((t) => {
1650
+ }), cn = (e) => {
1651
+ let [t, n] = z(null), r = M((t) => {
1595
1652
  e && typeof navigator < "u" && navigator.geolocation && navigator.geolocation.getCurrentPosition((e) => {
1596
1653
  let r = [e.coords.longitude, e.coords.latitude];
1597
1654
  n(r), t?.(r);
@@ -1601,7 +1658,7 @@ var Qt = {
1601
1658
  maximumAge: 6e4
1602
1659
  });
1603
1660
  }, [e]);
1604
- return N(() => {
1661
+ return P(() => {
1605
1662
  e && !t && typeof navigator < "u" && navigator.permissions?.query({ name: "geolocation" }).then((e) => {
1606
1663
  e.state === "granted" && r();
1607
1664
  }).catch(() => {});
@@ -1613,8 +1670,8 @@ var Qt = {
1613
1670
  coords: t,
1614
1671
  request: r
1615
1672
  };
1616
- }, nn = () => {
1617
- let [e, t] = L(!1), n = I(null), r = M((e) => {
1673
+ }, ln = () => {
1674
+ let [e, t] = z(!1), n = R(null), r = M((e) => {
1618
1675
  if (n.current?.disconnect(), n.current = null, !e) return;
1619
1676
  let r = () => t(e.closest(".dark") !== null);
1620
1677
  r();
@@ -1625,21 +1682,21 @@ var Qt = {
1625
1682
  });
1626
1683
  n.current = i;
1627
1684
  }, []);
1628
- return N(() => () => n.current?.disconnect(), []), {
1685
+ return P(() => () => n.current?.disconnect(), []), {
1629
1686
  containerRef: r,
1630
1687
  isDark: e
1631
1688
  };
1632
- }, rn = {
1633
- maplibre: async () => (await import("./maplibre-BFO6CAl9.js")).createMaplibreAdapter,
1689
+ }, un = {
1690
+ maplibre: async () => (await import("./maplibre-Dqb2AOHT.js")).createMaplibreAdapter,
1634
1691
  google: async (e) => (await import("./google-DDQ7XfPD.js")).loadGoogleAdapter(e)
1635
- }, an = /* @__PURE__ */ new Map(), on = (e, t) => {
1636
- let n = an.get(e);
1692
+ }, dn = /* @__PURE__ */ new Map(), fn = (e, t) => {
1693
+ let n = dn.get(e);
1637
1694
  if (n) return n;
1638
- let r = rn[e](t).catch((t) => {
1639
- throw an.delete(e), t;
1695
+ let r = un[e](t).catch((t) => {
1696
+ throw dn.delete(e), t;
1640
1697
  });
1641
- return an.set(e, r), r;
1642
- }, sn = {
1698
+ return dn.set(e, r), r;
1699
+ }, pn = {
1643
1700
  version: 8,
1644
1701
  sources: { openmaptiles: {
1645
1702
  type: "vector",
@@ -6527,7 +6584,7 @@ var Qt = {
6527
6584
  ],
6528
6585
  name: "f0-dark",
6529
6586
  metadata: { "f0:generated": !0 }
6530
- }, cn = {
6587
+ }, mn = {
6531
6588
  version: 8,
6532
6589
  sources: { openmaptiles: {
6533
6590
  type: "vector",
@@ -11415,7 +11472,7 @@ var Qt = {
11415
11472
  ],
11416
11473
  name: "f0-light",
11417
11474
  metadata: { "f0:generated": !0 }
11418
- }, ln = [
11475
+ }, hn = [
11419
11476
  {
11420
11477
  featureType: "landscape",
11421
11478
  elementType: "geometry.fill",
@@ -11571,7 +11628,7 @@ var Qt = {
11571
11628
  elementType: "labels.icon",
11572
11629
  stylers: [{ visibility: "off" }]
11573
11630
  }
11574
- ], un = [
11631
+ ], gn = [
11575
11632
  {
11576
11633
  featureType: "landscape",
11577
11634
  elementType: "geometry.fill",
@@ -11727,44 +11784,44 @@ var Qt = {
11727
11784
  elementType: "labels.icon",
11728
11785
  stylers: [{ visibility: "off" }]
11729
11786
  }
11730
- ], dn = {
11787
+ ], _n = {
11731
11788
  provider: "maplibre",
11732
- light: cn,
11733
- dark: sn
11734
- }, fn = {
11789
+ light: mn,
11790
+ dark: pn
11791
+ }, vn = {
11735
11792
  provider: "google",
11736
- light: un,
11737
- dark: ln
11738
- }, pn = (e, t) => ({
11793
+ light: gn,
11794
+ dark: hn
11795
+ }, yn = (e, t) => ({
11739
11796
  featureType: e,
11740
11797
  elementType: t,
11741
11798
  stylers: [{ visibility: "off" }]
11742
- }), mn = [
11743
- pn("poi", "labels"),
11744
- pn("transit", "labels"),
11745
- pn("road", "labels.icon")
11746
- ], hn = {
11799
+ }), bn = [
11800
+ yn("poi", "labels"),
11801
+ yn("transit", "labels"),
11802
+ yn("road", "labels.icon")
11803
+ ], xn = {
11747
11804
  provider: "google",
11748
- light: mn,
11749
- dark: mn
11750
- }, gn = (e) => e === "google" ? hn : dn, _n = (e, t, n) => {
11805
+ light: bn,
11806
+ dark: bn
11807
+ }, Sn = (e) => e === "google" ? xn : _n, Cn = (e, t, n) => {
11751
11808
  let r = e.on(t, () => {
11752
11809
  r(), n();
11753
11810
  });
11754
11811
  return r;
11755
- }, vn = {
11812
+ }, wn = {
11756
11813
  center: [2.154, 41.39],
11757
11814
  zoom: 11
11758
- }, yn = (e, t, n, r) => [
11815
+ }, Tn = (e, t, n, r) => [
11759
11816
  ...e.map((e) => e.coordinates),
11760
11817
  ...t.flatMap((e) => e.coordinates),
11761
11818
  ...n.flatMap((e) => [e.from, e.to]),
11762
- ...r.flatMap((e) => he(e.center, e.radiusMeters))
11763
- ], bn = (e) => e.top === 0 && e.right === 0 && e.bottom === 0 && e.left === 0, xn = ({ adapter: e, points: t, animate: n, routes: r = [], arcs: i = [], areas: a = [], gutter: o = 64, inset: s, size: c }) => {
11764
- let l = yn(t, r, i, a);
11819
+ ...r.flatMap((e) => pe(e.center, e.radiusMeters))
11820
+ ], En = (e) => e.top === 0 && e.right === 0 && e.bottom === 0 && e.left === 0, Dn = ({ adapter: e, points: t, animate: n, routes: r = [], arcs: i = [], areas: a = [], gutter: o = 64, inset: s, size: c }) => {
11821
+ let l = Tn(t, r, i, a);
11765
11822
  if (l.length === 0) return;
11766
11823
  let u = a.length > 0 ? 17 : 15;
11767
- if (l.length > 1 && bn(s)) {
11824
+ if (l.length > 1 && En(s)) {
11768
11825
  e.fitCoordinates(l, {
11769
11826
  gutter: o,
11770
11827
  maxZoom: u,
@@ -11773,9 +11830,9 @@ var Qt = {
11773
11830
  return;
11774
11831
  }
11775
11832
  let d = l.length === 1 ? {
11776
- center: ue(e, l[0], s, 14),
11833
+ center: H(e, l[0], s, 14),
11777
11834
  zoom: 14
11778
- } : de({
11835
+ } : le({
11779
11836
  adapter: e,
11780
11837
  coordinates: l,
11781
11838
  inset: s,
@@ -11784,228 +11841,237 @@ var Qt = {
11784
11841
  maxZoom: u
11785
11842
  });
11786
11843
  d && (n ? e.easeTo(d, { animate: n }) : e.jumpTo(d, { animate: n }));
11787
- }, Sn = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, Cn = j(function({ markers: e = [], routes: o = [], arcs: s = [], areas: c = [], onRouteClick: l, onArcClick: d, selectedMarkerId: f, defaultSelectedMarkerId: p = null, onMarkerSelect: m, onMarkerDrag: h, onMarkerDragEnd: g, highlightedId: _ = null, viewportInset: v, centerOnMarkerClick: y = !1, fitToMarkers: b, initialViewport: x, mapStyle: S, interactive: C = !0, gestureHandling: w, minZoom: ee, maxZoom: T = 18, showControls: E = !0, controlLabels: te, showCurrentLocation: D = !1, fullScreen: O = !1, onSidebarToggle: k, sidebarExpanded: A = !1, sidebarToggleAddon: j, sidebarHeaderStart: ne, sidebar: P, detail: F, detailOpen: oe = !1, clearSelectionOnBackgroundClick: fe = !0, projection: pe = "mercator", provider: me, loading: he = !1, ariaLabel: ge, dataTestId: _e, className: ve }, ye) {
11788
- let be = w ?? (O ? "greedy" : "cooperative"), B = i(), V = t(me), xe = n(), H = I(null), U = I(null), [W, G] = L(null), [K, Se] = L(!1), [Ce, we] = L(!1), [Ee, De] = L(0), Oe = re(), q = u(), { containerRef: ke, isDark: Me } = nn(), Pe = M((e) => {
11789
- H.current = e, ke(e);
11790
- }, [ke]), Fe = Me, Ie = !S || S.provider === V, Le = Ie ? S ?? gn(V) : gn(V), Re = Fe ? Le.dark : Le.light, ze = I(!1);
11791
- N(() => {
11792
- Ie || ze.current || (ze.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${V}" engine - the shapes are not interchangeable. Pass a "${V}" style, or none for its default look.`));
11844
+ }, On = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, kn = j(function({ markers: e = [], routes: o = [], arcs: s = [], areas: c = [], onRouteClick: l, onArcClick: d, selectedMarkerId: f, defaultSelectedMarkerId: p = null, onMarkerSelect: m, onMarkerDrag: h, onMarkerDragEnd: g, highlightedId: _ = null, viewportInset: v, centerOnMarkerClick: y = !1, fitToMarkers: b, initialViewport: x, mapStyle: S, interactive: C = !0, gestureHandling: w, minZoom: ee, maxZoom: T = 18, showControls: E = !0, controlLabels: D, showCurrentLocation: te = !1, fullScreen: ne = !1, onSidebarToggle: O, sidebarExpanded: k = !1, sidebarToggleAddon: A, sidebarHeaderStart: j, sidebar: N, detail: I, detailOpen: L = !1, clearSelectionOnBackgroundClick: ae = !0, projection: ue = "mercator", provider: de, loading: fe = !1, ariaLabel: pe, dataTestId: me, className: he }, ge) {
11845
+ let _e = w ?? (ne ? "greedy" : "cooperative"), U = i(), W = t(de), ve = n(), ye = R(null), G = R(null), [K, be] = z(null), [q, xe] = z(!1), [Se, Ce] = z(!1), [we, Ee] = z(0), De = re(), J = u(), { containerRef: Oe, isDark: ke } = ln(), Ne = M((e) => {
11846
+ ye.current = e, Oe(e);
11847
+ }, [Oe]), Fe = ke, Ie = !S || S.provider === W, Le = Ie ? S ?? Sn(W) : Sn(W), Re = Fe ? Le.dark : Le.light, ze = R(!1);
11848
+ P(() => {
11849
+ Ie || ze.current || (ze.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${W}" engine - the shapes are not interchangeable. Pass a "${W}" style, or none for its default look.`));
11793
11850
  }, [
11794
11851
  Ie,
11795
11852
  S?.provider,
11796
- V
11853
+ W
11797
11854
  ]);
11798
- let [Be, Ve] = L(p), He = f === void 0 ? Be : f, Ue = M((e) => {
11855
+ let [Be, Ve] = z(p), X = f === void 0 ? Be : f, He = M((e) => {
11799
11856
  f === void 0 && Ve(e), m?.(e);
11800
- }, [f, m]), X = A && !!k, We = oe && !!F, Ge = X ? J.inset + J.listWidth + J.gap : J.inset, Ke = X ? J.inset : J.inset + J.toggleSize + J.gap, qe = We ? Ge + J.detailWidth : X ? J.inset + J.listWidth : null, Je = se(v, { left: qe === null ? 0 : qe + J.gap }), Z = I(e);
11801
- Z.current = e;
11802
- let Ye = I(o);
11803
- Ye.current = o;
11804
- let Xe = I(s);
11805
- Xe.current = s;
11806
- let Ze = I(c);
11807
- Ze.current = c;
11808
- let Qe = I(pe);
11809
- Qe.current = pe;
11810
- let $e = I(Ue);
11811
- $e.current = Ue;
11812
- let et = I(He);
11813
- et.current = He;
11814
- let tt = I(Je);
11815
- tt.current = Je;
11816
- let nt = I(fe);
11817
- nt.current = fe;
11818
- let Q = I(null), rt = b ?? x === void 0, $ = M(() => {
11857
+ }, [f, m]), Z = k && !!O, Ue = L && !!I, We = Z ? Y.inset + Y.listWidth + Y.gap : Y.inset, Ge = Z ? Y.inset : Y.inset + Y.toggleSize + Y.gap, Ke = Ue ? We + Y.detailWidth : Z ? Y.inset + Y.listWidth : null, qe = oe(v, { left: Ke === null ? 0 : Ke + Y.gap }), Q = R(e);
11858
+ Q.current = e;
11859
+ let Je = R(o);
11860
+ Je.current = o;
11861
+ let Ye = R(s);
11862
+ Ye.current = s;
11863
+ let Xe = R(c);
11864
+ Xe.current = c;
11865
+ let Ze = R(ue);
11866
+ Ze.current = ue;
11867
+ let Qe = R(He);
11868
+ Qe.current = He;
11869
+ let $e = R(X);
11870
+ $e.current = X;
11871
+ let et = R(qe);
11872
+ et.current = qe;
11873
+ let tt = R(ae);
11874
+ tt.current = ae;
11875
+ let nt = R(null), rt = b ?? x === void 0, $ = M(() => {
11819
11876
  let e = {
11820
- width: H.current?.clientWidth ?? 0,
11821
- height: H.current?.clientHeight ?? 0
11877
+ width: ye.current?.clientWidth ?? 0,
11878
+ height: ye.current?.clientHeight ?? 0
11822
11879
  };
11823
11880
  return {
11824
- inset: ce(tt.current, e),
11881
+ inset: se(et.current, e),
11825
11882
  size: e
11826
11883
  };
11827
11884
  }, []), it = M((e, t) => {
11828
- Q.current = { kind: "fit" }, xn({
11885
+ nt.current = { kind: "fit" }, Dn({
11829
11886
  adapter: e,
11830
- points: Z.current,
11887
+ points: Q.current,
11831
11888
  animate: t,
11832
- routes: Ye.current,
11833
- arcs: Xe.current,
11834
- areas: Ze.current,
11889
+ routes: Je.current,
11890
+ arcs: Ye.current,
11891
+ areas: Xe.current,
11835
11892
  ...$()
11836
11893
  });
11837
- }, [$]), at = I(it);
11894
+ }, [$]), at = R(it);
11838
11895
  at.current = it;
11839
11896
  let ot = M((e, t) => {
11840
11897
  let n = Math.max(e.getZoom(), 15);
11841
- Q.current = {
11898
+ nt.current = {
11842
11899
  kind: "flight",
11843
11900
  zoom: n
11844
11901
  };
11845
11902
  let { inset: r } = $();
11846
11903
  e.easeTo({
11847
- center: ue(e, t.coordinates, r, n),
11904
+ center: H(e, t.coordinates, r, n),
11848
11905
  zoom: n
11849
- }, { animate: !q });
11850
- }, [$, q]), st = M((e) => {
11851
- let t = U.current, n = Z.current.find((t) => t.id === e);
11852
- if (Q.current = null, y && t && n) {
11906
+ }, { animate: !J });
11907
+ }, [$, J]), st = M((e) => {
11908
+ let t = G.current, n = Q.current.find((t) => t.id === e);
11909
+ if (nt.current = null, y && t && n) {
11853
11910
  let { inset: e } = $();
11854
- t.easeTo({ center: ue(t, n.coordinates, e) }, { animate: !q });
11911
+ t.easeTo({ center: H(t, n.coordinates, e) }, { animate: !J });
11855
11912
  }
11856
- $e.current(e);
11913
+ Qe.current(e);
11857
11914
  }, [
11858
11915
  y,
11859
11916
  $,
11860
- q
11861
- ]), ct = I(!1);
11862
- N(() => {
11917
+ J
11918
+ ]), ct = R(!1);
11919
+ P(() => {
11863
11920
  ct.current || e.length <= 200 || (ct.current = !0, console.warn(`F0Map: ${e.length} markers exceeds the recommended maximum of 200. Markers are DOM elements - pan/zoom will degrade. Aggregate or filter the data, or wait for a GL clustering path.`));
11864
11921
  }, [e.length]);
11865
- let { coords: dt, request: ft } = tn(D), pt = M(() => {
11866
- Q.current = null, U.current?.zoomIn();
11867
- }, []), mt = M(() => {
11868
- Q.current = null, U.current?.zoomOut();
11869
- }, []), ht = M(() => {
11870
- U.current && it(U.current, !q);
11871
- }, [it, q]), gt = M(() => {
11872
- ft((e) => {
11873
- let t = U.current;
11922
+ let { coords: lt, request: ut } = cn(te), dt = M(() => {
11923
+ nt.current = null, G.current?.zoomIn();
11924
+ }, []), ft = M(() => {
11925
+ nt.current = null, G.current?.zoomOut();
11926
+ }, []), pt = M(() => {
11927
+ G.current && it(G.current, !J);
11928
+ }, [it, J]), mt = M(() => {
11929
+ ut((e) => {
11930
+ let t = G.current;
11874
11931
  if (!t) return;
11875
- Q.current = null;
11932
+ nt.current = null;
11876
11933
  let n = Math.max(t.getZoom(), 13), { inset: r } = $();
11877
11934
  t.flyTo({
11878
- center: ue(t, e, r, n),
11935
+ center: H(t, e, r, n),
11879
11936
  zoom: n
11880
- }, { animate: !q });
11937
+ }, { animate: !J });
11881
11938
  });
11882
11939
  }, [
11883
- ft,
11940
+ ut,
11884
11941
  $,
11885
- q
11886
- ]), _t = M((e) => {
11887
- let t = U.current;
11942
+ J
11943
+ ]), _t = Math.min(16, T), vt = M((e) => {
11944
+ let t = G.current;
11888
11945
  if (!t) return;
11889
- Q.current = null;
11890
- let n = de({
11946
+ nt.current = null;
11947
+ let n = $(), r = le({
11891
11948
  adapter: t,
11892
11949
  coordinates: e,
11893
- ...$(),
11950
+ ...n,
11894
11951
  gutter: 64,
11895
- maxZoom: 16
11952
+ maxZoom: _t
11896
11953
  });
11897
- n && (q ? t.jumpTo(n, { animate: !1 }) : t.flyTo(n));
11898
- }, [$, q]), vt = M((e) => {
11899
- let t = U.current, n = Z.current.find((t) => t.id === e);
11900
- t && n && ot(t, n), Ue(e);
11901
- }, [ot, Ue]);
11902
- N(() => {
11903
- if (!We || He === null) return;
11954
+ if (!r) return;
11955
+ let i = Math.min(t.getZoom() + 1, _t), a = t.cameraForCoordinates(e, { gutter: 64 }), o = (r.zoom ?? 0) >= i || !a ? r : {
11956
+ center: H(t, a.center, n.inset, i),
11957
+ zoom: i
11958
+ };
11959
+ J ? t.jumpTo(o, { animate: !1 }) : t.flyTo(o);
11960
+ }, [
11961
+ $,
11962
+ J,
11963
+ _t
11964
+ ]), yt = M((e) => {
11965
+ let t = G.current, n = Q.current.find((t) => t.id === e);
11966
+ t && n && ot(t, n), He(e);
11967
+ }, [ot, He]);
11968
+ P(() => {
11969
+ if (!Ue || X === null) return;
11904
11970
  let e = (e) => {
11905
- e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), $e.current(null));
11906
- }, t = H.current?.ownerDocument ?? document;
11971
+ e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), Qe.current(null));
11972
+ }, t = ye.current?.ownerDocument ?? document;
11907
11973
  return t.addEventListener("keydown", e), () => t.removeEventListener("keydown", e);
11908
- }, [We, He]), ie(ye, () => ({
11909
- getNativeMap: () => U.current?.native() ?? null,
11974
+ }, [Ue, X]), F(ge, () => ({
11975
+ getNativeMap: () => G.current?.native() ?? null,
11910
11976
  focusMarker: (e) => {
11911
- let t = U.current, n = Z.current.find((t) => t.id === e);
11912
- t && n && (ot(t, n), $e.current(e));
11977
+ let t = G.current, n = Q.current.find((t) => t.id === e);
11978
+ t && n && (ot(t, n), Qe.current(e));
11913
11979
  },
11914
11980
  fitToMarkers: () => {
11915
- U.current && it(U.current, !q);
11981
+ G.current && it(G.current, !J);
11916
11982
  },
11917
- clearSelection: () => $e.current(null)
11983
+ clearSelection: () => Qe.current(null)
11918
11984
  }), [
11919
11985
  it,
11920
11986
  ot,
11921
- q
11987
+ J
11922
11988
  ]);
11923
- let yt = I(Re);
11924
- yt.current = Re;
11925
- let bt = I(xe);
11926
- bt.current = xe;
11927
- let xt = I(null), St = I(x ?? vn);
11928
- N(() => {
11929
- if (he) return;
11930
- let e = H.current;
11989
+ let bt = R(Re);
11990
+ bt.current = Re;
11991
+ let xt = R(ve);
11992
+ xt.current = ve;
11993
+ let St = R(null), Ct = R(x ?? wn);
11994
+ P(() => {
11995
+ if (fe) return;
11996
+ let e = ye.current;
11931
11997
  if (!e) return;
11932
- xt.current = yt.current;
11933
- let t = St.current, n = null, r = !1, i = [];
11934
- return on(V, bt.current).then((i) => {
11998
+ St.current = bt.current;
11999
+ let t = Ct.current, n = null, r = !1, i = [];
12000
+ return fn(W, xt.current).then((i) => {
11935
12001
  if (!r) {
11936
12002
  try {
11937
12003
  n = i({
11938
12004
  container: e,
11939
- style: yt.current,
12005
+ style: bt.current,
11940
12006
  center: t.center,
11941
- zoom: t.zoom ?? vn.zoom,
12007
+ zoom: t.zoom ?? wn.zoom,
11942
12008
  minZoom: ee,
11943
12009
  maxZoom: T,
11944
12010
  interactive: C,
11945
- cooperativeGestures: be === "cooperative"
12011
+ cooperativeGestures: _e === "cooperative"
11946
12012
  });
11947
12013
  } catch {
11948
- Se(!0);
12014
+ xe(!0);
11949
12015
  return;
11950
12016
  }
11951
12017
  a(n);
11952
12018
  }
11953
12019
  }).catch((e) => {
11954
- console.error("[F0Map] could not load the map engine", e), r || we(!0);
12020
+ console.error("[F0Map] could not load the map engine", e), r || Ce(!0);
11955
12021
  }), () => {
11956
- r = !0, i.forEach((e) => e()), n && (U.current = null, G(null), n.destroy());
12022
+ r = !0, i.forEach((e) => e()), n && (G.current = null, be(null), n.destroy());
11957
12023
  };
11958
12024
  function a(e) {
11959
- U.current = e, G(e), Se(!1);
12025
+ G.current = e, be(e), xe(!1);
11960
12026
  let t = !1;
11961
- i.push(_n(e, "ready", () => {
11962
- t = !0, we(!1), e.resize(), rt && xn({
12027
+ i.push(Cn(e, "ready", () => {
12028
+ t = !0, Ce(!1), e.resize(), rt && Dn({
11963
12029
  adapter: e,
11964
- points: Z.current,
12030
+ points: Q.current,
11965
12031
  animate: !1,
11966
- routes: Ye.current,
11967
- arcs: Xe.current,
11968
- areas: Ze.current,
12032
+ routes: Je.current,
12033
+ arcs: Ye.current,
12034
+ areas: Xe.current,
11969
12035
  ...$()
11970
- }), e.setGlobeProjection(Qe.current === "globe");
12036
+ }), e.setGlobeProjection(Ze.current === "globe");
11971
12037
  }), e.on("error", () => {
11972
- t || we(!0);
12038
+ t || Ce(!0);
11973
12039
  }), e.on("click", () => {
11974
- nt.current && $e.current(null);
12040
+ tt.current && Qe.current(null);
11975
12041
  }));
11976
12042
  }
11977
12043
  }, [
11978
- he,
12044
+ fe,
11979
12045
  C,
11980
- be,
12046
+ _e,
11981
12047
  ee,
11982
12048
  T,
11983
12049
  rt,
11984
- V,
11985
- Ee
11986
- ]), N(() => {
11987
- let e = U.current;
11988
- e && xt.current !== Re && (xt.current = Re, e.applyStyle(Re), _n(e, "styled", () => e.setGlobeProjection(Qe.current === "globe")));
11989
- }, [Re]), N(() => {
11990
- U.current?.setGlobeProjection(pe === "globe");
11991
- }, [pe]);
11992
- let Ct = I(ot);
11993
- Ct.current = ot, N(() => {
12050
+ W,
12051
+ we
12052
+ ]), P(() => {
12053
+ let e = G.current;
12054
+ e && St.current !== Re && (St.current = Re, e.applyStyle(Re), Cn(e, "styled", () => e.setGlobeProjection(Ze.current === "globe")));
12055
+ }, [Re]), P(() => {
12056
+ G.current?.setGlobeProjection(ue === "globe");
12057
+ }, [ue]);
12058
+ let wt = R(ot);
12059
+ wt.current = ot, P(() => {
11994
12060
  if (!_) return;
11995
- let e = U.current, t = Z.current.find((e) => e.id === _);
11996
- e && t && Ct.current(e, t);
12061
+ let e = G.current, t = Q.current.find((e) => e.id === _);
12062
+ e && t && wt.current(e, t);
11997
12063
  }, [_]);
11998
- let wt = Sn(Je), Tt = I(null);
11999
- N(() => {
12000
- let e = Tt.current;
12001
- Tt.current = tt.current;
12002
- let t = U.current;
12064
+ let Tt = On(qe), Et = R(null);
12065
+ P(() => {
12066
+ let e = Et.current;
12067
+ Et.current = et.current;
12068
+ let t = G.current;
12003
12069
  if (!e || !t) return;
12004
- let { inset: n, size: r } = $(), i = Q.current, a = !q, o = Z.current.find((e) => e.id === et.current);
12070
+ let { inset: n, size: r } = $(), i = nt.current, a = !J, o = Q.current.find((e) => e.id === $e.current);
12005
12071
  if (o) {
12006
12072
  let e = i?.kind === "flight" ? i.zoom : void 0;
12007
12073
  t.easeTo({
12008
- center: ue(t, o.coordinates, n, e),
12074
+ center: H(t, o.coordinates, n, e),
12009
12075
  zoom: e
12010
12076
  }, { animate: a });
12011
12077
  return;
@@ -12014,153 +12080,154 @@ var Qt = {
12014
12080
  at.current(t, a);
12015
12081
  return;
12016
12082
  }
12017
- let s = le(ce(e, r)), c = le(n), l = t.project(t.getCenter()), u = l && t.unproject({
12083
+ let s = ce(se(e, r)), c = ce(n), l = t.project(t.getCenter()), u = l && t.unproject({
12018
12084
  x: l.x + s.x - c.x,
12019
12085
  y: l.y + s.y - c.y
12020
12086
  });
12021
12087
  u && t.easeTo({ center: u }, { animate: a });
12022
- }, [wt, $]);
12023
- let Et = o.length > 0 || s.length > 0, Dt = qe === null ? 0 : qe + J.gap - J.inset, Ot = I({
12024
- from: Dt,
12025
- to: Dt
12088
+ }, [Tt, $]);
12089
+ let Dt = o.length > 0 || s.length > 0, Ot = Ke === null ? 0 : Ke + Y.gap - Y.inset, kt = R({
12090
+ from: Ot,
12091
+ to: Ot
12026
12092
  });
12027
- Ot.current.to !== Dt && (Ot.current = {
12028
- from: Ot.current.to,
12029
- to: Dt
12093
+ kt.current.to !== Ot && (kt.current = {
12094
+ from: kt.current.to,
12095
+ to: Ot
12030
12096
  });
12031
- let kt = Dt > Ot.current.from ? Y.enter : Y.exit, At = X ? Y.enter : Y.exit;
12032
- return /* @__PURE__ */ R(r, {
12033
- dataTestId: _e,
12034
- children: he ? /* @__PURE__ */ R(en, { className: ve }) : /* @__PURE__ */ z("div", {
12035
- ref: Pe,
12097
+ let At = Ot > kt.current.from ? Ae.enter : Ae.exit, jt = Z ? Ae.enter : Ae.exit;
12098
+ return /* @__PURE__ */ B(r, {
12099
+ dataTestId: me,
12100
+ children: fe ? /* @__PURE__ */ B(sn, { className: he }) : /* @__PURE__ */ V("div", {
12101
+ ref: Ne,
12036
12102
  role: "region",
12037
- "aria-label": ge ?? B.map.region,
12038
- className: a("f0-map relative h-full w-full overflow-hidden", Fe && "dark", !O && "rounded-2xl border border-solid border-f1-border-secondary", ve),
12103
+ "aria-label": pe ?? U.map.region,
12104
+ className: a("f0-map relative h-full w-full overflow-hidden", Fe && "dark", !ne && "rounded-2xl border border-solid border-f1-border-secondary", he),
12039
12105
  children: [
12040
- /* @__PURE__ */ R("a", {
12041
- href: `#${Oe}`,
12106
+ /* @__PURE__ */ B("a", {
12107
+ href: `#${De}`,
12042
12108
  className: "sr-only rounded-md focus:not-sr-only focus:absolute focus:left-2 focus:top-2 focus:z-30 focus:bg-f1-background focus:px-3 focus:py-2 focus:text-sm focus:text-f1-foreground focus:shadow-md focus:outline-none focus:ring-1 focus:ring-f1-special-ring",
12043
- children: B.map.skipToList
12109
+ children: U.map.skipToList
12044
12110
  }),
12045
- /* @__PURE__ */ R("div", {
12111
+ /* @__PURE__ */ B("div", {
12046
12112
  role: "status",
12047
12113
  "aria-live": "polite",
12048
12114
  className: "sr-only",
12049
- children: `${e.length} ${e.length === 1 ? B.map.location : B.map.locations}`
12115
+ children: `${e.length} ${e.length === 1 ? U.map.location : U.map.locations}`
12050
12116
  }),
12051
- !K && W && c.length > 0 ? /* @__PURE__ */ R(Te, {
12052
- adapter: W,
12117
+ !q && K && c.length > 0 ? /* @__PURE__ */ B(Te, {
12118
+ adapter: K,
12053
12119
  areas: c,
12054
12120
  isDark: Fe
12055
12121
  }) : null,
12056
- !K && W && dt ? /* @__PURE__ */ z(ae, { children: [/* @__PURE__ */ R(Zt, {
12057
- adapter: W,
12058
- coords: dt
12059
- }), /* @__PURE__ */ R("span", {
12122
+ !q && K && lt ? /* @__PURE__ */ V(ie, { children: [/* @__PURE__ */ B(rn, {
12123
+ adapter: K,
12124
+ coords: lt
12125
+ }), /* @__PURE__ */ B("span", {
12060
12126
  className: "sr-only",
12061
- children: B.map.currentLocation
12127
+ children: U.map.currentLocation
12062
12128
  })] }) : null,
12063
- !K && W && Et ? /* @__PURE__ */ R(Xt, {
12064
- adapter: W,
12129
+ !q && K && Dt ? /* @__PURE__ */ B(nn, {
12130
+ adapter: K,
12065
12131
  routes: o,
12066
12132
  arcs: s,
12067
12133
  isDark: Fe,
12068
12134
  onRouteClick: l,
12069
12135
  onArcClick: d
12070
12136
  }) : null,
12071
- !K && W && e.length > 0 ? /* @__PURE__ */ R(lt, {
12072
- adapter: W,
12137
+ !q && K && e.length > 0 ? /* @__PURE__ */ B(ht, {
12138
+ adapter: K,
12073
12139
  points: e,
12074
- selectedId: He,
12140
+ selectedId: X,
12075
12141
  highlightedId: _,
12076
12142
  onSelect: st,
12077
12143
  onMarkerDrag: h,
12078
12144
  onMarkerDragEnd: g,
12079
- onClusterExpand: _t
12145
+ onClusterExpand: vt,
12146
+ expandZoom: _t
12080
12147
  }) : null,
12081
- !K && W && F ? /* @__PURE__ */ R(ut, {
12082
- open: We,
12083
- offsetX: Ge,
12084
- offsetY: Ke,
12085
- width: J.detailWidth,
12148
+ !q && K && I ? /* @__PURE__ */ B(gt, {
12149
+ open: Ue,
12150
+ offsetX: We,
12151
+ offsetY: Ge,
12152
+ width: Y.detailWidth,
12086
12153
  entrance: "grow",
12087
- ariaLabel: B.map.detailPanel,
12088
- children: F
12154
+ ariaLabel: U.map.detailPanel,
12155
+ children: I
12089
12156
  }) : null,
12090
- !K && W && k ? /* @__PURE__ */ R("div", {
12091
- className: a("absolute left-2 top-2 z-10", X && "opacity-0"),
12157
+ !q && K && O ? /* @__PURE__ */ B("div", {
12158
+ className: a("absolute left-2 top-2 z-10", Z && "opacity-0"),
12092
12159
  style: {
12093
- transitionProperty: q ? "none" : "opacity",
12094
- transitionDuration: At.duration,
12095
- transitionTimingFunction: At.easing
12160
+ transitionProperty: J ? "none" : "opacity",
12161
+ transitionDuration: jt.duration,
12162
+ transitionTimingFunction: jt.easing
12096
12163
  },
12097
- children: /* @__PURE__ */ z("div", {
12164
+ children: /* @__PURE__ */ V("div", {
12098
12165
  className: "flex items-start gap-2",
12099
- "aria-hidden": X || void 0,
12166
+ "aria-hidden": Z || void 0,
12100
12167
  ref: (e) => {
12101
- X ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
12168
+ Z ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
12102
12169
  },
12103
- children: [/* @__PURE__ */ R(Gt, {
12170
+ children: [/* @__PURE__ */ B(Zt, {
12104
12171
  expanded: !1,
12105
- onToggle: k
12106
- }), j ? /* @__PURE__ */ R(Ae, { children: j }) : null]
12172
+ onToggle: O
12173
+ }), A ? /* @__PURE__ */ B(je, { children: A }) : null]
12107
12174
  })
12108
12175
  }) : null,
12109
- !K && W && k ? /* @__PURE__ */ R(ut, {
12110
- open: X,
12111
- offsetX: J.inset,
12112
- width: J.listWidth,
12113
- headerStart: ne,
12114
- headerEnd: /* @__PURE__ */ R(Gt, {
12176
+ !q && K && O ? /* @__PURE__ */ B(gt, {
12177
+ open: Z,
12178
+ offsetX: Y.inset,
12179
+ width: Y.listWidth,
12180
+ headerStart: j,
12181
+ headerEnd: /* @__PURE__ */ B(Zt, {
12115
12182
  expanded: !0,
12116
- onToggle: k,
12183
+ onToggle: O,
12117
12184
  bare: !0,
12118
12185
  dataTestId: "map-panel-toggle-open"
12119
12186
  }),
12120
- children: P
12187
+ children: N
12121
12188
  }) : null,
12122
- !K && W && E && C ? /* @__PURE__ */ R("div", {
12123
- className: a("absolute left-2 z-10", V === "google" ? "bottom-8" : "bottom-2"),
12189
+ !q && K && E && C ? /* @__PURE__ */ B("div", {
12190
+ className: a("absolute left-2 z-10", W === "google" ? "bottom-8" : "bottom-2"),
12124
12191
  style: {
12125
- transform: `translateX(${Dt}px)`,
12126
- transitionProperty: q ? "none" : "transform",
12127
- transitionDuration: kt.duration,
12128
- transitionTimingFunction: kt.easing
12192
+ transform: `translateX(${Ot}px)`,
12193
+ transitionProperty: J ? "none" : "transform",
12194
+ transitionDuration: At.duration,
12195
+ transitionTimingFunction: At.easing
12129
12196
  },
12130
- children: /* @__PURE__ */ R(je, {
12131
- onZoomIn: pt,
12132
- onZoomOut: mt,
12133
- onFit: e.length > 0 || Et || c.length > 0 ? ht : void 0,
12134
- onLocate: gt,
12135
- labels: te
12197
+ children: /* @__PURE__ */ B(Me, {
12198
+ onZoomIn: dt,
12199
+ onZoomOut: ft,
12200
+ onFit: e.length > 0 || Dt || c.length > 0 ? pt : void 0,
12201
+ onLocate: mt,
12202
+ labels: D
12136
12203
  })
12137
12204
  }) : null,
12138
- Ce && !K ? /* @__PURE__ */ z("div", {
12205
+ Se && !q ? /* @__PURE__ */ V("div", {
12139
12206
  className: "absolute inset-x-0 top-0 z-30 flex items-center justify-between gap-3 border-b border-solid border-f1-border-secondary bg-f1-background px-4 py-2 text-sm text-f1-foreground",
12140
- children: [/* @__PURE__ */ R("span", { children: B.map.loadError }), /* @__PURE__ */ R("button", {
12207
+ children: [/* @__PURE__ */ B("span", { children: U.map.loadError }), /* @__PURE__ */ B("button", {
12141
12208
  type: "button",
12142
12209
  onClick: () => {
12143
- we(!1);
12144
- let e = U.current;
12145
- e ? e.applyStyle(yt.current) : De((e) => e + 1);
12210
+ Ce(!1);
12211
+ let e = G.current;
12212
+ e ? e.applyStyle(bt.current) : Ee((e) => e + 1);
12146
12213
  },
12147
12214
  className: "font-medium underline",
12148
- children: B.map.retry
12215
+ children: U.map.retry
12149
12216
  })]
12150
12217
  }) : null,
12151
- /* @__PURE__ */ R(Ne, {
12152
- id: Oe,
12153
- label: B.map.listLabel,
12218
+ /* @__PURE__ */ B(Pe, {
12219
+ id: De,
12220
+ label: U.map.listLabel,
12154
12221
  points: e,
12155
- selectedId: He,
12156
- onSelect: vt,
12157
- visible: K
12222
+ selectedId: X,
12223
+ onSelect: yt,
12224
+ visible: q
12158
12225
  })
12159
12226
  ]
12160
12227
  })
12161
12228
  });
12162
12229
  });
12163
- Cn.displayName = "F0Map";
12164
- var wn = Cn;
12230
+ kn.displayName = "F0Map";
12231
+ var An = kn;
12165
12232
  //#endregion
12166
- export { vt as _, hn as a, Ne as b, $t as c, Ht as d, It as f, xt as g, Nt as h, fn as i, Gt as l, At as m, gn as n, en as o, Mt as p, dn as r, Qt as s, wn as t, Wt as u, ut as v, je as x, Ke as y };
12233
+ export { wt as _, xn as a, Pe as b, on as c, Jt as d, Ht as f, Dt as g, zt as h, vn as i, Zt as l, It as m, Sn as n, sn as o, Rt as p, _n as r, an as s, An as t, Xt as u, gt as v, Me as x, Je as y };