@ibiz-template-plugin/ai-chat 0.0.28 → 0.0.30
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 +1338 -1046
- package/dist/index.legacy.js +1 -1
- package/dist/polyfills.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/chat-tool-call/chat-tool-call.d.ts +10 -0
- package/dist/types/components/chat-tool-call-item/chat-tool-call-item.d.ts +10 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +13 -0
- package/dist/types/entity/chat-message/chat-message.d.ts +6 -0
- package/dist/types/interface/i-chat-message/i-chat-message.d.ts +7 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +1 -1
- package/dist/types/interface/i-chat-tool-call/i-chat-tool-call.d.ts +39 -0
- package/dist/types/interface/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/util/chat-tool-call-parser.d.ts +16 -0
- package/dist/types/utils/util/text-hash-util.d.ts +8 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
2
|
+
var An = Object.defineProperty;
|
|
3
|
+
var In = (n, e, t) => e in n ? An(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
|
+
var S = (n, e, t) => (In(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
5
|
import Pe from "interactjs";
|
|
6
|
-
import
|
|
7
|
-
var Le, b,
|
|
8
|
-
function
|
|
6
|
+
import qt from "cherry-markdown";
|
|
7
|
+
var Le, b, Yt, Xt, ne, ct, Zt, Xe, Jt, re = {}, Gt = [], Dn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ze = Array.isArray;
|
|
8
|
+
function J(n, e) {
|
|
9
9
|
for (var t in e)
|
|
10
10
|
n[t] = e[t];
|
|
11
11
|
return n;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Kt(n) {
|
|
14
14
|
var e = n.parentNode;
|
|
15
15
|
e && e.removeChild(n);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function q(n, e, t) {
|
|
18
18
|
var i, s, o, a = {};
|
|
19
19
|
for (o in e)
|
|
20
20
|
o == "key" ? i = e[o] : o == "ref" ? s = e[o] : a[o] = e[o];
|
|
21
21
|
if (arguments.length > 2 && (a.children = arguments.length > 3 ? Le.call(arguments, 2) : t), typeof n == "function" && n.defaultProps != null)
|
|
22
22
|
for (o in n.defaultProps)
|
|
23
23
|
a[o] === void 0 && (a[o] = n.defaultProps[o]);
|
|
24
|
-
return
|
|
24
|
+
return ke(n, a, i, s, null);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++
|
|
26
|
+
function ke(n, e, t, i, s) {
|
|
27
|
+
var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++Yt : s };
|
|
28
28
|
return s == null && b.vnode != null && b.vnode(o), o;
|
|
29
29
|
}
|
|
30
30
|
function lt() {
|
|
@@ -36,15 +36,15 @@ function Y(n) {
|
|
|
36
36
|
function F(n, e) {
|
|
37
37
|
this.props = n, this.context = e;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function we(n, e) {
|
|
40
40
|
if (e == null)
|
|
41
|
-
return n.__ ?
|
|
41
|
+
return n.__ ? we(n.__, n.__.__k.indexOf(n) + 1) : null;
|
|
42
42
|
for (var t; e < n.__k.length; e++)
|
|
43
43
|
if ((t = n.__k[e]) != null && t.__e != null)
|
|
44
44
|
return t.__d || t.__e;
|
|
45
|
-
return typeof n.type == "function" ?
|
|
45
|
+
return typeof n.type == "function" ? we(n) : null;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Qt(n) {
|
|
48
48
|
var e, t;
|
|
49
49
|
if ((n = n.__) != null && n.__c != null) {
|
|
50
50
|
for (n.__e = n.__c.base = null, e = 0; e < n.__k.length; e++)
|
|
@@ -52,28 +52,28 @@ function Jt(n) {
|
|
|
52
52
|
n.__e = n.__c.base = t.__e;
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return Qt(n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function Ze(n) {
|
|
59
|
-
(!n.__d && (n.__d = !0) && ne.push(n) && !Ee.__r++ || ct !== b.debounceRendering) && ((ct = b.debounceRendering) ||
|
|
59
|
+
(!n.__d && (n.__d = !0) && ne.push(n) && !Ee.__r++ || ct !== b.debounceRendering) && ((ct = b.debounceRendering) || Zt)(Ee);
|
|
60
60
|
}
|
|
61
61
|
function Ee() {
|
|
62
|
-
var n, e, t, i, s, o, a,
|
|
62
|
+
var n, e, t, i, s, o, a, c, u;
|
|
63
63
|
for (ne.sort(Xe); n = ne.shift(); )
|
|
64
|
-
n.__d && (e = ne.length, i = void 0, s = void 0, o = void 0,
|
|
64
|
+
n.__d && (e = ne.length, i = void 0, s = void 0, o = void 0, c = (a = (t = n).__v).__e, (u = t.__P) && (i = [], s = [], (o = J({}, a)).__v = a.__v + 1, tt(u, a, o, t.__n, u.ownerSVGElement !== void 0, a.__h != null ? [c] : null, i, c == null ? we(a) : c, a.__h, s), sn(i, a, s), a.__e != c && Qt(a)), ne.length > e && ne.sort(Xe));
|
|
65
65
|
Ee.__r = 0;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
var l,
|
|
67
|
+
function en(n, e, t, i, s, o, a, c, u, h, p) {
|
|
68
|
+
var l, m, _, d, f, v, w, g, C, T = 0, x = i && i.__k || Gt, O = x.length, L = O, U = e.length;
|
|
69
69
|
for (t.__k = [], l = 0; l < U; l++)
|
|
70
|
-
(d = t.__k[l] = (d = e[l]) == null || typeof d == "boolean" || typeof d == "function" ? null : typeof d == "string" || typeof d == "number" || typeof d == "bigint" ?
|
|
71
|
-
for (t.__e =
|
|
72
|
-
|
|
70
|
+
(d = t.__k[l] = (d = e[l]) == null || typeof d == "boolean" || typeof d == "function" ? null : typeof d == "string" || typeof d == "number" || typeof d == "bigint" ? ke(null, d, null, null, d) : ze(d) ? ke(Y, { children: d }, null, null, null) : d.__b > 0 ? ke(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null ? (d.__ = t, d.__b = t.__b + 1, (g = Ln(d, x, w = l + T, L)) === -1 ? _ = re : (_ = x[g] || re, x[g] = void 0, L--), tt(n, d, _, s, o, a, c, u, h, p), f = d.__e, (m = d.ref) && _.ref != m && (_.ref && nt(_.ref, null, d), p.push(m, d.__c || f, d)), f != null && (v == null && (v = f), (C = _ === re || _.__v === null) ? g == -1 && T-- : g !== w && (g === w + 1 ? T++ : g > w ? L > U - w ? T += g - w : T-- : T = g < w && g == w - 1 ? g - w : 0), w = l + T, typeof d.type != "function" || g === w && _.__k !== d.__k ? typeof d.type == "function" || g === w && !C ? d.__d !== void 0 ? (u = d.__d, d.__d = void 0) : u = f.nextSibling : u = nn(n, f, u) : u = tn(d, u, n), typeof t.type == "function" && (t.__d = u))) : (_ = x[l]) && _.key == null && _.__e && (_.__e == u && (_.__ = i, u = we(_)), Je(_, _, !1), x[l] = null);
|
|
71
|
+
for (t.__e = v, l = O; l--; )
|
|
72
|
+
x[l] != null && (typeof t.type == "function" && x[l].__e != null && x[l].__e == t.__d && (t.__d = x[l].__e.nextSibling), Je(x[l], x[l]));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function tn(n, e, t) {
|
|
75
75
|
for (var i, s = n.__k, o = 0; s && o < s.length; o++)
|
|
76
|
-
(i = s[o]) && (i.__ = n, e = typeof i.type == "function" ?
|
|
76
|
+
(i = s[o]) && (i.__ = n, e = typeof i.type == "function" ? tn(i, e, t) : nn(t, i.__e, e));
|
|
77
77
|
return e;
|
|
78
78
|
}
|
|
79
79
|
function Me(n, e) {
|
|
@@ -81,39 +81,39 @@ function Me(n, e) {
|
|
|
81
81
|
Me(t, e);
|
|
82
82
|
}) : e.push(n)), e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function nn(n, e, t) {
|
|
85
85
|
return t == null || t.parentNode !== n ? n.insertBefore(e, null) : e == t && e.parentNode != null || n.insertBefore(e, t), e.nextSibling;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
var s = n.key, o = n.type, a = t - 1,
|
|
87
|
+
function Ln(n, e, t, i) {
|
|
88
|
+
var s = n.key, o = n.type, a = t - 1, c = t + 1, u = e[t];
|
|
89
89
|
if (u === null || u && s == u.key && o === u.type)
|
|
90
90
|
return t;
|
|
91
91
|
if (i > (u != null ? 1 : 0))
|
|
92
|
-
for (; a >= 0 ||
|
|
92
|
+
for (; a >= 0 || c < e.length; ) {
|
|
93
93
|
if (a >= 0) {
|
|
94
94
|
if ((u = e[a]) && s == u.key && o === u.type)
|
|
95
95
|
return a;
|
|
96
96
|
a--;
|
|
97
97
|
}
|
|
98
|
-
if (
|
|
99
|
-
if ((u = e[
|
|
100
|
-
return
|
|
101
|
-
|
|
98
|
+
if (c < e.length) {
|
|
99
|
+
if ((u = e[c]) && s == u.key && o === u.type)
|
|
100
|
+
return c;
|
|
101
|
+
c++;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
return -1;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function zn(n, e, t, i, s) {
|
|
107
107
|
var o;
|
|
108
108
|
for (o in t)
|
|
109
|
-
o === "children" || o === "key" || o in e ||
|
|
109
|
+
o === "children" || o === "key" || o in e || Ae(n, o, null, t[o], i);
|
|
110
110
|
for (o in e)
|
|
111
|
-
s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] ||
|
|
111
|
+
s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] || Ae(n, o, e[o], t[o], i);
|
|
112
112
|
}
|
|
113
113
|
function ut(n, e, t) {
|
|
114
|
-
e[0] === "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" ||
|
|
114
|
+
e[0] === "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Dn.test(e) ? t : t + "px";
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Ae(n, e, t, i, s) {
|
|
117
117
|
var o;
|
|
118
118
|
e:
|
|
119
119
|
if (e === "style")
|
|
@@ -153,46 +153,46 @@ function dt(n) {
|
|
|
153
153
|
function ht(n) {
|
|
154
154
|
return this.l[n.type + !0](b.event ? b.event(n) : n);
|
|
155
155
|
}
|
|
156
|
-
function tt(n, e, t, i, s, o, a,
|
|
157
|
-
var p, l,
|
|
156
|
+
function tt(n, e, t, i, s, o, a, c, u, h) {
|
|
157
|
+
var p, l, m, _, d, f, v, w, g, C, T, x, O, L, U, z = e.type;
|
|
158
158
|
if (e.constructor !== void 0)
|
|
159
159
|
return null;
|
|
160
|
-
t.__h != null && (u = t.__h,
|
|
160
|
+
t.__h != null && (u = t.__h, c = e.__e = t.__e, e.__h = null, o = [c]), (p = b.__b) && p(e);
|
|
161
161
|
e:
|
|
162
162
|
if (typeof z == "function")
|
|
163
163
|
try {
|
|
164
|
-
if (w = e.props, g = (p = z.contextType) && i[p.__c],
|
|
164
|
+
if (w = e.props, g = (p = z.contextType) && i[p.__c], C = p ? g ? g.props.value : p.__ : i, t.__c ? v = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(w, C) : (e.__c = l = new F(w, C), l.constructor = z, l.render = On), g && g.sub(l), l.props = w, l.state || (l.state = {}), l.context = C, l.__n = i, m = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = J({}, l.__s)), J(l.__s, z.getDerivedStateFromProps(w, l.__s))), _ = l.props, d = l.state, l.__v = e, m)
|
|
165
165
|
z.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), l.componentDidMount != null && l.__h.push(l.componentDidMount);
|
|
166
166
|
else {
|
|
167
|
-
if (z.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w,
|
|
168
|
-
for (e.__v !== t.__v && (l.props = w, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(
|
|
169
|
-
|
|
170
|
-
}),
|
|
171
|
-
l.__h.push(l._sb[
|
|
167
|
+
if (z.getDerivedStateFromProps == null && w !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, C), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, C) === !1 || e.__v === t.__v)) {
|
|
168
|
+
for (e.__v !== t.__v && (l.props = w, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(Ce) {
|
|
169
|
+
Ce && (Ce.__ = e);
|
|
170
|
+
}), T = 0; T < l._sb.length; T++)
|
|
171
|
+
l.__h.push(l._sb[T]);
|
|
172
172
|
l._sb = [], l.__h.length && a.push(l);
|
|
173
173
|
break e;
|
|
174
174
|
}
|
|
175
|
-
l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s,
|
|
175
|
+
l.componentWillUpdate != null && l.componentWillUpdate(w, l.__s, C), l.componentDidUpdate != null && l.__h.push(function() {
|
|
176
176
|
l.componentDidUpdate(_, d, f);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
if (l.context =
|
|
180
|
-
for (l.state = l.__s, l.__d = !1,
|
|
179
|
+
if (l.context = C, l.props = w, l.__P = n, l.__e = !1, x = b.__r, O = 0, "prototype" in z && z.prototype.render) {
|
|
180
|
+
for (l.state = l.__s, l.__d = !1, x && x(e), p = l.render(l.props, l.state, l.context), L = 0; L < l._sb.length; L++)
|
|
181
181
|
l.__h.push(l._sb[L]);
|
|
182
182
|
l._sb = [];
|
|
183
183
|
} else
|
|
184
184
|
do
|
|
185
|
-
l.__d = !1,
|
|
185
|
+
l.__d = !1, x && x(e), p = l.render(l.props, l.state, l.context), l.state = l.__s;
|
|
186
186
|
while (l.__d && ++O < 25);
|
|
187
|
-
l.state = l.__s, l.getChildContext != null && (i =
|
|
188
|
-
} catch (
|
|
189
|
-
e.__v = null, (u || o != null) && (e.__e =
|
|
187
|
+
l.state = l.__s, l.getChildContext != null && (i = J(J({}, i), l.getChildContext())), m || l.getSnapshotBeforeUpdate == null || (f = l.getSnapshotBeforeUpdate(_, d)), en(n, ze(U = p != null && p.type === Y && p.key == null ? p.props.children : p) ? U : [U], e, t, i, s, o, a, c, u, h), l.base = e.__e, e.__h = null, l.__h.length && a.push(l), v && (l.__E = l.__ = null);
|
|
188
|
+
} catch (Ce) {
|
|
189
|
+
e.__v = null, (u || o != null) && (e.__e = c, e.__h = !!u, o[o.indexOf(c)] = null), b.__e(Ce, e, t);
|
|
190
190
|
}
|
|
191
191
|
else
|
|
192
|
-
o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e =
|
|
192
|
+
o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = Hn(t.__e, e, t, i, s, o, a, u, h);
|
|
193
193
|
(p = b.diffed) && p(e);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function sn(n, e, t) {
|
|
196
196
|
for (var i = 0; i < t.length; i++)
|
|
197
197
|
nt(t[i], t[++i], t[++i]);
|
|
198
198
|
b.__c && b.__c(e, n), n.some(function(s) {
|
|
@@ -205,8 +205,8 @@ function tn(n, e, t) {
|
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
var h, p, l,
|
|
208
|
+
function Hn(n, e, t, i, s, o, a, c, u) {
|
|
209
|
+
var h, p, l, m = t.props, _ = e.props, d = e.type, f = 0;
|
|
210
210
|
if (d === "svg" && (s = !0), o != null) {
|
|
211
211
|
for (; f < o.length; f++)
|
|
212
212
|
if ((h = o[f]) && "setAttribute" in h == !!d && (d ? h.localName === d : h.nodeType === 3)) {
|
|
@@ -217,23 +217,23 @@ function $n(n, e, t, i, s, o, a, r, u) {
|
|
|
217
217
|
if (n == null) {
|
|
218
218
|
if (d === null)
|
|
219
219
|
return document.createTextNode(_);
|
|
220
|
-
n = s ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, _.is && _), o = null,
|
|
220
|
+
n = s ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, _.is && _), o = null, c = !1;
|
|
221
221
|
}
|
|
222
222
|
if (d === null)
|
|
223
|
-
|
|
223
|
+
m === _ || c && n.data === _ || (n.data = _);
|
|
224
224
|
else {
|
|
225
|
-
if (o = o && Le.call(n.childNodes), p = (
|
|
225
|
+
if (o = o && Le.call(n.childNodes), p = (m = t.props || re).dangerouslySetInnerHTML, l = _.dangerouslySetInnerHTML, !c) {
|
|
226
226
|
if (o != null)
|
|
227
|
-
for (
|
|
228
|
-
|
|
227
|
+
for (m = {}, f = 0; f < n.attributes.length; f++)
|
|
228
|
+
m[n.attributes[f].name] = n.attributes[f].value;
|
|
229
229
|
(l || p) && (l && (p && l.__html == p.__html || l.__html === n.innerHTML) || (n.innerHTML = l && l.__html || ""));
|
|
230
230
|
}
|
|
231
|
-
if (
|
|
231
|
+
if (zn(n, _, m, s, c), l)
|
|
232
232
|
e.__k = [];
|
|
233
|
-
else if (
|
|
233
|
+
else if (en(n, ze(f = e.props.children) ? f : [f], e, t, i, s && d !== "foreignObject", o, a, o ? o[0] : t.__k && we(t, 0), c, u), o != null)
|
|
234
234
|
for (f = o.length; f--; )
|
|
235
|
-
o[f] != null &&
|
|
236
|
-
|
|
235
|
+
o[f] != null && Kt(o[f]);
|
|
236
|
+
c || ("value" in _ && (f = _.value) !== void 0 && (f !== n.value || d === "progress" && !f || d === "option" && f !== m.value) && Ae(n, "value", f, m.value, !1), "checked" in _ && (f = _.checked) !== void 0 && f !== n.checked && Ae(n, "checked", f, m.checked, !1));
|
|
237
237
|
}
|
|
238
238
|
return n;
|
|
239
239
|
}
|
|
@@ -244,7 +244,7 @@ function nt(n, e, t) {
|
|
|
244
244
|
b.__e(i, t);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function Je(n, e, t) {
|
|
248
248
|
var i, s;
|
|
249
249
|
if (b.unmount && b.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || nt(i, null, e)), (i = n.__c) != null) {
|
|
250
250
|
if (i.componentWillUnmount)
|
|
@@ -257,63 +257,63 @@ function Ge(n, e, t) {
|
|
|
257
257
|
}
|
|
258
258
|
if (i = n.__k)
|
|
259
259
|
for (s = 0; s < i.length; s++)
|
|
260
|
-
i[s] &&
|
|
261
|
-
t || n.__e == null ||
|
|
260
|
+
i[s] && Je(i[s], e, t || typeof n.type != "function");
|
|
261
|
+
t || n.__e == null || Kt(n.__e), n.__ = n.__e = n.__d = void 0;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function On(n, e, t) {
|
|
264
264
|
return this.constructor(n, t);
|
|
265
265
|
}
|
|
266
266
|
function ae(n, e, t) {
|
|
267
267
|
var i, s, o, a;
|
|
268
|
-
b.__ && b.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], a = [], tt(e, n = (!i && t || e).__k =
|
|
268
|
+
b.__ && b.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], a = [], tt(e, n = (!i && t || e).__k = q(Y, null, [n]), s || re, re, e.ownerSVGElement !== void 0, !i && t ? [t] : s ? null : e.firstChild ? Le.call(e.childNodes) : null, o, !i && t ? t : s ? s.__e : e.firstChild, i, a), sn(o, n, a);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
var t = { __c: e = "__cC" +
|
|
270
|
+
function Bn(n, e) {
|
|
271
|
+
var t = { __c: e = "__cC" + Jt++, __: n, Consumer: function(i, s) {
|
|
272
272
|
return i.children(s);
|
|
273
273
|
}, Provider: function(i) {
|
|
274
274
|
var s, o;
|
|
275
275
|
return this.getChildContext || (s = [], (o = {})[e] = this, this.getChildContext = function() {
|
|
276
276
|
return o;
|
|
277
277
|
}, this.shouldComponentUpdate = function(a) {
|
|
278
|
-
this.props.value !== a.value && s.some(function(
|
|
279
|
-
|
|
278
|
+
this.props.value !== a.value && s.some(function(c) {
|
|
279
|
+
c.__e = !0, Ze(c);
|
|
280
280
|
});
|
|
281
281
|
}, this.sub = function(a) {
|
|
282
282
|
s.push(a);
|
|
283
|
-
var
|
|
283
|
+
var c = a.componentWillUnmount;
|
|
284
284
|
a.componentWillUnmount = function() {
|
|
285
|
-
s.splice(s.indexOf(a), 1),
|
|
285
|
+
s.splice(s.indexOf(a), 1), c && c.call(a);
|
|
286
286
|
};
|
|
287
287
|
}), i.children;
|
|
288
288
|
} };
|
|
289
289
|
return t.Provider.__ = t.Consumer.contextType = t;
|
|
290
290
|
}
|
|
291
|
-
Le =
|
|
291
|
+
Le = Gt.slice, b = { __e: function(n, e, t, i) {
|
|
292
292
|
for (var s, o, a; e = e.__; )
|
|
293
293
|
if ((s = e.__c) && !s.__)
|
|
294
294
|
try {
|
|
295
295
|
if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(n)), a = s.__d), s.componentDidCatch != null && (s.componentDidCatch(n, i || {}), a = s.__d), a)
|
|
296
296
|
return s.__E = s;
|
|
297
|
-
} catch (
|
|
298
|
-
n =
|
|
297
|
+
} catch (c) {
|
|
298
|
+
n = c;
|
|
299
299
|
}
|
|
300
300
|
throw n;
|
|
301
|
-
} },
|
|
301
|
+
} }, Yt = 0, Xt = function(n) {
|
|
302
302
|
return n != null && n.constructor === void 0;
|
|
303
303
|
}, F.prototype.setState = function(n, e) {
|
|
304
304
|
var t;
|
|
305
|
-
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s =
|
|
305
|
+
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = J({}, this.state), typeof n == "function" && (n = n(J({}, t), this.props)), n && J(t, n), n != null && this.__v && (e && this._sb.push(e), Ze(this));
|
|
306
306
|
}, F.prototype.forceUpdate = function(n) {
|
|
307
307
|
this.__v && (this.__e = !0, n && this.__h.push(n), Ze(this));
|
|
308
|
-
}, F.prototype.render = Y, ne = [],
|
|
308
|
+
}, F.prototype.render = Y, ne = [], Zt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Xe = function(n, e) {
|
|
309
309
|
return n.__v.__b - e.__v.__b;
|
|
310
|
-
}, Ee.__r = 0,
|
|
311
|
-
const
|
|
310
|
+
}, Ee.__r = 0, Jt = 0;
|
|
311
|
+
const Pn = "ibiz", Rn = "is-";
|
|
312
312
|
function ee(n, e, t, i, s) {
|
|
313
313
|
let o = "".concat(n, "-").concat(e);
|
|
314
314
|
return t && (o += "-".concat(t)), i && (o += "__".concat(i)), s && (o += "--".concat(s)), o;
|
|
315
315
|
}
|
|
316
|
-
class
|
|
316
|
+
class k {
|
|
317
317
|
/**
|
|
318
318
|
* Creates an instance of Namespace.
|
|
319
319
|
*
|
|
@@ -330,8 +330,8 @@ class M {
|
|
|
330
330
|
* @date 2023-11-03 10:11:31
|
|
331
331
|
* @type {string}
|
|
332
332
|
*/
|
|
333
|
-
|
|
334
|
-
this.block = e, this.namespace = t ||
|
|
333
|
+
S(this, "namespace");
|
|
334
|
+
this.block = e, this.namespace = t || Pn;
|
|
335
335
|
}
|
|
336
336
|
/**
|
|
337
337
|
* namespace-block
|
|
@@ -429,7 +429,7 @@ class M {
|
|
|
429
429
|
* @return {*} {string}
|
|
430
430
|
*/
|
|
431
431
|
is(e, t) {
|
|
432
|
-
return e && t ? "".concat(
|
|
432
|
+
return e && t ? "".concat(Rn).concat(e) : "";
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* 生成使用到的 css 变量 style 对象
|
|
@@ -487,39 +487,39 @@ function W(n) {
|
|
|
487
487
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
488
488
|
}
|
|
489
489
|
function pt(n, e) {
|
|
490
|
-
for (var t = "", i = 0, s = -1, o = 0, a,
|
|
491
|
-
if (
|
|
492
|
-
a = n.charCodeAt(
|
|
490
|
+
for (var t = "", i = 0, s = -1, o = 0, a, c = 0; c <= n.length; ++c) {
|
|
491
|
+
if (c < n.length)
|
|
492
|
+
a = n.charCodeAt(c);
|
|
493
493
|
else {
|
|
494
494
|
if (a === 47)
|
|
495
495
|
break;
|
|
496
496
|
a = 47;
|
|
497
497
|
}
|
|
498
498
|
if (a === 47) {
|
|
499
|
-
if (!(s ===
|
|
500
|
-
if (s !==
|
|
499
|
+
if (!(s === c - 1 || o === 1))
|
|
500
|
+
if (s !== c - 1 && o === 2) {
|
|
501
501
|
if (t.length < 2 || i !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
|
|
502
502
|
if (t.length > 2) {
|
|
503
503
|
var u = t.lastIndexOf("/");
|
|
504
504
|
if (u !== t.length - 1) {
|
|
505
|
-
u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s =
|
|
505
|
+
u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s = c, o = 0;
|
|
506
506
|
continue;
|
|
507
507
|
}
|
|
508
508
|
} else if (t.length === 2 || t.length === 1) {
|
|
509
|
-
t = "", i = 0, s =
|
|
509
|
+
t = "", i = 0, s = c, o = 0;
|
|
510
510
|
continue;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
e && (t.length > 0 ? t += "/.." : t = "..", i = 2);
|
|
514
514
|
} else
|
|
515
|
-
t.length > 0 ? t += "/" + n.slice(s + 1,
|
|
516
|
-
s =
|
|
515
|
+
t.length > 0 ? t += "/" + n.slice(s + 1, c) : t = n.slice(s + 1, c), i = c - s - 1;
|
|
516
|
+
s = c, o = 0;
|
|
517
517
|
} else
|
|
518
518
|
a === 46 && o !== -1 ? ++o : o = -1;
|
|
519
519
|
}
|
|
520
520
|
return t;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Fn(n, e) {
|
|
523
523
|
var t = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
|
|
524
524
|
return t ? t === e.root ? t + i : t + n + i : i;
|
|
525
525
|
}
|
|
@@ -557,7 +557,7 @@ var ve = {
|
|
|
557
557
|
;
|
|
558
558
|
for (var s = e.length, o = s - i, a = 1; a < t.length && t.charCodeAt(a) === 47; ++a)
|
|
559
559
|
;
|
|
560
|
-
for (var
|
|
560
|
+
for (var c = t.length, u = c - a, h = o < u ? o : u, p = -1, l = 0; l <= h; ++l) {
|
|
561
561
|
if (l === h) {
|
|
562
562
|
if (u > h) {
|
|
563
563
|
if (t.charCodeAt(a + l) === 47)
|
|
@@ -568,10 +568,10 @@ var ve = {
|
|
|
568
568
|
o > h && (e.charCodeAt(i + l) === 47 ? p = l : l === 0 && (p = 0));
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
if (
|
|
571
|
+
var m = e.charCodeAt(i + l), _ = t.charCodeAt(a + l);
|
|
572
|
+
if (m !== _)
|
|
573
573
|
break;
|
|
574
|
-
|
|
574
|
+
m === 47 && (p = l);
|
|
575
575
|
}
|
|
576
576
|
var d = "";
|
|
577
577
|
for (l = i + p + 1; l <= s; ++l)
|
|
@@ -602,7 +602,7 @@ var ve = {
|
|
|
602
602
|
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
603
603
|
if (t.length === e.length && t === e)
|
|
604
604
|
return "";
|
|
605
|
-
var
|
|
605
|
+
var c = t.length - 1, u = -1;
|
|
606
606
|
for (a = e.length - 1; a >= 0; --a) {
|
|
607
607
|
var h = e.charCodeAt(a);
|
|
608
608
|
if (h === 47) {
|
|
@@ -611,7 +611,7 @@ var ve = {
|
|
|
611
611
|
break;
|
|
612
612
|
}
|
|
613
613
|
} else
|
|
614
|
-
u === -1 && (o = !1, u = a + 1),
|
|
614
|
+
u === -1 && (o = !1, u = a + 1), c >= 0 && (h === t.charCodeAt(c) ? --c === -1 && (s = a) : (c = -1, s = u));
|
|
615
615
|
}
|
|
616
616
|
return i === s ? s = u : s === -1 && (s = e.length), e.slice(i, s);
|
|
617
617
|
} else {
|
|
@@ -628,16 +628,16 @@ var ve = {
|
|
|
628
628
|
},
|
|
629
629
|
extname: function(e) {
|
|
630
630
|
W(e);
|
|
631
|
-
for (var t = -1, i = 0, s = -1, o = !0, a = 0,
|
|
632
|
-
var u = e.charCodeAt(
|
|
631
|
+
for (var t = -1, i = 0, s = -1, o = !0, a = 0, c = e.length - 1; c >= 0; --c) {
|
|
632
|
+
var u = e.charCodeAt(c);
|
|
633
633
|
if (u === 47) {
|
|
634
634
|
if (!o) {
|
|
635
|
-
i =
|
|
635
|
+
i = c + 1;
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
continue;
|
|
639
639
|
}
|
|
640
|
-
s === -1 && (o = !1, s =
|
|
640
|
+
s === -1 && (o = !1, s = c + 1), u === 46 ? t === -1 ? t = c : a !== 1 && (a = 1) : t !== -1 && (a = -1);
|
|
641
641
|
}
|
|
642
642
|
return t === -1 || s === -1 || // We saw a non-dot character immediately before the dot
|
|
643
643
|
a === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
@@ -646,7 +646,7 @@ var ve = {
|
|
|
646
646
|
format: function(e) {
|
|
647
647
|
if (e === null || typeof e != "object")
|
|
648
648
|
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
|
|
649
|
-
return
|
|
649
|
+
return Fn("/", e);
|
|
650
650
|
},
|
|
651
651
|
parse: function(e) {
|
|
652
652
|
W(e);
|
|
@@ -655,10 +655,10 @@ var ve = {
|
|
|
655
655
|
return t;
|
|
656
656
|
var i = e.charCodeAt(0), s = i === 47, o;
|
|
657
657
|
s ? (t.root = "/", o = 1) : o = 0;
|
|
658
|
-
for (var a = -1,
|
|
658
|
+
for (var a = -1, c = 0, u = -1, h = !0, p = e.length - 1, l = 0; p >= o; --p) {
|
|
659
659
|
if (i = e.charCodeAt(p), i === 47) {
|
|
660
660
|
if (!h) {
|
|
661
|
-
|
|
661
|
+
c = p + 1;
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
664
664
|
continue;
|
|
@@ -667,7 +667,7 @@ var ve = {
|
|
|
667
667
|
}
|
|
668
668
|
return a === -1 || u === -1 || // We saw a non-dot character immediately before the dot
|
|
669
669
|
l === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
670
|
-
l === 1 && a === u - 1 && a ===
|
|
670
|
+
l === 1 && a === u - 1 && a === c + 1 ? u !== -1 && (c === 0 && s ? t.base = t.name = e.slice(1, u) : t.base = t.name = e.slice(c, u)) : (c === 0 && s ? (t.name = e.slice(1, a), t.base = e.slice(1, u)) : (t.name = e.slice(c, a), t.base = e.slice(c, u)), t.ext = e.slice(a, u)), c > 0 ? t.dir = e.slice(0, c - 1) : s && (t.dir = "/"), t;
|
|
671
671
|
},
|
|
672
672
|
sep: "/",
|
|
673
673
|
delimiter: ":",
|
|
@@ -678,14 +678,14 @@ ve.posix = ve;
|
|
|
678
678
|
function Z() {
|
|
679
679
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function ce() {
|
|
682
682
|
return "".concat(Z() + Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z(), "-").concat(Z()).concat(Z()).concat(Z());
|
|
683
683
|
}
|
|
684
|
-
const
|
|
684
|
+
const Un = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
685
685
|
function it(n) {
|
|
686
|
-
return
|
|
686
|
+
return Un.test(n);
|
|
687
687
|
}
|
|
688
|
-
class
|
|
688
|
+
class on {
|
|
689
689
|
/**
|
|
690
690
|
* 拷贝文本
|
|
691
691
|
*
|
|
@@ -706,7 +706,7 @@ class nn {
|
|
|
706
706
|
* @private
|
|
707
707
|
* @type {(HTMLInputElement | null)}
|
|
708
708
|
*/
|
|
709
|
-
|
|
709
|
+
S(on, "inputElement", null);
|
|
710
710
|
const y = class y {
|
|
711
711
|
/**
|
|
712
712
|
* 检查数据库是否存在
|
|
@@ -752,14 +752,14 @@ const y = class y {
|
|
|
752
752
|
static async checkTableExists(e, t) {
|
|
753
753
|
return await y.checkDataBaseExists(e) ? new Promise((s, o) => {
|
|
754
754
|
const a = indexedDB.open(e);
|
|
755
|
-
a.onupgradeneeded = (
|
|
756
|
-
y.db =
|
|
757
|
-
}, a.onsuccess = (
|
|
758
|
-
y.db =
|
|
755
|
+
a.onupgradeneeded = (c) => {
|
|
756
|
+
y.db = c.target.result, y.version = y.db.version;
|
|
757
|
+
}, a.onsuccess = (c) => {
|
|
758
|
+
y.db = c.target.result, y.lastLink = a.result;
|
|
759
759
|
const u = y.db.objectStoreNames.contains(t);
|
|
760
760
|
a.result.close(), s(u);
|
|
761
|
-
}, a.onerror = (
|
|
762
|
-
o(
|
|
761
|
+
}, a.onerror = (c) => {
|
|
762
|
+
o(c.target.error);
|
|
763
763
|
};
|
|
764
764
|
}) : !1;
|
|
765
765
|
}
|
|
@@ -774,8 +774,8 @@ const y = class y {
|
|
|
774
774
|
*/
|
|
775
775
|
static async createTable(e, t, i, s = !1) {
|
|
776
776
|
return new Promise((o) => {
|
|
777
|
-
var
|
|
778
|
-
y.version += 1, y.lastLink && ((u = (
|
|
777
|
+
var c, u;
|
|
778
|
+
y.version += 1, y.lastLink && ((u = (c = y.lastLink).close) == null || u.call(c));
|
|
779
779
|
const a = indexedDB.open(e, y.version);
|
|
780
780
|
a.onupgradeneeded = (h) => {
|
|
781
781
|
if (y.db = h.target.result, !y.db.objectStoreNames.contains(t)) {
|
|
@@ -801,10 +801,10 @@ const y = class y {
|
|
|
801
801
|
var o, a;
|
|
802
802
|
y.version += 1, y.lastLink && ((a = (o = y.lastLink).close) == null || a.call(o));
|
|
803
803
|
const s = indexedDB.open(e, y.version);
|
|
804
|
-
s.onupgradeneeded = (
|
|
805
|
-
y.db =
|
|
806
|
-
}, s.onsuccess = (
|
|
807
|
-
y.db =
|
|
804
|
+
s.onupgradeneeded = (c) => {
|
|
805
|
+
y.db = c.target.result, y.lastLink = s.result, y.db.objectStoreNames.contains(t) && y.db.deleteObjectStore(t);
|
|
806
|
+
}, s.onsuccess = (c) => {
|
|
807
|
+
y.db = c.target.result, y.lastLink = s.result, s.result.close(), i(!0);
|
|
808
808
|
}, s.onerror = () => {
|
|
809
809
|
s.result.close(), i(!1);
|
|
810
810
|
};
|
|
@@ -821,8 +821,8 @@ const y = class y {
|
|
|
821
821
|
static async addData(e, t, i) {
|
|
822
822
|
return new Promise((s, o) => {
|
|
823
823
|
const a = indexedDB.open(e);
|
|
824
|
-
a.onsuccess = (
|
|
825
|
-
if (y.db =
|
|
824
|
+
a.onsuccess = (c) => {
|
|
825
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
826
826
|
const p = y.db.transaction([t], "readwrite").objectStore(t).add(i);
|
|
827
827
|
p.onsuccess = (l) => {
|
|
828
828
|
s(i);
|
|
@@ -847,8 +847,8 @@ const y = class y {
|
|
|
847
847
|
static async deleteData(e, t, i) {
|
|
848
848
|
return new Promise((s, o) => {
|
|
849
849
|
const a = indexedDB.open(e);
|
|
850
|
-
a.onsuccess = (
|
|
851
|
-
if (y.db =
|
|
850
|
+
a.onsuccess = (c) => {
|
|
851
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
852
852
|
const p = y.db.transaction([t], "readwrite").objectStore(t).delete(i);
|
|
853
853
|
p.onsuccess = (l) => {
|
|
854
854
|
s(!0);
|
|
@@ -873,8 +873,8 @@ const y = class y {
|
|
|
873
873
|
static async updateData(e, t, i) {
|
|
874
874
|
return new Promise((s, o) => {
|
|
875
875
|
const a = indexedDB.open(e);
|
|
876
|
-
a.onsuccess = (
|
|
877
|
-
if (y.db =
|
|
876
|
+
a.onsuccess = (c) => {
|
|
877
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
878
878
|
const p = y.db.transaction([t], "readwrite").objectStore(t).put(i);
|
|
879
879
|
p.onsuccess = (l) => {
|
|
880
880
|
s(i);
|
|
@@ -899,8 +899,8 @@ const y = class y {
|
|
|
899
899
|
static async getData(e, t, i) {
|
|
900
900
|
return new Promise((s, o) => {
|
|
901
901
|
const a = indexedDB.open(e);
|
|
902
|
-
a.onsuccess = (
|
|
903
|
-
if (y.db =
|
|
902
|
+
a.onsuccess = (c) => {
|
|
903
|
+
if (y.db = c.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
904
904
|
const p = y.db.transaction([t], "readonly").objectStore(t).get(i);
|
|
905
905
|
p.onsuccess = (l) => {
|
|
906
906
|
s(p.result);
|
|
@@ -941,11 +941,11 @@ const y = class y {
|
|
|
941
941
|
}
|
|
942
942
|
};
|
|
943
943
|
// 数据库版本
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
let
|
|
948
|
-
class
|
|
944
|
+
S(y, "version", 1), // 数据库连接句柄
|
|
945
|
+
S(y, "db", null), // 上一个连接
|
|
946
|
+
S(y, "lastLink");
|
|
947
|
+
let V = y;
|
|
948
|
+
class Wn {
|
|
949
949
|
/**
|
|
950
950
|
* Creates an instance of FileUploader.
|
|
951
951
|
* @author tony001
|
|
@@ -953,7 +953,7 @@ class On {
|
|
|
953
953
|
* @param {FileUploaderOptions<T>} options
|
|
954
954
|
*/
|
|
955
955
|
constructor(e) {
|
|
956
|
-
|
|
956
|
+
S(this, "options");
|
|
957
957
|
this.options = {
|
|
958
958
|
multiple: !0,
|
|
959
959
|
accept: "*/*",
|
|
@@ -979,8 +979,8 @@ class On {
|
|
|
979
979
|
if (e.length === 0)
|
|
980
980
|
return;
|
|
981
981
|
const t = e.filter((o) => {
|
|
982
|
-
var a,
|
|
983
|
-
return this.options.maxSize && o.size > this.options.maxSize ? ((
|
|
982
|
+
var a, c;
|
|
983
|
+
return this.options.maxSize && o.size > this.options.maxSize ? ((c = (a = this.options).onError) == null || c.call(a, new Error("文件大小超过限制 (".concat(this.formatSize(o.size), " > ").concat(this.formatSize(this.options.maxSize), ")")), o), !1) : !0;
|
|
984
984
|
});
|
|
985
985
|
(s = (i = this.options).onSelect) == null || s.call(i, t), await Promise.all(t.map((o) => this.processFile(o)));
|
|
986
986
|
}
|
|
@@ -988,15 +988,15 @@ class On {
|
|
|
988
988
|
* 处理单个文件上传
|
|
989
989
|
*/
|
|
990
990
|
async processFile(e) {
|
|
991
|
-
var t, i, s, o, a,
|
|
991
|
+
var t, i, s, o, a, c;
|
|
992
992
|
try {
|
|
993
993
|
const u = (p) => {
|
|
994
|
-
var l,
|
|
995
|
-
(
|
|
994
|
+
var l, m;
|
|
995
|
+
(m = (l = this.options).onProgress) == null || m.call(l, e, p);
|
|
996
996
|
}, h = await this.options.onUpload(e, u);
|
|
997
997
|
(i = (t = this.options).onProgress) == null || i.call(t, e, 100), (o = (s = this.options).onSuccess) == null || o.call(s, h, e);
|
|
998
998
|
} catch (u) {
|
|
999
|
-
(
|
|
999
|
+
(c = (a = this.options).onError) == null || c.call(a, u instanceof Error ? u : new Error("上传失败"), e);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
/**
|
|
@@ -1009,7 +1009,7 @@ class On {
|
|
|
1009
1009
|
return "".concat((e / 1024 ** i).toFixed(2), " ").concat(t[i]);
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
class
|
|
1012
|
+
class an {
|
|
1013
1013
|
/**
|
|
1014
1014
|
* 从XML元素中提取CDATA内容
|
|
1015
1015
|
*
|
|
@@ -1038,14 +1038,14 @@ class sn {
|
|
|
1038
1038
|
static parse(e) {
|
|
1039
1039
|
const i = new DOMParser().parseFromString(e, "text/xml");
|
|
1040
1040
|
return Array.from(i.querySelectorAll("resource")).map((o) => {
|
|
1041
|
-
const a = o.getAttribute("type") || "",
|
|
1041
|
+
const a = o.getAttribute("type") || "", c = o.querySelector("data"), u = o.querySelector("metadata");
|
|
1042
1042
|
try {
|
|
1043
|
-
const h = this.getCdataContent(
|
|
1043
|
+
const h = this.getCdataContent(c), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, m = p ? JSON.parse(p) : {};
|
|
1044
1044
|
return {
|
|
1045
1045
|
id: l.id,
|
|
1046
1046
|
type: a,
|
|
1047
1047
|
data: l,
|
|
1048
|
-
metadata:
|
|
1048
|
+
metadata: m
|
|
1049
1049
|
};
|
|
1050
1050
|
} catch (h) {
|
|
1051
1051
|
throw new Error("XML 解析错误: ".concat(h.message));
|
|
@@ -1074,17 +1074,17 @@ class sn {
|
|
|
1074
1074
|
remainingText: e,
|
|
1075
1075
|
hasResources: !1
|
|
1076
1076
|
};
|
|
1077
|
-
const [s] = i, o = i.index, a = o + s.length,
|
|
1077
|
+
const [s] = i, o = i.index, a = o + s.length, c = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
|
|
1078
1078
|
try {
|
|
1079
1079
|
return {
|
|
1080
1080
|
resources: this.parse(s),
|
|
1081
|
-
remainingText:
|
|
1081
|
+
remainingText: c,
|
|
1082
1082
|
hasResources: !0
|
|
1083
1083
|
};
|
|
1084
1084
|
} catch (u) {
|
|
1085
1085
|
return {
|
|
1086
1086
|
resources: [],
|
|
1087
|
-
remainingText:
|
|
1087
|
+
remainingText: c,
|
|
1088
1088
|
hasResources: !0,
|
|
1089
1089
|
error: "资源解析失败: ".concat(u.message)
|
|
1090
1090
|
};
|
|
@@ -1105,19 +1105,19 @@ class sn {
|
|
|
1105
1105
|
const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
|
|
1106
1106
|
return e.forEach((a) => {
|
|
1107
1107
|
i.appendChild(t.createTextNode(s(o)));
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1108
|
+
const c = t.createElement("resource");
|
|
1109
|
+
c.setAttribute("type", a.type), c.setAttribute("version", "1.0");
|
|
1110
1110
|
const u = (h, p) => {
|
|
1111
1111
|
const l = t.createElement(h);
|
|
1112
1112
|
l.appendChild(t.createTextNode(s(o + 1)));
|
|
1113
|
-
const
|
|
1114
|
-
return l.appendChild(
|
|
1113
|
+
const m = t.createCDATASection(JSON.stringify(p));
|
|
1114
|
+
return l.appendChild(m), l.appendChild(t.createTextNode(s(o))), l;
|
|
1115
1115
|
};
|
|
1116
|
-
|
|
1116
|
+
c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("data", a.data)), c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("metadata", a.metadata)), c.appendChild(t.createTextNode(s(o))), i.appendChild(c);
|
|
1117
1117
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
class
|
|
1120
|
+
class jn {
|
|
1121
1121
|
/**
|
|
1122
1122
|
* 从XML元素中提取CDATA内容
|
|
1123
1123
|
*
|
|
@@ -1146,13 +1146,13 @@ class Bn {
|
|
|
1146
1146
|
static parse(e) {
|
|
1147
1147
|
const i = new DOMParser().parseFromString(e, "text/xml");
|
|
1148
1148
|
return Array.from(i.querySelectorAll("suggestion")).map((o) => {
|
|
1149
|
-
const a = o.getAttribute("type") || "",
|
|
1149
|
+
const a = o.getAttribute("type") || "", c = o.querySelector("data"), u = o.querySelector("metadata");
|
|
1150
1150
|
try {
|
|
1151
|
-
const h = this.getCdataContent(
|
|
1151
|
+
const h = this.getCdataContent(c), p = this.getCdataContent(u), l = h ? JSON.parse(h) : {}, m = p ? JSON.parse(p) : {};
|
|
1152
1152
|
return {
|
|
1153
1153
|
type: a,
|
|
1154
1154
|
data: l,
|
|
1155
|
-
metadata:
|
|
1155
|
+
metadata: m
|
|
1156
1156
|
};
|
|
1157
1157
|
} catch (h) {
|
|
1158
1158
|
throw new Error("XML 解析错误: ".concat(h.message));
|
|
@@ -1181,17 +1181,17 @@ class Bn {
|
|
|
1181
1181
|
remainingText: e,
|
|
1182
1182
|
hasSuggestions: !1
|
|
1183
1183
|
};
|
|
1184
|
-
const [s] = i, o = i.index, a = o + s.length,
|
|
1184
|
+
const [s] = i, o = i.index, a = o + s.length, c = (e.slice(0, o) + e.slice(a)).replace(/\n/g, "");
|
|
1185
1185
|
try {
|
|
1186
1186
|
return {
|
|
1187
1187
|
suggestions: this.parse(s),
|
|
1188
|
-
remainingText:
|
|
1188
|
+
remainingText: c,
|
|
1189
1189
|
hasSuggestions: !0
|
|
1190
1190
|
};
|
|
1191
1191
|
} catch (u) {
|
|
1192
1192
|
return {
|
|
1193
1193
|
suggestions: [],
|
|
1194
|
-
remainingText:
|
|
1194
|
+
remainingText: c,
|
|
1195
1195
|
hasSuggestions: !0,
|
|
1196
1196
|
error: "资源解析失败: ".concat(u.message)
|
|
1197
1197
|
};
|
|
@@ -1212,122 +1212,206 @@ class Bn {
|
|
|
1212
1212
|
const s = (a) => "\n".concat(" ".repeat(a)), o = 1;
|
|
1213
1213
|
return e.forEach((a) => {
|
|
1214
1214
|
i.appendChild(t.createTextNode(s(o)));
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1215
|
+
const c = t.createElement("suggestion");
|
|
1216
|
+
c.setAttribute("type", a.type), c.setAttribute("version", "1.0");
|
|
1217
1217
|
const u = (h, p) => {
|
|
1218
1218
|
const l = t.createElement(h);
|
|
1219
1219
|
l.appendChild(t.createTextNode(s(o + 1)));
|
|
1220
|
-
const
|
|
1221
|
-
return l.appendChild(
|
|
1220
|
+
const m = t.createCDATASection(JSON.stringify(p));
|
|
1221
|
+
return l.appendChild(m), l.appendChild(t.createTextNode(s(o))), l;
|
|
1222
1222
|
};
|
|
1223
|
-
|
|
1223
|
+
c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("data", a.data)), c.appendChild(t.createTextNode(s(o + 1))), c.appendChild(u("metadata", a.metadata)), c.appendChild(t.createTextNode(s(o))), i.appendChild(c);
|
|
1224
1224
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function Ge(n) {
|
|
1228
1228
|
return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1231
|
-
const s = n / window.innerWidth, o = e / window.innerHeight, a = Math.max(0, Math.min(s, 1 - t)),
|
|
1230
|
+
function rn(n, e, t, i) {
|
|
1231
|
+
const s = n / window.innerWidth, o = e / window.innerHeight, a = Math.max(0, Math.min(s, 1 - t)), c = Math.max(0, Math.min(o, 1 - i));
|
|
1232
1232
|
return {
|
|
1233
1233
|
x: a,
|
|
1234
|
-
y:
|
|
1234
|
+
y: c
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
|
-
|
|
1237
|
+
function cn(n) {
|
|
1238
|
+
let e = 0;
|
|
1239
|
+
for (let t = 0; t < n.length; t++) {
|
|
1240
|
+
const i = n.charCodeAt(t);
|
|
1241
|
+
e = (e << 5) - e + i, e |= 0;
|
|
1242
|
+
}
|
|
1243
|
+
return Math.abs(e).toString(36).toUpperCase();
|
|
1244
|
+
}
|
|
1245
|
+
function ln(n) {
|
|
1246
|
+
let e = 2166136261;
|
|
1247
|
+
for (let t = 0; t < n.length; t++)
|
|
1248
|
+
e ^= n.charCodeAt(t), e += (e << 1) + (e << 4) + (e << 7) + (e << 8) + (e << 24);
|
|
1249
|
+
return Math.abs(e).toString(36).toUpperCase();
|
|
1250
|
+
}
|
|
1251
|
+
function un(n) {
|
|
1252
|
+
let e = 5381;
|
|
1253
|
+
for (let t = 0; t < n.length; t++)
|
|
1254
|
+
e = (e << 5) + e + n.charCodeAt(t);
|
|
1255
|
+
return Math.abs(e).toString(36).toUpperCase();
|
|
1256
|
+
}
|
|
1257
|
+
function Vn(n) {
|
|
1258
|
+
const e = cn(n), t = ln(n), i = un(n), s = e + t + i;
|
|
1259
|
+
let o = "";
|
|
1260
|
+
for (let a = 0; a < n.length % 10 + 10; a++) {
|
|
1261
|
+
const c = a * 7 % s.length;
|
|
1262
|
+
o += s.charAt(c);
|
|
1263
|
+
}
|
|
1264
|
+
return o.toUpperCase();
|
|
1265
|
+
}
|
|
1266
|
+
function ft(n) {
|
|
1267
|
+
return n.replace(/[^A-Z0-9]/g, "");
|
|
1268
|
+
}
|
|
1269
|
+
function dn(n, e) {
|
|
1270
|
+
switch (e) {
|
|
1271
|
+
case "fnv1a":
|
|
1272
|
+
return ln(n);
|
|
1273
|
+
case "djb2":
|
|
1274
|
+
return un(n);
|
|
1275
|
+
case "combined":
|
|
1276
|
+
return Vn(n);
|
|
1277
|
+
case "simple":
|
|
1278
|
+
default:
|
|
1279
|
+
return cn(n);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
function qn(n, e = 36) {
|
|
1283
|
+
const t = ft(n);
|
|
1284
|
+
if (t.length >= e)
|
|
1285
|
+
return t.substring(0, e);
|
|
1286
|
+
let i = t;
|
|
1287
|
+
for (; i.length < e; )
|
|
1288
|
+
i += ft(dn(i, "combined"));
|
|
1289
|
+
return i.substring(0, e);
|
|
1290
|
+
}
|
|
1291
|
+
function mt(n, e = 36) {
|
|
1292
|
+
const t = dn(n, "combined");
|
|
1293
|
+
return qn(t, e);
|
|
1294
|
+
}
|
|
1295
|
+
class Yn {
|
|
1296
|
+
/**
|
|
1297
|
+
* @description 解析工具调用
|
|
1298
|
+
* @static
|
|
1299
|
+
* @param {string} toolCallString
|
|
1300
|
+
* @returns {*} {IChatToolCall[]}
|
|
1301
|
+
* @memberof ChatToolCallParser
|
|
1302
|
+
*/
|
|
1303
|
+
static parse(e) {
|
|
1304
|
+
const t = new RegExp("<tool_call>\\s*({[\\s\\S]*?})\\s*</tool_call>", "g"), i = e.matchAll(t), s = [];
|
|
1305
|
+
for (const o of i)
|
|
1306
|
+
try {
|
|
1307
|
+
const a = JSON.parse(o[1]), c = {
|
|
1308
|
+
name: a.name,
|
|
1309
|
+
parameters: a.parameters,
|
|
1310
|
+
error: a.error || !1
|
|
1311
|
+
};
|
|
1312
|
+
a.result && Object.assign(c, {
|
|
1313
|
+
result: a.result
|
|
1314
|
+
}), s.push(c);
|
|
1315
|
+
} catch (a) {
|
|
1316
|
+
console.error("解析工具调用失败:", a);
|
|
1317
|
+
}
|
|
1318
|
+
return s;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
var ue, N, Re, vt, be = 0, hn = [], Ne = [], _t = b.__b, gt = b.__r, wt = b.diffed, bt = b.__c, yt = b.unmount;
|
|
1238
1322
|
function He(n, e) {
|
|
1239
|
-
b.__h && b.__h(
|
|
1240
|
-
var t =
|
|
1241
|
-
return n >= t.__.length && t.__.push({ __V:
|
|
1323
|
+
b.__h && b.__h(N, n, be || e), be = 0;
|
|
1324
|
+
var t = N.__H || (N.__H = { __: [], __h: [] });
|
|
1325
|
+
return n >= t.__.length && t.__.push({ __V: Ne }), t.__[n];
|
|
1242
1326
|
}
|
|
1243
1327
|
function K(n) {
|
|
1244
|
-
return
|
|
1328
|
+
return be = 1, Xn(mn, n);
|
|
1245
1329
|
}
|
|
1246
|
-
function
|
|
1247
|
-
var i = He(
|
|
1248
|
-
if (i.t = n, !i.__c && (i.__ = [t ? t(e) :
|
|
1249
|
-
var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u,
|
|
1330
|
+
function Xn(n, e, t) {
|
|
1331
|
+
var i = He(ue++, 2);
|
|
1332
|
+
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : mn(void 0, e), function(c) {
|
|
1333
|
+
var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, c);
|
|
1250
1334
|
u !== h && (i.__N = [h, i.__[1]], i.__c.setState({}));
|
|
1251
|
-
}], i.__c =
|
|
1252
|
-
var s = function(
|
|
1335
|
+
}], i.__c = N, !N.u)) {
|
|
1336
|
+
var s = function(c, u, h) {
|
|
1253
1337
|
if (!i.__c.__H)
|
|
1254
1338
|
return !0;
|
|
1255
|
-
var p = i.__c.__H.__.filter(function(
|
|
1256
|
-
return
|
|
1339
|
+
var p = i.__c.__H.__.filter(function(m) {
|
|
1340
|
+
return m.__c;
|
|
1257
1341
|
});
|
|
1258
|
-
if (p.every(function(
|
|
1259
|
-
return !
|
|
1342
|
+
if (p.every(function(m) {
|
|
1343
|
+
return !m.__N;
|
|
1260
1344
|
}))
|
|
1261
|
-
return !o || o.call(this,
|
|
1345
|
+
return !o || o.call(this, c, u, h);
|
|
1262
1346
|
var l = !1;
|
|
1263
|
-
return p.forEach(function(
|
|
1264
|
-
if (
|
|
1265
|
-
var _ =
|
|
1266
|
-
|
|
1347
|
+
return p.forEach(function(m) {
|
|
1348
|
+
if (m.__N) {
|
|
1349
|
+
var _ = m.__[0];
|
|
1350
|
+
m.__ = m.__N, m.__N = void 0, _ !== m.__[0] && (l = !0);
|
|
1267
1351
|
}
|
|
1268
|
-
}), !(!l && i.__c.props ===
|
|
1352
|
+
}), !(!l && i.__c.props === c) && (!o || o.call(this, c, u, h));
|
|
1269
1353
|
};
|
|
1270
|
-
|
|
1271
|
-
var o =
|
|
1272
|
-
|
|
1354
|
+
N.u = !0;
|
|
1355
|
+
var o = N.shouldComponentUpdate, a = N.componentWillUpdate;
|
|
1356
|
+
N.componentWillUpdate = function(c, u, h) {
|
|
1273
1357
|
if (this.__e) {
|
|
1274
1358
|
var p = o;
|
|
1275
|
-
o = void 0, s(
|
|
1359
|
+
o = void 0, s(c, u, h), o = p;
|
|
1276
1360
|
}
|
|
1277
|
-
a && a.call(this,
|
|
1278
|
-
},
|
|
1361
|
+
a && a.call(this, c, u, h);
|
|
1362
|
+
}, N.shouldComponentUpdate = s;
|
|
1279
1363
|
}
|
|
1280
1364
|
return i.__N || i.__;
|
|
1281
1365
|
}
|
|
1282
|
-
function
|
|
1283
|
-
var t = He(
|
|
1284
|
-
!b.__s &&
|
|
1366
|
+
function I(n, e) {
|
|
1367
|
+
var t = He(ue++, 3);
|
|
1368
|
+
!b.__s && fn(t.__H, e) && (t.__ = n, t.i = e, N.__H.__h.push(t));
|
|
1285
1369
|
}
|
|
1286
1370
|
function P(n) {
|
|
1287
|
-
return
|
|
1371
|
+
return be = 5, X(function() {
|
|
1288
1372
|
return { current: n };
|
|
1289
1373
|
}, []);
|
|
1290
1374
|
}
|
|
1291
1375
|
function X(n, e) {
|
|
1292
|
-
var t = He(
|
|
1293
|
-
return
|
|
1376
|
+
var t = He(ue++, 7);
|
|
1377
|
+
return fn(t.__H, e) ? (t.__V = n(), t.i = e, t.__h = n, t.__V) : t.__;
|
|
1294
1378
|
}
|
|
1295
1379
|
function Fe(n, e) {
|
|
1296
|
-
return
|
|
1380
|
+
return be = 8, X(function() {
|
|
1297
1381
|
return n;
|
|
1298
1382
|
}, e);
|
|
1299
1383
|
}
|
|
1300
|
-
function
|
|
1301
|
-
var e =
|
|
1302
|
-
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(
|
|
1384
|
+
function pn(n) {
|
|
1385
|
+
var e = N.context[n.__c], t = He(ue++, 9);
|
|
1386
|
+
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(N)), e.props.value) : n.__;
|
|
1303
1387
|
}
|
|
1304
|
-
function
|
|
1305
|
-
for (var n; n =
|
|
1388
|
+
function Zn() {
|
|
1389
|
+
for (var n; n = hn.shift(); )
|
|
1306
1390
|
if (n.__P && n.__H)
|
|
1307
1391
|
try {
|
|
1308
|
-
n.__H.__h.forEach(
|
|
1392
|
+
n.__H.__h.forEach($e), n.__H.__h.forEach(Ke), n.__H.__h = [];
|
|
1309
1393
|
} catch (e) {
|
|
1310
1394
|
n.__H.__h = [], b.__e(e, n.__v);
|
|
1311
1395
|
}
|
|
1312
1396
|
}
|
|
1313
1397
|
b.__b = function(n) {
|
|
1314
|
-
|
|
1398
|
+
N = null, _t && _t(n);
|
|
1315
1399
|
}, b.__r = function(n) {
|
|
1316
|
-
|
|
1317
|
-
var e = (
|
|
1318
|
-
e && (Re ===
|
|
1319
|
-
t.__N && (t.__ = t.__N), t.__V =
|
|
1320
|
-
})) : (e.__h.forEach(
|
|
1400
|
+
gt && gt(n), ue = 0;
|
|
1401
|
+
var e = (N = n.__c).__H;
|
|
1402
|
+
e && (Re === N ? (e.__h = [], N.__h = [], e.__.forEach(function(t) {
|
|
1403
|
+
t.__N && (t.__ = t.__N), t.__V = Ne, t.__N = t.i = void 0;
|
|
1404
|
+
})) : (e.__h.forEach($e), e.__h.forEach(Ke), e.__h = [], ue = 0)), Re = N;
|
|
1321
1405
|
}, b.diffed = function(n) {
|
|
1322
|
-
|
|
1406
|
+
wt && wt(n);
|
|
1323
1407
|
var e = n.__c;
|
|
1324
|
-
e && e.__H && (e.__H.__h.length && (
|
|
1325
|
-
t.i && (t.__H = t.i), t.__V !==
|
|
1326
|
-
})), Re =
|
|
1408
|
+
e && e.__H && (e.__H.__h.length && (hn.push(e) !== 1 && vt === b.requestAnimationFrame || ((vt = b.requestAnimationFrame) || Jn)(Zn)), e.__H.__.forEach(function(t) {
|
|
1409
|
+
t.i && (t.__H = t.i), t.__V !== Ne && (t.__ = t.__V), t.i = void 0, t.__V = Ne;
|
|
1410
|
+
})), Re = N = null;
|
|
1327
1411
|
}, b.__c = function(n, e) {
|
|
1328
1412
|
e.some(function(t) {
|
|
1329
1413
|
try {
|
|
1330
|
-
t.__h.forEach(
|
|
1414
|
+
t.__h.forEach($e), t.__h = t.__h.filter(function(i) {
|
|
1331
1415
|
return !i.__ || Ke(i);
|
|
1332
1416
|
});
|
|
1333
1417
|
} catch (i) {
|
|
@@ -1335,54 +1419,54 @@ b.__b = function(n) {
|
|
|
1335
1419
|
s.__h && (s.__h = []);
|
|
1336
1420
|
}), e = [], b.__e(i, t.__v);
|
|
1337
1421
|
}
|
|
1338
|
-
}),
|
|
1422
|
+
}), bt && bt(n, e);
|
|
1339
1423
|
}, b.unmount = function(n) {
|
|
1340
|
-
|
|
1424
|
+
yt && yt(n);
|
|
1341
1425
|
var e, t = n.__c;
|
|
1342
1426
|
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
1343
1427
|
try {
|
|
1344
|
-
|
|
1428
|
+
$e(i);
|
|
1345
1429
|
} catch (s) {
|
|
1346
1430
|
e = s;
|
|
1347
1431
|
}
|
|
1348
1432
|
}), t.__H = void 0, e && b.__e(e, t.__v));
|
|
1349
1433
|
};
|
|
1350
|
-
var
|
|
1351
|
-
function
|
|
1434
|
+
var Ct = typeof requestAnimationFrame == "function";
|
|
1435
|
+
function Jn(n) {
|
|
1352
1436
|
var e, t = function() {
|
|
1353
|
-
clearTimeout(i),
|
|
1437
|
+
clearTimeout(i), Ct && cancelAnimationFrame(e), setTimeout(n);
|
|
1354
1438
|
}, i = setTimeout(t, 100);
|
|
1355
|
-
|
|
1439
|
+
Ct && (e = requestAnimationFrame(t));
|
|
1356
1440
|
}
|
|
1357
|
-
function
|
|
1358
|
-
var e =
|
|
1359
|
-
typeof t == "function" && (n.__c = void 0, t()),
|
|
1441
|
+
function $e(n) {
|
|
1442
|
+
var e = N, t = n.__c;
|
|
1443
|
+
typeof t == "function" && (n.__c = void 0, t()), N = e;
|
|
1360
1444
|
}
|
|
1361
1445
|
function Ke(n) {
|
|
1362
|
-
var e =
|
|
1363
|
-
n.__c = n.__(),
|
|
1446
|
+
var e = N;
|
|
1447
|
+
n.__c = n.__(), N = e;
|
|
1364
1448
|
}
|
|
1365
|
-
function
|
|
1449
|
+
function fn(n, e) {
|
|
1366
1450
|
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
1367
1451
|
return t !== n[i];
|
|
1368
1452
|
});
|
|
1369
1453
|
}
|
|
1370
|
-
function
|
|
1454
|
+
function mn(n, e) {
|
|
1371
1455
|
return typeof e == "function" ? e(n) : e;
|
|
1372
1456
|
}
|
|
1373
1457
|
function Oe() {
|
|
1374
1458
|
throw new Error("Cycle detected");
|
|
1375
1459
|
}
|
|
1376
|
-
var
|
|
1460
|
+
var Gn = Symbol.for("preact-signals");
|
|
1377
1461
|
function st() {
|
|
1378
|
-
if (
|
|
1379
|
-
|
|
1462
|
+
if (le > 1)
|
|
1463
|
+
le--;
|
|
1380
1464
|
else {
|
|
1381
|
-
for (var n, e = !1;
|
|
1382
|
-
var t =
|
|
1383
|
-
for (
|
|
1465
|
+
for (var n, e = !1; _e !== void 0; ) {
|
|
1466
|
+
var t = _e;
|
|
1467
|
+
for (_e = void 0, Qe++; t !== void 0; ) {
|
|
1384
1468
|
var i = t.o;
|
|
1385
|
-
if (t.o = void 0, t.f &= -3, !(8 & t.f) &&
|
|
1469
|
+
if (t.o = void 0, t.f &= -3, !(8 & t.f) && _n(t))
|
|
1386
1470
|
try {
|
|
1387
1471
|
t.c();
|
|
1388
1472
|
} catch (s) {
|
|
@@ -1391,37 +1475,37 @@ function st() {
|
|
|
1391
1475
|
t = i;
|
|
1392
1476
|
}
|
|
1393
1477
|
}
|
|
1394
|
-
if (Qe = 0,
|
|
1478
|
+
if (Qe = 0, le--, e)
|
|
1395
1479
|
throw n;
|
|
1396
1480
|
}
|
|
1397
1481
|
}
|
|
1398
|
-
var
|
|
1399
|
-
function
|
|
1400
|
-
if (
|
|
1482
|
+
var $ = void 0, _e = void 0, le = 0, Qe = 0, Ie = 0;
|
|
1483
|
+
function vn(n) {
|
|
1484
|
+
if ($ !== void 0) {
|
|
1401
1485
|
var e = n.n;
|
|
1402
|
-
if (e === void 0 || e.t !==
|
|
1403
|
-
return e = { i: 0, S: n, p:
|
|
1486
|
+
if (e === void 0 || e.t !== $)
|
|
1487
|
+
return e = { i: 0, S: n, p: $.s, n: void 0, t: $, e: void 0, x: void 0, r: e }, $.s !== void 0 && ($.s.n = e), $.s = e, n.n = e, 32 & $.f && n.S(e), e;
|
|
1404
1488
|
if (e.i === -1)
|
|
1405
|
-
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p =
|
|
1489
|
+
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = $.s, e.n = void 0, $.s.n = e, $.s = e), e;
|
|
1406
1490
|
}
|
|
1407
1491
|
}
|
|
1408
|
-
function
|
|
1492
|
+
function D(n) {
|
|
1409
1493
|
this.v = n, this.i = 0, this.n = void 0, this.t = void 0;
|
|
1410
1494
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1495
|
+
D.prototype.brand = Gn;
|
|
1496
|
+
D.prototype.h = function() {
|
|
1413
1497
|
return !0;
|
|
1414
1498
|
};
|
|
1415
|
-
|
|
1499
|
+
D.prototype.S = function(n) {
|
|
1416
1500
|
this.t !== n && n.e === void 0 && (n.x = this.t, this.t !== void 0 && (this.t.e = n), this.t = n);
|
|
1417
1501
|
};
|
|
1418
|
-
|
|
1502
|
+
D.prototype.U = function(n) {
|
|
1419
1503
|
if (this.t !== void 0) {
|
|
1420
1504
|
var e = n.e, t = n.x;
|
|
1421
1505
|
e !== void 0 && (e.x = t, n.e = void 0), t !== void 0 && (t.e = e, n.x = void 0), n === this.t && (this.t = t);
|
|
1422
1506
|
}
|
|
1423
1507
|
};
|
|
1424
|
-
|
|
1508
|
+
D.prototype.subscribe = function(n) {
|
|
1425
1509
|
var e = this;
|
|
1426
1510
|
return at(function() {
|
|
1427
1511
|
var t = e.value, i = 32 & this.f;
|
|
@@ -1433,26 +1517,26 @@ A.prototype.subscribe = function(n) {
|
|
|
1433
1517
|
}
|
|
1434
1518
|
});
|
|
1435
1519
|
};
|
|
1436
|
-
|
|
1520
|
+
D.prototype.valueOf = function() {
|
|
1437
1521
|
return this.value;
|
|
1438
1522
|
};
|
|
1439
|
-
|
|
1523
|
+
D.prototype.toString = function() {
|
|
1440
1524
|
return this.value + "";
|
|
1441
1525
|
};
|
|
1442
|
-
|
|
1526
|
+
D.prototype.toJSON = function() {
|
|
1443
1527
|
return this.value;
|
|
1444
1528
|
};
|
|
1445
|
-
|
|
1529
|
+
D.prototype.peek = function() {
|
|
1446
1530
|
return this.v;
|
|
1447
1531
|
};
|
|
1448
|
-
Object.defineProperty(
|
|
1449
|
-
var n =
|
|
1532
|
+
Object.defineProperty(D.prototype, "value", { get: function() {
|
|
1533
|
+
var n = vn(this);
|
|
1450
1534
|
return n !== void 0 && (n.i = this.i), this.v;
|
|
1451
1535
|
}, set: function(n) {
|
|
1452
|
-
if (
|
|
1536
|
+
if ($ instanceof Q && function() {
|
|
1453
1537
|
throw new Error("Computed cannot have side-effects");
|
|
1454
1538
|
}(), n !== this.v) {
|
|
1455
|
-
Qe > 100 && Oe(), this.v = n, this.i++, Ie++,
|
|
1539
|
+
Qe > 100 && Oe(), this.v = n, this.i++, Ie++, le++;
|
|
1456
1540
|
try {
|
|
1457
1541
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
1458
1542
|
e.t.N();
|
|
@@ -1461,16 +1545,16 @@ Object.defineProperty(A.prototype, "value", { get: function() {
|
|
|
1461
1545
|
}
|
|
1462
1546
|
}
|
|
1463
1547
|
} });
|
|
1464
|
-
function
|
|
1465
|
-
return new
|
|
1548
|
+
function G(n) {
|
|
1549
|
+
return new D(n);
|
|
1466
1550
|
}
|
|
1467
|
-
function
|
|
1551
|
+
function _n(n) {
|
|
1468
1552
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1469
1553
|
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
|
|
1470
1554
|
return !0;
|
|
1471
1555
|
return !1;
|
|
1472
1556
|
}
|
|
1473
|
-
function
|
|
1557
|
+
function gn(n) {
|
|
1474
1558
|
for (var e = n.s; e !== void 0; e = e.n) {
|
|
1475
1559
|
var t = e.S.n;
|
|
1476
1560
|
if (t !== void 0 && (e.r = t), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -1479,7 +1563,7 @@ function hn(n) {
|
|
|
1479
1563
|
}
|
|
1480
1564
|
}
|
|
1481
1565
|
}
|
|
1482
|
-
function
|
|
1566
|
+
function wn(n) {
|
|
1483
1567
|
for (var e = n.s, t = void 0; e !== void 0; ) {
|
|
1484
1568
|
var i = e.p;
|
|
1485
1569
|
e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : t = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
|
|
@@ -1487,24 +1571,24 @@ function pn(n) {
|
|
|
1487
1571
|
n.s = t;
|
|
1488
1572
|
}
|
|
1489
1573
|
function Q(n) {
|
|
1490
|
-
|
|
1574
|
+
D.call(this, void 0), this.x = n, this.s = void 0, this.g = Ie - 1, this.f = 4;
|
|
1491
1575
|
}
|
|
1492
|
-
(Q.prototype = new
|
|
1576
|
+
(Q.prototype = new D()).h = function() {
|
|
1493
1577
|
if (this.f &= -3, 1 & this.f)
|
|
1494
1578
|
return !1;
|
|
1495
1579
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === Ie))
|
|
1496
1580
|
return !0;
|
|
1497
|
-
if (this.g = Ie, this.f |= 1, this.i > 0 && !
|
|
1581
|
+
if (this.g = Ie, this.f |= 1, this.i > 0 && !_n(this))
|
|
1498
1582
|
return this.f &= -2, !0;
|
|
1499
|
-
var n =
|
|
1583
|
+
var n = $;
|
|
1500
1584
|
try {
|
|
1501
|
-
|
|
1585
|
+
gn(this), $ = this;
|
|
1502
1586
|
var e = this.x();
|
|
1503
1587
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
1504
1588
|
} catch (t) {
|
|
1505
1589
|
this.v = t, this.f |= 16, this.i++;
|
|
1506
1590
|
}
|
|
1507
|
-
return
|
|
1591
|
+
return $ = n, wn(this), this.f &= -2, !0;
|
|
1508
1592
|
};
|
|
1509
1593
|
Q.prototype.S = function(n) {
|
|
1510
1594
|
if (this.t === void 0) {
|
|
@@ -1512,10 +1596,10 @@ Q.prototype.S = function(n) {
|
|
|
1512
1596
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1513
1597
|
e.S.S(e);
|
|
1514
1598
|
}
|
|
1515
|
-
|
|
1599
|
+
D.prototype.S.call(this, n);
|
|
1516
1600
|
};
|
|
1517
1601
|
Q.prototype.U = function(n) {
|
|
1518
|
-
if (this.t !== void 0 && (
|
|
1602
|
+
if (this.t !== void 0 && (D.prototype.U.call(this, n), this.t === void 0)) {
|
|
1519
1603
|
this.f &= -33;
|
|
1520
1604
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1521
1605
|
e.S.U(e);
|
|
@@ -1535,43 +1619,43 @@ Q.prototype.peek = function() {
|
|
|
1535
1619
|
};
|
|
1536
1620
|
Object.defineProperty(Q.prototype, "value", { get: function() {
|
|
1537
1621
|
1 & this.f && Oe();
|
|
1538
|
-
var n =
|
|
1622
|
+
var n = vn(this);
|
|
1539
1623
|
if (this.h(), n !== void 0 && (n.i = this.i), 16 & this.f)
|
|
1540
1624
|
throw this.v;
|
|
1541
1625
|
return this.v;
|
|
1542
1626
|
} });
|
|
1543
|
-
function
|
|
1627
|
+
function bn(n) {
|
|
1544
1628
|
return new Q(n);
|
|
1545
1629
|
}
|
|
1546
|
-
function
|
|
1630
|
+
function yn(n) {
|
|
1547
1631
|
var e = n.u;
|
|
1548
1632
|
if (n.u = void 0, typeof e == "function") {
|
|
1549
|
-
|
|
1550
|
-
var t =
|
|
1551
|
-
|
|
1633
|
+
le++;
|
|
1634
|
+
var t = $;
|
|
1635
|
+
$ = void 0;
|
|
1552
1636
|
try {
|
|
1553
1637
|
e();
|
|
1554
1638
|
} catch (i) {
|
|
1555
1639
|
throw n.f &= -2, n.f |= 8, ot(n), i;
|
|
1556
1640
|
} finally {
|
|
1557
|
-
|
|
1641
|
+
$ = t, st();
|
|
1558
1642
|
}
|
|
1559
1643
|
}
|
|
1560
1644
|
}
|
|
1561
1645
|
function ot(n) {
|
|
1562
1646
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1563
1647
|
e.S.U(e);
|
|
1564
|
-
n.x = void 0, n.s = void 0,
|
|
1648
|
+
n.x = void 0, n.s = void 0, yn(n);
|
|
1565
1649
|
}
|
|
1566
|
-
function
|
|
1567
|
-
if (
|
|
1650
|
+
function Kn(n) {
|
|
1651
|
+
if ($ !== this)
|
|
1568
1652
|
throw new Error("Out-of-order effect");
|
|
1569
|
-
|
|
1653
|
+
wn(this), $ = n, this.f &= -2, 8 & this.f && ot(this), st();
|
|
1570
1654
|
}
|
|
1571
|
-
function
|
|
1655
|
+
function ye(n) {
|
|
1572
1656
|
this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
|
1573
1657
|
}
|
|
1574
|
-
|
|
1658
|
+
ye.prototype.c = function() {
|
|
1575
1659
|
var n = this.S();
|
|
1576
1660
|
try {
|
|
1577
1661
|
if (8 & this.f || this.x === void 0)
|
|
@@ -1582,19 +1666,19 @@ be.prototype.c = function() {
|
|
|
1582
1666
|
n();
|
|
1583
1667
|
}
|
|
1584
1668
|
};
|
|
1585
|
-
|
|
1586
|
-
1 & this.f && Oe(), this.f |= 1, this.f &= -9,
|
|
1587
|
-
var n =
|
|
1588
|
-
return
|
|
1669
|
+
ye.prototype.S = function() {
|
|
1670
|
+
1 & this.f && Oe(), this.f |= 1, this.f &= -9, yn(this), gn(this), le++;
|
|
1671
|
+
var n = $;
|
|
1672
|
+
return $ = this, Kn.bind(this, n);
|
|
1589
1673
|
};
|
|
1590
|
-
|
|
1591
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
1674
|
+
ye.prototype.N = function() {
|
|
1675
|
+
2 & this.f || (this.f |= 2, this.o = _e, _e = this);
|
|
1592
1676
|
};
|
|
1593
|
-
|
|
1677
|
+
ye.prototype.d = function() {
|
|
1594
1678
|
this.f |= 8, 1 & this.f || ot(this);
|
|
1595
1679
|
};
|
|
1596
1680
|
function at(n) {
|
|
1597
|
-
var e = new
|
|
1681
|
+
var e = new ye(n);
|
|
1598
1682
|
try {
|
|
1599
1683
|
e.c();
|
|
1600
1684
|
} catch (t) {
|
|
@@ -1603,15 +1687,15 @@ function at(n) {
|
|
|
1603
1687
|
return e.d.bind(e);
|
|
1604
1688
|
}
|
|
1605
1689
|
var Be, Ue;
|
|
1606
|
-
function
|
|
1690
|
+
function de(n, e) {
|
|
1607
1691
|
b[n] = e.bind(null, b[n] || function() {
|
|
1608
1692
|
});
|
|
1609
1693
|
}
|
|
1610
1694
|
function De(n) {
|
|
1611
1695
|
Ue && Ue(), Ue = n && n.S();
|
|
1612
1696
|
}
|
|
1613
|
-
function
|
|
1614
|
-
var e = this, t = n.data, i =
|
|
1697
|
+
function Cn(n) {
|
|
1698
|
+
var e = this, t = n.data, i = M(t);
|
|
1615
1699
|
i.value = t;
|
|
1616
1700
|
var s = X(function() {
|
|
1617
1701
|
for (var o = e.__v; o = o.__; )
|
|
@@ -1621,30 +1705,30 @@ function mn(n) {
|
|
|
1621
1705
|
}
|
|
1622
1706
|
return e.__$u.c = function() {
|
|
1623
1707
|
var a;
|
|
1624
|
-
!
|
|
1625
|
-
},
|
|
1708
|
+
!Xt(s.peek()) && ((a = e.base) == null ? void 0 : a.nodeType) === 3 ? e.base.data = s.peek() : (e.__$f |= 1, e.setState({}));
|
|
1709
|
+
}, bn(function() {
|
|
1626
1710
|
var a = i.value.value;
|
|
1627
1711
|
return a === 0 ? 0 : a === !0 ? "" : a || "";
|
|
1628
1712
|
});
|
|
1629
1713
|
}, []);
|
|
1630
1714
|
return s.value;
|
|
1631
1715
|
}
|
|
1632
|
-
|
|
1633
|
-
Object.defineProperties(
|
|
1716
|
+
Cn.displayName = "_st";
|
|
1717
|
+
Object.defineProperties(D.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Cn }, props: { configurable: !0, get: function() {
|
|
1634
1718
|
return { data: this };
|
|
1635
1719
|
} }, __b: { configurable: !0, value: 1 } });
|
|
1636
|
-
|
|
1720
|
+
de("__b", function(n, e) {
|
|
1637
1721
|
if (typeof e.type == "string") {
|
|
1638
1722
|
var t, i = e.props;
|
|
1639
1723
|
for (var s in i)
|
|
1640
1724
|
if (s !== "children") {
|
|
1641
1725
|
var o = i[s];
|
|
1642
|
-
o instanceof
|
|
1726
|
+
o instanceof D && (t || (e.__np = t = {}), t[s] = o, i[s] = o.peek());
|
|
1643
1727
|
}
|
|
1644
1728
|
}
|
|
1645
1729
|
n(e);
|
|
1646
1730
|
});
|
|
1647
|
-
|
|
1731
|
+
de("__r", function(n, e) {
|
|
1648
1732
|
De();
|
|
1649
1733
|
var t, i = e.__c;
|
|
1650
1734
|
i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(s) {
|
|
@@ -1656,10 +1740,10 @@ ue("__r", function(n, e) {
|
|
|
1656
1740
|
}, o;
|
|
1657
1741
|
}())), Be = i, De(t), n(e);
|
|
1658
1742
|
});
|
|
1659
|
-
|
|
1743
|
+
de("__e", function(n, e, t, i) {
|
|
1660
1744
|
De(), Be = void 0, n(e, t, i);
|
|
1661
1745
|
});
|
|
1662
|
-
|
|
1746
|
+
de("diffed", function(n, e) {
|
|
1663
1747
|
De(), Be = void 0;
|
|
1664
1748
|
var t;
|
|
1665
1749
|
if (typeof e.type == "string" && (t = e.__e)) {
|
|
@@ -1668,29 +1752,29 @@ ue("diffed", function(n, e) {
|
|
|
1668
1752
|
var o = t.U;
|
|
1669
1753
|
if (o)
|
|
1670
1754
|
for (var a in o) {
|
|
1671
|
-
var
|
|
1672
|
-
|
|
1755
|
+
var c = o[a];
|
|
1756
|
+
c !== void 0 && !(a in i) && (c.d(), o[a] = void 0);
|
|
1673
1757
|
}
|
|
1674
1758
|
else
|
|
1675
1759
|
t.U = o = {};
|
|
1676
1760
|
for (var u in i) {
|
|
1677
1761
|
var h = o[u], p = i[u];
|
|
1678
|
-
h === void 0 ? (h =
|
|
1762
|
+
h === void 0 ? (h = Qn(t, u, p, s), o[u] = h) : h.o(p, s);
|
|
1679
1763
|
}
|
|
1680
1764
|
}
|
|
1681
1765
|
}
|
|
1682
1766
|
n(e);
|
|
1683
1767
|
});
|
|
1684
|
-
function
|
|
1685
|
-
var s = e in n && n.ownerSVGElement === void 0, o =
|
|
1686
|
-
return { o: function(a,
|
|
1687
|
-
o.value = a, i =
|
|
1768
|
+
function Qn(n, e, t, i) {
|
|
1769
|
+
var s = e in n && n.ownerSVGElement === void 0, o = G(t);
|
|
1770
|
+
return { o: function(a, c) {
|
|
1771
|
+
o.value = a, i = c;
|
|
1688
1772
|
}, d: at(function() {
|
|
1689
1773
|
var a = o.value.value;
|
|
1690
1774
|
i[e] !== a && (i[e] = a, s ? n[e] = a : a ? n.setAttribute(e, a) : n.removeAttribute(e));
|
|
1691
1775
|
}) };
|
|
1692
1776
|
}
|
|
1693
|
-
|
|
1777
|
+
de("unmount", function(n, e) {
|
|
1694
1778
|
if (typeof e.type == "string") {
|
|
1695
1779
|
var t = e.__e;
|
|
1696
1780
|
if (t) {
|
|
@@ -1706,13 +1790,13 @@ ue("unmount", function(n, e) {
|
|
|
1706
1790
|
} else {
|
|
1707
1791
|
var a = e.__c;
|
|
1708
1792
|
if (a) {
|
|
1709
|
-
var
|
|
1710
|
-
|
|
1793
|
+
var c = a.__$u;
|
|
1794
|
+
c && (a.__$u = void 0, c.d());
|
|
1711
1795
|
}
|
|
1712
1796
|
}
|
|
1713
1797
|
n(e);
|
|
1714
1798
|
});
|
|
1715
|
-
|
|
1799
|
+
de("__h", function(n, e, t, i) {
|
|
1716
1800
|
(i < 3 || i === 9) && (e.__$f |= 2), n(e, t, i);
|
|
1717
1801
|
});
|
|
1718
1802
|
F.prototype.shouldComponentUpdate = function(n, e) {
|
|
@@ -1729,147 +1813,147 @@ F.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
1729
1813
|
return !0;
|
|
1730
1814
|
return !1;
|
|
1731
1815
|
};
|
|
1732
|
-
function
|
|
1816
|
+
function M(n) {
|
|
1733
1817
|
return X(function() {
|
|
1734
|
-
return
|
|
1818
|
+
return G(n);
|
|
1735
1819
|
}, []);
|
|
1736
1820
|
}
|
|
1737
1821
|
function B(n) {
|
|
1738
1822
|
var e = P(n);
|
|
1739
1823
|
return e.current = n, Be.__$f |= 4, X(function() {
|
|
1740
|
-
return
|
|
1824
|
+
return bn(function() {
|
|
1741
1825
|
return e.current();
|
|
1742
1826
|
});
|
|
1743
1827
|
}, []);
|
|
1744
1828
|
}
|
|
1745
|
-
var
|
|
1746
|
-
function
|
|
1747
|
-
var a,
|
|
1748
|
-
for (
|
|
1749
|
-
|
|
1750
|
-
var h = { type: n, props: u, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --
|
|
1829
|
+
var ei = 0;
|
|
1830
|
+
function r(n, e, t, i, s, o) {
|
|
1831
|
+
var a, c, u = {};
|
|
1832
|
+
for (c in e)
|
|
1833
|
+
c == "ref" ? a = e[c] : u[c] = e[c];
|
|
1834
|
+
var h = { type: n, props: u, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --ei, __source: s, __self: o };
|
|
1751
1835
|
if (typeof n == "function" && (a = n.defaultProps))
|
|
1752
|
-
for (
|
|
1753
|
-
u[
|
|
1836
|
+
for (c in a)
|
|
1837
|
+
u[c] === void 0 && (u[c] = a[c]);
|
|
1754
1838
|
return b.vnode && b.vnode(h), h;
|
|
1755
1839
|
}
|
|
1756
|
-
const
|
|
1840
|
+
const ti = () => r("svg", {
|
|
1757
1841
|
viewBox: "0 0 1024 1024",
|
|
1758
1842
|
version: "1.1",
|
|
1759
1843
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1760
|
-
children:
|
|
1844
|
+
children: r("path", {
|
|
1761
1845
|
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"
|
|
1762
1846
|
})
|
|
1763
|
-
}),
|
|
1847
|
+
}), ni = () => r("svg", {
|
|
1764
1848
|
className: "icon",
|
|
1765
1849
|
viewBox: "0 0 1024 1024",
|
|
1766
1850
|
version: "1.1",
|
|
1767
1851
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1768
|
-
children:
|
|
1852
|
+
children: r("path", {
|
|
1769
1853
|
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"
|
|
1770
1854
|
})
|
|
1771
|
-
}),
|
|
1855
|
+
}), ii = (n) => r("svg", {
|
|
1772
1856
|
viewBox: "0 0 1024 1024",
|
|
1773
1857
|
id: "send",
|
|
1774
1858
|
className: n.className,
|
|
1775
1859
|
version: "1.1",
|
|
1776
1860
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1777
|
-
children:
|
|
1861
|
+
children: r("path", {
|
|
1778
1862
|
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"
|
|
1779
1863
|
})
|
|
1780
|
-
}),
|
|
1864
|
+
}), si = () => r("svg", {
|
|
1781
1865
|
viewBox: "0 0 1024 1024",
|
|
1782
1866
|
version: "1.1",
|
|
1783
1867
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1784
|
-
children:
|
|
1868
|
+
children: r("path", {
|
|
1785
1869
|
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"
|
|
1786
1870
|
})
|
|
1787
|
-
}),
|
|
1871
|
+
}), Tt = () => r("svg", {
|
|
1788
1872
|
viewBox: "0 0 1024 1024",
|
|
1789
1873
|
version: "1.1",
|
|
1790
1874
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1791
|
-
children:
|
|
1875
|
+
children: r("path", {
|
|
1792
1876
|
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"
|
|
1793
1877
|
})
|
|
1794
|
-
}),
|
|
1878
|
+
}), oi = () => r("svg", {
|
|
1795
1879
|
viewBox: "0 0 1024 1024",
|
|
1796
1880
|
version: "1.1",
|
|
1797
1881
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1798
|
-
children:
|
|
1882
|
+
children: r("path", {
|
|
1799
1883
|
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"
|
|
1800
1884
|
})
|
|
1801
|
-
}),
|
|
1885
|
+
}), ai = () => r("svg", {
|
|
1802
1886
|
viewBox: "0 0 1024 1024",
|
|
1803
1887
|
version: "1.1",
|
|
1804
1888
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1805
|
-
children:
|
|
1889
|
+
children: r("path", {
|
|
1806
1890
|
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"
|
|
1807
1891
|
})
|
|
1808
|
-
}),
|
|
1892
|
+
}), ri = () => r("svg", {
|
|
1809
1893
|
viewBox: "0 0 1024 1024",
|
|
1810
1894
|
version: "1.1",
|
|
1811
1895
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1812
|
-
children:
|
|
1896
|
+
children: r("path", {
|
|
1813
1897
|
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"
|
|
1814
1898
|
})
|
|
1815
|
-
}),
|
|
1899
|
+
}), ci = () => r("svg", {
|
|
1816
1900
|
viewBox: "0 0 1024 1024",
|
|
1817
1901
|
version: "1.1",
|
|
1818
1902
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1819
|
-
children:
|
|
1903
|
+
children: r("path", {
|
|
1820
1904
|
d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64"
|
|
1821
1905
|
})
|
|
1822
|
-
}),
|
|
1906
|
+
}), li = () => r("svg", {
|
|
1823
1907
|
viewBox: "0 0 1024 1024",
|
|
1824
1908
|
version: "1.1",
|
|
1825
1909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1826
|
-
children: [
|
|
1910
|
+
children: [r("path", {
|
|
1827
1911
|
d: "M481.0752 263.3728l50.9952 1.024 1.8432-105.8816-50.9952-0.8192z"
|
|
1828
|
-
}),
|
|
1912
|
+
}), r("path", {
|
|
1829
1913
|
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"
|
|
1830
|
-
}),
|
|
1914
|
+
}), r("path", {
|
|
1831
1915
|
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"
|
|
1832
|
-
}),
|
|
1916
|
+
}), r("path", {
|
|
1833
1917
|
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"
|
|
1834
|
-
}),
|
|
1918
|
+
}), r("path", {
|
|
1835
1919
|
d: "M319.6928 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
|
|
1836
|
-
}),
|
|
1920
|
+
}), r("path", {
|
|
1837
1921
|
d: "M617.472 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
|
|
1838
1922
|
})]
|
|
1839
|
-
}),
|
|
1923
|
+
}), ui = () => r("svg", {
|
|
1840
1924
|
viewBox: "0 0 18 18",
|
|
1841
1925
|
fill: "none",
|
|
1842
1926
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1843
|
-
children: [
|
|
1927
|
+
children: [r("path", {
|
|
1844
1928
|
d: "M5.856 17.121a.979.979 0 0 1-.327-.06.839.839 0 0 1-.283-.177.739.739 0 0 1-.187-.255.724.724 0 0 1-.07-.303l-.02-1.609a4.663 4.663 0 0 1-1.446-.455 4.252 4.252 0 0 1-.637-.401c-.199-.146-.385-.31-.553-.492a4.442 4.442 0 0 1-.45-.577 4.303 4.303 0 0 1-.327-.637 3.823 3.823 0 0 1-.206-.686 3.729 3.729 0 0 1-.064-.704V6.478c0-.261.025-.516.077-.771a4.43 4.43 0 0 1 .244-.747 4.062 4.062 0 0 1 .932-1.28c.2-.183.418-.347.65-.493.23-.145.482-.267.739-.364a4.21 4.21 0 0 1 .81-.225c.27-.054.553-.078.835-.078H8.55c.103 0 .2.018.29.054a.7.7 0 0 1 .411.376.667.667 0 0 1-.161.766.736.736 0 0 1-.25.151.764.764 0 0 1-.29.055H5.573c-.186 0-.366.012-.54.049-.18.03-.353.079-.52.145-.167.061-.328.14-.482.237-.148.091-.29.2-.418.316a2.897 2.897 0 0 0-.347.388c-.097.14-.187.286-.257.444a2.473 2.473 0 0 0-.206.977v4.287c0 .17.013.333.051.503a2.549 2.549 0 0 0 .772 1.33 2.721 2.721 0 0 0 .913.559c.167.066.347.115.527.152.18.03.36.048.546.048a.904.904 0 0 1 .61.23.848.848 0 0 1 .194.262.84.84 0 0 1 .07.303l.007.99 1.915-1.293a2.877 2.877 0 0 1 1.64-.492h2.372c.186 0 .366-.018.54-.048.18-.03.353-.08.52-.146.168-.067.329-.146.483-.237.148-.091.29-.2.418-.316.128-.121.244-.249.347-.388a2.8 2.8 0 0 0 .257-.444 2.47 2.47 0 0 0 .206-.977V8.585a.646.646 0 0 1 .225-.492.679.679 0 0 1 .244-.152.814.814 0 0 1 .585 0c.09.03.174.085.244.152a.657.657 0 0 1 .225.492V10.8c0 .261-.032.516-.083.771a4.192 4.192 0 0 1-.245.74c-.109.244-.244.468-.398.687a3.735 3.735 0 0 1-.534.6c-.2.183-.418.347-.65.493a4.134 4.134 0 0 1-.738.364 4.7 4.7 0 0 1-.81.225c-.27.054-.553.079-.836.079h-1.877c-.604 0-1.144.164-1.633.491l-2.54 1.713a.913.913 0 0 1-.514.157z",
|
|
1845
1929
|
fill: "currentColor"
|
|
1846
|
-
}),
|
|
1930
|
+
}), r("path", {
|
|
1847
1931
|
d: "M15.866 4.125h-4.174c-.41 0-.741.313-.741.7 0 .387.332.7.741.7h4.174c.41 0 .742-.313.742-.7 0-.387-.332-.7-.742-.7z",
|
|
1848
1932
|
fill: "currentColor"
|
|
1849
|
-
}),
|
|
1933
|
+
}), r("path", {
|
|
1850
1934
|
d: "M14.537 2.932c0-.396-.34-.717-.759-.717s-.758.32-.758.717v3.786c0 .396.34.717.758.717.42 0 .76-.321.76-.717V2.932z",
|
|
1851
1935
|
fill: "currentColor"
|
|
1852
1936
|
})]
|
|
1853
|
-
}),
|
|
1937
|
+
}), di = () => r("svg", {
|
|
1854
1938
|
viewBox: "64 64 896 896",
|
|
1855
1939
|
focusable: "false",
|
|
1856
1940
|
width: "1em",
|
|
1857
1941
|
height: "1em",
|
|
1858
1942
|
fill: "currentColor",
|
|
1859
1943
|
"aria-hidden": "true",
|
|
1860
|
-
children:
|
|
1944
|
+
children: r("path", {
|
|
1861
1945
|
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"
|
|
1862
1946
|
})
|
|
1863
|
-
}),
|
|
1947
|
+
}), hi = () => r("svg", {
|
|
1864
1948
|
fill: "currentColor",
|
|
1865
1949
|
viewBox: "0 0 1000 1000",
|
|
1866
1950
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1867
1951
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1868
1952
|
children: Array.from({
|
|
1869
1953
|
length: 4
|
|
1870
|
-
}).map((
|
|
1871
|
-
const p = u * (146.66666666666666 + 140), l = 1e3 / 2 - 250 / 2,
|
|
1872
|
-
return
|
|
1954
|
+
}).map((c, u) => {
|
|
1955
|
+
const p = u * (146.66666666666666 + 140), l = 1e3 / 2 - 250 / 2, m = 1e3 / 2 - 500 / 2;
|
|
1956
|
+
return r("rect", {
|
|
1873
1957
|
fill: "currentColor",
|
|
1874
1958
|
rx: 70,
|
|
1875
1959
|
ry: 70,
|
|
@@ -1877,16 +1961,16 @@ const jn = () => c("svg", {
|
|
|
1877
1961
|
width: 140,
|
|
1878
1962
|
x: p,
|
|
1879
1963
|
y: l,
|
|
1880
|
-
children: [
|
|
1964
|
+
children: [r("animate", {
|
|
1881
1965
|
attributeName: "height",
|
|
1882
1966
|
values: "250; 500; 250",
|
|
1883
1967
|
keyTimes: "0; 0.5; 1",
|
|
1884
1968
|
dur: "".concat(0.8, "s"),
|
|
1885
1969
|
begin: "".concat(0.8 / 4 * u, "s"),
|
|
1886
1970
|
repeatCount: "indefinite"
|
|
1887
|
-
}),
|
|
1971
|
+
}), r("animate", {
|
|
1888
1972
|
attributeName: "y",
|
|
1889
|
-
values: "".concat(l, "; ").concat(
|
|
1973
|
+
values: "".concat(l, "; ").concat(m, "; ").concat(l),
|
|
1890
1974
|
keyTimes: "0; 0.5; 1",
|
|
1891
1975
|
dur: "".concat(0.8, "s"),
|
|
1892
1976
|
begin: "".concat(0.8 / 4 * u, "s"),
|
|
@@ -1894,36 +1978,36 @@ const jn = () => c("svg", {
|
|
|
1894
1978
|
})]
|
|
1895
1979
|
}, u);
|
|
1896
1980
|
})
|
|
1897
|
-
}),
|
|
1981
|
+
}), pi = (n) => r("svg", {
|
|
1898
1982
|
className: n.className,
|
|
1899
1983
|
onClick: n.onClick,
|
|
1900
1984
|
viewBox: "0 0 1024 1024",
|
|
1901
1985
|
version: "1.1",
|
|
1902
1986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1903
|
-
children:
|
|
1987
|
+
children: r("path", {
|
|
1904
1988
|
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"
|
|
1905
1989
|
})
|
|
1906
|
-
}),
|
|
1990
|
+
}), fi = (n) => r("svg", {
|
|
1907
1991
|
className: n.className,
|
|
1908
1992
|
viewBox: "0 0 1024 1024",
|
|
1909
1993
|
version: "1.1",
|
|
1910
1994
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1911
|
-
children:
|
|
1995
|
+
children: r("path", {
|
|
1912
1996
|
d: "M498.33984 607.8464c-10.99776-32.9728-50.09408-73.5232-82.6368-85.74976L150.9376 422.8096c-38.54336-14.4384-36.98688-69.46816 2.27328-81.73568L844.92288 124.90752c33.30048-10.40384 64.57344 20.8896 54.1696 54.1696L682.92608 870.78912a43.2128 43.2128 0 0 1-81.36704 3.25632 121682.5344 121682.5344 0 0 1-103.2192-266.19904z"
|
|
1913
1997
|
})
|
|
1914
|
-
}),
|
|
1998
|
+
}), Tn = () => r("svg", {
|
|
1915
1999
|
className: "icon",
|
|
1916
2000
|
viewBox: "0 0 1024 1024",
|
|
1917
2001
|
version: "1.1",
|
|
1918
2002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1919
|
-
children:
|
|
2003
|
+
children: r("path", {
|
|
1920
2004
|
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"
|
|
1921
2005
|
})
|
|
1922
|
-
}),
|
|
2006
|
+
}), mi = (n) => r("svg", {
|
|
1923
2007
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1924
2008
|
className: n.className,
|
|
1925
2009
|
viewBox: "0 0 512 512",
|
|
1926
|
-
children:
|
|
2010
|
+
children: r("path", {
|
|
1927
2011
|
fill: "none",
|
|
1928
2012
|
stroke: "currentColor",
|
|
1929
2013
|
strokeLinecap: "round",
|
|
@@ -1931,20 +2015,20 @@ const jn = () => c("svg", {
|
|
|
1931
2015
|
strokeWidth: "48",
|
|
1932
2016
|
d: "M112 184l144 144 144-144"
|
|
1933
2017
|
})
|
|
1934
|
-
}), We = (n) =>
|
|
2018
|
+
}), We = (n) => r("svg", {
|
|
1935
2019
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1936
2020
|
className: "".concat(n.className, " icon"),
|
|
1937
2021
|
viewBox: "0 0 512 512",
|
|
1938
|
-
children:
|
|
2022
|
+
children: r("path", {
|
|
1939
2023
|
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29l-134.4 160a16 16 0 01-12 5.71h-.27a16 16 0 01-11.89-5.3l-57.6-64a16 16 0 1123.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0124.5 20.58z"
|
|
1940
2024
|
})
|
|
1941
|
-
}),
|
|
2025
|
+
}), je = (n) => r("svg", {
|
|
1942
2026
|
className: n.className,
|
|
1943
2027
|
width: "16",
|
|
1944
2028
|
height: "16",
|
|
1945
2029
|
viewBox: "0 0 50 50",
|
|
1946
2030
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1947
|
-
children:
|
|
2031
|
+
children: r("circle", {
|
|
1948
2032
|
cx: "25",
|
|
1949
2033
|
cy: "25",
|
|
1950
2034
|
r: "20",
|
|
@@ -1953,7 +2037,7 @@ const jn = () => c("svg", {
|
|
|
1953
2037
|
fill: "none",
|
|
1954
2038
|
strokeDasharray: "31.415, 31.415",
|
|
1955
2039
|
strokeLinecap: "round",
|
|
1956
|
-
children:
|
|
2040
|
+
children: r("animateTransform", {
|
|
1957
2041
|
attributeName: "transform",
|
|
1958
2042
|
type: "rotate",
|
|
1959
2043
|
from: "0 25 25",
|
|
@@ -1962,52 +2046,52 @@ const jn = () => c("svg", {
|
|
|
1962
2046
|
repeatCount: "indefinite"
|
|
1963
2047
|
})
|
|
1964
2048
|
})
|
|
1965
|
-
}),
|
|
2049
|
+
}), vi = () => r("svg", {
|
|
1966
2050
|
className: "icon",
|
|
1967
2051
|
viewBox: "0 0 1024 1024",
|
|
1968
2052
|
version: "1.1",
|
|
1969
2053
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1970
2054
|
width: "18",
|
|
1971
2055
|
height: "18",
|
|
1972
|
-
children:
|
|
2056
|
+
children: r("path", {
|
|
1973
2057
|
d: "M704 256v490.666667a170.666667 170.666667 0 0 1-170.666667 170.666666 170.666667 170.666667 0 0 1-170.666666-170.666666V213.333333A106.666667 106.666667 0 0 1 469.333333 106.666667 106.666667 106.666667 0 0 1 576 213.333333v448a42.666667 42.666667 0 0 1-42.666667 42.666667 42.666667 42.666667 0 0 1-42.666666-42.666667V256H426.666667v405.333333a106.666667 106.666667 0 0 0 106.666666 106.666667 106.666667 106.666667 0 0 0 106.666667-106.666667V213.333333a170.666667 170.666667 0 0 0-170.666667-170.666666 170.666667 170.666667 0 0 0-170.666666 170.666666v533.333334a234.666667 234.666667 0 0 0 234.666666 234.666666 234.666667 234.666667 0 0 0 234.666667-234.666666V256h-64z"
|
|
1974
2058
|
})
|
|
1975
|
-
}),
|
|
2059
|
+
}), xn = () => r("svg", {
|
|
1976
2060
|
className: "icon",
|
|
1977
2061
|
viewBox: "0 0 1024 1024",
|
|
1978
2062
|
version: "1.1",
|
|
1979
2063
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1980
2064
|
width: "18",
|
|
1981
2065
|
height: "18",
|
|
1982
|
-
children: [
|
|
2066
|
+
children: [r("path", {
|
|
1983
2067
|
d: "M842.666667 285.866667l-187.733334-187.733334c-14.933333-14.933333-32-21.333333-53.333333-21.333333H234.666667C194.133333 74.666667 160 108.8 160 149.333333v725.333334c0 40.533333 34.133333 74.666667 74.666667 74.666666h554.666666c40.533333 0 74.666667-34.133333 74.666667-74.666666V337.066667c0-19.2-8.533333-38.4-21.333333-51.2z m-44.8 44.8c-2.133333 2.133333-4.266667 0-8.533334 0h-170.666666c-6.4 0-10.666667-4.266667-10.666667-10.666667V149.333333c0-2.133333 0-6.4-2.133333-8.533333 0 0 2.133333 0 2.133333 2.133333l189.866667 187.733334z m-8.533334 554.666666H234.666667c-6.4 0-10.666667-4.266667-10.666667-10.666666V149.333333c0-6.4 4.266667-10.666667 10.666667-10.666666h311.466666c-2.133333 4.266667-2.133333 6.4-2.133333 10.666666v170.666667c0 40.533333 34.133333 74.666667 74.666667 74.666667h170.666666c4.266667 0 6.4 0 10.666667-2.133334V874.666667c0 6.4-4.266667 10.666667-10.666667 10.666666z",
|
|
1984
2068
|
fill: "currentColor"
|
|
1985
|
-
}),
|
|
2069
|
+
}), r("path", {
|
|
1986
2070
|
d: "M640 693.333333H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM640 522.666667H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM341.333333 416h85.333334c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-85.333334c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32z",
|
|
1987
2071
|
fill: "currentColor"
|
|
1988
2072
|
})]
|
|
1989
|
-
}),
|
|
2073
|
+
}), _i = () => r("svg", {
|
|
1990
2074
|
className: "icon",
|
|
1991
2075
|
viewBox: "0 0 1024 1024",
|
|
1992
2076
|
version: "1.1",
|
|
1993
2077
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1994
2078
|
width: "18",
|
|
1995
2079
|
height: "18",
|
|
1996
|
-
children:
|
|
2080
|
+
children: r("path", {
|
|
1997
2081
|
d: "M557.248 511.68l135.776-135.744-45.248-45.28L512 466.432l-135.776-135.776-45.248 45.28 135.776 135.744-135.776 135.776 45.248 45.248L512 556.928l135.776 135.776 45.248-45.248-135.776-135.776zM512 64c247.136 0 448 200.864 448 448s-200.864 448-448 448S64 759.136 64 512 264.864 64 512 64z",
|
|
1998
2082
|
fill: "currentColor"
|
|
1999
2083
|
})
|
|
2000
|
-
}),
|
|
2084
|
+
}), gi = () => r("svg", {
|
|
2001
2085
|
className: "icon",
|
|
2002
2086
|
viewBox: "0 0 1024 1024",
|
|
2003
2087
|
version: "1.1",
|
|
2004
2088
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2005
2089
|
width: "18",
|
|
2006
2090
|
height: "18",
|
|
2007
|
-
children:
|
|
2091
|
+
children: r("path", {
|
|
2008
2092
|
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"
|
|
2009
2093
|
})
|
|
2010
|
-
}),
|
|
2094
|
+
}), wi = (n) => r("svg", {
|
|
2011
2095
|
className: n.className,
|
|
2012
2096
|
id: "stop",
|
|
2013
2097
|
viewBox: "0 0 1025 1024",
|
|
@@ -2015,18 +2099,18 @@ const jn = () => c("svg", {
|
|
|
2015
2099
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2016
2100
|
width: "18",
|
|
2017
2101
|
height: "18",
|
|
2018
|
-
children: [
|
|
2102
|
+
children: [r("path", {
|
|
2019
2103
|
d: "M512.268258 1022.835842c-68.658678 0-135.399619-13.564433-198.369591-40.316509-60.752236-25.809077-115.373446-62.712976-162.346233-109.685763-46.971763-46.971763-83.875662-101.592974-109.685763-162.346233C15.115619 647.517366 1.551186 580.777449 1.551186 512.118771S15.115619 376.719151 41.866671 313.74918c25.810101-60.752236 62.714-115.373446 109.685763-162.346233 46.972787-46.971763 101.593997-83.875662 162.346233-109.685763 62.969971-26.751052 129.710912-40.315485 198.369591-40.315485s135.398595 13.564433 198.368567 40.315485c60.752236 25.810101 115.373446 62.714 162.346233 109.685763 46.971763 46.972787 83.875662 101.593997 109.685763 162.346233 26.752076 62.969971 40.316509 129.710912 40.316509 198.369591s-13.564433 135.398595-40.316509 198.368567c-25.809077 60.75326-62.712976 115.37447-109.685763 162.346233-46.971763 46.972787-101.592974 83.876686-162.346233 109.685763C647.666853 1009.27141 580.925912 1022.835842 512.268258 1022.835842zM512.268258 50.548195c-62.018782 0-122.293887 12.247716-179.152287 36.403219-54.923257 23.333323-104.317532 56.709936-146.810821 99.204249s-75.870926 91.888588-99.204249 146.810821c-24.155503 56.8584-36.403219 117.133505-36.403219 179.152287 0 62.017758 12.247716 122.292863 36.403219 179.152287 23.333323 54.923257 56.709936 104.317532 99.204249 146.811845 42.493289 42.493289 91.888588 75.870926 146.810821 99.204249 56.8584 24.155503 117.133505 36.403219 179.152287 36.403219 62.017758 0 122.292863-12.247716 179.152287-36.403219 54.923257-23.333323 104.317532-56.71096 146.811845-99.204249 42.493289-42.494313 75.870926-91.888588 99.204249-146.811845 24.155503-56.8584 36.403219-117.133505 36.403219-179.152287s-12.247716-122.293887-36.403219-179.152287c-23.334347-54.923257-56.71096-104.317532-99.205273-146.810821-42.493289-42.493289-91.887565-75.870926-146.810821-99.204249C634.561121 62.795911 574.286016 50.548195 512.268258 50.548195z",
|
|
2020
2104
|
fill: "currentColor"
|
|
2021
|
-
}),
|
|
2105
|
+
}), r("path", {
|
|
2022
2106
|
d: "M655.434047 694.244421 367.12637 694.244421c-21.046987 0-38.170445-17.123458-38.170445-38.170445L328.955925 367.766298c0-21.046987 17.123458-38.170445 38.170445-38.170445l288.307678 0c21.048011 0 38.170445 17.123458 38.170445 38.170445l0 288.307678C693.604492 677.120962 676.482058 694.244421 655.434047 694.244421zM380.150191 643.050154l262.260035 0L642.410226 380.79012 380.150191 380.79012 380.150191 643.050154z",
|
|
2023
2107
|
fill: "currentColor"
|
|
2024
2108
|
})]
|
|
2025
|
-
}),
|
|
2109
|
+
}), bi = (n) => r("svg", {
|
|
2026
2110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2027
2111
|
className: n.className,
|
|
2028
2112
|
viewBox: "0 0 512 512",
|
|
2029
|
-
children:
|
|
2113
|
+
children: r("path", {
|
|
2030
2114
|
fill: "none",
|
|
2031
2115
|
stroke: "currentColor",
|
|
2032
2116
|
strokeLinecap: "round",
|
|
@@ -2034,41 +2118,41 @@ const jn = () => c("svg", {
|
|
|
2034
2118
|
strokeWidth: "48",
|
|
2035
2119
|
d: "M112 268l144 144 144-144M256 392V100"
|
|
2036
2120
|
})
|
|
2037
|
-
}),
|
|
2121
|
+
}), yi = () => r("svg", {
|
|
2038
2122
|
viewBox: "0 0 1024 1024",
|
|
2039
2123
|
version: "1.1",
|
|
2040
2124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2041
2125
|
width: "18",
|
|
2042
2126
|
height: "18",
|
|
2043
|
-
children: [
|
|
2127
|
+
children: [r("path", {
|
|
2044
2128
|
d: "M394.688 126.208a32 32 0 0 1 32-32h170.688a32 32 0 0 1 32 32v138.624h288a32 32 0 0 1 32 32v170.688a32 32 0 0 1-32 32H106.688a32 32 0 0 1-32-32V296.832a32 32 0 0 1 32-32h288V126.208z m64 32v138.624a32 32 0 0 1-32 32h-288v106.688h746.688V328.832h-288a32 32 0 0 1-32-32V158.208H458.688z"
|
|
2045
|
-
}),
|
|
2129
|
+
}), r("path", {
|
|
2046
2130
|
d: "M138.688 469.376a32 32 0 0 1 32-32h682.688a32 32 0 0 1 32 32v384a32 32 0 0 1-32 32H170.688a32 32 0 0 1-32-32v-384z m64 32v320h618.688v-320H202.688z"
|
|
2047
|
-
}),
|
|
2131
|
+
}), r("path", {
|
|
2048
2132
|
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"
|
|
2049
2133
|
})]
|
|
2050
|
-
}),
|
|
2134
|
+
}), Ci = () => r("svg", {
|
|
2051
2135
|
viewBox: "0 0 1024 1024",
|
|
2052
2136
|
version: "1.1",
|
|
2053
2137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2054
2138
|
width: "18",
|
|
2055
2139
|
height: "18",
|
|
2056
|
-
children:
|
|
2140
|
+
children: r("path", {
|
|
2057
2141
|
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"
|
|
2058
2142
|
})
|
|
2059
|
-
}),
|
|
2143
|
+
}), Ti = () => r("svg", {
|
|
2060
2144
|
version: "1.1",
|
|
2061
2145
|
className: "icon",
|
|
2062
2146
|
viewBox: "0 0 1024 1024",
|
|
2063
2147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2064
|
-
children:
|
|
2148
|
+
children: r("path", {
|
|
2065
2149
|
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"
|
|
2066
2150
|
})
|
|
2067
|
-
}),
|
|
2151
|
+
}), xi = (n) => r("svg", {
|
|
2068
2152
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2069
2153
|
className: n.className,
|
|
2070
2154
|
viewBox: "0 0 512 512",
|
|
2071
|
-
children:
|
|
2155
|
+
children: r("path", {
|
|
2072
2156
|
fill: "none",
|
|
2073
2157
|
stroke: "currentColor",
|
|
2074
2158
|
strokeLinecap: "round",
|
|
@@ -2076,137 +2160,311 @@ const jn = () => c("svg", {
|
|
|
2076
2160
|
strokeWidth: "48",
|
|
2077
2161
|
d: "M184 112l144 144-144 144"
|
|
2078
2162
|
})
|
|
2079
|
-
}),
|
|
2163
|
+
}), Si = () => r("svg", {
|
|
2080
2164
|
className: "icon",
|
|
2081
2165
|
viewBox: "0 0 1024 1024",
|
|
2082
2166
|
version: "1.1",
|
|
2083
2167
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2084
|
-
children:
|
|
2168
|
+
children: r("path", {
|
|
2085
2169
|
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"
|
|
2086
2170
|
})
|
|
2087
2171
|
});
|
|
2088
|
-
const
|
|
2172
|
+
const ki = (n) => {
|
|
2089
2173
|
const {
|
|
2090
2174
|
items: e
|
|
2091
|
-
} = n, t =
|
|
2092
|
-
|
|
2093
|
-
s.value = e.filter((a) => a.description), s.value.length > 0 && s.value.forEach((a,
|
|
2094
|
-
a.done && (t.value = [...t.value,
|
|
2175
|
+
} = n, t = M([]), i = new k("chat-thought-chain"), s = M([]);
|
|
2176
|
+
I(() => {
|
|
2177
|
+
s.value = e.filter((a) => a.description), s.value.length > 0 && s.value.forEach((a, c) => {
|
|
2178
|
+
a.done && (t.value = [...t.value, c]);
|
|
2095
2179
|
});
|
|
2096
2180
|
}, [e]);
|
|
2097
2181
|
const o = (a) => {
|
|
2098
|
-
t.value.includes(a) ? t.value = t.value.filter((
|
|
2182
|
+
t.value.includes(a) ? t.value = t.value.filter((c) => c !== a) : t.value = [...t.value, a];
|
|
2099
2183
|
};
|
|
2100
|
-
return s.value.length === 0 ? null :
|
|
2184
|
+
return s.value.length === 0 ? null : r("div", {
|
|
2101
2185
|
className: "".concat(i.b(), " ").concat(i.is("single", s.value.length === 1)),
|
|
2102
|
-
children: s.value.map((a,
|
|
2186
|
+
children: s.value.map((a, c) => {
|
|
2103
2187
|
if (!a.description)
|
|
2104
2188
|
return;
|
|
2105
|
-
const u = t.value.includes(
|
|
2106
|
-
return
|
|
2189
|
+
const u = t.value.includes(c);
|
|
2190
|
+
return r("div", {
|
|
2107
2191
|
className: "".concat(i.e("item"), " ").concat(i.is("collapsed", u)),
|
|
2108
|
-
children: [
|
|
2192
|
+
children: [r("div", {
|
|
2109
2193
|
className: i.e("item-icon"),
|
|
2110
|
-
children: a.icon ||
|
|
2111
|
-
children:
|
|
2194
|
+
children: a.icon || r("span", {
|
|
2195
|
+
children: c
|
|
2112
2196
|
})
|
|
2113
|
-
}),
|
|
2197
|
+
}), r("div", {
|
|
2114
2198
|
className: i.e("item-content"),
|
|
2115
|
-
children: [
|
|
2199
|
+
children: [r("div", {
|
|
2116
2200
|
className: i.e("item-title"),
|
|
2117
|
-
onClick: () => o(
|
|
2118
|
-
children: [a.title,
|
|
2201
|
+
onClick: () => o(c),
|
|
2202
|
+
children: [a.title, r(mi, {
|
|
2119
2203
|
className: i.e("icon")
|
|
2120
2204
|
})]
|
|
2121
|
-
}),
|
|
2205
|
+
}), r("div", {
|
|
2122
2206
|
className: i.e("item-description"),
|
|
2123
2207
|
children: a.description
|
|
2124
2208
|
})]
|
|
2125
2209
|
})]
|
|
2126
|
-
},
|
|
2210
|
+
}, c);
|
|
2127
2211
|
})
|
|
2128
2212
|
});
|
|
2129
2213
|
};
|
|
2130
|
-
const
|
|
2214
|
+
const Ni = (n) => {
|
|
2131
2215
|
const {
|
|
2132
2216
|
items: e,
|
|
2133
2217
|
onItemClick: t
|
|
2134
2218
|
} = n, i = (o, a) => {
|
|
2135
2219
|
t == null || t(o, a);
|
|
2136
|
-
}, s = new
|
|
2137
|
-
return
|
|
2220
|
+
}, s = new k("chat-suggestions");
|
|
2221
|
+
return r("div", {
|
|
2138
2222
|
className: "".concat(s.b()),
|
|
2139
|
-
children: e.map((o, a) =>
|
|
2223
|
+
children: e.map((o, a) => r("div", {
|
|
2140
2224
|
className: "".concat(s.e("item"), " ").concat(s.is("action", o.type === "action")),
|
|
2141
|
-
onClick: (
|
|
2225
|
+
onClick: (c) => i(o, c),
|
|
2142
2226
|
title: o.metadata.content_name,
|
|
2143
|
-
children: [o.metadata.content_name,
|
|
2227
|
+
children: [o.metadata.content_name, r(xi, {
|
|
2144
2228
|
className: "".concat(s.e("item-icon"))
|
|
2145
2229
|
})]
|
|
2146
2230
|
}, a))
|
|
2147
2231
|
});
|
|
2148
2232
|
};
|
|
2149
|
-
const
|
|
2233
|
+
const $i = (n) => {
|
|
2234
|
+
const e = new k("chat-tool-call-item"), t = M(!1), i = M(!1);
|
|
2235
|
+
let s;
|
|
2236
|
+
const o = ce(), a = () => {
|
|
2237
|
+
t.value = !t.value, u("code-block-".concat(o), n.item);
|
|
2238
|
+
}, c = (l) => {
|
|
2239
|
+
l.stopPropagation(), s && clearTimeout(s), i.value = !0, navigator.clipboard.writeText(JSON.stringify(n.item, void 0, 2)), window.ibiz.message.success("已复制"), s = setTimeout(() => {
|
|
2240
|
+
i.value = !1;
|
|
2241
|
+
}, 2e3);
|
|
2242
|
+
};
|
|
2243
|
+
I(() => () => {
|
|
2244
|
+
s && clearTimeout(s);
|
|
2245
|
+
}, []);
|
|
2246
|
+
const u = (l, m, _ = 0) => {
|
|
2247
|
+
const d = document.getElementById(l);
|
|
2248
|
+
if (!d || (d.innerHTML = "", !t.value))
|
|
2249
|
+
return;
|
|
2250
|
+
h(m, _).forEach((v, w) => {
|
|
2251
|
+
const g = document.createElement("div");
|
|
2252
|
+
g.className = "code-line";
|
|
2253
|
+
const C = document.createElement("span");
|
|
2254
|
+
C && (C.className = "line-number", C.textContent = (w + 1).toString(), g.appendChild(C), g.innerHTML += v, d.appendChild(g));
|
|
2255
|
+
});
|
|
2256
|
+
}, h = (l, m = 0) => {
|
|
2257
|
+
const _ = " ".repeat(m), d = [];
|
|
2258
|
+
if (Array.isArray(l)) {
|
|
2259
|
+
if (l.length === 0)
|
|
2260
|
+
return ["".concat(_, '<span class="array">[]</span>')];
|
|
2261
|
+
d.push("".concat(_, '<span class="array">[</span>')), l.forEach((f, v) => {
|
|
2262
|
+
const w = h(f, m + 1), g = v < l.length - 1 ? "," : "";
|
|
2263
|
+
typeof f == "object" && f !== null ? (d.push(...w.slice(0, -1)), d.push("".concat(w[w.length - 1]).concat(g))) : d.push("".concat(w[0]).concat(g));
|
|
2264
|
+
}), d.push("".concat(_, '<span class="array">]</span>'));
|
|
2265
|
+
} else if (typeof l == "object" && l !== null) {
|
|
2266
|
+
const f = Object.keys(l);
|
|
2267
|
+
if (f.length === 0)
|
|
2268
|
+
return ["".concat(_, '<span class="property">{}</span>')];
|
|
2269
|
+
d.push("".concat(_, '<span class="property">{</span>')), f.forEach((v, w) => {
|
|
2270
|
+
const g = l[v], C = w < f.length - 1 ? "," : "", T = '<span class="json-key">"'.concat(v, '":</span>');
|
|
2271
|
+
if (typeof g == "object" && g !== null) {
|
|
2272
|
+
const x = h(g, m + 1);
|
|
2273
|
+
d.push("".concat(_, " ").concat(T, " ").concat(x[0].trim())), x.length > 1 && (d.push(...x.slice(1, -1)), d.push("".concat(x[x.length - 1]).concat(C)));
|
|
2274
|
+
} else {
|
|
2275
|
+
const x = p(g);
|
|
2276
|
+
d.push("".concat(_, " ").concat(T, " ").concat(x).concat(C));
|
|
2277
|
+
}
|
|
2278
|
+
}), d.push("".concat(_, '<span class="property">}</span>'));
|
|
2279
|
+
} else
|
|
2280
|
+
d.push("".concat(_).concat(p(l)));
|
|
2281
|
+
return d;
|
|
2282
|
+
}, p = (l) => typeof l == "string" ? l.includes("Failed") || l.includes("Error") || l.includes("ERR_") ? '<span class="error">"'.concat(l, '"</span>') : '<span class="string">"'.concat(l, '"</span>') : typeof l == "number" ? '<span class="number">'.concat(l, "</span>") : typeof l == "boolean" ? '<span class="boolean">'.concat(l, "</span>") : l === null ? '<span class="null">null</span>' : "";
|
|
2283
|
+
return r("div", {
|
|
2284
|
+
className: "".concat(e.b()),
|
|
2285
|
+
children: [r("div", {
|
|
2286
|
+
className: e.e("header"),
|
|
2287
|
+
onClick: () => a(),
|
|
2288
|
+
children: [r("div", {
|
|
2289
|
+
className: e.e("header-left"),
|
|
2290
|
+
children: r("div", {
|
|
2291
|
+
children: n.item.name
|
|
2292
|
+
})
|
|
2293
|
+
}), r("div", {
|
|
2294
|
+
className: e.e("header-right"),
|
|
2295
|
+
children: [n.item.error && r("span", {
|
|
2296
|
+
style: "color: red;",
|
|
2297
|
+
children: "发生错误"
|
|
2298
|
+
}), n.item.error && r("svg", {
|
|
2299
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2300
|
+
width: "13",
|
|
2301
|
+
height: "13",
|
|
2302
|
+
viewBox: "0 0 24 24",
|
|
2303
|
+
fill: "none",
|
|
2304
|
+
stroke: "red",
|
|
2305
|
+
strokeWidth: "2",
|
|
2306
|
+
strokeLinecap: "round",
|
|
2307
|
+
strokeLinejoin: "round",
|
|
2308
|
+
"aria-hidden": "true",
|
|
2309
|
+
style: "margin-left: 6px;",
|
|
2310
|
+
children: [r("path", {
|
|
2311
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"
|
|
2312
|
+
}), r("path", {
|
|
2313
|
+
d: "M12 9v4"
|
|
2314
|
+
}), r("path", {
|
|
2315
|
+
d: "M12 17h.01"
|
|
2316
|
+
})]
|
|
2317
|
+
}), r("span", {
|
|
2318
|
+
title: "复制",
|
|
2319
|
+
children: i.value ? r("svg", {
|
|
2320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2321
|
+
width: "14",
|
|
2322
|
+
height: "14",
|
|
2323
|
+
viewBox: "0 0 24 24",
|
|
2324
|
+
fill: "none",
|
|
2325
|
+
stroke: "rgb(0, 185, 107)",
|
|
2326
|
+
strokeWidth: "2",
|
|
2327
|
+
strokeLinecap: "round",
|
|
2328
|
+
strokeLinejoin: "round",
|
|
2329
|
+
className: "lucide lucide-check",
|
|
2330
|
+
"aria-hidden": "true",
|
|
2331
|
+
style: "margin-left: 6px;",
|
|
2332
|
+
onClick: (l) => l.stopPropagation(),
|
|
2333
|
+
children: r("path", {
|
|
2334
|
+
d: "M20 6 9 17l-5-5"
|
|
2335
|
+
})
|
|
2336
|
+
}) : r("svg", {
|
|
2337
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2338
|
+
width: "14",
|
|
2339
|
+
height: "14",
|
|
2340
|
+
viewBox: "0 0 24 24",
|
|
2341
|
+
fill: "none",
|
|
2342
|
+
stroke: "currentColor",
|
|
2343
|
+
strokeWidth: "2",
|
|
2344
|
+
strokeLinecap: "round",
|
|
2345
|
+
strokeLinejoin: "round",
|
|
2346
|
+
"aria-hidden": "true",
|
|
2347
|
+
style: "margin-left: 6px;",
|
|
2348
|
+
onClick: (l) => c(l),
|
|
2349
|
+
children: [r("rect", {
|
|
2350
|
+
width: "14",
|
|
2351
|
+
height: "14",
|
|
2352
|
+
x: "8",
|
|
2353
|
+
y: "8",
|
|
2354
|
+
rx: "2",
|
|
2355
|
+
ry: "2"
|
|
2356
|
+
}), r("path", {
|
|
2357
|
+
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
|
|
2358
|
+
})]
|
|
2359
|
+
})
|
|
2360
|
+
}), r("svg", {
|
|
2361
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2362
|
+
width: "18",
|
|
2363
|
+
height: "18",
|
|
2364
|
+
viewBox: "0 0 24 24",
|
|
2365
|
+
fill: "none",
|
|
2366
|
+
stroke: "currentColor",
|
|
2367
|
+
strokeWidth: "1.5",
|
|
2368
|
+
strokeLinecap: "round",
|
|
2369
|
+
strokeLinejoin: "round",
|
|
2370
|
+
"aria-hidden": "true",
|
|
2371
|
+
style: {
|
|
2372
|
+
"margin-left": " 6px",
|
|
2373
|
+
transform: t.value ? "rotate(90deg)" : "rotate(0deg)"
|
|
2374
|
+
},
|
|
2375
|
+
children: r("path", {
|
|
2376
|
+
d: "m9 18 6-6-6-6"
|
|
2377
|
+
})
|
|
2378
|
+
})]
|
|
2379
|
+
})]
|
|
2380
|
+
}), r("div", {
|
|
2381
|
+
className: e.e("content"),
|
|
2382
|
+
id: "code-block-".concat(o)
|
|
2383
|
+
})]
|
|
2384
|
+
});
|
|
2385
|
+
};
|
|
2386
|
+
const Ei = (n) => {
|
|
2387
|
+
const {
|
|
2388
|
+
items: e
|
|
2389
|
+
} = n, t = new k("chat-tool-call"), i = M([]), s = M(!1), o = M(!1);
|
|
2390
|
+
I(() => {
|
|
2391
|
+
i.value = e.filter((u) => u), o.value = e.length > 4;
|
|
2392
|
+
}, [e]);
|
|
2393
|
+
const a = B(() => o.value && !s.value ? i.value.slice(0, 4) : i.value), c = () => {
|
|
2394
|
+
s.value = !s.value;
|
|
2395
|
+
};
|
|
2396
|
+
return r("div", {
|
|
2397
|
+
className: "".concat(t.b()),
|
|
2398
|
+
children: [a.value.map((u, h) => r($i, {
|
|
2399
|
+
item: u
|
|
2400
|
+
}, h)), o.value && r("div", {
|
|
2401
|
+
className: t.e("toggle"),
|
|
2402
|
+
onClick: c,
|
|
2403
|
+
children: s.value ? "收起工具调用" : "展开全部 ".concat(i.value.length, " 个工具调用")
|
|
2404
|
+
})]
|
|
2405
|
+
});
|
|
2406
|
+
};
|
|
2407
|
+
const te = new k("markdown-message"), Mi = (n) => {
|
|
2150
2408
|
const {
|
|
2151
2409
|
message: e,
|
|
2152
2410
|
size: t
|
|
2153
|
-
} = n, i =
|
|
2411
|
+
} = n, i = M(ce()), s = M(null), o = X(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), a = X(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), c = M({
|
|
2154
2412
|
title: "",
|
|
2155
2413
|
description: "",
|
|
2156
|
-
icon:
|
|
2157
|
-
}), u =
|
|
2414
|
+
icon: r(je, {})
|
|
2415
|
+
}), u = M({
|
|
2158
2416
|
hasSuggestions: !1,
|
|
2159
2417
|
suggestions: []
|
|
2160
|
-
}), h = (
|
|
2161
|
-
|
|
2418
|
+
}), h = (m) => {
|
|
2419
|
+
m && m.length > 0 ? u.value = {
|
|
2162
2420
|
hasSuggestions: !0,
|
|
2163
|
-
suggestions:
|
|
2421
|
+
suggestions: m
|
|
2164
2422
|
} : u.value = {
|
|
2165
2423
|
hasSuggestions: !1,
|
|
2166
2424
|
suggestions: []
|
|
2167
2425
|
};
|
|
2168
|
-
}, p = (
|
|
2169
|
-
n.controller.handleSuggestionClick(n.message,
|
|
2170
|
-
}, l = (
|
|
2171
|
-
const _ =
|
|
2172
|
-
let f = "",
|
|
2173
|
-
return d === -1 ? (w = !1, f =
|
|
2426
|
+
}, p = (m, _) => {
|
|
2427
|
+
n.controller.handleSuggestionClick(n.message, m, _);
|
|
2428
|
+
}, l = (m) => {
|
|
2429
|
+
const _ = m.indexOf("<think>"), d = m.indexOf("</think>");
|
|
2430
|
+
let f = "", v = "", w = !1;
|
|
2431
|
+
return d === -1 ? (w = !1, f = m.slice(_ + 7), v = "") : (w = !0, f = m.slice(_ + 7, d), v = m.slice(d + 8)), {
|
|
2174
2432
|
isThoughtCompleted: w,
|
|
2175
2433
|
thoughtContent: f,
|
|
2176
|
-
answerContent:
|
|
2434
|
+
answerContent: v
|
|
2177
2435
|
};
|
|
2178
2436
|
};
|
|
2179
|
-
return
|
|
2437
|
+
return I(() => {
|
|
2180
2438
|
if (t >= 0 && s.value) {
|
|
2181
2439
|
if (e.content.indexOf("<think>") !== -1) {
|
|
2182
2440
|
const {
|
|
2183
|
-
isThoughtCompleted:
|
|
2441
|
+
isThoughtCompleted: m,
|
|
2184
2442
|
thoughtContent: _,
|
|
2185
2443
|
answerContent: d
|
|
2186
2444
|
} = l(e.content);
|
|
2187
|
-
|
|
2445
|
+
m ? (c.value.icon = r(We, {}), c.value.title = "思考完成") : e.completed === !0 ? (c.value.icon = r(We, {}), c.value.title = "思考已停止") : (c.value.icon = r(je, {}), c.value.title = "思考中..."), c.value.description = _ || "", s.value.setMarkdown(d || "");
|
|
2188
2446
|
} else
|
|
2189
|
-
s.value.setMarkdown(e.content || "");
|
|
2447
|
+
e.content.indexOf("<tool_call>") !== -1 ? s.value.setMarkdown("") : s.value.setMarkdown(e.content || "");
|
|
2190
2448
|
h(e.suggestions);
|
|
2191
2449
|
}
|
|
2192
|
-
}, [e, t]),
|
|
2193
|
-
let
|
|
2450
|
+
}, [e, t]), I(() => {
|
|
2451
|
+
let m = "";
|
|
2194
2452
|
if (e.content.indexOf("<think>") !== -1) {
|
|
2195
2453
|
const {
|
|
2196
2454
|
isThoughtCompleted: _,
|
|
2197
2455
|
thoughtContent: d,
|
|
2198
2456
|
answerContent: f
|
|
2199
2457
|
} = l(e.content);
|
|
2200
|
-
|
|
2458
|
+
c.value = {
|
|
2201
2459
|
title: _ ? "思考完成" : e.completed === !0 ? "思考已停止" : "思考中...",
|
|
2202
2460
|
description: d || "",
|
|
2203
|
-
icon: _ || e.completed === !0 ?
|
|
2204
|
-
}, f && (
|
|
2461
|
+
icon: _ || e.completed === !0 ? r(We, {}) : r(je, {})
|
|
2462
|
+
}, f && (m = f);
|
|
2205
2463
|
} else
|
|
2206
|
-
|
|
2207
|
-
h(e.suggestions), s.value = new
|
|
2464
|
+
e.content.indexOf("<tool_call>") !== -1 ? m = "" : m = e.content;
|
|
2465
|
+
h(e.suggestions), s.value = new qt({
|
|
2208
2466
|
id: i,
|
|
2209
|
-
value:
|
|
2467
|
+
value: m || "",
|
|
2210
2468
|
editor: {
|
|
2211
2469
|
defaultModel: "previewOnly"
|
|
2212
2470
|
},
|
|
@@ -2228,36 +2486,38 @@ const te = new M("markdown-message"), wi = (n) => {
|
|
|
2228
2486
|
}
|
|
2229
2487
|
}
|
|
2230
2488
|
});
|
|
2231
|
-
}, []),
|
|
2489
|
+
}, []), r("div", {
|
|
2232
2490
|
className: "".concat(te.b(), " ").concat(te.is("loading", o)),
|
|
2233
|
-
children: [
|
|
2491
|
+
children: [r("div", {
|
|
2234
2492
|
className: te.b("header"),
|
|
2235
|
-
children: [
|
|
2493
|
+
children: [r("div", {
|
|
2236
2494
|
className: te.be("header", "caption"),
|
|
2237
2495
|
children: "AI "
|
|
2238
|
-
}), n.children, a ?
|
|
2496
|
+
}), n.children, a ? r("div", {
|
|
2239
2497
|
className: te.be("header", "timeout"),
|
|
2240
2498
|
children: "请求超时"
|
|
2241
2499
|
}) : null]
|
|
2242
|
-
}),
|
|
2500
|
+
}), r("div", {
|
|
2243
2501
|
className: "".concat(te.b("content"), " pre-wrap-container"),
|
|
2244
|
-
children: [
|
|
2245
|
-
items: [
|
|
2246
|
-
}),
|
|
2502
|
+
children: [r(ki, {
|
|
2503
|
+
items: [c.value]
|
|
2504
|
+
}), e.toolcalls && e.toolcalls.length > 0 ? r(Ei, {
|
|
2505
|
+
items: e.toolcalls || []
|
|
2506
|
+
}) : null, r("div", {
|
|
2247
2507
|
id: i
|
|
2248
2508
|
})]
|
|
2249
|
-
}),
|
|
2509
|
+
}), r("div", {
|
|
2250
2510
|
className: te.b("footer"),
|
|
2251
|
-
children: u.value.hasSuggestions ?
|
|
2511
|
+
children: u.value.hasSuggestions ? r(Ni, {
|
|
2252
2512
|
items: u.value.suggestions,
|
|
2253
|
-
onItemClick: (
|
|
2254
|
-
p(
|
|
2513
|
+
onItemClick: (m, _) => {
|
|
2514
|
+
p(m, _);
|
|
2255
2515
|
}
|
|
2256
2516
|
}) : null
|
|
2257
2517
|
})]
|
|
2258
2518
|
});
|
|
2259
2519
|
};
|
|
2260
|
-
const
|
|
2520
|
+
const he = new k("ossfile-material"), Ai = (n) => {
|
|
2261
2521
|
const e = B(() => n.material.data.name), t = B(() => n.material.metadata.size), i = B(() => {
|
|
2262
2522
|
const o = n.material.metadata.state;
|
|
2263
2523
|
return o === "successed" ? "上传成功" : o === "uploading" ? "上传中" : o === "failed" ? "上传失败" : "未知状态";
|
|
@@ -2273,22 +2533,22 @@ const de = new M("ossfile-material"), bi = (n) => {
|
|
|
2273
2533
|
return "#ff4d4f";
|
|
2274
2534
|
}
|
|
2275
2535
|
});
|
|
2276
|
-
return
|
|
2277
|
-
className:
|
|
2278
|
-
children: [
|
|
2279
|
-
className:
|
|
2280
|
-
children:
|
|
2281
|
-
}),
|
|
2282
|
-
className:
|
|
2283
|
-
children: [
|
|
2284
|
-
className:
|
|
2536
|
+
return r("div", {
|
|
2537
|
+
className: he.b(),
|
|
2538
|
+
children: [r("div", {
|
|
2539
|
+
className: he.b("left"),
|
|
2540
|
+
children: r(xn, {})
|
|
2541
|
+
}), r("div", {
|
|
2542
|
+
className: he.b("right"),
|
|
2543
|
+
children: [r("div", {
|
|
2544
|
+
className: he.e("name"),
|
|
2285
2545
|
title: e,
|
|
2286
2546
|
children: e
|
|
2287
|
-
}),
|
|
2288
|
-
className:
|
|
2289
|
-
children: [
|
|
2547
|
+
}), r("div", {
|
|
2548
|
+
className: he.e("metadata"),
|
|
2549
|
+
children: [r("div", {
|
|
2290
2550
|
children: [t, "B"]
|
|
2291
|
-
}),
|
|
2551
|
+
}), r("div", {
|
|
2292
2552
|
style: {
|
|
2293
2553
|
color: s.value
|
|
2294
2554
|
},
|
|
@@ -2298,70 +2558,70 @@ const de = new M("ossfile-material"), bi = (n) => {
|
|
|
2298
2558
|
})]
|
|
2299
2559
|
});
|
|
2300
2560
|
};
|
|
2301
|
-
const
|
|
2561
|
+
const pe = new k("common-material"), Ii = (n) => {
|
|
2302
2562
|
var i, s, o, a;
|
|
2303
|
-
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((
|
|
2304
|
-
return
|
|
2305
|
-
className:
|
|
2306
|
-
children: [
|
|
2307
|
-
className:
|
|
2308
|
-
children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) &&
|
|
2309
|
-
children: (o = e.icon) != null && o.cssClass ?
|
|
2563
|
+
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((c) => c.id === n.material.metadata.actionId), t = B(() => n.material.metadata.name);
|
|
2564
|
+
return r("div", {
|
|
2565
|
+
className: pe.b(),
|
|
2566
|
+
children: [r("div", {
|
|
2567
|
+
className: pe.b("left"),
|
|
2568
|
+
children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && r(Y, {
|
|
2569
|
+
children: (o = e.icon) != null && o.cssClass ? r("i", {
|
|
2310
2570
|
className: e.icon.cssClass
|
|
2311
|
-
}) : (a = e.icon) != null && a.imagePath ? it(e.icon.imagePath) ?
|
|
2571
|
+
}) : (a = e.icon) != null && a.imagePath ? it(e.icon.imagePath) ? r("div", {
|
|
2312
2572
|
dangerouslySetInnerHTML: {
|
|
2313
2573
|
__html: e.icon.imagePath
|
|
2314
2574
|
}
|
|
2315
|
-
}) :
|
|
2575
|
+
}) : r("img", {
|
|
2316
2576
|
src: e.icon.imagePath
|
|
2317
2577
|
}) : null
|
|
2318
|
-
}) :
|
|
2319
|
-
}),
|
|
2320
|
-
className:
|
|
2321
|
-
children: [
|
|
2322
|
-
className:
|
|
2578
|
+
}) : r(gi, {})
|
|
2579
|
+
}), r("div", {
|
|
2580
|
+
className: pe.b("right"),
|
|
2581
|
+
children: [r("div", {
|
|
2582
|
+
className: pe.e("name"),
|
|
2323
2583
|
title: t,
|
|
2324
2584
|
children: t
|
|
2325
|
-
}),
|
|
2326
|
-
className:
|
|
2327
|
-
children:
|
|
2585
|
+
}), r("div", {
|
|
2586
|
+
className: pe.e("metadata"),
|
|
2587
|
+
children: r("div", {
|
|
2328
2588
|
children: (e == null ? void 0 : e.label) || "素材资源"
|
|
2329
2589
|
})
|
|
2330
2590
|
})]
|
|
2331
2591
|
})]
|
|
2332
2592
|
});
|
|
2333
2593
|
};
|
|
2334
|
-
const
|
|
2594
|
+
const Ve = new k("chat-input-material-item"), Sn = (n) => {
|
|
2335
2595
|
const {
|
|
2336
2596
|
material: e
|
|
2337
2597
|
} = n;
|
|
2338
2598
|
let t = null;
|
|
2339
2599
|
switch (e.type) {
|
|
2340
2600
|
case "ossfile":
|
|
2341
|
-
t =
|
|
2601
|
+
t = Ai;
|
|
2342
2602
|
break;
|
|
2343
2603
|
default:
|
|
2344
|
-
t =
|
|
2604
|
+
t = Ii;
|
|
2345
2605
|
}
|
|
2346
2606
|
const i = () => {
|
|
2347
2607
|
n.controller.deleteMaterial(e);
|
|
2348
2608
|
};
|
|
2349
|
-
return
|
|
2350
|
-
className: "".concat(
|
|
2351
|
-
children: [
|
|
2352
|
-
className:
|
|
2609
|
+
return r("div", {
|
|
2610
|
+
className: "".concat(Ve.b(), " ").concat(Ve.is("disabled", n.disabled)),
|
|
2611
|
+
children: [r("div", {
|
|
2612
|
+
className: Ve.e("icon"),
|
|
2353
2613
|
onClick: i,
|
|
2354
|
-
children:
|
|
2355
|
-
}),
|
|
2614
|
+
children: r(_i, {})
|
|
2615
|
+
}), q(t, {
|
|
2356
2616
|
material: e,
|
|
2357
2617
|
controller: n.controller
|
|
2358
2618
|
})]
|
|
2359
2619
|
});
|
|
2360
2620
|
};
|
|
2361
|
-
const ie = new
|
|
2362
|
-
const e =
|
|
2363
|
-
return
|
|
2364
|
-
t.value = new
|
|
2621
|
+
const ie = new k("user-message-question"), Di = (n) => {
|
|
2622
|
+
const e = M(ce()), t = M(null), i = B(() => n.message.content), s = B(() => an.parseMixedContent(i.value));
|
|
2623
|
+
return I(() => {
|
|
2624
|
+
t.value = new qt({
|
|
2365
2625
|
id: e,
|
|
2366
2626
|
value: s.value.remainingText || "",
|
|
2367
2627
|
editor: {
|
|
@@ -2385,28 +2645,28 @@ const ie = new M("user-message-question"), Ci = (n) => {
|
|
|
2385
2645
|
}
|
|
2386
2646
|
}
|
|
2387
2647
|
});
|
|
2388
|
-
}, [s.value.remainingText]),
|
|
2648
|
+
}, [s.value.remainingText]), r("div", {
|
|
2389
2649
|
className: ie.b(),
|
|
2390
|
-
children: [
|
|
2650
|
+
children: [r("div", {
|
|
2391
2651
|
className: ie.e("user-header"),
|
|
2392
|
-
children: [n.children,
|
|
2652
|
+
children: [n.children, r("div", {
|
|
2393
2653
|
className: ie.e("user"),
|
|
2394
2654
|
children: "我"
|
|
2395
2655
|
})]
|
|
2396
|
-
}),
|
|
2656
|
+
}), r("div", {
|
|
2397
2657
|
className: ie.e("content"),
|
|
2398
|
-
children:
|
|
2658
|
+
children: r("div", {
|
|
2399
2659
|
className: ie.em("content", "body"),
|
|
2400
|
-
children: [s.value.hasResources &&
|
|
2660
|
+
children: [s.value.hasResources && r("div", {
|
|
2401
2661
|
className: ie.em("content", "material"),
|
|
2402
|
-
children: s.value.resources.map((o) =>
|
|
2662
|
+
children: s.value.resources.map((o) => r(Sn, {
|
|
2403
2663
|
material: o,
|
|
2404
2664
|
disabled: !0,
|
|
2405
2665
|
controller: n.controller
|
|
2406
2666
|
}, o.id))
|
|
2407
|
-
}),
|
|
2667
|
+
}), r("div", {
|
|
2408
2668
|
className: "pre-wrap-container",
|
|
2409
|
-
children:
|
|
2669
|
+
children: r("div", {
|
|
2410
2670
|
id: e
|
|
2411
2671
|
})
|
|
2412
2672
|
})]
|
|
@@ -2414,32 +2674,32 @@ const ie = new M("user-message-question"), Ci = (n) => {
|
|
|
2414
2674
|
})]
|
|
2415
2675
|
});
|
|
2416
2676
|
};
|
|
2417
|
-
const
|
|
2677
|
+
const Te = new k("error-message"), Li = (n) => {
|
|
2418
2678
|
const e = B(() => n.message.content);
|
|
2419
|
-
return
|
|
2420
|
-
className:
|
|
2421
|
-
children: [
|
|
2422
|
-
className:
|
|
2423
|
-
children: [
|
|
2424
|
-
className:
|
|
2679
|
+
return r("div", {
|
|
2680
|
+
className: Te.b(),
|
|
2681
|
+
children: [r("div", {
|
|
2682
|
+
className: Te.b("header"),
|
|
2683
|
+
children: [r("div", {
|
|
2684
|
+
className: Te.be("header", "caption"),
|
|
2425
2685
|
children: "AI "
|
|
2426
2686
|
}), n.children]
|
|
2427
|
-
}),
|
|
2428
|
-
className: "".concat(
|
|
2429
|
-
children:
|
|
2687
|
+
}), r("div", {
|
|
2688
|
+
className: "".concat(Te.e("content"), " pre-wrap-container"),
|
|
2689
|
+
children: r("span", {
|
|
2430
2690
|
children: e
|
|
2431
2691
|
})
|
|
2432
2692
|
})]
|
|
2433
2693
|
});
|
|
2434
2694
|
};
|
|
2435
|
-
const
|
|
2436
|
-
className:
|
|
2437
|
-
children:
|
|
2438
|
-
className: "".concat(
|
|
2695
|
+
const xt = new k("unknown-message"), zi = (n) => r("div", {
|
|
2696
|
+
className: xt.b(),
|
|
2697
|
+
children: r("div", {
|
|
2698
|
+
className: "".concat(xt.e("content"), " pre-wrap-container"),
|
|
2439
2699
|
children: ["暂未支持的消息类型: ", n.message.type]
|
|
2440
2700
|
})
|
|
2441
2701
|
});
|
|
2442
|
-
const
|
|
2702
|
+
const Hi = new k("chat-message-item"), Oi = (n) => {
|
|
2443
2703
|
const {
|
|
2444
2704
|
message: e,
|
|
2445
2705
|
size: t
|
|
@@ -2447,17 +2707,17 @@ const Si = new M("chat-message-item"), ki = (n) => {
|
|
|
2447
2707
|
let i = null;
|
|
2448
2708
|
switch (e.type) {
|
|
2449
2709
|
case "DEFAULT":
|
|
2450
|
-
i = e.role === "ASSISTANT" ?
|
|
2710
|
+
i = e.role === "ASSISTANT" ? Mi : Di;
|
|
2451
2711
|
break;
|
|
2452
2712
|
case "ERROR":
|
|
2453
|
-
i =
|
|
2713
|
+
i = Li;
|
|
2454
2714
|
break;
|
|
2455
2715
|
default:
|
|
2456
|
-
i =
|
|
2716
|
+
i = zi;
|
|
2457
2717
|
}
|
|
2458
|
-
return
|
|
2459
|
-
className:
|
|
2460
|
-
children:
|
|
2718
|
+
return r("div", {
|
|
2719
|
+
className: Hi.b(),
|
|
2720
|
+
children: q(i, {
|
|
2461
2721
|
size: t,
|
|
2462
2722
|
message: e,
|
|
2463
2723
|
controller: n.controller,
|
|
@@ -2465,9 +2725,10 @@ const Si = new M("chat-message-item"), ki = (n) => {
|
|
|
2465
2725
|
})
|
|
2466
2726
|
});
|
|
2467
2727
|
};
|
|
2468
|
-
class
|
|
2728
|
+
class j {
|
|
2469
2729
|
constructor(e) {
|
|
2470
|
-
this
|
|
2730
|
+
S(this, "toolcalls", []);
|
|
2731
|
+
this.msg = e, this.computeToolCalls();
|
|
2471
2732
|
}
|
|
2472
2733
|
get messageid() {
|
|
2473
2734
|
return this.msg.messageid;
|
|
@@ -2483,7 +2744,7 @@ class V {
|
|
|
2483
2744
|
}
|
|
2484
2745
|
get realcontent() {
|
|
2485
2746
|
let e = this.msg.content;
|
|
2486
|
-
if (e.indexOf("<think>") !== -1 && e.indexOf("</think>") === -1 || (e = e.replace(new RegExp("\\<think\\>[^]*?\\<\\/think\\>", "gs"), "").trim(), e.indexOf("<resources>") !== -1 && e.indexOf("</resources>") === -1))
|
|
2747
|
+
if (e.indexOf("<think>") !== -1 && e.indexOf("</think>") === -1 || (e = e.replace(new RegExp("\\<think\\>[^]*?\\<\\/think\\>", "gs"), "").trim(), e.indexOf("<tool_call>") !== -1 && e.indexOf("</tool_call>") === -1) || (e = e.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim(), e.indexOf("<resources>") !== -1 && e.indexOf("</resources>") === -1))
|
|
2487
2748
|
return "";
|
|
2488
2749
|
e = e.replace(new RegExp("\\<resources\\>[^]*?\\<\\/resources\\>", "gs"), "").trim();
|
|
2489
2750
|
const t = e.indexOf("<suggestions>");
|
|
@@ -2509,7 +2770,7 @@ class V {
|
|
|
2509
2770
|
* @param {IChatMessage} msg
|
|
2510
2771
|
*/
|
|
2511
2772
|
update(e) {
|
|
2512
|
-
e.content || (e.content = ""), e.content.indexOf("<think>") !== -1 && this.msg.content && (this.msg.content = ""), this.msg.content += e.content;
|
|
2773
|
+
e.content || (e.content = ""), e.content.indexOf("<think>") !== -1 && this.msg.content && (this.msg.content = ""), this.msg.content += e.content, this.computeToolCalls();
|
|
2513
2774
|
}
|
|
2514
2775
|
/**
|
|
2515
2776
|
* 更新消息完成状态
|
|
@@ -2519,10 +2780,17 @@ class V {
|
|
|
2519
2780
|
* @param {boolean} completed
|
|
2520
2781
|
*/
|
|
2521
2782
|
updateCompleted(e) {
|
|
2522
|
-
this.msg.completed = e;
|
|
2783
|
+
this.msg.completed = e, this.computeToolCalls();
|
|
2784
|
+
}
|
|
2785
|
+
/**
|
|
2786
|
+
* @description 计算工具调用
|
|
2787
|
+
* @memberof ChatMessage
|
|
2788
|
+
*/
|
|
2789
|
+
computeToolCalls() {
|
|
2790
|
+
this.toolcalls = Yn.parse(this.msg.content);
|
|
2523
2791
|
}
|
|
2524
2792
|
}
|
|
2525
|
-
class
|
|
2793
|
+
class fe {
|
|
2526
2794
|
constructor(e) {
|
|
2527
2795
|
this.data = e;
|
|
2528
2796
|
}
|
|
@@ -2548,7 +2816,7 @@ class pe {
|
|
|
2548
2816
|
return this.data.aiChat;
|
|
2549
2817
|
}
|
|
2550
2818
|
}
|
|
2551
|
-
class
|
|
2819
|
+
class qe {
|
|
2552
2820
|
constructor(e) {
|
|
2553
2821
|
this.material = e;
|
|
2554
2822
|
}
|
|
@@ -2565,8 +2833,8 @@ class je {
|
|
|
2565
2833
|
return this.material.data;
|
|
2566
2834
|
}
|
|
2567
2835
|
}
|
|
2568
|
-
const H = new
|
|
2569
|
-
var f,
|
|
2836
|
+
const H = new k("chat-toolbar-item"), Bi = (n) => {
|
|
2837
|
+
var f, v, w;
|
|
2570
2838
|
const {
|
|
2571
2839
|
model: e,
|
|
2572
2840
|
data: t,
|
|
@@ -2574,80 +2842,80 @@ const H = new M("chat-toolbar-item"), Ni = (n) => {
|
|
|
2574
2842
|
disabled: s = !1,
|
|
2575
2843
|
buttonType: o = "default",
|
|
2576
2844
|
onClick: a
|
|
2577
|
-
} = n, [
|
|
2845
|
+
} = n, [c, u] = K(!1), h = P(null), p = (g) => typeof g.hidden == "function" ? g.hidden(t) : g.hidden === !0;
|
|
2578
2846
|
if (p(e))
|
|
2579
|
-
return
|
|
2580
|
-
const l = (g) => s ? !0 : typeof g.disabled == "function" ? g.disabled(t) : g.disabled === !0,
|
|
2581
|
-
var
|
|
2847
|
+
return r(Y, {});
|
|
2848
|
+
const l = (g) => s ? !0 : typeof g.disabled == "function" ? g.disabled(t) : g.disabled === !0, m = (g) => {
|
|
2849
|
+
var C, T, x, O;
|
|
2582
2850
|
if (typeof g.icon == "function")
|
|
2583
2851
|
return g.icon();
|
|
2584
|
-
if ((
|
|
2585
|
-
return
|
|
2852
|
+
if ((C = g.icon) != null && C.showIcon && ((T = g.icon) != null && T.cssClass))
|
|
2853
|
+
return r("i", {
|
|
2586
2854
|
className: g.icon.cssClass
|
|
2587
2855
|
});
|
|
2588
|
-
if ((
|
|
2589
|
-
return it(g.icon.imagePath) ?
|
|
2856
|
+
if ((x = g.icon) != null && x.showIcon && ((O = g.icon) != null && O.imagePath))
|
|
2857
|
+
return it(g.icon.imagePath) ? r("div", {
|
|
2590
2858
|
dangerouslySetInnerHTML: {
|
|
2591
2859
|
__html: g.icon.imagePath
|
|
2592
2860
|
}
|
|
2593
|
-
}) :
|
|
2861
|
+
}) : r("img", {
|
|
2594
2862
|
src: g.icon.imagePath
|
|
2595
2863
|
});
|
|
2596
2864
|
}, _ = (g) => {
|
|
2597
2865
|
l(e) || u(!0);
|
|
2598
|
-
}, d = (g,
|
|
2599
|
-
l(
|
|
2866
|
+
}, d = (g, C) => {
|
|
2867
|
+
l(C) || (u(!1), a(g, C));
|
|
2600
2868
|
};
|
|
2601
|
-
return
|
|
2602
|
-
const g = (
|
|
2603
|
-
h.current && h.current.contains(
|
|
2869
|
+
return I(() => {
|
|
2870
|
+
const g = (C) => {
|
|
2871
|
+
h.current && h.current.contains(C.target) || u(!1);
|
|
2604
2872
|
};
|
|
2605
|
-
return
|
|
2873
|
+
return c && document.addEventListener("mousedown", g), () => {
|
|
2606
2874
|
document.removeEventListener("mousedown", g);
|
|
2607
2875
|
};
|
|
2608
|
-
}, [
|
|
2876
|
+
}, [c]), r("div", {
|
|
2609
2877
|
className: "".concat(H.b(), " ").concat(H.b(o), " ").concat(e.customClass || "", " ").concat(i || "", " ").concat(H.is("disabled", l(e)), " ").concat(H.is("more", !!((f = e.children) != null && f.length))),
|
|
2610
|
-
children: [
|
|
2878
|
+
children: [r("div", {
|
|
2611
2879
|
title: e.title,
|
|
2612
2880
|
className: H.e("content"),
|
|
2613
2881
|
onClick: (g) => d(g, e),
|
|
2614
|
-
children: [
|
|
2882
|
+
children: [r("div", {
|
|
2615
2883
|
className: H.em("content", "icon"),
|
|
2616
|
-
children:
|
|
2617
|
-
}),
|
|
2884
|
+
children: m(e)
|
|
2885
|
+
}), r("div", {
|
|
2618
2886
|
className: H.em("content", "label"),
|
|
2619
2887
|
children: e.label
|
|
2620
2888
|
})]
|
|
2621
|
-
}), ((
|
|
2889
|
+
}), ((v = e.children) == null ? void 0 : v.length) && r("div", {
|
|
2622
2890
|
title: "更多",
|
|
2623
2891
|
className: H.e("more"),
|
|
2624
2892
|
onClick: _,
|
|
2625
|
-
children:
|
|
2893
|
+
children: r("i", {
|
|
2626
2894
|
"aria-hidden": "true",
|
|
2627
2895
|
className: "fa fa-angle-down ".concat(H.em("more", "icon"))
|
|
2628
2896
|
})
|
|
2629
|
-
}),
|
|
2897
|
+
}), c && r("div", {
|
|
2630
2898
|
ref: h,
|
|
2631
2899
|
className: H.b("dropdown"),
|
|
2632
|
-
children: (w = e.children) == null ? void 0 : w.map((g,
|
|
2900
|
+
children: (w = e.children) == null ? void 0 : w.map((g, C) => {
|
|
2633
2901
|
if (!p(g))
|
|
2634
|
-
return
|
|
2902
|
+
return r("div", {
|
|
2635
2903
|
title: g.title,
|
|
2636
|
-
onClick: (
|
|
2904
|
+
onClick: (T) => d(T, g),
|
|
2637
2905
|
className: "".concat(H.be("dropdown", "item"), " ").concat(g.customClass || "", " ").concat(H.is("disabled", l(g))),
|
|
2638
|
-
children: [
|
|
2906
|
+
children: [r("div", {
|
|
2639
2907
|
className: H.bem("dropdown", "item", "icon"),
|
|
2640
|
-
children:
|
|
2641
|
-
}),
|
|
2908
|
+
children: m(g)
|
|
2909
|
+
}), r("div", {
|
|
2642
2910
|
className: H.bem("dropdown", "item", "label"),
|
|
2643
2911
|
children: g.label
|
|
2644
2912
|
})]
|
|
2645
|
-
},
|
|
2913
|
+
}, C);
|
|
2646
2914
|
})
|
|
2647
2915
|
})]
|
|
2648
2916
|
});
|
|
2649
2917
|
};
|
|
2650
|
-
const
|
|
2918
|
+
const Pi = new k("chat-toolbar"), et = (n) => {
|
|
2651
2919
|
const {
|
|
2652
2920
|
controller: e,
|
|
2653
2921
|
items: t = [],
|
|
@@ -2655,19 +2923,19 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2655
2923
|
type: s,
|
|
2656
2924
|
className: o,
|
|
2657
2925
|
mode: a
|
|
2658
|
-
} = n,
|
|
2926
|
+
} = n, c = pn(rt);
|
|
2659
2927
|
let u = [];
|
|
2660
2928
|
const h = [{
|
|
2661
2929
|
label: "重置对话",
|
|
2662
2930
|
title: "重置对话",
|
|
2663
|
-
icon: () =>
|
|
2931
|
+
icon: () => r(Ci, {}),
|
|
2664
2932
|
onClick: () => {
|
|
2665
2933
|
e.resetTopic();
|
|
2666
2934
|
},
|
|
2667
2935
|
children: [{
|
|
2668
2936
|
label: "清空对话",
|
|
2669
2937
|
title: "清空对话",
|
|
2670
|
-
icon: () =>
|
|
2938
|
+
icon: () => r(yi, {}),
|
|
2671
2939
|
onClick: () => {
|
|
2672
2940
|
e.clearTopic();
|
|
2673
2941
|
}
|
|
@@ -2675,37 +2943,37 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2675
2943
|
label: "新建对话",
|
|
2676
2944
|
title: "新建对话",
|
|
2677
2945
|
hidden: a !== "TOPIC",
|
|
2678
|
-
icon: () =>
|
|
2946
|
+
icon: () => r(ui, {}),
|
|
2679
2947
|
onClick: () => {
|
|
2680
|
-
|
|
2948
|
+
c.newTopic && c.newTopic();
|
|
2681
2949
|
}
|
|
2682
2950
|
}]
|
|
2683
2951
|
}], p = [{
|
|
2684
2952
|
label: "刷新",
|
|
2685
2953
|
title: "刷新",
|
|
2686
|
-
icon: () =>
|
|
2954
|
+
icon: () => r(Tt, {}),
|
|
2687
2955
|
onClick: () => {
|
|
2688
2956
|
e.refreshMessage(i);
|
|
2689
2957
|
}
|
|
2690
2958
|
}, {
|
|
2691
2959
|
label: "删除",
|
|
2692
2960
|
title: "删除",
|
|
2693
|
-
icon: () =>
|
|
2961
|
+
icon: () => r(si, {}),
|
|
2694
2962
|
onClick: () => {
|
|
2695
2963
|
e.deleteMessage(i);
|
|
2696
2964
|
}
|
|
2697
2965
|
}, {
|
|
2698
2966
|
label: "复制",
|
|
2699
2967
|
title: "复制",
|
|
2700
|
-
icon: () =>
|
|
2968
|
+
icon: () => r(oi, {}),
|
|
2701
2969
|
onClick: () => {
|
|
2702
2970
|
e.copyMessage(i);
|
|
2703
2971
|
}
|
|
2704
2972
|
}];
|
|
2705
|
-
|
|
2973
|
+
c.enableBackFill && p.unshift({
|
|
2706
2974
|
label: "回填",
|
|
2707
2975
|
title: "回填",
|
|
2708
|
-
icon: () =>
|
|
2976
|
+
icon: () => r(ni, {}),
|
|
2709
2977
|
onClick: () => {
|
|
2710
2978
|
e.backfill(i);
|
|
2711
2979
|
}
|
|
@@ -2713,7 +2981,7 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2713
2981
|
const l = [{
|
|
2714
2982
|
label: "刷新",
|
|
2715
2983
|
title: "刷新",
|
|
2716
|
-
icon: () =>
|
|
2984
|
+
icon: () => r(Tt, {}),
|
|
2717
2985
|
onClick: () => {
|
|
2718
2986
|
e.refreshMessage(i, !0);
|
|
2719
2987
|
}
|
|
@@ -2729,33 +2997,33 @@ const Ei = new M("chat-toolbar"), et = (n) => {
|
|
|
2729
2997
|
}
|
|
2730
2998
|
else
|
|
2731
2999
|
u = [...h, ...t];
|
|
2732
|
-
const
|
|
2733
|
-
const
|
|
3000
|
+
const m = (d, f) => {
|
|
3001
|
+
const v = {
|
|
2734
3002
|
...i
|
|
2735
3003
|
};
|
|
2736
|
-
if (i instanceof
|
|
3004
|
+
if (i instanceof j ? (Object.assign(v, {
|
|
2737
3005
|
topic: e.topic
|
|
2738
|
-
}),
|
|
3006
|
+
}), v.msg.realcontent = i.realcontent) : (v.data || (v.data = {}), Object.assign(v.data, {
|
|
2739
3007
|
messages: e.messages.value
|
|
2740
3008
|
})), f.onClick && typeof f.onClick == "function")
|
|
2741
|
-
f.onClick(d, f, e.context, e.params,
|
|
3009
|
+
f.onClick(d, f, e.context, e.params, v);
|
|
2742
3010
|
else {
|
|
2743
3011
|
const w = n.controller.opts.extendToolbarClick;
|
|
2744
|
-
w && typeof w == "function" && w(d, f, e.context, e.params,
|
|
3012
|
+
w && typeof w == "function" && w(d, f, e.context, e.params, v);
|
|
2745
3013
|
}
|
|
2746
3014
|
}, _ = X(() => 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]);
|
|
2747
|
-
return
|
|
2748
|
-
className: "".concat(
|
|
2749
|
-
children: u.map((d, f) =>
|
|
3015
|
+
return r("div", {
|
|
3016
|
+
className: "".concat(Pi.b(), " ").concat(o || ""),
|
|
3017
|
+
children: u.map((d, f) => r(Bi, {
|
|
2750
3018
|
data: i,
|
|
2751
3019
|
model: d,
|
|
2752
3020
|
disabled: _,
|
|
2753
3021
|
buttonType: s === "content" ? "circle" : "default",
|
|
2754
|
-
onClick:
|
|
3022
|
+
onClick: m.bind(void 0)
|
|
2755
3023
|
}, f))
|
|
2756
3024
|
});
|
|
2757
3025
|
};
|
|
2758
|
-
function
|
|
3026
|
+
function Ri(n, e) {
|
|
2759
3027
|
let t = null;
|
|
2760
3028
|
return function(...i) {
|
|
2761
3029
|
t || (t = setTimeout(() => {
|
|
@@ -2763,8 +3031,8 @@ function Mi(n, e) {
|
|
|
2763
3031
|
}, e));
|
|
2764
3032
|
};
|
|
2765
3033
|
}
|
|
2766
|
-
const
|
|
2767
|
-
const e =
|
|
3034
|
+
const Fi = (n) => {
|
|
3035
|
+
const e = M(!1), t = M({}), i = new k("chat-back-bottom"), s = M(null), o = () => {
|
|
2768
3036
|
if (s.value) {
|
|
2769
3037
|
const u = n.visibilityHeight || 200, h = s.value.scrollHeight - s.value.scrollTop - s.value.offsetHeight;
|
|
2770
3038
|
e.value = h >= u;
|
|
@@ -2775,28 +3043,28 @@ const $i = (n) => {
|
|
|
2775
3043
|
top: s.value.scrollHeight,
|
|
2776
3044
|
behavior: "smooth"
|
|
2777
3045
|
}), (u = n.onClick) == null || u.call(n));
|
|
2778
|
-
},
|
|
3046
|
+
}, c = Ri(o, 300);
|
|
2779
3047
|
return X(() => {
|
|
2780
3048
|
t.value = {
|
|
2781
3049
|
right: "".concat(n.right, "px"),
|
|
2782
3050
|
bottom: "".concat(n.bottom, "px")
|
|
2783
3051
|
};
|
|
2784
|
-
}, [n.right, n.bottom]),
|
|
3052
|
+
}, [n.right, n.bottom]), I(() => {
|
|
2785
3053
|
var u;
|
|
2786
3054
|
if (n.target) {
|
|
2787
3055
|
const h = (u = document.querySelector(n.target)) != null ? u : void 0;
|
|
2788
|
-
h && (s.value = h, h.addEventListener("scroll",
|
|
3056
|
+
h && (s.value = h, h.addEventListener("scroll", c), o());
|
|
2789
3057
|
}
|
|
2790
|
-
}, []),
|
|
3058
|
+
}, []), r("div", {
|
|
2791
3059
|
className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
|
|
2792
3060
|
style: t.value,
|
|
2793
3061
|
onClick: a,
|
|
2794
|
-
children:
|
|
3062
|
+
children: r(bi, {
|
|
2795
3063
|
className: i.e("icon")
|
|
2796
3064
|
})
|
|
2797
3065
|
});
|
|
2798
3066
|
};
|
|
2799
|
-
const
|
|
3067
|
+
const St = new k("chat-messages"), kt = (n) => {
|
|
2800
3068
|
const e = P(null), [t, i] = K(!0), s = P(!1), o = n.controller.messages, a = () => {
|
|
2801
3069
|
const h = e.current;
|
|
2802
3070
|
h && (s.current = !0, h.scrollTo({
|
|
@@ -2806,53 +3074,53 @@ const Tt = new M("chat-messages"), xt = (n) => {
|
|
|
2806
3074
|
s.current = !1;
|
|
2807
3075
|
}, 500));
|
|
2808
3076
|
};
|
|
2809
|
-
|
|
3077
|
+
I(() => {
|
|
2810
3078
|
t && a();
|
|
2811
3079
|
}, [o.value]);
|
|
2812
|
-
const
|
|
3080
|
+
const c = () => {
|
|
2813
3081
|
if (!s.current && e.current) {
|
|
2814
3082
|
const {
|
|
2815
3083
|
scrollTop: h,
|
|
2816
3084
|
scrollHeight: p,
|
|
2817
3085
|
clientHeight: l
|
|
2818
|
-
} = e.current,
|
|
2819
|
-
i(
|
|
3086
|
+
} = e.current, m = p - (h + l) < 50;
|
|
3087
|
+
i(m);
|
|
2820
3088
|
}
|
|
2821
3089
|
}, u = () => {
|
|
2822
3090
|
s.current = !0, i(!0);
|
|
2823
3091
|
};
|
|
2824
|
-
return
|
|
3092
|
+
return r("div", {
|
|
2825
3093
|
ref: e,
|
|
2826
|
-
className:
|
|
2827
|
-
onScroll:
|
|
3094
|
+
className: St.b(),
|
|
3095
|
+
onScroll: c,
|
|
2828
3096
|
children: [o.value.map((h) => {
|
|
2829
3097
|
var l;
|
|
2830
3098
|
const p = ((l = h.content) == null ? void 0 : l.length) || 0;
|
|
2831
|
-
return h.role !== "SYSTEM" ?
|
|
3099
|
+
return h.role !== "SYSTEM" ? r(Oi, {
|
|
2832
3100
|
size: p,
|
|
2833
3101
|
message: h,
|
|
2834
3102
|
controller: n.controller,
|
|
2835
|
-
children:
|
|
3103
|
+
children: r(et, {
|
|
2836
3104
|
data: h,
|
|
2837
3105
|
type: "content",
|
|
2838
3106
|
items: n.toolbarItems,
|
|
2839
3107
|
controller: n.controller
|
|
2840
3108
|
})
|
|
2841
3109
|
}, h.messageid) : null;
|
|
2842
|
-
}),
|
|
3110
|
+
}), r(Fi, {
|
|
2843
3111
|
right: 20,
|
|
2844
3112
|
bottom: 14,
|
|
2845
|
-
target: ".".concat(
|
|
3113
|
+
target: ".".concat(St.b()),
|
|
2846
3114
|
onClick: u
|
|
2847
3115
|
})]
|
|
2848
3116
|
});
|
|
2849
3117
|
};
|
|
2850
|
-
function
|
|
3118
|
+
function Ui(n, e) {
|
|
2851
3119
|
for (var t in e)
|
|
2852
3120
|
n[t] = e[t];
|
|
2853
3121
|
return n;
|
|
2854
3122
|
}
|
|
2855
|
-
function
|
|
3123
|
+
function Nt(n, e) {
|
|
2856
3124
|
for (var t in n)
|
|
2857
3125
|
if (t !== "__source" && !(t in e))
|
|
2858
3126
|
return !0;
|
|
@@ -2861,63 +3129,63 @@ function St(n, e) {
|
|
|
2861
3129
|
return !0;
|
|
2862
3130
|
return !1;
|
|
2863
3131
|
}
|
|
2864
|
-
function
|
|
3132
|
+
function $t(n) {
|
|
2865
3133
|
this.props = n;
|
|
2866
3134
|
}
|
|
2867
|
-
(
|
|
2868
|
-
return
|
|
3135
|
+
($t.prototype = new F()).isPureReactComponent = !0, $t.prototype.shouldComponentUpdate = function(n, e) {
|
|
3136
|
+
return Nt(this.props, n) || Nt(this.state, e);
|
|
2869
3137
|
};
|
|
2870
|
-
var
|
|
3138
|
+
var Et = b.__b;
|
|
2871
3139
|
b.__b = function(n) {
|
|
2872
|
-
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null),
|
|
3140
|
+
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Et && Et(n);
|
|
2873
3141
|
};
|
|
2874
|
-
var
|
|
3142
|
+
var Wi = b.__e;
|
|
2875
3143
|
b.__e = function(n, e, t, i) {
|
|
2876
3144
|
if (n.then) {
|
|
2877
3145
|
for (var s, o = e; o = o.__; )
|
|
2878
3146
|
if ((s = o.__c) && s.__c)
|
|
2879
3147
|
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
|
|
2880
3148
|
}
|
|
2881
|
-
|
|
3149
|
+
Wi(n, e, t, i);
|
|
2882
3150
|
};
|
|
2883
|
-
var
|
|
2884
|
-
function
|
|
3151
|
+
var Mt = b.unmount;
|
|
3152
|
+
function kn(n, e, t) {
|
|
2885
3153
|
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
|
|
2886
3154
|
typeof i.__c == "function" && i.__c();
|
|
2887
|
-
}), n.__c.__H = null), (n =
|
|
2888
|
-
return
|
|
3155
|
+
}), n.__c.__H = null), (n = Ui({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
|
|
3156
|
+
return kn(i, e, t);
|
|
2889
3157
|
})), n;
|
|
2890
3158
|
}
|
|
2891
|
-
function
|
|
3159
|
+
function Nn(n, e, t) {
|
|
2892
3160
|
return n && t && (n.__v = null, n.__k = n.__k && n.__k.map(function(i) {
|
|
2893
|
-
return
|
|
3161
|
+
return Nn(i, e, t);
|
|
2894
3162
|
}), n.__c && n.__c.__P === e && (n.__e && t.insertBefore(n.__e, n.__d), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
2895
3163
|
}
|
|
2896
3164
|
function Ye() {
|
|
2897
3165
|
this.__u = 0, this.t = null, this.__b = null;
|
|
2898
3166
|
}
|
|
2899
|
-
function
|
|
3167
|
+
function $n(n) {
|
|
2900
3168
|
var e = n.__.__c;
|
|
2901
3169
|
return e && e.__a && e.__a(n);
|
|
2902
3170
|
}
|
|
2903
|
-
function
|
|
3171
|
+
function xe() {
|
|
2904
3172
|
this.u = null, this.o = null;
|
|
2905
3173
|
}
|
|
2906
3174
|
b.unmount = function(n) {
|
|
2907
3175
|
var e = n.__c;
|
|
2908
|
-
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null),
|
|
3176
|
+
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), Mt && Mt(n);
|
|
2909
3177
|
}, (Ye.prototype = new F()).__c = function(n, e) {
|
|
2910
3178
|
var t = e.__c, i = this;
|
|
2911
3179
|
i.t == null && (i.t = []), i.t.push(t);
|
|
2912
|
-
var s =
|
|
2913
|
-
o || (o = !0, t.__R = null, s ? s(
|
|
3180
|
+
var s = $n(i.__v), o = !1, a = function() {
|
|
3181
|
+
o || (o = !0, t.__R = null, s ? s(c) : c());
|
|
2914
3182
|
};
|
|
2915
3183
|
t.__R = a;
|
|
2916
|
-
var
|
|
3184
|
+
var c = function() {
|
|
2917
3185
|
if (!--i.__u) {
|
|
2918
3186
|
if (i.state.__a) {
|
|
2919
3187
|
var h = i.state.__a;
|
|
2920
|
-
i.__v.__k[0] =
|
|
3188
|
+
i.__v.__k[0] = Nn(h, h.__c.__P, h.__c.__O);
|
|
2921
3189
|
}
|
|
2922
3190
|
var p;
|
|
2923
3191
|
for (i.setState({ __a: i.__b = null }); p = i.t.pop(); )
|
|
@@ -2931,14 +3199,14 @@ b.unmount = function(n) {
|
|
|
2931
3199
|
if (this.__b) {
|
|
2932
3200
|
if (this.__v.__k) {
|
|
2933
3201
|
var t = document.createElement("div"), i = this.__v.__k[0].__c;
|
|
2934
|
-
this.__v.__k[0] =
|
|
3202
|
+
this.__v.__k[0] = kn(this.__b, t, i.__O = i.__P);
|
|
2935
3203
|
}
|
|
2936
3204
|
this.__b = null;
|
|
2937
3205
|
}
|
|
2938
|
-
var s = e.__a &&
|
|
2939
|
-
return s && (s.__h = null), [
|
|
3206
|
+
var s = e.__a && q(Y, null, n.fallback);
|
|
3207
|
+
return s && (s.__h = null), [q(Y, null, e.__a ? null : n.children), s];
|
|
2940
3208
|
};
|
|
2941
|
-
var
|
|
3209
|
+
var At = function(n, e, t) {
|
|
2942
3210
|
if (++t[1] === t[0] && n.o.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.o.size))
|
|
2943
3211
|
for (t = n.u; t; ) {
|
|
2944
3212
|
for (; t.length > 3; )
|
|
@@ -2948,12 +3216,12 @@ var Mt = function(n, e, t) {
|
|
|
2948
3216
|
n.u = t = t[2];
|
|
2949
3217
|
}
|
|
2950
3218
|
};
|
|
2951
|
-
function
|
|
3219
|
+
function ji(n) {
|
|
2952
3220
|
return this.getChildContext = function() {
|
|
2953
3221
|
return n.context;
|
|
2954
3222
|
}, n.children;
|
|
2955
3223
|
}
|
|
2956
|
-
function
|
|
3224
|
+
function Vi(n) {
|
|
2957
3225
|
var e = this, t = n.i;
|
|
2958
3226
|
e.componentWillUnmount = function() {
|
|
2959
3227
|
ae(null, e.l), e.l = null, e.i = null;
|
|
@@ -2963,34 +3231,34 @@ function Li(n) {
|
|
|
2963
3231
|
this.childNodes.push(i), e.i.appendChild(i);
|
|
2964
3232
|
}, removeChild: function(i) {
|
|
2965
3233
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i);
|
|
2966
|
-
} }), ae(
|
|
3234
|
+
} }), ae(q(ji, { context: e.context }, n.__v), e.l);
|
|
2967
3235
|
}
|
|
2968
|
-
function
|
|
2969
|
-
var t =
|
|
3236
|
+
function qi(n, e) {
|
|
3237
|
+
var t = q(Vi, { __v: n, i: e });
|
|
2970
3238
|
return t.containerInfo = e, t;
|
|
2971
3239
|
}
|
|
2972
|
-
(
|
|
2973
|
-
var e = this, t =
|
|
3240
|
+
(xe.prototype = new F()).__a = function(n) {
|
|
3241
|
+
var e = this, t = $n(e.__v), i = e.o.get(n);
|
|
2974
3242
|
return i[0]++, function(s) {
|
|
2975
3243
|
var o = function() {
|
|
2976
|
-
e.props.revealOrder ? (i.push(s),
|
|
3244
|
+
e.props.revealOrder ? (i.push(s), At(e, n, i)) : s();
|
|
2977
3245
|
};
|
|
2978
3246
|
t ? t(o) : o();
|
|
2979
3247
|
};
|
|
2980
|
-
},
|
|
3248
|
+
}, xe.prototype.render = function(n) {
|
|
2981
3249
|
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
2982
3250
|
var e = Me(n.children);
|
|
2983
3251
|
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
2984
3252
|
for (var t = e.length; t--; )
|
|
2985
3253
|
this.o.set(e[t], this.u = [1, 0, this.u]);
|
|
2986
3254
|
return n.children;
|
|
2987
|
-
},
|
|
3255
|
+
}, xe.prototype.componentDidUpdate = xe.prototype.componentDidMount = function() {
|
|
2988
3256
|
var n = this;
|
|
2989
3257
|
this.o.forEach(function(e, t) {
|
|
2990
|
-
|
|
3258
|
+
At(n, t, e);
|
|
2991
3259
|
});
|
|
2992
3260
|
};
|
|
2993
|
-
var
|
|
3261
|
+
var Yi = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Xi = /^(?: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]/, Zi = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Ji = /[A-Z0-9]/g, Gi = typeof document < "u", Ki = function(n) {
|
|
2994
3262
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
2995
3263
|
};
|
|
2996
3264
|
F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
@@ -3000,91 +3268,91 @@ F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
|
|
|
3000
3268
|
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
3001
3269
|
} });
|
|
3002
3270
|
});
|
|
3003
|
-
var
|
|
3004
|
-
function
|
|
3271
|
+
var It = b.event;
|
|
3272
|
+
function Qi() {
|
|
3005
3273
|
}
|
|
3006
|
-
function
|
|
3274
|
+
function es() {
|
|
3007
3275
|
return this.cancelBubble;
|
|
3008
3276
|
}
|
|
3009
|
-
function
|
|
3277
|
+
function ts() {
|
|
3010
3278
|
return this.defaultPrevented;
|
|
3011
3279
|
}
|
|
3012
3280
|
b.event = function(n) {
|
|
3013
|
-
return
|
|
3281
|
+
return It && (n = It(n)), n.persist = Qi, n.isPropagationStopped = es, n.isDefaultPrevented = ts, n.nativeEvent = n;
|
|
3014
3282
|
};
|
|
3015
|
-
var
|
|
3283
|
+
var ns = { enumerable: !1, configurable: !0, get: function() {
|
|
3016
3284
|
return this.class;
|
|
3017
|
-
} },
|
|
3285
|
+
} }, Dt = b.vnode;
|
|
3018
3286
|
b.vnode = function(n) {
|
|
3019
3287
|
typeof n.type == "string" && function(e) {
|
|
3020
3288
|
var t = e.props, i = e.type, s = {};
|
|
3021
3289
|
for (var o in t) {
|
|
3022
3290
|
var a = t[o];
|
|
3023
|
-
if (!(o === "value" && "defaultValue" in t && a == null ||
|
|
3024
|
-
var
|
|
3025
|
-
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" :
|
|
3291
|
+
if (!(o === "value" && "defaultValue" in t && a == null || Gi && o === "children" && i === "noscript" || o === "class" || o === "className")) {
|
|
3292
|
+
var c = o.toLowerCase();
|
|
3293
|
+
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : c === "ondoubleclick" ? o = "ondblclick" : c !== "onchange" || i !== "input" && i !== "textarea" || Ki(t.type) ? c === "onfocus" ? o = "onfocusin" : c === "onblur" ? o = "onfocusout" : Zi.test(o) ? o = c : i.indexOf("-") === -1 && Xi.test(o) ? o = o.replace(Ji, "-$&").toLowerCase() : a === null && (a = void 0) : c = o = "oninput", c === "oninput" && s[o = c] && (o = "oninputCapture"), s[o] = a;
|
|
3026
3294
|
}
|
|
3027
3295
|
}
|
|
3028
3296
|
i == "select" && s.multiple && Array.isArray(s.value) && (s.value = Me(t.children).forEach(function(u) {
|
|
3029
3297
|
u.props.selected = s.value.indexOf(u.props.value) != -1;
|
|
3030
3298
|
})), i == "select" && s.defaultValue != null && (s.value = Me(t.children).forEach(function(u) {
|
|
3031
3299
|
u.props.selected = s.multiple ? s.defaultValue.indexOf(u.props.value) != -1 : s.defaultValue == u.props.value;
|
|
3032
|
-
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className",
|
|
3033
|
-
}(n), n.$$typeof =
|
|
3300
|
+
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", ns)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
|
|
3301
|
+
}(n), n.$$typeof = Yi, Dt && Dt(n);
|
|
3034
3302
|
};
|
|
3035
|
-
var
|
|
3303
|
+
var Lt = b.__r;
|
|
3036
3304
|
b.__r = function(n) {
|
|
3037
|
-
|
|
3305
|
+
Lt && Lt(n), n.__c;
|
|
3038
3306
|
};
|
|
3039
|
-
var
|
|
3307
|
+
var zt = b.diffed;
|
|
3040
3308
|
b.diffed = function(n) {
|
|
3041
|
-
|
|
3309
|
+
zt && zt(n);
|
|
3042
3310
|
var e = n.props, t = n.__e;
|
|
3043
3311
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
3044
3312
|
};
|
|
3045
|
-
var
|
|
3046
|
-
function
|
|
3047
|
-
var e =
|
|
3313
|
+
var ge = /* @__PURE__ */ new Map();
|
|
3314
|
+
function is(n) {
|
|
3315
|
+
var e = ge.get(n);
|
|
3048
3316
|
e && e.destroy();
|
|
3049
3317
|
}
|
|
3050
|
-
function
|
|
3051
|
-
var e =
|
|
3318
|
+
function ss(n) {
|
|
3319
|
+
var e = ge.get(n);
|
|
3052
3320
|
e && e.update();
|
|
3053
3321
|
}
|
|
3054
|
-
var
|
|
3055
|
-
typeof window > "u" ? ((
|
|
3322
|
+
var me = null;
|
|
3323
|
+
typeof window > "u" ? ((me = function(n) {
|
|
3056
3324
|
return n;
|
|
3057
3325
|
}).destroy = function(n) {
|
|
3058
3326
|
return n;
|
|
3059
|
-
},
|
|
3327
|
+
}, me.update = function(n) {
|
|
3060
3328
|
return n;
|
|
3061
|
-
}) : ((
|
|
3329
|
+
}) : ((me = function(n, e) {
|
|
3062
3330
|
return n && Array.prototype.forEach.call(n.length ? n : [n], function(t) {
|
|
3063
3331
|
return function(i) {
|
|
3064
|
-
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !
|
|
3065
|
-
var s, o = null, a = window.getComputedStyle(i),
|
|
3332
|
+
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !ge.has(i)) {
|
|
3333
|
+
var s, o = null, a = window.getComputedStyle(i), c = (s = i.value, function() {
|
|
3066
3334
|
h({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
|
|
3067
3335
|
}), u = (function(l) {
|
|
3068
|
-
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", p), i.removeEventListener("input",
|
|
3069
|
-
return i.style[
|
|
3070
|
-
}),
|
|
3336
|
+
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", p), i.removeEventListener("input", c), window.removeEventListener("resize", p), Object.keys(l).forEach(function(m) {
|
|
3337
|
+
return i.style[m] = l[m];
|
|
3338
|
+
}), ge.delete(i);
|
|
3071
3339
|
}).bind(i, { height: i.style.height, resize: i.style.resize, textAlign: i.style.textAlign, overflowY: i.style.overflowY, overflowX: i.style.overflowX, wordWrap: i.style.wordWrap });
|
|
3072
|
-
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input",
|
|
3340
|
+
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", p), i.addEventListener("input", c), window.addEventListener("resize", p), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", ge.set(i, { destroy: u, update: p }), p();
|
|
3073
3341
|
}
|
|
3074
3342
|
function h(l) {
|
|
3075
|
-
var
|
|
3076
|
-
if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (
|
|
3077
|
-
for (var
|
|
3078
|
-
|
|
3343
|
+
var m, _, d = l.restoreTextAlign, f = d === void 0 ? null : d, v = l.testForHeightReduction, w = v === void 0 || v, g = a.overflowY;
|
|
3344
|
+
if (i.scrollHeight !== 0 && (a.resize === "vertical" ? i.style.resize = "none" : a.resize === "both" && (i.style.resize = "horizontal"), w && (m = function(T) {
|
|
3345
|
+
for (var x = []; T && T.parentNode && T.parentNode instanceof Element; )
|
|
3346
|
+
T.parentNode.scrollTop && x.push([T.parentNode, T.parentNode.scrollTop]), T = T.parentNode;
|
|
3079
3347
|
return function() {
|
|
3080
|
-
return
|
|
3348
|
+
return x.forEach(function(O) {
|
|
3081
3349
|
var L = O[0], U = O[1];
|
|
3082
3350
|
L.style.scrollBehavior = "auto", L.scrollTop = U, L.style.scrollBehavior = null;
|
|
3083
3351
|
});
|
|
3084
3352
|
};
|
|
3085
|
-
}(i), i.style.height = ""), _ = a.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(a.paddingTop) + parseFloat(a.paddingBottom)) : i.scrollHeight + parseFloat(a.borderTopWidth) + parseFloat(a.borderBottomWidth), a.maxHeight !== "none" && _ > parseFloat(a.maxHeight) ? (a.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(a.maxHeight)) : a.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", f && (i.style.textAlign = f),
|
|
3086
|
-
var
|
|
3087
|
-
a.overflow === "hidden" && (i.style.textAlign =
|
|
3353
|
+
}(i), i.style.height = ""), _ = a.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(a.paddingTop) + parseFloat(a.paddingBottom)) : i.scrollHeight + parseFloat(a.borderTopWidth) + parseFloat(a.borderBottomWidth), a.maxHeight !== "none" && _ > parseFloat(a.maxHeight) ? (a.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(a.maxHeight)) : a.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", f && (i.style.textAlign = f), m && m(), o !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), o = _), g !== a.overflow && !f)) {
|
|
3354
|
+
var C = a.textAlign;
|
|
3355
|
+
a.overflow === "hidden" && (i.style.textAlign = C === "start" ? "end" : "start"), h({ restoreTextAlign: C, testForHeightReduction: !0 });
|
|
3088
3356
|
}
|
|
3089
3357
|
}
|
|
3090
3358
|
function p() {
|
|
@@ -3093,12 +3361,12 @@ typeof window > "u" ? ((fe = function(n) {
|
|
|
3093
3361
|
}(t);
|
|
3094
3362
|
}), n;
|
|
3095
3363
|
}).destroy = function(n) {
|
|
3096
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3097
|
-
},
|
|
3098
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3364
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], is), n;
|
|
3365
|
+
}, me.update = function(n) {
|
|
3366
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], ss), n;
|
|
3099
3367
|
});
|
|
3100
|
-
var
|
|
3101
|
-
class
|
|
3368
|
+
var Ht = me, 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 || {});
|
|
3369
|
+
class Ot {
|
|
3102
3370
|
/**
|
|
3103
3371
|
* 聊天窗触发提问回调
|
|
3104
3372
|
*
|
|
@@ -3124,7 +3392,7 @@ class zt {
|
|
|
3124
3392
|
* @date 2023-10-16 16:10:29
|
|
3125
3393
|
* @type {Signal<ChatMessage[]>}
|
|
3126
3394
|
*/
|
|
3127
|
-
|
|
3395
|
+
S(this, "messages", G([]));
|
|
3128
3396
|
/**
|
|
3129
3397
|
* 素材列表
|
|
3130
3398
|
*
|
|
@@ -3132,7 +3400,7 @@ class zt {
|
|
|
3132
3400
|
* @date 2025-02-27 18:02:46
|
|
3133
3401
|
* @type {Signal<IMaterial[]>}
|
|
3134
3402
|
*/
|
|
3135
|
-
|
|
3403
|
+
S(this, "materials", G([]));
|
|
3136
3404
|
/**
|
|
3137
3405
|
* 聊天框输入值
|
|
3138
3406
|
*
|
|
@@ -3140,7 +3408,7 @@ class zt {
|
|
|
3140
3408
|
* @date 2023-10-16 15:10:43
|
|
3141
3409
|
* @type {Signal<string>}
|
|
3142
3410
|
*/
|
|
3143
|
-
|
|
3411
|
+
S(this, "input", G(""));
|
|
3144
3412
|
/**
|
|
3145
3413
|
* 是否加载中
|
|
3146
3414
|
*
|
|
@@ -3148,7 +3416,7 @@ class zt {
|
|
|
3148
3416
|
* @date 2025-03-10 18:03:42
|
|
3149
3417
|
* @type {Signal<boolean>}
|
|
3150
3418
|
*/
|
|
3151
|
-
|
|
3419
|
+
S(this, "isLoading", G(!1));
|
|
3152
3420
|
/**
|
|
3153
3421
|
* 视图参数
|
|
3154
3422
|
*
|
|
@@ -3156,7 +3424,7 @@ class zt {
|
|
|
3156
3424
|
* @date 2025-02-24 14:02:23
|
|
3157
3425
|
* @type {object}
|
|
3158
3426
|
*/
|
|
3159
|
-
|
|
3427
|
+
S(this, "context");
|
|
3160
3428
|
/**
|
|
3161
3429
|
* 视图参数
|
|
3162
3430
|
*
|
|
@@ -3164,7 +3432,7 @@ class zt {
|
|
|
3164
3432
|
* @date 2025-02-24 14:02:32
|
|
3165
3433
|
* @type {object}
|
|
3166
3434
|
*/
|
|
3167
|
-
|
|
3435
|
+
S(this, "params");
|
|
3168
3436
|
/**
|
|
3169
3437
|
* 应用实体标记
|
|
3170
3438
|
*
|
|
@@ -3172,7 +3440,7 @@ class zt {
|
|
|
3172
3440
|
* @date 2025-02-24 14:02:10
|
|
3173
3441
|
* @type {string}
|
|
3174
3442
|
*/
|
|
3175
|
-
|
|
3443
|
+
S(this, "appDataEntityId");
|
|
3176
3444
|
/**
|
|
3177
3445
|
* 话题标识
|
|
3178
3446
|
*
|
|
@@ -3180,7 +3448,7 @@ class zt {
|
|
|
3180
3448
|
* @date 2025-02-24 18:02:02
|
|
3181
3449
|
* @type {(string | undefined)}
|
|
3182
3450
|
*/
|
|
3183
|
-
|
|
3451
|
+
S(this, "topicId");
|
|
3184
3452
|
/**
|
|
3185
3453
|
* 话题数据
|
|
3186
3454
|
*
|
|
@@ -3188,8 +3456,14 @@ class zt {
|
|
|
3188
3456
|
* @date 2025-03-10 16:03:26
|
|
3189
3457
|
* @type {(ITopic | undefined)}
|
|
3190
3458
|
*/
|
|
3191
|
-
|
|
3192
|
-
|
|
3459
|
+
S(this, "topic");
|
|
3460
|
+
/**
|
|
3461
|
+
* @description 聊天sessionid
|
|
3462
|
+
* @type {string}
|
|
3463
|
+
* @memberof AiChatController
|
|
3464
|
+
*/
|
|
3465
|
+
S(this, "chatSessionid", "");
|
|
3466
|
+
this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.topicId ? this.chatSessionid = mt(this.topicId) : this.chatSessionid = mt(ce()), this.fecthHistory();
|
|
3193
3467
|
}
|
|
3194
3468
|
/**
|
|
3195
3469
|
* 获取历史记录
|
|
@@ -3200,7 +3474,7 @@ class zt {
|
|
|
3200
3474
|
*/
|
|
3201
3475
|
async fecthHistory() {
|
|
3202
3476
|
if (this.topicId) {
|
|
3203
|
-
const t = await
|
|
3477
|
+
const t = await V.getData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId);
|
|
3204
3478
|
if (t && t.data && t.data.length > 0)
|
|
3205
3479
|
return t.data.forEach((i) => {
|
|
3206
3480
|
const s = {
|
|
@@ -3217,10 +3491,11 @@ class zt {
|
|
|
3217
3491
|
}
|
|
3218
3492
|
return await this.opts.history(this.context, this.params, {
|
|
3219
3493
|
appDataEntityId: this.appDataEntityId,
|
|
3220
|
-
appendCurData: this.opts.appendCurData
|
|
3494
|
+
appendCurData: this.opts.appendCurData,
|
|
3495
|
+
sessionid: this.chatSessionid
|
|
3221
3496
|
}) && this.opts.appendCurContent && this.addMessage({
|
|
3222
3497
|
state: 30,
|
|
3223
|
-
messageid:
|
|
3498
|
+
messageid: ce(),
|
|
3224
3499
|
role: "USER",
|
|
3225
3500
|
type: "DEFAULT",
|
|
3226
3501
|
content: this.opts.appendCurContent,
|
|
@@ -3239,10 +3514,13 @@ class zt {
|
|
|
3239
3514
|
return;
|
|
3240
3515
|
const e = {
|
|
3241
3516
|
id: this.topicId,
|
|
3242
|
-
data: this.messages.value.map((t) =>
|
|
3517
|
+
data: this.messages.value.map((t) => ({
|
|
3518
|
+
...t._origin,
|
|
3519
|
+
toolcalls: t.toolcalls
|
|
3520
|
+
})),
|
|
3243
3521
|
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
3244
3522
|
};
|
|
3245
|
-
await
|
|
3523
|
+
await V.updateData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, e);
|
|
3246
3524
|
}
|
|
3247
3525
|
/**
|
|
3248
3526
|
* 设置聊天框值
|
|
@@ -3263,7 +3541,7 @@ class zt {
|
|
|
3263
3541
|
*/
|
|
3264
3542
|
addMessage(e) {
|
|
3265
3543
|
const t = this.messages.value.find((i) => i.messageid === e.messageid);
|
|
3266
|
-
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new
|
|
3544
|
+
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB();
|
|
3267
3545
|
}
|
|
3268
3546
|
/**
|
|
3269
3547
|
* 更新消息完成状态
|
|
@@ -3286,10 +3564,11 @@ class zt {
|
|
|
3286
3564
|
*/
|
|
3287
3565
|
replaceMessage(e) {
|
|
3288
3566
|
const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
3289
|
-
t !== -1 ? (this.messages.value[t] = new
|
|
3567
|
+
t !== -1 ? (this.messages.value[t] = new j(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
|
|
3290
3568
|
appDataEntityId: this.appDataEntityId,
|
|
3291
3569
|
message: {
|
|
3292
|
-
messages: [e]
|
|
3570
|
+
messages: [e],
|
|
3571
|
+
sessionid: this.chatSessionid
|
|
3293
3572
|
}
|
|
3294
3573
|
}).then((i) => {
|
|
3295
3574
|
i && i.content && this.updateRecommendPrompt(e, i.content);
|
|
@@ -3306,9 +3585,9 @@ class zt {
|
|
|
3306
3585
|
const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
3307
3586
|
if (t !== -1) {
|
|
3308
3587
|
const i = this.messages.value[t];
|
|
3309
|
-
e.content = i.content, this.messages.value[t] = new
|
|
3588
|
+
e.content = i.content, this.messages.value[t] = new j(e), this.messages.value = [...this.messages.value];
|
|
3310
3589
|
} else
|
|
3311
|
-
this.messages.value = [...this.messages.value, new
|
|
3590
|
+
this.messages.value = [...this.messages.value, new j(e)];
|
|
3312
3591
|
await this.asyncToIndexDB();
|
|
3313
3592
|
}
|
|
3314
3593
|
/**
|
|
@@ -3327,7 +3606,19 @@ class zt {
|
|
|
3327
3606
|
s.state && s.state === "successed" && t.push(i);
|
|
3328
3607
|
} else
|
|
3329
3608
|
t.push(i);
|
|
3330
|
-
}), this.materials.value = []), t && t.length > 0 && (e =
|
|
3609
|
+
}), this.materials.value = []), t && t.length > 0 && (e = an.stringify(t)), e;
|
|
3610
|
+
}
|
|
3611
|
+
/**
|
|
3612
|
+
* @description 获取当前会话的消息集合
|
|
3613
|
+
* @private
|
|
3614
|
+
* @returns {*} {IChatMessage[]}
|
|
3615
|
+
* @memberof AiChatController
|
|
3616
|
+
*/
|
|
3617
|
+
getMessages() {
|
|
3618
|
+
const e = this.messages.value.filter((t) => t.type !== "ERROR").map((t) => t._origin);
|
|
3619
|
+
return e.forEach((t) => {
|
|
3620
|
+
t.content = t.content.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim();
|
|
3621
|
+
}), e;
|
|
3331
3622
|
}
|
|
3332
3623
|
/**
|
|
3333
3624
|
* 提问
|
|
@@ -3340,18 +3631,18 @@ class zt {
|
|
|
3340
3631
|
try {
|
|
3341
3632
|
this.isLoading.value = !0, this.messages.value.forEach((i, s) => {
|
|
3342
3633
|
const o = i._origin;
|
|
3343
|
-
o.suggestions && (o.suggestions = void 0, this.messages.value[s] = new
|
|
3634
|
+
o.suggestions && (o.suggestions = void 0, this.messages.value[s] = new j(o));
|
|
3344
3635
|
}), this.messages.value = [...this.messages.value], this.asyncToIndexDB();
|
|
3345
3636
|
let t = this.stringlyMaterialResource();
|
|
3346
3637
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
3347
3638
|
state: 30,
|
|
3348
|
-
messageid:
|
|
3639
|
+
messageid: ce(),
|
|
3349
3640
|
role: "USER",
|
|
3350
3641
|
type: "DEFAULT",
|
|
3351
3642
|
content: t
|
|
3352
3643
|
}), await this.opts.question(this, this.context, this.params, {
|
|
3353
3644
|
appDataEntityId: this.appDataEntityId
|
|
3354
|
-
}, this.
|
|
3645
|
+
}, this.getMessages(), this.chatSessionid), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
3355
3646
|
} finally {
|
|
3356
3647
|
this.isLoading.value = !1;
|
|
3357
3648
|
}
|
|
@@ -3402,11 +3693,11 @@ class zt {
|
|
|
3402
3693
|
if (t)
|
|
3403
3694
|
this.messages.value.splice(i + 1, this.messages.value.length - i - 1), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
|
|
3404
3695
|
appDataEntityId: this.appDataEntityId
|
|
3405
|
-
}, this.
|
|
3696
|
+
}, this.getMessages(), this.chatSessionid);
|
|
3406
3697
|
else if (i === this.messages.value.length - 1)
|
|
3407
3698
|
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
|
|
3408
3699
|
appDataEntityId: this.appDataEntityId
|
|
3409
|
-
}, this.
|
|
3700
|
+
}, this.getMessages(), this.chatSessionid);
|
|
3410
3701
|
else {
|
|
3411
3702
|
const s = this.messages.value[i - 1].content;
|
|
3412
3703
|
this.messages.value.splice(i - 1, 2), this.question(s);
|
|
@@ -3424,7 +3715,7 @@ class zt {
|
|
|
3424
3715
|
*/
|
|
3425
3716
|
copyMessage(e) {
|
|
3426
3717
|
const t = e.realcontent;
|
|
3427
|
-
|
|
3718
|
+
on.copy(t), this.opts.action && this.opts.action("copymsg", e);
|
|
3428
3719
|
}
|
|
3429
3720
|
/**
|
|
3430
3721
|
* 重置对话
|
|
@@ -3432,9 +3723,10 @@ class zt {
|
|
|
3432
3723
|
* @memberof AiChatController
|
|
3433
3724
|
*/
|
|
3434
3725
|
async resetTopic() {
|
|
3435
|
-
await this.abortQuestion(), this.topicId && await
|
|
3726
|
+
await this.abortQuestion(), this.topicId && await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [], this.opts.history(this.context, this.params, {
|
|
3436
3727
|
appDataEntityId: this.appDataEntityId,
|
|
3437
|
-
appendCurData: this.opts.appendCurData
|
|
3728
|
+
appendCurData: this.opts.appendCurData,
|
|
3729
|
+
sessionid: this.chatSessionid
|
|
3438
3730
|
});
|
|
3439
3731
|
}
|
|
3440
3732
|
/**
|
|
@@ -3444,7 +3736,7 @@ class zt {
|
|
|
3444
3736
|
* @date 2025-03-18 17:03:57
|
|
3445
3737
|
*/
|
|
3446
3738
|
async clearTopic() {
|
|
3447
|
-
await this.abortQuestion(), this.topicId && await
|
|
3739
|
+
await this.abortQuestion(), this.topicId && await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, this.topicId), this.messages.value = [];
|
|
3448
3740
|
}
|
|
3449
3741
|
/**
|
|
3450
3742
|
* 新增素材资源
|
|
@@ -3454,7 +3746,7 @@ class zt {
|
|
|
3454
3746
|
* @param {IMaterial} data
|
|
3455
3747
|
*/
|
|
3456
3748
|
addMaterial(e) {
|
|
3457
|
-
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new
|
|
3749
|
+
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new qe(e)];
|
|
3458
3750
|
}
|
|
3459
3751
|
/**
|
|
3460
3752
|
* 替换素材资源
|
|
@@ -3466,7 +3758,7 @@ class zt {
|
|
|
3466
3758
|
*/
|
|
3467
3759
|
replaceMaterial(e, t) {
|
|
3468
3760
|
const i = this.materials.value.findIndex((s) => s.id === e);
|
|
3469
|
-
i !== -1 ? (this.materials.value[i] = new
|
|
3761
|
+
i !== -1 ? (this.materials.value[i] = new qe(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new qe(t)];
|
|
3470
3762
|
}
|
|
3471
3763
|
/**
|
|
3472
3764
|
* 删除指定素材资源
|
|
@@ -3492,8 +3784,8 @@ class zt {
|
|
|
3492
3784
|
return;
|
|
3493
3785
|
const i = this.messages.value.findIndex((o) => o.messageid === e.messageid), {
|
|
3494
3786
|
suggestions: s
|
|
3495
|
-
} =
|
|
3496
|
-
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new
|
|
3787
|
+
} = jn.parseMixedContent(t);
|
|
3788
|
+
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new j(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new j(e)], this.asyncToIndexDB());
|
|
3497
3789
|
}
|
|
3498
3790
|
/**
|
|
3499
3791
|
* 处理建议点击
|
|
@@ -3509,7 +3801,7 @@ class zt {
|
|
|
3509
3801
|
const s = this.messages.value.findIndex((a) => a.messageid === e.messageid);
|
|
3510
3802
|
if (s !== -1) {
|
|
3511
3803
|
const a = this.messages.value[s]._origin;
|
|
3512
|
-
a.suggestions = void 0, this.messages.value[s] = new
|
|
3804
|
+
a.suggestions = void 0, this.messages.value[s] = new j(a), this.messages.value = [...this.messages.value];
|
|
3513
3805
|
}
|
|
3514
3806
|
this.asyncToIndexDB();
|
|
3515
3807
|
const {
|
|
@@ -3521,15 +3813,15 @@ class zt {
|
|
|
3521
3813
|
const a = t.data.actionid;
|
|
3522
3814
|
if (!a)
|
|
3523
3815
|
throw new Error("actionid不能为空");
|
|
3524
|
-
const
|
|
3816
|
+
const c = {
|
|
3525
3817
|
...e
|
|
3526
3818
|
};
|
|
3527
|
-
Object.assign(
|
|
3819
|
+
Object.assign(c, {
|
|
3528
3820
|
topic: this.topic
|
|
3529
|
-
}),
|
|
3821
|
+
}), c.msg.realcontent = e.realcontent, await this.opts.extendToolbarClick(i, {
|
|
3530
3822
|
id: a,
|
|
3531
3823
|
appId: this.context.srfappid
|
|
3532
|
-
}, this.context, this.params,
|
|
3824
|
+
}, this.context, this.params, c);
|
|
3533
3825
|
}
|
|
3534
3826
|
break;
|
|
3535
3827
|
case "raw":
|
|
@@ -3540,7 +3832,7 @@ class zt {
|
|
|
3540
3832
|
}
|
|
3541
3833
|
}
|
|
3542
3834
|
}
|
|
3543
|
-
class
|
|
3835
|
+
class os {
|
|
3544
3836
|
/**
|
|
3545
3837
|
* Creates an instance of AiTopicController.
|
|
3546
3838
|
* @author tony001
|
|
@@ -3555,7 +3847,7 @@ class Xi {
|
|
|
3555
3847
|
* @date 2025-02-20 16:02:38
|
|
3556
3848
|
* @type {Signal<ChatTopic[]>}
|
|
3557
3849
|
*/
|
|
3558
|
-
|
|
3850
|
+
S(this, "topics", G([]));
|
|
3559
3851
|
/**
|
|
3560
3852
|
* 激活话题
|
|
3561
3853
|
*
|
|
@@ -3563,7 +3855,7 @@ class Xi {
|
|
|
3563
3855
|
* @date 2025-02-24 16:02:44
|
|
3564
3856
|
* @type {(Signal<ITopic | undefined>)}
|
|
3565
3857
|
*/
|
|
3566
|
-
|
|
3858
|
+
S(this, "activedTopic", G(void 0));
|
|
3567
3859
|
/**
|
|
3568
3860
|
* 当前话题配置备份
|
|
3569
3861
|
*
|
|
@@ -3572,7 +3864,7 @@ class Xi {
|
|
|
3572
3864
|
* @public
|
|
3573
3865
|
* @type {(ITopicOptions | undefined)}
|
|
3574
3866
|
*/
|
|
3575
|
-
|
|
3867
|
+
S(this, "currentTopicOptions");
|
|
3576
3868
|
this.chat = e;
|
|
3577
3869
|
}
|
|
3578
3870
|
/**
|
|
@@ -3585,7 +3877,7 @@ class Xi {
|
|
|
3585
3877
|
async fetchHistory(e) {
|
|
3586
3878
|
const i = await e.configService(e.appid, "aitopics", e.type).load();
|
|
3587
3879
|
i && i.length > 0 && i.forEach((s) => {
|
|
3588
|
-
this.topics.value = [...this.topics.value, new
|
|
3880
|
+
this.topics.value = [...this.topics.value, new fe(s)];
|
|
3589
3881
|
});
|
|
3590
3882
|
}
|
|
3591
3883
|
/**
|
|
@@ -3598,8 +3890,8 @@ class Xi {
|
|
|
3598
3890
|
*/
|
|
3599
3891
|
async updateCurrentTopic(e) {
|
|
3600
3892
|
this.currentTopicOptions = e;
|
|
3601
|
-
const t = this.topics.value.findIndex((a) => a.id === e.id), i = new
|
|
3602
|
-
t !== -1 ? this.topics.value.splice(t, 1, new
|
|
3893
|
+
const t = this.topics.value.findIndex((a) => a.id === e.id), i = new fe(e);
|
|
3894
|
+
t !== -1 ? this.topics.value.splice(t, 1, new fe(e)) : this.topics.value = [...this.topics.value, new fe(e)];
|
|
3603
3895
|
const s = this.topics.value.map((a) => ({
|
|
3604
3896
|
appid: a.appid,
|
|
3605
3897
|
id: a.id,
|
|
@@ -3628,8 +3920,8 @@ class Xi {
|
|
|
3628
3920
|
let a = !0;
|
|
3629
3921
|
if (e.beforeDelete && (a = await e.beforeDelete(t, i, s, o)), !a)
|
|
3630
3922
|
return;
|
|
3631
|
-
const
|
|
3632
|
-
|
|
3923
|
+
const c = this.topics.value.findIndex((l) => l.id === s.id);
|
|
3924
|
+
c !== -1 && (this.topics.value.splice(c, 1), this.topics.value = [...this.topics.value]);
|
|
3633
3925
|
const u = this.topics.value.map((l) => ({
|
|
3634
3926
|
appid: l.appid,
|
|
3635
3927
|
id: l.id,
|
|
@@ -3639,7 +3931,7 @@ class Xi {
|
|
|
3639
3931
|
url: l.url,
|
|
3640
3932
|
aiChat: l.aiChat
|
|
3641
3933
|
})), h = e.configService(e.appid, "aitopics", e.type);
|
|
3642
|
-
await (h == null ? void 0 : h.save(u)), await
|
|
3934
|
+
await (h == null ? void 0 : h.save(u)), await V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, s.id), this.topics.value.length > 0 && s.id === ((p = this.activedTopic.value) == null ? void 0 : p.id) && this.handleTopicChange(this.topics.value[0]);
|
|
3643
3935
|
}
|
|
3644
3936
|
/**
|
|
3645
3937
|
* 更新话题数据
|
|
@@ -3684,13 +3976,13 @@ class Xi {
|
|
|
3684
3976
|
*/
|
|
3685
3977
|
async handleTopicAction(e, t, i) {
|
|
3686
3978
|
var o, a;
|
|
3687
|
-
const s = this.topics.value.find((
|
|
3979
|
+
const s = this.topics.value.find((c) => c.id === t.id);
|
|
3688
3980
|
if (this.currentTopicOptions && s && s.aiChat) {
|
|
3689
3981
|
const {
|
|
3690
|
-
context:
|
|
3982
|
+
context: c,
|
|
3691
3983
|
params: u
|
|
3692
3984
|
} = s.aiChat;
|
|
3693
|
-
e === "DELETE" ? await this.removeTopic(this.currentTopicOptions,
|
|
3985
|
+
e === "DELETE" ? await this.removeTopic(this.currentTopicOptions, c, u, s, i) : e === "RENAME" && await this.updateTopic(this.currentTopicOptions, t), (a = (o = this.currentTopicOptions).action) == null || a.call(o, e, c, u, t, i);
|
|
3694
3986
|
}
|
|
3695
3987
|
}
|
|
3696
3988
|
/**
|
|
@@ -3715,7 +4007,7 @@ class Xi {
|
|
|
3715
4007
|
sourceCaption: e.sourceCaption,
|
|
3716
4008
|
url: e.url,
|
|
3717
4009
|
aiChat: e.aiChat
|
|
3718
|
-
}, o = new
|
|
4010
|
+
}, o = new fe(s);
|
|
3719
4011
|
this.topics.value = [...this.topics.value, o];
|
|
3720
4012
|
const a = this.topics.value.map((p) => ({
|
|
3721
4013
|
appid: p.appid,
|
|
@@ -3725,8 +4017,8 @@ class Xi {
|
|
|
3725
4017
|
sourceCaption: p.sourceCaption,
|
|
3726
4018
|
url: p.url,
|
|
3727
4019
|
aiChat: p.aiChat
|
|
3728
|
-
})),
|
|
3729
|
-
await (
|
|
4020
|
+
})), c = (h = this.currentTopicOptions) == null ? void 0 : h.configService(s.appid, "aitopics", s.type);
|
|
4021
|
+
await (c == null ? void 0 : c.save(a)), this.handleTopicChange(o);
|
|
3730
4022
|
}
|
|
3731
4023
|
/**
|
|
3732
4024
|
* 清空话题
|
|
@@ -3737,8 +4029,8 @@ class Xi {
|
|
|
3737
4029
|
async clearTopic() {
|
|
3738
4030
|
var o;
|
|
3739
4031
|
const e = this.topics.value.find((a) => {
|
|
3740
|
-
var
|
|
3741
|
-
return a.id === ((
|
|
4032
|
+
var c;
|
|
4033
|
+
return a.id === ((c = this.activedTopic.value) == null ? void 0 : c.id);
|
|
3742
4034
|
});
|
|
3743
4035
|
if (!this.currentTopicOptions || !e)
|
|
3744
4036
|
return;
|
|
@@ -3747,7 +4039,7 @@ class Xi {
|
|
|
3747
4039
|
return;
|
|
3748
4040
|
await Promise.all(this.topics.value.map((a) => {
|
|
3749
4041
|
if (a.id !== (e == null ? void 0 : e.id))
|
|
3750
|
-
return
|
|
4042
|
+
return V.deleteData(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, a.id);
|
|
3751
4043
|
})), this.topics.value = e ? [e] : [];
|
|
3752
4044
|
const i = (o = this.currentTopicOptions) == null ? void 0 : o.configService(this.currentTopicOptions.appid, "aitopics", this.currentTopicOptions.type), s = this.topics.value.map((a) => ({
|
|
3753
4045
|
appid: a.appid,
|
|
@@ -3761,12 +4053,12 @@ class Xi {
|
|
|
3761
4053
|
await (i == null ? void 0 : i.save(s));
|
|
3762
4054
|
}
|
|
3763
4055
|
}
|
|
3764
|
-
class
|
|
4056
|
+
class En {
|
|
3765
4057
|
constructor(e) {
|
|
3766
4058
|
this.aiChat = e;
|
|
3767
4059
|
}
|
|
3768
4060
|
}
|
|
3769
|
-
class
|
|
4061
|
+
class as extends En {
|
|
3770
4062
|
/**
|
|
3771
4063
|
* 执行操作
|
|
3772
4064
|
*
|
|
@@ -3795,7 +4087,7 @@ class Zi extends Tn {
|
|
|
3795
4087
|
}
|
|
3796
4088
|
}
|
|
3797
4089
|
}
|
|
3798
|
-
class
|
|
4090
|
+
class rs extends En {
|
|
3799
4091
|
/**
|
|
3800
4092
|
* 执行操作
|
|
3801
4093
|
*
|
|
@@ -3808,21 +4100,21 @@ class Gi extends Tn {
|
|
|
3808
4100
|
multiple: s,
|
|
3809
4101
|
accept: o,
|
|
3810
4102
|
maxSize: a,
|
|
3811
|
-
onSelect:
|
|
4103
|
+
onSelect: c,
|
|
3812
4104
|
onUpload: u,
|
|
3813
4105
|
onSuccess: h,
|
|
3814
4106
|
onError: p,
|
|
3815
4107
|
onProgress: l
|
|
3816
|
-
} = i,
|
|
4108
|
+
} = i, m = {
|
|
3817
4109
|
multiple: s || !0,
|
|
3818
4110
|
accept: o || "*/*",
|
|
3819
4111
|
maxSize: a || 5 * 1024 * 1024,
|
|
3820
4112
|
onSelect: (d) => {
|
|
3821
|
-
|
|
3822
|
-
const
|
|
3823
|
-
Object.assign(
|
|
4113
|
+
c == null || c(d), d.length > 0 && d.forEach((f) => {
|
|
4114
|
+
const v = this.buildMaterialObject(f);
|
|
4115
|
+
Object.assign(v.metadata, {
|
|
3824
4116
|
state: "uploading"
|
|
3825
|
-
}), this.aiChat.addMaterial(
|
|
4117
|
+
}), this.aiChat.addMaterial(v);
|
|
3826
4118
|
});
|
|
3827
4119
|
},
|
|
3828
4120
|
onUpload: async (d, f) => u(d, f, {
|
|
@@ -3831,7 +4123,7 @@ class Gi extends Tn {
|
|
|
3831
4123
|
}),
|
|
3832
4124
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3833
4125
|
onSuccess: (d, f) => {
|
|
3834
|
-
const
|
|
4126
|
+
const v = {
|
|
3835
4127
|
id: d.id,
|
|
3836
4128
|
type: "ossfile",
|
|
3837
4129
|
data: {
|
|
@@ -3848,19 +4140,19 @@ class Gi extends Tn {
|
|
|
3848
4140
|
state: "successed"
|
|
3849
4141
|
}
|
|
3850
4142
|
};
|
|
3851
|
-
this.aiChat.replaceMaterial(f.name,
|
|
4143
|
+
this.aiChat.replaceMaterial(f.name, v), h == null || h(d, f);
|
|
3852
4144
|
},
|
|
3853
4145
|
onError: (d, f) => {
|
|
3854
|
-
const
|
|
3855
|
-
Object.assign(
|
|
4146
|
+
const v = this.buildMaterialObject(f);
|
|
4147
|
+
Object.assign(v.metadata, {
|
|
3856
4148
|
state: "failed"
|
|
3857
|
-
}), this.aiChat.replaceMaterial(f.name,
|
|
4149
|
+
}), this.aiChat.replaceMaterial(f.name, v), p == null || p(d, f);
|
|
3858
4150
|
},
|
|
3859
4151
|
onProgress: (d, f) => {
|
|
3860
4152
|
l == null || l(d, f);
|
|
3861
4153
|
}
|
|
3862
4154
|
};
|
|
3863
|
-
new
|
|
4155
|
+
new Wn(m).openFilePicker();
|
|
3864
4156
|
}
|
|
3865
4157
|
/**
|
|
3866
4158
|
* 构建素材对象
|
|
@@ -3886,17 +4178,17 @@ class Gi extends Tn {
|
|
|
3886
4178
|
};
|
|
3887
4179
|
}
|
|
3888
4180
|
}
|
|
3889
|
-
class
|
|
4181
|
+
class Bt {
|
|
3890
4182
|
static getMaterialHelper(e, t) {
|
|
3891
4183
|
switch (e) {
|
|
3892
4184
|
case "ossfile":
|
|
3893
|
-
return new
|
|
4185
|
+
return new rs(t);
|
|
3894
4186
|
default:
|
|
3895
|
-
return new
|
|
4187
|
+
return new as(t);
|
|
3896
4188
|
}
|
|
3897
4189
|
}
|
|
3898
4190
|
}
|
|
3899
|
-
class
|
|
4191
|
+
class cs {
|
|
3900
4192
|
/**
|
|
3901
4193
|
* Creates an instance of ChatController.
|
|
3902
4194
|
* @author tony001
|
|
@@ -3911,7 +4203,7 @@ class Ji {
|
|
|
3911
4203
|
* @protected
|
|
3912
4204
|
* @type {HTMLDivElement}
|
|
3913
4205
|
*/
|
|
3914
|
-
|
|
4206
|
+
S(this, "container");
|
|
3915
4207
|
/**
|
|
3916
4208
|
* 默认模式(聊天框)和话题模式(支持多话题切换),聊天框为默认模式
|
|
3917
4209
|
*
|
|
@@ -3920,7 +4212,7 @@ class Ji {
|
|
|
3920
4212
|
* @protected
|
|
3921
4213
|
* @type {('DEFAULT' | 'TOPIC')}
|
|
3922
4214
|
*/
|
|
3923
|
-
|
|
4215
|
+
S(this, "mode", "DEFAULT");
|
|
3924
4216
|
/**
|
|
3925
4217
|
* 是否挂载ai话题
|
|
3926
4218
|
*
|
|
@@ -3929,7 +4221,7 @@ class Ji {
|
|
|
3929
4221
|
* @protected
|
|
3930
4222
|
* @type {boolean}
|
|
3931
4223
|
*/
|
|
3932
|
-
|
|
4224
|
+
S(this, "isMountedAiTopic", !1);
|
|
3933
4225
|
/**
|
|
3934
4226
|
* 容器配置备份
|
|
3935
4227
|
*
|
|
@@ -3938,7 +4230,7 @@ class Ji {
|
|
|
3938
4230
|
* @protected
|
|
3939
4231
|
* @type {(IContainerOptions | undefined)}
|
|
3940
4232
|
*/
|
|
3941
|
-
|
|
4233
|
+
S(this, "backupChatOptions");
|
|
3942
4234
|
/**
|
|
3943
4235
|
* 话题控制器
|
|
3944
4236
|
*
|
|
@@ -3947,7 +4239,7 @@ class Ji {
|
|
|
3947
4239
|
* @public
|
|
3948
4240
|
* @type {AiTopicController}
|
|
3949
4241
|
*/
|
|
3950
|
-
|
|
4242
|
+
S(this, "aiTopic");
|
|
3951
4243
|
/**
|
|
3952
4244
|
* 话题map
|
|
3953
4245
|
*
|
|
@@ -3955,8 +4247,8 @@ class Ji {
|
|
|
3955
4247
|
* @type {Map<string, AiChatController>}
|
|
3956
4248
|
* @memberof ChatController
|
|
3957
4249
|
*/
|
|
3958
|
-
|
|
3959
|
-
this.aiTopic = new
|
|
4250
|
+
S(this, "aiTopicMap", /* @__PURE__ */ new Map());
|
|
4251
|
+
this.aiTopic = new os(this);
|
|
3960
4252
|
}
|
|
3961
4253
|
/**
|
|
3962
4254
|
* 聊天控制器
|
|
@@ -3977,7 +4269,7 @@ class Ji {
|
|
|
3977
4269
|
* @return {*} {Promise<void>}
|
|
3978
4270
|
*/
|
|
3979
4271
|
async initIndexDB() {
|
|
3980
|
-
await
|
|
4272
|
+
await V.checkTableExists(E.DATA_BASE_NAME, E.DATA_TABLE_NAME) || await V.createTable(E.DATA_BASE_NAME, E.DATA_TABLE_NAME, E.DATA_TABLE_KEY_NAME, !1);
|
|
3981
4273
|
}
|
|
3982
4274
|
/**
|
|
3983
4275
|
* 创建聊天窗口(会同时显示出来)
|
|
@@ -4009,8 +4301,8 @@ class Ji {
|
|
|
4009
4301
|
topicId: i == null ? void 0 : i.id,
|
|
4010
4302
|
topic: i
|
|
4011
4303
|
});
|
|
4012
|
-
const s = new
|
|
4013
|
-
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), ae(
|
|
4304
|
+
const s = new Ot(t);
|
|
4305
|
+
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), ae(q(Ft, {
|
|
4014
4306
|
aiChat: s,
|
|
4015
4307
|
aiTopic: this.aiTopic,
|
|
4016
4308
|
mode: e.mode ? e.mode : "DEFAULT",
|
|
@@ -4039,7 +4331,7 @@ class Ji {
|
|
|
4039
4331
|
* @param {ChatTopic} topic
|
|
4040
4332
|
*/
|
|
4041
4333
|
switchAiChatController(e) {
|
|
4042
|
-
var s, o, a,
|
|
4334
|
+
var s, o, a, c, u;
|
|
4043
4335
|
const t = {
|
|
4044
4336
|
...this.backupChatOptions.chatOptions
|
|
4045
4337
|
};
|
|
@@ -4060,13 +4352,13 @@ class Ji {
|
|
|
4060
4352
|
recommendPrompt: this.backupChatOptions.chatOptions.recommendPrompt
|
|
4061
4353
|
});
|
|
4062
4354
|
let i;
|
|
4063
|
-
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new
|
|
4355
|
+
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new Ot(t), this.aiTopicMap.set("".concat(e.id), i)), this.container && (ae(null, this.container), ae(q(Ft, {
|
|
4064
4356
|
aiChat: i,
|
|
4065
4357
|
aiTopic: this.aiTopic,
|
|
4066
4358
|
mode: (s = this.backupChatOptions) != null && s.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
4067
4359
|
containerOptions: (o = this.backupChatOptions) == null ? void 0 : o.containerOptions,
|
|
4068
4360
|
caption: (a = this.backupChatOptions) != null && a.mode && this.backupChatOptions.mode === "TOPIC" ? "AI助手" : t.caption,
|
|
4069
|
-
enableBackFill: (u = (
|
|
4361
|
+
enableBackFill: (u = (c = this.backupChatOptions) == null ? void 0 : c.containerOptions) == null ? void 0 : u.enableBackFill,
|
|
4070
4362
|
contentToolbarItems: t.contentToolbarItems,
|
|
4071
4363
|
footerToolbarItems: t.footerToolbarItems,
|
|
4072
4364
|
questionToolbarItems: t.questionToolbarItems,
|
|
@@ -4109,19 +4401,19 @@ class Ji {
|
|
|
4109
4401
|
this.container && (ae(null, this.container), this.container.remove(), this.container = void 0);
|
|
4110
4402
|
}
|
|
4111
4403
|
}
|
|
4112
|
-
const
|
|
4113
|
-
const
|
|
4404
|
+
const gs = new cs();
|
|
4405
|
+
const ls = new k("chat-input-material"), us = (n) => {
|
|
4114
4406
|
const e = n.controller.materials;
|
|
4115
|
-
return
|
|
4116
|
-
className:
|
|
4117
|
-
children: e.value.map((t) =>
|
|
4407
|
+
return r("div", {
|
|
4408
|
+
className: ls.b(),
|
|
4409
|
+
children: e.value.map((t) => r(Sn, {
|
|
4118
4410
|
material: t,
|
|
4119
4411
|
disabled: !1,
|
|
4120
4412
|
controller: n.controller
|
|
4121
4413
|
}, t.id))
|
|
4122
4414
|
});
|
|
4123
4415
|
};
|
|
4124
|
-
const
|
|
4416
|
+
const Mn = ({
|
|
4125
4417
|
children: n,
|
|
4126
4418
|
actions: e,
|
|
4127
4419
|
// 接收行为数据
|
|
@@ -4132,14 +4424,14 @@ const xn = ({
|
|
|
4132
4424
|
onAction: a
|
|
4133
4425
|
// 接收行为事件回调
|
|
4134
4426
|
}) => {
|
|
4135
|
-
const
|
|
4136
|
-
|
|
4427
|
+
const c = new k("pop"), u = pn(rt), [h, p] = K(s || !1), l = P(null), m = P(null);
|
|
4428
|
+
I(() => {
|
|
4137
4429
|
s !== void 0 && p(s);
|
|
4138
|
-
}, [s]),
|
|
4139
|
-
|
|
4140
|
-
}), []),
|
|
4430
|
+
}, [s]), I(() => (m.current || (m.current = document.createElement("div"), m.current.className = c.b("content-container"), document.body.appendChild(m.current)), () => {
|
|
4431
|
+
m.current && document.body.removeChild(m.current);
|
|
4432
|
+
}), []), I(() => {
|
|
4141
4433
|
const d = (f) => {
|
|
4142
|
-
l.current && !l.current.contains(f.target) && !f.target.closest(".".concat(
|
|
4434
|
+
l.current && !l.current.contains(f.target) && !f.target.closest(".".concat(c.b())) && !f.target.closest(".ibiz-quick-edit") && !f.target.closest(".ibiz-picker__transfer") && (p(!1), o == null || o(!1));
|
|
4143
4435
|
};
|
|
4144
4436
|
return h && document.addEventListener("mousedown", d), () => {
|
|
4145
4437
|
document.removeEventListener("mousedown", d);
|
|
@@ -4151,7 +4443,7 @@ const xn = ({
|
|
|
4151
4443
|
const d = l.current.getBoundingClientRect(), f = {
|
|
4152
4444
|
position: "absolute",
|
|
4153
4445
|
zIndex: u.zIndex + 1
|
|
4154
|
-
},
|
|
4446
|
+
}, v = {
|
|
4155
4447
|
bottom: {
|
|
4156
4448
|
top: d.bottom + window.scrollY,
|
|
4157
4449
|
left: d.left + window.scrollX
|
|
@@ -4175,13 +4467,13 @@ const xn = ({
|
|
|
4175
4467
|
};
|
|
4176
4468
|
return {
|
|
4177
4469
|
...f,
|
|
4178
|
-
...
|
|
4470
|
+
...v[i]
|
|
4179
4471
|
};
|
|
4180
4472
|
};
|
|
4181
|
-
return
|
|
4182
|
-
className: "".concat(
|
|
4183
|
-
children: [
|
|
4184
|
-
className: "".concat(
|
|
4473
|
+
return r("span", {
|
|
4474
|
+
className: "".concat(c.b("trigger-container")),
|
|
4475
|
+
children: [r("span", {
|
|
4476
|
+
className: "".concat(c.b("trigger-element")),
|
|
4185
4477
|
ref: l,
|
|
4186
4478
|
onClick: (d) => {
|
|
4187
4479
|
d.stopPropagation();
|
|
@@ -4189,77 +4481,77 @@ const xn = ({
|
|
|
4189
4481
|
p(f), o == null || o(f);
|
|
4190
4482
|
},
|
|
4191
4483
|
children: n
|
|
4192
|
-
}), h &&
|
|
4193
|
-
className: "".concat(
|
|
4484
|
+
}), h && m.current && qi(r("div", {
|
|
4485
|
+
className: "".concat(c.b(), " pop-").concat(i),
|
|
4194
4486
|
style: _(),
|
|
4195
|
-
children: t || (e == null ? void 0 : e.map((d) =>
|
|
4487
|
+
children: t || (e == null ? void 0 : e.map((d) => r("div", {
|
|
4196
4488
|
title: d.caption,
|
|
4197
|
-
className:
|
|
4489
|
+
className: c.e("item"),
|
|
4198
4490
|
onMouseDown: (f) => {
|
|
4199
4491
|
f.stopPropagation(), a == null || a(d.id, f);
|
|
4200
4492
|
},
|
|
4201
|
-
children: [d.icon,
|
|
4202
|
-
className:
|
|
4493
|
+
children: [d.icon, r("div", {
|
|
4494
|
+
className: c.em("item", "caption"),
|
|
4203
4495
|
children: d.caption
|
|
4204
4496
|
})]
|
|
4205
4497
|
}, d.id)))
|
|
4206
|
-
}),
|
|
4498
|
+
}), m.current)]
|
|
4207
4499
|
});
|
|
4208
4500
|
};
|
|
4209
|
-
const
|
|
4501
|
+
const A = new k("chat-input"), Pt = window.SpeechRecognition || window.webkitSpeechRecognition, Rt = (n) => {
|
|
4210
4502
|
var f;
|
|
4211
|
-
const [e, t] = K(!1), i = P(null), s = n.controller.input, o =
|
|
4212
|
-
|
|
4503
|
+
const [e, t] = K(!1), i = P(null), s = n.controller.input, o = M(!1), a = P();
|
|
4504
|
+
Pt && !a.current && (a.current = new Pt(), a.current.onstart = () => {
|
|
4213
4505
|
o.value = !0;
|
|
4214
4506
|
}, a.current.onend = () => {
|
|
4215
4507
|
o.value = !1;
|
|
4216
|
-
}, a.current.onresult = (
|
|
4217
|
-
var g,
|
|
4218
|
-
const w = (
|
|
4508
|
+
}, a.current.onresult = (v) => {
|
|
4509
|
+
var g, C, T;
|
|
4510
|
+
const w = (T = (C = (g = v.results) == null ? void 0 : g[0]) == null ? void 0 : C[0]) == null ? void 0 : T.transcript;
|
|
4219
4511
|
w && (s.value = "".concat(s.value).concat(w));
|
|
4220
4512
|
});
|
|
4221
|
-
const
|
|
4513
|
+
const c = () => {
|
|
4222
4514
|
a.current && !o.value && a.current.start();
|
|
4223
|
-
}, u = Fe((
|
|
4224
|
-
s.value =
|
|
4515
|
+
}, u = Fe((v) => {
|
|
4516
|
+
s.value = v.target.value;
|
|
4225
4517
|
}, [s]), h = B(() => s.value.length <= 0);
|
|
4226
|
-
|
|
4227
|
-
i.current &&
|
|
4518
|
+
I(() => (i.current && Ht(i.current), () => {
|
|
4519
|
+
i.current && Ht.destroy(i.current);
|
|
4228
4520
|
}), [i]);
|
|
4229
4521
|
const p = Fe(async () => {
|
|
4230
|
-
var
|
|
4522
|
+
var v;
|
|
4231
4523
|
try {
|
|
4232
4524
|
const w = s.value;
|
|
4233
4525
|
s.value = "", await n.controller.question(w);
|
|
4234
4526
|
} catch (w) {
|
|
4235
4527
|
console.error(w);
|
|
4236
4528
|
} finally {
|
|
4237
|
-
(
|
|
4529
|
+
(v = i.current) == null || v.focus();
|
|
4238
4530
|
}
|
|
4239
4531
|
}, [s]), l = Fe(async () => {
|
|
4240
4532
|
try {
|
|
4241
4533
|
n.controller.abortQuestion();
|
|
4242
|
-
} catch (
|
|
4243
|
-
console.error(
|
|
4534
|
+
} catch (v) {
|
|
4535
|
+
console.error(v);
|
|
4244
4536
|
}
|
|
4245
|
-
}, [s]),
|
|
4246
|
-
|
|
4247
|
-
}, _ = async (
|
|
4248
|
-
await
|
|
4249
|
-
}, d = async (
|
|
4250
|
-
await
|
|
4537
|
+
}, [s]), m = (v) => {
|
|
4538
|
+
v.code === "Enter" && !v.isComposing && (v.stopPropagation(), v.shiftKey === !1 && p());
|
|
4539
|
+
}, _ = async (v) => {
|
|
4540
|
+
await Bt.getMaterialHelper("ossfile", n.controller).excuteAction(v), t(!1);
|
|
4541
|
+
}, d = async (v, w) => {
|
|
4542
|
+
await Bt.getMaterialHelper("common", n.controller).excuteAction(v, w), t(!1);
|
|
4251
4543
|
};
|
|
4252
|
-
return
|
|
4253
|
-
className:
|
|
4254
|
-
children: [
|
|
4255
|
-
className:
|
|
4256
|
-
children:
|
|
4544
|
+
return r("div", {
|
|
4545
|
+
className: A.b("wrapper"),
|
|
4546
|
+
children: [r("div", {
|
|
4547
|
+
className: A.b("material-wrapper"),
|
|
4548
|
+
children: r(us, {
|
|
4257
4549
|
controller: n.controller
|
|
4258
4550
|
})
|
|
4259
|
-
}),
|
|
4260
|
-
className:
|
|
4261
|
-
children: [
|
|
4262
|
-
className:
|
|
4551
|
+
}), r("div", {
|
|
4552
|
+
className: A.b("main-wrapper"),
|
|
4553
|
+
children: [r("textarea", {
|
|
4554
|
+
className: A.e("textarea"),
|
|
4263
4555
|
type: "text",
|
|
4264
4556
|
rows: 6,
|
|
4265
4557
|
autoCorrect: "off",
|
|
@@ -4267,150 +4559,150 @@ const $ = new M("chat-input"), Ot = window.SpeechRecognition || window.webkitSpe
|
|
|
4267
4559
|
autoComplete: "off",
|
|
4268
4560
|
value: s,
|
|
4269
4561
|
onInput: u,
|
|
4270
|
-
onKeyDown:
|
|
4562
|
+
onKeyDown: m,
|
|
4271
4563
|
ref: i,
|
|
4272
4564
|
disabled: n.controller.isLoading.value
|
|
4273
|
-
}),
|
|
4274
|
-
className:
|
|
4275
|
-
children: [
|
|
4276
|
-
className: "".concat(
|
|
4565
|
+
}), r("div", {
|
|
4566
|
+
className: A.b("action-wrapper"),
|
|
4567
|
+
children: [r("div", {
|
|
4568
|
+
className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", n.controller.isLoading.value)),
|
|
4277
4569
|
title: "上传资料",
|
|
4278
|
-
children:
|
|
4279
|
-
content:
|
|
4280
|
-
className:
|
|
4281
|
-
children: [
|
|
4282
|
-
className:
|
|
4283
|
-
onClick: (
|
|
4284
|
-
_(
|
|
4570
|
+
children: r(Mn, {
|
|
4571
|
+
content: r("div", {
|
|
4572
|
+
className: A.b("pop-actions"),
|
|
4573
|
+
children: [r("div", {
|
|
4574
|
+
className: A.b("pop-action-item"),
|
|
4575
|
+
onClick: (v) => {
|
|
4576
|
+
_(v);
|
|
4285
4577
|
},
|
|
4286
|
-
children: [
|
|
4287
|
-
className:
|
|
4288
|
-
children:
|
|
4289
|
-
}),
|
|
4290
|
-
className:
|
|
4578
|
+
children: [r("span", {
|
|
4579
|
+
className: A.b("pop-action-item-icon"),
|
|
4580
|
+
children: r(xn, {})
|
|
4581
|
+
}), r("span", {
|
|
4582
|
+
className: A.b("pop-action-item-title"),
|
|
4291
4583
|
children: "文件资料"
|
|
4292
4584
|
})]
|
|
4293
|
-
}), (f = n.questionToolbarItems) == null ? void 0 : f.map((
|
|
4294
|
-
var w, g,
|
|
4295
|
-
return
|
|
4296
|
-
className:
|
|
4297
|
-
onClick: (
|
|
4298
|
-
d(
|
|
4585
|
+
}), (f = n.questionToolbarItems) == null ? void 0 : f.map((v) => {
|
|
4586
|
+
var w, g, C;
|
|
4587
|
+
return r("div", {
|
|
4588
|
+
className: A.b("pop-action-item"),
|
|
4589
|
+
onClick: (T) => {
|
|
4590
|
+
d(T, v);
|
|
4299
4591
|
},
|
|
4300
|
-
children: [
|
|
4301
|
-
className:
|
|
4302
|
-
children: typeof
|
|
4303
|
-
children: (g =
|
|
4304
|
-
className:
|
|
4305
|
-
}) : (
|
|
4592
|
+
children: [r("span", {
|
|
4593
|
+
className: A.b("pop-action-item-icon"),
|
|
4594
|
+
children: typeof v.icon == "function" ? v.icon() : ((w = v.icon) == null ? void 0 : w.showIcon) && r(Y, {
|
|
4595
|
+
children: (g = v.icon) != null && g.cssClass ? r("i", {
|
|
4596
|
+
className: v.icon.cssClass
|
|
4597
|
+
}) : (C = v.icon) != null && C.imagePath ? it(v.icon.imagePath) ? r("div", {
|
|
4306
4598
|
dangerouslySetInnerHTML: {
|
|
4307
|
-
__html:
|
|
4599
|
+
__html: v.icon.imagePath
|
|
4308
4600
|
}
|
|
4309
|
-
}) :
|
|
4310
|
-
src:
|
|
4601
|
+
}) : r("img", {
|
|
4602
|
+
src: v.icon.imagePath
|
|
4311
4603
|
}) : null
|
|
4312
4604
|
})
|
|
4313
|
-
}),
|
|
4314
|
-
className:
|
|
4315
|
-
children:
|
|
4605
|
+
}), r("span", {
|
|
4606
|
+
className: A.b("pop-action-item-title"),
|
|
4607
|
+
children: v.label
|
|
4316
4608
|
})]
|
|
4317
|
-
},
|
|
4609
|
+
}, v.id);
|
|
4318
4610
|
})]
|
|
4319
4611
|
}),
|
|
4320
4612
|
position: "top-left",
|
|
4321
4613
|
isOpen: e,
|
|
4322
4614
|
onToggleOpen: t,
|
|
4323
|
-
children:
|
|
4615
|
+
children: r(vi, {})
|
|
4324
4616
|
})
|
|
4325
|
-
}),
|
|
4617
|
+
}), r("div", {
|
|
4326
4618
|
title: o.value ? "语音输入中..." : "语音输入",
|
|
4327
|
-
className: "".concat(
|
|
4328
|
-
onClick:
|
|
4329
|
-
children: o.value ?
|
|
4330
|
-
}), n.controller.isLoading.value ?
|
|
4619
|
+
className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", n.controller.isLoading.value)),
|
|
4620
|
+
onClick: c,
|
|
4621
|
+
children: o.value ? r(hi, {}) : r(di, {})
|
|
4622
|
+
}), n.controller.isLoading.value ? r("div", {
|
|
4331
4623
|
title: "停止生成",
|
|
4332
|
-
className: "".concat(
|
|
4624
|
+
className: "".concat(A.be("action-wrapper", "action-item")),
|
|
4333
4625
|
onClick: l,
|
|
4334
|
-
children:
|
|
4335
|
-
}) :
|
|
4626
|
+
children: r(wi, {})
|
|
4627
|
+
}) : r("div", {
|
|
4336
4628
|
title: "发送消息",
|
|
4337
|
-
className: "".concat(
|
|
4629
|
+
className: "".concat(A.be("action-wrapper", "action-item"), " ").concat(A.is("disabled", h.value)),
|
|
4338
4630
|
onClick: p,
|
|
4339
|
-
children:
|
|
4631
|
+
children: r(ii, {})
|
|
4340
4632
|
})]
|
|
4341
4633
|
})]
|
|
4342
4634
|
})]
|
|
4343
4635
|
});
|
|
4344
4636
|
};
|
|
4345
|
-
const R = new
|
|
4637
|
+
const R = new k("chat-topic-item"), ds = (n) => {
|
|
4346
4638
|
const {
|
|
4347
4639
|
controller: e,
|
|
4348
4640
|
topic: t,
|
|
4349
4641
|
onClick: i,
|
|
4350
4642
|
onAction: s
|
|
4351
4643
|
} = n, o = P(null), a = B(() => {
|
|
4352
|
-
var
|
|
4353
|
-
return ((
|
|
4354
|
-
}), [
|
|
4644
|
+
var v;
|
|
4645
|
+
return ((v = e.activedTopic.value) == null ? void 0 : v.id) === t.id;
|
|
4646
|
+
}), [c, u] = K(!1), h = M(!1), p = (f) => {
|
|
4355
4647
|
f.stopPropagation(), s("LINK", f);
|
|
4356
|
-
}, l = (f,
|
|
4357
|
-
f === "DELETE" ? s("DELETE",
|
|
4648
|
+
}, l = (f, v) => {
|
|
4649
|
+
f === "DELETE" ? s("DELETE", v) : f === "RENAME" && (h.value = !0, setTimeout(() => {
|
|
4358
4650
|
var w;
|
|
4359
4651
|
(w = o.current) == null || w.focus();
|
|
4360
4652
|
}, 100)), u(!1);
|
|
4361
|
-
},
|
|
4362
|
-
var
|
|
4363
|
-
f.stopPropagation(), t.data.caption = (
|
|
4653
|
+
}, m = (f) => {
|
|
4654
|
+
var v;
|
|
4655
|
+
f.stopPropagation(), t.data.caption = (v = f.target) == null ? void 0 : v.value;
|
|
4364
4656
|
}, _ = (f) => {
|
|
4365
4657
|
f.stopPropagation(), h.value = !1, s("RENAME", f);
|
|
4366
4658
|
}, d = (f) => {
|
|
4367
4659
|
f.stopPropagation(), f.key === "Enter" && (h.value = !1);
|
|
4368
4660
|
};
|
|
4369
|
-
return
|
|
4661
|
+
return r("div", {
|
|
4370
4662
|
className: "".concat(R.b(), " ").concat(R.is("active", a.value), " ").concat(R.is("edit", h.value)),
|
|
4371
4663
|
onClick: i.bind(void 0),
|
|
4372
|
-
children: [
|
|
4664
|
+
children: [r("div", {
|
|
4373
4665
|
className: R.e("caption"),
|
|
4374
4666
|
title: t.caption,
|
|
4375
|
-
children: h.value ?
|
|
4667
|
+
children: h.value ? r("input", {
|
|
4376
4668
|
ref: o,
|
|
4377
4669
|
value: t.caption,
|
|
4378
4670
|
onBlur: _,
|
|
4379
4671
|
onKeyDown: d,
|
|
4380
4672
|
onClick: (f) => f.stopPropagation(),
|
|
4381
|
-
onChange: (f) =>
|
|
4673
|
+
onChange: (f) => m(f),
|
|
4382
4674
|
className: R.em("caption", "editor")
|
|
4383
|
-
}) :
|
|
4675
|
+
}) : r("span", {
|
|
4384
4676
|
className: R.em("caption", "text"),
|
|
4385
4677
|
children: t.caption
|
|
4386
4678
|
})
|
|
4387
|
-
}), !h.value &&
|
|
4679
|
+
}), !h.value && r("div", {
|
|
4388
4680
|
className: R.e("icon"),
|
|
4389
|
-
children: [
|
|
4681
|
+
children: [r("span", {
|
|
4390
4682
|
title: "跳转主视图",
|
|
4391
4683
|
className: R.em("icon", "item"),
|
|
4392
4684
|
onClick: p.bind(void 0),
|
|
4393
|
-
children:
|
|
4685
|
+
children: r(fi, {
|
|
4394
4686
|
className: R.b("link-icon")
|
|
4395
4687
|
})
|
|
4396
|
-
}), a.value ? null :
|
|
4688
|
+
}), a.value ? null : r(Mn, {
|
|
4397
4689
|
actions: [{
|
|
4398
4690
|
id: "RENAME",
|
|
4399
4691
|
caption: "重命名",
|
|
4400
|
-
icon:
|
|
4692
|
+
icon: r(Ti, {})
|
|
4401
4693
|
}, {
|
|
4402
4694
|
id: "DELETE",
|
|
4403
4695
|
caption: "删除话题",
|
|
4404
|
-
icon:
|
|
4696
|
+
icon: r(Tn, {})
|
|
4405
4697
|
}],
|
|
4406
4698
|
position: "bottom",
|
|
4407
|
-
isOpen:
|
|
4699
|
+
isOpen: c,
|
|
4408
4700
|
onToggleOpen: u,
|
|
4409
4701
|
onAction: l.bind(void 0),
|
|
4410
|
-
children:
|
|
4702
|
+
children: r("span", {
|
|
4411
4703
|
className: R.em("icon", "item"),
|
|
4412
4704
|
title: "更多",
|
|
4413
|
-
children:
|
|
4705
|
+
children: r(pi, {
|
|
4414
4706
|
className: R.e("more-icon")
|
|
4415
4707
|
})
|
|
4416
4708
|
})
|
|
@@ -4418,103 +4710,103 @@ const R = new M("chat-topic-item"), es = (n) => {
|
|
|
4418
4710
|
})]
|
|
4419
4711
|
});
|
|
4420
4712
|
};
|
|
4421
|
-
const
|
|
4713
|
+
const Se = new k("chat-search"), hs = (n) => {
|
|
4422
4714
|
const {
|
|
4423
4715
|
className: e,
|
|
4424
4716
|
value: t,
|
|
4425
4717
|
placeholder: i,
|
|
4426
4718
|
onChange: s
|
|
4427
|
-
} = n, [o, a] = K(!1),
|
|
4719
|
+
} = n, [o, a] = K(!1), c = (u) => {
|
|
4428
4720
|
var h;
|
|
4429
4721
|
u.stopPropagation(), s == null || s((h = u.target) == null ? void 0 : h.value);
|
|
4430
4722
|
};
|
|
4431
|
-
return
|
|
4432
|
-
className: "".concat(
|
|
4433
|
-
children: [
|
|
4434
|
-
className:
|
|
4435
|
-
children:
|
|
4436
|
-
}),
|
|
4723
|
+
return r("div", {
|
|
4724
|
+
className: "".concat(Se.b(), " ").concat(Se.is("focus", o), " ").concat(e || ""),
|
|
4725
|
+
children: [r("div", {
|
|
4726
|
+
className: Se.e("prefix"),
|
|
4727
|
+
children: r(Si, {})
|
|
4728
|
+
}), r("input", {
|
|
4437
4729
|
value: t,
|
|
4438
|
-
className:
|
|
4730
|
+
className: Se.e("inner"),
|
|
4439
4731
|
placeholder: i,
|
|
4440
4732
|
onFocus: () => a(!0),
|
|
4441
4733
|
onBlur: () => a(!1),
|
|
4442
|
-
onChange: (u) =>
|
|
4734
|
+
onChange: (u) => c(u)
|
|
4443
4735
|
})]
|
|
4444
4736
|
});
|
|
4445
4737
|
};
|
|
4446
|
-
const se = new
|
|
4447
|
-
const e = P(null), t =
|
|
4448
|
-
|
|
4449
|
-
i.value = n.controller.topics.value.filter((
|
|
4738
|
+
const se = new k("chat-topics"), ps = (n) => {
|
|
4739
|
+
const e = P(null), t = M(void 0), i = M([]);
|
|
4740
|
+
I(() => {
|
|
4741
|
+
i.value = n.controller.topics.value.filter((c) => {
|
|
4450
4742
|
var u, h;
|
|
4451
|
-
return (h =
|
|
4743
|
+
return (h = c.caption) == null ? void 0 : h.toLowerCase().includes(((u = t.value) == null ? void 0 : u.trim().toLowerCase()) || "");
|
|
4452
4744
|
});
|
|
4453
4745
|
}, [n.controller.topics.value]);
|
|
4454
|
-
const s = (
|
|
4455
|
-
n.controller.handleTopicChange(
|
|
4456
|
-
}, o = (
|
|
4457
|
-
n.controller.handleTopicAction(
|
|
4458
|
-
}, a = (
|
|
4459
|
-
t.value =
|
|
4746
|
+
const s = (c) => {
|
|
4747
|
+
n.controller.handleTopicChange(c);
|
|
4748
|
+
}, o = (c, u, h) => {
|
|
4749
|
+
n.controller.handleTopicAction(c, u, h);
|
|
4750
|
+
}, a = (c) => {
|
|
4751
|
+
t.value = c, i.value = n.controller.topics.value.filter((u) => {
|
|
4460
4752
|
var h, p;
|
|
4461
4753
|
return (p = u.caption) == null ? void 0 : p.toLowerCase().includes(((h = t.value) == null ? void 0 : h.trim().toLowerCase()) || "");
|
|
4462
4754
|
});
|
|
4463
4755
|
};
|
|
4464
|
-
return
|
|
4465
|
-
const
|
|
4466
|
-
if (!
|
|
4756
|
+
return I(() => {
|
|
4757
|
+
const c = e.current;
|
|
4758
|
+
if (!c)
|
|
4467
4759
|
return;
|
|
4468
|
-
const u =
|
|
4760
|
+
const u = c.querySelector(".ibiz-chat-topic-item.is-active");
|
|
4469
4761
|
u == null || u.scrollIntoView({
|
|
4470
4762
|
behavior: "smooth",
|
|
4471
4763
|
block: "nearest"
|
|
4472
4764
|
});
|
|
4473
|
-
}, [n.controller.activedTopic.value]),
|
|
4765
|
+
}, [n.controller.activedTopic.value]), r("div", {
|
|
4474
4766
|
className: se.b(),
|
|
4475
|
-
children: [
|
|
4767
|
+
children: [r("div", {
|
|
4476
4768
|
className: se.e("header"),
|
|
4477
|
-
children:
|
|
4769
|
+
children: r(hs, {
|
|
4478
4770
|
value: t.value,
|
|
4479
4771
|
placeholder: "搜索话题",
|
|
4480
4772
|
onChange: a.bind(void 0)
|
|
4481
4773
|
})
|
|
4482
|
-
}),
|
|
4774
|
+
}), r("div", {
|
|
4483
4775
|
ref: e,
|
|
4484
4776
|
className: se.e("main"),
|
|
4485
|
-
children: i.value && i.value.length > 0 ? i.value.map((
|
|
4486
|
-
topic:
|
|
4777
|
+
children: i.value && i.value.length > 0 ? i.value.map((c) => r(ds, {
|
|
4778
|
+
topic: c,
|
|
4487
4779
|
controller: n.controller,
|
|
4488
|
-
onClick: () => s(
|
|
4489
|
-
onAction: (u, h) => o(u,
|
|
4490
|
-
},
|
|
4780
|
+
onClick: () => s(c),
|
|
4781
|
+
onAction: (u, h) => o(u, c, h)
|
|
4782
|
+
}, c.id)) : r("div", {
|
|
4491
4783
|
className: se.e("empty"),
|
|
4492
4784
|
children: "暂无话题"
|
|
4493
4785
|
})
|
|
4494
|
-
}),
|
|
4786
|
+
}), r("div", {
|
|
4495
4787
|
className: se.e("footer"),
|
|
4496
|
-
children:
|
|
4788
|
+
children: r("div", {
|
|
4497
4789
|
title: "清空会话",
|
|
4498
4790
|
className: se.e("action"),
|
|
4499
4791
|
onClick: () => n.controller.clearTopic(),
|
|
4500
|
-
children: [
|
|
4792
|
+
children: [r(Tn, {}), r("span", {
|
|
4501
4793
|
children: "清空会话"
|
|
4502
4794
|
})]
|
|
4503
4795
|
})
|
|
4504
4796
|
})]
|
|
4505
4797
|
});
|
|
4506
4798
|
};
|
|
4507
|
-
const oe = new
|
|
4508
|
-
const e = P(null), [t, i] = K(""), [s, o] = K(0), a = P(!1),
|
|
4799
|
+
const oe = new k("chat-minimize"), fs = (n) => {
|
|
4800
|
+
const e = P(null), [t, i] = K(""), [s, o] = K(0), a = P(!1), c = {
|
|
4509
4801
|
x: (window.innerWidth - 86) / window.innerWidth,
|
|
4510
4802
|
y: (window.innerHeight - 86) / window.innerHeight
|
|
4511
4803
|
}, u = B(() => {
|
|
4512
4804
|
const d = n.controller.messages.value[n.controller.messages.value.length - 1];
|
|
4513
4805
|
return d ? d.role === "ASSISTANT" && d.state === 20 && d.completed !== !0 : !1;
|
|
4514
4806
|
}), h = (d) => {
|
|
4515
|
-
const f = d.indexOf("<think>"),
|
|
4807
|
+
const f = d.indexOf("<think>"), v = d.indexOf("</think>");
|
|
4516
4808
|
let w = "", g = "";
|
|
4517
|
-
return
|
|
4809
|
+
return v === -1 ? (w = d.slice(f + 7), g = "") : (w = d.slice(f + 7, v), g = d.slice(v + 8)), {
|
|
4518
4810
|
thoughtContent: w,
|
|
4519
4811
|
answerContent: g
|
|
4520
4812
|
};
|
|
@@ -4525,91 +4817,91 @@ const oe = new M("chat-minimize"), is = (n) => {
|
|
|
4525
4817
|
const f = n.controller.messages.value[n.controller.messages.value.length - 1];
|
|
4526
4818
|
if (d = f.content, f.content.indexOf("<think>") !== -1) {
|
|
4527
4819
|
const {
|
|
4528
|
-
thoughtContent:
|
|
4820
|
+
thoughtContent: v,
|
|
4529
4821
|
answerContent: w
|
|
4530
4822
|
} = h(f.content);
|
|
4531
|
-
d =
|
|
4823
|
+
d = v + w;
|
|
4532
4824
|
}
|
|
4533
4825
|
return d;
|
|
4534
4826
|
}), l = () => {
|
|
4535
4827
|
Object.assign(e.current.style, {
|
|
4536
|
-
left: "".concat(
|
|
4537
|
-
top: "".concat(
|
|
4538
|
-
}), localStorage.setItem(E.MINIMIZE_STYLY_CHCHE, JSON.stringify(
|
|
4539
|
-
},
|
|
4828
|
+
left: "".concat(c.x * 100, "%"),
|
|
4829
|
+
top: "".concat(c.y * 100, "%")
|
|
4830
|
+
}), localStorage.setItem(E.MINIMIZE_STYLY_CHCHE, JSON.stringify(c));
|
|
4831
|
+
}, m = () => {
|
|
4540
4832
|
const d = e.current;
|
|
4541
4833
|
d && (d.onmousedown = (f) => {
|
|
4542
4834
|
document.body.style.userSelect = "none";
|
|
4543
|
-
const
|
|
4835
|
+
const v = f.clientX - d.offsetLeft, w = f.clientY - d.offsetTop, g = Date.now(), C = (x) => {
|
|
4544
4836
|
const O = 56 / window.innerWidth, L = 56 / window.innerHeight, {
|
|
4545
4837
|
x: U,
|
|
4546
4838
|
y: z
|
|
4547
|
-
} =
|
|
4548
|
-
Object.assign(
|
|
4839
|
+
} = rn(x.clientX - v, x.clientY - w, O, L);
|
|
4840
|
+
Object.assign(c, {
|
|
4549
4841
|
x: U,
|
|
4550
4842
|
y: z
|
|
4551
4843
|
}), requestAnimationFrame(() => {
|
|
4552
4844
|
l();
|
|
4553
4845
|
});
|
|
4554
|
-
},
|
|
4555
|
-
const
|
|
4556
|
-
a.current =
|
|
4846
|
+
}, T = () => {
|
|
4847
|
+
const x = Date.now();
|
|
4848
|
+
a.current = x - g > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", T);
|
|
4557
4849
|
};
|
|
4558
|
-
document.addEventListener("mousemove",
|
|
4850
|
+
document.addEventListener("mousemove", C), document.addEventListener("mouseup", T);
|
|
4559
4851
|
});
|
|
4560
4852
|
}, _ = () => {
|
|
4561
4853
|
a.current || n.onClick();
|
|
4562
4854
|
};
|
|
4563
|
-
return
|
|
4855
|
+
return I(() => {
|
|
4564
4856
|
const d = localStorage.getItem(E.MINIMIZE_STYLY_CHCHE);
|
|
4565
4857
|
if (d) {
|
|
4566
4858
|
const f = JSON.parse(d);
|
|
4567
|
-
|
|
4859
|
+
Ge(f) && Object.assign(c, f);
|
|
4568
4860
|
}
|
|
4569
|
-
l(),
|
|
4570
|
-
}, []),
|
|
4861
|
+
l(), m();
|
|
4862
|
+
}, []), I(() => {
|
|
4571
4863
|
if (s < p.value.length) {
|
|
4572
4864
|
const d = setTimeout(() => {
|
|
4573
4865
|
i((f) => f + p.value[s]), o((f) => f + 1);
|
|
4574
4866
|
}, 100);
|
|
4575
4867
|
return () => clearTimeout(d);
|
|
4576
4868
|
}
|
|
4577
|
-
}, [s, p.value]),
|
|
4869
|
+
}, [s, p.value]), r("div", {
|
|
4578
4870
|
ref: e,
|
|
4579
4871
|
title: n.title,
|
|
4580
4872
|
className: "".concat(oe.b(), " ").concat(oe.is("hidden", !n.isMinimize), " ").concat(oe.is("show-halo", u.value)),
|
|
4581
4873
|
onClick: _,
|
|
4582
|
-
children:
|
|
4874
|
+
children: r("div", {
|
|
4583
4875
|
className: "".concat(oe.e("content"), " ").concat(oe.is("show-border", !u.value)),
|
|
4584
|
-
children: [t &&
|
|
4876
|
+
children: [t && r("div", {
|
|
4585
4877
|
className: "".concat(oe.em("content", "popover")),
|
|
4586
|
-
children:
|
|
4878
|
+
children: r("div", {
|
|
4587
4879
|
className: "typewriter",
|
|
4588
4880
|
children: t
|
|
4589
4881
|
})
|
|
4590
|
-
}),
|
|
4882
|
+
}), r(li, {})]
|
|
4591
4883
|
})
|
|
4592
4884
|
});
|
|
4593
4885
|
};
|
|
4594
|
-
const rt =
|
|
4886
|
+
const rt = Bn({
|
|
4595
4887
|
zIndex: 10,
|
|
4596
4888
|
enableBackFill: !0,
|
|
4597
4889
|
newTopic: () => {
|
|
4598
4890
|
}
|
|
4599
4891
|
});
|
|
4600
|
-
var
|
|
4601
|
-
class
|
|
4892
|
+
var Ut, Wt, jt, Vt;
|
|
4893
|
+
class Ft extends F {
|
|
4602
4894
|
constructor(t) {
|
|
4603
4895
|
super(t);
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4896
|
+
S(this, "ns", new k("chat-container"));
|
|
4897
|
+
S(this, "containerRef", lt());
|
|
4898
|
+
S(this, "dragHandle", lt());
|
|
4607
4899
|
/**
|
|
4608
4900
|
* 窗口样式数据
|
|
4609
4901
|
*
|
|
4610
4902
|
* @memberof ChatContainer
|
|
4611
4903
|
*/
|
|
4612
|
-
|
|
4904
|
+
S(this, "data", {
|
|
4613
4905
|
side: {
|
|
4614
4906
|
y: 0,
|
|
4615
4907
|
height: 1,
|
|
@@ -4632,14 +4924,14 @@ class Pt extends F {
|
|
|
4632
4924
|
* @type {boolean}
|
|
4633
4925
|
* @memberof ChatContainer
|
|
4634
4926
|
*/
|
|
4635
|
-
|
|
4927
|
+
S(this, "disabled", !1);
|
|
4636
4928
|
/**
|
|
4637
4929
|
* 最小化是否在拖拽中
|
|
4638
4930
|
* - 在拖拽时不应触发点击事件
|
|
4639
4931
|
* @type {boolean}
|
|
4640
4932
|
* @memberof ChatContainer
|
|
4641
4933
|
*/
|
|
4642
|
-
|
|
4934
|
+
S(this, "isDragging", !1);
|
|
4643
4935
|
/**
|
|
4644
4936
|
* 容器上下文
|
|
4645
4937
|
*
|
|
@@ -4647,9 +4939,9 @@ class Pt extends F {
|
|
|
4647
4939
|
* @date 2025-03-03 16:03:44
|
|
4648
4940
|
* @type {ContainerContext}
|
|
4649
4941
|
*/
|
|
4650
|
-
|
|
4651
|
-
zIndex: ((
|
|
4652
|
-
enableBackFill: ((
|
|
4942
|
+
S(this, "containerContext", {
|
|
4943
|
+
zIndex: ((Ut = this.props.containerOptions) == null ? void 0 : Ut.zIndex) || 10,
|
|
4944
|
+
enableBackFill: ((Wt = this.props) == null ? void 0 : Wt.enableBackFill) !== void 0 && ((jt = this.props) == null ? void 0 : jt.enableBackFill) !== null ? (Vt = this.props) == null ? void 0 : Vt.enableBackFill : !0,
|
|
4653
4945
|
newTopic: () => {
|
|
4654
4946
|
this.props.aiTopic.newTopic();
|
|
4655
4947
|
}
|
|
@@ -4714,9 +5006,9 @@ class Pt extends F {
|
|
|
4714
5006
|
x: s,
|
|
4715
5007
|
y: o,
|
|
4716
5008
|
width: a,
|
|
4717
|
-
height:
|
|
5009
|
+
height: c
|
|
4718
5010
|
} = this.data.window;
|
|
4719
|
-
s < t || s + a > 1 - t ? this.calcSideModeStyle(s < t ? "left" : "right") : (o < i && (this.data.window.y = 0), o +
|
|
5011
|
+
s < t || s + a > 1 - t ? this.calcSideModeStyle(s < t ? "left" : "right") : (o < i && (this.data.window.y = 0), o + c > 1 - i && (this.data.window.y = 1 - c)), this.setStyle();
|
|
4720
5012
|
}
|
|
4721
5013
|
/**
|
|
4722
5014
|
* 注册对话框拖拽
|
|
@@ -4728,14 +5020,14 @@ class Pt extends F {
|
|
|
4728
5020
|
if (this.state.isFullScreen)
|
|
4729
5021
|
return;
|
|
4730
5022
|
document.body.style.userSelect = "none";
|
|
4731
|
-
const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (
|
|
5023
|
+
const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (c) => {
|
|
4732
5024
|
if (this.disabled)
|
|
4733
5025
|
return;
|
|
4734
5026
|
this.data.showMode = "window";
|
|
4735
5027
|
const {
|
|
4736
5028
|
x: u,
|
|
4737
5029
|
y: h
|
|
4738
|
-
} =
|
|
5030
|
+
} = rn(c.clientX - i, c.clientY - s, this.data.window.width, this.data.window.height);
|
|
4739
5031
|
Object.assign(this.data.window, {
|
|
4740
5032
|
x: u,
|
|
4741
5033
|
y: h
|
|
@@ -4806,7 +5098,7 @@ class Pt extends F {
|
|
|
4806
5098
|
const t = localStorage.getItem(E.STYLE_CACHE);
|
|
4807
5099
|
if (t) {
|
|
4808
5100
|
const i = JSON.parse(t);
|
|
4809
|
-
i.side &&
|
|
5101
|
+
i.side && Ge(i.side) && i.window && Ge(i.window) && Object.assign(this.data, i);
|
|
4810
5102
|
}
|
|
4811
5103
|
this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(), document.addEventListener("fullscreenchange", this.handleFullScreenChange);
|
|
4812
5104
|
}
|
|
@@ -4871,101 +5163,101 @@ class Pt extends F {
|
|
|
4871
5163
|
t.stopPropagation();
|
|
4872
5164
|
}
|
|
4873
5165
|
render() {
|
|
4874
|
-
return
|
|
5166
|
+
return r(rt.Provider, {
|
|
4875
5167
|
value: this.containerContext,
|
|
4876
|
-
children:
|
|
5168
|
+
children: r("div", {
|
|
4877
5169
|
className: "".concat(this.ns.b()),
|
|
4878
|
-
children: [
|
|
5170
|
+
children: [r("div", {
|
|
4879
5171
|
className: "".concat(this.ns.e("dialog"), " ").concat(this.ns.is("full-screen", this.state.isFullScreen), " ").concat(this.ns.is("hidden", this.state.isMinimize)),
|
|
4880
5172
|
ref: this.containerRef,
|
|
4881
|
-
children: [
|
|
5173
|
+
children: [r("div", {
|
|
4882
5174
|
ref: this.dragHandle,
|
|
4883
5175
|
className: this.ns.b("header"),
|
|
4884
|
-
children: [
|
|
5176
|
+
children: [r("div", {
|
|
4885
5177
|
className: this.ns.b("header-caption"),
|
|
4886
5178
|
children: this.props.caption || "AI助手"
|
|
4887
|
-
}),
|
|
5179
|
+
}), r("div", {
|
|
4888
5180
|
className: this.ns.b("header-action-wrapper"),
|
|
4889
|
-
children: [
|
|
5181
|
+
children: [r("div", {
|
|
4890
5182
|
title: "最小化",
|
|
4891
5183
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "minimize")),
|
|
4892
5184
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4893
5185
|
onClick: this.minimize.bind(this),
|
|
4894
|
-
children:
|
|
4895
|
-
}), this.state.isFullScreen ?
|
|
5186
|
+
children: r(ci, {})
|
|
5187
|
+
}), this.state.isFullScreen ? r("div", {
|
|
4896
5188
|
title: "退出全屏",
|
|
4897
5189
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "close-full-screen")),
|
|
4898
5190
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4899
5191
|
onClick: this.closeFullScreen.bind(this),
|
|
4900
|
-
children:
|
|
4901
|
-
}) :
|
|
5192
|
+
children: r(ri, {})
|
|
5193
|
+
}) : r("div", {
|
|
4902
5194
|
title: "全屏",
|
|
4903
5195
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
|
|
4904
5196
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4905
5197
|
onClick: this.fullScreen.bind(this),
|
|
4906
|
-
children:
|
|
4907
|
-
}),
|
|
5198
|
+
children: r(ai, {})
|
|
5199
|
+
}), r("div", {
|
|
4908
5200
|
title: "关闭",
|
|
4909
5201
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
|
|
4910
5202
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4911
5203
|
onClick: this.close.bind(this),
|
|
4912
|
-
children:
|
|
5204
|
+
children: r(ti, {})
|
|
4913
5205
|
})]
|
|
4914
5206
|
})]
|
|
4915
|
-
}), this.props.mode === "TOPIC" ?
|
|
5207
|
+
}), this.props.mode === "TOPIC" ? r("div", {
|
|
4916
5208
|
className: "".concat(this.ns.b("main")),
|
|
4917
|
-
children: [
|
|
5209
|
+
children: [r("div", {
|
|
4918
5210
|
className: "".concat(this.ns.be("main", "left")),
|
|
4919
|
-
children:
|
|
5211
|
+
children: r(ps, {
|
|
4920
5212
|
controller: this.props.aiTopic
|
|
4921
5213
|
})
|
|
4922
|
-
}),
|
|
5214
|
+
}), r("div", {
|
|
4923
5215
|
className: "".concat(this.ns.be("main", "right")),
|
|
4924
|
-
children: [
|
|
5216
|
+
children: [r("div", {
|
|
4925
5217
|
className: this.ns.b("content"),
|
|
4926
|
-
children:
|
|
5218
|
+
children: r(kt, {
|
|
4927
5219
|
controller: this.props.aiChat,
|
|
4928
5220
|
toolbarItems: this.props.contentToolbarItems
|
|
4929
5221
|
})
|
|
4930
|
-
}),
|
|
5222
|
+
}), r(et, {
|
|
4931
5223
|
type: "footer",
|
|
4932
5224
|
mode: this.props.mode,
|
|
4933
5225
|
data: this.props.aiTopic.activedTopic.value,
|
|
4934
5226
|
className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is("has-materials", this.props.aiChat.materials.value.length > 0)),
|
|
4935
5227
|
controller: this.props.aiChat,
|
|
4936
5228
|
items: this.props.footerToolbarItems
|
|
4937
|
-
}),
|
|
5229
|
+
}), r("div", {
|
|
4938
5230
|
className: this.ns.b("footer"),
|
|
4939
|
-
children:
|
|
5231
|
+
children: r(Rt, {
|
|
4940
5232
|
controller: this.props.aiChat,
|
|
4941
5233
|
questionToolbarItems: this.props.questionToolbarItems
|
|
4942
5234
|
})
|
|
4943
5235
|
})]
|
|
4944
5236
|
})]
|
|
4945
|
-
}) :
|
|
5237
|
+
}) : r("div", {
|
|
4946
5238
|
className: "".concat(this.ns.be("main", "default")),
|
|
4947
|
-
children: [
|
|
5239
|
+
children: [r("div", {
|
|
4948
5240
|
className: this.ns.b("content"),
|
|
4949
|
-
children:
|
|
5241
|
+
children: r(kt, {
|
|
4950
5242
|
controller: this.props.aiChat,
|
|
4951
5243
|
toolbarItems: this.props.contentToolbarItems
|
|
4952
5244
|
})
|
|
4953
|
-
}),
|
|
5245
|
+
}), r(et, {
|
|
4954
5246
|
type: "footer",
|
|
4955
5247
|
mode: this.props.mode,
|
|
4956
5248
|
data: this.props.aiTopic.activedTopic.value,
|
|
4957
5249
|
className: "".concat(this.ns.e("toolbar"), " ").concat(this.ns.is("has-materials", this.props.aiChat.materials.value.length > 0)),
|
|
4958
5250
|
controller: this.props.aiChat,
|
|
4959
5251
|
items: this.props.footerToolbarItems
|
|
4960
|
-
}),
|
|
5252
|
+
}), r("div", {
|
|
4961
5253
|
className: this.ns.b("footer"),
|
|
4962
|
-
children:
|
|
5254
|
+
children: r(Rt, {
|
|
4963
5255
|
controller: this.props.aiChat,
|
|
4964
5256
|
questionToolbarItems: this.props.questionToolbarItems
|
|
4965
5257
|
})
|
|
4966
5258
|
})]
|
|
4967
5259
|
})]
|
|
4968
|
-
}),
|
|
5260
|
+
}), r(fs, {
|
|
4969
5261
|
title: this.props.caption || "AI助手",
|
|
4970
5262
|
controller: this.props.aiChat,
|
|
4971
5263
|
isMinimize: this.state.isMinimize,
|
|
@@ -4976,6 +5268,6 @@ class Pt extends F {
|
|
|
4976
5268
|
}
|
|
4977
5269
|
}
|
|
4978
5270
|
export {
|
|
4979
|
-
|
|
4980
|
-
|
|
5271
|
+
Ft as ChatContainer,
|
|
5272
|
+
gs as chat
|
|
4981
5273
|
};
|