@sy-design/svelte 1.0.9 → 1.0.10
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 +633 -633
- package/dist/index.umd.js +18 -18
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -12,7 +12,7 @@ var an = (s, e, t) => e in s ? yi(s, e, { enumerable: !0, configurable: !0, writ
|
|
12
12
|
for (var t of Kn(e))
|
13
13
|
Si.call(e, t) && an(s, t, e[t]);
|
14
14
|
return s;
|
15
|
-
},
|
15
|
+
}, we = (s, e) => Ti(s, vi(e));
|
16
16
|
var se = (s, e, t) => an(s, typeof e != "symbol" ? e + "" : e, t), Ai = (s, e, t) => e.has(s) || $n("Cannot " + t);
|
17
17
|
var es = (s, e, t) => e.has(s) ? $n("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t);
|
18
18
|
var Bt = (s, e, t) => (Ai(s, e, "access private method"), t);
|
@@ -32,7 +32,7 @@ var xe = (s, e, t) => new Promise((n, i) => {
|
|
32
32
|
}, a = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(o, l);
|
33
33
|
a((t = t.apply(s, e)).next());
|
34
34
|
});
|
35
|
-
function
|
35
|
+
function Me() {
|
36
36
|
}
|
37
37
|
function js(s) {
|
38
38
|
return s();
|
@@ -56,13 +56,13 @@ function Ri(s, ...e) {
|
|
56
56
|
if (s == null) {
|
57
57
|
for (const n of e)
|
58
58
|
n(void 0);
|
59
|
-
return
|
59
|
+
return Me;
|
60
60
|
}
|
61
61
|
const t = s.subscribe(...e);
|
62
62
|
return t.unsubscribe ? () => t.unsubscribe() : t;
|
63
63
|
}
|
64
64
|
const Ws = typeof window != "undefined";
|
65
|
-
let ns = Ws ? () => window.performance.now() : () => Date.now(), qs = Ws ? (s) => requestAnimationFrame(s) :
|
65
|
+
let ns = Ws ? () => window.performance.now() : () => Date.now(), qs = Ws ? (s) => requestAnimationFrame(s) : Me;
|
66
66
|
const dt = /* @__PURE__ */ new Set();
|
67
67
|
function Gs(s) {
|
68
68
|
dt.forEach((e) => {
|
@@ -89,7 +89,7 @@ function q(s, e, t) {
|
|
89
89
|
function j(s) {
|
90
90
|
s.parentNode && s.parentNode.removeChild(s);
|
91
91
|
}
|
92
|
-
function
|
92
|
+
function Ci(s, e) {
|
93
93
|
for (let t = 0; t < s.length; t += 1)
|
94
94
|
s[t] && s[t].d(e);
|
95
95
|
}
|
@@ -119,7 +119,7 @@ function Ys(s) {
|
|
119
119
|
function r(s, e, t) {
|
120
120
|
t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t);
|
121
121
|
}
|
122
|
-
function
|
122
|
+
function Li(s) {
|
123
123
|
return Array.from(s.childNodes);
|
124
124
|
}
|
125
125
|
function Ne(s, e) {
|
@@ -135,31 +135,31 @@ function F(s, e, t, n) {
|
|
135
135
|
function J(s, e, t) {
|
136
136
|
s.classList.toggle(e, !!t);
|
137
137
|
}
|
138
|
-
let
|
138
|
+
let Lt;
|
139
139
|
function Rt(s) {
|
140
|
-
|
140
|
+
Lt = s;
|
141
141
|
}
|
142
142
|
function xn() {
|
143
|
-
if (!
|
144
|
-
return
|
143
|
+
if (!Lt) throw new Error("Function called outside component initialization");
|
144
|
+
return Lt;
|
145
145
|
}
|
146
146
|
function Zs(s) {
|
147
147
|
xn().$$.on_mount.push(s);
|
148
148
|
}
|
149
|
-
function
|
149
|
+
function Mi(s) {
|
150
150
|
xn().$$.after_update.push(s);
|
151
151
|
}
|
152
|
-
function
|
152
|
+
function Oi(s) {
|
153
153
|
xn().$$.on_destroy.push(s);
|
154
154
|
}
|
155
|
-
const pt = [],
|
155
|
+
const pt = [], kt = [];
|
156
156
|
let gt = [];
|
157
|
-
const ss = [],
|
158
|
-
let
|
159
|
-
function
|
160
|
-
|
157
|
+
const ss = [], Di = /* @__PURE__ */ Promise.resolve();
|
158
|
+
let kn = !1;
|
159
|
+
function zi() {
|
160
|
+
kn || (kn = !0, Di.then(Xs));
|
161
161
|
}
|
162
|
-
function
|
162
|
+
function wn(s) {
|
163
163
|
gt.push(s);
|
164
164
|
}
|
165
165
|
const cn = /* @__PURE__ */ new Set();
|
@@ -167,7 +167,7 @@ let ft = 0;
|
|
167
167
|
function Xs() {
|
168
168
|
if (ft !== 0)
|
169
169
|
return;
|
170
|
-
const s =
|
170
|
+
const s = Lt;
|
171
171
|
do {
|
172
172
|
try {
|
173
173
|
for (; ft < pt.length; ) {
|
@@ -177,7 +177,7 @@ function Xs() {
|
|
177
177
|
} catch (e) {
|
178
178
|
throw pt.length = 0, ft = 0, e;
|
179
179
|
}
|
180
|
-
for (Rt(null), pt.length = 0, ft = 0;
|
180
|
+
for (Rt(null), pt.length = 0, ft = 0; kt.length; ) kt.pop()();
|
181
181
|
for (let e = 0; e < gt.length; e += 1) {
|
182
182
|
const t = gt[e];
|
183
183
|
cn.has(t) || (cn.add(t), t());
|
@@ -186,13 +186,13 @@ function Xs() {
|
|
186
186
|
} while (pt.length);
|
187
187
|
for (; ss.length; )
|
188
188
|
ss.pop()();
|
189
|
-
|
189
|
+
kn = !1, cn.clear(), Rt(s);
|
190
190
|
}
|
191
191
|
function Ni(s) {
|
192
192
|
if (s.fragment !== null) {
|
193
193
|
s.update(), Ee(s.before_update);
|
194
194
|
const e = s.dirty;
|
195
|
-
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(
|
195
|
+
s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(wn);
|
196
196
|
}
|
197
197
|
}
|
198
198
|
function Pi(s) {
|
@@ -223,63 +223,63 @@ function Ke(s, e, t, n) {
|
|
223
223
|
}), s.o(e);
|
224
224
|
} else n && n();
|
225
225
|
}
|
226
|
-
function
|
226
|
+
function wt(s) {
|
227
227
|
return (s == null ? void 0 : s.length) !== void 0 ? s : Array.from(s);
|
228
228
|
}
|
229
229
|
function Vs(s, e) {
|
230
230
|
s.d(1), e.delete(s.key);
|
231
231
|
}
|
232
232
|
function Qs(s, e, t, n, i, o, l, a, c, u, h, p) {
|
233
|
-
let d = s.length, g = o.length,
|
233
|
+
let d = s.length, g = o.length, k = d;
|
234
234
|
const S = {};
|
235
|
-
for (;
|
236
|
-
const
|
237
|
-
for (
|
238
|
-
const T = p(i, o,
|
239
|
-
let R = l.get(
|
240
|
-
R ?
|
241
|
-
}
|
242
|
-
const
|
235
|
+
for (; k--; ) S[s[k].key] = k;
|
236
|
+
const L = [], O = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), _ = [];
|
237
|
+
for (k = g; k--; ) {
|
238
|
+
const T = p(i, o, k), C = t(T);
|
239
|
+
let R = l.get(C);
|
240
|
+
R ? _.push(() => R.p(T, e)) : (R = u(C, T), R.c()), O.set(C, L[k] = R), C in S && v.set(C, Math.abs(k - S[C]));
|
241
|
+
}
|
242
|
+
const w = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
|
243
243
|
function A(T) {
|
244
244
|
Pe(T, 1), T.m(a, h), l.set(T.key, T), h = T.first, g--;
|
245
245
|
}
|
246
246
|
for (; d && g; ) {
|
247
|
-
const T =
|
248
|
-
T ===
|
247
|
+
const T = L[g - 1], C = s[d - 1], R = T.key, P = C.key;
|
248
|
+
T === C ? (h = T.first, d--, g--) : O.has(P) ? !l.has(R) || w.has(R) ? A(T) : y.has(P) ? d-- : v.get(R) > v.get(P) ? (y.add(R), A(T)) : (w.add(P), d--) : (c(C, l), d--);
|
249
249
|
}
|
250
250
|
for (; d--; ) {
|
251
251
|
const T = s[d];
|
252
|
-
|
252
|
+
O.has(T.key) || c(T, l);
|
253
253
|
}
|
254
|
-
for (; g; ) A(
|
255
|
-
return Ee(
|
254
|
+
for (; g; ) A(L[g - 1]);
|
255
|
+
return Ee(_), L;
|
256
256
|
}
|
257
|
-
function
|
257
|
+
function Cn(s) {
|
258
258
|
s && s.c();
|
259
259
|
}
|
260
260
|
function $t(s, e, t) {
|
261
261
|
const { fragment: n, after_update: i } = s.$$;
|
262
|
-
n && n.m(e, t),
|
262
|
+
n && n.m(e, t), wn(() => {
|
263
263
|
const o = s.$$.on_mount.map(js).filter(An);
|
264
264
|
s.$$.on_destroy ? s.$$.on_destroy.push(...o) : Ee(o), s.$$.on_mount = [];
|
265
|
-
}), i.forEach(
|
265
|
+
}), i.forEach(wn);
|
266
266
|
}
|
267
267
|
function en(s, e) {
|
268
268
|
const t = s.$$;
|
269
269
|
t.fragment !== null && (Pi(t.after_update), Ee(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
270
270
|
}
|
271
271
|
function Fi(s, e) {
|
272
|
-
s.$$.dirty[0] === -1 && (pt.push(s),
|
272
|
+
s.$$.dirty[0] === -1 && (pt.push(s), zi(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
273
273
|
}
|
274
|
-
function
|
275
|
-
const c =
|
274
|
+
function Ln(s, e, t, n, i, o, l = null, a = [-1]) {
|
275
|
+
const c = Lt;
|
276
276
|
Rt(s);
|
277
277
|
const u = s.$$ = {
|
278
278
|
fragment: null,
|
279
279
|
ctx: [],
|
280
280
|
// state
|
281
281
|
props: o,
|
282
|
-
update:
|
282
|
+
update: Me,
|
283
283
|
not_equal: i,
|
284
284
|
bound: ts(),
|
285
285
|
// lifecycle
|
@@ -298,11 +298,11 @@ function Cn(s, e, t, n, i, o, l = null, a = [-1]) {
|
|
298
298
|
l && l(u.root);
|
299
299
|
let h = !1;
|
300
300
|
if (u.ctx = t ? t(s, e.props || {}, (p, d, ...g) => {
|
301
|
-
const
|
302
|
-
return u.ctx && i(u.ctx[p], u.ctx[p] =
|
301
|
+
const k = g.length ? g[0] : d;
|
302
|
+
return u.ctx && i(u.ctx[p], u.ctx[p] = k) && (!u.skip_bound && u.bound[p] && u.bound[p](k), h && Fi(s, p)), d;
|
303
303
|
}) : [], u.update(), h = !0, Ee(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
304
304
|
if (e.hydrate) {
|
305
|
-
const p =
|
305
|
+
const p = Li(e.target);
|
306
306
|
u.fragment && u.fragment.l(p), p.forEach(j);
|
307
307
|
} else
|
308
308
|
u.fragment && u.fragment.c();
|
@@ -310,7 +310,7 @@ function Cn(s, e, t, n, i, o, l = null, a = [-1]) {
|
|
310
310
|
}
|
311
311
|
Rt(c);
|
312
312
|
}
|
313
|
-
class
|
313
|
+
class Mn {
|
314
314
|
constructor() {
|
315
315
|
/**
|
316
316
|
* ### PRIVATE API
|
@@ -331,7 +331,7 @@ class Ln {
|
|
331
331
|
}
|
332
332
|
/** @returns {void} */
|
333
333
|
$destroy() {
|
334
|
-
en(this, 1), this.$destroy =
|
334
|
+
en(this, 1), this.$destroy = Me;
|
335
335
|
}
|
336
336
|
/**
|
337
337
|
* @template {Extract<keyof Events, string>} K
|
@@ -341,7 +341,7 @@ class Ln {
|
|
341
341
|
*/
|
342
342
|
$on(e, t) {
|
343
343
|
if (!An(t))
|
344
|
-
return
|
344
|
+
return Me;
|
345
345
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
346
346
|
return n.push(t), () => {
|
347
347
|
const i = n.indexOf(t);
|
@@ -359,7 +359,7 @@ class Ln {
|
|
359
359
|
const Hi = "4";
|
360
360
|
typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Hi);
|
361
361
|
const ht = [];
|
362
|
-
function Bi(s, e =
|
362
|
+
function Bi(s, e = Me) {
|
363
363
|
let t;
|
364
364
|
const n = /* @__PURE__ */ new Set();
|
365
365
|
function i(a) {
|
@@ -377,9 +377,9 @@ function Bi(s, e = Le) {
|
|
377
377
|
function o(a) {
|
378
378
|
i(a(s));
|
379
379
|
}
|
380
|
-
function l(a, c =
|
380
|
+
function l(a, c = Me) {
|
381
381
|
const u = [a, c];
|
382
|
-
return n.add(u), n.size === 1 && (t = e(i, o) ||
|
382
|
+
return n.add(u), n.size === 1 && (t = e(i, o) || Me), a(s), () => {
|
383
383
|
n.delete(u), n.size === 0 && t && (t(), t = null);
|
384
384
|
};
|
385
385
|
}
|
@@ -388,19 +388,19 @@ function Bi(s, e = Le) {
|
|
388
388
|
function is(s) {
|
389
389
|
return Object.prototype.toString.call(s) === "[object Date]";
|
390
390
|
}
|
391
|
-
function
|
391
|
+
function _n(s, e, t, n) {
|
392
392
|
if (typeof t == "number" || is(t)) {
|
393
393
|
const i = n - t, o = (t - e) / (s.dt || 1 / 60), l = s.opts.stiffness * i, a = s.opts.damping * o, c = (l - a) * s.inv_mass, u = (o + c) * s.dt;
|
394
394
|
return Math.abs(u) < s.opts.precision && Math.abs(i) < s.opts.precision ? n : (s.settled = !1, is(t) ? new Date(t.getTime() + u) : t + u);
|
395
395
|
} else {
|
396
396
|
if (Array.isArray(t))
|
397
397
|
return t.map(
|
398
|
-
(i, o) =>
|
398
|
+
(i, o) => _n(s, e[o], t[o], n[o])
|
399
399
|
);
|
400
400
|
if (typeof t == "object") {
|
401
401
|
const i = {};
|
402
402
|
for (const o in t)
|
403
|
-
i[o] =
|
403
|
+
i[o] = _n(s, e[o], t[o], n[o]);
|
404
404
|
return i;
|
405
405
|
} else
|
406
406
|
throw new Error(`Cannot spring ${typeof t} values`);
|
@@ -409,29 +409,29 @@ function bn(s, e, t, n) {
|
|
409
409
|
function Ui(s, e = {}) {
|
410
410
|
const t = Bi(s), { stiffness: n = 0.15, damping: i = 0.8, precision: o = 0.01 } = e;
|
411
411
|
let l, a, c, u = s, h = s, p = 1, d = 0, g = !1;
|
412
|
-
function
|
413
|
-
h =
|
412
|
+
function k(L, O = {}) {
|
413
|
+
h = L;
|
414
414
|
const v = c = {};
|
415
|
-
return s == null ||
|
415
|
+
return s == null || O.hard || S.stiffness >= 1 && S.damping >= 1 ? (g = !0, l = ns(), u = L, t.set(s = h), Promise.resolve()) : (O.soft && (d = 1 / ((O.soft === !0 ? 0.5 : +O.soft) * 60), p = 0), a || (l = ns(), g = !1, a = Ii((_) => {
|
416
416
|
if (g)
|
417
417
|
return g = !1, a = null, !1;
|
418
418
|
p = Math.min(p + d, 1);
|
419
|
-
const
|
419
|
+
const w = {
|
420
420
|
inv_mass: p,
|
421
421
|
opts: S,
|
422
422
|
settled: !0,
|
423
|
-
dt: (
|
424
|
-
}, y =
|
425
|
-
return l =
|
426
|
-
})), new Promise((
|
423
|
+
dt: (_ - l) * 60 / 1e3
|
424
|
+
}, y = _n(w, u, s, h);
|
425
|
+
return l = _, u = s, t.set(s = y), w.settled && (a = null), !w.settled;
|
426
|
+
})), new Promise((_) => {
|
427
427
|
a.promise.then(() => {
|
428
|
-
v === c &&
|
428
|
+
v === c && _();
|
429
429
|
});
|
430
430
|
}));
|
431
431
|
}
|
432
432
|
const S = {
|
433
|
-
set:
|
434
|
-
update: (
|
433
|
+
set: k,
|
434
|
+
update: (L, O) => k(L(h, s), O),
|
435
435
|
subscribe: t.subscribe,
|
436
436
|
stiffness: n,
|
437
437
|
damping: i,
|
@@ -521,43 +521,43 @@ var Yi = function(s, e) {
|
|
521
521
|
e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, n[i]) && (t[n[i]] = s[n[i]]);
|
522
522
|
return t;
|
523
523
|
};
|
524
|
-
const
|
524
|
+
const bn = "text/event-stream", Zi = 1e3, ls = "last-event-id";
|
525
525
|
function Xi(s, e) {
|
526
526
|
var { signal: t, headers: n, onopen: i, onmessage: o, onclose: l, onerror: a, openWhenHidden: c, fetch: u } = e, h = Yi(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
527
527
|
return new Promise((p, d) => {
|
528
528
|
const g = Object.assign({}, n);
|
529
|
-
g.accept || (g.accept =
|
530
|
-
let
|
529
|
+
g.accept || (g.accept = bn);
|
530
|
+
let k;
|
531
531
|
function S() {
|
532
|
-
|
532
|
+
k.abort(), document.hidden || y();
|
533
533
|
}
|
534
534
|
c || document.addEventListener("visibilitychange", S);
|
535
|
-
let
|
535
|
+
let L = Zi, O = 0;
|
536
536
|
function v() {
|
537
|
-
document.removeEventListener("visibilitychange", S), window.clearTimeout(
|
537
|
+
document.removeEventListener("visibilitychange", S), window.clearTimeout(O), k.abort();
|
538
538
|
}
|
539
539
|
t == null || t.addEventListener("abort", () => {
|
540
540
|
v(), p();
|
541
541
|
});
|
542
|
-
const
|
542
|
+
const _ = u != null ? u : window.fetch, w = i != null ? i : Vi;
|
543
543
|
function y() {
|
544
544
|
return xe(this, null, function* () {
|
545
545
|
var A;
|
546
|
-
|
546
|
+
k = new AbortController();
|
547
547
|
try {
|
548
|
-
const T = yield
|
549
|
-
yield
|
550
|
-
|
551
|
-
}, (
|
552
|
-
|
548
|
+
const T = yield _(s, Object.assign(Object.assign({}, h), { headers: g, signal: k.signal }));
|
549
|
+
yield w(T), yield ji(T.body, Wi(qi((C) => {
|
550
|
+
C ? g[ls] = C : delete g[ls];
|
551
|
+
}, (C) => {
|
552
|
+
L = C;
|
553
553
|
}, o))), l == null || l(), v(), p();
|
554
554
|
} catch (T) {
|
555
|
-
if (!
|
555
|
+
if (!k.signal.aborted)
|
556
556
|
try {
|
557
|
-
const
|
558
|
-
window.clearTimeout(
|
559
|
-
} catch (
|
560
|
-
v(), d(
|
557
|
+
const C = (A = a == null ? void 0 : a(T)) !== null && A !== void 0 ? A : L;
|
558
|
+
window.clearTimeout(O), O = window.setTimeout(y, C);
|
559
|
+
} catch (C) {
|
560
|
+
v(), d(C);
|
561
561
|
}
|
562
562
|
}
|
563
563
|
});
|
@@ -567,10 +567,10 @@ function Xi(s, e) {
|
|
567
567
|
}
|
568
568
|
function Vi(s) {
|
569
569
|
const e = s.headers.get("content-type");
|
570
|
-
if (!(e != null && e.startsWith(
|
571
|
-
throw new Error(`Expected content-type to be ${
|
570
|
+
if (!(e != null && e.startsWith(bn)))
|
571
|
+
throw new Error(`Expected content-type to be ${bn}, Actual: ${e}`);
|
572
572
|
}
|
573
|
-
function
|
573
|
+
function On() {
|
574
574
|
return {
|
575
575
|
async: !1,
|
576
576
|
breaks: !1,
|
@@ -584,7 +584,7 @@ function Mn() {
|
|
584
584
|
walkTokens: null
|
585
585
|
};
|
586
586
|
}
|
587
|
-
let lt =
|
587
|
+
let lt = On();
|
588
588
|
function Js(s) {
|
589
589
|
lt = s;
|
590
590
|
}
|
@@ -595,7 +595,7 @@ const Ks = /[&<>"']/, Qi = new RegExp(Ks.source, "g"), $s = /[<>"']|&(?!(#\d{1,7
|
|
595
595
|
'"': """,
|
596
596
|
"'": "'"
|
597
597
|
}, rs = (s) => Ki[s];
|
598
|
-
function
|
598
|
+
function Oe(s, e) {
|
599
599
|
if (e) {
|
600
600
|
if (Ks.test(s))
|
601
601
|
return s.replace(Qi, rs);
|
@@ -677,7 +677,7 @@ function no(s, e) {
|
|
677
677
|
return -1;
|
678
678
|
}
|
679
679
|
function us(s, e, t, n) {
|
680
|
-
const i = e.href, o = e.title ?
|
680
|
+
const i = e.href, o = e.title ? Oe(e.title) : null, l = s[1].replace(/\\([\[\]])/g, "$1");
|
681
681
|
if (s[0].charAt(0) !== "!") {
|
682
682
|
n.state.inLink = !0;
|
683
683
|
const a = {
|
@@ -695,7 +695,7 @@ function us(s, e, t, n) {
|
|
695
695
|
raw: t,
|
696
696
|
href: i,
|
697
697
|
title: o,
|
698
|
-
text:
|
698
|
+
text: Oe(l)
|
699
699
|
};
|
700
700
|
}
|
701
701
|
function so(s, e) {
|
@@ -816,38 +816,38 @@ class Xt {
|
|
816
816
|
break;
|
817
817
|
a = t[0], e = e.substring(a.length);
|
818
818
|
let p = t[2].split(`
|
819
|
-
`, 1)[0].replace(/^\t+/, (
|
819
|
+
`, 1)[0].replace(/^\t+/, (O) => " ".repeat(3 * O.length)), d = e.split(`
|
820
820
|
`, 1)[0], g = 0;
|
821
821
|
this.options.pedantic ? (g = 2, c = p.trimStart()) : (g = t[2].search(/[^ ]/), g = g > 4 ? 1 : g, c = p.slice(g), g += t[1].length);
|
822
|
-
let
|
822
|
+
let k = !1;
|
823
823
|
if (!p && /^ *$/.test(d) && (a += d + `
|
824
824
|
`, e = e.substring(d.length + 1), h = !0), !h) {
|
825
|
-
const
|
825
|
+
const O = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), v = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), w = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
|
826
826
|
for (; e; ) {
|
827
827
|
const y = e.split(`
|
828
828
|
`, 1)[0];
|
829
|
-
if (d = y, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")),
|
829
|
+
if (d = y, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || w.test(d) || O.test(d) || v.test(e))
|
830
830
|
break;
|
831
831
|
if (d.search(/[^ ]/) >= g || !d.trim())
|
832
832
|
c += `
|
833
833
|
` + d.slice(g);
|
834
834
|
else {
|
835
|
-
if (
|
835
|
+
if (k || p.search(/[^ ]/) >= 4 || _.test(p) || w.test(p) || v.test(p))
|
836
836
|
break;
|
837
837
|
c += `
|
838
838
|
` + d;
|
839
839
|
}
|
840
|
-
!
|
840
|
+
!k && !d.trim() && (k = !0), a += y + `
|
841
841
|
`, e = e.substring(y.length + 1), p = d.slice(g);
|
842
842
|
}
|
843
843
|
}
|
844
844
|
o.loose || (u ? o.loose = !0 : /\n *\n *$/.test(a) && (u = !0));
|
845
|
-
let S = null,
|
846
|
-
this.options.gfm && (S = /^\[[ xX]\] /.exec(c), S && (
|
845
|
+
let S = null, L;
|
846
|
+
this.options.gfm && (S = /^\[[ xX]\] /.exec(c), S && (L = S[0] !== "[ ] ", c = c.replace(/^\[[ xX]\] +/, ""))), o.items.push({
|
847
847
|
type: "list_item",
|
848
848
|
raw: a,
|
849
849
|
task: !!S,
|
850
|
-
checked:
|
850
|
+
checked: L,
|
851
851
|
loose: !1,
|
852
852
|
text: c,
|
853
853
|
tokens: []
|
@@ -957,7 +957,7 @@ class Xt {
|
|
957
957
|
return {
|
958
958
|
type: "escape",
|
959
959
|
raw: t[0],
|
960
|
-
text:
|
960
|
+
text: Oe(t[1])
|
961
961
|
};
|
962
962
|
}
|
963
963
|
tag(e) {
|
@@ -1047,12 +1047,12 @@ class Xt {
|
|
1047
1047
|
tokens: this.lexer.inlineTokens(S)
|
1048
1048
|
};
|
1049
1049
|
}
|
1050
|
-
const
|
1050
|
+
const k = g.slice(2, -2);
|
1051
1051
|
return {
|
1052
1052
|
type: "strong",
|
1053
1053
|
raw: g,
|
1054
|
-
text:
|
1055
|
-
tokens: this.lexer.inlineTokens(
|
1054
|
+
text: k,
|
1055
|
+
tokens: this.lexer.inlineTokens(k)
|
1056
1056
|
};
|
1057
1057
|
}
|
1058
1058
|
}
|
@@ -1062,7 +1062,7 @@ class Xt {
|
|
1062
1062
|
if (t) {
|
1063
1063
|
let n = t[2].replace(/\n/g, " ");
|
1064
1064
|
const i = /[^ ]/.test(n), o = /^ /.test(n) && / $/.test(n);
|
1065
|
-
return i && o && (n = n.substring(1, n.length - 1)), n =
|
1065
|
+
return i && o && (n = n.substring(1, n.length - 1)), n = Oe(n, !0), {
|
1066
1066
|
type: "codespan",
|
1067
1067
|
raw: t[0],
|
1068
1068
|
text: n
|
@@ -1091,7 +1091,7 @@ class Xt {
|
|
1091
1091
|
const t = this.rules.inline.autolink.exec(e);
|
1092
1092
|
if (t) {
|
1093
1093
|
let n, i;
|
1094
|
-
return t[2] === "@" ? (n =
|
1094
|
+
return t[2] === "@" ? (n = Oe(t[1]), i = "mailto:" + n) : (n = Oe(t[1]), i = n), {
|
1095
1095
|
type: "link",
|
1096
1096
|
raw: t[0],
|
1097
1097
|
text: n,
|
@@ -1112,13 +1112,13 @@ class Xt {
|
|
1112
1112
|
if (t = this.rules.inline.url.exec(e)) {
|
1113
1113
|
let o, l;
|
1114
1114
|
if (t[2] === "@")
|
1115
|
-
o =
|
1115
|
+
o = Oe(t[0]), l = "mailto:" + o;
|
1116
1116
|
else {
|
1117
1117
|
let a;
|
1118
1118
|
do
|
1119
1119
|
a = t[0], t[0] = (i = (n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) != null ? i : "";
|
1120
1120
|
while (a !== t[0]);
|
1121
|
-
o =
|
1121
|
+
o = Oe(t[0]), t[1] === "www." ? l = "http://" + t[0] : l = t[0];
|
1122
1122
|
}
|
1123
1123
|
return {
|
1124
1124
|
type: "link",
|
@@ -1139,7 +1139,7 @@ class Xt {
|
|
1139
1139
|
const t = this.rules.inline.text.exec(e);
|
1140
1140
|
if (t) {
|
1141
1141
|
let n;
|
1142
|
-
return this.lexer.state.inRawBlock ? n = t[0] : n =
|
1142
|
+
return this.lexer.state.inRawBlock ? n = t[0] : n = Oe(t[0]), {
|
1143
1143
|
type: "text",
|
1144
1144
|
raw: t[0],
|
1145
1145
|
text: n
|
@@ -1147,13 +1147,13 @@ class Xt {
|
|
1147
1147
|
}
|
1148
1148
|
}
|
1149
1149
|
}
|
1150
|
-
const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
|
1150
|
+
const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Mt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ro = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ei = /(?:[*+-]|\d{1,9}[.)])/, ti = te(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, ei).getRegex(), Dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ao = /^[^\n]+/, zn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, co = te(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", zn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), uo = te(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ei).getRegex(), tn = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Nn = /<!--(?!-?>)[\s\S]*?(?:-->|$)/, fo = te("^ {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", Nn).replace("tag", tn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ni = te(Dn).replace("hr", Mt).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", tn).getRegex(), ho = te(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ni).getRegex(), Pn = {
|
1151
1151
|
blockquote: ho,
|
1152
1152
|
code: oo,
|
1153
1153
|
def: co,
|
1154
1154
|
fences: lo,
|
1155
1155
|
heading: ro,
|
1156
|
-
hr:
|
1156
|
+
hr: Mt,
|
1157
1157
|
html: fo,
|
1158
1158
|
lheading: ti,
|
1159
1159
|
list: uo,
|
@@ -1161,49 +1161,49 @@ const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo =
|
|
1161
1161
|
paragraph: ni,
|
1162
1162
|
table: It,
|
1163
1163
|
text: ao
|
1164
|
-
}, fs = te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",
|
1164
|
+
}, fs = te("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\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", tn).getRegex(), po = we(ee({}, Pn), {
|
1165
1165
|
table: fs,
|
1166
|
-
paragraph: te(
|
1167
|
-
}), go =
|
1166
|
+
paragraph: te(Dn).replace("hr", Mt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", fs).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", tn).getRegex()
|
1167
|
+
}), go = we(ee({}, Pn), {
|
1168
1168
|
html: te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Nn).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(),
|
1169
1169
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
1170
1170
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
1171
1171
|
fences: It,
|
1172
1172
|
// fences not supported
|
1173
1173
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
1174
|
-
paragraph: te(
|
1174
|
+
paragraph: te(Dn).replace("hr", Mt).replace("heading", ` *#{1,6} *[^
|
1175
1175
|
]`).replace("lheading", ti).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
1176
|
-
}), si = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ii = /^( {2,}|\\)\n(?!\s*$)/,
|
1176
|
+
}), si = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, mo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ii = /^( {2,}|\\)\n(?!\s*$)/, ko = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ot = "\\p{P}$+<=>`^|~", wo = te(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ot).getRegex(), _o = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, bo = te(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ot).getRegex(), yo = te("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ot).getRegex(), To = te("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ot).getRegex(), vo = te(/\\([punct])/, "gu").replace(/punct/g, Ot).getRegex(), Eo = te(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), So = te(Nn).replace("(?:-->|$)", "-->").getRegex(), Ao = te("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", So).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Vt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, xo = te(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), oi = te(/^!?\[(label)\]\[(ref)\]/).replace("label", Vt).replace("ref", zn).getRegex(), li = te(/^!?\[(ref)\](?:\[\])?/).replace("ref", zn).getRegex(), Ro = te("reflink|nolink(?!\\()", "g").replace("reflink", oi).replace("nolink", li).getRegex(), Fn = {
|
1177
1177
|
_backpedal: It,
|
1178
1178
|
// only used for GFM url
|
1179
1179
|
anyPunctuation: vo,
|
1180
1180
|
autolink: Eo,
|
1181
|
-
blockSkip:
|
1181
|
+
blockSkip: _o,
|
1182
1182
|
br: ii,
|
1183
1183
|
code: mo,
|
1184
1184
|
del: It,
|
1185
|
-
emStrongLDelim:
|
1185
|
+
emStrongLDelim: bo,
|
1186
1186
|
emStrongRDelimAst: yo,
|
1187
1187
|
emStrongRDelimUnd: To,
|
1188
1188
|
escape: si,
|
1189
1189
|
link: xo,
|
1190
1190
|
nolink: li,
|
1191
|
-
punctuation:
|
1191
|
+
punctuation: wo,
|
1192
1192
|
reflink: oi,
|
1193
1193
|
reflinkSearch: Ro,
|
1194
1194
|
tag: Ao,
|
1195
|
-
text:
|
1195
|
+
text: ko,
|
1196
1196
|
url: It
|
1197
|
-
}, Io =
|
1197
|
+
}, Io = we(ee({}, Fn), {
|
1198
1198
|
link: te(/^!?\[(label)\]\((.*?)\)/).replace("label", Vt).getRegex(),
|
1199
1199
|
reflink: te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Vt).getRegex()
|
1200
|
-
}), yn =
|
1200
|
+
}), yn = we(ee({}, Fn), {
|
1201
1201
|
escape: te(si).replace("])", "~|])").getRegex(),
|
1202
1202
|
url: te(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
1203
1203
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
1204
1204
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
1205
1205
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
1206
|
-
}),
|
1206
|
+
}), Co = we(ee({}, yn), {
|
1207
1207
|
br: te(ii).replace("{2,}", "*").getRegex(),
|
1208
1208
|
text: te(yn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
1209
1209
|
}), jt = {
|
@@ -1213,7 +1213,7 @@ const io = /^(?: *(?:\n|$))+/, oo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, lo =
|
|
1213
1213
|
}, Tt = {
|
1214
1214
|
normal: Fn,
|
1215
1215
|
gfm: yn,
|
1216
|
-
breaks:
|
1216
|
+
breaks: Co,
|
1217
1217
|
pedantic: Io
|
1218
1218
|
};
|
1219
1219
|
class Ye {
|
@@ -1448,8 +1448,8 @@ class Qt {
|
|
1448
1448
|
var o;
|
1449
1449
|
const i = (o = (t || "").match(/^\S*/)) == null ? void 0 : o[0];
|
1450
1450
|
return e = e.replace(/\n$/, "") + `
|
1451
|
-
`, i ? '<pre><code class="language-' +
|
1452
|
-
` : "<pre><code>" + (n ? e :
|
1451
|
+
`, i ? '<pre><code class="language-' + Oe(i) + '">' + (n ? e : Oe(e, !0)) + `</code></pre>
|
1452
|
+
` : "<pre><code>" + (n ? e : Oe(e, !0)) + `</code></pre>
|
1453
1453
|
`;
|
1454
1454
|
}
|
1455
1455
|
blockquote(e) {
|
@@ -1646,16 +1646,16 @@ class Ze {
|
|
1646
1646
|
const l = o, a = l.ordered, c = l.start, u = l.loose;
|
1647
1647
|
let h = "";
|
1648
1648
|
for (let p = 0; p < l.items.length; p++) {
|
1649
|
-
const d = l.items[p], g = d.checked,
|
1649
|
+
const d = l.items[p], g = d.checked, k = d.task;
|
1650
1650
|
let S = "";
|
1651
1651
|
if (d.task) {
|
1652
|
-
const
|
1653
|
-
u ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text =
|
1652
|
+
const L = this.renderer.checkbox(!!g);
|
1653
|
+
u ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text = L + " " + d.tokens[0].text, d.tokens[0].tokens && d.tokens[0].tokens.length > 0 && d.tokens[0].tokens[0].type === "text" && (d.tokens[0].tokens[0].text = L + " " + d.tokens[0].tokens[0].text)) : d.tokens.unshift({
|
1654
1654
|
type: "text",
|
1655
|
-
text:
|
1656
|
-
}) : S +=
|
1655
|
+
text: L + " "
|
1656
|
+
}) : S += L + " ";
|
1657
1657
|
}
|
1658
|
-
S += this.parse(d.tokens, u), h += this.renderer.listitem(S,
|
1658
|
+
S += this.parse(d.tokens, u), h += this.renderer.listitem(S, k, !!g);
|
1659
1659
|
}
|
1660
1660
|
n += this.renderer.list(h, a, c);
|
1661
1661
|
continue;
|
@@ -1764,7 +1764,7 @@ class Ze {
|
|
1764
1764
|
return n;
|
1765
1765
|
}
|
1766
1766
|
}
|
1767
|
-
class
|
1767
|
+
class Ct {
|
1768
1768
|
constructor(e) {
|
1769
1769
|
se(this, "options");
|
1770
1770
|
this.options = e || lt;
|
@@ -1788,16 +1788,16 @@ class zt {
|
|
1788
1788
|
return e;
|
1789
1789
|
}
|
1790
1790
|
}
|
1791
|
-
se(
|
1791
|
+
se(Ct, "passThroughHooks", /* @__PURE__ */ new Set([
|
1792
1792
|
"preprocess",
|
1793
1793
|
"postprocess",
|
1794
1794
|
"processAllTokens"
|
1795
1795
|
]));
|
1796
1796
|
var ot, Tn, ri;
|
1797
|
-
class
|
1797
|
+
class Lo {
|
1798
1798
|
constructor(...e) {
|
1799
1799
|
es(this, ot);
|
1800
|
-
se(this, "defaults",
|
1800
|
+
se(this, "defaults", On());
|
1801
1801
|
se(this, "options", this.setOptions);
|
1802
1802
|
se(this, "parse", Bt(this, ot, Tn).call(this, Ye.lex, Ze.parse));
|
1803
1803
|
se(this, "parseInline", Bt(this, ot, Tn).call(this, Ye.lexInline, Ze.parseInline));
|
@@ -1806,7 +1806,7 @@ class Co {
|
|
1806
1806
|
se(this, "TextRenderer", Hn);
|
1807
1807
|
se(this, "Lexer", Ye);
|
1808
1808
|
se(this, "Tokenizer", Xt);
|
1809
|
-
se(this, "Hooks",
|
1809
|
+
se(this, "Hooks", Ct);
|
1810
1810
|
this.use(...e);
|
1811
1811
|
}
|
1812
1812
|
/**
|
@@ -1893,14 +1893,14 @@ class Co {
|
|
1893
1893
|
i.tokenizer = o;
|
1894
1894
|
}
|
1895
1895
|
if (n.hooks) {
|
1896
|
-
const o = this.defaults.hooks || new
|
1896
|
+
const o = this.defaults.hooks || new Ct();
|
1897
1897
|
for (const l in n.hooks) {
|
1898
1898
|
if (!(l in o))
|
1899
1899
|
throw new Error(`hook '${l}' does not exist`);
|
1900
1900
|
if (l === "options")
|
1901
1901
|
continue;
|
1902
1902
|
const a = l, c = n.hooks[a], u = o[a];
|
1903
|
-
|
1903
|
+
Ct.passThroughHooks.has(l) ? o[a] = (h) => {
|
1904
1904
|
if (this.defaults.async)
|
1905
1905
|
return Promise.resolve(c.call(o, h)).then((d) => u.call(o, d));
|
1906
1906
|
const p = c.call(o, h);
|
@@ -1957,7 +1957,7 @@ ot = new WeakSet(), Tn = function(e, t) {
|
|
1957
1957
|
return (n) => {
|
1958
1958
|
if (n.message += `
|
1959
1959
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
1960
|
-
const i = "<p>An error occurred:</p><pre>" +
|
1960
|
+
const i = "<p>An error occurred:</p><pre>" + Oe(n.message + "", !0) + "</pre>";
|
1961
1961
|
return t ? Promise.resolve(i) : i;
|
1962
1962
|
}
|
1963
1963
|
if (t)
|
@@ -1965,14 +1965,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
1965
1965
|
throw n;
|
1966
1966
|
};
|
1967
1967
|
};
|
1968
|
-
const it = new
|
1968
|
+
const it = new Lo();
|
1969
1969
|
function K(s, e) {
|
1970
1970
|
return it.parse(s, e);
|
1971
1971
|
}
|
1972
1972
|
K.options = K.setOptions = function(s) {
|
1973
1973
|
return it.setOptions(s), K.defaults = it.defaults, Js(K.defaults), K;
|
1974
1974
|
};
|
1975
|
-
K.getDefaults =
|
1975
|
+
K.getDefaults = On;
|
1976
1976
|
K.defaults = lt;
|
1977
1977
|
K.use = function(...s) {
|
1978
1978
|
return it.use(...s), K.defaults = it.defaults, Js(K.defaults), K;
|
@@ -1988,7 +1988,7 @@ K.TextRenderer = Hn;
|
|
1988
1988
|
K.Lexer = Ye;
|
1989
1989
|
K.lexer = Ye.lex;
|
1990
1990
|
K.Tokenizer = Xt;
|
1991
|
-
K.Hooks =
|
1991
|
+
K.Hooks = Ct;
|
1992
1992
|
K.parse = K;
|
1993
1993
|
K.options;
|
1994
1994
|
K.setOptions;
|
@@ -2001,9 +2001,9 @@ Ye.lex;
|
|
2001
2001
|
const {
|
2002
2002
|
entries: ai,
|
2003
2003
|
setPrototypeOf: hs,
|
2004
|
-
isFrozen:
|
2005
|
-
getPrototypeOf:
|
2006
|
-
getOwnPropertyDescriptor:
|
2004
|
+
isFrozen: Mo,
|
2005
|
+
getPrototypeOf: Oo,
|
2006
|
+
getOwnPropertyDescriptor: Do
|
2007
2007
|
} = Object;
|
2008
2008
|
let {
|
2009
2009
|
freeze: Ie,
|
@@ -2025,8 +2025,8 @@ vn || (vn = function(e, t, n) {
|
|
2025
2025
|
En || (En = function(e, t) {
|
2026
2026
|
return new e(...t);
|
2027
2027
|
});
|
2028
|
-
const Wt =
|
2029
|
-
function
|
2028
|
+
const Wt = De(Array.prototype.forEach), ps = De(Array.prototype.pop), vt = De(Array.prototype.push), Zt = De(String.prototype.toLowerCase), un = De(String.prototype.toString), ds = De(String.prototype.match), Et = De(String.prototype.replace), zo = De(String.prototype.indexOf), No = De(String.prototype.trim), Ue = De(Object.prototype.hasOwnProperty), Re = De(RegExp.prototype.test), St = Po(TypeError);
|
2029
|
+
function De(s) {
|
2030
2030
|
return function(e) {
|
2031
2031
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
2032
2032
|
n[i - 1] = arguments[i];
|
@@ -2048,7 +2048,7 @@ function Y(s, e) {
|
|
2048
2048
|
let i = e[n];
|
2049
2049
|
if (typeof i == "string") {
|
2050
2050
|
const o = t(i);
|
2051
|
-
o !== i && (
|
2051
|
+
o !== i && (Mo(e) || (e[n] = o), i = o);
|
2052
2052
|
}
|
2053
2053
|
s[i] = !0;
|
2054
2054
|
}
|
@@ -2067,28 +2067,28 @@ function nt(s) {
|
|
2067
2067
|
}
|
2068
2068
|
function At(s, e) {
|
2069
2069
|
for (; s !== null; ) {
|
2070
|
-
const n =
|
2070
|
+
const n = Do(s, e);
|
2071
2071
|
if (n) {
|
2072
2072
|
if (n.get)
|
2073
|
-
return
|
2073
|
+
return De(n.get);
|
2074
2074
|
if (typeof n.value == "function")
|
2075
|
-
return
|
2075
|
+
return De(n.value);
|
2076
2076
|
}
|
2077
|
-
s =
|
2077
|
+
s = Oo(s);
|
2078
2078
|
}
|
2079
2079
|
function t() {
|
2080
2080
|
return null;
|
2081
2081
|
}
|
2082
2082
|
return t;
|
2083
2083
|
}
|
2084
|
-
const gs = Ie(["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", "section", "select", "shadow", "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"]), fn = Ie(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), hn = Ie(["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"]), Ho = Ie(["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"]), pn = Ie(["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"]), Bo = Ie(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ms = Ie(["#text"]),
|
2084
|
+
const gs = Ie(["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", "section", "select", "shadow", "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"]), fn = Ie(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), hn = Ie(["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"]), Ho = Ie(["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"]), pn = Ie(["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"]), Bo = Ie(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ms = Ie(["#text"]), ks = Ie(["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", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), dn = Ie(["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"]), ws = Ie(["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"]), qt = Ie(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Uo = Fe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), jo = Fe(/<%[\w\W]*|[\w\W]*%>/gm), Wo = Fe(/\$\{[\w\W]*}/gm), qo = Fe(/^data-[\-\w.\u00B7-\uFFFF]+$/), Go = Fe(/^aria-[\-\w]+$/), ui = Fe(
|
2085
2085
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
2086
2086
|
// eslint-disable-line no-useless-escape
|
2087
2087
|
), Yo = Fe(/^(?:\w+script|data):/i), Zo = Fe(
|
2088
2088
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
2089
2089
|
// eslint-disable-line no-control-regex
|
2090
2090
|
), fi = Fe(/^html$/i), Xo = Fe(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
2091
|
-
var
|
2091
|
+
var _s = /* @__PURE__ */ Object.freeze({
|
2092
2092
|
__proto__: null,
|
2093
2093
|
ARIA_ATTR: Go,
|
2094
2094
|
ATTR_WHITESPACE: Zo,
|
@@ -2138,7 +2138,7 @@ const xt = {
|
|
2138
2138
|
} catch (l) {
|
2139
2139
|
return console.warn("TrustedTypes policy " + o + " could not be created."), null;
|
2140
2140
|
}
|
2141
|
-
},
|
2141
|
+
}, bs = function() {
|
2142
2142
|
return {
|
2143
2143
|
afterSanitizeAttributes: [],
|
2144
2144
|
afterSanitizeElements: [],
|
@@ -2153,7 +2153,7 @@ const xt = {
|
|
2153
2153
|
};
|
2154
2154
|
function hi() {
|
2155
2155
|
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Vo();
|
2156
|
-
const e = (
|
2156
|
+
const e = (z) => hi(z);
|
2157
2157
|
if (e.version = "3.2.3", e.removed = [], !s || !s.document || s.document.nodeType !== xt.document)
|
2158
2158
|
return e.isSupported = !1, e;
|
2159
2159
|
let {
|
@@ -2169,22 +2169,22 @@ function hi() {
|
|
2169
2169
|
HTMLFormElement: p,
|
2170
2170
|
DOMParser: d,
|
2171
2171
|
trustedTypes: g
|
2172
|
-
} = s,
|
2172
|
+
} = s, k = c.prototype, S = At(k, "cloneNode"), L = At(k, "remove"), O = At(k, "nextSibling"), v = At(k, "childNodes"), _ = At(k, "parentNode");
|
2173
2173
|
if (typeof l == "function") {
|
2174
|
-
const
|
2175
|
-
|
2174
|
+
const z = t.createElement("template");
|
2175
|
+
z.content && z.content.ownerDocument && (t = z.content.ownerDocument);
|
2176
2176
|
}
|
2177
|
-
let
|
2177
|
+
let w, y = "";
|
2178
2178
|
const {
|
2179
2179
|
implementation: A,
|
2180
2180
|
createNodeIterator: T,
|
2181
|
-
createDocumentFragment:
|
2181
|
+
createDocumentFragment: C,
|
2182
2182
|
getElementsByTagName: R
|
2183
2183
|
} = t, {
|
2184
2184
|
importNode: P
|
2185
2185
|
} = n;
|
2186
|
-
let I =
|
2187
|
-
e.isSupported = typeof ai == "function" && typeof
|
2186
|
+
let I = bs();
|
2187
|
+
e.isSupported = typeof ai == "function" && typeof _ == "function" && A && A.createHTMLDocument !== void 0;
|
2188
2188
|
const {
|
2189
2189
|
MUSTACHE_EXPR: U,
|
2190
2190
|
ERB_EXPR: Z,
|
@@ -2194,13 +2194,13 @@ function hi() {
|
|
2194
2194
|
IS_SCRIPT_OR_DATA: fe,
|
2195
2195
|
ATTR_WHITESPACE: He,
|
2196
2196
|
CUSTOM_ELEMENT: re
|
2197
|
-
} =
|
2197
|
+
} = _s;
|
2198
2198
|
let {
|
2199
2199
|
IS_ALLOWED_URI: je
|
2200
|
-
} =
|
2200
|
+
} = _s, le = null;
|
2201
2201
|
const Xe = Y({}, [...gs, ...fn, ...hn, ...pn, ...ms]);
|
2202
2202
|
let ie = null;
|
2203
|
-
const Se = Y({}, [...
|
2203
|
+
const Se = Y({}, [...ks, ...dn, ...ws, ...qt]);
|
2204
2204
|
let $ = Object.seal(ci(null, {
|
2205
2205
|
tagNameCheck: {
|
2206
2206
|
writable: !0,
|
@@ -2220,53 +2220,53 @@ function hi() {
|
|
2220
2220
|
enumerable: !0,
|
2221
2221
|
value: !1
|
2222
2222
|
}
|
2223
|
-
})),
|
2223
|
+
})), Ce = null, _e = null, Ve = !0, D = !0, ne = !1, N = !0, G = !1, be = !0, ye = !1, Be = !1, We = !1, $e = !1, rt = !1, at = !1, Dt = !0, zt = !1;
|
2224
2224
|
const nn = "user-content-";
|
2225
|
-
let
|
2225
|
+
let _t = !0, tt = !1, et = {}, b = null;
|
2226
2226
|
const H = Y({}, ["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"]);
|
2227
2227
|
let V = null;
|
2228
2228
|
const ce = Y({}, ["audio", "video", "img", "source", "image", "track"]);
|
2229
2229
|
let ue = null;
|
2230
|
-
const
|
2230
|
+
const ze = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), pe = "http://www.w3.org/1998/Math/MathML", Nt = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml";
|
2231
2231
|
let ct = Qe, sn = !1, on = null;
|
2232
2232
|
const di = Y({}, [pe, Nt, Qe], un);
|
2233
2233
|
let Pt = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), Ft = Y({}, ["annotation-xml"]);
|
2234
2234
|
const gi = Y({}, ["title", "style", "font", "a", "script"]);
|
2235
|
-
let
|
2236
|
-
const mi = ["application/xhtml+xml", "text/html"],
|
2235
|
+
let bt = null;
|
2236
|
+
const mi = ["application/xhtml+xml", "text/html"], ki = "text/html";
|
2237
2237
|
let ge = null, ut = null;
|
2238
|
-
const
|
2238
|
+
const wi = t.createElement("form"), Bn = function(f) {
|
2239
2239
|
return f instanceof RegExp || f instanceof Function;
|
2240
2240
|
}, ln = function() {
|
2241
2241
|
let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2242
2242
|
if (!(ut && ut === f)) {
|
2243
|
-
if ((!f || typeof f != "object") && (f = {}), f = nt(f),
|
2244
|
-
mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ?
|
2243
|
+
if ((!f || typeof f != "object") && (f = {}), f = nt(f), bt = // eslint-disable-next-line unicorn/prefer-includes
|
2244
|
+
mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? ki : f.PARSER_MEDIA_TYPE, ge = bt === "application/xhtml+xml" ? un : Zt, le = Ue(f, "ALLOWED_TAGS") ? Y({}, f.ALLOWED_TAGS, ge) : Xe, ie = Ue(f, "ALLOWED_ATTR") ? Y({}, f.ALLOWED_ATTR, ge) : Se, on = Ue(f, "ALLOWED_NAMESPACES") ? Y({}, f.ALLOWED_NAMESPACES, un) : di, ue = Ue(f, "ADD_URI_SAFE_ATTR") ? Y(nt(ze), f.ADD_URI_SAFE_ATTR, ge) : ze, V = Ue(f, "ADD_DATA_URI_TAGS") ? Y(nt(ce), f.ADD_DATA_URI_TAGS, ge) : ce, b = Ue(f, "FORBID_CONTENTS") ? Y({}, f.FORBID_CONTENTS, ge) : H, Ce = Ue(f, "FORBID_TAGS") ? Y({}, f.FORBID_TAGS, ge) : {}, _e = Ue(f, "FORBID_ATTR") ? Y({}, f.FORBID_ATTR, ge) : {}, et = Ue(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Ve = f.ALLOW_ARIA_ATTR !== !1, D = f.ALLOW_DATA_ATTR !== !1, ne = f.ALLOW_UNKNOWN_PROTOCOLS || !1, N = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = f.SAFE_FOR_TEMPLATES || !1, be = f.SAFE_FOR_XML !== !1, ye = f.WHOLE_DOCUMENT || !1, $e = f.RETURN_DOM || !1, rt = f.RETURN_DOM_FRAGMENT || !1, at = f.RETURN_TRUSTED_TYPE || !1, We = f.FORCE_BODY || !1, Dt = f.SANITIZE_DOM !== !1, zt = f.SANITIZE_NAMED_PROPS || !1, _t = f.KEEP_CONTENT !== !1, tt = f.IN_PLACE || !1, je = f.ALLOWED_URI_REGEXP || ui, ct = f.NAMESPACE || Qe, Pt = f.MATHML_TEXT_INTEGRATION_POINTS || Pt, Ft = f.HTML_INTEGRATION_POINTS || Ft, $ = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), G && (D = !1), rt && ($e = !0), et && (le = Y({}, ms), ie = [], et.html === !0 && (Y(le, gs), Y(ie, ks)), et.svg === !0 && (Y(le, fn), Y(ie, dn), Y(ie, qt)), et.svgFilters === !0 && (Y(le, hn), Y(ie, dn), Y(ie, qt)), et.mathMl === !0 && (Y(le, pn), Y(ie, ws), Y(ie, qt))), f.ADD_TAGS && (le === Xe && (le = nt(le)), Y(le, f.ADD_TAGS, ge)), f.ADD_ATTR && (ie === Se && (ie = nt(ie)), Y(ie, f.ADD_ATTR, ge)), f.ADD_URI_SAFE_ATTR && Y(ue, f.ADD_URI_SAFE_ATTR, ge), f.FORBID_CONTENTS && (b === H && (b = nt(b)), Y(b, f.FORBID_CONTENTS, ge)), _t && (le["#text"] = !0), ye && Y(le, ["html", "head", "body"]), le.table && (Y(le, ["tbody"]), delete Ce.tbody), f.TRUSTED_TYPES_POLICY) {
|
2245
2245
|
if (typeof f.TRUSTED_TYPES_POLICY.createHTML != "function")
|
2246
2246
|
throw St('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
2247
2247
|
if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
2248
2248
|
throw St('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
2249
|
-
|
2249
|
+
w = f.TRUSTED_TYPES_POLICY, y = w.createHTML("");
|
2250
2250
|
} else
|
2251
|
-
|
2251
|
+
w === void 0 && (w = Qo(g, i)), w !== null && typeof y == "string" && (y = w.createHTML(""));
|
2252
2252
|
Ie && Ie(f), ut = f;
|
2253
2253
|
}
|
2254
|
-
}, Un = Y({}, [...fn, ...hn, ...Ho]), jn = Y({}, [...pn, ...Bo]),
|
2255
|
-
let E =
|
2254
|
+
}, Un = Y({}, [...fn, ...hn, ...Ho]), jn = Y({}, [...pn, ...Bo]), _i = function(f) {
|
2255
|
+
let E = _(f);
|
2256
2256
|
(!E || !E.tagName) && (E = {
|
2257
2257
|
namespaceURI: ct,
|
2258
2258
|
tagName: "template"
|
2259
2259
|
});
|
2260
|
-
const
|
2261
|
-
return on[f.namespaceURI] ? f.namespaceURI === Nt ? E.namespaceURI === Qe ?
|
2260
|
+
const M = Zt(f.tagName), ae = Zt(E.tagName);
|
2261
|
+
return on[f.namespaceURI] ? f.namespaceURI === Nt ? E.namespaceURI === Qe ? M === "svg" : E.namespaceURI === pe ? M === "svg" && (ae === "annotation-xml" || Pt[ae]) : !!Un[M] : f.namespaceURI === pe ? E.namespaceURI === Qe ? M === "math" : E.namespaceURI === Nt ? M === "math" && Ft[ae] : !!jn[M] : f.namespaceURI === Qe ? E.namespaceURI === Nt && !Ft[ae] || E.namespaceURI === pe && !Pt[ae] ? !1 : !jn[M] && (gi[M] || !Un[M]) : !!(bt === "application/xhtml+xml" && on[f.namespaceURI]) : !1;
|
2262
2262
|
}, qe = function(f) {
|
2263
2263
|
vt(e.removed, {
|
2264
2264
|
element: f
|
2265
2265
|
});
|
2266
2266
|
try {
|
2267
|
-
|
2267
|
+
_(f).removeChild(f);
|
2268
2268
|
} catch (E) {
|
2269
|
-
|
2269
|
+
L(f);
|
2270
2270
|
}
|
2271
2271
|
}, Ht = function(f, E) {
|
2272
2272
|
try {
|
@@ -2274,7 +2274,7 @@ function hi() {
|
|
2274
2274
|
attribute: E.getAttributeNode(f),
|
2275
2275
|
from: E
|
2276
2276
|
});
|
2277
|
-
} catch (
|
2277
|
+
} catch (M) {
|
2278
2278
|
vt(e.removed, {
|
2279
2279
|
attribute: null,
|
2280
2280
|
from: E
|
@@ -2284,37 +2284,37 @@ function hi() {
|
|
2284
2284
|
if ($e || rt)
|
2285
2285
|
try {
|
2286
2286
|
qe(E);
|
2287
|
-
} catch (
|
2287
|
+
} catch (M) {
|
2288
2288
|
}
|
2289
2289
|
else
|
2290
2290
|
try {
|
2291
2291
|
E.setAttribute(f, "");
|
2292
|
-
} catch (
|
2292
|
+
} catch (M) {
|
2293
2293
|
}
|
2294
2294
|
}, Wn = function(f) {
|
2295
|
-
let E = null,
|
2295
|
+
let E = null, M = null;
|
2296
2296
|
if (We)
|
2297
2297
|
f = "<remove></remove>" + f;
|
2298
2298
|
else {
|
2299
|
-
const
|
2300
|
-
|
2299
|
+
const ke = ds(f, /^[\r\n\t ]+/);
|
2300
|
+
M = ke && ke[0];
|
2301
2301
|
}
|
2302
|
-
|
2303
|
-
const ae =
|
2302
|
+
bt === "application/xhtml+xml" && ct === Qe && (f = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + f + "</body></html>");
|
2303
|
+
const ae = w ? w.createHTML(f) : f;
|
2304
2304
|
if (ct === Qe)
|
2305
2305
|
try {
|
2306
|
-
E = new d().parseFromString(ae,
|
2307
|
-
} catch (
|
2306
|
+
E = new d().parseFromString(ae, bt);
|
2307
|
+
} catch (ke) {
|
2308
2308
|
}
|
2309
2309
|
if (!E || !E.documentElement) {
|
2310
2310
|
E = A.createDocument(ct, "template", null);
|
2311
2311
|
try {
|
2312
2312
|
E.documentElement.innerHTML = sn ? y : ae;
|
2313
|
-
} catch (
|
2313
|
+
} catch (ke) {
|
2314
2314
|
}
|
2315
2315
|
}
|
2316
2316
|
const Te = E.body || E.documentElement;
|
2317
|
-
return f &&
|
2317
|
+
return f && M && Te.insertBefore(t.createTextNode(M), Te.childNodes[0] || null), ct === Qe ? R.call(E, ye ? "html" : "body")[0] : ye ? E.documentElement : Te;
|
2318
2318
|
}, qn = function(f) {
|
2319
2319
|
return T.call(
|
2320
2320
|
f.ownerDocument || f,
|
@@ -2328,60 +2328,60 @@ function hi() {
|
|
2328
2328
|
}, Gn = function(f) {
|
2329
2329
|
return typeof a == "function" && f instanceof a;
|
2330
2330
|
};
|
2331
|
-
function Je(
|
2332
|
-
Wt(
|
2333
|
-
|
2331
|
+
function Je(z, f, E) {
|
2332
|
+
Wt(z, (M) => {
|
2333
|
+
M.call(e, f, E, ut);
|
2334
2334
|
});
|
2335
2335
|
}
|
2336
2336
|
const Yn = function(f) {
|
2337
2337
|
let E = null;
|
2338
2338
|
if (Je(I.beforeSanitizeElements, f, null), rn(f))
|
2339
2339
|
return qe(f), !0;
|
2340
|
-
const
|
2340
|
+
const M = ge(f.nodeName);
|
2341
2341
|
if (Je(I.uponSanitizeElement, f, {
|
2342
|
-
tagName:
|
2342
|
+
tagName: M,
|
2343
2343
|
allowedTags: le
|
2344
|
-
}), f.hasChildNodes() && !Gn(f.firstElementChild) && Re(/<[/\w]/g, f.innerHTML) && Re(/<[/\w]/g, f.textContent) || f.nodeType === xt.progressingInstruction ||
|
2344
|
+
}), f.hasChildNodes() && !Gn(f.firstElementChild) && Re(/<[/\w]/g, f.innerHTML) && Re(/<[/\w]/g, f.textContent) || f.nodeType === xt.progressingInstruction || be && f.nodeType === xt.comment && Re(/<[/\w]/g, f.data))
|
2345
2345
|
return qe(f), !0;
|
2346
|
-
if (!le[
|
2347
|
-
if (!
|
2346
|
+
if (!le[M] || Ce[M]) {
|
2347
|
+
if (!Ce[M] && Xn(M) && ($.tagNameCheck instanceof RegExp && Re($.tagNameCheck, M) || $.tagNameCheck instanceof Function && $.tagNameCheck(M)))
|
2348
2348
|
return !1;
|
2349
|
-
if (
|
2350
|
-
const ae =
|
2349
|
+
if (_t && !b[M]) {
|
2350
|
+
const ae = _(f) || f.parentNode, Te = v(f) || f.childNodes;
|
2351
2351
|
if (Te && ae) {
|
2352
|
-
const
|
2353
|
-
for (let
|
2354
|
-
const Ge = S(Te[
|
2355
|
-
Ge.__removalCount = (f.__removalCount || 0) + 1, ae.insertBefore(Ge,
|
2352
|
+
const ke = Te.length;
|
2353
|
+
for (let Le = ke - 1; Le >= 0; --Le) {
|
2354
|
+
const Ge = S(Te[Le], !0);
|
2355
|
+
Ge.__removalCount = (f.__removalCount || 0) + 1, ae.insertBefore(Ge, O(f));
|
2356
2356
|
}
|
2357
2357
|
}
|
2358
2358
|
}
|
2359
2359
|
return qe(f), !0;
|
2360
2360
|
}
|
2361
|
-
return f instanceof c && !
|
2361
|
+
return f instanceof c && !_i(f) || (M === "noscript" || M === "noembed" || M === "noframes") && Re(/<\/no(script|embed|frames)/i, f.innerHTML) ? (qe(f), !0) : (G && f.nodeType === xt.text && (E = f.textContent, Wt([U, Z, Q], (ae) => {
|
2362
2362
|
E = Et(E, ae, " ");
|
2363
2363
|
}), f.textContent !== E && (vt(e.removed, {
|
2364
2364
|
element: f.cloneNode()
|
2365
2365
|
}), f.textContent = E)), Je(I.afterSanitizeElements, f, null), !1);
|
2366
|
-
}, Zn = function(f, E,
|
2367
|
-
if (
|
2366
|
+
}, Zn = function(f, E, M) {
|
2367
|
+
if (Dt && (E === "id" || E === "name") && (M in t || M in wi))
|
2368
2368
|
return !1;
|
2369
|
-
if (!(
|
2369
|
+
if (!(D && !_e[E] && Re(oe, E))) {
|
2370
2370
|
if (!(Ve && Re(he, E))) {
|
2371
|
-
if (!ie[E] ||
|
2371
|
+
if (!ie[E] || _e[E]) {
|
2372
2372
|
if (
|
2373
2373
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
2374
2374
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2375
2375
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
2376
2376
|
!(Xn(f) && ($.tagNameCheck instanceof RegExp && Re($.tagNameCheck, f) || $.tagNameCheck instanceof Function && $.tagNameCheck(f)) && ($.attributeNameCheck instanceof RegExp && Re($.attributeNameCheck, E) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(E)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
2377
2377
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
2378
|
-
E === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && Re($.tagNameCheck,
|
2378
|
+
E === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && Re($.tagNameCheck, M) || $.tagNameCheck instanceof Function && $.tagNameCheck(M)))
|
2379
2379
|
) return !1;
|
2380
2380
|
} else if (!ue[E]) {
|
2381
|
-
if (!Re(je, Et(
|
2382
|
-
if (!((E === "src" || E === "xlink:href" || E === "href") && f !== "script" &&
|
2383
|
-
if (!(ne && !Re(fe, Et(
|
2384
|
-
if (
|
2381
|
+
if (!Re(je, Et(M, He, ""))) {
|
2382
|
+
if (!((E === "src" || E === "xlink:href" || E === "href") && f !== "script" && zo(M, "data:") === 0 && V[f])) {
|
2383
|
+
if (!(ne && !Re(fe, Et(M, He, "")))) {
|
2384
|
+
if (M)
|
2385
2385
|
return !1;
|
2386
2386
|
}
|
2387
2387
|
}
|
@@ -2399,7 +2399,7 @@ function hi() {
|
|
2399
2399
|
} = f;
|
2400
2400
|
if (!E || rn(f))
|
2401
2401
|
return;
|
2402
|
-
const
|
2402
|
+
const M = {
|
2403
2403
|
attrName: "",
|
2404
2404
|
attrValue: "",
|
2405
2405
|
keepAttr: !0,
|
@@ -2409,19 +2409,19 @@ function hi() {
|
|
2409
2409
|
let ae = E.length;
|
2410
2410
|
for (; ae--; ) {
|
2411
2411
|
const Te = E[ae], {
|
2412
|
-
name:
|
2413
|
-
namespaceURI:
|
2412
|
+
name: ke,
|
2413
|
+
namespaceURI: Le,
|
2414
2414
|
value: Ge
|
2415
|
-
} = Te, yt = ge(
|
2416
|
-
let Ae =
|
2417
|
-
if (
|
2418
|
-
Ht(
|
2415
|
+
} = Te, yt = ge(ke);
|
2416
|
+
let Ae = ke === "value" ? Ge : No(Ge);
|
2417
|
+
if (M.attrName = yt, M.attrValue = Ae, M.keepAttr = !0, M.forceKeepAttr = void 0, Je(I.uponSanitizeAttribute, f, M), Ae = M.attrValue, zt && (yt === "id" || yt === "name") && (Ht(ke, f), Ae = nn + Ae), be && Re(/((--!?|])>)|<\/(style|title)/i, Ae)) {
|
2418
|
+
Ht(ke, f);
|
2419
2419
|
continue;
|
2420
2420
|
}
|
2421
|
-
if (
|
2421
|
+
if (M.forceKeepAttr || (Ht(ke, f), !M.keepAttr))
|
2422
2422
|
continue;
|
2423
2423
|
if (!N && Re(/\/>/i, Ae)) {
|
2424
|
-
Ht(
|
2424
|
+
Ht(ke, f);
|
2425
2425
|
continue;
|
2426
2426
|
}
|
2427
2427
|
G && Wt([U, Z, Q], (Jn) => {
|
@@ -2429,92 +2429,92 @@ function hi() {
|
|
2429
2429
|
});
|
2430
2430
|
const Qn = ge(f.nodeName);
|
2431
2431
|
if (Zn(Qn, yt, Ae)) {
|
2432
|
-
if (
|
2432
|
+
if (w && typeof g == "object" && typeof g.getAttributeType == "function" && !Le)
|
2433
2433
|
switch (g.getAttributeType(Qn, yt)) {
|
2434
2434
|
case "TrustedHTML": {
|
2435
|
-
Ae =
|
2435
|
+
Ae = w.createHTML(Ae);
|
2436
2436
|
break;
|
2437
2437
|
}
|
2438
2438
|
case "TrustedScriptURL": {
|
2439
|
-
Ae =
|
2439
|
+
Ae = w.createScriptURL(Ae);
|
2440
2440
|
break;
|
2441
2441
|
}
|
2442
2442
|
}
|
2443
2443
|
try {
|
2444
|
-
|
2444
|
+
Le ? f.setAttributeNS(Le, ke, Ae) : f.setAttribute(ke, Ae), rn(f) ? qe(f) : ps(e.removed);
|
2445
2445
|
} catch (Jn) {
|
2446
2446
|
}
|
2447
2447
|
}
|
2448
2448
|
}
|
2449
2449
|
Je(I.afterSanitizeAttributes, f, null);
|
2450
|
-
},
|
2450
|
+
}, bi = function z(f) {
|
2451
2451
|
let E = null;
|
2452
|
-
const
|
2453
|
-
for (Je(I.beforeSanitizeShadowDOM, f, null); E =
|
2454
|
-
Je(I.uponSanitizeShadowNode, E, null), Yn(E), Vn(E), E.content instanceof o &&
|
2452
|
+
const M = qn(f);
|
2453
|
+
for (Je(I.beforeSanitizeShadowDOM, f, null); E = M.nextNode(); )
|
2454
|
+
Je(I.uponSanitizeShadowNode, E, null), Yn(E), Vn(E), E.content instanceof o && z(E.content);
|
2455
2455
|
Je(I.afterSanitizeShadowDOM, f, null);
|
2456
2456
|
};
|
2457
|
-
return e.sanitize = function(
|
2458
|
-
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, E = null,
|
2459
|
-
if (sn = !
|
2460
|
-
if (typeof
|
2461
|
-
if (
|
2457
|
+
return e.sanitize = function(z) {
|
2458
|
+
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, E = null, M = null, ae = null, Te = null;
|
2459
|
+
if (sn = !z, sn && (z = "<!-->"), typeof z != "string" && !Gn(z))
|
2460
|
+
if (typeof z.toString == "function") {
|
2461
|
+
if (z = z.toString(), typeof z != "string")
|
2462
2462
|
throw St("dirty is not a string, aborting");
|
2463
2463
|
} else
|
2464
2464
|
throw St("toString is not a function");
|
2465
2465
|
if (!e.isSupported)
|
2466
|
-
return
|
2467
|
-
if (Be || ln(f), e.removed = [], typeof
|
2468
|
-
if (
|
2469
|
-
const Ge = ge(
|
2470
|
-
if (!le[Ge] ||
|
2466
|
+
return z;
|
2467
|
+
if (Be || ln(f), e.removed = [], typeof z == "string" && (tt = !1), tt) {
|
2468
|
+
if (z.nodeName) {
|
2469
|
+
const Ge = ge(z.nodeName);
|
2470
|
+
if (!le[Ge] || Ce[Ge])
|
2471
2471
|
throw St("root node is forbidden and cannot be sanitized in-place");
|
2472
2472
|
}
|
2473
|
-
} else if (
|
2474
|
-
E = Wn("<!---->"),
|
2473
|
+
} else if (z instanceof a)
|
2474
|
+
E = Wn("<!---->"), M = E.ownerDocument.importNode(z, !0), M.nodeType === xt.element && M.nodeName === "BODY" || M.nodeName === "HTML" ? E = M : E.appendChild(M);
|
2475
2475
|
else {
|
2476
2476
|
if (!$e && !G && !ye && // eslint-disable-next-line unicorn/prefer-includes
|
2477
|
-
|
2478
|
-
return
|
2479
|
-
if (E = Wn(
|
2477
|
+
z.indexOf("<") === -1)
|
2478
|
+
return w && at ? w.createHTML(z) : z;
|
2479
|
+
if (E = Wn(z), !E)
|
2480
2480
|
return $e ? null : at ? y : "";
|
2481
2481
|
}
|
2482
2482
|
E && We && qe(E.firstChild);
|
2483
|
-
const
|
2484
|
-
for (; ae =
|
2485
|
-
Yn(ae), Vn(ae), ae.content instanceof o &&
|
2483
|
+
const ke = qn(tt ? z : E);
|
2484
|
+
for (; ae = ke.nextNode(); )
|
2485
|
+
Yn(ae), Vn(ae), ae.content instanceof o && bi(ae.content);
|
2486
2486
|
if (tt)
|
2487
|
-
return
|
2487
|
+
return z;
|
2488
2488
|
if ($e) {
|
2489
2489
|
if (rt)
|
2490
|
-
for (Te =
|
2490
|
+
for (Te = C.call(E.ownerDocument); E.firstChild; )
|
2491
2491
|
Te.appendChild(E.firstChild);
|
2492
2492
|
else
|
2493
2493
|
Te = E;
|
2494
2494
|
return (ie.shadowroot || ie.shadowrootmode) && (Te = P.call(n, Te, !0)), Te;
|
2495
2495
|
}
|
2496
|
-
let
|
2497
|
-
return ye && le["!doctype"] && E.ownerDocument && E.ownerDocument.doctype && E.ownerDocument.doctype.name && Re(fi, E.ownerDocument.doctype.name) && (
|
2498
|
-
` +
|
2499
|
-
|
2500
|
-
}),
|
2496
|
+
let Le = ye ? E.outerHTML : E.innerHTML;
|
2497
|
+
return ye && le["!doctype"] && E.ownerDocument && E.ownerDocument.doctype && E.ownerDocument.doctype.name && Re(fi, E.ownerDocument.doctype.name) && (Le = "<!DOCTYPE " + E.ownerDocument.doctype.name + `>
|
2498
|
+
` + Le), G && Wt([U, Z, Q], (Ge) => {
|
2499
|
+
Le = Et(Le, Ge, " ");
|
2500
|
+
}), w && at ? w.createHTML(Le) : Le;
|
2501
2501
|
}, e.setConfig = function() {
|
2502
|
-
let
|
2503
|
-
ln(
|
2502
|
+
let z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2503
|
+
ln(z), Be = !0;
|
2504
2504
|
}, e.clearConfig = function() {
|
2505
2505
|
ut = null, Be = !1;
|
2506
|
-
}, e.isValidAttribute = function(
|
2506
|
+
}, e.isValidAttribute = function(z, f, E) {
|
2507
2507
|
ut || ln({});
|
2508
|
-
const
|
2509
|
-
return Zn(
|
2510
|
-
}, e.addHook = function(
|
2511
|
-
typeof f == "function" && vt(I[
|
2512
|
-
}, e.removeHook = function(
|
2513
|
-
return ps(I[
|
2514
|
-
}, e.removeHooks = function(
|
2515
|
-
I[
|
2508
|
+
const M = ge(z), ae = ge(f);
|
2509
|
+
return Zn(M, ae, E);
|
2510
|
+
}, e.addHook = function(z, f) {
|
2511
|
+
typeof f == "function" && vt(I[z], f);
|
2512
|
+
}, e.removeHook = function(z) {
|
2513
|
+
return ps(I[z]);
|
2514
|
+
}, e.removeHooks = function(z) {
|
2515
|
+
I[z] = [];
|
2516
2516
|
}, e.removeAllHooks = function() {
|
2517
|
-
I =
|
2517
|
+
I = bs();
|
2518
2518
|
}, e;
|
2519
2519
|
}
|
2520
2520
|
var ys = hi();
|
@@ -2600,7 +2600,7 @@ function Es(s) {
|
|
2600
2600
|
};
|
2601
2601
|
}
|
2602
2602
|
function Jo(s) {
|
2603
|
-
let e = [], t = /* @__PURE__ */ new Map(), n, i, o =
|
2603
|
+
let e = [], t = /* @__PURE__ */ new Map(), n, i, o = wt(
|
2604
2604
|
/*sessions*/
|
2605
2605
|
s[0]
|
2606
2606
|
);
|
@@ -2629,7 +2629,7 @@ function Jo(s) {
|
|
2629
2629
|
},
|
2630
2630
|
p(c, u) {
|
2631
2631
|
u & /*sessions, deletingSessionId, showDeleteConfirm, onSelect, formatDate*/
|
2632
|
-
8261 && (o =
|
2632
|
+
8261 && (o = wt(
|
2633
2633
|
/*sessions*/
|
2634
2634
|
c[0]
|
2635
2635
|
), e = Qs(e, u, l, 1, c, o, t, n.parentNode, Vs, Ss, n, vs)), /*isLoading*/
|
@@ -2678,7 +2678,7 @@ function Ss(s, e) {
|
|
2678
2678
|
), a, c, u, h = Rs(
|
2679
2679
|
/*session*/
|
2680
2680
|
e[24].timestamp
|
2681
|
-
) + "", p, d, g,
|
2681
|
+
) + "", p, d, g, k, S, L, O, v, _, w, y;
|
2682
2682
|
function A() {
|
2683
2683
|
return (
|
2684
2684
|
/*click_handler*/
|
@@ -2688,13 +2688,13 @@ function Ss(s, e) {
|
|
2688
2688
|
)
|
2689
2689
|
);
|
2690
2690
|
}
|
2691
|
-
function T(...
|
2691
|
+
function T(...C) {
|
2692
2692
|
return (
|
2693
2693
|
/*click_handler_1*/
|
2694
2694
|
e[18](
|
2695
2695
|
/*session*/
|
2696
2696
|
e[24],
|
2697
|
-
...
|
2697
|
+
...C
|
2698
2698
|
)
|
2699
2699
|
);
|
2700
2700
|
}
|
@@ -2702,9 +2702,9 @@ function Ss(s, e) {
|
|
2702
2702
|
key: s,
|
2703
2703
|
first: null,
|
2704
2704
|
c() {
|
2705
|
-
t = x("div"), n = x("button"), i = x("div"), o = x("div"), a = ve(l), c = W(), u = x("div"), p = ve(h), d = W(), g = x("button"),
|
2705
|
+
t = x("div"), n = x("button"), i = x("div"), o = x("div"), a = ve(l), c = W(), u = x("div"), p = ve(h), d = W(), g = x("button"), k = X("svg"), S = X("path"), L = X("path"), O = X("path"), r(o, "class", "sy-session-title svelte-1g6fj9a"), r(u, "class", "sy-session-time svelte-1g6fj9a"), r(i, "class", "sy-session-info svelte-1g6fj9a"), r(n, "class", "sy-session-select svelte-1g6fj9a"), r(S, "d", "M3 6h18"), r(L, "d", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"), r(O, "d", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"), r(k, "xmlns", "http://www.w3.org/2000/svg"), r(k, "width", "16"), r(k, "height", "16"), r(k, "viewBox", "0 0 24 24"), r(k, "fill", "none"), r(k, "stroke", "currentColor"), r(k, "stroke-width", "2"), r(k, "stroke-linecap", "round"), r(k, "stroke-linejoin", "round"), r(g, "class", "sy-session-delete svelte-1g6fj9a"), g.disabled = v = /*deletingSessionId*/
|
2706
2706
|
e[6] === /*session*/
|
2707
|
-
e[24].sessionId, r(g, "aria-label", "删除会话"), r(t, "class", "sy-session-item svelte-1g6fj9a"), r(t, "data-session-id",
|
2707
|
+
e[24].sessionId, r(g, "aria-label", "删除会话"), r(t, "class", "sy-session-item svelte-1g6fj9a"), r(t, "data-session-id", _ = /*session*/
|
2708
2708
|
e[24].sessionId), J(
|
2709
2709
|
t,
|
2710
2710
|
"deleting",
|
@@ -2712,14 +2712,14 @@ function Ss(s, e) {
|
|
2712
2712
|
e[24].deleting
|
2713
2713
|
), this.first = t;
|
2714
2714
|
},
|
2715
|
-
m(
|
2716
|
-
q(
|
2715
|
+
m(C, R) {
|
2716
|
+
q(C, t, R), m(t, n), m(n, i), m(i, o), m(o, a), m(i, c), m(i, u), m(u, p), m(t, d), m(t, g), m(g, k), m(k, S), m(k, L), m(k, O), w || (y = [
|
2717
2717
|
B(n, "click", A),
|
2718
2718
|
B(g, "click", T)
|
2719
|
-
],
|
2719
|
+
], w = !0);
|
2720
2720
|
},
|
2721
|
-
p(
|
2722
|
-
e =
|
2721
|
+
p(C, R) {
|
2722
|
+
e = C, R & /*sessions*/
|
2723
2723
|
1 && l !== (l = /*session*/
|
2724
2724
|
e[24].title + "") && Ne(a, l), R & /*sessions*/
|
2725
2725
|
1 && h !== (h = Rs(
|
@@ -2729,8 +2729,8 @@ function Ss(s, e) {
|
|
2729
2729
|
65 && v !== (v = /*deletingSessionId*/
|
2730
2730
|
e[6] === /*session*/
|
2731
2731
|
e[24].sessionId) && (g.disabled = v), R & /*sessions*/
|
2732
|
-
1 &&
|
2733
|
-
e[24].sessionId) && r(t, "data-session-id",
|
2732
|
+
1 && _ !== (_ = /*session*/
|
2733
|
+
e[24].sessionId) && r(t, "data-session-id", _), R & /*sessions*/
|
2734
2734
|
1 && J(
|
2735
2735
|
t,
|
2736
2736
|
"deleting",
|
@@ -2738,8 +2738,8 @@ function Ss(s, e) {
|
|
2738
2738
|
e[24].deleting
|
2739
2739
|
);
|
2740
2740
|
},
|
2741
|
-
d(
|
2742
|
-
|
2741
|
+
d(C) {
|
2742
|
+
C && j(t), w = !1, Ee(y);
|
2743
2743
|
}
|
2744
2744
|
};
|
2745
2745
|
}
|
@@ -2821,7 +2821,7 @@ function xs(s) {
|
|
2821
2821
|
};
|
2822
2822
|
}
|
2823
2823
|
function $o(s) {
|
2824
|
-
let e, t, n, i, o, l, a, c, u, h, p, d, g,
|
2824
|
+
let e, t, n, i, o, l, a, c, u, h, p, d, g, k, S, L, O, v, _, w = (
|
2825
2825
|
/*buttonTooltip*/
|
2826
2826
|
s[9] && Es(s)
|
2827
2827
|
);
|
@@ -2831,13 +2831,13 @@ function $o(s) {
|
|
2831
2831
|
R[0].length === 0 ? Ko : Jo
|
2832
2832
|
);
|
2833
2833
|
}
|
2834
|
-
let A = y(s), T = A(s),
|
2834
|
+
let A = y(s), T = A(s), C = (
|
2835
2835
|
/*confirmDeleteId*/
|
2836
2836
|
s[7] && xs(s)
|
2837
2837
|
);
|
2838
2838
|
return {
|
2839
2839
|
c() {
|
2840
|
-
e = x("div"), t = x("div"), n = x("h2"), n.textContent = "历史会话", i = W(), 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 = W(), a = x("div"), c = x("input"), u = W(), h = X("svg"), p = X("circle"), d = X("line"), g = W(),
|
2840
|
+
e = x("div"), t = x("div"), n = x("h2"), n.textContent = "历史会话", i = W(), 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 = W(), a = x("div"), c = x("input"), u = W(), h = X("svg"), p = X("circle"), d = X("line"), g = W(), w && w.c(), k = W(), S = x("div"), T.c(), L = W(), C && C.c(), O = Kt(), r(n, "class", "svelte-1g6fj9a"), r(o, "class", "sy-session-close svelte-1g6fj9a"), r(o, "aria-label", "关闭历史会话"), r(t, "class", "sy-session-header svelte-1g6fj9a"), r(c, "type", "text"), r(c, "class", "sy-session-search-input svelte-1g6fj9a"), r(c, "placeholder", "搜索历史会话..."), r(p, "cx", "11"), r(p, "cy", "11"), r(p, "r", "8"), r(d, "x1", "21"), r(d, "y1", "21"), r(d, "x2", "16.65"), r(d, "y2", "16.65"), r(h, "class", "sy-session-search-icon svelte-1g6fj9a"), r(h, "xmlns", "http://www.w3.org/2000/svg"), r(h, "width", "16"), r(h, "height", "16"), r(h, "viewBox", "0 0 24 24"), r(h, "fill", "none"), r(h, "stroke", "currentColor"), r(h, "stroke-width", "2"), r(h, "stroke-linecap", "round"), r(h, "stroke-linejoin", "round"), r(a, "class", "sy-session-search svelte-1g6fj9a"), r(S, "class", "sy-session-list svelte-1g6fj9a"), r(e, "class", "sy-session-history svelte-1g6fj9a"), F(
|
2841
2841
|
e,
|
2842
2842
|
"z-index",
|
2843
2843
|
/*zIndex*/
|
@@ -2849,7 +2849,7 @@ function $o(s) {
|
|
2849
2849
|
c,
|
2850
2850
|
/*searchQuery*/
|
2851
2851
|
s[4]
|
2852
|
-
), m(a, u), m(a, h), m(h, p), m(h, d), m(e, g),
|
2852
|
+
), m(a, u), m(a, h), m(h, p), m(h, d), m(e, g), w && w.m(e, null), m(e, k), m(e, S), T.m(S, null), q(R, L, P), C && C.m(R, P), q(R, O, P), v || (_ = [
|
2853
2853
|
B(o, "click", function() {
|
2854
2854
|
An(
|
2855
2855
|
/*onClose*/
|
@@ -2890,19 +2890,19 @@ function $o(s) {
|
|
2890
2890
|
/*searchQuery*/
|
2891
2891
|
s[4]
|
2892
2892
|
), /*buttonTooltip*/
|
2893
|
-
s[9] ?
|
2893
|
+
s[9] ? w ? w.p(s, P) : (w = Es(s), w.c(), w.m(e, k)) : w && (w.d(1), w = null), A === (A = y(s)) && T ? T.p(s, P) : (T.d(1), T = A(s), T && (T.c(), T.m(S, null))), P & /*zIndex*/
|
2894
2894
|
8 && F(
|
2895
2895
|
e,
|
2896
2896
|
"z-index",
|
2897
2897
|
/*zIndex*/
|
2898
2898
|
s[3] + 2
|
2899
2899
|
), /*confirmDeleteId*/
|
2900
|
-
s[7] ?
|
2900
|
+
s[7] ? C ? C.p(s, P) : (C = xs(s), C.c(), C.m(O.parentNode, O)) : C && (C.d(1), C = null);
|
2901
2901
|
},
|
2902
|
-
i:
|
2903
|
-
o:
|
2902
|
+
i: Me,
|
2903
|
+
o: Me,
|
2904
2904
|
d(R) {
|
2905
|
-
R && (j(e), j(
|
2905
|
+
R && (j(e), j(L), j(O)), w && w.d(), T.d(), C && C.d(R), v = !1, Ee(_);
|
2906
2906
|
}
|
2907
2907
|
};
|
2908
2908
|
}
|
@@ -2912,7 +2912,7 @@ function Rs(s) {
|
|
2912
2912
|
}
|
2913
2913
|
function el(s, e, t) {
|
2914
2914
|
let { sessions: n = [] } = e, { onClose: i } = e, { onSelect: o } = e, { zIndex: l } = e, a = !1, c = !0, u = 0, h = "", p = null, d = null, g = { x: 0, y: 0 };
|
2915
|
-
function
|
2915
|
+
function k() {
|
2916
2916
|
return xe(this, null, function* () {
|
2917
2917
|
if (!(a || !c)) {
|
2918
2918
|
t(5, a = !0);
|
@@ -2947,24 +2947,24 @@ function el(s, e, t) {
|
|
2947
2947
|
}
|
2948
2948
|
function S(I) {
|
2949
2949
|
const U = I.target, { scrollTop: Z, scrollHeight: Q, clientHeight: oe } = U;
|
2950
|
-
Q - Z - oe < 50 &&
|
2950
|
+
Q - Z - oe < 50 && k();
|
2951
2951
|
}
|
2952
2952
|
Zs(() => {
|
2953
|
-
|
2953
|
+
k();
|
2954
2954
|
});
|
2955
|
-
let
|
2956
|
-
function
|
2955
|
+
let L = null;
|
2956
|
+
function O(I, U) {
|
2957
2957
|
const Q = I.currentTarget.getBoundingClientRect();
|
2958
|
-
t(9,
|
2958
|
+
t(9, L = {
|
2959
2959
|
text: U,
|
2960
2960
|
x: Q.left + Q.width / 2,
|
2961
2961
|
y: Q.bottom + 8
|
2962
2962
|
});
|
2963
2963
|
}
|
2964
2964
|
function v() {
|
2965
|
-
t(9,
|
2965
|
+
t(9, L = null);
|
2966
2966
|
}
|
2967
|
-
function
|
2967
|
+
function _(I, U) {
|
2968
2968
|
const Q = I.currentTarget.getBoundingClientRect();
|
2969
2969
|
t(8, g = {
|
2970
2970
|
x: Q.left - 16,
|
@@ -2972,7 +2972,7 @@ function el(s, e, t) {
|
|
2972
2972
|
y: Q.top + Q.height / 2
|
2973
2973
|
}), t(7, d = U);
|
2974
2974
|
}
|
2975
|
-
function
|
2975
|
+
function w(I) {
|
2976
2976
|
return xe(this, null, function* () {
|
2977
2977
|
if (I && !p)
|
2978
2978
|
try {
|
@@ -2992,7 +2992,7 @@ function el(s, e, t) {
|
|
2992
2992
|
throw new Error("Delete request failed");
|
2993
2993
|
const Q = yield Z.json();
|
2994
2994
|
if (Q.code === 0 && Q.data.respCode === 0)
|
2995
|
-
t(0, n = n.map((oe) =>
|
2995
|
+
t(0, n = n.map((oe) => we(ee({}, oe), {
|
2996
2996
|
deleting: oe.sessionId === I
|
2997
2997
|
}))), setTimeout(
|
2998
2998
|
() => {
|
@@ -3012,18 +3012,18 @@ function el(s, e, t) {
|
|
3012
3012
|
});
|
3013
3013
|
}
|
3014
3014
|
function y() {
|
3015
|
-
d &&
|
3015
|
+
d && w(d);
|
3016
3016
|
}
|
3017
|
-
const A = (I) =>
|
3017
|
+
const A = (I) => O(I, "关闭历史会话");
|
3018
3018
|
function T() {
|
3019
3019
|
h = this.value, t(4, h);
|
3020
3020
|
}
|
3021
|
-
const
|
3021
|
+
const C = (I) => o(I.sessionId), R = (I, U) => _(U, I.sessionId), P = () => t(7, d = null);
|
3022
3022
|
return s.$$set = (I) => {
|
3023
3023
|
"sessions" in I && t(0, n = I.sessions), "onClose" in I && t(1, i = I.onClose), "onSelect" in I && t(2, o = I.onSelect), "zIndex" in I && t(3, l = I.zIndex);
|
3024
3024
|
}, s.$$.update = () => {
|
3025
3025
|
s.$$.dirty & /*searchQuery*/
|
3026
|
-
16 && h !== void 0 && (t(0, n = []), u = 0, c = !0,
|
3026
|
+
16 && h !== void 0 && (t(0, n = []), u = 0, c = !0, k());
|
3027
3027
|
}, [
|
3028
3028
|
n,
|
3029
3029
|
i,
|
@@ -3034,22 +3034,22 @@ function el(s, e, t) {
|
|
3034
3034
|
p,
|
3035
3035
|
d,
|
3036
3036
|
g,
|
3037
|
-
|
3037
|
+
L,
|
3038
3038
|
S,
|
3039
|
-
|
3039
|
+
O,
|
3040
3040
|
v,
|
3041
|
-
|
3041
|
+
_,
|
3042
3042
|
y,
|
3043
3043
|
A,
|
3044
3044
|
T,
|
3045
|
-
|
3045
|
+
C,
|
3046
3046
|
R,
|
3047
3047
|
P
|
3048
3048
|
];
|
3049
3049
|
}
|
3050
|
-
class pi extends
|
3050
|
+
class pi extends Mn {
|
3051
3051
|
constructor(e) {
|
3052
|
-
super(),
|
3052
|
+
super(), Ln(this, e, el, $o, Jt, {
|
3053
3053
|
sessions: 0,
|
3054
3054
|
onClose: 1,
|
3055
3055
|
onSelect: 2,
|
@@ -3061,12 +3061,12 @@ function Is(s, e, t) {
|
|
3061
3061
|
const n = s.slice();
|
3062
3062
|
return n[60] = e[t], n[61] = e, n[62] = t, n;
|
3063
3063
|
}
|
3064
|
-
function
|
3064
|
+
function Cs(s, e, t) {
|
3065
3065
|
const n = s.slice();
|
3066
3066
|
return n[63] = e[t], n[65] = t, n;
|
3067
3067
|
}
|
3068
3068
|
function tl(s) {
|
3069
|
-
let e, t = [], n = /* @__PURE__ */ new Map(), i =
|
3069
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), i = wt(
|
3070
3070
|
/*messages*/
|
3071
3071
|
s[3]
|
3072
3072
|
);
|
@@ -3083,7 +3083,7 @@ function tl(s) {
|
|
3083
3083
|
e = x("div");
|
3084
3084
|
for (let l = 0; l < t.length; l += 1)
|
3085
3085
|
t[l].c();
|
3086
|
-
r(e, "class", "sy-assistant-message-list svelte-
|
3086
|
+
r(e, "class", "sy-assistant-message-list svelte-1gouv71");
|
3087
3087
|
},
|
3088
3088
|
m(l, a) {
|
3089
3089
|
q(l, e, a);
|
@@ -3093,13 +3093,13 @@ function tl(s) {
|
|
3093
3093
|
},
|
3094
3094
|
p(l, a) {
|
3095
3095
|
a[0] & /*messages, dislikeFeedbackPosition, zIndex, submitDislikeFeedback, showDislikeFeedback, feedbackStatus, dislikeFeedbackContent, handleDislikeClick, showButtonTooltip, hideButtonTooltip, handleFeedback, copyStatus, handleCopy, isLoading, tooltipPosition, tooltipTimer, tooltipContent, handleDownload, showTooltip, hideTooltip, renderMarkdown*/
|
3096
|
-
268058361 && (i =
|
3096
|
+
268058361 && (i = wt(
|
3097
3097
|
/*messages*/
|
3098
3098
|
l[3]
|
3099
3099
|
), t = Qs(t, a, o, 1, l, i, n, e, Vs, Ps, null, Is));
|
3100
3100
|
},
|
3101
|
-
i:
|
3102
|
-
o:
|
3101
|
+
i: Me,
|
3102
|
+
o: Me,
|
3103
3103
|
d(l) {
|
3104
3104
|
l && j(e);
|
3105
3105
|
for (let a = 0; a < t.length; a += 1)
|
@@ -3131,7 +3131,7 @@ function nl(s) {
|
|
3131
3131
|
}
|
3132
3132
|
}), {
|
3133
3133
|
c() {
|
3134
|
-
|
3134
|
+
Cn(e.$$.fragment);
|
3135
3135
|
},
|
3136
3136
|
m(n, i) {
|
3137
3137
|
$t(e, n, i), t = !0;
|
@@ -3157,7 +3157,7 @@ function sl(s) {
|
|
3157
3157
|
let e;
|
3158
3158
|
return {
|
3159
3159
|
c() {
|
3160
|
-
e = x("div"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path></svg>', r(e, "class", "sy-assistant-avatar user svelte-
|
3160
|
+
e = x("div"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path></svg>', r(e, "class", "sy-assistant-avatar user svelte-1gouv71");
|
3161
3161
|
},
|
3162
3162
|
m(t, n) {
|
3163
3163
|
q(t, e, n);
|
@@ -3171,7 +3171,7 @@ function il(s) {
|
|
3171
3171
|
let e;
|
3172
3172
|
return {
|
3173
3173
|
c() {
|
3174
|
-
e = x("div"), e.innerHTML = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor"><path d="M896.512 698.88H132.608c-58.88 0-107.008-48.128-107.008-107.008v-10.24c0-58.88 48.128-107.008 107.008-107.008h763.904c58.88 0 107.008 48.128 107.008 107.008v10.24c0 58.88-48.128 107.008-107.008 107.008zM496.64 201.728h35.84v117.248h-35.84z" fill="#6F8698"></path><path d="M516.608 223.744h-4.608c-37.888 0-68.096-30.72-68.096-68.096v-6.656c0-37.888 30.72-68.096 68.096-68.096h4.608c37.888 0 68.096 30.72 68.096 68.096v6.656c0.512 37.888-30.208 68.096-68.096 68.096z" fill="#3677FF"></path><path d="M573.44 944.64H450.56c-181.248 0-327.68-146.432-327.68-327.68v-4.096c0-181.248 146.432-327.68 327.68-327.68h122.88c181.248 0 327.68 146.432 327.68 327.68v4.096c0 180.224-146.432 327.68-327.68 327.68z" fill="#D0D5F1"></path><path d="M681.984 715.264H347.136c-72.704 0-131.584-58.88-131.584-131.584s58.88-131.584 131.584-131.584h334.336c72.704 0 131.584 58.88 131.584 131.584 0.512 72.704-58.368 131.584-131.072 131.584z" fill="#3677FF"></path><path d="M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M443.392 799.232s2.56 58.88 68.096 58.88c58.88 0 69.632-61.952 69.632-61.952s-27.136 33.28-68.096 33.28c-42.496 0-69.632-30.208-69.632-30.208z" fill="#8896A4"></path></svg>', r(e, "class", "sy-assistant-avatar assistant svelte-
|
3174
|
+
e = x("div"), e.innerHTML = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor"><path d="M896.512 698.88H132.608c-58.88 0-107.008-48.128-107.008-107.008v-10.24c0-58.88 48.128-107.008 107.008-107.008h763.904c58.88 0 107.008 48.128 107.008 107.008v10.24c0 58.88-48.128 107.008-107.008 107.008zM496.64 201.728h35.84v117.248h-35.84z" fill="#6F8698"></path><path d="M516.608 223.744h-4.608c-37.888 0-68.096-30.72-68.096-68.096v-6.656c0-37.888 30.72-68.096 68.096-68.096h4.608c37.888 0 68.096 30.72 68.096 68.096v6.656c0.512 37.888-30.208 68.096-68.096 68.096z" fill="#3677FF"></path><path d="M573.44 944.64H450.56c-181.248 0-327.68-146.432-327.68-327.68v-4.096c0-181.248 146.432-327.68 327.68-327.68h122.88c181.248 0 327.68 146.432 327.68 327.68v4.096c0 180.224-146.432 327.68-327.68 327.68z" fill="#D0D5F1"></path><path d="M681.984 715.264H347.136c-72.704 0-131.584-58.88-131.584-131.584s58.88-131.584 131.584-131.584h334.336c72.704 0 131.584 58.88 131.584 131.584 0.512 72.704-58.368 131.584-131.072 131.584z" fill="#3677FF"></path><path d="M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z" fill="#FFFFFF"></path><path d="M443.392 799.232s2.56 58.88 68.096 58.88c58.88 0 69.632-61.952 69.632-61.952s-27.136 33.28-68.096 33.28c-42.496 0-69.632-30.208-69.632-30.208z" fill="#8896A4"></path></svg>', r(e, "class", "sy-assistant-avatar assistant svelte-1gouv71");
|
3175
3175
|
},
|
3176
3176
|
m(t, n) {
|
3177
3177
|
q(t, e, n);
|
@@ -3191,7 +3191,7 @@ function ol(s) {
|
|
3191
3191
|
);
|
3192
3192
|
return {
|
3193
3193
|
c() {
|
3194
|
-
e = x("div"), r(e, "class", "markdown-content svelte-
|
3194
|
+
e = x("div"), r(e, "class", "markdown-content svelte-1gouv71");
|
3195
3195
|
},
|
3196
3196
|
m(n, i) {
|
3197
3197
|
q(n, e, i), e.innerHTML = t;
|
@@ -3213,30 +3213,30 @@ function ll(s) {
|
|
3213
3213
|
let e;
|
3214
3214
|
return {
|
3215
3215
|
c() {
|
3216
|
-
e = x("span"), e.innerHTML = '<span class="dot svelte-
|
3216
|
+
e = x("span"), e.innerHTML = '<span class="dot svelte-1gouv71">.</span> <span class="dot svelte-1gouv71">.</span> <span class="dot svelte-1gouv71">.</span>', r(e, "class", "sy-assistant-loading svelte-1gouv71");
|
3217
3217
|
},
|
3218
3218
|
m(t, n) {
|
3219
3219
|
q(t, e, n);
|
3220
3220
|
},
|
3221
|
-
p:
|
3221
|
+
p: Me,
|
3222
3222
|
d(t) {
|
3223
3223
|
t && j(e);
|
3224
3224
|
}
|
3225
3225
|
};
|
3226
3226
|
}
|
3227
|
-
function
|
3228
|
-
let e, t =
|
3227
|
+
function Ls(s) {
|
3228
|
+
let e, t = wt(
|
3229
3229
|
/*msg*/
|
3230
3230
|
s[60].attachments
|
3231
3231
|
), n = [];
|
3232
3232
|
for (let i = 0; i < t.length; i += 1)
|
3233
|
-
n[i] =
|
3233
|
+
n[i] = Ds(Cs(s, t, i));
|
3234
3234
|
return {
|
3235
3235
|
c() {
|
3236
3236
|
e = x("div");
|
3237
3237
|
for (let i = 0; i < n.length; i += 1)
|
3238
3238
|
n[i].c();
|
3239
|
-
r(e, "class", "sy-assistant-attachments svelte-
|
3239
|
+
r(e, "class", "sy-assistant-attachments svelte-1gouv71");
|
3240
3240
|
},
|
3241
3241
|
m(i, o) {
|
3242
3242
|
q(i, e, o);
|
@@ -3246,14 +3246,14 @@ function Cs(s) {
|
|
3246
3246
|
p(i, o) {
|
3247
3247
|
if (o[0] & /*tooltipPosition, zIndex, tooltipTimer, tooltipContent, handleDownload, messages, showTooltip, hideTooltip*/
|
3248
3248
|
3670137) {
|
3249
|
-
t =
|
3249
|
+
t = wt(
|
3250
3250
|
/*msg*/
|
3251
3251
|
i[60].attachments
|
3252
3252
|
);
|
3253
3253
|
let l;
|
3254
3254
|
for (l = 0; l < t.length; l += 1) {
|
3255
|
-
const a =
|
3256
|
-
n[l] ? n[l].p(a, o) : (n[l] =
|
3255
|
+
const a = Cs(i, t, l);
|
3256
|
+
n[l] ? n[l].p(a, o) : (n[l] = Ds(a), n[l].c(), n[l].m(e, null));
|
3257
3257
|
}
|
3258
3258
|
for (; l < n.length; l += 1)
|
3259
3259
|
n[l].d(1);
|
@@ -3261,11 +3261,11 @@ function Cs(s) {
|
|
3261
3261
|
}
|
3262
3262
|
},
|
3263
3263
|
d(i) {
|
3264
|
-
i && j(e),
|
3264
|
+
i && j(e), Ci(n, i);
|
3265
3265
|
}
|
3266
3266
|
};
|
3267
3267
|
}
|
3268
|
-
function
|
3268
|
+
function Ms(s) {
|
3269
3269
|
let e, t, n;
|
3270
3270
|
function i(...o) {
|
3271
3271
|
return (
|
@@ -3279,7 +3279,7 @@ function Ls(s) {
|
|
3279
3279
|
}
|
3280
3280
|
return {
|
3281
3281
|
c() {
|
3282
|
-
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-
|
3282
|
+
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-1gouv71"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>', r(e, "class", "sy-assistant-attachment-toggle svelte-1gouv71"), r(e, "aria-label", "查看详情");
|
3283
3283
|
},
|
3284
3284
|
m(o, l) {
|
3285
3285
|
q(o, e, l), t || (n = [
|
@@ -3300,14 +3300,14 @@ function Ls(s) {
|
|
3300
3300
|
}
|
3301
3301
|
};
|
3302
3302
|
}
|
3303
|
-
function
|
3303
|
+
function Os(s) {
|
3304
3304
|
let e, t = (
|
3305
3305
|
/*tooltipContent*/
|
3306
3306
|
s[4].replace(/\n/g, "<br>") + ""
|
3307
3307
|
), n, i;
|
3308
3308
|
return {
|
3309
3309
|
c() {
|
3310
|
-
e = x("div"), r(e, "class", "sy-assistant-tooltip svelte-
|
3310
|
+
e = x("div"), r(e, "class", "sy-assistant-tooltip svelte-1gouv71"), r(e, "role", "tooltip"), F(
|
3311
3311
|
e,
|
3312
3312
|
"left",
|
3313
3313
|
/*tooltipPosition*/
|
@@ -3379,16 +3379,16 @@ function Ms(s) {
|
|
3379
3379
|
}
|
3380
3380
|
};
|
3381
3381
|
}
|
3382
|
-
function
|
3382
|
+
function Ds(s) {
|
3383
3383
|
let e, t, n, i, o, l, a, c, u, h = Gt(
|
3384
3384
|
/*attachment*/
|
3385
3385
|
s[63].content_title
|
3386
|
-
).name + "", p, d, g,
|
3386
|
+
).name + "", p, d, g, k = Gt(
|
3387
3387
|
/*attachment*/
|
3388
3388
|
s[63].content_title
|
3389
|
-
).ext + "", S,
|
3389
|
+
).ext + "", S, L, O, v, _, w, y, A, T, C, R = (
|
3390
3390
|
/*attachment*/
|
3391
|
-
s[63].tips &&
|
3391
|
+
s[63].tips && Ms(s)
|
3392
3392
|
);
|
3393
3393
|
function P() {
|
3394
3394
|
return (
|
@@ -3401,15 +3401,15 @@ function Os(s) {
|
|
3401
3401
|
}
|
3402
3402
|
let I = (
|
3403
3403
|
/*tooltipContent*/
|
3404
|
-
s[4] &&
|
3404
|
+
s[4] && Os(s)
|
3405
3405
|
);
|
3406
3406
|
return {
|
3407
3407
|
c() {
|
3408
|
-
e = x("div"), t = x("div"), n = x("div"), i = X("svg"), o = X("path"), l = X("polyline"), a = W(), c = x("div"), u = x("span"), p = ve(h), d = W(), g = x("span"), S = ve(
|
3409
|
-
s[63].content_title), r(n, "class", "sy-assistant-attachment-title svelte-
|
3408
|
+
e = x("div"), t = x("div"), n = x("div"), i = X("svg"), o = X("path"), l = X("polyline"), a = W(), c = x("div"), u = x("span"), p = ve(h), d = W(), g = x("span"), S = ve(k), O = W(), v = x("div"), R && R.c(), _ = W(), w = x("button"), w.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-1gouv71"><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>', y = W(), I && I.c(), A = W(), r(o, "d", "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"), r(l, "points", "13 2 13 9 20 9"), r(i, "xmlns", "http://www.w3.org/2000/svg"), r(i, "width", "16"), r(i, "height", "16"), r(i, "viewBox", "0 0 24 24"), r(i, "fill", "none"), r(i, "stroke", "currentColor"), r(i, "stroke-width", "2"), r(i, "stroke-linecap", "round"), r(i, "stroke-linejoin", "round"), r(u, "class", "sy-assistant-filename svelte-1gouv71"), r(g, "class", "sy-assistant-attachment-ext svelte-1gouv71"), r(c, "class", "sy-assistant-attachment-name svelte-1gouv71"), r(c, "title", L = /*attachment*/
|
3409
|
+
s[63].content_title), r(n, "class", "sy-assistant-attachment-title svelte-1gouv71"), r(w, "class", "sy-assistant-attachment-toggle svelte-1gouv71"), r(w, "aria-label", "下载文件"), r(v, "class", "sy-assistant-attachment-actions svelte-1gouv71"), r(t, "class", "sy-assistant-attachment-header svelte-1gouv71"), r(e, "class", "sy-assistant-attachment svelte-1gouv71");
|
3410
3410
|
},
|
3411
3411
|
m(U, Z) {
|
3412
|
-
q(U, e, Z), m(e, t), m(t, n), m(n, i), m(i, o), m(i, l), m(n, a), m(n, c), m(c, u), m(u, p), m(c, d), m(c, g), m(g, S), m(t,
|
3412
|
+
q(U, e, Z), m(e, t), m(t, n), m(n, i), m(i, o), m(i, l), m(n, a), m(n, c), m(c, u), m(u, p), m(c, d), m(c, g), m(g, S), m(t, O), m(t, v), R && R.m(v, null), m(v, _), m(v, w), m(e, y), I && I.m(e, null), m(e, A), T || (C = B(w, "click", P), T = !0);
|
3413
3413
|
},
|
3414
3414
|
p(U, Z) {
|
3415
3415
|
s = U, Z[0] & /*messages*/
|
@@ -3417,21 +3417,21 @@ function Os(s) {
|
|
3417
3417
|
/*attachment*/
|
3418
3418
|
s[63].content_title
|
3419
3419
|
).name + "") && Ne(p, h), Z[0] & /*messages*/
|
3420
|
-
8 &&
|
3420
|
+
8 && k !== (k = Gt(
|
3421
3421
|
/*attachment*/
|
3422
3422
|
s[63].content_title
|
3423
|
-
).ext + "") && Ne(S,
|
3424
|
-
8 &&
|
3425
|
-
s[63].content_title) && r(c, "title",
|
3426
|
-
s[63].tips ? R ? R.p(s, Z) : (R =
|
3427
|
-
s[4] ? I ? I.p(s, Z) : (I =
|
3423
|
+
).ext + "") && Ne(S, k), Z[0] & /*messages*/
|
3424
|
+
8 && L !== (L = /*attachment*/
|
3425
|
+
s[63].content_title) && r(c, "title", L), /*attachment*/
|
3426
|
+
s[63].tips ? R ? R.p(s, Z) : (R = Ms(s), R.c(), R.m(v, _)) : R && (R.d(1), R = null), /*tooltipContent*/
|
3427
|
+
s[4] ? I ? I.p(s, Z) : (I = Os(s), I.c(), I.m(e, A)) : I && (I.d(1), I = null);
|
3428
3428
|
},
|
3429
3429
|
d(U) {
|
3430
|
-
U && j(e), R && R.d(), I && I.d(), T = !1,
|
3430
|
+
U && j(e), R && R.d(), I && I.d(), T = !1, C();
|
3431
3431
|
}
|
3432
3432
|
};
|
3433
3433
|
}
|
3434
|
-
function
|
3434
|
+
function zs(s) {
|
3435
3435
|
let e, t, n, i, o, l, a, c, u, h, p;
|
3436
3436
|
function d(A, T) {
|
3437
3437
|
return (
|
@@ -3442,7 +3442,7 @@ function Ds(s) {
|
|
3442
3442
|
] ? al : rl
|
3443
3443
|
);
|
3444
3444
|
}
|
3445
|
-
let g = d(s),
|
3445
|
+
let g = d(s), k = g(s);
|
3446
3446
|
function S() {
|
3447
3447
|
return (
|
3448
3448
|
/*click_handler_1*/
|
@@ -3452,7 +3452,7 @@ function Ds(s) {
|
|
3452
3452
|
)
|
3453
3453
|
);
|
3454
3454
|
}
|
3455
|
-
function
|
3455
|
+
function L(...A) {
|
3456
3456
|
return (
|
3457
3457
|
/*mouseenter_handler_2*/
|
3458
3458
|
s[39](
|
@@ -3462,7 +3462,7 @@ function Ds(s) {
|
|
3462
3462
|
)
|
3463
3463
|
);
|
3464
3464
|
}
|
3465
|
-
function
|
3465
|
+
function O() {
|
3466
3466
|
return (
|
3467
3467
|
/*click_handler_2*/
|
3468
3468
|
s[40](
|
@@ -3481,7 +3481,7 @@ function Ds(s) {
|
|
3481
3481
|
)
|
3482
3482
|
);
|
3483
3483
|
}
|
3484
|
-
function
|
3484
|
+
function _(...A) {
|
3485
3485
|
return (
|
3486
3486
|
/*click_handler_3*/
|
3487
3487
|
s[42](
|
@@ -3491,7 +3491,7 @@ function Ds(s) {
|
|
3491
3491
|
)
|
3492
3492
|
);
|
3493
3493
|
}
|
3494
|
-
function
|
3494
|
+
function w(...A) {
|
3495
3495
|
return (
|
3496
3496
|
/*mouseenter_handler_4*/
|
3497
3497
|
s[43](
|
@@ -3511,7 +3511,7 @@ function Ds(s) {
|
|
3511
3511
|
);
|
3512
3512
|
return {
|
3513
3513
|
c() {
|
3514
|
-
e = x("div"), t = x("button"),
|
3514
|
+
e = x("div"), t = x("button"), k.c(), i = W(), 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 = W(), a = x("button"), a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-3"></path></svg>', c = W(), y && y.c(), u = Kt(), r(t, "class", "sy-assistant-action-button svelte-1gouv71"), r(t, "aria-label", n = /*copyStatus*/
|
3515
3515
|
s[9][
|
3516
3516
|
/*msg*/
|
3517
3517
|
s[60].id
|
@@ -3523,7 +3523,7 @@ function Ds(s) {
|
|
3523
3523
|
/*msg*/
|
3524
3524
|
s[60].id
|
3525
3525
|
]
|
3526
|
-
), r(o, "class", "sy-assistant-action-button svelte-
|
3526
|
+
), r(o, "class", "sy-assistant-action-button svelte-1gouv71"), r(o, "aria-label", "点赞"), J(
|
3527
3527
|
o,
|
3528
3528
|
"active",
|
3529
3529
|
/*feedbackStatus*/
|
@@ -3531,7 +3531,7 @@ function Ds(s) {
|
|
3531
3531
|
/*msg*/
|
3532
3532
|
s[60].id
|
3533
3533
|
] === "like"
|
3534
|
-
), r(a, "class", "sy-assistant-action-button svelte-
|
3534
|
+
), r(a, "class", "sy-assistant-action-button svelte-1gouv71"), r(a, "aria-label", "点踩"), J(
|
3535
3535
|
a,
|
3536
3536
|
"active",
|
3537
3537
|
/*feedbackStatus*/
|
@@ -3539,19 +3539,19 @@ function Ds(s) {
|
|
3539
3539
|
/*msg*/
|
3540
3540
|
s[60].id
|
3541
3541
|
] === "dislike"
|
3542
|
-
), r(e, "class", "sy-assistant-message-actions svelte-
|
3542
|
+
), r(e, "class", "sy-assistant-message-actions svelte-1gouv71");
|
3543
3543
|
},
|
3544
3544
|
m(A, T) {
|
3545
|
-
q(A, e, T), m(e, t),
|
3545
|
+
q(A, e, T), m(e, t), k.m(t, null), m(e, i), m(e, o), m(e, l), m(e, a), q(A, c, T), y && y.m(A, T), q(A, u, T), h || (p = [
|
3546
3546
|
B(t, "click", S),
|
3547
|
-
B(t, "mouseenter",
|
3547
|
+
B(t, "mouseenter", L),
|
3548
3548
|
B(
|
3549
3549
|
t,
|
3550
3550
|
"mouseleave",
|
3551
3551
|
/*hideButtonTooltip*/
|
3552
3552
|
s[27]
|
3553
3553
|
),
|
3554
|
-
B(o, "click",
|
3554
|
+
B(o, "click", O),
|
3555
3555
|
B(o, "mouseenter", v),
|
3556
3556
|
B(
|
3557
3557
|
o,
|
@@ -3559,8 +3559,8 @@ function Ds(s) {
|
|
3559
3559
|
/*hideButtonTooltip*/
|
3560
3560
|
s[27]
|
3561
3561
|
),
|
3562
|
-
B(a, "click",
|
3563
|
-
B(a, "mouseenter",
|
3562
|
+
B(a, "click", _),
|
3563
|
+
B(a, "mouseenter", w),
|
3564
3564
|
B(
|
3565
3565
|
a,
|
3566
3566
|
"mouseleave",
|
@@ -3570,7 +3570,7 @@ function Ds(s) {
|
|
3570
3570
|
], h = !0);
|
3571
3571
|
},
|
3572
3572
|
p(A, T) {
|
3573
|
-
s = A, g !== (g = d(s)) && (
|
3573
|
+
s = A, g !== (g = d(s)) && (k.d(1), k = g(s), k && (k.c(), k.m(t, null))), T[0] & /*copyStatus, messages*/
|
3574
3574
|
520 && n !== (n = /*copyStatus*/
|
3575
3575
|
s[9][
|
3576
3576
|
/*msg*/
|
@@ -3610,7 +3610,7 @@ function Ds(s) {
|
|
3610
3610
|
] === "dislike" ? y ? y.p(s, T) : (y = Ns(s), y.c(), y.m(u.parentNode, u)) : y && (y.d(1), y = null);
|
3611
3611
|
},
|
3612
3612
|
d(A) {
|
3613
|
-
A && (j(e), j(c), j(u)),
|
3613
|
+
A && (j(e), j(c), j(u)), k.d(), y && y.d(A), h = !1, Ee(p);
|
3614
3614
|
}
|
3615
3615
|
};
|
3616
3616
|
}
|
@@ -3671,7 +3671,7 @@ function Ns(s) {
|
|
3671
3671
|
}
|
3672
3672
|
return {
|
3673
3673
|
c() {
|
3674
|
-
e = x("div"), t = x("textarea"), n = W(), i = x("div"), o = x("button"), o.textContent = "取消", l = W(), a = x("button"), a.textContent = "提交", r(t, "class", "sy-assistant-dislike-input svelte-
|
3674
|
+
e = x("div"), t = x("textarea"), n = W(), i = x("div"), o = x("button"), o.textContent = "取消", l = W(), a = x("button"), a.textContent = "提交", r(t, "class", "sy-assistant-dislike-input svelte-1gouv71"), r(t, "placeholder", "请输入您的反馈意见..."), r(o, "class", "sy-assistant-popup-cancel svelte-1gouv71"), r(a, "class", "sy-assistant-popup-submit svelte-1gouv71"), r(i, "class", "sy-assistant-popup-actions svelte-1gouv71"), r(e, "class", "sy-assistant-dislike-popup svelte-1gouv71"), F(
|
3675
3675
|
e,
|
3676
3676
|
"left",
|
3677
3677
|
/*dislikeFeedbackPosition*/
|
@@ -3688,8 +3688,8 @@ function Ns(s) {
|
|
3688
3688
|
s[0] + 3
|
3689
3689
|
);
|
3690
3690
|
},
|
3691
|
-
m(g,
|
3692
|
-
q(g, e,
|
3691
|
+
m(g, k) {
|
3692
|
+
q(g, e, k), m(e, t), mt(
|
3693
3693
|
t,
|
3694
3694
|
/*dislikeFeedbackContent*/
|
3695
3695
|
s[11][
|
@@ -3702,8 +3702,8 @@ function Ns(s) {
|
|
3702
3702
|
B(a, "click", d)
|
3703
3703
|
], c = !0);
|
3704
3704
|
},
|
3705
|
-
p(g,
|
3706
|
-
s = g,
|
3705
|
+
p(g, k) {
|
3706
|
+
s = g, k[0] & /*dislikeFeedbackContent, messages*/
|
3707
3707
|
2056 && mt(
|
3708
3708
|
t,
|
3709
3709
|
/*dislikeFeedbackContent*/
|
@@ -3711,19 +3711,19 @@ function Ns(s) {
|
|
3711
3711
|
/*msg*/
|
3712
3712
|
s[60].id
|
3713
3713
|
]
|
3714
|
-
),
|
3714
|
+
), k[0] & /*dislikeFeedbackPosition*/
|
3715
3715
|
8192 && F(
|
3716
3716
|
e,
|
3717
3717
|
"left",
|
3718
3718
|
/*dislikeFeedbackPosition*/
|
3719
3719
|
s[13].x + "px"
|
3720
|
-
),
|
3720
|
+
), k[0] & /*dislikeFeedbackPosition*/
|
3721
3721
|
8192 && F(
|
3722
3722
|
e,
|
3723
3723
|
"top",
|
3724
3724
|
/*dislikeFeedbackPosition*/
|
3725
3725
|
s[13].y + "px"
|
3726
|
-
),
|
3726
|
+
), k[0] & /*zIndex*/
|
3727
3727
|
1 && F(
|
3728
3728
|
e,
|
3729
3729
|
"z-index",
|
@@ -3747,8 +3747,8 @@ function Ps(s, e) {
|
|
3747
3747
|
y[60].type === "assistant" ? il : sl
|
3748
3748
|
);
|
3749
3749
|
}
|
3750
|
-
let
|
3751
|
-
function
|
3750
|
+
let k = g(e), S = k(e);
|
3751
|
+
function L(y, A) {
|
3752
3752
|
return (
|
3753
3753
|
/*isLoading*/
|
3754
3754
|
y[7] && /*msg*/
|
@@ -3761,20 +3761,20 @@ function Ps(s, e) {
|
|
3761
3761
|
y[60].content ? ll : ol
|
3762
3762
|
);
|
3763
3763
|
}
|
3764
|
-
let
|
3764
|
+
let O = L(e), v = O(e), _ = (
|
3765
3765
|
/*msg*/
|
3766
|
-
e[60].attachments &&
|
3767
|
-
),
|
3766
|
+
e[60].attachments && Ls(e)
|
3767
|
+
), w = (
|
3768
3768
|
/*msg*/
|
3769
3769
|
e[60].id !== "-1" && /*msg*/
|
3770
3770
|
e[60].type === "assistant" && !/*isLoading*/
|
3771
|
-
e[7] &&
|
3771
|
+
e[7] && zs(e)
|
3772
3772
|
);
|
3773
3773
|
return {
|
3774
3774
|
key: s,
|
3775
3775
|
first: null,
|
3776
3776
|
c() {
|
3777
|
-
t = x("div"), S.c(), n = W(), i = x("div"), o = x("div"), v.c(), l = W(),
|
3777
|
+
t = x("div"), S.c(), n = W(), i = x("div"), o = x("div"), v.c(), l = W(), _ && _.c(), a = W(), w && w.c(), c = W(), u = x("div"), p = ve(h), d = W(), r(o, "class", "sy-assistant-message-content svelte-1gouv71"), r(u, "class", "sy-assistant-message-time svelte-1gouv71"), r(i, "class", "sy-assistant-message-bubble svelte-1gouv71"), r(t, "class", "sy-assistant-message svelte-1gouv71"), J(
|
3778
3778
|
t,
|
3779
3779
|
"user",
|
3780
3780
|
/*msg*/
|
@@ -3782,14 +3782,14 @@ function Ps(s, e) {
|
|
3782
3782
|
), this.first = t;
|
3783
3783
|
},
|
3784
3784
|
m(y, A) {
|
3785
|
-
q(y, t, A), S.m(t, null), m(t, n), m(t, i), m(i, o), v.m(o, null), m(o, l),
|
3785
|
+
q(y, t, A), S.m(t, null), m(t, n), m(t, i), m(i, o), v.m(o, null), m(o, l), _ && _.m(o, null), m(o, a), w && w.m(o, null), m(i, c), m(i, u), m(u, p), m(t, d);
|
3786
3786
|
},
|
3787
3787
|
p(y, A) {
|
3788
|
-
e = y,
|
3789
|
-
e[60].attachments ?
|
3788
|
+
e = y, k !== (k = g(e)) && (S.d(1), S = k(e), S && (S.c(), S.m(t, n))), O === (O = L(e)) && v ? v.p(e, A) : (v.d(1), v = O(e), v && (v.c(), v.m(o, l))), /*msg*/
|
3789
|
+
e[60].attachments ? _ ? _.p(e, A) : (_ = Ls(e), _.c(), _.m(o, a)) : _ && (_.d(1), _ = null), /*msg*/
|
3790
3790
|
e[60].id !== "-1" && /*msg*/
|
3791
3791
|
e[60].type === "assistant" && !/*isLoading*/
|
3792
|
-
e[7] ?
|
3792
|
+
e[7] ? w ? w.p(e, A) : (w = zs(e), w.c(), w.m(o, null)) : w && (w.d(1), w = null), A[0] & /*messages*/
|
3793
3793
|
8 && h !== (h = new Date(
|
3794
3794
|
/*msg*/
|
3795
3795
|
e[60].timestamp
|
@@ -3802,32 +3802,32 @@ function Ps(s, e) {
|
|
3802
3802
|
);
|
3803
3803
|
},
|
3804
3804
|
d(y) {
|
3805
|
-
y && j(t), S.d(), v.d(),
|
3805
|
+
y && j(t), S.d(), v.d(), _ && _.d(), w && w.d();
|
3806
3806
|
}
|
3807
3807
|
};
|
3808
3808
|
}
|
3809
3809
|
function Fs(s) {
|
3810
|
-
let e, t, n, i, o, l, a, c, u, h, p, d, g,
|
3810
|
+
let e, t, n, i, o, l, a, c, u, h, p, d, g, k, S, L, O, v, _, w, y, A, T, C;
|
3811
3811
|
return {
|
3812
3812
|
c() {
|
3813
|
-
e = x("div"), t = x("div"), n = x("button"), n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', i = W(), o = x("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', l = W(), a = x("div"), c = x("div"), u = x("div"), h = x("div"), p = x("textarea"), d = W(), g = x("div"),
|
3813
|
+
e = x("div"), t = x("div"), n = x("button"), n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 3"></path><circle cx="12" cy="12" r="10"></circle></svg>', i = W(), o = x("button"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>', l = W(), a = x("div"), c = x("div"), u = x("div"), h = x("div"), p = x("textarea"), d = W(), g = x("div"), k = ve(
|
3814
3814
|
/*messageLength*/
|
3815
3815
|
s[2]
|
3816
|
-
), S = ve("/"),
|
3816
|
+
), S = ve("/"), L = ve(Sn), O = W(), v = x("button"), _ = X("svg"), w = X("line"), y = X("polygon"), r(n, "class", "sy-assistant-icon-button svelte-1gouv71"), r(n, "aria-label", "历史会话"), r(o, "class", "sy-assistant-icon-button svelte-1gouv71"), r(o, "aria-label", "新建会话"), r(t, "class", "sy-assistant-chat-actions svelte-1gouv71"), r(e, "class", "sy-assistant-chat-footer svelte-1gouv71"), r(p, "class", "sy-assistant-textarea svelte-1gouv71"), r(p, "placeholder", "输入您的问题..."), r(p, "maxlength", Sn), r(p, "rows", "3"), r(g, "class", "sy-assistant-char-count svelte-1gouv71"), J(
|
3817
3817
|
g,
|
3818
3818
|
"over-limit",
|
3819
3819
|
/*isOverLimit*/
|
3820
3820
|
s[16]
|
3821
|
-
), r(h, "class", "sy-assistant-textarea-container svelte-
|
3821
|
+
), r(h, "class", "sy-assistant-textarea-container svelte-1gouv71"), r(u, "class", "sy-assistant-input-wrapper svelte-1gouv71"), r(w, "x1", "22"), r(w, "y1", "2"), r(w, "x2", "11"), r(w, "y2", "13"), r(y, "points", "22 2 15 22 11 13 2 9 22 2"), r(_, "xmlns", "http://www.w3.org/2000/svg"), r(_, "width", "20"), r(_, "height", "20"), r(_, "viewBox", "0 0 24 24"), r(_, "fill", "none"), r(_, "stroke", "currentColor"), r(_, "stroke-width", "2"), r(_, "stroke-linecap", "round"), r(_, "stroke-linejoin", "round"), r(v, "class", "sy-assistant-send-button svelte-1gouv71"), v.disabled = A = !/*message*/
|
3822
3822
|
s[1].trim() || /*isOverLimit*/
|
3823
|
-
s[16], r(v, "aria-label", "发送消息"), r(c, "class", "sy-assistant-input-container svelte-
|
3823
|
+
s[16], r(v, "aria-label", "发送消息"), r(c, "class", "sy-assistant-input-container svelte-1gouv71"), r(a, "class", "sy-assistant-input-area svelte-1gouv71");
|
3824
3824
|
},
|
3825
3825
|
m(R, P) {
|
3826
3826
|
q(R, e, P), m(e, t), m(t, n), m(t, i), m(t, o), q(R, l, P), q(R, a, P), m(a, c), m(c, u), m(u, h), m(h, p), mt(
|
3827
3827
|
p,
|
3828
3828
|
/*message*/
|
3829
3829
|
s[1]
|
3830
|
-
), m(h, d), m(h, g), m(g,
|
3830
|
+
), m(h, d), m(h, g), m(g, k), m(g, S), m(g, L), m(c, O), m(c, v), m(v, _), m(_, w), m(_, y), T || (C = [
|
3831
3831
|
B(
|
3832
3832
|
n,
|
3833
3833
|
"click",
|
@@ -3910,7 +3910,7 @@ function Fs(s) {
|
|
3910
3910
|
R[1]
|
3911
3911
|
), P[0] & /*messageLength*/
|
3912
3912
|
4 && Ne(
|
3913
|
-
|
3913
|
+
k,
|
3914
3914
|
/*messageLength*/
|
3915
3915
|
R[2]
|
3916
3916
|
), P[0] & /*isOverLimit*/
|
@@ -3925,7 +3925,7 @@ function Fs(s) {
|
|
3925
3925
|
R[16]) && (v.disabled = A);
|
3926
3926
|
},
|
3927
3927
|
d(R) {
|
3928
|
-
R && (j(e), j(l), j(a)), T = !1, Ee(
|
3928
|
+
R && (j(e), j(l), j(a)), T = !1, Ee(C);
|
3929
3929
|
}
|
3930
3930
|
};
|
3931
3931
|
}
|
@@ -3936,7 +3936,7 @@ function Hs(s) {
|
|
3936
3936
|
), n;
|
3937
3937
|
return {
|
3938
3938
|
c() {
|
3939
|
-
e = x("div"), n = ve(t), r(e, "class", "sy-assistant-button-tooltip svelte-
|
3939
|
+
e = x("div"), n = ve(t), r(e, "class", "sy-assistant-button-tooltip svelte-1gouv71"), F(
|
3940
3940
|
e,
|
3941
3941
|
"left",
|
3942
3942
|
/*buttonTooltip*/
|
@@ -3976,7 +3976,7 @@ function Hs(s) {
|
|
3976
3976
|
function cl(s) {
|
3977
3977
|
let e, t, n, i, o, l, a;
|
3978
3978
|
const c = [nl, tl], u = [];
|
3979
|
-
function h(g,
|
3979
|
+
function h(g, k) {
|
3980
3980
|
return (
|
3981
3981
|
/*showHistory*/
|
3982
3982
|
g[15] ? 0 : 1
|
@@ -3990,29 +3990,29 @@ function cl(s) {
|
|
3990
3990
|
);
|
3991
3991
|
return {
|
3992
3992
|
c() {
|
3993
|
-
e = x("div"), n.c(), i = W(), p && p.c(), o = W(), d && d.c(), l = Kt(), r(e, "class", "sy-assistant-chat-container svelte-
|
3993
|
+
e = x("div"), n.c(), i = W(), p && p.c(), o = W(), d && d.c(), l = Kt(), r(e, "class", "sy-assistant-chat-container svelte-1gouv71"), F(
|
3994
3994
|
e,
|
3995
3995
|
"z-index",
|
3996
3996
|
/*zIndex*/
|
3997
3997
|
s[0] + 2
|
3998
3998
|
);
|
3999
3999
|
},
|
4000
|
-
m(g,
|
4001
|
-
q(g, e,
|
4000
|
+
m(g, k) {
|
4001
|
+
q(g, e, k), u[t].m(e, null), m(e, i), p && p.m(e, null), s[53](e), q(g, o, k), d && d.m(g, k), q(g, l, k), a = !0;
|
4002
4002
|
},
|
4003
|
-
p(g,
|
4003
|
+
p(g, k) {
|
4004
4004
|
let S = t;
|
4005
|
-
t = h(g), t === S ? u[t].p(g,
|
4005
|
+
t = h(g), t === S ? u[t].p(g, k) : (Rn(), Ke(u[S], 1, 1, () => {
|
4006
4006
|
u[S] = null;
|
4007
|
-
}), In(), n = u[t], n ? n.p(g,
|
4008
|
-
g[15] ? p && (p.d(1), p = null) : p ? p.p(g,
|
4007
|
+
}), In(), n = u[t], n ? n.p(g, k) : (n = u[t] = c[t](g), n.c()), Pe(n, 1), n.m(e, i)), /*showHistory*/
|
4008
|
+
g[15] ? p && (p.d(1), p = null) : p ? p.p(g, k) : (p = Fs(g), p.c(), p.m(e, null)), (!a || k[0] & /*zIndex*/
|
4009
4009
|
1) && F(
|
4010
4010
|
e,
|
4011
4011
|
"z-index",
|
4012
4012
|
/*zIndex*/
|
4013
4013
|
g[0] + 2
|
4014
4014
|
), /*buttonTooltip*/
|
4015
|
-
g[14] ? d ? d.p(g,
|
4015
|
+
g[14] ? d ? d.p(g, k) : (d = Hs(g), d.c(), d.m(l.parentNode, l)) : d && (d.d(1), d = null);
|
4016
4016
|
},
|
4017
4017
|
i(g) {
|
4018
4018
|
a || (Pe(n), a = !0);
|
@@ -4066,49 +4066,49 @@ function fl(s, e, t) {
|
|
4066
4066
|
gfm: !0
|
4067
4067
|
// 支持 GitHub 风格 Markdown
|
4068
4068
|
});
|
4069
|
-
function g(
|
4069
|
+
function g(b) {
|
4070
4070
|
try {
|
4071
|
-
const H = K(
|
4071
|
+
const H = K(b);
|
4072
4072
|
return ys.sanitize(H);
|
4073
4073
|
} catch (H) {
|
4074
4074
|
console.warn("Markdown parsing failed, fallback to HTML:", H);
|
4075
4075
|
try {
|
4076
|
-
const V =
|
4076
|
+
const V = b.replace(/\n/g, "<br>").replace(
|
4077
4077
|
/\*\*(.*?)\*\*/g,
|
4078
4078
|
"<strong>$1</strong>"
|
4079
4079
|
// 处理加粗
|
4080
4080
|
).replace(/\*(.*?)\*/g, "<em>$1</em>");
|
4081
4081
|
return ys.sanitize(V);
|
4082
4082
|
} catch (V) {
|
4083
|
-
return console.error("HTML fallback failed:", V),
|
4083
|
+
return console.error("HTML fallback failed:", V), b;
|
4084
4084
|
}
|
4085
4085
|
}
|
4086
4086
|
}
|
4087
|
-
let
|
4088
|
-
function S(
|
4089
|
-
|
4090
|
-
top:
|
4091
|
-
behavior:
|
4087
|
+
let k;
|
4088
|
+
function S(b = !1) {
|
4089
|
+
k && k.scrollTo({
|
4090
|
+
top: k.scrollHeight,
|
4091
|
+
behavior: b ? "smooth" : "auto"
|
4092
4092
|
});
|
4093
4093
|
}
|
4094
|
-
|
4094
|
+
Mi(() => {
|
4095
4095
|
S(!1);
|
4096
4096
|
});
|
4097
|
-
let { sessionId:
|
4098
|
-
function
|
4097
|
+
let { sessionId: L } = e;
|
4098
|
+
function O() {
|
4099
4099
|
return xe(this, null, function* () {
|
4100
4100
|
if (!o.trim() || i) return;
|
4101
|
-
if (!
|
4101
|
+
if (!L) {
|
4102
4102
|
console.error("No session ID available");
|
4103
4103
|
return;
|
4104
4104
|
}
|
4105
|
-
const
|
4105
|
+
const b = {
|
4106
4106
|
id: Date.now().toString(),
|
4107
4107
|
type: "user",
|
4108
4108
|
content: o.trim(),
|
4109
4109
|
timestamp: Date.now()
|
4110
4110
|
};
|
4111
|
-
t(3, l = [...l,
|
4111
|
+
t(3, l = [...l, b]);
|
4112
4112
|
const H = o.trim();
|
4113
4113
|
t(1, o = "");
|
4114
4114
|
const V = (Date.now() + 1).toString();
|
@@ -4130,7 +4130,7 @@ function fl(s, e, t) {
|
|
4130
4130
|
Authorization: `bearer ${me()}`
|
4131
4131
|
},
|
4132
4132
|
body: JSON.stringify({
|
4133
|
-
sessionId:
|
4133
|
+
sessionId: L,
|
4134
4134
|
requestId: Date.now().toString(),
|
4135
4135
|
keyword: H,
|
4136
4136
|
flowId: "1"
|
@@ -4140,8 +4140,8 @@ function fl(s, e, t) {
|
|
4140
4140
|
try {
|
4141
4141
|
const ue = ce.data;
|
4142
4142
|
if (ue) {
|
4143
|
-
const
|
4144
|
-
|
4143
|
+
const ze = Bs(ue);
|
4144
|
+
ze ? (t(3, l = l.map((pe) => pe.id === V ? we(ee({}, pe), { attachments: ze }) : pe)), S(!0)) : (a += ue, t(3, l = l.map((pe) => pe.id === V ? we(ee({}, pe), { content: a }) : pe)), S(!1));
|
4145
4145
|
}
|
4146
4146
|
} catch (ue) {
|
4147
4147
|
console.error("Failed to process SSE message:", ue);
|
@@ -4159,15 +4159,15 @@ function fl(s, e, t) {
|
|
4159
4159
|
}
|
4160
4160
|
});
|
4161
4161
|
}
|
4162
|
-
function v(
|
4163
|
-
const ce = V.getBoundingClientRect(), ue =
|
4162
|
+
function v(b, H, V) {
|
4163
|
+
const ce = V.getBoundingClientRect(), ue = k.getBoundingClientRect(), ze = ce.left < ue.width / 2;
|
4164
4164
|
t(4, u = H), t(5, h = {
|
4165
4165
|
x: ce.left,
|
4166
4166
|
y: ce.top + ce.height / 2,
|
4167
|
-
alignRight:
|
4167
|
+
alignRight: ze
|
4168
4168
|
});
|
4169
4169
|
}
|
4170
|
-
function
|
4170
|
+
function _() {
|
4171
4171
|
t(6, p = setTimeout(
|
4172
4172
|
() => {
|
4173
4173
|
t(4, u = null), t(6, p = null);
|
@@ -4175,10 +4175,10 @@ function fl(s, e, t) {
|
|
4175
4175
|
200
|
4176
4176
|
));
|
4177
4177
|
}
|
4178
|
-
|
4178
|
+
Oi(() => {
|
4179
4179
|
c && c.abort(), p && clearTimeout(p);
|
4180
4180
|
});
|
4181
|
-
function
|
4181
|
+
function w(b, H) {
|
4182
4182
|
return xe(this, null, function* () {
|
4183
4183
|
try {
|
4184
4184
|
const V = yield fetch("/aiops/aigc/file/downloadFile", {
|
@@ -4188,19 +4188,19 @@ function fl(s, e, t) {
|
|
4188
4188
|
"Auth-Token": `${me()}`,
|
4189
4189
|
Authorization: `bearer ${me()}`
|
4190
4190
|
},
|
4191
|
-
body: JSON.stringify({ fileName:
|
4191
|
+
body: JSON.stringify({ fileName: b, fileUrl: H })
|
4192
4192
|
});
|
4193
4193
|
if (!V.ok)
|
4194
4194
|
throw new Error("Download failed");
|
4195
|
-
const ce = V.headers.get("content-type") || "application/octet-stream", ue = yield V.blob(),
|
4196
|
-
pe.href =
|
4195
|
+
const ce = V.headers.get("content-type") || "application/octet-stream", ue = yield V.blob(), ze = window.URL.createObjectURL(ue), pe = document.createElement("a");
|
4196
|
+
pe.href = ze, pe.download = b, document.body.appendChild(pe), pe.click(), window.URL.revokeObjectURL(ze), document.body.removeChild(pe);
|
4197
4197
|
} catch (V) {
|
4198
4198
|
console.error("Failed to download file:", V);
|
4199
4199
|
}
|
4200
4200
|
});
|
4201
4201
|
}
|
4202
4202
|
let y = {};
|
4203
|
-
function A(
|
4203
|
+
function A(b, H) {
|
4204
4204
|
return xe(this, null, function* () {
|
4205
4205
|
try {
|
4206
4206
|
const V = H.replace(/<br\s*\/?>/g, `
|
@@ -4209,9 +4209,9 @@ function fl(s, e, t) {
|
|
4209
4209
|
"$1"
|
4210
4210
|
// 移除加粗标记
|
4211
4211
|
).replace(/###/g, "").trim();
|
4212
|
-
yield navigator.clipboard.writeText(V), t(9, y[
|
4212
|
+
yield navigator.clipboard.writeText(V), t(9, y[b] = !0, y), setTimeout(
|
4213
4213
|
() => {
|
4214
|
-
t(9, y[
|
4214
|
+
t(9, y[b] = !1, y), t(9, y);
|
4215
4215
|
},
|
4216
4216
|
1500
|
4217
4217
|
);
|
@@ -4220,14 +4220,14 @@ function fl(s, e, t) {
|
|
4220
4220
|
}
|
4221
4221
|
});
|
4222
4222
|
}
|
4223
|
-
let T = {},
|
4224
|
-
function P(
|
4223
|
+
let T = {}, C = {}, R = !1;
|
4224
|
+
function P(b, H) {
|
4225
4225
|
return xe(this, null, function* () {
|
4226
|
-
if (T[
|
4227
|
-
t(10, T[
|
4226
|
+
if (T[b] === H) {
|
4227
|
+
t(10, T[b] = null, T), t(10, T);
|
4228
4228
|
return;
|
4229
4229
|
}
|
4230
|
-
if (t(10, T[
|
4230
|
+
if (t(10, T[b] = H, T), t(10, T), H === "like")
|
4231
4231
|
try {
|
4232
4232
|
if (!(yield fetch("/aiops/aigc/chat/record/feedback", {
|
4233
4233
|
method: "POST",
|
@@ -4237,24 +4237,24 @@ function fl(s, e, t) {
|
|
4237
4237
|
Authorization: `bearer ${me()}`
|
4238
4238
|
},
|
4239
4239
|
body: JSON.stringify({
|
4240
|
-
sessionId:
|
4241
|
-
requestId:
|
4240
|
+
sessionId: L,
|
4241
|
+
requestId: b,
|
4242
4242
|
feedBackFlag: "1",
|
4243
4243
|
feedBackContent: "点赞"
|
4244
4244
|
})
|
4245
4245
|
})).ok)
|
4246
4246
|
throw new Error("Feedback failed");
|
4247
4247
|
} catch (V) {
|
4248
|
-
console.error("Failed to send feedback:", V), t(10, T[
|
4248
|
+
console.error("Failed to send feedback:", V), t(10, T[b] = null, T), t(10, T);
|
4249
4249
|
}
|
4250
4250
|
else
|
4251
4251
|
t(12, R = !0);
|
4252
4252
|
});
|
4253
4253
|
}
|
4254
|
-
function I(
|
4254
|
+
function I(b) {
|
4255
4255
|
return xe(this, null, function* () {
|
4256
4256
|
var H;
|
4257
|
-
if ((H =
|
4257
|
+
if ((H = C[b]) != null && H.trim())
|
4258
4258
|
try {
|
4259
4259
|
if (!(yield fetch("/aiops/aigc/chat/record/feedback", {
|
4260
4260
|
method: "POST",
|
@@ -4264,22 +4264,22 @@ function fl(s, e, t) {
|
|
4264
4264
|
Authorization: `bearer ${me()}`
|
4265
4265
|
},
|
4266
4266
|
body: JSON.stringify({
|
4267
|
-
sessionId:
|
4268
|
-
requestId:
|
4267
|
+
sessionId: L,
|
4268
|
+
requestId: b,
|
4269
4269
|
feedBackFlag: "0",
|
4270
|
-
feedBackContent:
|
4270
|
+
feedBackContent: C[b]
|
4271
4271
|
})
|
4272
4272
|
})).ok)
|
4273
4273
|
throw new Error("Feedback failed");
|
4274
|
-
t(12, R = !1), t(11,
|
4274
|
+
t(12, R = !1), t(11, C[b] = "", C), t(11, C);
|
4275
4275
|
} catch (V) {
|
4276
|
-
console.error("Failed to send feedback:", V), t(10, T[
|
4276
|
+
console.error("Failed to send feedback:", V), t(10, T[b] = null, T), t(10, T);
|
4277
4277
|
}
|
4278
4278
|
});
|
4279
4279
|
}
|
4280
4280
|
let U = { x: 0, y: 0 };
|
4281
|
-
function Z(
|
4282
|
-
const ce =
|
4281
|
+
function Z(b, H) {
|
4282
|
+
const ce = b.currentTarget.getBoundingClientRect();
|
4283
4283
|
t(13, U = {
|
4284
4284
|
x: ce.left - 290,
|
4285
4285
|
// 弹框宽度 + 间距
|
@@ -4288,8 +4288,8 @@ function fl(s, e, t) {
|
|
4288
4288
|
}), P(H, "dislike");
|
4289
4289
|
}
|
4290
4290
|
let Q = null;
|
4291
|
-
function oe(
|
4292
|
-
const ce =
|
4291
|
+
function oe(b, H) {
|
4292
|
+
const ce = b.currentTarget.getBoundingClientRect();
|
4293
4293
|
t(14, Q = {
|
4294
4294
|
text: H,
|
4295
4295
|
x: ce.left + ce.width / 2,
|
@@ -4306,7 +4306,7 @@ function fl(s, e, t) {
|
|
4306
4306
|
function le() {
|
4307
4307
|
he(), t(15, fe = !1);
|
4308
4308
|
}
|
4309
|
-
function Xe(
|
4309
|
+
function Xe(b) {
|
4310
4310
|
return xe(this, null, function* () {
|
4311
4311
|
if (!d) {
|
4312
4312
|
t(7, d = !0);
|
@@ -4318,15 +4318,15 @@ function fl(s, e, t) {
|
|
4318
4318
|
"Auth-Token": `${me()}`,
|
4319
4319
|
Authorization: `bearer ${me()}`
|
4320
4320
|
},
|
4321
|
-
body: JSON.stringify({ sessionId:
|
4321
|
+
body: JSON.stringify({ sessionId: b })
|
4322
4322
|
});
|
4323
4323
|
if (!H.ok)
|
4324
4324
|
throw new Error("Failed to load sessions");
|
4325
4325
|
const V = yield H.json();
|
4326
4326
|
if (V.code === 0) {
|
4327
|
-
re =
|
4327
|
+
re = b, t(15, fe = !1);
|
4328
4328
|
const ce = V.data.map((ue) => {
|
4329
|
-
const
|
4329
|
+
const ze = Bs(ue.answer), pe = ul(ue.answer);
|
4330
4330
|
return [
|
4331
4331
|
{
|
4332
4332
|
sessionId: ue.sessionId,
|
@@ -4340,7 +4340,7 @@ function fl(s, e, t) {
|
|
4340
4340
|
requestId: ue.requestId,
|
4341
4341
|
type: "assistant",
|
4342
4342
|
content: pe,
|
4343
|
-
attachments:
|
4343
|
+
attachments: ze,
|
4344
4344
|
timestamp: new Date(ue.createDate).getTime()
|
4345
4345
|
}
|
4346
4346
|
];
|
@@ -4357,12 +4357,12 @@ function fl(s, e, t) {
|
|
4357
4357
|
}
|
4358
4358
|
function ie() {
|
4359
4359
|
return xe(this, null, function* () {
|
4360
|
-
const
|
4361
|
-
if (!
|
4360
|
+
const b = yield Se();
|
4361
|
+
if (!b) {
|
4362
4362
|
console.error("Failed to create new session");
|
4363
4363
|
return;
|
4364
4364
|
}
|
4365
|
-
re =
|
4365
|
+
re = b, t(3, l = [
|
4366
4366
|
{
|
4367
4367
|
id: "-1",
|
4368
4368
|
type: "assistant",
|
@@ -4375,7 +4375,7 @@ function fl(s, e, t) {
|
|
4375
4375
|
function Se() {
|
4376
4376
|
return xe(this, null, function* () {
|
4377
4377
|
try {
|
4378
|
-
const
|
4378
|
+
const b = yield fetch("/aiops/aigc/chat/getSessionId", {
|
4379
4379
|
method: "POST",
|
4380
4380
|
headers: {
|
4381
4381
|
"Content-Type": "application/json",
|
@@ -4383,46 +4383,46 @@ function fl(s, e, t) {
|
|
4383
4383
|
Authorization: `bearer ${me()}`
|
4384
4384
|
}
|
4385
4385
|
});
|
4386
|
-
if (!
|
4386
|
+
if (!b.ok)
|
4387
4387
|
throw new Error("Failed to get session ID");
|
4388
|
-
const H = yield
|
4388
|
+
const H = yield b.json();
|
4389
4389
|
if (H.code === 0)
|
4390
4390
|
return re = H.data.sessionId, re;
|
4391
4391
|
throw new Error(H.message || "Failed to get session ID");
|
4392
|
-
} catch (
|
4393
|
-
return console.error("Failed to get session ID:",
|
4392
|
+
} catch (b) {
|
4393
|
+
return console.error("Failed to get session ID:", b), null;
|
4394
4394
|
}
|
4395
4395
|
});
|
4396
4396
|
}
|
4397
4397
|
let { zIndex: $ } = e;
|
4398
|
-
const
|
4398
|
+
const Ce = (b, H) => v(H, b.tips, H.currentTarget), _e = (b) => w(b.content_title, b.link), Ve = () => {
|
4399
4399
|
p && (clearTimeout(p), t(6, p = null));
|
4400
|
-
},
|
4400
|
+
}, D = () => {
|
4401
4401
|
t(4, u = null);
|
4402
|
-
}, ne = (
|
4403
|
-
function We(
|
4404
|
-
|
4405
|
-
}
|
4406
|
-
const $e = (
|
4407
|
-
t(12, R = !1), t(10, T[
|
4408
|
-
}, rt = (
|
4409
|
-
function at(
|
4410
|
-
|
4411
|
-
|
4402
|
+
}, ne = (b) => A(b.id, b.content), N = (b, H) => oe(H, y[b.id] ? "已复制" : "复制内容"), G = (b) => P(b.id, "like"), be = (b, H) => oe(H, T[b.id] === "like" ? "取消点赞" : "点赞"), ye = (b, H) => Z(H, b.id), Be = (b, H) => oe(H, T[b.id] === "dislike" ? "取消点踩" : "点踩");
|
4403
|
+
function We(b) {
|
4404
|
+
C[b.id] = this.value, t(11, C);
|
4405
|
+
}
|
4406
|
+
const $e = (b) => {
|
4407
|
+
t(12, R = !1), t(10, T[b.id] = null, T), t(10, T);
|
4408
|
+
}, rt = (b) => I(b.id);
|
4409
|
+
function at(b) {
|
4410
|
+
kt[b ? "unshift" : "push"](() => {
|
4411
|
+
k = b, t(8, k);
|
4412
4412
|
});
|
4413
4413
|
}
|
4414
|
-
const
|
4414
|
+
const Dt = (b) => oe(b, "历史会话"), zt = (b) => oe(b, "新建会话");
|
4415
4415
|
function nn() {
|
4416
4416
|
o = this.value, t(1, o);
|
4417
4417
|
}
|
4418
|
-
const
|
4419
|
-
function et(
|
4420
|
-
|
4421
|
-
|
4418
|
+
const _t = (b) => b.key === "Enter" && !b.shiftKey && (O(), b.preventDefault()), tt = (b) => oe(b, "发送消息");
|
4419
|
+
function et(b) {
|
4420
|
+
kt[b ? "unshift" : "push"](() => {
|
4421
|
+
k = b, t(8, k);
|
4422
4422
|
});
|
4423
4423
|
}
|
4424
|
-
return s.$$set = (
|
4425
|
-
"sessionId" in
|
4424
|
+
return s.$$set = (b) => {
|
4425
|
+
"sessionId" in b && t(33, L = b.sessionId), "zIndex" in b && t(0, $ = b.zIndex);
|
4426
4426
|
}, s.$$.update = () => {
|
4427
4427
|
s.$$.dirty[0] & /*message*/
|
4428
4428
|
2 && t(2, n = o.length), s.$$.dirty[0] & /*messageLength*/
|
@@ -4436,20 +4436,20 @@ function fl(s, e, t) {
|
|
4436
4436
|
h,
|
4437
4437
|
p,
|
4438
4438
|
d,
|
4439
|
-
|
4439
|
+
k,
|
4440
4440
|
y,
|
4441
4441
|
T,
|
4442
|
-
|
4442
|
+
C,
|
4443
4443
|
R,
|
4444
4444
|
U,
|
4445
4445
|
Q,
|
4446
4446
|
fe,
|
4447
4447
|
i,
|
4448
4448
|
g,
|
4449
|
-
|
4449
|
+
O,
|
4450
4450
|
v,
|
4451
|
-
|
4452
|
-
|
4451
|
+
_,
|
4452
|
+
w,
|
4453
4453
|
A,
|
4454
4454
|
P,
|
4455
4455
|
I,
|
@@ -4461,42 +4461,42 @@ function fl(s, e, t) {
|
|
4461
4461
|
le,
|
4462
4462
|
Xe,
|
4463
4463
|
ie,
|
4464
|
-
|
4465
|
-
|
4466
|
-
|
4464
|
+
L,
|
4465
|
+
Ce,
|
4466
|
+
_e,
|
4467
4467
|
Ve,
|
4468
|
-
|
4468
|
+
D,
|
4469
4469
|
ne,
|
4470
4470
|
N,
|
4471
4471
|
G,
|
4472
|
-
|
4472
|
+
be,
|
4473
4473
|
ye,
|
4474
4474
|
Be,
|
4475
4475
|
We,
|
4476
4476
|
$e,
|
4477
4477
|
rt,
|
4478
4478
|
at,
|
4479
|
-
Ot,
|
4480
4479
|
Dt,
|
4480
|
+
zt,
|
4481
4481
|
nn,
|
4482
|
-
|
4482
|
+
_t,
|
4483
4483
|
tt,
|
4484
4484
|
et
|
4485
4485
|
];
|
4486
4486
|
}
|
4487
|
-
class hl extends
|
4487
|
+
class hl extends Mn {
|
4488
4488
|
constructor(e) {
|
4489
|
-
super(),
|
4489
|
+
super(), Ln(this, e, fl, cl, Jt, { sessionId: 33, zIndex: 0 }, null, [-1, -1, -1]);
|
4490
4490
|
}
|
4491
4491
|
}
|
4492
4492
|
function Us(s) {
|
4493
4493
|
let e, t, n, i, o = (
|
4494
4494
|
/*mergedOptions*/
|
4495
4495
|
s[3].title + ""
|
4496
|
-
), l, a, c, u, h, p, d, g,
|
4496
|
+
), l, a, c, u, h, p, d, g, k, S = (
|
4497
4497
|
/*isFullscreen*/
|
4498
4498
|
s[2] ? "退出全屏" : "全屏显示"
|
4499
|
-
),
|
4499
|
+
), L, O, v, _, w, y, A, T, C = (
|
4500
4500
|
/*isSnapped*/
|
4501
4501
|
s[7] ? "取消吸附" : "吸附到边缘"
|
4502
4502
|
), R, P, I, U, Z, Q, oe, he, fe, He = `${/*mergedOptions*/
|
@@ -4514,29 +4514,29 @@ function Us(s) {
|
|
4514
4514
|
N[7] ? ml : gl
|
4515
4515
|
);
|
4516
4516
|
}
|
4517
|
-
let
|
4518
|
-
const Ve = [
|
4517
|
+
let Ce = $(s), _e = Ce(s);
|
4518
|
+
const Ve = [wl, kl], D = [];
|
4519
4519
|
function ne(N, G) {
|
4520
4520
|
return (
|
4521
4521
|
/*showHistory*/
|
4522
4522
|
N[8] ? 0 : 1
|
4523
4523
|
);
|
4524
4524
|
}
|
4525
|
-
return he = ne(s), fe =
|
4525
|
+
return he = ne(s), fe = D[he] = Ve[he](s), {
|
4526
4526
|
c() {
|
4527
|
-
e = x("div"), t = x("div"), n = x("div"), i = x("h3"), l = ve(o), a = W(), c = x("div"), u = x("div"), h = x("button"), p = X("svg"), Se.c(), g = W(),
|
4527
|
+
e = x("div"), t = x("div"), n = x("div"), i = x("h3"), l = ve(o), a = W(), c = x("div"), u = x("div"), h = x("button"), p = X("svg"), Se.c(), g = W(), k = x("span"), L = ve(S), O = W(), v = x("div"), _ = x("button"), w = X("svg"), _e.c(), A = W(), T = x("span"), R = ve(C), P = W(), I = x("div"), U = x("button"), U.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>', Z = W(), Q = x("span"), Q.textContent = "关闭助手", oe = W(), fe.c(), r(i, "class", "svelte-1427avp"), r(p, "xmlns", "http://www.w3.org/2000/svg"), r(p, "width", "18"), r(p, "height", "18"), r(p, "viewBox", "0 0 24 24"), r(p, "fill", "none"), r(p, "stroke", "currentColor"), r(p, "stroke-width", "2"), r(p, "stroke-linecap", "round"), r(p, "stroke-linejoin", "round"), r(h, "class", "sy-assistant-action-button svelte-1427avp"), r(h, "aria-label", d = /*isFullscreen*/
|
4528
4528
|
s[2] ? "退出全屏" : "全屏显示"), J(
|
4529
4529
|
h,
|
4530
4530
|
"active",
|
4531
4531
|
/*isFullscreen*/
|
4532
4532
|
s[2]
|
4533
|
-
), r(
|
4533
|
+
), r(k, "class", "sy-assistant-tooltip svelte-1427avp"), r(u, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(w, "xmlns", "http://www.w3.org/2000/svg"), r(w, "width", "18"), r(w, "height", "18"), r(w, "viewBox", "0 0 24 24"), r(w, "fill", "none"), r(w, "stroke", "currentColor"), r(w, "stroke-width", "2"), r(w, "stroke-linecap", "round"), r(w, "stroke-linejoin", "round"), r(_, "class", "sy-assistant-action-button svelte-1427avp"), r(_, "aria-label", y = /*isSnapped*/
|
4534
4534
|
s[7] ? "取消吸附" : "吸附到边缘"), J(
|
4535
|
-
|
4535
|
+
_,
|
4536
4536
|
"active",
|
4537
4537
|
/*isSnapped*/
|
4538
4538
|
s[7]
|
4539
|
-
), r(T, "class", "sy-assistant-tooltip svelte-
|
4539
|
+
), r(T, "class", "sy-assistant-tooltip svelte-1427avp"), r(v, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(U, "class", "sy-assistant-close-button svelte-1427avp"), r(U, "aria-label", "关闭助手"), r(Q, "class", "sy-assistant-tooltip svelte-1427avp"), r(I, "class", "sy-assistant-tooltip-wrapper svelte-1427avp"), r(c, "class", "sy-assistant-header-actions svelte-1427avp"), r(n, "class", "sy-assistant-drawer-header svelte-1427avp"), r(n, "role", "button"), r(n, "tabindex", "0"), r(n, "aria-label", "拖动助手窗口"), J(
|
4540
4540
|
n,
|
4541
4541
|
"dragging",
|
4542
4542
|
/*isDragging*/
|
@@ -4551,7 +4551,7 @@ function Us(s) {
|
|
4551
4551
|
"snapped",
|
4552
4552
|
/*isSnapped*/
|
4553
4553
|
s[7]
|
4554
|
-
), r(t, "class", "sy-assistant-drawer-content svelte-
|
4554
|
+
), r(t, "class", "sy-assistant-drawer-content svelte-1427avp"), r(e, "class", "sy-assistant-drawer svelte-1427avp"), J(
|
4555
4555
|
e,
|
4556
4556
|
"fullscreen",
|
4557
4557
|
/*isFullscreen*/
|
@@ -4559,7 +4559,7 @@ function Us(s) {
|
|
4559
4559
|
), F(e, "height", He);
|
4560
4560
|
},
|
4561
4561
|
m(N, G) {
|
4562
|
-
q(N, e, G), m(e, t), m(t, n), m(n, i), m(i, l), m(n, a), m(n, c), m(c, u), m(u, h), m(h, p), Se.m(p, null), m(u, g), m(u,
|
4562
|
+
q(N, e, G), m(e, t), m(t, n), m(n, i), m(i, l), m(n, a), m(n, c), m(c, u), m(u, h), m(h, p), Se.m(p, null), m(u, g), m(u, k), m(k, L), m(c, O), m(c, v), m(v, _), m(_, w), _e.m(w, null), m(v, A), m(v, T), m(T, R), m(c, P), m(c, I), m(I, U), m(I, Z), m(I, Q), m(t, oe), D[he].m(t, null), re = !0, je || (le = [
|
4563
4563
|
B(
|
4564
4564
|
h,
|
4565
4565
|
"click",
|
@@ -4567,7 +4567,7 @@ function Us(s) {
|
|
4567
4567
|
s[16]
|
4568
4568
|
),
|
4569
4569
|
B(
|
4570
|
-
|
4570
|
+
_,
|
4571
4571
|
"click",
|
4572
4572
|
/*toggleSnap*/
|
4573
4573
|
s[18]
|
@@ -4597,17 +4597,17 @@ function Us(s) {
|
|
4597
4597
|
N[2]
|
4598
4598
|
), (!re || G[0] & /*isFullscreen*/
|
4599
4599
|
4) && S !== (S = /*isFullscreen*/
|
4600
|
-
N[2] ? "退出全屏" : "全屏显示") && Ne(
|
4600
|
+
N[2] ? "退出全屏" : "全屏显示") && Ne(L, S), Ce !== (Ce = $(N)) && (_e.d(1), _e = Ce(N), _e && (_e.c(), _e.m(w, null))), (!re || G[0] & /*isSnapped*/
|
4601
4601
|
128 && y !== (y = /*isSnapped*/
|
4602
|
-
N[7] ? "取消吸附" : "吸附到边缘")) && r(
|
4602
|
+
N[7] ? "取消吸附" : "吸附到边缘")) && r(_, "aria-label", y), (!re || G[0] & /*isSnapped*/
|
4603
4603
|
128) && J(
|
4604
|
-
|
4604
|
+
_,
|
4605
4605
|
"active",
|
4606
4606
|
/*isSnapped*/
|
4607
4607
|
N[7]
|
4608
4608
|
), (!re || G[0] & /*isSnapped*/
|
4609
|
-
128) &&
|
4610
|
-
N[7] ? "取消吸附" : "吸附到边缘") && Ne(R,
|
4609
|
+
128) && C !== (C = /*isSnapped*/
|
4610
|
+
N[7] ? "取消吸附" : "吸附到边缘") && Ne(R, C), (!re || G[0] & /*isDragging*/
|
4611
4611
|
64) && J(
|
4612
4612
|
n,
|
4613
4613
|
"dragging",
|
@@ -4626,10 +4626,10 @@ function Us(s) {
|
|
4626
4626
|
/*isSnapped*/
|
4627
4627
|
N[7]
|
4628
4628
|
);
|
4629
|
-
let
|
4630
|
-
he = ne(N), he ===
|
4631
|
-
|
4632
|
-
}), In(), fe =
|
4629
|
+
let be = he;
|
4630
|
+
he = ne(N), he === be ? D[he].p(N, G) : (Rn(), Ke(D[be], 1, 1, () => {
|
4631
|
+
D[be] = null;
|
4632
|
+
}), In(), fe = D[he], fe ? fe.p(N, G) : (fe = D[he] = Ve[he](N), fe.c()), Pe(fe, 1), fe.m(t, null)), (!re || G[0] & /*isFullscreen*/
|
4633
4633
|
4) && J(
|
4634
4634
|
e,
|
4635
4635
|
"fullscreen",
|
@@ -4646,7 +4646,7 @@ function Us(s) {
|
|
4646
4646
|
Ke(fe), re = !1;
|
4647
4647
|
},
|
4648
4648
|
d(N) {
|
4649
|
-
N && j(e), Se.d(),
|
4649
|
+
N && j(e), Se.d(), _e.d(), D[he].d(), je = !1, Ee(le);
|
4650
4650
|
}
|
4651
4651
|
};
|
4652
4652
|
}
|
@@ -4706,7 +4706,7 @@ function ml(s) {
|
|
4706
4706
|
}
|
4707
4707
|
};
|
4708
4708
|
}
|
4709
|
-
function
|
4709
|
+
function kl(s) {
|
4710
4710
|
var n;
|
4711
4711
|
let e, t;
|
4712
4712
|
return e = new hl({
|
@@ -4722,7 +4722,7 @@ function wl(s) {
|
|
4722
4722
|
}
|
4723
4723
|
}), {
|
4724
4724
|
c() {
|
4725
|
-
|
4725
|
+
Cn(e.$$.fragment);
|
4726
4726
|
},
|
4727
4727
|
m(i, o) {
|
4728
4728
|
$t(e, i, o), t = !0;
|
@@ -4747,7 +4747,7 @@ function wl(s) {
|
|
4747
4747
|
}
|
4748
4748
|
};
|
4749
4749
|
}
|
4750
|
-
function
|
4750
|
+
function wl(s) {
|
4751
4751
|
var n;
|
4752
4752
|
let e, t;
|
4753
4753
|
return e = new pi({
|
@@ -4771,7 +4771,7 @@ function kl(s) {
|
|
4771
4771
|
}
|
4772
4772
|
}), {
|
4773
4773
|
c() {
|
4774
|
-
|
4774
|
+
Cn(e.$$.fragment);
|
4775
4775
|
},
|
4776
4776
|
m(i, o) {
|
4777
4777
|
$t(e, i, o), t = !0;
|
@@ -4796,23 +4796,23 @@ function kl(s) {
|
|
4796
4796
|
}
|
4797
4797
|
};
|
4798
4798
|
}
|
4799
|
-
function
|
4799
|
+
function _l(s) {
|
4800
4800
|
let e, t, n = `${/*$drawerWidth*/
|
4801
|
-
s[12]}px`, i, o, l, a, c, u, h, p, d, g,
|
4801
|
+
s[12]}px`, i, o, l, a, c, u, h, p, d, g, k, S, L, O, v = (
|
4802
4802
|
/*$drawerWidth*/
|
4803
4803
|
s[12] > 0 && Us(s)
|
4804
4804
|
);
|
4805
4805
|
return {
|
4806
4806
|
c() {
|
4807
|
-
var
|
4808
|
-
e = x("div"), t = x("div"), v && v.c(), i = W(), o = x("button"), l = X("svg"), a = X("path"), c = X("path"), u = X("path"), h = X("path"), p = X("path"), d = X("path"), g = X("path"), r(t, "class", "sy-assistant-drawer-wrapper svelte-
|
4807
|
+
var _, w;
|
4808
|
+
e = x("div"), t = x("div"), v && v.c(), i = W(), o = x("button"), l = X("svg"), a = X("path"), c = X("path"), u = X("path"), h = X("path"), p = X("path"), d = X("path"), g = X("path"), r(t, "class", "sy-assistant-drawer-wrapper svelte-1427avp"), J(
|
4809
4809
|
t,
|
4810
4810
|
"fullscreen",
|
4811
4811
|
/*isFullscreen*/
|
4812
4812
|
s[2]
|
4813
|
-
), F(t, "width", n), r(a, "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"), r(a, "fill", "#6F8698"), r(c, "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"), r(c, "fill", "#3677FF"), r(u, "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"), r(u, "fill", "#D0D5F1"), r(h, "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"), r(h, "fill", "#3677FF"), r(p, "d", "M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), r(p, "fill", "#FFFFFF"), r(d, "d", "M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), r(d, "fill", "#FFFFFF"), r(g, "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"), r(g, "fill", "#8896A4"), r(l, "class", "sy-assistant-icon"), r(l, "viewBox", "0 0 1024 1024"), r(l, "version", "1.1"), r(l, "xmlns", "http://www.w3.org/2000/svg"), r(l, "width", "32"), r(l, "height", "32"), r(l, "fill", "currentColor"), r(l, "aria-label", "助手图标"), r(o, "class", "sy-assistant-floating-button svelte-
|
4813
|
+
), F(t, "width", n), r(a, "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"), r(a, "fill", "#6F8698"), r(c, "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"), r(c, "fill", "#3677FF"), r(u, "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"), r(u, "fill", "#D0D5F1"), r(h, "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"), r(h, "fill", "#3677FF"), r(p, "d", "M286.72 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), r(p, "fill", "#FFFFFF"), r(d, "d", "M608.256 583.68a78.336 70.144 90 1 0 140.288 0 78.336 70.144 90 1 0-140.288 0Z"), r(d, "fill", "#FFFFFF"), r(g, "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"), r(g, "fill", "#8896A4"), r(l, "class", "sy-assistant-icon"), r(l, "viewBox", "0 0 1024 1024"), r(l, "version", "1.1"), r(l, "xmlns", "http://www.w3.org/2000/svg"), r(l, "width", "32"), r(l, "height", "32"), r(l, "fill", "currentColor"), r(l, "aria-label", "助手图标"), r(o, "class", "sy-assistant-floating-button svelte-1427avp"), r(o, "aria-label", "打开助手"), r(o, "style", k = /*buttonStyle*/
|
4814
4814
|
s[10] + " z-index: " + /*mergedOptions*/
|
4815
|
-
(((
|
4815
|
+
(((_ = s[3].zIndex) != null ? _ : 1e3) + 1) + ";"), r(e, "class", "sy-assistant-container sy-assistant-theme svelte-1427avp"), J(
|
4816
4816
|
e,
|
4817
4817
|
"fullscreen",
|
4818
4818
|
/*isFullscreen*/
|
@@ -4854,11 +4854,11 @@ function bl(s) {
|
|
4854
4854
|
e,
|
4855
4855
|
"z-index",
|
4856
4856
|
/*mergedOptions*/
|
4857
|
-
(
|
4857
|
+
(w = s[3].zIndex) != null ? w : 1e3
|
4858
4858
|
);
|
4859
4859
|
},
|
4860
|
-
m(
|
4861
|
-
q(
|
4860
|
+
m(_, w) {
|
4861
|
+
q(_, e, w), m(e, t), v && v.m(t, null), m(e, i), m(e, o), m(o, l), m(l, a), m(l, c), m(l, u), m(l, h), m(l, p), m(l, d), m(l, g), s[27](o), s[29](e), S = !0, L || (O = [
|
4862
4862
|
B(
|
4863
4863
|
o,
|
4864
4864
|
"click",
|
@@ -4869,92 +4869,92 @@ function bl(s) {
|
|
4869
4869
|
/*mousedown_handler*/
|
4870
4870
|
s[28]
|
4871
4871
|
))
|
4872
|
-
],
|
4872
|
+
], L = !0);
|
4873
4873
|
},
|
4874
|
-
p(
|
4874
|
+
p(_, w) {
|
4875
4875
|
var y, A;
|
4876
4876
|
/*$drawerWidth*/
|
4877
|
-
|
4878
|
-
4096 && Pe(v, 1)) : (v = Us(
|
4877
|
+
_[12] > 0 ? v ? (v.p(_, w), w[0] & /*$drawerWidth*/
|
4878
|
+
4096 && Pe(v, 1)) : (v = Us(_), v.c(), Pe(v, 1), v.m(t, null)) : v && (Rn(), Ke(v, 1, 1, () => {
|
4879
4879
|
v = null;
|
4880
|
-
}), In()), (!S ||
|
4880
|
+
}), In()), (!S || w[0] & /*isFullscreen*/
|
4881
4881
|
4) && J(
|
4882
4882
|
t,
|
4883
4883
|
"fullscreen",
|
4884
4884
|
/*isFullscreen*/
|
4885
|
-
|
4886
|
-
),
|
4885
|
+
_[2]
|
4886
|
+
), w[0] & /*$drawerWidth*/
|
4887
4887
|
4096 && n !== (n = `${/*$drawerWidth*/
|
4888
|
-
|
4889
|
-
1032 &&
|
4890
|
-
|
4891
|
-
(((y =
|
4888
|
+
_[12]}px`) && F(t, "width", n), (!S || w[0] & /*buttonStyle, mergedOptions*/
|
4889
|
+
1032 && k !== (k = /*buttonStyle*/
|
4890
|
+
_[10] + " z-index: " + /*mergedOptions*/
|
4891
|
+
(((y = _[3].zIndex) != null ? y : 1e3) + 1) + ";")) && r(o, "style", k), (!S || w[0] & /*isFullscreen*/
|
4892
4892
|
4) && J(
|
4893
4893
|
e,
|
4894
4894
|
"fullscreen",
|
4895
4895
|
/*isFullscreen*/
|
4896
|
-
|
4897
|
-
), (!S ||
|
4896
|
+
_[2]
|
4897
|
+
), (!S || w[0] & /*isSnapped*/
|
4898
4898
|
128) && J(
|
4899
4899
|
e,
|
4900
4900
|
"snapped",
|
4901
4901
|
/*isSnapped*/
|
4902
|
-
|
4903
|
-
),
|
4902
|
+
_[7]
|
4903
|
+
), w[0] & /*mergedOptions*/
|
4904
4904
|
8 && F(
|
4905
4905
|
e,
|
4906
4906
|
"position",
|
4907
4907
|
/*mergedOptions*/
|
4908
|
-
|
4909
|
-
),
|
4908
|
+
_[3].position
|
4909
|
+
), w[0] & /*isSnapped, right*/
|
4910
4910
|
129 && F(
|
4911
4911
|
e,
|
4912
4912
|
"right",
|
4913
4913
|
/*isSnapped*/
|
4914
|
-
|
4915
|
-
|
4916
|
-
),
|
4914
|
+
_[7] ? 0 : `${/*right*/
|
4915
|
+
_[0]}px`
|
4916
|
+
), w[0] & /*isSnapped, bottom*/
|
4917
4917
|
130 && F(
|
4918
4918
|
e,
|
4919
4919
|
"bottom",
|
4920
4920
|
/*isSnapped*/
|
4921
|
-
|
4922
|
-
|
4923
|
-
),
|
4921
|
+
_[7] ? 0 : `${/*bottom*/
|
4922
|
+
_[1]}px`
|
4923
|
+
), w[0] & /*isSnapped, isFullscreen*/
|
4924
4924
|
132 && F(
|
4925
4925
|
e,
|
4926
4926
|
"top",
|
4927
4927
|
/*isSnapped*/
|
4928
|
-
|
4929
|
-
|
4930
|
-
),
|
4928
|
+
_[7] || /*isFullscreen*/
|
4929
|
+
_[2] ? "0" : "auto"
|
4930
|
+
), w[0] & /*isFullscreen*/
|
4931
4931
|
4 && F(
|
4932
4932
|
e,
|
4933
4933
|
"left",
|
4934
4934
|
/*isFullscreen*/
|
4935
|
-
|
4936
|
-
),
|
4935
|
+
_[2] ? "0" : "auto"
|
4936
|
+
), w[0] & /*mergedOptions*/
|
4937
4937
|
8 && F(
|
4938
4938
|
e,
|
4939
4939
|
"z-index",
|
4940
4940
|
/*mergedOptions*/
|
4941
|
-
(A =
|
4941
|
+
(A = _[3].zIndex) != null ? A : 1e3
|
4942
4942
|
);
|
4943
4943
|
},
|
4944
|
-
i(
|
4944
|
+
i(_) {
|
4945
4945
|
S || (Pe(v), S = !0);
|
4946
4946
|
},
|
4947
|
-
o(
|
4947
|
+
o(_) {
|
4948
4948
|
Ke(v), S = !1;
|
4949
4949
|
},
|
4950
|
-
d(
|
4951
|
-
|
4950
|
+
d(_) {
|
4951
|
+
_ && j(e), v && v.d(), s[27](null), s[29](null), L = !1, Ee(O);
|
4952
4952
|
}
|
4953
4953
|
};
|
4954
4954
|
}
|
4955
4955
|
const mn = 48, de = 20;
|
4956
|
-
function
|
4957
|
-
let n, i, o, l, a =
|
4956
|
+
function bl(s, e, t) {
|
4957
|
+
let n, i, o, l, a = Me, c = () => (a(), a = Ri(i, (D) => t(12, l = D)), i);
|
4958
4958
|
s.$$.on_destroy.push(() => a());
|
4959
4959
|
const u = {
|
4960
4960
|
position: "fixed",
|
@@ -4969,11 +4969,11 @@ function _l(s, e, t) {
|
|
4969
4969
|
// 设置默认抽屉宽度
|
4970
4970
|
zIndex: 1e3
|
4971
4971
|
};
|
4972
|
-
let { target: h = "body" } = e, { options: p = {} } = e, d, g = null,
|
4972
|
+
let { target: h = "body" } = e, { options: p = {} } = e, d, g = null, k = !1, S, L = !1, O = 0, v = 0, _ = de, w = 20, y = _, A = w, T = !1, C = de, R = 50, P = !1, I = { width: 0, height: 0, right: 0, bottom: 0 }, U = !1, Z = !1, Q = [], oe = null;
|
4973
4973
|
function he() {
|
4974
4974
|
return xe(this, null, function* () {
|
4975
4975
|
try {
|
4976
|
-
const
|
4976
|
+
const D = yield fetch("/aiops/aigc/chat/getSessionId", {
|
4977
4977
|
method: "POST",
|
4978
4978
|
headers: {
|
4979
4979
|
"Content-Type": "application/json",
|
@@ -4981,120 +4981,120 @@ function _l(s, e, t) {
|
|
4981
4981
|
Authorization: `bearer ${me()}`
|
4982
4982
|
}
|
4983
4983
|
});
|
4984
|
-
if (!
|
4984
|
+
if (!D.ok)
|
4985
4985
|
throw new Error("Failed to get session ID");
|
4986
|
-
const ne = yield
|
4986
|
+
const ne = yield D.json();
|
4987
4987
|
if (ne.code === 0)
|
4988
4988
|
return t(9, oe = ne.data.sessionId), oe;
|
4989
4989
|
throw new Error(ne.message || "Failed to get session ID");
|
4990
|
-
} catch (
|
4991
|
-
return console.error("Failed to get session ID:",
|
4990
|
+
} catch (D) {
|
4991
|
+
return console.error("Failed to get session ID:", D), null;
|
4992
4992
|
}
|
4993
4993
|
});
|
4994
4994
|
}
|
4995
|
-
function fe(
|
4996
|
-
ne ? t(23, T = !0) : t(6,
|
4995
|
+
function fe(D, ne = !1) {
|
4996
|
+
ne ? t(23, T = !0) : t(6, L = !0), O = D.clientX, v = D.clientY, _ = ne ? C : y, w = ne ? R : A, D.preventDefault();
|
4997
4997
|
}
|
4998
|
-
function He(
|
4999
|
-
if (!
|
5000
|
-
const ne =
|
4998
|
+
function He(D) {
|
4999
|
+
if (!L && !T) return;
|
5000
|
+
const ne = O - D.clientX, N = v - D.clientY;
|
5001
5001
|
if (T) {
|
5002
|
-
const G =
|
5003
|
-
t(24,
|
5004
|
-
const ye = window.innerHeight - mn - de, We = Math.max(de, Math.min(ye,
|
5002
|
+
const G = _ + ne, be = D.clientY;
|
5003
|
+
t(24, C = Math.max(de, Math.min(window.innerWidth - mn - de, G)));
|
5004
|
+
const ye = window.innerHeight - mn - de, We = Math.max(de, Math.min(ye, be));
|
5005
5005
|
t(25, R = (window.innerHeight - We - mn) / window.innerHeight * 100);
|
5006
5006
|
} else {
|
5007
|
-
const G = n.width || 0,
|
5007
|
+
const G = n.width || 0, be = n.height || 0, ye = _ + ne;
|
5008
5008
|
t(0, y = Math.max(de, Math.min(window.innerWidth - G - de, ye)));
|
5009
|
-
const Be =
|
5010
|
-
t(1, A = Math.max(de, Math.min(window.innerHeight -
|
5009
|
+
const Be = w + N;
|
5010
|
+
t(1, A = Math.max(de, Math.min(window.innerHeight - be - de, Be)));
|
5011
5011
|
}
|
5012
5012
|
}
|
5013
5013
|
function re() {
|
5014
|
-
t(6,
|
5014
|
+
t(6, L = !1), t(23, T = !1);
|
5015
5015
|
}
|
5016
5016
|
Zs(() => {
|
5017
5017
|
typeof h == "string" ? g = document.querySelector(h) || document.body : g = h || document.body;
|
5018
|
-
const
|
5019
|
-
return document.addEventListener("mousemove",
|
5018
|
+
const D = (N) => He(N), ne = () => re();
|
5019
|
+
return document.addEventListener("mousemove", D), document.addEventListener("mouseup", ne), d && g && g.appendChild(d), S && S.getBoundingClientRect().left, t(7, U = n.initialState === "snapped"), t(2, P = n.initialState === "fullscreen"), n.initialState === "snapped" ? (t(0, y = 0), t(1, A = 0), t(3, n = we(ee({}, n), {
|
5020
5020
|
height: typeof window != "undefined" ? window.innerHeight : n.height,
|
5021
5021
|
width: n.snappedWidth || n.width
|
5022
|
-
}))) : n.initialState === "fullscreen" && (t(0, y = 0), t(1, A = 0), t(3, n =
|
5022
|
+
}))) : n.initialState === "fullscreen" && (t(0, y = 0), t(1, A = 0), t(3, n = we(ee({}, n), {
|
5023
5023
|
width: typeof window != "undefined" ? window.innerWidth : n.width,
|
5024
5024
|
height: typeof window != "undefined" ? window.innerHeight : n.height
|
5025
5025
|
}))), () => {
|
5026
|
-
document.removeEventListener("mousemove",
|
5026
|
+
document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", ne), g && d && g.removeChild(d);
|
5027
5027
|
};
|
5028
5028
|
});
|
5029
5029
|
function je() {
|
5030
5030
|
return xe(this, null, function* () {
|
5031
|
-
|
5031
|
+
k || (yield he()), t(22, k = !k);
|
5032
5032
|
});
|
5033
5033
|
}
|
5034
5034
|
function le() {
|
5035
|
-
var
|
5035
|
+
var D, ne, N, G, be, ye, Be, We;
|
5036
5036
|
t(2, P = !P), P ? (I.width || (I = {
|
5037
5037
|
width: u.width,
|
5038
5038
|
height: u.height,
|
5039
|
-
right: (ne = (
|
5039
|
+
right: (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne : de,
|
5040
5040
|
bottom: (G = (N = u.defaultPosition) == null ? void 0 : N.bottom) != null ? G : de
|
5041
|
-
}), U && t(7, U = !1), t(20, p =
|
5041
|
+
}), U && t(7, U = !1), t(20, p = we(ee({}, n), {
|
5042
5042
|
width: window.innerWidth,
|
5043
5043
|
height: window.innerHeight,
|
5044
5044
|
drawerWidth: window.innerWidth
|
5045
|
-
})), t(0, y = 0), t(1, A = 0)) : (t(20, p =
|
5045
|
+
})), t(0, y = 0), t(1, A = 0)) : (t(20, p = we(ee({}, n), {
|
5046
5046
|
width: u.width,
|
5047
5047
|
height: u.height,
|
5048
5048
|
drawerWidth: u.drawerWidth
|
5049
|
-
})), t(0, y = (ye = (
|
5049
|
+
})), t(0, y = (ye = (be = u.defaultPosition) == null ? void 0 : be.right) != null ? ye : de), t(1, A = (We = (Be = u.defaultPosition) == null ? void 0 : Be.bottom) != null ? We : de));
|
5050
5050
|
}
|
5051
|
-
function Xe(
|
5052
|
-
P || fe(
|
5051
|
+
function Xe(D) {
|
5052
|
+
P || fe(D);
|
5053
5053
|
}
|
5054
5054
|
function ie() {
|
5055
|
-
var
|
5056
|
-
P && (t(2, P = !1), t(20, p =
|
5055
|
+
var D, ne, N, G;
|
5056
|
+
P && (t(2, P = !1), t(20, p = we(ee({}, n), {
|
5057
5057
|
width: u.width,
|
5058
5058
|
height: u.height,
|
5059
5059
|
drawerWidth: u.drawerWidth
|
5060
|
-
}))), t(7, U = !U), U ? (n.height, t(0, y = 0), t(1, A = 0), t(20, p =
|
5060
|
+
}))), t(7, U = !U), U ? (n.height, t(0, y = 0), t(1, A = 0), t(20, p = we(ee({}, n), {
|
5061
5061
|
height: window.innerHeight,
|
5062
5062
|
width: n.snappedWidth || u.width,
|
5063
5063
|
drawerWidth: n.snappedWidth || u.width
|
5064
|
-
}))) : (t(20, p =
|
5064
|
+
}))) : (t(20, p = we(ee({}, n), {
|
5065
5065
|
width: u.width,
|
5066
5066
|
height: u.height,
|
5067
5067
|
drawerWidth: u.drawerWidth
|
5068
|
-
})), t(0, y = (ne = (
|
5068
|
+
})), t(0, y = (ne = (D = u.defaultPosition) == null ? void 0 : D.right) != null ? ne : de), t(1, A = (G = (N = u.defaultPosition) == null ? void 0 : N.bottom) != null ? G : de));
|
5069
5069
|
}
|
5070
|
-
function Se(
|
5070
|
+
function Se(D) {
|
5071
5071
|
t(8, Z = !1);
|
5072
5072
|
}
|
5073
5073
|
const $ = () => t(8, Z = !1);
|
5074
|
-
function
|
5075
|
-
|
5076
|
-
S =
|
5074
|
+
function Ce(D) {
|
5075
|
+
kt[D ? "unshift" : "push"](() => {
|
5076
|
+
S = D, t(5, S);
|
5077
5077
|
});
|
5078
5078
|
}
|
5079
|
-
const
|
5080
|
-
function Ve(
|
5081
|
-
|
5082
|
-
d =
|
5079
|
+
const _e = (D) => fe(D, !0);
|
5080
|
+
function Ve(D) {
|
5081
|
+
kt[D ? "unshift" : "push"](() => {
|
5082
|
+
d = D, t(4, d);
|
5083
5083
|
});
|
5084
5084
|
}
|
5085
|
-
return s.$$set = (
|
5086
|
-
"target" in
|
5085
|
+
return s.$$set = (D) => {
|
5086
|
+
"target" in D && t(21, h = D.target), "options" in D && t(20, p = D.options);
|
5087
5087
|
}, s.$$.update = () => {
|
5088
5088
|
s.$$.dirty[0] & /*options*/
|
5089
|
-
1048576 && t(3, n =
|
5089
|
+
1048576 && t(3, n = we(ee(ee({}, u), p), {
|
5090
5090
|
defaultPosition: ee(ee({}, u.defaultPosition), p.defaultPosition)
|
5091
5091
|
})), s.$$.dirty[0] & /*isOpen, isFullscreen, mergedOptions*/
|
5092
5092
|
4194316 && c(t(11, i = Ui(
|
5093
|
-
|
5093
|
+
k ? P ? window.innerWidth : n.drawerWidth : 0,
|
5094
5094
|
{ stiffness: 0.1, damping: 0.6 }
|
5095
5095
|
))), s.$$.dirty[0] & /*mergedOptions, right, bottom*/
|
5096
5096
|
11 && typeof window != "undefined" && (t(0, y = Math.max(de, Math.min(window.innerWidth - (n.width || 0), y))), t(1, A = Math.max(de, Math.min(window.innerHeight - (n.height || 0), A)))), s.$$.dirty[0] & /*isOpen, buttonRight, buttonBottom, isButtonDragging*/
|
5097
|
-
62914560 && t(10, o =
|
5097
|
+
62914560 && t(10, o = k ? "display: none;" : `position: fixed; right: ${C}px; bottom: ${R}%; transform: none; cursor: ${T ? "grabbing" : "grab"};`);
|
5098
5098
|
}, [
|
5099
5099
|
y,
|
5100
5100
|
A,
|
@@ -5102,7 +5102,7 @@ function _l(s, e, t) {
|
|
5102
5102
|
n,
|
5103
5103
|
d,
|
5104
5104
|
S,
|
5105
|
-
|
5105
|
+
L,
|
5106
5106
|
U,
|
5107
5107
|
Z,
|
5108
5108
|
oe,
|
@@ -5118,19 +5118,19 @@ function _l(s, e, t) {
|
|
5118
5118
|
Se,
|
5119
5119
|
p,
|
5120
5120
|
h,
|
5121
|
-
|
5121
|
+
k,
|
5122
5122
|
T,
|
5123
|
-
|
5123
|
+
C,
|
5124
5124
|
R,
|
5125
5125
|
$,
|
5126
|
-
|
5127
|
-
|
5126
|
+
Ce,
|
5127
|
+
_e,
|
5128
5128
|
Ve
|
5129
5129
|
];
|
5130
5130
|
}
|
5131
|
-
class Tl extends
|
5131
|
+
class Tl extends Mn {
|
5132
5132
|
constructor(e) {
|
5133
|
-
super(),
|
5133
|
+
super(), Ln(this, e, bl, _l, Jt, { target: 21, options: 20 }, null, [-1, -1]);
|
5134
5134
|
}
|
5135
5135
|
}
|
5136
5136
|
export {
|