@ibiz-template-plugin/ai-chat 0.0.31 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -4,7 +4,8 @@ var Pn = (n, e, t) => e in n ? Bn(n, e, { enumerable: !0, configurable: !0, writ
4
4
  var T = (n, e, t) => (Pn(n, typeof e != "symbol" ? e + "" : e, t), t);
5
5
  import Re from "interactjs";
6
6
  import Jt from "cherry-markdown";
7
- var He, y, Gt, Qt, ne, dt, Kt, en, tn, it, Xe, Je, nn, Te = {}, sn = [], Rn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Se = Array.isArray;
7
+ import { QXEvent as Rn } from "qx-util";
8
+ var He, y, Gt, Qt, ne, dt, Kt, en, tn, it, Ze, Je, nn, Te = {}, sn = [], Fn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Se = Array.isArray;
8
9
  function j(n, e) {
9
10
  for (var t in e)
10
11
  n[t] = e[t];
@@ -64,14 +65,14 @@ function Ie() {
64
65
  }
65
66
  function an(n, e, t, i, s, a, o, r, u, h, d) {
66
67
  var l, f, _, p, m, v, w, g = i && i.__k || sn, C = e.length;
67
- for (u = Fn(t, e, g, u, C), l = 0; l < C; l++)
68
+ for (u = Un(t, e, g, u, C), l = 0; l < C; l++)
68
69
  (_ = t.__k[l]) != null && (f = _.__i == -1 ? Te : g[_.__i] || Te, _.__i = l, v = ot(n, _, f, s, a, o, r, u, h, d), p = _.__e, _.ref && f.ref != _.ref && (f.ref && at(f.ref, null, _), d.push(_.ref, _.__c || p, _)), m == null && p != null && (m = p), (w = !!(4 & _.__u)) || f.__k === _.__k ? u = rn(_, u, n, w) : typeof _.type == "function" && v !== void 0 ? u = v : p && (u = p.nextSibling), _.__u &= -7);
69
70
  return t.__e = m, u;
70
71
  }
71
- function Fn(n, e, t, i, s) {
72
+ function Un(n, e, t, i, s) {
72
73
  var a, o, r, u, h, d = t.length, l = d, f = 0;
73
74
  for (n.__k = new Array(s), a = 0; a < s; a++)
74
- (o = e[a]) != null && typeof o != "boolean" && typeof o != "function" ? (u = a + f, (o = n.__k[a] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Me(null, o, null, null, null) : Se(o) ? Me(q, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Me(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = n, o.__b = n.__b + 1, r = null, (h = o.__i = Un(o, t, u, l)) != -1 && (l--, (r = t[h]) && (r.__u |= 2)), r == null || r.__v == null ? (h == -1 && (s > d ? f-- : s < d && f++), typeof o.type != "function" && (o.__u |= 4)) : h != u && (h == u - 1 ? f-- : h == u + 1 ? f++ : (h > u ? f-- : f++, o.__u |= 4))) : n.__k[a] = null;
75
+ (o = e[a]) != null && typeof o != "boolean" && typeof o != "function" ? (u = a + f, (o = n.__k[a] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Me(null, o, null, null, null) : Se(o) ? Me(q, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Me(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = n, o.__b = n.__b + 1, r = null, (h = o.__i = Wn(o, t, u, l)) != -1 && (l--, (r = t[h]) && (r.__u |= 2)), r == null || r.__v == null ? (h == -1 && (s > d ? f-- : s < d && f++), typeof o.type != "function" && (o.__u |= 4)) : h != u && (h == u - 1 ? f-- : h == u + 1 ? f++ : (h > u ? f-- : f++, o.__u |= 4))) : n.__k[a] = null;
75
76
  if (l)
76
77
  for (a = 0; a < d; a++)
77
78
  (r = t[a]) != null && !(2 & r.__u) && (r.__e == i && (i = he(r)), un(r, r));
@@ -95,7 +96,7 @@ function De(n, e) {
95
96
  De(t, e);
96
97
  }) : e.push(n)), e;
97
98
  }
98
- function Un(n, e, t, i) {
99
+ function Wn(n, e, t, i) {
99
100
  var s, a, o, r = n.key, u = n.type, h = e[t], d = h != null && (2 & h.__u) == 0;
100
101
  if (h === null && n.key == null || d && r == h.key && u == h.type)
101
102
  return t;
@@ -107,7 +108,7 @@ function Un(n, e, t, i) {
107
108
  return -1;
108
109
  }
109
110
  function ft(n, e, t) {
110
- e[0] == "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Rn.test(e) ? t : t + "px";
111
+ e[0] == "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Fn.test(e) ? t : t + "px";
111
112
  }
112
113
  function ke(n, e, t, i, s) {
113
114
  var a, o;
@@ -124,7 +125,7 @@ function ke(n, e, t, i, s) {
124
125
  i && t[e] == i[e] || ft(n.style, e, t[e]);
125
126
  }
126
127
  else if (e[0] == "o" && e[1] == "n")
127
- a = e != (e = e.replace(tn, "$1")), o = e.toLowerCase(), e = o in n || e == "onFocusOut" || e == "onFocusIn" ? o.slice(2) : e.slice(2), n.l || (n.l = {}), n.l[e + a] = t, t ? i ? t.u = i.u : (t.u = it, n.addEventListener(e, a ? Je : Xe, a)) : n.removeEventListener(e, a ? Je : Xe, a);
128
+ a = e != (e = e.replace(tn, "$1")), o = e.toLowerCase(), e = o in n || e == "onFocusOut" || e == "onFocusIn" ? o.slice(2) : e.slice(2), n.l || (n.l = {}), n.l[e + a] = t, t ? i ? t.u = i.u : (t.u = it, n.addEventListener(e, a ? Je : Ze, a)) : n.removeEventListener(e, a ? Je : Ze, a);
128
129
  else {
129
130
  if (s == "http://www.w3.org/2000/svg")
130
131
  e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
@@ -150,14 +151,14 @@ function mt(n) {
150
151
  };
151
152
  }
152
153
  function ot(n, e, t, i, s, a, o, r, u, h) {
153
- var d, l, f, _, p, m, v, w, g, C, x, N, H, Z, X, K, Pe, F = e.type;
154
+ var d, l, f, _, p, m, v, w, g, C, x, N, H, X, Z, K, Pe, F = e.type;
154
155
  if (e.constructor != null)
155
156
  return null;
156
157
  128 & t.__u && (u = !!(32 & t.__u), a = [r = e.__e = t.__e]), (d = y.__b) && d(e);
157
158
  e:
158
159
  if (typeof F == "function")
159
160
  try {
160
- if (w = e.props, g = "prototype" in F && F.prototype.render, C = (d = F.contextType) && i[d.__c], x = d ? C ? C.props.value : d.__ : i, t.__c ? v = (l = e.__c = t.__c).__ = l.__E : (g ? e.__c = l = new F(w, x) : (e.__c = l = new R(w, x), l.constructor = F, l.render = jn), C && C.sub(l), l.props = w, l.state || (l.state = {}), l.context = x, l.__n = i, f = l.__d = !0, l.__h = [], l._sb = []), g && l.__s == null && (l.__s = l.state), g && F.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = j({}, l.__s)), j(l.__s, F.getDerivedStateFromProps(w, l.__s))), _ = l.props, p = l.state, l.__v = e, f)
161
+ if (w = e.props, g = "prototype" in F && F.prototype.render, C = (d = F.contextType) && i[d.__c], x = d ? C ? C.props.value : d.__ : i, t.__c ? v = (l = e.__c = t.__c).__ = l.__E : (g ? e.__c = l = new F(w, x) : (e.__c = l = new R(w, x), l.constructor = F, l.render = Vn), C && C.sub(l), l.props = w, l.state || (l.state = {}), l.context = x, l.__n = i, f = l.__d = !0, l.__h = [], l._sb = []), g && l.__s == null && (l.__s = l.state), g && F.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = j({}, l.__s)), j(l.__s, F.getDerivedStateFromProps(w, l.__s))), _ = l.props, p = l.state, l.__v = e, f)
161
162
  g && F.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), g && l.componentDidMount != null && l.__h.push(l.componentDidMount);
162
163
  else {
163
164
  if (g && F.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, x), !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, x) === !1 || e.__v == t.__v) {
@@ -172,14 +173,14 @@ function ot(n, e, t, i, s, a, o, r, u, h) {
172
173
  l.componentDidUpdate(_, p, m);
173
174
  });
174
175
  }
175
- if (l.context = x, l.props = w, l.__P = n, l.__e = !1, H = y.__r, Z = 0, g) {
176
- for (l.state = l.__s, l.__d = !1, H && H(e), d = l.render(l.props, l.state, l.context), X = 0; X < l._sb.length; X++)
177
- l.__h.push(l._sb[X]);
176
+ if (l.context = x, l.props = w, l.__P = n, l.__e = !1, H = y.__r, X = 0, g) {
177
+ for (l.state = l.__s, l.__d = !1, H && H(e), d = l.render(l.props, l.state, l.context), Z = 0; Z < l._sb.length; Z++)
178
+ l.__h.push(l._sb[Z]);
178
179
  l._sb = [];
179
180
  } else
180
181
  do
181
182
  l.__d = !1, H && H(e), d = l.render(l.props, l.state, l.context), l.state = l.__s;
182
- while (l.__d && ++Z < 25);
183
+ while (l.__d && ++X < 25);
183
184
  l.state = l.__s, l.getChildContext != null && (i = j(j({}, i), l.getChildContext())), g && !f && l.getSnapshotBeforeUpdate != null && (m = l.getSnapshotBeforeUpdate(_, p)), K = d, d != null && d.type === q && d.key == null && (K = ln(d.props.children)), r = an(n, Se(K) ? K : [K], e, t, i, s, a, o, r, u, h), l.base = e.__e, e.__u &= -161, l.__h.length && o.push(l), v && (l.__E = l.__ = null);
184
185
  } catch (se) {
185
186
  if (e.__v = null, u || a != null)
@@ -197,7 +198,7 @@ function ot(n, e, t, i, s, a, o, r, u, h) {
197
198
  y.__e(se, e, t);
198
199
  }
199
200
  else
200
- a == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : r = e.__e = Wn(t.__e, e, t, i, s, a, o, u, h);
201
+ a == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : r = e.__e = jn(t.__e, e, t, i, s, a, o, u, h);
201
202
  return (d = y.diffed) && d(e), 128 & e.__u ? void 0 : r;
202
203
  }
203
204
  function Qe(n) {
@@ -219,7 +220,7 @@ function cn(n, e, t) {
219
220
  function ln(n) {
220
221
  return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n : Se(n) ? n.map(ln) : j({}, n);
221
222
  }
222
- function Wn(n, e, t, i, s, a, o, r, u) {
223
+ function jn(n, e, t, i, s, a, o, r, u) {
223
224
  var h, d, l, f, _, p, m, v = t.props, w = e.props, g = e.type;
224
225
  if (g == "svg" ? s = "http://www.w3.org/2000/svg" : g == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"), a != null) {
225
226
  for (h = 0; h < a.length; h++)
@@ -287,14 +288,14 @@ function un(n, e, t) {
287
288
  i[s] && un(i[s], e, t || typeof n.type != "function");
288
289
  t || st(n.__e), n.__c = n.__ = n.__e = void 0;
289
290
  }
290
- function jn(n, e, t) {
291
+ function Vn(n, e, t) {
291
292
  return this.constructor(n, t);
292
293
  }
293
294
  function ce(n, e, t) {
294
295
  var i, s, a, o;
295
296
  e == document && (e = document.documentElement), y.__ && y.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, a = [], o = [], ot(e, n = (!i && t || e).__k = V(q, null, [n]), s || Te, Te, e.namespaceURI, !i && t ? [t] : s ? null : e.firstChild ? He.call(e.childNodes) : null, a, !i && t ? t : s ? s.__e : e.firstChild, i, o), cn(a, n, o);
296
297
  }
297
- function Vn(n) {
298
+ function qn(n) {
298
299
  function e(t) {
299
300
  var i, s;
300
301
  return this.getChildContext || (i = /* @__PURE__ */ new Set(), (s = {})[e.__c] = this, this.getChildContext = function() {
@@ -336,21 +337,21 @@ He = sn.slice, y = { __e: function(n, e, t, i) {
336
337
  this.__v && (this.__e = !0, n && this.__h.push(n), Ge(this));
337
338
  }, R.prototype.render = q, ne = [], Kt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, en = function(n, e) {
338
339
  return n.__v.__b - e.__v.__b;
339
- }, Ie.__r = 0, tn = /(PointerCapture)$|Capture$/i, it = 0, Xe = mt(!1), Je = mt(!0), nn = 0;
340
- var qn = 0;
340
+ }, Ie.__r = 0, tn = /(PointerCapture)$|Capture$/i, it = 0, Ze = mt(!1), Je = mt(!0), nn = 0;
341
+ var Yn = 0;
341
342
  function c(n, e, t, i, s, a) {
342
343
  e || (e = {});
343
344
  var o, r, u = e;
344
345
  if ("ref" in u)
345
346
  for (r in u = {}, e)
346
347
  r == "ref" ? o = e[r] : u[r] = e[r];
347
- var h = { type: n, props: u, key: t, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --qn, __i: -1, __u: 0, __source: s, __self: a };
348
+ var h = { type: n, props: u, key: t, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Yn, __i: -1, __u: 0, __source: s, __self: a };
348
349
  if (typeof n == "function" && (o = n.defaultProps))
349
350
  for (r in o)
350
351
  u[r] === void 0 && (u[r] = o[r]);
351
352
  return y.vnode && y.vnode(h), h;
352
353
  }
353
- const Yn = "ibiz", Zn = "is-";
354
+ const Xn = "ibiz", Zn = "is-";
354
355
  function ee(n, e, t, i, s) {
355
356
  let a = "".concat(n, "-").concat(e);
356
357
  return t && (a += "-".concat(t)), i && (a += "__".concat(i)), s && (a += "--".concat(s)), a;
@@ -373,7 +374,7 @@ class k {
373
374
  * @type {string}
374
375
  */
375
376
  T(this, "namespace");
376
- this.block = e, this.namespace = t || Yn;
377
+ this.block = e, this.namespace = t || Xn;
377
378
  }
378
379
  /**
379
380
  * namespace-block
@@ -561,7 +562,7 @@ function vt(n, e) {
561
562
  }
562
563
  return t;
563
564
  }
564
- function Xn(n, e) {
565
+ function Jn(n, e) {
565
566
  var t = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
566
567
  return t ? t === e.root ? t + i : t + n + i : i;
567
568
  }
@@ -688,7 +689,7 @@ var be = {
688
689
  format: function(e) {
689
690
  if (e === null || typeof e != "object")
690
691
  throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
691
- return Xn("/", e);
692
+ return Jn("/", e);
692
693
  },
693
694
  parse: function(e) {
694
695
  U(e);
@@ -723,9 +724,9 @@ function J() {
723
724
  function le() {
724
725
  return "".concat(J() + J(), "-").concat(J(), "-").concat(J(), "-").concat(J(), "-").concat(J()).concat(J()).concat(J());
725
726
  }
726
- const Jn = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
727
+ const Gn = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
727
728
  function rt(n) {
728
- return Jn.test(n);
729
+ return Gn.test(n);
729
730
  }
730
731
  class hn {
731
732
  /**
@@ -1004,7 +1005,7 @@ T(b, "version", 1), // 数据库连接句柄
1004
1005
  T(b, "db", null), // 上一个连接
1005
1006
  T(b, "lastLink");
1006
1007
  let W = b;
1007
- class Gn {
1008
+ class Qn {
1008
1009
  /**
1009
1010
  * Creates an instance of FileUploader.
1010
1011
  * @author tony001
@@ -1189,7 +1190,7 @@ class dn {
1189
1190
  }), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
1190
1191
  }
1191
1192
  }
1192
- class Qn {
1193
+ class Kn {
1193
1194
  /**
1194
1195
  * 从XML元素中提取CDATA内容
1195
1196
  *
@@ -1327,7 +1328,7 @@ function vn(n) {
1327
1328
  e = (e << 5) + e + n.charCodeAt(t);
1328
1329
  return Math.abs(e).toString(36).toUpperCase();
1329
1330
  }
1330
- function Kn(n) {
1331
+ function ei(n) {
1331
1332
  const e = fn(n), t = mn(n), i = vn(n), s = e + t + i;
1332
1333
  let a = "";
1333
1334
  for (let o = 0; o < n.length % 10 + 10; o++) {
@@ -1346,13 +1347,13 @@ function _n(n, e) {
1346
1347
  case "djb2":
1347
1348
  return vn(n);
1348
1349
  case "combined":
1349
- return Kn(n);
1350
+ return ei(n);
1350
1351
  case "simple":
1351
1352
  default:
1352
1353
  return fn(n);
1353
1354
  }
1354
1355
  }
1355
- function ei(n, e = 36) {
1356
+ function ti(n, e = 36) {
1356
1357
  const t = _t(n);
1357
1358
  if (t.length >= e)
1358
1359
  return t.substring(0, e);
@@ -1365,9 +1366,9 @@ function ei(n, e = 36) {
1365
1366
  }
1366
1367
  function gt(n, e = 36) {
1367
1368
  const t = _n(n, "combined");
1368
- return ei(t, e);
1369
+ return ti(t, e);
1369
1370
  }
1370
- class ti {
1371
+ class ni {
1371
1372
  /**
1372
1373
  * @description 解析工具调用
1373
1374
  * @static
@@ -1403,9 +1404,9 @@ function Oe(n, e) {
1403
1404
  return n >= t.__.length && t.__.push({}), t.__[n];
1404
1405
  }
1405
1406
  function Q(n) {
1406
- return xe = 1, ni(yn, n);
1407
+ return xe = 1, ii(yn, n);
1407
1408
  }
1408
- function ni(n, e, t) {
1409
+ function ii(n, e, t) {
1409
1410
  var i = Oe(de++, 2);
1410
1411
  if (i.t = n, !i.__c && (i.__ = [t ? t(e) : yn(void 0, e), function(r) {
1411
1412
  var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, r);
@@ -1463,7 +1464,7 @@ function wn(n) {
1463
1464
  var e = $.context[n.__c], t = Oe(de++, 9);
1464
1465
  return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub($)), e.props.value) : n.__;
1465
1466
  }
1466
- function ii() {
1467
+ function si() {
1467
1468
  for (var n; n = gn.shift(); )
1468
1469
  if (n.__P && n.__H)
1469
1470
  try {
@@ -1485,7 +1486,7 @@ A.__b = function(n) {
1485
1486
  }, A.diffed = function(n) {
1486
1487
  Ct && Ct(n);
1487
1488
  var e = n.__c;
1488
- e && e.__H && (e.__H.__h.length && (gn.push(e) !== 1 && wt === A.requestAnimationFrame || ((wt = A.requestAnimationFrame) || si)(ii)), e.__H.__.forEach(function(t) {
1489
+ e && e.__H && (e.__H.__h.length && (gn.push(e) !== 1 && wt === A.requestAnimationFrame || ((wt = A.requestAnimationFrame) || oi)(si)), e.__H.__.forEach(function(t) {
1489
1490
  t.u && (t.__H = t.u), t.u = void 0;
1490
1491
  })), Fe = $ = null;
1491
1492
  }, A.__c = function(n, e) {
@@ -1512,7 +1513,7 @@ A.__b = function(n) {
1512
1513
  }), t.__H = void 0, e && A.__e(e, t.__v));
1513
1514
  };
1514
1515
  var kt = typeof requestAnimationFrame == "function";
1515
- function si(n) {
1516
+ function oi(n) {
1516
1517
  var e, t = function() {
1517
1518
  clearTimeout(i), kt && cancelAnimationFrame(e), setTimeout(n);
1518
1519
  }, i = setTimeout(t, 35);
@@ -1534,7 +1535,7 @@ function bn(n, e) {
1534
1535
  function yn(n, e) {
1535
1536
  return typeof e == "function" ? e(n) : e;
1536
1537
  }
1537
- var oi = Symbol.for("preact-signals");
1538
+ var ai = Symbol.for("preact-signals");
1538
1539
  function ct() {
1539
1540
  if (ue > 1)
1540
1541
  ue--;
@@ -1579,7 +1580,7 @@ function Tn(n) {
1579
1580
  function L(n, e) {
1580
1581
  this.v = n, this.i = 0, this.n = void 0, this.t = void 0, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched, this.name = e == null ? void 0 : e.name;
1581
1582
  }
1582
- L.prototype.brand = oi;
1583
+ L.prototype.brand = ai;
1583
1584
  L.prototype.h = function() {
1584
1585
  return !0;
1585
1586
  };
@@ -1745,7 +1746,7 @@ function lt(n) {
1745
1746
  e.S.U(e);
1746
1747
  n.x = void 0, n.s = void 0, $n(n);
1747
1748
  }
1748
- function ai(n) {
1749
+ function ri(n) {
1749
1750
  if (S !== this)
1750
1751
  throw new Error("Out-of-order effect");
1751
1752
  kn(this), S = n, this.f &= -2, 8 & this.f && lt(this), ct();
@@ -1769,7 +1770,7 @@ pe.prototype.S = function() {
1769
1770
  throw new Error("Cycle detected");
1770
1771
  this.f |= 1, this.f &= -9, $n(this), Sn(this), ue++;
1771
1772
  var n = S;
1772
- return S = this, ai.bind(this, n);
1773
+ return S = this, ri.bind(this, n);
1773
1774
  };
1774
1775
  pe.prototype.N = function() {
1775
1776
  2 & this.f || (this.f |= 2, this.o = ye, ye = this);
@@ -1863,13 +1864,13 @@ fe("diffed", function(n, e) {
1863
1864
  t.U = a = {};
1864
1865
  for (var u in i) {
1865
1866
  var h = a[u], d = i[u];
1866
- h === void 0 ? (h = ri(t, u, d, s), a[u] = h) : h.o(d, s);
1867
+ h === void 0 ? (h = ci(t, u, d, s), a[u] = h) : h.o(d, s);
1867
1868
  }
1868
1869
  }
1869
1870
  }
1870
1871
  n(e);
1871
1872
  });
1872
- function ri(n, e, t, i) {
1873
+ function ci(n, e, t, i) {
1873
1874
  var s = e in n && n.ownerSVGElement === void 0, a = G(t);
1874
1875
  return { o: function(o, r) {
1875
1876
  a.value = o, i = r;
@@ -1933,7 +1934,7 @@ function O(n) {
1933
1934
  });
1934
1935
  }, []);
1935
1936
  }
1936
- const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z" }) }), li = () => /* @__PURE__ */ c(
1937
+ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z" }) }), ui = () => /* @__PURE__ */ c(
1937
1938
  "svg",
1938
1939
  {
1939
1940
  className: "icon",
@@ -1942,7 +1943,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
1942
1943
  xmlns: "http://www.w3.org/2000/svg",
1943
1944
  children: /* @__PURE__ */ c("path", { d: "M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z" })
1944
1945
  }
1945
- ), ui = (n) => /* @__PURE__ */ c(
1946
+ ), hi = (n) => /* @__PURE__ */ c(
1946
1947
  "svg",
1947
1948
  {
1948
1949
  viewBox: "0 0 1024 1024",
@@ -1952,14 +1953,14 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
1952
1953
  xmlns: "http://www.w3.org/2000/svg",
1953
1954
  children: /* @__PURE__ */ c("path", { d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" })
1954
1955
  }
1955
- ), hi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z" }) }), Nt = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z" }) }), di = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z" }) }), pi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z" }) }), fi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z" }) }), mi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64" }) }), vi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: [
1956
+ ), di = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z" }) }), Nt = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z" }) }), pi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z" }) }), fi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z" }) }), mi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z" }) }), vi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64" }) }), _i = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: [
1956
1957
  /* @__PURE__ */ c("path", { d: "M481.0752 263.3728l50.9952 1.024 1.8432-105.8816-50.9952-0.8192z" }),
1957
1958
  /* @__PURE__ */ c("path", { d: "M486.441426 180.895362a66.56 66.56 0 1 0 42.091944-126.290153 66.56 66.56 0 1 0-42.091944 126.290153Z" }),
1958
1959
  /* @__PURE__ */ c("path", { d: "M138.8544 664.3712c-52.8384 0-95.8464-43.008-95.8464-95.8464s43.008-95.8464 95.8464-95.8464M880.0256 472.6784c52.8384 0 95.8464 43.008 95.8464 95.8464s-43.008 95.8464-95.8464 95.8464" }),
1959
1960
  /* @__PURE__ */ c("path", { d: "M507.4944 220.5696c-220.16 0-398.7456 162.816-398.7456 363.7248s178.5856 363.7248 398.7456 363.7248 398.7456-162.816 398.7456-363.7248-178.5856-363.7248-398.7456-363.7248z m0 559.9232c-166.2976 0-301.2608-100.5568-301.2608-224.4608s134.9632-224.4608 301.2608-224.4608S808.7552 432.128 808.7552 556.032 673.792 780.4928 507.4944 780.4928z" }),
1960
1961
  /* @__PURE__ */ c("path", { d: "M319.6928 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z" }),
1961
1962
  /* @__PURE__ */ c("path", { d: "M617.472 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z" })
1962
- ] }), _i = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1963
+ ] }), gi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1963
1964
  /* @__PURE__ */ c(
1964
1965
  "path",
1965
1966
  {
@@ -1981,7 +1982,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
1981
1982
  fill: "currentColor"
1982
1983
  }
1983
1984
  )
1984
- ] }), gi = () => /* @__PURE__ */ c(
1985
+ ] }), wi = () => /* @__PURE__ */ c(
1985
1986
  "svg",
1986
1987
  {
1987
1988
  viewBox: "64 64 896 896",
@@ -1992,7 +1993,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
1992
1993
  "aria-hidden": "true",
1993
1994
  children: /* @__PURE__ */ c("path", { d: "M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z" })
1994
1995
  }
1995
- ), wi = () => /* @__PURE__ */ c(
1996
+ ), bi = () => /* @__PURE__ */ c(
1996
1997
  "svg",
1997
1998
  {
1998
1999
  fill: "currentColor",
@@ -2040,7 +2041,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2040
2041
  );
2041
2042
  })
2042
2043
  }
2043
- ), bi = (n) => /* @__PURE__ */ c(
2044
+ ), yi = (n) => /* @__PURE__ */ c(
2044
2045
  "svg",
2045
2046
  {
2046
2047
  className: n.className,
@@ -2050,7 +2051,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2050
2051
  xmlns: "http://www.w3.org/2000/svg",
2051
2052
  children: /* @__PURE__ */ c("path", { d: "M128 384a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m768 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m-372.4288 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z" })
2052
2053
  }
2053
- ), yi = (n) => /* @__PURE__ */ c(
2054
+ ), Ci = (n) => /* @__PURE__ */ c(
2054
2055
  "svg",
2055
2056
  {
2056
2057
  className: n.className,
@@ -2068,7 +2069,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2068
2069
  xmlns: "http://www.w3.org/2000/svg",
2069
2070
  children: /* @__PURE__ */ c("path", { d: "M972.657609 209.348408C987.158609 209.36839 998.930114 197.571202 998.949999 182.99865 998.969882 168.426097 987.230618 156.59651 972.729617 156.576528L32.457975 155.280806C17.956974 155.260823 6.18547 167.058012 6.165585 181.630564 6.1457 196.203116 17.884965 208.032703 32.385966 208.052686L972.657609 209.348408ZM180.466902 992.356169 180.466902 1019.014859 206.993296 1018.74074 833.361858 1012.267947 859.348284 1011.999407 859.348284 985.883377 859.348284 289.397297C859.348284 274.824732 847.59289 263.011332 833.091874 263.011332 818.590859 263.011332 806.835465 274.824732 806.835465 289.397297L806.835465 985.883377 832.82189 959.498805 206.453329 965.971599 232.979723 992.356169 232.979723 282.67005C232.979723 268.097483 221.224329 256.284085 206.723313 256.284085 192.222298 256.284085 180.466902 268.097483 180.466902 282.67005L180.466902 992.356169ZM656.410257 847.079027C656.410257 861.651593 668.165651 873.464992 682.666667 873.464992 697.167682 873.464992 708.923076 861.651593 708.923076 847.079027L708.923076 372.131659C708.923076 357.559091 697.167682 345.745694 682.666667 345.745694 668.165651 345.745694 656.410257 357.559091 656.410257 372.131659L656.410257 847.079027ZM341.333333 847.079027C341.333333 861.651593 353.08873 873.464992 367.589743 873.464992 382.090758 873.464992 393.846155 861.651593 393.846155 847.079027L393.846155 372.131659C393.846155 357.559091 382.090758 345.745694 367.589743 345.745694 353.08873 345.745694 341.333333 357.559091 341.333333 372.131659L341.333333 847.079027ZM498.871795 847.079027C498.871795 861.651593 510.627189 873.464992 525.128205 873.464992 539.62922 873.464992 551.384614 861.651593 551.384614 847.079027L551.384614 372.131659C551.384614 357.559091 539.62922 345.745694 525.128205 345.745694 510.627189 345.745694 498.871795 357.559091 498.871795 372.131659L498.871795 847.079027ZM392.147755 116.721777C392.147755 102.063669 403.758665 90.363507 418.40134 90.363507L622.925796 90.363507C637.408947 90.363507 649.179381 102.1619 649.179381 116.549585L649.179381 171.644875 701.692203 171.644875 701.692203 116.549585C701.692203 72.986607 666.38105 37.591577 622.925796 37.591577L418.40134 37.591577C374.724427 37.591577 339.634933 72.950804 339.634933 116.721777L339.634933 165.310801 392.147755 165.310801 392.147755 116.721777Z" })
2070
2071
  }
2071
- ), Ci = (n) => /* @__PURE__ */ c(
2072
+ ), Ti = (n) => /* @__PURE__ */ c(
2072
2073
  "svg",
2073
2074
  {
2074
2075
  xmlns: "http://www.w3.org/2000/svg",
@@ -2127,7 +2128,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2127
2128
  }
2128
2129
  )
2129
2130
  }
2130
- ), Ti = () => /* @__PURE__ */ c(
2131
+ ), xi = () => /* @__PURE__ */ c(
2131
2132
  "svg",
2132
2133
  {
2133
2134
  className: "icon",
@@ -2164,7 +2165,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2164
2165
  )
2165
2166
  ]
2166
2167
  }
2167
- ), xi = () => /* @__PURE__ */ c(
2168
+ ), Si = () => /* @__PURE__ */ c(
2168
2169
  "svg",
2169
2170
  {
2170
2171
  className: "icon",
@@ -2181,7 +2182,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2181
2182
  }
2182
2183
  )
2183
2184
  }
2184
- ), Si = () => /* @__PURE__ */ c(
2185
+ ), ki = () => /* @__PURE__ */ c(
2185
2186
  "svg",
2186
2187
  {
2187
2188
  className: "icon",
@@ -2192,7 +2193,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2192
2193
  height: "18",
2193
2194
  children: /* @__PURE__ */ c("path", { d: "M512.43945313 904.51953125c-6.06445313 0-12.12890625-1.58203125-17.57812501-4.74609375L136.70703125 689.71484375c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867188-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l76.37695313-44.91210938L136.97070312 540.125c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867187-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l73.38867187-43.15429688-73.125-42.890625C126.51171875 387.81054687 120.0078125 376.38476562 120.0078125 364.08007812c0-12.3046875 6.50390625-23.73046875 17.13867188-29.97070312L495.828125 122.99609375c10.8984375-6.41601563 24.34570313-6.41601563 35.24414063 0l358.15429687 210.05859375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-73.38867188 43.15429688 73.12500001 42.890625c10.63476563 6.24023438 17.13867188 17.66601563 17.13867187 29.97070312s-6.50390625 23.73046875-17.13867187 29.97070313L812.5859375 583.89453125l76.11328125 44.6484375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-358.59375 211.2890625c-5.44921875 3.1640625-11.6015625 4.74609375-17.66601563 4.74609375zM223.015625 659.65625l289.42382813 169.8046875 290.12695312-170.77148438-58.44726563-34.27734374L530.28125 750.18359375a34.67285156 34.67285156 0 0 1-35.24414063 0L281.7265625 625.02734375 223.015625 659.65625z m76.90429688-104.58984375l212.69531249 124.8046875 290.12695313-170.77148438-55.546875-32.60742187-216.65039063 127.6171875a34.67285156 34.67285156 0 0 1-35.24414062 0L279.00195312 477.28320312l-55.81054687 32.78320313 75.49804688 44.296875c0.43945313 0.26367188 0.79101563 0.52734375 1.23046874 0.703125z m-2.81250001-147.83203125l215.68359376 126.5625 216.12304687-127.17773438c0.3515625-0.26367188 0.703125-0.43945313 1.0546875-0.61523437l72.86132813-42.890625-289.33593751-169.8046875-290.12695312 170.68359375 72.59765625 42.62695313c0.43945313 0.17578125 0.79101563 0.43945313 1.14257813 0.61523437z" })
2194
2195
  }
2195
- ), ki = (n) => /* @__PURE__ */ c(
2196
+ ), Ni = (n) => /* @__PURE__ */ c(
2196
2197
  "svg",
2197
2198
  {
2198
2199
  className: n.className,
@@ -2219,7 +2220,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2219
2220
  )
2220
2221
  ]
2221
2222
  }
2222
- ), Ni = (n) => /* @__PURE__ */ c(
2223
+ ), $i = (n) => /* @__PURE__ */ c(
2223
2224
  "svg",
2224
2225
  {
2225
2226
  xmlns: "http://www.w3.org/2000/svg",
@@ -2237,7 +2238,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2237
2238
  }
2238
2239
  )
2239
2240
  }
2240
- ), $i = () => /* @__PURE__ */ c(
2241
+ ), Ei = () => /* @__PURE__ */ c(
2241
2242
  "svg",
2242
2243
  {
2243
2244
  viewBox: "0 0 1024 1024",
@@ -2251,7 +2252,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2251
2252
  /* @__PURE__ */ c("path", { d: "M341.376 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32zM512 691.2a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0v-128a32 32 0 0 1 32-32zM682.688 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32z" })
2252
2253
  ]
2253
2254
  }
2254
- ), Ei = () => /* @__PURE__ */ c(
2255
+ ), Mi = () => /* @__PURE__ */ c(
2255
2256
  "svg",
2256
2257
  {
2257
2258
  viewBox: "0 0 1024 1024",
@@ -2261,7 +2262,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2261
2262
  height: "18",
2262
2263
  children: /* @__PURE__ */ c("path", { d: "M843.251 424.407l43.828-74.898c10.194-17.946 32.596-22.158 48.956-11.598 16.298 10.499 23.44 32.658 14.223 49.566l-113.11 195.212-61.164-40.044-126.418-82.285c-16.115-11.598-20.632-34.428-10.194-51.702 9.705-17.397 31.009-23.501 47.857-13.734l89.67 59.028C748.576 295.547 615.81 180.667 461.008 180.667c-177.387 0-320.042 148.758-320.042 331.335 0 183.613 143.692 331.334 319.981 331.334 107.861 0.184 208.58-56.158 268.034-149.858 1.099-1.038 1.099-2.075 2.075-2.075 6.348-9.949 17.092-15.871 28.568-15.81 19.35 0 35.648 16.848 35.648 36.93 0 7.508-2.137 14.833-6.104 21.059-72.823 114.698-196.066 183.675-328.099 183.614-216.088 0-391.4-181.478-391.4-405.195 0-223.718 175.312-405.195 391.339-405.195 183.125-0.427 342.016 131.606 382.243 317.601z" })
2263
2264
  }
2264
- ), Mi = () => /* @__PURE__ */ c(
2265
+ ), Ai = () => /* @__PURE__ */ c(
2265
2266
  "svg",
2266
2267
  {
2267
2268
  version: "1.1",
@@ -2270,7 +2271,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2270
2271
  xmlns: "http://www.w3.org/2000/svg",
2271
2272
  children: /* @__PURE__ */ c("path", { d: "M627.498667 55.168l170.666666 170.666667a42.624 42.624 0 0 1 0 60.330666l-469.333333 469.333334A42.538667 42.538667 0 0 1 298.666667 768H128a42.666667 42.666667 0 0 1-42.666667-42.666667v-170.666666c0-11.306667 4.48-22.186667 12.501334-30.165334l469.333333-469.333333a42.624 42.624 0 0 1 60.330667 0zM896 896a42.666667 42.666667 0 0 1 0 85.333333H128a42.666667 42.666667 0 0 1 0-85.333333h768zM597.333333 145.664l-426.666666 426.666667V682.666667h110.336l426.666666-426.666667L597.333333 145.664z" })
2272
2273
  }
2273
- ), Ai = (n) => /* @__PURE__ */ c(
2274
+ ), Ii = (n) => /* @__PURE__ */ c(
2274
2275
  "svg",
2275
2276
  {
2276
2277
  xmlns: "http://www.w3.org/2000/svg",
@@ -2288,7 +2289,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2288
2289
  }
2289
2290
  )
2290
2291
  }
2291
- ), Ii = () => /* @__PURE__ */ c(
2292
+ ), Di = () => /* @__PURE__ */ c(
2292
2293
  "svg",
2293
2294
  {
2294
2295
  className: "icon",
@@ -2298,7 +2299,7 @@ const ci = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
2298
2299
  children: /* @__PURE__ */ c("path", { d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z" })
2299
2300
  }
2300
2301
  );
2301
- const Di = (n) => {
2302
+ const Li = (n) => {
2302
2303
  const { items: e } = n, t = M([]), i = new k("chat-thought-chain"), s = M([]);
2303
2304
  D(() => {
2304
2305
  s.value = e.filter((o) => o.description), s.value.length > 0 && s.value.forEach((o, r) => {
@@ -2328,7 +2329,7 @@ const Di = (n) => {
2328
2329
  onClick: () => a(r),
2329
2330
  children: [
2330
2331
  o.title,
2331
- /* @__PURE__ */ c(Ci, { className: i.e("icon") })
2332
+ /* @__PURE__ */ c(Ti, { className: i.e("icon") })
2332
2333
  ]
2333
2334
  }
2334
2335
  ),
@@ -2340,7 +2341,7 @@ const Di = (n) => {
2340
2341
  );
2341
2342
  }) });
2342
2343
  };
2343
- const Li = (n) => {
2344
+ const zi = (n) => {
2344
2345
  const { items: e, onItemClick: t } = n, i = (a, o) => {
2345
2346
  t == null || t(a, o);
2346
2347
  }, s = new k("chat-suggestions");
@@ -2355,13 +2356,13 @@ const Li = (n) => {
2355
2356
  title: a.metadata.content_name,
2356
2357
  children: [
2357
2358
  a.metadata.content_name,
2358
- /* @__PURE__ */ c(Ai, { className: "".concat(s.e("item-icon")) })
2359
+ /* @__PURE__ */ c(Ii, { className: "".concat(s.e("item-icon")) })
2359
2360
  ]
2360
2361
  },
2361
2362
  o
2362
2363
  )) });
2363
2364
  };
2364
- const zi = (n) => {
2365
+ const Hi = (n) => {
2365
2366
  const e = new k("chat-tool-call-item"), t = M(!1), i = M(!1);
2366
2367
  let s;
2367
2368
  const a = le(), o = () => {
@@ -2504,7 +2505,7 @@ const zi = (n) => {
2504
2505
  /* @__PURE__ */ c("div", { className: e.e("content"), id: "code-block-".concat(a) })
2505
2506
  ] });
2506
2507
  };
2507
- const Hi = (n) => {
2508
+ const Oi = (n) => {
2508
2509
  const { items: e } = n, t = new k("chat-tool-call"), i = M([]), s = M(!1), a = M(!1);
2509
2510
  D(() => {
2510
2511
  i.value = e.filter((u) => u), a.value = e.length > 4;
@@ -2513,11 +2514,11 @@ const Hi = (n) => {
2513
2514
  s.value = !s.value;
2514
2515
  };
2515
2516
  return /* @__PURE__ */ c("div", { className: "".concat(t.b()), children: [
2516
- o.value.map((u, h) => /* @__PURE__ */ c(zi, { item: u }, h)),
2517
+ o.value.map((u, h) => /* @__PURE__ */ c(Hi, { item: u }, h)),
2517
2518
  a.value && /* @__PURE__ */ c("div", { className: t.e("toggle"), onClick: r, children: s.value ? "收起工具调用" : "展开全部 ".concat(i.value.length, " 个工具调用") })
2518
2519
  ] });
2519
2520
  };
2520
- const te = new k("markdown-message"), Oi = (n) => {
2521
+ const te = new k("markdown-message"), Bi = (n) => {
2521
2522
  const { message: e, size: t } = n, i = M(le()), s = M(null), a = Y(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), o = Y(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), r = M({
2522
2523
  title: "",
2523
2524
  description: "",
@@ -2591,12 +2592,12 @@ const te = new k("markdown-message"), Oi = (n) => {
2591
2592
  o ? /* @__PURE__ */ c("div", { className: te.be("header", "timeout"), children: "请求超时" }) : null
2592
2593
  ] }),
2593
2594
  /* @__PURE__ */ c("div", { className: "".concat(te.b("content"), " pre-wrap-container"), children: [
2594
- /* @__PURE__ */ c(Di, { items: [r.value] }),
2595
- e.toolcalls && e.toolcalls.length > 0 ? /* @__PURE__ */ c(Hi, { items: e.toolcalls || [] }) : null,
2595
+ /* @__PURE__ */ c(Li, { items: [r.value] }),
2596
+ e.toolcalls && e.toolcalls.length > 0 ? /* @__PURE__ */ c(Oi, { items: e.toolcalls || [] }) : null,
2596
2597
  /* @__PURE__ */ c("div", { id: i })
2597
2598
  ] }),
2598
2599
  /* @__PURE__ */ c("div", { className: te.b("footer"), children: u.value.hasSuggestions ? /* @__PURE__ */ c(
2599
- Li,
2600
+ zi,
2600
2601
  {
2601
2602
  items: u.value.suggestions,
2602
2603
  onItemClick: (f, _) => {
@@ -2606,7 +2607,7 @@ const te = new k("markdown-message"), Oi = (n) => {
2606
2607
  ) : null })
2607
2608
  ] });
2608
2609
  };
2609
- const me = new k("ossfile-material"), Bi = (n) => {
2610
+ const me = new k("ossfile-material"), Pi = (n) => {
2610
2611
  const e = O(() => n.material.data.name), t = O(() => n.material.metadata.size), i = O(() => {
2611
2612
  const a = n.material.metadata.state;
2612
2613
  return a === "successed" ? "上传成功" : a === "uploading" ? "上传中" : a === "failed" ? "上传失败" : "未知状态";
@@ -2636,7 +2637,7 @@ const me = new k("ossfile-material"), Bi = (n) => {
2636
2637
  ] })
2637
2638
  ] });
2638
2639
  };
2639
- const ve = new k("common-material"), Pi = (n) => {
2640
+ const ve = new k("common-material"), Ri = (n) => {
2640
2641
  var i, s, a, o;
2641
2642
  const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find(
2642
2643
  (r) => r.id === n.material.metadata.actionId
@@ -2649,7 +2650,7 @@ const ve = new k("common-material"), Pi = (n) => {
2649
2650
  __html: e.icon.imagePath
2650
2651
  }
2651
2652
  }
2652
- ) : /* @__PURE__ */ c("img", { src: e.icon.imagePath }) : null }) : /* @__PURE__ */ c(Si, {}) }),
2653
+ ) : /* @__PURE__ */ c("img", { src: e.icon.imagePath }) : null }) : /* @__PURE__ */ c(ki, {}) }),
2653
2654
  /* @__PURE__ */ c("div", { className: ve.b("right"), children: [
2654
2655
  /* @__PURE__ */ c("div", { className: ve.e("name"), title: t, children: t }),
2655
2656
  /* @__PURE__ */ c("div", { className: ve.e("metadata"), children: /* @__PURE__ */ c("div", { children: (e == null ? void 0 : e.label) || "素材资源" }) })
@@ -2661,23 +2662,23 @@ const qe = new k("chat-input-material-item"), In = (n) => {
2661
2662
  let t = null;
2662
2663
  switch (e.type) {
2663
2664
  case "ossfile":
2664
- t = Bi;
2665
+ t = Pi;
2665
2666
  break;
2666
2667
  default:
2667
- t = Pi;
2668
+ t = Ri;
2668
2669
  }
2669
2670
  const i = () => {
2670
2671
  n.controller.deleteMaterial(e);
2671
2672
  };
2672
2673
  return /* @__PURE__ */ c("div", { className: "".concat(qe.b(), " ").concat(qe.is("disabled", n.disabled)), children: [
2673
- /* @__PURE__ */ c("div", { className: qe.e("icon"), onClick: i, children: /* @__PURE__ */ c(xi, {}) }),
2674
+ /* @__PURE__ */ c("div", { className: qe.e("icon"), onClick: i, children: /* @__PURE__ */ c(Si, {}) }),
2674
2675
  V(t, {
2675
2676
  material: e,
2676
2677
  controller: n.controller
2677
2678
  })
2678
2679
  ] });
2679
2680
  };
2680
- const oe = new k("user-message-question"), Ri = (n) => {
2681
+ const oe = new k("user-message-question"), Fi = (n) => {
2681
2682
  const e = M(le()), t = M(null), i = O(() => n.message.content), s = O(() => dn.parseMixedContent(i.value));
2682
2683
  return D(() => {
2683
2684
  t.value = new Jt({
@@ -2723,7 +2724,7 @@ const oe = new k("user-message-question"), Ri = (n) => {
2723
2724
  ] }) })
2724
2725
  ] });
2725
2726
  };
2726
- const Ne = new k("error-message"), Fi = (n) => {
2727
+ const Ne = new k("error-message"), Ui = (n) => {
2727
2728
  const e = O(() => n.message.content);
2728
2729
  return /* @__PURE__ */ c("div", { className: Ne.b(), children: [
2729
2730
  /* @__PURE__ */ c("div", { className: Ne.b("header"), children: [
@@ -2733,24 +2734,24 @@ const Ne = new k("error-message"), Fi = (n) => {
2733
2734
  /* @__PURE__ */ c("div", { className: "".concat(Ne.e("content"), " pre-wrap-container"), children: /* @__PURE__ */ c("span", { children: e }) })
2734
2735
  ] });
2735
2736
  };
2736
- const $t = new k("unknown-message"), Ui = (n) => /* @__PURE__ */ c("div", { className: $t.b(), children: /* @__PURE__ */ c("div", { className: "".concat($t.e("content"), " pre-wrap-container"), children: [
2737
+ const $t = new k("unknown-message"), Wi = (n) => /* @__PURE__ */ c("div", { className: $t.b(), children: /* @__PURE__ */ c("div", { className: "".concat($t.e("content"), " pre-wrap-container"), children: [
2737
2738
  "暂未支持的消息类型: ",
2738
2739
  n.message.type
2739
2740
  ] }) });
2740
- const Wi = new k("chat-message-item"), ji = (n) => {
2741
+ const ji = new k("chat-message-item"), Vi = (n) => {
2741
2742
  const { message: e, size: t } = n;
2742
2743
  let i = null;
2743
2744
  switch (e.type) {
2744
2745
  case "DEFAULT":
2745
- i = e.role === "ASSISTANT" ? Oi : Ri;
2746
+ i = e.role === "ASSISTANT" ? Bi : Fi;
2746
2747
  break;
2747
2748
  case "ERROR":
2748
- i = Fi;
2749
+ i = Ui;
2749
2750
  break;
2750
2751
  default:
2751
- i = Ui;
2752
+ i = Wi;
2752
2753
  }
2753
- return /* @__PURE__ */ c("div", { className: Wi.b(), children: V(i, {
2754
+ return /* @__PURE__ */ c("div", { className: ji.b(), children: V(i, {
2754
2755
  size: t,
2755
2756
  message: e,
2756
2757
  controller: n.controller,
@@ -2834,7 +2835,7 @@ class ge {
2834
2835
  * @memberof ChatMessage
2835
2836
  */
2836
2837
  computeToolCalls() {
2837
- this.toolcalls = ti.parse(this.allcontent);
2838
+ this.toolcalls = ni.parse(this.allcontent);
2838
2839
  }
2839
2840
  }
2840
2841
  class _e {
@@ -2880,7 +2881,7 @@ class Ye {
2880
2881
  return this.material.data;
2881
2882
  }
2882
2883
  }
2883
- const z = new k("chat-toolbar-item"), Vi = (n) => {
2884
+ const z = new k("chat-toolbar-item"), qi = (n) => {
2884
2885
  var m, v, w;
2885
2886
  const {
2886
2887
  model: e,
@@ -2966,14 +2967,14 @@ const z = new k("chat-toolbar-item"), Vi = (n) => {
2966
2967
  }
2967
2968
  );
2968
2969
  };
2969
- const qi = new k("chat-toolbar"), nt = (n) => {
2970
+ const Yi = new k("chat-toolbar"), nt = (n) => {
2970
2971
  const { controller: e, items: t = [], data: i, type: s, className: a, mode: o } = n, r = wn(ht);
2971
2972
  let u = [];
2972
2973
  const h = [
2973
2974
  {
2974
2975
  label: "重置对话",
2975
2976
  title: "重置对话",
2976
- icon: () => /* @__PURE__ */ c(Ei, {}),
2977
+ icon: () => /* @__PURE__ */ c(Mi, {}),
2977
2978
  onClick: () => {
2978
2979
  e.resetTopic();
2979
2980
  },
@@ -2981,7 +2982,7 @@ const qi = new k("chat-toolbar"), nt = (n) => {
2981
2982
  {
2982
2983
  label: "清空对话",
2983
2984
  title: "清空对话",
2984
- icon: () => /* @__PURE__ */ c($i, {}),
2985
+ icon: () => /* @__PURE__ */ c(Ei, {}),
2985
2986
  onClick: () => {
2986
2987
  e.clearTopic();
2987
2988
  }
@@ -2990,7 +2991,7 @@ const qi = new k("chat-toolbar"), nt = (n) => {
2990
2991
  label: "新建对话",
2991
2992
  title: "新建对话",
2992
2993
  hidden: o !== "TOPIC",
2993
- icon: () => /* @__PURE__ */ c(_i, {}),
2994
+ icon: () => /* @__PURE__ */ c(gi, {}),
2994
2995
  onClick: () => {
2995
2996
  r.newTopic && r.newTopic();
2996
2997
  }
@@ -3009,7 +3010,7 @@ const qi = new k("chat-toolbar"), nt = (n) => {
3009
3010
  {
3010
3011
  label: "删除",
3011
3012
  title: "删除",
3012
- icon: () => /* @__PURE__ */ c(hi, {}),
3013
+ icon: () => /* @__PURE__ */ c(di, {}),
3013
3014
  onClick: () => {
3014
3015
  e.deleteMessage(i);
3015
3016
  }
@@ -3017,7 +3018,7 @@ const qi = new k("chat-toolbar"), nt = (n) => {
3017
3018
  {
3018
3019
  label: "复制",
3019
3020
  title: "复制",
3020
- icon: () => /* @__PURE__ */ c(di, {}),
3021
+ icon: () => /* @__PURE__ */ c(pi, {}),
3021
3022
  onClick: () => {
3022
3023
  e.copyMessage(i);
3023
3024
  }
@@ -3027,7 +3028,7 @@ const qi = new k("chat-toolbar"), nt = (n) => {
3027
3028
  {
3028
3029
  label: "回填",
3029
3030
  title: "回填",
3030
- icon: () => /* @__PURE__ */ c(li, {}),
3031
+ icon: () => /* @__PURE__ */ c(ui, {}),
3031
3032
  onClick: () => {
3032
3033
  e.backfill(i);
3033
3034
  }
@@ -3071,8 +3072,8 @@ const qi = new k("chat-toolbar"), nt = (n) => {
3071
3072
  );
3072
3073
  }
3073
3074
  }, _ = Y(() => s === "content" && (i == null ? void 0 : i.state) === 20 && (i == null ? void 0 : i.completed) !== !0, [i == null ? void 0 : i.state, i == null ? void 0 : i.completed]);
3074
- return /* @__PURE__ */ c("div", { className: "".concat(qi.b(), " ").concat(a || ""), children: u.map((p, m) => /* @__PURE__ */ c(
3075
- Vi,
3075
+ return /* @__PURE__ */ c("div", { className: "".concat(Yi.b(), " ").concat(a || ""), children: u.map((p, m) => /* @__PURE__ */ c(
3076
+ qi,
3076
3077
  {
3077
3078
  data: i,
3078
3079
  model: p,
@@ -3083,7 +3084,7 @@ const qi = new k("chat-toolbar"), nt = (n) => {
3083
3084
  m
3084
3085
  )) });
3085
3086
  };
3086
- function Yi(n, e) {
3087
+ function Xi(n, e) {
3087
3088
  let t = null;
3088
3089
  return function(...i) {
3089
3090
  t || (t = setTimeout(() => {
@@ -3103,7 +3104,7 @@ const Zi = (n) => {
3103
3104
  top: s.value.scrollHeight,
3104
3105
  behavior: "smooth"
3105
3106
  }), (u = n.onClick) == null || u.call(n));
3106
- }, r = Yi(a, 300);
3107
+ }, r = Xi(a, 300);
3107
3108
  return Y(() => {
3108
3109
  t.value = {
3109
3110
  right: "".concat(n.right, "px"),
@@ -3121,7 +3122,7 @@ const Zi = (n) => {
3121
3122
  className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
3122
3123
  style: t.value,
3123
3124
  onClick: o,
3124
- children: /* @__PURE__ */ c(Ni, { className: i.e("icon") })
3125
+ children: /* @__PURE__ */ c($i, { className: i.e("icon") })
3125
3126
  }
3126
3127
  );
3127
3128
  };
@@ -3151,7 +3152,7 @@ const Et = new k("chat-messages"), Mt = (n) => {
3151
3152
  var l;
3152
3153
  const d = ((l = h.content) == null ? void 0 : l.length) || 0;
3153
3154
  return h.role !== "SYSTEM" ? /* @__PURE__ */ c(
3154
- ji,
3155
+ Vi,
3155
3156
  {
3156
3157
  size: d,
3157
3158
  message: h,
@@ -3181,7 +3182,7 @@ const Et = new k("chat-messages"), Mt = (n) => {
3181
3182
  )
3182
3183
  ] });
3183
3184
  };
3184
- function Xi(n, e) {
3185
+ function Ji(n, e) {
3185
3186
  for (var t in e)
3186
3187
  n[t] = e[t];
3187
3188
  return n;
@@ -3205,20 +3206,20 @@ var Dt = y.__b;
3205
3206
  y.__b = function(n) {
3206
3207
  n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Dt && Dt(n);
3207
3208
  };
3208
- var Ji = y.__e;
3209
+ var Gi = y.__e;
3209
3210
  y.__e = function(n, e, t, i) {
3210
3211
  if (n.then) {
3211
3212
  for (var s, a = e; a = a.__; )
3212
3213
  if ((s = a.__c) && s.__c)
3213
3214
  return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
3214
3215
  }
3215
- Ji(n, e, t, i);
3216
+ Gi(n, e, t, i);
3216
3217
  };
3217
3218
  var Lt = y.unmount;
3218
3219
  function Dn(n, e, t) {
3219
3220
  return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
3220
3221
  typeof i.__c == "function" && i.__c();
3221
- }), n.__c.__H = null), (n = Xi({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c.__e = !0, n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
3222
+ }), n.__c.__H = null), (n = Ji({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c.__e = !0, n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
3222
3223
  return Dn(i, e, t);
3223
3224
  })), n;
3224
3225
  }
@@ -3227,7 +3228,7 @@ function Ln(n, e, t) {
3227
3228
  return Ln(i, e, t);
3228
3229
  }), n.__c && n.__c.__P === e && (n.__e && t.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = t)), n;
3229
3230
  }
3230
- function Ze() {
3231
+ function Xe() {
3231
3232
  this.__u = 0, this.o = null, this.__b = null;
3232
3233
  }
3233
3234
  function zn(n) {
@@ -3240,7 +3241,7 @@ function $e() {
3240
3241
  y.unmount = function(n) {
3241
3242
  var e = n.__c;
3242
3243
  e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null), Lt && Lt(n);
3243
- }, (Ze.prototype = new R()).__c = function(n, e) {
3244
+ }, (Xe.prototype = new R()).__c = function(n, e) {
3244
3245
  var t = e.__c, i = this;
3245
3246
  i.o == null && (i.o = []), i.o.push(t);
3246
3247
  var s = zn(i.__v), a = !1, o = function() {
@@ -3259,9 +3260,9 @@ y.unmount = function(n) {
3259
3260
  }
3260
3261
  };
3261
3262
  i.__u++ || 32 & e.__u || i.setState({ __a: i.__b = i.__v.__k[0] }), n.then(o, o);
3262
- }, Ze.prototype.componentWillUnmount = function() {
3263
+ }, Xe.prototype.componentWillUnmount = function() {
3263
3264
  this.o = [];
3264
- }, Ze.prototype.render = function(n, e) {
3265
+ }, Xe.prototype.render = function(n, e) {
3265
3266
  if (this.__b) {
3266
3267
  if (this.__v.__k) {
3267
3268
  var t = document.createElement("div"), i = this.__v.__k[0].__c;
@@ -3282,12 +3283,12 @@ var zt = function(n, e, t) {
3282
3283
  n.i = t = t[2];
3283
3284
  }
3284
3285
  };
3285
- function Gi(n) {
3286
+ function Qi(n) {
3286
3287
  return this.getChildContext = function() {
3287
3288
  return n.context;
3288
3289
  }, n.children;
3289
3290
  }
3290
- function Qi(n) {
3291
+ function Ki(n) {
3291
3292
  var e = this, t = n.h;
3292
3293
  if (e.componentWillUnmount = function() {
3293
3294
  ce(null, e.v), e.v = null, e.h = null;
@@ -3302,10 +3303,10 @@ function Qi(n) {
3302
3303
  this.childNodes.splice(this.childNodes.indexOf(s) >>> 1, 1), e.h.removeChild(s);
3303
3304
  } };
3304
3305
  }
3305
- ce(V(Gi, { context: e.context }, n.__v), e.v);
3306
+ ce(V(Qi, { context: e.context }, n.__v), e.v);
3306
3307
  }
3307
- function Ki(n, e) {
3308
- var t = V(Qi, { __v: n, h: e });
3308
+ function es(n, e) {
3309
+ var t = V(Ki, { __v: n, h: e });
3309
3310
  return t.containerInfo = e, t;
3310
3311
  }
3311
3312
  ($e.prototype = new R()).__a = function(n) {
@@ -3329,7 +3330,7 @@ function Ki(n, e) {
3329
3330
  zt(n, t, e);
3330
3331
  });
3331
3332
  };
3332
- var es = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, ts = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, ns = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, is = /[A-Z0-9]/g, ss = typeof document < "u", os = function(n) {
3333
+ var ts = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, ns = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, is = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ss = /[A-Z0-9]/g, os = typeof document < "u", as = function(n) {
3333
3334
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
3334
3335
  };
3335
3336
  R.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
@@ -3340,18 +3341,18 @@ R.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
3340
3341
  } });
3341
3342
  });
3342
3343
  var Ht = y.event;
3343
- function as() {
3344
- }
3345
3344
  function rs() {
3346
- return this.cancelBubble;
3347
3345
  }
3348
3346
  function cs() {
3347
+ return this.cancelBubble;
3348
+ }
3349
+ function ls() {
3349
3350
  return this.defaultPrevented;
3350
3351
  }
3351
3352
  y.event = function(n) {
3352
- return Ht && (n = Ht(n)), n.persist = as, n.isPropagationStopped = rs, n.isDefaultPrevented = cs, n.nativeEvent = n;
3353
+ return Ht && (n = Ht(n)), n.persist = rs, n.isPropagationStopped = cs, n.isDefaultPrevented = ls, n.nativeEvent = n;
3353
3354
  };
3354
- var ls = { enumerable: !1, configurable: !0, get: function() {
3355
+ var us = { enumerable: !1, configurable: !0, get: function() {
3355
3356
  return this.class;
3356
3357
  } }, Ot = y.vnode;
3357
3358
  y.vnode = function(n) {
@@ -3359,17 +3360,17 @@ y.vnode = function(n) {
3359
3360
  var t = e.props, i = e.type, s = {}, a = i.indexOf("-") === -1;
3360
3361
  for (var o in t) {
3361
3362
  var r = t[o];
3362
- if (!(o === "value" && "defaultValue" in t && r == null || ss && o === "children" && i === "noscript" || o === "class" || o === "className")) {
3363
+ if (!(o === "value" && "defaultValue" in t && r == null || os && o === "children" && i === "noscript" || o === "class" || o === "className")) {
3363
3364
  var u = o.toLowerCase();
3364
- o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && r === !0 ? r = "" : u === "translate" && r === "no" ? r = !1 : u[0] === "o" && u[1] === "n" ? u === "ondoubleclick" ? o = "ondblclick" : u !== "onchange" || i !== "input" && i !== "textarea" || os(t.type) ? u === "onfocus" ? o = "onfocusin" : u === "onblur" ? o = "onfocusout" : ns.test(o) && (o = u) : u = o = "oninput" : a && ts.test(o) ? o = o.replace(is, "-$&").toLowerCase() : r === null && (r = void 0), u === "oninput" && s[o = u] && (o = "oninputCapture"), s[o] = r;
3365
+ o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && r === !0 ? r = "" : u === "translate" && r === "no" ? r = !1 : u[0] === "o" && u[1] === "n" ? u === "ondoubleclick" ? o = "ondblclick" : u !== "onchange" || i !== "input" && i !== "textarea" || as(t.type) ? u === "onfocus" ? o = "onfocusin" : u === "onblur" ? o = "onfocusout" : is.test(o) && (o = u) : u = o = "oninput" : a && ns.test(o) ? o = o.replace(ss, "-$&").toLowerCase() : r === null && (r = void 0), u === "oninput" && s[o = u] && (o = "oninputCapture"), s[o] = r;
3365
3366
  }
3366
3367
  }
3367
3368
  i == "select" && s.multiple && Array.isArray(s.value) && (s.value = De(t.children).forEach(function(h) {
3368
3369
  h.props.selected = s.value.indexOf(h.props.value) != -1;
3369
3370
  })), i == "select" && s.defaultValue != null && (s.value = De(t.children).forEach(function(h) {
3370
3371
  h.props.selected = s.multiple ? s.defaultValue.indexOf(h.props.value) != -1 : s.defaultValue == h.props.value;
3371
- })), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", ls)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
3372
- }(n), n.$$typeof = es, Ot && Ot(n);
3372
+ })), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", us)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
3373
+ }(n), n.$$typeof = ts, Ot && Ot(n);
3373
3374
  };
3374
3375
  var Bt = y.__r;
3375
3376
  y.__r = function(n) {
@@ -3382,11 +3383,11 @@ y.diffed = function(n) {
3382
3383
  t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
3383
3384
  };
3384
3385
  var Ce = /* @__PURE__ */ new Map();
3385
- function us(n) {
3386
+ function hs(n) {
3386
3387
  var e = Ce.get(n);
3387
3388
  e && e.destroy();
3388
3389
  }
3389
- function hs(n) {
3390
+ function ds(n) {
3390
3391
  var e = Ce.get(n);
3391
3392
  e && e.update();
3392
3393
  }
@@ -3417,8 +3418,8 @@ typeof window > "u" ? ((we = function(n) {
3417
3418
  x.parentNode.scrollTop && N.push([x.parentNode, x.parentNode.scrollTop]), x = x.parentNode;
3418
3419
  return function() {
3419
3420
  return N.forEach(function(H) {
3420
- var Z = H[0], X = H[1];
3421
- Z.style.scrollBehavior = "auto", Z.scrollTop = X, Z.style.scrollBehavior = null;
3421
+ var X = H[0], Z = H[1];
3422
+ X.style.scrollBehavior = "auto", X.scrollTop = Z, X.style.scrollBehavior = null;
3422
3423
  });
3423
3424
  };
3424
3425
  }(i), i.style.height = ""), _ = o.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(o.paddingTop) + parseFloat(o.paddingBottom)) : i.scrollHeight + parseFloat(o.borderTopWidth) + parseFloat(o.borderBottomWidth), o.maxHeight !== "none" && _ > parseFloat(o.maxHeight) ? (o.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(o.maxHeight)) : o.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", m && (i.style.textAlign = m), f && f(), a !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), a = _), g !== o.overflow && !m)) {
@@ -3432,9 +3433,9 @@ typeof window > "u" ? ((we = function(n) {
3432
3433
  }(t);
3433
3434
  }), n;
3434
3435
  }).destroy = function(n) {
3435
- return n && Array.prototype.forEach.call(n.length ? n : [n], us), n;
3436
- }, we.update = function(n) {
3437
3436
  return n && Array.prototype.forEach.call(n.length ? n : [n], hs), n;
3437
+ }, we.update = function(n) {
3438
+ return n && Array.prototype.forEach.call(n.length ? n : [n], ds), n;
3438
3439
  });
3439
3440
  var Rt = we, E = /* @__PURE__ */ ((n) => (n.STYLE_CACHE = "ai-chat-style-cache", n.MINIMIZE_STYLY_CHCHE = "ai-chat-minimize-style-cache", n.DATA_BASE_NAME = "ibiz-chat", n.DATA_TABLE_NAME = "history-message", n.DATA_TABLE_KEY_NAME = "id", n))(E || {});
3440
3441
  class Ft {
@@ -3446,6 +3447,11 @@ class Ft {
3446
3447
  * @param {IChatOptions} opts 聊天配置
3447
3448
  */
3448
3449
  constructor(e) {
3450
+ /**
3451
+ * 事件触发器
3452
+ * @type {EventBase}
3453
+ */
3454
+ T(this, "evt", new Rn());
3449
3455
  /**
3450
3456
  * 聊天记录
3451
3457
  *
@@ -3553,34 +3559,36 @@ class Ft {
3553
3559
  toolcalls: i.toolcalls
3554
3560
  };
3555
3561
  this.addMessage(s);
3556
- }), !0;
3562
+ }), await this.afterFecthHistory(), !0;
3557
3563
  }
3558
- if (await this.opts.history(this.context, this.params, {
3564
+ return await this.opts.history(this.context, this.params, {
3559
3565
  appDataEntityId: this.appDataEntityId,
3560
3566
  appendCurData: this.opts.appendCurData,
3561
3567
  sessionid: this.chatSessionid
3562
- })) {
3563
- if (this.opts.autoQuestion !== !1) {
3564
- const t = this.messages.value[this.messages.value.length - 1];
3565
- t.role === "USER" && (await this.opts.question(
3566
- this,
3567
- this.context,
3568
- this.params,
3569
- { appDataEntityId: this.appDataEntityId },
3570
- this.getMessages(),
3571
- this.chatSessionid
3572
- ), this.opts.action && await this.opts.action("question", t.content));
3573
- }
3574
- this.opts.appendCurContent && this.addMessage({
3575
- state: 30,
3576
- messageid: le(),
3577
- role: "USER",
3578
- type: "DEFAULT",
3579
- content: this.opts.appendCurContent,
3580
- completed: !0
3581
- });
3568
+ }) && await this.afterFecthHistory(), !0;
3569
+ }
3570
+ /**
3571
+ * 获取历史记录后续处理
3572
+ */
3573
+ async afterFecthHistory() {
3574
+ if (this.opts.appendCurContent && this.addMessage({
3575
+ state: 30,
3576
+ messageid: le(),
3577
+ role: "USER",
3578
+ type: "DEFAULT",
3579
+ content: this.opts.appendCurContent,
3580
+ completed: !0
3581
+ }), this.opts.autoQuestion !== !1) {
3582
+ const e = this.messages.value[this.messages.value.length - 1];
3583
+ e.role === "USER" && (await this.opts.question(
3584
+ this,
3585
+ this.context,
3586
+ this.params,
3587
+ { appDataEntityId: this.appDataEntityId },
3588
+ this.getMessages(),
3589
+ this.chatSessionid
3590
+ ), this.opts.action && await this.opts.action("question", e.content));
3582
3591
  }
3583
- return !0;
3584
3592
  }
3585
3593
  /**
3586
3594
  * 更新数据到indexdb
@@ -3636,7 +3644,14 @@ class Ft {
3636
3644
  */
3637
3645
  async completeMessage(e, t) {
3638
3646
  const i = this.messages.value.find((s) => s.messageid === e);
3639
- i && (i.updateCompleted(t), this.messages.value = [...this.messages.value], await this.asyncToIndexDB());
3647
+ if (i && (i.updateCompleted(t), this.messages.value = [...this.messages.value], await this.asyncToIndexDB()), this.opts.autoFill === !0) {
3648
+ const s = i || this.messages.value[this.messages.value.length - 1];
3649
+ s.role === "ASSISTANT" && s.state === 30 && this.backfill(s);
3650
+ }
3651
+ this.evt.emit("onCompleteMessage", {
3652
+ messageid: e,
3653
+ completed: t
3654
+ });
3640
3655
  }
3641
3656
  /**
3642
3657
  * 替换已经存在的聊天消息
@@ -3649,15 +3664,12 @@ class Ft {
3649
3664
  const t = this.messages.value.findIndex(
3650
3665
  (i) => i.messageid === e.messageid
3651
3666
  );
3652
- if (t !== -1 ? (this.messages.value[t].replace(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ge(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
3667
+ t !== -1 ? (this.messages.value[t].replace(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ge(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
3653
3668
  appDataEntityId: this.appDataEntityId,
3654
3669
  message: { messages: [e], sessionid: this.chatSessionid }
3655
3670
  }).then((i) => {
3656
3671
  i && i.content && this.updateRecommendPrompt(e, i.content);
3657
- }), this.opts.autoFill === !0) {
3658
- const i = t !== -1 ? this.messages.value[t] : this.messages.value[this.messages.value.length - 1];
3659
- i.role === "ASSISTANT" && i.state === 30 && this.backfill(i);
3660
- }
3672
+ });
3661
3673
  }
3662
3674
  /**
3663
3675
  * 终止消息
@@ -3898,7 +3910,7 @@ class Ft {
3898
3910
  return;
3899
3911
  const i = this.messages.value.findIndex(
3900
3912
  (a) => a.messageid === e.messageid
3901
- ), { suggestions: s } = Qn.parseMixedContent(t);
3913
+ ), { suggestions: s } = Kn.parseMixedContent(t);
3902
3914
  s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i].replace(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ge(e)], this.asyncToIndexDB());
3903
3915
  }
3904
3916
  /**
@@ -3944,8 +3956,17 @@ class Ft {
3944
3956
  throw new Error("不支持".concat(a, "推荐类型"));
3945
3957
  }
3946
3958
  }
3959
+ /**
3960
+ * 销毁
3961
+ *
3962
+ * @return {*} {Promise<void>}
3963
+ * @memberof AiChatController
3964
+ */
3965
+ async destroyed() {
3966
+ this.evt.reset();
3967
+ }
3947
3968
  }
3948
- class ds {
3969
+ class ps {
3949
3970
  /**
3950
3971
  * Creates an instance of AiTopicController.
3951
3972
  * @author tony001
@@ -4220,7 +4241,7 @@ class Hn {
4220
4241
  this.aiChat = e;
4221
4242
  }
4222
4243
  }
4223
- class ps extends Hn {
4244
+ class fs extends Hn {
4224
4245
  /**
4225
4246
  * 执行操作
4226
4247
  *
@@ -4258,7 +4279,7 @@ class ps extends Hn {
4258
4279
  }
4259
4280
  }
4260
4281
  }
4261
- class fs extends Hn {
4282
+ class ms extends Hn {
4262
4283
  /**
4263
4284
  * 执行操作
4264
4285
  *
@@ -4319,7 +4340,7 @@ class fs extends Hn {
4319
4340
  l == null || l(p, m);
4320
4341
  }
4321
4342
  };
4322
- new Gn(f).openFilePicker();
4343
+ new Qn(f).openFilePicker();
4323
4344
  }
4324
4345
  /**
4325
4346
  * 构建素材对象
@@ -4349,13 +4370,13 @@ class Ut {
4349
4370
  static getMaterialHelper(e, t) {
4350
4371
  switch (e) {
4351
4372
  case "ossfile":
4352
- return new fs(t);
4373
+ return new ms(t);
4353
4374
  default:
4354
- return new ps(t);
4375
+ return new fs(t);
4355
4376
  }
4356
4377
  }
4357
4378
  }
4358
- class ms {
4379
+ class vs {
4359
4380
  /**
4360
4381
  * Creates an instance of ChatController.
4361
4382
  * @author tony001
@@ -4415,7 +4436,7 @@ class ms {
4415
4436
  * @memberof ChatController
4416
4437
  */
4417
4438
  T(this, "aiTopicMap", /* @__PURE__ */ new Map());
4418
- this.aiTopic = new ds(this);
4439
+ this.aiTopic = new ps(this);
4419
4440
  }
4420
4441
  /**
4421
4442
  * 聊天控制器
@@ -4488,6 +4509,8 @@ class ms {
4488
4509
  contentToolbarItems: t.contentToolbarItems,
4489
4510
  footerToolbarItems: t.footerToolbarItems,
4490
4511
  questionToolbarItems: t.questionToolbarItems,
4512
+ autoClose: t.autoClose,
4513
+ openMode: t.openMode,
4491
4514
  close: () => {
4492
4515
  this.close(), t.closed && t.closed(t.context, t.params);
4493
4516
  },
@@ -4587,13 +4610,15 @@ class ms {
4587
4610
  * @date 2023-10-13 17:10:10
4588
4611
  */
4589
4612
  close() {
4590
- this.container && (ce(null, this.container), this.container.remove(), this.container = void 0);
4613
+ this.container && (ce(null, this.container), this.container.remove(), this.container = void 0), this.aiTopicMap.forEach((e) => {
4614
+ e.destroyed();
4615
+ });
4591
4616
  }
4592
4617
  }
4593
- const Ss = new ms();
4594
- const vs = new k("chat-input-material"), _s = (n) => {
4618
+ const Ns = new vs();
4619
+ const _s = new k("chat-input-material"), gs = (n) => {
4595
4620
  const e = n.controller.materials;
4596
- return /* @__PURE__ */ c("div", { className: vs.b(), children: e.value.map((t) => /* @__PURE__ */ c(
4621
+ return /* @__PURE__ */ c("div", { className: _s.b(), children: e.value.map((t) => /* @__PURE__ */ c(
4597
4622
  In,
4598
4623
  {
4599
4624
  material: t,
@@ -4671,7 +4696,7 @@ const On = ({
4671
4696
  children: n
4672
4697
  }
4673
4698
  ),
4674
- h && f.current && Ki(
4699
+ h && f.current && es(
4675
4700
  /* @__PURE__ */ c(
4676
4701
  "div",
4677
4702
  {
@@ -4751,7 +4776,7 @@ const I = new k("chat-input"), Wt = window.SpeechRecognition || window.webkitSpe
4751
4776
  ).excuteAction(v, w), t(!1);
4752
4777
  };
4753
4778
  return /* @__PURE__ */ c("div", { className: I.b("wrapper"), children: [
4754
- /* @__PURE__ */ c("div", { className: I.b("material-wrapper"), children: /* @__PURE__ */ c(_s, { controller: n.controller }) }),
4779
+ /* @__PURE__ */ c("div", { className: I.b("material-wrapper"), children: /* @__PURE__ */ c(gs, { controller: n.controller }) }),
4755
4780
  /* @__PURE__ */ c("div", { className: I.b("main-wrapper"), children: [
4756
4781
  /* @__PURE__ */ c(
4757
4782
  "textarea",
@@ -4823,7 +4848,7 @@ const I = new k("chat-input"), Wt = window.SpeechRecognition || window.webkitSpe
4823
4848
  position: "top-left",
4824
4849
  isOpen: e,
4825
4850
  onToggleOpen: t,
4826
- children: /* @__PURE__ */ c(Ti, {})
4851
+ children: /* @__PURE__ */ c(xi, {})
4827
4852
  }
4828
4853
  )
4829
4854
  }
@@ -4837,7 +4862,7 @@ const I = new k("chat-input"), Wt = window.SpeechRecognition || window.webkitSpe
4837
4862
  n.controller.isLoading.value
4838
4863
  )),
4839
4864
  onClick: r,
4840
- children: a.value ? /* @__PURE__ */ c(wi, {}) : /* @__PURE__ */ c(gi, {})
4865
+ children: a.value ? /* @__PURE__ */ c(bi, {}) : /* @__PURE__ */ c(wi, {})
4841
4866
  }
4842
4867
  ),
4843
4868
  n.controller.isLoading.value ? /* @__PURE__ */ c(
@@ -4846,7 +4871,7 @@ const I = new k("chat-input"), Wt = window.SpeechRecognition || window.webkitSpe
4846
4871
  title: "停止生成",
4847
4872
  className: "".concat(I.be("action-wrapper", "action-item")),
4848
4873
  onClick: l,
4849
- children: /* @__PURE__ */ c(ki, {})
4874
+ children: /* @__PURE__ */ c(Ni, {})
4850
4875
  }
4851
4876
  ) : /* @__PURE__ */ c(
4852
4877
  "div",
@@ -4857,14 +4882,14 @@ const I = new k("chat-input"), Wt = window.SpeechRecognition || window.webkitSpe
4857
4882
  h.value
4858
4883
  )),
4859
4884
  onClick: d,
4860
- children: /* @__PURE__ */ c(ui, {})
4885
+ children: /* @__PURE__ */ c(hi, {})
4861
4886
  }
4862
4887
  )
4863
4888
  ] })
4864
4889
  ] })
4865
4890
  ] });
4866
4891
  };
4867
- const P = new k("chat-topic-item"), gs = (n) => {
4892
+ const P = new k("chat-topic-item"), ws = (n) => {
4868
4893
  const { controller: e, topic: t, onClick: i, onAction: s } = n, a = B(null), o = O(() => {
4869
4894
  var v;
4870
4895
  return ((v = e.activedTopic.value) == null ? void 0 : v.id) === t.id;
@@ -4911,21 +4936,21 @@ const P = new k("chat-topic-item"), gs = (n) => {
4911
4936
  title: "跳转主视图",
4912
4937
  className: P.em("icon", "item"),
4913
4938
  onClick: d.bind(void 0),
4914
- children: /* @__PURE__ */ c(yi, { className: P.b("link-icon") })
4939
+ children: /* @__PURE__ */ c(Ci, { className: P.b("link-icon") })
4915
4940
  }
4916
4941
  ),
4917
4942
  o.value ? null : /* @__PURE__ */ c(
4918
4943
  On,
4919
4944
  {
4920
4945
  actions: [
4921
- { id: "RENAME", caption: "重命名", icon: /* @__PURE__ */ c(Mi, {}) },
4946
+ { id: "RENAME", caption: "重命名", icon: /* @__PURE__ */ c(Ai, {}) },
4922
4947
  { id: "DELETE", caption: "删除话题", icon: /* @__PURE__ */ c(Mn, {}) }
4923
4948
  ],
4924
4949
  position: "bottom",
4925
4950
  isOpen: r,
4926
4951
  onToggleOpen: u,
4927
4952
  onAction: l.bind(void 0),
4928
- children: /* @__PURE__ */ c("span", { className: P.em("icon", "item"), title: "更多", children: /* @__PURE__ */ c(bi, { className: P.e("more-icon") }) })
4953
+ children: /* @__PURE__ */ c("span", { className: P.em("icon", "item"), title: "更多", children: /* @__PURE__ */ c(yi, { className: P.e("more-icon") }) })
4929
4954
  }
4930
4955
  )
4931
4956
  ] })
@@ -4933,7 +4958,7 @@ const P = new k("chat-topic-item"), gs = (n) => {
4933
4958
  }
4934
4959
  );
4935
4960
  };
4936
- const Ee = new k("chat-search"), ws = (n) => {
4961
+ const Ee = new k("chat-search"), bs = (n) => {
4937
4962
  const { className: e, value: t, placeholder: i, onChange: s } = n, [a, o] = Q(!1), r = (u) => {
4938
4963
  var h;
4939
4964
  u.stopPropagation(), s == null || s((h = u.target) == null ? void 0 : h.value);
@@ -4943,7 +4968,7 @@ const Ee = new k("chat-search"), ws = (n) => {
4943
4968
  {
4944
4969
  className: "".concat(Ee.b(), " ").concat(Ee.is("focus", a), " ").concat(e || ""),
4945
4970
  children: [
4946
- /* @__PURE__ */ c("div", { className: Ee.e("prefix"), children: /* @__PURE__ */ c(Ii, {}) }),
4971
+ /* @__PURE__ */ c("div", { className: Ee.e("prefix"), children: /* @__PURE__ */ c(Di, {}) }),
4947
4972
  /* @__PURE__ */ c(
4948
4973
  "input",
4949
4974
  {
@@ -4959,7 +4984,7 @@ const Ee = new k("chat-search"), ws = (n) => {
4959
4984
  }
4960
4985
  );
4961
4986
  };
4962
- const ae = new k("chat-topics"), bs = (n) => {
4987
+ const ae = new k("chat-topics"), ys = (n) => {
4963
4988
  const e = B(null), t = M(void 0), i = M([]);
4964
4989
  D(() => {
4965
4990
  i.value = n.controller.topics.value.filter(
@@ -4991,7 +5016,7 @@ const ae = new k("chat-topics"), bs = (n) => {
4991
5016
  u == null || u.scrollIntoView({ behavior: "smooth", block: "nearest" });
4992
5017
  }, [n.controller.activedTopic.value]), /* @__PURE__ */ c("div", { className: ae.b(), children: [
4993
5018
  /* @__PURE__ */ c("div", { className: ae.e("header"), children: /* @__PURE__ */ c(
4994
- ws,
5019
+ bs,
4995
5020
  {
4996
5021
  value: t.value,
4997
5022
  placeholder: "搜索话题",
@@ -4999,7 +5024,7 @@ const ae = new k("chat-topics"), bs = (n) => {
4999
5024
  }
5000
5025
  ) }),
5001
5026
  /* @__PURE__ */ c("div", { ref: e, className: ae.e("main"), children: i.value && i.value.length > 0 ? i.value.map((r) => /* @__PURE__ */ c(
5002
- gs,
5027
+ ws,
5003
5028
  {
5004
5029
  topic: r,
5005
5030
  controller: n.controller,
@@ -5022,7 +5047,7 @@ const ae = new k("chat-topics"), bs = (n) => {
5022
5047
  ) })
5023
5048
  ] });
5024
5049
  };
5025
- const re = new k("chat-minimize"), ys = (n) => {
5050
+ const re = new k("chat-minimize"), Cs = (n) => {
5026
5051
  const e = B(null), [t, i] = Q(""), [s, a] = Q(0), o = B(!1), r = {
5027
5052
  x: (window.innerWidth - 86) / window.innerWidth,
5028
5053
  y: (window.innerHeight - 86) / window.innerHeight
@@ -5058,13 +5083,13 @@ const re = new k("chat-minimize"), ys = (n) => {
5058
5083
  p && (p.onmousedown = (m) => {
5059
5084
  document.body.style.userSelect = "none";
5060
5085
  const v = m.clientX - p.offsetLeft, w = m.clientY - p.offsetTop, g = Date.now(), C = (N) => {
5061
- const H = 56 / window.innerWidth, Z = 56 / window.innerHeight, { x: X, y: K } = pn(
5086
+ const H = 56 / window.innerWidth, X = 56 / window.innerHeight, { x: Z, y: K } = pn(
5062
5087
  N.clientX - v,
5063
5088
  N.clientY - w,
5064
5089
  H,
5065
- Z
5090
+ X
5066
5091
  );
5067
- Object.assign(r, { x: X, y: K }), requestAnimationFrame(() => {
5092
+ Object.assign(r, { x: Z, y: K }), requestAnimationFrame(() => {
5068
5093
  l();
5069
5094
  });
5070
5095
  }, x = () => {
@@ -5109,20 +5134,20 @@ const re = new k("chat-minimize"), ys = (n) => {
5109
5134
  )),
5110
5135
  children: [
5111
5136
  t && /* @__PURE__ */ c("div", { className: "".concat(re.em("content", "popover")), children: /* @__PURE__ */ c("div", { className: "typewriter", children: t }) }),
5112
- /* @__PURE__ */ c(vi, {})
5137
+ /* @__PURE__ */ c(_i, {})
5113
5138
  ]
5114
5139
  }
5115
5140
  )
5116
5141
  }
5117
5142
  );
5118
5143
  };
5119
- const ht = Vn({
5144
+ const ht = qn({
5120
5145
  zIndex: 10,
5121
5146
  enableBackFill: !0,
5122
5147
  newTopic: () => {
5123
5148
  }
5124
5149
  });
5125
- var qt, Yt, Zt, Xt;
5150
+ var qt, Yt, Xt, Zt;
5126
5151
  class Vt extends R {
5127
5152
  constructor(t) {
5128
5153
  super(t);
@@ -5174,15 +5199,33 @@ class Vt extends R {
5174
5199
  */
5175
5200
  T(this, "containerContext", {
5176
5201
  zIndex: ((qt = this.props.containerOptions) == null ? void 0 : qt.zIndex) || 10,
5177
- enableBackFill: ((Yt = this.props) == null ? void 0 : Yt.enableBackFill) !== void 0 && ((Zt = this.props) == null ? void 0 : Zt.enableBackFill) !== null ? (Xt = this.props) == null ? void 0 : Xt.enableBackFill : !0,
5202
+ enableBackFill: ((Yt = this.props) == null ? void 0 : Yt.enableBackFill) !== void 0 && ((Xt = this.props) == null ? void 0 : Xt.enableBackFill) !== null ? (Zt = this.props) == null ? void 0 : Zt.enableBackFill : !0,
5178
5203
  newTopic: () => {
5179
5204
  this.props.aiTopic.newTopic();
5180
5205
  }
5181
5206
  });
5182
5207
  this.state = {
5183
5208
  isFullScreen: !1,
5184
- isMinimize: !1
5185
- };
5209
+ isMinimize: (t == null ? void 0 : t.openMode) === "minimize" || (t == null ? void 0 : t.openMode) === "autoexpand"
5210
+ }, t == null || t.aiChat.evt.on("onCompleteMessage", () => {
5211
+ if (t.autoClose) {
5212
+ const { mode: i, duration: s = 3 } = t.autoClose;
5213
+ switch (i) {
5214
+ case "minimize":
5215
+ this.minimize();
5216
+ break;
5217
+ case "close":
5218
+ this.close();
5219
+ break;
5220
+ case "closetime":
5221
+ setTimeout(() => {
5222
+ this.close();
5223
+ }, s * 1e3);
5224
+ break;
5225
+ }
5226
+ }
5227
+ t.openMode === "autoexpand" && this.exitMinimize();
5228
+ });
5186
5229
  }
5187
5230
  /**
5188
5231
  * 计算AI窗口样式
@@ -5405,7 +5448,7 @@ class Vt extends R {
5405
5448
  ), " ").concat(this.ns.be("header-action-wrapper", "minimize")),
5406
5449
  onMouseDown: this.stopPropagation.bind(this),
5407
5450
  onClick: this.minimize.bind(this),
5408
- children: /* @__PURE__ */ c(mi, {})
5451
+ children: /* @__PURE__ */ c(vi, {})
5409
5452
  }
5410
5453
  ),
5411
5454
  this.state.isFullScreen ? /* @__PURE__ */ c(
@@ -5421,7 +5464,7 @@ class Vt extends R {
5421
5464
  )),
5422
5465
  onMouseDown: this.stopPropagation.bind(this),
5423
5466
  onClick: this.closeFullScreen.bind(this),
5424
- children: /* @__PURE__ */ c(fi, {})
5467
+ children: /* @__PURE__ */ c(mi, {})
5425
5468
  }
5426
5469
  ) : /* @__PURE__ */ c(
5427
5470
  "div",
@@ -5433,7 +5476,7 @@ class Vt extends R {
5433
5476
  ), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
5434
5477
  onMouseDown: this.stopPropagation.bind(this),
5435
5478
  onClick: this.fullScreen.bind(this),
5436
- children: /* @__PURE__ */ c(pi, {})
5479
+ children: /* @__PURE__ */ c(fi, {})
5437
5480
  }
5438
5481
  ),
5439
5482
  /* @__PURE__ */ c(
@@ -5446,13 +5489,13 @@ class Vt extends R {
5446
5489
  ), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
5447
5490
  onMouseDown: this.stopPropagation.bind(this),
5448
5491
  onClick: this.close.bind(this),
5449
- children: /* @__PURE__ */ c(ci, {})
5492
+ children: /* @__PURE__ */ c(li, {})
5450
5493
  }
5451
5494
  )
5452
5495
  ] })
5453
5496
  ] }),
5454
5497
  this.props.mode === "TOPIC" ? /* @__PURE__ */ c("div", { className: "".concat(this.ns.b("main")), children: [
5455
- /* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "left")), children: /* @__PURE__ */ c(bs, { controller: this.props.aiTopic }) }),
5498
+ /* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "left")), children: /* @__PURE__ */ c(ys, { controller: this.props.aiTopic }) }),
5456
5499
  /* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "right")), children: [
5457
5500
  /* @__PURE__ */ c("div", { className: this.ns.b("content"), children: /* @__PURE__ */ c(
5458
5501
  Mt,
@@ -5517,7 +5560,7 @@ class Vt extends R {
5517
5560
  }
5518
5561
  ),
5519
5562
  /* @__PURE__ */ c(
5520
- ys,
5563
+ Cs,
5521
5564
  {
5522
5565
  title: this.props.caption || "AI助手",
5523
5566
  controller: this.props.aiChat,
@@ -5530,5 +5573,5 @@ class Vt extends R {
5530
5573
  }
5531
5574
  export {
5532
5575
  Vt as ChatContainer,
5533
- Ss as chat
5576
+ Ns as chat
5534
5577
  };