@automattic/agenttic-ui 0.1.8 → 0.1.10

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.
Files changed (41) hide show
  1. package/README.md +37 -0
  2. package/dist/components/AgentUI.d.ts +1 -0
  3. package/dist/components/AgentUI.d.ts.map +1 -1
  4. package/dist/components/animations/index.d.ts +0 -1
  5. package/dist/components/animations/index.d.ts.map +1 -1
  6. package/dist/components/chat/AnimatedPlaceholder.d.ts +8 -0
  7. package/dist/components/chat/AnimatedPlaceholder.d.ts.map +1 -0
  8. package/dist/components/chat/Chat.d.ts +1 -1
  9. package/dist/components/chat/Chat.d.ts.map +1 -1
  10. package/dist/components/chat/ChatFooter.d.ts +4 -2
  11. package/dist/components/chat/ChatFooter.d.ts.map +1 -1
  12. package/dist/components/chat/ChatFooter.stories.d.ts +73 -0
  13. package/dist/components/chat/ChatFooter.stories.d.ts.map +1 -0
  14. package/dist/components/chat/ChatHeader.d.ts.map +1 -1
  15. package/dist/components/chat/ChatInput.d.ts +4 -2
  16. package/dist/components/chat/ChatInput.d.ts.map +1 -1
  17. package/dist/components/chat/ChatInput.stories.d.ts +2 -0
  18. package/dist/components/chat/ChatInput.stories.d.ts.map +1 -1
  19. package/dist/components/chat/MessageActions.d.ts.map +1 -1
  20. package/dist/components/chat/Messages.d.ts +1 -2
  21. package/dist/components/chat/Messages.d.ts.map +1 -1
  22. package/dist/components/chat/Messages.stories.d.ts +2 -2
  23. package/dist/components/icons/ZoomIcon.d.ts +3 -0
  24. package/dist/components/icons/ZoomIcon.d.ts.map +1 -0
  25. package/dist/components/icons/ZoomIconFilled.d.ts +3 -0
  26. package/dist/components/icons/ZoomIconFilled.d.ts.map +1 -0
  27. package/dist/components/ui/button.d.ts +1 -0
  28. package/dist/components/ui/button.d.ts.map +1 -1
  29. package/dist/components/ui/button.stories.d.ts +15 -4
  30. package/dist/components/ui/button.stories.d.ts.map +1 -1
  31. package/dist/components/views/CompactView.d.ts +3 -2
  32. package/dist/components/views/CompactView.d.ts.map +1 -1
  33. package/dist/components/views/ConversationView.d.ts +3 -2
  34. package/dist/components/views/ConversationView.d.ts.map +1 -1
  35. package/dist/index.css +1 -1
  36. package/dist/index.d.ts +4 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +1382 -1252
  39. package/dist/types/index.d.ts +5 -2
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/package.json +4 -5
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import * as Pt from "react";
2
- import We, { useState as Ne, useEffect as q, useCallback as V, useRef as W, useId as dn, memo as hn, useMemo as pn } from "react";
3
- import { motion as ae, 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";
1
+ import * as Mt from "react";
2
+ import Ze, { useState as Ee, useEffect as J, useCallback as V, useRef as W, useId as dn, memo as hn, useMemo as pn } from "react";
3
+ import { motion as q, AnimatePresence as Ue, useMotionValue as _t, useDragControls as vn, animate as xt } from "framer-motion";
4
+ import { useRef as mn, useCallback as et, useEffect as gn } from "@wordpress/element";
5
5
  import { Slot as yn } from "@radix-ui/react-slot";
6
- import _n from "react-markdown";
7
- import './index.css';var qe = { exports: {} }, Re = {};
6
+ import Cn from "react-markdown";
7
+ import './index.css';var rt = { exports: {} }, je = {};
8
8
  /**
9
9
  * @license React
10
10
  * react-jsx-runtime.production.min.js
@@ -14,21 +14,21 @@ import './index.css';var qe = { exports: {} }, Re = {};
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 Ct;
18
- function Cn() {
19
- if (Ct) return Re;
20
- Ct = 1;
21
- var t = We, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
22
- function l(h, u, f) {
23
- var v, _ = {}, C = null, j = null;
24
- f !== void 0 && (C = "" + f), u.key !== void 0 && (C = "" + u.key), u.ref !== void 0 && (j = u.ref);
25
- for (v in u) i.call(u, v) && !c.hasOwnProperty(v) && (_[v] = u[v]);
26
- if (h && h.defaultProps) for (v in u = h.defaultProps, u) _[v] === void 0 && (_[v] = u[v]);
27
- return { $$typeof: n, type: h, key: C, ref: j, props: _, _owner: a.current };
17
+ var bt;
18
+ function _n() {
19
+ if (bt) return je;
20
+ bt = 1;
21
+ var n = Ze, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
22
+ function u(h, f, p) {
23
+ var m, g = {}, C = null, E = null;
24
+ p !== void 0 && (C = "" + p), f.key !== void 0 && (C = "" + f.key), f.ref !== void 0 && (E = f.ref);
25
+ for (m in f) i.call(f, m) && !s.hasOwnProperty(m) && (g[m] = f[m]);
26
+ if (h && h.defaultProps) for (m in f = h.defaultProps, f) g[m] === void 0 && (g[m] = f[m]);
27
+ return { $$typeof: t, type: h, key: C, ref: E, props: g, _owner: a.current };
28
28
  }
29
- return Re.Fragment = r, Re.jsx = l, Re.jsxs = l, Re;
29
+ return je.Fragment = r, je.jsx = u, je.jsxs = u, je;
30
30
  }
31
- var Te = {};
31
+ var Le = {};
32
32
  /**
33
33
  * @license React
34
34
  * react-jsx-runtime.development.js
@@ -38,57 +38,57 @@ var Te = {};
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 bt;
42
- function bn() {
43
- return bt || (bt = 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"), a = 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"), v = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), j = Symbol.for("react.offscreen"), I = Symbol.iterator, M = "@@iterator";
41
+ var wt;
42
+ function xn() {
43
+ return wt || (wt = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var n = Ze, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), h = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), D = Symbol.iterator, H = "@@iterator";
45
45
  function B(e) {
46
46
  if (e === null || typeof e != "object")
47
47
  return null;
48
- var o = I && e[I] || e[M];
49
- return typeof o == "function" ? o : null;
48
+ var c = D && e[D] || e[H];
49
+ return typeof c == "function" ? c : null;
50
50
  }
51
- var $ = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
- function A(e) {
51
+ var M = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
+ function j(e) {
53
53
  {
54
- for (var o = arguments.length, d = new Array(o > 1 ? o - 1 : 0), y = 1; y < o; y++)
54
+ for (var c = arguments.length, d = new Array(c > 1 ? c - 1 : 0), y = 1; y < c; y++)
55
55
  d[y - 1] = arguments[y];
56
- g("error", e, d);
56
+ K("error", e, d);
57
57
  }
58
58
  }
59
- function g(e, o, d) {
59
+ function K(e, c, d) {
60
60
  {
61
- var y = $.ReactDebugCurrentFrame, T = y.getStackAddendum();
62
- T !== "" && (o += "%s", d = d.concat([T]));
63
- var S = d.map(function(w) {
61
+ var y = M.ReactDebugCurrentFrame, R = y.getStackAddendum();
62
+ R !== "" && (c += "%s", d = d.concat([R]));
63
+ var L = d.map(function(w) {
64
64
  return String(w);
65
65
  });
66
- S.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, S);
66
+ L.unshift("Warning: " + c), Function.prototype.apply.call(console[e], console, L);
67
67
  }
68
68
  }
69
- var p = !1, m = !1, b = !1, L = !1, O = !1, R;
70
- R = Symbol.for("react.module.reference");
71
- function ue(e) {
72
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === c || O || e === a || e === f || e === v || L || e === j || p || m || b || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === h || e.$$typeof === u || // This needs to include all possible module reference object
69
+ var l = !1, v = !1, _ = !1, A = !1, O = !1, T;
70
+ T = Symbol.for("react.module.reference");
71
+ function Z(e) {
72
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === s || O || e === a || e === p || e === m || A || e === E || l || v || _ || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === g || e.$$typeof === u || e.$$typeof === h || e.$$typeof === f || // 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
- e.$$typeof === R || e.getModuleId !== void 0));
76
+ e.$$typeof === T || e.getModuleId !== void 0));
77
77
  }
78
- function Be(e, o, d) {
78
+ function Pe(e, c, d) {
79
79
  var y = e.displayName;
80
80
  if (y)
81
81
  return y;
82
- var T = o.displayName || o.name || "";
83
- return T !== "" ? d + "(" + T + ")" : d;
82
+ var R = c.displayName || c.name || "";
83
+ return R !== "" ? d + "(" + R + ")" : d;
84
84
  }
85
- function fe(e) {
85
+ function S(e) {
86
86
  return e.displayName || "Context";
87
87
  }
88
- function X(e) {
88
+ function z(e) {
89
89
  if (e == null)
90
90
  return null;
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")
91
+ if (typeof e.tag == "number" && j("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;
@@ -97,32 +97,32 @@ function bn() {
97
97
  return "Fragment";
98
98
  case r:
99
99
  return "Portal";
100
- case c:
100
+ case s:
101
101
  return "Profiler";
102
102
  case a:
103
103
  return "StrictMode";
104
- case f:
104
+ case p:
105
105
  return "Suspense";
106
- case v:
106
+ case m:
107
107
  return "SuspenseList";
108
108
  }
109
109
  if (typeof e == "object")
110
110
  switch (e.$$typeof) {
111
111
  case h:
112
- var o = e;
113
- return fe(o) + ".Consumer";
114
- case l:
115
- var d = e;
116
- return fe(d._context) + ".Provider";
112
+ var c = e;
113
+ return S(c) + ".Consumer";
117
114
  case u:
118
- return Be(e, e.render, "ForwardRef");
119
- case _:
115
+ var d = e;
116
+ return S(d._context) + ".Provider";
117
+ case f:
118
+ return Pe(e, e.render, "ForwardRef");
119
+ case g:
120
120
  var y = e.displayName || null;
121
- return y !== null ? y : X(e.type) || "Memo";
121
+ return y !== null ? y : z(e.type) || "Memo";
122
122
  case C: {
123
- var T = e, S = T._payload, w = T._init;
123
+ var R = e, L = R._payload, w = R._init;
124
124
  try {
125
- return X(w(S));
125
+ return z(w(L));
126
126
  } catch {
127
127
  return null;
128
128
  }
@@ -130,18 +130,18 @@ function bn() {
130
130
  }
131
131
  return null;
132
132
  }
133
- var K = Object.assign, z = 0, J, ne, re, de, Ae, ie, Oe;
134
- function De() {
133
+ var te = Object.assign, ne = 0, Fe, de, le, Q, re, ie, he;
134
+ function Me() {
135
135
  }
136
- De.__reactDisabledLog = !0;
137
- function Ie() {
136
+ Me.__reactDisabledLog = !0;
137
+ function ce() {
138
138
  {
139
- if (z === 0) {
140
- J = console.log, ne = console.info, re = console.warn, de = console.error, Ae = console.group, ie = console.groupCollapsed, Oe = console.groupEnd;
139
+ if (ne === 0) {
140
+ Fe = console.log, de = console.info, le = console.warn, Q = console.error, re = console.group, ie = console.groupCollapsed, he = console.groupEnd;
141
141
  var e = {
142
142
  configurable: !0,
143
143
  enumerable: !0,
144
- value: De,
144
+ value: Me,
145
145
  writable: !0
146
146
  };
147
147
  Object.defineProperties(console, {
@@ -154,79 +154,79 @@ function bn() {
154
154
  groupEnd: e
155
155
  });
156
156
  }
157
- z++;
157
+ ne++;
158
158
  }
159
159
  }
160
- function Ce() {
160
+ function Ge() {
161
161
  {
162
- if (z--, z === 0) {
162
+ if (ne--, ne === 0) {
163
163
  var e = {
164
164
  configurable: !0,
165
165
  enumerable: !0,
166
166
  writable: !0
167
167
  };
168
168
  Object.defineProperties(console, {
169
- log: K({}, e, {
170
- value: J
169
+ log: te({}, e, {
170
+ value: Fe
171
171
  }),
172
- info: K({}, e, {
173
- value: ne
172
+ info: te({}, e, {
173
+ value: de
174
174
  }),
175
- warn: K({}, e, {
176
- value: re
175
+ warn: te({}, e, {
176
+ value: le
177
177
  }),
178
- error: K({}, e, {
179
- value: de
178
+ error: te({}, e, {
179
+ value: Q
180
180
  }),
181
- group: K({}, e, {
182
- value: Ae
181
+ group: te({}, e, {
182
+ value: re
183
183
  }),
184
- groupCollapsed: K({}, e, {
184
+ groupCollapsed: te({}, e, {
185
185
  value: ie
186
186
  }),
187
- groupEnd: K({}, e, {
188
- value: Oe
187
+ groupEnd: te({}, e, {
188
+ value: he
189
189
  })
190
190
  });
191
191
  }
192
- z < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
+ ne < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
193
  }
194
194
  }
195
- var oe = $.ReactCurrentDispatcher, be;
196
- function ee(e, o, d) {
195
+ var Te = M.ReactCurrentDispatcher, pe;
196
+ function ae(e, c, d) {
197
197
  {
198
- if (be === void 0)
198
+ if (pe === void 0)
199
199
  try {
200
200
  throw Error();
201
- } catch (T) {
202
- var y = T.stack.trim().match(/\n( *(at )?)/);
203
- be = y && y[1] || "";
201
+ } catch (R) {
202
+ var y = R.stack.trim().match(/\n( *(at )?)/);
203
+ pe = y && y[1] || "";
204
204
  }
205
205
  return `
206
- ` + be + e;
206
+ ` + pe + e;
207
207
  }
208
208
  }
209
- var xe = !1, he;
209
+ var ue = !1, ve;
210
210
  {
211
- var Pe = typeof WeakMap == "function" ? WeakMap : Map;
212
- he = new Pe();
211
+ var me = typeof WeakMap == "function" ? WeakMap : Map;
212
+ ve = new me();
213
213
  }
214
- function Fe(e, o) {
215
- if (!e || xe)
214
+ function ke(e, c) {
215
+ if (!e || ue)
216
216
  return "";
217
217
  {
218
- var d = he.get(e);
218
+ var d = ve.get(e);
219
219
  if (d !== void 0)
220
220
  return d;
221
221
  }
222
222
  var y;
223
- xe = !0;
224
- var T = Error.prepareStackTrace;
223
+ ue = !0;
224
+ var R = Error.prepareStackTrace;
225
225
  Error.prepareStackTrace = void 0;
226
- var S;
227
- S = oe.current, oe.current = null, Ie();
226
+ var L;
227
+ L = Te.current, Te.current = null, ce();
228
228
  try {
229
- if (o) {
229
+ if (c) {
230
230
  var w = function() {
231
231
  throw Error();
232
232
  };
@@ -237,167 +237,167 @@ function bn() {
237
237
  }), typeof Reflect == "object" && Reflect.construct) {
238
238
  try {
239
239
  Reflect.construct(w, []);
240
- } catch (U) {
241
- y = U;
240
+ } catch (Y) {
241
+ y = Y;
242
242
  }
243
243
  Reflect.construct(e, [], w);
244
244
  } else {
245
245
  try {
246
246
  w.call();
247
- } catch (U) {
248
- y = U;
247
+ } catch (Y) {
248
+ y = Y;
249
249
  }
250
250
  e.call(w.prototype);
251
251
  }
252
252
  } else {
253
253
  try {
254
254
  throw Error();
255
- } catch (U) {
256
- y = U;
255
+ } catch (Y) {
256
+ y = Y;
257
257
  }
258
258
  e();
259
259
  }
260
- } catch (U) {
261
- if (U && y && typeof U.stack == "string") {
262
- for (var x = U.stack.split(`
260
+ } catch (Y) {
261
+ if (Y && y && typeof Y.stack == "string") {
262
+ for (var b = Y.stack.split(`
263
263
  `), N = y.stack.split(`
264
- `), D = x.length - 1, P = N.length - 1; D >= 1 && P >= 0 && x[D] !== N[P]; )
264
+ `), I = b.length - 1, P = N.length - 1; I >= 1 && P >= 0 && b[I] !== N[P]; )
265
265
  P--;
266
- for (; D >= 1 && P >= 0; D--, P--)
267
- if (x[D] !== N[P]) {
268
- if (D !== 1 || P !== 1)
266
+ for (; I >= 1 && P >= 0; I--, P--)
267
+ if (b[I] !== N[P]) {
268
+ if (I !== 1 || P !== 1)
269
269
  do
270
- if (D--, P--, P < 0 || x[D] !== N[P]) {
270
+ if (I--, P--, P < 0 || b[I] !== N[P]) {
271
271
  var G = `
272
- ` + x[D].replace(" at new ", " at ");
273
- return e.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", e.displayName)), typeof e == "function" && he.set(e, G), G;
272
+ ` + b[I].replace(" at new ", " at ");
273
+ return e.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", e.displayName)), typeof e == "function" && ve.set(e, G), G;
274
274
  }
275
- while (D >= 1 && P >= 0);
275
+ while (I >= 1 && P >= 0);
276
276
  break;
277
277
  }
278
278
  }
279
279
  } finally {
280
- xe = !1, oe.current = S, Ce(), Error.prepareStackTrace = T;
280
+ ue = !1, Te.current = L, Ge(), Error.prepareStackTrace = R;
281
281
  }
282
- var me = e ? e.displayName || e.name : "", ce = me ? ee(me) : "";
283
- return typeof e == "function" && he.set(e, ce), ce;
282
+ var xe = e ? e.displayName || e.name : "", fe = xe ? ae(xe) : "";
283
+ return typeof e == "function" && ve.set(e, fe), fe;
284
284
  }
285
- function E(e, o, d) {
286
- return Fe(e, !1);
285
+ function Ke(e, c, d) {
286
+ return ke(e, !1);
287
287
  }
288
- function H(e) {
289
- var o = e.prototype;
290
- return !!(o && o.isReactComponent);
288
+ function $e(e) {
289
+ var c = e.prototype;
290
+ return !!(c && c.isReactComponent);
291
291
  }
292
- function Y(e, o, d) {
292
+ function ge(e, c, d) {
293
293
  if (e == null)
294
294
  return "";
295
295
  if (typeof e == "function")
296
- return Fe(e, H(e));
296
+ return ke(e, $e(e));
297
297
  if (typeof e == "string")
298
- return ee(e);
298
+ return ae(e);
299
299
  switch (e) {
300
- case f:
301
- return ee("Suspense");
302
- case v:
303
- return ee("SuspenseList");
300
+ case p:
301
+ return ae("Suspense");
302
+ case m:
303
+ return ae("SuspenseList");
304
304
  }
305
305
  if (typeof e == "object")
306
306
  switch (e.$$typeof) {
307
- case u:
308
- return E(e.render);
309
- case _:
310
- return Y(e.type, o, d);
307
+ case f:
308
+ return Ke(e.render);
309
+ case g:
310
+ return ge(e.type, c, d);
311
311
  case C: {
312
- var y = e, T = y._payload, S = y._init;
312
+ var y = e, R = y._payload, L = y._init;
313
313
  try {
314
- return Y(S(T), o, d);
314
+ return ge(L(R), c, d);
315
315
  } catch {
316
316
  }
317
317
  }
318
318
  }
319
319
  return "";
320
320
  }
321
- var Z = Object.prototype.hasOwnProperty, se = {}, we = $.ReactDebugCurrentFrame;
322
- function te(e) {
321
+ var x = Object.prototype.hasOwnProperty, k = {}, U = M.ReactDebugCurrentFrame;
322
+ function X(e) {
323
323
  if (e) {
324
- var o = e._owner, d = Y(e.type, e._source, o ? o.type : null);
325
- we.setExtraStackFrame(d);
324
+ var c = e._owner, d = ge(e.type, e._source, c ? c.type : null);
325
+ U.setExtraStackFrame(d);
326
326
  } else
327
- we.setExtraStackFrame(null);
327
+ U.setExtraStackFrame(null);
328
328
  }
329
- function pe(e, o, d, y, T) {
329
+ function ye(e, c, d, y, R) {
330
330
  {
331
- var S = Function.call.bind(Z);
331
+ var L = Function.call.bind(x);
332
332
  for (var w in e)
333
- if (S(e, w)) {
334
- var x = void 0;
333
+ if (L(e, w)) {
334
+ var b = void 0;
335
335
  try {
336
336
  if (typeof e[w] != "function") {
337
337
  var N = 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 N.name = "Invariant Violation", N;
339
339
  }
340
- x = e[w](o, w, y, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
- } catch (D) {
342
- x = D;
340
+ b = e[w](c, w, y, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
+ } catch (I) {
342
+ b = I;
343
343
  }
344
- x && !(x instanceof Error) && (te(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 x), te(null)), x instanceof Error && !(x.message in se) && (se[x.message] = !0, te(T), A("Failed %s type: %s", d, x.message), te(null));
344
+ b && !(b instanceof Error) && (X(R), j("%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), X(null)), b instanceof Error && !(b.message in k) && (k[b.message] = !0, X(R), j("Failed %s type: %s", d, b.message), X(null));
345
345
  }
346
346
  }
347
347
  }
348
- var Ye = Array.isArray;
349
- function Ee(e) {
350
- return Ye(e);
348
+ var He = Array.isArray;
349
+ function oe(e) {
350
+ return He(e);
351
351
  }
352
- function Ut(e) {
352
+ function Ce(e) {
353
353
  {
354
- var o = typeof Symbol == "function" && Symbol.toStringTag, d = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
354
+ var c = typeof Symbol == "function" && Symbol.toStringTag, d = c && e[Symbol.toStringTag] || e.constructor.name || "Object";
355
355
  return d;
356
356
  }
357
357
  }
358
- function Zt(e) {
358
+ function Xe(e) {
359
359
  try {
360
- return ot(e), !1;
360
+ return Ne(e), !1;
361
361
  } catch {
362
362
  return !0;
363
363
  }
364
364
  }
365
- function ot(e) {
365
+ function Ne(e) {
366
366
  return "" + e;
367
367
  }
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.", Ut(e)), ot(e);
368
+ function ct(e) {
369
+ if (Xe(e))
370
+ return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ce(e)), Ne(e);
371
371
  }
372
- var ct = $.ReactCurrentOwner, Gt = {
372
+ var ut = M.ReactCurrentOwner, Gt = {
373
373
  key: !0,
374
374
  ref: !0,
375
375
  __self: !0,
376
376
  __source: !0
377
- }, lt, ut;
377
+ }, ft, dt;
378
378
  function Kt(e) {
379
- if (Z.call(e, "ref")) {
380
- var o = Object.getOwnPropertyDescriptor(e, "ref").get;
381
- if (o && o.isReactWarning)
379
+ if (x.call(e, "ref")) {
380
+ var c = Object.getOwnPropertyDescriptor(e, "ref").get;
381
+ if (c && c.isReactWarning)
382
382
  return !1;
383
383
  }
384
384
  return e.ref !== void 0;
385
385
  }
386
386
  function Xt(e) {
387
- if (Z.call(e, "key")) {
388
- var o = Object.getOwnPropertyDescriptor(e, "key").get;
389
- if (o && o.isReactWarning)
387
+ if (x.call(e, "key")) {
388
+ var c = Object.getOwnPropertyDescriptor(e, "key").get;
389
+ if (c && c.isReactWarning)
390
390
  return !1;
391
391
  }
392
392
  return e.key !== void 0;
393
393
  }
394
- function zt(e, o) {
395
- typeof e.ref == "string" && ct.current;
394
+ function Jt(e, c) {
395
+ typeof e.ref == "string" && ut.current;
396
396
  }
397
- function Jt(e, o) {
397
+ function qt(e, c) {
398
398
  {
399
399
  var d = function() {
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)", o));
400
+ ft || (ft = !0, j("%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)", c));
401
401
  };
402
402
  d.isReactWarning = !0, Object.defineProperty(e, "key", {
403
403
  get: d,
@@ -405,10 +405,10 @@ function bn() {
405
405
  });
406
406
  }
407
407
  }
408
- function qt(e, o) {
408
+ function zt(e, c) {
409
409
  {
410
410
  var d = function() {
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)", o));
411
+ dt || (dt = !0, j("%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)", c));
412
412
  };
413
413
  d.isReactWarning = !0, Object.defineProperty(e, "ref", {
414
414
  get: d,
@@ -416,70 +416,70 @@ function bn() {
416
416
  });
417
417
  }
418
418
  }
419
- var Qt = function(e, o, d, y, T, S, w) {
420
- var x = {
419
+ var Qt = function(e, c, d, y, R, L, w) {
420
+ var b = {
421
421
  // This tag allows us to uniquely identify this as a React Element
422
- $$typeof: n,
422
+ $$typeof: t,
423
423
  // Built-in properties that belong on the element
424
424
  type: e,
425
- key: o,
425
+ key: c,
426
426
  ref: d,
427
427
  props: w,
428
428
  // Record the component responsible for creating this element.
429
- _owner: S
429
+ _owner: L
430
430
  };
431
- return x._store = {}, Object.defineProperty(x._store, "validated", {
431
+ return b._store = {}, Object.defineProperty(b._store, "validated", {
432
432
  configurable: !1,
433
433
  enumerable: !1,
434
434
  writable: !0,
435
435
  value: !1
436
- }), Object.defineProperty(x, "_self", {
436
+ }), Object.defineProperty(b, "_self", {
437
437
  configurable: !1,
438
438
  enumerable: !1,
439
439
  writable: !1,
440
440
  value: y
441
- }), Object.defineProperty(x, "_source", {
441
+ }), Object.defineProperty(b, "_source", {
442
442
  configurable: !1,
443
443
  enumerable: !1,
444
444
  writable: !1,
445
- value: T
446
- }), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
445
+ value: R
446
+ }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
447
447
  };
448
- function en(e, o, d, y, T) {
448
+ function en(e, c, d, y, R) {
449
449
  {
450
- var S, w = {}, x = null, N = null;
451
- d !== void 0 && (st(d), x = "" + d), Xt(o) && (st(o.key), x = "" + o.key), Kt(o) && (N = o.ref, zt(o, T));
452
- for (S in o)
453
- Z.call(o, S) && !Gt.hasOwnProperty(S) && (w[S] = o[S]);
450
+ var L, w = {}, b = null, N = null;
451
+ d !== void 0 && (ct(d), b = "" + d), Xt(c) && (ct(c.key), b = "" + c.key), Kt(c) && (N = c.ref, Jt(c, R));
452
+ for (L in c)
453
+ x.call(c, L) && !Gt.hasOwnProperty(L) && (w[L] = c[L]);
454
454
  if (e && e.defaultProps) {
455
- var D = e.defaultProps;
456
- for (S in D)
457
- w[S] === void 0 && (w[S] = D[S]);
455
+ var I = e.defaultProps;
456
+ for (L in I)
457
+ w[L] === void 0 && (w[L] = I[L]);
458
458
  }
459
- if (x || N) {
459
+ if (b || N) {
460
460
  var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
461
- x && Jt(w, P), N && qt(w, P);
461
+ b && qt(w, P), N && zt(w, P);
462
462
  }
463
- return Qt(e, x, N, T, y, ct.current, w);
463
+ return Qt(e, b, N, R, y, ut.current, w);
464
464
  }
465
465
  }
466
- var Ue = $.ReactCurrentOwner, ft = $.ReactDebugCurrentFrame;
467
- function ve(e) {
466
+ var Je = M.ReactCurrentOwner, ht = M.ReactDebugCurrentFrame;
467
+ function _e(e) {
468
468
  if (e) {
469
- var o = e._owner, d = Y(e.type, e._source, o ? o.type : null);
470
- ft.setExtraStackFrame(d);
469
+ var c = e._owner, d = ge(e.type, e._source, c ? c.type : null);
470
+ ht.setExtraStackFrame(d);
471
471
  } else
472
- ft.setExtraStackFrame(null);
472
+ ht.setExtraStackFrame(null);
473
473
  }
474
- var Ze;
475
- Ze = !1;
476
- function Ge(e) {
477
- return typeof e == "object" && e !== null && e.$$typeof === n;
474
+ var qe;
475
+ qe = !1;
476
+ function ze(e) {
477
+ return typeof e == "object" && e !== null && e.$$typeof === t;
478
478
  }
479
- function dt() {
479
+ function pt() {
480
480
  {
481
- if (Ue.current) {
482
- var e = X(Ue.current.type);
481
+ if (Je.current) {
482
+ var e = z(Je.current.type);
483
483
  if (e)
484
484
  return `
485
485
 
@@ -491,212 +491,212 @@ Check the render method of \`` + e + "`.";
491
491
  function tn(e) {
492
492
  return "";
493
493
  }
494
- var ht = {};
494
+ var vt = {};
495
495
  function nn(e) {
496
496
  {
497
- var o = dt();
498
- if (!o) {
497
+ var c = pt();
498
+ if (!c) {
499
499
  var d = typeof e == "string" ? e : e.displayName || e.name;
500
- d && (o = `
500
+ d && (c = `
501
501
 
502
502
  Check the top-level render call using <` + d + ">.");
503
503
  }
504
- return o;
504
+ return c;
505
505
  }
506
506
  }
507
- function pt(e, o) {
507
+ function mt(e, c) {
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 = nn(o);
513
- if (ht[d])
512
+ var d = nn(c);
513
+ if (vt[d])
514
514
  return;
515
- ht[d] = !0;
515
+ vt[d] = !0;
516
516
  var y = "";
517
- e && e._owner && e._owner !== Ue.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);
517
+ e && e._owner && e._owner !== Je.current && (y = " It was passed a child from " + z(e._owner.type) + "."), _e(e), j('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), _e(null);
518
518
  }
519
519
  }
520
- function vt(e, o) {
520
+ function gt(e, c) {
521
521
  {
522
522
  if (typeof e != "object")
523
523
  return;
524
- if (Ee(e))
524
+ if (oe(e))
525
525
  for (var d = 0; d < e.length; d++) {
526
526
  var y = e[d];
527
- Ge(y) && pt(y, o);
527
+ ze(y) && mt(y, c);
528
528
  }
529
- else if (Ge(e))
529
+ else if (ze(e))
530
530
  e._store && (e._store.validated = !0);
531
531
  else if (e) {
532
- var T = B(e);
533
- if (typeof T == "function" && T !== e.entries)
534
- for (var S = T.call(e), w; !(w = S.next()).done; )
535
- Ge(w.value) && pt(w.value, o);
532
+ var R = B(e);
533
+ if (typeof R == "function" && R !== e.entries)
534
+ for (var L = R.call(e), w; !(w = L.next()).done; )
535
+ ze(w.value) && mt(w.value, c);
536
536
  }
537
537
  }
538
538
  }
539
539
  function rn(e) {
540
540
  {
541
- var o = e.type;
542
- if (o == null || typeof o == "string")
541
+ var c = e.type;
542
+ if (c == null || typeof c == "string")
543
543
  return;
544
544
  var d;
545
- if (typeof o == "function")
546
- d = o.propTypes;
547
- else if (typeof o == "object" && (o.$$typeof === u || // Note: Memo only checks outer props here.
545
+ if (typeof c == "function")
546
+ d = c.propTypes;
547
+ else if (typeof c == "object" && (c.$$typeof === f || // Note: Memo only checks outer props here.
548
548
  // Inner props are checked in the reconciler.
549
- o.$$typeof === _))
550
- d = o.propTypes;
549
+ c.$$typeof === g))
550
+ d = c.propTypes;
551
551
  else
552
552
  return;
553
553
  if (d) {
554
- var y = X(o);
555
- pe(d, e.props, "prop", y, e);
556
- } else if (o.PropTypes !== void 0 && !Ze) {
557
- Ze = !0;
558
- var T = X(o);
559
- A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
554
+ var y = z(c);
555
+ ye(d, e.props, "prop", y, e);
556
+ } else if (c.PropTypes !== void 0 && !qe) {
557
+ qe = !0;
558
+ var R = z(c);
559
+ j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
560
560
  }
561
- typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
+ typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
562
562
  }
563
563
  }
564
564
  function an(e) {
565
565
  {
566
- for (var o = Object.keys(e.props), d = 0; d < o.length; d++) {
567
- var y = o[d];
566
+ for (var c = Object.keys(e.props), d = 0; d < c.length; d++) {
567
+ var y = c[d];
568
568
  if (y !== "children" && y !== "key") {
569
- ve(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), ve(null);
569
+ _e(e), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), _e(null);
570
570
  break;
571
571
  }
572
572
  }
573
- e.ref !== null && (ve(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), ve(null));
573
+ e.ref !== null && (_e(e), j("Invalid attribute `ref` supplied to `React.Fragment`."), _e(null));
574
574
  }
575
575
  }
576
- var mt = {};
577
- function gt(e, o, d, y, T, S) {
576
+ var yt = {};
577
+ function Ct(e, c, d, y, R, L) {
578
578
  {
579
- var w = ue(e);
579
+ var w = Z(e);
580
580
  if (!w) {
581
- var x = "";
582
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
581
+ var b = "";
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
583
  var N = tn();
584
- N ? x += N : x += dt();
585
- var D;
586
- e === null ? D = "null" : Ee(e) ? D = "array" : e !== void 0 && e.$$typeof === n ? (D = "<" + (X(e.type) || "Unknown") + " />", x = " 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, x);
584
+ N ? b += N : b += pt();
585
+ var I;
586
+ e === null ? I = "null" : oe(e) ? I = "array" : e !== void 0 && e.$$typeof === t ? (I = "<" + (z(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : I = typeof e, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, b);
587
587
  }
588
- var P = en(e, o, d, T, S);
588
+ var P = en(e, c, d, R, L);
589
589
  if (P == null)
590
590
  return P;
591
591
  if (w) {
592
- var G = o.children;
592
+ var G = c.children;
593
593
  if (G !== void 0)
594
594
  if (y)
595
- if (Ee(G)) {
596
- for (var me = 0; me < G.length; me++)
597
- vt(G[me], e);
595
+ if (oe(G)) {
596
+ for (var xe = 0; xe < G.length; xe++)
597
+ gt(G[xe], e);
598
598
  Object.freeze && Object.freeze(G);
599
599
  } else
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.");
600
+ j("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
- vt(G, e);
602
+ gt(G, e);
603
603
  }
604
- if (Z.call(o, "key")) {
605
- var ce = X(e), U = Object.keys(o).filter(function(fn) {
604
+ if (x.call(c, "key")) {
605
+ var fe = z(e), Y = Object.keys(c).filter(function(fn) {
606
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:
607
+ }), Qe = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
608
+ if (!yt[fe + Qe]) {
609
+ var un = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
610
+ j(`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} />`, Ke, ce, un, ce), mt[ce + Ke] = !0;
615
+ <%s key={someKey} {...props} />`, Qe, fe, un, fe), yt[fe + Qe] = !0;
616
616
  }
617
617
  }
618
618
  return e === i ? an(P) : rn(P), P;
619
619
  }
620
620
  }
621
- function on(e, o, d) {
622
- return gt(e, o, d, !0);
621
+ function on(e, c, d) {
622
+ return Ct(e, c, d, !0);
623
623
  }
624
- function sn(e, o, d) {
625
- return gt(e, o, d, !1);
624
+ function sn(e, c, d) {
625
+ return Ct(e, c, d, !1);
626
626
  }
627
- var cn = sn, ln = on;
628
- Te.Fragment = i, Te.jsx = cn, Te.jsxs = ln;
629
- }()), Te;
627
+ var ln = sn, cn = on;
628
+ Le.Fragment = i, Le.jsx = ln, Le.jsxs = cn;
629
+ }()), Le;
630
630
  }
631
- process.env.NODE_ENV === "production" ? qe.exports = Cn() : qe.exports = bn();
632
- var s = qe.exports;
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();
631
+ process.env.NODE_ENV === "production" ? rt.exports = _n() : rt.exports = xn();
632
+ var o = rt.exports;
633
+ function se(...n) {
634
+ return n.flat().filter(Boolean).map((t) => typeof t == "string" ? t : typeof t == "object" && !Array.isArray(t) && t !== null ? Object.entries(t).filter(([r, i]) => i).map(([r]) => r).join(" ") : "").join(" ").trim();
635
635
  }
636
- function xn(t) {
637
- const n = t || "collapsed", [r, i] = Ne(n);
638
- q(() => {
639
- t !== void 0 && i(t);
640
- }, [t]);
641
- const a = r !== "collapsed" && r !== "compact", c = V(() => {
636
+ function bn(n) {
637
+ const t = n || "collapsed", [r, i] = Ee(t);
638
+ J(() => {
639
+ n !== void 0 && i(n);
640
+ }, [n]);
641
+ const a = r !== "collapsed" && r !== "compact", s = V(() => {
642
642
  i("expanded");
643
- }, []), l = V(() => {
644
- i(n);
645
- }, [n]), h = V(() => {
643
+ }, []), u = V(() => {
644
+ i(t);
645
+ }, [t]), h = V(() => {
646
646
  i(
647
- (u) => u === "collapsed" ? "compact" : "collapsed"
647
+ (f) => f === "collapsed" ? "compact" : "collapsed"
648
648
  );
649
649
  }, []);
650
650
  return {
651
651
  state: r,
652
- initialState: n,
652
+ initialState: t,
653
653
  setState: i,
654
654
  isOpen: a,
655
- open: c,
656
- close: l,
655
+ open: s,
656
+ close: u,
657
657
  toggle: h
658
658
  };
659
659
  }
660
660
  function wn({
661
- value: t,
662
- setValue: n,
661
+ value: n,
662
+ setValue: t,
663
663
  onSubmit: r,
664
664
  isProcessing: i
665
665
  }) {
666
- const a = mn(null), c = Xe(() => {
667
- n(""), a.current && (a.current.style.height = "auto", setTimeout(() => {
668
- var u;
669
- (u = a.current) == null || u.focus();
666
+ const a = mn(null), s = et(() => {
667
+ t(""), a.current && (a.current.style.height = "auto", setTimeout(() => {
668
+ var f;
669
+ (f = a.current) == null || f.focus();
670
670
  }, 100));
671
- }, [n]), l = Xe(() => {
672
- const u = a.current;
673
- if (!u)
671
+ }, [t]), u = et(() => {
672
+ const f = a.current;
673
+ if (!f)
674
674
  return;
675
- u.style.height = "auto";
676
- const f = u.scrollHeight, v = 40, _ = 200;
677
- u.style.height = `${Math.min(
678
- Math.max(f, v),
679
- _
675
+ f.style.height = "auto";
676
+ const p = f.scrollHeight, m = 40, g = 200;
677
+ f.style.height = `${Math.min(
678
+ Math.max(p, m),
679
+ g
680
680
  )}px`;
681
- }, []), h = Xe(
682
- (u) => {
683
- u.key === "Enter" && !u.shiftKey && !i && t.trim() && (u.preventDefault(), r(t.trim()), c());
681
+ }, []), h = et(
682
+ (f) => {
683
+ f.key === "Enter" && !f.shiftKey && !i && n.trim() && (f.preventDefault(), r(n.trim()), s());
684
684
  },
685
- [t, i, r, c]
685
+ [n, i, r, s]
686
686
  );
687
687
  return gn(() => {
688
- l();
689
- }, [t, l]), {
690
- value: t,
691
- setValue: n,
692
- clear: c,
688
+ u();
689
+ }, [n, u]), {
690
+ value: n,
691
+ setValue: t,
692
+ clear: s,
693
693
  textareaRef: a,
694
694
  handleKeyDown: h,
695
- adjustHeight: l
695
+ adjustHeight: u
696
696
  };
697
697
  }
698
- var Qe, Ft, Se, Mt;
699
- Qe = {
698
+ var it, kt, Ie, $t;
699
+ it = {
700
700
  "(": 9,
701
701
  "!": 8,
702
702
  "*": 7,
@@ -715,442 +715,438 @@ Qe = {
715
715
  "?": 1,
716
716
  "?:": 1
717
717
  };
718
- Ft = ["(", "?"];
719
- Se = {
718
+ kt = ["(", "?"];
719
+ Ie = {
720
720
  ")": ["("],
721
721
  ":": ["?", "?:"]
722
722
  };
723
- Mt = /<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;
724
- function En(t) {
725
- for (var n = [], r = [], i, a, c, l; i = t.match(Mt); ) {
726
- for (a = i[0], c = t.substr(0, i.index).trim(), c && n.push(c); l = r.pop(); ) {
727
- if (Se[a]) {
728
- if (Se[a][0] === l) {
729
- a = Se[a][1] || a;
723
+ $t = /<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;
724
+ function En(n) {
725
+ for (var t = [], r = [], i, a, s, u; i = n.match($t); ) {
726
+ for (a = i[0], s = n.substr(0, i.index).trim(), s && t.push(s); u = r.pop(); ) {
727
+ if (Ie[a]) {
728
+ if (Ie[a][0] === u) {
729
+ a = Ie[a][1] || a;
730
730
  break;
731
731
  }
732
- } else if (Ft.indexOf(l) >= 0 || Qe[l] < Qe[a]) {
733
- r.push(l);
732
+ } else if (kt.indexOf(u) >= 0 || it[u] < it[a]) {
733
+ r.push(u);
734
734
  break;
735
735
  }
736
- n.push(l);
736
+ t.push(u);
737
737
  }
738
- Se[a] || r.push(a), t = t.substr(i.index + a.length);
738
+ Ie[a] || r.push(a), n = n.substr(i.index + a.length);
739
739
  }
740
- return t = t.trim(), t && n.push(t), n.concat(r.reverse());
740
+ return n = n.trim(), n && t.push(n), t.concat(r.reverse());
741
741
  }
742
742
  var Rn = {
743
- "!": function(t) {
744
- return !t;
743
+ "!": function(n) {
744
+ return !n;
745
745
  },
746
- "*": function(t, n) {
747
- return t * n;
746
+ "*": function(n, t) {
747
+ return n * t;
748
748
  },
749
- "/": function(t, n) {
750
- return t / n;
749
+ "/": function(n, t) {
750
+ return n / t;
751
751
  },
752
- "%": function(t, n) {
753
- return t % n;
752
+ "%": function(n, t) {
753
+ return n % t;
754
754
  },
755
- "+": function(t, n) {
756
- return t + n;
755
+ "+": function(n, t) {
756
+ return n + t;
757
757
  },
758
- "-": function(t, n) {
759
- return t - n;
758
+ "-": function(n, t) {
759
+ return n - t;
760
760
  },
761
- "<": function(t, n) {
762
- return t < n;
761
+ "<": function(n, t) {
762
+ return n < t;
763
763
  },
764
- "<=": function(t, n) {
765
- return t <= n;
764
+ "<=": function(n, t) {
765
+ return n <= t;
766
766
  },
767
- ">": function(t, n) {
768
- return t > n;
767
+ ">": function(n, t) {
768
+ return n > t;
769
769
  },
770
- ">=": function(t, n) {
771
- return t >= n;
770
+ ">=": function(n, t) {
771
+ return n >= t;
772
772
  },
773
- "==": function(t, n) {
774
- return t === n;
773
+ "==": function(n, t) {
774
+ return n === t;
775
775
  },
776
- "!=": function(t, n) {
777
- return t !== n;
776
+ "!=": function(n, t) {
777
+ return n !== t;
778
778
  },
779
- "&&": function(t, n) {
780
- return t && n;
779
+ "&&": function(n, t) {
780
+ return n && t;
781
781
  },
782
- "||": function(t, n) {
783
- return t || n;
782
+ "||": function(n, t) {
783
+ return n || t;
784
784
  },
785
- "?:": function(t, n, r) {
786
- if (t)
787
- throw n;
785
+ "?:": function(n, t, r) {
786
+ if (n)
787
+ throw t;
788
788
  return r;
789
789
  }
790
790
  };
791
- function Tn(t, n) {
792
- var r = [], i, a, c, l, h, u;
793
- for (i = 0; i < t.length; i++) {
794
- if (h = t[i], l = Rn[h], l) {
795
- for (a = l.length, c = Array(a); a--; )
796
- c[a] = r.pop();
791
+ function Tn(n, t) {
792
+ var r = [], i, a, s, u, h, f;
793
+ for (i = 0; i < n.length; i++) {
794
+ if (h = n[i], u = Rn[h], u) {
795
+ for (a = u.length, s = Array(a); a--; )
796
+ s[a] = r.pop();
797
797
  try {
798
- u = l.apply(null, c);
799
- } catch (f) {
800
- return f;
798
+ f = u.apply(null, s);
799
+ } catch (p) {
800
+ return p;
801
801
  }
802
- } else n.hasOwnProperty(h) ? u = n[h] : u = +h;
803
- r.push(u);
802
+ } else t.hasOwnProperty(h) ? f = t[h] : f = +h;
803
+ r.push(f);
804
804
  }
805
805
  return r[0];
806
806
  }
807
- function jn(t) {
808
- var n = En(t);
807
+ function jn(n) {
808
+ var t = En(n);
809
809
  return function(r) {
810
- return Tn(n, r);
810
+ return Tn(t, r);
811
811
  };
812
812
  }
813
- function Ln(t) {
814
- var n = jn(t);
813
+ function Ln(n) {
814
+ var t = jn(n);
815
815
  return function(r) {
816
- return +n({ n: r });
816
+ return +t({ n: r });
817
817
  };
818
818
  }
819
- var xt = {
819
+ var Et = {
820
820
  contextDelimiter: "",
821
821
  onMissingKey: null
822
822
  };
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)
823
+ function An(n) {
824
+ var t, r, i;
825
+ for (t = n.split(";"), r = 0; r < t.length; r++)
826
+ if (i = t[r].trim(), i.indexOf("plural=") === 0)
827
827
  return i.substr(7);
828
828
  }
829
- function nt(t, n) {
829
+ function ot(n, t) {
830
830
  var r;
831
- this.data = t, this.pluralForms = {}, this.options = {};
832
- for (r in xt)
833
- this.options[r] = n !== void 0 && r in n ? n[r] : xt[r];
831
+ this.data = n, this.pluralForms = {}, this.options = {};
832
+ for (r in Et)
833
+ this.options[r] = t !== void 0 && r in t ? t[r] : Et[r];
834
834
  }
835
- nt.prototype.getPluralForm = function(t, n) {
836
- var r = this.pluralForms[t], i, a, 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
835
+ ot.prototype.getPluralForm = function(n, t) {
836
+ var r = this.pluralForms[n], i, a, s;
837
+ return r || (i = this.data[n][""], s = 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
- i.plural_forms, typeof c != "function" && (a = Sn(
840
+ i.plural_forms, typeof s != "function" && (a = An(
841
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
844
  i.plural_forms
845
- ), c = Ln(a)), r = this.pluralForms[t] = c), r(n);
845
+ ), s = Ln(a)), r = this.pluralForms[n] = s), r(t);
846
846
  };
847
- nt.prototype.dcnpgettext = function(t, n, r, i, a) {
848
- var c, l, h;
849
- return a === void 0 ? c = 0 : c = this.getPluralForm(t, a), 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);
847
+ ot.prototype.dcnpgettext = function(n, t, r, i, a) {
848
+ var s, u, h;
849
+ return a === void 0 ? s = 0 : s = this.getPluralForm(n, a), u = r, t && (u = t + this.options.contextDelimiter + r), h = this.data[n][u], h && h[s] ? h[s] : (this.options.onMissingKey && this.options.onMissingKey(r, n), s === 0 ? r : i);
850
850
  };
851
- const wt = {
851
+ const Rt = {
852
852
  "": {
853
- plural_forms(t) {
854
- return t === 1 ? 0 : 1;
853
+ plural_forms(n) {
854
+ return n === 1 ? 0 : 1;
855
855
  }
856
856
  }
857
- }, An = /^i18n\.(n?gettext|has_translation)(_|$)/, On = (t, n, r) => {
858
- const i = new nt({}), a = /* @__PURE__ */ new Set(), c = () => {
859
- a.forEach((p) => p());
860
- }, l = (p) => (a.add(p), () => a.delete(p)), h = (p = "default") => i.data[p], u = (p, m = "default") => {
861
- var b;
862
- i.data[m] = {
863
- ...i.data[m],
864
- ...p
865
- }, i.data[m][""] = {
866
- ...wt[""],
867
- ...(b = i.data[m]) == null ? void 0 : b[""]
868
- }, delete i.pluralForms[m];
869
- }, f = (p, m) => {
870
- u(p, m), c();
871
- }, v = (p, m = "default") => {
872
- var b;
873
- i.data[m] = {
874
- ...i.data[m],
875
- ...p,
857
+ }, Sn = /^i18n\.(n?gettext|has_translation)(_|$)/, On = (n, t, r) => {
858
+ const i = new ot({}), a = /* @__PURE__ */ new Set(), s = () => {
859
+ a.forEach((l) => l());
860
+ }, u = (l) => (a.add(l), () => a.delete(l)), h = (l = "default") => i.data[l], f = (l, v = "default") => {
861
+ var _;
862
+ i.data[v] = {
863
+ ...i.data[v],
864
+ ...l
865
+ }, i.data[v][""] = {
866
+ ...Rt[""],
867
+ ...(_ = i.data[v]) == null ? void 0 : _[""]
868
+ }, delete i.pluralForms[v];
869
+ }, p = (l, v) => {
870
+ f(l, v), s();
871
+ }, m = (l, v = "default") => {
872
+ var _;
873
+ i.data[v] = {
874
+ ...i.data[v],
875
+ ...l,
876
876
  // Populate default domain configuration (supported locale date which omits
877
877
  // a plural forms expression).
878
878
  "": {
879
- ...wt[""],
880
- ...(b = i.data[m]) == null ? void 0 : b[""],
881
- ...p == null ? void 0 : p[""]
879
+ ...Rt[""],
880
+ ...(_ = i.data[v]) == null ? void 0 : _[""],
881
+ ...l == null ? void 0 : l[""]
882
882
  }
883
- }, delete i.pluralForms[m], c();
884
- }, _ = (p, m) => {
885
- i.data = {}, i.pluralForms = {}, f(p, m);
886
- }, C = (p = "default", m, b, L, O) => (i.data[p] || u(void 0, p), i.dcnpgettext(p, m, b, L, O)), j = (p) => p || "default", I = (p, m) => {
887
- let b = C(m, void 0, p);
888
- return r ? (b = r.applyFilters("i18n.gettext", b, p, m), r.applyFilters("i18n.gettext_" + j(m), b, p, m)) : b;
889
- }, M = (p, m, b) => {
890
- let L = C(b, m, p);
891
- return r ? (L = r.applyFilters("i18n.gettext_with_context", L, p, m, b), r.applyFilters("i18n.gettext_with_context_" + j(b), L, p, m, b)) : L;
892
- }, B = (p, m, b, L) => {
893
- let O = C(L, void 0, p, m, b);
894
- return r ? (O = r.applyFilters("i18n.ngettext", O, p, m, b, L), r.applyFilters("i18n.ngettext_" + j(L), O, p, m, b, L)) : O;
895
- }, $ = (p, m, b, L, O) => {
896
- let R = C(O, L, p, m, b);
897
- return r ? (R = r.applyFilters("i18n.ngettext_with_context", R, p, m, b, L, O), r.applyFilters("i18n.ngettext_with_context_" + j(O), R, p, m, b, L, O)) : R;
898
- }, A = () => M("ltr", "text direction") === "rtl", g = (p, m, b) => {
899
- var R, ue;
900
- const L = m ? m + "" + p : p;
901
- let O = !!((ue = (R = i.data) == null ? void 0 : R[b ?? "default"]) != null && ue[L]);
902
- return r && (O = r.applyFilters("i18n.has_translation", O, p, m, b), O = r.applyFilters("i18n.has_translation_" + j(b), O, p, m, b)), O;
883
+ }, delete i.pluralForms[v], s();
884
+ }, g = (l, v) => {
885
+ i.data = {}, i.pluralForms = {}, p(l, v);
886
+ }, C = (l = "default", v, _, A, O) => (i.data[l] || f(void 0, l), i.dcnpgettext(l, v, _, A, O)), E = (l) => l || "default", D = (l, v) => {
887
+ let _ = C(v, void 0, l);
888
+ return r ? (_ = r.applyFilters("i18n.gettext", _, l, v), r.applyFilters("i18n.gettext_" + E(v), _, l, v)) : _;
889
+ }, H = (l, v, _) => {
890
+ let A = C(_, v, l);
891
+ return r ? (A = r.applyFilters("i18n.gettext_with_context", A, l, v, _), r.applyFilters("i18n.gettext_with_context_" + E(_), A, l, v, _)) : A;
892
+ }, B = (l, v, _, A) => {
893
+ let O = C(A, void 0, l, v, _);
894
+ return r ? (O = r.applyFilters("i18n.ngettext", O, l, v, _, A), r.applyFilters("i18n.ngettext_" + E(A), O, l, v, _, A)) : O;
895
+ }, M = (l, v, _, A, O) => {
896
+ let T = C(O, A, l, v, _);
897
+ return r ? (T = r.applyFilters("i18n.ngettext_with_context", T, l, v, _, A, O), r.applyFilters("i18n.ngettext_with_context_" + E(O), T, l, v, _, A, O)) : T;
898
+ }, j = () => H("ltr", "text direction") === "rtl", K = (l, v, _) => {
899
+ var T, Z;
900
+ const A = v ? v + "" + l : l;
901
+ let O = !!((Z = (T = i.data) == null ? void 0 : T[_ ?? "default"]) != null && Z[A]);
902
+ return r && (O = r.applyFilters("i18n.has_translation", O, l, v, _), O = r.applyFilters("i18n.has_translation_" + E(_), O, l, v, _)), O;
903
903
  };
904
904
  if (r) {
905
- const p = (m) => {
906
- An.test(m) && c();
905
+ const l = (v) => {
906
+ Sn.test(v) && s();
907
907
  };
908
- r.addAction("hookAdded", "core/i18n", p), r.addAction("hookRemoved", "core/i18n", p);
908
+ r.addAction("hookAdded", "core/i18n", l), r.addAction("hookRemoved", "core/i18n", l);
909
909
  }
910
910
  return {
911
911
  getLocaleData: h,
912
- setLocaleData: f,
913
- addLocaleData: v,
914
- resetLocaleData: _,
915
- subscribe: l,
916
- __: I,
917
- _x: M,
912
+ setLocaleData: p,
913
+ addLocaleData: m,
914
+ resetLocaleData: g,
915
+ subscribe: u,
916
+ __: D,
917
+ _x: H,
918
918
  _n: B,
919
- _nx: $,
920
- isRTL: A,
921
- hasTranslation: g
919
+ _nx: M,
920
+ isRTL: j,
921
+ hasTranslation: K
922
922
  };
923
923
  };
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);
924
+ function Ht(n) {
925
+ return typeof n != "string" || n === "" ? (console.error("The namespace must be a non-empty string."), !1) : /^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(n) ? !0 : (console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."), !1);
926
926
  }
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);
927
+ function st(n) {
928
+ return typeof n != "string" || n === "" ? (console.error("The hook name must be a non-empty string."), !1) : /^__/.test(n) ? (console.error("The hook name cannot begin with `__`."), !1) : /^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(n) ? !0 : (console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."), !1);
929
929
  }
930
- function Et(t, n) {
931
- return function(i, a, c, l = 10) {
932
- const h = t[n];
933
- if (!rt(i) || !kt(a))
930
+ function Tt(n, t) {
931
+ return function(i, a, s, u = 10) {
932
+ const h = n[t];
933
+ if (!st(i) || !Ht(a))
934
934
  return;
935
- if (typeof c != "function") {
935
+ if (typeof s != "function") {
936
936
  console.error("The hook callback must be a function.");
937
937
  return;
938
938
  }
939
- if (typeof l != "number") {
939
+ if (typeof u != "number") {
940
940
  console.error("If specified, the hook priority must be a number.");
941
941
  return;
942
942
  }
943
- const u = {
944
- callback: c,
945
- priority: l,
943
+ const f = {
944
+ callback: s,
945
+ priority: u,
946
946
  namespace: a
947
947
  };
948
948
  if (h[i]) {
949
- const f = h[i].handlers;
950
- let v;
951
- for (v = f.length; v > 0 && !(l >= f[v - 1].priority); v--)
949
+ const p = h[i].handlers;
950
+ let m;
951
+ for (m = p.length; m > 0 && !(u >= p[m - 1].priority); m--)
952
952
  ;
953
- v === f.length ? f[v] = u : f.splice(v, 0, u), h.__current.forEach((_) => {
954
- _.name === i && _.currentIndex >= v && _.currentIndex++;
953
+ m === p.length ? p[m] = f : p.splice(m, 0, f), h.__current.forEach((g) => {
954
+ g.name === i && g.currentIndex >= m && g.currentIndex++;
955
955
  });
956
956
  } else
957
957
  h[i] = {
958
- handlers: [u],
958
+ handlers: [f],
959
959
  runs: 0
960
960
  };
961
- i !== "hookAdded" && t.doAction("hookAdded", i, a, c, l);
961
+ i !== "hookAdded" && n.doAction("hookAdded", i, a, s, u);
962
962
  };
963
963
  }
964
- function Me(t, n, r = !1) {
965
- return function(a, c) {
966
- const l = t[n];
967
- if (!rt(a) || !r && !kt(c))
964
+ function Ve(n, t, r = !1) {
965
+ return function(a, s) {
966
+ const u = n[t];
967
+ if (!st(a) || !r && !Ht(s))
968
968
  return;
969
- if (!l[a])
969
+ if (!u[a])
970
970
  return 0;
971
971
  let h = 0;
972
972
  if (r)
973
- h = l[a].handlers.length, l[a] = {
974
- runs: l[a].runs,
973
+ h = u[a].handlers.length, u[a] = {
974
+ runs: u[a].runs,
975
975
  handlers: []
976
976
  };
977
977
  else {
978
- const u = l[a].handlers;
979
- for (let f = u.length - 1; f >= 0; f--)
980
- u[f].namespace === c && (u.splice(f, 1), h++, l.__current.forEach((v) => {
981
- v.name === a && v.currentIndex >= f && v.currentIndex--;
978
+ const f = u[a].handlers;
979
+ for (let p = f.length - 1; p >= 0; p--)
980
+ f[p].namespace === s && (f.splice(p, 1), h++, u.__current.forEach((m) => {
981
+ m.name === a && m.currentIndex >= p && m.currentIndex--;
982
982
  }));
983
983
  }
984
- return a !== "hookRemoved" && t.doAction("hookRemoved", a, c), h;
984
+ return a !== "hookRemoved" && n.doAction("hookRemoved", a, s), h;
985
985
  };
986
986
  }
987
- function Rt(t, n) {
987
+ function jt(n, t) {
988
988
  return function(i, a) {
989
- const c = t[n];
990
- return typeof a < "u" ? i in c && c[i].handlers.some((l) => l.namespace === a) : i in c;
989
+ const s = n[t];
990
+ return typeof a < "u" ? i in s && s[i].handlers.some((u) => u.namespace === a) : i in s;
991
991
  };
992
992
  }
993
- function ke(t, n, r, i) {
994
- return function(c, ...l) {
995
- const h = t[n];
996
- h[c] || (h[c] = {
993
+ function We(n, t, r, i) {
994
+ return function(s, ...u) {
995
+ const h = n[t];
996
+ h[s] || (h[s] = {
997
997
  handlers: [],
998
998
  runs: 0
999
- }), h[c].runs++;
1000
- const u = h[c].handlers;
1001
- if (process.env.NODE_ENV !== "production" && c !== "hookAdded" && h.all && u.push(...h.all.handlers), !u || !u.length)
1002
- return r ? l[0] : void 0;
1003
- const f = {
1004
- name: c,
999
+ }), h[s].runs++;
1000
+ const f = h[s].handlers;
1001
+ if (process.env.NODE_ENV !== "production" && s !== "hookAdded" && h.all && f.push(...h.all.handlers), !f || !f.length)
1002
+ return r ? u[0] : void 0;
1003
+ const p = {
1004
+ name: s,
1005
1005
  currentIndex: 0
1006
1006
  };
1007
- async function v() {
1007
+ async function m() {
1008
1008
  try {
1009
- h.__current.add(f);
1010
- let C = r ? l[0] : void 0;
1011
- for (; f.currentIndex < u.length; )
1012
- C = await u[f.currentIndex].callback.apply(null, l), r && (l[0] = C), f.currentIndex++;
1009
+ h.__current.add(p);
1010
+ let C = r ? u[0] : void 0;
1011
+ for (; p.currentIndex < f.length; )
1012
+ C = await f[p.currentIndex].callback.apply(null, u), r && (u[0] = C), p.currentIndex++;
1013
1013
  return r ? C : void 0;
1014
1014
  } finally {
1015
- h.__current.delete(f);
1015
+ h.__current.delete(p);
1016
1016
  }
1017
1017
  }
1018
- function _() {
1018
+ function g() {
1019
1019
  try {
1020
- h.__current.add(f);
1021
- let C = r ? l[0] : void 0;
1022
- for (; f.currentIndex < u.length; )
1023
- C = u[f.currentIndex].callback.apply(null, l), r && (l[0] = C), f.currentIndex++;
1020
+ h.__current.add(p);
1021
+ let C = r ? u[0] : void 0;
1022
+ for (; p.currentIndex < f.length; )
1023
+ C = f[p.currentIndex].callback.apply(null, u), r && (u[0] = C), p.currentIndex++;
1024
1024
  return r ? C : void 0;
1025
1025
  } finally {
1026
- h.__current.delete(f);
1026
+ h.__current.delete(p);
1027
1027
  }
1028
1028
  }
1029
- return (i ? v : _)();
1029
+ return (i ? m : g)();
1030
1030
  };
1031
1031
  }
1032
- function Tt(t, n) {
1032
+ function Lt(n, t) {
1033
1033
  return function() {
1034
- var l;
1034
+ var u;
1035
1035
  var i;
1036
- const a = t[n];
1037
- return (i = (l = Array.from(a.__current).at(-1)) == null ? void 0 : l.name) !== null && i !== void 0 ? i : null;
1036
+ const a = n[t];
1037
+ return (i = (u = Array.from(a.__current).at(-1)) == null ? void 0 : u.name) !== null && i !== void 0 ? i : null;
1038
1038
  };
1039
1039
  }
1040
- function jt(t, n) {
1040
+ function At(n, t) {
1041
1041
  return function(i) {
1042
- const a = t[n];
1043
- return typeof i > "u" ? a.__current.size > 0 : Array.from(a.__current).some((c) => c.name === i);
1042
+ const a = n[t];
1043
+ return typeof i > "u" ? a.__current.size > 0 : Array.from(a.__current).some((s) => s.name === i);
1044
1044
  };
1045
1045
  }
1046
- function Lt(t, n) {
1046
+ function St(n, t) {
1047
1047
  return function(i) {
1048
- const a = t[n];
1049
- if (rt(i))
1048
+ const a = n[t];
1049
+ if (st(i))
1050
1050
  return a[i] && a[i].runs ? a[i].runs : 0;
1051
1051
  };
1052
1052
  }
1053
- class Dn {
1053
+ class In {
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 = 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");
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 = Tt(this, "actions"), this.addFilter = Tt(this, "filters"), this.removeAction = Ve(this, "actions"), this.removeFilter = Ve(this, "filters"), this.hasAction = jt(this, "actions"), this.hasFilter = jt(this, "filters"), this.removeAllActions = Ve(this, "actions", !0), this.removeAllFilters = Ve(this, "filters", !0), this.doAction = We(this, "actions", !1, !1), this.doActionAsync = We(this, "actions", !1, !0), this.applyFilters = We(this, "filters", !0, !1), this.applyFiltersAsync = We(this, "filters", !0, !0), this.currentAction = Lt(this, "actions"), this.currentFilter = Lt(this, "filters"), this.doingAction = At(this, "actions"), this.doingFilter = At(this, "filters"), this.didAction = St(this, "actions"), this.didFilter = St(this, "filters");
1056
1056
  }
1057
1057
  }
1058
- function In() {
1059
- return new Dn();
1058
+ function Dn() {
1059
+ return new In();
1060
1060
  }
1061
- const $t = In(), {
1062
- addAction: Ur,
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: ai,
1077
- doingFilter: oi,
1078
- didAction: si,
1079
- didFilter: ci,
1080
- actions: li,
1081
- filters: ui
1082
- } = $t, F = On(void 0, void 0, $t);
1061
+ const Nt = Dn(), {
1062
+ addAction: Kr,
1063
+ addFilter: Xr,
1064
+ removeAction: Jr,
1065
+ removeFilter: qr,
1066
+ hasAction: zr,
1067
+ hasFilter: Qr,
1068
+ removeAllActions: ei,
1069
+ removeAllFilters: ti,
1070
+ doAction: ni,
1071
+ doActionAsync: ri,
1072
+ applyFilters: ii,
1073
+ applyFiltersAsync: ai,
1074
+ currentAction: oi,
1075
+ currentFilter: si,
1076
+ doingAction: li,
1077
+ doingFilter: ci,
1078
+ didAction: ui,
1079
+ didFilter: fi,
1080
+ actions: di,
1081
+ filters: hi
1082
+ } = Nt, F = On(void 0, void 0, Nt);
1083
1083
  F.getLocaleData.bind(F);
1084
1084
  F.setLocaleData.bind(F);
1085
1085
  F.resetLocaleData.bind(F);
1086
1086
  F.subscribe.bind(F);
1087
- const _e = F.__.bind(F);
1087
+ const Re = F.__.bind(F);
1088
1088
  F._x.bind(F);
1089
1089
  F._n.bind(F);
1090
1090
  F._nx.bind(F);
1091
1091
  F.isRTL.bind(F);
1092
1092
  F.hasTranslation.bind(F);
1093
- const Ht = _e("Ask anything", "a8c-agenttic"), et = {
1093
+ const Vt = Re("Ask anything", "a8c-agenttic"), at = {
1094
1094
  type: "spring",
1095
1095
  stiffness: 300,
1096
1096
  damping: 30
1097
- }, Pn = {
1098
- type: "spring",
1099
- stiffness: 400,
1100
- damping: 35
1101
- }, it = {
1097
+ }, De = {
1102
1098
  type: "spring",
1103
1099
  damping: 40,
1104
1100
  stiffness: 500,
1105
1101
  mass: 0.8
1106
- }, Ve = {
1107
- ...it,
1102
+ }, Ye = {
1103
+ ...De,
1108
1104
  stiffness: 1e3,
1109
1105
  damping: 90
1110
- }, at = {
1106
+ }, lt = {
1111
1107
  type: "spring",
1112
1108
  damping: 40,
1113
- stiffness: 400,
1109
+ stiffness: 500,
1114
1110
  mass: 0.8
1115
- }, Nt = {
1111
+ }, Wt = {
1116
1112
  hidden: {
1117
1113
  opacity: 0
1118
1114
  },
1119
1115
  visible: {
1120
1116
  opacity: 1,
1121
- transition: et
1117
+ transition: at
1122
1118
  },
1123
1119
  exit: {
1124
1120
  opacity: 0,
1125
- transition: { ...et, duration: 0.1 }
1121
+ transition: { ...at, duration: 0.1 }
1126
1122
  }
1127
- }, Fn = () => {
1123
+ }, Pn = () => {
1128
1124
  if (typeof window > "u")
1129
1125
  return { left: 0, right: 0, top: 0, bottom: 0 };
1130
- const t = 20;
1126
+ const n = 20;
1131
1127
  return {
1132
- left: t,
1133
- right: window.innerWidth - 400 - t,
1128
+ left: n,
1129
+ right: window.innerWidth - 400 - n,
1134
1130
  // Assuming max width of 400px
1135
- top: t,
1136
- bottom: window.innerHeight - 60 - t
1131
+ top: n,
1132
+ bottom: window.innerHeight - 60 - n
1137
1133
  // Assuming collapsed height of 60px
1138
1134
  };
1139
- }, Mn = {
1135
+ }, Fn = {
1140
1136
  "0%": { backgroundPosition: "-200% 0" },
1141
1137
  "100%": { backgroundPosition: "200% 0" }
1142
- }, fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1138
+ }, pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1143
1139
  __proto__: null,
1144
- fadeVariants: Nt,
1145
- fastSpring: it,
1146
- fastSpringWithDelay: Ve,
1147
- getDragConstraints: Fn,
1148
- layoutTransition: Pn,
1149
- morphSpring: at,
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", Bn = "button-module_sm", Yn = "button-module_withTextAndIcon", $e = {
1153
- button: kn,
1140
+ fadeVariants: Wt,
1141
+ fastSpring: De,
1142
+ fastSpringWithDelay: Ye,
1143
+ getDragConstraints: Pn,
1144
+ morphSpring: lt,
1145
+ springConfig: at,
1146
+ thinkingGradientKeyframes: Fn
1147
+ }, Symbol.toStringTag, { value: "Module" })), Mn = "button-module_button", kn = "button-module_pressed", $n = "button-module_primary", Hn = "button-module_ghost", Nn = "button-module_outline", Vn = "button-module_link", Wn = "button-module_icon", Bn = "button-module_sm", Yn = "button-module_withTextAndIcon", Ae = {
1148
+ button: Mn,
1149
+ pressed: kn,
1154
1150
  primary: $n,
1155
1151
  ghost: Hn,
1156
1152
  outline: Nn,
@@ -1158,50 +1154,53 @@ const Ht = _e("Ask anything", "a8c-agenttic"), et = {
1158
1154
  icon: Wn,
1159
1155
  sm: Bn,
1160
1156
  withTextAndIcon: Yn
1161
- }, Q = Pt.forwardRef(
1157
+ }, ee = Mt.forwardRef(
1162
1158
  function({
1163
- className: n,
1159
+ className: t,
1164
1160
  variant: r = "primary",
1165
1161
  size: i,
1166
1162
  icon: a,
1167
- children: c,
1168
- asChild: l = !1,
1169
- ...h
1170
- }, u) {
1171
- const f = l ? yn : "button", v = !!a, _ = i || (v && !c ? "icon" : void 0);
1172
- return /* @__PURE__ */ s.jsxs(
1173
- f,
1163
+ children: s,
1164
+ asChild: u = !1,
1165
+ pressed: h = !1,
1166
+ ...f
1167
+ }, p) {
1168
+ const m = u ? yn : "button", g = !!a, C = i || (g && !s ? "icon" : void 0);
1169
+ return /* @__PURE__ */ o.jsxs(
1170
+ m,
1174
1171
  {
1175
- ref: u,
1172
+ ref: p,
1176
1173
  "data-slot": "button",
1177
- className: le(
1178
- $e.button,
1179
- $e[r],
1180
- _ && $e[_],
1181
- v && c ? $e.withTextAndIcon : void 0,
1182
- n
1174
+ className: se(
1175
+ Ae.button,
1176
+ Ae[r],
1177
+ C && Ae[C],
1178
+ g && s ? Ae.withTextAndIcon : void 0,
1179
+ h ? Ae.pressed : void 0,
1180
+ t
1183
1181
  ),
1184
- ...h,
1182
+ "aria-pressed": h,
1183
+ ...f,
1185
1184
  children: [
1186
1185
  a,
1187
- c
1186
+ s
1188
1187
  ]
1189
1188
  }
1190
1189
  );
1191
1190
  }
1192
1191
  );
1193
- Q.displayName = "Button";
1194
- function Vt({ className: t, size: n = 24 }) {
1195
- return /* @__PURE__ */ s.jsx(
1192
+ ee.displayName = "Button";
1193
+ function Bt({ className: n, size: t = 24 }) {
1194
+ return /* @__PURE__ */ o.jsx(
1196
1195
  "svg",
1197
1196
  {
1198
- className: t,
1199
- width: n,
1200
- height: n,
1197
+ className: n,
1198
+ width: t,
1199
+ height: t,
1201
1200
  viewBox: "0 0 24 24",
1202
1201
  fill: "none",
1203
1202
  xmlns: "http://www.w3.org/2000/svg",
1204
- children: /* @__PURE__ */ s.jsx(
1203
+ children: /* @__PURE__ */ o.jsx(
1205
1204
  "path",
1206
1205
  {
1207
1206
  d: "M19.6611 11.5224L16.3782 10.39C15.0799 9.94387 14.0561 8.92011 13.61 7.62181L12.4775 4.33887C12.3231 3.88704 11.6769 3.88704 11.5225 4.33887L10.39 7.62181C9.94388 8.92011 8.9201 9.94387 7.6218 10.39L4.33887 11.5224C3.88704 11.6768 3.88704 12.3231 4.33887 12.4776L7.6218 13.61C8.9201 14.0561 9.94388 15.0799 10.39 16.3782L11.5225 19.6611C11.6769 20.113 12.3231 20.113 12.4775 19.6611L13.61 16.3782C14.0561 15.0799 15.0799 14.0561 16.3782 13.61L19.6611 12.4776C20.113 12.3231 20.113 11.6768 19.6611 11.5224ZM15.8291 12.2431L14.1876 12.8093C13.5356 13.0323 13.0266 13.5471 12.8036 14.1934L12.2374 15.8348C12.1572 16.0636 11.837 16.0636 11.7569 15.8348L11.1907 14.1934C10.9677 13.5414 10.4529 13.0323 9.80662 12.8093L8.16515 12.2431C7.93637 12.163 7.93637 11.8427 8.16515 11.7626L9.80662 11.1964C10.4586 10.9734 10.9677 10.4586 11.1907 9.81233L11.7569 8.17087C11.837 7.94209 12.1572 7.94209 12.2374 8.17087L12.8036 9.81233C13.0266 10.4643 13.5414 10.9734 14.1876 11.1964L15.8291 11.7626C16.0579 11.8427 16.0579 12.163 15.8291 12.2431Z",
@@ -1211,20 +1210,20 @@ function Vt({ className: t, size: n = 24 }) {
1211
1210
  }
1212
1211
  );
1213
1212
  }
1214
- const Un = "CollapsedView-module_button", Zn = {
1215
- button: Un
1213
+ const Zn = "CollapsedView-module_button", Un = {
1214
+ button: Zn
1216
1215
  };
1217
1216
  function Gn({
1218
- icon: t = /* @__PURE__ */ s.jsx(Vt, { size: 36 }),
1219
- onClick: n,
1217
+ icon: n = /* @__PURE__ */ o.jsx(Bt, { size: 36 }),
1218
+ onClick: t,
1220
1219
  onHover: r,
1221
1220
  focusOnMount: i = !1
1222
1221
  }) {
1223
- const a = W(null), c = W(i);
1224
- return q(() => {
1225
- c.current && a.current && a.current.focus(), c.current = !1;
1226
- }, [c, a]), /* @__PURE__ */ s.jsx(
1227
- ae.div,
1222
+ const a = W(null), s = W(i);
1223
+ return J(() => {
1224
+ s.current && a.current && a.current.focus(), s.current = !1;
1225
+ }, [s, a]), /* @__PURE__ */ o.jsx(
1226
+ q.div,
1228
1227
  {
1229
1228
  "data-slot": "collapsed-view",
1230
1229
  layout: "preserve-aspect",
@@ -1237,7 +1236,7 @@ function Gn({
1237
1236
  opacity: 1,
1238
1237
  scale: 1,
1239
1238
  transition: {
1240
- ...at,
1239
+ ...lt,
1241
1240
  delay: 0.2
1242
1241
  }
1243
1242
  },
@@ -1248,16 +1247,16 @@ function Gn({
1248
1247
  duration: 0.15
1249
1248
  }
1250
1249
  },
1251
- children: /* @__PURE__ */ s.jsx(
1252
- Q,
1250
+ children: /* @__PURE__ */ o.jsx(
1251
+ ee,
1253
1252
  {
1254
1253
  ref: a,
1255
- onClick: n,
1254
+ onClick: t,
1256
1255
  onMouseEnter: r,
1257
1256
  variant: "link",
1258
- className: Zn.button,
1259
- icon: t,
1260
- "aria-label": _e("Open chat", "a8c-agenttic")
1257
+ className: Un.button,
1258
+ icon: n,
1259
+ "aria-label": Re("Open chat", "a8c-agenttic")
1261
1260
  }
1262
1261
  )
1263
1262
  }
@@ -1265,29 +1264,29 @@ function Gn({
1265
1264
  }
1266
1265
  const Kn = "Textarea-module_textarea", Xn = {
1267
1266
  textarea: Kn
1268
- }, Wt = Pt.forwardRef(
1269
- ({ className: t, ...n }, r) => /* @__PURE__ */ s.jsx(
1267
+ }, Yt = Mt.forwardRef(
1268
+ ({ className: n, ...t }, r) => /* @__PURE__ */ o.jsx(
1270
1269
  "textarea",
1271
1270
  {
1272
1271
  "data-slot": "textarea",
1273
1272
  className: Xn.textarea,
1274
1273
  ref: r,
1275
- ...n
1274
+ ...t
1276
1275
  }
1277
1276
  )
1278
1277
  );
1279
- Wt.displayName = "Textarea";
1280
- function zn({ className: t, size: n = 24 }) {
1281
- return /* @__PURE__ */ s.jsx(
1278
+ Yt.displayName = "Textarea";
1279
+ function Jn({ className: n, size: t = 24 }) {
1280
+ return /* @__PURE__ */ o.jsx(
1282
1281
  "svg",
1283
1282
  {
1284
- width: n,
1285
- height: n,
1283
+ width: t,
1284
+ height: t,
1286
1285
  viewBox: "0 0 24 24",
1287
1286
  fill: "none",
1288
1287
  xmlns: "http://www.w3.org/2000/svg",
1289
- className: t,
1290
- children: /* @__PURE__ */ s.jsx(
1288
+ className: n,
1289
+ children: /* @__PURE__ */ o.jsx(
1291
1290
  "path",
1292
1291
  {
1293
1292
  d: "M12.2197 5C12.4186 5 12.6094 5.07902 12.75 5.21967L17 9.46967C17.2929 9.76256 17.2929 10.2374 17 10.5303C16.7071 10.8232 16.2322 10.8232 15.9393 10.5303L12.9697 7.56067V18.25C12.9697 18.6642 12.6339 19 12.2197 19C11.8055 19 11.4697 18.6642 11.4697 18.25V7.56065L8.5 10.5303C8.2071 10.8232 7.73223 10.8232 7.43934 10.5303C7.14644 10.2374 7.14645 9.76256 7.43934 9.46967L11.6894 5.21967C11.83 5.07902 12.0208 5 12.2197 5Z",
@@ -1297,17 +1296,17 @@ function zn({ className: t, size: n = 24 }) {
1297
1296
  }
1298
1297
  );
1299
1298
  }
1300
- function Jn({ className: t, size: n = 24 }) {
1301
- return /* @__PURE__ */ s.jsx(
1299
+ function qn({ className: n, size: t = 24 }) {
1300
+ return /* @__PURE__ */ o.jsx(
1302
1301
  "svg",
1303
1302
  {
1304
- width: n,
1305
- height: n,
1303
+ width: t,
1304
+ height: t,
1306
1305
  viewBox: "0 0 24 24",
1307
1306
  fill: "none",
1308
1307
  xmlns: "http://www.w3.org/2000/svg",
1309
- className: t,
1310
- children: /* @__PURE__ */ s.jsx(
1308
+ className: n,
1309
+ children: /* @__PURE__ */ o.jsx(
1311
1310
  "rect",
1312
1311
  {
1313
1312
  x: "7",
@@ -1321,23 +1320,23 @@ function Jn({ className: t, size: n = 24 }) {
1321
1320
  }
1322
1321
  );
1323
1322
  }
1324
- const qn = "ChatInput-module_container", Qn = "ChatInput-module_textareaContainer", er = "ChatInput-module_actions", tr = "ChatInput-module_button", ge = {
1325
- container: qn,
1323
+ const zn = "ChatInput-module_container", Qn = "ChatInput-module_textareaContainer", er = "ChatInput-module_actions", tr = "ChatInput-module_button", be = {
1324
+ container: zn,
1326
1325
  textareaContainer: Qn,
1327
1326
  actions: er,
1328
1327
  button: tr
1329
1328
  };
1330
- function nr({ className: t, size: n = 24 }) {
1331
- return /* @__PURE__ */ s.jsx(
1329
+ function nr({ className: n, size: t = 24 }) {
1330
+ return /* @__PURE__ */ o.jsx(
1332
1331
  "svg",
1333
1332
  {
1334
- className: t,
1335
- width: n,
1336
- height: n,
1333
+ className: n,
1334
+ width: t,
1335
+ height: t,
1337
1336
  viewBox: "0 0 24 24",
1338
1337
  fill: "none",
1339
1338
  xmlns: "http://www.w3.org/2000/svg",
1340
- children: /* @__PURE__ */ s.jsx(
1339
+ children: /* @__PURE__ */ o.jsx(
1341
1340
  "path",
1342
1341
  {
1343
1342
  fillRule: "evenodd",
@@ -1349,153 +1348,207 @@ function nr({ className: t, size: n = 24 }) {
1349
1348
  }
1350
1349
  );
1351
1350
  }
1352
- function Bt({
1353
- value: t,
1354
- onChange: n,
1351
+ const rr = "AnimatedPlaceholder-module_container", ir = {
1352
+ container: rr
1353
+ };
1354
+ function ar({
1355
+ texts: n,
1356
+ interval: t = 3e3,
1357
+ className: r = ""
1358
+ }) {
1359
+ const [i, a] = Ee(0);
1360
+ return J(() => {
1361
+ const s = setInterval(() => {
1362
+ a(
1363
+ (u) => (u + 1) % n.length
1364
+ );
1365
+ }, t);
1366
+ return () => clearInterval(s);
1367
+ }, [n.length, t]), /* @__PURE__ */ o.jsx(Ue, { mode: "wait", children: /* @__PURE__ */ o.jsx(
1368
+ q.span,
1369
+ {
1370
+ "data-slot": "animated-placeholder",
1371
+ className: se(ir.container, r),
1372
+ initial: { opacity: 0, y: 8 },
1373
+ animate: { opacity: 1, y: 0 },
1374
+ exit: { opacity: 0, y: -8 },
1375
+ transition: {
1376
+ duration: 0.3,
1377
+ ease: [0.4, 0, 0.2, 1]
1378
+ // Matches --transition-colors cubic-bezier
1379
+ },
1380
+ children: n[i]
1381
+ },
1382
+ i
1383
+ ) });
1384
+ }
1385
+ function Zt({
1386
+ value: n,
1387
+ onChange: t,
1355
1388
  onSubmit: r,
1356
1389
  onKeyDown: i,
1357
1390
  textareaRef: a,
1358
- placeholder: c = Ht,
1359
- isProcessing: l,
1391
+ placeholder: s = Vt,
1392
+ isProcessing: u,
1360
1393
  onBlur: h,
1361
- fromCompact: u = !1,
1362
- onExpand: f,
1363
- showExpandButton: v = !0,
1364
- focusOnMount: _ = !1,
1394
+ fromCompact: f = !1,
1395
+ onExpand: p,
1396
+ showExpandButton: m = !0,
1397
+ focusOnMount: g = !1,
1365
1398
  customActions: C = [],
1366
- actionOrder: j = "before-submit"
1399
+ actionOrder: E = "before-submit",
1400
+ onStop: D,
1401
+ disabled: H = !1
1367
1402
  }) {
1368
- const I = dn(), M = t.trim() || l, B = c.endsWith("…") ? c : `${c}…`, $ = W(_);
1369
- q(() => {
1370
- $.current && a.current && a.current.focus(), $.current = !1;
1371
- }, [$, a]);
1372
- const A = () => C.map((m) => /* @__PURE__ */ s.jsx(
1373
- Q,
1403
+ const B = dn(), M = (n.trim() || u) && !H, j = (T) => T.endsWith("…") ? T : `${T}…`, K = Array.isArray(s);
1404
+ let l;
1405
+ K ? l = s.map(j) : s ? l = j(s) : l = "";
1406
+ const v = W(g);
1407
+ J(() => {
1408
+ v.current && a.current && a.current.focus(), v.current = !1;
1409
+ }, [v, a]);
1410
+ const _ = () => C.map((T) => /* @__PURE__ */ o.jsx(
1411
+ ee,
1374
1412
  {
1375
- className: m.className || ge.button,
1376
- onClick: m.onClick,
1377
- disabled: m.disabled,
1378
- variant: m.variant || "ghost",
1379
- icon: m.icon,
1380
- "aria-label": m["aria-label"]
1413
+ className: T.className || be.button,
1414
+ onClick: T.onClick,
1415
+ disabled: T.disabled,
1416
+ variant: T.variant || "ghost",
1417
+ icon: T.icon,
1418
+ "aria-label": T["aria-label"]
1381
1419
  },
1382
- m.id
1383
- )), g = () => v && f ? /* @__PURE__ */ s.jsx(
1384
- Q,
1420
+ T.id
1421
+ )), A = () => m && p ? /* @__PURE__ */ o.jsx(
1422
+ ee,
1385
1423
  {
1386
- className: ge.button,
1387
- onClick: f,
1424
+ className: be.button,
1425
+ onClick: p,
1388
1426
  variant: "ghost",
1389
- icon: /* @__PURE__ */ s.jsx(nr, {}),
1390
- "aria-label": _e("Expand conversation", "a8c-agenttic")
1427
+ icon: /* @__PURE__ */ o.jsx(nr, {}),
1428
+ "aria-label": Re("Expand conversation", "a8c-agenttic")
1391
1429
  }
1392
- ) : null, p = () => /* @__PURE__ */ s.jsx(
1393
- Q,
1394
- {
1395
- className: ge.button,
1396
- onClick: r,
1397
- disabled: !M,
1398
- variant: "primary",
1399
- icon: l ? /* @__PURE__ */ s.jsx(Jn, {}) : /* @__PURE__ */ s.jsx(zn, {}),
1400
- "aria-label": _e(l ? "Stop processing" : "Send message", "a8c-agenttic")
1401
- }
1402
- );
1403
- return /* @__PURE__ */ s.jsxs("div", { "data-slot": "chat-input", className: ge.container, children: [
1404
- /* @__PURE__ */ s.jsx(
1405
- ae.div,
1430
+ ) : null, O = () => {
1431
+ const T = () => {
1432
+ u && D ? D() : r();
1433
+ };
1434
+ return /* @__PURE__ */ o.jsx(
1435
+ ee,
1406
1436
  {
1407
- className: ge.textareaContainer,
1437
+ className: be.button,
1438
+ onClick: T,
1439
+ disabled: !M,
1440
+ variant: "primary",
1441
+ icon: u ? /* @__PURE__ */ o.jsx(qn, {}) : /* @__PURE__ */ o.jsx(Jn, {}),
1442
+ "aria-label": Re(u ? "Stop processing" : "Send message", "a8c-agenttic")
1443
+ }
1444
+ );
1445
+ };
1446
+ return /* @__PURE__ */ o.jsxs("div", { "data-slot": "chat-input", className: be.container, children: [
1447
+ /* @__PURE__ */ o.jsxs(
1448
+ q.div,
1449
+ {
1450
+ className: be.textareaContainer,
1408
1451
  initial: {
1409
1452
  opacity: 0
1410
1453
  },
1411
1454
  animate: {
1412
1455
  opacity: 1,
1413
1456
  scale: 1,
1414
- transition: t.trim() ? { duration: 0 } : Ve
1457
+ transition: n.trim() ? { duration: 0 } : Ye
1415
1458
  },
1416
- children: /* @__PURE__ */ s.jsx(
1417
- Wt,
1418
- {
1419
- id: I,
1420
- ref: a,
1421
- value: t,
1422
- onChange: (m) => n(m.target.value),
1423
- onKeyDown: i,
1424
- onBlur: h,
1425
- placeholder: B,
1426
- rows: 1
1427
- }
1428
- )
1459
+ children: [
1460
+ !n && K && /* @__PURE__ */ o.jsx(
1461
+ ar,
1462
+ {
1463
+ texts: l
1464
+ }
1465
+ ),
1466
+ /* @__PURE__ */ o.jsx(
1467
+ Yt,
1468
+ {
1469
+ id: B,
1470
+ ref: a,
1471
+ value: n,
1472
+ onChange: (T) => t(T.target.value),
1473
+ onKeyDown: i,
1474
+ onBlur: h,
1475
+ placeholder: K ? "" : l,
1476
+ rows: 1
1477
+ }
1478
+ )
1479
+ ]
1429
1480
  }
1430
1481
  ),
1431
- /* @__PURE__ */ s.jsxs(
1432
- ae.div,
1482
+ /* @__PURE__ */ o.jsxs(
1483
+ q.div,
1433
1484
  {
1434
- className: ge.actions,
1485
+ className: be.actions,
1435
1486
  initial: {
1436
- opacity: u ? 1 : 0,
1437
- scale: u ? 1 : 0.5
1487
+ opacity: f ? 1 : 0,
1488
+ scale: f ? 1 : 0.5
1438
1489
  },
1439
1490
  animate: {
1440
1491
  opacity: 1,
1441
1492
  scale: 1,
1442
- transition: t.trim() ? { duration: 0 } : it
1493
+ transition: n.trim() ? { duration: 0 } : De
1443
1494
  },
1444
1495
  children: [
1445
- g(),
1446
- j === "before-submit" && A(),
1447
- p(),
1448
- j === "after-submit" && A()
1496
+ A(),
1497
+ E === "before-submit" && _(),
1498
+ O(),
1499
+ E === "after-submit" && _()
1449
1500
  ]
1450
1501
  }
1451
1502
  )
1452
1503
  ] });
1453
1504
  }
1454
- function rr({
1455
- value: t,
1456
- onChange: n,
1505
+ function or({
1506
+ value: n,
1507
+ onChange: t,
1457
1508
  onSubmit: r,
1458
1509
  onKeyDown: i,
1459
1510
  textareaRef: a,
1460
- placeholder: c,
1461
- isProcessing: l,
1511
+ placeholder: s,
1512
+ isProcessing: u,
1462
1513
  onBlur: h,
1463
- onExpand: u,
1464
- showExpandButton: f = !0,
1465
- focusOnMount: v = !1,
1466
- customActions: _,
1467
- actionOrder: C
1514
+ onExpand: f,
1515
+ showExpandButton: p = !0,
1516
+ focusOnMount: m = !1,
1517
+ customActions: g,
1518
+ actionOrder: C,
1519
+ onStop: E
1468
1520
  }) {
1469
- return /* @__PURE__ */ s.jsx(
1470
- Bt,
1521
+ return /* @__PURE__ */ o.jsx(
1522
+ Zt,
1471
1523
  {
1472
- value: t,
1473
- onChange: n,
1524
+ value: n,
1525
+ onChange: t,
1474
1526
  onSubmit: r,
1475
1527
  onKeyDown: i,
1476
1528
  textareaRef: a,
1477
- placeholder: c,
1478
- isProcessing: l,
1529
+ placeholder: s,
1530
+ isProcessing: u,
1479
1531
  onBlur: h,
1480
- onExpand: u,
1481
- showExpandButton: f,
1482
- focusOnMount: v,
1483
- customActions: _,
1484
- actionOrder: C
1532
+ onExpand: f,
1533
+ showExpandButton: p,
1534
+ focusOnMount: m,
1535
+ customActions: g,
1536
+ actionOrder: C,
1537
+ onStop: E
1485
1538
  }
1486
1539
  );
1487
1540
  }
1488
- function Yt({ className: t, size: n = 24 }) {
1489
- return /* @__PURE__ */ s.jsx(
1541
+ function Ut({ className: n, size: t = 24 }) {
1542
+ return /* @__PURE__ */ o.jsx(
1490
1543
  "svg",
1491
1544
  {
1492
- className: t,
1493
- width: n,
1494
- height: n,
1545
+ className: n,
1546
+ width: t,
1547
+ height: t,
1495
1548
  viewBox: "0 0 24 24",
1496
1549
  fill: "none",
1497
1550
  xmlns: "http://www.w3.org/2000/svg",
1498
- children: /* @__PURE__ */ s.jsx(
1551
+ children: /* @__PURE__ */ o.jsx(
1499
1552
  "path",
1500
1553
  {
1501
1554
  d: "M12.0001 13.0607L16.4697 17.5304L17.5304 16.4697L13.0607 12.0001L17.5304 7.53039L16.4697 6.46973L12.0001 10.9394L7.5304 6.46973L6.46973 7.53039L10.9394 12.0001L6.46974 16.4697L7.5304 17.5304L12.0001 13.0607Z",
@@ -1505,65 +1558,68 @@ function Yt({ className: t, size: n = 24 }) {
1505
1558
  }
1506
1559
  );
1507
1560
  }
1508
- const ir = "ChatHeader-module_container", ar = {
1509
- container: ir
1561
+ const sr = "ChatHeader-module_container", lr = {
1562
+ container: sr
1510
1563
  };
1511
- function or({ onClose: t }) {
1512
- return /* @__PURE__ */ s.jsx(
1513
- "div",
1564
+ function cr({ onClose: n }) {
1565
+ return /* @__PURE__ */ o.jsx(
1566
+ q.div,
1514
1567
  {
1515
1568
  "data-slot": "chat-header",
1516
1569
  "data-draggable": "true",
1517
- className: ar.container,
1518
- children: t && /* @__PURE__ */ s.jsx(
1519
- Q,
1570
+ className: lr.container,
1571
+ initial: { opacity: 0 },
1572
+ animate: { opacity: 1 },
1573
+ transition: { ...De, delay: 0.1 },
1574
+ children: n && /* @__PURE__ */ o.jsx(
1575
+ ee,
1520
1576
  {
1521
1577
  variant: "ghost",
1522
- icon: /* @__PURE__ */ s.jsx(Yt, {}),
1523
- onClick: t,
1524
- "aria-label": _e("Close conversation", "a8c-agenttic")
1578
+ icon: /* @__PURE__ */ o.jsx(Ut, {}),
1579
+ onClick: n,
1580
+ "aria-label": Re("Close conversation", "a8c-agenttic")
1525
1581
  }
1526
1582
  )
1527
1583
  }
1528
1584
  );
1529
1585
  }
1530
- 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", ye = {
1531
- container: sr,
1532
- containerWithIcon: cr,
1533
- content: lr,
1534
- actions: ur,
1535
- icon: fr,
1536
- dismissible: dr
1586
+ const ur = "Notice-module_container", fr = "Notice-module_containerWithIcon", dr = "Notice-module_content", hr = "Notice-module_actions", pr = "Notice-module_icon", vr = "Notice-module_dismissible", we = {
1587
+ container: ur,
1588
+ containerWithIcon: fr,
1589
+ content: dr,
1590
+ actions: hr,
1591
+ icon: pr,
1592
+ dismissible: vr
1537
1593
  };
1538
- function hr({
1539
- icon: t,
1540
- message: n,
1594
+ function mr({
1595
+ icon: n,
1596
+ message: t,
1541
1597
  action: r,
1542
1598
  dismissible: i = !0,
1543
1599
  onDismiss: a
1544
1600
  }) {
1545
- return /* @__PURE__ */ s.jsxs(
1601
+ return /* @__PURE__ */ o.jsxs(
1546
1602
  "div",
1547
1603
  {
1548
1604
  "data-slot": "notice",
1549
- className: le(ye.container, {
1550
- [ye.containerWithIcon]: !!t
1605
+ className: se(we.container, {
1606
+ [we.containerWithIcon]: !!n
1551
1607
  }),
1552
1608
  children: [
1553
- /* @__PURE__ */ s.jsxs("div", { className: ye.content, children: [
1554
- t && /* @__PURE__ */ s.jsx("div", { className: ye.icon, children: t }),
1555
- /* @__PURE__ */ s.jsx("span", { children: n })
1609
+ /* @__PURE__ */ o.jsxs("div", { className: we.content, children: [
1610
+ n && /* @__PURE__ */ o.jsx("div", { className: we.icon, children: n }),
1611
+ /* @__PURE__ */ o.jsx("span", { children: t })
1556
1612
  ] }),
1557
- /* @__PURE__ */ s.jsxs("div", { className: ye.actions, children: [
1558
- r && /* @__PURE__ */ s.jsx(Q, { onClick: r.onClick, variant: "link", children: r.label }),
1559
- i && a && /* @__PURE__ */ s.jsx(
1560
- Q,
1613
+ /* @__PURE__ */ o.jsxs("div", { className: we.actions, children: [
1614
+ r && /* @__PURE__ */ o.jsx(ee, { onClick: r.onClick, variant: "link", children: r.label }),
1615
+ i && a && /* @__PURE__ */ o.jsx(
1616
+ ee,
1561
1617
  {
1562
- className: ye.dismissible,
1618
+ className: we.dismissible,
1563
1619
  onClick: a,
1564
1620
  variant: "ghost",
1565
1621
  size: "sm",
1566
- icon: /* @__PURE__ */ s.jsx(Yt, {})
1622
+ icon: /* @__PURE__ */ o.jsx(Ut, {})
1567
1623
  }
1568
1624
  )
1569
1625
  ] })
@@ -1571,40 +1627,40 @@ function hr({
1571
1627
  }
1572
1628
  );
1573
1629
  }
1574
- const pr = "Suggestions-module_container", St = {
1575
- container: pr
1576
- }, vr = ({
1577
- className: t,
1578
- suggestions: n,
1630
+ const gr = "Suggestions-module_container", Ot = {
1631
+ container: gr
1632
+ }, yr = ({
1633
+ className: n,
1634
+ suggestions: t,
1579
1635
  onSubmit: r
1580
1636
  }) => {
1581
1637
  const i = (a) => {
1582
1638
  r && r(a.prompt);
1583
1639
  };
1584
- return !n || n.length === 0 ? null : /* @__PURE__ */ s.jsx(tt, { children: n && n.length > 0 && /* @__PURE__ */ s.jsx(
1585
- ae.div,
1640
+ return !t || t.length === 0 ? null : /* @__PURE__ */ o.jsx(Ue, { children: t && t.length > 0 && /* @__PURE__ */ o.jsx(
1641
+ q.div,
1586
1642
  {
1587
- className: le(St.container, t),
1643
+ className: se(Ot.container, n),
1588
1644
  initial: { opacity: 0, y: "-80%" },
1589
1645
  animate: { opacity: 1, y: "-100%" },
1590
1646
  exit: { opacity: 0, y: "-80%" },
1591
- transition: Ve,
1592
- children: n.map(
1593
- (a, c) => /* @__PURE__ */ s.jsx(
1594
- ae.div,
1647
+ transition: Ye,
1648
+ children: t.map(
1649
+ (a, s) => /* @__PURE__ */ o.jsx(
1650
+ q.div,
1595
1651
  {
1596
1652
  initial: { opacity: 0, y: 10 },
1597
1653
  animate: { opacity: 1, y: 0 },
1598
1654
  transition: {
1599
- ...Ve,
1600
- delay: c * 0.05
1655
+ ...Ye,
1656
+ delay: s * 0.05
1601
1657
  },
1602
- children: /* @__PURE__ */ s.jsx(
1603
- Q,
1658
+ children: /* @__PURE__ */ o.jsx(
1659
+ ee,
1604
1660
  {
1605
1661
  onClick: () => i(a),
1606
1662
  variant: "outline",
1607
- className: St.button,
1663
+ className: Ot.button,
1608
1664
  children: a.label
1609
1665
  }
1610
1666
  )
@@ -1614,214 +1670,220 @@ const pr = "Suggestions-module_container", St = {
1614
1670
  )
1615
1671
  }
1616
1672
  ) });
1617
- }, mr = "ChatFooter-module_container", gr = {
1618
- container: mr
1673
+ }, Cr = "ChatFooter-module_container", _r = {
1674
+ container: Cr
1619
1675
  };
1620
- function yr({
1621
- inputValue: t,
1622
- onInputChange: n,
1676
+ function xr({
1677
+ inputValue: n,
1678
+ onInputChange: t,
1623
1679
  onSubmit: r,
1624
1680
  onKeyDown: i,
1625
1681
  textareaRef: a,
1626
- placeholder: c,
1627
- isProcessing: l,
1628
- fromCompact: h = !1,
1629
- onExpand: u,
1630
- notice: f,
1631
- suggestions: v,
1632
- clearSuggestions: _,
1633
- focusOnMount: C,
1634
- customActions: j,
1635
- actionOrder: I
1682
+ placeholder: s,
1683
+ isProcessing: u,
1684
+ onStop: h,
1685
+ fromCompact: f = !1,
1686
+ onExpand: p,
1687
+ disabled: m,
1688
+ notice: g,
1689
+ suggestions: C,
1690
+ clearSuggestions: E,
1691
+ focusOnMount: D,
1692
+ customActions: H,
1693
+ actionOrder: B
1636
1694
  }) {
1637
1695
  const M = V(
1638
- (B) => {
1639
- n(B), _ == null || _();
1696
+ (j) => {
1697
+ t(j), E == null || E();
1640
1698
  },
1641
- [n, _]
1699
+ [t, E]
1700
+ );
1701
+ return /* @__PURE__ */ o.jsxs(
1702
+ q.div,
1703
+ {
1704
+ "data-slot": "chat-footer",
1705
+ className: _r.container,
1706
+ initial: { opacity: 0, scale: 1 },
1707
+ animate: { opacity: 1, scale: 1 },
1708
+ transition: { ...De },
1709
+ children: [
1710
+ !n && /* @__PURE__ */ o.jsx(
1711
+ yr,
1712
+ {
1713
+ suggestions: C,
1714
+ onSubmit: M
1715
+ }
1716
+ ),
1717
+ g && /* @__PURE__ */ o.jsx(
1718
+ mr,
1719
+ {
1720
+ icon: g.icon,
1721
+ message: g.message,
1722
+ action: g.action,
1723
+ dismissible: g.dismissible,
1724
+ onDismiss: g.onDismiss
1725
+ }
1726
+ ),
1727
+ /* @__PURE__ */ o.jsx(
1728
+ Zt,
1729
+ {
1730
+ value: n,
1731
+ onChange: t,
1732
+ onSubmit: r,
1733
+ onKeyDown: i,
1734
+ textareaRef: a,
1735
+ placeholder: s,
1736
+ isProcessing: u,
1737
+ onStop: h,
1738
+ fromCompact: f,
1739
+ onExpand: p,
1740
+ showExpandButton: !1,
1741
+ focusOnMount: D,
1742
+ customActions: H,
1743
+ actionOrder: B,
1744
+ disabled: m
1745
+ }
1746
+ )
1747
+ ]
1748
+ }
1642
1749
  );
1643
- return /* @__PURE__ */ s.jsxs("div", { "data-slot": "chat-footer", className: gr.container, children: [
1644
- !t && /* @__PURE__ */ s.jsx(
1645
- vr,
1646
- {
1647
- suggestions: v,
1648
- onSubmit: M
1649
- }
1650
- ),
1651
- f && /* @__PURE__ */ s.jsx(
1652
- hr,
1653
- {
1654
- icon: f.icon,
1655
- message: f.message,
1656
- action: f.action,
1657
- dismissible: f.dismissible,
1658
- onDismiss: f.onDismiss
1659
- }
1660
- ),
1661
- /* @__PURE__ */ s.jsx(
1662
- Bt,
1663
- {
1664
- value: t,
1665
- onChange: n,
1666
- onSubmit: r,
1667
- onKeyDown: i,
1668
- textareaRef: a,
1669
- placeholder: c,
1670
- isProcessing: l,
1671
- fromCompact: h,
1672
- onExpand: u,
1673
- showExpandButton: !1,
1674
- focusOnMount: C,
1675
- customActions: j,
1676
- actionOrder: I
1677
- }
1678
- )
1679
- ] });
1680
1750
  }
1681
- const _r = "MessageActions-module_container", At = {
1682
- container: _r
1751
+ const br = "MessageActions-module_container", It = {
1752
+ container: br
1683
1753
  };
1684
- function Ot({ message: t }) {
1685
- return !t.actions || t.actions.length === 0 ? null : /* @__PURE__ */ s.jsx(
1754
+ function Dt({ message: n }) {
1755
+ return !n.actions || n.actions.length === 0 ? null : /* @__PURE__ */ o.jsx(
1686
1756
  "div",
1687
1757
  {
1688
- className: At.container,
1758
+ className: It.container,
1689
1759
  "data-visible": "true",
1690
1760
  role: "toolbar",
1691
1761
  "aria-label": "Message actions",
1692
- children: t.actions.map((n) => /* @__PURE__ */ s.jsx(
1693
- Q,
1762
+ children: n.actions.map((t) => /* @__PURE__ */ o.jsx(
1763
+ ee,
1694
1764
  {
1695
- className: At.button,
1696
- icon: n.icon,
1697
- onClick: () => n.onClick(t),
1765
+ className: It.button,
1766
+ icon: t.icon,
1767
+ onClick: () => t.onClick(n),
1698
1768
  variant: "ghost",
1699
1769
  size: "sm",
1700
1770
  type: "button",
1701
- disabled: n.disabled,
1702
- title: n.tooltip || n.label,
1703
- "aria-label": n.label,
1704
- ...n.tooltip && { title: n.tooltip }
1771
+ disabled: t.disabled,
1772
+ pressed: t.pressed,
1773
+ title: t.tooltip || t.label,
1774
+ "aria-label": t.label,
1775
+ ...t.tooltip && { title: t.tooltip },
1776
+ children: t.showLabel ? t.label : void 0
1705
1777
  },
1706
- n.id
1778
+ t.id
1707
1779
  ))
1708
1780
  }
1709
1781
  );
1710
1782
  }
1711
- const Cr = "Message-module_message", br = "Message-module_user", xr = "Message-module_bubble", wr = "Message-module_error", Er = "Message-module_content", He = {
1712
- message: Cr,
1713
- user: br,
1714
- bubble: xr,
1715
- error: wr,
1716
- content: Er
1717
- }, Rr = We.forwardRef(
1718
- function({ message: n, messageRenderer: r = _n }, i) {
1719
- const a = () => /* @__PURE__ */ s.jsx(s.Fragment, { children: n.content.map((c, l) => {
1720
- if (c.type === "text" && c.text)
1721
- return /* @__PURE__ */ s.jsx(r, { children: c.text }, l);
1722
- if (c.type === "component" && c.component) {
1723
- const h = c.component;
1724
- return /* @__PURE__ */ s.jsx(
1783
+ const wr = "Message-module_message", Er = "Message-module_user", Rr = "Message-module_bubble", Tr = "Message-module_error", jr = "Message-module_content", Be = {
1784
+ message: wr,
1785
+ user: Er,
1786
+ bubble: Rr,
1787
+ error: Tr,
1788
+ content: jr
1789
+ }, Lr = Ze.forwardRef(
1790
+ function({ message: t, messageRenderer: r = Cn }, i) {
1791
+ const a = () => /* @__PURE__ */ o.jsx(o.Fragment, { children: t.content.map((s, u) => {
1792
+ if (s.type === "text" && s.text)
1793
+ return /* @__PURE__ */ o.jsx(r, { children: s.text }, u);
1794
+ if (s.type === "component" && s.component) {
1795
+ const h = s.component;
1796
+ return /* @__PURE__ */ o.jsx(
1725
1797
  h,
1726
1798
  {
1727
- ...c.componentProps || {}
1799
+ ...s.componentProps || {}
1728
1800
  },
1729
- l
1801
+ u
1730
1802
  );
1731
1803
  }
1732
1804
  return null;
1733
1805
  }) });
1734
- return /* @__PURE__ */ s.jsxs(
1735
- ae.div,
1806
+ return /* @__PURE__ */ o.jsxs(
1807
+ q.div,
1736
1808
  {
1737
1809
  ref: i,
1738
- variants: Nt,
1810
+ variants: Wt,
1739
1811
  initial: "hidden",
1740
1812
  animate: "visible",
1741
1813
  "data-slot": "message",
1742
- "data-role": n.role,
1743
- className: le(He.message, He[n.role]),
1814
+ "data-role": t.role,
1815
+ className: se(Be.message, Be[t.role]),
1744
1816
  children: [
1745
- /* @__PURE__ */ s.jsxs("div", { className: He.content, children: [
1746
- /* @__PURE__ */ s.jsx("div", { className: He.bubble, children: a() }),
1747
- n.role !== "user" && /* @__PURE__ */ s.jsx(Ot, { message: n })
1817
+ /* @__PURE__ */ o.jsxs("div", { className: Be.content, children: [
1818
+ /* @__PURE__ */ o.jsx("div", { className: Be.bubble, children: a() }),
1819
+ t.role !== "user" && /* @__PURE__ */ o.jsx(Dt, { message: t })
1748
1820
  ] }),
1749
- n.role === "user" && /* @__PURE__ */ s.jsx(Ot, { message: n })
1821
+ t.role === "user" && /* @__PURE__ */ o.jsx(Dt, { message: t })
1750
1822
  ]
1751
1823
  }
1752
1824
  );
1753
1825
  }
1754
- ), Tr = "Messages-module_container", jr = "Messages-module_emptyState", ze = {
1755
- container: Tr,
1756
- emptyState: jr
1757
- }, Lr = "Thinking-module_container", Sr = "Thinking-module_icon", Ar = "Thinking-module_content", Je = {
1758
- container: Lr,
1759
- icon: Sr,
1760
- content: Ar
1761
- }, Or = hn(
1762
- We.forwardRef(
1763
- function({ content: n = "Thinking…" }, r) {
1764
- const i = pn(() => /* @__PURE__ */ s.jsx(Vt, {}), []);
1765
- return /* @__PURE__ */ s.jsxs(
1826
+ ), Ar = "Messages-module_container", Sr = "Messages-module_emptyState", tt = {
1827
+ container: Ar,
1828
+ emptyState: Sr
1829
+ }, Or = "Thinking-module_container", Ir = "Thinking-module_icon", Dr = "Thinking-module_content", nt = {
1830
+ container: Or,
1831
+ icon: Ir,
1832
+ content: Dr
1833
+ }, Pr = hn(
1834
+ Ze.forwardRef(
1835
+ function({ content: t = "Thinking…" }, r) {
1836
+ const i = pn(() => /* @__PURE__ */ o.jsx(Bt, {}), []);
1837
+ return /* @__PURE__ */ o.jsxs(
1766
1838
  "div",
1767
1839
  {
1768
1840
  ref: r,
1769
1841
  "data-slot": "thinking",
1770
- className: Je.container,
1842
+ className: nt.container,
1771
1843
  children: [
1772
- /* @__PURE__ */ s.jsx("div", { className: Je.icon, children: i }),
1773
- /* @__PURE__ */ s.jsx("span", { className: Je.content, children: n })
1844
+ /* @__PURE__ */ o.jsx("div", { className: nt.icon, children: i }),
1845
+ /* @__PURE__ */ o.jsx("span", { className: nt.content, children: t })
1774
1846
  ]
1775
1847
  }
1776
1848
  );
1777
1849
  }
1778
1850
  )
1779
1851
  );
1780
- function Dr({
1781
- messages: t,
1782
- isProcessing: n,
1852
+ function Fr({
1853
+ messages: n,
1854
+ isProcessing: t,
1783
1855
  error: r,
1784
1856
  emptyView: i,
1785
- fromCompact: a = !1,
1786
- messageRenderer: c
1857
+ messageRenderer: a
1787
1858
  }) {
1788
- const l = W(null), h = W([]), u = W(!0), f = W(null);
1789
- return q(() => {
1790
- const v = t.length > h.current.length;
1791
- if (v && l.current) {
1792
- const _ = l.current.querySelectorAll(
1793
- '[data-slot="message"]'
1794
- ), C = _[_.length - 1];
1795
- if (C) {
1796
- const j = C.getBoundingClientRect().top - l.current.getBoundingClientRect().top + l.current.scrollTop, I = a && u.current ? "auto" : "smooth";
1797
- l.current.scrollTo({
1798
- top: j,
1799
- behavior: I
1800
- });
1801
- }
1802
- }
1803
- if (v && f.current) {
1804
- const C = t.slice(
1805
- h.current.length
1859
+ const s = W(null), u = W([]), h = W(!0), f = W(null);
1860
+ return J(() => {
1861
+ const p = n.length > u.current.length;
1862
+ if (h.current && n.length > 0 && s.current ? s.current.scrollTop = s.current.scrollHeight : p && !h.current && s.current && s.current.scrollTo({
1863
+ top: s.current.scrollHeight,
1864
+ behavior: "smooth"
1865
+ }), p && f.current) {
1866
+ const g = n.slice(
1867
+ u.current.length
1806
1868
  ).filter(
1807
- (j) => j.role === "agent"
1869
+ (C) => C.role === "agent"
1808
1870
  );
1809
- if (C.length > 0) {
1810
- const I = C[C.length - 1].content.filter((M) => M.type === "text").map((M) => M.text).join(" ");
1811
- I && (f.current.textContent = I);
1871
+ if (g.length > 0) {
1872
+ const E = g[g.length - 1].content.filter((D) => D.type === "text").map((D) => D.text).join(" ");
1873
+ E && (f.current.textContent = E);
1812
1874
  }
1813
1875
  }
1814
- u.current && (u.current = !1), h.current = t;
1815
- }, [t, a]), t.length === 0 ? i ? /* @__PURE__ */ s.jsx(
1876
+ h.current && (h.current = !1), u.current = n;
1877
+ }, [n]), n.length === 0 ? i ? /* @__PURE__ */ o.jsx(
1816
1878
  "div",
1817
1879
  {
1818
1880
  "data-slot": "messages",
1819
- className: `${ze.container} ${ze.emptyState}`,
1820
- ref: l,
1881
+ className: `${tt.container} ${tt.emptyState}`,
1882
+ ref: s,
1821
1883
  children: i
1822
1884
  }
1823
- ) : null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1824
- /* @__PURE__ */ s.jsx(
1885
+ ) : null : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1886
+ /* @__PURE__ */ o.jsx(
1825
1887
  "div",
1826
1888
  {
1827
1889
  ref: f,
@@ -1836,23 +1898,23 @@ function Dr({
1836
1898
  }
1837
1899
  }
1838
1900
  ),
1839
- /* @__PURE__ */ s.jsx(
1901
+ /* @__PURE__ */ o.jsx(
1840
1902
  "div",
1841
1903
  {
1842
1904
  "data-slot": "messages",
1843
- className: ze.container,
1844
- ref: l,
1845
- children: /* @__PURE__ */ s.jsxs(tt, { mode: "popLayout", children: [
1846
- t.map((v) => /* @__PURE__ */ s.jsx(
1847
- Rr,
1905
+ className: tt.container,
1906
+ ref: s,
1907
+ children: /* @__PURE__ */ o.jsxs(Ue, { mode: "popLayout", children: [
1908
+ n.map((p) => /* @__PURE__ */ o.jsx(
1909
+ Lr,
1848
1910
  {
1849
- message: v,
1850
- messageRenderer: c
1911
+ message: p,
1912
+ messageRenderer: a
1851
1913
  },
1852
- v.id
1914
+ p.id
1853
1915
  )),
1854
- n && /* @__PURE__ */ s.jsx(Or, {}),
1855
- r && /* @__PURE__ */ s.jsx(
1916
+ t && /* @__PURE__ */ o.jsx(Pr, {}),
1917
+ r && /* @__PURE__ */ o.jsx(
1856
1918
  "div",
1857
1919
  {
1858
1920
  className: "error-message",
@@ -1869,82 +1931,83 @@ function Dr({
1869
1931
  )
1870
1932
  ] });
1871
1933
  }
1872
- const Ir = "ConversationView-module_container", Pr = "ConversationView-module_withHeader", Dt = {
1873
- container: Ir,
1874
- withHeader: Pr
1934
+ const Mr = "ConversationView-module_container", kr = "ConversationView-module_withHeader", Pt = {
1935
+ container: Mr,
1936
+ withHeader: kr
1875
1937
  };
1876
- function It({
1877
- messages: t,
1878
- error: n,
1938
+ function Ft({
1939
+ messages: n,
1940
+ error: t,
1879
1941
  inputValue: r,
1880
1942
  onInputChange: i,
1881
1943
  onSubmit: a,
1882
- onKeyDown: c,
1883
- textareaRef: l,
1944
+ onKeyDown: s,
1945
+ textareaRef: u,
1884
1946
  placeholder: h,
1885
- isProcessing: u,
1886
- fromCompact: f = !1,
1887
- showHeader: v = !1,
1888
- onClose: _,
1889
- onExpand: C,
1890
- notice: j,
1891
- emptyView: I,
1892
- suggestions: M,
1893
- clearSuggestions: B,
1894
- messageRenderer: $,
1895
- focusOnMount: A = !1
1947
+ isProcessing: f,
1948
+ onStop: p,
1949
+ fromCompact: m = !1,
1950
+ showHeader: g = !1,
1951
+ onClose: C,
1952
+ onExpand: E,
1953
+ notice: D,
1954
+ emptyView: H,
1955
+ suggestions: B,
1956
+ clearSuggestions: M,
1957
+ messageRenderer: j,
1958
+ focusOnMount: K = !1
1896
1959
  }) {
1897
- return q(() => {
1898
- const g = (p) => {
1899
- p.key === "Escape" && _ && _();
1960
+ return J(() => {
1961
+ const l = (v) => {
1962
+ v.key === "Escape" && C && C();
1900
1963
  };
1901
- return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
1902
- }, [_]), /* @__PURE__ */ s.jsxs(
1964
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
1965
+ }, [C]), /* @__PURE__ */ o.jsxs(
1903
1966
  "div",
1904
1967
  {
1905
1968
  "data-slot": "conversation-view",
1906
- className: `${Dt.container}${v ? ` ${Dt.withHeader}` : ""}`,
1969
+ className: `${Pt.container}${g ? ` ${Pt.withHeader}` : ""}`,
1907
1970
  children: [
1908
- v && /* @__PURE__ */ s.jsx(or, { onClose: _ }),
1909
- /* @__PURE__ */ s.jsx(
1910
- Dr,
1971
+ g && /* @__PURE__ */ o.jsx(cr, { onClose: C }),
1972
+ /* @__PURE__ */ o.jsx(
1973
+ Fr,
1911
1974
  {
1912
- messages: t,
1913
- isProcessing: u,
1914
- error: n,
1915
- emptyView: I,
1916
- fromCompact: f,
1917
- messageRenderer: $
1975
+ messages: n,
1976
+ isProcessing: f,
1977
+ error: t,
1978
+ emptyView: H,
1979
+ messageRenderer: j
1918
1980
  }
1919
1981
  ),
1920
- /* @__PURE__ */ s.jsx(
1921
- yr,
1982
+ /* @__PURE__ */ o.jsx(
1983
+ xr,
1922
1984
  {
1923
1985
  inputValue: r,
1924
1986
  onInputChange: i,
1925
1987
  onSubmit: a,
1926
- onKeyDown: c,
1927
- textareaRef: l,
1988
+ onKeyDown: s,
1989
+ textareaRef: u,
1928
1990
  placeholder: h,
1929
- isProcessing: u,
1930
- fromCompact: f,
1931
- onExpand: C,
1932
- notice: j,
1933
- suggestions: M,
1934
- clearSuggestions: B,
1935
- focusOnMount: A
1991
+ isProcessing: f,
1992
+ onStop: p,
1993
+ fromCompact: m,
1994
+ onExpand: E,
1995
+ notice: D,
1996
+ suggestions: B,
1997
+ clearSuggestions: M,
1998
+ focusOnMount: K
1936
1999
  }
1937
2000
  )
1938
2001
  ]
1939
2002
  }
1940
2003
  );
1941
2004
  }
1942
- const Fr = "Chat-module_container", Mr = "Chat-module_embedded", kr = "Chat-module_floating", $r = "Chat-module_content", je = {
1943
- container: Fr,
1944
- embedded: Mr,
1945
- floating: kr,
1946
- content: $r
1947
- }, k = {
2005
+ const $r = "Chat-module_container", Hr = "Chat-module_embedded", Nr = "Chat-module_floating", Vr = "Chat-module_content", Se = {
2006
+ container: $r,
2007
+ embedded: Hr,
2008
+ floating: Nr,
2009
+ content: Vr
2010
+ }, $ = {
1948
2011
  COLLAPSED_SIZE: 56,
1949
2012
  COMPACT_WIDTH: 372,
1950
2013
  EXPANDED_HEIGHT: 520,
@@ -1952,7 +2015,7 @@ const Fr = "Chat-module_container", Mr = "Chat-module_embedded", kr = "Chat-modu
1952
2015
  BORDER_RADIUS: 24,
1953
2016
  PADDING: 16,
1954
2017
  VIEWPORT_OFFSET: 16
1955
- }, Le = {
2018
+ }, Oe = {
1956
2019
  SPRING_CONFIG: {
1957
2020
  type: "spring",
1958
2021
  damping: 25,
@@ -1965,256 +2028,264 @@ const Fr = "Chat-module_container", Mr = "Chat-module_embedded", kr = "Chat-modu
1965
2028
  '[data-slot="chat-footer"]'
1966
2029
  ].join(", ")
1967
2030
  };
1968
- function Hr({
1969
- messages: t,
1970
- isProcessing: n,
2031
+ function Wr({
2032
+ messages: n,
2033
+ isProcessing: t,
1971
2034
  error: r,
1972
2035
  onSubmit: i,
1973
2036
  variant: a = "floating",
1974
- triggerIcon: c,
1975
- placeholder: l = Ht,
2037
+ triggerIcon: s,
2038
+ placeholder: u = Vt,
1976
2039
  notice: h,
1977
- onOpen: u,
1978
- onExpand: f,
1979
- onClose: v,
1980
- emptyView: _,
1981
- floatingChatState: C,
1982
- suggestions: j,
1983
- clearSuggestions: I,
1984
- messageRenderer: M,
1985
- className: B
2040
+ onOpen: f,
2041
+ onExpand: p,
2042
+ onClose: m,
2043
+ onStop: g,
2044
+ emptyView: C,
2045
+ floatingChatState: E,
2046
+ suggestions: D,
2047
+ clearSuggestions: H,
2048
+ messageRenderer: B,
2049
+ className: M
1986
2050
  }) {
1987
- const [$, A] = Ne(""), g = xn(C), p = W(!1), m = W(!1), b = W(!1);
1988
- q(() => {
1989
- p.current = !1, m.current = !1, b.current = !1;
1990
- }, [g.state]);
1991
- const L = W(/* @__PURE__ */ new Set()), O = V(() => {
1992
- L.current.forEach((E) => {
1993
- clearTimeout(E);
1994
- }), L.current.clear();
1995
- }, []), R = wn({
1996
- value: $,
1997
- setValue: A,
1998
- onSubmit: async (E) => {
1999
- g.state !== "expanded" && (f == null || f()), g.setState("expanded"), await i(E);
2051
+ const [j, K] = Ee(""), l = bn(E), v = W(!1), _ = W(!1), A = W(!1), [O, T] = Ee(!1);
2052
+ J(() => {
2053
+ v.current = !1, _.current = !1, A.current = !1;
2054
+ }, [l.state]);
2055
+ const Z = W(/* @__PURE__ */ new Set()), Pe = V(() => {
2056
+ Z.current.forEach((x) => {
2057
+ clearTimeout(x);
2058
+ }), Z.current.clear();
2059
+ }, []), S = wn({
2060
+ value: j,
2061
+ setValue: K,
2062
+ onSubmit: async (x) => {
2063
+ l.state !== "expanded" && (p == null || p()), l.setState("expanded"), await i(x);
2000
2064
  },
2001
- isProcessing: n
2002
- }), [ue, Be] = Ne(56), [fe, X] = Ne(
2065
+ isProcessing: t
2066
+ }), [z, te] = Ee(56), [ne, Fe] = Ee(
2003
2067
  "left"
2004
- ), K = W(null), z = W(null), J = W(null), ne = yt(0), re = yt(0), de = vn(), Ae = V(() => {
2005
- p.current = !0, g.open(), u == null || u();
2006
- }, [g, u]), ie = V(() => {
2007
- var H, Y, Z;
2008
- const E = (Y = (H = J.current) == null ? void 0 : H.ownerDocument) == null ? void 0 : Y.activeElement;
2009
- return !(E && ((Z = J.current) != null && Z.contains(E)) || $.trim());
2010
- }, [$, J]), Oe = (E) => E === "collapsed" ? k.COLLAPSED_SIZE : E === "compact" ? ue : k.EXPANDED_HEIGHT, De = V(() => {
2011
- if (g.state === "collapsed" && (g.setState("compact"), g.initialState === "collapsed")) {
2012
- const E = setTimeout(() => {
2013
- g.state === "compact" && ie() && g.setState("collapsed"), L.current.delete(E);
2014
- }, k.AUTO_COLLAPSE_DELAY);
2015
- L.current.add(E);
2016
- }
2017
- }, [g, ie]), Ie = V(() => {
2018
- if (g.initialState === "collapsed" && g.state === "compact" && ie()) {
2019
- const E = setTimeout(() => {
2020
- g.state === "compact" && ie() && g.setState("collapsed"), L.current.delete(E);
2021
- }, k.AUTO_COLLAPSE_DELAY);
2022
- L.current.add(E);
2023
- }
2024
- }, [g, ie]), Ce = V(async () => {
2025
- if (R.value.trim()) {
2026
- const E = R.value.trim();
2027
- R.clear(), g.state !== "expanded" && (f == null || f()), g.setState("expanded"), await i(E);
2028
- }
2029
- }, [R, i, g, f]), oe = V(() => {
2030
- b.current = !0, f == null || f(), g.setState("expanded");
2031
- }, [f, g]), be = V(() => {
2032
- m.current = !0, R.clear(), g.close(), v && v();
2033
- }, [R, g, v]), ee = V(
2034
- (E) => {
2035
- if (!J.current || !z.current)
2068
+ ), de = W(null), le = W(null), Q = W(null), re = _t(0), ie = _t(0), he = vn(), Me = V(() => {
2069
+ v.current = !0, l.open(), f == null || f();
2070
+ }, [l, f]), ce = V(() => {
2071
+ var k, U, X;
2072
+ const x = (U = (k = Q.current) == null ? void 0 : k.ownerDocument) == null ? void 0 : U.activeElement;
2073
+ return !(x && ((X = Q.current) != null && X.contains(x)) || j.trim());
2074
+ }, [j, Q]), Ge = (x) => x === "collapsed" ? $.COLLAPSED_SIZE : x === "compact" ? z : $.EXPANDED_HEIGHT, Te = V(() => {
2075
+ if (l.state === "collapsed" && (l.setState("compact"), l.initialState === "collapsed")) {
2076
+ const x = setTimeout(() => {
2077
+ l.state === "compact" && ce() && l.setState("collapsed"), Z.current.delete(x);
2078
+ }, $.AUTO_COLLAPSE_DELAY);
2079
+ Z.current.add(x);
2080
+ }
2081
+ }, [l, ce]), pe = V(() => {
2082
+ if (l.initialState === "collapsed" && l.state === "compact" && ce()) {
2083
+ const x = setTimeout(() => {
2084
+ l.state === "compact" && ce() && l.setState("collapsed"), Z.current.delete(x);
2085
+ }, $.AUTO_COLLAPSE_DELAY);
2086
+ Z.current.add(x);
2087
+ }
2088
+ }, [l, ce]), ae = V(async () => {
2089
+ if (S.value.trim()) {
2090
+ const x = S.value.trim();
2091
+ S.clear(), l.state !== "expanded" && (p == null || p()), l.setState("expanded"), await i(x);
2092
+ }
2093
+ }, [S, i, l, p]), ue = V(() => {
2094
+ A.current = !0, p == null || p(), l.setState("expanded");
2095
+ }, [p, l]), ve = V(() => {
2096
+ _.current = !0, S.clear(), l.close(), m && m();
2097
+ }, [S, l, m]), me = V(
2098
+ (x) => {
2099
+ if (!Q.current || !le.current)
2036
2100
  return null;
2037
- const H = J.current.getBoundingClientRect(), Y = z.current.getBoundingClientRect(), Z = window.getComputedStyle(J.current), se = new DOMMatrixReadOnly(Z.transform), we = H.x - se.e, te = H.y - se.f, Ye = (E ?? fe) === "left" ? Y.left : Y.right - k.COMPACT_WIDTH, Ee = Y.bottom - k.EXPANDED_HEIGHT;
2101
+ const k = Q.current.getBoundingClientRect(), U = le.current.getBoundingClientRect(), X = window.getComputedStyle(Q.current), ye = new DOMMatrixReadOnly(X.transform), He = k.x - ye.e, oe = k.y - ye.f, Xe = (x ?? ne) === "left" ? U.left : U.right - $.COMPACT_WIDTH, Ne = U.bottom - $.EXPANDED_HEIGHT;
2038
2102
  return {
2039
- x: Ye - we,
2040
- y: Ee - te
2103
+ x: Xe - He,
2104
+ y: Ne - oe
2041
2105
  };
2042
2106
  },
2043
- [fe]
2044
- ), xe = V(
2045
- (E) => {
2046
- E.target.closest(
2047
- Le.NON_DRAGGABLE_SELECTORS
2048
- ) || de.start(E.nativeEvent);
2107
+ [ne]
2108
+ ), ke = V(
2109
+ (x) => {
2110
+ x.target.closest(
2111
+ Oe.NON_DRAGGABLE_SELECTORS
2112
+ ) || he.start(x.nativeEvent);
2049
2113
  },
2050
- [de]
2051
- ), he = V(
2052
- (E, H) => {
2053
- const Y = H.point.x, Z = k.COMPACT_WIDTH, se = (window.innerWidth - Z) / 2, te = Y < se ? "left" : "right";
2054
- X(te);
2055
- const pe = ee(te);
2056
- pe && (_t(ne, pe.x, {
2057
- ...Le.SPRING_CONFIG,
2058
- velocity: H.velocity.x * Le.VELOCITY_MULTIPLIER
2059
- }), _t(re, pe.y, {
2060
- ...Le.SPRING_CONFIG,
2061
- velocity: H.velocity.y * Le.VELOCITY_MULTIPLIER
2114
+ [he]
2115
+ ), Ke = V(
2116
+ (x, k) => {
2117
+ const U = k.point.x, X = $.COMPACT_WIDTH, ye = (window.innerWidth - X) / 2, oe = U < ye ? "left" : "right";
2118
+ Fe(oe);
2119
+ const Ce = me(oe);
2120
+ Ce && (xt(re, Ce.x, {
2121
+ ...Oe.SPRING_CONFIG,
2122
+ velocity: k.velocity.x * Oe.VELOCITY_MULTIPLIER
2123
+ }), xt(ie, Ce.y, {
2124
+ ...Oe.SPRING_CONFIG,
2125
+ velocity: k.velocity.y * Oe.VELOCITY_MULTIPLIER
2062
2126
  }));
2063
2127
  },
2064
- [ne, re, ee]
2065
- ), Pe = W(g.state), Fe = Pe.current === "compact" && g.state === "expanded";
2066
- return q(() => {
2067
- O(), Pe.current = g.state;
2068
- }, [g.state, O]), q(() => {
2069
- if (g.state !== "expanded")
2128
+ [re, ie, me]
2129
+ ), $e = W(l.state), ge = $e.current === "compact" && l.state === "expanded";
2130
+ return J(() => {
2131
+ Pe(), $e.current = l.state;
2132
+ }, [l.state, Pe]), J(() => {
2133
+ if (l.state !== "expanded")
2070
2134
  return;
2071
- const E = () => {
2072
- const H = ee();
2073
- H && (ne.set(H.x), re.set(H.y));
2135
+ const x = () => {
2136
+ const k = me();
2137
+ k && (re.set(k.x), ie.set(k.y));
2074
2138
  };
2075
- return window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
2076
- }, [g.state, ne, re, ee]), q(() => {
2077
- const E = L.current;
2139
+ return window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
2140
+ }, [l.state, re, ie, me]), J(() => {
2141
+ const x = Z.current;
2078
2142
  return () => {
2079
- E.forEach((H) => {
2080
- clearTimeout(H);
2081
- }), E.clear();
2143
+ x.forEach((k) => {
2144
+ clearTimeout(k);
2145
+ }), x.clear();
2082
2146
  };
2083
- }, []), q(() => {
2084
- if (g.state === "compact" && K.current) {
2085
- const E = K.current.scrollHeight + k.PADDING;
2086
- Be(E);
2147
+ }, []), J(() => {
2148
+ if (l.state === "compact" && de.current) {
2149
+ const x = de.current.scrollHeight + $.PADDING;
2150
+ te(x);
2087
2151
  }
2088
- }, [g.state, R.value]), a === "embedded" ? /* @__PURE__ */ s.jsx(
2152
+ }, [l.state, S.value]), a === "embedded" ? /* @__PURE__ */ o.jsx(
2089
2153
  "div",
2090
2154
  {
2091
2155
  "data-slot": "chat-embedded",
2092
- className: le(B, je.container, je.embedded),
2093
- children: /* @__PURE__ */ s.jsx(
2094
- It,
2156
+ className: se(M, Se.container, Se.embedded),
2157
+ children: /* @__PURE__ */ o.jsx(
2158
+ Ft,
2095
2159
  {
2096
- messages: t,
2097
- inputValue: R.value,
2098
- onInputChange: R.setValue,
2099
- onSubmit: Ce,
2100
- onKeyDown: R.handleKeyDown,
2101
- textareaRef: R.textareaRef,
2102
- placeholder: l,
2103
- isProcessing: n,
2160
+ messages: n,
2161
+ inputValue: S.value,
2162
+ onInputChange: S.setValue,
2163
+ onSubmit: ae,
2164
+ onKeyDown: S.handleKeyDown,
2165
+ textareaRef: S.textareaRef,
2166
+ placeholder: u,
2167
+ isProcessing: t,
2168
+ onStop: g,
2104
2169
  showHeader: !1,
2105
2170
  notice: h,
2106
- suggestions: j,
2107
- clearSuggestions: I,
2171
+ suggestions: D,
2172
+ clearSuggestions: H,
2108
2173
  error: r,
2109
- emptyView: _,
2110
- messageRenderer: M,
2111
- onExpand: oe,
2112
- focusOnMount: b.current
2174
+ emptyView: C,
2175
+ messageRenderer: B,
2176
+ onExpand: ue,
2177
+ focusOnMount: A.current
2113
2178
  }
2114
2179
  )
2115
2180
  }
2116
- ) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2117
- /* @__PURE__ */ s.jsx(
2181
+ ) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2182
+ /* @__PURE__ */ o.jsx(
2118
2183
  "div",
2119
2184
  {
2120
- ref: z,
2185
+ ref: le,
2121
2186
  style: {
2122
2187
  position: "fixed",
2123
- top: k.VIEWPORT_OFFSET,
2124
- left: k.VIEWPORT_OFFSET,
2125
- right: k.VIEWPORT_OFFSET,
2126
- bottom: k.VIEWPORT_OFFSET,
2188
+ top: $.VIEWPORT_OFFSET,
2189
+ left: $.VIEWPORT_OFFSET,
2190
+ right: $.VIEWPORT_OFFSET,
2191
+ bottom: $.VIEWPORT_OFFSET,
2127
2192
  pointerEvents: "none"
2128
2193
  }
2129
2194
  }
2130
2195
  ),
2131
- /* @__PURE__ */ s.jsx(
2132
- ae.div,
2196
+ /* @__PURE__ */ o.jsx(
2197
+ q.div,
2133
2198
  {
2134
- ref: J,
2199
+ ref: Q,
2135
2200
  "data-slot": "chat-floating",
2136
- className: le(B, je.container, je.floating),
2137
- onMouseLeave: g.state === "compact" ? Ie : void 0,
2138
- drag: g.state === "expanded",
2139
- dragControls: de,
2201
+ className: se(M, Se.container, Se.floating, {
2202
+ animating: O
2203
+ }),
2204
+ onMouseLeave: l.state === "compact" ? pe : void 0,
2205
+ drag: l.state === "expanded",
2206
+ dragControls: he,
2140
2207
  dragListener: !1,
2141
- dragConstraints: z,
2208
+ dragConstraints: le,
2142
2209
  dragMomentum: !1,
2143
2210
  dragElastic: 0.1,
2144
2211
  dragTransition: { power: 0.1, timeConstant: 100 },
2145
- onDragEnd: he,
2146
- onPointerDown: xe,
2212
+ onDragEnd: Ke,
2213
+ onPointerDown: ke,
2147
2214
  style: {
2148
- x: ne,
2149
- y: re,
2150
- bottom: k.VIEWPORT_OFFSET,
2151
- left: k.VIEWPORT_OFFSET
2215
+ x: re,
2216
+ y: ie,
2217
+ bottom: $.VIEWPORT_OFFSET,
2218
+ left: $.VIEWPORT_OFFSET
2152
2219
  },
2153
- children: /* @__PURE__ */ s.jsx(
2154
- ae.div,
2220
+ children: /* @__PURE__ */ o.jsx(
2221
+ q.div,
2155
2222
  {
2156
2223
  layout: !0,
2157
- className: je.content,
2224
+ className: Se.content,
2158
2225
  initial: !1,
2159
2226
  animate: {
2160
- width: g.state === "collapsed" ? k.COLLAPSED_SIZE : k.COMPACT_WIDTH,
2161
- height: Oe(g.state),
2162
- x: g.state === "collapsed" && fe === "right" ? k.COMPACT_WIDTH - k.COLLAPSED_SIZE : 0,
2163
- transition: R.value.trim() ? { duration: 0 } : at
2227
+ width: l.state === "collapsed" ? $.COLLAPSED_SIZE : $.COMPACT_WIDTH,
2228
+ height: Ge(l.state),
2229
+ x: l.state === "collapsed" && ne === "right" ? $.COMPACT_WIDTH - $.COLLAPSED_SIZE : 0,
2230
+ transition: S.value.trim() ? { duration: 0 } : lt
2164
2231
  },
2232
+ onAnimationStart: () => T(!0),
2233
+ onAnimationComplete: () => T(!1),
2165
2234
  style: {
2166
- borderRadius: k.BORDER_RADIUS
2235
+ borderRadius: $.BORDER_RADIUS
2167
2236
  },
2168
- children: /* @__PURE__ */ s.jsxs(tt, { mode: "wait", children: [
2169
- g.state === "collapsed" && /* @__PURE__ */ s.jsx(
2237
+ children: /* @__PURE__ */ o.jsxs(Ue, { mode: "wait", children: [
2238
+ l.state === "collapsed" && /* @__PURE__ */ o.jsx(
2170
2239
  Gn,
2171
2240
  {
2172
- icon: c,
2173
- onClick: Ae,
2174
- onHover: De,
2175
- focusOnMount: m.current
2241
+ icon: s,
2242
+ onClick: Me,
2243
+ onHover: Te,
2244
+ focusOnMount: _.current
2176
2245
  },
2177
2246
  "collapsed"
2178
2247
  ),
2179
- g.state === "compact" && /* @__PURE__ */ s.jsx("div", { ref: K, children: /* @__PURE__ */ s.jsx(
2180
- rr,
2248
+ l.state === "compact" && /* @__PURE__ */ o.jsx("div", { ref: de, children: /* @__PURE__ */ o.jsx(
2249
+ or,
2181
2250
  {
2182
- value: R.value,
2183
- onChange: R.setValue,
2184
- onSubmit: Ce,
2185
- onKeyDown: R.handleKeyDown,
2186
- textareaRef: R.textareaRef,
2187
- placeholder: l,
2188
- isProcessing: n,
2189
- onBlur: Ie,
2190
- onExpand: oe,
2191
- showExpandButton: !R.value.trim(),
2192
- focusOnMount: p.current
2251
+ value: S.value,
2252
+ onChange: S.setValue,
2253
+ onSubmit: ae,
2254
+ onKeyDown: S.handleKeyDown,
2255
+ textareaRef: S.textareaRef,
2256
+ placeholder: u,
2257
+ isProcessing: t,
2258
+ onBlur: pe,
2259
+ onExpand: ue,
2260
+ showExpandButton: !S.value.trim(),
2261
+ focusOnMount: v.current,
2262
+ onStop: g
2193
2263
  },
2194
2264
  "compact"
2195
2265
  ) }),
2196
- g.state === "expanded" && /* @__PURE__ */ s.jsx(
2197
- It,
2266
+ l.state === "expanded" && /* @__PURE__ */ o.jsx(
2267
+ Ft,
2198
2268
  {
2199
- messages: t,
2200
- inputValue: R.value,
2201
- onInputChange: R.setValue,
2202
- onSubmit: Ce,
2203
- onKeyDown: R.handleKeyDown,
2204
- textareaRef: R.textareaRef,
2205
- placeholder: l,
2206
- isProcessing: n,
2269
+ messages: n,
2270
+ inputValue: S.value,
2271
+ onInputChange: S.setValue,
2272
+ onSubmit: ae,
2273
+ onKeyDown: S.handleKeyDown,
2274
+ textareaRef: S.textareaRef,
2275
+ placeholder: u,
2276
+ isProcessing: t,
2277
+ onStop: g,
2207
2278
  showHeader: !0,
2208
- onClose: be,
2209
- fromCompact: Fe,
2279
+ onClose: ve,
2280
+ fromCompact: ge,
2210
2281
  notice: h,
2211
- suggestions: j,
2212
- clearSuggestions: I,
2282
+ suggestions: D,
2283
+ clearSuggestions: H,
2213
2284
  error: r,
2214
- emptyView: _,
2215
- messageRenderer: M,
2216
- onExpand: oe,
2217
- focusOnMount: b.current
2285
+ emptyView: C,
2286
+ messageRenderer: B,
2287
+ onExpand: ue,
2288
+ focusOnMount: A.current
2218
2289
  },
2219
2290
  "expanded"
2220
2291
  )
@@ -2225,57 +2296,59 @@ function Hr({
2225
2296
  )
2226
2297
  ] });
2227
2298
  }
2228
- const di = ({
2229
- messages: t,
2230
- isProcessing: n,
2299
+ const vi = ({
2300
+ messages: n,
2301
+ isProcessing: t,
2231
2302
  error: r,
2232
2303
  onSubmit: i,
2233
2304
  variant: a = "floating",
2234
- triggerIcon: c,
2235
- placeholder: l,
2305
+ triggerIcon: s,
2306
+ placeholder: u,
2236
2307
  notice: h,
2237
- emptyView: u,
2238
- onOpen: f,
2239
- onExpand: v,
2240
- onClose: _,
2241
- floatingChatState: C,
2242
- suggestions: j,
2243
- clearSuggestions: I,
2244
- messageRenderer: M,
2245
- className: B
2246
- }) => /* @__PURE__ */ s.jsx(
2247
- Hr,
2308
+ emptyView: f,
2309
+ onOpen: p,
2310
+ onExpand: m,
2311
+ onClose: g,
2312
+ onStop: C,
2313
+ floatingChatState: E,
2314
+ suggestions: D,
2315
+ clearSuggestions: H,
2316
+ messageRenderer: B,
2317
+ className: M
2318
+ }) => /* @__PURE__ */ o.jsx(
2319
+ Wr,
2248
2320
  {
2249
- messages: t,
2250
- isProcessing: n,
2321
+ messages: n,
2322
+ isProcessing: t,
2251
2323
  error: r,
2252
2324
  onSubmit: i,
2253
2325
  variant: a,
2254
- triggerIcon: c,
2255
- placeholder: l,
2326
+ triggerIcon: s,
2327
+ placeholder: u,
2256
2328
  notice: h,
2257
- emptyView: u,
2258
- onOpen: f,
2259
- onExpand: v,
2260
- onClose: _,
2261
- floatingChatState: C,
2262
- suggestions: j,
2263
- clearSuggestions: I,
2264
- messageRenderer: M,
2265
- className: le("agenttic", B)
2329
+ emptyView: f,
2330
+ onOpen: p,
2331
+ onExpand: m,
2332
+ onClose: g,
2333
+ onStop: C,
2334
+ floatingChatState: E,
2335
+ suggestions: D,
2336
+ clearSuggestions: H,
2337
+ messageRenderer: B,
2338
+ className: se("agenttic", M)
2266
2339
  }
2267
2340
  );
2268
- function hi({ className: t, size: n = 24 }) {
2269
- return /* @__PURE__ */ s.jsx(
2341
+ function mi({ className: n, size: t = 24 }) {
2342
+ return /* @__PURE__ */ o.jsx(
2270
2343
  "svg",
2271
2344
  {
2272
- width: n,
2273
- height: n,
2345
+ width: t,
2346
+ height: t,
2274
2347
  viewBox: "0 0 24 24",
2275
2348
  fill: "none",
2276
2349
  xmlns: "http://www.w3.org/2000/svg",
2277
- className: t,
2278
- children: /* @__PURE__ */ s.jsx(
2350
+ className: n,
2351
+ children: /* @__PURE__ */ o.jsx(
2279
2352
  "path",
2280
2353
  {
2281
2354
  d: "M6.97288 17.25C6.97288 17.3881 7.08481 17.5 7.22288 17.5L8.5 17.5L8.5 12.875L7.22288 12.875C7.08481 12.875 6.97288 12.9869 6.97288 13.125L6.97288 17.25ZM16.3725 17.5C17.1129 17.5 17.7434 16.9587 17.8549 16.2256L18.4819 13.1006C18.6199 12.1924 17.9175 11.3752 17.0004 11.375L14.0698 11.375C13.8509 11.3749 13.6429 11.2794 13.5004 11.1133C13.358 10.9469 13.2949 10.7261 13.3286 10.5098L13.7602 7.74023C13.8309 7.28511 13.4792 6.875 13.02 6.875L13.0141 6.87891L10 12.5L10 17.5L16.3725 17.5ZM5.47288 13.125C5.47288 12.1585 6.25638 11.375 7.22288 11.375L9.01216 11.375L11.6811 6.19238C11.9394 5.69079 12.4558 5.3751 13.02 5.375C14.4008 5.375 15.4552 6.6078 15.2426 7.97168L14.9458 9.875L17.0004 9.875C18.8366 9.87517 20.2413 11.511 19.9653 13.3262L19.3374 16.4512C19.1145 17.9166 17.8548 19 16.3725 19L7.22288 19C6.25638 19 5.47288 18.2165 5.47288 17.25L5.47288 13.125Z",
@@ -2285,18 +2358,18 @@ function hi({ className: t, size: n = 24 }) {
2285
2358
  }
2286
2359
  );
2287
2360
  }
2288
- function pi({ className: t, size: n = 24 }) {
2289
- return /* @__PURE__ */ s.jsx(
2361
+ function gi({ className: n, size: t = 24 }) {
2362
+ return /* @__PURE__ */ o.jsx(
2290
2363
  "svg",
2291
2364
  {
2292
- width: n,
2293
- height: n,
2365
+ width: t,
2366
+ height: t,
2294
2367
  viewBox: "0 0 24 24",
2295
2368
  fill: "none",
2296
2369
  xmlns: "http://www.w3.org/2000/svg",
2297
- className: t,
2370
+ className: n,
2298
2371
  "aria-hidden": "true",
2299
- children: /* @__PURE__ */ s.jsx(
2372
+ children: /* @__PURE__ */ o.jsx(
2300
2373
  "path",
2301
2374
  {
2302
2375
  d: "M6.97288 6.75C6.97288 6.61194 7.08481 6.5 7.22288 6.5L8.5 6.5L8.5 11.125L7.22288 11.125C7.08481 11.125 6.97288 11.0131 6.97288 10.875L6.97288 6.75ZM16.3725 6.5C17.1129 6.5 17.7434 7.0413 17.8549 7.77438L18.4819 10.8994C18.6199 11.8076 17.9175 12.6248 17.0004 12.625L14.0698 12.625C13.8509 12.6251 13.6429 12.7206 13.5004 12.8867C13.358 13.0531 13.2949 13.2739 13.3286 13.4902L13.7602 16.2598C13.8309 16.7149 13.4792 17.125 13.02 17.125L13.0141 17.1211L10 11.5L10 6.5L16.3725 6.5ZM5.47288 10.875C5.47288 11.8415 6.25638 12.625 7.22288 12.625L9.01216 12.625L11.6811 17.8076C11.9394 18.3092 12.4558 18.6249 13.02 18.625C14.4008 18.625 15.4552 17.3922 15.2426 16.0283L14.9458 14.125L17.0004 14.125C18.8366 14.1248 20.2413 12.489 19.9653 10.6738L19.3374 7.54883C19.1145 6.08344 17.8548 5 16.3725 5L7.22288 5C6.25638 5 5.47288 5.78348 5.47288 6.75L5.47288 10.875Z",
@@ -2306,18 +2379,18 @@ function pi({ className: t, size: n = 24 }) {
2306
2379
  }
2307
2380
  );
2308
2381
  }
2309
- function vi({ className: t, size: n = 24 }) {
2310
- return /* @__PURE__ */ s.jsx(
2382
+ function yi({ className: n, size: t = 24 }) {
2383
+ return /* @__PURE__ */ o.jsx(
2311
2384
  "svg",
2312
2385
  {
2313
- width: n,
2314
- height: n,
2386
+ width: t,
2387
+ height: t,
2315
2388
  viewBox: "0 0 24 24",
2316
2389
  fill: "none",
2317
2390
  xmlns: "http://www.w3.org/2000/svg",
2318
- className: t,
2391
+ className: n,
2319
2392
  "aria-hidden": "true",
2320
- children: /* @__PURE__ */ s.jsx(
2393
+ children: /* @__PURE__ */ o.jsx(
2321
2394
  "path",
2322
2395
  {
2323
2396
  d: "M14.5 12C14.5 11.1716 13.8284 10.5 13 10.5H8C7.17157 10.5 6.5 11.1716 6.5 12V17C6.5 17.8284 7.17157 18.5 8 18.5H13C13.8284 18.5 14.5 17.8284 14.5 17V12ZM16 14.5H16.5C17.3284 14.5 18 13.8284 18 13V8C18 7.17157 17.3284 6.5 16.5 6.5H11C10.1716 6.5 9.5 7.17157 9.5 8V9H13C14.6569 9 16 10.3431 16 12V14.5ZM19.5 13C19.5 14.6569 18.1569 16 16.5 16H16V17C16 18.6569 14.6569 20 13 20H8C6.34315 20 5 18.6569 5 17V12C5 10.3431 6.34315 9 8 9V8C8 6.34315 9.34315 5 11 5H16.5C18.1569 5 19.5 6.34315 19.5 8V13Z",
@@ -2327,18 +2400,18 @@ function vi({ className: t, size: n = 24 }) {
2327
2400
  }
2328
2401
  );
2329
2402
  }
2330
- function mi({ className: t, size: n = 24 }) {
2331
- return /* @__PURE__ */ s.jsx(
2403
+ function Ci({ className: n, size: t = 24 }) {
2404
+ return /* @__PURE__ */ o.jsx(
2332
2405
  "svg",
2333
2406
  {
2334
- width: n,
2335
- height: n,
2407
+ width: t,
2408
+ height: t,
2336
2409
  viewBox: "0 0 24 24",
2337
2410
  fill: "none",
2338
2411
  xmlns: "http://www.w3.org/2000/svg",
2339
- className: t,
2412
+ className: n,
2340
2413
  "aria-hidden": "true",
2341
- children: /* @__PURE__ */ s.jsx(
2414
+ children: /* @__PURE__ */ o.jsx(
2342
2415
  "path",
2343
2416
  {
2344
2417
  fillRule: "evenodd",
@@ -2350,24 +2423,81 @@ function mi({ className: t, size: n = 24 }) {
2350
2423
  }
2351
2424
  );
2352
2425
  }
2426
+ function _i({ className: n, size: t = 24 }) {
2427
+ return /* @__PURE__ */ o.jsx(
2428
+ "svg",
2429
+ {
2430
+ width: t,
2431
+ height: t,
2432
+ viewBox: "0 0 24 24",
2433
+ fill: "none",
2434
+ xmlns: "http://www.w3.org/2000/svg",
2435
+ className: n,
2436
+ children: /* @__PURE__ */ o.jsx(
2437
+ "path",
2438
+ {
2439
+ fillRule: "evenodd",
2440
+ clipRule: "evenodd",
2441
+ d: "M11.2222 6.55556C8.6449 6.55556 6.55556 8.6449 6.55556 11.2222C6.55556 13.7996 8.6449 15.8889 11.2222 15.8889C13.7996 15.8889 15.8889 13.7996 15.8889 11.2222C15.8889 8.6449 13.7996 6.55556 11.2222 6.55556ZM5 11.2222C5 7.78579 7.78579 5 11.2222 5C14.6587 5 17.4445 7.78579 17.4445 11.2222C17.4445 12.6601 16.9567 13.9841 16.1377 15.0377L18.7722 17.6722C19.0759 17.976 19.0759 18.4685 18.7722 18.7722C18.4685 19.0759 17.976 19.0759 17.6722 18.7722L15.0377 16.1377C13.9841 16.9567 12.6601 17.4445 11.2222 17.4445C7.78579 17.4445 5 14.6587 5 11.2222Z",
2442
+ fill: "currentColor"
2443
+ }
2444
+ )
2445
+ }
2446
+ );
2447
+ }
2448
+ function xi({ className: n, size: t = 24 }) {
2449
+ return /* @__PURE__ */ o.jsxs(
2450
+ "svg",
2451
+ {
2452
+ width: t,
2453
+ height: t,
2454
+ viewBox: "0 0 24 24",
2455
+ fill: "none",
2456
+ xmlns: "http://www.w3.org/2000/svg",
2457
+ className: n,
2458
+ children: [
2459
+ /* @__PURE__ */ o.jsx(
2460
+ "path",
2461
+ {
2462
+ d: "M11.2222 14.3333C12.9404 14.3333 14.3333 12.9404 14.3333 11.2222C14.3333 9.50401 12.9404 8.11111 11.2222 8.11111C9.50401 8.11111 8.11111 9.50401 8.11111 11.2222C8.11111 12.9404 9.50401 14.3333 11.2222 14.3333Z",
2463
+ fill: "currentColor"
2464
+ }
2465
+ ),
2466
+ /* @__PURE__ */ o.jsx(
2467
+ "path",
2468
+ {
2469
+ fillRule: "evenodd",
2470
+ clipRule: "evenodd",
2471
+ d: "M11.2222 6.55556C8.6449 6.55556 6.55556 8.6449 6.55556 11.2222C6.55556 13.7996 8.6449 15.8889 11.2222 15.8889C13.7996 15.8889 15.8889 13.7996 15.8889 11.2222C15.8889 8.6449 13.7996 6.55556 11.2222 6.55556ZM5 11.2222C5 7.78579 7.78579 5 11.2222 5C14.6587 5 17.4445 7.78579 17.4445 11.2222C17.4445 12.6601 16.9567 13.9841 16.1377 15.0377L18.7722 17.6722C19.0759 17.976 19.0759 18.4685 18.7722 18.7722C18.4685 19.0759 17.976 19.0759 17.6722 18.7722L15.0377 16.1377C13.9841 16.9567 12.6601 17.4445 11.2222 17.4445C7.78579 17.4445 5 14.6587 5 11.2222Z",
2472
+ fill: "currentColor"
2473
+ }
2474
+ )
2475
+ ]
2476
+ }
2477
+ );
2478
+ }
2353
2479
  export {
2354
- di as AgentUI,
2355
- zn as ArrowUpIcon,
2356
- Vt as BigSkyIcon,
2357
- Hr as Chat,
2358
- yr as ChatFooter,
2359
- Bt as ChatInput,
2360
- vi as CopyIcon,
2361
- Rr as Message,
2362
- Ot as MessageActions,
2363
- Dr as Messages,
2364
- hr as Notice,
2365
- Jn as StopIcon,
2366
- mi as StylesIcon,
2367
- vr as Suggestions,
2368
- Or as ThinkingMessage,
2369
- pi as ThumbsDownIcon,
2370
- hi as ThumbsUpIcon,
2371
- Yt as XIcon,
2372
- fi as animations
2480
+ vi as AgentUI,
2481
+ ar as AnimatedPlaceholder,
2482
+ Jn as ArrowUpIcon,
2483
+ Bt as BigSkyIcon,
2484
+ Wr as Chat,
2485
+ xr as ChatFooter,
2486
+ Zt as ChatInput,
2487
+ nr as ChevronUpIcon,
2488
+ yi as CopyIcon,
2489
+ Lr as Message,
2490
+ Dt as MessageActions,
2491
+ Fr as Messages,
2492
+ mr as Notice,
2493
+ qn as StopIcon,
2494
+ Ci as StylesIcon,
2495
+ yr as Suggestions,
2496
+ Pr as ThinkingMessage,
2497
+ gi as ThumbsDownIcon,
2498
+ mi as ThumbsUpIcon,
2499
+ Ut as XIcon,
2500
+ _i as ZoomIcon,
2501
+ xi as ZoomIconFilled,
2502
+ pi as animations
2373
2503
  };