@sy-design/svelte 1.0.26 → 1.0.28
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 +601 -596
- package/dist/index.umd.js +7 -7
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -12,19 +12,19 @@ var In = (t, e, n) => e in t ? Pi(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
12
12
|
}, ke = (t, e) => Ni(t, Fi(e));
|
|
13
13
|
var ee = (t, e, n) => In(t, typeof e != "symbol" ? e + "" : e, n);
|
|
14
14
|
var Se = (t, e, n) => new Promise((s, i) => {
|
|
15
|
-
var o = (
|
|
15
|
+
var o = (c) => {
|
|
16
16
|
try {
|
|
17
|
-
r(n.next(
|
|
17
|
+
r(n.next(c));
|
|
18
18
|
} catch (a) {
|
|
19
19
|
i(a);
|
|
20
20
|
}
|
|
21
|
-
}, l = (
|
|
21
|
+
}, l = (c) => {
|
|
22
22
|
try {
|
|
23
|
-
r(n.throw(
|
|
23
|
+
r(n.throw(c));
|
|
24
24
|
} catch (a) {
|
|
25
25
|
i(a);
|
|
26
26
|
}
|
|
27
|
-
}, r = (
|
|
27
|
+
}, r = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(o, l);
|
|
28
28
|
r((n = n.apply(t, e)).next());
|
|
29
29
|
});
|
|
30
30
|
function je() {
|
|
@@ -35,7 +35,7 @@ function ai(t) {
|
|
|
35
35
|
function hs() {
|
|
36
36
|
return /* @__PURE__ */ Object.create(null);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Me(t) {
|
|
39
39
|
t.forEach(ai);
|
|
40
40
|
}
|
|
41
41
|
function Zn(t) {
|
|
@@ -115,7 +115,7 @@ function pi(t) {
|
|
|
115
115
|
return e.preventDefault(), t.call(this, e);
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function u(t, e, n) {
|
|
119
119
|
n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
|
|
120
120
|
}
|
|
121
121
|
function qi(t) {
|
|
@@ -266,35 +266,35 @@ function Ji() {
|
|
|
266
266
|
function hn(t) {
|
|
267
267
|
Ot.push(t);
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
let
|
|
269
|
+
const Mn = /* @__PURE__ */ new Set();
|
|
270
|
+
let Lt = 0;
|
|
271
271
|
function gi() {
|
|
272
|
-
if (
|
|
272
|
+
if (Lt !== 0)
|
|
273
273
|
return;
|
|
274
274
|
const t = Jt;
|
|
275
275
|
do {
|
|
276
276
|
try {
|
|
277
|
-
for (;
|
|
278
|
-
const e = zt[
|
|
279
|
-
|
|
277
|
+
for (; Lt < zt.length; ) {
|
|
278
|
+
const e = zt[Lt];
|
|
279
|
+
Lt++, Vt(e), Ki(e.$$);
|
|
280
280
|
}
|
|
281
281
|
} catch (e) {
|
|
282
|
-
throw zt.length = 0,
|
|
282
|
+
throw zt.length = 0, Lt = 0, e;
|
|
283
283
|
}
|
|
284
|
-
for (Vt(null), zt.length = 0,
|
|
284
|
+
for (Vt(null), zt.length = 0, Lt = 0; Pt.length; ) Pt.pop()();
|
|
285
285
|
for (let e = 0; e < Ot.length; e += 1) {
|
|
286
286
|
const n = Ot[e];
|
|
287
|
-
|
|
287
|
+
Mn.has(n) || (Mn.add(n), n());
|
|
288
288
|
}
|
|
289
289
|
Ot.length = 0;
|
|
290
290
|
} while (zt.length);
|
|
291
291
|
for (; ms.length; )
|
|
292
292
|
ms.pop()();
|
|
293
|
-
Fn = !1,
|
|
293
|
+
Fn = !1, Mn.clear(), Vt(t);
|
|
294
294
|
}
|
|
295
295
|
function Ki(t) {
|
|
296
296
|
if (t.fragment !== null) {
|
|
297
|
-
t.update(),
|
|
297
|
+
t.update(), Me(t.before_update);
|
|
298
298
|
const e = t.dirty;
|
|
299
299
|
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(hn);
|
|
300
300
|
}
|
|
@@ -314,7 +314,7 @@ function Xn() {
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
function Vn() {
|
|
317
|
-
St.r ||
|
|
317
|
+
St.r || Me(St.c), St = St.p;
|
|
318
318
|
}
|
|
319
319
|
function et(t, e) {
|
|
320
320
|
t && t.i && (un.delete(t), t.i(e));
|
|
@@ -333,30 +333,30 @@ function _t(t) {
|
|
|
333
333
|
function mi(t, e) {
|
|
334
334
|
t.d(1), e.delete(t.key);
|
|
335
335
|
}
|
|
336
|
-
function wi(t, e, n, s, i, o, l, r,
|
|
336
|
+
function wi(t, e, n, s, i, o, l, r, c, a, f, g) {
|
|
337
337
|
let m = t.length, h = o.length, d = m;
|
|
338
338
|
const w = {};
|
|
339
339
|
for (; d--; ) w[t[d].key] = d;
|
|
340
340
|
const T = [], E = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), S = [];
|
|
341
341
|
for (d = h; d--; ) {
|
|
342
|
-
const v = g(i, o, d),
|
|
343
|
-
let I = l.get(
|
|
344
|
-
I ? S.push(() => I.p(v, e)) : (I = a(
|
|
342
|
+
const v = g(i, o, d), L = n(v);
|
|
343
|
+
let I = l.get(L);
|
|
344
|
+
I ? S.push(() => I.p(v, e)) : (I = a(L, v), I.c()), E.set(L, T[d] = I), L in w && y.set(L, Math.abs(d - w[L]));
|
|
345
345
|
}
|
|
346
|
-
const _ = /* @__PURE__ */ new Set(),
|
|
346
|
+
const _ = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
347
347
|
function R(v) {
|
|
348
348
|
et(v, 1), v.m(r, f), l.set(v.key, v), f = v.first, h--;
|
|
349
349
|
}
|
|
350
350
|
for (; m && h; ) {
|
|
351
|
-
const v = T[h - 1],
|
|
352
|
-
v ===
|
|
351
|
+
const v = T[h - 1], L = t[m - 1], I = v.key, V = L.key;
|
|
352
|
+
v === L ? (f = v.first, m--, h--) : E.has(V) ? !l.has(I) || _.has(I) ? R(v) : M.has(V) ? m-- : y.get(I) > y.get(V) ? (M.add(I), R(v)) : (_.add(V), m--) : (c(L, l), m--);
|
|
353
353
|
}
|
|
354
354
|
for (; m--; ) {
|
|
355
355
|
const v = t[m];
|
|
356
|
-
E.has(v.key) ||
|
|
356
|
+
E.has(v.key) || c(v, l);
|
|
357
357
|
}
|
|
358
358
|
for (; h; ) R(T[h - 1]);
|
|
359
|
-
return
|
|
359
|
+
return Me(S), T;
|
|
360
360
|
}
|
|
361
361
|
function Qn(t) {
|
|
362
362
|
t && t.c();
|
|
@@ -365,18 +365,18 @@ function bn(t, e, n) {
|
|
|
365
365
|
const { fragment: s, after_update: i } = t.$$;
|
|
366
366
|
s && s.m(e, n), hn(() => {
|
|
367
367
|
const o = t.$$.on_mount.map(ai).filter(Zn);
|
|
368
|
-
t.$$.on_destroy ? t.$$.on_destroy.push(...o) :
|
|
368
|
+
t.$$.on_destroy ? t.$$.on_destroy.push(...o) : Me(o), t.$$.on_mount = [];
|
|
369
369
|
}), i.forEach(hn);
|
|
370
370
|
}
|
|
371
371
|
function kn(t, e) {
|
|
372
372
|
const n = t.$$;
|
|
373
|
-
n.fragment !== null && ($i(n.after_update),
|
|
373
|
+
n.fragment !== null && ($i(n.after_update), Me(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
374
374
|
}
|
|
375
375
|
function eo(t, e) {
|
|
376
376
|
t.$$.dirty[0] === -1 && (zt.push(t), Ji(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
377
377
|
}
|
|
378
378
|
function Jn(t, e, n, s, i, o, l = null, r = [-1]) {
|
|
379
|
-
const
|
|
379
|
+
const c = Jt;
|
|
380
380
|
Vt(t);
|
|
381
381
|
const a = t.$$ = {
|
|
382
382
|
fragment: null,
|
|
@@ -392,19 +392,19 @@ function Jn(t, e, n, s, i, o, l = null, r = [-1]) {
|
|
|
392
392
|
on_disconnect: [],
|
|
393
393
|
before_update: [],
|
|
394
394
|
after_update: [],
|
|
395
|
-
context: new Map(e.context || (
|
|
395
|
+
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
396
396
|
// everything else
|
|
397
397
|
callbacks: hs(),
|
|
398
398
|
dirty: r,
|
|
399
399
|
skip_bound: !1,
|
|
400
|
-
root: e.target ||
|
|
400
|
+
root: e.target || c.$$.root
|
|
401
401
|
};
|
|
402
402
|
l && l(a.root);
|
|
403
403
|
let f = !1;
|
|
404
404
|
if (a.ctx = n ? n(t, e.props || {}, (g, m, ...h) => {
|
|
405
405
|
const d = h.length ? h[0] : m;
|
|
406
406
|
return a.ctx && i(a.ctx[g], a.ctx[g] = d) && (!a.skip_bound && a.bound[g] && a.bound[g](d), f && eo(t, g)), m;
|
|
407
|
-
}) : [], a.update(), f = !0,
|
|
407
|
+
}) : [], a.update(), f = !0, Me(a.before_update), a.fragment = s ? s(a.ctx) : !1, e.target) {
|
|
408
408
|
if (e.hydrate) {
|
|
409
409
|
const g = qi(e.target);
|
|
410
410
|
a.fragment && a.fragment.l(g), g.forEach(B);
|
|
@@ -412,7 +412,7 @@ function Jn(t, e, n, s, i, o, l = null, r = [-1]) {
|
|
|
412
412
|
a.fragment && a.fragment.c();
|
|
413
413
|
e.intro && et(t.$$.fragment), bn(t, e.target, e.anchor), gi();
|
|
414
414
|
}
|
|
415
|
-
Vt(
|
|
415
|
+
Vt(c);
|
|
416
416
|
}
|
|
417
417
|
class Kn {
|
|
418
418
|
constructor() {
|
|
@@ -468,10 +468,10 @@ function no(t, e = je) {
|
|
|
468
468
|
const s = /* @__PURE__ */ new Set();
|
|
469
469
|
function i(r) {
|
|
470
470
|
if (mn(t, r) && (t = r, n)) {
|
|
471
|
-
const
|
|
471
|
+
const c = !Ct.length;
|
|
472
472
|
for (const a of s)
|
|
473
473
|
a[1](), Ct.push(a, t);
|
|
474
|
-
if (
|
|
474
|
+
if (c) {
|
|
475
475
|
for (let a = 0; a < Ct.length; a += 2)
|
|
476
476
|
Ct[a][0](Ct[a + 1]);
|
|
477
477
|
Ct.length = 0;
|
|
@@ -481,8 +481,8 @@ function no(t, e = je) {
|
|
|
481
481
|
function o(r) {
|
|
482
482
|
i(r(t));
|
|
483
483
|
}
|
|
484
|
-
function l(r,
|
|
485
|
-
const a = [r,
|
|
484
|
+
function l(r, c = je) {
|
|
485
|
+
const a = [r, c];
|
|
486
486
|
return s.add(a), s.size === 1 && (n = e(i, o) || je), r(t), () => {
|
|
487
487
|
s.delete(a), s.size === 0 && n && (n(), n = null);
|
|
488
488
|
};
|
|
@@ -494,7 +494,7 @@ function ws(t) {
|
|
|
494
494
|
}
|
|
495
495
|
function Hn(t, e, n, s) {
|
|
496
496
|
if (typeof n == "number" || ws(n)) {
|
|
497
|
-
const i = s - n, o = (n - e) / (t.dt || 1 / 60), l = t.opts.stiffness * i, r = t.opts.damping * o,
|
|
497
|
+
const i = s - n, o = (n - e) / (t.dt || 1 / 60), l = t.opts.stiffness * i, r = t.opts.damping * o, c = (l - r) * t.inv_mass, a = (o + c) * t.dt;
|
|
498
498
|
return Math.abs(a) < t.opts.precision && Math.abs(i) < t.opts.precision ? s : (t.settled = !1, ws(n) ? new Date(n.getTime() + a) : n + a);
|
|
499
499
|
} else {
|
|
500
500
|
if (Array.isArray(n))
|
|
@@ -512,10 +512,10 @@ function Hn(t, e, n, s) {
|
|
|
512
512
|
}
|
|
513
513
|
function so(t, e = {}) {
|
|
514
514
|
const n = no(t), { stiffness: s = 0.15, damping: i = 0.8, precision: o = 0.01 } = e;
|
|
515
|
-
let l, r,
|
|
515
|
+
let l, r, c, a = t, f = t, g = 1, m = 0, h = !1;
|
|
516
516
|
function d(T, E = {}) {
|
|
517
517
|
f = T;
|
|
518
|
-
const y =
|
|
518
|
+
const y = c = {};
|
|
519
519
|
return t == null || E.hard || w.stiffness >= 1 && w.damping >= 1 ? (h = !0, l = ds(), a = T, n.set(t = f), Promise.resolve()) : (E.soft && (m = 1 / ((E.soft === !0 ? 0.5 : +E.soft) * 60), g = 0), r || (l = ds(), h = !1, r = Ui((S) => {
|
|
520
520
|
if (h)
|
|
521
521
|
return h = !1, r = null, !1;
|
|
@@ -525,11 +525,11 @@ function so(t, e = {}) {
|
|
|
525
525
|
opts: w,
|
|
526
526
|
settled: !0,
|
|
527
527
|
dt: (S - l) * 60 / 1e3
|
|
528
|
-
},
|
|
529
|
-
return l = S, a = t, n.set(t =
|
|
528
|
+
}, M = Hn(_, a, t, f);
|
|
529
|
+
return l = S, a = t, n.set(t = M), _.settled && (r = null), !_.settled;
|
|
530
530
|
})), new Promise((S) => {
|
|
531
531
|
r.promise.then(() => {
|
|
532
|
-
y ===
|
|
532
|
+
y === c && S();
|
|
533
533
|
});
|
|
534
534
|
}));
|
|
535
535
|
}
|
|
@@ -556,14 +556,14 @@ function oo(t) {
|
|
|
556
556
|
return function(l) {
|
|
557
557
|
e === void 0 ? (e = l, n = 0, s = -1) : e = lo(e, l);
|
|
558
558
|
const r = e.length;
|
|
559
|
-
let
|
|
559
|
+
let c = 0;
|
|
560
560
|
for (; n < r; ) {
|
|
561
|
-
i && (e[n] === 10 && (
|
|
561
|
+
i && (e[n] === 10 && (c = ++n), i = !1);
|
|
562
562
|
let a = -1;
|
|
563
563
|
for (; n < r && a === -1; ++n)
|
|
564
564
|
switch (e[n]) {
|
|
565
565
|
case 58:
|
|
566
|
-
s === -1 && (s = n -
|
|
566
|
+
s === -1 && (s = n - c);
|
|
567
567
|
break;
|
|
568
568
|
case 13:
|
|
569
569
|
i = !0;
|
|
@@ -573,9 +573,9 @@ function oo(t) {
|
|
|
573
573
|
}
|
|
574
574
|
if (a === -1)
|
|
575
575
|
break;
|
|
576
|
-
t(e.subarray(
|
|
576
|
+
t(e.subarray(c, a), s), c = n, s = -1;
|
|
577
577
|
}
|
|
578
|
-
|
|
578
|
+
c === r ? e = void 0 : c !== 0 && (e = e.subarray(c), n -= c);
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
581
|
function ro(t, e, n) {
|
|
@@ -585,8 +585,8 @@ function ro(t, e, n) {
|
|
|
585
585
|
if (l.length === 0)
|
|
586
586
|
n == null || n(s), s = bs();
|
|
587
587
|
else if (r > 0) {
|
|
588
|
-
const
|
|
589
|
-
switch (
|
|
588
|
+
const c = i.decode(l.subarray(0, r)), a = r + (l[r + 1] === 32 ? 2 : 1), f = i.decode(l.subarray(a));
|
|
589
|
+
switch (c) {
|
|
590
590
|
case "data":
|
|
591
591
|
s.data = s.data ? s.data + `
|
|
592
592
|
` + f : f;
|
|
@@ -627,15 +627,15 @@ var ao = function(t, e) {
|
|
|
627
627
|
};
|
|
628
628
|
const Bn = "text/event-stream", co = 1e3, ks = "last-event-id";
|
|
629
629
|
function uo(t, e) {
|
|
630
|
-
var { signal: n, headers: s, onopen: i, onmessage: o, onclose: l, onerror: r, openWhenHidden:
|
|
630
|
+
var { signal: n, headers: s, onopen: i, onmessage: o, onclose: l, onerror: r, openWhenHidden: c, fetch: a } = e, f = ao(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
631
631
|
return new Promise((g, m) => {
|
|
632
632
|
const h = Object.assign({}, s);
|
|
633
633
|
h.accept || (h.accept = Bn);
|
|
634
634
|
let d;
|
|
635
635
|
function w() {
|
|
636
|
-
d.abort(), document.hidden ||
|
|
636
|
+
d.abort(), document.hidden || M();
|
|
637
637
|
}
|
|
638
|
-
|
|
638
|
+
c || document.addEventListener("visibilitychange", w);
|
|
639
639
|
let T = co, E = 0;
|
|
640
640
|
function y() {
|
|
641
641
|
document.removeEventListener("visibilitychange", w), window.clearTimeout(E), d.abort();
|
|
@@ -644,29 +644,29 @@ function uo(t, e) {
|
|
|
644
644
|
y(), g();
|
|
645
645
|
});
|
|
646
646
|
const S = a != null ? a : window.fetch, _ = i != null ? i : fo;
|
|
647
|
-
function
|
|
647
|
+
function M() {
|
|
648
648
|
return Se(this, null, function* () {
|
|
649
649
|
var R;
|
|
650
650
|
d = new AbortController();
|
|
651
651
|
try {
|
|
652
652
|
const v = yield S(t, Object.assign(Object.assign({}, f), { headers: h, signal: d.signal }));
|
|
653
|
-
yield _(v), yield io(v.body, oo(ro((
|
|
654
|
-
|
|
655
|
-
}, (
|
|
656
|
-
T =
|
|
653
|
+
yield _(v), yield io(v.body, oo(ro((L) => {
|
|
654
|
+
L ? h[ks] = L : delete h[ks];
|
|
655
|
+
}, (L) => {
|
|
656
|
+
T = L;
|
|
657
657
|
}, o))), l == null || l(), y(), g();
|
|
658
658
|
} catch (v) {
|
|
659
659
|
if (!d.signal.aborted)
|
|
660
660
|
try {
|
|
661
|
-
const
|
|
662
|
-
window.clearTimeout(E), E = window.setTimeout(
|
|
663
|
-
} catch (
|
|
664
|
-
y(), m(
|
|
661
|
+
const L = (R = r == null ? void 0 : r(v)) !== null && R !== void 0 ? R : T;
|
|
662
|
+
window.clearTimeout(E), E = window.setTimeout(M, L);
|
|
663
|
+
} catch (L) {
|
|
664
|
+
y(), m(L);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
|
-
|
|
669
|
+
M();
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
function fo(t) {
|
|
@@ -690,7 +690,7 @@ function re(t, e = "") {
|
|
|
690
690
|
return s;
|
|
691
691
|
}
|
|
692
692
|
var We = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i") }, ho = /^(?:[ \t]*(?:\n|$))+/, po = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, go = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Kt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, mo = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, es = /(?:[*+-]|\d{1,9}[.)])/, ki = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, _i = re(ki).replace(/bull/g, es).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), wo = re(ki).replace(/bull/g, es).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ts = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, bo = /^[^\n]+/, ns = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ko = re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ns).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), _o = re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, es).getRegex(), _n = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ss = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, yo = re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ss).replace("tag", _n).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), yi = re(ts).replace("hr", Kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex(), To = re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", yi).getRegex(), is = { blockquote: To, code: po, def: ko, fences: go, heading: mo, hr: Kt, html: yo, lheading: _i, list: _o, newline: ho, paragraph: yi, table: Qt, text: bo }, _s = re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex(), vo = ke(oe({}, is), { lheading: wo, table: _s, paragraph: re(ts).replace("hr", Kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", _s).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex() }), So = ke(oe({}, is), { html: re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ss).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Qt, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: re(ts).replace("hr", Kt).replace("heading", ` *#{1,6} *[^
|
|
693
|
-
]`).replace("lheading", _i).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }), Eo = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ao = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ti = /^( {2,}|\\)\n(?!\s*$)/, xo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, yn = /[\p{P}\p{S}]/u, os = /[\s\p{P}\p{S}]/u, vi = /[^\s\p{P}\p{S}]/u, Ro = re(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, os).getRegex(), Si = /(?!~)[\p{P}\p{S}]/u, Io = /(?!~)[\s\p{P}\p{S}]/u,
|
|
693
|
+
]`).replace("lheading", _i).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }), Eo = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ao = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ti = /^( {2,}|\\)\n(?!\s*$)/, xo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, yn = /[\p{P}\p{S}]/u, os = /[\s\p{P}\p{S}]/u, vi = /[^\s\p{P}\p{S}]/u, Ro = re(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, os).getRegex(), Si = /(?!~)[\p{P}\p{S}]/u, Io = /(?!~)[\s\p{P}\p{S}]/u, Mo = /(?:[^\s\p{P}\p{S}]|~)/u, Lo = re(/link|code|html/, "g").replace("link", new RegExp("\\[(?:[^\\[\\]`]|(?<!`)(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("code", new RegExp("(?<!`)(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ei = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Co = re(Ei, "u").replace(/punct/g, yn).getRegex(), zo = re(Ei, "u").replace(/punct/g, Si).getRegex(), Ai = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Do = re(Ai, "gu").replace(/notPunctSpace/g, vi).replace(/punctSpace/g, os).replace(/punct/g, yn).getRegex(), Oo = re(Ai, "gu").replace(/notPunctSpace/g, Mo).replace(/punctSpace/g, Io).replace(/punct/g, Si).getRegex(), Po = re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, vi).replace(/punctSpace/g, os).replace(/punct/g, yn).getRegex(), No = re(/\\(punct)/, "gu").replace(/punct/g, yn).getRegex(), Fo = re(/^<(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(), Ho = re(ss).replace("(?:-->|$)", "-->").getRegex(), Bo = re("^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", Ho).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), pn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Wo = re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", pn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xi = re(/^!?\[(label)\]\[(ref)\]/).replace("label", pn).replace("ref", ns).getRegex(), Ri = re(/^!?\[(ref)\](?:\[\])?/).replace("ref", ns).getRegex(), jo = re("reflink|nolink(?!\\()", "g").replace("reflink", xi).replace("nolink", Ri).getRegex(), ys = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, rs = { _backpedal: Qt, anyPunctuation: No, autolink: Fo, blockSkip: Lo, br: Ti, code: Ao, del: Qt, emStrongLDelim: Co, emStrongRDelimAst: Do, emStrongRDelimUnd: Po, escape: Eo, link: Wo, nolink: Ri, punctuation: Ro, reflink: xi, reflinkSearch: jo, tag: Bo, text: xo, url: Qt }, Uo = ke(oe({}, rs), { link: re(/^!?\[(label)\]\((.*?)\)/).replace("label", pn).getRegex(), reflink: re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", pn).getRegex() }), Wn = ke(oe({}, rs), { emStrongRDelimAst: Oo, emStrongLDelim: zo, url: re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ys).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ys).getRegex() }), qo = ke(oe({}, Wn), { br: re(Ti).replace("{2,}", "*").getRegex(), text: re(Wn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }), sn = { normal: is, gfm: vo, pedantic: So }, Wt = { normal: rs, gfm: Wn, breaks: qo, pedantic: Uo }, Go = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Ts = (t) => Go[t];
|
|
694
694
|
function ft(t, e) {
|
|
695
695
|
if (e) {
|
|
696
696
|
if (We.escapeTest.test(t)) return t.replace(We.escapeReplace, Ts);
|
|
@@ -707,9 +707,9 @@ function vs(t) {
|
|
|
707
707
|
}
|
|
708
708
|
function Ss(t, e) {
|
|
709
709
|
var o;
|
|
710
|
-
let n = t.replace(We.findPipe, (l, r,
|
|
710
|
+
let n = t.replace(We.findPipe, (l, r, c) => {
|
|
711
711
|
let a = !1, f = r;
|
|
712
|
-
for (; --f >= 0 &&
|
|
712
|
+
for (; --f >= 0 && c[f] === "\\"; ) a = !a;
|
|
713
713
|
return a ? "|" : " |";
|
|
714
714
|
}), s = n.split(We.splitPipe), i = 0;
|
|
715
715
|
if (s[0].trim() || s.shift(), s.length > 0 && !((o = s.at(-1)) != null && o.trim()) && s.pop(), e) if (s.length > e) s.splice(e);
|
|
@@ -736,8 +736,8 @@ function Zo(t, e) {
|
|
|
736
736
|
function Es(t, e, n, s, i) {
|
|
737
737
|
let o = e.href, l = e.title || null, r = t[1].replace(i.other.outputLinkReplace, "$1");
|
|
738
738
|
s.state.inLink = !0;
|
|
739
|
-
let
|
|
740
|
-
return s.state.inLink = !1,
|
|
739
|
+
let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: o, title: l, text: r, tokens: s.inlineTokens(r) };
|
|
740
|
+
return s.state.inLink = !1, c;
|
|
741
741
|
}
|
|
742
742
|
function Yo(t, e, n) {
|
|
743
743
|
let s = t.match(n.other.indentCodeCompensation);
|
|
@@ -801,11 +801,11 @@ var dn = class {
|
|
|
801
801
|
`).split(`
|
|
802
802
|
`), s = "", i = "", o = [];
|
|
803
803
|
for (; n.length > 0; ) {
|
|
804
|
-
let l = !1, r = [],
|
|
805
|
-
for (
|
|
806
|
-
else if (!l) r.push(n[
|
|
804
|
+
let l = !1, r = [], c;
|
|
805
|
+
for (c = 0; c < n.length; c++) if (this.rules.other.blockquoteStart.test(n[c])) r.push(n[c]), l = !0;
|
|
806
|
+
else if (!l) r.push(n[c]);
|
|
807
807
|
else break;
|
|
808
|
-
n = n.slice(
|
|
808
|
+
n = n.slice(c);
|
|
809
809
|
let a = r.join(`
|
|
810
810
|
`), f = a.replace(this.rules.other.blockquoteSetextReplace, `
|
|
811
811
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
@@ -841,19 +841,19 @@ ${f}` : f;
|
|
|
841
841
|
n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
|
|
842
842
|
let o = this.rules.other.listItemRegex(n), l = !1;
|
|
843
843
|
for (; t; ) {
|
|
844
|
-
let
|
|
844
|
+
let c = !1, a = "", f = "";
|
|
845
845
|
if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
846
846
|
a = e[0], t = t.substring(a.length);
|
|
847
847
|
let g = e[2].split(`
|
|
848
848
|
`, 1)[0].replace(this.rules.other.listReplaceTabs, (E) => " ".repeat(3 * E.length)), m = t.split(`
|
|
849
849
|
`, 1)[0], h = !g.trim(), d = 0;
|
|
850
850
|
if (this.options.pedantic ? (d = 2, f = g.trimStart()) : h ? d = e[1].length + 1 : (d = e[2].search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, f = g.slice(d), d += e[1].length), h && this.rules.other.blankLine.test(m) && (a += m + `
|
|
851
|
-
`, t = t.substring(m.length + 1),
|
|
852
|
-
let E = this.rules.other.nextBulletRegex(d), y = this.rules.other.hrRegex(d), S = this.rules.other.fencesBeginRegex(d), _ = this.rules.other.headingBeginRegex(d),
|
|
851
|
+
`, t = t.substring(m.length + 1), c = !0), !c) {
|
|
852
|
+
let E = this.rules.other.nextBulletRegex(d), y = this.rules.other.hrRegex(d), S = this.rules.other.fencesBeginRegex(d), _ = this.rules.other.headingBeginRegex(d), M = this.rules.other.htmlBeginRegex(d);
|
|
853
853
|
for (; t; ) {
|
|
854
854
|
let R = t.split(`
|
|
855
855
|
`, 1)[0], v;
|
|
856
|
-
if (m = R, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), v = m) : v = m.replace(this.rules.other.tabCharGlobal, " "), S.test(m) || _.test(m) ||
|
|
856
|
+
if (m = R, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), v = m) : v = m.replace(this.rules.other.tabCharGlobal, " "), S.test(m) || _.test(m) || M.test(m) || E.test(m) || y.test(m)) break;
|
|
857
857
|
if (v.search(this.rules.other.nonSpaceChar) >= d || !m.trim()) f += `
|
|
858
858
|
` + v.slice(d);
|
|
859
859
|
else {
|
|
@@ -873,11 +873,11 @@ ${f}` : f;
|
|
|
873
873
|
if (r) r.raw = r.raw.trimEnd(), r.text = r.text.trimEnd();
|
|
874
874
|
else return;
|
|
875
875
|
i.raw = i.raw.trimEnd();
|
|
876
|
-
for (let
|
|
877
|
-
let a = i.items[
|
|
876
|
+
for (let c = 0; c < i.items.length; c++) if (this.lexer.state.top = !1, i.items[c].tokens = this.lexer.blockTokens(i.items[c].text, []), !i.loose) {
|
|
877
|
+
let a = i.items[c].tokens.filter((g) => g.type === "space"), f = a.length > 0 && a.some((g) => this.rules.other.anyLine.test(g.raw));
|
|
878
878
|
i.loose = f;
|
|
879
879
|
}
|
|
880
|
-
if (i.loose) for (let
|
|
880
|
+
if (i.loose) for (let c = 0; c < i.items.length; c++) i.items[c].loose = !0;
|
|
881
881
|
return i;
|
|
882
882
|
}
|
|
883
883
|
}
|
|
@@ -901,7 +901,7 @@ ${f}` : f;
|
|
|
901
901
|
if (n.length === s.length) {
|
|
902
902
|
for (let r of s) this.rules.other.tableAlignRight.test(r) ? o.align.push("right") : this.rules.other.tableAlignCenter.test(r) ? o.align.push("center") : this.rules.other.tableAlignLeft.test(r) ? o.align.push("left") : o.align.push(null);
|
|
903
903
|
for (let r = 0; r < n.length; r++) o.header.push({ text: n[r], tokens: this.lexer.inline(n[r]), header: !0, align: o.align[r] });
|
|
904
|
-
for (let r of i) o.rows.push(Ss(r, o.header.length).map((
|
|
904
|
+
for (let r of i) o.rows.push(Ss(r, o.header.length).map((c, a) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: o.align[a] })));
|
|
905
905
|
return o;
|
|
906
906
|
}
|
|
907
907
|
}
|
|
@@ -967,18 +967,18 @@ ${f}` : f;
|
|
|
967
967
|
emStrong(t, e, n = "") {
|
|
968
968
|
let s = this.rules.inline.emStrongLDelim.exec(t);
|
|
969
969
|
if (!(!s || s[3] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[2]) || !n || this.rules.inline.punctuation.exec(n))) {
|
|
970
|
-
let i = [...s[0]].length - 1, o, l, r = i,
|
|
970
|
+
let i = [...s[0]].length - 1, o, l, r = i, c = 0, a = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
971
971
|
for (a.lastIndex = 0, e = e.slice(-1 * t.length + i); (s = a.exec(e)) != null; ) {
|
|
972
972
|
if (o = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o) continue;
|
|
973
973
|
if (l = [...o].length, s[3] || s[4]) {
|
|
974
974
|
r += l;
|
|
975
975
|
continue;
|
|
976
976
|
} else if ((s[5] || s[6]) && i % 3 && !((i + l) % 3)) {
|
|
977
|
-
|
|
977
|
+
c += l;
|
|
978
978
|
continue;
|
|
979
979
|
}
|
|
980
980
|
if (r -= l, r > 0) continue;
|
|
981
|
-
l = Math.min(l, l + r +
|
|
981
|
+
l = Math.min(l, l + r + c);
|
|
982
982
|
let f = [...s[0]][0].length, g = t.slice(0, i + s.index + f + l);
|
|
983
983
|
if (Math.min(i, l) % 2) {
|
|
984
984
|
let h = g.slice(1, -1);
|
|
@@ -1125,19 +1125,19 @@ ${f}` : f;
|
|
|
1125
1125
|
e = e.substring(r.raw.length), n.push(r);
|
|
1126
1126
|
continue;
|
|
1127
1127
|
}
|
|
1128
|
-
let
|
|
1128
|
+
let c = e;
|
|
1129
1129
|
if ((l = this.options.extensions) != null && l.startBlock) {
|
|
1130
1130
|
let a = 1 / 0, f = e.slice(1), g;
|
|
1131
1131
|
this.options.extensions.startBlock.forEach((m) => {
|
|
1132
1132
|
g = m.call({ lexer: this }, f), typeof g == "number" && g >= 0 && (a = Math.min(a, g));
|
|
1133
|
-
}), a < 1 / 0 && a >= 0 && (
|
|
1133
|
+
}), a < 1 / 0 && a >= 0 && (c = e.substring(0, a + 1));
|
|
1134
1134
|
}
|
|
1135
|
-
if (this.state.top && (r = this.tokenizer.paragraph(
|
|
1135
|
+
if (this.state.top && (r = this.tokenizer.paragraph(c))) {
|
|
1136
1136
|
let a = n.at(-1);
|
|
1137
1137
|
s && (a == null ? void 0 : a.type) === "paragraph" ? (a.raw += (a.raw.endsWith(`
|
|
1138
1138
|
`) ? "" : `
|
|
1139
1139
|
`) + r.raw, a.text += `
|
|
1140
|
-
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = a.text) : n.push(r), s =
|
|
1140
|
+
` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = a.text) : n.push(r), s = c.length !== e.length, e = e.substring(r.raw.length);
|
|
1141
1141
|
continue;
|
|
1142
1142
|
}
|
|
1143
1143
|
if (r = this.tokenizer.text(e)) {
|
|
@@ -1163,7 +1163,7 @@ ${f}` : f;
|
|
|
1163
1163
|
return this.inlineQueue.push({ src: e, tokens: n }), n;
|
|
1164
1164
|
}
|
|
1165
1165
|
inlineTokens(e, n = []) {
|
|
1166
|
-
var r,
|
|
1166
|
+
var r, c, a, f, g, m;
|
|
1167
1167
|
let s = e, i = null;
|
|
1168
1168
|
if (this.tokens.links) {
|
|
1169
1169
|
let h = Object.keys(this.tokens.links);
|
|
@@ -1171,7 +1171,7 @@ ${f}` : f;
|
|
|
1171
1171
|
}
|
|
1172
1172
|
for (; (i = this.tokenizer.rules.inline.anyPunctuation.exec(s)) != null; ) s = s.slice(0, i.index) + "++" + s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
1173
1173
|
for (; (i = this.tokenizer.rules.inline.blockSkip.exec(s)) != null; ) s = s.slice(0, i.index) + "[" + "a".repeat(i[0].length - 2) + "]" + s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
1174
|
-
s = (a = (
|
|
1174
|
+
s = (a = (c = (r = this.options.hooks) == null ? void 0 : r.emStrongMask) == null ? void 0 : c.call({ lexer: this }, s)) != null ? a : s;
|
|
1175
1175
|
let o = !1, l = "";
|
|
1176
1176
|
for (; e; ) {
|
|
1177
1177
|
o || (l = ""), o = !1;
|
|
@@ -1419,57 +1419,57 @@ ${t}</tr>
|
|
|
1419
1419
|
continue;
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
|
-
let
|
|
1423
|
-
switch (
|
|
1422
|
+
let c = r;
|
|
1423
|
+
switch (c.type) {
|
|
1424
1424
|
case "space": {
|
|
1425
|
-
s += this.renderer.space(
|
|
1425
|
+
s += this.renderer.space(c);
|
|
1426
1426
|
continue;
|
|
1427
1427
|
}
|
|
1428
1428
|
case "hr": {
|
|
1429
|
-
s += this.renderer.hr(
|
|
1429
|
+
s += this.renderer.hr(c);
|
|
1430
1430
|
continue;
|
|
1431
1431
|
}
|
|
1432
1432
|
case "heading": {
|
|
1433
|
-
s += this.renderer.heading(
|
|
1433
|
+
s += this.renderer.heading(c);
|
|
1434
1434
|
continue;
|
|
1435
1435
|
}
|
|
1436
1436
|
case "code": {
|
|
1437
|
-
s += this.renderer.code(
|
|
1437
|
+
s += this.renderer.code(c);
|
|
1438
1438
|
continue;
|
|
1439
1439
|
}
|
|
1440
1440
|
case "table": {
|
|
1441
|
-
s += this.renderer.table(
|
|
1441
|
+
s += this.renderer.table(c);
|
|
1442
1442
|
continue;
|
|
1443
1443
|
}
|
|
1444
1444
|
case "blockquote": {
|
|
1445
|
-
s += this.renderer.blockquote(
|
|
1445
|
+
s += this.renderer.blockquote(c);
|
|
1446
1446
|
continue;
|
|
1447
1447
|
}
|
|
1448
1448
|
case "list": {
|
|
1449
|
-
s += this.renderer.list(
|
|
1449
|
+
s += this.renderer.list(c);
|
|
1450
1450
|
continue;
|
|
1451
1451
|
}
|
|
1452
1452
|
case "html": {
|
|
1453
|
-
s += this.renderer.html(
|
|
1453
|
+
s += this.renderer.html(c);
|
|
1454
1454
|
continue;
|
|
1455
1455
|
}
|
|
1456
1456
|
case "def": {
|
|
1457
|
-
s += this.renderer.def(
|
|
1457
|
+
s += this.renderer.def(c);
|
|
1458
1458
|
continue;
|
|
1459
1459
|
}
|
|
1460
1460
|
case "paragraph": {
|
|
1461
|
-
s += this.renderer.paragraph(
|
|
1461
|
+
s += this.renderer.paragraph(c);
|
|
1462
1462
|
continue;
|
|
1463
1463
|
}
|
|
1464
1464
|
case "text": {
|
|
1465
|
-
let a =
|
|
1465
|
+
let a = c, f = this.renderer.text(a);
|
|
1466
1466
|
for (; l + 1 < e.length && e[l + 1].type === "text"; ) a = e[++l], f += `
|
|
1467
1467
|
` + this.renderer.text(a);
|
|
1468
1468
|
n ? s += this.renderer.paragraph({ type: "paragraph", raw: f, text: f, tokens: [{ type: "text", raw: f, text: f, escaped: !0 }] }) : s += f;
|
|
1469
1469
|
continue;
|
|
1470
1470
|
}
|
|
1471
1471
|
default: {
|
|
1472
|
-
let a = 'Token with "' +
|
|
1472
|
+
let a = 'Token with "' + c.type + '" type was not found.';
|
|
1473
1473
|
if (this.options.silent) return console.error(a), "";
|
|
1474
1474
|
throw new Error(a);
|
|
1475
1475
|
}
|
|
@@ -1489,50 +1489,50 @@ ${t}</tr>
|
|
|
1489
1489
|
continue;
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
|
-
let
|
|
1493
|
-
switch (
|
|
1492
|
+
let c = r;
|
|
1493
|
+
switch (c.type) {
|
|
1494
1494
|
case "escape": {
|
|
1495
|
-
s += n.text(
|
|
1495
|
+
s += n.text(c);
|
|
1496
1496
|
break;
|
|
1497
1497
|
}
|
|
1498
1498
|
case "html": {
|
|
1499
|
-
s += n.html(
|
|
1499
|
+
s += n.html(c);
|
|
1500
1500
|
break;
|
|
1501
1501
|
}
|
|
1502
1502
|
case "link": {
|
|
1503
|
-
s += n.link(
|
|
1503
|
+
s += n.link(c);
|
|
1504
1504
|
break;
|
|
1505
1505
|
}
|
|
1506
1506
|
case "image": {
|
|
1507
|
-
s += n.image(
|
|
1507
|
+
s += n.image(c);
|
|
1508
1508
|
break;
|
|
1509
1509
|
}
|
|
1510
1510
|
case "strong": {
|
|
1511
|
-
s += n.strong(
|
|
1511
|
+
s += n.strong(c);
|
|
1512
1512
|
break;
|
|
1513
1513
|
}
|
|
1514
1514
|
case "em": {
|
|
1515
|
-
s += n.em(
|
|
1515
|
+
s += n.em(c);
|
|
1516
1516
|
break;
|
|
1517
1517
|
}
|
|
1518
1518
|
case "codespan": {
|
|
1519
|
-
s += n.codespan(
|
|
1519
|
+
s += n.codespan(c);
|
|
1520
1520
|
break;
|
|
1521
1521
|
}
|
|
1522
1522
|
case "br": {
|
|
1523
|
-
s += n.br(
|
|
1523
|
+
s += n.br(c);
|
|
1524
1524
|
break;
|
|
1525
1525
|
}
|
|
1526
1526
|
case "del": {
|
|
1527
|
-
s += n.del(
|
|
1527
|
+
s += n.del(c);
|
|
1528
1528
|
break;
|
|
1529
1529
|
}
|
|
1530
1530
|
case "text": {
|
|
1531
|
-
s += n.text(
|
|
1531
|
+
s += n.text(c);
|
|
1532
1532
|
break;
|
|
1533
1533
|
}
|
|
1534
1534
|
default: {
|
|
1535
|
-
let a = 'Token with "' +
|
|
1535
|
+
let a = 'Token with "' + c.type + '" type was not found.';
|
|
1536
1536
|
if (this.options.silent) return console.error(a), "";
|
|
1537
1537
|
throw new Error(a);
|
|
1538
1538
|
}
|
|
@@ -1585,7 +1585,7 @@ ${t}</tr>
|
|
|
1585
1585
|
case "table": {
|
|
1586
1586
|
let l = o;
|
|
1587
1587
|
for (let r of l.header) n = n.concat(this.walkTokens(r.tokens, e));
|
|
1588
|
-
for (let r of l.rows) for (let
|
|
1588
|
+
for (let r of l.rows) for (let c of r) n = n.concat(this.walkTokens(c.tokens, e));
|
|
1589
1589
|
break;
|
|
1590
1590
|
}
|
|
1591
1591
|
case "list": {
|
|
@@ -1596,8 +1596,8 @@ ${t}</tr>
|
|
|
1596
1596
|
default: {
|
|
1597
1597
|
let l = o;
|
|
1598
1598
|
(i = (s = this.defaults.extensions) == null ? void 0 : s.childTokens) != null && i[l.type] ? this.defaults.extensions.childTokens[l.type].forEach((r) => {
|
|
1599
|
-
let
|
|
1600
|
-
n = n.concat(this.walkTokens(
|
|
1599
|
+
let c = l[r].flat(1 / 0);
|
|
1600
|
+
n = n.concat(this.walkTokens(c, e));
|
|
1601
1601
|
}) : l.tokens && (n = n.concat(this.walkTokens(l.tokens, e)));
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
@@ -1627,10 +1627,10 @@ ${t}</tr>
|
|
|
1627
1627
|
for (let o in n.renderer) {
|
|
1628
1628
|
if (!(o in i)) throw new Error(`renderer '${o}' does not exist`);
|
|
1629
1629
|
if (["options", "parser"].includes(o)) continue;
|
|
1630
|
-
let l = o, r = n.renderer[l],
|
|
1630
|
+
let l = o, r = n.renderer[l], c = i[l];
|
|
1631
1631
|
i[l] = (...a) => {
|
|
1632
1632
|
let f = r.apply(i, a);
|
|
1633
|
-
return f === !1 && (f =
|
|
1633
|
+
return f === !1 && (f = c.apply(i, a)), f || "";
|
|
1634
1634
|
};
|
|
1635
1635
|
}
|
|
1636
1636
|
s.renderer = i;
|
|
@@ -1640,10 +1640,10 @@ ${t}</tr>
|
|
|
1640
1640
|
for (let o in n.tokenizer) {
|
|
1641
1641
|
if (!(o in i)) throw new Error(`tokenizer '${o}' does not exist`);
|
|
1642
1642
|
if (["options", "rules", "lexer"].includes(o)) continue;
|
|
1643
|
-
let l = o, r = n.tokenizer[l],
|
|
1643
|
+
let l = o, r = n.tokenizer[l], c = i[l];
|
|
1644
1644
|
i[l] = (...a) => {
|
|
1645
1645
|
let f = r.apply(i, a);
|
|
1646
|
-
return f === !1 && (f =
|
|
1646
|
+
return f === !1 && (f = c.apply(i, a)), f;
|
|
1647
1647
|
};
|
|
1648
1648
|
}
|
|
1649
1649
|
s.tokenizer = i;
|
|
@@ -1653,21 +1653,21 @@ ${t}</tr>
|
|
|
1653
1653
|
for (let o in n.hooks) {
|
|
1654
1654
|
if (!(o in i)) throw new Error(`hook '${o}' does not exist`);
|
|
1655
1655
|
if (["options", "block"].includes(o)) continue;
|
|
1656
|
-
let l = o, r = n.hooks[l],
|
|
1656
|
+
let l = o, r = n.hooks[l], c = i[l];
|
|
1657
1657
|
Xt.passThroughHooks.has(o) ? i[l] = (a) => {
|
|
1658
1658
|
if (this.defaults.async && Xt.passThroughHooksRespectAsync.has(o)) return Se(this, null, function* () {
|
|
1659
1659
|
let g = yield r.call(i, a);
|
|
1660
|
-
return
|
|
1660
|
+
return c.call(i, g);
|
|
1661
1661
|
});
|
|
1662
1662
|
let f = r.call(i, a);
|
|
1663
|
-
return
|
|
1663
|
+
return c.call(i, f);
|
|
1664
1664
|
} : i[l] = (...a) => {
|
|
1665
1665
|
if (this.defaults.async) return Se(this, null, function* () {
|
|
1666
1666
|
let g = yield r.apply(i, a);
|
|
1667
|
-
return g === !1 && (g = yield
|
|
1667
|
+
return g === !1 && (g = yield c.apply(i, a)), g;
|
|
1668
1668
|
});
|
|
1669
1669
|
let f = r.apply(i, a);
|
|
1670
|
-
return f === !1 && (f =
|
|
1670
|
+
return f === !1 && (f = c.apply(i, a)), f;
|
|
1671
1671
|
};
|
|
1672
1672
|
}
|
|
1673
1673
|
s.hooks = i;
|
|
@@ -1698,9 +1698,9 @@ ${t}</tr>
|
|
|
1698
1698
|
if (typeof e > "u" || e === null) return o(new Error("marked(): input parameter is undefined or null"));
|
|
1699
1699
|
if (typeof e != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1700
1700
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = t), i.async) return Se(this, null, function* () {
|
|
1701
|
-
let l = i.hooks ? yield i.hooks.preprocess(e) : e, r = yield (i.hooks ? yield i.hooks.provideLexer() : t ? rt.lex : rt.lexInline)(l, i),
|
|
1702
|
-
i.walkTokens && (yield Promise.all(this.walkTokens(
|
|
1703
|
-
let a = yield (i.hooks ? yield i.hooks.provideParser() : t ? lt.parse : lt.parseInline)(
|
|
1701
|
+
let l = i.hooks ? yield i.hooks.preprocess(e) : e, r = yield (i.hooks ? yield i.hooks.provideLexer() : t ? rt.lex : rt.lexInline)(l, i), c = i.hooks ? yield i.hooks.processAllTokens(r) : r;
|
|
1702
|
+
i.walkTokens && (yield Promise.all(this.walkTokens(c, i.walkTokens)));
|
|
1703
|
+
let a = yield (i.hooks ? yield i.hooks.provideParser() : t ? lt.parse : lt.parseInline)(c, i);
|
|
1704
1704
|
return i.hooks ? yield i.hooks.postprocess(a) : a;
|
|
1705
1705
|
}).catch(o);
|
|
1706
1706
|
try {
|
|
@@ -1768,7 +1768,7 @@ const {
|
|
|
1768
1768
|
let {
|
|
1769
1769
|
freeze: Ue,
|
|
1770
1770
|
seal: tt,
|
|
1771
|
-
create:
|
|
1771
|
+
create: Mi
|
|
1772
1772
|
} = Object, {
|
|
1773
1773
|
apply: qn,
|
|
1774
1774
|
construct: Gn
|
|
@@ -1789,7 +1789,7 @@ Gn || (Gn = function(e) {
|
|
|
1789
1789
|
s[i - 1] = arguments[i];
|
|
1790
1790
|
return new e(...s);
|
|
1791
1791
|
});
|
|
1792
|
-
const on = qe(Array.prototype.forEach), Ko = qe(Array.prototype.lastIndexOf), xs = qe(Array.prototype.pop), Ut = qe(Array.prototype.push), $o = qe(Array.prototype.splice), fn = qe(String.prototype.toLowerCase),
|
|
1792
|
+
const on = qe(Array.prototype.forEach), Ko = qe(Array.prototype.lastIndexOf), xs = qe(Array.prototype.pop), Ut = qe(Array.prototype.push), $o = qe(Array.prototype.splice), fn = qe(String.prototype.toLowerCase), Ln = qe(String.prototype.toString), Cn = qe(String.prototype.match), qt = qe(String.prototype.replace), er = qe(String.prototype.indexOf), tr = qe(String.prototype.trim), ot = qe(Object.prototype.hasOwnProperty), Be = qe(RegExp.prototype.test), Gt = nr(TypeError);
|
|
1793
1793
|
function qe(t) {
|
|
1794
1794
|
return function(e) {
|
|
1795
1795
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -1805,7 +1805,7 @@ function nr(t) {
|
|
|
1805
1805
|
return Gn(t, n);
|
|
1806
1806
|
};
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function J(t, e) {
|
|
1809
1809
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : fn;
|
|
1810
1810
|
As && As(t, null);
|
|
1811
1811
|
let s = e.length;
|
|
@@ -1825,7 +1825,7 @@ function sr(t) {
|
|
|
1825
1825
|
return t;
|
|
1826
1826
|
}
|
|
1827
1827
|
function mt(t) {
|
|
1828
|
-
const e =
|
|
1828
|
+
const e = Mi(null);
|
|
1829
1829
|
for (const [n, s] of Ii(t))
|
|
1830
1830
|
ot(t, n) && (Array.isArray(s) ? e[n] = sr(s) : s && typeof s == "object" && s.constructor === Object ? e[n] = mt(s) : e[n] = s);
|
|
1831
1831
|
return e;
|
|
@@ -1846,7 +1846,7 @@ function Zt(t, e) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
return n;
|
|
1848
1848
|
}
|
|
1849
|
-
const Rs = Ue(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), zn = Ue(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Dn = Ue(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ir = Ue(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), On = Ue(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), or = Ue(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Is = Ue(["#text"]),
|
|
1849
|
+
const Rs = Ue(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), zn = Ue(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Dn = Ue(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ir = Ue(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), On = Ue(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), or = Ue(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Is = Ue(["#text"]), Ms = Ue(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Pn = Ue(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ls = Ue(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), rn = Ue(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), rr = tt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), lr = tt(/<%[\w\W]*|[\w\W]*%>/gm), ar = tt(/\$\{[\w\W]*/gm), cr = tt(/^data-[\-\w.\u00B7-\uFFFF]+$/), ur = tt(/^aria-[\-\w]+$/), Li = tt(
|
|
1850
1850
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
1851
1851
|
// eslint-disable-line no-useless-escape
|
|
1852
1852
|
), fr = tt(/^(?:\w+script|data):/i), hr = tt(
|
|
@@ -1861,7 +1861,7 @@ var Cs = /* @__PURE__ */ Object.freeze({
|
|
|
1861
1861
|
DATA_ATTR: cr,
|
|
1862
1862
|
DOCTYPE_NAME: Ci,
|
|
1863
1863
|
ERB_EXPR: lr,
|
|
1864
|
-
IS_ALLOWED_URI:
|
|
1864
|
+
IS_ALLOWED_URI: Li,
|
|
1865
1865
|
IS_SCRIPT_OR_DATA: fr,
|
|
1866
1866
|
MUSTACHE_EXPR: rr,
|
|
1867
1867
|
TMPLIT_EXPR: ar
|
|
@@ -1919,25 +1919,25 @@ function zi() {
|
|
|
1919
1919
|
DocumentFragment: o,
|
|
1920
1920
|
HTMLTemplateElement: l,
|
|
1921
1921
|
Node: r,
|
|
1922
|
-
Element:
|
|
1922
|
+
Element: c,
|
|
1923
1923
|
NodeFilter: a,
|
|
1924
1924
|
NamedNodeMap: f = t.NamedNodeMap || t.MozNamedAttrMap,
|
|
1925
1925
|
HTMLFormElement: g,
|
|
1926
1926
|
DOMParser: m,
|
|
1927
1927
|
trustedTypes: h
|
|
1928
|
-
} = t, d =
|
|
1928
|
+
} = t, d = c.prototype, w = Zt(d, "cloneNode"), T = Zt(d, "remove"), E = Zt(d, "nextSibling"), y = Zt(d, "childNodes"), S = Zt(d, "parentNode");
|
|
1929
1929
|
if (typeof l == "function") {
|
|
1930
1930
|
const N = n.createElement("template");
|
|
1931
1931
|
N.content && N.content.ownerDocument && (n = N.content.ownerDocument);
|
|
1932
1932
|
}
|
|
1933
|
-
let _,
|
|
1933
|
+
let _, M = "";
|
|
1934
1934
|
const {
|
|
1935
1935
|
implementation: R,
|
|
1936
1936
|
createNodeIterator: v,
|
|
1937
|
-
createDocumentFragment:
|
|
1937
|
+
createDocumentFragment: L,
|
|
1938
1938
|
getElementsByTagName: I
|
|
1939
1939
|
} = n, {
|
|
1940
|
-
importNode:
|
|
1940
|
+
importNode: V
|
|
1941
1941
|
} = s;
|
|
1942
1942
|
let H = zs();
|
|
1943
1943
|
e.isSupported = typeof Ii == "function" && typeof S == "function" && R && R.createHTMLDocument !== void 0;
|
|
@@ -1946,7 +1946,7 @@ function zi() {
|
|
|
1946
1946
|
ERB_EXPR: G,
|
|
1947
1947
|
TMPLIT_EXPR: te,
|
|
1948
1948
|
DATA_ATTR: ne,
|
|
1949
|
-
ARIA_ATTR:
|
|
1949
|
+
ARIA_ATTR: K,
|
|
1950
1950
|
IS_SCRIPT_OR_DATA: le,
|
|
1951
1951
|
ATTR_WHITESPACE: Ge,
|
|
1952
1952
|
CUSTOM_ELEMENT: ie
|
|
@@ -1954,10 +1954,10 @@ function zi() {
|
|
|
1954
1954
|
let {
|
|
1955
1955
|
IS_ALLOWED_URI: Ze
|
|
1956
1956
|
} = Cs, Z = null;
|
|
1957
|
-
const Qe =
|
|
1957
|
+
const Qe = J({}, [...Rs, ...zn, ...Dn, ...On, ...Is]);
|
|
1958
1958
|
let he = null;
|
|
1959
|
-
const Ae =
|
|
1960
|
-
let ue = Object.seal(
|
|
1959
|
+
const Ae = J({}, [...Ms, ...Pn, ...Ls, ...rn]);
|
|
1960
|
+
let ue = Object.seal(Mi(null, {
|
|
1961
1961
|
tagNameCheck: {
|
|
1962
1962
|
writable: !0,
|
|
1963
1963
|
configurable: !1,
|
|
@@ -1976,18 +1976,18 @@ function zi() {
|
|
|
1976
1976
|
enumerable: !0,
|
|
1977
1977
|
value: !1
|
|
1978
1978
|
}
|
|
1979
|
-
})), xe = null, ge = null, Ve = !0,
|
|
1979
|
+
})), xe = null, ge = null, Ve = !0, Le = !0, nt = !1, U = !0, Q = !1, Oe = !0, _e = !1, st = !1, fe = !1, Ce = !1, it = !1, at = !1, ht = !0, yt = !1;
|
|
1980
1980
|
const xt = "user-content-";
|
|
1981
1981
|
let pt = !0, He = !1, Je = {}, ct = null;
|
|
1982
|
-
const C =
|
|
1983
|
-
let
|
|
1984
|
-
const pe =
|
|
1982
|
+
const C = J({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
1983
|
+
let $ = null;
|
|
1984
|
+
const pe = J({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
1985
1985
|
let ye = null;
|
|
1986
|
-
const Pe =
|
|
1986
|
+
const Pe = J({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Re = "http://www.w3.org/1998/Math/MathML", Ne = "http://www.w3.org/2000/svg", Ie = "http://www.w3.org/1999/xhtml";
|
|
1987
1987
|
let Ke = Ie, dt = !1, Ht = null;
|
|
1988
|
-
const Tn =
|
|
1989
|
-
let Rt =
|
|
1990
|
-
const vn =
|
|
1988
|
+
const Tn = J({}, [Re, Ne, Ie], Ln);
|
|
1989
|
+
let Rt = J({}, ["mi", "mo", "mn", "ms", "mtext"]), It = J({}, ["annotation-xml"]);
|
|
1990
|
+
const vn = J({}, ["title", "style", "font", "a", "script"]);
|
|
1991
1991
|
let Tt = null;
|
|
1992
1992
|
const Sn = ["application/xhtml+xml", "text/html"], En = "text/html";
|
|
1993
1993
|
let Te = null, bt = null;
|
|
@@ -1997,24 +1997,24 @@ function zi() {
|
|
|
1997
1997
|
let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1998
1998
|
if (!(bt && bt === p)) {
|
|
1999
1999
|
if ((!p || typeof p != "object") && (p = {}), p = mt(p), Tt = // eslint-disable-next-line unicorn/prefer-includes
|
|
2000
|
-
Sn.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? En : p.PARSER_MEDIA_TYPE, Te = Tt === "application/xhtml+xml" ?
|
|
2000
|
+
Sn.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? En : p.PARSER_MEDIA_TYPE, Te = Tt === "application/xhtml+xml" ? Ln : fn, Z = ot(p, "ALLOWED_TAGS") ? J({}, p.ALLOWED_TAGS, Te) : Qe, he = ot(p, "ALLOWED_ATTR") ? J({}, p.ALLOWED_ATTR, Te) : Ae, Ht = ot(p, "ALLOWED_NAMESPACES") ? J({}, p.ALLOWED_NAMESPACES, Ln) : Tn, ye = ot(p, "ADD_URI_SAFE_ATTR") ? J(mt(Pe), p.ADD_URI_SAFE_ATTR, Te) : Pe, $ = ot(p, "ADD_DATA_URI_TAGS") ? J(mt(pe), p.ADD_DATA_URI_TAGS, Te) : pe, ct = ot(p, "FORBID_CONTENTS") ? J({}, p.FORBID_CONTENTS, Te) : C, xe = ot(p, "FORBID_TAGS") ? J({}, p.FORBID_TAGS, Te) : mt({}), ge = ot(p, "FORBID_ATTR") ? J({}, p.FORBID_ATTR, Te) : mt({}), Je = ot(p, "USE_PROFILES") ? p.USE_PROFILES : !1, Ve = p.ALLOW_ARIA_ATTR !== !1, Le = p.ALLOW_DATA_ATTR !== !1, nt = p.ALLOW_UNKNOWN_PROTOCOLS || !1, U = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Q = p.SAFE_FOR_TEMPLATES || !1, Oe = p.SAFE_FOR_XML !== !1, _e = p.WHOLE_DOCUMENT || !1, Ce = p.RETURN_DOM || !1, it = p.RETURN_DOM_FRAGMENT || !1, at = p.RETURN_TRUSTED_TYPE || !1, fe = p.FORCE_BODY || !1, ht = p.SANITIZE_DOM !== !1, yt = p.SANITIZE_NAMED_PROPS || !1, pt = p.KEEP_CONTENT !== !1, He = p.IN_PLACE || !1, Ze = p.ALLOWED_URI_REGEXP || Li, Ke = p.NAMESPACE || Ie, Rt = p.MATHML_TEXT_INTEGRATION_POINTS || Rt, It = p.HTML_INTEGRATION_POINTS || It, ue = p.CUSTOM_ELEMENT_HANDLING || {}, p.CUSTOM_ELEMENT_HANDLING && $t(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (ue.tagNameCheck = p.CUSTOM_ELEMENT_HANDLING.tagNameCheck), p.CUSTOM_ELEMENT_HANDLING && $t(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (ue.attributeNameCheck = p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (ue.allowCustomizedBuiltInElements = p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Q && (Le = !1), it && (Ce = !0), Je && (Z = J({}, Is), he = [], Je.html === !0 && (J(Z, Rs), J(he, Ms)), Je.svg === !0 && (J(Z, zn), J(he, Pn), J(he, rn)), Je.svgFilters === !0 && (J(Z, Dn), J(he, Pn), J(he, rn)), Je.mathMl === !0 && (J(Z, On), J(he, Ls), J(he, rn))), p.ADD_TAGS && (Z === Qe && (Z = mt(Z)), J(Z, p.ADD_TAGS, Te)), p.ADD_ATTR && (he === Ae && (he = mt(he)), J(he, p.ADD_ATTR, Te)), p.ADD_URI_SAFE_ATTR && J(ye, p.ADD_URI_SAFE_ATTR, Te), p.FORBID_CONTENTS && (ct === C && (ct = mt(ct)), J(ct, p.FORBID_CONTENTS, Te)), pt && (Z["#text"] = !0), _e && J(Z, ["html", "head", "body"]), Z.table && (J(Z, ["tbody"]), delete xe.tbody), p.TRUSTED_TYPES_POLICY) {
|
|
2001
2001
|
if (typeof p.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
2002
2002
|
throw Gt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2003
2003
|
if (typeof p.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
2004
2004
|
throw Gt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
2005
|
-
_ = p.TRUSTED_TYPES_POLICY,
|
|
2005
|
+
_ = p.TRUSTED_TYPES_POLICY, M = _.createHTML("");
|
|
2006
2006
|
} else
|
|
2007
|
-
_ === void 0 && (_ = gr(h, i)), _ !== null && typeof
|
|
2007
|
+
_ === void 0 && (_ = gr(h, i)), _ !== null && typeof M == "string" && (M = _.createHTML(""));
|
|
2008
2008
|
Ue && Ue(p), bt = p;
|
|
2009
2009
|
}
|
|
2010
|
-
}, en =
|
|
2010
|
+
}, en = J({}, [...zn, ...Dn, ...ir]), tn = J({}, [...On, ...or]), xn = function(p) {
|
|
2011
2011
|
let A = S(p);
|
|
2012
2012
|
(!A || !A.tagName) && (A = {
|
|
2013
2013
|
namespaceURI: Ke,
|
|
2014
2014
|
tagName: "template"
|
|
2015
2015
|
});
|
|
2016
|
-
const
|
|
2017
|
-
return Ht[p.namespaceURI] ? p.namespaceURI === Ne ? A.namespaceURI === Ie ?
|
|
2016
|
+
const P = fn(p.tagName), me = fn(A.tagName);
|
|
2017
|
+
return Ht[p.namespaceURI] ? p.namespaceURI === Ne ? A.namespaceURI === Ie ? P === "svg" : A.namespaceURI === Re ? P === "svg" && (me === "annotation-xml" || Rt[me]) : !!en[P] : p.namespaceURI === Re ? A.namespaceURI === Ie ? P === "math" : A.namespaceURI === Ne ? P === "math" && It[me] : !!tn[P] : p.namespaceURI === Ie ? A.namespaceURI === Ne && !It[me] || A.namespaceURI === Re && !Rt[me] ? !1 : !tn[P] && (vn[P] || !en[P]) : !!(Tt === "application/xhtml+xml" && Ht[p.namespaceURI]) : !1;
|
|
2018
2018
|
}, $e = function(p) {
|
|
2019
2019
|
Ut(e.removed, {
|
|
2020
2020
|
element: p
|
|
@@ -2030,7 +2030,7 @@ function zi() {
|
|
|
2030
2030
|
attribute: A.getAttributeNode(p),
|
|
2031
2031
|
from: A
|
|
2032
2032
|
});
|
|
2033
|
-
} catch (
|
|
2033
|
+
} catch (P) {
|
|
2034
2034
|
Ut(e.removed, {
|
|
2035
2035
|
attribute: null,
|
|
2036
2036
|
from: A
|
|
@@ -2040,20 +2040,20 @@ function zi() {
|
|
|
2040
2040
|
if (Ce || it)
|
|
2041
2041
|
try {
|
|
2042
2042
|
$e(A);
|
|
2043
|
-
} catch (
|
|
2043
|
+
} catch (P) {
|
|
2044
2044
|
}
|
|
2045
2045
|
else
|
|
2046
2046
|
try {
|
|
2047
2047
|
A.setAttribute(p, "");
|
|
2048
|
-
} catch (
|
|
2048
|
+
} catch (P) {
|
|
2049
2049
|
}
|
|
2050
|
-
},
|
|
2051
|
-
let A = null,
|
|
2050
|
+
}, O = function(p) {
|
|
2051
|
+
let A = null, P = null;
|
|
2052
2052
|
if (fe)
|
|
2053
2053
|
p = "<remove></remove>" + p;
|
|
2054
2054
|
else {
|
|
2055
2055
|
const ve = Cn(p, /^[\r\n\t ]+/);
|
|
2056
|
-
|
|
2056
|
+
P = ve && ve[0];
|
|
2057
2057
|
}
|
|
2058
2058
|
Tt === "application/xhtml+xml" && Ke === Ie && (p = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + p + "</body></html>");
|
|
2059
2059
|
const me = _ ? _.createHTML(p) : p;
|
|
@@ -2065,13 +2065,13 @@ function zi() {
|
|
|
2065
2065
|
if (!A || !A.documentElement) {
|
|
2066
2066
|
A = R.createDocument(Ke, "template", null);
|
|
2067
2067
|
try {
|
|
2068
|
-
A.documentElement.innerHTML = dt ?
|
|
2068
|
+
A.documentElement.innerHTML = dt ? M : me;
|
|
2069
2069
|
} catch (ve) {
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
2072
2072
|
const Fe = A.body || A.documentElement;
|
|
2073
|
-
return p &&
|
|
2074
|
-
},
|
|
2073
|
+
return p && P && Fe.insertBefore(n.createTextNode(P), Fe.childNodes[0] || null), Ke === Ie ? I.call(A, _e ? "html" : "body")[0] : _e ? A.documentElement : Fe;
|
|
2074
|
+
}, X = function(p) {
|
|
2075
2075
|
return v.call(
|
|
2076
2076
|
p.ownerDocument || p,
|
|
2077
2077
|
p,
|
|
@@ -2085,24 +2085,24 @@ function zi() {
|
|
|
2085
2085
|
return typeof r == "function" && p instanceof r;
|
|
2086
2086
|
};
|
|
2087
2087
|
function se(N, p, A) {
|
|
2088
|
-
on(N, (
|
|
2089
|
-
|
|
2088
|
+
on(N, (P) => {
|
|
2089
|
+
P.call(e, p, A, bt);
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
2092
2092
|
const de = function(p) {
|
|
2093
2093
|
let A = null;
|
|
2094
2094
|
if (se(H.beforeSanitizeElements, p, null), ae(p))
|
|
2095
2095
|
return $e(p), !0;
|
|
2096
|
-
const
|
|
2096
|
+
const P = Te(p.nodeName);
|
|
2097
2097
|
if (se(H.uponSanitizeElement, p, {
|
|
2098
|
-
tagName:
|
|
2098
|
+
tagName: P,
|
|
2099
2099
|
allowedTags: Z
|
|
2100
2100
|
}), Oe && p.hasChildNodes() && !be(p.firstElementChild) && Be(/<[/\w!]/g, p.innerHTML) && Be(/<[/\w!]/g, p.textContent) || p.nodeType === Yt.progressingInstruction || Oe && p.nodeType === Yt.comment && Be(/<[/\w]/g, p.data))
|
|
2101
2101
|
return $e(p), !0;
|
|
2102
|
-
if (!Z[
|
|
2103
|
-
if (!xe[
|
|
2102
|
+
if (!Z[P] || xe[P]) {
|
|
2103
|
+
if (!xe[P] && ut(P) && (ue.tagNameCheck instanceof RegExp && Be(ue.tagNameCheck, P) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(P)))
|
|
2104
2104
|
return !1;
|
|
2105
|
-
if (pt && !ct[
|
|
2105
|
+
if (pt && !ct[P]) {
|
|
2106
2106
|
const me = S(p) || p.parentNode, Fe = y(p) || p.childNodes;
|
|
2107
2107
|
if (Fe && me) {
|
|
2108
2108
|
const ve = Fe.length;
|
|
@@ -2114,16 +2114,16 @@ function zi() {
|
|
|
2114
2114
|
}
|
|
2115
2115
|
return $e(p), !0;
|
|
2116
2116
|
}
|
|
2117
|
-
return p instanceof
|
|
2117
|
+
return p instanceof c && !xn(p) || (P === "noscript" || P === "noembed" || P === "noframes") && Be(/<\/no(script|embed|frames)/i, p.innerHTML) ? ($e(p), !0) : (Q && p.nodeType === Yt.text && (A = p.textContent, on([D, G, te], (me) => {
|
|
2118
2118
|
A = qt(A, me, " ");
|
|
2119
2119
|
}), p.textContent !== A && (Ut(e.removed, {
|
|
2120
2120
|
element: p.cloneNode()
|
|
2121
2121
|
}), p.textContent = A)), se(H.afterSanitizeElements, p, null), !1);
|
|
2122
|
-
}, vt = function(p, A,
|
|
2123
|
-
if (ht && (A === "id" || A === "name") && (
|
|
2122
|
+
}, vt = function(p, A, P) {
|
|
2123
|
+
if (ht && (A === "id" || A === "name") && (P in n || P in An))
|
|
2124
2124
|
return !1;
|
|
2125
|
-
if (!(
|
|
2126
|
-
if (!(Ve && Be(
|
|
2125
|
+
if (!(Le && !ge[A] && Be(ne, A))) {
|
|
2126
|
+
if (!(Ve && Be(K, A))) {
|
|
2127
2127
|
if (!he[A] || ge[A]) {
|
|
2128
2128
|
if (
|
|
2129
2129
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
@@ -2131,13 +2131,13 @@ function zi() {
|
|
|
2131
2131
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
2132
2132
|
!(ut(p) && (ue.tagNameCheck instanceof RegExp && Be(ue.tagNameCheck, p) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(p)) && (ue.attributeNameCheck instanceof RegExp && Be(ue.attributeNameCheck, A) || ue.attributeNameCheck instanceof Function && ue.attributeNameCheck(A, p)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
2133
2133
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2134
|
-
A === "is" && ue.allowCustomizedBuiltInElements && (ue.tagNameCheck instanceof RegExp && Be(ue.tagNameCheck,
|
|
2134
|
+
A === "is" && ue.allowCustomizedBuiltInElements && (ue.tagNameCheck instanceof RegExp && Be(ue.tagNameCheck, P) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(P)))
|
|
2135
2135
|
) return !1;
|
|
2136
2136
|
} else if (!ye[A]) {
|
|
2137
|
-
if (!Be(Ze, qt(
|
|
2138
|
-
if (!((A === "src" || A === "xlink:href" || A === "href") && p !== "script" && er(
|
|
2139
|
-
if (!(nt && !Be(le, qt(
|
|
2140
|
-
if (
|
|
2137
|
+
if (!Be(Ze, qt(P, Ge, ""))) {
|
|
2138
|
+
if (!((A === "src" || A === "xlink:href" || A === "href") && p !== "script" && er(P, "data:") === 0 && $[p])) {
|
|
2139
|
+
if (!(nt && !Be(le, qt(P, Ge, "")))) {
|
|
2140
|
+
if (P)
|
|
2141
2141
|
return !1;
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
@@ -2155,7 +2155,7 @@ function zi() {
|
|
|
2155
2155
|
} = p;
|
|
2156
2156
|
if (!A || ae(p))
|
|
2157
2157
|
return;
|
|
2158
|
-
const
|
|
2158
|
+
const P = {
|
|
2159
2159
|
attrName: "",
|
|
2160
2160
|
attrValue: "",
|
|
2161
2161
|
keepAttr: !0,
|
|
@@ -2168,19 +2168,19 @@ function zi() {
|
|
|
2168
2168
|
name: ve,
|
|
2169
2169
|
namespaceURI: Ye,
|
|
2170
2170
|
value: gt
|
|
2171
|
-
} = Fe,
|
|
2171
|
+
} = Fe, Mt = Te(ve), Rn = gt;
|
|
2172
2172
|
let ze = ve === "value" ? Rn : tr(Rn);
|
|
2173
|
-
if (
|
|
2173
|
+
if (P.attrName = Mt, P.attrValue = ze, P.keepAttr = !0, P.forceKeepAttr = void 0, se(H.uponSanitizeAttribute, p, P), ze = P.attrValue, yt && (Mt === "id" || Mt === "name") && (k(ve, p), ze = xt + ze), Oe && Be(/((--!?|])>)|<\/(style|title|textarea)/i, ze)) {
|
|
2174
2174
|
k(ve, p);
|
|
2175
2175
|
continue;
|
|
2176
2176
|
}
|
|
2177
|
-
if (
|
|
2177
|
+
if (Mt === "attributename" && Cn(ze, "href")) {
|
|
2178
2178
|
k(ve, p);
|
|
2179
2179
|
continue;
|
|
2180
2180
|
}
|
|
2181
|
-
if (
|
|
2181
|
+
if (P.forceKeepAttr)
|
|
2182
2182
|
continue;
|
|
2183
|
-
if (!
|
|
2183
|
+
if (!P.keepAttr) {
|
|
2184
2184
|
k(ve, p);
|
|
2185
2185
|
continue;
|
|
2186
2186
|
}
|
|
@@ -2188,16 +2188,16 @@ function zi() {
|
|
|
2188
2188
|
k(ve, p);
|
|
2189
2189
|
continue;
|
|
2190
2190
|
}
|
|
2191
|
-
|
|
2191
|
+
Q && on([D, G, te], (us) => {
|
|
2192
2192
|
ze = qt(ze, us, " ");
|
|
2193
2193
|
});
|
|
2194
2194
|
const cs = Te(p.nodeName);
|
|
2195
|
-
if (!vt(cs,
|
|
2195
|
+
if (!vt(cs, Mt, ze)) {
|
|
2196
2196
|
k(ve, p);
|
|
2197
2197
|
continue;
|
|
2198
2198
|
}
|
|
2199
2199
|
if (_ && typeof h == "object" && typeof h.getAttributeType == "function" && !Ye)
|
|
2200
|
-
switch (h.getAttributeType(cs,
|
|
2200
|
+
switch (h.getAttributeType(cs, Mt)) {
|
|
2201
2201
|
case "TrustedHTML": {
|
|
2202
2202
|
ze = _.createHTML(ze);
|
|
2203
2203
|
break;
|
|
@@ -2217,13 +2217,13 @@ function zi() {
|
|
|
2217
2217
|
se(H.afterSanitizeAttributes, p, null);
|
|
2218
2218
|
}, Oi = function N(p) {
|
|
2219
2219
|
let A = null;
|
|
2220
|
-
const
|
|
2221
|
-
for (se(H.beforeSanitizeShadowDOM, p, null); A =
|
|
2220
|
+
const P = X(p);
|
|
2221
|
+
for (se(H.beforeSanitizeShadowDOM, p, null); A = P.nextNode(); )
|
|
2222
2222
|
se(H.uponSanitizeShadowNode, A, null), de(A), as(A), A.content instanceof o && N(A.content);
|
|
2223
2223
|
se(H.afterSanitizeShadowDOM, p, null);
|
|
2224
2224
|
};
|
|
2225
2225
|
return e.sanitize = function(N) {
|
|
2226
|
-
let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, A = null,
|
|
2226
|
+
let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, A = null, P = null, me = null, Fe = null;
|
|
2227
2227
|
if (dt = !N, dt && (N = "<!-->"), typeof N != "string" && !be(N))
|
|
2228
2228
|
if (typeof N.toString == "function") {
|
|
2229
2229
|
if (N = N.toString(), typeof N != "string")
|
|
@@ -2239,31 +2239,31 @@ function zi() {
|
|
|
2239
2239
|
throw Gt("root node is forbidden and cannot be sanitized in-place");
|
|
2240
2240
|
}
|
|
2241
2241
|
} else if (N instanceof r)
|
|
2242
|
-
A =
|
|
2242
|
+
A = O("<!---->"), P = A.ownerDocument.importNode(N, !0), P.nodeType === Yt.element && P.nodeName === "BODY" || P.nodeName === "HTML" ? A = P : A.appendChild(P);
|
|
2243
2243
|
else {
|
|
2244
|
-
if (!Ce && !
|
|
2244
|
+
if (!Ce && !Q && !_e && // eslint-disable-next-line unicorn/prefer-includes
|
|
2245
2245
|
N.indexOf("<") === -1)
|
|
2246
2246
|
return _ && at ? _.createHTML(N) : N;
|
|
2247
|
-
if (A =
|
|
2248
|
-
return Ce ? null : at ?
|
|
2247
|
+
if (A = O(N), !A)
|
|
2248
|
+
return Ce ? null : at ? M : "";
|
|
2249
2249
|
}
|
|
2250
2250
|
A && fe && $e(A.firstChild);
|
|
2251
|
-
const ve =
|
|
2251
|
+
const ve = X(He ? N : A);
|
|
2252
2252
|
for (; me = ve.nextNode(); )
|
|
2253
2253
|
de(me), as(me), me.content instanceof o && Oi(me.content);
|
|
2254
2254
|
if (He)
|
|
2255
2255
|
return N;
|
|
2256
2256
|
if (Ce) {
|
|
2257
2257
|
if (it)
|
|
2258
|
-
for (Fe =
|
|
2258
|
+
for (Fe = L.call(A.ownerDocument); A.firstChild; )
|
|
2259
2259
|
Fe.appendChild(A.firstChild);
|
|
2260
2260
|
else
|
|
2261
2261
|
Fe = A;
|
|
2262
|
-
return (he.shadowroot || he.shadowrootmode) && (Fe =
|
|
2262
|
+
return (he.shadowroot || he.shadowrootmode) && (Fe = V.call(s, Fe, !0)), Fe;
|
|
2263
2263
|
}
|
|
2264
2264
|
let Ye = _e ? A.outerHTML : A.innerHTML;
|
|
2265
2265
|
return _e && Z["!doctype"] && A.ownerDocument && A.ownerDocument.doctype && A.ownerDocument.doctype.name && Be(Ci, A.ownerDocument.doctype.name) && (Ye = "<!DOCTYPE " + A.ownerDocument.doctype.name + `>
|
|
2266
|
-
` + Ye),
|
|
2266
|
+
` + Ye), Q && on([D, G, te], (gt) => {
|
|
2267
2267
|
Ye = qt(Ye, gt, " ");
|
|
2268
2268
|
}), _ && at ? _.createHTML(Ye) : Ye;
|
|
2269
2269
|
}, e.setConfig = function() {
|
|
@@ -2273,8 +2273,8 @@ function zi() {
|
|
|
2273
2273
|
bt = null, st = !1;
|
|
2274
2274
|
}, e.isValidAttribute = function(N, p, A) {
|
|
2275
2275
|
bt || Bt({});
|
|
2276
|
-
const
|
|
2277
|
-
return vt(
|
|
2276
|
+
const P = Te(N), me = Te(p);
|
|
2277
|
+
return vt(P, me, A);
|
|
2278
2278
|
}, e.addHook = function(N, p) {
|
|
2279
2279
|
typeof p == "function" && Ut(H[N], p);
|
|
2280
2280
|
}, e.removeHook = function(N, p) {
|
|
@@ -2323,7 +2323,7 @@ function Ns(t) {
|
|
|
2323
2323
|
), s;
|
|
2324
2324
|
return {
|
|
2325
2325
|
c() {
|
|
2326
|
-
e = x("div"), s = De(n),
|
|
2326
|
+
e = x("div"), s = De(n), u(e, "class", "sy-assistant-button-tooltip svelte-1g6fj9a"), F(
|
|
2327
2327
|
e,
|
|
2328
2328
|
"left",
|
|
2329
2329
|
/*buttonTooltip*/
|
|
@@ -2376,13 +2376,13 @@ function mr(t) {
|
|
|
2376
2376
|
/*sessions*/
|
|
2377
2377
|
t[0]
|
|
2378
2378
|
);
|
|
2379
|
-
const l = (
|
|
2379
|
+
const l = (c) => (
|
|
2380
2380
|
/*session*/
|
|
2381
|
-
|
|
2381
|
+
c[25].sessionId
|
|
2382
2382
|
);
|
|
2383
|
-
for (let
|
|
2384
|
-
let a = Ps(t, o,
|
|
2385
|
-
n.set(f, e[
|
|
2383
|
+
for (let c = 0; c < o.length; c += 1) {
|
|
2384
|
+
let a = Ps(t, o, c), f = l(a);
|
|
2385
|
+
n.set(f, e[c] = Fs(f, a));
|
|
2386
2386
|
}
|
|
2387
2387
|
let r = (
|
|
2388
2388
|
/*isLoading*/
|
|
@@ -2390,28 +2390,28 @@ function mr(t) {
|
|
|
2390
2390
|
);
|
|
2391
2391
|
return {
|
|
2392
2392
|
c() {
|
|
2393
|
-
for (let
|
|
2394
|
-
e[
|
|
2393
|
+
for (let c = 0; c < e.length; c += 1)
|
|
2394
|
+
e[c].c();
|
|
2395
2395
|
s = q(), r && r.c(), i = Ft();
|
|
2396
2396
|
},
|
|
2397
|
-
m(
|
|
2397
|
+
m(c, a) {
|
|
2398
2398
|
for (let f = 0; f < e.length; f += 1)
|
|
2399
|
-
e[f] && e[f].m(
|
|
2400
|
-
W(
|
|
2399
|
+
e[f] && e[f].m(c, a);
|
|
2400
|
+
W(c, s, a), r && r.m(c, a), W(c, i, a);
|
|
2401
2401
|
},
|
|
2402
|
-
p(
|
|
2402
|
+
p(c, a) {
|
|
2403
2403
|
a & /*sessions, deletingSessionId, showDeleteConfirm, onSelect, formatDate*/
|
|
2404
2404
|
8261 && (o = _t(
|
|
2405
2405
|
/*sessions*/
|
|
2406
|
-
|
|
2407
|
-
), e = wi(e, a, l, 1,
|
|
2408
|
-
|
|
2406
|
+
c[0]
|
|
2407
|
+
), e = wi(e, a, l, 1, c, o, n, s.parentNode, mi, Fs, s, Ps)), /*isLoading*/
|
|
2408
|
+
c[5] ? r || (r = Hs(), r.c(), r.m(i.parentNode, i)) : r && (r.d(1), r = null);
|
|
2409
2409
|
},
|
|
2410
|
-
d(
|
|
2411
|
-
|
|
2410
|
+
d(c) {
|
|
2411
|
+
c && (B(s), B(i));
|
|
2412
2412
|
for (let a = 0; a < e.length; a += 1)
|
|
2413
|
-
e[a].d(
|
|
2414
|
-
r && r.d(
|
|
2413
|
+
e[a].d(c);
|
|
2414
|
+
r && r.d(c);
|
|
2415
2415
|
}
|
|
2416
2416
|
};
|
|
2417
2417
|
}
|
|
@@ -2425,7 +2425,7 @@ function wr(t) {
|
|
|
2425
2425
|
), s;
|
|
2426
2426
|
return {
|
|
2427
2427
|
c() {
|
|
2428
|
-
e = x("div"), s = De(n),
|
|
2428
|
+
e = x("div"), s = De(n), u(e, "class", "sy-session-empty svelte-1g6fj9a");
|
|
2429
2429
|
},
|
|
2430
2430
|
m(i, o) {
|
|
2431
2431
|
W(i, e, o), b(e, s);
|
|
@@ -2447,10 +2447,10 @@ function Fs(t, e) {
|
|
|
2447
2447
|
let n, s, i, o, l = (
|
|
2448
2448
|
/*session*/
|
|
2449
2449
|
e[25].title + ""
|
|
2450
|
-
), r,
|
|
2450
|
+
), r, c, a, f = Ws(
|
|
2451
2451
|
/*session*/
|
|
2452
2452
|
e[25].timestamp
|
|
2453
|
-
) + "", g, m, h, d, w, T, E, y, S, _,
|
|
2453
|
+
) + "", g, m, h, d, w, T, E, y, S, _, M;
|
|
2454
2454
|
function R() {
|
|
2455
2455
|
return (
|
|
2456
2456
|
/*click_handler*/
|
|
@@ -2460,13 +2460,13 @@ function Fs(t, e) {
|
|
|
2460
2460
|
)
|
|
2461
2461
|
);
|
|
2462
2462
|
}
|
|
2463
|
-
function v(...
|
|
2463
|
+
function v(...L) {
|
|
2464
2464
|
return (
|
|
2465
2465
|
/*click_handler_1*/
|
|
2466
2466
|
e[19](
|
|
2467
2467
|
/*session*/
|
|
2468
2468
|
e[25],
|
|
2469
|
-
...
|
|
2469
|
+
...L
|
|
2470
2470
|
)
|
|
2471
2471
|
);
|
|
2472
2472
|
}
|
|
@@ -2474,9 +2474,9 @@ function Fs(t, e) {
|
|
|
2474
2474
|
key: t,
|
|
2475
2475
|
first: null,
|
|
2476
2476
|
c() {
|
|
2477
|
-
n = x("div"), s = x("button"), i = x("div"), o = x("div"), r = De(l),
|
|
2477
|
+
n = x("div"), s = x("button"), i = x("div"), o = x("div"), r = De(l), c = q(), a = x("div"), g = De(f), m = q(), h = x("button"), d = Y("svg"), w = Y("path"), T = Y("path"), E = Y("path"), u(o, "class", "sy-session-title svelte-1g6fj9a"), u(a, "class", "sy-session-time svelte-1g6fj9a"), u(i, "class", "sy-session-info svelte-1g6fj9a"), u(s, "class", "sy-session-select svelte-1g6fj9a"), u(w, "d", "M3 6h18"), u(T, "d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"), u(E, "d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"), u(d, "xmlns", "http://www.w3.org/2000/svg"), u(d, "width", "16"), u(d, "height", "16"), u(d, "viewBox", "0 0 24 24"), u(d, "fill", "none"), u(d, "stroke", "currentColor"), u(d, "stroke-width", "2"), u(d, "stroke-linecap", "round"), u(d, "stroke-linejoin", "round"), u(h, "class", "sy-session-delete svelte-1g6fj9a"), h.disabled = y = /*deletingSessionId*/
|
|
2478
2478
|
e[6] === /*session*/
|
|
2479
|
-
e[25].sessionId,
|
|
2479
|
+
e[25].sessionId, u(h, "aria-label", "删除会话"), u(n, "class", "sy-session-item svelte-1g6fj9a"), u(n, "data-session-id", S = /*session*/
|
|
2480
2480
|
e[25].sessionId), z(
|
|
2481
2481
|
n,
|
|
2482
2482
|
"deleting",
|
|
@@ -2484,14 +2484,14 @@ function Fs(t, e) {
|
|
|
2484
2484
|
e[25].deleting
|
|
2485
2485
|
), this.first = n;
|
|
2486
2486
|
},
|
|
2487
|
-
m(
|
|
2488
|
-
W(
|
|
2487
|
+
m(L, I) {
|
|
2488
|
+
W(L, n, I), b(n, s), b(s, i), b(i, o), b(o, r), b(i, c), b(i, a), b(a, g), b(n, m), b(n, h), b(h, d), b(d, w), b(d, T), b(d, E), _ || (M = [
|
|
2489
2489
|
j(s, "click", R),
|
|
2490
2490
|
j(h, "click", v)
|
|
2491
2491
|
], _ = !0);
|
|
2492
2492
|
},
|
|
2493
|
-
p(
|
|
2494
|
-
e =
|
|
2493
|
+
p(L, I) {
|
|
2494
|
+
e = L, I & /*sessions*/
|
|
2495
2495
|
1 && l !== (l = /*session*/
|
|
2496
2496
|
e[25].title + "") && Xe(r, l), I & /*sessions*/
|
|
2497
2497
|
1 && f !== (f = Ws(
|
|
@@ -2502,7 +2502,7 @@ function Fs(t, e) {
|
|
|
2502
2502
|
e[6] === /*session*/
|
|
2503
2503
|
e[25].sessionId) && (h.disabled = y), I & /*sessions*/
|
|
2504
2504
|
1 && S !== (S = /*session*/
|
|
2505
|
-
e[25].sessionId) &&
|
|
2505
|
+
e[25].sessionId) && u(n, "data-session-id", S), I & /*sessions*/
|
|
2506
2506
|
1 && z(
|
|
2507
2507
|
n,
|
|
2508
2508
|
"deleting",
|
|
@@ -2510,8 +2510,8 @@ function Fs(t, e) {
|
|
|
2510
2510
|
e[25].deleting
|
|
2511
2511
|
);
|
|
2512
2512
|
},
|
|
2513
|
-
d(
|
|
2514
|
-
|
|
2513
|
+
d(L) {
|
|
2514
|
+
L && B(n), _ = !1, Me(M);
|
|
2515
2515
|
}
|
|
2516
2516
|
};
|
|
2517
2517
|
}
|
|
@@ -2519,7 +2519,7 @@ function Hs(t) {
|
|
|
2519
2519
|
let e;
|
|
2520
2520
|
return {
|
|
2521
2521
|
c() {
|
|
2522
|
-
e = x("div"), e.innerHTML = '<span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span>',
|
|
2522
|
+
e = x("div"), e.innerHTML = '<span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span> <span class="loading-dot svelte-1g6fj9a"></span>', u(e, "class", "sy-session-loading svelte-1g6fj9a");
|
|
2523
2523
|
},
|
|
2524
2524
|
m(n, s) {
|
|
2525
2525
|
W(n, e, s);
|
|
@@ -2530,10 +2530,10 @@ function Hs(t) {
|
|
|
2530
2530
|
};
|
|
2531
2531
|
}
|
|
2532
2532
|
function Bs(t) {
|
|
2533
|
-
let e, n, s, i, o, l, r,
|
|
2533
|
+
let e, n, s, i, o, l, r, c, a;
|
|
2534
2534
|
return {
|
|
2535
2535
|
c() {
|
|
2536
|
-
e = x("div"), n = x("div"), n.textContent = "确认删除此会话?", s = q(), i = x("div"), o = x("button"), o.textContent = "取消", l = q(), r = x("button"), r.textContent = "删除",
|
|
2536
|
+
e = x("div"), n = x("div"), n.textContent = "确认删除此会话?", s = q(), i = x("div"), o = x("button"), o.textContent = "取消", l = q(), r = x("button"), r.textContent = "删除", u(n, "class", "sy-session-confirm-content svelte-1g6fj9a"), u(o, "class", "sy-session-confirm-cancel svelte-1g6fj9a"), u(r, "class", "sy-session-confirm-delete svelte-1g6fj9a"), u(i, "class", "sy-session-confirm-actions svelte-1g6fj9a"), u(e, "class", "sy-session-confirm-popup svelte-1g6fj9a"), F(
|
|
2537
2537
|
e,
|
|
2538
2538
|
"left",
|
|
2539
2539
|
/*confirmPosition*/
|
|
@@ -2551,7 +2551,7 @@ function Bs(t) {
|
|
|
2551
2551
|
);
|
|
2552
2552
|
},
|
|
2553
2553
|
m(f, g) {
|
|
2554
|
-
W(f, e, g), b(e, n), b(e, s), b(e, i), b(i, o), b(i, l), b(i, r),
|
|
2554
|
+
W(f, e, g), b(e, n), b(e, s), b(e, i), b(i, o), b(i, l), b(i, r), c || (a = [
|
|
2555
2555
|
j(
|
|
2556
2556
|
o,
|
|
2557
2557
|
"click",
|
|
@@ -2564,7 +2564,7 @@ function Bs(t) {
|
|
|
2564
2564
|
/*handleConfirmDelete*/
|
|
2565
2565
|
t[14]
|
|
2566
2566
|
)
|
|
2567
|
-
],
|
|
2567
|
+
], c = !0);
|
|
2568
2568
|
},
|
|
2569
2569
|
p(f, g) {
|
|
2570
2570
|
g & /*confirmPosition*/
|
|
@@ -2588,40 +2588,40 @@ function Bs(t) {
|
|
|
2588
2588
|
);
|
|
2589
2589
|
},
|
|
2590
2590
|
d(f) {
|
|
2591
|
-
f && B(e),
|
|
2591
|
+
f && B(e), c = !1, Me(a);
|
|
2592
2592
|
}
|
|
2593
2593
|
};
|
|
2594
2594
|
}
|
|
2595
2595
|
function br(t) {
|
|
2596
|
-
let e, n, s, i, o, l, r,
|
|
2596
|
+
let e, n, s, i, o, l, r, c, a, f, g, m, h, d, w, T, E, y, S, _ = (
|
|
2597
2597
|
/*buttonTooltip*/
|
|
2598
2598
|
t[9] && Ns(t)
|
|
2599
2599
|
);
|
|
2600
|
-
function
|
|
2600
|
+
function M(I, V) {
|
|
2601
2601
|
return (
|
|
2602
2602
|
/*sessions*/
|
|
2603
2603
|
I[0].length === 0 ? wr : mr
|
|
2604
2604
|
);
|
|
2605
2605
|
}
|
|
2606
|
-
let R =
|
|
2606
|
+
let R = M(t), v = R(t), L = (
|
|
2607
2607
|
/*confirmDeleteId*/
|
|
2608
2608
|
t[7] && Bs(t)
|
|
2609
2609
|
);
|
|
2610
2610
|
return {
|
|
2611
2611
|
c() {
|
|
2612
|
-
e = x("div"), n = x("div"), s = x("h2"), s.textContent = "历史会话", i = q(), o = x("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 = q(), r = x("div"),
|
|
2612
|
+
e = x("div"), n = x("div"), s = x("h2"), s.textContent = "历史会话", i = q(), o = x("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 = q(), r = x("div"), c = x("input"), a = q(), f = Y("svg"), g = Y("circle"), m = Y("line"), h = q(), _ && _.c(), d = q(), w = x("div"), v.c(), T = q(), L && L.c(), E = Ft(), u(s, "class", "svelte-1g6fj9a"), u(o, "class", "sy-session-close svelte-1g6fj9a"), u(o, "aria-label", "关闭历史会话"), u(n, "class", "sy-session-header svelte-1g6fj9a"), u(c, "type", "text"), u(c, "class", "sy-session-search-input svelte-1g6fj9a"), u(c, "placeholder", "搜索历史会话..."), u(g, "cx", "11"), u(g, "cy", "11"), u(g, "r", "8"), u(m, "x1", "21"), u(m, "y1", "21"), u(m, "x2", "16.65"), u(m, "y2", "16.65"), u(f, "class", "sy-session-search-icon svelte-1g6fj9a"), u(f, "xmlns", "http://www.w3.org/2000/svg"), u(f, "width", "16"), u(f, "height", "16"), u(f, "viewBox", "0 0 24 24"), u(f, "fill", "none"), u(f, "stroke", "currentColor"), u(f, "stroke-width", "2"), u(f, "stroke-linecap", "round"), u(f, "stroke-linejoin", "round"), u(r, "class", "sy-session-search svelte-1g6fj9a"), u(w, "class", "sy-session-list svelte-1g6fj9a"), u(e, "class", "sy-session-history svelte-1g6fj9a"), F(
|
|
2613
2613
|
e,
|
|
2614
2614
|
"z-index",
|
|
2615
2615
|
/*zIndex*/
|
|
2616
2616
|
t[3] + 2
|
|
2617
2617
|
);
|
|
2618
2618
|
},
|
|
2619
|
-
m(I,
|
|
2620
|
-
W(I, e,
|
|
2621
|
-
|
|
2619
|
+
m(I, V) {
|
|
2620
|
+
W(I, e, V), b(e, n), b(n, s), b(n, i), b(n, o), b(e, l), b(e, r), b(r, c), kt(
|
|
2621
|
+
c,
|
|
2622
2622
|
/*searchQuery*/
|
|
2623
2623
|
t[4]
|
|
2624
|
-
), b(r, a), b(r, f), b(f, g), b(f, m), b(e, h), _ && _.m(e, null), b(e, d), b(e, w), v.m(w, null), W(I, T,
|
|
2624
|
+
), b(r, a), b(r, f), b(f, g), b(f, m), b(e, h), _ && _.m(e, null), b(e, d), b(e, w), v.m(w, null), W(I, T, V), L && L.m(I, V), W(I, E, V), y || (S = [
|
|
2625
2625
|
j(o, "click", function() {
|
|
2626
2626
|
Zn(
|
|
2627
2627
|
/*onClose*/
|
|
@@ -2641,7 +2641,7 @@ function br(t) {
|
|
|
2641
2641
|
t[12]
|
|
2642
2642
|
),
|
|
2643
2643
|
j(
|
|
2644
|
-
|
|
2644
|
+
c,
|
|
2645
2645
|
"input",
|
|
2646
2646
|
/*input_input_handler*/
|
|
2647
2647
|
t[17]
|
|
@@ -2654,27 +2654,27 @@ function br(t) {
|
|
|
2654
2654
|
)
|
|
2655
2655
|
], y = !0);
|
|
2656
2656
|
},
|
|
2657
|
-
p(I, [
|
|
2658
|
-
t = I,
|
|
2659
|
-
16 &&
|
|
2657
|
+
p(I, [V]) {
|
|
2658
|
+
t = I, V & /*searchQuery*/
|
|
2659
|
+
16 && c.value !== /*searchQuery*/
|
|
2660
2660
|
t[4] && kt(
|
|
2661
|
-
|
|
2661
|
+
c,
|
|
2662
2662
|
/*searchQuery*/
|
|
2663
2663
|
t[4]
|
|
2664
2664
|
), /*buttonTooltip*/
|
|
2665
|
-
t[9] ? _ ? _.p(t,
|
|
2665
|
+
t[9] ? _ ? _.p(t, V) : (_ = Ns(t), _.c(), _.m(e, d)) : _ && (_.d(1), _ = null), R === (R = M(t)) && v ? v.p(t, V) : (v.d(1), v = R(t), v && (v.c(), v.m(w, null))), V & /*zIndex*/
|
|
2666
2666
|
8 && F(
|
|
2667
2667
|
e,
|
|
2668
2668
|
"z-index",
|
|
2669
2669
|
/*zIndex*/
|
|
2670
2670
|
t[3] + 2
|
|
2671
2671
|
), /*confirmDeleteId*/
|
|
2672
|
-
t[7] ?
|
|
2672
|
+
t[7] ? L ? L.p(t, V) : (L = Bs(t), L.c(), L.m(E.parentNode, E)) : L && (L.d(1), L = null);
|
|
2673
2673
|
},
|
|
2674
2674
|
i: je,
|
|
2675
2675
|
o: je,
|
|
2676
2676
|
d(I) {
|
|
2677
|
-
I && (B(e), B(T), B(E)), _ && _.d(), v.d(),
|
|
2677
|
+
I && (B(e), B(T), B(E)), _ && _.d(), v.d(), L && L.d(I), y = !1, Me(S);
|
|
2678
2678
|
}
|
|
2679
2679
|
};
|
|
2680
2680
|
}
|
|
@@ -2683,11 +2683,11 @@ function Ws(t) {
|
|
|
2683
2683
|
return new Date(t).toLocaleString();
|
|
2684
2684
|
}
|
|
2685
2685
|
function kr(t, e, n) {
|
|
2686
|
-
let { sessions: s = [] } = e, { onClose: i } = e, { onSelect: o } = e, { zIndex: l } = e, { apiPrefix: r } = e,
|
|
2686
|
+
let { sessions: s = [] } = e, { onClose: i } = e, { onSelect: o } = e, { zIndex: l } = e, { apiPrefix: r } = e, c = !1, a = !0, f = 0, g = "", m = null, h = null, d = { x: 0, y: 0 };
|
|
2687
2687
|
function w() {
|
|
2688
2688
|
return Se(this, null, function* () {
|
|
2689
|
-
if (!(
|
|
2690
|
-
n(5,
|
|
2689
|
+
if (!(c || !a)) {
|
|
2690
|
+
n(5, c = !0);
|
|
2691
2691
|
try {
|
|
2692
2692
|
const D = yield fetch(`${r}/chat/record/session/list/query`, {
|
|
2693
2693
|
method: "POST",
|
|
@@ -2712,14 +2712,14 @@ function kr(t, e, n) {
|
|
|
2712
2712
|
} catch (D) {
|
|
2713
2713
|
console.error("Failed to load sessions:", D);
|
|
2714
2714
|
} finally {
|
|
2715
|
-
n(5,
|
|
2715
|
+
n(5, c = !1);
|
|
2716
2716
|
}
|
|
2717
2717
|
}
|
|
2718
2718
|
});
|
|
2719
2719
|
}
|
|
2720
2720
|
function T(D) {
|
|
2721
|
-
const G = D.target, { scrollTop: te, scrollHeight: ne, clientHeight:
|
|
2722
|
-
ne - te -
|
|
2721
|
+
const G = D.target, { scrollTop: te, scrollHeight: ne, clientHeight: K } = G;
|
|
2722
|
+
ne - te - K < 50 && w();
|
|
2723
2723
|
}
|
|
2724
2724
|
Yn(() => {
|
|
2725
2725
|
w();
|
|
@@ -2744,13 +2744,13 @@ function kr(t, e, n) {
|
|
|
2744
2744
|
y: ne.top + ne.height / 2
|
|
2745
2745
|
}), n(7, h = G);
|
|
2746
2746
|
}
|
|
2747
|
-
function
|
|
2747
|
+
function M(D) {
|
|
2748
2748
|
return Se(this, null, function* () {
|
|
2749
2749
|
if (D && !m)
|
|
2750
2750
|
try {
|
|
2751
2751
|
n(6, m = D), n(7, h = null);
|
|
2752
2752
|
const G = document.querySelector(`[data-session-id="${D}"]`);
|
|
2753
|
-
G && G.classList.add("deleting"), yield new Promise((
|
|
2753
|
+
G && G.classList.add("deleting"), yield new Promise((K) => setTimeout(K, 300));
|
|
2754
2754
|
const te = yield fetch(`${r}/chat/record/session/delete`, {
|
|
2755
2755
|
method: "POST",
|
|
2756
2756
|
headers: {
|
|
@@ -2764,11 +2764,11 @@ function kr(t, e, n) {
|
|
|
2764
2764
|
throw new Error("Delete request failed");
|
|
2765
2765
|
const ne = yield te.json();
|
|
2766
2766
|
if (ne.code === 0 && ne.data.respCode === 0)
|
|
2767
|
-
n(0, s = s.map((
|
|
2768
|
-
deleting:
|
|
2767
|
+
n(0, s = s.map((K) => ke(oe({}, K), {
|
|
2768
|
+
deleting: K.sessionId === D
|
|
2769
2769
|
}))), setTimeout(
|
|
2770
2770
|
() => {
|
|
2771
|
-
n(0, s = s.filter((
|
|
2771
|
+
n(0, s = s.filter((K) => !K.deleting));
|
|
2772
2772
|
},
|
|
2773
2773
|
300
|
|
2774
2774
|
);
|
|
@@ -2784,13 +2784,13 @@ function kr(t, e, n) {
|
|
|
2784
2784
|
});
|
|
2785
2785
|
}
|
|
2786
2786
|
function R() {
|
|
2787
|
-
h &&
|
|
2787
|
+
h && M(h);
|
|
2788
2788
|
}
|
|
2789
2789
|
const v = (D) => y(D, "关闭历史会话");
|
|
2790
|
-
function
|
|
2790
|
+
function L() {
|
|
2791
2791
|
g = this.value, n(4, g);
|
|
2792
2792
|
}
|
|
2793
|
-
const I = (D) => o(D.sessionId),
|
|
2793
|
+
const I = (D) => o(D.sessionId), V = (D, G) => _(G, D.sessionId), H = () => n(7, h = null);
|
|
2794
2794
|
return t.$$set = (D) => {
|
|
2795
2795
|
"sessions" in D && n(0, s = D.sessions), "onClose" in D && n(1, i = D.onClose), "onSelect" in D && n(2, o = D.onSelect), "zIndex" in D && n(3, l = D.zIndex), "apiPrefix" in D && n(15, r = D.apiPrefix);
|
|
2796
2796
|
}, t.$$.update = () => {
|
|
@@ -2802,7 +2802,7 @@ function kr(t, e, n) {
|
|
|
2802
2802
|
o,
|
|
2803
2803
|
l,
|
|
2804
2804
|
g,
|
|
2805
|
-
|
|
2805
|
+
c,
|
|
2806
2806
|
m,
|
|
2807
2807
|
h,
|
|
2808
2808
|
d,
|
|
@@ -2814,9 +2814,9 @@ function kr(t, e, n) {
|
|
|
2814
2814
|
R,
|
|
2815
2815
|
r,
|
|
2816
2816
|
v,
|
|
2817
|
-
|
|
2817
|
+
L,
|
|
2818
2818
|
I,
|
|
2819
|
-
|
|
2819
|
+
V,
|
|
2820
2820
|
H
|
|
2821
2821
|
];
|
|
2822
2822
|
}
|
|
@@ -2853,20 +2853,20 @@ function _r(t) {
|
|
|
2853
2853
|
l[91].id
|
|
2854
2854
|
);
|
|
2855
2855
|
for (let l = 0; l < i.length; l += 1) {
|
|
2856
|
-
let r = Us(t, i, l),
|
|
2857
|
-
s.set(
|
|
2856
|
+
let r = Us(t, i, l), c = o(r);
|
|
2857
|
+
s.set(c, n[l] = Js(c, r));
|
|
2858
2858
|
}
|
|
2859
2859
|
return {
|
|
2860
2860
|
c() {
|
|
2861
2861
|
e = x("div");
|
|
2862
2862
|
for (let l = 0; l < n.length; l += 1)
|
|
2863
2863
|
n[l].c();
|
|
2864
|
-
|
|
2864
|
+
u(e, "class", "sy-assistant-message-list svelte-1r23oau");
|
|
2865
2865
|
},
|
|
2866
2866
|
m(l, r) {
|
|
2867
2867
|
W(l, e, r);
|
|
2868
|
-
for (let
|
|
2869
|
-
n[
|
|
2868
|
+
for (let c = 0; c < n.length; c += 1)
|
|
2869
|
+
n[c] && n[c].m(e, null);
|
|
2870
2870
|
t[67](e);
|
|
2871
2871
|
},
|
|
2872
2872
|
p(l, r) {
|
|
@@ -2948,7 +2948,7 @@ function Tr(t) {
|
|
|
2948
2948
|
) + "";
|
|
2949
2949
|
return {
|
|
2950
2950
|
c() {
|
|
2951
|
-
e = x("div"),
|
|
2951
|
+
e = x("div"), u(e, "class", "sy-assistant-avatar user svelte-1r23oau"), z(
|
|
2952
2952
|
e,
|
|
2953
2953
|
"screen-theme",
|
|
2954
2954
|
/*theme*/
|
|
@@ -2989,7 +2989,7 @@ function vr(t) {
|
|
|
2989
2989
|
) + "";
|
|
2990
2990
|
return {
|
|
2991
2991
|
c() {
|
|
2992
|
-
e = x("div"),
|
|
2992
|
+
e = x("div"), u(e, "class", "sy-assistant-avatar assistant svelte-1r23oau"), z(
|
|
2993
2993
|
e,
|
|
2994
2994
|
"screen-theme",
|
|
2995
2995
|
/*theme*/
|
|
@@ -3030,7 +3030,7 @@ function Sr(t) {
|
|
|
3030
3030
|
);
|
|
3031
3031
|
return {
|
|
3032
3032
|
c() {
|
|
3033
|
-
e = x("div"),
|
|
3033
|
+
e = x("div"), u(e, "class", "markdown-content svelte-1r23oau");
|
|
3034
3034
|
},
|
|
3035
3035
|
m(s, i) {
|
|
3036
3036
|
W(s, e, i), e.innerHTML = n;
|
|
@@ -3052,7 +3052,7 @@ function Er(t) {
|
|
|
3052
3052
|
let e;
|
|
3053
3053
|
return {
|
|
3054
3054
|
c() {
|
|
3055
|
-
e = x("span"), e.innerHTML = '<span class="dot svelte-1r23oau">.</span> <span class="dot svelte-1r23oau">.</span> <span class="dot svelte-1r23oau">.</span>',
|
|
3055
|
+
e = x("span"), e.innerHTML = '<span class="dot svelte-1r23oau">.</span> <span class="dot svelte-1r23oau">.</span> <span class="dot svelte-1r23oau">.</span>', u(e, "class", "sy-assistant-loading svelte-1r23oau");
|
|
3056
3056
|
},
|
|
3057
3057
|
m(n, s) {
|
|
3058
3058
|
W(n, e, s);
|
|
@@ -3075,7 +3075,7 @@ function Gs(t) {
|
|
|
3075
3075
|
e = x("div");
|
|
3076
3076
|
for (let i = 0; i < s.length; i += 1)
|
|
3077
3077
|
s[i].c();
|
|
3078
|
-
|
|
3078
|
+
u(e, "class", "sy-assistant-attachments svelte-1r23oau");
|
|
3079
3079
|
},
|
|
3080
3080
|
m(i, o) {
|
|
3081
3081
|
W(i, e, o);
|
|
@@ -3119,7 +3119,7 @@ function Zs(t) {
|
|
|
3119
3119
|
}
|
|
3120
3120
|
return {
|
|
3121
3121
|
c() {
|
|
3122
|
-
e = x("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-1r23oau"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
|
|
3122
|
+
e = x("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-1r23oau"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>', u(e, "class", "sy-assistant-attachment-toggle svelte-1r23oau"), u(e, "aria-label", "查看详情");
|
|
3123
3123
|
},
|
|
3124
3124
|
m(o, l) {
|
|
3125
3125
|
W(o, e, l), n || (s = [
|
|
@@ -3136,7 +3136,7 @@ function Zs(t) {
|
|
|
3136
3136
|
t = o;
|
|
3137
3137
|
},
|
|
3138
3138
|
d(o) {
|
|
3139
|
-
o && B(e), n = !1,
|
|
3139
|
+
o && B(e), n = !1, Me(s);
|
|
3140
3140
|
}
|
|
3141
3141
|
};
|
|
3142
3142
|
}
|
|
@@ -3147,7 +3147,7 @@ function Ys(t) {
|
|
|
3147
3147
|
), s, i;
|
|
3148
3148
|
return {
|
|
3149
3149
|
c() {
|
|
3150
|
-
e = x("div"),
|
|
3150
|
+
e = x("div"), u(e, "class", "sy-assistant-tooltip svelte-1r23oau"), u(e, "role", "tooltip"), F(
|
|
3151
3151
|
e,
|
|
3152
3152
|
"left",
|
|
3153
3153
|
/*tooltipPosition*/
|
|
@@ -3215,22 +3215,22 @@ function Ys(t) {
|
|
|
3215
3215
|
);
|
|
3216
3216
|
},
|
|
3217
3217
|
d(o) {
|
|
3218
|
-
o && B(e), s = !1,
|
|
3218
|
+
o && B(e), s = !1, Me(i);
|
|
3219
3219
|
}
|
|
3220
3220
|
};
|
|
3221
3221
|
}
|
|
3222
3222
|
function Xs(t) {
|
|
3223
|
-
let e, n, s, i, o, l, r,
|
|
3223
|
+
let e, n, s, i, o, l, r, c, a, f = an(
|
|
3224
3224
|
/*attachment*/
|
|
3225
3225
|
t[94].content_title
|
|
3226
3226
|
).name + "", g, m, h, d = an(
|
|
3227
3227
|
/*attachment*/
|
|
3228
3228
|
t[94].content_title
|
|
3229
|
-
).ext + "", w, T, E, y, S, _,
|
|
3229
|
+
).ext + "", w, T, E, y, S, _, M, R, v, L, I = (
|
|
3230
3230
|
/*attachment*/
|
|
3231
3231
|
t[94].tips && Zs(t)
|
|
3232
3232
|
);
|
|
3233
|
-
function
|
|
3233
|
+
function V() {
|
|
3234
3234
|
return (
|
|
3235
3235
|
/*click_handler*/
|
|
3236
3236
|
t[55](
|
|
@@ -3245,11 +3245,11 @@ function Xs(t) {
|
|
|
3245
3245
|
);
|
|
3246
3246
|
return {
|
|
3247
3247
|
c() {
|
|
3248
|
-
e = x("div"), n = x("div"), s = x("div"), i = Y("svg"), o = Y("path"), l = Y("polyline"), r = q(),
|
|
3249
|
-
t[94].content_title),
|
|
3248
|
+
e = x("div"), n = x("div"), s = x("div"), i = Y("svg"), o = Y("path"), l = Y("polyline"), r = q(), c = x("div"), a = x("span"), g = De(f), m = q(), h = x("span"), w = De(d), E = q(), y = x("div"), I && I.c(), S = q(), _ = x("button"), _.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-1r23oau"><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>', M = q(), H && H.c(), R = q(), u(o, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), u(l, "points", "13 2 13 9 20 9"), u(i, "xmlns", "http://www.w3.org/2000/svg"), u(i, "width", "16"), u(i, "height", "16"), u(i, "viewBox", "0 0 24 24"), u(i, "fill", "none"), u(i, "stroke", "currentColor"), u(i, "stroke-width", "2"), u(i, "stroke-linecap", "round"), u(i, "stroke-linejoin", "round"), u(a, "class", "sy-assistant-filename svelte-1r23oau"), u(h, "class", "sy-assistant-attachment-ext svelte-1r23oau"), u(c, "class", "sy-assistant-attachment-name svelte-1r23oau"), u(c, "title", T = /*attachment*/
|
|
3249
|
+
t[94].content_title), u(s, "class", "sy-assistant-attachment-title svelte-1r23oau"), u(_, "class", "sy-assistant-attachment-toggle svelte-1r23oau"), u(_, "aria-label", "下载文件"), u(y, "class", "sy-assistant-attachment-actions svelte-1r23oau"), u(n, "class", "sy-assistant-attachment-header svelte-1r23oau"), u(e, "class", "sy-assistant-attachment svelte-1r23oau");
|
|
3250
3250
|
},
|
|
3251
3251
|
m(D, G) {
|
|
3252
|
-
W(D, e, G), b(e, n), b(n, s), b(s, i), b(i, o), b(i, l), b(s, r), b(s,
|
|
3252
|
+
W(D, e, G), b(e, n), b(n, s), b(s, i), b(i, o), b(i, l), b(s, r), b(s, c), b(c, a), b(a, g), b(c, m), b(c, h), b(h, w), b(n, E), b(n, y), I && I.m(y, null), b(y, S), b(y, _), b(e, M), H && H.m(e, null), b(e, R), v || (L = j(_, "click", V), v = !0);
|
|
3253
3253
|
},
|
|
3254
3254
|
p(D, G) {
|
|
3255
3255
|
t = D, G[0] & /*messages*/
|
|
@@ -3262,17 +3262,17 @@ function Xs(t) {
|
|
|
3262
3262
|
t[94].content_title
|
|
3263
3263
|
).ext + "") && Xe(w, d), G[0] & /*messages*/
|
|
3264
3264
|
8192 && T !== (T = /*attachment*/
|
|
3265
|
-
t[94].content_title) && c
|
|
3265
|
+
t[94].content_title) && u(c, "title", T), /*attachment*/
|
|
3266
3266
|
t[94].tips ? I ? I.p(t, G) : (I = Zs(t), I.c(), I.m(y, S)) : I && (I.d(1), I = null), /*tooltipContent*/
|
|
3267
3267
|
t[14] ? H ? H.p(t, G) : (H = Ys(t), H.c(), H.m(e, R)) : H && (H.d(1), H = null);
|
|
3268
3268
|
},
|
|
3269
3269
|
d(D) {
|
|
3270
|
-
D && B(e), I && I.d(), H && H.d(), v = !1,
|
|
3270
|
+
D && B(e), I && I.d(), H && H.d(), v = !1, L();
|
|
3271
3271
|
}
|
|
3272
3272
|
};
|
|
3273
3273
|
}
|
|
3274
3274
|
function Vs(t) {
|
|
3275
|
-
let e, n, s, i, o, l, r,
|
|
3275
|
+
let e, n, s, i, o, l, r, c, a, f, g;
|
|
3276
3276
|
function m(R, v) {
|
|
3277
3277
|
return (
|
|
3278
3278
|
/*copyStatus*/
|
|
@@ -3341,7 +3341,7 @@ function Vs(t) {
|
|
|
3341
3341
|
)
|
|
3342
3342
|
);
|
|
3343
3343
|
}
|
|
3344
|
-
let
|
|
3344
|
+
let M = (
|
|
3345
3345
|
/*showDislikeFeedback*/
|
|
3346
3346
|
t[26] && /*feedbackStatus*/
|
|
3347
3347
|
t[24][
|
|
@@ -3351,7 +3351,7 @@ function Vs(t) {
|
|
|
3351
3351
|
);
|
|
3352
3352
|
return {
|
|
3353
3353
|
c() {
|
|
3354
|
-
e = x("div"), n = x("button"), d.c(), i = q(), o = x("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 = q(), r = x("button"), r.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>',
|
|
3354
|
+
e = x("div"), n = x("button"), d.c(), i = q(), o = x("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 = q(), r = x("button"), r.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 = q(), M && M.c(), a = Ft(), u(n, "class", "sy-assistant-action-button svelte-1r23oau"), u(n, "aria-label", s = /*copyStatus*/
|
|
3355
3355
|
t[23][
|
|
3356
3356
|
/*msg*/
|
|
3357
3357
|
t[91].id
|
|
@@ -3363,7 +3363,7 @@ function Vs(t) {
|
|
|
3363
3363
|
/*msg*/
|
|
3364
3364
|
t[91].id
|
|
3365
3365
|
]
|
|
3366
|
-
),
|
|
3366
|
+
), u(o, "class", "sy-assistant-action-button svelte-1r23oau"), u(o, "aria-label", "点赞"), z(
|
|
3367
3367
|
o,
|
|
3368
3368
|
"active",
|
|
3369
3369
|
/*feedbackStatus*/
|
|
@@ -3371,7 +3371,7 @@ function Vs(t) {
|
|
|
3371
3371
|
/*msg*/
|
|
3372
3372
|
t[91].id
|
|
3373
3373
|
] === "like"
|
|
3374
|
-
),
|
|
3374
|
+
), u(r, "class", "sy-assistant-action-button svelte-1r23oau"), u(r, "aria-label", "点踩"), z(
|
|
3375
3375
|
r,
|
|
3376
3376
|
"active",
|
|
3377
3377
|
/*feedbackStatus*/
|
|
@@ -3379,10 +3379,10 @@ function Vs(t) {
|
|
|
3379
3379
|
/*msg*/
|
|
3380
3380
|
t[91].id
|
|
3381
3381
|
] === "dislike"
|
|
3382
|
-
),
|
|
3382
|
+
), u(e, "class", "sy-assistant-message-actions svelte-1r23oau");
|
|
3383
3383
|
},
|
|
3384
3384
|
m(R, v) {
|
|
3385
|
-
W(R, e, v), b(e, n), d.m(n, null), b(e, i), b(e, o), b(e, l), b(e, r), W(R,
|
|
3385
|
+
W(R, e, v), b(e, n), d.m(n, null), b(e, i), b(e, o), b(e, l), b(e, r), W(R, c, v), M && M.m(R, v), W(R, a, v), f || (g = [
|
|
3386
3386
|
j(n, "click", w),
|
|
3387
3387
|
j(n, "mouseenter", T),
|
|
3388
3388
|
j(
|
|
@@ -3415,7 +3415,7 @@ function Vs(t) {
|
|
|
3415
3415
|
t[23][
|
|
3416
3416
|
/*msg*/
|
|
3417
3417
|
t[91].id
|
|
3418
|
-
] ? "已复制" : "复制内容") &&
|
|
3418
|
+
] ? "已复制" : "复制内容") && u(n, "aria-label", s), v[0] & /*copyStatus, messages*/
|
|
3419
3419
|
8396800 && z(
|
|
3420
3420
|
n,
|
|
3421
3421
|
"copied",
|
|
@@ -3447,10 +3447,10 @@ function Vs(t) {
|
|
|
3447
3447
|
t[24][
|
|
3448
3448
|
/*msg*/
|
|
3449
3449
|
t[91].id
|
|
3450
|
-
] === "dislike" ?
|
|
3450
|
+
] === "dislike" ? M ? M.p(t, v) : (M = Qs(t), M.c(), M.m(a.parentNode, a)) : M && (M.d(1), M = null);
|
|
3451
3451
|
},
|
|
3452
3452
|
d(R) {
|
|
3453
|
-
R && (B(e), B(
|
|
3453
|
+
R && (B(e), B(c), B(a)), d.d(), M && M.d(R), f = !1, Me(g);
|
|
3454
3454
|
}
|
|
3455
3455
|
};
|
|
3456
3456
|
}
|
|
@@ -3458,7 +3458,7 @@ function Ar(t) {
|
|
|
3458
3458
|
let e, n, s;
|
|
3459
3459
|
return {
|
|
3460
3460
|
c() {
|
|
3461
|
-
e = Y("svg"), n = Y("rect"), s = Y("path"),
|
|
3461
|
+
e = Y("svg"), n = Y("rect"), s = Y("path"), u(n, "x", "9"), u(n, "y", "9"), u(n, "width", "13"), u(n, "height", "13"), u(n, "rx", "2"), u(n, "ry", "2"), u(s, "d", "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"), u(e, "xmlns", "http://www.w3.org/2000/svg"), u(e, "width", "14"), u(e, "height", "14"), u(e, "viewBox", "0 0 24 24"), u(e, "fill", "none"), u(e, "stroke", "currentColor"), u(e, "stroke-width", "2"), u(e, "stroke-linecap", "round"), u(e, "stroke-linejoin", "round");
|
|
3462
3462
|
},
|
|
3463
3463
|
m(i, o) {
|
|
3464
3464
|
W(i, e, o), b(e, n), b(e, s);
|
|
@@ -3472,7 +3472,7 @@ function xr(t) {
|
|
|
3472
3472
|
let e, n;
|
|
3473
3473
|
return {
|
|
3474
3474
|
c() {
|
|
3475
|
-
e = Y("svg"), n = Y("polyline"),
|
|
3475
|
+
e = Y("svg"), n = Y("polyline"), u(n, "points", "20 6 9 17 4 12"), u(e, "xmlns", "http://www.w3.org/2000/svg"), u(e, "width", "14"), u(e, "height", "14"), u(e, "viewBox", "0 0 24 24"), u(e, "fill", "none"), u(e, "stroke", "currentColor"), u(e, "stroke-width", "2"), u(e, "stroke-linecap", "round"), u(e, "stroke-linejoin", "round");
|
|
3476
3476
|
},
|
|
3477
3477
|
m(s, i) {
|
|
3478
3478
|
W(s, e, i), b(e, n);
|
|
@@ -3483,7 +3483,7 @@ function xr(t) {
|
|
|
3483
3483
|
};
|
|
3484
3484
|
}
|
|
3485
3485
|
function Qs(t) {
|
|
3486
|
-
let e, n, s, i, o, l, r,
|
|
3486
|
+
let e, n, s, i, o, l, r, c, a, f, g;
|
|
3487
3487
|
function m() {
|
|
3488
3488
|
t[64].call(
|
|
3489
3489
|
i,
|
|
@@ -3511,7 +3511,7 @@ function Qs(t) {
|
|
|
3511
3511
|
}
|
|
3512
3512
|
return {
|
|
3513
3513
|
c() {
|
|
3514
|
-
e = x("div"), n = x("div"), n.textContent = "反馈意见", s = q(), i = x("textarea"), o = q(), l = x("div"), r = x("button"), r.textContent = "取消",
|
|
3514
|
+
e = x("div"), n = x("div"), n.textContent = "反馈意见", s = q(), i = x("textarea"), o = q(), l = x("div"), r = x("button"), r.textContent = "取消", c = q(), a = x("button"), a.textContent = "提交", u(n, "class", "sy-assistant-dislike-title svelte-1r23oau"), u(i, "class", "sy-assistant-dislike-input svelte-1r23oau"), u(i, "placeholder", "请输入您的反馈意见..."), u(r, "class", "sy-assistant-popup-cancel svelte-1r23oau"), u(a, "class", "sy-assistant-popup-submit svelte-1r23oau"), u(l, "class", "sy-assistant-popup-actions svelte-1r23oau"), u(e, "class", "sy-assistant-dislike-popup svelte-1r23oau"), F(
|
|
3515
3515
|
e,
|
|
3516
3516
|
"left",
|
|
3517
3517
|
/*dislikeFeedbackPosition*/
|
|
@@ -3536,7 +3536,7 @@ function Qs(t) {
|
|
|
3536
3536
|
/*msg*/
|
|
3537
3537
|
t[91].id
|
|
3538
3538
|
]
|
|
3539
|
-
), b(e, o), b(e, l), b(l, r), b(l,
|
|
3539
|
+
), b(e, o), b(e, l), b(l, r), b(l, c), b(l, a), f || (g = [
|
|
3540
3540
|
j(i, "input", m),
|
|
3541
3541
|
j(r, "click", h),
|
|
3542
3542
|
j(a, "click", d)
|
|
@@ -3572,33 +3572,33 @@ function Qs(t) {
|
|
|
3572
3572
|
);
|
|
3573
3573
|
},
|
|
3574
3574
|
d(w) {
|
|
3575
|
-
w && B(e), f = !1,
|
|
3575
|
+
w && B(e), f = !1, Me(g);
|
|
3576
3576
|
}
|
|
3577
3577
|
};
|
|
3578
3578
|
}
|
|
3579
3579
|
function Js(t, e) {
|
|
3580
|
-
let n, s, i, o, l, r,
|
|
3580
|
+
let n, s, i, o, l, r, c, a, f = new Date(
|
|
3581
3581
|
/*msg*/
|
|
3582
3582
|
e[91].timestamp
|
|
3583
3583
|
).toLocaleString() + "", g, m;
|
|
3584
|
-
function h(
|
|
3584
|
+
function h(M, R) {
|
|
3585
3585
|
return (
|
|
3586
3586
|
/*msg*/
|
|
3587
|
-
|
|
3587
|
+
M[91].type === "assistant" ? vr : Tr
|
|
3588
3588
|
);
|
|
3589
3589
|
}
|
|
3590
3590
|
let d = h(e), w = d(e);
|
|
3591
|
-
function T(
|
|
3591
|
+
function T(M, R) {
|
|
3592
3592
|
return (
|
|
3593
3593
|
/*isLoading*/
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3594
|
+
M[17] && /*msg*/
|
|
3595
|
+
M[91].id === /*messages*/
|
|
3596
|
+
M[13][
|
|
3597
3597
|
/*messages*/
|
|
3598
|
-
|
|
3598
|
+
M[13].length - 1
|
|
3599
3599
|
].id && /*msg*/
|
|
3600
|
-
|
|
3601
|
-
|
|
3600
|
+
M[91].type === "assistant" && !/*msg*/
|
|
3601
|
+
M[91].content ? Er : Sr
|
|
3602
3602
|
);
|
|
3603
3603
|
}
|
|
3604
3604
|
let E = T(e), y = E(e), S = (
|
|
@@ -3615,17 +3615,17 @@ function Js(t, e) {
|
|
|
3615
3615
|
key: t,
|
|
3616
3616
|
first: null,
|
|
3617
3617
|
c() {
|
|
3618
|
-
n = x("div"), w.c(), s = q(), i = x("div"), o = x("div"), y.c(), l = q(), S && S.c(), r = q(), _ && _.c(),
|
|
3618
|
+
n = x("div"), w.c(), s = q(), i = x("div"), o = x("div"), y.c(), l = q(), S && S.c(), r = q(), _ && _.c(), c = q(), a = x("div"), g = De(f), m = q(), u(o, "class", "sy-assistant-message-content svelte-1r23oau"), z(
|
|
3619
3619
|
o,
|
|
3620
3620
|
"screen-theme",
|
|
3621
3621
|
/*theme*/
|
|
3622
3622
|
e[3] === "screen"
|
|
3623
|
-
),
|
|
3623
|
+
), u(a, "class", "sy-assistant-message-time svelte-1r23oau"), u(i, "class", "sy-assistant-message-bubble svelte-1r23oau"), z(
|
|
3624
3624
|
i,
|
|
3625
3625
|
"screen-theme",
|
|
3626
3626
|
/*theme*/
|
|
3627
3627
|
e[3] === "screen"
|
|
3628
|
-
),
|
|
3628
|
+
), u(n, "class", "sy-assistant-message svelte-1r23oau"), z(
|
|
3629
3629
|
n,
|
|
3630
3630
|
"user",
|
|
3631
3631
|
/*msg*/
|
|
@@ -3637,11 +3637,11 @@ function Js(t, e) {
|
|
|
3637
3637
|
e[3] === "screen"
|
|
3638
3638
|
), this.first = n;
|
|
3639
3639
|
},
|
|
3640
|
-
m(
|
|
3641
|
-
W(
|
|
3640
|
+
m(M, R) {
|
|
3641
|
+
W(M, n, R), w.m(n, null), b(n, s), b(n, i), b(i, o), y.m(o, null), b(o, l), S && S.m(o, null), b(o, r), _ && _.m(o, null), b(i, c), b(i, a), b(a, g), b(n, m);
|
|
3642
3642
|
},
|
|
3643
|
-
p(
|
|
3644
|
-
e =
|
|
3643
|
+
p(M, R) {
|
|
3644
|
+
e = M, d === (d = h(e)) && w ? w.p(e, R) : (w.d(1), w = d(e), w && (w.c(), w.m(n, s))), E === (E = T(e)) && y ? y.p(e, R) : (y.d(1), y = E(e), y && (y.c(), y.m(o, l))), /*msg*/
|
|
3645
3645
|
e[91].attachments ? S ? S.p(e, R) : (S = Gs(e), S.c(), S.m(o, r)) : S && (S.d(1), S = null), /*msg*/
|
|
3646
3646
|
e[91].id !== "-1" && /*msg*/
|
|
3647
3647
|
e[91].type === "assistant" && !/*isLoading*/
|
|
@@ -3676,13 +3676,13 @@ function Js(t, e) {
|
|
|
3676
3676
|
e[3] === "screen"
|
|
3677
3677
|
);
|
|
3678
3678
|
},
|
|
3679
|
-
d(
|
|
3680
|
-
|
|
3679
|
+
d(M) {
|
|
3680
|
+
M && B(n), w.d(), y.d(), S && S.d(), _ && _.d();
|
|
3681
3681
|
}
|
|
3682
3682
|
};
|
|
3683
3683
|
}
|
|
3684
3684
|
function Ks(t) {
|
|
3685
|
-
let e, n, s, i, o, l, r,
|
|
3685
|
+
let e, n, s, i, o, l, r, c, a, f, g, m, h, d = Nt(
|
|
3686
3686
|
/*sendIcon*/
|
|
3687
3687
|
t[6],
|
|
3688
3688
|
'<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="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>'
|
|
@@ -3692,18 +3692,18 @@ function Ks(t) {
|
|
|
3692
3692
|
);
|
|
3693
3693
|
return {
|
|
3694
3694
|
c() {
|
|
3695
|
-
y && y.c(), e = q(), n = x("div"), s = x("div"), i = x("div"), o = x("textarea"), l = q(), r = x("div"),
|
|
3695
|
+
y && y.c(), e = q(), n = x("div"), s = x("div"), i = x("div"), o = x("textarea"), l = q(), r = x("div"), c = x("div"), a = De(
|
|
3696
3696
|
/*messageLength*/
|
|
3697
3697
|
t[12]
|
|
3698
3698
|
), f = De("/"), g = De(
|
|
3699
3699
|
/*maxLength*/
|
|
3700
3700
|
t[11]
|
|
3701
|
-
), m = q(), h = x("button"),
|
|
3701
|
+
), m = q(), h = x("button"), u(o, "class", "sy-assistant-textarea svelte-1r23oau"), u(o, "placeholder", "输入您的问题..."), u(
|
|
3702
3702
|
o,
|
|
3703
3703
|
"maxlength",
|
|
3704
3704
|
/*maxLength*/
|
|
3705
3705
|
t[11]
|
|
3706
|
-
),
|
|
3706
|
+
), u(o, "rows", "3"), z(
|
|
3707
3707
|
o,
|
|
3708
3708
|
"screen-theme",
|
|
3709
3709
|
/*theme*/
|
|
@@ -3714,19 +3714,19 @@ function Ks(t) {
|
|
|
3714
3714
|
/*autoExpandTextarea*/
|
|
3715
3715
|
t[9] && /*isFocused*/
|
|
3716
3716
|
t[19]
|
|
3717
|
-
),
|
|
3718
|
-
|
|
3717
|
+
), u(i, "class", "sy-assistant-textarea-container svelte-1r23oau"), u(c, "class", "sy-assistant-char-count svelte-1r23oau"), z(
|
|
3718
|
+
c,
|
|
3719
3719
|
"over-limit",
|
|
3720
3720
|
/*isOverLimit*/
|
|
3721
3721
|
t[30]
|
|
3722
|
-
),
|
|
3722
|
+
), u(h, "class", "sy-assistant-send-button svelte-1r23oau"), h.disabled = w = !/*message*/
|
|
3723
3723
|
t[10].trim() || /*isOverLimit*/
|
|
3724
|
-
t[30],
|
|
3724
|
+
t[30], u(h, "aria-label", "发送消息"), u(r, "class", "sy-assistant-operation-area svelte-1r23oau"), u(s, "class", "sy-assistant-input-container svelte-1r23oau"), z(
|
|
3725
3725
|
s,
|
|
3726
3726
|
"screen-theme",
|
|
3727
3727
|
/*theme*/
|
|
3728
3728
|
t[3] === "screen"
|
|
3729
|
-
),
|
|
3729
|
+
), u(n, "class", "sy-assistant-input-area svelte-1r23oau"), z(
|
|
3730
3730
|
n,
|
|
3731
3731
|
"screen-theme",
|
|
3732
3732
|
/*theme*/
|
|
@@ -3738,7 +3738,7 @@ function Ks(t) {
|
|
|
3738
3738
|
o,
|
|
3739
3739
|
/*message*/
|
|
3740
3740
|
t[10]
|
|
3741
|
-
), b(s, l), b(s, r), b(r,
|
|
3741
|
+
), b(s, l), b(s, r), b(r, c), b(c, a), b(c, f), b(c, g), b(r, m), b(r, h), h.innerHTML = d, T || (E = [
|
|
3742
3742
|
j(
|
|
3743
3743
|
o,
|
|
3744
3744
|
"input",
|
|
@@ -3792,7 +3792,7 @@ function Ks(t) {
|
|
|
3792
3792
|
p(S, _) {
|
|
3793
3793
|
/*showActions*/
|
|
3794
3794
|
S[5] ? y ? y.p(S, _) : (y = $s(S), y.c(), y.m(e.parentNode, e)) : y && (y.d(1), y = null), _[0] & /*maxLength*/
|
|
3795
|
-
2048 &&
|
|
3795
|
+
2048 && u(
|
|
3796
3796
|
o,
|
|
3797
3797
|
"maxlength",
|
|
3798
3798
|
/*maxLength*/
|
|
@@ -3827,7 +3827,7 @@ function Ks(t) {
|
|
|
3827
3827
|
S[11]
|
|
3828
3828
|
), _[0] & /*isOverLimit*/
|
|
3829
3829
|
1073741824 && z(
|
|
3830
|
-
|
|
3830
|
+
c,
|
|
3831
3831
|
"over-limit",
|
|
3832
3832
|
/*isOverLimit*/
|
|
3833
3833
|
S[30]
|
|
@@ -3854,12 +3854,12 @@ function Ks(t) {
|
|
|
3854
3854
|
);
|
|
3855
3855
|
},
|
|
3856
3856
|
d(S) {
|
|
3857
|
-
S && (B(e), B(n)), y && y.d(S), t[71](null), T = !1,
|
|
3857
|
+
S && (B(e), B(n)), y && y.d(S), t[71](null), T = !1, Me(E);
|
|
3858
3858
|
}
|
|
3859
3859
|
};
|
|
3860
3860
|
}
|
|
3861
3861
|
function $s(t) {
|
|
3862
|
-
let e, n, s, i, o, l, r,
|
|
3862
|
+
let e, n, s, i, o, l, r, c, a, f = (
|
|
3863
3863
|
/*hasScene*/
|
|
3864
3864
|
t[1] && ei(t)
|
|
3865
3865
|
), g = !/*hasScene*/
|
|
@@ -3869,10 +3869,10 @@ function $s(t) {
|
|
|
3869
3869
|
);
|
|
3870
3870
|
return {
|
|
3871
3871
|
c() {
|
|
3872
|
-
e = x("div"), n = x("div"), f && f.c(), s = q(), g && g.c(), i = q(), o = x("div"), m && m.c(), l = q(), r = x("button"), r.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>',
|
|
3872
|
+
e = x("div"), n = x("div"), f && f.c(), s = q(), g && g.c(), i = q(), o = x("div"), m && m.c(), l = q(), r = x("button"), r.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>', u(r, "class", "sy-assistant-icon-button svelte-1r23oau"), u(r, "aria-label", "新建会话"), u(o, "class", "sy-assistant-chat-actions-btns svelte-1r23oau"), u(n, "class", "sy-assistant-chat-actions svelte-1r23oau"), u(e, "class", "sy-assistant-chat-footer svelte-1r23oau");
|
|
3873
3873
|
},
|
|
3874
3874
|
m(h, d) {
|
|
3875
|
-
W(h, e, d), b(e, n), f && f.m(n, null), b(n, s), g && g.m(n, null), b(n, i), b(n, o), m && m.m(o, null), b(o, l), b(o, r),
|
|
3875
|
+
W(h, e, d), b(e, n), f && f.m(n, null), b(n, s), g && g.m(n, null), b(n, i), b(n, o), m && m.m(o, null), b(o, l), b(o, r), c || (a = [
|
|
3876
3876
|
j(
|
|
3877
3877
|
r,
|
|
3878
3878
|
"click",
|
|
@@ -3891,7 +3891,7 @@ function $s(t) {
|
|
|
3891
3891
|
/*hideButtonTooltip*/
|
|
3892
3892
|
t[44]
|
|
3893
3893
|
)
|
|
3894
|
-
],
|
|
3894
|
+
], c = !0);
|
|
3895
3895
|
},
|
|
3896
3896
|
p(h, d) {
|
|
3897
3897
|
/*hasScene*/
|
|
@@ -3900,7 +3900,7 @@ function $s(t) {
|
|
|
3900
3900
|
h[4] !== !1 ? m ? m.p(h, d) : (m = si(h), m.c(), m.m(o, l)) : m && (m.d(1), m = null);
|
|
3901
3901
|
},
|
|
3902
3902
|
d(h) {
|
|
3903
|
-
h && B(e), f && f.d(), g && g.d(), m && m.d(),
|
|
3903
|
+
h && B(e), f && f.d(), g && g.d(), m && m.d(), c = !1, Me(a);
|
|
3904
3904
|
}
|
|
3905
3905
|
};
|
|
3906
3906
|
}
|
|
@@ -3916,14 +3916,14 @@ function ei(t) {
|
|
|
3916
3916
|
e = x("div"), n = x("select");
|
|
3917
3917
|
for (let r = 0; r < l.length; r += 1)
|
|
3918
3918
|
l[r].c();
|
|
3919
|
-
|
|
3919
|
+
u(n, "class", "sy-assistant-select svelte-1r23oau"), /*selectedScene*/
|
|
3920
3920
|
t[22] === void 0 && hn(() => (
|
|
3921
3921
|
/*select_change_handler*/
|
|
3922
3922
|
t[68].call(n)
|
|
3923
|
-
)),
|
|
3923
|
+
)), u(e, "class", "sy-assistant-scene-select svelte-1r23oau");
|
|
3924
3924
|
},
|
|
3925
|
-
m(r,
|
|
3926
|
-
W(r, e,
|
|
3925
|
+
m(r, c) {
|
|
3926
|
+
W(r, e, c), b(e, n);
|
|
3927
3927
|
for (let a = 0; a < l.length; a += 1)
|
|
3928
3928
|
l[a] && l[a].m(n, null);
|
|
3929
3929
|
gs(
|
|
@@ -3938,8 +3938,8 @@ function ei(t) {
|
|
|
3938
3938
|
t[68]
|
|
3939
3939
|
), s = !0);
|
|
3940
3940
|
},
|
|
3941
|
-
p(r,
|
|
3942
|
-
if (
|
|
3941
|
+
p(r, c) {
|
|
3942
|
+
if (c[0] & /*scenes*/
|
|
3943
3943
|
2097152) {
|
|
3944
3944
|
o = _t(
|
|
3945
3945
|
/*scenes*/
|
|
@@ -3948,13 +3948,13 @@ function ei(t) {
|
|
|
3948
3948
|
let a;
|
|
3949
3949
|
for (a = 0; a < o.length; a += 1) {
|
|
3950
3950
|
const f = js(r, o, a);
|
|
3951
|
-
l[a] ? l[a].p(f,
|
|
3951
|
+
l[a] ? l[a].p(f, c) : (l[a] = ti(f), l[a].c(), l[a].m(n, null));
|
|
3952
3952
|
}
|
|
3953
3953
|
for (; a < l.length; a += 1)
|
|
3954
3954
|
l[a].d(1);
|
|
3955
3955
|
l.length = o.length;
|
|
3956
3956
|
}
|
|
3957
|
-
|
|
3957
|
+
c[0] & /*selectedScene, scenes*/
|
|
3958
3958
|
6291456 && gs(
|
|
3959
3959
|
n,
|
|
3960
3960
|
/*selectedScene*/
|
|
@@ -3995,7 +3995,7 @@ function ni(t) {
|
|
|
3995
3995
|
let e;
|
|
3996
3996
|
return {
|
|
3997
3997
|
c() {
|
|
3998
|
-
e = x("div"),
|
|
3998
|
+
e = x("div"), u(e, "class", "sy-assistant-scene-select svelte-1r23oau");
|
|
3999
3999
|
},
|
|
4000
4000
|
m(n, s) {
|
|
4001
4001
|
W(n, e, s);
|
|
@@ -4009,7 +4009,7 @@ function si(t) {
|
|
|
4009
4009
|
let e, n, s;
|
|
4010
4010
|
return {
|
|
4011
4011
|
c() {
|
|
4012
|
-
e = x("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"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>',
|
|
4012
|
+
e = x("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"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', u(e, "class", "sy-assistant-icon-button svelte-1r23oau"), u(e, "aria-label", "历史会话");
|
|
4013
4013
|
},
|
|
4014
4014
|
m(i, o) {
|
|
4015
4015
|
W(i, e, o), n || (s = [
|
|
@@ -4035,7 +4035,7 @@ function si(t) {
|
|
|
4035
4035
|
},
|
|
4036
4036
|
p: je,
|
|
4037
4037
|
d(i) {
|
|
4038
|
-
i && B(e), n = !1,
|
|
4038
|
+
i && B(e), n = !1, Me(s);
|
|
4039
4039
|
}
|
|
4040
4040
|
};
|
|
4041
4041
|
}
|
|
@@ -4046,7 +4046,7 @@ function ii(t) {
|
|
|
4046
4046
|
), s;
|
|
4047
4047
|
return {
|
|
4048
4048
|
c() {
|
|
4049
|
-
e = x("div"), s = De(n),
|
|
4049
|
+
e = x("div"), s = De(n), u(e, "class", "sy-assistant-button-tooltip svelte-1r23oau"), F(
|
|
4050
4050
|
e,
|
|
4051
4051
|
"left",
|
|
4052
4052
|
/*buttonTooltip*/
|
|
@@ -4085,14 +4085,14 @@ function ii(t) {
|
|
|
4085
4085
|
}
|
|
4086
4086
|
function Rr(t) {
|
|
4087
4087
|
let e, n, s, i, o, l, r;
|
|
4088
|
-
const
|
|
4088
|
+
const c = [yr, _r], a = [];
|
|
4089
4089
|
function f(h, d) {
|
|
4090
4090
|
return (
|
|
4091
4091
|
/*showHistoryPanel*/
|
|
4092
4092
|
h[29] ? 0 : 1
|
|
4093
4093
|
);
|
|
4094
4094
|
}
|
|
4095
|
-
n = f(t), s = a[n] =
|
|
4095
|
+
n = f(t), s = a[n] = c[n](t);
|
|
4096
4096
|
let g = !/*showHistoryPanel*/
|
|
4097
4097
|
t[29] && Ks(t), m = (
|
|
4098
4098
|
/*buttonTooltip*/
|
|
@@ -4100,7 +4100,7 @@ function Rr(t) {
|
|
|
4100
4100
|
);
|
|
4101
4101
|
return {
|
|
4102
4102
|
c() {
|
|
4103
|
-
e = x("div"), s.c(), i = q(), g && g.c(), o = q(), m && m.c(), l = Ft(),
|
|
4103
|
+
e = x("div"), s.c(), i = q(), g && g.c(), o = q(), m && m.c(), l = Ft(), u(e, "class", "sy-assistant-chat-container svelte-1r23oau"), F(
|
|
4104
4104
|
e,
|
|
4105
4105
|
"z-index",
|
|
4106
4106
|
/*zIndex*/
|
|
@@ -4114,7 +4114,7 @@ function Rr(t) {
|
|
|
4114
4114
|
let w = n;
|
|
4115
4115
|
n = f(h), n === w ? a[n].p(h, d) : (Xn(), wt(a[w], 1, 1, () => {
|
|
4116
4116
|
a[w] = null;
|
|
4117
|
-
}), Vn(), s = a[n], s ? s.p(h, d) : (s = a[n] =
|
|
4117
|
+
}), Vn(), s = a[n], s ? s.p(h, d) : (s = a[n] = c[n](h), s.c()), et(s, 1), s.m(e, i)), /*showHistoryPanel*/
|
|
4118
4118
|
h[29] ? g && (g.d(1), g = null) : g ? g.p(h, d) : (g = Ks(h), g.c(), g.m(e, null)), (!r || d[0] & /*zIndex*/
|
|
4119
4119
|
1) && F(
|
|
4120
4120
|
e,
|
|
@@ -4172,10 +4172,10 @@ function an(t) {
|
|
|
4172
4172
|
}
|
|
4173
4173
|
return { name: t, ext: "" };
|
|
4174
4174
|
}
|
|
4175
|
-
function
|
|
4175
|
+
function Mr(t, e, n) {
|
|
4176
4176
|
let s, i, o;
|
|
4177
4177
|
const l = di();
|
|
4178
|
-
let r = "",
|
|
4178
|
+
let r = "", c = [
|
|
4179
4179
|
{
|
|
4180
4180
|
sessionId: "",
|
|
4181
4181
|
requestId: "",
|
|
@@ -4193,33 +4193,33 @@ function Lr(t, e, n) {
|
|
|
4193
4193
|
});
|
|
4194
4194
|
function S(k) {
|
|
4195
4195
|
try {
|
|
4196
|
-
const
|
|
4197
|
-
return Ds.sanitize(
|
|
4198
|
-
} catch (
|
|
4199
|
-
console.warn("Markdown parsing failed, fallback to HTML:",
|
|
4196
|
+
const O = ce(k);
|
|
4197
|
+
return Ds.sanitize(O);
|
|
4198
|
+
} catch (O) {
|
|
4199
|
+
console.warn("Markdown parsing failed, fallback to HTML:", O);
|
|
4200
4200
|
try {
|
|
4201
|
-
const
|
|
4201
|
+
const X = k.replace(/\n/g, "<br>").replace(
|
|
4202
4202
|
/\*\*(.*?)\*\*/g,
|
|
4203
4203
|
"<strong>$1</strong>"
|
|
4204
4204
|
// 处理加粗
|
|
4205
4205
|
).replace(/\*(.*?)\*/g, "<em>$1</em>");
|
|
4206
|
-
return Ds.sanitize(
|
|
4207
|
-
} catch (
|
|
4208
|
-
return console.error("HTML fallback failed:",
|
|
4206
|
+
return Ds.sanitize(X);
|
|
4207
|
+
} catch (X) {
|
|
4208
|
+
return console.error("HTML fallback failed:", X), k;
|
|
4209
4209
|
}
|
|
4210
4210
|
}
|
|
4211
4211
|
}
|
|
4212
4212
|
let _;
|
|
4213
|
-
function
|
|
4213
|
+
function M(k = !1) {
|
|
4214
4214
|
_ && _.scrollTo({
|
|
4215
4215
|
top: _.scrollHeight,
|
|
4216
4216
|
behavior: k ? "smooth" : "auto"
|
|
4217
4217
|
});
|
|
4218
4218
|
}
|
|
4219
4219
|
Xi(() => {
|
|
4220
|
-
|
|
4220
|
+
M(!1);
|
|
4221
4221
|
});
|
|
4222
|
-
let { zIndex: R } = e, { sessionId: v } = e, { hasScene:
|
|
4222
|
+
let { zIndex: R } = e, { sessionId: v } = e, { hasScene: L } = e, { apiPrefix: I } = e, { theme: V = "default" } = e, { showHistory: H = !0 } = e, { showActions: D = !0 } = e, { sendIcon: G = "" } = e, { robotIcon: te = "" } = e, { userIcon: ne = "" } = e, { maxInputLength: K = 500 } = e, { autoExpandTextarea: le = !1 } = e, { maxTextareaRows: Ge = 6 } = e, { sseTimeout: ie = 0 } = e, Ze = !1, Z;
|
|
4223
4223
|
function Qe() {
|
|
4224
4224
|
le && (n(19, Ze = !0), Ae());
|
|
4225
4225
|
}
|
|
@@ -4229,7 +4229,7 @@ function Lr(t, e, n) {
|
|
|
4229
4229
|
function Ae() {
|
|
4230
4230
|
if (!le || !Ze || !Z) return;
|
|
4231
4231
|
n(20, Z.style.height = "auto", Z);
|
|
4232
|
-
const k = parseInt(getComputedStyle(Z).lineHeight),
|
|
4232
|
+
const k = parseInt(getComputedStyle(Z).lineHeight), O = k * 3, X = k * Ge, ae = Math.min(Math.max(Z.scrollHeight, O), X);
|
|
4233
4233
|
n(20, Z.style.height = `${ae}px`, Z);
|
|
4234
4234
|
}
|
|
4235
4235
|
function ue() {
|
|
@@ -4238,7 +4238,7 @@ function Lr(t, e, n) {
|
|
|
4238
4238
|
let xe = [], ge = "";
|
|
4239
4239
|
function Ve() {
|
|
4240
4240
|
return Se(this, null, function* () {
|
|
4241
|
-
if (
|
|
4241
|
+
if (L)
|
|
4242
4242
|
try {
|
|
4243
4243
|
const k = yield fetch(`${I}/chat/getSceneList`, {
|
|
4244
4244
|
headers: {
|
|
@@ -4247,8 +4247,8 @@ function Lr(t, e, n) {
|
|
|
4247
4247
|
}
|
|
4248
4248
|
});
|
|
4249
4249
|
if (!k.ok) throw new Error("Failed to fetch scenes");
|
|
4250
|
-
const
|
|
4251
|
-
|
|
4250
|
+
const O = yield k.json();
|
|
4251
|
+
O.code === 0 && (n(21, xe = O.data.sceneList || []), xe.length > 0 && n(22, ge = xe[0].code));
|
|
4252
4252
|
} catch (k) {
|
|
4253
4253
|
console.error("Failed to fetch scenes:", k);
|
|
4254
4254
|
}
|
|
@@ -4257,59 +4257,64 @@ function Lr(t, e, n) {
|
|
|
4257
4257
|
Yn(() => {
|
|
4258
4258
|
Ve();
|
|
4259
4259
|
const k = () => {
|
|
4260
|
-
|
|
4260
|
+
if (document.hidden && d) {
|
|
4261
|
+
if (console.warn("Page hidden during SSE streaming. Connection may be throttled."), a && c.length > 0) {
|
|
4262
|
+
const O = c[c.length - 1];
|
|
4263
|
+
O.type === "assistant" && O.content === a && (a = "", n(13, c = c.map((X) => X.id === O.id ? ke(oe({}, X), { content: "" }) : X)), console.log("Cleared assistant message content due to page visibility change"));
|
|
4264
|
+
}
|
|
4265
|
+
} else !document.hidden && d && console.log("Page visible again during SSE streaming.");
|
|
4261
4266
|
};
|
|
4262
4267
|
return document.addEventListener("visibilitychange", k), () => {
|
|
4263
4268
|
document.removeEventListener("visibilitychange", k);
|
|
4264
4269
|
};
|
|
4265
4270
|
});
|
|
4266
|
-
function
|
|
4271
|
+
function Le() {
|
|
4267
4272
|
return Se(this, null, function* () {
|
|
4268
4273
|
if (!r.trim() || o) return;
|
|
4269
4274
|
if (!v) {
|
|
4270
4275
|
console.error("No session ID available");
|
|
4271
4276
|
return;
|
|
4272
4277
|
}
|
|
4273
|
-
const k = Date.now().toString(),
|
|
4278
|
+
const k = Date.now().toString(), O = Date.now().toString() + Math.random().toString().slice(2, 8), X = {
|
|
4274
4279
|
sessionId: v,
|
|
4275
|
-
requestId:
|
|
4280
|
+
requestId: O,
|
|
4276
4281
|
id: k,
|
|
4277
4282
|
type: "user",
|
|
4278
4283
|
content: r.trim(),
|
|
4279
4284
|
timestamp: Date.now()
|
|
4280
4285
|
};
|
|
4281
|
-
n(13,
|
|
4286
|
+
n(13, c = [...c, X]);
|
|
4282
4287
|
const ae = r.trim();
|
|
4283
4288
|
n(10, r = ""), le && Z && n(20, Z.style.height = "", Z);
|
|
4284
4289
|
const be = (Date.now() + 1).toString();
|
|
4285
4290
|
E = 0, y = {
|
|
4286
4291
|
sessionId: v,
|
|
4287
|
-
requestId:
|
|
4292
|
+
requestId: O,
|
|
4288
4293
|
keyword: ae,
|
|
4289
4294
|
assistantMessageId: be
|
|
4290
|
-
}, a = "", n(13,
|
|
4291
|
-
...
|
|
4295
|
+
}, a = "", n(13, c = [
|
|
4296
|
+
...c,
|
|
4292
4297
|
{
|
|
4293
4298
|
sessionId: v,
|
|
4294
|
-
requestId:
|
|
4299
|
+
requestId: O,
|
|
4295
4300
|
id: be,
|
|
4296
4301
|
type: "assistant",
|
|
4297
4302
|
content: "",
|
|
4298
4303
|
timestamp: Date.now()
|
|
4299
4304
|
}
|
|
4300
|
-
]), yield nt(v,
|
|
4305
|
+
]), yield nt(v, O, ae, be, !0);
|
|
4301
4306
|
});
|
|
4302
4307
|
}
|
|
4303
|
-
function nt(k,
|
|
4308
|
+
function nt(k, O, X, ae, be = !1) {
|
|
4304
4309
|
return Se(this, null, function* () {
|
|
4305
|
-
n(17, d = !0), w = !1, be && (console.log(`Retrying request (attempt ${E + 1}/${ln})...`), a = "", n(13,
|
|
4310
|
+
n(17, d = !0), w = !1, be && (console.log(`Retrying request (attempt ${E + 1}/${ln})...`), a = "", n(13, c = c.map((se) => se.id === ae ? ke(oe({}, se), { content: "" }) : se))), f && f.abort(), T && (clearTimeout(T), T = null), f = new AbortController(), ie > 0 && (T = setTimeout(
|
|
4306
4311
|
() => {
|
|
4307
4312
|
d && f && (console.warn("SSE request timeout, aborting..."), f.abort(), E < ln && y ? (E++, setTimeout(
|
|
4308
4313
|
() => {
|
|
4309
4314
|
y && nt(y.sessionId, y.requestId, y.keyword, y.assistantMessageId, !0);
|
|
4310
4315
|
},
|
|
4311
4316
|
1e3
|
|
4312
|
-
)) : (a = a || "请求超时,请稍后重试", n(13,
|
|
4317
|
+
)) : (a = a || "请求超时,请稍后重试", n(13, c = c.map((se) => se.id === ae ? ke(oe({}, se), { content: a }) : se)), n(17, d = !1), y = null));
|
|
4313
4318
|
},
|
|
4314
4319
|
ie
|
|
4315
4320
|
));
|
|
@@ -4323,10 +4328,10 @@ function Lr(t, e, n) {
|
|
|
4323
4328
|
},
|
|
4324
4329
|
body: JSON.stringify({
|
|
4325
4330
|
sessionId: k,
|
|
4326
|
-
requestId:
|
|
4327
|
-
keyword:
|
|
4331
|
+
requestId: O,
|
|
4332
|
+
keyword: X,
|
|
4328
4333
|
flowId: "1",
|
|
4329
|
-
extendKeys:
|
|
4334
|
+
extendKeys: L ? { sceneCode: ge } : void 0
|
|
4330
4335
|
}),
|
|
4331
4336
|
signal: f.signal,
|
|
4332
4337
|
onmessage(se) {
|
|
@@ -4340,19 +4345,19 @@ function Lr(t, e, n) {
|
|
|
4340
4345
|
ie
|
|
4341
4346
|
)), w || (w = !0, l("firstResponse", {
|
|
4342
4347
|
sessionId: k,
|
|
4343
|
-
requestId:
|
|
4348
|
+
requestId: O,
|
|
4344
4349
|
content: de,
|
|
4345
4350
|
timestamp: Date.now()
|
|
4346
4351
|
}));
|
|
4347
4352
|
const vt = oi(de);
|
|
4348
|
-
vt ? (n(13,
|
|
4353
|
+
vt ? (n(13, c = c.map((ut) => ut.id === ae ? ke(oe({}, ut), { attachments: vt }) : ut)), M(!0)) : (a += de, n(13, c = c.map((ut) => ut.id === ae ? ke(oe({}, ut), { content: a }) : ut)), M(!1));
|
|
4349
4354
|
}
|
|
4350
4355
|
} catch (de) {
|
|
4351
4356
|
console.error("Failed to process SSE message:", de);
|
|
4352
4357
|
}
|
|
4353
4358
|
},
|
|
4354
4359
|
onerror(se) {
|
|
4355
|
-
throw a = "请求异常,请重试", n(13,
|
|
4360
|
+
throw a = "请求异常,请重试", n(13, c = c.map((de) => de.id === ae ? ke(oe({}, de), { content: a }) : de)), M(!1), console.error("SSE error:", se), f = null, n(17, d = !1), se;
|
|
4356
4361
|
},
|
|
4357
4362
|
onclose() {
|
|
4358
4363
|
T && (clearTimeout(T), T = null), f = null, n(17, d = !1), y = null, E = 0;
|
|
@@ -4364,19 +4369,19 @@ function Lr(t, e, n) {
|
|
|
4364
4369
|
y && nt(y.sessionId, y.requestId, y.keyword, y.assistantMessageId, !0);
|
|
4365
4370
|
},
|
|
4366
4371
|
1e3
|
|
4367
|
-
)) : (String(se).includes("abort") || (a = a || "请求失败,请稍后重试", n(13,
|
|
4372
|
+
)) : (String(se).includes("abort") || (a = a || "请求失败,请稍后重试", n(13, c = c.map((de) => de.id === ae ? ke(oe({}, de), { content: a }) : de))), n(17, d = !1), y = null, E = 0);
|
|
4368
4373
|
}
|
|
4369
4374
|
});
|
|
4370
4375
|
}
|
|
4371
|
-
function U(k,
|
|
4372
|
-
const ae =
|
|
4373
|
-
n(14, g =
|
|
4376
|
+
function U(k, O, X) {
|
|
4377
|
+
const ae = X.getBoundingClientRect(), be = _.getBoundingClientRect(), se = ae.left < be.width / 2;
|
|
4378
|
+
n(14, g = O), n(15, m = {
|
|
4374
4379
|
x: ae.left,
|
|
4375
4380
|
y: ae.top + ae.height / 2,
|
|
4376
4381
|
alignRight: se
|
|
4377
4382
|
});
|
|
4378
4383
|
}
|
|
4379
|
-
function
|
|
4384
|
+
function Q() {
|
|
4380
4385
|
n(16, h = setTimeout(
|
|
4381
4386
|
() => {
|
|
4382
4387
|
n(14, g = null), n(16, h = null);
|
|
@@ -4387,56 +4392,56 @@ function Lr(t, e, n) {
|
|
|
4387
4392
|
Vi(() => {
|
|
4388
4393
|
f && f.abort(), h && clearTimeout(h), T && clearTimeout(T);
|
|
4389
4394
|
});
|
|
4390
|
-
function Oe(k,
|
|
4395
|
+
function Oe(k, O) {
|
|
4391
4396
|
return Se(this, null, function* () {
|
|
4392
4397
|
try {
|
|
4393
|
-
const
|
|
4398
|
+
const X = yield fetch(`${I}/file/downloadFile`, {
|
|
4394
4399
|
method: "POST",
|
|
4395
4400
|
headers: {
|
|
4396
4401
|
"Content-Type": "application/json",
|
|
4397
4402
|
"Auth-Token": `${Ee()}`,
|
|
4398
4403
|
Authorization: `bearer ${Ee()}`
|
|
4399
4404
|
},
|
|
4400
|
-
body: JSON.stringify({ fileName: k, fileUrl:
|
|
4405
|
+
body: JSON.stringify({ fileName: k, fileUrl: O })
|
|
4401
4406
|
});
|
|
4402
|
-
if (
|
|
4407
|
+
if (!X.ok)
|
|
4403
4408
|
throw new Error("Download failed");
|
|
4404
|
-
const ae =
|
|
4409
|
+
const ae = X.headers.get("content-type") || "application/octet-stream", be = yield X.blob(), se = window.URL.createObjectURL(be), de = document.createElement("a");
|
|
4405
4410
|
de.href = se, de.download = k, document.body.appendChild(de), de.click(), window.URL.revokeObjectURL(se), document.body.removeChild(de);
|
|
4406
|
-
} catch (
|
|
4407
|
-
console.error("Failed to download file:",
|
|
4411
|
+
} catch (X) {
|
|
4412
|
+
console.error("Failed to download file:", X);
|
|
4408
4413
|
}
|
|
4409
4414
|
});
|
|
4410
4415
|
}
|
|
4411
4416
|
let _e = {};
|
|
4412
|
-
function st(k,
|
|
4417
|
+
function st(k, O) {
|
|
4413
4418
|
return Se(this, null, function* () {
|
|
4414
4419
|
try {
|
|
4415
|
-
const
|
|
4420
|
+
const X = O.replace(/<br\s*\/?>/g, `
|
|
4416
4421
|
`).replace(
|
|
4417
4422
|
/\*\*(.*?)\*\*/g,
|
|
4418
4423
|
"$1"
|
|
4419
4424
|
// 移除加粗标记
|
|
4420
4425
|
).replace(/###/g, "").trim();
|
|
4421
|
-
yield navigator.clipboard.writeText(
|
|
4426
|
+
yield navigator.clipboard.writeText(X), n(23, _e[k] = !0, _e), setTimeout(
|
|
4422
4427
|
() => {
|
|
4423
4428
|
n(23, _e[k] = !1, _e), n(23, _e);
|
|
4424
4429
|
},
|
|
4425
4430
|
1500
|
|
4426
4431
|
);
|
|
4427
|
-
} catch (
|
|
4428
|
-
console.error("Failed to copy:",
|
|
4432
|
+
} catch (X) {
|
|
4433
|
+
console.error("Failed to copy:", X);
|
|
4429
4434
|
}
|
|
4430
4435
|
});
|
|
4431
4436
|
}
|
|
4432
4437
|
let fe = {}, Ce = {}, it = !1;
|
|
4433
|
-
function at(k,
|
|
4438
|
+
function at(k, O) {
|
|
4434
4439
|
return Se(this, null, function* () {
|
|
4435
|
-
if (fe[k] ===
|
|
4440
|
+
if (fe[k] === O) {
|
|
4436
4441
|
n(24, fe[k] = null, fe), n(24, fe);
|
|
4437
4442
|
return;
|
|
4438
4443
|
}
|
|
4439
|
-
if (n(24, fe[k] =
|
|
4444
|
+
if (n(24, fe[k] = O, fe), n(24, fe), O === "like")
|
|
4440
4445
|
try {
|
|
4441
4446
|
if (!(yield fetch(`${I}/chat/record/feedback`, {
|
|
4442
4447
|
method: "POST",
|
|
@@ -4453,8 +4458,8 @@ function Lr(t, e, n) {
|
|
|
4453
4458
|
})
|
|
4454
4459
|
})).ok)
|
|
4455
4460
|
throw new Error("Feedback failed");
|
|
4456
|
-
} catch (
|
|
4457
|
-
console.error("Failed to send feedback:",
|
|
4461
|
+
} catch (X) {
|
|
4462
|
+
console.error("Failed to send feedback:", X), n(24, fe[k] = null, fe), n(24, fe);
|
|
4458
4463
|
}
|
|
4459
4464
|
else
|
|
4460
4465
|
n(26, it = !0);
|
|
@@ -4462,8 +4467,8 @@ function Lr(t, e, n) {
|
|
|
4462
4467
|
}
|
|
4463
4468
|
function ht(k) {
|
|
4464
4469
|
return Se(this, null, function* () {
|
|
4465
|
-
var
|
|
4466
|
-
if ((
|
|
4470
|
+
var O;
|
|
4471
|
+
if ((O = Ce[k]) != null && O.trim())
|
|
4467
4472
|
try {
|
|
4468
4473
|
if (!(yield fetch(`${I}/chat/record/feedback`, {
|
|
4469
4474
|
method: "POST",
|
|
@@ -4481,26 +4486,26 @@ function Lr(t, e, n) {
|
|
|
4481
4486
|
})).ok)
|
|
4482
4487
|
throw new Error("Feedback failed");
|
|
4483
4488
|
n(26, it = !1), n(25, Ce[k] = "", Ce), n(25, Ce);
|
|
4484
|
-
} catch (
|
|
4485
|
-
console.error("Failed to send feedback:",
|
|
4489
|
+
} catch (X) {
|
|
4490
|
+
console.error("Failed to send feedback:", X), n(24, fe[k] = null, fe), n(24, fe);
|
|
4486
4491
|
}
|
|
4487
4492
|
});
|
|
4488
4493
|
}
|
|
4489
4494
|
let yt = { x: 0, y: 0 };
|
|
4490
|
-
function xt(k,
|
|
4495
|
+
function xt(k, O) {
|
|
4491
4496
|
const ae = k.currentTarget.getBoundingClientRect();
|
|
4492
4497
|
n(27, yt = {
|
|
4493
4498
|
x: ae.left - 290,
|
|
4494
4499
|
// 弹框宽度 + 间距
|
|
4495
4500
|
y: ae.top - 160
|
|
4496
4501
|
// 弹框高度 + 间距
|
|
4497
|
-
}), at(
|
|
4502
|
+
}), at(O, "dislike");
|
|
4498
4503
|
}
|
|
4499
4504
|
let pt = null;
|
|
4500
|
-
function He(k,
|
|
4505
|
+
function He(k, O) {
|
|
4501
4506
|
const ae = k.currentTarget.getBoundingClientRect();
|
|
4502
4507
|
n(28, pt = {
|
|
4503
|
-
text:
|
|
4508
|
+
text: O,
|
|
4504
4509
|
x: ae.left + ae.width / 2,
|
|
4505
4510
|
y: ae.top - 8
|
|
4506
4511
|
});
|
|
@@ -4509,7 +4514,7 @@ function Lr(t, e, n) {
|
|
|
4509
4514
|
n(28, pt = null);
|
|
4510
4515
|
}
|
|
4511
4516
|
let ct = [], C = !1;
|
|
4512
|
-
function
|
|
4517
|
+
function $() {
|
|
4513
4518
|
Je(), n(29, C = !0);
|
|
4514
4519
|
}
|
|
4515
4520
|
function pe() {
|
|
@@ -4520,7 +4525,7 @@ function Lr(t, e, n) {
|
|
|
4520
4525
|
if (!d) {
|
|
4521
4526
|
n(17, d = !0);
|
|
4522
4527
|
try {
|
|
4523
|
-
const
|
|
4528
|
+
const O = yield fetch(`${I}/chat/record/session/detail/query`, {
|
|
4524
4529
|
method: "POST",
|
|
4525
4530
|
headers: {
|
|
4526
4531
|
"Content-Type": "application/json",
|
|
@@ -4529,12 +4534,12 @@ function Lr(t, e, n) {
|
|
|
4529
4534
|
},
|
|
4530
4535
|
body: JSON.stringify({ sessionId: k })
|
|
4531
4536
|
});
|
|
4532
|
-
if (!
|
|
4537
|
+
if (!O.ok)
|
|
4533
4538
|
throw new Error("Failed to load sessions");
|
|
4534
|
-
const
|
|
4535
|
-
if (
|
|
4539
|
+
const X = yield O.json();
|
|
4540
|
+
if (X.code === 0) {
|
|
4536
4541
|
l("updateSessionId", { sessionId: k }), n(29, C = !1);
|
|
4537
|
-
const ae =
|
|
4542
|
+
const ae = X.data.map((be, se) => {
|
|
4538
4543
|
const de = oi(be.answer), vt = Ir(be.answer);
|
|
4539
4544
|
return [
|
|
4540
4545
|
{
|
|
@@ -4556,10 +4561,10 @@ function Lr(t, e, n) {
|
|
|
4556
4561
|
}
|
|
4557
4562
|
];
|
|
4558
4563
|
});
|
|
4559
|
-
n(13,
|
|
4564
|
+
n(13, c = ae.flat());
|
|
4560
4565
|
}
|
|
4561
|
-
} catch (
|
|
4562
|
-
console.error("Failed to load sessions:",
|
|
4566
|
+
} catch (O) {
|
|
4567
|
+
console.error("Failed to load sessions:", O);
|
|
4563
4568
|
} finally {
|
|
4564
4569
|
n(17, d = !1);
|
|
4565
4570
|
}
|
|
@@ -4573,7 +4578,7 @@ function Lr(t, e, n) {
|
|
|
4573
4578
|
console.error("Failed to create new session");
|
|
4574
4579
|
return;
|
|
4575
4580
|
}
|
|
4576
|
-
l("updateSessionId", { sessionId: k }), n(13,
|
|
4581
|
+
l("updateSessionId", { sessionId: k }), n(13, c = [
|
|
4577
4582
|
{
|
|
4578
4583
|
sessionId: k,
|
|
4579
4584
|
requestId: "",
|
|
@@ -4598,20 +4603,20 @@ function Lr(t, e, n) {
|
|
|
4598
4603
|
});
|
|
4599
4604
|
if (!k.ok)
|
|
4600
4605
|
throw new Error("Failed to get session ID");
|
|
4601
|
-
const
|
|
4602
|
-
if (
|
|
4603
|
-
return
|
|
4604
|
-
throw new Error(
|
|
4606
|
+
const O = yield k.json();
|
|
4607
|
+
if (O.code === 0)
|
|
4608
|
+
return O.data.sessionId;
|
|
4609
|
+
throw new Error(O.message || "Failed to get session ID");
|
|
4605
4610
|
} catch (k) {
|
|
4606
4611
|
return console.error("Failed to get session ID:", k), null;
|
|
4607
4612
|
}
|
|
4608
4613
|
});
|
|
4609
4614
|
}
|
|
4610
|
-
const Ne = (k,
|
|
4615
|
+
const Ne = (k, O) => U(O, k.tips, O.currentTarget), Ie = (k) => Oe(k.content_title, k.link), Ke = () => {
|
|
4611
4616
|
h && (clearTimeout(h), n(16, h = null));
|
|
4612
4617
|
}, dt = () => {
|
|
4613
4618
|
n(14, g = null);
|
|
4614
|
-
}, Ht = (k) => st(k.id, k.content), Tn = (k,
|
|
4619
|
+
}, Ht = (k) => st(k.id, k.content), Tn = (k, O) => He(O, _e[k.id] ? "已复制" : "复制内容"), Rt = (k) => at(k.id, "like"), It = (k, O) => He(O, fe[k.id] === "like" ? "取消点赞" : "点赞"), vn = (k, O) => xt(O, k.id), Tt = (k, O) => He(O, fe[k.id] === "dislike" ? "取消点踩" : "点踩");
|
|
4615
4620
|
function Sn(k) {
|
|
4616
4621
|
Ce[k.id] = this.value, n(25, Ce);
|
|
4617
4622
|
}
|
|
@@ -4635,19 +4640,19 @@ function Lr(t, e, n) {
|
|
|
4635
4640
|
function tn() {
|
|
4636
4641
|
r = this.value, n(10, r);
|
|
4637
4642
|
}
|
|
4638
|
-
const xn = (k) => k.key === "Enter" && !k.shiftKey && (
|
|
4643
|
+
const xn = (k) => k.key === "Enter" && !k.shiftKey && (Le(), k.preventDefault()), $e = (k) => He(k, "发送消息");
|
|
4639
4644
|
return t.$$set = (k) => {
|
|
4640
|
-
"zIndex" in k && n(0, R = k.zIndex), "sessionId" in k && n(50, v = k.sessionId), "hasScene" in k && n(1,
|
|
4645
|
+
"zIndex" in k && n(0, R = k.zIndex), "sessionId" in k && n(50, v = k.sessionId), "hasScene" in k && n(1, L = k.hasScene), "apiPrefix" in k && n(2, I = k.apiPrefix), "theme" in k && n(3, V = k.theme), "showHistory" in k && n(4, H = k.showHistory), "showActions" in k && n(5, D = k.showActions), "sendIcon" in k && n(6, G = k.sendIcon), "robotIcon" in k && n(7, te = k.robotIcon), "userIcon" in k && n(8, ne = k.userIcon), "maxInputLength" in k && n(51, K = k.maxInputLength), "autoExpandTextarea" in k && n(9, le = k.autoExpandTextarea), "maxTextareaRows" in k && n(52, Ge = k.maxTextareaRows), "sseTimeout" in k && n(53, ie = k.sseTimeout);
|
|
4641
4646
|
}, t.$$.update = () => {
|
|
4642
4647
|
t.$$.dirty[1] & /*maxInputLength*/
|
|
4643
|
-
1048576 && n(11, s =
|
|
4648
|
+
1048576 && n(11, s = K), t.$$.dirty[0] & /*message*/
|
|
4644
4649
|
1024 && n(12, i = r.length), t.$$.dirty[0] & /*messageLength, maxLength*/
|
|
4645
4650
|
6144 && n(30, o = i > s);
|
|
4646
4651
|
}, [
|
|
4647
4652
|
R,
|
|
4648
|
-
|
|
4653
|
+
L,
|
|
4649
4654
|
I,
|
|
4650
|
-
|
|
4655
|
+
V,
|
|
4651
4656
|
H,
|
|
4652
4657
|
D,
|
|
4653
4658
|
G,
|
|
@@ -4657,7 +4662,7 @@ function Lr(t, e, n) {
|
|
|
4657
4662
|
r,
|
|
4658
4663
|
s,
|
|
4659
4664
|
i,
|
|
4660
|
-
|
|
4665
|
+
c,
|
|
4661
4666
|
g,
|
|
4662
4667
|
m,
|
|
4663
4668
|
h,
|
|
@@ -4679,9 +4684,9 @@ function Lr(t, e, n) {
|
|
|
4679
4684
|
Qe,
|
|
4680
4685
|
he,
|
|
4681
4686
|
ue,
|
|
4682
|
-
|
|
4687
|
+
Le,
|
|
4683
4688
|
U,
|
|
4684
|
-
|
|
4689
|
+
Q,
|
|
4685
4690
|
Oe,
|
|
4686
4691
|
st,
|
|
4687
4692
|
at,
|
|
@@ -4690,12 +4695,12 @@ function Lr(t, e, n) {
|
|
|
4690
4695
|
He,
|
|
4691
4696
|
Je,
|
|
4692
4697
|
ct,
|
|
4693
|
-
|
|
4698
|
+
$,
|
|
4694
4699
|
pe,
|
|
4695
4700
|
ye,
|
|
4696
4701
|
Pe,
|
|
4697
4702
|
v,
|
|
4698
|
-
|
|
4703
|
+
K,
|
|
4699
4704
|
Ge,
|
|
4700
4705
|
ie,
|
|
4701
4706
|
Ne,
|
|
@@ -4721,12 +4726,12 @@ function Lr(t, e, n) {
|
|
|
4721
4726
|
$e
|
|
4722
4727
|
];
|
|
4723
4728
|
}
|
|
4724
|
-
class
|
|
4729
|
+
class Lr extends Kn {
|
|
4725
4730
|
constructor(e) {
|
|
4726
4731
|
super(), Jn(
|
|
4727
4732
|
this,
|
|
4728
4733
|
e,
|
|
4729
|
-
|
|
4734
|
+
Mr,
|
|
4730
4735
|
Rr,
|
|
4731
4736
|
mn,
|
|
4732
4737
|
{
|
|
@@ -4754,66 +4759,66 @@ function ri(t) {
|
|
|
4754
4759
|
let e, n, s, i, o = (
|
|
4755
4760
|
/*mergedOptions*/
|
|
4756
4761
|
t[3].title + ""
|
|
4757
|
-
), l, r,
|
|
4762
|
+
), l, r, c, a, f, g, m, h, d, w = (
|
|
4758
4763
|
/*isFullscreen*/
|
|
4759
4764
|
t[2] ? "退出全屏" : "全屏显示"
|
|
4760
|
-
), T, E, y, S, _,
|
|
4765
|
+
), T, E, y, S, _, M, R, v, L = (
|
|
4761
4766
|
/*isSnapped*/
|
|
4762
4767
|
t[8] ? "取消吸附" : "吸附到边缘"
|
|
4763
|
-
), I,
|
|
4768
|
+
), I, V, H, D, G, te, ne, K, le, Ge = `${/*mergedOptions*/
|
|
4764
4769
|
t[3].height}px`, ie, Ze, Z;
|
|
4765
|
-
function Qe(U,
|
|
4770
|
+
function Qe(U, Q) {
|
|
4766
4771
|
return (
|
|
4767
4772
|
/*isFullscreen*/
|
|
4768
4773
|
U[2] ? zr : Cr
|
|
4769
4774
|
);
|
|
4770
4775
|
}
|
|
4771
4776
|
let he = Qe(t), Ae = he(t);
|
|
4772
|
-
function ue(U,
|
|
4777
|
+
function ue(U, Q) {
|
|
4773
4778
|
return (
|
|
4774
4779
|
/*isSnapped*/
|
|
4775
4780
|
U[8] ? Or : Dr
|
|
4776
4781
|
);
|
|
4777
4782
|
}
|
|
4778
4783
|
let xe = ue(t), ge = xe(t);
|
|
4779
|
-
const Ve = [Nr, Pr],
|
|
4780
|
-
function nt(U,
|
|
4784
|
+
const Ve = [Nr, Pr], Le = [];
|
|
4785
|
+
function nt(U, Q) {
|
|
4781
4786
|
return (
|
|
4782
4787
|
/*showHistoryPanel*/
|
|
4783
4788
|
U[9] ? 0 : 1
|
|
4784
4789
|
);
|
|
4785
4790
|
}
|
|
4786
|
-
return
|
|
4791
|
+
return K = nt(t), le = Le[K] = Ve[K](t), {
|
|
4787
4792
|
c() {
|
|
4788
|
-
var U,
|
|
4789
|
-
e = x("div"), n = x("div"), s = x("div"), i = x("h3"), l = De(o), r = q(),
|
|
4793
|
+
var U, Q, Oe;
|
|
4794
|
+
e = x("div"), n = x("div"), s = x("div"), i = x("h3"), l = De(o), r = q(), c = x("div"), a = x("div"), f = x("button"), g = Y("svg"), Ae.c(), h = q(), d = x("span"), T = De(w), E = q(), y = x("div"), S = x("button"), _ = Y("svg"), ge.c(), R = q(), v = x("span"), I = De(L), V = q(), H = x("div"), D = x("button"), D.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>', G = q(), te = x("span"), te.textContent = "关闭助手", ne = q(), le.c(), u(i, "class", "svelte-1h7dpbq"), u(g, "xmlns", "http://www.w3.org/2000/svg"), u(g, "width", "18"), u(g, "height", "18"), u(g, "viewBox", "0 0 24 24"), u(g, "fill", "none"), u(g, "stroke", "currentColor"), u(g, "stroke-width", "2"), u(g, "stroke-linecap", "round"), u(g, "stroke-linejoin", "round"), u(f, "class", "sy-assistant-action-button svelte-1h7dpbq"), u(f, "aria-label", m = /*isFullscreen*/
|
|
4790
4795
|
t[2] ? "退出全屏" : "全屏显示"), z(
|
|
4791
4796
|
f,
|
|
4792
4797
|
"active",
|
|
4793
4798
|
/*isFullscreen*/
|
|
4794
4799
|
t[2]
|
|
4795
|
-
),
|
|
4800
|
+
), u(d, "class", "sy-assistant-tooltip svelte-1h7dpbq"), F(
|
|
4796
4801
|
d,
|
|
4797
4802
|
"z-index",
|
|
4798
4803
|
/*mergedOptions*/
|
|
4799
4804
|
((U = t[3].zIndex) != null ? U : 1e3) + 3
|
|
4800
|
-
),
|
|
4805
|
+
), u(a, "class", "sy-assistant-tooltip-wrapper svelte-1h7dpbq"), u(_, "xmlns", "http://www.w3.org/2000/svg"), u(_, "width", "18"), u(_, "height", "18"), u(_, "viewBox", "0 0 24 24"), u(_, "fill", "none"), u(_, "stroke", "currentColor"), u(_, "stroke-width", "2"), u(_, "stroke-linecap", "round"), u(_, "stroke-linejoin", "round"), u(S, "class", "sy-assistant-action-button svelte-1h7dpbq"), u(S, "aria-label", M = /*isSnapped*/
|
|
4801
4806
|
t[8] ? "取消吸附" : "吸附到边缘"), z(
|
|
4802
4807
|
S,
|
|
4803
4808
|
"active",
|
|
4804
4809
|
/*isSnapped*/
|
|
4805
4810
|
t[8]
|
|
4806
|
-
),
|
|
4811
|
+
), u(v, "class", "sy-assistant-tooltip svelte-1h7dpbq"), F(
|
|
4807
4812
|
v,
|
|
4808
4813
|
"z-index",
|
|
4809
4814
|
/*mergedOptions*/
|
|
4810
|
-
((
|
|
4811
|
-
),
|
|
4815
|
+
((Q = t[3].zIndex) != null ? Q : 1e3) + 3
|
|
4816
|
+
), u(y, "class", "sy-assistant-tooltip-wrapper svelte-1h7dpbq"), u(D, "class", "sy-assistant-close-button svelte-1h7dpbq"), u(D, "aria-label", "关闭助手"), u(te, "class", "sy-assistant-tooltip svelte-1h7dpbq"), F(
|
|
4812
4817
|
te,
|
|
4813
4818
|
"z-index",
|
|
4814
4819
|
/*mergedOptions*/
|
|
4815
4820
|
((Oe = t[3].zIndex) != null ? Oe : 1e3) + 3
|
|
4816
|
-
),
|
|
4821
|
+
), u(H, "class", "sy-assistant-tooltip-wrapper svelte-1h7dpbq"), u(c, "class", "sy-assistant-header-actions svelte-1h7dpbq"), u(s, "class", "sy-assistant-drawer-header svelte-1h7dpbq"), u(s, "role", "button"), u(s, "tabindex", "0"), u(s, "aria-label", "拖动助手窗口"), z(
|
|
4817
4822
|
s,
|
|
4818
4823
|
"dragging",
|
|
4819
4824
|
/*isDragging*/
|
|
@@ -4828,7 +4833,7 @@ function ri(t) {
|
|
|
4828
4833
|
"snapped",
|
|
4829
4834
|
/*isSnapped*/
|
|
4830
4835
|
t[8]
|
|
4831
|
-
),
|
|
4836
|
+
), u(n, "class", "sy-assistant-drawer-content svelte-1h7dpbq"), u(e, "class", "sy-assistant-drawer svelte-1h7dpbq"), z(
|
|
4832
4837
|
e,
|
|
4833
4838
|
"fullscreen",
|
|
4834
4839
|
/*isFullscreen*/
|
|
@@ -4840,8 +4845,8 @@ function ri(t) {
|
|
|
4840
4845
|
t[3].theme === "screen"
|
|
4841
4846
|
), F(e, "height", Ge);
|
|
4842
4847
|
},
|
|
4843
|
-
m(U,
|
|
4844
|
-
W(U, e,
|
|
4848
|
+
m(U, Q) {
|
|
4849
|
+
W(U, e, Q), b(e, n), b(n, s), b(s, i), b(i, l), b(s, r), b(s, c), b(c, a), b(a, f), b(f, g), Ae.m(g, null), b(a, h), b(a, d), b(d, T), b(c, E), b(c, y), b(y, S), b(S, _), ge.m(_, null), b(y, R), b(y, v), b(v, I), b(c, V), b(c, H), b(H, D), b(H, G), b(H, te), b(n, ne), Le[K].m(n, null), ie = !0, Ze || (Z = [
|
|
4845
4850
|
j(
|
|
4846
4851
|
f,
|
|
4847
4852
|
"click",
|
|
@@ -4866,83 +4871,83 @@ function ri(t) {
|
|
|
4866
4871
|
))
|
|
4867
4872
|
], Ze = !0);
|
|
4868
4873
|
},
|
|
4869
|
-
p(U,
|
|
4874
|
+
p(U, Q) {
|
|
4870
4875
|
var _e, st, fe;
|
|
4871
|
-
(!ie ||
|
|
4876
|
+
(!ie || Q[0] & /*mergedOptions*/
|
|
4872
4877
|
8) && o !== (o = /*mergedOptions*/
|
|
4873
|
-
U[3].title + "") && Xe(l, o), he !== (he = Qe(U)) && (Ae.d(1), Ae = he(U), Ae && (Ae.c(), Ae.m(g, null))), (!ie ||
|
|
4878
|
+
U[3].title + "") && Xe(l, o), he !== (he = Qe(U)) && (Ae.d(1), Ae = he(U), Ae && (Ae.c(), Ae.m(g, null))), (!ie || Q[0] & /*isFullscreen*/
|
|
4874
4879
|
4 && m !== (m = /*isFullscreen*/
|
|
4875
|
-
U[2] ? "退出全屏" : "全屏显示")) &&
|
|
4880
|
+
U[2] ? "退出全屏" : "全屏显示")) && u(f, "aria-label", m), (!ie || Q[0] & /*isFullscreen*/
|
|
4876
4881
|
4) && z(
|
|
4877
4882
|
f,
|
|
4878
4883
|
"active",
|
|
4879
4884
|
/*isFullscreen*/
|
|
4880
4885
|
U[2]
|
|
4881
|
-
), (!ie ||
|
|
4886
|
+
), (!ie || Q[0] & /*isFullscreen*/
|
|
4882
4887
|
4) && w !== (w = /*isFullscreen*/
|
|
4883
|
-
U[2] ? "退出全屏" : "全屏显示") && Xe(T, w),
|
|
4888
|
+
U[2] ? "退出全屏" : "全屏显示") && Xe(T, w), Q[0] & /*mergedOptions*/
|
|
4884
4889
|
8 && F(
|
|
4885
4890
|
d,
|
|
4886
4891
|
"z-index",
|
|
4887
4892
|
/*mergedOptions*/
|
|
4888
4893
|
((_e = U[3].zIndex) != null ? _e : 1e3) + 3
|
|
4889
|
-
), xe !== (xe = ue(U)) && (ge.d(1), ge = xe(U), ge && (ge.c(), ge.m(_, null))), (!ie ||
|
|
4890
|
-
256 &&
|
|
4891
|
-
U[8] ? "取消吸附" : "吸附到边缘")) &&
|
|
4894
|
+
), xe !== (xe = ue(U)) && (ge.d(1), ge = xe(U), ge && (ge.c(), ge.m(_, null))), (!ie || Q[0] & /*isSnapped*/
|
|
4895
|
+
256 && M !== (M = /*isSnapped*/
|
|
4896
|
+
U[8] ? "取消吸附" : "吸附到边缘")) && u(S, "aria-label", M), (!ie || Q[0] & /*isSnapped*/
|
|
4892
4897
|
256) && z(
|
|
4893
4898
|
S,
|
|
4894
4899
|
"active",
|
|
4895
4900
|
/*isSnapped*/
|
|
4896
4901
|
U[8]
|
|
4897
|
-
), (!ie ||
|
|
4898
|
-
256) &&
|
|
4899
|
-
U[8] ? "取消吸附" : "吸附到边缘") && Xe(I,
|
|
4902
|
+
), (!ie || Q[0] & /*isSnapped*/
|
|
4903
|
+
256) && L !== (L = /*isSnapped*/
|
|
4904
|
+
U[8] ? "取消吸附" : "吸附到边缘") && Xe(I, L), Q[0] & /*mergedOptions*/
|
|
4900
4905
|
8 && F(
|
|
4901
4906
|
v,
|
|
4902
4907
|
"z-index",
|
|
4903
4908
|
/*mergedOptions*/
|
|
4904
4909
|
((st = U[3].zIndex) != null ? st : 1e3) + 3
|
|
4905
|
-
),
|
|
4910
|
+
), Q[0] & /*mergedOptions*/
|
|
4906
4911
|
8 && F(
|
|
4907
4912
|
te,
|
|
4908
4913
|
"z-index",
|
|
4909
4914
|
/*mergedOptions*/
|
|
4910
4915
|
((fe = U[3].zIndex) != null ? fe : 1e3) + 3
|
|
4911
|
-
), (!ie ||
|
|
4916
|
+
), (!ie || Q[0] & /*isDragging*/
|
|
4912
4917
|
64) && z(
|
|
4913
4918
|
s,
|
|
4914
4919
|
"dragging",
|
|
4915
4920
|
/*isDragging*/
|
|
4916
4921
|
U[6]
|
|
4917
|
-
), (!ie ||
|
|
4922
|
+
), (!ie || Q[0] & /*isFullscreen*/
|
|
4918
4923
|
4) && z(
|
|
4919
4924
|
s,
|
|
4920
4925
|
"fullscreen",
|
|
4921
4926
|
/*isFullscreen*/
|
|
4922
4927
|
U[2]
|
|
4923
|
-
), (!ie ||
|
|
4928
|
+
), (!ie || Q[0] & /*isSnapped*/
|
|
4924
4929
|
256) && z(
|
|
4925
4930
|
s,
|
|
4926
4931
|
"snapped",
|
|
4927
4932
|
/*isSnapped*/
|
|
4928
4933
|
U[8]
|
|
4929
4934
|
);
|
|
4930
|
-
let Oe =
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
}), Vn(), le =
|
|
4935
|
+
let Oe = K;
|
|
4936
|
+
K = nt(U), K === Oe ? Le[K].p(U, Q) : (Xn(), wt(Le[Oe], 1, 1, () => {
|
|
4937
|
+
Le[Oe] = null;
|
|
4938
|
+
}), Vn(), le = Le[K], le ? le.p(U, Q) : (le = Le[K] = Ve[K](U), le.c()), et(le, 1), le.m(n, null)), (!ie || Q[0] & /*isFullscreen*/
|
|
4934
4939
|
4) && z(
|
|
4935
4940
|
e,
|
|
4936
4941
|
"fullscreen",
|
|
4937
4942
|
/*isFullscreen*/
|
|
4938
4943
|
U[2]
|
|
4939
|
-
), (!ie ||
|
|
4944
|
+
), (!ie || Q[0] & /*mergedOptions*/
|
|
4940
4945
|
8) && z(
|
|
4941
4946
|
e,
|
|
4942
4947
|
"screen-theme",
|
|
4943
4948
|
/*mergedOptions*/
|
|
4944
4949
|
U[3].theme === "screen"
|
|
4945
|
-
),
|
|
4950
|
+
), Q[0] & /*mergedOptions*/
|
|
4946
4951
|
8 && Ge !== (Ge = `${/*mergedOptions*/
|
|
4947
4952
|
U[3].height}px`) && F(e, "height", Ge);
|
|
4948
4953
|
},
|
|
@@ -4953,7 +4958,7 @@ function ri(t) {
|
|
|
4953
4958
|
wt(le), ie = !1;
|
|
4954
4959
|
},
|
|
4955
4960
|
d(U) {
|
|
4956
|
-
U && B(e), Ae.d(), ge.d(),
|
|
4961
|
+
U && B(e), Ae.d(), ge.d(), Le[K].d(), Ze = !1, Me(Z);
|
|
4957
4962
|
}
|
|
4958
4963
|
};
|
|
4959
4964
|
}
|
|
@@ -4961,7 +4966,7 @@ function Cr(t) {
|
|
|
4961
4966
|
let e;
|
|
4962
4967
|
return {
|
|
4963
4968
|
c() {
|
|
4964
|
-
e = Y("path"),
|
|
4969
|
+
e = Y("path"), u(e, "d", "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3");
|
|
4965
4970
|
},
|
|
4966
4971
|
m(n, s) {
|
|
4967
4972
|
W(n, e, s);
|
|
@@ -4975,7 +4980,7 @@ function zr(t) {
|
|
|
4975
4980
|
let e;
|
|
4976
4981
|
return {
|
|
4977
4982
|
c() {
|
|
4978
|
-
e = Y("path"),
|
|
4983
|
+
e = Y("path"), u(e, "d", "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3");
|
|
4979
4984
|
},
|
|
4980
4985
|
m(n, s) {
|
|
4981
4986
|
W(n, e, s);
|
|
@@ -4989,7 +4994,7 @@ function Dr(t) {
|
|
|
4989
4994
|
let e, n;
|
|
4990
4995
|
return {
|
|
4991
4996
|
c() {
|
|
4992
|
-
e = Y("rect"), n = Y("line"),
|
|
4997
|
+
e = Y("rect"), n = Y("line"), u(e, "x", "3"), u(e, "y", "3"), u(e, "width", "18"), u(e, "height", "18"), u(e, "rx", "2"), u(e, "ry", "2"), u(n, "x1", "16"), u(n, "y1", "6"), u(n, "x2", "16"), u(n, "y2", "18");
|
|
4993
4998
|
},
|
|
4994
4999
|
m(s, i) {
|
|
4995
5000
|
W(s, e, i), W(s, n, i);
|
|
@@ -5003,7 +5008,7 @@ function Or(t) {
|
|
|
5003
5008
|
let e, n;
|
|
5004
5009
|
return {
|
|
5005
5010
|
c() {
|
|
5006
|
-
e = Y("rect"), n = Y("rect"),
|
|
5011
|
+
e = Y("rect"), n = Y("rect"), u(e, "x", "3"), u(e, "y", "3"), u(e, "width", "18"), u(e, "height", "18"), u(e, "rx", "2"), u(e, "ry", "2"), u(n, "x", "12"), u(n, "y", "10"), u(n, "width", "6"), u(n, "height", "8"), u(n, "rx", "1"), u(n, "ry", "1");
|
|
5007
5012
|
},
|
|
5008
5013
|
m(s, i) {
|
|
5009
5014
|
W(s, e, i), W(s, n, i);
|
|
@@ -5014,9 +5019,9 @@ function Or(t) {
|
|
|
5014
5019
|
};
|
|
5015
5020
|
}
|
|
5016
5021
|
function Pr(t) {
|
|
5017
|
-
var s, i, o, l, r,
|
|
5022
|
+
var s, i, o, l, r, c, a, f, g, m, h, d, w;
|
|
5018
5023
|
let e, n;
|
|
5019
|
-
return e = new
|
|
5024
|
+
return e = new Lr({
|
|
5020
5025
|
props: {
|
|
5021
5026
|
zIndex: (
|
|
5022
5027
|
/*mergedOptions*/
|
|
@@ -5044,7 +5049,7 @@ function Pr(t) {
|
|
|
5044
5049
|
),
|
|
5045
5050
|
showActions: (
|
|
5046
5051
|
/*mergedOptions*/
|
|
5047
|
-
(
|
|
5052
|
+
(c = t[3].showActions) != null ? c : !0
|
|
5048
5053
|
),
|
|
5049
5054
|
sendIcon: (
|
|
5050
5055
|
/*mergedOptions*/
|
|
@@ -5091,7 +5096,7 @@ function Pr(t) {
|
|
|
5091
5096
|
bn(e, T, E), n = !0;
|
|
5092
5097
|
},
|
|
5093
5098
|
p(T, E) {
|
|
5094
|
-
var S, _,
|
|
5099
|
+
var S, _, M, R, v, L, I, V, H, D, G, te, ne;
|
|
5095
5100
|
const y = {};
|
|
5096
5101
|
E[0] & /*mergedOptions*/
|
|
5097
5102
|
8 && (y.zIndex = /*mergedOptions*/
|
|
@@ -5101,17 +5106,17 @@ function Pr(t) {
|
|
|
5101
5106
|
8 && (y.hasScene = /*mergedOptions*/
|
|
5102
5107
|
(_ = T[3].hasScene) != null ? _ : !1), E[0] & /*mergedOptions*/
|
|
5103
5108
|
8 && (y.apiPrefix = /*mergedOptions*/
|
|
5104
|
-
(
|
|
5109
|
+
(M = T[3].apiPrefix) != null ? M : "/aiops/aigc"), E[0] & /*mergedOptions*/
|
|
5105
5110
|
8 && (y.theme = /*mergedOptions*/
|
|
5106
5111
|
(R = T[3].theme) != null ? R : "default"), E[0] & /*mergedOptions*/
|
|
5107
5112
|
8 && (y.showHistory = /*mergedOptions*/
|
|
5108
5113
|
(v = T[3].showHistory) != null ? v : !0), E[0] & /*mergedOptions*/
|
|
5109
5114
|
8 && (y.showActions = /*mergedOptions*/
|
|
5110
|
-
(
|
|
5115
|
+
(L = T[3].showActions) != null ? L : !0), E[0] & /*mergedOptions*/
|
|
5111
5116
|
8 && (y.sendIcon = /*mergedOptions*/
|
|
5112
5117
|
(I = T[3].sendIcon) != null ? I : ""), E[0] & /*mergedOptions*/
|
|
5113
5118
|
8 && (y.robotIcon = /*mergedOptions*/
|
|
5114
|
-
(
|
|
5119
|
+
(V = T[3].robotIcon) != null ? V : ""), E[0] & /*mergedOptions*/
|
|
5115
5120
|
8 && (y.userIcon = /*mergedOptions*/
|
|
5116
5121
|
(H = T[3].userIcon) != null ? H : ""), E[0] & /*mergedOptions*/
|
|
5117
5122
|
8 && (y.maxInputLength = /*mergedOptions*/
|
|
@@ -5165,13 +5170,13 @@ function Nr(t) {
|
|
|
5165
5170
|
bn(e, o, l), n = !0;
|
|
5166
5171
|
},
|
|
5167
5172
|
p(o, l) {
|
|
5168
|
-
var
|
|
5173
|
+
var c, a;
|
|
5169
5174
|
const r = {};
|
|
5170
5175
|
l[0] & /*showHistoryPanel*/
|
|
5171
5176
|
512 && (r.onClose = /*func*/
|
|
5172
5177
|
o[32]), l[0] & /*mergedOptions*/
|
|
5173
5178
|
8 && (r.zIndex = /*mergedOptions*/
|
|
5174
|
-
(
|
|
5179
|
+
(c = o[3].zIndex) != null ? c : 1e3), l[0] & /*mergedOptions*/
|
|
5175
5180
|
8 && (r.apiPrefix = /*mergedOptions*/
|
|
5176
5181
|
(a = o[3].apiPrefix) != null ? a : "/aiops/aigc"), e.$set(r);
|
|
5177
5182
|
},
|
|
@@ -5187,21 +5192,21 @@ function Nr(t) {
|
|
|
5187
5192
|
};
|
|
5188
5193
|
}
|
|
5189
5194
|
function Fr(t) {
|
|
5190
|
-
let e, n, s, i, o, l, r,
|
|
5195
|
+
let e, n, s, i, o, l, r, c, a, f;
|
|
5191
5196
|
return {
|
|
5192
5197
|
c() {
|
|
5193
|
-
e = Y("svg"), n = Y("path"), s = Y("path"), i = Y("path"), o = Y("path"), l = Y("path"), r = Y("path"),
|
|
5198
|
+
e = Y("svg"), n = Y("path"), s = Y("path"), i = Y("path"), o = Y("path"), l = Y("path"), r = Y("path"), c = Y("path"), u(n, "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"), u(n, "fill", "#6F8698"), u(s, "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"), u(s, "fill", "#3677FF"), u(i, "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"), u(i, "fill", "#D0D5F1"), u(o, "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"), u(o, "fill", "#3677FF"), u(l, "d", "M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), u(l, "fill", "#FFFFFF"), u(r, "d", "M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), u(r, "fill", "#FFFFFF"), u(c, "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"), u(c, "fill", "#8896A4"), u(e, "class", "sy-assistant-icon"), u(e, "viewBox", "0 0 1024 1024"), u(e, "version", "1.1"), u(e, "xmlns", "http://www.w3.org/2000/svg"), u(e, "width", a = /*mergedOptions*/
|
|
5194
5199
|
t[3].isSelf ? void 0 : (
|
|
5195
5200
|
/*mergedOptions*/
|
|
5196
5201
|
t[3].iconWidth
|
|
5197
|
-
)),
|
|
5202
|
+
)), u(e, "height", f = /*mergedOptions*/
|
|
5198
5203
|
t[3].isSelf ? void 0 : (
|
|
5199
5204
|
/*mergedOptions*/
|
|
5200
5205
|
t[3].iconHeight
|
|
5201
|
-
)),
|
|
5206
|
+
)), u(e, "fill", "currentColor"), u(e, "aria-label", "助手图标");
|
|
5202
5207
|
},
|
|
5203
5208
|
m(g, m) {
|
|
5204
|
-
W(g, e, m), b(e, n), b(e, s), b(e, i), b(e, o), b(e, l), b(e, r), b(e,
|
|
5209
|
+
W(g, e, m), b(e, n), b(e, s), b(e, i), b(e, o), b(e, l), b(e, r), b(e, c);
|
|
5205
5210
|
},
|
|
5206
5211
|
p(g, m) {
|
|
5207
5212
|
m[0] & /*mergedOptions*/
|
|
@@ -5209,12 +5214,12 @@ function Fr(t) {
|
|
|
5209
5214
|
g[3].isSelf ? void 0 : (
|
|
5210
5215
|
/*mergedOptions*/
|
|
5211
5216
|
g[3].iconWidth
|
|
5212
|
-
)) &&
|
|
5217
|
+
)) && u(e, "width", a), m[0] & /*mergedOptions*/
|
|
5213
5218
|
8 && f !== (f = /*mergedOptions*/
|
|
5214
5219
|
g[3].isSelf ? void 0 : (
|
|
5215
5220
|
/*mergedOptions*/
|
|
5216
5221
|
g[3].iconHeight
|
|
5217
|
-
)) &&
|
|
5222
|
+
)) && u(e, "height", f);
|
|
5218
5223
|
},
|
|
5219
5224
|
d(g) {
|
|
5220
5225
|
g && B(e);
|
|
@@ -5223,9 +5228,9 @@ function Fr(t) {
|
|
|
5223
5228
|
}
|
|
5224
5229
|
function Hr(t) {
|
|
5225
5230
|
let e, n, s;
|
|
5226
|
-
function i(r,
|
|
5227
|
-
return
|
|
5228
|
-
8 && (e = null),
|
|
5231
|
+
function i(r, c) {
|
|
5232
|
+
return c[0] & /*mergedOptions*/
|
|
5233
|
+
8 && (e = null), c[0] & /*mergedOptions*/
|
|
5229
5234
|
8 && (n = null), e == null && (e = !!/*mergedOptions*/
|
|
5230
5235
|
(r[3].icon.startsWith("data:image") || /*mergedOptions*/
|
|
5231
5236
|
r[3].icon.startsWith("data:image/svg+xml"))), e ? jr : (n == null && (n = !!/*mergedOptions*/
|
|
@@ -5236,11 +5241,11 @@ function Hr(t) {
|
|
|
5236
5241
|
c() {
|
|
5237
5242
|
l.c(), s = Ft();
|
|
5238
5243
|
},
|
|
5239
|
-
m(r,
|
|
5240
|
-
l.m(r,
|
|
5244
|
+
m(r, c) {
|
|
5245
|
+
l.m(r, c), W(r, s, c);
|
|
5241
5246
|
},
|
|
5242
|
-
p(r,
|
|
5243
|
-
o === (o = i(r,
|
|
5247
|
+
p(r, c) {
|
|
5248
|
+
o === (o = i(r, c)) && l ? l.p(r, c) : (l.d(1), l = o(r), l && (l.c(), l.m(s.parentNode, s)));
|
|
5244
5249
|
},
|
|
5245
5250
|
d(r) {
|
|
5246
5251
|
r && B(s), l.d(r);
|
|
@@ -5248,21 +5253,21 @@ function Hr(t) {
|
|
|
5248
5253
|
};
|
|
5249
5254
|
}
|
|
5250
5255
|
function Br(t) {
|
|
5251
|
-
let e, n, s, i, o, l, r,
|
|
5256
|
+
let e, n, s, i, o, l, r, c, a, f;
|
|
5252
5257
|
return {
|
|
5253
5258
|
c() {
|
|
5254
|
-
e = Y("svg"), n = Y("path"), s = Y("path"), i = Y("path"), o = Y("path"), l = Y("path"), r = Y("path"),
|
|
5259
|
+
e = Y("svg"), n = Y("path"), s = Y("path"), i = Y("path"), o = Y("path"), l = Y("path"), r = Y("path"), c = Y("path"), u(n, "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"), u(n, "fill", "#6F8698"), u(s, "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"), u(s, "fill", "#3677FF"), u(i, "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"), u(i, "fill", "#D0D5F1"), u(o, "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"), u(o, "fill", "#3677FF"), u(l, "d", "M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), u(l, "fill", "#FFFFFF"), u(r, "d", "M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), u(r, "fill", "#FFFFFF"), u(c, "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"), u(c, "fill", "#8896A4"), u(e, "class", "sy-assistant-icon"), u(e, "viewBox", "0 0 1024 1024"), u(e, "version", "1.1"), u(e, "xmlns", "http://www.w3.org/2000/svg"), u(e, "width", a = /*mergedOptions*/
|
|
5255
5260
|
t[3].isSelf ? void 0 : (
|
|
5256
5261
|
/*mergedOptions*/
|
|
5257
5262
|
t[3].iconWidth
|
|
5258
|
-
)),
|
|
5263
|
+
)), u(e, "height", f = /*mergedOptions*/
|
|
5259
5264
|
t[3].isSelf ? void 0 : (
|
|
5260
5265
|
/*mergedOptions*/
|
|
5261
5266
|
t[3].iconHeight
|
|
5262
|
-
)),
|
|
5267
|
+
)), u(e, "fill", "currentColor"), u(e, "aria-label", "助手图标");
|
|
5263
5268
|
},
|
|
5264
5269
|
m(g, m) {
|
|
5265
|
-
W(g, e, m), b(e, n), b(e, s), b(e, i), b(e, o), b(e, l), b(e, r), b(e,
|
|
5270
|
+
W(g, e, m), b(e, n), b(e, s), b(e, i), b(e, o), b(e, l), b(e, r), b(e, c);
|
|
5266
5271
|
},
|
|
5267
5272
|
p(g, m) {
|
|
5268
5273
|
m[0] & /*mergedOptions*/
|
|
@@ -5270,12 +5275,12 @@ function Br(t) {
|
|
|
5270
5275
|
g[3].isSelf ? void 0 : (
|
|
5271
5276
|
/*mergedOptions*/
|
|
5272
5277
|
g[3].iconWidth
|
|
5273
|
-
)) &&
|
|
5278
|
+
)) && u(e, "width", a), m[0] & /*mergedOptions*/
|
|
5274
5279
|
8 && f !== (f = /*mergedOptions*/
|
|
5275
5280
|
g[3].isSelf ? void 0 : (
|
|
5276
5281
|
/*mergedOptions*/
|
|
5277
5282
|
g[3].iconHeight
|
|
5278
|
-
)) &&
|
|
5283
|
+
)) && u(e, "height", f);
|
|
5279
5284
|
},
|
|
5280
5285
|
d(g) {
|
|
5281
5286
|
g && B(e);
|
|
@@ -5325,7 +5330,7 @@ function jr(t) {
|
|
|
5325
5330
|
return {
|
|
5326
5331
|
c() {
|
|
5327
5332
|
e = x("img"), ps(e.src, n = /*mergedOptions*/
|
|
5328
|
-
t[3].icon) ||
|
|
5333
|
+
t[3].icon) || u(e, "src", n), u(e, "alt", "助手图标"), u(e, "style", s = /*mergedOptions*/
|
|
5329
5334
|
t[3].isSelf ? "" : `width: ${/*mergedOptions*/
|
|
5330
5335
|
t[3].iconWidth}px; height: ${/*mergedOptions*/
|
|
5331
5336
|
t[3].iconHeight}px;`);
|
|
@@ -5336,11 +5341,11 @@ function jr(t) {
|
|
|
5336
5341
|
p(i, o) {
|
|
5337
5342
|
o[0] & /*mergedOptions*/
|
|
5338
5343
|
8 && !ps(e.src, n = /*mergedOptions*/
|
|
5339
|
-
i[3].icon) &&
|
|
5344
|
+
i[3].icon) && u(e, "src", n), o[0] & /*mergedOptions*/
|
|
5340
5345
|
8 && s !== (s = /*mergedOptions*/
|
|
5341
5346
|
i[3].isSelf ? "" : `width: ${/*mergedOptions*/
|
|
5342
5347
|
i[3].iconWidth}px; height: ${/*mergedOptions*/
|
|
5343
|
-
i[3].iconHeight}px;`) &&
|
|
5348
|
+
i[3].iconHeight}px;`) && u(e, "style", s);
|
|
5344
5349
|
},
|
|
5345
5350
|
d(i) {
|
|
5346
5351
|
i && B(e);
|
|
@@ -5349,7 +5354,7 @@ function jr(t) {
|
|
|
5349
5354
|
}
|
|
5350
5355
|
function Ur(t) {
|
|
5351
5356
|
let e, n, s = `${/*$drawerWidth*/
|
|
5352
|
-
t[13]}px`, i, o, l, r,
|
|
5357
|
+
t[13]}px`, i, o, l, r, c, a, f = (
|
|
5353
5358
|
/*$drawerWidth*/
|
|
5354
5359
|
t[13] > 0 && ri(t)
|
|
5355
5360
|
);
|
|
@@ -5363,12 +5368,12 @@ function Ur(t) {
|
|
|
5363
5368
|
return {
|
|
5364
5369
|
c() {
|
|
5365
5370
|
var d, w;
|
|
5366
|
-
e = x("div"), n = x("div"), f && f.c(), i = q(), o = x("button"), h.c(),
|
|
5371
|
+
e = x("div"), n = x("div"), f && f.c(), i = q(), o = x("button"), h.c(), u(n, "class", "sy-assistant-drawer-wrapper svelte-1h7dpbq"), z(
|
|
5367
5372
|
n,
|
|
5368
5373
|
"fullscreen",
|
|
5369
5374
|
/*isFullscreen*/
|
|
5370
5375
|
t[2]
|
|
5371
|
-
), F(n, "width", s),
|
|
5376
|
+
), F(n, "width", s), u(o, "class", "sy-assistant-floating-button svelte-1h7dpbq"), u(o, "aria-label", "打开助手"), u(o, "style", l = /*buttonStyle*/
|
|
5372
5377
|
t[11] + " z-index: " + /*mergedOptions*/
|
|
5373
5378
|
(((d = t[3].zIndex) != null ? d : 1e3) + 1) + "; " + /*getButtonSizeStyle*/
|
|
5374
5379
|
t[21]()), z(
|
|
@@ -5396,7 +5401,7 @@ function Ur(t) {
|
|
|
5396
5401
|
"hidden-bottom",
|
|
5397
5402
|
/*hideDirection*/
|
|
5398
5403
|
t[7] === "bottom"
|
|
5399
|
-
),
|
|
5404
|
+
), u(e, "class", "sy-assistant-container sy-assistant-theme svelte-1h7dpbq"), z(
|
|
5400
5405
|
e,
|
|
5401
5406
|
"fullscreen",
|
|
5402
5407
|
/*isFullscreen*/
|
|
@@ -5447,7 +5452,7 @@ function Ur(t) {
|
|
|
5447
5452
|
);
|
|
5448
5453
|
},
|
|
5449
5454
|
m(d, w) {
|
|
5450
|
-
W(d, e, w), b(e, n), f && f.m(n, null), b(e, i), b(e, o), h.m(o, null), t[35](o), t[37](e), r = !0,
|
|
5455
|
+
W(d, e, w), b(e, n), f && f.m(n, null), b(e, i), b(e, o), h.m(o, null), t[35](o), t[37](e), r = !0, c || (a = [
|
|
5451
5456
|
j(
|
|
5452
5457
|
o,
|
|
5453
5458
|
"click",
|
|
@@ -5470,7 +5475,7 @@ function Ur(t) {
|
|
|
5470
5475
|
/*handleButtonMouseLeave*/
|
|
5471
5476
|
t[23]
|
|
5472
5477
|
)
|
|
5473
|
-
],
|
|
5478
|
+
], c = !0);
|
|
5474
5479
|
},
|
|
5475
5480
|
p(d, w) {
|
|
5476
5481
|
var T, E;
|
|
@@ -5490,7 +5495,7 @@ function Ur(t) {
|
|
|
5490
5495
|
2056 && l !== (l = /*buttonStyle*/
|
|
5491
5496
|
d[11] + " z-index: " + /*mergedOptions*/
|
|
5492
5497
|
(((T = d[3].zIndex) != null ? T : 1e3) + 1) + "; " + /*getButtonSizeStyle*/
|
|
5493
|
-
d[21]())) &&
|
|
5498
|
+
d[21]())) && u(o, "style", l), (!r || w[0] & /*mergedOptions*/
|
|
5494
5499
|
8) && z(
|
|
5495
5500
|
o,
|
|
5496
5501
|
"isSelf",
|
|
@@ -5586,7 +5591,7 @@ function Ur(t) {
|
|
|
5586
5591
|
wt(f), r = !1;
|
|
5587
5592
|
},
|
|
5588
5593
|
d(d) {
|
|
5589
|
-
d && B(e), f && f.d(), h.d(), t[35](null), t[37](null),
|
|
5594
|
+
d && B(e), f && f.d(), h.d(), t[35](null), t[37](null), c = !1, Me(a);
|
|
5590
5595
|
}
|
|
5591
5596
|
};
|
|
5592
5597
|
}
|
|
@@ -5594,7 +5599,7 @@ const li = 48, we = 20;
|
|
|
5594
5599
|
function qr(t) {
|
|
5595
5600
|
}
|
|
5596
5601
|
function Gr(t, e, n) {
|
|
5597
|
-
let s, i, o, l, r = je,
|
|
5602
|
+
let s, i, o, l, r = je, c = () => (r(), r = ji(i, (C) => n(13, l = C)), i);
|
|
5598
5603
|
t.$$.on_destroy.push(() => r());
|
|
5599
5604
|
const a = di(), f = {
|
|
5600
5605
|
position: "fixed",
|
|
@@ -5631,7 +5636,7 @@ function Gr(t, e, n) {
|
|
|
5631
5636
|
// SSE 超时的默认值(不设置超时)
|
|
5632
5637
|
sseTimeout: 0
|
|
5633
5638
|
};
|
|
5634
|
-
let { target: g = "body" } = e, { options: m = {} } = e, h, d = null, w = !1, T, E = !1, y = 0, S = 0, _ = we,
|
|
5639
|
+
let { target: g = "body" } = e, { options: m = {} } = e, h, d = null, w = !1, T, E = !1, y = 0, S = 0, _ = we, M = 20, R = _, v = M, L = !1, I = we, V = 50, H = !1, D = !1, G = null, te = null, ne = "", K = {
|
|
5635
5640
|
left: "auto",
|
|
5636
5641
|
right: `${we}px`,
|
|
5637
5642
|
top: "auto",
|
|
@@ -5650,41 +5655,41 @@ function Gr(t, e, n) {
|
|
|
5650
5655
|
});
|
|
5651
5656
|
if (!C.ok)
|
|
5652
5657
|
throw new Error("Failed to get session ID");
|
|
5653
|
-
const
|
|
5654
|
-
if (
|
|
5655
|
-
return n(10, Qe =
|
|
5656
|
-
throw new Error(
|
|
5658
|
+
const $ = yield C.json();
|
|
5659
|
+
if ($.code === 0)
|
|
5660
|
+
return n(10, Qe = $.data.sessionId), Qe;
|
|
5661
|
+
throw new Error($.message || "Failed to get session ID");
|
|
5657
5662
|
} catch (C) {
|
|
5658
5663
|
return console.error("Failed to get session ID:", C), null;
|
|
5659
5664
|
}
|
|
5660
5665
|
});
|
|
5661
5666
|
}
|
|
5662
|
-
function Ae(C,
|
|
5663
|
-
|
|
5667
|
+
function Ae(C, $ = !1) {
|
|
5668
|
+
$ ? n(27, L = !0) : n(6, E = !0), y = C.clientX, S = C.clientY, _ = $ ? I : R, M = $ ? V : v, C.preventDefault();
|
|
5664
5669
|
}
|
|
5665
5670
|
function ue(C) {
|
|
5666
|
-
if (!E && !
|
|
5667
|
-
const
|
|
5668
|
-
if (
|
|
5669
|
-
const ye = _ +
|
|
5671
|
+
if (!E && !L) return;
|
|
5672
|
+
const $ = y - C.clientX, pe = S - C.clientY;
|
|
5673
|
+
if (L) {
|
|
5674
|
+
const ye = _ + $, Pe = C.clientY, Re = ht();
|
|
5670
5675
|
n(28, I = Math.max(we, Math.min(window.innerWidth - Re - we, ye)));
|
|
5671
5676
|
const Ne = window.innerHeight - Re - we, Ke = Math.max(we, Math.min(Ne, Pe));
|
|
5672
|
-
|
|
5677
|
+
V = (window.innerHeight - Ke - Re) / window.innerHeight * 100, n(31, K = {
|
|
5673
5678
|
left: "auto",
|
|
5674
5679
|
right: `${I}px`,
|
|
5675
5680
|
top: "auto",
|
|
5676
|
-
bottom: `${
|
|
5681
|
+
bottom: `${V}%`
|
|
5677
5682
|
}), n(30, ne = ""), n(7, te = null);
|
|
5678
5683
|
} else {
|
|
5679
|
-
const ye = s.width || 0, Pe = s.height || 0, Re = _ +
|
|
5684
|
+
const ye = s.width || 0, Pe = s.height || 0, Re = _ + $;
|
|
5680
5685
|
n(0, R = Math.max(we, Math.min(window.innerWidth - ye - we, Re)));
|
|
5681
|
-
const Ne =
|
|
5686
|
+
const Ne = M + pe;
|
|
5682
5687
|
n(1, v = Math.max(we, Math.min(window.innerHeight - Pe - we, Ne)));
|
|
5683
5688
|
}
|
|
5684
5689
|
}
|
|
5685
5690
|
function xe() {
|
|
5686
|
-
const C =
|
|
5687
|
-
n(6, E = !1), n(27,
|
|
5691
|
+
const C = L;
|
|
5692
|
+
n(6, E = !1), n(27, L = !1), C && s.hideEnabled && !w && !H && ge();
|
|
5688
5693
|
}
|
|
5689
5694
|
function ge() {
|
|
5690
5695
|
!s.hideEnabled || w || H || (Ve(), G = setTimeout(
|
|
@@ -5697,8 +5702,8 @@ function Gr(t, e, n) {
|
|
|
5697
5702
|
function Ve() {
|
|
5698
5703
|
G && (clearTimeout(G), G = null);
|
|
5699
5704
|
}
|
|
5700
|
-
function
|
|
5701
|
-
const C = window.innerWidth,
|
|
5705
|
+
function Le() {
|
|
5706
|
+
const C = window.innerWidth, $ = window.innerHeight, pe = ht(), ye = C - I - pe, Pe = $ - V / 100 * $ - pe, Re = ye, Ne = C - ye - pe, Ie = Pe, Ke = $ - Pe - pe, dt = Math.min(Re, Ne, Ie, Ke);
|
|
5702
5707
|
return dt === Re ? {
|
|
5703
5708
|
direction: "left",
|
|
5704
5709
|
position: {
|
|
@@ -5740,41 +5745,41 @@ function Gr(t, e, n) {
|
|
|
5740
5745
|
function nt() {
|
|
5741
5746
|
if (w || H)
|
|
5742
5747
|
return;
|
|
5743
|
-
const C =
|
|
5744
|
-
n(7, te = C.direction), n(31,
|
|
5748
|
+
const C = Le();
|
|
5749
|
+
n(7, te = C.direction), n(31, K = C.position), n(30, ne = C.transform), D = !0;
|
|
5745
5750
|
}
|
|
5746
5751
|
function U() {
|
|
5747
|
-
D && (n(7, te = null), n(31,
|
|
5752
|
+
D && (n(7, te = null), n(31, K = {
|
|
5748
5753
|
left: "auto",
|
|
5749
5754
|
right: `${I}px`,
|
|
5750
5755
|
top: "auto",
|
|
5751
|
-
bottom: `${
|
|
5756
|
+
bottom: `${V}%`
|
|
5752
5757
|
}), n(30, ne = ""), D = !1);
|
|
5753
5758
|
}
|
|
5754
5759
|
Yn(() => {
|
|
5755
5760
|
typeof g == "string" ? d = document.querySelector(g) || document.body : d = g || document.body;
|
|
5756
|
-
const C = (pe) => ue(pe),
|
|
5757
|
-
return document.addEventListener("mousemove", C), document.addEventListener("mouseup",
|
|
5761
|
+
const C = (pe) => ue(pe), $ = () => xe();
|
|
5762
|
+
return document.addEventListener("mousemove", C), document.addEventListener("mouseup", $), h && d && d.appendChild(h), T && T.getBoundingClientRect().left, n(8, ie = s.initialState === "snapped"), n(2, le = s.initialState === "fullscreen"), s.initialState === "snapped" ? (n(0, R = 0), n(1, v = 0), n(3, s = ke(oe({}, s), {
|
|
5758
5763
|
height: typeof window != "undefined" ? window.innerHeight : s.height,
|
|
5759
5764
|
width: s.snappedWidth || s.width
|
|
5760
5765
|
}))) : s.initialState === "fullscreen" && (n(0, R = 0), n(1, v = 0), n(3, s = ke(oe({}, s), {
|
|
5761
5766
|
width: typeof window != "undefined" ? window.innerWidth : s.width,
|
|
5762
5767
|
height: typeof window != "undefined" ? window.innerHeight : s.height
|
|
5763
5768
|
}))), s.hideEnabled && ge(), () => {
|
|
5764
|
-
document.removeEventListener("mousemove", C), document.removeEventListener("mouseup",
|
|
5769
|
+
document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", $), Ve(), d && h && d.removeChild(h);
|
|
5765
5770
|
};
|
|
5766
5771
|
});
|
|
5767
|
-
function
|
|
5772
|
+
function Q() {
|
|
5768
5773
|
return Se(this, null, function* () {
|
|
5769
5774
|
w ? s.hideEnabled && ge() : (yield he(), Ve(), D && U()), n(26, w = !w);
|
|
5770
5775
|
});
|
|
5771
5776
|
}
|
|
5772
5777
|
function Oe() {
|
|
5773
|
-
var C,
|
|
5778
|
+
var C, $, pe, ye, Pe, Re, Ne, Ie;
|
|
5774
5779
|
n(2, le = !le), le ? (Ge.width || (Ge = {
|
|
5775
5780
|
width: f.width,
|
|
5776
5781
|
height: f.height,
|
|
5777
|
-
right: (
|
|
5782
|
+
right: ($ = (C = f.defaultPosition) == null ? void 0 : C.right) != null ? $ : we,
|
|
5778
5783
|
bottom: (ye = (pe = f.defaultPosition) == null ? void 0 : pe.bottom) != null ? ye : we
|
|
5779
5784
|
}), ie && n(8, ie = !1), n(24, m = ke(oe({}, s), {
|
|
5780
5785
|
width: window.innerWidth,
|
|
@@ -5790,7 +5795,7 @@ function Gr(t, e, n) {
|
|
|
5790
5795
|
le || Ae(C);
|
|
5791
5796
|
}
|
|
5792
5797
|
function st() {
|
|
5793
|
-
var C,
|
|
5798
|
+
var C, $, pe, ye;
|
|
5794
5799
|
le && (n(2, le = !1), n(24, m = ke(oe({}, s), {
|
|
5795
5800
|
width: f.width,
|
|
5796
5801
|
height: f.height,
|
|
@@ -5803,7 +5808,7 @@ function Gr(t, e, n) {
|
|
|
5803
5808
|
width: f.width,
|
|
5804
5809
|
height: f.height,
|
|
5805
5810
|
drawerWidth: f.drawerWidth
|
|
5806
|
-
})), n(0, R = (
|
|
5811
|
+
})), n(0, R = ($ = (C = f.defaultPosition) == null ? void 0 : C.right) != null ? $ : we), n(1, v = (ye = (pe = f.defaultPosition) == null ? void 0 : pe.bottom) != null ? ye : we));
|
|
5807
5812
|
}
|
|
5808
5813
|
function fe() {
|
|
5809
5814
|
return s.isSelf ? s.iconWidth !== void 0 && s.iconHeight !== void 0 ? `width: ${s.iconWidth}px; height: ${s.iconHeight}px;` : "" : s.iconWidth !== void 0 && s.iconHeight !== void 0 ? `width: ${s.iconWidth}px; height: ${s.iconHeight}px;` : "width: 48px; height: 48px;";
|
|
@@ -5818,9 +5823,9 @@ function Gr(t, e, n) {
|
|
|
5818
5823
|
if (s.isSelf && T) {
|
|
5819
5824
|
const C = T.querySelector("img, svg");
|
|
5820
5825
|
if (C) {
|
|
5821
|
-
const
|
|
5822
|
-
if (
|
|
5823
|
-
return { width:
|
|
5826
|
+
const $ = C.getBoundingClientRect();
|
|
5827
|
+
if ($.width > 0 && $.height > 0)
|
|
5828
|
+
return { width: $.width, height: $.height };
|
|
5824
5829
|
}
|
|
5825
5830
|
}
|
|
5826
5831
|
return s.iconWidth && s.iconHeight ? {
|
|
@@ -5829,8 +5834,8 @@ function Gr(t, e, n) {
|
|
|
5829
5834
|
} : { width: li, height: li };
|
|
5830
5835
|
}
|
|
5831
5836
|
function ht() {
|
|
5832
|
-
const { width: C, height:
|
|
5833
|
-
return Math.max(C,
|
|
5837
|
+
const { width: C, height: $ } = at();
|
|
5838
|
+
return Math.max(C, $);
|
|
5834
5839
|
}
|
|
5835
5840
|
const yt = () => n(9, Ze = !1), xt = (C) => a("firstResponse", C.detail), pt = (C) => {
|
|
5836
5841
|
n(10, Qe = C.detail.sessionId);
|
|
@@ -5853,7 +5858,7 @@ function Gr(t, e, n) {
|
|
|
5853
5858
|
16777216 && n(3, s = ke(oe(oe({}, f), m), {
|
|
5854
5859
|
defaultPosition: oe(oe({}, f.defaultPosition), m.defaultPosition)
|
|
5855
5860
|
})), t.$$.dirty[0] & /*isOpen, isFullscreen, mergedOptions*/
|
|
5856
|
-
67108876 &&
|
|
5861
|
+
67108876 && c(n(12, i = so(
|
|
5857
5862
|
w ? le ? window.innerWidth : s.drawerWidth : 0,
|
|
5858
5863
|
{ stiffness: 0.1, damping: 0.6 }
|
|
5859
5864
|
))), t.$$.dirty[0] & /*mergedOptions, right, bottom, buttonRight*/
|
|
@@ -5865,7 +5870,7 @@ function Gr(t, e, n) {
|
|
|
5865
5870
|
t.$$.dirty[0] & /*mergedOptions, isOpen, isButtonHovered*/
|
|
5866
5871
|
603979784 && (s.hideEnabled && !w && !H ? ge() : Ve()), t.$$.dirty[0] & /*isOpen, buttonTransform, isButtonDragging*/
|
|
5867
5872
|
1275068416 | t.$$.dirty[1] & /*buttonPosition*/
|
|
5868
|
-
1 && n(11, o = w ? "display: none;" : `position: fixed; left: ${
|
|
5873
|
+
1 && n(11, o = w ? "display: none;" : `position: fixed; left: ${K.left}; right: ${K.right}; top: ${K.top}; bottom: ${K.bottom}; transform: ${ne}; cursor: ${L ? "grabbing" : "grab"};`);
|
|
5869
5874
|
}, [
|
|
5870
5875
|
R,
|
|
5871
5876
|
v,
|
|
@@ -5884,7 +5889,7 @@ function Gr(t, e, n) {
|
|
|
5884
5889
|
a,
|
|
5885
5890
|
Z,
|
|
5886
5891
|
Ae,
|
|
5887
|
-
|
|
5892
|
+
Q,
|
|
5888
5893
|
Oe,
|
|
5889
5894
|
_e,
|
|
5890
5895
|
st,
|
|
@@ -5894,11 +5899,11 @@ function Gr(t, e, n) {
|
|
|
5894
5899
|
m,
|
|
5895
5900
|
g,
|
|
5896
5901
|
w,
|
|
5897
|
-
|
|
5902
|
+
L,
|
|
5898
5903
|
I,
|
|
5899
5904
|
H,
|
|
5900
5905
|
ne,
|
|
5901
|
-
|
|
5906
|
+
K,
|
|
5902
5907
|
yt,
|
|
5903
5908
|
xt,
|
|
5904
5909
|
pt,
|