3d-shape-particle-text 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,998 +1,370 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var or;
|
|
14
|
-
function gr() {
|
|
15
|
-
if (or) return $e;
|
|
16
|
-
or = 1;
|
|
17
|
-
var n = hr, l = Symbol.for("react.element"), d = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function O(j, E, T) {
|
|
19
|
-
var w, M = {}, C = null, H = null;
|
|
20
|
-
T !== void 0 && (C = "" + T), E.key !== void 0 && (C = "" + E.key), E.ref !== void 0 && (H = E.ref);
|
|
21
|
-
for (w in E) i.call(E, w) && !g.hasOwnProperty(w) && (M[w] = E[w]);
|
|
22
|
-
if (j && j.defaultProps) for (w in E = j.defaultProps, E) M[w] === void 0 && (M[w] = E[w]);
|
|
23
|
-
return { $$typeof: l, type: j, key: C, ref: H, props: M, _owner: a.current };
|
|
24
|
-
}
|
|
25
|
-
return $e.Fragment = d, $e.jsx = O, $e.jsxs = O, $e;
|
|
26
|
-
}
|
|
27
|
-
var Be = {};
|
|
28
|
-
/**
|
|
29
|
-
* @license React
|
|
30
|
-
* react-jsx-runtime.development.js
|
|
31
|
-
*
|
|
32
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the MIT license found in the
|
|
35
|
-
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/
|
|
37
|
-
var sr;
|
|
38
|
-
function yr() {
|
|
39
|
-
return sr || (sr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
40
|
-
var n = hr, l = Symbol.for("react.element"), d = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), j = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), H = Symbol.for("react.offscreen"), ee = Symbol.iterator, le = "@@iterator";
|
|
41
|
-
function G(e) {
|
|
42
|
-
if (e === null || typeof e != "object")
|
|
43
|
-
return null;
|
|
44
|
-
var r = ee && e[ee] || e[le];
|
|
45
|
-
return typeof r == "function" ? r : null;
|
|
46
|
-
}
|
|
47
|
-
var z = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
-
function _(e) {
|
|
49
|
-
{
|
|
50
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
|
|
51
|
-
t[c - 1] = arguments[c];
|
|
52
|
-
me("error", e, t);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function me(e, r, t) {
|
|
56
|
-
{
|
|
57
|
-
var c = z.ReactDebugCurrentFrame, v = c.getStackAddendum();
|
|
58
|
-
v !== "" && (r += "%s", t = t.concat([v]));
|
|
59
|
-
var b = t.map(function(m) {
|
|
60
|
-
return String(m);
|
|
61
|
-
});
|
|
62
|
-
b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
var J = !1, Y = !1, ue = !1, _e = !1, $ = !1, R;
|
|
66
|
-
R = Symbol.for("react.module.reference");
|
|
67
|
-
function re(e) {
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e === g || $ || e === a || e === T || e === w || _e || e === H || J || Y || ue || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === M || e.$$typeof === O || e.$$typeof === j || e.$$typeof === E || // This needs to include all possible module reference object
|
|
69
|
-
// types supported by any Flight configuration anywhere since
|
|
70
|
-
// we don't know which Flight build this will end up being used
|
|
71
|
-
// with.
|
|
72
|
-
e.$$typeof === R || e.getModuleId !== void 0));
|
|
73
|
-
}
|
|
74
|
-
function ve(e, r, t) {
|
|
75
|
-
var c = e.displayName;
|
|
76
|
-
if (c)
|
|
77
|
-
return c;
|
|
78
|
-
var v = r.displayName || r.name || "";
|
|
79
|
-
return v !== "" ? t + "(" + v + ")" : t;
|
|
80
|
-
}
|
|
81
|
-
function Pe(e) {
|
|
82
|
-
return e.displayName || "Context";
|
|
83
|
-
}
|
|
84
|
-
function te(e) {
|
|
85
|
-
if (e == null)
|
|
86
|
-
return null;
|
|
87
|
-
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
|
-
return e.displayName || e.name || null;
|
|
89
|
-
if (typeof e == "string")
|
|
90
|
-
return e;
|
|
91
|
-
switch (e) {
|
|
92
|
-
case i:
|
|
93
|
-
return "Fragment";
|
|
94
|
-
case d:
|
|
95
|
-
return "Portal";
|
|
96
|
-
case g:
|
|
97
|
-
return "Profiler";
|
|
98
|
-
case a:
|
|
99
|
-
return "StrictMode";
|
|
100
|
-
case T:
|
|
101
|
-
return "Suspense";
|
|
102
|
-
case w:
|
|
103
|
-
return "SuspenseList";
|
|
104
|
-
}
|
|
105
|
-
if (typeof e == "object")
|
|
106
|
-
switch (e.$$typeof) {
|
|
107
|
-
case j:
|
|
108
|
-
var r = e;
|
|
109
|
-
return Pe(r) + ".Consumer";
|
|
110
|
-
case O:
|
|
111
|
-
var t = e;
|
|
112
|
-
return Pe(t._context) + ".Provider";
|
|
113
|
-
case E:
|
|
114
|
-
return ve(e, e.render, "ForwardRef");
|
|
115
|
-
case M:
|
|
116
|
-
var c = e.displayName || null;
|
|
117
|
-
return c !== null ? c : te(e.type) || "Memo";
|
|
118
|
-
case C: {
|
|
119
|
-
var v = e, b = v._payload, m = v._init;
|
|
120
|
-
try {
|
|
121
|
-
return te(m(b));
|
|
122
|
-
} catch {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
var A = Object.assign, B = 0, V, U, q, fe, Z, ge, I;
|
|
130
|
-
function Ae() {
|
|
131
|
-
}
|
|
132
|
-
Ae.__reactDisabledLog = !0;
|
|
133
|
-
function Fe() {
|
|
134
|
-
{
|
|
135
|
-
if (B === 0) {
|
|
136
|
-
V = console.log, U = console.info, q = console.warn, fe = console.error, Z = console.group, ge = console.groupCollapsed, I = console.groupEnd;
|
|
137
|
-
var e = {
|
|
138
|
-
configurable: !0,
|
|
139
|
-
enumerable: !0,
|
|
140
|
-
value: Ae,
|
|
141
|
-
writable: !0
|
|
142
|
-
};
|
|
143
|
-
Object.defineProperties(console, {
|
|
144
|
-
info: e,
|
|
145
|
-
log: e,
|
|
146
|
-
warn: e,
|
|
147
|
-
error: e,
|
|
148
|
-
group: e,
|
|
149
|
-
groupCollapsed: e,
|
|
150
|
-
groupEnd: e
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
B++;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function Le() {
|
|
157
|
-
{
|
|
158
|
-
if (B--, B === 0) {
|
|
159
|
-
var e = {
|
|
160
|
-
configurable: !0,
|
|
161
|
-
enumerable: !0,
|
|
162
|
-
writable: !0
|
|
163
|
-
};
|
|
164
|
-
Object.defineProperties(console, {
|
|
165
|
-
log: A({}, e, {
|
|
166
|
-
value: V
|
|
167
|
-
}),
|
|
168
|
-
info: A({}, e, {
|
|
169
|
-
value: U
|
|
170
|
-
}),
|
|
171
|
-
warn: A({}, e, {
|
|
172
|
-
value: q
|
|
173
|
-
}),
|
|
174
|
-
error: A({}, e, {
|
|
175
|
-
value: fe
|
|
176
|
-
}),
|
|
177
|
-
group: A({}, e, {
|
|
178
|
-
value: Z
|
|
179
|
-
}),
|
|
180
|
-
groupCollapsed: A({}, e, {
|
|
181
|
-
value: ge
|
|
182
|
-
}),
|
|
183
|
-
groupEnd: A({}, e, {
|
|
184
|
-
value: I
|
|
185
|
-
})
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
B < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
var F = z.ReactCurrentDispatcher, L;
|
|
192
|
-
function y(e, r, t) {
|
|
193
|
-
{
|
|
194
|
-
if (L === void 0)
|
|
195
|
-
try {
|
|
196
|
-
throw Error();
|
|
197
|
-
} catch (v) {
|
|
198
|
-
var c = v.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
-
L = c && c[1] || "";
|
|
200
|
-
}
|
|
201
|
-
return `
|
|
202
|
-
` + L + e;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
var We = !1, xe;
|
|
206
|
-
{
|
|
207
|
-
var er = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
-
xe = new er();
|
|
209
|
-
}
|
|
210
|
-
function Ve(e, r) {
|
|
211
|
-
if (!e || We)
|
|
212
|
-
return "";
|
|
213
|
-
{
|
|
214
|
-
var t = xe.get(e);
|
|
215
|
-
if (t !== void 0)
|
|
216
|
-
return t;
|
|
217
|
-
}
|
|
218
|
-
var c;
|
|
219
|
-
We = !0;
|
|
220
|
-
var v = Error.prepareStackTrace;
|
|
221
|
-
Error.prepareStackTrace = void 0;
|
|
222
|
-
var b;
|
|
223
|
-
b = F.current, F.current = null, Fe();
|
|
224
|
-
try {
|
|
225
|
-
if (r) {
|
|
226
|
-
var m = function() {
|
|
227
|
-
throw Error();
|
|
228
|
-
};
|
|
229
|
-
if (Object.defineProperty(m.prototype, "props", {
|
|
230
|
-
set: function() {
|
|
231
|
-
throw Error();
|
|
232
|
-
}
|
|
233
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
|
-
try {
|
|
235
|
-
Reflect.construct(m, []);
|
|
236
|
-
} catch (D) {
|
|
237
|
-
c = D;
|
|
238
|
-
}
|
|
239
|
-
Reflect.construct(e, [], m);
|
|
240
|
-
} else {
|
|
241
|
-
try {
|
|
242
|
-
m.call();
|
|
243
|
-
} catch (D) {
|
|
244
|
-
c = D;
|
|
245
|
-
}
|
|
246
|
-
e.call(m.prototype);
|
|
247
|
-
}
|
|
248
|
-
} else {
|
|
249
|
-
try {
|
|
250
|
-
throw Error();
|
|
251
|
-
} catch (D) {
|
|
252
|
-
c = D;
|
|
253
|
-
}
|
|
254
|
-
e();
|
|
255
|
-
}
|
|
256
|
-
} catch (D) {
|
|
257
|
-
if (D && c && typeof D.stack == "string") {
|
|
258
|
-
for (var p = D.stack.split(`
|
|
259
|
-
`), k = c.stack.split(`
|
|
260
|
-
`), P = p.length - 1, x = k.length - 1; P >= 1 && x >= 0 && p[P] !== k[x]; )
|
|
261
|
-
x--;
|
|
262
|
-
for (; P >= 1 && x >= 0; P--, x--)
|
|
263
|
-
if (p[P] !== k[x]) {
|
|
264
|
-
if (P !== 1 || x !== 1)
|
|
265
|
-
do
|
|
266
|
-
if (P--, x--, x < 0 || p[P] !== k[x]) {
|
|
267
|
-
var N = `
|
|
268
|
-
` + p[P].replace(" at new ", " at ");
|
|
269
|
-
return e.displayName && N.includes("<anonymous>") && (N = N.replace("<anonymous>", e.displayName)), typeof e == "function" && xe.set(e, N), N;
|
|
270
|
-
}
|
|
271
|
-
while (P >= 1 && x >= 0);
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
} finally {
|
|
276
|
-
We = !1, F.current = b, Le(), Error.prepareStackTrace = v;
|
|
277
|
-
}
|
|
278
|
-
var ke = e ? e.displayName || e.name : "", Ee = ke ? y(ke) : "";
|
|
279
|
-
return typeof e == "function" && xe.set(e, Ee), Ee;
|
|
280
|
-
}
|
|
281
|
-
function ne(e, r, t) {
|
|
282
|
-
return Ve(e, !1);
|
|
283
|
-
}
|
|
284
|
-
function rr(e) {
|
|
285
|
-
var r = e.prototype;
|
|
286
|
-
return !!(r && r.isReactComponent);
|
|
287
|
-
}
|
|
288
|
-
function Te(e, r, t) {
|
|
289
|
-
if (e == null)
|
|
290
|
-
return "";
|
|
291
|
-
if (typeof e == "function")
|
|
292
|
-
return Ve(e, rr(e));
|
|
293
|
-
if (typeof e == "string")
|
|
294
|
-
return y(e);
|
|
295
|
-
switch (e) {
|
|
296
|
-
case T:
|
|
297
|
-
return y("Suspense");
|
|
298
|
-
case w:
|
|
299
|
-
return y("SuspenseList");
|
|
300
|
-
}
|
|
301
|
-
if (typeof e == "object")
|
|
302
|
-
switch (e.$$typeof) {
|
|
303
|
-
case E:
|
|
304
|
-
return ne(e.render);
|
|
305
|
-
case M:
|
|
306
|
-
return Te(e.type, r, t);
|
|
307
|
-
case C: {
|
|
308
|
-
var c = e, v = c._payload, b = c._init;
|
|
309
|
-
try {
|
|
310
|
-
return Te(b(v), r, t);
|
|
311
|
-
} catch {
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
return "";
|
|
316
|
-
}
|
|
317
|
-
var ye = Object.prototype.hasOwnProperty, Ue = {}, De = z.ReactDebugCurrentFrame;
|
|
318
|
-
function be(e) {
|
|
319
|
-
if (e) {
|
|
320
|
-
var r = e._owner, t = Te(e.type, e._source, r ? r.type : null);
|
|
321
|
-
De.setExtraStackFrame(t);
|
|
322
|
-
} else
|
|
323
|
-
De.setExtraStackFrame(null);
|
|
324
|
-
}
|
|
325
|
-
function qe(e, r, t, c, v) {
|
|
326
|
-
{
|
|
327
|
-
var b = Function.call.bind(ye);
|
|
328
|
-
for (var m in e)
|
|
329
|
-
if (b(e, m)) {
|
|
330
|
-
var p = void 0;
|
|
331
|
-
try {
|
|
332
|
-
if (typeof e[m] != "function") {
|
|
333
|
-
var k = Error((c || "React class") + ": " + t + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
-
throw k.name = "Invariant Violation", k;
|
|
335
|
-
}
|
|
336
|
-
p = e[m](r, m, c, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
-
} catch (P) {
|
|
338
|
-
p = P;
|
|
339
|
-
}
|
|
340
|
-
p && !(p instanceof Error) && (be(v), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", t, m, typeof p), be(null)), p instanceof Error && !(p.message in Ue) && (Ue[p.message] = !0, be(v), _("Failed %s type: %s", t, p.message), be(null));
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
var Me = Array.isArray;
|
|
345
|
-
function X(e) {
|
|
346
|
-
return Me(e);
|
|
347
|
-
}
|
|
348
|
-
function Ie(e) {
|
|
349
|
-
{
|
|
350
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
|
-
return t;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function tr(e) {
|
|
355
|
-
try {
|
|
356
|
-
return Ne(e), !1;
|
|
357
|
-
} catch {
|
|
358
|
-
return !0;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
function Ne(e) {
|
|
362
|
-
return "" + e;
|
|
363
|
-
}
|
|
364
|
-
function He(e) {
|
|
365
|
-
if (tr(e))
|
|
366
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ie(e)), Ne(e);
|
|
367
|
-
}
|
|
368
|
-
var we = z.ReactCurrentOwner, Se = {
|
|
369
|
-
key: !0,
|
|
370
|
-
ref: !0,
|
|
371
|
-
__self: !0,
|
|
372
|
-
__source: !0
|
|
373
|
-
}, ae, Ge;
|
|
374
|
-
function de(e) {
|
|
375
|
-
if (ye.call(e, "ref")) {
|
|
376
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
|
-
if (r && r.isReactWarning)
|
|
378
|
-
return !1;
|
|
379
|
-
}
|
|
380
|
-
return e.ref !== void 0;
|
|
381
|
-
}
|
|
382
|
-
function nr(e) {
|
|
383
|
-
if (ye.call(e, "key")) {
|
|
384
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
|
-
if (r && r.isReactWarning)
|
|
386
|
-
return !1;
|
|
387
|
-
}
|
|
388
|
-
return e.key !== void 0;
|
|
389
|
-
}
|
|
390
|
-
function ie(e, r) {
|
|
391
|
-
typeof e.ref == "string" && we.current;
|
|
392
|
-
}
|
|
393
|
-
function Je(e, r) {
|
|
394
|
-
{
|
|
395
|
-
var t = function() {
|
|
396
|
-
ae || (ae = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
397
|
-
};
|
|
398
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
|
-
get: t,
|
|
400
|
-
configurable: !0
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
function Xe(e, r) {
|
|
405
|
-
{
|
|
406
|
-
var t = function() {
|
|
407
|
-
Ge || (Ge = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
408
|
-
};
|
|
409
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
|
-
get: t,
|
|
411
|
-
configurable: !0
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
var ze = function(e, r, t, c, v, b, m) {
|
|
416
|
-
var p = {
|
|
417
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof: l,
|
|
419
|
-
// Built-in properties that belong on the element
|
|
420
|
-
type: e,
|
|
421
|
-
key: r,
|
|
422
|
-
ref: t,
|
|
423
|
-
props: m,
|
|
424
|
-
// Record the component responsible for creating this element.
|
|
425
|
-
_owner: b
|
|
426
|
-
};
|
|
427
|
-
return p._store = {}, Object.defineProperty(p._store, "validated", {
|
|
428
|
-
configurable: !1,
|
|
429
|
-
enumerable: !1,
|
|
430
|
-
writable: !0,
|
|
431
|
-
value: !1
|
|
432
|
-
}), Object.defineProperty(p, "_self", {
|
|
433
|
-
configurable: !1,
|
|
434
|
-
enumerable: !1,
|
|
435
|
-
writable: !1,
|
|
436
|
-
value: c
|
|
437
|
-
}), Object.defineProperty(p, "_source", {
|
|
438
|
-
configurable: !1,
|
|
439
|
-
enumerable: !1,
|
|
440
|
-
writable: !1,
|
|
441
|
-
value: v
|
|
442
|
-
}), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
|
|
443
|
-
};
|
|
444
|
-
function Ke(e, r, t, c, v) {
|
|
445
|
-
{
|
|
446
|
-
var b, m = {}, p = null, k = null;
|
|
447
|
-
t !== void 0 && (He(t), p = "" + t), nr(r) && (He(r.key), p = "" + r.key), de(r) && (k = r.ref, ie(r, v));
|
|
448
|
-
for (b in r)
|
|
449
|
-
ye.call(r, b) && !Se.hasOwnProperty(b) && (m[b] = r[b]);
|
|
450
|
-
if (e && e.defaultProps) {
|
|
451
|
-
var P = e.defaultProps;
|
|
452
|
-
for (b in P)
|
|
453
|
-
m[b] === void 0 && (m[b] = P[b]);
|
|
454
|
-
}
|
|
455
|
-
if (p || k) {
|
|
456
|
-
var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
-
p && Je(m, x), k && Xe(m, x);
|
|
458
|
-
}
|
|
459
|
-
return ze(e, p, k, v, c, we.current, m);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
var Oe = z.ReactCurrentOwner, Ye = z.ReactDebugCurrentFrame;
|
|
463
|
-
function oe(e) {
|
|
464
|
-
if (e) {
|
|
465
|
-
var r = e._owner, t = Te(e.type, e._source, r ? r.type : null);
|
|
466
|
-
Ye.setExtraStackFrame(t);
|
|
467
|
-
} else
|
|
468
|
-
Ye.setExtraStackFrame(null);
|
|
469
|
-
}
|
|
470
|
-
var o;
|
|
471
|
-
o = !1;
|
|
472
|
-
function s(e) {
|
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
474
|
-
}
|
|
475
|
-
function u() {
|
|
476
|
-
{
|
|
477
|
-
if (Oe.current) {
|
|
478
|
-
var e = te(Oe.current.type);
|
|
479
|
-
if (e)
|
|
480
|
-
return `
|
|
481
|
-
|
|
482
|
-
Check the render method of \`` + e + "`.";
|
|
483
|
-
}
|
|
484
|
-
return "";
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
function S(e) {
|
|
488
|
-
return "";
|
|
489
|
-
}
|
|
490
|
-
var h = {};
|
|
491
|
-
function se(e) {
|
|
492
|
-
{
|
|
493
|
-
var r = u();
|
|
494
|
-
if (!r) {
|
|
495
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
|
-
t && (r = `
|
|
497
|
-
|
|
498
|
-
Check the top-level render call using <` + t + ">.");
|
|
499
|
-
}
|
|
500
|
-
return r;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function Ce(e, r) {
|
|
504
|
-
{
|
|
505
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
506
|
-
return;
|
|
507
|
-
e._store.validated = !0;
|
|
508
|
-
var t = se(r);
|
|
509
|
-
if (h[t])
|
|
510
|
-
return;
|
|
511
|
-
h[t] = !0;
|
|
512
|
-
var c = "";
|
|
513
|
-
e && e._owner && e._owner !== Oe.current && (c = " It was passed a child from " + te(e._owner.type) + "."), oe(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, c), oe(null);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
function W(e, r) {
|
|
517
|
-
{
|
|
518
|
-
if (typeof e != "object")
|
|
519
|
-
return;
|
|
520
|
-
if (X(e))
|
|
521
|
-
for (var t = 0; t < e.length; t++) {
|
|
522
|
-
var c = e[t];
|
|
523
|
-
s(c) && Ce(c, r);
|
|
524
|
-
}
|
|
525
|
-
else if (s(e))
|
|
526
|
-
e._store && (e._store.validated = !0);
|
|
527
|
-
else if (e) {
|
|
528
|
-
var v = G(e);
|
|
529
|
-
if (typeof v == "function" && v !== e.entries)
|
|
530
|
-
for (var b = v.call(e), m; !(m = b.next()).done; )
|
|
531
|
-
s(m.value) && Ce(m.value, r);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
function Q(e) {
|
|
536
|
-
{
|
|
537
|
-
var r = e.type;
|
|
538
|
-
if (r == null || typeof r == "string")
|
|
539
|
-
return;
|
|
540
|
-
var t;
|
|
541
|
-
if (typeof r == "function")
|
|
542
|
-
t = r.propTypes;
|
|
543
|
-
else if (typeof r == "object" && (r.$$typeof === E || // Note: Memo only checks outer props here.
|
|
544
|
-
// Inner props are checked in the reconciler.
|
|
545
|
-
r.$$typeof === M))
|
|
546
|
-
t = r.propTypes;
|
|
547
|
-
else
|
|
548
|
-
return;
|
|
549
|
-
if (t) {
|
|
550
|
-
var c = te(r);
|
|
551
|
-
qe(t, e.props, "prop", c, e);
|
|
552
|
-
} else if (r.PropTypes !== void 0 && !o) {
|
|
553
|
-
o = !0;
|
|
554
|
-
var v = te(r);
|
|
555
|
-
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
556
|
-
}
|
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
function ce(e) {
|
|
561
|
-
{
|
|
562
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
|
-
var c = r[t];
|
|
564
|
-
if (c !== "children" && c !== "key") {
|
|
565
|
-
oe(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), oe(null);
|
|
566
|
-
break;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
e.ref !== null && (oe(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), oe(null));
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
var je = {};
|
|
573
|
-
function Re(e, r, t, c, v, b) {
|
|
574
|
-
{
|
|
575
|
-
var m = re(e);
|
|
576
|
-
if (!m) {
|
|
577
|
-
var p = "";
|
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
-
var k = S();
|
|
580
|
-
k ? p += k : p += u();
|
|
581
|
-
var P;
|
|
582
|
-
e === null ? P = "null" : X(e) ? P = "array" : e !== void 0 && e.$$typeof === l ? (P = "<" + (te(e.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : P = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, p);
|
|
583
|
-
}
|
|
584
|
-
var x = Ke(e, r, t, v, b);
|
|
585
|
-
if (x == null)
|
|
586
|
-
return x;
|
|
587
|
-
if (m) {
|
|
588
|
-
var N = r.children;
|
|
589
|
-
if (N !== void 0)
|
|
590
|
-
if (c)
|
|
591
|
-
if (X(N)) {
|
|
592
|
-
for (var ke = 0; ke < N.length; ke++)
|
|
593
|
-
W(N[ke], e);
|
|
594
|
-
Object.freeze && Object.freeze(N);
|
|
595
|
-
} else
|
|
596
|
-
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
|
-
else
|
|
598
|
-
W(N, e);
|
|
599
|
-
}
|
|
600
|
-
if (ye.call(r, "key")) {
|
|
601
|
-
var Ee = te(e), D = Object.keys(r).filter(function(mr) {
|
|
602
|
-
return mr !== "key";
|
|
603
|
-
}), ar = D.length > 0 ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
-
if (!je[Ee + ar]) {
|
|
605
|
-
var pr = D.length > 0 ? "{" + D.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
-
_(`A props object containing a "key" prop is being spread into JSX:
|
|
607
|
-
let props = %s;
|
|
608
|
-
<%s {...props} />
|
|
609
|
-
React keys must be passed directly to JSX without using spread:
|
|
610
|
-
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`, ar, Ee, pr, Ee), je[Ee + ar] = !0;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return e === i ? ce(x) : Q(x), x;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
function Ze(e, r, t) {
|
|
618
|
-
return Re(e, r, t, !0);
|
|
619
|
-
}
|
|
620
|
-
function K(e, r, t) {
|
|
621
|
-
return Re(e, r, t, !1);
|
|
622
|
-
}
|
|
623
|
-
var he = K, pe = Ze;
|
|
624
|
-
Be.Fragment = i, Be.jsx = he, Be.jsxs = pe;
|
|
625
|
-
})()), Be;
|
|
626
|
-
}
|
|
627
|
-
var cr;
|
|
628
|
-
function br() {
|
|
629
|
-
return cr || (cr = 1, process.env.NODE_ENV === "production" ? Qe.exports = gr() : Qe.exports = yr()), Qe.exports;
|
|
630
|
-
}
|
|
631
|
-
var lr = br();
|
|
632
|
-
const wr = (n) => n ? {
|
|
633
|
-
error: (...l) => console.error(...l),
|
|
634
|
-
warn: (...l) => console.warn(...l)
|
|
1
|
+
import { jsx as Ae } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Re, useEffect as Ye } from "react";
|
|
3
|
+
import * as a from "three";
|
|
4
|
+
const Ie = (e) => e ? {
|
|
5
|
+
error: (...s) => console.error(...s),
|
|
6
|
+
warn: (...s) => console.warn(...s)
|
|
635
7
|
} : {
|
|
636
8
|
error: () => {
|
|
637
9
|
},
|
|
638
10
|
warn: () => {
|
|
639
11
|
}
|
|
640
|
-
},
|
|
641
|
-
if (!
|
|
642
|
-
if (typeof
|
|
643
|
-
const
|
|
644
|
-
return { r:
|
|
12
|
+
}, ze = (e, s) => {
|
|
13
|
+
if (!e) return s;
|
|
14
|
+
if (typeof e == "string") {
|
|
15
|
+
const l = new a.Color(e);
|
|
16
|
+
return { r: l.r, g: l.g, b: l.b };
|
|
645
17
|
}
|
|
646
|
-
return typeof
|
|
647
|
-
},
|
|
648
|
-
if (!(!
|
|
649
|
-
if (Object.defineProperty(
|
|
18
|
+
return typeof e == "object" && typeof e.r == "number" ? e : s;
|
|
19
|
+
}, Ue = (e) => {
|
|
20
|
+
if (!(!e || e.__shapeParticleTextPatched)) {
|
|
21
|
+
if (Object.defineProperty(e, "__shapeParticleTextPatched", {
|
|
650
22
|
value: !0,
|
|
651
23
|
configurable: !0
|
|
652
|
-
}), typeof
|
|
653
|
-
const
|
|
24
|
+
}), typeof e.getShaderPrecisionFormat == "function" && !e.getShaderPrecisionFormat.__shapeParticleTextPatched) {
|
|
25
|
+
const s = e.getShaderPrecisionFormat.bind(e), l = (...n) => {
|
|
654
26
|
try {
|
|
655
|
-
const
|
|
656
|
-
if (
|
|
27
|
+
const t = s(...n);
|
|
28
|
+
if (t && typeof t.precision == "number") return t;
|
|
657
29
|
} catch {
|
|
658
30
|
}
|
|
659
31
|
return { rangeMin: 127, rangeMax: 127, precision: 23 };
|
|
660
32
|
};
|
|
661
|
-
Object.defineProperty(
|
|
33
|
+
Object.defineProperty(l, "__shapeParticleTextPatched", { value: !0 }), Object.defineProperty(e, "getShaderPrecisionFormat", { value: l, configurable: !0 });
|
|
662
34
|
}
|
|
663
|
-
if (typeof
|
|
664
|
-
const
|
|
665
|
-
let
|
|
35
|
+
if (typeof e.getParameter == "function" && !e.getParameter.__shapeParticleTextPatched) {
|
|
36
|
+
const s = e.getParameter.bind(e), l = (...n) => {
|
|
37
|
+
let t;
|
|
666
38
|
try {
|
|
667
|
-
|
|
39
|
+
t = s(...n);
|
|
668
40
|
} catch {
|
|
669
|
-
|
|
41
|
+
t = void 0;
|
|
670
42
|
}
|
|
671
|
-
const
|
|
672
|
-
return
|
|
43
|
+
const h = n[0];
|
|
44
|
+
return t ?? (h === 7938 ? "WebGL 1.0 (Three.js Mock)" : h === 35724 ? "WebGL GLSL ES 1.0 (Three.js Mock)" : h === 7936 ? "Three.js Mock Vendor" : h === 7937 ? "Three.js Mock Renderer" : h === 34921 || h === 34930 || h === 35657 || h === 35658 ? 16 : "");
|
|
673
45
|
};
|
|
674
|
-
Object.defineProperty(
|
|
46
|
+
Object.defineProperty(l, "__shapeParticleTextPatched", { value: !0 }), Object.defineProperty(e, "getParameter", { value: l, configurable: !0 });
|
|
675
47
|
}
|
|
676
|
-
if (typeof
|
|
677
|
-
const
|
|
678
|
-
let
|
|
48
|
+
if (typeof e.getExtension == "function" && !e.getExtension.__shapeParticleTextPatched) {
|
|
49
|
+
const s = e.getExtension.bind(e), l = (...n) => {
|
|
50
|
+
let t;
|
|
679
51
|
try {
|
|
680
|
-
|
|
52
|
+
t = s(...n);
|
|
681
53
|
} catch {
|
|
682
|
-
|
|
54
|
+
t = null;
|
|
683
55
|
}
|
|
684
|
-
return
|
|
56
|
+
return t === null && n[0] === "WEBGL_debug_renderer_info" ? null : t;
|
|
685
57
|
};
|
|
686
|
-
Object.defineProperty(
|
|
58
|
+
Object.defineProperty(l, "__shapeParticleTextPatched", { value: !0 }), Object.defineProperty(e, "getExtension", { value: l, configurable: !0 });
|
|
687
59
|
}
|
|
688
60
|
}
|
|
689
|
-
},
|
|
61
|
+
}, Ge = ({ canvas: e, context: s, contextAttributes: l, log: n }) => {
|
|
690
62
|
try {
|
|
691
|
-
const
|
|
692
|
-
canvas:
|
|
693
|
-
context:
|
|
63
|
+
const t = new a.WebGLRenderer({
|
|
64
|
+
canvas: e,
|
|
65
|
+
context: s,
|
|
694
66
|
precision: "mediump",
|
|
695
|
-
...
|
|
67
|
+
...l
|
|
696
68
|
});
|
|
697
|
-
return
|
|
698
|
-
} catch (
|
|
699
|
-
return
|
|
69
|
+
return t.capabilities && (t.capabilities.isWebGL2 || (t.capabilities.isWebGL2 = !0), t.capabilities.precision || (t.capabilities.precision = "mediump")), t;
|
|
70
|
+
} catch (t) {
|
|
71
|
+
return n.warn("ShapeParticleText: Failed to initialize WebGL renderer", t), null;
|
|
700
72
|
}
|
|
701
|
-
},
|
|
702
|
-
const
|
|
73
|
+
}, Ze = ({ canvas: e, context: s, contextAttributes: l, log: n }) => {
|
|
74
|
+
const t = Ge({ canvas: e, context: s, contextAttributes: l, log: { warn: () => {
|
|
703
75
|
} } });
|
|
704
|
-
if (
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
if (
|
|
708
|
-
|
|
76
|
+
if (t) return t;
|
|
77
|
+
Ue(s);
|
|
78
|
+
const h = Ge({ canvas: e, context: s, contextAttributes: l, log: n });
|
|
79
|
+
if (h) return h;
|
|
80
|
+
n.warn("ShapeParticleText: Failed to initialize custom context renderer, attempting hard fallback...");
|
|
709
81
|
try {
|
|
710
|
-
return new
|
|
711
|
-
} catch (
|
|
712
|
-
return
|
|
82
|
+
return new a.WebGLRenderer({ canvas: e });
|
|
83
|
+
} catch (g) {
|
|
84
|
+
return n.error("ShapeParticleText: Fatal error initializing WebGL renderer:", g), null;
|
|
713
85
|
}
|
|
714
|
-
},
|
|
715
|
-
const
|
|
716
|
-
|
|
717
|
-
let
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
let
|
|
721
|
-
for (; (
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
const
|
|
725
|
-
let
|
|
726
|
-
for (let
|
|
727
|
-
for (let
|
|
728
|
-
const
|
|
729
|
-
if (
|
|
730
|
-
const
|
|
731
|
-
|
|
86
|
+
}, $e = (e, s = 1.5) => {
|
|
87
|
+
const l = e && e.trim().length > 0 ? e : "AI", n = document.createElement("canvas"), t = n.getContext("2d");
|
|
88
|
+
n.width = 1024, n.height = 512, t.fillStyle = "white", t.textAlign = "center", t.textBaseline = "middle";
|
|
89
|
+
let h = 350;
|
|
90
|
+
t.font = `bold ${h}px Arial`;
|
|
91
|
+
const g = n.width * 0.85;
|
|
92
|
+
let E = t.measureText(l);
|
|
93
|
+
for (; (E.width > g || h > n.height * 0.7) && h > 20; )
|
|
94
|
+
h -= 10, t.font = `bold ${h}px Arial`, E = t.measureText(l);
|
|
95
|
+
t.fillText(l, n.width / 2, n.height / 2);
|
|
96
|
+
const C = t.getImageData(0, 0, n.width, n.height), m = [], p = 3, z = 220;
|
|
97
|
+
let G = 1 / 0, q = -1 / 0, V = 1 / 0, X = -1 / 0;
|
|
98
|
+
for (let w = 0; w < n.height; w += p)
|
|
99
|
+
for (let Y = 0; Y < n.width; Y += p) {
|
|
100
|
+
const re = (Math.floor(w) * n.width + Math.floor(Y)) * 4;
|
|
101
|
+
if (C.data[re + 3] > 160) {
|
|
102
|
+
const b = (Y - n.width / 2) / z * s, d = -(w - n.height / 2) / z * s, F = (Math.random() - 0.5) * 0.25;
|
|
103
|
+
m.push({ x: b, y: d, z: F }), b < G && (G = b), b > q && (q = b), d < V && (V = d), d > X && (X = d);
|
|
732
104
|
}
|
|
733
105
|
}
|
|
734
|
-
const
|
|
735
|
-
let
|
|
736
|
-
return
|
|
737
|
-
|
|
738
|
-
}),
|
|
739
|
-
},
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
-
if (
|
|
743
|
-
const
|
|
744
|
-
for (let
|
|
745
|
-
const
|
|
746
|
-
|
|
106
|
+
const y = q - G, K = X - V, Q = 3.2, D = 2.5;
|
|
107
|
+
let T = 1;
|
|
108
|
+
return y > Q && (T = Q / y), K * T > D && (T = D / K), T < 1 && m.forEach((w) => {
|
|
109
|
+
w.x *= T, w.y *= T, w.z *= T;
|
|
110
|
+
}), m;
|
|
111
|
+
}, Ne = ({ textParticlesData: e, actualCount: s }) => {
|
|
112
|
+
const l = [];
|
|
113
|
+
if (e.length > 0)
|
|
114
|
+
if (e.length > s) {
|
|
115
|
+
const n = e.length / s;
|
|
116
|
+
for (let t = 0; t < s; t++) {
|
|
117
|
+
const h = Math.floor(t * n), g = e[Math.min(h, e.length - 1)];
|
|
118
|
+
l.push(g.x, g.y, g.z);
|
|
747
119
|
}
|
|
748
120
|
} else
|
|
749
|
-
for (let
|
|
750
|
-
if (
|
|
751
|
-
|
|
121
|
+
for (let n = 0; n < s; n++)
|
|
122
|
+
if (n < e.length)
|
|
123
|
+
l.push(e[n].x, e[n].y, e[n].z);
|
|
752
124
|
else {
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
125
|
+
const t = e[Math.floor(Math.random() * e.length)];
|
|
126
|
+
l.push(
|
|
127
|
+
t.x + (Math.random() - 0.5) * 0.5,
|
|
128
|
+
t.y + (Math.random() - 0.5) * 0.5,
|
|
129
|
+
t.z + (Math.random() - 0.5) * 0.3
|
|
758
130
|
);
|
|
759
131
|
}
|
|
760
132
|
else
|
|
761
|
-
for (let
|
|
762
|
-
|
|
763
|
-
return
|
|
764
|
-
},
|
|
765
|
-
(Math.random() - 0.5) *
|
|
766
|
-
(Math.random() - 0.5) *
|
|
767
|
-
(Math.random() - 0.5) *
|
|
768
|
-
),
|
|
769
|
-
const
|
|
770
|
-
let
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
color:
|
|
133
|
+
for (let n = 0; n < s; n++)
|
|
134
|
+
l.push(0, 0, 0);
|
|
135
|
+
return l;
|
|
136
|
+
}, _e = (e) => new a.Vector3(
|
|
137
|
+
(Math.random() - 0.5) * e,
|
|
138
|
+
(Math.random() - 0.5) * e,
|
|
139
|
+
(Math.random() - 0.5) * e
|
|
140
|
+
), Je = ({ start: e, end: s, zapSpread: l, zapWidth: n, lightningColor: t }) => {
|
|
141
|
+
const h = e.clone().lerp(s, 0.3).add(_e(l)), g = e.clone().lerp(s, 0.7).add(_e(l)), E = new a.CatmullRomCurve3([e, h, g, s]), C = new a.TubeGeometry(E, 12, n, 4, !1);
|
|
142
|
+
let m;
|
|
143
|
+
t ? t.r !== void 0 ? m = new a.Color(t.r, t.g, t.b) : m = new a.Color(t) : m = new a.Color().setHSL(0.7 + Math.random() * 0.08, 1, 0.7 + Math.random() * 0.15);
|
|
144
|
+
const p = new a.MeshBasicMaterial({
|
|
145
|
+
color: m,
|
|
774
146
|
transparent: !0,
|
|
775
147
|
opacity: 0.85,
|
|
776
|
-
blending:
|
|
777
|
-
}),
|
|
778
|
-
line:
|
|
779
|
-
material:
|
|
148
|
+
blending: a.AdditiveBlending
|
|
149
|
+
}), z = new a.Mesh(C, p), G = {
|
|
150
|
+
line: z,
|
|
151
|
+
material: p,
|
|
780
152
|
life: 0,
|
|
781
153
|
maxLife: 0.5 + Math.random() * 0.9,
|
|
782
154
|
flickerSpeed: 18 + Math.random() * 20,
|
|
783
155
|
phase: Math.random() * Math.PI * 2
|
|
784
156
|
};
|
|
785
|
-
return { line:
|
|
786
|
-
},
|
|
787
|
-
text:
|
|
788
|
-
particleCount:
|
|
789
|
-
particleSize:
|
|
790
|
-
primaryColor:
|
|
157
|
+
return { line: z, material: p, segment: G };
|
|
158
|
+
}, et = ({
|
|
159
|
+
text: e = "AI",
|
|
160
|
+
particleCount: s = 24e3,
|
|
161
|
+
particleSize: l = 0.01,
|
|
162
|
+
primaryColor: n = { r: 0.396, g: 0.239, b: 0.82 },
|
|
791
163
|
// #653DD1
|
|
792
|
-
secondaryColor:
|
|
164
|
+
secondaryColor: t = { r: 0.537, g: 0.239, b: 0.82 },
|
|
793
165
|
// Purple variant
|
|
794
|
-
backgroundColor:
|
|
795
|
-
transparent:
|
|
796
|
-
morphDuration:
|
|
797
|
-
rotationSpeed:
|
|
798
|
-
hoverIntensity:
|
|
799
|
-
lightningIntensity:
|
|
800
|
-
lightningColor:
|
|
166
|
+
backgroundColor: h = "#000000",
|
|
167
|
+
transparent: g = !1,
|
|
168
|
+
morphDuration: E = 2.5,
|
|
169
|
+
rotationSpeed: C = 0.4,
|
|
170
|
+
hoverIntensity: m = 0.05,
|
|
171
|
+
lightningIntensity: p = 1,
|
|
172
|
+
lightningColor: z = null,
|
|
801
173
|
// Optional hex or {r,g,b} object. If null, uses random colors
|
|
802
|
-
zapSpread:
|
|
174
|
+
zapSpread: G = 0.7,
|
|
803
175
|
// Amplitude/Spread of lightning
|
|
804
|
-
zapWidth:
|
|
176
|
+
zapWidth: q = 0.02,
|
|
805
177
|
// Thickness of lightning
|
|
806
|
-
cameraDistance:
|
|
807
|
-
globeOpacity:
|
|
808
|
-
globeColor:
|
|
178
|
+
cameraDistance: V = 5.5,
|
|
179
|
+
globeOpacity: X = 0.08,
|
|
180
|
+
globeColor: y = null,
|
|
809
181
|
// Optional override for globe color
|
|
810
|
-
showGlobe:
|
|
811
|
-
glowEffect:
|
|
812
|
-
debug:
|
|
813
|
-
className:
|
|
814
|
-
style:
|
|
815
|
-
...
|
|
182
|
+
showGlobe: K = !0,
|
|
183
|
+
glowEffect: Q = !0,
|
|
184
|
+
debug: D = !1,
|
|
185
|
+
className: T = "",
|
|
186
|
+
style: w = {},
|
|
187
|
+
...Y
|
|
816
188
|
}) => {
|
|
817
|
-
const
|
|
818
|
-
return
|
|
819
|
-
const
|
|
820
|
-
if (!
|
|
821
|
-
|
|
189
|
+
const re = Re(null), b = Re(null);
|
|
190
|
+
return Ye(() => {
|
|
191
|
+
const d = re.current, F = Ie(D);
|
|
192
|
+
if (!d) {
|
|
193
|
+
F.error("ShapeParticleText: Canvas element not found");
|
|
822
194
|
return;
|
|
823
195
|
}
|
|
824
|
-
let
|
|
825
|
-
const
|
|
196
|
+
let ee = !0;
|
|
197
|
+
const ce = [];
|
|
826
198
|
return (() => {
|
|
827
|
-
var
|
|
828
|
-
if (!
|
|
829
|
-
const
|
|
830
|
-
let
|
|
199
|
+
var Te, Le;
|
|
200
|
+
if (!ee) return;
|
|
201
|
+
const I = new a.Scene(), U = new a.PerspectiveCamera(50, d.offsetWidth / d.offsetHeight, 0.1, 1e3);
|
|
202
|
+
let L;
|
|
831
203
|
try {
|
|
832
|
-
const
|
|
204
|
+
const r = {
|
|
833
205
|
alpha: !0,
|
|
834
206
|
antialias: !0,
|
|
835
207
|
powerPreference: "default"
|
|
836
208
|
};
|
|
837
|
-
let
|
|
209
|
+
let i = null;
|
|
838
210
|
try {
|
|
839
|
-
|
|
211
|
+
i = d.getContext("webgl2", r) || d.getContext("webgl", r) || d.getContext("experimental-webgl", r);
|
|
840
212
|
} catch {
|
|
841
|
-
|
|
213
|
+
i = null;
|
|
842
214
|
}
|
|
843
|
-
if (!
|
|
844
|
-
|
|
215
|
+
if (!i) {
|
|
216
|
+
F.error("ShapeParticleText: WebGL not supported in this environment");
|
|
845
217
|
return;
|
|
846
218
|
}
|
|
847
|
-
if (
|
|
848
|
-
} catch (
|
|
849
|
-
|
|
219
|
+
if (L = Ze({ canvas: d, context: i, contextAttributes: r, log: F }), !L) return;
|
|
220
|
+
} catch (r) {
|
|
221
|
+
F.error("ShapeParticleText: Unexpected error initializing scene:", r);
|
|
850
222
|
return;
|
|
851
223
|
}
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
let
|
|
855
|
-
if (
|
|
856
|
-
const
|
|
857
|
-
let
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
color:
|
|
224
|
+
L.setSize(d.offsetWidth, d.offsetHeight), L.setPixelRatio(Math.min(window.devicePixelRatio, 2)), L.setClearColor(0, 0);
|
|
225
|
+
const S = ze(n, { r: 0.396, g: 0.239, b: 0.82 }), A = ze(t, { r: 0.537, g: 0.239, b: 0.82 });
|
|
226
|
+
let te = null;
|
|
227
|
+
if (K) {
|
|
228
|
+
const r = new a.SphereGeometry(2, 48, 48);
|
|
229
|
+
let i;
|
|
230
|
+
y ? i = typeof y == "string" ? new a.Color(y) : new a.Color(y.r, y.g, y.b) : i = new a.Color(S.r, S.g, S.b);
|
|
231
|
+
const o = new a.MeshBasicMaterial({
|
|
232
|
+
color: i,
|
|
861
233
|
wireframe: !0,
|
|
862
234
|
transparent: !0,
|
|
863
|
-
opacity:
|
|
235
|
+
opacity: X
|
|
864
236
|
});
|
|
865
|
-
|
|
237
|
+
te = new a.Mesh(r, o), I.add(te);
|
|
866
238
|
}
|
|
867
|
-
const
|
|
868
|
-
let
|
|
869
|
-
for (let
|
|
870
|
-
const
|
|
871
|
-
let
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
-
|
|
875
|
-
const
|
|
876
|
-
if (
|
|
239
|
+
const W = new a.Group(), ne = new Float32Array(s * 3), x = new Float32Array(s * 3), pe = new Float32Array(s), le = [], he = [], P = [], v = [];
|
|
240
|
+
let f = 0;
|
|
241
|
+
for (let r = 0; r < s; r++) {
|
|
242
|
+
const i = r < s / 2 ? -1 : 1, o = Math.random() * Math.PI, u = Math.random() * Math.PI * 2, c = 1.4 + Math.random() * 0.3, H = 1.2 + Math.random() * 0.2, ue = 1 + Math.random() * 0.2;
|
|
243
|
+
let M = c * Math.sin(o) * Math.cos(u), _ = H * Math.sin(o) * Math.sin(u), O = ue * Math.cos(o);
|
|
244
|
+
M = M * 0.85 + i * 0.35;
|
|
245
|
+
const me = (Math.sin(o * 8) * Math.cos(u * 6) + Math.sin(o * 12) * Math.sin(u * 8)) * 0.12, se = Math.sqrt(M * M + _ * _ + O * O);
|
|
246
|
+
se > 0.1 && (M += me * (M / se), _ += me * (_ / se), O += me * (O / se));
|
|
247
|
+
const Se = Math.sqrt(M * M + _ * _ + O * O);
|
|
248
|
+
if (Se < 1 || Se > 2 || i === -1 && M > -0.15 || i === 1 && M < 0.15)
|
|
877
249
|
continue;
|
|
878
|
-
const
|
|
879
|
-
|
|
880
|
-
const
|
|
881
|
-
if (
|
|
882
|
-
|
|
883
|
-
else if (
|
|
884
|
-
const
|
|
885
|
-
|
|
250
|
+
const R = new a.Vector3(M, _, O);
|
|
251
|
+
R.x < 0 ? le.push(R.clone()) : he.push(R.clone()), ne[f * 3] = R.x, ne[f * 3 + 1] = R.y, ne[f * 3 + 2] = R.z, P.push(R.x, R.y, R.z);
|
|
252
|
+
const N = (_ + H) / (H * 2);
|
|
253
|
+
if (N < 0.3)
|
|
254
|
+
x[f * 3] = S.r * 0.5 + N * 0.4, x[f * 3 + 1] = S.g * 1 + N * 0.05, x[f * 3 + 2] = S.b * 1 + N * 0.05;
|
|
255
|
+
else if (N < 0.6) {
|
|
256
|
+
const J = (N - 0.3) / 0.3;
|
|
257
|
+
x[f * 3] = (S.r * (1 - J) + A.r * J) * 1.1, x[f * 3 + 1] = (S.g * (1 - J) + A.g * J) * 1.1, x[f * 3 + 2] = (S.b * (1 - J) + A.b * J) * 1.1;
|
|
886
258
|
} else
|
|
887
|
-
|
|
888
|
-
|
|
259
|
+
x[f * 3] = A.r * 1, x[f * 3 + 1] = A.g * 1, x[f * 3 + 2] = A.b * 1;
|
|
260
|
+
pe[f] = Math.random() * 1.5 + 0.8, f++;
|
|
889
261
|
}
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
const
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
size:
|
|
262
|
+
const Ee = $e(e, 1.8);
|
|
263
|
+
v.push(...Ne({ textParticlesData: Ee, actualCount: f }));
|
|
264
|
+
const Fe = ne.slice(0, f * 3), We = x.slice(0, f * 3), Be = pe.slice(0, f), B = new a.BufferGeometry();
|
|
265
|
+
B.setAttribute("position", new a.BufferAttribute(Fe, 3)), B.setAttribute("color", new a.BufferAttribute(We, 3)), B.setAttribute("size", new a.BufferAttribute(Be, 1)), B.setDrawRange(0, f);
|
|
266
|
+
const ke = new a.PointsMaterial({
|
|
267
|
+
size: l,
|
|
896
268
|
vertexColors: !0,
|
|
897
269
|
transparent: !0,
|
|
898
270
|
opacity: 1,
|
|
899
|
-
blending:
|
|
271
|
+
blending: Q ? a.AdditiveBlending : a.NormalBlending,
|
|
900
272
|
sizeAttenuation: !0
|
|
901
|
-
}),
|
|
902
|
-
|
|
903
|
-
const
|
|
904
|
-
color:
|
|
273
|
+
}), je = new a.Points(B, ke);
|
|
274
|
+
W.add(je), I.add(W);
|
|
275
|
+
const He = new a.Color(A.r, A.g, A.b), Oe = new a.LineBasicMaterial({
|
|
276
|
+
color: He,
|
|
905
277
|
transparent: !0,
|
|
906
278
|
opacity: 0.2
|
|
907
|
-
}),
|
|
908
|
-
if (
|
|
909
|
-
for (let
|
|
910
|
-
const
|
|
911
|
-
if (!
|
|
912
|
-
const
|
|
913
|
-
|
|
279
|
+
}), ge = new a.Group(), Me = le.length, ye = he.length;
|
|
280
|
+
if (Me > 0 && ye > 0)
|
|
281
|
+
for (let r = 0; r < 80; r++) {
|
|
282
|
+
const i = (Te = le[Math.floor(Math.random() * Me)]) == null ? void 0 : Te.clone(), o = (Le = he[Math.floor(Math.random() * ye)]) == null ? void 0 : Le.clone();
|
|
283
|
+
if (!i || !o) continue;
|
|
284
|
+
const u = new a.BufferGeometry().setFromPoints([i, o]), c = new a.Line(u, Oe);
|
|
285
|
+
ge.add(c);
|
|
914
286
|
}
|
|
915
|
-
|
|
916
|
-
const
|
|
917
|
-
|
|
918
|
-
const
|
|
919
|
-
let
|
|
920
|
-
const
|
|
921
|
-
if (!
|
|
922
|
-
const
|
|
923
|
-
if (
|
|
924
|
-
const { line:
|
|
925
|
-
|
|
926
|
-
},
|
|
927
|
-
|
|
928
|
-
const
|
|
929
|
-
if (!
|
|
930
|
-
const
|
|
931
|
-
|
|
287
|
+
W.add(ge);
|
|
288
|
+
const ie = new a.Group();
|
|
289
|
+
W.add(ie);
|
|
290
|
+
const k = [];
|
|
291
|
+
let fe = 0;
|
|
292
|
+
const Ce = 6, qe = () => {
|
|
293
|
+
if (!ee || !f) return;
|
|
294
|
+
const r = Math.floor(Math.random() * f), i = Math.floor(Math.random() * f), o = B.attributes.position.array, u = new a.Vector3(o[r * 3], o[r * 3 + 1], o[r * 3 + 2]), c = new a.Vector3(o[i * 3], o[i * 3 + 1], o[i * 3 + 2]);
|
|
295
|
+
if (u.lengthSq() < 0.1 || c.lengthSq() < 0.1 || u.distanceToSquared(c) < 0.5) return;
|
|
296
|
+
const { line: H, segment: ue } = Je({ start: u, end: c, zapSpread: G, zapWidth: q, lightningColor: z });
|
|
297
|
+
ie.add(H), k.push(ue);
|
|
298
|
+
}, Ve = new a.Clock();
|
|
299
|
+
U.position.set(0, 0, V);
|
|
300
|
+
const oe = { x: 0, y: 0 }, ae = { x: 0, y: 0 }, Z = { x: 0, y: 0 }, we = (r) => {
|
|
301
|
+
if (!d) return;
|
|
302
|
+
const i = d.getBoundingClientRect();
|
|
303
|
+
oe.x = (r.clientX - i.left) / i.width * 2 - 1, oe.y = -((r.clientY - i.top) / i.height) * 2 + 1, ae.y = oe.x * 0.3 * (m / 0.05), ae.x = oe.y * 0.2 * (m / 0.05);
|
|
932
304
|
};
|
|
933
|
-
|
|
934
|
-
|
|
305
|
+
d.addEventListener("mousemove", we), ce.push(() => {
|
|
306
|
+
d.removeEventListener("mousemove", we);
|
|
935
307
|
});
|
|
936
|
-
let
|
|
937
|
-
const
|
|
938
|
-
let
|
|
939
|
-
const
|
|
940
|
-
let
|
|
941
|
-
function
|
|
942
|
-
if (!
|
|
943
|
-
|
|
944
|
-
const
|
|
945
|
-
if (
|
|
946
|
-
|
|
947
|
-
const
|
|
948
|
-
for (let
|
|
949
|
-
const
|
|
950
|
-
|
|
308
|
+
let $ = 0;
|
|
309
|
+
const Xe = 0.08;
|
|
310
|
+
let j = 0, be = 1;
|
|
311
|
+
const xe = 3;
|
|
312
|
+
let de = xe;
|
|
313
|
+
function Pe() {
|
|
314
|
+
if (!ee) return;
|
|
315
|
+
b.current = requestAnimationFrame(Pe);
|
|
316
|
+
const r = Ve.getDelta();
|
|
317
|
+
if ($ += r, Z.x += (ae.x - Z.x) * 0.05, Z.y += (ae.y - Z.y) * 0.05, te && (te.rotation.y += r * 0.1, te.rotation.x = Math.sin($ * 0.3) * 0.03), W.rotation.y = Math.sin($ * 0.4) * C + Z.y, W.rotation.x = Math.sin($ * 0.25) * Xe + Z.x, W.rotation.z = Math.cos($ * 0.15) * 0.015, de -= r, de <= 0) {
|
|
318
|
+
j += r / E, j >= 1 && (j = 0, be *= -1, de = xe);
|
|
319
|
+
const i = j < 0.5 ? 2 * j * j : 1 - Math.pow(-2 * j + 2, 2) / 2, o = B.attributes.position;
|
|
320
|
+
for (let u = 0; u < f; u++) {
|
|
321
|
+
const c = u * 3;
|
|
322
|
+
be === 1 ? (o.array[c] = P[c] + (v[c] - P[c]) * i, o.array[c + 1] = P[c + 1] + (v[c + 1] - P[c + 1]) * i, o.array[c + 2] = P[c + 2] + (v[c + 2] - P[c + 2]) * i) : (o.array[c] = v[c] + (P[c] - v[c]) * i, o.array[c + 1] = v[c + 1] + (P[c + 1] - v[c + 1]) * i, o.array[c + 2] = v[c + 2] + (P[c + 2] - v[c + 2]) * i);
|
|
951
323
|
}
|
|
952
|
-
|
|
324
|
+
o.needsUpdate = !0;
|
|
953
325
|
}
|
|
954
|
-
|
|
955
|
-
for (let
|
|
956
|
-
const
|
|
957
|
-
if (!
|
|
958
|
-
|
|
959
|
-
const
|
|
960
|
-
|
|
326
|
+
fe -= r, p > 0 && fe <= 0 && k.length < Ce * p && (qe(), fe = (0.12 + Math.random() * 0.25) / Math.max(0.1, p));
|
|
327
|
+
for (let i = k.length - 1; i >= 0; i--) {
|
|
328
|
+
const o = k[i];
|
|
329
|
+
if (!o || !o.material) continue;
|
|
330
|
+
o.life += r;
|
|
331
|
+
const u = o.life / o.maxLife, c = Math.pow(Math.max(0, 1 - u), 1.5), H = 0.6 + Math.sin($ * o.flickerSpeed + o.phase) * 0.4;
|
|
332
|
+
o.material.opacity = Math.max(0, c * H * Math.min(1, p)), o.life >= o.maxLife && (ie.remove(o.line), o.line.geometry && o.line.geometry.dispose(), o.material && o.material.dispose(), k.splice(i, 1));
|
|
961
333
|
}
|
|
962
|
-
|
|
334
|
+
L.render(I, U);
|
|
963
335
|
}
|
|
964
|
-
|
|
965
|
-
const
|
|
966
|
-
if (!
|
|
967
|
-
const
|
|
968
|
-
|
|
336
|
+
Pe();
|
|
337
|
+
const ve = () => {
|
|
338
|
+
if (!ee || !d) return;
|
|
339
|
+
const r = d.offsetWidth, i = d.offsetHeight;
|
|
340
|
+
r === 0 || i === 0 || (U.aspect = r / i, U.updateProjectionMatrix(), L.setSize(r, i), L.setPixelRatio(Math.min(window.devicePixelRatio * 1.5, 3)));
|
|
969
341
|
};
|
|
970
|
-
window.addEventListener("resize",
|
|
971
|
-
window.removeEventListener("resize",
|
|
972
|
-
|
|
973
|
-
}),
|
|
974
|
-
|
|
975
|
-
}),
|
|
342
|
+
window.addEventListener("resize", ve), ce.push(() => {
|
|
343
|
+
window.removeEventListener("resize", ve), k.forEach((r) => {
|
|
344
|
+
r.line && (ie.remove(r.line), r.line.geometry && r.line.geometry.dispose(), r.material && r.material.dispose());
|
|
345
|
+
}), k.length = 0, I.traverse((r) => {
|
|
346
|
+
r.geometry && r.geometry.dispose(), r.material && (Array.isArray(r.material) ? r.material.forEach((i) => i.dispose()) : r.material.dispose());
|
|
347
|
+
}), L.dispose();
|
|
976
348
|
});
|
|
977
349
|
})(), () => {
|
|
978
|
-
|
|
350
|
+
ee = !1, b.current && (cancelAnimationFrame(b.current), b.current = null), ce.forEach((I) => {
|
|
979
351
|
try {
|
|
980
|
-
|
|
981
|
-
} catch (
|
|
982
|
-
|
|
352
|
+
I();
|
|
353
|
+
} catch (U) {
|
|
354
|
+
F.error("Cleanup error:", U);
|
|
983
355
|
}
|
|
984
356
|
});
|
|
985
357
|
};
|
|
986
|
-
}, [
|
|
358
|
+
}, [e, s, l, n, t, E, C, m, p, z, G, q, V, X, y, K, Q, D]), /* @__PURE__ */ Ae(
|
|
987
359
|
"div",
|
|
988
360
|
{
|
|
989
|
-
...
|
|
990
|
-
className:
|
|
991
|
-
style: { position: "relative", width: "100%", height: "100%", backgroundColor:
|
|
992
|
-
children: /* @__PURE__ */
|
|
361
|
+
...Y,
|
|
362
|
+
className: T,
|
|
363
|
+
style: { position: "relative", width: "100%", height: "100%", backgroundColor: g ? "transparent" : h, ...w },
|
|
364
|
+
children: /* @__PURE__ */ Ae(
|
|
993
365
|
"canvas",
|
|
994
366
|
{
|
|
995
|
-
ref:
|
|
367
|
+
ref: re,
|
|
996
368
|
style: {
|
|
997
369
|
display: "block",
|
|
998
370
|
width: "100%",
|
|
@@ -1005,5 +377,5 @@ const wr = (n) => n ? {
|
|
|
1005
377
|
);
|
|
1006
378
|
};
|
|
1007
379
|
export {
|
|
1008
|
-
|
|
380
|
+
et as ShapeParticleText
|
|
1009
381
|
};
|