@pieai/swimmer-ui-kit 2.13.0 → 2.14.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.
@@ -1,12 +1,19 @@
1
- import { _ as e, g as t, m as n, p as r, r as i, s as a, t as o, u as s } from "./liquidGooeySpring-WwyGKGPL.js";
1
+ import { _ as e, g as t, m as n, p as r, r as i, s as a, t as o, u as s } from "./liquidGooeySpring-r7c1S2ZB.js";
2
2
  import { useEffect as c, useId as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
3
3
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
4
4
  import { createPortal as g } from "react-dom";
5
5
  import { FloatingPortal as _, autoUpdate as v, computePosition as y, flip as b, hide as x, offset as S, shift as C, size as w } from "@floating-ui/react";
6
- function T(e, t, n) {
6
+ //#region src/liquidMaterialLight.ts
7
+ var T = "var(--liquid-presence-from, var(--game-ui-secondary))", E = "var(--liquid-presence-to, var(--game-ui-secondary))", D = [
8
+ [0, `color-mix(in srgb, ${T}, white 18%)`],
9
+ [.16, `color-mix(in srgb, ${T}, white 9%)`],
10
+ [.55, `color-mix(in srgb, ${T}, ${E})`],
11
+ [1, `color-mix(in srgb, ${E}, black 5%)`]
12
+ ];
13
+ function O(e, t, n) {
7
14
  return Number.isFinite(e) ? Math.max(t, Math.min(n, e)) : t;
8
15
  }
9
- function E(e) {
16
+ function k(e) {
10
17
  return !!(e && [
11
18
  e.x,
12
19
  e.y,
@@ -14,23 +21,23 @@ function E(e) {
14
21
  e.height
15
22
  ].every(Number.isFinite) && e.width > 0 && e.height > 0);
16
23
  }
17
- function D(e, t) {
18
- return E(e) && e.x + e.width > t.x && e.y + e.height > t.y && e.x < t.x + t.width && e.y < t.y + t.height;
24
+ function A(e, t) {
25
+ return k(e) && e.x + e.width > t.x && e.y + e.height > t.y && e.x < t.x + t.width && e.y < t.y + t.height;
19
26
  }
20
- function O(e) {
27
+ function j(e) {
21
28
  return {
22
29
  x: e.x + e.width / 2,
23
30
  y: e.y + e.height / 2
24
31
  };
25
32
  }
26
- function k(e, t) {
33
+ function M(e, t) {
27
34
  let n = Math.hypot(t.x - e.x, t.y - e.y) || 1;
28
35
  return {
29
36
  x: (t.x - e.x) / n,
30
37
  y: (t.y - e.y) / n
31
38
  };
32
39
  }
33
- function A(e, t) {
40
+ function ee(e, t) {
34
41
  let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y);
35
42
  return {
36
43
  x: n,
@@ -39,19 +46,19 @@ function A(e, t) {
39
46
  height: Math.max(0, Math.min(e.y + e.height, t.y + t.height) - r)
40
47
  };
41
48
  }
42
- function ee(e, t) {
43
- let n = e.y + e.height + 88 < t.y + t.height, r = n ? "bottom" : "top", i = Math.max(t.x + 18, e.x), a = Math.min(t.x + t.width - 18, e.x + e.width), o = T(Math.max(0, a - i) * .58, 36, 84);
49
+ function N(e, t) {
50
+ let n = e.y + e.height + 88 < t.y + t.height, r = n ? "bottom" : "top", i = Math.max(t.x + 18, e.x), a = Math.min(t.x + t.width - 18, e.x + e.width), o = O(Math.max(0, a - i) * .58, 36, 84);
44
51
  return {
45
- x: T((i + a) / 2, t.x + o / 2 + 8, t.x + t.width - o / 2 - 8),
46
- y: T(n ? e.y + e.height + 10 : e.y - 10, t.y + 18, t.y + t.height - 18),
52
+ x: O((i + a) / 2, t.x + o / 2 + 8, t.x + t.width - o / 2 - 8),
53
+ y: O(n ? e.y + e.height + 10 : e.y - 10, t.y + 18, t.y + t.height - 18),
47
54
  side: r,
48
55
  width: o
49
56
  };
50
57
  }
51
- function j(e, t, n, r) {
52
- let i = T(n, 0, 1), a = k(e, t), o = Math.min(86, Math.hypot(t.x - e.x, t.y - e.y) * .2), s = {
53
- x: T((e.x + t.x) / 2 + a.y * o, r.x + 16, r.x + r.width - 16),
54
- y: T((e.y + t.y) / 2 - a.x * o, r.y + 16, r.y + r.height - 16)
58
+ function P(e, t, n, r) {
59
+ let i = O(n, 0, 1), a = M(e, t), o = Math.min(86, Math.hypot(t.x - e.x, t.y - e.y) * .2), s = {
60
+ x: O((e.x + t.x) / 2 + a.y * o, r.x + 16, r.x + r.width - 16),
61
+ y: O((e.y + t.y) / 2 - a.x * o, r.y + 16, r.y + r.height - 16)
55
62
  }, c = 2 * (1 - i) * (s.x - e.x) + 2 * i * (t.x - s.x), l = 2 * (1 - i) * (s.y - e.y) + 2 * i * (t.y - s.y);
56
63
  return {
57
64
  x: (1 - i) ** 2 * e.x + 2 * (1 - i) * i * s.x + i ** 2 * t.x,
@@ -59,22 +66,22 @@ function j(e, t, n, r) {
59
66
  angle: Math.atan2(l, c) * 180 / Math.PI
60
67
  };
61
68
  }
62
- function M(e = 0, t = 0, n = 0, r = 1, a = 0) {
63
- let o = T(a, 0, 1), s = 66 * Math.sqrt(1 - .075 * T(n, 0, 1)) - o * 2.4;
69
+ function F(e = 0, t = 0, n = 0, r = 1, a = 0) {
70
+ let o = O(a, 0, 1), s = 66 * Math.sqrt(1 - .075 * O(n, 0, 1)) - o * 2.4;
64
71
  return i(80 - s, 80 - s, s * 2, s * 2, [
65
72
  s,
66
73
  s,
67
74
  s,
68
75
  s
69
76
  ], {
70
- amplitude: (3.5 + o * 9 + T(t, 0, 1) * 9) * T(r, .15, 1.25),
77
+ amplitude: (3.5 + o * 9 + O(t, 0, 1) * 9) * O(r, .15, 1.25),
71
78
  lobes: 3,
72
79
  seed: 17,
73
80
  phase: e
74
81
  });
75
82
  }
76
- function N(e, t, n = 20) {
77
- let r = T(t, 0, 1), a = T(n, 6, 48), o = a + (e - a) * r, s = a + (8 - a) * r;
83
+ function I(e, t, n = 20) {
84
+ let r = O(t, 0, 1), a = O(n, 6, 48), o = a + (e - a) * r, s = a + (8 - a) * r;
78
85
  return i(-o / 2, -s / 2, o, s, [
79
86
  s / 2,
80
87
  s / 2,
@@ -89,41 +96,41 @@ function N(e, t, n = 20) {
89
96
  }
90
97
  //#endregion
91
98
  //#region src/liquidAmbientClock.ts
92
- var P = /* @__PURE__ */ new Map(), F, I, L = !1;
93
- function R() {
94
- if (L || I !== void 0 || (clearTimeout(F), F = void 0, !P.size)) return;
95
- let e = Math.min(...[...P.values()].map((e) => e.at));
96
- F = setTimeout(() => {
97
- F = void 0, I = requestAnimationFrame((e) => {
98
- I = void 0, L = !0;
99
+ var L = /* @__PURE__ */ new Map(), R, z, B = !1;
100
+ function V() {
101
+ if (B || z !== void 0 || (clearTimeout(R), R = void 0, !L.size)) return;
102
+ let e = Math.min(...[...L.values()].map((e) => e.at));
103
+ R = setTimeout(() => {
104
+ R = void 0, z = requestAnimationFrame((e) => {
105
+ z = void 0, B = !0;
99
106
  try {
100
- for (let [t, n] of [...P]) n.at > e + 1 || !P.has(t) || (P.delete(t), n.paint(e));
107
+ for (let [t, n] of [...L]) n.at > e + 1 || !L.has(t) || (L.delete(t), n.paint(e));
101
108
  } finally {
102
- L = !1, R();
109
+ B = !1, V();
103
110
  }
104
111
  });
105
112
  }, Math.max(0, e - performance.now()));
106
113
  }
107
114
  function te(e, t = 1e3 / 12) {
108
115
  let n = Symbol();
109
- return P.set(n, {
116
+ return L.set(n, {
110
117
  at: performance.now() + t,
111
118
  paint: e
112
- }), R(), () => {
113
- P.delete(n), !P.size && I !== void 0 && (cancelAnimationFrame(I), I = void 0), R();
119
+ }), V(), () => {
120
+ L.delete(n), !L.size && z !== void 0 && (cancelAnimationFrame(z), z = void 0), V();
114
121
  };
115
122
  }
116
123
  //#endregion
117
124
  //#region src/liquidPresenceMotion.ts
118
- var z = o("cubic-bezier(0.45, 0, 0.2, 1)");
125
+ var H = o("cubic-bezier(0.45, 0, 0.2, 1)");
119
126
  function ne(e) {
120
127
  let { source: t, destination: n, viewport: r, returning: i = !1, from: a, origin: o } = e, s = o?.seat == null ? 0 : 180;
121
128
  if (s && e.elapsed < s) return {
122
129
  ...o,
123
130
  phase: "gather",
124
- seat: o.seat * (1 - z(T(e.elapsed / s, 0, 1)))
131
+ seat: o.seat * (1 - H(O(e.elapsed / s, 0, 1)))
125
132
  };
126
- let c = Math.max(0, e.elapsed - s), l = O(t), u = k(l, n), d = Math.atan2(u.y, u.x) * 180 / Math.PI, f = t.width / 160, p = {
133
+ let c = Math.max(0, e.elapsed - s), l = j(t), u = M(l, n), d = Math.atan2(u.y, u.x) * 180 / Math.PI, f = t.width / 160, p = {
127
134
  x: l.x + u.x * 112 * f,
128
135
  y: l.y + u.y * 112 * f
129
136
  }, m = {
@@ -138,7 +145,7 @@ function ne(e) {
138
145
  };
139
146
  if (i) {
140
147
  if (o?.bud) {
141
- let e = z(T(c / 320, 0, 1)), t = o.bud.x + (80 - o.bud.x) * e, n = o.bud.y + (80 - o.bud.y) * e;
148
+ let e = H(O(c / 320, 0, 1)), t = o.bud.x + (80 - o.bud.x) * e, n = o.bud.y + (80 - o.bud.y) * e;
142
149
  return {
143
150
  ...m,
144
151
  phase: e < 1 ? "merge" : "still",
@@ -154,9 +161,9 @@ function ne(e) {
154
161
  } : null
155
162
  };
156
163
  }
157
- let e = T(c / 620, 0, 1);
164
+ let e = O(c / 620, 0, 1);
158
165
  if (e < 1) {
159
- let t = j(a ?? n, p, z(e), r);
166
+ let t = P(a ?? n, p, H(e), r);
160
167
  return {
161
168
  ...m,
162
169
  phase: "return",
@@ -166,11 +173,11 @@ function ne(e) {
166
173
  stretch: 1 + .3 * Math.sin(e * Math.PI)
167
174
  };
168
175
  }
169
- let t = T((c - 620) / 420, 0, 1), i = 112 - 78 * z(t);
176
+ let t = O((c - 620) / 420, 0, 1), i = 112 - 78 * H(t);
170
177
  return {
171
178
  ...m,
172
179
  phase: t < 1 ? "merge" : "still",
173
- separation: 1 - z(t),
180
+ separation: 1 - H(t),
174
181
  point: {
175
182
  x: l.x + u.x * i * f,
176
183
  y: l.y + u.y * i * f
@@ -178,13 +185,13 @@ function ne(e) {
178
185
  bud: t < 1 ? {
179
186
  x: 80 + u.x * i,
180
187
  y: 80 + u.y * i,
181
- radius: 16 * (1 - .65 * z(t))
188
+ radius: 16 * (1 - .65 * H(t))
182
189
  } : null
183
190
  };
184
191
  }
185
192
  let h = o?.phase === "split" ? o.bud : null, g = h ? o.separation : 0, _ = h ? Math.max(180, 460 * (1 - g)) : a ? 0 : 460;
186
193
  if (c < _) {
187
- let e = z(c / _), t = 42 + 70 * e, n = h ? h.x + (80 + u.x * 112 - h.x) * e : 80 + u.x * t, r = h ? h.y + (80 + u.y * 112 - h.y) * e : 80 + u.y * t, i = h?.radius ?? 16 * .55;
194
+ let e = H(c / _), t = 42 + 70 * e, n = h ? h.x + (80 + u.x * 112 - h.x) * e : 80 + u.x * t, r = h ? h.y + (80 + u.y * 112 - h.y) * e : 80 + u.y * t, i = h?.radius ?? 16 * .55;
188
195
  return {
189
196
  ...m,
190
197
  phase: "split",
@@ -200,9 +207,9 @@ function ne(e) {
200
207
  }
201
208
  };
202
209
  }
203
- let v = a ?? p, y = 560 + Math.min(260, Math.hypot(n.x - v.x, n.y - v.y) * .26), b = T((c - _) / y, 0, 1);
210
+ let v = a ?? p, y = 560 + Math.min(260, Math.hypot(n.x - v.x, n.y - v.y) * .26), b = O((c - _) / y, 0, 1);
204
211
  if (b < 1) {
205
- let e = j(v, n, z(b), r);
212
+ let e = P(v, n, H(b), r);
206
213
  return {
207
214
  ...m,
208
215
  phase: "flight",
@@ -212,23 +219,23 @@ function ne(e) {
212
219
  stretch: 1 + .35 * Math.sin(b * Math.PI)
213
220
  };
214
221
  }
215
- let x = T((c - _ - y) / 380, 0, 1);
222
+ let x = O((c - _ - y) / 380, 0, 1);
216
223
  return {
217
224
  ...m,
218
225
  phase: x < 1 ? "land" : "dock",
219
226
  separation: 1,
220
227
  point: n,
221
- seat: z(x)
228
+ seat: H(x)
222
229
  };
223
230
  }
224
231
  //#endregion
225
232
  //#region src/liquidPresencePaint.ts
226
- function B(e, t) {
233
+ function U(e, t) {
227
234
  e.toggleAttribute("hidden", !t);
228
235
  let n = e.style, r = t ? "" : "none";
229
236
  n.display !== r && (n.display = r);
230
237
  }
231
- var V = (e, t, n) => {
238
+ var W = (e, t, n) => {
232
239
  let r = String(n);
233
240
  e.getAttribute(t) !== r && e.setAttribute(t, r);
234
241
  };
@@ -240,26 +247,26 @@ function re(e, t, n) {
240
247
  };
241
248
  }
242
249
  function ie(e, t, n, r, i = 0, a = 1, o = !1, s = 0) {
243
- V(e.source, "data-liquid-phase", t.phase), V(e.overlay, "data-liquid-phase", t.phase), V(e.body, "d", M(r, i, t.separation, a, s));
250
+ W(e.source, "data-liquid-phase", t.phase), W(e.overlay, "data-liquid-phase", t.phase), W(e.body, "d", F(r, i, t.separation, a, s));
244
251
  let c = t.bud ? Math.sin(t.separation * Math.PI) * .045 : 0;
245
- V(e.body, "transform", `translate(${((t.bud?.x ?? 80) - 80) * c} ${((t.bud?.y ?? 80) - 80) * c})`), B(e.bud, !!t.bud), t.bud && (V(e.bud, "cx", t.bud.x), V(e.bud, "cy", t.bud.y), V(e.bud, "r", t.bud.radius));
252
+ W(e.body, "transform", `translate(${((t.bud?.x ?? 80) - 80) * c} ${((t.bud?.y ?? 80) - 80) * c})`), U(e.bud, !!t.bud), t.bud && (W(e.bud, "cx", t.bud.x), W(e.bud, "cy", t.bud.y), W(e.bud, "r", t.bud.radius));
246
253
  let l = t.phase === "flight" || t.phase === "return";
247
- B(e.flight, l);
254
+ U(e.flight, l);
248
255
  let u = re(e, t.point.x, t.point.y);
249
256
  if (l) {
250
257
  let n = t.diameter / 32;
251
- e.flight.style.transform = `translate(${u.x - 48}px, ${u.y - 36}px)`, V(e.flightBody, "transform", `rotate(${t.angle}) scale(${n * t.stretch} ${n / Math.sqrt(t.stretch)})`), V(e.trail, "opacity", Math.min(.8, (t.stretch - 1) * 3));
258
+ e.flight.style.transform = `translate(${u.x - 48}px, ${u.y - 36}px)`, W(e.flightBody, "transform", `rotate(${t.angle}) scale(${n * t.stretch} ${n / Math.sqrt(t.stretch)})`), W(e.trail, "opacity", Math.min(.8, (t.stretch - 1) * 3));
252
259
  }
253
- B(e.seat, t.seat !== null), t.seat !== null && (e.seat.style.transform = `translate(${u.x - 56}px, ${u.y - 28}px)`, V(e.seatBody, "d", N(t.seatWidth ?? n, t.seat, t.diameter))), B(e.label, o || t.phase !== "gather" && t.seat !== null && t.seat > .45);
260
+ U(e.seat, t.seat !== null), t.seat !== null && (e.seat.style.transform = `translate(${u.x - 56}px, ${u.y - 28}px)`, W(e.seatBody, "d", I(t.seatWidth ?? n, t.seat, t.diameter))), U(e.label, o || t.phase !== "gather" && t.seat !== null && t.seat > .45);
254
261
  }
255
262
  function ae(e, t, n, r) {
256
263
  e.satellites.forEach((e, i) => {
257
- if (B(e, n), !n) return;
264
+ if (U(e, n), !n) return;
258
265
  let a = t * .7 + i * Math.PI * 2 / 3, o = 63 + Math.max(0, Math.sin(t * 1.6 + i * 2)) * (16 + r * 12);
259
- V(e, "cx", 80 + Math.cos(a) * o), V(e, "cy", 80 + Math.sin(a) * o), V(e, "r", 7 + i * 1.5);
266
+ W(e, "cx", 80 + Math.cos(a) * o), W(e, "cy", 80 + Math.sin(a) * o), W(e, "r", 7 + i * 1.5);
260
267
  });
261
268
  }
262
- function H() {
269
+ function G() {
263
270
  let e = window.visualViewport;
264
271
  return {
265
272
  x: e?.offsetLeft ?? 0,
@@ -277,7 +284,7 @@ function oe(e) {
277
284
  let n = document.querySelector("dialog:modal");
278
285
  if (n && (!t || !n.contains(t))) return null;
279
286
  let r = e.getRect();
280
- return E(r) && D(r, H()) ? r : null;
287
+ return k(r) && A(r, G()) ? r : null;
281
288
  } catch {
282
289
  return null;
283
290
  }
@@ -344,27 +351,27 @@ function se(e, t, n, r) {
344
351
  }
345
352
  //#endregion
346
353
  //#region src/liquidPanelObstacles.ts
347
- var U = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Set();
348
- function G(e, t) {
349
- let n = U.get(e), r = t && E(t) ? {
354
+ var K = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Set();
355
+ function J(e, t) {
356
+ let n = K.get(e), r = t && k(t) ? {
350
357
  x: t.x,
351
358
  y: t.y,
352
359
  width: t.width,
353
360
  height: t.height
354
361
  } : null;
355
362
  if (!(!n && !r || n && r && n.x === r.x && n.y === r.y && n.width === r.width && n.height === r.height)) {
356
- r ? U.set(e, r) : U.delete(e);
357
- for (let e of [...W]) try {
363
+ r ? K.set(e, r) : K.delete(e);
364
+ for (let e of [...q]) try {
358
365
  e();
359
366
  } catch {}
360
367
  }
361
368
  }
362
369
  function ce(e) {
363
- return [...U].filter(([t]) => t.isConnected && !t.contains(e) && !e.contains(t)).map(([, e]) => e);
370
+ return [...K].filter(([t]) => t.isConnected && !t.contains(e) && !e.contains(t)).map(([, e]) => e);
364
371
  }
365
372
  function le(e) {
366
- return W.add(e), () => {
367
- W.delete(e);
373
+ return q.add(e), () => {
374
+ q.delete(e);
368
375
  };
369
376
  }
370
377
  function ue(e, t, n, r) {
@@ -372,7 +379,7 @@ function ue(e, t, n, r) {
372
379
  if (!Number.isFinite(i + a) || i <= 0 || a <= 0) return null;
373
380
  let o = n.x + 12, s = n.y + 12, c = n.x + n.width - i - 12, l = n.y + n.height - a - 12;
374
381
  if (c < o || l < s) return null;
375
- let u = r.filter(E), d = [
382
+ let u = r.filter(k), d = [
376
383
  e.x,
377
384
  o,
378
385
  c
@@ -396,7 +403,7 @@ function ue(e, t, n, r) {
396
403
  }
397
404
  //#endregion
398
405
  //#region src/useLiquidPresenceMotion.ts
399
- function K(e, i, a, o) {
406
+ function Y(e, i, a, o) {
400
407
  let s = d(a);
401
408
  s.current = a;
402
409
  let l = !!a.guideContent, u = d(null), f = d(null), p = d(null), m = d(0), h = d(+(a.idleMotion === "breathe")), g = d(() => {});
@@ -423,17 +430,17 @@ function K(e, i, a, o) {
423
430
  "land",
424
431
  "gather",
425
432
  "return"
426
- ].includes(d.phase) ? d.point : void 0, x = d?.point ?? O(a.getBoundingClientRect()), E = d?.seatWidth ?? 48, k = d ?? void 0, j = a.getBoundingClientRect(), M = performance.now(), N = null, P = () => {}, F = !0, I = !1, L = !1, R = !0, z = 0, V = m.current, re = performance.now(), U = 0, W = 0, G = null, K = () => {}, q, J = () => {
433
+ ].includes(d.phase) ? d.point : void 0, x = d?.point ?? j(a.getBoundingClientRect()), T = d?.seatWidth ?? 48, E = d ?? void 0, D = a.getBoundingClientRect(), k = performance.now(), M = null, P = () => {}, F = !0, I = !1, L = !1, R = !0, z = 0, B = m.current, V = performance.now(), H = 0, W = 0, re = null, K = () => {}, q, J = () => {
427
434
  I && n(), I = !1;
428
435
  }, Y = (e) => {
429
436
  if (l) {
430
- f.current = l.key, l = null, _ = !!(u.current && u.current.phase !== "still"), k = u.current ?? void 0, v = u.current?.point, x = v ?? x, M = performance.now(), K(), clearTimeout(q), W++, B(c.label, !1);
437
+ f.current = l.key, l = null, _ = !!(u.current && u.current.phase !== "still"), E = u.current ?? void 0, v = u.current?.point, x = v ?? x, k = performance.now(), K(), clearTimeout(q), W++, U(c.label, !1);
431
438
  try {
432
439
  s.current.onDismiss?.(e);
433
440
  } catch {}
434
441
  $();
435
442
  }
436
- }, X = () => {
443
+ }, de = () => {
437
444
  if (!l) return null;
438
445
  let e = c.label.style.pointerEvents;
439
446
  s.current.guideContent && (c.label.style.pointerEvents = "none");
@@ -442,18 +449,18 @@ function K(e, i, a, o) {
442
449
  } finally {
443
450
  c.label.style.pointerEvents = e;
444
451
  }
445
- }, Z = () => {
452
+ }, X = () => {
446
453
  if (!l) return;
447
- let e = X();
454
+ let e = de();
448
455
  if (!e) {
449
456
  Y("unavailable");
450
457
  return;
451
458
  }
452
- let t = ee(e, H()), n = A(e, H()), r = (e) => T(e === "top" ? n.y - 10 : n.y + n.height + 10, H().y + 18, H().y + H().height - 18);
459
+ let t = N(e, G()), n = ee(e, G()), r = (e) => O(e === "top" ? n.y - 10 : n.y + n.height + 10, G().y + 18, G().y + G().height - 18);
453
460
  x = {
454
461
  x: t.x,
455
- y: r(G ?? t.side)
456
- }, E = t.width;
462
+ y: r(re ?? t.side)
463
+ }, T = t.width;
457
464
  let i = {
458
465
  ...l.contextElement ? { contextElement: l.contextElement } : {},
459
466
  getBoundingClientRect: () => ({
@@ -464,14 +471,14 @@ function K(e, i, a, o) {
464
471
  right: n.x + n.width
465
472
  })
466
473
  }, a = ++W, o = s.current.guideSize === "expanded";
467
- o || (c.label.style.maxHeight = ""), s.current.guideContent && !c.label.style.transform && (c.label.style.visibility = "hidden", B(c.label, !0)), y(i, c.label, {
474
+ o || (c.label.style.maxHeight = ""), s.current.guideContent && !c.label.style.transform && (c.label.style.visibility = "hidden", U(c.label, !0)), y(i, c.label, {
468
475
  strategy: "absolute",
469
- placement: o && H().width >= 900 ? "right" : t.side,
476
+ placement: o && G().width >= 900 ? "right" : t.side,
470
477
  middleware: [
471
478
  S(26),
472
479
  b({
473
480
  padding: 16,
474
- ...o && H().width >= 900 ? { fallbackPlacements: [
481
+ ...o && G().width >= 900 ? { fallbackPlacements: [
475
482
  "left",
476
483
  "bottom",
477
484
  "top"
@@ -484,7 +491,7 @@ function K(e, i, a, o) {
484
491
  ...o ? [w({
485
492
  padding: 16,
486
493
  apply({ availableHeight: e, elements: t }) {
487
- let n = `${Math.max(0, Math.min(560, H().height * .65, e))}px`;
494
+ let n = `${Math.max(0, Math.min(560, G().height * .65, e))}px`;
488
495
  t.floating.style.maxHeight !== n && (t.floating.style.maxHeight = n);
489
496
  }
490
497
  })] : []
@@ -499,55 +506,55 @@ function K(e, i, a, o) {
499
506
  }, {
500
507
  width: c.label.offsetWidth,
501
508
  height: c.label.offsetHeight
502
- }, H(), [...a, n]);
509
+ }, G(), [...a, n]);
503
510
  if (!t) {
504
511
  c.label.style.visibility = "hidden";
505
512
  return;
506
513
  }
507
514
  e = t.x, i = t.y;
508
515
  }
509
- c.label.style.transform = `translate(${e}px, ${i}px)`, c.label.style.visibility = "", G = o.startsWith("top") ? "top" : o.startsWith("bottom") ? "bottom" : t.side;
510
- let s = r(G);
516
+ c.label.style.transform = `translate(${e}px, ${i}px)`, c.label.style.visibility = "", re = o.startsWith("top") ? "top" : o.startsWith("bottom") ? "bottom" : t.side;
517
+ let s = r(re);
511
518
  x.y !== s && (x = {
512
519
  x: t.x,
513
520
  y: s
514
521
  }, $());
515
522
  }
516
523
  }).catch(() => {});
517
- }, Q = () => [
524
+ }, Z = () => [
518
525
  "connecting",
519
526
  "listening",
520
527
  "thinking",
521
528
  "speaking",
522
529
  "working"
523
- ].includes(s.current.activity ?? "idle"), de = () => s.current.idleMotion === "breathe" && (s.current.activity ?? "idle") === "idle", fe = () => {
524
- if (L = !1, s.current.reducedMotion || s.current.activity === "disabled" || document.hidden || !R || !D(a.getBoundingClientRect(), H())) return !1;
530
+ ].includes(s.current.activity ?? "idle"), Q = () => s.current.idleMotion === "breathe" && (s.current.activity ?? "idle") === "idle", fe = () => {
531
+ if (L = !1, s.current.reducedMotion || s.current.activity === "disabled" || document.hidden || !R || !A(a.getBoundingClientRect(), G())) return !1;
525
532
  let e = document.querySelector("dialog:modal");
526
533
  if (e && !e.contains(a)) return !1;
527
534
  let n = l?.contextElement?.closest("dialog") ?? null;
528
535
  if (l && a.closest("dialog") !== n) return !1;
529
536
  let i = 13184 + (a.getBoundingClientRect().width * 2) ** 2, o = r();
530
- return o.maxAnimatedGroups === 0 || i > o.maxFilterArea ? (J(), !1) : !(l || _ || Q()) && de() && !I && o.activeGroups > 0 ? (L = !0, !1) : (I ||= t(i), I);
537
+ return o.maxAnimatedGroups === 0 || i > o.maxFilterArea ? (J(), !1) : !(l || _ || Z()) && Q() && !I && o.activeGroups > 0 ? (L = !0, !1) : (I ||= t(i), I);
531
538
  };
532
539
  function pe(e) {
533
540
  if (!F || document.hidden) return;
534
541
  let t = c.source.getBoundingClientRect();
535
542
  if (!c.source.isConnected || c.source.closest("[hidden], [inert]") || t.width <= 0 || t.height <= 0) {
536
- _ = !1, u.current = null, Y("unavailable"), B(c.label, !1), B(c.flight, !1), B(c.seat, !1), J();
543
+ _ = !1, u.current = null, Y("unavailable"), U(c.label, !1), U(c.flight, !1), U(c.seat, !1), J();
537
544
  return;
538
545
  }
539
- if (l && !X()) {
546
+ if (l && !de()) {
540
547
  Y("unavailable");
541
548
  return;
542
549
  }
543
550
  let n = fe(), r = ne({
544
- elapsed: e - M,
545
- source: _ ? t : j,
551
+ elapsed: e - k,
552
+ source: _ ? t : D,
546
553
  destination: x,
547
- viewport: H(),
554
+ viewport: G(),
548
555
  returning: _,
549
556
  ...v ? { from: v } : {},
550
- ...k ? { origin: k } : {}
557
+ ...E ? { origin: E } : {}
551
558
  });
552
559
  !l && !_ && (r = {
553
560
  ...r,
@@ -563,45 +570,45 @@ function K(e, i, a, o) {
563
570
  seat: l ? 1 : null,
564
571
  separation: +!!l
565
572
  }), _ && r.phase === "still" && (_ = !1), l && r.phase === "dock" && (p.current = l.key);
566
- let i = !["still", "dock"].includes(r.phase), a = s.current.levelRef?.current, o = !i && de(), d = Math.max(0, Math.min(160, e - re));
567
- re = e;
568
- let f = typeof a == "number" ? T(a, 0, 1) : 0;
569
- U += (f - U) * (1 - Math.exp(-d / (f > U ? 65 : 140)));
570
- let g = T(s.current.motionSpeed ?? 1, .5, 1.5), y = T(s.current.motionIntensity ?? 1, .25, 1.25);
571
- n && (i || Q() || o) && (V += d * (o ? 84e-5 : .00105) * g), m.current = V, n && (i || Q() || o) && (h.current += (+!!o - h.current) * (1 - Math.exp(-d / 500)));
572
- let b = n && Q() && !i ? .14 + U * .75 : i ? .2 : 0, S = c.label.hasAttribute("hidden");
573
- ie(c, r, E, V, b, y, !!(s.current.guideContent && l), h.current), ae(c, V, n && s.current.splashes !== !1 && s.current.activity === "speaking" && r.phase === "still", U);
574
- let C = n && (i || Q()) ? "animated" : n && o ? "ambient" : "static";
573
+ let i = !["still", "dock"].includes(r.phase), a = s.current.levelRef?.current, o = !i && Q(), d = Math.max(0, Math.min(160, e - V));
574
+ V = e;
575
+ let f = typeof a == "number" ? O(a, 0, 1) : 0;
576
+ H += (f - H) * (1 - Math.exp(-d / (f > H ? 65 : 140)));
577
+ let g = O(s.current.motionSpeed ?? 1, .5, 1.5), y = O(s.current.motionIntensity ?? 1, .25, 1.25);
578
+ n && (i || Z() || o) && (B += d * (o ? 84e-5 : .00105) * g), m.current = B, n && (i || Z() || o) && (h.current += (+!!o - h.current) * (1 - Math.exp(-d / 500)));
579
+ let b = n && Z() && !i ? .14 + H * .75 : i ? .2 : 0, S = c.label.hasAttribute("hidden");
580
+ ie(c, r, T, B, b, y, !!(s.current.guideContent && l), h.current), ae(c, B, n && s.current.splashes !== !1 && s.current.activity === "speaking" && r.phase === "still", H);
581
+ let C = n && (i || Z()) ? "animated" : n && o ? "ambient" : "static";
575
582
  c.source.dataset.liquidMotion !== C && (c.source.dataset.liquidMotion = C), u.current = {
576
583
  ...r,
577
- seatWidth: r.phase === "gather" ? k?.seatWidth ?? E : E
578
- }, l && S && !c.label.hasAttribute("hidden") && Z(), n && (i || Q()) ? N = requestAnimationFrame(me) : (J(), o && (n || L) && (P = te(() => {
584
+ seatWidth: r.phase === "gather" ? E?.seatWidth ?? T : T
585
+ }, l && S && !c.label.hasAttribute("hidden") && X(), n && (i || Z()) ? M = requestAnimationFrame(me) : (J(), o && (n || L) && (P = te(() => {
579
586
  P = () => {}, F && !document.hidden && R && me(performance.now());
580
587
  }, L ? 250 : 1e3 / 12)));
581
588
  }
582
589
  function me(e) {
583
- if (N = null, !F || document.hidden) {
590
+ if (M = null, !F || document.hidden) {
584
591
  J();
585
592
  return;
586
593
  }
587
594
  if ((u.current?.phase === "still" || u.current?.phase === "dock") && e - z < 32) {
588
- N = requestAnimationFrame(me);
595
+ M = requestAnimationFrame(me);
589
596
  return;
590
597
  }
591
598
  z = e, pe(e);
592
599
  }
593
600
  function $() {
594
- !F || N !== null || document.hidden || (P(), P = () => {}, pe(performance.now()));
601
+ !F || M !== null || document.hidden || (P(), P = () => {}, pe(performance.now()));
595
602
  }
596
603
  g.current = $;
597
604
  let he = () => {
598
605
  if (K(), K = () => {}, !l || document.hidden) return;
599
606
  let e = se(c.source, l, c.label, () => {
600
- Z(), $();
607
+ X(), $();
601
608
  });
602
609
  K = e, l || e();
603
610
  };
604
- l && (Z(), l && (he(), l && !s.current.guideContent && (q = setTimeout(() => Y("expired"), 12e3))));
611
+ l && (X(), l && (he(), l && !s.current.guideContent && (q = setTimeout(() => Y("expired"), 12e3))));
605
612
  let ge = (e) => {
606
613
  if (e.key === "Escape" && !e.isComposing && l) {
607
614
  if (s.current.guideContent && e.target instanceof Node && c.label.contains(e.target)) return;
@@ -612,16 +619,16 @@ function K(e, i, a, o) {
612
619
  }, _e = (e) => {
613
620
  s.current.dismissOnTargetClick !== !1 && l?.contextElement && e.target instanceof Node && l.contextElement.contains(e.target) && Y("dismissed");
614
621
  }, ve = () => {
615
- document.hidden ? (P(), P = () => {}, N !== null && cancelAnimationFrame(N), N = null, K(), W++, J()) : (re = performance.now(), he(), $());
622
+ document.hidden ? (P(), P = () => {}, M !== null && cancelAnimationFrame(M), M = null, K(), W++, J()) : (V = performance.now(), he(), $());
616
623
  }, ye = typeof IntersectionObserver > "u" ? null : new IntersectionObserver((e) => {
617
- R = e[0]?.isIntersecting ?? !0, R || (P(), P = () => {}, N !== null && cancelAnimationFrame(N), N = null, J()), $();
624
+ R = e[0]?.isIntersecting ?? !0, R || (P(), P = () => {}, M !== null && cancelAnimationFrame(M), M = null, J()), $();
618
625
  });
619
626
  ye?.observe(a), document.addEventListener("keydown", ge, !0), document.addEventListener("click", _e), document.addEventListener("visibilitychange", ve), document.addEventListener("close", $, !0), document.addEventListener("toggle", $, !0);
620
627
  let be = le(() => {
621
- Z(), $();
628
+ X(), $();
622
629
  });
623
630
  return $(), () => {
624
- F = !1, g.current = () => {}, W++, N !== null && cancelAnimationFrame(N), clearTimeout(q), P(), K(), be(), ye?.disconnect(), J(), document.removeEventListener("keydown", ge, !0), document.removeEventListener("click", _e), document.removeEventListener("visibilitychange", ve), document.removeEventListener("close", $, !0), document.removeEventListener("toggle", $, !0);
631
+ F = !1, g.current = () => {}, W++, M !== null && cancelAnimationFrame(M), clearTimeout(q), P(), K(), be(), ye?.disconnect(), J(), document.removeEventListener("keydown", ge, !0), document.removeEventListener("click", _e), document.removeEventListener("visibilitychange", ve), document.removeEventListener("close", $, !0), document.removeEventListener("toggle", $, !0);
625
632
  };
626
633
  }, [
627
634
  e,
@@ -642,8 +649,8 @@ function K(e, i, a, o) {
642
649
  }
643
650
  //#endregion
644
651
  //#region src/LiquidPresence.tsx
645
- function q(t) {
646
- let n = e() || t.reducedMotion === !0, r = T(t.size ?? 64, 32, 224), i = `presence-${l().replace(/[^a-zA-Z0-9_-]/g, "")}`, a = d(null), o = d(null), [u, _] = f(null);
652
+ function de(t) {
653
+ let n = e() || t.reducedMotion === !0, r = O(t.size ?? 64, 32, 224), i = `presence-${l().replace(/[^a-zA-Z0-9_-]/g, "")}`, a = d(null), o = d(null), [u, _] = f(null);
647
654
  c(() => {
648
655
  let e = t.target?.contextElement?.closest("dialog");
649
656
  _(e ?? a.current?.closest("dialog") ?? document.body);
@@ -688,7 +695,7 @@ function q(t) {
688
695
  return r(), window.addEventListener("resize", r, { passive: !0 }), () => {
689
696
  i.disconnect(), window.removeEventListener("resize", r);
690
697
  };
691
- }, [u]), K(a, o, {
698
+ }, [u]), Y(a, o, {
692
699
  ...t,
693
700
  size: r,
694
701
  reducedMotion: n
@@ -702,20 +709,17 @@ function q(t) {
702
709
  "--liquid-presence-from": "var(--game-ui-warning)",
703
710
  "--liquid-presence-to": "var(--game-ui-warning)"
704
711
  } : {}
705
- }, y = (e, t) => /* @__PURE__ */ h("defs", { children: [/* @__PURE__ */ h("linearGradient", {
712
+ }, y = (e, t) => /* @__PURE__ */ h("defs", { children: [/* @__PURE__ */ m("linearGradient", {
706
713
  id: `${i}-${e}-fill`,
707
714
  gradientUnits: "userSpaceOnUse",
708
- x1: e === "core" ? 24 : -24,
715
+ x1: 0,
709
716
  y1: e === "core" ? 16 : -18,
710
- x2: e === "core" ? 136 : 24,
717
+ x2: 0,
711
718
  y2: e === "core" ? 146 : 18,
712
- children: [/* @__PURE__ */ m("stop", {
713
- offset: "0",
714
- stopColor: "var(--liquid-presence-from, var(--game-ui-secondary))"
715
- }), /* @__PURE__ */ m("stop", {
716
- offset: "1",
717
- stopColor: "var(--liquid-presence-to, var(--game-ui-secondary))"
718
- })]
719
+ children: D.map(([e, t]) => /* @__PURE__ */ m("stop", {
720
+ offset: e,
721
+ style: { stopColor: t }
722
+ }, e))
719
723
  }), /* @__PURE__ */ m("filter", {
720
724
  id: `${i}-${e}-goo`,
721
725
  filterUnits: "userSpaceOnUse",
@@ -750,7 +754,7 @@ function q(t) {
750
754
  children: [
751
755
  /* @__PURE__ */ m("path", {
752
756
  "data-presence-body": "",
753
- d: M()
757
+ d: F()
754
758
  }),
755
759
  /* @__PURE__ */ m("circle", {
756
760
  "data-presence-bud": "",
@@ -827,7 +831,7 @@ function q(t) {
827
831
  height: 56
828
832
  }), /* @__PURE__ */ m("path", {
829
833
  "data-presence-seat-body": "",
830
- d: N(48, 1),
834
+ d: I(48, 1),
831
835
  fill: `url(#${i}-seat-fill)`,
832
836
  filter: `url(#${i}-seat-goo)`
833
837
  })]
@@ -849,7 +853,7 @@ function q(t) {
849
853
  }
850
854
  //#endregion
851
855
  //#region src/liquidRevealGeometry.ts
852
- function J(e, t, n, r = 0, o = 1) {
856
+ function X(e, t, n, r = 0, o = 1) {
853
857
  let s = Math.max(44, e), c = Math.max(44, t), l = Math.min(28, (s - 12) / 2, (c - 12) / 2), u = i(6, 6, s - 12, c - 12, [
854
858
  l,
855
859
  l,
@@ -873,7 +877,7 @@ function J(e, t, n, r = 0, o = 1) {
873
877
  }
874
878
  //#endregion
875
879
  //#region src/useLiquidRevealAmbient.ts
876
- function Y(e, i, a, o, s, l = 1, u = 1) {
880
+ function Z(e, i, a, o, s, l = 1, u = 1) {
877
881
  let f = d(0);
878
882
  return c(() => {
879
883
  let c = e.current;
@@ -892,7 +896,7 @@ function Y(e, i, a, o, s, l = 1, u = 1) {
892
896
  }
893
897
  try {
894
898
  f.current += i * Math.PI * 2 * u / 1e4;
895
- let e = J(a, o, s, f.current, l);
899
+ let e = X(a, o, s, f.current, l);
896
900
  g?.setAttribute("d", e.outline), _?.setAttribute("d", e.outline), v?.setAttribute("d", e.ribbon), c.dataset.revealAmbient = "flowing";
897
901
  } finally {
898
902
  n();
@@ -918,14 +922,14 @@ function Y(e, i, a, o, s, l = 1, u = 1) {
918
922
  }
919
923
  //#endregion
920
924
  //#region src/liquidRevealEntranceGeometry.ts
921
- var X = (e) => {
925
+ var Q = (e) => {
922
926
  let t = Math.min(1, Math.max(0, e));
923
927
  return t * t * t * (10 + t * (-15 + 6 * t));
924
928
  };
925
- function Z(e, t, n, r, a, o, s = 1) {
926
- let c = J(e, t, n, 0, s).outline;
929
+ function fe(e, t, n, r, a, o, s = 1) {
930
+ let c = X(e, t, n, 0, s).outline;
927
931
  return Array.from({ length: 49 }, (l, u) => {
928
- let d = u / 48, f = X((d - .08) / .34), p = j(r, a, f, o), m = X((d - .39) / .46), h = X((d - .47) / .46), g = X((d - .3) / .14) * (1 - m), _ = 8 + 20 * X(d / .15) + 10 * g, v = 1 + Math.sin(f * Math.PI) * .35, y = a.x - r.x, b = a.y - r.y, x = Math.abs(y) > Math.abs(b), S = _ * (x ? v : 1 / Math.sqrt(v)), C = _ * (x ? 1 / Math.sqrt(v) : v), w = S + (e - 12 - S) * m, T = C + (t - 12 - C) * h, E = (p.x - S / 2) * (1 - m) + 6 * m, D = (p.y - C / 2) * (1 - h) + 6 * h, O = Math.min(w / 2, T / 2, 28 + 12 * (1 - h));
932
+ let d = u / 48, f = Q((d - .08) / .34), p = P(r, a, f, o), m = Q((d - .39) / .46), h = Q((d - .47) / .46), g = Q((d - .3) / .14) * (1 - m), _ = 8 + 20 * Q(d / .15) + 10 * g, v = 1 + Math.sin(f * Math.PI) * .35, y = a.x - r.x, b = a.y - r.y, x = Math.abs(y) > Math.abs(b), S = _ * (x ? v : 1 / Math.sqrt(v)), C = _ * (x ? 1 / Math.sqrt(v) : v), w = S + (e - 12 - S) * m, T = C + (t - 12 - C) * h, E = (p.x - S / 2) * (1 - m) + 6 * m, D = (p.y - C / 2) * (1 - h) + 6 * h, O = Math.min(w / 2, T / 2, 28 + 12 * (1 - h));
929
933
  return {
930
934
  d: `path("${d >= .95 ? c : i(E, D, w, T, [
931
935
  O,
@@ -944,7 +948,7 @@ function Z(e, t, n, r, a, o, s = 1) {
944
948
  }
945
949
  //#endregion
946
950
  //#region src/useLiquidRevealEntrance.ts
947
- function Q(e, r, i, a, o, s, c, l, f = 1) {
951
+ function pe(e, r, i, a, o, s, c, l, f = 1) {
948
952
  let p = d(null);
949
953
  u(() => {
950
954
  let u = e.current;
@@ -967,7 +971,7 @@ function Q(e, r, i, a, o, s, c, l, f = 1) {
967
971
  return;
968
972
  }
969
973
  let e = r.current?.getBoundingClientRect(), n = u.getBoundingClientRect(), s = u.querySelector("[data-reveal-body]"), x = u.querySelector("[data-reveal-material]"), S = u.querySelector(".game-ui-liquid-reveal-content");
970
- if (p.current = i, u.contains(document.activeElement) || !e || !E(e) || document.hidden || typeof u.animate != "function" || !t((a + 24) * (o + 24))) {
974
+ if (p.current = i, u.contains(document.activeElement) || !e || !k(e) || document.hidden || typeof u.animate != "function" || !t((a + 24) * (o + 24))) {
971
975
  y();
972
976
  return;
973
977
  }
@@ -975,17 +979,17 @@ function Q(e, r, i, a, o, s, c, l, f = 1) {
975
979
  let C = n.width / a || 1, w = n.height / o || 1, T = {
976
980
  x: (e.x + e.width / 2 - n.x) / C,
977
981
  y: (e.y + e.height / 2 - n.y) / w
978
- }, D = {
982
+ }, E = {
979
983
  x: Math.min(a - 28, Math.max(28, T.x)),
980
984
  y: T.y > o / 2 ? o - 28 : 28
981
- }, O = {
985
+ }, D = {
982
986
  x: -n.x / C,
983
987
  y: -n.y / w,
984
988
  width: innerWidth / C,
985
989
  height: innerHeight / w
986
990
  };
987
991
  if (c && s && CSS.supports("d", "path(\"M0 0L1 1Z\")")) {
988
- let e = Z(a, o, l, T, D, O, f);
992
+ let e = fe(a, o, l, T, E, D, f);
989
993
  v.push(s.animate(e, {
990
994
  duration: 720,
991
995
  fill: "both",
@@ -1016,8 +1020,8 @@ function Q(e, r, i, a, o, s, c, l, f = 1) {
1016
1020
  fill: "both"
1017
1021
  }));
1018
1022
  } else x && v.push(x.animate([{ opacity: .2 }, { opacity: 1 }], { duration: 180 }));
1019
- let k = r.current?.querySelector(".game-ui-liquid-presence > svg");
1020
- k && v.push(k.animate([
1023
+ let O = r.current?.querySelector(".game-ui-liquid-presence > svg");
1024
+ O && v.push(O.animate([
1021
1025
  { transform: "scale(1)" },
1022
1026
  {
1023
1027
  transform: "scale(1.05, .9)",
@@ -1056,17 +1060,17 @@ function Q(e, r, i, a, o, s, c, l, f = 1) {
1056
1060
  }
1057
1061
  //#endregion
1058
1062
  //#region src/LiquidReveal.tsx
1059
- function de({ children: t, source: n, revealKey: i = "initial", variant: a = "content", surface: o = "dark", reducedMotion: c, idleMotion: p = "still", colorFrom: g, colorTo: _, motionIntensity: v = 1, motionSpeed: y = 1, className: b = "" }) {
1060
- let x = e() || c === !0, S = T(v, .25, 1.25), C = T(y, .5, 1.5), w = d(null), [E, D] = f({
1063
+ function me({ children: t, source: n, revealKey: i = "initial", variant: a = "content", surface: o = "dark", reducedMotion: c, idleMotion: g = "still", colorFrom: _, colorTo: v, motionIntensity: y = 1, motionSpeed: b = 1, className: x = "" }) {
1064
+ let S = e() || c === !0, C = O(y, .25, 1.25), w = O(b, .5, 1.5), T = d(null), [E, k] = f({
1061
1065
  width: 0,
1062
1066
  height: 0
1063
- }), O = `liquid-reveal-${l().replace(/[^a-zA-Z0-9_-]/g, "")}`;
1067
+ }), A = `liquid-reveal-${l().replace(/[^a-zA-Z0-9_-]/g, "")}`;
1064
1068
  u(() => {
1065
- let e = w.current;
1069
+ let e = T.current;
1066
1070
  if (!e) return;
1067
1071
  let t = () => {
1068
1072
  let t = e.clientWidth, n = e.clientHeight;
1069
- D((e) => e.width === t && e.height === n ? e : {
1073
+ k((e) => e.width === t && e.height === n ? e : {
1070
1074
  width: t,
1071
1075
  height: n
1072
1076
  });
@@ -1074,31 +1078,41 @@ function de({ children: t, source: n, revealKey: i = "initial", variant: a = "co
1074
1078
  t();
1075
1079
  let n = new ResizeObserver(t);
1076
1080
  return n.observe(e), () => n.disconnect();
1077
- }, []), Q(w, n, i, E.width, E.height, x, o === "material", a === "input", S);
1078
- let k = Math.max(44, E.width), A = Math.max(44, E.height), ee = Y(w, !x && p === "breathe", E.width, E.height, a === "input", S, C), j = J(k, A, a === "input", ee.current, S), M = (k + 24) * (A + 24) <= r().maxFilterArea;
1081
+ }, []), pe(T, n, i, E.width, E.height, S, o === "material", a === "input", C);
1082
+ let j = Math.max(44, E.width), M = Math.max(44, E.height), ee = Z(T, !S && g === "breathe", E.width, E.height, a === "input", C, w), N = X(j, M, a === "input", ee.current, C), P = (j + 24) * (M + 24) <= r().maxFilterArea;
1079
1083
  return /* @__PURE__ */ h("div", {
1080
- ref: w,
1081
- className: `game-ui-liquid-reveal ${b}`,
1084
+ ref: T,
1085
+ className: `game-ui-liquid-reveal ${x}`,
1082
1086
  style: {
1083
- ...g ? { "--liquid-presence-from": g } : {},
1084
- ..._ ? { "--liquid-presence-to": _ } : {}
1087
+ ..._ ? { "--liquid-presence-from": _ } : {},
1088
+ ...v ? { "--liquid-presence-to": v } : {}
1085
1089
  },
1086
1090
  "data-reveal-variant": a,
1087
1091
  "data-reveal-surface": o,
1088
- "data-reveal-filter": M ? "volume" : "flat",
1092
+ "data-reveal-filter": P ? "volume" : "flat",
1089
1093
  children: [/* @__PURE__ */ m("div", {
1090
1094
  className: "game-ui-liquid-reveal-content",
1091
1095
  children: t
1092
1096
  }), E.width > 0 && /* @__PURE__ */ h("svg", {
1093
1097
  className: "game-ui-liquid-reveal-ink",
1094
- width: k,
1095
- height: A,
1096
- viewBox: `0 0 ${k} ${A}`,
1098
+ width: j,
1099
+ height: M,
1100
+ viewBox: `0 0 ${j} ${M}`,
1097
1101
  "aria-hidden": "true",
1098
1102
  focusable: "false",
1099
1103
  children: [
1100
- /* @__PURE__ */ h("defs", { children: [/* @__PURE__ */ h("linearGradient", {
1101
- id: `${O}-fill`,
1104
+ /* @__PURE__ */ h("defs", { children: [o === "material" ? /* @__PURE__ */ m("linearGradient", {
1105
+ id: `${A}-fill`,
1106
+ x1: "0",
1107
+ y1: "0",
1108
+ x2: "0",
1109
+ y2: "1",
1110
+ children: D.map(([e, t]) => /* @__PURE__ */ m("stop", {
1111
+ offset: e,
1112
+ style: { stopColor: t }
1113
+ }, e))
1114
+ }) : /* @__PURE__ */ h("linearGradient", {
1115
+ id: `${A}-fill`,
1102
1116
  x1: "0",
1103
1117
  y1: "0",
1104
1118
  x2: "1",
@@ -1111,11 +1125,11 @@ function de({ children: t, source: n, revealKey: i = "initial", variant: a = "co
1111
1125
  stopColor: "var(--liquid-presence-to, var(--game-ui-secondary))"
1112
1126
  })]
1113
1127
  }), /* @__PURE__ */ m("filter", {
1114
- id: `${O}-finish`,
1128
+ id: `${A}-finish`,
1115
1129
  x: "-12",
1116
1130
  y: "-12",
1117
- width: k + 24,
1118
- height: A + 24,
1131
+ width: j + 24,
1132
+ height: M + 24,
1119
1133
  filterUnits: "userSpaceOnUse",
1120
1134
  colorInterpolationFilters: "sRGB",
1121
1135
  children: /* @__PURE__ */ m(s, {
@@ -1129,26 +1143,30 @@ function de({ children: t, source: n, revealKey: i = "initial", variant: a = "co
1129
1143
  })] }),
1130
1144
  o === "material" && /* @__PURE__ */ m("path", {
1131
1145
  "data-reveal-body": "",
1132
- d: j.outline,
1133
- fill: `url(#${O}-fill)`
1146
+ d: N.outline,
1147
+ fill: `url(#${A}-fill)`
1134
1148
  }),
1135
- /* @__PURE__ */ h("g", {
1149
+ /* @__PURE__ */ m("g", {
1136
1150
  "data-reveal-material": "",
1137
- filter: M ? `url(#${O}-finish)` : void 0,
1138
- children: [/* @__PURE__ */ m("path", {
1151
+ filter: P ? `url(#${A}-finish)` : void 0,
1152
+ children: o === "material" ? /* @__PURE__ */ m("path", {
1153
+ "data-reveal-outline": "",
1154
+ d: N.outline,
1155
+ fill: `url(#${A}-fill)`
1156
+ }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("path", {
1139
1157
  "data-reveal-ribbon": "",
1140
- d: j.ribbon,
1158
+ d: N.ribbon,
1141
1159
  fillRule: "evenodd",
1142
- fill: `url(#${O}-fill)`
1160
+ fill: `url(#${A}-fill)`
1143
1161
  }), /* @__PURE__ */ m("path", {
1144
1162
  "data-reveal-outline": "",
1145
- d: j.outline,
1163
+ d: N.outline,
1146
1164
  pathLength: "1",
1147
1165
  fill: "none",
1148
- stroke: `url(#${O}-fill)`,
1166
+ stroke: `url(#${A}-fill)`,
1149
1167
  strokeWidth: "1.2",
1150
1168
  strokeLinecap: "round"
1151
- })]
1169
+ })] })
1152
1170
  })
1153
1171
  ]
1154
1172
  })]
@@ -1156,7 +1174,7 @@ function de({ children: t, source: n, revealKey: i = "initial", variant: a = "co
1156
1174
  }
1157
1175
  //#endregion
1158
1176
  //#region src/LiquidAnchor.tsx
1159
- function fe({ source: e, children: t, placement: n = "top-end", onBoundsChange: r }) {
1177
+ function $({ source: e, children: t, placement: n = "top-end", onBoundsChange: r }) {
1160
1178
  let [i, a] = f(null), o = d(r);
1161
1179
  o.current = r;
1162
1180
  let [s, c] = f(null);
@@ -1166,7 +1184,7 @@ function fe({ source: e, children: t, placement: n = "top-end", onBoundsChange:
1166
1184
  let t = e.current, r = i;
1167
1185
  if (!t || !r) return;
1168
1186
  let a = (e) => {
1169
- G(r, e), o.current?.(e);
1187
+ J(r, e), o.current?.(e);
1170
1188
  }, s = !0, c = 0, l = null, u = null, d = () => {
1171
1189
  let e = getComputedStyle(t);
1172
1190
  for (let t of Array.from(e)) if (t.startsWith("--game-ui-") || t.startsWith("--liquid-presence-")) {
@@ -1275,4 +1293,4 @@ function fe({ source: e, children: t, placement: n = "top-end", onBoundsChange:
1275
1293
  }) : null;
1276
1294
  }
1277
1295
  //#endregion
1278
- export { fe as LiquidAnchor, q as LiquidPresence, de as LiquidReveal };
1296
+ export { $ as LiquidAnchor, de as LiquidPresence, me as LiquidReveal };