@automattic/agenttic-ui 0.1.3 → 0.1.4
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/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +790 -757
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { motion as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { Slot as
|
|
6
|
-
import
|
|
1
|
+
import * as Pt from "react";
|
|
2
|
+
import We, { useState as Ne, useEffect as q, useCallback as N, useRef as V, useId as dn, memo as hn, useMemo as pn } from "react";
|
|
3
|
+
import { motion as oe, AnimatePresence as tt, useMotionValue as yt, useDragControls as vn, animate as _t } from "framer-motion";
|
|
4
|
+
import { useRef as mn, useCallback as Xe, useEffect as gn } from "@wordpress/element";
|
|
5
|
+
import { Slot as yn } from "@radix-ui/react-slot";
|
|
6
|
+
import _n from "react-markdown";
|
|
7
7
|
import './index.css';var qe = { exports: {} }, Ee = {};
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
@@ -14,17 +14,17 @@ import './index.css';var qe = { exports: {} }, Ee = {};
|
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
var
|
|
17
|
+
var Ct;
|
|
18
|
+
function Cn() {
|
|
19
|
+
if (Ct) return Ee;
|
|
20
|
+
Ct = 1;
|
|
21
|
+
var t = We, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
22
22
|
function l(h, u, f) {
|
|
23
23
|
var p, _ = {}, x = null, j = null;
|
|
24
24
|
f !== void 0 && (x = "" + f), u.key !== void 0 && (x = "" + u.key), u.ref !== void 0 && (j = u.ref);
|
|
25
|
-
for (p in u)
|
|
25
|
+
for (p in u) i.call(u, p) && !c.hasOwnProperty(p) && (_[p] = u[p]);
|
|
26
26
|
if (h && h.defaultProps) for (p in u = h.defaultProps, u) _[p] === void 0 && (_[p] = u[p]);
|
|
27
|
-
return { $$typeof:
|
|
27
|
+
return { $$typeof: n, type: h, key: x, ref: j, props: _, _owner: o.current };
|
|
28
28
|
}
|
|
29
29
|
return Ee.Fragment = r, Ee.jsx = l, Ee.jsxs = l, Ee;
|
|
30
30
|
}
|
|
@@ -38,48 +38,48 @@ var Re = {};
|
|
|
38
38
|
* This source code is licensed under the MIT license found in the
|
|
39
39
|
* LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
|
-
var
|
|
42
|
-
function
|
|
43
|
-
return
|
|
44
|
-
var
|
|
41
|
+
var xt;
|
|
42
|
+
function xn() {
|
|
43
|
+
return xt || (xt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
44
|
+
var t = We, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), h = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), j = Symbol.for("react.offscreen"), I = Symbol.iterator, M = "@@iterator";
|
|
45
45
|
function B(e) {
|
|
46
46
|
if (e === null || typeof e != "object")
|
|
47
47
|
return null;
|
|
48
|
-
var
|
|
49
|
-
return typeof
|
|
48
|
+
var a = I && e[I] || e[M];
|
|
49
|
+
return typeof a == "function" ? a : null;
|
|
50
50
|
}
|
|
51
|
-
var W =
|
|
52
|
-
function
|
|
51
|
+
var W = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
52
|
+
function A(e) {
|
|
53
53
|
{
|
|
54
|
-
for (var
|
|
54
|
+
for (var a = arguments.length, d = new Array(a > 1 ? a - 1 : 0), y = 1; y < a; y++)
|
|
55
55
|
d[y - 1] = arguments[y];
|
|
56
56
|
m("error", e, d);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function m(e,
|
|
59
|
+
function m(e, a, d) {
|
|
60
60
|
{
|
|
61
61
|
var y = W.ReactDebugCurrentFrame, T = y.getStackAddendum();
|
|
62
|
-
T !== "" && (
|
|
62
|
+
T !== "" && (a += "%s", d = d.concat([T]));
|
|
63
63
|
var S = d.map(function(w) {
|
|
64
64
|
return String(w);
|
|
65
65
|
});
|
|
66
|
-
S.unshift("Warning: " +
|
|
66
|
+
S.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, S);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
var v = !1, g = !1, C = !1, L = !1,
|
|
69
|
+
var v = !1, g = !1, C = !1, L = !1, O = !1, R;
|
|
70
70
|
R = Symbol.for("react.module.reference");
|
|
71
71
|
function ue(e) {
|
|
72
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
72
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === c || O || e === o || e === f || e === p || L || e === j || v || g || C || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === h || e.$$typeof === u || // This needs to include all possible module reference object
|
|
73
73
|
// types supported by any Flight configuration anywhere since
|
|
74
74
|
// we don't know which Flight build this will end up being used
|
|
75
75
|
// with.
|
|
76
76
|
e.$$typeof === R || e.getModuleId !== void 0));
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ye(e, a, d) {
|
|
79
79
|
var y = e.displayName;
|
|
80
80
|
if (y)
|
|
81
81
|
return y;
|
|
82
|
-
var T =
|
|
82
|
+
var T = a.displayName || a.name || "";
|
|
83
83
|
return T !== "" ? d + "(" + T + ")" : d;
|
|
84
84
|
}
|
|
85
85
|
function fe(e) {
|
|
@@ -88,18 +88,18 @@ function Cn() {
|
|
|
88
88
|
function X(e) {
|
|
89
89
|
if (e == null)
|
|
90
90
|
return null;
|
|
91
|
-
if (typeof e.tag == "number" &&
|
|
91
|
+
if (typeof e.tag == "number" && A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
92
92
|
return e.displayName || e.name || null;
|
|
93
93
|
if (typeof e == "string")
|
|
94
94
|
return e;
|
|
95
95
|
switch (e) {
|
|
96
|
-
case
|
|
96
|
+
case i:
|
|
97
97
|
return "Fragment";
|
|
98
98
|
case r:
|
|
99
99
|
return "Portal";
|
|
100
100
|
case c:
|
|
101
101
|
return "Profiler";
|
|
102
|
-
case
|
|
102
|
+
case o:
|
|
103
103
|
return "StrictMode";
|
|
104
104
|
case f:
|
|
105
105
|
return "Suspense";
|
|
@@ -109,13 +109,13 @@ function Cn() {
|
|
|
109
109
|
if (typeof e == "object")
|
|
110
110
|
switch (e.$$typeof) {
|
|
111
111
|
case h:
|
|
112
|
-
var
|
|
113
|
-
return fe(
|
|
112
|
+
var a = e;
|
|
113
|
+
return fe(a) + ".Consumer";
|
|
114
114
|
case l:
|
|
115
115
|
var d = e;
|
|
116
116
|
return fe(d._context) + ".Provider";
|
|
117
117
|
case u:
|
|
118
|
-
return
|
|
118
|
+
return Ye(e, e.render, "ForwardRef");
|
|
119
119
|
case _:
|
|
120
120
|
var y = e.displayName || null;
|
|
121
121
|
return y !== null ? y : X(e.type) || "Memo";
|
|
@@ -130,18 +130,18 @@ function Cn() {
|
|
|
130
130
|
}
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
|
-
var K = Object.assign,
|
|
134
|
-
function Ie() {
|
|
135
|
-
}
|
|
136
|
-
Ie.__reactDisabledLog = !0;
|
|
133
|
+
var K = Object.assign, z = 0, J, ne, re, de, Oe, ie, Ae;
|
|
137
134
|
function De() {
|
|
135
|
+
}
|
|
136
|
+
De.__reactDisabledLog = !0;
|
|
137
|
+
function Ie() {
|
|
138
138
|
{
|
|
139
|
-
if (
|
|
140
|
-
|
|
139
|
+
if (z === 0) {
|
|
140
|
+
J = console.log, ne = console.info, re = console.warn, de = console.error, Oe = console.group, ie = console.groupCollapsed, Ae = console.groupEnd;
|
|
141
141
|
var e = {
|
|
142
142
|
configurable: !0,
|
|
143
143
|
enumerable: !0,
|
|
144
|
-
value:
|
|
144
|
+
value: De,
|
|
145
145
|
writable: !0
|
|
146
146
|
};
|
|
147
147
|
Object.defineProperties(console, {
|
|
@@ -154,12 +154,12 @@ function Cn() {
|
|
|
154
154
|
groupEnd: e
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
z++;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
function _e() {
|
|
161
161
|
{
|
|
162
|
-
if (
|
|
162
|
+
if (z--, z === 0) {
|
|
163
163
|
var e = {
|
|
164
164
|
configurable: !0,
|
|
165
165
|
enumerable: !0,
|
|
@@ -167,7 +167,7 @@ function Cn() {
|
|
|
167
167
|
};
|
|
168
168
|
Object.defineProperties(console, {
|
|
169
169
|
log: K({}, e, {
|
|
170
|
-
value:
|
|
170
|
+
value: J
|
|
171
171
|
}),
|
|
172
172
|
info: K({}, e, {
|
|
173
173
|
value: ne
|
|
@@ -179,21 +179,21 @@ function Cn() {
|
|
|
179
179
|
value: de
|
|
180
180
|
}),
|
|
181
181
|
group: K({}, e, {
|
|
182
|
-
value:
|
|
182
|
+
value: Oe
|
|
183
183
|
}),
|
|
184
184
|
groupCollapsed: K({}, e, {
|
|
185
|
-
value:
|
|
185
|
+
value: ie
|
|
186
186
|
}),
|
|
187
187
|
groupEnd: K({}, e, {
|
|
188
|
-
value:
|
|
188
|
+
value: Ae
|
|
189
189
|
})
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
z < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
var
|
|
196
|
-
function Q(e,
|
|
195
|
+
var ae = W.ReactCurrentDispatcher, Ce;
|
|
196
|
+
function Q(e, a, d) {
|
|
197
197
|
{
|
|
198
198
|
if (Ce === void 0)
|
|
199
199
|
try {
|
|
@@ -211,7 +211,7 @@ function Cn() {
|
|
|
211
211
|
var Pe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
212
212
|
he = new Pe();
|
|
213
213
|
}
|
|
214
|
-
function Fe(e,
|
|
214
|
+
function Fe(e, a) {
|
|
215
215
|
if (!e || xe)
|
|
216
216
|
return "";
|
|
217
217
|
{
|
|
@@ -224,9 +224,9 @@ function Cn() {
|
|
|
224
224
|
var T = Error.prepareStackTrace;
|
|
225
225
|
Error.prepareStackTrace = void 0;
|
|
226
226
|
var S;
|
|
227
|
-
S =
|
|
227
|
+
S = ae.current, ae.current = null, Ie();
|
|
228
228
|
try {
|
|
229
|
-
if (
|
|
229
|
+
if (a) {
|
|
230
230
|
var w = function() {
|
|
231
231
|
throw Error();
|
|
232
232
|
};
|
|
@@ -261,35 +261,35 @@ function Cn() {
|
|
|
261
261
|
if (U && y && typeof U.stack == "string") {
|
|
262
262
|
for (var b = U.stack.split(`
|
|
263
263
|
`), H = y.stack.split(`
|
|
264
|
-
`),
|
|
264
|
+
`), D = b.length - 1, P = H.length - 1; D >= 1 && P >= 0 && b[D] !== H[P]; )
|
|
265
265
|
P--;
|
|
266
|
-
for (;
|
|
267
|
-
if (b[
|
|
268
|
-
if (
|
|
266
|
+
for (; D >= 1 && P >= 0; D--, P--)
|
|
267
|
+
if (b[D] !== H[P]) {
|
|
268
|
+
if (D !== 1 || P !== 1)
|
|
269
269
|
do
|
|
270
|
-
if (
|
|
270
|
+
if (D--, P--, P < 0 || b[D] !== H[P]) {
|
|
271
271
|
var G = `
|
|
272
|
-
` + b[
|
|
272
|
+
` + b[D].replace(" at new ", " at ");
|
|
273
273
|
return e.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", e.displayName)), typeof e == "function" && he.set(e, G), G;
|
|
274
274
|
}
|
|
275
|
-
while (
|
|
275
|
+
while (D >= 1 && P >= 0);
|
|
276
276
|
break;
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
} finally {
|
|
280
|
-
xe = !1,
|
|
280
|
+
xe = !1, ae.current = S, _e(), Error.prepareStackTrace = T;
|
|
281
281
|
}
|
|
282
282
|
var me = e ? e.displayName || e.name : "", ce = me ? Q(me) : "";
|
|
283
283
|
return typeof e == "function" && he.set(e, ce), ce;
|
|
284
284
|
}
|
|
285
|
-
function E(e,
|
|
285
|
+
function E(e, a, d) {
|
|
286
286
|
return Fe(e, !1);
|
|
287
287
|
}
|
|
288
288
|
function $(e) {
|
|
289
|
-
var
|
|
290
|
-
return !!(
|
|
289
|
+
var a = e.prototype;
|
|
290
|
+
return !!(a && a.isReactComponent);
|
|
291
291
|
}
|
|
292
|
-
function Y(e,
|
|
292
|
+
function Y(e, a, d) {
|
|
293
293
|
if (e == null)
|
|
294
294
|
return "";
|
|
295
295
|
if (typeof e == "function")
|
|
@@ -307,11 +307,11 @@ function Cn() {
|
|
|
307
307
|
case u:
|
|
308
308
|
return E(e.render);
|
|
309
309
|
case _:
|
|
310
|
-
return Y(e.type,
|
|
310
|
+
return Y(e.type, a, d);
|
|
311
311
|
case x: {
|
|
312
312
|
var y = e, T = y._payload, S = y._init;
|
|
313
313
|
try {
|
|
314
|
-
return Y(S(T),
|
|
314
|
+
return Y(S(T), a, d);
|
|
315
315
|
} catch {
|
|
316
316
|
}
|
|
317
317
|
}
|
|
@@ -321,12 +321,12 @@ function Cn() {
|
|
|
321
321
|
var Z = Object.prototype.hasOwnProperty, se = {}, be = W.ReactDebugCurrentFrame;
|
|
322
322
|
function ee(e) {
|
|
323
323
|
if (e) {
|
|
324
|
-
var
|
|
324
|
+
var a = e._owner, d = Y(e.type, e._source, a ? a.type : null);
|
|
325
325
|
be.setExtraStackFrame(d);
|
|
326
326
|
} else
|
|
327
327
|
be.setExtraStackFrame(null);
|
|
328
328
|
}
|
|
329
|
-
function pe(e,
|
|
329
|
+
function pe(e, a, d, y, T) {
|
|
330
330
|
{
|
|
331
331
|
var S = Function.call.bind(Z);
|
|
332
332
|
for (var w in e)
|
|
@@ -337,67 +337,67 @@ function Cn() {
|
|
|
337
337
|
var H = Error((y || "React class") + ": " + d + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
338
338
|
throw H.name = "Invariant Violation", H;
|
|
339
339
|
}
|
|
340
|
-
b = e[w](
|
|
341
|
-
} catch (
|
|
342
|
-
b =
|
|
340
|
+
b = e[w](a, w, y, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
341
|
+
} catch (D) {
|
|
342
|
+
b = D;
|
|
343
343
|
}
|
|
344
|
-
b && !(b instanceof Error) && (ee(T),
|
|
344
|
+
b && !(b instanceof Error) && (ee(T), A("%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).", y || "React class", d, w, typeof b), ee(null)), b instanceof Error && !(b.message in se) && (se[b.message] = !0, ee(T), A("Failed %s type: %s", d, b.message), ee(null));
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
var
|
|
348
|
+
var Ue = Array.isArray;
|
|
349
349
|
function we(e) {
|
|
350
|
-
return
|
|
350
|
+
return Ue(e);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Bt(e) {
|
|
353
353
|
{
|
|
354
|
-
var
|
|
354
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, d = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
355
355
|
return d;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Zt(e) {
|
|
359
359
|
try {
|
|
360
|
-
return
|
|
360
|
+
return at(e), !1;
|
|
361
361
|
} catch {
|
|
362
362
|
return !0;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function at(e) {
|
|
366
366
|
return "" + e;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
if (
|
|
370
|
-
return
|
|
368
|
+
function st(e) {
|
|
369
|
+
if (Zt(e))
|
|
370
|
+
return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bt(e)), at(e);
|
|
371
371
|
}
|
|
372
|
-
var
|
|
372
|
+
var ct = W.ReactCurrentOwner, Gt = {
|
|
373
373
|
key: !0,
|
|
374
374
|
ref: !0,
|
|
375
375
|
__self: !0,
|
|
376
376
|
__source: !0
|
|
377
|
-
},
|
|
378
|
-
function
|
|
377
|
+
}, lt, ut;
|
|
378
|
+
function Kt(e) {
|
|
379
379
|
if (Z.call(e, "ref")) {
|
|
380
|
-
var
|
|
381
|
-
if (
|
|
380
|
+
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
|
+
if (a && a.isReactWarning)
|
|
382
382
|
return !1;
|
|
383
383
|
}
|
|
384
384
|
return e.ref !== void 0;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function Xt(e) {
|
|
387
387
|
if (Z.call(e, "key")) {
|
|
388
|
-
var
|
|
389
|
-
if (
|
|
388
|
+
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
|
+
if (a && a.isReactWarning)
|
|
390
390
|
return !1;
|
|
391
391
|
}
|
|
392
392
|
return e.key !== void 0;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
typeof e.ref == "string" &&
|
|
394
|
+
function zt(e, a) {
|
|
395
|
+
typeof e.ref == "string" && ct.current;
|
|
396
396
|
}
|
|
397
|
-
function Jt(e,
|
|
397
|
+
function Jt(e, a) {
|
|
398
398
|
{
|
|
399
399
|
var d = function() {
|
|
400
|
-
|
|
400
|
+
lt || (lt = !0, A("%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)", a));
|
|
401
401
|
};
|
|
402
402
|
d.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
403
403
|
get: d,
|
|
@@ -405,10 +405,10 @@ function Cn() {
|
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
function qt(e,
|
|
408
|
+
function qt(e, a) {
|
|
409
409
|
{
|
|
410
410
|
var d = function() {
|
|
411
|
-
|
|
411
|
+
ut || (ut = !0, A("%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)", a));
|
|
412
412
|
};
|
|
413
413
|
d.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
414
414
|
get: d,
|
|
@@ -416,13 +416,13 @@ function Cn() {
|
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
var
|
|
419
|
+
var Qt = function(e, a, d, y, T, S, w) {
|
|
420
420
|
var b = {
|
|
421
421
|
// This tag allows us to uniquely identify this as a React Element
|
|
422
|
-
$$typeof:
|
|
422
|
+
$$typeof: n,
|
|
423
423
|
// Built-in properties that belong on the element
|
|
424
424
|
type: e,
|
|
425
|
-
key:
|
|
425
|
+
key: a,
|
|
426
426
|
ref: d,
|
|
427
427
|
props: w,
|
|
428
428
|
// Record the component responsible for creating this element.
|
|
@@ -445,41 +445,41 @@ function Cn() {
|
|
|
445
445
|
value: T
|
|
446
446
|
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
447
447
|
};
|
|
448
|
-
function
|
|
448
|
+
function en(e, a, d, y, T) {
|
|
449
449
|
{
|
|
450
450
|
var S, w = {}, b = null, H = null;
|
|
451
|
-
d !== void 0 && (
|
|
452
|
-
for (S in
|
|
453
|
-
Z.call(
|
|
451
|
+
d !== void 0 && (st(d), b = "" + d), Xt(a) && (st(a.key), b = "" + a.key), Kt(a) && (H = a.ref, zt(a, T));
|
|
452
|
+
for (S in a)
|
|
453
|
+
Z.call(a, S) && !Gt.hasOwnProperty(S) && (w[S] = a[S]);
|
|
454
454
|
if (e && e.defaultProps) {
|
|
455
|
-
var
|
|
456
|
-
for (S in
|
|
457
|
-
w[S] === void 0 && (w[S] =
|
|
455
|
+
var D = e.defaultProps;
|
|
456
|
+
for (S in D)
|
|
457
|
+
w[S] === void 0 && (w[S] = D[S]);
|
|
458
458
|
}
|
|
459
459
|
if (b || H) {
|
|
460
460
|
var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
461
461
|
b && Jt(w, P), H && qt(w, P);
|
|
462
462
|
}
|
|
463
|
-
return
|
|
463
|
+
return Qt(e, b, H, T, y, ct.current, w);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
var
|
|
466
|
+
var Be = W.ReactCurrentOwner, ft = W.ReactDebugCurrentFrame;
|
|
467
467
|
function ve(e) {
|
|
468
468
|
if (e) {
|
|
469
|
-
var
|
|
470
|
-
|
|
469
|
+
var a = e._owner, d = Y(e.type, e._source, a ? a.type : null);
|
|
470
|
+
ft.setExtraStackFrame(d);
|
|
471
471
|
} else
|
|
472
|
-
|
|
472
|
+
ft.setExtraStackFrame(null);
|
|
473
473
|
}
|
|
474
|
-
var
|
|
475
|
-
|
|
476
|
-
function
|
|
477
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
474
|
+
var Ze;
|
|
475
|
+
Ze = !1;
|
|
476
|
+
function Ge(e) {
|
|
477
|
+
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function dt() {
|
|
480
480
|
{
|
|
481
|
-
if (
|
|
482
|
-
var e = X(
|
|
481
|
+
if (Be.current) {
|
|
482
|
+
var e = X(Be.current.type);
|
|
483
483
|
if (e)
|
|
484
484
|
return `
|
|
485
485
|
|
|
@@ -488,188 +488,188 @@ Check the render method of \`` + e + "`.";
|
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function tn(e) {
|
|
492
492
|
return "";
|
|
493
493
|
}
|
|
494
|
-
var
|
|
495
|
-
function
|
|
494
|
+
var ht = {};
|
|
495
|
+
function nn(e) {
|
|
496
496
|
{
|
|
497
|
-
var
|
|
498
|
-
if (!
|
|
497
|
+
var a = dt();
|
|
498
|
+
if (!a) {
|
|
499
499
|
var d = typeof e == "string" ? e : e.displayName || e.name;
|
|
500
|
-
d && (
|
|
500
|
+
d && (a = `
|
|
501
501
|
|
|
502
502
|
Check the top-level render call using <` + d + ">.");
|
|
503
503
|
}
|
|
504
|
-
return
|
|
504
|
+
return a;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function pt(e, a) {
|
|
508
508
|
{
|
|
509
509
|
if (!e._store || e._store.validated || e.key != null)
|
|
510
510
|
return;
|
|
511
511
|
e._store.validated = !0;
|
|
512
|
-
var d =
|
|
513
|
-
if (
|
|
512
|
+
var d = nn(a);
|
|
513
|
+
if (ht[d])
|
|
514
514
|
return;
|
|
515
|
-
|
|
515
|
+
ht[d] = !0;
|
|
516
516
|
var y = "";
|
|
517
|
-
e && e._owner && e._owner !==
|
|
517
|
+
e && e._owner && e._owner !== Be.current && (y = " It was passed a child from " + X(e._owner.type) + "."), ve(e), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, y), ve(null);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function vt(e, a) {
|
|
521
521
|
{
|
|
522
522
|
if (typeof e != "object")
|
|
523
523
|
return;
|
|
524
524
|
if (we(e))
|
|
525
525
|
for (var d = 0; d < e.length; d++) {
|
|
526
526
|
var y = e[d];
|
|
527
|
-
|
|
527
|
+
Ge(y) && pt(y, a);
|
|
528
528
|
}
|
|
529
|
-
else if (
|
|
529
|
+
else if (Ge(e))
|
|
530
530
|
e._store && (e._store.validated = !0);
|
|
531
531
|
else if (e) {
|
|
532
532
|
var T = B(e);
|
|
533
533
|
if (typeof T == "function" && T !== e.entries)
|
|
534
534
|
for (var S = T.call(e), w; !(w = S.next()).done; )
|
|
535
|
-
|
|
535
|
+
Ge(w.value) && pt(w.value, a);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function rn(e) {
|
|
540
540
|
{
|
|
541
|
-
var
|
|
542
|
-
if (
|
|
541
|
+
var a = e.type;
|
|
542
|
+
if (a == null || typeof a == "string")
|
|
543
543
|
return;
|
|
544
544
|
var d;
|
|
545
|
-
if (typeof
|
|
546
|
-
d =
|
|
547
|
-
else if (typeof
|
|
545
|
+
if (typeof a == "function")
|
|
546
|
+
d = a.propTypes;
|
|
547
|
+
else if (typeof a == "object" && (a.$$typeof === u || // Note: Memo only checks outer props here.
|
|
548
548
|
// Inner props are checked in the reconciler.
|
|
549
|
-
|
|
550
|
-
d =
|
|
549
|
+
a.$$typeof === _))
|
|
550
|
+
d = a.propTypes;
|
|
551
551
|
else
|
|
552
552
|
return;
|
|
553
553
|
if (d) {
|
|
554
|
-
var y = X(
|
|
554
|
+
var y = X(a);
|
|
555
555
|
pe(d, e.props, "prop", y, e);
|
|
556
|
-
} else if (
|
|
557
|
-
|
|
558
|
-
var T = X(
|
|
559
|
-
|
|
556
|
+
} else if (a.PropTypes !== void 0 && !Ze) {
|
|
557
|
+
Ze = !0;
|
|
558
|
+
var T = X(a);
|
|
559
|
+
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
|
|
560
560
|
}
|
|
561
|
-
typeof
|
|
561
|
+
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function on(e) {
|
|
565
565
|
{
|
|
566
|
-
for (var
|
|
567
|
-
var y =
|
|
566
|
+
for (var a = Object.keys(e.props), d = 0; d < a.length; d++) {
|
|
567
|
+
var y = a[d];
|
|
568
568
|
if (y !== "children" && y !== "key") {
|
|
569
|
-
ve(e),
|
|
569
|
+
ve(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), ve(null);
|
|
570
570
|
break;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
e.ref !== null && (ve(e),
|
|
573
|
+
e.ref !== null && (ve(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), ve(null));
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
function
|
|
576
|
+
var mt = {};
|
|
577
|
+
function gt(e, a, d, y, T, S) {
|
|
578
578
|
{
|
|
579
579
|
var w = ue(e);
|
|
580
580
|
if (!w) {
|
|
581
581
|
var b = "";
|
|
582
582
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
583
|
-
var H =
|
|
584
|
-
H ? b += H : b +=
|
|
585
|
-
var
|
|
586
|
-
e === null ?
|
|
583
|
+
var H = tn();
|
|
584
|
+
H ? b += H : b += dt();
|
|
585
|
+
var D;
|
|
586
|
+
e === null ? D = "null" : we(e) ? D = "array" : e !== void 0 && e.$$typeof === n ? (D = "<" + (X(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, b);
|
|
587
587
|
}
|
|
588
|
-
var P =
|
|
588
|
+
var P = en(e, a, d, T, S);
|
|
589
589
|
if (P == null)
|
|
590
590
|
return P;
|
|
591
591
|
if (w) {
|
|
592
|
-
var G =
|
|
592
|
+
var G = a.children;
|
|
593
593
|
if (G !== void 0)
|
|
594
594
|
if (y)
|
|
595
595
|
if (we(G)) {
|
|
596
596
|
for (var me = 0; me < G.length; me++)
|
|
597
|
-
|
|
597
|
+
vt(G[me], e);
|
|
598
598
|
Object.freeze && Object.freeze(G);
|
|
599
599
|
} else
|
|
600
|
-
|
|
600
|
+
A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
601
601
|
else
|
|
602
|
-
|
|
602
|
+
vt(G, e);
|
|
603
603
|
}
|
|
604
|
-
if (Z.call(
|
|
605
|
-
var ce = X(e), U = Object.keys(
|
|
606
|
-
return
|
|
607
|
-
}),
|
|
608
|
-
if (!
|
|
609
|
-
var
|
|
610
|
-
|
|
604
|
+
if (Z.call(a, "key")) {
|
|
605
|
+
var ce = X(e), U = Object.keys(a).filter(function(fn) {
|
|
606
|
+
return fn !== "key";
|
|
607
|
+
}), Ke = U.length > 0 ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
608
|
+
if (!mt[ce + Ke]) {
|
|
609
|
+
var un = U.length > 0 ? "{" + U.join(": ..., ") + ": ...}" : "{}";
|
|
610
|
+
A(`A props object containing a "key" prop is being spread into JSX:
|
|
611
611
|
let props = %s;
|
|
612
612
|
<%s {...props} />
|
|
613
613
|
React keys must be passed directly to JSX without using spread:
|
|
614
614
|
let props = %s;
|
|
615
|
-
<%s key={someKey} {...props} />`,
|
|
615
|
+
<%s key={someKey} {...props} />`, Ke, ce, un, ce), mt[ce + Ke] = !0;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
return e ===
|
|
618
|
+
return e === i ? on(P) : rn(P), P;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function an(e,
|
|
622
|
-
return
|
|
621
|
+
function an(e, a, d) {
|
|
622
|
+
return gt(e, a, d, !0);
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
624
|
+
function sn(e, a, d) {
|
|
625
|
+
return gt(e, a, d, !1);
|
|
626
626
|
}
|
|
627
|
-
var
|
|
628
|
-
Re.Fragment =
|
|
627
|
+
var cn = sn, ln = an;
|
|
628
|
+
Re.Fragment = i, Re.jsx = cn, Re.jsxs = ln;
|
|
629
629
|
}()), Re;
|
|
630
630
|
}
|
|
631
|
-
process.env.NODE_ENV === "production" ? qe.exports =
|
|
631
|
+
process.env.NODE_ENV === "production" ? qe.exports = Cn() : qe.exports = xn();
|
|
632
632
|
var s = qe.exports;
|
|
633
|
-
function le(...
|
|
634
|
-
return
|
|
633
|
+
function le(...t) {
|
|
634
|
+
return t.flat().filter(Boolean).map((n) => typeof n == "string" ? n : typeof n == "object" && !Array.isArray(n) && n !== null ? Object.entries(n).filter(([r, i]) => i).map(([r]) => r).join(" ") : "").join(" ").trim();
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
}, [
|
|
641
|
-
const
|
|
642
|
-
|
|
636
|
+
function bn(t) {
|
|
637
|
+
const n = t || "collapsed", [r, i] = Ne(n);
|
|
638
|
+
q(() => {
|
|
639
|
+
t !== void 0 && i(t);
|
|
640
|
+
}, [t]);
|
|
641
|
+
const o = r !== "collapsed" && r !== "compact", c = N(() => {
|
|
642
|
+
i("expanded");
|
|
643
643
|
}, []), l = N(() => {
|
|
644
|
-
|
|
645
|
-
}, [
|
|
646
|
-
|
|
644
|
+
i(n);
|
|
645
|
+
}, [n]), h = N(() => {
|
|
646
|
+
i(
|
|
647
647
|
(u) => u === "collapsed" ? "compact" : "collapsed"
|
|
648
648
|
);
|
|
649
649
|
}, []);
|
|
650
650
|
return {
|
|
651
651
|
state: r,
|
|
652
|
-
initialState:
|
|
653
|
-
setState:
|
|
654
|
-
isOpen:
|
|
652
|
+
initialState: n,
|
|
653
|
+
setState: i,
|
|
654
|
+
isOpen: o,
|
|
655
655
|
open: c,
|
|
656
656
|
close: l,
|
|
657
657
|
toggle: h
|
|
658
658
|
};
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
value:
|
|
662
|
-
setValue:
|
|
660
|
+
function wn({
|
|
661
|
+
value: t,
|
|
662
|
+
setValue: n,
|
|
663
663
|
onSubmit: r,
|
|
664
|
-
isProcessing:
|
|
664
|
+
isProcessing: i
|
|
665
665
|
}) {
|
|
666
|
-
const
|
|
667
|
-
|
|
666
|
+
const o = mn(null), c = Xe(() => {
|
|
667
|
+
n(""), o.current && (o.current.style.height = "auto", setTimeout(() => {
|
|
668
668
|
var u;
|
|
669
|
-
(u =
|
|
669
|
+
(u = o.current) == null || u.focus();
|
|
670
670
|
}, 100));
|
|
671
|
-
}, [
|
|
672
|
-
const u =
|
|
671
|
+
}, [n]), l = Xe(() => {
|
|
672
|
+
const u = o.current;
|
|
673
673
|
if (!u)
|
|
674
674
|
return;
|
|
675
675
|
u.style.height = "auto";
|
|
@@ -678,25 +678,25 @@ function bn({
|
|
|
678
678
|
Math.max(f, p),
|
|
679
679
|
_
|
|
680
680
|
)}px`;
|
|
681
|
-
}, []), h =
|
|
681
|
+
}, []), h = Xe(
|
|
682
682
|
(u) => {
|
|
683
|
-
u.key === "Enter" && !u.shiftKey && !
|
|
683
|
+
u.key === "Enter" && !u.shiftKey && !i && t.trim() && (u.preventDefault(), r(t.trim()), c());
|
|
684
684
|
},
|
|
685
|
-
[
|
|
685
|
+
[t, i, r, c]
|
|
686
686
|
);
|
|
687
|
-
return
|
|
687
|
+
return gn(() => {
|
|
688
688
|
l();
|
|
689
|
-
}, [
|
|
690
|
-
value:
|
|
691
|
-
setValue:
|
|
689
|
+
}, [t, l]), {
|
|
690
|
+
value: t,
|
|
691
|
+
setValue: n,
|
|
692
692
|
clear: c,
|
|
693
|
-
textareaRef:
|
|
693
|
+
textareaRef: o,
|
|
694
694
|
handleKeyDown: h,
|
|
695
695
|
adjustHeight: l
|
|
696
696
|
};
|
|
697
697
|
}
|
|
698
|
-
var
|
|
699
|
-
|
|
698
|
+
var Qe, Ft, Se, Mt;
|
|
699
|
+
Qe = {
|
|
700
700
|
"(": 9,
|
|
701
701
|
"!": 8,
|
|
702
702
|
"*": 7,
|
|
@@ -715,195 +715,195 @@ ze = {
|
|
|
715
715
|
"?": 1,
|
|
716
716
|
"?:": 1
|
|
717
717
|
};
|
|
718
|
-
|
|
718
|
+
Ft = ["(", "?"];
|
|
719
719
|
Se = {
|
|
720
720
|
")": ["("],
|
|
721
721
|
":": ["?", "?:"]
|
|
722
722
|
};
|
|
723
|
-
|
|
724
|
-
function
|
|
725
|
-
for (var
|
|
726
|
-
for (
|
|
727
|
-
if (Se[
|
|
728
|
-
if (Se[
|
|
729
|
-
|
|
723
|
+
Mt = /<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;
|
|
724
|
+
function En(t) {
|
|
725
|
+
for (var n = [], r = [], i, o, c, l; i = t.match(Mt); ) {
|
|
726
|
+
for (o = i[0], c = t.substr(0, i.index).trim(), c && n.push(c); l = r.pop(); ) {
|
|
727
|
+
if (Se[o]) {
|
|
728
|
+
if (Se[o][0] === l) {
|
|
729
|
+
o = Se[o][1] || o;
|
|
730
730
|
break;
|
|
731
731
|
}
|
|
732
|
-
} else if (
|
|
732
|
+
} else if (Ft.indexOf(l) >= 0 || Qe[l] < Qe[o]) {
|
|
733
733
|
r.push(l);
|
|
734
734
|
break;
|
|
735
735
|
}
|
|
736
|
-
|
|
736
|
+
n.push(l);
|
|
737
737
|
}
|
|
738
|
-
Se[
|
|
738
|
+
Se[o] || r.push(o), t = t.substr(i.index + o.length);
|
|
739
739
|
}
|
|
740
|
-
return
|
|
740
|
+
return t = t.trim(), t && n.push(t), n.concat(r.reverse());
|
|
741
741
|
}
|
|
742
|
-
var
|
|
743
|
-
"!": function(
|
|
744
|
-
return !
|
|
742
|
+
var Rn = {
|
|
743
|
+
"!": function(t) {
|
|
744
|
+
return !t;
|
|
745
745
|
},
|
|
746
|
-
"*": function(
|
|
747
|
-
return
|
|
746
|
+
"*": function(t, n) {
|
|
747
|
+
return t * n;
|
|
748
748
|
},
|
|
749
|
-
"/": function(
|
|
750
|
-
return
|
|
749
|
+
"/": function(t, n) {
|
|
750
|
+
return t / n;
|
|
751
751
|
},
|
|
752
|
-
"%": function(
|
|
753
|
-
return
|
|
752
|
+
"%": function(t, n) {
|
|
753
|
+
return t % n;
|
|
754
754
|
},
|
|
755
|
-
"+": function(
|
|
756
|
-
return
|
|
755
|
+
"+": function(t, n) {
|
|
756
|
+
return t + n;
|
|
757
757
|
},
|
|
758
|
-
"-": function(
|
|
759
|
-
return
|
|
758
|
+
"-": function(t, n) {
|
|
759
|
+
return t - n;
|
|
760
760
|
},
|
|
761
|
-
"<": function(
|
|
762
|
-
return
|
|
761
|
+
"<": function(t, n) {
|
|
762
|
+
return t < n;
|
|
763
763
|
},
|
|
764
|
-
"<=": function(
|
|
765
|
-
return
|
|
764
|
+
"<=": function(t, n) {
|
|
765
|
+
return t <= n;
|
|
766
766
|
},
|
|
767
|
-
">": function(
|
|
768
|
-
return
|
|
767
|
+
">": function(t, n) {
|
|
768
|
+
return t > n;
|
|
769
769
|
},
|
|
770
|
-
">=": function(
|
|
771
|
-
return
|
|
770
|
+
">=": function(t, n) {
|
|
771
|
+
return t >= n;
|
|
772
772
|
},
|
|
773
|
-
"==": function(
|
|
774
|
-
return
|
|
773
|
+
"==": function(t, n) {
|
|
774
|
+
return t === n;
|
|
775
775
|
},
|
|
776
|
-
"!=": function(
|
|
777
|
-
return
|
|
776
|
+
"!=": function(t, n) {
|
|
777
|
+
return t !== n;
|
|
778
778
|
},
|
|
779
|
-
"&&": function(
|
|
780
|
-
return
|
|
779
|
+
"&&": function(t, n) {
|
|
780
|
+
return t && n;
|
|
781
781
|
},
|
|
782
|
-
"||": function(
|
|
783
|
-
return
|
|
782
|
+
"||": function(t, n) {
|
|
783
|
+
return t || n;
|
|
784
784
|
},
|
|
785
|
-
"?:": function(
|
|
786
|
-
if (
|
|
787
|
-
throw
|
|
785
|
+
"?:": function(t, n, r) {
|
|
786
|
+
if (t)
|
|
787
|
+
throw n;
|
|
788
788
|
return r;
|
|
789
789
|
}
|
|
790
790
|
};
|
|
791
|
-
function
|
|
792
|
-
var r = [],
|
|
793
|
-
for (
|
|
794
|
-
if (h =
|
|
795
|
-
for (
|
|
796
|
-
c[
|
|
791
|
+
function Tn(t, n) {
|
|
792
|
+
var r = [], i, o, c, l, h, u;
|
|
793
|
+
for (i = 0; i < t.length; i++) {
|
|
794
|
+
if (h = t[i], l = Rn[h], l) {
|
|
795
|
+
for (o = l.length, c = Array(o); o--; )
|
|
796
|
+
c[o] = r.pop();
|
|
797
797
|
try {
|
|
798
798
|
u = l.apply(null, c);
|
|
799
799
|
} catch (f) {
|
|
800
800
|
return f;
|
|
801
801
|
}
|
|
802
|
-
} else
|
|
802
|
+
} else n.hasOwnProperty(h) ? u = n[h] : u = +h;
|
|
803
803
|
r.push(u);
|
|
804
804
|
}
|
|
805
805
|
return r[0];
|
|
806
806
|
}
|
|
807
|
-
function
|
|
808
|
-
var
|
|
807
|
+
function jn(t) {
|
|
808
|
+
var n = En(t);
|
|
809
809
|
return function(r) {
|
|
810
|
-
return
|
|
810
|
+
return Tn(n, r);
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
var
|
|
813
|
+
function Ln(t) {
|
|
814
|
+
var n = jn(t);
|
|
815
815
|
return function(r) {
|
|
816
|
-
return +
|
|
816
|
+
return +n({ n: r });
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
|
-
var
|
|
819
|
+
var bt = {
|
|
820
820
|
contextDelimiter: "",
|
|
821
821
|
onMissingKey: null
|
|
822
822
|
};
|
|
823
|
-
function
|
|
824
|
-
var
|
|
825
|
-
for (
|
|
826
|
-
if (
|
|
827
|
-
return
|
|
823
|
+
function Sn(t) {
|
|
824
|
+
var n, r, i;
|
|
825
|
+
for (n = t.split(";"), r = 0; r < n.length; r++)
|
|
826
|
+
if (i = n[r].trim(), i.indexOf("plural=") === 0)
|
|
827
|
+
return i.substr(7);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function nt(t, n) {
|
|
830
830
|
var r;
|
|
831
|
-
this.data =
|
|
832
|
-
for (r in
|
|
833
|
-
this.options[r] =
|
|
831
|
+
this.data = t, this.pluralForms = {}, this.options = {};
|
|
832
|
+
for (r in bt)
|
|
833
|
+
this.options[r] = n !== void 0 && r in n ? n[r] : bt[r];
|
|
834
834
|
}
|
|
835
|
-
|
|
836
|
-
var r = this.pluralForms[
|
|
837
|
-
return r || (
|
|
835
|
+
nt.prototype.getPluralForm = function(t, n) {
|
|
836
|
+
var r = this.pluralForms[t], i, o, c;
|
|
837
|
+
return r || (i = this.data[t][""], c = i["Plural-Forms"] || i["plural-forms"] || // Ignore reason: As known, there's no way to document the empty
|
|
838
838
|
// string property on a key to guarantee this as metadata.
|
|
839
839
|
// @ts-ignore
|
|
840
|
-
|
|
841
|
-
|
|
840
|
+
i.plural_forms, typeof c != "function" && (o = Sn(
|
|
841
|
+
i["Plural-Forms"] || i["plural-forms"] || // Ignore reason: As known, there's no way to document the empty
|
|
842
842
|
// string property on a key to guarantee this as metadata.
|
|
843
843
|
// @ts-ignore
|
|
844
|
-
|
|
845
|
-
), c =
|
|
844
|
+
i.plural_forms
|
|
845
|
+
), c = Ln(o)), r = this.pluralForms[t] = c), r(n);
|
|
846
846
|
};
|
|
847
|
-
|
|
847
|
+
nt.prototype.dcnpgettext = function(t, n, r, i, o) {
|
|
848
848
|
var c, l, h;
|
|
849
|
-
return
|
|
849
|
+
return o === void 0 ? c = 0 : c = this.getPluralForm(t, o), l = r, n && (l = n + this.options.contextDelimiter + r), h = this.data[t][l], h && h[c] ? h[c] : (this.options.onMissingKey && this.options.onMissingKey(r, t), c === 0 ? r : i);
|
|
850
850
|
};
|
|
851
|
-
const
|
|
851
|
+
const wt = {
|
|
852
852
|
"": {
|
|
853
|
-
plural_forms(
|
|
854
|
-
return
|
|
853
|
+
plural_forms(t) {
|
|
854
|
+
return t === 1 ? 0 : 1;
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
|
-
},
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
}, l = (v) => (
|
|
857
|
+
}, On = /^i18n\.(n?gettext|has_translation)(_|$)/, An = (t, n, r) => {
|
|
858
|
+
const i = new nt({}), o = /* @__PURE__ */ new Set(), c = () => {
|
|
859
|
+
o.forEach((v) => v());
|
|
860
|
+
}, l = (v) => (o.add(v), () => o.delete(v)), h = (v = "default") => i.data[v], u = (v, g = "default") => {
|
|
861
861
|
var C;
|
|
862
|
-
|
|
863
|
-
...
|
|
862
|
+
i.data[g] = {
|
|
863
|
+
...i.data[g],
|
|
864
864
|
...v
|
|
865
|
-
},
|
|
866
|
-
...
|
|
867
|
-
...(C =
|
|
868
|
-
}, delete
|
|
865
|
+
}, i.data[g][""] = {
|
|
866
|
+
...wt[""],
|
|
867
|
+
...(C = i.data[g]) == null ? void 0 : C[""]
|
|
868
|
+
}, delete i.pluralForms[g];
|
|
869
869
|
}, f = (v, g) => {
|
|
870
870
|
u(v, g), c();
|
|
871
871
|
}, p = (v, g = "default") => {
|
|
872
872
|
var C;
|
|
873
|
-
|
|
874
|
-
...
|
|
873
|
+
i.data[g] = {
|
|
874
|
+
...i.data[g],
|
|
875
875
|
...v,
|
|
876
876
|
// Populate default domain configuration (supported locale date which omits
|
|
877
877
|
// a plural forms expression).
|
|
878
878
|
"": {
|
|
879
|
-
...
|
|
880
|
-
...(C =
|
|
879
|
+
...wt[""],
|
|
880
|
+
...(C = i.data[g]) == null ? void 0 : C[""],
|
|
881
881
|
...v == null ? void 0 : v[""]
|
|
882
882
|
}
|
|
883
|
-
}, delete
|
|
883
|
+
}, delete i.pluralForms[g], c();
|
|
884
884
|
}, _ = (v, g) => {
|
|
885
|
-
|
|
886
|
-
}, x = (v = "default", g, C, L,
|
|
885
|
+
i.data = {}, i.pluralForms = {}, f(v, g);
|
|
886
|
+
}, x = (v = "default", g, C, L, O) => (i.data[v] || u(void 0, v), i.dcnpgettext(v, g, C, L, O)), j = (v) => v || "default", I = (v, g) => {
|
|
887
887
|
let C = x(g, void 0, v);
|
|
888
888
|
return r ? (C = r.applyFilters("i18n.gettext", C, v, g), r.applyFilters("i18n.gettext_" + j(g), C, v, g)) : C;
|
|
889
889
|
}, M = (v, g, C) => {
|
|
890
890
|
let L = x(C, g, v);
|
|
891
891
|
return r ? (L = r.applyFilters("i18n.gettext_with_context", L, v, g, C), r.applyFilters("i18n.gettext_with_context_" + j(C), L, v, g, C)) : L;
|
|
892
892
|
}, B = (v, g, C, L) => {
|
|
893
|
-
let
|
|
894
|
-
return r ? (
|
|
895
|
-
}, W = (v, g, C, L,
|
|
896
|
-
let R = x(
|
|
897
|
-
return r ? (R = r.applyFilters("i18n.ngettext_with_context", R, v, g, C, L,
|
|
898
|
-
},
|
|
893
|
+
let O = x(L, void 0, v, g, C);
|
|
894
|
+
return r ? (O = r.applyFilters("i18n.ngettext", O, v, g, C, L), r.applyFilters("i18n.ngettext_" + j(L), O, v, g, C, L)) : O;
|
|
895
|
+
}, W = (v, g, C, L, O) => {
|
|
896
|
+
let R = x(O, L, v, g, C);
|
|
897
|
+
return r ? (R = r.applyFilters("i18n.ngettext_with_context", R, v, g, C, L, O), r.applyFilters("i18n.ngettext_with_context_" + j(O), R, v, g, C, L, O)) : R;
|
|
898
|
+
}, A = () => M("ltr", "text direction") === "rtl", m = (v, g, C) => {
|
|
899
899
|
var R, ue;
|
|
900
900
|
const L = g ? g + "" + v : v;
|
|
901
|
-
let
|
|
902
|
-
return r && (
|
|
901
|
+
let O = !!((ue = (R = i.data) == null ? void 0 : R[C ?? "default"]) != null && ue[L]);
|
|
902
|
+
return r && (O = r.applyFilters("i18n.has_translation", O, v, g, C), O = r.applyFilters("i18n.has_translation_" + j(C), O, v, g, C)), O;
|
|
903
903
|
};
|
|
904
904
|
if (r) {
|
|
905
905
|
const v = (g) => {
|
|
906
|
-
|
|
906
|
+
On.test(g) && c();
|
|
907
907
|
};
|
|
908
908
|
r.addAction("hookAdded", "core/i18n", v), r.addAction("hookRemoved", "core/i18n", v);
|
|
909
909
|
}
|
|
@@ -913,24 +913,24 @@ const Ct = {
|
|
|
913
913
|
addLocaleData: p,
|
|
914
914
|
resetLocaleData: _,
|
|
915
915
|
subscribe: l,
|
|
916
|
-
__:
|
|
916
|
+
__: I,
|
|
917
917
|
_x: M,
|
|
918
918
|
_n: B,
|
|
919
919
|
_nx: W,
|
|
920
|
-
isRTL:
|
|
920
|
+
isRTL: A,
|
|
921
921
|
hasTranslation: m
|
|
922
922
|
};
|
|
923
923
|
};
|
|
924
|
-
function
|
|
925
|
-
return typeof
|
|
924
|
+
function kt(t) {
|
|
925
|
+
return typeof t != "string" || t === "" ? (console.error("The namespace must be a non-empty string."), !1) : /^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t) ? !0 : (console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."), !1);
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
return typeof
|
|
927
|
+
function rt(t) {
|
|
928
|
+
return typeof t != "string" || t === "" ? (console.error("The hook name must be a non-empty string."), !1) : /^__/.test(t) ? (console.error("The hook name cannot begin with `__`."), !1) : /^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t) ? !0 : (console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."), !1);
|
|
929
929
|
}
|
|
930
|
-
function
|
|
931
|
-
return function(
|
|
932
|
-
const h = n
|
|
933
|
-
if (!
|
|
930
|
+
function Et(t, n) {
|
|
931
|
+
return function(i, o, c, l = 10) {
|
|
932
|
+
const h = t[n];
|
|
933
|
+
if (!rt(i) || !kt(o))
|
|
934
934
|
return;
|
|
935
935
|
if (typeof c != "function") {
|
|
936
936
|
console.error("The hook callback must be a function.");
|
|
@@ -943,56 +943,56 @@ function xt(n, t) {
|
|
|
943
943
|
const u = {
|
|
944
944
|
callback: c,
|
|
945
945
|
priority: l,
|
|
946
|
-
namespace:
|
|
946
|
+
namespace: o
|
|
947
947
|
};
|
|
948
|
-
if (h[
|
|
949
|
-
const f = h[
|
|
948
|
+
if (h[i]) {
|
|
949
|
+
const f = h[i].handlers;
|
|
950
950
|
let p;
|
|
951
951
|
for (p = f.length; p > 0 && !(l >= f[p - 1].priority); p--)
|
|
952
952
|
;
|
|
953
953
|
p === f.length ? f[p] = u : f.splice(p, 0, u), h.__current.forEach((_) => {
|
|
954
|
-
_.name ===
|
|
954
|
+
_.name === i && _.currentIndex >= p && _.currentIndex++;
|
|
955
955
|
});
|
|
956
956
|
} else
|
|
957
|
-
h[
|
|
957
|
+
h[i] = {
|
|
958
958
|
handlers: [u],
|
|
959
959
|
runs: 0
|
|
960
960
|
};
|
|
961
|
-
|
|
961
|
+
i !== "hookAdded" && t.doAction("hookAdded", i, o, c, l);
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
function Me(
|
|
965
|
-
return function(
|
|
966
|
-
const l = n
|
|
967
|
-
if (!
|
|
964
|
+
function Me(t, n, r = !1) {
|
|
965
|
+
return function(o, c) {
|
|
966
|
+
const l = t[n];
|
|
967
|
+
if (!rt(o) || !r && !kt(c))
|
|
968
968
|
return;
|
|
969
|
-
if (!l[
|
|
969
|
+
if (!l[o])
|
|
970
970
|
return 0;
|
|
971
971
|
let h = 0;
|
|
972
972
|
if (r)
|
|
973
|
-
h = l[
|
|
974
|
-
runs: l[
|
|
973
|
+
h = l[o].handlers.length, l[o] = {
|
|
974
|
+
runs: l[o].runs,
|
|
975
975
|
handlers: []
|
|
976
976
|
};
|
|
977
977
|
else {
|
|
978
|
-
const u = l[
|
|
978
|
+
const u = l[o].handlers;
|
|
979
979
|
for (let f = u.length - 1; f >= 0; f--)
|
|
980
980
|
u[f].namespace === c && (u.splice(f, 1), h++, l.__current.forEach((p) => {
|
|
981
|
-
p.name ===
|
|
981
|
+
p.name === o && p.currentIndex >= f && p.currentIndex--;
|
|
982
982
|
}));
|
|
983
983
|
}
|
|
984
|
-
return
|
|
984
|
+
return o !== "hookRemoved" && t.doAction("hookRemoved", o, c), h;
|
|
985
985
|
};
|
|
986
986
|
}
|
|
987
|
-
function
|
|
988
|
-
return function(
|
|
989
|
-
const c = n
|
|
990
|
-
return typeof
|
|
987
|
+
function Rt(t, n) {
|
|
988
|
+
return function(i, o) {
|
|
989
|
+
const c = t[n];
|
|
990
|
+
return typeof o < "u" ? i in c && c[i].handlers.some((l) => l.namespace === o) : i in c;
|
|
991
991
|
};
|
|
992
992
|
}
|
|
993
|
-
function ke(
|
|
993
|
+
function ke(t, n, r, i) {
|
|
994
994
|
return function(c, ...l) {
|
|
995
|
-
const h = n
|
|
995
|
+
const h = t[n];
|
|
996
996
|
h[c] || (h[c] = {
|
|
997
997
|
handlers: [],
|
|
998
998
|
runs: 0
|
|
@@ -1026,60 +1026,60 @@ function ke(n, t, r, a) {
|
|
|
1026
1026
|
h.__current.delete(f);
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
return (
|
|
1029
|
+
return (i ? p : _)();
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function Tt(t, n) {
|
|
1033
1033
|
return function() {
|
|
1034
1034
|
var l;
|
|
1035
|
-
var
|
|
1036
|
-
const
|
|
1037
|
-
return (
|
|
1035
|
+
var i;
|
|
1036
|
+
const o = t[n];
|
|
1037
|
+
return (i = (l = Array.from(o.__current).at(-1)) == null ? void 0 : l.name) !== null && i !== void 0 ? i : null;
|
|
1038
1038
|
};
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1041
|
-
return function(
|
|
1042
|
-
const
|
|
1043
|
-
return typeof
|
|
1040
|
+
function jt(t, n) {
|
|
1041
|
+
return function(i) {
|
|
1042
|
+
const o = t[n];
|
|
1043
|
+
return typeof i > "u" ? o.__current.size > 0 : Array.from(o.__current).some((c) => c.name === i);
|
|
1044
1044
|
};
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return function(
|
|
1048
|
-
const
|
|
1049
|
-
if (
|
|
1050
|
-
return i
|
|
1046
|
+
function Lt(t, n) {
|
|
1047
|
+
return function(i) {
|
|
1048
|
+
const o = t[n];
|
|
1049
|
+
if (rt(i))
|
|
1050
|
+
return o[i] && o[i].runs ? o[i].runs : 0;
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
|
-
class
|
|
1053
|
+
class Dn {
|
|
1054
1054
|
constructor() {
|
|
1055
|
-
this.actions = /* @__PURE__ */ Object.create(null), this.actions.__current = /* @__PURE__ */ new Set(), this.filters = /* @__PURE__ */ Object.create(null), this.filters.__current = /* @__PURE__ */ new Set(), this.addAction =
|
|
1055
|
+
this.actions = /* @__PURE__ */ Object.create(null), this.actions.__current = /* @__PURE__ */ new Set(), this.filters = /* @__PURE__ */ Object.create(null), this.filters.__current = /* @__PURE__ */ new Set(), this.addAction = Et(this, "actions"), this.addFilter = Et(this, "filters"), this.removeAction = Me(this, "actions"), this.removeFilter = Me(this, "filters"), this.hasAction = Rt(this, "actions"), this.hasFilter = Rt(this, "filters"), this.removeAllActions = Me(this, "actions", !0), this.removeAllFilters = Me(this, "filters", !0), this.doAction = ke(this, "actions", !1, !1), this.doActionAsync = ke(this, "actions", !1, !0), this.applyFilters = ke(this, "filters", !0, !1), this.applyFiltersAsync = ke(this, "filters", !0, !0), this.currentAction = Tt(this, "actions"), this.currentFilter = Tt(this, "filters"), this.doingAction = jt(this, "actions"), this.doingFilter = jt(this, "filters"), this.didAction = Lt(this, "actions"), this.didFilter = Lt(this, "filters");
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
function In() {
|
|
1059
|
-
return new
|
|
1059
|
+
return new Dn();
|
|
1060
1060
|
}
|
|
1061
|
-
const
|
|
1062
|
-
addAction:
|
|
1063
|
-
addFilter:
|
|
1064
|
-
removeAction:
|
|
1065
|
-
removeFilter:
|
|
1066
|
-
hasAction:
|
|
1067
|
-
hasFilter:
|
|
1068
|
-
removeAllActions:
|
|
1069
|
-
removeAllFilters:
|
|
1070
|
-
doAction:
|
|
1071
|
-
doActionAsync:
|
|
1072
|
-
applyFilters:
|
|
1073
|
-
applyFiltersAsync:
|
|
1074
|
-
currentAction:
|
|
1075
|
-
currentFilter:
|
|
1076
|
-
doingAction:
|
|
1077
|
-
doingFilter:
|
|
1078
|
-
didAction:
|
|
1079
|
-
didFilter:
|
|
1080
|
-
actions:
|
|
1081
|
-
filters:
|
|
1082
|
-
} =
|
|
1061
|
+
const $t = In(), {
|
|
1062
|
+
addAction: Br,
|
|
1063
|
+
addFilter: Zr,
|
|
1064
|
+
removeAction: Gr,
|
|
1065
|
+
removeFilter: Kr,
|
|
1066
|
+
hasAction: Xr,
|
|
1067
|
+
hasFilter: zr,
|
|
1068
|
+
removeAllActions: Jr,
|
|
1069
|
+
removeAllFilters: qr,
|
|
1070
|
+
doAction: Qr,
|
|
1071
|
+
doActionAsync: ei,
|
|
1072
|
+
applyFilters: ti,
|
|
1073
|
+
applyFiltersAsync: ni,
|
|
1074
|
+
currentAction: ri,
|
|
1075
|
+
currentFilter: ii,
|
|
1076
|
+
doingAction: oi,
|
|
1077
|
+
doingFilter: ai,
|
|
1078
|
+
didAction: si,
|
|
1079
|
+
didFilter: ci,
|
|
1080
|
+
actions: li,
|
|
1081
|
+
filters: ui
|
|
1082
|
+
} = $t, F = An(void 0, void 0, $t);
|
|
1083
1083
|
F.getLocaleData.bind(F);
|
|
1084
1084
|
F.setLocaleData.bind(F);
|
|
1085
1085
|
F.resetLocaleData.bind(F);
|
|
@@ -1090,56 +1090,85 @@ F._n.bind(F);
|
|
|
1090
1090
|
F._nx.bind(F);
|
|
1091
1091
|
F.isRTL.bind(F);
|
|
1092
1092
|
F.hasTranslation.bind(F);
|
|
1093
|
-
const
|
|
1093
|
+
const Ht = ye("Ask anything", "a8c-agenttic"), et = {
|
|
1094
1094
|
type: "spring",
|
|
1095
1095
|
stiffness: 300,
|
|
1096
1096
|
damping: 30
|
|
1097
|
-
},
|
|
1097
|
+
}, Pn = {
|
|
1098
|
+
type: "spring",
|
|
1099
|
+
stiffness: 400,
|
|
1100
|
+
damping: 35
|
|
1101
|
+
}, it = {
|
|
1098
1102
|
type: "spring",
|
|
1099
1103
|
damping: 40,
|
|
1100
1104
|
stiffness: 500,
|
|
1101
1105
|
mass: 0.8
|
|
1102
|
-
},
|
|
1103
|
-
|
|
1106
|
+
}, Ve = {
|
|
1107
|
+
...it,
|
|
1104
1108
|
stiffness: 1e3,
|
|
1105
1109
|
damping: 90
|
|
1106
|
-
},
|
|
1110
|
+
}, ot = {
|
|
1107
1111
|
type: "spring",
|
|
1108
1112
|
damping: 40,
|
|
1109
1113
|
stiffness: 400,
|
|
1110
1114
|
mass: 0.8
|
|
1111
|
-
},
|
|
1115
|
+
}, Nt = {
|
|
1112
1116
|
hidden: {
|
|
1113
1117
|
opacity: 0
|
|
1114
1118
|
},
|
|
1115
1119
|
visible: {
|
|
1116
1120
|
opacity: 1,
|
|
1117
|
-
transition:
|
|
1121
|
+
transition: et
|
|
1118
1122
|
},
|
|
1119
1123
|
exit: {
|
|
1120
1124
|
opacity: 0,
|
|
1121
|
-
transition: { ...
|
|
1125
|
+
transition: { ...et, duration: 0.1 }
|
|
1122
1126
|
}
|
|
1123
|
-
},
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1127
|
+
}, Fn = () => {
|
|
1128
|
+
if (typeof window > "u")
|
|
1129
|
+
return { left: 0, right: 0, top: 0, bottom: 0 };
|
|
1130
|
+
const t = 20;
|
|
1131
|
+
return {
|
|
1132
|
+
left: t,
|
|
1133
|
+
right: window.innerWidth - 400 - t,
|
|
1134
|
+
// Assuming max width of 400px
|
|
1135
|
+
top: t,
|
|
1136
|
+
bottom: window.innerHeight - 60 - t
|
|
1137
|
+
// Assuming collapsed height of 60px
|
|
1138
|
+
};
|
|
1139
|
+
}, Mn = {
|
|
1140
|
+
"0%": { backgroundPosition: "-200% 0" },
|
|
1141
|
+
"100%": { backgroundPosition: "200% 0" }
|
|
1142
|
+
}, fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1143
|
+
__proto__: null,
|
|
1144
|
+
fadeVariants: Nt,
|
|
1145
|
+
fastSpring: it,
|
|
1146
|
+
fastSpringWithDelay: Ve,
|
|
1147
|
+
getDragConstraints: Fn,
|
|
1148
|
+
layoutTransition: Pn,
|
|
1149
|
+
morphSpring: ot,
|
|
1150
|
+
springConfig: et,
|
|
1151
|
+
thinkingGradientKeyframes: Mn
|
|
1152
|
+
}, Symbol.toStringTag, { value: "Module" })), kn = "button-module_button", $n = "button-module_primary", Hn = "button-module_ghost", Nn = "button-module_outline", Vn = "button-module_link", Wn = "button-module_icon", Yn = "button-module_sm", Un = "button-module_withTextAndIcon", $e = {
|
|
1153
|
+
button: kn,
|
|
1154
|
+
primary: $n,
|
|
1155
|
+
ghost: Hn,
|
|
1156
|
+
outline: Nn,
|
|
1157
|
+
link: Vn,
|
|
1158
|
+
icon: Wn,
|
|
1159
|
+
sm: Yn,
|
|
1160
|
+
withTextAndIcon: Un
|
|
1161
|
+
}, te = Pt.forwardRef(
|
|
1133
1162
|
function({
|
|
1134
|
-
className:
|
|
1163
|
+
className: n,
|
|
1135
1164
|
variant: r = "primary",
|
|
1136
|
-
size:
|
|
1137
|
-
icon:
|
|
1165
|
+
size: i,
|
|
1166
|
+
icon: o,
|
|
1138
1167
|
children: c,
|
|
1139
1168
|
asChild: l = !1,
|
|
1140
1169
|
...h
|
|
1141
1170
|
}, u) {
|
|
1142
|
-
const f = l ?
|
|
1171
|
+
const f = l ? yn : "button", p = !!o, _ = i || (p && !c ? "icon" : void 0);
|
|
1143
1172
|
return /* @__PURE__ */ s.jsxs(
|
|
1144
1173
|
f,
|
|
1145
1174
|
{
|
|
@@ -1150,11 +1179,11 @@ const kt = ye("Ask anything", "a8c-agenttic"), Tt = {
|
|
|
1150
1179
|
$e[r],
|
|
1151
1180
|
_ && $e[_],
|
|
1152
1181
|
p && c ? $e.withTextAndIcon : void 0,
|
|
1153
|
-
|
|
1182
|
+
n
|
|
1154
1183
|
),
|
|
1155
1184
|
...h,
|
|
1156
1185
|
children: [
|
|
1157
|
-
|
|
1186
|
+
o,
|
|
1158
1187
|
c
|
|
1159
1188
|
]
|
|
1160
1189
|
}
|
|
@@ -1162,13 +1191,13 @@ const kt = ye("Ask anything", "a8c-agenttic"), Tt = {
|
|
|
1162
1191
|
}
|
|
1163
1192
|
);
|
|
1164
1193
|
te.displayName = "Button";
|
|
1165
|
-
function
|
|
1194
|
+
function Vt({ className: t, size: n = 24 }) {
|
|
1166
1195
|
return /* @__PURE__ */ s.jsx(
|
|
1167
1196
|
"svg",
|
|
1168
1197
|
{
|
|
1169
|
-
className:
|
|
1170
|
-
width:
|
|
1171
|
-
height:
|
|
1198
|
+
className: t,
|
|
1199
|
+
width: n,
|
|
1200
|
+
height: n,
|
|
1172
1201
|
viewBox: "0 0 24 24",
|
|
1173
1202
|
fill: "none",
|
|
1174
1203
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1182,20 +1211,20 @@ function Nt({ className: n, size: t = 24 }) {
|
|
|
1182
1211
|
}
|
|
1183
1212
|
);
|
|
1184
1213
|
}
|
|
1185
|
-
const
|
|
1186
|
-
button:
|
|
1214
|
+
const Bn = "CollapsedView-module_button", Zn = {
|
|
1215
|
+
button: Bn
|
|
1187
1216
|
};
|
|
1188
|
-
function
|
|
1189
|
-
icon:
|
|
1190
|
-
onClick:
|
|
1217
|
+
function Gn({
|
|
1218
|
+
icon: t = /* @__PURE__ */ s.jsx(Vt, { size: 36 }),
|
|
1219
|
+
onClick: n,
|
|
1191
1220
|
onHover: r,
|
|
1192
|
-
focusOnMount:
|
|
1221
|
+
focusOnMount: i = !1
|
|
1193
1222
|
}) {
|
|
1194
|
-
const
|
|
1195
|
-
return
|
|
1196
|
-
c.current &&
|
|
1197
|
-
}, [c,
|
|
1198
|
-
|
|
1223
|
+
const o = V(null), c = V(i);
|
|
1224
|
+
return q(() => {
|
|
1225
|
+
c.current && o.current && o.current.focus(), c.current = !1;
|
|
1226
|
+
}, [c, o]), /* @__PURE__ */ s.jsx(
|
|
1227
|
+
oe.div,
|
|
1199
1228
|
{
|
|
1200
1229
|
"data-slot": "collapsed-view",
|
|
1201
1230
|
layout: "preserve-aspect",
|
|
@@ -1208,7 +1237,7 @@ function Un({
|
|
|
1208
1237
|
opacity: 1,
|
|
1209
1238
|
scale: 1,
|
|
1210
1239
|
transition: {
|
|
1211
|
-
...
|
|
1240
|
+
...ot,
|
|
1212
1241
|
delay: 0.2
|
|
1213
1242
|
}
|
|
1214
1243
|
},
|
|
@@ -1222,42 +1251,42 @@ function Un({
|
|
|
1222
1251
|
children: /* @__PURE__ */ s.jsx(
|
|
1223
1252
|
te,
|
|
1224
1253
|
{
|
|
1225
|
-
ref:
|
|
1226
|
-
onClick:
|
|
1254
|
+
ref: o,
|
|
1255
|
+
onClick: n,
|
|
1227
1256
|
onMouseEnter: r,
|
|
1228
1257
|
variant: "link",
|
|
1229
|
-
className:
|
|
1230
|
-
icon:
|
|
1258
|
+
className: Zn.button,
|
|
1259
|
+
icon: t,
|
|
1231
1260
|
"aria-label": ye("Open chat", "a8c-agenttic")
|
|
1232
1261
|
}
|
|
1233
1262
|
)
|
|
1234
1263
|
}
|
|
1235
1264
|
);
|
|
1236
1265
|
}
|
|
1237
|
-
const
|
|
1238
|
-
textarea:
|
|
1239
|
-
},
|
|
1240
|
-
({ className:
|
|
1266
|
+
const Kn = "Textarea-module_textarea", Xn = {
|
|
1267
|
+
textarea: Kn
|
|
1268
|
+
}, Wt = Pt.forwardRef(
|
|
1269
|
+
({ className: t, ...n }, r) => /* @__PURE__ */ s.jsx(
|
|
1241
1270
|
"textarea",
|
|
1242
1271
|
{
|
|
1243
1272
|
"data-slot": "textarea",
|
|
1244
|
-
className:
|
|
1273
|
+
className: Xn.textarea,
|
|
1245
1274
|
ref: r,
|
|
1246
|
-
...
|
|
1275
|
+
...n
|
|
1247
1276
|
}
|
|
1248
1277
|
)
|
|
1249
1278
|
);
|
|
1250
|
-
|
|
1251
|
-
function
|
|
1279
|
+
Wt.displayName = "Textarea";
|
|
1280
|
+
function zn({ className: t, size: n = 24 }) {
|
|
1252
1281
|
return /* @__PURE__ */ s.jsx(
|
|
1253
1282
|
"svg",
|
|
1254
1283
|
{
|
|
1255
|
-
width:
|
|
1256
|
-
height:
|
|
1284
|
+
width: n,
|
|
1285
|
+
height: n,
|
|
1257
1286
|
viewBox: "0 0 24 24",
|
|
1258
1287
|
fill: "none",
|
|
1259
1288
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1260
|
-
className:
|
|
1289
|
+
className: t,
|
|
1261
1290
|
children: /* @__PURE__ */ s.jsx(
|
|
1262
1291
|
"path",
|
|
1263
1292
|
{
|
|
@@ -1268,16 +1297,16 @@ function Gn({ className: n, size: t = 24 }) {
|
|
|
1268
1297
|
}
|
|
1269
1298
|
);
|
|
1270
1299
|
}
|
|
1271
|
-
function
|
|
1300
|
+
function Jn({ className: t, size: n = 24 }) {
|
|
1272
1301
|
return /* @__PURE__ */ s.jsx(
|
|
1273
1302
|
"svg",
|
|
1274
1303
|
{
|
|
1275
|
-
width:
|
|
1276
|
-
height:
|
|
1304
|
+
width: n,
|
|
1305
|
+
height: n,
|
|
1277
1306
|
viewBox: "0 0 24 24",
|
|
1278
1307
|
fill: "none",
|
|
1279
1308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1280
|
-
className:
|
|
1309
|
+
className: t,
|
|
1281
1310
|
children: /* @__PURE__ */ s.jsx(
|
|
1282
1311
|
"rect",
|
|
1283
1312
|
{
|
|
@@ -1292,19 +1321,19 @@ function Kn({ className: n, size: t = 24 }) {
|
|
|
1292
1321
|
}
|
|
1293
1322
|
);
|
|
1294
1323
|
}
|
|
1295
|
-
const
|
|
1296
|
-
container:
|
|
1297
|
-
textareaContainer:
|
|
1298
|
-
actions:
|
|
1299
|
-
button:
|
|
1324
|
+
const qn = "ChatInput-module_container", Qn = "ChatInput-module_textareaContainer", er = "ChatInput-module_actions", tr = "ChatInput-module_button", Te = {
|
|
1325
|
+
container: qn,
|
|
1326
|
+
textareaContainer: Qn,
|
|
1327
|
+
actions: er,
|
|
1328
|
+
button: tr
|
|
1300
1329
|
};
|
|
1301
|
-
function
|
|
1330
|
+
function nr({ className: t, size: n = 24 }) {
|
|
1302
1331
|
return /* @__PURE__ */ s.jsx(
|
|
1303
1332
|
"svg",
|
|
1304
1333
|
{
|
|
1305
|
-
className:
|
|
1306
|
-
width:
|
|
1307
|
-
height:
|
|
1334
|
+
className: t,
|
|
1335
|
+
width: n,
|
|
1336
|
+
height: n,
|
|
1308
1337
|
viewBox: "0 0 24 24",
|
|
1309
1338
|
fill: "none",
|
|
1310
1339
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1320,13 +1349,13 @@ function Qn({ className: n, size: t = 24 }) {
|
|
|
1320
1349
|
}
|
|
1321
1350
|
);
|
|
1322
1351
|
}
|
|
1323
|
-
function
|
|
1324
|
-
value:
|
|
1325
|
-
onChange:
|
|
1352
|
+
function Yt({
|
|
1353
|
+
value: t,
|
|
1354
|
+
onChange: n,
|
|
1326
1355
|
onSubmit: r,
|
|
1327
|
-
onKeyDown:
|
|
1328
|
-
textareaRef:
|
|
1329
|
-
placeholder: c =
|
|
1356
|
+
onKeyDown: i,
|
|
1357
|
+
textareaRef: o,
|
|
1358
|
+
placeholder: c = Ht,
|
|
1330
1359
|
isProcessing: l,
|
|
1331
1360
|
onBlur: h,
|
|
1332
1361
|
fromCompact: u = !1,
|
|
@@ -1334,12 +1363,12 @@ function Wt({
|
|
|
1334
1363
|
showExpandButton: p = !0,
|
|
1335
1364
|
focusOnMount: _ = !1
|
|
1336
1365
|
}) {
|
|
1337
|
-
const x =
|
|
1338
|
-
return
|
|
1339
|
-
M.current &&
|
|
1340
|
-
}, [M,
|
|
1366
|
+
const x = dn(), j = t.trim() || l, I = c.endsWith("…") ? c : `${c}…`, M = V(_);
|
|
1367
|
+
return q(() => {
|
|
1368
|
+
M.current && o.current && o.current.focus(), M.current = !1;
|
|
1369
|
+
}, [M, o]), /* @__PURE__ */ s.jsxs("div", { "data-slot": "chat-input", className: Te.container, children: [
|
|
1341
1370
|
/* @__PURE__ */ s.jsx(
|
|
1342
|
-
|
|
1371
|
+
oe.div,
|
|
1343
1372
|
{
|
|
1344
1373
|
className: Te.textareaContainer,
|
|
1345
1374
|
initial: {
|
|
@@ -1348,25 +1377,25 @@ function Wt({
|
|
|
1348
1377
|
animate: {
|
|
1349
1378
|
opacity: 1,
|
|
1350
1379
|
scale: 1,
|
|
1351
|
-
transition:
|
|
1380
|
+
transition: t.trim() ? { duration: 0 } : Ve
|
|
1352
1381
|
},
|
|
1353
1382
|
children: /* @__PURE__ */ s.jsx(
|
|
1354
|
-
|
|
1383
|
+
Wt,
|
|
1355
1384
|
{
|
|
1356
1385
|
id: x,
|
|
1357
|
-
ref:
|
|
1358
|
-
value:
|
|
1359
|
-
onChange: (B) =>
|
|
1360
|
-
onKeyDown:
|
|
1386
|
+
ref: o,
|
|
1387
|
+
value: t,
|
|
1388
|
+
onChange: (B) => n(B.target.value),
|
|
1389
|
+
onKeyDown: i,
|
|
1361
1390
|
onBlur: h,
|
|
1362
|
-
placeholder:
|
|
1391
|
+
placeholder: I,
|
|
1363
1392
|
rows: 1
|
|
1364
1393
|
}
|
|
1365
1394
|
)
|
|
1366
1395
|
}
|
|
1367
1396
|
),
|
|
1368
1397
|
/* @__PURE__ */ s.jsxs(
|
|
1369
|
-
|
|
1398
|
+
oe.div,
|
|
1370
1399
|
{
|
|
1371
1400
|
className: Te.actions,
|
|
1372
1401
|
initial: {
|
|
@@ -1376,7 +1405,7 @@ function Wt({
|
|
|
1376
1405
|
animate: {
|
|
1377
1406
|
opacity: 1,
|
|
1378
1407
|
scale: 1,
|
|
1379
|
-
transition:
|
|
1408
|
+
transition: t.trim() ? { duration: 0 } : it
|
|
1380
1409
|
},
|
|
1381
1410
|
children: [
|
|
1382
1411
|
p && f && /* @__PURE__ */ s.jsx(
|
|
@@ -1385,7 +1414,7 @@ function Wt({
|
|
|
1385
1414
|
className: Te.button,
|
|
1386
1415
|
onClick: f,
|
|
1387
1416
|
variant: "ghost",
|
|
1388
|
-
icon: /* @__PURE__ */ s.jsx(
|
|
1417
|
+
icon: /* @__PURE__ */ s.jsx(nr, {}),
|
|
1389
1418
|
"aria-label": ye(
|
|
1390
1419
|
"Expand conversation",
|
|
1391
1420
|
"a8c-agenttic"
|
|
@@ -1399,7 +1428,7 @@ function Wt({
|
|
|
1399
1428
|
onClick: r,
|
|
1400
1429
|
disabled: !j,
|
|
1401
1430
|
variant: "primary",
|
|
1402
|
-
icon: l ? /* @__PURE__ */ s.jsx(
|
|
1431
|
+
icon: l ? /* @__PURE__ */ s.jsx(Jn, {}) : /* @__PURE__ */ s.jsx(zn, {}),
|
|
1403
1432
|
"aria-label": ye(l ? "Stop processing" : "Send message", "a8c-agenttic")
|
|
1404
1433
|
}
|
|
1405
1434
|
)
|
|
@@ -1408,12 +1437,12 @@ function Wt({
|
|
|
1408
1437
|
)
|
|
1409
1438
|
] });
|
|
1410
1439
|
}
|
|
1411
|
-
function
|
|
1412
|
-
value:
|
|
1413
|
-
onChange:
|
|
1440
|
+
function rr({
|
|
1441
|
+
value: t,
|
|
1442
|
+
onChange: n,
|
|
1414
1443
|
onSubmit: r,
|
|
1415
|
-
onKeyDown:
|
|
1416
|
-
textareaRef:
|
|
1444
|
+
onKeyDown: i,
|
|
1445
|
+
textareaRef: o,
|
|
1417
1446
|
placeholder: c,
|
|
1418
1447
|
isProcessing: l,
|
|
1419
1448
|
onBlur: h,
|
|
@@ -1422,13 +1451,13 @@ function er({
|
|
|
1422
1451
|
focusOnMount: p = !1
|
|
1423
1452
|
}) {
|
|
1424
1453
|
return /* @__PURE__ */ s.jsx(
|
|
1425
|
-
|
|
1454
|
+
Yt,
|
|
1426
1455
|
{
|
|
1427
|
-
value:
|
|
1428
|
-
onChange:
|
|
1456
|
+
value: t,
|
|
1457
|
+
onChange: n,
|
|
1429
1458
|
onSubmit: r,
|
|
1430
|
-
onKeyDown:
|
|
1431
|
-
textareaRef:
|
|
1459
|
+
onKeyDown: i,
|
|
1460
|
+
textareaRef: o,
|
|
1432
1461
|
placeholder: c,
|
|
1433
1462
|
isProcessing: l,
|
|
1434
1463
|
onBlur: h,
|
|
@@ -1438,13 +1467,13 @@ function er({
|
|
|
1438
1467
|
}
|
|
1439
1468
|
);
|
|
1440
1469
|
}
|
|
1441
|
-
function
|
|
1470
|
+
function Ut({ className: t, size: n = 24 }) {
|
|
1442
1471
|
return /* @__PURE__ */ s.jsx(
|
|
1443
1472
|
"svg",
|
|
1444
1473
|
{
|
|
1445
|
-
className:
|
|
1446
|
-
width:
|
|
1447
|
-
height:
|
|
1474
|
+
className: t,
|
|
1475
|
+
width: n,
|
|
1476
|
+
height: n,
|
|
1448
1477
|
viewBox: "0 0 24 24",
|
|
1449
1478
|
fill: "none",
|
|
1450
1479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1458,65 +1487,65 @@ function Yt({ className: n, size: t = 24 }) {
|
|
|
1458
1487
|
}
|
|
1459
1488
|
);
|
|
1460
1489
|
}
|
|
1461
|
-
const
|
|
1462
|
-
container:
|
|
1490
|
+
const ir = "ChatHeader-module_container", or = {
|
|
1491
|
+
container: ir
|
|
1463
1492
|
};
|
|
1464
|
-
function
|
|
1493
|
+
function ar({ onClose: t }) {
|
|
1465
1494
|
return /* @__PURE__ */ s.jsx(
|
|
1466
1495
|
"div",
|
|
1467
1496
|
{
|
|
1468
1497
|
"data-slot": "chat-header",
|
|
1469
1498
|
"data-draggable": "true",
|
|
1470
|
-
className:
|
|
1471
|
-
children:
|
|
1499
|
+
className: or.container,
|
|
1500
|
+
children: t && /* @__PURE__ */ s.jsx(
|
|
1472
1501
|
te,
|
|
1473
1502
|
{
|
|
1474
1503
|
variant: "ghost",
|
|
1475
|
-
icon: /* @__PURE__ */ s.jsx(
|
|
1476
|
-
onClick:
|
|
1504
|
+
icon: /* @__PURE__ */ s.jsx(Ut, {}),
|
|
1505
|
+
onClick: t,
|
|
1477
1506
|
"aria-label": ye("Close conversation", "a8c-agenttic")
|
|
1478
1507
|
}
|
|
1479
1508
|
)
|
|
1480
1509
|
}
|
|
1481
1510
|
);
|
|
1482
1511
|
}
|
|
1483
|
-
const
|
|
1484
|
-
container:
|
|
1485
|
-
containerWithIcon:
|
|
1486
|
-
content:
|
|
1487
|
-
actions:
|
|
1488
|
-
icon:
|
|
1489
|
-
dismissible:
|
|
1512
|
+
const sr = "Notice-module_container", cr = "Notice-module_containerWithIcon", lr = "Notice-module_content", ur = "Notice-module_actions", fr = "Notice-module_icon", dr = "Notice-module_dismissible", ge = {
|
|
1513
|
+
container: sr,
|
|
1514
|
+
containerWithIcon: cr,
|
|
1515
|
+
content: lr,
|
|
1516
|
+
actions: ur,
|
|
1517
|
+
icon: fr,
|
|
1518
|
+
dismissible: dr
|
|
1490
1519
|
};
|
|
1491
|
-
function
|
|
1492
|
-
icon:
|
|
1493
|
-
message:
|
|
1520
|
+
function hr({
|
|
1521
|
+
icon: t,
|
|
1522
|
+
message: n,
|
|
1494
1523
|
action: r,
|
|
1495
|
-
dismissible:
|
|
1496
|
-
onDismiss:
|
|
1524
|
+
dismissible: i = !0,
|
|
1525
|
+
onDismiss: o
|
|
1497
1526
|
}) {
|
|
1498
1527
|
return /* @__PURE__ */ s.jsxs(
|
|
1499
1528
|
"div",
|
|
1500
1529
|
{
|
|
1501
1530
|
"data-slot": "notice",
|
|
1502
1531
|
className: le(ge.container, {
|
|
1503
|
-
[ge.containerWithIcon]: !!
|
|
1532
|
+
[ge.containerWithIcon]: !!t
|
|
1504
1533
|
}),
|
|
1505
1534
|
children: [
|
|
1506
1535
|
/* @__PURE__ */ s.jsxs("div", { className: ge.content, children: [
|
|
1507
|
-
|
|
1508
|
-
/* @__PURE__ */ s.jsx("span", { children:
|
|
1536
|
+
t && /* @__PURE__ */ s.jsx("div", { className: ge.icon, children: t }),
|
|
1537
|
+
/* @__PURE__ */ s.jsx("span", { children: n })
|
|
1509
1538
|
] }),
|
|
1510
1539
|
/* @__PURE__ */ s.jsxs("div", { className: ge.actions, children: [
|
|
1511
1540
|
r && /* @__PURE__ */ s.jsx(te, { onClick: r.onClick, variant: "link", children: r.label }),
|
|
1512
|
-
|
|
1541
|
+
i && o && /* @__PURE__ */ s.jsx(
|
|
1513
1542
|
te,
|
|
1514
1543
|
{
|
|
1515
1544
|
className: ge.dismissible,
|
|
1516
|
-
onClick:
|
|
1545
|
+
onClick: o,
|
|
1517
1546
|
variant: "ghost",
|
|
1518
1547
|
size: "sm",
|
|
1519
|
-
icon: /* @__PURE__ */ s.jsx(
|
|
1548
|
+
icon: /* @__PURE__ */ s.jsx(Ut, {})
|
|
1520
1549
|
}
|
|
1521
1550
|
)
|
|
1522
1551
|
] })
|
|
@@ -1524,58 +1553,58 @@ function ur({
|
|
|
1524
1553
|
}
|
|
1525
1554
|
);
|
|
1526
1555
|
}
|
|
1527
|
-
const
|
|
1528
|
-
container:
|
|
1529
|
-
},
|
|
1530
|
-
className:
|
|
1531
|
-
suggestions:
|
|
1556
|
+
const pr = "Suggestions-module_container", St = {
|
|
1557
|
+
container: pr
|
|
1558
|
+
}, vr = ({
|
|
1559
|
+
className: t,
|
|
1560
|
+
suggestions: n,
|
|
1532
1561
|
onSubmit: r
|
|
1533
1562
|
}) => {
|
|
1534
|
-
const
|
|
1535
|
-
r && r(
|
|
1563
|
+
const i = (o) => {
|
|
1564
|
+
r && r(o.prompt);
|
|
1536
1565
|
};
|
|
1537
|
-
return !
|
|
1538
|
-
|
|
1566
|
+
return !n || n.length === 0 ? null : /* @__PURE__ */ s.jsx(tt, { children: n && n.length > 0 && /* @__PURE__ */ s.jsx(
|
|
1567
|
+
oe.div,
|
|
1539
1568
|
{
|
|
1540
|
-
className: le(
|
|
1569
|
+
className: le(St.container, t),
|
|
1541
1570
|
initial: { opacity: 0, y: "-80%" },
|
|
1542
1571
|
animate: { opacity: 1, y: "-100%" },
|
|
1543
1572
|
exit: { opacity: 0, y: "-80%" },
|
|
1544
|
-
transition:
|
|
1545
|
-
children:
|
|
1546
|
-
(
|
|
1547
|
-
|
|
1573
|
+
transition: Ve,
|
|
1574
|
+
children: n.map(
|
|
1575
|
+
(o, c) => /* @__PURE__ */ s.jsx(
|
|
1576
|
+
oe.div,
|
|
1548
1577
|
{
|
|
1549
1578
|
initial: { opacity: 0, y: 10 },
|
|
1550
1579
|
animate: { opacity: 1, y: 0 },
|
|
1551
1580
|
transition: {
|
|
1552
|
-
...
|
|
1581
|
+
...Ve,
|
|
1553
1582
|
delay: c * 0.05
|
|
1554
1583
|
},
|
|
1555
1584
|
children: /* @__PURE__ */ s.jsx(
|
|
1556
1585
|
te,
|
|
1557
1586
|
{
|
|
1558
|
-
onClick: () =>
|
|
1587
|
+
onClick: () => i(o),
|
|
1559
1588
|
variant: "outline",
|
|
1560
|
-
className:
|
|
1561
|
-
children:
|
|
1589
|
+
className: St.button,
|
|
1590
|
+
children: o.label
|
|
1562
1591
|
}
|
|
1563
1592
|
)
|
|
1564
1593
|
},
|
|
1565
|
-
|
|
1594
|
+
o.id
|
|
1566
1595
|
)
|
|
1567
1596
|
)
|
|
1568
1597
|
}
|
|
1569
1598
|
) });
|
|
1570
|
-
},
|
|
1571
|
-
container:
|
|
1599
|
+
}, mr = "ChatFooter-module_container", gr = {
|
|
1600
|
+
container: mr
|
|
1572
1601
|
};
|
|
1573
|
-
function
|
|
1574
|
-
inputValue:
|
|
1575
|
-
onInputChange:
|
|
1602
|
+
function yr({
|
|
1603
|
+
inputValue: t,
|
|
1604
|
+
onInputChange: n,
|
|
1576
1605
|
onSubmit: r,
|
|
1577
|
-
onKeyDown:
|
|
1578
|
-
textareaRef:
|
|
1606
|
+
onKeyDown: i,
|
|
1607
|
+
textareaRef: o,
|
|
1579
1608
|
placeholder: c,
|
|
1580
1609
|
isProcessing: l,
|
|
1581
1610
|
fromCompact: h = !1,
|
|
@@ -1586,21 +1615,21 @@ function vr({
|
|
|
1586
1615
|
focusOnMount: x
|
|
1587
1616
|
}) {
|
|
1588
1617
|
const j = N(
|
|
1589
|
-
(
|
|
1590
|
-
|
|
1618
|
+
(I) => {
|
|
1619
|
+
n(I), _ == null || _();
|
|
1591
1620
|
},
|
|
1592
|
-
[
|
|
1621
|
+
[n, _]
|
|
1593
1622
|
);
|
|
1594
|
-
return /* @__PURE__ */ s.jsxs("div", { "data-slot": "chat-footer", className:
|
|
1595
|
-
!
|
|
1596
|
-
|
|
1623
|
+
return /* @__PURE__ */ s.jsxs("div", { "data-slot": "chat-footer", className: gr.container, children: [
|
|
1624
|
+
!t && /* @__PURE__ */ s.jsx(
|
|
1625
|
+
vr,
|
|
1597
1626
|
{
|
|
1598
1627
|
suggestions: p,
|
|
1599
1628
|
onSubmit: j
|
|
1600
1629
|
}
|
|
1601
1630
|
),
|
|
1602
1631
|
f && /* @__PURE__ */ s.jsx(
|
|
1603
|
-
|
|
1632
|
+
hr,
|
|
1604
1633
|
{
|
|
1605
1634
|
icon: f.icon,
|
|
1606
1635
|
message: f.message,
|
|
@@ -1610,13 +1639,13 @@ function vr({
|
|
|
1610
1639
|
}
|
|
1611
1640
|
),
|
|
1612
1641
|
/* @__PURE__ */ s.jsx(
|
|
1613
|
-
|
|
1642
|
+
Yt,
|
|
1614
1643
|
{
|
|
1615
|
-
value:
|
|
1616
|
-
onChange:
|
|
1644
|
+
value: t,
|
|
1645
|
+
onChange: n,
|
|
1617
1646
|
onSubmit: r,
|
|
1618
|
-
onKeyDown:
|
|
1619
|
-
textareaRef:
|
|
1647
|
+
onKeyDown: i,
|
|
1648
|
+
textareaRef: o,
|
|
1620
1649
|
placeholder: c,
|
|
1621
1650
|
isProcessing: l,
|
|
1622
1651
|
fromCompact: h,
|
|
@@ -1627,45 +1656,45 @@ function vr({
|
|
|
1627
1656
|
)
|
|
1628
1657
|
] });
|
|
1629
1658
|
}
|
|
1630
|
-
const
|
|
1631
|
-
container:
|
|
1659
|
+
const _r = "MessageActions-module_container", Ot = {
|
|
1660
|
+
container: _r
|
|
1632
1661
|
};
|
|
1633
|
-
function
|
|
1634
|
-
return !
|
|
1662
|
+
function At({ message: t }) {
|
|
1663
|
+
return !t.actions || t.actions.length === 0 ? null : /* @__PURE__ */ s.jsx(
|
|
1635
1664
|
"div",
|
|
1636
1665
|
{
|
|
1637
|
-
className:
|
|
1666
|
+
className: Ot.container,
|
|
1638
1667
|
"data-visible": "true",
|
|
1639
1668
|
role: "toolbar",
|
|
1640
1669
|
"aria-label": "Message actions",
|
|
1641
|
-
children:
|
|
1670
|
+
children: t.actions.map((n) => /* @__PURE__ */ s.jsx(
|
|
1642
1671
|
te,
|
|
1643
1672
|
{
|
|
1644
|
-
className:
|
|
1645
|
-
icon:
|
|
1646
|
-
onClick: () =>
|
|
1673
|
+
className: Ot.button,
|
|
1674
|
+
icon: n.icon,
|
|
1675
|
+
onClick: () => n.onClick(t),
|
|
1647
1676
|
variant: "ghost",
|
|
1648
1677
|
size: "sm",
|
|
1649
1678
|
type: "button",
|
|
1650
|
-
disabled:
|
|
1651
|
-
title:
|
|
1652
|
-
"aria-label":
|
|
1653
|
-
...
|
|
1679
|
+
disabled: n.disabled,
|
|
1680
|
+
title: n.tooltip || n.label,
|
|
1681
|
+
"aria-label": n.label,
|
|
1682
|
+
...n.tooltip && { title: n.tooltip }
|
|
1654
1683
|
},
|
|
1655
|
-
|
|
1684
|
+
n.id
|
|
1656
1685
|
))
|
|
1657
1686
|
}
|
|
1658
1687
|
);
|
|
1659
1688
|
}
|
|
1660
|
-
const
|
|
1661
|
-
message:
|
|
1662
|
-
user:
|
|
1663
|
-
bubble:
|
|
1664
|
-
error:
|
|
1665
|
-
content:
|
|
1666
|
-
},
|
|
1667
|
-
function({ message:
|
|
1668
|
-
const
|
|
1689
|
+
const Cr = "Message-module_message", xr = "Message-module_user", br = "Message-module_bubble", wr = "Message-module_error", Er = "Message-module_content", He = {
|
|
1690
|
+
message: Cr,
|
|
1691
|
+
user: xr,
|
|
1692
|
+
bubble: br,
|
|
1693
|
+
error: wr,
|
|
1694
|
+
content: Er
|
|
1695
|
+
}, Rr = We.forwardRef(
|
|
1696
|
+
function({ message: n, messageRenderer: r = _n }, i) {
|
|
1697
|
+
const o = () => /* @__PURE__ */ s.jsx(s.Fragment, { children: n.content.map((c, l) => {
|
|
1669
1698
|
if (c.type === "text" && c.text)
|
|
1670
1699
|
return /* @__PURE__ */ s.jsx(r, { children: c.text }, l);
|
|
1671
1700
|
if (c.type === "component" && c.component) {
|
|
@@ -1681,36 +1710,36 @@ const gr = "Message-module_message", yr = "Message-module_user", _r = "Message-m
|
|
|
1681
1710
|
return null;
|
|
1682
1711
|
}) });
|
|
1683
1712
|
return /* @__PURE__ */ s.jsxs(
|
|
1684
|
-
|
|
1713
|
+
oe.div,
|
|
1685
1714
|
{
|
|
1686
|
-
ref:
|
|
1687
|
-
variants:
|
|
1715
|
+
ref: i,
|
|
1716
|
+
variants: Nt,
|
|
1688
1717
|
initial: "hidden",
|
|
1689
1718
|
animate: "visible",
|
|
1690
1719
|
"data-slot": "message",
|
|
1691
|
-
"data-role":
|
|
1692
|
-
className: le(He.message, He[
|
|
1720
|
+
"data-role": n.role,
|
|
1721
|
+
className: le(He.message, He[n.role]),
|
|
1693
1722
|
children: [
|
|
1694
1723
|
/* @__PURE__ */ s.jsxs("div", { className: He.content, children: [
|
|
1695
|
-
/* @__PURE__ */ s.jsx("div", { className: He.bubble, children:
|
|
1696
|
-
|
|
1724
|
+
/* @__PURE__ */ s.jsx("div", { className: He.bubble, children: o() }),
|
|
1725
|
+
n.role !== "user" && /* @__PURE__ */ s.jsx(At, { message: n })
|
|
1697
1726
|
] }),
|
|
1698
|
-
|
|
1727
|
+
n.role === "user" && /* @__PURE__ */ s.jsx(At, { message: n })
|
|
1699
1728
|
]
|
|
1700
1729
|
}
|
|
1701
1730
|
);
|
|
1702
1731
|
}
|
|
1703
|
-
),
|
|
1704
|
-
container:
|
|
1705
|
-
emptyState:
|
|
1706
|
-
},
|
|
1707
|
-
container:
|
|
1708
|
-
icon:
|
|
1709
|
-
content:
|
|
1710
|
-
},
|
|
1711
|
-
|
|
1712
|
-
function({ content:
|
|
1713
|
-
const
|
|
1732
|
+
), Tr = "Messages-module_container", jr = "Messages-module_emptyState", ze = {
|
|
1733
|
+
container: Tr,
|
|
1734
|
+
emptyState: jr
|
|
1735
|
+
}, Lr = "Thinking-module_container", Sr = "Thinking-module_icon", Or = "Thinking-module_content", Je = {
|
|
1736
|
+
container: Lr,
|
|
1737
|
+
icon: Sr,
|
|
1738
|
+
content: Or
|
|
1739
|
+
}, Ar = hn(
|
|
1740
|
+
We.forwardRef(
|
|
1741
|
+
function({ content: n = "Thinking…" }, r) {
|
|
1742
|
+
const i = pn(() => /* @__PURE__ */ s.jsx(Vt, {}), []);
|
|
1714
1743
|
return /* @__PURE__ */ s.jsxs(
|
|
1715
1744
|
"div",
|
|
1716
1745
|
{
|
|
@@ -1718,56 +1747,56 @@ const gr = "Message-module_message", yr = "Message-module_user", _r = "Message-m
|
|
|
1718
1747
|
"data-slot": "thinking",
|
|
1719
1748
|
className: Je.container,
|
|
1720
1749
|
children: [
|
|
1721
|
-
/* @__PURE__ */ s.jsx("div", { className: Je.icon, children:
|
|
1722
|
-
/* @__PURE__ */ s.jsx("span", { className: Je.content, children:
|
|
1750
|
+
/* @__PURE__ */ s.jsx("div", { className: Je.icon, children: i }),
|
|
1751
|
+
/* @__PURE__ */ s.jsx("span", { className: Je.content, children: n })
|
|
1723
1752
|
]
|
|
1724
1753
|
}
|
|
1725
1754
|
);
|
|
1726
1755
|
}
|
|
1727
1756
|
)
|
|
1728
1757
|
);
|
|
1729
|
-
function
|
|
1730
|
-
messages:
|
|
1731
|
-
isProcessing:
|
|
1758
|
+
function Dr({
|
|
1759
|
+
messages: t,
|
|
1760
|
+
isProcessing: n,
|
|
1732
1761
|
error: r,
|
|
1733
|
-
emptyView:
|
|
1734
|
-
fromCompact:
|
|
1762
|
+
emptyView: i,
|
|
1763
|
+
fromCompact: o = !1,
|
|
1735
1764
|
messageRenderer: c
|
|
1736
1765
|
}) {
|
|
1737
1766
|
const l = V(null), h = V([]), u = V(!0), f = V(null);
|
|
1738
|
-
return
|
|
1739
|
-
const p =
|
|
1767
|
+
return q(() => {
|
|
1768
|
+
const p = t.length > h.current.length;
|
|
1740
1769
|
if (p && l.current) {
|
|
1741
1770
|
const _ = l.current.querySelectorAll(
|
|
1742
1771
|
'[data-slot="message"]'
|
|
1743
1772
|
), x = _[_.length - 1];
|
|
1744
1773
|
if (x) {
|
|
1745
|
-
const j = x.getBoundingClientRect().top - l.current.getBoundingClientRect().top + l.current.scrollTop,
|
|
1774
|
+
const j = x.getBoundingClientRect().top - l.current.getBoundingClientRect().top + l.current.scrollTop, I = o && u.current ? "auto" : "smooth";
|
|
1746
1775
|
l.current.scrollTo({
|
|
1747
1776
|
top: j,
|
|
1748
|
-
behavior:
|
|
1777
|
+
behavior: I
|
|
1749
1778
|
});
|
|
1750
1779
|
}
|
|
1751
1780
|
}
|
|
1752
1781
|
if (p && f.current) {
|
|
1753
|
-
const x =
|
|
1782
|
+
const x = t.slice(
|
|
1754
1783
|
h.current.length
|
|
1755
1784
|
).filter(
|
|
1756
1785
|
(j) => j.role === "agent"
|
|
1757
1786
|
);
|
|
1758
1787
|
if (x.length > 0) {
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1788
|
+
const I = x[x.length - 1].content.filter((M) => M.type === "text").map((M) => M.text).join(" ");
|
|
1789
|
+
I && (f.current.textContent = I);
|
|
1761
1790
|
}
|
|
1762
1791
|
}
|
|
1763
|
-
u.current && (u.current = !1), h.current =
|
|
1764
|
-
}, [
|
|
1792
|
+
u.current && (u.current = !1), h.current = t;
|
|
1793
|
+
}, [t, o]), t.length === 0 ? i ? /* @__PURE__ */ s.jsx(
|
|
1765
1794
|
"div",
|
|
1766
1795
|
{
|
|
1767
1796
|
"data-slot": "messages",
|
|
1768
|
-
className: `${
|
|
1797
|
+
className: `${ze.container} ${ze.emptyState}`,
|
|
1769
1798
|
ref: l,
|
|
1770
|
-
children:
|
|
1799
|
+
children: i
|
|
1771
1800
|
}
|
|
1772
1801
|
) : null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1773
1802
|
/* @__PURE__ */ s.jsx(
|
|
@@ -1789,18 +1818,18 @@ function Sr({
|
|
|
1789
1818
|
"div",
|
|
1790
1819
|
{
|
|
1791
1820
|
"data-slot": "messages",
|
|
1792
|
-
className:
|
|
1821
|
+
className: ze.container,
|
|
1793
1822
|
ref: l,
|
|
1794
|
-
children: /* @__PURE__ */ s.jsxs(
|
|
1795
|
-
|
|
1796
|
-
|
|
1823
|
+
children: /* @__PURE__ */ s.jsxs(tt, { mode: "popLayout", children: [
|
|
1824
|
+
t.map((p) => /* @__PURE__ */ s.jsx(
|
|
1825
|
+
Rr,
|
|
1797
1826
|
{
|
|
1798
1827
|
message: p,
|
|
1799
1828
|
messageRenderer: c
|
|
1800
1829
|
},
|
|
1801
1830
|
p.id
|
|
1802
1831
|
)),
|
|
1803
|
-
|
|
1832
|
+
n && /* @__PURE__ */ s.jsx(Ar, {}),
|
|
1804
1833
|
r && /* @__PURE__ */ s.jsx(
|
|
1805
1834
|
"div",
|
|
1806
1835
|
{
|
|
@@ -1818,16 +1847,16 @@ function Sr({
|
|
|
1818
1847
|
)
|
|
1819
1848
|
] });
|
|
1820
1849
|
}
|
|
1821
|
-
const
|
|
1822
|
-
container:
|
|
1823
|
-
withHeader:
|
|
1850
|
+
const Ir = "ConversationView-module_container", Pr = "ConversationView-module_withHeader", Dt = {
|
|
1851
|
+
container: Ir,
|
|
1852
|
+
withHeader: Pr
|
|
1824
1853
|
};
|
|
1825
|
-
function
|
|
1826
|
-
messages:
|
|
1827
|
-
error:
|
|
1854
|
+
function It({
|
|
1855
|
+
messages: t,
|
|
1856
|
+
error: n,
|
|
1828
1857
|
inputValue: r,
|
|
1829
|
-
onInputChange:
|
|
1830
|
-
onSubmit:
|
|
1858
|
+
onInputChange: i,
|
|
1859
|
+
onSubmit: o,
|
|
1831
1860
|
onKeyDown: c,
|
|
1832
1861
|
textareaRef: l,
|
|
1833
1862
|
placeholder: h,
|
|
@@ -1837,13 +1866,13 @@ function Ot({
|
|
|
1837
1866
|
onClose: _,
|
|
1838
1867
|
onExpand: x,
|
|
1839
1868
|
notice: j,
|
|
1840
|
-
emptyView:
|
|
1869
|
+
emptyView: I,
|
|
1841
1870
|
suggestions: M,
|
|
1842
1871
|
clearSuggestions: B,
|
|
1843
1872
|
messageRenderer: W,
|
|
1844
|
-
focusOnMount:
|
|
1873
|
+
focusOnMount: A = !1
|
|
1845
1874
|
}) {
|
|
1846
|
-
return
|
|
1875
|
+
return q(() => {
|
|
1847
1876
|
const m = (v) => {
|
|
1848
1877
|
v.key === "Escape" && _ && _();
|
|
1849
1878
|
};
|
|
@@ -1852,26 +1881,26 @@ function Ot({
|
|
|
1852
1881
|
"div",
|
|
1853
1882
|
{
|
|
1854
1883
|
"data-slot": "conversation-view",
|
|
1855
|
-
className: `${
|
|
1884
|
+
className: `${Dt.container}${p ? ` ${Dt.withHeader}` : ""}`,
|
|
1856
1885
|
children: [
|
|
1857
|
-
p && /* @__PURE__ */ s.jsx(
|
|
1886
|
+
p && /* @__PURE__ */ s.jsx(ar, { onClose: _ }),
|
|
1858
1887
|
/* @__PURE__ */ s.jsx(
|
|
1859
|
-
|
|
1888
|
+
Dr,
|
|
1860
1889
|
{
|
|
1861
|
-
messages:
|
|
1890
|
+
messages: t,
|
|
1862
1891
|
isProcessing: u,
|
|
1863
|
-
error:
|
|
1864
|
-
emptyView:
|
|
1892
|
+
error: n,
|
|
1893
|
+
emptyView: I,
|
|
1865
1894
|
fromCompact: f,
|
|
1866
1895
|
messageRenderer: W
|
|
1867
1896
|
}
|
|
1868
1897
|
),
|
|
1869
1898
|
/* @__PURE__ */ s.jsx(
|
|
1870
|
-
|
|
1899
|
+
yr,
|
|
1871
1900
|
{
|
|
1872
1901
|
inputValue: r,
|
|
1873
|
-
onInputChange:
|
|
1874
|
-
onSubmit:
|
|
1902
|
+
onInputChange: i,
|
|
1903
|
+
onSubmit: o,
|
|
1875
1904
|
onKeyDown: c,
|
|
1876
1905
|
textareaRef: l,
|
|
1877
1906
|
placeholder: h,
|
|
@@ -1881,18 +1910,18 @@ function Ot({
|
|
|
1881
1910
|
notice: j,
|
|
1882
1911
|
suggestions: M,
|
|
1883
1912
|
clearSuggestions: B,
|
|
1884
|
-
focusOnMount:
|
|
1913
|
+
focusOnMount: A
|
|
1885
1914
|
}
|
|
1886
1915
|
)
|
|
1887
1916
|
]
|
|
1888
1917
|
}
|
|
1889
1918
|
);
|
|
1890
1919
|
}
|
|
1891
|
-
const
|
|
1892
|
-
container:
|
|
1893
|
-
embedded:
|
|
1894
|
-
floating:
|
|
1895
|
-
content:
|
|
1920
|
+
const Fr = "Chat-module_container", Mr = "Chat-module_embedded", kr = "Chat-module_floating", $r = "Chat-module_content", je = {
|
|
1921
|
+
container: Fr,
|
|
1922
|
+
embedded: Mr,
|
|
1923
|
+
floating: kr,
|
|
1924
|
+
content: $r
|
|
1896
1925
|
}, k = {
|
|
1897
1926
|
COLLAPSED_SIZE: 56,
|
|
1898
1927
|
COMPACT_WIDTH: 372,
|
|
@@ -1914,14 +1943,14 @@ const Ir = "Chat-module_container", Dr = "Chat-module_embedded", Pr = "Chat-modu
|
|
|
1914
1943
|
'[data-slot="chat-footer"]'
|
|
1915
1944
|
].join(", ")
|
|
1916
1945
|
};
|
|
1917
|
-
function
|
|
1918
|
-
messages:
|
|
1919
|
-
isProcessing:
|
|
1946
|
+
function Hr({
|
|
1947
|
+
messages: t,
|
|
1948
|
+
isProcessing: n,
|
|
1920
1949
|
error: r,
|
|
1921
|
-
onSubmit:
|
|
1922
|
-
variant:
|
|
1950
|
+
onSubmit: i,
|
|
1951
|
+
variant: o = "floating",
|
|
1923
1952
|
triggerIcon: c,
|
|
1924
|
-
placeholder: l =
|
|
1953
|
+
placeholder: l = Ht,
|
|
1925
1954
|
notice: h,
|
|
1926
1955
|
onOpen: u,
|
|
1927
1956
|
onExpand: f,
|
|
@@ -1929,63 +1958,63 @@ function Mr({
|
|
|
1929
1958
|
emptyView: _,
|
|
1930
1959
|
floatingChatState: x,
|
|
1931
1960
|
suggestions: j,
|
|
1932
|
-
clearSuggestions:
|
|
1961
|
+
clearSuggestions: I,
|
|
1933
1962
|
messageRenderer: M,
|
|
1934
1963
|
className: B
|
|
1935
1964
|
}) {
|
|
1936
|
-
const [W,
|
|
1937
|
-
|
|
1965
|
+
const [W, A] = Ne(""), m = bn(x), v = V(!1), g = V(!1), C = V(!1);
|
|
1966
|
+
q(() => {
|
|
1938
1967
|
v.current = !1, g.current = !1, C.current = !1;
|
|
1939
1968
|
}, [m.state]);
|
|
1940
|
-
const L = V(/* @__PURE__ */ new Set()),
|
|
1969
|
+
const L = V(/* @__PURE__ */ new Set()), O = N(() => {
|
|
1941
1970
|
L.current.forEach((E) => {
|
|
1942
1971
|
clearTimeout(E);
|
|
1943
1972
|
}), L.current.clear();
|
|
1944
|
-
}, []), R =
|
|
1973
|
+
}, []), R = wn({
|
|
1945
1974
|
value: W,
|
|
1946
|
-
setValue:
|
|
1975
|
+
setValue: A,
|
|
1947
1976
|
onSubmit: async (E) => {
|
|
1948
|
-
m.state !== "expanded" && (f == null || f()), m.setState("expanded"), await
|
|
1977
|
+
m.state !== "expanded" && (f == null || f()), m.setState("expanded"), await i(E);
|
|
1949
1978
|
},
|
|
1950
|
-
isProcessing:
|
|
1951
|
-
}), [ue,
|
|
1979
|
+
isProcessing: n
|
|
1980
|
+
}), [ue, Ye] = Ne(56), [fe, X] = Ne(
|
|
1952
1981
|
"left"
|
|
1953
|
-
), K = V(null),
|
|
1982
|
+
), K = V(null), z = V(null), J = V(null), ne = yt(0), re = yt(0), de = vn(), Oe = N(() => {
|
|
1954
1983
|
v.current = !0, m.open(), u == null || u();
|
|
1955
|
-
}, [m, u]),
|
|
1984
|
+
}, [m, u]), ie = N(() => {
|
|
1956
1985
|
var $, Y, Z;
|
|
1957
|
-
const E = (Y = ($ =
|
|
1958
|
-
return !(E && ((Z =
|
|
1959
|
-
}, [W,
|
|
1986
|
+
const E = (Y = ($ = J.current) == null ? void 0 : $.ownerDocument) == null ? void 0 : Y.activeElement;
|
|
1987
|
+
return !(E && ((Z = J.current) != null && Z.contains(E)) || W.trim());
|
|
1988
|
+
}, [W, J]), Ae = (E) => E === "collapsed" ? k.COLLAPSED_SIZE : E === "compact" ? ue : k.EXPANDED_HEIGHT, De = N(() => {
|
|
1960
1989
|
if (m.state === "collapsed" && (m.setState("compact"), m.initialState === "collapsed")) {
|
|
1961
1990
|
const E = setTimeout(() => {
|
|
1962
|
-
m.state === "compact" &&
|
|
1991
|
+
m.state === "compact" && ie() && m.setState("collapsed"), L.current.delete(E);
|
|
1963
1992
|
}, k.AUTO_COLLAPSE_DELAY);
|
|
1964
1993
|
L.current.add(E);
|
|
1965
1994
|
}
|
|
1966
|
-
}, [m,
|
|
1967
|
-
if (m.initialState === "collapsed" && m.state === "compact" &&
|
|
1995
|
+
}, [m, ie]), Ie = N(() => {
|
|
1996
|
+
if (m.initialState === "collapsed" && m.state === "compact" && ie()) {
|
|
1968
1997
|
const E = setTimeout(() => {
|
|
1969
|
-
m.state === "compact" &&
|
|
1998
|
+
m.state === "compact" && ie() && m.setState("collapsed"), L.current.delete(E);
|
|
1970
1999
|
}, k.AUTO_COLLAPSE_DELAY);
|
|
1971
2000
|
L.current.add(E);
|
|
1972
2001
|
}
|
|
1973
|
-
}, [m,
|
|
2002
|
+
}, [m, ie]), _e = N(async () => {
|
|
1974
2003
|
if (R.value.trim()) {
|
|
1975
2004
|
const E = R.value.trim();
|
|
1976
|
-
R.clear(), m.state !== "expanded" && (f == null || f()), m.setState("expanded"), await
|
|
2005
|
+
R.clear(), m.state !== "expanded" && (f == null || f()), m.setState("expanded"), await i(E);
|
|
1977
2006
|
}
|
|
1978
|
-
}, [R,
|
|
2007
|
+
}, [R, i, m, f]), ae = N(() => {
|
|
1979
2008
|
C.current = !0, f == null || f(), m.setState("expanded");
|
|
1980
2009
|
}, [f, m]), Ce = N(() => {
|
|
1981
2010
|
g.current = !0, R.clear(), m.close(), p && p();
|
|
1982
2011
|
}, [R, m, p]), Q = N(
|
|
1983
2012
|
(E) => {
|
|
1984
|
-
if (!
|
|
2013
|
+
if (!J.current || !z.current)
|
|
1985
2014
|
return null;
|
|
1986
|
-
const $ =
|
|
2015
|
+
const $ = J.current.getBoundingClientRect(), Y = z.current.getBoundingClientRect(), Z = window.getComputedStyle(J.current), se = new DOMMatrixReadOnly(Z.transform), be = $.x - se.e, ee = $.y - se.f, Ue = (E ?? fe) === "left" ? Y.left : Y.right - k.COMPACT_WIDTH, we = Y.bottom - k.EXPANDED_HEIGHT;
|
|
1987
2016
|
return {
|
|
1988
|
-
x:
|
|
2017
|
+
x: Ue - be,
|
|
1989
2018
|
y: we - ee
|
|
1990
2019
|
};
|
|
1991
2020
|
},
|
|
@@ -2002,19 +2031,19 @@ function Mr({
|
|
|
2002
2031
|
const Y = $.point.x, Z = k.COMPACT_WIDTH, se = (window.innerWidth - Z) / 2, ee = Y < se ? "left" : "right";
|
|
2003
2032
|
X(ee);
|
|
2004
2033
|
const pe = Q(ee);
|
|
2005
|
-
pe && (
|
|
2034
|
+
pe && (_t(ne, pe.x, {
|
|
2006
2035
|
...Le.SPRING_CONFIG,
|
|
2007
2036
|
velocity: $.velocity.x * Le.VELOCITY_MULTIPLIER
|
|
2008
|
-
}),
|
|
2037
|
+
}), _t(re, pe.y, {
|
|
2009
2038
|
...Le.SPRING_CONFIG,
|
|
2010
2039
|
velocity: $.velocity.y * Le.VELOCITY_MULTIPLIER
|
|
2011
2040
|
}));
|
|
2012
2041
|
},
|
|
2013
2042
|
[ne, re, Q]
|
|
2014
2043
|
), Pe = V(m.state), Fe = Pe.current === "compact" && m.state === "expanded";
|
|
2015
|
-
return
|
|
2016
|
-
|
|
2017
|
-
}, [m.state,
|
|
2044
|
+
return q(() => {
|
|
2045
|
+
O(), Pe.current = m.state;
|
|
2046
|
+
}, [m.state, O]), q(() => {
|
|
2018
2047
|
if (m.state !== "expanded")
|
|
2019
2048
|
return;
|
|
2020
2049
|
const E = () => {
|
|
@@ -2022,42 +2051,42 @@ function Mr({
|
|
|
2022
2051
|
$ && (ne.set($.x), re.set($.y));
|
|
2023
2052
|
};
|
|
2024
2053
|
return window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
2025
|
-
}, [m.state, ne, re, Q]),
|
|
2054
|
+
}, [m.state, ne, re, Q]), q(() => {
|
|
2026
2055
|
const E = L.current;
|
|
2027
2056
|
return () => {
|
|
2028
2057
|
E.forEach(($) => {
|
|
2029
2058
|
clearTimeout($);
|
|
2030
2059
|
}), E.clear();
|
|
2031
2060
|
};
|
|
2032
|
-
}, []),
|
|
2061
|
+
}, []), q(() => {
|
|
2033
2062
|
if (m.state === "compact" && K.current) {
|
|
2034
2063
|
const E = K.current.scrollHeight + k.PADDING;
|
|
2035
|
-
|
|
2064
|
+
Ye(E);
|
|
2036
2065
|
}
|
|
2037
|
-
}, [m.state, R.value]),
|
|
2066
|
+
}, [m.state, R.value]), o === "embedded" ? /* @__PURE__ */ s.jsx(
|
|
2038
2067
|
"div",
|
|
2039
2068
|
{
|
|
2040
2069
|
"data-slot": "chat-embedded",
|
|
2041
2070
|
className: le(B, je.container, je.embedded),
|
|
2042
2071
|
children: /* @__PURE__ */ s.jsx(
|
|
2043
|
-
|
|
2072
|
+
It,
|
|
2044
2073
|
{
|
|
2045
|
-
messages:
|
|
2074
|
+
messages: t,
|
|
2046
2075
|
inputValue: R.value,
|
|
2047
2076
|
onInputChange: R.setValue,
|
|
2048
2077
|
onSubmit: _e,
|
|
2049
2078
|
onKeyDown: R.handleKeyDown,
|
|
2050
2079
|
textareaRef: R.textareaRef,
|
|
2051
2080
|
placeholder: l,
|
|
2052
|
-
isProcessing:
|
|
2081
|
+
isProcessing: n,
|
|
2053
2082
|
showHeader: !1,
|
|
2054
2083
|
notice: h,
|
|
2055
2084
|
suggestions: j,
|
|
2056
|
-
clearSuggestions:
|
|
2085
|
+
clearSuggestions: I,
|
|
2057
2086
|
error: r,
|
|
2058
2087
|
emptyView: _,
|
|
2059
2088
|
messageRenderer: M,
|
|
2060
|
-
onExpand:
|
|
2089
|
+
onExpand: ae,
|
|
2061
2090
|
focusOnMount: C.current
|
|
2062
2091
|
}
|
|
2063
2092
|
)
|
|
@@ -2066,7 +2095,7 @@ function Mr({
|
|
|
2066
2095
|
/* @__PURE__ */ s.jsx(
|
|
2067
2096
|
"div",
|
|
2068
2097
|
{
|
|
2069
|
-
ref:
|
|
2098
|
+
ref: z,
|
|
2070
2099
|
style: {
|
|
2071
2100
|
position: "fixed",
|
|
2072
2101
|
top: k.VIEWPORT_OFFSET,
|
|
@@ -2078,16 +2107,16 @@ function Mr({
|
|
|
2078
2107
|
}
|
|
2079
2108
|
),
|
|
2080
2109
|
/* @__PURE__ */ s.jsx(
|
|
2081
|
-
|
|
2110
|
+
oe.div,
|
|
2082
2111
|
{
|
|
2083
|
-
ref:
|
|
2112
|
+
ref: J,
|
|
2084
2113
|
"data-slot": "chat-floating",
|
|
2085
2114
|
className: le(B, je.container, je.floating),
|
|
2086
|
-
onMouseLeave: m.state === "compact" ?
|
|
2115
|
+
onMouseLeave: m.state === "compact" ? Ie : void 0,
|
|
2087
2116
|
drag: m.state === "expanded",
|
|
2088
2117
|
dragControls: de,
|
|
2089
2118
|
dragListener: !1,
|
|
2090
|
-
dragConstraints:
|
|
2119
|
+
dragConstraints: z,
|
|
2091
2120
|
dragMomentum: !1,
|
|
2092
2121
|
dragElastic: 0.1,
|
|
2093
2122
|
dragTransition: { power: 0.1, timeConstant: 100 },
|
|
@@ -2100,33 +2129,33 @@ function Mr({
|
|
|
2100
2129
|
left: k.VIEWPORT_OFFSET
|
|
2101
2130
|
},
|
|
2102
2131
|
children: /* @__PURE__ */ s.jsx(
|
|
2103
|
-
|
|
2132
|
+
oe.div,
|
|
2104
2133
|
{
|
|
2105
2134
|
layout: !0,
|
|
2106
2135
|
className: je.content,
|
|
2107
2136
|
initial: !1,
|
|
2108
2137
|
animate: {
|
|
2109
2138
|
width: m.state === "collapsed" ? k.COLLAPSED_SIZE : k.COMPACT_WIDTH,
|
|
2110
|
-
height:
|
|
2139
|
+
height: Ae(m.state),
|
|
2111
2140
|
x: m.state === "collapsed" && fe === "right" ? k.COMPACT_WIDTH - k.COLLAPSED_SIZE : 0,
|
|
2112
|
-
transition: R.value.trim() ? { duration: 0 } :
|
|
2141
|
+
transition: R.value.trim() ? { duration: 0 } : ot
|
|
2113
2142
|
},
|
|
2114
2143
|
style: {
|
|
2115
2144
|
borderRadius: k.BORDER_RADIUS
|
|
2116
2145
|
},
|
|
2117
|
-
children: /* @__PURE__ */ s.jsxs(
|
|
2146
|
+
children: /* @__PURE__ */ s.jsxs(tt, { mode: "wait", children: [
|
|
2118
2147
|
m.state === "collapsed" && /* @__PURE__ */ s.jsx(
|
|
2119
|
-
|
|
2148
|
+
Gn,
|
|
2120
2149
|
{
|
|
2121
2150
|
icon: c,
|
|
2122
|
-
onClick:
|
|
2123
|
-
onHover:
|
|
2151
|
+
onClick: Oe,
|
|
2152
|
+
onHover: De,
|
|
2124
2153
|
focusOnMount: g.current
|
|
2125
2154
|
},
|
|
2126
2155
|
"collapsed"
|
|
2127
2156
|
),
|
|
2128
2157
|
m.state === "compact" && /* @__PURE__ */ s.jsx("div", { ref: K, children: /* @__PURE__ */ s.jsx(
|
|
2129
|
-
|
|
2158
|
+
rr,
|
|
2130
2159
|
{
|
|
2131
2160
|
value: R.value,
|
|
2132
2161
|
onChange: R.setValue,
|
|
@@ -2134,35 +2163,35 @@ function Mr({
|
|
|
2134
2163
|
onKeyDown: R.handleKeyDown,
|
|
2135
2164
|
textareaRef: R.textareaRef,
|
|
2136
2165
|
placeholder: l,
|
|
2137
|
-
isProcessing:
|
|
2138
|
-
onBlur:
|
|
2139
|
-
onExpand:
|
|
2166
|
+
isProcessing: n,
|
|
2167
|
+
onBlur: Ie,
|
|
2168
|
+
onExpand: ae,
|
|
2140
2169
|
showExpandButton: !R.value.trim(),
|
|
2141
2170
|
focusOnMount: v.current
|
|
2142
2171
|
},
|
|
2143
2172
|
"compact"
|
|
2144
2173
|
) }),
|
|
2145
2174
|
m.state === "expanded" && /* @__PURE__ */ s.jsx(
|
|
2146
|
-
|
|
2175
|
+
It,
|
|
2147
2176
|
{
|
|
2148
|
-
messages:
|
|
2177
|
+
messages: t,
|
|
2149
2178
|
inputValue: R.value,
|
|
2150
2179
|
onInputChange: R.setValue,
|
|
2151
2180
|
onSubmit: _e,
|
|
2152
2181
|
onKeyDown: R.handleKeyDown,
|
|
2153
2182
|
textareaRef: R.textareaRef,
|
|
2154
2183
|
placeholder: l,
|
|
2155
|
-
isProcessing:
|
|
2184
|
+
isProcessing: n,
|
|
2156
2185
|
showHeader: !0,
|
|
2157
2186
|
onClose: Ce,
|
|
2158
2187
|
fromCompact: Fe,
|
|
2159
2188
|
notice: h,
|
|
2160
2189
|
suggestions: j,
|
|
2161
|
-
clearSuggestions:
|
|
2190
|
+
clearSuggestions: I,
|
|
2162
2191
|
error: r,
|
|
2163
2192
|
emptyView: _,
|
|
2164
2193
|
messageRenderer: M,
|
|
2165
|
-
onExpand:
|
|
2194
|
+
onExpand: ae,
|
|
2166
2195
|
focusOnMount: C.current
|
|
2167
2196
|
},
|
|
2168
2197
|
"expanded"
|
|
@@ -2174,12 +2203,12 @@ function Mr({
|
|
|
2174
2203
|
)
|
|
2175
2204
|
] });
|
|
2176
2205
|
}
|
|
2177
|
-
const
|
|
2178
|
-
messages:
|
|
2179
|
-
isProcessing:
|
|
2206
|
+
const di = ({
|
|
2207
|
+
messages: t,
|
|
2208
|
+
isProcessing: n,
|
|
2180
2209
|
error: r,
|
|
2181
|
-
onSubmit:
|
|
2182
|
-
variant:
|
|
2210
|
+
onSubmit: i,
|
|
2211
|
+
variant: o = "floating",
|
|
2183
2212
|
triggerIcon: c,
|
|
2184
2213
|
placeholder: l,
|
|
2185
2214
|
notice: h,
|
|
@@ -2189,17 +2218,17 @@ const ca = ({
|
|
|
2189
2218
|
onClose: _,
|
|
2190
2219
|
floatingChatState: x,
|
|
2191
2220
|
suggestions: j,
|
|
2192
|
-
clearSuggestions:
|
|
2221
|
+
clearSuggestions: I,
|
|
2193
2222
|
messageRenderer: M,
|
|
2194
2223
|
className: B
|
|
2195
2224
|
}) => /* @__PURE__ */ s.jsx(
|
|
2196
|
-
|
|
2225
|
+
Hr,
|
|
2197
2226
|
{
|
|
2198
|
-
messages:
|
|
2199
|
-
isProcessing:
|
|
2227
|
+
messages: t,
|
|
2228
|
+
isProcessing: n,
|
|
2200
2229
|
error: r,
|
|
2201
|
-
onSubmit:
|
|
2202
|
-
variant:
|
|
2230
|
+
onSubmit: i,
|
|
2231
|
+
variant: o,
|
|
2203
2232
|
triggerIcon: c,
|
|
2204
2233
|
placeholder: l,
|
|
2205
2234
|
notice: h,
|
|
@@ -2209,21 +2238,21 @@ const ca = ({
|
|
|
2209
2238
|
onClose: _,
|
|
2210
2239
|
floatingChatState: x,
|
|
2211
2240
|
suggestions: j,
|
|
2212
|
-
clearSuggestions:
|
|
2241
|
+
clearSuggestions: I,
|
|
2213
2242
|
messageRenderer: M,
|
|
2214
2243
|
className: le("agenttic", B)
|
|
2215
2244
|
}
|
|
2216
2245
|
);
|
|
2217
|
-
function
|
|
2246
|
+
function hi({ className: t, size: n = 24 }) {
|
|
2218
2247
|
return /* @__PURE__ */ s.jsx(
|
|
2219
2248
|
"svg",
|
|
2220
2249
|
{
|
|
2221
|
-
width:
|
|
2222
|
-
height:
|
|
2250
|
+
width: n,
|
|
2251
|
+
height: n,
|
|
2223
2252
|
viewBox: "0 0 24 24",
|
|
2224
2253
|
fill: "none",
|
|
2225
2254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2226
|
-
className:
|
|
2255
|
+
className: t,
|
|
2227
2256
|
children: /* @__PURE__ */ s.jsx(
|
|
2228
2257
|
"path",
|
|
2229
2258
|
{
|
|
@@ -2234,16 +2263,16 @@ function la({ className: n, size: t = 24 }) {
|
|
|
2234
2263
|
}
|
|
2235
2264
|
);
|
|
2236
2265
|
}
|
|
2237
|
-
function
|
|
2266
|
+
function pi({ className: t, size: n = 24 }) {
|
|
2238
2267
|
return /* @__PURE__ */ s.jsx(
|
|
2239
2268
|
"svg",
|
|
2240
2269
|
{
|
|
2241
|
-
width:
|
|
2242
|
-
height:
|
|
2270
|
+
width: n,
|
|
2271
|
+
height: n,
|
|
2243
2272
|
viewBox: "0 0 24 24",
|
|
2244
2273
|
fill: "none",
|
|
2245
2274
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2246
|
-
className:
|
|
2275
|
+
className: t,
|
|
2247
2276
|
"aria-hidden": "true",
|
|
2248
2277
|
children: /* @__PURE__ */ s.jsx(
|
|
2249
2278
|
"path",
|
|
@@ -2255,16 +2284,16 @@ function ua({ className: n, size: t = 24 }) {
|
|
|
2255
2284
|
}
|
|
2256
2285
|
);
|
|
2257
2286
|
}
|
|
2258
|
-
function
|
|
2287
|
+
function vi({ className: t, size: n = 24 }) {
|
|
2259
2288
|
return /* @__PURE__ */ s.jsx(
|
|
2260
2289
|
"svg",
|
|
2261
2290
|
{
|
|
2262
|
-
width:
|
|
2263
|
-
height:
|
|
2291
|
+
width: n,
|
|
2292
|
+
height: n,
|
|
2264
2293
|
viewBox: "0 0 24 24",
|
|
2265
2294
|
fill: "none",
|
|
2266
2295
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2267
|
-
className:
|
|
2296
|
+
className: t,
|
|
2268
2297
|
"aria-hidden": "true",
|
|
2269
2298
|
children: /* @__PURE__ */ s.jsx(
|
|
2270
2299
|
"path",
|
|
@@ -2276,16 +2305,16 @@ function fa({ className: n, size: t = 24 }) {
|
|
|
2276
2305
|
}
|
|
2277
2306
|
);
|
|
2278
2307
|
}
|
|
2279
|
-
function
|
|
2308
|
+
function mi({ className: t, size: n = 24 }) {
|
|
2280
2309
|
return /* @__PURE__ */ s.jsx(
|
|
2281
2310
|
"svg",
|
|
2282
2311
|
{
|
|
2283
|
-
width:
|
|
2284
|
-
height:
|
|
2312
|
+
width: n,
|
|
2313
|
+
height: n,
|
|
2285
2314
|
viewBox: "0 0 24 24",
|
|
2286
2315
|
fill: "none",
|
|
2287
2316
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2288
|
-
className:
|
|
2317
|
+
className: t,
|
|
2289
2318
|
"aria-hidden": "true",
|
|
2290
2319
|
children: /* @__PURE__ */ s.jsx(
|
|
2291
2320
|
"path",
|
|
@@ -2300,18 +2329,22 @@ function da({ className: n, size: t = 24 }) {
|
|
|
2300
2329
|
);
|
|
2301
2330
|
}
|
|
2302
2331
|
export {
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2332
|
+
di as AgentUI,
|
|
2333
|
+
zn as ArrowUpIcon,
|
|
2334
|
+
Vt as BigSkyIcon,
|
|
2335
|
+
Hr as Chat,
|
|
2336
|
+
Yt as ChatInput,
|
|
2337
|
+
vi as CopyIcon,
|
|
2338
|
+
Rr as Message,
|
|
2339
|
+
At as MessageActions,
|
|
2340
|
+
Dr as Messages,
|
|
2341
|
+
hr as Notice,
|
|
2342
|
+
Jn as StopIcon,
|
|
2343
|
+
mi as StylesIcon,
|
|
2344
|
+
vr as Suggestions,
|
|
2345
|
+
Ar as ThinkingMessage,
|
|
2346
|
+
pi as ThumbsDownIcon,
|
|
2347
|
+
hi as ThumbsUpIcon,
|
|
2348
|
+
Ut as XIcon,
|
|
2349
|
+
fi as animations
|
|
2317
2350
|
};
|