@sy-design/svelte 1.0.34 → 1.0.35
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 +289 -281
- package/dist/index.umd.js +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4463,10 +4463,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4463
4463
|
let q = ne.keywordPatternRe.exec(fe), P = "";
|
|
4464
4464
|
for (; q; ) {
|
|
4465
4465
|
P += fe.substring(B, q.index);
|
|
4466
|
-
const K = Me.case_insensitive ? q[0].toLowerCase() : q[0],
|
|
4467
|
-
if (
|
|
4468
|
-
const [Ne, Pe] =
|
|
4469
|
-
if (ye.addText(P), P = "", de[K] = (de[K] || 0) + 1, de[K] <= Bf && (
|
|
4466
|
+
const K = Me.case_insensitive ? q[0].toLowerCase() : q[0], _e = oe(ne, K);
|
|
4467
|
+
if (_e) {
|
|
4468
|
+
const [Ne, Pe] = _e;
|
|
4469
|
+
if (ye.addText(P), P = "", de[K] = (de[K] || 0) + 1, de[K] <= Bf && (Oe += Pe), Ne.startsWith("_"))
|
|
4470
4470
|
P += q[0];
|
|
4471
4471
|
else {
|
|
4472
4472
|
const Fe = Me.classNameAliases[Ne] || Ne;
|
|
@@ -4490,7 +4490,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4490
4490
|
B._top;
|
|
4491
4491
|
} else
|
|
4492
4492
|
B = p(fe, ne.subLanguage.length ? ne.subLanguage : null);
|
|
4493
|
-
ne.relevance > 0 && (
|
|
4493
|
+
ne.relevance > 0 && (Oe += B.relevance), ye.__addSublanguage(B._emitter, B.language);
|
|
4494
4494
|
}
|
|
4495
4495
|
function pe() {
|
|
4496
4496
|
ne.subLanguage != null ? me() : Ae(), fe = "";
|
|
@@ -4506,8 +4506,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4506
4506
|
P++;
|
|
4507
4507
|
continue;
|
|
4508
4508
|
}
|
|
4509
|
-
const
|
|
4510
|
-
|
|
4509
|
+
const _e = Me.classNameAliases[B[P]] || B[P], Ne = q[P];
|
|
4510
|
+
_e ? ee(Ne, _e) : (fe = Ne, Ae(), fe = ""), P++;
|
|
4511
4511
|
}
|
|
4512
4512
|
}
|
|
4513
4513
|
function se(B, q) {
|
|
@@ -4517,8 +4517,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4517
4517
|
let K = ef(B.endRe, P);
|
|
4518
4518
|
if (K) {
|
|
4519
4519
|
if (B["on:end"]) {
|
|
4520
|
-
const
|
|
4521
|
-
B["on:end"](q,
|
|
4520
|
+
const _e = new xl(B);
|
|
4521
|
+
B["on:end"](q, _e), _e.isMatchIgnored && (K = !1);
|
|
4522
4522
|
}
|
|
4523
4523
|
if (K) {
|
|
4524
4524
|
for (; B.endsParent && B.parent; )
|
|
@@ -4533,8 +4533,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4533
4533
|
return ne.matcher.regexIndex === 0 ? (fe += B[0], 1) : (ze = !0, 0);
|
|
4534
4534
|
}
|
|
4535
4535
|
function Ie(B) {
|
|
4536
|
-
const q = B[0], P = B.rule, K = new xl(P),
|
|
4537
|
-
for (const Ne of
|
|
4536
|
+
const q = B[0], P = B.rule, K = new xl(P), _e = [P.__beforeBegin, P["on:begin"]];
|
|
4537
|
+
for (const Ne of _e)
|
|
4538
4538
|
if (Ne && (Ne(B, K), K.isMatchIgnored))
|
|
4539
4539
|
return Ee(q);
|
|
4540
4540
|
return P.skip ? fe += q : (P.excludeBegin && (fe += q), pe(), !P.returnBegin && !P.excludeBegin && (fe = q)), se(P, B), P.returnBegin ? 0 : q.length;
|
|
@@ -4543,12 +4543,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4543
4543
|
const q = B[0], P = k.substring(B.index), K = re(ne, B, P);
|
|
4544
4544
|
if (!K)
|
|
4545
4545
|
return Fl;
|
|
4546
|
-
const
|
|
4547
|
-
ne.endScope && ne.endScope._wrap ? (pe(), ee(q, ne.endScope._wrap)) : ne.endScope && ne.endScope._multi ? (pe(), Se(ne.endScope, B)) :
|
|
4546
|
+
const _e = ne;
|
|
4547
|
+
ne.endScope && ne.endScope._wrap ? (pe(), ee(q, ne.endScope._wrap)) : ne.endScope && ne.endScope._multi ? (pe(), Se(ne.endScope, B)) : _e.skip ? fe += q : (_e.returnEnd || _e.excludeEnd || (fe += q), pe(), _e.excludeEnd && (fe = q));
|
|
4548
4548
|
do
|
|
4549
|
-
ne.scope && ye.closeNode(), !ne.skip && !ne.subLanguage && (
|
|
4549
|
+
ne.scope && ye.closeNode(), !ne.skip && !ne.subLanguage && (Oe += ne.relevance), ne = ne.parent;
|
|
4550
4550
|
while (ne !== K.parent);
|
|
4551
|
-
return K.starts && se(K.starts, B),
|
|
4551
|
+
return K.starts && se(K.starts, B), _e.returnEnd ? 0 : q.length;
|
|
4552
4552
|
}
|
|
4553
4553
|
function ce() {
|
|
4554
4554
|
const B = [];
|
|
@@ -4556,19 +4556,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4556
4556
|
q.scope && B.unshift(q.scope);
|
|
4557
4557
|
B.forEach((q) => ye.openNode(q));
|
|
4558
4558
|
}
|
|
4559
|
-
let
|
|
4559
|
+
let he = {};
|
|
4560
4560
|
function Je(B, q) {
|
|
4561
4561
|
const P = q && q[0];
|
|
4562
4562
|
if (fe += B, P == null)
|
|
4563
4563
|
return pe(), 0;
|
|
4564
|
-
if (
|
|
4564
|
+
if (he.type === "begin" && q.type === "end" && he.index === q.index && P === "") {
|
|
4565
4565
|
if (fe += k.slice(q.index, q.index + 1), !a) {
|
|
4566
4566
|
const K = new Error(`0 width match regex (${D})`);
|
|
4567
|
-
throw K.languageName = D, K.badRule =
|
|
4567
|
+
throw K.languageName = D, K.badRule = he.rule, K;
|
|
4568
4568
|
}
|
|
4569
4569
|
return 1;
|
|
4570
4570
|
}
|
|
4571
|
-
if (
|
|
4571
|
+
if (he = q, q.type === "begin")
|
|
4572
4572
|
return Ie(q);
|
|
4573
4573
|
if (q.type === "illegal" && !W) {
|
|
4574
4574
|
const K = new Error('Illegal lexeme "' + P + '" for mode "' + (ne.scope || "<unnamed>") + '"');
|
|
@@ -4592,7 +4592,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4592
4592
|
let je = "", ne = z || st;
|
|
4593
4593
|
const ft = {}, ye = new o.__emitter(o);
|
|
4594
4594
|
ce();
|
|
4595
|
-
let fe = "",
|
|
4595
|
+
let fe = "", Oe = 0, lt = 0, bt = 0, ze = !1;
|
|
4596
4596
|
try {
|
|
4597
4597
|
if (Me.__emitTokens)
|
|
4598
4598
|
Me.__emitTokens(k, ye);
|
|
@@ -4609,7 +4609,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = D, z = k), W ===
|
|
|
4609
4609
|
return ye.finalize(), je = ye.toHTML(), {
|
|
4610
4610
|
language: D,
|
|
4611
4611
|
value: je,
|
|
4612
|
-
relevance:
|
|
4612
|
+
relevance: Oe,
|
|
4613
4613
|
illegal: !1,
|
|
4614
4614
|
_emitter: ye,
|
|
4615
4615
|
_top: ne
|
|
@@ -48508,7 +48508,7 @@ function $h() {
|
|
|
48508
48508
|
// Consume .keyword to prevent highlighting properties and methods as keywords.
|
|
48509
48509
|
match: n(/\./, a(...c)),
|
|
48510
48510
|
relevance: 0
|
|
48511
|
-
}, j = c.filter((
|
|
48511
|
+
}, j = c.filter((Re) => typeof Re == "string").concat(["_|0"]), Y = c.filter((Re) => typeof Re != "string").concat(l).map(i), D = { variants: [
|
|
48512
48512
|
{
|
|
48513
48513
|
className: "keyword",
|
|
48514
48514
|
match: a(...Y, ...o)
|
|
@@ -48568,36 +48568,36 @@ function $h() {
|
|
|
48568
48568
|
// binary-literal
|
|
48569
48569
|
{ match: /\b0b([01]_*)+\b/ }
|
|
48570
48570
|
]
|
|
48571
|
-
}, re = (
|
|
48571
|
+
}, re = (Re = "") => ({
|
|
48572
48572
|
className: "subst",
|
|
48573
48573
|
variants: [
|
|
48574
|
-
{ match: n(/\\/,
|
|
48575
|
-
{ match: n(/\\/,
|
|
48574
|
+
{ match: n(/\\/, Re, /[0\\tnr"']/) },
|
|
48575
|
+
{ match: n(/\\/, Re, /u\{[0-9a-fA-F]{1,8}\}/) }
|
|
48576
48576
|
]
|
|
48577
|
-
}), Ee = (
|
|
48577
|
+
}), Ee = (Re = "") => ({
|
|
48578
48578
|
className: "subst",
|
|
48579
|
-
match: n(/\\/,
|
|
48580
|
-
}), Ie = (
|
|
48579
|
+
match: n(/\\/, Re, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
48580
|
+
}), Ie = (Re = "") => ({
|
|
48581
48581
|
className: "subst",
|
|
48582
48582
|
label: "interpol",
|
|
48583
|
-
begin: n(/\\/,
|
|
48583
|
+
begin: n(/\\/, Re, /\(/),
|
|
48584
48584
|
end: /\)/
|
|
48585
|
-
}), H = (
|
|
48586
|
-
begin: n(
|
|
48587
|
-
end: n(/"""/,
|
|
48585
|
+
}), H = (Re = "") => ({
|
|
48586
|
+
begin: n(Re, /"""/),
|
|
48587
|
+
end: n(/"""/, Re),
|
|
48588
48588
|
contains: [
|
|
48589
|
-
re(
|
|
48590
|
-
Ee(
|
|
48591
|
-
Ie(
|
|
48589
|
+
re(Re),
|
|
48590
|
+
Ee(Re),
|
|
48591
|
+
Ie(Re)
|
|
48592
48592
|
]
|
|
48593
|
-
}), ce = (
|
|
48594
|
-
begin: n(
|
|
48595
|
-
end: n(/"/,
|
|
48593
|
+
}), ce = (Re = "") => ({
|
|
48594
|
+
begin: n(Re, /"/),
|
|
48595
|
+
end: n(/"/, Re),
|
|
48596
48596
|
contains: [
|
|
48597
|
-
re(
|
|
48598
|
-
Ie(
|
|
48597
|
+
re(Re),
|
|
48598
|
+
Ie(Re)
|
|
48599
48599
|
]
|
|
48600
|
-
}),
|
|
48600
|
+
}), he = {
|
|
48601
48601
|
className: "string",
|
|
48602
48602
|
variants: [
|
|
48603
48603
|
H(),
|
|
@@ -48621,8 +48621,8 @@ function $h() {
|
|
|
48621
48621
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
48622
48622
|
end: /\//,
|
|
48623
48623
|
contains: Je
|
|
48624
|
-
}, st = (
|
|
48625
|
-
const Nt = n(
|
|
48624
|
+
}, st = (Re) => {
|
|
48625
|
+
const Nt = n(Re, /\//), Mt = n(/\//, Re);
|
|
48626
48626
|
return {
|
|
48627
48627
|
begin: Nt,
|
|
48628
48628
|
end: Mt,
|
|
@@ -48653,7 +48653,7 @@ function $h() {
|
|
|
48653
48653
|
ne,
|
|
48654
48654
|
ft,
|
|
48655
48655
|
ye
|
|
48656
|
-
],
|
|
48656
|
+
], Oe = {
|
|
48657
48657
|
match: /(@|#(un)?)available/,
|
|
48658
48658
|
scope: "keyword",
|
|
48659
48659
|
starts: { contains: [
|
|
@@ -48664,7 +48664,7 @@ function $h() {
|
|
|
48664
48664
|
contains: [
|
|
48665
48665
|
...pe,
|
|
48666
48666
|
se,
|
|
48667
|
-
|
|
48667
|
+
he
|
|
48668
48668
|
]
|
|
48669
48669
|
}
|
|
48670
48670
|
] }
|
|
@@ -48675,7 +48675,7 @@ function $h() {
|
|
|
48675
48675
|
scope: "meta",
|
|
48676
48676
|
match: n(/@/, f)
|
|
48677
48677
|
}, ze = [
|
|
48678
|
-
|
|
48678
|
+
Oe,
|
|
48679
48679
|
lt,
|
|
48680
48680
|
bt
|
|
48681
48681
|
], B = {
|
|
@@ -48740,12 +48740,12 @@ function $h() {
|
|
|
48740
48740
|
...oe,
|
|
48741
48741
|
...pe,
|
|
48742
48742
|
se,
|
|
48743
|
-
|
|
48743
|
+
he,
|
|
48744
48744
|
...fe,
|
|
48745
48745
|
...ze,
|
|
48746
48746
|
B
|
|
48747
48747
|
]
|
|
48748
|
-
},
|
|
48748
|
+
}, _e = {
|
|
48749
48749
|
begin: /</,
|
|
48750
48750
|
end: />/,
|
|
48751
48751
|
keywords: "repeat each",
|
|
@@ -48780,7 +48780,7 @@ function $h() {
|
|
|
48780
48780
|
...W,
|
|
48781
48781
|
...pe,
|
|
48782
48782
|
se,
|
|
48783
|
-
|
|
48783
|
+
he,
|
|
48784
48784
|
...ze,
|
|
48785
48785
|
B,
|
|
48786
48786
|
K
|
|
@@ -48798,7 +48798,7 @@ function $h() {
|
|
|
48798
48798
|
3: "title.function"
|
|
48799
48799
|
},
|
|
48800
48800
|
contains: [
|
|
48801
|
-
|
|
48801
|
+
_e,
|
|
48802
48802
|
Pe,
|
|
48803
48803
|
x
|
|
48804
48804
|
],
|
|
@@ -48813,7 +48813,7 @@ function $h() {
|
|
|
48813
48813
|
],
|
|
48814
48814
|
className: { 1: "keyword" },
|
|
48815
48815
|
contains: [
|
|
48816
|
-
|
|
48816
|
+
_e,
|
|
48817
48817
|
Pe,
|
|
48818
48818
|
x
|
|
48819
48819
|
],
|
|
@@ -48880,7 +48880,7 @@ function $h() {
|
|
|
48880
48880
|
},
|
|
48881
48881
|
keywords: k,
|
|
48882
48882
|
contains: [
|
|
48883
|
-
|
|
48883
|
+
_e,
|
|
48884
48884
|
...W,
|
|
48885
48885
|
{
|
|
48886
48886
|
begin: /:/,
|
|
@@ -48897,15 +48897,15 @@ function $h() {
|
|
|
48897
48897
|
}
|
|
48898
48898
|
]
|
|
48899
48899
|
};
|
|
48900
|
-
for (const
|
|
48901
|
-
const Nt =
|
|
48900
|
+
for (const Re of he.variants) {
|
|
48901
|
+
const Nt = Re.contains.find((Lt) => Lt.label === "interpol");
|
|
48902
48902
|
Nt.keywords = k;
|
|
48903
48903
|
const Mt = [
|
|
48904
48904
|
...W,
|
|
48905
48905
|
...oe,
|
|
48906
48906
|
...pe,
|
|
48907
48907
|
se,
|
|
48908
|
-
|
|
48908
|
+
he,
|
|
48909
48909
|
...fe
|
|
48910
48910
|
];
|
|
48911
48911
|
Nt.contains = [
|
|
@@ -48943,7 +48943,7 @@ function $h() {
|
|
|
48943
48943
|
...oe,
|
|
48944
48944
|
...pe,
|
|
48945
48945
|
se,
|
|
48946
|
-
|
|
48946
|
+
he,
|
|
48947
48947
|
...fe,
|
|
48948
48948
|
...ze,
|
|
48949
48949
|
B,
|
|
@@ -50055,12 +50055,12 @@ function rR() {
|
|
|
50055
50055
|
}
|
|
50056
50056
|
H === ">" && (m(re, { after: Ie }) || Ee.ignoreMatch());
|
|
50057
50057
|
let ce;
|
|
50058
|
-
const
|
|
50059
|
-
if (ce =
|
|
50058
|
+
const he = re.input.substring(Ie);
|
|
50059
|
+
if (ce = he.match(/^\s*=/)) {
|
|
50060
50060
|
Ee.ignoreMatch();
|
|
50061
50061
|
return;
|
|
50062
50062
|
}
|
|
50063
|
-
if ((ce =
|
|
50063
|
+
if ((ce = he.match(/^\s+extends\s+/)) && ce.index === 0) {
|
|
50064
50064
|
Ee.ignoreMatch();
|
|
50065
50065
|
return;
|
|
50066
50066
|
}
|
|
@@ -53305,7 +53305,7 @@ const Yn = {
|
|
|
53305
53305
|
};
|
|
53306
53306
|
function fm() {
|
|
53307
53307
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : GR();
|
|
53308
|
-
const e = (
|
|
53308
|
+
const e = (ie) => fm(ie);
|
|
53309
53309
|
if (e.version = "3.4.2", e.removed = [], !t || !t.document || t.document.nodeType !== Yn.document || !t.Element)
|
|
53310
53310
|
return e.isSupported = !1, e;
|
|
53311
53311
|
let {
|
|
@@ -53323,8 +53323,8 @@ function fm() {
|
|
|
53323
53323
|
trustedTypes: p
|
|
53324
53324
|
} = t, d = l.prototype, E = En(d, "cloneNode"), S = En(d, "remove"), C = En(d, "nextSibling"), T = En(d, "childNodes"), f = En(d, "parentNode");
|
|
53325
53325
|
if (typeof s == "function") {
|
|
53326
|
-
const
|
|
53327
|
-
|
|
53326
|
+
const ie = n.createElement("template");
|
|
53327
|
+
ie.content && ie.content.ownerDocument && (n = ie.content.ownerDocument);
|
|
53328
53328
|
}
|
|
53329
53329
|
let b, R = "";
|
|
53330
53330
|
const {
|
|
@@ -53387,17 +53387,17 @@ function fm() {
|
|
|
53387
53387
|
value: null
|
|
53388
53388
|
}
|
|
53389
53389
|
}));
|
|
53390
|
-
let Ee = !0, Ie = !0, H = !1, ce = !0,
|
|
53390
|
+
let Ee = !0, Ie = !0, H = !1, ce = !0, he = !1, Je = !0, Me = !1, st = !1, je = !1, ne = !1, ft = !1, ye = !1, fe = !0, Oe = !1;
|
|
53391
53391
|
const lt = "user-content-";
|
|
53392
53392
|
let bt = !0, ze = !1, B = {}, q = null;
|
|
53393
53393
|
const P = be({}, ["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"]);
|
|
53394
53394
|
let K = null;
|
|
53395
|
-
const
|
|
53395
|
+
const _e = be({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
53396
53396
|
let Ne = null;
|
|
53397
53397
|
const Pe = be({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Fe = "http://www.w3.org/1998/Math/MathML", We = "http://www.w3.org/2000/svg", Le = "http://www.w3.org/1999/xhtml";
|
|
53398
53398
|
let dt = Le, ve = !1, nt = null;
|
|
53399
53399
|
const Pt = be({}, [Fe, We, Le], bs);
|
|
53400
|
-
let
|
|
53400
|
+
let Re = be({}, ["mi", "mo", "mn", "ms", "mtext"]), Nt = be({}, ["annotation-xml"]);
|
|
53401
53401
|
const Mt = be({}, ["title", "style", "font", "a", "script"]);
|
|
53402
53402
|
let Lt = null;
|
|
53403
53403
|
const In = ["application/xhtml+xml", "text/html"], en = "text/html";
|
|
@@ -53409,9 +53409,9 @@ function fm() {
|
|
|
53409
53409
|
if (wt && wt === h)
|
|
53410
53410
|
return;
|
|
53411
53411
|
(!h || typeof h != "object") && (h = {}), h = Rt(h), Lt = // eslint-disable-next-line unicorn/prefer-includes
|
|
53412
|
-
In.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? en : h.PARSER_MEDIA_TYPE, we = Lt === "application/xhtml+xml" ? bs : qn, oe = Ye(h, "ALLOWED_TAGS") && Et(h.ALLOWED_TAGS) ? be({}, h.ALLOWED_TAGS, we) : Ae, me = Ye(h, "ALLOWED_ATTR") && Et(h.ALLOWED_ATTR) ? be({}, h.ALLOWED_ATTR, we) : pe, nt = Ye(h, "ALLOWED_NAMESPACES") && Et(h.ALLOWED_NAMESPACES) ? be({}, h.ALLOWED_NAMESPACES, bs) : Pt, Ne = Ye(h, "ADD_URI_SAFE_ATTR") && Et(h.ADD_URI_SAFE_ATTR) ? be(Rt(Pe), h.ADD_URI_SAFE_ATTR, we) : Pe, K = Ye(h, "ADD_DATA_URI_TAGS") && Et(h.ADD_DATA_URI_TAGS) ? be(Rt(
|
|
53412
|
+
In.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? en : h.PARSER_MEDIA_TYPE, we = Lt === "application/xhtml+xml" ? bs : qn, oe = Ye(h, "ALLOWED_TAGS") && Et(h.ALLOWED_TAGS) ? be({}, h.ALLOWED_TAGS, we) : Ae, me = Ye(h, "ALLOWED_ATTR") && Et(h.ALLOWED_ATTR) ? be({}, h.ALLOWED_ATTR, we) : pe, nt = Ye(h, "ALLOWED_NAMESPACES") && Et(h.ALLOWED_NAMESPACES) ? be({}, h.ALLOWED_NAMESPACES, bs) : Pt, Ne = Ye(h, "ADD_URI_SAFE_ATTR") && Et(h.ADD_URI_SAFE_ATTR) ? be(Rt(Pe), h.ADD_URI_SAFE_ATTR, we) : Pe, K = Ye(h, "ADD_DATA_URI_TAGS") && Et(h.ADD_DATA_URI_TAGS) ? be(Rt(_e), h.ADD_DATA_URI_TAGS, we) : _e, q = Ye(h, "FORBID_CONTENTS") && Et(h.FORBID_CONTENTS) ? be({}, h.FORBID_CONTENTS, we) : P, Se = Ye(h, "FORBID_TAGS") && Et(h.FORBID_TAGS) ? be({}, h.FORBID_TAGS, we) : Rt({}), se = Ye(h, "FORBID_ATTR") && Et(h.FORBID_ATTR) ? be({}, h.FORBID_ATTR, we) : Rt({}), B = Ye(h, "USE_PROFILES") ? h.USE_PROFILES && typeof h.USE_PROFILES == "object" ? Rt(h.USE_PROFILES) : h.USE_PROFILES : !1, Ee = h.ALLOW_ARIA_ATTR !== !1, Ie = h.ALLOW_DATA_ATTR !== !1, H = h.ALLOW_UNKNOWN_PROTOCOLS || !1, ce = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, he = h.SAFE_FOR_TEMPLATES || !1, Je = h.SAFE_FOR_XML !== !1, Me = h.WHOLE_DOCUMENT || !1, ne = h.RETURN_DOM || !1, ft = h.RETURN_DOM_FRAGMENT || !1, ye = h.RETURN_TRUSTED_TYPE || !1, je = h.FORCE_BODY || !1, fe = h.SANITIZE_DOM !== !1, Oe = h.SANITIZE_NAMED_PROPS || !1, bt = h.KEEP_CONTENT !== !1, ze = h.IN_PLACE || !1, de = yR(h.ALLOWED_URI_REGEXP) ? h.ALLOWED_URI_REGEXP : gm, dt = typeof h.NAMESPACE == "string" ? h.NAMESPACE : Le, Re = Ye(h, "MATHML_TEXT_INTEGRATION_POINTS") && h.MATHML_TEXT_INTEGRATION_POINTS && typeof h.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Rt(h.MATHML_TEXT_INTEGRATION_POINTS) : be({}, ["mi", "mo", "mn", "ms", "mtext"]), Nt = Ye(h, "HTML_INTEGRATION_POINTS") && h.HTML_INTEGRATION_POINTS && typeof h.HTML_INTEGRATION_POINTS == "object" ? Rt(h.HTML_INTEGRATION_POINTS) : be({}, ["annotation-xml"]);
|
|
53413
53413
|
const F = Ye(h, "CUSTOM_ELEMENT_HANDLING") && h.CUSTOM_ELEMENT_HANDLING && typeof h.CUSTOM_ELEMENT_HANDLING == "object" ? Rt(h.CUSTOM_ELEMENT_HANDLING) : mn(null);
|
|
53414
|
-
if (ee = mn(null), Ye(F, "tagNameCheck") && Ht(F.tagNameCheck) && (ee.tagNameCheck = F.tagNameCheck), Ye(F, "attributeNameCheck") && Ht(F.attributeNameCheck) && (ee.attributeNameCheck = F.attributeNameCheck), Ye(F, "allowCustomizedBuiltInElements") && typeof F.allowCustomizedBuiltInElements == "boolean" && (ee.allowCustomizedBuiltInElements = F.allowCustomizedBuiltInElements),
|
|
53414
|
+
if (ee = mn(null), Ye(F, "tagNameCheck") && Ht(F.tagNameCheck) && (ee.tagNameCheck = F.tagNameCheck), Ye(F, "attributeNameCheck") && Ht(F.attributeNameCheck) && (ee.attributeNameCheck = F.attributeNameCheck), Ye(F, "allowCustomizedBuiltInElements") && typeof F.allowCustomizedBuiltInElements == "boolean" && (ee.allowCustomizedBuiltInElements = F.allowCustomizedBuiltInElements), he && (Ie = !1), ft && (ne = !0), B && (oe = be({}, Rd), me = mn(null), B.html === !0 && (be(oe, hd), be(me, Cd)), B.svg === !0 && (be(oe, Ts), be(me, Cs), be(me, dr)), B.svgFilters === !0 && (be(oe, hs), be(me, Cs), be(me, dr)), B.mathMl === !0 && (be(oe, Rs), be(me, Nd), be(me, dr))), re.tagCheck = null, re.attributeCheck = null, Ye(h, "ADD_TAGS") && (typeof h.ADD_TAGS == "function" ? re.tagCheck = h.ADD_TAGS : Et(h.ADD_TAGS) && (oe === Ae && (oe = Rt(oe)), be(oe, h.ADD_TAGS, we))), Ye(h, "ADD_ATTR") && (typeof h.ADD_ATTR == "function" ? re.attributeCheck = h.ADD_ATTR : Et(h.ADD_ATTR) && (me === pe && (me = Rt(me)), be(me, h.ADD_ATTR, we))), Ye(h, "ADD_URI_SAFE_ATTR") && Et(h.ADD_URI_SAFE_ATTR) && be(Ne, h.ADD_URI_SAFE_ATTR, we), Ye(h, "FORBID_CONTENTS") && Et(h.FORBID_CONTENTS) && (q === P && (q = Rt(q)), be(q, h.FORBID_CONTENTS, we)), Ye(h, "ADD_FORBID_CONTENTS") && Et(h.ADD_FORBID_CONTENTS) && (q === P && (q = Rt(q)), be(q, h.ADD_FORBID_CONTENTS, we)), bt && (oe["#text"] = !0), Me && be(oe, ["html", "head", "body"]), oe.table && (be(oe, ["tbody"]), delete Se.tbody), h.TRUSTED_TYPES_POLICY) {
|
|
53415
53415
|
if (typeof h.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
53416
53416
|
throw _r('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
53417
53417
|
if (typeof h.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -53427,7 +53427,7 @@ function fm() {
|
|
|
53427
53427
|
tagName: "template"
|
|
53428
53428
|
});
|
|
53429
53429
|
const Z = qn(h.tagName), De = qn(F.tagName);
|
|
53430
|
-
return nt[h.namespaceURI] ? h.namespaceURI === We ? F.namespaceURI === Le ? Z === "svg" : F.namespaceURI === Fe ? Z === "svg" && (De === "annotation-xml" ||
|
|
53430
|
+
return nt[h.namespaceURI] ? h.namespaceURI === We ? F.namespaceURI === Le ? Z === "svg" : F.namespaceURI === Fe ? Z === "svg" && (De === "annotation-xml" || Re[De]) : !!vn[Z] : h.namespaceURI === Fe ? F.namespaceURI === Le ? Z === "math" : F.namespaceURI === We ? Z === "math" && Nt[De] : !!yn[Z] : h.namespaceURI === Le ? F.namespaceURI === We && !Nt[De] || F.namespaceURI === Fe && !Re[De] ? !1 : !yn[Z] && (Mt[Z] || !vn[Z]) : !!(Lt === "application/xhtml+xml" && nt[h.namespaceURI]) : !1;
|
|
53431
53431
|
}, Tt = function(h) {
|
|
53432
53432
|
Bn(e.removed, {
|
|
53433
53433
|
element: h
|
|
@@ -53497,8 +53497,8 @@ function fm() {
|
|
|
53497
53497
|
}, rn = function(h) {
|
|
53498
53498
|
return typeof o == "function" && h instanceof o;
|
|
53499
53499
|
};
|
|
53500
|
-
function At(
|
|
53501
|
-
Un(
|
|
53500
|
+
function At(ie, h, F) {
|
|
53501
|
+
Un(ie, (Z) => {
|
|
53502
53502
|
Z.call(e, h, F, wt);
|
|
53503
53503
|
});
|
|
53504
53504
|
}
|
|
@@ -53527,7 +53527,7 @@ function fm() {
|
|
|
53527
53527
|
}
|
|
53528
53528
|
return Tt(h), !0;
|
|
53529
53529
|
}
|
|
53530
|
-
return h instanceof l && !ar(h) || (Z === "noscript" || Z === "noembed" || Z === "noframes") && _t(/<\/no(script|embed|frames)/i, h.innerHTML) ? (Tt(h), !0) : (
|
|
53530
|
+
return h instanceof l && !ar(h) || (Z === "noscript" || Z === "noembed" || Z === "noframes") && _t(/<\/no(script|embed|frames)/i, h.innerHTML) ? (Tt(h), !0) : (he && h.nodeType === Yn.text && (F = h.textContent, Un([L, V, j], (De) => {
|
|
53531
53531
|
F = dn(F, De, " ");
|
|
53532
53532
|
}), h.textContent !== F && (Bn(e.removed, {
|
|
53533
53533
|
element: h.cloneNode()
|
|
@@ -53584,7 +53584,7 @@ function fm() {
|
|
|
53584
53584
|
value: mt
|
|
53585
53585
|
} = et, ht = we(Ue), an = mt;
|
|
53586
53586
|
let He = Ue === "value" ? an : CR(an);
|
|
53587
|
-
if (Z.attrName = ht, Z.attrValue = He, Z.keepAttr = !0, Z.forceKeepAttr = void 0, At(M.uponSanitizeAttribute, h, Z), He = Z.attrValue,
|
|
53587
|
+
if (Z.attrName = ht, Z.attrValue = He, Z.keepAttr = !0, Z.forceKeepAttr = void 0, At(M.uponSanitizeAttribute, h, Z), He = Z.attrValue, Oe && (ht === "id" || ht === "name") && fd(He, lt) !== 0 && (Ft(Ue, h), He = lt + He), Je && _t(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, He)) {
|
|
53588
53588
|
Ft(Ue, h);
|
|
53589
53589
|
continue;
|
|
53590
53590
|
}
|
|
@@ -53602,7 +53602,7 @@ function fm() {
|
|
|
53602
53602
|
Ft(Ue, h);
|
|
53603
53603
|
continue;
|
|
53604
53604
|
}
|
|
53605
|
-
|
|
53605
|
+
he && Un([L, V, j], (on) => {
|
|
53606
53606
|
He = dn(He, on, " ");
|
|
53607
53607
|
});
|
|
53608
53608
|
const Fn = we(h.nodeName);
|
|
@@ -53636,36 +53636,36 @@ function fm() {
|
|
|
53636
53636
|
At(M.uponSanitizeShadowNode, F, null), Mn(F), kn(F), F.content instanceof i && Pn(F.content);
|
|
53637
53637
|
At(M.afterSanitizeShadowDOM, h, null);
|
|
53638
53638
|
};
|
|
53639
|
-
return e.sanitize = function(
|
|
53639
|
+
return e.sanitize = function(ie) {
|
|
53640
53640
|
let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, F = null, Z = null, De = null, et = null;
|
|
53641
|
-
if (ve = !
|
|
53641
|
+
if (ve = !ie, ve && (ie = "<!-->"), typeof ie != "string" && !rn(ie) && (ie = vR(ie), typeof ie != "string"))
|
|
53642
53642
|
throw _r("dirty is not a string, aborting");
|
|
53643
53643
|
if (!e.isSupported)
|
|
53644
|
-
return
|
|
53645
|
-
if (st || tn(h), e.removed = [], typeof
|
|
53646
|
-
const mt =
|
|
53644
|
+
return ie;
|
|
53645
|
+
if (st || tn(h), e.removed = [], typeof ie == "string" && (ze = !1), ze) {
|
|
53646
|
+
const mt = ie.nodeName;
|
|
53647
53647
|
if (typeof mt == "string") {
|
|
53648
53648
|
const ht = we(mt);
|
|
53649
53649
|
if (!oe[ht] || Se[ht])
|
|
53650
53650
|
throw _r("root node is forbidden and cannot be sanitized in-place");
|
|
53651
53651
|
}
|
|
53652
|
-
} else if (
|
|
53653
|
-
F = Dn("<!---->"), Z = F.ownerDocument.importNode(
|
|
53652
|
+
} else if (ie instanceof o)
|
|
53653
|
+
F = Dn("<!---->"), Z = F.ownerDocument.importNode(ie, !0), Z.nodeType === Yn.element && Z.nodeName === "BODY" || Z.nodeName === "HTML" ? F = Z : F.appendChild(Z);
|
|
53654
53654
|
else {
|
|
53655
|
-
if (!ne && !
|
|
53656
|
-
|
|
53657
|
-
return b && ye ? b.createHTML(
|
|
53658
|
-
if (F = Dn(
|
|
53655
|
+
if (!ne && !he && !Me && // eslint-disable-next-line unicorn/prefer-includes
|
|
53656
|
+
ie.indexOf("<") === -1)
|
|
53657
|
+
return b && ye ? b.createHTML(ie) : ie;
|
|
53658
|
+
if (F = Dn(ie), !F)
|
|
53659
53659
|
return ne ? null : ye ? R : "";
|
|
53660
53660
|
}
|
|
53661
53661
|
F && je && Tt(F.firstChild);
|
|
53662
|
-
const Ue = xn(ze ?
|
|
53662
|
+
const Ue = xn(ze ? ie : F);
|
|
53663
53663
|
for (; De = Ue.nextNode(); )
|
|
53664
53664
|
Mn(De), kn(De), De.content instanceof i && Pn(De.content);
|
|
53665
53665
|
if (ze)
|
|
53666
|
-
return
|
|
53666
|
+
return ie;
|
|
53667
53667
|
if (ne) {
|
|
53668
|
-
if (
|
|
53668
|
+
if (he) {
|
|
53669
53669
|
F.normalize();
|
|
53670
53670
|
let mt = F.innerHTML;
|
|
53671
53671
|
Un([L, V, j], (ht) => {
|
|
@@ -53681,28 +53681,28 @@ function fm() {
|
|
|
53681
53681
|
}
|
|
53682
53682
|
let ct = Me ? F.outerHTML : F.innerHTML;
|
|
53683
53683
|
return Me && oe["!doctype"] && F.ownerDocument && F.ownerDocument.doctype && F.ownerDocument.doctype.name && _t(Sm, F.ownerDocument.doctype.name) && (ct = "<!DOCTYPE " + F.ownerDocument.doctype.name + `>
|
|
53684
|
-
` + ct),
|
|
53684
|
+
` + ct), he && Un([L, V, j], (mt) => {
|
|
53685
53685
|
ct = dn(ct, mt, " ");
|
|
53686
53686
|
}), b && ye ? b.createHTML(ct) : ct;
|
|
53687
53687
|
}, e.setConfig = function() {
|
|
53688
|
-
let
|
|
53689
|
-
tn(
|
|
53688
|
+
let ie = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
53689
|
+
tn(ie), st = !0;
|
|
53690
53690
|
}, e.clearConfig = function() {
|
|
53691
53691
|
wt = null, st = !1;
|
|
53692
|
-
}, e.isValidAttribute = function(
|
|
53692
|
+
}, e.isValidAttribute = function(ie, h, F) {
|
|
53693
53693
|
wt || tn({});
|
|
53694
|
-
const Z = we(
|
|
53694
|
+
const Z = we(ie), De = we(h);
|
|
53695
53695
|
return Ln(Z, De, F);
|
|
53696
|
-
}, e.addHook = function(
|
|
53697
|
-
typeof h == "function" && Bn(M[
|
|
53698
|
-
}, e.removeHook = function(
|
|
53696
|
+
}, e.addHook = function(ie, h) {
|
|
53697
|
+
typeof h == "function" && Bn(M[ie], h);
|
|
53698
|
+
}, e.removeHook = function(ie, h) {
|
|
53699
53699
|
if (h !== void 0) {
|
|
53700
|
-
const F = hR(M[
|
|
53701
|
-
return F === -1 ? void 0 : RR(M[
|
|
53700
|
+
const F = hR(M[ie], h);
|
|
53701
|
+
return F === -1 ? void 0 : RR(M[ie], F, 1)[0];
|
|
53702
53702
|
}
|
|
53703
|
-
return gd(M[
|
|
53704
|
-
}, e.removeHooks = function(
|
|
53705
|
-
M[
|
|
53703
|
+
return gd(M[ie]);
|
|
53704
|
+
}, e.removeHooks = function(ie) {
|
|
53705
|
+
M[ie] = [];
|
|
53706
53706
|
}, e.removeAllHooks = function() {
|
|
53707
53707
|
M = Ad();
|
|
53708
53708
|
}, e;
|
|
@@ -54570,7 +54570,7 @@ function eC(t) {
|
|
|
54570
54570
|
e = w("div");
|
|
54571
54571
|
for (let o = 0; o < n.length; o += 1)
|
|
54572
54572
|
n[o].c();
|
|
54573
|
-
g(e, "class", "sy-assistant-message-list svelte-
|
|
54573
|
+
g(e, "class", "sy-assistant-message-list svelte-1npmmk7");
|
|
54574
54574
|
},
|
|
54575
54575
|
m(o, l) {
|
|
54576
54576
|
$(o, e, l);
|
|
@@ -54667,7 +54667,7 @@ function nC(t) {
|
|
|
54667
54667
|
) + "";
|
|
54668
54668
|
return {
|
|
54669
54669
|
c() {
|
|
54670
|
-
e = w("div"), g(e, "class", "sy-assistant-avatar user svelte-
|
|
54670
|
+
e = w("div"), g(e, "class", "sy-assistant-avatar user svelte-1npmmk7"), J(
|
|
54671
54671
|
e,
|
|
54672
54672
|
"screen-theme",
|
|
54673
54673
|
/*theme*/
|
|
@@ -54708,7 +54708,7 @@ function rC(t) {
|
|
|
54708
54708
|
) + "";
|
|
54709
54709
|
return {
|
|
54710
54710
|
c() {
|
|
54711
|
-
e = w("div"), g(e, "class", "sy-assistant-avatar assistant svelte-
|
|
54711
|
+
e = w("div"), g(e, "class", "sy-assistant-avatar assistant svelte-1npmmk7"), J(
|
|
54712
54712
|
e,
|
|
54713
54713
|
"screen-theme",
|
|
54714
54714
|
/*theme*/
|
|
@@ -54774,7 +54774,7 @@ function aC(t) {
|
|
|
54774
54774
|
), l;
|
|
54775
54775
|
return {
|
|
54776
54776
|
c() {
|
|
54777
|
-
e = w("details"), n = w("summary"), n.textContent = "已完成思考", r = te(), a = w("div"), i = w("div"), s = w("pre"), l = qe(o), g(n, "class", "sy-assistant-thinking-summary svelte-
|
|
54777
|
+
e = w("details"), n = w("summary"), n.textContent = "已完成思考", r = te(), a = w("div"), i = w("div"), s = w("pre"), l = qe(o), g(n, "class", "sy-assistant-thinking-summary svelte-1npmmk7"), g(s, "class", "sy-assistant-thinking-body svelte-1npmmk7"), g(i, "class", "sy-assistant-thinking-anim-inner svelte-1npmmk7"), g(a, "class", "sy-assistant-thinking-anim-wrap svelte-1npmmk7"), g(e, "class", "sy-assistant-thinking sy-assistant-thinking-done svelte-1npmmk7");
|
|
54778
54778
|
},
|
|
54779
54779
|
m(c, u) {
|
|
54780
54780
|
$(c, e, u), A(e, n), A(e, r), A(e, a), A(a, i), A(i, s), A(s, l);
|
|
@@ -54833,7 +54833,7 @@ function oC(t) {
|
|
|
54833
54833
|
), l, c;
|
|
54834
54834
|
return {
|
|
54835
54835
|
c() {
|
|
54836
|
-
e = w("details"), n = w("summary"), n.textContent = "已完成思考", r = te(), a = w("div"), i = w("div"), s = w("pre"), l = qe(o), c = te(), g(n, "class", "sy-assistant-thinking-summary svelte-
|
|
54836
|
+
e = w("details"), n = w("summary"), n.textContent = "已完成思考", r = te(), a = w("div"), i = w("div"), s = w("pre"), l = qe(o), c = te(), g(n, "class", "sy-assistant-thinking-summary svelte-1npmmk7"), g(s, "class", "sy-assistant-thinking-body svelte-1npmmk7"), g(i, "class", "sy-assistant-thinking-anim-inner svelte-1npmmk7"), g(a, "class", "sy-assistant-thinking-anim-wrap svelte-1npmmk7"), g(e, "class", "sy-assistant-thinking sy-assistant-thinking-done svelte-1npmmk7");
|
|
54837
54837
|
},
|
|
54838
54838
|
m(u, _) {
|
|
54839
54839
|
$(u, e, _), A(e, n), A(e, r), A(e, a), A(a, i), A(i, s), A(s, l), A(e, c);
|
|
@@ -54855,7 +54855,7 @@ function sC(t) {
|
|
|
54855
54855
|
), s, o;
|
|
54856
54856
|
return {
|
|
54857
54857
|
c() {
|
|
54858
|
-
e = w("div"), n = w("div"), n.textContent = "思考中", r = te(), a = w("pre"), s = qe(i), o = te(), g(n, "class", "sy-assistant-thinking-live-head svelte-
|
|
54858
|
+
e = w("div"), n = w("div"), n.textContent = "思考中", r = te(), a = w("pre"), s = qe(i), o = te(), g(n, "class", "sy-assistant-thinking-live-head svelte-1npmmk7"), g(a, "class", "sy-assistant-thinking-body sy-assistant-thinking-scroll-live svelte-1npmmk7"), g(e, "class", "sy-assistant-thinking sy-assistant-thinking-live svelte-1npmmk7");
|
|
54859
54859
|
},
|
|
54860
54860
|
m(l, c) {
|
|
54861
54861
|
$(l, e, c), A(e, n), A(e, r), A(e, a), A(a, s), A(e, o);
|
|
@@ -54937,7 +54937,7 @@ function lC(t) {
|
|
|
54937
54937
|
);
|
|
54938
54938
|
return {
|
|
54939
54939
|
c() {
|
|
54940
|
-
e = w("div"), g(e, "class", "markdown-content svelte-
|
|
54940
|
+
e = w("div"), g(e, "class", "markdown-content svelte-1npmmk7");
|
|
54941
54941
|
},
|
|
54942
54942
|
m(r, a) {
|
|
54943
54943
|
$(r, e, a), e.innerHTML = n;
|
|
@@ -54959,7 +54959,7 @@ function cC(t) {
|
|
|
54959
54959
|
let e;
|
|
54960
54960
|
return {
|
|
54961
54961
|
c() {
|
|
54962
|
-
e = w("span"), e.innerHTML = '<span class="dot svelte-
|
|
54962
|
+
e = w("span"), e.innerHTML = '<span class="dot svelte-1npmmk7">.</span> <span class="dot svelte-1npmmk7">.</span> <span class="dot svelte-1npmmk7">.</span>', g(e, "class", "sy-assistant-loading svelte-1npmmk7");
|
|
54963
54963
|
},
|
|
54964
54964
|
m(n, r) {
|
|
54965
54965
|
$(n, e, r);
|
|
@@ -54982,7 +54982,7 @@ function tp(t) {
|
|
|
54982
54982
|
e = w("div");
|
|
54983
54983
|
for (let a = 0; a < r.length; a += 1)
|
|
54984
54984
|
r[a].c();
|
|
54985
|
-
g(e, "class", "sy-assistant-attachments svelte-
|
|
54985
|
+
g(e, "class", "sy-assistant-attachments svelte-1npmmk7");
|
|
54986
54986
|
},
|
|
54987
54987
|
m(a, i) {
|
|
54988
54988
|
$(a, e, i);
|
|
@@ -55026,7 +55026,7 @@ function np(t) {
|
|
|
55026
55026
|
}
|
|
55027
55027
|
return {
|
|
55028
55028
|
c() {
|
|
55029
|
-
e = w("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-
|
|
55029
|
+
e = w("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-1npmmk7"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>', g(e, "class", "sy-assistant-attachment-toggle svelte-1npmmk7"), g(e, "aria-label", "查看详情");
|
|
55030
55030
|
},
|
|
55031
55031
|
m(i, s) {
|
|
55032
55032
|
$(i, e, s), n || (r = [
|
|
@@ -55054,7 +55054,7 @@ function rp(t) {
|
|
|
55054
55054
|
), r, a;
|
|
55055
55055
|
return {
|
|
55056
55056
|
c() {
|
|
55057
|
-
e = w("div"), g(e, "class", "sy-assistant-tooltip svelte-
|
|
55057
|
+
e = w("div"), g(e, "class", "sy-assistant-tooltip svelte-1npmmk7"), g(e, "role", "tooltip"), X(
|
|
55058
55058
|
e,
|
|
55059
55059
|
"left",
|
|
55060
55060
|
/*tooltipPosition*/
|
|
@@ -55152,8 +55152,8 @@ function ap(t) {
|
|
|
55152
55152
|
);
|
|
55153
55153
|
return {
|
|
55154
55154
|
c() {
|
|
55155
|
-
e = w("div"), n = w("div"), r = w("div"), a = Te("svg"), i = Te("path"), s = Te("polyline"), o = te(), l = w("div"), c = w("span"), _ = qe(u), m = te(), p = w("span"), E = qe(d), C = te(), T = w("div"), x && x.c(), f = te(), b = w("button"), b.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-
|
|
55156
|
-
t[123].content_title), g(r, "class", "sy-assistant-attachment-title svelte-
|
|
55155
|
+
e = w("div"), n = w("div"), r = w("div"), a = Te("svg"), i = Te("path"), s = Te("polyline"), o = te(), l = w("div"), c = w("span"), _ = qe(u), m = te(), p = w("span"), E = qe(d), C = te(), T = w("div"), x && x.c(), f = te(), b = w("button"), b.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-1npmmk7"><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>', R = te(), M && M.c(), N = te(), g(i, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), g(s, "points", "13 2 13 9 20 9"), g(a, "xmlns", "http://www.w3.org/2000/svg"), g(a, "width", "16"), g(a, "height", "16"), g(a, "viewBox", "0 0 24 24"), g(a, "fill", "none"), g(a, "stroke", "currentColor"), g(a, "stroke-width", "2"), g(a, "stroke-linecap", "round"), g(a, "stroke-linejoin", "round"), g(c, "class", "sy-assistant-filename svelte-1npmmk7"), g(p, "class", "sy-assistant-attachment-ext svelte-1npmmk7"), g(l, "class", "sy-assistant-attachment-name svelte-1npmmk7"), g(l, "title", S = /*attachment*/
|
|
55156
|
+
t[123].content_title), g(r, "class", "sy-assistant-attachment-title svelte-1npmmk7"), g(b, "class", "sy-assistant-attachment-toggle svelte-1npmmk7"), g(b, "aria-label", "下载文件"), g(T, "class", "sy-assistant-attachment-actions svelte-1npmmk7"), g(n, "class", "sy-assistant-attachment-header svelte-1npmmk7"), g(e, "class", "sy-assistant-attachment svelte-1npmmk7");
|
|
55157
55157
|
},
|
|
55158
55158
|
m(L, V) {
|
|
55159
55159
|
$(L, e, V), A(e, n), A(n, r), A(r, a), A(a, i), A(a, s), A(r, o), A(r, l), A(l, c), A(c, _), A(l, m), A(l, p), A(p, E), A(n, C), A(n, T), x && x.m(T, null), A(T, f), A(T, b), A(e, R), M && M.m(e, null), A(e, N), I || (y = le(b, "click", U), I = !0);
|
|
@@ -55261,7 +55261,7 @@ function ip(t) {
|
|
|
55261
55261
|
);
|
|
55262
55262
|
return {
|
|
55263
55263
|
c() {
|
|
55264
|
-
e = w("div"), n = w("div"), S && S.c(), r = te(), a = w("div"), i = w("button"), f.c(), o = te(), l = w("button"), l.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>', c = te(), u = w("button"), u.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>', _ = te(), U && U.c(), m = vt(), g(n, "class", "sy-assistant-message-actions-left svelte-
|
|
55264
|
+
e = w("div"), n = w("div"), S && S.c(), r = te(), a = w("div"), i = w("button"), f.c(), o = te(), l = w("button"), l.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>', c = te(), u = w("button"), u.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>', _ = te(), U && U.c(), m = vt(), g(n, "class", "sy-assistant-message-actions-left svelte-1npmmk7"), g(i, "class", "sy-assistant-action-button svelte-1npmmk7"), g(i, "aria-label", s = /*copyStatus*/
|
|
55265
55265
|
t[24][
|
|
55266
55266
|
/*msg*/
|
|
55267
55267
|
t[117].id
|
|
@@ -55273,7 +55273,7 @@ function ip(t) {
|
|
|
55273
55273
|
/*msg*/
|
|
55274
55274
|
t[117].id
|
|
55275
55275
|
]
|
|
55276
|
-
), g(l, "class", "sy-assistant-action-button svelte-
|
|
55276
|
+
), g(l, "class", "sy-assistant-action-button svelte-1npmmk7"), g(l, "aria-label", "点赞"), J(
|
|
55277
55277
|
l,
|
|
55278
55278
|
"active",
|
|
55279
55279
|
/*feedbackStatus*/
|
|
@@ -55281,7 +55281,7 @@ function ip(t) {
|
|
|
55281
55281
|
/*msg*/
|
|
55282
55282
|
t[117].id
|
|
55283
55283
|
] === "like"
|
|
55284
|
-
), g(u, "class", "sy-assistant-action-button svelte-
|
|
55284
|
+
), g(u, "class", "sy-assistant-action-button svelte-1npmmk7"), g(u, "aria-label", "点踩"), J(
|
|
55285
55285
|
u,
|
|
55286
55286
|
"active",
|
|
55287
55287
|
/*feedbackStatus*/
|
|
@@ -55289,7 +55289,7 @@ function ip(t) {
|
|
|
55289
55289
|
/*msg*/
|
|
55290
55290
|
t[117].id
|
|
55291
55291
|
] === "dislike"
|
|
55292
|
-
), g(a, "class", "sy-assistant-message-actions-right svelte-
|
|
55292
|
+
), g(a, "class", "sy-assistant-message-actions-right svelte-1npmmk7"), g(e, "class", "sy-assistant-message-actions svelte-1npmmk7");
|
|
55293
55293
|
},
|
|
55294
55294
|
m(M, L) {
|
|
55295
55295
|
$(M, e, L), A(e, n), S && S.m(n, null), A(e, r), A(e, a), A(a, i), f.m(i, null), A(a, o), A(a, l), A(a, c), A(a, u), $(M, _, L), U && U.m(M, L), $(M, m, L), p = !0, d || (E = [
|
|
@@ -55484,7 +55484,7 @@ function sp(t) {
|
|
|
55484
55484
|
}
|
|
55485
55485
|
return {
|
|
55486
55486
|
c() {
|
|
55487
|
-
e = w("div"), n = w("div"), n.textContent = "反馈意见", r = te(), a = w("textarea"), i = te(), s = w("div"), o = w("button"), o.textContent = "取消", l = te(), c = w("button"), c.textContent = "提交", g(n, "class", "sy-assistant-dislike-title svelte-
|
|
55487
|
+
e = w("div"), n = w("div"), n.textContent = "反馈意见", r = te(), a = w("textarea"), i = te(), s = w("div"), o = w("button"), o.textContent = "取消", l = te(), c = w("button"), c.textContent = "提交", g(n, "class", "sy-assistant-dislike-title svelte-1npmmk7"), g(a, "class", "sy-assistant-dislike-input svelte-1npmmk7"), g(a, "placeholder", "请输入您的反馈意见..."), g(o, "class", "sy-assistant-popup-cancel svelte-1npmmk7"), g(c, "class", "sy-assistant-popup-submit svelte-1npmmk7"), g(s, "class", "sy-assistant-popup-actions svelte-1npmmk7"), g(e, "class", "sy-assistant-dislike-popup svelte-1npmmk7"), X(
|
|
55488
55488
|
e,
|
|
55489
55489
|
"left",
|
|
55490
55490
|
/*dislikeFeedbackPosition*/
|
|
@@ -55567,7 +55567,7 @@ function lp(t) {
|
|
|
55567
55567
|
e = w("div");
|
|
55568
55568
|
for (let s = 0; s < n.length; s += 1)
|
|
55569
55569
|
n[s].c();
|
|
55570
|
-
g(e, "class", "sy-assistant-suggestions sy-assistant-suggestions-after-time svelte-
|
|
55570
|
+
g(e, "class", "sy-assistant-suggestions sy-assistant-suggestions-after-time svelte-1npmmk7"), g(e, "role", "group"), g(e, "aria-label", "建议问题");
|
|
55571
55571
|
},
|
|
55572
55572
|
m(s, o) {
|
|
55573
55573
|
$(s, e, o);
|
|
@@ -55607,7 +55607,7 @@ function cp(t, e) {
|
|
|
55607
55607
|
key: t,
|
|
55608
55608
|
first: null,
|
|
55609
55609
|
c() {
|
|
55610
|
-
n = w("button"), a = qe(r), g(n, "type", "button"), g(n, "class", "sy-assistant-suggestion-chip svelte-
|
|
55610
|
+
n = w("button"), a = qe(r), g(n, "type", "button"), g(n, "class", "sy-assistant-suggestion-chip svelte-1npmmk7"), this.first = n;
|
|
55611
55611
|
},
|
|
55612
55612
|
m(l, c) {
|
|
55613
55613
|
$(l, n, c), A(n, a), i || (s = le(n, "click", o), i = !0);
|
|
@@ -55656,17 +55656,17 @@ function up(t, e) {
|
|
|
55656
55656
|
key: t,
|
|
55657
55657
|
first: null,
|
|
55658
55658
|
c() {
|
|
55659
|
-
n = w("div"), T.c(), r = te(), a = w("div"), i = w("div"), f && f.c(), s = te(), b && b.c(), o = te(), R && R.c(), l = te(), N && N.c(), c = te(), u = w("div"), m = qe(_), p = te(), I && I.c(), d = te(), g(i, "class", "sy-assistant-message-content svelte-
|
|
55659
|
+
n = w("div"), T.c(), r = te(), a = w("div"), i = w("div"), f && f.c(), s = te(), b && b.c(), o = te(), R && R.c(), l = te(), N && N.c(), c = te(), u = w("div"), m = qe(_), p = te(), I && I.c(), d = te(), g(i, "class", "sy-assistant-message-content svelte-1npmmk7"), J(
|
|
55660
55660
|
i,
|
|
55661
55661
|
"screen-theme",
|
|
55662
55662
|
/*theme*/
|
|
55663
55663
|
e[3] === "screen"
|
|
55664
|
-
), g(u, "class", "sy-assistant-message-time svelte-
|
|
55664
|
+
), g(u, "class", "sy-assistant-message-time svelte-1npmmk7"), g(a, "class", "sy-assistant-message-bubble svelte-1npmmk7"), J(
|
|
55665
55665
|
a,
|
|
55666
55666
|
"screen-theme",
|
|
55667
55667
|
/*theme*/
|
|
55668
55668
|
e[3] === "screen"
|
|
55669
|
-
), g(n, "class", "sy-assistant-message svelte-
|
|
55669
|
+
), g(n, "class", "sy-assistant-message svelte-1npmmk7"), J(
|
|
55670
55670
|
n,
|
|
55671
55671
|
"user",
|
|
55672
55672
|
/*msg*/
|
|
@@ -55753,7 +55753,7 @@ function _p(t) {
|
|
|
55753
55753
|
), u = qe("/"), _ = qe(
|
|
55754
55754
|
/*maxLength*/
|
|
55755
55755
|
t[13]
|
|
55756
|
-
), m = te(), p = w("button"), g(i, "class", "sy-assistant-textarea svelte-
|
|
55756
|
+
), m = te(), p = w("button"), g(i, "class", "sy-assistant-textarea svelte-1npmmk7"), g(i, "placeholder", "输入您的问题..."), g(
|
|
55757
55757
|
i,
|
|
55758
55758
|
"maxlength",
|
|
55759
55759
|
/*maxLength*/
|
|
@@ -55769,19 +55769,19 @@ function _p(t) {
|
|
|
55769
55769
|
/*autoExpandTextarea*/
|
|
55770
55770
|
t[10] && /*isFocused*/
|
|
55771
55771
|
t[20]
|
|
55772
|
-
), g(a, "class", "sy-assistant-textarea-container svelte-
|
|
55772
|
+
), g(a, "class", "sy-assistant-textarea-container svelte-1npmmk7"), g(l, "class", "sy-assistant-char-count svelte-1npmmk7"), J(
|
|
55773
55773
|
l,
|
|
55774
55774
|
"over-limit",
|
|
55775
55775
|
/*isOverLimit*/
|
|
55776
55776
|
t[31]
|
|
55777
|
-
), g(p, "class", "sy-assistant-send-button svelte-
|
|
55777
|
+
), g(p, "class", "sy-assistant-send-button svelte-1npmmk7"), p.disabled = E = !/*message*/
|
|
55778
55778
|
t[11].trim() || /*isOverLimit*/
|
|
55779
|
-
t[31], g(p, "aria-label", "发送消息"), g(o, "class", "sy-assistant-operation-area svelte-
|
|
55779
|
+
t[31], g(p, "aria-label", "发送消息"), g(o, "class", "sy-assistant-operation-area svelte-1npmmk7"), g(r, "class", "sy-assistant-input-container svelte-1npmmk7"), J(
|
|
55780
55780
|
r,
|
|
55781
55781
|
"screen-theme",
|
|
55782
55782
|
/*theme*/
|
|
55783
55783
|
t[3] === "screen"
|
|
55784
|
-
), g(n, "class", "sy-assistant-input-area svelte-
|
|
55784
|
+
), g(n, "class", "sy-assistant-input-area svelte-1npmmk7"), J(
|
|
55785
55785
|
n,
|
|
55786
55786
|
"screen-theme",
|
|
55787
55787
|
/*theme*/
|
|
@@ -55925,7 +55925,7 @@ function dp(t) {
|
|
|
55925
55925
|
);
|
|
55926
55926
|
return {
|
|
55927
55927
|
c() {
|
|
55928
|
-
e = w("div"), n = w("div"), u && u.c(), r = te(), _ && _.c(), a = te(), i = w("div"), m && m.c(), s = te(), o = w("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', g(o, "class", "sy-assistant-icon-button svelte-
|
|
55928
|
+
e = w("div"), n = w("div"), u && u.c(), r = te(), _ && _.c(), a = te(), i = w("div"), m && m.c(), s = te(), o = w("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', g(o, "class", "sy-assistant-icon-button svelte-1npmmk7"), g(o, "aria-label", "新建会话"), g(i, "class", "sy-assistant-chat-actions-btns svelte-1npmmk7"), g(n, "class", "sy-assistant-chat-actions svelte-1npmmk7"), g(e, "class", "sy-assistant-chat-footer svelte-1npmmk7");
|
|
55929
55929
|
},
|
|
55930
55930
|
m(p, d) {
|
|
55931
55931
|
$(p, e, d), A(e, n), u && u.m(n, null), A(n, r), _ && _.m(n, null), A(n, a), A(n, i), m && m.m(i, null), A(i, s), A(i, o), l || (c = [
|
|
@@ -55972,11 +55972,11 @@ function pp(t) {
|
|
|
55972
55972
|
e = w("div"), n = w("select");
|
|
55973
55973
|
for (let o = 0; o < s.length; o += 1)
|
|
55974
55974
|
s[o].c();
|
|
55975
|
-
g(n, "class", "sy-assistant-select svelte-
|
|
55975
|
+
g(n, "class", "sy-assistant-select svelte-1npmmk7"), /*selectedScene*/
|
|
55976
55976
|
t[23] === void 0 && gr(() => (
|
|
55977
55977
|
/*select_change_handler*/
|
|
55978
55978
|
t[78].call(n)
|
|
55979
|
-
)), g(e, "class", "sy-assistant-scene-select svelte-
|
|
55979
|
+
)), g(e, "class", "sy-assistant-scene-select svelte-1npmmk7");
|
|
55980
55980
|
},
|
|
55981
55981
|
m(o, l) {
|
|
55982
55982
|
$(o, e, l), A(e, n);
|
|
@@ -56051,7 +56051,7 @@ function Ep(t) {
|
|
|
56051
56051
|
let e;
|
|
56052
56052
|
return {
|
|
56053
56053
|
c() {
|
|
56054
|
-
e = w("div"), g(e, "class", "sy-assistant-scene-select svelte-
|
|
56054
|
+
e = w("div"), g(e, "class", "sy-assistant-scene-select svelte-1npmmk7");
|
|
56055
56055
|
},
|
|
56056
56056
|
m(n, r) {
|
|
56057
56057
|
$(n, e, r);
|
|
@@ -56065,7 +56065,7 @@ function gp(t) {
|
|
|
56065
56065
|
let e, n, r;
|
|
56066
56066
|
return {
|
|
56067
56067
|
c() {
|
|
56068
|
-
e = w("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>', g(e, "class", "sy-assistant-icon-button svelte-
|
|
56068
|
+
e = w("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>', g(e, "class", "sy-assistant-icon-button svelte-1npmmk7"), g(e, "aria-label", "历史会话");
|
|
56069
56069
|
},
|
|
56070
56070
|
m(a, i) {
|
|
56071
56071
|
$(a, e, i), n || (r = [
|
|
@@ -56102,7 +56102,7 @@ function Sp(t) {
|
|
|
56102
56102
|
), r;
|
|
56103
56103
|
return {
|
|
56104
56104
|
c() {
|
|
56105
|
-
e = w("div"), r = qe(n), g(e, "class", "sy-assistant-button-tooltip svelte-
|
|
56105
|
+
e = w("div"), r = qe(n), g(e, "class", "sy-assistant-button-tooltip svelte-1npmmk7"), X(
|
|
56106
56106
|
e,
|
|
56107
56107
|
"left",
|
|
56108
56108
|
/*buttonTooltip*/
|
|
@@ -56156,7 +56156,7 @@ function dC(t) {
|
|
|
56156
56156
|
);
|
|
56157
56157
|
return {
|
|
56158
56158
|
c() {
|
|
56159
|
-
e = w("div"), r.c(), a = te(), _ && _.c(), i = te(), m && m.c(), s = vt(), g(e, "class", "sy-assistant-chat-container svelte-
|
|
56159
|
+
e = w("div"), r.c(), a = te(), _ && _.c(), i = te(), m && m.c(), s = vt(), g(e, "class", "sy-assistant-chat-container svelte-1npmmk7"), X(
|
|
56160
56160
|
e,
|
|
56161
56161
|
"z-index",
|
|
56162
56162
|
/*zIndex*/
|
|
@@ -56266,47 +56266,47 @@ function gC(t, e, n) {
|
|
|
56266
56266
|
if (G && md.getLanguage(G))
|
|
56267
56267
|
try {
|
|
56268
56268
|
return '<pre class="hljs"><code>' + md.highlight(v, { language: G }).value + "</code></pre>";
|
|
56269
|
-
} catch (
|
|
56270
|
-
console.warn("Code highlighting failed:",
|
|
56269
|
+
} catch (ae) {
|
|
56270
|
+
console.warn("Code highlighting failed:", ae);
|
|
56271
56271
|
}
|
|
56272
56272
|
return '<pre class="hljs"><code>' + y.utils.escapeHtml(v) + "</code></pre>";
|
|
56273
56273
|
}
|
|
56274
|
-
}).enable(["table", "strikethrough"]), x = (on = y.renderer.rules.link_open) != null ? on : (v, G,
|
|
56275
|
-
y.renderer.rules.link_open = (v, G,
|
|
56274
|
+
}).enable(["table", "strikethrough"]), x = (on = y.renderer.rules.link_open) != null ? on : (v, G, ae, ge, ue) => ue.renderToken(v, G, ae);
|
|
56275
|
+
y.renderer.rules.link_open = (v, G, ae, ge, ue) => {
|
|
56276
56276
|
var xe;
|
|
56277
|
-
const
|
|
56278
|
-
if ((ut >= 0 &&
|
|
56279
|
-
return x(v, G,
|
|
56280
|
-
if (
|
|
56281
|
-
|
|
56282
|
-
else if (
|
|
56283
|
-
const Ve =
|
|
56284
|
-
|
|
56277
|
+
const Ce = v[G], ut = Ce.attrIndex("href");
|
|
56278
|
+
if ((ut >= 0 && Ce.attrs ? String((xe = Ce.attrs[ut][1]) != null ? xe : "") : "").trim().startsWith("#"))
|
|
56279
|
+
return x(v, G, ae, ge, ue);
|
|
56280
|
+
if (Ce.attrIndex("target") < 0)
|
|
56281
|
+
Ce.attrPush(["target", "_blank"]);
|
|
56282
|
+
else if (Ce.attrs) {
|
|
56283
|
+
const Ve = Ce.attrIndex("target");
|
|
56284
|
+
Ce.attrs[Ve][1] = "_blank";
|
|
56285
56285
|
}
|
|
56286
|
-
if (
|
|
56287
|
-
|
|
56288
|
-
else if (
|
|
56289
|
-
const Ve =
|
|
56290
|
-
|
|
56286
|
+
if (Ce.attrIndex("rel") < 0)
|
|
56287
|
+
Ce.attrPush(["rel", "noopener noreferrer"]);
|
|
56288
|
+
else if (Ce.attrs) {
|
|
56289
|
+
const Ve = Ce.attrIndex("rel");
|
|
56290
|
+
Ce.attrs[Ve][1] = "noopener noreferrer";
|
|
56291
56291
|
}
|
|
56292
|
-
return x(v, G,
|
|
56292
|
+
return x(v, G, ae, ge, ue);
|
|
56293
56293
|
};
|
|
56294
56294
|
const U = { ADD_ATTR: ["target", "rel"] };
|
|
56295
56295
|
function M(v) {
|
|
56296
56296
|
try {
|
|
56297
|
-
const G = Tp(v),
|
|
56298
|
-
return Id.sanitize(
|
|
56297
|
+
const G = Tp(v), ae = y.render(G);
|
|
56298
|
+
return Id.sanitize(ae, U);
|
|
56299
56299
|
} catch (G) {
|
|
56300
56300
|
console.warn("Markdown parsing failed, fallback to HTML:", G);
|
|
56301
56301
|
try {
|
|
56302
|
-
const
|
|
56302
|
+
const ae = Tp(v).replace(/\n/g, "<br>").replace(
|
|
56303
56303
|
/\*\*(.*?)\*\*/g,
|
|
56304
56304
|
"<strong>$1</strong>"
|
|
56305
56305
|
// 处理加粗
|
|
56306
56306
|
).replace(/\*(.*?)\*/g, "<em>$1</em>");
|
|
56307
|
-
return Id.sanitize(
|
|
56308
|
-
} catch (
|
|
56309
|
-
return console.error("HTML fallback failed:",
|
|
56307
|
+
return Id.sanitize(ae, U);
|
|
56308
|
+
} catch (ae) {
|
|
56309
|
+
return console.error("HTML fallback failed:", ae), v;
|
|
56310
56310
|
}
|
|
56311
56311
|
}
|
|
56312
56312
|
}
|
|
@@ -56329,7 +56329,7 @@ function gC(t, e, n) {
|
|
|
56329
56329
|
function ce() {
|
|
56330
56330
|
_ !== null && (cancelAnimationFrame(_), _ = null);
|
|
56331
56331
|
}
|
|
56332
|
-
function
|
|
56332
|
+
function he() {
|
|
56333
56333
|
u = [], ce();
|
|
56334
56334
|
}
|
|
56335
56335
|
function Je(v) {
|
|
@@ -56358,85 +56358,93 @@ function gC(t, e, n) {
|
|
|
56358
56358
|
function ne(v) {
|
|
56359
56359
|
H(), Je(v);
|
|
56360
56360
|
const G = pr(c);
|
|
56361
|
-
n(12, l = l.map((
|
|
56361
|
+
n(12, l = l.map((ae) => ae.id === v ? Qe(Be({}, ae), {
|
|
56362
56362
|
content: je(G.body),
|
|
56363
56363
|
thinkingSegments: G.thinkingSegments,
|
|
56364
56364
|
thinking: G.thinking,
|
|
56365
56365
|
thinkingStreaming: G.thinkingStreaming,
|
|
56366
56366
|
suggestedQuestions: G.suggestedQuestions
|
|
56367
|
-
}) :
|
|
56367
|
+
}) : ae));
|
|
56368
56368
|
}
|
|
56369
56369
|
function ft(v, G) {
|
|
56370
56370
|
c += G;
|
|
56371
|
-
const
|
|
56372
|
-
if (Ie === "immediate" ||
|
|
56373
|
-
H(), n(12, l = l.map((
|
|
56374
|
-
content: je(
|
|
56375
|
-
thinkingSegments:
|
|
56376
|
-
thinking:
|
|
56377
|
-
thinkingStreaming:
|
|
56378
|
-
suggestedQuestions:
|
|
56379
|
-
}) :
|
|
56371
|
+
const ae = pr(c);
|
|
56372
|
+
if (Ie === "immediate" || ae.body.length > fp) {
|
|
56373
|
+
H(), n(12, l = l.map((ue) => ue.id === v ? Qe(Be({}, ue), {
|
|
56374
|
+
content: je(ae.body),
|
|
56375
|
+
thinkingSegments: ae.thinkingSegments,
|
|
56376
|
+
thinking: ae.thinking,
|
|
56377
|
+
thinkingStreaming: ae.thinkingStreaming,
|
|
56378
|
+
suggestedQuestions: ae.suggestedQuestions
|
|
56379
|
+
}) : ue)), V(!1);
|
|
56380
56380
|
return;
|
|
56381
56381
|
}
|
|
56382
56382
|
const ge = () => {
|
|
56383
56383
|
d = null;
|
|
56384
|
-
const
|
|
56385
|
-
if (
|
|
56384
|
+
const ue = pr(c);
|
|
56385
|
+
if (ue.body.length > fp) {
|
|
56386
56386
|
H(), n(12, l = l.map((Ke) => Ke.id === v ? Qe(Be({}, Ke), {
|
|
56387
|
-
content: je(
|
|
56388
|
-
thinkingSegments:
|
|
56389
|
-
thinking:
|
|
56390
|
-
thinkingStreaming:
|
|
56391
|
-
suggestedQuestions:
|
|
56387
|
+
content: je(ue.body),
|
|
56388
|
+
thinkingSegments: ue.thinkingSegments,
|
|
56389
|
+
thinking: ue.thinking,
|
|
56390
|
+
thinkingStreaming: ue.thinkingStreaming,
|
|
56391
|
+
suggestedQuestions: ue.suggestedQuestions
|
|
56392
56392
|
}) : Ke)), V(!1);
|
|
56393
56393
|
return;
|
|
56394
56394
|
}
|
|
56395
|
-
const
|
|
56395
|
+
const Ce = je(ue.body), ut = l.find((Ke) => Ke.id === v);
|
|
56396
56396
|
if (!ut)
|
|
56397
56397
|
return;
|
|
56398
56398
|
const qt = ut.content.length;
|
|
56399
|
-
if (qt >=
|
|
56399
|
+
if (qt >= Ce.length) {
|
|
56400
56400
|
n(12, l = l.map((Ke) => Ke.id === v ? Qe(Be({}, Ke), {
|
|
56401
|
-
content:
|
|
56402
|
-
thinkingSegments:
|
|
56403
|
-
thinking:
|
|
56404
|
-
thinkingStreaming:
|
|
56405
|
-
suggestedQuestions:
|
|
56401
|
+
content: Ce,
|
|
56402
|
+
thinkingSegments: ue.thinkingSegments,
|
|
56403
|
+
thinking: ue.thinking,
|
|
56404
|
+
thinkingStreaming: ue.thinkingStreaming,
|
|
56405
|
+
suggestedQuestions: ue.suggestedQuestions
|
|
56406
56406
|
}) : Ke));
|
|
56407
56407
|
return;
|
|
56408
56408
|
}
|
|
56409
|
-
const xe = Math.min(
|
|
56409
|
+
const xe = Math.min(Ce.length, qt + pC), Ve = Ce.slice(0, xe);
|
|
56410
56410
|
n(12, l = l.map((Ke) => Ke.id === v ? Qe(Be({}, Ke), {
|
|
56411
56411
|
content: Ve,
|
|
56412
|
-
thinkingSegments:
|
|
56413
|
-
thinking:
|
|
56414
|
-
thinkingStreaming:
|
|
56415
|
-
suggestedQuestions:
|
|
56416
|
-
}) : Ke)), V(!1), xe <
|
|
56412
|
+
thinkingSegments: ue.thinkingSegments,
|
|
56413
|
+
thinking: ue.thinking,
|
|
56414
|
+
thinkingStreaming: ue.thinkingStreaming,
|
|
56415
|
+
suggestedQuestions: ue.suggestedQuestions
|
|
56416
|
+
}) : Ke)), V(!1), xe < Ce.length && (d = requestAnimationFrame(ge));
|
|
56417
56417
|
};
|
|
56418
56418
|
d === null && (d = requestAnimationFrame(ge));
|
|
56419
56419
|
}
|
|
56420
56420
|
function ye(v) {
|
|
56421
|
-
if (n(11, o = v), Se &&
|
|
56422
|
-
|
|
56423
|
-
|
|
56424
|
-
|
|
56421
|
+
if (n(11, o = v), Se && Oe) {
|
|
56422
|
+
const G = Oe;
|
|
56423
|
+
G.style.transition = "none", G.style.height = "auto";
|
|
56424
|
+
const ae = parseInt(getComputedStyle(G).lineHeight, 10) || 21, ge = ae * 3, ue = ae * se, Ce = Math.min(Math.max(G.scrollHeight, ge), ue);
|
|
56425
|
+
G.style.height = `${Ce}px`, requestAnimationFrame(() => {
|
|
56426
|
+
G && (G.style.transition = "");
|
|
56427
|
+
});
|
|
56425
56428
|
}
|
|
56426
|
-
queueMicrotask(() =>
|
|
56429
|
+
queueMicrotask(() => Oe == null ? void 0 : Oe.focus());
|
|
56427
56430
|
}
|
|
56428
|
-
let fe = !1,
|
|
56431
|
+
let fe = !1, Oe;
|
|
56429
56432
|
function lt() {
|
|
56430
56433
|
Se && (n(20, fe = !0), ze());
|
|
56431
56434
|
}
|
|
56432
56435
|
function bt() {
|
|
56433
|
-
Se && (n(20, fe = !1),
|
|
56436
|
+
Se && (n(20, fe = !1), Oe && (n(21, Oe.style.transition = "none", Oe), n(21, Oe.style.height = "", Oe), requestAnimationFrame(() => {
|
|
56437
|
+
Oe && n(21, Oe.style.transition = "", Oe);
|
|
56438
|
+
})));
|
|
56434
56439
|
}
|
|
56435
56440
|
function ze() {
|
|
56436
|
-
if (!Se || !fe || !
|
|
56437
|
-
|
|
56438
|
-
|
|
56439
|
-
|
|
56441
|
+
if (!Se || !fe || !Oe) return;
|
|
56442
|
+
const v = Oe;
|
|
56443
|
+
v.style.transition = "none", v.style.height = "auto";
|
|
56444
|
+
const G = parseInt(getComputedStyle(v).lineHeight) || 21, ae = G * 3, ge = G * se, ue = Math.min(Math.max(v.scrollHeight, ae), ge);
|
|
56445
|
+
v.style.height = `${ue}px`, requestAnimationFrame(() => {
|
|
56446
|
+
v && (v.style.transition = "");
|
|
56447
|
+
});
|
|
56440
56448
|
}
|
|
56441
56449
|
function B() {
|
|
56442
56450
|
ze();
|
|
@@ -56463,14 +56471,14 @@ function gC(t, e, n) {
|
|
|
56463
56471
|
Ps(() => {
|
|
56464
56472
|
K();
|
|
56465
56473
|
});
|
|
56466
|
-
function
|
|
56474
|
+
function _e() {
|
|
56467
56475
|
return rt(this, null, function* () {
|
|
56468
56476
|
if (!o.trim() || i) return;
|
|
56469
56477
|
if (!Y) {
|
|
56470
56478
|
console.error("No session ID available");
|
|
56471
56479
|
return;
|
|
56472
56480
|
}
|
|
56473
|
-
const v = Date.now().toString(), G = Date.now().toString() + Math.random().toString().slice(2, 8),
|
|
56481
|
+
const v = Date.now().toString(), G = Date.now().toString() + Math.random().toString().slice(2, 8), ae = {
|
|
56474
56482
|
sessionId: Y,
|
|
56475
56483
|
requestId: G,
|
|
56476
56484
|
id: v,
|
|
@@ -56478,40 +56486,40 @@ function gC(t, e, n) {
|
|
|
56478
56486
|
content: o.trim(),
|
|
56479
56487
|
timestamp: Date.now()
|
|
56480
56488
|
};
|
|
56481
|
-
n(12, l = [...l,
|
|
56489
|
+
n(12, l = [...l, ae]);
|
|
56482
56490
|
const ge = o.trim();
|
|
56483
|
-
n(11, o = ""), Se &&
|
|
56484
|
-
const
|
|
56491
|
+
n(11, o = ""), Se && Oe && n(21, Oe.style.height = "", Oe);
|
|
56492
|
+
const ue = (Date.now() + 1).toString();
|
|
56485
56493
|
N = 0, I = {
|
|
56486
56494
|
sessionId: Y,
|
|
56487
56495
|
requestId: G,
|
|
56488
56496
|
keyword: ge,
|
|
56489
|
-
assistantMessageId:
|
|
56490
|
-
}, c = "",
|
|
56497
|
+
assistantMessageId: ue
|
|
56498
|
+
}, c = "", he(), n(12, l = [
|
|
56491
56499
|
...l,
|
|
56492
56500
|
{
|
|
56493
56501
|
sessionId: Y,
|
|
56494
56502
|
requestId: G,
|
|
56495
|
-
id:
|
|
56503
|
+
id: ue,
|
|
56496
56504
|
type: "assistant",
|
|
56497
56505
|
content: "",
|
|
56498
56506
|
timestamp: Date.now()
|
|
56499
56507
|
}
|
|
56500
|
-
]), yield Ne(Y, G, ge,
|
|
56508
|
+
]), yield Ne(Y, G, ge, ue, !1);
|
|
56501
56509
|
});
|
|
56502
56510
|
}
|
|
56503
|
-
function Ne(v, G,
|
|
56511
|
+
function Ne(v, G, ae, ge, ue = !1) {
|
|
56504
56512
|
return rt(this, null, function* () {
|
|
56505
56513
|
var ut, qt;
|
|
56506
56514
|
n(18, f = !0), b = !1, m = ge, p += 1;
|
|
56507
|
-
const
|
|
56508
|
-
|
|
56515
|
+
const Ce = p;
|
|
56516
|
+
ue && (c = "", H(), he(), n(12, l = l.map((xe) => xe.id === ge ? Qe(Be({}, xe), {
|
|
56509
56517
|
content: "",
|
|
56510
56518
|
thinkingSegments: void 0,
|
|
56511
56519
|
thinking: void 0,
|
|
56512
56520
|
thinkingStreaming: !1,
|
|
56513
56521
|
suggestedQuestions: []
|
|
56514
|
-
}) : xe))),
|
|
56522
|
+
}) : xe))), ue || he(), E && E.abort(), R && (clearTimeout(R), R = null), E = new AbortController(), re > 0 && (R = setTimeout(
|
|
56515
56523
|
() => {
|
|
56516
56524
|
var xe, Ve;
|
|
56517
56525
|
if (f && E)
|
|
@@ -56547,14 +56555,14 @@ function gC(t, e, n) {
|
|
|
56547
56555
|
body: JSON.stringify({
|
|
56548
56556
|
sessionId: v,
|
|
56549
56557
|
requestId: G,
|
|
56550
|
-
keyword:
|
|
56558
|
+
keyword: ae,
|
|
56551
56559
|
flowId: "1",
|
|
56552
56560
|
extendKeys: D ? { sceneCode: P } : void 0
|
|
56553
56561
|
}),
|
|
56554
56562
|
signal: E.signal,
|
|
56555
56563
|
onmessage(xe) {
|
|
56556
56564
|
try {
|
|
56557
|
-
if (
|
|
56565
|
+
if (Ce !== p || m !== ge)
|
|
56558
56566
|
return;
|
|
56559
56567
|
const Ve = xe.data;
|
|
56560
56568
|
if (Ve) {
|
|
@@ -56577,7 +56585,7 @@ function gC(t, e, n) {
|
|
|
56577
56585
|
}
|
|
56578
56586
|
},
|
|
56579
56587
|
onerror(xe) {
|
|
56580
|
-
if (!(
|
|
56588
|
+
if (!(Ce !== p || m !== ge))
|
|
56581
56589
|
throw H(), n(12, l = l.map((Ve) => Ve.id === ge ? Qe(Be({}, Ve), {
|
|
56582
56590
|
content: "请求异常,请重试",
|
|
56583
56591
|
thinkingSegments: void 0,
|
|
@@ -56587,13 +56595,13 @@ function gC(t, e, n) {
|
|
|
56587
56595
|
}) : Ve)), V(!1), console.error("SSE error:", xe), E = null, n(18, f = !1), xe;
|
|
56588
56596
|
},
|
|
56589
56597
|
onclose() {
|
|
56590
|
-
if (
|
|
56598
|
+
if (Ce !== p)
|
|
56591
56599
|
return;
|
|
56592
56600
|
R && (clearTimeout(R), R = null), m === ge && (E = null, ne(ge), n(18, f = !1), I = null, N = 0);
|
|
56593
56601
|
}
|
|
56594
56602
|
});
|
|
56595
56603
|
} catch (xe) {
|
|
56596
|
-
if (
|
|
56604
|
+
if (Ce !== p)
|
|
56597
56605
|
return;
|
|
56598
56606
|
if (console.error("Failed to send message:", xe), R && (clearTimeout(R), R = null), N < bp && I && !String(xe).includes("abort"))
|
|
56599
56607
|
N++, setTimeout(
|
|
@@ -56603,7 +56611,7 @@ function gC(t, e, n) {
|
|
|
56603
56611
|
1e3
|
|
56604
56612
|
);
|
|
56605
56613
|
else {
|
|
56606
|
-
if (!String(xe).includes("abort") && m === ge &&
|
|
56614
|
+
if (!String(xe).includes("abort") && m === ge && Ce === p) {
|
|
56607
56615
|
H();
|
|
56608
56616
|
const Ke = ((qt = (ut = l.find((It) => It.id === ge)) == null ? void 0 : ut.content) != null ? qt : "").trim() || "请求失败,请稍后重试";
|
|
56609
56617
|
n(12, l = l.map((It) => It.id === ge ? Qe(Be({}, It), {
|
|
@@ -56619,12 +56627,12 @@ function gC(t, e, n) {
|
|
|
56619
56627
|
}
|
|
56620
56628
|
});
|
|
56621
56629
|
}
|
|
56622
|
-
function Pe(v, G,
|
|
56623
|
-
const ge =
|
|
56630
|
+
function Pe(v, G, ae) {
|
|
56631
|
+
const ge = ae.getBoundingClientRect(), ue = L.getBoundingClientRect(), Ce = ge.left < ue.width / 2;
|
|
56624
56632
|
n(15, S = G), n(16, C = {
|
|
56625
56633
|
x: ge.left,
|
|
56626
56634
|
y: ge.top + ge.height / 2,
|
|
56627
|
-
alignRight:
|
|
56635
|
+
alignRight: Ce
|
|
56628
56636
|
});
|
|
56629
56637
|
}
|
|
56630
56638
|
function Fe() {
|
|
@@ -56641,7 +56649,7 @@ function gC(t, e, n) {
|
|
|
56641
56649
|
function We(v, G) {
|
|
56642
56650
|
return rt(this, null, function* () {
|
|
56643
56651
|
try {
|
|
56644
|
-
const
|
|
56652
|
+
const ae = yield fetch(`${k}/file/downloadFile`, {
|
|
56645
56653
|
method: "POST",
|
|
56646
56654
|
headers: {
|
|
56647
56655
|
"Content-Type": "application/json",
|
|
@@ -56650,12 +56658,12 @@ function gC(t, e, n) {
|
|
|
56650
56658
|
},
|
|
56651
56659
|
body: JSON.stringify({ fileName: v, fileUrl: G })
|
|
56652
56660
|
});
|
|
56653
|
-
if (!
|
|
56661
|
+
if (!ae.ok)
|
|
56654
56662
|
throw new Error("Download failed");
|
|
56655
|
-
const ge =
|
|
56656
|
-
ut.href =
|
|
56657
|
-
} catch (
|
|
56658
|
-
console.error("Failed to download file:",
|
|
56663
|
+
const ge = ae.headers.get("content-type") || "application/octet-stream", ue = yield ae.blob(), Ce = window.URL.createObjectURL(ue), ut = document.createElement("a");
|
|
56664
|
+
ut.href = Ce, ut.download = v, document.body.appendChild(ut), ut.click(), window.URL.revokeObjectURL(Ce), document.body.removeChild(ut);
|
|
56665
|
+
} catch (ae) {
|
|
56666
|
+
console.error("Failed to download file:", ae);
|
|
56659
56667
|
}
|
|
56660
56668
|
});
|
|
56661
56669
|
}
|
|
@@ -56663,25 +56671,25 @@ function gC(t, e, n) {
|
|
|
56663
56671
|
function dt(v, G) {
|
|
56664
56672
|
return rt(this, null, function* () {
|
|
56665
56673
|
try {
|
|
56666
|
-
const
|
|
56674
|
+
const ae = G.replace(/<br\s*\/?>/g, `
|
|
56667
56675
|
`).replace(
|
|
56668
56676
|
/\*\*(.*?)\*\*/g,
|
|
56669
56677
|
"$1"
|
|
56670
56678
|
// 移除加粗标记
|
|
56671
56679
|
).replace(/###/g, "").trim();
|
|
56672
|
-
yield navigator.clipboard.writeText(
|
|
56680
|
+
yield navigator.clipboard.writeText(ae), n(24, Le[v] = !0, Le), setTimeout(
|
|
56673
56681
|
() => {
|
|
56674
56682
|
n(24, Le[v] = !1, Le), n(24, Le);
|
|
56675
56683
|
},
|
|
56676
56684
|
1500
|
|
56677
56685
|
);
|
|
56678
|
-
} catch (
|
|
56679
|
-
console.error("Failed to copy:",
|
|
56686
|
+
} catch (ae) {
|
|
56687
|
+
console.error("Failed to copy:", ae);
|
|
56680
56688
|
}
|
|
56681
56689
|
});
|
|
56682
56690
|
}
|
|
56683
56691
|
let ve = {}, nt = {}, Pt = !1;
|
|
56684
|
-
function
|
|
56692
|
+
function Re(v, G) {
|
|
56685
56693
|
return rt(this, null, function* () {
|
|
56686
56694
|
if (ve[v] === G) {
|
|
56687
56695
|
n(25, ve[v] = null, ve), n(25, ve);
|
|
@@ -56704,8 +56712,8 @@ function gC(t, e, n) {
|
|
|
56704
56712
|
})
|
|
56705
56713
|
})).ok)
|
|
56706
56714
|
throw new Error("Feedback failed");
|
|
56707
|
-
} catch (
|
|
56708
|
-
console.error("Failed to send feedback:",
|
|
56715
|
+
} catch (ae) {
|
|
56716
|
+
console.error("Failed to send feedback:", ae), n(25, ve[v] = null, ve), n(25, ve);
|
|
56709
56717
|
}
|
|
56710
56718
|
else
|
|
56711
56719
|
n(27, Pt = !0);
|
|
@@ -56732,8 +56740,8 @@ function gC(t, e, n) {
|
|
|
56732
56740
|
})).ok)
|
|
56733
56741
|
throw new Error("Feedback failed");
|
|
56734
56742
|
n(27, Pt = !1), n(26, nt[v] = "", nt), n(26, nt);
|
|
56735
|
-
} catch (
|
|
56736
|
-
console.error("Failed to send feedback:",
|
|
56743
|
+
} catch (ae) {
|
|
56744
|
+
console.error("Failed to send feedback:", ae), n(25, ve[v] = null, ve), n(25, ve);
|
|
56737
56745
|
}
|
|
56738
56746
|
});
|
|
56739
56747
|
}
|
|
@@ -56750,7 +56758,7 @@ function gC(t, e, n) {
|
|
|
56750
56758
|
// 弹框宽度 + 间距
|
|
56751
56759
|
y: ge.top - 160
|
|
56752
56760
|
// 弹框高度 + 间距
|
|
56753
|
-
}),
|
|
56761
|
+
}), Re(G, "dislike");
|
|
56754
56762
|
}
|
|
56755
56763
|
let en = null;
|
|
56756
56764
|
function we(v, G) {
|
|
@@ -56787,24 +56795,24 @@ function gC(t, e, n) {
|
|
|
56787
56795
|
});
|
|
56788
56796
|
if (!G.ok)
|
|
56789
56797
|
throw new Error("Failed to load sessions");
|
|
56790
|
-
const
|
|
56791
|
-
if (
|
|
56798
|
+
const ae = yield G.json();
|
|
56799
|
+
if (ae.code === 0) {
|
|
56792
56800
|
s("updateSessionId", { sessionId: v }), n(30, Ht = !1);
|
|
56793
|
-
const ge =
|
|
56794
|
-
const ut = hp(
|
|
56801
|
+
const ge = ae.data.map((ue, Ce) => {
|
|
56802
|
+
const ut = hp(ue.answer), qt = EC(ue.answer), xe = pr(qt);
|
|
56795
56803
|
return [
|
|
56796
56804
|
{
|
|
56797
|
-
sessionId:
|
|
56798
|
-
requestId:
|
|
56799
|
-
id: (Date.now() + 2 *
|
|
56805
|
+
sessionId: ue.sessionId,
|
|
56806
|
+
requestId: ue.requestId,
|
|
56807
|
+
id: (Date.now() + 2 * Ce).toString(),
|
|
56800
56808
|
type: "user",
|
|
56801
|
-
content:
|
|
56802
|
-
timestamp: new Date(
|
|
56809
|
+
content: ue.keyword,
|
|
56810
|
+
timestamp: new Date(ue.createDate).getTime()
|
|
56803
56811
|
},
|
|
56804
56812
|
{
|
|
56805
|
-
sessionId:
|
|
56806
|
-
requestId:
|
|
56807
|
-
id: (Date.now() + 2 *
|
|
56813
|
+
sessionId: ue.sessionId,
|
|
56814
|
+
requestId: ue.requestId,
|
|
56815
|
+
id: (Date.now() + 2 * Ce + 1).toString(),
|
|
56808
56816
|
type: "assistant",
|
|
56809
56817
|
content: je(xe.body),
|
|
56810
56818
|
thinkingSegments: xe.thinkingSegments,
|
|
@@ -56812,7 +56820,7 @@ function gC(t, e, n) {
|
|
|
56812
56820
|
thinkingStreaming: xe.thinkingStreaming,
|
|
56813
56821
|
suggestedQuestions: xe.suggestedQuestions,
|
|
56814
56822
|
attachments: ut,
|
|
56815
|
-
timestamp: new Date(
|
|
56823
|
+
timestamp: new Date(ue.createDate).getTime()
|
|
56816
56824
|
}
|
|
56817
56825
|
];
|
|
56818
56826
|
});
|
|
@@ -56871,7 +56879,7 @@ function gC(t, e, n) {
|
|
|
56871
56879
|
T && (clearTimeout(T), n(17, T = null));
|
|
56872
56880
|
}, nn = () => {
|
|
56873
56881
|
n(15, S = null);
|
|
56874
|
-
}, rn = (v) =>
|
|
56882
|
+
}, rn = (v) => Re(v.id, "like"), At = (v, G) => Mt(v.id, G.detail.feedbackContent), Mn = () => s("requestClose"), Ln = (v) => dt(v.id, v.content), ir = (v, G) => we(G, Le[v.id] ? "已复制" : "复制内容"), wn = (v) => Re(v.id, "like"), kn = (v, G) => we(G, ve[v.id] === "like" ? "取消点赞" : "点赞"), Pn = (v, G) => In(G, v.id), ie = (v, G) => we(G, ve[v.id] === "dislike" ? "取消点踩" : "点踩");
|
|
56875
56883
|
function h(v) {
|
|
56876
56884
|
nt[v.id] = this.value, n(26, nt);
|
|
56877
56885
|
}
|
|
@@ -56889,13 +56897,13 @@ function gC(t, e, n) {
|
|
|
56889
56897
|
const ct = (v) => we(v, "历史会话"), mt = (v) => we(v, "新建会话");
|
|
56890
56898
|
function ht(v) {
|
|
56891
56899
|
bn[v ? "unshift" : "push"](() => {
|
|
56892
|
-
|
|
56900
|
+
Oe = v, n(21, Oe);
|
|
56893
56901
|
});
|
|
56894
56902
|
}
|
|
56895
56903
|
function an() {
|
|
56896
56904
|
o = this.value, n(11, o);
|
|
56897
56905
|
}
|
|
56898
|
-
const He = (v) => v.key === "Enter" && !v.shiftKey && (
|
|
56906
|
+
const He = (v) => v.key === "Enter" && !v.shiftKey && (_e(), v.preventDefault()), Fn = (v) => we(v, "发送消息");
|
|
56899
56907
|
return t.$$set = (v) => {
|
|
56900
56908
|
"zIndex" in v && n(0, j = v.zIndex), "sessionId" in v && n(54, Y = v.sessionId), "hasScene" in v && n(1, D = v.hasScene), "apiPrefix" in v && n(2, k = v.apiPrefix), "theme" in v && n(3, W = v.theme), "showHistory" in v && n(4, z = v.showHistory), "showActions" in v && n(5, de = v.showActions), "showResolutionFeedback" in v && n(6, oe = v.showResolutionFeedback), "sendIcon" in v && n(7, Ae = v.sendIcon), "robotIcon" in v && n(8, me = v.robotIcon), "userIcon" in v && n(9, pe = v.userIcon), "maxInputLength" in v && n(55, ee = v.maxInputLength), "autoExpandTextarea" in v && n(10, Se = v.autoExpandTextarea), "maxTextareaRows" in v && n(56, se = v.maxTextareaRows), "sseTimeout" in v && n(57, re = v.sseTimeout), "initialGreeting" in v && n(58, Ee = v.initialGreeting), "streamRenderMode" in v && n(59, Ie = v.streamRenderMode);
|
|
56901
56909
|
}, t.$$.update = () => {
|
|
@@ -56936,7 +56944,7 @@ function gC(t, e, n) {
|
|
|
56936
56944
|
f,
|
|
56937
56945
|
L,
|
|
56938
56946
|
fe,
|
|
56939
|
-
|
|
56947
|
+
Oe,
|
|
56940
56948
|
q,
|
|
56941
56949
|
P,
|
|
56942
56950
|
Le,
|
|
@@ -56953,12 +56961,12 @@ function gC(t, e, n) {
|
|
|
56953
56961
|
lt,
|
|
56954
56962
|
bt,
|
|
56955
56963
|
B,
|
|
56956
|
-
|
|
56964
|
+
_e,
|
|
56957
56965
|
Pe,
|
|
56958
56966
|
Fe,
|
|
56959
56967
|
We,
|
|
56960
56968
|
dt,
|
|
56961
|
-
|
|
56969
|
+
Re,
|
|
56962
56970
|
Nt,
|
|
56963
56971
|
Mt,
|
|
56964
56972
|
In,
|
|
@@ -56987,7 +56995,7 @@ function gC(t, e, n) {
|
|
|
56987
56995
|
wn,
|
|
56988
56996
|
kn,
|
|
56989
56997
|
Pn,
|
|
56990
|
-
|
|
56998
|
+
ie,
|
|
56991
56999
|
h,
|
|
56992
57000
|
F,
|
|
56993
57001
|
Z,
|
|
@@ -57069,7 +57077,7 @@ function Rp(t) {
|
|
|
57069
57077
|
}
|
|
57070
57078
|
return D = Ie(t), k = Ee[D] = re[D](t), {
|
|
57071
57079
|
c() {
|
|
57072
|
-
var H, ce,
|
|
57080
|
+
var H, ce, he;
|
|
57073
57081
|
e = w("div"), n = w("div"), r = w("div"), a = w("h3"), s = qe(i), o = te(), l = w("div"), c = w("div"), u = w("button"), _ = Te("svg"), pe.c(), p = te(), d = w("span"), S = qe(E), C = te(), T = w("div"), f = w("button"), b = Te("svg"), se.c(), N = te(), I = w("span"), x = qe(y), U = te(), M = w("div"), L = w("button"), L.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>', V = te(), j = w("span"), j.textContent = "关闭助手", Y = te(), k.c(), g(a, "class", "svelte-1h7dpbq"), g(_, "xmlns", "http://www.w3.org/2000/svg"), g(_, "width", "18"), g(_, "height", "18"), g(_, "viewBox", "0 0 24 24"), g(_, "fill", "none"), g(_, "stroke", "currentColor"), g(_, "stroke-width", "2"), g(_, "stroke-linecap", "round"), g(_, "stroke-linejoin", "round"), g(u, "class", "sy-assistant-action-button svelte-1h7dpbq"), g(u, "aria-label", m = /*isFullscreen*/
|
|
57074
57082
|
t[3] ? "退出全屏" : "全屏显示"), J(
|
|
57075
57083
|
u,
|
|
@@ -57096,7 +57104,7 @@ function Rp(t) {
|
|
|
57096
57104
|
j,
|
|
57097
57105
|
"z-index",
|
|
57098
57106
|
/*mergedOptions*/
|
|
57099
|
-
((
|
|
57107
|
+
((he = t[4].zIndex) != null ? he : 1e3) + 3
|
|
57100
57108
|
), g(M, "class", "sy-assistant-tooltip-wrapper svelte-1h7dpbq"), g(l, "class", "sy-assistant-header-actions svelte-1h7dpbq"), g(r, "class", "sy-assistant-drawer-header svelte-1h7dpbq"), g(r, "role", "button"), g(r, "tabindex", "0"), g(r, "aria-label", "拖动助手窗口"), J(
|
|
57101
57109
|
r,
|
|
57102
57110
|
"dragging",
|
|
@@ -57211,9 +57219,9 @@ function Rp(t) {
|
|
|
57211
57219
|
/*isSnapped*/
|
|
57212
57220
|
H[9]
|
|
57213
57221
|
);
|
|
57214
|
-
let
|
|
57215
|
-
D = Ie(H), D ===
|
|
57216
|
-
Ee[
|
|
57222
|
+
let he = D;
|
|
57223
|
+
D = Ie(H), D === he ? Ee[D].p(H, ce) : (Nn(), pt(Ee[he], 1, 1, () => {
|
|
57224
|
+
Ee[he] = null;
|
|
57217
57225
|
}), On(), k = Ee[D], k ? k.p(H, ce) : (k = Ee[D] = re[D](H), k.c()), Xe(k, 1), k.m(n, null)), (!z || ce[0] & /*isFullscreen*/
|
|
57218
57226
|
8) && J(
|
|
57219
57227
|
e,
|
|
@@ -57974,7 +57982,7 @@ function xC(t, e, n) {
|
|
|
57974
57982
|
}
|
|
57975
57983
|
function ee(P) {
|
|
57976
57984
|
if (!C && !y) return;
|
|
57977
|
-
const K = T - P.clientX,
|
|
57985
|
+
const K = T - P.clientX, _e = f - P.clientY;
|
|
57978
57986
|
if (y) {
|
|
57979
57987
|
const Ne = b + K, Pe = P.clientY, Fe = ye();
|
|
57980
57988
|
n(28, x = Math.max(Ge, Math.min(window.innerWidth - Fe - Ge, Ne)));
|
|
@@ -57988,7 +57996,7 @@ function xC(t, e, n) {
|
|
|
57988
57996
|
} else {
|
|
57989
57997
|
const Ne = r.width || 0, Pe = r.height || 0, Fe = b + K;
|
|
57990
57998
|
n(1, N = Math.max(Ge, Math.min(window.innerWidth - Ne - Ge, Fe)));
|
|
57991
|
-
const We = R +
|
|
57999
|
+
const We = R + _e;
|
|
57992
58000
|
n(2, I = Math.max(Ge, Math.min(window.innerHeight - Pe - Ge, We)));
|
|
57993
58001
|
}
|
|
57994
58002
|
}
|
|
@@ -58008,11 +58016,11 @@ function xC(t, e, n) {
|
|
|
58008
58016
|
V && (clearTimeout(V), V = null);
|
|
58009
58017
|
}
|
|
58010
58018
|
function Ee() {
|
|
58011
|
-
const P = window.innerWidth, K = window.innerHeight,
|
|
58019
|
+
const P = window.innerWidth, K = window.innerHeight, _e = ye(), Ne = P - x - _e, Pe = K - U / 100 * K - _e, Fe = Ne, We = P - Ne - _e, Le = Pe, dt = K - Pe - _e, ve = Math.min(Fe, We, Le, dt);
|
|
58012
58020
|
return ve === Fe ? {
|
|
58013
58021
|
direction: "left",
|
|
58014
58022
|
position: {
|
|
58015
|
-
left: `${-
|
|
58023
|
+
left: `${-_e / 2}px`,
|
|
58016
58024
|
right: "auto",
|
|
58017
58025
|
top: `${Pe}px`,
|
|
58018
58026
|
bottom: "auto"
|
|
@@ -58022,7 +58030,7 @@ function xC(t, e, n) {
|
|
|
58022
58030
|
direction: "right",
|
|
58023
58031
|
position: {
|
|
58024
58032
|
left: "auto",
|
|
58025
|
-
right: `${-
|
|
58033
|
+
right: `${-_e / 2}px`,
|
|
58026
58034
|
top: `${Pe}px`,
|
|
58027
58035
|
bottom: "auto"
|
|
58028
58036
|
},
|
|
@@ -58032,7 +58040,7 @@ function xC(t, e, n) {
|
|
|
58032
58040
|
position: {
|
|
58033
58041
|
left: `${Ne}px`,
|
|
58034
58042
|
right: "auto",
|
|
58035
|
-
top: `${-
|
|
58043
|
+
top: `${-_e / 2}px`,
|
|
58036
58044
|
bottom: "auto"
|
|
58037
58045
|
},
|
|
58038
58046
|
transform: "rotate(180deg) scale(0.7)"
|
|
@@ -58042,7 +58050,7 @@ function xC(t, e, n) {
|
|
|
58042
58050
|
left: `${Ne}px`,
|
|
58043
58051
|
right: "auto",
|
|
58044
58052
|
top: "auto",
|
|
58045
|
-
bottom: `${-
|
|
58053
|
+
bottom: `${-_e / 2}px`
|
|
58046
58054
|
},
|
|
58047
58055
|
transform: "scale(0.7)"
|
|
58048
58056
|
};
|
|
@@ -58063,7 +58071,7 @@ function xC(t, e, n) {
|
|
|
58063
58071
|
}
|
|
58064
58072
|
Ps(() => {
|
|
58065
58073
|
typeof _ == "string" ? d = document.querySelector(_) || document.body : d = _ || document.body;
|
|
58066
|
-
const P = (
|
|
58074
|
+
const P = (_e) => ee(_e), K = () => Se();
|
|
58067
58075
|
return document.addEventListener("mousemove", P), document.addEventListener("mouseup", K), p && d && d.appendChild(p), S && S.getBoundingClientRect().left, n(9, z = r.initialState === "snapped"), n(3, k = r.initialState === "fullscreen"), r.initialState === "snapped" ? (n(1, N = 0), n(2, I = 0), n(4, r = Qe(Be({}, r), {
|
|
58068
58076
|
height: typeof window != "undefined" ? window.innerHeight : r.height,
|
|
58069
58077
|
width: r.snappedWidth || r.width
|
|
@@ -58079,13 +58087,13 @@ function xC(t, e, n) {
|
|
|
58079
58087
|
E ? r.hideEnabled && se() : (yield me(), re(), L && H()), n(0, E = !E);
|
|
58080
58088
|
});
|
|
58081
58089
|
}
|
|
58082
|
-
function
|
|
58083
|
-
var P, K,
|
|
58090
|
+
function he() {
|
|
58091
|
+
var P, K, _e, Ne, Pe, Fe, We, Le;
|
|
58084
58092
|
n(3, k = !k), k ? (W.width || (W = {
|
|
58085
58093
|
width: u.width,
|
|
58086
58094
|
height: u.height,
|
|
58087
58095
|
right: (K = (P = u.defaultPosition) == null ? void 0 : P.right) != null ? K : Ge,
|
|
58088
|
-
bottom: (Ne = (
|
|
58096
|
+
bottom: (Ne = (_e = u.defaultPosition) == null ? void 0 : _e.bottom) != null ? Ne : Ge
|
|
58089
58097
|
}), z && n(9, z = !1), n(25, m = Qe(Be({}, r), {
|
|
58090
58098
|
width: window.innerWidth,
|
|
58091
58099
|
height: window.innerHeight,
|
|
@@ -58100,7 +58108,7 @@ function xC(t, e, n) {
|
|
|
58100
58108
|
k || pe(P);
|
|
58101
58109
|
}
|
|
58102
58110
|
function Me() {
|
|
58103
|
-
var P, K,
|
|
58111
|
+
var P, K, _e, Ne;
|
|
58104
58112
|
k && (n(3, k = !1), n(25, m = Qe(Be({}, r), {
|
|
58105
58113
|
width: u.width,
|
|
58106
58114
|
height: u.height,
|
|
@@ -58113,7 +58121,7 @@ function xC(t, e, n) {
|
|
|
58113
58121
|
width: u.width,
|
|
58114
58122
|
height: u.height,
|
|
58115
58123
|
drawerWidth: u.drawerWidth
|
|
58116
|
-
})), n(1, N = (K = (P = u.defaultPosition) == null ? void 0 : P.right) != null ? K : Ge), n(2, I = (Ne = (
|
|
58124
|
+
})), n(1, N = (K = (P = u.defaultPosition) == null ? void 0 : P.right) != null ? K : Ge), n(2, I = (Ne = (_e = u.defaultPosition) == null ? void 0 : _e.bottom) != null ? Ne : Ge));
|
|
58117
58125
|
}
|
|
58118
58126
|
function st() {
|
|
58119
58127
|
return r.isSelf ? r.iconWidth !== void 0 && r.iconHeight !== void 0 ? `width: ${r.iconWidth}px; height: ${r.iconHeight}px;` : "" : r.iconWidth !== void 0 && r.iconHeight !== void 0 ? `width: ${r.iconWidth}px; height: ${r.iconHeight}px;` : "width: 48px; height: 48px;";
|
|
@@ -58142,7 +58150,7 @@ function xC(t, e, n) {
|
|
|
58142
58150
|
const { width: P, height: K } = ft();
|
|
58143
58151
|
return Math.max(P, K);
|
|
58144
58152
|
}
|
|
58145
|
-
const fe = () => n(10, de = !1),
|
|
58153
|
+
const fe = () => n(10, de = !1), Oe = (P) => c("firstResponse", P.detail), lt = (P) => {
|
|
58146
58154
|
n(11, Ae = P.detail.sessionId);
|
|
58147
58155
|
}, bt = () => {
|
|
58148
58156
|
E && ce();
|
|
@@ -58198,7 +58206,7 @@ function xC(t, e, n) {
|
|
|
58198
58206
|
oe,
|
|
58199
58207
|
pe,
|
|
58200
58208
|
ce,
|
|
58201
|
-
|
|
58209
|
+
he,
|
|
58202
58210
|
Je,
|
|
58203
58211
|
Me,
|
|
58204
58212
|
st,
|
|
@@ -58212,7 +58220,7 @@ function xC(t, e, n) {
|
|
|
58212
58220
|
Y,
|
|
58213
58221
|
D,
|
|
58214
58222
|
fe,
|
|
58215
|
-
|
|
58223
|
+
Oe,
|
|
58216
58224
|
lt,
|
|
58217
58225
|
bt,
|
|
58218
58226
|
ze,
|