@sy-design/svelte 1.0.11 → 1.0.12
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 +468 -468
- package/dist/index.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
var yi = Object.defineProperty, Ti = Object.defineProperties;
|
2
2
|
var vi = Object.getOwnPropertyDescriptors;
|
3
3
|
var Kn = Object.getOwnPropertySymbols;
|
4
|
-
var Ei = Object.prototype.hasOwnProperty,
|
4
|
+
var Ei = Object.prototype.hasOwnProperty, xi = Object.prototype.propertyIsEnumerable;
|
5
5
|
var $n = (s) => {
|
6
6
|
throw TypeError(s);
|
7
7
|
};
|
@@ -10,12 +10,12 @@ var an = (s, e, t) => e in s ? yi(s, e, { enumerable: !0, configurable: !0, writ
|
|
10
10
|
Ei.call(e, t) && an(s, t, e[t]);
|
11
11
|
if (Kn)
|
12
12
|
for (var t of Kn(e))
|
13
|
-
|
13
|
+
xi.call(e, t) && an(s, t, e[t]);
|
14
14
|
return s;
|
15
15
|
}, ye = (s, e) => Ti(s, vi(e));
|
16
|
-
var se = (s, e, t) => an(s, typeof e != "symbol" ? e + "" : e, t),
|
16
|
+
var se = (s, e, t) => an(s, typeof e != "symbol" ? e + "" : e, t), Si = (s, e, t) => e.has(s) || $n("Cannot " + t);
|
17
17
|
var es = (s, e, t) => e.has(s) ? $n("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t);
|
18
|
-
var Bt = (s, e, t) => (
|
18
|
+
var Bt = (s, e, t) => (Si(s, e, "access private method"), t);
|
19
19
|
var Re = (s, e, t) => new Promise((n, i) => {
|
20
20
|
var o = (c) => {
|
21
21
|
try {
|
@@ -40,16 +40,16 @@ function js(s) {
|
|
40
40
|
function ts() {
|
41
41
|
return /* @__PURE__ */ Object.create(null);
|
42
42
|
}
|
43
|
-
function
|
43
|
+
function Se(s) {
|
44
44
|
s.forEach(js);
|
45
45
|
}
|
46
|
-
function
|
46
|
+
function Sn(s) {
|
47
47
|
return typeof s == "function";
|
48
48
|
}
|
49
49
|
function Jt(s, e) {
|
50
50
|
return s != s ? e == e : s !== e || s && typeof s == "object" || typeof s == "function";
|
51
51
|
}
|
52
|
-
function
|
52
|
+
function Ai(s) {
|
53
53
|
return Object.keys(s).length === 0;
|
54
54
|
}
|
55
55
|
function Ii(s, ...e) {
|
@@ -86,27 +86,27 @@ function m(s, e) {
|
|
86
86
|
function G(s, e, t) {
|
87
87
|
s.insertBefore(e, t || null);
|
88
88
|
}
|
89
|
-
function
|
89
|
+
function q(s) {
|
90
90
|
s.parentNode && s.parentNode.removeChild(s);
|
91
91
|
}
|
92
92
|
function Ci(s, e) {
|
93
93
|
for (let t = 0; t < s.length; t += 1)
|
94
94
|
s[t] && s[t].d(e);
|
95
95
|
}
|
96
|
-
function
|
96
|
+
function A(s) {
|
97
97
|
return document.createElement(s);
|
98
98
|
}
|
99
99
|
function V(s) {
|
100
100
|
return document.createElementNS("http://www.w3.org/2000/svg", s);
|
101
101
|
}
|
102
|
-
function
|
102
|
+
function xe(s) {
|
103
103
|
return document.createTextNode(s);
|
104
104
|
}
|
105
|
-
function
|
106
|
-
return
|
105
|
+
function W() {
|
106
|
+
return xe(" ");
|
107
107
|
}
|
108
108
|
function Kt() {
|
109
|
-
return
|
109
|
+
return xe("");
|
110
110
|
}
|
111
111
|
function U(s, e, t, n) {
|
112
112
|
return s.addEventListener(e, t, n), () => s.removeEventListener(e, t, n);
|
@@ -139,18 +139,18 @@ let Mt;
|
|
139
139
|
function Rt(s) {
|
140
140
|
Mt = s;
|
141
141
|
}
|
142
|
-
function
|
142
|
+
function An() {
|
143
143
|
if (!Mt) throw new Error("Function called outside component initialization");
|
144
144
|
return Mt;
|
145
145
|
}
|
146
146
|
function Zs(s) {
|
147
|
-
|
147
|
+
An().$$.on_mount.push(s);
|
148
148
|
}
|
149
149
|
function Mi(s) {
|
150
|
-
|
150
|
+
An().$$.after_update.push(s);
|
151
151
|
}
|
152
152
|
function zi(s) {
|
153
|
-
|
153
|
+
An().$$.on_destroy.push(s);
|
154
154
|
}
|
155
155
|
const dt = [], kt = [];
|
156
156
|
let mt = [];
|
@@ -190,7 +190,7 @@ function Xs() {
|
|
190
190
|
}
|
191
191
|
function Ni(s) {
|
192
192
|
if (s.fragment !== null) {
|
193
|
-
s.update(),
|
193
|
+
s.update(), Se(s.before_update);
|
194
194
|
const e = s.dirty;
|
195
195
|
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(kn);
|
196
196
|
}
|
@@ -210,7 +210,7 @@ function In() {
|
|
210
210
|
};
|
211
211
|
}
|
212
212
|
function Rn() {
|
213
|
-
it.r ||
|
213
|
+
it.r || Se(it.c), it = it.p;
|
214
214
|
}
|
215
215
|
function Be(s, e) {
|
216
216
|
s && s.i && (Yt.delete(s), s.i(e));
|
@@ -231,28 +231,28 @@ function Vs(s, e) {
|
|
231
231
|
}
|
232
232
|
function Qs(s, e, t, n, i, o, l, a, c, u, h, p) {
|
233
233
|
let d = s.length, g = o.length, w = d;
|
234
|
-
const
|
235
|
-
for (; w--; )
|
236
|
-
const
|
234
|
+
const v = {};
|
235
|
+
for (; w--; ) v[s[w].key] = w;
|
236
|
+
const I = [], z = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), _ = [];
|
237
237
|
for (w = g; w--; ) {
|
238
|
-
const b = p(i, o, w),
|
239
|
-
let
|
240
|
-
|
238
|
+
const b = p(i, o, w), L = t(b);
|
239
|
+
let R = l.get(L);
|
240
|
+
R ? _.push(() => R.p(b, e)) : (R = u(L, b), R.c()), z.set(L, I[w] = R), L in v && E.set(L, Math.abs(w - v[L]));
|
241
241
|
}
|
242
242
|
const k = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
|
243
|
-
function
|
243
|
+
function S(b) {
|
244
244
|
Be(b, 1), b.m(a, h), l.set(b.key, b), h = b.first, g--;
|
245
245
|
}
|
246
246
|
for (; d && g; ) {
|
247
|
-
const b =
|
248
|
-
b ===
|
247
|
+
const b = I[g - 1], L = s[d - 1], R = b.key, F = L.key;
|
248
|
+
b === L ? (h = b.first, d--, g--) : z.has(F) ? !l.has(R) || k.has(R) ? S(b) : T.has(F) ? d-- : E.get(R) > E.get(F) ? (T.add(R), S(b)) : (k.add(F), d--) : (c(L, l), d--);
|
249
249
|
}
|
250
250
|
for (; d--; ) {
|
251
251
|
const b = s[d];
|
252
252
|
z.has(b.key) || c(b, l);
|
253
253
|
}
|
254
|
-
for (; g; )
|
255
|
-
return
|
254
|
+
for (; g; ) S(I[g - 1]);
|
255
|
+
return Se(_), I;
|
256
256
|
}
|
257
257
|
function Cn(s) {
|
258
258
|
s && s.c();
|
@@ -260,13 +260,13 @@ function Cn(s) {
|
|
260
260
|
function $t(s, e, t) {
|
261
261
|
const { fragment: n, after_update: i } = s.$$;
|
262
262
|
n && n.m(e, t), kn(() => {
|
263
|
-
const o = s.$$.on_mount.map(js).filter(
|
264
|
-
s.$$.on_destroy ? s.$$.on_destroy.push(...o) :
|
263
|
+
const o = s.$$.on_mount.map(js).filter(Sn);
|
264
|
+
s.$$.on_destroy ? s.$$.on_destroy.push(...o) : Se(o), s.$$.on_mount = [];
|
265
265
|
}), i.forEach(kn);
|
266
266
|
}
|
267
267
|
function en(s, e) {
|
268
268
|
const t = s.$$;
|
269
|
-
t.fragment !== null && (Pi(t.after_update),
|
269
|
+
t.fragment !== null && (Pi(t.after_update), Se(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
270
270
|
}
|
271
271
|
function Fi(s, e) {
|
272
272
|
s.$$.dirty[0] === -1 && (dt.push(s), Di(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
@@ -300,10 +300,10 @@ function Ln(s, e, t, n, i, o, l = null, a = [-1]) {
|
|
300
300
|
if (u.ctx = t ? t(s, e.props || {}, (p, d, ...g) => {
|
301
301
|
const w = g.length ? g[0] : d;
|
302
302
|
return u.ctx && i(u.ctx[p], u.ctx[p] = w) && (!u.skip_bound && u.bound[p] && u.bound[p](w), h && Fi(s, p)), d;
|
303
|
-
}) : [], u.update(), h = !0,
|
303
|
+
}) : [], u.update(), h = !0, Se(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
304
304
|
if (e.hydrate) {
|
305
305
|
const p = Li(e.target);
|
306
|
-
u.fragment && u.fragment.l(p), p.forEach(
|
306
|
+
u.fragment && u.fragment.l(p), p.forEach(q);
|
307
307
|
} else
|
308
308
|
u.fragment && u.fragment.c();
|
309
309
|
e.intro && Be(s.$$.fragment), $t(s, e.target, e.anchor), Xs();
|
@@ -340,7 +340,7 @@ class Mn {
|
|
340
340
|
* @returns {() => void}
|
341
341
|
*/
|
342
342
|
$on(e, t) {
|
343
|
-
if (!
|
343
|
+
if (!Sn(t))
|
344
344
|
return De;
|
345
345
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
346
346
|
return n.push(t), () => {
|
@@ -353,7 +353,7 @@ class Mn {
|
|
353
353
|
* @returns {void}
|
354
354
|
*/
|
355
355
|
$set(e) {
|
356
|
-
this.$$set && !
|
356
|
+
this.$$set && !Ai(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
357
357
|
}
|
358
358
|
}
|
359
359
|
const Hi = "4";
|
@@ -409,35 +409,35 @@ function _n(s, e, t, n) {
|
|
409
409
|
function Ui(s, e = {}) {
|
410
410
|
const t = Bi(s), { stiffness: n = 0.15, damping: i = 0.8, precision: o = 0.01 } = e;
|
411
411
|
let l, a, c, u = s, h = s, p = 1, d = 0, g = !1;
|
412
|
-
function w(
|
413
|
-
h =
|
414
|
-
const
|
415
|
-
return s == null || z.hard ||
|
412
|
+
function w(I, z = {}) {
|
413
|
+
h = I;
|
414
|
+
const E = c = {};
|
415
|
+
return s == null || z.hard || v.stiffness >= 1 && v.damping >= 1 ? (g = !0, l = ns(), u = I, t.set(s = h), Promise.resolve()) : (z.soft && (d = 1 / ((z.soft === !0 ? 0.5 : +z.soft) * 60), p = 0), a || (l = ns(), g = !1, a = Ri((_) => {
|
416
416
|
if (g)
|
417
417
|
return g = !1, a = null, !1;
|
418
418
|
p = Math.min(p + d, 1);
|
419
419
|
const k = {
|
420
420
|
inv_mass: p,
|
421
|
-
opts:
|
421
|
+
opts: v,
|
422
422
|
settled: !0,
|
423
423
|
dt: (_ - l) * 60 / 1e3
|
424
424
|
}, T = _n(k, u, s, h);
|
425
425
|
return l = _, u = s, t.set(s = T), k.settled && (a = null), !k.settled;
|
426
426
|
})), new Promise((_) => {
|
427
427
|
a.promise.then(() => {
|
428
|
-
|
428
|
+
E === c && _();
|
429
429
|
});
|
430
430
|
}));
|
431
431
|
}
|
432
|
-
const
|
432
|
+
const v = {
|
433
433
|
set: w,
|
434
|
-
update: (
|
434
|
+
update: (I, z) => w(I(h, s), z),
|
435
435
|
subscribe: t.subscribe,
|
436
436
|
stiffness: n,
|
437
437
|
damping: i,
|
438
438
|
precision: o
|
439
439
|
};
|
440
|
-
return
|
440
|
+
return v;
|
441
441
|
}
|
442
442
|
function ji(s, e) {
|
443
443
|
return Re(this, null, function* () {
|
@@ -528,36 +528,36 @@ function Xi(s, e) {
|
|
528
528
|
const g = Object.assign({}, n);
|
529
529
|
g.accept || (g.accept = bn);
|
530
530
|
let w;
|
531
|
-
function
|
531
|
+
function v() {
|
532
532
|
w.abort(), document.hidden || T();
|
533
533
|
}
|
534
|
-
c || document.addEventListener("visibilitychange",
|
535
|
-
let
|
536
|
-
function
|
537
|
-
document.removeEventListener("visibilitychange",
|
534
|
+
c || document.addEventListener("visibilitychange", v);
|
535
|
+
let I = Zi, z = 0;
|
536
|
+
function E() {
|
537
|
+
document.removeEventListener("visibilitychange", v), window.clearTimeout(z), w.abort();
|
538
538
|
}
|
539
539
|
t == null || t.addEventListener("abort", () => {
|
540
|
-
|
540
|
+
E(), p();
|
541
541
|
});
|
542
542
|
const _ = u != null ? u : window.fetch, k = i != null ? i : Vi;
|
543
543
|
function T() {
|
544
544
|
return Re(this, null, function* () {
|
545
|
-
var
|
545
|
+
var S;
|
546
546
|
w = new AbortController();
|
547
547
|
try {
|
548
548
|
const b = yield _(s, Object.assign(Object.assign({}, h), { headers: g, signal: w.signal }));
|
549
|
-
yield k(b), yield ji(b.body, Wi(qi((
|
550
|
-
|
551
|
-
}, (
|
552
|
-
|
553
|
-
}, o))), l == null || l(),
|
549
|
+
yield k(b), yield ji(b.body, Wi(qi((L) => {
|
550
|
+
L ? g[ls] = L : delete g[ls];
|
551
|
+
}, (L) => {
|
552
|
+
I = L;
|
553
|
+
}, o))), l == null || l(), E(), p();
|
554
554
|
} catch (b) {
|
555
555
|
if (!w.signal.aborted)
|
556
556
|
try {
|
557
|
-
const
|
558
|
-
window.clearTimeout(z), z = window.setTimeout(T,
|
559
|
-
} catch (
|
560
|
-
|
557
|
+
const L = (S = a == null ? void 0 : a(b)) !== null && S !== void 0 ? S : I;
|
558
|
+
window.clearTimeout(z), z = window.setTimeout(T, L);
|
559
|
+
} catch (L) {
|
560
|
+
E(), d(L);
|
561
561
|
}
|
562
562
|
}
|
563
563
|
});
|
@@ -822,17 +822,17 @@ class Xt {
|
|
822
822
|
let w = !1;
|
823
823
|
if (!p && /^ *$/.test(d) && (a += d + `
|
824
824
|
`, e = e.substring(d.length + 1), h = !0), !h) {
|
825
|
-
const z = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
|
825
|
+
const z = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), E = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), k = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
|
826
826
|
for (; e; ) {
|
827
827
|
const T = e.split(`
|
828
828
|
`, 1)[0];
|
829
|
-
if (d = T, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || k.test(d) || z.test(d) ||
|
829
|
+
if (d = T, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || k.test(d) || z.test(d) || E.test(e))
|
830
830
|
break;
|
831
831
|
if (d.search(/[^ ]/) >= g || !d.trim())
|
832
832
|
c += `
|
833
833
|
` + d.slice(g);
|
834
834
|
else {
|
835
|
-
if (w || p.search(/[^ ]/) >= 4 || _.test(p) || k.test(p) ||
|
835
|
+
if (w || p.search(/[^ ]/) >= 4 || _.test(p) || k.test(p) || E.test(p))
|
836
836
|
break;
|
837
837
|
c += `
|
838
838
|
` + d;
|
@@ -842,12 +842,12 @@ class Xt {
|
|
842
842
|
}
|
843
843
|
}
|
844
844
|
o.loose || (u ? o.loose = !0 : /\n *\n *$/.test(a) && (u = !0));
|
845
|
-
let
|
846
|
-
this.options.gfm && (
|
845
|
+
let v = null, I;
|
846
|
+
this.options.gfm && (v = /^\[[ xX]\] /.exec(c), v && (I = v[0] !== "[ ] ", c = c.replace(/^\[[ xX]\] +/, ""))), o.items.push({
|
847
847
|
type: "list_item",
|
848
848
|
raw: a,
|
849
|
-
task: !!
|
850
|
-
checked:
|
849
|
+
task: !!v,
|
850
|
+
checked: I,
|
851
851
|
loose: !1,
|
852
852
|
text: c,
|
853
853
|
tokens: []
|
@@ -1039,12 +1039,12 @@ class Xt {
|
|
1039
1039
|
c = Math.min(c, c + u + h);
|
1040
1040
|
const d = [...i[0]][0].length, g = e.slice(0, l + i.index + d + c);
|
1041
1041
|
if (Math.min(l, c) % 2) {
|
1042
|
-
const
|
1042
|
+
const v = g.slice(1, -1);
|
1043
1043
|
return {
|
1044
1044
|
type: "em",
|
1045
1045
|
raw: g,
|
1046
|
-
text:
|
1047
|
-
tokens: this.lexer.inlineTokens(
|
1046
|
+
text: v,
|
1047
|
+
tokens: this.lexer.inlineTokens(v)
|
1048
1048
|
};
|
1049
1049
|
}
|
1050
1050
|
const w = g.slice(2, -2);
|
@@ -1173,7 +1173,7 @@ const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo =
|
|
1173
1173
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
1174
1174
|
paragraph: te(On).replace("hr", zt).replace("heading", ` *#{1,6} *[^
|
1175
1175
|
]`).replace("lheading", ti).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
1176
|
-
}), si = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ii = /^( {2,}|\\)\n(?!\s*$)/, wo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ot = "\\p{P}$+<=>`^|~", ko = te(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ot).getRegex(), _o = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, bo = te(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ot).getRegex(), yo = te("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ot).getRegex(), To = te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ot).getRegex(), vo = te(/\\([punct])/, "gu").replace(/punct/g, Ot).getRegex(), Eo = te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),
|
1176
|
+
}), si = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ii = /^( {2,}|\\)\n(?!\s*$)/, wo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ot = "\\p{P}$+<=>`^|~", ko = te(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ot).getRegex(), _o = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, bo = te(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ot).getRegex(), yo = te("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ot).getRegex(), To = te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ot).getRegex(), vo = te(/\\([punct])/, "gu").replace(/punct/g, Ot).getRegex(), Eo = te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), xo = te(Nn).replace("(?:-->|$)", "-->").getRegex(), So = te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", xo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Vt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Ao = te(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), oi = te(/^!?\[(label)\]\[(ref)\]/).replace("label", Vt).replace("ref", Dn).getRegex(), li = te(/^!?\[(ref)\](?:\[\])?/).replace("ref", Dn).getRegex(), Io = te("reflink|nolink(?!\\()", "g").replace("reflink", oi).replace("nolink", li).getRegex(), Fn = {
|
1177
1177
|
_backpedal: Ct,
|
1178
1178
|
// only used for GFM url
|
1179
1179
|
anyPunctuation: vo,
|
@@ -1186,12 +1186,12 @@ const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo =
|
|
1186
1186
|
emStrongRDelimAst: yo,
|
1187
1187
|
emStrongRDelimUnd: To,
|
1188
1188
|
escape: si,
|
1189
|
-
link:
|
1189
|
+
link: Ao,
|
1190
1190
|
nolink: li,
|
1191
1191
|
punctuation: ko,
|
1192
1192
|
reflink: oi,
|
1193
1193
|
reflinkSearch: Io,
|
1194
|
-
tag:
|
1194
|
+
tag: So,
|
1195
1195
|
text: wo,
|
1196
1196
|
url: Ct
|
1197
1197
|
}, Ro = ye(ee({}, Fn), {
|
@@ -1647,15 +1647,15 @@ class Xe {
|
|
1647
1647
|
let h = "";
|
1648
1648
|
for (let p = 0; p < l.items.length; p++) {
|
1649
1649
|
const d = l.items[p], g = d.checked, w = d.task;
|
1650
|
-
let
|
1650
|
+
let v = "";
|
1651
1651
|
if (d.task) {
|
1652
|
-
const
|
1653
|
-
u ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text =
|
1652
|
+
const I = this.renderer.checkbox(!!g);
|
1653
|
+
u ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text = I + " " + d.tokens[0].text, d.tokens[0].tokens && d.tokens[0].tokens.length > 0 && d.tokens[0].tokens[0].type === "text" && (d.tokens[0].tokens[0].text = I + " " + d.tokens[0].tokens[0].text)) : d.tokens.unshift({
|
1654
1654
|
type: "text",
|
1655
|
-
text:
|
1656
|
-
}) :
|
1655
|
+
text: I + " "
|
1656
|
+
}) : v += I + " ";
|
1657
1657
|
}
|
1658
|
-
|
1658
|
+
v += this.parse(d.tokens, u), h += this.renderer.listitem(v, w, !!g);
|
1659
1659
|
}
|
1660
1660
|
n += this.renderer.list(h, a, c);
|
1661
1661
|
continue;
|
@@ -2025,7 +2025,7 @@ vn || (vn = function(e, t, n) {
|
|
2025
2025
|
En || (En = function(e, t) {
|
2026
2026
|
return new e(...t);
|
2027
2027
|
});
|
2028
|
-
const Wt = Fe(Array.prototype.forEach), ps = Fe(Array.prototype.pop), Et = Fe(Array.prototype.push), Zt = Fe(String.prototype.toLowerCase), un = Fe(String.prototype.toString), ds = Fe(String.prototype.match),
|
2028
|
+
const Wt = Fe(Array.prototype.forEach), ps = Fe(Array.prototype.pop), Et = Fe(Array.prototype.push), Zt = Fe(String.prototype.toLowerCase), un = Fe(String.prototype.toString), ds = Fe(String.prototype.match), xt = Fe(String.prototype.replace), Do = Fe(String.prototype.indexOf), No = Fe(String.prototype.trim), We = Fe(Object.prototype.hasOwnProperty), Ce = Fe(RegExp.prototype.test), St = Po(TypeError);
|
2029
2029
|
function Fe(s) {
|
2030
2030
|
return function(e) {
|
2031
2031
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
@@ -2065,7 +2065,7 @@ function st(s) {
|
|
2065
2065
|
We(s, t) && (Array.isArray(n) ? e[t] = Fo(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = st(n) : e[t] = n);
|
2066
2066
|
return e;
|
2067
2067
|
}
|
2068
|
-
function
|
2068
|
+
function At(s, e) {
|
2069
2069
|
for (; s !== null; ) {
|
2070
2070
|
const n = Oo(s, e);
|
2071
2071
|
if (n) {
|
@@ -2169,22 +2169,22 @@ function hi() {
|
|
2169
2169
|
HTMLFormElement: p,
|
2170
2170
|
DOMParser: d,
|
2171
2171
|
trustedTypes: g
|
2172
|
-
} = s, w = c.prototype,
|
2172
|
+
} = s, w = c.prototype, v = At(w, "cloneNode"), I = At(w, "remove"), z = At(w, "nextSibling"), E = At(w, "childNodes"), _ = At(w, "parentNode");
|
2173
2173
|
if (typeof l == "function") {
|
2174
2174
|
const P = t.createElement("template");
|
2175
2175
|
P.content && P.content.ownerDocument && (t = P.content.ownerDocument);
|
2176
2176
|
}
|
2177
2177
|
let k, T = "";
|
2178
2178
|
const {
|
2179
|
-
implementation:
|
2179
|
+
implementation: S,
|
2180
2180
|
createNodeIterator: b,
|
2181
|
-
createDocumentFragment:
|
2182
|
-
getElementsByTagName:
|
2181
|
+
createDocumentFragment: L,
|
2182
|
+
getElementsByTagName: R
|
2183
2183
|
} = t, {
|
2184
2184
|
importNode: F
|
2185
2185
|
} = n;
|
2186
|
-
let
|
2187
|
-
e.isSupported = typeof ai == "function" && typeof _ == "function" &&
|
2186
|
+
let C = bs();
|
2187
|
+
e.isSupported = typeof ai == "function" && typeof _ == "function" && S && S.createHTMLDocument !== void 0;
|
2188
2188
|
const {
|
2189
2189
|
MUSTACHE_EXPR: j,
|
2190
2190
|
ERB_EXPR: Z,
|
@@ -2200,7 +2200,7 @@ function hi() {
|
|
2200
2200
|
} = _s, re = null;
|
2201
2201
|
const Ve = Y({}, [...gs, ...fn, ...hn, ...pn, ...ms]);
|
2202
2202
|
let ie = null;
|
2203
|
-
const
|
2203
|
+
const Ae = Y({}, [...ws, ...dn, ...ks, ...qt]);
|
2204
2204
|
let $ = Object.seal(ci(null, {
|
2205
2205
|
tagNameCheck: {
|
2206
2206
|
writable: !0,
|
@@ -2241,58 +2241,58 @@ function hi() {
|
|
2241
2241
|
let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2242
2242
|
if (!(ft && ft === f)) {
|
2243
2243
|
if ((!f || typeof f != "object") && (f = {}), f = st(f), yt = // eslint-disable-next-line unicorn/prefer-includes
|
2244
|
-
mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? wi : f.PARSER_MEDIA_TYPE, we = yt === "application/xhtml+xml" ? un : Zt, re = We(f, "ALLOWED_TAGS") ? Y({}, f.ALLOWED_TAGS, we) : Ve, ie = We(f, "ALLOWED_ATTR") ? Y({}, f.ALLOWED_ATTR, we) :
|
2244
|
+
mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? wi : f.PARSER_MEDIA_TYPE, we = yt === "application/xhtml+xml" ? un : Zt, re = We(f, "ALLOWED_TAGS") ? Y({}, f.ALLOWED_TAGS, we) : Ve, ie = We(f, "ALLOWED_ATTR") ? Y({}, f.ALLOWED_ATTR, we) : Ae, on = We(f, "ALLOWED_NAMESPACES") ? Y({}, f.ALLOWED_NAMESPACES, un) : di, ue = We(f, "ADD_URI_SAFE_ATTR") ? Y(st(ve), f.ADD_URI_SAFE_ATTR, we) : ve, J = We(f, "ADD_DATA_URI_TAGS") ? Y(st(ge), f.ADD_DATA_URI_TAGS, we) : ge, y = We(f, "FORBID_CONTENTS") ? Y({}, f.FORBID_CONTENTS, we) : H, Me = We(f, "FORBID_TAGS") ? Y({}, f.FORBID_TAGS, we) : {}, Te = We(f, "FORBID_ATTR") ? Y({}, f.FORBID_ATTR, we) : {}, tt = We(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Qe = f.ALLOW_ARIA_ATTR !== !1, D = f.ALLOW_DATA_ATTR !== !1, ne = f.ALLOW_UNKNOWN_PROTOCOLS || !1, O = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = f.SAFE_FOR_TEMPLATES || !1, pe = f.SAFE_FOR_XML !== !1, de = f.WHOLE_DOCUMENT || !1, et = f.RETURN_DOM || !1, at = f.RETURN_DOM_FRAGMENT || !1, ct = f.RETURN_TRUSTED_TYPE || !1, Ne = f.FORCE_BODY || !1, Dt = f.SANITIZE_DOM !== !1, Nt = f.SANITIZE_NAMED_PROPS || !1, bt = f.KEEP_CONTENT !== !1, nt = f.IN_PLACE || !1, qe = f.ALLOWED_URI_REGEXP || ui, ut = f.NAMESPACE || _e, Pt = f.MATHML_TEXT_INTEGRATION_POINTS || Pt, Ft = f.HTML_INTEGRATION_POINTS || Ft, $ = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), B && (D = !1), at && (et = !0), tt && (re = Y({}, ms), ie = [], tt.html === !0 && (Y(re, gs), Y(ie, ws)), tt.svg === !0 && (Y(re, fn), Y(ie, dn), Y(ie, qt)), tt.svgFilters === !0 && (Y(re, hn), Y(ie, dn), Y(ie, qt)), tt.mathMl === !0 && (Y(re, pn), Y(ie, ks), Y(ie, qt))), f.ADD_TAGS && (re === Ve && (re = st(re)), Y(re, f.ADD_TAGS, we)), f.ADD_ATTR && (ie === Ae && (ie = st(ie)), Y(ie, f.ADD_ATTR, we)), f.ADD_URI_SAFE_ATTR && Y(ue, f.ADD_URI_SAFE_ATTR, we), f.FORBID_CONTENTS && (y === H && (y = st(y)), Y(y, f.FORBID_CONTENTS, we)), bt && (re["#text"] = !0), de && Y(re, ["html", "head", "body"]), re.table && (Y(re, ["tbody"]), delete Me.tbody), f.TRUSTED_TYPES_POLICY) {
|
2245
2245
|
if (typeof f.TRUSTED_TYPES_POLICY.createHTML != "function")
|
2246
|
-
throw
|
2246
|
+
throw St('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
2247
2247
|
if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
2248
|
-
throw
|
2248
|
+
throw St('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
2249
2249
|
k = f.TRUSTED_TYPES_POLICY, T = k.createHTML("");
|
2250
2250
|
} else
|
2251
2251
|
k === void 0 && (k = Qo(g, i)), k !== null && typeof T == "string" && (T = k.createHTML(""));
|
2252
2252
|
Le && Le(f), ft = f;
|
2253
2253
|
}
|
2254
2254
|
}, Un = Y({}, [...fn, ...hn, ...Ho]), jn = Y({}, [...pn, ...Bo]), _i = function(f) {
|
2255
|
-
let
|
2256
|
-
(!
|
2255
|
+
let x = _(f);
|
2256
|
+
(!x || !x.tagName) && (x = {
|
2257
2257
|
namespaceURI: ut,
|
2258
2258
|
tagName: "template"
|
2259
2259
|
});
|
2260
|
-
const M = Zt(f.tagName), ae = Zt(
|
2261
|
-
return on[f.namespaceURI] ? f.namespaceURI === Je ?
|
2260
|
+
const M = Zt(f.tagName), ae = Zt(x.tagName);
|
2261
|
+
return on[f.namespaceURI] ? f.namespaceURI === Je ? x.namespaceURI === _e ? M === "svg" : x.namespaceURI === me ? M === "svg" && (ae === "annotation-xml" || Pt[ae]) : !!Un[M] : f.namespaceURI === me ? x.namespaceURI === _e ? M === "math" : x.namespaceURI === Je ? M === "math" && Ft[ae] : !!jn[M] : f.namespaceURI === _e ? x.namespaceURI === Je && !Ft[ae] || x.namespaceURI === me && !Pt[ae] ? !1 : !jn[M] && (gi[M] || !Un[M]) : !!(yt === "application/xhtml+xml" && on[f.namespaceURI]) : !1;
|
2262
2262
|
}, Ge = function(f) {
|
2263
2263
|
Et(e.removed, {
|
2264
2264
|
element: f
|
2265
2265
|
});
|
2266
2266
|
try {
|
2267
2267
|
_(f).removeChild(f);
|
2268
|
-
} catch (
|
2269
|
-
|
2268
|
+
} catch (x) {
|
2269
|
+
I(f);
|
2270
2270
|
}
|
2271
|
-
}, Ht = function(f,
|
2271
|
+
}, Ht = function(f, x) {
|
2272
2272
|
try {
|
2273
2273
|
Et(e.removed, {
|
2274
|
-
attribute:
|
2275
|
-
from:
|
2274
|
+
attribute: x.getAttributeNode(f),
|
2275
|
+
from: x
|
2276
2276
|
});
|
2277
2277
|
} catch (M) {
|
2278
2278
|
Et(e.removed, {
|
2279
2279
|
attribute: null,
|
2280
|
-
from:
|
2280
|
+
from: x
|
2281
2281
|
});
|
2282
2282
|
}
|
2283
|
-
if (
|
2283
|
+
if (x.removeAttribute(f), f === "is")
|
2284
2284
|
if (et || at)
|
2285
2285
|
try {
|
2286
|
-
Ge(
|
2286
|
+
Ge(x);
|
2287
2287
|
} catch (M) {
|
2288
2288
|
}
|
2289
2289
|
else
|
2290
2290
|
try {
|
2291
|
-
|
2291
|
+
x.setAttribute(f, "");
|
2292
2292
|
} catch (M) {
|
2293
2293
|
}
|
2294
2294
|
}, Wn = function(f) {
|
2295
|
-
let
|
2295
|
+
let x = null, M = null;
|
2296
2296
|
if (Ne)
|
2297
2297
|
f = "<remove></remove>" + f;
|
2298
2298
|
else {
|
@@ -2303,18 +2303,18 @@ function hi() {
|
|
2303
2303
|
const ae = k ? k.createHTML(f) : f;
|
2304
2304
|
if (ut === _e)
|
2305
2305
|
try {
|
2306
|
-
|
2306
|
+
x = new d().parseFromString(ae, yt);
|
2307
2307
|
} catch (be) {
|
2308
2308
|
}
|
2309
|
-
if (!
|
2310
|
-
|
2309
|
+
if (!x || !x.documentElement) {
|
2310
|
+
x = S.createDocument(ut, "template", null);
|
2311
2311
|
try {
|
2312
|
-
|
2312
|
+
x.documentElement.innerHTML = sn ? T : ae;
|
2313
2313
|
} catch (be) {
|
2314
2314
|
}
|
2315
2315
|
}
|
2316
|
-
const Ee =
|
2317
|
-
return f && M && Ee.insertBefore(t.createTextNode(M), Ee.childNodes[0] || null), ut === _e ?
|
2316
|
+
const Ee = x.body || x.documentElement;
|
2317
|
+
return f && M && Ee.insertBefore(t.createTextNode(M), Ee.childNodes[0] || null), ut === _e ? R.call(x, de ? "html" : "body")[0] : de ? x.documentElement : Ee;
|
2318
2318
|
}, qn = function(f) {
|
2319
2319
|
return b.call(
|
2320
2320
|
f.ownerDocument || f,
|
@@ -2328,17 +2328,17 @@ function hi() {
|
|
2328
2328
|
}, Gn = function(f) {
|
2329
2329
|
return typeof a == "function" && f instanceof a;
|
2330
2330
|
};
|
2331
|
-
function Ke(P, f,
|
2331
|
+
function Ke(P, f, x) {
|
2332
2332
|
Wt(P, (M) => {
|
2333
|
-
M.call(e, f,
|
2333
|
+
M.call(e, f, x, ft);
|
2334
2334
|
});
|
2335
2335
|
}
|
2336
2336
|
const Yn = function(f) {
|
2337
|
-
let
|
2338
|
-
if (Ke(
|
2337
|
+
let x = null;
|
2338
|
+
if (Ke(C.beforeSanitizeElements, f, null), rn(f))
|
2339
2339
|
return Ge(f), !0;
|
2340
2340
|
const M = we(f.nodeName);
|
2341
|
-
if (Ke(
|
2341
|
+
if (Ke(C.uponSanitizeElement, f, {
|
2342
2342
|
tagName: M,
|
2343
2343
|
allowedTags: re
|
2344
2344
|
}), f.hasChildNodes() && !Gn(f.firstElementChild) && Ce(/<[/\w]/g, f.innerHTML) && Ce(/<[/\w]/g, f.textContent) || f.nodeType === It.progressingInstruction || pe && f.nodeType === It.comment && Ce(/<[/\w]/g, f.data))
|
@@ -2347,40 +2347,40 @@ function hi() {
|
|
2347
2347
|
if (!Me[M] && Xn(M) && ($.tagNameCheck instanceof RegExp && Ce($.tagNameCheck, M) || $.tagNameCheck instanceof Function && $.tagNameCheck(M)))
|
2348
2348
|
return !1;
|
2349
2349
|
if (bt && !y[M]) {
|
2350
|
-
const ae = _(f) || f.parentNode, Ee =
|
2350
|
+
const ae = _(f) || f.parentNode, Ee = E(f) || f.childNodes;
|
2351
2351
|
if (Ee && ae) {
|
2352
2352
|
const be = Ee.length;
|
2353
2353
|
for (let Oe = be - 1; Oe >= 0; --Oe) {
|
2354
|
-
const Ye =
|
2354
|
+
const Ye = v(Ee[Oe], !0);
|
2355
2355
|
Ye.__removalCount = (f.__removalCount || 0) + 1, ae.insertBefore(Ye, z(f));
|
2356
2356
|
}
|
2357
2357
|
}
|
2358
2358
|
}
|
2359
2359
|
return Ge(f), !0;
|
2360
2360
|
}
|
2361
|
-
return f instanceof c && !_i(f) || (M === "noscript" || M === "noembed" || M === "noframes") && Ce(/<\/no(script|embed|frames)/i, f.innerHTML) ? (Ge(f), !0) : (B && f.nodeType === It.text && (
|
2362
|
-
|
2363
|
-
}), f.textContent !==
|
2361
|
+
return f instanceof c && !_i(f) || (M === "noscript" || M === "noembed" || M === "noframes") && Ce(/<\/no(script|embed|frames)/i, f.innerHTML) ? (Ge(f), !0) : (B && f.nodeType === It.text && (x = f.textContent, Wt([j, Z, X], (ae) => {
|
2362
|
+
x = xt(x, ae, " ");
|
2363
|
+
}), f.textContent !== x && (Et(e.removed, {
|
2364
2364
|
element: f.cloneNode()
|
2365
|
-
}), f.textContent =
|
2366
|
-
}, Zn = function(f,
|
2367
|
-
if (Dt && (
|
2365
|
+
}), f.textContent = x)), Ke(C.afterSanitizeElements, f, null), !1);
|
2366
|
+
}, Zn = function(f, x, M) {
|
2367
|
+
if (Dt && (x === "id" || x === "name") && (M in t || M in ki))
|
2368
2368
|
return !1;
|
2369
|
-
if (!(D && !Te[
|
2370
|
-
if (!(Qe && Ce(fe,
|
2371
|
-
if (!ie[
|
2369
|
+
if (!(D && !Te[x] && Ce(oe, x))) {
|
2370
|
+
if (!(Qe && Ce(fe, x))) {
|
2371
|
+
if (!ie[x] || Te[x]) {
|
2372
2372
|
if (
|
2373
2373
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
2374
2374
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2375
2375
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
2376
|
-
!(Xn(f) && ($.tagNameCheck instanceof RegExp && Ce($.tagNameCheck, f) || $.tagNameCheck instanceof Function && $.tagNameCheck(f)) && ($.attributeNameCheck instanceof RegExp && Ce($.attributeNameCheck,
|
2376
|
+
!(Xn(f) && ($.tagNameCheck instanceof RegExp && Ce($.tagNameCheck, f) || $.tagNameCheck instanceof Function && $.tagNameCheck(f)) && ($.attributeNameCheck instanceof RegExp && Ce($.attributeNameCheck, x) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(x)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
2377
2377
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2378
|
-
|
2378
|
+
x === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && Ce($.tagNameCheck, M) || $.tagNameCheck instanceof Function && $.tagNameCheck(M)))
|
2379
2379
|
) return !1;
|
2380
|
-
} else if (!ue[
|
2381
|
-
if (!Ce(qe,
|
2382
|
-
if (!((
|
2383
|
-
if (!(ne && !Ce(ce,
|
2380
|
+
} else if (!ue[x]) {
|
2381
|
+
if (!Ce(qe, xt(M, je, ""))) {
|
2382
|
+
if (!((x === "src" || x === "xlink:href" || x === "href") && f !== "script" && Do(M, "data:") === 0 && J[f])) {
|
2383
|
+
if (!(ne && !Ce(ce, xt(M, je, "")))) {
|
2384
2384
|
if (M)
|
2385
2385
|
return !1;
|
2386
2386
|
}
|
@@ -2393,11 +2393,11 @@ function hi() {
|
|
2393
2393
|
}, Xn = function(f) {
|
2394
2394
|
return f !== "annotation-xml" && ds(f, le);
|
2395
2395
|
}, Vn = function(f) {
|
2396
|
-
Ke(
|
2396
|
+
Ke(C.beforeSanitizeAttributes, f, null);
|
2397
2397
|
const {
|
2398
|
-
attributes:
|
2398
|
+
attributes: x
|
2399
2399
|
} = f;
|
2400
|
-
if (!
|
2400
|
+
if (!x || rn(f))
|
2401
2401
|
return;
|
2402
2402
|
const M = {
|
2403
2403
|
attrName: "",
|
@@ -2406,15 +2406,15 @@ function hi() {
|
|
2406
2406
|
allowedAttributes: ie,
|
2407
2407
|
forceKeepAttr: void 0
|
2408
2408
|
};
|
2409
|
-
let ae =
|
2409
|
+
let ae = x.length;
|
2410
2410
|
for (; ae--; ) {
|
2411
|
-
const Ee =
|
2411
|
+
const Ee = x[ae], {
|
2412
2412
|
name: be,
|
2413
2413
|
namespaceURI: Oe,
|
2414
2414
|
value: Ye
|
2415
2415
|
} = Ee, Tt = we(be);
|
2416
2416
|
let Ie = be === "value" ? Ye : No(Ye);
|
2417
|
-
if (M.attrName = Tt, M.attrValue = Ie, M.keepAttr = !0, M.forceKeepAttr = void 0, Ke(
|
2417
|
+
if (M.attrName = Tt, M.attrValue = Ie, M.keepAttr = !0, M.forceKeepAttr = void 0, Ke(C.uponSanitizeAttribute, f, M), Ie = M.attrValue, Nt && (Tt === "id" || Tt === "name") && (Ht(be, f), Ie = nn + Ie), pe && Ce(/((--!?|])>)|<\/(style|title)/i, Ie)) {
|
2418
2418
|
Ht(be, f);
|
2419
2419
|
continue;
|
2420
2420
|
}
|
@@ -2425,7 +2425,7 @@ function hi() {
|
|
2425
2425
|
continue;
|
2426
2426
|
}
|
2427
2427
|
B && Wt([j, Z, X], (Jn) => {
|
2428
|
-
Ie =
|
2428
|
+
Ie = xt(Ie, Jn, " ");
|
2429
2429
|
});
|
2430
2430
|
const Qn = we(f.nodeName);
|
2431
2431
|
if (Zn(Qn, Tt, Ie)) {
|
@@ -2446,75 +2446,75 @@ function hi() {
|
|
2446
2446
|
}
|
2447
2447
|
}
|
2448
2448
|
}
|
2449
|
-
Ke(
|
2449
|
+
Ke(C.afterSanitizeAttributes, f, null);
|
2450
2450
|
}, bi = function P(f) {
|
2451
|
-
let
|
2451
|
+
let x = null;
|
2452
2452
|
const M = qn(f);
|
2453
|
-
for (Ke(
|
2454
|
-
Ke(
|
2455
|
-
Ke(
|
2453
|
+
for (Ke(C.beforeSanitizeShadowDOM, f, null); x = M.nextNode(); )
|
2454
|
+
Ke(C.uponSanitizeShadowNode, x, null), Yn(x), Vn(x), x.content instanceof o && P(x.content);
|
2455
|
+
Ke(C.afterSanitizeShadowDOM, f, null);
|
2456
2456
|
};
|
2457
2457
|
return e.sanitize = function(P) {
|
2458
|
-
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
2458
|
+
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, x = null, M = null, ae = null, Ee = null;
|
2459
2459
|
if (sn = !P, sn && (P = "<!-->"), typeof P != "string" && !Gn(P))
|
2460
2460
|
if (typeof P.toString == "function") {
|
2461
2461
|
if (P = P.toString(), typeof P != "string")
|
2462
|
-
throw
|
2462
|
+
throw St("dirty is not a string, aborting");
|
2463
2463
|
} else
|
2464
|
-
throw
|
2464
|
+
throw St("toString is not a function");
|
2465
2465
|
if (!e.isSupported)
|
2466
2466
|
return P;
|
2467
2467
|
if (ze || ln(f), e.removed = [], typeof P == "string" && (nt = !1), nt) {
|
2468
2468
|
if (P.nodeName) {
|
2469
2469
|
const Ye = we(P.nodeName);
|
2470
2470
|
if (!re[Ye] || Me[Ye])
|
2471
|
-
throw
|
2471
|
+
throw St("root node is forbidden and cannot be sanitized in-place");
|
2472
2472
|
}
|
2473
2473
|
} else if (P instanceof a)
|
2474
|
-
|
2474
|
+
x = Wn("<!---->"), M = x.ownerDocument.importNode(P, !0), M.nodeType === It.element && M.nodeName === "BODY" || M.nodeName === "HTML" ? x = M : x.appendChild(M);
|
2475
2475
|
else {
|
2476
2476
|
if (!et && !B && !de && // eslint-disable-next-line unicorn/prefer-includes
|
2477
2477
|
P.indexOf("<") === -1)
|
2478
2478
|
return k && ct ? k.createHTML(P) : P;
|
2479
|
-
if (
|
2479
|
+
if (x = Wn(P), !x)
|
2480
2480
|
return et ? null : ct ? T : "";
|
2481
2481
|
}
|
2482
|
-
|
2483
|
-
const be = qn(nt ? P :
|
2482
|
+
x && Ne && Ge(x.firstChild);
|
2483
|
+
const be = qn(nt ? P : x);
|
2484
2484
|
for (; ae = be.nextNode(); )
|
2485
2485
|
Yn(ae), Vn(ae), ae.content instanceof o && bi(ae.content);
|
2486
2486
|
if (nt)
|
2487
2487
|
return P;
|
2488
2488
|
if (et) {
|
2489
2489
|
if (at)
|
2490
|
-
for (Ee =
|
2491
|
-
Ee.appendChild(
|
2490
|
+
for (Ee = L.call(x.ownerDocument); x.firstChild; )
|
2491
|
+
Ee.appendChild(x.firstChild);
|
2492
2492
|
else
|
2493
|
-
Ee =
|
2493
|
+
Ee = x;
|
2494
2494
|
return (ie.shadowroot || ie.shadowrootmode) && (Ee = F.call(n, Ee, !0)), Ee;
|
2495
2495
|
}
|
2496
|
-
let Oe = de ?
|
2497
|
-
return de && re["!doctype"] &&
|
2496
|
+
let Oe = de ? x.outerHTML : x.innerHTML;
|
2497
|
+
return de && re["!doctype"] && x.ownerDocument && x.ownerDocument.doctype && x.ownerDocument.doctype.name && Ce(fi, x.ownerDocument.doctype.name) && (Oe = "<!DOCTYPE " + x.ownerDocument.doctype.name + `>
|
2498
2498
|
` + Oe), B && Wt([j, Z, X], (Ye) => {
|
2499
|
-
Oe =
|
2499
|
+
Oe = xt(Oe, Ye, " ");
|
2500
2500
|
}), k && ct ? k.createHTML(Oe) : Oe;
|
2501
2501
|
}, e.setConfig = function() {
|
2502
2502
|
let P = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2503
2503
|
ln(P), ze = !0;
|
2504
2504
|
}, e.clearConfig = function() {
|
2505
2505
|
ft = null, ze = !1;
|
2506
|
-
}, e.isValidAttribute = function(P, f,
|
2506
|
+
}, e.isValidAttribute = function(P, f, x) {
|
2507
2507
|
ft || ln({});
|
2508
2508
|
const M = we(P), ae = we(f);
|
2509
|
-
return Zn(M, ae,
|
2509
|
+
return Zn(M, ae, x);
|
2510
2510
|
}, e.addHook = function(P, f) {
|
2511
|
-
typeof f == "function" && Et(
|
2511
|
+
typeof f == "function" && Et(C[P], f);
|
2512
2512
|
}, e.removeHook = function(P) {
|
2513
|
-
return ps(
|
2513
|
+
return ps(C[P]);
|
2514
2514
|
}, e.removeHooks = function(P) {
|
2515
|
-
|
2515
|
+
C[P] = [];
|
2516
2516
|
}, e.removeAllHooks = function() {
|
2517
|
-
|
2517
|
+
C = bs();
|
2518
2518
|
}, e;
|
2519
2519
|
}
|
2520
2520
|
var ys = hi();
|
@@ -2551,7 +2551,7 @@ function Es(s) {
|
|
2551
2551
|
), n;
|
2552
2552
|
return {
|
2553
2553
|
c() {
|
2554
|
-
e =
|
2554
|
+
e = A("div"), n = xe(t), r(e, "class", "sy-assistant-button-tooltip svelte-1g6fj9a"), N(
|
2555
2555
|
e,
|
2556
2556
|
"left",
|
2557
2557
|
/*buttonTooltip*/
|
@@ -2595,7 +2595,7 @@ function Es(s) {
|
|
2595
2595
|
);
|
2596
2596
|
},
|
2597
2597
|
d(i) {
|
2598
|
-
i &&
|
2598
|
+
i && q(e);
|
2599
2599
|
}
|
2600
2600
|
};
|
2601
2601
|
}
|
@@ -2610,17 +2610,17 @@ function Jo(s) {
|
|
2610
2610
|
);
|
2611
2611
|
for (let c = 0; c < o.length; c += 1) {
|
2612
2612
|
let u = vs(s, o, c), h = l(u);
|
2613
|
-
t.set(h, e[c] =
|
2613
|
+
t.set(h, e[c] = xs(h, u));
|
2614
2614
|
}
|
2615
2615
|
let a = (
|
2616
2616
|
/*isLoading*/
|
2617
|
-
s[5] &&
|
2617
|
+
s[5] && Ss()
|
2618
2618
|
);
|
2619
2619
|
return {
|
2620
2620
|
c() {
|
2621
2621
|
for (let c = 0; c < e.length; c += 1)
|
2622
2622
|
e[c].c();
|
2623
|
-
n =
|
2623
|
+
n = W(), a && a.c(), i = Kt();
|
2624
2624
|
},
|
2625
2625
|
m(c, u) {
|
2626
2626
|
for (let h = 0; h < e.length; h += 1)
|
@@ -2632,11 +2632,11 @@ function Jo(s) {
|
|
2632
2632
|
8261 && (o = _t(
|
2633
2633
|
/*sessions*/
|
2634
2634
|
c[0]
|
2635
|
-
), e = Qs(e, u, l, 1, c, o, t, n.parentNode, Vs,
|
2636
|
-
c[5] ? a || (a =
|
2635
|
+
), e = Qs(e, u, l, 1, c, o, t, n.parentNode, Vs, xs, n, vs)), /*isLoading*/
|
2636
|
+
c[5] ? a || (a = Ss(), a.c(), a.m(i.parentNode, i)) : a && (a.d(1), a = null);
|
2637
2637
|
},
|
2638
2638
|
d(c) {
|
2639
|
-
c && (
|
2639
|
+
c && (q(n), q(i));
|
2640
2640
|
for (let u = 0; u < e.length; u += 1)
|
2641
2641
|
e[u].d(c);
|
2642
2642
|
a && a.d(c);
|
@@ -2653,7 +2653,7 @@ function Ko(s) {
|
|
2653
2653
|
), n;
|
2654
2654
|
return {
|
2655
2655
|
c() {
|
2656
|
-
e =
|
2656
|
+
e = A("div"), n = xe(t), r(e, "class", "sy-session-empty svelte-1g6fj9a");
|
2657
2657
|
},
|
2658
2658
|
m(i, o) {
|
2659
2659
|
G(i, e, o), m(e, n);
|
@@ -2667,19 +2667,19 @@ function Ko(s) {
|
|
2667
2667
|
)) && He(n, t);
|
2668
2668
|
},
|
2669
2669
|
d(i) {
|
2670
|
-
i &&
|
2670
|
+
i && q(e);
|
2671
2671
|
}
|
2672
2672
|
};
|
2673
2673
|
}
|
2674
|
-
function
|
2674
|
+
function xs(s, e) {
|
2675
2675
|
let t, n, i, o, l = (
|
2676
2676
|
/*session*/
|
2677
2677
|
e[24].title + ""
|
2678
2678
|
), a, c, u, h = Is(
|
2679
2679
|
/*session*/
|
2680
2680
|
e[24].timestamp
|
2681
|
-
) + "", p, d, g, w,
|
2682
|
-
function
|
2681
|
+
) + "", p, d, g, w, v, I, z, E, _, k, T;
|
2682
|
+
function S() {
|
2683
2683
|
return (
|
2684
2684
|
/*click_handler*/
|
2685
2685
|
e[17](
|
@@ -2688,13 +2688,13 @@ function Ss(s, e) {
|
|
2688
2688
|
)
|
2689
2689
|
);
|
2690
2690
|
}
|
2691
|
-
function b(...
|
2691
|
+
function b(...L) {
|
2692
2692
|
return (
|
2693
2693
|
/*click_handler_1*/
|
2694
2694
|
e[18](
|
2695
2695
|
/*session*/
|
2696
2696
|
e[24],
|
2697
|
-
...
|
2697
|
+
...L
|
2698
2698
|
)
|
2699
2699
|
);
|
2700
2700
|
}
|
@@ -2702,7 +2702,7 @@ function Ss(s, e) {
|
|
2702
2702
|
key: s,
|
2703
2703
|
first: null,
|
2704
2704
|
c() {
|
2705
|
-
t =
|
2705
|
+
t = A("div"), n = A("button"), i = A("div"), o = A("div"), a = xe(l), c = W(), u = A("div"), p = xe(h), d = W(), g = A("button"), w = V("svg"), v = V("path"), I = V("path"), z = V("path"), r(o, "class", "sy-session-title svelte-1g6fj9a"), r(u, "class", "sy-session-time svelte-1g6fj9a"), r(i, "class", "sy-session-info svelte-1g6fj9a"), r(n, "class", "sy-session-select svelte-1g6fj9a"), r(v, "d", "M3 6h18"), r(I, "d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"), r(z, "d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"), r(w, "xmlns", "http://www.w3.org/2000/svg"), r(w, "width", "16"), r(w, "height", "16"), r(w, "viewBox", "0 0 24 24"), r(w, "fill", "none"), r(w, "stroke", "currentColor"), r(w, "stroke-width", "2"), r(w, "stroke-linecap", "round"), r(w, "stroke-linejoin", "round"), r(g, "class", "sy-session-delete svelte-1g6fj9a"), g.disabled = E = /*deletingSessionId*/
|
2706
2706
|
e[6] === /*session*/
|
2707
2707
|
e[24].sessionId, r(g, "aria-label", "删除会话"), r(t, "class", "sy-session-item svelte-1g6fj9a"), r(t, "data-session-id", _ = /*session*/
|
2708
2708
|
e[24].sessionId), Q(
|
@@ -2712,25 +2712,25 @@ function Ss(s, e) {
|
|
2712
2712
|
e[24].deleting
|
2713
2713
|
), this.first = t;
|
2714
2714
|
},
|
2715
|
-
m(
|
2716
|
-
G(
|
2717
|
-
U(n, "click",
|
2715
|
+
m(L, R) {
|
2716
|
+
G(L, t, R), m(t, n), m(n, i), m(i, o), m(o, a), m(i, c), m(i, u), m(u, p), m(t, d), m(t, g), m(g, w), m(w, v), m(w, I), m(w, z), k || (T = [
|
2717
|
+
U(n, "click", S),
|
2718
2718
|
U(g, "click", b)
|
2719
2719
|
], k = !0);
|
2720
2720
|
},
|
2721
|
-
p(
|
2722
|
-
e =
|
2721
|
+
p(L, R) {
|
2722
|
+
e = L, R & /*sessions*/
|
2723
2723
|
1 && l !== (l = /*session*/
|
2724
|
-
e[24].title + "") && He(a, l),
|
2724
|
+
e[24].title + "") && He(a, l), R & /*sessions*/
|
2725
2725
|
1 && h !== (h = Is(
|
2726
2726
|
/*session*/
|
2727
2727
|
e[24].timestamp
|
2728
|
-
) + "") && He(p, h),
|
2729
|
-
65 &&
|
2728
|
+
) + "") && He(p, h), R & /*deletingSessionId, sessions*/
|
2729
|
+
65 && E !== (E = /*deletingSessionId*/
|
2730
2730
|
e[6] === /*session*/
|
2731
|
-
e[24].sessionId) && (g.disabled =
|
2731
|
+
e[24].sessionId) && (g.disabled = E), R & /*sessions*/
|
2732
2732
|
1 && _ !== (_ = /*session*/
|
2733
|
-
e[24].sessionId) && r(t, "data-session-id", _),
|
2733
|
+
e[24].sessionId) && r(t, "data-session-id", _), R & /*sessions*/
|
2734
2734
|
1 && Q(
|
2735
2735
|
t,
|
2736
2736
|
"deleting",
|
@@ -2738,30 +2738,30 @@ function Ss(s, e) {
|
|
2738
2738
|
e[24].deleting
|
2739
2739
|
);
|
2740
2740
|
},
|
2741
|
-
d(
|
2742
|
-
|
2741
|
+
d(L) {
|
2742
|
+
L && q(t), k = !1, Se(T);
|
2743
2743
|
}
|
2744
2744
|
};
|
2745
2745
|
}
|
2746
|
-
function
|
2746
|
+
function Ss(s) {
|
2747
2747
|
let e;
|
2748
2748
|
return {
|
2749
2749
|
c() {
|
2750
|
-
e =
|
2750
|
+
e = A("div"), e.innerHTML = '<span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span>', r(e, "class", "sy-session-loading svelte-1g6fj9a");
|
2751
2751
|
},
|
2752
2752
|
m(t, n) {
|
2753
2753
|
G(t, e, n);
|
2754
2754
|
},
|
2755
2755
|
d(t) {
|
2756
|
-
t &&
|
2756
|
+
t && q(e);
|
2757
2757
|
}
|
2758
2758
|
};
|
2759
2759
|
}
|
2760
|
-
function
|
2760
|
+
function As(s) {
|
2761
2761
|
let e, t, n, i, o, l, a, c, u;
|
2762
2762
|
return {
|
2763
2763
|
c() {
|
2764
|
-
e =
|
2764
|
+
e = A("div"), t = A("div"), t.textContent = "确认删除此会话?", n = W(), i = A("div"), o = A("button"), o.textContent = "取消", l = W(), a = A("button"), a.textContent = "删除", r(t, "class", "sy-session-confirm-content svelte-1g6fj9a"), r(o, "class", "sy-session-confirm-cancel svelte-1g6fj9a"), r(a, "class", "sy-session-confirm-delete svelte-1g6fj9a"), r(i, "class", "sy-session-confirm-actions svelte-1g6fj9a"), r(e, "class", "sy-session-confirm-popup svelte-1g6fj9a"), N(
|
2765
2765
|
e,
|
2766
2766
|
"left",
|
2767
2767
|
/*confirmPosition*/
|
@@ -2816,42 +2816,42 @@ function xs(s) {
|
|
2816
2816
|
);
|
2817
2817
|
},
|
2818
2818
|
d(h) {
|
2819
|
-
h &&
|
2819
|
+
h && q(e), c = !1, Se(u);
|
2820
2820
|
}
|
2821
2821
|
};
|
2822
2822
|
}
|
2823
2823
|
function $o(s) {
|
2824
|
-
let e, t, n, i, o, l, a, c, u, h, p, d, g, w,
|
2824
|
+
let e, t, n, i, o, l, a, c, u, h, p, d, g, w, v, I, z, E, _, k = (
|
2825
2825
|
/*buttonTooltip*/
|
2826
2826
|
s[9] && Es(s)
|
2827
2827
|
);
|
2828
|
-
function T(
|
2828
|
+
function T(R, F) {
|
2829
2829
|
return (
|
2830
2830
|
/*sessions*/
|
2831
|
-
|
2831
|
+
R[0].length === 0 ? Ko : Jo
|
2832
2832
|
);
|
2833
2833
|
}
|
2834
|
-
let
|
2834
|
+
let S = T(s), b = S(s), L = (
|
2835
2835
|
/*confirmDeleteId*/
|
2836
|
-
s[7] &&
|
2836
|
+
s[7] && As(s)
|
2837
2837
|
);
|
2838
2838
|
return {
|
2839
2839
|
c() {
|
2840
|
-
e =
|
2840
|
+
e = A("div"), t = A("div"), n = A("h2"), n.textContent = "历史会话", i = W(), o = A("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', l = W(), a = A("div"), c = A("input"), u = W(), h = V("svg"), p = V("circle"), d = V("line"), g = W(), k && k.c(), w = W(), v = A("div"), b.c(), I = W(), L && L.c(), z = Kt(), r(n, "class", "svelte-1g6fj9a"), r(o, "class", "sy-session-close svelte-1g6fj9a"), r(o, "aria-label", "关闭历史会话"), r(t, "class", "sy-session-header svelte-1g6fj9a"), r(c, "type", "text"), r(c, "class", "sy-session-search-input svelte-1g6fj9a"), r(c, "placeholder", "搜索历史会话..."), r(p, "cx", "11"), r(p, "cy", "11"), r(p, "r", "8"), r(d, "x1", "21"), r(d, "y1", "21"), r(d, "x2", "16.65"), r(d, "y2", "16.65"), r(h, "class", "sy-session-search-icon svelte-1g6fj9a"), r(h, "xmlns", "http://www.w3.org/2000/svg"), r(h, "width", "16"), r(h, "height", "16"), r(h, "viewBox", "0 0 24 24"), r(h, "fill", "none"), r(h, "stroke", "currentColor"), r(h, "stroke-width", "2"), r(h, "stroke-linecap", "round"), r(h, "stroke-linejoin", "round"), r(a, "class", "sy-session-search svelte-1g6fj9a"), r(v, "class", "sy-session-list svelte-1g6fj9a"), r(e, "class", "sy-session-history svelte-1g6fj9a"), N(
|
2841
2841
|
e,
|
2842
2842
|
"z-index",
|
2843
2843
|
/*zIndex*/
|
2844
2844
|
s[3] + 2
|
2845
2845
|
);
|
2846
2846
|
},
|
2847
|
-
m(
|
2848
|
-
G(
|
2847
|
+
m(R, F) {
|
2848
|
+
G(R, e, F), m(e, t), m(t, n), m(t, i), m(t, o), m(e, l), m(e, a), m(a, c), wt(
|
2849
2849
|
c,
|
2850
2850
|
/*searchQuery*/
|
2851
2851
|
s[4]
|
2852
|
-
), m(a, u), m(a, h), m(h, p), m(h, d), m(e, g), k && k.m(e, null), m(e, w), m(e,
|
2852
|
+
), m(a, u), m(a, h), m(h, p), m(h, d), m(e, g), k && k.m(e, null), m(e, w), m(e, v), b.m(v, null), G(R, I, F), L && L.m(R, F), G(R, z, F), E || (_ = [
|
2853
2853
|
U(o, "click", function() {
|
2854
|
-
|
2854
|
+
Sn(
|
2855
2855
|
/*onClose*/
|
2856
2856
|
s[1]
|
2857
2857
|
) && s[1].apply(this, arguments);
|
@@ -2875,34 +2875,34 @@ function $o(s) {
|
|
2875
2875
|
s[16]
|
2876
2876
|
),
|
2877
2877
|
U(
|
2878
|
-
|
2878
|
+
v,
|
2879
2879
|
"scroll",
|
2880
2880
|
/*handleScroll*/
|
2881
2881
|
s[10]
|
2882
2882
|
)
|
2883
|
-
],
|
2883
|
+
], E = !0);
|
2884
2884
|
},
|
2885
|
-
p(
|
2886
|
-
s =
|
2885
|
+
p(R, [F]) {
|
2886
|
+
s = R, F & /*searchQuery*/
|
2887
2887
|
16 && c.value !== /*searchQuery*/
|
2888
2888
|
s[4] && wt(
|
2889
2889
|
c,
|
2890
2890
|
/*searchQuery*/
|
2891
2891
|
s[4]
|
2892
2892
|
), /*buttonTooltip*/
|
2893
|
-
s[9] ? k ? k.p(s, F) : (k = Es(s), k.c(), k.m(e, w)) : k && (k.d(1), k = null),
|
2893
|
+
s[9] ? k ? k.p(s, F) : (k = Es(s), k.c(), k.m(e, w)) : k && (k.d(1), k = null), S === (S = T(s)) && b ? b.p(s, F) : (b.d(1), b = S(s), b && (b.c(), b.m(v, null))), F & /*zIndex*/
|
2894
2894
|
8 && N(
|
2895
2895
|
e,
|
2896
2896
|
"z-index",
|
2897
2897
|
/*zIndex*/
|
2898
2898
|
s[3] + 2
|
2899
2899
|
), /*confirmDeleteId*/
|
2900
|
-
s[7] ?
|
2900
|
+
s[7] ? L ? L.p(s, F) : (L = As(s), L.c(), L.m(z.parentNode, z)) : L && (L.d(1), L = null);
|
2901
2901
|
},
|
2902
2902
|
i: De,
|
2903
2903
|
o: De,
|
2904
|
-
d(
|
2905
|
-
|
2904
|
+
d(R) {
|
2905
|
+
R && (q(e), q(I), q(z)), k && k.d(), b.d(), L && L.d(R), E = !1, Se(_);
|
2906
2906
|
}
|
2907
2907
|
};
|
2908
2908
|
}
|
@@ -2917,7 +2917,7 @@ function el(s, e, t) {
|
|
2917
2917
|
if (!(a || !c)) {
|
2918
2918
|
t(5, a = !0);
|
2919
2919
|
try {
|
2920
|
-
const
|
2920
|
+
const C = yield fetch("/aiops/aigc/chat/record/session/list/query", {
|
2921
2921
|
method: "POST",
|
2922
2922
|
headers: {
|
2923
2923
|
"Content-Type": "application/json",
|
@@ -2926,9 +2926,9 @@ function el(s, e, t) {
|
|
2926
2926
|
},
|
2927
2927
|
body: JSON.stringify({ start: u, length: gn, keyword: h })
|
2928
2928
|
});
|
2929
|
-
if (!
|
2929
|
+
if (!C.ok)
|
2930
2930
|
throw new Error("Failed to load sessions");
|
2931
|
-
const j = yield
|
2931
|
+
const j = yield C.json();
|
2932
2932
|
if (j.code === 0) {
|
2933
2933
|
const Z = j.data.sessionList.map((X) => ({
|
2934
2934
|
sessionId: X.sessionId,
|
@@ -2937,47 +2937,47 @@ function el(s, e, t) {
|
|
2937
2937
|
}));
|
2938
2938
|
t(0, n = [...n, ...Z]), u += gn, c = Z.length === gn;
|
2939
2939
|
}
|
2940
|
-
} catch (
|
2941
|
-
console.error("Failed to load sessions:",
|
2940
|
+
} catch (C) {
|
2941
|
+
console.error("Failed to load sessions:", C);
|
2942
2942
|
} finally {
|
2943
2943
|
t(5, a = !1);
|
2944
2944
|
}
|
2945
2945
|
}
|
2946
2946
|
});
|
2947
2947
|
}
|
2948
|
-
function
|
2949
|
-
const j =
|
2948
|
+
function v(C) {
|
2949
|
+
const j = C.target, { scrollTop: Z, scrollHeight: X, clientHeight: oe } = j;
|
2950
2950
|
X - Z - oe < 50 && w();
|
2951
2951
|
}
|
2952
2952
|
Zs(() => {
|
2953
2953
|
w();
|
2954
2954
|
});
|
2955
|
-
let
|
2956
|
-
function z(
|
2957
|
-
const X =
|
2958
|
-
t(9,
|
2955
|
+
let I = null;
|
2956
|
+
function z(C, j) {
|
2957
|
+
const X = C.currentTarget.getBoundingClientRect();
|
2958
|
+
t(9, I = {
|
2959
2959
|
text: j,
|
2960
2960
|
x: X.left + X.width / 2,
|
2961
2961
|
y: X.bottom + 8
|
2962
2962
|
});
|
2963
2963
|
}
|
2964
|
-
function
|
2965
|
-
t(9,
|
2964
|
+
function E() {
|
2965
|
+
t(9, I = null);
|
2966
2966
|
}
|
2967
|
-
function _(
|
2968
|
-
const X =
|
2967
|
+
function _(C, j) {
|
2968
|
+
const X = C.currentTarget.getBoundingClientRect();
|
2969
2969
|
t(8, g = {
|
2970
2970
|
x: X.left - 16,
|
2971
2971
|
// 靠近删除按钮
|
2972
2972
|
y: X.top + X.height / 2
|
2973
2973
|
}), t(7, d = j);
|
2974
2974
|
}
|
2975
|
-
function k(
|
2975
|
+
function k(C) {
|
2976
2976
|
return Re(this, null, function* () {
|
2977
|
-
if (
|
2977
|
+
if (C && !p)
|
2978
2978
|
try {
|
2979
|
-
t(6, p =
|
2980
|
-
const j = document.querySelector(`[data-session-id="${
|
2979
|
+
t(6, p = C), t(7, d = null);
|
2980
|
+
const j = document.querySelector(`[data-session-id="${C}"]`);
|
2981
2981
|
j && j.classList.add("deleting"), yield new Promise((oe) => setTimeout(oe, 300));
|
2982
2982
|
const Z = yield fetch("/aiops/aigc/chat/record/session/delete", {
|
2983
2983
|
method: "POST",
|
@@ -2986,14 +2986,14 @@ function el(s, e, t) {
|
|
2986
2986
|
"Auth-Token": `${ke()}`,
|
2987
2987
|
Authorization: `bearer ${ke()}`
|
2988
2988
|
},
|
2989
|
-
body: JSON.stringify({ sessionId:
|
2989
|
+
body: JSON.stringify({ sessionId: C })
|
2990
2990
|
});
|
2991
2991
|
if (!Z.ok)
|
2992
2992
|
throw new Error("Delete request failed");
|
2993
2993
|
const X = yield Z.json();
|
2994
2994
|
if (X.code === 0 && X.data.respCode === 0)
|
2995
2995
|
t(0, n = n.map((oe) => ye(ee({}, oe), {
|
2996
|
-
deleting: oe.sessionId ===
|
2996
|
+
deleting: oe.sessionId === C
|
2997
2997
|
}))), setTimeout(
|
2998
2998
|
() => {
|
2999
2999
|
t(0, n = n.filter((oe) => !oe.deleting));
|
@@ -3004,7 +3004,7 @@ function el(s, e, t) {
|
|
3004
3004
|
throw new Error("Delete failed: " + X.message);
|
3005
3005
|
} catch (j) {
|
3006
3006
|
console.error("Failed to delete session:", j);
|
3007
|
-
const Z = document.querySelector(`[data-session-id="${
|
3007
|
+
const Z = document.querySelector(`[data-session-id="${C}"]`);
|
3008
3008
|
Z && Z.classList.remove("deleting");
|
3009
3009
|
} finally {
|
3010
3010
|
t(6, p = null);
|
@@ -3014,13 +3014,13 @@ function el(s, e, t) {
|
|
3014
3014
|
function T() {
|
3015
3015
|
d && k(d);
|
3016
3016
|
}
|
3017
|
-
const
|
3017
|
+
const S = (C) => z(C, "关闭历史会话");
|
3018
3018
|
function b() {
|
3019
3019
|
h = this.value, t(4, h);
|
3020
3020
|
}
|
3021
|
-
const
|
3022
|
-
return s.$$set = (
|
3023
|
-
"sessions" in
|
3021
|
+
const L = (C) => o(C.sessionId), R = (C, j) => _(j, C.sessionId), F = () => t(7, d = null);
|
3022
|
+
return s.$$set = (C) => {
|
3023
|
+
"sessions" in C && t(0, n = C.sessions), "onClose" in C && t(1, i = C.onClose), "onSelect" in C && t(2, o = C.onSelect), "zIndex" in C && t(3, l = C.zIndex);
|
3024
3024
|
}, s.$$.update = () => {
|
3025
3025
|
s.$$.dirty & /*searchQuery*/
|
3026
3026
|
16 && h !== void 0 && (t(0, n = []), u = 0, c = !0, w());
|
@@ -3034,16 +3034,16 @@ function el(s, e, t) {
|
|
3034
3034
|
p,
|
3035
3035
|
d,
|
3036
3036
|
g,
|
3037
|
-
|
3038
|
-
S,
|
3039
|
-
z,
|
3037
|
+
I,
|
3040
3038
|
v,
|
3039
|
+
z,
|
3040
|
+
E,
|
3041
3041
|
_,
|
3042
3042
|
T,
|
3043
|
-
|
3043
|
+
S,
|
3044
3044
|
b,
|
3045
|
-
|
3046
|
-
|
3045
|
+
L,
|
3046
|
+
R,
|
3047
3047
|
F
|
3048
3048
|
];
|
3049
3049
|
}
|
@@ -3080,10 +3080,10 @@ function tl(s) {
|
|
3080
3080
|
}
|
3081
3081
|
return {
|
3082
3082
|
c() {
|
3083
|
-
e =
|
3083
|
+
e = A("div");
|
3084
3084
|
for (let l = 0; l < t.length; l += 1)
|
3085
3085
|
t[l].c();
|
3086
|
-
r(e, "class", "sy-assistant-message-list svelte-
|
3086
|
+
r(e, "class", "sy-assistant-message-list svelte-ivxw7h");
|
3087
3087
|
},
|
3088
3088
|
m(l, a) {
|
3089
3089
|
G(l, e, a);
|
@@ -3101,7 +3101,7 @@ function tl(s) {
|
|
3101
3101
|
i: De,
|
3102
3102
|
o: De,
|
3103
3103
|
d(l) {
|
3104
|
-
l &&
|
3104
|
+
l && q(e);
|
3105
3105
|
for (let a = 0; a < t.length; a += 1)
|
3106
3106
|
t[a].d();
|
3107
3107
|
s[47](null);
|
@@ -3157,13 +3157,13 @@ function sl(s) {
|
|
3157
3157
|
let e;
|
3158
3158
|
return {
|
3159
3159
|
c() {
|
3160
|
-
e =
|
3160
|
+
e = A("div"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path></svg>', r(e, "class", "sy-assistant-avatar user svelte-ivxw7h");
|
3161
3161
|
},
|
3162
3162
|
m(t, n) {
|
3163
3163
|
G(t, e, n);
|
3164
3164
|
},
|
3165
3165
|
d(t) {
|
3166
|
-
t &&
|
3166
|
+
t && q(e);
|
3167
3167
|
}
|
3168
3168
|
};
|
3169
3169
|
}
|
@@ -3171,13 +3171,13 @@ function il(s) {
|
|
3171
3171
|
let e;
|
3172
3172
|
return {
|
3173
3173
|
c() {
|
3174
|
-
e =
|
3174
|
+
e = A("div"), e.innerHTML = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor"><path d="M896.512 698.88H132.608c-58.88 0-107.008-48.128-107.008-107.008v-10.24c0-58.88 48.128-107.008 107.008-107.008h763.904c58.88 0 107.008 48.128 107.008 107.008v10.24c0 58.88-48.128 107.008-107.008 107.008zM496.64 201.728h35.84v117.248h-35.84z" fill="#6F8698"></path><path d="M516.608 223.744h-4.608c-37.888 0-68.096-30.72-68.096-68.096v-6.656c0-37.888 30.72-68.096 68.096-68.096h4.608c37.888 0 68.096 30.72 68.096 68.096v6.656c0.512 37.888-30.208 68.096-68.096 68.096z" fill="#3677FF"></path><path d="M573.44 944.64H450.56c-181.248 0-327.68-146.432-327.68-327.68v-4.096c0-181.248 146.432-327.68 327.68-327.68h122.88c181.248 0 327.68 146.432 327.68 327.68v4.096c0 180.224-146.432 327.68-327.68 327.68z" fill="#D0D5F1"></path><path d="M681.984 715.264H347.136c-72.704 0-131.584-58.88-131.584-131.584s58.88-131.584 131.584-131.584h334.336c72.704 0 131.584 58.88 131.584 131.584 0.512 72.704-58.368 131.584-131.072 131.584z" fill="#3677FF"></path><path d="M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M443.392 799.232s2.56 58.88 68.096 58.88c58.88 0 69.632-61.952 69.632-61.952s-27.136 33.28-68.096 33.28c-42.496 0-69.632-30.208-69.632-30.208z" fill="#8896A4"></path></svg>', r(e, "class", "sy-assistant-avatar assistant svelte-ivxw7h");
|
3175
3175
|
},
|
3176
3176
|
m(t, n) {
|
3177
3177
|
G(t, e, n);
|
3178
3178
|
},
|
3179
3179
|
d(t) {
|
3180
|
-
t &&
|
3180
|
+
t && q(e);
|
3181
3181
|
}
|
3182
3182
|
};
|
3183
3183
|
}
|
@@ -3191,7 +3191,7 @@ function ol(s) {
|
|
3191
3191
|
);
|
3192
3192
|
return {
|
3193
3193
|
c() {
|
3194
|
-
e =
|
3194
|
+
e = A("div"), r(e, "class", "markdown-content svelte-ivxw7h");
|
3195
3195
|
},
|
3196
3196
|
m(n, i) {
|
3197
3197
|
G(n, e, i), e.innerHTML = t;
|
@@ -3205,7 +3205,7 @@ function ol(s) {
|
|
3205
3205
|
) + "") && (e.innerHTML = t);
|
3206
3206
|
},
|
3207
3207
|
d(n) {
|
3208
|
-
n &&
|
3208
|
+
n && q(e);
|
3209
3209
|
}
|
3210
3210
|
};
|
3211
3211
|
}
|
@@ -3213,14 +3213,14 @@ function ll(s) {
|
|
3213
3213
|
let e;
|
3214
3214
|
return {
|
3215
3215
|
c() {
|
3216
|
-
e =
|
3216
|
+
e = A("span"), e.innerHTML = '<span class="dot svelte-ivxw7h">.</span> <span class="dot svelte-ivxw7h">.</span> <span class="dot svelte-ivxw7h">.</span>', r(e, "class", "sy-assistant-loading svelte-ivxw7h");
|
3217
3217
|
},
|
3218
3218
|
m(t, n) {
|
3219
3219
|
G(t, e, n);
|
3220
3220
|
},
|
3221
3221
|
p: De,
|
3222
3222
|
d(t) {
|
3223
|
-
t &&
|
3223
|
+
t && q(e);
|
3224
3224
|
}
|
3225
3225
|
};
|
3226
3226
|
}
|
@@ -3233,10 +3233,10 @@ function Ls(s) {
|
|
3233
3233
|
n[i] = Os(Cs(s, t, i));
|
3234
3234
|
return {
|
3235
3235
|
c() {
|
3236
|
-
e =
|
3236
|
+
e = A("div");
|
3237
3237
|
for (let i = 0; i < n.length; i += 1)
|
3238
3238
|
n[i].c();
|
3239
|
-
r(e, "class", "sy-assistant-attachments svelte-
|
3239
|
+
r(e, "class", "sy-assistant-attachments svelte-ivxw7h");
|
3240
3240
|
},
|
3241
3241
|
m(i, o) {
|
3242
3242
|
G(i, e, o);
|
@@ -3261,7 +3261,7 @@ function Ls(s) {
|
|
3261
3261
|
}
|
3262
3262
|
},
|
3263
3263
|
d(i) {
|
3264
|
-
i &&
|
3264
|
+
i && q(e), Ci(n, i);
|
3265
3265
|
}
|
3266
3266
|
};
|
3267
3267
|
}
|
@@ -3279,7 +3279,7 @@ function Ms(s) {
|
|
3279
3279
|
}
|
3280
3280
|
return {
|
3281
3281
|
c() {
|
3282
|
-
e =
|
3282
|
+
e = A("button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-ivxw7h"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>', r(e, "class", "sy-assistant-attachment-toggle svelte-ivxw7h"), r(e, "aria-label", "查看详情");
|
3283
3283
|
},
|
3284
3284
|
m(o, l) {
|
3285
3285
|
G(o, e, l), t || (n = [
|
@@ -3296,7 +3296,7 @@ function Ms(s) {
|
|
3296
3296
|
s = o;
|
3297
3297
|
},
|
3298
3298
|
d(o) {
|
3299
|
-
o &&
|
3299
|
+
o && q(e), t = !1, Se(n);
|
3300
3300
|
}
|
3301
3301
|
};
|
3302
3302
|
}
|
@@ -3307,7 +3307,7 @@ function zs(s) {
|
|
3307
3307
|
), n, i;
|
3308
3308
|
return {
|
3309
3309
|
c() {
|
3310
|
-
e =
|
3310
|
+
e = A("div"), r(e, "class", "sy-assistant-tooltip svelte-ivxw7h"), r(e, "role", "tooltip"), N(
|
3311
3311
|
e,
|
3312
3312
|
"left",
|
3313
3313
|
/*tooltipPosition*/
|
@@ -3375,7 +3375,7 @@ function zs(s) {
|
|
3375
3375
|
);
|
3376
3376
|
},
|
3377
3377
|
d(o) {
|
3378
|
-
o &&
|
3378
|
+
o && q(e), n = !1, Se(i);
|
3379
3379
|
}
|
3380
3380
|
};
|
3381
3381
|
}
|
@@ -3386,7 +3386,7 @@ function Os(s) {
|
|
3386
3386
|
).name + "", p, d, g, w = Gt(
|
3387
3387
|
/*attachment*/
|
3388
3388
|
s[63].content_title
|
3389
|
-
).ext + "",
|
3389
|
+
).ext + "", v, I, z, E, _, k, T, S, b, L, R = (
|
3390
3390
|
/*attachment*/
|
3391
3391
|
s[63].tips && Ms(s)
|
3392
3392
|
);
|
@@ -3399,17 +3399,17 @@ function Os(s) {
|
|
3399
3399
|
)
|
3400
3400
|
);
|
3401
3401
|
}
|
3402
|
-
let
|
3402
|
+
let C = (
|
3403
3403
|
/*tooltipContent*/
|
3404
3404
|
s[4] && zs(s)
|
3405
3405
|
);
|
3406
3406
|
return {
|
3407
3407
|
c() {
|
3408
|
-
e =
|
3409
|
-
s[63].content_title), r(n, "class", "sy-assistant-attachment-title svelte-
|
3408
|
+
e = A("div"), t = A("div"), n = A("div"), i = V("svg"), o = V("path"), l = V("polyline"), a = W(), c = A("div"), u = A("span"), p = xe(h), d = W(), g = A("span"), v = xe(w), z = W(), E = A("div"), R && R.c(), _ = W(), k = A("button"), k.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-ivxw7h"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>', T = W(), C && C.c(), S = W(), r(o, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), r(l, "points", "13 2 13 9 20 9"), r(i, "xmlns", "http://www.w3.org/2000/svg"), r(i, "width", "16"), r(i, "height", "16"), r(i, "viewBox", "0 0 24 24"), r(i, "fill", "none"), r(i, "stroke", "currentColor"), r(i, "stroke-width", "2"), r(i, "stroke-linecap", "round"), r(i, "stroke-linejoin", "round"), r(u, "class", "sy-assistant-filename svelte-ivxw7h"), r(g, "class", "sy-assistant-attachment-ext svelte-ivxw7h"), r(c, "class", "sy-assistant-attachment-name svelte-ivxw7h"), r(c, "title", I = /*attachment*/
|
3409
|
+
s[63].content_title), r(n, "class", "sy-assistant-attachment-title svelte-ivxw7h"), r(k, "class", "sy-assistant-attachment-toggle svelte-ivxw7h"), r(k, "aria-label", "下载文件"), r(E, "class", "sy-assistant-attachment-actions svelte-ivxw7h"), r(t, "class", "sy-assistant-attachment-header svelte-ivxw7h"), r(e, "class", "sy-assistant-attachment svelte-ivxw7h");
|
3410
3410
|
},
|
3411
3411
|
m(j, Z) {
|
3412
|
-
G(j, e, Z), m(e, t), m(t, n), m(n, i), m(i, o), m(i, l), m(n, a), m(n, c), m(c, u), m(u, p), m(c, d), m(c, g), m(g,
|
3412
|
+
G(j, e, Z), m(e, t), m(t, n), m(n, i), m(i, o), m(i, l), m(n, a), m(n, c), m(c, u), m(u, p), m(c, d), m(c, g), m(g, v), m(t, z), m(t, E), R && R.m(E, null), m(E, _), m(E, k), m(e, T), C && C.m(e, null), m(e, S), b || (L = U(k, "click", F), b = !0);
|
3413
3413
|
},
|
3414
3414
|
p(j, Z) {
|
3415
3415
|
s = j, Z[0] & /*messages*/
|
@@ -3420,30 +3420,30 @@ function Os(s) {
|
|
3420
3420
|
8 && w !== (w = Gt(
|
3421
3421
|
/*attachment*/
|
3422
3422
|
s[63].content_title
|
3423
|
-
).ext + "") && He(
|
3424
|
-
8 &&
|
3425
|
-
s[63].content_title) && r(c, "title",
|
3426
|
-
s[63].tips ?
|
3427
|
-
s[4] ?
|
3423
|
+
).ext + "") && He(v, w), Z[0] & /*messages*/
|
3424
|
+
8 && I !== (I = /*attachment*/
|
3425
|
+
s[63].content_title) && r(c, "title", I), /*attachment*/
|
3426
|
+
s[63].tips ? R ? R.p(s, Z) : (R = Ms(s), R.c(), R.m(E, _)) : R && (R.d(1), R = null), /*tooltipContent*/
|
3427
|
+
s[4] ? C ? C.p(s, Z) : (C = zs(s), C.c(), C.m(e, S)) : C && (C.d(1), C = null);
|
3428
3428
|
},
|
3429
3429
|
d(j) {
|
3430
|
-
j &&
|
3430
|
+
j && q(e), R && R.d(), C && C.d(), b = !1, L();
|
3431
3431
|
}
|
3432
3432
|
};
|
3433
3433
|
}
|
3434
3434
|
function Ds(s) {
|
3435
3435
|
let e, t, n, i, o, l, a, c, u, h, p;
|
3436
|
-
function d(
|
3436
|
+
function d(S, b) {
|
3437
3437
|
return (
|
3438
3438
|
/*copyStatus*/
|
3439
|
-
|
3439
|
+
S[9][
|
3440
3440
|
/*msg*/
|
3441
|
-
|
3441
|
+
S[60].id
|
3442
3442
|
] ? al : rl
|
3443
3443
|
);
|
3444
3444
|
}
|
3445
3445
|
let g = d(s), w = g(s);
|
3446
|
-
function
|
3446
|
+
function v() {
|
3447
3447
|
return (
|
3448
3448
|
/*click_handler_1*/
|
3449
3449
|
s[38](
|
@@ -3452,13 +3452,13 @@ function Ds(s) {
|
|
3452
3452
|
)
|
3453
3453
|
);
|
3454
3454
|
}
|
3455
|
-
function
|
3455
|
+
function I(...S) {
|
3456
3456
|
return (
|
3457
3457
|
/*mouseenter_handler_2*/
|
3458
3458
|
s[39](
|
3459
3459
|
/*msg*/
|
3460
3460
|
s[60],
|
3461
|
-
...
|
3461
|
+
...S
|
3462
3462
|
)
|
3463
3463
|
);
|
3464
3464
|
}
|
@@ -3471,33 +3471,33 @@ function Ds(s) {
|
|
3471
3471
|
)
|
3472
3472
|
);
|
3473
3473
|
}
|
3474
|
-
function
|
3474
|
+
function E(...S) {
|
3475
3475
|
return (
|
3476
3476
|
/*mouseenter_handler_3*/
|
3477
3477
|
s[41](
|
3478
3478
|
/*msg*/
|
3479
3479
|
s[60],
|
3480
|
-
...
|
3480
|
+
...S
|
3481
3481
|
)
|
3482
3482
|
);
|
3483
3483
|
}
|
3484
|
-
function _(...
|
3484
|
+
function _(...S) {
|
3485
3485
|
return (
|
3486
3486
|
/*click_handler_3*/
|
3487
3487
|
s[42](
|
3488
3488
|
/*msg*/
|
3489
3489
|
s[60],
|
3490
|
-
...
|
3490
|
+
...S
|
3491
3491
|
)
|
3492
3492
|
);
|
3493
3493
|
}
|
3494
|
-
function k(...
|
3494
|
+
function k(...S) {
|
3495
3495
|
return (
|
3496
3496
|
/*mouseenter_handler_4*/
|
3497
3497
|
s[43](
|
3498
3498
|
/*msg*/
|
3499
3499
|
s[60],
|
3500
|
-
...
|
3500
|
+
...S
|
3501
3501
|
)
|
3502
3502
|
);
|
3503
3503
|
}
|
@@ -3511,7 +3511,7 @@ function Ds(s) {
|
|
3511
3511
|
);
|
3512
3512
|
return {
|
3513
3513
|
c() {
|
3514
|
-
e =
|
3514
|
+
e = A("div"), t = A("button"), w.c(), i = W(), o = A("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>', l = W(), a = A("button"), a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-3"></path></svg>', c = W(), T && T.c(), u = Kt(), r(t, "class", "sy-assistant-action-button svelte-ivxw7h"), r(t, "aria-label", n = /*copyStatus*/
|
3515
3515
|
s[9][
|
3516
3516
|
/*msg*/
|
3517
3517
|
s[60].id
|
@@ -3523,7 +3523,7 @@ function Ds(s) {
|
|
3523
3523
|
/*msg*/
|
3524
3524
|
s[60].id
|
3525
3525
|
]
|
3526
|
-
), r(o, "class", "sy-assistant-action-button svelte-
|
3526
|
+
), r(o, "class", "sy-assistant-action-button svelte-ivxw7h"), r(o, "aria-label", "点赞"), Q(
|
3527
3527
|
o,
|
3528
3528
|
"active",
|
3529
3529
|
/*feedbackStatus*/
|
@@ -3531,7 +3531,7 @@ function Ds(s) {
|
|
3531
3531
|
/*msg*/
|
3532
3532
|
s[60].id
|
3533
3533
|
] === "like"
|
3534
|
-
), r(a, "class", "sy-assistant-action-button svelte-
|
3534
|
+
), r(a, "class", "sy-assistant-action-button svelte-ivxw7h"), r(a, "aria-label", "点踩"), Q(
|
3535
3535
|
a,
|
3536
3536
|
"active",
|
3537
3537
|
/*feedbackStatus*/
|
@@ -3539,12 +3539,12 @@ function Ds(s) {
|
|
3539
3539
|
/*msg*/
|
3540
3540
|
s[60].id
|
3541
3541
|
] === "dislike"
|
3542
|
-
), r(e, "class", "sy-assistant-message-actions svelte-
|
3542
|
+
), r(e, "class", "sy-assistant-message-actions svelte-ivxw7h");
|
3543
3543
|
},
|
3544
|
-
m(
|
3545
|
-
G(
|
3546
|
-
U(t, "click",
|
3547
|
-
U(t, "mouseenter",
|
3544
|
+
m(S, b) {
|
3545
|
+
G(S, e, b), m(e, t), w.m(t, null), m(e, i), m(e, o), m(e, l), m(e, a), G(S, c, b), T && T.m(S, b), G(S, u, b), h || (p = [
|
3546
|
+
U(t, "click", v),
|
3547
|
+
U(t, "mouseenter", I),
|
3548
3548
|
U(
|
3549
3549
|
t,
|
3550
3550
|
"mouseleave",
|
@@ -3552,7 +3552,7 @@ function Ds(s) {
|
|
3552
3552
|
s[27]
|
3553
3553
|
),
|
3554
3554
|
U(o, "click", z),
|
3555
|
-
U(o, "mouseenter",
|
3555
|
+
U(o, "mouseenter", E),
|
3556
3556
|
U(
|
3557
3557
|
o,
|
3558
3558
|
"mouseleave",
|
@@ -3569,8 +3569,8 @@ function Ds(s) {
|
|
3569
3569
|
)
|
3570
3570
|
], h = !0);
|
3571
3571
|
},
|
3572
|
-
p(
|
3573
|
-
s =
|
3572
|
+
p(S, b) {
|
3573
|
+
s = S, g !== (g = d(s)) && (w.d(1), w = g(s), w && (w.c(), w.m(t, null))), b[0] & /*copyStatus, messages*/
|
3574
3574
|
520 && n !== (n = /*copyStatus*/
|
3575
3575
|
s[9][
|
3576
3576
|
/*msg*/
|
@@ -3609,8 +3609,8 @@ function Ds(s) {
|
|
3609
3609
|
s[60].id
|
3610
3610
|
] === "dislike" ? T ? T.p(s, b) : (T = Ns(s), T.c(), T.m(u.parentNode, u)) : T && (T.d(1), T = null);
|
3611
3611
|
},
|
3612
|
-
d(
|
3613
|
-
|
3612
|
+
d(S) {
|
3613
|
+
S && (q(e), q(c), q(u)), w.d(), T && T.d(S), h = !1, Se(p);
|
3614
3614
|
}
|
3615
3615
|
};
|
3616
3616
|
}
|
@@ -3624,7 +3624,7 @@ function rl(s) {
|
|
3624
3624
|
G(i, e, o), m(e, t), m(e, n);
|
3625
3625
|
},
|
3626
3626
|
d(i) {
|
3627
|
-
i &&
|
3627
|
+
i && q(e);
|
3628
3628
|
}
|
3629
3629
|
};
|
3630
3630
|
}
|
@@ -3638,20 +3638,20 @@ function al(s) {
|
|
3638
3638
|
G(n, e, i), m(e, t);
|
3639
3639
|
},
|
3640
3640
|
d(n) {
|
3641
|
-
n &&
|
3641
|
+
n && q(e);
|
3642
3642
|
}
|
3643
3643
|
};
|
3644
3644
|
}
|
3645
3645
|
function Ns(s) {
|
3646
|
-
let e, t, n, i, o, l, a, c, u;
|
3647
|
-
function
|
3646
|
+
let e, t, n, i, o, l, a, c, u, h, p;
|
3647
|
+
function d() {
|
3648
3648
|
s[44].call(
|
3649
|
-
|
3649
|
+
i,
|
3650
3650
|
/*msg*/
|
3651
3651
|
s[60]
|
3652
3652
|
);
|
3653
3653
|
}
|
3654
|
-
function
|
3654
|
+
function g() {
|
3655
3655
|
return (
|
3656
3656
|
/*click_handler_4*/
|
3657
3657
|
s[45](
|
@@ -3660,7 +3660,7 @@ function Ns(s) {
|
|
3660
3660
|
)
|
3661
3661
|
);
|
3662
3662
|
}
|
3663
|
-
function
|
3663
|
+
function w() {
|
3664
3664
|
return (
|
3665
3665
|
/*click_handler_5*/
|
3666
3666
|
s[46](
|
@@ -3671,7 +3671,7 @@ function Ns(s) {
|
|
3671
3671
|
}
|
3672
3672
|
return {
|
3673
3673
|
c() {
|
3674
|
-
e =
|
3674
|
+
e = A("div"), t = A("div"), t.textContent = "反馈意见", n = W(), i = A("textarea"), o = W(), l = A("div"), a = A("button"), a.textContent = "取消", c = W(), u = A("button"), u.textContent = "提交", r(t, "class", "sy-assistant-dislike-title svelte-ivxw7h"), r(i, "class", "sy-assistant-dislike-input svelte-ivxw7h"), r(i, "placeholder", "请输入您的反馈意见..."), r(a, "class", "sy-assistant-popup-cancel svelte-ivxw7h"), r(u, "class", "sy-assistant-popup-submit svelte-ivxw7h"), r(l, "class", "sy-assistant-popup-actions svelte-ivxw7h"), r(e, "class", "sy-assistant-dislike-popup svelte-ivxw7h"), N(
|
3675
3675
|
e,
|
3676
3676
|
"left",
|
3677
3677
|
/*dislikeFeedbackPosition*/
|
@@ -3688,42 +3688,42 @@ function Ns(s) {
|
|
3688
3688
|
s[0] + 3
|
3689
3689
|
);
|
3690
3690
|
},
|
3691
|
-
m(
|
3692
|
-
G(
|
3693
|
-
|
3691
|
+
m(v, I) {
|
3692
|
+
G(v, e, I), m(e, t), m(e, n), m(e, i), wt(
|
3693
|
+
i,
|
3694
3694
|
/*dislikeFeedbackContent*/
|
3695
3695
|
s[11][
|
3696
3696
|
/*msg*/
|
3697
3697
|
s[60].id
|
3698
3698
|
]
|
3699
|
-
), m(e,
|
3700
|
-
U(
|
3701
|
-
U(
|
3702
|
-
U(
|
3703
|
-
],
|
3699
|
+
), m(e, o), m(e, l), m(l, a), m(l, c), m(l, u), h || (p = [
|
3700
|
+
U(i, "input", d),
|
3701
|
+
U(a, "click", g),
|
3702
|
+
U(u, "click", w)
|
3703
|
+
], h = !0);
|
3704
3704
|
},
|
3705
|
-
p(
|
3706
|
-
s =
|
3705
|
+
p(v, I) {
|
3706
|
+
s = v, I[0] & /*dislikeFeedbackContent, messages*/
|
3707
3707
|
2056 && wt(
|
3708
|
-
|
3708
|
+
i,
|
3709
3709
|
/*dislikeFeedbackContent*/
|
3710
3710
|
s[11][
|
3711
3711
|
/*msg*/
|
3712
3712
|
s[60].id
|
3713
3713
|
]
|
3714
|
-
),
|
3714
|
+
), I[0] & /*dislikeFeedbackPosition*/
|
3715
3715
|
8192 && N(
|
3716
3716
|
e,
|
3717
3717
|
"left",
|
3718
3718
|
/*dislikeFeedbackPosition*/
|
3719
3719
|
s[13].x + "px"
|
3720
|
-
),
|
3720
|
+
), I[0] & /*dislikeFeedbackPosition*/
|
3721
3721
|
8192 && N(
|
3722
3722
|
e,
|
3723
3723
|
"top",
|
3724
3724
|
/*dislikeFeedbackPosition*/
|
3725
3725
|
s[13].y + "px"
|
3726
|
-
),
|
3726
|
+
), I[0] & /*zIndex*/
|
3727
3727
|
1 && N(
|
3728
3728
|
e,
|
3729
3729
|
"z-index",
|
@@ -3731,8 +3731,8 @@ function Ns(s) {
|
|
3731
3731
|
s[0] + 3
|
3732
3732
|
);
|
3733
3733
|
},
|
3734
|
-
d(
|
3735
|
-
|
3734
|
+
d(v) {
|
3735
|
+
v && q(e), h = !1, Se(p);
|
3736
3736
|
}
|
3737
3737
|
};
|
3738
3738
|
}
|
@@ -3741,14 +3741,14 @@ function Ps(s, e) {
|
|
3741
3741
|
/*msg*/
|
3742
3742
|
e[60].timestamp
|
3743
3743
|
).toLocaleString() + "", p, d;
|
3744
|
-
function g(T,
|
3744
|
+
function g(T, S) {
|
3745
3745
|
return (
|
3746
3746
|
/*msg*/
|
3747
3747
|
T[60].type === "assistant" ? il : sl
|
3748
3748
|
);
|
3749
3749
|
}
|
3750
|
-
let w = g(e),
|
3751
|
-
function
|
3750
|
+
let w = g(e), v = w(e);
|
3751
|
+
function I(T, S) {
|
3752
3752
|
return (
|
3753
3753
|
/*isLoading*/
|
3754
3754
|
T[7] && /*msg*/
|
@@ -3761,7 +3761,7 @@ function Ps(s, e) {
|
|
3761
3761
|
T[60].content ? ll : ol
|
3762
3762
|
);
|
3763
3763
|
}
|
3764
|
-
let z =
|
3764
|
+
let z = I(e), E = z(e), _ = (
|
3765
3765
|
/*msg*/
|
3766
3766
|
e[60].attachments && Ls(e)
|
3767
3767
|
), k = (
|
@@ -3774,26 +3774,26 @@ function Ps(s, e) {
|
|
3774
3774
|
key: s,
|
3775
3775
|
first: null,
|
3776
3776
|
c() {
|
3777
|
-
t =
|
3777
|
+
t = A("div"), v.c(), n = W(), i = A("div"), o = A("div"), E.c(), l = W(), _ && _.c(), a = W(), k && k.c(), c = W(), u = A("div"), p = xe(h), d = W(), r(o, "class", "sy-assistant-message-content svelte-ivxw7h"), r(u, "class", "sy-assistant-message-time svelte-ivxw7h"), r(i, "class", "sy-assistant-message-bubble svelte-ivxw7h"), r(t, "class", "sy-assistant-message svelte-ivxw7h"), Q(
|
3778
3778
|
t,
|
3779
3779
|
"user",
|
3780
3780
|
/*msg*/
|
3781
3781
|
e[60].type === "user"
|
3782
3782
|
), this.first = t;
|
3783
3783
|
},
|
3784
|
-
m(T,
|
3785
|
-
G(T, t,
|
3784
|
+
m(T, S) {
|
3785
|
+
G(T, t, S), v.m(t, null), m(t, n), m(t, i), m(i, o), E.m(o, null), m(o, l), _ && _.m(o, null), m(o, a), k && k.m(o, null), m(i, c), m(i, u), m(u, p), m(t, d);
|
3786
3786
|
},
|
3787
|
-
p(T,
|
3788
|
-
e = T, w !== (w = g(e)) && (
|
3789
|
-
e[60].attachments ? _ ? _.p(e,
|
3787
|
+
p(T, S) {
|
3788
|
+
e = T, w !== (w = g(e)) && (v.d(1), v = w(e), v && (v.c(), v.m(t, n))), z === (z = I(e)) && E ? E.p(e, S) : (E.d(1), E = z(e), E && (E.c(), E.m(o, l))), /*msg*/
|
3789
|
+
e[60].attachments ? _ ? _.p(e, S) : (_ = Ls(e), _.c(), _.m(o, a)) : _ && (_.d(1), _ = null), /*msg*/
|
3790
3790
|
e[60].id !== "-1" && /*msg*/
|
3791
3791
|
e[60].type === "assistant" && !/*isLoading*/
|
3792
|
-
e[7] ? k ? k.p(e,
|
3792
|
+
e[7] ? k ? k.p(e, S) : (k = Ds(e), k.c(), k.m(o, null)) : k && (k.d(1), k = null), S[0] & /*messages*/
|
3793
3793
|
8 && h !== (h = new Date(
|
3794
3794
|
/*msg*/
|
3795
3795
|
e[60].timestamp
|
3796
|
-
).toLocaleString() + "") && He(p, h),
|
3796
|
+
).toLocaleString() + "") && He(p, h), S[0] & /*messages*/
|
3797
3797
|
8 && Q(
|
3798
3798
|
t,
|
3799
3799
|
"user",
|
@@ -3802,32 +3802,32 @@ function Ps(s, e) {
|
|
3802
3802
|
);
|
3803
3803
|
},
|
3804
3804
|
d(T) {
|
3805
|
-
T &&
|
3805
|
+
T && q(t), v.d(), E.d(), _ && _.d(), k && k.d();
|
3806
3806
|
}
|
3807
3807
|
};
|
3808
3808
|
}
|
3809
3809
|
function Fs(s) {
|
3810
|
-
let e, t, n, i, o, l, a, c, u, h, p, d, g, w,
|
3810
|
+
let e, t, n, i, o, l, a, c, u, h, p, d, g, w, v, I, z, E, _, k, T, S, b, L;
|
3811
3811
|
return {
|
3812
3812
|
c() {
|
3813
|
-
e =
|
3813
|
+
e = A("div"), t = A("div"), n = A("button"), n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', i = W(), o = A("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', l = W(), a = A("div"), c = A("div"), u = A("div"), h = A("div"), p = A("textarea"), d = W(), g = A("div"), w = xe(
|
3814
3814
|
/*messageLength*/
|
3815
3815
|
s[2]
|
3816
|
-
),
|
3816
|
+
), v = xe("/"), I = xe(xn), z = W(), E = A("button"), _ = V("svg"), k = V("line"), T = V("polygon"), r(n, "class", "sy-assistant-icon-button svelte-ivxw7h"), r(n, "aria-label", "历史会话"), r(o, "class", "sy-assistant-icon-button svelte-ivxw7h"), r(o, "aria-label", "新建会话"), r(t, "class", "sy-assistant-chat-actions svelte-ivxw7h"), r(e, "class", "sy-assistant-chat-footer svelte-ivxw7h"), r(p, "class", "sy-assistant-textarea svelte-ivxw7h"), r(p, "placeholder", "输入您的问题..."), r(p, "maxlength", xn), r(p, "rows", "3"), r(g, "class", "sy-assistant-char-count svelte-ivxw7h"), Q(
|
3817
3817
|
g,
|
3818
3818
|
"over-limit",
|
3819
3819
|
/*isOverLimit*/
|
3820
3820
|
s[16]
|
3821
|
-
), r(h, "class", "sy-assistant-textarea-container svelte-
|
3821
|
+
), r(h, "class", "sy-assistant-textarea-container svelte-ivxw7h"), r(u, "class", "sy-assistant-input-wrapper svelte-ivxw7h"), r(k, "x1", "22"), r(k, "y1", "2"), r(k, "x2", "11"), r(k, "y2", "13"), r(T, "points", "22 2 15 22 11 13 2 9 22 2"), r(_, "xmlns", "http://www.w3.org/2000/svg"), r(_, "width", "20"), r(_, "height", "20"), r(_, "viewBox", "0 0 24 24"), r(_, "fill", "none"), r(_, "stroke", "currentColor"), r(_, "stroke-width", "2"), r(_, "stroke-linecap", "round"), r(_, "stroke-linejoin", "round"), r(E, "class", "sy-assistant-send-button svelte-ivxw7h"), E.disabled = S = !/*message*/
|
3822
3822
|
s[1].trim() || /*isOverLimit*/
|
3823
|
-
s[16], r(
|
3823
|
+
s[16], r(E, "aria-label", "发送消息"), r(c, "class", "sy-assistant-input-container svelte-ivxw7h"), r(a, "class", "sy-assistant-input-area svelte-ivxw7h");
|
3824
3824
|
},
|
3825
|
-
m(
|
3826
|
-
G(
|
3825
|
+
m(R, F) {
|
3826
|
+
G(R, e, F), m(e, t), m(t, n), m(t, i), m(t, o), G(R, l, F), G(R, a, F), m(a, c), m(c, u), m(u, h), m(h, p), wt(
|
3827
3827
|
p,
|
3828
3828
|
/*message*/
|
3829
3829
|
s[1]
|
3830
|
-
), m(h, d), m(h, g), m(g, w), m(g,
|
3830
|
+
), m(h, d), m(h, g), m(g, w), m(g, v), m(g, I), m(c, z), m(c, E), m(E, _), m(_, k), m(_, T), b || (L = [
|
3831
3831
|
U(
|
3832
3832
|
n,
|
3833
3833
|
"click",
|
@@ -3883,49 +3883,49 @@ function Fs(s) {
|
|
3883
3883
|
s[51]
|
3884
3884
|
),
|
3885
3885
|
U(
|
3886
|
-
|
3886
|
+
E,
|
3887
3887
|
"click",
|
3888
3888
|
/*handleSend*/
|
3889
3889
|
s[18]
|
3890
3890
|
),
|
3891
3891
|
U(
|
3892
|
-
|
3892
|
+
E,
|
3893
3893
|
"mouseenter",
|
3894
3894
|
/*mouseenter_handler_7*/
|
3895
3895
|
s[52]
|
3896
3896
|
),
|
3897
3897
|
U(
|
3898
|
-
|
3898
|
+
E,
|
3899
3899
|
"mouseleave",
|
3900
3900
|
/*hideButtonTooltip*/
|
3901
3901
|
s[27]
|
3902
3902
|
)
|
3903
3903
|
], b = !0);
|
3904
3904
|
},
|
3905
|
-
p(
|
3905
|
+
p(R, F) {
|
3906
3906
|
F[0] & /*message*/
|
3907
3907
|
2 && wt(
|
3908
3908
|
p,
|
3909
3909
|
/*message*/
|
3910
|
-
|
3910
|
+
R[1]
|
3911
3911
|
), F[0] & /*messageLength*/
|
3912
3912
|
4 && He(
|
3913
3913
|
w,
|
3914
3914
|
/*messageLength*/
|
3915
|
-
|
3915
|
+
R[2]
|
3916
3916
|
), F[0] & /*isOverLimit*/
|
3917
3917
|
65536 && Q(
|
3918
3918
|
g,
|
3919
3919
|
"over-limit",
|
3920
3920
|
/*isOverLimit*/
|
3921
|
-
|
3921
|
+
R[16]
|
3922
3922
|
), F[0] & /*message, isOverLimit*/
|
3923
|
-
65538 &&
|
3924
|
-
|
3925
|
-
|
3923
|
+
65538 && S !== (S = !/*message*/
|
3924
|
+
R[1].trim() || /*isOverLimit*/
|
3925
|
+
R[16]) && (E.disabled = S);
|
3926
3926
|
},
|
3927
|
-
d(
|
3928
|
-
|
3927
|
+
d(R) {
|
3928
|
+
R && (q(e), q(l), q(a)), b = !1, Se(L);
|
3929
3929
|
}
|
3930
3930
|
};
|
3931
3931
|
}
|
@@ -3936,7 +3936,7 @@ function Hs(s) {
|
|
3936
3936
|
), n;
|
3937
3937
|
return {
|
3938
3938
|
c() {
|
3939
|
-
e =
|
3939
|
+
e = A("div"), n = xe(t), r(e, "class", "sy-assistant-button-tooltip svelte-ivxw7h"), N(
|
3940
3940
|
e,
|
3941
3941
|
"left",
|
3942
3942
|
/*buttonTooltip*/
|
@@ -3969,7 +3969,7 @@ function Hs(s) {
|
|
3969
3969
|
);
|
3970
3970
|
},
|
3971
3971
|
d(i) {
|
3972
|
-
i &&
|
3972
|
+
i && q(e);
|
3973
3973
|
}
|
3974
3974
|
};
|
3975
3975
|
}
|
@@ -3990,7 +3990,7 @@ function cl(s) {
|
|
3990
3990
|
);
|
3991
3991
|
return {
|
3992
3992
|
c() {
|
3993
|
-
e =
|
3993
|
+
e = A("div"), n.c(), i = W(), p && p.c(), o = W(), d && d.c(), l = Kt(), r(e, "class", "sy-assistant-chat-container svelte-ivxw7h"), N(
|
3994
3994
|
e,
|
3995
3995
|
"z-index",
|
3996
3996
|
/*zIndex*/
|
@@ -4001,9 +4001,9 @@ function cl(s) {
|
|
4001
4001
|
G(g, e, w), u[t].m(e, null), m(e, i), p && p.m(e, null), s[53](e), G(g, o, w), d && d.m(g, w), G(g, l, w), a = !0;
|
4002
4002
|
},
|
4003
4003
|
p(g, w) {
|
4004
|
-
let
|
4005
|
-
t = h(g), t ===
|
4006
|
-
u[
|
4004
|
+
let v = t;
|
4005
|
+
t = h(g), t === v ? u[t].p(g, w) : (In(), $e(u[v], 1, 1, () => {
|
4006
|
+
u[v] = null;
|
4007
4007
|
}), Rn(), n = u[t], n ? n.p(g, w) : (n = u[t] = c[t](g), n.c()), Be(n, 1), n.m(e, i)), /*showHistory*/
|
4008
4008
|
g[15] ? p && (p.d(1), p = null) : p ? p.p(g, w) : (p = Fs(g), p.c(), p.m(e, null)), (!a || w[0] & /*zIndex*/
|
4009
4009
|
1) && N(
|
@@ -4021,11 +4021,11 @@ function cl(s) {
|
|
4021
4021
|
$e(n), a = !1;
|
4022
4022
|
},
|
4023
4023
|
d(g) {
|
4024
|
-
g && (
|
4024
|
+
g && (q(e), q(o), q(l)), u[t].d(), p && p.d(), s[53](null), d && d.d(g);
|
4025
4025
|
}
|
4026
4026
|
};
|
4027
4027
|
}
|
4028
|
-
let
|
4028
|
+
let xn = 500;
|
4029
4029
|
function ul(s) {
|
4030
4030
|
const e = s.match(/source#\[(.*)\]#source/);
|
4031
4031
|
return e ? s.replace(`source#[${e[1]}]#source`, "") : s;
|
@@ -4087,25 +4087,25 @@ function fl(s, e, t) {
|
|
4087
4087
|
}
|
4088
4088
|
}
|
4089
4089
|
let w;
|
4090
|
-
function
|
4090
|
+
function v(y = !1) {
|
4091
4091
|
w && w.scrollTo({
|
4092
4092
|
top: w.scrollHeight,
|
4093
4093
|
behavior: y ? "smooth" : "auto"
|
4094
4094
|
});
|
4095
4095
|
}
|
4096
4096
|
Mi(() => {
|
4097
|
-
|
4097
|
+
v(!1);
|
4098
4098
|
});
|
4099
|
-
let { sessionId:
|
4099
|
+
let { sessionId: I } = e;
|
4100
4100
|
function z() {
|
4101
4101
|
return Re(this, null, function* () {
|
4102
4102
|
if (!o.trim() || i) return;
|
4103
|
-
if (!
|
4103
|
+
if (!I) {
|
4104
4104
|
console.error("No session ID available");
|
4105
4105
|
return;
|
4106
4106
|
}
|
4107
4107
|
const y = Date.now().toString(), H = Date.now().toString() + Math.random().toString().slice(2, 8), J = {
|
4108
|
-
sessionId:
|
4108
|
+
sessionId: I,
|
4109
4109
|
requestId: H,
|
4110
4110
|
id: y,
|
4111
4111
|
type: "user",
|
@@ -4119,7 +4119,7 @@ function fl(s, e, t) {
|
|
4119
4119
|
a = "", t(3, l = [
|
4120
4120
|
...l,
|
4121
4121
|
{
|
4122
|
-
sessionId:
|
4122
|
+
sessionId: I,
|
4123
4123
|
requestId: H,
|
4124
4124
|
id: ue,
|
4125
4125
|
type: "assistant",
|
@@ -4136,7 +4136,7 @@ function fl(s, e, t) {
|
|
4136
4136
|
Authorization: `bearer ${ke()}`
|
4137
4137
|
},
|
4138
4138
|
body: JSON.stringify({
|
4139
|
-
sessionId:
|
4139
|
+
sessionId: I,
|
4140
4140
|
requestId: H,
|
4141
4141
|
keyword: ge,
|
4142
4142
|
flowId: "1"
|
@@ -4147,7 +4147,7 @@ function fl(s, e, t) {
|
|
4147
4147
|
const me = ve.data;
|
4148
4148
|
if (me) {
|
4149
4149
|
const Je = Bs(me);
|
4150
|
-
Je ? (t(3, l = l.map((_e) => _e.id === ue ? ye(ee({}, _e), { attachments: Je }) : _e)),
|
4150
|
+
Je ? (t(3, l = l.map((_e) => _e.id === ue ? ye(ee({}, _e), { attachments: Je }) : _e)), v(!0)) : (a += me, t(3, l = l.map((_e) => _e.id === ue ? ye(ee({}, _e), { content: a }) : _e)), v(!1));
|
4151
4151
|
}
|
4152
4152
|
} catch (me) {
|
4153
4153
|
console.error("Failed to process SSE message:", me);
|
@@ -4165,7 +4165,7 @@ function fl(s, e, t) {
|
|
4165
4165
|
}
|
4166
4166
|
});
|
4167
4167
|
}
|
4168
|
-
function
|
4168
|
+
function E(y, H, J) {
|
4169
4169
|
const ge = J.getBoundingClientRect(), ue = w.getBoundingClientRect(), ve = ge.left < ue.width / 2;
|
4170
4170
|
t(4, u = H), t(5, h = {
|
4171
4171
|
x: ge.left,
|
@@ -4206,7 +4206,7 @@ function fl(s, e, t) {
|
|
4206
4206
|
});
|
4207
4207
|
}
|
4208
4208
|
let T = {};
|
4209
|
-
function
|
4209
|
+
function S(y, H) {
|
4210
4210
|
return Re(this, null, function* () {
|
4211
4211
|
try {
|
4212
4212
|
const J = H.replace(/<br\s*\/?>/g, `
|
@@ -4226,7 +4226,7 @@ function fl(s, e, t) {
|
|
4226
4226
|
}
|
4227
4227
|
});
|
4228
4228
|
}
|
4229
|
-
let b = {},
|
4229
|
+
let b = {}, L = {}, R = !1;
|
4230
4230
|
function F(y, H) {
|
4231
4231
|
return Re(this, null, function* () {
|
4232
4232
|
if (b[y] === H) {
|
@@ -4243,7 +4243,7 @@ function fl(s, e, t) {
|
|
4243
4243
|
Authorization: `bearer ${ke()}`
|
4244
4244
|
},
|
4245
4245
|
body: JSON.stringify({
|
4246
|
-
sessionId:
|
4246
|
+
sessionId: I,
|
4247
4247
|
requestId: y,
|
4248
4248
|
feedBackFlag: "1",
|
4249
4249
|
feedBackContent: "点赞"
|
@@ -4254,13 +4254,13 @@ function fl(s, e, t) {
|
|
4254
4254
|
console.error("Failed to send feedback:", J), t(10, b[y] = null, b), t(10, b);
|
4255
4255
|
}
|
4256
4256
|
else
|
4257
|
-
t(12,
|
4257
|
+
t(12, R = !0);
|
4258
4258
|
});
|
4259
4259
|
}
|
4260
|
-
function
|
4260
|
+
function C(y) {
|
4261
4261
|
return Re(this, null, function* () {
|
4262
4262
|
var H;
|
4263
|
-
if ((H =
|
4263
|
+
if ((H = L[y]) != null && H.trim())
|
4264
4264
|
try {
|
4265
4265
|
if (!(yield fetch("/aiops/aigc/chat/record/feedback", {
|
4266
4266
|
method: "POST",
|
@@ -4270,14 +4270,14 @@ function fl(s, e, t) {
|
|
4270
4270
|
Authorization: `bearer ${ke()}`
|
4271
4271
|
},
|
4272
4272
|
body: JSON.stringify({
|
4273
|
-
sessionId:
|
4273
|
+
sessionId: I,
|
4274
4274
|
requestId: y,
|
4275
4275
|
feedBackFlag: "0",
|
4276
|
-
feedBackContent:
|
4276
|
+
feedBackContent: L[y]
|
4277
4277
|
})
|
4278
4278
|
})).ok)
|
4279
4279
|
throw new Error("Feedback failed");
|
4280
|
-
t(12,
|
4280
|
+
t(12, R = !1), t(11, L[y] = "", L), t(11, L);
|
4281
4281
|
} catch (J) {
|
4282
4282
|
console.error("Failed to send feedback:", J), t(10, b[y] = null, b), t(10, b);
|
4283
4283
|
}
|
@@ -4365,7 +4365,7 @@ function fl(s, e, t) {
|
|
4365
4365
|
}
|
4366
4366
|
function ie() {
|
4367
4367
|
return Re(this, null, function* () {
|
4368
|
-
const y = yield
|
4368
|
+
const y = yield Ae();
|
4369
4369
|
if (!y) {
|
4370
4370
|
console.error("Failed to create new session");
|
4371
4371
|
return;
|
@@ -4382,7 +4382,7 @@ function fl(s, e, t) {
|
|
4382
4382
|
]), t(1, o = "");
|
4383
4383
|
});
|
4384
4384
|
}
|
4385
|
-
function
|
4385
|
+
function Ae() {
|
4386
4386
|
return Re(this, null, function* () {
|
4387
4387
|
try {
|
4388
4388
|
const y = yield fetch("/aiops/aigc/chat/getSessionId", {
|
@@ -4405,17 +4405,17 @@ function fl(s, e, t) {
|
|
4405
4405
|
});
|
4406
4406
|
}
|
4407
4407
|
let { zIndex: $ } = e;
|
4408
|
-
const Me = (y, H) =>
|
4408
|
+
const Me = (y, H) => E(H, y.tips, H.currentTarget), Te = (y) => k(y.content_title, y.link), Qe = () => {
|
4409
4409
|
p && (clearTimeout(p), t(6, p = null));
|
4410
4410
|
}, D = () => {
|
4411
4411
|
t(4, u = null);
|
4412
|
-
}, ne = (y) =>
|
4412
|
+
}, ne = (y) => S(y.id, y.content), O = (y, H) => oe(H, T[y.id] ? "已复制" : "复制内容"), B = (y) => F(y.id, "like"), pe = (y, H) => oe(H, b[y.id] === "like" ? "取消点赞" : "点赞"), de = (y, H) => Z(H, y.id), ze = (y, H) => oe(H, b[y.id] === "dislike" ? "取消点踩" : "点踩");
|
4413
4413
|
function Ne(y) {
|
4414
|
-
|
4414
|
+
L[y.id] = this.value, t(11, L);
|
4415
4415
|
}
|
4416
4416
|
const et = (y) => {
|
4417
|
-
t(12,
|
4418
|
-
}, at = (y) =>
|
4417
|
+
t(12, R = !1), t(10, b[y.id] = null, b), t(10, b);
|
4418
|
+
}, at = (y) => C(y.id);
|
4419
4419
|
function ct(y) {
|
4420
4420
|
kt[y ? "unshift" : "push"](() => {
|
4421
4421
|
w = y, t(8, w);
|
@@ -4432,11 +4432,11 @@ function fl(s, e, t) {
|
|
4432
4432
|
});
|
4433
4433
|
}
|
4434
4434
|
return s.$$set = (y) => {
|
4435
|
-
"sessionId" in y && t(33,
|
4435
|
+
"sessionId" in y && t(33, I = y.sessionId), "zIndex" in y && t(0, $ = y.zIndex);
|
4436
4436
|
}, s.$$.update = () => {
|
4437
4437
|
s.$$.dirty[0] & /*message*/
|
4438
4438
|
2 && t(2, n = o.length), s.$$.dirty[0] & /*messageLength*/
|
4439
|
-
4 && t(16, i = n >
|
4439
|
+
4 && t(16, i = n > xn);
|
4440
4440
|
}, [
|
4441
4441
|
$,
|
4442
4442
|
o,
|
@@ -4449,20 +4449,20 @@ function fl(s, e, t) {
|
|
4449
4449
|
w,
|
4450
4450
|
T,
|
4451
4451
|
b,
|
4452
|
-
|
4453
|
-
|
4452
|
+
L,
|
4453
|
+
R,
|
4454
4454
|
j,
|
4455
4455
|
X,
|
4456
4456
|
ce,
|
4457
4457
|
i,
|
4458
4458
|
g,
|
4459
4459
|
z,
|
4460
|
-
|
4460
|
+
E,
|
4461
4461
|
_,
|
4462
4462
|
k,
|
4463
|
-
|
4463
|
+
S,
|
4464
4464
|
F,
|
4465
|
-
|
4465
|
+
C,
|
4466
4466
|
Z,
|
4467
4467
|
oe,
|
4468
4468
|
fe,
|
@@ -4471,7 +4471,7 @@ function fl(s, e, t) {
|
|
4471
4471
|
re,
|
4472
4472
|
Ve,
|
4473
4473
|
ie,
|
4474
|
-
|
4474
|
+
I,
|
4475
4475
|
Me,
|
4476
4476
|
Te,
|
4477
4477
|
Qe,
|
@@ -4503,13 +4503,13 @@ function Us(s) {
|
|
4503
4503
|
let e, t, n, i, o = (
|
4504
4504
|
/*mergedOptions*/
|
4505
4505
|
s[3].title + ""
|
4506
|
-
), l, a, c, u, h, p, d, g, w,
|
4506
|
+
), l, a, c, u, h, p, d, g, w, v = (
|
4507
4507
|
/*isFullscreen*/
|
4508
4508
|
s[2] ? "退出全屏" : "全屏显示"
|
4509
|
-
),
|
4509
|
+
), I, z, E, _, k, T, S, b, L = (
|
4510
4510
|
/*isSnapped*/
|
4511
4511
|
s[7] ? "取消吸附" : "吸附到边缘"
|
4512
|
-
),
|
4512
|
+
), R, F, C, j, Z, X, oe, fe, ce, je = `${/*mergedOptions*/
|
4513
4513
|
s[3].height}px`, le, qe, re;
|
4514
4514
|
function Ve(O, B) {
|
4515
4515
|
return (
|
@@ -4517,7 +4517,7 @@ function Us(s) {
|
|
4517
4517
|
O[2] ? dl : pl
|
4518
4518
|
);
|
4519
4519
|
}
|
4520
|
-
let ie = Ve(s),
|
4520
|
+
let ie = Ve(s), Ae = ie(s);
|
4521
4521
|
function $(O, B) {
|
4522
4522
|
return (
|
4523
4523
|
/*isSnapped*/
|
@@ -4535,7 +4535,7 @@ function Us(s) {
|
|
4535
4535
|
return fe = ne(s), ce = D[fe] = Qe[fe](s), {
|
4536
4536
|
c() {
|
4537
4537
|
var O, B, pe;
|
4538
|
-
e =
|
4538
|
+
e = A("div"), t = A("div"), n = A("div"), i = A("h3"), l = xe(o), a = W(), c = A("div"), u = A("div"), h = A("button"), p = V("svg"), Ae.c(), g = W(), w = A("span"), I = xe(v), z = W(), E = A("div"), _ = A("button"), k = V("svg"), Te.c(), S = W(), b = A("span"), R = xe(L), F = W(), C = A("div"), j = A("button"), j.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', Z = W(), X = A("span"), X.textContent = "关闭助手", oe = W(), ce.c(), r(i, "class", "svelte-1427avp"), r(p, "xmlns", "http://www.w3.org/2000/svg"), r(p, "width", "18"), r(p, "height", "18"), r(p, "viewBox", "0 0 24 24"), r(p, "fill", "none"), r(p, "stroke", "currentColor"), r(p, "stroke-width", "2"), r(p, "stroke-linecap", "round"), r(p, "stroke-linejoin", "round"), r(h, "class", "sy-assistant-action-button svelte-1427avp"), r(h, "aria-label", d = /*isFullscreen*/
|
4539
4539
|
s[2] ? "退出全屏" : "全屏显示"), Q(
|
4540
4540
|
h,
|
4541
4541
|
"active",
|
@@ -4545,7 +4545,7 @@ function Us(s) {
|
|
4545
4545
|
w,
|
4546
4546
|
"z-index",
|
4547
4547
|
/*mergedOptions*/
|
4548
|
-
(O = s[3].zIndex) != null ? O : 1e3
|
4548
|
+
((O = s[3].zIndex) != null ? O : 1e3) + 3
|
4549
4549
|
), r(u, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(k, "xmlns", "http://www.w3.org/2000/svg"), r(k, "width", "18"), r(k, "height", "18"), r(k, "viewBox", "0 0 24 24"), r(k, "fill", "none"), r(k, "stroke", "currentColor"), r(k, "stroke-width", "2"), r(k, "stroke-linecap", "round"), r(k, "stroke-linejoin", "round"), r(_, "class", "sy-assistant-action-button svelte-1427avp"), r(_, "aria-label", T = /*isSnapped*/
|
4550
4550
|
s[7] ? "取消吸附" : "吸附到边缘"), Q(
|
4551
4551
|
_,
|
@@ -4556,13 +4556,13 @@ function Us(s) {
|
|
4556
4556
|
b,
|
4557
4557
|
"z-index",
|
4558
4558
|
/*mergedOptions*/
|
4559
|
-
(B = s[3].zIndex) != null ? B : 1e3
|
4560
|
-
), r(
|
4559
|
+
((B = s[3].zIndex) != null ? B : 1e3) + 3
|
4560
|
+
), r(E, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(j, "class", "sy-assistant-close-button svelte-1427avp"), r(j, "aria-label", "关闭助手"), r(X, "class", "sy-assistant-tooltip svelte-1427avp"), N(
|
4561
4561
|
X,
|
4562
4562
|
"z-index",
|
4563
4563
|
/*mergedOptions*/
|
4564
|
-
(pe = s[3].zIndex) != null ? pe : 1e3
|
4565
|
-
), r(
|
4564
|
+
((pe = s[3].zIndex) != null ? pe : 1e3) + 3
|
4565
|
+
), r(C, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(c, "class", "sy-assistant-header-actions svelte-1427avp"), r(n, "class", "sy-assistant-drawer-header svelte-1427avp"), r(n, "role", "button"), r(n, "tabindex", "0"), r(n, "aria-label", "拖动助手窗口"), Q(
|
4566
4566
|
n,
|
4567
4567
|
"dragging",
|
4568
4568
|
/*isDragging*/
|
@@ -4585,7 +4585,7 @@ function Us(s) {
|
|
4585
4585
|
), N(e, "height", je);
|
4586
4586
|
},
|
4587
4587
|
m(O, B) {
|
4588
|
-
G(O, e, B), m(e, t), m(t, n), m(n, i), m(i, l), m(n, a), m(n, c), m(c, u), m(u, h), m(h, p),
|
4588
|
+
G(O, e, B), m(e, t), m(t, n), m(n, i), m(i, l), m(n, a), m(n, c), m(c, u), m(u, h), m(h, p), Ae.m(p, null), m(u, g), m(u, w), m(w, I), m(c, z), m(c, E), m(E, _), m(_, k), Te.m(k, null), m(E, S), m(E, b), m(b, R), m(c, F), m(c, C), m(C, j), m(C, Z), m(C, X), m(t, oe), D[fe].m(t, null), le = !0, qe || (re = [
|
4589
4589
|
U(
|
4590
4590
|
h,
|
4591
4591
|
"click",
|
@@ -4614,7 +4614,7 @@ function Us(s) {
|
|
4614
4614
|
var de, ze, Ne;
|
4615
4615
|
(!le || B[0] & /*mergedOptions*/
|
4616
4616
|
8) && o !== (o = /*mergedOptions*/
|
4617
|
-
O[3].title + "") && He(l, o), ie !== (ie = Ve(O)) && (
|
4617
|
+
O[3].title + "") && He(l, o), ie !== (ie = Ve(O)) && (Ae.d(1), Ae = ie(O), Ae && (Ae.c(), Ae.m(p, null))), (!le || B[0] & /*isFullscreen*/
|
4618
4618
|
4 && d !== (d = /*isFullscreen*/
|
4619
4619
|
O[2] ? "退出全屏" : "全屏显示")) && r(h, "aria-label", d), (!le || B[0] & /*isFullscreen*/
|
4620
4620
|
4) && Q(
|
@@ -4623,13 +4623,13 @@ function Us(s) {
|
|
4623
4623
|
/*isFullscreen*/
|
4624
4624
|
O[2]
|
4625
4625
|
), (!le || B[0] & /*isFullscreen*/
|
4626
|
-
4) &&
|
4627
|
-
O[2] ? "退出全屏" : "全屏显示") && He(
|
4626
|
+
4) && v !== (v = /*isFullscreen*/
|
4627
|
+
O[2] ? "退出全屏" : "全屏显示") && He(I, v), B[0] & /*mergedOptions*/
|
4628
4628
|
8 && N(
|
4629
4629
|
w,
|
4630
4630
|
"z-index",
|
4631
4631
|
/*mergedOptions*/
|
4632
|
-
(de = O[3].zIndex) != null ? de : 1e3
|
4632
|
+
((de = O[3].zIndex) != null ? de : 1e3) + 3
|
4633
4633
|
), Me !== (Me = $(O)) && (Te.d(1), Te = Me(O), Te && (Te.c(), Te.m(k, null))), (!le || B[0] & /*isSnapped*/
|
4634
4634
|
128 && T !== (T = /*isSnapped*/
|
4635
4635
|
O[7] ? "取消吸附" : "吸附到边缘")) && r(_, "aria-label", T), (!le || B[0] & /*isSnapped*/
|
@@ -4639,19 +4639,19 @@ function Us(s) {
|
|
4639
4639
|
/*isSnapped*/
|
4640
4640
|
O[7]
|
4641
4641
|
), (!le || B[0] & /*isSnapped*/
|
4642
|
-
128) &&
|
4643
|
-
O[7] ? "取消吸附" : "吸附到边缘") && He(
|
4642
|
+
128) && L !== (L = /*isSnapped*/
|
4643
|
+
O[7] ? "取消吸附" : "吸附到边缘") && He(R, L), B[0] & /*mergedOptions*/
|
4644
4644
|
8 && N(
|
4645
4645
|
b,
|
4646
4646
|
"z-index",
|
4647
4647
|
/*mergedOptions*/
|
4648
|
-
(ze = O[3].zIndex) != null ? ze : 1e3
|
4648
|
+
((ze = O[3].zIndex) != null ? ze : 1e3) + 3
|
4649
4649
|
), B[0] & /*mergedOptions*/
|
4650
4650
|
8 && N(
|
4651
4651
|
X,
|
4652
4652
|
"z-index",
|
4653
4653
|
/*mergedOptions*/
|
4654
|
-
(Ne = O[3].zIndex) != null ? Ne : 1e3
|
4654
|
+
((Ne = O[3].zIndex) != null ? Ne : 1e3) + 3
|
4655
4655
|
), (!le || B[0] & /*isDragging*/
|
4656
4656
|
64) && Q(
|
4657
4657
|
n,
|
@@ -4691,7 +4691,7 @@ function Us(s) {
|
|
4691
4691
|
$e(ce), le = !1;
|
4692
4692
|
},
|
4693
4693
|
d(O) {
|
4694
|
-
O &&
|
4694
|
+
O && q(e), Ae.d(), Te.d(), D[fe].d(), qe = !1, Se(re);
|
4695
4695
|
}
|
4696
4696
|
};
|
4697
4697
|
}
|
@@ -4705,7 +4705,7 @@ function pl(s) {
|
|
4705
4705
|
G(t, e, n);
|
4706
4706
|
},
|
4707
4707
|
d(t) {
|
4708
|
-
t &&
|
4708
|
+
t && q(e);
|
4709
4709
|
}
|
4710
4710
|
};
|
4711
4711
|
}
|
@@ -4719,7 +4719,7 @@ function dl(s) {
|
|
4719
4719
|
G(t, e, n);
|
4720
4720
|
},
|
4721
4721
|
d(t) {
|
4722
|
-
t &&
|
4722
|
+
t && q(e);
|
4723
4723
|
}
|
4724
4724
|
};
|
4725
4725
|
}
|
@@ -4733,7 +4733,7 @@ function gl(s) {
|
|
4733
4733
|
G(n, e, i), G(n, t, i);
|
4734
4734
|
},
|
4735
4735
|
d(n) {
|
4736
|
-
n && (
|
4736
|
+
n && (q(e), q(t));
|
4737
4737
|
}
|
4738
4738
|
};
|
4739
4739
|
}
|
@@ -4747,7 +4747,7 @@ function ml(s) {
|
|
4747
4747
|
G(n, e, i), G(n, t, i);
|
4748
4748
|
},
|
4749
4749
|
d(n) {
|
4750
|
-
n && (
|
4750
|
+
n && (q(e), q(t));
|
4751
4751
|
}
|
4752
4752
|
};
|
4753
4753
|
}
|
@@ -4843,14 +4843,14 @@ function kl(s) {
|
|
4843
4843
|
}
|
4844
4844
|
function _l(s) {
|
4845
4845
|
let e, t, n = `${/*$drawerWidth*/
|
4846
|
-
s[12]}px`, i, o, l, a, c, u, h, p, d, g, w,
|
4846
|
+
s[12]}px`, i, o, l, a, c, u, h, p, d, g, w, v, I, z, E = (
|
4847
4847
|
/*$drawerWidth*/
|
4848
4848
|
s[12] > 0 && Us(s)
|
4849
4849
|
);
|
4850
4850
|
return {
|
4851
4851
|
c() {
|
4852
4852
|
var _, k;
|
4853
|
-
e =
|
4853
|
+
e = A("div"), t = A("div"), E && E.c(), i = W(), o = A("button"), l = V("svg"), a = V("path"), c = V("path"), u = V("path"), h = V("path"), p = V("path"), d = V("path"), g = V("path"), r(t, "class", "sy-assistant-drawer-wrapper svelte-1427avp"), Q(
|
4854
4854
|
t,
|
4855
4855
|
"fullscreen",
|
4856
4856
|
/*isFullscreen*/
|
@@ -4903,7 +4903,7 @@ function _l(s) {
|
|
4903
4903
|
);
|
4904
4904
|
},
|
4905
4905
|
m(_, k) {
|
4906
|
-
G(_, e, k), m(e, t),
|
4906
|
+
G(_, e, k), m(e, t), E && E.m(t, null), m(e, i), m(e, o), m(o, l), m(l, a), m(l, c), m(l, u), m(l, h), m(l, p), m(l, d), m(l, g), s[27](o), s[29](e), v = !0, I || (z = [
|
4907
4907
|
U(
|
4908
4908
|
o,
|
4909
4909
|
"click",
|
@@ -4914,15 +4914,15 @@ function _l(s) {
|
|
4914
4914
|
/*mousedown_handler*/
|
4915
4915
|
s[28]
|
4916
4916
|
))
|
4917
|
-
],
|
4917
|
+
], I = !0);
|
4918
4918
|
},
|
4919
4919
|
p(_, k) {
|
4920
|
-
var T,
|
4920
|
+
var T, S;
|
4921
4921
|
/*$drawerWidth*/
|
4922
|
-
_[12] > 0 ?
|
4923
|
-
4096 && Be(
|
4924
|
-
|
4925
|
-
}), Rn()), (!
|
4922
|
+
_[12] > 0 ? E ? (E.p(_, k), k[0] & /*$drawerWidth*/
|
4923
|
+
4096 && Be(E, 1)) : (E = Us(_), E.c(), Be(E, 1), E.m(t, null)) : E && (In(), $e(E, 1, 1, () => {
|
4924
|
+
E = null;
|
4925
|
+
}), Rn()), (!v || k[0] & /*isFullscreen*/
|
4926
4926
|
4) && Q(
|
4927
4927
|
t,
|
4928
4928
|
"fullscreen",
|
@@ -4930,16 +4930,16 @@ function _l(s) {
|
|
4930
4930
|
_[2]
|
4931
4931
|
), k[0] & /*$drawerWidth*/
|
4932
4932
|
4096 && n !== (n = `${/*$drawerWidth*/
|
4933
|
-
_[12]}px`) && N(t, "width", n), (!
|
4933
|
+
_[12]}px`) && N(t, "width", n), (!v || k[0] & /*buttonStyle, mergedOptions*/
|
4934
4934
|
1032 && w !== (w = /*buttonStyle*/
|
4935
4935
|
_[10] + " z-index: " + /*mergedOptions*/
|
4936
|
-
(((T = _[3].zIndex) != null ? T : 1e3) + 1) + ";")) && r(o, "style", w), (!
|
4936
|
+
(((T = _[3].zIndex) != null ? T : 1e3) + 1) + ";")) && r(o, "style", w), (!v || k[0] & /*isFullscreen*/
|
4937
4937
|
4) && Q(
|
4938
4938
|
e,
|
4939
4939
|
"fullscreen",
|
4940
4940
|
/*isFullscreen*/
|
4941
4941
|
_[2]
|
4942
|
-
), (!
|
4942
|
+
), (!v || k[0] & /*isSnapped*/
|
4943
4943
|
128) && Q(
|
4944
4944
|
e,
|
4945
4945
|
"snapped",
|
@@ -4983,17 +4983,17 @@ function _l(s) {
|
|
4983
4983
|
e,
|
4984
4984
|
"z-index",
|
4985
4985
|
/*mergedOptions*/
|
4986
|
-
(
|
4986
|
+
(S = _[3].zIndex) != null ? S : 1e3
|
4987
4987
|
);
|
4988
4988
|
},
|
4989
4989
|
i(_) {
|
4990
|
-
|
4990
|
+
v || (Be(E), v = !0);
|
4991
4991
|
},
|
4992
4992
|
o(_) {
|
4993
|
-
$e(
|
4993
|
+
$e(E), v = !1;
|
4994
4994
|
},
|
4995
4995
|
d(_) {
|
4996
|
-
_ &&
|
4996
|
+
_ && q(e), E && E.d(), s[27](null), s[29](null), I = !1, Se(z);
|
4997
4997
|
}
|
4998
4998
|
};
|
4999
4999
|
}
|
@@ -5014,7 +5014,7 @@ function bl(s, e, t) {
|
|
5014
5014
|
// 设置默认抽屉宽度
|
5015
5015
|
zIndex: 1e3
|
5016
5016
|
};
|
5017
|
-
let { target: h = "body" } = e, { options: p = {} } = e, d, g = null, w = !1,
|
5017
|
+
let { target: h = "body" } = e, { options: p = {} } = e, d, g = null, w = !1, v, I = !1, z = 0, E = 0, _ = he, k = 20, T = _, S = k, b = !1, L = he, R = 50, F = !1, C = { width: 0, height: 0, right: 0, bottom: 0 }, j = !1, Z = !1, X = [], oe = null;
|
5018
5018
|
function fe() {
|
5019
5019
|
return Re(this, null, function* () {
|
5020
5020
|
try {
|
@@ -5038,33 +5038,33 @@ function bl(s, e, t) {
|
|
5038
5038
|
});
|
5039
5039
|
}
|
5040
5040
|
function ce(D, ne = !1) {
|
5041
|
-
ne ? t(23, b = !0) : t(6,
|
5041
|
+
ne ? t(23, b = !0) : t(6, I = !0), z = D.clientX, E = D.clientY, _ = ne ? L : T, k = ne ? R : S, D.preventDefault();
|
5042
5042
|
}
|
5043
5043
|
function je(D) {
|
5044
|
-
if (!
|
5045
|
-
const ne = z - D.clientX, O =
|
5044
|
+
if (!I && !b) return;
|
5045
|
+
const ne = z - D.clientX, O = E - D.clientY;
|
5046
5046
|
if (b) {
|
5047
5047
|
const B = _ + ne, pe = D.clientY;
|
5048
|
-
t(24,
|
5048
|
+
t(24, L = Math.max(he, Math.min(window.innerWidth - mn - he, B)));
|
5049
5049
|
const de = window.innerHeight - mn - he, Ne = Math.max(he, Math.min(de, pe));
|
5050
|
-
t(25,
|
5050
|
+
t(25, R = (window.innerHeight - Ne - mn) / window.innerHeight * 100);
|
5051
5051
|
} else {
|
5052
5052
|
const B = n.width || 0, pe = n.height || 0, de = _ + ne;
|
5053
5053
|
t(0, T = Math.max(he, Math.min(window.innerWidth - B - he, de)));
|
5054
5054
|
const ze = k + O;
|
5055
|
-
t(1,
|
5055
|
+
t(1, S = Math.max(he, Math.min(window.innerHeight - pe - he, ze)));
|
5056
5056
|
}
|
5057
5057
|
}
|
5058
5058
|
function le() {
|
5059
|
-
t(6,
|
5059
|
+
t(6, I = !1), t(23, b = !1);
|
5060
5060
|
}
|
5061
5061
|
Zs(() => {
|
5062
5062
|
typeof h == "string" ? g = document.querySelector(h) || document.body : g = h || document.body;
|
5063
5063
|
const D = (O) => je(O), ne = () => le();
|
5064
|
-
return document.addEventListener("mousemove", D), document.addEventListener("mouseup", ne), d && g && g.appendChild(d),
|
5064
|
+
return document.addEventListener("mousemove", D), document.addEventListener("mouseup", ne), d && g && g.appendChild(d), v && v.getBoundingClientRect().left, t(7, j = n.initialState === "snapped"), t(2, F = n.initialState === "fullscreen"), n.initialState === "snapped" ? (t(0, T = 0), t(1, S = 0), t(3, n = ye(ee({}, n), {
|
5065
5065
|
height: typeof window != "undefined" ? window.innerHeight : n.height,
|
5066
5066
|
width: n.snappedWidth || n.width
|
5067
|
-
}))) : n.initialState === "fullscreen" && (t(0, T = 0), t(1,
|
5067
|
+
}))) : n.initialState === "fullscreen" && (t(0, T = 0), t(1, S = 0), t(3, n = ye(ee({}, n), {
|
5068
5068
|
width: typeof window != "undefined" ? window.innerWidth : n.width,
|
5069
5069
|
height: typeof window != "undefined" ? window.innerHeight : n.height
|
5070
5070
|
}))), () => {
|
@@ -5078,7 +5078,7 @@ function bl(s, e, t) {
|
|
5078
5078
|
}
|
5079
5079
|
function re() {
|
5080
5080
|
var D, ne, O, B, pe, de, ze, Ne;
|
5081
|
-
t(2, F = !F), F ? (
|
5081
|
+
t(2, F = !F), F ? (C.width || (C = {
|
5082
5082
|
width: u.width,
|
5083
5083
|
height: u.height,
|
5084
5084
|
right: (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne : he,
|
@@ -5087,11 +5087,11 @@ function bl(s, e, t) {
|
|
5087
5087
|
width: window.innerWidth,
|
5088
5088
|
height: window.innerHeight,
|
5089
5089
|
drawerWidth: window.innerWidth
|
5090
|
-
})), t(0, T = 0), t(1,
|
5090
|
+
})), t(0, T = 0), t(1, S = 0)) : (t(20, p = ye(ee({}, n), {
|
5091
5091
|
width: u.width,
|
5092
5092
|
height: u.height,
|
5093
5093
|
drawerWidth: u.drawerWidth
|
5094
|
-
})), t(0, T = (de = (pe = u.defaultPosition) == null ? void 0 : pe.right) != null ? de : he), t(1,
|
5094
|
+
})), t(0, T = (de = (pe = u.defaultPosition) == null ? void 0 : pe.right) != null ? de : he), t(1, S = (Ne = (ze = u.defaultPosition) == null ? void 0 : ze.bottom) != null ? Ne : he));
|
5095
5095
|
}
|
5096
5096
|
function Ve(D) {
|
5097
5097
|
F || ce(D);
|
@@ -5102,7 +5102,7 @@ function bl(s, e, t) {
|
|
5102
5102
|
width: u.width,
|
5103
5103
|
height: u.height,
|
5104
5104
|
drawerWidth: u.drawerWidth
|
5105
|
-
}))), t(7, j = !j), j ? (n.height, t(0, T = 0), t(1,
|
5105
|
+
}))), t(7, j = !j), j ? (n.height, t(0, T = 0), t(1, S = 0), t(20, p = ye(ee({}, n), {
|
5106
5106
|
height: window.innerHeight,
|
5107
5107
|
width: n.snappedWidth || u.width,
|
5108
5108
|
drawerWidth: n.snappedWidth || u.width
|
@@ -5110,15 +5110,15 @@ function bl(s, e, t) {
|
|
5110
5110
|
width: u.width,
|
5111
5111
|
height: u.height,
|
5112
5112
|
drawerWidth: u.drawerWidth
|
5113
|
-
})), t(0, T = (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne : he), t(1,
|
5113
|
+
})), t(0, T = (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne : he), t(1, S = (B = (O = u.defaultPosition) == null ? void 0 : O.bottom) != null ? B : he));
|
5114
5114
|
}
|
5115
|
-
function
|
5115
|
+
function Ae(D) {
|
5116
5116
|
t(8, Z = !1);
|
5117
5117
|
}
|
5118
5118
|
const $ = () => t(8, Z = !1);
|
5119
5119
|
function Me(D) {
|
5120
5120
|
kt[D ? "unshift" : "push"](() => {
|
5121
|
-
|
5121
|
+
v = D, t(5, v);
|
5122
5122
|
});
|
5123
5123
|
}
|
5124
5124
|
const Te = (D) => ce(D, !0);
|
@@ -5138,16 +5138,16 @@ function bl(s, e, t) {
|
|
5138
5138
|
w ? F ? window.innerWidth : n.drawerWidth : 0,
|
5139
5139
|
{ stiffness: 0.1, damping: 0.6 }
|
5140
5140
|
))), s.$$.dirty[0] & /*mergedOptions, right, bottom*/
|
5141
|
-
11 && typeof window != "undefined" && (t(0, T = Math.max(he, Math.min(window.innerWidth - (n.width || 0), T))), t(1,
|
5142
|
-
62914560 && t(10, o = w ? "display: none;" : `position: fixed; right: ${
|
5141
|
+
11 && typeof window != "undefined" && (t(0, T = Math.max(he, Math.min(window.innerWidth - (n.width || 0), T))), t(1, S = Math.max(he, Math.min(window.innerHeight - (n.height || 0), S)))), s.$$.dirty[0] & /*isOpen, buttonRight, buttonBottom, isButtonDragging*/
|
5142
|
+
62914560 && t(10, o = w ? "display: none;" : `position: fixed; right: ${L}px; bottom: ${R}%; transform: none; cursor: ${b ? "grabbing" : "grab"};`);
|
5143
5143
|
}, [
|
5144
5144
|
T,
|
5145
|
-
|
5145
|
+
S,
|
5146
5146
|
F,
|
5147
5147
|
n,
|
5148
5148
|
d,
|
5149
|
-
|
5150
|
-
|
5149
|
+
v,
|
5150
|
+
I,
|
5151
5151
|
j,
|
5152
5152
|
Z,
|
5153
5153
|
oe,
|
@@ -5160,13 +5160,13 @@ function bl(s, e, t) {
|
|
5160
5160
|
re,
|
5161
5161
|
Ve,
|
5162
5162
|
ie,
|
5163
|
-
|
5163
|
+
Ae,
|
5164
5164
|
p,
|
5165
5165
|
h,
|
5166
5166
|
w,
|
5167
5167
|
b,
|
5168
|
-
|
5169
|
-
|
5168
|
+
L,
|
5169
|
+
R,
|
5170
5170
|
$,
|
5171
5171
|
Me,
|
5172
5172
|
Te,
|