@factorialco/f0-react 1.412.0 → 1.413.1
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/{F0AiChat-CA_dpVxM.js → F0AiChat-CMz8oLke.js} +3407 -3367
- package/dist/F0AnalyticsDashboard-Doa70ufI.js +54136 -0
- package/dist/F0AnalyticsDashboard.css +1 -1
- package/dist/F0ChatDashboard.js +290 -2
- package/dist/{F0HILActionConfirmation-CasXGy89.js → F0HILActionConfirmation-MJSEogqB.js} +321 -315
- package/dist/{F0Input-JjjfHKNJ.js → F0Input-C9w04Jpr.js} +92 -93
- package/dist/ai.d.ts +106 -30
- package/dist/ai.js +43 -41
- package/dist/experimental.d.ts +4 -0
- package/dist/experimental.js +1902 -1998
- package/dist/f0.d.ts +106 -30
- package/dist/f0.js +250 -247
- package/dist/{index-DknFDvVm.js → index-Brt3Hz6G.js} +3 -3
- package/dist/useDataCollectionSource-CzKsWqw5.js +10111 -0
- package/dist/useDataCollectionSource.css +1 -0
- package/package.json +1 -1
- package/dist/F0AnalyticsDashboard-HOK1Grhk.js +0 -64242
- package/dist/F0ChatDashboard-e_oKQtbl.js +0 -292
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
import { jsx as q, jsxs as le } from "react/jsx-runtime";
|
|
2
2
|
import { useInsertionEffect as ze, createContext as Xe, useContext as Ye, useRef as B, useEffect as ie, useState as Ue, useCallback as $e, useMemo as qe } from "react";
|
|
3
|
-
import { r as He, i as je, m as Ke, a as Qe, b as Me, d as Je, c as Ze, f as et, e as tt, s as
|
|
3
|
+
import { r as He, i as je, m as Ke, a as Qe, b as Me, d as Je, c as Ze, f as et, e as tt, s as rt, g as Ne, p as nt, V as ot, h as it, j as st, k as at, S as ct, H as ut, v as se, l as lt, n as ft, o as ht, q as dt, t as mt, w as pt, F as fe, x as vt } from "./F0Input-C9w04Jpr.js";
|
|
4
4
|
import { useTrackVolume as gt } from "@livekit/components-react";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { G as wt } from "./F0AiChat-CMz8oLke.js";
|
|
6
|
+
function Tt(t, e, r) {
|
|
7
|
+
ze(() => t.on(e, r), [t, e, r]);
|
|
7
8
|
}
|
|
8
9
|
function ue(t) {
|
|
9
10
|
return typeof t == "object" && !Array.isArray(t);
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
return typeof t == "string" && ue(e) ? He(t,
|
|
12
|
+
function Oe(t, e, r, n) {
|
|
13
|
+
return typeof t == "string" && ue(e) ? He(t, r, n) : t instanceof NodeList ? Array.from(t) : Array.isArray(t) ? t : [t];
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function yt(t, e, r) {
|
|
15
16
|
return t * (e + 1);
|
|
16
17
|
}
|
|
17
|
-
function he(t, e,
|
|
18
|
-
return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, t + parseFloat(e)) : e === "<" ?
|
|
18
|
+
function he(t, e, r, n) {
|
|
19
|
+
return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, t + parseFloat(e)) : e === "<" ? r : n.get(e) ?? t;
|
|
19
20
|
}
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
return ((
|
|
21
|
+
const bt = (t, e, r) => {
|
|
22
|
+
const n = e - t;
|
|
23
|
+
return ((r - t) % n + n) % n + t;
|
|
23
24
|
};
|
|
24
25
|
function Be(t, e) {
|
|
25
|
-
return je(t) ? t[
|
|
26
|
+
return je(t) ? t[bt(0, t.length, e)] : t;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
for (let
|
|
29
|
-
const o = t[
|
|
30
|
-
o.at > e && o.at <
|
|
28
|
+
function Et(t, e, r) {
|
|
29
|
+
for (let n = 0; n < t.length; n++) {
|
|
30
|
+
const o = t[n];
|
|
31
|
+
o.at > e && o.at < r && (Qe(t, o), n--);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
34
|
+
function At(t, e, r, n, o, c) {
|
|
35
|
+
Et(t, o, c);
|
|
35
36
|
for (let m = 0; m < e.length; m++)
|
|
36
37
|
t.push({
|
|
37
38
|
value: e[m],
|
|
38
|
-
at: Ke(o, c,
|
|
39
|
-
easing: Be(
|
|
39
|
+
at: Ke(o, c, n[m]),
|
|
40
|
+
easing: Be(r, m)
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
|
-
function At(t, e) {
|
|
43
|
-
for (let n = 0; n < t.length; n++)
|
|
44
|
-
t[n] = t[n] / (e + 1);
|
|
45
|
-
}
|
|
46
43
|
function Rt(t, e) {
|
|
44
|
+
for (let r = 0; r < t.length; r++)
|
|
45
|
+
t[r] = t[r] / (e + 1);
|
|
46
|
+
}
|
|
47
|
+
function xt(t, e) {
|
|
47
48
|
return t.at === e.at ? t.value === null ? 1 : e.value === null ? -1 : 0 : t.at - e.at;
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
-
function
|
|
50
|
+
const St = "easeInOut", Lt = 20;
|
|
51
|
+
function Ct(t, { defaultTransition: e = {}, ...r } = {}, n, o) {
|
|
51
52
|
const c = e.duration || 0.3, m = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), v = {}, R = /* @__PURE__ */ new Map();
|
|
52
53
|
let p = 0, g = 0, x = 0;
|
|
53
54
|
for (let l = 0; l < t.length; l++) {
|
|
@@ -63,26 +64,26 @@ function Lt(t, { defaultTransition: e = {}, ...n } = {}, r, o) {
|
|
|
63
64
|
S.at !== void 0 && (g = he(g, S.at, p, R));
|
|
64
65
|
let C = 0;
|
|
65
66
|
const U = (y, w, I, P = 0, D = 0) => {
|
|
66
|
-
const A =
|
|
67
|
+
const A = It(y), { delay: f = 0, times: _ = Je(A), type: O = "keyframes", repeat: W, repeatType: k, repeatDelay: H = 0, ...z } = w;
|
|
67
68
|
let { ease: M = e.ease || "easeOut", duration: L } = w;
|
|
68
|
-
const
|
|
69
|
+
const N = typeof f == "function" ? f(P, D) : f, j = A.length, Z = tt(O) ? O : o?.[O];
|
|
69
70
|
if (j <= 2 && Z) {
|
|
70
71
|
let K = 100;
|
|
71
|
-
if (j === 2 &&
|
|
72
|
+
if (j === 2 && Pt(A)) {
|
|
72
73
|
const J = A[1] - A[0];
|
|
73
74
|
K = Math.abs(J);
|
|
74
75
|
}
|
|
75
76
|
const Q = { ...z };
|
|
76
|
-
L !== void 0 && (Q.duration =
|
|
77
|
+
L !== void 0 && (Q.duration = rt(L));
|
|
77
78
|
const ee = Ze(Q, K, Z);
|
|
78
79
|
M = ee.ease, L = ee.duration;
|
|
79
80
|
}
|
|
80
81
|
L ?? (L = c);
|
|
81
|
-
const $ = g +
|
|
82
|
+
const $ = g + N;
|
|
82
83
|
_.length === 1 && _[0] === 0 && (_[1] = 1);
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
|
|
84
|
+
const re = _.length - A.length;
|
|
85
|
+
if (re > 0 && et(_, re), A.length === 1 && A.unshift(null), W) {
|
|
86
|
+
Ne(W < Lt, "Repeat count too high, must be less than 20"), L = yt(L, W);
|
|
86
87
|
const K = [...A], Q = [..._];
|
|
87
88
|
M = Array.isArray(M) ? [...M] : [M];
|
|
88
89
|
const ee = [...M];
|
|
@@ -91,21 +92,21 @@ function Lt(t, { defaultTransition: e = {}, ...n } = {}, r, o) {
|
|
|
91
92
|
for (let i = 0; i < K.length; i++)
|
|
92
93
|
_.push(Q[i] + (J + 1)), M.push(i === 0 ? "linear" : Be(ee, i - 1));
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
+
Rt(_, W);
|
|
95
96
|
}
|
|
96
|
-
const
|
|
97
|
-
|
|
97
|
+
const ne = $ + L;
|
|
98
|
+
At(I, A, M, _, $, ne), C = Math.max(N + L, C), x = Math.max(ne, x);
|
|
98
99
|
};
|
|
99
100
|
if (Me(F)) {
|
|
100
101
|
const y = de(F, b);
|
|
101
102
|
U(d, S, me("default", y));
|
|
102
103
|
} else {
|
|
103
|
-
const y =
|
|
104
|
+
const y = Oe(F, d, n, v), w = y.length;
|
|
104
105
|
for (let I = 0; I < w; I++) {
|
|
105
106
|
d = d, S = S;
|
|
106
107
|
const P = y[I], D = de(P, b);
|
|
107
108
|
for (const A in d)
|
|
108
|
-
U(d[A],
|
|
109
|
+
U(d[A], _t(S, A), me(A, D), I, w);
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
p = g, g += C;
|
|
@@ -113,13 +114,13 @@ function Lt(t, { defaultTransition: e = {}, ...n } = {}, r, o) {
|
|
|
113
114
|
return b.forEach((l, T) => {
|
|
114
115
|
for (const F in l) {
|
|
115
116
|
const d = l[F];
|
|
116
|
-
d.sort(
|
|
117
|
+
d.sort(xt);
|
|
117
118
|
const S = [], C = [], U = [];
|
|
118
119
|
for (let w = 0; w < d.length; w++) {
|
|
119
120
|
const { at: I, value: P, easing: D } = d[w];
|
|
120
|
-
S.push(P), C.push(
|
|
121
|
+
S.push(P), C.push(nt(0, x, I)), U.push(D || "easeOut");
|
|
121
122
|
}
|
|
122
|
-
C[0] !== 0 && (C.unshift(0), S.unshift(S[0]), U.unshift(
|
|
123
|
+
C[0] !== 0 && (C.unshift(0), S.unshift(S[0]), U.unshift(St)), C[C.length - 1] !== 1 && (C.push(1), S.push(null)), m.has(T) || m.set(T, {
|
|
123
124
|
keyframes: {},
|
|
124
125
|
transition: {}
|
|
125
126
|
});
|
|
@@ -129,7 +130,7 @@ function Lt(t, { defaultTransition: e = {}, ...n } = {}, r, o) {
|
|
|
129
130
|
duration: x,
|
|
130
131
|
ease: U,
|
|
131
132
|
times: C,
|
|
132
|
-
...
|
|
133
|
+
...r
|
|
133
134
|
};
|
|
134
135
|
}
|
|
135
136
|
}), m;
|
|
@@ -140,49 +141,49 @@ function de(t, e) {
|
|
|
140
141
|
function me(t, e) {
|
|
141
142
|
return e[t] || (e[t] = []), e[t];
|
|
142
143
|
}
|
|
143
|
-
function
|
|
144
|
+
function It(t) {
|
|
144
145
|
return Array.isArray(t) ? t : [t];
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function _t(t, e) {
|
|
147
148
|
return t && t[e] ? {
|
|
148
149
|
...t,
|
|
149
150
|
...t[e]
|
|
150
151
|
} : { ...t };
|
|
151
152
|
}
|
|
152
|
-
const
|
|
153
|
-
function
|
|
153
|
+
const Ft = (t) => typeof t == "number", Pt = (t) => t.every(Ft);
|
|
154
|
+
function Ut(t, e) {
|
|
154
155
|
return t in e;
|
|
155
156
|
}
|
|
156
|
-
class
|
|
157
|
+
class Mt extends ot {
|
|
157
158
|
constructor() {
|
|
158
159
|
super(...arguments), this.type = "object";
|
|
159
160
|
}
|
|
160
|
-
readValueFromInstance(e,
|
|
161
|
-
if (
|
|
162
|
-
const
|
|
163
|
-
if (typeof
|
|
164
|
-
return
|
|
161
|
+
readValueFromInstance(e, r) {
|
|
162
|
+
if (Ut(r, e)) {
|
|
163
|
+
const n = e[r];
|
|
164
|
+
if (typeof n == "string" || typeof n == "number")
|
|
165
|
+
return n;
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
getBaseTargetFromProps() {
|
|
168
169
|
}
|
|
169
|
-
removeValueFromRenderState(e,
|
|
170
|
-
delete
|
|
170
|
+
removeValueFromRenderState(e, r) {
|
|
171
|
+
delete r.output[e];
|
|
171
172
|
}
|
|
172
173
|
measureInstanceViewportBox() {
|
|
173
174
|
return it();
|
|
174
175
|
}
|
|
175
|
-
build(e,
|
|
176
|
-
Object.assign(e.output,
|
|
176
|
+
build(e, r) {
|
|
177
|
+
Object.assign(e.output, r);
|
|
177
178
|
}
|
|
178
|
-
renderInstance(e, { output:
|
|
179
|
-
Object.assign(e,
|
|
179
|
+
renderInstance(e, { output: r }) {
|
|
180
|
+
Object.assign(e, r);
|
|
180
181
|
}
|
|
181
182
|
sortInstanceNodePosition() {
|
|
182
183
|
return 0;
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
|
-
function
|
|
186
|
+
function Nt(t) {
|
|
186
187
|
const e = {
|
|
187
188
|
presenceContext: null,
|
|
188
189
|
props: {},
|
|
@@ -196,8 +197,8 @@ function Mt(t) {
|
|
|
196
197
|
},
|
|
197
198
|
latestValues: {}
|
|
198
199
|
}
|
|
199
|
-
},
|
|
200
|
-
|
|
200
|
+
}, r = st(t) && !at(t) ? new ct(e) : new ut(e);
|
|
201
|
+
r.mount(t), se.set(t, r);
|
|
201
202
|
}
|
|
202
203
|
function Ot(t) {
|
|
203
204
|
const e = {
|
|
@@ -209,35 +210,35 @@ function Ot(t) {
|
|
|
209
210
|
},
|
|
210
211
|
latestValues: {}
|
|
211
212
|
}
|
|
212
|
-
},
|
|
213
|
-
|
|
213
|
+
}, r = new Mt(e);
|
|
214
|
+
r.mount(t), se.set(t, r);
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
+
function Bt(t, e) {
|
|
216
217
|
return Me(t) || typeof t == "number" || typeof t == "string" && !ue(e);
|
|
217
218
|
}
|
|
218
|
-
function De(t, e,
|
|
219
|
+
function De(t, e, r, n) {
|
|
219
220
|
const o = [];
|
|
220
|
-
if (
|
|
221
|
-
o.push(lt(t, ue(e) && e.default || e,
|
|
221
|
+
if (Bt(t, e))
|
|
222
|
+
o.push(lt(t, ue(e) && e.default || e, r && (r.default || r)));
|
|
222
223
|
else {
|
|
223
|
-
const c =
|
|
224
|
-
|
|
224
|
+
const c = Oe(t, e, n), m = c.length;
|
|
225
|
+
Ne(!!m, "No valid elements provided.");
|
|
225
226
|
for (let b = 0; b < m; b++) {
|
|
226
|
-
const v = c[b], R = v instanceof Element ?
|
|
227
|
+
const v = c[b], R = v instanceof Element ? Nt : Ot;
|
|
227
228
|
se.has(v) || R(v);
|
|
228
|
-
const p = se.get(v), g = { ...
|
|
229
|
+
const p = se.get(v), g = { ...r };
|
|
229
230
|
"delay" in g && typeof g.delay == "function" && (g.delay = g.delay(b, m)), o.push(...ft(p, { ...e, transition: g }, {}));
|
|
230
231
|
}
|
|
231
232
|
}
|
|
232
233
|
return o;
|
|
233
234
|
}
|
|
234
|
-
function
|
|
235
|
-
const
|
|
236
|
-
return
|
|
237
|
-
|
|
238
|
-
}),
|
|
235
|
+
function Dt(t, e, r) {
|
|
236
|
+
const n = [];
|
|
237
|
+
return Ct(t, e, r, { spring: ht }).forEach(({ keyframes: c, transition: m }, b) => {
|
|
238
|
+
n.push(...De(b, c, m));
|
|
239
|
+
}), n;
|
|
239
240
|
}
|
|
240
|
-
class
|
|
241
|
+
class Vt {
|
|
241
242
|
constructor(e) {
|
|
242
243
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
243
244
|
}
|
|
@@ -250,15 +251,15 @@ class Dt {
|
|
|
250
251
|
getAll(e) {
|
|
251
252
|
return this.animations[0][e];
|
|
252
253
|
}
|
|
253
|
-
setAll(e,
|
|
254
|
-
for (let
|
|
255
|
-
this.animations[
|
|
254
|
+
setAll(e, r) {
|
|
255
|
+
for (let n = 0; n < this.animations.length; n++)
|
|
256
|
+
this.animations[n][e] = r;
|
|
256
257
|
}
|
|
257
258
|
attachTimeline(e) {
|
|
258
|
-
const
|
|
259
|
+
const r = this.animations.map((n) => n.attachTimeline(e));
|
|
259
260
|
return () => {
|
|
260
|
-
|
|
261
|
-
|
|
261
|
+
r.forEach((n, o) => {
|
|
262
|
+
n && n(), this.animations[o].stop();
|
|
262
263
|
});
|
|
263
264
|
};
|
|
264
265
|
}
|
|
@@ -282,12 +283,12 @@ class Dt {
|
|
|
282
283
|
}
|
|
283
284
|
get duration() {
|
|
284
285
|
let e = 0;
|
|
285
|
-
for (let
|
|
286
|
-
e = Math.max(e, this.animations[
|
|
286
|
+
for (let r = 0; r < this.animations.length; r++)
|
|
287
|
+
e = Math.max(e, this.animations[r].duration);
|
|
287
288
|
return e;
|
|
288
289
|
}
|
|
289
290
|
runAll(e) {
|
|
290
|
-
this.animations.forEach((
|
|
291
|
+
this.animations.forEach((r) => r[e]());
|
|
291
292
|
}
|
|
292
293
|
play() {
|
|
293
294
|
this.runAll("play");
|
|
@@ -302,27 +303,27 @@ class Dt {
|
|
|
302
303
|
this.runAll("complete");
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
|
-
class
|
|
306
|
-
then(e,
|
|
306
|
+
class Gt extends Vt {
|
|
307
|
+
then(e, r) {
|
|
307
308
|
return this.finished.finally(e).then(() => {
|
|
308
309
|
});
|
|
309
310
|
}
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
+
function kt(t) {
|
|
312
313
|
return Array.isArray(t) && t.some(Array.isArray);
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
-
function e(
|
|
315
|
+
function Wt(t) {
|
|
316
|
+
function e(r, n, o) {
|
|
316
317
|
let c = [];
|
|
317
|
-
return
|
|
318
|
+
return kt(r) ? c = Dt(r, n, t) : c = De(r, n, o, t), new Gt(c);
|
|
318
319
|
}
|
|
319
320
|
return e;
|
|
320
321
|
}
|
|
321
|
-
const
|
|
322
|
+
const zt = Wt(), Er = ["xs", "sm", "md", "lg"], Ar = [
|
|
322
323
|
"inProgress",
|
|
323
324
|
"executing",
|
|
324
325
|
"completed"
|
|
325
|
-
],
|
|
326
|
+
], Rr = {
|
|
326
327
|
ai: {
|
|
327
328
|
openChat: "Open Chat with One AI",
|
|
328
329
|
closeChat: "Close Chat with One AI",
|
|
@@ -383,13 +384,13 @@ const Wt = kt(), yn = ["xs", "sm", "md", "lg"], bn = [
|
|
|
383
384
|
discardChanges: "Discard"
|
|
384
385
|
}
|
|
385
386
|
}, Ve = Xe(null);
|
|
386
|
-
function
|
|
387
|
+
function xr({
|
|
387
388
|
children: t,
|
|
388
389
|
translations: e
|
|
389
390
|
}) {
|
|
390
391
|
return /* @__PURE__ */ q(Ve.Provider, { value: e, children: t });
|
|
391
392
|
}
|
|
392
|
-
function
|
|
393
|
+
function Sr() {
|
|
393
394
|
const t = Ye(Ve);
|
|
394
395
|
if (t === null)
|
|
395
396
|
throw new Error(
|
|
@@ -397,8 +398,8 @@ function Rn() {
|
|
|
397
398
|
);
|
|
398
399
|
return t;
|
|
399
400
|
}
|
|
400
|
-
function pe(t, e,
|
|
401
|
-
const o = Math.max(1, Math.min(t, e)), c = Math.min(
|
|
401
|
+
function pe(t, e, r, n) {
|
|
402
|
+
const o = Math.max(1, Math.min(t, e)), c = Math.min(r, 20), b = Math.min(c + n, o), v = Math.min(b, Math.floor(t / 2)), R = Math.min(b, Math.floor(e / 2)), p = ($) => $ / t * 2 - 1, g = ($) => $ / e * 2 - 1, x = 0, l = t, T = 0, F = e, d = v, S = t - v, C = R, U = e - R, y = p(x), w = p(l), I = g(T), P = g(F), D = p(d), A = p(S), f = g(C), _ = g(U), O = 0, W = 0, k = 1, H = 1, z = v / t, M = 1 - v / t, L = R / e, N = 1 - R / e, j = new Float32Array([
|
|
402
403
|
// Top strip
|
|
403
404
|
y,
|
|
404
405
|
I,
|
|
@@ -453,79 +454,79 @@ function pe(t, e, n, r) {
|
|
|
453
454
|
_
|
|
454
455
|
]), Z = new Float32Array([
|
|
455
456
|
// Top strip
|
|
456
|
-
|
|
457
|
+
O,
|
|
457
458
|
W,
|
|
458
459
|
k,
|
|
459
460
|
W,
|
|
460
|
-
|
|
461
|
+
O,
|
|
461
462
|
L,
|
|
462
|
-
|
|
463
|
+
O,
|
|
463
464
|
L,
|
|
464
465
|
k,
|
|
465
466
|
W,
|
|
466
467
|
k,
|
|
467
468
|
L,
|
|
468
469
|
// Bottom strip
|
|
469
|
-
N,
|
|
470
470
|
O,
|
|
471
|
+
N,
|
|
471
472
|
k,
|
|
472
|
-
O,
|
|
473
473
|
N,
|
|
474
|
+
O,
|
|
474
475
|
H,
|
|
475
|
-
|
|
476
|
+
O,
|
|
476
477
|
H,
|
|
477
478
|
k,
|
|
478
|
-
|
|
479
|
+
N,
|
|
479
480
|
k,
|
|
480
481
|
H,
|
|
481
482
|
// Left strip
|
|
482
|
-
|
|
483
|
+
O,
|
|
483
484
|
L,
|
|
484
485
|
z,
|
|
485
486
|
L,
|
|
486
|
-
N,
|
|
487
487
|
O,
|
|
488
488
|
N,
|
|
489
489
|
O,
|
|
490
|
+
N,
|
|
490
491
|
z,
|
|
491
492
|
L,
|
|
492
493
|
z,
|
|
493
|
-
|
|
494
|
+
N,
|
|
494
495
|
// Right strip
|
|
495
496
|
M,
|
|
496
497
|
L,
|
|
497
498
|
k,
|
|
498
499
|
L,
|
|
499
500
|
M,
|
|
500
|
-
|
|
501
|
+
N,
|
|
501
502
|
M,
|
|
502
|
-
|
|
503
|
+
N,
|
|
503
504
|
k,
|
|
504
505
|
L,
|
|
505
506
|
k,
|
|
506
|
-
|
|
507
|
+
N
|
|
507
508
|
]);
|
|
508
509
|
return { positions: j, uvs: Z };
|
|
509
510
|
}
|
|
510
|
-
function ve(t, e,
|
|
511
|
-
const
|
|
512
|
-
if (!
|
|
513
|
-
if (t.shaderSource(
|
|
514
|
-
const o = t.getShaderInfoLog(
|
|
515
|
-
throw t.deleteShader(
|
|
511
|
+
function ve(t, e, r) {
|
|
512
|
+
const n = t.createShader(e);
|
|
513
|
+
if (!n) throw new Error("Failed to create shader");
|
|
514
|
+
if (t.shaderSource(n, r), t.compileShader(n), !t.getShaderParameter(n, t.COMPILE_STATUS)) {
|
|
515
|
+
const o = t.getShaderInfoLog(n) || "Unknown shader error";
|
|
516
|
+
throw t.deleteShader(n), new Error(o);
|
|
516
517
|
}
|
|
517
|
-
return
|
|
518
|
+
return n;
|
|
518
519
|
}
|
|
519
|
-
function
|
|
520
|
-
const
|
|
520
|
+
function Xt(t, e, r) {
|
|
521
|
+
const n = ve(t, t.VERTEX_SHADER, e), o = ve(t, t.FRAGMENT_SHADER, r), c = t.createProgram();
|
|
521
522
|
if (!c) throw new Error("Failed to create program");
|
|
522
|
-
if (t.attachShader(c,
|
|
523
|
+
if (t.attachShader(c, n), t.attachShader(c, o), t.linkProgram(c), !t.getProgramParameter(c, t.LINK_STATUS)) {
|
|
523
524
|
const m = t.getProgramInfoLog(c) || "Unknown link error";
|
|
524
|
-
throw t.deleteProgram(c), t.deleteShader(
|
|
525
|
+
throw t.deleteProgram(c), t.deleteShader(n), t.deleteShader(o), new Error(m);
|
|
525
526
|
}
|
|
526
|
-
return t.deleteShader(
|
|
527
|
+
return t.deleteShader(n), t.deleteShader(o), c;
|
|
527
528
|
}
|
|
528
|
-
const
|
|
529
|
+
const Yt = `#version 300 es
|
|
529
530
|
precision lowp float;
|
|
530
531
|
|
|
531
532
|
in vec2 vUV;
|
|
@@ -731,7 +732,8 @@ void main() {
|
|
|
731
732
|
float alpha = mix(glow, 1.0, border);
|
|
732
733
|
|
|
733
734
|
outColor = vec4(color, alpha);
|
|
734
|
-
}
|
|
735
|
+
}
|
|
736
|
+
`, $t = `#version 300 es
|
|
735
737
|
|
|
736
738
|
in vec2 aPosition;
|
|
737
739
|
in vec2 aUV;
|
|
@@ -739,7 +741,8 @@ out vec2 vUV;
|
|
|
739
741
|
void main() {
|
|
740
742
|
vUV = aUV;
|
|
741
743
|
gl_Position = vec4(aPosition, 0.0, 1.0);
|
|
742
|
-
}
|
|
744
|
+
}
|
|
745
|
+
`, qt = [
|
|
743
746
|
"rgb(229, 25, 67)",
|
|
744
747
|
// #E51943 red
|
|
745
748
|
"rgb(229, 86, 25)",
|
|
@@ -749,14 +752,14 @@ void main() {
|
|
|
749
752
|
"rgb(161, 173, 229)"
|
|
750
753
|
// #A1ADE5 light blue
|
|
751
754
|
];
|
|
752
|
-
function
|
|
755
|
+
function Ht(t) {
|
|
753
756
|
const e = t.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
754
757
|
if (!e)
|
|
755
758
|
throw new Error(`Invalid color format: ${t}`);
|
|
756
|
-
const [,
|
|
757
|
-
return [parseInt(
|
|
759
|
+
const [, r, n, o] = e;
|
|
760
|
+
return [parseInt(r) / 255, parseInt(n) / 255, parseInt(o) / 255];
|
|
758
761
|
}
|
|
759
|
-
class
|
|
762
|
+
class Lr {
|
|
760
763
|
element;
|
|
761
764
|
canvas;
|
|
762
765
|
options;
|
|
@@ -798,10 +801,10 @@ class xn {
|
|
|
798
801
|
const e = () => {
|
|
799
802
|
if (!this.running || !this.glr) return;
|
|
800
803
|
this.rafId = requestAnimationFrame(e);
|
|
801
|
-
const
|
|
802
|
-
if (
|
|
803
|
-
this.lastTime =
|
|
804
|
-
const o = (
|
|
804
|
+
const r = performance.now();
|
|
805
|
+
if (r - this.lastTime < 1e3 / 32) return;
|
|
806
|
+
this.lastTime = r;
|
|
807
|
+
const o = (r - this.startTime) * 1e-3;
|
|
805
808
|
this.render(o);
|
|
806
809
|
};
|
|
807
810
|
this.rafId = requestAnimationFrame(e);
|
|
@@ -813,14 +816,14 @@ class xn {
|
|
|
813
816
|
dispose() {
|
|
814
817
|
if (this.disposed) return;
|
|
815
818
|
this.disposed = !0, this.running = !1, this.rafId !== null && cancelAnimationFrame(this.rafId);
|
|
816
|
-
const { gl: e, vao:
|
|
817
|
-
|
|
819
|
+
const { gl: e, vao: r, positionBuffer: n, uvBuffer: o, program: c } = this.glr;
|
|
820
|
+
r && e.deleteVertexArray(r), n && e.deleteBuffer(n), o && e.deleteBuffer(o), e.deleteProgram(c), this.observer && this.observer.disconnect(), this.canvas.remove();
|
|
818
821
|
}
|
|
819
|
-
resize(e,
|
|
822
|
+
resize(e, r, n) {
|
|
820
823
|
if (this.disposed) throw new Error("Mask instance has been disposed.");
|
|
821
|
-
if (this.options.width = e, this.options.height =
|
|
822
|
-
const { gl: o, program: c, vao: m, positionBuffer: b, uvBuffer: v, uResolution: R } = this.glr, p =
|
|
823
|
-
this.canvas.style.width = `${e}px`, this.canvas.style.height = `${
|
|
824
|
+
if (this.options.width = e, this.options.height = r, n && (this.options.ratio = n), !this.running) return;
|
|
825
|
+
const { gl: o, program: c, vao: m, positionBuffer: b, uvBuffer: v, uResolution: R } = this.glr, p = n ?? this.options.ratio ?? window.devicePixelRatio ?? 1, g = Math.max(1, Math.floor(e * p)), x = Math.max(1, Math.floor(r * p));
|
|
826
|
+
this.canvas.style.width = `${e}px`, this.canvas.style.height = `${r}px`, (this.canvas.width !== g || this.canvas.height !== x) && (this.canvas.width = g, this.canvas.height = x), o.viewport(0, 0, this.canvas.width, this.canvas.height), this.checkGLError(o, "resize: after viewport setup");
|
|
824
827
|
const { positions: l, uvs: T } = pe(
|
|
825
828
|
this.canvas.width,
|
|
826
829
|
this.canvas.height,
|
|
@@ -843,46 +846,46 @@ class xn {
|
|
|
843
846
|
*/
|
|
844
847
|
autoResize(e) {
|
|
845
848
|
this.observer && this.observer.disconnect(), this.observer = new ResizeObserver(() => {
|
|
846
|
-
const
|
|
847
|
-
this.resize(
|
|
849
|
+
const r = e.getBoundingClientRect();
|
|
850
|
+
this.resize(r.width, r.height);
|
|
848
851
|
}), this.observer.observe(e);
|
|
849
852
|
}
|
|
850
853
|
fadeIn() {
|
|
851
854
|
if (this.disposed) throw new Error("Mask instance has been disposed.");
|
|
852
|
-
return new Promise((e,
|
|
853
|
-
const
|
|
855
|
+
return new Promise((e, r) => {
|
|
856
|
+
const n = this.canvas.animate(
|
|
854
857
|
[
|
|
855
858
|
{ opacity: 0, transform: "scale(1.2)" },
|
|
856
859
|
{ opacity: 1, transform: "scale(1)" }
|
|
857
860
|
],
|
|
858
861
|
{ duration: 300, easing: "ease-out", fill: "forwards" }
|
|
859
862
|
);
|
|
860
|
-
|
|
863
|
+
n.onfinish = () => e(), n.oncancel = () => r("canceled");
|
|
861
864
|
});
|
|
862
865
|
}
|
|
863
866
|
fadeOut() {
|
|
864
867
|
if (this.disposed) throw new Error("Mask instance has been disposed.");
|
|
865
|
-
return new Promise((e,
|
|
866
|
-
const
|
|
868
|
+
return new Promise((e, r) => {
|
|
869
|
+
const n = this.canvas.animate(
|
|
867
870
|
[
|
|
868
871
|
{ opacity: 1, transform: "scale(1)" },
|
|
869
872
|
{ opacity: 0, transform: "scale(1.2)" }
|
|
870
873
|
],
|
|
871
874
|
{ duration: 300, easing: "ease-in", fill: "forwards" }
|
|
872
875
|
);
|
|
873
|
-
|
|
876
|
+
n.onfinish = () => e(), n.oncancel = () => r("canceled");
|
|
874
877
|
});
|
|
875
878
|
}
|
|
876
|
-
checkGLError(e,
|
|
877
|
-
let
|
|
878
|
-
if (
|
|
879
|
-
for (console.error(`WebGL Error in ${
|
|
880
|
-
const o = this.getGLErrorName(e,
|
|
881
|
-
console.error(`${o} (0x${
|
|
879
|
+
checkGLError(e, r) {
|
|
880
|
+
let n = e.getError();
|
|
881
|
+
if (n !== e.NO_ERROR)
|
|
882
|
+
for (console.error(`WebGL Error in ${r}`); n !== e.NO_ERROR; ) {
|
|
883
|
+
const o = this.getGLErrorName(e, n);
|
|
884
|
+
console.error(`${o} (0x${n.toString(16)})`), n = e.getError();
|
|
882
885
|
}
|
|
883
886
|
}
|
|
884
|
-
getGLErrorName(e,
|
|
885
|
-
switch (
|
|
887
|
+
getGLErrorName(e, r) {
|
|
888
|
+
switch (r) {
|
|
886
889
|
case e.INVALID_ENUM:
|
|
887
890
|
return "INVALID_ENUM";
|
|
888
891
|
case e.INVALID_VALUE:
|
|
@@ -906,10 +909,10 @@ class xn {
|
|
|
906
909
|
});
|
|
907
910
|
if (!e)
|
|
908
911
|
throw new Error("WebGL2 is required but not available.");
|
|
909
|
-
const
|
|
912
|
+
const r = Xt(e, $t, Yt);
|
|
910
913
|
this.checkGLError(e, "setupGL: after createProgram");
|
|
911
|
-
const
|
|
912
|
-
e.bindVertexArray(
|
|
914
|
+
const n = e.createVertexArray();
|
|
915
|
+
e.bindVertexArray(n), this.checkGLError(e, "setupGL: after VAO creation");
|
|
913
916
|
const o = this.canvas.width || 2, c = this.canvas.height || 2, { positions: m, uvs: b } = pe(
|
|
914
917
|
o,
|
|
915
918
|
c,
|
|
@@ -917,24 +920,24 @@ class xn {
|
|
|
917
920
|
this.options.glowWidth
|
|
918
921
|
), v = e.createBuffer();
|
|
919
922
|
e.bindBuffer(e.ARRAY_BUFFER, v), e.bufferData(e.ARRAY_BUFFER, m, e.STATIC_DRAW);
|
|
920
|
-
const R = e.getAttribLocation(
|
|
923
|
+
const R = e.getAttribLocation(r, "aPosition");
|
|
921
924
|
e.enableVertexAttribArray(R), e.vertexAttribPointer(R, 2, e.FLOAT, !1, 0, 0), this.checkGLError(e, "setupGL: after position buffer setup");
|
|
922
925
|
const p = e.createBuffer();
|
|
923
926
|
e.bindBuffer(e.ARRAY_BUFFER, p), e.bufferData(e.ARRAY_BUFFER, b, e.STATIC_DRAW);
|
|
924
|
-
const g = e.getAttribLocation(
|
|
927
|
+
const g = e.getAttribLocation(r, "aUV");
|
|
925
928
|
e.enableVertexAttribArray(g), e.vertexAttribPointer(g, 2, e.FLOAT, !1, 0, 0), this.checkGLError(e, "setupGL: after UV buffer setup");
|
|
926
|
-
const x = e.getUniformLocation(
|
|
927
|
-
e.useProgram(
|
|
928
|
-
const y = (this.options.colors ||
|
|
929
|
+
const x = e.getUniformLocation(r, "uResolution"), l = e.getUniformLocation(r, "uTime"), T = e.getUniformLocation(r, "uBorderWidth"), F = e.getUniformLocation(r, "uGlowWidth"), d = e.getUniformLocation(r, "uBorderRadius"), S = e.getUniformLocation(r, "uColors"), C = e.getUniformLocation(r, "uGlowExponent"), U = e.getUniformLocation(r, "uGlowFactor");
|
|
930
|
+
e.useProgram(r), e.uniform1f(T, this.options.borderWidth), e.uniform1f(F, this.options.glowWidth), e.uniform1f(d, this.options.borderRadius), this.options.mode === "dark" ? (e.uniform1f(C, 2), e.uniform1f(U, 1.8)) : (e.uniform1f(C, 1), e.uniform1f(U, 1));
|
|
931
|
+
const y = (this.options.colors || qt).map(Ht);
|
|
929
932
|
for (let w = 0; w < y.length; w++)
|
|
930
933
|
e.uniform3f(
|
|
931
|
-
e.getUniformLocation(
|
|
934
|
+
e.getUniformLocation(r, `uColors[${w}]`),
|
|
932
935
|
...y[w]
|
|
933
936
|
);
|
|
934
937
|
this.checkGLError(e, "setupGL: after uniform setup"), e.bindVertexArray(null), e.bindBuffer(e.ARRAY_BUFFER, null), this.glr = {
|
|
935
938
|
gl: e,
|
|
936
|
-
program:
|
|
937
|
-
vao:
|
|
939
|
+
program: r,
|
|
940
|
+
vao: n,
|
|
938
941
|
positionBuffer: v,
|
|
939
942
|
uvBuffer: p,
|
|
940
943
|
uResolution: x,
|
|
@@ -947,75 +950,75 @@ class xn {
|
|
|
947
950
|
}
|
|
948
951
|
render(e) {
|
|
949
952
|
if (!this.glr) return;
|
|
950
|
-
const { gl:
|
|
951
|
-
|
|
953
|
+
const { gl: r, program: n, vao: o, uTime: c } = this.glr;
|
|
954
|
+
r.useProgram(n), r.bindVertexArray(o), r.uniform1f(c, e), r.disable(r.DEPTH_TEST), r.disable(r.CULL_FACE), r.disable(r.BLEND), r.clearColor(0, 0, 0, 0), r.clear(r.COLOR_BUFFER_BIT), r.drawArrays(r.TRIANGLES, 0, 24), this.checkGLError(r, "render: after draw call"), r.bindVertexArray(null);
|
|
952
955
|
}
|
|
953
956
|
}
|
|
954
|
-
const ge = ["lowp", "mediump", "highp"],
|
|
957
|
+
const ge = ["lowp", "mediump", "highp"], jt = `
|
|
955
958
|
void main(void){
|
|
956
959
|
vec4 color = vec4(0.0,0.0,0.0,1.0);
|
|
957
960
|
mainImage( color, gl_FragCoord.xy );
|
|
958
961
|
gl_FragColor = color;
|
|
959
|
-
}`,
|
|
962
|
+
}`, Kt = `void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
|
|
960
963
|
vec2 uv = fragCoord/iResolution.xy;
|
|
961
964
|
vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
|
|
962
965
|
fragColor = vec4(col,1.0);
|
|
963
966
|
}`, we = `attribute vec3 aVertexPosition;
|
|
964
967
|
void main(void) {
|
|
965
968
|
gl_Position = vec4(aVertexPosition, 1.0);
|
|
966
|
-
}`, Te = "iTime", ye = "iTimeDelta", be = "iDate", Ee = "iFrame", Ae = "iMouse", Re = "iResolution",
|
|
967
|
-
function
|
|
969
|
+
}`, Te = "iTime", ye = "iTimeDelta", be = "iDate", Ee = "iFrame", Ae = "iMouse", Re = "iResolution", Qt = "iChannel", xe = "iChannelResolution", Se = "iDeviceOrientation";
|
|
970
|
+
function Jt(t, e) {
|
|
968
971
|
return t.includes("Matrix") && Array.isArray(e);
|
|
969
972
|
}
|
|
970
|
-
function
|
|
973
|
+
function Zt(t, e) {
|
|
971
974
|
return t.includes("v") && Array.isArray(e) && e.length > Number.parseInt(t.charAt(0));
|
|
972
975
|
}
|
|
973
|
-
function
|
|
976
|
+
function er(t, e) {
|
|
974
977
|
return !t.includes("v") && Array.isArray(e) && e.length > Number.parseInt(t.charAt(0));
|
|
975
978
|
}
|
|
976
|
-
const
|
|
977
|
-
if (
|
|
978
|
-
switch (
|
|
979
|
+
const tr = (t, e, r, n) => {
|
|
980
|
+
if (er(r, n))
|
|
981
|
+
switch (r) {
|
|
979
982
|
case "2f":
|
|
980
|
-
return t.uniform2f(e,
|
|
983
|
+
return t.uniform2f(e, n[0], n[1]);
|
|
981
984
|
case "3f":
|
|
982
|
-
return t.uniform3f(e,
|
|
985
|
+
return t.uniform3f(e, n[0], n[1], n[2]);
|
|
983
986
|
case "4f":
|
|
984
|
-
return t.uniform4f(e,
|
|
987
|
+
return t.uniform4f(e, n[0], n[1], n[2], n[3]);
|
|
985
988
|
case "2i":
|
|
986
|
-
return t.uniform2i(e,
|
|
989
|
+
return t.uniform2i(e, n[0], n[1]);
|
|
987
990
|
case "3i":
|
|
988
|
-
return t.uniform3i(e,
|
|
991
|
+
return t.uniform3i(e, n[0], n[1], n[2]);
|
|
989
992
|
case "4i":
|
|
990
|
-
return t.uniform4i(e,
|
|
993
|
+
return t.uniform4i(e, n[0], n[1], n[2], n[3]);
|
|
991
994
|
}
|
|
992
|
-
if (typeof
|
|
993
|
-
return
|
|
994
|
-
switch (
|
|
995
|
+
if (typeof n == "number")
|
|
996
|
+
return r === "1i" ? t.uniform1i(e, n) : t.uniform1f(e, n);
|
|
997
|
+
switch (r) {
|
|
995
998
|
case "1iv":
|
|
996
|
-
return t.uniform1iv(e,
|
|
999
|
+
return t.uniform1iv(e, n);
|
|
997
1000
|
case "2iv":
|
|
998
|
-
return t.uniform2iv(e,
|
|
1001
|
+
return t.uniform2iv(e, n);
|
|
999
1002
|
case "3iv":
|
|
1000
|
-
return t.uniform3iv(e,
|
|
1003
|
+
return t.uniform3iv(e, n);
|
|
1001
1004
|
case "4iv":
|
|
1002
|
-
return t.uniform4iv(e,
|
|
1005
|
+
return t.uniform4iv(e, n);
|
|
1003
1006
|
case "1fv":
|
|
1004
|
-
return t.uniform1fv(e,
|
|
1007
|
+
return t.uniform1fv(e, n);
|
|
1005
1008
|
case "2fv":
|
|
1006
|
-
return t.uniform2fv(e,
|
|
1009
|
+
return t.uniform2fv(e, n);
|
|
1007
1010
|
case "3fv":
|
|
1008
|
-
return t.uniform3fv(e,
|
|
1011
|
+
return t.uniform3fv(e, n);
|
|
1009
1012
|
case "4fv":
|
|
1010
|
-
return t.uniform4fv(e,
|
|
1013
|
+
return t.uniform4fv(e, n);
|
|
1011
1014
|
case "Matrix2fv":
|
|
1012
|
-
return t.uniformMatrix2fv(e, !1,
|
|
1015
|
+
return t.uniformMatrix2fv(e, !1, n);
|
|
1013
1016
|
case "Matrix3fv":
|
|
1014
|
-
return t.uniformMatrix3fv(e, !1,
|
|
1017
|
+
return t.uniformMatrix3fv(e, !1, n);
|
|
1015
1018
|
case "Matrix4fv":
|
|
1016
|
-
return t.uniformMatrix4fv(e, !1,
|
|
1019
|
+
return t.uniformMatrix4fv(e, !1, n);
|
|
1017
1020
|
}
|
|
1018
|
-
},
|
|
1021
|
+
}, rr = (t) => {
|
|
1019
1022
|
switch (t) {
|
|
1020
1023
|
case "1f":
|
|
1021
1024
|
return "float";
|
|
@@ -1062,8 +1065,8 @@ const en = (t, e, n, r) => {
|
|
|
1062
1065
|
)
|
|
1063
1066
|
);
|
|
1064
1067
|
}
|
|
1065
|
-
}, ce = 9729, Le = 9728,
|
|
1066
|
-
class
|
|
1068
|
+
}, ce = 9729, Le = 9728, nr = 9987, Ce = 33071, Ie = 10497;
|
|
1069
|
+
class or {
|
|
1067
1070
|
gl;
|
|
1068
1071
|
url;
|
|
1069
1072
|
wrapS;
|
|
@@ -1081,37 +1084,37 @@ class rn {
|
|
|
1081
1084
|
constructor(e) {
|
|
1082
1085
|
this.gl = e;
|
|
1083
1086
|
}
|
|
1084
|
-
updateTexture = (e,
|
|
1087
|
+
updateTexture = (e, r, n) => {
|
|
1085
1088
|
const { gl: o } = this, c = 0, m = o.RGBA, b = o.RGBA, v = o.UNSIGNED_BYTE;
|
|
1086
|
-
o.bindTexture(o.TEXTURE_2D, e), o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,
|
|
1089
|
+
o.bindTexture(o.TEXTURE_2D, e), o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL, n), o.texImage2D(
|
|
1087
1090
|
o.TEXTURE_2D,
|
|
1088
1091
|
c,
|
|
1089
1092
|
m,
|
|
1090
1093
|
b,
|
|
1091
1094
|
v,
|
|
1092
|
-
|
|
1095
|
+
r
|
|
1093
1096
|
);
|
|
1094
1097
|
};
|
|
1095
1098
|
setupVideo = (e) => {
|
|
1096
|
-
const
|
|
1097
|
-
let
|
|
1098
|
-
|
|
1099
|
+
const r = document.createElement("video");
|
|
1100
|
+
let n = !1, o = !1;
|
|
1101
|
+
r.autoplay = !0, r.muted = !0, r.loop = !0, r.crossOrigin = "anonymous";
|
|
1099
1102
|
const c = () => {
|
|
1100
|
-
|
|
1103
|
+
n && o && (this.isLoaded = !0);
|
|
1101
1104
|
};
|
|
1102
|
-
return
|
|
1105
|
+
return r.addEventListener(
|
|
1103
1106
|
"playing",
|
|
1104
1107
|
() => {
|
|
1105
|
-
|
|
1108
|
+
n = !0, this.width = r.videoWidth || 0, this.height = r.videoHeight || 0, c();
|
|
1106
1109
|
},
|
|
1107
1110
|
!0
|
|
1108
|
-
),
|
|
1111
|
+
), r.addEventListener(
|
|
1109
1112
|
"timeupdate",
|
|
1110
1113
|
() => {
|
|
1111
1114
|
o = !0, c();
|
|
1112
1115
|
},
|
|
1113
1116
|
!0
|
|
1114
|
-
),
|
|
1117
|
+
), r.src = e, r;
|
|
1115
1118
|
};
|
|
1116
1119
|
makePowerOf2 = (e) => e instanceof HTMLImageElement || e instanceof HTMLCanvasElement || e instanceof ImageBitmap ? (this.pow2canvas === void 0 && (this.pow2canvas = document.createElement("canvas")), this.pow2canvas.width = 2 ** Math.floor(Math.log(e.width) / Math.LN2), this.pow2canvas.height = 2 ** Math.floor(Math.log(e.height) / Math.LN2), this.pow2canvas.getContext("2d")?.drawImage(
|
|
1117
1120
|
e,
|
|
@@ -1125,15 +1128,15 @@ class rn {
|
|
|
1125
1128
|
)
|
|
1126
1129
|
), this.pow2canvas) : e;
|
|
1127
1130
|
load = async (e) => {
|
|
1128
|
-
const { gl:
|
|
1129
|
-
url:
|
|
1131
|
+
const { gl: r } = this, {
|
|
1132
|
+
url: n,
|
|
1130
1133
|
wrapS: o,
|
|
1131
1134
|
wrapT: c,
|
|
1132
1135
|
minFilter: m,
|
|
1133
1136
|
magFilter: b,
|
|
1134
1137
|
flipY: v = -1
|
|
1135
1138
|
} = e;
|
|
1136
|
-
if (!
|
|
1139
|
+
if (!n)
|
|
1137
1140
|
return Promise.reject(
|
|
1138
1141
|
new Error(
|
|
1139
1142
|
Y(
|
|
@@ -1141,19 +1144,19 @@ class rn {
|
|
|
1141
1144
|
)
|
|
1142
1145
|
)
|
|
1143
1146
|
);
|
|
1144
|
-
const R = /(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.exec(
|
|
1147
|
+
const R = /(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.exec(n), p = /(\.mp4|\.3gp|\.webm|\.ogv)$/i.exec(n);
|
|
1145
1148
|
if (R === null && p === null)
|
|
1146
1149
|
return Promise.reject(
|
|
1147
1150
|
new Error(
|
|
1148
1151
|
Y(
|
|
1149
|
-
`Please upload a video or an image with a valid format (url: ${
|
|
1152
|
+
`Please upload a video or an image with a valid format (url: ${n})`
|
|
1150
1153
|
)
|
|
1151
1154
|
)
|
|
1152
1155
|
);
|
|
1153
|
-
Object.assign(this, { url:
|
|
1154
|
-
const g = 0, x =
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1156
|
+
Object.assign(this, { url: n, wrapS: o, wrapT: c, minFilter: m, magFilter: b, flipY: v });
|
|
1157
|
+
const g = 0, x = r.RGBA, l = 1, T = 1, F = 0, d = r.RGBA, S = r.UNSIGNED_BYTE, C = new Uint8Array([255, 255, 255, 0]), U = r.createTexture();
|
|
1158
|
+
if (r.bindTexture(r.TEXTURE_2D, U), r.texImage2D(
|
|
1159
|
+
r.TEXTURE_2D,
|
|
1157
1160
|
g,
|
|
1158
1161
|
x,
|
|
1159
1162
|
l,
|
|
@@ -1163,8 +1166,8 @@ class rn {
|
|
|
1163
1166
|
S,
|
|
1164
1167
|
C
|
|
1165
1168
|
), p) {
|
|
1166
|
-
const P = this.setupVideo(
|
|
1167
|
-
return
|
|
1169
|
+
const P = this.setupVideo(n);
|
|
1170
|
+
return r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.LINEAR), this._webglTexture = U, this.source = P, this.isVideo = !0, P.play().then(() => this);
|
|
1168
1171
|
}
|
|
1169
1172
|
async function y() {
|
|
1170
1173
|
return new Promise((P, D) => {
|
|
@@ -1172,33 +1175,33 @@ class rn {
|
|
|
1172
1175
|
A.crossOrigin = "anonymous", A.onload = () => {
|
|
1173
1176
|
P(A);
|
|
1174
1177
|
}, A.onerror = () => {
|
|
1175
|
-
D(new Error(Y(`failed loading url: ${
|
|
1176
|
-
}, A.src =
|
|
1178
|
+
D(new Error(Y(`failed loading url: ${n}`)));
|
|
1179
|
+
}, A.src = n ?? "";
|
|
1177
1180
|
});
|
|
1178
1181
|
}
|
|
1179
1182
|
let w = await y(), I = (w.width & w.width - 1) === 0 && (w.height & w.height - 1) === 0;
|
|
1180
|
-
return (e.wrapS !== Ce || e.wrapT !== Ce || e.minFilter !== Le && e.minFilter !== ce) && !I && (w = this.makePowerOf2(w), I = !0),
|
|
1181
|
-
|
|
1183
|
+
return (e.wrapS !== Ce || e.wrapT !== Ce || e.minFilter !== Le && e.minFilter !== ce) && !I && (w = this.makePowerOf2(w), I = !0), r.bindTexture(r.TEXTURE_2D, U), r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL, v), r.texImage2D(
|
|
1184
|
+
r.TEXTURE_2D,
|
|
1182
1185
|
g,
|
|
1183
1186
|
x,
|
|
1184
1187
|
d,
|
|
1185
1188
|
S,
|
|
1186
1189
|
w
|
|
1187
|
-
), I && e.minFilter !== Le && e.minFilter !== ce &&
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
+
), I && e.minFilter !== Le && e.minFilter !== ce && r.generateMipmap(r.TEXTURE_2D), r.texParameteri(
|
|
1191
|
+
r.TEXTURE_2D,
|
|
1192
|
+
r.TEXTURE_WRAP_S,
|
|
1190
1193
|
this.wrapS || Ie
|
|
1191
|
-
),
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
+
), r.texParameteri(
|
|
1195
|
+
r.TEXTURE_2D,
|
|
1196
|
+
r.TEXTURE_WRAP_T,
|
|
1194
1197
|
this.wrapT || Ie
|
|
1195
|
-
),
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
this.minFilter ||
|
|
1199
|
-
),
|
|
1200
|
-
|
|
1201
|
-
|
|
1198
|
+
), r.texParameteri(
|
|
1199
|
+
r.TEXTURE_2D,
|
|
1200
|
+
r.TEXTURE_MIN_FILTER,
|
|
1201
|
+
this.minFilter || nr
|
|
1202
|
+
), r.texParameteri(
|
|
1203
|
+
r.TEXTURE_2D,
|
|
1204
|
+
r.TEXTURE_MAG_FILTER,
|
|
1202
1205
|
this.magFilter || ce
|
|
1203
1206
|
), this._webglTexture = U, this.source = w, this.isVideo = !1, this.isLoaded = !0, this.width = w.width || 0, this.height = w.height || 0, this;
|
|
1204
1207
|
};
|
|
@@ -1209,12 +1212,12 @@ const Y = (t) => `react-shaders: ${t}`, _e = (t) => {
|
|
|
1209
1212
|
return [e?.clientX ?? 0, e?.clientY ?? 0];
|
|
1210
1213
|
}
|
|
1211
1214
|
return [t.clientX, t.clientY];
|
|
1212
|
-
}, Fe = (t, e,
|
|
1213
|
-
function
|
|
1215
|
+
}, Fe = (t, e, r) => t * (1 - r) + e * r, ir = (t, e, r) => r > 0 ? t.substring(0, r) + e + t.substring(r, t.length) : e + t;
|
|
1216
|
+
function sr({
|
|
1214
1217
|
fs: t,
|
|
1215
1218
|
vs: e = we,
|
|
1216
|
-
textures:
|
|
1217
|
-
uniforms:
|
|
1219
|
+
textures: r = [],
|
|
1220
|
+
uniforms: n,
|
|
1218
1221
|
clearColor: o = [0, 0, 0, 1],
|
|
1219
1222
|
precision: c = "highp",
|
|
1220
1223
|
style: m,
|
|
@@ -1237,7 +1240,7 @@ function sn({
|
|
|
1237
1240
|
isNeeded: !1,
|
|
1238
1241
|
value: [0, 0, 0, 0]
|
|
1239
1242
|
}
|
|
1240
|
-
}), _ = B(
|
|
1243
|
+
}), _ = B(n), O = (i, a) => {
|
|
1241
1244
|
const s = "width" in i ? i.width ?? 0 : 0, h = "height" in i ? i.height ?? 0 : 0, u = f.current.iChannelResolution;
|
|
1242
1245
|
if (!u) return;
|
|
1243
1246
|
const E = Array.isArray(u.value) ? u.value : u.value = [];
|
|
@@ -1293,7 +1296,7 @@ function sn({
|
|
|
1293
1296
|
}, L = () => {
|
|
1294
1297
|
const i = Array.isArray(f.current.iMouse?.value) ? f.current.iMouse.value : void 0;
|
|
1295
1298
|
i && (i[2] = 0, i[3] = 0);
|
|
1296
|
-
},
|
|
1299
|
+
}, N = () => {
|
|
1297
1300
|
const i = T.current;
|
|
1298
1301
|
if (!i) return;
|
|
1299
1302
|
y.current = l.current?.getBoundingClientRect();
|
|
@@ -1342,17 +1345,17 @@ ${a}`));
|
|
|
1342
1345
|
), s.enableVertexAttribArray(S.current);
|
|
1343
1346
|
}
|
|
1344
1347
|
}, $ = () => {
|
|
1345
|
-
if (
|
|
1346
|
-
for (const i of Object.keys(
|
|
1347
|
-
const a =
|
|
1348
|
+
if (n)
|
|
1349
|
+
for (const i of Object.keys(n)) {
|
|
1350
|
+
const a = n[i];
|
|
1348
1351
|
if (!a) continue;
|
|
1349
|
-
const { value: s, type: h } = a, u =
|
|
1352
|
+
const { value: s, type: h } = a, u = rr(h);
|
|
1350
1353
|
if (!u) continue;
|
|
1351
1354
|
const E = {};
|
|
1352
|
-
if (
|
|
1355
|
+
if (Jt(h, s)) {
|
|
1353
1356
|
const V = h.length, X = Number.parseInt(h.charAt(V - 3)), te = Math.floor(s.length / (X * X));
|
|
1354
1357
|
s.length > X * X && (E.arraySize = `[${te}]`);
|
|
1355
|
-
} else
|
|
1358
|
+
} else Zt(h, s) && (E.arraySize = `[${Math.floor(s.length / Number.parseInt(h.charAt(0)))}]`);
|
|
1356
1359
|
f.current[i] = {
|
|
1357
1360
|
type: u,
|
|
1358
1361
|
isNeeded: !1,
|
|
@@ -1360,22 +1363,22 @@ ${a}`));
|
|
|
1360
1363
|
...E
|
|
1361
1364
|
};
|
|
1362
1365
|
}
|
|
1363
|
-
},
|
|
1366
|
+
}, re = () => {
|
|
1364
1367
|
const i = T.current;
|
|
1365
1368
|
if (i)
|
|
1366
|
-
if (
|
|
1369
|
+
if (r && r.length > 0) {
|
|
1367
1370
|
f.current[`${xe}`] = {
|
|
1368
1371
|
type: "vec3",
|
|
1369
1372
|
isNeeded: !1,
|
|
1370
|
-
arraySize: `[${
|
|
1373
|
+
arraySize: `[${r.length}]`,
|
|
1371
1374
|
value: []
|
|
1372
1375
|
};
|
|
1373
|
-
const a =
|
|
1374
|
-
(s, h) => (f.current[`${
|
|
1376
|
+
const a = r.map(
|
|
1377
|
+
(s, h) => (f.current[`${Qt}${h}`] = {
|
|
1375
1378
|
type: "sampler2D",
|
|
1376
1379
|
isNeeded: !1
|
|
1377
|
-
},
|
|
1378
|
-
|
|
1380
|
+
}, O(s, h), P.current[h] = new or(i), P.current[h]?.load(s).then((u) => {
|
|
1381
|
+
O(u, h);
|
|
1379
1382
|
}))
|
|
1380
1383
|
);
|
|
1381
1384
|
Promise.all(a).then(() => {
|
|
@@ -1384,7 +1387,7 @@ ${a}`));
|
|
|
1384
1387
|
g?.(s), p && p();
|
|
1385
1388
|
});
|
|
1386
1389
|
} else p && p();
|
|
1387
|
-
},
|
|
1390
|
+
}, ne = (i) => {
|
|
1388
1391
|
const a = ge.includes(c ?? "highp"), s = `precision ${a ? c : ge[1]} float;
|
|
1389
1392
|
`;
|
|
1390
1393
|
a || x?.(
|
|
@@ -1398,14 +1401,14 @@ ${a}`));
|
|
|
1398
1401
|
if (i.includes(E)) {
|
|
1399
1402
|
const V = f.current[E];
|
|
1400
1403
|
if (!V) continue;
|
|
1401
|
-
h =
|
|
1404
|
+
h = ir(
|
|
1402
1405
|
h,
|
|
1403
1406
|
`uniform ${V.type} ${E}${V.arraySize || ""};
|
|
1404
1407
|
`,
|
|
1405
1408
|
h.lastIndexOf(s) + s.length
|
|
1406
1409
|
), V.isNeeded = !0;
|
|
1407
1410
|
}
|
|
1408
|
-
return i.includes("mainImage") && (h = h.concat(
|
|
1411
|
+
return i.includes("mainImage") && (h = h.concat(jt)), h;
|
|
1409
1412
|
}, K = (i) => {
|
|
1410
1413
|
const a = T.current;
|
|
1411
1414
|
if (!a || !d.current) return;
|
|
@@ -1422,7 +1425,7 @@ ${a}`));
|
|
|
1422
1425
|
u
|
|
1423
1426
|
);
|
|
1424
1427
|
if (!V) return;
|
|
1425
|
-
|
|
1428
|
+
tr(
|
|
1426
1429
|
a,
|
|
1427
1430
|
V,
|
|
1428
1431
|
E.type,
|
|
@@ -1527,23 +1530,23 @@ ${a}`));
|
|
|
1527
1530
|
"deviceorientation",
|
|
1528
1531
|
H,
|
|
1529
1532
|
i
|
|
1530
|
-
), l.current && (A.current = new ResizeObserver(
|
|
1533
|
+
), l.current && (A.current = new ResizeObserver(N), A.current.observe(l.current), window.addEventListener("resize", N, i));
|
|
1531
1534
|
}, J = () => {
|
|
1532
1535
|
const i = { passive: !0 };
|
|
1533
1536
|
f.current.iMouse?.isNeeded && l.current && (l.current.removeEventListener("mousemove", M, i), l.current.removeEventListener("mouseout", L, i), l.current.removeEventListener("mouseup", L, i), l.current.removeEventListener("mousedown", z, i), l.current.removeEventListener("touchmove", M, i), l.current.removeEventListener("touchend", L, i), l.current.removeEventListener("touchstart", z, i)), f.current.iDeviceOrientation?.isNeeded && window.removeEventListener(
|
|
1534
1537
|
"deviceorientation",
|
|
1535
1538
|
H,
|
|
1536
1539
|
i
|
|
1537
|
-
), A.current && (A.current.disconnect(), window.removeEventListener("resize",
|
|
1540
|
+
), A.current && (A.current.disconnect(), window.removeEventListener("resize", N, i));
|
|
1538
1541
|
};
|
|
1539
1542
|
return ie(() => {
|
|
1540
|
-
_.current =
|
|
1541
|
-
}, [
|
|
1543
|
+
_.current = n;
|
|
1544
|
+
}, [n]), ie(() => {
|
|
1542
1545
|
const i = P.current;
|
|
1543
1546
|
function a() {
|
|
1544
1547
|
W();
|
|
1545
1548
|
const s = T.current;
|
|
1546
|
-
s && l.current && (s.clearColor(...o), s.clearDepth(1), s.enable(s.DEPTH_TEST), s.depthFunc(s.LEQUAL), s.viewport(0, 0, l.current.width, l.current.height), l.current.height = l.current.clientHeight, l.current.width = l.current.clientWidth, $(),
|
|
1549
|
+
s && l.current && (s.clearColor(...o), s.clearDepth(1), s.enable(s.DEPTH_TEST), s.depthFunc(s.LEQUAL), s.viewport(0, 0, l.current.width, l.current.height), l.current.height = l.current.clientHeight, l.current.width = l.current.clientWidth, $(), re(), Z(ne(t || Kt), e || we), k(), requestAnimationFrame(Q), ee(), N());
|
|
1547
1550
|
}
|
|
1548
1551
|
return requestAnimationFrame(a), () => {
|
|
1549
1552
|
const s = T.current;
|
|
@@ -1563,7 +1566,7 @@ ${a}`));
|
|
|
1563
1566
|
}
|
|
1564
1567
|
);
|
|
1565
1568
|
}
|
|
1566
|
-
const
|
|
1569
|
+
const ar = `
|
|
1567
1570
|
const float TAU = 6.283185;
|
|
1568
1571
|
|
|
1569
1572
|
// Noise for dithering
|
|
@@ -1730,7 +1733,7 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
|
|
1730
1733
|
float alpha = mappedBrightness * clamp(uMix, 1.0, 2.0);
|
|
1731
1734
|
fragColor = vec4(color, alpha);
|
|
1732
1735
|
}
|
|
1733
|
-
}`,
|
|
1736
|
+
}`, cr = 10, ur = 2, lr = 0.5, fr = 0.2, hr = 1.5, G = {
|
|
1734
1737
|
duration: 0.5,
|
|
1735
1738
|
ease: "easeOut"
|
|
1736
1739
|
}, Pe = {
|
|
@@ -1740,22 +1743,22 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
|
|
1740
1743
|
repeatType: "mirror"
|
|
1741
1744
|
};
|
|
1742
1745
|
function oe(t) {
|
|
1743
|
-
const [e,
|
|
1744
|
-
|
|
1746
|
+
const [e, r] = Ue(t), n = dt(t), o = B(null);
|
|
1747
|
+
Tt(n, "change", (m) => r(m));
|
|
1745
1748
|
const c = $e(
|
|
1746
1749
|
(m, b) => {
|
|
1747
|
-
o.current =
|
|
1750
|
+
o.current = zt(n, m, b);
|
|
1748
1751
|
},
|
|
1749
|
-
[
|
|
1752
|
+
[n]
|
|
1750
1753
|
);
|
|
1751
|
-
return { value: e, motionValue:
|
|
1754
|
+
return { value: e, motionValue: n, controls: o, animate: c };
|
|
1752
1755
|
}
|
|
1753
|
-
function
|
|
1754
|
-
const [
|
|
1756
|
+
function dr(t, e) {
|
|
1757
|
+
const [r, n] = Ue(cr), {
|
|
1755
1758
|
value: o,
|
|
1756
1759
|
animate: c,
|
|
1757
1760
|
motionValue: m
|
|
1758
|
-
} = oe(
|
|
1761
|
+
} = oe(fr), { value: b, animate: v } = oe(ur), { value: R, animate: p } = oe(lr), { value: g, animate: x } = oe(hr), l = gt(e, {
|
|
1759
1762
|
fftSize: 512,
|
|
1760
1763
|
smoothingTimeConstant: 0.55
|
|
1761
1764
|
});
|
|
@@ -1764,19 +1767,19 @@ function dn(t, e) {
|
|
|
1764
1767
|
case "idle":
|
|
1765
1768
|
case "failed":
|
|
1766
1769
|
case "disconnected":
|
|
1767
|
-
|
|
1770
|
+
n(10), c(0.2, G), v(1.2, G), p(0.4, G), x(1, G);
|
|
1768
1771
|
return;
|
|
1769
1772
|
case "listening":
|
|
1770
1773
|
case "pre-connect-buffering":
|
|
1771
|
-
|
|
1774
|
+
n(20), c(0.3, { type: "spring", duration: 1, bounce: 0.35 }), v(1, G), p(0.7, G), x([1.5, 2], Pe);
|
|
1772
1775
|
return;
|
|
1773
1776
|
case "thinking":
|
|
1774
1777
|
case "connecting":
|
|
1775
1778
|
case "initializing":
|
|
1776
|
-
|
|
1779
|
+
n(30), c(0.3, G), v(0.5, G), p(1, G), x([0.5, 2.5], Pe);
|
|
1777
1780
|
return;
|
|
1778
1781
|
case "speaking":
|
|
1779
|
-
|
|
1782
|
+
n(70), c(0.3, G), v(0.75, G), p(1.25, G), x(1.5, G);
|
|
1780
1783
|
return;
|
|
1781
1784
|
}
|
|
1782
1785
|
}, [
|
|
@@ -1796,14 +1799,14 @@ function dn(t, e) {
|
|
|
1796
1799
|
p,
|
|
1797
1800
|
x
|
|
1798
1801
|
]), {
|
|
1799
|
-
speed:
|
|
1802
|
+
speed: r,
|
|
1800
1803
|
scale: o,
|
|
1801
1804
|
amplitude: b,
|
|
1802
1805
|
frequency: R,
|
|
1803
1806
|
brightness: g
|
|
1804
1807
|
};
|
|
1805
1808
|
}
|
|
1806
|
-
const
|
|
1809
|
+
const mr = pt({
|
|
1807
1810
|
base: "aspect-square",
|
|
1808
1811
|
variants: {
|
|
1809
1812
|
size: {
|
|
@@ -1818,20 +1821,20 @@ const mn = pt({
|
|
|
1818
1821
|
size: "lg"
|
|
1819
1822
|
}
|
|
1820
1823
|
});
|
|
1821
|
-
function
|
|
1824
|
+
function pr(t) {
|
|
1822
1825
|
const e = t.match(
|
|
1823
1826
|
/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1824
1827
|
);
|
|
1825
1828
|
if (e) {
|
|
1826
|
-
const [,
|
|
1827
|
-
return [
|
|
1829
|
+
const [, r, n, o] = e;
|
|
1830
|
+
return [r, n, o].map((m = "00") => parseInt(m, 16) / 255);
|
|
1828
1831
|
}
|
|
1829
1832
|
}
|
|
1830
1833
|
function Ge({
|
|
1831
1834
|
shape: t = 1,
|
|
1832
1835
|
speed: e = 1,
|
|
1833
|
-
amplitude:
|
|
1834
|
-
frequency:
|
|
1836
|
+
amplitude: r = 0.5,
|
|
1837
|
+
frequency: n = 0.5,
|
|
1835
1838
|
scale: o = 0.2,
|
|
1836
1839
|
blur: c = 1,
|
|
1837
1840
|
color: m = "#FF355E",
|
|
@@ -1842,11 +1845,11 @@ function Ge({
|
|
|
1842
1845
|
className: g,
|
|
1843
1846
|
...x
|
|
1844
1847
|
}) {
|
|
1845
|
-
const l = qe(() =>
|
|
1848
|
+
const l = qe(() => pr(m), [m]);
|
|
1846
1849
|
return /* @__PURE__ */ q("div", { ref: p, className: g, ...x, children: /* @__PURE__ */ q(
|
|
1847
|
-
|
|
1850
|
+
sr,
|
|
1848
1851
|
{
|
|
1849
|
-
fs:
|
|
1852
|
+
fs: ar,
|
|
1850
1853
|
devicePixelRatio: globalThis.devicePixelRatio ?? 1,
|
|
1851
1854
|
uniforms: {
|
|
1852
1855
|
// Aurora wave speed
|
|
@@ -1858,9 +1861,9 @@ function Ge({
|
|
|
1858
1861
|
// Shape type: 1=circle, 2=line
|
|
1859
1862
|
uShape: { type: "1f", value: t },
|
|
1860
1863
|
// Wave frequency and complexity
|
|
1861
|
-
uFrequency: { type: "1f", value:
|
|
1864
|
+
uFrequency: { type: "1f", value: n },
|
|
1862
1865
|
// Turbulence amplitude
|
|
1863
|
-
uAmplitude: { type: "1f", value:
|
|
1866
|
+
uAmplitude: { type: "1f", value: r },
|
|
1864
1867
|
// Light intensity (bloom)
|
|
1865
1868
|
uBloom: { type: "1f", value: 0 },
|
|
1866
1869
|
// Brightness of the aurora (0-1)
|
|
@@ -1889,25 +1892,25 @@ function Ge({
|
|
|
1889
1892
|
) });
|
|
1890
1893
|
}
|
|
1891
1894
|
Ge.displayName = "AuraShader";
|
|
1892
|
-
function
|
|
1895
|
+
function Cr({
|
|
1893
1896
|
size: t = "lg",
|
|
1894
1897
|
state: e,
|
|
1895
|
-
color:
|
|
1896
|
-
colorShift:
|
|
1898
|
+
color: r,
|
|
1899
|
+
colorShift: n = 0.05,
|
|
1897
1900
|
audioTrack: o,
|
|
1898
1901
|
themeMode: c,
|
|
1899
1902
|
className: m,
|
|
1900
1903
|
ref: b,
|
|
1901
1904
|
...v
|
|
1902
1905
|
}) {
|
|
1903
|
-
const { speed: R, scale: p, amplitude: g, frequency: x, brightness: l } =
|
|
1906
|
+
const { speed: R, scale: p, amplitude: g, frequency: x, brightness: l } = dr(e, o);
|
|
1904
1907
|
return /* @__PURE__ */ q(
|
|
1905
1908
|
Ge,
|
|
1906
1909
|
{
|
|
1907
1910
|
ref: b,
|
|
1908
1911
|
blur: 0.2,
|
|
1909
|
-
color:
|
|
1910
|
-
colorShift:
|
|
1912
|
+
color: r,
|
|
1913
|
+
colorShift: n,
|
|
1911
1914
|
speed: R,
|
|
1912
1915
|
scale: p,
|
|
1913
1916
|
themeMode: c,
|
|
@@ -1915,7 +1918,7 @@ function Sn({
|
|
|
1915
1918
|
frequency: x,
|
|
1916
1919
|
brightness: l,
|
|
1917
1920
|
className: mt(
|
|
1918
|
-
|
|
1921
|
+
mr({ size: t }),
|
|
1919
1922
|
"overflow-hidden rounded-full",
|
|
1920
1923
|
m
|
|
1921
1924
|
),
|
|
@@ -1923,11 +1926,13 @@ function Sn({
|
|
|
1923
1926
|
}
|
|
1924
1927
|
);
|
|
1925
1928
|
}
|
|
1926
|
-
const
|
|
1929
|
+
const vr = wt;
|
|
1930
|
+
vr.displayName = "F0ChatReportCard";
|
|
1931
|
+
const Ir = ({
|
|
1927
1932
|
text: t,
|
|
1928
1933
|
confirmationText: e,
|
|
1929
|
-
onConfirm:
|
|
1930
|
-
cancelText:
|
|
1934
|
+
onConfirm: r,
|
|
1935
|
+
cancelText: n,
|
|
1931
1936
|
onCancel: o
|
|
1932
1937
|
}) => /* @__PURE__ */ le("div", { className: "flex flex-col gap-2", children: [
|
|
1933
1938
|
t && /* @__PURE__ */ q("p", { children: t }),
|
|
@@ -1939,7 +1944,7 @@ const Ln = ({
|
|
|
1939
1944
|
variant: "outline",
|
|
1940
1945
|
size: "sm",
|
|
1941
1946
|
icon: vt,
|
|
1942
|
-
onClick:
|
|
1947
|
+
onClick: r,
|
|
1943
1948
|
label: e
|
|
1944
1949
|
}
|
|
1945
1950
|
),
|
|
@@ -1950,18 +1955,19 @@ const Ln = ({
|
|
|
1950
1955
|
variant: "ghost",
|
|
1951
1956
|
size: "sm",
|
|
1952
1957
|
onClick: o,
|
|
1953
|
-
label:
|
|
1958
|
+
label: n
|
|
1954
1959
|
}
|
|
1955
1960
|
)
|
|
1956
1961
|
] })
|
|
1957
1962
|
] });
|
|
1958
1963
|
export {
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1964
|
+
xr as A,
|
|
1965
|
+
Lr as F,
|
|
1966
|
+
Rr as a,
|
|
1967
|
+
Ar as b,
|
|
1968
|
+
Cr as c,
|
|
1969
|
+
vr as d,
|
|
1970
|
+
Ir as e,
|
|
1971
|
+
Er as o,
|
|
1972
|
+
Sr as u
|
|
1967
1973
|
};
|