@ibiz-template-plugin/ai-chat 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var H = (t, e, n) => (
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var
|
|
7
|
-
function
|
|
1
|
+
var Ft = Object.defineProperty;
|
|
2
|
+
var Ut = (t, e, n) => e in t ? Ft(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var H = (t, e, n) => (Ut(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
import $e from "interactjs";
|
|
5
|
+
import Dt from "cherry-markdown";
|
|
6
|
+
var pe, f, _t, ft, O, Fe, ht, Ne, B = {}, dt = [], Vt = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, me = Array.isArray;
|
|
7
|
+
function L(t, e) {
|
|
8
8
|
for (var n in e)
|
|
9
9
|
t[n] = e[n];
|
|
10
10
|
return t;
|
|
@@ -13,35 +13,35 @@ function vt(t) {
|
|
|
13
13
|
var e = t.parentNode;
|
|
14
14
|
e && e.removeChild(t);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
var
|
|
18
|
-
for (
|
|
19
|
-
|
|
20
|
-
if (arguments.length > 2 && (
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
return
|
|
16
|
+
function G(t, e, n) {
|
|
17
|
+
var i, s, r, o = {};
|
|
18
|
+
for (r in e)
|
|
19
|
+
r == "key" ? i = e[r] : r == "ref" ? s = e[r] : o[r] = e[r];
|
|
20
|
+
if (arguments.length > 2 && (o.children = arguments.length > 3 ? pe.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null)
|
|
21
|
+
for (r in t.defaultProps)
|
|
22
|
+
o[r] === void 0 && (o[r] = t.defaultProps[r]);
|
|
23
|
+
return ie(t, o, i, s, null);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
var
|
|
27
|
-
return
|
|
25
|
+
function ie(t, e, n, i, s) {
|
|
26
|
+
var r = { type: t, props: e, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: s == null ? ++_t : s };
|
|
27
|
+
return s == null && f.vnode != null && f.vnode(r), r;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ue() {
|
|
30
30
|
return { current: null };
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function q(t) {
|
|
33
33
|
return t.children;
|
|
34
34
|
}
|
|
35
35
|
function A(t, e) {
|
|
36
36
|
this.props = t, this.context = e;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function K(t, e) {
|
|
39
39
|
if (e == null)
|
|
40
|
-
return t.__ ?
|
|
40
|
+
return t.__ ? K(t.__, t.__.__k.indexOf(t) + 1) : null;
|
|
41
41
|
for (var n; e < t.__k.length; e++)
|
|
42
42
|
if ((n = t.__k[e]) != null && n.__e != null)
|
|
43
43
|
return n.__d || n.__e;
|
|
44
|
-
return typeof t.type == "function" ?
|
|
44
|
+
return typeof t.type == "function" ? K(t) : null;
|
|
45
45
|
}
|
|
46
46
|
function pt(t) {
|
|
47
47
|
var e, n;
|
|
@@ -54,93 +54,93 @@ function pt(t) {
|
|
|
54
54
|
return pt(t);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
(!t.__d && (t.__d = !0) &&
|
|
57
|
+
function De(t) {
|
|
58
|
+
(!t.__d && (t.__d = !0) && O.push(t) && !oe.__r++ || Fe !== f.debounceRendering) && ((Fe = f.debounceRendering) || ht)(oe);
|
|
59
59
|
}
|
|
60
60
|
function oe() {
|
|
61
|
-
var t, e, n,
|
|
62
|
-
for (
|
|
63
|
-
t.__d && (e =
|
|
61
|
+
var t, e, n, i, s, r, o, l, c;
|
|
62
|
+
for (O.sort(Ne); t = O.shift(); )
|
|
63
|
+
t.__d && (e = O.length, i = void 0, s = void 0, r = void 0, l = (o = (n = t).__v).__e, (c = n.__P) && (i = [], s = [], (r = L({}, o)).__v = o.__v + 1, ze(c, o, r, n.__n, c.ownerSVGElement !== void 0, o.__h != null ? [l] : null, i, l == null ? K(o) : l, o.__h, s), bt(i, o, s), o.__e != l && pt(o)), O.length > e && O.sort(Ne));
|
|
64
64
|
oe.__r = 0;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
var a,
|
|
68
|
-
for (n.__k = [], a = 0; a <
|
|
69
|
-
(
|
|
66
|
+
function mt(t, e, n, i, s, r, o, l, c, p, h) {
|
|
67
|
+
var a, m, d, _, v, z, g, b, C, w = 0, $ = i && i.__k || dt, P = $.length, N = P, R = e.length;
|
|
68
|
+
for (n.__k = [], a = 0; a < R; a++)
|
|
69
|
+
(_ = n.__k[a] = (_ = e[a]) == null || typeof _ == "boolean" || typeof _ == "function" ? null : typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" ? ie(null, _, null, null, _) : me(_) ? ie(q, { children: _ }, null, null, null) : _.__b > 0 ? ie(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _) != null ? (_.__ = n, _.__b = n.__b + 1, (b = Ot(_, $, g = a + w, N)) === -1 ? d = B : (d = $[b] || B, $[b] = void 0, N--), ze(t, _, d, s, r, o, l, c, p, h), v = _.__e, (m = _.ref) && d.ref != m && (d.ref && Pe(d.ref, null, _), h.push(m, _.__c || v, _)), v != null && (z == null && (z = v), (C = d === B || d.__v === null) ? b == -1 && w-- : b !== g && (b === g + 1 ? w++ : b > g ? N > R - g ? w += b - g : w-- : w = b < g && b == g - 1 ? b - g : 0), g = a + w, typeof _.type != "function" || b === g && d.__k !== _.__k ? typeof _.type == "function" || b === g && !C ? _.__d !== void 0 ? (c = _.__d, _.__d = void 0) : c = v.nextSibling : c = yt(t, v, c) : c = gt(_, c, t), typeof n.type == "function" && (n.__d = c))) : (d = $[a]) && d.key == null && d.__e && (d.__e == c && (d.__ = i, c = K(d)), Ee(d, d, !1), $[a] = null);
|
|
70
70
|
for (n.__e = z, a = P; a--; )
|
|
71
71
|
$[a] != null && (typeof n.type == "function" && $[a].__e != null && $[a].__e == n.__d && (n.__d = $[a].__e.nextSibling), Ee($[a], $[a]));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
for (var
|
|
75
|
-
(
|
|
73
|
+
function gt(t, e, n) {
|
|
74
|
+
for (var i, s = t.__k, r = 0; s && r < s.length; r++)
|
|
75
|
+
(i = s[r]) && (i.__ = t, e = typeof i.type == "function" ? gt(i, e, n) : yt(n, i.__e, e));
|
|
76
76
|
return e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return e = e || [], t == null || typeof t == "boolean" || (
|
|
80
|
-
|
|
78
|
+
function ae(t, e) {
|
|
79
|
+
return e = e || [], t == null || typeof t == "boolean" || (me(t) ? t.some(function(n) {
|
|
80
|
+
ae(n, e);
|
|
81
81
|
}) : e.push(t)), e;
|
|
82
82
|
}
|
|
83
83
|
function yt(t, e, n) {
|
|
84
84
|
return n == null || n.parentNode !== t ? t.insertBefore(e, null) : e == n && e.parentNode != null || t.insertBefore(e, n), e.nextSibling;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
var
|
|
88
|
-
if (c === null || c &&
|
|
86
|
+
function Ot(t, e, n, i) {
|
|
87
|
+
var s = t.key, r = t.type, o = n - 1, l = n + 1, c = e[n];
|
|
88
|
+
if (c === null || c && s == c.key && r === c.type)
|
|
89
89
|
return n;
|
|
90
|
-
if (
|
|
91
|
-
for (;
|
|
92
|
-
if (
|
|
93
|
-
if ((c = e[
|
|
94
|
-
return
|
|
95
|
-
|
|
90
|
+
if (i > (c != null ? 1 : 0))
|
|
91
|
+
for (; o >= 0 || l < e.length; ) {
|
|
92
|
+
if (o >= 0) {
|
|
93
|
+
if ((c = e[o]) && s == c.key && r === c.type)
|
|
94
|
+
return o;
|
|
95
|
+
o--;
|
|
96
96
|
}
|
|
97
97
|
if (l < e.length) {
|
|
98
|
-
if ((c = e[l]) &&
|
|
98
|
+
if ((c = e[l]) && s == c.key && r === c.type)
|
|
99
99
|
return l;
|
|
100
100
|
l++;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
return -1;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
var
|
|
107
|
-
for (
|
|
108
|
-
|
|
109
|
-
for (
|
|
110
|
-
|
|
105
|
+
function Wt(t, e, n, i, s) {
|
|
106
|
+
var r;
|
|
107
|
+
for (r in n)
|
|
108
|
+
r === "children" || r === "key" || r in e || le(t, r, null, n[r], i);
|
|
109
|
+
for (r in e)
|
|
110
|
+
s && typeof e[r] != "function" || r === "children" || r === "key" || r === "value" || r === "checked" || n[r] === e[r] || le(t, r, e[r], n[r], i);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
e[0] === "-" ? t.setProperty(e, n == null ? "" : n) : t[e] = n == null ? "" : typeof n != "number" ||
|
|
112
|
+
function Ve(t, e, n) {
|
|
113
|
+
e[0] === "-" ? t.setProperty(e, n == null ? "" : n) : t[e] = n == null ? "" : typeof n != "number" || Vt.test(e) ? n : n + "px";
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
var
|
|
115
|
+
function le(t, e, n, i, s) {
|
|
116
|
+
var r;
|
|
117
117
|
e:
|
|
118
118
|
if (e === "style")
|
|
119
119
|
if (typeof n == "string")
|
|
120
120
|
t.style.cssText = n;
|
|
121
121
|
else {
|
|
122
|
-
if (typeof
|
|
123
|
-
for (e in
|
|
124
|
-
n && e in n ||
|
|
122
|
+
if (typeof i == "string" && (t.style.cssText = i = ""), i)
|
|
123
|
+
for (e in i)
|
|
124
|
+
n && e in n || Ve(t.style, e, "");
|
|
125
125
|
if (n)
|
|
126
126
|
for (e in n)
|
|
127
|
-
|
|
127
|
+
i && n[e] === i[e] || Ve(t.style, e, n[e]);
|
|
128
128
|
}
|
|
129
129
|
else if (e[0] === "o" && e[1] === "n")
|
|
130
|
-
|
|
130
|
+
r = e !== (e = e.replace(/(PointerCapture)$|Capture$/, "$1")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + r] = n, n ? i ? n.u = i.u : (n.u = Date.now(), t.addEventListener(e, r ? We : Oe, r)) : t.removeEventListener(e, r ? We : Oe, r);
|
|
131
131
|
else if (e !== "dangerouslySetInnerHTML") {
|
|
132
|
-
if (
|
|
132
|
+
if (s)
|
|
133
133
|
e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
134
134
|
else if (e !== "width" && e !== "height" && e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e !== "rowSpan" && e !== "colSpan" && e !== "role" && e in t)
|
|
135
135
|
try {
|
|
136
136
|
t[e] = n == null ? "" : n;
|
|
137
137
|
break e;
|
|
138
|
-
} catch (
|
|
138
|
+
} catch (o) {
|
|
139
139
|
}
|
|
140
140
|
typeof n == "function" || (n == null || n === !1 && e[4] !== "-" ? t.removeAttribute(e) : t.setAttribute(e, n));
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Oe(t) {
|
|
144
144
|
var e = this.l[t.type + !1];
|
|
145
145
|
if (t.t) {
|
|
146
146
|
if (t.t <= e.u)
|
|
@@ -149,129 +149,129 @@ function Ve(t) {
|
|
|
149
149
|
t.t = Date.now();
|
|
150
150
|
return e(f.event ? f.event(t) : t);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function We(t) {
|
|
153
153
|
return this.l[t.type + !0](f.event ? f.event(t) : t);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
var h, a,
|
|
155
|
+
function ze(t, e, n, i, s, r, o, l, c, p) {
|
|
156
|
+
var h, a, m, d, _, v, z, g, b, C, w, $, P, N, R, E = e.type;
|
|
157
157
|
if (e.constructor !== void 0)
|
|
158
158
|
return null;
|
|
159
|
-
n.__h != null && (c = n.__h, l = e.__e = n.__e, e.__h = null,
|
|
159
|
+
n.__h != null && (c = n.__h, l = e.__e = n.__e, e.__h = null, r = [l]), (h = f.__b) && h(e);
|
|
160
160
|
e:
|
|
161
161
|
if (typeof E == "function")
|
|
162
162
|
try {
|
|
163
|
-
if (
|
|
163
|
+
if (g = e.props, b = (h = E.contextType) && i[h.__c], C = h ? b ? b.props.value : h.__ : i, n.__c ? z = (a = e.__c = n.__c).__ = a.__E : ("prototype" in E && E.prototype.render ? e.__c = a = new E(g, C) : (e.__c = a = new A(g, C), a.constructor = E, a.render = It), b && b.sub(a), a.props = g, a.state || (a.state = {}), a.context = C, a.__n = i, m = a.__d = !0, a.__h = [], a._sb = []), a.__s == null && (a.__s = a.state), E.getDerivedStateFromProps != null && (a.__s == a.state && (a.__s = L({}, a.__s)), L(a.__s, E.getDerivedStateFromProps(g, a.__s))), d = a.props, _ = a.state, a.__v = e, m)
|
|
164
164
|
E.getDerivedStateFromProps == null && a.componentWillMount != null && a.componentWillMount(), a.componentDidMount != null && a.__h.push(a.componentDidMount);
|
|
165
165
|
else {
|
|
166
|
-
if (E.getDerivedStateFromProps == null &&
|
|
167
|
-
for (e.__v !== n.__v && (a.props =
|
|
168
|
-
|
|
166
|
+
if (E.getDerivedStateFromProps == null && g !== d && a.componentWillReceiveProps != null && a.componentWillReceiveProps(g, C), !a.__e && (a.shouldComponentUpdate != null && a.shouldComponentUpdate(g, a.__s, C) === !1 || e.__v === n.__v)) {
|
|
167
|
+
for (e.__v !== n.__v && (a.props = g, a.state = a.__s, a.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.forEach(function(te) {
|
|
168
|
+
te && (te.__ = e);
|
|
169
169
|
}), w = 0; w < a._sb.length; w++)
|
|
170
170
|
a.__h.push(a._sb[w]);
|
|
171
|
-
a._sb = [], a.__h.length &&
|
|
171
|
+
a._sb = [], a.__h.length && o.push(a);
|
|
172
172
|
break e;
|
|
173
173
|
}
|
|
174
|
-
a.componentWillUpdate != null && a.componentWillUpdate(
|
|
175
|
-
a.componentDidUpdate(d,
|
|
174
|
+
a.componentWillUpdate != null && a.componentWillUpdate(g, a.__s, C), a.componentDidUpdate != null && a.__h.push(function() {
|
|
175
|
+
a.componentDidUpdate(d, _, v);
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
if (a.context =
|
|
179
|
-
for (a.state = a.__s, a.__d = !1, $ && $(e), h = a.render(a.props, a.state, a.context),
|
|
180
|
-
a.__h.push(a._sb[
|
|
178
|
+
if (a.context = C, a.props = g, a.__P = t, a.__e = !1, $ = f.__r, P = 0, "prototype" in E && E.prototype.render) {
|
|
179
|
+
for (a.state = a.__s, a.__d = !1, $ && $(e), h = a.render(a.props, a.state, a.context), N = 0; N < a._sb.length; N++)
|
|
180
|
+
a.__h.push(a._sb[N]);
|
|
181
181
|
a._sb = [];
|
|
182
182
|
} else
|
|
183
183
|
do
|
|
184
184
|
a.__d = !1, $ && $(e), h = a.render(a.props, a.state, a.context), a.state = a.__s;
|
|
185
185
|
while (a.__d && ++P < 25);
|
|
186
|
-
a.state = a.__s, a.getChildContext != null && (
|
|
187
|
-
} catch (
|
|
188
|
-
e.__v = null, (c ||
|
|
186
|
+
a.state = a.__s, a.getChildContext != null && (i = L(L({}, i), a.getChildContext())), m || a.getSnapshotBeforeUpdate == null || (v = a.getSnapshotBeforeUpdate(d, _)), mt(t, me(R = h != null && h.type === q && h.key == null ? h.props.children : h) ? R : [R], e, n, i, s, r, o, l, c, p), a.base = e.__e, e.__h = null, a.__h.length && o.push(a), z && (a.__E = a.__ = null);
|
|
187
|
+
} catch (te) {
|
|
188
|
+
e.__v = null, (c || r != null) && (e.__e = l, e.__h = !!c, r[r.indexOf(l)] = null), f.__e(te, e, n);
|
|
189
189
|
}
|
|
190
190
|
else
|
|
191
|
-
|
|
191
|
+
r == null && e.__v === n.__v ? (e.__k = n.__k, e.__e = n.__e) : e.__e = Bt(n.__e, e, n, i, s, r, o, c, p);
|
|
192
192
|
(h = f.diffed) && h(e);
|
|
193
193
|
}
|
|
194
194
|
function bt(t, e, n) {
|
|
195
|
-
for (var
|
|
196
|
-
|
|
197
|
-
f.__c && f.__c(e, t), t.some(function(
|
|
195
|
+
for (var i = 0; i < n.length; i++)
|
|
196
|
+
Pe(n[i], n[++i], n[++i]);
|
|
197
|
+
f.__c && f.__c(e, t), t.some(function(s) {
|
|
198
198
|
try {
|
|
199
|
-
t =
|
|
200
|
-
|
|
199
|
+
t = s.__h, s.__h = [], t.some(function(r) {
|
|
200
|
+
r.call(s);
|
|
201
201
|
});
|
|
202
|
-
} catch (
|
|
203
|
-
f.__e(
|
|
202
|
+
} catch (r) {
|
|
203
|
+
f.__e(r, s.__v);
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
var p, h, a,
|
|
209
|
-
if (
|
|
210
|
-
for (; v <
|
|
211
|
-
if ((p =
|
|
212
|
-
t = p,
|
|
207
|
+
function Bt(t, e, n, i, s, r, o, l, c) {
|
|
208
|
+
var p, h, a, m = n.props, d = e.props, _ = e.type, v = 0;
|
|
209
|
+
if (_ === "svg" && (s = !0), r != null) {
|
|
210
|
+
for (; v < r.length; v++)
|
|
211
|
+
if ((p = r[v]) && "setAttribute" in p == !!_ && (_ ? p.localName === _ : p.nodeType === 3)) {
|
|
212
|
+
t = p, r[v] = null;
|
|
213
213
|
break;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
if (t == null) {
|
|
217
|
-
if (
|
|
217
|
+
if (_ === null)
|
|
218
218
|
return document.createTextNode(d);
|
|
219
|
-
t =
|
|
219
|
+
t = s ? document.createElementNS("http://www.w3.org/2000/svg", _) : document.createElement(_, d.is && d), r = null, l = !1;
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
222
|
-
|
|
221
|
+
if (_ === null)
|
|
222
|
+
m === d || l && t.data === d || (t.data = d);
|
|
223
223
|
else {
|
|
224
|
-
if (
|
|
225
|
-
if (
|
|
226
|
-
for (
|
|
227
|
-
|
|
224
|
+
if (r = r && pe.call(t.childNodes), h = (m = n.props || B).dangerouslySetInnerHTML, a = d.dangerouslySetInnerHTML, !l) {
|
|
225
|
+
if (r != null)
|
|
226
|
+
for (m = {}, v = 0; v < t.attributes.length; v++)
|
|
227
|
+
m[t.attributes[v].name] = t.attributes[v].value;
|
|
228
228
|
(a || h) && (a && (h && a.__html == h.__html || a.__html === t.innerHTML) || (t.innerHTML = a && a.__html || ""));
|
|
229
229
|
}
|
|
230
|
-
if (
|
|
230
|
+
if (Wt(t, d, m, s, l), a)
|
|
231
231
|
e.__k = [];
|
|
232
|
-
else if (
|
|
233
|
-
for (v =
|
|
234
|
-
|
|
235
|
-
l || ("value" in d && (v = d.value) !== void 0 && (v !== t.value ||
|
|
232
|
+
else if (mt(t, me(v = e.props.children) ? v : [v], e, n, i, s && _ !== "foreignObject", r, o, r ? r[0] : n.__k && K(n, 0), l, c), r != null)
|
|
233
|
+
for (v = r.length; v--; )
|
|
234
|
+
r[v] != null && vt(r[v]);
|
|
235
|
+
l || ("value" in d && (v = d.value) !== void 0 && (v !== t.value || _ === "progress" && !v || _ === "option" && v !== m.value) && le(t, "value", v, m.value, !1), "checked" in d && (v = d.checked) !== void 0 && v !== t.checked && le(t, "checked", v, m.checked, !1));
|
|
236
236
|
}
|
|
237
237
|
return t;
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Pe(t, e, n) {
|
|
240
240
|
try {
|
|
241
241
|
typeof t == "function" ? t(e) : t.current = e;
|
|
242
|
-
} catch (
|
|
243
|
-
f.__e(
|
|
242
|
+
} catch (i) {
|
|
243
|
+
f.__e(i, n);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
function Ee(t, e, n) {
|
|
247
|
-
var
|
|
248
|
-
if (f.unmount && f.unmount(t), (
|
|
249
|
-
if (
|
|
247
|
+
var i, s;
|
|
248
|
+
if (f.unmount && f.unmount(t), (i = t.ref) && (i.current && i.current !== t.__e || Pe(i, null, e)), (i = t.__c) != null) {
|
|
249
|
+
if (i.componentWillUnmount)
|
|
250
250
|
try {
|
|
251
|
-
|
|
252
|
-
} catch (
|
|
253
|
-
f.__e(
|
|
251
|
+
i.componentWillUnmount();
|
|
252
|
+
} catch (r) {
|
|
253
|
+
f.__e(r, e);
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
i.base = i.__P = null, t.__c = void 0;
|
|
256
256
|
}
|
|
257
|
-
if (
|
|
258
|
-
for (
|
|
259
|
-
|
|
257
|
+
if (i = t.__k)
|
|
258
|
+
for (s = 0; s < i.length; s++)
|
|
259
|
+
i[s] && Ee(i[s], e, n || typeof t.type != "function");
|
|
260
260
|
n || t.__e == null || vt(t.__e), t.__ = t.__e = t.__d = void 0;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function It(t, e, n) {
|
|
263
263
|
return this.constructor(t, n);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
var
|
|
267
|
-
f.__ && f.__(t, e),
|
|
265
|
+
function Be(t, e, n) {
|
|
266
|
+
var i, s, r, o;
|
|
267
|
+
f.__ && f.__(t, e), s = (i = typeof n == "function") ? null : n && n.__k || e.__k, r = [], o = [], ze(e, t = (!i && n || e).__k = G(q, null, [t]), s || B, B, e.ownerSVGElement !== void 0, !i && n ? [n] : s ? null : e.firstChild ? pe.call(e.childNodes) : null, r, !i && n ? n : s ? s.__e : e.firstChild, i, o), bt(r, t, o);
|
|
268
268
|
}
|
|
269
|
-
|
|
270
|
-
for (var
|
|
271
|
-
if ((
|
|
269
|
+
pe = dt.slice, f = { __e: function(t, e, n, i) {
|
|
270
|
+
for (var s, r, o; e = e.__; )
|
|
271
|
+
if ((s = e.__c) && !s.__)
|
|
272
272
|
try {
|
|
273
|
-
if ((
|
|
274
|
-
return
|
|
273
|
+
if ((r = s.constructor) && r.getDerivedStateFromError != null && (s.setState(r.getDerivedStateFromError(t)), o = s.__d), s.componentDidCatch != null && (s.componentDidCatch(t, i || {}), o = s.__d), o)
|
|
274
|
+
return s.__E = s;
|
|
275
275
|
} catch (l) {
|
|
276
276
|
t = l;
|
|
277
277
|
}
|
|
@@ -280,16 +280,16 @@ ve = dt.slice, f = { __e: function(t, e, n, r) {
|
|
|
280
280
|
return t != null && t.constructor === void 0;
|
|
281
281
|
}, A.prototype.setState = function(t, e) {
|
|
282
282
|
var n;
|
|
283
|
-
n = this.__s != null && this.__s !== this.state ? this.__s : this.__s =
|
|
283
|
+
n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = L({}, this.state), typeof t == "function" && (t = t(L({}, n), this.props)), t && L(n, t), t != null && this.__v && (e && this._sb.push(e), De(this));
|
|
284
284
|
}, A.prototype.forceUpdate = function(t) {
|
|
285
|
-
this.__v && (this.__e = !0, t && this.__h.push(t),
|
|
286
|
-
}, A.prototype.render =
|
|
285
|
+
this.__v && (this.__e = !0, t && this.__h.push(t), De(this));
|
|
286
|
+
}, A.prototype.render = q, O = [], ht = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ne = function(t, e) {
|
|
287
287
|
return t.__v.__b - e.__v.__b;
|
|
288
288
|
}, oe.__r = 0;
|
|
289
|
-
const
|
|
290
|
-
function D(t, e, n,
|
|
291
|
-
let
|
|
292
|
-
return n && (
|
|
289
|
+
const qt = "ibiz", Yt = "is-";
|
|
290
|
+
function D(t, e, n, i, s) {
|
|
291
|
+
let r = "".concat(t, "-").concat(e);
|
|
292
|
+
return n && (r += "-".concat(n)), i && (r += "__".concat(i)), s && (r += "--".concat(s)), r;
|
|
293
293
|
}
|
|
294
294
|
class F {
|
|
295
295
|
/**
|
|
@@ -309,7 +309,7 @@ class F {
|
|
|
309
309
|
* @type {string}
|
|
310
310
|
*/
|
|
311
311
|
H(this, "namespace");
|
|
312
|
-
this.block = e, this.namespace = n ||
|
|
312
|
+
this.block = e, this.namespace = n || qt;
|
|
313
313
|
}
|
|
314
314
|
/**
|
|
315
315
|
* namespace-block
|
|
@@ -391,8 +391,8 @@ class F {
|
|
|
391
391
|
* @param {string} [modifier]
|
|
392
392
|
* @return {*} {string}
|
|
393
393
|
*/
|
|
394
|
-
bem(e, n,
|
|
395
|
-
return e && n &&
|
|
394
|
+
bem(e, n, i) {
|
|
395
|
+
return e && n && i ? D(this.namespace, this.block, e, n, i) : "";
|
|
396
396
|
}
|
|
397
397
|
/**
|
|
398
398
|
* 返回状态 class
|
|
@@ -407,7 +407,7 @@ class F {
|
|
|
407
407
|
* @return {*} {string}
|
|
408
408
|
*/
|
|
409
409
|
is(e, n) {
|
|
410
|
-
return e && n ? "".concat(
|
|
410
|
+
return e && n ? "".concat(Yt).concat(e) : "";
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
413
413
|
* 生成使用到的 css 变量 style 对象
|
|
@@ -419,8 +419,8 @@ class F {
|
|
|
419
419
|
*/
|
|
420
420
|
cssVar(e) {
|
|
421
421
|
const n = {};
|
|
422
|
-
for (const
|
|
423
|
-
e[
|
|
422
|
+
for (const i in e)
|
|
423
|
+
e[i] && (n[this.cssVarName(i)] = e[i]);
|
|
424
424
|
return n;
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
@@ -433,8 +433,8 @@ class F {
|
|
|
433
433
|
*/
|
|
434
434
|
cssVarBlock(e) {
|
|
435
435
|
const n = {};
|
|
436
|
-
for (const
|
|
437
|
-
e[
|
|
436
|
+
for (const i in e)
|
|
437
|
+
e[i] && (n[this.cssVarBlockName(i)] = e[i]);
|
|
438
438
|
return n;
|
|
439
439
|
}
|
|
440
440
|
/**
|
|
@@ -464,57 +464,57 @@ function M(t) {
|
|
|
464
464
|
if (typeof t != "string")
|
|
465
465
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(t));
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
for (var n = "",
|
|
467
|
+
function Ie(t, e) {
|
|
468
|
+
for (var n = "", i = 0, s = -1, r = 0, o, l = 0; l <= t.length; ++l) {
|
|
469
469
|
if (l < t.length)
|
|
470
|
-
|
|
470
|
+
o = t.charCodeAt(l);
|
|
471
471
|
else {
|
|
472
|
-
if (
|
|
472
|
+
if (o === 47)
|
|
473
473
|
break;
|
|
474
|
-
|
|
474
|
+
o = 47;
|
|
475
475
|
}
|
|
476
|
-
if (
|
|
477
|
-
if (!(
|
|
478
|
-
if (
|
|
479
|
-
if (n.length < 2 ||
|
|
476
|
+
if (o === 47) {
|
|
477
|
+
if (!(s === l - 1 || r === 1))
|
|
478
|
+
if (s !== l - 1 && r === 2) {
|
|
479
|
+
if (n.length < 2 || i !== 2 || n.charCodeAt(n.length - 1) !== 46 || n.charCodeAt(n.length - 2) !== 46) {
|
|
480
480
|
if (n.length > 2) {
|
|
481
481
|
var c = n.lastIndexOf("/");
|
|
482
482
|
if (c !== n.length - 1) {
|
|
483
|
-
c === -1 ? (n = "",
|
|
483
|
+
c === -1 ? (n = "", i = 0) : (n = n.slice(0, c), i = n.length - 1 - n.lastIndexOf("/")), s = l, r = 0;
|
|
484
484
|
continue;
|
|
485
485
|
}
|
|
486
486
|
} else if (n.length === 2 || n.length === 1) {
|
|
487
|
-
n = "",
|
|
487
|
+
n = "", i = 0, s = l, r = 0;
|
|
488
488
|
continue;
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
e && (n.length > 0 ? n += "/.." : n = "..",
|
|
491
|
+
e && (n.length > 0 ? n += "/.." : n = "..", i = 2);
|
|
492
492
|
} else
|
|
493
|
-
n.length > 0 ? n += "/" + t.slice(
|
|
494
|
-
|
|
493
|
+
n.length > 0 ? n += "/" + t.slice(s + 1, l) : n = t.slice(s + 1, l), i = l - s - 1;
|
|
494
|
+
s = l, r = 0;
|
|
495
495
|
} else
|
|
496
|
-
|
|
496
|
+
o === 46 && r !== -1 ? ++r : r = -1;
|
|
497
497
|
}
|
|
498
498
|
return n;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
var n = e.dir || e.root,
|
|
502
|
-
return n ? n === e.root ? n +
|
|
500
|
+
function jt(t, e) {
|
|
501
|
+
var n = e.dir || e.root, i = e.base || (e.name || "") + (e.ext || "");
|
|
502
|
+
return n ? n === e.root ? n + i : n + t + i : i;
|
|
503
503
|
}
|
|
504
|
-
var
|
|
504
|
+
var X = {
|
|
505
505
|
// path.resolve([from ...], to)
|
|
506
506
|
resolve: function() {
|
|
507
|
-
for (var e = "", n = !1,
|
|
508
|
-
var
|
|
509
|
-
|
|
507
|
+
for (var e = "", n = !1, i, s = arguments.length - 1; s >= -1 && !n; s--) {
|
|
508
|
+
var r;
|
|
509
|
+
s >= 0 ? r = arguments[s] : (i === void 0 && (i = process.cwd()), r = i), M(r), r.length !== 0 && (e = r + "/" + e, n = r.charCodeAt(0) === 47);
|
|
510
510
|
}
|
|
511
|
-
return e =
|
|
511
|
+
return e = Ie(e, !n), n ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
512
512
|
},
|
|
513
513
|
normalize: function(e) {
|
|
514
514
|
if (M(e), e.length === 0)
|
|
515
515
|
return ".";
|
|
516
|
-
var n = e.charCodeAt(0) === 47,
|
|
517
|
-
return e =
|
|
516
|
+
var n = e.charCodeAt(0) === 47, i = e.charCodeAt(e.length - 1) === 47;
|
|
517
|
+
return e = Ie(e, !n), e.length === 0 && !n && (e = "."), e.length > 0 && i && (e += "/"), n ? "/" + e : e;
|
|
518
518
|
},
|
|
519
519
|
isAbsolute: function(e) {
|
|
520
520
|
return M(e), e.length > 0 && e.charCodeAt(0) === 47;
|
|
@@ -523,38 +523,38 @@ var j = {
|
|
|
523
523
|
if (arguments.length === 0)
|
|
524
524
|
return ".";
|
|
525
525
|
for (var e, n = 0; n < arguments.length; ++n) {
|
|
526
|
-
var
|
|
527
|
-
M(
|
|
526
|
+
var i = arguments[n];
|
|
527
|
+
M(i), i.length > 0 && (e === void 0 ? e = i : e += "/" + i);
|
|
528
528
|
}
|
|
529
|
-
return e === void 0 ? "." :
|
|
529
|
+
return e === void 0 ? "." : X.normalize(e);
|
|
530
530
|
},
|
|
531
531
|
relative: function(e, n) {
|
|
532
|
-
if (M(e), M(n), e === n || (e =
|
|
532
|
+
if (M(e), M(n), e === n || (e = X.resolve(e), n = X.resolve(n), e === n))
|
|
533
533
|
return "";
|
|
534
|
-
for (var
|
|
534
|
+
for (var i = 1; i < e.length && e.charCodeAt(i) === 47; ++i)
|
|
535
535
|
;
|
|
536
|
-
for (var
|
|
536
|
+
for (var s = e.length, r = s - i, o = 1; o < n.length && n.charCodeAt(o) === 47; ++o)
|
|
537
537
|
;
|
|
538
|
-
for (var l = n.length, c = l -
|
|
538
|
+
for (var l = n.length, c = l - o, p = r < c ? r : c, h = -1, a = 0; a <= p; ++a) {
|
|
539
539
|
if (a === p) {
|
|
540
540
|
if (c > p) {
|
|
541
|
-
if (n.charCodeAt(
|
|
542
|
-
return n.slice(
|
|
541
|
+
if (n.charCodeAt(o + a) === 47)
|
|
542
|
+
return n.slice(o + a + 1);
|
|
543
543
|
if (a === 0)
|
|
544
|
-
return n.slice(
|
|
544
|
+
return n.slice(o + a);
|
|
545
545
|
} else
|
|
546
|
-
|
|
546
|
+
r > p && (e.charCodeAt(i + a) === 47 ? h = a : a === 0 && (h = 0));
|
|
547
547
|
break;
|
|
548
548
|
}
|
|
549
|
-
var
|
|
550
|
-
if (
|
|
549
|
+
var m = e.charCodeAt(i + a), d = n.charCodeAt(o + a);
|
|
550
|
+
if (m !== d)
|
|
551
551
|
break;
|
|
552
|
-
|
|
552
|
+
m === 47 && (h = a);
|
|
553
553
|
}
|
|
554
|
-
var
|
|
555
|
-
for (a =
|
|
556
|
-
(a ===
|
|
557
|
-
return
|
|
554
|
+
var _ = "";
|
|
555
|
+
for (a = i + h + 1; a <= s; ++a)
|
|
556
|
+
(a === s || e.charCodeAt(a) === 47) && (_.length === 0 ? _ += ".." : _ += "/..");
|
|
557
|
+
return _.length > 0 ? _ + n.slice(o + h) : (o += h, n.charCodeAt(o) === 47 && ++o, n.slice(o));
|
|
558
558
|
},
|
|
559
559
|
_makeLong: function(e) {
|
|
560
560
|
return e;
|
|
@@ -562,102 +562,102 @@ var j = {
|
|
|
562
562
|
dirname: function(e) {
|
|
563
563
|
if (M(e), e.length === 0)
|
|
564
564
|
return ".";
|
|
565
|
-
for (var n = e.charCodeAt(0),
|
|
566
|
-
if (n = e.charCodeAt(
|
|
567
|
-
if (!
|
|
568
|
-
|
|
565
|
+
for (var n = e.charCodeAt(0), i = n === 47, s = -1, r = !0, o = e.length - 1; o >= 1; --o)
|
|
566
|
+
if (n = e.charCodeAt(o), n === 47) {
|
|
567
|
+
if (!r) {
|
|
568
|
+
s = o;
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
} else
|
|
572
|
-
|
|
573
|
-
return
|
|
572
|
+
r = !1;
|
|
573
|
+
return s === -1 ? i ? "/" : "." : i && s === 1 ? "//" : e.slice(0, s);
|
|
574
574
|
},
|
|
575
575
|
basename: function(e, n) {
|
|
576
576
|
if (n !== void 0 && typeof n != "string")
|
|
577
577
|
throw new TypeError('"ext" argument must be a string');
|
|
578
578
|
M(e);
|
|
579
|
-
var
|
|
579
|
+
var i = 0, s = -1, r = !0, o;
|
|
580
580
|
if (n !== void 0 && n.length > 0 && n.length <= e.length) {
|
|
581
581
|
if (n.length === e.length && n === e)
|
|
582
582
|
return "";
|
|
583
583
|
var l = n.length - 1, c = -1;
|
|
584
|
-
for (
|
|
585
|
-
var p = e.charCodeAt(
|
|
584
|
+
for (o = e.length - 1; o >= 0; --o) {
|
|
585
|
+
var p = e.charCodeAt(o);
|
|
586
586
|
if (p === 47) {
|
|
587
|
-
if (!
|
|
588
|
-
|
|
587
|
+
if (!r) {
|
|
588
|
+
i = o + 1;
|
|
589
589
|
break;
|
|
590
590
|
}
|
|
591
591
|
} else
|
|
592
|
-
c === -1 && (
|
|
592
|
+
c === -1 && (r = !1, c = o + 1), l >= 0 && (p === n.charCodeAt(l) ? --l === -1 && (s = o) : (l = -1, s = c));
|
|
593
593
|
}
|
|
594
|
-
return
|
|
594
|
+
return i === s ? s = c : s === -1 && (s = e.length), e.slice(i, s);
|
|
595
595
|
} else {
|
|
596
|
-
for (
|
|
597
|
-
if (e.charCodeAt(
|
|
598
|
-
if (!
|
|
599
|
-
|
|
596
|
+
for (o = e.length - 1; o >= 0; --o)
|
|
597
|
+
if (e.charCodeAt(o) === 47) {
|
|
598
|
+
if (!r) {
|
|
599
|
+
i = o + 1;
|
|
600
600
|
break;
|
|
601
601
|
}
|
|
602
602
|
} else
|
|
603
|
-
|
|
604
|
-
return
|
|
603
|
+
s === -1 && (r = !1, s = o + 1);
|
|
604
|
+
return s === -1 ? "" : e.slice(i, s);
|
|
605
605
|
}
|
|
606
606
|
},
|
|
607
607
|
extname: function(e) {
|
|
608
608
|
M(e);
|
|
609
|
-
for (var n = -1,
|
|
609
|
+
for (var n = -1, i = 0, s = -1, r = !0, o = 0, l = e.length - 1; l >= 0; --l) {
|
|
610
610
|
var c = e.charCodeAt(l);
|
|
611
611
|
if (c === 47) {
|
|
612
|
-
if (!
|
|
613
|
-
|
|
612
|
+
if (!r) {
|
|
613
|
+
i = l + 1;
|
|
614
614
|
break;
|
|
615
615
|
}
|
|
616
616
|
continue;
|
|
617
617
|
}
|
|
618
|
-
|
|
618
|
+
s === -1 && (r = !1, s = l + 1), c === 46 ? n === -1 ? n = l : o !== 1 && (o = 1) : n !== -1 && (o = -1);
|
|
619
619
|
}
|
|
620
|
-
return n === -1 ||
|
|
621
|
-
|
|
622
|
-
|
|
620
|
+
return n === -1 || s === -1 || // We saw a non-dot character immediately before the dot
|
|
621
|
+
o === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
622
|
+
o === 1 && n === s - 1 && n === i + 1 ? "" : e.slice(n, s);
|
|
623
623
|
},
|
|
624
624
|
format: function(e) {
|
|
625
625
|
if (e === null || typeof e != "object")
|
|
626
626
|
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
|
|
627
|
-
return
|
|
627
|
+
return jt("/", e);
|
|
628
628
|
},
|
|
629
629
|
parse: function(e) {
|
|
630
630
|
M(e);
|
|
631
631
|
var n = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
632
632
|
if (e.length === 0)
|
|
633
633
|
return n;
|
|
634
|
-
var
|
|
635
|
-
|
|
636
|
-
for (var
|
|
637
|
-
if (
|
|
634
|
+
var i = e.charCodeAt(0), s = i === 47, r;
|
|
635
|
+
s ? (n.root = "/", r = 1) : r = 0;
|
|
636
|
+
for (var o = -1, l = 0, c = -1, p = !0, h = e.length - 1, a = 0; h >= r; --h) {
|
|
637
|
+
if (i = e.charCodeAt(h), i === 47) {
|
|
638
638
|
if (!p) {
|
|
639
639
|
l = h + 1;
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
642
|
continue;
|
|
643
643
|
}
|
|
644
|
-
c === -1 && (p = !1, c = h + 1),
|
|
644
|
+
c === -1 && (p = !1, c = h + 1), i === 46 ? o === -1 ? o = h : a !== 1 && (a = 1) : o !== -1 && (a = -1);
|
|
645
645
|
}
|
|
646
|
-
return
|
|
646
|
+
return o === -1 || c === -1 || // We saw a non-dot character immediately before the dot
|
|
647
647
|
a === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
648
|
-
a === 1 &&
|
|
648
|
+
a === 1 && o === c - 1 && o === l + 1 ? c !== -1 && (l === 0 && s ? n.base = n.name = e.slice(1, c) : n.base = n.name = e.slice(l, c)) : (l === 0 && s ? (n.name = e.slice(1, o), n.base = e.slice(1, c)) : (n.name = e.slice(l, o), n.base = e.slice(l, c)), n.ext = e.slice(o, c)), l > 0 ? n.dir = e.slice(0, l - 1) : s && (n.dir = "/"), n;
|
|
649
649
|
},
|
|
650
650
|
sep: "/",
|
|
651
651
|
delimiter: ":",
|
|
652
652
|
win32: null,
|
|
653
653
|
posix: null
|
|
654
654
|
};
|
|
655
|
-
|
|
656
|
-
function
|
|
655
|
+
X.posix = X;
|
|
656
|
+
function T() {
|
|
657
657
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
658
658
|
}
|
|
659
659
|
function wt() {
|
|
660
|
-
return "".concat(
|
|
660
|
+
return "".concat(T() + T(), "-").concat(T(), "-").concat(T(), "-").concat(T(), "-").concat(T()).concat(T()).concat(T());
|
|
661
661
|
}
|
|
662
662
|
class $t {
|
|
663
663
|
/**
|
|
@@ -681,122 +681,122 @@ class $t {
|
|
|
681
681
|
* @type {(HTMLInputElement | null)}
|
|
682
682
|
*/
|
|
683
683
|
H($t, "inputElement", null);
|
|
684
|
-
var
|
|
684
|
+
var ce, x, ke, qe, ue = 0, kt = [], re = [], Ye = f.__b, je = f.__r, Xe = f.diffed, Je = f.__c, Ze = f.unmount;
|
|
685
685
|
function St(t, e) {
|
|
686
|
-
f.__h && f.__h(
|
|
687
|
-
var n =
|
|
686
|
+
f.__h && f.__h(x, t, ue || e), ue = 0;
|
|
687
|
+
var n = x.__H || (x.__H = { __: [], __h: [] });
|
|
688
688
|
return t >= n.__.length && n.__.push({ __V: re }), n.__[t];
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
var n = St(
|
|
692
|
-
!f.__s && Ct(n.__H, e) && (n.__ = t, n.i = e,
|
|
690
|
+
function _e(t, e) {
|
|
691
|
+
var n = St(ce++, 3);
|
|
692
|
+
!f.__s && Ct(n.__H, e) && (n.__ = t, n.i = e, x.__H.__h.push(n));
|
|
693
693
|
}
|
|
694
694
|
function ge(t) {
|
|
695
|
-
return
|
|
695
|
+
return ue = 5, Q(function() {
|
|
696
696
|
return { current: t };
|
|
697
697
|
}, []);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
700
|
-
var n = St(
|
|
699
|
+
function Q(t, e) {
|
|
700
|
+
var n = St(ce++, 7);
|
|
701
701
|
return Ct(n.__H, e) ? (n.__V = t(), n.i = e, n.__h = t, n.__V) : n.__;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
return
|
|
703
|
+
function Ge(t, e) {
|
|
704
|
+
return ue = 8, Q(function() {
|
|
705
705
|
return t;
|
|
706
706
|
}, e);
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function Xt() {
|
|
709
709
|
for (var t; t = kt.shift(); )
|
|
710
710
|
if (t.__P && t.__H)
|
|
711
711
|
try {
|
|
712
|
-
t.__H.__h.forEach(
|
|
712
|
+
t.__H.__h.forEach(se), t.__H.__h.forEach(Ae), t.__H.__h = [];
|
|
713
713
|
} catch (e) {
|
|
714
714
|
t.__H.__h = [], f.__e(e, t.__v);
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
f.__b = function(t) {
|
|
718
|
-
|
|
718
|
+
x = null, Ye && Ye(t);
|
|
719
719
|
}, f.__r = function(t) {
|
|
720
|
-
|
|
721
|
-
var e = (
|
|
722
|
-
e && (
|
|
720
|
+
je && je(t), ce = 0;
|
|
721
|
+
var e = (x = t.__c).__H;
|
|
722
|
+
e && (ke === x ? (e.__h = [], x.__h = [], e.__.forEach(function(n) {
|
|
723
723
|
n.__N && (n.__ = n.__N), n.__V = re, n.__N = n.i = void 0;
|
|
724
|
-
})) : (e.__h.forEach(
|
|
724
|
+
})) : (e.__h.forEach(se), e.__h.forEach(Ae), e.__h = [], ce = 0)), ke = x;
|
|
725
725
|
}, f.diffed = function(t) {
|
|
726
|
-
|
|
726
|
+
Xe && Xe(t);
|
|
727
727
|
var e = t.__c;
|
|
728
|
-
e && e.__H && (e.__H.__h.length && (kt.push(e) !== 1 &&
|
|
728
|
+
e && e.__H && (e.__H.__h.length && (kt.push(e) !== 1 && qe === f.requestAnimationFrame || ((qe = f.requestAnimationFrame) || Jt)(Xt)), e.__H.__.forEach(function(n) {
|
|
729
729
|
n.i && (n.__H = n.i), n.__V !== re && (n.__ = n.__V), n.i = void 0, n.__V = re;
|
|
730
|
-
})),
|
|
730
|
+
})), ke = x = null;
|
|
731
731
|
}, f.__c = function(t, e) {
|
|
732
732
|
e.some(function(n) {
|
|
733
733
|
try {
|
|
734
|
-
n.__h.forEach(
|
|
735
|
-
return !
|
|
734
|
+
n.__h.forEach(se), n.__h = n.__h.filter(function(i) {
|
|
735
|
+
return !i.__ || Ae(i);
|
|
736
736
|
});
|
|
737
|
-
} catch (
|
|
738
|
-
e.some(function(
|
|
739
|
-
|
|
740
|
-
}), e = [], f.__e(
|
|
737
|
+
} catch (i) {
|
|
738
|
+
e.some(function(s) {
|
|
739
|
+
s.__h && (s.__h = []);
|
|
740
|
+
}), e = [], f.__e(i, n.__v);
|
|
741
741
|
}
|
|
742
|
-
}),
|
|
742
|
+
}), Je && Je(t, e);
|
|
743
743
|
}, f.unmount = function(t) {
|
|
744
|
-
|
|
744
|
+
Ze && Ze(t);
|
|
745
745
|
var e, n = t.__c;
|
|
746
|
-
n && n.__H && (n.__H.__.forEach(function(
|
|
746
|
+
n && n.__H && (n.__H.__.forEach(function(i) {
|
|
747
747
|
try {
|
|
748
|
-
|
|
749
|
-
} catch (
|
|
750
|
-
e =
|
|
748
|
+
se(i);
|
|
749
|
+
} catch (s) {
|
|
750
|
+
e = s;
|
|
751
751
|
}
|
|
752
752
|
}), n.__H = void 0, e && f.__e(e, n.__v));
|
|
753
753
|
};
|
|
754
|
-
var
|
|
755
|
-
function
|
|
754
|
+
var Ke = typeof requestAnimationFrame == "function";
|
|
755
|
+
function Jt(t) {
|
|
756
756
|
var e, n = function() {
|
|
757
|
-
clearTimeout(
|
|
758
|
-
},
|
|
759
|
-
|
|
757
|
+
clearTimeout(i), Ke && cancelAnimationFrame(e), setTimeout(t);
|
|
758
|
+
}, i = setTimeout(n, 100);
|
|
759
|
+
Ke && (e = requestAnimationFrame(n));
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
var e =
|
|
763
|
-
typeof n == "function" && (t.__c = void 0, n()),
|
|
761
|
+
function se(t) {
|
|
762
|
+
var e = x, n = t.__c;
|
|
763
|
+
typeof n == "function" && (t.__c = void 0, n()), x = e;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
var e =
|
|
767
|
-
t.__c = t.__(),
|
|
765
|
+
function Ae(t) {
|
|
766
|
+
var e = x;
|
|
767
|
+
t.__c = t.__(), x = e;
|
|
768
768
|
}
|
|
769
769
|
function Ct(t, e) {
|
|
770
|
-
return !t || t.length !== e.length || e.some(function(n,
|
|
771
|
-
return n !== t[
|
|
770
|
+
return !t || t.length !== e.length || e.some(function(n, i) {
|
|
771
|
+
return n !== t[i];
|
|
772
772
|
});
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function ye() {
|
|
775
775
|
throw new Error("Cycle detected");
|
|
776
776
|
}
|
|
777
|
-
var
|
|
778
|
-
function
|
|
779
|
-
if (
|
|
780
|
-
|
|
777
|
+
var Zt = Symbol.for("preact-signals");
|
|
778
|
+
function Re() {
|
|
779
|
+
if (I > 1)
|
|
780
|
+
I--;
|
|
781
781
|
else {
|
|
782
|
-
for (var t, e = !1;
|
|
783
|
-
var n =
|
|
784
|
-
for (
|
|
785
|
-
var
|
|
786
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
|
782
|
+
for (var t, e = !1; J !== void 0; ) {
|
|
783
|
+
var n = J;
|
|
784
|
+
for (J = void 0, He++; n !== void 0; ) {
|
|
785
|
+
var i = n.o;
|
|
786
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && Nt(n))
|
|
787
787
|
try {
|
|
788
788
|
n.c();
|
|
789
|
-
} catch (
|
|
790
|
-
e || (t =
|
|
789
|
+
} catch (s) {
|
|
790
|
+
e || (t = s, e = !0);
|
|
791
791
|
}
|
|
792
|
-
n =
|
|
792
|
+
n = i;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
if (
|
|
795
|
+
if (He = 0, I--, e)
|
|
796
796
|
throw t;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
var y = void 0,
|
|
799
|
+
var y = void 0, J = void 0, I = 0, He = 0, fe = 0;
|
|
800
800
|
function xt(t) {
|
|
801
801
|
if (y !== void 0) {
|
|
802
802
|
var e = t.n;
|
|
@@ -809,7 +809,7 @@ function xt(t) {
|
|
|
809
809
|
function k(t) {
|
|
810
810
|
this.v = t, this.i = 0, this.n = void 0, this.t = void 0;
|
|
811
811
|
}
|
|
812
|
-
k.prototype.brand =
|
|
812
|
+
k.prototype.brand = Zt;
|
|
813
813
|
k.prototype.h = function() {
|
|
814
814
|
return !0;
|
|
815
815
|
};
|
|
@@ -824,13 +824,13 @@ k.prototype.U = function(t) {
|
|
|
824
824
|
};
|
|
825
825
|
k.prototype.subscribe = function(t) {
|
|
826
826
|
var e = this;
|
|
827
|
-
return
|
|
828
|
-
var n = e.value,
|
|
827
|
+
return be(function() {
|
|
828
|
+
var n = e.value, i = 32 & this.f;
|
|
829
829
|
this.f &= -33;
|
|
830
830
|
try {
|
|
831
831
|
t(n);
|
|
832
832
|
} finally {
|
|
833
|
-
this.f |=
|
|
833
|
+
this.f |= i;
|
|
834
834
|
}
|
|
835
835
|
});
|
|
836
836
|
};
|
|
@@ -853,25 +853,25 @@ Object.defineProperty(k.prototype, "value", { get: function() {
|
|
|
853
853
|
if (y instanceof U && function() {
|
|
854
854
|
throw new Error("Computed cannot have side-effects");
|
|
855
855
|
}(), t !== this.v) {
|
|
856
|
-
|
|
856
|
+
He > 100 && ye(), this.v = t, this.i++, fe++, I++;
|
|
857
857
|
try {
|
|
858
858
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
859
859
|
e.t.N();
|
|
860
860
|
} finally {
|
|
861
|
-
|
|
861
|
+
Re();
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
} });
|
|
865
|
-
function
|
|
865
|
+
function he(t) {
|
|
866
866
|
return new k(t);
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Nt(t) {
|
|
869
869
|
for (var e = t.s; e !== void 0; e = e.n)
|
|
870
870
|
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
|
|
871
871
|
return !0;
|
|
872
872
|
return !1;
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Et(t) {
|
|
875
875
|
for (var e = t.s; e !== void 0; e = e.n) {
|
|
876
876
|
var n = e.S.n;
|
|
877
877
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -882,24 +882,24 @@ function Nt(t) {
|
|
|
882
882
|
}
|
|
883
883
|
function At(t) {
|
|
884
884
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
|
885
|
-
var
|
|
886
|
-
e.i === -1 ? (e.S.U(e),
|
|
885
|
+
var i = e.p;
|
|
886
|
+
e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
|
|
887
887
|
}
|
|
888
888
|
t.s = n;
|
|
889
889
|
}
|
|
890
890
|
function U(t) {
|
|
891
|
-
k.call(this, void 0), this.x = t, this.s = void 0, this.g =
|
|
891
|
+
k.call(this, void 0), this.x = t, this.s = void 0, this.g = fe - 1, this.f = 4;
|
|
892
892
|
}
|
|
893
893
|
(U.prototype = new k()).h = function() {
|
|
894
894
|
if (this.f &= -3, 1 & this.f)
|
|
895
895
|
return !1;
|
|
896
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
|
896
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === fe))
|
|
897
897
|
return !0;
|
|
898
|
-
if (this.g =
|
|
898
|
+
if (this.g = fe, this.f |= 1, this.i > 0 && !Nt(this))
|
|
899
899
|
return this.f &= -2, !0;
|
|
900
900
|
var t = y;
|
|
901
901
|
try {
|
|
902
|
-
|
|
902
|
+
Et(this), y = this;
|
|
903
903
|
var e = this.x();
|
|
904
904
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
905
905
|
} catch (n) {
|
|
@@ -930,12 +930,12 @@ U.prototype.N = function() {
|
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
932
|
U.prototype.peek = function() {
|
|
933
|
-
if (this.h() ||
|
|
933
|
+
if (this.h() || ye(), 16 & this.f)
|
|
934
934
|
throw this.v;
|
|
935
935
|
return this.v;
|
|
936
936
|
};
|
|
937
937
|
Object.defineProperty(U.prototype, "value", { get: function() {
|
|
938
|
-
1 & this.f &&
|
|
938
|
+
1 & this.f && ye();
|
|
939
939
|
var t = xt(this);
|
|
940
940
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f)
|
|
941
941
|
throw this.v;
|
|
@@ -947,15 +947,15 @@ function Ht(t) {
|
|
|
947
947
|
function Mt(t) {
|
|
948
948
|
var e = t.u;
|
|
949
949
|
if (t.u = void 0, typeof e == "function") {
|
|
950
|
-
|
|
950
|
+
I++;
|
|
951
951
|
var n = y;
|
|
952
952
|
y = void 0;
|
|
953
953
|
try {
|
|
954
954
|
e();
|
|
955
|
-
} catch (
|
|
956
|
-
throw t.f &= -2, t.f |= 8, Te(t),
|
|
955
|
+
} catch (i) {
|
|
956
|
+
throw t.f &= -2, t.f |= 8, Te(t), i;
|
|
957
957
|
} finally {
|
|
958
|
-
y = n,
|
|
958
|
+
y = n, Re();
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
}
|
|
@@ -964,15 +964,15 @@ function Te(t) {
|
|
|
964
964
|
e.S.U(e);
|
|
965
965
|
t.x = void 0, t.s = void 0, Mt(t);
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function Gt(t) {
|
|
968
968
|
if (y !== this)
|
|
969
969
|
throw new Error("Out-of-order effect");
|
|
970
|
-
At(this), y = t, this.f &= -2, 8 & this.f && Te(this),
|
|
970
|
+
At(this), y = t, this.f &= -2, 8 & this.f && Te(this), Re();
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function ee(t) {
|
|
973
973
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
ee.prototype.c = function() {
|
|
976
976
|
var t = this.S();
|
|
977
977
|
try {
|
|
978
978
|
if (8 & this.f || this.x === void 0)
|
|
@@ -983,19 +983,19 @@ Q.prototype.c = function() {
|
|
|
983
983
|
t();
|
|
984
984
|
}
|
|
985
985
|
};
|
|
986
|
-
|
|
987
|
-
1 & this.f &&
|
|
986
|
+
ee.prototype.S = function() {
|
|
987
|
+
1 & this.f && ye(), this.f |= 1, this.f &= -9, Mt(this), Et(this), I++;
|
|
988
988
|
var t = y;
|
|
989
|
-
return y = this,
|
|
989
|
+
return y = this, Gt.bind(this, t);
|
|
990
990
|
};
|
|
991
|
-
|
|
992
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
991
|
+
ee.prototype.N = function() {
|
|
992
|
+
2 & this.f || (this.f |= 2, this.o = J, J = this);
|
|
993
993
|
};
|
|
994
|
-
|
|
994
|
+
ee.prototype.d = function() {
|
|
995
995
|
this.f |= 8, 1 & this.f || Te(this);
|
|
996
996
|
};
|
|
997
|
-
function
|
|
998
|
-
var e = new
|
|
997
|
+
function be(t) {
|
|
998
|
+
var e = new ee(t);
|
|
999
999
|
try {
|
|
1000
1000
|
e.c();
|
|
1001
1001
|
} catch (n) {
|
|
@@ -1003,312 +1003,342 @@ function ye(t) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
return e.d.bind(e);
|
|
1005
1005
|
}
|
|
1006
|
-
var
|
|
1007
|
-
function
|
|
1006
|
+
var we, Se;
|
|
1007
|
+
function Y(t, e) {
|
|
1008
1008
|
f[t] = e.bind(null, f[t] || function() {
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1011
|
+
function de(t) {
|
|
1012
|
+
Se && Se(), Se = t && t.S();
|
|
1013
1013
|
}
|
|
1014
1014
|
function zt(t) {
|
|
1015
|
-
var e = this, n = t.data,
|
|
1016
|
-
|
|
1017
|
-
var
|
|
1018
|
-
for (var
|
|
1019
|
-
if (
|
|
1020
|
-
|
|
1015
|
+
var e = this, n = t.data, i = ve(n);
|
|
1016
|
+
i.value = n;
|
|
1017
|
+
var s = Q(function() {
|
|
1018
|
+
for (var r = e.__v; r = r.__; )
|
|
1019
|
+
if (r.__c) {
|
|
1020
|
+
r.__c.__$f |= 4;
|
|
1021
1021
|
break;
|
|
1022
1022
|
}
|
|
1023
1023
|
return e.__$u.c = function() {
|
|
1024
|
-
var
|
|
1025
|
-
!ft(
|
|
1024
|
+
var o;
|
|
1025
|
+
!ft(s.peek()) && ((o = e.base) == null ? void 0 : o.nodeType) === 3 ? e.base.data = s.peek() : (e.__$f |= 1, e.setState({}));
|
|
1026
1026
|
}, Ht(function() {
|
|
1027
|
-
var
|
|
1028
|
-
return
|
|
1027
|
+
var o = i.value.value;
|
|
1028
|
+
return o === 0 ? 0 : o === !0 ? "" : o || "";
|
|
1029
1029
|
});
|
|
1030
1030
|
}, []);
|
|
1031
|
-
return
|
|
1031
|
+
return s.value;
|
|
1032
1032
|
}
|
|
1033
1033
|
zt.displayName = "_st";
|
|
1034
1034
|
Object.defineProperties(k.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: zt }, props: { configurable: !0, get: function() {
|
|
1035
1035
|
return { data: this };
|
|
1036
1036
|
} }, __b: { configurable: !0, value: 1 } });
|
|
1037
|
-
|
|
1037
|
+
Y("__b", function(t, e) {
|
|
1038
1038
|
if (typeof e.type == "string") {
|
|
1039
|
-
var n,
|
|
1040
|
-
for (var
|
|
1041
|
-
if (
|
|
1042
|
-
var
|
|
1043
|
-
|
|
1039
|
+
var n, i = e.props;
|
|
1040
|
+
for (var s in i)
|
|
1041
|
+
if (s !== "children") {
|
|
1042
|
+
var r = i[s];
|
|
1043
|
+
r instanceof k && (n || (e.__np = n = {}), n[s] = r, i[s] = r.peek());
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
t(e);
|
|
1047
1047
|
});
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
var n,
|
|
1051
|
-
|
|
1052
|
-
var
|
|
1053
|
-
return
|
|
1054
|
-
|
|
1055
|
-
}),
|
|
1056
|
-
|
|
1057
|
-
},
|
|
1058
|
-
}())),
|
|
1048
|
+
Y("__r", function(t, e) {
|
|
1049
|
+
de();
|
|
1050
|
+
var n, i = e.__c;
|
|
1051
|
+
i && (i.__$f &= -2, (n = i.__$u) === void 0 && (i.__$u = n = function(s) {
|
|
1052
|
+
var r;
|
|
1053
|
+
return be(function() {
|
|
1054
|
+
r = this;
|
|
1055
|
+
}), r.c = function() {
|
|
1056
|
+
i.__$f |= 1, i.setState({});
|
|
1057
|
+
}, r;
|
|
1058
|
+
}())), we = i, de(n), t(e);
|
|
1059
1059
|
});
|
|
1060
|
-
|
|
1061
|
-
|
|
1060
|
+
Y("__e", function(t, e, n, i) {
|
|
1061
|
+
de(), we = void 0, t(e, n, i);
|
|
1062
1062
|
});
|
|
1063
|
-
|
|
1064
|
-
|
|
1063
|
+
Y("diffed", function(t, e) {
|
|
1064
|
+
de(), we = void 0;
|
|
1065
1065
|
var n;
|
|
1066
1066
|
if (typeof e.type == "string" && (n = e.__e)) {
|
|
1067
|
-
var
|
|
1068
|
-
if (
|
|
1069
|
-
var
|
|
1070
|
-
if (
|
|
1071
|
-
for (var
|
|
1072
|
-
var l =
|
|
1073
|
-
l !== void 0 && !(
|
|
1067
|
+
var i = e.__np, s = e.props;
|
|
1068
|
+
if (i) {
|
|
1069
|
+
var r = n.U;
|
|
1070
|
+
if (r)
|
|
1071
|
+
for (var o in r) {
|
|
1072
|
+
var l = r[o];
|
|
1073
|
+
l !== void 0 && !(o in i) && (l.d(), r[o] = void 0);
|
|
1074
1074
|
}
|
|
1075
1075
|
else
|
|
1076
|
-
n.U =
|
|
1077
|
-
for (var c in
|
|
1078
|
-
var p =
|
|
1079
|
-
p === void 0 ? (p =
|
|
1076
|
+
n.U = r = {};
|
|
1077
|
+
for (var c in i) {
|
|
1078
|
+
var p = r[c], h = i[c];
|
|
1079
|
+
p === void 0 ? (p = Kt(n, c, h, s), r[c] = p) : p.o(h, s);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
t(e);
|
|
1084
1084
|
});
|
|
1085
|
-
function
|
|
1086
|
-
var
|
|
1087
|
-
return { o: function(
|
|
1088
|
-
|
|
1089
|
-
}, d:
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1085
|
+
function Kt(t, e, n, i) {
|
|
1086
|
+
var s = e in t && t.ownerSVGElement === void 0, r = he(n);
|
|
1087
|
+
return { o: function(o, l) {
|
|
1088
|
+
r.value = o, i = l;
|
|
1089
|
+
}, d: be(function() {
|
|
1090
|
+
var o = r.value.value;
|
|
1091
|
+
i[e] !== o && (i[e] = o, s ? t[e] = o : o ? t.setAttribute(e, o) : t.removeAttribute(e));
|
|
1092
1092
|
}) };
|
|
1093
1093
|
}
|
|
1094
|
-
|
|
1094
|
+
Y("unmount", function(t, e) {
|
|
1095
1095
|
if (typeof e.type == "string") {
|
|
1096
1096
|
var n = e.__e;
|
|
1097
1097
|
if (n) {
|
|
1098
|
-
var
|
|
1099
|
-
if (
|
|
1098
|
+
var i = n.U;
|
|
1099
|
+
if (i) {
|
|
1100
1100
|
n.U = void 0;
|
|
1101
|
-
for (var
|
|
1102
|
-
var
|
|
1103
|
-
|
|
1101
|
+
for (var s in i) {
|
|
1102
|
+
var r = i[s];
|
|
1103
|
+
r && r.d();
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
} else {
|
|
1108
|
-
var
|
|
1109
|
-
if (
|
|
1110
|
-
var l =
|
|
1111
|
-
l && (
|
|
1108
|
+
var o = e.__c;
|
|
1109
|
+
if (o) {
|
|
1110
|
+
var l = o.__$u;
|
|
1111
|
+
l && (o.__$u = void 0, l.d());
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
t(e);
|
|
1115
1115
|
});
|
|
1116
|
-
|
|
1117
|
-
(
|
|
1116
|
+
Y("__h", function(t, e, n, i) {
|
|
1117
|
+
(i < 3 || i === 9) && (e.__$f |= 2), t(e, n, i);
|
|
1118
1118
|
});
|
|
1119
1119
|
A.prototype.shouldComponentUpdate = function(t, e) {
|
|
1120
1120
|
var n = this.__$u;
|
|
1121
1121
|
if (!(n && n.s !== void 0 || 4 & this.__$f) || 3 & this.__$f)
|
|
1122
1122
|
return !0;
|
|
1123
|
-
for (var
|
|
1123
|
+
for (var i in e)
|
|
1124
1124
|
return !0;
|
|
1125
|
-
for (var
|
|
1126
|
-
if (
|
|
1125
|
+
for (var s in t)
|
|
1126
|
+
if (s !== "__source" && t[s] !== this.props[s])
|
|
1127
1127
|
return !0;
|
|
1128
|
-
for (var
|
|
1129
|
-
if (!(
|
|
1128
|
+
for (var r in this.props)
|
|
1129
|
+
if (!(r in t))
|
|
1130
1130
|
return !0;
|
|
1131
1131
|
return !1;
|
|
1132
1132
|
};
|
|
1133
|
-
function
|
|
1134
|
-
return
|
|
1135
|
-
return
|
|
1133
|
+
function ve(t) {
|
|
1134
|
+
return Q(function() {
|
|
1135
|
+
return he(t);
|
|
1136
1136
|
}, []);
|
|
1137
1137
|
}
|
|
1138
1138
|
function Le(t) {
|
|
1139
1139
|
var e = ge(t);
|
|
1140
|
-
return e.current = t,
|
|
1140
|
+
return e.current = t, we.__$f |= 4, Q(function() {
|
|
1141
1141
|
return Ht(function() {
|
|
1142
1142
|
return e.current();
|
|
1143
1143
|
});
|
|
1144
1144
|
}, []);
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function Qt(t) {
|
|
1147
1147
|
var e = ge(t);
|
|
1148
|
-
e.current = t,
|
|
1149
|
-
return
|
|
1148
|
+
e.current = t, _e(function() {
|
|
1149
|
+
return be(function() {
|
|
1150
1150
|
return e.current();
|
|
1151
1151
|
});
|
|
1152
1152
|
}, []);
|
|
1153
1153
|
}
|
|
1154
|
-
var
|
|
1155
|
-
function
|
|
1156
|
-
var
|
|
1154
|
+
var en = 0;
|
|
1155
|
+
function u(t, e, n, i, s, r) {
|
|
1156
|
+
var o, l, c = {};
|
|
1157
1157
|
for (l in e)
|
|
1158
|
-
l == "ref" ?
|
|
1159
|
-
var p = { type: t, props: c, key: n, ref:
|
|
1160
|
-
if (typeof t == "function" && (
|
|
1161
|
-
for (l in
|
|
1162
|
-
c[l] === void 0 && (c[l] =
|
|
1158
|
+
l == "ref" ? o = e[l] : c[l] = e[l];
|
|
1159
|
+
var p = { type: t, props: c, key: n, ref: o, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --en, __source: s, __self: r };
|
|
1160
|
+
if (typeof t == "function" && (o = t.defaultProps))
|
|
1161
|
+
for (l in o)
|
|
1162
|
+
c[l] === void 0 && (c[l] = o[l]);
|
|
1163
1163
|
return f.vnode && f.vnode(p), p;
|
|
1164
1164
|
}
|
|
1165
|
-
const
|
|
1165
|
+
const tn = () => u("svg", {
|
|
1166
1166
|
viewBox: "0 0 1024 1024",
|
|
1167
1167
|
version: "1.1",
|
|
1168
1168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1169
|
-
children:
|
|
1169
|
+
children: u("path", {
|
|
1170
1170
|
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"
|
|
1171
1171
|
})
|
|
1172
|
-
}),
|
|
1172
|
+
}), nn = () => u("svg", {
|
|
1173
1173
|
className: "icon",
|
|
1174
1174
|
viewBox: "0 0 1024 1024",
|
|
1175
1175
|
version: "1.1",
|
|
1176
1176
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1177
|
-
children:
|
|
1177
|
+
children: u("path", {
|
|
1178
1178
|
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"
|
|
1179
1179
|
})
|
|
1180
|
-
}),
|
|
1180
|
+
}), rn = () => u("svg", {
|
|
1181
1181
|
viewBox: "0 0 1024 1024",
|
|
1182
1182
|
version: "1.1",
|
|
1183
1183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1184
|
-
children:
|
|
1184
|
+
children: u("path", {
|
|
1185
1185
|
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"
|
|
1186
1186
|
})
|
|
1187
|
-
}),
|
|
1187
|
+
}), sn = () => u("svg", {
|
|
1188
1188
|
viewBox: "0 0 1024 1024",
|
|
1189
1189
|
version: "1.1",
|
|
1190
1190
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1191
|
-
children:
|
|
1191
|
+
children: u("path", {
|
|
1192
1192
|
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"
|
|
1193
1193
|
})
|
|
1194
|
-
}),
|
|
1194
|
+
}), Pt = () => u("svg", {
|
|
1195
1195
|
viewBox: "0 0 1024 1024",
|
|
1196
1196
|
version: "1.1",
|
|
1197
1197
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1198
|
-
children:
|
|
1198
|
+
children: u("path", {
|
|
1199
1199
|
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"
|
|
1200
1200
|
})
|
|
1201
|
-
}),
|
|
1201
|
+
}), on = () => u("svg", {
|
|
1202
1202
|
viewBox: "0 0 1024 1024",
|
|
1203
1203
|
version: "1.1",
|
|
1204
1204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1205
|
-
children:
|
|
1205
|
+
children: u("path", {
|
|
1206
1206
|
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"
|
|
1207
1207
|
})
|
|
1208
|
-
}), an = () =>
|
|
1208
|
+
}), an = () => u("svg", {
|
|
1209
1209
|
viewBox: "0 0 1024 1024",
|
|
1210
1210
|
version: "1.1",
|
|
1211
1211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1212
|
-
children:
|
|
1212
|
+
children: u("path", {
|
|
1213
1213
|
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"
|
|
1214
1214
|
})
|
|
1215
|
-
}), ln = () =>
|
|
1215
|
+
}), ln = () => u("svg", {
|
|
1216
1216
|
viewBox: "0 0 1024 1024",
|
|
1217
1217
|
version: "1.1",
|
|
1218
1218
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1219
|
-
children:
|
|
1219
|
+
children: u("path", {
|
|
1220
1220
|
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"
|
|
1221
1221
|
})
|
|
1222
1222
|
});
|
|
1223
|
-
const
|
|
1223
|
+
const S = new F("markdown-message"), cn = (t) => {
|
|
1224
1224
|
const {
|
|
1225
1225
|
message: e,
|
|
1226
1226
|
size: n
|
|
1227
|
-
} = t,
|
|
1228
|
-
|
|
1229
|
-
n >= 0 &&
|
|
1230
|
-
}, [e, n]),
|
|
1231
|
-
|
|
1232
|
-
id:
|
|
1227
|
+
} = t, i = ve(wt()), s = ve(null);
|
|
1228
|
+
_e(() => {
|
|
1229
|
+
n >= 0 && s.value && s.value.setMarkdown(e.content);
|
|
1230
|
+
}, [e, n]), _e(() => {
|
|
1231
|
+
s.value = new Dt({
|
|
1232
|
+
id: i,
|
|
1233
1233
|
value: e.content,
|
|
1234
1234
|
editor: {
|
|
1235
1235
|
defaultModel: "previewOnly"
|
|
1236
1236
|
}
|
|
1237
1237
|
});
|
|
1238
1238
|
}, []);
|
|
1239
|
-
const
|
|
1239
|
+
const r = () => {
|
|
1240
1240
|
t.controller.backfill(e);
|
|
1241
|
-
},
|
|
1241
|
+
}, o = () => {
|
|
1242
1242
|
t.controller.deleteMessage(e);
|
|
1243
1243
|
}, l = () => {
|
|
1244
1244
|
t.controller.refreshMessage(e);
|
|
1245
1245
|
}, c = () => {
|
|
1246
1246
|
t.controller.copyMessage(e);
|
|
1247
1247
|
};
|
|
1248
|
-
return
|
|
1249
|
-
className: "".concat(
|
|
1250
|
-
children: [
|
|
1251
|
-
className:
|
|
1252
|
-
children: [
|
|
1253
|
-
className:
|
|
1248
|
+
return u("div", {
|
|
1249
|
+
className: "".concat(S.b(), " ").concat(S.is("loading", e.state === 20)),
|
|
1250
|
+
children: [u("div", {
|
|
1251
|
+
className: S.b("header"),
|
|
1252
|
+
children: [u("div", {
|
|
1253
|
+
className: S.be("header", "caption"),
|
|
1254
1254
|
children: "AI "
|
|
1255
|
-
}),
|
|
1256
|
-
className:
|
|
1257
|
-
children: [
|
|
1258
|
-
className:
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1255
|
+
}), u("div", {
|
|
1256
|
+
className: S.b("header-action-wrapper"),
|
|
1257
|
+
children: [u("div", {
|
|
1258
|
+
className: S.be("header", "action-item"),
|
|
1259
|
+
onClick: r,
|
|
1260
|
+
children: [u(nn, {}), u("span", {
|
|
1261
|
+
className: S.bem("header", "action-item", "title"),
|
|
1262
|
+
children: "回填"
|
|
1263
|
+
})]
|
|
1264
|
+
}), u("div", {
|
|
1265
|
+
className: S.be("header", "action-item"),
|
|
1265
1266
|
onClick: l,
|
|
1266
|
-
children:
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1267
|
+
children: [u(Pt, {}), u("span", {
|
|
1268
|
+
className: S.bem("header", "action-item", "title"),
|
|
1269
|
+
children: "刷新"
|
|
1270
|
+
})]
|
|
1271
|
+
}), u("div", {
|
|
1272
|
+
className: S.be("header", "action-item"),
|
|
1273
|
+
onClick: o,
|
|
1274
|
+
children: [u(sn, {}), u("span", {
|
|
1275
|
+
className: S.bem("header", "action-item", "title"),
|
|
1276
|
+
children: "删除"
|
|
1277
|
+
})]
|
|
1278
|
+
}), u("div", {
|
|
1279
|
+
className: S.be("header", "action-item"),
|
|
1275
1280
|
onClick: c,
|
|
1276
|
-
children:
|
|
1281
|
+
children: [u(on, {}), u("span", {
|
|
1282
|
+
className: S.bem("header", "action-item", "title"),
|
|
1283
|
+
children: "复制"
|
|
1284
|
+
})]
|
|
1277
1285
|
})]
|
|
1278
1286
|
})]
|
|
1279
|
-
}),
|
|
1280
|
-
className:
|
|
1281
|
-
children:
|
|
1282
|
-
id:
|
|
1287
|
+
}), u("div", {
|
|
1288
|
+
className: S.b("content"),
|
|
1289
|
+
children: u("div", {
|
|
1290
|
+
id: i
|
|
1283
1291
|
})
|
|
1284
|
-
}),
|
|
1285
|
-
className:
|
|
1292
|
+
}), u("div", {
|
|
1293
|
+
className: S.b("footer")
|
|
1286
1294
|
})]
|
|
1287
1295
|
});
|
|
1288
1296
|
};
|
|
1289
|
-
const
|
|
1290
|
-
const e = Le(() => t.message.content)
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
+
const V = new F("user-message-question"), un = (t) => {
|
|
1298
|
+
const e = Le(() => t.message.content), n = () => {
|
|
1299
|
+
t.controller.refreshMessage(t.message, !0);
|
|
1300
|
+
};
|
|
1301
|
+
return u("div", {
|
|
1302
|
+
className: V.b(),
|
|
1303
|
+
children: [u("div", {
|
|
1304
|
+
className: V.e("user-header"),
|
|
1305
|
+
children: [u("div", {
|
|
1306
|
+
className: V.e("user-action"),
|
|
1307
|
+
onClick: n,
|
|
1308
|
+
children: [u(Pt, {}), u("span", {
|
|
1309
|
+
className: V.em("user-action", "title"),
|
|
1310
|
+
children: "刷新"
|
|
1311
|
+
})]
|
|
1312
|
+
}), u("div", {
|
|
1313
|
+
className: V.e("user"),
|
|
1314
|
+
children: "我"
|
|
1315
|
+
})]
|
|
1316
|
+
}), u("div", {
|
|
1317
|
+
className: V.e("content"),
|
|
1318
|
+
children: u("div", {
|
|
1319
|
+
dir: "auto",
|
|
1320
|
+
className: V.em("content", "body"),
|
|
1321
|
+
children: u("p", {
|
|
1322
|
+
dir: "auto",
|
|
1323
|
+
children: e
|
|
1324
|
+
})
|
|
1325
|
+
})
|
|
1326
|
+
})]
|
|
1297
1327
|
});
|
|
1298
1328
|
};
|
|
1299
1329
|
const Qe = new F("error-message"), _n = (t) => {
|
|
1300
1330
|
const e = Le(() => t.message.content);
|
|
1301
|
-
return
|
|
1331
|
+
return u("div", {
|
|
1302
1332
|
className: Qe.b(),
|
|
1303
|
-
children:
|
|
1333
|
+
children: u("span", {
|
|
1304
1334
|
className: Qe.e("content"),
|
|
1305
1335
|
children: e
|
|
1306
1336
|
})
|
|
1307
1337
|
});
|
|
1308
1338
|
};
|
|
1309
|
-
const et = new F("unknown-message"), fn = (t) =>
|
|
1339
|
+
const et = new F("unknown-message"), fn = (t) => u("div", {
|
|
1310
1340
|
className: et.b(),
|
|
1311
|
-
children:
|
|
1341
|
+
children: u("span", {
|
|
1312
1342
|
className: et.e("content"),
|
|
1313
1343
|
children: ["暂未支持的消息类型: ", t.message.type]
|
|
1314
1344
|
})
|
|
@@ -1317,20 +1347,20 @@ const et = new F("unknown-message"), fn = (t) => _("div", {
|
|
|
1317
1347
|
message: e,
|
|
1318
1348
|
size: n
|
|
1319
1349
|
} = t;
|
|
1320
|
-
let
|
|
1350
|
+
let i = null;
|
|
1321
1351
|
switch (e.type) {
|
|
1322
1352
|
case "DEFAULT":
|
|
1323
|
-
|
|
1353
|
+
i = e.role === "ASSISTANT" ? cn : un;
|
|
1324
1354
|
break;
|
|
1325
1355
|
case "ERROR":
|
|
1326
|
-
|
|
1356
|
+
i = _n;
|
|
1327
1357
|
break;
|
|
1328
1358
|
default:
|
|
1329
|
-
|
|
1359
|
+
i = fn;
|
|
1330
1360
|
}
|
|
1331
|
-
return
|
|
1361
|
+
return u("div", {
|
|
1332
1362
|
className: hn.b(),
|
|
1333
|
-
children:
|
|
1363
|
+
children: G(i, {
|
|
1334
1364
|
size: n,
|
|
1335
1365
|
message: e,
|
|
1336
1366
|
controller: t.controller
|
|
@@ -1339,23 +1369,23 @@ const et = new F("unknown-message"), fn = (t) => _("div", {
|
|
|
1339
1369
|
};
|
|
1340
1370
|
const vn = new F("chat-messages"), pn = (t) => {
|
|
1341
1371
|
const e = ge(null), n = t.controller.messages;
|
|
1342
|
-
return
|
|
1372
|
+
return Qt(() => {
|
|
1343
1373
|
e.current && n.value.length > 0 && (e.current.scrollTop = e.current.scrollHeight);
|
|
1344
|
-
}),
|
|
1374
|
+
}), u("div", {
|
|
1345
1375
|
ref: e,
|
|
1346
1376
|
className: vn.b(),
|
|
1347
|
-
children: n.value.map((
|
|
1348
|
-
var
|
|
1349
|
-
const
|
|
1350
|
-
return
|
|
1351
|
-
message:
|
|
1352
|
-
size:
|
|
1377
|
+
children: n.value.map((i) => {
|
|
1378
|
+
var r;
|
|
1379
|
+
const s = ((r = i.content) == null ? void 0 : r.length) || 0;
|
|
1380
|
+
return u(dn, {
|
|
1381
|
+
message: i,
|
|
1382
|
+
size: s,
|
|
1353
1383
|
controller: t.controller
|
|
1354
|
-
},
|
|
1384
|
+
}, i.messageid);
|
|
1355
1385
|
})
|
|
1356
1386
|
});
|
|
1357
1387
|
};
|
|
1358
|
-
function
|
|
1388
|
+
function mn(t, e) {
|
|
1359
1389
|
for (var n in e)
|
|
1360
1390
|
t[n] = e[n];
|
|
1361
1391
|
return t;
|
|
@@ -1364,8 +1394,8 @@ function tt(t, e) {
|
|
|
1364
1394
|
for (var n in t)
|
|
1365
1395
|
if (n !== "__source" && !(n in e))
|
|
1366
1396
|
return !0;
|
|
1367
|
-
for (var
|
|
1368
|
-
if (
|
|
1397
|
+
for (var i in e)
|
|
1398
|
+
if (i !== "__source" && t[i] !== e[i])
|
|
1369
1399
|
return !0;
|
|
1370
1400
|
return !1;
|
|
1371
1401
|
}
|
|
@@ -1375,78 +1405,78 @@ function nt(t) {
|
|
|
1375
1405
|
(nt.prototype = new A()).isPureReactComponent = !0, nt.prototype.shouldComponentUpdate = function(t, e) {
|
|
1376
1406
|
return tt(this.props, t) || tt(this.state, e);
|
|
1377
1407
|
};
|
|
1378
|
-
var
|
|
1408
|
+
var it = f.__b;
|
|
1379
1409
|
f.__b = function(t) {
|
|
1380
|
-
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null),
|
|
1410
|
+
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), it && it(t);
|
|
1381
1411
|
};
|
|
1382
|
-
var
|
|
1383
|
-
f.__e = function(t, e, n,
|
|
1412
|
+
var gn = f.__e;
|
|
1413
|
+
f.__e = function(t, e, n, i) {
|
|
1384
1414
|
if (t.then) {
|
|
1385
|
-
for (var
|
|
1386
|
-
if ((
|
|
1387
|
-
return e.__e == null && (e.__e = n.__e, e.__k = n.__k),
|
|
1415
|
+
for (var s, r = e; r = r.__; )
|
|
1416
|
+
if ((s = r.__c) && s.__c)
|
|
1417
|
+
return e.__e == null && (e.__e = n.__e, e.__k = n.__k), s.__c(t, e);
|
|
1388
1418
|
}
|
|
1389
|
-
|
|
1419
|
+
gn(t, e, n, i);
|
|
1390
1420
|
};
|
|
1391
|
-
var
|
|
1392
|
-
function
|
|
1393
|
-
return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(
|
|
1394
|
-
typeof
|
|
1395
|
-
}), t.__c.__H = null), (t =
|
|
1396
|
-
return
|
|
1421
|
+
var rt = f.unmount;
|
|
1422
|
+
function Rt(t, e, n) {
|
|
1423
|
+
return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(i) {
|
|
1424
|
+
typeof i.__c == "function" && i.__c();
|
|
1425
|
+
}), t.__c.__H = null), (t = mn({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(i) {
|
|
1426
|
+
return Rt(i, e, n);
|
|
1397
1427
|
})), t;
|
|
1398
1428
|
}
|
|
1399
1429
|
function Tt(t, e, n) {
|
|
1400
|
-
return t && n && (t.__v = null, t.__k = t.__k && t.__k.map(function(
|
|
1401
|
-
return Tt(
|
|
1430
|
+
return t && n && (t.__v = null, t.__k = t.__k && t.__k.map(function(i) {
|
|
1431
|
+
return Tt(i, e, n);
|
|
1402
1432
|
}), t.__c && t.__c.__P === e && (t.__e && n.insertBefore(t.__e, t.__d), t.__c.__e = !0, t.__c.__P = n)), t;
|
|
1403
1433
|
}
|
|
1404
|
-
function
|
|
1434
|
+
function Ce() {
|
|
1405
1435
|
this.__u = 0, this.t = null, this.__b = null;
|
|
1406
1436
|
}
|
|
1407
1437
|
function Lt(t) {
|
|
1408
1438
|
var e = t.__.__c;
|
|
1409
1439
|
return e && e.__a && e.__a(t);
|
|
1410
1440
|
}
|
|
1411
|
-
function
|
|
1441
|
+
function ne() {
|
|
1412
1442
|
this.u = null, this.o = null;
|
|
1413
1443
|
}
|
|
1414
1444
|
f.unmount = function(t) {
|
|
1415
1445
|
var e = t.__c;
|
|
1416
|
-
e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null),
|
|
1417
|
-
}, (
|
|
1418
|
-
var n = e.__c,
|
|
1419
|
-
|
|
1420
|
-
var
|
|
1421
|
-
|
|
1446
|
+
e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null), rt && rt(t);
|
|
1447
|
+
}, (Ce.prototype = new A()).__c = function(t, e) {
|
|
1448
|
+
var n = e.__c, i = this;
|
|
1449
|
+
i.t == null && (i.t = []), i.t.push(n);
|
|
1450
|
+
var s = Lt(i.__v), r = !1, o = function() {
|
|
1451
|
+
r || (r = !0, n.__R = null, s ? s(l) : l());
|
|
1422
1452
|
};
|
|
1423
|
-
n.__R =
|
|
1453
|
+
n.__R = o;
|
|
1424
1454
|
var l = function() {
|
|
1425
|
-
if (!--
|
|
1426
|
-
if (
|
|
1427
|
-
var p =
|
|
1428
|
-
|
|
1455
|
+
if (!--i.__u) {
|
|
1456
|
+
if (i.state.__a) {
|
|
1457
|
+
var p = i.state.__a;
|
|
1458
|
+
i.__v.__k[0] = Tt(p, p.__c.__P, p.__c.__O);
|
|
1429
1459
|
}
|
|
1430
1460
|
var h;
|
|
1431
|
-
for (
|
|
1461
|
+
for (i.setState({ __a: i.__b = null }); h = i.t.pop(); )
|
|
1432
1462
|
h.forceUpdate();
|
|
1433
1463
|
}
|
|
1434
1464
|
}, c = e.__h === !0;
|
|
1435
|
-
|
|
1436
|
-
},
|
|
1465
|
+
i.__u++ || c || i.setState({ __a: i.__b = i.__v.__k[0] }), t.then(o, o);
|
|
1466
|
+
}, Ce.prototype.componentWillUnmount = function() {
|
|
1437
1467
|
this.t = [];
|
|
1438
|
-
},
|
|
1468
|
+
}, Ce.prototype.render = function(t, e) {
|
|
1439
1469
|
if (this.__b) {
|
|
1440
1470
|
if (this.__v.__k) {
|
|
1441
|
-
var n = document.createElement("div"),
|
|
1442
|
-
this.__v.__k[0] =
|
|
1471
|
+
var n = document.createElement("div"), i = this.__v.__k[0].__c;
|
|
1472
|
+
this.__v.__k[0] = Rt(this.__b, n, i.__O = i.__P);
|
|
1443
1473
|
}
|
|
1444
1474
|
this.__b = null;
|
|
1445
1475
|
}
|
|
1446
|
-
var
|
|
1447
|
-
return
|
|
1476
|
+
var s = e.__a && G(q, null, t.fallback);
|
|
1477
|
+
return s && (s.__h = null), [G(q, null, e.__a ? null : t.children), s];
|
|
1448
1478
|
};
|
|
1449
|
-
var
|
|
1479
|
+
var st = function(t, e, n) {
|
|
1450
1480
|
if (++n[1] === n[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size))
|
|
1451
1481
|
for (n = t.u; n; ) {
|
|
1452
1482
|
for (; n.length > 3; )
|
|
@@ -1456,25 +1486,25 @@ var ot = function(t, e, n) {
|
|
|
1456
1486
|
t.u = n = n[2];
|
|
1457
1487
|
}
|
|
1458
1488
|
};
|
|
1459
|
-
(
|
|
1460
|
-
var e = this, n = Lt(e.__v),
|
|
1461
|
-
return
|
|
1462
|
-
var
|
|
1463
|
-
e.props.revealOrder ? (
|
|
1489
|
+
(ne.prototype = new A()).__a = function(t) {
|
|
1490
|
+
var e = this, n = Lt(e.__v), i = e.o.get(t);
|
|
1491
|
+
return i[0]++, function(s) {
|
|
1492
|
+
var r = function() {
|
|
1493
|
+
e.props.revealOrder ? (i.push(s), st(e, t, i)) : s();
|
|
1464
1494
|
};
|
|
1465
|
-
n ? n(
|
|
1495
|
+
n ? n(r) : r();
|
|
1466
1496
|
};
|
|
1467
|
-
},
|
|
1497
|
+
}, ne.prototype.render = function(t) {
|
|
1468
1498
|
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
1469
|
-
var e =
|
|
1499
|
+
var e = ae(t.children);
|
|
1470
1500
|
t.revealOrder && t.revealOrder[0] === "b" && e.reverse();
|
|
1471
1501
|
for (var n = e.length; n--; )
|
|
1472
1502
|
this.o.set(e[n], this.u = [1, 0, this.u]);
|
|
1473
1503
|
return t.children;
|
|
1474
|
-
},
|
|
1504
|
+
}, ne.prototype.componentDidUpdate = ne.prototype.componentDidMount = function() {
|
|
1475
1505
|
var t = this;
|
|
1476
1506
|
this.o.forEach(function(e, n) {
|
|
1477
|
-
|
|
1507
|
+
st(t, n, e);
|
|
1478
1508
|
});
|
|
1479
1509
|
};
|
|
1480
1510
|
var yn = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, bn = /^(?: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]/, wn = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, $n = /[A-Z0-9]/g, kn = typeof document < "u", Sn = function(t) {
|
|
@@ -1487,36 +1517,36 @@ A.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
|
|
|
1487
1517
|
Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
|
|
1488
1518
|
} });
|
|
1489
1519
|
});
|
|
1490
|
-
var
|
|
1520
|
+
var ot = f.event;
|
|
1491
1521
|
function Cn() {
|
|
1492
1522
|
}
|
|
1493
1523
|
function xn() {
|
|
1494
1524
|
return this.cancelBubble;
|
|
1495
1525
|
}
|
|
1496
|
-
function
|
|
1526
|
+
function Nn() {
|
|
1497
1527
|
return this.defaultPrevented;
|
|
1498
1528
|
}
|
|
1499
1529
|
f.event = function(t) {
|
|
1500
|
-
return
|
|
1530
|
+
return ot && (t = ot(t)), t.persist = Cn, t.isPropagationStopped = xn, t.isDefaultPrevented = Nn, t.nativeEvent = t;
|
|
1501
1531
|
};
|
|
1502
|
-
var
|
|
1532
|
+
var En = { enumerable: !1, configurable: !0, get: function() {
|
|
1503
1533
|
return this.class;
|
|
1504
1534
|
} }, at = f.vnode;
|
|
1505
1535
|
f.vnode = function(t) {
|
|
1506
1536
|
typeof t.type == "string" && function(e) {
|
|
1507
|
-
var n = e.props,
|
|
1508
|
-
for (var
|
|
1509
|
-
var
|
|
1510
|
-
if (!(
|
|
1511
|
-
var l =
|
|
1512
|
-
|
|
1537
|
+
var n = e.props, i = e.type, s = {};
|
|
1538
|
+
for (var r in n) {
|
|
1539
|
+
var o = n[r];
|
|
1540
|
+
if (!(r === "value" && "defaultValue" in n && o == null || kn && r === "children" && i === "noscript" || r === "class" || r === "className")) {
|
|
1541
|
+
var l = r.toLowerCase();
|
|
1542
|
+
r === "defaultValue" && "value" in n && n.value == null ? r = "value" : r === "download" && o === !0 ? o = "" : l === "ondoubleclick" ? r = "ondblclick" : l !== "onchange" || i !== "input" && i !== "textarea" || Sn(n.type) ? l === "onfocus" ? r = "onfocusin" : l === "onblur" ? r = "onfocusout" : wn.test(r) ? r = l : i.indexOf("-") === -1 && bn.test(r) ? r = r.replace($n, "-$&").toLowerCase() : o === null && (o = void 0) : l = r = "oninput", l === "oninput" && s[r = l] && (r = "oninputCapture"), s[r] = o;
|
|
1513
1543
|
}
|
|
1514
1544
|
}
|
|
1515
|
-
|
|
1516
|
-
c.props.selected =
|
|
1517
|
-
})),
|
|
1518
|
-
c.props.selected =
|
|
1519
|
-
})), n.class && !n.className ? (
|
|
1545
|
+
i == "select" && s.multiple && Array.isArray(s.value) && (s.value = ae(n.children).forEach(function(c) {
|
|
1546
|
+
c.props.selected = s.value.indexOf(c.props.value) != -1;
|
|
1547
|
+
})), i == "select" && s.defaultValue != null && (s.value = ae(n.children).forEach(function(c) {
|
|
1548
|
+
c.props.selected = s.multiple ? s.defaultValue.indexOf(c.props.value) != -1 : s.defaultValue == c.props.value;
|
|
1549
|
+
})), n.class && !n.className ? (s.class = n.class, Object.defineProperty(s, "className", En)) : (n.className && !n.class || n.class && n.className) && (s.class = s.className = n.className), e.props = s;
|
|
1520
1550
|
}(t), t.$$typeof = yn, at && at(t);
|
|
1521
1551
|
};
|
|
1522
1552
|
var lt = f.__r;
|
|
@@ -1529,49 +1559,49 @@ f.diffed = function(t) {
|
|
|
1529
1559
|
var e = t.props, n = t.__e;
|
|
1530
1560
|
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value);
|
|
1531
1561
|
};
|
|
1532
|
-
var
|
|
1562
|
+
var Z = /* @__PURE__ */ new Map();
|
|
1533
1563
|
function An(t) {
|
|
1534
|
-
var e =
|
|
1564
|
+
var e = Z.get(t);
|
|
1535
1565
|
e && e.destroy();
|
|
1536
1566
|
}
|
|
1537
1567
|
function Hn(t) {
|
|
1538
|
-
var e =
|
|
1568
|
+
var e = Z.get(t);
|
|
1539
1569
|
e && e.update();
|
|
1540
1570
|
}
|
|
1541
|
-
var
|
|
1542
|
-
typeof window > "u" ? ((
|
|
1571
|
+
var j = null;
|
|
1572
|
+
typeof window > "u" ? ((j = function(t) {
|
|
1543
1573
|
return t;
|
|
1544
1574
|
}).destroy = function(t) {
|
|
1545
1575
|
return t;
|
|
1546
|
-
},
|
|
1576
|
+
}, j.update = function(t) {
|
|
1547
1577
|
return t;
|
|
1548
|
-
}) : ((
|
|
1578
|
+
}) : ((j = function(t, e) {
|
|
1549
1579
|
return t && Array.prototype.forEach.call(t.length ? t : [t], function(n) {
|
|
1550
|
-
return function(
|
|
1551
|
-
if (
|
|
1552
|
-
var
|
|
1553
|
-
p({ testForHeightReduction:
|
|
1580
|
+
return function(i) {
|
|
1581
|
+
if (i && i.nodeName && i.nodeName === "TEXTAREA" && !Z.has(i)) {
|
|
1582
|
+
var s, r = null, o = window.getComputedStyle(i), l = (s = i.value, function() {
|
|
1583
|
+
p({ testForHeightReduction: s === "" || !i.value.startsWith(s), restoreTextAlign: null }), s = i.value;
|
|
1554
1584
|
}), c = (function(a) {
|
|
1555
|
-
|
|
1556
|
-
return
|
|
1557
|
-
}),
|
|
1558
|
-
}).bind(
|
|
1559
|
-
|
|
1585
|
+
i.removeEventListener("autosize:destroy", c), i.removeEventListener("autosize:update", h), i.removeEventListener("input", l), window.removeEventListener("resize", h), Object.keys(a).forEach(function(m) {
|
|
1586
|
+
return i.style[m] = a[m];
|
|
1587
|
+
}), Z.delete(i);
|
|
1588
|
+
}).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 });
|
|
1589
|
+
i.addEventListener("autosize:destroy", c), i.addEventListener("autosize:update", h), i.addEventListener("input", l), window.addEventListener("resize", h), i.style.overflowX = "hidden", i.style.wordWrap = "break-word", Z.set(i, { destroy: c, update: h }), h();
|
|
1560
1590
|
}
|
|
1561
1591
|
function p(a) {
|
|
1562
|
-
var
|
|
1563
|
-
if (
|
|
1592
|
+
var m, d, _ = a.restoreTextAlign, v = _ === void 0 ? null : _, z = a.testForHeightReduction, g = z === void 0 || z, b = o.overflowY;
|
|
1593
|
+
if (i.scrollHeight !== 0 && (o.resize === "vertical" ? i.style.resize = "none" : o.resize === "both" && (i.style.resize = "horizontal"), g && (m = function(w) {
|
|
1564
1594
|
for (var $ = []; w && w.parentNode && w.parentNode instanceof Element; )
|
|
1565
1595
|
w.parentNode.scrollTop && $.push([w.parentNode, w.parentNode.scrollTop]), w = w.parentNode;
|
|
1566
1596
|
return function() {
|
|
1567
1597
|
return $.forEach(function(P) {
|
|
1568
|
-
var
|
|
1569
|
-
|
|
1598
|
+
var N = P[0], R = P[1];
|
|
1599
|
+
N.style.scrollBehavior = "auto", N.scrollTop = R, N.style.scrollBehavior = null;
|
|
1570
1600
|
});
|
|
1571
1601
|
};
|
|
1572
|
-
}(
|
|
1573
|
-
var
|
|
1574
|
-
|
|
1602
|
+
}(i), i.style.height = ""), d = o.boxSizing === "content-box" ? i.scrollHeight - (parseFloat(o.paddingTop) + parseFloat(o.paddingBottom)) : i.scrollHeight + parseFloat(o.borderTopWidth) + parseFloat(o.borderBottomWidth), o.maxHeight !== "none" && d > parseFloat(o.maxHeight) ? (o.overflowY === "hidden" && (i.style.overflow = "scroll"), d = parseFloat(o.maxHeight)) : o.overflowY !== "hidden" && (i.style.overflow = "hidden"), i.style.height = d + "px", v && (i.style.textAlign = v), m && m(), r !== d && (i.dispatchEvent(new Event("autosize:resized", { bubbles: !0 })), r = d), b !== o.overflow && !v)) {
|
|
1603
|
+
var C = o.textAlign;
|
|
1604
|
+
o.overflow === "hidden" && (i.style.textAlign = C === "start" ? "end" : "start"), p({ restoreTextAlign: C, testForHeightReduction: !0 });
|
|
1575
1605
|
}
|
|
1576
1606
|
}
|
|
1577
1607
|
function h() {
|
|
@@ -1581,63 +1611,62 @@ typeof window > "u" ? ((Y = function(t) {
|
|
|
1581
1611
|
}), t;
|
|
1582
1612
|
}).destroy = function(t) {
|
|
1583
1613
|
return t && Array.prototype.forEach.call(t.length ? t : [t], An), t;
|
|
1584
|
-
},
|
|
1614
|
+
}, j.update = function(t) {
|
|
1585
1615
|
return t && Array.prototype.forEach.call(t.length ? t : [t], Hn), t;
|
|
1586
1616
|
});
|
|
1587
|
-
var ut =
|
|
1588
|
-
const
|
|
1589
|
-
const e = ge(null), n = t.controller.input,
|
|
1617
|
+
var ut = j;
|
|
1618
|
+
const W = new F("chat-input"), Mn = (t) => {
|
|
1619
|
+
const e = ge(null), n = t.controller.input, i = ve(!1), s = Ge((c) => {
|
|
1590
1620
|
n.value = c.target.value;
|
|
1591
|
-
}, [n]),
|
|
1592
|
-
|
|
1621
|
+
}, [n]), r = Le(() => n.value.length <= 0 || i.value === !0);
|
|
1622
|
+
_e(() => (e.current && ut(e.current), () => {
|
|
1593
1623
|
e.current && ut.destroy(e.current);
|
|
1594
1624
|
}), [e]);
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1625
|
+
const o = Ge(async () => {
|
|
1626
|
+
i.value = !0;
|
|
1597
1627
|
try {
|
|
1598
1628
|
await t.controller.question(n.value), n.value = "";
|
|
1599
1629
|
} catch (c) {
|
|
1600
1630
|
console.error(c);
|
|
1601
1631
|
} finally {
|
|
1602
|
-
|
|
1632
|
+
i.value = !1;
|
|
1603
1633
|
}
|
|
1604
|
-
}, [n,
|
|
1605
|
-
c.code === "Enter" && (c.stopPropagation(), c.shiftKey === !1 &&
|
|
1634
|
+
}, [n, i]), l = (c) => {
|
|
1635
|
+
c.code === "Enter" && (c.stopPropagation(), c.shiftKey === !1 && o());
|
|
1606
1636
|
};
|
|
1607
|
-
return
|
|
1608
|
-
className:
|
|
1609
|
-
children: [
|
|
1610
|
-
className:
|
|
1637
|
+
return u("div", {
|
|
1638
|
+
className: W.b(),
|
|
1639
|
+
children: [u("textarea", {
|
|
1640
|
+
className: W.e("textarea"),
|
|
1611
1641
|
type: "text",
|
|
1612
|
-
wrap: "off",
|
|
1613
1642
|
rows: 6,
|
|
1614
1643
|
autoCorrect: "off",
|
|
1615
1644
|
autoCapitalize: "off",
|
|
1616
1645
|
autoComplete: "off",
|
|
1617
1646
|
value: n,
|
|
1618
|
-
onInput:
|
|
1647
|
+
onInput: s,
|
|
1619
1648
|
onKeyDown: l,
|
|
1620
1649
|
ref: e,
|
|
1621
|
-
disabled:
|
|
1622
|
-
}),
|
|
1623
|
-
className:
|
|
1624
|
-
children:
|
|
1625
|
-
title:
|
|
1626
|
-
className: "".concat(
|
|
1627
|
-
onClick:
|
|
1628
|
-
disabled:
|
|
1629
|
-
children:
|
|
1650
|
+
disabled: i
|
|
1651
|
+
}), u("div", {
|
|
1652
|
+
className: W.b("action-wrapper"),
|
|
1653
|
+
children: u("div", {
|
|
1654
|
+
title: i ? "思考中..." : "发送消息",
|
|
1655
|
+
className: "".concat(W.be("action-wrapper", "action-item"), " ").concat(W.is("disabled", r.value), " ").concat(W.is("loading", i.value)),
|
|
1656
|
+
onClick: o,
|
|
1657
|
+
disabled: r,
|
|
1658
|
+
children: u(rn, {})
|
|
1630
1659
|
})
|
|
1631
1660
|
})]
|
|
1632
1661
|
});
|
|
1633
1662
|
};
|
|
1634
|
-
var
|
|
1663
|
+
var Me = /* @__PURE__ */ ((t) => (t.STYLE_CACHE = "ai-chat-style-cache", t))(Me || {});
|
|
1635
1664
|
class zn extends A {
|
|
1636
1665
|
constructor(n) {
|
|
1637
1666
|
super(n);
|
|
1638
1667
|
H(this, "ns", new F("chat-container"));
|
|
1639
|
-
H(this, "containerRef",
|
|
1640
|
-
H(this, "dragHandle",
|
|
1668
|
+
H(this, "containerRef", Ue());
|
|
1669
|
+
H(this, "dragHandle", Ue());
|
|
1641
1670
|
H(this, "data", {
|
|
1642
1671
|
x: window.innerWidth - 600 - 100,
|
|
1643
1672
|
y: 100,
|
|
@@ -1663,10 +1692,10 @@ class zn extends A {
|
|
|
1663
1692
|
Object.assign(this.containerRef.current.style, this.calcStyle());
|
|
1664
1693
|
}
|
|
1665
1694
|
componentDidMount() {
|
|
1666
|
-
const n = localStorage.getItem(
|
|
1695
|
+
const n = localStorage.getItem(Me.STYLE_CACHE);
|
|
1667
1696
|
n && (this.data = JSON.parse(n), this.data.x > window.innerWidth && (this.data.x = window.innerWidth - 100), this.data.y > window.innerHeight && (this.data.y = window.innerHeight - 100)), this.setStyle();
|
|
1668
|
-
const
|
|
1669
|
-
|
|
1697
|
+
const i = this.data;
|
|
1698
|
+
$e(this.containerRef.current).resizable({
|
|
1670
1699
|
// 可拖拽的边缘
|
|
1671
1700
|
edges: {
|
|
1672
1701
|
top: !1,
|
|
@@ -1677,27 +1706,27 @@ class zn extends A {
|
|
|
1677
1706
|
margin: 6,
|
|
1678
1707
|
modifiers: [
|
|
1679
1708
|
// 保持在父对象内部
|
|
1680
|
-
|
|
1709
|
+
$e.modifiers.restrictEdges({
|
|
1681
1710
|
outer: document.body
|
|
1682
1711
|
}),
|
|
1683
1712
|
// 缩放最小宽度
|
|
1684
|
-
|
|
1713
|
+
$e.modifiers.restrictSize({
|
|
1685
1714
|
min: {
|
|
1686
|
-
width:
|
|
1687
|
-
height:
|
|
1715
|
+
width: i.minWidth,
|
|
1716
|
+
height: i.minHeight
|
|
1688
1717
|
}
|
|
1689
1718
|
})
|
|
1690
1719
|
],
|
|
1691
1720
|
inertia: !0,
|
|
1692
1721
|
listeners: {
|
|
1693
|
-
move: (
|
|
1694
|
-
|
|
1722
|
+
move: (s) => {
|
|
1723
|
+
i.x += s.deltaRect.left, i.y += s.deltaRect.top, i.width = s.rect.width, i.height = s.rect.height, this.setStyle();
|
|
1695
1724
|
}
|
|
1696
1725
|
}
|
|
1697
1726
|
});
|
|
1698
1727
|
}
|
|
1699
1728
|
componentWillUnmount() {
|
|
1700
|
-
localStorage.setItem(
|
|
1729
|
+
localStorage.setItem(Me.STYLE_CACHE, JSON.stringify(this.data));
|
|
1701
1730
|
}
|
|
1702
1731
|
/**
|
|
1703
1732
|
* 关闭聊天窗口
|
|
@@ -1732,46 +1761,46 @@ class zn extends A {
|
|
|
1732
1761
|
}));
|
|
1733
1762
|
}
|
|
1734
1763
|
render() {
|
|
1735
|
-
return
|
|
1764
|
+
return u("div", {
|
|
1736
1765
|
className: "\n ".concat(this.ns.b(), "\n ").concat(this.ns.is("full-screen", this.state.isFullScreen)),
|
|
1737
1766
|
ref: this.containerRef,
|
|
1738
|
-
children: [
|
|
1767
|
+
children: [u("div", {
|
|
1739
1768
|
ref: this.dragHandle,
|
|
1740
1769
|
className: this.ns.b("header"),
|
|
1741
|
-
children: [
|
|
1770
|
+
children: [u("div", {
|
|
1742
1771
|
className: this.ns.b("header-caption"),
|
|
1743
1772
|
children: "AIChat"
|
|
1744
|
-
}),
|
|
1773
|
+
}), u("div", {
|
|
1745
1774
|
className: this.ns.b("header-action-wrapper"),
|
|
1746
|
-
children: [this.state.isFullScreen ?
|
|
1775
|
+
children: [this.state.isFullScreen ? u("div", {
|
|
1747
1776
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "close-full-screen")),
|
|
1748
1777
|
onClick: this.closeFullScreen.bind(this),
|
|
1749
|
-
children:
|
|
1750
|
-
}) :
|
|
1778
|
+
children: u(ln, {})
|
|
1779
|
+
}) : u("div", {
|
|
1751
1780
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "full-screen")),
|
|
1752
1781
|
onClick: this.fullScreen.bind(this),
|
|
1753
|
-
children:
|
|
1754
|
-
}),
|
|
1782
|
+
children: u(an, {})
|
|
1783
|
+
}), u("div", {
|
|
1755
1784
|
className: "".concat(this.ns.be("header-action-wrapper", "action-item"), " ").concat(this.ns.be("header-action-wrapper", "action-close")),
|
|
1756
1785
|
onClick: this.close.bind(this),
|
|
1757
|
-
children:
|
|
1786
|
+
children: u(tn, {})
|
|
1758
1787
|
})]
|
|
1759
1788
|
})]
|
|
1760
|
-
}),
|
|
1789
|
+
}), u("div", {
|
|
1761
1790
|
className: this.ns.b("content"),
|
|
1762
|
-
children:
|
|
1791
|
+
children: u(pn, {
|
|
1763
1792
|
controller: this.props.controller
|
|
1764
1793
|
})
|
|
1765
|
-
}),
|
|
1794
|
+
}), u("div", {
|
|
1766
1795
|
className: this.ns.b("footer"),
|
|
1767
|
-
children:
|
|
1796
|
+
children: u(Mn, {
|
|
1768
1797
|
controller: this.props.controller
|
|
1769
1798
|
})
|
|
1770
1799
|
})]
|
|
1771
1800
|
});
|
|
1772
1801
|
}
|
|
1773
1802
|
}
|
|
1774
|
-
class
|
|
1803
|
+
class xe {
|
|
1775
1804
|
constructor(e) {
|
|
1776
1805
|
this.msg = e;
|
|
1777
1806
|
}
|
|
@@ -1820,7 +1849,7 @@ class Pn {
|
|
|
1820
1849
|
* @date 2023-10-16 16:10:29
|
|
1821
1850
|
* @type {Signal<ChatMessage[]>}
|
|
1822
1851
|
*/
|
|
1823
|
-
H(this, "messages",
|
|
1852
|
+
H(this, "messages", he([]));
|
|
1824
1853
|
/**
|
|
1825
1854
|
* 聊天框输入值
|
|
1826
1855
|
*
|
|
@@ -1828,7 +1857,7 @@ class Pn {
|
|
|
1828
1857
|
* @date 2023-10-16 15:10:43
|
|
1829
1858
|
* @type {Signal<string>}
|
|
1830
1859
|
*/
|
|
1831
|
-
H(this, "input",
|
|
1860
|
+
H(this, "input", he(""));
|
|
1832
1861
|
this.opts = e;
|
|
1833
1862
|
}
|
|
1834
1863
|
/**
|
|
@@ -1849,8 +1878,8 @@ class Pn {
|
|
|
1849
1878
|
* @param {IMessage} data
|
|
1850
1879
|
*/
|
|
1851
1880
|
addMessage(e) {
|
|
1852
|
-
const n = this.messages.value.find((
|
|
1853
|
-
n ? (n.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new
|
|
1881
|
+
const n = this.messages.value.find((i) => i.messageid === e.messageid);
|
|
1882
|
+
n ? (n.update(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new xe(e)];
|
|
1854
1883
|
}
|
|
1855
1884
|
/**
|
|
1856
1885
|
* 替换已经存在的聊天消息
|
|
@@ -1860,8 +1889,8 @@ class Pn {
|
|
|
1860
1889
|
* @param {IChatMessage} data
|
|
1861
1890
|
*/
|
|
1862
1891
|
replaceMessage(e) {
|
|
1863
|
-
const n = this.messages.value.findIndex((
|
|
1864
|
-
n !== -1 ? (this.messages.value[n] = new
|
|
1892
|
+
const n = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
1893
|
+
n !== -1 ? (this.messages.value[n] = new xe(e), this.messages.value = [...this.messages.value]) : this.messages.value = [...this.messages.value, new xe(e)];
|
|
1865
1894
|
}
|
|
1866
1895
|
/**
|
|
1867
1896
|
* 提问
|
|
@@ -1890,13 +1919,14 @@ class Pn {
|
|
|
1890
1919
|
this.opts.action && this.opts.action("backfill", e);
|
|
1891
1920
|
}
|
|
1892
1921
|
/**
|
|
1893
|
-
* 删除指定消息
|
|
1894
1922
|
*
|
|
1923
|
+
* 删除指定消息,如果是用户提问的刷新调用的删除,则需要删除从问题开始到最后的所有记录
|
|
1895
1924
|
* @param {IChatMessage} message
|
|
1925
|
+
* @param {boolean} [isuser=false]
|
|
1896
1926
|
* @memberof AiChatController
|
|
1897
1927
|
*/
|
|
1898
1928
|
deleteMessage(e) {
|
|
1899
|
-
const n = this.messages.value.findIndex((
|
|
1929
|
+
const n = this.messages.value.findIndex((i) => i.messageid === e.messageid);
|
|
1900
1930
|
n !== -1 && (this.messages.value.splice(n, 1), this.messages.value = [...this.messages.value]);
|
|
1901
1931
|
}
|
|
1902
1932
|
/**
|
|
@@ -1904,8 +1934,16 @@ class Pn {
|
|
|
1904
1934
|
*
|
|
1905
1935
|
* @memberof AiChatController
|
|
1906
1936
|
*/
|
|
1907
|
-
async refreshMessage(e) {
|
|
1908
|
-
|
|
1937
|
+
async refreshMessage(e, n = !1) {
|
|
1938
|
+
const i = this.messages.value.findIndex((s) => s.messageid === e.messageid);
|
|
1939
|
+
if (n)
|
|
1940
|
+
this.messages.value.splice(i + 1, this.messages.value.length - i - 1), this.messages.value = [...this.messages.value], await this.opts.question(this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
|
|
1941
|
+
else if (i === this.messages.value.length - 1)
|
|
1942
|
+
this.messages.value.pop(), this.messages.value = [...this.messages.value], await this.opts.question(this.messages.value.filter((s) => s.type !== "ERROR").map((s) => s._origin));
|
|
1943
|
+
else {
|
|
1944
|
+
const s = this.messages.value[i - 1].content;
|
|
1945
|
+
this.messages.value.splice(i - 1, 2), this.question(s);
|
|
1946
|
+
}
|
|
1909
1947
|
}
|
|
1910
1948
|
/**
|
|
1911
1949
|
* 复制消息
|
|
@@ -1918,7 +1956,7 @@ class Pn {
|
|
|
1918
1956
|
$t.copy(n);
|
|
1919
1957
|
}
|
|
1920
1958
|
}
|
|
1921
|
-
class
|
|
1959
|
+
class Rn {
|
|
1922
1960
|
constructor() {
|
|
1923
1961
|
/**
|
|
1924
1962
|
* 聊天框容器
|
|
@@ -1939,7 +1977,7 @@ class Tn {
|
|
|
1939
1977
|
create(e) {
|
|
1940
1978
|
this.close(), this.container = document.createElement("div"), this.container.classList.add("ibiz-ai-chat"), document.body.appendChild(this.container);
|
|
1941
1979
|
const n = new Pn(e);
|
|
1942
|
-
return
|
|
1980
|
+
return Be(G(zn, {
|
|
1943
1981
|
controller: n,
|
|
1944
1982
|
close: () => {
|
|
1945
1983
|
this.close(), e.closed && e.closed();
|
|
@@ -1971,10 +2009,10 @@ class Tn {
|
|
|
1971
2009
|
* @date 2023-10-13 17:10:10
|
|
1972
2010
|
*/
|
|
1973
2011
|
close() {
|
|
1974
|
-
this.container && (
|
|
2012
|
+
this.container && (Be(null, this.container), this.container.remove(), this.container = void 0);
|
|
1975
2013
|
}
|
|
1976
2014
|
}
|
|
1977
|
-
const Un = new
|
|
2015
|
+
const Un = new Rn();
|
|
1978
2016
|
export {
|
|
1979
2017
|
zn as ChatContainer,
|
|
1980
2018
|
Un as chat
|