@nevuto/novi 0.3.55 → 0.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NoviInput/NoviInput.d.ts +42 -0
- package/dist/NoviInput/NoviInput.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1550 -1360
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
2
|
+
import { jsx as i, jsxs as g, Fragment as Bt } from "react/jsx-runtime";
|
|
3
|
+
import { useState as at, useEffect as tt, useRef as D, useId as St, useMemo as yn, forwardRef as ee, useLayoutEffect as ve, useCallback as gn, Children as xn } from "react";
|
|
4
|
+
import { Scrollable as Xt, Button as $t, IconButton as et, Kbd as bn, Spinner as vn } from "@nevuto/components";
|
|
5
|
+
import { ChevronDownIcon as kn, RotateCcwClockIcon as Nn, PlusIcon as ke, AudioWaveformIcon as Ke, ArrowUpIcon as Ze, Minimize2Icon as $n, Maximize2Icon as An, XIcon as Je, ArrowDownIcon as wn, ArrowBigUpIcon as Mn, CornerDownLeftIcon as zn, SquareIcon as In, PanelRightIcon as Tn, MinusIcon as Bn, ZapIcon as Rn, MessagesSquareIcon as En, CircleAlertIcon as Ne, CheckIcon as tn, CopyIcon as Cn, ThumbsUpIcon as On, ThumbsDownIcon as Pn, ChevronRightIcon as Sn, SparklesIcon as jn, CaretDownIcon as en, CaretRightIcon as nn, CircleDashedIcon as qn } from "@nevuto/icons";
|
|
6
|
+
const W = Math.PI * 2, z = (t, n = 0, e = 1) => t < n ? n : t > e ? e : t, T = (t, n, e) => t + (n - t) * e, J = {
|
|
7
7
|
easeOutCubic: (t) => 1 - (1 - t) ** 3,
|
|
8
8
|
easeInOutCubic: (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2,
|
|
9
9
|
easeOutQuint: (t) => 1 - (1 - t) ** 5
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
const s = t / n *
|
|
11
|
+
function wt(t, n, e = 0) {
|
|
12
|
+
const s = t / n * W;
|
|
13
13
|
return 0.55 * Math.sin(s + e) + 0.3 * Math.sin(2 * s + e * 1.7 + 1.1) + 0.15 * Math.sin(3 * s + e * 2.3 + 2.4);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ne(t) {
|
|
16
16
|
let n = t >>> 0;
|
|
17
17
|
return () => {
|
|
18
18
|
n = n + 1831565813 >>> 0;
|
|
@@ -20,51 +20,51 @@ function Gt(t) {
|
|
|
20
20
|
return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
25
|
-
const s = (t % 360 + 360) % 360, o = (1 - Math.abs(2 * e - 1)) * n,
|
|
23
|
+
const w = (t) => Math.round(t * 100) / 100;
|
|
24
|
+
function ae(t, n = 0.55, e = 0.62) {
|
|
25
|
+
const s = (t % 360 + 360) % 360, o = (1 - Math.abs(2 * e - 1)) * n, a = o * (1 - Math.abs(s / 60 % 2 - 1)), r = e - o / 2, [c, l, d] = s < 60 ? [o, a, 0] : s < 120 ? [a, o, 0] : s < 180 ? [0, o, a] : s < 240 ? [0, a, o] : s < 300 ? [a, 0, o] : [o, 0, a], u = (h) => Math.round((h + r) * 255).toString(16).padStart(2, "0");
|
|
26
26
|
return `#${u(c)}${u(l)}${u(d)}`;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
let h = "",
|
|
31
|
-
for (let
|
|
32
|
-
const m =
|
|
33
|
-
|
|
28
|
+
function Ln(t, n, e, s, o = 1) {
|
|
29
|
+
const a = t.phase + n * t.speed * W, r = Math.cos(t.tilt), c = Math.sin(t.tilt), l = Math.sqrt(Math.max(0, 1 - t.k * t.k)), d = 64, u = t.sweep * W;
|
|
30
|
+
let h = "", p = "", f = null;
|
|
31
|
+
for (let N = 0; N <= d; N++) {
|
|
32
|
+
const m = a + N / d * u, M = Math.cos(m), k = Math.sin(m), y = t.a * (M * r + k * -c * t.k) + t.cx, b = t.a * (M * c + k * r * t.k) + t.cy, $ = t.a * k * l < 0, P = w(y * e), q = w(b * e), L = $ !== f ? "M" : "L";
|
|
33
|
+
$ ? p += `${L}${P} ${q}` : h += `${L}${P} ${q}`, f = $;
|
|
34
34
|
}
|
|
35
|
-
const _ = Math.cos(t.tilt) * t.a * e,
|
|
35
|
+
const _ = Math.cos(t.tilt) * t.a * e, v = Math.sin(t.tilt) * t.a * e;
|
|
36
36
|
return {
|
|
37
37
|
id: s,
|
|
38
38
|
front: h,
|
|
39
|
-
back:
|
|
39
|
+
back: p,
|
|
40
40
|
width: t.width * e,
|
|
41
41
|
opacity: o,
|
|
42
42
|
grad: {
|
|
43
|
-
x1:
|
|
44
|
-
y1:
|
|
45
|
-
x2:
|
|
46
|
-
y2:
|
|
43
|
+
x1: w(t.cx * e - _),
|
|
44
|
+
y1: w(t.cy * e - v),
|
|
45
|
+
x2: w(t.cx * e + _),
|
|
46
|
+
y2: w(t.cy * e + v),
|
|
47
47
|
stops: [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
ae(t.hue),
|
|
49
|
+
ae(t.hue + t.hueSpan * 0.5),
|
|
50
|
+
ae(t.hue + t.hueSpan)
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
a: 1.3 +
|
|
57
|
-
k: 0.05 +
|
|
58
|
-
tilt: n / 6 * Math.PI +
|
|
59
|
-
speed: 3 +
|
|
60
|
-
phase:
|
|
61
|
-
sweep: 0.6 +
|
|
62
|
-
hue: n * 360 / 6 +
|
|
63
|
-
hueSpan: 60 +
|
|
64
|
-
width: 0.05 +
|
|
55
|
+
const xt = ne(659918), Me = Array.from({ length: 6 }, (t, n) => ({
|
|
56
|
+
a: 1.3 + xt() * 0.1,
|
|
57
|
+
k: 0.05 + xt() * 0.4,
|
|
58
|
+
tilt: n / 6 * Math.PI + xt() * 0.5,
|
|
59
|
+
speed: 3 + xt() * 0.7,
|
|
60
|
+
phase: xt() * W,
|
|
61
|
+
sweep: 0.6 + xt() * 0.25,
|
|
62
|
+
hue: n * 360 / 6 + xt() * 30,
|
|
63
|
+
hueSpan: 60 + xt() * 60,
|
|
64
|
+
width: 0.05 + xt() * 0.012,
|
|
65
65
|
cx: 0,
|
|
66
66
|
cy: 0.1
|
|
67
|
-
})),
|
|
67
|
+
})), Hn = Array.from({ length: 4 }, (t, n) => ({
|
|
68
68
|
a: 0.78 + n * 0.2,
|
|
69
69
|
k: 0.05 + n * 0.02,
|
|
70
70
|
tilt: -0.62 + n * 0.05,
|
|
@@ -76,28 +76,28 @@ const mt = Gt(659918), _e = Array.from({ length: 6 }, (t, n) => ({
|
|
|
76
76
|
width: 0.05,
|
|
77
77
|
cx: 0,
|
|
78
78
|
cy: -0.12
|
|
79
|
-
})),
|
|
79
|
+
})), ze = [-0.557, -0.013, 0.532], Ie = 0.165, Te = 1.25, Be = ne(48879), Fn = Array.from({ length: 5 }, (t, n) => ({
|
|
80
80
|
birth: n * 0.2,
|
|
81
|
-
angle:
|
|
82
|
-
rho: 0.58 +
|
|
81
|
+
angle: Be() * W,
|
|
82
|
+
rho: 0.58 + Be() * 0.18
|
|
83
83
|
}));
|
|
84
|
-
function
|
|
84
|
+
function Dn(t, n) {
|
|
85
85
|
const e = [];
|
|
86
|
-
for (const s of
|
|
86
|
+
for (const s of Fn) {
|
|
87
87
|
const o = t - s.birth;
|
|
88
88
|
if (o < 0 || o > 0.62) continue;
|
|
89
|
-
const
|
|
89
|
+
const a = s.rho * Math.pow(0.75, o * 10), r = s.angle + o * 100 * Math.PI / 180;
|
|
90
90
|
e.push({
|
|
91
|
-
x: Math.cos(r) *
|
|
92
|
-
y: Math.sin(r) *
|
|
93
|
-
r: (0.04 + 0.028 *
|
|
94
|
-
depth:
|
|
95
|
-
opacity:
|
|
91
|
+
x: Math.cos(r) * a * n,
|
|
92
|
+
y: Math.sin(r) * a * n,
|
|
93
|
+
r: (0.04 + 0.028 * z(o / 0.55)) * n,
|
|
94
|
+
depth: z(1 - a / 0.8),
|
|
95
|
+
opacity: z(o / 0.06) * z((0.62 - o) / 0.08)
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
return e;
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const Re = ne(49383), Yn = Array.from({ length: 4 }, (t, n) => {
|
|
101
101
|
const e = n - 1.5;
|
|
102
102
|
return {
|
|
103
103
|
a: 0.85 * (1 + e * 0.03),
|
|
@@ -106,204 +106,204 @@ const ve = Gt(49383), Cn = Array.from({ length: 4 }, (t, n) => {
|
|
|
106
106
|
tilt: 34 * Math.PI / 180 + e * 0.035,
|
|
107
107
|
speed: 210 / 360,
|
|
108
108
|
// measured phase shift: 10 to 20 degrees between ribbons, no more
|
|
109
|
-
phase: -n * 0.045 +
|
|
109
|
+
phase: -n * 0.045 + Re() * 0.012,
|
|
110
110
|
sweep: 0.34,
|
|
111
|
-
hue: n * 85 +
|
|
111
|
+
hue: n * 85 + Re() * 20,
|
|
112
112
|
hueSpan: 80,
|
|
113
113
|
width: 0.095,
|
|
114
114
|
cx: 0,
|
|
115
115
|
cy: 0
|
|
116
116
|
};
|
|
117
|
-
}),
|
|
118
|
-
function
|
|
117
|
+
}), Un = 0.129, Xn = "var(--backgrounds-bg-interactive)", Gn = -42, Ee = 1.003, Wn = 0.15, Qn = 1.14, Vn = 0.054, $e = 15.46, _e = 0.186, me = 0.412, sn = { yaw: 28.49, pitch: 28.62, roll: -13 }, Zt = (t) => t * Math.PI / 180;
|
|
118
|
+
function Jt(t, n, e) {
|
|
119
119
|
const s = Math.cos(e), o = Math.sin(e);
|
|
120
120
|
return [
|
|
121
121
|
[t[0] * s + n[0] * o, t[1] * s + n[1] * o, t[2] * s + n[2] * o],
|
|
122
122
|
[n[0] * s - t[0] * o, n[1] * s - t[1] * o, n[2] * s - t[2] * o]
|
|
123
123
|
];
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
let s = [0, 0, 1], o = [1, 0, 0],
|
|
127
|
-
[s, o] =
|
|
125
|
+
function on(t, n, e = $e) {
|
|
126
|
+
let s = [0, 0, 1], o = [1, 0, 0], a = [0, 1, 0];
|
|
127
|
+
[s, o] = Jt(s, o, Zt(t.yaw)), [a, s] = Jt(a, s, Zt(t.pitch)), [o, a] = Jt(o, a, Zt(t.roll));
|
|
128
128
|
const r = (c) => {
|
|
129
|
-
const [l, d] =
|
|
129
|
+
const [l, d] = Jt(s, o, Zt(e * c));
|
|
130
130
|
return {
|
|
131
131
|
x: l[0] * n,
|
|
132
132
|
y: l[1] * n,
|
|
133
133
|
a: d[0],
|
|
134
134
|
b: d[1],
|
|
135
|
-
c:
|
|
136
|
-
d:
|
|
135
|
+
c: a[0],
|
|
136
|
+
d: a[1],
|
|
137
137
|
depth: l[2]
|
|
138
138
|
};
|
|
139
139
|
};
|
|
140
140
|
return [r(-1), r(1)];
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const Ce = ne(24301), Oe = (() => {
|
|
143
143
|
const t = [];
|
|
144
144
|
let n = 1.4;
|
|
145
145
|
for (; n < 900; )
|
|
146
|
-
t.push(n), n += 1.9 +
|
|
146
|
+
t.push(n), n += 1.9 + Ce() * 2.7, Ce() < 0.18 && (t.push(n), n += 0.24);
|
|
147
147
|
return t;
|
|
148
|
-
})(),
|
|
149
|
-
function
|
|
150
|
-
for (let n = 0; n <
|
|
151
|
-
const e =
|
|
148
|
+
})(), Kn = 0.18;
|
|
149
|
+
function Zn(t) {
|
|
150
|
+
for (let n = 0; n < Oe.length; n++) {
|
|
151
|
+
const e = Oe[n];
|
|
152
152
|
if (t < e) break;
|
|
153
|
-
const s = (t - e) /
|
|
153
|
+
const s = (t - e) / Kn;
|
|
154
154
|
if (s >= 0 && s <= 1)
|
|
155
155
|
return s < 0.45 ? 1 - s / 0.45 : (s - 0.45) / 0.55;
|
|
156
156
|
}
|
|
157
157
|
return 1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Jn(t, n = {}) {
|
|
160
160
|
const { wander: e = 1, blink: s = !0, float: o = !0 } = n;
|
|
161
161
|
return {
|
|
162
|
-
dYaw: (
|
|
163
|
-
dPitch: (
|
|
164
|
-
dRoll:
|
|
165
|
-
lid: s ?
|
|
162
|
+
dYaw: (wt(t, 11.3, 0.4) * 5.5 + wt(t, 3.7, 2.1) * 1.6) * e,
|
|
163
|
+
dPitch: (wt(t, 9.1, 1.3) * 4.2 + wt(t, 4.3, 0.7) * 1.3) * e,
|
|
164
|
+
dRoll: wt(t, 13.7, 3.2) * 2.2 * e,
|
|
165
|
+
lid: s ? Zn(t) : 1,
|
|
166
166
|
// At rest the reference is almost still (centre stable to +-0.003, constant
|
|
167
167
|
// radius): all the life goes through the gaze and the blinks. Just enough is
|
|
168
168
|
// kept here not to freeze the image completely.
|
|
169
|
-
driftX: o ?
|
|
170
|
-
driftY: o ?
|
|
169
|
+
driftX: o ? wt(t, 7.9, 1.9) * 6e-3 : 0,
|
|
170
|
+
driftY: o ? wt(t, 5.3, 0.3) * 7e-3 : 0,
|
|
171
171
|
// Width is constant, only the height breathes very slightly.
|
|
172
172
|
breath: o ? 1 + Math.sin(t / 3.4 * Math.PI * 2) * 5e-3 : 1
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return 0.06 + 0.94 *
|
|
175
|
+
function ts(t) {
|
|
176
|
+
return 0.06 + 0.94 * z(t);
|
|
177
177
|
}
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
],
|
|
178
|
+
const yt = (t, n, e = 0, s = 1) => ({ w: t, h: n, tilt: e, open: s }), ft = (t, n, e = 0, s = 1) => [
|
|
179
|
+
yt(t, n, e, s),
|
|
180
|
+
yt(t, n, -e, s)
|
|
181
|
+
], Z = { yaw: 0, pitch: 0, roll: 0 }, rn = [
|
|
182
182
|
{
|
|
183
183
|
id: "neutral",
|
|
184
|
-
gaze: { ...
|
|
185
|
-
split:
|
|
186
|
-
eyes: [
|
|
184
|
+
gaze: { ...Z },
|
|
185
|
+
split: $e,
|
|
186
|
+
eyes: [yt(_e, me), yt(_e, me)]
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
id: "attentive",
|
|
190
|
-
gaze: { ...
|
|
190
|
+
gaze: { ...Z },
|
|
191
191
|
split: 16,
|
|
192
|
-
eyes:
|
|
192
|
+
eyes: ft(0.21, 0.44)
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
id: "surprised",
|
|
196
|
-
gaze: { ...
|
|
196
|
+
gaze: { ...Z },
|
|
197
197
|
split: 19,
|
|
198
|
-
eyes:
|
|
198
|
+
eyes: ft(0.45, 0.47)
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
id: "excited",
|
|
202
|
-
gaze: { ...
|
|
202
|
+
gaze: { ...Z },
|
|
203
203
|
split: 19.5,
|
|
204
|
-
eyes:
|
|
204
|
+
eyes: ft(0.4, 0.56, -10)
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
// eyes narrowed into arcs: the tops converge slightly
|
|
208
208
|
id: "happy",
|
|
209
|
-
gaze: { ...
|
|
209
|
+
gaze: { ...Z },
|
|
210
210
|
split: 17,
|
|
211
|
-
eyes:
|
|
211
|
+
eyes: ft(0.27, 0.17, 14)
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
id: "laughing",
|
|
215
|
-
gaze: { ...
|
|
215
|
+
gaze: { ...Z },
|
|
216
216
|
split: 18,
|
|
217
|
-
eyes:
|
|
217
|
+
eyes: ft(0.34, 0.13, 20)
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
// eye tops converging hard towards the centre + narrowed eyes
|
|
221
221
|
id: "angry",
|
|
222
|
-
gaze: { ...
|
|
222
|
+
gaze: { ...Z },
|
|
223
223
|
split: 17,
|
|
224
|
-
eyes:
|
|
224
|
+
eyes: ft(0.34, 0.15, 30)
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
// the reverse: the eye tops diverge
|
|
228
228
|
id: "sad",
|
|
229
|
-
gaze: { ...
|
|
229
|
+
gaze: { ...Z },
|
|
230
230
|
split: 16,
|
|
231
|
-
eyes:
|
|
231
|
+
eyes: ft(0.22, 0.4, -28)
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
id: "scared",
|
|
235
|
-
gaze: { ...
|
|
235
|
+
gaze: { ...Z },
|
|
236
236
|
split: 20.5,
|
|
237
|
-
eyes:
|
|
237
|
+
eyes: ft(0.4, 0.6)
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
// one eye distinctly more closed than the other
|
|
241
241
|
id: "suspicious",
|
|
242
|
-
gaze: { ...
|
|
242
|
+
gaze: { ...Z },
|
|
243
243
|
split: 16,
|
|
244
|
-
eyes: [
|
|
244
|
+
eyes: [yt(0.21, 0.4), yt(0.22, 0.15)]
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
// asymmetric on both axes: mismatched sizes AND tilts.
|
|
248
248
|
// The narrowed eye is deliberately flat (ratio 1.6): at a ratio near 1 it
|
|
249
249
|
// would read as round and its tilt would not show.
|
|
250
250
|
id: "confused",
|
|
251
|
-
gaze: { ...
|
|
251
|
+
gaze: { ...Z },
|
|
252
252
|
split: 16.5,
|
|
253
|
-
eyes: [
|
|
253
|
+
eyes: [yt(0.2, 0.44, -18), yt(0.28, 0.17, 14)]
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
id: "curious",
|
|
257
|
-
gaze: { ...
|
|
257
|
+
gaze: { ...Z },
|
|
258
258
|
split: 16.5,
|
|
259
|
-
eyes: [
|
|
259
|
+
eyes: [yt(0.24, 0.46, -8), yt(0.2, 0.38, -8)]
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
id: "proud",
|
|
263
|
-
gaze: { ...
|
|
263
|
+
gaze: { ...Z },
|
|
264
264
|
split: 17,
|
|
265
|
-
eyes:
|
|
265
|
+
eyes: ft(0.3, 0.15, 18)
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
268
|
id: "shy",
|
|
269
|
-
gaze: { ...
|
|
269
|
+
gaze: { ...Z },
|
|
270
270
|
split: 14,
|
|
271
|
-
eyes:
|
|
271
|
+
eyes: ft(0.17, 0.3)
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
// horizontal slits
|
|
275
275
|
id: "unimpressed",
|
|
276
|
-
gaze: { ...
|
|
276
|
+
gaze: { ...Z },
|
|
277
277
|
split: 16,
|
|
278
|
-
eyes:
|
|
278
|
+
eyes: ft(0.3, 0.12)
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
// half-dropped lids: goes through `open`, i.e. the vertical squash on screen,
|
|
282
282
|
// the same mechanism as a blink
|
|
283
283
|
id: "sleepy",
|
|
284
|
-
gaze: { ...
|
|
284
|
+
gaze: { ...Z },
|
|
285
285
|
split: 16,
|
|
286
|
-
eyes:
|
|
286
|
+
eyes: ft(0.2, 0.42, 0, 0.42)
|
|
287
287
|
}
|
|
288
|
-
],
|
|
289
|
-
w:
|
|
290
|
-
h:
|
|
291
|
-
tilt:
|
|
292
|
-
open:
|
|
288
|
+
], es = new Map(rn.map((t) => [t.id, t])), ns = "neutral", Pe = (t, n, e) => ({
|
|
289
|
+
w: T(t.w, n.w, e),
|
|
290
|
+
h: T(t.h, n.h, e),
|
|
291
|
+
tilt: T(t.tilt ?? 0, n.tilt ?? 0, e),
|
|
292
|
+
open: T(t.open, n.open, e)
|
|
293
293
|
});
|
|
294
|
-
function
|
|
294
|
+
function ss(t, n, e) {
|
|
295
295
|
return {
|
|
296
296
|
id: n.id,
|
|
297
297
|
gaze: {
|
|
298
|
-
yaw:
|
|
299
|
-
pitch:
|
|
300
|
-
roll:
|
|
298
|
+
yaw: T(t.gaze.yaw, n.gaze.yaw, e),
|
|
299
|
+
pitch: T(t.gaze.pitch, n.gaze.pitch, e),
|
|
300
|
+
roll: T(t.gaze.roll, n.gaze.roll, e)
|
|
301
301
|
},
|
|
302
|
-
split:
|
|
303
|
-
eyes: [
|
|
302
|
+
split: T(t.split, n.split, e),
|
|
303
|
+
eyes: [Pe(t.eyes[0], n.eyes[0], e), Pe(t.eyes[1], n.eyes[1], e)]
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
-
const
|
|
306
|
+
const ct = 64, os = {
|
|
307
307
|
// egg: same height as the ball, narrowed
|
|
308
308
|
// frame 164, measured footprint 1.647 x 2.000
|
|
309
309
|
egg: [0.8369, 0.8424, 0.8497, 0.8585, 0.8674, 0.8775, 0.8878, 0.8983, 0.9089, 0.9185, 0.9288, 0.9374, 0.9445, 0.9504, 0.9543, 0.9559, 0.9555, 0.9519, 0.9466, 0.9389, 0.9302, 0.9193, 0.9085, 0.8969, 0.8852, 0.8734, 0.8625, 0.8513, 0.8411, 0.8325, 0.8243, 0.8179, 0.8137, 0.8112, 0.8102, 0.8128, 0.8178, 0.8262, 0.8374, 0.8518, 0.8702, 0.8922, 0.9169, 0.9446, 0.9741, 1.0023, 1.0267, 1.0433, 1.0481, 1.0393, 1.0216, 0.997, 0.9697, 0.9418, 0.9169, 0.8949, 0.876, 0.8604, 0.849, 0.8394, 0.8337, 0.8314, 0.8305, 0.8326],
|
|
@@ -313,10 +313,10 @@ const tt = 64, Vn = {
|
|
|
313
313
|
// triangle, point up, very rounded corners
|
|
314
314
|
// frame 190, measured footprint 1.995 x 1.884
|
|
315
315
|
triangle: [0.7819, 0.8211, 0.8747, 0.944, 1.0223, 1.096, 1.1401, 1.134, 1.0808, 1.0047, 0.9265, 0.8603, 0.8104, 0.773, 0.745, 0.7273, 0.7151, 0.7118, 0.7148, 0.7245, 0.7427, 0.768, 0.8037, 0.8518, 0.9148, 0.9876, 1.0583, 1.1073, 1.1109, 1.0667, 0.994, 0.9164, 0.8482, 0.7948, 0.7555, 0.7261, 0.7056, 0.6925, 0.6859, 0.6869, 0.6938, 0.7084, 0.7305, 0.7615, 0.804, 0.8595, 0.9311, 1.0092, 1.0791, 1.1171, 1.1054, 1.0501, 0.9779, 0.905, 0.845, 0.799, 0.7656, 0.7413, 0.7258, 0.716, 0.7146, 0.7204, 0.733, 0.7528]
|
|
316
|
-
},
|
|
317
|
-
function
|
|
316
|
+
}, Ae = Array.from({ length: ct }, (t, n) => n / ct * W), se = Ae.map(Math.cos), oe = Ae.map(Math.sin);
|
|
317
|
+
function ye(t, n = {}) {
|
|
318
318
|
return {
|
|
319
|
-
radii: [...
|
|
319
|
+
radii: [...os[t]],
|
|
320
320
|
rot: 0,
|
|
321
321
|
cx: 0,
|
|
322
322
|
cy: 0,
|
|
@@ -325,9 +325,9 @@ function ce(t, n = {}) {
|
|
|
325
325
|
...n
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Ct(t, n = {}) {
|
|
329
329
|
return {
|
|
330
|
-
radii: new Array(
|
|
330
|
+
radii: new Array(ct).fill(t),
|
|
331
331
|
rot: 0,
|
|
332
332
|
cx: 0,
|
|
333
333
|
cy: 0,
|
|
@@ -336,144 +336,144 @@ function It(t, n = {}) {
|
|
|
336
336
|
...n
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function rs(t, n, e, s) {
|
|
340
340
|
const o = s ?? {
|
|
341
|
-
radii: new Array(
|
|
341
|
+
radii: new Array(ct),
|
|
342
342
|
rot: 0,
|
|
343
343
|
cx: 0,
|
|
344
344
|
cy: 0,
|
|
345
345
|
sx: 1,
|
|
346
346
|
sy: 1
|
|
347
347
|
};
|
|
348
|
-
for (let r = 0; r <
|
|
349
|
-
o.radii[r] =
|
|
350
|
-
let
|
|
351
|
-
for (;
|
|
352
|
-
for (;
|
|
353
|
-
return o.rot = t.rot +
|
|
354
|
-
}
|
|
355
|
-
function
|
|
348
|
+
for (let r = 0; r < ct; r++)
|
|
349
|
+
o.radii[r] = T(t.radii[r] ?? 1, n.radii[r] ?? 1, e);
|
|
350
|
+
let a = n.rot - t.rot;
|
|
351
|
+
for (; a > Math.PI; ) a -= W;
|
|
352
|
+
for (; a < -Math.PI; ) a += W;
|
|
353
|
+
return o.rot = t.rot + a * e, o.cx = T(t.cx, n.cx, e), o.cy = T(t.cy, n.cy, e), o.sx = T(t.sx, n.sx, e), o.sy = T(t.sy, n.sy, e), o;
|
|
354
|
+
}
|
|
355
|
+
function ge(t, n, e = []) {
|
|
356
356
|
const s = Math.cos(t.rot), o = Math.sin(t.rot);
|
|
357
|
-
for (let
|
|
358
|
-
const r = t.radii[
|
|
359
|
-
h.x = (d * t.sx + t.cx) * n, h.y = (u * t.sy + t.cy) * n, e[
|
|
357
|
+
for (let a = 0; a < ct; a++) {
|
|
358
|
+
const r = t.radii[a] ?? 1, c = r * (se[a] ?? 0), l = r * (oe[a] ?? 0), d = c * s - l * o, u = c * o + l * s, h = e[a] ?? { x: 0, y: 0 };
|
|
359
|
+
h.x = (d * t.sx + t.cx) * n, h.y = (u * t.sy + t.cy) * n, e[a] = h;
|
|
360
360
|
}
|
|
361
|
-
return e.length =
|
|
361
|
+
return e.length = ct, e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function is(t, n = 1 / 6) {
|
|
364
364
|
const e = t.length;
|
|
365
365
|
if (e < 3) return "";
|
|
366
366
|
const s = t[0];
|
|
367
|
-
let o = `M${
|
|
368
|
-
for (let
|
|
369
|
-
const r = t[(
|
|
370
|
-
o += `C${
|
|
367
|
+
let o = `M${w(s.x)} ${w(s.y)}`;
|
|
368
|
+
for (let a = 0; a < e; a++) {
|
|
369
|
+
const r = t[(a - 1 + e) % e], c = t[a], l = t[(a + 1) % e], d = t[(a + 2) % e], u = c.x + (l.x - r.x) * n, h = c.y + (l.y - r.y) * n, p = l.x - (d.x - c.x) * n, f = l.y - (d.y - c.y) * n;
|
|
370
|
+
o += `C${w(u)} ${w(h)} ${w(p)} ${w(f)} ${w(l.x)} ${w(l.y)}`;
|
|
371
371
|
}
|
|
372
372
|
return `${o}Z`;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
const s = new Array(
|
|
376
|
-
for (let
|
|
377
|
-
const r =
|
|
374
|
+
function Gt(t, n, e) {
|
|
375
|
+
const s = new Array(ct).fill(0), o = t.length;
|
|
376
|
+
for (let a = 0; a < ct; a++) {
|
|
377
|
+
const r = se[a] ?? 0, c = oe[a] ?? 0;
|
|
378
378
|
let l = 0;
|
|
379
379
|
for (let d = 0; d < o; d++) {
|
|
380
|
-
const u = t[d], h = t[(d + 1) % o],
|
|
380
|
+
const u = t[d], h = t[(d + 1) % o], p = h.x - u.x, f = h.y - u.y, _ = r * f - c * p;
|
|
381
381
|
if (Math.abs(_) < 1e-9) continue;
|
|
382
|
-
const
|
|
383
|
-
m > l &&
|
|
382
|
+
const v = u.x - n, N = u.y - e, m = (v * f - N * p) / _, M = (v * c - N * r) / _;
|
|
383
|
+
m > l && M >= 0 && M <= 1 && (l = m);
|
|
384
384
|
}
|
|
385
|
-
s[
|
|
385
|
+
s[a] = l;
|
|
386
386
|
}
|
|
387
387
|
return s;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
const c = s - t, l = o - n, d = Math.hypot(c, l) || 1e-6, u = Math.atan2(l, c), h = Math.acos(Math.max(-1, Math.min(1, (e -
|
|
391
|
-
for (let
|
|
392
|
-
const _ = u + h + (
|
|
393
|
-
|
|
389
|
+
function Wt(t, n, e, s, o, a, r = 96) {
|
|
390
|
+
const c = s - t, l = o - n, d = Math.hypot(c, l) || 1e-6, u = Math.atan2(l, c), h = Math.acos(Math.max(-1, Math.min(1, (e - a) / d))), p = [];
|
|
391
|
+
for (let f = 0; f <= r / 2; f++) {
|
|
392
|
+
const _ = u + h + (W - 2 * h) * f / (r / 2);
|
|
393
|
+
p.push({ x: t + Math.cos(_) * e, y: n + Math.sin(_) * e });
|
|
394
394
|
}
|
|
395
|
-
for (let
|
|
396
|
-
const _ = u - h + 2 * h *
|
|
397
|
-
|
|
395
|
+
for (let f = 0; f <= r / 2; f++) {
|
|
396
|
+
const _ = u - h + 2 * h * f / (r / 2);
|
|
397
|
+
p.push({ x: s + Math.cos(_) * a, y: o + Math.sin(_) * a });
|
|
398
398
|
}
|
|
399
|
-
return
|
|
399
|
+
return p;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
const e = t.length, s = (n /
|
|
403
|
-
return
|
|
401
|
+
function an(t, n) {
|
|
402
|
+
const e = t.length, s = (n / W % 1 + 1) % 1 * e, o = Math.floor(s);
|
|
403
|
+
return T(t[o % e] ?? 1, t[(o + 1) % e] ?? 1, s - o);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
return
|
|
407
|
-
const
|
|
408
|
-
return (
|
|
405
|
+
function as(t, n = 1, e = 1) {
|
|
406
|
+
return Ae.map((s, o) => {
|
|
407
|
+
const a = Math.abs((se[o] ?? 0) / n) ** t, r = Math.abs((oe[o] ?? 0) / e) ** t;
|
|
408
|
+
return (a + r) ** (-1 / t);
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
const n = new Array(
|
|
413
|
-
for (let e = 0; e <
|
|
414
|
-
const s =
|
|
415
|
-
let
|
|
411
|
+
function cs(t) {
|
|
412
|
+
const n = new Array(ct).fill(0);
|
|
413
|
+
for (let e = 0; e < ct; e++) {
|
|
414
|
+
const s = se[e] ?? 0, o = oe[e] ?? 0;
|
|
415
|
+
let a = 0;
|
|
416
416
|
for (const r of t) {
|
|
417
417
|
const c = s * r.x + o * r.y, l = c * c - (r.x * r.x + r.y * r.y - r.r * r.r);
|
|
418
418
|
if (l < 0) continue;
|
|
419
419
|
const d = c + Math.sqrt(l);
|
|
420
|
-
d >
|
|
420
|
+
d > a && (a = d);
|
|
421
421
|
}
|
|
422
|
-
n[e] =
|
|
422
|
+
n[e] = a;
|
|
423
423
|
}
|
|
424
424
|
return n;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
const s = t.length, o = [],
|
|
426
|
+
function ls(t, n, e = 10) {
|
|
427
|
+
const s = t.length, o = [], a = (r, c) => {
|
|
428
428
|
const l = c.x - r.x, d = c.y - r.y, u = Math.hypot(l, d) || 1;
|
|
429
429
|
return Math.atan2(-l / u, d / u);
|
|
430
430
|
};
|
|
431
431
|
for (let r = 0; r < s; r++) {
|
|
432
|
-
const c = t[(r - 1 + s) % s], l = t[r], d = t[(r + 1) % s], u =
|
|
433
|
-
let
|
|
434
|
-
for (;
|
|
435
|
-
for (;
|
|
436
|
-
for (let
|
|
437
|
-
const _ = u +
|
|
432
|
+
const c = t[(r - 1 + s) % s], l = t[r], d = t[(r + 1) % s], u = a(c, l);
|
|
433
|
+
let p = a(l, d) - u;
|
|
434
|
+
for (; p > Math.PI; ) p -= W;
|
|
435
|
+
for (; p < -Math.PI; ) p += W;
|
|
436
|
+
for (let f = 0; f <= e; f++) {
|
|
437
|
+
const _ = u + p * f / e;
|
|
438
438
|
o.push({ x: l.x + Math.cos(_) * n, y: l.y + Math.sin(_) * n });
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
return o;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
const o = s * Math.PI / 180,
|
|
445
|
-
const l = o + c / t *
|
|
443
|
+
function Se(t, n, e, s = 0) {
|
|
444
|
+
const o = s * Math.PI / 180, a = Array.from({ length: t }, (r, c) => {
|
|
445
|
+
const l = o + c / t * W;
|
|
446
446
|
return { x: Math.cos(l) * (n - e), y: Math.sin(l) * (n - e) };
|
|
447
447
|
});
|
|
448
|
-
return
|
|
448
|
+
return Gt(ls(a, e), 0, 0);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function ds(t, n = 1) {
|
|
451
451
|
if (t.length < 3) return "";
|
|
452
452
|
let e = "";
|
|
453
453
|
for (let s = 0; s < t.length; s++) {
|
|
454
454
|
const o = t[s];
|
|
455
|
-
e += `${s === 0 ? "M" : "L"}${
|
|
455
|
+
e += `${s === 0 ? "M" : "L"}${w(o.x * n)} ${w(o.y * n)}`;
|
|
456
456
|
}
|
|
457
457
|
return `${e}Z`;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function us(t, n) {
|
|
460
460
|
const e = Math.max(t, 0.01) / 2, s = Math.max(n, 0.01) / 2, o = Math.min(e, s);
|
|
461
|
-
return `M${
|
|
461
|
+
return `M${w(-e)} ${w(-s + o)}A${w(o)} ${w(o)} 0 0 1 ${w(-e + o)} ${w(-s)}L${w(e - o)} ${w(-s)}A${w(o)} ${w(o)} 0 0 1 ${w(e)} ${w(-s + o)}L${w(e)} ${w(s - o)}A${w(o)} ${w(o)} 0 0 1 ${w(e - o)} ${w(s)}L${w(-e + o)} ${w(s)}A${w(o)} ${w(o)} 0 0 1 ${w(-e)} ${w(s - o)}Z`;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function re(t, n = 1) {
|
|
464
464
|
const e = Math.max(...t);
|
|
465
465
|
if (e <= 0) return t;
|
|
466
466
|
const s = n / e;
|
|
467
467
|
return t.map((o) => o * s);
|
|
468
468
|
}
|
|
469
|
-
const
|
|
470
|
-
{ length:
|
|
471
|
-
(t, n) => n /
|
|
472
|
-
),
|
|
473
|
-
|
|
469
|
+
const hs = Array.from(
|
|
470
|
+
{ length: ct },
|
|
471
|
+
(t, n) => n / ct * Math.PI * 2
|
|
472
|
+
), fs = re(
|
|
473
|
+
hs.map((t) => 1 + 0.075 * Math.cos(2 * t + 0.5) + 0.035 * Math.cos(3 * t + 2.1)),
|
|
474
474
|
1.02
|
|
475
|
-
),
|
|
476
|
-
|
|
475
|
+
), ps = re(
|
|
476
|
+
cs([
|
|
477
477
|
{ x: -0.44, y: 0.2, r: 0.54 },
|
|
478
478
|
{ x: 0.46, y: 0.2, r: 0.5 },
|
|
479
479
|
{ x: 0.02, y: 0.3, r: 0.6 },
|
|
@@ -481,23 +481,23 @@ const os = Array.from(
|
|
|
481
481
|
{ x: 0.3, y: -0.24, r: 0.44 }
|
|
482
482
|
]),
|
|
483
483
|
1.02
|
|
484
|
-
),
|
|
485
|
-
|
|
484
|
+
), _s = re(
|
|
485
|
+
Gt(Wt(0, 0.28, 0.66, 0, -0.96, 0.05), 0, 0),
|
|
486
486
|
1.04
|
|
487
|
-
),
|
|
488
|
-
{ id: "circle", radii: new Array(
|
|
489
|
-
{ id: "pebble", radii:
|
|
487
|
+
), ms = Gt(Wt(-0.42, 0, 0.62, 0.42, 0, 0.62), 0, 0), cn = [
|
|
488
|
+
{ id: "circle", radii: new Array(ct).fill(1) },
|
|
489
|
+
{ id: "pebble", radii: fs },
|
|
490
490
|
// 1.15 and not 1.02: on a superellipse the peak radius is the diagonal, so
|
|
491
491
|
// normalising on it yields a shape that looks smaller than the circle.
|
|
492
|
-
{ id: "squircle", radii:
|
|
493
|
-
{ id: "capsule", radii:
|
|
492
|
+
{ id: "squircle", radii: re(as(4.2), 1.15) },
|
|
493
|
+
{ id: "capsule", radii: ms },
|
|
494
494
|
// -90deg: one vertex towards the top of the screen (y points down)
|
|
495
|
-
{ id: "triangle", radii:
|
|
495
|
+
{ id: "triangle", radii: Se(3, 1.12, 0.34, -90) },
|
|
496
496
|
// 0deg: vertices left and right, so the top and bottom edges come out flat
|
|
497
|
-
{ id: "hexagon", radii:
|
|
498
|
-
{ id: "cloud", radii:
|
|
499
|
-
{ id: "droplet", radii:
|
|
500
|
-
],
|
|
497
|
+
{ id: "hexagon", radii: Se(6, 1.04, 0.26, 0) },
|
|
498
|
+
{ id: "cloud", radii: ps },
|
|
499
|
+
{ id: "droplet", radii: _s }
|
|
500
|
+
], ys = new Map(cn.map((t) => [t.id, t])), gs = "circle", xs = [
|
|
501
501
|
{ id: "ink", hex: "var(--novi-color-ink)" },
|
|
502
502
|
{ id: "brown", hex: "var(--novi-color-brown)" },
|
|
503
503
|
{ id: "red", hex: "var(--novi-color-red)" },
|
|
@@ -510,26 +510,26 @@ const os = Array.from(
|
|
|
510
510
|
{ id: "pink", hex: "var(--novi-color-pink)" },
|
|
511
511
|
{ id: "gray", hex: "var(--novi-color-gray)" },
|
|
512
512
|
{ id: "cream", hex: "var(--novi-color-cream)" }
|
|
513
|
-
],
|
|
514
|
-
function
|
|
513
|
+
], bs = new Map(xs.map((t) => [t.id, t])), vs = "ink";
|
|
514
|
+
function ks(t, n, e) {
|
|
515
515
|
const s = (c) => {
|
|
516
516
|
const l = parseInt(c.slice(1), 16);
|
|
517
517
|
return [l >> 16 & 255, l >> 8 & 255, l & 255];
|
|
518
|
-
}, o = s(t),
|
|
519
|
-
return `#${o.map((c, l) => Math.round(c + (
|
|
518
|
+
}, o = s(t), a = s(n);
|
|
519
|
+
return `#${o.map((c, l) => Math.round(c + (a[l] - c) * e)).map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
520
520
|
}
|
|
521
|
-
const
|
|
521
|
+
const Tt = (t, n) => [
|
|
522
522
|
{ w: t, h: n, open: 1 },
|
|
523
523
|
{ w: t, h: n, open: 1 }
|
|
524
524
|
];
|
|
525
|
-
function
|
|
525
|
+
function st(t = {}) {
|
|
526
526
|
return {
|
|
527
|
-
sil:
|
|
527
|
+
sil: Ct(1),
|
|
528
528
|
offX: 0,
|
|
529
529
|
offY: 0,
|
|
530
|
-
gaze: { ...
|
|
531
|
-
split:
|
|
532
|
-
eyes:
|
|
530
|
+
gaze: { ...sn },
|
|
531
|
+
split: $e,
|
|
532
|
+
eyes: Tt(_e, me),
|
|
533
533
|
eyeAlpha: 1,
|
|
534
534
|
bodyAlpha: 1,
|
|
535
535
|
dots: [],
|
|
@@ -539,39 +539,39 @@ function W(t = {}) {
|
|
|
539
539
|
...t
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
const
|
|
543
|
-
|
|
542
|
+
const ln = -0.1875, Ns = Gt(
|
|
543
|
+
Wt(0, -0.505, 0.132, 0, 0.13, 0.075),
|
|
544
544
|
0,
|
|
545
|
-
|
|
546
|
-
),
|
|
547
|
-
radii: [...
|
|
545
|
+
ln
|
|
546
|
+
), $s = Gt(Wt(0, -0.2535, 0.1345, 0, 0.2535, 0.1345), 0, 0), As = (t = {}) => ({
|
|
547
|
+
radii: [...Ns],
|
|
548
548
|
rot: 0,
|
|
549
549
|
cx: 0,
|
|
550
|
-
cy:
|
|
550
|
+
cy: ln,
|
|
551
551
|
sx: 1,
|
|
552
552
|
sy: 1,
|
|
553
553
|
...t
|
|
554
|
-
}),
|
|
555
|
-
radii: [
|
|
554
|
+
}), ws = (t = {}) => ({
|
|
555
|
+
radii: [...$s],
|
|
556
556
|
rot: 0,
|
|
557
557
|
cx: 0,
|
|
558
558
|
cy: 0,
|
|
559
559
|
sx: 1,
|
|
560
560
|
sy: 1,
|
|
561
561
|
...t
|
|
562
|
-
}),
|
|
563
|
-
function
|
|
564
|
-
return
|
|
562
|
+
}), Ms = ds(Wt(0, 0, 0.118, 0, 0.172, 0.012)), je = 0.213;
|
|
563
|
+
function qe(t) {
|
|
564
|
+
return ye("triangle", {
|
|
565
565
|
rot: t,
|
|
566
|
-
cx: -
|
|
567
|
-
cy:
|
|
566
|
+
cx: -je * Math.sin(t),
|
|
567
|
+
cy: je * Math.cos(t)
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
const e = ((t - n * 0.5) / 1.5 % 1 + 1) % 1, s = e < 0.5 ? 0.5 - 0.5 * Math.cos(e *
|
|
572
|
-
return
|
|
570
|
+
function Le(t, n) {
|
|
571
|
+
const e = ((t - n * 0.5) / 1.5 % 1 + 1) % 1, s = e < 0.5 ? 0.5 - 0.5 * Math.cos(e * W) : 0;
|
|
572
|
+
return z(s * 2);
|
|
573
573
|
}
|
|
574
|
-
const
|
|
574
|
+
const dn = [
|
|
575
575
|
{
|
|
576
576
|
id: "idle",
|
|
577
577
|
duration: 2.4,
|
|
@@ -579,7 +579,7 @@ const Ze = [
|
|
|
579
579
|
blinkIn: !1,
|
|
580
580
|
baseFace: !0,
|
|
581
581
|
baseBody: !0,
|
|
582
|
-
pose: () =>
|
|
582
|
+
pose: () => st()
|
|
583
583
|
},
|
|
584
584
|
{
|
|
585
585
|
id: "thinking",
|
|
@@ -589,17 +589,17 @@ const Ze = [
|
|
|
589
589
|
baseBody: !1,
|
|
590
590
|
blinkIn: !0,
|
|
591
591
|
pose: (t) => {
|
|
592
|
-
const n =
|
|
593
|
-
return
|
|
592
|
+
const n = Le(t, 1), e = 0.3 + 0.7 * J.easeOutCubic(z(t / 0.3));
|
|
593
|
+
return st({
|
|
594
594
|
// the ball BECOMES the middle dot: the morph stays continuous
|
|
595
|
-
sil:
|
|
595
|
+
sil: Ct(Ie * (1 + (Te - 1) * n), { cx: ze[1] }),
|
|
596
596
|
eyeAlpha: 0,
|
|
597
597
|
dots: [0, 2].map((s) => {
|
|
598
|
-
const o =
|
|
598
|
+
const o = Le(t, s);
|
|
599
599
|
return {
|
|
600
|
-
x:
|
|
600
|
+
x: ze[s] * e,
|
|
601
601
|
y: 0,
|
|
602
|
-
r:
|
|
602
|
+
r: Ie * (1 + (Te - 1) * o),
|
|
603
603
|
opacity: 0.55 + 0.45 * o
|
|
604
604
|
};
|
|
605
605
|
})
|
|
@@ -613,7 +613,7 @@ const Ze = [
|
|
|
613
613
|
blinkIn: !0,
|
|
614
614
|
baseFace: !1,
|
|
615
615
|
baseBody: !0,
|
|
616
|
-
pose: () =>
|
|
616
|
+
pose: () => st({
|
|
617
617
|
gaze: { yaw: -5.37, pitch: 4.55, roll: 6.7 },
|
|
618
618
|
split: 16.25,
|
|
619
619
|
// The closed eye is not the open eye squashed: it is a horizontal dash
|
|
@@ -631,10 +631,10 @@ const Ze = [
|
|
|
631
631
|
blinkIn: !0,
|
|
632
632
|
baseFace: !1,
|
|
633
633
|
baseBody: !0,
|
|
634
|
-
pose: () =>
|
|
634
|
+
pose: () => st({
|
|
635
635
|
gaze: { yaw: 6.92, pitch: -21.96, roll: 11.6 },
|
|
636
636
|
split: 18.43,
|
|
637
|
-
eyes:
|
|
637
|
+
eyes: Tt(0.356, 0.875)
|
|
638
638
|
})
|
|
639
639
|
},
|
|
640
640
|
{
|
|
@@ -647,17 +647,17 @@ const Ze = [
|
|
|
647
647
|
baseBody: !1,
|
|
648
648
|
blinkIn: !1,
|
|
649
649
|
pose: (t) => {
|
|
650
|
-
const n =
|
|
651
|
-
return
|
|
652
|
-
sil:
|
|
650
|
+
const n = z(t / 1.5), e = J.easeInOutCubic(n) * 0.82 - 0.087, s = t > 1.6 ? z((t - 1.6) / 0.4) : 0, o = e * (1 - s) + 0.1 * s, a = Math.sin(t * 2.5 * W) * 5e-3, r = 17.7 * Math.PI / 180;
|
|
651
|
+
return st({
|
|
652
|
+
sil: ws({ rot: r, cx: o, cy: -0.325 - a }),
|
|
653
653
|
eyeAlpha: 0,
|
|
654
654
|
dots: [
|
|
655
655
|
{
|
|
656
656
|
// the dot follows the glyph's axis, 0.580 from the bar's centre
|
|
657
657
|
x: o - Math.sin(r) * 0.58,
|
|
658
|
-
y: -0.325 + Math.cos(r) * 0.58 +
|
|
658
|
+
y: -0.325 + Math.cos(r) * 0.58 + a * 2.8,
|
|
659
659
|
r: 0.118,
|
|
660
|
-
d:
|
|
660
|
+
d: Ms,
|
|
661
661
|
rot: r * 180 / Math.PI,
|
|
662
662
|
opacity: 1
|
|
663
663
|
}
|
|
@@ -673,17 +673,17 @@ const Ze = [
|
|
|
673
673
|
baseFace: !1,
|
|
674
674
|
baseBody: !0,
|
|
675
675
|
pose: (t) => {
|
|
676
|
-
const n =
|
|
677
|
-
return
|
|
676
|
+
const n = z(t / 0.45), e = 1 + (Qn - 1) * Math.sin(n * Math.PI) * (1 - n * 0.35), s = Wn * (n < 1 ? e : 1), o = Gn * Math.PI / 180;
|
|
677
|
+
return st({
|
|
678
678
|
// the gaze goes to the opposite side from the pip
|
|
679
679
|
gaze: { yaw: -21.94, pitch: -5.82, roll: -12.2 },
|
|
680
680
|
split: 18.89,
|
|
681
|
-
eyes:
|
|
681
|
+
eyes: Tt(0.505, 0.498),
|
|
682
682
|
notif: {
|
|
683
|
-
x: Math.cos(o) *
|
|
684
|
-
y: Math.sin(o) *
|
|
683
|
+
x: Math.cos(o) * Ee,
|
|
684
|
+
y: Math.sin(o) * Ee,
|
|
685
685
|
r: s,
|
|
686
|
-
notch: s +
|
|
686
|
+
notch: s + Vn
|
|
687
687
|
}
|
|
688
688
|
});
|
|
689
689
|
}
|
|
@@ -695,8 +695,8 @@ const Ze = [
|
|
|
695
695
|
baseFace: !1,
|
|
696
696
|
baseBody: !1,
|
|
697
697
|
blinkIn: !1,
|
|
698
|
-
pose: () =>
|
|
699
|
-
sil:
|
|
698
|
+
pose: () => st({
|
|
699
|
+
sil: As(),
|
|
700
700
|
eyeAlpha: 0,
|
|
701
701
|
dots: [{ x: -0.012, y: 0.526, r: 0.113, opacity: 1 }]
|
|
702
702
|
})
|
|
@@ -708,9 +708,9 @@ const Ze = [
|
|
|
708
708
|
baseFace: !1,
|
|
709
709
|
baseBody: !1,
|
|
710
710
|
blinkIn: !1,
|
|
711
|
-
pose: (t) =>
|
|
711
|
+
pose: (t) => st({
|
|
712
712
|
// Measured vertical bounce: +-0.19 about +0.11, period 0.6 s.
|
|
713
|
-
sil:
|
|
713
|
+
sil: Ct(0.1585, { cy: 0.11 + Math.sin(t * (W / 0.6)) * 0.19 }),
|
|
714
714
|
eyeAlpha: 0
|
|
715
715
|
})
|
|
716
716
|
},
|
|
@@ -721,12 +721,12 @@ const Ze = [
|
|
|
721
721
|
baseFace: !1,
|
|
722
722
|
baseBody: !1,
|
|
723
723
|
blinkIn: !0,
|
|
724
|
-
pose: () =>
|
|
725
|
-
sil:
|
|
724
|
+
pose: () => st({
|
|
725
|
+
sil: ye("egg"),
|
|
726
726
|
gaze: { yaw: 19.97, pitch: 26.01, roll: -17.1 },
|
|
727
727
|
// the eyes narrow along with the body
|
|
728
728
|
split: 11.07,
|
|
729
|
-
eyes:
|
|
729
|
+
eyes: Tt(0.164, 0.385)
|
|
730
730
|
})
|
|
731
731
|
},
|
|
732
732
|
{
|
|
@@ -736,11 +736,11 @@ const Ze = [
|
|
|
736
736
|
baseFace: !1,
|
|
737
737
|
baseBody: !1,
|
|
738
738
|
blinkIn: !0,
|
|
739
|
-
pose: () =>
|
|
740
|
-
sil:
|
|
739
|
+
pose: () => st({
|
|
740
|
+
sil: ye("hexagon"),
|
|
741
741
|
gaze: { yaw: 23.11, pitch: 24.42, roll: -13.3 },
|
|
742
742
|
split: 13.37,
|
|
743
|
-
eyes:
|
|
743
|
+
eyes: Tt(0.177, 0.411)
|
|
744
744
|
})
|
|
745
745
|
},
|
|
746
746
|
{
|
|
@@ -751,14 +751,14 @@ const Ze = [
|
|
|
751
751
|
baseBody: !1,
|
|
752
752
|
blinkIn: !0,
|
|
753
753
|
pose: (t) => {
|
|
754
|
-
const n =
|
|
755
|
-
return
|
|
756
|
-
sil:
|
|
754
|
+
const n = z(t / 0.35) * z((2.2 - t) / 0.5);
|
|
755
|
+
return st({
|
|
756
|
+
sil: qe(0),
|
|
757
757
|
gaze: { yaw: 12, pitch: -8, roll: -6 },
|
|
758
758
|
split: 15,
|
|
759
|
-
eyes:
|
|
759
|
+
eyes: Tt(0.18, 0.34),
|
|
760
760
|
// the bundle sweeps right to left over the triangle
|
|
761
|
-
arcs:
|
|
761
|
+
arcs: Hn.map((e, s) => ({
|
|
762
762
|
id: `sw${s}`,
|
|
763
763
|
seed: { ...e, cx: 0.45 - t * 0.42 },
|
|
764
764
|
t,
|
|
@@ -777,29 +777,29 @@ const Ze = [
|
|
|
777
777
|
baseBody: !1,
|
|
778
778
|
blinkIn: !1,
|
|
779
779
|
pose: (t) => {
|
|
780
|
-
const n =
|
|
781
|
-
radii: o.radii.map((l, d) => l + (
|
|
780
|
+
const n = J.easeInOutCubic(z(t / 0.35)), e = -W * 1.25 * t * n, s = J.easeInOutCubic(z((t - 1.6) / 0.9)), o = qe(e), a = Ct(1, { rot: e }), r = {
|
|
781
|
+
radii: o.radii.map((l, d) => l + (a.radii[d] - l) * s),
|
|
782
782
|
rot: e,
|
|
783
783
|
cx: o.cx * (1 - s),
|
|
784
784
|
cy: o.cy * (1 - s),
|
|
785
785
|
sx: 1,
|
|
786
786
|
sy: 1
|
|
787
|
-
}, c =
|
|
788
|
-
return
|
|
787
|
+
}, c = z(t / 0.8) * z((3.6 - t) / 0.9);
|
|
788
|
+
return st({
|
|
789
789
|
sil: r,
|
|
790
790
|
// the eyes race around the sphere ~3x faster than the silhouette
|
|
791
791
|
gaze: {
|
|
792
|
-
yaw:
|
|
792
|
+
yaw: sn.yaw + Math.sin(t * 6.5) * 65 * (1 - s),
|
|
793
793
|
pitch: -4 + s * 32,
|
|
794
794
|
roll: -13
|
|
795
795
|
},
|
|
796
|
-
eyes:
|
|
796
|
+
eyes: Tt(0.18, 0.34 + s * 0.07),
|
|
797
797
|
// the rings come in one by one over 0.8 s
|
|
798
|
-
arcs:
|
|
798
|
+
arcs: Me.map((l, d) => ({
|
|
799
799
|
id: `rg${d}`,
|
|
800
800
|
seed: l,
|
|
801
801
|
t,
|
|
802
|
-
opacity: c *
|
|
802
|
+
opacity: c * z((t - d * 0.13) / 0.3)
|
|
803
803
|
}))
|
|
804
804
|
});
|
|
805
805
|
}
|
|
@@ -833,16 +833,16 @@ const Ze = [
|
|
|
833
833
|
baseBody: !0,
|
|
834
834
|
// the shape morph is hidden behind a blink, as everywhere else
|
|
835
835
|
blinkIn: !0,
|
|
836
|
-
pose: (t) =>
|
|
836
|
+
pose: (t) => st({
|
|
837
837
|
// three of `orbit`'s six rings: half the bundle is enough to recognise it,
|
|
838
838
|
// and that is as many arcs fewer to rasterise per frame
|
|
839
|
-
arcs:
|
|
839
|
+
arcs: Me.slice(0, 3).map((n, e) => ({
|
|
840
840
|
id: `sw${e}`,
|
|
841
841
|
seed: n,
|
|
842
842
|
t,
|
|
843
843
|
// they come in one after another then fade before the block ends, so the
|
|
844
844
|
// return to rest happens on an already clean frame
|
|
845
|
-
opacity:
|
|
845
|
+
opacity: z((t - e * 0.06) / 0.14) * z((1.22 - t) / 0.34)
|
|
846
846
|
}))
|
|
847
847
|
})
|
|
848
848
|
},
|
|
@@ -856,11 +856,11 @@ const Ze = [
|
|
|
856
856
|
baseBody: !1,
|
|
857
857
|
blinkIn: !1,
|
|
858
858
|
pose: (t) => {
|
|
859
|
-
const n = 1 - 0.834 *
|
|
860
|
-
return
|
|
861
|
-
sil:
|
|
862
|
-
eyeAlpha:
|
|
863
|
-
dots:
|
|
859
|
+
const n = 1 - 0.834 * J.easeOutQuint(z(t / 0.7)), e = J.easeOutQuint(z((t - 1.7) / 0.7));
|
|
860
|
+
return st({
|
|
861
|
+
sil: Ct(n + (1 - n) * e),
|
|
862
|
+
eyeAlpha: z((t - 1.85) / 0.4),
|
|
863
|
+
dots: Dn(t, 1),
|
|
864
864
|
dotsBehind: !0
|
|
865
865
|
});
|
|
866
866
|
}
|
|
@@ -877,18 +877,18 @@ const Ze = [
|
|
|
877
877
|
baseBody: !1,
|
|
878
878
|
blinkIn: !1,
|
|
879
879
|
pose: (t) => {
|
|
880
|
-
const n = 1 - (1 -
|
|
881
|
-
return
|
|
880
|
+
const n = 1 - (1 - Un) * J.easeOutQuint(z(t / 0.55)), e = J.easeOutQuint(z((t - 1.85) / 0.6)), s = z((t - 0.15) / 0.25) * z((1.95 - t) / 0.3);
|
|
881
|
+
return st({
|
|
882
882
|
// The dot drifts 0.035 downwards then comes back (measured wobble).
|
|
883
|
-
sil:
|
|
884
|
-
cy: Math.sin(
|
|
883
|
+
sil: Ct(n + (1 - n) * e, {
|
|
884
|
+
cy: Math.sin(z(t / 1.7) * Math.PI) * 0.035
|
|
885
885
|
}),
|
|
886
|
-
eyeAlpha:
|
|
887
|
-
arcs:
|
|
886
|
+
eyeAlpha: z((t - 2) / 0.35),
|
|
887
|
+
arcs: Yn.map((o, a) => ({ id: `cm${a}`, seed: o, t, opacity: s }))
|
|
888
888
|
});
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
],
|
|
891
|
+
], Ot = new Map(dn.map((t) => [t.id, t])), zs = {
|
|
892
892
|
idle: 1,
|
|
893
893
|
thinking: 1.1,
|
|
894
894
|
wink: 0.8,
|
|
@@ -904,7 +904,7 @@ const Ze = [
|
|
|
904
904
|
swirl: 0.5,
|
|
905
905
|
burst: 0.45,
|
|
906
906
|
comet: 1.15
|
|
907
|
-
},
|
|
907
|
+
}, ha = [
|
|
908
908
|
"idle",
|
|
909
909
|
"thinking",
|
|
910
910
|
"wink",
|
|
@@ -919,163 +919,163 @@ const Ze = [
|
|
|
919
919
|
"orbit",
|
|
920
920
|
"burst",
|
|
921
921
|
"comet"
|
|
922
|
-
],
|
|
923
|
-
function
|
|
924
|
-
const s = [], o =
|
|
925
|
-
for (let
|
|
926
|
-
const r = o[
|
|
922
|
+
], vt = 100, He = 5.5 + 1.6, Fe = 4.2 + 1.3, Is = 6e-3, Ts = 7e-3;
|
|
923
|
+
function De(t, n, e) {
|
|
924
|
+
const s = [], o = on(t.gaze, vt, t.split);
|
|
925
|
+
for (let a = 0; a < 2; a++) {
|
|
926
|
+
const r = o[a];
|
|
927
927
|
if (r.depth <= 0.02) continue;
|
|
928
|
-
const c = t.eyes[
|
|
928
|
+
const c = t.eyes[a], l = (c.tilt ?? 0) * Math.PI / 180, d = Math.cos(l), u = Math.sin(l), h = r.a * d + r.c * u, p = r.b * d + r.d * u, f = -r.a * u + r.c * d, _ = -r.b * u + r.d * d, v = Math.max(c.w * vt, 0.01) / 2, N = Math.max(c.h * vt, 0.01) / 2, m = Math.min(v, N), M = N > v, k = M ? N - m : v - m, y = an(e, Math.atan2(r.y, r.x) - n.rot);
|
|
929
929
|
s.push({
|
|
930
930
|
x: r.x * y,
|
|
931
931
|
y: r.y * y,
|
|
932
|
-
ax: (
|
|
933
|
-
ay: (
|
|
932
|
+
ax: (M ? f : h) * k,
|
|
933
|
+
ay: (M ? _ : p) * k,
|
|
934
934
|
r: m,
|
|
935
|
-
m: [h,
|
|
935
|
+
m: [h, p, f, _]
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
return s;
|
|
939
939
|
}
|
|
940
|
-
function
|
|
941
|
-
const
|
|
940
|
+
function Bs(t, n, e, s, o) {
|
|
941
|
+
const a = s - n, r = o - e, c = a * a + r * r;
|
|
942
942
|
let l = 1 / 0, d = 0, u = 0;
|
|
943
|
-
for (let
|
|
944
|
-
const
|
|
945
|
-
let _ = c > 0 ? ((
|
|
943
|
+
for (let p = 0; p < t.length; p++) {
|
|
944
|
+
const f = t[p];
|
|
945
|
+
let _ = c > 0 ? ((f.x - n) * a + (f.y - e) * r) / c : 0;
|
|
946
946
|
_ = _ < 0 ? 0 : _ > 1 ? 1 : _;
|
|
947
|
-
const
|
|
948
|
-
m < l && (l = m, d =
|
|
947
|
+
const v = n + _ * a - f.x, N = e + _ * r - f.y, m = v * v + N * N;
|
|
948
|
+
m < l && (l = m, d = v, u = N);
|
|
949
949
|
}
|
|
950
950
|
const h = Math.sqrt(l);
|
|
951
951
|
return { d: h, ux: h > 1e-9 ? d / h : 0, uy: h > 1e-9 ? u / h : 0 };
|
|
952
952
|
}
|
|
953
|
-
const
|
|
954
|
-
function
|
|
955
|
-
let o = 1 / 0,
|
|
953
|
+
const Rs = Math.hypot(Is, Ts) * vt;
|
|
954
|
+
function Ye(t, n, e, s) {
|
|
955
|
+
let o = 1 / 0, a = 0, r = 0;
|
|
956
956
|
for (const c of n) {
|
|
957
|
-
const l = c.x + e, d = c.y + s, u =
|
|
958
|
-
u.d -
|
|
957
|
+
const l = c.x + e, d = c.y + s, u = Bs(t, l - c.ax, d - c.ay, l + c.ax, d + c.ay), [h, p, f, _] = c.m, v = c.r * Math.hypot(h * u.ux + p * u.uy, f * u.ux + _ * u.uy) + Rs;
|
|
958
|
+
u.d - v < o && (o = u.d - v, a = u.ux, r = u.uy);
|
|
959
959
|
}
|
|
960
|
-
return { margin: o, ux:
|
|
960
|
+
return { margin: o, ux: a, uy: r };
|
|
961
961
|
}
|
|
962
|
-
const
|
|
963
|
-
function
|
|
962
|
+
const Ue = 12, Es = 8;
|
|
963
|
+
function Cs(t) {
|
|
964
964
|
if (!t.length) return { x: 0, y: 0 };
|
|
965
|
-
const n = (m,
|
|
966
|
-
let
|
|
967
|
-
for (const y of t)
|
|
968
|
-
return
|
|
965
|
+
const n = (m, M) => {
|
|
966
|
+
let k = 1 / 0;
|
|
967
|
+
for (const y of t) k = Math.min(k, Ye(y.outline, y.footprints, m, M).margin);
|
|
968
|
+
return k;
|
|
969
969
|
};
|
|
970
970
|
let e = 1 / 0;
|
|
971
971
|
for (const m of t)
|
|
972
|
-
e = Math.min(e,
|
|
972
|
+
e = Math.min(e, Ye(m.refOutline, m.reference, 0, 0).margin);
|
|
973
973
|
let s = 0, o = 0;
|
|
974
|
-
const
|
|
975
|
-
for (const m of
|
|
976
|
-
s -= m.x /
|
|
977
|
-
const r = Math.max(0.35 *
|
|
974
|
+
const a = t[0].footprints;
|
|
975
|
+
for (const m of a)
|
|
976
|
+
s -= m.x / a.length, o -= m.y / a.length;
|
|
977
|
+
const r = Math.max(0.35 * vt, Math.hypot(s, o) * 1.25);
|
|
978
978
|
e = Math.min(e, n(s, o));
|
|
979
979
|
const c = n(0, 0);
|
|
980
980
|
if (c >= e && c >= 0) return { x: 0, y: 0 };
|
|
981
981
|
const l = Math.max(e, 0);
|
|
982
|
-
let d = 0, u = 0, h = 1 / 0,
|
|
983
|
-
for (let m = 0; m <
|
|
984
|
-
const
|
|
985
|
-
if (n(
|
|
986
|
-
for (const
|
|
987
|
-
const
|
|
988
|
-
|
|
982
|
+
let d = 0, u = 0, h = 1 / 0, p = 0, f = 0, _ = c;
|
|
983
|
+
for (let m = 0; m < Ue; m++) {
|
|
984
|
+
const M = m / Ue * Math.PI * 2, k = Math.cos(M), y = Math.sin(M);
|
|
985
|
+
if (n(k * r, y * r) < l) {
|
|
986
|
+
for (const $ of [0.3, 0.6, 1]) {
|
|
987
|
+
const P = n(k * r * $, y * r * $);
|
|
988
|
+
P > _ && (_ = P, p = k * r * $, f = y * r * $);
|
|
989
989
|
}
|
|
990
990
|
continue;
|
|
991
991
|
}
|
|
992
|
-
let b = 0,
|
|
993
|
-
for (let
|
|
994
|
-
const
|
|
995
|
-
n(
|
|
992
|
+
let b = 0, C = r;
|
|
993
|
+
for (let $ = 0; $ < Es; $++) {
|
|
994
|
+
const P = (b + C) / 2;
|
|
995
|
+
n(k * P, y * P) >= l ? C = P : b = P;
|
|
996
996
|
}
|
|
997
|
-
|
|
997
|
+
C < h && (h = C, d = k * C, u = y * C);
|
|
998
998
|
}
|
|
999
|
-
const
|
|
1000
|
-
return { x: +(
|
|
999
|
+
const v = h === 1 / 0 ? p : d, N = h === 1 / 0 ? f : u;
|
|
1000
|
+
return { x: +(v / vt).toFixed(6), y: +(N / vt).toFixed(6) };
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Os(t, n, e) {
|
|
1003
1003
|
return t.baseFace && e ? { gaze: e.gaze, split: e.split, eyes: e.eyes } : { gaze: n.gaze, split: n.split, eyes: n.eyes };
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Ps(t) {
|
|
1006
1006
|
const n = (s) => JSON.stringify([s.gaze, s.split, s.eyes, s.sil.rot, s.sil.cx, s.sil.cy, s.sil.sx, s.sil.sy]);
|
|
1007
1007
|
if (n(t.pose(0)) === n(t.pose(t.duration))) return [0];
|
|
1008
1008
|
const e = 3;
|
|
1009
1009
|
return Array.from({ length: e }, (s, o) => o / (e - 1) * t.duration);
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function Ss(t, n, e) {
|
|
1012
1012
|
const s = [];
|
|
1013
|
-
for (const o of
|
|
1014
|
-
const
|
|
1015
|
-
for (const u of [-
|
|
1016
|
-
for (const h of [-
|
|
1013
|
+
for (const o of Ps(t)) {
|
|
1014
|
+
const a = t.pose(o), r = ge({ ...a.sil, radii: n }, vt), c = ge(a.sil, vt), l = Os(t, a, e), d = [];
|
|
1015
|
+
for (const u of [-He, He])
|
|
1016
|
+
for (const h of [-Fe, Fe])
|
|
1017
1017
|
d.push({
|
|
1018
1018
|
...l,
|
|
1019
1019
|
gaze: { yaw: l.gaze.yaw + u, pitch: l.gaze.pitch + h, roll: l.gaze.roll }
|
|
1020
1020
|
});
|
|
1021
1021
|
for (const u of d)
|
|
1022
1022
|
s.push({
|
|
1023
|
-
footprints:
|
|
1024
|
-
reference:
|
|
1023
|
+
footprints: De(u, a.sil, n),
|
|
1024
|
+
reference: De(u, a.sil, a.sil.radii),
|
|
1025
1025
|
outline: r,
|
|
1026
1026
|
refOutline: c
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
|
-
return
|
|
1029
|
+
return Cs(s);
|
|
1030
1030
|
}
|
|
1031
|
-
const
|
|
1032
|
-
function
|
|
1031
|
+
const ce = { x: 0, y: 0 }, xe = (t, n) => `${t}|${n ?? ""}`;
|
|
1032
|
+
function js() {
|
|
1033
1033
|
return new Map(
|
|
1034
|
-
|
|
1034
|
+
cn.map((t) => {
|
|
1035
1035
|
const n = /* @__PURE__ */ new Map();
|
|
1036
|
-
for (const e of
|
|
1036
|
+
for (const e of dn) {
|
|
1037
1037
|
if (!e.baseBody) continue;
|
|
1038
|
-
const s = e.baseFace ? [null, ...
|
|
1038
|
+
const s = e.baseFace ? [null, ...rn] : [null];
|
|
1039
1039
|
for (const o of s)
|
|
1040
|
-
n.set(
|
|
1040
|
+
n.set(xe(e.id, (o == null ? void 0 : o.id) ?? null), Ss(e, t.radii, o));
|
|
1041
1041
|
}
|
|
1042
1042
|
return [t.radii, n];
|
|
1043
1043
|
})
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
|
-
const
|
|
1047
|
-
function
|
|
1048
|
-
if (!t) return
|
|
1049
|
-
const s =
|
|
1050
|
-
return s ? s.get(
|
|
1051
|
-
}
|
|
1052
|
-
const
|
|
1053
|
-
yaw:
|
|
1054
|
-
pitch:
|
|
1055
|
-
mix:
|
|
1056
|
-
spin:
|
|
1057
|
-
wander:
|
|
1058
|
-
}),
|
|
1059
|
-
w:
|
|
1060
|
-
h:
|
|
1061
|
-
open:
|
|
1062
|
-
tilt:
|
|
1046
|
+
const qs = js();
|
|
1047
|
+
function Xe(t, n, e) {
|
|
1048
|
+
if (!t) return ce;
|
|
1049
|
+
const s = qs.get(t);
|
|
1050
|
+
return s ? s.get(xe(n, e)) ?? s.get(xe(n, null)) ?? ce : ce;
|
|
1051
|
+
}
|
|
1052
|
+
const le = { yaw: 0, pitch: 0, mix: 0, spin: 0, wander: 1 }, Ls = (t, n, e) => ({
|
|
1053
|
+
yaw: T(t.yaw, n.yaw, e),
|
|
1054
|
+
pitch: T(t.pitch, n.pitch, e),
|
|
1055
|
+
mix: T(t.mix, n.mix, e),
|
|
1056
|
+
spin: T(t.spin, n.spin, e),
|
|
1057
|
+
wander: T(t.wander, n.wander, e)
|
|
1058
|
+
}), Ge = (t, n, e) => ({
|
|
1059
|
+
w: T(t.w, n.w, e),
|
|
1060
|
+
h: T(t.h, n.h, e),
|
|
1061
|
+
open: T(t.open, n.open, e),
|
|
1062
|
+
tilt: T(t.tilt ?? 0, n.tilt ?? 0, e)
|
|
1063
1063
|
});
|
|
1064
|
-
function
|
|
1064
|
+
function We(t, n, e) {
|
|
1065
1065
|
const s = 1 - e;
|
|
1066
1066
|
return {
|
|
1067
|
-
sil:
|
|
1068
|
-
offX:
|
|
1069
|
-
offY:
|
|
1067
|
+
sil: rs(t.sil, n.sil, e),
|
|
1068
|
+
offX: T(t.offX, n.offX, e),
|
|
1069
|
+
offY: T(t.offY, n.offY, e),
|
|
1070
1070
|
gaze: {
|
|
1071
|
-
yaw:
|
|
1072
|
-
pitch:
|
|
1073
|
-
roll:
|
|
1071
|
+
yaw: T(t.gaze.yaw, n.gaze.yaw, e),
|
|
1072
|
+
pitch: T(t.gaze.pitch, n.gaze.pitch, e),
|
|
1073
|
+
roll: T(t.gaze.roll, n.gaze.roll, e)
|
|
1074
1074
|
},
|
|
1075
|
-
split:
|
|
1076
|
-
eyes: [
|
|
1077
|
-
eyeAlpha:
|
|
1078
|
-
bodyAlpha:
|
|
1075
|
+
split: T(t.split, n.split, e),
|
|
1076
|
+
eyes: [Ge(t.eyes[0], n.eyes[0], e), Ge(t.eyes[1], n.eyes[1], e)],
|
|
1077
|
+
eyeAlpha: T(t.eyeAlpha, n.eyeAlpha, e),
|
|
1078
|
+
bodyAlpha: T(t.bodyAlpha, n.bodyAlpha, e),
|
|
1079
1079
|
dots: [
|
|
1080
1080
|
...t.dots.map((o) => ({ ...o, opacity: o.opacity * s })),
|
|
1081
1081
|
...n.dots.map((o) => ({ ...o, opacity: o.opacity * e }))
|
|
@@ -1089,9 +1089,9 @@ function Se(t, n, e) {
|
|
|
1089
1089
|
dotsBehind: e < 0.5 ? t.dotsBehind : n.dotsBehind
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
|
-
const
|
|
1092
|
+
const bt = class bt {
|
|
1093
1093
|
constructor(n = 100, e = "idle", s = null, o = null) {
|
|
1094
|
-
this.prev = null, this.frozenStart = null, this.tCur = 0, this.tPrev = 0, this.blinkAt = -10, this.pts = [], this.shape = null, this.shapePrev = null, this.shapeAt = -10, this.expr = null, this.exprPrev = null, this.exprAt = -10, this.look =
|
|
1094
|
+
this.prev = null, this.frozenStart = null, this.tCur = 0, this.tPrev = 0, this.blinkAt = -10, this.pts = [], this.shape = null, this.shapePrev = null, this.shapeAt = -10, this.expr = null, this.exprPrev = null, this.exprAt = -10, this.look = le, this.lookPrev = le, this.lookAt = -10, this.lookMorph = 0.24, this.scale = n, this.cur = e, this.shape = s, this.expr = o;
|
|
1095
1095
|
}
|
|
1096
1096
|
/**
|
|
1097
1097
|
* The resting expression chosen in the customiser. Like the shape, it glides
|
|
@@ -1104,8 +1104,8 @@ const _t = class _t {
|
|
|
1104
1104
|
exprAtTime(n) {
|
|
1105
1105
|
const e = this.expr, s = this.exprPrev;
|
|
1106
1106
|
if (!e || !s) return e;
|
|
1107
|
-
const o = (n - this.exprAt) /
|
|
1108
|
-
return o >= 1 ? e :
|
|
1107
|
+
const o = (n - this.exprAt) / bt.SHAPE_MORPH;
|
|
1108
|
+
return o >= 1 ? e : ss(s, e, J.easeOutQuint(z(o)));
|
|
1109
1109
|
}
|
|
1110
1110
|
/**
|
|
1111
1111
|
* The shape chosen in the customiser. It only replaces the body on the resting
|
|
@@ -1128,10 +1128,10 @@ const _t = class _t {
|
|
|
1128
1128
|
shapeAtTime(n) {
|
|
1129
1129
|
const e = this.shape, s = this.shapePrev;
|
|
1130
1130
|
if (!e || !s) return e;
|
|
1131
|
-
const o = (n - this.shapeAt) /
|
|
1131
|
+
const o = (n - this.shapeAt) / bt.SHAPE_MORPH;
|
|
1132
1132
|
if (o >= 1) return e;
|
|
1133
|
-
const
|
|
1134
|
-
return e.map((r, c) =>
|
|
1133
|
+
const a = J.easeOutQuint(z(o));
|
|
1134
|
+
return e.map((r, c) => T(s[c] ?? r, r, a));
|
|
1135
1135
|
}
|
|
1136
1136
|
/**
|
|
1137
1137
|
* A new gaze target, `null` to fall back to the state's own.
|
|
@@ -1145,17 +1145,17 @@ const _t = class _t {
|
|
|
1145
1145
|
* setter, never through a variable read during `sample`, or the engine stops being
|
|
1146
1146
|
* a pure function of time.
|
|
1147
1147
|
*/
|
|
1148
|
-
setLook(n, e, s =
|
|
1149
|
-
n && !Number.isFinite(n.yaw + n.pitch + n.mix + n.spin + n.wander) || (this.lookPrev = this.lookAtTime(e), this.look = n ??
|
|
1148
|
+
setLook(n, e, s = bt.LOOK_MORPH) {
|
|
1149
|
+
n && !Number.isFinite(n.yaw + n.pitch + n.mix + n.spin + n.wander) || (this.lookPrev = this.lookAtTime(e), this.look = n ?? le, this.lookAt = e, this.lookMorph = s);
|
|
1150
1150
|
}
|
|
1151
1151
|
/** The effective gaze at `now`, catch-up in progress included. */
|
|
1152
1152
|
lookAtTime(n) {
|
|
1153
1153
|
const e = (n - this.lookAt) / this.lookMorph;
|
|
1154
|
-
return e >= 1 ? this.look :
|
|
1154
|
+
return e >= 1 ? this.look : Ls(this.lookPrev, this.look, J.easeOutQuint(z(e)));
|
|
1155
1155
|
}
|
|
1156
1156
|
posed(n, e, s, o) {
|
|
1157
|
-
let
|
|
1158
|
-
return n.baseBody && s && (
|
|
1157
|
+
let a = n.pose(e);
|
|
1158
|
+
return n.baseBody && s && (a = { ...a, sil: { ...a.sil, radii: s } }), n.baseFace && o && (a = { ...a, gaze: o.gaze, split: o.split, eyes: o.eyes }), a;
|
|
1159
1159
|
}
|
|
1160
1160
|
/**
|
|
1161
1161
|
* The eye offset at `now` for a given state, in ball-radius units.
|
|
@@ -1170,24 +1170,24 @@ const _t = class _t {
|
|
|
1170
1170
|
* frame, so it has no identity and exists in no table.
|
|
1171
1171
|
*/
|
|
1172
1172
|
eyeOffsetAtTime(n, e) {
|
|
1173
|
-
const s = (
|
|
1173
|
+
const s = (a, r, c, l) => {
|
|
1174
1174
|
if (c === l) return l;
|
|
1175
|
-
const d = (n -
|
|
1175
|
+
const d = (n - a) / r;
|
|
1176
1176
|
if (d >= 1) return l;
|
|
1177
|
-
const u =
|
|
1178
|
-
return { x:
|
|
1179
|
-
}, o = (
|
|
1177
|
+
const u = J.easeOutQuint(z(d));
|
|
1178
|
+
return { x: T(c.x, l.x, u), y: T(c.y, l.y, u) };
|
|
1179
|
+
}, o = (a) => {
|
|
1180
1180
|
var r, c;
|
|
1181
1181
|
return s(
|
|
1182
1182
|
this.exprAt,
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1183
|
+
bt.SHAPE_MORPH,
|
|
1184
|
+
Xe(a, e, ((r = this.exprPrev) == null ? void 0 : r.id) ?? null),
|
|
1185
|
+
Xe(a, e, ((c = this.expr) == null ? void 0 : c.id) ?? null)
|
|
1186
1186
|
);
|
|
1187
1187
|
};
|
|
1188
1188
|
return s(
|
|
1189
1189
|
this.shapeAt,
|
|
1190
|
-
|
|
1190
|
+
bt.SHAPE_MORPH,
|
|
1191
1191
|
o(this.shapePrev),
|
|
1192
1192
|
o(this.shape)
|
|
1193
1193
|
);
|
|
@@ -1219,7 +1219,7 @@ const _t = class _t {
|
|
|
1219
1219
|
fadeOrigin(n, e, s) {
|
|
1220
1220
|
if (this.frozenStart) return this.frozenStart;
|
|
1221
1221
|
if (!this.prev) return null;
|
|
1222
|
-
const o =
|
|
1222
|
+
const o = Ot.get(this.prev);
|
|
1223
1223
|
return this.posed(o, Math.max(0, n - this.tPrev), e, s);
|
|
1224
1224
|
}
|
|
1225
1225
|
/**
|
|
@@ -1228,10 +1228,10 @@ const _t = class _t {
|
|
|
1228
1228
|
* freeze it.
|
|
1229
1229
|
*/
|
|
1230
1230
|
composedPose(n) {
|
|
1231
|
-
const e =
|
|
1232
|
-
if (r >= e.morph) return
|
|
1231
|
+
const e = Ot.get(this.cur), s = this.shapeAtTime(n), o = this.exprAtTime(n), a = this.posed(e, Math.max(0, n - this.tCur), s, o), r = n - this.tCur;
|
|
1232
|
+
if (r >= e.morph) return a;
|
|
1233
1233
|
const c = this.fadeOrigin(n, s, o);
|
|
1234
|
-
return c ?
|
|
1234
|
+
return c ? We(c, a, J.easeOutQuint(z(r / e.morph))) : a;
|
|
1235
1235
|
}
|
|
1236
1236
|
/**
|
|
1237
1237
|
* A dated state change.
|
|
@@ -1252,135 +1252,135 @@ const _t = class _t {
|
|
|
1252
1252
|
* renders byte for byte what it used to.
|
|
1253
1253
|
*/
|
|
1254
1254
|
setState(n, e) {
|
|
1255
|
-
var
|
|
1255
|
+
var a;
|
|
1256
1256
|
if (n === this.cur) return;
|
|
1257
|
-
const s =
|
|
1258
|
-
this.frozenStart = o ? this.composedPose(e) : null, this.prev = this.cur, this.tPrev = this.tCur, this.cur = n, this.tCur = e, (
|
|
1257
|
+
const s = Ot.get(this.cur).morph, o = this.prev !== null && e - this.tCur < s;
|
|
1258
|
+
this.frozenStart = o ? this.composedPose(e) : null, this.prev = this.cur, this.tPrev = this.tCur, this.cur = n, this.tCur = e, (a = Ot.get(n)) != null && a.blinkIn && (this.blinkAt = e);
|
|
1259
1259
|
}
|
|
1260
1260
|
sample(n) {
|
|
1261
|
-
const e = this.scale, s =
|
|
1262
|
-
let r = this.posed(s, Math.max(0, n - this.tCur), o,
|
|
1263
|
-
const l = n - this.tCur, d = l < s.morph ? this.fadeOrigin(n, o,
|
|
1261
|
+
const e = this.scale, s = Ot.get(this.cur), o = this.shapeAtTime(n), a = this.exprAtTime(n);
|
|
1262
|
+
let r = this.posed(s, Math.max(0, n - this.tCur), o, a), c = this.eyeOffsetAtTime(n, this.cur);
|
|
1263
|
+
const l = n - this.tCur, d = l < s.morph ? this.fadeOrigin(n, o, a) : null;
|
|
1264
1264
|
if (d) {
|
|
1265
|
-
const
|
|
1266
|
-
r =
|
|
1267
|
-
const
|
|
1268
|
-
if (
|
|
1269
|
-
const
|
|
1265
|
+
const O = J.easeOutQuint(z(l / s.morph));
|
|
1266
|
+
r = We(d, r, O);
|
|
1267
|
+
const H = this.prev;
|
|
1268
|
+
if (H) {
|
|
1269
|
+
const R = this.eyeOffsetAtTime(n, H);
|
|
1270
1270
|
c = {
|
|
1271
|
-
x:
|
|
1272
|
-
y:
|
|
1271
|
+
x: T(R.x, c.x, O),
|
|
1272
|
+
y: T(R.y, c.y, O)
|
|
1273
1273
|
};
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
|
-
const u = r.eyeAlpha > 0.01, h = this.lookAtTime(n),
|
|
1276
|
+
const u = r.eyeAlpha > 0.01, h = this.lookAtTime(n), p = Jn(n, { wander: u ? h.wander : 0, blink: u }), f = {
|
|
1277
1277
|
// Both aims REPLACE the pose's instead of adding to them (see `Look`), and the
|
|
1278
1278
|
// turn is subtracted on the way. The drift is added AFTER the mix, otherwise
|
|
1279
1279
|
// the target would cancel it along with the pose — and it has to survive a
|
|
1280
1280
|
// turned head with no pointer.
|
|
1281
|
-
yaw:
|
|
1282
|
-
pitch:
|
|
1281
|
+
yaw: T(r.gaze.yaw, h.yaw, h.mix) + p.dYaw - h.spin,
|
|
1282
|
+
pitch: T(r.gaze.pitch, h.pitch, h.mix) + p.dPitch,
|
|
1283
1283
|
// the roll follows nothing: Novi's head is tilted -13deg in the reference, and
|
|
1284
1284
|
// rolling it with the cursor breaks that signature
|
|
1285
|
-
roll: r.gaze.roll +
|
|
1286
|
-
}, _ =
|
|
1285
|
+
roll: r.gaze.roll + p.dRoll
|
|
1286
|
+
}, _ = z((n - this.blinkAt) / 0.2), v = _ < 1 ? Math.abs(_ * 2 - 1) : 1, N = Math.min(p.lid, v), m = r.offX + p.driftX, M = r.offY + p.driftY, k = {
|
|
1287
1287
|
...r.sil,
|
|
1288
1288
|
cx: r.sil.cx + m,
|
|
1289
|
-
cy: r.sil.cy +
|
|
1290
|
-
sy: r.sil.sy *
|
|
1291
|
-
}, y =
|
|
1289
|
+
cy: r.sil.cy + M,
|
|
1290
|
+
sy: r.sil.sy * p.breath
|
|
1291
|
+
}, y = is(ge(k, e, this.pts)), b = (O, H) => an(r.sil.radii, Math.atan2(H, O) - r.sil.rot), C = [];
|
|
1292
1292
|
if (r.eyeAlpha > 0.01) {
|
|
1293
|
-
const
|
|
1294
|
-
for (let
|
|
1295
|
-
const
|
|
1296
|
-
if (
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
d:
|
|
1300
|
-
matrix: `matrix(${
|
|
1301
|
-
alpha: r.eyeAlpha *
|
|
1293
|
+
const O = on(f, e, r.split);
|
|
1294
|
+
for (let H = 0; H < 2; H++) {
|
|
1295
|
+
const R = O[H];
|
|
1296
|
+
if (R.depth <= 0.02) continue;
|
|
1297
|
+
const V = r.eyes[H], F = b(R.x, R.y), nt = (V.tilt ?? 0) * Math.PI / 180, U = Math.cos(nt), G = Math.sin(nt), K = R.a * U + R.c * G, x = R.b * U + R.d * G, j = -R.a * G + R.c * U, S = -R.b * G + R.d * U, Y = ts(Math.min(N, V.open));
|
|
1298
|
+
C.push({
|
|
1299
|
+
d: us(V.w * e, V.h * e),
|
|
1300
|
+
matrix: `matrix(${w(K)},${w(x * Y)},${w(j)},${w(S * Y)},${w(R.x * F + (m + c.x) * e)},${w(R.y * F + (M + c.y) * e)})`,
|
|
1301
|
+
alpha: r.eyeAlpha * z(R.depth / 0.12)
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
const
|
|
1305
|
+
const $ = r.dots.filter((O) => O.opacity > 0.01 && O.r > 5e-4).map((O) => ({ ...O, x: (O.x + m) * e, y: (O.y + M) * e, r: O.r * e })), P = r.notif ? b(r.notif.x, r.notif.y) : 1, q = r.notif ? (r.notif.x * P + m) * e : 0, L = r.notif ? (r.notif.y * P + M) * e : 0, I = r.notif ? { x: q, y: L, r: r.notif.r * e } : null, Q = r.notif ? { x: q, y: L, r: r.notif.notch * e } : null;
|
|
1306
1306
|
return {
|
|
1307
1307
|
bodyPath: y,
|
|
1308
1308
|
bodyAlpha: r.bodyAlpha,
|
|
1309
|
-
eyes:
|
|
1310
|
-
dots:
|
|
1309
|
+
eyes: C,
|
|
1310
|
+
dots: $,
|
|
1311
1311
|
dotsBehind: r.dotsBehind,
|
|
1312
1312
|
// States declare arcs in ball-radius units; the engine alone knows the viewBox
|
|
1313
1313
|
// scale, so the engine is what rasterises them.
|
|
1314
|
-
arcs: r.arcs.filter((
|
|
1315
|
-
notif:
|
|
1316
|
-
notch:
|
|
1314
|
+
arcs: r.arcs.filter((O) => O.opacity > 0.01).map((O) => Ln(O.seed, O.t, e, O.id, O.opacity)),
|
|
1315
|
+
notif: I,
|
|
1316
|
+
notch: Q
|
|
1317
1317
|
};
|
|
1318
1318
|
}
|
|
1319
1319
|
};
|
|
1320
|
-
|
|
1321
|
-
let
|
|
1322
|
-
const
|
|
1320
|
+
bt.SHAPE_MORPH = 0.45, bt.LOOK_MORPH = 0.24;
|
|
1321
|
+
let be = bt;
|
|
1322
|
+
const un = 100, Hs = 158, Fs = 16, Ds = 13, Ys = 10, hn = 360, de = 1.1, Us = 1.5, fa = (t) => ({
|
|
1323
1323
|
yaw: 0,
|
|
1324
1324
|
pitch: 0,
|
|
1325
1325
|
mix: 0,
|
|
1326
|
-
spin:
|
|
1326
|
+
spin: hn * (1 - J.easeInOutCubic(z(t / Us))),
|
|
1327
1327
|
wander: 1
|
|
1328
1328
|
});
|
|
1329
|
-
function
|
|
1329
|
+
function Xs({ nx: t, ny: n, progress: e, pointer: s, turn: o = 0 }) {
|
|
1330
1330
|
return {
|
|
1331
|
-
yaw: o + t *
|
|
1331
|
+
yaw: o + t * Fs,
|
|
1332
1332
|
// positive pitch = looking up, whereas the screen's y goes down
|
|
1333
|
-
pitch:
|
|
1333
|
+
pitch: Ys - n * Ds,
|
|
1334
1334
|
mix: e,
|
|
1335
|
-
spin:
|
|
1335
|
+
spin: hn * (1 - e),
|
|
1336
1336
|
// With no pointer the head stays turned, but its drift is given back: otherwise
|
|
1337
1337
|
// Novi stares at a dead point, and arriving by keyboard or touch gave a
|
|
1338
1338
|
// completely motionless avatar.
|
|
1339
1339
|
wander: s ? 0 : 1
|
|
1340
1340
|
};
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Gs(t, n) {
|
|
1343
1343
|
if (/^#[0-9a-f]{6}$/i.test(t)) return t;
|
|
1344
1344
|
const e = t.match(/-?\d*\.?\d+/g);
|
|
1345
1345
|
return !e || e.length < 3 ? n : `#${e.slice(0, 3).map(
|
|
1346
1346
|
(s) => Math.max(0, Math.min(255, Math.round(Number(s)))).toString(16).padStart(2, "0")
|
|
1347
1347
|
).join("")}`;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Qe(t, n) {
|
|
1350
1350
|
if (typeof document > "u") return n;
|
|
1351
1351
|
const e = document.createElement("span");
|
|
1352
1352
|
e.style.color = t, e.style.position = "absolute", e.style.visibility = "hidden", e.style.pointerEvents = "none", document.documentElement.appendChild(e);
|
|
1353
1353
|
const s = getComputedStyle(e).color;
|
|
1354
|
-
return e.remove(),
|
|
1354
|
+
return e.remove(), Gs(s, n);
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
const [e, s] =
|
|
1358
|
-
return
|
|
1359
|
-
const o = () => s(
|
|
1356
|
+
function ue(t, n) {
|
|
1357
|
+
const [e, s] = at(() => Qe(t, n));
|
|
1358
|
+
return tt(() => {
|
|
1359
|
+
const o = () => s(Qe(t, n));
|
|
1360
1360
|
o();
|
|
1361
|
-
const
|
|
1362
|
-
return
|
|
1361
|
+
const a = new MutationObserver(o);
|
|
1362
|
+
return a.observe(document.documentElement, {
|
|
1363
1363
|
attributes: !0,
|
|
1364
1364
|
attributeFilter: ["data-theme", "class", "style"]
|
|
1365
|
-
}), () =>
|
|
1365
|
+
}), () => a.disconnect();
|
|
1366
1366
|
}, [n, t]), e;
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1369
|
-
function
|
|
1370
|
-
const o = { fill: t.color ?? (t.depth === void 0 ? n :
|
|
1368
|
+
const he = 1 / 60;
|
|
1369
|
+
function Ws(t, n, e) {
|
|
1370
|
+
const o = { fill: t.color ?? (t.depth === void 0 ? n : ks(e, n, t.depth)), opacity: t.opacity };
|
|
1371
1371
|
return t.d ? {
|
|
1372
1372
|
...o,
|
|
1373
1373
|
d: t.d,
|
|
1374
|
-
transform: `translate(${t.x} ${t.y}) rotate(${t.rot ?? 0}) scale(${
|
|
1374
|
+
transform: `translate(${t.x} ${t.y}) rotate(${t.rot ?? 0}) scale(${un})`
|
|
1375
1375
|
} : { ...o, cx: t.x, cy: t.y, r: t.r };
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function Qt({
|
|
1378
1378
|
size: t = 320,
|
|
1379
|
-
shape: n =
|
|
1380
|
-
color: e =
|
|
1381
|
-
expression: s =
|
|
1379
|
+
shape: n = gs,
|
|
1380
|
+
color: e = vs,
|
|
1381
|
+
expression: s = ns,
|
|
1382
1382
|
paper: o = "var(--backgrounds-bg-base)",
|
|
1383
|
-
state:
|
|
1383
|
+
state: a = "idle",
|
|
1384
1384
|
frozenAt: r,
|
|
1385
1385
|
follow: c = !1,
|
|
1386
1386
|
turn: l = 0,
|
|
@@ -1388,96 +1388,96 @@ function Kt({
|
|
|
1388
1388
|
label: u,
|
|
1389
1389
|
className: h
|
|
1390
1390
|
}) {
|
|
1391
|
-
var
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1394
|
-
const y =
|
|
1395
|
-
|
|
1396
|
-
const
|
|
1397
|
-
function
|
|
1398
|
-
var
|
|
1399
|
-
const
|
|
1400
|
-
if (!((
|
|
1401
|
-
|
|
1391
|
+
var G, K;
|
|
1392
|
+
const p = ((G = ys.get(n)) == null ? void 0 : G.radii) ?? null, f = ((K = bs.get(e)) == null ? void 0 : K.hex) ?? "var(--novi-color-ink)", _ = ue(f, "#18181b"), v = ue(o, "#ffffff"), N = ue(Xn, "#3b82f6"), m = es.get(s) ?? null, M = D(null), k = D();
|
|
1393
|
+
k.current || (k.current = new be(un, a, p, m));
|
|
1394
|
+
const y = k.current, [b, C] = at(() => y.sample(r ?? 0)), $ = St().replace(/[^a-zA-Z0-9_-]/g, ""), P = `novi-mask-${$}`, q = D(0), L = D(null), I = D(!1), Q = D(0), O = D(0), H = D({ follow: c, turn: l, gaze: d, state: a });
|
|
1395
|
+
H.current = { follow: c, turn: l, gaze: d, state: a };
|
|
1396
|
+
const R = r !== void 0;
|
|
1397
|
+
function V() {
|
|
1398
|
+
var ht, it;
|
|
1399
|
+
const x = k.current, j = q.current;
|
|
1400
|
+
if (!((ht = Ot.get(H.current.state)) != null && ht.baseFace)) {
|
|
1401
|
+
I.current && (x.setLook(null, j, de), I.current = !1);
|
|
1402
1402
|
return;
|
|
1403
1403
|
}
|
|
1404
|
-
const S = (
|
|
1404
|
+
const S = (it = M.current) == null ? void 0 : it.getBoundingClientRect();
|
|
1405
1405
|
if (!S || S.width === 0 || S.height === 0) return;
|
|
1406
|
-
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
nx:
|
|
1411
|
-
ny:
|
|
1412
|
-
progress:
|
|
1413
|
-
pointer:
|
|
1414
|
-
turn:
|
|
1406
|
+
I.current || (Q.current = j);
|
|
1407
|
+
const Y = L.current, E = Math.max(1, window.innerWidth / 2), lt = Math.max(1, window.innerHeight / 2);
|
|
1408
|
+
x.setLook(
|
|
1409
|
+
Xs({
|
|
1410
|
+
nx: Y ? z((Y.x - (S.left + S.width / 2)) / E, -1, 1) : 0,
|
|
1411
|
+
ny: Y ? z((Y.y - (S.top + S.height / 2)) / lt, -1, 1) : 0,
|
|
1412
|
+
progress: J.easeOutQuint(z((j - Q.current) / de)),
|
|
1413
|
+
pointer: Y !== null,
|
|
1414
|
+
turn: H.current.turn
|
|
1415
1415
|
}),
|
|
1416
|
-
|
|
1417
|
-
),
|
|
1416
|
+
j
|
|
1417
|
+
), I.current = !0;
|
|
1418
1418
|
}
|
|
1419
|
-
|
|
1420
|
-
if (
|
|
1421
|
-
const
|
|
1422
|
-
let
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1425
|
-
const
|
|
1426
|
-
S =
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
),
|
|
1419
|
+
tt(() => {
|
|
1420
|
+
if (R) return;
|
|
1421
|
+
const x = k.current;
|
|
1422
|
+
let j = 0, S = 0;
|
|
1423
|
+
const Y = (E) => {
|
|
1424
|
+
j = requestAnimationFrame(Y);
|
|
1425
|
+
const lt = S ? Math.min((E - S) / 1e3, 0.064) : 0;
|
|
1426
|
+
S = E, q.current += lt, H.current.follow ? V() : H.current.gaze && x.setLook(
|
|
1427
|
+
H.current.gaze(q.current - O.current),
|
|
1428
|
+
q.current,
|
|
1429
|
+
he
|
|
1430
|
+
), C(x.sample(q.current));
|
|
1431
1431
|
};
|
|
1432
|
-
return
|
|
1433
|
-
}, [
|
|
1434
|
-
if (!c ||
|
|
1435
|
-
const
|
|
1436
|
-
S.pointerType !== "touch" && (
|
|
1437
|
-
},
|
|
1438
|
-
|
|
1432
|
+
return j = requestAnimationFrame(Y), () => cancelAnimationFrame(j);
|
|
1433
|
+
}, [R]), tt(() => {
|
|
1434
|
+
if (!c || R) return;
|
|
1435
|
+
const x = (S) => {
|
|
1436
|
+
S.pointerType !== "touch" && (L.current = { x: S.clientX, y: S.clientY });
|
|
1437
|
+
}, j = () => {
|
|
1438
|
+
L.current = null;
|
|
1439
1439
|
};
|
|
1440
|
-
return window.addEventListener("pointermove",
|
|
1441
|
-
window.removeEventListener("pointermove",
|
|
1440
|
+
return window.addEventListener("pointermove", x), document.addEventListener("pointerleave", j), () => {
|
|
1441
|
+
window.removeEventListener("pointermove", x), document.removeEventListener("pointerleave", j), L.current = null, I.current && (k.current.setLook(null, q.current, de), I.current = !1);
|
|
1442
1442
|
};
|
|
1443
|
-
}, [c,
|
|
1444
|
-
const
|
|
1443
|
+
}, [c, R]), tt(() => {
|
|
1444
|
+
const x = k.current;
|
|
1445
1445
|
if (d)
|
|
1446
|
-
return
|
|
1447
|
-
|
|
1446
|
+
return O.current = q.current, x.setLook(d(0), q.current - he, he), () => {
|
|
1447
|
+
x.setLook(null, q.current);
|
|
1448
1448
|
};
|
|
1449
|
-
}, [d]),
|
|
1450
|
-
|
|
1451
|
-
}, [
|
|
1452
|
-
|
|
1453
|
-
}, [
|
|
1454
|
-
|
|
1455
|
-
}, [m]),
|
|
1456
|
-
|
|
1457
|
-
}, [
|
|
1458
|
-
const F =
|
|
1459
|
-
() => b.arcs.map((
|
|
1449
|
+
}, [d]), tt(() => {
|
|
1450
|
+
k.current.setState(a, q.current);
|
|
1451
|
+
}, [a]), tt(() => {
|
|
1452
|
+
k.current.setShape(p, q.current);
|
|
1453
|
+
}, [p]), tt(() => {
|
|
1454
|
+
k.current.setExpression(m, q.current);
|
|
1455
|
+
}, [m]), tt(() => {
|
|
1456
|
+
R && C(k.current.sample(r));
|
|
1457
|
+
}, [R, r, p, m, a]);
|
|
1458
|
+
const F = Hs, nt = yn(
|
|
1459
|
+
() => b.arcs.map((x) => /* @__PURE__ */ i(
|
|
1460
1460
|
"linearGradient",
|
|
1461
1461
|
{
|
|
1462
|
-
id: `${
|
|
1462
|
+
id: `${$}-${x.id}`,
|
|
1463
1463
|
gradientUnits: "userSpaceOnUse",
|
|
1464
|
-
x1:
|
|
1465
|
-
y1:
|
|
1466
|
-
x2:
|
|
1467
|
-
y2:
|
|
1468
|
-
children:
|
|
1464
|
+
x1: x.grad.x1,
|
|
1465
|
+
y1: x.grad.y1,
|
|
1466
|
+
x2: x.grad.x2,
|
|
1467
|
+
y2: x.grad.y2,
|
|
1468
|
+
children: x.grad.stops.map((j, S) => /* @__PURE__ */ i("stop", { offset: S / (x.grad.stops.length - 1), stopColor: j }, S))
|
|
1469
1469
|
},
|
|
1470
|
-
|
|
1470
|
+
x.id
|
|
1471
1471
|
)),
|
|
1472
|
-
[b.arcs,
|
|
1473
|
-
),
|
|
1474
|
-
const S =
|
|
1475
|
-
return
|
|
1472
|
+
[b.arcs, $]
|
|
1473
|
+
), U = b.dots.map((x, j) => {
|
|
1474
|
+
const S = Ws(x, _, v);
|
|
1475
|
+
return x.d ? /* @__PURE__ */ i("path", { ...S }, j) : /* @__PURE__ */ i("circle", { ...S }, j);
|
|
1476
1476
|
});
|
|
1477
1477
|
return /* @__PURE__ */ g(
|
|
1478
1478
|
"svg",
|
|
1479
1479
|
{
|
|
1480
|
-
ref:
|
|
1480
|
+
ref: M,
|
|
1481
1481
|
className: h,
|
|
1482
1482
|
width: t,
|
|
1483
1483
|
height: t,
|
|
@@ -1487,61 +1487,322 @@ function Kt({
|
|
|
1487
1487
|
"aria-hidden": u ? void 0 : !0,
|
|
1488
1488
|
children: [
|
|
1489
1489
|
/* @__PURE__ */ g("defs", { children: [
|
|
1490
|
-
/* @__PURE__ */ g("mask", { id:
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
b.eyes.map((
|
|
1493
|
-
b.notch && /* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ g("mask", { id: P, maskUnits: "userSpaceOnUse", x: -F, y: -F, width: F * 2, height: F * 2, children: [
|
|
1491
|
+
/* @__PURE__ */ i("path", { d: b.bodyPath, fill: "#fff" }),
|
|
1492
|
+
b.eyes.map((x, j) => /* @__PURE__ */ i("path", { d: x.d, transform: x.matrix, opacity: x.alpha, fill: "#000" }, j)),
|
|
1493
|
+
b.notch && /* @__PURE__ */ i("circle", { cx: b.notch.x, cy: b.notch.y, r: b.notch.r, fill: "#000" })
|
|
1494
1494
|
] }),
|
|
1495
|
-
|
|
1495
|
+
nt
|
|
1496
1496
|
] }),
|
|
1497
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ i("g", { fill: "none", strokeLinecap: "round", children: b.arcs.map((x) => /* @__PURE__ */ i(
|
|
1498
1498
|
"path",
|
|
1499
1499
|
{
|
|
1500
|
-
d:
|
|
1501
|
-
stroke: `url(#${
|
|
1502
|
-
strokeWidth:
|
|
1503
|
-
opacity:
|
|
1500
|
+
d: x.back,
|
|
1501
|
+
stroke: `url(#${$}-${x.id})`,
|
|
1502
|
+
strokeWidth: x.width,
|
|
1503
|
+
opacity: x.opacity
|
|
1504
1504
|
},
|
|
1505
|
-
`b${
|
|
1505
|
+
`b${x.id}`
|
|
1506
1506
|
)) }),
|
|
1507
|
-
b.dotsBehind && /* @__PURE__ */
|
|
1507
|
+
b.dotsBehind && /* @__PURE__ */ i("g", { children: U }),
|
|
1508
1508
|
/* @__PURE__ */ g("g", { opacity: b.bodyAlpha, children: [
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ i("path", { d: b.bodyPath, fill: v }),
|
|
1510
|
+
/* @__PURE__ */ i("g", { mask: `url(#${P})`, children: /* @__PURE__ */ i("rect", { x: -F, y: -F, width: F * 2, height: F * 2, fill: _ }) })
|
|
1511
1511
|
] }),
|
|
1512
|
-
!b.dotsBehind && /* @__PURE__ */
|
|
1513
|
-
b.notif && /* @__PURE__ */
|
|
1514
|
-
/* @__PURE__ */
|
|
1512
|
+
!b.dotsBehind && /* @__PURE__ */ i("g", { children: U }),
|
|
1513
|
+
b.notif && /* @__PURE__ */ i("circle", { cx: b.notif.x, cy: b.notif.y, r: b.notif.r, fill: N }),
|
|
1514
|
+
/* @__PURE__ */ i("g", { fill: "none", strokeLinecap: "round", children: b.arcs.map((x) => /* @__PURE__ */ i(
|
|
1515
1515
|
"path",
|
|
1516
1516
|
{
|
|
1517
|
-
d:
|
|
1518
|
-
stroke: `url(#${
|
|
1519
|
-
strokeWidth:
|
|
1520
|
-
opacity:
|
|
1517
|
+
d: x.front,
|
|
1518
|
+
stroke: `url(#${$}-${x.id})`,
|
|
1519
|
+
strokeWidth: x.width,
|
|
1520
|
+
opacity: x.opacity
|
|
1521
1521
|
},
|
|
1522
|
-
`f${
|
|
1522
|
+
`f${x.id}`
|
|
1523
1523
|
)) })
|
|
1524
1524
|
]
|
|
1525
1525
|
}
|
|
1526
1526
|
);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
return /* @__PURE__ */
|
|
1528
|
+
function pa({ size: t = 60, state: n = "idle", frozenAt: e, ...s }) {
|
|
1529
|
+
return /* @__PURE__ */ i(Qt, { ...s, state: n, size: t, frozenAt: e ?? zs[n] ?? 1 });
|
|
1530
|
+
}
|
|
1531
|
+
const Qs = "_menu_dpnsn_2", Vs = "_menuVisible_dpnsn_21", Ks = "_menuClip_dpnsn_29", Zs = "_menuSize_dpnsn_35", Js = "_menuContent_dpnsn_42", to = "_menuFade_dpnsn_69", eo = "_scrollHint_dpnsn_74", Mt = {
|
|
1532
|
+
menu: Qs,
|
|
1533
|
+
menuVisible: Vs,
|
|
1534
|
+
menuClip: Ks,
|
|
1535
|
+
menuSize: Zs,
|
|
1536
|
+
menuContent: Js,
|
|
1537
|
+
menuFade: to,
|
|
1538
|
+
scrollHint: eo
|
|
1539
|
+
}, we = ee(
|
|
1540
|
+
function({ menu: n, id: e, label: s = "Add to prompt", maxHeight: o = 240, disabled: a = !1, restoreFocusRef: r }, c) {
|
|
1541
|
+
const l = D(null), d = D(null), u = D(null), [h, p] = at(!1), [f, _] = at(), [v, N] = at(n), m = n != null && n !== !1;
|
|
1542
|
+
tt(() => {
|
|
1543
|
+
var y;
|
|
1544
|
+
m && N(n), l.current && (!m && l.current.contains(document.activeElement) && ((y = r.current) == null || y.focus()), l.current.inert = !m || a);
|
|
1545
|
+
}, [n, m, a, r]), ve(() => {
|
|
1546
|
+
const y = d.current;
|
|
1547
|
+
if (!y) return;
|
|
1548
|
+
function b() {
|
|
1549
|
+
y && (_(y.getBoundingClientRect().height), M(y));
|
|
1550
|
+
}
|
|
1551
|
+
b();
|
|
1552
|
+
const C = new ResizeObserver(b);
|
|
1553
|
+
return C.observe(y), u.current && C.observe(u.current), () => C.disconnect();
|
|
1554
|
+
}, [v, o]);
|
|
1555
|
+
function M(y) {
|
|
1556
|
+
p(y.scrollHeight - y.clientHeight - y.scrollTop > 1);
|
|
1557
|
+
}
|
|
1558
|
+
function k(y) {
|
|
1559
|
+
l.current = y, typeof c == "function" ? c(y) : c && (c.current = y);
|
|
1560
|
+
}
|
|
1561
|
+
return /* @__PURE__ */ i(
|
|
1562
|
+
"div",
|
|
1563
|
+
{
|
|
1564
|
+
ref: k,
|
|
1565
|
+
id: e,
|
|
1566
|
+
role: "region",
|
|
1567
|
+
"aria-label": s,
|
|
1568
|
+
"aria-hidden": !m,
|
|
1569
|
+
className: [Mt.menu, m && Mt.menuVisible].filter(Boolean).join(" "),
|
|
1570
|
+
onTransitionEnd: (y) => {
|
|
1571
|
+
y.target === y.currentTarget && y.propertyName === "grid-template-rows" && !m && N(null);
|
|
1572
|
+
},
|
|
1573
|
+
children: /* @__PURE__ */ i("div", { className: Mt.menuClip, children: /* @__PURE__ */ g("div", { className: Mt.menuSize, style: { height: f }, children: [
|
|
1574
|
+
/* @__PURE__ */ i(
|
|
1575
|
+
Xt,
|
|
1576
|
+
{
|
|
1577
|
+
ref: d,
|
|
1578
|
+
direction: "y",
|
|
1579
|
+
size: "thin",
|
|
1580
|
+
className: [Mt.menuContent, h && Mt.menuFade].filter(Boolean).join(" "),
|
|
1581
|
+
onScroll: (y) => M(y.currentTarget),
|
|
1582
|
+
style: {
|
|
1583
|
+
maxHeight: `min(${typeof o == "number" ? `${o}px` : o}, 50dvh)`
|
|
1584
|
+
},
|
|
1585
|
+
children: /* @__PURE__ */ i("div", { ref: u, children: v })
|
|
1586
|
+
}
|
|
1587
|
+
),
|
|
1588
|
+
m && h && /* @__PURE__ */ i("span", { className: Mt.scrollHint, "aria-hidden": !0, children: /* @__PURE__ */ i(kn, { size: 14 }) })
|
|
1589
|
+
] }) })
|
|
1590
|
+
}
|
|
1591
|
+
);
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
function Rt(t, n, e) {
|
|
1595
|
+
const s = D(t !== void 0).current, [o, a] = at(n), r = s ? t : o, c = gn(
|
|
1596
|
+
(l) => {
|
|
1597
|
+
s || a(l), e == null || e(l);
|
|
1598
|
+
},
|
|
1599
|
+
[s, e]
|
|
1600
|
+
);
|
|
1601
|
+
return [r, c];
|
|
1530
1602
|
}
|
|
1531
|
-
const
|
|
1532
|
-
root:
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1603
|
+
const no = "_root_1w9dw_2 _root_6xqta_30", so = "_references_1w9dw_19 _referencesRow_6xqta_84", oo = "_field_1w9dw_24", ro = "_textarea_1w9dw_29 _input_6xqta_136", io = "_footer_1w9dw_39", ao = "_avatar_1w9dw_47 _avatar_6xqta_129", co = "_actions_1w9dw_51 _actions_6xqta_154", lo = "_recents_1w9dw_58", uo = "_divider_1w9dw_62", ho = "_disabled_1w9dw_70 _disabled_6xqta_124", fo = "_dragging_1w9dw_74", po = "_srOnly_1w9dw_83", dt = {
|
|
1604
|
+
root: no,
|
|
1605
|
+
references: so,
|
|
1606
|
+
field: oo,
|
|
1607
|
+
textarea: ro,
|
|
1608
|
+
footer: io,
|
|
1609
|
+
avatar: ao,
|
|
1610
|
+
actions: co,
|
|
1611
|
+
recents: lo,
|
|
1612
|
+
divider: uo,
|
|
1613
|
+
disabled: ho,
|
|
1614
|
+
dragging: fo,
|
|
1615
|
+
srOnly: po
|
|
1616
|
+
}, _a = ee(function({
|
|
1617
|
+
value: n,
|
|
1618
|
+
defaultValue: e = "",
|
|
1619
|
+
onValueChange: s,
|
|
1620
|
+
onSubmit: o,
|
|
1621
|
+
submitOnEnter: a = !0,
|
|
1622
|
+
submitLabel: r = "Send",
|
|
1623
|
+
maxHeight: c = "240px",
|
|
1624
|
+
placeholder: l = "Work with Novi",
|
|
1625
|
+
"aria-label": d = "Work with Novi",
|
|
1626
|
+
avatar: u,
|
|
1627
|
+
noviProps: h,
|
|
1628
|
+
references: p,
|
|
1629
|
+
attachments: f,
|
|
1630
|
+
onFilesDrop: _,
|
|
1631
|
+
dropLabel: v = "Drop files to attach them",
|
|
1632
|
+
menu: N,
|
|
1633
|
+
menuLabel: m = "Add to prompt",
|
|
1634
|
+
menuMaxHeight: M = 240,
|
|
1635
|
+
onMenuClose: k,
|
|
1636
|
+
actions: y,
|
|
1637
|
+
onRecents: b,
|
|
1638
|
+
onAdd: C,
|
|
1639
|
+
onVoice: $,
|
|
1640
|
+
recentsLabel: P = "Recents",
|
|
1641
|
+
addLabel: q = "Add",
|
|
1642
|
+
voiceLabel: L = "Use voice",
|
|
1643
|
+
disabled: I = !1,
|
|
1644
|
+
readOnly: Q = !1,
|
|
1645
|
+
className: O,
|
|
1646
|
+
onKeyDown: H,
|
|
1647
|
+
onPaste: R,
|
|
1648
|
+
rows: V = 2,
|
|
1649
|
+
...F
|
|
1650
|
+
}, nt) {
|
|
1651
|
+
const [U, G] = Rt(n, e, s), K = D(null), x = D(0), [j, S] = at(!1), Y = St(), E = N != null && N !== !1, lt = U.trim().length > 0, ht = xn.toArray(f), it = lt || ht.length > 0, kt = !!o && it, ie = !!(y || b || C || $ || kt), Vt = it && !I && !Q && !!o, gt = !!_ && !I && !Q;
|
|
1652
|
+
tt(() => {
|
|
1653
|
+
gt || (x.current = 0, S(!1));
|
|
1654
|
+
}, [gt]), ve(() => {
|
|
1655
|
+
const A = K.current;
|
|
1656
|
+
A && (A.style.height = "auto", A.style.height = `${A.scrollHeight}px`);
|
|
1657
|
+
}, [U, V]);
|
|
1658
|
+
function Kt() {
|
|
1659
|
+
var A;
|
|
1660
|
+
Vt && (o == null || o(U.trim()), G(""), (A = K.current) == null || A.focus());
|
|
1661
|
+
}
|
|
1662
|
+
function jt(A) {
|
|
1663
|
+
return Array.from(A.dataTransfer.types).includes("Files");
|
|
1664
|
+
}
|
|
1665
|
+
function B(A) {
|
|
1666
|
+
!gt || A.defaultPrevented || !jt(A) || (A.preventDefault(), x.current += 1, S(!0));
|
|
1667
|
+
}
|
|
1668
|
+
function At(A) {
|
|
1669
|
+
!gt || A.defaultPrevented || !jt(A) || (A.preventDefault(), A.dataTransfer.dropEffect = "copy");
|
|
1670
|
+
}
|
|
1671
|
+
function pn(A) {
|
|
1672
|
+
gt && (x.current = Math.max(0, x.current - 1), x.current === 0 && S(!1));
|
|
1673
|
+
}
|
|
1674
|
+
function _n(A) {
|
|
1675
|
+
if (x.current = 0, S(!1), !gt || A.defaultPrevented || !jt(A)) return;
|
|
1676
|
+
A.preventDefault();
|
|
1677
|
+
const qt = Array.from(A.dataTransfer.files);
|
|
1678
|
+
qt.length > 0 && (_ == null || _(qt));
|
|
1679
|
+
}
|
|
1680
|
+
function mn(A) {
|
|
1681
|
+
if (R == null || R(A), !gt || A.defaultPrevented) return;
|
|
1682
|
+
const qt = Array.from(A.clipboardData.files);
|
|
1683
|
+
qt.length > 0 && (A.preventDefault(), _ == null || _(qt));
|
|
1684
|
+
}
|
|
1685
|
+
return /* @__PURE__ */ g(
|
|
1686
|
+
"div",
|
|
1687
|
+
{
|
|
1688
|
+
className: [dt.root, j && dt.dragging, I && dt.disabled, O].filter(Boolean).join(" "),
|
|
1689
|
+
onDragEnter: B,
|
|
1690
|
+
onDragOver: At,
|
|
1691
|
+
onDragLeave: pn,
|
|
1692
|
+
onDrop: _n,
|
|
1693
|
+
onKeyDown: (A) => {
|
|
1694
|
+
A.key === "Escape" && !A.defaultPrevented && E && k && (A.preventDefault(), k());
|
|
1695
|
+
},
|
|
1696
|
+
children: [
|
|
1697
|
+
/* @__PURE__ */ i("span", { className: dt.srOnly, "aria-live": "polite", children: j ? v : "" }),
|
|
1698
|
+
/* @__PURE__ */ i(
|
|
1699
|
+
we,
|
|
1700
|
+
{
|
|
1701
|
+
id: Y,
|
|
1702
|
+
menu: N,
|
|
1703
|
+
label: m,
|
|
1704
|
+
maxHeight: M,
|
|
1705
|
+
disabled: I,
|
|
1706
|
+
restoreFocusRef: K
|
|
1707
|
+
}
|
|
1708
|
+
),
|
|
1709
|
+
p && /* @__PURE__ */ i("div", { className: dt.references, children: p }),
|
|
1710
|
+
ht.length > 0 && /* @__PURE__ */ i("div", { className: dt.references, children: ht }),
|
|
1711
|
+
/* @__PURE__ */ i(Xt, { direction: "y", size: "thin", maxHeight: c, className: dt.field, children: /* @__PURE__ */ i(
|
|
1712
|
+
"textarea",
|
|
1713
|
+
{
|
|
1714
|
+
...F,
|
|
1715
|
+
ref: (A) => {
|
|
1716
|
+
K.current = A, typeof nt == "function" ? nt(A) : nt && (nt.current = A);
|
|
1717
|
+
},
|
|
1718
|
+
className: dt.textarea,
|
|
1719
|
+
rows: V,
|
|
1720
|
+
"aria-label": d,
|
|
1721
|
+
value: U,
|
|
1722
|
+
placeholder: l,
|
|
1723
|
+
disabled: I,
|
|
1724
|
+
readOnly: Q,
|
|
1725
|
+
onChange: (A) => G(A.target.value),
|
|
1726
|
+
onPaste: mn,
|
|
1727
|
+
onKeyDown: (A) => {
|
|
1728
|
+
H == null || H(A), !(A.defaultPrevented || A.nativeEvent.isComposing) && a && o && A.key === "Enter" && !A.shiftKey && (A.preventDefault(), Kt());
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
) }),
|
|
1732
|
+
/* @__PURE__ */ g("div", { className: dt.footer, children: [
|
|
1733
|
+
/* @__PURE__ */ i("span", { className: dt.avatar, "aria-hidden": !0, children: u ?? /* @__PURE__ */ i(Qt, { size: 28, expression: "happy", frozenAt: 1, paper: "var(--backgrounds-bg-base)", ...h }) }),
|
|
1734
|
+
ie && /* @__PURE__ */ g("div", { className: dt.actions, children: [
|
|
1735
|
+
y,
|
|
1736
|
+
b && /* @__PURE__ */ i(
|
|
1737
|
+
$t,
|
|
1738
|
+
{
|
|
1739
|
+
variant: "transparent",
|
|
1740
|
+
size: "sm",
|
|
1741
|
+
className: dt.recents,
|
|
1742
|
+
leftIcon: /* @__PURE__ */ i(Nn, { size: 18 }),
|
|
1743
|
+
disabled: I,
|
|
1744
|
+
onClick: b,
|
|
1745
|
+
children: P
|
|
1746
|
+
}
|
|
1747
|
+
),
|
|
1748
|
+
b && (C || $ || kt) && /* @__PURE__ */ i("span", { className: dt.divider, "aria-hidden": !0 }),
|
|
1749
|
+
C && /* @__PURE__ */ i(
|
|
1750
|
+
et,
|
|
1751
|
+
{
|
|
1752
|
+
variant: "transparent",
|
|
1753
|
+
radius: "full",
|
|
1754
|
+
size: "sm",
|
|
1755
|
+
icon: /* @__PURE__ */ i(ke, { size: 18 }),
|
|
1756
|
+
"aria-label": q,
|
|
1757
|
+
"aria-expanded": E,
|
|
1758
|
+
"aria-controls": Y,
|
|
1759
|
+
disabled: I,
|
|
1760
|
+
onClick: C
|
|
1761
|
+
}
|
|
1762
|
+
),
|
|
1763
|
+
$ && /* @__PURE__ */ i(
|
|
1764
|
+
et,
|
|
1765
|
+
{
|
|
1766
|
+
variant: "transparent",
|
|
1767
|
+
radius: "full",
|
|
1768
|
+
size: "sm",
|
|
1769
|
+
icon: /* @__PURE__ */ i(Ke, { size: 18 }),
|
|
1770
|
+
"aria-label": L,
|
|
1771
|
+
disabled: I,
|
|
1772
|
+
onClick: $
|
|
1773
|
+
}
|
|
1774
|
+
),
|
|
1775
|
+
kt && /* @__PURE__ */ i(
|
|
1776
|
+
et,
|
|
1777
|
+
{
|
|
1778
|
+
variant: "inverted",
|
|
1779
|
+
radius: "full",
|
|
1780
|
+
size: "sm",
|
|
1781
|
+
icon: /* @__PURE__ */ i(Ze, { size: 15 }),
|
|
1782
|
+
"aria-label": r,
|
|
1783
|
+
disabled: !Vt,
|
|
1784
|
+
onClick: Kt
|
|
1785
|
+
}
|
|
1786
|
+
)
|
|
1787
|
+
] })
|
|
1788
|
+
] })
|
|
1789
|
+
]
|
|
1790
|
+
}
|
|
1791
|
+
);
|
|
1792
|
+
}), _o = "_root_1ynah_1", mo = "_title_1ynah_10", yo = "_titleText_1ynah_24", go = "_avatar_1ynah_31", xo = "_actions_1ynah_37", Lt = {
|
|
1793
|
+
root: _o,
|
|
1794
|
+
title: mo,
|
|
1795
|
+
titleText: yo,
|
|
1796
|
+
avatar: go,
|
|
1797
|
+
actions: xo
|
|
1537
1798
|
};
|
|
1538
|
-
function
|
|
1799
|
+
function bo({
|
|
1539
1800
|
title: t,
|
|
1540
1801
|
titleAs: n = "h2",
|
|
1541
1802
|
avatar: e,
|
|
1542
1803
|
onExpandToggle: s,
|
|
1543
1804
|
expanded: o = !1,
|
|
1544
|
-
onClose:
|
|
1805
|
+
onClose: a,
|
|
1545
1806
|
actions: r,
|
|
1546
1807
|
expandLabel: c = "Expand",
|
|
1547
1808
|
collapseLabel: l = "Collapse",
|
|
@@ -1549,118 +1810,118 @@ function Xs({
|
|
|
1549
1810
|
className: u,
|
|
1550
1811
|
...h
|
|
1551
1812
|
}) {
|
|
1552
|
-
return /* @__PURE__ */ g("header", { className: [
|
|
1553
|
-
/* @__PURE__ */ g(n, { className:
|
|
1554
|
-
e && /* @__PURE__ */
|
|
1555
|
-
/* @__PURE__ */
|
|
1813
|
+
return /* @__PURE__ */ g("header", { className: [Lt.root, u].filter(Boolean).join(" "), ...h, children: [
|
|
1814
|
+
/* @__PURE__ */ g(n, { className: Lt.title, children: [
|
|
1815
|
+
e && /* @__PURE__ */ i("span", { className: Lt.avatar, children: e }),
|
|
1816
|
+
/* @__PURE__ */ i("span", { className: Lt.titleText, children: t })
|
|
1556
1817
|
] }),
|
|
1557
|
-
/* @__PURE__ */ g("div", { className:
|
|
1818
|
+
/* @__PURE__ */ g("div", { className: Lt.actions, children: [
|
|
1558
1819
|
r,
|
|
1559
|
-
s && /* @__PURE__ */
|
|
1560
|
-
|
|
1820
|
+
s && /* @__PURE__ */ i(
|
|
1821
|
+
et,
|
|
1561
1822
|
{
|
|
1562
1823
|
variant: "transparent",
|
|
1563
1824
|
size: "xsmall",
|
|
1564
|
-
icon: o ? /* @__PURE__ */
|
|
1825
|
+
icon: o ? /* @__PURE__ */ i($n, { size: 15 }) : /* @__PURE__ */ i(An, { size: 15 }),
|
|
1565
1826
|
"aria-label": o ? l : c,
|
|
1566
1827
|
"aria-expanded": o,
|
|
1567
1828
|
onClick: s
|
|
1568
1829
|
}
|
|
1569
1830
|
),
|
|
1570
|
-
|
|
1571
|
-
|
|
1831
|
+
a && /* @__PURE__ */ i(
|
|
1832
|
+
et,
|
|
1572
1833
|
{
|
|
1573
1834
|
variant: "transparent",
|
|
1574
1835
|
size: "xsmall",
|
|
1575
|
-
icon: /* @__PURE__ */
|
|
1836
|
+
icon: /* @__PURE__ */ i(Je, { size: 15 }),
|
|
1576
1837
|
"aria-label": d,
|
|
1577
|
-
onClick:
|
|
1838
|
+
onClick: a
|
|
1578
1839
|
}
|
|
1579
1840
|
)
|
|
1580
1841
|
] })
|
|
1581
1842
|
] });
|
|
1582
1843
|
}
|
|
1583
|
-
const
|
|
1584
|
-
root:
|
|
1585
|
-
threadWrap:
|
|
1586
|
-
thread:
|
|
1587
|
-
jump:
|
|
1588
|
-
threadInner:
|
|
1589
|
-
},
|
|
1590
|
-
function
|
|
1844
|
+
const vo = "_root_1wg4e_1", ko = "_threadWrap_1wg4e_13", No = "_thread_1wg4e_13", $o = "_jump_1wg4e_32", Ao = "_threadInner_1wg4e_59", Ht = {
|
|
1845
|
+
root: vo,
|
|
1846
|
+
threadWrap: ko,
|
|
1847
|
+
thread: No,
|
|
1848
|
+
jump: $o,
|
|
1849
|
+
threadInner: Ao
|
|
1850
|
+
}, wo = 64;
|
|
1851
|
+
function ma({
|
|
1591
1852
|
children: t,
|
|
1592
1853
|
title: n = "Ask anything",
|
|
1593
1854
|
titleAs: e,
|
|
1594
1855
|
header: s,
|
|
1595
1856
|
avatar: o,
|
|
1596
|
-
expanded:
|
|
1857
|
+
expanded: a = !1,
|
|
1597
1858
|
onExpandToggle: r,
|
|
1598
1859
|
onClose: c,
|
|
1599
1860
|
headerActions: l,
|
|
1600
1861
|
input: d,
|
|
1601
1862
|
bottom: u,
|
|
1602
1863
|
height: h = "480px",
|
|
1603
|
-
autoScroll:
|
|
1604
|
-
scrollToBottomLabel:
|
|
1864
|
+
autoScroll: p = !0,
|
|
1865
|
+
scrollToBottomLabel: f = "Jump to the newest message",
|
|
1605
1866
|
className: _,
|
|
1606
|
-
style:
|
|
1607
|
-
|
|
1867
|
+
style: v,
|
|
1868
|
+
...N
|
|
1608
1869
|
}) {
|
|
1609
|
-
const m =
|
|
1610
|
-
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1613
|
-
}, [t,
|
|
1870
|
+
const m = D(null), M = D(!0), [k, y] = at(!0);
|
|
1871
|
+
tt(() => {
|
|
1872
|
+
const $ = m.current;
|
|
1873
|
+
!$ || !p || !M.current || ($.scrollTop = $.scrollHeight);
|
|
1874
|
+
}, [t, p]);
|
|
1614
1875
|
function b() {
|
|
1615
|
-
const
|
|
1616
|
-
if (
|
|
1617
|
-
const
|
|
1618
|
-
|
|
1876
|
+
const $ = m.current;
|
|
1877
|
+
if (!$) return;
|
|
1878
|
+
const P = $.scrollHeight - $.scrollTop - $.clientHeight;
|
|
1879
|
+
M.current = P <= wo, y(M.current);
|
|
1619
1880
|
}
|
|
1620
|
-
function
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1881
|
+
function C() {
|
|
1882
|
+
const $ = m.current;
|
|
1883
|
+
$ && ($.scrollTo({ top: $.scrollHeight, behavior: "smooth" }), M.current = !0, y(!0));
|
|
1623
1884
|
}
|
|
1624
1885
|
return /* @__PURE__ */ g(
|
|
1625
1886
|
"div",
|
|
1626
1887
|
{
|
|
1627
|
-
className: [
|
|
1628
|
-
style: { height: h, ...
|
|
1629
|
-
|
|
1888
|
+
className: [Ht.root, _].filter(Boolean).join(" "),
|
|
1889
|
+
style: { height: h, ...v },
|
|
1890
|
+
...N,
|
|
1630
1891
|
children: [
|
|
1631
|
-
s ?? /* @__PURE__ */
|
|
1632
|
-
|
|
1892
|
+
s ?? /* @__PURE__ */ i(
|
|
1893
|
+
bo,
|
|
1633
1894
|
{
|
|
1634
1895
|
title: n,
|
|
1635
1896
|
titleAs: e,
|
|
1636
1897
|
avatar: o,
|
|
1637
|
-
expanded:
|
|
1898
|
+
expanded: a,
|
|
1638
1899
|
onExpandToggle: r,
|
|
1639
1900
|
onClose: c,
|
|
1640
1901
|
actions: l
|
|
1641
1902
|
}
|
|
1642
1903
|
),
|
|
1643
|
-
/* @__PURE__ */ g("div", { className:
|
|
1644
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ g("div", { className: Ht.threadWrap, children: [
|
|
1905
|
+
/* @__PURE__ */ i(
|
|
1645
1906
|
Xt,
|
|
1646
1907
|
{
|
|
1647
1908
|
ref: m,
|
|
1648
1909
|
direction: "y",
|
|
1649
1910
|
size: "thin",
|
|
1650
|
-
className:
|
|
1911
|
+
className: Ht.thread,
|
|
1651
1912
|
onScroll: b,
|
|
1652
|
-
children: /* @__PURE__ */
|
|
1913
|
+
children: /* @__PURE__ */ i("div", { className: Ht.threadInner, children: t })
|
|
1653
1914
|
}
|
|
1654
1915
|
),
|
|
1655
|
-
!
|
|
1656
|
-
|
|
1916
|
+
!k && /* @__PURE__ */ i("div", { className: Ht.jump, children: /* @__PURE__ */ i(
|
|
1917
|
+
et,
|
|
1657
1918
|
{
|
|
1658
1919
|
variant: "neutral",
|
|
1659
1920
|
radius: "full",
|
|
1660
1921
|
size: "sm",
|
|
1661
|
-
icon: /* @__PURE__ */
|
|
1662
|
-
"aria-label":
|
|
1663
|
-
onClick:
|
|
1922
|
+
icon: /* @__PURE__ */ i(wn, { size: 15 }),
|
|
1923
|
+
"aria-label": f,
|
|
1924
|
+
onClick: C
|
|
1664
1925
|
}
|
|
1665
1926
|
) })
|
|
1666
1927
|
] }),
|
|
@@ -1670,315 +1931,243 @@ function Qi({
|
|
|
1670
1931
|
}
|
|
1671
1932
|
);
|
|
1672
1933
|
}
|
|
1673
|
-
const
|
|
1674
|
-
root:
|
|
1675
|
-
label:
|
|
1676
|
-
action:
|
|
1934
|
+
const Mo = "_root_15sqm_1", zo = "_label_15sqm_9", Io = "_action_15sqm_20", fe = {
|
|
1935
|
+
root: Mo,
|
|
1936
|
+
label: zo,
|
|
1937
|
+
action: Io
|
|
1677
1938
|
};
|
|
1678
|
-
function
|
|
1679
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
1680
|
-
/* @__PURE__ */
|
|
1681
|
-
n && /* @__PURE__ */
|
|
1939
|
+
function ya({ children: t, action: n, className: e, ...s }) {
|
|
1940
|
+
return /* @__PURE__ */ g("div", { className: [fe.root, e].filter(Boolean).join(" "), ...s, children: [
|
|
1941
|
+
/* @__PURE__ */ i("span", { className: fe.label, children: t }),
|
|
1942
|
+
n && /* @__PURE__ */ i("span", { className: fe.action, children: n })
|
|
1682
1943
|
] });
|
|
1683
1944
|
}
|
|
1684
|
-
const
|
|
1685
|
-
root:
|
|
1686
|
-
leading:
|
|
1687
|
-
meta:
|
|
1688
|
-
hint:
|
|
1689
|
-
divider:
|
|
1690
|
-
shortcut:
|
|
1691
|
-
keys:
|
|
1692
|
-
},
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1945
|
+
const To = "_root_s1zb4_1", Bo = "_leading_s1zb4_11", Ro = "_meta_s1zb4_18", Eo = "_hint_s1zb4_28", Co = "_divider_s1zb4_32", Oo = "_shortcut_s1zb4_39", Po = "_keys_s1zb4_46", Nt = {
|
|
1946
|
+
root: To,
|
|
1947
|
+
leading: Bo,
|
|
1948
|
+
meta: Ro,
|
|
1949
|
+
hint: Eo,
|
|
1950
|
+
divider: Co,
|
|
1951
|
+
shortcut: Oo,
|
|
1952
|
+
keys: Po
|
|
1953
|
+
}, So = [
|
|
1954
|
+
/* @__PURE__ */ i(Mn, { size: 12 }, "shift"),
|
|
1955
|
+
/* @__PURE__ */ i(zn, { size: 12 }, "enter")
|
|
1695
1956
|
];
|
|
1696
|
-
function
|
|
1957
|
+
function ga({
|
|
1697
1958
|
hint: t,
|
|
1698
1959
|
shortcutLabel: n,
|
|
1699
|
-
shortcutKeys: e =
|
|
1960
|
+
shortcutKeys: e = So,
|
|
1700
1961
|
leading: s,
|
|
1701
1962
|
className: o,
|
|
1702
|
-
...
|
|
1963
|
+
...a
|
|
1703
1964
|
}) {
|
|
1704
1965
|
const r = !!n || e.length > 0;
|
|
1705
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
1706
|
-
s && /* @__PURE__ */
|
|
1707
|
-
/* @__PURE__ */ g("div", { className:
|
|
1708
|
-
t && /* @__PURE__ */
|
|
1709
|
-
t && r && /* @__PURE__ */
|
|
1710
|
-
r && /* @__PURE__ */ g("span", { className:
|
|
1711
|
-
n && /* @__PURE__ */
|
|
1712
|
-
/* @__PURE__ */
|
|
1966
|
+
return /* @__PURE__ */ g("div", { className: [Nt.root, o].filter(Boolean).join(" "), ...a, children: [
|
|
1967
|
+
s && /* @__PURE__ */ i("div", { className: Nt.leading, children: s }),
|
|
1968
|
+
/* @__PURE__ */ g("div", { className: Nt.meta, children: [
|
|
1969
|
+
t && /* @__PURE__ */ i("span", { className: Nt.hint, children: t }),
|
|
1970
|
+
t && r && /* @__PURE__ */ i("span", { className: Nt.divider, "aria-hidden": "true" }),
|
|
1971
|
+
r && /* @__PURE__ */ g("span", { className: Nt.shortcut, children: [
|
|
1972
|
+
n && /* @__PURE__ */ i("span", { className: Nt.shortcutLabel, children: n }),
|
|
1973
|
+
/* @__PURE__ */ i("span", { className: Nt.keys, children: e.map((c, l) => /* @__PURE__ */ i(bn, { bg: "bg-field-component", children: c }, l)) })
|
|
1713
1974
|
] })
|
|
1714
1975
|
] })
|
|
1715
1976
|
] });
|
|
1716
1977
|
}
|
|
1717
|
-
const
|
|
1718
|
-
root:
|
|
1719
|
-
selected:
|
|
1720
|
-
label:
|
|
1721
|
-
icon:
|
|
1978
|
+
const jo = "_root_19z6n_1", qo = "_selected_19z6n_38", Lo = "_label_19z6n_48", Ho = "_icon_19z6n_56", Ft = {
|
|
1979
|
+
root: jo,
|
|
1980
|
+
selected: qo,
|
|
1981
|
+
label: Lo,
|
|
1982
|
+
icon: Ho
|
|
1722
1983
|
};
|
|
1723
|
-
function
|
|
1984
|
+
function xa({
|
|
1724
1985
|
children: t,
|
|
1725
1986
|
leftIcon: n,
|
|
1726
1987
|
rightIcon: e,
|
|
1727
1988
|
selected: s = !1,
|
|
1728
1989
|
className: o,
|
|
1729
|
-
...
|
|
1990
|
+
...a
|
|
1730
1991
|
}) {
|
|
1731
|
-
const r = [
|
|
1732
|
-
n && /* @__PURE__ */
|
|
1733
|
-
/* @__PURE__ */
|
|
1734
|
-
e && /* @__PURE__ */
|
|
1992
|
+
const r = [Ft.root, s && Ft.selected, o].filter(Boolean).join(" "), c = /* @__PURE__ */ g(Bt, { children: [
|
|
1993
|
+
n && /* @__PURE__ */ i("span", { className: Ft.icon, children: n }),
|
|
1994
|
+
/* @__PURE__ */ i("span", { className: Ft.label, children: t }),
|
|
1995
|
+
e && /* @__PURE__ */ i("span", { className: Ft.icon, children: e })
|
|
1735
1996
|
] });
|
|
1736
|
-
if (
|
|
1737
|
-
const { href: u, ...h } =
|
|
1738
|
-
return /* @__PURE__ */
|
|
1739
|
-
}
|
|
1740
|
-
const { type: l = "button", ...d } = i;
|
|
1741
|
-
return /* @__PURE__ */ a("button", { className: r, type: l, "aria-current": s ? "true" : void 0, ...d, children: c });
|
|
1742
|
-
}
|
|
1743
|
-
const mo = "_menu_dpnsn_2", _o = "_menuVisible_dpnsn_21", yo = "_menuClip_dpnsn_29", go = "_menuSize_dpnsn_35", xo = "_menuContent_dpnsn_42", bo = "_menuFade_dpnsn_69", vo = "_scrollHint_dpnsn_74", vt = {
|
|
1744
|
-
menu: mo,
|
|
1745
|
-
menuVisible: _o,
|
|
1746
|
-
menuClip: yo,
|
|
1747
|
-
menuSize: go,
|
|
1748
|
-
menuContent: xo,
|
|
1749
|
-
menuFade: bo,
|
|
1750
|
-
scrollHint: vo
|
|
1751
|
-
}, en = he(
|
|
1752
|
-
function({ menu: n, id: e, label: s = "Add to prompt", maxHeight: o = 240, disabled: i = !1, restoreFocusRef: r }, c) {
|
|
1753
|
-
const l = H(null), d = H(null), u = H(null), [h, f] = st(!1), [p, _] = st(), [x, $] = st(n), m = n != null && n !== !1;
|
|
1754
|
-
K(() => {
|
|
1755
|
-
var y;
|
|
1756
|
-
m && $(n), l.current && (!m && l.current.contains(document.activeElement) && ((y = r.current) == null || y.focus()), l.current.inert = !m || i);
|
|
1757
|
-
}, [n, m, i, r]), Le(() => {
|
|
1758
|
-
const y = d.current;
|
|
1759
|
-
if (!y) return;
|
|
1760
|
-
function b() {
|
|
1761
|
-
y && (_(y.getBoundingClientRect().height), A(y));
|
|
1762
|
-
}
|
|
1763
|
-
b();
|
|
1764
|
-
const P = new ResizeObserver(b);
|
|
1765
|
-
return P.observe(y), u.current && P.observe(u.current), () => P.disconnect();
|
|
1766
|
-
}, [x, o]);
|
|
1767
|
-
function A(y) {
|
|
1768
|
-
f(y.scrollHeight - y.clientHeight - y.scrollTop > 1);
|
|
1769
|
-
}
|
|
1770
|
-
function v(y) {
|
|
1771
|
-
l.current = y, typeof c == "function" ? c(y) : c && (c.current = y);
|
|
1772
|
-
}
|
|
1773
|
-
return /* @__PURE__ */ a(
|
|
1774
|
-
"div",
|
|
1775
|
-
{
|
|
1776
|
-
ref: v,
|
|
1777
|
-
id: e,
|
|
1778
|
-
role: "region",
|
|
1779
|
-
"aria-label": s,
|
|
1780
|
-
"aria-hidden": !m,
|
|
1781
|
-
className: [vt.menu, m && vt.menuVisible].filter(Boolean).join(" "),
|
|
1782
|
-
onTransitionEnd: (y) => {
|
|
1783
|
-
y.target === y.currentTarget && y.propertyName === "grid-template-rows" && !m && $(null);
|
|
1784
|
-
},
|
|
1785
|
-
children: /* @__PURE__ */ a("div", { className: vt.menuClip, children: /* @__PURE__ */ g("div", { className: vt.menuSize, style: { height: p }, children: [
|
|
1786
|
-
/* @__PURE__ */ a(
|
|
1787
|
-
Xt,
|
|
1788
|
-
{
|
|
1789
|
-
ref: d,
|
|
1790
|
-
direction: "y",
|
|
1791
|
-
size: "thin",
|
|
1792
|
-
className: [vt.menuContent, h && vt.menuFade].filter(Boolean).join(" "),
|
|
1793
|
-
onScroll: (y) => A(y.currentTarget),
|
|
1794
|
-
style: {
|
|
1795
|
-
maxHeight: `min(${typeof o == "number" ? `${o}px` : o}, 50dvh)`
|
|
1796
|
-
},
|
|
1797
|
-
children: /* @__PURE__ */ a("div", { ref: u, children: x })
|
|
1798
|
-
}
|
|
1799
|
-
),
|
|
1800
|
-
m && h && /* @__PURE__ */ a("span", { className: vt.scrollHint, "aria-hidden": !0, children: /* @__PURE__ */ a(gn, { size: 14 }) })
|
|
1801
|
-
] }) })
|
|
1802
|
-
}
|
|
1803
|
-
);
|
|
1997
|
+
if (a.href !== void 0) {
|
|
1998
|
+
const { href: u, ...h } = a;
|
|
1999
|
+
return /* @__PURE__ */ i("a", { className: r, href: u, "aria-current": s ? "true" : void 0, ...h, children: c });
|
|
1804
2000
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
field: Mo,
|
|
1821
|
-
textarea: wo,
|
|
1822
|
-
stop: Io,
|
|
1823
|
-
footer: zo,
|
|
1824
|
-
actions: Ro,
|
|
1825
|
-
disabled: To
|
|
1826
|
-
}, Ji = he(
|
|
2001
|
+
const { type: l = "button", ...d } = a;
|
|
2002
|
+
return /* @__PURE__ */ i("button", { className: r, type: l, "aria-current": s ? "true" : void 0, ...d, children: c });
|
|
2003
|
+
}
|
|
2004
|
+
const Fo = "_root_193n0_1", Do = "_dragging_193n0_21", Yo = "_srOnly_193n0_26", Uo = "_references_193n0_37", Xo = "_field_193n0_44", Go = "_textarea_193n0_49", Wo = "_stop_193n0_77", Qo = "_footer_193n0_81", Vo = "_actions_193n0_88", Ko = "_disabled_193n0_95", pt = {
|
|
2005
|
+
root: Fo,
|
|
2006
|
+
dragging: Do,
|
|
2007
|
+
srOnly: Yo,
|
|
2008
|
+
references: Uo,
|
|
2009
|
+
field: Xo,
|
|
2010
|
+
textarea: Go,
|
|
2011
|
+
stop: Wo,
|
|
2012
|
+
footer: Qo,
|
|
2013
|
+
actions: Vo,
|
|
2014
|
+
disabled: Ko
|
|
2015
|
+
}, ba = ee(
|
|
1827
2016
|
function({
|
|
1828
2017
|
value: n,
|
|
1829
2018
|
defaultValue: e = "",
|
|
1830
2019
|
onValueChange: s,
|
|
1831
2020
|
onSubmit: o,
|
|
1832
|
-
placeholder:
|
|
2021
|
+
placeholder: a = "Ask anything…",
|
|
1833
2022
|
references: r,
|
|
1834
2023
|
leading: c,
|
|
1835
2024
|
menu: l,
|
|
1836
2025
|
menuLabel: d = "Add to prompt",
|
|
1837
2026
|
menuMaxHeight: u = 240,
|
|
1838
2027
|
onMenuClose: h,
|
|
1839
|
-
onAdd:
|
|
1840
|
-
addLabel:
|
|
2028
|
+
onAdd: p,
|
|
2029
|
+
addLabel: f = "Add",
|
|
1841
2030
|
trailing: _,
|
|
1842
|
-
submit:
|
|
1843
|
-
submitIcon:
|
|
2031
|
+
submit: v,
|
|
2032
|
+
submitIcon: N,
|
|
1844
2033
|
submitLabel: m = "Send",
|
|
1845
|
-
onStop:
|
|
1846
|
-
stopIcon:
|
|
2034
|
+
onStop: M,
|
|
2035
|
+
stopIcon: k,
|
|
1847
2036
|
stopLabel: y = "Stop",
|
|
1848
2037
|
loading: b = !1,
|
|
1849
|
-
submitOnEnter:
|
|
1850
|
-
maxHeight:
|
|
1851
|
-
onFilesDrop:
|
|
1852
|
-
dropLabel:
|
|
1853
|
-
disabled:
|
|
1854
|
-
className:
|
|
1855
|
-
onKeyDown:
|
|
1856
|
-
onPaste:
|
|
1857
|
-
...
|
|
1858
|
-
},
|
|
1859
|
-
const [
|
|
1860
|
-
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1863
|
-
}, [
|
|
1864
|
-
function
|
|
1865
|
-
|
|
2038
|
+
submitOnEnter: C = !0,
|
|
2039
|
+
maxHeight: $ = "160px",
|
|
2040
|
+
onFilesDrop: P,
|
|
2041
|
+
dropLabel: q = "Drop files to attach them",
|
|
2042
|
+
disabled: L = !1,
|
|
2043
|
+
className: I,
|
|
2044
|
+
onKeyDown: Q,
|
|
2045
|
+
onPaste: O,
|
|
2046
|
+
...H
|
|
2047
|
+
}, R) {
|
|
2048
|
+
const [V, F] = Rt(n, e, s), nt = St(), U = l != null && l !== !1, [G, K] = at(!1), x = D(null), j = D(0), S = V.trim().length > 0 && !L && !b, Y = b && !!M;
|
|
2049
|
+
ve(() => {
|
|
2050
|
+
const B = x.current;
|
|
2051
|
+
B && (B.style.height = "auto", B.style.height = `${B.scrollHeight}px`);
|
|
2052
|
+
}, [V]);
|
|
2053
|
+
function E(B) {
|
|
2054
|
+
x.current = B, typeof R == "function" ? R(B) : R && (R.current = B);
|
|
1866
2055
|
}
|
|
1867
|
-
function
|
|
1868
|
-
F(
|
|
2056
|
+
function lt(B) {
|
|
2057
|
+
F(B.target.value);
|
|
1869
2058
|
}
|
|
1870
|
-
function
|
|
1871
|
-
S && (o == null || o(
|
|
2059
|
+
function ht() {
|
|
2060
|
+
S && (o == null || o(V.trim()), F(""));
|
|
1872
2061
|
}
|
|
1873
|
-
const
|
|
1874
|
-
function
|
|
1875
|
-
|
|
2062
|
+
const it = !!P && !L;
|
|
2063
|
+
function kt(B) {
|
|
2064
|
+
it && (B.preventDefault(), j.current += 1, K(!0));
|
|
1876
2065
|
}
|
|
1877
|
-
function
|
|
1878
|
-
|
|
2066
|
+
function ie(B) {
|
|
2067
|
+
it && (B.preventDefault(), B.dataTransfer.dropEffect = "copy");
|
|
1879
2068
|
}
|
|
1880
|
-
function
|
|
1881
|
-
|
|
2069
|
+
function Vt(B) {
|
|
2070
|
+
it && (B.preventDefault(), j.current = Math.max(0, j.current - 1), j.current === 0 && K(!1));
|
|
1882
2071
|
}
|
|
1883
|
-
function
|
|
1884
|
-
if (!
|
|
1885
|
-
|
|
1886
|
-
const
|
|
1887
|
-
|
|
2072
|
+
function gt(B) {
|
|
2073
|
+
if (!it) return;
|
|
2074
|
+
B.preventDefault(), j.current = 0, K(!1);
|
|
2075
|
+
const At = Array.from(B.dataTransfer.files);
|
|
2076
|
+
At.length > 0 && (P == null || P(At));
|
|
1888
2077
|
}
|
|
1889
|
-
function
|
|
1890
|
-
if (
|
|
1891
|
-
const
|
|
1892
|
-
|
|
2078
|
+
function Kt(B) {
|
|
2079
|
+
if (O == null || O(B), !it || B.defaultPrevented) return;
|
|
2080
|
+
const At = Array.from(B.clipboardData.files);
|
|
2081
|
+
At.length > 0 && (B.preventDefault(), P == null || P(At));
|
|
1893
2082
|
}
|
|
1894
|
-
function
|
|
1895
|
-
|
|
2083
|
+
function jt(B) {
|
|
2084
|
+
Q == null || Q(B), !B.defaultPrevented && C && B.key === "Enter" && !B.shiftKey && (B.preventDefault(), ht());
|
|
1896
2085
|
}
|
|
1897
2086
|
return /* @__PURE__ */ g(
|
|
1898
2087
|
"div",
|
|
1899
2088
|
{
|
|
1900
2089
|
className: [
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
2090
|
+
pt.root,
|
|
2091
|
+
G && pt.dragging,
|
|
2092
|
+
L && pt.disabled,
|
|
2093
|
+
I
|
|
1905
2094
|
].filter(Boolean).join(" "),
|
|
1906
|
-
onKeyDown: (
|
|
1907
|
-
|
|
2095
|
+
onKeyDown: (B) => {
|
|
2096
|
+
B.key === "Escape" && !B.defaultPrevented && U && h && (B.preventDefault(), h());
|
|
1908
2097
|
},
|
|
1909
|
-
onDragEnter:
|
|
1910
|
-
onDragOver:
|
|
1911
|
-
onDragLeave:
|
|
1912
|
-
onDrop:
|
|
2098
|
+
onDragEnter: kt,
|
|
2099
|
+
onDragOver: ie,
|
|
2100
|
+
onDragLeave: Vt,
|
|
2101
|
+
onDrop: gt,
|
|
1913
2102
|
children: [
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
1916
|
-
|
|
2103
|
+
/* @__PURE__ */ i("span", { className: pt.srOnly, "aria-live": "polite", children: G ? q : "" }),
|
|
2104
|
+
/* @__PURE__ */ i(
|
|
2105
|
+
we,
|
|
1917
2106
|
{
|
|
1918
|
-
id:
|
|
2107
|
+
id: nt,
|
|
1919
2108
|
menu: l,
|
|
1920
2109
|
label: d,
|
|
1921
2110
|
maxHeight: u,
|
|
1922
|
-
disabled:
|
|
1923
|
-
restoreFocusRef:
|
|
2111
|
+
disabled: L,
|
|
2112
|
+
restoreFocusRef: x
|
|
1924
2113
|
}
|
|
1925
2114
|
),
|
|
1926
|
-
r && /* @__PURE__ */
|
|
1927
|
-
/* @__PURE__ */
|
|
2115
|
+
r && /* @__PURE__ */ i("div", { className: pt.references, children: r }),
|
|
2116
|
+
/* @__PURE__ */ i(Xt, { direction: "y", size: "thin", maxHeight: $, className: pt.field, children: /* @__PURE__ */ i(
|
|
1928
2117
|
"textarea",
|
|
1929
2118
|
{
|
|
1930
|
-
ref:
|
|
1931
|
-
className:
|
|
2119
|
+
ref: E,
|
|
2120
|
+
className: pt.textarea,
|
|
1932
2121
|
rows: 1,
|
|
1933
|
-
value:
|
|
1934
|
-
placeholder:
|
|
1935
|
-
disabled:
|
|
1936
|
-
onChange:
|
|
1937
|
-
onKeyDown:
|
|
1938
|
-
onPaste:
|
|
1939
|
-
...
|
|
2122
|
+
value: V,
|
|
2123
|
+
placeholder: a,
|
|
2124
|
+
disabled: L,
|
|
2125
|
+
onChange: lt,
|
|
2126
|
+
onKeyDown: jt,
|
|
2127
|
+
onPaste: Kt,
|
|
2128
|
+
...H
|
|
1940
2129
|
}
|
|
1941
2130
|
) }),
|
|
1942
|
-
/* @__PURE__ */ g("div", { className:
|
|
1943
|
-
/* @__PURE__ */
|
|
1944
|
-
/* @__PURE__ */ g("div", { className:
|
|
2131
|
+
/* @__PURE__ */ g("div", { className: pt.footer, children: [
|
|
2132
|
+
/* @__PURE__ */ i("div", { className: pt.actions, children: c }),
|
|
2133
|
+
/* @__PURE__ */ g("div", { className: pt.actions, children: [
|
|
1945
2134
|
_,
|
|
1946
|
-
|
|
1947
|
-
|
|
2135
|
+
p && /* @__PURE__ */ i(
|
|
2136
|
+
et,
|
|
1948
2137
|
{
|
|
1949
2138
|
variant: "transparent",
|
|
1950
2139
|
radius: "full",
|
|
1951
2140
|
size: "sm",
|
|
1952
|
-
icon: /* @__PURE__ */
|
|
1953
|
-
"aria-label":
|
|
1954
|
-
"aria-expanded":
|
|
1955
|
-
"aria-controls":
|
|
1956
|
-
disabled:
|
|
1957
|
-
onClick:
|
|
2141
|
+
icon: /* @__PURE__ */ i(ke, { size: 18 }),
|
|
2142
|
+
"aria-label": f,
|
|
2143
|
+
"aria-expanded": U,
|
|
2144
|
+
"aria-controls": nt,
|
|
2145
|
+
disabled: L,
|
|
2146
|
+
onClick: p
|
|
1958
2147
|
}
|
|
1959
2148
|
),
|
|
1960
|
-
|
|
1961
|
-
|
|
2149
|
+
v ?? (Y ? /* @__PURE__ */ i(
|
|
2150
|
+
et,
|
|
1962
2151
|
{
|
|
1963
2152
|
variant: "neutral",
|
|
1964
2153
|
radius: "full",
|
|
1965
2154
|
size: "sm",
|
|
1966
|
-
className:
|
|
1967
|
-
icon:
|
|
2155
|
+
className: pt.stop,
|
|
2156
|
+
icon: k ?? /* @__PURE__ */ i(In, { size: 12, fill: "currentColor" }),
|
|
1968
2157
|
"aria-label": y,
|
|
1969
|
-
onClick:
|
|
2158
|
+
onClick: M
|
|
1970
2159
|
}
|
|
1971
|
-
) : /* @__PURE__ */
|
|
1972
|
-
|
|
2160
|
+
) : /* @__PURE__ */ i(
|
|
2161
|
+
et,
|
|
1973
2162
|
{
|
|
1974
2163
|
variant: "inverted",
|
|
1975
2164
|
radius: "full",
|
|
1976
2165
|
size: "sm",
|
|
1977
|
-
icon:
|
|
2166
|
+
icon: N ?? /* @__PURE__ */ i(Ze, { size: 15 }),
|
|
1978
2167
|
"aria-label": m,
|
|
1979
2168
|
disabled: !S,
|
|
1980
2169
|
loading: b,
|
|
1981
|
-
onClick:
|
|
2170
|
+
onClick: ht
|
|
1982
2171
|
}
|
|
1983
2172
|
))
|
|
1984
2173
|
] })
|
|
@@ -1987,111 +2176,111 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
1987
2176
|
}
|
|
1988
2177
|
);
|
|
1989
2178
|
}
|
|
1990
|
-
),
|
|
1991
|
-
root:
|
|
1992
|
-
expanded:
|
|
1993
|
-
promptRow:
|
|
1994
|
-
references:
|
|
1995
|
-
referencesVisible:
|
|
1996
|
-
referencesClip:
|
|
1997
|
-
referencesRow:
|
|
1998
|
-
closing:
|
|
1999
|
-
disabled:
|
|
2000
|
-
avatar:
|
|
2001
|
-
input:
|
|
2002
|
-
actions:
|
|
2003
|
-
divider:
|
|
2004
|
-
},
|
|
2179
|
+
), Zo = "_root_6xqta_30", Jo = "_expanded_6xqta_50", tr = "_promptRow_6xqta_54", er = "_references_6xqta_62", nr = "_referencesVisible_6xqta_73", sr = "_referencesClip_6xqta_79", or = "_referencesRow_6xqta_84", rr = "_closing_6xqta_90", ir = "_disabled_6xqta_124", ar = "_avatar_6xqta_129", cr = "_input_6xqta_136", lr = "_actions_6xqta_154", dr = "_divider_6xqta_161", ut = {
|
|
2180
|
+
root: Zo,
|
|
2181
|
+
expanded: Jo,
|
|
2182
|
+
promptRow: tr,
|
|
2183
|
+
references: er,
|
|
2184
|
+
referencesVisible: nr,
|
|
2185
|
+
referencesClip: sr,
|
|
2186
|
+
referencesRow: or,
|
|
2187
|
+
closing: rr,
|
|
2188
|
+
disabled: ir,
|
|
2189
|
+
avatar: ar,
|
|
2190
|
+
input: cr,
|
|
2191
|
+
actions: lr,
|
|
2192
|
+
divider: dr
|
|
2193
|
+
}, va = ee(
|
|
2005
2194
|
function({
|
|
2006
2195
|
value: n,
|
|
2007
2196
|
open: e = !0,
|
|
2008
2197
|
defaultValue: s = "",
|
|
2009
2198
|
onValueChange: o,
|
|
2010
|
-
onSubmit:
|
|
2199
|
+
onSubmit: a,
|
|
2011
2200
|
placeholder: r = "Work with Novi",
|
|
2012
2201
|
avatar: c,
|
|
2013
2202
|
noviProps: l,
|
|
2014
2203
|
references: d,
|
|
2015
2204
|
actions: u,
|
|
2016
2205
|
menu: h,
|
|
2017
|
-
menuLabel:
|
|
2018
|
-
menuMaxHeight:
|
|
2206
|
+
menuLabel: p = "Add to prompt",
|
|
2207
|
+
menuMaxHeight: f = 240,
|
|
2019
2208
|
onMenuClose: _,
|
|
2020
|
-
onAdd:
|
|
2021
|
-
onVoice:
|
|
2209
|
+
onAdd: v,
|
|
2210
|
+
onVoice: N,
|
|
2022
2211
|
onOpen: m,
|
|
2023
|
-
addLabel:
|
|
2024
|
-
voiceLabel:
|
|
2212
|
+
addLabel: M = "Add",
|
|
2213
|
+
voiceLabel: k = "Use voice",
|
|
2025
2214
|
openLabel: y = "Open assistant",
|
|
2026
2215
|
disabled: b = !1,
|
|
2027
|
-
className:
|
|
2028
|
-
onKeyDown:
|
|
2029
|
-
...
|
|
2030
|
-
},
|
|
2031
|
-
const [
|
|
2032
|
-
|
|
2033
|
-
e ? (
|
|
2034
|
-
}, [e,
|
|
2216
|
+
className: C,
|
|
2217
|
+
onKeyDown: $,
|
|
2218
|
+
...P
|
|
2219
|
+
}, q) {
|
|
2220
|
+
const [L, I] = Rt(n, s, o), [Q, O] = at(e), [H, R] = at(!1), [V, F] = at(d), nt = St(), U = D(null), G = h != null && h !== !1, K = D(null);
|
|
2221
|
+
tt(() => {
|
|
2222
|
+
e ? (O(!0), R(!1)) : Q && R(!0);
|
|
2223
|
+
}, [e, Q]), tt(() => {
|
|
2035
2224
|
d != null && d !== !1 && F(d);
|
|
2036
2225
|
}, [d]);
|
|
2037
|
-
function
|
|
2038
|
-
|
|
2226
|
+
function x(E) {
|
|
2227
|
+
K.current = E, typeof q == "function" ? q(E) : q && (q.current = E);
|
|
2039
2228
|
}
|
|
2040
|
-
function
|
|
2041
|
-
|
|
2229
|
+
function j(E) {
|
|
2230
|
+
I(E.target.value);
|
|
2042
2231
|
}
|
|
2043
|
-
const S = !!(u ||
|
|
2044
|
-
return
|
|
2232
|
+
const S = !!(u || v || N || m), Y = d != null && d !== !1;
|
|
2233
|
+
return Q ? /* @__PURE__ */ g(
|
|
2045
2234
|
"form",
|
|
2046
2235
|
{
|
|
2047
2236
|
className: [
|
|
2048
|
-
|
|
2049
|
-
(
|
|
2050
|
-
|
|
2051
|
-
b &&
|
|
2052
|
-
|
|
2237
|
+
ut.root,
|
|
2238
|
+
(Y || G) && ut.expanded,
|
|
2239
|
+
H && ut.closing,
|
|
2240
|
+
b && ut.disabled,
|
|
2241
|
+
C
|
|
2053
2242
|
].filter(Boolean).join(" "),
|
|
2054
|
-
onKeyDown: (
|
|
2055
|
-
|
|
2243
|
+
onKeyDown: (E) => {
|
|
2244
|
+
E.key === "Escape" && !E.defaultPrevented && G && _ && (E.preventDefault(), _());
|
|
2056
2245
|
},
|
|
2057
|
-
onAnimationEnd: (
|
|
2058
|
-
|
|
2246
|
+
onAnimationEnd: (E) => {
|
|
2247
|
+
E.target === E.currentTarget && H && O(!1);
|
|
2059
2248
|
},
|
|
2060
|
-
onSubmit: (
|
|
2061
|
-
var
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
if (
|
|
2065
|
-
const
|
|
2066
|
-
(
|
|
2249
|
+
onSubmit: (E) => {
|
|
2250
|
+
var it, kt;
|
|
2251
|
+
E.preventDefault();
|
|
2252
|
+
const lt = L.trim();
|
|
2253
|
+
if (E.target !== E.currentTarget || !lt || b) return;
|
|
2254
|
+
const ht = E.nativeEvent.submitter;
|
|
2255
|
+
(it = U.current) != null && it.contains(document.activeElement) || ht && ((kt = U.current) != null && kt.contains(ht)) || (a == null || a(lt), I(""));
|
|
2067
2256
|
},
|
|
2068
2257
|
children: [
|
|
2069
|
-
/* @__PURE__ */
|
|
2070
|
-
|
|
2258
|
+
/* @__PURE__ */ i(
|
|
2259
|
+
we,
|
|
2071
2260
|
{
|
|
2072
|
-
ref:
|
|
2073
|
-
id:
|
|
2261
|
+
ref: U,
|
|
2262
|
+
id: nt,
|
|
2074
2263
|
menu: h,
|
|
2075
|
-
label:
|
|
2076
|
-
maxHeight:
|
|
2264
|
+
label: p,
|
|
2265
|
+
maxHeight: f,
|
|
2077
2266
|
disabled: b,
|
|
2078
|
-
restoreFocusRef:
|
|
2267
|
+
restoreFocusRef: K
|
|
2079
2268
|
}
|
|
2080
2269
|
),
|
|
2081
|
-
/* @__PURE__ */
|
|
2270
|
+
/* @__PURE__ */ i(
|
|
2082
2271
|
"div",
|
|
2083
2272
|
{
|
|
2084
|
-
className: [
|
|
2085
|
-
"aria-hidden": !
|
|
2086
|
-
onTransitionEnd: (
|
|
2087
|
-
|
|
2273
|
+
className: [ut.references, Y && ut.referencesVisible].filter(Boolean).join(" "),
|
|
2274
|
+
"aria-hidden": !Y,
|
|
2275
|
+
onTransitionEnd: (E) => {
|
|
2276
|
+
E.propertyName === "grid-template-rows" && !Y && F(null);
|
|
2088
2277
|
},
|
|
2089
|
-
children: /* @__PURE__ */
|
|
2278
|
+
children: /* @__PURE__ */ i("div", { className: ut.referencesClip, children: /* @__PURE__ */ i("div", { className: ut.referencesRow, children: V }) })
|
|
2090
2279
|
}
|
|
2091
2280
|
),
|
|
2092
|
-
/* @__PURE__ */ g("div", { className:
|
|
2093
|
-
/* @__PURE__ */
|
|
2094
|
-
|
|
2281
|
+
/* @__PURE__ */ g("div", { className: ut.promptRow, children: [
|
|
2282
|
+
/* @__PURE__ */ i("span", { className: ut.avatar, "aria-hidden": !0, children: c ?? /* @__PURE__ */ i(
|
|
2283
|
+
Qt,
|
|
2095
2284
|
{
|
|
2096
2285
|
size: 28,
|
|
2097
2286
|
expression: "happy",
|
|
@@ -2100,60 +2289,60 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
2100
2289
|
...l
|
|
2101
2290
|
}
|
|
2102
2291
|
) }),
|
|
2103
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ i(
|
|
2104
2293
|
"input",
|
|
2105
2294
|
{
|
|
2106
|
-
...
|
|
2107
|
-
ref:
|
|
2295
|
+
...P,
|
|
2296
|
+
ref: x,
|
|
2108
2297
|
type: "text",
|
|
2109
|
-
className:
|
|
2110
|
-
value:
|
|
2298
|
+
className: ut.input,
|
|
2299
|
+
value: L,
|
|
2111
2300
|
placeholder: r,
|
|
2112
2301
|
disabled: b,
|
|
2113
|
-
onChange:
|
|
2114
|
-
onKeyDown: (
|
|
2115
|
-
var
|
|
2116
|
-
|
|
2302
|
+
onChange: j,
|
|
2303
|
+
onKeyDown: (E) => {
|
|
2304
|
+
var lt;
|
|
2305
|
+
$ == null || $(E), !E.defaultPrevented && E.key === "Enter" && !E.nativeEvent.isComposing && (E.preventDefault(), (lt = E.currentTarget.form) == null || lt.requestSubmit());
|
|
2117
2306
|
}
|
|
2118
2307
|
}
|
|
2119
2308
|
),
|
|
2120
|
-
S && /* @__PURE__ */ g("div", { className:
|
|
2309
|
+
S && /* @__PURE__ */ g("div", { className: ut.actions, children: [
|
|
2121
2310
|
u,
|
|
2122
|
-
|
|
2123
|
-
|
|
2311
|
+
v && /* @__PURE__ */ i(
|
|
2312
|
+
et,
|
|
2124
2313
|
{
|
|
2125
2314
|
variant: "transparent",
|
|
2126
2315
|
radius: "full",
|
|
2127
2316
|
size: "sm",
|
|
2128
|
-
"aria-expanded":
|
|
2129
|
-
"aria-controls":
|
|
2130
|
-
icon: /* @__PURE__ */
|
|
2131
|
-
"aria-label":
|
|
2317
|
+
"aria-expanded": G,
|
|
2318
|
+
"aria-controls": nt,
|
|
2319
|
+
icon: /* @__PURE__ */ i(ke, { size: 18 }),
|
|
2320
|
+
"aria-label": M,
|
|
2132
2321
|
disabled: b,
|
|
2133
|
-
onClick:
|
|
2322
|
+
onClick: v
|
|
2134
2323
|
}
|
|
2135
2324
|
),
|
|
2136
|
-
|
|
2137
|
-
|
|
2325
|
+
N && /* @__PURE__ */ i(
|
|
2326
|
+
et,
|
|
2138
2327
|
{
|
|
2139
2328
|
variant: "transparent",
|
|
2140
2329
|
radius: "full",
|
|
2141
2330
|
size: "sm",
|
|
2142
|
-
icon: /* @__PURE__ */
|
|
2143
|
-
"aria-label":
|
|
2331
|
+
icon: /* @__PURE__ */ i(Ke, { size: 18 }),
|
|
2332
|
+
"aria-label": k,
|
|
2144
2333
|
disabled: b,
|
|
2145
|
-
onClick:
|
|
2334
|
+
onClick: N
|
|
2146
2335
|
}
|
|
2147
2336
|
),
|
|
2148
|
-
m && /* @__PURE__ */ g(
|
|
2149
|
-
/* @__PURE__ */
|
|
2150
|
-
/* @__PURE__ */
|
|
2151
|
-
|
|
2337
|
+
m && /* @__PURE__ */ g(Bt, { children: [
|
|
2338
|
+
/* @__PURE__ */ i("span", { className: ut.divider, "aria-hidden": !0 }),
|
|
2339
|
+
/* @__PURE__ */ i(
|
|
2340
|
+
et,
|
|
2152
2341
|
{
|
|
2153
2342
|
variant: "transparent",
|
|
2154
2343
|
radius: "full",
|
|
2155
2344
|
size: "sm",
|
|
2156
|
-
icon: /* @__PURE__ */
|
|
2345
|
+
icon: /* @__PURE__ */ i(Tn, { size: 18 }),
|
|
2157
2346
|
"aria-label": y,
|
|
2158
2347
|
disabled: b,
|
|
2159
2348
|
onClick: m
|
|
@@ -2166,440 +2355,440 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
2166
2355
|
}
|
|
2167
2356
|
) : null;
|
|
2168
2357
|
}
|
|
2169
|
-
),
|
|
2170
|
-
root:
|
|
2171
|
-
image:
|
|
2172
|
-
base:
|
|
2173
|
-
small:
|
|
2174
|
-
button:
|
|
2358
|
+
), ur = "_root_1deeq_1", hr = "_image_1deeq_11", fr = "_base_1deeq_18", pr = "_small_1deeq_23", _r = "_button_1deeq_29", Dt = {
|
|
2359
|
+
root: ur,
|
|
2360
|
+
image: hr,
|
|
2361
|
+
base: fr,
|
|
2362
|
+
small: pr,
|
|
2363
|
+
button: _r
|
|
2175
2364
|
};
|
|
2176
|
-
function
|
|
2365
|
+
function mr({
|
|
2177
2366
|
images: t,
|
|
2178
2367
|
onImageClick: n,
|
|
2179
2368
|
size: e = "base",
|
|
2180
2369
|
className: s,
|
|
2181
2370
|
...o
|
|
2182
2371
|
}) {
|
|
2183
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
2184
|
-
(
|
|
2372
|
+
return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: [Dt.root, Dt[e], s].filter(Boolean).join(" "), ...o, children: t.map(
|
|
2373
|
+
(a, r) => n ? /* @__PURE__ */ i(
|
|
2185
2374
|
"button",
|
|
2186
2375
|
{
|
|
2187
2376
|
type: "button",
|
|
2188
|
-
className:
|
|
2189
|
-
"aria-label":
|
|
2377
|
+
className: Dt.button,
|
|
2378
|
+
"aria-label": a.alt || `Open image ${r + 1} of ${t.length}`,
|
|
2190
2379
|
onClick: () => n(r),
|
|
2191
|
-
children: /* @__PURE__ */
|
|
2380
|
+
children: /* @__PURE__ */ i("img", { className: Dt.image, src: a.src, alt: a.alt ?? "" })
|
|
2192
2381
|
},
|
|
2193
|
-
`${
|
|
2194
|
-
) : /* @__PURE__ */
|
|
2382
|
+
`${a.src}-${r}`
|
|
2383
|
+
) : /* @__PURE__ */ i(
|
|
2195
2384
|
"img",
|
|
2196
2385
|
{
|
|
2197
|
-
className:
|
|
2198
|
-
src:
|
|
2199
|
-
alt:
|
|
2386
|
+
className: Dt.image,
|
|
2387
|
+
src: a.src,
|
|
2388
|
+
alt: a.alt ?? ""
|
|
2200
2389
|
},
|
|
2201
|
-
`${
|
|
2390
|
+
`${a.src}-${r}`
|
|
2202
2391
|
)
|
|
2203
2392
|
) });
|
|
2204
2393
|
}
|
|
2205
|
-
const
|
|
2206
|
-
pill:
|
|
2207
|
-
root:
|
|
2208
|
-
header:
|
|
2209
|
-
title:
|
|
2210
|
-
prefix:
|
|
2211
|
-
mark:
|
|
2212
|
-
error:
|
|
2213
|
-
body:
|
|
2394
|
+
const yr = "_pill_1o1q3_2", gr = "_root_1o1q3_29", xr = "_header_1o1q3_39", br = "_title_1o1q3_50", vr = "_prefix_1o1q3_54", kr = "_mark_1o1q3_60", Nr = "_error_1o1q3_67", $r = "_body_1o1q3_78", _t = {
|
|
2395
|
+
pill: yr,
|
|
2396
|
+
root: gr,
|
|
2397
|
+
header: xr,
|
|
2398
|
+
title: br,
|
|
2399
|
+
prefix: vr,
|
|
2400
|
+
mark: kr,
|
|
2401
|
+
error: Nr,
|
|
2402
|
+
body: $r
|
|
2214
2403
|
};
|
|
2215
|
-
function
|
|
2404
|
+
function ka({
|
|
2216
2405
|
title: t,
|
|
2217
2406
|
children: n,
|
|
2218
2407
|
icon: e,
|
|
2219
2408
|
prefix: s,
|
|
2220
2409
|
tone: o = "default",
|
|
2221
|
-
open:
|
|
2410
|
+
open: a,
|
|
2222
2411
|
defaultOpen: r = !1,
|
|
2223
2412
|
onOpenChange: c,
|
|
2224
2413
|
maxBodyHeight: l,
|
|
2225
2414
|
expandLabel: d = "Open",
|
|
2226
2415
|
collapseLabel: u = "Collapse",
|
|
2227
2416
|
className: h,
|
|
2228
|
-
...
|
|
2417
|
+
...p
|
|
2229
2418
|
}) {
|
|
2230
|
-
const [
|
|
2231
|
-
return
|
|
2232
|
-
/* @__PURE__ */ g("div", { className:
|
|
2233
|
-
|
|
2234
|
-
/* @__PURE__ */
|
|
2235
|
-
/* @__PURE__ */
|
|
2236
|
-
|
|
2419
|
+
const [f, _] = Rt(a, r, c), v = e && /* @__PURE__ */ i("span", { className: [_t.mark, o === "error" && _t.error].filter(Boolean).join(" "), children: e });
|
|
2420
|
+
return f ? /* @__PURE__ */ g("div", { className: [_t.root, h].filter(Boolean).join(" "), ...p, children: [
|
|
2421
|
+
/* @__PURE__ */ g("div", { className: _t.header, children: [
|
|
2422
|
+
v,
|
|
2423
|
+
/* @__PURE__ */ i("span", { className: _t.title, children: t }),
|
|
2424
|
+
/* @__PURE__ */ i(
|
|
2425
|
+
et,
|
|
2237
2426
|
{
|
|
2238
2427
|
variant: "transparent",
|
|
2239
2428
|
size: "2xsmall",
|
|
2240
|
-
icon: /* @__PURE__ */
|
|
2429
|
+
icon: /* @__PURE__ */ i(Bn, { size: 15 }),
|
|
2241
2430
|
"aria-label": u,
|
|
2242
2431
|
"aria-expanded": !0,
|
|
2243
|
-
onClick: () => _(!
|
|
2432
|
+
onClick: () => _(!f)
|
|
2244
2433
|
}
|
|
2245
2434
|
)
|
|
2246
2435
|
] }),
|
|
2247
|
-
l ? /* @__PURE__ */
|
|
2436
|
+
l ? /* @__PURE__ */ i(Xt, { direction: "y", size: "thin", maxHeight: l, className: _t.body, children: n }) : /* @__PURE__ */ i("div", { className: _t.body, children: n })
|
|
2248
2437
|
] }) : /* @__PURE__ */ g(
|
|
2249
2438
|
"button",
|
|
2250
2439
|
{
|
|
2251
2440
|
type: "button",
|
|
2252
|
-
className: [
|
|
2441
|
+
className: [_t.pill, h].filter(Boolean).join(" "),
|
|
2253
2442
|
"aria-expanded": !1,
|
|
2254
2443
|
"aria-label": typeof t == "string" ? `${d}: ${t}` : d,
|
|
2255
|
-
onClick: () => _(!
|
|
2444
|
+
onClick: () => _(!f),
|
|
2256
2445
|
children: [
|
|
2257
|
-
s && /* @__PURE__ */
|
|
2258
|
-
|
|
2259
|
-
/* @__PURE__ */
|
|
2446
|
+
s && /* @__PURE__ */ i("span", { className: _t.prefix, children: s }),
|
|
2447
|
+
v,
|
|
2448
|
+
/* @__PURE__ */ i("span", { className: _t.title, children: t })
|
|
2260
2449
|
]
|
|
2261
2450
|
}
|
|
2262
2451
|
);
|
|
2263
2452
|
}
|
|
2264
|
-
const
|
|
2265
|
-
root:
|
|
2266
|
-
header:
|
|
2267
|
-
mark:
|
|
2268
|
-
title:
|
|
2269
|
-
meta:
|
|
2270
|
-
body:
|
|
2271
|
-
description:
|
|
2272
|
-
footer:
|
|
2273
|
-
footerStart:
|
|
2274
|
-
footerEnd:
|
|
2453
|
+
const Ar = "_root_exebp_6", wr = "_header_exebp_18", Mr = "_mark_exebp_30", zr = "_title_exebp_37", Ir = "_meta_exebp_42", Tr = "_body_exebp_50", Br = "_description_exebp_60", Rr = "_footer_exebp_67", Er = "_footerStart_exebp_77", Cr = "_footerEnd_exebp_84", X = {
|
|
2454
|
+
root: Ar,
|
|
2455
|
+
header: wr,
|
|
2456
|
+
mark: Mr,
|
|
2457
|
+
title: zr,
|
|
2458
|
+
meta: Ir,
|
|
2459
|
+
body: Tr,
|
|
2460
|
+
description: Br,
|
|
2461
|
+
footer: Rr,
|
|
2462
|
+
footerStart: Er,
|
|
2463
|
+
footerEnd: Cr
|
|
2275
2464
|
};
|
|
2276
|
-
function
|
|
2465
|
+
function Na({
|
|
2277
2466
|
title: t,
|
|
2278
2467
|
description: n,
|
|
2279
2468
|
children: e,
|
|
2280
2469
|
icon: s,
|
|
2281
2470
|
status: o,
|
|
2282
|
-
onConfirm:
|
|
2471
|
+
onConfirm: a,
|
|
2283
2472
|
onCancel: r,
|
|
2284
2473
|
footer: c,
|
|
2285
2474
|
confirmLabel: l = "Run",
|
|
2286
2475
|
cancelLabel: d = "Cancel",
|
|
2287
2476
|
disabled: u = !1,
|
|
2288
2477
|
running: h = !1,
|
|
2289
|
-
className:
|
|
2290
|
-
...
|
|
2478
|
+
className: p,
|
|
2479
|
+
...f
|
|
2291
2480
|
}) {
|
|
2292
|
-
const _ = s === null ? null : s ?? /* @__PURE__ */
|
|
2293
|
-
r && /* @__PURE__ */
|
|
2294
|
-
|
|
2295
|
-
|
|
2481
|
+
const _ = s === null ? null : s ?? /* @__PURE__ */ i(Rn, { size: 16 }), v = c ?? /* @__PURE__ */ g(Bt, { children: [
|
|
2482
|
+
r && /* @__PURE__ */ i($t, { variant: "neutral", size: "sm", onClick: r, children: d }),
|
|
2483
|
+
a && /* @__PURE__ */ i(
|
|
2484
|
+
$t,
|
|
2296
2485
|
{
|
|
2297
2486
|
variant: "inverted",
|
|
2298
2487
|
size: "sm",
|
|
2299
2488
|
disabled: u,
|
|
2300
2489
|
loading: h,
|
|
2301
|
-
onClick:
|
|
2490
|
+
onClick: a,
|
|
2302
2491
|
children: l
|
|
2303
2492
|
}
|
|
2304
2493
|
)
|
|
2305
|
-
] }),
|
|
2306
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2307
|
-
/* @__PURE__ */ g("div", { className:
|
|
2308
|
-
_ && /* @__PURE__ */
|
|
2309
|
-
/* @__PURE__ */
|
|
2310
|
-
o && /* @__PURE__ */
|
|
2494
|
+
] }), N = !!n || !!e, m = !!c || !!a || !!r;
|
|
2495
|
+
return /* @__PURE__ */ g("div", { className: [X.root, p].filter(Boolean).join(" "), ...f, children: [
|
|
2496
|
+
/* @__PURE__ */ g("div", { className: X.header, children: [
|
|
2497
|
+
_ && /* @__PURE__ */ i("span", { className: X.mark, children: _ }),
|
|
2498
|
+
/* @__PURE__ */ i("span", { className: X.title, children: t }),
|
|
2499
|
+
o && /* @__PURE__ */ i("span", { className: X.meta, children: o })
|
|
2311
2500
|
] }),
|
|
2312
|
-
|
|
2313
|
-
n && /* @__PURE__ */
|
|
2501
|
+
N && /* @__PURE__ */ g("div", { className: X.body, children: [
|
|
2502
|
+
n && /* @__PURE__ */ i("p", { className: X.description, children: n }),
|
|
2314
2503
|
e
|
|
2315
2504
|
] }),
|
|
2316
|
-
m && /* @__PURE__ */
|
|
2505
|
+
m && /* @__PURE__ */ i("div", { className: X.footer, children: /* @__PURE__ */ i("span", { className: X.footerEnd, children: v }) })
|
|
2317
2506
|
] });
|
|
2318
2507
|
}
|
|
2319
|
-
function
|
|
2508
|
+
function $a({
|
|
2320
2509
|
title: t,
|
|
2321
2510
|
children: n,
|
|
2322
2511
|
icon: e,
|
|
2323
2512
|
progress: s,
|
|
2324
2513
|
onPrevious: o,
|
|
2325
|
-
onNext:
|
|
2514
|
+
onNext: a,
|
|
2326
2515
|
onSubmit: r,
|
|
2327
2516
|
onSkip: c,
|
|
2328
2517
|
footer: l,
|
|
2329
2518
|
skipLabel: d = "Skip for now",
|
|
2330
2519
|
previousLabel: u = "Previous",
|
|
2331
2520
|
nextLabel: h = "Next",
|
|
2332
|
-
submitLabel:
|
|
2333
|
-
disabled:
|
|
2521
|
+
submitLabel: p = "Submit",
|
|
2522
|
+
disabled: f = !1,
|
|
2334
2523
|
submitting: _ = !1,
|
|
2335
|
-
className:
|
|
2336
|
-
|
|
2524
|
+
className: v,
|
|
2525
|
+
...N
|
|
2337
2526
|
}) {
|
|
2338
|
-
const m = e === null ? null : e ?? /* @__PURE__ */
|
|
2339
|
-
!
|
|
2340
|
-
o && /* @__PURE__ */
|
|
2341
|
-
|
|
2342
|
-
r && /* @__PURE__ */
|
|
2343
|
-
|
|
2527
|
+
const m = e === null ? null : e ?? /* @__PURE__ */ i(En, { size: 16 }), M = !!o || !!a, k = c && /* @__PURE__ */ i($t, { variant: "neutral", size: "sm", onClick: c, children: d }), y = l ?? /* @__PURE__ */ g(Bt, { children: [
|
|
2528
|
+
!M && k,
|
|
2529
|
+
o && /* @__PURE__ */ i($t, { variant: "neutral", size: "sm", onClick: o, children: u }),
|
|
2530
|
+
a && /* @__PURE__ */ i($t, { variant: "neutral", size: "sm", disabled: f, onClick: a, children: h }),
|
|
2531
|
+
r && /* @__PURE__ */ i(
|
|
2532
|
+
$t,
|
|
2344
2533
|
{
|
|
2345
2534
|
variant: "neutral",
|
|
2346
2535
|
size: "sm",
|
|
2347
|
-
disabled:
|
|
2536
|
+
disabled: f,
|
|
2348
2537
|
loading: _,
|
|
2349
2538
|
onClick: r,
|
|
2350
|
-
children:
|
|
2539
|
+
children: p
|
|
2351
2540
|
}
|
|
2352
2541
|
)
|
|
2353
|
-
] }), b = !!l || !!o || !!
|
|
2354
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2355
|
-
/* @__PURE__ */ g("div", { className:
|
|
2356
|
-
m && /* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
s && /* @__PURE__ */
|
|
2542
|
+
] }), b = !!l || !!o || !!a || !!r || !!c;
|
|
2543
|
+
return /* @__PURE__ */ g("div", { className: [X.root, v].filter(Boolean).join(" "), ...N, children: [
|
|
2544
|
+
/* @__PURE__ */ g("div", { className: X.header, children: [
|
|
2545
|
+
m && /* @__PURE__ */ i("span", { className: X.mark, children: m }),
|
|
2546
|
+
/* @__PURE__ */ i("span", { className: X.title, children: t }),
|
|
2547
|
+
s && /* @__PURE__ */ i("span", { className: X.meta, children: s })
|
|
2359
2548
|
] }),
|
|
2360
|
-
/* @__PURE__ */
|
|
2361
|
-
b && /* @__PURE__ */ g("div", { className:
|
|
2362
|
-
|
|
2363
|
-
/* @__PURE__ */
|
|
2549
|
+
/* @__PURE__ */ i("div", { className: X.body, children: n }),
|
|
2550
|
+
b && /* @__PURE__ */ g("div", { className: X.footer, children: [
|
|
2551
|
+
M && !l && /* @__PURE__ */ i("span", { className: X.footerStart, children: k }),
|
|
2552
|
+
/* @__PURE__ */ i("span", { className: X.footerEnd, children: y })
|
|
2364
2553
|
] })
|
|
2365
2554
|
] });
|
|
2366
2555
|
}
|
|
2367
|
-
const
|
|
2368
|
-
root:
|
|
2369
|
-
label:
|
|
2370
|
-
name:
|
|
2371
|
-
key:
|
|
2372
|
-
description:
|
|
2373
|
-
control:
|
|
2556
|
+
const Or = "_root_1tlwe_1", Pr = "_label_1tlwe_8", Sr = "_name_1tlwe_17", jr = "_key_1tlwe_22", qr = "_description_1tlwe_28", Lr = "_control_1tlwe_34", Et = {
|
|
2557
|
+
root: Or,
|
|
2558
|
+
label: Pr,
|
|
2559
|
+
name: Sr,
|
|
2560
|
+
key: jr,
|
|
2561
|
+
description: qr,
|
|
2562
|
+
control: Lr
|
|
2374
2563
|
};
|
|
2375
|
-
function
|
|
2564
|
+
function Aa({
|
|
2376
2565
|
label: t,
|
|
2377
2566
|
name: n,
|
|
2378
2567
|
children: e,
|
|
2379
2568
|
description: s,
|
|
2380
2569
|
className: o,
|
|
2381
|
-
...
|
|
2570
|
+
...a
|
|
2382
2571
|
}) {
|
|
2383
|
-
return /* @__PURE__ */ g("label", { className: [
|
|
2384
|
-
/* @__PURE__ */ g("span", { className:
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
n && /* @__PURE__ */ g("code", { className:
|
|
2572
|
+
return /* @__PURE__ */ g("label", { className: [Et.root, o].filter(Boolean).join(" "), ...a, children: [
|
|
2573
|
+
/* @__PURE__ */ g("span", { className: Et.label, children: [
|
|
2574
|
+
/* @__PURE__ */ i("span", { className: Et.name, children: t }),
|
|
2575
|
+
n && /* @__PURE__ */ g("code", { className: Et.key, children: [
|
|
2387
2576
|
"(",
|
|
2388
2577
|
n,
|
|
2389
2578
|
")"
|
|
2390
2579
|
] })
|
|
2391
2580
|
] }),
|
|
2392
|
-
s && /* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2581
|
+
s && /* @__PURE__ */ i("span", { className: Et.description, children: s }),
|
|
2582
|
+
/* @__PURE__ */ i("span", { className: Et.control, children: e })
|
|
2394
2583
|
] });
|
|
2395
2584
|
}
|
|
2396
|
-
const
|
|
2397
|
-
root:
|
|
2398
|
-
chip:
|
|
2399
|
-
plain:
|
|
2585
|
+
const Hr = "_root_8yfcy_1", Fr = "_chip_8yfcy_20", Dr = "_plain_8yfcy_28", Yr = "_interactive_8yfcy_37", Ur = "_prefix_8yfcy_62", Xr = "_marks_8yfcy_72", Gr = "_marksThumb_8yfcy_82", Wr = "_thumbnail_8yfcy_89", Qr = "_icon_8yfcy_102", Vr = "_remove_8yfcy_103", Kr = "_toneError_8yfcy_114", Zr = "_removable_8yfcy_124", Jr = "_label_8yfcy_139", ti = "_mono_8yfcy_146", ot = {
|
|
2586
|
+
root: Hr,
|
|
2587
|
+
chip: Fr,
|
|
2588
|
+
plain: Dr,
|
|
2400
2589
|
static: "_static_8yfcy_33",
|
|
2401
|
-
interactive:
|
|
2402
|
-
prefix:
|
|
2403
|
-
marks:
|
|
2404
|
-
marksThumb:
|
|
2405
|
-
thumbnail:
|
|
2406
|
-
icon:
|
|
2407
|
-
remove:
|
|
2408
|
-
toneError:
|
|
2409
|
-
removable:
|
|
2410
|
-
label:
|
|
2411
|
-
mono:
|
|
2590
|
+
interactive: Yr,
|
|
2591
|
+
prefix: Ur,
|
|
2592
|
+
marks: Xr,
|
|
2593
|
+
marksThumb: Gr,
|
|
2594
|
+
thumbnail: Wr,
|
|
2595
|
+
icon: Qr,
|
|
2596
|
+
remove: Vr,
|
|
2597
|
+
toneError: Kr,
|
|
2598
|
+
removable: Zr,
|
|
2599
|
+
label: Jr,
|
|
2600
|
+
mono: ti
|
|
2412
2601
|
};
|
|
2413
|
-
function
|
|
2602
|
+
function wa({
|
|
2414
2603
|
children: t,
|
|
2415
2604
|
icon: n,
|
|
2416
2605
|
thumbnail: e,
|
|
2417
2606
|
thumbnailAlt: s = "",
|
|
2418
2607
|
onRemove: o,
|
|
2419
|
-
removeLabel:
|
|
2608
|
+
removeLabel: a = "Remove",
|
|
2420
2609
|
variant: r = "chip",
|
|
2421
2610
|
prefix: c,
|
|
2422
2611
|
tone: l = "default",
|
|
2423
2612
|
mono: d = !1,
|
|
2424
2613
|
className: u,
|
|
2425
2614
|
onClick: h,
|
|
2426
|
-
...
|
|
2615
|
+
...p
|
|
2427
2616
|
}) {
|
|
2428
|
-
const
|
|
2617
|
+
const f = r === "chip" ? o : void 0, _ = !!f || !!h, v = /* @__PURE__ */ g(
|
|
2429
2618
|
"span",
|
|
2430
2619
|
{
|
|
2431
2620
|
className: [
|
|
2432
|
-
|
|
2433
|
-
e &&
|
|
2434
|
-
l === "error" &&
|
|
2621
|
+
ot.marks,
|
|
2622
|
+
e && ot.marksThumb,
|
|
2623
|
+
l === "error" && ot.toneError
|
|
2435
2624
|
].filter(Boolean).join(" "),
|
|
2436
2625
|
"aria-hidden": "true",
|
|
2437
2626
|
children: [
|
|
2438
|
-
e ? /* @__PURE__ */
|
|
2627
|
+
e ? /* @__PURE__ */ i(
|
|
2439
2628
|
"img",
|
|
2440
2629
|
{
|
|
2441
|
-
className:
|
|
2630
|
+
className: ot.thumbnail,
|
|
2442
2631
|
src: e,
|
|
2443
2632
|
alt: s,
|
|
2444
2633
|
width: 14,
|
|
2445
2634
|
height: 14
|
|
2446
2635
|
}
|
|
2447
|
-
) : n && /* @__PURE__ */
|
|
2448
|
-
|
|
2636
|
+
) : n && /* @__PURE__ */ i("span", { className: ot.icon, children: n }),
|
|
2637
|
+
f && /* @__PURE__ */ i("span", { className: ot.remove, children: /* @__PURE__ */ i(Je, { size: 14 }) })
|
|
2449
2638
|
]
|
|
2450
2639
|
}
|
|
2451
|
-
),
|
|
2452
|
-
c && /* @__PURE__ */
|
|
2453
|
-
(n || e ||
|
|
2454
|
-
/* @__PURE__ */
|
|
2640
|
+
), N = /* @__PURE__ */ g(Bt, { children: [
|
|
2641
|
+
c && /* @__PURE__ */ i("span", { className: ot.prefix, children: c }),
|
|
2642
|
+
(n || e || f) && v,
|
|
2643
|
+
/* @__PURE__ */ i("span", { className: [ot.label, d && ot.mono].filter(Boolean).join(" "), children: t })
|
|
2455
2644
|
] }), m = [
|
|
2456
|
-
|
|
2457
|
-
r === "plain" ?
|
|
2458
|
-
_ ?
|
|
2459
|
-
|
|
2645
|
+
ot.root,
|
|
2646
|
+
r === "plain" ? ot.plain : ot.chip,
|
|
2647
|
+
_ ? ot.interactive : ot.static,
|
|
2648
|
+
f && ot.removable,
|
|
2460
2649
|
u
|
|
2461
2650
|
].filter(Boolean).join(" ");
|
|
2462
|
-
return _ ? /* @__PURE__ */
|
|
2651
|
+
return _ ? /* @__PURE__ */ i(
|
|
2463
2652
|
"button",
|
|
2464
2653
|
{
|
|
2465
2654
|
type: "button",
|
|
2466
2655
|
className: m,
|
|
2467
|
-
"aria-label":
|
|
2468
|
-
onClick:
|
|
2469
|
-
...
|
|
2470
|
-
children:
|
|
2656
|
+
"aria-label": f ? a : void 0,
|
|
2657
|
+
onClick: f ? () => f() : h,
|
|
2658
|
+
...p,
|
|
2659
|
+
children: N
|
|
2471
2660
|
}
|
|
2472
|
-
) : /* @__PURE__ */
|
|
2661
|
+
) : /* @__PURE__ */ i("span", { className: m, children: N });
|
|
2473
2662
|
}
|
|
2474
|
-
const
|
|
2475
|
-
root:
|
|
2476
|
-
bubble:
|
|
2477
|
-
references:
|
|
2478
|
-
animated:
|
|
2663
|
+
const ei = "_root_7cjvl_1", ni = "_bubble_7cjvl_9", si = "_references_7cjvl_21", oi = "_animated_7cjvl_29", te = {
|
|
2664
|
+
root: ei,
|
|
2665
|
+
bubble: ni,
|
|
2666
|
+
references: si,
|
|
2667
|
+
animated: oi
|
|
2479
2668
|
};
|
|
2480
|
-
function
|
|
2669
|
+
function Ma({
|
|
2481
2670
|
children: t,
|
|
2482
2671
|
images: n = [],
|
|
2483
2672
|
onImageClick: e,
|
|
2484
2673
|
references: s,
|
|
2485
2674
|
animate: o = !0,
|
|
2486
|
-
className:
|
|
2675
|
+
className: a,
|
|
2487
2676
|
...r
|
|
2488
2677
|
}) {
|
|
2489
2678
|
return /* @__PURE__ */ g(
|
|
2490
2679
|
"div",
|
|
2491
2680
|
{
|
|
2492
|
-
className: [
|
|
2681
|
+
className: [te.root, o && te.animated, a].filter(Boolean).join(" "),
|
|
2493
2682
|
...r,
|
|
2494
2683
|
children: [
|
|
2495
|
-
s && /* @__PURE__ */
|
|
2496
|
-
n.length > 0 && /* @__PURE__ */
|
|
2497
|
-
t && /* @__PURE__ */
|
|
2684
|
+
s && /* @__PURE__ */ i("div", { className: te.references, children: s }),
|
|
2685
|
+
n.length > 0 && /* @__PURE__ */ i(mr, { images: n, onImageClick: e }),
|
|
2686
|
+
t && /* @__PURE__ */ i("div", { className: te.bubble, children: t })
|
|
2498
2687
|
]
|
|
2499
2688
|
}
|
|
2500
2689
|
);
|
|
2501
2690
|
}
|
|
2502
|
-
const
|
|
2503
|
-
root:
|
|
2504
|
-
body:
|
|
2505
|
-
error:
|
|
2506
|
-
errorMark:
|
|
2507
|
-
errorText:
|
|
2508
|
-
footer:
|
|
2509
|
-
sources:
|
|
2510
|
-
sourceItem:
|
|
2511
|
-
source:
|
|
2512
|
-
actions:
|
|
2513
|
-
actionsVisible:
|
|
2514
|
-
voted:
|
|
2515
|
-
},
|
|
2516
|
-
function
|
|
2691
|
+
const ri = "_root_1axqb_1", ii = "_body_1axqb_8", ai = "_error_1axqb_26", ci = "_errorMark_1axqb_35", li = "_errorText_1axqb_41", di = "_footer_1axqb_46", ui = "_sources_1axqb_53", hi = "_sourceItem_1axqb_64", fi = "_source_1axqb_53", pi = "_actions_1axqb_108", _i = "_actionsVisible_1axqb_120", mi = "_voted_1axqb_126", rt = {
|
|
2692
|
+
root: ri,
|
|
2693
|
+
body: ii,
|
|
2694
|
+
error: ai,
|
|
2695
|
+
errorMark: ci,
|
|
2696
|
+
errorText: li,
|
|
2697
|
+
footer: di,
|
|
2698
|
+
sources: ui,
|
|
2699
|
+
sourceItem: hi,
|
|
2700
|
+
source: fi,
|
|
2701
|
+
actions: pi,
|
|
2702
|
+
actionsVisible: _i,
|
|
2703
|
+
voted: mi
|
|
2704
|
+
}, yi = 1600;
|
|
2705
|
+
function za({
|
|
2517
2706
|
children: t,
|
|
2518
2707
|
textValue: n,
|
|
2519
2708
|
sources: e = [],
|
|
2520
2709
|
error: s,
|
|
2521
2710
|
onRetry: o,
|
|
2522
|
-
retryLabel:
|
|
2711
|
+
retryLabel: a = "Try again",
|
|
2523
2712
|
onCopy: r,
|
|
2524
2713
|
onFeedbackChange: c,
|
|
2525
2714
|
feedback: l,
|
|
2526
2715
|
defaultFeedback: d = null,
|
|
2527
2716
|
actions: u,
|
|
2528
2717
|
actionsVisible: h = !1,
|
|
2529
|
-
copyLabel:
|
|
2530
|
-
copiedLabel:
|
|
2718
|
+
copyLabel: p = "Copy",
|
|
2719
|
+
copiedLabel: f = "Copied",
|
|
2531
2720
|
likeLabel: _ = "Good answer",
|
|
2532
|
-
dislikeLabel:
|
|
2533
|
-
className:
|
|
2721
|
+
dislikeLabel: v = "Bad answer",
|
|
2722
|
+
className: N,
|
|
2534
2723
|
...m
|
|
2535
2724
|
}) {
|
|
2536
|
-
const [
|
|
2537
|
-
|
|
2725
|
+
const [M, k] = at(!1), [y, b] = Rt(l, d, c), C = D(null), $ = n ?? (typeof t == "string" ? t : ""), P = !!r || !!c || !!u;
|
|
2726
|
+
tt(
|
|
2538
2727
|
() => () => {
|
|
2539
|
-
|
|
2728
|
+
C.current && clearTimeout(C.current);
|
|
2540
2729
|
},
|
|
2541
2730
|
[]
|
|
2542
2731
|
);
|
|
2543
|
-
async function
|
|
2544
|
-
var
|
|
2732
|
+
async function q() {
|
|
2733
|
+
var I;
|
|
2545
2734
|
try {
|
|
2546
|
-
await ((
|
|
2735
|
+
await ((I = navigator.clipboard) == null ? void 0 : I.writeText($)), k(!0), C.current && clearTimeout(C.current), C.current = setTimeout(() => k(!1), yi);
|
|
2547
2736
|
} finally {
|
|
2548
|
-
r == null || r(
|
|
2737
|
+
r == null || r($);
|
|
2549
2738
|
}
|
|
2550
2739
|
}
|
|
2551
|
-
function
|
|
2552
|
-
b(y ===
|
|
2740
|
+
function L(I) {
|
|
2741
|
+
b(y === I ? null : I);
|
|
2553
2742
|
}
|
|
2554
2743
|
return /* @__PURE__ */ g(
|
|
2555
2744
|
"div",
|
|
2556
2745
|
{
|
|
2557
|
-
className: [
|
|
2746
|
+
className: [rt.root, h && rt.actionsVisible, N].filter(Boolean).join(" "),
|
|
2558
2747
|
...m,
|
|
2559
2748
|
children: [
|
|
2560
|
-
t && /* @__PURE__ */
|
|
2561
|
-
s && /* @__PURE__ */ g("div", { className:
|
|
2562
|
-
/* @__PURE__ */
|
|
2563
|
-
/* @__PURE__ */
|
|
2564
|
-
o && /* @__PURE__ */
|
|
2749
|
+
t && /* @__PURE__ */ i("div", { className: rt.body, children: t }),
|
|
2750
|
+
s && /* @__PURE__ */ g("div", { className: rt.error, role: "alert", children: [
|
|
2751
|
+
/* @__PURE__ */ i("span", { className: rt.errorMark, children: /* @__PURE__ */ i(Ne, { size: 15 }) }),
|
|
2752
|
+
/* @__PURE__ */ i("span", { className: rt.errorText, children: s }),
|
|
2753
|
+
o && /* @__PURE__ */ i($t, { variant: "neutral", size: "sm", onClick: o, children: a })
|
|
2565
2754
|
] }),
|
|
2566
|
-
(e.length > 0 ||
|
|
2567
|
-
e.length > 0 && /* @__PURE__ */
|
|
2568
|
-
|
|
2755
|
+
(e.length > 0 || P) && /* @__PURE__ */ g("div", { className: rt.footer, children: [
|
|
2756
|
+
e.length > 0 && /* @__PURE__ */ i("ul", { className: rt.sources, children: e.map((I) => /* @__PURE__ */ i("li", { className: rt.sourceItem, children: I.href ? /* @__PURE__ */ i("a", { className: rt.source, href: I.href, onClick: I.onClick, children: I.label }) : I.onClick ? /* @__PURE__ */ i("button", { type: "button", className: rt.source, onClick: I.onClick, children: I.label }) : /* @__PURE__ */ i("span", { className: rt.source, children: I.label }) }, I.id)) }),
|
|
2757
|
+
P && /* @__PURE__ */ g("div", { className: rt.actions, children: [
|
|
2569
2758
|
u,
|
|
2570
|
-
r && /* @__PURE__ */
|
|
2571
|
-
|
|
2759
|
+
r && /* @__PURE__ */ i(
|
|
2760
|
+
et,
|
|
2572
2761
|
{
|
|
2573
2762
|
variant: "transparent",
|
|
2574
2763
|
size: "xsmall",
|
|
2575
|
-
icon:
|
|
2576
|
-
"aria-label":
|
|
2577
|
-
onClick:
|
|
2764
|
+
icon: M ? /* @__PURE__ */ i(tn, { size: 15 }) : /* @__PURE__ */ i(Cn, { size: 15 }),
|
|
2765
|
+
"aria-label": M ? f : p,
|
|
2766
|
+
onClick: q
|
|
2578
2767
|
}
|
|
2579
2768
|
),
|
|
2580
|
-
c && /* @__PURE__ */ g(
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
|
|
2769
|
+
c && /* @__PURE__ */ g(Bt, { children: [
|
|
2770
|
+
/* @__PURE__ */ i(
|
|
2771
|
+
et,
|
|
2583
2772
|
{
|
|
2584
2773
|
variant: "transparent",
|
|
2585
2774
|
size: "xsmall",
|
|
2586
|
-
className: y === "like" ?
|
|
2587
|
-
icon: /* @__PURE__ */
|
|
2775
|
+
className: y === "like" ? rt.voted : void 0,
|
|
2776
|
+
icon: /* @__PURE__ */ i(On, { size: 15 }),
|
|
2588
2777
|
"aria-label": _,
|
|
2589
2778
|
"aria-pressed": y === "like",
|
|
2590
|
-
onClick: () =>
|
|
2779
|
+
onClick: () => L("like")
|
|
2591
2780
|
}
|
|
2592
2781
|
),
|
|
2593
|
-
/* @__PURE__ */
|
|
2594
|
-
|
|
2782
|
+
/* @__PURE__ */ i(
|
|
2783
|
+
et,
|
|
2595
2784
|
{
|
|
2596
2785
|
variant: "transparent",
|
|
2597
2786
|
size: "xsmall",
|
|
2598
|
-
className: y === "dislike" ?
|
|
2599
|
-
icon: /* @__PURE__ */
|
|
2600
|
-
"aria-label":
|
|
2787
|
+
className: y === "dislike" ? rt.voted : void 0,
|
|
2788
|
+
icon: /* @__PURE__ */ i(Pn, { size: 15 }),
|
|
2789
|
+
"aria-label": v,
|
|
2601
2790
|
"aria-pressed": y === "dislike",
|
|
2602
|
-
onClick: () =>
|
|
2791
|
+
onClick: () => L("dislike")
|
|
2603
2792
|
}
|
|
2604
2793
|
)
|
|
2605
2794
|
] })
|
|
@@ -2609,162 +2798,162 @@ function aa({
|
|
|
2609
2798
|
}
|
|
2610
2799
|
);
|
|
2611
2800
|
}
|
|
2612
|
-
const
|
|
2613
|
-
root:
|
|
2614
|
-
label:
|
|
2615
|
-
row:
|
|
2616
|
-
pill:
|
|
2617
|
-
icon:
|
|
2618
|
-
text:
|
|
2801
|
+
const gi = "_root_15ubm_1", xi = "_label_15ubm_8", bi = "_row_15ubm_14", vi = "_pill_15ubm_20", ki = "_icon_15ubm_55", Ni = "_text_15ubm_62", Pt = {
|
|
2802
|
+
root: gi,
|
|
2803
|
+
label: xi,
|
|
2804
|
+
row: bi,
|
|
2805
|
+
pill: vi,
|
|
2806
|
+
icon: ki,
|
|
2807
|
+
text: Ni
|
|
2619
2808
|
};
|
|
2620
|
-
function
|
|
2809
|
+
function Ia({
|
|
2621
2810
|
children: t,
|
|
2622
2811
|
label: n,
|
|
2623
2812
|
className: e,
|
|
2624
2813
|
...s
|
|
2625
2814
|
}) {
|
|
2626
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2627
|
-
n && /* @__PURE__ */
|
|
2628
|
-
/* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ g("div", { className: [Pt.root, e].filter(Boolean).join(" "), ...s, children: [
|
|
2816
|
+
n && /* @__PURE__ */ i("span", { className: Pt.label, children: n }),
|
|
2817
|
+
/* @__PURE__ */ i("div", { className: Pt.row, children: t })
|
|
2629
2818
|
] });
|
|
2630
2819
|
}
|
|
2631
|
-
function
|
|
2820
|
+
function Ta({
|
|
2632
2821
|
children: t,
|
|
2633
2822
|
icon: n,
|
|
2634
2823
|
className: e,
|
|
2635
2824
|
type: s = "button",
|
|
2636
2825
|
...o
|
|
2637
2826
|
}) {
|
|
2638
|
-
return /* @__PURE__ */ g("button", { type: s, className: [
|
|
2639
|
-
n && /* @__PURE__ */
|
|
2640
|
-
/* @__PURE__ */
|
|
2827
|
+
return /* @__PURE__ */ g("button", { type: s, className: [Pt.pill, e].filter(Boolean).join(" "), ...o, children: [
|
|
2828
|
+
n && /* @__PURE__ */ i("span", { className: Pt.icon, children: n }),
|
|
2829
|
+
/* @__PURE__ */ i("span", { className: Pt.text, children: t })
|
|
2641
2830
|
] });
|
|
2642
2831
|
}
|
|
2643
|
-
const
|
|
2644
|
-
root:
|
|
2645
|
-
content:
|
|
2646
|
-
titleRow:
|
|
2647
|
-
icon:
|
|
2648
|
-
title:
|
|
2649
|
-
description:
|
|
2650
|
-
trailing:
|
|
2832
|
+
const $i = "_root_1ojxj_1", Ai = "_content_1ojxj_38", wi = "_titleRow_1ojxj_46", Mi = "_icon_1ojxj_52", zi = "_title_1ojxj_46", Ii = "_description_1ojxj_61", Ti = "_trailing_1ojxj_95", zt = {
|
|
2833
|
+
root: $i,
|
|
2834
|
+
content: Ai,
|
|
2835
|
+
titleRow: wi,
|
|
2836
|
+
icon: Mi,
|
|
2837
|
+
title: zi,
|
|
2838
|
+
description: Ii,
|
|
2839
|
+
trailing: Ti
|
|
2651
2840
|
};
|
|
2652
|
-
function
|
|
2841
|
+
function Ba({
|
|
2653
2842
|
title: t,
|
|
2654
2843
|
description: n,
|
|
2655
2844
|
icon: e,
|
|
2656
2845
|
trailing: s,
|
|
2657
2846
|
className: o,
|
|
2658
|
-
...
|
|
2847
|
+
...a
|
|
2659
2848
|
}) {
|
|
2660
|
-
const r = [
|
|
2661
|
-
/* @__PURE__ */ g("span", { className:
|
|
2662
|
-
/* @__PURE__ */ g("span", { className:
|
|
2663
|
-
c && /* @__PURE__ */
|
|
2664
|
-
/* @__PURE__ */
|
|
2849
|
+
const r = [zt.root, o].filter(Boolean).join(" "), c = e === null ? null : e ?? /* @__PURE__ */ i(jn, { size: 16 }), l = s === null ? null : s ?? /* @__PURE__ */ i(Sn, { size: 16 }), d = /* @__PURE__ */ g(Bt, { children: [
|
|
2850
|
+
/* @__PURE__ */ g("span", { className: zt.content, children: [
|
|
2851
|
+
/* @__PURE__ */ g("span", { className: zt.titleRow, children: [
|
|
2852
|
+
c && /* @__PURE__ */ i("span", { className: zt.icon, children: c }),
|
|
2853
|
+
/* @__PURE__ */ i("span", { className: zt.title, children: t })
|
|
2665
2854
|
] }),
|
|
2666
|
-
n && /* @__PURE__ */
|
|
2855
|
+
n && /* @__PURE__ */ i("span", { className: zt.description, children: n })
|
|
2667
2856
|
] }),
|
|
2668
|
-
l && /* @__PURE__ */
|
|
2857
|
+
l && /* @__PURE__ */ i("span", { className: zt.trailing, children: l })
|
|
2669
2858
|
] });
|
|
2670
|
-
if (
|
|
2671
|
-
const { href:
|
|
2672
|
-
return /* @__PURE__ */
|
|
2859
|
+
if (a.href !== void 0) {
|
|
2860
|
+
const { href: p, ...f } = a;
|
|
2861
|
+
return /* @__PURE__ */ i("a", { className: r, href: p, ...f, children: d });
|
|
2673
2862
|
}
|
|
2674
|
-
const { type: u = "button", ...h } =
|
|
2675
|
-
return /* @__PURE__ */
|
|
2676
|
-
}
|
|
2677
|
-
const
|
|
2678
|
-
root:
|
|
2679
|
-
row:
|
|
2680
|
-
error:
|
|
2681
|
-
mark:
|
|
2682
|
-
label:
|
|
2683
|
-
code:
|
|
2684
|
-
details:
|
|
2863
|
+
const { type: u = "button", ...h } = a;
|
|
2864
|
+
return /* @__PURE__ */ i("button", { className: r, type: u, ...h, children: d });
|
|
2865
|
+
}
|
|
2866
|
+
const Bi = "_root_15073_1", Ri = "_row_15073_8", Ei = "_error_15073_19", Ci = "_mark_15073_23", Oi = "_label_15073_30", Pi = "_code_15073_41 _code_1hqe1_6", Si = "_details_15073_46", It = {
|
|
2867
|
+
root: Bi,
|
|
2868
|
+
row: Ri,
|
|
2869
|
+
error: Ei,
|
|
2870
|
+
mark: Ci,
|
|
2871
|
+
label: Oi,
|
|
2872
|
+
code: Pi,
|
|
2873
|
+
details: Si
|
|
2685
2874
|
};
|
|
2686
|
-
function
|
|
2875
|
+
function Ra({
|
|
2687
2876
|
children: t,
|
|
2688
2877
|
icon: n,
|
|
2689
2878
|
code: e,
|
|
2690
2879
|
state: s = "done",
|
|
2691
2880
|
details: o,
|
|
2692
|
-
errorIcon:
|
|
2881
|
+
errorIcon: a,
|
|
2693
2882
|
className: r,
|
|
2694
2883
|
...c
|
|
2695
2884
|
}) {
|
|
2696
|
-
const l = s === "error", d = l ?
|
|
2697
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2698
|
-
/* @__PURE__ */ g("div", { className: [
|
|
2699
|
-
d && /* @__PURE__ */
|
|
2700
|
-
/* @__PURE__ */
|
|
2701
|
-
e != null && /* @__PURE__ */
|
|
2885
|
+
const l = s === "error", d = l ? a ?? /* @__PURE__ */ i(Ne, { size: 16 }) : n;
|
|
2886
|
+
return /* @__PURE__ */ g("div", { className: [It.root, r].filter(Boolean).join(" "), ...c, children: [
|
|
2887
|
+
/* @__PURE__ */ g("div", { className: [It.row, l && It.error].filter(Boolean).join(" "), children: [
|
|
2888
|
+
d && /* @__PURE__ */ i("span", { className: It.mark, children: d }),
|
|
2889
|
+
/* @__PURE__ */ i("span", { className: It.label, children: t }),
|
|
2890
|
+
e != null && /* @__PURE__ */ i("code", { className: It.code, children: e })
|
|
2702
2891
|
] }),
|
|
2703
|
-
o && /* @__PURE__ */
|
|
2892
|
+
o && /* @__PURE__ */ i("div", { className: It.details, children: o })
|
|
2704
2893
|
] });
|
|
2705
2894
|
}
|
|
2706
|
-
const
|
|
2707
|
-
root:
|
|
2708
|
-
trigger:
|
|
2709
|
-
caret:
|
|
2710
|
-
title:
|
|
2711
|
-
items:
|
|
2895
|
+
const ji = "_root_1sq2g_1", qi = "_trigger_1sq2g_8", Li = "_caret_1sq2g_31", Hi = "_title_1sq2g_39", Fi = "_items_1sq2g_47", Yt = {
|
|
2896
|
+
root: ji,
|
|
2897
|
+
trigger: qi,
|
|
2898
|
+
caret: Li,
|
|
2899
|
+
title: Hi,
|
|
2900
|
+
items: Fi
|
|
2712
2901
|
};
|
|
2713
|
-
function
|
|
2902
|
+
function Ea({
|
|
2714
2903
|
title: t,
|
|
2715
2904
|
children: n,
|
|
2716
2905
|
open: e,
|
|
2717
2906
|
defaultOpen: s = !1,
|
|
2718
2907
|
onOpenChange: o,
|
|
2719
|
-
className:
|
|
2908
|
+
className: a,
|
|
2720
2909
|
...r
|
|
2721
2910
|
}) {
|
|
2722
|
-
const [c, l] =
|
|
2723
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2911
|
+
const [c, l] = Rt(e, s, o), d = St();
|
|
2912
|
+
return /* @__PURE__ */ g("div", { className: [Yt.root, a].filter(Boolean).join(" "), ...r, children: [
|
|
2724
2913
|
/* @__PURE__ */ g(
|
|
2725
2914
|
"button",
|
|
2726
2915
|
{
|
|
2727
2916
|
type: "button",
|
|
2728
|
-
className:
|
|
2917
|
+
className: Yt.trigger,
|
|
2729
2918
|
"aria-expanded": c,
|
|
2730
2919
|
"aria-controls": d,
|
|
2731
2920
|
onClick: () => l(!c),
|
|
2732
2921
|
children: [
|
|
2733
|
-
/* @__PURE__ */
|
|
2734
|
-
/* @__PURE__ */
|
|
2922
|
+
/* @__PURE__ */ i("span", { className: Yt.caret, children: c ? /* @__PURE__ */ i(en, { size: 14 }) : /* @__PURE__ */ i(nn, { size: 14 }) }),
|
|
2923
|
+
/* @__PURE__ */ i("span", { className: Yt.title, children: t })
|
|
2735
2924
|
]
|
|
2736
2925
|
}
|
|
2737
2926
|
),
|
|
2738
|
-
c && /* @__PURE__ */
|
|
2927
|
+
c && /* @__PURE__ */ i("div", { id: d, className: Yt.items, children: n })
|
|
2739
2928
|
] });
|
|
2740
2929
|
}
|
|
2741
|
-
const
|
|
2742
|
-
root:
|
|
2743
|
-
pending:
|
|
2744
|
-
error:
|
|
2745
|
-
mark:
|
|
2746
|
-
label:
|
|
2747
|
-
done:
|
|
2748
|
-
code:
|
|
2930
|
+
const Di = "_root_1dvwc_1", Yi = "_pending_1dvwc_11", Ui = "_error_1dvwc_15", Xi = "_mark_1dvwc_19", Gi = "_label_1dvwc_29", Wi = "_done_1dvwc_37", Qi = "_code_1dvwc_41 _code_1hqe1_6", Ut = {
|
|
2931
|
+
root: Di,
|
|
2932
|
+
pending: Yi,
|
|
2933
|
+
error: Ui,
|
|
2934
|
+
mark: Xi,
|
|
2935
|
+
label: Gi,
|
|
2936
|
+
done: Wi,
|
|
2937
|
+
code: Qi
|
|
2749
2938
|
};
|
|
2750
|
-
function
|
|
2939
|
+
function Ca({
|
|
2751
2940
|
children: t,
|
|
2752
2941
|
code: n,
|
|
2753
2942
|
state: e = "pending",
|
|
2754
2943
|
marker: s,
|
|
2755
2944
|
runningLabel: o = "In progress",
|
|
2756
|
-
className:
|
|
2945
|
+
className: a,
|
|
2757
2946
|
...r
|
|
2758
2947
|
}) {
|
|
2759
|
-
const c = s ?? (e === "done" ? /* @__PURE__ */
|
|
2760
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2761
|
-
/* @__PURE__ */
|
|
2762
|
-
/* @__PURE__ */
|
|
2763
|
-
n != null && /* @__PURE__ */
|
|
2948
|
+
const c = s ?? (e === "done" ? /* @__PURE__ */ i(tn, { size: 14 }) : e === "error" ? /* @__PURE__ */ i(Ne, { size: 14 }) : e === "running" ? /* @__PURE__ */ i(vn, { size: "xs", label: o }) : /* @__PURE__ */ i(qn, { size: 14 }));
|
|
2949
|
+
return /* @__PURE__ */ g("div", { className: [Ut.root, Ut[e], a].filter(Boolean).join(" "), ...r, children: [
|
|
2950
|
+
/* @__PURE__ */ i("span", { className: Ut.mark, children: c }),
|
|
2951
|
+
/* @__PURE__ */ i("span", { className: Ut.label, children: t }),
|
|
2952
|
+
n != null && /* @__PURE__ */ i("code", { className: Ut.code, children: n })
|
|
2764
2953
|
] });
|
|
2765
2954
|
}
|
|
2766
|
-
const
|
|
2767
|
-
function
|
|
2955
|
+
const Vi = "--backgrounds-bg-base";
|
|
2956
|
+
function Ki(t, n) {
|
|
2768
2957
|
const e = t.trim();
|
|
2769
2958
|
if (/^#[0-9a-f]{6}$/i.test(e)) return e;
|
|
2770
2959
|
if (/^#[0-9a-f]{3}$/i.test(e))
|
|
@@ -2774,167 +2963,168 @@ function Ti(t, n) {
|
|
|
2774
2963
|
(o) => Math.max(0, Math.min(255, Math.round(Number(o)))).toString(16).padStart(2, "0")
|
|
2775
2964
|
).join("")}`;
|
|
2776
2965
|
}
|
|
2777
|
-
function
|
|
2966
|
+
function Ve(t) {
|
|
2778
2967
|
if (typeof window > "u") return t;
|
|
2779
|
-
const n = getComputedStyle(document.documentElement).getPropertyValue(
|
|
2780
|
-
return n ?
|
|
2968
|
+
const n = getComputedStyle(document.documentElement).getPropertyValue(Vi);
|
|
2969
|
+
return n ? Ki(n, t) : t;
|
|
2781
2970
|
}
|
|
2782
|
-
function
|
|
2783
|
-
const [e, s] =
|
|
2784
|
-
return
|
|
2971
|
+
function fn(t, n = "rgb(255 255 255)") {
|
|
2972
|
+
const [e, s] = at(() => t ?? Ve(n));
|
|
2973
|
+
return tt(() => {
|
|
2785
2974
|
if (t) {
|
|
2786
2975
|
s(t);
|
|
2787
2976
|
return;
|
|
2788
2977
|
}
|
|
2789
|
-
const o = () => s(
|
|
2978
|
+
const o = () => s(Ve(n));
|
|
2790
2979
|
o();
|
|
2791
|
-
const
|
|
2792
|
-
return
|
|
2980
|
+
const a = new MutationObserver(o);
|
|
2981
|
+
return a.observe(document.documentElement, {
|
|
2793
2982
|
attributes: !0,
|
|
2794
2983
|
attributeFilter: ["data-theme", "class", "style"]
|
|
2795
|
-
}), () =>
|
|
2984
|
+
}), () => a.disconnect();
|
|
2796
2985
|
}, [t, n]), e;
|
|
2797
2986
|
}
|
|
2798
|
-
const
|
|
2799
|
-
root:
|
|
2800
|
-
header:
|
|
2801
|
-
trigger:
|
|
2802
|
-
mark:
|
|
2803
|
-
caret:
|
|
2804
|
-
body:
|
|
2805
|
-
peek:
|
|
2987
|
+
const Zi = "_root_1gc8h_1", Ji = "_header_1gc8h_8", ta = "_trigger_1gc8h_23", ea = "_mark_1gc8h_34", na = "_caret_1gc8h_35", sa = "_body_1gc8h_50", oa = "_peek_1gc8h_65", mt = {
|
|
2988
|
+
root: Zi,
|
|
2989
|
+
header: Ji,
|
|
2990
|
+
trigger: ta,
|
|
2991
|
+
mark: ea,
|
|
2992
|
+
caret: na,
|
|
2993
|
+
body: sa,
|
|
2994
|
+
peek: oa
|
|
2806
2995
|
};
|
|
2807
|
-
function
|
|
2996
|
+
function Oa({
|
|
2808
2997
|
children: t,
|
|
2809
2998
|
label: n = "Reasoning",
|
|
2810
2999
|
workingLabel: e = "Reasoning…",
|
|
2811
3000
|
working: s = !1,
|
|
2812
3001
|
open: o,
|
|
2813
|
-
defaultOpen:
|
|
3002
|
+
defaultOpen: a = !1,
|
|
2814
3003
|
onOpenChange: r,
|
|
2815
3004
|
peekHeight: c = "96px",
|
|
2816
3005
|
avatar: l,
|
|
2817
3006
|
paper: d,
|
|
2818
3007
|
avatarSize: u = 20,
|
|
2819
3008
|
className: h,
|
|
2820
|
-
...
|
|
3009
|
+
...p
|
|
2821
3010
|
}) {
|
|
2822
|
-
const [
|
|
2823
|
-
|
|
3011
|
+
const [f, _] = Rt(o, a, r), v = D(null), N = St(), m = fn(d), M = s || f;
|
|
3012
|
+
tt(() => {
|
|
2824
3013
|
if (!s) return;
|
|
2825
|
-
const y =
|
|
3014
|
+
const y = v.current;
|
|
2826
3015
|
y && (y.scrollTop = y.scrollHeight);
|
|
2827
3016
|
}, [t, s]);
|
|
2828
|
-
const
|
|
2829
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2830
|
-
s ? /* @__PURE__ */ g("div", { className:
|
|
2831
|
-
|
|
2832
|
-
/* @__PURE__ */
|
|
3017
|
+
const k = l === null ? null : l ?? /* @__PURE__ */ i(Qt, { size: u, state: "thinking", paper: m });
|
|
3018
|
+
return /* @__PURE__ */ g("div", { className: [mt.root, h].filter(Boolean).join(" "), ...p, children: [
|
|
3019
|
+
s ? /* @__PURE__ */ g("div", { className: mt.header, role: "status", "aria-live": "polite", children: [
|
|
3020
|
+
k && /* @__PURE__ */ i("span", { className: mt.mark, children: k }),
|
|
3021
|
+
/* @__PURE__ */ i("span", { className: mt.label, children: e })
|
|
2833
3022
|
] }) : /* @__PURE__ */ g(
|
|
2834
3023
|
"button",
|
|
2835
3024
|
{
|
|
2836
3025
|
type: "button",
|
|
2837
|
-
className: [
|
|
2838
|
-
"aria-expanded":
|
|
2839
|
-
"aria-controls":
|
|
2840
|
-
onClick: () => _(!
|
|
3026
|
+
className: [mt.header, mt.trigger].join(" "),
|
|
3027
|
+
"aria-expanded": f,
|
|
3028
|
+
"aria-controls": N,
|
|
3029
|
+
onClick: () => _(!f),
|
|
2841
3030
|
children: [
|
|
2842
|
-
/* @__PURE__ */
|
|
2843
|
-
/* @__PURE__ */
|
|
3031
|
+
/* @__PURE__ */ i("span", { className: mt.caret, children: f ? /* @__PURE__ */ i(en, { size: 14 }) : /* @__PURE__ */ i(nn, { size: 14 }) }),
|
|
3032
|
+
/* @__PURE__ */ i("span", { className: mt.label, children: n })
|
|
2844
3033
|
]
|
|
2845
3034
|
}
|
|
2846
3035
|
),
|
|
2847
|
-
|
|
3036
|
+
M && /* @__PURE__ */ i(
|
|
2848
3037
|
"div",
|
|
2849
3038
|
{
|
|
2850
|
-
id:
|
|
2851
|
-
ref:
|
|
2852
|
-
className: [
|
|
3039
|
+
id: N,
|
|
3040
|
+
ref: v,
|
|
3041
|
+
className: [mt.body, s && mt.peek].filter(Boolean).join(" "),
|
|
2853
3042
|
style: s ? { maxHeight: c } : void 0,
|
|
2854
3043
|
children: t
|
|
2855
3044
|
}
|
|
2856
3045
|
)
|
|
2857
3046
|
] });
|
|
2858
3047
|
}
|
|
2859
|
-
const
|
|
2860
|
-
root:
|
|
2861
|
-
avatar:
|
|
2862
|
-
label:
|
|
3048
|
+
const ra = "_root_1d7vi_1", ia = "_avatar_1d7vi_8", aa = "_label_1d7vi_14", pe = {
|
|
3049
|
+
root: ra,
|
|
3050
|
+
avatar: ia,
|
|
3051
|
+
label: aa
|
|
2863
3052
|
};
|
|
2864
|
-
function
|
|
3053
|
+
function Pa({
|
|
2865
3054
|
label: t = "Thinking…",
|
|
2866
3055
|
size: n = 24,
|
|
2867
3056
|
shape: e,
|
|
2868
3057
|
color: s,
|
|
2869
3058
|
paper: o,
|
|
2870
|
-
className:
|
|
3059
|
+
className: a,
|
|
2871
3060
|
...r
|
|
2872
3061
|
}) {
|
|
2873
|
-
const c =
|
|
3062
|
+
const c = fn(o);
|
|
2874
3063
|
return /* @__PURE__ */ g(
|
|
2875
3064
|
"div",
|
|
2876
3065
|
{
|
|
2877
|
-
className: [
|
|
3066
|
+
className: [pe.root, a].filter(Boolean).join(" "),
|
|
2878
3067
|
role: "status",
|
|
2879
3068
|
"aria-live": "polite",
|
|
2880
3069
|
...r,
|
|
2881
3070
|
children: [
|
|
2882
|
-
/* @__PURE__ */
|
|
2883
|
-
/* @__PURE__ */
|
|
3071
|
+
/* @__PURE__ */ i("span", { className: pe.avatar, children: /* @__PURE__ */ i(Qt, { size: n, state: "thinking", shape: e, color: s, paper: c }) }),
|
|
3072
|
+
/* @__PURE__ */ i("span", { className: pe.label, children: t })
|
|
2884
3073
|
]
|
|
2885
3074
|
}
|
|
2886
3075
|
);
|
|
2887
3076
|
}
|
|
2888
3077
|
export {
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
3078
|
+
Na as AiAssistantActionCard,
|
|
3079
|
+
za as AiAssistantAnswer,
|
|
3080
|
+
ga as AiAssistantBottom,
|
|
3081
|
+
bo as AiAssistantHeader,
|
|
3082
|
+
mr as AiAssistantImageGroup,
|
|
3083
|
+
ba as AiAssistantInput,
|
|
3084
|
+
va as AiAssistantLauncher,
|
|
3085
|
+
xa as AiAssistantLink,
|
|
3086
|
+
ma as AiAssistantModal,
|
|
3087
|
+
Ma as AiAssistantQuestion,
|
|
3088
|
+
$a as AiAssistantQuestionCard,
|
|
3089
|
+
Oa as AiAssistantReasoning,
|
|
3090
|
+
Ba as AiAssistantRecommendation,
|
|
3091
|
+
wa as AiAssistantReference,
|
|
3092
|
+
ka as AiAssistantReferencePanel,
|
|
3093
|
+
Aa as AiAssistantSecretField,
|
|
3094
|
+
Ta as AiAssistantSuggestion,
|
|
3095
|
+
Ia as AiAssistantSuggestions,
|
|
3096
|
+
Ca as AiAssistantTask,
|
|
3097
|
+
Pa as AiAssistantThinking,
|
|
3098
|
+
ya as AiAssistantTitle,
|
|
3099
|
+
Ra as AiAssistantToolCall,
|
|
3100
|
+
Ea as AiAssistantToolCallGroup,
|
|
3101
|
+
xs as COLORS,
|
|
3102
|
+
bs as COLOR_BY_ID,
|
|
3103
|
+
vs as DEFAULT_COLOR,
|
|
3104
|
+
ns as DEFAULT_EXPRESSION,
|
|
3105
|
+
gs as DEFAULT_SHAPE,
|
|
3106
|
+
rn as EXPRESSIONS,
|
|
3107
|
+
es as EXPRESSION_BY_ID,
|
|
3108
|
+
Hs as HALF_VIEWBOX,
|
|
3109
|
+
Qt as Novi,
|
|
3110
|
+
be as NoviEngine,
|
|
3111
|
+
_a as NoviInput,
|
|
3112
|
+
pa as NoviTile,
|
|
3113
|
+
Ys as PITCH,
|
|
3114
|
+
Ds as PITCH_MAX,
|
|
3115
|
+
zs as POSES,
|
|
3116
|
+
un as RADIUS,
|
|
3117
|
+
ha as SEQUENCE,
|
|
3118
|
+
cn as SHAPES,
|
|
3119
|
+
ys as SHAPE_BY_ID,
|
|
3120
|
+
hn as SPIN,
|
|
3121
|
+
Us as SPIN_TIME,
|
|
3122
|
+
dn as STATES,
|
|
3123
|
+
Ot as STATE_BY_ID,
|
|
3124
|
+
de as TURN_TIME,
|
|
3125
|
+
Fs as YAW_MAX,
|
|
3126
|
+
Xs as lookTarget,
|
|
3127
|
+
ks as mixHex,
|
|
3128
|
+
fa as spinLook,
|
|
3129
|
+
fn as usePaper
|
|
2940
3130
|
};
|