tia-gpc-widget 2.0.1 → 2.0.3
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/loader.js +3 -3
- package/dist/loader.min.js +2 -2
- package/dist/tia-gpc-widget.standalone.css +1 -1
- package/dist/tia-gpc-widget.standalone.js +2 -2
- package/dist/tia-gpc-widget.standalone.js.map +1 -1
- package/dist/tia-gpc.cjs.js +10 -10
- package/dist/tia-gpc.cjs.js.map +1 -1
- package/dist/tia-gpc.css +1 -1
- package/dist/tia-gpc.es.js +610 -576
- package/dist/tia-gpc.es.js.map +1 -1
- package/dist/version.json +14 -14
- package/package.json +1 -1
package/dist/tia-gpc.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as F, jsx as S, Fragment as an } from "react/jsx-runtime";
|
|
2
|
-
import { useState as V, useRef as le, useEffect as te, useLayoutEffect as
|
|
3
|
-
import { useTranslation as ge, initReactI18next as
|
|
2
|
+
import { useState as V, useRef as le, useEffect as te, useLayoutEffect as Pi, useCallback as de, useMemo as Di } from "react";
|
|
3
|
+
import { useTranslation as ge, initReactI18next as Ni, I18nextProvider as Li } from "react-i18next";
|
|
4
4
|
import { MessageCircle as zi, Moon as Ri, Sun as Mi, Globe as Oi, MessageSquare as rt, ChevronDown as Fi, MicOff as Bi, Mic as ji, Send as Ui, AlertCircle as Hi, Check as $i, X as Vi, Pencil as qi, Trash2 as Wi, Clock as Gi } from "lucide-react";
|
|
5
|
-
import
|
|
5
|
+
import Le, { Toaster as Ki } from "react-hot-toast";
|
|
6
6
|
import { Turnstile as Xi } from "@marsidev/react-turnstile";
|
|
7
7
|
import Yi from "axios";
|
|
8
8
|
import kt from "i18next";
|
|
@@ -12,7 +12,10 @@ const Qi = ({ onClick: e, unreadCount: t = 0, widgetConfig: n }) => {
|
|
|
12
12
|
return /* @__PURE__ */ F(
|
|
13
13
|
"button",
|
|
14
14
|
{
|
|
15
|
-
|
|
15
|
+
type: "button",
|
|
16
|
+
onClick: (o) => {
|
|
17
|
+
o.preventDefault(), o.stopPropagation(), e();
|
|
18
|
+
},
|
|
16
19
|
className: "gpc-floating-button gpc-floating-button-with-text gpc-animate-fade-in",
|
|
17
20
|
"aria-label": r("chat.title"),
|
|
18
21
|
title: r("chat.title"),
|
|
@@ -34,7 +37,10 @@ const Qi = ({ onClick: e, unreadCount: t = 0, widgetConfig: n }) => {
|
|
|
34
37
|
return /* @__PURE__ */ S(
|
|
35
38
|
"button",
|
|
36
39
|
{
|
|
37
|
-
|
|
40
|
+
type: "button",
|
|
41
|
+
onClick: (i) => {
|
|
42
|
+
i.preventDefault(), i.stopPropagation(), t();
|
|
43
|
+
},
|
|
38
44
|
className: "gpc-header-button gpc-focus-visible gpc-transition",
|
|
39
45
|
"aria-label": n("theme.toggle"),
|
|
40
46
|
title: n("theme.toggle"),
|
|
@@ -46,8 +52,8 @@ const Qi = ({ onClick: e, unreadCount: t = 0, widgetConfig: n }) => {
|
|
|
46
52
|
{ code: "en", label: t("languages.english"), flag: "🇬🇧" },
|
|
47
53
|
{ code: "es", label: t("languages.spanish"), flag: "🇪🇸" },
|
|
48
54
|
{ code: "fr", label: t("languages.french"), flag: "🇫🇷" }
|
|
49
|
-
], [r, i] = V(!1), a = le(null), o = n.find((l) => l.code === e.language) || n[0], s = (l) => {
|
|
50
|
-
e.changeLanguage(
|
|
55
|
+
], [r, i] = V(!1), a = le(null), o = n.find((l) => l.code === e.language) || n[0], s = (l, u) => {
|
|
56
|
+
l.preventDefault(), l.stopPropagation(), e.changeLanguage(u), i(!1);
|
|
51
57
|
};
|
|
52
58
|
return te(() => {
|
|
53
59
|
const l = (u) => {
|
|
@@ -60,7 +66,10 @@ const Qi = ({ onClick: e, unreadCount: t = 0, widgetConfig: n }) => {
|
|
|
60
66
|
/* @__PURE__ */ S(
|
|
61
67
|
"button",
|
|
62
68
|
{
|
|
63
|
-
|
|
69
|
+
type: "button",
|
|
70
|
+
onClick: (l) => {
|
|
71
|
+
l.preventDefault(), l.stopPropagation(), i(!r);
|
|
72
|
+
},
|
|
64
73
|
className: "gpc-header-button gpc-focus-visible gpc-transition",
|
|
65
74
|
"aria-label": t("ui.languageSelector.label"),
|
|
66
75
|
title: t("ui.languageSelector.label"),
|
|
@@ -70,7 +79,8 @@ const Qi = ({ onClick: e, unreadCount: t = 0, widgetConfig: n }) => {
|
|
|
70
79
|
r && /* @__PURE__ */ S("div", { className: "gpc-language-dropdown", children: n.map((l) => /* @__PURE__ */ F(
|
|
71
80
|
"button",
|
|
72
81
|
{
|
|
73
|
-
|
|
82
|
+
type: "button",
|
|
83
|
+
onClick: (u) => s(u, l.code),
|
|
74
84
|
className: `gpc-language-option ${l.code === o.code ? "gpc-language-option-active" : ""}`,
|
|
75
85
|
children: [
|
|
76
86
|
/* @__PURE__ */ S("span", { className: "gpc-language-flag", children: l.flag }),
|
|
@@ -101,7 +111,10 @@ const Qi = ({ onClick: e, unreadCount: t = 0, widgetConfig: n }) => {
|
|
|
101
111
|
a && /* @__PURE__ */ F(
|
|
102
112
|
"button",
|
|
103
113
|
{
|
|
104
|
-
|
|
114
|
+
type: "button",
|
|
115
|
+
onClick: (k) => {
|
|
116
|
+
k.preventDefault(), k.stopPropagation(), a();
|
|
117
|
+
},
|
|
105
118
|
className: `gpc-header-button gpc-focus-visible gpc-transition relative ${o ? "bg-blue-500 text-white" : ""}`,
|
|
106
119
|
"aria-label": l("conversations.toggle", "Toggle conversations"),
|
|
107
120
|
title: l("conversations.toggle", "Toggle conversations"),
|
|
@@ -115,7 +128,10 @@ const Qi = ({ onClick: e, unreadCount: t = 0, widgetConfig: n }) => {
|
|
|
115
128
|
/* @__PURE__ */ S(
|
|
116
129
|
"button",
|
|
117
130
|
{
|
|
118
|
-
|
|
131
|
+
type: "button",
|
|
132
|
+
onClick: (k) => {
|
|
133
|
+
k.preventDefault(), k.stopPropagation(), e();
|
|
134
|
+
},
|
|
119
135
|
className: "gpc-header-button gpc-focus-visible gpc-transition",
|
|
120
136
|
"aria-label": l("chat.close"),
|
|
121
137
|
title: l("chat.close"),
|
|
@@ -195,7 +211,7 @@ ke.prototype.property = "";
|
|
|
195
211
|
ke.prototype.spaceSeparated = !1;
|
|
196
212
|
ke.prototype.space = void 0;
|
|
197
213
|
let lo = 0;
|
|
198
|
-
const U = je(), oe = je(), Xt = je(),
|
|
214
|
+
const U = je(), oe = je(), Xt = je(), I = je(), Z = je(), Ge = je(), we = je();
|
|
199
215
|
function je() {
|
|
200
216
|
return 2 ** ++lo;
|
|
201
217
|
}
|
|
@@ -205,10 +221,10 @@ const Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
205
221
|
booleanish: oe,
|
|
206
222
|
commaOrSpaceSeparated: we,
|
|
207
223
|
commaSeparated: Ge,
|
|
208
|
-
number:
|
|
224
|
+
number: I,
|
|
209
225
|
overloadedBoolean: Xt,
|
|
210
226
|
spaceSeparated: Z
|
|
211
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
227
|
+
}, Symbol.toStringTag, { value: "Module" })), Pt = (
|
|
212
228
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
213
229
|
Object.keys(Yt)
|
|
214
230
|
);
|
|
@@ -229,9 +245,9 @@ class sn extends ke {
|
|
|
229
245
|
constructor(t, n, r, i) {
|
|
230
246
|
let a = -1;
|
|
231
247
|
if (super(t, n), _n(this, "space", i), typeof r == "number")
|
|
232
|
-
for (; ++a <
|
|
233
|
-
const o =
|
|
234
|
-
_n(this,
|
|
248
|
+
for (; ++a < Pt.length; ) {
|
|
249
|
+
const o = Pt[a];
|
|
250
|
+
_n(this, Pt[a], (r & Yt[o]) === Yt[o]);
|
|
235
251
|
}
|
|
236
252
|
}
|
|
237
253
|
}
|
|
@@ -259,9 +275,9 @@ const kr = Xe({
|
|
|
259
275
|
ariaAutoComplete: null,
|
|
260
276
|
ariaBusy: oe,
|
|
261
277
|
ariaChecked: oe,
|
|
262
|
-
ariaColCount:
|
|
263
|
-
ariaColIndex:
|
|
264
|
-
ariaColSpan:
|
|
278
|
+
ariaColCount: I,
|
|
279
|
+
ariaColIndex: I,
|
|
280
|
+
ariaColSpan: I,
|
|
265
281
|
ariaControls: Z,
|
|
266
282
|
ariaCurrent: null,
|
|
267
283
|
ariaDescribedBy: Z,
|
|
@@ -278,7 +294,7 @@ const kr = Xe({
|
|
|
278
294
|
ariaKeyShortcuts: null,
|
|
279
295
|
ariaLabel: null,
|
|
280
296
|
ariaLabelledBy: Z,
|
|
281
|
-
ariaLevel:
|
|
297
|
+
ariaLevel: I,
|
|
282
298
|
ariaLive: null,
|
|
283
299
|
ariaModal: oe,
|
|
284
300
|
ariaMultiLine: oe,
|
|
@@ -286,21 +302,21 @@ const kr = Xe({
|
|
|
286
302
|
ariaOrientation: null,
|
|
287
303
|
ariaOwns: Z,
|
|
288
304
|
ariaPlaceholder: null,
|
|
289
|
-
ariaPosInSet:
|
|
305
|
+
ariaPosInSet: I,
|
|
290
306
|
ariaPressed: oe,
|
|
291
307
|
ariaReadOnly: oe,
|
|
292
308
|
ariaRelevant: null,
|
|
293
309
|
ariaRequired: oe,
|
|
294
310
|
ariaRoleDescription: Z,
|
|
295
|
-
ariaRowCount:
|
|
296
|
-
ariaRowIndex:
|
|
297
|
-
ariaRowSpan:
|
|
311
|
+
ariaRowCount: I,
|
|
312
|
+
ariaRowIndex: I,
|
|
313
|
+
ariaRowSpan: I,
|
|
298
314
|
ariaSelected: oe,
|
|
299
|
-
ariaSetSize:
|
|
315
|
+
ariaSetSize: I,
|
|
300
316
|
ariaSort: null,
|
|
301
|
-
ariaValueMax:
|
|
302
|
-
ariaValueMin:
|
|
303
|
-
ariaValueNow:
|
|
317
|
+
ariaValueMax: I,
|
|
318
|
+
ariaValueMin: I,
|
|
319
|
+
ariaValueNow: I,
|
|
304
320
|
ariaValueText: null,
|
|
305
321
|
role: null
|
|
306
322
|
},
|
|
@@ -346,13 +362,13 @@ const uo = Xe({
|
|
|
346
362
|
checked: U,
|
|
347
363
|
cite: null,
|
|
348
364
|
className: Z,
|
|
349
|
-
cols:
|
|
365
|
+
cols: I,
|
|
350
366
|
colSpan: null,
|
|
351
367
|
content: null,
|
|
352
368
|
contentEditable: oe,
|
|
353
369
|
controls: U,
|
|
354
370
|
controlsList: Z,
|
|
355
|
-
coords:
|
|
371
|
+
coords: I | Ge,
|
|
356
372
|
crossOrigin: null,
|
|
357
373
|
data: null,
|
|
358
374
|
dateTime: null,
|
|
@@ -374,9 +390,9 @@ const uo = Xe({
|
|
|
374
390
|
formNoValidate: U,
|
|
375
391
|
formTarget: null,
|
|
376
392
|
headers: Z,
|
|
377
|
-
height:
|
|
393
|
+
height: I,
|
|
378
394
|
hidden: Xt,
|
|
379
|
-
high:
|
|
395
|
+
high: I,
|
|
380
396
|
href: null,
|
|
381
397
|
hrefLang: null,
|
|
382
398
|
htmlFor: Z,
|
|
@@ -401,14 +417,14 @@ const uo = Xe({
|
|
|
401
417
|
list: null,
|
|
402
418
|
loading: null,
|
|
403
419
|
loop: U,
|
|
404
|
-
low:
|
|
420
|
+
low: I,
|
|
405
421
|
manifest: null,
|
|
406
422
|
max: null,
|
|
407
|
-
maxLength:
|
|
423
|
+
maxLength: I,
|
|
408
424
|
media: null,
|
|
409
425
|
method: null,
|
|
410
426
|
min: null,
|
|
411
|
-
minLength:
|
|
427
|
+
minLength: I,
|
|
412
428
|
multiple: U,
|
|
413
429
|
muted: U,
|
|
414
430
|
name: null,
|
|
@@ -504,7 +520,7 @@ const uo = Xe({
|
|
|
504
520
|
onWaiting: null,
|
|
505
521
|
onWheel: null,
|
|
506
522
|
open: U,
|
|
507
|
-
optimum:
|
|
523
|
+
optimum: I,
|
|
508
524
|
pattern: null,
|
|
509
525
|
ping: Z,
|
|
510
526
|
placeholder: null,
|
|
@@ -519,8 +535,8 @@ const uo = Xe({
|
|
|
519
535
|
rel: Z,
|
|
520
536
|
required: U,
|
|
521
537
|
reversed: U,
|
|
522
|
-
rows:
|
|
523
|
-
rowSpan:
|
|
538
|
+
rows: I,
|
|
539
|
+
rowSpan: I,
|
|
524
540
|
sandbox: Z,
|
|
525
541
|
scope: null,
|
|
526
542
|
scoped: U,
|
|
@@ -530,19 +546,19 @@ const uo = Xe({
|
|
|
530
546
|
shadowRootDelegatesFocus: U,
|
|
531
547
|
shadowRootMode: null,
|
|
532
548
|
shape: null,
|
|
533
|
-
size:
|
|
549
|
+
size: I,
|
|
534
550
|
sizes: null,
|
|
535
551
|
slot: null,
|
|
536
|
-
span:
|
|
552
|
+
span: I,
|
|
537
553
|
spellCheck: oe,
|
|
538
554
|
src: null,
|
|
539
555
|
srcDoc: null,
|
|
540
556
|
srcLang: null,
|
|
541
557
|
srcSet: null,
|
|
542
|
-
start:
|
|
558
|
+
start: I,
|
|
543
559
|
step: null,
|
|
544
560
|
style: null,
|
|
545
|
-
tabIndex:
|
|
561
|
+
tabIndex: I,
|
|
546
562
|
target: null,
|
|
547
563
|
title: null,
|
|
548
564
|
translate: null,
|
|
@@ -550,7 +566,7 @@ const uo = Xe({
|
|
|
550
566
|
typeMustMatch: U,
|
|
551
567
|
useMap: null,
|
|
552
568
|
value: oe,
|
|
553
|
-
width:
|
|
569
|
+
width: I,
|
|
554
570
|
wrap: null,
|
|
555
571
|
writingSuggestions: null,
|
|
556
572
|
// Legacy.
|
|
@@ -567,11 +583,11 @@ const uo = Xe({
|
|
|
567
583
|
// `<body>`. Use CSS `background-image` instead
|
|
568
584
|
bgColor: null,
|
|
569
585
|
// `<body>` and table elements. Use CSS `background-color` instead
|
|
570
|
-
border:
|
|
586
|
+
border: I,
|
|
571
587
|
// `<table>`. Use CSS `border-width` instead,
|
|
572
588
|
borderColor: null,
|
|
573
589
|
// `<table>`. Use CSS `border-color` instead,
|
|
574
|
-
bottomMargin:
|
|
590
|
+
bottomMargin: I,
|
|
575
591
|
// `<body>`
|
|
576
592
|
cellPadding: null,
|
|
577
593
|
// `<table>`
|
|
@@ -605,9 +621,9 @@ const uo = Xe({
|
|
|
605
621
|
// `<table>`
|
|
606
622
|
frameBorder: null,
|
|
607
623
|
// `<iframe>`. Use CSS `border` instead
|
|
608
|
-
hSpace:
|
|
624
|
+
hSpace: I,
|
|
609
625
|
// `<img>` and `<object>`
|
|
610
|
-
leftMargin:
|
|
626
|
+
leftMargin: I,
|
|
611
627
|
// `<body>`
|
|
612
628
|
link: null,
|
|
613
629
|
// `<body>`. Use CSS `a:link {color: *}` instead
|
|
@@ -615,9 +631,9 @@ const uo = Xe({
|
|
|
615
631
|
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
|
616
632
|
lowSrc: null,
|
|
617
633
|
// `<img>`. Use a `<picture>`
|
|
618
|
-
marginHeight:
|
|
634
|
+
marginHeight: I,
|
|
619
635
|
// `<body>`
|
|
620
|
-
marginWidth:
|
|
636
|
+
marginWidth: I,
|
|
621
637
|
// `<body>`
|
|
622
638
|
noResize: U,
|
|
623
639
|
// `<frame>`
|
|
@@ -635,7 +651,7 @@ const uo = Xe({
|
|
|
635
651
|
// `<isindex>`
|
|
636
652
|
rev: null,
|
|
637
653
|
// `<link>`
|
|
638
|
-
rightMargin:
|
|
654
|
+
rightMargin: I,
|
|
639
655
|
// `<body>`
|
|
640
656
|
rules: null,
|
|
641
657
|
// `<table>`
|
|
@@ -649,7 +665,7 @@ const uo = Xe({
|
|
|
649
665
|
// `<table>`
|
|
650
666
|
text: null,
|
|
651
667
|
// `<body>`. Use CSS `color` instead
|
|
652
|
-
topMargin:
|
|
668
|
+
topMargin: I,
|
|
653
669
|
// `<body>`
|
|
654
670
|
valueType: null,
|
|
655
671
|
// `<param>`
|
|
@@ -659,7 +675,7 @@ const uo = Xe({
|
|
|
659
675
|
// Several. Use CSS `vertical-align` instead
|
|
660
676
|
vLink: null,
|
|
661
677
|
// `<body>`. Use CSS `a:visited {color}` instead
|
|
662
|
-
vSpace:
|
|
678
|
+
vSpace: I,
|
|
663
679
|
// `<img>` and `<object>`
|
|
664
680
|
// Non-standard Properties.
|
|
665
681
|
allowTransparency: null,
|
|
@@ -669,7 +685,7 @@ const uo = Xe({
|
|
|
669
685
|
disableRemotePlayback: U,
|
|
670
686
|
prefix: null,
|
|
671
687
|
property: null,
|
|
672
|
-
results:
|
|
688
|
+
results: I,
|
|
673
689
|
security: null,
|
|
674
690
|
unselectable: null
|
|
675
691
|
},
|
|
@@ -853,27 +869,27 @@ const uo = Xe({
|
|
|
853
869
|
},
|
|
854
870
|
properties: {
|
|
855
871
|
about: we,
|
|
856
|
-
accentHeight:
|
|
872
|
+
accentHeight: I,
|
|
857
873
|
accumulate: null,
|
|
858
874
|
additive: null,
|
|
859
875
|
alignmentBaseline: null,
|
|
860
|
-
alphabetic:
|
|
861
|
-
amplitude:
|
|
876
|
+
alphabetic: I,
|
|
877
|
+
amplitude: I,
|
|
862
878
|
arabicForm: null,
|
|
863
|
-
ascent:
|
|
879
|
+
ascent: I,
|
|
864
880
|
attributeName: null,
|
|
865
881
|
attributeType: null,
|
|
866
|
-
azimuth:
|
|
882
|
+
azimuth: I,
|
|
867
883
|
bandwidth: null,
|
|
868
884
|
baselineShift: null,
|
|
869
885
|
baseFrequency: null,
|
|
870
886
|
baseProfile: null,
|
|
871
887
|
bbox: null,
|
|
872
888
|
begin: null,
|
|
873
|
-
bias:
|
|
889
|
+
bias: I,
|
|
874
890
|
by: null,
|
|
875
891
|
calcMode: null,
|
|
876
|
-
capHeight:
|
|
892
|
+
capHeight: I,
|
|
877
893
|
className: Z,
|
|
878
894
|
clip: null,
|
|
879
895
|
clipPath: null,
|
|
@@ -894,26 +910,26 @@ const uo = Xe({
|
|
|
894
910
|
d: null,
|
|
895
911
|
dataType: null,
|
|
896
912
|
defaultAction: null,
|
|
897
|
-
descent:
|
|
898
|
-
diffuseConstant:
|
|
913
|
+
descent: I,
|
|
914
|
+
diffuseConstant: I,
|
|
899
915
|
direction: null,
|
|
900
916
|
display: null,
|
|
901
917
|
dur: null,
|
|
902
|
-
divisor:
|
|
918
|
+
divisor: I,
|
|
903
919
|
dominantBaseline: null,
|
|
904
920
|
download: U,
|
|
905
921
|
dx: null,
|
|
906
922
|
dy: null,
|
|
907
923
|
edgeMode: null,
|
|
908
924
|
editable: null,
|
|
909
|
-
elevation:
|
|
925
|
+
elevation: I,
|
|
910
926
|
enableBackground: null,
|
|
911
927
|
end: null,
|
|
912
928
|
event: null,
|
|
913
|
-
exponent:
|
|
929
|
+
exponent: I,
|
|
914
930
|
externalResourcesRequired: null,
|
|
915
931
|
fill: null,
|
|
916
|
-
fillOpacity:
|
|
932
|
+
fillOpacity: I,
|
|
917
933
|
fillRule: null,
|
|
918
934
|
filter: null,
|
|
919
935
|
filterRes: null,
|
|
@@ -943,27 +959,27 @@ const uo = Xe({
|
|
|
943
959
|
gradientTransform: null,
|
|
944
960
|
gradientUnits: null,
|
|
945
961
|
handler: null,
|
|
946
|
-
hanging:
|
|
962
|
+
hanging: I,
|
|
947
963
|
hatchContentUnits: null,
|
|
948
964
|
hatchUnits: null,
|
|
949
965
|
height: null,
|
|
950
966
|
href: null,
|
|
951
967
|
hrefLang: null,
|
|
952
|
-
horizAdvX:
|
|
953
|
-
horizOriginX:
|
|
954
|
-
horizOriginY:
|
|
968
|
+
horizAdvX: I,
|
|
969
|
+
horizOriginX: I,
|
|
970
|
+
horizOriginY: I,
|
|
955
971
|
id: null,
|
|
956
|
-
ideographic:
|
|
972
|
+
ideographic: I,
|
|
957
973
|
imageRendering: null,
|
|
958
974
|
initialVisibility: null,
|
|
959
975
|
in: null,
|
|
960
976
|
in2: null,
|
|
961
|
-
intercept:
|
|
962
|
-
k:
|
|
963
|
-
k1:
|
|
964
|
-
k2:
|
|
965
|
-
k3:
|
|
966
|
-
k4:
|
|
977
|
+
intercept: I,
|
|
978
|
+
k: I,
|
|
979
|
+
k1: I,
|
|
980
|
+
k2: I,
|
|
981
|
+
k3: I,
|
|
982
|
+
k4: I,
|
|
967
983
|
kernelMatrix: we,
|
|
968
984
|
kernelUnitLength: null,
|
|
969
985
|
keyPoints: null,
|
|
@@ -977,7 +993,7 @@ const uo = Xe({
|
|
|
977
993
|
lengthAdjust: null,
|
|
978
994
|
letterSpacing: null,
|
|
979
995
|
lightingColor: null,
|
|
980
|
-
limitingConeAngle:
|
|
996
|
+
limitingConeAngle: I,
|
|
981
997
|
local: null,
|
|
982
998
|
markerEnd: null,
|
|
983
999
|
markerMid: null,
|
|
@@ -993,7 +1009,7 @@ const uo = Xe({
|
|
|
993
1009
|
media: null,
|
|
994
1010
|
mediaCharacterEncoding: null,
|
|
995
1011
|
mediaContentEncodings: null,
|
|
996
|
-
mediaSize:
|
|
1012
|
+
mediaSize: I,
|
|
997
1013
|
mediaTime: null,
|
|
998
1014
|
method: null,
|
|
999
1015
|
min: null,
|
|
@@ -1099,12 +1115,12 @@ const uo = Xe({
|
|
|
1099
1115
|
origin: null,
|
|
1100
1116
|
overflow: null,
|
|
1101
1117
|
overlay: null,
|
|
1102
|
-
overlinePosition:
|
|
1103
|
-
overlineThickness:
|
|
1118
|
+
overlinePosition: I,
|
|
1119
|
+
overlineThickness: I,
|
|
1104
1120
|
paintOrder: null,
|
|
1105
1121
|
panose1: null,
|
|
1106
1122
|
path: null,
|
|
1107
|
-
pathLength:
|
|
1123
|
+
pathLength: I,
|
|
1108
1124
|
patternContentUnits: null,
|
|
1109
1125
|
patternTransform: null,
|
|
1110
1126
|
patternUnits: null,
|
|
@@ -1114,9 +1130,9 @@ const uo = Xe({
|
|
|
1114
1130
|
playbackOrder: null,
|
|
1115
1131
|
pointerEvents: null,
|
|
1116
1132
|
points: null,
|
|
1117
|
-
pointsAtX:
|
|
1118
|
-
pointsAtY:
|
|
1119
|
-
pointsAtZ:
|
|
1133
|
+
pointsAtX: I,
|
|
1134
|
+
pointsAtY: I,
|
|
1135
|
+
pointsAtZ: I,
|
|
1120
1136
|
preserveAlpha: null,
|
|
1121
1137
|
preserveAspectRatio: null,
|
|
1122
1138
|
primitiveUnits: null,
|
|
@@ -1148,8 +1164,8 @@ const uo = Xe({
|
|
|
1148
1164
|
side: null,
|
|
1149
1165
|
slope: null,
|
|
1150
1166
|
snapshotTime: null,
|
|
1151
|
-
specularConstant:
|
|
1152
|
-
specularExponent:
|
|
1167
|
+
specularConstant: I,
|
|
1168
|
+
specularExponent: I,
|
|
1153
1169
|
spreadMethod: null,
|
|
1154
1170
|
spacing: null,
|
|
1155
1171
|
startOffset: null,
|
|
@@ -1159,30 +1175,30 @@ const uo = Xe({
|
|
|
1159
1175
|
stitchTiles: null,
|
|
1160
1176
|
stopColor: null,
|
|
1161
1177
|
stopOpacity: null,
|
|
1162
|
-
strikethroughPosition:
|
|
1163
|
-
strikethroughThickness:
|
|
1178
|
+
strikethroughPosition: I,
|
|
1179
|
+
strikethroughThickness: I,
|
|
1164
1180
|
string: null,
|
|
1165
1181
|
stroke: null,
|
|
1166
1182
|
strokeDashArray: we,
|
|
1167
1183
|
strokeDashOffset: null,
|
|
1168
1184
|
strokeLineCap: null,
|
|
1169
1185
|
strokeLineJoin: null,
|
|
1170
|
-
strokeMiterLimit:
|
|
1171
|
-
strokeOpacity:
|
|
1186
|
+
strokeMiterLimit: I,
|
|
1187
|
+
strokeOpacity: I,
|
|
1172
1188
|
strokeWidth: null,
|
|
1173
1189
|
style: null,
|
|
1174
|
-
surfaceScale:
|
|
1190
|
+
surfaceScale: I,
|
|
1175
1191
|
syncBehavior: null,
|
|
1176
1192
|
syncBehaviorDefault: null,
|
|
1177
1193
|
syncMaster: null,
|
|
1178
1194
|
syncTolerance: null,
|
|
1179
1195
|
syncToleranceDefault: null,
|
|
1180
1196
|
systemLanguage: we,
|
|
1181
|
-
tabIndex:
|
|
1197
|
+
tabIndex: I,
|
|
1182
1198
|
tableValues: null,
|
|
1183
1199
|
target: null,
|
|
1184
|
-
targetX:
|
|
1185
|
-
targetY:
|
|
1200
|
+
targetX: I,
|
|
1201
|
+
targetY: I,
|
|
1186
1202
|
textAnchor: null,
|
|
1187
1203
|
textDecoration: null,
|
|
1188
1204
|
textRendering: null,
|
|
@@ -1197,22 +1213,22 @@ const uo = Xe({
|
|
|
1197
1213
|
transformOrigin: null,
|
|
1198
1214
|
u1: null,
|
|
1199
1215
|
u2: null,
|
|
1200
|
-
underlinePosition:
|
|
1201
|
-
underlineThickness:
|
|
1216
|
+
underlinePosition: I,
|
|
1217
|
+
underlineThickness: I,
|
|
1202
1218
|
unicode: null,
|
|
1203
1219
|
unicodeBidi: null,
|
|
1204
1220
|
unicodeRange: null,
|
|
1205
|
-
unitsPerEm:
|
|
1221
|
+
unitsPerEm: I,
|
|
1206
1222
|
values: null,
|
|
1207
|
-
vAlphabetic:
|
|
1208
|
-
vMathematical:
|
|
1223
|
+
vAlphabetic: I,
|
|
1224
|
+
vMathematical: I,
|
|
1209
1225
|
vectorEffect: null,
|
|
1210
|
-
vHanging:
|
|
1211
|
-
vIdeographic:
|
|
1226
|
+
vHanging: I,
|
|
1227
|
+
vIdeographic: I,
|
|
1212
1228
|
version: null,
|
|
1213
|
-
vertAdvY:
|
|
1214
|
-
vertOriginX:
|
|
1215
|
-
vertOriginY:
|
|
1229
|
+
vertAdvY: I,
|
|
1230
|
+
vertOriginX: I,
|
|
1231
|
+
vertOriginY: I,
|
|
1216
1232
|
viewBox: null,
|
|
1217
1233
|
viewTarget: null,
|
|
1218
1234
|
visibility: null,
|
|
@@ -1224,7 +1240,7 @@ const uo = Xe({
|
|
|
1224
1240
|
x1: null,
|
|
1225
1241
|
x2: null,
|
|
1226
1242
|
xChannelSelector: null,
|
|
1227
|
-
xHeight:
|
|
1243
|
+
xHeight: I,
|
|
1228
1244
|
y: null,
|
|
1229
1245
|
y1: null,
|
|
1230
1246
|
y2: null,
|
|
@@ -1277,7 +1293,7 @@ const uo = Xe({
|
|
|
1277
1293
|
xLinkTitle: "xlinkTitle",
|
|
1278
1294
|
xLinkType: "xlinkType",
|
|
1279
1295
|
xmlnsXLink: "xmlnsXlink"
|
|
1280
|
-
}, fo = /[A-Z]/g,
|
|
1296
|
+
}, fo = /[A-Z]/g, Pn = /-[a-z]/g, po = /^data[-\w.:]+$/i;
|
|
1281
1297
|
function mo(e, t) {
|
|
1282
1298
|
const n = Kt(t);
|
|
1283
1299
|
let r = t, i = ke;
|
|
@@ -1285,11 +1301,11 @@ function mo(e, t) {
|
|
|
1285
1301
|
return e.property[e.normal[n]];
|
|
1286
1302
|
if (n.length > 4 && n.slice(0, 4) === "data" && po.test(t)) {
|
|
1287
1303
|
if (t.charAt(4) === "-") {
|
|
1288
|
-
const a = t.slice(5).replace(
|
|
1304
|
+
const a = t.slice(5).replace(Pn, yo);
|
|
1289
1305
|
r = "data" + a.charAt(0).toUpperCase() + a.slice(1);
|
|
1290
1306
|
} else {
|
|
1291
1307
|
const a = t.slice(4);
|
|
1292
|
-
if (!
|
|
1308
|
+
if (!Pn.test(a)) {
|
|
1293
1309
|
let o = a.replace(fo, go);
|
|
1294
1310
|
o.charAt(0) !== "-" && (o = "-" + o), t = "data" + o;
|
|
1295
1311
|
}
|
|
@@ -1311,13 +1327,13 @@ function bo(e) {
|
|
|
1311
1327
|
function Sr(e) {
|
|
1312
1328
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1313
1329
|
}
|
|
1314
|
-
var Ve = {},
|
|
1330
|
+
var Ve = {}, Dt, Dn;
|
|
1315
1331
|
function xo() {
|
|
1316
|
-
if (
|
|
1317
|
-
|
|
1332
|
+
if (Dn) return Dt;
|
|
1333
|
+
Dn = 1;
|
|
1318
1334
|
var e = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, t = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, i = /^:\s*/, a = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, o = /^[;\s]*/, s = /^\s+|\s+$/g, l = `
|
|
1319
1335
|
`, u = "/", h = "*", c = "", p = "comment", f = "declaration";
|
|
1320
|
-
|
|
1336
|
+
Dt = function(b, v) {
|
|
1321
1337
|
if (typeof b != "string")
|
|
1322
1338
|
throw new TypeError("First argument must be a string");
|
|
1323
1339
|
if (!b) return [];
|
|
@@ -1329,23 +1345,23 @@ function xo() {
|
|
|
1329
1345
|
var R = _.lastIndexOf(l);
|
|
1330
1346
|
w = ~R ? _.length - R : w + _.length;
|
|
1331
1347
|
}
|
|
1332
|
-
function
|
|
1348
|
+
function z() {
|
|
1333
1349
|
var _ = { line: k, column: w };
|
|
1334
1350
|
return function(A) {
|
|
1335
|
-
return A.position = new
|
|
1351
|
+
return A.position = new P(_), O(), A;
|
|
1336
1352
|
};
|
|
1337
1353
|
}
|
|
1338
|
-
function
|
|
1354
|
+
function P(_) {
|
|
1339
1355
|
this.start = _, this.end = { line: k, column: w }, this.source = v.source;
|
|
1340
1356
|
}
|
|
1341
|
-
|
|
1357
|
+
P.prototype.content = b;
|
|
1342
1358
|
function x(_) {
|
|
1343
1359
|
var A = new Error(
|
|
1344
1360
|
v.source + ":" + k + ":" + w + ": " + _
|
|
1345
1361
|
);
|
|
1346
1362
|
if (A.reason = _, A.filename = v.source, A.line = k, A.column = w, A.source = b, !v.silent) throw A;
|
|
1347
1363
|
}
|
|
1348
|
-
function
|
|
1364
|
+
function N(_) {
|
|
1349
1365
|
var A = _.exec(b);
|
|
1350
1366
|
if (A) {
|
|
1351
1367
|
var R = A[0];
|
|
@@ -1353,7 +1369,7 @@ function xo() {
|
|
|
1353
1369
|
}
|
|
1354
1370
|
}
|
|
1355
1371
|
function O() {
|
|
1356
|
-
|
|
1372
|
+
N(n);
|
|
1357
1373
|
}
|
|
1358
1374
|
function B(_) {
|
|
1359
1375
|
var A;
|
|
@@ -1362,7 +1378,7 @@ function xo() {
|
|
|
1362
1378
|
return _;
|
|
1363
1379
|
}
|
|
1364
1380
|
function y() {
|
|
1365
|
-
var _ =
|
|
1381
|
+
var _ = z();
|
|
1366
1382
|
if (!(u != b.charAt(0) || h != b.charAt(1))) {
|
|
1367
1383
|
for (var A = 2; c != b.charAt(A) && (h != b.charAt(A) || u != b.charAt(A + 1)); )
|
|
1368
1384
|
++A;
|
|
@@ -1375,36 +1391,36 @@ function xo() {
|
|
|
1375
1391
|
});
|
|
1376
1392
|
}
|
|
1377
1393
|
}
|
|
1378
|
-
function
|
|
1379
|
-
var _ =
|
|
1394
|
+
function E() {
|
|
1395
|
+
var _ = z(), A = N(r);
|
|
1380
1396
|
if (A) {
|
|
1381
|
-
if (y(), !
|
|
1382
|
-
var R =
|
|
1397
|
+
if (y(), !N(i)) return x("property missing ':'");
|
|
1398
|
+
var R = N(a), W = _({
|
|
1383
1399
|
type: f,
|
|
1384
1400
|
property: d(A[0].replace(e, c)),
|
|
1385
1401
|
value: R ? d(R[0].replace(e, c)) : c
|
|
1386
1402
|
});
|
|
1387
|
-
return
|
|
1403
|
+
return N(o), W;
|
|
1388
1404
|
}
|
|
1389
1405
|
}
|
|
1390
|
-
function
|
|
1406
|
+
function L() {
|
|
1391
1407
|
var _ = [];
|
|
1392
1408
|
B(_);
|
|
1393
|
-
for (var A; A =
|
|
1409
|
+
for (var A; A = E(); )
|
|
1394
1410
|
A !== !1 && (_.push(A), B(_));
|
|
1395
1411
|
return _;
|
|
1396
1412
|
}
|
|
1397
|
-
return O(),
|
|
1413
|
+
return O(), L();
|
|
1398
1414
|
};
|
|
1399
1415
|
function d(b) {
|
|
1400
1416
|
return b ? b.replace(s, c) : c;
|
|
1401
1417
|
}
|
|
1402
|
-
return
|
|
1418
|
+
return Dt;
|
|
1403
1419
|
}
|
|
1404
|
-
var
|
|
1420
|
+
var Nn;
|
|
1405
1421
|
function wo() {
|
|
1406
|
-
if (
|
|
1407
|
-
|
|
1422
|
+
if (Nn) return Ve;
|
|
1423
|
+
Nn = 1;
|
|
1408
1424
|
var e = Ve && Ve.__importDefault || function(r) {
|
|
1409
1425
|
return r && r.__esModule ? r : { default: r };
|
|
1410
1426
|
};
|
|
@@ -1424,10 +1440,10 @@ function wo() {
|
|
|
1424
1440
|
}
|
|
1425
1441
|
return Ve;
|
|
1426
1442
|
}
|
|
1427
|
-
var Ze = {},
|
|
1443
|
+
var Ze = {}, Ln;
|
|
1428
1444
|
function vo() {
|
|
1429
|
-
if (
|
|
1430
|
-
|
|
1445
|
+
if (Ln) return Ze;
|
|
1446
|
+
Ln = 1, Object.defineProperty(Ze, "__esModule", { value: !0 }), Ze.camelCase = void 0;
|
|
1431
1447
|
var e = /^--[a-zA-Z0-9_-]+$/, t = /-([a-z])/g, n = /^[^-]+$/, r = /^-(webkit|moz|ms|o|khtml)-/, i = /^-(ms)-/, a = function(u) {
|
|
1432
1448
|
return !u || n.test(u) || e.test(u);
|
|
1433
1449
|
}, o = function(u, h) {
|
|
@@ -1572,8 +1588,8 @@ he.prototype.fatal = void 0;
|
|
|
1572
1588
|
he.prototype.place = void 0;
|
|
1573
1589
|
he.prototype.ruleId = void 0;
|
|
1574
1590
|
he.prototype.source = void 0;
|
|
1575
|
-
const cn = {}.hasOwnProperty, Io = /* @__PURE__ */ new Map(), Ao = /[A-Z]/g, _o = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]),
|
|
1576
|
-
function
|
|
1591
|
+
const cn = {}.hasOwnProperty, Io = /* @__PURE__ */ new Map(), Ao = /[A-Z]/g, _o = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Po = /* @__PURE__ */ new Set(["td", "th"]), Ir = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
1592
|
+
function Do(e, t) {
|
|
1577
1593
|
if (!t || t.Fragment === void 0)
|
|
1578
1594
|
throw new TypeError("Expected `Fragment` in options");
|
|
1579
1595
|
const n = t.filePath || void 0;
|
|
@@ -1615,9 +1631,9 @@ function Lo(e, t) {
|
|
|
1615
1631
|
}
|
|
1616
1632
|
function Ar(e, t, n) {
|
|
1617
1633
|
if (t.type === "element")
|
|
1618
|
-
return
|
|
1634
|
+
return No(e, t, n);
|
|
1619
1635
|
if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression")
|
|
1620
|
-
return
|
|
1636
|
+
return Lo(e, t);
|
|
1621
1637
|
if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement")
|
|
1622
1638
|
return Ro(e, t, n);
|
|
1623
1639
|
if (t.type === "mdxjsEsm")
|
|
@@ -1627,17 +1643,17 @@ function Ar(e, t, n) {
|
|
|
1627
1643
|
if (t.type === "text")
|
|
1628
1644
|
return Oo(e, t);
|
|
1629
1645
|
}
|
|
1630
|
-
function
|
|
1646
|
+
function No(e, t, n) {
|
|
1631
1647
|
const r = e.schema;
|
|
1632
1648
|
let i = r;
|
|
1633
1649
|
t.tagName.toLowerCase() === "svg" && r.space === "html" && (i = ln, e.schema = i), e.ancestors.push(t);
|
|
1634
|
-
const a =
|
|
1650
|
+
const a = Pr(e, t.tagName, !1), o = jo(e, t);
|
|
1635
1651
|
let s = fn(e, t);
|
|
1636
1652
|
return _o.has(t.tagName) && (s = s.filter(function(l) {
|
|
1637
1653
|
return typeof l == "string" ? !so(l) : !0;
|
|
1638
1654
|
})), _r(e, o, a, t), hn(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
|
|
1639
1655
|
}
|
|
1640
|
-
function
|
|
1656
|
+
function Lo(e, t) {
|
|
1641
1657
|
if (t.data && t.data.estree && e.evaluater) {
|
|
1642
1658
|
const r = t.data.estree.body[0];
|
|
1643
1659
|
return r.type, /** @type {Child | undefined} */
|
|
@@ -1657,7 +1673,7 @@ function Ro(e, t, n) {
|
|
|
1657
1673
|
const r = e.schema;
|
|
1658
1674
|
let i = r;
|
|
1659
1675
|
t.name === "svg" && r.space === "html" && (i = ln, e.schema = i), e.ancestors.push(t);
|
|
1660
|
-
const a = t.name === null ? e.Fragment :
|
|
1676
|
+
const a = t.name === null ? e.Fragment : Pr(e, t.name, !0), o = Uo(e, t), s = fn(e, t);
|
|
1661
1677
|
return _r(e, o, a, t), hn(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
|
|
1662
1678
|
}
|
|
1663
1679
|
function Mo(e, t, n) {
|
|
@@ -1709,7 +1725,7 @@ function jo(e, t) {
|
|
|
1709
1725
|
const a = Ho(e, i, t.properties[i]);
|
|
1710
1726
|
if (a) {
|
|
1711
1727
|
const [o, s] = a;
|
|
1712
|
-
e.tableCellAlignToStyle && o === "align" && typeof s == "string" &&
|
|
1728
|
+
e.tableCellAlignToStyle && o === "align" && typeof s == "string" && Po.has(t.tagName) ? r = s : n[o] = s;
|
|
1713
1729
|
}
|
|
1714
1730
|
}
|
|
1715
1731
|
if (r) {
|
|
@@ -1803,7 +1819,7 @@ function $o(e, t) {
|
|
|
1803
1819
|
throw i.file = e.filePath || void 0, i.url = Ir + "#cannot-parse-style-attribute", i;
|
|
1804
1820
|
}
|
|
1805
1821
|
}
|
|
1806
|
-
function
|
|
1822
|
+
function Pr(e, t, n) {
|
|
1807
1823
|
let r;
|
|
1808
1824
|
if (!n)
|
|
1809
1825
|
r = { type: "Literal", value: t };
|
|
@@ -1860,7 +1876,7 @@ function qo(e) {
|
|
|
1860
1876
|
function Wo(e) {
|
|
1861
1877
|
return "-" + e.toLowerCase();
|
|
1862
1878
|
}
|
|
1863
|
-
const
|
|
1879
|
+
const Nt = {
|
|
1864
1880
|
action: ["form"],
|
|
1865
1881
|
cite: ["blockquote", "del", "ins", "q"],
|
|
1866
1882
|
data: ["object"],
|
|
@@ -1885,9 +1901,9 @@ const Pt = {
|
|
|
1885
1901
|
}, Go = {};
|
|
1886
1902
|
function pn(e, t) {
|
|
1887
1903
|
const n = Go, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, i = typeof n.includeHtml == "boolean" ? n.includeHtml : !0;
|
|
1888
|
-
return
|
|
1904
|
+
return Dr(e, r, i);
|
|
1889
1905
|
}
|
|
1890
|
-
function
|
|
1906
|
+
function Dr(e, t, n) {
|
|
1891
1907
|
if (Ko(e)) {
|
|
1892
1908
|
if ("value" in e)
|
|
1893
1909
|
return e.type === "html" && !n ? "" : e.value;
|
|
@@ -1902,7 +1918,7 @@ function On(e, t, n) {
|
|
|
1902
1918
|
const r = [];
|
|
1903
1919
|
let i = -1;
|
|
1904
1920
|
for (; ++i < e.length; )
|
|
1905
|
-
r[i] =
|
|
1921
|
+
r[i] = Dr(e[i], t, n);
|
|
1906
1922
|
return r.join("");
|
|
1907
1923
|
}
|
|
1908
1924
|
function Ko(e) {
|
|
@@ -1932,7 +1948,7 @@ function Ce(e, t) {
|
|
|
1932
1948
|
return e.length > 0 ? (ve(e, e.length, 0, t), e) : t;
|
|
1933
1949
|
}
|
|
1934
1950
|
const Bn = {}.hasOwnProperty;
|
|
1935
|
-
function
|
|
1951
|
+
function Nr(e) {
|
|
1936
1952
|
const t = {};
|
|
1937
1953
|
let n = -1;
|
|
1938
1954
|
for (; ++n < e.length; )
|
|
@@ -1963,7 +1979,7 @@ function Yo(e, t) {
|
|
|
1963
1979
|
(t[n].add === "after" ? e : r).push(t[n]);
|
|
1964
1980
|
ve(e, 0, 0, r);
|
|
1965
1981
|
}
|
|
1966
|
-
function
|
|
1982
|
+
function Lr(e, t) {
|
|
1967
1983
|
const n = Number.parseInt(e, t);
|
|
1968
1984
|
return (
|
|
1969
1985
|
// C0 except for HT, LF, FF, CR, space.
|
|
@@ -2077,28 +2093,28 @@ function ra(e) {
|
|
|
2077
2093
|
return s;
|
|
2078
2094
|
function s(T) {
|
|
2079
2095
|
if (r < n.length) {
|
|
2080
|
-
const
|
|
2081
|
-
return t.containerState =
|
|
2096
|
+
const z = n[r];
|
|
2097
|
+
return t.containerState = z[1], e.attempt(z[0].continuation, l, u)(T);
|
|
2082
2098
|
}
|
|
2083
2099
|
return u(T);
|
|
2084
2100
|
}
|
|
2085
2101
|
function l(T) {
|
|
2086
2102
|
if (r++, t.containerState._closeFlow) {
|
|
2087
2103
|
t.containerState._closeFlow = void 0, i && w();
|
|
2088
|
-
const
|
|
2089
|
-
let
|
|
2090
|
-
for (;
|
|
2091
|
-
if (t.events[
|
|
2092
|
-
x = t.events[
|
|
2104
|
+
const z = t.events.length;
|
|
2105
|
+
let P = z, x;
|
|
2106
|
+
for (; P--; )
|
|
2107
|
+
if (t.events[P][0] === "exit" && t.events[P][1].type === "chunkFlow") {
|
|
2108
|
+
x = t.events[P][1].end;
|
|
2093
2109
|
break;
|
|
2094
2110
|
}
|
|
2095
2111
|
k(r);
|
|
2096
|
-
let
|
|
2097
|
-
for (;
|
|
2098
|
-
t.events[
|
|
2112
|
+
let N = z;
|
|
2113
|
+
for (; N < t.events.length; )
|
|
2114
|
+
t.events[N][1].end = {
|
|
2099
2115
|
...x
|
|
2100
|
-
},
|
|
2101
|
-
return ve(t.events,
|
|
2116
|
+
}, N++;
|
|
2117
|
+
return ve(t.events, P + 1, 0, t.events.slice(z)), t.events.length = N, u(T);
|
|
2102
2118
|
}
|
|
2103
2119
|
return s(T);
|
|
2104
2120
|
}
|
|
@@ -2142,9 +2158,9 @@ function ra(e) {
|
|
|
2142
2158
|
}
|
|
2143
2159
|
return M(T) ? (e.consume(T), v(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(T), b);
|
|
2144
2160
|
}
|
|
2145
|
-
function v(T,
|
|
2146
|
-
const
|
|
2147
|
-
if (
|
|
2161
|
+
function v(T, z) {
|
|
2162
|
+
const P = t.sliceStream(T);
|
|
2163
|
+
if (z && P.push(null), T.previous = a, a && (a.next = T), a = T, i.defineSkip(T.start), i.write(P), t.parser.lazy[T.start.line]) {
|
|
2148
2164
|
let x = i.events.length;
|
|
2149
2165
|
for (; x--; )
|
|
2150
2166
|
if (
|
|
@@ -2154,8 +2170,8 @@ function ra(e) {
|
|
|
2154
2170
|
i.events[x][1].end.offset > o)
|
|
2155
2171
|
)
|
|
2156
2172
|
return;
|
|
2157
|
-
const
|
|
2158
|
-
let O =
|
|
2173
|
+
const N = t.events.length;
|
|
2174
|
+
let O = N, B, y;
|
|
2159
2175
|
for (; O--; )
|
|
2160
2176
|
if (t.events[O][0] === "exit" && t.events[O][1].type === "chunkFlow") {
|
|
2161
2177
|
if (B) {
|
|
@@ -2164,18 +2180,18 @@ function ra(e) {
|
|
|
2164
2180
|
}
|
|
2165
2181
|
B = !0;
|
|
2166
2182
|
}
|
|
2167
|
-
for (k(r), x =
|
|
2183
|
+
for (k(r), x = N; x < t.events.length; )
|
|
2168
2184
|
t.events[x][1].end = {
|
|
2169
2185
|
...y
|
|
2170
2186
|
}, x++;
|
|
2171
|
-
ve(t.events, O + 1, 0, t.events.slice(
|
|
2187
|
+
ve(t.events, O + 1, 0, t.events.slice(N)), t.events.length = x;
|
|
2172
2188
|
}
|
|
2173
2189
|
}
|
|
2174
2190
|
function k(T) {
|
|
2175
|
-
let
|
|
2176
|
-
for (;
|
|
2177
|
-
const
|
|
2178
|
-
t.containerState =
|
|
2191
|
+
let z = n.length;
|
|
2192
|
+
for (; z-- > T; ) {
|
|
2193
|
+
const P = n[z];
|
|
2194
|
+
t.containerState = P[1], P[0].exit.call(t, e);
|
|
2179
2195
|
}
|
|
2180
2196
|
n.length = T;
|
|
2181
2197
|
}
|
|
@@ -2416,7 +2432,7 @@ const Hn = {
|
|
|
2416
2432
|
function ma(e, t, n) {
|
|
2417
2433
|
const r = this, i = {
|
|
2418
2434
|
partial: !0,
|
|
2419
|
-
tokenize:
|
|
2435
|
+
tokenize: P
|
|
2420
2436
|
};
|
|
2421
2437
|
let a = 0, o = 0, s;
|
|
2422
2438
|
return l;
|
|
@@ -2424,14 +2440,14 @@ function ma(e, t, n) {
|
|
|
2424
2440
|
return u(x);
|
|
2425
2441
|
}
|
|
2426
2442
|
function u(x) {
|
|
2427
|
-
const
|
|
2428
|
-
return a =
|
|
2443
|
+
const N = r.events[r.events.length - 1];
|
|
2444
|
+
return a = N && N[1].type === "linePrefix" ? N[2].sliceSerialize(N[1], !0).length : 0, s = x, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), h(x);
|
|
2429
2445
|
}
|
|
2430
2446
|
function h(x) {
|
|
2431
2447
|
return x === s ? (o++, e.consume(x), h) : o < 3 ? n(x) : (e.exit("codeFencedFenceSequence"), H(x) ? q(e, c, "whitespace")(x) : c(x));
|
|
2432
2448
|
}
|
|
2433
2449
|
function c(x) {
|
|
2434
|
-
return x === null || M(x) ? (e.exit("codeFencedFence"), r.interrupt ? t(x) : e.check(Hn, b,
|
|
2450
|
+
return x === null || M(x) ? (e.exit("codeFencedFence"), r.interrupt ? t(x) : e.check(Hn, b, z)(x)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
2435
2451
|
contentType: "string"
|
|
2436
2452
|
}), p(x));
|
|
2437
2453
|
}
|
|
@@ -2447,7 +2463,7 @@ function ma(e, t, n) {
|
|
|
2447
2463
|
return x === null || M(x) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), c(x)) : x === 96 && x === s ? n(x) : (e.consume(x), d);
|
|
2448
2464
|
}
|
|
2449
2465
|
function b(x) {
|
|
2450
|
-
return e.attempt(i,
|
|
2466
|
+
return e.attempt(i, z, v)(x);
|
|
2451
2467
|
}
|
|
2452
2468
|
function v(x) {
|
|
2453
2469
|
return e.enter("lineEnding"), e.consume(x), e.exit("lineEnding"), k;
|
|
@@ -2456,31 +2472,31 @@ function ma(e, t, n) {
|
|
|
2456
2472
|
return a > 0 && H(x) ? q(e, w, "linePrefix", a + 1)(x) : w(x);
|
|
2457
2473
|
}
|
|
2458
2474
|
function w(x) {
|
|
2459
|
-
return x === null || M(x) ? e.check(Hn, b,
|
|
2475
|
+
return x === null || M(x) ? e.check(Hn, b, z)(x) : (e.enter("codeFlowValue"), T(x));
|
|
2460
2476
|
}
|
|
2461
2477
|
function T(x) {
|
|
2462
2478
|
return x === null || M(x) ? (e.exit("codeFlowValue"), w(x)) : (e.consume(x), T);
|
|
2463
2479
|
}
|
|
2464
|
-
function
|
|
2480
|
+
function z(x) {
|
|
2465
2481
|
return e.exit("codeFenced"), t(x);
|
|
2466
2482
|
}
|
|
2467
|
-
function
|
|
2483
|
+
function P(x, N, O) {
|
|
2468
2484
|
let B = 0;
|
|
2469
2485
|
return y;
|
|
2470
2486
|
function y(R) {
|
|
2471
|
-
return x.enter("lineEnding"), x.consume(R), x.exit("lineEnding"),
|
|
2487
|
+
return x.enter("lineEnding"), x.consume(R), x.exit("lineEnding"), E;
|
|
2472
2488
|
}
|
|
2473
|
-
function
|
|
2474
|
-
return x.enter("codeFencedFence"), H(R) ? q(x,
|
|
2489
|
+
function E(R) {
|
|
2490
|
+
return x.enter("codeFencedFence"), H(R) ? q(x, L, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(R) : L(R);
|
|
2475
2491
|
}
|
|
2476
|
-
function
|
|
2492
|
+
function L(R) {
|
|
2477
2493
|
return R === s ? (x.enter("codeFencedFenceSequence"), _(R)) : O(R);
|
|
2478
2494
|
}
|
|
2479
2495
|
function _(R) {
|
|
2480
2496
|
return R === s ? (B++, x.consume(R), _) : B >= o ? (x.exit("codeFencedFenceSequence"), H(R) ? q(x, A, "whitespace")(R) : A(R)) : O(R);
|
|
2481
2497
|
}
|
|
2482
2498
|
function A(R) {
|
|
2483
|
-
return R === null || M(R) ? (x.exit("codeFencedFence"),
|
|
2499
|
+
return R === null || M(R) ? (x.exit("codeFencedFence"), N(R)) : O(R);
|
|
2484
2500
|
}
|
|
2485
2501
|
}
|
|
2486
2502
|
}
|
|
@@ -2494,7 +2510,7 @@ function ga(e, t, n) {
|
|
|
2494
2510
|
return r.parser.lazy[r.now().line] ? n(o) : t(o);
|
|
2495
2511
|
}
|
|
2496
2512
|
}
|
|
2497
|
-
const
|
|
2513
|
+
const Lt = {
|
|
2498
2514
|
name: "codeIndented",
|
|
2499
2515
|
tokenize: ka
|
|
2500
2516
|
}, ya = {
|
|
@@ -2799,7 +2815,7 @@ const Ea = {
|
|
|
2799
2815
|
tokenize: _a
|
|
2800
2816
|
}, Ia = {
|
|
2801
2817
|
partial: !0,
|
|
2802
|
-
tokenize:
|
|
2818
|
+
tokenize: Pa
|
|
2803
2819
|
};
|
|
2804
2820
|
function Aa(e) {
|
|
2805
2821
|
return Or(e), e;
|
|
@@ -2825,7 +2841,7 @@ function _a(e, t) {
|
|
|
2825
2841
|
}), n = n.next, i;
|
|
2826
2842
|
}
|
|
2827
2843
|
}
|
|
2828
|
-
function
|
|
2844
|
+
function Pa(e, t, n) {
|
|
2829
2845
|
const r = this;
|
|
2830
2846
|
return i;
|
|
2831
2847
|
function i(o) {
|
|
@@ -2917,14 +2933,14 @@ function ot(e, t) {
|
|
|
2917
2933
|
return M(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), n = !0, r) : H(i) ? q(e, r, n ? "linePrefix" : "lineSuffix")(i) : t(i);
|
|
2918
2934
|
}
|
|
2919
2935
|
}
|
|
2920
|
-
const
|
|
2936
|
+
const Da = {
|
|
2921
2937
|
name: "definition",
|
|
2922
|
-
tokenize:
|
|
2923
|
-
},
|
|
2938
|
+
tokenize: La
|
|
2939
|
+
}, Na = {
|
|
2924
2940
|
partial: !0,
|
|
2925
2941
|
tokenize: za
|
|
2926
2942
|
};
|
|
2927
|
-
function
|
|
2943
|
+
function La(e, t, n) {
|
|
2928
2944
|
const r = this;
|
|
2929
2945
|
let i;
|
|
2930
2946
|
return a;
|
|
@@ -2963,7 +2979,7 @@ function Da(e, t, n) {
|
|
|
2963
2979
|
)(f);
|
|
2964
2980
|
}
|
|
2965
2981
|
function h(f) {
|
|
2966
|
-
return e.attempt(
|
|
2982
|
+
return e.attempt(Na, c, c)(f);
|
|
2967
2983
|
}
|
|
2968
2984
|
function c(f) {
|
|
2969
2985
|
return H(f) ? q(e, p, "whitespace")(f) : p(f);
|
|
@@ -3142,7 +3158,7 @@ function qa(e, t, n) {
|
|
|
3142
3158
|
}
|
|
3143
3159
|
function d(g) {
|
|
3144
3160
|
const pe = "CDATA[";
|
|
3145
|
-
return g === pe.charCodeAt(s++) ? (e.consume(g), s === pe.length ? r.interrupt ? t :
|
|
3161
|
+
return g === pe.charCodeAt(s++) ? (e.consume(g), s === pe.length ? r.interrupt ? t : L : d) : n(g);
|
|
3146
3162
|
}
|
|
3147
3163
|
function b(g) {
|
|
3148
3164
|
return me(g) ? (e.consume(g), o = String.fromCharCode(g), v) : n(g);
|
|
@@ -3150,45 +3166,45 @@ function qa(e, t, n) {
|
|
|
3150
3166
|
function v(g) {
|
|
3151
3167
|
if (g === null || g === 47 || g === 62 || Y(g)) {
|
|
3152
3168
|
const pe = g === 47, Se = o.toLowerCase();
|
|
3153
|
-
return !pe && !a && Vn.includes(Se) ? (i = 1, r.interrupt ? t(g) :
|
|
3169
|
+
return !pe && !a && Vn.includes(Se) ? (i = 1, r.interrupt ? t(g) : L(g)) : ja.includes(o.toLowerCase()) ? (i = 6, pe ? (e.consume(g), k) : r.interrupt ? t(g) : L(g)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(g) : a ? w(g) : T(g));
|
|
3154
3170
|
}
|
|
3155
3171
|
return g === 45 || ce(g) ? (e.consume(g), o += String.fromCharCode(g), v) : n(g);
|
|
3156
3172
|
}
|
|
3157
3173
|
function k(g) {
|
|
3158
|
-
return g === 62 ? (e.consume(g), r.interrupt ? t :
|
|
3174
|
+
return g === 62 ? (e.consume(g), r.interrupt ? t : L) : n(g);
|
|
3159
3175
|
}
|
|
3160
3176
|
function w(g) {
|
|
3161
3177
|
return H(g) ? (e.consume(g), w) : y(g);
|
|
3162
3178
|
}
|
|
3163
3179
|
function T(g) {
|
|
3164
|
-
return g === 47 ? (e.consume(g), y) : g === 58 || g === 95 || me(g) ? (e.consume(g),
|
|
3180
|
+
return g === 47 ? (e.consume(g), y) : g === 58 || g === 95 || me(g) ? (e.consume(g), z) : H(g) ? (e.consume(g), T) : y(g);
|
|
3165
3181
|
}
|
|
3166
|
-
function
|
|
3167
|
-
return g === 45 || g === 46 || g === 58 || g === 95 || ce(g) ? (e.consume(g),
|
|
3182
|
+
function z(g) {
|
|
3183
|
+
return g === 45 || g === 46 || g === 58 || g === 95 || ce(g) ? (e.consume(g), z) : P(g);
|
|
3168
3184
|
}
|
|
3169
|
-
function
|
|
3170
|
-
return g === 61 ? (e.consume(g), x) : H(g) ? (e.consume(g),
|
|
3185
|
+
function P(g) {
|
|
3186
|
+
return g === 61 ? (e.consume(g), x) : H(g) ? (e.consume(g), P) : T(g);
|
|
3171
3187
|
}
|
|
3172
3188
|
function x(g) {
|
|
3173
|
-
return g === null || g === 60 || g === 61 || g === 62 || g === 96 ? n(g) : g === 34 || g === 39 ? (e.consume(g), l = g,
|
|
3189
|
+
return g === null || g === 60 || g === 61 || g === 62 || g === 96 ? n(g) : g === 34 || g === 39 ? (e.consume(g), l = g, N) : H(g) ? (e.consume(g), x) : O(g);
|
|
3174
3190
|
}
|
|
3175
|
-
function
|
|
3176
|
-
return g === l ? (e.consume(g), l = null, B) : g === null || M(g) ? n(g) : (e.consume(g),
|
|
3191
|
+
function N(g) {
|
|
3192
|
+
return g === l ? (e.consume(g), l = null, B) : g === null || M(g) ? n(g) : (e.consume(g), N);
|
|
3177
3193
|
}
|
|
3178
3194
|
function O(g) {
|
|
3179
|
-
return g === null || g === 34 || g === 39 || g === 47 || g === 60 || g === 61 || g === 62 || g === 96 || Y(g) ?
|
|
3195
|
+
return g === null || g === 34 || g === 39 || g === 47 || g === 60 || g === 61 || g === 62 || g === 96 || Y(g) ? P(g) : (e.consume(g), O);
|
|
3180
3196
|
}
|
|
3181
3197
|
function B(g) {
|
|
3182
3198
|
return g === 47 || g === 62 || H(g) ? T(g) : n(g);
|
|
3183
3199
|
}
|
|
3184
3200
|
function y(g) {
|
|
3185
|
-
return g === 62 ? (e.consume(g),
|
|
3201
|
+
return g === 62 ? (e.consume(g), E) : n(g);
|
|
3186
3202
|
}
|
|
3187
|
-
function
|
|
3188
|
-
return g === null || M(g) ?
|
|
3203
|
+
function E(g) {
|
|
3204
|
+
return g === null || M(g) ? L(g) : H(g) ? (e.consume(g), E) : n(g);
|
|
3189
3205
|
}
|
|
3190
|
-
function
|
|
3191
|
-
return g === 45 && i === 2 ? (e.consume(g), W) : g === 60 && i === 1 ? (e.consume(g), ee) : g === 62 && i === 4 ? (e.consume(g), fe) : g === 63 && i === 3 ? (e.consume(g), m) : g === 93 && i === 5 ? (e.consume(g), ae) : M(g) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Ha, be, _)(g)) : g === null || M(g) ? (e.exit("htmlFlowData"), _(g)) : (e.consume(g),
|
|
3206
|
+
function L(g) {
|
|
3207
|
+
return g === 45 && i === 2 ? (e.consume(g), W) : g === 60 && i === 1 ? (e.consume(g), ee) : g === 62 && i === 4 ? (e.consume(g), fe) : g === 63 && i === 3 ? (e.consume(g), m) : g === 93 && i === 5 ? (e.consume(g), ae) : M(g) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Ha, be, _)(g)) : g === null || M(g) ? (e.exit("htmlFlowData"), _(g)) : (e.consume(g), L);
|
|
3192
3208
|
}
|
|
3193
3209
|
function _(g) {
|
|
3194
3210
|
return e.check($a, A, be)(g);
|
|
@@ -3197,26 +3213,26 @@ function qa(e, t, n) {
|
|
|
3197
3213
|
return e.enter("lineEnding"), e.consume(g), e.exit("lineEnding"), R;
|
|
3198
3214
|
}
|
|
3199
3215
|
function R(g) {
|
|
3200
|
-
return g === null || M(g) ? _(g) : (e.enter("htmlFlowData"),
|
|
3216
|
+
return g === null || M(g) ? _(g) : (e.enter("htmlFlowData"), L(g));
|
|
3201
3217
|
}
|
|
3202
3218
|
function W(g) {
|
|
3203
|
-
return g === 45 ? (e.consume(g), m) :
|
|
3219
|
+
return g === 45 ? (e.consume(g), m) : L(g);
|
|
3204
3220
|
}
|
|
3205
3221
|
function ee(g) {
|
|
3206
|
-
return g === 47 ? (e.consume(g), o = "", ue) :
|
|
3222
|
+
return g === 47 ? (e.consume(g), o = "", ue) : L(g);
|
|
3207
3223
|
}
|
|
3208
3224
|
function ue(g) {
|
|
3209
3225
|
if (g === 62) {
|
|
3210
3226
|
const pe = o.toLowerCase();
|
|
3211
|
-
return Vn.includes(pe) ? (e.consume(g), fe) :
|
|
3227
|
+
return Vn.includes(pe) ? (e.consume(g), fe) : L(g);
|
|
3212
3228
|
}
|
|
3213
|
-
return me(g) && o.length < 8 ? (e.consume(g), o += String.fromCharCode(g), ue) :
|
|
3229
|
+
return me(g) && o.length < 8 ? (e.consume(g), o += String.fromCharCode(g), ue) : L(g);
|
|
3214
3230
|
}
|
|
3215
3231
|
function ae(g) {
|
|
3216
|
-
return g === 93 ? (e.consume(g), m) :
|
|
3232
|
+
return g === 93 ? (e.consume(g), m) : L(g);
|
|
3217
3233
|
}
|
|
3218
3234
|
function m(g) {
|
|
3219
|
-
return g === 62 ? (e.consume(g), fe) : g === 45 && i === 2 ? (e.consume(g), m) :
|
|
3235
|
+
return g === 62 ? (e.consume(g), fe) : g === 45 && i === 2 ? (e.consume(g), m) : L(g);
|
|
3220
3236
|
}
|
|
3221
3237
|
function fe(g) {
|
|
3222
3238
|
return g === null || M(g) ? (e.exit("htmlFlowData"), be(g)) : (e.consume(g), fe);
|
|
@@ -3253,7 +3269,7 @@ function Xa(e, t, n) {
|
|
|
3253
3269
|
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(m), l;
|
|
3254
3270
|
}
|
|
3255
3271
|
function l(m) {
|
|
3256
|
-
return m === 33 ? (e.consume(m), u) : m === 47 ? (e.consume(m),
|
|
3272
|
+
return m === 33 ? (e.consume(m), u) : m === 47 ? (e.consume(m), P) : m === 63 ? (e.consume(m), T) : me(m) ? (e.consume(m), O) : n(m);
|
|
3257
3273
|
}
|
|
3258
3274
|
function u(m) {
|
|
3259
3275
|
return m === 45 ? (e.consume(m), h) : m === 91 ? (e.consume(m), a = 0, d) : me(m) ? (e.consume(m), w) : n(m);
|
|
@@ -3287,19 +3303,19 @@ function Xa(e, t, n) {
|
|
|
3287
3303
|
return m === null || m === 62 ? W(m) : M(m) ? (o = w, ee(m)) : (e.consume(m), w);
|
|
3288
3304
|
}
|
|
3289
3305
|
function T(m) {
|
|
3290
|
-
return m === null ? n(m) : m === 63 ? (e.consume(m),
|
|
3306
|
+
return m === null ? n(m) : m === 63 ? (e.consume(m), z) : M(m) ? (o = T, ee(m)) : (e.consume(m), T);
|
|
3291
3307
|
}
|
|
3292
|
-
function
|
|
3308
|
+
function z(m) {
|
|
3293
3309
|
return m === 62 ? W(m) : T(m);
|
|
3294
3310
|
}
|
|
3295
|
-
function
|
|
3311
|
+
function P(m) {
|
|
3296
3312
|
return me(m) ? (e.consume(m), x) : n(m);
|
|
3297
3313
|
}
|
|
3298
3314
|
function x(m) {
|
|
3299
|
-
return m === 45 || ce(m) ? (e.consume(m), x) :
|
|
3315
|
+
return m === 45 || ce(m) ? (e.consume(m), x) : N(m);
|
|
3300
3316
|
}
|
|
3301
|
-
function
|
|
3302
|
-
return M(m) ? (o =
|
|
3317
|
+
function N(m) {
|
|
3318
|
+
return M(m) ? (o = N, ee(m)) : H(m) ? (e.consume(m), N) : W(m);
|
|
3303
3319
|
}
|
|
3304
3320
|
function O(m) {
|
|
3305
3321
|
return m === 45 || ce(m) ? (e.consume(m), O) : m === 47 || m === 62 || Y(m) ? B(m) : n(m);
|
|
@@ -3308,13 +3324,13 @@ function Xa(e, t, n) {
|
|
|
3308
3324
|
return m === 47 ? (e.consume(m), W) : m === 58 || m === 95 || me(m) ? (e.consume(m), y) : M(m) ? (o = B, ee(m)) : H(m) ? (e.consume(m), B) : W(m);
|
|
3309
3325
|
}
|
|
3310
3326
|
function y(m) {
|
|
3311
|
-
return m === 45 || m === 46 || m === 58 || m === 95 || ce(m) ? (e.consume(m), y) :
|
|
3327
|
+
return m === 45 || m === 46 || m === 58 || m === 95 || ce(m) ? (e.consume(m), y) : E(m);
|
|
3312
3328
|
}
|
|
3313
|
-
function
|
|
3314
|
-
return m === 61 ? (e.consume(m),
|
|
3329
|
+
function E(m) {
|
|
3330
|
+
return m === 61 ? (e.consume(m), L) : M(m) ? (o = E, ee(m)) : H(m) ? (e.consume(m), E) : B(m);
|
|
3315
3331
|
}
|
|
3316
|
-
function
|
|
3317
|
-
return m === null || m === 60 || m === 61 || m === 62 || m === 96 ? n(m) : m === 34 || m === 39 ? (e.consume(m), i = m, _) : M(m) ? (o =
|
|
3332
|
+
function L(m) {
|
|
3333
|
+
return m === null || m === 60 || m === 61 || m === 62 || m === 96 ? n(m) : m === 34 || m === 39 ? (e.consume(m), i = m, _) : M(m) ? (o = L, ee(m)) : H(m) ? (e.consume(m), L) : (e.consume(m), A);
|
|
3318
3334
|
}
|
|
3319
3335
|
function _(m) {
|
|
3320
3336
|
return m === i ? (e.consume(m), i = void 0, R) : m === null ? n(m) : M(m) ? (o = _, ee(m)) : (e.consume(m), _);
|
|
@@ -3810,11 +3826,11 @@ const Es = {
|
|
|
3810
3826
|
57: ye,
|
|
3811
3827
|
62: zr
|
|
3812
3828
|
}, Is = {
|
|
3813
|
-
91:
|
|
3829
|
+
91: Da
|
|
3814
3830
|
}, As = {
|
|
3815
|
-
[-2]:
|
|
3816
|
-
[-1]:
|
|
3817
|
-
32:
|
|
3831
|
+
[-2]: Lt,
|
|
3832
|
+
[-1]: Lt,
|
|
3833
|
+
32: Lt
|
|
3818
3834
|
}, _s = {
|
|
3819
3835
|
35: Oa,
|
|
3820
3836
|
42: bt,
|
|
@@ -3824,10 +3840,10 @@ const Es = {
|
|
|
3824
3840
|
95: bt,
|
|
3825
3841
|
96: $n,
|
|
3826
3842
|
126: $n
|
|
3827
|
-
},
|
|
3843
|
+
}, Ps = {
|
|
3828
3844
|
38: Mr,
|
|
3829
3845
|
92: Rr
|
|
3830
|
-
},
|
|
3846
|
+
}, Ds = {
|
|
3831
3847
|
[-5]: zt,
|
|
3832
3848
|
[-4]: zt,
|
|
3833
3849
|
[-3]: zt,
|
|
@@ -3840,23 +3856,23 @@ const Es = {
|
|
|
3840
3856
|
93: mn,
|
|
3841
3857
|
95: Zt,
|
|
3842
3858
|
96: xa
|
|
3843
|
-
},
|
|
3859
|
+
}, Ns = {
|
|
3844
3860
|
null: [Zt, vs]
|
|
3845
|
-
},
|
|
3861
|
+
}, Ls = {
|
|
3846
3862
|
null: [42, 95]
|
|
3847
3863
|
}, zs = {
|
|
3848
3864
|
null: []
|
|
3849
3865
|
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3850
3866
|
__proto__: null,
|
|
3851
|
-
attentionMarkers:
|
|
3867
|
+
attentionMarkers: Ls,
|
|
3852
3868
|
contentInitial: Is,
|
|
3853
3869
|
disable: zs,
|
|
3854
3870
|
document: Es,
|
|
3855
3871
|
flow: _s,
|
|
3856
3872
|
flowInitial: As,
|
|
3857
|
-
insideSpan:
|
|
3858
|
-
string:
|
|
3859
|
-
text:
|
|
3873
|
+
insideSpan: Ns,
|
|
3874
|
+
string: Ps,
|
|
3875
|
+
text: Ds
|
|
3860
3876
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3861
3877
|
function Ms(e, t, n) {
|
|
3862
3878
|
let r = {
|
|
@@ -3869,12 +3885,12 @@ function Ms(e, t, n) {
|
|
|
3869
3885
|
const i = {}, a = [];
|
|
3870
3886
|
let o = [], s = [];
|
|
3871
3887
|
const l = {
|
|
3872
|
-
attempt:
|
|
3873
|
-
check:
|
|
3888
|
+
attempt: N(P),
|
|
3889
|
+
check: N(x),
|
|
3874
3890
|
consume: w,
|
|
3875
3891
|
enter: T,
|
|
3876
|
-
exit:
|
|
3877
|
-
interrupt:
|
|
3892
|
+
exit: z,
|
|
3893
|
+
interrupt: N(x, {
|
|
3878
3894
|
interrupt: !0
|
|
3879
3895
|
})
|
|
3880
3896
|
}, u = {
|
|
@@ -3891,69 +3907,69 @@ function Ms(e, t, n) {
|
|
|
3891
3907
|
};
|
|
3892
3908
|
let h = t.tokenize.call(u, l);
|
|
3893
3909
|
return t.resolveAll && a.push(t), u;
|
|
3894
|
-
function c(
|
|
3895
|
-
return o = Ce(o,
|
|
3910
|
+
function c(E) {
|
|
3911
|
+
return o = Ce(o, E), v(), o[o.length - 1] !== null ? [] : (O(t, 0), u.events = Tt(a, u.events, u), u.events);
|
|
3896
3912
|
}
|
|
3897
|
-
function p(
|
|
3898
|
-
return Fs(f(
|
|
3913
|
+
function p(E, L) {
|
|
3914
|
+
return Fs(f(E), L);
|
|
3899
3915
|
}
|
|
3900
|
-
function f(
|
|
3901
|
-
return Os(o,
|
|
3916
|
+
function f(E) {
|
|
3917
|
+
return Os(o, E);
|
|
3902
3918
|
}
|
|
3903
3919
|
function d() {
|
|
3904
3920
|
const {
|
|
3905
|
-
_bufferIndex:
|
|
3906
|
-
_index:
|
|
3921
|
+
_bufferIndex: E,
|
|
3922
|
+
_index: L,
|
|
3907
3923
|
line: _,
|
|
3908
3924
|
column: A,
|
|
3909
3925
|
offset: R
|
|
3910
3926
|
} = r;
|
|
3911
3927
|
return {
|
|
3912
|
-
_bufferIndex:
|
|
3913
|
-
_index:
|
|
3928
|
+
_bufferIndex: E,
|
|
3929
|
+
_index: L,
|
|
3914
3930
|
line: _,
|
|
3915
3931
|
column: A,
|
|
3916
3932
|
offset: R
|
|
3917
3933
|
};
|
|
3918
3934
|
}
|
|
3919
|
-
function b(
|
|
3920
|
-
i[
|
|
3935
|
+
function b(E) {
|
|
3936
|
+
i[E.line] = E.column, y();
|
|
3921
3937
|
}
|
|
3922
3938
|
function v() {
|
|
3923
|
-
let
|
|
3939
|
+
let E;
|
|
3924
3940
|
for (; r._index < o.length; ) {
|
|
3925
|
-
const
|
|
3926
|
-
if (typeof
|
|
3927
|
-
for (
|
|
3928
|
-
k(
|
|
3941
|
+
const L = o[r._index];
|
|
3942
|
+
if (typeof L == "string")
|
|
3943
|
+
for (E = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === E && r._bufferIndex < L.length; )
|
|
3944
|
+
k(L.charCodeAt(r._bufferIndex));
|
|
3929
3945
|
else
|
|
3930
|
-
k(
|
|
3946
|
+
k(L);
|
|
3931
3947
|
}
|
|
3932
3948
|
}
|
|
3933
|
-
function k(
|
|
3934
|
-
h = h(
|
|
3949
|
+
function k(E) {
|
|
3950
|
+
h = h(E);
|
|
3935
3951
|
}
|
|
3936
|
-
function w(
|
|
3937
|
-
M(
|
|
3952
|
+
function w(E) {
|
|
3953
|
+
M(E) ? (r.line++, r.column = 1, r.offset += E === -3 ? 2 : 1, y()) : E !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
|
|
3938
3954
|
// strings.
|
|
3939
3955
|
/** @type {string} */
|
|
3940
|
-
o[r._index].length && (r._bufferIndex = -1, r._index++)), u.previous =
|
|
3956
|
+
o[r._index].length && (r._bufferIndex = -1, r._index++)), u.previous = E;
|
|
3941
3957
|
}
|
|
3942
|
-
function T(
|
|
3943
|
-
const _ =
|
|
3944
|
-
return _.type =
|
|
3958
|
+
function T(E, L) {
|
|
3959
|
+
const _ = L || {};
|
|
3960
|
+
return _.type = E, _.start = d(), u.events.push(["enter", _, u]), s.push(_), _;
|
|
3945
3961
|
}
|
|
3946
|
-
function
|
|
3947
|
-
const
|
|
3948
|
-
return
|
|
3962
|
+
function z(E) {
|
|
3963
|
+
const L = s.pop();
|
|
3964
|
+
return L.end = d(), u.events.push(["exit", L, u]), L;
|
|
3949
3965
|
}
|
|
3950
|
-
function
|
|
3951
|
-
O(
|
|
3966
|
+
function P(E, L) {
|
|
3967
|
+
O(E, L.from);
|
|
3952
3968
|
}
|
|
3953
|
-
function x(
|
|
3954
|
-
|
|
3969
|
+
function x(E, L) {
|
|
3970
|
+
L.restore();
|
|
3955
3971
|
}
|
|
3956
|
-
function
|
|
3972
|
+
function N(E, L) {
|
|
3957
3973
|
return _;
|
|
3958
3974
|
function _(A, R, W) {
|
|
3959
3975
|
let ee, ue, ae, m;
|
|
@@ -3989,7 +4005,7 @@ function Ms(e, t, n) {
|
|
|
3989
4005
|
// If we do have fields, create an object w/ `context` as its
|
|
3990
4006
|
// prototype.
|
|
3991
4007
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
3992
|
-
|
|
4008
|
+
L ? Object.assign(Object.create(u), L) : u,
|
|
3993
4009
|
l,
|
|
3994
4010
|
pe,
|
|
3995
4011
|
Se
|
|
@@ -3997,24 +4013,24 @@ function Ms(e, t, n) {
|
|
|
3997
4013
|
}
|
|
3998
4014
|
}
|
|
3999
4015
|
function pe(ne) {
|
|
4000
|
-
return
|
|
4016
|
+
return E(ae, m), R;
|
|
4001
4017
|
}
|
|
4002
4018
|
function Se(ne) {
|
|
4003
4019
|
return m.restore(), ++ue < ee.length ? g(ee[ue]) : W;
|
|
4004
4020
|
}
|
|
4005
4021
|
}
|
|
4006
4022
|
}
|
|
4007
|
-
function O(
|
|
4008
|
-
|
|
4023
|
+
function O(E, L) {
|
|
4024
|
+
E.resolveAll && !a.includes(E) && a.push(E), E.resolve && ve(u.events, L, u.events.length - L, E.resolve(u.events.slice(L), u)), E.resolveTo && (u.events = E.resolveTo(u.events, u));
|
|
4009
4025
|
}
|
|
4010
4026
|
function B() {
|
|
4011
|
-
const
|
|
4027
|
+
const E = d(), L = u.previous, _ = u.currentConstruct, A = u.events.length, R = Array.from(s);
|
|
4012
4028
|
return {
|
|
4013
4029
|
from: A,
|
|
4014
4030
|
restore: W
|
|
4015
4031
|
};
|
|
4016
4032
|
function W() {
|
|
4017
|
-
r =
|
|
4033
|
+
r = E, u.previous = L, u.currentConstruct = _, u.events.length = A, s = R, y();
|
|
4018
4034
|
}
|
|
4019
4035
|
}
|
|
4020
4036
|
function y() {
|
|
@@ -4079,7 +4095,7 @@ function Bs(e) {
|
|
|
4079
4095
|
const r = {
|
|
4080
4096
|
constructs: (
|
|
4081
4097
|
/** @type {FullNormalizedExtension} */
|
|
4082
|
-
|
|
4098
|
+
Nr([Rs, ...(e || {}).extensions || []])
|
|
4083
4099
|
),
|
|
4084
4100
|
content: i(ea),
|
|
4085
4101
|
defined: [],
|
|
@@ -4147,7 +4163,7 @@ function Vs(e, t, n) {
|
|
|
4147
4163
|
return t;
|
|
4148
4164
|
if (n.charCodeAt(0) === 35) {
|
|
4149
4165
|
const i = n.charCodeAt(1), a = i === 120 || i === 88;
|
|
4150
|
-
return
|
|
4166
|
+
return Lr(n.slice(a ? 2 : 1), a ? 16 : 10);
|
|
4151
4167
|
}
|
|
4152
4168
|
return dn(n) || e;
|
|
4153
4169
|
}
|
|
@@ -4204,7 +4220,7 @@ function Ws(e) {
|
|
|
4204
4220
|
},
|
|
4205
4221
|
exit: {
|
|
4206
4222
|
atxHeading: l(),
|
|
4207
|
-
atxHeadingSequence:
|
|
4223
|
+
atxHeadingSequence: P,
|
|
4208
4224
|
autolink: l(),
|
|
4209
4225
|
autolinkEmail: J,
|
|
4210
4226
|
autolinkProtocol: K,
|
|
@@ -4224,12 +4240,12 @@ function Ws(e) {
|
|
|
4224
4240
|
codeTextData: y,
|
|
4225
4241
|
data: y,
|
|
4226
4242
|
definition: l(),
|
|
4227
|
-
definitionDestinationString:
|
|
4243
|
+
definitionDestinationString: z,
|
|
4228
4244
|
definitionLabelString: w,
|
|
4229
4245
|
definitionTitleString: T,
|
|
4230
4246
|
emphasis: l(),
|
|
4231
|
-
hardBreakEscape: l(
|
|
4232
|
-
hardBreakTrailing: l(
|
|
4247
|
+
hardBreakEscape: l(L),
|
|
4248
|
+
hardBreakTrailing: l(L),
|
|
4233
4249
|
htmlFlow: l(_),
|
|
4234
4250
|
htmlFlowData: y,
|
|
4235
4251
|
htmlText: l(A),
|
|
@@ -4237,7 +4253,7 @@ function Ws(e) {
|
|
|
4237
4253
|
image: l(ee),
|
|
4238
4254
|
label: ae,
|
|
4239
4255
|
labelText: ue,
|
|
4240
|
-
lineEnding:
|
|
4256
|
+
lineEnding: E,
|
|
4241
4257
|
link: l(W),
|
|
4242
4258
|
listItem: l(),
|
|
4243
4259
|
listOrdered: l(),
|
|
@@ -4248,7 +4264,7 @@ function Ws(e) {
|
|
|
4248
4264
|
resourceTitleString: fe,
|
|
4249
4265
|
resource: be,
|
|
4250
4266
|
setextHeading: l(O),
|
|
4251
|
-
setextHeadingLineSequence:
|
|
4267
|
+
setextHeadingLineSequence: N,
|
|
4252
4268
|
setextHeadingText: x,
|
|
4253
4269
|
strong: l(),
|
|
4254
4270
|
thematicBreak: l()
|
|
@@ -4258,12 +4274,12 @@ function Ws(e) {
|
|
|
4258
4274
|
const n = {};
|
|
4259
4275
|
return r;
|
|
4260
4276
|
function r(C) {
|
|
4261
|
-
let
|
|
4277
|
+
let D = {
|
|
4262
4278
|
type: "root",
|
|
4263
4279
|
children: []
|
|
4264
4280
|
};
|
|
4265
4281
|
const j = {
|
|
4266
|
-
stack: [
|
|
4282
|
+
stack: [D],
|
|
4267
4283
|
tokenStack: [],
|
|
4268
4284
|
config: t,
|
|
4269
4285
|
enter: s,
|
|
@@ -4291,7 +4307,7 @@ function Ws(e) {
|
|
|
4291
4307
|
const Te = j.tokenStack[j.tokenStack.length - 1];
|
|
4292
4308
|
(Te[1] || Gn).call(j, void 0, Te[0]);
|
|
4293
4309
|
}
|
|
4294
|
-
for (
|
|
4310
|
+
for (D.position = {
|
|
4295
4311
|
start: ze(C.length > 0 ? C[0][1].start : {
|
|
4296
4312
|
line: 1,
|
|
4297
4313
|
column: 1,
|
|
@@ -4303,11 +4319,11 @@ function Ws(e) {
|
|
|
4303
4319
|
offset: 0
|
|
4304
4320
|
})
|
|
4305
4321
|
}, X = -1; ++X < t.transforms.length; )
|
|
4306
|
-
|
|
4307
|
-
return
|
|
4322
|
+
D = t.transforms[X](D) || D;
|
|
4323
|
+
return D;
|
|
4308
4324
|
}
|
|
4309
|
-
function i(C,
|
|
4310
|
-
let $ =
|
|
4325
|
+
function i(C, D, j) {
|
|
4326
|
+
let $ = D - 1, X = -1, Te = !1, Oe, Pe, Je, Qe;
|
|
4311
4327
|
for (; ++$ <= j; ) {
|
|
4312
4328
|
const xe = C[$];
|
|
4313
4329
|
switch (xe[1].type) {
|
|
@@ -4333,14 +4349,14 @@ function Ws(e) {
|
|
|
4333
4349
|
if (!X && xe[0] === "enter" && xe[1].type === "listItemPrefix" || X === -1 && xe[0] === "exit" && (xe[1].type === "listUnordered" || xe[1].type === "listOrdered")) {
|
|
4334
4350
|
if (Oe) {
|
|
4335
4351
|
let $e = $;
|
|
4336
|
-
for (
|
|
4337
|
-
const
|
|
4338
|
-
if (
|
|
4339
|
-
if (
|
|
4340
|
-
|
|
4341
|
-
} else if (!(
|
|
4352
|
+
for (Pe = void 0; $e--; ) {
|
|
4353
|
+
const De = C[$e];
|
|
4354
|
+
if (De[1].type === "lineEnding" || De[1].type === "lineEndingBlank") {
|
|
4355
|
+
if (De[0] === "exit") continue;
|
|
4356
|
+
Pe && (C[Pe][1].type = "lineEndingBlank", Te = !0), De[1].type = "lineEnding", Pe = $e;
|
|
4357
|
+
} else if (!(De[1].type === "linePrefix" || De[1].type === "blockQuotePrefix" || De[1].type === "blockQuotePrefixWhitespace" || De[1].type === "blockQuoteMarker" || De[1].type === "listItemIndent")) break;
|
|
4342
4358
|
}
|
|
4343
|
-
Je && (!
|
|
4359
|
+
Je && (!Pe || Je < Pe) && (Oe._spread = !0), Oe.end = Object.assign({}, Pe ? C[Pe][1].start : xe[1].end), C.splice(Pe || $, 0, ["exit", Oe, xe[2]]), $++, j++;
|
|
4344
4360
|
}
|
|
4345
4361
|
if (xe[1].type === "listItemPrefix") {
|
|
4346
4362
|
const $e = {
|
|
@@ -4354,12 +4370,12 @@ function Ws(e) {
|
|
|
4354
4370
|
}
|
|
4355
4371
|
}
|
|
4356
4372
|
}
|
|
4357
|
-
return C[
|
|
4373
|
+
return C[D][1]._spread = Te, j;
|
|
4358
4374
|
}
|
|
4359
|
-
function a(C,
|
|
4375
|
+
function a(C, D) {
|
|
4360
4376
|
return j;
|
|
4361
4377
|
function j($) {
|
|
4362
|
-
s.call(this, C($), $),
|
|
4378
|
+
s.call(this, C($), $), D && D.call(this, $);
|
|
4363
4379
|
}
|
|
4364
4380
|
}
|
|
4365
4381
|
function o() {
|
|
@@ -4368,23 +4384,23 @@ function Ws(e) {
|
|
|
4368
4384
|
children: []
|
|
4369
4385
|
});
|
|
4370
4386
|
}
|
|
4371
|
-
function s(C,
|
|
4372
|
-
this.stack[this.stack.length - 1].children.push(C), this.stack.push(C), this.tokenStack.push([
|
|
4373
|
-
start: ze(
|
|
4387
|
+
function s(C, D, j) {
|
|
4388
|
+
this.stack[this.stack.length - 1].children.push(C), this.stack.push(C), this.tokenStack.push([D, j || void 0]), C.position = {
|
|
4389
|
+
start: ze(D.start),
|
|
4374
4390
|
// @ts-expect-error: `end` will be patched later.
|
|
4375
4391
|
end: void 0
|
|
4376
4392
|
};
|
|
4377
4393
|
}
|
|
4378
4394
|
function l(C) {
|
|
4379
|
-
return
|
|
4380
|
-
function
|
|
4395
|
+
return D;
|
|
4396
|
+
function D(j) {
|
|
4381
4397
|
C && C.call(this, j), u.call(this, j);
|
|
4382
4398
|
}
|
|
4383
4399
|
}
|
|
4384
|
-
function u(C,
|
|
4400
|
+
function u(C, D) {
|
|
4385
4401
|
const j = this.stack.pop(), $ = this.tokenStack.pop();
|
|
4386
4402
|
if ($)
|
|
4387
|
-
$[0].type !== C.type && (
|
|
4403
|
+
$[0].type !== C.type && (D ? D.call(this, C, $[0]) : ($[1] || Gn).call(this, C, $[0]));
|
|
4388
4404
|
else throw new Error("Cannot close `" + C.type + "` (" + it({
|
|
4389
4405
|
start: C.start,
|
|
4390
4406
|
end: C.end
|
|
@@ -4399,54 +4415,54 @@ function Ws(e) {
|
|
|
4399
4415
|
}
|
|
4400
4416
|
function p(C) {
|
|
4401
4417
|
if (this.data.expectingFirstListItemValue) {
|
|
4402
|
-
const
|
|
4403
|
-
|
|
4418
|
+
const D = this.stack[this.stack.length - 2];
|
|
4419
|
+
D.start = Number.parseInt(this.sliceSerialize(C), 10), this.data.expectingFirstListItemValue = void 0;
|
|
4404
4420
|
}
|
|
4405
4421
|
}
|
|
4406
4422
|
function f() {
|
|
4407
|
-
const C = this.resume(),
|
|
4408
|
-
|
|
4423
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4424
|
+
D.lang = C;
|
|
4409
4425
|
}
|
|
4410
4426
|
function d() {
|
|
4411
|
-
const C = this.resume(),
|
|
4412
|
-
|
|
4427
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4428
|
+
D.meta = C;
|
|
4413
4429
|
}
|
|
4414
4430
|
function b() {
|
|
4415
4431
|
this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
|
|
4416
4432
|
}
|
|
4417
4433
|
function v() {
|
|
4418
|
-
const C = this.resume(),
|
|
4419
|
-
|
|
4434
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4435
|
+
D.value = C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
|
|
4420
4436
|
}
|
|
4421
4437
|
function k() {
|
|
4422
|
-
const C = this.resume(),
|
|
4423
|
-
|
|
4438
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4439
|
+
D.value = C.replace(/(\r?\n|\r)$/g, "");
|
|
4424
4440
|
}
|
|
4425
4441
|
function w(C) {
|
|
4426
|
-
const
|
|
4427
|
-
j.label =
|
|
4442
|
+
const D = this.resume(), j = this.stack[this.stack.length - 1];
|
|
4443
|
+
j.label = D, j.identifier = Ee(this.sliceSerialize(C)).toLowerCase();
|
|
4428
4444
|
}
|
|
4429
4445
|
function T() {
|
|
4430
|
-
const C = this.resume(),
|
|
4431
|
-
|
|
4446
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4447
|
+
D.title = C;
|
|
4432
4448
|
}
|
|
4433
|
-
function
|
|
4434
|
-
const C = this.resume(),
|
|
4435
|
-
|
|
4449
|
+
function z() {
|
|
4450
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4451
|
+
D.url = C;
|
|
4436
4452
|
}
|
|
4437
|
-
function
|
|
4438
|
-
const
|
|
4439
|
-
if (!
|
|
4453
|
+
function P(C) {
|
|
4454
|
+
const D = this.stack[this.stack.length - 1];
|
|
4455
|
+
if (!D.depth) {
|
|
4440
4456
|
const j = this.sliceSerialize(C).length;
|
|
4441
|
-
|
|
4457
|
+
D.depth = j;
|
|
4442
4458
|
}
|
|
4443
4459
|
}
|
|
4444
4460
|
function x() {
|
|
4445
4461
|
this.data.setextHeadingSlurpLineEnding = !0;
|
|
4446
4462
|
}
|
|
4447
|
-
function
|
|
4448
|
-
const
|
|
4449
|
-
|
|
4463
|
+
function N(C) {
|
|
4464
|
+
const D = this.stack[this.stack.length - 1];
|
|
4465
|
+
D.depth = this.sliceSerialize(C).codePointAt(0) === 61 ? 1 : 2;
|
|
4450
4466
|
}
|
|
4451
4467
|
function O() {
|
|
4452
4468
|
this.data.setextHeadingSlurpLineEnding = void 0;
|
|
@@ -4461,38 +4477,38 @@ function Ws(e) {
|
|
|
4461
4477
|
}, j.push($)), this.stack.push($);
|
|
4462
4478
|
}
|
|
4463
4479
|
function y(C) {
|
|
4464
|
-
const
|
|
4465
|
-
|
|
4480
|
+
const D = this.stack.pop();
|
|
4481
|
+
D.value += this.sliceSerialize(C), D.position.end = ze(C.end);
|
|
4466
4482
|
}
|
|
4467
|
-
function
|
|
4468
|
-
const
|
|
4483
|
+
function E(C) {
|
|
4484
|
+
const D = this.stack[this.stack.length - 1];
|
|
4469
4485
|
if (this.data.atHardBreak) {
|
|
4470
|
-
const j =
|
|
4486
|
+
const j = D.children[D.children.length - 1];
|
|
4471
4487
|
j.position.end = ze(C.end), this.data.atHardBreak = void 0;
|
|
4472
4488
|
return;
|
|
4473
4489
|
}
|
|
4474
|
-
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(
|
|
4490
|
+
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(D.type) && (B.call(this, C), y.call(this, C));
|
|
4475
4491
|
}
|
|
4476
|
-
function
|
|
4492
|
+
function L() {
|
|
4477
4493
|
this.data.atHardBreak = !0;
|
|
4478
4494
|
}
|
|
4479
4495
|
function _() {
|
|
4480
|
-
const C = this.resume(),
|
|
4481
|
-
|
|
4496
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4497
|
+
D.value = C;
|
|
4482
4498
|
}
|
|
4483
4499
|
function A() {
|
|
4484
|
-
const C = this.resume(),
|
|
4485
|
-
|
|
4500
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4501
|
+
D.value = C;
|
|
4486
4502
|
}
|
|
4487
4503
|
function R() {
|
|
4488
|
-
const C = this.resume(),
|
|
4489
|
-
|
|
4504
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4505
|
+
D.value = C;
|
|
4490
4506
|
}
|
|
4491
4507
|
function W() {
|
|
4492
4508
|
const C = this.stack[this.stack.length - 1];
|
|
4493
4509
|
if (this.data.inReference) {
|
|
4494
|
-
const
|
|
4495
|
-
C.type += "Reference", C.referenceType =
|
|
4510
|
+
const D = this.data.referenceType || "shortcut";
|
|
4511
|
+
C.type += "Reference", C.referenceType = D, delete C.url, delete C.title;
|
|
4496
4512
|
} else
|
|
4497
4513
|
delete C.identifier, delete C.label;
|
|
4498
4514
|
this.data.referenceType = void 0;
|
|
@@ -4500,31 +4516,31 @@ function Ws(e) {
|
|
|
4500
4516
|
function ee() {
|
|
4501
4517
|
const C = this.stack[this.stack.length - 1];
|
|
4502
4518
|
if (this.data.inReference) {
|
|
4503
|
-
const
|
|
4504
|
-
C.type += "Reference", C.referenceType =
|
|
4519
|
+
const D = this.data.referenceType || "shortcut";
|
|
4520
|
+
C.type += "Reference", C.referenceType = D, delete C.url, delete C.title;
|
|
4505
4521
|
} else
|
|
4506
4522
|
delete C.identifier, delete C.label;
|
|
4507
4523
|
this.data.referenceType = void 0;
|
|
4508
4524
|
}
|
|
4509
4525
|
function ue(C) {
|
|
4510
|
-
const
|
|
4511
|
-
j.label = $s(
|
|
4526
|
+
const D = this.sliceSerialize(C), j = this.stack[this.stack.length - 2];
|
|
4527
|
+
j.label = $s(D), j.identifier = Ee(D).toLowerCase();
|
|
4512
4528
|
}
|
|
4513
4529
|
function ae() {
|
|
4514
|
-
const C = this.stack[this.stack.length - 1],
|
|
4530
|
+
const C = this.stack[this.stack.length - 1], D = this.resume(), j = this.stack[this.stack.length - 1];
|
|
4515
4531
|
if (this.data.inReference = !0, j.type === "link") {
|
|
4516
4532
|
const $ = C.children;
|
|
4517
4533
|
j.children = $;
|
|
4518
4534
|
} else
|
|
4519
|
-
j.alt =
|
|
4535
|
+
j.alt = D;
|
|
4520
4536
|
}
|
|
4521
4537
|
function m() {
|
|
4522
|
-
const C = this.resume(),
|
|
4523
|
-
|
|
4538
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4539
|
+
D.url = C;
|
|
4524
4540
|
}
|
|
4525
4541
|
function fe() {
|
|
4526
|
-
const C = this.resume(),
|
|
4527
|
-
|
|
4542
|
+
const C = this.resume(), D = this.stack[this.stack.length - 1];
|
|
4543
|
+
D.title = C;
|
|
4528
4544
|
}
|
|
4529
4545
|
function be() {
|
|
4530
4546
|
this.data.inReference = void 0;
|
|
@@ -4533,32 +4549,32 @@ function Ws(e) {
|
|
|
4533
4549
|
this.data.referenceType = "collapsed";
|
|
4534
4550
|
}
|
|
4535
4551
|
function pe(C) {
|
|
4536
|
-
const
|
|
4537
|
-
j.label =
|
|
4552
|
+
const D = this.resume(), j = this.stack[this.stack.length - 1];
|
|
4553
|
+
j.label = D, j.identifier = Ee(this.sliceSerialize(C)).toLowerCase(), this.data.referenceType = "full";
|
|
4538
4554
|
}
|
|
4539
4555
|
function Se(C) {
|
|
4540
4556
|
this.data.characterReferenceType = C.type;
|
|
4541
4557
|
}
|
|
4542
4558
|
function ne(C) {
|
|
4543
|
-
const
|
|
4559
|
+
const D = this.sliceSerialize(C), j = this.data.characterReferenceType;
|
|
4544
4560
|
let $;
|
|
4545
|
-
j ? ($ =
|
|
4561
|
+
j ? ($ = Lr(D, j === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : $ = dn(D);
|
|
4546
4562
|
const X = this.stack[this.stack.length - 1];
|
|
4547
4563
|
X.value += $;
|
|
4548
4564
|
}
|
|
4549
4565
|
function G(C) {
|
|
4550
|
-
const
|
|
4551
|
-
|
|
4566
|
+
const D = this.stack.pop();
|
|
4567
|
+
D.position.end = ze(C.end);
|
|
4552
4568
|
}
|
|
4553
4569
|
function K(C) {
|
|
4554
4570
|
y.call(this, C);
|
|
4555
|
-
const
|
|
4556
|
-
|
|
4571
|
+
const D = this.stack[this.stack.length - 1];
|
|
4572
|
+
D.url = this.sliceSerialize(C);
|
|
4557
4573
|
}
|
|
4558
4574
|
function J(C) {
|
|
4559
4575
|
y.call(this, C);
|
|
4560
|
-
const
|
|
4561
|
-
|
|
4576
|
+
const D = this.stack[this.stack.length - 1];
|
|
4577
|
+
D.url = "mailto:" + this.sliceSerialize(C);
|
|
4562
4578
|
}
|
|
4563
4579
|
function se() {
|
|
4564
4580
|
return {
|
|
@@ -5347,7 +5363,7 @@ const It = (
|
|
|
5347
5363
|
*/
|
|
5348
5364
|
(function(e) {
|
|
5349
5365
|
if (e == null)
|
|
5350
|
-
return
|
|
5366
|
+
return Dl;
|
|
5351
5367
|
if (typeof e == "function")
|
|
5352
5368
|
return At(e);
|
|
5353
5369
|
if (typeof e == "object")
|
|
@@ -5360,7 +5376,7 @@ const It = (
|
|
|
5360
5376
|
)
|
|
5361
5377
|
);
|
|
5362
5378
|
if (typeof e == "string")
|
|
5363
|
-
return
|
|
5379
|
+
return Pl(e);
|
|
5364
5380
|
throw new Error("Expected function, string, or object as test");
|
|
5365
5381
|
})
|
|
5366
5382
|
);
|
|
@@ -5395,7 +5411,7 @@ function _l(e) {
|
|
|
5395
5411
|
return !0;
|
|
5396
5412
|
}
|
|
5397
5413
|
}
|
|
5398
|
-
function
|
|
5414
|
+
function Pl(e) {
|
|
5399
5415
|
return At(t);
|
|
5400
5416
|
function t(n) {
|
|
5401
5417
|
return n && n.type === e;
|
|
@@ -5404,7 +5420,7 @@ function Nl(e) {
|
|
|
5404
5420
|
function At(e) {
|
|
5405
5421
|
return t;
|
|
5406
5422
|
function t(n, r, i) {
|
|
5407
|
-
return !!(
|
|
5423
|
+
return !!(Nl(n) && e.call(
|
|
5408
5424
|
this,
|
|
5409
5425
|
n,
|
|
5410
5426
|
typeof r == "number" ? r : void 0,
|
|
@@ -5412,13 +5428,13 @@ function At(e) {
|
|
|
5412
5428
|
));
|
|
5413
5429
|
}
|
|
5414
5430
|
}
|
|
5415
|
-
function
|
|
5431
|
+
function Dl() {
|
|
5416
5432
|
return !0;
|
|
5417
5433
|
}
|
|
5418
|
-
function
|
|
5434
|
+
function Nl(e) {
|
|
5419
5435
|
return e !== null && typeof e == "object" && "type" in e;
|
|
5420
5436
|
}
|
|
5421
|
-
const Yr = [],
|
|
5437
|
+
const Yr = [], Ll = !0, en = !1, zl = "skip";
|
|
5422
5438
|
function Jr(e, t, n, r) {
|
|
5423
5439
|
let i;
|
|
5424
5440
|
typeof t == "function" && typeof n != "function" ? (r = n, n = t) : i = t;
|
|
@@ -5464,7 +5480,7 @@ function Jr(e, t, n, r) {
|
|
|
5464
5480
|
}
|
|
5465
5481
|
}
|
|
5466
5482
|
function Rl(e) {
|
|
5467
|
-
return Array.isArray(e) ? e : typeof e == "number" ? [
|
|
5483
|
+
return Array.isArray(e) ? e : typeof e == "number" ? [Ll, e] : e == null ? Yr : [e];
|
|
5468
5484
|
}
|
|
5469
5485
|
function xn(e, t, n, r) {
|
|
5470
5486
|
let i, a, o;
|
|
@@ -6838,7 +6854,7 @@ function gu(e, t) {
|
|
|
6838
6854
|
const n = t.allowedElements, r = t.allowElement, i = t.components, a = t.disallowedElements, o = t.skipHtml, s = t.unwrapDisallowed, l = t.urlTransform || yu;
|
|
6839
6855
|
for (const h of fu)
|
|
6840
6856
|
Object.hasOwn(t, h.from) && ("" + h.from + (h.to ? "use `" + h.to + "` instead" : "remove it") + cu + h.id, void 0);
|
|
6841
|
-
return xn(e, u),
|
|
6857
|
+
return xn(e, u), Do(e, {
|
|
6842
6858
|
Fragment: an,
|
|
6843
6859
|
components: i,
|
|
6844
6860
|
ignoreInvalidStyle: !0,
|
|
@@ -6852,9 +6868,9 @@ function gu(e, t) {
|
|
|
6852
6868
|
return o ? p.children.splice(c, 1) : p.children[c] = { type: "text", value: h.value }, c;
|
|
6853
6869
|
if (h.type === "element") {
|
|
6854
6870
|
let f;
|
|
6855
|
-
for (f in
|
|
6856
|
-
if (Object.hasOwn(
|
|
6857
|
-
const d = h.properties[f], b =
|
|
6871
|
+
for (f in Nt)
|
|
6872
|
+
if (Object.hasOwn(Nt, f) && Object.hasOwn(h.properties, f)) {
|
|
6873
|
+
const d = h.properties[f], b = Nt[f];
|
|
6858
6874
|
(b === null || b.includes(h.tagName)) && (h.properties[f] = l(String(d || ""), f, h));
|
|
6859
6875
|
}
|
|
6860
6876
|
}
|
|
@@ -6916,16 +6932,16 @@ function bu(e, t, n) {
|
|
|
6916
6932
|
p.lastIndex = 0;
|
|
6917
6933
|
let T = p.exec(u.value);
|
|
6918
6934
|
for (; T; ) {
|
|
6919
|
-
const
|
|
6935
|
+
const z = T.index, P = {
|
|
6920
6936
|
index: T.index,
|
|
6921
6937
|
input: T.input,
|
|
6922
6938
|
stack: [...h, u]
|
|
6923
6939
|
};
|
|
6924
|
-
let x = f(...T,
|
|
6925
|
-
if (typeof x == "string" && (x = x.length > 0 ? { type: "text", value: x } : void 0), x === !1 ? p.lastIndex =
|
|
6940
|
+
let x = f(...T, P);
|
|
6941
|
+
if (typeof x == "string" && (x = x.length > 0 ? { type: "text", value: x } : void 0), x === !1 ? p.lastIndex = z + 1 : (d !== z && w.push({
|
|
6926
6942
|
type: "text",
|
|
6927
|
-
value: u.value.slice(d,
|
|
6928
|
-
}), Array.isArray(x) ? w.push(...x) : x && w.push(x), d =
|
|
6943
|
+
value: u.value.slice(d, z)
|
|
6944
|
+
}), Array.isArray(x) ? w.push(...x) : x && w.push(x), d = z + T[0].length, k = !0), !p.global)
|
|
6929
6945
|
break;
|
|
6930
6946
|
T = p.exec(u.value);
|
|
6931
6947
|
}
|
|
@@ -6955,7 +6971,7 @@ function vu(e) {
|
|
|
6955
6971
|
const $t = "phrasing", Vt = ["autolink", "link", "image", "label"];
|
|
6956
6972
|
function Cu() {
|
|
6957
6973
|
return {
|
|
6958
|
-
transforms: [
|
|
6974
|
+
transforms: [Pu],
|
|
6959
6975
|
enter: {
|
|
6960
6976
|
literalAutolink: Tu,
|
|
6961
6977
|
literalAutolinkEmail: qt,
|
|
@@ -7017,19 +7033,19 @@ function Au(e) {
|
|
|
7017
7033
|
function _u(e) {
|
|
7018
7034
|
this.exit(e);
|
|
7019
7035
|
}
|
|
7020
|
-
function
|
|
7036
|
+
function Pu(e) {
|
|
7021
7037
|
bu(
|
|
7022
7038
|
e,
|
|
7023
7039
|
[
|
|
7024
|
-
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,
|
|
7025
|
-
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"),
|
|
7040
|
+
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, Du],
|
|
7041
|
+
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), Nu]
|
|
7026
7042
|
],
|
|
7027
7043
|
{ ignore: ["link", "linkReference"] }
|
|
7028
7044
|
);
|
|
7029
7045
|
}
|
|
7030
|
-
function
|
|
7046
|
+
function Du(e, t, n, r, i) {
|
|
7031
7047
|
let a = "";
|
|
7032
|
-
if (!Zr(i) || (/^w/i.test(t) && (n = t + n, t = "", a = "http://"), !
|
|
7048
|
+
if (!Zr(i) || (/^w/i.test(t) && (n = t + n, t = "", a = "http://"), !Lu(n)))
|
|
7033
7049
|
return !1;
|
|
7034
7050
|
const o = zu(n + r);
|
|
7035
7051
|
if (!o[0]) return !1;
|
|
@@ -7041,7 +7057,7 @@ function Lu(e, t, n, r, i) {
|
|
|
7041
7057
|
};
|
|
7042
7058
|
return o[1] ? [s, { type: "text", value: o[1] }] : s;
|
|
7043
7059
|
}
|
|
7044
|
-
function
|
|
7060
|
+
function Nu(e, t, n, r) {
|
|
7045
7061
|
return (
|
|
7046
7062
|
// Not an expected previous character.
|
|
7047
7063
|
!Zr(r, !0) || // Label ends in not allowed character.
|
|
@@ -7053,7 +7069,7 @@ function Pu(e, t, n, r) {
|
|
|
7053
7069
|
}
|
|
7054
7070
|
);
|
|
7055
7071
|
}
|
|
7056
|
-
function
|
|
7072
|
+
function Lu(e) {
|
|
7057
7073
|
const t = e.split(".");
|
|
7058
7074
|
return !(t.length < 2 || t[t.length - 1] && (/_/.test(t[t.length - 1]) || !/[a-zA-Z\d]/.test(t[t.length - 1])) || t[t.length - 2] && (/_/.test(t[t.length - 2]) || !/[a-zA-Z\d]/.test(t[t.length - 2])));
|
|
7059
7075
|
}
|
|
@@ -7258,14 +7274,14 @@ function ec(e, t) {
|
|
|
7258
7274
|
const k = [];
|
|
7259
7275
|
for (; ++c < u; ) {
|
|
7260
7276
|
const w = b[c] || "";
|
|
7261
|
-
let T = "",
|
|
7277
|
+
let T = "", z = "";
|
|
7262
7278
|
if (n.alignDelimiters !== !1) {
|
|
7263
|
-
const
|
|
7264
|
-
x === 114 ? T = " ".repeat(
|
|
7279
|
+
const P = l[c] - (v[c] || 0), x = a[c];
|
|
7280
|
+
x === 114 ? T = " ".repeat(P) : x === 99 ? P % 2 ? (T = " ".repeat(P / 2 + 0.5), z = " ".repeat(P / 2 - 0.5)) : (T = " ".repeat(P / 2), z = T) : z = " ".repeat(P);
|
|
7265
7281
|
}
|
|
7266
7282
|
n.delimiterStart !== !1 && !c && k.push("|"), n.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
|
|
7267
7283
|
// empty: there will be a closing space.
|
|
7268
|
-
!(n.alignDelimiters === !1 && w === "") && (n.delimiterStart !== !1 || c) && k.push(" "), n.alignDelimiters !== !1 && k.push(T), k.push(w), n.alignDelimiters !== !1 && k.push(
|
|
7284
|
+
!(n.alignDelimiters === !1 && w === "") && (n.delimiterStart !== !1 || c) && k.push(" "), n.alignDelimiters !== !1 && k.push(T), k.push(w), n.alignDelimiters !== !1 && k.push(z), n.padding !== !1 && k.push(" "), (n.delimiterEnd !== !1 || c !== u - 1) && k.push("|");
|
|
7269
7285
|
}
|
|
7270
7286
|
d.push(
|
|
7271
7287
|
n.delimiterEnd === !1 ? k.join("").replace(/ +$/, "") : k.join("")
|
|
@@ -7813,7 +7829,7 @@ function _c(e) {
|
|
|
7813
7829
|
);
|
|
7814
7830
|
return t;
|
|
7815
7831
|
}
|
|
7816
|
-
fi.peek =
|
|
7832
|
+
fi.peek = Pc;
|
|
7817
7833
|
function fi(e, t, n, r) {
|
|
7818
7834
|
const i = _c(n), a = n.enter("strong"), o = n.createTracker(r), s = o.move(i + i);
|
|
7819
7835
|
let l = o.move(
|
|
@@ -7837,13 +7853,13 @@ function fi(e, t, n, r) {
|
|
|
7837
7853
|
before: h.outside
|
|
7838
7854
|
}, s + l + f;
|
|
7839
7855
|
}
|
|
7840
|
-
function
|
|
7856
|
+
function Pc(e, t, n) {
|
|
7841
7857
|
return n.options.strong || "*";
|
|
7842
7858
|
}
|
|
7843
|
-
function
|
|
7859
|
+
function Dc(e, t, n, r) {
|
|
7844
7860
|
return n.safe(e.value, r);
|
|
7845
7861
|
}
|
|
7846
|
-
function
|
|
7862
|
+
function Nc(e) {
|
|
7847
7863
|
const t = e.options.ruleRepetition || 3;
|
|
7848
7864
|
if (t < 3)
|
|
7849
7865
|
throw new Error(
|
|
@@ -7851,8 +7867,8 @@ function Pc(e) {
|
|
|
7851
7867
|
);
|
|
7852
7868
|
return t;
|
|
7853
7869
|
}
|
|
7854
|
-
function
|
|
7855
|
-
const r = (hi(n) + (n.options.ruleSpaces ? " " : "")).repeat(
|
|
7870
|
+
function Lc(e, t, n) {
|
|
7871
|
+
const r = (hi(n) + (n.options.ruleSpaces ? " " : "")).repeat(Nc(n));
|
|
7856
7872
|
return n.options.ruleSpaces ? r.slice(0, -1) : r;
|
|
7857
7873
|
}
|
|
7858
7874
|
const pi = {
|
|
@@ -7874,8 +7890,8 @@ const pi = {
|
|
|
7874
7890
|
paragraph: Ec,
|
|
7875
7891
|
root: Ac,
|
|
7876
7892
|
strong: fi,
|
|
7877
|
-
text:
|
|
7878
|
-
thematicBreak:
|
|
7893
|
+
text: Dc,
|
|
7894
|
+
thematicBreak: Lc
|
|
7879
7895
|
};
|
|
7880
7896
|
function zc() {
|
|
7881
7897
|
return {
|
|
@@ -8100,7 +8116,7 @@ const Gc = {
|
|
|
8100
8116
|
name: "protocolAutolink",
|
|
8101
8117
|
tokenize: Qc,
|
|
8102
8118
|
previous: xi
|
|
8103
|
-
},
|
|
8119
|
+
}, Ne = {
|
|
8104
8120
|
name: "emailAutolink",
|
|
8105
8121
|
tokenize: Yc,
|
|
8106
8122
|
previous: wi
|
|
@@ -8112,15 +8128,15 @@ function Xc() {
|
|
|
8112
8128
|
}
|
|
8113
8129
|
let Fe = 48;
|
|
8114
8130
|
for (; Fe < 123; )
|
|
8115
|
-
Ae[Fe] =
|
|
8116
|
-
Ae[43] =
|
|
8117
|
-
Ae[45] =
|
|
8118
|
-
Ae[46] =
|
|
8119
|
-
Ae[95] =
|
|
8120
|
-
Ae[72] = [
|
|
8121
|
-
Ae[104] = [
|
|
8122
|
-
Ae[87] = [
|
|
8123
|
-
Ae[119] = [
|
|
8131
|
+
Ae[Fe] = Ne, Fe++, Fe === 58 ? Fe = 65 : Fe === 91 && (Fe = 97);
|
|
8132
|
+
Ae[43] = Ne;
|
|
8133
|
+
Ae[45] = Ne;
|
|
8134
|
+
Ae[46] = Ne;
|
|
8135
|
+
Ae[95] = Ne;
|
|
8136
|
+
Ae[72] = [Ne, ki];
|
|
8137
|
+
Ae[104] = [Ne, ki];
|
|
8138
|
+
Ae[87] = [Ne, yi];
|
|
8139
|
+
Ae[119] = [Ne, yi];
|
|
8124
8140
|
function Yc(e, t, n) {
|
|
8125
8141
|
const r = this;
|
|
8126
8142
|
let i, a;
|
|
@@ -8616,14 +8632,14 @@ function kh(e, t, n) {
|
|
|
8616
8632
|
let i = 0, a = 0, o;
|
|
8617
8633
|
return s;
|
|
8618
8634
|
function s(y) {
|
|
8619
|
-
let
|
|
8620
|
-
for (;
|
|
8621
|
-
const A = r.events[
|
|
8635
|
+
let E = r.events.length - 1;
|
|
8636
|
+
for (; E > -1; ) {
|
|
8637
|
+
const A = r.events[E][1].type;
|
|
8622
8638
|
if (A === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
|
|
8623
|
-
A === "linePrefix")
|
|
8639
|
+
A === "linePrefix") E--;
|
|
8624
8640
|
else break;
|
|
8625
8641
|
}
|
|
8626
|
-
const
|
|
8642
|
+
const L = E > -1 ? r.events[E][1].type : null, _ = L === "tableHead" || L === "tableRow" ? x : l;
|
|
8627
8643
|
return _ === x && r.parser.lazy[r.now().line] ? n(y) : _(y);
|
|
8628
8644
|
}
|
|
8629
8645
|
function l(y) {
|
|
@@ -8645,37 +8661,37 @@ function kh(e, t, n) {
|
|
|
8645
8661
|
return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(y) : (e.enter("tableDelimiterRow"), o = !1, H(y) ? q(e, d, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(y) : d(y));
|
|
8646
8662
|
}
|
|
8647
8663
|
function d(y) {
|
|
8648
|
-
return y === 45 || y === 58 ? v(y) : y === 124 ? (o = !0, e.enter("tableCellDivider"), e.consume(y), e.exit("tableCellDivider"), b) :
|
|
8664
|
+
return y === 45 || y === 58 ? v(y) : y === 124 ? (o = !0, e.enter("tableCellDivider"), e.consume(y), e.exit("tableCellDivider"), b) : P(y);
|
|
8649
8665
|
}
|
|
8650
8666
|
function b(y) {
|
|
8651
8667
|
return H(y) ? q(e, v, "whitespace")(y) : v(y);
|
|
8652
8668
|
}
|
|
8653
8669
|
function v(y) {
|
|
8654
|
-
return y === 58 ? (a += 1, o = !0, e.enter("tableDelimiterMarker"), e.consume(y), e.exit("tableDelimiterMarker"), k) : y === 45 ? (a += 1, k(y)) : y === null || M(y) ?
|
|
8670
|
+
return y === 58 ? (a += 1, o = !0, e.enter("tableDelimiterMarker"), e.consume(y), e.exit("tableDelimiterMarker"), k) : y === 45 ? (a += 1, k(y)) : y === null || M(y) ? z(y) : P(y);
|
|
8655
8671
|
}
|
|
8656
8672
|
function k(y) {
|
|
8657
|
-
return y === 45 ? (e.enter("tableDelimiterFiller"), w(y)) :
|
|
8673
|
+
return y === 45 ? (e.enter("tableDelimiterFiller"), w(y)) : P(y);
|
|
8658
8674
|
}
|
|
8659
8675
|
function w(y) {
|
|
8660
8676
|
return y === 45 ? (e.consume(y), w) : y === 58 ? (o = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(y), e.exit("tableDelimiterMarker"), T) : (e.exit("tableDelimiterFiller"), T(y));
|
|
8661
8677
|
}
|
|
8662
8678
|
function T(y) {
|
|
8663
|
-
return H(y) ? q(e,
|
|
8679
|
+
return H(y) ? q(e, z, "whitespace")(y) : z(y);
|
|
8664
8680
|
}
|
|
8665
|
-
function
|
|
8666
|
-
return y === 124 ? d(y) : y === null || M(y) ? !o || i !== a ?
|
|
8681
|
+
function z(y) {
|
|
8682
|
+
return y === 124 ? d(y) : y === null || M(y) ? !o || i !== a ? P(y) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(y)) : P(y);
|
|
8667
8683
|
}
|
|
8668
|
-
function
|
|
8684
|
+
function P(y) {
|
|
8669
8685
|
return n(y);
|
|
8670
8686
|
}
|
|
8671
8687
|
function x(y) {
|
|
8672
|
-
return e.enter("tableRow"),
|
|
8688
|
+
return e.enter("tableRow"), N(y);
|
|
8673
8689
|
}
|
|
8674
|
-
function
|
|
8675
|
-
return y === 124 ? (e.enter("tableCellDivider"), e.consume(y), e.exit("tableCellDivider"),
|
|
8690
|
+
function N(y) {
|
|
8691
|
+
return y === 124 ? (e.enter("tableCellDivider"), e.consume(y), e.exit("tableCellDivider"), N) : y === null || M(y) ? (e.exit("tableRow"), t(y)) : H(y) ? q(e, N, "whitespace")(y) : (e.enter("data"), O(y));
|
|
8676
8692
|
}
|
|
8677
8693
|
function O(y) {
|
|
8678
|
-
return y === null || y === 124 || Y(y) ? (e.exit("data"),
|
|
8694
|
+
return y === null || y === 124 || Y(y) ? (e.exit("data"), N(y)) : (e.consume(y), y === 92 ? B : O);
|
|
8679
8695
|
}
|
|
8680
8696
|
function B(y) {
|
|
8681
8697
|
return y === 92 || y === 124 ? (e.consume(y), O) : O(y);
|
|
@@ -8779,7 +8795,7 @@ function Ch(e, t, n) {
|
|
|
8779
8795
|
}
|
|
8780
8796
|
}
|
|
8781
8797
|
function Sh(e) {
|
|
8782
|
-
return
|
|
8798
|
+
return Nr([
|
|
8783
8799
|
Xc(),
|
|
8784
8800
|
oh(),
|
|
8785
8801
|
ph(e),
|
|
@@ -8804,27 +8820,27 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
8804
8820
|
LIGHT: "light",
|
|
8805
8821
|
DARK: "dark",
|
|
8806
8822
|
AUTO: "auto"
|
|
8807
|
-
},
|
|
8823
|
+
}, Ph = {
|
|
8808
8824
|
SPANISH: "es",
|
|
8809
8825
|
ENGLISH: "en",
|
|
8810
8826
|
FRANCES: "fr"
|
|
8811
|
-
},
|
|
8827
|
+
}, Dh = {
|
|
8812
8828
|
MOBILE: 640
|
|
8813
8829
|
}, Re = {
|
|
8814
8830
|
theme: _h.AUTO,
|
|
8815
8831
|
position: Ah.BOTTOM_RIGHT,
|
|
8816
|
-
language:
|
|
8832
|
+
language: Ph.ENGLISH,
|
|
8817
8833
|
width: "400px",
|
|
8818
8834
|
height: "600px",
|
|
8819
8835
|
autoOpen: !1,
|
|
8820
8836
|
showBranding: !0,
|
|
8821
8837
|
mobileFullscreen: !0
|
|
8822
8838
|
// Configurable
|
|
8823
|
-
},
|
|
8839
|
+
}, Nh = {
|
|
8824
8840
|
API_REQUEST: 3e4
|
|
8825
8841
|
}, gr = {
|
|
8826
8842
|
MAX_LENGTH: 2e3
|
|
8827
|
-
},
|
|
8843
|
+
}, Lh = () => window.innerWidth < Dh.MOBILE, zh = (e) => {
|
|
8828
8844
|
try {
|
|
8829
8845
|
return new Date(e).toLocaleTimeString("es-ES", {
|
|
8830
8846
|
hour: "2-digit",
|
|
@@ -8938,34 +8954,34 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
8938
8954
|
onLoadMoreMessages: o = null
|
|
8939
8955
|
}) => {
|
|
8940
8956
|
const { t: s } = ge(), l = le(null), u = le(null), h = le(0), c = le(!1), p = le(null), f = le(null), d = le(0);
|
|
8941
|
-
|
|
8957
|
+
Pi(() => {
|
|
8942
8958
|
e.length > 0 && !c.current && (l.current?.scrollIntoView({ behavior: "instant" }), c.current = !0, h.current = e.length);
|
|
8943
8959
|
}, [e.length]), te(() => {
|
|
8944
8960
|
if (!o) return;
|
|
8945
|
-
const
|
|
8946
|
-
(
|
|
8947
|
-
|
|
8961
|
+
const z = new IntersectionObserver(
|
|
8962
|
+
(P) => {
|
|
8963
|
+
P[0].isIntersecting && i && !a && (p.current && (d.current = p.current.scrollHeight), o());
|
|
8948
8964
|
},
|
|
8949
8965
|
{ threshold: 1 }
|
|
8950
8966
|
);
|
|
8951
|
-
return f.current &&
|
|
8952
|
-
f.current &&
|
|
8967
|
+
return f.current && z.observe(f.current), () => {
|
|
8968
|
+
f.current && z.unobserve(f.current);
|
|
8953
8969
|
};
|
|
8954
8970
|
}, [i, a, o]), te(() => {
|
|
8955
8971
|
if (a === !1 && d.current > 0 && p.current) {
|
|
8956
|
-
const
|
|
8957
|
-
p.current.scrollTop =
|
|
8972
|
+
const P = p.current.scrollHeight - d.current;
|
|
8973
|
+
p.current.scrollTop = P, d.current = 0;
|
|
8958
8974
|
}
|
|
8959
8975
|
}, [a]), te(() => {
|
|
8960
|
-
const
|
|
8961
|
-
|
|
8976
|
+
const z = e.length, P = h.current, x = e[z - 1], N = z > P + 1;
|
|
8977
|
+
z > 0 && c.current && (N ? setTimeout(() => {
|
|
8962
8978
|
l.current?.scrollIntoView({ behavior: "instant" });
|
|
8963
|
-
}, 150) :
|
|
8979
|
+
}, 150) : z > P && x && (x.role === "user" ? l.current?.scrollIntoView({ behavior: "smooth" }) : x.role === "assistant" && x.isStreaming && setTimeout(() => {
|
|
8964
8980
|
u.current?.scrollIntoView({
|
|
8965
8981
|
behavior: "smooth",
|
|
8966
8982
|
block: "start"
|
|
8967
8983
|
});
|
|
8968
|
-
}, 100))), h.current =
|
|
8984
|
+
}, 100))), h.current = z;
|
|
8969
8985
|
}, [e]);
|
|
8970
8986
|
const b = r?.widget_customization?.branding?.company_name || "TIA GPC", v = r?.widget_customization?.branding?.company_logo_base64, k = r?.widget_customization?.welcome_message, w = v?.startsWith("data:") ? v : v ? `data:image/png;base64,${v}` : null, T = k || s("chat.welcome", { companyName: b });
|
|
8971
8987
|
return e.length === 0 && !t ? /* @__PURE__ */ S("div", { className: "gpc-messages-container", children: /* @__PURE__ */ F("div", { className: "gpc-empty-state", children: [
|
|
@@ -8989,14 +9005,14 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
8989
9005
|
/* @__PURE__ */ S("div", { className: "gpc-loading-spinner" }),
|
|
8990
9006
|
/* @__PURE__ */ S("span", { children: s("chat.loadingMore", "Loading older messages...") })
|
|
8991
9007
|
] }) : /* @__PURE__ */ S("div", { ref: f, style: { height: "1px" } }) }),
|
|
8992
|
-
e.map((
|
|
9008
|
+
e.map((z, P) => /* @__PURE__ */ S(
|
|
8993
9009
|
jh,
|
|
8994
9010
|
{
|
|
8995
|
-
message:
|
|
9011
|
+
message: z,
|
|
8996
9012
|
showMetadata: n,
|
|
8997
|
-
messageRef:
|
|
9013
|
+
messageRef: P === e.length - 1 ? u : null
|
|
8998
9014
|
},
|
|
8999
|
-
|
|
9015
|
+
z.id
|
|
9000
9016
|
)),
|
|
9001
9017
|
/* @__PURE__ */ S("div", { ref: l })
|
|
9002
9018
|
]
|
|
@@ -9021,12 +9037,12 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9021
9037
|
if (!f.current || !d.current)
|
|
9022
9038
|
return;
|
|
9023
9039
|
f.current.getByteTimeDomainData(d.current);
|
|
9024
|
-
let
|
|
9040
|
+
let N = 0;
|
|
9025
9041
|
for (let y = 0; y < d.current.length; y++) {
|
|
9026
|
-
const
|
|
9027
|
-
|
|
9042
|
+
const E = (d.current[y] - 128) / 128;
|
|
9043
|
+
N += E * E;
|
|
9028
9044
|
}
|
|
9029
|
-
if (Math.sqrt(
|
|
9045
|
+
if (Math.sqrt(N / d.current.length) * 100 < Hh) {
|
|
9030
9046
|
if (b.current || (b.current = Date.now()), Date.now() - b.current > $h) {
|
|
9031
9047
|
T();
|
|
9032
9048
|
return;
|
|
@@ -9039,7 +9055,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9039
9055
|
alert(a("voice.unsupported"));
|
|
9040
9056
|
return;
|
|
9041
9057
|
}
|
|
9042
|
-
const
|
|
9058
|
+
const N = await navigator.mediaDevices.getUserMedia({
|
|
9043
9059
|
audio: {
|
|
9044
9060
|
echoCancellation: !0,
|
|
9045
9061
|
noiseSuppression: !0,
|
|
@@ -9048,47 +9064,47 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9048
9064
|
channelCount: 1
|
|
9049
9065
|
}
|
|
9050
9066
|
});
|
|
9051
|
-
p.current = new (window.AudioContext || window.webkitAudioContext)(), f.current = p.current.createAnalyser(), p.current.createMediaStreamSource(
|
|
9067
|
+
p.current = new (window.AudioContext || window.webkitAudioContext)(), f.current = p.current.createAnalyser(), p.current.createMediaStreamSource(N).connect(f.current), f.current.fftSize = 1024, f.current.smoothingTimeConstant = 0.4, f.current.minDecibels = -85, f.current.maxDecibels = -15;
|
|
9052
9068
|
const B = f.current.frequencyBinCount;
|
|
9053
9069
|
d.current = new Uint8Array(B);
|
|
9054
|
-
const y = new MediaRecorder(
|
|
9070
|
+
const y = new MediaRecorder(N, {
|
|
9055
9071
|
mimeType: "audio/webm;codecs=opus"
|
|
9056
9072
|
});
|
|
9057
|
-
h.current = y, c.current = [], b.current = null, y.ondataavailable = (
|
|
9058
|
-
|
|
9073
|
+
h.current = y, c.current = [], b.current = null, y.ondataavailable = (E) => {
|
|
9074
|
+
E.data.size > 0 && c.current.push(E.data);
|
|
9059
9075
|
}, y.onstop = async () => {
|
|
9060
9076
|
if (v.current && (clearInterval(v.current), v.current = null), p.current && p.current.state !== "closed" && p.current.close(), b.current = null, c.current.length === 0) {
|
|
9061
9077
|
console.warn("No audio data recorded");
|
|
9062
9078
|
return;
|
|
9063
9079
|
}
|
|
9064
|
-
const
|
|
9080
|
+
const E = new Blob(c.current, {
|
|
9065
9081
|
type: "audio/webm"
|
|
9066
9082
|
});
|
|
9067
9083
|
u(!0);
|
|
9068
9084
|
try {
|
|
9069
|
-
await e(
|
|
9070
|
-
} catch (
|
|
9071
|
-
console.error("Transcription error:",
|
|
9085
|
+
await e(E);
|
|
9086
|
+
} catch (L) {
|
|
9087
|
+
console.error("Transcription error:", L), alert(a("voice.error"));
|
|
9072
9088
|
} finally {
|
|
9073
9089
|
u(!1), c.current = [];
|
|
9074
9090
|
}
|
|
9075
9091
|
}, y.start(100), s(!0), v.current = setInterval(() => {
|
|
9076
9092
|
k();
|
|
9077
9093
|
}, 100);
|
|
9078
|
-
} catch (
|
|
9079
|
-
console.error("Error accessing microphone:",
|
|
9094
|
+
} catch (N) {
|
|
9095
|
+
console.error("Error accessing microphone:", N), N.name === "NotAllowedError" || N.name === "PermissionDeniedError" ? alert(a("voice.permissionDenied")) : alert(a("voice.unsupported"));
|
|
9080
9096
|
}
|
|
9081
9097
|
}, T = () => {
|
|
9082
|
-
!o && h.current?.state !== "recording" || (h.current && h.current.state === "recording" && h.current.stop(), v.current && (clearInterval(v.current), v.current = null), b.current = null, s(!1), h.current && h.current.stream && h.current.stream.getTracks().forEach((
|
|
9083
|
-
},
|
|
9084
|
-
o ? T() : w();
|
|
9085
|
-
},
|
|
9098
|
+
!o && h.current?.state !== "recording" || (h.current && h.current.state === "recording" && h.current.stop(), v.current && (clearInterval(v.current), v.current = null), b.current = null, s(!1), h.current && h.current.stream && h.current.stream.getTracks().forEach((N) => N.stop()));
|
|
9099
|
+
}, z = (N) => {
|
|
9100
|
+
N.preventDefault(), N.stopPropagation(), o ? T() : w();
|
|
9101
|
+
}, P = n || t || l, x = a(l ? "voice.processing" : o ? "voice.stop" : "voice.record");
|
|
9086
9102
|
return /* @__PURE__ */ S(
|
|
9087
9103
|
"button",
|
|
9088
9104
|
{
|
|
9089
9105
|
type: "button",
|
|
9090
|
-
onClick:
|
|
9091
|
-
disabled:
|
|
9106
|
+
onClick: z,
|
|
9107
|
+
disabled: P,
|
|
9092
9108
|
className: `gpc-voice-button ${o ? "gpc-voice-recording" : ""}`,
|
|
9093
9109
|
"aria-label": x,
|
|
9094
9110
|
title: x,
|
|
@@ -9108,8 +9124,8 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9108
9124
|
r.current = requestAnimationFrame(b), e.getByteFrequencyData(s), a.clearRect(0, 0, h, c);
|
|
9109
9125
|
const v = p * (f + d), k = (h - v) / 2;
|
|
9110
9126
|
for (let w = 0; w < p; w++) {
|
|
9111
|
-
const T = Math.floor(w * o / p),
|
|
9112
|
-
B.addColorStop(0, "rgba(59, 130, 246, 0.8)"), B.addColorStop(1, "rgba(96, 165, 250, 0.6)"), a.fillStyle = B, a.fillRect(
|
|
9127
|
+
const T = Math.floor(w * o / p), P = s[T] / 255, x = Math.max(2, P * c * 0.8), N = k + w * (f + d), O = (c - x) / 2, B = a.createLinearGradient(0, O, 0, O + x);
|
|
9128
|
+
B.addColorStop(0, "rgba(59, 130, 246, 0.8)"), B.addColorStop(1, "rgba(96, 165, 250, 0.6)"), a.fillStyle = B, a.fillRect(N, O, f, x);
|
|
9113
9129
|
}
|
|
9114
9130
|
};
|
|
9115
9131
|
return b(), () => {
|
|
@@ -9139,27 +9155,27 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9139
9155
|
120
|
|
9140
9156
|
)}px`);
|
|
9141
9157
|
}, [o]);
|
|
9142
|
-
const f = async (
|
|
9143
|
-
|
|
9158
|
+
const f = async (P) => {
|
|
9159
|
+
P.preventDefault();
|
|
9144
9160
|
const x = Oh(o);
|
|
9145
9161
|
if (!(!x || t || n || l))
|
|
9146
9162
|
try {
|
|
9147
9163
|
await e(x), s(""), p.current && (p.current.style.height = "auto");
|
|
9148
|
-
} catch (
|
|
9149
|
-
console.error("Error sending message:",
|
|
9164
|
+
} catch (N) {
|
|
9165
|
+
console.error("Error sending message:", N);
|
|
9150
9166
|
}
|
|
9151
|
-
}, d = (
|
|
9152
|
-
|
|
9153
|
-
}, b = async (
|
|
9167
|
+
}, d = (P) => {
|
|
9168
|
+
P.key === "Enter" && !P.shiftKey && !l && (P.preventDefault(), f(P));
|
|
9169
|
+
}, b = async (P) => {
|
|
9154
9170
|
if (!r)
|
|
9155
9171
|
throw new Error(a("toast.gpcServiceNotAvailable"));
|
|
9156
|
-
const x = await r.transcribeAudio(
|
|
9172
|
+
const x = await r.transcribeAudio(P);
|
|
9157
9173
|
x.success && x.text && (s(x.text), p.current?.focus());
|
|
9158
|
-
}, v = (
|
|
9159
|
-
u(
|
|
9160
|
-
}, k = (
|
|
9161
|
-
c(
|
|
9162
|
-
}, w = o.trim().length > 0 && !t && !n && !l, T = t || n || l,
|
|
9174
|
+
}, v = (P) => {
|
|
9175
|
+
u(P);
|
|
9176
|
+
}, k = (P) => {
|
|
9177
|
+
c(P);
|
|
9178
|
+
}, w = o.trim().length > 0 && !t && !n && !l, T = t || n || l, z = n || o.trim().length > 0;
|
|
9163
9179
|
return /* @__PURE__ */ F("form", { onSubmit: f, className: "gpc-input-container", children: [
|
|
9164
9180
|
/* @__PURE__ */ F("div", { className: "gpc-input-wrapper", children: [
|
|
9165
9181
|
/* @__PURE__ */ S(
|
|
@@ -9167,7 +9183,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9167
9183
|
{
|
|
9168
9184
|
ref: p,
|
|
9169
9185
|
value: o,
|
|
9170
|
-
onChange: (
|
|
9186
|
+
onChange: (P) => s(P.target.value),
|
|
9171
9187
|
onKeyDown: d,
|
|
9172
9188
|
placeholder: l ? "" : a("chat.placeholder"),
|
|
9173
9189
|
disabled: T,
|
|
@@ -9186,7 +9202,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9186
9202
|
{
|
|
9187
9203
|
onTranscript: b,
|
|
9188
9204
|
isLoading: t,
|
|
9189
|
-
disabled:
|
|
9205
|
+
disabled: z,
|
|
9190
9206
|
onRecordingStateChange: v,
|
|
9191
9207
|
onAnalyserChange: k
|
|
9192
9208
|
}
|
|
@@ -9253,7 +9269,10 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9253
9269
|
/* @__PURE__ */ S(
|
|
9254
9270
|
"button",
|
|
9255
9271
|
{
|
|
9256
|
-
|
|
9272
|
+
type: "button",
|
|
9273
|
+
onClick: (h) => {
|
|
9274
|
+
h.preventDefault(), h.stopPropagation(), window.location.reload();
|
|
9275
|
+
},
|
|
9257
9276
|
className: "gpc-error-button",
|
|
9258
9277
|
children: r("chat.retry")
|
|
9259
9278
|
}
|
|
@@ -9272,8 +9291,8 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9272
9291
|
}) => {
|
|
9273
9292
|
const { t: s } = ge();
|
|
9274
9293
|
if (!e) return null;
|
|
9275
|
-
const l = () => {
|
|
9276
|
-
n(), t();
|
|
9294
|
+
const l = (h) => {
|
|
9295
|
+
h.preventDefault(), h.stopPropagation(), n(), t();
|
|
9277
9296
|
};
|
|
9278
9297
|
return /* @__PURE__ */ S("div", { className: "gpc-confirm-toast-container gpc-animate-slide-down", children: /* @__PURE__ */ F("div", { className: `gpc-confirm-toast ${o === "danger" ? "gpc-confirm-toast-danger" : ""}`, children: [
|
|
9279
9298
|
/* @__PURE__ */ S("p", { className: "gpc-confirm-toast-message", children: r }),
|
|
@@ -9281,7 +9300,10 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9281
9300
|
/* @__PURE__ */ S(
|
|
9282
9301
|
"button",
|
|
9283
9302
|
{
|
|
9284
|
-
|
|
9303
|
+
type: "button",
|
|
9304
|
+
onClick: (h) => {
|
|
9305
|
+
h.preventDefault(), h.stopPropagation(), t();
|
|
9306
|
+
},
|
|
9285
9307
|
className: "gpc-confirm-toast-button gpc-confirm-toast-button-cancel gpc-focus-visible gpc-transition",
|
|
9286
9308
|
children: a || s("conversations.cancel", "Cancel")
|
|
9287
9309
|
}
|
|
@@ -9289,6 +9311,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9289
9311
|
/* @__PURE__ */ S(
|
|
9290
9312
|
"button",
|
|
9291
9313
|
{
|
|
9314
|
+
type: "button",
|
|
9292
9315
|
onClick: l,
|
|
9293
9316
|
className: "gpc-confirm-toast-button gpc-confirm-toast-button-confirm gpc-focus-visible gpc-transition",
|
|
9294
9317
|
children: i || s("conversations.delete", "Delete")
|
|
@@ -9312,8 +9335,8 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9312
9335
|
const { t: c } = ge(), p = le(null), [f, d] = V(null), [b, v] = V(""), [k, w] = V({ isOpen: !1, id: null, title: "" });
|
|
9313
9336
|
te(() => {
|
|
9314
9337
|
const y = new IntersectionObserver(
|
|
9315
|
-
(
|
|
9316
|
-
|
|
9338
|
+
(E) => {
|
|
9339
|
+
E[0].isIntersecting && l && !u && !s && h();
|
|
9317
9340
|
},
|
|
9318
9341
|
{ threshold: 1 }
|
|
9319
9342
|
);
|
|
@@ -9327,19 +9350,19 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9327
9350
|
h
|
|
9328
9351
|
]);
|
|
9329
9352
|
const T = (y) => {
|
|
9330
|
-
const
|
|
9331
|
-
return A < 1 ? c("time.justNow", "Just now") : A < 60 ? c("time.minutesAgo", `${A} min ago`, { count: A }) : R < 24 ? c("time.hoursAgo", `${R}h ago`, { count: R }) : W < 7 ? c("time.daysAgo", `${W}d ago`, { count: W }) :
|
|
9332
|
-
},
|
|
9353
|
+
const E = new Date(y), _ = /* @__PURE__ */ new Date() - E, A = Math.floor(_ / 6e4), R = Math.floor(_ / 36e5), W = Math.floor(_ / 864e5);
|
|
9354
|
+
return A < 1 ? c("time.justNow", "Just now") : A < 60 ? c("time.minutesAgo", `${A} min ago`, { count: A }) : R < 24 ? c("time.hoursAgo", `${R}h ago`, { count: R }) : W < 7 ? c("time.daysAgo", `${W}d ago`, { count: W }) : E.toLocaleDateString();
|
|
9355
|
+
}, z = (y) => {
|
|
9333
9356
|
d(y.conversation_id), v(y.title || "");
|
|
9334
|
-
},
|
|
9357
|
+
}, P = () => {
|
|
9335
9358
|
d(null), v("");
|
|
9336
9359
|
}, x = (y) => {
|
|
9337
9360
|
b.trim() && a && (a(y, b.trim()), d(null), v(""));
|
|
9338
|
-
},
|
|
9361
|
+
}, N = (y, E) => {
|
|
9339
9362
|
w({
|
|
9340
9363
|
isOpen: !0,
|
|
9341
9364
|
id: y,
|
|
9342
|
-
title:
|
|
9365
|
+
title: E || c("conversations.untitled", "Untitled conversation")
|
|
9343
9366
|
});
|
|
9344
9367
|
}, O = () => {
|
|
9345
9368
|
k.id && o && o(k.id), w({ isOpen: !1, id: null, title: "" });
|
|
@@ -9352,7 +9375,10 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9352
9375
|
/* @__PURE__ */ F(
|
|
9353
9376
|
"button",
|
|
9354
9377
|
{
|
|
9355
|
-
|
|
9378
|
+
type: "button",
|
|
9379
|
+
onClick: (y) => {
|
|
9380
|
+
y.preventDefault(), y.stopPropagation(), i();
|
|
9381
|
+
},
|
|
9356
9382
|
className: "gpc-new-conversation-button gpc-focus-visible gpc-transition",
|
|
9357
9383
|
disabled: s,
|
|
9358
9384
|
"aria-label": c("conversations.new", "New"),
|
|
@@ -9386,9 +9412,9 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9386
9412
|
{
|
|
9387
9413
|
type: "text",
|
|
9388
9414
|
value: b,
|
|
9389
|
-
onChange: (
|
|
9390
|
-
onKeyDown: (
|
|
9391
|
-
|
|
9415
|
+
onChange: (E) => v(E.target.value),
|
|
9416
|
+
onKeyDown: (E) => {
|
|
9417
|
+
E.key === "Enter" && x(y.conversation_id), E.key === "Escape" && P();
|
|
9392
9418
|
},
|
|
9393
9419
|
className: "gpc-conversation-edit-input gpc-focus-visible",
|
|
9394
9420
|
placeholder: c("conversations.untitled", "Untitled conversation"),
|
|
@@ -9400,7 +9426,10 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9400
9426
|
/* @__PURE__ */ S(
|
|
9401
9427
|
"button",
|
|
9402
9428
|
{
|
|
9403
|
-
|
|
9429
|
+
type: "button",
|
|
9430
|
+
onClick: (E) => {
|
|
9431
|
+
E.preventDefault(), E.stopPropagation(), x(y.conversation_id);
|
|
9432
|
+
},
|
|
9404
9433
|
className: "gpc-conversation-action-button gpc-conversation-action-save gpc-focus-visible gpc-transition",
|
|
9405
9434
|
title: c("conversations.save", "Save"),
|
|
9406
9435
|
"aria-label": c("conversations.save", "Save"),
|
|
@@ -9410,7 +9439,10 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9410
9439
|
/* @__PURE__ */ S(
|
|
9411
9440
|
"button",
|
|
9412
9441
|
{
|
|
9413
|
-
|
|
9442
|
+
type: "button",
|
|
9443
|
+
onClick: (E) => {
|
|
9444
|
+
E.preventDefault(), E.stopPropagation(), P();
|
|
9445
|
+
},
|
|
9414
9446
|
className: "gpc-conversation-action-button gpc-conversation-action-cancel gpc-focus-visible gpc-transition",
|
|
9415
9447
|
title: c("conversations.cancel", "Cancel"),
|
|
9416
9448
|
"aria-label": c("conversations.cancel", "Cancel"),
|
|
@@ -9428,8 +9460,9 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9428
9460
|
/* @__PURE__ */ S(
|
|
9429
9461
|
"button",
|
|
9430
9462
|
{
|
|
9431
|
-
|
|
9432
|
-
|
|
9463
|
+
type: "button",
|
|
9464
|
+
onClick: (E) => {
|
|
9465
|
+
E.preventDefault(), E.stopPropagation(), z(y);
|
|
9433
9466
|
},
|
|
9434
9467
|
className: "gpc-conversation-action-button gpc-focus-visible gpc-transition",
|
|
9435
9468
|
disabled: s,
|
|
@@ -9441,8 +9474,9 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9441
9474
|
/* @__PURE__ */ S(
|
|
9442
9475
|
"button",
|
|
9443
9476
|
{
|
|
9444
|
-
|
|
9445
|
-
|
|
9477
|
+
type: "button",
|
|
9478
|
+
onClick: (E) => {
|
|
9479
|
+
E.preventDefault(), E.stopPropagation(), N(
|
|
9446
9480
|
y.conversation_id,
|
|
9447
9481
|
y.title || c("conversations.untitled", "Untitled conversation")
|
|
9448
9482
|
);
|
|
@@ -9495,12 +9529,12 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9495
9529
|
)
|
|
9496
9530
|
] });
|
|
9497
9531
|
}, Yh = (e, t, n) => {
|
|
9498
|
-
const { t: r } = ge(), [i, a] = V([]), [o, s] = V(!1), [l, u] = V(null), [h, c] = V(null), [p, f] = V([]), [d, b] = V(0), [v, k] = V(!1), [w, T] = V(!0), [
|
|
9532
|
+
const { t: r } = ge(), [i, a] = V([]), [o, s] = V(!1), [l, u] = V(null), [h, c] = V(null), [p, f] = V([]), [d, b] = V(0), [v, k] = V(!1), [w, T] = V(!0), [z, P] = V(0), [x, N] = V(!0), [O, B] = V(!1), [y, E] = V(0), [L, _] = V(!1), [A, R] = V(!1), W = de(
|
|
9499
9533
|
async (G) => {
|
|
9500
9534
|
if (!G.trim() || o)
|
|
9501
9535
|
return;
|
|
9502
9536
|
if (!t) {
|
|
9503
|
-
|
|
9537
|
+
Le.error(r("toast.antiBotValidationPending"));
|
|
9504
9538
|
return;
|
|
9505
9539
|
}
|
|
9506
9540
|
const K = {
|
|
@@ -9584,7 +9618,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9584
9618
|
default:
|
|
9585
9619
|
ie = r("errors.generic");
|
|
9586
9620
|
}
|
|
9587
|
-
u(ie),
|
|
9621
|
+
u(ie), Le.error(ie, {
|
|
9588
9622
|
duration: 4e3,
|
|
9589
9623
|
position: "top-center"
|
|
9590
9624
|
});
|
|
@@ -9624,10 +9658,10 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9624
9658
|
timestamp: re.creation_date
|
|
9625
9659
|
}
|
|
9626
9660
|
]);
|
|
9627
|
-
K ? (a(Q),
|
|
9661
|
+
K ? (a(Q), E(se.data.count)) : (a((re) => [...Q, ...re]), E((re) => re + se.data.count)), _(se.data.has_more), c(G);
|
|
9628
9662
|
}
|
|
9629
9663
|
} catch (J) {
|
|
9630
|
-
console.error("Error loading conversation history:", J),
|
|
9664
|
+
console.error("Error loading conversation history:", J), Le.error(r("toast.failedLoadHistory"));
|
|
9631
9665
|
} finally {
|
|
9632
9666
|
k(!1);
|
|
9633
9667
|
}
|
|
@@ -9635,12 +9669,12 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9635
9669
|
}, [e, r, y]), m = de(async (G = !0) => {
|
|
9636
9670
|
if (e)
|
|
9637
9671
|
try {
|
|
9638
|
-
const K = G ? 0 :
|
|
9639
|
-
J.success && J.data.conversations && (G ? (f(J.data.conversations),
|
|
9672
|
+
const K = G ? 0 : z, J = await e.listConversations(20, K);
|
|
9673
|
+
J.success && J.data.conversations && (G ? (f(J.data.conversations), P(J.data.count)) : (f((se) => [...se, ...J.data.conversations]), P((se) => se + J.data.count)), N(J.data.has_more), b(J.data.total || 0));
|
|
9640
9674
|
} catch (K) {
|
|
9641
9675
|
console.error("Error loading conversations:", K);
|
|
9642
9676
|
}
|
|
9643
|
-
}, [e,
|
|
9677
|
+
}, [e, z]), fe = de(async () => {
|
|
9644
9678
|
if (!(!e || O || !x)) {
|
|
9645
9679
|
B(!0);
|
|
9646
9680
|
try {
|
|
@@ -9650,7 +9684,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9650
9684
|
}
|
|
9651
9685
|
}
|
|
9652
9686
|
}, [e, O, x, m]), be = de(async () => {
|
|
9653
|
-
if (!(!e || !h || A || !
|
|
9687
|
+
if (!(!e || !h || A || !L)) {
|
|
9654
9688
|
R(!0);
|
|
9655
9689
|
try {
|
|
9656
9690
|
await ae(h, !1);
|
|
@@ -9658,23 +9692,23 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9658
9692
|
R(!1);
|
|
9659
9693
|
}
|
|
9660
9694
|
}
|
|
9661
|
-
}, [e, h, A,
|
|
9662
|
-
a([]), c(null), u(null), e && e.clearLastConversation(),
|
|
9695
|
+
}, [e, h, A, L, ae]), g = de(() => {
|
|
9696
|
+
a([]), c(null), u(null), e && e.clearLastConversation(), Le.success(r("toast.newConversationStarted"));
|
|
9663
9697
|
}, [r, e]), pe = de(async (G) => {
|
|
9664
9698
|
await ae(G);
|
|
9665
9699
|
}, [ae]), Se = de(async (G, K) => {
|
|
9666
9700
|
if (e)
|
|
9667
9701
|
try {
|
|
9668
|
-
await e.updateConversationTitle(G, K), await m(!0),
|
|
9702
|
+
await e.updateConversationTitle(G, K), await m(!0), Le.success(r("toast.conversationRenamed"));
|
|
9669
9703
|
} catch (J) {
|
|
9670
|
-
console.error("Error renaming conversation:", J),
|
|
9704
|
+
console.error("Error renaming conversation:", J), Le.error(r("toast.failedRenameConversation"));
|
|
9671
9705
|
}
|
|
9672
9706
|
}, [e, m, r]), ne = de(async (G) => {
|
|
9673
9707
|
if (e)
|
|
9674
9708
|
try {
|
|
9675
|
-
await e.deleteConversation(G), G === h && (a([]), c(null)), await m(!0),
|
|
9709
|
+
await e.deleteConversation(G), G === h && (a([]), c(null)), await m(!0), Le.success(r("toast.conversationDeleted"));
|
|
9676
9710
|
} catch (K) {
|
|
9677
|
-
console.error("Error deleting conversation:", K),
|
|
9711
|
+
console.error("Error deleting conversation:", K), Le.error(r("toast.failedDeleteConversation"));
|
|
9678
9712
|
}
|
|
9679
9713
|
}, [e, h, m, r]);
|
|
9680
9714
|
return te(() => {
|
|
@@ -9717,7 +9751,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9717
9751
|
hasMoreConversations: x,
|
|
9718
9752
|
isLoadingMoreConversations: O,
|
|
9719
9753
|
loadMoreConversations: fe,
|
|
9720
|
-
hasMoreMessages:
|
|
9754
|
+
hasMoreMessages: L,
|
|
9721
9755
|
isLoadingMoreMessages: A,
|
|
9722
9756
|
loadMoreMessages: be
|
|
9723
9757
|
};
|
|
@@ -9753,17 +9787,17 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9753
9787
|
showMetadata: s = !1,
|
|
9754
9788
|
onError: l
|
|
9755
9789
|
}) => {
|
|
9756
|
-
const { t: u } = ge(), [h, c] = V(null), [p, f] = V(!1), [d, b] = V(!1), [v, k] = V(!0), { theme: w, toggleTheme: T } = Jh(a),
|
|
9790
|
+
const { t: u } = ge(), [h, c] = V(null), [p, f] = V(!1), [d, b] = V(!1), [v, k] = V(!0), { theme: w, toggleTheme: T } = Jh(a), z = de(() => {
|
|
9757
9791
|
f(!1), c(null), e && e.resetTurnstileValidation();
|
|
9758
9792
|
}, [e]), {
|
|
9759
|
-
messages:
|
|
9793
|
+
messages: P,
|
|
9760
9794
|
isLoading: x,
|
|
9761
|
-
sendMessage:
|
|
9795
|
+
sendMessage: N,
|
|
9762
9796
|
currentConversationId: O,
|
|
9763
9797
|
conversations: B,
|
|
9764
9798
|
totalConversations: y,
|
|
9765
|
-
isLoadingHistory:
|
|
9766
|
-
startNewConversation:
|
|
9799
|
+
isLoadingHistory: E,
|
|
9800
|
+
startNewConversation: L,
|
|
9767
9801
|
switchConversation: _,
|
|
9768
9802
|
renameConversation: A,
|
|
9769
9803
|
deleteConversation: R,
|
|
@@ -9774,7 +9808,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9774
9808
|
hasMoreMessages: m,
|
|
9775
9809
|
isLoadingMoreMessages: fe,
|
|
9776
9810
|
loadMoreMessages: be
|
|
9777
|
-
} = Yh(e, h,
|
|
9811
|
+
} = Yh(e, h, z), g = de(() => {
|
|
9778
9812
|
b((G) => !G);
|
|
9779
9813
|
}, []), pe = de(
|
|
9780
9814
|
(G) => {
|
|
@@ -9782,8 +9816,8 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9782
9816
|
},
|
|
9783
9817
|
[_]
|
|
9784
9818
|
), Se = de(() => {
|
|
9785
|
-
|
|
9786
|
-
}, [
|
|
9819
|
+
L(), b(!1);
|
|
9820
|
+
}, [L]);
|
|
9787
9821
|
te(() => {
|
|
9788
9822
|
(async () => {
|
|
9789
9823
|
k(!0), e && e.hasValidCachedSession() && (f(!0), c("CACHED_SESSION")), k(!1);
|
|
@@ -9821,8 +9855,8 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9821
9855
|
/* @__PURE__ */ S(
|
|
9822
9856
|
Uh,
|
|
9823
9857
|
{
|
|
9824
|
-
messages:
|
|
9825
|
-
isLoading: x ||
|
|
9858
|
+
messages: P,
|
|
9859
|
+
isLoading: x || E || W,
|
|
9826
9860
|
showMetadata: s,
|
|
9827
9861
|
widgetConfig: n,
|
|
9828
9862
|
hasMoreMessages: m,
|
|
@@ -9833,7 +9867,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9833
9867
|
/* @__PURE__ */ S(
|
|
9834
9868
|
Wh,
|
|
9835
9869
|
{
|
|
9836
|
-
onSendMessage:
|
|
9870
|
+
onSendMessage: N,
|
|
9837
9871
|
isLoading: x || W,
|
|
9838
9872
|
disabled: W,
|
|
9839
9873
|
gpcService: e,
|
|
@@ -9850,7 +9884,7 @@ const vi = "https://www.tiagpctest.softiabot.com", Ih = "0x4AAAAAAB-BKyDZcYYqCbi
|
|
|
9850
9884
|
onNewConversation: Se,
|
|
9851
9885
|
onRenameConversation: A,
|
|
9852
9886
|
onDeleteConversation: R,
|
|
9853
|
-
isLoadingHistory:
|
|
9887
|
+
isLoadingHistory: E,
|
|
9854
9888
|
hasMoreConversations: ee,
|
|
9855
9889
|
isLoadingMoreConversations: ue,
|
|
9856
9890
|
onLoadMore: ae
|
|
@@ -9873,7 +9907,7 @@ class Zh {
|
|
|
9873
9907
|
constructor(t, n) {
|
|
9874
9908
|
this.licenseToken = n, this.baseURL = t || vi, this.client = Yi.create({
|
|
9875
9909
|
baseURL: this.baseURL,
|
|
9876
|
-
timeout:
|
|
9910
|
+
timeout: Nh.API_REQUEST,
|
|
9877
9911
|
headers: {
|
|
9878
9912
|
"Content-Type": "application/json"
|
|
9879
9913
|
}
|
|
@@ -10350,7 +10384,7 @@ const np = (e, t) => ((!yt || t && yt.licenseToken !== t) && (yt = new Si(e, t))
|
|
|
10350
10384
|
languages: df,
|
|
10351
10385
|
input: mf,
|
|
10352
10386
|
toast: gf
|
|
10353
|
-
}, kf = { title: "TIA GPC", poweredBy: "Powered by TIA GPC", questionsTo: "Questions to", validatingSession: "Validating session..." }, bf = { title: "Assistant", placeholder: "Type your question...", send: "Send", close: "Close", welcome: "Hello! Welcome to {{companyName}}. How can I help you today?", emptyState: "Start a conversation by typing your question", validation: "Verifying security...", retry: "Retry", loadingMore: "Loading older messages..." }, xf = { record: "Record audio", recording: "Recording...", stop: "Stop recording", processing: "Transcribing audio...", error: "Error transcribing audio", unsupported: "Your browser does not support audio recording", permissionDenied: "Microphone permission denied" }, wf = { light: "Light", dark: "Dark", toggle: "Toggle theme" }, vf = { unauthorized: "Authentication failed. Please check your license token and try again.", validation: "Bot verification failed. Please reload the page and try again.", network: "Unable to connect to the server. Please check your internet connection.", rateLimit: "You've made too many requests or the concurrent user limit has been reached. Please wait a moment before continuing.", session: "Your session has expired due to inactivity. Please reload the page to continue.", insufficientCredits: "Insufficient credits. Please reload credits from your admin panel to continue using TIA GPC.", generic: "An unexpected error has occurred. Please try again.", aiServiceUnavailable: "The assistant is temporarily unavailable. Please try again in a few moments.", serverError: "The server encountered a problem. Please try again later.", domainUnauthorized: "This domain is not authorized to use this widget. Please contact your administrator." }, Cf = { verifying: "Verifying you're human...", error: "Security verification could not be completed. Please reload the page and try again." }, Sf = { tokensUsed: "Tokens used", responseTime: "Response time", model: "Model" }, Tf = { title: "Conversations", new: "New", empty: "No conversations yet", emptyHint: "Start a conversation to see it here", untitled: "Untitled conversation", loadingMore: "Loading more...", toggle: "Toggle conversations", rename: "Rename", delete: "Delete", save: "Save", cancel: "Cancel", confirmDelete: 'Delete "{{title}}"?' }, Ef = { justNow: "Just now", minutesAgo: "{{count}} min ago", minutesAgo_one: "1 min ago", minutesAgo_other: "{{count}} min ago", hoursAgo: "{{count}}h ago", hoursAgo_one: "1h ago", hoursAgo_other: "{{count}}h ago", daysAgo: "{{count}}d ago", daysAgo_one: "1d ago", daysAgo_other: "{{count}}d ago" }, If = { languageSelector: { label: "Change language" }, spinner: { loading: "Loading" }, typingIndicator: { typing: "Typing" }, message: { userMessage: "User message", assistantMessage: "Assistant message" } }, Af = { english: "English", spanish: "Español", french: "Français" }, _f = { maxCharacters: "Maximum {{count}} characters" },
|
|
10387
|
+
}, kf = { title: "TIA GPC", poweredBy: "Powered by TIA GPC", questionsTo: "Questions to", validatingSession: "Validating session..." }, bf = { title: "Assistant", placeholder: "Type your question...", send: "Send", close: "Close", welcome: "Hello! Welcome to {{companyName}}. How can I help you today?", emptyState: "Start a conversation by typing your question", validation: "Verifying security...", retry: "Retry", loadingMore: "Loading older messages..." }, xf = { record: "Record audio", recording: "Recording...", stop: "Stop recording", processing: "Transcribing audio...", error: "Error transcribing audio", unsupported: "Your browser does not support audio recording", permissionDenied: "Microphone permission denied" }, wf = { light: "Light", dark: "Dark", toggle: "Toggle theme" }, vf = { unauthorized: "Authentication failed. Please check your license token and try again.", validation: "Bot verification failed. Please reload the page and try again.", network: "Unable to connect to the server. Please check your internet connection.", rateLimit: "You've made too many requests or the concurrent user limit has been reached. Please wait a moment before continuing.", session: "Your session has expired due to inactivity. Please reload the page to continue.", insufficientCredits: "Insufficient credits. Please reload credits from your admin panel to continue using TIA GPC.", generic: "An unexpected error has occurred. Please try again.", aiServiceUnavailable: "The assistant is temporarily unavailable. Please try again in a few moments.", serverError: "The server encountered a problem. Please try again later.", domainUnauthorized: "This domain is not authorized to use this widget. Please contact your administrator." }, Cf = { verifying: "Verifying you're human...", error: "Security verification could not be completed. Please reload the page and try again." }, Sf = { tokensUsed: "Tokens used", responseTime: "Response time", model: "Model" }, Tf = { title: "Conversations", new: "New", empty: "No conversations yet", emptyHint: "Start a conversation to see it here", untitled: "Untitled conversation", loadingMore: "Loading more...", toggle: "Toggle conversations", rename: "Rename", delete: "Delete", save: "Save", cancel: "Cancel", confirmDelete: 'Delete "{{title}}"?' }, Ef = { justNow: "Just now", minutesAgo: "{{count}} min ago", minutesAgo_one: "1 min ago", minutesAgo_other: "{{count}} min ago", hoursAgo: "{{count}}h ago", hoursAgo_one: "1h ago", hoursAgo_other: "{{count}}h ago", daysAgo: "{{count}}d ago", daysAgo_one: "1d ago", daysAgo_other: "{{count}}d ago" }, If = { languageSelector: { label: "Change language" }, spinner: { loading: "Loading" }, typingIndicator: { typing: "Typing" }, message: { userMessage: "User message", assistantMessage: "Assistant message" } }, Af = { english: "English", spanish: "Español", french: "Français" }, _f = { maxCharacters: "Maximum {{count}} characters" }, Pf = { antiBotValidationPending: "Anti-bot validation pending", newConversationStarted: "New conversation started", failedLoadHistory: "Failed to load conversation history", sessionExpired: "Session expired, please verify again", gpcServiceNotAvailable: "GPC Service not available", conversationRenamed: "Conversation renamed successfully", failedRenameConversation: "Failed to rename conversation", conversationDeleted: "Conversation deleted successfully", failedDeleteConversation: "Failed to delete conversation" }, Df = {
|
|
10354
10388
|
widget: kf,
|
|
10355
10389
|
chat: bf,
|
|
10356
10390
|
voice: xf,
|
|
@@ -10363,10 +10397,10 @@ const np = (e, t) => ((!yt || t && yt.licenseToken !== t) && (yt = new Si(e, t))
|
|
|
10363
10397
|
ui: If,
|
|
10364
10398
|
languages: Af,
|
|
10365
10399
|
input: _f,
|
|
10366
|
-
toast:
|
|
10367
|
-
},
|
|
10368
|
-
widget:
|
|
10369
|
-
chat:
|
|
10400
|
+
toast: Pf
|
|
10401
|
+
}, Nf = { title: "TIA GPC", poweredBy: "Propulsé par TIA GPC", questionsTo: "Questions à", validatingSession: "Validation de la session..." }, Lf = { title: "Assistant", placeholder: "Tapez votre question...", send: "Envoyer", close: "Fermer", welcome: "Bonjour ! Bienvenue à {{companyName}}. Comment puis-je vous aider aujourd'hui ?", emptyState: "Commencez une conversation en tapant votre question", validation: "Vérification de sécurité...", retry: "Réessayer", loadingMore: "Chargement des messages précédents..." }, zf = { record: "Enregistrer audio", recording: "Enregistrement...", stop: "Arrêter l'enregistrement", processing: "Transcription audio...", error: "Erreur de transcription audio", unsupported: "Votre navigateur ne prend pas en charge l'enregistrement audio", permissionDenied: "Permission du microphone refusée" }, Rf = { light: "Clair", dark: "Sombre", toggle: "Changer de thème" }, Mf = { unauthorized: "Échec de l'authentification. Veuillez vérifier votre jeton de licence et réessayer.", validation: "La vérification anti-bot a échoué. Veuillez recharger la page et réessayer.", network: "Impossible de se connecter au serveur. Veuillez vérifier votre connexion internet.", rateLimit: "Vous avez fait trop de demandes ou la limite d'utilisateurs concurrents a été atteinte. Veuillez patienter un moment avant de continuer.", session: "Votre session a expiré en raison d'inactivité. Veuillez recharger la page pour continuer.", insufficientCredits: "Crédits insuffisants. Veuillez recharger des crédits depuis votre panneau d'administration pour continuer à utiliser TIA GPC.", generic: "Une erreur inattendue s'est produite. Veuillez réessayer.", aiServiceUnavailable: "L'assistant est temporairement indisponible. Veuillez réessayer dans quelques instants.", serverError: "Le serveur a rencontré un problème. Veuillez réessayer plus tard.", domainUnauthorized: "Ce domaine n'est pas autorisé à utiliser ce widget. Veuillez contacter votre administrateur." }, Of = { verifying: "Vérification que vous êtes humain...", error: "La vérification de sécurité n'a pas pu être complétée. Veuillez recharger la page et réessayer." }, Ff = { tokensUsed: "Tokens utilisés", responseTime: "Temps de réponse", model: "Modèle" }, Bf = { title: "Conversations", new: "Nouvelle", empty: "Aucune conversation pour le moment", emptyHint: "Démarrez une conversation pour la voir ici", untitled: "Conversation sans titre", loadingMore: "Chargement...", toggle: "Basculer les conversations", rename: "Renommer", delete: "Supprimer", save: "Enregistrer", cancel: "Annuler", confirmDelete: 'Supprimer "{{title}}" ?' }, jf = { justNow: "À l'instant", minutesAgo: "il y a {{count}} min", minutesAgo_one: "il y a 1 min", minutesAgo_other: "il y a {{count}} min", hoursAgo: "il y a {{count}}h", hoursAgo_one: "il y a 1h", hoursAgo_other: "il y a {{count}}h", daysAgo: "il y a {{count}}j", daysAgo_one: "il y a 1j", daysAgo_other: "il y a {{count}}j" }, Uf = { languageSelector: { label: "Changer de langue" }, spinner: { loading: "Chargement" }, typingIndicator: { typing: "Écriture en cours" }, message: { userMessage: "Message de l'utilisateur", assistantMessage: "Message de l'assistant" } }, Hf = { english: "English", spanish: "Español", french: "Français" }, $f = { maxCharacters: "Maximum {{count}} caractères" }, Vf = { antiBotValidationPending: "Validation anti-bot en attente", newConversationStarted: "Nouvelle conversation démarrée", failedLoadHistory: "Échec du chargement de l'historique de la conversation", sessionExpired: "Session expirée, veuillez vérifier à nouveau", gpcServiceNotAvailable: "Service GPC non disponible", conversationRenamed: "Conversation renommée avec succès", failedRenameConversation: "Échec du renommage de la conversation", conversationDeleted: "Conversation supprimée avec succès", failedDeleteConversation: "Échec de la suppression de la conversation" }, qf = {
|
|
10402
|
+
widget: Nf,
|
|
10403
|
+
chat: Lf,
|
|
10370
10404
|
voice: zf,
|
|
10371
10405
|
theme: Rf,
|
|
10372
10406
|
errors: Mf,
|
|
@@ -10379,9 +10413,9 @@ const np = (e, t) => ((!yt || t && yt.licenseToken !== t) && (yt = new Si(e, t))
|
|
|
10379
10413
|
input: $f,
|
|
10380
10414
|
toast: Vf
|
|
10381
10415
|
};
|
|
10382
|
-
kt.use(Ji).use(
|
|
10416
|
+
kt.use(Ji).use(Ni).init({
|
|
10383
10417
|
resources: {
|
|
10384
|
-
en: { translation:
|
|
10418
|
+
en: { translation: Df },
|
|
10385
10419
|
es: { translation: yf },
|
|
10386
10420
|
fr: { translation: qf }
|
|
10387
10421
|
},
|
|
@@ -10413,12 +10447,12 @@ const Wf = ({
|
|
|
10413
10447
|
mobileFullscreen: d = Re.mobileFullscreen,
|
|
10414
10448
|
...b
|
|
10415
10449
|
}) => {
|
|
10416
|
-
const [v, k] = V(!1), [w, T] = V(null), [
|
|
10450
|
+
const [v, k] = V(!1), [w, T] = V(null), [z, P] = V(!0);
|
|
10417
10451
|
w?.widget_customization?.behavior?.auto_open;
|
|
10418
|
-
const [x,
|
|
10452
|
+
const [x, N] = V(!1), O = Di(() => new Si(l, e), [l, e]);
|
|
10419
10453
|
if (te(() => {
|
|
10420
10454
|
const _ = () => {
|
|
10421
|
-
k(
|
|
10455
|
+
k(Lh());
|
|
10422
10456
|
};
|
|
10423
10457
|
return _(), window.addEventListener("resize", _), () => window.removeEventListener("resize", _);
|
|
10424
10458
|
}, []), te(() => {
|
|
@@ -10427,16 +10461,16 @@ const Wf = ({
|
|
|
10427
10461
|
}, [i, w]), te(() => {
|
|
10428
10462
|
(async () => {
|
|
10429
10463
|
if (!e) {
|
|
10430
|
-
|
|
10464
|
+
P(!1);
|
|
10431
10465
|
return;
|
|
10432
10466
|
}
|
|
10433
10467
|
try {
|
|
10434
10468
|
const A = await O.getInitConfig();
|
|
10435
|
-
A.success && (T(A.data), (A.data?.widget_customization?.behavior?.auto_open ?? p) &&
|
|
10469
|
+
A.success && (T(A.data), (A.data?.widget_customization?.behavior?.auto_open ?? p) && N(!0), u && u(A.data));
|
|
10436
10470
|
} catch (A) {
|
|
10437
10471
|
console.error("[TIA GPC Widget] Error loading config:", A), h && h(A);
|
|
10438
10472
|
} finally {
|
|
10439
|
-
|
|
10473
|
+
P(!1);
|
|
10440
10474
|
}
|
|
10441
10475
|
})();
|
|
10442
10476
|
}, [e, O, u, h, p]), te(() => {
|
|
@@ -10460,24 +10494,24 @@ const Wf = ({
|
|
|
10460
10494
|
}, [O]), !e)
|
|
10461
10495
|
return console.error('[TIA GPC Widget] Error: "token" prop is required'), null;
|
|
10462
10496
|
const B = () => {
|
|
10463
|
-
|
|
10497
|
+
N(!1), c?.();
|
|
10464
10498
|
}, y = () => {
|
|
10465
10499
|
const _ = w?.widget_customization?.position || r, A = w?.widget_customization?.behavior?.mobile_fullscreen ?? d;
|
|
10466
10500
|
return v && A ? "gpc-position-bottom-right" : `gpc-position-${_}`;
|
|
10467
|
-
},
|
|
10501
|
+
}, E = () => {
|
|
10468
10502
|
const _ = {}, A = w?.widget_customization?.colors?.primary || a, R = w?.widget_customization?.colors?.header_background, W = w?.widget_customization?.colors?.header_text;
|
|
10469
10503
|
A && (_["--gpc-color-primary"] = A), R && (_["--gpc-header-bg"] = R), W && (_["--gpc-header-text"] = W);
|
|
10470
10504
|
const ee = w?.widget_customization?.dimensions?.width || o, ue = w?.widget_customization?.dimensions?.height || s, ae = w?.widget_customization?.behavior?.mobile_fullscreen ?? d;
|
|
10471
10505
|
return (!v || !ae) && (ee && (_["--gpc-widget-width"] = ee), ue && (_["--gpc-widget-height"] = ue)), _;
|
|
10472
|
-
},
|
|
10473
|
-
return /* @__PURE__ */ S(
|
|
10506
|
+
}, L = w?.widget_customization?.theme || n;
|
|
10507
|
+
return /* @__PURE__ */ S(Li, { i18n: kt, children: /* @__PURE__ */ F(
|
|
10474
10508
|
"div",
|
|
10475
10509
|
{
|
|
10476
|
-
className: `gpc-widget gpc-widget-container ${y()} ${
|
|
10477
|
-
style:
|
|
10510
|
+
className: `gpc-widget gpc-widget-container ${y()} ${L === "dark" ? "gpc-dark" : ""}`,
|
|
10511
|
+
style: E(),
|
|
10478
10512
|
children: [
|
|
10479
|
-
!x && /* @__PURE__ */ S(Qi, { onClick: () =>
|
|
10480
|
-
x && !
|
|
10513
|
+
!x && /* @__PURE__ */ S(Qi, { onClick: () => N(!0), widgetConfig: w }),
|
|
10514
|
+
x && !z && /* @__PURE__ */ S(
|
|
10481
10515
|
Qh,
|
|
10482
10516
|
{
|
|
10483
10517
|
gpcService: O,
|
|
@@ -10485,7 +10519,7 @@ const Wf = ({
|
|
|
10485
10519
|
widgetConfig: w,
|
|
10486
10520
|
turnstileSiteKey: t,
|
|
10487
10521
|
onClose: B,
|
|
10488
|
-
themeMode:
|
|
10522
|
+
themeMode: L,
|
|
10489
10523
|
showBranding: f,
|
|
10490
10524
|
showMetadata: b.showMetadata || !1,
|
|
10491
10525
|
onError: h
|
|
@@ -10507,7 +10541,7 @@ Wf.defaultProps = {
|
|
|
10507
10541
|
};
|
|
10508
10542
|
export {
|
|
10509
10543
|
Si as GPCService,
|
|
10510
|
-
|
|
10544
|
+
Ph as LANGUAGES,
|
|
10511
10545
|
_h as THEMES,
|
|
10512
10546
|
Wf as TiaGPCWidget,
|
|
10513
10547
|
Ah as WIDGET_POSITIONS,
|