@ibiz-template-plugin/ai-chat 0.0.32 → 0.0.34
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 +1284 -1046
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/chat-container/chat-container.d.ts +4 -0
- package/dist/types/components/common/common-select/common-select.d.ts +68 -0
- package/dist/types/components/common/index.d.ts +1 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +40 -1
- package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +13 -2
- package/dist/types/entity/ai-agent/ai-agent.d.ts +12 -0
- package/dist/types/entity/index.d.ts +1 -0
- package/dist/types/interface/i-ai-agent/i-ai-agent.d.ts +21 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +21 -1
- package/dist/types/interface/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { QXEvent as
|
|
8
|
-
var
|
|
9
|
-
function
|
|
2
|
+
var Pn = Object.defineProperty;
|
|
3
|
+
var Rn = (n, e, t) => e in n ? Pn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
|
+
var x = (n, e, t) => (Rn(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
+
import Ue from "interactjs";
|
|
6
|
+
import Gt from "cherry-markdown";
|
|
7
|
+
import { QXEvent as Fn } from "qx-util";
|
|
8
|
+
var Oe, C, Qt, en, ie, ft, tn, nn, sn, ot, Ke, Ge, on, xe = {}, an = [], Un = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ae = Array.isArray;
|
|
9
|
+
function Y(n, e) {
|
|
10
10
|
for (var t in e)
|
|
11
11
|
n[t] = e[t];
|
|
12
12
|
return n;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function at(n) {
|
|
15
15
|
n && n.parentNode && n.parentNode.removeChild(n);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function X(n, e, t) {
|
|
18
18
|
var i, s, a, o = {};
|
|
19
19
|
for (a in e)
|
|
20
20
|
a == "key" ? i = e[a] : a == "ref" ? s = e[a] : o[a] = e[a];
|
|
21
|
-
if (arguments.length > 2 && (o.children = arguments.length > 3 ?
|
|
21
|
+
if (arguments.length > 2 && (o.children = arguments.length > 3 ? Oe.call(arguments, 2) : t), typeof n == "function" && n.defaultProps != null)
|
|
22
22
|
for (a in n.defaultProps)
|
|
23
23
|
o[a] === void 0 && (o[a] = n.defaultProps[a]);
|
|
24
|
-
return
|
|
24
|
+
return Ee(n, o, i, s, null);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
var a = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s == null ? ++
|
|
28
|
-
return s == null &&
|
|
26
|
+
function Ee(n, e, t, i, s) {
|
|
27
|
+
var a = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: s == null ? ++Qt : s, __i: -1, __u: 0 };
|
|
28
|
+
return s == null && C.vnode != null && C.vnode(a), a;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function vt() {
|
|
31
31
|
return { current: null };
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Z(n) {
|
|
34
34
|
return n.children;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function F(n, e) {
|
|
37
37
|
this.props = n, this.context = e;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function pe(n, e) {
|
|
40
40
|
if (e == null)
|
|
41
|
-
return n.__ ?
|
|
41
|
+
return n.__ ? pe(n.__, n.__i + 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.__e;
|
|
45
|
-
return typeof n.type == "function" ?
|
|
45
|
+
return typeof n.type == "function" ? pe(n) : null;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function rn(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,51 +52,51 @@ function on(n) {
|
|
|
52
52
|
n.__e = n.__c.base = t.__e;
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return rn(n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
(!n.__d && (n.__d = !0) &&
|
|
58
|
+
function Qe(n) {
|
|
59
|
+
(!n.__d && (n.__d = !0) && ie.push(n) && !De.__r++ || ft != C.debounceRendering) && ((ft = C.debounceRendering) || tn)(De);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
for (var n, e, t, i, s, a, o, r = 1;
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
function De() {
|
|
62
|
+
for (var n, e, t, i, s, a, o, r = 1; ie.length; )
|
|
63
|
+
ie.length > r && ie.sort(nn), n = ie.shift(), r = ie.length, n.__d && (t = void 0, i = void 0, s = (i = (e = n).__v).__e, a = [], o = [], e.__P && ((t = Y({}, i)).__v = i.__v + 1, C.vnode && C.vnode(t), rt(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [s] : null, a, s == null ? pe(i) : s, !!(32 & i.__u), o), t.__v = i.__v, t.__.__k[t.__i] = t, un(a, t, o), i.__e = i.__ = null, t.__e != s && rn(t)));
|
|
64
|
+
De.__r = 0;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
var l, f, _, p, m,
|
|
68
|
-
for (u =
|
|
69
|
-
(_ = t.__k[l]) != null && (f = _.__i == -1 ?
|
|
66
|
+
function cn(n, e, t, i, s, a, o, r, u, h, d) {
|
|
67
|
+
var l, f, _, p, m, w, g, v = i && i.__k || an, b = e.length;
|
|
68
|
+
for (u = Wn(t, e, v, u, b), l = 0; l < b; l++)
|
|
69
|
+
(_ = t.__k[l]) != null && (f = _.__i == -1 ? xe : v[_.__i] || xe, _.__i = l, w = rt(n, _, f, s, a, o, r, u, h, d), p = _.__e, _.ref && f.ref != _.ref && (f.ref && ct(f.ref, null, _), d.push(_.ref, _.__c || p, _)), m == null && p != null && (m = p), (g = !!(4 & _.__u)) || f.__k === _.__k ? u = ln(_, u, n, g) : typeof _.type == "function" && w !== void 0 ? u = w : p && (u = p.nextSibling), _.__u &= -7);
|
|
70
70
|
return t.__e = m, u;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Wn(n, e, t, i, s) {
|
|
73
73
|
var a, o, r, u, h, d = t.length, l = d, f = 0;
|
|
74
74
|
for (n.__k = new Array(s), a = 0; a < s; a++)
|
|
75
|
-
(o = e[a]) != null && typeof o != "boolean" && typeof o != "function" ? (u = a + f, (o = n.__k[a] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ?
|
|
75
|
+
(o = e[a]) != null && typeof o != "boolean" && typeof o != "function" ? (u = a + f, (o = n.__k[a] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Ee(null, o, null, null, null) : Ae(o) ? Ee(Z, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Ee(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = n, o.__b = n.__b + 1, r = null, (h = o.__i = jn(o, t, u, l)) != -1 && (l--, (r = t[h]) && (r.__u |= 2)), r == null || r.__v == null ? (h == -1 && (s > d ? f-- : s < d && f++), typeof o.type != "function" && (o.__u |= 4)) : h != u && (h == u - 1 ? f-- : h == u + 1 ? f++ : (h > u ? f-- : f++, o.__u |= 4))) : n.__k[a] = null;
|
|
76
76
|
if (l)
|
|
77
77
|
for (a = 0; a < d; a++)
|
|
78
|
-
(r = t[a]) != null && !(2 & r.__u) && (r.__e == i && (i =
|
|
78
|
+
(r = t[a]) != null && !(2 & r.__u) && (r.__e == i && (i = pe(r)), dn(r, r));
|
|
79
79
|
return i;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function ln(n, e, t, i) {
|
|
82
82
|
var s, a;
|
|
83
83
|
if (typeof n.type == "function") {
|
|
84
84
|
for (s = n.__k, a = 0; s && a < s.length; a++)
|
|
85
|
-
s[a] && (s[a].__ = n, e =
|
|
85
|
+
s[a] && (s[a].__ = n, e = ln(s[a], e, t, i));
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
|
-
n.__e != e && (i && (e && n.type && !e.parentNode && (e =
|
|
88
|
+
n.__e != e && (i && (e && n.type && !e.parentNode && (e = pe(n)), t.insertBefore(n.__e, e || null)), e = n.__e);
|
|
89
89
|
do
|
|
90
90
|
e = e && e.nextSibling;
|
|
91
91
|
while (e != null && e.nodeType == 8);
|
|
92
92
|
return e;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
return e = e || [], n == null || typeof n == "boolean" || (
|
|
96
|
-
|
|
94
|
+
function Le(n, e) {
|
|
95
|
+
return e = e || [], n == null || typeof n == "boolean" || (Ae(n) ? n.some(function(t) {
|
|
96
|
+
Le(t, e);
|
|
97
97
|
}) : e.push(n)), e;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function jn(n, e, t, i) {
|
|
100
100
|
var s, a, o, r = n.key, u = n.type, h = e[t], d = h != null && (2 & h.__u) == 0;
|
|
101
101
|
if (h === null && n.key == null || d && r == h.key && u == h.type)
|
|
102
102
|
return t;
|
|
@@ -107,8 +107,8 @@ function Wn(n, e, t, i) {
|
|
|
107
107
|
}
|
|
108
108
|
return -1;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
e[0] == "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" ||
|
|
110
|
+
function mt(n, e, t) {
|
|
111
|
+
e[0] == "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || Un.test(e) ? t : t + "px";
|
|
112
112
|
}
|
|
113
113
|
function ke(n, e, t, i, s) {
|
|
114
114
|
var a, o;
|
|
@@ -119,13 +119,13 @@ function ke(n, e, t, i, s) {
|
|
|
119
119
|
else {
|
|
120
120
|
if (typeof i == "string" && (n.style.cssText = i = ""), i)
|
|
121
121
|
for (e in i)
|
|
122
|
-
t && e in t ||
|
|
122
|
+
t && e in t || mt(n.style, e, "");
|
|
123
123
|
if (t)
|
|
124
124
|
for (e in t)
|
|
125
|
-
i && t[e] == i[e] ||
|
|
125
|
+
i && t[e] == i[e] || mt(n.style, e, t[e]);
|
|
126
126
|
}
|
|
127
127
|
else if (e[0] == "o" && e[1] == "n")
|
|
128
|
-
a = e != (e = e.replace(
|
|
128
|
+
a = e != (e = e.replace(sn, "$1")), o = e.toLowerCase(), e = o in n || e == "onFocusOut" || e == "onFocusIn" ? o.slice(2) : e.slice(2), n.l || (n.l = {}), n.l[e + a] = t, t ? i ? t.u = i.u : (t.u = ot, n.addEventListener(e, a ? Ge : Ke, a)) : n.removeEventListener(e, a ? Ge : Ke, a);
|
|
129
129
|
else {
|
|
130
130
|
if (s == "http://www.w3.org/2000/svg")
|
|
131
131
|
e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
@@ -138,130 +138,130 @@ function ke(n, e, t, i, s) {
|
|
|
138
138
|
typeof t == "function" || (t == null || t === !1 && e[4] != "-" ? n.removeAttribute(e) : n.setAttribute(e, e == "popover" && t == 1 ? "" : t));
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function _t(n) {
|
|
142
142
|
return function(e) {
|
|
143
143
|
if (this.l) {
|
|
144
144
|
var t = this.l[e.type + n];
|
|
145
145
|
if (e.t == null)
|
|
146
|
-
e.t =
|
|
146
|
+
e.t = ot++;
|
|
147
147
|
else if (e.t < t.u)
|
|
148
148
|
return;
|
|
149
|
-
return t(
|
|
149
|
+
return t(C.event ? C.event(e) : e);
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
var d, l, f, _, p, m,
|
|
153
|
+
function rt(n, e, t, i, s, a, o, r, u, h) {
|
|
154
|
+
var d, l, f, _, p, m, w, g, v, b, T, S, L, K, G, ee, Fe, U = e.type;
|
|
155
155
|
if (e.constructor != null)
|
|
156
156
|
return null;
|
|
157
|
-
128 & t.__u && (u = !!(32 & t.__u), a = [r = e.__e = t.__e]), (d =
|
|
157
|
+
128 & t.__u && (u = !!(32 & t.__u), a = [r = e.__e = t.__e]), (d = C.__b) && d(e);
|
|
158
158
|
e:
|
|
159
|
-
if (typeof
|
|
159
|
+
if (typeof U == "function")
|
|
160
160
|
try {
|
|
161
|
-
if (
|
|
162
|
-
|
|
161
|
+
if (g = e.props, v = "prototype" in U && U.prototype.render, b = (d = U.contextType) && i[d.__c], T = d ? b ? b.props.value : d.__ : i, t.__c ? w = (l = e.__c = t.__c).__ = l.__E : (v ? e.__c = l = new U(g, T) : (e.__c = l = new F(g, T), l.constructor = U, l.render = qn), b && b.sub(l), l.props = g, l.state || (l.state = {}), l.context = T, l.__n = i, f = l.__d = !0, l.__h = [], l._sb = []), v && l.__s == null && (l.__s = l.state), v && U.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = Y({}, l.__s)), Y(l.__s, U.getDerivedStateFromProps(g, l.__s))), _ = l.props, p = l.state, l.__v = e, f)
|
|
162
|
+
v && U.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), v && l.componentDidMount != null && l.__h.push(l.componentDidMount);
|
|
163
163
|
else {
|
|
164
|
-
if (
|
|
165
|
-
for (e.__v != t.__v && (l.props =
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
l.__h.push(l._sb[
|
|
164
|
+
if (v && U.getDerivedStateFromProps == null && g !== _ && l.componentWillReceiveProps != null && l.componentWillReceiveProps(g, T), !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(g, l.__s, T) === !1 || e.__v == t.__v) {
|
|
165
|
+
for (e.__v != t.__v && (l.props = g, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.some(function(oe) {
|
|
166
|
+
oe && (oe.__ = e);
|
|
167
|
+
}), S = 0; S < l._sb.length; S++)
|
|
168
|
+
l.__h.push(l._sb[S]);
|
|
169
169
|
l._sb = [], l.__h.length && o.push(l);
|
|
170
170
|
break e;
|
|
171
171
|
}
|
|
172
|
-
l.componentWillUpdate != null && l.componentWillUpdate(
|
|
172
|
+
l.componentWillUpdate != null && l.componentWillUpdate(g, l.__s, T), v && l.componentDidUpdate != null && l.__h.push(function() {
|
|
173
173
|
l.componentDidUpdate(_, p, m);
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
if (l.context =
|
|
177
|
-
for (l.state = l.__s, l.__d = !1,
|
|
178
|
-
l.__h.push(l._sb[
|
|
176
|
+
if (l.context = T, l.props = g, l.__P = n, l.__e = !1, L = C.__r, K = 0, v) {
|
|
177
|
+
for (l.state = l.__s, l.__d = !1, L && L(e), d = l.render(l.props, l.state, l.context), G = 0; G < l._sb.length; G++)
|
|
178
|
+
l.__h.push(l._sb[G]);
|
|
179
179
|
l._sb = [];
|
|
180
180
|
} else
|
|
181
181
|
do
|
|
182
|
-
l.__d = !1,
|
|
183
|
-
while (l.__d && ++
|
|
184
|
-
l.state = l.__s, l.getChildContext != null && (i =
|
|
185
|
-
} catch (
|
|
182
|
+
l.__d = !1, L && L(e), d = l.render(l.props, l.state, l.context), l.state = l.__s;
|
|
183
|
+
while (l.__d && ++K < 25);
|
|
184
|
+
l.state = l.__s, l.getChildContext != null && (i = Y(Y({}, i), l.getChildContext())), v && !f && l.getSnapshotBeforeUpdate != null && (m = l.getSnapshotBeforeUpdate(_, p)), ee = d, d != null && d.type === Z && d.key == null && (ee = hn(d.props.children)), r = cn(n, Ae(ee) ? ee : [ee], e, t, i, s, a, o, r, u, h), l.base = e.__e, e.__u &= -161, l.__h.length && o.push(l), w && (l.__E = l.__ = null);
|
|
185
|
+
} catch (oe) {
|
|
186
186
|
if (e.__v = null, u || a != null)
|
|
187
|
-
if (
|
|
187
|
+
if (oe.then) {
|
|
188
188
|
for (e.__u |= u ? 160 : 128; r && r.nodeType == 8 && r.nextSibling; )
|
|
189
189
|
r = r.nextSibling;
|
|
190
190
|
a[a.indexOf(r)] = null, e.__e = r;
|
|
191
191
|
} else {
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
for (Fe = a.length; Fe--; )
|
|
193
|
+
at(a[Fe]);
|
|
194
|
+
et(e);
|
|
195
195
|
}
|
|
196
196
|
else
|
|
197
|
-
e.__e = t.__e, e.__k = t.__k,
|
|
198
|
-
|
|
197
|
+
e.__e = t.__e, e.__k = t.__k, oe.then || et(e);
|
|
198
|
+
C.__e(oe, e, t);
|
|
199
199
|
}
|
|
200
200
|
else
|
|
201
|
-
a == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : r = e.__e =
|
|
202
|
-
return (d =
|
|
201
|
+
a == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : r = e.__e = Vn(t.__e, e, t, i, s, a, o, u, h);
|
|
202
|
+
return (d = C.diffed) && d(e), 128 & e.__u ? void 0 : r;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
n && n.__c && (n.__c.__e = !0), n && n.__k && n.__k.forEach(
|
|
204
|
+
function et(n) {
|
|
205
|
+
n && n.__c && (n.__c.__e = !0), n && n.__k && n.__k.forEach(et);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function un(n, e, t) {
|
|
208
208
|
for (var i = 0; i < t.length; i++)
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
ct(t[i], t[++i], t[++i]);
|
|
210
|
+
C.__c && C.__c(e, n), n.some(function(s) {
|
|
211
211
|
try {
|
|
212
212
|
n = s.__h, s.__h = [], n.some(function(a) {
|
|
213
213
|
a.call(s);
|
|
214
214
|
});
|
|
215
215
|
} catch (a) {
|
|
216
|
-
|
|
216
|
+
C.__e(a, s.__v);
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n :
|
|
220
|
+
function hn(n) {
|
|
221
|
+
return typeof n != "object" || n == null || n.__b && n.__b > 0 ? n : Ae(n) ? n.map(hn) : Y({}, n);
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
var h, d, l, f, _, p, m,
|
|
225
|
-
if (
|
|
223
|
+
function Vn(n, e, t, i, s, a, o, r, u) {
|
|
224
|
+
var h, d, l, f, _, p, m, w = t.props, g = e.props, v = e.type;
|
|
225
|
+
if (v == "svg" ? s = "http://www.w3.org/2000/svg" : v == "math" ? s = "http://www.w3.org/1998/Math/MathML" : s || (s = "http://www.w3.org/1999/xhtml"), a != null) {
|
|
226
226
|
for (h = 0; h < a.length; h++)
|
|
227
|
-
if ((_ = a[h]) && "setAttribute" in _ == !!
|
|
227
|
+
if ((_ = a[h]) && "setAttribute" in _ == !!v && (v ? _.localName == v : _.nodeType == 3)) {
|
|
228
228
|
n = _, a[h] = null;
|
|
229
229
|
break;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
if (n == null) {
|
|
233
|
-
if (
|
|
234
|
-
return document.createTextNode(
|
|
235
|
-
n = document.createElementNS(s,
|
|
233
|
+
if (v == null)
|
|
234
|
+
return document.createTextNode(g);
|
|
235
|
+
n = document.createElementNS(s, v, g.is && g), r && (C.__m && C.__m(e, a), r = !1), a = null;
|
|
236
236
|
}
|
|
237
|
-
if (
|
|
238
|
-
|
|
237
|
+
if (v == null)
|
|
238
|
+
w === g || r && n.data == g || (n.data = g);
|
|
239
239
|
else {
|
|
240
|
-
if (a = a &&
|
|
241
|
-
for (
|
|
242
|
-
|
|
243
|
-
for (h in
|
|
244
|
-
if (_ =
|
|
240
|
+
if (a = a && Oe.call(n.childNodes), w = t.props || xe, !r && a != null)
|
|
241
|
+
for (w = {}, h = 0; h < n.attributes.length; h++)
|
|
242
|
+
w[(_ = n.attributes[h]).name] = _.value;
|
|
243
|
+
for (h in w)
|
|
244
|
+
if (_ = w[h], h != "children") {
|
|
245
245
|
if (h == "dangerouslySetInnerHTML")
|
|
246
246
|
l = _;
|
|
247
|
-
else if (!(h in
|
|
248
|
-
if (h == "value" && "defaultValue" in
|
|
247
|
+
else if (!(h in g)) {
|
|
248
|
+
if (h == "value" && "defaultValue" in g || h == "checked" && "defaultChecked" in g)
|
|
249
249
|
continue;
|
|
250
250
|
ke(n, h, null, _, s);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
for (h in
|
|
254
|
-
_ =
|
|
253
|
+
for (h in g)
|
|
254
|
+
_ = g[h], h == "children" ? f = _ : h == "dangerouslySetInnerHTML" ? d = _ : h == "value" ? p = _ : h == "checked" ? m = _ : r && typeof _ != "function" || w[h] === _ || ke(n, h, _, w[h], s);
|
|
255
255
|
if (d)
|
|
256
256
|
r || l && (d.__html == l.__html || d.__html == n.innerHTML) || (n.innerHTML = d.__html), e.__k = [];
|
|
257
|
-
else if (l && (n.innerHTML = ""),
|
|
257
|
+
else if (l && (n.innerHTML = ""), cn(e.type == "template" ? n.content : n, Ae(f) ? f : [f], e, t, i, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : s, a, o, a ? a[0] : t.__k && pe(t, 0), r, u), a != null)
|
|
258
258
|
for (h = a.length; h--; )
|
|
259
|
-
|
|
260
|
-
r || (h = "value",
|
|
259
|
+
at(a[h]);
|
|
260
|
+
r || (h = "value", v == "progress" && p == null ? n.removeAttribute("value") : p != null && (p !== n[h] || v == "progress" && !p || v == "option" && p != w[h]) && ke(n, h, p, w[h], s), h = "checked", m != null && m != n[h] && ke(n, h, m, w[h], s));
|
|
261
261
|
}
|
|
262
262
|
return n;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function ct(n, e, t) {
|
|
265
265
|
try {
|
|
266
266
|
if (typeof n == "function") {
|
|
267
267
|
var i = typeof n.__u == "function";
|
|
@@ -269,33 +269,33 @@ function at(n, e, t) {
|
|
|
269
269
|
} else
|
|
270
270
|
n.current = e;
|
|
271
271
|
} catch (s) {
|
|
272
|
-
|
|
272
|
+
C.__e(s, t);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function dn(n, e, t) {
|
|
276
276
|
var i, s;
|
|
277
|
-
if (
|
|
277
|
+
if (C.unmount && C.unmount(n), (i = n.ref) && (i.current && i.current != n.__e || ct(i, null, e)), (i = n.__c) != null) {
|
|
278
278
|
if (i.componentWillUnmount)
|
|
279
279
|
try {
|
|
280
280
|
i.componentWillUnmount();
|
|
281
281
|
} catch (a) {
|
|
282
|
-
|
|
282
|
+
C.__e(a, e);
|
|
283
283
|
}
|
|
284
284
|
i.base = i.__P = null;
|
|
285
285
|
}
|
|
286
286
|
if (i = n.__k)
|
|
287
287
|
for (s = 0; s < i.length; s++)
|
|
288
|
-
i[s] &&
|
|
289
|
-
t ||
|
|
288
|
+
i[s] && dn(i[s], e, t || typeof n.type != "function");
|
|
289
|
+
t || at(n.__e), n.__c = n.__ = n.__e = void 0;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function qn(n, e, t) {
|
|
292
292
|
return this.constructor(n, t);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function ue(n, e, t) {
|
|
295
295
|
var i, s, a, o;
|
|
296
|
-
e == document && (e = document.documentElement),
|
|
296
|
+
e == document && (e = document.documentElement), C.__ && C.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, a = [], o = [], rt(e, n = (!i && t || e).__k = X(Z, null, [n]), s || xe, xe, e.namespaceURI, !i && t ? [t] : s ? null : e.firstChild ? Oe.call(e.childNodes) : null, a, !i && t ? t : s ? s.__e : e.firstChild, i, o), un(a, n, o);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Yn(n) {
|
|
299
299
|
function e(t) {
|
|
300
300
|
var i, s;
|
|
301
301
|
return this.getChildContext || (i = /* @__PURE__ */ new Set(), (s = {})[e.__c] = this, this.getChildContext = function() {
|
|
@@ -304,7 +304,7 @@ function qn(n) {
|
|
|
304
304
|
i = null;
|
|
305
305
|
}, this.shouldComponentUpdate = function(a) {
|
|
306
306
|
this.props.value != a.value && i.forEach(function(o) {
|
|
307
|
-
o.__e = !0,
|
|
307
|
+
o.__e = !0, Qe(o);
|
|
308
308
|
});
|
|
309
309
|
}, this.sub = function(a) {
|
|
310
310
|
i.add(a);
|
|
@@ -314,11 +314,11 @@ function qn(n) {
|
|
|
314
314
|
};
|
|
315
315
|
}), t.children;
|
|
316
316
|
}
|
|
317
|
-
return e.__c = "__cC" +
|
|
317
|
+
return e.__c = "__cC" + on++, e.__ = n, e.Provider = e.__l = (e.Consumer = function(t, i) {
|
|
318
318
|
return t.children(i);
|
|
319
319
|
}).contextType = e, e;
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
Oe = an.slice, C = { __e: function(n, e, t, i) {
|
|
322
322
|
for (var s, a, o; e = e.__; )
|
|
323
323
|
if ((s = e.__c) && !s.__)
|
|
324
324
|
try {
|
|
@@ -328,31 +328,31 @@ He = sn.slice, y = { __e: function(n, e, t, i) {
|
|
|
328
328
|
n = r;
|
|
329
329
|
}
|
|
330
330
|
throw n;
|
|
331
|
-
} },
|
|
331
|
+
} }, Qt = 0, en = function(n) {
|
|
332
332
|
return n != null && n.constructor == null;
|
|
333
|
-
},
|
|
333
|
+
}, F.prototype.setState = function(n, e) {
|
|
334
334
|
var t;
|
|
335
|
-
t = this.__s != null && this.__s != this.state ? this.__s : this.__s =
|
|
336
|
-
},
|
|
337
|
-
this.__v && (this.__e = !0, n && this.__h.push(n),
|
|
338
|
-
},
|
|
335
|
+
t = this.__s != null && this.__s != this.state ? this.__s : this.__s = Y({}, this.state), typeof n == "function" && (n = n(Y({}, t), this.props)), n && Y(t, n), n != null && this.__v && (e && this._sb.push(e), Qe(this));
|
|
336
|
+
}, F.prototype.forceUpdate = function(n) {
|
|
337
|
+
this.__v && (this.__e = !0, n && this.__h.push(n), Qe(this));
|
|
338
|
+
}, F.prototype.render = Z, ie = [], tn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, nn = function(n, e) {
|
|
339
339
|
return n.__v.__b - e.__v.__b;
|
|
340
|
-
},
|
|
341
|
-
var
|
|
340
|
+
}, De.__r = 0, sn = /(PointerCapture)$|Capture$/i, ot = 0, Ke = _t(!1), Ge = _t(!0), on = 0;
|
|
341
|
+
var Xn = 0;
|
|
342
342
|
function c(n, e, t, i, s, a) {
|
|
343
343
|
e || (e = {});
|
|
344
344
|
var o, r, u = e;
|
|
345
345
|
if ("ref" in u)
|
|
346
346
|
for (r in u = {}, e)
|
|
347
347
|
r == "ref" ? o = e[r] : u[r] = e[r];
|
|
348
|
-
var h = { type: n, props: u, key: t, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --
|
|
348
|
+
var h = { type: n, props: u, key: t, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Xn, __i: -1, __u: 0, __source: s, __self: a };
|
|
349
349
|
if (typeof n == "function" && (o = n.defaultProps))
|
|
350
350
|
for (r in o)
|
|
351
351
|
u[r] === void 0 && (u[r] = o[r]);
|
|
352
|
-
return
|
|
352
|
+
return C.vnode && C.vnode(h), h;
|
|
353
353
|
}
|
|
354
|
-
const
|
|
355
|
-
function
|
|
354
|
+
const Zn = "ibiz", Jn = "is-";
|
|
355
|
+
function te(n, e, t, i, s) {
|
|
356
356
|
let a = "".concat(n, "-").concat(e);
|
|
357
357
|
return t && (a += "-".concat(t)), i && (a += "__".concat(i)), s && (a += "--".concat(s)), a;
|
|
358
358
|
}
|
|
@@ -373,8 +373,8 @@ class k {
|
|
|
373
373
|
* @date 2023-11-03 10:11:31
|
|
374
374
|
* @type {string}
|
|
375
375
|
*/
|
|
376
|
-
|
|
377
|
-
this.block = e, this.namespace = t ||
|
|
376
|
+
x(this, "namespace");
|
|
377
|
+
this.block = e, this.namespace = t || Zn;
|
|
378
378
|
}
|
|
379
379
|
/**
|
|
380
380
|
* namespace-block
|
|
@@ -386,7 +386,7 @@ class k {
|
|
|
386
386
|
* @return {*} {string}
|
|
387
387
|
*/
|
|
388
388
|
b(e = "") {
|
|
389
|
-
return
|
|
389
|
+
return te(this.namespace, this.block, e, "", "");
|
|
390
390
|
}
|
|
391
391
|
/**
|
|
392
392
|
* namespace-block__element
|
|
@@ -397,7 +397,7 @@ class k {
|
|
|
397
397
|
* @return {*} {string}
|
|
398
398
|
*/
|
|
399
399
|
e(e) {
|
|
400
|
-
return e ?
|
|
400
|
+
return e ? te(this.namespace, this.block, "", e, "") : "";
|
|
401
401
|
}
|
|
402
402
|
/**
|
|
403
403
|
* namespace-block--modifier
|
|
@@ -408,7 +408,7 @@ class k {
|
|
|
408
408
|
* @return {*} {string}
|
|
409
409
|
*/
|
|
410
410
|
m(e) {
|
|
411
|
-
return e ?
|
|
411
|
+
return e ? te(this.namespace, this.block, "", "", e) : "";
|
|
412
412
|
}
|
|
413
413
|
/**
|
|
414
414
|
* namespace-block-blockSuffix__element
|
|
@@ -420,7 +420,7 @@ class k {
|
|
|
420
420
|
* @return {*} {string}
|
|
421
421
|
*/
|
|
422
422
|
be(e, t) {
|
|
423
|
-
return e && t ?
|
|
423
|
+
return e && t ? te(this.namespace, this.block, e, t, "") : "";
|
|
424
424
|
}
|
|
425
425
|
/**
|
|
426
426
|
* namespace-block__element--modifier
|
|
@@ -432,7 +432,7 @@ class k {
|
|
|
432
432
|
* @return {*} {string}
|
|
433
433
|
*/
|
|
434
434
|
em(e, t) {
|
|
435
|
-
return e && t ?
|
|
435
|
+
return e && t ? te(this.namespace, this.block, "", e, t) : "";
|
|
436
436
|
}
|
|
437
437
|
/**
|
|
438
438
|
* namespace-block-blockSuffix--modifier
|
|
@@ -444,7 +444,7 @@ class k {
|
|
|
444
444
|
* @return {*} {string}
|
|
445
445
|
*/
|
|
446
446
|
bm(e, t) {
|
|
447
|
-
return e && t ?
|
|
447
|
+
return e && t ? te(this.namespace, this.block, e, "", t) : "";
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
450
|
* namespace-block-blockSuffix__element--modifier
|
|
@@ -457,7 +457,7 @@ class k {
|
|
|
457
457
|
* @return {*} {string}
|
|
458
458
|
*/
|
|
459
459
|
bem(e, t, i) {
|
|
460
|
-
return e && t && i ?
|
|
460
|
+
return e && t && i ? te(this.namespace, this.block, e, t, i) : "";
|
|
461
461
|
}
|
|
462
462
|
/**
|
|
463
463
|
* 返回状态 class
|
|
@@ -472,7 +472,7 @@ class k {
|
|
|
472
472
|
* @return {*} {string}
|
|
473
473
|
*/
|
|
474
474
|
is(e, t) {
|
|
475
|
-
return e && t ? "".concat(
|
|
475
|
+
return e && t ? "".concat(Jn).concat(e) : "";
|
|
476
476
|
}
|
|
477
477
|
/**
|
|
478
478
|
* 生成使用到的 css 变量 style 对象
|
|
@@ -525,11 +525,11 @@ class k {
|
|
|
525
525
|
return "--".concat(this.namespace, "-").concat(this.block, "-").concat(e);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function W(n) {
|
|
529
529
|
if (typeof n != "string")
|
|
530
530
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function gt(n, e) {
|
|
533
533
|
for (var t = "", i = 0, s = -1, a = 0, o, r = 0; r <= n.length; ++r) {
|
|
534
534
|
if (r < n.length)
|
|
535
535
|
o = n.charCodeAt(r);
|
|
@@ -562,7 +562,7 @@ function vt(n, e) {
|
|
|
562
562
|
}
|
|
563
563
|
return t;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function Kn(n, e) {
|
|
566
566
|
var t = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
|
|
567
567
|
return t ? t === e.root ? t + i : t + n + i : i;
|
|
568
568
|
}
|
|
@@ -571,30 +571,30 @@ var be = {
|
|
|
571
571
|
resolve: function() {
|
|
572
572
|
for (var e = "", t = !1, i, s = arguments.length - 1; s >= -1 && !t; s--) {
|
|
573
573
|
var a;
|
|
574
|
-
s >= 0 ? a = arguments[s] : (i === void 0 && (i = process.cwd()), a = i),
|
|
574
|
+
s >= 0 ? a = arguments[s] : (i === void 0 && (i = process.cwd()), a = i), W(a), a.length !== 0 && (e = a + "/" + e, t = a.charCodeAt(0) === 47);
|
|
575
575
|
}
|
|
576
|
-
return e =
|
|
576
|
+
return e = gt(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
577
577
|
},
|
|
578
578
|
normalize: function(e) {
|
|
579
|
-
if (
|
|
579
|
+
if (W(e), e.length === 0)
|
|
580
580
|
return ".";
|
|
581
581
|
var t = e.charCodeAt(0) === 47, i = e.charCodeAt(e.length - 1) === 47;
|
|
582
|
-
return e =
|
|
582
|
+
return e = gt(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && i && (e += "/"), t ? "/" + e : e;
|
|
583
583
|
},
|
|
584
584
|
isAbsolute: function(e) {
|
|
585
|
-
return
|
|
585
|
+
return W(e), e.length > 0 && e.charCodeAt(0) === 47;
|
|
586
586
|
},
|
|
587
587
|
join: function() {
|
|
588
588
|
if (arguments.length === 0)
|
|
589
589
|
return ".";
|
|
590
590
|
for (var e, t = 0; t < arguments.length; ++t) {
|
|
591
591
|
var i = arguments[t];
|
|
592
|
-
|
|
592
|
+
W(i), i.length > 0 && (e === void 0 ? e = i : e += "/" + i);
|
|
593
593
|
}
|
|
594
594
|
return e === void 0 ? "." : be.normalize(e);
|
|
595
595
|
},
|
|
596
596
|
relative: function(e, t) {
|
|
597
|
-
if (
|
|
597
|
+
if (W(e), W(t), e === t || (e = be.resolve(e), t = be.resolve(t), e === t))
|
|
598
598
|
return "";
|
|
599
599
|
for (var i = 1; i < e.length && e.charCodeAt(i) === 47; ++i)
|
|
600
600
|
;
|
|
@@ -625,7 +625,7 @@ var be = {
|
|
|
625
625
|
return e;
|
|
626
626
|
},
|
|
627
627
|
dirname: function(e) {
|
|
628
|
-
if (
|
|
628
|
+
if (W(e), e.length === 0)
|
|
629
629
|
return ".";
|
|
630
630
|
for (var t = e.charCodeAt(0), i = t === 47, s = -1, a = !0, o = e.length - 1; o >= 1; --o)
|
|
631
631
|
if (t = e.charCodeAt(o), t === 47) {
|
|
@@ -640,7 +640,7 @@ var be = {
|
|
|
640
640
|
basename: function(e, t) {
|
|
641
641
|
if (t !== void 0 && typeof t != "string")
|
|
642
642
|
throw new TypeError('"ext" argument must be a string');
|
|
643
|
-
|
|
643
|
+
W(e);
|
|
644
644
|
var i = 0, s = -1, a = !0, o;
|
|
645
645
|
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
646
646
|
if (t.length === e.length && t === e)
|
|
@@ -670,7 +670,7 @@ var be = {
|
|
|
670
670
|
}
|
|
671
671
|
},
|
|
672
672
|
extname: function(e) {
|
|
673
|
-
|
|
673
|
+
W(e);
|
|
674
674
|
for (var t = -1, i = 0, s = -1, a = !0, o = 0, r = e.length - 1; r >= 0; --r) {
|
|
675
675
|
var u = e.charCodeAt(r);
|
|
676
676
|
if (u === 47) {
|
|
@@ -689,10 +689,10 @@ var be = {
|
|
|
689
689
|
format: function(e) {
|
|
690
690
|
if (e === null || typeof e != "object")
|
|
691
691
|
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
|
|
692
|
-
return
|
|
692
|
+
return Kn("/", e);
|
|
693
693
|
},
|
|
694
694
|
parse: function(e) {
|
|
695
|
-
|
|
695
|
+
W(e);
|
|
696
696
|
var t = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
697
697
|
if (e.length === 0)
|
|
698
698
|
return t;
|
|
@@ -718,17 +718,17 @@ var be = {
|
|
|
718
718
|
posix: null
|
|
719
719
|
};
|
|
720
720
|
be.posix = be;
|
|
721
|
-
function
|
|
721
|
+
function Q() {
|
|
722
722
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return "".concat(
|
|
724
|
+
function he() {
|
|
725
|
+
return "".concat(Q() + Q(), "-").concat(Q(), "-").concat(Q(), "-").concat(Q(), "-").concat(Q()).concat(Q()).concat(Q());
|
|
726
726
|
}
|
|
727
727
|
const Gn = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
728
|
-
function
|
|
728
|
+
function lt(n) {
|
|
729
729
|
return Gn.test(n);
|
|
730
730
|
}
|
|
731
|
-
class
|
|
731
|
+
class pn {
|
|
732
732
|
/**
|
|
733
733
|
* 拷贝文本
|
|
734
734
|
*
|
|
@@ -749,8 +749,8 @@ class hn {
|
|
|
749
749
|
* @private
|
|
750
750
|
* @type {(HTMLInputElement | null)}
|
|
751
751
|
*/
|
|
752
|
-
|
|
753
|
-
const
|
|
752
|
+
x(pn, "inputElement", null);
|
|
753
|
+
const y = class y {
|
|
754
754
|
/**
|
|
755
755
|
* 检查数据库是否存在
|
|
756
756
|
*
|
|
@@ -773,7 +773,7 @@ const b = class b {
|
|
|
773
773
|
*/
|
|
774
774
|
static async deleteDatabase(e) {
|
|
775
775
|
var t, i;
|
|
776
|
-
return
|
|
776
|
+
return y.lastLink && ((i = (t = y.lastLink).close) == null || i.call(t)), new Promise((s, a) => {
|
|
777
777
|
const o = indexedDB.deleteDatabase(e);
|
|
778
778
|
o.onsuccess = () => {
|
|
779
779
|
s(!0);
|
|
@@ -795,13 +795,13 @@ const b = class b {
|
|
|
795
795
|
* @memberof IndexedDBUtil
|
|
796
796
|
*/
|
|
797
797
|
static async checkTableExists(e, t) {
|
|
798
|
-
return await
|
|
798
|
+
return await y.checkDataBaseExists(e) ? new Promise((s, a) => {
|
|
799
799
|
const o = indexedDB.open(e);
|
|
800
800
|
o.onupgradeneeded = (r) => {
|
|
801
|
-
|
|
801
|
+
y.db = r.target.result, y.version = y.db.version;
|
|
802
802
|
}, o.onsuccess = (r) => {
|
|
803
|
-
|
|
804
|
-
const u =
|
|
803
|
+
y.db = r.target.result, y.lastLink = o.result;
|
|
804
|
+
const u = y.db.objectStoreNames.contains(t);
|
|
805
805
|
o.result.close(), s(u);
|
|
806
806
|
}, o.onerror = (r) => {
|
|
807
807
|
a(r.target.error);
|
|
@@ -820,15 +820,15 @@ const b = class b {
|
|
|
820
820
|
static async createTable(e, t, i, s = !1) {
|
|
821
821
|
return new Promise((a) => {
|
|
822
822
|
var r, u;
|
|
823
|
-
|
|
824
|
-
const o = indexedDB.open(e,
|
|
823
|
+
y.version += 1, y.lastLink && ((u = (r = y.lastLink).close) == null || u.call(r));
|
|
824
|
+
const o = indexedDB.open(e, y.version);
|
|
825
825
|
o.onupgradeneeded = (h) => {
|
|
826
|
-
if (
|
|
826
|
+
if (y.db = h.target.result, !y.db.objectStoreNames.contains(t)) {
|
|
827
827
|
const d = {};
|
|
828
|
-
i ? d.keyPath = i : s && (d.autoIncrement = !0),
|
|
828
|
+
i ? d.keyPath = i : s && (d.autoIncrement = !0), y.db.createObjectStore(t, d);
|
|
829
829
|
}
|
|
830
830
|
}, o.onsuccess = () => {
|
|
831
|
-
|
|
831
|
+
y.lastLink = o.result, o.result.close(), a(!0);
|
|
832
832
|
}, o.onerror = () => {
|
|
833
833
|
a(!1);
|
|
834
834
|
};
|
|
@@ -844,12 +844,12 @@ const b = class b {
|
|
|
844
844
|
static async deleteTable(e, t) {
|
|
845
845
|
return new Promise((i) => {
|
|
846
846
|
var a, o;
|
|
847
|
-
|
|
848
|
-
const s = indexedDB.open(e,
|
|
847
|
+
y.version += 1, y.lastLink && ((o = (a = y.lastLink).close) == null || o.call(a));
|
|
848
|
+
const s = indexedDB.open(e, y.version);
|
|
849
849
|
s.onupgradeneeded = (r) => {
|
|
850
|
-
|
|
850
|
+
y.db = r.target.result, y.lastLink = s.result, y.db.objectStoreNames.contains(t) && y.db.deleteObjectStore(t);
|
|
851
851
|
}, s.onsuccess = (r) => {
|
|
852
|
-
|
|
852
|
+
y.db = r.target.result, y.lastLink = s.result, s.result.close(), i(!0);
|
|
853
853
|
}, s.onerror = () => {
|
|
854
854
|
s.result.close(), i(!1);
|
|
855
855
|
};
|
|
@@ -867,8 +867,8 @@ const b = class b {
|
|
|
867
867
|
return new Promise((s, a) => {
|
|
868
868
|
const o = indexedDB.open(e);
|
|
869
869
|
o.onsuccess = (r) => {
|
|
870
|
-
if (
|
|
871
|
-
const d =
|
|
870
|
+
if (y.db = r.target.result, y.lastLink = o.result, y.db.objectStoreNames.contains(t)) {
|
|
871
|
+
const d = y.db.transaction(
|
|
872
872
|
[t],
|
|
873
873
|
"readwrite"
|
|
874
874
|
).objectStore(t).add(i);
|
|
@@ -896,8 +896,8 @@ const b = class b {
|
|
|
896
896
|
return new Promise((s, a) => {
|
|
897
897
|
const o = indexedDB.open(e);
|
|
898
898
|
o.onsuccess = (r) => {
|
|
899
|
-
if (
|
|
900
|
-
const d =
|
|
899
|
+
if (y.db = r.target.result, y.lastLink = o.result, y.db.objectStoreNames.contains(t)) {
|
|
900
|
+
const d = y.db.transaction(
|
|
901
901
|
[t],
|
|
902
902
|
"readwrite"
|
|
903
903
|
).objectStore(t).delete(i);
|
|
@@ -925,8 +925,8 @@ const b = class b {
|
|
|
925
925
|
return new Promise((s, a) => {
|
|
926
926
|
const o = indexedDB.open(e);
|
|
927
927
|
o.onsuccess = (r) => {
|
|
928
|
-
if (
|
|
929
|
-
const d =
|
|
928
|
+
if (y.db = r.target.result, y.lastLink = o.result, y.db.objectStoreNames.contains(t)) {
|
|
929
|
+
const d = y.db.transaction(
|
|
930
930
|
[t],
|
|
931
931
|
"readwrite"
|
|
932
932
|
).objectStore(t).put(i);
|
|
@@ -954,8 +954,8 @@ const b = class b {
|
|
|
954
954
|
return new Promise((s, a) => {
|
|
955
955
|
const o = indexedDB.open(e);
|
|
956
956
|
o.onsuccess = (r) => {
|
|
957
|
-
if (
|
|
958
|
-
const d =
|
|
957
|
+
if (y.db = r.target.result, y.lastLink = o.result, y.db.objectStoreNames.contains(t)) {
|
|
958
|
+
const d = y.db.transaction(
|
|
959
959
|
[t],
|
|
960
960
|
"readonly"
|
|
961
961
|
).objectStore(t).get(i);
|
|
@@ -982,8 +982,8 @@ const b = class b {
|
|
|
982
982
|
return new Promise((i, s) => {
|
|
983
983
|
const a = indexedDB.open(e);
|
|
984
984
|
a.onsuccess = (o) => {
|
|
985
|
-
if (
|
|
986
|
-
const h =
|
|
985
|
+
if (y.db = o.target.result, y.lastLink = a.result, y.db.objectStoreNames.contains(t)) {
|
|
986
|
+
const h = y.db.transaction(
|
|
987
987
|
[t],
|
|
988
988
|
"readonly"
|
|
989
989
|
).objectStore(t).getAll();
|
|
@@ -1001,10 +1001,10 @@ const b = class b {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
};
|
|
1003
1003
|
// 数据库版本
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
let
|
|
1004
|
+
x(y, "version", 1), // 数据库连接句柄
|
|
1005
|
+
x(y, "db", null), // 上一个连接
|
|
1006
|
+
x(y, "lastLink");
|
|
1007
|
+
let R = y;
|
|
1008
1008
|
class Qn {
|
|
1009
1009
|
/**
|
|
1010
1010
|
* Creates an instance of FileUploader.
|
|
@@ -1013,7 +1013,7 @@ class Qn {
|
|
|
1013
1013
|
* @param {FileUploaderOptions<T>} options
|
|
1014
1014
|
*/
|
|
1015
1015
|
constructor(e) {
|
|
1016
|
-
|
|
1016
|
+
x(this, "options");
|
|
1017
1017
|
this.options = {
|
|
1018
1018
|
multiple: !0,
|
|
1019
1019
|
accept: "*/*",
|
|
@@ -1081,7 +1081,7 @@ class Qn {
|
|
|
1081
1081
|
return "".concat((e / 1024 ** i).toFixed(2), " ").concat(t[i]);
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
|
-
class
|
|
1084
|
+
class fn {
|
|
1085
1085
|
/**
|
|
1086
1086
|
* 从XML元素中提取CDATA内容
|
|
1087
1087
|
*
|
|
@@ -1190,7 +1190,7 @@ class dn {
|
|
|
1190
1190
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
|
-
class
|
|
1193
|
+
class ei {
|
|
1194
1194
|
/**
|
|
1195
1195
|
* 从XML元素中提取CDATA内容
|
|
1196
1196
|
*
|
|
@@ -1301,14 +1301,14 @@ class Kn {
|
|
|
1301
1301
|
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function tt(n) {
|
|
1305
1305
|
return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function vn(n, e, t, i) {
|
|
1308
1308
|
const s = n / window.innerWidth, a = e / window.innerHeight, o = Math.max(0, Math.min(s, 1 - t)), r = Math.max(0, Math.min(a, 1 - i));
|
|
1309
1309
|
return { x: o, y: r };
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function mn(n) {
|
|
1312
1312
|
let e = 0;
|
|
1313
1313
|
for (let t = 0; t < n.length; t++) {
|
|
1314
1314
|
const i = n.charCodeAt(t);
|
|
@@ -1316,20 +1316,20 @@ function fn(n) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
return Math.abs(e).toString(36).toUpperCase();
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function _n(n) {
|
|
1320
1320
|
let e = 2166136261;
|
|
1321
1321
|
for (let t = 0; t < n.length; t++)
|
|
1322
1322
|
e ^= n.charCodeAt(t), e += (e << 1) + (e << 4) + (e << 7) + (e << 8) + (e << 24);
|
|
1323
1323
|
return Math.abs(e).toString(36).toUpperCase();
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function gn(n) {
|
|
1326
1326
|
let e = 5381;
|
|
1327
1327
|
for (let t = 0; t < n.length; t++)
|
|
1328
1328
|
e = (e << 5) + e + n.charCodeAt(t);
|
|
1329
1329
|
return Math.abs(e).toString(36).toUpperCase();
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1332
|
-
const e =
|
|
1331
|
+
function ti(n) {
|
|
1332
|
+
const e = mn(n), t = _n(n), i = gn(n), s = e + t + i;
|
|
1333
1333
|
let a = "";
|
|
1334
1334
|
for (let o = 0; o < n.length % 10 + 10; o++) {
|
|
1335
1335
|
const r = o * 7 % s.length;
|
|
@@ -1337,38 +1337,38 @@ function ei(n) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
return a.toUpperCase();
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function wt(n) {
|
|
1341
1341
|
return n.replace(/[^A-Z0-9]/g, "");
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function wn(n, e) {
|
|
1344
1344
|
switch (e) {
|
|
1345
1345
|
case "fnv1a":
|
|
1346
|
-
return
|
|
1346
|
+
return _n(n);
|
|
1347
1347
|
case "djb2":
|
|
1348
|
-
return
|
|
1348
|
+
return gn(n);
|
|
1349
1349
|
case "combined":
|
|
1350
|
-
return
|
|
1350
|
+
return ti(n);
|
|
1351
1351
|
case "simple":
|
|
1352
1352
|
default:
|
|
1353
|
-
return
|
|
1353
|
+
return mn(n);
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
const t =
|
|
1356
|
+
function ni(n, e = 36) {
|
|
1357
|
+
const t = wt(n);
|
|
1358
1358
|
if (t.length >= e)
|
|
1359
1359
|
return t.substring(0, e);
|
|
1360
1360
|
let i = t;
|
|
1361
1361
|
for (; i.length < e; )
|
|
1362
|
-
i +=
|
|
1363
|
-
|
|
1362
|
+
i += wt(
|
|
1363
|
+
wn(i, "combined")
|
|
1364
1364
|
);
|
|
1365
1365
|
return i.substring(0, e);
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1368
|
-
const t =
|
|
1369
|
-
return
|
|
1367
|
+
function yt(n, e = 36) {
|
|
1368
|
+
const t = wn(n, "combined");
|
|
1369
|
+
return ni(t, e);
|
|
1370
1370
|
}
|
|
1371
|
-
class
|
|
1371
|
+
class ii {
|
|
1372
1372
|
/**
|
|
1373
1373
|
* @description 解析工具调用
|
|
1374
1374
|
* @static
|
|
@@ -1397,21 +1397,21 @@ class ni {
|
|
|
1397
1397
|
return s;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
var
|
|
1401
|
-
function
|
|
1402
|
-
|
|
1403
|
-
var t =
|
|
1400
|
+
var fe, N, We, bt, Se = 0, yn = [], M = C, Ct = M.__b, Tt = M.__r, xt = M.diffed, St = M.__c, At = M.unmount, kt = M.__;
|
|
1401
|
+
function Be(n, e) {
|
|
1402
|
+
M.__h && M.__h(N, n, Se || e), Se = 0;
|
|
1403
|
+
var t = N.__H || (N.__H = { __: [], __h: [] });
|
|
1404
1404
|
return n >= t.__.length && t.__.push({}), t.__[n];
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1407
|
-
return
|
|
1406
|
+
function V(n) {
|
|
1407
|
+
return Se = 1, si(Cn, n);
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
var i =
|
|
1411
|
-
if (i.t = n, !i.__c && (i.__ = [t ? t(e) :
|
|
1409
|
+
function si(n, e, t) {
|
|
1410
|
+
var i = Be(fe++, 2);
|
|
1411
|
+
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : Cn(void 0, e), function(r) {
|
|
1412
1412
|
var u = i.__N ? i.__N[0] : i.__[0], h = i.t(u, r);
|
|
1413
1413
|
u !== h && (i.__N = [h, i.__[1]], i.__c.setState({}));
|
|
1414
|
-
}], i.__c =
|
|
1414
|
+
}], i.__c = N, !N.__f)) {
|
|
1415
1415
|
var s = function(r, u, h) {
|
|
1416
1416
|
if (!i.__c.__H)
|
|
1417
1417
|
return !0;
|
|
@@ -1430,121 +1430,121 @@ function ii(n, e, t) {
|
|
|
1430
1430
|
}
|
|
1431
1431
|
}), a && a.call(this, r, u, h) || l;
|
|
1432
1432
|
};
|
|
1433
|
-
|
|
1434
|
-
var a =
|
|
1435
|
-
|
|
1433
|
+
N.__f = !0;
|
|
1434
|
+
var a = N.shouldComponentUpdate, o = N.componentWillUpdate;
|
|
1435
|
+
N.componentWillUpdate = function(r, u, h) {
|
|
1436
1436
|
if (this.__e) {
|
|
1437
1437
|
var d = a;
|
|
1438
1438
|
a = void 0, s(r, u, h), a = d;
|
|
1439
1439
|
}
|
|
1440
1440
|
o && o.call(this, r, u, h);
|
|
1441
|
-
},
|
|
1441
|
+
}, N.shouldComponentUpdate = s;
|
|
1442
1442
|
}
|
|
1443
1443
|
return i.__N || i.__;
|
|
1444
1444
|
}
|
|
1445
1445
|
function D(n, e) {
|
|
1446
|
-
var t =
|
|
1447
|
-
!
|
|
1446
|
+
var t = Be(fe++, 3);
|
|
1447
|
+
!M.__s && bn(t.__H, e) && (t.__ = n, t.u = e, N.__H.__h.push(t));
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
return
|
|
1449
|
+
function O(n) {
|
|
1450
|
+
return Se = 5, J(function() {
|
|
1451
1451
|
return { current: n };
|
|
1452
1452
|
}, []);
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1455
|
-
var t =
|
|
1454
|
+
function J(n, e) {
|
|
1455
|
+
var t = Be(fe++, 7);
|
|
1456
1456
|
return bn(t.__H, e) && (t.__ = n(), t.__H = e, t.__h = n), t.__;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1459
|
-
return
|
|
1458
|
+
function je(n, e) {
|
|
1459
|
+
return Se = 8, J(function() {
|
|
1460
1460
|
return n;
|
|
1461
1461
|
}, e);
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
var e =
|
|
1465
|
-
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(
|
|
1463
|
+
function ut(n) {
|
|
1464
|
+
var e = N.context[n.__c], t = Be(fe++, 9);
|
|
1465
|
+
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(N)), e.props.value) : n.__;
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1468
|
-
for (var n; n =
|
|
1467
|
+
function oi() {
|
|
1468
|
+
for (var n; n = yn.shift(); )
|
|
1469
1469
|
if (n.__P && n.__H)
|
|
1470
1470
|
try {
|
|
1471
|
-
n.__H.__h.forEach(
|
|
1471
|
+
n.__H.__h.forEach(Me), n.__H.__h.forEach(nt), n.__H.__h = [];
|
|
1472
1472
|
} catch (e) {
|
|
1473
|
-
n.__H.__h = [],
|
|
1473
|
+
n.__H.__h = [], M.__e(e, n.__v);
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
},
|
|
1479
|
-
n && e.__k && e.__k.__m && (n.__m = e.__k.__m),
|
|
1480
|
-
},
|
|
1481
|
-
|
|
1482
|
-
var e = (
|
|
1483
|
-
e && (
|
|
1476
|
+
M.__b = function(n) {
|
|
1477
|
+
N = null, Ct && Ct(n);
|
|
1478
|
+
}, M.__ = function(n, e) {
|
|
1479
|
+
n && e.__k && e.__k.__m && (n.__m = e.__k.__m), kt && kt(n, e);
|
|
1480
|
+
}, M.__r = function(n) {
|
|
1481
|
+
Tt && Tt(n), fe = 0;
|
|
1482
|
+
var e = (N = n.__c).__H;
|
|
1483
|
+
e && (We === N ? (e.__h = [], N.__h = [], e.__.forEach(function(t) {
|
|
1484
1484
|
t.__N && (t.__ = t.__N), t.u = t.__N = void 0;
|
|
1485
|
-
})) : (e.__h.forEach(
|
|
1486
|
-
},
|
|
1487
|
-
|
|
1485
|
+
})) : (e.__h.forEach(Me), e.__h.forEach(nt), e.__h = [], fe = 0)), We = N;
|
|
1486
|
+
}, M.diffed = function(n) {
|
|
1487
|
+
xt && xt(n);
|
|
1488
1488
|
var e = n.__c;
|
|
1489
|
-
e && e.__H && (e.__H.__h.length && (
|
|
1489
|
+
e && e.__H && (e.__H.__h.length && (yn.push(e) !== 1 && bt === M.requestAnimationFrame || ((bt = M.requestAnimationFrame) || ai)(oi)), e.__H.__.forEach(function(t) {
|
|
1490
1490
|
t.u && (t.__H = t.u), t.u = void 0;
|
|
1491
|
-
})),
|
|
1492
|
-
},
|
|
1491
|
+
})), We = N = null;
|
|
1492
|
+
}, M.__c = function(n, e) {
|
|
1493
1493
|
e.some(function(t) {
|
|
1494
1494
|
try {
|
|
1495
|
-
t.__h.forEach(
|
|
1496
|
-
return !i.__ ||
|
|
1495
|
+
t.__h.forEach(Me), t.__h = t.__h.filter(function(i) {
|
|
1496
|
+
return !i.__ || nt(i);
|
|
1497
1497
|
});
|
|
1498
1498
|
} catch (i) {
|
|
1499
1499
|
e.some(function(s) {
|
|
1500
1500
|
s.__h && (s.__h = []);
|
|
1501
|
-
}), e = [],
|
|
1501
|
+
}), e = [], M.__e(i, t.__v);
|
|
1502
1502
|
}
|
|
1503
|
-
}),
|
|
1504
|
-
},
|
|
1505
|
-
|
|
1503
|
+
}), St && St(n, e);
|
|
1504
|
+
}, M.unmount = function(n) {
|
|
1505
|
+
At && At(n);
|
|
1506
1506
|
var e, t = n.__c;
|
|
1507
1507
|
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
1508
1508
|
try {
|
|
1509
|
-
|
|
1509
|
+
Me(i);
|
|
1510
1510
|
} catch (s) {
|
|
1511
1511
|
e = s;
|
|
1512
1512
|
}
|
|
1513
|
-
}), t.__H = void 0, e &&
|
|
1513
|
+
}), t.__H = void 0, e && M.__e(e, t.__v));
|
|
1514
1514
|
};
|
|
1515
|
-
var
|
|
1516
|
-
function
|
|
1515
|
+
var It = typeof requestAnimationFrame == "function";
|
|
1516
|
+
function ai(n) {
|
|
1517
1517
|
var e, t = function() {
|
|
1518
|
-
clearTimeout(i),
|
|
1518
|
+
clearTimeout(i), It && cancelAnimationFrame(e), setTimeout(n);
|
|
1519
1519
|
}, i = setTimeout(t, 35);
|
|
1520
|
-
|
|
1520
|
+
It && (e = requestAnimationFrame(t));
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1523
|
-
var e =
|
|
1524
|
-
typeof t == "function" && (n.__c = void 0, t()),
|
|
1522
|
+
function Me(n) {
|
|
1523
|
+
var e = N, t = n.__c;
|
|
1524
|
+
typeof t == "function" && (n.__c = void 0, t()), N = e;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1527
|
-
var e =
|
|
1528
|
-
n.__c = n.__(),
|
|
1526
|
+
function nt(n) {
|
|
1527
|
+
var e = N;
|
|
1528
|
+
n.__c = n.__(), N = e;
|
|
1529
1529
|
}
|
|
1530
1530
|
function bn(n, e) {
|
|
1531
1531
|
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
1532
1532
|
return t !== n[i];
|
|
1533
1533
|
});
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function Cn(n, e) {
|
|
1536
1536
|
return typeof e == "function" ? e(n) : e;
|
|
1537
1537
|
}
|
|
1538
|
-
var
|
|
1539
|
-
function
|
|
1540
|
-
if (
|
|
1541
|
-
|
|
1538
|
+
var ri = Symbol.for("preact-signals");
|
|
1539
|
+
function ht() {
|
|
1540
|
+
if (de > 1)
|
|
1541
|
+
de--;
|
|
1542
1542
|
else {
|
|
1543
|
-
for (var n, e = !1;
|
|
1544
|
-
var t =
|
|
1545
|
-
for (
|
|
1543
|
+
for (var n, e = !1; Ce !== void 0; ) {
|
|
1544
|
+
var t = Ce;
|
|
1545
|
+
for (Ce = void 0, it++; t !== void 0; ) {
|
|
1546
1546
|
var i = t.o;
|
|
1547
|
-
if (t.o = void 0, t.f &= -3, !(8 & t.f) &&
|
|
1547
|
+
if (t.o = void 0, t.f &= -3, !(8 & t.f) && Sn(t))
|
|
1548
1548
|
try {
|
|
1549
1549
|
t.c();
|
|
1550
1550
|
} catch (s) {
|
|
@@ -1553,110 +1553,110 @@ function ct() {
|
|
|
1553
1553
|
t = i;
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
|
-
if (
|
|
1556
|
+
if (it = 0, de--, e)
|
|
1557
1557
|
throw n;
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
|
-
var
|
|
1561
|
-
function
|
|
1562
|
-
var e =
|
|
1563
|
-
|
|
1560
|
+
var A = void 0;
|
|
1561
|
+
function Tn(n) {
|
|
1562
|
+
var e = A;
|
|
1563
|
+
A = void 0;
|
|
1564
1564
|
try {
|
|
1565
1565
|
return n();
|
|
1566
1566
|
} finally {
|
|
1567
|
-
|
|
1567
|
+
A = e;
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
|
-
var
|
|
1571
|
-
function
|
|
1572
|
-
if (
|
|
1570
|
+
var Ce = void 0, de = 0, it = 0, He = 0;
|
|
1571
|
+
function xn(n) {
|
|
1572
|
+
if (A !== void 0) {
|
|
1573
1573
|
var e = n.n;
|
|
1574
|
-
if (e === void 0 || e.t !==
|
|
1575
|
-
return e = { i: 0, S: n, p:
|
|
1574
|
+
if (e === void 0 || e.t !== A)
|
|
1575
|
+
return e = { i: 0, S: n, p: A.s, n: void 0, t: A, e: void 0, x: void 0, r: e }, A.s !== void 0 && (A.s.n = e), A.s = e, n.n = e, 32 & A.f && n.S(e), e;
|
|
1576
1576
|
if (e.i === -1)
|
|
1577
|
-
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p =
|
|
1577
|
+
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = A.s, e.n = void 0, A.s.n = e, A.s = e), e;
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function H(n, e) {
|
|
1581
1581
|
this.v = n, this.i = 0, this.n = void 0, this.t = void 0, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched, this.name = e == null ? void 0 : e.name;
|
|
1582
1582
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1583
|
+
H.prototype.brand = ri;
|
|
1584
|
+
H.prototype.h = function() {
|
|
1585
1585
|
return !0;
|
|
1586
1586
|
};
|
|
1587
|
-
|
|
1587
|
+
H.prototype.S = function(n) {
|
|
1588
1588
|
var e = this, t = this.t;
|
|
1589
|
-
t !== n && n.e === void 0 && (n.x = t, this.t = n, t !== void 0 ? t.e = n :
|
|
1589
|
+
t !== n && n.e === void 0 && (n.x = t, this.t = n, t !== void 0 ? t.e = n : Tn(function() {
|
|
1590
1590
|
var i;
|
|
1591
1591
|
(i = e.W) == null || i.call(e);
|
|
1592
1592
|
}));
|
|
1593
1593
|
};
|
|
1594
|
-
|
|
1594
|
+
H.prototype.U = function(n) {
|
|
1595
1595
|
var e = this;
|
|
1596
1596
|
if (this.t !== void 0) {
|
|
1597
1597
|
var t = n.e, i = n.x;
|
|
1598
|
-
t !== void 0 && (t.x = i, n.e = void 0), i !== void 0 && (i.e = t, n.x = void 0), n === this.t && (this.t = i, i === void 0 &&
|
|
1598
|
+
t !== void 0 && (t.x = i, n.e = void 0), i !== void 0 && (i.e = t, n.x = void 0), n === this.t && (this.t = i, i === void 0 && Tn(function() {
|
|
1599
1599
|
var s;
|
|
1600
1600
|
(s = e.Z) == null || s.call(e);
|
|
1601
1601
|
}));
|
|
1602
1602
|
}
|
|
1603
1603
|
};
|
|
1604
|
-
|
|
1604
|
+
H.prototype.subscribe = function(n) {
|
|
1605
1605
|
var e = this;
|
|
1606
|
-
return
|
|
1607
|
-
var t = e.value, i =
|
|
1608
|
-
|
|
1606
|
+
return pt(function() {
|
|
1607
|
+
var t = e.value, i = A;
|
|
1608
|
+
A = void 0;
|
|
1609
1609
|
try {
|
|
1610
1610
|
n(t);
|
|
1611
1611
|
} finally {
|
|
1612
|
-
|
|
1612
|
+
A = i;
|
|
1613
1613
|
}
|
|
1614
1614
|
}, { name: "sub" });
|
|
1615
1615
|
};
|
|
1616
|
-
|
|
1616
|
+
H.prototype.valueOf = function() {
|
|
1617
1617
|
return this.value;
|
|
1618
1618
|
};
|
|
1619
|
-
|
|
1619
|
+
H.prototype.toString = function() {
|
|
1620
1620
|
return this.value + "";
|
|
1621
1621
|
};
|
|
1622
|
-
|
|
1622
|
+
H.prototype.toJSON = function() {
|
|
1623
1623
|
return this.value;
|
|
1624
1624
|
};
|
|
1625
|
-
|
|
1626
|
-
var n =
|
|
1627
|
-
|
|
1625
|
+
H.prototype.peek = function() {
|
|
1626
|
+
var n = A;
|
|
1627
|
+
A = void 0;
|
|
1628
1628
|
try {
|
|
1629
1629
|
return this.value;
|
|
1630
1630
|
} finally {
|
|
1631
|
-
|
|
1631
|
+
A = n;
|
|
1632
1632
|
}
|
|
1633
1633
|
};
|
|
1634
|
-
Object.defineProperty(
|
|
1635
|
-
var n =
|
|
1634
|
+
Object.defineProperty(H.prototype, "value", { get: function() {
|
|
1635
|
+
var n = xn(this);
|
|
1636
1636
|
return n !== void 0 && (n.i = this.i), this.v;
|
|
1637
1637
|
}, set: function(n) {
|
|
1638
1638
|
if (n !== this.v) {
|
|
1639
|
-
if (
|
|
1639
|
+
if (it > 100)
|
|
1640
1640
|
throw new Error("Cycle detected");
|
|
1641
|
-
this.v = n, this.i++,
|
|
1641
|
+
this.v = n, this.i++, He++, de++;
|
|
1642
1642
|
try {
|
|
1643
1643
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
1644
1644
|
e.t.N();
|
|
1645
1645
|
} finally {
|
|
1646
|
-
|
|
1646
|
+
ht();
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
1649
|
} });
|
|
1650
|
-
function
|
|
1651
|
-
return new
|
|
1650
|
+
function q(n, e) {
|
|
1651
|
+
return new H(n, e);
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function Sn(n) {
|
|
1654
1654
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1655
1655
|
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
|
|
1656
1656
|
return !0;
|
|
1657
1657
|
return !1;
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function An(n) {
|
|
1660
1660
|
for (var e = n.s; e !== void 0; e = e.n) {
|
|
1661
1661
|
var t = e.S.n;
|
|
1662
1662
|
if (t !== void 0 && (e.r = t), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -1672,89 +1672,89 @@ function kn(n) {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
n.s = t;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1676
|
-
|
|
1675
|
+
function se(n, e) {
|
|
1676
|
+
H.call(this, void 0), this.x = n, this.s = void 0, this.g = He - 1, this.f = 4, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched, this.name = e == null ? void 0 : e.name;
|
|
1677
1677
|
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1678
|
+
se.prototype = new H();
|
|
1679
|
+
se.prototype.h = function() {
|
|
1680
1680
|
if (this.f &= -3, 1 & this.f)
|
|
1681
1681
|
return !1;
|
|
1682
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
|
1682
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === He))
|
|
1683
1683
|
return !0;
|
|
1684
|
-
if (this.g =
|
|
1684
|
+
if (this.g = He, this.f |= 1, this.i > 0 && !Sn(this))
|
|
1685
1685
|
return this.f &= -2, !0;
|
|
1686
|
-
var n =
|
|
1686
|
+
var n = A;
|
|
1687
1687
|
try {
|
|
1688
|
-
|
|
1688
|
+
An(this), A = this;
|
|
1689
1689
|
var e = this.x();
|
|
1690
1690
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
1691
1691
|
} catch (t) {
|
|
1692
1692
|
this.v = t, this.f |= 16, this.i++;
|
|
1693
1693
|
}
|
|
1694
|
-
return
|
|
1694
|
+
return A = n, kn(this), this.f &= -2, !0;
|
|
1695
1695
|
};
|
|
1696
|
-
|
|
1696
|
+
se.prototype.S = function(n) {
|
|
1697
1697
|
if (this.t === void 0) {
|
|
1698
1698
|
this.f |= 36;
|
|
1699
1699
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1700
1700
|
e.S.S(e);
|
|
1701
1701
|
}
|
|
1702
|
-
|
|
1702
|
+
H.prototype.S.call(this, n);
|
|
1703
1703
|
};
|
|
1704
|
-
|
|
1705
|
-
if (this.t !== void 0 && (
|
|
1704
|
+
se.prototype.U = function(n) {
|
|
1705
|
+
if (this.t !== void 0 && (H.prototype.U.call(this, n), this.t === void 0)) {
|
|
1706
1706
|
this.f &= -33;
|
|
1707
1707
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1708
1708
|
e.S.U(e);
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
|
-
|
|
1711
|
+
se.prototype.N = function() {
|
|
1712
1712
|
if (!(2 & this.f)) {
|
|
1713
1713
|
this.f |= 6;
|
|
1714
1714
|
for (var n = this.t; n !== void 0; n = n.x)
|
|
1715
1715
|
n.t.N();
|
|
1716
1716
|
}
|
|
1717
1717
|
};
|
|
1718
|
-
Object.defineProperty(
|
|
1718
|
+
Object.defineProperty(se.prototype, "value", { get: function() {
|
|
1719
1719
|
if (1 & this.f)
|
|
1720
1720
|
throw new Error("Cycle detected");
|
|
1721
|
-
var n =
|
|
1721
|
+
var n = xn(this);
|
|
1722
1722
|
if (this.h(), n !== void 0 && (n.i = this.i), 16 & this.f)
|
|
1723
1723
|
throw this.v;
|
|
1724
1724
|
return this.v;
|
|
1725
1725
|
} });
|
|
1726
|
-
function
|
|
1727
|
-
return new
|
|
1726
|
+
function In(n, e) {
|
|
1727
|
+
return new se(n, e);
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function Nn(n) {
|
|
1730
1730
|
var e = n.u;
|
|
1731
1731
|
if (n.u = void 0, typeof e == "function") {
|
|
1732
|
-
|
|
1733
|
-
var t =
|
|
1734
|
-
|
|
1732
|
+
de++;
|
|
1733
|
+
var t = A;
|
|
1734
|
+
A = void 0;
|
|
1735
1735
|
try {
|
|
1736
1736
|
e();
|
|
1737
1737
|
} catch (i) {
|
|
1738
|
-
throw n.f &= -2, n.f |= 8,
|
|
1738
|
+
throw n.f &= -2, n.f |= 8, dt(n), i;
|
|
1739
1739
|
} finally {
|
|
1740
|
-
|
|
1740
|
+
A = t, ht();
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function dt(n) {
|
|
1745
1745
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
1746
1746
|
e.S.U(e);
|
|
1747
|
-
n.x = void 0, n.s = void 0,
|
|
1747
|
+
n.x = void 0, n.s = void 0, Nn(n);
|
|
1748
1748
|
}
|
|
1749
|
-
function
|
|
1750
|
-
if (
|
|
1749
|
+
function ci(n) {
|
|
1750
|
+
if (A !== this)
|
|
1751
1751
|
throw new Error("Out-of-order effect");
|
|
1752
|
-
kn(this),
|
|
1752
|
+
kn(this), A = n, this.f &= -2, 8 & this.f && dt(this), ht();
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function ve(n, e) {
|
|
1755
1755
|
this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e == null ? void 0 : e.name;
|
|
1756
1756
|
}
|
|
1757
|
-
|
|
1757
|
+
ve.prototype.c = function() {
|
|
1758
1758
|
var n = this.S();
|
|
1759
1759
|
try {
|
|
1760
1760
|
if (8 & this.f || this.x === void 0)
|
|
@@ -1765,24 +1765,24 @@ pe.prototype.c = function() {
|
|
|
1765
1765
|
n();
|
|
1766
1766
|
}
|
|
1767
1767
|
};
|
|
1768
|
-
|
|
1768
|
+
ve.prototype.S = function() {
|
|
1769
1769
|
if (1 & this.f)
|
|
1770
1770
|
throw new Error("Cycle detected");
|
|
1771
|
-
this.f |= 1, this.f &= -9,
|
|
1772
|
-
var n =
|
|
1773
|
-
return
|
|
1771
|
+
this.f |= 1, this.f &= -9, Nn(this), An(this), de++;
|
|
1772
|
+
var n = A;
|
|
1773
|
+
return A = this, ci.bind(this, n);
|
|
1774
1774
|
};
|
|
1775
|
-
|
|
1776
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
1775
|
+
ve.prototype.N = function() {
|
|
1776
|
+
2 & this.f || (this.f |= 2, this.o = Ce, Ce = this);
|
|
1777
1777
|
};
|
|
1778
|
-
|
|
1779
|
-
this.f |= 8, 1 & this.f ||
|
|
1778
|
+
ve.prototype.d = function() {
|
|
1779
|
+
this.f |= 8, 1 & this.f || dt(this);
|
|
1780
1780
|
};
|
|
1781
|
-
|
|
1781
|
+
ve.prototype.dispose = function() {
|
|
1782
1782
|
this.d();
|
|
1783
1783
|
};
|
|
1784
|
-
function
|
|
1785
|
-
var t = new
|
|
1784
|
+
function pt(n, e) {
|
|
1785
|
+
var t = new ve(n, e);
|
|
1786
1786
|
try {
|
|
1787
1787
|
t.c();
|
|
1788
1788
|
} catch (s) {
|
|
@@ -1791,18 +1791,18 @@ function ut(n, e) {
|
|
|
1791
1791
|
var i = t.d.bind(t);
|
|
1792
1792
|
return i[Symbol.dispose] = i, i;
|
|
1793
1793
|
}
|
|
1794
|
-
var
|
|
1795
|
-
function
|
|
1796
|
-
|
|
1794
|
+
var Pe, Ve;
|
|
1795
|
+
function me(n, e) {
|
|
1796
|
+
C[n] = e.bind(null, C[n] || function() {
|
|
1797
1797
|
});
|
|
1798
1798
|
}
|
|
1799
1799
|
function ze(n) {
|
|
1800
|
-
|
|
1800
|
+
Ve && Ve(), Ve = n && n.S();
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1803
|
-
var e = this, t = n.data, i =
|
|
1802
|
+
function $n(n) {
|
|
1803
|
+
var e = this, t = n.data, i = E(t);
|
|
1804
1804
|
i.value = t;
|
|
1805
|
-
var s =
|
|
1805
|
+
var s = J(function() {
|
|
1806
1806
|
for (var a = e.__v; a = a.__; )
|
|
1807
1807
|
if (a.__c) {
|
|
1808
1808
|
a.__c.__$f |= 4;
|
|
@@ -1810,46 +1810,46 @@ function En(n) {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
return e.__$u.c = function() {
|
|
1812
1812
|
var o, r = e.__$u.S(), u = s.value;
|
|
1813
|
-
r(),
|
|
1814
|
-
},
|
|
1813
|
+
r(), en(u) || ((o = e.base) == null ? void 0 : o.nodeType) !== 3 ? (e.__$f |= 1, e.setState({})) : e.base.data = u;
|
|
1814
|
+
}, In(function() {
|
|
1815
1815
|
var o = i.value.value;
|
|
1816
1816
|
return o === 0 ? 0 : o === !0 ? "" : o || "";
|
|
1817
1817
|
});
|
|
1818
1818
|
}, []);
|
|
1819
1819
|
return s.value;
|
|
1820
1820
|
}
|
|
1821
|
-
|
|
1822
|
-
Object.defineProperties(
|
|
1821
|
+
$n.displayName = "_st";
|
|
1822
|
+
Object.defineProperties(H.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: $n }, props: { configurable: !0, get: function() {
|
|
1823
1823
|
return { data: this };
|
|
1824
1824
|
} }, __b: { configurable: !0, value: 1 } });
|
|
1825
|
-
|
|
1825
|
+
me("__b", function(n, e) {
|
|
1826
1826
|
if (typeof e.type == "string") {
|
|
1827
1827
|
var t, i = e.props;
|
|
1828
1828
|
for (var s in i)
|
|
1829
1829
|
if (s !== "children") {
|
|
1830
1830
|
var a = i[s];
|
|
1831
|
-
a instanceof
|
|
1831
|
+
a instanceof H && (t || (e.__np = t = {}), t[s] = a, i[s] = a.peek());
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
n(e);
|
|
1835
1835
|
});
|
|
1836
|
-
|
|
1836
|
+
me("__r", function(n, e) {
|
|
1837
1837
|
ze();
|
|
1838
1838
|
var t, i = e.__c;
|
|
1839
1839
|
i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(s) {
|
|
1840
1840
|
var a;
|
|
1841
|
-
return
|
|
1841
|
+
return pt(function() {
|
|
1842
1842
|
a = this;
|
|
1843
1843
|
}), a.c = function() {
|
|
1844
1844
|
i.__$f |= 1, i.setState({});
|
|
1845
1845
|
}, a;
|
|
1846
|
-
}())),
|
|
1846
|
+
}())), Pe = i, ze(t), n(e);
|
|
1847
1847
|
});
|
|
1848
|
-
|
|
1849
|
-
ze(),
|
|
1848
|
+
me("__e", function(n, e, t, i) {
|
|
1849
|
+
ze(), Pe = void 0, n(e, t, i);
|
|
1850
1850
|
});
|
|
1851
|
-
|
|
1852
|
-
ze(),
|
|
1851
|
+
me("diffed", function(n, e) {
|
|
1852
|
+
ze(), Pe = void 0;
|
|
1853
1853
|
var t;
|
|
1854
1854
|
if (typeof e.type == "string" && (t = e.__e)) {
|
|
1855
1855
|
var i = e.__np, s = e.props;
|
|
@@ -1864,22 +1864,22 @@ fe("diffed", function(n, e) {
|
|
|
1864
1864
|
t.U = a = {};
|
|
1865
1865
|
for (var u in i) {
|
|
1866
1866
|
var h = a[u], d = i[u];
|
|
1867
|
-
h === void 0 ? (h =
|
|
1867
|
+
h === void 0 ? (h = li(t, u, d, s), a[u] = h) : h.o(d, s);
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
1870
|
}
|
|
1871
1871
|
n(e);
|
|
1872
1872
|
});
|
|
1873
|
-
function
|
|
1874
|
-
var s = e in n && n.ownerSVGElement === void 0, a =
|
|
1873
|
+
function li(n, e, t, i) {
|
|
1874
|
+
var s = e in n && n.ownerSVGElement === void 0, a = q(t);
|
|
1875
1875
|
return { o: function(o, r) {
|
|
1876
1876
|
a.value = o, i = r;
|
|
1877
|
-
}, d:
|
|
1877
|
+
}, d: pt(function() {
|
|
1878
1878
|
var o = a.value.value;
|
|
1879
1879
|
i[e] !== o && (i[e] = o, s ? n[e] = o : o ? n.setAttribute(e, o) : n.removeAttribute(e));
|
|
1880
1880
|
}) };
|
|
1881
1881
|
}
|
|
1882
|
-
|
|
1882
|
+
me("unmount", function(n, e) {
|
|
1883
1883
|
if (typeof e.type == "string") {
|
|
1884
1884
|
var t = e.__e;
|
|
1885
1885
|
if (t) {
|
|
@@ -1901,10 +1901,10 @@ fe("unmount", function(n, e) {
|
|
|
1901
1901
|
}
|
|
1902
1902
|
n(e);
|
|
1903
1903
|
});
|
|
1904
|
-
|
|
1904
|
+
me("__h", function(n, e, t, i) {
|
|
1905
1905
|
(i < 3 || i === 9) && (e.__$f |= 2), n(e, t, i);
|
|
1906
1906
|
});
|
|
1907
|
-
|
|
1907
|
+
F.prototype.shouldComponentUpdate = function(n, e) {
|
|
1908
1908
|
var t = this.__$u, i = t && t.s !== void 0;
|
|
1909
1909
|
for (var s in e)
|
|
1910
1910
|
return !0;
|
|
@@ -1921,20 +1921,20 @@ R.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
1921
1921
|
return !0;
|
|
1922
1922
|
return !1;
|
|
1923
1923
|
};
|
|
1924
|
-
function
|
|
1925
|
-
return
|
|
1926
|
-
return
|
|
1924
|
+
function E(n) {
|
|
1925
|
+
return J(function() {
|
|
1926
|
+
return q(n);
|
|
1927
1927
|
}, []);
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1930
|
-
var e =
|
|
1931
|
-
return e.current = n,
|
|
1932
|
-
return
|
|
1929
|
+
function B(n) {
|
|
1930
|
+
var e = O(n);
|
|
1931
|
+
return e.current = n, Pe.__$f |= 4, J(function() {
|
|
1932
|
+
return In(function() {
|
|
1933
1933
|
return e.current();
|
|
1934
1934
|
});
|
|
1935
1935
|
}, []);
|
|
1936
1936
|
}
|
|
1937
|
-
const
|
|
1937
|
+
const ui = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z" }) }), hi = () => /* @__PURE__ */ c(
|
|
1938
1938
|
"svg",
|
|
1939
1939
|
{
|
|
1940
1940
|
className: "icon",
|
|
@@ -1943,7 +1943,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
1943
1943
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1944
1944
|
children: /* @__PURE__ */ c("path", { d: "M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z" })
|
|
1945
1945
|
}
|
|
1946
|
-
),
|
|
1946
|
+
), di = (n) => /* @__PURE__ */ c(
|
|
1947
1947
|
"svg",
|
|
1948
1948
|
{
|
|
1949
1949
|
viewBox: "0 0 1024 1024",
|
|
@@ -1953,14 +1953,14 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
1953
1953
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1954
1954
|
children: /* @__PURE__ */ c("path", { d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" })
|
|
1955
1955
|
}
|
|
1956
|
-
),
|
|
1956
|
+
), pi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z" }) }), Nt = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z" }) }), fi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z" }) }), vi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z" }) }), mi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z" }) }), _i = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ c("path", { d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64" }) }), gi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1957
1957
|
/* @__PURE__ */ c("path", { d: "M481.0752 263.3728l50.9952 1.024 1.8432-105.8816-50.9952-0.8192z" }),
|
|
1958
1958
|
/* @__PURE__ */ c("path", { d: "M486.441426 180.895362a66.56 66.56 0 1 0 42.091944-126.290153 66.56 66.56 0 1 0-42.091944 126.290153Z" }),
|
|
1959
1959
|
/* @__PURE__ */ c("path", { d: "M138.8544 664.3712c-52.8384 0-95.8464-43.008-95.8464-95.8464s43.008-95.8464 95.8464-95.8464M880.0256 472.6784c52.8384 0 95.8464 43.008 95.8464 95.8464s-43.008 95.8464-95.8464 95.8464" }),
|
|
1960
1960
|
/* @__PURE__ */ c("path", { d: "M507.4944 220.5696c-220.16 0-398.7456 162.816-398.7456 363.7248s178.5856 363.7248 398.7456 363.7248 398.7456-162.816 398.7456-363.7248-178.5856-363.7248-398.7456-363.7248z m0 559.9232c-166.2976 0-301.2608-100.5568-301.2608-224.4608s134.9632-224.4608 301.2608-224.4608S808.7552 432.128 808.7552 556.032 673.792 780.4928 507.4944 780.4928z" }),
|
|
1961
1961
|
/* @__PURE__ */ c("path", { d: "M319.6928 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z" }),
|
|
1962
1962
|
/* @__PURE__ */ c("path", { d: "M617.472 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z" })
|
|
1963
|
-
] }),
|
|
1963
|
+
] }), wi = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1964
1964
|
/* @__PURE__ */ c(
|
|
1965
1965
|
"path",
|
|
1966
1966
|
{
|
|
@@ -1982,7 +1982,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
1982
1982
|
fill: "currentColor"
|
|
1983
1983
|
}
|
|
1984
1984
|
)
|
|
1985
|
-
] }),
|
|
1985
|
+
] }), yi = () => /* @__PURE__ */ c(
|
|
1986
1986
|
"svg",
|
|
1987
1987
|
{
|
|
1988
1988
|
viewBox: "64 64 896 896",
|
|
@@ -2041,7 +2041,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2041
2041
|
);
|
|
2042
2042
|
})
|
|
2043
2043
|
}
|
|
2044
|
-
),
|
|
2044
|
+
), Ci = (n) => /* @__PURE__ */ c(
|
|
2045
2045
|
"svg",
|
|
2046
2046
|
{
|
|
2047
2047
|
className: n.className,
|
|
@@ -2051,7 +2051,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2051
2051
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2052
2052
|
children: /* @__PURE__ */ c("path", { d: "M128 384a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m768 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z m-372.4288 0a128 128 0 1 1 0 256 128 128 0 0 1 0-256z" })
|
|
2053
2053
|
}
|
|
2054
|
-
),
|
|
2054
|
+
), Ti = (n) => /* @__PURE__ */ c(
|
|
2055
2055
|
"svg",
|
|
2056
2056
|
{
|
|
2057
2057
|
className: n.className,
|
|
@@ -2060,7 +2060,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2060
2060
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2061
2061
|
children: /* @__PURE__ */ c("path", { 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" })
|
|
2062
2062
|
}
|
|
2063
|
-
),
|
|
2063
|
+
), En = () => /* @__PURE__ */ c(
|
|
2064
2064
|
"svg",
|
|
2065
2065
|
{
|
|
2066
2066
|
className: "icon",
|
|
@@ -2069,7 +2069,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2069
2069
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2070
2070
|
children: /* @__PURE__ */ c("path", { d: "M972.657609 209.348408C987.158609 209.36839 998.930114 197.571202 998.949999 182.99865 998.969882 168.426097 987.230618 156.59651 972.729617 156.576528L32.457975 155.280806C17.956974 155.260823 6.18547 167.058012 6.165585 181.630564 6.1457 196.203116 17.884965 208.032703 32.385966 208.052686L972.657609 209.348408ZM180.466902 992.356169 180.466902 1019.014859 206.993296 1018.74074 833.361858 1012.267947 859.348284 1011.999407 859.348284 985.883377 859.348284 289.397297C859.348284 274.824732 847.59289 263.011332 833.091874 263.011332 818.590859 263.011332 806.835465 274.824732 806.835465 289.397297L806.835465 985.883377 832.82189 959.498805 206.453329 965.971599 232.979723 992.356169 232.979723 282.67005C232.979723 268.097483 221.224329 256.284085 206.723313 256.284085 192.222298 256.284085 180.466902 268.097483 180.466902 282.67005L180.466902 992.356169ZM656.410257 847.079027C656.410257 861.651593 668.165651 873.464992 682.666667 873.464992 697.167682 873.464992 708.923076 861.651593 708.923076 847.079027L708.923076 372.131659C708.923076 357.559091 697.167682 345.745694 682.666667 345.745694 668.165651 345.745694 656.410257 357.559091 656.410257 372.131659L656.410257 847.079027ZM341.333333 847.079027C341.333333 861.651593 353.08873 873.464992 367.589743 873.464992 382.090758 873.464992 393.846155 861.651593 393.846155 847.079027L393.846155 372.131659C393.846155 357.559091 382.090758 345.745694 367.589743 345.745694 353.08873 345.745694 341.333333 357.559091 341.333333 372.131659L341.333333 847.079027ZM498.871795 847.079027C498.871795 861.651593 510.627189 873.464992 525.128205 873.464992 539.62922 873.464992 551.384614 861.651593 551.384614 847.079027L551.384614 372.131659C551.384614 357.559091 539.62922 345.745694 525.128205 345.745694 510.627189 345.745694 498.871795 357.559091 498.871795 372.131659L498.871795 847.079027ZM392.147755 116.721777C392.147755 102.063669 403.758665 90.363507 418.40134 90.363507L622.925796 90.363507C637.408947 90.363507 649.179381 102.1619 649.179381 116.549585L649.179381 171.644875 701.692203 171.644875 701.692203 116.549585C701.692203 72.986607 666.38105 37.591577 622.925796 37.591577L418.40134 37.591577C374.724427 37.591577 339.634933 72.950804 339.634933 116.721777L339.634933 165.310801 392.147755 165.310801 392.147755 116.721777Z" })
|
|
2071
2071
|
}
|
|
2072
|
-
),
|
|
2072
|
+
), xi = (n) => /* @__PURE__ */ c(
|
|
2073
2073
|
"svg",
|
|
2074
2074
|
{
|
|
2075
2075
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2087,7 +2087,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2087
2087
|
}
|
|
2088
2088
|
)
|
|
2089
2089
|
}
|
|
2090
|
-
),
|
|
2090
|
+
), qe = (n) => /* @__PURE__ */ c(
|
|
2091
2091
|
"svg",
|
|
2092
2092
|
{
|
|
2093
2093
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2095,7 +2095,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2095
2095
|
viewBox: "0 0 512 512",
|
|
2096
2096
|
children: /* @__PURE__ */ c("path", { 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" })
|
|
2097
2097
|
}
|
|
2098
|
-
),
|
|
2098
|
+
), Ye = (n) => /* @__PURE__ */ c(
|
|
2099
2099
|
"svg",
|
|
2100
2100
|
{
|
|
2101
2101
|
className: n.className,
|
|
@@ -2128,7 +2128,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2128
2128
|
}
|
|
2129
2129
|
)
|
|
2130
2130
|
}
|
|
2131
|
-
),
|
|
2131
|
+
), Si = () => /* @__PURE__ */ c(
|
|
2132
2132
|
"svg",
|
|
2133
2133
|
{
|
|
2134
2134
|
className: "icon",
|
|
@@ -2139,7 +2139,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2139
2139
|
height: "18",
|
|
2140
2140
|
children: /* @__PURE__ */ c("path", { 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" })
|
|
2141
2141
|
}
|
|
2142
|
-
),
|
|
2142
|
+
), Mn = () => /* @__PURE__ */ c(
|
|
2143
2143
|
"svg",
|
|
2144
2144
|
{
|
|
2145
2145
|
className: "icon",
|
|
@@ -2165,7 +2165,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2165
2165
|
)
|
|
2166
2166
|
]
|
|
2167
2167
|
}
|
|
2168
|
-
),
|
|
2168
|
+
), Ai = () => /* @__PURE__ */ c(
|
|
2169
2169
|
"svg",
|
|
2170
2170
|
{
|
|
2171
2171
|
className: "icon",
|
|
@@ -2193,7 +2193,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2193
2193
|
height: "18",
|
|
2194
2194
|
children: /* @__PURE__ */ c("path", { d: "M512.43945313 904.51953125c-6.06445313 0-12.12890625-1.58203125-17.57812501-4.74609375L136.70703125 689.71484375c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867188-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l76.37695313-44.91210938L136.97070312 540.125c-10.63476563-6.24023438-17.13867188-17.66601563-17.13867187-29.97070313s6.50390625-23.73046875 17.13867188-29.97070312l73.38867187-43.15429688-73.125-42.890625C126.51171875 387.81054687 120.0078125 376.38476562 120.0078125 364.08007812c0-12.3046875 6.50390625-23.73046875 17.13867188-29.97070312L495.828125 122.99609375c10.8984375-6.41601563 24.34570313-6.41601563 35.24414063 0l358.15429687 210.05859375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-73.38867188 43.15429688 73.12500001 42.890625c10.63476563 6.24023438 17.13867188 17.66601563 17.13867187 29.97070312s-6.50390625 23.73046875-17.13867187 29.97070313L812.5859375 583.89453125l76.11328125 44.6484375c10.63476563 6.24023438 17.13867188 17.66601563 17.13867188 29.97070313s-6.50390625 23.73046875-17.13867188 29.97070312l-358.59375 211.2890625c-5.44921875 3.1640625-11.6015625 4.74609375-17.66601563 4.74609375zM223.015625 659.65625l289.42382813 169.8046875 290.12695312-170.77148438-58.44726563-34.27734374L530.28125 750.18359375a34.67285156 34.67285156 0 0 1-35.24414063 0L281.7265625 625.02734375 223.015625 659.65625z m76.90429688-104.58984375l212.69531249 124.8046875 290.12695313-170.77148438-55.546875-32.60742187-216.65039063 127.6171875a34.67285156 34.67285156 0 0 1-35.24414062 0L279.00195312 477.28320312l-55.81054687 32.78320313 75.49804688 44.296875c0.43945313 0.26367188 0.79101563 0.52734375 1.23046874 0.703125z m-2.81250001-147.83203125l215.68359376 126.5625 216.12304687-127.17773438c0.3515625-0.26367188 0.703125-0.43945313 1.0546875-0.61523437l72.86132813-42.890625-289.33593751-169.8046875-290.12695312 170.68359375 72.59765625 42.62695313c0.43945313 0.17578125 0.79101563 0.43945313 1.14257813 0.61523437z" })
|
|
2195
2195
|
}
|
|
2196
|
-
),
|
|
2196
|
+
), Ii = (n) => /* @__PURE__ */ c(
|
|
2197
2197
|
"svg",
|
|
2198
2198
|
{
|
|
2199
2199
|
className: n.className,
|
|
@@ -2220,7 +2220,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2220
2220
|
)
|
|
2221
2221
|
]
|
|
2222
2222
|
}
|
|
2223
|
-
),
|
|
2223
|
+
), Ni = (n) => /* @__PURE__ */ c(
|
|
2224
2224
|
"svg",
|
|
2225
2225
|
{
|
|
2226
2226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2238,7 +2238,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2238
2238
|
}
|
|
2239
2239
|
)
|
|
2240
2240
|
}
|
|
2241
|
-
),
|
|
2241
|
+
), $i = () => /* @__PURE__ */ c(
|
|
2242
2242
|
"svg",
|
|
2243
2243
|
{
|
|
2244
2244
|
viewBox: "0 0 1024 1024",
|
|
@@ -2252,7 +2252,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2252
2252
|
/* @__PURE__ */ c("path", { d: "M341.376 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32zM512 691.2a32 32 0 0 1 32 32v128a32 32 0 0 1-64 0v-128a32 32 0 0 1 32-32zM682.688 691.52a32 32 0 0 1 32 32V851.2a32 32 0 1 1-64 0v-127.68a32 32 0 0 1 32-32z" })
|
|
2253
2253
|
]
|
|
2254
2254
|
}
|
|
2255
|
-
),
|
|
2255
|
+
), Ei = () => /* @__PURE__ */ c(
|
|
2256
2256
|
"svg",
|
|
2257
2257
|
{
|
|
2258
2258
|
viewBox: "0 0 1024 1024",
|
|
@@ -2262,7 +2262,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2262
2262
|
height: "18",
|
|
2263
2263
|
children: /* @__PURE__ */ c("path", { d: "M843.251 424.407l43.828-74.898c10.194-17.946 32.596-22.158 48.956-11.598 16.298 10.499 23.44 32.658 14.223 49.566l-113.11 195.212-61.164-40.044-126.418-82.285c-16.115-11.598-20.632-34.428-10.194-51.702 9.705-17.397 31.009-23.501 47.857-13.734l89.67 59.028C748.576 295.547 615.81 180.667 461.008 180.667c-177.387 0-320.042 148.758-320.042 331.335 0 183.613 143.692 331.334 319.981 331.334 107.861 0.184 208.58-56.158 268.034-149.858 1.099-1.038 1.099-2.075 2.075-2.075 6.348-9.949 17.092-15.871 28.568-15.81 19.35 0 35.648 16.848 35.648 36.93 0 7.508-2.137 14.833-6.104 21.059-72.823 114.698-196.066 183.675-328.099 183.614-216.088 0-391.4-181.478-391.4-405.195 0-223.718 175.312-405.195 391.339-405.195 183.125-0.427 342.016 131.606 382.243 317.601z" })
|
|
2264
2264
|
}
|
|
2265
|
-
),
|
|
2265
|
+
), Mi = () => /* @__PURE__ */ c(
|
|
2266
2266
|
"svg",
|
|
2267
2267
|
{
|
|
2268
2268
|
version: "1.1",
|
|
@@ -2271,7 +2271,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2271
2271
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2272
2272
|
children: /* @__PURE__ */ c("path", { d: "M627.498667 55.168l170.666666 170.666667a42.624 42.624 0 0 1 0 60.330666l-469.333333 469.333334A42.538667 42.538667 0 0 1 298.666667 768H128a42.666667 42.666667 0 0 1-42.666667-42.666667v-170.666666c0-11.306667 4.48-22.186667 12.501334-30.165334l469.333333-469.333333a42.624 42.624 0 0 1 60.330667 0zM896 896a42.666667 42.666667 0 0 1 0 85.333333H128a42.666667 42.666667 0 0 1 0-85.333333h768zM597.333333 145.664l-426.666666 426.666667V682.666667h110.336l426.666666-426.666667L597.333333 145.664z" })
|
|
2273
2273
|
}
|
|
2274
|
-
),
|
|
2274
|
+
), Di = (n) => /* @__PURE__ */ c(
|
|
2275
2275
|
"svg",
|
|
2276
2276
|
{
|
|
2277
2277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2289,7 +2289,7 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2289
2289
|
}
|
|
2290
2290
|
)
|
|
2291
2291
|
}
|
|
2292
|
-
),
|
|
2292
|
+
), Li = () => /* @__PURE__ */ c(
|
|
2293
2293
|
"svg",
|
|
2294
2294
|
{
|
|
2295
2295
|
className: "icon",
|
|
@@ -2299,8 +2299,8 @@ const li = () => /* @__PURE__ */ c("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
2299
2299
|
children: /* @__PURE__ */ c("path", { d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z" })
|
|
2300
2300
|
}
|
|
2301
2301
|
);
|
|
2302
|
-
const
|
|
2303
|
-
const { items: e } = n, t =
|
|
2302
|
+
const Hi = (n) => {
|
|
2303
|
+
const { items: e } = n, t = E([]), i = new k("chat-thought-chain"), s = E([]);
|
|
2304
2304
|
D(() => {
|
|
2305
2305
|
s.value = e.filter((o) => o.description), s.value.length > 0 && s.value.forEach((o, r) => {
|
|
2306
2306
|
o.done && (t.value = [...t.value, r]);
|
|
@@ -2329,7 +2329,7 @@ const Li = (n) => {
|
|
|
2329
2329
|
onClick: () => a(r),
|
|
2330
2330
|
children: [
|
|
2331
2331
|
o.title,
|
|
2332
|
-
/* @__PURE__ */ c(
|
|
2332
|
+
/* @__PURE__ */ c(xi, { className: i.e("icon") })
|
|
2333
2333
|
]
|
|
2334
2334
|
}
|
|
2335
2335
|
),
|
|
@@ -2356,16 +2356,16 @@ const zi = (n) => {
|
|
|
2356
2356
|
title: a.metadata.content_name,
|
|
2357
2357
|
children: [
|
|
2358
2358
|
a.metadata.content_name,
|
|
2359
|
-
/* @__PURE__ */ c(
|
|
2359
|
+
/* @__PURE__ */ c(Di, { className: "".concat(s.e("item-icon")) })
|
|
2360
2360
|
]
|
|
2361
2361
|
},
|
|
2362
2362
|
o
|
|
2363
2363
|
)) });
|
|
2364
2364
|
};
|
|
2365
|
-
const
|
|
2366
|
-
const e = new k("chat-tool-call-item"), t =
|
|
2365
|
+
const Oi = (n) => {
|
|
2366
|
+
const e = new k("chat-tool-call-item"), t = E(!1), i = E(!1);
|
|
2367
2367
|
let s;
|
|
2368
|
-
const a =
|
|
2368
|
+
const a = he(), o = () => {
|
|
2369
2369
|
t.value = !t.value, u("code-block-".concat(a), n.item);
|
|
2370
2370
|
}, r = (l) => {
|
|
2371
2371
|
l.stopPropagation(), s && clearTimeout(s), i.value = !0, navigator.clipboard.writeText(JSON.stringify(n.item, void 0, 2)), window.ibiz.message.success("已复制"), s = setTimeout(() => {
|
|
@@ -2379,33 +2379,33 @@ const Hi = (n) => {
|
|
|
2379
2379
|
const p = document.getElementById(l);
|
|
2380
2380
|
if (!p || (p.innerHTML = "", !t.value))
|
|
2381
2381
|
return;
|
|
2382
|
-
h(f, _).forEach((
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2385
|
-
const
|
|
2386
|
-
|
|
2382
|
+
h(f, _).forEach((w, g) => {
|
|
2383
|
+
const v = document.createElement("div");
|
|
2384
|
+
v.className = "code-line";
|
|
2385
|
+
const b = document.createElement("span");
|
|
2386
|
+
b && (b.className = "line-number", b.textContent = (g + 1).toString(), v.appendChild(b), v.innerHTML += w, p.appendChild(v));
|
|
2387
2387
|
});
|
|
2388
2388
|
}, h = (l, f = 0) => {
|
|
2389
2389
|
const _ = " ".repeat(f), p = [];
|
|
2390
2390
|
if (Array.isArray(l)) {
|
|
2391
2391
|
if (l.length === 0)
|
|
2392
2392
|
return ["".concat(_, '<span class="array">[]</span>')];
|
|
2393
|
-
p.push("".concat(_, '<span class="array">[</span>')), l.forEach((m,
|
|
2394
|
-
const
|
|
2395
|
-
typeof m == "object" && m !== null ? (p.push(...
|
|
2393
|
+
p.push("".concat(_, '<span class="array">[</span>')), l.forEach((m, w) => {
|
|
2394
|
+
const g = h(m, f + 1), v = w < l.length - 1 ? "," : "";
|
|
2395
|
+
typeof m == "object" && m !== null ? (p.push(...g.slice(0, -1)), p.push("".concat(g[g.length - 1]).concat(v))) : p.push("".concat(g[0]).concat(v));
|
|
2396
2396
|
}), p.push("".concat(_, '<span class="array">]</span>'));
|
|
2397
2397
|
} else if (typeof l == "object" && l !== null) {
|
|
2398
2398
|
const m = Object.keys(l);
|
|
2399
2399
|
if (m.length === 0)
|
|
2400
2400
|
return ["".concat(_, '<span class="property">{}</span>')];
|
|
2401
|
-
p.push("".concat(_, '<span class="property">{</span>')), m.forEach((
|
|
2402
|
-
const
|
|
2403
|
-
if (typeof
|
|
2404
|
-
const
|
|
2405
|
-
p.push("".concat(_, " ").concat(
|
|
2401
|
+
p.push("".concat(_, '<span class="property">{</span>')), m.forEach((w, g) => {
|
|
2402
|
+
const v = l[w], b = g < m.length - 1 ? "," : "", T = '<span class="json-key">"'.concat(w, '":</span>');
|
|
2403
|
+
if (typeof v == "object" && v !== null) {
|
|
2404
|
+
const S = h(v, f + 1);
|
|
2405
|
+
p.push("".concat(_, " ").concat(T, " ").concat(S[0].trim())), S.length > 1 && (p.push(...S.slice(1, -1)), p.push("".concat(S[S.length - 1]).concat(b)));
|
|
2406
2406
|
} else {
|
|
2407
|
-
const
|
|
2408
|
-
p.push("".concat(_, " ").concat(
|
|
2407
|
+
const S = d(v);
|
|
2408
|
+
p.push("".concat(_, " ").concat(T, " ").concat(S).concat(b));
|
|
2409
2409
|
}
|
|
2410
2410
|
}), p.push("".concat(_, '<span class="property">}</span>'));
|
|
2411
2411
|
} else
|
|
@@ -2505,25 +2505,25 @@ const Hi = (n) => {
|
|
|
2505
2505
|
/* @__PURE__ */ c("div", { className: e.e("content"), id: "code-block-".concat(a) })
|
|
2506
2506
|
] });
|
|
2507
2507
|
};
|
|
2508
|
-
const
|
|
2509
|
-
const { items: e } = n, t = new k("chat-tool-call"), i =
|
|
2508
|
+
const Bi = (n) => {
|
|
2509
|
+
const { items: e } = n, t = new k("chat-tool-call"), i = E([]), s = E(!1), a = E(!1);
|
|
2510
2510
|
D(() => {
|
|
2511
2511
|
i.value = e.filter((u) => u), a.value = e.length > 4;
|
|
2512
2512
|
}, [e]);
|
|
2513
|
-
const o =
|
|
2513
|
+
const o = B(() => a.value && !s.value ? i.value.slice(0, 4) : i.value), r = () => {
|
|
2514
2514
|
s.value = !s.value;
|
|
2515
2515
|
};
|
|
2516
2516
|
return /* @__PURE__ */ c("div", { className: "".concat(t.b()), children: [
|
|
2517
|
-
o.value.map((u, h) => /* @__PURE__ */ c(
|
|
2517
|
+
o.value.map((u, h) => /* @__PURE__ */ c(Oi, { item: u }, h)),
|
|
2518
2518
|
a.value && /* @__PURE__ */ c("div", { className: t.e("toggle"), onClick: r, children: s.value ? "收起工具调用" : "展开全部 ".concat(i.value.length, " 个工具调用") })
|
|
2519
2519
|
] });
|
|
2520
2520
|
};
|
|
2521
|
-
const
|
|
2522
|
-
const { message: e, size: t } = n, i =
|
|
2521
|
+
const ne = new k("markdown-message"), Pi = (n) => {
|
|
2522
|
+
const { message: e, size: t } = n, i = E(he()), s = E(null), a = J(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), o = J(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), r = E({
|
|
2523
2523
|
title: "",
|
|
2524
2524
|
description: "",
|
|
2525
|
-
icon: /* @__PURE__ */ c(
|
|
2526
|
-
}), u =
|
|
2525
|
+
icon: /* @__PURE__ */ c(Ye, {})
|
|
2526
|
+
}), u = E({ hasSuggestions: !1, suggestions: [] }), h = (f) => {
|
|
2527
2527
|
f && f.length > 0 ? u.value = {
|
|
2528
2528
|
hasSuggestions: !0,
|
|
2529
2529
|
suggestions: f
|
|
@@ -2532,14 +2532,14 @@ const te = new k("markdown-message"), Bi = (n) => {
|
|
|
2532
2532
|
n.controller.handleSuggestionClick(n.message, f, _);
|
|
2533
2533
|
}, l = (f) => {
|
|
2534
2534
|
const _ = f.indexOf("<think>"), p = f.indexOf("</think>");
|
|
2535
|
-
let m = "",
|
|
2536
|
-
return p === -1 ? (
|
|
2535
|
+
let m = "", w = "", g = !1;
|
|
2536
|
+
return p === -1 ? (g = !1, m = f.slice(_ + 7), w = "") : (g = !0, m = f.slice(_ + 7, p), w = f.slice(p + 8)), { isThoughtCompleted: g, thoughtContent: m, answerContent: w };
|
|
2537
2537
|
};
|
|
2538
2538
|
return D(() => {
|
|
2539
2539
|
if (t >= 0 && s.value) {
|
|
2540
2540
|
if (e.content.indexOf("<think>") !== -1) {
|
|
2541
2541
|
const { isThoughtCompleted: f, thoughtContent: _, answerContent: p } = l(e.content);
|
|
2542
|
-
f ? (r.value.icon = /* @__PURE__ */ c(
|
|
2542
|
+
f ? (r.value.icon = /* @__PURE__ */ c(qe, {}), r.value.title = "思考完成") : e.completed === !0 ? (r.value.icon = /* @__PURE__ */ c(qe, {}), r.value.title = "思考已停止") : (r.value.icon = /* @__PURE__ */ c(Ye, {}), r.value.title = "思考中..."), r.value.description = _ || "", s.value.setMarkdown(p || "");
|
|
2543
2543
|
} else if (e.content.indexOf("<tool_call>") !== -1) {
|
|
2544
2544
|
const f = e.content.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim();
|
|
2545
2545
|
s.value.setMarkdown(f || "");
|
|
@@ -2554,11 +2554,11 @@ const te = new k("markdown-message"), Bi = (n) => {
|
|
|
2554
2554
|
r.value = {
|
|
2555
2555
|
title: _ ? "思考完成" : e.completed === !0 ? "思考已停止" : "思考中...",
|
|
2556
2556
|
description: p || "",
|
|
2557
|
-
icon: _ || e.completed === !0 ? /* @__PURE__ */ c(
|
|
2557
|
+
icon: _ || e.completed === !0 ? /* @__PURE__ */ c(qe, {}) : /* @__PURE__ */ c(Ye, {})
|
|
2558
2558
|
}, m && (f = m);
|
|
2559
2559
|
} else
|
|
2560
2560
|
e.content.indexOf("<tool_call>") !== -1 ? f = e.content.replace(new RegExp("\\<tool_call\\>[^]*?\\<\\/tool_call\\>", "gs"), "").trim() : f = e.content;
|
|
2561
|
-
h(e.suggestions), s.value = new
|
|
2561
|
+
h(e.suggestions), s.value = new Gt({
|
|
2562
2562
|
// @ts-ignore
|
|
2563
2563
|
id: i,
|
|
2564
2564
|
value: f || "",
|
|
@@ -2585,18 +2585,18 @@ const te = new k("markdown-message"), Bi = (n) => {
|
|
|
2585
2585
|
}
|
|
2586
2586
|
}
|
|
2587
2587
|
});
|
|
2588
|
-
}, []), /* @__PURE__ */ c("div", { className: "".concat(
|
|
2589
|
-
/* @__PURE__ */ c("div", { className:
|
|
2590
|
-
/* @__PURE__ */ c("div", { className:
|
|
2588
|
+
}, []), /* @__PURE__ */ c("div", { className: "".concat(ne.b(), " ").concat(ne.is("loading", a)), children: [
|
|
2589
|
+
/* @__PURE__ */ c("div", { className: ne.b("header"), children: [
|
|
2590
|
+
/* @__PURE__ */ c("div", { className: ne.be("header", "caption"), children: "AI " }),
|
|
2591
2591
|
n.children,
|
|
2592
|
-
o ? /* @__PURE__ */ c("div", { className:
|
|
2592
|
+
o ? /* @__PURE__ */ c("div", { className: ne.be("header", "timeout"), children: "请求超时" }) : null
|
|
2593
2593
|
] }),
|
|
2594
|
-
/* @__PURE__ */ c("div", { className: "".concat(
|
|
2595
|
-
/* @__PURE__ */ c(
|
|
2596
|
-
e.toolcalls && e.toolcalls.length > 0 ? /* @__PURE__ */ c(
|
|
2594
|
+
/* @__PURE__ */ c("div", { className: "".concat(ne.b("content"), " pre-wrap-container"), children: [
|
|
2595
|
+
/* @__PURE__ */ c(Hi, { items: [r.value] }),
|
|
2596
|
+
e.toolcalls && e.toolcalls.length > 0 ? /* @__PURE__ */ c(Bi, { items: e.toolcalls || [] }) : null,
|
|
2597
2597
|
/* @__PURE__ */ c("div", { id: i })
|
|
2598
2598
|
] }),
|
|
2599
|
-
/* @__PURE__ */ c("div", { className:
|
|
2599
|
+
/* @__PURE__ */ c("div", { className: ne.b("footer"), children: u.value.hasSuggestions ? /* @__PURE__ */ c(
|
|
2600
2600
|
zi,
|
|
2601
2601
|
{
|
|
2602
2602
|
items: u.value.suggestions,
|
|
@@ -2607,11 +2607,11 @@ const te = new k("markdown-message"), Bi = (n) => {
|
|
|
2607
2607
|
) : null })
|
|
2608
2608
|
] });
|
|
2609
2609
|
};
|
|
2610
|
-
const
|
|
2611
|
-
const e =
|
|
2610
|
+
const _e = new k("ossfile-material"), Ri = (n) => {
|
|
2611
|
+
const e = B(() => n.material.data.name), t = B(() => n.material.metadata.size), i = B(() => {
|
|
2612
2612
|
const a = n.material.metadata.state;
|
|
2613
2613
|
return a === "successed" ? "上传成功" : a === "uploading" ? "上传中" : a === "failed" ? "上传失败" : "未知状态";
|
|
2614
|
-
}), s =
|
|
2614
|
+
}), s = B(() => {
|
|
2615
2615
|
switch (n.material.metadata.state) {
|
|
2616
2616
|
case "successed":
|
|
2617
2617
|
return "#1890ff";
|
|
@@ -2623,11 +2623,11 @@ const me = new k("ossfile-material"), Pi = (n) => {
|
|
|
2623
2623
|
return "#ff4d4f";
|
|
2624
2624
|
}
|
|
2625
2625
|
});
|
|
2626
|
-
return /* @__PURE__ */ c("div", { className:
|
|
2627
|
-
/* @__PURE__ */ c("div", { className:
|
|
2628
|
-
/* @__PURE__ */ c("div", { className:
|
|
2629
|
-
/* @__PURE__ */ c("div", { className:
|
|
2630
|
-
/* @__PURE__ */ c("div", { className:
|
|
2626
|
+
return /* @__PURE__ */ c("div", { className: _e.b(), children: [
|
|
2627
|
+
/* @__PURE__ */ c("div", { className: _e.b("left"), children: /* @__PURE__ */ c(Mn, {}) }),
|
|
2628
|
+
/* @__PURE__ */ c("div", { className: _e.b("right"), children: [
|
|
2629
|
+
/* @__PURE__ */ c("div", { className: _e.e("name"), title: e, children: e }),
|
|
2630
|
+
/* @__PURE__ */ c("div", { className: _e.e("metadata"), children: [
|
|
2631
2631
|
/* @__PURE__ */ c("div", { children: [
|
|
2632
2632
|
t,
|
|
2633
2633
|
"B"
|
|
@@ -2637,13 +2637,13 @@ const me = new k("ossfile-material"), Pi = (n) => {
|
|
|
2637
2637
|
] })
|
|
2638
2638
|
] });
|
|
2639
2639
|
};
|
|
2640
|
-
const
|
|
2640
|
+
const ge = new k("common-material"), Fi = (n) => {
|
|
2641
2641
|
var i, s, a, o;
|
|
2642
2642
|
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find(
|
|
2643
2643
|
(r) => r.id === n.material.metadata.actionId
|
|
2644
|
-
), t =
|
|
2645
|
-
return /* @__PURE__ */ c("div", { className:
|
|
2646
|
-
/* @__PURE__ */ c("div", { className:
|
|
2644
|
+
), t = B(() => n.material.metadata.name);
|
|
2645
|
+
return /* @__PURE__ */ c("div", { className: ge.b(), children: [
|
|
2646
|
+
/* @__PURE__ */ c("div", { className: ge.b("left"), children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && /* @__PURE__ */ c(Z, { children: (a = e.icon) != null && a.cssClass ? /* @__PURE__ */ c("i", { className: e.icon.cssClass }) : (o = e.icon) != null && o.imagePath ? lt(e.icon.imagePath) ? /* @__PURE__ */ c(
|
|
2647
2647
|
"div",
|
|
2648
2648
|
{
|
|
2649
2649
|
dangerouslySetInnerHTML: {
|
|
@@ -2651,37 +2651,37 @@ const ve = new k("common-material"), Ri = (n) => {
|
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
2653
|
) : /* @__PURE__ */ c("img", { src: e.icon.imagePath }) : null }) : /* @__PURE__ */ c(ki, {}) }),
|
|
2654
|
-
/* @__PURE__ */ c("div", { className:
|
|
2655
|
-
/* @__PURE__ */ c("div", { className:
|
|
2656
|
-
/* @__PURE__ */ c("div", { className:
|
|
2654
|
+
/* @__PURE__ */ c("div", { className: ge.b("right"), children: [
|
|
2655
|
+
/* @__PURE__ */ c("div", { className: ge.e("name"), title: t, children: t }),
|
|
2656
|
+
/* @__PURE__ */ c("div", { className: ge.e("metadata"), children: /* @__PURE__ */ c("div", { children: (e == null ? void 0 : e.label) || "素材资源" }) })
|
|
2657
2657
|
] })
|
|
2658
2658
|
] });
|
|
2659
2659
|
};
|
|
2660
|
-
const
|
|
2660
|
+
const Xe = new k("chat-input-material-item"), Dn = (n) => {
|
|
2661
2661
|
const { material: e } = n;
|
|
2662
2662
|
let t = null;
|
|
2663
2663
|
switch (e.type) {
|
|
2664
2664
|
case "ossfile":
|
|
2665
|
-
t =
|
|
2665
|
+
t = Ri;
|
|
2666
2666
|
break;
|
|
2667
2667
|
default:
|
|
2668
|
-
t =
|
|
2668
|
+
t = Fi;
|
|
2669
2669
|
}
|
|
2670
2670
|
const i = () => {
|
|
2671
2671
|
n.controller.deleteMaterial(e);
|
|
2672
2672
|
};
|
|
2673
|
-
return /* @__PURE__ */ c("div", { className: "".concat(
|
|
2674
|
-
/* @__PURE__ */ c("div", { className:
|
|
2675
|
-
|
|
2673
|
+
return /* @__PURE__ */ c("div", { className: "".concat(Xe.b(), " ").concat(Xe.is("disabled", n.disabled)), children: [
|
|
2674
|
+
/* @__PURE__ */ c("div", { className: Xe.e("icon"), onClick: i, children: /* @__PURE__ */ c(Ai, {}) }),
|
|
2675
|
+
X(t, {
|
|
2676
2676
|
material: e,
|
|
2677
2677
|
controller: n.controller
|
|
2678
2678
|
})
|
|
2679
2679
|
] });
|
|
2680
2680
|
};
|
|
2681
|
-
const
|
|
2682
|
-
const e =
|
|
2681
|
+
const ae = new k("user-message-question"), Ui = (n) => {
|
|
2682
|
+
const e = E(he()), t = E(null), i = B(() => n.message.content), s = B(() => fn.parseMixedContent(i.value));
|
|
2683
2683
|
return D(() => {
|
|
2684
|
-
t.value = new
|
|
2684
|
+
t.value = new Gt({
|
|
2685
2685
|
id: e,
|
|
2686
2686
|
value: s.value.remainingText || "",
|
|
2687
2687
|
editor: {
|
|
@@ -2705,14 +2705,14 @@ const oe = new k("user-message-question"), Fi = (n) => {
|
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
2707
|
});
|
|
2708
|
-
}, [s.value.remainingText]), /* @__PURE__ */ c("div", { className:
|
|
2709
|
-
/* @__PURE__ */ c("div", { className:
|
|
2708
|
+
}, [s.value.remainingText]), /* @__PURE__ */ c("div", { className: ae.b(), children: [
|
|
2709
|
+
/* @__PURE__ */ c("div", { className: ae.e("user-header"), children: [
|
|
2710
2710
|
n.children,
|
|
2711
|
-
/* @__PURE__ */ c("div", { className:
|
|
2711
|
+
/* @__PURE__ */ c("div", { className: ae.e("user"), children: "我" })
|
|
2712
2712
|
] }),
|
|
2713
|
-
/* @__PURE__ */ c("div", { className:
|
|
2714
|
-
s.value.hasResources && /* @__PURE__ */ c("div", { className:
|
|
2715
|
-
|
|
2713
|
+
/* @__PURE__ */ c("div", { className: ae.e("content"), children: /* @__PURE__ */ c("div", { className: ae.em("content", "body"), children: [
|
|
2714
|
+
s.value.hasResources && /* @__PURE__ */ c("div", { className: ae.em("content", "material"), children: s.value.resources.map((a) => /* @__PURE__ */ c(
|
|
2715
|
+
Dn,
|
|
2716
2716
|
{
|
|
2717
2717
|
material: a,
|
|
2718
2718
|
disabled: !0,
|
|
@@ -2724,50 +2724,50 @@ const oe = new k("user-message-question"), Fi = (n) => {
|
|
|
2724
2724
|
] }) })
|
|
2725
2725
|
] });
|
|
2726
2726
|
};
|
|
2727
|
-
const
|
|
2728
|
-
const e =
|
|
2729
|
-
return /* @__PURE__ */ c("div", { className:
|
|
2730
|
-
/* @__PURE__ */ c("div", { className:
|
|
2731
|
-
/* @__PURE__ */ c("div", { className:
|
|
2727
|
+
const Ie = new k("error-message"), Wi = (n) => {
|
|
2728
|
+
const e = B(() => n.message.content);
|
|
2729
|
+
return /* @__PURE__ */ c("div", { className: Ie.b(), children: [
|
|
2730
|
+
/* @__PURE__ */ c("div", { className: Ie.b("header"), children: [
|
|
2731
|
+
/* @__PURE__ */ c("div", { className: Ie.be("header", "caption"), children: "AI " }),
|
|
2732
2732
|
n.children
|
|
2733
2733
|
] }),
|
|
2734
|
-
/* @__PURE__ */ c("div", { className: "".concat(
|
|
2734
|
+
/* @__PURE__ */ c("div", { className: "".concat(Ie.e("content"), " pre-wrap-container"), children: /* @__PURE__ */ c("span", { children: e }) })
|
|
2735
2735
|
] });
|
|
2736
2736
|
};
|
|
2737
|
-
const $t = new k("unknown-message"),
|
|
2737
|
+
const $t = new k("unknown-message"), ji = (n) => /* @__PURE__ */ c("div", { className: $t.b(), children: /* @__PURE__ */ c("div", { className: "".concat($t.e("content"), " pre-wrap-container"), children: [
|
|
2738
2738
|
"暂未支持的消息类型: ",
|
|
2739
2739
|
n.message.type
|
|
2740
2740
|
] }) });
|
|
2741
|
-
const
|
|
2741
|
+
const Vi = new k("chat-message-item"), qi = (n) => {
|
|
2742
2742
|
const { message: e, size: t } = n;
|
|
2743
2743
|
let i = null;
|
|
2744
2744
|
switch (e.type) {
|
|
2745
2745
|
case "DEFAULT":
|
|
2746
|
-
i = e.role === "ASSISTANT" ?
|
|
2746
|
+
i = e.role === "ASSISTANT" ? Pi : Ui;
|
|
2747
2747
|
break;
|
|
2748
2748
|
case "ERROR":
|
|
2749
|
-
i =
|
|
2749
|
+
i = Wi;
|
|
2750
2750
|
break;
|
|
2751
2751
|
default:
|
|
2752
|
-
i =
|
|
2752
|
+
i = ji;
|
|
2753
2753
|
}
|
|
2754
|
-
return /* @__PURE__ */ c("div", { className:
|
|
2754
|
+
return /* @__PURE__ */ c("div", { className: Vi.b(), children: X(i, {
|
|
2755
2755
|
size: t,
|
|
2756
2756
|
message: e,
|
|
2757
2757
|
controller: n.controller,
|
|
2758
2758
|
children: n.children
|
|
2759
2759
|
}) });
|
|
2760
2760
|
};
|
|
2761
|
-
class
|
|
2761
|
+
class le {
|
|
2762
2762
|
constructor(e) {
|
|
2763
|
-
|
|
2763
|
+
x(this, "toolcalls", []);
|
|
2764
2764
|
/**
|
|
2765
2765
|
* @description 消息的所有原始内容
|
|
2766
2766
|
* - 用于维护工具调用消息数据
|
|
2767
2767
|
* @type {string}
|
|
2768
2768
|
* @memberof ChatMessage
|
|
2769
2769
|
*/
|
|
2770
|
-
|
|
2770
|
+
x(this, "allcontent", "");
|
|
2771
2771
|
this.msg = e, this.toolcalls = e.toolcalls || [], this.allcontent = e.content;
|
|
2772
2772
|
}
|
|
2773
2773
|
get messageid() {
|
|
@@ -2835,10 +2835,10 @@ class ge {
|
|
|
2835
2835
|
* @memberof ChatMessage
|
|
2836
2836
|
*/
|
|
2837
2837
|
computeToolCalls() {
|
|
2838
|
-
this.toolcalls =
|
|
2838
|
+
this.toolcalls = ii.parse(this.allcontent);
|
|
2839
2839
|
}
|
|
2840
2840
|
}
|
|
2841
|
-
class
|
|
2841
|
+
class we {
|
|
2842
2842
|
constructor(e) {
|
|
2843
2843
|
this.data = e;
|
|
2844
2844
|
}
|
|
@@ -2864,7 +2864,7 @@ class _e {
|
|
|
2864
2864
|
return this.data.aiChat;
|
|
2865
2865
|
}
|
|
2866
2866
|
}
|
|
2867
|
-
class
|
|
2867
|
+
class Ze {
|
|
2868
2868
|
constructor(e) {
|
|
2869
2869
|
this.material = e;
|
|
2870
2870
|
}
|
|
@@ -2881,8 +2881,31 @@ class Ye {
|
|
|
2881
2881
|
return this.material.data;
|
|
2882
2882
|
}
|
|
2883
2883
|
}
|
|
2884
|
-
|
|
2885
|
-
|
|
2884
|
+
class Yi {
|
|
2885
|
+
constructor(e) {
|
|
2886
|
+
this.agent = e;
|
|
2887
|
+
}
|
|
2888
|
+
get id() {
|
|
2889
|
+
return this.agent.id;
|
|
2890
|
+
}
|
|
2891
|
+
get caption() {
|
|
2892
|
+
return this.agent.caption;
|
|
2893
|
+
}
|
|
2894
|
+
get default() {
|
|
2895
|
+
return this.agent.default;
|
|
2896
|
+
}
|
|
2897
|
+
get order() {
|
|
2898
|
+
return this.agent.order;
|
|
2899
|
+
}
|
|
2900
|
+
get value() {
|
|
2901
|
+
return this.agent.id;
|
|
2902
|
+
}
|
|
2903
|
+
get label() {
|
|
2904
|
+
return this.agent.caption;
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2907
|
+
const z = new k("chat-toolbar-item"), Xi = (n) => {
|
|
2908
|
+
var m, w, g;
|
|
2886
2909
|
const {
|
|
2887
2910
|
model: e,
|
|
2888
2911
|
data: t,
|
|
@@ -2890,35 +2913,35 @@ const z = new k("chat-toolbar-item"), qi = (n) => {
|
|
|
2890
2913
|
disabled: s = !1,
|
|
2891
2914
|
buttonType: a = "default",
|
|
2892
2915
|
onClick: o
|
|
2893
|
-
} = n, [r, u] =
|
|
2916
|
+
} = n, [r, u] = V(!1), h = O(null), d = (v) => typeof v.hidden == "function" ? v.hidden(t) : v.hidden === !0;
|
|
2894
2917
|
if (d(e))
|
|
2895
|
-
return /* @__PURE__ */ c(
|
|
2896
|
-
const l = (
|
|
2897
|
-
var
|
|
2898
|
-
if (typeof
|
|
2899
|
-
return
|
|
2900
|
-
if ((
|
|
2901
|
-
return /* @__PURE__ */ c("i", { className:
|
|
2902
|
-
if ((
|
|
2903
|
-
return
|
|
2918
|
+
return /* @__PURE__ */ c(Z, {});
|
|
2919
|
+
const l = (v) => s ? !0 : typeof v.disabled == "function" ? v.disabled(t) : v.disabled === !0, f = (v) => {
|
|
2920
|
+
var b, T, S, L;
|
|
2921
|
+
if (typeof v.icon == "function")
|
|
2922
|
+
return v.icon();
|
|
2923
|
+
if ((b = v.icon) != null && b.showIcon && ((T = v.icon) != null && T.cssClass))
|
|
2924
|
+
return /* @__PURE__ */ c("i", { className: v.icon.cssClass });
|
|
2925
|
+
if ((S = v.icon) != null && S.showIcon && ((L = v.icon) != null && L.imagePath))
|
|
2926
|
+
return lt(v.icon.imagePath) ? /* @__PURE__ */ c(
|
|
2904
2927
|
"div",
|
|
2905
2928
|
{
|
|
2906
2929
|
dangerouslySetInnerHTML: {
|
|
2907
|
-
__html:
|
|
2930
|
+
__html: v.icon.imagePath
|
|
2908
2931
|
}
|
|
2909
2932
|
}
|
|
2910
|
-
) : /* @__PURE__ */ c("img", { src:
|
|
2911
|
-
}, _ = (
|
|
2933
|
+
) : /* @__PURE__ */ c("img", { src: v.icon.imagePath });
|
|
2934
|
+
}, _ = (v) => {
|
|
2912
2935
|
l(e) || u(!0);
|
|
2913
|
-
}, p = (
|
|
2914
|
-
l(
|
|
2936
|
+
}, p = (v, b) => {
|
|
2937
|
+
l(b) || (u(!1), o(v, b));
|
|
2915
2938
|
};
|
|
2916
2939
|
return D(() => {
|
|
2917
|
-
const
|
|
2918
|
-
h.current && h.current.contains(
|
|
2940
|
+
const v = (b) => {
|
|
2941
|
+
h.current && h.current.contains(b.target) || u(!1);
|
|
2919
2942
|
};
|
|
2920
|
-
return r && document.addEventListener("mousedown",
|
|
2921
|
-
document.removeEventListener("mousedown",
|
|
2943
|
+
return r && document.addEventListener("mousedown", v), () => {
|
|
2944
|
+
document.removeEventListener("mousedown", v);
|
|
2922
2945
|
};
|
|
2923
2946
|
}, [r]), /* @__PURE__ */ c(
|
|
2924
2947
|
"div",
|
|
@@ -2933,48 +2956,48 @@ const z = new k("chat-toolbar-item"), qi = (n) => {
|
|
|
2933
2956
|
{
|
|
2934
2957
|
title: e.title,
|
|
2935
2958
|
className: z.e("content"),
|
|
2936
|
-
onClick: (
|
|
2959
|
+
onClick: (v) => p(v, e),
|
|
2937
2960
|
children: [
|
|
2938
2961
|
/* @__PURE__ */ c("div", { className: z.em("content", "icon"), children: f(e) }),
|
|
2939
2962
|
/* @__PURE__ */ c("div", { className: z.em("content", "label"), children: e.label })
|
|
2940
2963
|
]
|
|
2941
2964
|
}
|
|
2942
2965
|
),
|
|
2943
|
-
((
|
|
2966
|
+
((w = e.children) == null ? void 0 : w.length) && /* @__PURE__ */ c("div", { title: "更多", className: z.e("more"), onClick: _, children: /* @__PURE__ */ c(
|
|
2944
2967
|
"i",
|
|
2945
2968
|
{
|
|
2946
2969
|
"aria-hidden": "true",
|
|
2947
2970
|
className: "fa fa-angle-down ".concat(z.em("more", "icon"))
|
|
2948
2971
|
}
|
|
2949
2972
|
) }),
|
|
2950
|
-
r && /* @__PURE__ */ c("div", { ref: h, className: z.b("dropdown"), children: (
|
|
2951
|
-
if (!d(
|
|
2973
|
+
r && /* @__PURE__ */ c("div", { ref: h, className: z.b("dropdown"), children: (g = e.children) == null ? void 0 : g.map((v, b) => {
|
|
2974
|
+
if (!d(v))
|
|
2952
2975
|
return /* @__PURE__ */ c(
|
|
2953
2976
|
"div",
|
|
2954
2977
|
{
|
|
2955
|
-
title:
|
|
2956
|
-
onClick: (
|
|
2957
|
-
className: "".concat(z.be("dropdown", "item"), " ").concat(
|
|
2978
|
+
title: v.title,
|
|
2979
|
+
onClick: (T) => p(T, v),
|
|
2980
|
+
className: "".concat(z.be("dropdown", "item"), " ").concat(v.customClass || "", " ").concat(z.is("disabled", l(v))),
|
|
2958
2981
|
children: [
|
|
2959
|
-
/* @__PURE__ */ c("div", { className: z.bem("dropdown", "item", "icon"), children: f(
|
|
2960
|
-
/* @__PURE__ */ c("div", { className: z.bem("dropdown", "item", "label"), children:
|
|
2982
|
+
/* @__PURE__ */ c("div", { className: z.bem("dropdown", "item", "icon"), children: f(v) }),
|
|
2983
|
+
/* @__PURE__ */ c("div", { className: z.bem("dropdown", "item", "label"), children: v.label })
|
|
2961
2984
|
]
|
|
2962
2985
|
},
|
|
2963
|
-
|
|
2986
|
+
b
|
|
2964
2987
|
);
|
|
2965
2988
|
}) })
|
|
2966
2989
|
]
|
|
2967
2990
|
}
|
|
2968
2991
|
);
|
|
2969
2992
|
};
|
|
2970
|
-
const
|
|
2971
|
-
const { controller: e, items: t = [], data: i, type: s, className: a, mode: o } = n, r =
|
|
2993
|
+
const Zi = new k("chat-toolbar"), st = (n) => {
|
|
2994
|
+
const { controller: e, items: t = [], data: i, type: s, className: a, mode: o } = n, r = ut(Re);
|
|
2972
2995
|
let u = [];
|
|
2973
2996
|
const h = [
|
|
2974
2997
|
{
|
|
2975
2998
|
label: "重置对话",
|
|
2976
2999
|
title: "重置对话",
|
|
2977
|
-
icon: () => /* @__PURE__ */ c(
|
|
3000
|
+
icon: () => /* @__PURE__ */ c(Ei, {}),
|
|
2978
3001
|
onClick: () => {
|
|
2979
3002
|
e.resetTopic();
|
|
2980
3003
|
},
|
|
@@ -2982,7 +3005,7 @@ const Yi = new k("chat-toolbar"), nt = (n) => {
|
|
|
2982
3005
|
{
|
|
2983
3006
|
label: "清空对话",
|
|
2984
3007
|
title: "清空对话",
|
|
2985
|
-
icon: () => /* @__PURE__ */ c(
|
|
3008
|
+
icon: () => /* @__PURE__ */ c($i, {}),
|
|
2986
3009
|
onClick: () => {
|
|
2987
3010
|
e.clearTopic();
|
|
2988
3011
|
}
|
|
@@ -2991,9 +3014,11 @@ const Yi = new k("chat-toolbar"), nt = (n) => {
|
|
|
2991
3014
|
label: "新建对话",
|
|
2992
3015
|
title: "新建对话",
|
|
2993
3016
|
hidden: o !== "TOPIC",
|
|
2994
|
-
icon: () => /* @__PURE__ */ c(
|
|
3017
|
+
icon: () => /* @__PURE__ */ c(wi, {}),
|
|
2995
3018
|
onClick: () => {
|
|
2996
|
-
r.newTopic && r.newTopic(
|
|
3019
|
+
r.newTopic && r.newTopic(e.topicId, {
|
|
3020
|
+
activeAIAgentID: e.activeAIAgentID
|
|
3021
|
+
});
|
|
2997
3022
|
}
|
|
2998
3023
|
}
|
|
2999
3024
|
]
|
|
@@ -3010,7 +3035,7 @@ const Yi = new k("chat-toolbar"), nt = (n) => {
|
|
|
3010
3035
|
{
|
|
3011
3036
|
label: "删除",
|
|
3012
3037
|
title: "删除",
|
|
3013
|
-
icon: () => /* @__PURE__ */ c(
|
|
3038
|
+
icon: () => /* @__PURE__ */ c(pi, {}),
|
|
3014
3039
|
onClick: () => {
|
|
3015
3040
|
e.deleteMessage(i);
|
|
3016
3041
|
}
|
|
@@ -3018,7 +3043,7 @@ const Yi = new k("chat-toolbar"), nt = (n) => {
|
|
|
3018
3043
|
{
|
|
3019
3044
|
label: "复制",
|
|
3020
3045
|
title: "复制",
|
|
3021
|
-
icon: () => /* @__PURE__ */ c(
|
|
3046
|
+
icon: () => /* @__PURE__ */ c(fi, {}),
|
|
3022
3047
|
onClick: () => {
|
|
3023
3048
|
e.copyMessage(i);
|
|
3024
3049
|
}
|
|
@@ -3028,7 +3053,7 @@ const Yi = new k("chat-toolbar"), nt = (n) => {
|
|
|
3028
3053
|
{
|
|
3029
3054
|
label: "回填",
|
|
3030
3055
|
title: "回填",
|
|
3031
|
-
icon: () => /* @__PURE__ */ c(
|
|
3056
|
+
icon: () => /* @__PURE__ */ c(hi, {}),
|
|
3032
3057
|
onClick: () => {
|
|
3033
3058
|
e.backfill(i);
|
|
3034
3059
|
}
|
|
@@ -3056,24 +3081,24 @@ const Yi = new k("chat-toolbar"), nt = (n) => {
|
|
|
3056
3081
|
else
|
|
3057
3082
|
u = [...h, ...t];
|
|
3058
3083
|
const f = (p, m) => {
|
|
3059
|
-
const
|
|
3084
|
+
const w = {
|
|
3060
3085
|
...i
|
|
3061
3086
|
};
|
|
3062
|
-
if (i instanceof
|
|
3063
|
-
m.onClick(p, m, e.context, e.params,
|
|
3087
|
+
if (i instanceof le ? (Object.assign(w, { topic: e.topic }), w.msg.realcontent = i.realcontent) : (w.data || (w.data = {}), Object.assign(w.data, { messages: e.messages.value })), m.onClick && typeof m.onClick == "function")
|
|
3088
|
+
m.onClick(p, m, e.context, e.params, w);
|
|
3064
3089
|
else {
|
|
3065
|
-
const
|
|
3066
|
-
|
|
3090
|
+
const g = n.controller.opts.extendToolbarClick;
|
|
3091
|
+
g && typeof g == "function" && g(
|
|
3067
3092
|
p,
|
|
3068
3093
|
m,
|
|
3069
3094
|
e.context,
|
|
3070
3095
|
e.params,
|
|
3071
|
-
|
|
3096
|
+
w
|
|
3072
3097
|
);
|
|
3073
3098
|
}
|
|
3074
|
-
}, _ =
|
|
3075
|
-
return /* @__PURE__ */ c("div", { className: "".concat(
|
|
3076
|
-
|
|
3099
|
+
}, _ = J(() => 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]);
|
|
3100
|
+
return /* @__PURE__ */ c("div", { className: "".concat(Zi.b(), " ").concat(a || ""), children: u.map((p, m) => /* @__PURE__ */ c(
|
|
3101
|
+
Xi,
|
|
3077
3102
|
{
|
|
3078
3103
|
data: i,
|
|
3079
3104
|
model: p,
|
|
@@ -3084,7 +3109,7 @@ const Yi = new k("chat-toolbar"), nt = (n) => {
|
|
|
3084
3109
|
m
|
|
3085
3110
|
)) });
|
|
3086
3111
|
};
|
|
3087
|
-
function
|
|
3112
|
+
function Ji(n, e) {
|
|
3088
3113
|
let t = null;
|
|
3089
3114
|
return function(...i) {
|
|
3090
3115
|
t || (t = setTimeout(() => {
|
|
@@ -3092,8 +3117,8 @@ function Xi(n, e) {
|
|
|
3092
3117
|
}, e));
|
|
3093
3118
|
};
|
|
3094
3119
|
}
|
|
3095
|
-
const
|
|
3096
|
-
const e =
|
|
3120
|
+
const Ki = (n) => {
|
|
3121
|
+
const e = E(!1), t = E({}), i = new k("chat-back-bottom"), s = E(null), a = () => {
|
|
3097
3122
|
if (s.value) {
|
|
3098
3123
|
const u = n.visibilityHeight || 200, h = s.value.scrollHeight - s.value.scrollTop - s.value.offsetHeight;
|
|
3099
3124
|
e.value = h >= u;
|
|
@@ -3104,8 +3129,8 @@ const Zi = (n) => {
|
|
|
3104
3129
|
top: s.value.scrollHeight,
|
|
3105
3130
|
behavior: "smooth"
|
|
3106
3131
|
}), (u = n.onClick) == null || u.call(n));
|
|
3107
|
-
}, r =
|
|
3108
|
-
return
|
|
3132
|
+
}, r = Ji(a, 300);
|
|
3133
|
+
return J(() => {
|
|
3109
3134
|
t.value = {
|
|
3110
3135
|
right: "".concat(n.right, "px"),
|
|
3111
3136
|
bottom: "".concat(n.bottom, "px")
|
|
@@ -3122,12 +3147,12 @@ const Zi = (n) => {
|
|
|
3122
3147
|
className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
|
|
3123
3148
|
style: t.value,
|
|
3124
3149
|
onClick: o,
|
|
3125
|
-
children: /* @__PURE__ */ c(
|
|
3150
|
+
children: /* @__PURE__ */ c(Ni, { className: i.e("icon") })
|
|
3126
3151
|
}
|
|
3127
3152
|
);
|
|
3128
3153
|
};
|
|
3129
3154
|
const Et = new k("chat-messages"), Mt = (n) => {
|
|
3130
|
-
const e =
|
|
3155
|
+
const e = O(null), [t, i] = V(!0), s = O(!1), a = n.controller.messages, o = () => {
|
|
3131
3156
|
const h = e.current;
|
|
3132
3157
|
h && (s.current = !0, h.scrollTo({
|
|
3133
3158
|
top: h.scrollHeight,
|
|
@@ -3152,13 +3177,13 @@ const Et = new k("chat-messages"), Mt = (n) => {
|
|
|
3152
3177
|
var l;
|
|
3153
3178
|
const d = ((l = h.content) == null ? void 0 : l.length) || 0;
|
|
3154
3179
|
return h.role !== "SYSTEM" ? /* @__PURE__ */ c(
|
|
3155
|
-
|
|
3180
|
+
qi,
|
|
3156
3181
|
{
|
|
3157
3182
|
size: d,
|
|
3158
3183
|
message: h,
|
|
3159
3184
|
controller: n.controller,
|
|
3160
3185
|
children: /* @__PURE__ */ c(
|
|
3161
|
-
|
|
3186
|
+
st,
|
|
3162
3187
|
{
|
|
3163
3188
|
type: "content",
|
|
3164
3189
|
mode: "DEFAULT",
|
|
@@ -3172,7 +3197,7 @@ const Et = new k("chat-messages"), Mt = (n) => {
|
|
|
3172
3197
|
) : null;
|
|
3173
3198
|
}),
|
|
3174
3199
|
/* @__PURE__ */ c(
|
|
3175
|
-
|
|
3200
|
+
Ki,
|
|
3176
3201
|
{
|
|
3177
3202
|
right: 20,
|
|
3178
3203
|
bottom: 14,
|
|
@@ -3182,12 +3207,12 @@ const Et = new k("chat-messages"), Mt = (n) => {
|
|
|
3182
3207
|
)
|
|
3183
3208
|
] });
|
|
3184
3209
|
};
|
|
3185
|
-
function
|
|
3210
|
+
function Gi(n, e) {
|
|
3186
3211
|
for (var t in e)
|
|
3187
3212
|
n[t] = e[t];
|
|
3188
3213
|
return n;
|
|
3189
3214
|
}
|
|
3190
|
-
function
|
|
3215
|
+
function Dt(n, e) {
|
|
3191
3216
|
for (var t in n)
|
|
3192
3217
|
if (t !== "__source" && !(t in e))
|
|
3193
3218
|
return !0;
|
|
@@ -3196,52 +3221,52 @@ function At(n, e) {
|
|
|
3196
3221
|
return !0;
|
|
3197
3222
|
return !1;
|
|
3198
3223
|
}
|
|
3199
|
-
function
|
|
3224
|
+
function Lt(n, e) {
|
|
3200
3225
|
this.props = n, this.context = e;
|
|
3201
3226
|
}
|
|
3202
|
-
(
|
|
3203
|
-
return
|
|
3227
|
+
(Lt.prototype = new F()).isPureReactComponent = !0, Lt.prototype.shouldComponentUpdate = function(n, e) {
|
|
3228
|
+
return Dt(this.props, n) || Dt(this.state, e);
|
|
3204
3229
|
};
|
|
3205
|
-
var
|
|
3206
|
-
|
|
3207
|
-
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null),
|
|
3230
|
+
var Ht = C.__b;
|
|
3231
|
+
C.__b = function(n) {
|
|
3232
|
+
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Ht && Ht(n);
|
|
3208
3233
|
};
|
|
3209
|
-
var
|
|
3210
|
-
|
|
3234
|
+
var Qi = C.__e;
|
|
3235
|
+
C.__e = function(n, e, t, i) {
|
|
3211
3236
|
if (n.then) {
|
|
3212
3237
|
for (var s, a = e; a = a.__; )
|
|
3213
3238
|
if ((s = a.__c) && s.__c)
|
|
3214
3239
|
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
|
|
3215
3240
|
}
|
|
3216
|
-
|
|
3241
|
+
Qi(n, e, t, i);
|
|
3217
3242
|
};
|
|
3218
|
-
var
|
|
3219
|
-
function
|
|
3243
|
+
var zt = C.unmount;
|
|
3244
|
+
function Ln(n, e, t) {
|
|
3220
3245
|
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
|
|
3221
3246
|
typeof i.__c == "function" && i.__c();
|
|
3222
|
-
}), n.__c.__H = null), (n =
|
|
3223
|
-
return
|
|
3247
|
+
}), n.__c.__H = null), (n = Gi({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c.__e = !0, n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
|
|
3248
|
+
return Ln(i, e, t);
|
|
3224
3249
|
})), n;
|
|
3225
3250
|
}
|
|
3226
|
-
function
|
|
3251
|
+
function Hn(n, e, t) {
|
|
3227
3252
|
return n && t && (n.__v = null, n.__k = n.__k && n.__k.map(function(i) {
|
|
3228
|
-
return
|
|
3253
|
+
return Hn(i, e, t);
|
|
3229
3254
|
}), n.__c && n.__c.__P === e && (n.__e && t.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
3230
3255
|
}
|
|
3231
|
-
function
|
|
3256
|
+
function Je() {
|
|
3232
3257
|
this.__u = 0, this.o = null, this.__b = null;
|
|
3233
3258
|
}
|
|
3234
3259
|
function zn(n) {
|
|
3235
3260
|
var e = n.__.__c;
|
|
3236
3261
|
return e && e.__a && e.__a(n);
|
|
3237
3262
|
}
|
|
3238
|
-
function
|
|
3263
|
+
function Ne() {
|
|
3239
3264
|
this.i = null, this.l = null;
|
|
3240
3265
|
}
|
|
3241
|
-
|
|
3266
|
+
C.unmount = function(n) {
|
|
3242
3267
|
var e = n.__c;
|
|
3243
|
-
e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null),
|
|
3244
|
-
}, (
|
|
3268
|
+
e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null), zt && zt(n);
|
|
3269
|
+
}, (Je.prototype = new F()).__c = function(n, e) {
|
|
3245
3270
|
var t = e.__c, i = this;
|
|
3246
3271
|
i.o == null && (i.o = []), i.o.push(t);
|
|
3247
3272
|
var s = zn(i.__v), a = !1, o = function() {
|
|
@@ -3252,7 +3277,7 @@ y.unmount = function(n) {
|
|
|
3252
3277
|
if (!--i.__u) {
|
|
3253
3278
|
if (i.state.__a) {
|
|
3254
3279
|
var u = i.state.__a;
|
|
3255
|
-
i.__v.__k[0] =
|
|
3280
|
+
i.__v.__k[0] = Hn(u, u.__c.__P, u.__c.__O);
|
|
3256
3281
|
}
|
|
3257
3282
|
var h;
|
|
3258
3283
|
for (i.setState({ __a: i.__b = null }); h = i.o.pop(); )
|
|
@@ -3260,20 +3285,20 @@ y.unmount = function(n) {
|
|
|
3260
3285
|
}
|
|
3261
3286
|
};
|
|
3262
3287
|
i.__u++ || 32 & e.__u || i.setState({ __a: i.__b = i.__v.__k[0] }), n.then(o, o);
|
|
3263
|
-
},
|
|
3288
|
+
}, Je.prototype.componentWillUnmount = function() {
|
|
3264
3289
|
this.o = [];
|
|
3265
|
-
},
|
|
3290
|
+
}, Je.prototype.render = function(n, e) {
|
|
3266
3291
|
if (this.__b) {
|
|
3267
3292
|
if (this.__v.__k) {
|
|
3268
3293
|
var t = document.createElement("div"), i = this.__v.__k[0].__c;
|
|
3269
|
-
this.__v.__k[0] =
|
|
3294
|
+
this.__v.__k[0] = Ln(this.__b, t, i.__O = i.__P);
|
|
3270
3295
|
}
|
|
3271
3296
|
this.__b = null;
|
|
3272
3297
|
}
|
|
3273
|
-
var s = e.__a &&
|
|
3274
|
-
return s && (s.__u &= -33), [
|
|
3298
|
+
var s = e.__a && X(Z, null, n.fallback);
|
|
3299
|
+
return s && (s.__u &= -33), [X(Z, null, e.__a ? null : n.children), s];
|
|
3275
3300
|
};
|
|
3276
|
-
var
|
|
3301
|
+
var Ot = function(n, e, t) {
|
|
3277
3302
|
if (++t[1] === t[0] && n.l.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.l.size))
|
|
3278
3303
|
for (t = n.i; t; ) {
|
|
3279
3304
|
for (; t.length > 3; )
|
|
@@ -3283,15 +3308,15 @@ var zt = function(n, e, t) {
|
|
|
3283
3308
|
n.i = t = t[2];
|
|
3284
3309
|
}
|
|
3285
3310
|
};
|
|
3286
|
-
function
|
|
3311
|
+
function es(n) {
|
|
3287
3312
|
return this.getChildContext = function() {
|
|
3288
3313
|
return n.context;
|
|
3289
3314
|
}, n.children;
|
|
3290
3315
|
}
|
|
3291
|
-
function
|
|
3316
|
+
function ts(n) {
|
|
3292
3317
|
var e = this, t = n.h;
|
|
3293
3318
|
if (e.componentWillUnmount = function() {
|
|
3294
|
-
|
|
3319
|
+
ue(null, e.v), e.v = null, e.h = null;
|
|
3295
3320
|
}, e.h && e.h !== t && e.componentWillUnmount(), !e.v) {
|
|
3296
3321
|
for (var i = e.__v; i !== null && !i.__m && i.__ !== null; )
|
|
3297
3322
|
i = i.__;
|
|
@@ -3303,128 +3328,128 @@ function Ki(n) {
|
|
|
3303
3328
|
this.childNodes.splice(this.childNodes.indexOf(s) >>> 1, 1), e.h.removeChild(s);
|
|
3304
3329
|
} };
|
|
3305
3330
|
}
|
|
3306
|
-
|
|
3331
|
+
ue(X(es, { context: e.context }, n.__v), e.v);
|
|
3307
3332
|
}
|
|
3308
|
-
function
|
|
3309
|
-
var t =
|
|
3333
|
+
function ns(n, e) {
|
|
3334
|
+
var t = X(ts, { __v: n, h: e });
|
|
3310
3335
|
return t.containerInfo = e, t;
|
|
3311
3336
|
}
|
|
3312
|
-
(
|
|
3337
|
+
(Ne.prototype = new F()).__a = function(n) {
|
|
3313
3338
|
var e = this, t = zn(e.__v), i = e.l.get(n);
|
|
3314
3339
|
return i[0]++, function(s) {
|
|
3315
3340
|
var a = function() {
|
|
3316
|
-
e.props.revealOrder ? (i.push(s),
|
|
3341
|
+
e.props.revealOrder ? (i.push(s), Ot(e, n, i)) : s();
|
|
3317
3342
|
};
|
|
3318
3343
|
t ? t(a) : a();
|
|
3319
3344
|
};
|
|
3320
|
-
},
|
|
3345
|
+
}, Ne.prototype.render = function(n) {
|
|
3321
3346
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
3322
|
-
var e =
|
|
3347
|
+
var e = Le(n.children);
|
|
3323
3348
|
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
3324
3349
|
for (var t = e.length; t--; )
|
|
3325
3350
|
this.l.set(e[t], this.i = [1, 0, this.i]);
|
|
3326
3351
|
return n.children;
|
|
3327
|
-
},
|
|
3352
|
+
}, Ne.prototype.componentDidUpdate = Ne.prototype.componentDidMount = function() {
|
|
3328
3353
|
var n = this;
|
|
3329
3354
|
this.l.forEach(function(e, t) {
|
|
3330
|
-
|
|
3355
|
+
Ot(n, t, e);
|
|
3331
3356
|
});
|
|
3332
3357
|
};
|
|
3333
|
-
var
|
|
3358
|
+
var is = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, ss = /^(?: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]/, os = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, as = /[A-Z0-9]/g, rs = typeof document < "u", cs = function(n) {
|
|
3334
3359
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
3335
3360
|
};
|
|
3336
|
-
|
|
3337
|
-
Object.defineProperty(
|
|
3361
|
+
F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
3362
|
+
Object.defineProperty(F.prototype, n, { configurable: !0, get: function() {
|
|
3338
3363
|
return this["UNSAFE_" + n];
|
|
3339
3364
|
}, set: function(e) {
|
|
3340
3365
|
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
3341
3366
|
} });
|
|
3342
3367
|
});
|
|
3343
|
-
var
|
|
3344
|
-
function
|
|
3368
|
+
var Bt = C.event;
|
|
3369
|
+
function ls() {
|
|
3345
3370
|
}
|
|
3346
|
-
function
|
|
3371
|
+
function us() {
|
|
3347
3372
|
return this.cancelBubble;
|
|
3348
3373
|
}
|
|
3349
|
-
function
|
|
3374
|
+
function hs() {
|
|
3350
3375
|
return this.defaultPrevented;
|
|
3351
3376
|
}
|
|
3352
|
-
|
|
3353
|
-
return
|
|
3377
|
+
C.event = function(n) {
|
|
3378
|
+
return Bt && (n = Bt(n)), n.persist = ls, n.isPropagationStopped = us, n.isDefaultPrevented = hs, n.nativeEvent = n;
|
|
3354
3379
|
};
|
|
3355
|
-
var
|
|
3380
|
+
var ds = { enumerable: !1, configurable: !0, get: function() {
|
|
3356
3381
|
return this.class;
|
|
3357
|
-
} },
|
|
3358
|
-
|
|
3382
|
+
} }, Pt = C.vnode;
|
|
3383
|
+
C.vnode = function(n) {
|
|
3359
3384
|
typeof n.type == "string" && function(e) {
|
|
3360
3385
|
var t = e.props, i = e.type, s = {}, a = i.indexOf("-") === -1;
|
|
3361
3386
|
for (var o in t) {
|
|
3362
3387
|
var r = t[o];
|
|
3363
|
-
if (!(o === "value" && "defaultValue" in t && r == null ||
|
|
3388
|
+
if (!(o === "value" && "defaultValue" in t && r == null || rs && o === "children" && i === "noscript" || o === "class" || o === "className")) {
|
|
3364
3389
|
var u = o.toLowerCase();
|
|
3365
|
-
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && r === !0 ? r = "" : u === "translate" && r === "no" ? r = !1 : u[0] === "o" && u[1] === "n" ? u === "ondoubleclick" ? o = "ondblclick" : u !== "onchange" || i !== "input" && i !== "textarea" ||
|
|
3390
|
+
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && r === !0 ? r = "" : u === "translate" && r === "no" ? r = !1 : u[0] === "o" && u[1] === "n" ? u === "ondoubleclick" ? o = "ondblclick" : u !== "onchange" || i !== "input" && i !== "textarea" || cs(t.type) ? u === "onfocus" ? o = "onfocusin" : u === "onblur" ? o = "onfocusout" : os.test(o) && (o = u) : u = o = "oninput" : a && ss.test(o) ? o = o.replace(as, "-$&").toLowerCase() : r === null && (r = void 0), u === "oninput" && s[o = u] && (o = "oninputCapture"), s[o] = r;
|
|
3366
3391
|
}
|
|
3367
3392
|
}
|
|
3368
|
-
i == "select" && s.multiple && Array.isArray(s.value) && (s.value =
|
|
3393
|
+
i == "select" && s.multiple && Array.isArray(s.value) && (s.value = Le(t.children).forEach(function(h) {
|
|
3369
3394
|
h.props.selected = s.value.indexOf(h.props.value) != -1;
|
|
3370
|
-
})), i == "select" && s.defaultValue != null && (s.value =
|
|
3395
|
+
})), i == "select" && s.defaultValue != null && (s.value = Le(t.children).forEach(function(h) {
|
|
3371
3396
|
h.props.selected = s.multiple ? s.defaultValue.indexOf(h.props.value) != -1 : s.defaultValue == h.props.value;
|
|
3372
|
-
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className",
|
|
3373
|
-
}(n), n.$$typeof =
|
|
3397
|
+
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", ds)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
|
|
3398
|
+
}(n), n.$$typeof = is, Pt && Pt(n);
|
|
3374
3399
|
};
|
|
3375
|
-
var
|
|
3376
|
-
|
|
3377
|
-
|
|
3400
|
+
var Rt = C.__r;
|
|
3401
|
+
C.__r = function(n) {
|
|
3402
|
+
Rt && Rt(n), n.__c;
|
|
3378
3403
|
};
|
|
3379
|
-
var
|
|
3380
|
-
|
|
3381
|
-
|
|
3404
|
+
var Ft = C.diffed;
|
|
3405
|
+
C.diffed = function(n) {
|
|
3406
|
+
Ft && Ft(n);
|
|
3382
3407
|
var e = n.props, t = n.__e;
|
|
3383
3408
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
3384
3409
|
};
|
|
3385
|
-
var
|
|
3386
|
-
function
|
|
3387
|
-
var e =
|
|
3410
|
+
var Te = /* @__PURE__ */ new Map();
|
|
3411
|
+
function ps(n) {
|
|
3412
|
+
var e = Te.get(n);
|
|
3388
3413
|
e && e.destroy();
|
|
3389
3414
|
}
|
|
3390
|
-
function
|
|
3391
|
-
var e =
|
|
3415
|
+
function fs(n) {
|
|
3416
|
+
var e = Te.get(n);
|
|
3392
3417
|
e && e.update();
|
|
3393
3418
|
}
|
|
3394
|
-
var
|
|
3395
|
-
typeof window > "u" ? ((
|
|
3419
|
+
var ye = null;
|
|
3420
|
+
typeof window > "u" ? ((ye = function(n) {
|
|
3396
3421
|
return n;
|
|
3397
3422
|
}).destroy = function(n) {
|
|
3398
3423
|
return n;
|
|
3399
|
-
},
|
|
3424
|
+
}, ye.update = function(n) {
|
|
3400
3425
|
return n;
|
|
3401
|
-
}) : ((
|
|
3426
|
+
}) : ((ye = function(n, e) {
|
|
3402
3427
|
return n && Array.prototype.forEach.call(n.length ? n : [n], function(t) {
|
|
3403
3428
|
return function(i) {
|
|
3404
|
-
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !
|
|
3429
|
+
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !Te.has(i)) {
|
|
3405
3430
|
var s, a = null, o = window.getComputedStyle(i), r = (s = i.value, function() {
|
|
3406
3431
|
h({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
|
|
3407
3432
|
}), u = (function(l) {
|
|
3408
3433
|
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", d), i.removeEventListener("input", r), window.removeEventListener("resize", d), Object.keys(l).forEach(function(f) {
|
|
3409
3434
|
return i.style[f] = l[f];
|
|
3410
|
-
}),
|
|
3435
|
+
}), Te.delete(i);
|
|
3411
3436
|
}).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 });
|
|
3412
|
-
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", d), i.addEventListener("input", r), window.addEventListener("resize", d), i.style.overflowX = "hidden", i.style.wordWrap = "break-word",
|
|
3437
|
+
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", d), i.addEventListener("input", r), window.addEventListener("resize", d), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", Te.set(i, { destroy: u, update: d }), d();
|
|
3413
3438
|
}
|
|
3414
3439
|
function h(l) {
|
|
3415
|
-
var f, _, p = l.restoreTextAlign, m = p === void 0 ? null : p,
|
|
3416
|
-
if (i.scrollHeight !== 0 && (o.resize === "vertical" ? i.style.resize = "none" : o.resize === "both" && (i.style.resize = "horizontal"),
|
|
3417
|
-
for (var
|
|
3418
|
-
|
|
3440
|
+
var f, _, p = l.restoreTextAlign, m = p === void 0 ? null : p, w = l.testForHeightReduction, g = w === void 0 || w, v = o.overflowY;
|
|
3441
|
+
if (i.scrollHeight !== 0 && (o.resize === "vertical" ? i.style.resize = "none" : o.resize === "both" && (i.style.resize = "horizontal"), g && (f = function(T) {
|
|
3442
|
+
for (var S = []; T && T.parentNode && T.parentNode instanceof Element; )
|
|
3443
|
+
T.parentNode.scrollTop && S.push([T.parentNode, T.parentNode.scrollTop]), T = T.parentNode;
|
|
3419
3444
|
return function() {
|
|
3420
|
-
return
|
|
3421
|
-
var
|
|
3422
|
-
|
|
3445
|
+
return S.forEach(function(L) {
|
|
3446
|
+
var K = L[0], G = L[1];
|
|
3447
|
+
K.style.scrollBehavior = "auto", K.scrollTop = G, K.style.scrollBehavior = null;
|
|
3423
3448
|
});
|
|
3424
3449
|
};
|
|
3425
|
-
}(i), i.style.height = ""), _ = o.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(o.paddingTop) + parseFloat(o.paddingBottom)) : i.scrollHeight + parseFloat(o.borderTopWidth) + parseFloat(o.borderBottomWidth), o.maxHeight !== "none" && _ > parseFloat(o.maxHeight) ? (o.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(o.maxHeight)) : o.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", m && (i.style.textAlign = m), f && f(), a !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), a = _),
|
|
3426
|
-
var
|
|
3427
|
-
o.overflow === "hidden" && (i.style.textAlign =
|
|
3450
|
+
}(i), i.style.height = ""), _ = o.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(o.paddingTop) + parseFloat(o.paddingBottom)) : i.scrollHeight + parseFloat(o.borderTopWidth) + parseFloat(o.borderBottomWidth), o.maxHeight !== "none" && _ > parseFloat(o.maxHeight) ? (o.overflowY === "hidden" && (i.style.overflow = "scroll"), _ = parseFloat(o.maxHeight)) : o.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = _ + "px", m && (i.style.textAlign = m), f && f(), a !== _ && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), a = _), v !== o.overflow && !m)) {
|
|
3451
|
+
var b = o.textAlign;
|
|
3452
|
+
o.overflow === "hidden" && (i.style.textAlign = b === "start" ? "end" : "start"), h({ restoreTextAlign: b, testForHeightReduction: !0 });
|
|
3428
3453
|
}
|
|
3429
3454
|
}
|
|
3430
3455
|
function d() {
|
|
@@ -3433,12 +3458,12 @@ typeof window > "u" ? ((we = function(n) {
|
|
|
3433
3458
|
}(t);
|
|
3434
3459
|
}), n;
|
|
3435
3460
|
}).destroy = function(n) {
|
|
3436
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3437
|
-
},
|
|
3438
|
-
return n && Array.prototype.forEach.call(n.length ? n : [n],
|
|
3461
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], ps), n;
|
|
3462
|
+
}, ye.update = function(n) {
|
|
3463
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], fs), n;
|
|
3439
3464
|
});
|
|
3440
|
-
var
|
|
3441
|
-
class
|
|
3465
|
+
var Ut = ye, I = /* @__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))(I || {});
|
|
3466
|
+
class Wt {
|
|
3442
3467
|
/**
|
|
3443
3468
|
* Creates an instance of AiChatController.
|
|
3444
3469
|
*
|
|
@@ -3451,7 +3476,7 @@ class Ft {
|
|
|
3451
3476
|
* 事件触发器
|
|
3452
3477
|
* @type {EventBase}
|
|
3453
3478
|
*/
|
|
3454
|
-
|
|
3479
|
+
x(this, "evt", new Fn());
|
|
3455
3480
|
/**
|
|
3456
3481
|
* 聊天记录
|
|
3457
3482
|
*
|
|
@@ -3459,7 +3484,7 @@ class Ft {
|
|
|
3459
3484
|
* @date 2023-10-16 16:10:29
|
|
3460
3485
|
* @type {Signal<ChatMessage[]>}
|
|
3461
3486
|
*/
|
|
3462
|
-
|
|
3487
|
+
x(this, "messages", q([]));
|
|
3463
3488
|
/**
|
|
3464
3489
|
* 素材列表
|
|
3465
3490
|
*
|
|
@@ -3467,7 +3492,7 @@ class Ft {
|
|
|
3467
3492
|
* @date 2025-02-27 18:02:46
|
|
3468
3493
|
* @type {Signal<IMaterial[]>}
|
|
3469
3494
|
*/
|
|
3470
|
-
|
|
3495
|
+
x(this, "materials", q([]));
|
|
3471
3496
|
/**
|
|
3472
3497
|
* 聊天框输入值
|
|
3473
3498
|
*
|
|
@@ -3475,7 +3500,7 @@ class Ft {
|
|
|
3475
3500
|
* @date 2023-10-16 15:10:43
|
|
3476
3501
|
* @type {Signal<string>}
|
|
3477
3502
|
*/
|
|
3478
|
-
|
|
3503
|
+
x(this, "input", q(""));
|
|
3479
3504
|
/**
|
|
3480
3505
|
* 是否加载中
|
|
3481
3506
|
*
|
|
@@ -3483,7 +3508,19 @@ class Ft {
|
|
|
3483
3508
|
* @date 2025-03-10 18:03:42
|
|
3484
3509
|
* @type {Signal<boolean>}
|
|
3485
3510
|
*/
|
|
3486
|
-
|
|
3511
|
+
x(this, "isLoading", q(!1));
|
|
3512
|
+
/**
|
|
3513
|
+
* 激活AI代理标识
|
|
3514
|
+
*
|
|
3515
|
+
* @type {(string | undefined)}
|
|
3516
|
+
*/
|
|
3517
|
+
x(this, "activeAIAgentID");
|
|
3518
|
+
/**
|
|
3519
|
+
* AI代理列表
|
|
3520
|
+
*
|
|
3521
|
+
* @type {Signal<AIAgent[]>}
|
|
3522
|
+
*/
|
|
3523
|
+
x(this, "agentList", q([]));
|
|
3487
3524
|
/**
|
|
3488
3525
|
* 视图参数
|
|
3489
3526
|
*
|
|
@@ -3491,7 +3528,7 @@ class Ft {
|
|
|
3491
3528
|
* @date 2025-02-24 14:02:23
|
|
3492
3529
|
* @type {object}
|
|
3493
3530
|
*/
|
|
3494
|
-
|
|
3531
|
+
x(this, "context");
|
|
3495
3532
|
/**
|
|
3496
3533
|
* 视图参数
|
|
3497
3534
|
*
|
|
@@ -3499,7 +3536,7 @@ class Ft {
|
|
|
3499
3536
|
* @date 2025-02-24 14:02:32
|
|
3500
3537
|
* @type {object}
|
|
3501
3538
|
*/
|
|
3502
|
-
|
|
3539
|
+
x(this, "params");
|
|
3503
3540
|
/**
|
|
3504
3541
|
* 应用实体标记
|
|
3505
3542
|
*
|
|
@@ -3507,7 +3544,7 @@ class Ft {
|
|
|
3507
3544
|
* @date 2025-02-24 14:02:10
|
|
3508
3545
|
* @type {string}
|
|
3509
3546
|
*/
|
|
3510
|
-
|
|
3547
|
+
x(this, "appDataEntityId");
|
|
3511
3548
|
/**
|
|
3512
3549
|
* 话题标识
|
|
3513
3550
|
*
|
|
@@ -3515,7 +3552,7 @@ class Ft {
|
|
|
3515
3552
|
* @date 2025-02-24 18:02:02
|
|
3516
3553
|
* @type {(string | undefined)}
|
|
3517
3554
|
*/
|
|
3518
|
-
|
|
3555
|
+
x(this, "topicId");
|
|
3519
3556
|
/**
|
|
3520
3557
|
* 话题数据
|
|
3521
3558
|
*
|
|
@@ -3523,14 +3560,42 @@ class Ft {
|
|
|
3523
3560
|
* @date 2025-03-10 16:03:26
|
|
3524
3561
|
* @type {(ITopic | undefined)}
|
|
3525
3562
|
*/
|
|
3526
|
-
|
|
3563
|
+
x(this, "topic");
|
|
3527
3564
|
/**
|
|
3528
3565
|
* @description 聊天sessionid
|
|
3529
3566
|
* @type {string}
|
|
3530
3567
|
* @memberof AiChatController
|
|
3531
3568
|
*/
|
|
3532
|
-
|
|
3533
|
-
this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.
|
|
3569
|
+
x(this, "chatSessionid", "");
|
|
3570
|
+
this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.activeAIAgentID = e.activeAIAgentID, this.initAIChat();
|
|
3571
|
+
}
|
|
3572
|
+
/**
|
|
3573
|
+
* 重置聊天
|
|
3574
|
+
*/
|
|
3575
|
+
reSetAIChat() {
|
|
3576
|
+
this.messages.value = [], this.topicId ? this.chatSessionid = yt(this.topicId) : this.chatSessionid = yt(he());
|
|
3577
|
+
}
|
|
3578
|
+
/**
|
|
3579
|
+
* 初始化
|
|
3580
|
+
*/
|
|
3581
|
+
async initAIChat() {
|
|
3582
|
+
this.reSetAIChat(), await this.initAIChatAgent(), await this.fecthHistory();
|
|
3583
|
+
}
|
|
3584
|
+
/**
|
|
3585
|
+
* 初始化AI代理列表
|
|
3586
|
+
*/
|
|
3587
|
+
async initAIChatAgent() {
|
|
3588
|
+
this.opts.aiAgentlist && this.opts.aiAgentlist.length > 0 && this.opts.aiAgentlist.forEach((e) => {
|
|
3589
|
+
this.agentList.value = [...this.agentList.value, new Yi(e)];
|
|
3590
|
+
});
|
|
3591
|
+
}
|
|
3592
|
+
/**
|
|
3593
|
+
* 获取历史记录存储key(用于适配不同智能体存在不同的历史记录)
|
|
3594
|
+
* @param topicId 话题标识
|
|
3595
|
+
* @returns 历史存储key
|
|
3596
|
+
*/
|
|
3597
|
+
getHistoryStoreKey(e) {
|
|
3598
|
+
return "".concat(e);
|
|
3534
3599
|
}
|
|
3535
3600
|
/**
|
|
3536
3601
|
* 获取历史记录
|
|
@@ -3541,10 +3606,10 @@ class Ft {
|
|
|
3541
3606
|
*/
|
|
3542
3607
|
async fecthHistory() {
|
|
3543
3608
|
if (this.topicId) {
|
|
3544
|
-
const t = await
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
this.topicId
|
|
3609
|
+
const t = await R.getData(
|
|
3610
|
+
I.DATA_BASE_NAME,
|
|
3611
|
+
I.DATA_TABLE_NAME,
|
|
3612
|
+
this.getHistoryStoreKey(this.topicId)
|
|
3548
3613
|
);
|
|
3549
3614
|
if (t && t.data && t.data.length > 0)
|
|
3550
3615
|
return t.data.forEach((i) => {
|
|
@@ -3559,34 +3624,38 @@ class Ft {
|
|
|
3559
3624
|
toolcalls: i.toolcalls
|
|
3560
3625
|
};
|
|
3561
3626
|
this.addMessage(s);
|
|
3562
|
-
}), !0;
|
|
3627
|
+
}), await this.afterFecthHistory(), !0;
|
|
3563
3628
|
}
|
|
3564
|
-
|
|
3629
|
+
return await this.opts.history(this.context, this.params, {
|
|
3565
3630
|
appDataEntityId: this.appDataEntityId,
|
|
3566
3631
|
appendCurData: this.opts.appendCurData,
|
|
3567
|
-
sessionid: this.chatSessionid
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
this.opts.appendCurContent
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3632
|
+
sessionid: this.chatSessionid,
|
|
3633
|
+
srfaiagent: this.activeAIAgentID
|
|
3634
|
+
}) && await this.afterFecthHistory(), !0;
|
|
3635
|
+
}
|
|
3636
|
+
/**
|
|
3637
|
+
* 获取历史记录后续处理
|
|
3638
|
+
*/
|
|
3639
|
+
async afterFecthHistory() {
|
|
3640
|
+
if (this.opts.appendCurContent && this.addMessage({
|
|
3641
|
+
state: 30,
|
|
3642
|
+
messageid: he(),
|
|
3643
|
+
role: "USER",
|
|
3644
|
+
type: "DEFAULT",
|
|
3645
|
+
content: this.opts.appendCurContent,
|
|
3646
|
+
completed: !0
|
|
3647
|
+
}), this.opts.autoQuestion !== !1) {
|
|
3648
|
+
const e = this.messages.value[this.messages.value.length - 1];
|
|
3649
|
+
e && e.role === "USER" && (await this.opts.question(
|
|
3650
|
+
this,
|
|
3651
|
+
this.context,
|
|
3652
|
+
this.params,
|
|
3653
|
+
{ appDataEntityId: this.appDataEntityId },
|
|
3654
|
+
this.getMessages(),
|
|
3655
|
+
this.chatSessionid,
|
|
3656
|
+
this.activeAIAgentID
|
|
3657
|
+
), this.opts.action && await this.opts.action("question", e.content));
|
|
3588
3658
|
}
|
|
3589
|
-
return !0;
|
|
3590
3659
|
}
|
|
3591
3660
|
/**
|
|
3592
3661
|
* 更新数据到indexdb
|
|
@@ -3599,13 +3668,13 @@ class Ft {
|
|
|
3599
3668
|
if (!this.topicId)
|
|
3600
3669
|
return;
|
|
3601
3670
|
const e = {
|
|
3602
|
-
id: this.topicId,
|
|
3671
|
+
id: this.getHistoryStoreKey(this.topicId),
|
|
3603
3672
|
data: this.messages.value.map((t) => ({ ...t._origin, toolcalls: t.toolcalls })),
|
|
3604
3673
|
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
3605
3674
|
};
|
|
3606
|
-
await
|
|
3607
|
-
|
|
3608
|
-
|
|
3675
|
+
await R.updateData(
|
|
3676
|
+
I.DATA_BASE_NAME,
|
|
3677
|
+
I.DATA_TABLE_NAME,
|
|
3609
3678
|
e
|
|
3610
3679
|
);
|
|
3611
3680
|
}
|
|
@@ -3630,7 +3699,7 @@ class Ft {
|
|
|
3630
3699
|
const t = this.messages.value.find(
|
|
3631
3700
|
(i) => i.messageid === e.messageid
|
|
3632
3701
|
);
|
|
3633
|
-
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new
|
|
3702
|
+
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new le(e)], this.asyncToIndexDB();
|
|
3634
3703
|
}
|
|
3635
3704
|
/**
|
|
3636
3705
|
* 更新消息完成状态
|
|
@@ -3662,7 +3731,7 @@ class Ft {
|
|
|
3662
3731
|
const t = this.messages.value.findIndex(
|
|
3663
3732
|
(i) => i.messageid === e.messageid
|
|
3664
3733
|
);
|
|
3665
|
-
t !== -1 ? (this.messages.value[t].replace(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new
|
|
3734
|
+
t !== -1 ? (this.messages.value[t].replace(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new le(e)], this.asyncToIndexDB(), e.type === "DEFAULT" && this.opts.recommendPrompt && this.opts.recommendPrompt(this.context, this.params, {
|
|
3666
3735
|
appDataEntityId: this.appDataEntityId,
|
|
3667
3736
|
message: { messages: [e], sessionid: this.chatSessionid }
|
|
3668
3737
|
}).then((i) => {
|
|
@@ -3684,7 +3753,7 @@ class Ft {
|
|
|
3684
3753
|
const i = this.messages.value[t];
|
|
3685
3754
|
e.content = i.content, this.messages.value[t].replace(e), this.messages.value = [...this.messages.value];
|
|
3686
3755
|
} else
|
|
3687
|
-
this.messages.value = [...this.messages.value, new
|
|
3756
|
+
this.messages.value = [...this.messages.value, new le(e)];
|
|
3688
3757
|
await this.asyncToIndexDB();
|
|
3689
3758
|
}
|
|
3690
3759
|
/**
|
|
@@ -3703,7 +3772,7 @@ class Ft {
|
|
|
3703
3772
|
s.state && s.state === "successed" && t.push(i);
|
|
3704
3773
|
} else
|
|
3705
3774
|
t.push(i);
|
|
3706
|
-
}), this.materials.value = []), t && t.length > 0 && (e =
|
|
3775
|
+
}), this.materials.value = []), t && t.length > 0 && (e = fn.stringify(t)), e;
|
|
3707
3776
|
}
|
|
3708
3777
|
/**
|
|
3709
3778
|
* @description 获取当前会话的消息集合
|
|
@@ -3733,7 +3802,7 @@ class Ft {
|
|
|
3733
3802
|
let t = this.stringlyMaterialResource();
|
|
3734
3803
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
3735
3804
|
state: 30,
|
|
3736
|
-
messageid:
|
|
3805
|
+
messageid: he(),
|
|
3737
3806
|
role: "USER",
|
|
3738
3807
|
type: "DEFAULT",
|
|
3739
3808
|
content: t
|
|
@@ -3743,7 +3812,8 @@ class Ft {
|
|
|
3743
3812
|
this.params,
|
|
3744
3813
|
{ appDataEntityId: this.appDataEntityId },
|
|
3745
3814
|
this.getMessages(),
|
|
3746
|
-
this.chatSessionid
|
|
3815
|
+
this.chatSessionid,
|
|
3816
|
+
this.activeAIAgentID
|
|
3747
3817
|
), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
3748
3818
|
} finally {
|
|
3749
3819
|
this.isLoading.value = !1;
|
|
@@ -3803,7 +3873,8 @@ class Ft {
|
|
|
3803
3873
|
this.params,
|
|
3804
3874
|
{ appDataEntityId: this.appDataEntityId },
|
|
3805
3875
|
this.getMessages(),
|
|
3806
|
-
this.chatSessionid
|
|
3876
|
+
this.chatSessionid,
|
|
3877
|
+
this.activeAIAgentID
|
|
3807
3878
|
);
|
|
3808
3879
|
else if (i === this.messages.value.length - 1)
|
|
3809
3880
|
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(
|
|
@@ -3812,7 +3883,8 @@ class Ft {
|
|
|
3812
3883
|
this.params,
|
|
3813
3884
|
{ appDataEntityId: this.appDataEntityId },
|
|
3814
3885
|
this.getMessages(),
|
|
3815
|
-
this.chatSessionid
|
|
3886
|
+
this.chatSessionid,
|
|
3887
|
+
this.activeAIAgentID
|
|
3816
3888
|
);
|
|
3817
3889
|
else {
|
|
3818
3890
|
const s = this.messages.value[i - 1].content;
|
|
@@ -3831,7 +3903,7 @@ class Ft {
|
|
|
3831
3903
|
*/
|
|
3832
3904
|
copyMessage(e) {
|
|
3833
3905
|
const t = e.realcontent;
|
|
3834
|
-
|
|
3906
|
+
pn.copy(t), this.opts.action && this.opts.action("copymsg", e);
|
|
3835
3907
|
}
|
|
3836
3908
|
/**
|
|
3837
3909
|
* 重置对话
|
|
@@ -3839,15 +3911,11 @@ class Ft {
|
|
|
3839
3911
|
* @memberof AiChatController
|
|
3840
3912
|
*/
|
|
3841
3913
|
async resetTopic() {
|
|
3842
|
-
await this.abortQuestion(), this.topicId && await
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
this.topicId
|
|
3846
|
-
), this.
|
|
3847
|
-
appDataEntityId: this.appDataEntityId,
|
|
3848
|
-
appendCurData: this.opts.appendCurData,
|
|
3849
|
-
sessionid: this.chatSessionid
|
|
3850
|
-
});
|
|
3914
|
+
await this.abortQuestion(), this.topicId && await R.deleteData(
|
|
3915
|
+
I.DATA_BASE_NAME,
|
|
3916
|
+
I.DATA_TABLE_NAME,
|
|
3917
|
+
this.getHistoryStoreKey(this.topicId)
|
|
3918
|
+
), this.reSetAIChat(), await this.fecthHistory();
|
|
3851
3919
|
}
|
|
3852
3920
|
/**
|
|
3853
3921
|
* 清空对话
|
|
@@ -3856,10 +3924,10 @@ class Ft {
|
|
|
3856
3924
|
* @date 2025-03-18 17:03:57
|
|
3857
3925
|
*/
|
|
3858
3926
|
async clearTopic() {
|
|
3859
|
-
await this.abortQuestion(), this.topicId && await
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
this.topicId
|
|
3927
|
+
await this.abortQuestion(), this.topicId && await R.deleteData(
|
|
3928
|
+
I.DATA_BASE_NAME,
|
|
3929
|
+
I.DATA_TABLE_NAME,
|
|
3930
|
+
this.getHistoryStoreKey(this.topicId)
|
|
3863
3931
|
), this.messages.value = [];
|
|
3864
3932
|
}
|
|
3865
3933
|
/**
|
|
@@ -3870,7 +3938,7 @@ class Ft {
|
|
|
3870
3938
|
* @param {IMaterial} data
|
|
3871
3939
|
*/
|
|
3872
3940
|
addMaterial(e) {
|
|
3873
|
-
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new
|
|
3941
|
+
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new Ze(e)];
|
|
3874
3942
|
}
|
|
3875
3943
|
/**
|
|
3876
3944
|
* 替换素材资源
|
|
@@ -3882,7 +3950,7 @@ class Ft {
|
|
|
3882
3950
|
*/
|
|
3883
3951
|
replaceMaterial(e, t) {
|
|
3884
3952
|
const i = this.materials.value.findIndex((s) => s.id === e);
|
|
3885
|
-
i !== -1 ? (this.materials.value[i] = new
|
|
3953
|
+
i !== -1 ? (this.materials.value[i] = new Ze(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new Ze(t)];
|
|
3886
3954
|
}
|
|
3887
3955
|
/**
|
|
3888
3956
|
* 删除指定素材资源
|
|
@@ -3908,8 +3976,8 @@ class Ft {
|
|
|
3908
3976
|
return;
|
|
3909
3977
|
const i = this.messages.value.findIndex(
|
|
3910
3978
|
(a) => a.messageid === e.messageid
|
|
3911
|
-
), { suggestions: s } =
|
|
3912
|
-
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i]
|
|
3979
|
+
), { suggestions: s } = ei.parseMixedContent(t);
|
|
3980
|
+
s && s.length > 0 && (e.suggestions = s, i !== -1 ? (this.messages.value[i] = new le(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new le(e)], this.asyncToIndexDB());
|
|
3913
3981
|
}
|
|
3914
3982
|
/**
|
|
3915
3983
|
* 处理建议点击
|
|
@@ -3954,6 +4022,17 @@ class Ft {
|
|
|
3954
4022
|
throw new Error("不支持".concat(a, "推荐类型"));
|
|
3955
4023
|
}
|
|
3956
4024
|
}
|
|
4025
|
+
/**
|
|
4026
|
+
* 设置当前激活的AI助手ID
|
|
4027
|
+
* @param agentID
|
|
4028
|
+
*/
|
|
4029
|
+
async setActiveAIAgentID(e) {
|
|
4030
|
+
this.activeAIAgentID = e, this.reSetAIChat(), this.topicId && await R.deleteData(
|
|
4031
|
+
I.DATA_BASE_NAME,
|
|
4032
|
+
I.DATA_TABLE_NAME,
|
|
4033
|
+
this.getHistoryStoreKey(this.topicId)
|
|
4034
|
+
), this.fecthHistory();
|
|
4035
|
+
}
|
|
3957
4036
|
/**
|
|
3958
4037
|
* 销毁
|
|
3959
4038
|
*
|
|
@@ -3964,7 +4043,7 @@ class Ft {
|
|
|
3964
4043
|
this.evt.reset();
|
|
3965
4044
|
}
|
|
3966
4045
|
}
|
|
3967
|
-
class
|
|
4046
|
+
class vs {
|
|
3968
4047
|
/**
|
|
3969
4048
|
* Creates an instance of AiTopicController.
|
|
3970
4049
|
* @author tony001
|
|
@@ -3979,7 +4058,7 @@ class ps {
|
|
|
3979
4058
|
* @date 2025-02-20 16:02:38
|
|
3980
4059
|
* @type {Signal<ChatTopic[]>}
|
|
3981
4060
|
*/
|
|
3982
|
-
|
|
4061
|
+
x(this, "topics", q([]));
|
|
3983
4062
|
/**
|
|
3984
4063
|
* 激活话题
|
|
3985
4064
|
*
|
|
@@ -3987,7 +4066,7 @@ class ps {
|
|
|
3987
4066
|
* @date 2025-02-24 16:02:44
|
|
3988
4067
|
* @type {(Signal<ITopic | undefined>)}
|
|
3989
4068
|
*/
|
|
3990
|
-
|
|
4069
|
+
x(this, "activedTopic", q(void 0));
|
|
3991
4070
|
/**
|
|
3992
4071
|
* 当前话题配置备份
|
|
3993
4072
|
*
|
|
@@ -3996,7 +4075,7 @@ class ps {
|
|
|
3996
4075
|
* @public
|
|
3997
4076
|
* @type {(ITopicOptions | undefined)}
|
|
3998
4077
|
*/
|
|
3999
|
-
|
|
4078
|
+
x(this, "currentTopicOptions");
|
|
4000
4079
|
this.chat = e;
|
|
4001
4080
|
}
|
|
4002
4081
|
/**
|
|
@@ -4007,15 +4086,55 @@ class ps {
|
|
|
4007
4086
|
* @return {*} {Promise<void>}
|
|
4008
4087
|
*/
|
|
4009
4088
|
async fetchHistory(e) {
|
|
4089
|
+
this.topics.value = [];
|
|
4010
4090
|
const i = await e.configService(
|
|
4011
4091
|
e.appid,
|
|
4012
4092
|
"aitopics",
|
|
4013
4093
|
e.type
|
|
4014
4094
|
).load();
|
|
4015
4095
|
i && i.length > 0 && i.forEach((s) => {
|
|
4016
|
-
this.topics.value = [...this.topics.value, new
|
|
4096
|
+
this.topics.value = [...this.topics.value, new we(s)];
|
|
4017
4097
|
});
|
|
4018
4098
|
}
|
|
4099
|
+
/**
|
|
4100
|
+
* 获取指定标识话题
|
|
4101
|
+
* @param topicid
|
|
4102
|
+
* @returns
|
|
4103
|
+
*/
|
|
4104
|
+
getCurrentTopicByID(e) {
|
|
4105
|
+
return this.topics.value.find((t) => t.id === e);
|
|
4106
|
+
}
|
|
4107
|
+
/**
|
|
4108
|
+
* 基于话题标识更新当前话题
|
|
4109
|
+
* @param topicid 话题标识
|
|
4110
|
+
*/
|
|
4111
|
+
async updateCurrentTopicByID(e, t) {
|
|
4112
|
+
if (!e || !t || t && !t.activeAIAgentID || !this.currentTopicOptions)
|
|
4113
|
+
return;
|
|
4114
|
+
const i = this.topics.value.findIndex(
|
|
4115
|
+
(o) => o.id === e
|
|
4116
|
+
);
|
|
4117
|
+
if (i === -1 || !this.topics.value[i].data.aiChat)
|
|
4118
|
+
return;
|
|
4119
|
+
this.topics.value[i].data.aiChat = {
|
|
4120
|
+
...this.topics.value[i].data.aiChat,
|
|
4121
|
+
activeAIAgentID: t.activeAIAgentID
|
|
4122
|
+
};
|
|
4123
|
+
const s = this.topics.value.map((o) => ({
|
|
4124
|
+
appid: o.appid,
|
|
4125
|
+
id: o.id,
|
|
4126
|
+
type: o.type,
|
|
4127
|
+
caption: o.caption,
|
|
4128
|
+
sourceCaption: o.sourceCaption,
|
|
4129
|
+
url: o.url,
|
|
4130
|
+
aiChat: o.aiChat
|
|
4131
|
+
})), a = this.currentTopicOptions.configService(
|
|
4132
|
+
this.currentTopicOptions.appid,
|
|
4133
|
+
"aitopics",
|
|
4134
|
+
this.currentTopicOptions.type
|
|
4135
|
+
);
|
|
4136
|
+
await (a == null ? void 0 : a.save(s));
|
|
4137
|
+
}
|
|
4019
4138
|
/**
|
|
4020
4139
|
* 更新当前话题
|
|
4021
4140
|
*
|
|
@@ -4028,8 +4147,8 @@ class ps {
|
|
|
4028
4147
|
this.currentTopicOptions = e;
|
|
4029
4148
|
const t = this.topics.value.findIndex(
|
|
4030
4149
|
(o) => o.id === e.id
|
|
4031
|
-
), i = new
|
|
4032
|
-
t !== -1 ? this.topics.value.splice(t, 1, new
|
|
4150
|
+
), i = new we(e);
|
|
4151
|
+
t !== -1 ? this.topics.value.splice(t, 1, new we(e)) : this.topics.value = [...this.topics.value, new we(e)];
|
|
4033
4152
|
const s = this.topics.value.map((o) => ({
|
|
4034
4153
|
appid: o.appid,
|
|
4035
4154
|
id: o.id,
|
|
@@ -4079,9 +4198,9 @@ class ps {
|
|
|
4079
4198
|
"aitopics",
|
|
4080
4199
|
e.type
|
|
4081
4200
|
);
|
|
4082
|
-
await (h == null ? void 0 : h.save(u)), await
|
|
4083
|
-
|
|
4084
|
-
|
|
4201
|
+
await (h == null ? void 0 : h.save(u)), await R.deleteData(
|
|
4202
|
+
I.DATA_BASE_NAME,
|
|
4203
|
+
I.DATA_TABLE_NAME,
|
|
4085
4204
|
s.id
|
|
4086
4205
|
), this.topics.value.length > 0 && s.id === ((d = this.activedTopic.value) == null ? void 0 : d.id) && this.handleTopicChange(this.topics.value[0]);
|
|
4087
4206
|
}
|
|
@@ -4151,37 +4270,44 @@ class ps {
|
|
|
4151
4270
|
* @date 2025-03-18 18:03:49
|
|
4152
4271
|
* @return {*} {Promise<void>}
|
|
4153
4272
|
*/
|
|
4154
|
-
async newTopic() {
|
|
4155
|
-
var
|
|
4156
|
-
const e = this.activedTopic.value;
|
|
4273
|
+
async newTopic(e, t) {
|
|
4274
|
+
var d, l;
|
|
4157
4275
|
if (!e)
|
|
4158
4276
|
return;
|
|
4159
|
-
const
|
|
4160
|
-
|
|
4277
|
+
const i = this.topics.value.find((f) => f.id === e);
|
|
4278
|
+
if (!i)
|
|
4279
|
+
return;
|
|
4280
|
+
const s = i.id.split("@")[0], a = this.topics.value.filter((f) => f.id.startsWith(s));
|
|
4281
|
+
t.activeAIAgentID && i.aiChat && (i.data.aiChat = {
|
|
4282
|
+
...i.aiChat,
|
|
4283
|
+
activeAIAgentID: t.activeAIAgentID
|
|
4284
|
+
});
|
|
4285
|
+
const o = {
|
|
4286
|
+
appid: i.appid,
|
|
4161
4287
|
// 源头数据id@当前时间戳
|
|
4162
|
-
id: "".concat(
|
|
4163
|
-
type:
|
|
4288
|
+
id: "".concat(s, "@").concat(Date.now()),
|
|
4289
|
+
type: i.type,
|
|
4164
4290
|
// 源头数据标题_当前话题数量(这儿源头数据可能已经被删除)
|
|
4165
|
-
caption: "".concat((
|
|
4166
|
-
sourceCaption:
|
|
4167
|
-
url:
|
|
4168
|
-
aiChat:
|
|
4169
|
-
},
|
|
4170
|
-
this.topics.value = [...this.topics.value,
|
|
4171
|
-
const
|
|
4172
|
-
appid:
|
|
4173
|
-
id:
|
|
4174
|
-
type:
|
|
4175
|
-
caption:
|
|
4176
|
-
sourceCaption:
|
|
4177
|
-
url:
|
|
4178
|
-
aiChat:
|
|
4179
|
-
})),
|
|
4180
|
-
|
|
4291
|
+
caption: "".concat((d = i.sourceCaption) == null ? void 0 : d.split("_")[0], "_").concat(a.length),
|
|
4292
|
+
sourceCaption: i.sourceCaption,
|
|
4293
|
+
url: i.url,
|
|
4294
|
+
aiChat: i.aiChat
|
|
4295
|
+
}, r = new we(o);
|
|
4296
|
+
this.topics.value = [...this.topics.value, r];
|
|
4297
|
+
const u = this.topics.value.map((f) => ({
|
|
4298
|
+
appid: f.appid,
|
|
4299
|
+
id: f.id,
|
|
4300
|
+
type: f.type,
|
|
4301
|
+
caption: f.caption,
|
|
4302
|
+
sourceCaption: f.sourceCaption,
|
|
4303
|
+
url: f.url,
|
|
4304
|
+
aiChat: f.aiChat
|
|
4305
|
+
})), h = (l = this.currentTopicOptions) == null ? void 0 : l.configService(
|
|
4306
|
+
o.appid,
|
|
4181
4307
|
"aitopics",
|
|
4182
|
-
|
|
4308
|
+
o.type
|
|
4183
4309
|
);
|
|
4184
|
-
await (
|
|
4310
|
+
await (h == null ? void 0 : h.save(u)), this.handleTopicChange(r);
|
|
4185
4311
|
}
|
|
4186
4312
|
/**
|
|
4187
4313
|
* 清空话题
|
|
@@ -4211,9 +4337,9 @@ class ps {
|
|
|
4211
4337
|
await Promise.all(
|
|
4212
4338
|
this.topics.value.map((o) => {
|
|
4213
4339
|
if (o.id !== (e == null ? void 0 : e.id))
|
|
4214
|
-
return
|
|
4215
|
-
|
|
4216
|
-
|
|
4340
|
+
return R.deleteData(
|
|
4341
|
+
I.DATA_BASE_NAME,
|
|
4342
|
+
I.DATA_TABLE_NAME,
|
|
4217
4343
|
o.id
|
|
4218
4344
|
);
|
|
4219
4345
|
})
|
|
@@ -4234,12 +4360,12 @@ class ps {
|
|
|
4234
4360
|
await (i == null ? void 0 : i.save(s));
|
|
4235
4361
|
}
|
|
4236
4362
|
}
|
|
4237
|
-
class
|
|
4363
|
+
class On {
|
|
4238
4364
|
constructor(e) {
|
|
4239
4365
|
this.aiChat = e;
|
|
4240
4366
|
}
|
|
4241
4367
|
}
|
|
4242
|
-
class
|
|
4368
|
+
class ms extends On {
|
|
4243
4369
|
/**
|
|
4244
4370
|
* 执行操作
|
|
4245
4371
|
*
|
|
@@ -4277,7 +4403,7 @@ class fs extends Hn {
|
|
|
4277
4403
|
}
|
|
4278
4404
|
}
|
|
4279
4405
|
}
|
|
4280
|
-
class
|
|
4406
|
+
class _s extends On {
|
|
4281
4407
|
/**
|
|
4282
4408
|
* 执行操作
|
|
4283
4409
|
*
|
|
@@ -4301,8 +4427,8 @@ class ms extends Hn {
|
|
|
4301
4427
|
maxSize: o || 5 * 1024 * 1024,
|
|
4302
4428
|
onSelect: (p) => {
|
|
4303
4429
|
r == null || r(p), p.length > 0 && p.forEach((m) => {
|
|
4304
|
-
const
|
|
4305
|
-
Object.assign(
|
|
4430
|
+
const w = this.buildMaterialObject(m);
|
|
4431
|
+
Object.assign(w.metadata, { state: "uploading" }), this.aiChat.addMaterial(w);
|
|
4306
4432
|
});
|
|
4307
4433
|
},
|
|
4308
4434
|
onUpload: async (p, m) => u(p, m, {
|
|
@@ -4311,7 +4437,7 @@ class ms extends Hn {
|
|
|
4311
4437
|
}),
|
|
4312
4438
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4313
4439
|
onSuccess: (p, m) => {
|
|
4314
|
-
const
|
|
4440
|
+
const w = {
|
|
4315
4441
|
id: p.id,
|
|
4316
4442
|
type: "ossfile",
|
|
4317
4443
|
data: {
|
|
@@ -4328,11 +4454,11 @@ class ms extends Hn {
|
|
|
4328
4454
|
state: "successed"
|
|
4329
4455
|
}
|
|
4330
4456
|
};
|
|
4331
|
-
this.aiChat.replaceMaterial(m.name,
|
|
4457
|
+
this.aiChat.replaceMaterial(m.name, w), h == null || h(p, m);
|
|
4332
4458
|
},
|
|
4333
4459
|
onError: (p, m) => {
|
|
4334
|
-
const
|
|
4335
|
-
Object.assign(
|
|
4460
|
+
const w = this.buildMaterialObject(m);
|
|
4461
|
+
Object.assign(w.metadata, { state: "failed" }), this.aiChat.replaceMaterial(m.name, w), d == null || d(p, m);
|
|
4336
4462
|
},
|
|
4337
4463
|
onProgress: (p, m) => {
|
|
4338
4464
|
l == null || l(p, m);
|
|
@@ -4364,17 +4490,17 @@ class ms extends Hn {
|
|
|
4364
4490
|
};
|
|
4365
4491
|
}
|
|
4366
4492
|
}
|
|
4367
|
-
class
|
|
4493
|
+
class jt {
|
|
4368
4494
|
static getMaterialHelper(e, t) {
|
|
4369
4495
|
switch (e) {
|
|
4370
4496
|
case "ossfile":
|
|
4371
|
-
return new
|
|
4497
|
+
return new _s(t);
|
|
4372
4498
|
default:
|
|
4373
|
-
return new
|
|
4499
|
+
return new ms(t);
|
|
4374
4500
|
}
|
|
4375
4501
|
}
|
|
4376
4502
|
}
|
|
4377
|
-
class
|
|
4503
|
+
class gs {
|
|
4378
4504
|
/**
|
|
4379
4505
|
* Creates an instance of ChatController.
|
|
4380
4506
|
* @author tony001
|
|
@@ -4389,7 +4515,7 @@ class vs {
|
|
|
4389
4515
|
* @protected
|
|
4390
4516
|
* @type {HTMLDivElement}
|
|
4391
4517
|
*/
|
|
4392
|
-
|
|
4518
|
+
x(this, "container");
|
|
4393
4519
|
/**
|
|
4394
4520
|
* 默认模式(聊天框)和话题模式(支持多话题切换),聊天框为默认模式
|
|
4395
4521
|
*
|
|
@@ -4398,7 +4524,7 @@ class vs {
|
|
|
4398
4524
|
* @protected
|
|
4399
4525
|
* @type {('DEFAULT' | 'TOPIC')}
|
|
4400
4526
|
*/
|
|
4401
|
-
|
|
4527
|
+
x(this, "mode", "DEFAULT");
|
|
4402
4528
|
/**
|
|
4403
4529
|
* 是否挂载ai话题
|
|
4404
4530
|
*
|
|
@@ -4407,7 +4533,7 @@ class vs {
|
|
|
4407
4533
|
* @protected
|
|
4408
4534
|
* @type {boolean}
|
|
4409
4535
|
*/
|
|
4410
|
-
|
|
4536
|
+
x(this, "isMountedAiTopic", !1);
|
|
4411
4537
|
/**
|
|
4412
4538
|
* 容器配置备份
|
|
4413
4539
|
*
|
|
@@ -4416,7 +4542,7 @@ class vs {
|
|
|
4416
4542
|
* @protected
|
|
4417
4543
|
* @type {(IContainerOptions | undefined)}
|
|
4418
4544
|
*/
|
|
4419
|
-
|
|
4545
|
+
x(this, "backupChatOptions");
|
|
4420
4546
|
/**
|
|
4421
4547
|
* 话题控制器
|
|
4422
4548
|
*
|
|
@@ -4425,7 +4551,7 @@ class vs {
|
|
|
4425
4551
|
* @public
|
|
4426
4552
|
* @type {AiTopicController}
|
|
4427
4553
|
*/
|
|
4428
|
-
|
|
4554
|
+
x(this, "aiTopic");
|
|
4429
4555
|
/**
|
|
4430
4556
|
* 话题map
|
|
4431
4557
|
*
|
|
@@ -4433,8 +4559,8 @@ class vs {
|
|
|
4433
4559
|
* @type {Map<string, AiChatController>}
|
|
4434
4560
|
* @memberof ChatController
|
|
4435
4561
|
*/
|
|
4436
|
-
|
|
4437
|
-
this.aiTopic = new
|
|
4562
|
+
x(this, "aiTopicMap", /* @__PURE__ */ new Map());
|
|
4563
|
+
this.aiTopic = new vs(this);
|
|
4438
4564
|
}
|
|
4439
4565
|
/**
|
|
4440
4566
|
* 聊天控制器
|
|
@@ -4455,13 +4581,13 @@ class vs {
|
|
|
4455
4581
|
* @return {*} {Promise<void>}
|
|
4456
4582
|
*/
|
|
4457
4583
|
async initIndexDB() {
|
|
4458
|
-
await
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
) || await
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4584
|
+
await R.checkTableExists(
|
|
4585
|
+
I.DATA_BASE_NAME,
|
|
4586
|
+
I.DATA_TABLE_NAME
|
|
4587
|
+
) || await R.createTable(
|
|
4588
|
+
I.DATA_BASE_NAME,
|
|
4589
|
+
I.DATA_TABLE_NAME,
|
|
4590
|
+
I.DATA_TABLE_KEY_NAME,
|
|
4465
4591
|
!1
|
|
4466
4592
|
);
|
|
4467
4593
|
}
|
|
@@ -4478,26 +4604,43 @@ class vs {
|
|
|
4478
4604
|
await this.initIndexDB(), this.backupChatOptions = e, this.close(), this.container = document.createElement("div"), this.container.classList.add("ibiz-ai-chat"), document.body.appendChild(this.container);
|
|
4479
4605
|
const t = e.chatOptions;
|
|
4480
4606
|
let i;
|
|
4481
|
-
e.mode && e.mode === "TOPIC"
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4607
|
+
if (e.mode && e.mode === "TOPIC") {
|
|
4608
|
+
this.isMountedAiTopic || (await this.aiTopic.fetchHistory(e.topicOptions), this.isMountedAiTopic = !0), i = e.topicOptions, Object.assign(i, {
|
|
4609
|
+
aiChat: {
|
|
4610
|
+
caption: t.caption,
|
|
4611
|
+
context: t.context,
|
|
4612
|
+
params: t.params,
|
|
4613
|
+
appDataEntityId: t.appDataEntityId,
|
|
4614
|
+
contentToolbarItems: t.contentToolbarItems,
|
|
4615
|
+
footerToolbarItems: t.footerToolbarItems,
|
|
4616
|
+
questionToolbarItems: t.questionToolbarItems,
|
|
4617
|
+
otherToolbarItems: t.otherToolbarItems,
|
|
4618
|
+
appendCurData: t.appendCurData,
|
|
4619
|
+
appendCurContent: t.appendCurContent,
|
|
4620
|
+
aiAgentlist: t.aiAgentlist
|
|
4621
|
+
}
|
|
4622
|
+
});
|
|
4623
|
+
const o = this.aiTopic.getCurrentTopicByID(
|
|
4624
|
+
i.id
|
|
4625
|
+
);
|
|
4626
|
+
if (o && o.aiChat && o.aiChat.activeAIAgentID)
|
|
4627
|
+
t.activeAIAgentID = o.aiChat.activeAIAgentID, i.aiChat.activeAIAgentID = o.aiChat.activeAIAgentID;
|
|
4628
|
+
else if (t.aiAgentlist && t.aiAgentlist.length > 0) {
|
|
4629
|
+
const r = t.aiAgentlist.find(
|
|
4630
|
+
(u) => u.default === 1
|
|
4631
|
+
);
|
|
4632
|
+
r ? (t.activeAIAgentID = r.id, i.aiChat.activeAIAgentID = r.id) : (t.activeAIAgentID = t.aiAgentlist[0].id, i.aiChat.activeAIAgentID = t.aiAgentlist[0].id);
|
|
4493
4633
|
}
|
|
4494
|
-
|
|
4634
|
+
await this.aiTopic.updateCurrentTopic(i);
|
|
4635
|
+
} else
|
|
4636
|
+
this.aiTopic.activedTopic.value = void 0;
|
|
4637
|
+
Object.assign(t, {
|
|
4495
4638
|
topicId: i == null ? void 0 : i.id,
|
|
4496
4639
|
topic: i
|
|
4497
4640
|
});
|
|
4498
|
-
const s = new
|
|
4499
|
-
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s),
|
|
4500
|
-
|
|
4641
|
+
const s = new Wt(t);
|
|
4642
|
+
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), ue(
|
|
4643
|
+
X(Yt, {
|
|
4501
4644
|
aiChat: s,
|
|
4502
4645
|
aiTopic: this.aiTopic,
|
|
4503
4646
|
mode: e.mode ? e.mode : "DEFAULT",
|
|
@@ -4552,6 +4695,8 @@ class vs {
|
|
|
4552
4695
|
otherToolbarItems: e.aiChat.otherToolbarItems,
|
|
4553
4696
|
appendCurData: e.aiChat.appendCurData,
|
|
4554
4697
|
appendCurContent: e.aiChat.appendCurContent,
|
|
4698
|
+
aiAgentlist: e.aiChat.aiAgentlist,
|
|
4699
|
+
activeAIAgentID: e.aiChat.activeAIAgentID,
|
|
4555
4700
|
appDataEntityId: e.aiChat.appDataEntityId,
|
|
4556
4701
|
topicId: e.id,
|
|
4557
4702
|
topic: e,
|
|
@@ -4559,8 +4704,8 @@ class vs {
|
|
|
4559
4704
|
recommendPrompt: this.backupChatOptions.chatOptions.recommendPrompt
|
|
4560
4705
|
});
|
|
4561
4706
|
let i;
|
|
4562
|
-
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new
|
|
4563
|
-
|
|
4707
|
+
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new Wt(t), this.aiTopicMap.set("".concat(e.id), i)), this.container && (ue(null, this.container), ue(
|
|
4708
|
+
X(Yt, {
|
|
4564
4709
|
aiChat: i,
|
|
4565
4710
|
aiTopic: this.aiTopic,
|
|
4566
4711
|
mode: (s = this.backupChatOptions) != null && s.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
@@ -4608,16 +4753,16 @@ class vs {
|
|
|
4608
4753
|
* @date 2023-10-13 17:10:10
|
|
4609
4754
|
*/
|
|
4610
4755
|
close() {
|
|
4611
|
-
this.container && (
|
|
4756
|
+
this.container && (ue(null, this.container), this.container.remove(), this.container = void 0), this.aiTopicMap.forEach((e) => {
|
|
4612
4757
|
e.destroyed();
|
|
4613
4758
|
});
|
|
4614
4759
|
}
|
|
4615
4760
|
}
|
|
4616
|
-
const
|
|
4617
|
-
const
|
|
4761
|
+
const $s = new gs();
|
|
4762
|
+
const ws = new k("chat-input-material"), ys = (n) => {
|
|
4618
4763
|
const e = n.controller.materials;
|
|
4619
|
-
return /* @__PURE__ */ c("div", { className:
|
|
4620
|
-
|
|
4764
|
+
return /* @__PURE__ */ c("div", { className: ws.b(), children: e.value.map((t) => /* @__PURE__ */ c(
|
|
4765
|
+
Dn,
|
|
4621
4766
|
{
|
|
4622
4767
|
material: t,
|
|
4623
4768
|
disabled: !1,
|
|
@@ -4626,7 +4771,7 @@ const _s = new k("chat-input-material"), gs = (n) => {
|
|
|
4626
4771
|
t.id
|
|
4627
4772
|
)) });
|
|
4628
4773
|
};
|
|
4629
|
-
const
|
|
4774
|
+
const Bn = ({
|
|
4630
4775
|
children: n,
|
|
4631
4776
|
actions: e,
|
|
4632
4777
|
// 接收行为数据
|
|
@@ -4637,7 +4782,7 @@ const On = ({
|
|
|
4637
4782
|
onAction: o
|
|
4638
4783
|
// 接收行为事件回调
|
|
4639
4784
|
}) => {
|
|
4640
|
-
const r = new k("pop"), u =
|
|
4785
|
+
const r = new k("pop"), u = ut(Re), [h, d] = V(s || !1), l = O(null), f = O(null);
|
|
4641
4786
|
D(() => {
|
|
4642
4787
|
s !== void 0 && d(s);
|
|
4643
4788
|
}, [s]), D(() => (f.current || (f.current = document.createElement("div"), f.current.className = r.b("content-container"), document.body.appendChild(f.current)), () => {
|
|
@@ -4656,7 +4801,7 @@ const On = ({
|
|
|
4656
4801
|
const p = l.current.getBoundingClientRect(), m = {
|
|
4657
4802
|
position: "absolute",
|
|
4658
4803
|
zIndex: u.zIndex + 1
|
|
4659
|
-
},
|
|
4804
|
+
}, w = {
|
|
4660
4805
|
bottom: {
|
|
4661
4806
|
top: p.bottom + window.scrollY,
|
|
4662
4807
|
left: p.left + window.scrollX
|
|
@@ -4678,7 +4823,7 @@ const On = ({
|
|
|
4678
4823
|
right: window.innerWidth - p.left + window.scrollX
|
|
4679
4824
|
}
|
|
4680
4825
|
};
|
|
4681
|
-
return { ...m, ...
|
|
4826
|
+
return { ...m, ...w[i] };
|
|
4682
4827
|
};
|
|
4683
4828
|
return /* @__PURE__ */ c("span", { className: "".concat(r.b("trigger-container")), children: [
|
|
4684
4829
|
/* @__PURE__ */ c(
|
|
@@ -4694,7 +4839,7 @@ const On = ({
|
|
|
4694
4839
|
children: n
|
|
4695
4840
|
}
|
|
4696
4841
|
),
|
|
4697
|
-
h && f.current &&
|
|
4842
|
+
h && f.current && ns(
|
|
4698
4843
|
/* @__PURE__ */ c(
|
|
4699
4844
|
"div",
|
|
4700
4845
|
{
|
|
@@ -4721,186 +4866,274 @@ const On = ({
|
|
|
4721
4866
|
)
|
|
4722
4867
|
] });
|
|
4723
4868
|
};
|
|
4724
|
-
const
|
|
4725
|
-
var
|
|
4726
|
-
const
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4869
|
+
const j = new k("chat-select"), bs = (n) => {
|
|
4870
|
+
var w;
|
|
4871
|
+
const {
|
|
4872
|
+
options: e,
|
|
4873
|
+
value: t,
|
|
4874
|
+
defaultValue: i,
|
|
4875
|
+
className: s,
|
|
4876
|
+
placeholder: a = "请选择",
|
|
4877
|
+
onChange: o,
|
|
4878
|
+
disabled: r = !1
|
|
4879
|
+
} = n, u = O(null), h = O(null), [d, l] = V(
|
|
4880
|
+
t || i || ""
|
|
4881
|
+
), [f, _] = V(!1);
|
|
4882
|
+
D(() => {
|
|
4883
|
+
t !== void 0 && l(t);
|
|
4884
|
+
}, [t]);
|
|
4885
|
+
const p = (g) => {
|
|
4886
|
+
l(g.value), o == null || o(g.value), _(!1);
|
|
4887
|
+
};
|
|
4888
|
+
D(() => {
|
|
4889
|
+
const g = (v) => {
|
|
4890
|
+
var b, T;
|
|
4891
|
+
r || (b = h.current) != null && b.contains(v.target) || ((T = u.current) != null && T.contains(v.target) ? _((S) => !S) : _(!1));
|
|
4892
|
+
};
|
|
4893
|
+
return document.addEventListener("mousedown", g), () => {
|
|
4894
|
+
document.removeEventListener("mousedown", g);
|
|
4895
|
+
};
|
|
4896
|
+
}, []);
|
|
4897
|
+
const m = ((w = e == null ? void 0 : e.find((g) => g.value === d)) == null ? void 0 : w.label) || a;
|
|
4898
|
+
return /* @__PURE__ */ c(
|
|
4899
|
+
"div",
|
|
4900
|
+
{
|
|
4901
|
+
className: "".concat(j.b(), " ").concat(s || "", " ").concat(j.is("visble", f), " ").concat(j.is("disabled", r)),
|
|
4902
|
+
children: [
|
|
4903
|
+
/* @__PURE__ */ c("div", { className: j.e("header"), ref: u, children: [
|
|
4904
|
+
/* @__PURE__ */ c("span", { className: j.e("display-value"), title: m, children: m }),
|
|
4905
|
+
/* @__PURE__ */ c(
|
|
4906
|
+
"svg",
|
|
4907
|
+
{
|
|
4908
|
+
className: j.e("icon"),
|
|
4909
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4910
|
+
fill: "none",
|
|
4911
|
+
viewBox: "0 0 24 24",
|
|
4912
|
+
stroke: "currentColor",
|
|
4913
|
+
width: "1em",
|
|
4914
|
+
height: "1em",
|
|
4915
|
+
children: /* @__PURE__ */ c(
|
|
4916
|
+
"path",
|
|
4917
|
+
{
|
|
4918
|
+
strokeLinecap: "round",
|
|
4919
|
+
strokeLinejoin: "round",
|
|
4920
|
+
strokeWidth: "2",
|
|
4921
|
+
d: "M19 9l-7 7-7-7"
|
|
4922
|
+
}
|
|
4923
|
+
)
|
|
4924
|
+
}
|
|
4925
|
+
)
|
|
4926
|
+
] }),
|
|
4927
|
+
/* @__PURE__ */ c("div", { className: j.e("dropdown"), ref: h, children: /* @__PURE__ */ c("ul", { className: j.em("dropdown", "list"), children: e == null ? void 0 : e.map((g) => /* @__PURE__ */ c(
|
|
4928
|
+
"li",
|
|
4929
|
+
{
|
|
4930
|
+
className: "".concat(j.em("dropdown", "item"), " ").concat(j.is("active", g.value === d)),
|
|
4931
|
+
title: g.label,
|
|
4932
|
+
onClick: () => p(g),
|
|
4933
|
+
children: g.label
|
|
4934
|
+
},
|
|
4935
|
+
g.value
|
|
4936
|
+
)) }) })
|
|
4937
|
+
]
|
|
4938
|
+
}
|
|
4939
|
+
);
|
|
4940
|
+
};
|
|
4941
|
+
const $ = new k("chat-input"), Vt = window.SpeechRecognition || window.webkitSpeechRecognition, qt = (n) => {
|
|
4942
|
+
var g;
|
|
4943
|
+
const [e, t] = V(!1), i = O(null), s = ut(Re), a = n.controller.input, o = E(!1), r = O();
|
|
4944
|
+
Vt && !r.current && (r.current = new Vt(), r.current.onstart = () => {
|
|
4945
|
+
o.value = !0;
|
|
4946
|
+
}, r.current.onend = () => {
|
|
4947
|
+
o.value = !1;
|
|
4948
|
+
}, r.current.onresult = (v) => {
|
|
4949
|
+
var T, S, L;
|
|
4950
|
+
const b = (L = (S = (T = v.results) == null ? void 0 : T[0]) == null ? void 0 : S[0]) == null ? void 0 : L.transcript;
|
|
4951
|
+
b && (a.value = "".concat(a.value).concat(b));
|
|
4735
4952
|
});
|
|
4736
|
-
const
|
|
4737
|
-
|
|
4738
|
-
},
|
|
4953
|
+
const u = () => {
|
|
4954
|
+
r.current && !o.value && r.current.start();
|
|
4955
|
+
}, h = je(
|
|
4739
4956
|
(v) => {
|
|
4740
|
-
|
|
4957
|
+
a.value = v.target.value;
|
|
4741
4958
|
},
|
|
4742
|
-
[
|
|
4743
|
-
),
|
|
4744
|
-
D(() => (i.current &&
|
|
4745
|
-
i.current &&
|
|
4959
|
+
[a]
|
|
4960
|
+
), d = B(() => a.value.length <= 0);
|
|
4961
|
+
D(() => (i.current && Ut(i.current), () => {
|
|
4962
|
+
i.current && Ut.destroy(i.current);
|
|
4746
4963
|
}), [i]);
|
|
4747
|
-
const
|
|
4964
|
+
const l = je(async () => {
|
|
4748
4965
|
var v;
|
|
4749
4966
|
try {
|
|
4750
|
-
const
|
|
4751
|
-
|
|
4752
|
-
} catch (
|
|
4753
|
-
console.error(
|
|
4967
|
+
const b = a.value;
|
|
4968
|
+
a.value = "", await n.controller.question(b);
|
|
4969
|
+
} catch (b) {
|
|
4970
|
+
console.error(b);
|
|
4754
4971
|
} finally {
|
|
4755
4972
|
(v = i.current) == null || v.focus();
|
|
4756
4973
|
}
|
|
4757
|
-
}, [
|
|
4974
|
+
}, [a]), f = je(async () => {
|
|
4758
4975
|
try {
|
|
4759
4976
|
n.controller.abortQuestion();
|
|
4760
4977
|
} catch (v) {
|
|
4761
4978
|
console.error(v);
|
|
4762
4979
|
}
|
|
4763
|
-
}, [
|
|
4764
|
-
v.code === "Enter" && !v.isComposing && (v.stopPropagation(), v.shiftKey === !1 &&
|
|
4765
|
-
},
|
|
4766
|
-
await
|
|
4980
|
+
}, [a]), _ = (v) => {
|
|
4981
|
+
v.code === "Enter" && !v.isComposing && (v.stopPropagation(), v.shiftKey === !1 && l());
|
|
4982
|
+
}, p = async (v) => {
|
|
4983
|
+
await jt.getMaterialHelper(
|
|
4767
4984
|
"ossfile",
|
|
4768
4985
|
n.controller
|
|
4769
4986
|
).excuteAction(v), t(!1);
|
|
4770
|
-
},
|
|
4771
|
-
await
|
|
4987
|
+
}, m = async (v, b) => {
|
|
4988
|
+
await jt.getMaterialHelper(
|
|
4772
4989
|
"common",
|
|
4773
4990
|
n.controller
|
|
4774
|
-
).excuteAction(v,
|
|
4991
|
+
).excuteAction(v, b), t(!1);
|
|
4992
|
+
}, w = (v) => {
|
|
4993
|
+
n.controller.setActiveAIAgentID(v), n.controller.topicId && s.updateTopic(n.controller.topicId, {
|
|
4994
|
+
activeAIAgentID: v
|
|
4995
|
+
});
|
|
4775
4996
|
};
|
|
4776
|
-
return /* @__PURE__ */ c("div", { className:
|
|
4777
|
-
/* @__PURE__ */ c("div", { className:
|
|
4778
|
-
/* @__PURE__ */ c("div", { className:
|
|
4997
|
+
return /* @__PURE__ */ c("div", { className: $.b("wrapper"), children: [
|
|
4998
|
+
/* @__PURE__ */ c("div", { className: $.b("material-wrapper"), children: /* @__PURE__ */ c(ys, { controller: n.controller }) }),
|
|
4999
|
+
/* @__PURE__ */ c("div", { className: $.b("main-wrapper"), children: [
|
|
4779
5000
|
/* @__PURE__ */ c(
|
|
4780
5001
|
"textarea",
|
|
4781
5002
|
{
|
|
4782
|
-
className:
|
|
5003
|
+
className: $.b("textarea-wrapper"),
|
|
4783
5004
|
type: "text",
|
|
4784
5005
|
rows: 6,
|
|
4785
5006
|
autoCorrect: "off",
|
|
4786
5007
|
autoCapitalize: "off",
|
|
4787
5008
|
autoComplete: "off",
|
|
4788
|
-
value:
|
|
4789
|
-
onInput:
|
|
4790
|
-
onKeyDown:
|
|
5009
|
+
value: a,
|
|
5010
|
+
onInput: h,
|
|
5011
|
+
onKeyDown: _,
|
|
4791
5012
|
ref: i,
|
|
4792
5013
|
disabled: n.controller.isLoading.value
|
|
4793
5014
|
}
|
|
4794
5015
|
),
|
|
4795
|
-
/* @__PURE__ */ c("div", { className:
|
|
4796
|
-
/* @__PURE__ */ c(
|
|
4797
|
-
|
|
5016
|
+
/* @__PURE__ */ c("div", { className: $.b("action-wrapper"), children: [
|
|
5017
|
+
/* @__PURE__ */ c("div", { className: $.b("left-action-wrapper"), children: n.controller.agentList.value.length > 0 ? /* @__PURE__ */ c(
|
|
5018
|
+
bs,
|
|
4798
5019
|
{
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
),
|
|
4821
|
-
(m = n.questionToolbarItems) == null ? void 0 : m.map((v) => {
|
|
4822
|
-
var w, g, C;
|
|
4823
|
-
return /* @__PURE__ */ c(
|
|
5020
|
+
options: n.controller.agentList.value,
|
|
5021
|
+
defaultValue: n.controller.activeAIAgentID,
|
|
5022
|
+
onChange: (v) => {
|
|
5023
|
+
w(v);
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5026
|
+
) : /* @__PURE__ */ c("div", { children: "Auto" }) }),
|
|
5027
|
+
/* @__PURE__ */ c("div", { className: $.b("right-action-wrapper"), children: [
|
|
5028
|
+
/* @__PURE__ */ c(
|
|
5029
|
+
"div",
|
|
5030
|
+
{
|
|
5031
|
+
className: "".concat($.be("right-action-wrapper", "action-item"), " ").concat($.is(
|
|
5032
|
+
"disabled",
|
|
5033
|
+
n.controller.isLoading.value
|
|
5034
|
+
)),
|
|
5035
|
+
title: "上传资料",
|
|
5036
|
+
children: /* @__PURE__ */ c(
|
|
5037
|
+
Bn,
|
|
5038
|
+
{
|
|
5039
|
+
content: /* @__PURE__ */ c("div", { className: $.b("pop-actions"), children: [
|
|
5040
|
+
/* @__PURE__ */ c(
|
|
4824
5041
|
"div",
|
|
4825
5042
|
{
|
|
4826
|
-
className:
|
|
4827
|
-
onClick: (
|
|
4828
|
-
p(
|
|
5043
|
+
className: $.b("pop-action-item"),
|
|
5044
|
+
onClick: (v) => {
|
|
5045
|
+
p(v);
|
|
4829
5046
|
},
|
|
4830
5047
|
children: [
|
|
4831
|
-
/* @__PURE__ */ c("span", { className:
|
|
4832
|
-
|
|
4833
|
-
{
|
|
4834
|
-
dangerouslySetInnerHTML: {
|
|
4835
|
-
__html: v.icon.imagePath
|
|
4836
|
-
}
|
|
4837
|
-
}
|
|
4838
|
-
) : /* @__PURE__ */ c("img", { src: v.icon.imagePath }) : null }) }),
|
|
4839
|
-
/* @__PURE__ */ c("span", { className: I.b("pop-action-item-title"), children: v.label })
|
|
5048
|
+
/* @__PURE__ */ c("span", { className: $.b("pop-action-item-icon"), children: /* @__PURE__ */ c(Mn, {}) }),
|
|
5049
|
+
/* @__PURE__ */ c("span", { className: $.b("pop-action-item-title"), children: "文件资料" })
|
|
4840
5050
|
]
|
|
4841
|
-
}
|
|
4842
|
-
|
|
4843
|
-
)
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
"
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
5051
|
+
}
|
|
5052
|
+
),
|
|
5053
|
+
(g = n.questionToolbarItems) == null ? void 0 : g.map((v) => {
|
|
5054
|
+
var b, T, S;
|
|
5055
|
+
return /* @__PURE__ */ c(
|
|
5056
|
+
"div",
|
|
5057
|
+
{
|
|
5058
|
+
className: $.b("pop-action-item"),
|
|
5059
|
+
onClick: (L) => {
|
|
5060
|
+
m(L, v);
|
|
5061
|
+
},
|
|
5062
|
+
children: [
|
|
5063
|
+
/* @__PURE__ */ c("span", { className: $.b("pop-action-item-icon"), children: typeof v.icon == "function" ? v.icon() : ((b = v.icon) == null ? void 0 : b.showIcon) && /* @__PURE__ */ c(Z, { children: (T = v.icon) != null && T.cssClass ? /* @__PURE__ */ c("i", { className: v.icon.cssClass }) : (S = v.icon) != null && S.imagePath ? lt(v.icon.imagePath) ? /* @__PURE__ */ c(
|
|
5064
|
+
"div",
|
|
5065
|
+
{
|
|
5066
|
+
dangerouslySetInnerHTML: {
|
|
5067
|
+
__html: v.icon.imagePath
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
5070
|
+
) : /* @__PURE__ */ c("img", { src: v.icon.imagePath }) : null }) }),
|
|
5071
|
+
/* @__PURE__ */ c("span", { className: $.b("pop-action-item-title"), children: v.label })
|
|
5072
|
+
]
|
|
5073
|
+
},
|
|
5074
|
+
v.id
|
|
5075
|
+
);
|
|
5076
|
+
})
|
|
5077
|
+
] }),
|
|
5078
|
+
position: "top-left",
|
|
5079
|
+
isOpen: e,
|
|
5080
|
+
onToggleOpen: t,
|
|
5081
|
+
children: /* @__PURE__ */ c(Si, {})
|
|
5082
|
+
}
|
|
5083
|
+
)
|
|
5084
|
+
}
|
|
5085
|
+
),
|
|
5086
|
+
/* @__PURE__ */ c(
|
|
5087
|
+
"div",
|
|
5088
|
+
{
|
|
5089
|
+
title: o.value ? "语音输入中..." : "语音输入",
|
|
5090
|
+
className: "".concat($.be("right-action-wrapper", "action-item"), " ").concat($.is(
|
|
5091
|
+
"disabled",
|
|
5092
|
+
n.controller.isLoading.value
|
|
5093
|
+
)),
|
|
5094
|
+
onClick: u,
|
|
5095
|
+
children: o.value ? /* @__PURE__ */ c(bi, {}) : /* @__PURE__ */ c(yi, {})
|
|
5096
|
+
}
|
|
5097
|
+
),
|
|
5098
|
+
n.controller.isLoading.value ? /* @__PURE__ */ c(
|
|
5099
|
+
"div",
|
|
5100
|
+
{
|
|
5101
|
+
title: "停止生成",
|
|
5102
|
+
className: "".concat($.be("right-action-wrapper", "action-item")),
|
|
5103
|
+
onClick: f,
|
|
5104
|
+
children: /* @__PURE__ */ c(Ii, {})
|
|
5105
|
+
}
|
|
5106
|
+
) : /* @__PURE__ */ c(
|
|
5107
|
+
"div",
|
|
5108
|
+
{
|
|
5109
|
+
title: "发送消息",
|
|
5110
|
+
className: "".concat($.be("right-action-wrapper", "action-item"), " ").concat($.is(
|
|
5111
|
+
"disabled",
|
|
5112
|
+
d.value
|
|
5113
|
+
)),
|
|
5114
|
+
onClick: l,
|
|
5115
|
+
children: /* @__PURE__ */ c(di, {})
|
|
5116
|
+
}
|
|
5117
|
+
)
|
|
5118
|
+
] })
|
|
4886
5119
|
] })
|
|
4887
5120
|
] })
|
|
4888
5121
|
] });
|
|
4889
5122
|
};
|
|
4890
|
-
const P = new k("chat-topic-item"),
|
|
4891
|
-
const { controller: e, topic: t, onClick: i, onAction: s } = n, a =
|
|
4892
|
-
var
|
|
4893
|
-
return ((
|
|
4894
|
-
}), [r, u] =
|
|
5123
|
+
const P = new k("chat-topic-item"), Cs = (n) => {
|
|
5124
|
+
const { controller: e, topic: t, onClick: i, onAction: s } = n, a = O(null), o = B(() => {
|
|
5125
|
+
var w;
|
|
5126
|
+
return ((w = e.activedTopic.value) == null ? void 0 : w.id) === t.id;
|
|
5127
|
+
}), [r, u] = V(!1), h = E(!1), d = (m) => {
|
|
4895
5128
|
m.stopPropagation(), s("LINK", m);
|
|
4896
|
-
}, l = (m,
|
|
4897
|
-
m === "DELETE" ? s("DELETE",
|
|
4898
|
-
var
|
|
4899
|
-
(
|
|
5129
|
+
}, l = (m, w) => {
|
|
5130
|
+
m === "DELETE" ? s("DELETE", w) : m === "RENAME" && (h.value = !0, setTimeout(() => {
|
|
5131
|
+
var g;
|
|
5132
|
+
(g = a.current) == null || g.focus();
|
|
4900
5133
|
}, 100)), u(!1);
|
|
4901
5134
|
}, f = (m) => {
|
|
4902
|
-
var
|
|
4903
|
-
m.stopPropagation(), t.data.caption = (
|
|
5135
|
+
var w;
|
|
5136
|
+
m.stopPropagation(), t.data.caption = (w = m.target) == null ? void 0 : w.value;
|
|
4904
5137
|
}, _ = (m) => {
|
|
4905
5138
|
m.stopPropagation(), h.value = !1, s("RENAME", m);
|
|
4906
5139
|
}, p = (m) => {
|
|
@@ -4934,21 +5167,21 @@ const P = new k("chat-topic-item"), ws = (n) => {
|
|
|
4934
5167
|
title: "跳转主视图",
|
|
4935
5168
|
className: P.em("icon", "item"),
|
|
4936
5169
|
onClick: d.bind(void 0),
|
|
4937
|
-
children: /* @__PURE__ */ c(
|
|
5170
|
+
children: /* @__PURE__ */ c(Ti, { className: P.b("link-icon") })
|
|
4938
5171
|
}
|
|
4939
5172
|
),
|
|
4940
5173
|
o.value ? null : /* @__PURE__ */ c(
|
|
4941
|
-
|
|
5174
|
+
Bn,
|
|
4942
5175
|
{
|
|
4943
5176
|
actions: [
|
|
4944
|
-
{ id: "RENAME", caption: "重命名", icon: /* @__PURE__ */ c(
|
|
4945
|
-
{ id: "DELETE", caption: "删除话题", icon: /* @__PURE__ */ c(
|
|
5177
|
+
{ id: "RENAME", caption: "重命名", icon: /* @__PURE__ */ c(Mi, {}) },
|
|
5178
|
+
{ id: "DELETE", caption: "删除话题", icon: /* @__PURE__ */ c(En, {}) }
|
|
4946
5179
|
],
|
|
4947
5180
|
position: "bottom",
|
|
4948
5181
|
isOpen: r,
|
|
4949
5182
|
onToggleOpen: u,
|
|
4950
5183
|
onAction: l.bind(void 0),
|
|
4951
|
-
children: /* @__PURE__ */ c("span", { className: P.em("icon", "item"), title: "更多", children: /* @__PURE__ */ c(
|
|
5184
|
+
children: /* @__PURE__ */ c("span", { className: P.em("icon", "item"), title: "更多", children: /* @__PURE__ */ c(Ci, { className: P.e("more-icon") }) })
|
|
4952
5185
|
}
|
|
4953
5186
|
)
|
|
4954
5187
|
] })
|
|
@@ -4956,22 +5189,22 @@ const P = new k("chat-topic-item"), ws = (n) => {
|
|
|
4956
5189
|
}
|
|
4957
5190
|
);
|
|
4958
5191
|
};
|
|
4959
|
-
const
|
|
4960
|
-
const { className: e, value: t, placeholder: i, onChange: s } = n, [a, o] =
|
|
5192
|
+
const $e = new k("chat-search"), Ts = (n) => {
|
|
5193
|
+
const { className: e, value: t, placeholder: i, onChange: s } = n, [a, o] = V(!1), r = (u) => {
|
|
4961
5194
|
var h;
|
|
4962
5195
|
u.stopPropagation(), s == null || s((h = u.target) == null ? void 0 : h.value);
|
|
4963
5196
|
};
|
|
4964
5197
|
return /* @__PURE__ */ c(
|
|
4965
5198
|
"div",
|
|
4966
5199
|
{
|
|
4967
|
-
className: "".concat(
|
|
5200
|
+
className: "".concat($e.b(), " ").concat($e.is("focus", a), " ").concat(e || ""),
|
|
4968
5201
|
children: [
|
|
4969
|
-
/* @__PURE__ */ c("div", { className:
|
|
5202
|
+
/* @__PURE__ */ c("div", { className: $e.e("prefix"), children: /* @__PURE__ */ c(Li, {}) }),
|
|
4970
5203
|
/* @__PURE__ */ c(
|
|
4971
5204
|
"input",
|
|
4972
5205
|
{
|
|
4973
5206
|
value: t,
|
|
4974
|
-
className:
|
|
5207
|
+
className: $e.e("inner"),
|
|
4975
5208
|
placeholder: i,
|
|
4976
5209
|
onFocus: () => o(!0),
|
|
4977
5210
|
onBlur: () => o(!1),
|
|
@@ -4982,8 +5215,8 @@ const Ee = new k("chat-search"), bs = (n) => {
|
|
|
4982
5215
|
}
|
|
4983
5216
|
);
|
|
4984
5217
|
};
|
|
4985
|
-
const
|
|
4986
|
-
const e =
|
|
5218
|
+
const re = new k("chat-topics"), xs = (n) => {
|
|
5219
|
+
const e = O(null), t = E(void 0), i = E([]);
|
|
4987
5220
|
D(() => {
|
|
4988
5221
|
i.value = n.controller.topics.value.filter(
|
|
4989
5222
|
(r) => {
|
|
@@ -5012,17 +5245,17 @@ const ae = new k("chat-topics"), ys = (n) => {
|
|
|
5012
5245
|
".ibiz-chat-topic-item.is-active"
|
|
5013
5246
|
);
|
|
5014
5247
|
u == null || u.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
5015
|
-
}, [n.controller.activedTopic.value]), /* @__PURE__ */ c("div", { className:
|
|
5016
|
-
/* @__PURE__ */ c("div", { className:
|
|
5017
|
-
|
|
5248
|
+
}, [n.controller.activedTopic.value]), /* @__PURE__ */ c("div", { className: re.b(), children: [
|
|
5249
|
+
/* @__PURE__ */ c("div", { className: re.e("header"), children: /* @__PURE__ */ c(
|
|
5250
|
+
Ts,
|
|
5018
5251
|
{
|
|
5019
5252
|
value: t.value,
|
|
5020
5253
|
placeholder: "搜索话题",
|
|
5021
5254
|
onChange: o.bind(void 0)
|
|
5022
5255
|
}
|
|
5023
5256
|
) }),
|
|
5024
|
-
/* @__PURE__ */ c("div", { ref: e, className:
|
|
5025
|
-
|
|
5257
|
+
/* @__PURE__ */ c("div", { ref: e, className: re.e("main"), children: i.value && i.value.length > 0 ? i.value.map((r) => /* @__PURE__ */ c(
|
|
5258
|
+
Cs,
|
|
5026
5259
|
{
|
|
5027
5260
|
topic: r,
|
|
5028
5261
|
controller: n.controller,
|
|
@@ -5030,42 +5263,42 @@ const ae = new k("chat-topics"), ys = (n) => {
|
|
|
5030
5263
|
onAction: (u, h) => a(u, r, h)
|
|
5031
5264
|
},
|
|
5032
5265
|
r.id
|
|
5033
|
-
)) : /* @__PURE__ */ c("div", { className:
|
|
5034
|
-
/* @__PURE__ */ c("div", { className:
|
|
5266
|
+
)) : /* @__PURE__ */ c("div", { className: re.e("empty"), children: "暂无话题" }) }),
|
|
5267
|
+
/* @__PURE__ */ c("div", { className: re.e("footer"), children: /* @__PURE__ */ c(
|
|
5035
5268
|
"div",
|
|
5036
5269
|
{
|
|
5037
5270
|
title: "清空会话",
|
|
5038
|
-
className:
|
|
5271
|
+
className: re.e("action"),
|
|
5039
5272
|
onClick: () => n.controller.clearTopic(),
|
|
5040
5273
|
children: [
|
|
5041
|
-
/* @__PURE__ */ c(
|
|
5274
|
+
/* @__PURE__ */ c(En, {}),
|
|
5042
5275
|
/* @__PURE__ */ c("span", { children: "清空会话" })
|
|
5043
5276
|
]
|
|
5044
5277
|
}
|
|
5045
5278
|
) })
|
|
5046
5279
|
] });
|
|
5047
5280
|
};
|
|
5048
|
-
const
|
|
5049
|
-
const e =
|
|
5281
|
+
const ce = new k("chat-minimize"), Ss = (n) => {
|
|
5282
|
+
const e = O(null), [t, i] = V(""), [s, a] = V(0), o = O(!1), r = {
|
|
5050
5283
|
x: (window.innerWidth - 86) / window.innerWidth,
|
|
5051
5284
|
y: (window.innerHeight - 86) / window.innerHeight
|
|
5052
|
-
}, u =
|
|
5285
|
+
}, u = B(() => {
|
|
5053
5286
|
const p = n.controller.messages.value[n.controller.messages.value.length - 1];
|
|
5054
5287
|
return p ? p.role === "ASSISTANT" && p.state === 20 && p.completed !== !0 : !1;
|
|
5055
5288
|
}), h = (p) => {
|
|
5056
|
-
const m = p.indexOf("<think>"),
|
|
5057
|
-
let
|
|
5058
|
-
return
|
|
5059
|
-
}, d =
|
|
5289
|
+
const m = p.indexOf("<think>"), w = p.indexOf("</think>");
|
|
5290
|
+
let g = "", v = "";
|
|
5291
|
+
return w === -1 ? (g = p.slice(m + 7), v = "") : (g = p.slice(m + 7, w), v = p.slice(w + 8)), { thoughtContent: g, answerContent: v };
|
|
5292
|
+
}, d = B(() => {
|
|
5060
5293
|
let p = "";
|
|
5061
5294
|
if (!u.value)
|
|
5062
5295
|
return i(""), a(0), p;
|
|
5063
5296
|
const m = n.controller.messages.value[n.controller.messages.value.length - 1];
|
|
5064
5297
|
if (p = m.content, m.content.indexOf("<think>") !== -1) {
|
|
5065
|
-
const { thoughtContent:
|
|
5298
|
+
const { thoughtContent: w, answerContent: g } = h(
|
|
5066
5299
|
m.content
|
|
5067
5300
|
);
|
|
5068
|
-
p =
|
|
5301
|
+
p = w + g;
|
|
5069
5302
|
}
|
|
5070
5303
|
return p;
|
|
5071
5304
|
}), l = () => {
|
|
@@ -5073,37 +5306,37 @@ const re = new k("chat-minimize"), Cs = (n) => {
|
|
|
5073
5306
|
left: "".concat(r.x * 100, "%"),
|
|
5074
5307
|
top: "".concat(r.y * 100, "%")
|
|
5075
5308
|
}), localStorage.setItem(
|
|
5076
|
-
|
|
5309
|
+
I.MINIMIZE_STYLY_CHCHE,
|
|
5077
5310
|
JSON.stringify(r)
|
|
5078
5311
|
);
|
|
5079
5312
|
}, f = () => {
|
|
5080
5313
|
const p = e.current;
|
|
5081
5314
|
p && (p.onmousedown = (m) => {
|
|
5082
5315
|
document.body.style.userSelect = "none";
|
|
5083
|
-
const
|
|
5084
|
-
const
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5316
|
+
const w = m.clientX - p.offsetLeft, g = m.clientY - p.offsetTop, v = Date.now(), b = (S) => {
|
|
5317
|
+
const L = 56 / window.innerWidth, K = 56 / window.innerHeight, { x: G, y: ee } = vn(
|
|
5318
|
+
S.clientX - w,
|
|
5319
|
+
S.clientY - g,
|
|
5320
|
+
L,
|
|
5321
|
+
K
|
|
5089
5322
|
);
|
|
5090
|
-
Object.assign(r, { x:
|
|
5323
|
+
Object.assign(r, { x: G, y: ee }), requestAnimationFrame(() => {
|
|
5091
5324
|
l();
|
|
5092
5325
|
});
|
|
5093
|
-
},
|
|
5094
|
-
const
|
|
5095
|
-
o.current =
|
|
5326
|
+
}, T = () => {
|
|
5327
|
+
const S = Date.now();
|
|
5328
|
+
o.current = S - v > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", T);
|
|
5096
5329
|
};
|
|
5097
|
-
document.addEventListener("mousemove",
|
|
5330
|
+
document.addEventListener("mousemove", b), document.addEventListener("mouseup", T);
|
|
5098
5331
|
});
|
|
5099
5332
|
}, _ = () => {
|
|
5100
5333
|
o.current || n.onClick();
|
|
5101
5334
|
};
|
|
5102
5335
|
return D(() => {
|
|
5103
|
-
const p = localStorage.getItem(
|
|
5336
|
+
const p = localStorage.getItem(I.MINIMIZE_STYLY_CHCHE);
|
|
5104
5337
|
if (p) {
|
|
5105
5338
|
const m = JSON.parse(p);
|
|
5106
|
-
|
|
5339
|
+
tt(m) && Object.assign(r, m);
|
|
5107
5340
|
}
|
|
5108
5341
|
l(), f();
|
|
5109
5342
|
}, []), D(() => {
|
|
@@ -5118,7 +5351,7 @@ const re = new k("chat-minimize"), Cs = (n) => {
|
|
|
5118
5351
|
{
|
|
5119
5352
|
ref: e,
|
|
5120
5353
|
title: n.title,
|
|
5121
|
-
className: "".concat(
|
|
5354
|
+
className: "".concat(ce.b(), " ").concat(ce.is("hidden", !n.isMinimize), " ").concat(ce.is(
|
|
5122
5355
|
"show-halo",
|
|
5123
5356
|
u.value
|
|
5124
5357
|
)),
|
|
@@ -5126,38 +5359,40 @@ const re = new k("chat-minimize"), Cs = (n) => {
|
|
|
5126
5359
|
children: /* @__PURE__ */ c(
|
|
5127
5360
|
"div",
|
|
5128
5361
|
{
|
|
5129
|
-
className: "".concat(
|
|
5362
|
+
className: "".concat(ce.e("content"), " ").concat(ce.is(
|
|
5130
5363
|
"show-border",
|
|
5131
5364
|
!u.value
|
|
5132
5365
|
)),
|
|
5133
5366
|
children: [
|
|
5134
|
-
t && /* @__PURE__ */ c("div", { className: "".concat(
|
|
5135
|
-
/* @__PURE__ */ c(
|
|
5367
|
+
t && /* @__PURE__ */ c("div", { className: "".concat(ce.em("content", "popover")), children: /* @__PURE__ */ c("div", { className: "typewriter", children: t }) }),
|
|
5368
|
+
/* @__PURE__ */ c(gi, {})
|
|
5136
5369
|
]
|
|
5137
5370
|
}
|
|
5138
5371
|
)
|
|
5139
5372
|
}
|
|
5140
5373
|
);
|
|
5141
5374
|
};
|
|
5142
|
-
const
|
|
5375
|
+
const Re = Yn({
|
|
5143
5376
|
zIndex: 10,
|
|
5144
5377
|
enableBackFill: !0,
|
|
5145
|
-
newTopic: () => {
|
|
5378
|
+
newTopic: (n, e) => {
|
|
5379
|
+
},
|
|
5380
|
+
updateTopic: (n, e) => {
|
|
5146
5381
|
}
|
|
5147
5382
|
});
|
|
5148
|
-
var
|
|
5149
|
-
class
|
|
5383
|
+
var Xt, Zt, Jt, Kt;
|
|
5384
|
+
class Yt extends F {
|
|
5150
5385
|
constructor(t) {
|
|
5151
5386
|
super(t);
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5387
|
+
x(this, "ns", new k("chat-container"));
|
|
5388
|
+
x(this, "containerRef", vt());
|
|
5389
|
+
x(this, "dragHandle", vt());
|
|
5155
5390
|
/**
|
|
5156
5391
|
* 窗口样式数据
|
|
5157
5392
|
*
|
|
5158
5393
|
* @memberof ChatContainer
|
|
5159
5394
|
*/
|
|
5160
|
-
|
|
5395
|
+
x(this, "data", {
|
|
5161
5396
|
side: {
|
|
5162
5397
|
y: 0,
|
|
5163
5398
|
height: 1,
|
|
@@ -5180,14 +5415,14 @@ class Vt extends R {
|
|
|
5180
5415
|
* @type {boolean}
|
|
5181
5416
|
* @memberof ChatContainer
|
|
5182
5417
|
*/
|
|
5183
|
-
|
|
5418
|
+
x(this, "disabled", !1);
|
|
5184
5419
|
/**
|
|
5185
5420
|
* 最小化是否在拖拽中
|
|
5186
5421
|
* - 在拖拽时不应触发点击事件
|
|
5187
5422
|
* @type {boolean}
|
|
5188
5423
|
* @memberof ChatContainer
|
|
5189
5424
|
*/
|
|
5190
|
-
|
|
5425
|
+
x(this, "isDragging", !1);
|
|
5191
5426
|
/**
|
|
5192
5427
|
* 容器上下文
|
|
5193
5428
|
*
|
|
@@ -5195,11 +5430,14 @@ class Vt extends R {
|
|
|
5195
5430
|
* @date 2025-03-03 16:03:44
|
|
5196
5431
|
* @type {ContainerContext}
|
|
5197
5432
|
*/
|
|
5198
|
-
|
|
5199
|
-
zIndex: ((
|
|
5200
|
-
enableBackFill: ((
|
|
5201
|
-
newTopic: () => {
|
|
5202
|
-
this.props.aiTopic.newTopic();
|
|
5433
|
+
x(this, "containerContext", {
|
|
5434
|
+
zIndex: ((Xt = this.props.containerOptions) == null ? void 0 : Xt.zIndex) || 10,
|
|
5435
|
+
enableBackFill: ((Zt = this.props) == null ? void 0 : Zt.enableBackFill) !== void 0 && ((Jt = this.props) == null ? void 0 : Jt.enableBackFill) !== null ? (Kt = this.props) == null ? void 0 : Kt.enableBackFill : !0,
|
|
5436
|
+
newTopic: (t, i) => {
|
|
5437
|
+
this.props.aiTopic.newTopic(t, i);
|
|
5438
|
+
},
|
|
5439
|
+
updateTopic: (t, i) => {
|
|
5440
|
+
this.props.aiTopic.updateCurrentTopicByID(t, i);
|
|
5203
5441
|
}
|
|
5204
5442
|
});
|
|
5205
5443
|
this.state = {
|
|
@@ -5267,7 +5505,7 @@ class Vt extends R {
|
|
|
5267
5505
|
* @memberof ChatContainer
|
|
5268
5506
|
*/
|
|
5269
5507
|
setStyle() {
|
|
5270
|
-
Object.assign(this.containerRef.current.style, this.calcWindowStyle()), localStorage.setItem(
|
|
5508
|
+
Object.assign(this.containerRef.current.style, this.calcWindowStyle()), localStorage.setItem(I.STYLE_CACHE, JSON.stringify(this.data));
|
|
5271
5509
|
}
|
|
5272
5510
|
/**
|
|
5273
5511
|
* 吸附边缘(窗口模式)
|
|
@@ -5293,7 +5531,7 @@ class Vt extends R {
|
|
|
5293
5531
|
if (this.disabled)
|
|
5294
5532
|
return;
|
|
5295
5533
|
this.data.showMode = "window";
|
|
5296
|
-
const { x: u, y: h } =
|
|
5534
|
+
const { x: u, y: h } = vn(
|
|
5297
5535
|
r.clientX - i,
|
|
5298
5536
|
r.clientY - s,
|
|
5299
5537
|
this.data.window.width,
|
|
@@ -5312,7 +5550,7 @@ class Vt extends R {
|
|
|
5312
5550
|
* @memberof ChatContainer
|
|
5313
5551
|
*/
|
|
5314
5552
|
registerDragDialogBorder() {
|
|
5315
|
-
|
|
5553
|
+
Ue(this.containerRef.current).resizable({
|
|
5316
5554
|
// 可拖拽的边缘
|
|
5317
5555
|
edges: {
|
|
5318
5556
|
top: !0,
|
|
@@ -5323,9 +5561,9 @@ class Vt extends R {
|
|
|
5323
5561
|
margin: 6,
|
|
5324
5562
|
modifiers: [
|
|
5325
5563
|
// 保持在父对象内部
|
|
5326
|
-
|
|
5564
|
+
Ue.modifiers.restrictEdges({ outer: document.body }),
|
|
5327
5565
|
// 缩放最小宽度
|
|
5328
|
-
|
|
5566
|
+
Ue.modifiers.restrictSize({
|
|
5329
5567
|
min: { width: this.data.minWidth, height: this.data.minHeight }
|
|
5330
5568
|
})
|
|
5331
5569
|
],
|
|
@@ -5356,10 +5594,10 @@ class Vt extends R {
|
|
|
5356
5594
|
}
|
|
5357
5595
|
componentDidMount() {
|
|
5358
5596
|
this.handleFullScreenChange = this.handleFullScreenChange.bind(this);
|
|
5359
|
-
const t = localStorage.getItem(
|
|
5597
|
+
const t = localStorage.getItem(I.STYLE_CACHE);
|
|
5360
5598
|
if (t) {
|
|
5361
5599
|
const i = JSON.parse(t);
|
|
5362
|
-
i.side &&
|
|
5600
|
+
i.side && tt(i.side) && i.window && tt(i.window) && Object.assign(this.data, i);
|
|
5363
5601
|
}
|
|
5364
5602
|
this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(), document.addEventListener("fullscreenchange", this.handleFullScreenChange);
|
|
5365
5603
|
}
|
|
@@ -5423,7 +5661,7 @@ class Vt extends R {
|
|
|
5423
5661
|
t.stopPropagation();
|
|
5424
5662
|
}
|
|
5425
5663
|
render() {
|
|
5426
|
-
return /* @__PURE__ */ c(
|
|
5664
|
+
return /* @__PURE__ */ c(Re.Provider, { value: this.containerContext, children: /* @__PURE__ */ c("div", { className: "".concat(this.ns.b()), children: [
|
|
5427
5665
|
/* @__PURE__ */ c(
|
|
5428
5666
|
"div",
|
|
5429
5667
|
{
|
|
@@ -5446,7 +5684,7 @@ class Vt extends R {
|
|
|
5446
5684
|
), " ").concat(this.ns.be("header-action-wrapper", "minimize")),
|
|
5447
5685
|
onMouseDown: this.stopPropagation.bind(this),
|
|
5448
5686
|
onClick: this.minimize.bind(this),
|
|
5449
|
-
children: /* @__PURE__ */ c(
|
|
5687
|
+
children: /* @__PURE__ */ c(_i, {})
|
|
5450
5688
|
}
|
|
5451
5689
|
),
|
|
5452
5690
|
this.state.isFullScreen ? /* @__PURE__ */ c(
|
|
@@ -5474,7 +5712,7 @@ class Vt extends R {
|
|
|
5474
5712
|
), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
|
|
5475
5713
|
onMouseDown: this.stopPropagation.bind(this),
|
|
5476
5714
|
onClick: this.fullScreen.bind(this),
|
|
5477
|
-
children: /* @__PURE__ */ c(
|
|
5715
|
+
children: /* @__PURE__ */ c(vi, {})
|
|
5478
5716
|
}
|
|
5479
5717
|
),
|
|
5480
5718
|
/* @__PURE__ */ c(
|
|
@@ -5487,13 +5725,13 @@ class Vt extends R {
|
|
|
5487
5725
|
), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
|
|
5488
5726
|
onMouseDown: this.stopPropagation.bind(this),
|
|
5489
5727
|
onClick: this.close.bind(this),
|
|
5490
|
-
children: /* @__PURE__ */ c(
|
|
5728
|
+
children: /* @__PURE__ */ c(ui, {})
|
|
5491
5729
|
}
|
|
5492
5730
|
)
|
|
5493
5731
|
] })
|
|
5494
5732
|
] }),
|
|
5495
5733
|
this.props.mode === "TOPIC" ? /* @__PURE__ */ c("div", { className: "".concat(this.ns.b("main")), children: [
|
|
5496
|
-
/* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "left")), children: /* @__PURE__ */ c(
|
|
5734
|
+
/* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "left")), children: /* @__PURE__ */ c(xs, { controller: this.props.aiTopic }) }),
|
|
5497
5735
|
/* @__PURE__ */ c("div", { className: "".concat(this.ns.be("main", "right")), children: [
|
|
5498
5736
|
/* @__PURE__ */ c("div", { className: this.ns.b("content"), children: /* @__PURE__ */ c(
|
|
5499
5737
|
Mt,
|
|
@@ -5503,7 +5741,7 @@ class Vt extends R {
|
|
|
5503
5741
|
}
|
|
5504
5742
|
) }),
|
|
5505
5743
|
/* @__PURE__ */ c(
|
|
5506
|
-
|
|
5744
|
+
st,
|
|
5507
5745
|
{
|
|
5508
5746
|
type: "footer",
|
|
5509
5747
|
mode: this.props.mode,
|
|
@@ -5517,7 +5755,7 @@ class Vt extends R {
|
|
|
5517
5755
|
}
|
|
5518
5756
|
),
|
|
5519
5757
|
/* @__PURE__ */ c("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ c(
|
|
5520
|
-
|
|
5758
|
+
qt,
|
|
5521
5759
|
{
|
|
5522
5760
|
controller: this.props.aiChat,
|
|
5523
5761
|
questionToolbarItems: this.props.questionToolbarItems
|
|
@@ -5533,7 +5771,7 @@ class Vt extends R {
|
|
|
5533
5771
|
}
|
|
5534
5772
|
) }),
|
|
5535
5773
|
/* @__PURE__ */ c(
|
|
5536
|
-
|
|
5774
|
+
st,
|
|
5537
5775
|
{
|
|
5538
5776
|
type: "footer",
|
|
5539
5777
|
mode: this.props.mode,
|
|
@@ -5547,7 +5785,7 @@ class Vt extends R {
|
|
|
5547
5785
|
}
|
|
5548
5786
|
),
|
|
5549
5787
|
/* @__PURE__ */ c("div", { className: this.ns.b("footer"), children: /* @__PURE__ */ c(
|
|
5550
|
-
|
|
5788
|
+
qt,
|
|
5551
5789
|
{
|
|
5552
5790
|
controller: this.props.aiChat,
|
|
5553
5791
|
questionToolbarItems: this.props.questionToolbarItems
|
|
@@ -5558,7 +5796,7 @@ class Vt extends R {
|
|
|
5558
5796
|
}
|
|
5559
5797
|
),
|
|
5560
5798
|
/* @__PURE__ */ c(
|
|
5561
|
-
|
|
5799
|
+
Ss,
|
|
5562
5800
|
{
|
|
5563
5801
|
title: this.props.caption || "AI助手",
|
|
5564
5802
|
controller: this.props.aiChat,
|
|
@@ -5570,6 +5808,6 @@ class Vt extends R {
|
|
|
5570
5808
|
}
|
|
5571
5809
|
}
|
|
5572
5810
|
export {
|
|
5573
|
-
|
|
5574
|
-
|
|
5811
|
+
Yt as ChatContainer,
|
|
5812
|
+
$s as chat
|
|
5575
5813
|
};
|