@ibiz-template-plugin/ai-chat 0.0.14 → 0.0.15
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 +1438 -1347
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/chart-minimize/chart-minimize.d.ts +31 -0
- package/dist/types/components/chat-container/chat-container.d.ts +33 -40
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/util/drag-util.d.ts +28 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
var
|
|
8
|
-
function
|
|
2
|
+
var yn = Object.defineProperty;
|
|
3
|
+
var Cn = (n, e, t) => e in n ? yn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
4
|
+
var x = (n, e, t) => (Cn(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
5
|
+
import Oe from "interactjs";
|
|
6
|
+
import Tn from "cherry-markdown";
|
|
7
|
+
var Ie, w, Ft, Ut, ee, ot, Wt, qe, Vt, oe = {}, jt = [], xn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ae = Array.isArray;
|
|
8
|
+
function Y(n, e) {
|
|
9
9
|
for (var t in e)
|
|
10
|
-
|
|
11
|
-
return
|
|
10
|
+
n[t] = e[t];
|
|
11
|
+
return n;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
var e =
|
|
15
|
-
e && e.removeChild(
|
|
13
|
+
function qt(n) {
|
|
14
|
+
var e = n.parentNode;
|
|
15
|
+
e && e.removeChild(n);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
var
|
|
17
|
+
function W(n, e, t) {
|
|
18
|
+
var i, s, o, r = {};
|
|
19
19
|
for (o in e)
|
|
20
|
-
o == "key" ?
|
|
21
|
-
if (arguments.length > 2 && (r.children = arguments.length > 3 ?
|
|
22
|
-
for (o in
|
|
23
|
-
r[o] === void 0 && (r[o] =
|
|
24
|
-
return
|
|
20
|
+
o == "key" ? i = e[o] : o == "ref" ? s = e[o] : r[o] = e[o];
|
|
21
|
+
if (arguments.length > 2 && (r.children = arguments.length > 3 ? Ie.call(arguments, 2) : t), typeof n == "function" && n.defaultProps != null)
|
|
22
|
+
for (o in n.defaultProps)
|
|
23
|
+
r[o] === void 0 && (r[o] = n.defaultProps[o]);
|
|
24
|
+
return Te(n, r, i, s, null);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
var o = { type:
|
|
28
|
-
return s == null &&
|
|
26
|
+
function Te(n, e, t, i, s) {
|
|
27
|
+
var o = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++Ft : s };
|
|
28
|
+
return s == null && w.vnode != null && w.vnode(o), o;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function rt() {
|
|
31
31
|
return { current: null };
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function V(n) {
|
|
34
|
+
return n.children;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
this.props =
|
|
36
|
+
function L(n, e) {
|
|
37
|
+
this.props = n, this.context = e;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ve(n, e) {
|
|
40
40
|
if (e == null)
|
|
41
|
-
return
|
|
42
|
-
for (var t; e <
|
|
43
|
-
if ((t =
|
|
41
|
+
return n.__ ? ve(n.__, n.__.__k.indexOf(n) + 1) : null;
|
|
42
|
+
for (var t; e < n.__k.length; e++)
|
|
43
|
+
if ((t = n.__k[e]) != null && t.__e != null)
|
|
44
44
|
return t.__d || t.__e;
|
|
45
|
-
return typeof
|
|
45
|
+
return typeof n.type == "function" ? ve(n) : null;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Yt(n) {
|
|
48
48
|
var e, t;
|
|
49
|
-
if ((
|
|
50
|
-
for (
|
|
51
|
-
if ((t =
|
|
52
|
-
|
|
49
|
+
if ((n = n.__) != null && n.__c != null) {
|
|
50
|
+
for (n.__e = n.__c.base = null, e = 0; e < n.__k.length; e++)
|
|
51
|
+
if ((t = n.__k[e]) != null && t.__e != null) {
|
|
52
|
+
n.__e = n.__c.base = t.__e;
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return Yt(n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
(!
|
|
58
|
+
function Ye(n) {
|
|
59
|
+
(!n.__d && (n.__d = !0) && ee.push(n) && !ke.__r++ || ot !== w.debounceRendering) && ((ot = w.debounceRendering) || Wt)(ke);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
var
|
|
63
|
-
for (
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
function ke() {
|
|
62
|
+
var n, e, t, i, s, o, r, a, u;
|
|
63
|
+
for (ee.sort(qe); n = ee.shift(); )
|
|
64
|
+
n.__d && (e = ee.length, i = void 0, s = void 0, o = void 0, a = (r = (t = n).__v).__e, (u = t.__P) && (i = [], s = [], (o = Y({}, r)).__v = r.__v + 1, Qe(u, r, o, t.__n, u.ownerSVGElement !== void 0, r.__h != null ? [a] : null, i, a == null ? ve(r) : a, r.__h, s), Jt(i, r, s), r.__e != a && Yt(r)), ee.length > e && ee.sort(qe));
|
|
65
|
+
ke.__r = 0;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
var l, _,
|
|
69
|
-
for (t.__k = [], l = 0; l <
|
|
70
|
-
(
|
|
71
|
-
for (t.__e =
|
|
72
|
-
S[l] != null && (typeof t.type == "function" && S[l].__e != null && S[l].__e == t.__d && (t.__d = S[l].__e.nextSibling),
|
|
67
|
+
function Xt(n, e, t, i, s, o, r, a, u, f, d) {
|
|
68
|
+
var l, _, g, h, p, v, m, y, T, C = 0, S = i && i.__k || jt, A = S.length, D = A, R = e.length;
|
|
69
|
+
for (t.__k = [], l = 0; l < R; l++)
|
|
70
|
+
(h = t.__k[l] = (h = e[l]) == null || typeof h == "boolean" || typeof h == "function" ? null : typeof h == "string" || typeof h == "number" || typeof h == "bigint" ? Te(null, h, null, null, h) : Ae(h) ? Te(V, { children: h }, null, null, null) : h.__b > 0 ? Te(h.type, h.props, h.key, h.ref ? h.ref : null, h.__v) : h) != null ? (h.__ = t, h.__b = t.__b + 1, (y = Sn(h, S, m = l + C, D)) === -1 ? g = oe : (g = S[y] || oe, S[y] = void 0, D--), Qe(n, h, g, s, o, r, a, u, f, d), p = h.__e, (_ = h.ref) && g.ref != _ && (g.ref && et(g.ref, null, h), d.push(_, h.__c || p, h)), p != null && (v == null && (v = p), (T = g === oe || g.__v === null) ? y == -1 && C-- : y !== m && (y === m + 1 ? C++ : y > m ? D > R - m ? C += y - m : C-- : C = y < m && y == m - 1 ? y - m : 0), m = l + C, typeof h.type != "function" || y === m && g.__k !== h.__k ? typeof h.type == "function" || y === m && !T ? h.__d !== void 0 ? (u = h.__d, h.__d = void 0) : u = p.nextSibling : u = Gt(n, p, u) : u = Zt(h, u, n), typeof t.type == "function" && (t.__d = u))) : (g = S[l]) && g.key == null && g.__e && (g.__e == u && (g.__ = i, u = ve(g)), Xe(g, g, !1), S[l] = null);
|
|
71
|
+
for (t.__e = v, l = A; l--; )
|
|
72
|
+
S[l] != null && (typeof t.type == "function" && S[l].__e != null && S[l].__e == t.__d && (t.__d = S[l].__e.nextSibling), Xe(S[l], S[l]));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
for (var
|
|
76
|
-
(
|
|
74
|
+
function Zt(n, e, t) {
|
|
75
|
+
for (var i, s = n.__k, o = 0; s && o < s.length; o++)
|
|
76
|
+
(i = s[o]) && (i.__ = n, e = typeof i.type == "function" ? Zt(i, e, t) : Gt(t, i.__e, e));
|
|
77
77
|
return e;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return e = e || [],
|
|
81
|
-
|
|
82
|
-
}) : e.push(
|
|
79
|
+
function Ee(n, e) {
|
|
80
|
+
return e = e || [], n == null || typeof n == "boolean" || (Ae(n) ? n.some(function(t) {
|
|
81
|
+
Ee(t, e);
|
|
82
|
+
}) : e.push(n)), e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
return t == null || t.parentNode !==
|
|
84
|
+
function Gt(n, e, t) {
|
|
85
|
+
return t == null || t.parentNode !== n ? n.insertBefore(e, null) : e == t && e.parentNode != null || n.insertBefore(e, t), e.nextSibling;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
var s =
|
|
87
|
+
function Sn(n, e, t, i) {
|
|
88
|
+
var s = n.key, o = n.type, r = t - 1, a = t + 1, u = e[t];
|
|
89
89
|
if (u === null || u && s == u.key && o === u.type)
|
|
90
90
|
return t;
|
|
91
|
-
if (
|
|
91
|
+
if (i > (u != null ? 1 : 0))
|
|
92
92
|
for (; r >= 0 || a < e.length; ) {
|
|
93
93
|
if (r >= 0) {
|
|
94
94
|
if ((u = e[r]) && s == u.key && o === u.type)
|
|
@@ -103,180 +103,180 @@ function wi(i, e, t, n) {
|
|
|
103
103
|
}
|
|
104
104
|
return -1;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function kn(n, e, t, i, s) {
|
|
107
107
|
var o;
|
|
108
108
|
for (o in t)
|
|
109
|
-
o === "children" || o === "key" || o in e ||
|
|
109
|
+
o === "children" || o === "key" || o in e || Ne(n, o, null, t[o], i);
|
|
110
110
|
for (o in e)
|
|
111
|
-
s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] ||
|
|
111
|
+
s && typeof e[o] != "function" || o === "children" || o === "key" || o === "value" || o === "checked" || t[o] === e[o] || Ne(n, o, e[o], t[o], i);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
e[0] === "-" ?
|
|
113
|
+
function at(n, e, t) {
|
|
114
|
+
e[0] === "-" ? n.setProperty(e, t == null ? "" : t) : n[e] = t == null ? "" : typeof t != "number" || xn.test(e) ? t : t + "px";
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Ne(n, e, t, i, s) {
|
|
117
117
|
var o;
|
|
118
118
|
e:
|
|
119
119
|
if (e === "style")
|
|
120
120
|
if (typeof t == "string")
|
|
121
|
-
|
|
121
|
+
n.style.cssText = t;
|
|
122
122
|
else {
|
|
123
|
-
if (typeof
|
|
124
|
-
for (e in
|
|
125
|
-
t && e in t ||
|
|
123
|
+
if (typeof i == "string" && (n.style.cssText = i = ""), i)
|
|
124
|
+
for (e in i)
|
|
125
|
+
t && e in t || at(n.style, e, "");
|
|
126
126
|
if (t)
|
|
127
127
|
for (e in t)
|
|
128
|
-
|
|
128
|
+
i && t[e] === i[e] || at(n.style, e, t[e]);
|
|
129
129
|
}
|
|
130
130
|
else if (e[0] === "o" && e[1] === "n")
|
|
131
|
-
o = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in
|
|
131
|
+
o = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in n ? e.toLowerCase().slice(2) : e.slice(2), n.l || (n.l = {}), n.l[e + o] = t, t ? i ? t.u = i.u : (t.u = Date.now(), n.addEventListener(e, o ? lt : ct, o)) : n.removeEventListener(e, o ? lt : ct, o);
|
|
132
132
|
else if (e !== "dangerouslySetInnerHTML") {
|
|
133
133
|
if (s)
|
|
134
134
|
e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
135
|
-
else if (e !== "width" && e !== "height" && e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e !== "rowSpan" && e !== "colSpan" && e !== "role" && e in
|
|
135
|
+
else if (e !== "width" && e !== "height" && e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e !== "rowSpan" && e !== "colSpan" && e !== "role" && e in n)
|
|
136
136
|
try {
|
|
137
|
-
|
|
137
|
+
n[e] = t == null ? "" : t;
|
|
138
138
|
break e;
|
|
139
139
|
} catch (r) {
|
|
140
140
|
}
|
|
141
|
-
typeof t == "function" || (t == null || t === !1 && e[4] !== "-" ?
|
|
141
|
+
typeof t == "function" || (t == null || t === !1 && e[4] !== "-" ? n.removeAttribute(e) : n.setAttribute(e, t));
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
var e = this.l[
|
|
146
|
-
if (
|
|
147
|
-
if (
|
|
144
|
+
function ct(n) {
|
|
145
|
+
var e = this.l[n.type + !1];
|
|
146
|
+
if (n.t) {
|
|
147
|
+
if (n.t <= e.u)
|
|
148
148
|
return;
|
|
149
149
|
} else
|
|
150
|
-
|
|
151
|
-
return e(
|
|
150
|
+
n.t = Date.now();
|
|
151
|
+
return e(w.event ? w.event(n) : n);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
return this.l[
|
|
153
|
+
function lt(n) {
|
|
154
|
+
return this.l[n.type + !0](w.event ? w.event(n) : n);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
var d, l, _,
|
|
156
|
+
function Qe(n, e, t, i, s, o, r, a, u, f) {
|
|
157
|
+
var d, l, _, g, h, p, v, m, y, T, C, S, A, D, R, z = e.type;
|
|
158
158
|
if (e.constructor !== void 0)
|
|
159
159
|
return null;
|
|
160
|
-
t.__h != null && (u = t.__h, a = e.__e = t.__e, e.__h = null, o = [a]), (d =
|
|
160
|
+
t.__h != null && (u = t.__h, a = e.__e = t.__e, e.__h = null, o = [a]), (d = w.__b) && d(e);
|
|
161
161
|
e:
|
|
162
|
-
if (typeof
|
|
162
|
+
if (typeof z == "function")
|
|
163
163
|
try {
|
|
164
|
-
if (
|
|
165
|
-
|
|
164
|
+
if (m = e.props, y = (d = z.contextType) && i[d.__c], T = d ? y ? y.props.value : d.__ : i, t.__c ? v = (l = e.__c = t.__c).__ = l.__E : ("prototype" in z && z.prototype.render ? e.__c = l = new z(m, T) : (e.__c = l = new L(m, T), l.constructor = z, l.render = Nn), y && y.sub(l), l.props = m, l.state || (l.state = {}), l.context = T, l.__n = i, _ = l.__d = !0, l.__h = [], l._sb = []), l.__s == null && (l.__s = l.state), z.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = Y({}, l.__s)), Y(l.__s, z.getDerivedStateFromProps(m, l.__s))), g = l.props, h = l.state, l.__v = e, _)
|
|
165
|
+
z.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), l.componentDidMount != null && l.__h.push(l.componentDidMount);
|
|
166
166
|
else {
|
|
167
|
-
if (
|
|
168
|
-
for (e.__v !== t.__v && (l.props =
|
|
169
|
-
|
|
170
|
-
}),
|
|
171
|
-
l.__h.push(l._sb[
|
|
167
|
+
if (z.getDerivedStateFromProps == null && m !== g && l.componentWillReceiveProps != null && l.componentWillReceiveProps(m, T), !l.__e && (l.shouldComponentUpdate != null && l.shouldComponentUpdate(m, l.__s, T) === !1 || e.__v === t.__v)) {
|
|
168
|
+
for (e.__v !== t.__v && (l.props = m, l.state = l.__s, l.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(te) {
|
|
169
|
+
te && (te.__ = e);
|
|
170
|
+
}), C = 0; C < l._sb.length; C++)
|
|
171
|
+
l.__h.push(l._sb[C]);
|
|
172
172
|
l._sb = [], l.__h.length && r.push(l);
|
|
173
173
|
break e;
|
|
174
174
|
}
|
|
175
|
-
l.componentWillUpdate != null && l.componentWillUpdate(
|
|
176
|
-
l.componentDidUpdate(
|
|
175
|
+
l.componentWillUpdate != null && l.componentWillUpdate(m, l.__s, T), l.componentDidUpdate != null && l.__h.push(function() {
|
|
176
|
+
l.componentDidUpdate(g, h, p);
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
if (l.context =
|
|
180
|
-
for (l.state = l.__s, l.__d = !1, S && S(e), d = l.render(l.props, l.state, l.context),
|
|
181
|
-
l.__h.push(l._sb[
|
|
179
|
+
if (l.context = T, l.props = m, l.__P = n, l.__e = !1, S = w.__r, A = 0, "prototype" in z && z.prototype.render) {
|
|
180
|
+
for (l.state = l.__s, l.__d = !1, S && S(e), d = l.render(l.props, l.state, l.context), D = 0; D < l._sb.length; D++)
|
|
181
|
+
l.__h.push(l._sb[D]);
|
|
182
182
|
l._sb = [];
|
|
183
183
|
} else
|
|
184
184
|
do
|
|
185
185
|
l.__d = !1, S && S(e), d = l.render(l.props, l.state, l.context), l.state = l.__s;
|
|
186
|
-
while (l.__d && ++
|
|
187
|
-
l.state = l.__s, l.getChildContext != null && (
|
|
188
|
-
} catch (
|
|
189
|
-
e.__v = null, (u || o != null) && (e.__e = a, e.__h = !!u, o[o.indexOf(a)] = null),
|
|
186
|
+
while (l.__d && ++A < 25);
|
|
187
|
+
l.state = l.__s, l.getChildContext != null && (i = Y(Y({}, i), l.getChildContext())), _ || l.getSnapshotBeforeUpdate == null || (p = l.getSnapshotBeforeUpdate(g, h)), Xt(n, Ae(R = d != null && d.type === V && d.key == null ? d.props.children : d) ? R : [R], e, t, i, s, o, r, a, u, f), l.base = e.__e, e.__h = null, l.__h.length && r.push(l), v && (l.__E = l.__ = null);
|
|
188
|
+
} catch (te) {
|
|
189
|
+
e.__v = null, (u || o != null) && (e.__e = a, e.__h = !!u, o[o.indexOf(a)] = null), w.__e(te, e, t);
|
|
190
190
|
}
|
|
191
191
|
else
|
|
192
|
-
o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e =
|
|
193
|
-
(d =
|
|
192
|
+
o == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = En(t.__e, e, t, i, s, o, r, u, f);
|
|
193
|
+
(d = w.diffed) && d(e);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
for (var
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
function Jt(n, e, t) {
|
|
196
|
+
for (var i = 0; i < t.length; i++)
|
|
197
|
+
et(t[i], t[++i], t[++i]);
|
|
198
|
+
w.__c && w.__c(e, n), n.some(function(s) {
|
|
199
199
|
try {
|
|
200
|
-
|
|
200
|
+
n = s.__h, s.__h = [], n.some(function(o) {
|
|
201
201
|
o.call(s);
|
|
202
202
|
});
|
|
203
203
|
} catch (o) {
|
|
204
|
-
|
|
204
|
+
w.__e(o, s.__v);
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
var
|
|
210
|
-
if (
|
|
211
|
-
for (;
|
|
212
|
-
if ((
|
|
213
|
-
|
|
208
|
+
function En(n, e, t, i, s, o, r, a, u) {
|
|
209
|
+
var f, d, l, _ = t.props, g = e.props, h = e.type, p = 0;
|
|
210
|
+
if (h === "svg" && (s = !0), o != null) {
|
|
211
|
+
for (; p < o.length; p++)
|
|
212
|
+
if ((f = o[p]) && "setAttribute" in f == !!h && (h ? f.localName === h : f.nodeType === 3)) {
|
|
213
|
+
n = f, o[p] = null;
|
|
214
214
|
break;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
218
|
-
if (
|
|
219
|
-
return document.createTextNode(
|
|
220
|
-
|
|
217
|
+
if (n == null) {
|
|
218
|
+
if (h === null)
|
|
219
|
+
return document.createTextNode(g);
|
|
220
|
+
n = s ? document.createElementNS("http://www.w3.org/2000/svg", h) : document.createElement(h, g.is && g), o = null, a = !1;
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
223
|
-
_ ===
|
|
222
|
+
if (h === null)
|
|
223
|
+
_ === g || a && n.data === g || (n.data = g);
|
|
224
224
|
else {
|
|
225
|
-
if (o = o &&
|
|
225
|
+
if (o = o && Ie.call(n.childNodes), d = (_ = t.props || oe).dangerouslySetInnerHTML, l = g.dangerouslySetInnerHTML, !a) {
|
|
226
226
|
if (o != null)
|
|
227
|
-
for (_ = {},
|
|
228
|
-
_[
|
|
229
|
-
(l || d) && (l && (d && l.__html == d.__html || l.__html ===
|
|
227
|
+
for (_ = {}, p = 0; p < n.attributes.length; p++)
|
|
228
|
+
_[n.attributes[p].name] = n.attributes[p].value;
|
|
229
|
+
(l || d) && (l && (d && l.__html == d.__html || l.__html === n.innerHTML) || (n.innerHTML = l && l.__html || ""));
|
|
230
230
|
}
|
|
231
|
-
if (
|
|
231
|
+
if (kn(n, g, _, s, a), l)
|
|
232
232
|
e.__k = [];
|
|
233
|
-
else if (
|
|
234
|
-
for (
|
|
235
|
-
o[
|
|
236
|
-
a || ("value" in
|
|
233
|
+
else if (Xt(n, Ae(p = e.props.children) ? p : [p], e, t, i, s && h !== "foreignObject", o, r, o ? o[0] : t.__k && ve(t, 0), a, u), o != null)
|
|
234
|
+
for (p = o.length; p--; )
|
|
235
|
+
o[p] != null && qt(o[p]);
|
|
236
|
+
a || ("value" in g && (p = g.value) !== void 0 && (p !== n.value || h === "progress" && !p || h === "option" && p !== _.value) && Ne(n, "value", p, _.value, !1), "checked" in g && (p = g.checked) !== void 0 && p !== n.checked && Ne(n, "checked", p, _.checked, !1));
|
|
237
237
|
}
|
|
238
|
-
return
|
|
238
|
+
return n;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function et(n, e, t) {
|
|
241
241
|
try {
|
|
242
|
-
typeof
|
|
243
|
-
} catch (
|
|
244
|
-
|
|
242
|
+
typeof n == "function" ? n(e) : n.current = e;
|
|
243
|
+
} catch (i) {
|
|
244
|
+
w.__e(i, t);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
var
|
|
249
|
-
if (
|
|
250
|
-
if (
|
|
247
|
+
function Xe(n, e, t) {
|
|
248
|
+
var i, s;
|
|
249
|
+
if (w.unmount && w.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || et(i, null, e)), (i = n.__c) != null) {
|
|
250
|
+
if (i.componentWillUnmount)
|
|
251
251
|
try {
|
|
252
|
-
|
|
252
|
+
i.componentWillUnmount();
|
|
253
253
|
} catch (o) {
|
|
254
|
-
|
|
254
|
+
w.__e(o, e);
|
|
255
255
|
}
|
|
256
|
-
|
|
256
|
+
i.base = i.__P = null, n.__c = void 0;
|
|
257
257
|
}
|
|
258
|
-
if (
|
|
259
|
-
for (s = 0; s <
|
|
260
|
-
|
|
261
|
-
t ||
|
|
258
|
+
if (i = n.__k)
|
|
259
|
+
for (s = 0; s < i.length; s++)
|
|
260
|
+
i[s] && Xe(i[s], e, t || typeof n.type != "function");
|
|
261
|
+
t || n.__e == null || qt(n.__e), n.__ = n.__e = n.__d = void 0;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return this.constructor(
|
|
263
|
+
function Nn(n, e, t) {
|
|
264
|
+
return this.constructor(n, t);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
var
|
|
268
|
-
|
|
266
|
+
function se(n, e, t) {
|
|
267
|
+
var i, s, o, r;
|
|
268
|
+
w.__ && w.__(n, e), s = (i = typeof t == "function") ? null : t && t.__k || e.__k, o = [], r = [], Qe(e, n = (!i && t || e).__k = W(V, null, [n]), s || oe, oe, e.ownerSVGElement !== void 0, !i && t ? [t] : s ? null : e.firstChild ? Ie.call(e.childNodes) : null, o, !i && t ? t : s ? s.__e : e.firstChild, i, r), Jt(o, n, r);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
var t = { __c: e = "__cC" +
|
|
272
|
-
return
|
|
273
|
-
}, Provider: function(
|
|
270
|
+
function $n(n, e) {
|
|
271
|
+
var t = { __c: e = "__cC" + Vt++, __: n, Consumer: function(i, s) {
|
|
272
|
+
return i.children(s);
|
|
273
|
+
}, Provider: function(i) {
|
|
274
274
|
var s, o;
|
|
275
275
|
return this.getChildContext || (s = [], (o = {})[e] = this, this.getChildContext = function() {
|
|
276
276
|
return o;
|
|
277
277
|
}, this.shouldComponentUpdate = function(r) {
|
|
278
278
|
this.props.value !== r.value && s.some(function(a) {
|
|
279
|
-
a.__e = !0,
|
|
279
|
+
a.__e = !0, Ye(a);
|
|
280
280
|
});
|
|
281
281
|
}, this.sub = function(r) {
|
|
282
282
|
s.push(r);
|
|
@@ -284,34 +284,34 @@ function Si(i, e) {
|
|
|
284
284
|
r.componentWillUnmount = function() {
|
|
285
285
|
s.splice(s.indexOf(r), 1), a && a.call(r);
|
|
286
286
|
};
|
|
287
|
-
}),
|
|
287
|
+
}), i.children;
|
|
288
288
|
} };
|
|
289
289
|
return t.Provider.__ = t.Consumer.contextType = t;
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
Ie = jt.slice, w = { __e: function(n, e, t, i) {
|
|
292
292
|
for (var s, o, r; e = e.__; )
|
|
293
293
|
if ((s = e.__c) && !s.__)
|
|
294
294
|
try {
|
|
295
|
-
if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(
|
|
295
|
+
if ((o = s.constructor) && o.getDerivedStateFromError != null && (s.setState(o.getDerivedStateFromError(n)), r = s.__d), s.componentDidCatch != null && (s.componentDidCatch(n, i || {}), r = s.__d), r)
|
|
296
296
|
return s.__E = s;
|
|
297
297
|
} catch (a) {
|
|
298
|
-
|
|
298
|
+
n = a;
|
|
299
299
|
}
|
|
300
|
-
throw
|
|
301
|
-
} },
|
|
302
|
-
return
|
|
303
|
-
},
|
|
300
|
+
throw n;
|
|
301
|
+
} }, Ft = 0, Ut = function(n) {
|
|
302
|
+
return n != null && n.constructor === void 0;
|
|
303
|
+
}, L.prototype.setState = function(n, e) {
|
|
304
304
|
var t;
|
|
305
|
-
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s =
|
|
306
|
-
},
|
|
307
|
-
this.__v && (this.__e = !0,
|
|
308
|
-
},
|
|
309
|
-
return
|
|
310
|
-
},
|
|
311
|
-
const
|
|
312
|
-
function J(
|
|
313
|
-
let o = "".concat(
|
|
314
|
-
return t && (o += "-".concat(t)),
|
|
305
|
+
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), Ye(this));
|
|
306
|
+
}, L.prototype.forceUpdate = function(n) {
|
|
307
|
+
this.__v && (this.__e = !0, n && this.__h.push(n), Ye(this));
|
|
308
|
+
}, L.prototype.render = V, ee = [], Wt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, qe = function(n, e) {
|
|
309
|
+
return n.__v.__b - e.__v.__b;
|
|
310
|
+
}, ke.__r = 0, Vt = 0;
|
|
311
|
+
const Mn = "ibiz", In = "is-";
|
|
312
|
+
function J(n, e, t, i, s) {
|
|
313
|
+
let o = "".concat(n, "-").concat(e);
|
|
314
|
+
return t && (o += "-".concat(t)), i && (o += "__".concat(i)), s && (o += "--".concat(s)), o;
|
|
315
315
|
}
|
|
316
316
|
class $ {
|
|
317
317
|
/**
|
|
@@ -330,8 +330,8 @@ class $ {
|
|
|
330
330
|
* @date 2023-11-03 10:11:31
|
|
331
331
|
* @type {string}
|
|
332
332
|
*/
|
|
333
|
-
|
|
334
|
-
this.block = e, this.namespace = t ||
|
|
333
|
+
x(this, "namespace");
|
|
334
|
+
this.block = e, this.namespace = t || Mn;
|
|
335
335
|
}
|
|
336
336
|
/**
|
|
337
337
|
* namespace-block
|
|
@@ -413,8 +413,8 @@ class $ {
|
|
|
413
413
|
* @param {string} [modifier]
|
|
414
414
|
* @return {*} {string}
|
|
415
415
|
*/
|
|
416
|
-
bem(e, t,
|
|
417
|
-
return e && t &&
|
|
416
|
+
bem(e, t, i) {
|
|
417
|
+
return e && t && i ? J(this.namespace, this.block, e, t, i) : "";
|
|
418
418
|
}
|
|
419
419
|
/**
|
|
420
420
|
* 返回状态 class
|
|
@@ -429,7 +429,7 @@ class $ {
|
|
|
429
429
|
* @return {*} {string}
|
|
430
430
|
*/
|
|
431
431
|
is(e, t) {
|
|
432
|
-
return e && t ? "".concat(
|
|
432
|
+
return e && t ? "".concat(In).concat(e) : "";
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* 生成使用到的 css 变量 style 对象
|
|
@@ -441,8 +441,8 @@ class $ {
|
|
|
441
441
|
*/
|
|
442
442
|
cssVar(e) {
|
|
443
443
|
const t = {};
|
|
444
|
-
for (const
|
|
445
|
-
e[
|
|
444
|
+
for (const i in e)
|
|
445
|
+
e[i] && (t[this.cssVarName(i)] = e[i]);
|
|
446
446
|
return t;
|
|
447
447
|
}
|
|
448
448
|
/**
|
|
@@ -455,8 +455,8 @@ class $ {
|
|
|
455
455
|
*/
|
|
456
456
|
cssVarBlock(e) {
|
|
457
457
|
const t = {};
|
|
458
|
-
for (const
|
|
459
|
-
e[
|
|
458
|
+
for (const i in e)
|
|
459
|
+
e[i] && (t[this.cssVarBlockName(i)] = e[i]);
|
|
460
460
|
return t;
|
|
461
461
|
}
|
|
462
462
|
/**
|
|
@@ -482,14 +482,14 @@ class $ {
|
|
|
482
482
|
return "--".concat(this.namespace, "-").concat(this.block, "-").concat(e);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
if (typeof
|
|
487
|
-
throw new TypeError("Path must be a string. Received " + JSON.stringify(
|
|
485
|
+
function F(n) {
|
|
486
|
+
if (typeof n != "string")
|
|
487
|
+
throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
for (var t = "",
|
|
491
|
-
if (a <
|
|
492
|
-
r =
|
|
489
|
+
function ut(n, e) {
|
|
490
|
+
for (var t = "", i = 0, s = -1, o = 0, r, a = 0; a <= n.length; ++a) {
|
|
491
|
+
if (a < n.length)
|
|
492
|
+
r = n.charCodeAt(a);
|
|
493
493
|
else {
|
|
494
494
|
if (r === 47)
|
|
495
495
|
break;
|
|
@@ -498,93 +498,93 @@ function ct(i, e) {
|
|
|
498
498
|
if (r === 47) {
|
|
499
499
|
if (!(s === a - 1 || o === 1))
|
|
500
500
|
if (s !== a - 1 && o === 2) {
|
|
501
|
-
if (t.length < 2 ||
|
|
501
|
+
if (t.length < 2 || i !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
|
|
502
502
|
if (t.length > 2) {
|
|
503
503
|
var u = t.lastIndexOf("/");
|
|
504
504
|
if (u !== t.length - 1) {
|
|
505
|
-
u === -1 ? (t = "",
|
|
505
|
+
u === -1 ? (t = "", i = 0) : (t = t.slice(0, u), i = t.length - 1 - t.lastIndexOf("/")), s = a, o = 0;
|
|
506
506
|
continue;
|
|
507
507
|
}
|
|
508
508
|
} else if (t.length === 2 || t.length === 1) {
|
|
509
|
-
t = "",
|
|
509
|
+
t = "", i = 0, s = a, o = 0;
|
|
510
510
|
continue;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
e && (t.length > 0 ? t += "/.." : t = "..",
|
|
513
|
+
e && (t.length > 0 ? t += "/.." : t = "..", i = 2);
|
|
514
514
|
} else
|
|
515
|
-
t.length > 0 ? t += "/" +
|
|
515
|
+
t.length > 0 ? t += "/" + n.slice(s + 1, a) : t = n.slice(s + 1, a), i = a - s - 1;
|
|
516
516
|
s = a, o = 0;
|
|
517
517
|
} else
|
|
518
518
|
r === 46 && o !== -1 ? ++o : o = -1;
|
|
519
519
|
}
|
|
520
520
|
return t;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
var t = e.dir || e.root,
|
|
524
|
-
return t ? t === e.root ? t +
|
|
522
|
+
function An(n, e) {
|
|
523
|
+
var t = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
|
|
524
|
+
return t ? t === e.root ? t + i : t + n + i : i;
|
|
525
525
|
}
|
|
526
526
|
var he = {
|
|
527
527
|
// path.resolve([from ...], to)
|
|
528
528
|
resolve: function() {
|
|
529
|
-
for (var e = "", t = !1,
|
|
529
|
+
for (var e = "", t = !1, i, s = arguments.length - 1; s >= -1 && !t; s--) {
|
|
530
530
|
var o;
|
|
531
|
-
s >= 0 ? o = arguments[s] : (
|
|
531
|
+
s >= 0 ? o = arguments[s] : (i === void 0 && (i = process.cwd()), o = i), F(o), o.length !== 0 && (e = o + "/" + e, t = o.charCodeAt(0) === 47);
|
|
532
532
|
}
|
|
533
|
-
return e =
|
|
533
|
+
return e = ut(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
534
534
|
},
|
|
535
535
|
normalize: function(e) {
|
|
536
|
-
if (
|
|
536
|
+
if (F(e), e.length === 0)
|
|
537
537
|
return ".";
|
|
538
|
-
var t = e.charCodeAt(0) === 47,
|
|
539
|
-
return e =
|
|
538
|
+
var t = e.charCodeAt(0) === 47, i = e.charCodeAt(e.length - 1) === 47;
|
|
539
|
+
return e = ut(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && i && (e += "/"), t ? "/" + e : e;
|
|
540
540
|
},
|
|
541
541
|
isAbsolute: function(e) {
|
|
542
|
-
return
|
|
542
|
+
return F(e), e.length > 0 && e.charCodeAt(0) === 47;
|
|
543
543
|
},
|
|
544
544
|
join: function() {
|
|
545
545
|
if (arguments.length === 0)
|
|
546
546
|
return ".";
|
|
547
547
|
for (var e, t = 0; t < arguments.length; ++t) {
|
|
548
|
-
var
|
|
549
|
-
|
|
548
|
+
var i = arguments[t];
|
|
549
|
+
F(i), i.length > 0 && (e === void 0 ? e = i : e += "/" + i);
|
|
550
550
|
}
|
|
551
551
|
return e === void 0 ? "." : he.normalize(e);
|
|
552
552
|
},
|
|
553
553
|
relative: function(e, t) {
|
|
554
|
-
if (
|
|
554
|
+
if (F(e), F(t), e === t || (e = he.resolve(e), t = he.resolve(t), e === t))
|
|
555
555
|
return "";
|
|
556
|
-
for (var
|
|
556
|
+
for (var i = 1; i < e.length && e.charCodeAt(i) === 47; ++i)
|
|
557
557
|
;
|
|
558
|
-
for (var s = e.length, o = s -
|
|
558
|
+
for (var s = e.length, o = s - i, r = 1; r < t.length && t.charCodeAt(r) === 47; ++r)
|
|
559
559
|
;
|
|
560
|
-
for (var a = t.length, u = a - r,
|
|
561
|
-
if (l ===
|
|
562
|
-
if (u >
|
|
560
|
+
for (var a = t.length, u = a - r, f = o < u ? o : u, d = -1, l = 0; l <= f; ++l) {
|
|
561
|
+
if (l === f) {
|
|
562
|
+
if (u > f) {
|
|
563
563
|
if (t.charCodeAt(r + l) === 47)
|
|
564
564
|
return t.slice(r + l + 1);
|
|
565
565
|
if (l === 0)
|
|
566
566
|
return t.slice(r + l);
|
|
567
567
|
} else
|
|
568
|
-
o >
|
|
568
|
+
o > f && (e.charCodeAt(i + l) === 47 ? d = l : l === 0 && (d = 0));
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
|
-
var _ = e.charCodeAt(
|
|
572
|
-
if (_ !==
|
|
571
|
+
var _ = e.charCodeAt(i + l), g = t.charCodeAt(r + l);
|
|
572
|
+
if (_ !== g)
|
|
573
573
|
break;
|
|
574
574
|
_ === 47 && (d = l);
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
for (l =
|
|
578
|
-
(l === s || e.charCodeAt(l) === 47) && (
|
|
579
|
-
return
|
|
576
|
+
var h = "";
|
|
577
|
+
for (l = i + d + 1; l <= s; ++l)
|
|
578
|
+
(l === s || e.charCodeAt(l) === 47) && (h.length === 0 ? h += ".." : h += "/..");
|
|
579
|
+
return h.length > 0 ? h + t.slice(r + d) : (r += d, t.charCodeAt(r) === 47 && ++r, t.slice(r));
|
|
580
580
|
},
|
|
581
581
|
_makeLong: function(e) {
|
|
582
582
|
return e;
|
|
583
583
|
},
|
|
584
584
|
dirname: function(e) {
|
|
585
|
-
if (
|
|
585
|
+
if (F(e), e.length === 0)
|
|
586
586
|
return ".";
|
|
587
|
-
for (var t = e.charCodeAt(0),
|
|
587
|
+
for (var t = e.charCodeAt(0), i = t === 47, s = -1, o = !0, r = e.length - 1; r >= 1; --r)
|
|
588
588
|
if (t = e.charCodeAt(r), t === 47) {
|
|
589
589
|
if (!o) {
|
|
590
590
|
s = r;
|
|
@@ -592,47 +592,47 @@ var he = {
|
|
|
592
592
|
}
|
|
593
593
|
} else
|
|
594
594
|
o = !1;
|
|
595
|
-
return s === -1 ?
|
|
595
|
+
return s === -1 ? i ? "/" : "." : i && s === 1 ? "//" : e.slice(0, s);
|
|
596
596
|
},
|
|
597
597
|
basename: function(e, t) {
|
|
598
598
|
if (t !== void 0 && typeof t != "string")
|
|
599
599
|
throw new TypeError('"ext" argument must be a string');
|
|
600
|
-
|
|
601
|
-
var
|
|
600
|
+
F(e);
|
|
601
|
+
var i = 0, s = -1, o = !0, r;
|
|
602
602
|
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
603
603
|
if (t.length === e.length && t === e)
|
|
604
604
|
return "";
|
|
605
605
|
var a = t.length - 1, u = -1;
|
|
606
606
|
for (r = e.length - 1; r >= 0; --r) {
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var f = e.charCodeAt(r);
|
|
608
|
+
if (f === 47) {
|
|
609
609
|
if (!o) {
|
|
610
|
-
|
|
610
|
+
i = r + 1;
|
|
611
611
|
break;
|
|
612
612
|
}
|
|
613
613
|
} else
|
|
614
|
-
u === -1 && (o = !1, u = r + 1), a >= 0 && (
|
|
614
|
+
u === -1 && (o = !1, u = r + 1), a >= 0 && (f === t.charCodeAt(a) ? --a === -1 && (s = r) : (a = -1, s = u));
|
|
615
615
|
}
|
|
616
|
-
return
|
|
616
|
+
return i === s ? s = u : s === -1 && (s = e.length), e.slice(i, s);
|
|
617
617
|
} else {
|
|
618
618
|
for (r = e.length - 1; r >= 0; --r)
|
|
619
619
|
if (e.charCodeAt(r) === 47) {
|
|
620
620
|
if (!o) {
|
|
621
|
-
|
|
621
|
+
i = r + 1;
|
|
622
622
|
break;
|
|
623
623
|
}
|
|
624
624
|
} else
|
|
625
625
|
s === -1 && (o = !1, s = r + 1);
|
|
626
|
-
return s === -1 ? "" : e.slice(
|
|
626
|
+
return s === -1 ? "" : e.slice(i, s);
|
|
627
627
|
}
|
|
628
628
|
},
|
|
629
629
|
extname: function(e) {
|
|
630
|
-
|
|
631
|
-
for (var t = -1,
|
|
630
|
+
F(e);
|
|
631
|
+
for (var t = -1, i = 0, s = -1, o = !0, r = 0, a = e.length - 1; a >= 0; --a) {
|
|
632
632
|
var u = e.charCodeAt(a);
|
|
633
633
|
if (u === 47) {
|
|
634
634
|
if (!o) {
|
|
635
|
-
|
|
635
|
+
i = a + 1;
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
continue;
|
|
@@ -641,29 +641,29 @@ var he = {
|
|
|
641
641
|
}
|
|
642
642
|
return t === -1 || s === -1 || // We saw a non-dot character immediately before the dot
|
|
643
643
|
r === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
644
|
-
r === 1 && t === s - 1 && t ===
|
|
644
|
+
r === 1 && t === s - 1 && t === i + 1 ? "" : e.slice(t, s);
|
|
645
645
|
},
|
|
646
646
|
format: function(e) {
|
|
647
647
|
if (e === null || typeof e != "object")
|
|
648
648
|
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
|
|
649
|
-
return
|
|
649
|
+
return An("/", e);
|
|
650
650
|
},
|
|
651
651
|
parse: function(e) {
|
|
652
|
-
|
|
652
|
+
F(e);
|
|
653
653
|
var t = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
654
654
|
if (e.length === 0)
|
|
655
655
|
return t;
|
|
656
|
-
var
|
|
656
|
+
var i = e.charCodeAt(0), s = i === 47, o;
|
|
657
657
|
s ? (t.root = "/", o = 1) : o = 0;
|
|
658
|
-
for (var r = -1, a = 0, u = -1,
|
|
659
|
-
if (
|
|
660
|
-
if (!
|
|
658
|
+
for (var r = -1, a = 0, u = -1, f = !0, d = e.length - 1, l = 0; d >= o; --d) {
|
|
659
|
+
if (i = e.charCodeAt(d), i === 47) {
|
|
660
|
+
if (!f) {
|
|
661
661
|
a = d + 1;
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
664
664
|
continue;
|
|
665
665
|
}
|
|
666
|
-
u === -1 && (
|
|
666
|
+
u === -1 && (f = !1, u = d + 1), i === 46 ? r === -1 ? r = d : l !== 1 && (l = 1) : r !== -1 && (l = -1);
|
|
667
667
|
}
|
|
668
668
|
return r === -1 || u === -1 || // We saw a non-dot character immediately before the dot
|
|
669
669
|
l === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
@@ -675,17 +675,17 @@ var he = {
|
|
|
675
675
|
posix: null
|
|
676
676
|
};
|
|
677
677
|
he.posix = he;
|
|
678
|
-
function
|
|
678
|
+
function j() {
|
|
679
679
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
return "".concat(
|
|
681
|
+
function Kt() {
|
|
682
|
+
return "".concat(j() + j(), "-").concat(j(), "-").concat(j(), "-").concat(j(), "-").concat(j()).concat(j()).concat(j());
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
686
|
-
return
|
|
684
|
+
const Dn = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
685
|
+
function tt(n) {
|
|
686
|
+
return Dn.test(n);
|
|
687
687
|
}
|
|
688
|
-
class
|
|
688
|
+
class Qt {
|
|
689
689
|
/**
|
|
690
690
|
* 拷贝文本
|
|
691
691
|
*
|
|
@@ -706,7 +706,7 @@ class Jt {
|
|
|
706
706
|
* @private
|
|
707
707
|
* @type {(HTMLInputElement | null)}
|
|
708
708
|
*/
|
|
709
|
-
|
|
709
|
+
x(Qt, "inputElement", null);
|
|
710
710
|
const b = class b {
|
|
711
711
|
/**
|
|
712
712
|
* 检查数据库是否存在
|
|
@@ -717,7 +717,7 @@ const b = class b {
|
|
|
717
717
|
*/
|
|
718
718
|
static async checkDataBaseExists(e) {
|
|
719
719
|
try {
|
|
720
|
-
return (await indexedDB.databases()).some((
|
|
720
|
+
return (await indexedDB.databases()).some((i) => i.name === e);
|
|
721
721
|
} catch (t) {
|
|
722
722
|
return console.error("检查数据库是否存在时出错:", t), !1;
|
|
723
723
|
}
|
|
@@ -729,8 +729,8 @@ const b = class b {
|
|
|
729
729
|
* @memberof IndexedDBUtil
|
|
730
730
|
*/
|
|
731
731
|
static async deleteDatabase(e) {
|
|
732
|
-
var t,
|
|
733
|
-
return b.lastLink && ((
|
|
732
|
+
var t, i;
|
|
733
|
+
return b.lastLink && ((i = (t = b.lastLink).close) == null || i.call(t)), new Promise((s, o) => {
|
|
734
734
|
const r = indexedDB.deleteDatabase(e);
|
|
735
735
|
r.onsuccess = () => {
|
|
736
736
|
s(!0);
|
|
@@ -772,15 +772,15 @@ const b = class b {
|
|
|
772
772
|
* @return {*} {Promise<void>}
|
|
773
773
|
* @memberof IndexedDBUtil
|
|
774
774
|
*/
|
|
775
|
-
static async createTable(e, t,
|
|
775
|
+
static async createTable(e, t, i, s = !1) {
|
|
776
776
|
return new Promise((o) => {
|
|
777
777
|
var a, u;
|
|
778
778
|
b.version += 1, b.lastLink && ((u = (a = b.lastLink).close) == null || u.call(a));
|
|
779
779
|
const r = indexedDB.open(e, b.version);
|
|
780
|
-
r.onupgradeneeded = (
|
|
781
|
-
if (b.db =
|
|
780
|
+
r.onupgradeneeded = (f) => {
|
|
781
|
+
if (b.db = f.target.result, !b.db.objectStoreNames.contains(t)) {
|
|
782
782
|
const d = {};
|
|
783
|
-
|
|
783
|
+
i ? d.keyPath = i : s && (d.autoIncrement = !0), b.db.createObjectStore(t, d);
|
|
784
784
|
}
|
|
785
785
|
}, r.onsuccess = () => {
|
|
786
786
|
b.lastLink = r.result, r.result.close(), o(!0);
|
|
@@ -797,16 +797,16 @@ const b = class b {
|
|
|
797
797
|
* @memberof IndexedDBUtil
|
|
798
798
|
*/
|
|
799
799
|
static async deleteTable(e, t) {
|
|
800
|
-
return new Promise((
|
|
800
|
+
return new Promise((i) => {
|
|
801
801
|
var o, r;
|
|
802
802
|
b.version += 1, b.lastLink && ((r = (o = b.lastLink).close) == null || r.call(o));
|
|
803
803
|
const s = indexedDB.open(e, b.version);
|
|
804
804
|
s.onupgradeneeded = (a) => {
|
|
805
805
|
b.db = a.target.result, b.lastLink = s.result, b.db.objectStoreNames.contains(t) && b.db.deleteObjectStore(t);
|
|
806
806
|
}, s.onsuccess = (a) => {
|
|
807
|
-
b.db = a.target.result, b.lastLink = s.result, s.result.close(),
|
|
807
|
+
b.db = a.target.result, b.lastLink = s.result, s.result.close(), i(!0);
|
|
808
808
|
}, s.onerror = () => {
|
|
809
|
-
s.result.close(),
|
|
809
|
+
s.result.close(), i(!1);
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
812
|
}
|
|
@@ -818,14 +818,14 @@ const b = class b {
|
|
|
818
818
|
* @return {*} {Promise<void>}
|
|
819
819
|
* @memberof IndexedDBUtil
|
|
820
820
|
*/
|
|
821
|
-
static async addData(e, t,
|
|
821
|
+
static async addData(e, t, i) {
|
|
822
822
|
return new Promise((s, o) => {
|
|
823
823
|
const r = indexedDB.open(e);
|
|
824
824
|
r.onsuccess = (a) => {
|
|
825
825
|
if (b.db = a.target.result, b.lastLink = r.result, b.db.objectStoreNames.contains(t)) {
|
|
826
|
-
const d = b.db.transaction([t], "readwrite").objectStore(t).add(
|
|
826
|
+
const d = b.db.transaction([t], "readwrite").objectStore(t).add(i);
|
|
827
827
|
d.onsuccess = (l) => {
|
|
828
|
-
s(
|
|
828
|
+
s(i);
|
|
829
829
|
}, d.onerror = () => {
|
|
830
830
|
s(null);
|
|
831
831
|
};
|
|
@@ -844,12 +844,12 @@ const b = class b {
|
|
|
844
844
|
* @return {*} {Promise<void>}
|
|
845
845
|
* @memberof IndexedDBUtil
|
|
846
846
|
*/
|
|
847
|
-
static async deleteData(e, t,
|
|
847
|
+
static async deleteData(e, t, i) {
|
|
848
848
|
return new Promise((s, o) => {
|
|
849
849
|
const r = indexedDB.open(e);
|
|
850
850
|
r.onsuccess = (a) => {
|
|
851
851
|
if (b.db = a.target.result, b.lastLink = r.result, b.db.objectStoreNames.contains(t)) {
|
|
852
|
-
const d = b.db.transaction([t], "readwrite").objectStore(t).delete(
|
|
852
|
+
const d = b.db.transaction([t], "readwrite").objectStore(t).delete(i);
|
|
853
853
|
d.onsuccess = (l) => {
|
|
854
854
|
s(!0);
|
|
855
855
|
}, d.onerror = () => {
|
|
@@ -870,16 +870,16 @@ const b = class b {
|
|
|
870
870
|
* @return {*} {Promise<void>}
|
|
871
871
|
* @memberof IndexedDBUtil
|
|
872
872
|
*/
|
|
873
|
-
static async updateData(e, t,
|
|
873
|
+
static async updateData(e, t, i) {
|
|
874
874
|
return new Promise((s, o) => {
|
|
875
875
|
const r = indexedDB.open(e);
|
|
876
876
|
r.onsuccess = (a) => {
|
|
877
877
|
if (b.db = a.target.result, b.lastLink = r.result, b.db.objectStoreNames.contains(t)) {
|
|
878
|
-
const d = b.db.transaction([t], "readwrite").objectStore(t).put(
|
|
878
|
+
const d = b.db.transaction([t], "readwrite").objectStore(t).put(i);
|
|
879
879
|
d.onsuccess = (l) => {
|
|
880
|
-
s(
|
|
880
|
+
s(i);
|
|
881
881
|
}, d.onerror = () => {
|
|
882
|
-
s(
|
|
882
|
+
s(i);
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
885
|
r.result.close();
|
|
@@ -896,16 +896,16 @@ const b = class b {
|
|
|
896
896
|
* @return {*} {Promise<any>}
|
|
897
897
|
* @memberof IndexedDBUtil
|
|
898
898
|
*/
|
|
899
|
-
static async getData(e, t,
|
|
899
|
+
static async getData(e, t, i) {
|
|
900
900
|
return new Promise((s, o) => {
|
|
901
901
|
const r = indexedDB.open(e);
|
|
902
902
|
r.onsuccess = (a) => {
|
|
903
903
|
if (b.db = a.target.result, b.lastLink = r.result, b.db.objectStoreNames.contains(t)) {
|
|
904
|
-
const d = b.db.transaction([t], "readonly").objectStore(t).get(
|
|
904
|
+
const d = b.db.transaction([t], "readonly").objectStore(t).get(i);
|
|
905
905
|
d.onsuccess = (l) => {
|
|
906
906
|
s(d.result);
|
|
907
907
|
}, d.onerror = () => {
|
|
908
|
-
o(new Error("未找到数据".concat(
|
|
908
|
+
o(new Error("未找到数据".concat(i)));
|
|
909
909
|
};
|
|
910
910
|
}
|
|
911
911
|
r.result.close();
|
|
@@ -922,15 +922,15 @@ const b = class b {
|
|
|
922
922
|
* @memberof IndexedDBUtil
|
|
923
923
|
*/
|
|
924
924
|
static async getAllData(e, t) {
|
|
925
|
-
return new Promise((
|
|
925
|
+
return new Promise((i, s) => {
|
|
926
926
|
const o = indexedDB.open(e);
|
|
927
927
|
o.onsuccess = (r) => {
|
|
928
928
|
if (b.db = r.target.result, b.lastLink = o.result, b.db.objectStoreNames.contains(t)) {
|
|
929
|
-
const
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
},
|
|
933
|
-
|
|
929
|
+
const f = b.db.transaction([t], "readonly").objectStore(t).getAll();
|
|
930
|
+
f.onsuccess = (d) => {
|
|
931
|
+
i(f.result);
|
|
932
|
+
}, f.onerror = () => {
|
|
933
|
+
i([]);
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
936
|
o.result.close();
|
|
@@ -941,11 +941,11 @@ const b = class b {
|
|
|
941
941
|
}
|
|
942
942
|
};
|
|
943
943
|
// 数据库版本
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
let
|
|
948
|
-
class
|
|
944
|
+
x(b, "version", 1), // 数据库连接句柄
|
|
945
|
+
x(b, "db", null), // 上一个连接
|
|
946
|
+
x(b, "lastLink");
|
|
947
|
+
let Z = b;
|
|
948
|
+
class zn {
|
|
949
949
|
/**
|
|
950
950
|
* Creates an instance of FileUploader.
|
|
951
951
|
* @author tony001
|
|
@@ -953,7 +953,7 @@ class Mi {
|
|
|
953
953
|
* @param {FileUploaderOptions<T>} options
|
|
954
954
|
*/
|
|
955
955
|
constructor(e) {
|
|
956
|
-
|
|
956
|
+
x(this, "options");
|
|
957
957
|
this.options = {
|
|
958
958
|
multiple: !0,
|
|
959
959
|
accept: "*/*",
|
|
@@ -967,34 +967,34 @@ class Mi {
|
|
|
967
967
|
openFilePicker() {
|
|
968
968
|
const e = document.createElement("input");
|
|
969
969
|
e.type = "file", e.multiple = this.options.multiple, e.accept = this.options.accept || "", e.onchange = (t) => {
|
|
970
|
-
const
|
|
971
|
-
this.handleFiles(
|
|
970
|
+
const i = Array.from(t.target.files || []);
|
|
971
|
+
this.handleFiles(i);
|
|
972
972
|
}, e.click();
|
|
973
973
|
}
|
|
974
974
|
/**
|
|
975
975
|
* 处理选择的文件
|
|
976
976
|
*/
|
|
977
977
|
async handleFiles(e) {
|
|
978
|
-
var
|
|
978
|
+
var i, s;
|
|
979
979
|
if (e.length === 0)
|
|
980
980
|
return;
|
|
981
981
|
const t = e.filter((o) => {
|
|
982
982
|
var r, a;
|
|
983
983
|
return this.options.maxSize && o.size > this.options.maxSize ? ((a = (r = this.options).onError) == null || a.call(r, new Error("文件大小超过限制 (".concat(this.formatSize(o.size), " > ").concat(this.formatSize(this.options.maxSize), ")")), o), !1) : !0;
|
|
984
984
|
});
|
|
985
|
-
(s = (
|
|
985
|
+
(s = (i = this.options).onSelect) == null || s.call(i, t), await Promise.all(t.map((o) => this.processFile(o)));
|
|
986
986
|
}
|
|
987
987
|
/**
|
|
988
988
|
* 处理单个文件上传
|
|
989
989
|
*/
|
|
990
990
|
async processFile(e) {
|
|
991
|
-
var t,
|
|
991
|
+
var t, i, s, o, r, a;
|
|
992
992
|
try {
|
|
993
993
|
const u = (d) => {
|
|
994
994
|
var l, _;
|
|
995
995
|
(_ = (l = this.options).onProgress) == null || _.call(l, e, d);
|
|
996
|
-
},
|
|
997
|
-
(
|
|
996
|
+
}, f = await this.options.onUpload(e, u);
|
|
997
|
+
(i = (t = this.options).onProgress) == null || i.call(t, e, 100), (o = (s = this.options).onSuccess) == null || o.call(s, f, e);
|
|
998
998
|
} catch (u) {
|
|
999
999
|
(a = (r = this.options).onError) == null || a.call(r, u instanceof Error ? u : new Error("上传失败"), e);
|
|
1000
1000
|
}
|
|
@@ -1005,11 +1005,11 @@ class Mi {
|
|
|
1005
1005
|
formatSize(e) {
|
|
1006
1006
|
if (e === 0)
|
|
1007
1007
|
return "0 B";
|
|
1008
|
-
const t = ["B", "KB", "MB", "GB"],
|
|
1009
|
-
return "".concat((e / 1024 **
|
|
1008
|
+
const t = ["B", "KB", "MB", "GB"], i = Math.floor(Math.log(e) / Math.log(1024));
|
|
1009
|
+
return "".concat((e / 1024 ** i).toFixed(2), " ").concat(t[i]);
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
class
|
|
1012
|
+
class en {
|
|
1013
1013
|
/**
|
|
1014
1014
|
* 从XML元素中提取CDATA内容
|
|
1015
1015
|
*
|
|
@@ -1023,7 +1023,7 @@ class Kt {
|
|
|
1023
1023
|
static getCdataContent(e) {
|
|
1024
1024
|
if (!e)
|
|
1025
1025
|
return null;
|
|
1026
|
-
const t = Array.from(e.childNodes).find((
|
|
1026
|
+
const t = Array.from(e.childNodes).find((i) => i.nodeType === i.CDATA_SECTION_NODE);
|
|
1027
1027
|
return (t == null ? void 0 : t.nodeValue) || e.textContent;
|
|
1028
1028
|
}
|
|
1029
1029
|
/**
|
|
@@ -1036,19 +1036,19 @@ class Kt {
|
|
|
1036
1036
|
* @return {*} {IMaterial[]}
|
|
1037
1037
|
*/
|
|
1038
1038
|
static parse(e) {
|
|
1039
|
-
const
|
|
1040
|
-
return Array.from(
|
|
1039
|
+
const i = new DOMParser().parseFromString(e, "text/xml");
|
|
1040
|
+
return Array.from(i.querySelectorAll("resource")).map((o) => {
|
|
1041
1041
|
const r = o.getAttribute("type") || "", a = o.querySelector("data"), u = o.querySelector("metadata");
|
|
1042
1042
|
try {
|
|
1043
|
-
const
|
|
1043
|
+
const f = this.getCdataContent(a), d = this.getCdataContent(u), l = f ? JSON.parse(f) : {}, _ = d ? JSON.parse(d) : {};
|
|
1044
1044
|
return {
|
|
1045
1045
|
id: l.id,
|
|
1046
1046
|
type: r,
|
|
1047
1047
|
data: l,
|
|
1048
1048
|
metadata: _
|
|
1049
1049
|
};
|
|
1050
|
-
} catch (
|
|
1051
|
-
throw new Error("XML 解析错误: ".concat(
|
|
1050
|
+
} catch (f) {
|
|
1051
|
+
throw new Error("XML 解析错误: ".concat(f.message));
|
|
1052
1052
|
}
|
|
1053
1053
|
});
|
|
1054
1054
|
}
|
|
@@ -1067,14 +1067,14 @@ class Kt {
|
|
|
1067
1067
|
* }}
|
|
1068
1068
|
*/
|
|
1069
1069
|
static parseMixedContent(e) {
|
|
1070
|
-
const
|
|
1071
|
-
if (!
|
|
1070
|
+
const i = /<resources\b[^>]*>[\s\S]*?<\/resources>/i.exec(e);
|
|
1071
|
+
if (!i)
|
|
1072
1072
|
return {
|
|
1073
1073
|
resources: [],
|
|
1074
1074
|
remainingText: e,
|
|
1075
1075
|
hasResources: !1
|
|
1076
1076
|
};
|
|
1077
|
-
const [s] =
|
|
1077
|
+
const [s] = i, o = i.index, r = o + s.length, a = (e.slice(0, o) + e.slice(r)).replace(/\n/g, "");
|
|
1078
1078
|
try {
|
|
1079
1079
|
return {
|
|
1080
1080
|
resources: this.parse(s),
|
|
@@ -1100,305 +1100,315 @@ class Kt {
|
|
|
1100
1100
|
* @return {*} {string}
|
|
1101
1101
|
*/
|
|
1102
1102
|
static stringify(e) {
|
|
1103
|
-
const t = document.implementation.createDocument(null, null, null),
|
|
1104
|
-
|
|
1103
|
+
const t = document.implementation.createDocument(null, null, null), i = t.createElement("resources");
|
|
1104
|
+
i.setAttribute("version", "1.0");
|
|
1105
1105
|
const s = (r) => "\n".concat(" ".repeat(r)), o = 1;
|
|
1106
1106
|
return e.forEach((r) => {
|
|
1107
|
-
|
|
1107
|
+
i.appendChild(t.createTextNode(s(o)));
|
|
1108
1108
|
const a = t.createElement("resource");
|
|
1109
1109
|
a.setAttribute("type", r.type), a.setAttribute("version", "1.0");
|
|
1110
|
-
const u = (
|
|
1111
|
-
const l = t.createElement(
|
|
1110
|
+
const u = (f, d) => {
|
|
1111
|
+
const l = t.createElement(f);
|
|
1112
1112
|
l.appendChild(t.createTextNode(s(o + 1)));
|
|
1113
1113
|
const _ = t.createCDATASection(JSON.stringify(d));
|
|
1114
1114
|
return l.appendChild(_), l.appendChild(t.createTextNode(s(o))), l;
|
|
1115
1115
|
};
|
|
1116
|
-
a.appendChild(t.createTextNode(s(o + 1))), a.appendChild(u("data", r.data)), a.appendChild(t.createTextNode(s(o + 1))), a.appendChild(u("metadata", r.metadata)), a.appendChild(t.createTextNode(s(o))),
|
|
1117
|
-
}),
|
|
1116
|
+
a.appendChild(t.createTextNode(s(o + 1))), a.appendChild(u("data", r.data)), a.appendChild(t.createTextNode(s(o + 1))), a.appendChild(u("metadata", r.metadata)), a.appendChild(t.createTextNode(s(o))), i.appendChild(a);
|
|
1117
|
+
}), i.appendChild(t.createTextNode("\n")), t.appendChild(i), new XMLSerializer().serializeToString(t).replace(/></g, ">\n<");
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1120
|
+
function Ze(n) {
|
|
1121
|
+
return n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1;
|
|
1122
|
+
}
|
|
1123
|
+
function tn(n, e, t, i) {
|
|
1124
|
+
const s = n / window.innerWidth, o = e / window.innerHeight, r = Math.max(0, Math.min(s, 1 - t)), a = Math.max(0, Math.min(o, 1 - i));
|
|
1125
|
+
return {
|
|
1126
|
+
x: r,
|
|
1127
|
+
y: a
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
var ae, k, Be, dt, _e = 0, nn = [], xe = [], ht = w.__b, ft = w.__r, pt = w.diffed, vt = w.__c, _t = w.unmount;
|
|
1131
|
+
function De(n, e) {
|
|
1132
|
+
w.__h && w.__h(k, n, _e || e), _e = 0;
|
|
1123
1133
|
var t = k.__H || (k.__H = { __: [], __h: [] });
|
|
1124
|
-
return
|
|
1134
|
+
return n >= t.__.length && t.__.push({ __V: xe }), t.__[n];
|
|
1125
1135
|
}
|
|
1126
|
-
function
|
|
1127
|
-
return _e = 1,
|
|
1136
|
+
function me(n) {
|
|
1137
|
+
return _e = 1, Hn(rn, n);
|
|
1128
1138
|
}
|
|
1129
|
-
function
|
|
1130
|
-
var
|
|
1131
|
-
if (
|
|
1132
|
-
var u =
|
|
1133
|
-
u !==
|
|
1134
|
-
}],
|
|
1135
|
-
var s = function(a, u,
|
|
1136
|
-
if (!
|
|
1139
|
+
function Hn(n, e, t) {
|
|
1140
|
+
var i = De(ae++, 2);
|
|
1141
|
+
if (i.t = n, !i.__c && (i.__ = [t ? t(e) : rn(void 0, e), function(a) {
|
|
1142
|
+
var u = i.__N ? i.__N[0] : i.__[0], f = i.t(u, a);
|
|
1143
|
+
u !== f && (i.__N = [f, i.__[1]], i.__c.setState({}));
|
|
1144
|
+
}], i.__c = k, !k.u)) {
|
|
1145
|
+
var s = function(a, u, f) {
|
|
1146
|
+
if (!i.__c.__H)
|
|
1137
1147
|
return !0;
|
|
1138
|
-
var d =
|
|
1148
|
+
var d = i.__c.__H.__.filter(function(_) {
|
|
1139
1149
|
return _.__c;
|
|
1140
1150
|
});
|
|
1141
1151
|
if (d.every(function(_) {
|
|
1142
1152
|
return !_.__N;
|
|
1143
1153
|
}))
|
|
1144
|
-
return !o || o.call(this, a, u,
|
|
1154
|
+
return !o || o.call(this, a, u, f);
|
|
1145
1155
|
var l = !1;
|
|
1146
1156
|
return d.forEach(function(_) {
|
|
1147
1157
|
if (_.__N) {
|
|
1148
|
-
var
|
|
1149
|
-
_.__ = _.__N, _.__N = void 0,
|
|
1158
|
+
var g = _.__[0];
|
|
1159
|
+
_.__ = _.__N, _.__N = void 0, g !== _.__[0] && (l = !0);
|
|
1150
1160
|
}
|
|
1151
|
-
}), !(!l &&
|
|
1161
|
+
}), !(!l && i.__c.props === a) && (!o || o.call(this, a, u, f));
|
|
1152
1162
|
};
|
|
1153
1163
|
k.u = !0;
|
|
1154
1164
|
var o = k.shouldComponentUpdate, r = k.componentWillUpdate;
|
|
1155
|
-
k.componentWillUpdate = function(a, u,
|
|
1165
|
+
k.componentWillUpdate = function(a, u, f) {
|
|
1156
1166
|
if (this.__e) {
|
|
1157
1167
|
var d = o;
|
|
1158
|
-
o = void 0, s(a, u,
|
|
1168
|
+
o = void 0, s(a, u, f), o = d;
|
|
1159
1169
|
}
|
|
1160
|
-
r && r.call(this, a, u,
|
|
1170
|
+
r && r.call(this, a, u, f);
|
|
1161
1171
|
}, k.shouldComponentUpdate = s;
|
|
1162
1172
|
}
|
|
1163
|
-
return
|
|
1173
|
+
return i.__N || i.__;
|
|
1164
1174
|
}
|
|
1165
|
-
function
|
|
1166
|
-
var t =
|
|
1167
|
-
!
|
|
1175
|
+
function O(n, e) {
|
|
1176
|
+
var t = De(ae++, 3);
|
|
1177
|
+
!w.__s && on(t.__H, e) && (t.__ = n, t.i = e, k.__H.__h.push(t));
|
|
1168
1178
|
}
|
|
1169
|
-
function
|
|
1170
|
-
return _e = 5,
|
|
1171
|
-
return { current:
|
|
1179
|
+
function B(n) {
|
|
1180
|
+
return _e = 5, P(function() {
|
|
1181
|
+
return { current: n };
|
|
1172
1182
|
}, []);
|
|
1173
1183
|
}
|
|
1174
|
-
function
|
|
1175
|
-
var t =
|
|
1176
|
-
return
|
|
1184
|
+
function P(n, e) {
|
|
1185
|
+
var t = De(ae++, 7);
|
|
1186
|
+
return on(t.__H, e) ? (t.__V = n(), t.i = e, t.__h = n, t.__V) : t.__;
|
|
1177
1187
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return _e = 8,
|
|
1180
|
-
return
|
|
1188
|
+
function Pe(n, e) {
|
|
1189
|
+
return _e = 8, P(function() {
|
|
1190
|
+
return n;
|
|
1181
1191
|
}, e);
|
|
1182
1192
|
}
|
|
1183
|
-
function
|
|
1184
|
-
var e = k.context[
|
|
1185
|
-
return t.c =
|
|
1193
|
+
function sn(n) {
|
|
1194
|
+
var e = k.context[n.__c], t = De(ae++, 9);
|
|
1195
|
+
return t.c = n, e ? (t.__ == null && (t.__ = !0, e.sub(k)), e.props.value) : n.__;
|
|
1186
1196
|
}
|
|
1187
|
-
function
|
|
1188
|
-
for (var
|
|
1189
|
-
if (
|
|
1197
|
+
function Ln() {
|
|
1198
|
+
for (var n; n = nn.shift(); )
|
|
1199
|
+
if (n.__P && n.__H)
|
|
1190
1200
|
try {
|
|
1191
|
-
|
|
1201
|
+
n.__H.__h.forEach(Se), n.__H.__h.forEach(Ge), n.__H.__h = [];
|
|
1192
1202
|
} catch (e) {
|
|
1193
|
-
|
|
1203
|
+
n.__H.__h = [], w.__e(e, n.__v);
|
|
1194
1204
|
}
|
|
1195
1205
|
}
|
|
1196
|
-
|
|
1197
|
-
k = null,
|
|
1198
|
-
},
|
|
1199
|
-
|
|
1200
|
-
var e = (k =
|
|
1201
|
-
e && (
|
|
1202
|
-
t.__N && (t.__ = t.__N), t.__V =
|
|
1203
|
-
})) : (e.__h.forEach(
|
|
1204
|
-
},
|
|
1205
|
-
|
|
1206
|
-
var e =
|
|
1207
|
-
e && e.__H && (e.__H.__h.length && (
|
|
1208
|
-
t.i && (t.__H = t.i), t.__V !==
|
|
1209
|
-
})),
|
|
1210
|
-
},
|
|
1206
|
+
w.__b = function(n) {
|
|
1207
|
+
k = null, ht && ht(n);
|
|
1208
|
+
}, w.__r = function(n) {
|
|
1209
|
+
ft && ft(n), ae = 0;
|
|
1210
|
+
var e = (k = n.__c).__H;
|
|
1211
|
+
e && (Be === k ? (e.__h = [], k.__h = [], e.__.forEach(function(t) {
|
|
1212
|
+
t.__N && (t.__ = t.__N), t.__V = xe, t.__N = t.i = void 0;
|
|
1213
|
+
})) : (e.__h.forEach(Se), e.__h.forEach(Ge), e.__h = [], ae = 0)), Be = k;
|
|
1214
|
+
}, w.diffed = function(n) {
|
|
1215
|
+
pt && pt(n);
|
|
1216
|
+
var e = n.__c;
|
|
1217
|
+
e && e.__H && (e.__H.__h.length && (nn.push(e) !== 1 && dt === w.requestAnimationFrame || ((dt = w.requestAnimationFrame) || On)(Ln)), e.__H.__.forEach(function(t) {
|
|
1218
|
+
t.i && (t.__H = t.i), t.__V !== xe && (t.__ = t.__V), t.i = void 0, t.__V = xe;
|
|
1219
|
+
})), Be = k = null;
|
|
1220
|
+
}, w.__c = function(n, e) {
|
|
1211
1221
|
e.some(function(t) {
|
|
1212
1222
|
try {
|
|
1213
|
-
t.__h.forEach(
|
|
1214
|
-
return !
|
|
1223
|
+
t.__h.forEach(Se), t.__h = t.__h.filter(function(i) {
|
|
1224
|
+
return !i.__ || Ge(i);
|
|
1215
1225
|
});
|
|
1216
|
-
} catch (
|
|
1226
|
+
} catch (i) {
|
|
1217
1227
|
e.some(function(s) {
|
|
1218
1228
|
s.__h && (s.__h = []);
|
|
1219
|
-
}), e = [],
|
|
1229
|
+
}), e = [], w.__e(i, t.__v);
|
|
1220
1230
|
}
|
|
1221
|
-
}),
|
|
1222
|
-
},
|
|
1223
|
-
|
|
1224
|
-
var e, t =
|
|
1225
|
-
t && t.__H && (t.__H.__.forEach(function(
|
|
1231
|
+
}), vt && vt(n, e);
|
|
1232
|
+
}, w.unmount = function(n) {
|
|
1233
|
+
_t && _t(n);
|
|
1234
|
+
var e, t = n.__c;
|
|
1235
|
+
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
1226
1236
|
try {
|
|
1227
|
-
|
|
1237
|
+
Se(i);
|
|
1228
1238
|
} catch (s) {
|
|
1229
1239
|
e = s;
|
|
1230
1240
|
}
|
|
1231
|
-
}), t.__H = void 0, e &&
|
|
1241
|
+
}), t.__H = void 0, e && w.__e(e, t.__v));
|
|
1232
1242
|
};
|
|
1233
|
-
var
|
|
1234
|
-
function
|
|
1243
|
+
var mt = typeof requestAnimationFrame == "function";
|
|
1244
|
+
function On(n) {
|
|
1235
1245
|
var e, t = function() {
|
|
1236
|
-
clearTimeout(
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1246
|
+
clearTimeout(i), mt && cancelAnimationFrame(e), setTimeout(n);
|
|
1247
|
+
}, i = setTimeout(t, 100);
|
|
1248
|
+
mt && (e = requestAnimationFrame(t));
|
|
1239
1249
|
}
|
|
1240
|
-
function
|
|
1241
|
-
var e = k, t =
|
|
1242
|
-
typeof t == "function" && (
|
|
1250
|
+
function Se(n) {
|
|
1251
|
+
var e = k, t = n.__c;
|
|
1252
|
+
typeof t == "function" && (n.__c = void 0, t()), k = e;
|
|
1243
1253
|
}
|
|
1244
|
-
function
|
|
1254
|
+
function Ge(n) {
|
|
1245
1255
|
var e = k;
|
|
1246
|
-
|
|
1256
|
+
n.__c = n.__(), k = e;
|
|
1247
1257
|
}
|
|
1248
|
-
function
|
|
1249
|
-
return !
|
|
1250
|
-
return t !== i
|
|
1258
|
+
function on(n, e) {
|
|
1259
|
+
return !n || n.length !== e.length || e.some(function(t, i) {
|
|
1260
|
+
return t !== n[i];
|
|
1251
1261
|
});
|
|
1252
1262
|
}
|
|
1253
|
-
function
|
|
1254
|
-
return typeof e == "function" ? e(
|
|
1263
|
+
function rn(n, e) {
|
|
1264
|
+
return typeof e == "function" ? e(n) : e;
|
|
1255
1265
|
}
|
|
1256
|
-
function
|
|
1266
|
+
function ze() {
|
|
1257
1267
|
throw new Error("Cycle detected");
|
|
1258
1268
|
}
|
|
1259
|
-
var
|
|
1260
|
-
function
|
|
1261
|
-
if (
|
|
1262
|
-
|
|
1269
|
+
var Bn = Symbol.for("preact-signals");
|
|
1270
|
+
function nt() {
|
|
1271
|
+
if (re > 1)
|
|
1272
|
+
re--;
|
|
1263
1273
|
else {
|
|
1264
|
-
for (var
|
|
1265
|
-
var t =
|
|
1266
|
-
for (
|
|
1267
|
-
var
|
|
1268
|
-
if (t.o = void 0, t.f &= -3, !(8 & t.f) &&
|
|
1274
|
+
for (var n, e = !1; fe !== void 0; ) {
|
|
1275
|
+
var t = fe;
|
|
1276
|
+
for (fe = void 0, Je++; t !== void 0; ) {
|
|
1277
|
+
var i = t.o;
|
|
1278
|
+
if (t.o = void 0, t.f &= -3, !(8 & t.f) && cn(t))
|
|
1269
1279
|
try {
|
|
1270
1280
|
t.c();
|
|
1271
1281
|
} catch (s) {
|
|
1272
|
-
e || (
|
|
1282
|
+
e || (n = s, e = !0);
|
|
1273
1283
|
}
|
|
1274
|
-
t =
|
|
1284
|
+
t = i;
|
|
1275
1285
|
}
|
|
1276
1286
|
}
|
|
1277
|
-
if (
|
|
1278
|
-
throw
|
|
1287
|
+
if (Je = 0, re--, e)
|
|
1288
|
+
throw n;
|
|
1279
1289
|
}
|
|
1280
1290
|
}
|
|
1281
|
-
var E = void 0,
|
|
1282
|
-
function
|
|
1291
|
+
var E = void 0, fe = void 0, re = 0, Je = 0, $e = 0;
|
|
1292
|
+
function an(n) {
|
|
1283
1293
|
if (E !== void 0) {
|
|
1284
|
-
var e =
|
|
1294
|
+
var e = n.n;
|
|
1285
1295
|
if (e === void 0 || e.t !== E)
|
|
1286
|
-
return e = { i: 0, S:
|
|
1296
|
+
return e = { i: 0, S: n, p: E.s, n: void 0, t: E, e: void 0, x: void 0, r: e }, E.s !== void 0 && (E.s.n = e), E.s = e, n.n = e, 32 & E.f && n.S(e), e;
|
|
1287
1297
|
if (e.i === -1)
|
|
1288
1298
|
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = E.s, e.n = void 0, E.s.n = e, E.s = e), e;
|
|
1289
1299
|
}
|
|
1290
1300
|
}
|
|
1291
|
-
function
|
|
1292
|
-
this.v =
|
|
1301
|
+
function I(n) {
|
|
1302
|
+
this.v = n, this.i = 0, this.n = void 0, this.t = void 0;
|
|
1293
1303
|
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1304
|
+
I.prototype.brand = Bn;
|
|
1305
|
+
I.prototype.h = function() {
|
|
1296
1306
|
return !0;
|
|
1297
1307
|
};
|
|
1298
|
-
|
|
1299
|
-
this.t !==
|
|
1308
|
+
I.prototype.S = function(n) {
|
|
1309
|
+
this.t !== n && n.e === void 0 && (n.x = this.t, this.t !== void 0 && (this.t.e = n), this.t = n);
|
|
1300
1310
|
};
|
|
1301
|
-
|
|
1311
|
+
I.prototype.U = function(n) {
|
|
1302
1312
|
if (this.t !== void 0) {
|
|
1303
|
-
var e =
|
|
1304
|
-
e !== void 0 && (e.x = t,
|
|
1313
|
+
var e = n.e, t = n.x;
|
|
1314
|
+
e !== void 0 && (e.x = t, n.e = void 0), t !== void 0 && (t.e = e, n.x = void 0), n === this.t && (this.t = t);
|
|
1305
1315
|
}
|
|
1306
1316
|
};
|
|
1307
|
-
|
|
1317
|
+
I.prototype.subscribe = function(n) {
|
|
1308
1318
|
var e = this;
|
|
1309
|
-
return
|
|
1310
|
-
var t = e.value,
|
|
1319
|
+
return He(function() {
|
|
1320
|
+
var t = e.value, i = 32 & this.f;
|
|
1311
1321
|
this.f &= -33;
|
|
1312
1322
|
try {
|
|
1313
|
-
|
|
1323
|
+
n(t);
|
|
1314
1324
|
} finally {
|
|
1315
|
-
this.f |=
|
|
1325
|
+
this.f |= i;
|
|
1316
1326
|
}
|
|
1317
1327
|
});
|
|
1318
1328
|
};
|
|
1319
|
-
|
|
1329
|
+
I.prototype.valueOf = function() {
|
|
1320
1330
|
return this.value;
|
|
1321
1331
|
};
|
|
1322
|
-
|
|
1332
|
+
I.prototype.toString = function() {
|
|
1323
1333
|
return this.value + "";
|
|
1324
1334
|
};
|
|
1325
|
-
|
|
1335
|
+
I.prototype.toJSON = function() {
|
|
1326
1336
|
return this.value;
|
|
1327
1337
|
};
|
|
1328
|
-
|
|
1338
|
+
I.prototype.peek = function() {
|
|
1329
1339
|
return this.v;
|
|
1330
1340
|
};
|
|
1331
|
-
Object.defineProperty(
|
|
1332
|
-
var
|
|
1333
|
-
return
|
|
1334
|
-
}, set: function(
|
|
1341
|
+
Object.defineProperty(I.prototype, "value", { get: function() {
|
|
1342
|
+
var n = an(this);
|
|
1343
|
+
return n !== void 0 && (n.i = this.i), this.v;
|
|
1344
|
+
}, set: function(n) {
|
|
1335
1345
|
if (E instanceof G && function() {
|
|
1336
1346
|
throw new Error("Computed cannot have side-effects");
|
|
1337
|
-
}(),
|
|
1338
|
-
|
|
1347
|
+
}(), n !== this.v) {
|
|
1348
|
+
Je > 100 && ze(), this.v = n, this.i++, $e++, re++;
|
|
1339
1349
|
try {
|
|
1340
1350
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
1341
1351
|
e.t.N();
|
|
1342
1352
|
} finally {
|
|
1343
|
-
|
|
1353
|
+
nt();
|
|
1344
1354
|
}
|
|
1345
1355
|
}
|
|
1346
1356
|
} });
|
|
1347
|
-
function
|
|
1348
|
-
return new
|
|
1357
|
+
function X(n) {
|
|
1358
|
+
return new I(n);
|
|
1349
1359
|
}
|
|
1350
|
-
function
|
|
1351
|
-
for (var e =
|
|
1360
|
+
function cn(n) {
|
|
1361
|
+
for (var e = n.s; e !== void 0; e = e.n)
|
|
1352
1362
|
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
|
|
1353
1363
|
return !0;
|
|
1354
1364
|
return !1;
|
|
1355
1365
|
}
|
|
1356
|
-
function
|
|
1357
|
-
for (var e =
|
|
1366
|
+
function ln(n) {
|
|
1367
|
+
for (var e = n.s; e !== void 0; e = e.n) {
|
|
1358
1368
|
var t = e.S.n;
|
|
1359
1369
|
if (t !== void 0 && (e.r = t), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
1360
|
-
|
|
1370
|
+
n.s = e;
|
|
1361
1371
|
break;
|
|
1362
1372
|
}
|
|
1363
1373
|
}
|
|
1364
1374
|
}
|
|
1365
|
-
function
|
|
1366
|
-
for (var e =
|
|
1367
|
-
var
|
|
1368
|
-
e.i === -1 ? (e.S.U(e),
|
|
1375
|
+
function un(n) {
|
|
1376
|
+
for (var e = n.s, t = void 0; e !== void 0; ) {
|
|
1377
|
+
var i = e.p;
|
|
1378
|
+
e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : t = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
|
|
1369
1379
|
}
|
|
1370
|
-
|
|
1380
|
+
n.s = t;
|
|
1371
1381
|
}
|
|
1372
|
-
function G(
|
|
1373
|
-
|
|
1382
|
+
function G(n) {
|
|
1383
|
+
I.call(this, void 0), this.x = n, this.s = void 0, this.g = $e - 1, this.f = 4;
|
|
1374
1384
|
}
|
|
1375
|
-
(G.prototype = new
|
|
1385
|
+
(G.prototype = new I()).h = function() {
|
|
1376
1386
|
if (this.f &= -3, 1 & this.f)
|
|
1377
1387
|
return !1;
|
|
1378
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
|
1388
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === $e))
|
|
1379
1389
|
return !0;
|
|
1380
|
-
if (this.g =
|
|
1390
|
+
if (this.g = $e, this.f |= 1, this.i > 0 && !cn(this))
|
|
1381
1391
|
return this.f &= -2, !0;
|
|
1382
|
-
var
|
|
1392
|
+
var n = E;
|
|
1383
1393
|
try {
|
|
1384
|
-
|
|
1394
|
+
ln(this), E = this;
|
|
1385
1395
|
var e = this.x();
|
|
1386
1396
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
1387
1397
|
} catch (t) {
|
|
1388
1398
|
this.v = t, this.f |= 16, this.i++;
|
|
1389
1399
|
}
|
|
1390
|
-
return E =
|
|
1400
|
+
return E = n, un(this), this.f &= -2, !0;
|
|
1391
1401
|
};
|
|
1392
|
-
G.prototype.S = function(
|
|
1402
|
+
G.prototype.S = function(n) {
|
|
1393
1403
|
if (this.t === void 0) {
|
|
1394
1404
|
this.f |= 36;
|
|
1395
1405
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1396
1406
|
e.S.S(e);
|
|
1397
1407
|
}
|
|
1398
|
-
|
|
1408
|
+
I.prototype.S.call(this, n);
|
|
1399
1409
|
};
|
|
1400
|
-
G.prototype.U = function(
|
|
1401
|
-
if (this.t !== void 0 && (
|
|
1410
|
+
G.prototype.U = function(n) {
|
|
1411
|
+
if (this.t !== void 0 && (I.prototype.U.call(this, n), this.t === void 0)) {
|
|
1402
1412
|
this.f &= -33;
|
|
1403
1413
|
for (var e = this.s; e !== void 0; e = e.n)
|
|
1404
1414
|
e.S.U(e);
|
|
@@ -1407,77 +1417,77 @@ G.prototype.U = function(i) {
|
|
|
1407
1417
|
G.prototype.N = function() {
|
|
1408
1418
|
if (!(2 & this.f)) {
|
|
1409
1419
|
this.f |= 6;
|
|
1410
|
-
for (var
|
|
1411
|
-
|
|
1420
|
+
for (var n = this.t; n !== void 0; n = n.x)
|
|
1421
|
+
n.t.N();
|
|
1412
1422
|
}
|
|
1413
1423
|
};
|
|
1414
1424
|
G.prototype.peek = function() {
|
|
1415
|
-
if (this.h() ||
|
|
1425
|
+
if (this.h() || ze(), 16 & this.f)
|
|
1416
1426
|
throw this.v;
|
|
1417
1427
|
return this.v;
|
|
1418
1428
|
};
|
|
1419
1429
|
Object.defineProperty(G.prototype, "value", { get: function() {
|
|
1420
|
-
1 & this.f &&
|
|
1421
|
-
var
|
|
1422
|
-
if (this.h(),
|
|
1430
|
+
1 & this.f && ze();
|
|
1431
|
+
var n = an(this);
|
|
1432
|
+
if (this.h(), n !== void 0 && (n.i = this.i), 16 & this.f)
|
|
1423
1433
|
throw this.v;
|
|
1424
1434
|
return this.v;
|
|
1425
1435
|
} });
|
|
1426
|
-
function
|
|
1427
|
-
return new G(
|
|
1436
|
+
function dn(n) {
|
|
1437
|
+
return new G(n);
|
|
1428
1438
|
}
|
|
1429
|
-
function
|
|
1430
|
-
var e =
|
|
1431
|
-
if (
|
|
1432
|
-
|
|
1439
|
+
function hn(n) {
|
|
1440
|
+
var e = n.u;
|
|
1441
|
+
if (n.u = void 0, typeof e == "function") {
|
|
1442
|
+
re++;
|
|
1433
1443
|
var t = E;
|
|
1434
1444
|
E = void 0;
|
|
1435
1445
|
try {
|
|
1436
1446
|
e();
|
|
1437
|
-
} catch (
|
|
1438
|
-
throw
|
|
1447
|
+
} catch (i) {
|
|
1448
|
+
throw n.f &= -2, n.f |= 8, it(n), i;
|
|
1439
1449
|
} finally {
|
|
1440
|
-
E = t,
|
|
1450
|
+
E = t, nt();
|
|
1441
1451
|
}
|
|
1442
1452
|
}
|
|
1443
1453
|
}
|
|
1444
|
-
function it(
|
|
1445
|
-
for (var e =
|
|
1454
|
+
function it(n) {
|
|
1455
|
+
for (var e = n.s; e !== void 0; e = e.n)
|
|
1446
1456
|
e.S.U(e);
|
|
1447
|
-
|
|
1457
|
+
n.x = void 0, n.s = void 0, hn(n);
|
|
1448
1458
|
}
|
|
1449
|
-
function
|
|
1459
|
+
function Pn(n) {
|
|
1450
1460
|
if (E !== this)
|
|
1451
1461
|
throw new Error("Out-of-order effect");
|
|
1452
|
-
|
|
1462
|
+
un(this), E = n, this.f &= -2, 8 & this.f && it(this), nt();
|
|
1453
1463
|
}
|
|
1454
|
-
function
|
|
1455
|
-
this.x =
|
|
1464
|
+
function ge(n) {
|
|
1465
|
+
this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
|
1456
1466
|
}
|
|
1457
|
-
|
|
1458
|
-
var
|
|
1467
|
+
ge.prototype.c = function() {
|
|
1468
|
+
var n = this.S();
|
|
1459
1469
|
try {
|
|
1460
1470
|
if (8 & this.f || this.x === void 0)
|
|
1461
1471
|
return;
|
|
1462
1472
|
var e = this.x();
|
|
1463
1473
|
typeof e == "function" && (this.u = e);
|
|
1464
1474
|
} finally {
|
|
1465
|
-
|
|
1475
|
+
n();
|
|
1466
1476
|
}
|
|
1467
1477
|
};
|
|
1468
|
-
|
|
1469
|
-
1 & this.f &&
|
|
1470
|
-
var
|
|
1471
|
-
return E = this,
|
|
1478
|
+
ge.prototype.S = function() {
|
|
1479
|
+
1 & this.f && ze(), this.f |= 1, this.f &= -9, hn(this), ln(this), re++;
|
|
1480
|
+
var n = E;
|
|
1481
|
+
return E = this, Pn.bind(this, n);
|
|
1472
1482
|
};
|
|
1473
|
-
|
|
1474
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
1483
|
+
ge.prototype.N = function() {
|
|
1484
|
+
2 & this.f || (this.f |= 2, this.o = fe, fe = this);
|
|
1475
1485
|
};
|
|
1476
|
-
|
|
1486
|
+
ge.prototype.d = function() {
|
|
1477
1487
|
this.f |= 8, 1 & this.f || it(this);
|
|
1478
1488
|
};
|
|
1479
|
-
function
|
|
1480
|
-
var e = new
|
|
1489
|
+
function He(n) {
|
|
1490
|
+
var e = new ge(n);
|
|
1481
1491
|
try {
|
|
1482
1492
|
e.c();
|
|
1483
1493
|
} catch (t) {
|
|
@@ -1485,18 +1495,18 @@ function De(i) {
|
|
|
1485
1495
|
}
|
|
1486
1496
|
return e.d.bind(e);
|
|
1487
1497
|
}
|
|
1488
|
-
var
|
|
1489
|
-
function
|
|
1490
|
-
|
|
1498
|
+
var Le, Re;
|
|
1499
|
+
function ce(n, e) {
|
|
1500
|
+
w[n] = e.bind(null, w[n] || function() {
|
|
1491
1501
|
});
|
|
1492
1502
|
}
|
|
1493
|
-
function
|
|
1494
|
-
|
|
1503
|
+
function Me(n) {
|
|
1504
|
+
Re && Re(), Re = n && n.S();
|
|
1495
1505
|
}
|
|
1496
|
-
function
|
|
1497
|
-
var e = this, t =
|
|
1498
|
-
|
|
1499
|
-
var s =
|
|
1506
|
+
function fn(n) {
|
|
1507
|
+
var e = this, t = n.data, i = U(t);
|
|
1508
|
+
i.value = t;
|
|
1509
|
+
var s = P(function() {
|
|
1500
1510
|
for (var o = e.__v; o = o.__; )
|
|
1501
1511
|
if (o.__c) {
|
|
1502
1512
|
o.__c.__$f |= 4;
|
|
@@ -1504,84 +1514,84 @@ function li(i) {
|
|
|
1504
1514
|
}
|
|
1505
1515
|
return e.__$u.c = function() {
|
|
1506
1516
|
var r;
|
|
1507
|
-
!
|
|
1508
|
-
},
|
|
1509
|
-
var r =
|
|
1517
|
+
!Ut(s.peek()) && ((r = e.base) == null ? void 0 : r.nodeType) === 3 ? e.base.data = s.peek() : (e.__$f |= 1, e.setState({}));
|
|
1518
|
+
}, dn(function() {
|
|
1519
|
+
var r = i.value.value;
|
|
1510
1520
|
return r === 0 ? 0 : r === !0 ? "" : r || "";
|
|
1511
1521
|
});
|
|
1512
1522
|
}, []);
|
|
1513
1523
|
return s.value;
|
|
1514
1524
|
}
|
|
1515
|
-
|
|
1516
|
-
Object.defineProperties(
|
|
1525
|
+
fn.displayName = "_st";
|
|
1526
|
+
Object.defineProperties(I.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: fn }, props: { configurable: !0, get: function() {
|
|
1517
1527
|
return { data: this };
|
|
1518
1528
|
} }, __b: { configurable: !0, value: 1 } });
|
|
1519
|
-
|
|
1529
|
+
ce("__b", function(n, e) {
|
|
1520
1530
|
if (typeof e.type == "string") {
|
|
1521
|
-
var t,
|
|
1522
|
-
for (var s in
|
|
1531
|
+
var t, i = e.props;
|
|
1532
|
+
for (var s in i)
|
|
1523
1533
|
if (s !== "children") {
|
|
1524
|
-
var o =
|
|
1525
|
-
o instanceof
|
|
1534
|
+
var o = i[s];
|
|
1535
|
+
o instanceof I && (t || (e.__np = t = {}), t[s] = o, i[s] = o.peek());
|
|
1526
1536
|
}
|
|
1527
1537
|
}
|
|
1528
|
-
|
|
1538
|
+
n(e);
|
|
1529
1539
|
});
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
var t,
|
|
1533
|
-
|
|
1540
|
+
ce("__r", function(n, e) {
|
|
1541
|
+
Me();
|
|
1542
|
+
var t, i = e.__c;
|
|
1543
|
+
i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(s) {
|
|
1534
1544
|
var o;
|
|
1535
|
-
return
|
|
1545
|
+
return He(function() {
|
|
1536
1546
|
o = this;
|
|
1537
1547
|
}), o.c = function() {
|
|
1538
|
-
|
|
1548
|
+
i.__$f |= 1, i.setState({});
|
|
1539
1549
|
}, o;
|
|
1540
|
-
}())),
|
|
1550
|
+
}())), Le = i, Me(t), n(e);
|
|
1541
1551
|
});
|
|
1542
|
-
|
|
1543
|
-
|
|
1552
|
+
ce("__e", function(n, e, t, i) {
|
|
1553
|
+
Me(), Le = void 0, n(e, t, i);
|
|
1544
1554
|
});
|
|
1545
|
-
|
|
1546
|
-
|
|
1555
|
+
ce("diffed", function(n, e) {
|
|
1556
|
+
Me(), Le = void 0;
|
|
1547
1557
|
var t;
|
|
1548
1558
|
if (typeof e.type == "string" && (t = e.__e)) {
|
|
1549
|
-
var
|
|
1550
|
-
if (
|
|
1559
|
+
var i = e.__np, s = e.props;
|
|
1560
|
+
if (i) {
|
|
1551
1561
|
var o = t.U;
|
|
1552
1562
|
if (o)
|
|
1553
1563
|
for (var r in o) {
|
|
1554
1564
|
var a = o[r];
|
|
1555
|
-
a !== void 0 && !(r in
|
|
1565
|
+
a !== void 0 && !(r in i) && (a.d(), o[r] = void 0);
|
|
1556
1566
|
}
|
|
1557
1567
|
else
|
|
1558
1568
|
t.U = o = {};
|
|
1559
|
-
for (var u in
|
|
1560
|
-
var
|
|
1561
|
-
|
|
1569
|
+
for (var u in i) {
|
|
1570
|
+
var f = o[u], d = i[u];
|
|
1571
|
+
f === void 0 ? (f = Rn(t, u, d, s), o[u] = f) : f.o(d, s);
|
|
1562
1572
|
}
|
|
1563
1573
|
}
|
|
1564
1574
|
}
|
|
1565
|
-
|
|
1575
|
+
n(e);
|
|
1566
1576
|
});
|
|
1567
|
-
function
|
|
1568
|
-
var s = e in
|
|
1577
|
+
function Rn(n, e, t, i) {
|
|
1578
|
+
var s = e in n && n.ownerSVGElement === void 0, o = X(t);
|
|
1569
1579
|
return { o: function(r, a) {
|
|
1570
|
-
o.value = r,
|
|
1571
|
-
}, d:
|
|
1580
|
+
o.value = r, i = a;
|
|
1581
|
+
}, d: He(function() {
|
|
1572
1582
|
var r = o.value.value;
|
|
1573
|
-
|
|
1583
|
+
i[e] !== r && (i[e] = r, s ? n[e] = r : r ? n.setAttribute(e, r) : n.removeAttribute(e));
|
|
1574
1584
|
}) };
|
|
1575
1585
|
}
|
|
1576
|
-
|
|
1586
|
+
ce("unmount", function(n, e) {
|
|
1577
1587
|
if (typeof e.type == "string") {
|
|
1578
1588
|
var t = e.__e;
|
|
1579
1589
|
if (t) {
|
|
1580
|
-
var
|
|
1581
|
-
if (
|
|
1590
|
+
var i = t.U;
|
|
1591
|
+
if (i) {
|
|
1582
1592
|
t.U = void 0;
|
|
1583
|
-
for (var s in
|
|
1584
|
-
var o =
|
|
1593
|
+
for (var s in i) {
|
|
1594
|
+
var o = i[s];
|
|
1585
1595
|
o && o.d();
|
|
1586
1596
|
}
|
|
1587
1597
|
}
|
|
@@ -1593,65 +1603,65 @@ ae("unmount", function(i, e) {
|
|
|
1593
1603
|
a && (r.__$u = void 0, a.d());
|
|
1594
1604
|
}
|
|
1595
1605
|
}
|
|
1596
|
-
|
|
1606
|
+
n(e);
|
|
1597
1607
|
});
|
|
1598
|
-
|
|
1599
|
-
(
|
|
1608
|
+
ce("__h", function(n, e, t, i) {
|
|
1609
|
+
(i < 3 || i === 9) && (e.__$f |= 2), n(e, t, i);
|
|
1600
1610
|
});
|
|
1601
|
-
|
|
1611
|
+
L.prototype.shouldComponentUpdate = function(n, e) {
|
|
1602
1612
|
var t = this.__$u;
|
|
1603
1613
|
if (!(t && t.s !== void 0 || 4 & this.__$f) || 3 & this.__$f)
|
|
1604
1614
|
return !0;
|
|
1605
|
-
for (var
|
|
1615
|
+
for (var i in e)
|
|
1606
1616
|
return !0;
|
|
1607
|
-
for (var s in
|
|
1608
|
-
if (s !== "__source" &&
|
|
1617
|
+
for (var s in n)
|
|
1618
|
+
if (s !== "__source" && n[s] !== this.props[s])
|
|
1609
1619
|
return !0;
|
|
1610
1620
|
for (var o in this.props)
|
|
1611
|
-
if (!(o in
|
|
1621
|
+
if (!(o in n))
|
|
1612
1622
|
return !0;
|
|
1613
1623
|
return !1;
|
|
1614
1624
|
};
|
|
1615
|
-
function
|
|
1616
|
-
return
|
|
1617
|
-
return
|
|
1625
|
+
function U(n) {
|
|
1626
|
+
return P(function() {
|
|
1627
|
+
return X(n);
|
|
1618
1628
|
}, []);
|
|
1619
1629
|
}
|
|
1620
|
-
function
|
|
1621
|
-
var e =
|
|
1622
|
-
return e.current =
|
|
1623
|
-
return
|
|
1630
|
+
function H(n) {
|
|
1631
|
+
var e = B(n);
|
|
1632
|
+
return e.current = n, Le.__$f |= 4, P(function() {
|
|
1633
|
+
return dn(function() {
|
|
1624
1634
|
return e.current();
|
|
1625
1635
|
});
|
|
1626
1636
|
}, []);
|
|
1627
1637
|
}
|
|
1628
|
-
function
|
|
1629
|
-
var e =
|
|
1630
|
-
e.current =
|
|
1631
|
-
return
|
|
1638
|
+
function Fn(n) {
|
|
1639
|
+
var e = B(n);
|
|
1640
|
+
e.current = n, O(function() {
|
|
1641
|
+
return He(function() {
|
|
1632
1642
|
return e.current();
|
|
1633
1643
|
});
|
|
1634
1644
|
}, []);
|
|
1635
1645
|
}
|
|
1636
|
-
var
|
|
1637
|
-
function c(
|
|
1646
|
+
var Un = 0;
|
|
1647
|
+
function c(n, e, t, i, s, o) {
|
|
1638
1648
|
var r, a, u = {};
|
|
1639
1649
|
for (a in e)
|
|
1640
1650
|
a == "ref" ? r = e[a] : u[a] = e[a];
|
|
1641
|
-
var
|
|
1642
|
-
if (typeof
|
|
1651
|
+
var f = { type: n, props: u, key: t, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --Un, __source: s, __self: o };
|
|
1652
|
+
if (typeof n == "function" && (r = n.defaultProps))
|
|
1643
1653
|
for (a in r)
|
|
1644
1654
|
u[a] === void 0 && (u[a] = r[a]);
|
|
1645
|
-
return
|
|
1655
|
+
return w.vnode && w.vnode(f), f;
|
|
1646
1656
|
}
|
|
1647
|
-
const
|
|
1657
|
+
const Wn = () => c("svg", {
|
|
1648
1658
|
viewBox: "0 0 1024 1024",
|
|
1649
1659
|
version: "1.1",
|
|
1650
1660
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1651
1661
|
children: c("path", {
|
|
1652
1662
|
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"
|
|
1653
1663
|
})
|
|
1654
|
-
}),
|
|
1664
|
+
}), Vn = () => c("svg", {
|
|
1655
1665
|
className: "icon",
|
|
1656
1666
|
viewBox: "0 0 1024 1024",
|
|
1657
1667
|
version: "1.1",
|
|
@@ -1659,58 +1669,58 @@ const Pi = () => c("svg", {
|
|
|
1659
1669
|
children: c("path", {
|
|
1660
1670
|
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"
|
|
1661
1671
|
})
|
|
1662
|
-
}),
|
|
1672
|
+
}), jn = (n) => c("svg", {
|
|
1663
1673
|
viewBox: "0 0 1024 1024",
|
|
1664
1674
|
id: "send",
|
|
1665
|
-
className:
|
|
1675
|
+
className: n.className,
|
|
1666
1676
|
version: "1.1",
|
|
1667
1677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1668
1678
|
children: c("path", {
|
|
1669
1679
|
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"
|
|
1670
1680
|
})
|
|
1671
|
-
}),
|
|
1681
|
+
}), qn = () => c("svg", {
|
|
1672
1682
|
viewBox: "0 0 1024 1024",
|
|
1673
1683
|
version: "1.1",
|
|
1674
1684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1675
1685
|
children: c("path", {
|
|
1676
1686
|
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"
|
|
1677
1687
|
})
|
|
1678
|
-
}),
|
|
1688
|
+
}), gt = () => c("svg", {
|
|
1679
1689
|
viewBox: "0 0 1024 1024",
|
|
1680
1690
|
version: "1.1",
|
|
1681
1691
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1682
1692
|
children: c("path", {
|
|
1683
1693
|
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"
|
|
1684
1694
|
})
|
|
1685
|
-
}),
|
|
1695
|
+
}), Yn = () => c("svg", {
|
|
1686
1696
|
viewBox: "0 0 1024 1024",
|
|
1687
1697
|
version: "1.1",
|
|
1688
1698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1689
1699
|
children: c("path", {
|
|
1690
1700
|
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"
|
|
1691
1701
|
})
|
|
1692
|
-
}),
|
|
1702
|
+
}), Xn = () => c("svg", {
|
|
1693
1703
|
viewBox: "0 0 1024 1024",
|
|
1694
1704
|
version: "1.1",
|
|
1695
1705
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1696
1706
|
children: c("path", {
|
|
1697
1707
|
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"
|
|
1698
1708
|
})
|
|
1699
|
-
}),
|
|
1709
|
+
}), Zn = () => c("svg", {
|
|
1700
1710
|
viewBox: "0 0 1024 1024",
|
|
1701
1711
|
version: "1.1",
|
|
1702
1712
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1703
1713
|
children: c("path", {
|
|
1704
1714
|
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"
|
|
1705
1715
|
})
|
|
1706
|
-
}),
|
|
1716
|
+
}), Gn = () => c("svg", {
|
|
1707
1717
|
viewBox: "0 0 1024 1024",
|
|
1708
1718
|
version: "1.1",
|
|
1709
1719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1710
1720
|
children: c("path", {
|
|
1711
1721
|
d: "M960 544H64a32 32 0 1 1 0-64h896a32 32 0 1 1 0 64"
|
|
1712
1722
|
})
|
|
1713
|
-
}),
|
|
1723
|
+
}), Jn = () => c("svg", {
|
|
1714
1724
|
viewBox: "0 0 1024 1024",
|
|
1715
1725
|
version: "1.1",
|
|
1716
1726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1727,7 +1737,7 @@ const Pi = () => c("svg", {
|
|
|
1727
1737
|
}), c("path", {
|
|
1728
1738
|
d: "M617.472 556.032a47.9232 38.912 90 1 0 77.824 0 47.9232 38.912 90 1 0-77.824 0Z"
|
|
1729
1739
|
})]
|
|
1730
|
-
}),
|
|
1740
|
+
}), Kn = () => c("svg", {
|
|
1731
1741
|
viewBox: "0 0 18 18",
|
|
1732
1742
|
fill: "none",
|
|
1733
1743
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1741,7 +1751,7 @@ const Pi = () => c("svg", {
|
|
|
1741
1751
|
d: "M14.537 2.932c0-.396-.34-.717-.759-.717s-.758.32-.758.717v3.786c0 .396.34.717.758.717.42 0 .76-.321.76-.717V2.932z",
|
|
1742
1752
|
fill: "currentColor"
|
|
1743
1753
|
})]
|
|
1744
|
-
}),
|
|
1754
|
+
}), Qn = () => c("svg", {
|
|
1745
1755
|
viewBox: "64 64 896 896",
|
|
1746
1756
|
focusable: "false",
|
|
1747
1757
|
width: "1em",
|
|
@@ -1751,7 +1761,7 @@ const Pi = () => c("svg", {
|
|
|
1751
1761
|
children: c("path", {
|
|
1752
1762
|
d: "M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"
|
|
1753
1763
|
})
|
|
1754
|
-
}),
|
|
1764
|
+
}), ei = () => c("svg", {
|
|
1755
1765
|
fill: "currentColor",
|
|
1756
1766
|
viewBox: "0 0 1000 1000",
|
|
1757
1767
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1785,26 +1795,26 @@ const Pi = () => c("svg", {
|
|
|
1785
1795
|
})]
|
|
1786
1796
|
}, u);
|
|
1787
1797
|
})
|
|
1788
|
-
}),
|
|
1789
|
-
className:
|
|
1790
|
-
onClick:
|
|
1798
|
+
}), ti = (n) => c("svg", {
|
|
1799
|
+
className: n.className,
|
|
1800
|
+
onClick: n.onClick,
|
|
1791
1801
|
viewBox: "0 0 1024 1024",
|
|
1792
1802
|
version: "1.1",
|
|
1793
1803
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1794
1804
|
children: c("path", {
|
|
1795
1805
|
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"
|
|
1796
1806
|
})
|
|
1797
|
-
}),
|
|
1798
|
-
className:
|
|
1807
|
+
}), ni = (n) => c("svg", {
|
|
1808
|
+
className: n.className,
|
|
1799
1809
|
viewBox: "0 0 1024 1024",
|
|
1800
1810
|
version: "1.1",
|
|
1801
1811
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1802
1812
|
children: c("path", {
|
|
1803
1813
|
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"
|
|
1804
1814
|
})
|
|
1805
|
-
}),
|
|
1815
|
+
}), ii = (n) => c("svg", {
|
|
1806
1816
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1807
|
-
className:
|
|
1817
|
+
className: n.className,
|
|
1808
1818
|
viewBox: "0 0 512 512",
|
|
1809
1819
|
children: c("path", {
|
|
1810
1820
|
fill: "none",
|
|
@@ -1814,15 +1824,15 @@ const Pi = () => c("svg", {
|
|
|
1814
1824
|
strokeWidth: "48",
|
|
1815
1825
|
d: "M112 184l144 144 144-144"
|
|
1816
1826
|
})
|
|
1817
|
-
}),
|
|
1827
|
+
}), Fe = (n) => c("svg", {
|
|
1818
1828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1819
|
-
className: "".concat(
|
|
1829
|
+
className: "".concat(n.className, " icon"),
|
|
1820
1830
|
viewBox: "0 0 512 512",
|
|
1821
1831
|
children: c("path", {
|
|
1822
1832
|
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"
|
|
1823
1833
|
})
|
|
1824
|
-
}),
|
|
1825
|
-
className:
|
|
1834
|
+
}), Ue = (n) => c("svg", {
|
|
1835
|
+
className: n.className,
|
|
1826
1836
|
width: "16",
|
|
1827
1837
|
height: "16",
|
|
1828
1838
|
viewBox: "0 0 50 50",
|
|
@@ -1845,7 +1855,7 @@ const Pi = () => c("svg", {
|
|
|
1845
1855
|
repeatCount: "indefinite"
|
|
1846
1856
|
})
|
|
1847
1857
|
})
|
|
1848
|
-
}),
|
|
1858
|
+
}), si = () => c("svg", {
|
|
1849
1859
|
className: "icon",
|
|
1850
1860
|
viewBox: "0 0 1024 1024",
|
|
1851
1861
|
version: "1.1",
|
|
@@ -1855,7 +1865,7 @@ const Pi = () => c("svg", {
|
|
|
1855
1865
|
children: c("path", {
|
|
1856
1866
|
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"
|
|
1857
1867
|
})
|
|
1858
|
-
}),
|
|
1868
|
+
}), pn = () => c("svg", {
|
|
1859
1869
|
className: "icon",
|
|
1860
1870
|
viewBox: "0 0 1024 1024",
|
|
1861
1871
|
version: "1.1",
|
|
@@ -1869,7 +1879,7 @@ const Pi = () => c("svg", {
|
|
|
1869
1879
|
d: "M640 693.333333H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM640 522.666667H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM341.333333 416h85.333334c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-85.333334c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32z",
|
|
1870
1880
|
fill: "currentColor"
|
|
1871
1881
|
})]
|
|
1872
|
-
}),
|
|
1882
|
+
}), oi = () => c("svg", {
|
|
1873
1883
|
className: "icon",
|
|
1874
1884
|
viewBox: "0 0 1024 1024",
|
|
1875
1885
|
version: "1.1",
|
|
@@ -1880,7 +1890,7 @@ const Pi = () => c("svg", {
|
|
|
1880
1890
|
d: "M557.248 511.68l135.776-135.744-45.248-45.28L512 466.432l-135.776-135.776-45.248 45.28 135.776 135.744-135.776 135.776 45.248 45.248L512 556.928l135.776 135.776 45.248-45.248-135.776-135.776zM512 64c247.136 0 448 200.864 448 448s-200.864 448-448 448S64 759.136 64 512 264.864 64 512 64z",
|
|
1881
1891
|
fill: "currentColor"
|
|
1882
1892
|
})
|
|
1883
|
-
}),
|
|
1893
|
+
}), ri = () => c("svg", {
|
|
1884
1894
|
className: "icon",
|
|
1885
1895
|
viewBox: "0 0 1024 1024",
|
|
1886
1896
|
version: "1.1",
|
|
@@ -1890,8 +1900,8 @@ const Pi = () => c("svg", {
|
|
|
1890
1900
|
children: c("path", {
|
|
1891
1901
|
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"
|
|
1892
1902
|
})
|
|
1893
|
-
}),
|
|
1894
|
-
className:
|
|
1903
|
+
}), ai = (n) => c("svg", {
|
|
1904
|
+
className: n.className,
|
|
1895
1905
|
id: "stop",
|
|
1896
1906
|
viewBox: "0 0 1025 1024",
|
|
1897
1907
|
version: "1.1",
|
|
@@ -1905,9 +1915,9 @@ const Pi = () => c("svg", {
|
|
|
1905
1915
|
d: "M655.434047 694.244421 367.12637 694.244421c-21.046987 0-38.170445-17.123458-38.170445-38.170445L328.955925 367.766298c0-21.046987 17.123458-38.170445 38.170445-38.170445l288.307678 0c21.048011 0 38.170445 17.123458 38.170445 38.170445l0 288.307678C693.604492 677.120962 676.482058 694.244421 655.434047 694.244421zM380.150191 643.050154l262.260035 0L642.410226 380.79012 380.150191 380.79012 380.150191 643.050154z",
|
|
1906
1916
|
fill: "currentColor"
|
|
1907
1917
|
})]
|
|
1908
|
-
}),
|
|
1918
|
+
}), ci = (n) => c("svg", {
|
|
1909
1919
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1910
|
-
className:
|
|
1920
|
+
className: n.className,
|
|
1911
1921
|
viewBox: "0 0 512 512",
|
|
1912
1922
|
children: c("path", {
|
|
1913
1923
|
fill: "none",
|
|
@@ -1918,11 +1928,11 @@ const Pi = () => c("svg", {
|
|
|
1918
1928
|
d: "M112 268l144 144 144-144M256 392V100"
|
|
1919
1929
|
})
|
|
1920
1930
|
});
|
|
1921
|
-
const
|
|
1931
|
+
const li = (n) => {
|
|
1922
1932
|
const {
|
|
1923
1933
|
items: e
|
|
1924
|
-
} =
|
|
1925
|
-
|
|
1934
|
+
} = n, t = U([]), i = new $("chat-thought-chain"), s = U([]);
|
|
1935
|
+
O(() => {
|
|
1926
1936
|
s.value = e.filter((r) => r.description), s.value.length > 0 && s.value.forEach((r, a) => {
|
|
1927
1937
|
r.done && (t.value = [...t.value, a]);
|
|
1928
1938
|
});
|
|
@@ -1931,64 +1941,64 @@ const rn = (i) => {
|
|
|
1931
1941
|
t.value.includes(r) ? t.value = t.value.filter((a) => a !== r) : t.value = [...t.value, r];
|
|
1932
1942
|
};
|
|
1933
1943
|
return s.value.length === 0 ? null : c("div", {
|
|
1934
|
-
className: "".concat(
|
|
1944
|
+
className: "".concat(i.b(), " ").concat(i.is("single", s.value.length === 1)),
|
|
1935
1945
|
children: s.value.map((r, a) => {
|
|
1936
1946
|
if (!r.description)
|
|
1937
1947
|
return;
|
|
1938
1948
|
const u = t.value.includes(a);
|
|
1939
1949
|
return c("div", {
|
|
1940
|
-
className: "".concat(
|
|
1950
|
+
className: "".concat(i.e("item"), " ").concat(i.is("collapsed", u)),
|
|
1941
1951
|
children: [c("div", {
|
|
1942
|
-
className:
|
|
1952
|
+
className: i.e("item-icon"),
|
|
1943
1953
|
children: r.icon || c("span", {
|
|
1944
1954
|
children: a
|
|
1945
1955
|
})
|
|
1946
1956
|
}), c("div", {
|
|
1947
|
-
className:
|
|
1957
|
+
className: i.e("item-content"),
|
|
1948
1958
|
children: [c("div", {
|
|
1949
|
-
className:
|
|
1959
|
+
className: i.e("item-title"),
|
|
1950
1960
|
onClick: () => o(a),
|
|
1951
|
-
children: [r.title, c(
|
|
1952
|
-
className:
|
|
1961
|
+
children: [r.title, c(ii, {
|
|
1962
|
+
className: i.e("icon")
|
|
1953
1963
|
})]
|
|
1954
1964
|
}), c("div", {
|
|
1955
|
-
className:
|
|
1965
|
+
className: i.e("item-description"),
|
|
1956
1966
|
children: r.description
|
|
1957
1967
|
})]
|
|
1958
1968
|
})]
|
|
1959
1969
|
}, a);
|
|
1960
1970
|
})
|
|
1961
1971
|
});
|
|
1962
|
-
}, K = new $("markdown-message"),
|
|
1972
|
+
}, K = new $("markdown-message"), ui = (n) => {
|
|
1963
1973
|
const {
|
|
1964
1974
|
message: e,
|
|
1965
1975
|
size: t
|
|
1966
|
-
} =
|
|
1976
|
+
} = n, i = U(Kt()), s = U(null), o = P(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), r = P(() => e.state === 20 && e.completed === !0, [e.state, e.completed]), a = U({
|
|
1967
1977
|
title: "",
|
|
1968
1978
|
description: "",
|
|
1969
|
-
icon: c(
|
|
1970
|
-
}), u = (
|
|
1971
|
-
const d =
|
|
1972
|
-
let _ = "",
|
|
1973
|
-
return l === -1 ? (
|
|
1974
|
-
isThoughtCompleted:
|
|
1979
|
+
icon: c(Ue, {})
|
|
1980
|
+
}), u = (f) => {
|
|
1981
|
+
const d = f.indexOf("<think>"), l = f.indexOf("</think>");
|
|
1982
|
+
let _ = "", g = "", h = !1;
|
|
1983
|
+
return l === -1 ? (h = !1, _ = f.slice(d + 7), g = "") : (h = !0, _ = f.slice(d + 7, l), g = f.slice(l + 8)), {
|
|
1984
|
+
isThoughtCompleted: h,
|
|
1975
1985
|
thoughtContent: _,
|
|
1976
|
-
answerContent:
|
|
1986
|
+
answerContent: g
|
|
1977
1987
|
};
|
|
1978
1988
|
};
|
|
1979
|
-
return
|
|
1989
|
+
return O(() => {
|
|
1980
1990
|
if (t >= 0 && s.value)
|
|
1981
1991
|
if (e.content.indexOf("<think>") !== -1) {
|
|
1982
1992
|
const {
|
|
1983
|
-
isThoughtCompleted:
|
|
1993
|
+
isThoughtCompleted: f,
|
|
1984
1994
|
thoughtContent: d,
|
|
1985
1995
|
answerContent: l
|
|
1986
1996
|
} = u(e.content);
|
|
1987
|
-
|
|
1997
|
+
f ? (a.value.icon = c(Fe, {}), a.value.title = "思考完成") : e.completed === !0 ? (a.value.icon = c(Fe, {}), a.value.title = "思考已停止") : (a.value.icon = c(Ue, {}), a.value.title = "思考中..."), d && (a.value.description = d), l && s.value.setMarkdown(l);
|
|
1988
1998
|
} else
|
|
1989
1999
|
s.value.setMarkdown(e.content);
|
|
1990
|
-
}, [e, t]),
|
|
1991
|
-
let
|
|
2000
|
+
}, [e, t]), O(() => {
|
|
2001
|
+
let f = "";
|
|
1992
2002
|
if (e.content.indexOf("<think>") !== -1) {
|
|
1993
2003
|
const {
|
|
1994
2004
|
isThoughtCompleted: d,
|
|
@@ -1998,13 +2008,13 @@ const rn = (i) => {
|
|
|
1998
2008
|
a.value = {
|
|
1999
2009
|
title: d ? "思考完成" : e.completed === !0 ? "思考已停止" : "思考中...",
|
|
2000
2010
|
description: l || "",
|
|
2001
|
-
icon: d || e.completed === !0 ? c(
|
|
2002
|
-
}, _ && (
|
|
2011
|
+
icon: d || e.completed === !0 ? c(Fe, {}) : c(Ue, {})
|
|
2012
|
+
}, _ && (f = _);
|
|
2003
2013
|
} else
|
|
2004
|
-
|
|
2005
|
-
s.value = new
|
|
2006
|
-
id:
|
|
2007
|
-
value:
|
|
2014
|
+
f = e.content;
|
|
2015
|
+
s.value = new Tn({
|
|
2016
|
+
id: i,
|
|
2017
|
+
value: f || "",
|
|
2008
2018
|
editor: {
|
|
2009
2019
|
defaultModel: "previewOnly"
|
|
2010
2020
|
}
|
|
@@ -2016,28 +2026,28 @@ const rn = (i) => {
|
|
|
2016
2026
|
children: [c("div", {
|
|
2017
2027
|
className: K.be("header", "caption"),
|
|
2018
2028
|
children: "AI "
|
|
2019
|
-
}),
|
|
2029
|
+
}), n.children, r ? c("div", {
|
|
2020
2030
|
className: K.be("header", "timeout"),
|
|
2021
2031
|
children: "请求超时"
|
|
2022
2032
|
}) : null]
|
|
2023
2033
|
}), c("div", {
|
|
2024
2034
|
className: "".concat(K.b("content"), " pre-wrap-container"),
|
|
2025
|
-
children: [c(
|
|
2035
|
+
children: [c(li, {
|
|
2026
2036
|
items: [a.value]
|
|
2027
2037
|
}), c("div", {
|
|
2028
|
-
id:
|
|
2038
|
+
id: i
|
|
2029
2039
|
})]
|
|
2030
2040
|
}), c("div", {
|
|
2031
2041
|
className: K.b("footer")
|
|
2032
2042
|
})]
|
|
2033
2043
|
});
|
|
2034
2044
|
};
|
|
2035
|
-
const
|
|
2036
|
-
const e =
|
|
2037
|
-
const o =
|
|
2045
|
+
const le = new $("ossfile-material"), di = (n) => {
|
|
2046
|
+
const e = H(() => n.material.data.name), t = H(() => n.material.metadata.size), i = H(() => {
|
|
2047
|
+
const o = n.material.metadata.state;
|
|
2038
2048
|
return o === "successed" ? "上传成功" : o === "uploading" ? "上传中" : o === "failed" ? "上传失败" : "未知状态";
|
|
2039
|
-
}), s =
|
|
2040
|
-
switch (
|
|
2049
|
+
}), s = H(() => {
|
|
2050
|
+
switch (n.material.metadata.state) {
|
|
2041
2051
|
case "successed":
|
|
2042
2052
|
return "#1890ff";
|
|
2043
2053
|
case "uploading":
|
|
@@ -2049,56 +2059,56 @@ const ce = new $("ossfile-material"), cn = (i) => {
|
|
|
2049
2059
|
}
|
|
2050
2060
|
});
|
|
2051
2061
|
return c("div", {
|
|
2052
|
-
className:
|
|
2062
|
+
className: le.b(),
|
|
2053
2063
|
children: [c("div", {
|
|
2054
|
-
className:
|
|
2055
|
-
children: c(
|
|
2064
|
+
className: le.b("left"),
|
|
2065
|
+
children: c(pn, {})
|
|
2056
2066
|
}), c("div", {
|
|
2057
|
-
className:
|
|
2067
|
+
className: le.b("right"),
|
|
2058
2068
|
children: [c("div", {
|
|
2059
|
-
className:
|
|
2069
|
+
className: le.e("name"),
|
|
2060
2070
|
title: e,
|
|
2061
2071
|
children: e
|
|
2062
2072
|
}), c("div", {
|
|
2063
|
-
className:
|
|
2073
|
+
className: le.e("metadata"),
|
|
2064
2074
|
children: [c("div", {
|
|
2065
2075
|
children: [t, "B"]
|
|
2066
2076
|
}), c("div", {
|
|
2067
2077
|
style: {
|
|
2068
2078
|
color: s.value
|
|
2069
2079
|
},
|
|
2070
|
-
children:
|
|
2080
|
+
children: i
|
|
2071
2081
|
})]
|
|
2072
2082
|
})]
|
|
2073
2083
|
})]
|
|
2074
2084
|
});
|
|
2075
2085
|
};
|
|
2076
|
-
const
|
|
2077
|
-
var
|
|
2078
|
-
const e = (
|
|
2086
|
+
const ue = new $("common-material"), hi = (n) => {
|
|
2087
|
+
var i, s, o, r;
|
|
2088
|
+
const e = (i = n.controller.opts.questionToolbarItems) == null ? void 0 : i.find((a) => a.id === n.material.metadata.actionId), t = H(() => n.material.metadata.name);
|
|
2079
2089
|
return c("div", {
|
|
2080
|
-
className:
|
|
2090
|
+
className: ue.b(),
|
|
2081
2091
|
children: [c("div", {
|
|
2082
|
-
className:
|
|
2083
|
-
children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && c(
|
|
2092
|
+
className: ue.b("left"),
|
|
2093
|
+
children: e && e.icon ? typeof e.icon == "function" ? e.icon() : ((s = e.icon) == null ? void 0 : s.showIcon) && c(V, {
|
|
2084
2094
|
children: (o = e.icon) != null && o.cssClass ? c("i", {
|
|
2085
2095
|
className: e.icon.cssClass
|
|
2086
|
-
}) : (r = e.icon) != null && r.imagePath ?
|
|
2096
|
+
}) : (r = e.icon) != null && r.imagePath ? tt(e.icon.imagePath) ? c("div", {
|
|
2087
2097
|
dangerouslySetInnerHTML: {
|
|
2088
2098
|
__html: e.icon.imagePath
|
|
2089
2099
|
}
|
|
2090
2100
|
}) : c("img", {
|
|
2091
2101
|
src: e.icon.imagePath
|
|
2092
2102
|
}) : null
|
|
2093
|
-
}) : c(
|
|
2103
|
+
}) : c(ri, {})
|
|
2094
2104
|
}), c("div", {
|
|
2095
|
-
className:
|
|
2105
|
+
className: ue.b("right"),
|
|
2096
2106
|
children: [c("div", {
|
|
2097
|
-
className:
|
|
2107
|
+
className: ue.e("name"),
|
|
2098
2108
|
title: t,
|
|
2099
2109
|
children: t
|
|
2100
2110
|
}), c("div", {
|
|
2101
|
-
className:
|
|
2111
|
+
className: ue.e("metadata"),
|
|
2102
2112
|
children: c("div", {
|
|
2103
2113
|
children: (e == null ? void 0 : e.label) || "素材资源"
|
|
2104
2114
|
})
|
|
@@ -2106,55 +2116,55 @@ const le = new $("common-material"), ln = (i) => {
|
|
|
2106
2116
|
})]
|
|
2107
2117
|
});
|
|
2108
2118
|
};
|
|
2109
|
-
const
|
|
2119
|
+
const We = new $("chat-input-material-item"), vn = (n) => {
|
|
2110
2120
|
const {
|
|
2111
2121
|
material: e
|
|
2112
|
-
} =
|
|
2122
|
+
} = n;
|
|
2113
2123
|
let t = null;
|
|
2114
2124
|
switch (e.type) {
|
|
2115
2125
|
case "ossfile":
|
|
2116
|
-
t =
|
|
2126
|
+
t = di;
|
|
2117
2127
|
break;
|
|
2118
2128
|
default:
|
|
2119
|
-
t =
|
|
2129
|
+
t = hi;
|
|
2120
2130
|
}
|
|
2121
|
-
const
|
|
2122
|
-
|
|
2131
|
+
const i = () => {
|
|
2132
|
+
n.controller.deleteMaterial(e);
|
|
2123
2133
|
};
|
|
2124
2134
|
return c("div", {
|
|
2125
|
-
className: "".concat(
|
|
2135
|
+
className: "".concat(We.b(), " ").concat(We.is("disabled", n.disabled)),
|
|
2126
2136
|
children: [c("div", {
|
|
2127
|
-
className:
|
|
2128
|
-
onClick:
|
|
2129
|
-
children: c(
|
|
2130
|
-
}),
|
|
2137
|
+
className: We.e("icon"),
|
|
2138
|
+
onClick: i,
|
|
2139
|
+
children: c(oi, {})
|
|
2140
|
+
}), W(t, {
|
|
2131
2141
|
material: e,
|
|
2132
|
-
controller:
|
|
2142
|
+
controller: n.controller
|
|
2133
2143
|
})]
|
|
2134
2144
|
});
|
|
2135
|
-
},
|
|
2136
|
-
const e =
|
|
2145
|
+
}, ne = new $("user-message-question"), fi = (n) => {
|
|
2146
|
+
const e = H(() => n.message.content), t = H(() => en.parseMixedContent(e.value));
|
|
2137
2147
|
return c("div", {
|
|
2138
|
-
className:
|
|
2148
|
+
className: ne.b(),
|
|
2139
2149
|
children: [c("div", {
|
|
2140
|
-
className:
|
|
2141
|
-
children: [
|
|
2142
|
-
className:
|
|
2150
|
+
className: ne.e("user-header"),
|
|
2151
|
+
children: [n.children, c("div", {
|
|
2152
|
+
className: ne.e("user"),
|
|
2143
2153
|
children: "我"
|
|
2144
2154
|
})]
|
|
2145
2155
|
}), c("div", {
|
|
2146
|
-
className:
|
|
2156
|
+
className: ne.e("content"),
|
|
2147
2157
|
children: c("div", {
|
|
2148
2158
|
dir: "auto",
|
|
2149
|
-
className:
|
|
2159
|
+
className: ne.em("content", "body"),
|
|
2150
2160
|
children: [c("p", {
|
|
2151
2161
|
dir: "auto",
|
|
2152
|
-
className:
|
|
2153
|
-
children: t.value.hasResources && t.value.resources.map((
|
|
2154
|
-
material:
|
|
2162
|
+
className: ne.em("content", "material"),
|
|
2163
|
+
children: t.value.hasResources && t.value.resources.map((i) => c(vn, {
|
|
2164
|
+
material: i,
|
|
2155
2165
|
disabled: !0,
|
|
2156
|
-
controller:
|
|
2157
|
-
},
|
|
2166
|
+
controller: n.controller
|
|
2167
|
+
}, i.id))
|
|
2158
2168
|
}), c("p", {
|
|
2159
2169
|
dir: "auto",
|
|
2160
2170
|
className: "pre-wrap-container",
|
|
@@ -2164,54 +2174,54 @@ const Ue = new $("chat-input-material-item"), hi = (i) => {
|
|
|
2164
2174
|
})]
|
|
2165
2175
|
});
|
|
2166
2176
|
};
|
|
2167
|
-
const
|
|
2168
|
-
const e =
|
|
2177
|
+
const we = new $("error-message"), pi = (n) => {
|
|
2178
|
+
const e = H(() => n.message.content);
|
|
2169
2179
|
return c("div", {
|
|
2170
|
-
className:
|
|
2180
|
+
className: we.b(),
|
|
2171
2181
|
children: [c("div", {
|
|
2172
|
-
className:
|
|
2182
|
+
className: we.b("header"),
|
|
2173
2183
|
children: [c("div", {
|
|
2174
|
-
className:
|
|
2184
|
+
className: we.be("header", "caption"),
|
|
2175
2185
|
children: "AI "
|
|
2176
|
-
}),
|
|
2186
|
+
}), n.children]
|
|
2177
2187
|
}), c("div", {
|
|
2178
|
-
className: "".concat(
|
|
2188
|
+
className: "".concat(we.e("content"), " pre-wrap-container"),
|
|
2179
2189
|
children: c("span", {
|
|
2180
2190
|
children: e
|
|
2181
2191
|
})
|
|
2182
2192
|
})]
|
|
2183
2193
|
});
|
|
2184
2194
|
};
|
|
2185
|
-
const
|
|
2186
|
-
className:
|
|
2195
|
+
const wt = new $("unknown-message"), vi = (n) => c("div", {
|
|
2196
|
+
className: wt.b(),
|
|
2187
2197
|
children: c("span", {
|
|
2188
|
-
className: "".concat(
|
|
2189
|
-
children: ["暂未支持的消息类型: ",
|
|
2198
|
+
className: "".concat(wt.e("content"), " pre-wrap-container"),
|
|
2199
|
+
children: ["暂未支持的消息类型: ", n.message.type]
|
|
2190
2200
|
})
|
|
2191
2201
|
});
|
|
2192
|
-
const
|
|
2202
|
+
const _i = new $("chat-message-item"), mi = (n) => {
|
|
2193
2203
|
const {
|
|
2194
2204
|
message: e,
|
|
2195
2205
|
size: t
|
|
2196
|
-
} =
|
|
2197
|
-
let
|
|
2206
|
+
} = n;
|
|
2207
|
+
let i = null;
|
|
2198
2208
|
switch (e.type) {
|
|
2199
2209
|
case "DEFAULT":
|
|
2200
|
-
|
|
2210
|
+
i = e.role === "ASSISTANT" ? ui : fi;
|
|
2201
2211
|
break;
|
|
2202
2212
|
case "ERROR":
|
|
2203
|
-
|
|
2213
|
+
i = pi;
|
|
2204
2214
|
break;
|
|
2205
2215
|
default:
|
|
2206
|
-
|
|
2216
|
+
i = vi;
|
|
2207
2217
|
}
|
|
2208
2218
|
return c("div", {
|
|
2209
|
-
className:
|
|
2210
|
-
children:
|
|
2219
|
+
className: _i.b(),
|
|
2220
|
+
children: W(i, {
|
|
2211
2221
|
size: t,
|
|
2212
2222
|
message: e,
|
|
2213
|
-
controller:
|
|
2214
|
-
children:
|
|
2223
|
+
controller: n.controller,
|
|
2224
|
+
children: n.children
|
|
2215
2225
|
})
|
|
2216
2226
|
});
|
|
2217
2227
|
};
|
|
@@ -2292,7 +2302,7 @@ class be {
|
|
|
2292
2302
|
return this.data.aiChat;
|
|
2293
2303
|
}
|
|
2294
2304
|
}
|
|
2295
|
-
class
|
|
2305
|
+
class Ve {
|
|
2296
2306
|
constructor(e) {
|
|
2297
2307
|
this.material = e;
|
|
2298
2308
|
}
|
|
@@ -2309,450 +2319,457 @@ class We {
|
|
|
2309
2319
|
return this.material.data;
|
|
2310
2320
|
}
|
|
2311
2321
|
}
|
|
2312
|
-
const
|
|
2322
|
+
const Q = new $("chat-toolbar"), Ke = (n) => {
|
|
2313
2323
|
const {
|
|
2314
2324
|
controller: e,
|
|
2315
2325
|
items: t = [],
|
|
2316
|
-
data:
|
|
2326
|
+
data: i,
|
|
2317
2327
|
type: s,
|
|
2318
2328
|
className: o
|
|
2319
|
-
} =
|
|
2329
|
+
} = n;
|
|
2320
2330
|
let r = [], a = "default";
|
|
2321
2331
|
const u = [{
|
|
2322
2332
|
label: "新建对话",
|
|
2323
2333
|
title: "新建对话",
|
|
2324
|
-
icon: () => c(
|
|
2334
|
+
icon: () => c(Kn, {}),
|
|
2325
2335
|
onClick: () => {
|
|
2326
2336
|
e.newDialogue();
|
|
2327
2337
|
}
|
|
2328
|
-
}],
|
|
2338
|
+
}], f = H(() => n.controller.materials.value.length > 0), d = [{
|
|
2329
2339
|
label: "刷新",
|
|
2330
2340
|
title: "刷新",
|
|
2331
|
-
icon: () => c(
|
|
2341
|
+
icon: () => c(gt, {}),
|
|
2332
2342
|
onClick: () => {
|
|
2333
|
-
e.refreshMessage(
|
|
2343
|
+
e.refreshMessage(i);
|
|
2334
2344
|
}
|
|
2335
2345
|
}, {
|
|
2336
2346
|
label: "删除",
|
|
2337
2347
|
title: "删除",
|
|
2338
|
-
icon: () => c(
|
|
2348
|
+
icon: () => c(qn, {}),
|
|
2339
2349
|
onClick: () => {
|
|
2340
|
-
e.deleteMessage(
|
|
2350
|
+
e.deleteMessage(i);
|
|
2341
2351
|
}
|
|
2342
2352
|
}, {
|
|
2343
2353
|
label: "复制",
|
|
2344
2354
|
title: "复制",
|
|
2345
|
-
icon: () => c(
|
|
2355
|
+
icon: () => c(Yn, {}),
|
|
2346
2356
|
onClick: () => {
|
|
2347
|
-
e.copyMessage(
|
|
2357
|
+
e.copyMessage(i);
|
|
2348
2358
|
}
|
|
2349
2359
|
}];
|
|
2350
|
-
|
|
2360
|
+
sn(st).enableBackFill && d.unshift({
|
|
2351
2361
|
label: "回填",
|
|
2352
2362
|
title: "回填",
|
|
2353
|
-
icon: () => c(
|
|
2363
|
+
icon: () => c(Vn, {}),
|
|
2354
2364
|
onClick: () => {
|
|
2355
|
-
e.backfill(
|
|
2365
|
+
e.backfill(i);
|
|
2356
2366
|
}
|
|
2357
2367
|
});
|
|
2358
|
-
const
|
|
2368
|
+
const _ = [{
|
|
2359
2369
|
label: "刷新",
|
|
2360
2370
|
title: "刷新",
|
|
2361
|
-
icon: () => c(
|
|
2371
|
+
icon: () => c(gt, {}),
|
|
2362
2372
|
onClick: () => {
|
|
2363
|
-
e.refreshMessage(
|
|
2373
|
+
e.refreshMessage(i, !0);
|
|
2364
2374
|
}
|
|
2365
2375
|
}];
|
|
2366
2376
|
if (s === "content")
|
|
2367
|
-
switch (a = "circle",
|
|
2377
|
+
switch (a = "circle", i.type) {
|
|
2368
2378
|
case "DEFAULT":
|
|
2369
|
-
|
|
2379
|
+
i.role === "ASSISTANT" ? r = [...d, ...t] : r = [..._];
|
|
2370
2380
|
break;
|
|
2371
2381
|
case "ERROR":
|
|
2372
|
-
r = [...
|
|
2382
|
+
r = [...d, ...t];
|
|
2373
2383
|
break;
|
|
2374
2384
|
}
|
|
2375
2385
|
else
|
|
2376
2386
|
r = [...u, ...t];
|
|
2377
|
-
const
|
|
2378
|
-
if (
|
|
2387
|
+
const g = (m) => typeof m.hidden == "function" ? m.hidden(i) : m.hidden === !0, h = (m) => typeof m.disabled == "function" ? m.disabled(i) : m.disabled === !0, p = (m, y) => {
|
|
2388
|
+
if (h(y))
|
|
2379
2389
|
return;
|
|
2380
|
-
const
|
|
2381
|
-
...
|
|
2390
|
+
const T = {
|
|
2391
|
+
...i
|
|
2382
2392
|
};
|
|
2383
|
-
if (
|
|
2393
|
+
if (i instanceof ie && (Object.assign(T, {
|
|
2384
2394
|
topic: e.topic
|
|
2385
|
-
}),
|
|
2386
|
-
y.onClick(
|
|
2395
|
+
}), T.msg.realcontent = i.realcontent), y.onClick && typeof y.onClick == "function")
|
|
2396
|
+
y.onClick(m, y, e.context, e.params, T);
|
|
2387
2397
|
else {
|
|
2388
|
-
const
|
|
2389
|
-
|
|
2398
|
+
const C = n.controller.opts.extendToolbarClick;
|
|
2399
|
+
C && typeof C == "function" && C(m, y, e.context, e.params, T);
|
|
2390
2400
|
}
|
|
2391
|
-
}, v =
|
|
2401
|
+
}, v = P(() => 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]);
|
|
2392
2402
|
return c("div", {
|
|
2393
|
-
className: "".concat(
|
|
2394
|
-
children: r.map((
|
|
2395
|
-
var
|
|
2396
|
-
if (!
|
|
2403
|
+
className: "".concat(Q.b(), " ").concat(Q.is("has-materials", f.value), " ").concat(Q.e(a), " ").concat(o || ""),
|
|
2404
|
+
children: r.map((m, y) => {
|
|
2405
|
+
var T, C, S;
|
|
2406
|
+
if (!g(m))
|
|
2397
2407
|
return c("div", {
|
|
2398
|
-
className: "".concat(
|
|
2399
|
-
title:
|
|
2400
|
-
onClick: (
|
|
2408
|
+
className: "".concat(Q.e("item"), " ").concat(Q.is("disabled", h(m) || v), " ").concat(o || ""),
|
|
2409
|
+
title: m.title,
|
|
2410
|
+
onClick: (A) => p(A, m),
|
|
2401
2411
|
children: [c("div", {
|
|
2402
|
-
className: "".concat(
|
|
2403
|
-
children: typeof
|
|
2404
|
-
children: (
|
|
2405
|
-
className:
|
|
2406
|
-
}) : (
|
|
2412
|
+
className: "".concat(Q.em("item", "icon")),
|
|
2413
|
+
children: typeof m.icon == "function" ? m.icon() : ((T = m.icon) == null ? void 0 : T.showIcon) && c(V, {
|
|
2414
|
+
children: (C = m.icon) != null && C.cssClass ? c("i", {
|
|
2415
|
+
className: m.icon.cssClass
|
|
2416
|
+
}) : (S = m.icon) != null && S.imagePath ? tt(m.icon.imagePath) ? c("div", {
|
|
2407
2417
|
dangerouslySetInnerHTML: {
|
|
2408
|
-
__html:
|
|
2418
|
+
__html: m.icon.imagePath
|
|
2409
2419
|
}
|
|
2410
2420
|
}) : c("img", {
|
|
2411
|
-
src:
|
|
2421
|
+
src: m.icon.imagePath
|
|
2412
2422
|
}) : null
|
|
2413
2423
|
})
|
|
2414
2424
|
}), c("div", {
|
|
2415
|
-
className: "".concat(
|
|
2416
|
-
children:
|
|
2425
|
+
className: "".concat(Q.em("item", "label")),
|
|
2426
|
+
children: m.label
|
|
2417
2427
|
})]
|
|
2418
2428
|
}, y);
|
|
2419
2429
|
})
|
|
2420
2430
|
});
|
|
2421
2431
|
};
|
|
2422
|
-
function
|
|
2432
|
+
function gi(n, e) {
|
|
2423
2433
|
let t = null;
|
|
2424
|
-
return function(...
|
|
2434
|
+
return function(...i) {
|
|
2425
2435
|
t || (t = setTimeout(() => {
|
|
2426
|
-
|
|
2436
|
+
n.apply(this, i), t = null;
|
|
2427
2437
|
}, e));
|
|
2428
2438
|
};
|
|
2429
2439
|
}
|
|
2430
|
-
const
|
|
2431
|
-
const e =
|
|
2440
|
+
const wi = (n) => {
|
|
2441
|
+
const e = U(!1), t = U({}), i = new $("chat-back-bottom"), s = U(null), o = () => {
|
|
2432
2442
|
if (s.value) {
|
|
2433
|
-
const u =
|
|
2434
|
-
e.value =
|
|
2443
|
+
const u = n.visibilityHeight || 200, f = s.value.scrollHeight - s.value.scrollTop - s.value.offsetHeight;
|
|
2444
|
+
e.value = f >= u;
|
|
2435
2445
|
}
|
|
2436
2446
|
}, r = () => {
|
|
2437
2447
|
s.value && s.value.scrollTo({
|
|
2438
2448
|
top: s.value.scrollHeight,
|
|
2439
2449
|
behavior: "smooth"
|
|
2440
2450
|
});
|
|
2441
|
-
}, a =
|
|
2442
|
-
return
|
|
2451
|
+
}, a = gi(o, 300);
|
|
2452
|
+
return P(() => {
|
|
2443
2453
|
t.value = {
|
|
2444
|
-
right: "".concat(
|
|
2445
|
-
bottom: "".concat(
|
|
2454
|
+
right: "".concat(n.right, "px"),
|
|
2455
|
+
bottom: "".concat(n.bottom, "px")
|
|
2446
2456
|
};
|
|
2447
|
-
}, [
|
|
2457
|
+
}, [n.right, n.bottom]), O(() => {
|
|
2448
2458
|
var u;
|
|
2449
|
-
if (
|
|
2450
|
-
const
|
|
2451
|
-
|
|
2459
|
+
if (n.target) {
|
|
2460
|
+
const f = (u = document.querySelector(n.target)) != null ? u : void 0;
|
|
2461
|
+
f && (s.value = f, f.addEventListener("scroll", a), o());
|
|
2452
2462
|
}
|
|
2453
2463
|
}, []), c("div", {
|
|
2454
|
-
className: "".concat(
|
|
2464
|
+
className: "".concat(i.b(), " ").concat(i.is("visible", e.value)),
|
|
2455
2465
|
style: t.value,
|
|
2456
2466
|
onClick: r,
|
|
2457
|
-
children: c(
|
|
2458
|
-
className:
|
|
2467
|
+
children: c(ci, {
|
|
2468
|
+
className: i.e("icon")
|
|
2459
2469
|
})
|
|
2460
2470
|
});
|
|
2461
2471
|
};
|
|
2462
|
-
const
|
|
2463
|
-
const e =
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2472
|
+
const bt = new $("chat-messages"), yt = (n) => {
|
|
2473
|
+
const e = B(null), t = n.controller.messages, i = B(!1), s = () => {
|
|
2474
|
+
const r = e.current;
|
|
2475
|
+
r && (i.current || r.scrollTo({
|
|
2476
|
+
top: r.scrollHeight,
|
|
2477
|
+
behavior: "smooth"
|
|
2478
|
+
}));
|
|
2479
|
+
};
|
|
2480
|
+
Fn(() => {
|
|
2481
|
+
t.value.length !== 0 && (t.value[t.value.length - 1].role === "USER" ? (i.current = !1, setTimeout(() => {
|
|
2482
|
+
s();
|
|
2483
|
+
}, 100)) : s());
|
|
2467
2484
|
});
|
|
2468
|
-
const
|
|
2469
|
-
const
|
|
2470
|
-
if (!
|
|
2485
|
+
const o = () => {
|
|
2486
|
+
const r = e.current;
|
|
2487
|
+
if (!r)
|
|
2471
2488
|
return;
|
|
2472
2489
|
const {
|
|
2473
|
-
scrollTop:
|
|
2474
|
-
scrollHeight:
|
|
2475
|
-
clientHeight:
|
|
2476
|
-
} =
|
|
2477
|
-
|
|
2490
|
+
scrollTop: a,
|
|
2491
|
+
scrollHeight: u,
|
|
2492
|
+
clientHeight: f
|
|
2493
|
+
} = r;
|
|
2494
|
+
u - (a + f) < 50 ? i.current = !1 : i.current = !0;
|
|
2478
2495
|
};
|
|
2479
2496
|
return c("div", {
|
|
2480
2497
|
ref: e,
|
|
2481
|
-
className:
|
|
2482
|
-
onScroll:
|
|
2483
|
-
children: [t.value.map((
|
|
2484
|
-
var
|
|
2485
|
-
const
|
|
2486
|
-
return
|
|
2487
|
-
size:
|
|
2488
|
-
message:
|
|
2489
|
-
controller:
|
|
2490
|
-
children: c(
|
|
2491
|
-
data:
|
|
2498
|
+
className: bt.b(),
|
|
2499
|
+
onScroll: o,
|
|
2500
|
+
children: [t.value.map((r) => {
|
|
2501
|
+
var u;
|
|
2502
|
+
const a = ((u = r.content) == null ? void 0 : u.length) || 0;
|
|
2503
|
+
return r.role !== "SYSTEM" ? c(mi, {
|
|
2504
|
+
size: a,
|
|
2505
|
+
message: r,
|
|
2506
|
+
controller: n.controller,
|
|
2507
|
+
children: c(Ke, {
|
|
2508
|
+
data: r,
|
|
2492
2509
|
type: "content",
|
|
2493
|
-
items:
|
|
2494
|
-
controller:
|
|
2510
|
+
items: n.toolbarItems,
|
|
2511
|
+
controller: n.controller
|
|
2495
2512
|
})
|
|
2496
|
-
},
|
|
2497
|
-
}), c(
|
|
2513
|
+
}, r.messageid) : null;
|
|
2514
|
+
}), c(wi, {
|
|
2498
2515
|
right: 20,
|
|
2499
2516
|
bottom: 14,
|
|
2500
|
-
target: ".".concat(
|
|
2517
|
+
target: ".".concat(bt.b())
|
|
2501
2518
|
})]
|
|
2502
2519
|
});
|
|
2503
2520
|
};
|
|
2504
|
-
function
|
|
2521
|
+
function bi(n, e) {
|
|
2505
2522
|
for (var t in e)
|
|
2506
|
-
|
|
2507
|
-
return
|
|
2523
|
+
n[t] = e[t];
|
|
2524
|
+
return n;
|
|
2508
2525
|
}
|
|
2509
|
-
function
|
|
2510
|
-
for (var t in
|
|
2526
|
+
function Ct(n, e) {
|
|
2527
|
+
for (var t in n)
|
|
2511
2528
|
if (t !== "__source" && !(t in e))
|
|
2512
2529
|
return !0;
|
|
2513
|
-
for (var
|
|
2514
|
-
if (
|
|
2530
|
+
for (var i in e)
|
|
2531
|
+
if (i !== "__source" && n[i] !== e[i])
|
|
2515
2532
|
return !0;
|
|
2516
2533
|
return !1;
|
|
2517
2534
|
}
|
|
2518
|
-
function
|
|
2519
|
-
this.props =
|
|
2535
|
+
function Tt(n) {
|
|
2536
|
+
this.props = n;
|
|
2520
2537
|
}
|
|
2521
|
-
(
|
|
2522
|
-
return
|
|
2538
|
+
(Tt.prototype = new L()).isPureReactComponent = !0, Tt.prototype.shouldComponentUpdate = function(n, e) {
|
|
2539
|
+
return Ct(this.props, n) || Ct(this.state, e);
|
|
2523
2540
|
};
|
|
2524
|
-
var
|
|
2525
|
-
|
|
2526
|
-
|
|
2541
|
+
var xt = w.__b;
|
|
2542
|
+
w.__b = function(n) {
|
|
2543
|
+
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), xt && xt(n);
|
|
2527
2544
|
};
|
|
2528
|
-
var
|
|
2529
|
-
|
|
2530
|
-
if (
|
|
2545
|
+
var yi = w.__e;
|
|
2546
|
+
w.__e = function(n, e, t, i) {
|
|
2547
|
+
if (n.then) {
|
|
2531
2548
|
for (var s, o = e; o = o.__; )
|
|
2532
2549
|
if ((s = o.__c) && s.__c)
|
|
2533
|
-
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(
|
|
2550
|
+
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(n, e);
|
|
2534
2551
|
}
|
|
2535
|
-
|
|
2552
|
+
yi(n, e, t, i);
|
|
2536
2553
|
};
|
|
2537
|
-
var
|
|
2538
|
-
function
|
|
2539
|
-
return
|
|
2540
|
-
typeof
|
|
2541
|
-
}),
|
|
2542
|
-
return
|
|
2543
|
-
})),
|
|
2554
|
+
var St = w.unmount;
|
|
2555
|
+
function _n(n, e, t) {
|
|
2556
|
+
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
|
|
2557
|
+
typeof i.__c == "function" && i.__c();
|
|
2558
|
+
}), n.__c.__H = null), (n = bi({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c = null), n.__k = n.__k && n.__k.map(function(i) {
|
|
2559
|
+
return _n(i, e, t);
|
|
2560
|
+
})), n;
|
|
2544
2561
|
}
|
|
2545
|
-
function
|
|
2546
|
-
return
|
|
2547
|
-
return
|
|
2548
|
-
}),
|
|
2562
|
+
function mn(n, e, t) {
|
|
2563
|
+
return n && t && (n.__v = null, n.__k = n.__k && n.__k.map(function(i) {
|
|
2564
|
+
return mn(i, e, t);
|
|
2565
|
+
}), n.__c && n.__c.__P === e && (n.__e && t.insertBefore(n.__e, n.__d), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
2549
2566
|
}
|
|
2550
|
-
function
|
|
2567
|
+
function je() {
|
|
2551
2568
|
this.__u = 0, this.t = null, this.__b = null;
|
|
2552
2569
|
}
|
|
2553
|
-
function
|
|
2554
|
-
var e =
|
|
2555
|
-
return e && e.__a && e.__a(
|
|
2570
|
+
function gn(n) {
|
|
2571
|
+
var e = n.__.__c;
|
|
2572
|
+
return e && e.__a && e.__a(n);
|
|
2556
2573
|
}
|
|
2557
2574
|
function ye() {
|
|
2558
2575
|
this.u = null, this.o = null;
|
|
2559
2576
|
}
|
|
2560
|
-
|
|
2561
|
-
var e =
|
|
2562
|
-
e && e.__R && e.__R(), e &&
|
|
2563
|
-
}, (
|
|
2564
|
-
var t = e.__c,
|
|
2565
|
-
|
|
2566
|
-
var s =
|
|
2577
|
+
w.unmount = function(n) {
|
|
2578
|
+
var e = n.__c;
|
|
2579
|
+
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), St && St(n);
|
|
2580
|
+
}, (je.prototype = new L()).__c = function(n, e) {
|
|
2581
|
+
var t = e.__c, i = this;
|
|
2582
|
+
i.t == null && (i.t = []), i.t.push(t);
|
|
2583
|
+
var s = gn(i.__v), o = !1, r = function() {
|
|
2567
2584
|
o || (o = !0, t.__R = null, s ? s(a) : a());
|
|
2568
2585
|
};
|
|
2569
2586
|
t.__R = r;
|
|
2570
2587
|
var a = function() {
|
|
2571
|
-
if (!--
|
|
2572
|
-
if (
|
|
2573
|
-
var
|
|
2574
|
-
|
|
2588
|
+
if (!--i.__u) {
|
|
2589
|
+
if (i.state.__a) {
|
|
2590
|
+
var f = i.state.__a;
|
|
2591
|
+
i.__v.__k[0] = mn(f, f.__c.__P, f.__c.__O);
|
|
2575
2592
|
}
|
|
2576
2593
|
var d;
|
|
2577
|
-
for (
|
|
2594
|
+
for (i.setState({ __a: i.__b = null }); d = i.t.pop(); )
|
|
2578
2595
|
d.forceUpdate();
|
|
2579
2596
|
}
|
|
2580
2597
|
}, u = e.__h === !0;
|
|
2581
|
-
|
|
2582
|
-
},
|
|
2598
|
+
i.__u++ || u || i.setState({ __a: i.__b = i.__v.__k[0] }), n.then(r, r);
|
|
2599
|
+
}, je.prototype.componentWillUnmount = function() {
|
|
2583
2600
|
this.t = [];
|
|
2584
|
-
},
|
|
2601
|
+
}, je.prototype.render = function(n, e) {
|
|
2585
2602
|
if (this.__b) {
|
|
2586
2603
|
if (this.__v.__k) {
|
|
2587
|
-
var t = document.createElement("div"),
|
|
2588
|
-
this.__v.__k[0] =
|
|
2604
|
+
var t = document.createElement("div"), i = this.__v.__k[0].__c;
|
|
2605
|
+
this.__v.__k[0] = _n(this.__b, t, i.__O = i.__P);
|
|
2589
2606
|
}
|
|
2590
2607
|
this.__b = null;
|
|
2591
2608
|
}
|
|
2592
|
-
var s = e.__a &&
|
|
2593
|
-
return s && (s.__h = null), [
|
|
2609
|
+
var s = e.__a && W(V, null, n.fallback);
|
|
2610
|
+
return s && (s.__h = null), [W(V, null, e.__a ? null : n.children), s];
|
|
2594
2611
|
};
|
|
2595
|
-
var
|
|
2596
|
-
if (++t[1] === t[0] &&
|
|
2597
|
-
for (t =
|
|
2612
|
+
var kt = function(n, e, t) {
|
|
2613
|
+
if (++t[1] === t[0] && n.o.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.o.size))
|
|
2614
|
+
for (t = n.u; t; ) {
|
|
2598
2615
|
for (; t.length > 3; )
|
|
2599
2616
|
t.pop()();
|
|
2600
2617
|
if (t[1] < t[0])
|
|
2601
2618
|
break;
|
|
2602
|
-
|
|
2619
|
+
n.u = t = t[2];
|
|
2603
2620
|
}
|
|
2604
2621
|
};
|
|
2605
|
-
function
|
|
2622
|
+
function Ci(n) {
|
|
2606
2623
|
return this.getChildContext = function() {
|
|
2607
|
-
return
|
|
2608
|
-
},
|
|
2624
|
+
return n.context;
|
|
2625
|
+
}, n.children;
|
|
2609
2626
|
}
|
|
2610
|
-
function
|
|
2611
|
-
var e = this, t =
|
|
2627
|
+
function Ti(n) {
|
|
2628
|
+
var e = this, t = n.i;
|
|
2612
2629
|
e.componentWillUnmount = function() {
|
|
2613
|
-
|
|
2614
|
-
}, e.i && e.i !== t && e.componentWillUnmount(), e.l || (e.i = t, e.l = { nodeType: 1, parentNode: t, childNodes: [], appendChild: function(
|
|
2615
|
-
this.childNodes.push(
|
|
2616
|
-
}, insertBefore: function(
|
|
2617
|
-
this.childNodes.push(
|
|
2618
|
-
}, removeChild: function(
|
|
2619
|
-
this.childNodes.splice(this.childNodes.indexOf(
|
|
2620
|
-
} }),
|
|
2630
|
+
se(null, e.l), e.l = null, e.i = null;
|
|
2631
|
+
}, e.i && e.i !== t && e.componentWillUnmount(), e.l || (e.i = t, e.l = { nodeType: 1, parentNode: t, childNodes: [], appendChild: function(i) {
|
|
2632
|
+
this.childNodes.push(i), e.i.appendChild(i);
|
|
2633
|
+
}, insertBefore: function(i, s) {
|
|
2634
|
+
this.childNodes.push(i), e.i.appendChild(i);
|
|
2635
|
+
}, removeChild: function(i) {
|
|
2636
|
+
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i);
|
|
2637
|
+
} }), se(W(Ci, { context: e.context }, n.__v), e.l);
|
|
2621
2638
|
}
|
|
2622
|
-
function
|
|
2623
|
-
var t =
|
|
2639
|
+
function xi(n, e) {
|
|
2640
|
+
var t = W(Ti, { __v: n, i: e });
|
|
2624
2641
|
return t.containerInfo = e, t;
|
|
2625
2642
|
}
|
|
2626
|
-
(ye.prototype = new
|
|
2627
|
-
var e = this, t =
|
|
2628
|
-
return
|
|
2643
|
+
(ye.prototype = new L()).__a = function(n) {
|
|
2644
|
+
var e = this, t = gn(e.__v), i = e.o.get(n);
|
|
2645
|
+
return i[0]++, function(s) {
|
|
2629
2646
|
var o = function() {
|
|
2630
|
-
e.props.revealOrder ? (
|
|
2647
|
+
e.props.revealOrder ? (i.push(s), kt(e, n, i)) : s();
|
|
2631
2648
|
};
|
|
2632
2649
|
t ? t(o) : o();
|
|
2633
2650
|
};
|
|
2634
|
-
}, ye.prototype.render = function(
|
|
2651
|
+
}, ye.prototype.render = function(n) {
|
|
2635
2652
|
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
2636
|
-
var e =
|
|
2637
|
-
|
|
2653
|
+
var e = Ee(n.children);
|
|
2654
|
+
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
2638
2655
|
for (var t = e.length; t--; )
|
|
2639
2656
|
this.o.set(e[t], this.u = [1, 0, this.u]);
|
|
2640
|
-
return
|
|
2657
|
+
return n.children;
|
|
2641
2658
|
}, ye.prototype.componentDidUpdate = ye.prototype.componentDidMount = function() {
|
|
2642
|
-
var
|
|
2659
|
+
var n = this;
|
|
2643
2660
|
this.o.forEach(function(e, t) {
|
|
2644
|
-
|
|
2661
|
+
kt(n, t, e);
|
|
2645
2662
|
});
|
|
2646
2663
|
};
|
|
2647
|
-
var
|
|
2648
|
-
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(
|
|
2664
|
+
var Si = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, ki = /^(?: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]/, Ei = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Ni = /[A-Z0-9]/g, $i = typeof document < "u", Mi = function(n) {
|
|
2665
|
+
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
2649
2666
|
};
|
|
2650
|
-
|
|
2651
|
-
Object.defineProperty(
|
|
2652
|
-
return this["UNSAFE_" +
|
|
2667
|
+
L.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
2668
|
+
Object.defineProperty(L.prototype, n, { configurable: !0, get: function() {
|
|
2669
|
+
return this["UNSAFE_" + n];
|
|
2653
2670
|
}, set: function(e) {
|
|
2654
|
-
Object.defineProperty(this,
|
|
2671
|
+
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
2655
2672
|
} });
|
|
2656
2673
|
});
|
|
2657
|
-
var
|
|
2658
|
-
function
|
|
2674
|
+
var Et = w.event;
|
|
2675
|
+
function Ii() {
|
|
2659
2676
|
}
|
|
2660
|
-
function
|
|
2677
|
+
function Ai() {
|
|
2661
2678
|
return this.cancelBubble;
|
|
2662
2679
|
}
|
|
2663
|
-
function
|
|
2680
|
+
function Di() {
|
|
2664
2681
|
return this.defaultPrevented;
|
|
2665
2682
|
}
|
|
2666
|
-
|
|
2667
|
-
return
|
|
2683
|
+
w.event = function(n) {
|
|
2684
|
+
return Et && (n = Et(n)), n.persist = Ii, n.isPropagationStopped = Ai, n.isDefaultPrevented = Di, n.nativeEvent = n;
|
|
2668
2685
|
};
|
|
2669
|
-
var
|
|
2686
|
+
var zi = { enumerable: !1, configurable: !0, get: function() {
|
|
2670
2687
|
return this.class;
|
|
2671
|
-
} },
|
|
2672
|
-
|
|
2673
|
-
typeof
|
|
2674
|
-
var t = e.props,
|
|
2688
|
+
} }, Nt = w.vnode;
|
|
2689
|
+
w.vnode = function(n) {
|
|
2690
|
+
typeof n.type == "string" && function(e) {
|
|
2691
|
+
var t = e.props, i = e.type, s = {};
|
|
2675
2692
|
for (var o in t) {
|
|
2676
2693
|
var r = t[o];
|
|
2677
|
-
if (!(o === "value" && "defaultValue" in t && r == null ||
|
|
2694
|
+
if (!(o === "value" && "defaultValue" in t && r == null || $i && o === "children" && i === "noscript" || o === "class" || o === "className")) {
|
|
2678
2695
|
var a = o.toLowerCase();
|
|
2679
|
-
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && r === !0 ? r = "" : a === "ondoubleclick" ? o = "ondblclick" : a !== "onchange" ||
|
|
2696
|
+
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && r === !0 ? r = "" : a === "ondoubleclick" ? o = "ondblclick" : a !== "onchange" || i !== "input" && i !== "textarea" || Mi(t.type) ? a === "onfocus" ? o = "onfocusin" : a === "onblur" ? o = "onfocusout" : Ei.test(o) ? o = a : i.indexOf("-") === -1 && ki.test(o) ? o = o.replace(Ni, "-$&").toLowerCase() : r === null && (r = void 0) : a = o = "oninput", a === "oninput" && s[o = a] && (o = "oninputCapture"), s[o] = r;
|
|
2680
2697
|
}
|
|
2681
2698
|
}
|
|
2682
|
-
|
|
2699
|
+
i == "select" && s.multiple && Array.isArray(s.value) && (s.value = Ee(t.children).forEach(function(u) {
|
|
2683
2700
|
u.props.selected = s.value.indexOf(u.props.value) != -1;
|
|
2684
|
-
})),
|
|
2701
|
+
})), i == "select" && s.defaultValue != null && (s.value = Ee(t.children).forEach(function(u) {
|
|
2685
2702
|
u.props.selected = s.multiple ? s.defaultValue.indexOf(u.props.value) != -1 : s.defaultValue == u.props.value;
|
|
2686
|
-
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className",
|
|
2687
|
-
}(
|
|
2703
|
+
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", zi)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
|
|
2704
|
+
}(n), n.$$typeof = Si, Nt && Nt(n);
|
|
2688
2705
|
};
|
|
2689
|
-
var
|
|
2690
|
-
|
|
2691
|
-
|
|
2706
|
+
var $t = w.__r;
|
|
2707
|
+
w.__r = function(n) {
|
|
2708
|
+
$t && $t(n), n.__c;
|
|
2692
2709
|
};
|
|
2693
|
-
var
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
var e =
|
|
2697
|
-
t != null &&
|
|
2710
|
+
var Mt = w.diffed;
|
|
2711
|
+
w.diffed = function(n) {
|
|
2712
|
+
Mt && Mt(n);
|
|
2713
|
+
var e = n.props, t = n.__e;
|
|
2714
|
+
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
2698
2715
|
};
|
|
2699
|
-
var
|
|
2700
|
-
function
|
|
2701
|
-
var e =
|
|
2716
|
+
var pe = /* @__PURE__ */ new Map();
|
|
2717
|
+
function Hi(n) {
|
|
2718
|
+
var e = pe.get(n);
|
|
2702
2719
|
e && e.destroy();
|
|
2703
2720
|
}
|
|
2704
|
-
function
|
|
2705
|
-
var e =
|
|
2721
|
+
function Li(n) {
|
|
2722
|
+
var e = pe.get(n);
|
|
2706
2723
|
e && e.update();
|
|
2707
2724
|
}
|
|
2708
|
-
var
|
|
2709
|
-
typeof window > "u" ? ((
|
|
2710
|
-
return
|
|
2711
|
-
}).destroy = function(
|
|
2712
|
-
return
|
|
2713
|
-
},
|
|
2714
|
-
return
|
|
2715
|
-
}) : ((
|
|
2716
|
-
return
|
|
2717
|
-
return function(
|
|
2718
|
-
if (
|
|
2719
|
-
var s, o = null, r = window.getComputedStyle(
|
|
2720
|
-
|
|
2725
|
+
var de = null;
|
|
2726
|
+
typeof window > "u" ? ((de = function(n) {
|
|
2727
|
+
return n;
|
|
2728
|
+
}).destroy = function(n) {
|
|
2729
|
+
return n;
|
|
2730
|
+
}, de.update = function(n) {
|
|
2731
|
+
return n;
|
|
2732
|
+
}) : ((de = function(n, e) {
|
|
2733
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], function(t) {
|
|
2734
|
+
return function(i) {
|
|
2735
|
+
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !pe.has(i)) {
|
|
2736
|
+
var s, o = null, r = window.getComputedStyle(i), a = (s = i.value, function() {
|
|
2737
|
+
f({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
|
|
2721
2738
|
}), u = (function(l) {
|
|
2722
|
-
|
|
2723
|
-
return
|
|
2724
|
-
}),
|
|
2725
|
-
}).bind(
|
|
2726
|
-
|
|
2739
|
+
i.removeEventListener("autosize:destroy", u), i.removeEventListener("autosize:update", d), i.removeEventListener("input", a), window.removeEventListener("resize", d), Object.keys(l).forEach(function(_) {
|
|
2740
|
+
return i.style[_] = l[_];
|
|
2741
|
+
}), pe.delete(i);
|
|
2742
|
+
}).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 });
|
|
2743
|
+
i.addEventListener("autosize:destroy", u), i.addEventListener("autosize:update", d), i.addEventListener("input", a), window.addEventListener("resize", d), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", pe.set(i, { destroy: u, update: d }), d();
|
|
2727
2744
|
}
|
|
2728
|
-
function
|
|
2729
|
-
var _,
|
|
2730
|
-
if (
|
|
2731
|
-
for (var S = [];
|
|
2732
|
-
|
|
2745
|
+
function f(l) {
|
|
2746
|
+
var _, g, h = l.restoreTextAlign, p = h === void 0 ? null : h, v = l.testForHeightReduction, m = v === void 0 || v, y = r.overflowY;
|
|
2747
|
+
if (i.scrollHeight !== 0 && (r.resize === "vertical" ? i.style.resize = "none" : r.resize === "both" && (i.style.resize = "horizontal"), m && (_ = function(C) {
|
|
2748
|
+
for (var S = []; C && C.parentNode && C.parentNode instanceof Element; )
|
|
2749
|
+
C.parentNode.scrollTop && S.push([C.parentNode, C.parentNode.scrollTop]), C = C.parentNode;
|
|
2733
2750
|
return function() {
|
|
2734
|
-
return S.forEach(function(
|
|
2735
|
-
var
|
|
2736
|
-
|
|
2751
|
+
return S.forEach(function(A) {
|
|
2752
|
+
var D = A[0], R = A[1];
|
|
2753
|
+
D.style.scrollBehavior = "auto", D.scrollTop = R, D.style.scrollBehavior = null;
|
|
2737
2754
|
});
|
|
2738
2755
|
};
|
|
2739
|
-
}(
|
|
2740
|
-
var
|
|
2741
|
-
r.overflow === "hidden" && (
|
|
2756
|
+
}(i), i.style.height = ""), g = r.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(r.paddingTop) + parseFloat(r.paddingBottom)) : i.scrollHeight + parseFloat(r.borderTopWidth) + parseFloat(r.borderBottomWidth), r.maxHeight !== "none" && g > parseFloat(r.maxHeight) ? (r.overflowY === "hidden" && (i.style.overflow = "scroll"), g = parseFloat(r.maxHeight)) : r.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = g + "px", p && (i.style.textAlign = p), _ && _(), o !== g && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), o = g), y !== r.overflow && !p)) {
|
|
2757
|
+
var T = r.textAlign;
|
|
2758
|
+
r.overflow === "hidden" && (i.style.textAlign = T === "start" ? "end" : "start"), f({ restoreTextAlign: T, testForHeightReduction: !0 });
|
|
2742
2759
|
}
|
|
2743
2760
|
}
|
|
2744
2761
|
function d() {
|
|
2745
|
-
|
|
2762
|
+
f({ testForHeightReduction: !0, restoreTextAlign: null });
|
|
2746
2763
|
}
|
|
2747
2764
|
}(t);
|
|
2748
|
-
}),
|
|
2749
|
-
}).destroy = function(
|
|
2750
|
-
return
|
|
2751
|
-
},
|
|
2752
|
-
return
|
|
2765
|
+
}), n;
|
|
2766
|
+
}).destroy = function(n) {
|
|
2767
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], Hi), n;
|
|
2768
|
+
}, de.update = function(n) {
|
|
2769
|
+
return n && Array.prototype.forEach.call(n.length ? n : [n], Li), n;
|
|
2753
2770
|
});
|
|
2754
|
-
var
|
|
2755
|
-
class
|
|
2771
|
+
var It = de, M = /* @__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))(M || {});
|
|
2772
|
+
class At {
|
|
2756
2773
|
/**
|
|
2757
2774
|
* 聊天窗触发提问回调
|
|
2758
2775
|
*
|
|
@@ -2778,7 +2795,7 @@ class Mt {
|
|
|
2778
2795
|
* @date 2023-10-16 16:10:29
|
|
2779
2796
|
* @type {Signal<ChatMessage[]>}
|
|
2780
2797
|
*/
|
|
2781
|
-
|
|
2798
|
+
x(this, "messages", X([]));
|
|
2782
2799
|
/**
|
|
2783
2800
|
* 素材列表
|
|
2784
2801
|
*
|
|
@@ -2786,7 +2803,7 @@ class Mt {
|
|
|
2786
2803
|
* @date 2025-02-27 18:02:46
|
|
2787
2804
|
* @type {Signal<IMaterial[]>}
|
|
2788
2805
|
*/
|
|
2789
|
-
|
|
2806
|
+
x(this, "materials", X([]));
|
|
2790
2807
|
/**
|
|
2791
2808
|
* 聊天框输入值
|
|
2792
2809
|
*
|
|
@@ -2794,7 +2811,7 @@ class Mt {
|
|
|
2794
2811
|
* @date 2023-10-16 15:10:43
|
|
2795
2812
|
* @type {Signal<string>}
|
|
2796
2813
|
*/
|
|
2797
|
-
|
|
2814
|
+
x(this, "input", X(""));
|
|
2798
2815
|
/**
|
|
2799
2816
|
* 是否加载中
|
|
2800
2817
|
*
|
|
@@ -2802,7 +2819,7 @@ class Mt {
|
|
|
2802
2819
|
* @date 2025-03-10 18:03:42
|
|
2803
2820
|
* @type {Signal<boolean>}
|
|
2804
2821
|
*/
|
|
2805
|
-
|
|
2822
|
+
x(this, "isLoading", X(!1));
|
|
2806
2823
|
/**
|
|
2807
2824
|
* 视图参数
|
|
2808
2825
|
*
|
|
@@ -2810,7 +2827,7 @@ class Mt {
|
|
|
2810
2827
|
* @date 2025-02-24 14:02:23
|
|
2811
2828
|
* @type {object}
|
|
2812
2829
|
*/
|
|
2813
|
-
|
|
2830
|
+
x(this, "context");
|
|
2814
2831
|
/**
|
|
2815
2832
|
* 视图参数
|
|
2816
2833
|
*
|
|
@@ -2818,7 +2835,7 @@ class Mt {
|
|
|
2818
2835
|
* @date 2025-02-24 14:02:32
|
|
2819
2836
|
* @type {object}
|
|
2820
2837
|
*/
|
|
2821
|
-
|
|
2838
|
+
x(this, "params");
|
|
2822
2839
|
/**
|
|
2823
2840
|
* 应用实体标记
|
|
2824
2841
|
*
|
|
@@ -2826,7 +2843,7 @@ class Mt {
|
|
|
2826
2843
|
* @date 2025-02-24 14:02:10
|
|
2827
2844
|
* @type {string}
|
|
2828
2845
|
*/
|
|
2829
|
-
|
|
2846
|
+
x(this, "appDataEntityId");
|
|
2830
2847
|
/**
|
|
2831
2848
|
* 话题标识
|
|
2832
2849
|
*
|
|
@@ -2834,7 +2851,7 @@ class Mt {
|
|
|
2834
2851
|
* @date 2025-02-24 18:02:02
|
|
2835
2852
|
* @type {(string | undefined)}
|
|
2836
2853
|
*/
|
|
2837
|
-
|
|
2854
|
+
x(this, "topicId");
|
|
2838
2855
|
/**
|
|
2839
2856
|
* 话题数据
|
|
2840
2857
|
*
|
|
@@ -2842,7 +2859,7 @@ class Mt {
|
|
|
2842
2859
|
* @date 2025-03-10 16:03:26
|
|
2843
2860
|
* @type {(ITopic | undefined)}
|
|
2844
2861
|
*/
|
|
2845
|
-
|
|
2862
|
+
x(this, "topic");
|
|
2846
2863
|
this.opts = e, this.context = e.context, this.params = e.params, this.appDataEntityId = e.appDataEntityId, this.topicId = e.topicId, this.topic = e.topic, this.fecthHistory();
|
|
2847
2864
|
}
|
|
2848
2865
|
/**
|
|
@@ -2854,10 +2871,10 @@ class Mt {
|
|
|
2854
2871
|
*/
|
|
2855
2872
|
async fecthHistory() {
|
|
2856
2873
|
if (this.topicId) {
|
|
2857
|
-
const e = await
|
|
2874
|
+
const e = await Z.getData(M.DATA_BASE_NAME, M.DATA_TABLE_NAME, this.topicId);
|
|
2858
2875
|
if (e && e.data && e.data.length > 0)
|
|
2859
2876
|
return e.data.forEach((t) => {
|
|
2860
|
-
const
|
|
2877
|
+
const i = {
|
|
2861
2878
|
messageid: t.messageid,
|
|
2862
2879
|
state: t.state,
|
|
2863
2880
|
type: t.type,
|
|
@@ -2865,7 +2882,7 @@ class Mt {
|
|
|
2865
2882
|
content: t.content,
|
|
2866
2883
|
completed: !0
|
|
2867
2884
|
};
|
|
2868
|
-
this.addMessage(
|
|
2885
|
+
this.addMessage(i);
|
|
2869
2886
|
}), !0;
|
|
2870
2887
|
}
|
|
2871
2888
|
return this.opts.history(this.context, this.params, {
|
|
@@ -2887,7 +2904,7 @@ class Mt {
|
|
|
2887
2904
|
data: this.messages.value.map((t) => t._origin),
|
|
2888
2905
|
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
2889
2906
|
};
|
|
2890
|
-
await
|
|
2907
|
+
await Z.updateData(M.DATA_BASE_NAME, M.DATA_TABLE_NAME, e);
|
|
2891
2908
|
}
|
|
2892
2909
|
/**
|
|
2893
2910
|
* 设置聊天框值
|
|
@@ -2907,7 +2924,7 @@ class Mt {
|
|
|
2907
2924
|
* @param {IMessage} data
|
|
2908
2925
|
*/
|
|
2909
2926
|
addMessage(e) {
|
|
2910
|
-
const t = this.messages.value.find((
|
|
2927
|
+
const t = this.messages.value.find((i) => i.messageid === e.messageid);
|
|
2911
2928
|
t ? (t.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ie(e)], this.asyncToIndexDB();
|
|
2912
2929
|
}
|
|
2913
2930
|
/**
|
|
@@ -2919,8 +2936,8 @@ class Mt {
|
|
|
2919
2936
|
* @param {boolean} completed
|
|
2920
2937
|
*/
|
|
2921
2938
|
completeMessage(e, t) {
|
|
2922
|
-
const
|
|
2923
|
-
|
|
2939
|
+
const i = this.messages.value.find((s) => s.messageid === e);
|
|
2940
|
+
i && (i.updateCompleted(t), this.messages.value = [...this.messages.value], this.asyncToIndexDB());
|
|
2924
2941
|
}
|
|
2925
2942
|
/**
|
|
2926
2943
|
* 替换已经存在的聊天消息
|
|
@@ -2930,7 +2947,7 @@ class Mt {
|
|
|
2930
2947
|
* @param {IChatMessage} data
|
|
2931
2948
|
*/
|
|
2932
2949
|
replaceMessage(e) {
|
|
2933
|
-
const t = this.messages.value.findIndex((
|
|
2950
|
+
const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
2934
2951
|
t !== -1 ? (this.messages.value[t] = new ie(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new ie(e)], this.asyncToIndexDB();
|
|
2935
2952
|
}
|
|
2936
2953
|
/**
|
|
@@ -2941,10 +2958,10 @@ class Mt {
|
|
|
2941
2958
|
* @param {IChatMessage} data
|
|
2942
2959
|
*/
|
|
2943
2960
|
stopMessage(e) {
|
|
2944
|
-
const t = this.messages.value.findIndex((
|
|
2961
|
+
const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
2945
2962
|
if (t !== -1) {
|
|
2946
|
-
const
|
|
2947
|
-
e.content =
|
|
2963
|
+
const i = this.messages.value[t];
|
|
2964
|
+
e.content = i.content, this.messages.value[t] = new ie(e), this.messages.value = [...this.messages.value];
|
|
2948
2965
|
} else
|
|
2949
2966
|
this.messages.value = [...this.messages.value, new ie(e)];
|
|
2950
2967
|
this.asyncToIndexDB();
|
|
@@ -2959,13 +2976,13 @@ class Mt {
|
|
|
2959
2976
|
stringlyMaterialResource() {
|
|
2960
2977
|
let e = "";
|
|
2961
2978
|
const t = [];
|
|
2962
|
-
return this.materials.value && this.materials.value.length > 0 && (this.materials.value.forEach((
|
|
2963
|
-
if (
|
|
2964
|
-
const s =
|
|
2965
|
-
s.state && s.state === "successed" && t.push(
|
|
2979
|
+
return this.materials.value && this.materials.value.length > 0 && (this.materials.value.forEach((i) => {
|
|
2980
|
+
if (i.type === "ossfile") {
|
|
2981
|
+
const s = i.metadata;
|
|
2982
|
+
s.state && s.state === "successed" && t.push(i);
|
|
2966
2983
|
} else
|
|
2967
|
-
t.push(
|
|
2968
|
-
}), this.materials.value = []), t && t.length > 0 && (e =
|
|
2984
|
+
t.push(i);
|
|
2985
|
+
}), this.materials.value = []), t && t.length > 0 && (e = en.stringify(t)), e;
|
|
2969
2986
|
}
|
|
2970
2987
|
/**
|
|
2971
2988
|
* 提问
|
|
@@ -2980,13 +2997,13 @@ class Mt {
|
|
|
2980
2997
|
let t = this.stringlyMaterialResource();
|
|
2981
2998
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
2982
2999
|
state: 30,
|
|
2983
|
-
messageid:
|
|
3000
|
+
messageid: Kt(),
|
|
2984
3001
|
role: "USER",
|
|
2985
3002
|
type: "DEFAULT",
|
|
2986
3003
|
content: t
|
|
2987
3004
|
}), await this.opts.question(this, this.context, this.params, {
|
|
2988
3005
|
appDataEntityId: this.appDataEntityId
|
|
2989
|
-
}, this.messages.value.filter((
|
|
3006
|
+
}, this.messages.value.filter((i) => i.type !== "ERROR").map((i) => i._origin)), this.opts.action && this.opts.action("question", e), this.isLoading.value = !1;
|
|
2990
3007
|
} finally {
|
|
2991
3008
|
this.isLoading.value = !1;
|
|
2992
3009
|
}
|
|
@@ -3022,7 +3039,7 @@ class Mt {
|
|
|
3022
3039
|
* @memberof AiChatController
|
|
3023
3040
|
*/
|
|
3024
3041
|
deleteMessage(e) {
|
|
3025
|
-
const t = this.messages.value.findIndex((
|
|
3042
|
+
const t = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
3026
3043
|
t !== -1 && (this.messages.value.splice(t, 1), this.messages.value = [...this.messages.value]), this.asyncToIndexDB(), this.opts.action && this.opts.action("deletemsg", e);
|
|
3027
3044
|
}
|
|
3028
3045
|
/**
|
|
@@ -3033,18 +3050,18 @@ class Mt {
|
|
|
3033
3050
|
async refreshMessage(e, t = !1) {
|
|
3034
3051
|
this.isLoading.value = !0;
|
|
3035
3052
|
try {
|
|
3036
|
-
const
|
|
3053
|
+
const i = this.messages.value.findIndex((s) => s.messageid === e.messageid);
|
|
3037
3054
|
if (t)
|
|
3038
|
-
this.messages.value.splice(
|
|
3055
|
+
this.messages.value.splice(i + 1, this.messages.value.length - i - 1), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
|
|
3039
3056
|
appDataEntityId: this.appDataEntityId
|
|
3040
3057
|
}, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
|
|
3041
|
-
else if (
|
|
3058
|
+
else if (i === this.messages.value.length - 1)
|
|
3042
3059
|
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(this, this.context, this.params, {
|
|
3043
3060
|
appDataEntityId: this.appDataEntityId
|
|
3044
3061
|
}, this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
|
|
3045
3062
|
else {
|
|
3046
|
-
const s = this.messages.value[
|
|
3047
|
-
this.messages.value.splice(
|
|
3063
|
+
const s = this.messages.value[i - 1].content;
|
|
3064
|
+
this.messages.value.splice(i - 1, 2), this.question(s);
|
|
3048
3065
|
}
|
|
3049
3066
|
this.asyncToIndexDB(), this.opts.action && this.opts.action("refreshmsg", e);
|
|
3050
3067
|
} finally {
|
|
@@ -3059,7 +3076,7 @@ class Mt {
|
|
|
3059
3076
|
*/
|
|
3060
3077
|
copyMessage(e) {
|
|
3061
3078
|
const t = e.realcontent;
|
|
3062
|
-
|
|
3079
|
+
Qt.copy(t), this.opts.action && this.opts.action("copymsg", e);
|
|
3063
3080
|
}
|
|
3064
3081
|
/**
|
|
3065
3082
|
* 新建对话
|
|
@@ -3067,7 +3084,7 @@ class Mt {
|
|
|
3067
3084
|
* @memberof AiChatController
|
|
3068
3085
|
*/
|
|
3069
3086
|
async newDialogue() {
|
|
3070
|
-
this.
|
|
3087
|
+
this.topicId && await Z.deleteData(M.DATA_BASE_NAME, M.DATA_TABLE_NAME, this.topicId), this.messages.value = [], this.opts.history(this.context, this.params, {
|
|
3071
3088
|
appDataEntityId: this.appDataEntityId
|
|
3072
3089
|
});
|
|
3073
3090
|
}
|
|
@@ -3079,7 +3096,7 @@ class Mt {
|
|
|
3079
3096
|
* @param {IMaterial} data
|
|
3080
3097
|
*/
|
|
3081
3098
|
addMaterial(e) {
|
|
3082
|
-
this.materials.value.find((
|
|
3099
|
+
this.materials.value.find((i) => i.id === e.id) ? this.materials.value = [...this.materials.value] : this.materials.value = [...this.materials.value, new Ve(e)];
|
|
3083
3100
|
}
|
|
3084
3101
|
/**
|
|
3085
3102
|
* 替换素材资源
|
|
@@ -3090,8 +3107,8 @@ class Mt {
|
|
|
3090
3107
|
* @param {IMaterial} data
|
|
3091
3108
|
*/
|
|
3092
3109
|
replaceMaterial(e, t) {
|
|
3093
|
-
const
|
|
3094
|
-
|
|
3110
|
+
const i = this.materials.value.findIndex((s) => s.id === e);
|
|
3111
|
+
i !== -1 ? (this.materials.value[i] = new Ve(t), this.materials.value = [...this.materials.value]) : this.materials.value = [...this.materials.value, new Ve(t)];
|
|
3095
3112
|
}
|
|
3096
3113
|
/**
|
|
3097
3114
|
* 删除指定素材资源
|
|
@@ -3101,11 +3118,11 @@ class Mt {
|
|
|
3101
3118
|
* @param {IMaterial} data
|
|
3102
3119
|
*/
|
|
3103
3120
|
deleteMaterial(e) {
|
|
3104
|
-
const t = this.materials.value.findIndex((
|
|
3121
|
+
const t = this.materials.value.findIndex((i) => i.id === e.id);
|
|
3105
3122
|
t !== -1 && (this.materials.value.splice(t, 1), this.materials.value = [...this.materials.value]);
|
|
3106
3123
|
}
|
|
3107
3124
|
}
|
|
3108
|
-
class
|
|
3125
|
+
class Oi {
|
|
3109
3126
|
/**
|
|
3110
3127
|
* Creates an instance of AiTopicController.
|
|
3111
3128
|
* @author tony001
|
|
@@ -3120,7 +3137,7 @@ class zn {
|
|
|
3120
3137
|
* @date 2025-02-20 16:02:38
|
|
3121
3138
|
* @type {Signal<ChatTopic[]>}
|
|
3122
3139
|
*/
|
|
3123
|
-
|
|
3140
|
+
x(this, "topics", X([]));
|
|
3124
3141
|
/**
|
|
3125
3142
|
* 激活话题
|
|
3126
3143
|
*
|
|
@@ -3128,7 +3145,7 @@ class zn {
|
|
|
3128
3145
|
* @date 2025-02-24 16:02:44
|
|
3129
3146
|
* @type {(Signal<ITopic | null>)}
|
|
3130
3147
|
*/
|
|
3131
|
-
|
|
3148
|
+
x(this, "activedTopic", X(null));
|
|
3132
3149
|
/**
|
|
3133
3150
|
* 当前话题配置备份
|
|
3134
3151
|
*
|
|
@@ -3137,7 +3154,7 @@ class zn {
|
|
|
3137
3154
|
* @public
|
|
3138
3155
|
* @type {(ITopicOptions | undefined)}
|
|
3139
3156
|
*/
|
|
3140
|
-
|
|
3157
|
+
x(this, "currentTopicOptions");
|
|
3141
3158
|
this.chat = e;
|
|
3142
3159
|
}
|
|
3143
3160
|
/**
|
|
@@ -3148,8 +3165,8 @@ class zn {
|
|
|
3148
3165
|
* @return {*} {Promise<void>}
|
|
3149
3166
|
*/
|
|
3150
3167
|
async fetchHistory(e) {
|
|
3151
|
-
const
|
|
3152
|
-
|
|
3168
|
+
const i = await e.configService(e.appid, "aitopics", e.type).load();
|
|
3169
|
+
i && i.length > 0 && i.forEach((s) => {
|
|
3153
3170
|
this.topics.value = [...this.topics.value, new be(s)];
|
|
3154
3171
|
});
|
|
3155
3172
|
}
|
|
@@ -3163,7 +3180,7 @@ class zn {
|
|
|
3163
3180
|
*/
|
|
3164
3181
|
async updateCurrentTopic(e) {
|
|
3165
3182
|
this.currentTopicOptions = e;
|
|
3166
|
-
const t = this.topics.value.findIndex((r) => r.id === e.id),
|
|
3183
|
+
const t = this.topics.value.findIndex((r) => r.id === e.id), i = new be(e);
|
|
3167
3184
|
t !== -1 ? this.topics.value.splice(t, 1, new be(e)) : this.topics.value = [...this.topics.value, new be(e)];
|
|
3168
3185
|
const s = this.topics.value.map((r) => ({
|
|
3169
3186
|
appid: r.appid,
|
|
@@ -3173,7 +3190,7 @@ class zn {
|
|
|
3173
3190
|
url: r.url,
|
|
3174
3191
|
aiChat: r.aiChat
|
|
3175
3192
|
})), o = e.configService(e.appid, "aitopics", e.type);
|
|
3176
|
-
await (o == null ? void 0 : o.save(s)), this.activedTopic.value =
|
|
3193
|
+
await (o == null ? void 0 : o.save(s)), this.activedTopic.value = i;
|
|
3177
3194
|
}
|
|
3178
3195
|
/**
|
|
3179
3196
|
* 删除话题
|
|
@@ -3187,10 +3204,10 @@ class zn {
|
|
|
3187
3204
|
* @param {MouseEvent} event
|
|
3188
3205
|
* @return {*} {Promise<void>}
|
|
3189
3206
|
*/
|
|
3190
|
-
async removeTopic(e, t,
|
|
3207
|
+
async removeTopic(e, t, i, s, o) {
|
|
3191
3208
|
var d;
|
|
3192
3209
|
let r = !0;
|
|
3193
|
-
if (e.beforeDelete && (r = await e.beforeDelete(t,
|
|
3210
|
+
if (e.beforeDelete && (r = await e.beforeDelete(t, i, s, o)), !r)
|
|
3194
3211
|
return;
|
|
3195
3212
|
const a = this.topics.value.findIndex((l) => l.id === s.id);
|
|
3196
3213
|
a !== -1 && (this.topics.value.splice(a, 1), this.topics.value = [...this.topics.value]);
|
|
@@ -3201,8 +3218,8 @@ class zn {
|
|
|
3201
3218
|
caption: l.caption,
|
|
3202
3219
|
url: l.url,
|
|
3203
3220
|
aiChat: l.aiChat
|
|
3204
|
-
})),
|
|
3205
|
-
await (
|
|
3221
|
+
})), f = e.configService(e.appid, "aitopics", e.type);
|
|
3222
|
+
await (f == null ? void 0 : f.save(u)), await Z.deleteData(M.DATA_BASE_NAME, M.DATA_TABLE_NAME, s.id), this.topics.value.length > 0 && s.id === ((d = this.activedTopic.value) == null ? void 0 : d.id) && this.handleTopicChange(this.topics.value[0]);
|
|
3206
3223
|
}
|
|
3207
3224
|
/**
|
|
3208
3225
|
* 处理选中变化
|
|
@@ -3225,7 +3242,7 @@ class zn {
|
|
|
3225
3242
|
* @param {MouseEvent} event
|
|
3226
3243
|
* @return {*} {Promise<void>}
|
|
3227
3244
|
*/
|
|
3228
|
-
async handleTopicAction(e, t,
|
|
3245
|
+
async handleTopicAction(e, t, i) {
|
|
3229
3246
|
var o, r;
|
|
3230
3247
|
const s = this.topics.value.find((a) => a.id === t.id);
|
|
3231
3248
|
if (this.currentTopicOptions && s && s.aiChat) {
|
|
@@ -3233,16 +3250,16 @@ class zn {
|
|
|
3233
3250
|
context: a,
|
|
3234
3251
|
params: u
|
|
3235
3252
|
} = s.aiChat;
|
|
3236
|
-
e === "DELETE" && await this.removeTopic(this.currentTopicOptions, a, u, s,
|
|
3253
|
+
e === "DELETE" && await this.removeTopic(this.currentTopicOptions, a, u, s, i), (r = (o = this.currentTopicOptions).action) == null || r.call(o, e, a, u, t, i);
|
|
3237
3254
|
}
|
|
3238
3255
|
}
|
|
3239
3256
|
}
|
|
3240
|
-
class
|
|
3257
|
+
class wn {
|
|
3241
3258
|
constructor(e) {
|
|
3242
3259
|
this.aiChat = e;
|
|
3243
3260
|
}
|
|
3244
3261
|
}
|
|
3245
|
-
class
|
|
3262
|
+
class Bi extends wn {
|
|
3246
3263
|
/**
|
|
3247
3264
|
* 执行操作
|
|
3248
3265
|
*
|
|
@@ -3251,15 +3268,15 @@ class Hn extends _i {
|
|
|
3251
3268
|
* @return {*} {Promise<void>}
|
|
3252
3269
|
*/
|
|
3253
3270
|
async excuteAction(e, t) {
|
|
3254
|
-
let
|
|
3271
|
+
let i;
|
|
3255
3272
|
if (t && t.onClick && typeof t.onClick == "function")
|
|
3256
|
-
|
|
3273
|
+
i = await t.onClick(e, t, this.aiChat.context, this.aiChat.params);
|
|
3257
3274
|
else {
|
|
3258
3275
|
const s = this.aiChat.opts.extendToolbarClick;
|
|
3259
|
-
s ?
|
|
3276
|
+
s ? i = await s(e, t, this.aiChat.context, this.aiChat.params, {}) : console.error("未找到扩展工具栏点击事件");
|
|
3260
3277
|
}
|
|
3261
|
-
if (
|
|
3262
|
-
const s =
|
|
3278
|
+
if (i && i.data && i.data.length > 0) {
|
|
3279
|
+
const s = i.data[0], o = {
|
|
3263
3280
|
id: s.id,
|
|
3264
3281
|
type: s.type,
|
|
3265
3282
|
data: s.data || {},
|
|
@@ -3271,7 +3288,7 @@ class Hn extends _i {
|
|
|
3271
3288
|
}
|
|
3272
3289
|
}
|
|
3273
3290
|
}
|
|
3274
|
-
class
|
|
3291
|
+
class Pi extends wn {
|
|
3275
3292
|
/**
|
|
3276
3293
|
* 执行操作
|
|
3277
3294
|
*
|
|
@@ -3280,63 +3297,63 @@ class Ln extends _i {
|
|
|
3280
3297
|
* @return {*} {Promise<void>}
|
|
3281
3298
|
*/
|
|
3282
3299
|
async excuteAction(e, t) {
|
|
3283
|
-
const
|
|
3300
|
+
const i = this.aiChat.opts.uploader, {
|
|
3284
3301
|
multiple: s,
|
|
3285
3302
|
accept: o,
|
|
3286
3303
|
maxSize: r,
|
|
3287
3304
|
onSelect: a,
|
|
3288
3305
|
onUpload: u,
|
|
3289
|
-
onSuccess:
|
|
3306
|
+
onSuccess: f,
|
|
3290
3307
|
onError: d,
|
|
3291
3308
|
onProgress: l
|
|
3292
|
-
} =
|
|
3309
|
+
} = i, _ = {
|
|
3293
3310
|
multiple: s || !0,
|
|
3294
3311
|
accept: o || "*/*",
|
|
3295
3312
|
maxSize: r || 5 * 1024 * 1024,
|
|
3296
|
-
onSelect: (
|
|
3297
|
-
a == null || a(
|
|
3298
|
-
const
|
|
3299
|
-
Object.assign(
|
|
3313
|
+
onSelect: (h) => {
|
|
3314
|
+
a == null || a(h), h.length > 0 && h.forEach((p) => {
|
|
3315
|
+
const v = this.buildMaterialObject(p);
|
|
3316
|
+
Object.assign(v.metadata, {
|
|
3300
3317
|
state: "uploading"
|
|
3301
|
-
}), this.aiChat.addMaterial(
|
|
3318
|
+
}), this.aiChat.addMaterial(v);
|
|
3302
3319
|
});
|
|
3303
3320
|
},
|
|
3304
|
-
onUpload: async (
|
|
3321
|
+
onUpload: async (h, p) => u(h, p, {
|
|
3305
3322
|
context: this.aiChat.context,
|
|
3306
3323
|
params: this.aiChat.params
|
|
3307
3324
|
}),
|
|
3308
3325
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3309
|
-
onSuccess: (
|
|
3310
|
-
const
|
|
3311
|
-
id:
|
|
3326
|
+
onSuccess: (h, p) => {
|
|
3327
|
+
const v = {
|
|
3328
|
+
id: h.id,
|
|
3312
3329
|
type: "ossfile",
|
|
3313
3330
|
data: {
|
|
3314
|
-
id:
|
|
3315
|
-
name:
|
|
3331
|
+
id: h.id,
|
|
3332
|
+
name: h.name
|
|
3316
3333
|
},
|
|
3317
3334
|
metadata: {
|
|
3318
|
-
ext:
|
|
3319
|
-
fileext:
|
|
3320
|
-
fileid:
|
|
3321
|
-
filename:
|
|
3322
|
-
size:
|
|
3323
|
-
filesize:
|
|
3335
|
+
ext: h.ext,
|
|
3336
|
+
fileext: h.fileext,
|
|
3337
|
+
fileid: h.fileid,
|
|
3338
|
+
filename: h.filename,
|
|
3339
|
+
size: h.size,
|
|
3340
|
+
filesize: h.filesize,
|
|
3324
3341
|
state: "successed"
|
|
3325
3342
|
}
|
|
3326
3343
|
};
|
|
3327
|
-
this.aiChat.replaceMaterial(
|
|
3344
|
+
this.aiChat.replaceMaterial(p.name, v), f == null || f(h, p);
|
|
3328
3345
|
},
|
|
3329
|
-
onError: (
|
|
3330
|
-
const
|
|
3331
|
-
Object.assign(
|
|
3346
|
+
onError: (h, p) => {
|
|
3347
|
+
const v = this.buildMaterialObject(p);
|
|
3348
|
+
Object.assign(v.metadata, {
|
|
3332
3349
|
state: "failed"
|
|
3333
|
-
}), this.aiChat.replaceMaterial(
|
|
3350
|
+
}), this.aiChat.replaceMaterial(p.name, v), d == null || d(h, p);
|
|
3334
3351
|
},
|
|
3335
|
-
onProgress: (
|
|
3336
|
-
l == null || l(
|
|
3352
|
+
onProgress: (h, p) => {
|
|
3353
|
+
l == null || l(h, p);
|
|
3337
3354
|
}
|
|
3338
3355
|
};
|
|
3339
|
-
new
|
|
3356
|
+
new zn(_).openFilePicker();
|
|
3340
3357
|
}
|
|
3341
3358
|
/**
|
|
3342
3359
|
* 构建素材对象
|
|
@@ -3362,17 +3379,17 @@ class Ln extends _i {
|
|
|
3362
3379
|
};
|
|
3363
3380
|
}
|
|
3364
3381
|
}
|
|
3365
|
-
class
|
|
3382
|
+
class Dt {
|
|
3366
3383
|
static getMaterialHelper(e, t) {
|
|
3367
3384
|
switch (e) {
|
|
3368
3385
|
case "ossfile":
|
|
3369
|
-
return new
|
|
3386
|
+
return new Pi(t);
|
|
3370
3387
|
default:
|
|
3371
|
-
return new
|
|
3388
|
+
return new Bi(t);
|
|
3372
3389
|
}
|
|
3373
3390
|
}
|
|
3374
3391
|
}
|
|
3375
|
-
class
|
|
3392
|
+
class Ri {
|
|
3376
3393
|
/**
|
|
3377
3394
|
* Creates an instance of ChatController.
|
|
3378
3395
|
* @author tony001
|
|
@@ -3387,7 +3404,7 @@ class On {
|
|
|
3387
3404
|
* @protected
|
|
3388
3405
|
* @type {HTMLDivElement}
|
|
3389
3406
|
*/
|
|
3390
|
-
|
|
3407
|
+
x(this, "container");
|
|
3391
3408
|
/**
|
|
3392
3409
|
* 默认模式(聊天框)和话题模式(支持多话题切换),聊天框为默认模式
|
|
3393
3410
|
*
|
|
@@ -3396,7 +3413,7 @@ class On {
|
|
|
3396
3413
|
* @protected
|
|
3397
3414
|
* @type {('DEFAULT' | 'TOPIC')}
|
|
3398
3415
|
*/
|
|
3399
|
-
|
|
3416
|
+
x(this, "mode", "DEFAULT");
|
|
3400
3417
|
/**
|
|
3401
3418
|
* 是否挂载ai话题
|
|
3402
3419
|
*
|
|
@@ -3405,7 +3422,7 @@ class On {
|
|
|
3405
3422
|
* @protected
|
|
3406
3423
|
* @type {boolean}
|
|
3407
3424
|
*/
|
|
3408
|
-
|
|
3425
|
+
x(this, "isMountedAiTopic", !1);
|
|
3409
3426
|
/**
|
|
3410
3427
|
* 容器配置备份
|
|
3411
3428
|
*
|
|
@@ -3414,7 +3431,7 @@ class On {
|
|
|
3414
3431
|
* @protected
|
|
3415
3432
|
* @type {(IContainerOptions | undefined)}
|
|
3416
3433
|
*/
|
|
3417
|
-
|
|
3434
|
+
x(this, "backupChatOptions");
|
|
3418
3435
|
/**
|
|
3419
3436
|
* 话题控制器
|
|
3420
3437
|
*
|
|
@@ -3423,7 +3440,7 @@ class On {
|
|
|
3423
3440
|
* @public
|
|
3424
3441
|
* @type {AiTopicController}
|
|
3425
3442
|
*/
|
|
3426
|
-
|
|
3443
|
+
x(this, "aiTopic");
|
|
3427
3444
|
/**
|
|
3428
3445
|
* 话题map
|
|
3429
3446
|
*
|
|
@@ -3431,8 +3448,8 @@ class On {
|
|
|
3431
3448
|
* @type {Map<string, AiChatController>}
|
|
3432
3449
|
* @memberof ChatController
|
|
3433
3450
|
*/
|
|
3434
|
-
|
|
3435
|
-
this.aiTopic = new
|
|
3451
|
+
x(this, "aiTopicMap", /* @__PURE__ */ new Map());
|
|
3452
|
+
this.aiTopic = new Oi(this);
|
|
3436
3453
|
}
|
|
3437
3454
|
/**
|
|
3438
3455
|
* 聊天控制器
|
|
@@ -3453,7 +3470,7 @@ class On {
|
|
|
3453
3470
|
* @return {*} {Promise<void>}
|
|
3454
3471
|
*/
|
|
3455
3472
|
async initIndexDB() {
|
|
3456
|
-
await
|
|
3473
|
+
await Z.checkTableExists(M.DATA_BASE_NAME, M.DATA_TABLE_NAME) || await Z.createTable(M.DATA_BASE_NAME, M.DATA_TABLE_NAME, M.DATA_TABLE_KEY_NAME, !1);
|
|
3457
3474
|
}
|
|
3458
3475
|
/**
|
|
3459
3476
|
* 创建聊天窗口(会同时显示出来)
|
|
@@ -3467,8 +3484,8 @@ class On {
|
|
|
3467
3484
|
var o;
|
|
3468
3485
|
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);
|
|
3469
3486
|
const t = e.chatOptions;
|
|
3470
|
-
let
|
|
3471
|
-
e.mode && e.mode === "TOPIC" && (this.isMountedAiTopic || (await this.aiTopic.fetchHistory(e.topicOptions), this.isMountedAiTopic = !0),
|
|
3487
|
+
let i;
|
|
3488
|
+
e.mode && e.mode === "TOPIC" && (this.isMountedAiTopic || (await this.aiTopic.fetchHistory(e.topicOptions), this.isMountedAiTopic = !0), i = e.topicOptions, Object.assign(i, {
|
|
3472
3489
|
aiChat: {
|
|
3473
3490
|
caption: t.caption,
|
|
3474
3491
|
context: t.context,
|
|
@@ -3478,12 +3495,12 @@ class On {
|
|
|
3478
3495
|
footerToolbarItems: t.footerToolbarItems,
|
|
3479
3496
|
questionToolbarItems: t.questionToolbarItems
|
|
3480
3497
|
}
|
|
3481
|
-
}), await this.aiTopic.updateCurrentTopic(
|
|
3482
|
-
topicId:
|
|
3483
|
-
topic:
|
|
3498
|
+
}), await this.aiTopic.updateCurrentTopic(i)), Object.assign(t, {
|
|
3499
|
+
topicId: i == null ? void 0 : i.id,
|
|
3500
|
+
topic: i
|
|
3484
3501
|
});
|
|
3485
|
-
const s = new
|
|
3486
|
-
return this.aiTopicMap.set("".concat(
|
|
3502
|
+
const s = new At(t);
|
|
3503
|
+
return this.aiTopicMap.set("".concat(i == null ? void 0 : i.id), s), se(W(Lt, {
|
|
3487
3504
|
aiChat: s,
|
|
3488
3505
|
aiTopic: this.aiTopic,
|
|
3489
3506
|
mode: e.mode ? e.mode : "DEFAULT",
|
|
@@ -3528,9 +3545,9 @@ class On {
|
|
|
3528
3545
|
topic: e,
|
|
3529
3546
|
extendToolbarClick: this.backupChatOptions.chatOptions.extendToolbarClick
|
|
3530
3547
|
});
|
|
3531
|
-
let
|
|
3532
|
-
this.aiTopicMap.has("".concat(e.id)) ?
|
|
3533
|
-
aiChat:
|
|
3548
|
+
let i;
|
|
3549
|
+
this.aiTopicMap.has("".concat(e.id)) ? i = this.aiTopicMap.get("".concat(e.id)) : (i = new At(t), this.aiTopicMap.set("".concat(e.id), i)), this.container && (se(null, this.container), se(W(Lt, {
|
|
3550
|
+
aiChat: i,
|
|
3534
3551
|
aiTopic: this.aiTopic,
|
|
3535
3552
|
mode: (s = this.backupChatOptions) != null && s.mode ? this.backupChatOptions.mode : "DEFAULT",
|
|
3536
3553
|
containerOptions: (o = this.backupChatOptions) == null ? void 0 : o.containerOptions,
|
|
@@ -3542,11 +3559,11 @@ class On {
|
|
|
3542
3559
|
close: () => {
|
|
3543
3560
|
this.close(), t.closed && t.closed(t.context, t.params);
|
|
3544
3561
|
},
|
|
3545
|
-
fullscreen: (
|
|
3546
|
-
t.fullscreen && t.fullscreen(
|
|
3562
|
+
fullscreen: (f) => {
|
|
3563
|
+
t.fullscreen && t.fullscreen(f, t.context, t.params);
|
|
3547
3564
|
},
|
|
3548
|
-
minimize: (
|
|
3549
|
-
t.minimize && t.minimize(
|
|
3565
|
+
minimize: (f) => {
|
|
3566
|
+
t.minimize && t.minimize(f, t.context, t.params);
|
|
3550
3567
|
}
|
|
3551
3568
|
}), this.container));
|
|
3552
3569
|
}
|
|
@@ -3575,76 +3592,76 @@ class On {
|
|
|
3575
3592
|
* @date 2023-10-13 17:10:10
|
|
3576
3593
|
*/
|
|
3577
3594
|
close() {
|
|
3578
|
-
this.container && (
|
|
3595
|
+
this.container && (se(null, this.container), this.container.remove(), this.container = void 0);
|
|
3579
3596
|
}
|
|
3580
3597
|
}
|
|
3581
|
-
const
|
|
3582
|
-
const
|
|
3583
|
-
const e =
|
|
3598
|
+
const Gi = new Ri();
|
|
3599
|
+
const Fi = new $("chat-input-material"), Ui = (n) => {
|
|
3600
|
+
const e = n.controller.materials;
|
|
3584
3601
|
return c("div", {
|
|
3585
|
-
className:
|
|
3586
|
-
children: e.value.map((t) => c(
|
|
3602
|
+
className: Fi.b(),
|
|
3603
|
+
children: e.value.map((t) => c(vn, {
|
|
3587
3604
|
material: t,
|
|
3588
3605
|
disabled: !1,
|
|
3589
|
-
controller:
|
|
3606
|
+
controller: n.controller
|
|
3590
3607
|
}, t.id))
|
|
3591
3608
|
});
|
|
3592
3609
|
};
|
|
3593
|
-
const
|
|
3594
|
-
children:
|
|
3610
|
+
const bn = ({
|
|
3611
|
+
children: n,
|
|
3595
3612
|
actions: e,
|
|
3596
3613
|
// 接收行为数据
|
|
3597
3614
|
content: t,
|
|
3598
|
-
position:
|
|
3615
|
+
position: i = "bottom",
|
|
3599
3616
|
isOpen: s,
|
|
3600
3617
|
onToggleOpen: o,
|
|
3601
3618
|
onAction: r
|
|
3602
3619
|
// 接收行为事件回调
|
|
3603
3620
|
}) => {
|
|
3604
|
-
const a = new $("pop"), u =
|
|
3605
|
-
|
|
3621
|
+
const a = new $("pop"), u = sn(st), [f, d] = me(s || !1), l = B(null), _ = B(null);
|
|
3622
|
+
O(() => {
|
|
3606
3623
|
s !== void 0 && d(s);
|
|
3607
|
-
}, [s]),
|
|
3624
|
+
}, [s]), O(() => (_.current || (_.current = document.createElement("div"), _.current.className = a.b("content-container"), document.body.appendChild(_.current)), () => {
|
|
3608
3625
|
_.current && document.body.removeChild(_.current);
|
|
3609
|
-
}), []),
|
|
3610
|
-
const
|
|
3611
|
-
l.current && !l.current.contains(
|
|
3626
|
+
}), []), O(() => {
|
|
3627
|
+
const h = (p) => {
|
|
3628
|
+
l.current && !l.current.contains(p.target) && !p.target.closest(".".concat(a.b("content"))) && !p.target.closest(".ibiz-quick-edit") && !p.target.closest(".ibiz-picker__transfer") && (d(!1), o == null || o(!1));
|
|
3612
3629
|
};
|
|
3613
|
-
return
|
|
3614
|
-
document.removeEventListener("mousedown",
|
|
3630
|
+
return f && document.addEventListener("mousedown", h), () => {
|
|
3631
|
+
document.removeEventListener("mousedown", h);
|
|
3615
3632
|
};
|
|
3616
|
-
}, [
|
|
3617
|
-
const
|
|
3633
|
+
}, [f, o]);
|
|
3634
|
+
const g = () => {
|
|
3618
3635
|
if (!l.current)
|
|
3619
3636
|
return {};
|
|
3620
|
-
const
|
|
3637
|
+
const h = l.current.getBoundingClientRect(), p = {
|
|
3621
3638
|
position: "absolute",
|
|
3622
3639
|
zIndex: u.zIndex + 1
|
|
3623
|
-
},
|
|
3640
|
+
}, v = {
|
|
3624
3641
|
bottom: {
|
|
3625
|
-
top:
|
|
3626
|
-
left:
|
|
3642
|
+
top: h.bottom + window.scrollY,
|
|
3643
|
+
left: h.left + window.scrollX
|
|
3627
3644
|
},
|
|
3628
3645
|
top: {
|
|
3629
|
-
bottom: window.innerHeight -
|
|
3630
|
-
left:
|
|
3646
|
+
bottom: window.innerHeight - h.top + window.scrollY,
|
|
3647
|
+
left: h.left + window.scrollX
|
|
3631
3648
|
},
|
|
3632
3649
|
left: {
|
|
3633
|
-
top:
|
|
3634
|
-
right: window.innerWidth -
|
|
3650
|
+
top: h.top + window.scrollY,
|
|
3651
|
+
right: window.innerWidth - h.left + window.scrollX
|
|
3635
3652
|
},
|
|
3636
3653
|
right: {
|
|
3637
|
-
top:
|
|
3638
|
-
left:
|
|
3654
|
+
top: h.top + window.scrollY,
|
|
3655
|
+
left: h.right + window.scrollX
|
|
3639
3656
|
},
|
|
3640
3657
|
"top-left": {
|
|
3641
|
-
bottom: window.innerHeight -
|
|
3642
|
-
right: window.innerWidth -
|
|
3658
|
+
bottom: window.innerHeight - h.top + window.scrollY,
|
|
3659
|
+
right: window.innerWidth - h.left + window.scrollX
|
|
3643
3660
|
}
|
|
3644
3661
|
};
|
|
3645
3662
|
return {
|
|
3646
|
-
...
|
|
3647
|
-
...
|
|
3663
|
+
...p,
|
|
3664
|
+
...v[i]
|
|
3648
3665
|
};
|
|
3649
3666
|
};
|
|
3650
3667
|
return c("span", {
|
|
@@ -3652,82 +3669,82 @@ const vi = ({
|
|
|
3652
3669
|
children: [c("span", {
|
|
3653
3670
|
className: "".concat(a.b("trigger-element")),
|
|
3654
3671
|
ref: l,
|
|
3655
|
-
onClick: (
|
|
3656
|
-
|
|
3657
|
-
const
|
|
3658
|
-
d(
|
|
3672
|
+
onClick: (h) => {
|
|
3673
|
+
h.stopPropagation();
|
|
3674
|
+
const p = !f;
|
|
3675
|
+
d(p), o == null || o(p);
|
|
3659
3676
|
},
|
|
3660
|
-
children:
|
|
3661
|
-
}),
|
|
3662
|
-
className: "".concat(a.b("content"), " pop-").concat(
|
|
3663
|
-
style:
|
|
3664
|
-
children: t || (e == null ? void 0 : e.map((
|
|
3677
|
+
children: n
|
|
3678
|
+
}), f && _.current && xi(c("div", {
|
|
3679
|
+
className: "".concat(a.b("content"), " pop-").concat(i),
|
|
3680
|
+
style: g(),
|
|
3681
|
+
children: t || (e == null ? void 0 : e.map((h) => c("div", {
|
|
3665
3682
|
className: a.b("content-item"),
|
|
3666
|
-
onMouseDown: (
|
|
3667
|
-
|
|
3683
|
+
onMouseDown: (p) => {
|
|
3684
|
+
p.stopPropagation(), r == null || r(h.id, p);
|
|
3668
3685
|
},
|
|
3669
|
-
children: [
|
|
3686
|
+
children: [h.icon && c("img", {
|
|
3670
3687
|
className: a.b("content-item__icon"),
|
|
3671
|
-
src:
|
|
3672
|
-
alt:
|
|
3688
|
+
src: h.icon,
|
|
3689
|
+
alt: h.caption
|
|
3673
3690
|
}), c("div", {
|
|
3674
3691
|
className: a.b("content-item__caption"),
|
|
3675
|
-
children:
|
|
3692
|
+
children: h.caption
|
|
3676
3693
|
})]
|
|
3677
|
-
},
|
|
3694
|
+
}, h.id)))
|
|
3678
3695
|
}), _.current)]
|
|
3679
3696
|
});
|
|
3680
|
-
},
|
|
3681
|
-
var
|
|
3682
|
-
const [e, t] =
|
|
3683
|
-
|
|
3697
|
+
}, N = new $("chat-input"), zt = window.SpeechRecognition || window.webkitSpeechRecognition, Ht = (n) => {
|
|
3698
|
+
var p;
|
|
3699
|
+
const [e, t] = me(!1), i = B(null), s = n.controller.input, o = U(!1), r = B();
|
|
3700
|
+
zt && !r.current && (r.current = new zt(), r.current.onstart = () => {
|
|
3684
3701
|
o.value = !0;
|
|
3685
3702
|
}, r.current.onend = () => {
|
|
3686
3703
|
o.value = !1;
|
|
3687
|
-
}, r.current.onresult = (
|
|
3688
|
-
var
|
|
3689
|
-
const
|
|
3690
|
-
|
|
3704
|
+
}, r.current.onresult = (v) => {
|
|
3705
|
+
var y, T, C;
|
|
3706
|
+
const m = (C = (T = (y = v.results) == null ? void 0 : y[0]) == null ? void 0 : T[0]) == null ? void 0 : C.transcript;
|
|
3707
|
+
m && (s.value = "".concat(s.value).concat(m));
|
|
3691
3708
|
});
|
|
3692
3709
|
const a = () => {
|
|
3693
3710
|
r.current && !o.value && r.current.start();
|
|
3694
|
-
}, u =
|
|
3695
|
-
s.value =
|
|
3696
|
-
}, [s]),
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
}), [
|
|
3700
|
-
const d =
|
|
3711
|
+
}, u = Pe((v) => {
|
|
3712
|
+
s.value = v.target.value;
|
|
3713
|
+
}, [s]), f = H(() => s.value.length <= 0);
|
|
3714
|
+
O(() => (i.current && It(i.current), () => {
|
|
3715
|
+
i.current && It.destroy(i.current);
|
|
3716
|
+
}), [i]);
|
|
3717
|
+
const d = Pe(async () => {
|
|
3701
3718
|
try {
|
|
3702
|
-
const
|
|
3703
|
-
s.value = "", await
|
|
3704
|
-
} catch (
|
|
3705
|
-
console.error(
|
|
3719
|
+
const v = s.value;
|
|
3720
|
+
s.value = "", await n.controller.question(v);
|
|
3721
|
+
} catch (v) {
|
|
3722
|
+
console.error(v);
|
|
3706
3723
|
}
|
|
3707
|
-
}, [s]), l =
|
|
3724
|
+
}, [s]), l = Pe(async () => {
|
|
3708
3725
|
try {
|
|
3709
|
-
|
|
3710
|
-
} catch (
|
|
3711
|
-
console.error(
|
|
3726
|
+
n.controller.abortQuestion();
|
|
3727
|
+
} catch (v) {
|
|
3728
|
+
console.error(v);
|
|
3712
3729
|
}
|
|
3713
|
-
}, [s]), _ = (
|
|
3714
|
-
|
|
3715
|
-
},
|
|
3716
|
-
await
|
|
3717
|
-
},
|
|
3718
|
-
await
|
|
3730
|
+
}, [s]), _ = (v) => {
|
|
3731
|
+
v.code === "Enter" && !v.isComposing && (v.stopPropagation(), v.shiftKey === !1 && d());
|
|
3732
|
+
}, g = async (v) => {
|
|
3733
|
+
await Dt.getMaterialHelper("ossfile", n.controller).excuteAction(v), t(!1);
|
|
3734
|
+
}, h = async (v, m) => {
|
|
3735
|
+
await Dt.getMaterialHelper("common", n.controller).excuteAction(v, m), t(!1);
|
|
3719
3736
|
};
|
|
3720
3737
|
return c("div", {
|
|
3721
|
-
className:
|
|
3738
|
+
className: N.b("wrapper"),
|
|
3722
3739
|
children: [c("div", {
|
|
3723
|
-
className:
|
|
3724
|
-
children: c(
|
|
3725
|
-
controller:
|
|
3740
|
+
className: N.b("material-wrapper"),
|
|
3741
|
+
children: c(Ui, {
|
|
3742
|
+
controller: n.controller
|
|
3726
3743
|
})
|
|
3727
3744
|
}), c("div", {
|
|
3728
|
-
className:
|
|
3745
|
+
className: N.b("main-wrapper"),
|
|
3729
3746
|
children: [c("textarea", {
|
|
3730
|
-
className:
|
|
3747
|
+
className: N.e("textarea"),
|
|
3731
3748
|
type: "text",
|
|
3732
3749
|
rows: 6,
|
|
3733
3750
|
autoCorrect: "off",
|
|
@@ -3736,112 +3753,111 @@ const vi = ({
|
|
|
3736
3753
|
value: s,
|
|
3737
3754
|
onInput: u,
|
|
3738
3755
|
onKeyDown: _,
|
|
3739
|
-
ref:
|
|
3740
|
-
disabled:
|
|
3756
|
+
ref: i,
|
|
3757
|
+
disabled: n.controller.isLoading.value
|
|
3741
3758
|
}), c("div", {
|
|
3742
|
-
className:
|
|
3759
|
+
className: N.b("action-wrapper"),
|
|
3743
3760
|
children: [c("div", {
|
|
3744
|
-
className: "".concat(
|
|
3745
|
-
|
|
3761
|
+
className: "".concat(N.be("action-wrapper", "action-item"), " ").concat(N.is("disabled", n.controller.isLoading.value)),
|
|
3762
|
+
title: "上传资料",
|
|
3763
|
+
children: c(bn, {
|
|
3746
3764
|
content: c("div", {
|
|
3747
|
-
className:
|
|
3765
|
+
className: N.b("pop-actions"),
|
|
3748
3766
|
children: [c("div", {
|
|
3749
|
-
className:
|
|
3750
|
-
onClick: (
|
|
3751
|
-
|
|
3767
|
+
className: N.b("pop-action-item"),
|
|
3768
|
+
onClick: (v) => {
|
|
3769
|
+
g(v);
|
|
3752
3770
|
},
|
|
3753
3771
|
children: [c("span", {
|
|
3754
|
-
className:
|
|
3755
|
-
children: c(
|
|
3772
|
+
className: N.b("pop-action-item-icon"),
|
|
3773
|
+
children: c(pn, {})
|
|
3756
3774
|
}), c("span", {
|
|
3757
|
-
className:
|
|
3775
|
+
className: N.b("pop-action-item-title"),
|
|
3758
3776
|
children: "文件资料"
|
|
3759
3777
|
})]
|
|
3760
|
-
}), (
|
|
3761
|
-
var
|
|
3778
|
+
}), (p = n.questionToolbarItems) == null ? void 0 : p.map((v) => {
|
|
3779
|
+
var m, y, T;
|
|
3762
3780
|
return c("div", {
|
|
3763
|
-
className:
|
|
3764
|
-
onClick: (
|
|
3765
|
-
|
|
3781
|
+
className: N.b("pop-action-item"),
|
|
3782
|
+
onClick: (C) => {
|
|
3783
|
+
h(C, v);
|
|
3766
3784
|
},
|
|
3767
3785
|
children: [c("span", {
|
|
3768
|
-
className:
|
|
3769
|
-
children: typeof
|
|
3770
|
-
children: (
|
|
3771
|
-
className:
|
|
3772
|
-
}) : (
|
|
3786
|
+
className: N.b("pop-action-item-icon"),
|
|
3787
|
+
children: typeof v.icon == "function" ? v.icon() : ((m = v.icon) == null ? void 0 : m.showIcon) && c(V, {
|
|
3788
|
+
children: (y = v.icon) != null && y.cssClass ? c("i", {
|
|
3789
|
+
className: v.icon.cssClass
|
|
3790
|
+
}) : (T = v.icon) != null && T.imagePath ? tt(v.icon.imagePath) ? c("div", {
|
|
3773
3791
|
dangerouslySetInnerHTML: {
|
|
3774
|
-
__html:
|
|
3792
|
+
__html: v.icon.imagePath
|
|
3775
3793
|
}
|
|
3776
3794
|
}) : c("img", {
|
|
3777
|
-
src:
|
|
3795
|
+
src: v.icon.imagePath
|
|
3778
3796
|
}) : null
|
|
3779
3797
|
})
|
|
3780
3798
|
}), c("span", {
|
|
3781
|
-
className:
|
|
3782
|
-
children:
|
|
3799
|
+
className: N.b("pop-action-item-title"),
|
|
3800
|
+
children: v.label
|
|
3783
3801
|
})]
|
|
3784
|
-
},
|
|
3802
|
+
}, v.id);
|
|
3785
3803
|
})]
|
|
3786
3804
|
}),
|
|
3787
3805
|
position: "top-left",
|
|
3788
3806
|
isOpen: e,
|
|
3789
3807
|
onToggleOpen: t,
|
|
3790
|
-
children: c(
|
|
3808
|
+
children: c(si, {})
|
|
3791
3809
|
})
|
|
3792
3810
|
}), c("div", {
|
|
3793
3811
|
title: o.value ? "语音输入中..." : "语音输入",
|
|
3794
|
-
className: "".concat(
|
|
3812
|
+
className: "".concat(N.be("action-wrapper", "action-item"), " ").concat(N.is("disabled", n.controller.isLoading.value)),
|
|
3795
3813
|
onClick: a,
|
|
3796
|
-
children: o.value ? c(
|
|
3797
|
-
}),
|
|
3814
|
+
children: o.value ? c(ei, {}) : c(Qn, {})
|
|
3815
|
+
}), n.controller.isLoading.value ? c("div", {
|
|
3798
3816
|
title: "停止生成",
|
|
3799
|
-
className: "".concat(
|
|
3817
|
+
className: "".concat(N.be("action-wrapper", "action-item")),
|
|
3800
3818
|
onClick: l,
|
|
3801
|
-
children: c(
|
|
3819
|
+
children: c(ai, {})
|
|
3802
3820
|
}) : c("div", {
|
|
3803
3821
|
title: "发送消息",
|
|
3804
|
-
className: "".concat(
|
|
3822
|
+
className: "".concat(N.be("action-wrapper", "action-item"), " ").concat(N.is("disabled", f.value)),
|
|
3805
3823
|
onClick: d,
|
|
3806
|
-
children: c(
|
|
3807
|
-
className: "".concat(M.is("disabled", h.value))
|
|
3808
|
-
})
|
|
3824
|
+
children: c(jn, {})
|
|
3809
3825
|
})]
|
|
3810
3826
|
})]
|
|
3811
3827
|
})]
|
|
3812
3828
|
});
|
|
3813
3829
|
};
|
|
3814
|
-
const
|
|
3830
|
+
const q = new $("chat-topic-item"), Wi = (n) => {
|
|
3815
3831
|
const {
|
|
3816
3832
|
controller: e,
|
|
3817
3833
|
topic: t,
|
|
3818
|
-
onClick:
|
|
3834
|
+
onClick: i,
|
|
3819
3835
|
onAction: s
|
|
3820
|
-
} =
|
|
3836
|
+
} = n, o = H(() => {
|
|
3821
3837
|
var l;
|
|
3822
3838
|
return ((l = e.activedTopic.value) == null ? void 0 : l.id) === t.id;
|
|
3823
|
-
}), [r, a] =
|
|
3839
|
+
}), [r, a] = me(!1), u = (d) => {
|
|
3824
3840
|
d.stopPropagation(), s("LINK", d);
|
|
3825
|
-
},
|
|
3841
|
+
}, f = (d, l) => {
|
|
3826
3842
|
d === "DELETE" && s("DELETE", l), a(!1);
|
|
3827
3843
|
};
|
|
3828
3844
|
return c("div", {
|
|
3829
|
-
className: "".concat(
|
|
3830
|
-
onClick:
|
|
3845
|
+
className: "".concat(q.b(), " ").concat(q.is("active", o.value)),
|
|
3846
|
+
onClick: i.bind(void 0),
|
|
3831
3847
|
children: [c("div", {
|
|
3832
|
-
className:
|
|
3848
|
+
className: q.b("caption"),
|
|
3833
3849
|
title: t.caption,
|
|
3834
3850
|
children: t.caption
|
|
3835
3851
|
}), c("div", {
|
|
3836
|
-
className:
|
|
3852
|
+
className: q.b("icon"),
|
|
3837
3853
|
children: [c("span", {
|
|
3838
|
-
className:
|
|
3854
|
+
className: q.be("icon", "item"),
|
|
3839
3855
|
title: "跳转主视图",
|
|
3840
3856
|
onClick: u.bind(void 0),
|
|
3841
|
-
children: c(
|
|
3842
|
-
className:
|
|
3857
|
+
children: c(ni, {
|
|
3858
|
+
className: q.b("link-icon")
|
|
3843
3859
|
})
|
|
3844
|
-
}), o.value ? null : c(
|
|
3860
|
+
}), o.value ? null : c(bn, {
|
|
3845
3861
|
actions: [{
|
|
3846
3862
|
id: "DELETE",
|
|
3847
3863
|
caption: "删除话题"
|
|
@@ -3849,57 +3865,156 @@ const j = new $("chat-topic-item"), Rn = (i) => {
|
|
|
3849
3865
|
position: "bottom",
|
|
3850
3866
|
isOpen: r,
|
|
3851
3867
|
onToggleOpen: a,
|
|
3852
|
-
onAction:
|
|
3868
|
+
onAction: f.bind(void 0),
|
|
3853
3869
|
children: c("span", {
|
|
3854
|
-
className:
|
|
3870
|
+
className: q.be("icon", "item"),
|
|
3855
3871
|
title: "更多",
|
|
3856
|
-
children: c(
|
|
3857
|
-
className:
|
|
3872
|
+
children: c(ti, {
|
|
3873
|
+
className: q.b("more-icon")
|
|
3858
3874
|
})
|
|
3859
3875
|
})
|
|
3860
3876
|
})]
|
|
3861
3877
|
})]
|
|
3862
3878
|
});
|
|
3863
3879
|
};
|
|
3864
|
-
const
|
|
3865
|
-
const e =
|
|
3866
|
-
|
|
3867
|
-
},
|
|
3868
|
-
|
|
3880
|
+
const Vi = new $("chat-topics"), ji = (n) => {
|
|
3881
|
+
const e = n.controller.topics, t = (s) => {
|
|
3882
|
+
n.controller.handleTopicChange(s);
|
|
3883
|
+
}, i = (s, o, r) => {
|
|
3884
|
+
n.controller.handleTopicAction(s, o, r);
|
|
3869
3885
|
};
|
|
3870
3886
|
return c("div", {
|
|
3871
|
-
className:
|
|
3872
|
-
children: e.value.map((s) => c(
|
|
3887
|
+
className: Vi.b(),
|
|
3888
|
+
children: e.value.map((s) => c(Wi, {
|
|
3873
3889
|
topic: s,
|
|
3874
|
-
controller:
|
|
3890
|
+
controller: n.controller,
|
|
3875
3891
|
onClick: () => t(s),
|
|
3876
|
-
onAction: (o, r) =>
|
|
3892
|
+
onAction: (o, r) => i(o, s, r)
|
|
3877
3893
|
}, s.id))
|
|
3878
3894
|
});
|
|
3879
3895
|
};
|
|
3880
|
-
const
|
|
3896
|
+
const Ce = new $("chart-minimize"), qi = (n) => {
|
|
3897
|
+
const e = B(null), [t, i] = me(""), [s, o] = me(0), r = B(!1), a = B({
|
|
3898
|
+
x: (window.innerWidth - 86) / window.innerWidth,
|
|
3899
|
+
y: (window.innerHeight - 86) / window.innerHeight
|
|
3900
|
+
}), u = H(() => n.controller.messages.value[n.controller.messages.value.length - 1] || void 0), f = P(() => {
|
|
3901
|
+
var p, v;
|
|
3902
|
+
return ((p = u.value) == null ? void 0 : p.state) === 20 && ((v = u.value) == null ? void 0 : v.completed) !== !0;
|
|
3903
|
+
}, [u.value]), d = (p) => {
|
|
3904
|
+
const v = p.indexOf("<think>"), m = p.indexOf("</think>");
|
|
3905
|
+
let y = "", T = "", C = !1;
|
|
3906
|
+
return m === -1 ? (C = !1, y = p.slice(v + 7), T = "") : (C = !0, y = p.slice(v + 7, m), T = p.slice(m + 8)), {
|
|
3907
|
+
isThoughtCompleted: C,
|
|
3908
|
+
thoughtContent: y,
|
|
3909
|
+
answerContent: T
|
|
3910
|
+
};
|
|
3911
|
+
}, l = P(() => {
|
|
3912
|
+
var v;
|
|
3913
|
+
let p = "";
|
|
3914
|
+
if (f)
|
|
3915
|
+
if (u.value.content.indexOf("<think>") !== -1) {
|
|
3916
|
+
const {
|
|
3917
|
+
thoughtContent: m,
|
|
3918
|
+
answerContent: y
|
|
3919
|
+
} = d(u.value.content);
|
|
3920
|
+
p = m + y;
|
|
3921
|
+
} else
|
|
3922
|
+
p = (v = u.value) == null ? void 0 : v.content;
|
|
3923
|
+
else
|
|
3924
|
+
i(""), o(0);
|
|
3925
|
+
return p;
|
|
3926
|
+
}, [u.value]), _ = () => {
|
|
3927
|
+
Object.assign(e.current.style, {
|
|
3928
|
+
left: "".concat(a.current.x * 100, "%"),
|
|
3929
|
+
top: "".concat(a.current.y * 100, "%")
|
|
3930
|
+
}), localStorage.setItem(M.MINIMIZE_STYLY_CHCHE, JSON.stringify(a));
|
|
3931
|
+
}, g = () => {
|
|
3932
|
+
const p = e.current;
|
|
3933
|
+
p && (p.onmousedown = (v) => {
|
|
3934
|
+
document.body.style.userSelect = "none";
|
|
3935
|
+
const m = v.clientX - p.offsetLeft, y = v.clientY - p.offsetTop, T = Date.now(), C = (A) => {
|
|
3936
|
+
const D = 56 / window.innerWidth, R = 56 / window.innerHeight, {
|
|
3937
|
+
x: z,
|
|
3938
|
+
y: te
|
|
3939
|
+
} = tn(A.clientX - m, A.clientY - y, D, R);
|
|
3940
|
+
a.current = {
|
|
3941
|
+
x: z,
|
|
3942
|
+
y: te
|
|
3943
|
+
}, requestAnimationFrame(() => {
|
|
3944
|
+
_();
|
|
3945
|
+
});
|
|
3946
|
+
}, S = () => {
|
|
3947
|
+
const A = Date.now();
|
|
3948
|
+
r.current = A - T > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", S);
|
|
3949
|
+
};
|
|
3950
|
+
document.addEventListener("mousemove", C), document.addEventListener("mouseup", S);
|
|
3951
|
+
});
|
|
3952
|
+
}, h = () => {
|
|
3953
|
+
r.current || n.onClick();
|
|
3954
|
+
};
|
|
3955
|
+
return O(() => {
|
|
3956
|
+
const p = localStorage.getItem(M.MINIMIZE_STYLY_CHCHE);
|
|
3957
|
+
if (p) {
|
|
3958
|
+
const v = JSON.parse(p);
|
|
3959
|
+
Ze(v) && (a.current = v);
|
|
3960
|
+
}
|
|
3961
|
+
_(), g();
|
|
3962
|
+
}, []), O(() => {
|
|
3963
|
+
if (s < l.length) {
|
|
3964
|
+
const p = setTimeout(() => {
|
|
3965
|
+
i((v) => v + l[s]), o((v) => v + 1);
|
|
3966
|
+
}, 100);
|
|
3967
|
+
return () => clearTimeout(p);
|
|
3968
|
+
}
|
|
3969
|
+
}, [s, l]), c("div", {
|
|
3970
|
+
ref: e,
|
|
3971
|
+
title: n.title,
|
|
3972
|
+
className: "".concat(Ce.b(), " ").concat(Ce.is("hidden", !n.isMinimize)),
|
|
3973
|
+
onClick: h,
|
|
3974
|
+
children: f ? c("div", {
|
|
3975
|
+
className: "".concat(Ce.e("output")),
|
|
3976
|
+
children: ["输出中", t && c("div", {
|
|
3977
|
+
className: "".concat(Ce.em("output", "popover")),
|
|
3978
|
+
children: c("div", {
|
|
3979
|
+
className: "typewriter",
|
|
3980
|
+
children: t
|
|
3981
|
+
})
|
|
3982
|
+
})]
|
|
3983
|
+
}) : c(Jn, {})
|
|
3984
|
+
});
|
|
3985
|
+
};
|
|
3986
|
+
const st = $n({
|
|
3881
3987
|
zIndex: 10,
|
|
3882
3988
|
enableBackFill: !0
|
|
3883
3989
|
});
|
|
3884
|
-
var
|
|
3885
|
-
class
|
|
3990
|
+
var Ot, Bt, Pt, Rt;
|
|
3991
|
+
class Lt extends L {
|
|
3886
3992
|
constructor(t) {
|
|
3887
3993
|
super(t);
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3994
|
+
x(this, "ns", new $("chat-container"));
|
|
3995
|
+
x(this, "containerRef", rt());
|
|
3996
|
+
x(this, "dragHandle", rt());
|
|
3997
|
+
/**
|
|
3998
|
+
* 窗口样式数据
|
|
3999
|
+
*
|
|
4000
|
+
* @memberof ChatContainer
|
|
4001
|
+
*/
|
|
4002
|
+
x(this, "data", {
|
|
4003
|
+
side: {
|
|
4004
|
+
y: 0,
|
|
4005
|
+
height: 1,
|
|
4006
|
+
width: 750 / window.innerWidth,
|
|
4007
|
+
x: (window.innerWidth - 750) / window.innerWidth
|
|
4008
|
+
},
|
|
4009
|
+
window: {
|
|
4010
|
+
y: 0,
|
|
4011
|
+
width: 750 / window.innerWidth,
|
|
4012
|
+
height: 750 / window.innerHeight,
|
|
4013
|
+
x: (window.innerWidth - 750) / window.innerWidth
|
|
4014
|
+
},
|
|
3897
4015
|
minWidth: 500,
|
|
3898
|
-
minHeight: 300
|
|
3899
|
-
|
|
3900
|
-
C(this, "minimizeData", {
|
|
3901
|
-
x: (window.innerWidth - 86) / window.innerWidth,
|
|
3902
|
-
y: (window.innerHeight - 86) / window.innerHeight
|
|
4016
|
+
minHeight: 300,
|
|
4017
|
+
showMode: "side"
|
|
3903
4018
|
});
|
|
3904
4019
|
/**
|
|
3905
4020
|
* 是否禁止拖动
|
|
@@ -3907,14 +4022,14 @@ class zt extends z {
|
|
|
3907
4022
|
* @type {boolean}
|
|
3908
4023
|
* @memberof ChatContainer
|
|
3909
4024
|
*/
|
|
3910
|
-
|
|
4025
|
+
x(this, "disabled", !1);
|
|
3911
4026
|
/**
|
|
3912
4027
|
* 最小化是否在拖拽中
|
|
3913
4028
|
* - 在拖拽时不应触发点击事件
|
|
3914
4029
|
* @type {boolean}
|
|
3915
4030
|
* @memberof ChatContainer
|
|
3916
4031
|
*/
|
|
3917
|
-
|
|
4032
|
+
x(this, "isDragging", !1);
|
|
3918
4033
|
/**
|
|
3919
4034
|
* 容器上下文
|
|
3920
4035
|
*
|
|
@@ -3922,95 +4037,73 @@ class zt extends z {
|
|
|
3922
4037
|
* @date 2025-03-03 16:03:44
|
|
3923
4038
|
* @type {ContainerContext}
|
|
3924
4039
|
*/
|
|
3925
|
-
|
|
3926
|
-
zIndex: ((
|
|
3927
|
-
enableBackFill: ((
|
|
4040
|
+
x(this, "containerContext", {
|
|
4041
|
+
zIndex: ((Ot = this.props.containerOptions) == null ? void 0 : Ot.zIndex) || 10,
|
|
4042
|
+
enableBackFill: ((Bt = this.props) == null ? void 0 : Bt.enableBackFill) !== void 0 && ((Pt = this.props) == null ? void 0 : Pt.enableBackFill) !== null ? (Rt = this.props) == null ? void 0 : Rt.enableBackFill : !0
|
|
3928
4043
|
});
|
|
3929
4044
|
this.state = {
|
|
3930
4045
|
isFullScreen: !1,
|
|
3931
4046
|
isMinimize: !1
|
|
3932
4047
|
};
|
|
3933
4048
|
}
|
|
4049
|
+
/**
|
|
4050
|
+
* 计算AI窗口样式
|
|
4051
|
+
*
|
|
4052
|
+
* @return {*}
|
|
4053
|
+
* @memberof ChatContainer
|
|
4054
|
+
*/
|
|
3934
4055
|
calcWindowStyle() {
|
|
3935
|
-
var
|
|
4056
|
+
var i, s;
|
|
4057
|
+
const t = this.data.showMode === "window" ? this.data.window : this.data.side;
|
|
3936
4058
|
return {
|
|
3937
|
-
left: "".concat(
|
|
3938
|
-
top: "".concat(
|
|
3939
|
-
width: "".concat(
|
|
3940
|
-
height: "".concat(
|
|
4059
|
+
left: "".concat(t.x * 100, "%"),
|
|
4060
|
+
top: "".concat(t.y * 100, "%"),
|
|
4061
|
+
width: "".concat(t.width * 100, "%"),
|
|
4062
|
+
height: "".concat(t.height * 100, "%"),
|
|
3941
4063
|
minWidth: "".concat(this.data.minWidth, "px"),
|
|
3942
4064
|
minHeight: "".concat(this.data.minHeight, "px"),
|
|
3943
|
-
"z-index": ((
|
|
3944
|
-
};
|
|
3945
|
-
}
|
|
3946
|
-
calcMinimizeStyle() {
|
|
3947
|
-
return {
|
|
3948
|
-
left: "".concat(this.minimizeData.x * 100, "%"),
|
|
3949
|
-
top: "".concat(this.minimizeData.y * 100, "%"),
|
|
3950
|
-
"z-index": "99999"
|
|
4065
|
+
"z-index": ((s = (i = this.props.containerOptions) == null ? void 0 : i.zIndex) == null ? void 0 : s.toString()) || "10"
|
|
3951
4066
|
};
|
|
3952
4067
|
}
|
|
3953
|
-
setStyle() {
|
|
3954
|
-
Object.assign(this.containerRef.current.style, this.calcWindowStyle()), Object.assign(this.minimizeRef.current.style, this.calcMinimizeStyle());
|
|
3955
|
-
}
|
|
3956
4068
|
/**
|
|
3957
|
-
*
|
|
4069
|
+
* 计算靠边模式样式
|
|
3958
4070
|
*
|
|
3959
|
-
* @param {
|
|
3960
|
-
* @return {*} {boolean}
|
|
4071
|
+
* @param {('left' | 'right')} side
|
|
3961
4072
|
* @memberof ChatContainer
|
|
3962
4073
|
*/
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
this.data.x < t && (this.data.x = 0), this.data.x + this.data.width > 1 - t && (this.data.x = 1 - this.data.width), this.data.y < n && (this.data.y = 0), this.data.y + this.data.height > 1 - n && (this.data.y = 1 - this.data.height), this.setStyle();
|
|
4074
|
+
calcSideModeStyle(t) {
|
|
4075
|
+
Object.assign(this.data, {
|
|
4076
|
+
side: {
|
|
4077
|
+
y: 0,
|
|
4078
|
+
x: t === "left" ? 0 : (window.innerWidth - 750) / window.innerWidth,
|
|
4079
|
+
height: 1,
|
|
4080
|
+
width: 750 / window.innerWidth
|
|
4081
|
+
},
|
|
4082
|
+
showMode: "side"
|
|
4083
|
+
});
|
|
3974
4084
|
}
|
|
3975
4085
|
/**
|
|
3976
|
-
*
|
|
4086
|
+
* 设置样式
|
|
3977
4087
|
*
|
|
3978
|
-
* @param {number} left
|
|
3979
|
-
* @param {number} top
|
|
3980
|
-
* @param {number} width
|
|
3981
|
-
* @param {number} height
|
|
3982
4088
|
* @memberof ChatContainer
|
|
3983
4089
|
*/
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
return {
|
|
3987
|
-
x: u,
|
|
3988
|
-
y: h
|
|
3989
|
-
};
|
|
4090
|
+
setStyle() {
|
|
4091
|
+
Object.assign(this.containerRef.current.style, this.calcWindowStyle()), localStorage.setItem(M.STYLE_CACHE, JSON.stringify(this.data));
|
|
3990
4092
|
}
|
|
3991
4093
|
/**
|
|
3992
|
-
*
|
|
3993
|
-
*
|
|
4094
|
+
* 吸附边缘(窗口模式)
|
|
4095
|
+
* - 靠近窗口上下边缘(20px) - 自动吸附
|
|
4096
|
+
* - 靠近窗口左右边缘(20px) - 靠边模式
|
|
3994
4097
|
* @memberof ChatContainer
|
|
3995
4098
|
*/
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
Object.assign(this.minimizeData, {
|
|
4005
|
-
x: l,
|
|
4006
|
-
y: _
|
|
4007
|
-
}), this.setStyle();
|
|
4008
|
-
}, a = () => {
|
|
4009
|
-
const u = Date.now();
|
|
4010
|
-
this.isDragging = u - o > 300, document.body.style.userSelect = "", document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", a);
|
|
4011
|
-
};
|
|
4012
|
-
document.addEventListener("mousemove", r), document.addEventListener("mouseup", a);
|
|
4013
|
-
};
|
|
4099
|
+
snapToEdge() {
|
|
4100
|
+
const t = 20 / window.innerWidth, i = 20 / window.innerHeight, {
|
|
4101
|
+
x: s,
|
|
4102
|
+
y: o,
|
|
4103
|
+
width: r,
|
|
4104
|
+
height: a
|
|
4105
|
+
} = this.data.window;
|
|
4106
|
+
s < t || s + r > 1 - t ? this.calcSideModeStyle(s < t ? "left" : "right") : (o < i && (this.data.window.y = 0), o + a > 1 - i && (this.data.window.y = 1 - a)), this.setStyle();
|
|
4014
4107
|
}
|
|
4015
4108
|
/**
|
|
4016
4109
|
* 注册对话框拖拽
|
|
@@ -4022,16 +4115,17 @@ class zt extends z {
|
|
|
4022
4115
|
if (this.state.isFullScreen)
|
|
4023
4116
|
return;
|
|
4024
4117
|
document.body.style.userSelect = "none";
|
|
4025
|
-
const
|
|
4118
|
+
const i = t.clientX - this.containerRef.current.offsetLeft, s = t.clientY - this.containerRef.current.offsetTop, o = (a) => {
|
|
4026
4119
|
if (this.disabled)
|
|
4027
4120
|
return;
|
|
4121
|
+
this.data.showMode = "window";
|
|
4028
4122
|
const {
|
|
4029
4123
|
x: u,
|
|
4030
|
-
y:
|
|
4031
|
-
} =
|
|
4032
|
-
Object.assign(this.data, {
|
|
4124
|
+
y: f
|
|
4125
|
+
} = tn(a.clientX - i, a.clientY - s, this.data.window.width, this.data.window.height);
|
|
4126
|
+
Object.assign(this.data.window, {
|
|
4033
4127
|
x: u,
|
|
4034
|
-
y:
|
|
4128
|
+
y: f
|
|
4035
4129
|
}), this.setStyle();
|
|
4036
4130
|
}, r = () => {
|
|
4037
4131
|
document.body.style.userSelect = "", document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), !this.disabled && this.snapToEdge();
|
|
@@ -4045,7 +4139,7 @@ class zt extends z {
|
|
|
4045
4139
|
* @memberof ChatContainer
|
|
4046
4140
|
*/
|
|
4047
4141
|
registerDragDialogBorder() {
|
|
4048
|
-
|
|
4142
|
+
Oe(this.containerRef.current).resizable({
|
|
4049
4143
|
// 可拖拽的边缘
|
|
4050
4144
|
edges: {
|
|
4051
4145
|
top: !0,
|
|
@@ -4056,11 +4150,11 @@ class zt extends z {
|
|
|
4056
4150
|
margin: 6,
|
|
4057
4151
|
modifiers: [
|
|
4058
4152
|
// 保持在父对象内部
|
|
4059
|
-
|
|
4153
|
+
Oe.modifiers.restrictEdges({
|
|
4060
4154
|
outer: document.body
|
|
4061
4155
|
}),
|
|
4062
4156
|
// 缩放最小宽度
|
|
4063
|
-
|
|
4157
|
+
Oe.modifiers.restrictSize({
|
|
4064
4158
|
min: {
|
|
4065
4159
|
width: this.data.minWidth,
|
|
4066
4160
|
height: this.data.minHeight
|
|
@@ -4070,7 +4164,10 @@ class zt extends z {
|
|
|
4070
4164
|
inertia: !0,
|
|
4071
4165
|
listeners: {
|
|
4072
4166
|
move: (t) => {
|
|
4073
|
-
this.state.isFullScreen
|
|
4167
|
+
if (this.state.isFullScreen)
|
|
4168
|
+
return;
|
|
4169
|
+
const i = this.data.showMode === "side" ? this.data.side : this.data.window;
|
|
4170
|
+
i.x = t.rect.left / window.innerWidth, i.y = t.rect.top / window.innerHeight, i.width = t.rect.width / window.innerWidth, i.height = t.rect.height / window.innerHeight, this.setStyle();
|
|
4074
4171
|
},
|
|
4075
4172
|
start: () => {
|
|
4076
4173
|
this.disabled = !0, document.body.style.userSelect = "none";
|
|
@@ -4093,20 +4190,15 @@ class zt extends z {
|
|
|
4093
4190
|
}
|
|
4094
4191
|
componentDidMount() {
|
|
4095
4192
|
this.handleFullScreenChange = this.handleFullScreenChange.bind(this);
|
|
4096
|
-
const t = localStorage.getItem(
|
|
4193
|
+
const t = localStorage.getItem(M.STYLE_CACHE);
|
|
4097
4194
|
if (t) {
|
|
4098
|
-
const
|
|
4099
|
-
|
|
4100
|
-
}
|
|
4101
|
-
const n = localStorage.getItem(N.STYLE_CACHE);
|
|
4102
|
-
if (n) {
|
|
4103
|
-
const s = JSON.parse(n);
|
|
4104
|
-
this.isWithinBounds(s) && (this.data = s);
|
|
4195
|
+
const i = JSON.parse(t);
|
|
4196
|
+
i.side && Ze(i.side) && i.window && Ze(i.window) && Object.assign(this.data, i);
|
|
4105
4197
|
}
|
|
4106
|
-
this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(),
|
|
4198
|
+
this.setStyle(), this.registerDragDialog(), this.registerDragDialogBorder(), document.addEventListener("fullscreenchange", this.handleFullScreenChange);
|
|
4107
4199
|
}
|
|
4108
4200
|
componentWillUnmount() {
|
|
4109
|
-
document.removeEventListener("fullscreenchange", this.handleFullScreenChange)
|
|
4201
|
+
document.removeEventListener("fullscreenchange", this.handleFullScreenChange);
|
|
4110
4202
|
}
|
|
4111
4203
|
/**
|
|
4112
4204
|
* 关闭聊天窗口
|
|
@@ -4152,9 +4244,9 @@ class zt extends z {
|
|
|
4152
4244
|
* @memberof ChatContainer
|
|
4153
4245
|
*/
|
|
4154
4246
|
exitMinimize() {
|
|
4155
|
-
this.
|
|
4247
|
+
this.setState({
|
|
4156
4248
|
isMinimize: !1
|
|
4157
|
-
}), this.props.minimize(!1)
|
|
4249
|
+
}), this.props.minimize(!1);
|
|
4158
4250
|
}
|
|
4159
4251
|
/**
|
|
4160
4252
|
* 阻止冒泡
|
|
@@ -4166,7 +4258,7 @@ class zt extends z {
|
|
|
4166
4258
|
t.stopPropagation();
|
|
4167
4259
|
}
|
|
4168
4260
|
render() {
|
|
4169
|
-
return c(
|
|
4261
|
+
return c(st.Provider, {
|
|
4170
4262
|
value: this.containerContext,
|
|
4171
4263
|
children: c("div", {
|
|
4172
4264
|
className: "".concat(this.ns.b()),
|
|
@@ -4186,43 +4278,43 @@ class zt extends z {
|
|
|
4186
4278
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "minimize")),
|
|
4187
4279
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4188
4280
|
onClick: this.minimize.bind(this),
|
|
4189
|
-
children: c(
|
|
4281
|
+
children: c(Gn, {})
|
|
4190
4282
|
}), this.state.isFullScreen ? c("div", {
|
|
4191
4283
|
title: "退出全屏",
|
|
4192
4284
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "close-full-screen")),
|
|
4193
4285
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4194
4286
|
onClick: this.closeFullScreen.bind(this),
|
|
4195
|
-
children: c(
|
|
4287
|
+
children: c(Zn, {})
|
|
4196
4288
|
}) : c("div", {
|
|
4197
4289
|
title: "全屏",
|
|
4198
4290
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
|
|
4199
4291
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4200
4292
|
onClick: this.fullScreen.bind(this),
|
|
4201
|
-
children: c(
|
|
4293
|
+
children: c(Xn, {})
|
|
4202
4294
|
}), c("div", {
|
|
4203
4295
|
title: "关闭",
|
|
4204
4296
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
|
|
4205
4297
|
onMouseDown: this.stopPropagation.bind(this),
|
|
4206
4298
|
onClick: this.close.bind(this),
|
|
4207
|
-
children: c(
|
|
4299
|
+
children: c(Wn, {})
|
|
4208
4300
|
})]
|
|
4209
4301
|
})]
|
|
4210
4302
|
}), this.props.mode === "TOPIC" ? c("div", {
|
|
4211
4303
|
className: "".concat(this.ns.b("main")),
|
|
4212
4304
|
children: [c("div", {
|
|
4213
4305
|
className: "".concat(this.ns.be("main", "left")),
|
|
4214
|
-
children: c(
|
|
4306
|
+
children: c(ji, {
|
|
4215
4307
|
controller: this.props.aiTopic
|
|
4216
4308
|
})
|
|
4217
4309
|
}), c("div", {
|
|
4218
4310
|
className: "".concat(this.ns.be("main", "right")),
|
|
4219
4311
|
children: [c("div", {
|
|
4220
4312
|
className: this.ns.b("content"),
|
|
4221
|
-
children: c(
|
|
4313
|
+
children: c(yt, {
|
|
4222
4314
|
controller: this.props.aiChat,
|
|
4223
4315
|
toolbarItems: this.props.contentToolbarItems
|
|
4224
4316
|
})
|
|
4225
|
-
}), c(
|
|
4317
|
+
}), c(Ke, {
|
|
4226
4318
|
data: this.props.aiTopic.activedTopic.value,
|
|
4227
4319
|
type: "footer",
|
|
4228
4320
|
className: this.ns.e("toolbar"),
|
|
@@ -4230,7 +4322,7 @@ class zt extends z {
|
|
|
4230
4322
|
items: this.props.footerToolbarItems
|
|
4231
4323
|
}), c("div", {
|
|
4232
4324
|
className: this.ns.b("footer"),
|
|
4233
|
-
children: c(
|
|
4325
|
+
children: c(Ht, {
|
|
4234
4326
|
controller: this.props.aiChat,
|
|
4235
4327
|
questionToolbarItems: this.props.questionToolbarItems
|
|
4236
4328
|
})
|
|
@@ -4240,36 +4332,35 @@ class zt extends z {
|
|
|
4240
4332
|
className: "".concat(this.ns.be("main", "default")),
|
|
4241
4333
|
children: [c("div", {
|
|
4242
4334
|
className: this.ns.b("content"),
|
|
4243
|
-
children: c(
|
|
4335
|
+
children: c(yt, {
|
|
4244
4336
|
controller: this.props.aiChat,
|
|
4245
4337
|
toolbarItems: this.props.contentToolbarItems
|
|
4246
4338
|
})
|
|
4247
|
-
}), c(
|
|
4248
|
-
data: this.props.aiTopic.activedTopic.value,
|
|
4339
|
+
}), c(Ke, {
|
|
4249
4340
|
type: "footer",
|
|
4341
|
+
data: this.props.aiTopic.activedTopic.value,
|
|
4250
4342
|
className: this.ns.e("toolbar"),
|
|
4251
4343
|
controller: this.props.aiChat,
|
|
4252
4344
|
items: this.props.footerToolbarItems
|
|
4253
4345
|
}), c("div", {
|
|
4254
4346
|
className: this.ns.b("footer"),
|
|
4255
|
-
children: c(
|
|
4347
|
+
children: c(Ht, {
|
|
4256
4348
|
controller: this.props.aiChat,
|
|
4257
4349
|
questionToolbarItems: this.props.questionToolbarItems
|
|
4258
4350
|
})
|
|
4259
4351
|
})]
|
|
4260
4352
|
})]
|
|
4261
|
-
}), c(
|
|
4262
|
-
title: "AI助手",
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
onClick: this.exitMinimize.bind(this)
|
|
4266
|
-
children: c(Yi, {})
|
|
4353
|
+
}), c(qi, {
|
|
4354
|
+
title: this.props.caption || "AI助手",
|
|
4355
|
+
controller: this.props.aiChat,
|
|
4356
|
+
isMinimize: this.state.isMinimize,
|
|
4357
|
+
onClick: this.exitMinimize.bind(this)
|
|
4267
4358
|
})]
|
|
4268
4359
|
})
|
|
4269
4360
|
});
|
|
4270
4361
|
}
|
|
4271
4362
|
}
|
|
4272
4363
|
export {
|
|
4273
|
-
|
|
4274
|
-
|
|
4364
|
+
Lt as ChatContainer,
|
|
4365
|
+
Gi as chat
|
|
4275
4366
|
};
|