@sksharma72000/ai-chat-websdk 1.1.1 → 1.2.0
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/ai-chat-websdk.es.js +261 -255
- package/ai-chat-websdk.standalone.js +61 -61
- package/ai-chat-websdk.umd.js +15 -15
- package/package.json +1 -1
- package/types/config.d.ts +7 -0
- package/utils/correlationId.d.ts +3 -0
package/ai-chat-websdk.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var lb = Object.defineProperty;
|
|
2
2
|
var ub = (e, t, n) => t in e ? lb(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var At = (e, t, n) => ub(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as Xs from "react";
|
|
5
5
|
import _e, { useState as he, useCallback as Ke, useRef as on, useEffect as ft, useMemo as du } from "react";
|
|
6
6
|
import cb from "react-dom";
|
|
@@ -23,7 +23,7 @@ else {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
class
|
|
26
|
+
class se {
|
|
27
27
|
/**
|
|
28
28
|
* Returns the permanent browser session token.
|
|
29
29
|
* Created once and stored in localStorage forever — sent as the `browser-session` header
|
|
@@ -33,6 +33,12 @@ class pe {
|
|
|
33
33
|
let t = localStorage.getItem(this.BROWSER_SESSION_KEY);
|
|
34
34
|
return t || (t = `bs_${Date.now()}_${Math.random().toString(36).substring(2, 18)}`, localStorage.setItem(this.BROWSER_SESSION_KEY, t)), t;
|
|
35
35
|
}
|
|
36
|
+
static getChatId() {
|
|
37
|
+
return localStorage.getItem(this.CHAT_ID_KEY);
|
|
38
|
+
}
|
|
39
|
+
static setChatId(t) {
|
|
40
|
+
localStorage.setItem(this.CHAT_ID_KEY, t);
|
|
41
|
+
}
|
|
36
42
|
static getCorrelationId() {
|
|
37
43
|
let t = localStorage.getItem(this.STORAGE_KEY);
|
|
38
44
|
return t || (t = this.generate(), localStorage.setItem(this.STORAGE_KEY, t)), t;
|
|
@@ -86,8 +92,8 @@ class pe {
|
|
|
86
92
|
return `user_${t}_${n}_${r}`;
|
|
87
93
|
}
|
|
88
94
|
}
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
At(se, "STORAGE_KEY", "ai_sdk_correlation_id"), At(se, "SESSIONS_KEY", "ai_sdk_sessions"), /** Key for the permanent browser-level identifier (never changes, survives session resets). */
|
|
96
|
+
At(se, "BROWSER_SESSION_KEY", "ai_sdk_browser_session"), At(se, "CHAT_ID_KEY", "ai_sdk_chat_id");
|
|
91
97
|
function db({
|
|
92
98
|
isConnected: e,
|
|
93
99
|
setIsConnected: t,
|
|
@@ -240,7 +246,7 @@ function pb({
|
|
|
240
246
|
const u = Ke((p) => {
|
|
241
247
|
const g = p ?? l.current, d = {
|
|
242
248
|
"Content-Type": "application/json",
|
|
243
|
-
"X-Correlation-ID":
|
|
249
|
+
"X-Correlation-ID": se.getCorrelationId(),
|
|
244
250
|
"browser-session": r
|
|
245
251
|
};
|
|
246
252
|
return g && (d.Authorization = g.startsWith("Bearer ") ? g : `Bearer ${g}`), d;
|
|
@@ -249,7 +255,7 @@ function pb({
|
|
|
249
255
|
async (p, g, d) => {
|
|
250
256
|
const b = {
|
|
251
257
|
query: p,
|
|
252
|
-
correlationId:
|
|
258
|
+
correlationId: se.getCorrelationId(),
|
|
253
259
|
messageId: g,
|
|
254
260
|
sessionId: n,
|
|
255
261
|
userSelection: d
|
|
@@ -313,7 +319,7 @@ function Eb(e) {
|
|
|
313
319
|
function fu(e) {
|
|
314
320
|
return e.replace(bb, "") === "";
|
|
315
321
|
}
|
|
316
|
-
let
|
|
322
|
+
let Bt = class {
|
|
317
323
|
/**
|
|
318
324
|
* @param {SchemaType['property']} property
|
|
319
325
|
* Property.
|
|
@@ -328,14 +334,14 @@ let Ut = class {
|
|
|
328
334
|
this.normal = n, this.property = t, r && (this.space = r);
|
|
329
335
|
}
|
|
330
336
|
};
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
337
|
+
Bt.prototype.normal = {};
|
|
338
|
+
Bt.prototype.property = {};
|
|
339
|
+
Bt.prototype.space = void 0;
|
|
334
340
|
function Dm(e, t) {
|
|
335
341
|
const n = {}, r = {};
|
|
336
342
|
for (const a of e)
|
|
337
343
|
Object.assign(n, a.property), Object.assign(r, a.normal);
|
|
338
|
-
return new
|
|
344
|
+
return new Bt(n, r, t);
|
|
339
345
|
}
|
|
340
346
|
function Js(e) {
|
|
341
347
|
return e.toLowerCase();
|
|
@@ -366,7 +372,7 @@ Ie.prototype.property = "";
|
|
|
366
372
|
Ie.prototype.spaceSeparated = !1;
|
|
367
373
|
Ie.prototype.space = void 0;
|
|
368
374
|
let yb = 0;
|
|
369
|
-
const Z = lt(), ge = lt(), el = lt(), O = lt(),
|
|
375
|
+
const Z = lt(), ge = lt(), el = lt(), O = lt(), le = lt(), bt = lt(), Le = lt();
|
|
370
376
|
function lt() {
|
|
371
377
|
return 2 ** ++yb;
|
|
372
378
|
}
|
|
@@ -378,7 +384,7 @@ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
378
384
|
commaSeparated: bt,
|
|
379
385
|
number: O,
|
|
380
386
|
overloadedBoolean: el,
|
|
381
|
-
spaceSeparated:
|
|
387
|
+
spaceSeparated: le
|
|
382
388
|
}, Symbol.toStringTag, { value: "Module" })), _n = (
|
|
383
389
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
384
390
|
Object.keys(tl)
|
|
@@ -421,7 +427,7 @@ function yt(e) {
|
|
|
421
427
|
);
|
|
422
428
|
e.mustUseProperty && e.mustUseProperty.includes(r) && (i.mustUseProperty = !0), t[r] = i, n[Js(r)] = r, n[Js(i.attribute)] = r;
|
|
423
429
|
}
|
|
424
|
-
return new
|
|
430
|
+
return new Bt(t, n, e.space);
|
|
425
431
|
}
|
|
426
432
|
const Mm = yt({
|
|
427
433
|
properties: {
|
|
@@ -433,36 +439,36 @@ const Mm = yt({
|
|
|
433
439
|
ariaColCount: O,
|
|
434
440
|
ariaColIndex: O,
|
|
435
441
|
ariaColSpan: O,
|
|
436
|
-
ariaControls:
|
|
442
|
+
ariaControls: le,
|
|
437
443
|
ariaCurrent: null,
|
|
438
|
-
ariaDescribedBy:
|
|
444
|
+
ariaDescribedBy: le,
|
|
439
445
|
ariaDetails: null,
|
|
440
446
|
ariaDisabled: ge,
|
|
441
|
-
ariaDropEffect:
|
|
447
|
+
ariaDropEffect: le,
|
|
442
448
|
ariaErrorMessage: null,
|
|
443
449
|
ariaExpanded: ge,
|
|
444
|
-
ariaFlowTo:
|
|
450
|
+
ariaFlowTo: le,
|
|
445
451
|
ariaGrabbed: ge,
|
|
446
452
|
ariaHasPopup: null,
|
|
447
453
|
ariaHidden: ge,
|
|
448
454
|
ariaInvalid: null,
|
|
449
455
|
ariaKeyShortcuts: null,
|
|
450
456
|
ariaLabel: null,
|
|
451
|
-
ariaLabelledBy:
|
|
457
|
+
ariaLabelledBy: le,
|
|
452
458
|
ariaLevel: O,
|
|
453
459
|
ariaLive: null,
|
|
454
460
|
ariaModal: ge,
|
|
455
461
|
ariaMultiLine: ge,
|
|
456
462
|
ariaMultiSelectable: ge,
|
|
457
463
|
ariaOrientation: null,
|
|
458
|
-
ariaOwns:
|
|
464
|
+
ariaOwns: le,
|
|
459
465
|
ariaPlaceholder: null,
|
|
460
466
|
ariaPosInSet: O,
|
|
461
467
|
ariaPressed: ge,
|
|
462
468
|
ariaReadOnly: ge,
|
|
463
469
|
ariaRelevant: null,
|
|
464
470
|
ariaRequired: ge,
|
|
465
|
-
ariaRoleDescription:
|
|
471
|
+
ariaRoleDescription: le,
|
|
466
472
|
ariaRowCount: O,
|
|
467
473
|
ariaRowIndex: O,
|
|
468
474
|
ariaRowSpan: O,
|
|
@@ -497,8 +503,8 @@ const Sb = yt({
|
|
|
497
503
|
// Standard Properties.
|
|
498
504
|
abbr: null,
|
|
499
505
|
accept: bt,
|
|
500
|
-
acceptCharset:
|
|
501
|
-
accessKey:
|
|
506
|
+
acceptCharset: le,
|
|
507
|
+
accessKey: le,
|
|
502
508
|
action: null,
|
|
503
509
|
allow: null,
|
|
504
510
|
allowFullScreen: Z,
|
|
@@ -508,21 +514,21 @@ const Sb = yt({
|
|
|
508
514
|
as: null,
|
|
509
515
|
async: Z,
|
|
510
516
|
autoCapitalize: null,
|
|
511
|
-
autoComplete:
|
|
517
|
+
autoComplete: le,
|
|
512
518
|
autoFocus: Z,
|
|
513
519
|
autoPlay: Z,
|
|
514
|
-
blocking:
|
|
520
|
+
blocking: le,
|
|
515
521
|
capture: null,
|
|
516
522
|
charSet: null,
|
|
517
523
|
checked: Z,
|
|
518
524
|
cite: null,
|
|
519
|
-
className:
|
|
525
|
+
className: le,
|
|
520
526
|
cols: O,
|
|
521
527
|
colSpan: null,
|
|
522
528
|
content: null,
|
|
523
529
|
contentEditable: ge,
|
|
524
530
|
controls: Z,
|
|
525
|
-
controlsList:
|
|
531
|
+
controlsList: le,
|
|
526
532
|
coords: O | bt,
|
|
527
533
|
crossOrigin: null,
|
|
528
534
|
data: null,
|
|
@@ -544,14 +550,14 @@ const Sb = yt({
|
|
|
544
550
|
formMethod: null,
|
|
545
551
|
formNoValidate: Z,
|
|
546
552
|
formTarget: null,
|
|
547
|
-
headers:
|
|
553
|
+
headers: le,
|
|
548
554
|
height: O,
|
|
549
555
|
hidden: el,
|
|
550
556
|
high: O,
|
|
551
557
|
href: null,
|
|
552
558
|
hrefLang: null,
|
|
553
|
-
htmlFor:
|
|
554
|
-
httpEquiv:
|
|
559
|
+
htmlFor: le,
|
|
560
|
+
httpEquiv: le,
|
|
555
561
|
id: null,
|
|
556
562
|
imageSizes: null,
|
|
557
563
|
imageSrcSet: null,
|
|
@@ -561,10 +567,10 @@ const Sb = yt({
|
|
|
561
567
|
is: null,
|
|
562
568
|
isMap: Z,
|
|
563
569
|
itemId: null,
|
|
564
|
-
itemProp:
|
|
565
|
-
itemRef:
|
|
570
|
+
itemProp: le,
|
|
571
|
+
itemRef: le,
|
|
566
572
|
itemScope: Z,
|
|
567
|
-
itemType:
|
|
573
|
+
itemType: le,
|
|
568
574
|
kind: null,
|
|
569
575
|
label: null,
|
|
570
576
|
lang: null,
|
|
@@ -677,7 +683,7 @@ const Sb = yt({
|
|
|
677
683
|
open: Z,
|
|
678
684
|
optimum: O,
|
|
679
685
|
pattern: null,
|
|
680
|
-
ping:
|
|
686
|
+
ping: le,
|
|
681
687
|
placeholder: null,
|
|
682
688
|
playsInline: Z,
|
|
683
689
|
popover: null,
|
|
@@ -687,12 +693,12 @@ const Sb = yt({
|
|
|
687
693
|
preload: null,
|
|
688
694
|
readOnly: Z,
|
|
689
695
|
referrerPolicy: null,
|
|
690
|
-
rel:
|
|
696
|
+
rel: le,
|
|
691
697
|
required: Z,
|
|
692
698
|
reversed: Z,
|
|
693
699
|
rows: O,
|
|
694
700
|
rowSpan: O,
|
|
695
|
-
sandbox:
|
|
701
|
+
sandbox: le,
|
|
696
702
|
scope: null,
|
|
697
703
|
scoped: Z,
|
|
698
704
|
seamless: Z,
|
|
@@ -730,7 +736,7 @@ const Sb = yt({
|
|
|
730
736
|
// Several. Use CSS `text-align` instead,
|
|
731
737
|
aLink: null,
|
|
732
738
|
// `<body>`. Use CSS `a:active {color}` instead
|
|
733
|
-
archive:
|
|
739
|
+
archive: le,
|
|
734
740
|
// `<object>`. List of URIs to archives
|
|
735
741
|
axis: null,
|
|
736
742
|
// `<td>` and `<th>`. Use `scope` on `<th>`
|
|
@@ -1045,7 +1051,7 @@ const Sb = yt({
|
|
|
1045
1051
|
by: null,
|
|
1046
1052
|
calcMode: null,
|
|
1047
1053
|
capHeight: O,
|
|
1048
|
-
className:
|
|
1054
|
+
className: le,
|
|
1049
1055
|
clip: null,
|
|
1050
1056
|
clipPath: null,
|
|
1051
1057
|
clipPathUnits: null,
|
|
@@ -1280,7 +1286,7 @@ const Sb = yt({
|
|
|
1280
1286
|
patternTransform: null,
|
|
1281
1287
|
patternUnits: null,
|
|
1282
1288
|
phase: null,
|
|
1283
|
-
ping:
|
|
1289
|
+
ping: le,
|
|
1284
1290
|
pitch: null,
|
|
1285
1291
|
playbackOrder: null,
|
|
1286
1292
|
pointerEvents: null,
|
|
@@ -1623,7 +1629,7 @@ function aE(e) {
|
|
|
1623
1629
|
if (t && n)
|
|
1624
1630
|
return { start: t, end: n };
|
|
1625
1631
|
}
|
|
1626
|
-
function
|
|
1632
|
+
function Lt(e) {
|
|
1627
1633
|
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? Ru(e.position) : "start" in e || "end" in e ? Ru(e) : "line" in e || "column" in e ? rl(e) : "";
|
|
1628
1634
|
}
|
|
1629
1635
|
function rl(e) {
|
|
@@ -1706,7 +1712,7 @@ class Se extends Error {
|
|
|
1706
1712
|
l && (i.place = l.position);
|
|
1707
1713
|
}
|
|
1708
1714
|
const s = i.place && "start" in i.place ? i.place.start : i.place;
|
|
1709
|
-
this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = s ? s.column : void 0, this.fatal = void 0, this.file = "", this.message = a, this.line = s ? s.line : void 0, this.name =
|
|
1715
|
+
this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = s ? s.column : void 0, this.fatal = void 0, this.file = "", this.message = a, this.line = s ? s.line : void 0, this.name = Lt(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = o && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
|
|
1710
1716
|
}
|
|
1711
1717
|
}
|
|
1712
1718
|
Se.prototype.file = "";
|
|
@@ -1793,7 +1799,7 @@ function dE(e, t) {
|
|
|
1793
1799
|
return r.type, /** @type {Child | undefined} */
|
|
1794
1800
|
e.evaluater.evaluateExpression(r.expression);
|
|
1795
1801
|
}
|
|
1796
|
-
|
|
1802
|
+
Pt(e, t.position);
|
|
1797
1803
|
}
|
|
1798
1804
|
function pE(e, t) {
|
|
1799
1805
|
if (t.data && t.data.estree && e.evaluater)
|
|
@@ -1801,7 +1807,7 @@ function pE(e, t) {
|
|
|
1801
1807
|
/** @type {Child | undefined} */
|
|
1802
1808
|
e.evaluater.evaluateProgram(t.data.estree)
|
|
1803
1809
|
);
|
|
1804
|
-
|
|
1810
|
+
Pt(e, t.position);
|
|
1805
1811
|
}
|
|
1806
1812
|
function gE(e, t, n) {
|
|
1807
1813
|
const r = e.schema;
|
|
@@ -1886,7 +1892,7 @@ function yE(e, t) {
|
|
|
1886
1892
|
e.evaluater.evaluateExpression(s.argument)
|
|
1887
1893
|
);
|
|
1888
1894
|
} else
|
|
1889
|
-
|
|
1895
|
+
Pt(e, t.position);
|
|
1890
1896
|
else {
|
|
1891
1897
|
const a = r.name;
|
|
1892
1898
|
let i;
|
|
@@ -1895,7 +1901,7 @@ function yE(e, t) {
|
|
|
1895
1901
|
const s = r.value.data.estree.body[0];
|
|
1896
1902
|
s.type, i = e.evaluater.evaluateExpression(s.expression);
|
|
1897
1903
|
} else
|
|
1898
|
-
|
|
1904
|
+
Pt(e, t.position);
|
|
1899
1905
|
else
|
|
1900
1906
|
i = r.value === null ? !0 : r.value;
|
|
1901
1907
|
n[a] = /** @type {Props[keyof Props]} */
|
|
@@ -1982,9 +1988,9 @@ function jm(e, t, n) {
|
|
|
1982
1988
|
}
|
|
1983
1989
|
if (e.evaluater)
|
|
1984
1990
|
return e.evaluater.evaluateExpression(r);
|
|
1985
|
-
|
|
1991
|
+
Pt(e);
|
|
1986
1992
|
}
|
|
1987
|
-
function
|
|
1993
|
+
function Pt(e, t) {
|
|
1988
1994
|
const n = new Se(
|
|
1989
1995
|
"Cannot handle MDX estrees without `createEvaluater`",
|
|
1990
1996
|
{
|
|
@@ -2169,7 +2175,7 @@ function St(e) {
|
|
|
2169
2175
|
}
|
|
2170
2176
|
return t.join("") + e.slice(r);
|
|
2171
2177
|
}
|
|
2172
|
-
function
|
|
2178
|
+
function ue(e, t, n, r) {
|
|
2173
2179
|
const a = r ? r - 1 : Number.POSITIVE_INFINITY;
|
|
2174
2180
|
let i = 0;
|
|
2175
2181
|
return o;
|
|
@@ -2192,7 +2198,7 @@ function PE(e) {
|
|
|
2192
2198
|
e.consume(s);
|
|
2193
2199
|
return;
|
|
2194
2200
|
}
|
|
2195
|
-
return e.enter("lineEnding"), e.consume(s), e.exit("lineEnding"),
|
|
2201
|
+
return e.enter("lineEnding"), e.consume(s), e.exit("lineEnding"), ue(e, t, "linePrefix");
|
|
2196
2202
|
}
|
|
2197
2203
|
function a(s) {
|
|
2198
2204
|
return e.enter("paragraph"), i(s);
|
|
@@ -2330,7 +2336,7 @@ function BE(e) {
|
|
|
2330
2336
|
}
|
|
2331
2337
|
}
|
|
2332
2338
|
function $E(e, t, n) {
|
|
2333
|
-
return
|
|
2339
|
+
return ue(e, e.attempt(this.parser.constructs.document, t, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
2334
2340
|
}
|
|
2335
2341
|
function Iu(e) {
|
|
2336
2342
|
if (e === null || ke(e) || ME(e))
|
|
@@ -2470,7 +2476,7 @@ const fn = {
|
|
|
2470
2476
|
function VE(e, t, n) {
|
|
2471
2477
|
return r;
|
|
2472
2478
|
function r(i) {
|
|
2473
|
-
return ae(i) ?
|
|
2479
|
+
return ae(i) ? ue(e, a, "linePrefix")(i) : a(i);
|
|
2474
2480
|
}
|
|
2475
2481
|
function a(i) {
|
|
2476
2482
|
return i === null || V(i) ? t(i) : n(i);
|
|
@@ -2504,7 +2510,7 @@ function WE(e, t, n) {
|
|
|
2504
2510
|
const r = this;
|
|
2505
2511
|
return a;
|
|
2506
2512
|
function a(o) {
|
|
2507
|
-
return ae(o) ?
|
|
2513
|
+
return ae(o) ? ue(e, i, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(o) : i(o);
|
|
2508
2514
|
}
|
|
2509
2515
|
function i(o) {
|
|
2510
2516
|
return e.attempt(Km, t, n)(o);
|
|
@@ -2574,7 +2580,7 @@ function ZE(e, t, n) {
|
|
|
2574
2580
|
return i = I && I[1].type === "linePrefix" ? I[2].sliceSerialize(I[1], !0).length : 0, s = m, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), c(m);
|
|
2575
2581
|
}
|
|
2576
2582
|
function c(m) {
|
|
2577
|
-
return m === s ? (o++, e.consume(m), c) : o < 3 ? n(m) : (e.exit("codeFencedFenceSequence"), ae(m) ?
|
|
2583
|
+
return m === s ? (o++, e.consume(m), c) : o < 3 ? n(m) : (e.exit("codeFencedFenceSequence"), ae(m) ? ue(e, p, "whitespace")(m) : p(m));
|
|
2578
2584
|
}
|
|
2579
2585
|
function p(m) {
|
|
2580
2586
|
return m === null || V(m) ? (e.exit("codeFencedFence"), r.interrupt ? t(m) : e.check(Nu, h, T)(m)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
@@ -2582,7 +2588,7 @@ function ZE(e, t, n) {
|
|
|
2582
2588
|
}), g(m));
|
|
2583
2589
|
}
|
|
2584
2590
|
function g(m) {
|
|
2585
|
-
return m === null || V(m) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), p(m)) : ae(m) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"),
|
|
2591
|
+
return m === null || V(m) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), p(m)) : ae(m) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), ue(e, d, "whitespace")(m)) : m === 96 && m === s ? n(m) : (e.consume(m), g);
|
|
2586
2592
|
}
|
|
2587
2593
|
function d(m) {
|
|
2588
2594
|
return m === null || V(m) ? p(m) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
|
|
@@ -2599,7 +2605,7 @@ function ZE(e, t, n) {
|
|
|
2599
2605
|
return e.enter("lineEnding"), e.consume(m), e.exit("lineEnding"), R;
|
|
2600
2606
|
}
|
|
2601
2607
|
function R(m) {
|
|
2602
|
-
return i > 0 && ae(m) ?
|
|
2608
|
+
return i > 0 && ae(m) ? ue(e, S, "linePrefix", i + 1)(m) : S(m);
|
|
2603
2609
|
}
|
|
2604
2610
|
function S(m) {
|
|
2605
2611
|
return m === null || V(m) ? e.check(Nu, h, T)(m) : (e.enter("codeFlowValue"), E(m));
|
|
@@ -2617,13 +2623,13 @@ function ZE(e, t, n) {
|
|
|
2617
2623
|
return m.enter("lineEnding"), m.consume(P), m.exit("lineEnding"), N;
|
|
2618
2624
|
}
|
|
2619
2625
|
function N(P) {
|
|
2620
|
-
return m.enter("codeFencedFence"), ae(P) ?
|
|
2626
|
+
return m.enter("codeFencedFence"), ae(P) ? ue(m, D, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(P) : D(P);
|
|
2621
2627
|
}
|
|
2622
2628
|
function D(P) {
|
|
2623
2629
|
return P === s ? (m.enter("codeFencedFenceSequence"), $(P)) : x(P);
|
|
2624
2630
|
}
|
|
2625
2631
|
function $(P) {
|
|
2626
|
-
return P === s ? (_++, m.consume(P), $) : _ >= o ? (m.exit("codeFencedFenceSequence"), ae(P) ?
|
|
2632
|
+
return P === s ? (_++, m.consume(P), $) : _ >= o ? (m.exit("codeFencedFenceSequence"), ae(P) ? ue(m, G, "whitespace")(P) : G(P)) : x(P);
|
|
2627
2633
|
}
|
|
2628
2634
|
function G(P) {
|
|
2629
2635
|
return P === null || V(P) ? (m.exit("codeFencedFence"), I(P)) : x(P);
|
|
@@ -2651,7 +2657,7 @@ function ey(e, t, n) {
|
|
|
2651
2657
|
const r = this;
|
|
2652
2658
|
return a;
|
|
2653
2659
|
function a(u) {
|
|
2654
|
-
return e.enter("codeIndented"),
|
|
2660
|
+
return e.enter("codeIndented"), ue(e, i, "linePrefix", 5)(u);
|
|
2655
2661
|
}
|
|
2656
2662
|
function i(u) {
|
|
2657
2663
|
const c = r.events[r.events.length - 1];
|
|
@@ -2671,7 +2677,7 @@ function ty(e, t, n) {
|
|
|
2671
2677
|
const r = this;
|
|
2672
2678
|
return a;
|
|
2673
2679
|
function a(o) {
|
|
2674
|
-
return r.parser.lazy[r.now().line] ? n(o) : V(o) ? (e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), a) :
|
|
2680
|
+
return r.parser.lazy[r.now().line] ? n(o) : V(o) ? (e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), a) : ue(e, i, "linePrefix", 5)(o);
|
|
2675
2681
|
}
|
|
2676
2682
|
function i(o) {
|
|
2677
2683
|
const s = r.events[r.events.length - 1];
|
|
@@ -2799,7 +2805,7 @@ class oy {
|
|
|
2799
2805
|
const a = n || 0;
|
|
2800
2806
|
this.setCursor(Math.trunc(t));
|
|
2801
2807
|
const i = this.right.splice(this.right.length - a, Number.POSITIVE_INFINITY);
|
|
2802
|
-
return r &&
|
|
2808
|
+
return r && _t(this.left, r), i.reverse();
|
|
2803
2809
|
}
|
|
2804
2810
|
/**
|
|
2805
2811
|
* Remove and return the highest-numbered item in the array, so
|
|
@@ -2834,7 +2840,7 @@ class oy {
|
|
|
2834
2840
|
* Nothing.
|
|
2835
2841
|
*/
|
|
2836
2842
|
pushMany(t) {
|
|
2837
|
-
this.setCursor(Number.POSITIVE_INFINITY),
|
|
2843
|
+
this.setCursor(Number.POSITIVE_INFINITY), _t(this.left, t);
|
|
2838
2844
|
}
|
|
2839
2845
|
/**
|
|
2840
2846
|
* Inserts a single item to the low-numbered side of the array;
|
|
@@ -2858,7 +2864,7 @@ class oy {
|
|
|
2858
2864
|
* Nothing.
|
|
2859
2865
|
*/
|
|
2860
2866
|
unshiftMany(t) {
|
|
2861
|
-
this.setCursor(0),
|
|
2867
|
+
this.setCursor(0), _t(this.right, t.reverse());
|
|
2862
2868
|
}
|
|
2863
2869
|
/**
|
|
2864
2870
|
* Move the cursor to a specific position in the array. Requires
|
|
@@ -2876,14 +2882,14 @@ class oy {
|
|
|
2876
2882
|
if (!(t === this.left.length || t > this.left.length && this.right.length === 0 || t < 0 && this.left.length === 0))
|
|
2877
2883
|
if (t < this.left.length) {
|
|
2878
2884
|
const n = this.left.splice(t, Number.POSITIVE_INFINITY);
|
|
2879
|
-
|
|
2885
|
+
_t(this.right, n.reverse());
|
|
2880
2886
|
} else {
|
|
2881
2887
|
const n = this.right.splice(this.left.length + this.right.length - t, Number.POSITIVE_INFINITY);
|
|
2882
|
-
|
|
2888
|
+
_t(this.left, n.reverse());
|
|
2883
2889
|
}
|
|
2884
2890
|
}
|
|
2885
2891
|
}
|
|
2886
|
-
function
|
|
2892
|
+
function _t(e, t) {
|
|
2887
2893
|
let n = 0;
|
|
2888
2894
|
if (t.length < 1e4)
|
|
2889
2895
|
e.push(...t);
|
|
@@ -2975,7 +2981,7 @@ function py(e, t, n) {
|
|
|
2975
2981
|
const r = this;
|
|
2976
2982
|
return a;
|
|
2977
2983
|
function a(o) {
|
|
2978
|
-
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"),
|
|
2984
|
+
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), ue(e, i, "linePrefix");
|
|
2979
2985
|
}
|
|
2980
2986
|
function i(o) {
|
|
2981
2987
|
if (o === null || V(o))
|
|
@@ -3045,7 +3051,7 @@ function th(e, t, n, r, a, i) {
|
|
|
3045
3051
|
return g === o ? (e.enter(a), e.consume(g), e.exit(a), e.exit(r), t) : (e.enter(i), u(g));
|
|
3046
3052
|
}
|
|
3047
3053
|
function u(g) {
|
|
3048
|
-
return g === o ? (e.exit(i), l(o)) : g === null ? n(g) : V(g) ? (e.enter("lineEnding"), e.consume(g), e.exit("lineEnding"),
|
|
3054
|
+
return g === o ? (e.exit(i), l(o)) : g === null ? n(g) : V(g) ? (e.enter("lineEnding"), e.consume(g), e.exit("lineEnding"), ue(e, u, "linePrefix")) : (e.enter("chunkString", {
|
|
3049
3055
|
contentType: "string"
|
|
3050
3056
|
}), c(g));
|
|
3051
3057
|
}
|
|
@@ -3056,11 +3062,11 @@ function th(e, t, n, r, a, i) {
|
|
|
3056
3062
|
return g === o || g === 92 ? (e.consume(g), c) : c(g);
|
|
3057
3063
|
}
|
|
3058
3064
|
}
|
|
3059
|
-
function
|
|
3065
|
+
function Dt(e, t) {
|
|
3060
3066
|
let n;
|
|
3061
3067
|
return r;
|
|
3062
3068
|
function r(a) {
|
|
3063
|
-
return V(a) ? (e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), n = !0, r) : ae(a) ?
|
|
3069
|
+
return V(a) ? (e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), n = !0, r) : ae(a) ? ue(e, r, n ? "linePrefix" : "lineSuffix")(a) : t(a);
|
|
3064
3070
|
}
|
|
3065
3071
|
}
|
|
3066
3072
|
const gy = {
|
|
@@ -3093,7 +3099,7 @@ function my(e, t, n) {
|
|
|
3093
3099
|
return a = Et(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1)), d === 58 ? (e.enter("definitionMarker"), e.consume(d), e.exit("definitionMarker"), l) : n(d);
|
|
3094
3100
|
}
|
|
3095
3101
|
function l(d) {
|
|
3096
|
-
return ke(d) ?
|
|
3102
|
+
return ke(d) ? Dt(e, u)(d) : u(d);
|
|
3097
3103
|
}
|
|
3098
3104
|
function u(d) {
|
|
3099
3105
|
return Jm(
|
|
@@ -3112,7 +3118,7 @@ function my(e, t, n) {
|
|
|
3112
3118
|
return e.attempt(fy, p, p)(d);
|
|
3113
3119
|
}
|
|
3114
3120
|
function p(d) {
|
|
3115
|
-
return ae(d) ?
|
|
3121
|
+
return ae(d) ? ue(e, g, "whitespace")(d) : g(d);
|
|
3116
3122
|
}
|
|
3117
3123
|
function g(d) {
|
|
3118
3124
|
return d === null || V(d) ? (e.exit("definition"), r.parser.defined.push(a), t(d)) : n(d);
|
|
@@ -3121,13 +3127,13 @@ function my(e, t, n) {
|
|
|
3121
3127
|
function hy(e, t, n) {
|
|
3122
3128
|
return r;
|
|
3123
3129
|
function r(s) {
|
|
3124
|
-
return ke(s) ?
|
|
3130
|
+
return ke(s) ? Dt(e, a)(s) : n(s);
|
|
3125
3131
|
}
|
|
3126
3132
|
function a(s) {
|
|
3127
3133
|
return th(e, i, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(s);
|
|
3128
3134
|
}
|
|
3129
3135
|
function i(s) {
|
|
3130
|
-
return ae(s) ?
|
|
3136
|
+
return ae(s) ? ue(e, o, "whitespace")(s) : o(s);
|
|
3131
3137
|
}
|
|
3132
3138
|
function o(s) {
|
|
3133
3139
|
return s === null || V(s) ? t(s) : n(s);
|
|
@@ -3177,7 +3183,7 @@ function vy(e, t, n) {
|
|
|
3177
3183
|
return c === 35 && r++ < 6 ? (e.consume(c), o) : c === null || ke(c) ? (e.exit("atxHeadingSequence"), s(c)) : n(c);
|
|
3178
3184
|
}
|
|
3179
3185
|
function s(c) {
|
|
3180
|
-
return c === 35 ? (e.enter("atxHeadingSequence"), l(c)) : c === null || V(c) ? (e.exit("atxHeading"), t(c)) : ae(c) ?
|
|
3186
|
+
return c === 35 ? (e.enter("atxHeadingSequence"), l(c)) : c === null || V(c) ? (e.exit("atxHeading"), t(c)) : ae(c) ? ue(e, s, "whitespace")(c) : (e.enter("atxHeadingText"), u(c));
|
|
3181
3187
|
}
|
|
3182
3188
|
function l(c) {
|
|
3183
3189
|
return c === 35 ? (e.consume(c), l) : (e.exit("atxHeadingSequence"), s(c));
|
|
@@ -3478,7 +3484,7 @@ function xy(e, t, n) {
|
|
|
3478
3484
|
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(y), e.exit("lineEnding"), B;
|
|
3479
3485
|
}
|
|
3480
3486
|
function B(y) {
|
|
3481
|
-
return ae(y) ?
|
|
3487
|
+
return ae(y) ? ue(e, X, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(y) : X(y);
|
|
3482
3488
|
}
|
|
3483
3489
|
function X(y) {
|
|
3484
3490
|
return e.enter("htmlTextData"), o(y);
|
|
@@ -3582,13 +3588,13 @@ function Uy(e, t, n) {
|
|
|
3582
3588
|
return e.enter("resource"), e.enter("resourceMarker"), e.consume(p), e.exit("resourceMarker"), a;
|
|
3583
3589
|
}
|
|
3584
3590
|
function a(p) {
|
|
3585
|
-
return ke(p) ?
|
|
3591
|
+
return ke(p) ? Dt(e, i)(p) : i(p);
|
|
3586
3592
|
}
|
|
3587
3593
|
function i(p) {
|
|
3588
3594
|
return p === 41 ? c(p) : Jm(e, o, s, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(p);
|
|
3589
3595
|
}
|
|
3590
3596
|
function o(p) {
|
|
3591
|
-
return ke(p) ?
|
|
3597
|
+
return ke(p) ? Dt(e, l)(p) : c(p);
|
|
3592
3598
|
}
|
|
3593
3599
|
function s(p) {
|
|
3594
3600
|
return n(p);
|
|
@@ -3597,7 +3603,7 @@ function Uy(e, t, n) {
|
|
|
3597
3603
|
return p === 34 || p === 39 || p === 40 ? th(e, u, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(p) : c(p);
|
|
3598
3604
|
}
|
|
3599
3605
|
function u(p) {
|
|
3600
|
-
return ke(p) ?
|
|
3606
|
+
return ke(p) ? Dt(e, c)(p) : c(p);
|
|
3601
3607
|
}
|
|
3602
3608
|
function c(p) {
|
|
3603
3609
|
return p === 41 ? (e.enter("resourceMarker"), e.consume(p), e.exit("resourceMarker"), e.exit("resource"), t) : n(p);
|
|
@@ -3665,7 +3671,7 @@ const Cn = {
|
|
|
3665
3671
|
function Vy(e, t) {
|
|
3666
3672
|
return n;
|
|
3667
3673
|
function n(r) {
|
|
3668
|
-
return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"),
|
|
3674
|
+
return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), ue(e, t, "linePrefix");
|
|
3669
3675
|
}
|
|
3670
3676
|
}
|
|
3671
3677
|
const sn = {
|
|
@@ -3685,7 +3691,7 @@ function jy(e, t, n) {
|
|
|
3685
3691
|
return u === a ? (e.enter("thematicBreakSequence"), l(u)) : r >= 3 && (u === null || V(u)) ? (e.exit("thematicBreak"), t(u)) : n(u);
|
|
3686
3692
|
}
|
|
3687
3693
|
function l(u) {
|
|
3688
|
-
return u === a ? (e.consume(u), r++, l) : (e.exit("thematicBreakSequence"), ae(u) ?
|
|
3694
|
+
return u === a ? (e.consume(u), r++, l) : (e.exit("thematicBreakSequence"), ae(u) ? ue(e, s, "whitespace")(u) : s(u));
|
|
3689
3695
|
}
|
|
3690
3696
|
}
|
|
3691
3697
|
const Ae = {
|
|
@@ -3743,18 +3749,18 @@ function Xy(e, t, n) {
|
|
|
3743
3749
|
const r = this;
|
|
3744
3750
|
return r.containerState._closeFlow = void 0, e.check(fn, a, i);
|
|
3745
3751
|
function a(s) {
|
|
3746
|
-
return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine,
|
|
3752
|
+
return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, ue(e, t, "listItemIndent", r.containerState.size + 1)(s);
|
|
3747
3753
|
}
|
|
3748
3754
|
function i(s) {
|
|
3749
3755
|
return r.containerState.furtherBlankLines || !ae(s) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, o(s)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(Yy, t, o)(s));
|
|
3750
3756
|
}
|
|
3751
3757
|
function o(s) {
|
|
3752
|
-
return r.containerState._closeFlow = !0, r.interrupt = void 0,
|
|
3758
|
+
return r.containerState._closeFlow = !0, r.interrupt = void 0, ue(e, e.attempt(Ae, t, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(s);
|
|
3753
3759
|
}
|
|
3754
3760
|
}
|
|
3755
3761
|
function Zy(e, t, n) {
|
|
3756
3762
|
const r = this;
|
|
3757
|
-
return
|
|
3763
|
+
return ue(e, a, "listItemIndent", r.containerState.size + 1);
|
|
3758
3764
|
function a(i) {
|
|
3759
3765
|
const o = r.events[r.events.length - 1];
|
|
3760
3766
|
return o && o[1].type === "listItemIndent" && o[2].sliceSerialize(o[1], !0).length === r.containerState.size ? t(i) : n(i);
|
|
@@ -3765,7 +3771,7 @@ function Qy(e) {
|
|
|
3765
3771
|
}
|
|
3766
3772
|
function Jy(e, t, n) {
|
|
3767
3773
|
const r = this;
|
|
3768
|
-
return
|
|
3774
|
+
return ue(e, a, "listItemPrefixWhitespace", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
|
|
3769
3775
|
function a(i) {
|
|
3770
3776
|
const o = r.events[r.events.length - 1];
|
|
3771
3777
|
return !ae(i) && o && o[1].type === "listItemPrefixWhitespace" ? t(i) : n(i);
|
|
@@ -3817,7 +3823,7 @@ function tS(e, t, n) {
|
|
|
3817
3823
|
return e.enter("setextHeadingLineSequence"), s(u);
|
|
3818
3824
|
}
|
|
3819
3825
|
function s(u) {
|
|
3820
|
-
return u === a ? (e.consume(u), s) : (e.exit("setextHeadingLineSequence"), ae(u) ?
|
|
3826
|
+
return u === a ? (e.consume(u), s) : (e.exit("setextHeadingLineSequence"), ae(u) ? ue(e, l, "lineSuffix")(u) : l(u));
|
|
3821
3827
|
}
|
|
3822
3828
|
function l(u) {
|
|
3823
3829
|
return u === null || V(u) ? (e.exit("setextHeadingLine"), t(u)) : n(u);
|
|
@@ -3832,7 +3838,7 @@ function rS(e) {
|
|
|
3832
3838
|
fn,
|
|
3833
3839
|
r,
|
|
3834
3840
|
// Try to parse initial flow (essentially, only code).
|
|
3835
|
-
e.attempt(this.parser.constructs.flowInitial, a,
|
|
3841
|
+
e.attempt(this.parser.constructs.flowInitial, a, ue(e, e.attempt(this.parser.constructs.flow, a, e.attempt(ly, a)), "linePrefix"))
|
|
3836
3842
|
);
|
|
3837
3843
|
return n;
|
|
3838
3844
|
function r(i) {
|
|
@@ -4115,14 +4121,14 @@ function ES(e, t, n) {
|
|
|
4115
4121
|
) : U(G);
|
|
4116
4122
|
function U(re) {
|
|
4117
4123
|
return me;
|
|
4118
|
-
function me(
|
|
4119
|
-
const be =
|
|
4124
|
+
function me(pe) {
|
|
4125
|
+
const be = pe !== null && re[pe], ve = pe !== null && re.null, we = [
|
|
4120
4126
|
// To do: add more extension tests.
|
|
4121
4127
|
/* c8 ignore next 2 */
|
|
4122
4128
|
...Array.isArray(be) ? be : be ? [be] : [],
|
|
4123
4129
|
...Array.isArray(ve) ? ve : ve ? [ve] : []
|
|
4124
4130
|
];
|
|
4125
|
-
return Y(we)(
|
|
4131
|
+
return Y(we)(pe);
|
|
4126
4132
|
}
|
|
4127
4133
|
}
|
|
4128
4134
|
function Y(re) {
|
|
@@ -4130,7 +4136,7 @@ function ES(e, t, n) {
|
|
|
4130
4136
|
}
|
|
4131
4137
|
function v(re) {
|
|
4132
4138
|
return me;
|
|
4133
|
-
function me(
|
|
4139
|
+
function me(pe) {
|
|
4134
4140
|
return y = _(), X = re, re.partial || (u.currentConstruct = re), re.name && u.parser.constructs.disable.null.includes(re.name) ? oe() : re.tokenize.call(
|
|
4135
4141
|
// If we do have fields, create an object w/ `context` as its
|
|
4136
4142
|
// prototype.
|
|
@@ -4139,7 +4145,7 @@ function ES(e, t, n) {
|
|
|
4139
4145
|
l,
|
|
4140
4146
|
ne,
|
|
4141
4147
|
oe
|
|
4142
|
-
)(
|
|
4148
|
+
)(pe);
|
|
4143
4149
|
}
|
|
4144
4150
|
}
|
|
4145
4151
|
function ne(re) {
|
|
@@ -4309,7 +4315,7 @@ function IS(e) {
|
|
|
4309
4315
|
autolink: i(Rt),
|
|
4310
4316
|
autolinkProtocol: _,
|
|
4311
4317
|
autolinkEmail: _,
|
|
4312
|
-
atxHeading: i(
|
|
4318
|
+
atxHeading: i(zt),
|
|
4313
4319
|
blockQuote: i(ve),
|
|
4314
4320
|
characterEscape: _,
|
|
4315
4321
|
characterReference: _,
|
|
@@ -4326,16 +4332,16 @@ function IS(e) {
|
|
|
4326
4332
|
definitionLabelString: o,
|
|
4327
4333
|
definitionTitleString: o,
|
|
4328
4334
|
emphasis: i(dt),
|
|
4329
|
-
hardBreakEscape: i(
|
|
4330
|
-
hardBreakTrailing: i(
|
|
4331
|
-
htmlFlow: i(
|
|
4335
|
+
hardBreakEscape: i(Ht),
|
|
4336
|
+
hardBreakTrailing: i(Ht),
|
|
4337
|
+
htmlFlow: i(Vt, o),
|
|
4332
4338
|
htmlFlowData: _,
|
|
4333
|
-
htmlText: i(
|
|
4339
|
+
htmlText: i(Vt, o),
|
|
4334
4340
|
htmlTextData: _,
|
|
4335
4341
|
image: i(wn),
|
|
4336
4342
|
label: o,
|
|
4337
4343
|
link: i(Rt),
|
|
4338
|
-
listItem: i(
|
|
4344
|
+
listItem: i(jt),
|
|
4339
4345
|
listItemValue: g,
|
|
4340
4346
|
listOrdered: i(wt, p),
|
|
4341
4347
|
listUnordered: i(wt),
|
|
@@ -4344,16 +4350,16 @@ function IS(e) {
|
|
|
4344
4350
|
referenceString: o,
|
|
4345
4351
|
resourceDestinationString: o,
|
|
4346
4352
|
resourceTitleString: o,
|
|
4347
|
-
setextHeading: i(
|
|
4348
|
-
strong: i(
|
|
4349
|
-
thematicBreak: i(
|
|
4353
|
+
setextHeading: i(zt),
|
|
4354
|
+
strong: i(Wt),
|
|
4355
|
+
thematicBreak: i(Yt)
|
|
4350
4356
|
},
|
|
4351
4357
|
exit: {
|
|
4352
4358
|
atxHeading: l(),
|
|
4353
4359
|
atxHeadingSequence: w,
|
|
4354
4360
|
autolink: l(),
|
|
4355
4361
|
autolinkEmail: be,
|
|
4356
|
-
autolinkProtocol:
|
|
4362
|
+
autolinkProtocol: pe,
|
|
4357
4363
|
blockQuote: l(),
|
|
4358
4364
|
characterEscapeValue: L,
|
|
4359
4365
|
characterReferenceMarkerHexadecimal: oe,
|
|
@@ -4478,25 +4484,25 @@ function IS(e) {
|
|
|
4478
4484
|
}
|
|
4479
4485
|
if (!ie && Q[0] === "enter" && Q[1].type === "listItemPrefix" || ie === -1 && Q[0] === "exit" && (Q[1].type === "listUnordered" || Q[1].type === "listOrdered")) {
|
|
4480
4486
|
if (Fe) {
|
|
4481
|
-
let
|
|
4482
|
-
for (Ge = void 0;
|
|
4483
|
-
const Ee = C[
|
|
4487
|
+
let ce = te;
|
|
4488
|
+
for (Ge = void 0; ce--; ) {
|
|
4489
|
+
const Ee = C[ce];
|
|
4484
4490
|
if (Ee[1].type === "lineEnding" || Ee[1].type === "lineEndingBlank") {
|
|
4485
4491
|
if (Ee[0] === "exit") continue;
|
|
4486
|
-
Ge && (C[Ge][1].type = "lineEndingBlank", xe = !0), Ee[1].type = "lineEnding", Ge =
|
|
4492
|
+
Ge && (C[Ge][1].type = "lineEndingBlank", xe = !0), Ee[1].type = "lineEnding", Ge = ce;
|
|
4487
4493
|
} else if (!(Ee[1].type === "linePrefix" || Ee[1].type === "blockQuotePrefix" || Ee[1].type === "blockQuotePrefixWhitespace" || Ee[1].type === "blockQuoteMarker" || Ee[1].type === "listItemIndent")) break;
|
|
4488
4494
|
}
|
|
4489
4495
|
F && (!Ge || F < Ge) && (Fe._spread = !0), Fe.end = Object.assign({}, Ge ? C[Ge][1].start : Q[1].end), C.splice(Ge || te, 0, ["exit", Fe, Q[2]]), te++, W++;
|
|
4490
4496
|
}
|
|
4491
4497
|
if (Q[1].type === "listItemPrefix") {
|
|
4492
|
-
const
|
|
4498
|
+
const ce = {
|
|
4493
4499
|
type: "listItem",
|
|
4494
4500
|
_spread: !1,
|
|
4495
4501
|
start: Object.assign({}, Q[1].start),
|
|
4496
4502
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
4497
4503
|
end: void 0
|
|
4498
4504
|
};
|
|
4499
|
-
Fe =
|
|
4505
|
+
Fe = ce, C.splice(te, 0, ["enter", ce, Q[2]]), te++, W++, F = void 0, K = !0;
|
|
4500
4506
|
}
|
|
4501
4507
|
}
|
|
4502
4508
|
}
|
|
@@ -4531,7 +4537,7 @@ function IS(e) {
|
|
|
4531
4537
|
const W = this.stack.pop(), te = this.tokenStack.pop();
|
|
4532
4538
|
if (te)
|
|
4533
4539
|
te[0].type !== C.type && (M ? M.call(this, C, te[0]) : (te[1] || Mu).call(this, C, te[0]));
|
|
4534
|
-
else throw new Error("Cannot close `" + C.type + "` (" +
|
|
4540
|
+
else throw new Error("Cannot close `" + C.type + "` (" + Lt({
|
|
4535
4541
|
start: C.start,
|
|
4536
4542
|
end: C.end
|
|
4537
4543
|
}) + "): it’s not open");
|
|
@@ -4696,7 +4702,7 @@ function IS(e) {
|
|
|
4696
4702
|
const M = this.stack.pop();
|
|
4697
4703
|
M.position.end = Je(C.end);
|
|
4698
4704
|
}
|
|
4699
|
-
function
|
|
4705
|
+
function pe(C) {
|
|
4700
4706
|
L.call(this, C);
|
|
4701
4707
|
const M = this.stack[this.stack.length - 1];
|
|
4702
4708
|
M.url = this.sliceSerialize(C);
|
|
@@ -4741,7 +4747,7 @@ function IS(e) {
|
|
|
4741
4747
|
children: []
|
|
4742
4748
|
};
|
|
4743
4749
|
}
|
|
4744
|
-
function
|
|
4750
|
+
function zt() {
|
|
4745
4751
|
return {
|
|
4746
4752
|
type: "heading",
|
|
4747
4753
|
// @ts-expect-error `depth` will be set later.
|
|
@@ -4749,12 +4755,12 @@ function IS(e) {
|
|
|
4749
4755
|
children: []
|
|
4750
4756
|
};
|
|
4751
4757
|
}
|
|
4752
|
-
function
|
|
4758
|
+
function Ht() {
|
|
4753
4759
|
return {
|
|
4754
4760
|
type: "break"
|
|
4755
4761
|
};
|
|
4756
4762
|
}
|
|
4757
|
-
function
|
|
4763
|
+
function Vt() {
|
|
4758
4764
|
return {
|
|
4759
4765
|
type: "html",
|
|
4760
4766
|
value: ""
|
|
@@ -4785,7 +4791,7 @@ function IS(e) {
|
|
|
4785
4791
|
children: []
|
|
4786
4792
|
};
|
|
4787
4793
|
}
|
|
4788
|
-
function
|
|
4794
|
+
function jt(C) {
|
|
4789
4795
|
return {
|
|
4790
4796
|
type: "listItem",
|
|
4791
4797
|
spread: C._spread,
|
|
@@ -4799,7 +4805,7 @@ function IS(e) {
|
|
|
4799
4805
|
children: []
|
|
4800
4806
|
};
|
|
4801
4807
|
}
|
|
4802
|
-
function
|
|
4808
|
+
function Wt() {
|
|
4803
4809
|
return {
|
|
4804
4810
|
type: "strong",
|
|
4805
4811
|
children: []
|
|
@@ -4811,7 +4817,7 @@ function IS(e) {
|
|
|
4811
4817
|
value: ""
|
|
4812
4818
|
};
|
|
4813
4819
|
}
|
|
4814
|
-
function
|
|
4820
|
+
function Yt() {
|
|
4815
4821
|
return {
|
|
4816
4822
|
type: "thematicBreak"
|
|
4817
4823
|
};
|
|
@@ -4855,13 +4861,13 @@ function CS(e, t) {
|
|
|
4855
4861
|
}
|
|
4856
4862
|
}
|
|
4857
4863
|
function Mu(e, t) {
|
|
4858
|
-
throw e ? new Error("Cannot close `" + e.type + "` (" +
|
|
4864
|
+
throw e ? new Error("Cannot close `" + e.type + "` (" + Lt({
|
|
4859
4865
|
start: e.start,
|
|
4860
4866
|
end: e.end
|
|
4861
|
-
}) + "): a different token (`" + t.type + "`, " +
|
|
4867
|
+
}) + "): a different token (`" + t.type + "`, " + Lt({
|
|
4862
4868
|
start: t.start,
|
|
4863
4869
|
end: t.end
|
|
4864
|
-
}) + ") is open") : new Error("Cannot close document, a token (`" + t.type + "`, " +
|
|
4870
|
+
}) + ") is open") : new Error("Cannot close document, a token (`" + t.type + "`, " + Lt({
|
|
4865
4871
|
start: t.start,
|
|
4866
4872
|
end: t.end
|
|
4867
4873
|
}) + ") is still open");
|
|
@@ -5231,7 +5237,7 @@ const nv = {
|
|
|
5231
5237
|
};
|
|
5232
5238
|
function Zt() {
|
|
5233
5239
|
}
|
|
5234
|
-
const lh = -1, mn = 0,
|
|
5240
|
+
const lh = -1, mn = 0, Mt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, ch = 8, Bu = typeof self == "object" ? self : globalThis, rv = (e, t) => {
|
|
5235
5241
|
const n = (a, i) => (e.set(i, a), a), r = (a) => {
|
|
5236
5242
|
if (e.has(a))
|
|
5237
5243
|
return e.get(a);
|
|
@@ -5240,7 +5246,7 @@ const lh = -1, mn = 0, Dt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, c
|
|
|
5240
5246
|
case mn:
|
|
5241
5247
|
case lh:
|
|
5242
5248
|
return n(o, a);
|
|
5243
|
-
case
|
|
5249
|
+
case Mt: {
|
|
5244
5250
|
const s = n([], a);
|
|
5245
5251
|
for (const l of o)
|
|
5246
5252
|
s.push(r(l));
|
|
@@ -5288,14 +5294,14 @@ const lh = -1, mn = 0, Dt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, c
|
|
|
5288
5294
|
return n(new Bu[i](o), a);
|
|
5289
5295
|
};
|
|
5290
5296
|
return r;
|
|
5291
|
-
}, $u = (e) => rv(/* @__PURE__ */ new Map(), e)(0), pt = "", { toString: av } = {}, { keys: iv } = Object,
|
|
5297
|
+
}, $u = (e) => rv(/* @__PURE__ */ new Map(), e)(0), pt = "", { toString: av } = {}, { keys: iv } = Object, kt = (e) => {
|
|
5292
5298
|
const t = typeof e;
|
|
5293
5299
|
if (t !== "object" || !e)
|
|
5294
5300
|
return [mn, t];
|
|
5295
5301
|
const n = av.call(e).slice(8, -1);
|
|
5296
5302
|
switch (n) {
|
|
5297
5303
|
case "Array":
|
|
5298
|
-
return [
|
|
5304
|
+
return [Mt, pt];
|
|
5299
5305
|
case "Object":
|
|
5300
5306
|
return [cn, pt];
|
|
5301
5307
|
case "Date":
|
|
@@ -5307,9 +5313,9 @@ const lh = -1, mn = 0, Dt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, c
|
|
|
5307
5313
|
case "Set":
|
|
5308
5314
|
return [Pl, pt];
|
|
5309
5315
|
case "DataView":
|
|
5310
|
-
return [
|
|
5316
|
+
return [Mt, n];
|
|
5311
5317
|
}
|
|
5312
|
-
return n.includes("Array") ? [
|
|
5318
|
+
return n.includes("Array") ? [Mt, n] : n.includes("Error") ? [uh, n] : [cn, n];
|
|
5313
5319
|
}, Qt = ([e, t]) => e === mn && (t === "function" || t === "symbol"), ov = (e, t, n, r) => {
|
|
5314
5320
|
const a = (o, s) => {
|
|
5315
5321
|
const l = r.push(o) - 1;
|
|
@@ -5317,7 +5323,7 @@ const lh = -1, mn = 0, Dt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, c
|
|
|
5317
5323
|
}, i = (o) => {
|
|
5318
5324
|
if (n.has(o))
|
|
5319
5325
|
return n.get(o);
|
|
5320
|
-
let [s, l] =
|
|
5326
|
+
let [s, l] = kt(o);
|
|
5321
5327
|
switch (s) {
|
|
5322
5328
|
case mn: {
|
|
5323
5329
|
let c = o;
|
|
@@ -5336,7 +5342,7 @@ const lh = -1, mn = 0, Dt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, c
|
|
|
5336
5342
|
}
|
|
5337
5343
|
return a([s, c], o);
|
|
5338
5344
|
}
|
|
5339
|
-
case
|
|
5345
|
+
case Mt: {
|
|
5340
5346
|
if (l) {
|
|
5341
5347
|
let g = o;
|
|
5342
5348
|
return l === "DataView" ? g = new Uint8Array(o.buffer) : l === "ArrayBuffer" && (g = new Uint8Array(o)), a([l, [...g]], o);
|
|
@@ -5360,7 +5366,7 @@ const lh = -1, mn = 0, Dt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, c
|
|
|
5360
5366
|
return i(o.toJSON());
|
|
5361
5367
|
const c = [], p = a([s, c], o);
|
|
5362
5368
|
for (const g of iv(o))
|
|
5363
|
-
(e || !Qt(
|
|
5369
|
+
(e || !Qt(kt(o[g]))) && c.push([i(g), i(o[g])]);
|
|
5364
5370
|
return p;
|
|
5365
5371
|
}
|
|
5366
5372
|
case Dl:
|
|
@@ -5372,13 +5378,13 @@ const lh = -1, mn = 0, Dt = 1, cn = 2, Dl = 3, Ml = 4, Fl = 5, Pl = 6, uh = 7, c
|
|
|
5372
5378
|
case Fl: {
|
|
5373
5379
|
const c = [], p = a([s, c], o);
|
|
5374
5380
|
for (const [g, d] of o)
|
|
5375
|
-
(e || !(Qt(
|
|
5381
|
+
(e || !(Qt(kt(g)) || Qt(kt(d)))) && c.push([i(g), i(d)]);
|
|
5376
5382
|
return p;
|
|
5377
5383
|
}
|
|
5378
5384
|
case Pl: {
|
|
5379
5385
|
const c = [], p = a([s, c], o);
|
|
5380
5386
|
for (const g of o)
|
|
5381
|
-
(e || !Qt(
|
|
5387
|
+
(e || !Qt(kt(g))) && c.push(i(g));
|
|
5382
5388
|
return p;
|
|
5383
5389
|
}
|
|
5384
5390
|
}
|
|
@@ -5840,7 +5846,7 @@ const qe = { basename: Cv, dirname: Nv, extname: xv, join: Ov, sep: "/" };
|
|
|
5840
5846
|
function Cv(e, t) {
|
|
5841
5847
|
if (t !== void 0 && typeof t != "string")
|
|
5842
5848
|
throw new TypeError('"ext" argument must be a string');
|
|
5843
|
-
|
|
5849
|
+
$t(e);
|
|
5844
5850
|
let n = 0, r = -1, a = e.length, i;
|
|
5845
5851
|
if (t === void 0 || t.length === 0 || t.length > e.length) {
|
|
5846
5852
|
for (; a--; )
|
|
@@ -5866,7 +5872,7 @@ function Cv(e, t) {
|
|
|
5866
5872
|
return n === r ? r = o : r < 0 && (r = e.length), e.slice(n, r);
|
|
5867
5873
|
}
|
|
5868
5874
|
function Nv(e) {
|
|
5869
|
-
if (
|
|
5875
|
+
if ($t(e), e.length === 0)
|
|
5870
5876
|
return ".";
|
|
5871
5877
|
let t = -1, n = e.length, r;
|
|
5872
5878
|
for (; --n; )
|
|
@@ -5879,7 +5885,7 @@ function Nv(e) {
|
|
|
5879
5885
|
return t < 0 ? e.codePointAt(0) === 47 ? "/" : "." : t === 1 && e.codePointAt(0) === 47 ? "//" : e.slice(0, t);
|
|
5880
5886
|
}
|
|
5881
5887
|
function xv(e) {
|
|
5882
|
-
|
|
5888
|
+
$t(e);
|
|
5883
5889
|
let t = e.length, n = -1, r = 0, a = -1, i = 0, o;
|
|
5884
5890
|
for (; t--; ) {
|
|
5885
5891
|
const s = e.codePointAt(t);
|
|
@@ -5899,11 +5905,11 @@ function xv(e) {
|
|
|
5899
5905
|
function Ov(...e) {
|
|
5900
5906
|
let t = -1, n;
|
|
5901
5907
|
for (; ++t < e.length; )
|
|
5902
|
-
|
|
5908
|
+
$t(e[t]), e[t] && (n = n === void 0 ? e[t] : n + "/" + e[t]);
|
|
5903
5909
|
return n === void 0 ? "." : Lv(n);
|
|
5904
5910
|
}
|
|
5905
5911
|
function Lv(e) {
|
|
5906
|
-
|
|
5912
|
+
$t(e);
|
|
5907
5913
|
const t = e.codePointAt(0) === 47;
|
|
5908
5914
|
let n = Dv(e, !t);
|
|
5909
5915
|
return n.length === 0 && !t && (n = "."), n.length > 0 && e.codePointAt(e.length - 1) === 47 && (n += "/"), t ? "/" + n : n;
|
|
@@ -5939,7 +5945,7 @@ function Dv(e, t) {
|
|
|
5939
5945
|
}
|
|
5940
5946
|
return n;
|
|
5941
5947
|
}
|
|
5942
|
-
function
|
|
5948
|
+
function $t(e) {
|
|
5943
5949
|
if (typeof e != "string")
|
|
5944
5950
|
throw new TypeError(
|
|
5945
5951
|
"Path must be a string. Received " + JSON.stringify(e)
|
|
@@ -7067,27 +7073,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7067
7073
|
function dl(e) {
|
|
7068
7074
|
return tR(e) || nR(e) || rR(e) || aR();
|
|
7069
7075
|
}
|
|
7070
|
-
function
|
|
7076
|
+
function Ut(e) {
|
|
7071
7077
|
"@babel/helpers - typeof";
|
|
7072
|
-
return
|
|
7078
|
+
return Ut = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
7073
7079
|
return typeof t;
|
|
7074
7080
|
} : function(t) {
|
|
7075
7081
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
7076
|
-
},
|
|
7082
|
+
}, Ut(e);
|
|
7077
7083
|
}
|
|
7078
7084
|
function iR(e, t) {
|
|
7079
|
-
if (
|
|
7085
|
+
if (Ut(e) != "object" || !e) return e;
|
|
7080
7086
|
var n = e[Symbol.toPrimitive];
|
|
7081
7087
|
if (n !== void 0) {
|
|
7082
7088
|
var r = n.call(e, t);
|
|
7083
|
-
if (
|
|
7089
|
+
if (Ut(r) != "object") return r;
|
|
7084
7090
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7085
7091
|
}
|
|
7086
7092
|
return (t === "string" ? String : Number)(e);
|
|
7087
7093
|
}
|
|
7088
7094
|
function oR(e) {
|
|
7089
7095
|
var t = iR(e, "string");
|
|
7090
|
-
return
|
|
7096
|
+
return Ut(t) == "symbol" ? t : t + "";
|
|
7091
7097
|
}
|
|
7092
7098
|
function hh(e, t, n) {
|
|
7093
7099
|
return (t = oR(t)) in e ? Object.defineProperty(e, t, {
|
|
@@ -7456,14 +7462,14 @@ function vR(e, t) {
|
|
|
7456
7462
|
var me = [{
|
|
7457
7463
|
type: "text",
|
|
7458
7464
|
value: y
|
|
7459
|
-
}],
|
|
7465
|
+
}], pe = SR({
|
|
7460
7466
|
astGenerator: U,
|
|
7461
7467
|
language: o,
|
|
7462
7468
|
code: y,
|
|
7463
7469
|
defaultCodeValue: me
|
|
7464
7470
|
});
|
|
7465
|
-
|
|
7466
|
-
var be = (a = (i = y.match(/\n/g)) === null || i === void 0 ? void 0 : i.length) !== null && a !== void 0 ? a : 0, ve = w + be, we = ER(
|
|
7471
|
+
pe.language === null && (pe.value = me);
|
|
7472
|
+
var be = (a = (i = y.match(/\n/g)) === null || i === void 0 ? void 0 : i.length) !== null && a !== void 0 ? a : 0, ve = w + be, we = ER(pe, _, $, R, E, w, ve, x, N);
|
|
7467
7473
|
return /* @__PURE__ */ _e.createElement(j, re, /* @__PURE__ */ _e.createElement(B, d, !E && v, G({
|
|
7468
7474
|
rows: we,
|
|
7469
7475
|
stylesheet: u,
|
|
@@ -7549,7 +7555,7 @@ function Gl(e, t, n, r) {
|
|
|
7549
7555
|
function uc(e, t, n) {
|
|
7550
7556
|
n && (e[t] = n);
|
|
7551
7557
|
}
|
|
7552
|
-
var cc = $l, OR = Rh, LR = kh,
|
|
7558
|
+
var cc = $l, OR = Rh, LR = kh, Gt = DR;
|
|
7553
7559
|
function DR(e) {
|
|
7554
7560
|
var t = e.space, n = e.mustUseProperty || [], r = e.attributes || {}, a = e.properties, i = e.transform, o = {}, s = {}, l, u;
|
|
7555
7561
|
for (l in a)
|
|
@@ -7561,7 +7567,7 @@ function DR(e) {
|
|
|
7561
7567
|
), n.indexOf(l) !== -1 && (u.mustUseProperty = !0), o[l] = u, s[cc(l)] = l, s[cc(u.attribute)] = l;
|
|
7562
7568
|
return new OR(o, s, t);
|
|
7563
7569
|
}
|
|
7564
|
-
var MR =
|
|
7570
|
+
var MR = Gt, FR = MR({
|
|
7565
7571
|
space: "xlink",
|
|
7566
7572
|
transform: PR,
|
|
7567
7573
|
properties: {
|
|
@@ -7577,7 +7583,7 @@ var MR = $t, FR = MR({
|
|
|
7577
7583
|
function PR(e, t) {
|
|
7578
7584
|
return "xlink:" + t.slice(5).toLowerCase();
|
|
7579
7585
|
}
|
|
7580
|
-
var UR =
|
|
7586
|
+
var UR = Gt, BR = UR({
|
|
7581
7587
|
space: "xml",
|
|
7582
7588
|
transform: $R,
|
|
7583
7589
|
properties: {
|
|
@@ -7597,7 +7603,7 @@ var zR = GR, Ch = HR;
|
|
|
7597
7603
|
function HR(e, t) {
|
|
7598
7604
|
return zR(e, t.toLowerCase());
|
|
7599
7605
|
}
|
|
7600
|
-
var VR =
|
|
7606
|
+
var VR = Gt, jR = Ch, WR = VR({
|
|
7601
7607
|
space: "xmlns",
|
|
7602
7608
|
attributes: {
|
|
7603
7609
|
xmlnsxlink: "xmlns:xlink"
|
|
@@ -7607,7 +7613,7 @@ var VR = $t, jR = Ch, WR = VR({
|
|
|
7607
7613
|
xmlns: null,
|
|
7608
7614
|
xmlnsXLink: null
|
|
7609
7615
|
}
|
|
7610
|
-
}), ql = je, YR =
|
|
7616
|
+
}), ql = je, YR = Gt, Te = ql.booleanish, Pe = ql.number, ot = ql.spaceSeparated, KR = YR({
|
|
7611
7617
|
transform: XR,
|
|
7612
7618
|
properties: {
|
|
7613
7619
|
ariaActiveDescendant: null,
|
|
@@ -7664,7 +7670,7 @@ var VR = $t, jR = Ch, WR = VR({
|
|
|
7664
7670
|
function XR(e, t) {
|
|
7665
7671
|
return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
|
|
7666
7672
|
}
|
|
7667
|
-
var vt = je, ZR =
|
|
7673
|
+
var vt = je, ZR = Gt, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, It = vt.booleanish, de = vt.number, Re = vt.spaceSeparated, en = vt.commaSeparated, ew = ZR({
|
|
7668
7674
|
space: "html",
|
|
7669
7675
|
attributes: {
|
|
7670
7676
|
acceptcharset: "accept-charset",
|
|
@@ -7697,13 +7703,13 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7697
7703
|
checked: ee,
|
|
7698
7704
|
cite: null,
|
|
7699
7705
|
className: Re,
|
|
7700
|
-
cols:
|
|
7706
|
+
cols: de,
|
|
7701
7707
|
colSpan: null,
|
|
7702
7708
|
content: null,
|
|
7703
|
-
contentEditable:
|
|
7709
|
+
contentEditable: It,
|
|
7704
7710
|
controls: ee,
|
|
7705
7711
|
controlsList: Re,
|
|
7706
|
-
coords:
|
|
7712
|
+
coords: de | en,
|
|
7707
7713
|
crossOrigin: null,
|
|
7708
7714
|
data: null,
|
|
7709
7715
|
dateTime: null,
|
|
@@ -7714,7 +7720,7 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7714
7720
|
dirName: null,
|
|
7715
7721
|
disabled: ee,
|
|
7716
7722
|
download: JR,
|
|
7717
|
-
draggable:
|
|
7723
|
+
draggable: It,
|
|
7718
7724
|
encType: null,
|
|
7719
7725
|
enterKeyHint: null,
|
|
7720
7726
|
form: null,
|
|
@@ -7724,9 +7730,9 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7724
7730
|
formNoValidate: ee,
|
|
7725
7731
|
formTarget: null,
|
|
7726
7732
|
headers: Re,
|
|
7727
|
-
height:
|
|
7733
|
+
height: de,
|
|
7728
7734
|
hidden: ee,
|
|
7729
|
-
high:
|
|
7735
|
+
high: de,
|
|
7730
7736
|
href: null,
|
|
7731
7737
|
hrefLang: null,
|
|
7732
7738
|
htmlFor: Re,
|
|
@@ -7750,14 +7756,14 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7750
7756
|
list: null,
|
|
7751
7757
|
loading: null,
|
|
7752
7758
|
loop: ee,
|
|
7753
|
-
low:
|
|
7759
|
+
low: de,
|
|
7754
7760
|
manifest: null,
|
|
7755
7761
|
max: null,
|
|
7756
|
-
maxLength:
|
|
7762
|
+
maxLength: de,
|
|
7757
7763
|
media: null,
|
|
7758
7764
|
method: null,
|
|
7759
7765
|
min: null,
|
|
7760
|
-
minLength:
|
|
7766
|
+
minLength: de,
|
|
7761
7767
|
multiple: ee,
|
|
7762
7768
|
muted: ee,
|
|
7763
7769
|
name: null,
|
|
@@ -7848,7 +7854,7 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7848
7854
|
onWaiting: null,
|
|
7849
7855
|
onWheel: null,
|
|
7850
7856
|
open: ee,
|
|
7851
|
-
optimum:
|
|
7857
|
+
optimum: de,
|
|
7852
7858
|
pattern: null,
|
|
7853
7859
|
ping: Re,
|
|
7854
7860
|
placeholder: null,
|
|
@@ -7860,35 +7866,35 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7860
7866
|
rel: Re,
|
|
7861
7867
|
required: ee,
|
|
7862
7868
|
reversed: ee,
|
|
7863
|
-
rows:
|
|
7864
|
-
rowSpan:
|
|
7869
|
+
rows: de,
|
|
7870
|
+
rowSpan: de,
|
|
7865
7871
|
sandbox: Re,
|
|
7866
7872
|
scope: null,
|
|
7867
7873
|
scoped: ee,
|
|
7868
7874
|
seamless: ee,
|
|
7869
7875
|
selected: ee,
|
|
7870
7876
|
shape: null,
|
|
7871
|
-
size:
|
|
7877
|
+
size: de,
|
|
7872
7878
|
sizes: null,
|
|
7873
7879
|
slot: null,
|
|
7874
|
-
span:
|
|
7875
|
-
spellCheck:
|
|
7880
|
+
span: de,
|
|
7881
|
+
spellCheck: It,
|
|
7876
7882
|
src: null,
|
|
7877
7883
|
srcDoc: null,
|
|
7878
7884
|
srcLang: null,
|
|
7879
7885
|
srcSet: en,
|
|
7880
|
-
start:
|
|
7886
|
+
start: de,
|
|
7881
7887
|
step: null,
|
|
7882
7888
|
style: null,
|
|
7883
|
-
tabIndex:
|
|
7889
|
+
tabIndex: de,
|
|
7884
7890
|
target: null,
|
|
7885
7891
|
title: null,
|
|
7886
7892
|
translate: null,
|
|
7887
7893
|
type: null,
|
|
7888
7894
|
typeMustMatch: ee,
|
|
7889
7895
|
useMap: null,
|
|
7890
|
-
value:
|
|
7891
|
-
width:
|
|
7896
|
+
value: It,
|
|
7897
|
+
width: de,
|
|
7892
7898
|
wrap: null,
|
|
7893
7899
|
// Legacy.
|
|
7894
7900
|
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
|
|
@@ -7904,11 +7910,11 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7904
7910
|
// `<body>`. Use CSS `background-image` instead
|
|
7905
7911
|
bgColor: null,
|
|
7906
7912
|
// `<body>` and table elements. Use CSS `background-color` instead
|
|
7907
|
-
border:
|
|
7913
|
+
border: de,
|
|
7908
7914
|
// `<table>`. Use CSS `border-width` instead,
|
|
7909
7915
|
borderColor: null,
|
|
7910
7916
|
// `<table>`. Use CSS `border-color` instead,
|
|
7911
|
-
bottomMargin:
|
|
7917
|
+
bottomMargin: de,
|
|
7912
7918
|
// `<body>`
|
|
7913
7919
|
cellPadding: null,
|
|
7914
7920
|
// `<table>`
|
|
@@ -7942,9 +7948,9 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7942
7948
|
// `<table>`
|
|
7943
7949
|
frameBorder: null,
|
|
7944
7950
|
// `<iframe>`. Use CSS `border` instead
|
|
7945
|
-
hSpace:
|
|
7951
|
+
hSpace: de,
|
|
7946
7952
|
// `<img>` and `<object>`
|
|
7947
|
-
leftMargin:
|
|
7953
|
+
leftMargin: de,
|
|
7948
7954
|
// `<body>`
|
|
7949
7955
|
link: null,
|
|
7950
7956
|
// `<body>`. Use CSS `a:link {color: *}` instead
|
|
@@ -7952,9 +7958,9 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7952
7958
|
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
|
7953
7959
|
lowSrc: null,
|
|
7954
7960
|
// `<img>`. Use a `<picture>`
|
|
7955
|
-
marginHeight:
|
|
7961
|
+
marginHeight: de,
|
|
7956
7962
|
// `<body>`
|
|
7957
|
-
marginWidth:
|
|
7963
|
+
marginWidth: de,
|
|
7958
7964
|
// `<body>`
|
|
7959
7965
|
noResize: ee,
|
|
7960
7966
|
// `<frame>`
|
|
@@ -7972,13 +7978,13 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7972
7978
|
// `<isindex>`
|
|
7973
7979
|
rev: null,
|
|
7974
7980
|
// `<link>`
|
|
7975
|
-
rightMargin:
|
|
7981
|
+
rightMargin: de,
|
|
7976
7982
|
// `<body>`
|
|
7977
7983
|
rules: null,
|
|
7978
7984
|
// `<table>`
|
|
7979
7985
|
scheme: null,
|
|
7980
7986
|
// `<meta>`
|
|
7981
|
-
scrolling:
|
|
7987
|
+
scrolling: It,
|
|
7982
7988
|
// `<frame>`. Use overflow in the child context
|
|
7983
7989
|
standby: null,
|
|
7984
7990
|
// `<object>`
|
|
@@ -7986,7 +7992,7 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7986
7992
|
// `<table>`
|
|
7987
7993
|
text: null,
|
|
7988
7994
|
// `<body>`. Use CSS `color` instead
|
|
7989
|
-
topMargin:
|
|
7995
|
+
topMargin: de,
|
|
7990
7996
|
// `<body>`
|
|
7991
7997
|
valueType: null,
|
|
7992
7998
|
// `<param>`
|
|
@@ -7996,7 +8002,7 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
7996
8002
|
// Several. Use CSS `vertical-align` instead
|
|
7997
8003
|
vLink: null,
|
|
7998
8004
|
// `<body>`. Use CSS `a:visited {color}` instead
|
|
7999
|
-
vSpace:
|
|
8005
|
+
vSpace: de,
|
|
8000
8006
|
// `<img>` and `<object>`
|
|
8001
8007
|
// Non-standard Properties.
|
|
8002
8008
|
allowTransparency: null,
|
|
@@ -8006,7 +8012,7 @@ var vt = je, ZR = $t, QR = Ch, ee = vt.boolean, JR = vt.overloadedBoolean, kt =
|
|
|
8006
8012
|
disableRemotePlayback: ee,
|
|
8007
8013
|
prefix: null,
|
|
8008
8014
|
property: null,
|
|
8009
|
-
results:
|
|
8015
|
+
results: de,
|
|
8010
8016
|
security: null,
|
|
8011
8017
|
unselectable: null
|
|
8012
8018
|
}
|
|
@@ -8049,15 +8055,15 @@ function Tw(e) {
|
|
|
8049
8055
|
var Vl = {};
|
|
8050
8056
|
Vl.parse = Aw;
|
|
8051
8057
|
Vl.stringify = _w;
|
|
8052
|
-
var gl = ",", gc = " ",
|
|
8058
|
+
var gl = ",", gc = " ", xt = "";
|
|
8053
8059
|
function Aw(e) {
|
|
8054
|
-
for (var t = [], n = String(e ||
|
|
8060
|
+
for (var t = [], n = String(e || xt), r = n.indexOf(gl), a = 0, i = !1, o; !i; )
|
|
8055
8061
|
r === -1 && (r = n.length, i = !0), o = n.slice(a, r).trim(), (o || !i) && t.push(o), a = r + 1, r = n.indexOf(gl, a);
|
|
8056
8062
|
return t;
|
|
8057
8063
|
}
|
|
8058
8064
|
function _w(e, t) {
|
|
8059
|
-
var n = t || {}, r = n.padLeft === !1 ?
|
|
8060
|
-
return e[e.length - 1] ===
|
|
8065
|
+
var n = t || {}, r = n.padLeft === !1 ? xt : gc, a = n.padRight ? gc : xt;
|
|
8066
|
+
return e[e.length - 1] === xt && (e = e.concat(xt)), e.join(a + gl + r).trim();
|
|
8061
8067
|
}
|
|
8062
8068
|
var kw = dw, fc = $l, Iw = yw, mc = Hl.parse, hc = Vl.parse, Cw = xw, Nw = {}.hasOwnProperty;
|
|
8063
8069
|
function xw(e, t, n) {
|
|
@@ -9005,10 +9011,10 @@ var Gh = { exports: {} };
|
|
|
9005
9011
|
U--, y = S.slice(X, ne), Y.index -= X;
|
|
9006
9012
|
} else if (Y = u(J, 0, y, $), !Y)
|
|
9007
9013
|
continue;
|
|
9008
|
-
var re = Y.index, me = Y[0],
|
|
9014
|
+
var re = Y.index, me = Y[0], pe = y.slice(0, re), be = y.slice(re + me.length), ve = X + y.length;
|
|
9009
9015
|
I && ve > I.reach && (I.reach = ve);
|
|
9010
9016
|
var we = B.prev;
|
|
9011
|
-
|
|
9017
|
+
pe && (we = g(E, we, pe), X += pe.length), d(E, we, U);
|
|
9012
9018
|
var Qe = new l(x, D ? s.tokenize(me, D) : me, P, me);
|
|
9013
9019
|
if (B = g(E, we, Qe), be && g(E, B, be), U > 1) {
|
|
9014
9020
|
var Ne = {
|
|
@@ -9455,8 +9461,8 @@ function Ql(e) {
|
|
|
9455
9461
|
"javascript"
|
|
9456
9462
|
)), e.languages.js = e.languages.javascript;
|
|
9457
9463
|
}
|
|
9458
|
-
var
|
|
9459
|
-
|
|
9464
|
+
var Ot = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof nt == "object" ? nt : {}, T_ = $_();
|
|
9465
|
+
Ot.Prism = { manual: !0, disableWorkerMessageHandler: !0 };
|
|
9460
9466
|
var A_ = $w, __ = n_, qh = y_, k_ = S_, I_ = v_, C_ = R_, N_ = w_;
|
|
9461
9467
|
T_();
|
|
9462
9468
|
var Jl = {}.hasOwnProperty;
|
|
@@ -9465,17 +9471,17 @@ function zh() {
|
|
|
9465
9471
|
zh.prototype = qh;
|
|
9466
9472
|
var fe = new zh(), x_ = fe;
|
|
9467
9473
|
fe.highlight = L_;
|
|
9468
|
-
fe.register =
|
|
9474
|
+
fe.register = qt;
|
|
9469
9475
|
fe.alias = O_;
|
|
9470
9476
|
fe.registered = D_;
|
|
9471
9477
|
fe.listLanguages = M_;
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9478
|
+
qt(k_);
|
|
9479
|
+
qt(I_);
|
|
9480
|
+
qt(C_);
|
|
9481
|
+
qt(N_);
|
|
9476
9482
|
fe.util.encode = U_;
|
|
9477
9483
|
fe.Token.stringify = F_;
|
|
9478
|
-
function
|
|
9484
|
+
function qt(e) {
|
|
9479
9485
|
if (typeof e != "function" || !e.displayName)
|
|
9480
9486
|
throw new Error("Expected `function` for `grammar`, got `" + e + "`");
|
|
9481
9487
|
fe.languages[e.displayName] === void 0 && e(fe);
|
|
@@ -9547,10 +9553,10 @@ function B_(e) {
|
|
|
9547
9553
|
return e;
|
|
9548
9554
|
}
|
|
9549
9555
|
function $_() {
|
|
9550
|
-
var e = "Prism" in
|
|
9556
|
+
var e = "Prism" in Ot, t = e ? Ot.Prism : void 0;
|
|
9551
9557
|
return n;
|
|
9552
9558
|
function n() {
|
|
9553
|
-
e ?
|
|
9559
|
+
e ? Ot.Prism = t : delete Ot.Prism, e = void 0, t = void 0;
|
|
9554
9560
|
}
|
|
9555
9561
|
}
|
|
9556
9562
|
const G_ = {
|
|
@@ -30135,12 +30141,12 @@ const Vx = {
|
|
|
30135
30141
|
onColumnOrderChange: Me("columnOrder", e)
|
|
30136
30142
|
}),
|
|
30137
30143
|
createColumn: (e, t) => {
|
|
30138
|
-
e.getIndex = z((n) => [
|
|
30144
|
+
e.getIndex = z((n) => [Ft(t, n)], (n) => n.findIndex((r) => r.id === e.id), H(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => {
|
|
30139
30145
|
var r;
|
|
30140
|
-
return ((r =
|
|
30146
|
+
return ((r = Ft(t, n)[0]) == null ? void 0 : r.id) === e.id;
|
|
30141
30147
|
}, e.getIsLastColumn = (n) => {
|
|
30142
30148
|
var r;
|
|
30143
|
-
const a =
|
|
30149
|
+
const a = Ft(t, n);
|
|
30144
30150
|
return ((r = a[a.length - 1]) == null ? void 0 : r.id) === e.id;
|
|
30145
30151
|
};
|
|
30146
30152
|
},
|
|
@@ -30275,7 +30281,7 @@ const rn = {
|
|
|
30275
30281
|
var n, r, a;
|
|
30276
30282
|
const i = t.getState().columnSizing[e.id];
|
|
30277
30283
|
return Math.min(Math.max((n = e.columnDef.minSize) != null ? n : rn.minSize, (r = i ?? e.columnDef.size) != null ? r : rn.size), (a = e.columnDef.maxSize) != null ? a : rn.maxSize);
|
|
30278
|
-
}, e.getStart = z((n) => [n,
|
|
30284
|
+
}, e.getStart = z((n) => [n, Ft(t, n), t.getState().columnSizing], (n, r) => r.slice(0, e.getIndex(n)).reduce((a, i) => a + i.getSize(), 0), H(t.options, "debugColumns", "getStart")), e.getAfter = z((n) => [n, Ft(t, n), t.getState().columnSizing], (n, r) => r.slice(e.getIndex(n) + 1).reduce((a, i) => a + i.getSize(), 0), H(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
30279
30285
|
t.setColumnSizing((n) => {
|
|
30280
30286
|
let {
|
|
30281
30287
|
[e.id]: r,
|
|
@@ -30450,7 +30456,7 @@ const Xx = {
|
|
|
30450
30456
|
};
|
|
30451
30457
|
}
|
|
30452
30458
|
};
|
|
30453
|
-
function
|
|
30459
|
+
function Ft(e, t) {
|
|
30454
30460
|
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
30455
30461
|
}
|
|
30456
30462
|
const Zx = {
|
|
@@ -30953,7 +30959,7 @@ function ib(e, t) {
|
|
|
30953
30959
|
}
|
|
30954
30960
|
return n.length - r.length;
|
|
30955
30961
|
}
|
|
30956
|
-
const
|
|
30962
|
+
const Ct = {
|
|
30957
30963
|
alphanumeric: rO,
|
|
30958
30964
|
alphanumericCaseSensitive: aO,
|
|
30959
30965
|
text: iO,
|
|
@@ -30980,11 +30986,11 @@ const It = {
|
|
|
30980
30986
|
for (const a of n) {
|
|
30981
30987
|
const i = a == null ? void 0 : a.getValue(e.id);
|
|
30982
30988
|
if (Object.prototype.toString.call(i) === "[object Date]")
|
|
30983
|
-
return
|
|
30989
|
+
return Ct.datetime;
|
|
30984
30990
|
if (typeof i == "string" && (r = !0, i.split(Sl).length > 1))
|
|
30985
|
-
return
|
|
30991
|
+
return Ct.alphanumeric;
|
|
30986
30992
|
}
|
|
30987
|
-
return r ?
|
|
30993
|
+
return r ? Ct.text : Ct.basic;
|
|
30988
30994
|
}, e.getAutoSortDir = () => {
|
|
30989
30995
|
const n = t.getFilteredRowModel().flatRows[0];
|
|
30990
30996
|
return typeof (n == null ? void 0 : n.getValue(e.id)) == "string" ? "asc" : "desc";
|
|
@@ -30992,7 +30998,7 @@ const It = {
|
|
|
30992
30998
|
var n, r;
|
|
30993
30999
|
if (!e)
|
|
30994
31000
|
throw new Error();
|
|
30995
|
-
return Rn(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (n = (r = t.options.sortingFns) == null ? void 0 : r[e.columnDef.sortingFn]) != null ? n :
|
|
31001
|
+
return Rn(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (n = (r = t.options.sortingFns) == null ? void 0 : r[e.columnDef.sortingFn]) != null ? n : Ct[e.columnDef.sortingFn];
|
|
30996
31002
|
}, e.toggleSorting = (n, r) => {
|
|
30997
31003
|
const a = e.getNextSortingOrder(), i = typeof n < "u" && n !== null;
|
|
30998
31004
|
t.setSorting((o) => {
|
|
@@ -31552,7 +31558,7 @@ function Lm(e) {
|
|
|
31552
31558
|
}
|
|
31553
31559
|
return Om(e) ? { type: "markdown", markdown: { content: e } } : e;
|
|
31554
31560
|
}
|
|
31555
|
-
function
|
|
31561
|
+
function Nt(e, t = !0) {
|
|
31556
31562
|
return { type: "markdown", markdown: { content: e ?? (t ? `## 👋 Hello! I'm your AI assistant
|
|
31557
31563
|
|
|
31558
31564
|
I'm here to help you. You can ask me questions, request data, or get guidance.
|
|
@@ -31585,7 +31591,7 @@ const Rl = ({ config: e }) => {
|
|
|
31585
31591
|
ft(() => {
|
|
31586
31592
|
d(n);
|
|
31587
31593
|
}, [n]);
|
|
31588
|
-
const b = c || p === "minimize-header", h = !c && p === "minimize-header", [A, R] = he(b), [S, E] = he(h), [T, w] = he(!1), [m, I] = he(""), [x, _] = he(!0), [L, N] = he(!1), [D, $] = he(!1), [G, P] = he(!1), [j, J] = he([]), [B, X] = he(() =>
|
|
31594
|
+
const b = c || p === "minimize-header", h = !c && p === "minimize-header", [A, R] = he(b), [S, E] = he(h), [T, w] = he(!1), [m, I] = he(""), [x, _] = he(!0), [L, N] = he(!1), [D, $] = he(!1), [G, P] = he(!1), [j, J] = he([]), [B, X] = he(() => se.getCorrelationId()), y = on(null), U = on(null), Y = on(null), [v] = he(() => se.getCorrelationId()), ne = du(() => se.getBrowserSession(), []), oe = Ke(async () => {
|
|
31589
31595
|
try {
|
|
31590
31596
|
const F = { "browser-session": ne };
|
|
31591
31597
|
g && (F.Authorization = g.startsWith("Bearer ") ? g : `Bearer ${g}`);
|
|
@@ -31597,13 +31603,13 @@ const Rl = ({ config: e }) => {
|
|
|
31597
31603
|
}
|
|
31598
31604
|
} catch {
|
|
31599
31605
|
}
|
|
31600
|
-
J(
|
|
31606
|
+
J(se.getSessions());
|
|
31601
31607
|
}, [t, ne, g]), re = du(() => {
|
|
31602
31608
|
const {
|
|
31603
31609
|
primaryColor: F = "#6366f1",
|
|
31604
31610
|
secondaryColor: K = "#8b5cf6",
|
|
31605
31611
|
backgroundColor: Q = "#f8fafc",
|
|
31606
|
-
fontFamily:
|
|
31612
|
+
fontFamily: ce = "'Inter', 'Segoe UI', system-ui, sans-serif",
|
|
31607
31613
|
borderRadius: Ee = "16px",
|
|
31608
31614
|
userBubbleColor: We = "#6366f1",
|
|
31609
31615
|
userBubbleTextColor: An = "#ffffff"
|
|
@@ -31612,7 +31618,7 @@ const Rl = ({ config: e }) => {
|
|
|
31612
31618
|
"--sdk-primary": F,
|
|
31613
31619
|
"--sdk-secondary": K,
|
|
31614
31620
|
"--sdk-bg": Q,
|
|
31615
|
-
"--sdk-font":
|
|
31621
|
+
"--sdk-font": ce,
|
|
31616
31622
|
"--sdk-radius": Ee,
|
|
31617
31623
|
"--sdk-user-bubble": We,
|
|
31618
31624
|
"--sdk-user-bubble-text": An
|
|
@@ -31627,16 +31633,16 @@ const Rl = ({ config: e }) => {
|
|
|
31627
31633
|
onBeforeMessageSend: u,
|
|
31628
31634
|
onTokenRefreshed: d
|
|
31629
31635
|
}), {
|
|
31630
|
-
messages:
|
|
31636
|
+
messages: pe,
|
|
31631
31637
|
isTyping: be,
|
|
31632
31638
|
pendingAction: ve,
|
|
31633
31639
|
editingMessageId: we,
|
|
31634
31640
|
editingText: Qe,
|
|
31635
31641
|
setMessages: Ne,
|
|
31636
31642
|
setPendingAction: dt,
|
|
31637
|
-
setEditingText:
|
|
31638
|
-
sendMessage:
|
|
31639
|
-
sendClarificationResponse:
|
|
31643
|
+
setEditingText: zt,
|
|
31644
|
+
sendMessage: Ht,
|
|
31645
|
+
sendClarificationResponse: Vt,
|
|
31640
31646
|
handleEditMessage: wn,
|
|
31641
31647
|
handleCancelEdit: Rt,
|
|
31642
31648
|
handleSaveEdit: wt
|
|
@@ -31648,19 +31654,19 @@ const Rl = ({ config: e }) => {
|
|
|
31648
31654
|
sessionId: B
|
|
31649
31655
|
});
|
|
31650
31656
|
ft(() => {
|
|
31651
|
-
if (A &&
|
|
31657
|
+
if (A && pe.length === 0) {
|
|
31652
31658
|
const F = {
|
|
31653
31659
|
id: "welcome",
|
|
31654
31660
|
type: "ai",
|
|
31655
|
-
content:
|
|
31661
|
+
content: Nt(i, x),
|
|
31656
31662
|
timestamp: /* @__PURE__ */ new Date()
|
|
31657
31663
|
};
|
|
31658
|
-
Ne([F]),
|
|
31664
|
+
Ne([F]), Wt(), Tt(), oe(), se.saveCurrentSession("New conversation"), X(se.getCorrelationId()), o && I(o);
|
|
31659
31665
|
}
|
|
31660
31666
|
}, [A]), ft(() => {
|
|
31661
31667
|
var F;
|
|
31662
|
-
A && !S && ((F = U.current) == null || F.focus(),
|
|
31663
|
-
}, [A, S,
|
|
31668
|
+
A && !S && ((F = U.current) == null || F.focus(), jt());
|
|
31669
|
+
}, [A, S, pe.length]), ft(() => (T ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
31664
31670
|
document.body.style.overflow = "";
|
|
31665
31671
|
}), [T]), ft(() => {
|
|
31666
31672
|
const F = (K) => {
|
|
@@ -31668,13 +31674,13 @@ const Rl = ({ config: e }) => {
|
|
|
31668
31674
|
};
|
|
31669
31675
|
return window.addEventListener("keydown", F), () => window.removeEventListener("keydown", F);
|
|
31670
31676
|
}, [T]);
|
|
31671
|
-
const
|
|
31677
|
+
const jt = () => {
|
|
31672
31678
|
var F;
|
|
31673
31679
|
return (F = y.current) == null ? void 0 : F.scrollIntoView({ behavior: "smooth" });
|
|
31674
31680
|
}, Tn = (F) => {
|
|
31675
31681
|
const K = F.currentTarget, Q = K.scrollTop + K.clientHeight >= K.scrollHeight - 120;
|
|
31676
31682
|
N(!Q);
|
|
31677
|
-
},
|
|
31683
|
+
}, Wt = async () => {
|
|
31678
31684
|
try {
|
|
31679
31685
|
const F = {
|
|
31680
31686
|
"X-Correlation-ID": B,
|
|
@@ -31688,14 +31694,14 @@ const Rl = ({ config: e }) => {
|
|
|
31688
31694
|
}
|
|
31689
31695
|
}, Tt = async (F) => {
|
|
31690
31696
|
var Q;
|
|
31691
|
-
const K = F ??
|
|
31697
|
+
const K = F ?? se.getCorrelationId();
|
|
31692
31698
|
try {
|
|
31693
|
-
const
|
|
31699
|
+
const ce = {
|
|
31694
31700
|
"X-Correlation-ID": K,
|
|
31695
31701
|
"browser-session": ne
|
|
31696
31702
|
};
|
|
31697
|
-
g && (
|
|
31698
|
-
const Ee = await fetch(`${t}/chat-history?correlationId=${K}`, { headers:
|
|
31703
|
+
g && (ce.Authorization = g.startsWith("Bearer ") ? g : `Bearer ${g}`);
|
|
31704
|
+
const Ee = await fetch(`${t}/chat-history?correlationId=${K}`, { headers: ce });
|
|
31699
31705
|
if (!Ee.ok) return;
|
|
31700
31706
|
const We = await Ee.json();
|
|
31701
31707
|
if (((Q = We.history) == null ? void 0 : Q.length) > 0) {
|
|
@@ -31707,15 +31713,15 @@ const Rl = ({ config: e }) => {
|
|
|
31707
31713
|
feedback: Oe.feedback
|
|
31708
31714
|
}));
|
|
31709
31715
|
Ne(An);
|
|
31710
|
-
const
|
|
31711
|
-
if (
|
|
31712
|
-
const Oe = String(
|
|
31713
|
-
|
|
31716
|
+
const Kt = We.history.find((Oe) => Oe.role === "user");
|
|
31717
|
+
if (Kt != null && Kt.content) {
|
|
31718
|
+
const Oe = String(Kt.content).slice(0, 50);
|
|
31719
|
+
se.updateSessionName(K, Oe), oe();
|
|
31714
31720
|
}
|
|
31715
31721
|
}
|
|
31716
31722
|
} catch {
|
|
31717
31723
|
}
|
|
31718
|
-
},
|
|
31724
|
+
}, Yt = async (F, K) => {
|
|
31719
31725
|
try {
|
|
31720
31726
|
const Q = {
|
|
31721
31727
|
"Content-Type": "application/json",
|
|
@@ -31732,40 +31738,40 @@ const Rl = ({ config: e }) => {
|
|
|
31732
31738
|
}, C = async (F) => {
|
|
31733
31739
|
if (F.preventDefault(), !m.trim() || be) return;
|
|
31734
31740
|
const K = m.trim();
|
|
31735
|
-
I(""), await
|
|
31741
|
+
I(""), await Ht(K);
|
|
31736
31742
|
}, M = () => {
|
|
31737
|
-
const F =
|
|
31743
|
+
const F = pe.find((ce) => ce.type === "user");
|
|
31738
31744
|
if (!F) {
|
|
31739
31745
|
P(!1), setTimeout(() => {
|
|
31740
|
-
var
|
|
31741
|
-
return (
|
|
31746
|
+
var ce;
|
|
31747
|
+
return (ce = U.current) == null ? void 0 : ce.focus();
|
|
31742
31748
|
}, 50);
|
|
31743
31749
|
return;
|
|
31744
31750
|
}
|
|
31745
31751
|
const K = (typeof F.content == "string" ? F.content : "Conversation").slice(0, 50);
|
|
31746
|
-
|
|
31747
|
-
const Q =
|
|
31748
|
-
X(Q), dt(null), N(!1), P(!1), Ne([{ id: "welcome", type: "ai", content:
|
|
31752
|
+
se.resetCorrelationId(K);
|
|
31753
|
+
const Q = se.getCorrelationId();
|
|
31754
|
+
X(Q), dt(null), N(!1), P(!1), Ne([{ id: "welcome", type: "ai", content: Nt(i, x), timestamp: /* @__PURE__ */ new Date() }]), oe();
|
|
31749
31755
|
}, W = async (F) => {
|
|
31750
31756
|
if (F.id === B) {
|
|
31751
31757
|
P(!1);
|
|
31752
31758
|
return;
|
|
31753
31759
|
}
|
|
31754
|
-
const K =
|
|
31755
|
-
|
|
31760
|
+
const K = pe.find((ce) => ce.type === "user"), Q = K ? (typeof K.content == "string" ? K.content : "Conversation").slice(0, 50) : "New conversation";
|
|
31761
|
+
se.saveCurrentSession(Q), se.switchToSession(F.id), X(F.id), dt(null), N(!1), P(!1), Ne([{ id: "welcome", type: "ai", content: Nt(i, x), timestamp: /* @__PURE__ */ new Date() }]), await Tt(F.id), oe();
|
|
31756
31762
|
}, te = async (F, K) => {
|
|
31757
|
-
if (F.stopPropagation(), F.preventDefault(),
|
|
31763
|
+
if (F.stopPropagation(), F.preventDefault(), se.removeSession(K), K !== B) {
|
|
31758
31764
|
oe();
|
|
31759
31765
|
return;
|
|
31760
31766
|
}
|
|
31761
|
-
const Q =
|
|
31767
|
+
const Q = se.getSessions();
|
|
31762
31768
|
if (Q.length > 0) {
|
|
31763
|
-
const
|
|
31764
|
-
|
|
31769
|
+
const ce = Q[0];
|
|
31770
|
+
se.switchToSession(ce.id), X(ce.id), dt(null), N(!1), Ne([{ id: "welcome", type: "ai", content: Nt(i, x), timestamp: /* @__PURE__ */ new Date() }]), await Tt(ce.id), oe();
|
|
31765
31771
|
} else {
|
|
31766
|
-
|
|
31767
|
-
const
|
|
31768
|
-
X(
|
|
31772
|
+
se.resetCorrelationId();
|
|
31773
|
+
const ce = se.getCorrelationId();
|
|
31774
|
+
X(ce), dt(null), N(!1), P(!1), Ne([{ id: "welcome", type: "ai", content: Nt(i, x), timestamp: /* @__PURE__ */ new Date() }]), oe();
|
|
31769
31775
|
}
|
|
31770
31776
|
}, ie = () => {
|
|
31771
31777
|
A ? E(!S) : (w(!1), R(!0), E(!1));
|
|
@@ -31814,7 +31820,7 @@ const Rl = ({ config: e }) => {
|
|
|
31814
31820
|
children: /* @__PURE__ */ k("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: /* @__PURE__ */ k("path", { d: "M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z" }) })
|
|
31815
31821
|
}
|
|
31816
31822
|
),
|
|
31817
|
-
!x && !S && /* @__PURE__ */ k("button", { className: "sdk-ctrl-btn sdk-ctrl-btn--retry", onClick:
|
|
31823
|
+
!x && !S && /* @__PURE__ */ k("button", { className: "sdk-ctrl-btn sdk-ctrl-btn--retry", onClick: Wt, title: "Retry connection", children: /* @__PURE__ */ k("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: /* @__PURE__ */ k("path", { d: "M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" }) }) }),
|
|
31818
31824
|
!c && !S && /* @__PURE__ */ k(
|
|
31819
31825
|
"button",
|
|
31820
31826
|
{
|
|
@@ -31896,7 +31902,7 @@ const Rl = ({ config: e }) => {
|
|
|
31896
31902
|
] })
|
|
31897
31903
|
] }),
|
|
31898
31904
|
/* @__PURE__ */ q("div", { className: "sdk-messages", ref: Y, onScroll: Tn, children: [
|
|
31899
|
-
|
|
31905
|
+
pe.map((F) => {
|
|
31900
31906
|
const K = F.type === "user";
|
|
31901
31907
|
return /* @__PURE__ */ q("div", { className: `sdk-msg ${K ? "sdk-msg--user" : "sdk-msg--ai"}`, children: [
|
|
31902
31908
|
!K && /* @__PURE__ */ k("div", { className: "sdk-msg-avatar", children: a ? /* @__PURE__ */ k("img", { src: a, alt: "" }) : /* @__PURE__ */ k("span", { children: "AI" }) }),
|
|
@@ -31912,7 +31918,7 @@ const Rl = ({ config: e }) => {
|
|
|
31912
31918
|
className: "sdk-edit-textarea",
|
|
31913
31919
|
value: Qe,
|
|
31914
31920
|
maxLength: 300,
|
|
31915
|
-
onChange: (Q) =>
|
|
31921
|
+
onChange: (Q) => zt(Q.target.value),
|
|
31916
31922
|
onKeyDown: (Q) => {
|
|
31917
31923
|
Q.key === "Enter" && !Q.shiftKey && (Q.preventDefault(), wt()), Q.key === "Escape" && Rt();
|
|
31918
31924
|
},
|
|
@@ -31939,7 +31945,7 @@ const Rl = ({ config: e }) => {
|
|
|
31939
31945
|
vO,
|
|
31940
31946
|
{
|
|
31941
31947
|
content: F.content,
|
|
31942
|
-
onClarificationSelect:
|
|
31948
|
+
onClarificationSelect: Vt
|
|
31943
31949
|
}
|
|
31944
31950
|
) }),
|
|
31945
31951
|
/* @__PURE__ */ q("div", { className: "sdk-msg-meta", children: [
|
|
@@ -31950,7 +31956,7 @@ const Rl = ({ config: e }) => {
|
|
|
31950
31956
|
"button",
|
|
31951
31957
|
{
|
|
31952
31958
|
className: `sdk-icon-btn ${F.feedback === "like" ? "sdk-icon-btn--active" : ""}`,
|
|
31953
|
-
onClick: () =>
|
|
31959
|
+
onClick: () => Yt(F.id, "like"),
|
|
31954
31960
|
title: "Helpful",
|
|
31955
31961
|
children: "👍"
|
|
31956
31962
|
}
|
|
@@ -31959,7 +31965,7 @@ const Rl = ({ config: e }) => {
|
|
|
31959
31965
|
"button",
|
|
31960
31966
|
{
|
|
31961
31967
|
className: `sdk-icon-btn ${F.feedback === "dislike" ? "sdk-icon-btn--active" : ""}`,
|
|
31962
|
-
onClick: () =>
|
|
31968
|
+
onClick: () => Yt(F.id, "dislike"),
|
|
31963
31969
|
title: "Not helpful",
|
|
31964
31970
|
children: "👎"
|
|
31965
31971
|
}
|
|
@@ -31983,7 +31989,7 @@ const Rl = ({ config: e }) => {
|
|
|
31983
31989
|
{
|
|
31984
31990
|
className: "sdk-scroll-btn",
|
|
31985
31991
|
onClick: () => {
|
|
31986
|
-
|
|
31992
|
+
jt(), N(!1);
|
|
31987
31993
|
},
|
|
31988
31994
|
title: "Scroll to latest",
|
|
31989
31995
|
children: /* @__PURE__ */ k("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ k("path", { d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" }) })
|
|
@@ -32032,7 +32038,7 @@ const Rl = ({ config: e }) => {
|
|
|
32032
32038
|
};
|
|
32033
32039
|
let Ze = null, He = null, Xe = null;
|
|
32034
32040
|
function RO(e) {
|
|
32035
|
-
Xe = e;
|
|
32041
|
+
e.chatID !== void 0 && e.chatID !== se.getChatId() && se.resetCorrelationId(), e.chatID !== void 0 && se.setChatId(e.chatID), Xe = e;
|
|
32036
32042
|
let t;
|
|
32037
32043
|
if (e.container)
|
|
32038
32044
|
if (typeof e.container == "string") {
|