@chatsystem/client 1.1.40 → 1.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +30 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +438 -449
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Ke from "react";
|
|
2
|
-
import Ye, { useState as Oe, useEffect as $e, forwardRef as Jo, useRef as
|
|
2
|
+
import Ye, { useState as Oe, useEffect as $e, forwardRef as Jo, useRef as Ve, useMemo as _n, useImperativeHandle as Ll, useContext as yt, useCallback as Wt, createContext as Dl, useLayoutEffect as Zo } from "react";
|
|
3
3
|
import mr, { createPortal as kl } from "react-dom";
|
|
4
4
|
import Pl from "lottie-react";
|
|
5
5
|
import { DotLottieReact as Ml } from "@lottiefiles/dotlottie-react";
|
|
@@ -37,11 +37,11 @@ var gr = {};
|
|
|
37
37
|
var ns;
|
|
38
38
|
function jl() {
|
|
39
39
|
return ns || (ns = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
40
|
-
var e = Ye, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"),
|
|
40
|
+
var e = Ye, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), S = Symbol.iterator, _ = "@@iterator";
|
|
41
41
|
function O(C) {
|
|
42
42
|
if (C === null || typeof C != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var V =
|
|
44
|
+
var V = S && C[S] || C[_];
|
|
45
45
|
return typeof V == "function" ? V : null;
|
|
46
46
|
}
|
|
47
47
|
var v = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -126,14 +126,14 @@ function jl() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var F = Object.assign, J = 0, fe, le, ye,
|
|
129
|
+
var F = Object.assign, J = 0, fe, le, ye, Fe, g, Y, W;
|
|
130
130
|
function x() {
|
|
131
131
|
}
|
|
132
132
|
x.__reactDisabledLog = !0;
|
|
133
133
|
function Z() {
|
|
134
134
|
{
|
|
135
135
|
if (J === 0) {
|
|
136
|
-
fe = console.log, le = console.info, ye = console.warn,
|
|
136
|
+
fe = console.log, le = console.info, ye = console.warn, Fe = console.error, g = console.group, Y = console.groupCollapsed, W = console.groupEnd;
|
|
137
137
|
var C = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
@@ -172,7 +172,7 @@ function jl() {
|
|
|
172
172
|
value: ye
|
|
173
173
|
}),
|
|
174
174
|
error: F({}, C, {
|
|
175
|
-
value:
|
|
175
|
+
value: Fe
|
|
176
176
|
}),
|
|
177
177
|
group: F({}, C, {
|
|
178
178
|
value: g
|
|
@@ -278,7 +278,7 @@ function jl() {
|
|
|
278
278
|
var gn = C ? C.displayName || C.name : "", es = gn ? Q(gn) : "";
|
|
279
279
|
return typeof C == "function" && ue.set(C, es), es;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function He(C, V, X) {
|
|
282
282
|
return $(C, !1);
|
|
283
283
|
}
|
|
284
284
|
function We(C) {
|
|
@@ -301,7 +301,7 @@ function jl() {
|
|
|
301
301
|
if (typeof C == "object")
|
|
302
302
|
switch (C.$$typeof) {
|
|
303
303
|
case c:
|
|
304
|
-
return
|
|
304
|
+
return He(C.render);
|
|
305
305
|
case f:
|
|
306
306
|
return Je(C.type, V, X);
|
|
307
307
|
case h: {
|
|
@@ -351,7 +351,7 @@ function jl() {
|
|
|
351
351
|
return X;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function Ue(C) {
|
|
355
355
|
try {
|
|
356
356
|
return I(C), !1;
|
|
357
357
|
} catch {
|
|
@@ -362,7 +362,7 @@ function jl() {
|
|
|
362
362
|
return "" + C;
|
|
363
363
|
}
|
|
364
364
|
function w(C) {
|
|
365
|
-
if (
|
|
365
|
+
if (Ue(C))
|
|
366
366
|
return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ie(C)), I(C);
|
|
367
367
|
}
|
|
368
368
|
var G = v.ReactCurrentOwner, me = {
|
|
@@ -755,8 +755,8 @@ function ru(e) {
|
|
|
755
755
|
const { imgEl: s, width: u, height: c } = await new Promise((l, d) => {
|
|
756
756
|
const f = URL.createObjectURL(a), h = new Image();
|
|
757
757
|
h.crossOrigin = "anonymous", h.onload = () => {
|
|
758
|
-
const m = h.naturalWidth,
|
|
759
|
-
l({ imgEl: h, width: m, height:
|
|
758
|
+
const m = h.naturalWidth, S = h.naturalHeight;
|
|
759
|
+
l({ imgEl: h, width: m, height: S });
|
|
760
760
|
}, h.onerror = () => {
|
|
761
761
|
URL.revokeObjectURL(f), d(new Error("Spritesheet image decode failed"));
|
|
762
762
|
}, h.src = f, h.decode?.().catch(() => {
|
|
@@ -841,8 +841,8 @@ function Zl({
|
|
|
841
841
|
return d({ kind: "loading" }), nu(e).then(async (m) => {
|
|
842
842
|
if (!h)
|
|
843
843
|
if (m.kind === "zip") {
|
|
844
|
-
const
|
|
845
|
-
f = URL.createObjectURL(
|
|
844
|
+
const S = Jl(m) ? m.blob : await (await fetch(m.blobUrl)).blob();
|
|
845
|
+
f = URL.createObjectURL(S), d({ kind: "lottieZip", blobUrl: f }), u?.(f);
|
|
846
846
|
} else
|
|
847
847
|
d({ kind: "json", data: m.data }), u?.(m.data);
|
|
848
848
|
}).catch(
|
|
@@ -956,7 +956,7 @@ async function ed(e, t = {}) {
|
|
|
956
956
|
}
|
|
957
957
|
m[q] = Te;
|
|
958
958
|
}
|
|
959
|
-
const
|
|
959
|
+
const S = is(
|
|
960
960
|
h,
|
|
961
961
|
n,
|
|
962
962
|
Math.min(r, l / 2)
|
|
@@ -965,19 +965,19 @@ async function ed(e, t = {}) {
|
|
|
965
965
|
n,
|
|
966
966
|
Math.min(r, d / 2)
|
|
967
967
|
);
|
|
968
|
-
if (!
|
|
968
|
+
if (!S || !_)
|
|
969
969
|
return i && console.warn("detectGrid: could not find periods"), null;
|
|
970
|
-
const O = Math.max(1, Math.round(l /
|
|
970
|
+
const O = Math.max(1, Math.round(l / S)), v = Math.max(1, Math.round(d / _)), L = ss(
|
|
971
971
|
h,
|
|
972
|
-
|
|
972
|
+
S,
|
|
973
973
|
O,
|
|
974
974
|
a
|
|
975
|
-
), P = ss(m, _, v, a), j = Math.max(1,
|
|
975
|
+
), P = ss(m, _, v, a), j = Math.max(1, S - L), R = Math.max(1, _ - P);
|
|
976
976
|
if (j * O > l + 2 || R * v > d + 2)
|
|
977
977
|
return i && console.warn("detectGrid: sanity check failed"), null;
|
|
978
978
|
const D = Ya(h, 60), re = Ya(m, 60), be = Math.max(0, os(h, D)), oe = Math.max(0, os(m, re));
|
|
979
979
|
return i && console.log({
|
|
980
|
-
periodX:
|
|
980
|
+
periodX: S,
|
|
981
981
|
periodY: _,
|
|
982
982
|
columns: O,
|
|
983
983
|
rows: v,
|
|
@@ -1002,17 +1002,17 @@ function is(e, t, n) {
|
|
|
1002
1002
|
const r = iu(e);
|
|
1003
1003
|
let a = 0;
|
|
1004
1004
|
for (let m = 0; m < e.length; m++) {
|
|
1005
|
-
const
|
|
1006
|
-
a +=
|
|
1005
|
+
const S = e[m] - r;
|
|
1006
|
+
a += S * S;
|
|
1007
1007
|
}
|
|
1008
1008
|
if (a === 0) return null;
|
|
1009
1009
|
const i = new Float32Array(n + 1);
|
|
1010
1010
|
let s = 0, u = -1 / 0;
|
|
1011
1011
|
for (let m = t; m <= n; m++) {
|
|
1012
|
-
let
|
|
1012
|
+
let S = 0;
|
|
1013
1013
|
for (let O = 0; O + m < e.length; O++)
|
|
1014
|
-
|
|
1015
|
-
const _ =
|
|
1014
|
+
S += (e[O] - r) * (e[O + m] - r);
|
|
1015
|
+
const _ = S / a;
|
|
1016
1016
|
i[m] = _, _ > u && (u = _, s = m);
|
|
1017
1017
|
}
|
|
1018
1018
|
if (s <= t || s >= n) return s || null;
|
|
@@ -1083,7 +1083,7 @@ const nd = Jo(function({
|
|
|
1083
1083
|
autoplay: f = !0,
|
|
1084
1084
|
loop: h = !0,
|
|
1085
1085
|
startFrame: m = 0,
|
|
1086
|
-
direction:
|
|
1086
|
+
direction: S = "forward",
|
|
1087
1087
|
scale: _ = 1,
|
|
1088
1088
|
backgroundColor: O,
|
|
1089
1089
|
className: v,
|
|
@@ -1095,14 +1095,14 @@ const nd = Jo(function({
|
|
|
1095
1095
|
onEnd: re,
|
|
1096
1096
|
onFrame: be
|
|
1097
1097
|
}, oe) {
|
|
1098
|
-
const q =
|
|
1098
|
+
const q = Ve(null), Te = Ve(null), [ee, B] = Oe(null), [F, J] = Oe(null), [fe, le] = Oe(null), [ye, Fe] = Oe(!1), [g, Y] = Oe(!!f), [W, x] = Oe(m), Z = Ve(1), [ae, se] = Oe(null), ie = Math.max(
|
|
1099
1099
|
1,
|
|
1100
1100
|
Math.floor(typeof window < "u" && window.devicePixelRatio || 1)
|
|
1101
1101
|
);
|
|
1102
1102
|
$e(() => {
|
|
1103
1103
|
let he = !1;
|
|
1104
|
-
return
|
|
1105
|
-
he || (B(Ee), J(Ne), le({ w: Ee.naturalWidth, h: Ee.naturalHeight }),
|
|
1104
|
+
return Fe(!1), ru(t).then(({ imgEl: Ee, bitmap: Ne }) => {
|
|
1105
|
+
he || (B(Ee), J(Ne), le({ w: Ee.naturalWidth, h: Ee.naturalHeight }), Fe(!0), D?.());
|
|
1106
1106
|
}).catch(() => {
|
|
1107
1107
|
}), () => {
|
|
1108
1108
|
he = !0;
|
|
@@ -1134,11 +1134,11 @@ const nd = Jo(function({
|
|
|
1134
1134
|
he = !0;
|
|
1135
1135
|
};
|
|
1136
1136
|
}, [ee, l, n, r, a, i]);
|
|
1137
|
-
const Q = ae?.frameWidth ?? n, ce = ae?.frameHeight ?? r, ue = ae?.columns ?? a, ke = ae?.rows ?? i, $ = ae?.gutterX ?? s,
|
|
1137
|
+
const Q = ae?.frameWidth ?? n, ce = ae?.frameHeight ?? r, ue = ae?.columns ?? a, ke = ae?.rows ?? i, $ = ae?.gutterX ?? s, He = ae?.gutterY ?? u, We = ae?.originX ?? j ?? 0, Je = ae?.originY ?? R ?? 0, mt = _n(() => {
|
|
1138
1138
|
if (l && l.length > 0) return { cols: 0, rows: 0 };
|
|
1139
1139
|
if (!fe || !Q || !ce)
|
|
1140
1140
|
return { cols: 0, rows: 0 };
|
|
1141
|
-
const he = ue ?? Math.floor((fe.w + $) / (Q + $)), Ee = ke ?? Math.floor((fe.h +
|
|
1141
|
+
const he = ue ?? Math.floor((fe.w + $) / (Q + $)), Ee = ke ?? Math.floor((fe.h + He) / (ce + He));
|
|
1142
1142
|
return { cols: Math.max(0, he), rows: Math.max(0, Ee) };
|
|
1143
1143
|
}, [
|
|
1144
1144
|
l,
|
|
@@ -1148,21 +1148,21 @@ const nd = Jo(function({
|
|
|
1148
1148
|
ue,
|
|
1149
1149
|
ke,
|
|
1150
1150
|
$,
|
|
1151
|
-
|
|
1151
|
+
He
|
|
1152
1152
|
]), Ze = _n(() => {
|
|
1153
1153
|
if (l?.length) return l;
|
|
1154
1154
|
if (!Q || !ce) return [];
|
|
1155
1155
|
const { cols: he, rows: Ee } = mt;
|
|
1156
1156
|
if (!he || !Ee) return [];
|
|
1157
1157
|
const Ne = Math.min(c ?? he * Ee, he * Ee), Ie = [];
|
|
1158
|
-
for (let
|
|
1159
|
-
const I =
|
|
1158
|
+
for (let Ue = 0; Ue < Ne; Ue++) {
|
|
1159
|
+
const I = Ue % he, w = Math.floor(Ue / he), G = We + I * (Q + $), me = Je + w * (ce + He);
|
|
1160
1160
|
Ie.push({ x: G, y: me, w: Q, h: ce });
|
|
1161
1161
|
}
|
|
1162
1162
|
if (ee && Ie.length) {
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1165
|
-
const I =
|
|
1163
|
+
const Ue = document.createElement("canvas");
|
|
1164
|
+
Ue.width = ee.naturalWidth, Ue.height = ee.naturalHeight;
|
|
1165
|
+
const I = Ue.getContext("2d");
|
|
1166
1166
|
if (I) {
|
|
1167
1167
|
I.drawImage(ee, 0, 0);
|
|
1168
1168
|
let w = Ie.length;
|
|
@@ -1185,7 +1185,7 @@ const nd = Jo(function({
|
|
|
1185
1185
|
Q,
|
|
1186
1186
|
ce,
|
|
1187
1187
|
$,
|
|
1188
|
-
|
|
1188
|
+
He,
|
|
1189
1189
|
ee,
|
|
1190
1190
|
We,
|
|
1191
1191
|
Je
|
|
@@ -1204,17 +1204,17 @@ const nd = Jo(function({
|
|
|
1204
1204
|
const Ie = Ne.getContext("2d");
|
|
1205
1205
|
if (!Ie) return;
|
|
1206
1206
|
Ie.save(), Ie.setTransform(1, 0, 0, 1, 0, 0), Ie.clearRect(0, 0, Ne.width, Ne.height), O && (Ie.fillStyle = O, Ie.fillRect(0, 0, Ne.width, Ne.height));
|
|
1207
|
-
const
|
|
1207
|
+
const Ue = Ze[he];
|
|
1208
1208
|
Ie.scale(ie, ie), Ie.drawImage(
|
|
1209
1209
|
Ee,
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1210
|
+
Ue.x,
|
|
1211
|
+
Ue.y,
|
|
1212
|
+
Ue.w,
|
|
1213
|
+
Ue.h,
|
|
1214
1214
|
0,
|
|
1215
1215
|
0,
|
|
1216
|
-
Math.round(
|
|
1217
|
-
Math.round(
|
|
1216
|
+
Math.round(Ue.w * _),
|
|
1217
|
+
Math.round(Ue.h * _)
|
|
1218
1218
|
), Ie.restore();
|
|
1219
1219
|
};
|
|
1220
1220
|
return $e(() => {
|
|
@@ -1225,21 +1225,21 @@ const nd = Jo(function({
|
|
|
1225
1225
|
pt(W);
|
|
1226
1226
|
return;
|
|
1227
1227
|
}
|
|
1228
|
-
const
|
|
1229
|
-
if (
|
|
1228
|
+
const Ue = Ie - he;
|
|
1229
|
+
if (Ue < Ee) {
|
|
1230
1230
|
pt(W);
|
|
1231
1231
|
return;
|
|
1232
1232
|
}
|
|
1233
|
-
he = Ie -
|
|
1233
|
+
he = Ie - Ue % Ee, x((I) => {
|
|
1234
1234
|
const w = Ze.length - 1;
|
|
1235
1235
|
let G = I;
|
|
1236
|
-
return
|
|
1236
|
+
return S === "forward" ? G = I + 1 : S === "backward" ? G = I - 1 : ((I >= w && Z.current === 1 || I <= 0 && Z.current === -1) && (Z.current *= -1), G = I + Z.current), (G > w || G < 0) && (h ? G = S === "backward" ? w : 0 : (G = Math.max(0, Math.min(G, w)), Y(!1), re?.())), G;
|
|
1237
1237
|
});
|
|
1238
1238
|
};
|
|
1239
1239
|
return Te.current = requestAnimationFrame(Ne), () => {
|
|
1240
1240
|
Te.current && cancelAnimationFrame(Te.current);
|
|
1241
1241
|
};
|
|
1242
|
-
}, [ye, d, g, h,
|
|
1242
|
+
}, [ye, d, g, h, S, Ze.length, W]), $e(() => {
|
|
1243
1243
|
pt(W), be?.(W);
|
|
1244
1244
|
}, [W, ye, _, ie]), $e(() => {
|
|
1245
1245
|
if (!P) return;
|
|
@@ -1480,7 +1480,7 @@ var us;
|
|
|
1480
1480
|
function id() {
|
|
1481
1481
|
if (us) return Le;
|
|
1482
1482
|
us = 1;
|
|
1483
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115,
|
|
1483
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, S = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, O = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, L = e ? Symbol.for("react.scope") : 60119;
|
|
1484
1484
|
function P(R) {
|
|
1485
1485
|
if (typeof R == "object" && R !== null) {
|
|
1486
1486
|
var D = R.$$typeof;
|
|
@@ -1498,7 +1498,7 @@ function id() {
|
|
|
1498
1498
|
switch (R = R && R.$$typeof, R) {
|
|
1499
1499
|
case u:
|
|
1500
1500
|
case d:
|
|
1501
|
-
case
|
|
1501
|
+
case S:
|
|
1502
1502
|
case m:
|
|
1503
1503
|
case s:
|
|
1504
1504
|
return R;
|
|
@@ -1514,7 +1514,7 @@ function id() {
|
|
|
1514
1514
|
function j(R) {
|
|
1515
1515
|
return P(R) === l;
|
|
1516
1516
|
}
|
|
1517
|
-
return Le.AsyncMode = c, Le.ConcurrentMode = l, Le.ContextConsumer = u, Le.ContextProvider = s, Le.Element = t, Le.ForwardRef = d, Le.Fragment = r, Le.Lazy =
|
|
1517
|
+
return Le.AsyncMode = c, Le.ConcurrentMode = l, Le.ContextConsumer = u, Le.ContextProvider = s, Le.Element = t, Le.ForwardRef = d, Le.Fragment = r, Le.Lazy = S, Le.Memo = m, Le.Portal = n, Le.Profiler = i, Le.StrictMode = a, Le.Suspense = f, Le.isAsyncMode = function(R) {
|
|
1518
1518
|
return j(R) || P(R) === c;
|
|
1519
1519
|
}, Le.isConcurrentMode = j, Le.isContextConsumer = function(R) {
|
|
1520
1520
|
return P(R) === u;
|
|
@@ -1527,7 +1527,7 @@ function id() {
|
|
|
1527
1527
|
}, Le.isFragment = function(R) {
|
|
1528
1528
|
return P(R) === r;
|
|
1529
1529
|
}, Le.isLazy = function(R) {
|
|
1530
|
-
return P(R) ===
|
|
1530
|
+
return P(R) === S;
|
|
1531
1531
|
}, Le.isMemo = function(R) {
|
|
1532
1532
|
return P(R) === m;
|
|
1533
1533
|
}, Le.isPortal = function(R) {
|
|
@@ -1539,7 +1539,7 @@ function id() {
|
|
|
1539
1539
|
}, Le.isSuspense = function(R) {
|
|
1540
1540
|
return P(R) === f;
|
|
1541
1541
|
}, Le.isValidElementType = function(R) {
|
|
1542
|
-
return typeof R == "string" || typeof R == "function" || R === r || R === l || R === i || R === a || R === f || R === h || typeof R == "object" && R !== null && (R.$$typeof ===
|
|
1542
|
+
return typeof R == "string" || typeof R == "function" || R === r || R === l || R === i || R === a || R === f || R === h || typeof R == "object" && R !== null && (R.$$typeof === S || R.$$typeof === m || R.$$typeof === s || R.$$typeof === u || R.$$typeof === d || R.$$typeof === O || R.$$typeof === v || R.$$typeof === L || R.$$typeof === _);
|
|
1543
1543
|
}, Le.typeOf = P, Le;
|
|
1544
1544
|
}
|
|
1545
1545
|
var De = {};
|
|
@@ -1554,15 +1554,15 @@ var De = {};
|
|
|
1554
1554
|
var cs;
|
|
1555
1555
|
function sd() {
|
|
1556
1556
|
return cs || (cs = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1557
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115,
|
|
1557
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, S = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, O = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, L = e ? Symbol.for("react.scope") : 60119;
|
|
1558
1558
|
function P($) {
|
|
1559
1559
|
return typeof $ == "string" || typeof $ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1560
|
-
$ === r || $ === l || $ === i || $ === a || $ === f || $ === h || typeof $ == "object" && $ !== null && ($.$$typeof ===
|
|
1560
|
+
$ === r || $ === l || $ === i || $ === a || $ === f || $ === h || typeof $ == "object" && $ !== null && ($.$$typeof === S || $.$$typeof === m || $.$$typeof === s || $.$$typeof === u || $.$$typeof === d || $.$$typeof === O || $.$$typeof === v || $.$$typeof === L || $.$$typeof === _);
|
|
1561
1561
|
}
|
|
1562
1562
|
function j($) {
|
|
1563
1563
|
if (typeof $ == "object" && $ !== null) {
|
|
1564
|
-
var
|
|
1565
|
-
switch (
|
|
1564
|
+
var He = $.$$typeof;
|
|
1565
|
+
switch (He) {
|
|
1566
1566
|
case t:
|
|
1567
1567
|
var We = $.type;
|
|
1568
1568
|
switch (We) {
|
|
@@ -1578,21 +1578,21 @@ function sd() {
|
|
|
1578
1578
|
switch (Je) {
|
|
1579
1579
|
case u:
|
|
1580
1580
|
case d:
|
|
1581
|
-
case
|
|
1581
|
+
case S:
|
|
1582
1582
|
case m:
|
|
1583
1583
|
case s:
|
|
1584
1584
|
return Je;
|
|
1585
1585
|
default:
|
|
1586
|
-
return
|
|
1586
|
+
return He;
|
|
1587
1587
|
}
|
|
1588
1588
|
}
|
|
1589
1589
|
case n:
|
|
1590
|
-
return
|
|
1590
|
+
return He;
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
1594
|
-
var R = c, D = l, re = u, be = s, oe = t, q = d, Te = r, ee =
|
|
1595
|
-
function
|
|
1594
|
+
var R = c, D = l, re = u, be = s, oe = t, q = d, Te = r, ee = S, B = m, F = n, J = i, fe = a, le = f, ye = !1;
|
|
1595
|
+
function Fe($) {
|
|
1596
1596
|
return ye || (ye = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), g($) || j($) === c;
|
|
1597
1597
|
}
|
|
1598
1598
|
function g($) {
|
|
@@ -1614,7 +1614,7 @@ function sd() {
|
|
|
1614
1614
|
return j($) === r;
|
|
1615
1615
|
}
|
|
1616
1616
|
function se($) {
|
|
1617
|
-
return j($) ===
|
|
1617
|
+
return j($) === S;
|
|
1618
1618
|
}
|
|
1619
1619
|
function ie($) {
|
|
1620
1620
|
return j($) === m;
|
|
@@ -1631,7 +1631,7 @@ function sd() {
|
|
|
1631
1631
|
function ke($) {
|
|
1632
1632
|
return j($) === f;
|
|
1633
1633
|
}
|
|
1634
|
-
De.AsyncMode = R, De.ConcurrentMode = D, De.ContextConsumer = re, De.ContextProvider = be, De.Element = oe, De.ForwardRef = q, De.Fragment = Te, De.Lazy = ee, De.Memo = B, De.Portal = F, De.Profiler = J, De.StrictMode = fe, De.Suspense = le, De.isAsyncMode =
|
|
1634
|
+
De.AsyncMode = R, De.ConcurrentMode = D, De.ContextConsumer = re, De.ContextProvider = be, De.Element = oe, De.ForwardRef = q, De.Fragment = Te, De.Lazy = ee, De.Memo = B, De.Portal = F, De.Profiler = J, De.StrictMode = fe, De.Suspense = le, De.isAsyncMode = Fe, De.isConcurrentMode = g, De.isContextConsumer = Y, De.isContextProvider = W, De.isElement = x, De.isForwardRef = Z, De.isFragment = ae, De.isLazy = se, De.isMemo = ie, De.isPortal = Q, De.isProfiler = ce, De.isStrictMode = ue, De.isSuspense = ke, De.isValidElementType = P, De.typeOf = j;
|
|
1635
1635
|
})()), De;
|
|
1636
1636
|
}
|
|
1637
1637
|
var ls;
|
|
@@ -1677,30 +1677,30 @@ function od() {
|
|
|
1677
1677
|
type: !0
|
|
1678
1678
|
}, i = {};
|
|
1679
1679
|
i[e.ForwardRef] = r, i[e.Memo] = a;
|
|
1680
|
-
function s(
|
|
1681
|
-
return e.isMemo(
|
|
1680
|
+
function s(S) {
|
|
1681
|
+
return e.isMemo(S) ? a : i[S.$$typeof] || t;
|
|
1682
1682
|
}
|
|
1683
1683
|
var u = Object.defineProperty, c = Object.getOwnPropertyNames, l = Object.getOwnPropertySymbols, d = Object.getOwnPropertyDescriptor, f = Object.getPrototypeOf, h = Object.prototype;
|
|
1684
|
-
function m(
|
|
1684
|
+
function m(S, _, O) {
|
|
1685
1685
|
if (typeof _ != "string") {
|
|
1686
1686
|
if (h) {
|
|
1687
1687
|
var v = f(_);
|
|
1688
|
-
v && v !== h && m(
|
|
1688
|
+
v && v !== h && m(S, v, O);
|
|
1689
1689
|
}
|
|
1690
1690
|
var L = c(_);
|
|
1691
1691
|
l && (L = L.concat(l(_)));
|
|
1692
|
-
for (var P = s(
|
|
1692
|
+
for (var P = s(S), j = s(_), R = 0; R < L.length; ++R) {
|
|
1693
1693
|
var D = L[R];
|
|
1694
1694
|
if (!n[D] && !(O && O[D]) && !(j && j[D]) && !(P && P[D])) {
|
|
1695
1695
|
var re = d(_, D);
|
|
1696
1696
|
try {
|
|
1697
|
-
u(
|
|
1697
|
+
u(S, D, re);
|
|
1698
1698
|
} catch {
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
|
-
return
|
|
1703
|
+
return S;
|
|
1704
1704
|
}
|
|
1705
1705
|
return fa = m, fa;
|
|
1706
1706
|
}
|
|
@@ -1713,40 +1713,40 @@ var Ae;
|
|
|
1713
1713
|
(function(e) {
|
|
1714
1714
|
e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
|
|
1715
1715
|
})(Ae || (Ae = {}));
|
|
1716
|
-
var
|
|
1716
|
+
var je;
|
|
1717
1717
|
(function(e) {
|
|
1718
1718
|
e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
|
|
1719
|
-
})(
|
|
1719
|
+
})(je || (je = {}));
|
|
1720
1720
|
var wn;
|
|
1721
1721
|
(function(e) {
|
|
1722
1722
|
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
|
|
1723
1723
|
})(wn || (wn = {}));
|
|
1724
1724
|
function fs(e) {
|
|
1725
|
-
return e.type ===
|
|
1725
|
+
return e.type === je.literal;
|
|
1726
1726
|
}
|
|
1727
1727
|
function ud(e) {
|
|
1728
|
-
return e.type ===
|
|
1728
|
+
return e.type === je.argument;
|
|
1729
1729
|
}
|
|
1730
1730
|
function ou(e) {
|
|
1731
|
-
return e.type ===
|
|
1731
|
+
return e.type === je.number;
|
|
1732
1732
|
}
|
|
1733
1733
|
function uu(e) {
|
|
1734
|
-
return e.type ===
|
|
1734
|
+
return e.type === je.date;
|
|
1735
1735
|
}
|
|
1736
1736
|
function cu(e) {
|
|
1737
|
-
return e.type ===
|
|
1737
|
+
return e.type === je.time;
|
|
1738
1738
|
}
|
|
1739
1739
|
function lu(e) {
|
|
1740
|
-
return e.type ===
|
|
1740
|
+
return e.type === je.select;
|
|
1741
1741
|
}
|
|
1742
1742
|
function du(e) {
|
|
1743
|
-
return e.type ===
|
|
1743
|
+
return e.type === je.plural;
|
|
1744
1744
|
}
|
|
1745
1745
|
function cd(e) {
|
|
1746
|
-
return e.type ===
|
|
1746
|
+
return e.type === je.pound;
|
|
1747
1747
|
}
|
|
1748
1748
|
function fu(e) {
|
|
1749
|
-
return e.type ===
|
|
1749
|
+
return e.type === je.tag;
|
|
1750
1750
|
}
|
|
1751
1751
|
function hu(e) {
|
|
1752
1752
|
return !!(e && typeof e == "object" && e.type === wn.number);
|
|
@@ -3650,7 +3650,7 @@ var Dd = (
|
|
|
3650
3650
|
if (i === 35 && (n === "plural" || n === "selectordinal")) {
|
|
3651
3651
|
var u = this.clonePosition();
|
|
3652
3652
|
this.bump(), a.push({
|
|
3653
|
-
type:
|
|
3653
|
+
type: je.pound,
|
|
3654
3654
|
location: ve(u, this.clonePosition())
|
|
3655
3655
|
});
|
|
3656
3656
|
} else if (i === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
@@ -3678,7 +3678,7 @@ var Dd = (
|
|
|
3678
3678
|
if (this.bumpSpace(), this.bumpIf("/>"))
|
|
3679
3679
|
return {
|
|
3680
3680
|
val: {
|
|
3681
|
-
type:
|
|
3681
|
+
type: je.literal,
|
|
3682
3682
|
value: "<".concat(a, "/>"),
|
|
3683
3683
|
location: ve(r, this.clonePosition())
|
|
3684
3684
|
},
|
|
@@ -3695,7 +3695,7 @@ var Dd = (
|
|
|
3695
3695
|
var c = this.clonePosition(), l = this.parseTagName();
|
|
3696
3696
|
return a !== l ? this.error(Ae.UNMATCHED_CLOSING_TAG, ve(c, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
|
|
3697
3697
|
val: {
|
|
3698
|
-
type:
|
|
3698
|
+
type: je.tag,
|
|
3699
3699
|
value: a,
|
|
3700
3700
|
children: s,
|
|
3701
3701
|
location: ve(r, this.clonePosition())
|
|
@@ -3732,7 +3732,7 @@ var Dd = (
|
|
|
3732
3732
|
}
|
|
3733
3733
|
var c = ve(r, this.clonePosition());
|
|
3734
3734
|
return {
|
|
3735
|
-
val: { type:
|
|
3735
|
+
val: { type: je.literal, value: a, location: c },
|
|
3736
3736
|
err: null
|
|
3737
3737
|
};
|
|
3738
3738
|
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
@@ -3794,7 +3794,7 @@ var Dd = (
|
|
|
3794
3794
|
case 125:
|
|
3795
3795
|
return this.bump(), {
|
|
3796
3796
|
val: {
|
|
3797
|
-
type:
|
|
3797
|
+
type: je.argument,
|
|
3798
3798
|
// value does not include the opening and closing braces.
|
|
3799
3799
|
value: a,
|
|
3800
3800
|
location: ve(r, this.clonePosition())
|
|
@@ -3833,16 +3833,16 @@ var Dd = (
|
|
|
3833
3833
|
var m = ve(d, this.clonePosition());
|
|
3834
3834
|
l = { style: h, styleLocation: m };
|
|
3835
3835
|
}
|
|
3836
|
-
var
|
|
3837
|
-
if (
|
|
3838
|
-
return
|
|
3836
|
+
var S = this.tryParseArgumentClose(a);
|
|
3837
|
+
if (S.err)
|
|
3838
|
+
return S;
|
|
3839
3839
|
var _ = ve(a, this.clonePosition());
|
|
3840
3840
|
if (l && bs(l?.style, "::", 0)) {
|
|
3841
3841
|
var O = Od(l.style.slice(2));
|
|
3842
3842
|
if (u === "number") {
|
|
3843
3843
|
var f = this.parseNumberSkeletonFromString(O, l.styleLocation);
|
|
3844
3844
|
return f.err ? f : {
|
|
3845
|
-
val: { type:
|
|
3845
|
+
val: { type: je.number, value: r, location: _, style: f.val },
|
|
3846
3846
|
err: null
|
|
3847
3847
|
};
|
|
3848
3848
|
} else {
|
|
@@ -3855,7 +3855,7 @@ var Dd = (
|
|
|
3855
3855
|
pattern: v,
|
|
3856
3856
|
location: l.styleLocation,
|
|
3857
3857
|
parsedOptions: this.shouldParseSkeletons ? dd(v) : {}
|
|
3858
|
-
}, L = u === "date" ?
|
|
3858
|
+
}, L = u === "date" ? je.date : je.time;
|
|
3859
3859
|
return {
|
|
3860
3860
|
val: { type: L, value: r, location: _, style: h },
|
|
3861
3861
|
err: null
|
|
@@ -3864,7 +3864,7 @@ var Dd = (
|
|
|
3864
3864
|
}
|
|
3865
3865
|
return {
|
|
3866
3866
|
val: {
|
|
3867
|
-
type: u === "number" ?
|
|
3867
|
+
type: u === "number" ? je.number : u === "date" ? je.date : je.time,
|
|
3868
3868
|
value: r,
|
|
3869
3869
|
location: _,
|
|
3870
3870
|
style: (i = l?.style) !== null && i !== void 0 ? i : null
|
|
@@ -3892,13 +3892,13 @@ var Dd = (
|
|
|
3892
3892
|
var D = this.tryParsePluralOrSelectOptions(t, u, n, j);
|
|
3893
3893
|
if (D.err)
|
|
3894
3894
|
return D;
|
|
3895
|
-
var
|
|
3896
|
-
if (
|
|
3897
|
-
return
|
|
3895
|
+
var S = this.tryParseArgumentClose(a);
|
|
3896
|
+
if (S.err)
|
|
3897
|
+
return S;
|
|
3898
3898
|
var re = ve(a, this.clonePosition());
|
|
3899
3899
|
return u === "select" ? {
|
|
3900
3900
|
val: {
|
|
3901
|
-
type:
|
|
3901
|
+
type: je.select,
|
|
3902
3902
|
value: r,
|
|
3903
3903
|
options: gs(D.val),
|
|
3904
3904
|
location: re
|
|
@@ -3906,7 +3906,7 @@ var Dd = (
|
|
|
3906
3906
|
err: null
|
|
3907
3907
|
} : {
|
|
3908
3908
|
val: {
|
|
3909
|
-
type:
|
|
3909
|
+
type: je.plural,
|
|
3910
3910
|
value: r,
|
|
3911
3911
|
options: gs(D.val),
|
|
3912
3912
|
offset: R,
|
|
@@ -3990,16 +3990,16 @@ var Dd = (
|
|
|
3990
3990
|
var m = this.clonePosition();
|
|
3991
3991
|
if (!this.bumpIf("{"))
|
|
3992
3992
|
return this.error(n === "select" ? Ae.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : Ae.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, ve(this.clonePosition(), this.clonePosition()));
|
|
3993
|
-
var
|
|
3994
|
-
if (
|
|
3995
|
-
return
|
|
3993
|
+
var S = this.parseMessage(t + 1, n, r);
|
|
3994
|
+
if (S.err)
|
|
3995
|
+
return S;
|
|
3996
3996
|
var _ = this.tryParseArgumentClose(m);
|
|
3997
3997
|
if (_.err)
|
|
3998
3998
|
return _;
|
|
3999
3999
|
u.push([
|
|
4000
4000
|
l,
|
|
4001
4001
|
{
|
|
4002
|
-
value:
|
|
4002
|
+
value: S.val,
|
|
4003
4003
|
location: ve(m, this.clonePosition())
|
|
4004
4004
|
}
|
|
4005
4005
|
]), c.add(l), this.bumpSpace(), i = this.parseIdentifierIfPossible(), l = i.value, d = i.location;
|
|
@@ -4276,10 +4276,10 @@ function Rr(e, t, n, r, a, i, s) {
|
|
|
4276
4276
|
continue;
|
|
4277
4277
|
}
|
|
4278
4278
|
if (fu(d)) {
|
|
4279
|
-
var
|
|
4279
|
+
var S = d.children, _ = d.value, O = a[_];
|
|
4280
4280
|
if (!Au(O))
|
|
4281
4281
|
throw new $d(_, "function", s);
|
|
4282
|
-
var v = Rr(
|
|
4282
|
+
var v = Rr(S, t, n, r, a, i), L = O(v.map(function(R) {
|
|
4283
4283
|
return R.value;
|
|
4284
4284
|
}));
|
|
4285
4285
|
Array.isArray(L) || (L = [L]), u.push.apply(u, L.map(function(R) {
|
|
@@ -4698,15 +4698,15 @@ function Cs(e, t) {
|
|
|
4698
4698
|
var Za = function(e, t, n, r, a) {
|
|
4699
4699
|
var i = e.locale, s = e.formats, u = e.messages, c = e.defaultLocale, l = e.defaultFormats, d = e.fallbackOnEmptyString, f = e.onError, h = e.timeZone, m = e.defaultRichTextElements;
|
|
4700
4700
|
n === void 0 && (n = { id: "" });
|
|
4701
|
-
var
|
|
4702
|
-
su(!!
|
|
4703
|
-
var O = String(
|
|
4701
|
+
var S = n.id, _ = n.defaultMessage;
|
|
4702
|
+
su(!!S, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
|
|
4703
|
+
var O = String(S), v = (
|
|
4704
4704
|
// In case messages is Object.create(null)
|
|
4705
4705
|
// e.g import('foo.json') from webpack)
|
|
4706
4706
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
4707
4707
|
u && Object.prototype.hasOwnProperty.call(u, O) && u[O]
|
|
4708
4708
|
);
|
|
4709
|
-
if (Array.isArray(v) && v.length === 1 && v[0].type ===
|
|
4709
|
+
if (Array.isArray(v) && v.length === 1 && v[0].type === je.literal)
|
|
4710
4710
|
return v[0].value;
|
|
4711
4711
|
if (!r && v && typeof v == "string" && !m)
|
|
4712
4712
|
return v.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
@@ -5204,7 +5204,7 @@ class Of extends Error {
|
|
|
5204
5204
|
super(t), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor), this.actual = n, this.expected = r, this.generated = i, this.operator = a;
|
|
5205
5205
|
}
|
|
5206
5206
|
}
|
|
5207
|
-
function
|
|
5207
|
+
function A(e, t) {
|
|
5208
5208
|
ku(
|
|
5209
5209
|
!!e,
|
|
5210
5210
|
!1,
|
|
@@ -6478,8 +6478,8 @@ function Gf() {
|
|
|
6478
6478
|
if (q(), !re(a)) return D("property missing ':'");
|
|
6479
6479
|
var J = re(i), fe = B({
|
|
6480
6480
|
type: m,
|
|
6481
|
-
property:
|
|
6482
|
-
value: J ?
|
|
6481
|
+
property: S(F[0].replace(e, f)),
|
|
6482
|
+
value: J ? S(J[0].replace(e, f)) : f
|
|
6483
6483
|
});
|
|
6484
6484
|
return re(s), fe;
|
|
6485
6485
|
}
|
|
@@ -6493,7 +6493,7 @@ function Gf() {
|
|
|
6493
6493
|
}
|
|
6494
6494
|
return be(), ee();
|
|
6495
6495
|
};
|
|
6496
|
-
function
|
|
6496
|
+
function S(_) {
|
|
6497
6497
|
return _ ? _.replace(u, f) : f;
|
|
6498
6498
|
}
|
|
6499
6499
|
return Ta;
|
|
@@ -6707,7 +6707,7 @@ function rh(e, t, n) {
|
|
|
6707
6707
|
function ah(e, t) {
|
|
6708
6708
|
if (t.data && t.data.estree && e.evaluater) {
|
|
6709
6709
|
const r = t.data.estree.body[0];
|
|
6710
|
-
return
|
|
6710
|
+
return A(r.type === "ExpressionStatement"), /** @type {Child | undefined} */
|
|
6711
6711
|
e.evaluater.evaluateExpression(r.expression);
|
|
6712
6712
|
}
|
|
6713
6713
|
tr(e, t.position);
|
|
@@ -6794,11 +6794,11 @@ function fh(e, t) {
|
|
|
6794
6794
|
if (r.type === "mdxJsxExpressionAttribute")
|
|
6795
6795
|
if (r.data && r.data.estree && e.evaluater) {
|
|
6796
6796
|
const i = r.data.estree.body[0];
|
|
6797
|
-
|
|
6797
|
+
A(i.type === "ExpressionStatement");
|
|
6798
6798
|
const s = i.expression;
|
|
6799
|
-
|
|
6799
|
+
A(s.type === "ObjectExpression");
|
|
6800
6800
|
const u = s.properties[0];
|
|
6801
|
-
|
|
6801
|
+
A(u.type === "SpreadElement"), Object.assign(
|
|
6802
6802
|
n,
|
|
6803
6803
|
e.evaluater.evaluateExpression(u.argument)
|
|
6804
6804
|
);
|
|
@@ -6810,7 +6810,7 @@ function fh(e, t) {
|
|
|
6810
6810
|
if (r.value && typeof r.value == "object")
|
|
6811
6811
|
if (r.value.data && r.value.data.estree && e.evaluater) {
|
|
6812
6812
|
const u = r.value.data.estree.body[0];
|
|
6813
|
-
|
|
6813
|
+
A(u.type === "ExpressionStatement"), i = e.evaluater.evaluateExpression(u.expression);
|
|
6814
6814
|
} else
|
|
6815
6815
|
tr(e, t.position);
|
|
6816
6816
|
else
|
|
@@ -6893,7 +6893,7 @@ function Xu(e, t, n) {
|
|
|
6893
6893
|
optional: !1
|
|
6894
6894
|
} : u;
|
|
6895
6895
|
}
|
|
6896
|
-
|
|
6896
|
+
A(s, "always a result"), r = s;
|
|
6897
6897
|
} else
|
|
6898
6898
|
r = Ns(t) && !/^[a-z]/.test(t) ? { type: "Identifier", name: t } : { type: "Literal", value: t };
|
|
6899
6899
|
if (r.type === "Literal") {
|
|
@@ -7640,7 +7640,7 @@ function Oh(e) {
|
|
|
7640
7640
|
let n;
|
|
7641
7641
|
return t;
|
|
7642
7642
|
function r(u) {
|
|
7643
|
-
if (
|
|
7643
|
+
if (A(
|
|
7644
7644
|
u === b.eof || te(u),
|
|
7645
7645
|
"expected eol or eof"
|
|
7646
7646
|
), u === b.eof) {
|
|
@@ -7650,7 +7650,7 @@ function Oh(e) {
|
|
|
7650
7650
|
return e.enter(p.lineEnding), e.consume(u), e.exit(p.lineEnding), Be(e, t, p.linePrefix);
|
|
7651
7651
|
}
|
|
7652
7652
|
function a(u) {
|
|
7653
|
-
return
|
|
7653
|
+
return A(
|
|
7654
7654
|
u !== b.eof && !te(u),
|
|
7655
7655
|
"expected anything other than a line ending or EOF"
|
|
7656
7656
|
), e.enter(p.paragraph), i(u);
|
|
@@ -7678,7 +7678,7 @@ function Dh(e) {
|
|
|
7678
7678
|
function u(P) {
|
|
7679
7679
|
if (r < n.length) {
|
|
7680
7680
|
const j = n[r];
|
|
7681
|
-
return t.containerState = j[1],
|
|
7681
|
+
return t.containerState = j[1], A(
|
|
7682
7682
|
j[0].continuation,
|
|
7683
7683
|
"expected `continuation` to be defined on container construct"
|
|
7684
7684
|
), e.attempt(
|
|
@@ -7690,7 +7690,7 @@ function Dh(e) {
|
|
|
7690
7690
|
return l(P);
|
|
7691
7691
|
}
|
|
7692
7692
|
function c(P) {
|
|
7693
|
-
if (
|
|
7693
|
+
if (A(
|
|
7694
7694
|
t.containerState,
|
|
7695
7695
|
"expected `containerState` to be defined after continuation"
|
|
7696
7696
|
), r++, t.containerState._closeFlow) {
|
|
@@ -7702,7 +7702,7 @@ function Dh(e) {
|
|
|
7702
7702
|
D = t.events[R][1].end;
|
|
7703
7703
|
break;
|
|
7704
7704
|
}
|
|
7705
|
-
|
|
7705
|
+
A(D, "could not find previous flow chunk"), v(r);
|
|
7706
7706
|
let re = j;
|
|
7707
7707
|
for (; re < t.events.length; )
|
|
7708
7708
|
t.events[re][1].end = Object.assign({}, D), re++;
|
|
@@ -7720,7 +7720,7 @@ function Dh(e) {
|
|
|
7720
7720
|
if (!a)
|
|
7721
7721
|
return h(P);
|
|
7722
7722
|
if (a.currentConstruct && a.currentConstruct.concrete)
|
|
7723
|
-
return
|
|
7723
|
+
return S(P);
|
|
7724
7724
|
t.interrupt = !!(a.currentConstruct && !a._gfmTableDynamicInterruptHack);
|
|
7725
7725
|
}
|
|
7726
7726
|
return t.containerState = {}, e.check(
|
|
@@ -7733,25 +7733,25 @@ function Dh(e) {
|
|
|
7733
7733
|
return a && L(), v(r), h(P);
|
|
7734
7734
|
}
|
|
7735
7735
|
function f(P) {
|
|
7736
|
-
return t.parser.lazy[t.now().line] = r !== n.length, s = t.now().offset,
|
|
7736
|
+
return t.parser.lazy[t.now().line] = r !== n.length, s = t.now().offset, S(P);
|
|
7737
7737
|
}
|
|
7738
7738
|
function h(P) {
|
|
7739
7739
|
return t.containerState = {}, e.attempt(
|
|
7740
7740
|
Us,
|
|
7741
7741
|
m,
|
|
7742
|
-
|
|
7742
|
+
S
|
|
7743
7743
|
)(P);
|
|
7744
7744
|
}
|
|
7745
7745
|
function m(P) {
|
|
7746
|
-
return
|
|
7746
|
+
return A(
|
|
7747
7747
|
t.currentConstruct,
|
|
7748
7748
|
"expected `currentConstruct` to be defined on tokenizer"
|
|
7749
|
-
),
|
|
7749
|
+
), A(
|
|
7750
7750
|
t.containerState,
|
|
7751
7751
|
"expected `containerState` to be defined on tokenizer"
|
|
7752
7752
|
), r++, n.push([t.currentConstruct, t.containerState]), h(P);
|
|
7753
7753
|
}
|
|
7754
|
-
function
|
|
7754
|
+
function S(P) {
|
|
7755
7755
|
if (P === b.eof) {
|
|
7756
7756
|
a && L(), v(0), e.consume(P);
|
|
7757
7757
|
return;
|
|
@@ -7770,7 +7770,7 @@ function Dh(e) {
|
|
|
7770
7770
|
return te(P) ? (e.consume(P), O(e.exit(p.chunkFlow)), r = 0, t.interrupt = void 0, u) : (e.consume(P), _);
|
|
7771
7771
|
}
|
|
7772
7772
|
function O(P, j) {
|
|
7773
|
-
|
|
7773
|
+
A(a, "expected `childFlow` to be defined when continuing");
|
|
7774
7774
|
const R = t.sliceStream(P);
|
|
7775
7775
|
if (j && R.push(null), P.previous = i, i && (i.next = P), i = P, a.defineSkip(P.start), a.write(R), t.parser.lazy[P.start.line]) {
|
|
7776
7776
|
let D = a.events.length;
|
|
@@ -7792,7 +7792,7 @@ function Dh(e) {
|
|
|
7792
7792
|
}
|
|
7793
7793
|
oe = !0;
|
|
7794
7794
|
}
|
|
7795
|
-
for (
|
|
7795
|
+
for (A(q, "could not find previous flow chunk"), v(r), D = re; D < t.events.length; )
|
|
7796
7796
|
t.events[D][1].end = Object.assign({}, q), D++;
|
|
7797
7797
|
Ft(
|
|
7798
7798
|
t.events,
|
|
@@ -7806,7 +7806,7 @@ function Dh(e) {
|
|
|
7806
7806
|
let j = n.length;
|
|
7807
7807
|
for (; j-- > P; ) {
|
|
7808
7808
|
const R = n[j];
|
|
7809
|
-
t.containerState = R[1],
|
|
7809
|
+
t.containerState = R[1], A(
|
|
7810
7810
|
R[0].exit,
|
|
7811
7811
|
"expected `exit` to be defined on container construct"
|
|
7812
7812
|
), R[0].exit.call(t, e);
|
|
@@ -7814,14 +7814,14 @@ function Dh(e) {
|
|
|
7814
7814
|
n.length = P;
|
|
7815
7815
|
}
|
|
7816
7816
|
function L() {
|
|
7817
|
-
|
|
7817
|
+
A(
|
|
7818
7818
|
t.containerState,
|
|
7819
7819
|
"expected `containerState` to be defined when closing flow"
|
|
7820
|
-
),
|
|
7820
|
+
), A(a, "expected `childFlow` to be defined when closing it"), a.write([b.eof]), i = void 0, a = void 0, t.containerState._closeFlow = void 0;
|
|
7821
7821
|
}
|
|
7822
7822
|
}
|
|
7823
7823
|
function kh(e, t, n) {
|
|
7824
|
-
return
|
|
7824
|
+
return A(
|
|
7825
7825
|
this.parser.constructs.disable.null,
|
|
7826
7826
|
"expected `disable.null` to be populated"
|
|
7827
7827
|
), Be(
|
|
@@ -7886,7 +7886,7 @@ function Ph(e, t) {
|
|
|
7886
7886
|
["enter", s, t],
|
|
7887
7887
|
["exit", s, t],
|
|
7888
7888
|
["enter", i, t]
|
|
7889
|
-
]),
|
|
7889
|
+
]), A(
|
|
7890
7890
|
t.parser.constructs.insideSpan.null,
|
|
7891
7891
|
"expected `insideSpan` to be populated"
|
|
7892
7892
|
), l = gt(
|
|
@@ -7917,7 +7917,7 @@ function Mh(e, t) {
|
|
|
7917
7917
|
let i;
|
|
7918
7918
|
return s;
|
|
7919
7919
|
function s(c) {
|
|
7920
|
-
return
|
|
7920
|
+
return A(
|
|
7921
7921
|
c === b.asterisk || c === b.underscore,
|
|
7922
7922
|
"expected asterisk or underscore"
|
|
7923
7923
|
), i = c, e.enter("attentionSequence"), u(c);
|
|
@@ -7926,7 +7926,7 @@ function Mh(e, t) {
|
|
|
7926
7926
|
if (c === i)
|
|
7927
7927
|
return e.consume(c), u;
|
|
7928
7928
|
const l = e.exit("attentionSequence"), d = js(c);
|
|
7929
|
-
|
|
7929
|
+
A(n, "expected `attentionMarkers` to be populated");
|
|
7930
7930
|
const f = !d || d === K.characterGroupPunctuation && a || n.includes(c), h = !a || a === K.characterGroupPunctuation && d || n.includes(r);
|
|
7931
7931
|
return l._open = !!(i === b.asterisk ? f : f && (a || !h)), l._close = !!(i === b.asterisk ? h : h && (d || !f)), t(c);
|
|
7932
7932
|
}
|
|
@@ -7939,7 +7939,7 @@ function Fh(e, t, n) {
|
|
|
7939
7939
|
let r = 0;
|
|
7940
7940
|
return a;
|
|
7941
7941
|
function a(m) {
|
|
7942
|
-
return
|
|
7942
|
+
return A(m === b.lessThan, "expected `<`"), e.enter(p.autolink), e.enter(p.autolinkMarker), e.consume(m), e.exit(p.autolinkMarker), e.enter(p.autolinkProtocol), i;
|
|
7943
7943
|
}
|
|
7944
7944
|
function i(m) {
|
|
7945
7945
|
return Mt(m) ? (e.consume(m), s) : l(m);
|
|
@@ -7964,8 +7964,8 @@ function Fh(e, t, n) {
|
|
|
7964
7964
|
}
|
|
7965
7965
|
function h(m) {
|
|
7966
7966
|
if ((m === b.dash || ht(m)) && r++ < K.autolinkDomainSizeMax) {
|
|
7967
|
-
const
|
|
7968
|
-
return e.consume(m),
|
|
7967
|
+
const S = m === b.dash ? h : f;
|
|
7968
|
+
return e.consume(m), S;
|
|
7969
7969
|
}
|
|
7970
7970
|
return n(m);
|
|
7971
7971
|
}
|
|
@@ -7992,7 +7992,7 @@ function Uh(e, t, n) {
|
|
|
7992
7992
|
function a(s) {
|
|
7993
7993
|
if (s === b.greaterThan) {
|
|
7994
7994
|
const u = r.containerState;
|
|
7995
|
-
return
|
|
7995
|
+
return A(u, "expected `containerState` to be defined in container"), u.open || (e.enter(p.blockQuote, { _container: !0 }), u.open = !0), e.enter(p.blockQuotePrefix), e.enter(p.blockQuoteMarker), e.consume(s), e.exit(p.blockQuoteMarker), i;
|
|
7996
7996
|
}
|
|
7997
7997
|
return n(s);
|
|
7998
7998
|
}
|
|
@@ -8004,7 +8004,7 @@ function jh(e, t, n) {
|
|
|
8004
8004
|
const r = this;
|
|
8005
8005
|
return a;
|
|
8006
8006
|
function a(s) {
|
|
8007
|
-
return we(s) ? (
|
|
8007
|
+
return we(s) ? (A(
|
|
8008
8008
|
r.parser.constructs.disable.null,
|
|
8009
8009
|
"expected `disable.null` to be populated"
|
|
8010
8010
|
), Be(
|
|
@@ -8028,7 +8028,7 @@ const Zu = {
|
|
|
8028
8028
|
function zh(e, t, n) {
|
|
8029
8029
|
return r;
|
|
8030
8030
|
function r(i) {
|
|
8031
|
-
return
|
|
8031
|
+
return A(i === b.backslash, "expected `\\`"), e.enter(p.characterEscape), e.enter(p.escapeMarker), e.consume(i), e.exit(p.escapeMarker), a;
|
|
8032
8032
|
}
|
|
8033
8033
|
function a(i) {
|
|
8034
8034
|
return Nh(i) ? (e.enter(p.characterEscapeValue), e.consume(i), e.exit(p.characterEscapeValue), e.exit(p.characterEscape), t) : n(i);
|
|
@@ -8043,7 +8043,7 @@ function $h(e, t, n) {
|
|
|
8043
8043
|
let a = 0, i, s;
|
|
8044
8044
|
return u;
|
|
8045
8045
|
function u(f) {
|
|
8046
|
-
return
|
|
8046
|
+
return A(f === b.ampersand, "expected `&`"), e.enter(p.characterReference), e.enter(p.characterReferenceMarker), e.consume(f), e.exit(p.characterReferenceMarker), c;
|
|
8047
8047
|
}
|
|
8048
8048
|
function c(f) {
|
|
8049
8049
|
return f === b.numberSign ? (e.enter(p.characterReferenceMarkerNumeric), e.consume(f), e.exit(p.characterReferenceMarkerNumeric), l) : (e.enter(p.characterReferenceValue), i = K.characterReferenceNamedSizeMax, s = ht, d(f));
|
|
@@ -8075,7 +8075,7 @@ function Yh(e, t, n) {
|
|
|
8075
8075
|
return l(D);
|
|
8076
8076
|
}
|
|
8077
8077
|
function l(D) {
|
|
8078
|
-
|
|
8078
|
+
A(
|
|
8079
8079
|
D === b.graveAccent || D === b.tilde,
|
|
8080
8080
|
"expected `` ` `` or `~`"
|
|
8081
8081
|
);
|
|
@@ -8092,16 +8092,16 @@ function Yh(e, t, n) {
|
|
|
8092
8092
|
return D === b.eof || te(D) ? (e.exit(p.chunkString), e.exit(p.codeFencedFenceInfo), f(D)) : we(D) ? (e.exit(p.chunkString), e.exit(p.codeFencedFenceInfo), Be(e, m, p.whitespace)(D)) : D === b.graveAccent && D === u ? n(D) : (e.consume(D), h);
|
|
8093
8093
|
}
|
|
8094
8094
|
function m(D) {
|
|
8095
|
-
return D === b.eof || te(D) ? f(D) : (e.enter(p.codeFencedFenceMeta), e.enter(p.chunkString, { contentType: K.contentTypeString }),
|
|
8095
|
+
return D === b.eof || te(D) ? f(D) : (e.enter(p.codeFencedFenceMeta), e.enter(p.chunkString, { contentType: K.contentTypeString }), S(D));
|
|
8096
8096
|
}
|
|
8097
|
-
function
|
|
8098
|
-
return D === b.eof || te(D) ? (e.exit(p.chunkString), e.exit(p.codeFencedFenceMeta), f(D)) : D === b.graveAccent && D === u ? n(D) : (e.consume(D),
|
|
8097
|
+
function S(D) {
|
|
8098
|
+
return D === b.eof || te(D) ? (e.exit(p.chunkString), e.exit(p.codeFencedFenceMeta), f(D)) : D === b.graveAccent && D === u ? n(D) : (e.consume(D), S);
|
|
8099
8099
|
}
|
|
8100
8100
|
function _(D) {
|
|
8101
|
-
return
|
|
8101
|
+
return A(te(D), "expected eol"), e.attempt(a, j, O)(D);
|
|
8102
8102
|
}
|
|
8103
8103
|
function O(D) {
|
|
8104
|
-
return
|
|
8104
|
+
return A(te(D), "expected eol"), e.enter(p.lineEnding), e.consume(D), e.exit(p.lineEnding), v;
|
|
8105
8105
|
}
|
|
8106
8106
|
function v(D) {
|
|
8107
8107
|
return i > 0 && we(D) ? Be(
|
|
@@ -8124,10 +8124,10 @@ function Yh(e, t, n) {
|
|
|
8124
8124
|
let oe = 0;
|
|
8125
8125
|
return q;
|
|
8126
8126
|
function q(J) {
|
|
8127
|
-
return
|
|
8127
|
+
return A(te(J), "expected eol"), D.enter(p.lineEnding), D.consume(J), D.exit(p.lineEnding), Te;
|
|
8128
8128
|
}
|
|
8129
8129
|
function Te(J) {
|
|
8130
|
-
return
|
|
8130
|
+
return A(
|
|
8131
8131
|
r.parser.constructs.disable.null,
|
|
8132
8132
|
"expected `disable.null` to be populated"
|
|
8133
8133
|
), D.enter(p.codeFencedFence), we(J) ? Be(
|
|
@@ -8152,7 +8152,7 @@ function Gh(e, t, n) {
|
|
|
8152
8152
|
const r = this;
|
|
8153
8153
|
return a;
|
|
8154
8154
|
function a(s) {
|
|
8155
|
-
return s === b.eof ? n(s) : (
|
|
8155
|
+
return s === b.eof ? n(s) : (A(te(s), "expected eol"), e.enter(p.lineEnding), e.consume(s), e.exit(p.lineEnding), i);
|
|
8156
8156
|
}
|
|
8157
8157
|
function i(s) {
|
|
8158
8158
|
return r.parser.lazy[r.now().line] ? n(s) : t(s);
|
|
@@ -8166,7 +8166,7 @@ function Wh(e, t, n) {
|
|
|
8166
8166
|
const r = this;
|
|
8167
8167
|
return a;
|
|
8168
8168
|
function a(l) {
|
|
8169
|
-
return
|
|
8169
|
+
return A(we(l)), e.enter(p.codeIndented), Be(
|
|
8170
8170
|
e,
|
|
8171
8171
|
i,
|
|
8172
8172
|
p.linePrefix,
|
|
@@ -8230,7 +8230,7 @@ function Jh(e, t, n) {
|
|
|
8230
8230
|
let a = 0, i, s;
|
|
8231
8231
|
return u;
|
|
8232
8232
|
function u(h) {
|
|
8233
|
-
return
|
|
8233
|
+
return A(h === b.graveAccent, "expected `` ` ``"), A(tc.call(r, r.previous), "expected correct previous"), e.enter(p.codeText), e.enter(p.codeTextSequence), c(h);
|
|
8234
8234
|
}
|
|
8235
8235
|
function c(h) {
|
|
8236
8236
|
return h === b.graveAccent ? (e.consume(h), a++, c) : (e.exit(p.codeTextSequence), l(h));
|
|
@@ -8251,7 +8251,7 @@ function nc(e) {
|
|
|
8251
8251
|
for (; ++n < e.length; ) {
|
|
8252
8252
|
for (; n in t; )
|
|
8253
8253
|
n = t[n];
|
|
8254
|
-
if (r = e[n], n && r[1].type === p.chunkFlow && e[n - 1][1].type === p.listItemPrefix && (
|
|
8254
|
+
if (r = e[n], n && r[1].type === p.chunkFlow && e[n - 1][1].type === p.listItemPrefix && (A(r[1]._tokenizer, "expected `_tokenizer` on subtokens"), c = r[1]._tokenizer.events, i = 0, i < c.length && c[i][1].type === p.lineEndingBlank && (i += 2), i < c.length && c[i][1].type === p.content))
|
|
8255
8255
|
for (; ++i < c.length && c[i][1].type !== p.content; )
|
|
8256
8256
|
c[i][1].type === p.chunkText && (c[i][1]._isInFirstContentOfListItem = !0, i++);
|
|
8257
8257
|
if (r[0] === "enter")
|
|
@@ -8268,27 +8268,27 @@ function Zh(e, t) {
|
|
|
8268
8268
|
const n = e[t][1], r = e[t][2];
|
|
8269
8269
|
let a = t - 1;
|
|
8270
8270
|
const i = [];
|
|
8271
|
-
|
|
8271
|
+
A(n.contentType, "expected `contentType` on subtokens");
|
|
8272
8272
|
const s = n._tokenizer || r.parser[n.contentType](n.start), u = s.events, c = [], l = {};
|
|
8273
|
-
let d, f, h = -1, m = n,
|
|
8273
|
+
let d, f, h = -1, m = n, S = 0, _ = 0;
|
|
8274
8274
|
const O = [_];
|
|
8275
8275
|
for (; m; ) {
|
|
8276
8276
|
for (; e[++a][1] !== m; )
|
|
8277
8277
|
;
|
|
8278
|
-
|
|
8278
|
+
A(
|
|
8279
8279
|
!f || m.previous === f,
|
|
8280
8280
|
"expected previous to match"
|
|
8281
|
-
),
|
|
8281
|
+
), A(!f || f.next === m, "expected next to match"), i.push(a), m._tokenizer || (d = r.sliceStream(m), m.next || d.push(b.eof), f && s.defineSkip(m.start), m._isInFirstContentOfListItem && (s._gfmTasklistFirstContentOfListItem = !0), s.write(d), m._isInFirstContentOfListItem && (s._gfmTasklistFirstContentOfListItem = void 0)), f = m, m = m.next;
|
|
8282
8282
|
}
|
|
8283
8283
|
for (m = n; ++h < u.length; )
|
|
8284
8284
|
// Find a void token that includes a break.
|
|
8285
|
-
u[h][0] === "exit" && u[h - 1][0] === "enter" && u[h][1].type === u[h - 1][1].type && u[h][1].start.line !== u[h][1].end.line && (
|
|
8286
|
-
for (s.events = [], m ? (m._tokenizer = void 0, m.previous = void 0,
|
|
8285
|
+
u[h][0] === "exit" && u[h - 1][0] === "enter" && u[h][1].type === u[h - 1][1].type && u[h][1].start.line !== u[h][1].end.line && (A(m, "expected a current token"), _ = h + 1, O.push(_), m._tokenizer = void 0, m.previous = void 0, m = m.next);
|
|
8286
|
+
for (s.events = [], m ? (m._tokenizer = void 0, m.previous = void 0, A(!m.next, "expected no next token")) : O.pop(), h = O.length; h--; ) {
|
|
8287
8287
|
const v = u.slice(O[h], O[h + 1]), L = i.pop();
|
|
8288
|
-
|
|
8288
|
+
A(L !== void 0, "expected a start position when splicing"), c.unshift([L, L + v.length - 1]), Ft(e, L, 2, v);
|
|
8289
8289
|
}
|
|
8290
8290
|
for (h = -1; ++h < c.length; )
|
|
8291
|
-
l[
|
|
8291
|
+
l[S + c[h][0]] = S + c[h][1], S += c[h][1] - c[h][0] - 1;
|
|
8292
8292
|
return l;
|
|
8293
8293
|
}
|
|
8294
8294
|
const e0 = { tokenize: r0, resolve: n0 }, t0 = { tokenize: a0, partial: !0 };
|
|
@@ -8299,7 +8299,7 @@ function r0(e, t) {
|
|
|
8299
8299
|
let n;
|
|
8300
8300
|
return r;
|
|
8301
8301
|
function r(u) {
|
|
8302
|
-
return
|
|
8302
|
+
return A(
|
|
8303
8303
|
u !== b.eof && !te(u),
|
|
8304
8304
|
"expected no eof or eol"
|
|
8305
8305
|
), e.enter(p.content), n = e.enter(p.chunkContent, {
|
|
@@ -8317,7 +8317,7 @@ function r0(e, t) {
|
|
|
8317
8317
|
return e.exit(p.chunkContent), e.exit(p.content), t(u);
|
|
8318
8318
|
}
|
|
8319
8319
|
function s(u) {
|
|
8320
|
-
return
|
|
8320
|
+
return A(te(u), "expected eol"), e.consume(u), e.exit(p.chunkContent), A(n, "expected previous token"), n.next = e.enter(p.chunkContent, {
|
|
8321
8321
|
contentType: K.contentTypeContent,
|
|
8322
8322
|
previous: n
|
|
8323
8323
|
}), n = n.next, a;
|
|
@@ -8327,12 +8327,12 @@ function a0(e, t, n) {
|
|
|
8327
8327
|
const r = this;
|
|
8328
8328
|
return a;
|
|
8329
8329
|
function a(s) {
|
|
8330
|
-
return
|
|
8330
|
+
return A(te(s), "expected a line ending"), e.exit(p.chunkContent), e.enter(p.lineEnding), e.consume(s), e.exit(p.lineEnding), Be(e, i, p.linePrefix);
|
|
8331
8331
|
}
|
|
8332
8332
|
function i(s) {
|
|
8333
8333
|
if (s === b.eof || te(s))
|
|
8334
8334
|
return n(s);
|
|
8335
|
-
|
|
8335
|
+
A(
|
|
8336
8336
|
r.parser.constructs.disable.null,
|
|
8337
8337
|
"expected `disable.null` to be populated"
|
|
8338
8338
|
);
|
|
@@ -8351,9 +8351,9 @@ function rc(e, t, n, r, a, i, s, u, c) {
|
|
|
8351
8351
|
return v === b.greaterThan ? (e.enter(i), e.consume(v), e.exit(i), e.exit(a), e.exit(r), t) : (e.enter(u), e.enter(p.chunkString, { contentType: K.contentTypeString }), m(v));
|
|
8352
8352
|
}
|
|
8353
8353
|
function m(v) {
|
|
8354
|
-
return v === b.greaterThan ? (e.exit(p.chunkString), e.exit(u), h(v)) : v === b.eof || v === b.lessThan || te(v) ? n(v) : (e.consume(v), v === b.backslash ?
|
|
8354
|
+
return v === b.greaterThan ? (e.exit(p.chunkString), e.exit(u), h(v)) : v === b.eof || v === b.lessThan || te(v) ? n(v) : (e.consume(v), v === b.backslash ? S : m);
|
|
8355
8355
|
}
|
|
8356
|
-
function
|
|
8356
|
+
function S(v) {
|
|
8357
8357
|
return v === b.lessThan || v === b.greaterThan || v === b.backslash ? (e.consume(v), m) : m(v);
|
|
8358
8358
|
}
|
|
8359
8359
|
function _(v) {
|
|
@@ -8368,7 +8368,7 @@ function ac(e, t, n, r, a, i) {
|
|
|
8368
8368
|
let u = 0, c;
|
|
8369
8369
|
return l;
|
|
8370
8370
|
function l(m) {
|
|
8371
|
-
return
|
|
8371
|
+
return A(m === b.leftSquareBracket, "expected `[`"), e.enter(r), e.enter(a), e.consume(m), e.exit(a), e.enter(i), d;
|
|
8372
8372
|
}
|
|
8373
8373
|
function d(m) {
|
|
8374
8374
|
return u > K.linkReferenceSizeMax || m === b.eof || m === b.leftSquareBracket || m === b.rightSquareBracket && !c || // To do: remove in the future once we’ve switched from
|
|
@@ -8424,7 +8424,7 @@ function o0(e, t, n) {
|
|
|
8424
8424
|
return e.enter(p.definition), s(m);
|
|
8425
8425
|
}
|
|
8426
8426
|
function s(m) {
|
|
8427
|
-
return
|
|
8427
|
+
return A(m === b.leftSquareBracket, "expected `[`"), ac.call(
|
|
8428
8428
|
r,
|
|
8429
8429
|
e,
|
|
8430
8430
|
u,
|
|
@@ -8499,7 +8499,7 @@ const c0 = {
|
|
|
8499
8499
|
function l0(e, t, n) {
|
|
8500
8500
|
return r;
|
|
8501
8501
|
function r(i) {
|
|
8502
|
-
return
|
|
8502
|
+
return A(i === b.backslash, "expected `\\`"), e.enter(p.hardBreakEscape), e.consume(i), a;
|
|
8503
8503
|
}
|
|
8504
8504
|
function a(i) {
|
|
8505
8505
|
return te(i) ? (e.exit(p.hardBreakEscape), t(i)) : n(i);
|
|
@@ -8535,7 +8535,7 @@ function h0(e, t, n) {
|
|
|
8535
8535
|
return e.enter(p.atxHeading), i(d);
|
|
8536
8536
|
}
|
|
8537
8537
|
function i(d) {
|
|
8538
|
-
return
|
|
8538
|
+
return A(d === b.numberSign, "expected `#`"), e.enter(p.atxHeadingSequence), s(d);
|
|
8539
8539
|
}
|
|
8540
8540
|
function s(d) {
|
|
8541
8541
|
return d === b.numberSign && r++ < K.atxHeadingOpeningFenceSizeMax ? (e.consume(d), s) : d === b.eof || dt(d) ? (e.exit(p.atxHeadingSequence), u(d)) : n(d);
|
|
@@ -8636,20 +8636,20 @@ function T0(e, t, n) {
|
|
|
8636
8636
|
return d(x);
|
|
8637
8637
|
}
|
|
8638
8638
|
function d(x) {
|
|
8639
|
-
return
|
|
8639
|
+
return A(x === b.lessThan, "expected `<`"), e.enter(p.htmlFlow), e.enter(p.htmlFlowData), e.consume(x), f;
|
|
8640
8640
|
}
|
|
8641
8641
|
function f(x) {
|
|
8642
8642
|
return x === b.exclamationMark ? (e.consume(x), h) : x === b.slash ? (e.consume(x), i = !0, _) : x === b.questionMark ? (e.consume(x), a = K.htmlInstruction, r.interrupt ? t : g) : Mt(x) ? (e.consume(x), s = String.fromCharCode(x), O) : n(x);
|
|
8643
8643
|
}
|
|
8644
8644
|
function h(x) {
|
|
8645
|
-
return x === b.dash ? (e.consume(x), a = K.htmlComment, m) : x === b.leftSquareBracket ? (e.consume(x), a = K.htmlCdata, u = 0,
|
|
8645
|
+
return x === b.dash ? (e.consume(x), a = K.htmlComment, m) : x === b.leftSquareBracket ? (e.consume(x), a = K.htmlCdata, u = 0, S) : Mt(x) ? (e.consume(x), a = K.htmlDeclaration, r.interrupt ? t : g) : n(x);
|
|
8646
8646
|
}
|
|
8647
8647
|
function m(x) {
|
|
8648
8648
|
return x === b.dash ? (e.consume(x), r.interrupt ? t : g) : n(x);
|
|
8649
8649
|
}
|
|
8650
|
-
function
|
|
8650
|
+
function S(x) {
|
|
8651
8651
|
const Z = K.cdataOpeningString;
|
|
8652
|
-
return x === Z.charCodeAt(u++) ? (e.consume(x), u === Z.length ? r.interrupt ? t : ee :
|
|
8652
|
+
return x === Z.charCodeAt(u++) ? (e.consume(x), u === Z.length ? r.interrupt ? t : ee : S) : n(x);
|
|
8653
8653
|
}
|
|
8654
8654
|
function _(x) {
|
|
8655
8655
|
return Mt(x) ? (e.consume(x), s = String.fromCharCode(x), O) : n(x);
|
|
@@ -8695,7 +8695,7 @@ function T0(e, t, n) {
|
|
|
8695
8695
|
return x === b.eof || te(x) ? ee(x) : we(x) ? (e.consume(x), Te) : n(x);
|
|
8696
8696
|
}
|
|
8697
8697
|
function ee(x) {
|
|
8698
|
-
return x === b.dash && a === K.htmlComment ? (e.consume(x), fe) : x === b.lessThan && a === K.htmlRaw ? (e.consume(x), le) : x === b.greaterThan && a === K.htmlDeclaration ? (e.consume(x), Y) : x === b.questionMark && a === K.htmlInstruction ? (e.consume(x), g) : x === b.rightSquareBracket && a === K.htmlCdata ? (e.consume(x),
|
|
8698
|
+
return x === b.dash && a === K.htmlComment ? (e.consume(x), fe) : x === b.lessThan && a === K.htmlRaw ? (e.consume(x), le) : x === b.greaterThan && a === K.htmlDeclaration ? (e.consume(x), Y) : x === b.questionMark && a === K.htmlInstruction ? (e.consume(x), g) : x === b.rightSquareBracket && a === K.htmlCdata ? (e.consume(x), Fe) : te(x) && (a === K.htmlBasic || a === K.htmlComplete) ? (e.exit(p.htmlFlowData), e.check(
|
|
8699
8699
|
b0,
|
|
8700
8700
|
W,
|
|
8701
8701
|
B
|
|
@@ -8709,7 +8709,7 @@ function T0(e, t, n) {
|
|
|
8709
8709
|
)(x);
|
|
8710
8710
|
}
|
|
8711
8711
|
function F(x) {
|
|
8712
|
-
return
|
|
8712
|
+
return A(te(x)), e.enter(p.lineEnding), e.consume(x), e.exit(p.lineEnding), J;
|
|
8713
8713
|
}
|
|
8714
8714
|
function J(x) {
|
|
8715
8715
|
return x === b.eof || te(x) ? B(x) : (e.enter(p.htmlFlowData), ee(x));
|
|
@@ -8727,7 +8727,7 @@ function T0(e, t, n) {
|
|
|
8727
8727
|
}
|
|
8728
8728
|
return Mt(x) && s.length < K.htmlRawSizeMax ? (e.consume(x), s += String.fromCharCode(x), ye) : ee(x);
|
|
8729
8729
|
}
|
|
8730
|
-
function
|
|
8730
|
+
function Fe(x) {
|
|
8731
8731
|
return x === b.rightSquareBracket ? (e.consume(x), g) : ee(x);
|
|
8732
8732
|
}
|
|
8733
8733
|
function g(x) {
|
|
@@ -8753,7 +8753,7 @@ function x0(e, t, n) {
|
|
|
8753
8753
|
function y0(e, t, n) {
|
|
8754
8754
|
return r;
|
|
8755
8755
|
function r(a) {
|
|
8756
|
-
return
|
|
8756
|
+
return A(te(a), "expected a line ending"), e.enter(p.lineEnding), e.consume(a), e.exit(p.lineEnding), e.attempt(Jr, t, n);
|
|
8757
8757
|
}
|
|
8758
8758
|
}
|
|
8759
8759
|
const C0 = { name: "htmlText", tokenize: A0 };
|
|
@@ -8762,13 +8762,13 @@ function A0(e, t, n) {
|
|
|
8762
8762
|
let a, i, s;
|
|
8763
8763
|
return u;
|
|
8764
8764
|
function u(g) {
|
|
8765
|
-
return
|
|
8765
|
+
return A(g === b.lessThan, "expected `<`"), e.enter(p.htmlText), e.enter(p.htmlTextData), e.consume(g), c;
|
|
8766
8766
|
}
|
|
8767
8767
|
function c(g) {
|
|
8768
8768
|
return g === b.exclamationMark ? (e.consume(g), l) : g === b.slash ? (e.consume(g), R) : g === b.questionMark ? (e.consume(g), P) : Mt(g) ? (e.consume(g), be) : n(g);
|
|
8769
8769
|
}
|
|
8770
8770
|
function l(g) {
|
|
8771
|
-
return g === b.dash ? (e.consume(g), d) : g === b.leftSquareBracket ? (e.consume(g), i = 0,
|
|
8771
|
+
return g === b.dash ? (e.consume(g), d) : g === b.leftSquareBracket ? (e.consume(g), i = 0, S) : Mt(g) ? (e.consume(g), L) : n(g);
|
|
8772
8772
|
}
|
|
8773
8773
|
function d(g) {
|
|
8774
8774
|
return g === b.dash ? (e.consume(g), m) : n(g);
|
|
@@ -8782,9 +8782,9 @@ function A0(e, t, n) {
|
|
|
8782
8782
|
function m(g) {
|
|
8783
8783
|
return g === b.greaterThan ? fe(g) : g === b.dash ? h(g) : f(g);
|
|
8784
8784
|
}
|
|
8785
|
-
function
|
|
8785
|
+
function S(g) {
|
|
8786
8786
|
const Y = K.cdataOpeningString;
|
|
8787
|
-
return g === Y.charCodeAt(i++) ? (e.consume(g), i === Y.length ? _ :
|
|
8787
|
+
return g === Y.charCodeAt(i++) ? (e.consume(g), i === Y.length ? _ : S) : n(g);
|
|
8788
8788
|
}
|
|
8789
8789
|
function _(g) {
|
|
8790
8790
|
return g === b.eof ? n(g) : g === b.rightSquareBracket ? (e.consume(g), O) : te(g) ? (s = _, le(g)) : (e.consume(g), _);
|
|
@@ -8841,20 +8841,20 @@ function A0(e, t, n) {
|
|
|
8841
8841
|
return g === b.greaterThan ? (e.consume(g), e.exit(p.htmlTextData), e.exit(p.htmlText), t) : n(g);
|
|
8842
8842
|
}
|
|
8843
8843
|
function le(g) {
|
|
8844
|
-
return
|
|
8844
|
+
return A(s, "expected return state"), A(te(g), "expected eol"), e.exit(p.htmlTextData), e.enter(p.lineEnding), e.consume(g), e.exit(p.lineEnding), ye;
|
|
8845
8845
|
}
|
|
8846
8846
|
function ye(g) {
|
|
8847
|
-
return
|
|
8847
|
+
return A(
|
|
8848
8848
|
r.parser.constructs.disable.null,
|
|
8849
8849
|
"expected `disable.null` to be populated"
|
|
8850
8850
|
), we(g) ? Be(
|
|
8851
8851
|
e,
|
|
8852
|
-
|
|
8852
|
+
Fe,
|
|
8853
8853
|
p.linePrefix,
|
|
8854
8854
|
r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : K.tabSize
|
|
8855
|
-
)(g) :
|
|
8855
|
+
)(g) : Fe(g);
|
|
8856
8856
|
}
|
|
8857
|
-
function
|
|
8857
|
+
function Fe(g) {
|
|
8858
8858
|
return e.enter(p.htmlTextData), s(g);
|
|
8859
8859
|
}
|
|
8860
8860
|
}
|
|
@@ -8885,7 +8885,7 @@ function I0(e, t) {
|
|
|
8885
8885
|
break;
|
|
8886
8886
|
}
|
|
8887
8887
|
} else a.type === p.labelEnd && (s = n);
|
|
8888
|
-
|
|
8888
|
+
A(i !== void 0, "`open` is supposed to be found"), A(s !== void 0, "`close` is supposed to be found");
|
|
8889
8889
|
const c = {
|
|
8890
8890
|
type: e[i][1].type === p.labelLink ? p.link : p.image,
|
|
8891
8891
|
start: Object.assign({}, e[i][1].start),
|
|
@@ -8902,7 +8902,7 @@ function I0(e, t) {
|
|
|
8902
8902
|
return u = [
|
|
8903
8903
|
["enter", c, t],
|
|
8904
8904
|
["enter", l, t]
|
|
8905
|
-
], u = gt(u, e.slice(i + 1, i + r + 3)), u = gt(u, [["enter", d, t]]),
|
|
8905
|
+
], u = gt(u, e.slice(i + 1, i + r + 3)), u = gt(u, [["enter", d, t]]), A(
|
|
8906
8906
|
t.parser.constructs.insideSpan.null,
|
|
8907
8907
|
"expected `insideSpan.null` to be populated"
|
|
8908
8908
|
), u = gt(
|
|
@@ -8929,7 +8929,7 @@ function w0(e, t, n) {
|
|
|
8929
8929
|
}
|
|
8930
8930
|
return u;
|
|
8931
8931
|
function u(h) {
|
|
8932
|
-
return
|
|
8932
|
+
return A(h === b.rightSquareBracket, "expected `]`"), i ? i._inactive ? f(h) : (s = r.parser.defined.includes(
|
|
8933
8933
|
Nn(
|
|
8934
8934
|
r.sliceSerialize({ start: i.end, end: r.now() })
|
|
8935
8935
|
)
|
|
@@ -8963,7 +8963,7 @@ function w0(e, t, n) {
|
|
|
8963
8963
|
function R0(e, t, n) {
|
|
8964
8964
|
return r;
|
|
8965
8965
|
function r(f) {
|
|
8966
|
-
return
|
|
8966
|
+
return A(f === b.leftParenthesis, "expected left paren"), e.enter(p.resource), e.enter(p.resourceMarker), e.consume(f), e.exit(p.resourceMarker), a;
|
|
8967
8967
|
}
|
|
8968
8968
|
function a(f) {
|
|
8969
8969
|
return dt(f) ? qn(e, i)(f) : i(f);
|
|
@@ -9008,7 +9008,7 @@ function O0(e, t, n) {
|
|
|
9008
9008
|
const r = this;
|
|
9009
9009
|
return a;
|
|
9010
9010
|
function a(u) {
|
|
9011
|
-
return
|
|
9011
|
+
return A(u === b.leftSquareBracket, "expected left bracket"), ac.call(
|
|
9012
9012
|
r,
|
|
9013
9013
|
e,
|
|
9014
9014
|
i,
|
|
@@ -9032,7 +9032,7 @@ function O0(e, t, n) {
|
|
|
9032
9032
|
function L0(e, t, n) {
|
|
9033
9033
|
return r;
|
|
9034
9034
|
function r(i) {
|
|
9035
|
-
return
|
|
9035
|
+
return A(i === b.leftSquareBracket, "expected left bracket"), e.enter(p.reference), e.enter(p.referenceMarker), e.consume(i), e.exit(p.referenceMarker), a;
|
|
9036
9036
|
}
|
|
9037
9037
|
function a(i) {
|
|
9038
9038
|
return i === b.rightSquareBracket ? (e.enter(p.referenceMarker), e.consume(i), e.exit(p.referenceMarker), e.exit(p.reference), t) : n(i);
|
|
@@ -9047,7 +9047,7 @@ function k0(e, t, n) {
|
|
|
9047
9047
|
const r = this;
|
|
9048
9048
|
return a;
|
|
9049
9049
|
function a(u) {
|
|
9050
|
-
return
|
|
9050
|
+
return A(u === b.exclamationMark, "expected `!`"), e.enter(p.labelImage), e.enter(p.labelImageMarker), e.consume(u), e.exit(p.labelImageMarker), i;
|
|
9051
9051
|
}
|
|
9052
9052
|
function i(u) {
|
|
9053
9053
|
return u === b.leftSquareBracket ? (e.enter(p.labelMarker), e.consume(u), e.exit(p.labelMarker), e.exit(p.labelImage), s) : n(u);
|
|
@@ -9065,7 +9065,7 @@ function M0(e, t, n) {
|
|
|
9065
9065
|
const r = this;
|
|
9066
9066
|
return a;
|
|
9067
9067
|
function a(s) {
|
|
9068
|
-
return
|
|
9068
|
+
return A(s === b.leftSquareBracket, "expected `[`"), e.enter(p.labelLink), e.enter(p.labelMarker), e.consume(s), e.exit(p.labelMarker), e.exit(p.labelLink), i;
|
|
9069
9069
|
}
|
|
9070
9070
|
function i(s) {
|
|
9071
9071
|
return s === b.caret && "_hiddenFootnoteSupport" in r.parser.constructs ? n(s) : t(s);
|
|
@@ -9075,7 +9075,7 @@ const Ca = { name: "lineEnding", tokenize: B0 };
|
|
|
9075
9075
|
function B0(e, t) {
|
|
9076
9076
|
return n;
|
|
9077
9077
|
function n(r) {
|
|
9078
|
-
return
|
|
9078
|
+
return A(te(r), "expected eol"), e.enter(p.lineEnding), e.consume(r), e.exit(p.lineEnding), Be(e, t, p.linePrefix);
|
|
9079
9079
|
}
|
|
9080
9080
|
}
|
|
9081
9081
|
const Or = {
|
|
@@ -9089,7 +9089,7 @@ function F0(e, t, n) {
|
|
|
9089
9089
|
return e.enter(p.thematicBreak), s(l);
|
|
9090
9090
|
}
|
|
9091
9091
|
function s(l) {
|
|
9092
|
-
return
|
|
9092
|
+
return A(
|
|
9093
9093
|
l === b.asterisk || l === b.dash || l === b.underscore,
|
|
9094
9094
|
"expected `*`, `-`, or `_`"
|
|
9095
9095
|
), a = l, u(l);
|
|
@@ -9115,10 +9115,10 @@ function j0(e, t, n) {
|
|
|
9115
9115
|
let i = a && a[1].type === p.linePrefix ? a[2].sliceSerialize(a[1], !0).length : 0, s = 0;
|
|
9116
9116
|
return u;
|
|
9117
9117
|
function u(m) {
|
|
9118
|
-
|
|
9119
|
-
const
|
|
9120
|
-
if (
|
|
9121
|
-
if (r.containerState.type || (r.containerState.type =
|
|
9118
|
+
A(r.containerState, "expected state");
|
|
9119
|
+
const S = r.containerState.type || (m === b.asterisk || m === b.plusSign || m === b.dash ? p.listUnordered : p.listOrdered);
|
|
9120
|
+
if (S === p.listUnordered ? !r.containerState.marker || m === r.containerState.marker : ii(m)) {
|
|
9121
|
+
if (r.containerState.type || (r.containerState.type = S, e.enter(S, { _container: !0 })), S === p.listUnordered)
|
|
9122
9122
|
return e.enter(p.listItemPrefix), m === b.asterisk || m === b.dash ? e.check(Or, n, l)(m) : l(m);
|
|
9123
9123
|
if (!r.interrupt || m === b.digit1)
|
|
9124
9124
|
return e.enter(p.listItemPrefix), e.enter(p.listItemValue), c(m);
|
|
@@ -9126,10 +9126,10 @@ function j0(e, t, n) {
|
|
|
9126
9126
|
return n(m);
|
|
9127
9127
|
}
|
|
9128
9128
|
function c(m) {
|
|
9129
|
-
return
|
|
9129
|
+
return A(r.containerState, "expected state"), ii(m) && ++s < K.listItemValueSizeMax ? (e.consume(m), c) : (!r.interrupt || s < 2) && (r.containerState.marker ? m === r.containerState.marker : m === b.rightParenthesis || m === b.dot) ? (e.exit(p.listItemValue), l(m)) : n(m);
|
|
9130
9130
|
}
|
|
9131
9131
|
function l(m) {
|
|
9132
|
-
return
|
|
9132
|
+
return A(r.containerState, "expected state"), A(m !== b.eof, "eof (`null`) is not a marker"), e.enter(p.listItemMarker), e.consume(m), e.exit(p.listItemMarker), r.containerState.marker = r.containerState.marker || m, e.check(
|
|
9133
9133
|
Jr,
|
|
9134
9134
|
// Can’t be empty when interrupting.
|
|
9135
9135
|
r.interrupt ? n : d,
|
|
@@ -9141,20 +9141,20 @@ function j0(e, t, n) {
|
|
|
9141
9141
|
);
|
|
9142
9142
|
}
|
|
9143
9143
|
function d(m) {
|
|
9144
|
-
return
|
|
9144
|
+
return A(r.containerState, "expected state"), r.containerState.initialBlankLine = !0, i++, h(m);
|
|
9145
9145
|
}
|
|
9146
9146
|
function f(m) {
|
|
9147
9147
|
return we(m) ? (e.enter(p.listItemPrefixWhitespace), e.consume(m), e.exit(p.listItemPrefixWhitespace), h) : n(m);
|
|
9148
9148
|
}
|
|
9149
9149
|
function h(m) {
|
|
9150
|
-
return
|
|
9150
|
+
return A(r.containerState, "expected state"), r.containerState.size = i + r.sliceSerialize(e.exit(p.listItemPrefix), !0).length, t(m);
|
|
9151
9151
|
}
|
|
9152
9152
|
}
|
|
9153
9153
|
function V0(e, t, n) {
|
|
9154
9154
|
const r = this;
|
|
9155
|
-
return
|
|
9155
|
+
return A(r.containerState, "expected state"), r.containerState._closeFlow = void 0, e.check(Jr, a, i);
|
|
9156
9156
|
function a(u) {
|
|
9157
|
-
return
|
|
9157
|
+
return A(r.containerState, "expected state"), A(typeof r.containerState.size == "number", "expected size"), r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, Be(
|
|
9158
9158
|
e,
|
|
9159
9159
|
t,
|
|
9160
9160
|
p.listItemIndent,
|
|
@@ -9162,10 +9162,10 @@ function V0(e, t, n) {
|
|
|
9162
9162
|
)(u);
|
|
9163
9163
|
}
|
|
9164
9164
|
function i(u) {
|
|
9165
|
-
return
|
|
9165
|
+
return A(r.containerState, "expected state"), r.containerState.furtherBlankLines || !we(u) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, s(u)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(U0, t, s)(u));
|
|
9166
9166
|
}
|
|
9167
9167
|
function s(u) {
|
|
9168
|
-
return
|
|
9168
|
+
return A(r.containerState, "expected state"), r.containerState._closeFlow = !0, r.interrupt = void 0, A(
|
|
9169
9169
|
r.parser.constructs.disable.null,
|
|
9170
9170
|
"expected `disable.null` to be populated"
|
|
9171
9171
|
), Be(
|
|
@@ -9178,24 +9178,24 @@ function V0(e, t, n) {
|
|
|
9178
9178
|
}
|
|
9179
9179
|
function z0(e, t, n) {
|
|
9180
9180
|
const r = this;
|
|
9181
|
-
return
|
|
9181
|
+
return A(r.containerState, "expected state"), A(typeof r.containerState.size == "number", "expected size"), Be(
|
|
9182
9182
|
e,
|
|
9183
9183
|
a,
|
|
9184
9184
|
p.listItemIndent,
|
|
9185
9185
|
r.containerState.size + 1
|
|
9186
9186
|
);
|
|
9187
9187
|
function a(i) {
|
|
9188
|
-
|
|
9188
|
+
A(r.containerState, "expected state");
|
|
9189
9189
|
const s = r.events[r.events.length - 1];
|
|
9190
9190
|
return s && s[1].type === p.listItemIndent && s[2].sliceSerialize(s[1], !0).length === r.containerState.size ? t(i) : n(i);
|
|
9191
9191
|
}
|
|
9192
9192
|
}
|
|
9193
9193
|
function $0(e) {
|
|
9194
|
-
|
|
9194
|
+
A(this.containerState, "expected state"), A(typeof this.containerState.type == "string", "expected type"), e.exit(this.containerState.type);
|
|
9195
9195
|
}
|
|
9196
9196
|
function Y0(e, t, n) {
|
|
9197
9197
|
const r = this;
|
|
9198
|
-
return
|
|
9198
|
+
return A(
|
|
9199
9199
|
r.parser.constructs.disable.null,
|
|
9200
9200
|
"expected `disable.null` to be populated"
|
|
9201
9201
|
), Be(
|
|
@@ -9225,7 +9225,7 @@ function G0(e, t) {
|
|
|
9225
9225
|
e[n][1].type === p.paragraph && (a = n);
|
|
9226
9226
|
} else
|
|
9227
9227
|
e[n][1].type === p.content && e.splice(n, 1), !i && e[n][1].type === p.definition && (i = n);
|
|
9228
|
-
|
|
9228
|
+
A(a !== void 0, "expected a `text` index to be found"), A(r !== void 0, "expected a `text` index to be found");
|
|
9229
9229
|
const s = {
|
|
9230
9230
|
type: p.setextHeading,
|
|
9231
9231
|
start: Object.assign({}, e[a][1].start),
|
|
@@ -9239,7 +9239,7 @@ function q0(e, t, n) {
|
|
|
9239
9239
|
return i;
|
|
9240
9240
|
function i(l) {
|
|
9241
9241
|
let d = r.events.length, f;
|
|
9242
|
-
for (
|
|
9242
|
+
for (A(
|
|
9243
9243
|
l === b.dash || l === b.equalsTo,
|
|
9244
9244
|
"expected `=` or `-`"
|
|
9245
9245
|
); d--; )
|
|
@@ -9282,7 +9282,7 @@ function X0(e) {
|
|
|
9282
9282
|
);
|
|
9283
9283
|
return n;
|
|
9284
9284
|
function r(i) {
|
|
9285
|
-
if (
|
|
9285
|
+
if (A(
|
|
9286
9286
|
i === b.eof || te(i),
|
|
9287
9287
|
"expected eol or eof"
|
|
9288
9288
|
), i === b.eof) {
|
|
@@ -9292,7 +9292,7 @@ function X0(e) {
|
|
|
9292
9292
|
return e.enter(p.lineEndingBlank), e.consume(i), e.exit(p.lineEndingBlank), t.currentConstruct = void 0, n;
|
|
9293
9293
|
}
|
|
9294
9294
|
function a(i) {
|
|
9295
|
-
if (
|
|
9295
|
+
if (A(
|
|
9296
9296
|
i === b.eof || te(i),
|
|
9297
9297
|
"expected eol or eof"
|
|
9298
9298
|
), i === b.eof) {
|
|
@@ -9332,7 +9332,7 @@ function sc(e) {
|
|
|
9332
9332
|
const f = a[d];
|
|
9333
9333
|
let h = -1;
|
|
9334
9334
|
if (f)
|
|
9335
|
-
for (
|
|
9335
|
+
for (A(Array.isArray(f), "expected `disable.null` to be populated"); ++h < f.length; ) {
|
|
9336
9336
|
const m = f[h];
|
|
9337
9337
|
if (!m.previous || m.previous.call(r, r.previous))
|
|
9338
9338
|
return !0;
|
|
@@ -9470,8 +9470,8 @@ function em() {
|
|
|
9470
9470
|
return f >= r ? l(d, f, r, "day") : f >= n ? l(d, f, n, "hour") : f >= t ? l(d, f, t, "minute") : f >= e ? l(d, f, e, "second") : d + " ms";
|
|
9471
9471
|
}
|
|
9472
9472
|
function l(d, f, h, m) {
|
|
9473
|
-
var
|
|
9474
|
-
return Math.round(d / h) + " " + m + (
|
|
9473
|
+
var S = f >= h * 1.5;
|
|
9474
|
+
return Math.round(d / h) + " " + m + (S ? "s" : "");
|
|
9475
9475
|
}
|
|
9476
9476
|
return Aa;
|
|
9477
9477
|
}
|
|
@@ -9491,7 +9491,7 @@ function tm() {
|
|
|
9491
9491
|
}
|
|
9492
9492
|
r.selectColor = n;
|
|
9493
9493
|
function r(f) {
|
|
9494
|
-
let h, m = null,
|
|
9494
|
+
let h, m = null, S, _;
|
|
9495
9495
|
function O(...v) {
|
|
9496
9496
|
if (!O.enabled)
|
|
9497
9497
|
return;
|
|
@@ -9513,7 +9513,7 @@ function tm() {
|
|
|
9513
9513
|
return O.namespace = f, O.useColors = r.useColors(), O.color = r.selectColor(f), O.extend = a, O.destroy = r.destroy, Object.defineProperty(O, "enabled", {
|
|
9514
9514
|
enumerable: !0,
|
|
9515
9515
|
configurable: !1,
|
|
9516
|
-
get: () => m !== null ? m : (
|
|
9516
|
+
get: () => m !== null ? m : (S !== r.namespaces && (S = r.namespaces, _ = r.enabled(f)), _),
|
|
9517
9517
|
set: (v) => {
|
|
9518
9518
|
m = v;
|
|
9519
9519
|
}
|
|
@@ -9530,17 +9530,17 @@ function tm() {
|
|
|
9530
9530
|
m[0] === "-" ? r.skips.push(m.slice(1)) : r.names.push(m);
|
|
9531
9531
|
}
|
|
9532
9532
|
function s(f, h) {
|
|
9533
|
-
let m = 0,
|
|
9533
|
+
let m = 0, S = 0, _ = -1, O = 0;
|
|
9534
9534
|
for (; m < f.length; )
|
|
9535
|
-
if (
|
|
9536
|
-
h[
|
|
9535
|
+
if (S < h.length && (h[S] === f[m] || h[S] === "*"))
|
|
9536
|
+
h[S] === "*" ? (_ = S, O = m, S++) : (m++, S++);
|
|
9537
9537
|
else if (_ !== -1)
|
|
9538
|
-
|
|
9538
|
+
S = _ + 1, O++, m = O;
|
|
9539
9539
|
else
|
|
9540
9540
|
return !1;
|
|
9541
|
-
for (;
|
|
9542
|
-
|
|
9543
|
-
return
|
|
9541
|
+
for (; S < h.length && h[S] === "*"; )
|
|
9542
|
+
S++;
|
|
9543
|
+
return S === h.length;
|
|
9544
9544
|
}
|
|
9545
9545
|
function u() {
|
|
9546
9546
|
const f = [
|
|
@@ -9732,7 +9732,7 @@ function im(e, t, n) {
|
|
|
9732
9732
|
events: [],
|
|
9733
9733
|
parser: e,
|
|
9734
9734
|
sliceStream: _,
|
|
9735
|
-
sliceSerialize:
|
|
9735
|
+
sliceSerialize: S,
|
|
9736
9736
|
now: O,
|
|
9737
9737
|
defineSkip: v,
|
|
9738
9738
|
write: m
|
|
@@ -9742,7 +9742,7 @@ function im(e, t, n) {
|
|
|
9742
9742
|
function m(B) {
|
|
9743
9743
|
return s = gt(s, B), L(), s[s.length - 1] !== b.eof ? [] : (q(t, 0), d.events = Li(i, d.events, d), d.events);
|
|
9744
9744
|
}
|
|
9745
|
-
function
|
|
9745
|
+
function S(B, F) {
|
|
9746
9746
|
return om(_(B), F);
|
|
9747
9747
|
}
|
|
9748
9748
|
function _(B) {
|
|
@@ -9767,25 +9767,25 @@ function im(e, t, n) {
|
|
|
9767
9767
|
}
|
|
9768
9768
|
}
|
|
9769
9769
|
function P(B) {
|
|
9770
|
-
|
|
9770
|
+
A(c === !0, "expected character to be consumed"), c = void 0, rn("main: passing `%s` to %s", B, f && f.name), h = B, A(typeof f == "function", "expected state"), f = f(B);
|
|
9771
9771
|
}
|
|
9772
9772
|
function j(B) {
|
|
9773
|
-
|
|
9773
|
+
A(B === h, "expected given code to equal expected code"), rn("consume: `%s`", B), A(
|
|
9774
9774
|
c === void 0,
|
|
9775
9775
|
"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"
|
|
9776
|
-
),
|
|
9776
|
+
), A(
|
|
9777
9777
|
B === null ? d.events.length === 0 || d.events[d.events.length - 1][0] === "exit" : d.events[d.events.length - 1][0] === "enter",
|
|
9778
9778
|
"expected last token to be open"
|
|
9779
9779
|
), te(B) ? (r.line++, r.column = 1, r.offset += B === b.carriageReturnLineFeed ? 2 : 1, ee(), rn("position: after eol: `%j`", r)) : B !== b.virtualSpace && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === s[r._index].length && (r._bufferIndex = -1, r._index++)), d.previous = B, c = !0;
|
|
9780
9780
|
}
|
|
9781
9781
|
function R(B, F) {
|
|
9782
9782
|
const J = F || {};
|
|
9783
|
-
return J.type = B, J.start = O(),
|
|
9783
|
+
return J.type = B, J.start = O(), A(typeof B == "string", "expected string type"), A(B.length > 0, "expected non-empty string"), rn("enter: `%s`", B), d.events.push(["enter", J, d]), u.push(J), J;
|
|
9784
9784
|
}
|
|
9785
9785
|
function D(B) {
|
|
9786
|
-
|
|
9786
|
+
A(typeof B == "string", "expected string type"), A(B.length > 0, "expected non-empty string");
|
|
9787
9787
|
const F = u.pop();
|
|
9788
|
-
return
|
|
9788
|
+
return A(F, "cannot close w/o open tokens"), F.end = O(), A(B === F.type, "expected exit token to match current token"), A(
|
|
9789
9789
|
!(F.start._index === F.end._index && F.start._bufferIndex === F.end._bufferIndex),
|
|
9790
9790
|
"expected non-empty token (`" + B + "`)"
|
|
9791
9791
|
), rn("exit: `%s`", F.type), d.events.push(["exit", F, d]), F;
|
|
@@ -9799,7 +9799,7 @@ function im(e, t, n) {
|
|
|
9799
9799
|
function oe(B, F) {
|
|
9800
9800
|
return J;
|
|
9801
9801
|
function J(fe, le, ye) {
|
|
9802
|
-
let
|
|
9802
|
+
let Fe, g, Y, W;
|
|
9803
9803
|
return Array.isArray(fe) ? (
|
|
9804
9804
|
/* c8 ignore next 1 */
|
|
9805
9805
|
Z(fe)
|
|
@@ -9810,22 +9810,22 @@ function im(e, t, n) {
|
|
|
9810
9810
|
function x(Q) {
|
|
9811
9811
|
return ce;
|
|
9812
9812
|
function ce(ue) {
|
|
9813
|
-
const ke = ue !== null && Q[ue], $ = ue !== null && Q.null,
|
|
9813
|
+
const ke = ue !== null && Q[ue], $ = ue !== null && Q.null, He = [
|
|
9814
9814
|
// To do: add more extension tests.
|
|
9815
9815
|
/* c8 ignore next 2 */
|
|
9816
9816
|
...Array.isArray(ke) ? ke : ke ? [ke] : [],
|
|
9817
9817
|
...Array.isArray($) ? $ : $ ? [$] : []
|
|
9818
9818
|
];
|
|
9819
|
-
return Z(
|
|
9819
|
+
return Z(He)(ue);
|
|
9820
9820
|
}
|
|
9821
9821
|
}
|
|
9822
9822
|
function Z(Q) {
|
|
9823
|
-
return
|
|
9823
|
+
return Fe = Q, g = 0, Q.length === 0 ? (A(ye, "expected `bogusState` to be given"), ye) : ae(Q[g]);
|
|
9824
9824
|
}
|
|
9825
9825
|
function ae(Q) {
|
|
9826
9826
|
return ce;
|
|
9827
9827
|
function ce(ue) {
|
|
9828
|
-
return W = Te(), Y = Q, Q.partial || (d.currentConstruct = Q),
|
|
9828
|
+
return W = Te(), Y = Q, Q.partial || (d.currentConstruct = Q), A(
|
|
9829
9829
|
d.parser.constructs.disable.null,
|
|
9830
9830
|
"expected `disable.null` to be populated"
|
|
9831
9831
|
), Q.name && d.parser.constructs.disable.null.includes(Q.name) ? ie(ue) : Q.tokenize.call(
|
|
@@ -9840,10 +9840,10 @@ function im(e, t, n) {
|
|
|
9840
9840
|
}
|
|
9841
9841
|
}
|
|
9842
9842
|
function se(Q) {
|
|
9843
|
-
return
|
|
9843
|
+
return A(Q === h, "expected code"), c = !0, B(Y, W), le;
|
|
9844
9844
|
}
|
|
9845
9845
|
function ie(Q) {
|
|
9846
|
-
return
|
|
9846
|
+
return A(Q === h, "expected code"), c = !0, W.restore(), ++g < Fe.length ? ae(Fe[g]) : ye;
|
|
9847
9847
|
}
|
|
9848
9848
|
}
|
|
9849
9849
|
}
|
|
@@ -9853,7 +9853,7 @@ function im(e, t, n) {
|
|
|
9853
9853
|
F,
|
|
9854
9854
|
d.events.length - F,
|
|
9855
9855
|
B.resolve(d.events.slice(F), d)
|
|
9856
|
-
), B.resolveTo && (d.events = B.resolveTo(d.events, d)),
|
|
9856
|
+
), B.resolveTo && (d.events = B.resolveTo(d.events, d)), A(
|
|
9857
9857
|
B.partial || d.events.length === 0 || d.events[d.events.length - 1][0] === "exit",
|
|
9858
9858
|
"expected last token to end"
|
|
9859
9859
|
);
|
|
@@ -9873,11 +9873,11 @@ function sm(e, t) {
|
|
|
9873
9873
|
const n = t.start._index, r = t.start._bufferIndex, a = t.end._index, i = t.end._bufferIndex;
|
|
9874
9874
|
let s;
|
|
9875
9875
|
if (n === a)
|
|
9876
|
-
|
|
9876
|
+
A(i > -1, "expected non-negative end buffer index"), A(r > -1, "expected non-negative start buffer index"), s = [e[n].slice(r, i)];
|
|
9877
9877
|
else {
|
|
9878
9878
|
if (s = e.slice(n, a), r > -1) {
|
|
9879
9879
|
const u = s[0];
|
|
9880
|
-
typeof u == "string" ? s[0] = u.slice(r) : (
|
|
9880
|
+
typeof u == "string" ? s[0] = u.slice(r) : (A(r === 0, "expected `startBufferIndex` to be `0`"), s.shift());
|
|
9881
9881
|
}
|
|
9882
9882
|
i > 0 && s.push(e[a].slice(0, i));
|
|
9883
9883
|
}
|
|
@@ -9916,7 +9916,7 @@ function om(e, t) {
|
|
|
9916
9916
|
break;
|
|
9917
9917
|
}
|
|
9918
9918
|
default:
|
|
9919
|
-
|
|
9919
|
+
A(typeof i == "number", "expected number"), s = String.fromCharCode(i);
|
|
9920
9920
|
}
|
|
9921
9921
|
a = i === b.horizontalTab, r.push(s);
|
|
9922
9922
|
}
|
|
@@ -10091,7 +10091,7 @@ function _m(e) {
|
|
|
10091
10091
|
definitionDestinationString: s,
|
|
10092
10092
|
definitionLabelString: s,
|
|
10093
10093
|
definitionTitleString: s,
|
|
10094
|
-
emphasis: i(
|
|
10094
|
+
emphasis: i(He),
|
|
10095
10095
|
hardBreakEscape: i(Je),
|
|
10096
10096
|
hardBreakTrailing: i(Je),
|
|
10097
10097
|
htmlFlow: i(mt, s),
|
|
@@ -10112,7 +10112,7 @@ function _m(e) {
|
|
|
10112
10112
|
resourceTitleString: s,
|
|
10113
10113
|
setextHeading: i(We),
|
|
10114
10114
|
strong: i(Ne),
|
|
10115
|
-
thematicBreak: i(
|
|
10115
|
+
thematicBreak: i(Ue)
|
|
10116
10116
|
},
|
|
10117
10117
|
exit: {
|
|
10118
10118
|
atxHeading: c(),
|
|
@@ -10128,7 +10128,7 @@ function _m(e) {
|
|
|
10128
10128
|
codeFenced: c(O),
|
|
10129
10129
|
codeFencedFence: _,
|
|
10130
10130
|
codeFencedFenceInfo: m,
|
|
10131
|
-
codeFencedFenceMeta:
|
|
10131
|
+
codeFencedFenceMeta: S,
|
|
10132
10132
|
codeFlowValue: q,
|
|
10133
10133
|
codeIndented: c(v),
|
|
10134
10134
|
codeText: c(J),
|
|
@@ -10146,7 +10146,7 @@ function _m(e) {
|
|
|
10146
10146
|
htmlText: c(F),
|
|
10147
10147
|
htmlTextData: q,
|
|
10148
10148
|
image: c(le),
|
|
10149
|
-
label:
|
|
10149
|
+
label: Fe,
|
|
10150
10150
|
labelText: ye,
|
|
10151
10151
|
lineEnding: Te,
|
|
10152
10152
|
link: c(fe),
|
|
@@ -10187,7 +10187,7 @@ function _m(e) {
|
|
|
10187
10187
|
me.push(Se);
|
|
10188
10188
|
else {
|
|
10189
10189
|
const nt = me.pop();
|
|
10190
|
-
|
|
10190
|
+
A(typeof nt == "number", "expected list ot be open"), Se = a(I, nt, Se);
|
|
10191
10191
|
}
|
|
10192
10192
|
for (Se = -1; ++Se < I.length; ) {
|
|
10193
10193
|
const nt = t[I[Se][0]];
|
|
@@ -10278,7 +10278,7 @@ function _m(e) {
|
|
|
10278
10278
|
}
|
|
10279
10279
|
function u(I, w, G) {
|
|
10280
10280
|
const me = this.stack[this.stack.length - 1];
|
|
10281
|
-
|
|
10281
|
+
A(me, "expected `parent`"), A("children" in me, "expected `parent`"), me.children.push(I), this.stack.push(I), this.tokenStack.push([w, G]), I.position = {
|
|
10282
10282
|
start: $t(w.start),
|
|
10283
10283
|
// @ts-expect-error: `end` will be patched later.
|
|
10284
10284
|
end: void 0
|
|
@@ -10292,14 +10292,14 @@ function _m(e) {
|
|
|
10292
10292
|
}
|
|
10293
10293
|
function l(I, w) {
|
|
10294
10294
|
const G = this.stack.pop();
|
|
10295
|
-
|
|
10295
|
+
A(G, "expected `node`");
|
|
10296
10296
|
const me = this.tokenStack.pop();
|
|
10297
10297
|
if (me)
|
|
10298
10298
|
me[0].type !== I.type && (w ? w.call(this, I, me[0]) : (me[1] || Ks).call(this, I, me[0]));
|
|
10299
10299
|
else throw new Error(
|
|
10300
10300
|
"Cannot close `" + I.type + "` (" + Gn({ start: I.start, end: I.end }) + "): it’s not open"
|
|
10301
10301
|
);
|
|
10302
|
-
|
|
10302
|
+
A(G.type !== "fragment", "unexpected fragment `exit`ed"), A(G.position, "expected `position` to be defined"), G.position.end = $t(I.end);
|
|
10303
10303
|
}
|
|
10304
10304
|
function d() {
|
|
10305
10305
|
return xh(this.stack.pop());
|
|
@@ -10310,7 +10310,7 @@ function _m(e) {
|
|
|
10310
10310
|
function h(I) {
|
|
10311
10311
|
if (this.data.expectingFirstListItemValue) {
|
|
10312
10312
|
const w = this.stack[this.stack.length - 2];
|
|
10313
|
-
|
|
10313
|
+
A(w, "expected nodes on stack"), A(w.type === "list", "expected list on stack"), w.start = Number.parseInt(
|
|
10314
10314
|
this.sliceSerialize(I),
|
|
10315
10315
|
K.numericBaseDecimal
|
|
10316
10316
|
), this.data.expectingFirstListItemValue = void 0;
|
|
@@ -10318,42 +10318,42 @@ function _m(e) {
|
|
|
10318
10318
|
}
|
|
10319
10319
|
function m() {
|
|
10320
10320
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10321
|
-
|
|
10321
|
+
A(w, "expected node on stack"), A(w.type === "code", "expected code on stack"), w.lang = I;
|
|
10322
10322
|
}
|
|
10323
|
-
function
|
|
10323
|
+
function S() {
|
|
10324
10324
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10325
|
-
|
|
10325
|
+
A(w, "expected node on stack"), A(w.type === "code", "expected code on stack"), w.meta = I;
|
|
10326
10326
|
}
|
|
10327
10327
|
function _() {
|
|
10328
10328
|
this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
|
|
10329
10329
|
}
|
|
10330
10330
|
function O() {
|
|
10331
10331
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10332
|
-
|
|
10332
|
+
A(w, "expected node on stack"), A(w.type === "code", "expected code on stack"), w.value = I.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
|
|
10333
10333
|
}
|
|
10334
10334
|
function v() {
|
|
10335
10335
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10336
|
-
|
|
10336
|
+
A(w, "expected node on stack"), A(w.type === "code", "expected code on stack"), w.value = I.replace(/(\r?\n|\r)$/g, "");
|
|
10337
10337
|
}
|
|
10338
10338
|
function L(I) {
|
|
10339
10339
|
const w = this.resume(), G = this.stack[this.stack.length - 1];
|
|
10340
|
-
|
|
10340
|
+
A(G, "expected node on stack"), A(G.type === "definition", "expected definition on stack"), G.label = w, G.identifier = Nn(
|
|
10341
10341
|
this.sliceSerialize(I)
|
|
10342
10342
|
).toLowerCase();
|
|
10343
10343
|
}
|
|
10344
10344
|
function P() {
|
|
10345
10345
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10346
|
-
|
|
10346
|
+
A(w, "expected node on stack"), A(w.type === "definition", "expected definition on stack"), w.title = I;
|
|
10347
10347
|
}
|
|
10348
10348
|
function j() {
|
|
10349
10349
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10350
|
-
|
|
10350
|
+
A(w, "expected node on stack"), A(w.type === "definition", "expected definition on stack"), w.url = I;
|
|
10351
10351
|
}
|
|
10352
10352
|
function R(I) {
|
|
10353
10353
|
const w = this.stack[this.stack.length - 1];
|
|
10354
|
-
if (
|
|
10354
|
+
if (A(w, "expected node on stack"), A(w.type === "heading", "expected heading on stack"), !w.depth) {
|
|
10355
10355
|
const G = this.sliceSerialize(I).length;
|
|
10356
|
-
|
|
10356
|
+
A(
|
|
10357
10357
|
G === 1 || G === 2 || G === 3 || G === 4 || G === 5 || G === 6,
|
|
10358
10358
|
"expected `depth` between `1` and `6`"
|
|
10359
10359
|
), w.depth = G;
|
|
@@ -10364,14 +10364,14 @@ function _m(e) {
|
|
|
10364
10364
|
}
|
|
10365
10365
|
function re(I) {
|
|
10366
10366
|
const w = this.stack[this.stack.length - 1];
|
|
10367
|
-
|
|
10367
|
+
A(w, "expected node on stack"), A(w.type === "heading", "expected heading on stack"), w.depth = this.sliceSerialize(I).codePointAt(0) === b.equalsTo ? 1 : 2;
|
|
10368
10368
|
}
|
|
10369
10369
|
function be() {
|
|
10370
10370
|
this.data.setextHeadingSlurpLineEnding = void 0;
|
|
10371
10371
|
}
|
|
10372
10372
|
function oe(I) {
|
|
10373
10373
|
const w = this.stack[this.stack.length - 1];
|
|
10374
|
-
|
|
10374
|
+
A(w, "expected node on stack"), A("children" in w, "expected parent on stack");
|
|
10375
10375
|
const G = w.children;
|
|
10376
10376
|
let me = G[G.length - 1];
|
|
10377
10377
|
(!me || me.type !== "text") && (me = Ie(), me.position = {
|
|
@@ -10382,14 +10382,14 @@ function _m(e) {
|
|
|
10382
10382
|
}
|
|
10383
10383
|
function q(I) {
|
|
10384
10384
|
const w = this.stack.pop();
|
|
10385
|
-
|
|
10385
|
+
A(w, "expected a `node` to be on the stack"), A("value" in w, "expected a `literal` to be on the stack"), A(w.position, "expected `node` to have an open position"), w.value += this.sliceSerialize(I), w.position.end = $t(I.end);
|
|
10386
10386
|
}
|
|
10387
10387
|
function Te(I) {
|
|
10388
10388
|
const w = this.stack[this.stack.length - 1];
|
|
10389
|
-
if (
|
|
10390
|
-
|
|
10389
|
+
if (A(w, "expected `node`"), this.data.atHardBreak) {
|
|
10390
|
+
A("children" in w, "expected `parent`");
|
|
10391
10391
|
const G = w.children[w.children.length - 1];
|
|
10392
|
-
|
|
10392
|
+
A(G.position, "expected tail to have a starting position"), G.position.end = $t(I.end), this.data.atHardBreak = void 0;
|
|
10393
10393
|
return;
|
|
10394
10394
|
}
|
|
10395
10395
|
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(w.type) && (oe.call(this, I), q.call(this, I));
|
|
@@ -10399,19 +10399,19 @@ function _m(e) {
|
|
|
10399
10399
|
}
|
|
10400
10400
|
function B() {
|
|
10401
10401
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10402
|
-
|
|
10402
|
+
A(w, "expected node on stack"), A(w.type === "html", "expected html on stack"), w.value = I;
|
|
10403
10403
|
}
|
|
10404
10404
|
function F() {
|
|
10405
10405
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10406
|
-
|
|
10406
|
+
A(w, "expected node on stack"), A(w.type === "html", "expected html on stack"), w.value = I;
|
|
10407
10407
|
}
|
|
10408
10408
|
function J() {
|
|
10409
10409
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10410
|
-
|
|
10410
|
+
A(w, "expected node on stack"), A(w.type === "inlineCode", "expected inline code on stack"), w.value = I;
|
|
10411
10411
|
}
|
|
10412
10412
|
function fe() {
|
|
10413
10413
|
const I = this.stack[this.stack.length - 1];
|
|
10414
|
-
if (
|
|
10414
|
+
if (A(I, "expected node on stack"), A(I.type === "link", "expected link on stack"), this.data.inReference) {
|
|
10415
10415
|
const w = this.data.referenceType || "shortcut";
|
|
10416
10416
|
I.type += "Reference", I.referenceType = w, delete I.url, delete I.title;
|
|
10417
10417
|
} else
|
|
@@ -10420,7 +10420,7 @@ function _m(e) {
|
|
|
10420
10420
|
}
|
|
10421
10421
|
function le() {
|
|
10422
10422
|
const I = this.stack[this.stack.length - 1];
|
|
10423
|
-
if (
|
|
10423
|
+
if (A(I, "expected node on stack"), A(I.type === "image", "expected image on stack"), this.data.inReference) {
|
|
10424
10424
|
const w = this.data.referenceType || "shortcut";
|
|
10425
10425
|
I.type += "Reference", I.referenceType = w, delete I.url, delete I.title;
|
|
10426
10426
|
} else
|
|
@@ -10429,16 +10429,16 @@ function _m(e) {
|
|
|
10429
10429
|
}
|
|
10430
10430
|
function ye(I) {
|
|
10431
10431
|
const w = this.sliceSerialize(I), G = this.stack[this.stack.length - 2];
|
|
10432
|
-
|
|
10432
|
+
A(G, "expected ancestor on stack"), A(
|
|
10433
10433
|
G.type === "image" || G.type === "link",
|
|
10434
10434
|
"expected image or link on stack"
|
|
10435
10435
|
), G.label = Cm(w), G.identifier = Nn(w).toLowerCase();
|
|
10436
10436
|
}
|
|
10437
|
-
function
|
|
10437
|
+
function Fe() {
|
|
10438
10438
|
const I = this.stack[this.stack.length - 1];
|
|
10439
|
-
|
|
10439
|
+
A(I, "expected node on stack"), A(I.type === "fragment", "expected fragment on stack");
|
|
10440
10440
|
const w = this.resume(), G = this.stack[this.stack.length - 1];
|
|
10441
|
-
if (
|
|
10441
|
+
if (A(G, "expected node on stack"), A(
|
|
10442
10442
|
G.type === "image" || G.type === "link",
|
|
10443
10443
|
"expected image or link on stack"
|
|
10444
10444
|
), this.data.inReference = !0, G.type === "link") {
|
|
@@ -10449,14 +10449,14 @@ function _m(e) {
|
|
|
10449
10449
|
}
|
|
10450
10450
|
function g() {
|
|
10451
10451
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10452
|
-
|
|
10452
|
+
A(w, "expected node on stack"), A(
|
|
10453
10453
|
w.type === "image" || w.type === "link",
|
|
10454
10454
|
"expected image or link on stack"
|
|
10455
10455
|
), w.url = I;
|
|
10456
10456
|
}
|
|
10457
10457
|
function Y() {
|
|
10458
10458
|
const I = this.resume(), w = this.stack[this.stack.length - 1];
|
|
10459
|
-
|
|
10459
|
+
A(w, "expected node on stack"), A(
|
|
10460
10460
|
w.type === "image" || w.type === "link",
|
|
10461
10461
|
"expected image or link on stack"
|
|
10462
10462
|
), w.title = I;
|
|
@@ -10469,7 +10469,7 @@ function _m(e) {
|
|
|
10469
10469
|
}
|
|
10470
10470
|
function Z(I) {
|
|
10471
10471
|
const w = this.resume(), G = this.stack[this.stack.length - 1];
|
|
10472
|
-
|
|
10472
|
+
A(G, "expected node on stack"), A(
|
|
10473
10473
|
G.type === "image" || G.type === "link",
|
|
10474
10474
|
"expected image reference or link reference on stack"
|
|
10475
10475
|
), G.label = w, G.identifier = Nn(
|
|
@@ -10477,7 +10477,7 @@ function _m(e) {
|
|
|
10477
10477
|
).toLowerCase(), this.data.referenceType = "full";
|
|
10478
10478
|
}
|
|
10479
10479
|
function ae(I) {
|
|
10480
|
-
|
|
10480
|
+
A(
|
|
10481
10481
|
I.type === "characterReferenceMarkerNumeric" || I.type === "characterReferenceMarkerHexadecimal"
|
|
10482
10482
|
), this.data.characterReferenceType = I.type;
|
|
10483
10483
|
}
|
|
@@ -10491,20 +10491,20 @@ function _m(e) {
|
|
|
10491
10491
|
), this.data.characterReferenceType = void 0;
|
|
10492
10492
|
else {
|
|
10493
10493
|
const nt = Oi(w);
|
|
10494
|
-
|
|
10494
|
+
A(nt !== !1, "expected reference to decode"), me = nt;
|
|
10495
10495
|
}
|
|
10496
10496
|
const Se = this.stack.pop();
|
|
10497
|
-
|
|
10497
|
+
A(Se, "expected `node`"), A(Se.position, "expected `node.position`"), A("value" in Se, "expected `node.value`"), Se.value += me, Se.position.end = $t(I.end);
|
|
10498
10498
|
}
|
|
10499
10499
|
function ie(I) {
|
|
10500
10500
|
q.call(this, I);
|
|
10501
10501
|
const w = this.stack[this.stack.length - 1];
|
|
10502
|
-
|
|
10502
|
+
A(w, "expected node on stack"), A(w.type === "link", "expected link on stack"), w.url = this.sliceSerialize(I);
|
|
10503
10503
|
}
|
|
10504
10504
|
function Q(I) {
|
|
10505
10505
|
q.call(this, I);
|
|
10506
10506
|
const w = this.stack[this.stack.length - 1];
|
|
10507
|
-
|
|
10507
|
+
A(w, "expected node on stack"), A(w.type === "link", "expected link on stack"), w.url = "mailto:" + this.sliceSerialize(I);
|
|
10508
10508
|
}
|
|
10509
10509
|
function ce() {
|
|
10510
10510
|
return { type: "blockquote", children: [] };
|
|
@@ -10524,7 +10524,7 @@ function _m(e) {
|
|
|
10524
10524
|
url: ""
|
|
10525
10525
|
};
|
|
10526
10526
|
}
|
|
10527
|
-
function
|
|
10527
|
+
function He() {
|
|
10528
10528
|
return { type: "emphasis", children: [] };
|
|
10529
10529
|
}
|
|
10530
10530
|
function We() {
|
|
@@ -10573,7 +10573,7 @@ function _m(e) {
|
|
|
10573
10573
|
function Ie() {
|
|
10574
10574
|
return { type: "text", value: "" };
|
|
10575
10575
|
}
|
|
10576
|
-
function
|
|
10576
|
+
function Ue() {
|
|
10577
10577
|
return { type: "thematicBreak" };
|
|
10578
10578
|
}
|
|
10579
10579
|
}
|
|
@@ -10890,8 +10890,8 @@ function Wm(e, t, n) {
|
|
|
10890
10890
|
for (; ++c < u; ) {
|
|
10891
10891
|
const f = t.children[c], h = {}, m = s ? s[c] : void 0;
|
|
10892
10892
|
m && (h.align = m);
|
|
10893
|
-
let
|
|
10894
|
-
f && (
|
|
10893
|
+
let S = { type: "element", tagName: i, properties: h, children: [] };
|
|
10894
|
+
f && (S.children = e.all(f), e.patch(f, S), S = e.applyData(f, S)), l.push(S);
|
|
10895
10895
|
}
|
|
10896
10896
|
const d = {
|
|
10897
10897
|
type: "element",
|
|
@@ -11157,11 +11157,11 @@ function sp(e) {
|
|
|
11157
11157
|
continue;
|
|
11158
11158
|
const d = e.all(l), f = String(l.identifier).toUpperCase(), h = kn(f.toLowerCase());
|
|
11159
11159
|
let m = 0;
|
|
11160
|
-
const
|
|
11160
|
+
const S = [], _ = e.footnoteCounts.get(f);
|
|
11161
11161
|
for (; _ !== void 0 && ++m <= _; ) {
|
|
11162
|
-
|
|
11162
|
+
S.length > 0 && S.push({ type: "text", value: " " });
|
|
11163
11163
|
let L = typeof n == "string" ? n : n(c, m);
|
|
11164
|
-
typeof L == "string" && (L = { type: "text", value: L }),
|
|
11164
|
+
typeof L == "string" && (L = { type: "text", value: L }), S.push({
|
|
11165
11165
|
type: "element",
|
|
11166
11166
|
tagName: "a",
|
|
11167
11167
|
properties: {
|
|
@@ -11176,9 +11176,9 @@ function sp(e) {
|
|
|
11176
11176
|
const O = d[d.length - 1];
|
|
11177
11177
|
if (O && O.type === "element" && O.tagName === "p") {
|
|
11178
11178
|
const L = O.children[O.children.length - 1];
|
|
11179
|
-
L && L.type === "text" ? L.value += " " : O.children.push({ type: "text", value: " " }), O.children.push(...
|
|
11179
|
+
L && L.type === "text" ? L.value += " " : O.children.push({ type: "text", value: " " }), O.children.push(...S);
|
|
11180
11180
|
} else
|
|
11181
|
-
d.push(...
|
|
11181
|
+
d.push(...S);
|
|
11182
11182
|
const v = {
|
|
11183
11183
|
type: "element",
|
|
11184
11184
|
tagName: "li",
|
|
@@ -11321,7 +11321,7 @@ function mp(e, t, n, r) {
|
|
|
11321
11321
|
}
|
|
11322
11322
|
return h;
|
|
11323
11323
|
function h() {
|
|
11324
|
-
let m = bc,
|
|
11324
|
+
let m = bc, S, _, O;
|
|
11325
11325
|
if ((!t || i(c, l, d[d.length - 1] || void 0)) && (m = pp(n(c, d)), m[0] === ao))
|
|
11326
11326
|
return m;
|
|
11327
11327
|
if ("children" in c && c.children) {
|
|
@@ -11332,9 +11332,9 @@ function mp(e, t, n, r) {
|
|
|
11332
11332
|
if (v.children && m[0] !== hp)
|
|
11333
11333
|
for (_ = (r ? v.children.length : -1) + s, O = d.concat(v); _ > -1 && _ < v.children.length; ) {
|
|
11334
11334
|
const L = v.children[_];
|
|
11335
|
-
if (
|
|
11336
|
-
return
|
|
11337
|
-
_ = typeof
|
|
11335
|
+
if (S = u(L, _, O)(), S[0] === ao)
|
|
11336
|
+
return S;
|
|
11337
|
+
_ = typeof S[1] == "number" ? S[1] : _ + s;
|
|
11338
11338
|
}
|
|
11339
11339
|
}
|
|
11340
11340
|
return m;
|
|
@@ -11392,13 +11392,13 @@ function gp(e, t) {
|
|
|
11392
11392
|
const h = d.children;
|
|
11393
11393
|
let m = -1;
|
|
11394
11394
|
for (; ++m < h.length; ) {
|
|
11395
|
-
const
|
|
11396
|
-
if (
|
|
11397
|
-
if (m && h[m - 1].type === "break" && (!Array.isArray(
|
|
11398
|
-
const _ =
|
|
11395
|
+
const S = u.one(h[m], d);
|
|
11396
|
+
if (S) {
|
|
11397
|
+
if (m && h[m - 1].type === "break" && (!Array.isArray(S) && S.type === "text" && (S.value = io(S.value)), !Array.isArray(S) && S.type === "element")) {
|
|
11398
|
+
const _ = S.children[0];
|
|
11399
11399
|
_ && _.type === "text" && (_.value = io(_.value));
|
|
11400
11400
|
}
|
|
11401
|
-
Array.isArray(
|
|
11401
|
+
Array.isArray(S) ? f.push(...S) : f.push(S);
|
|
11402
11402
|
}
|
|
11403
11403
|
}
|
|
11404
11404
|
}
|
|
@@ -11450,7 +11450,7 @@ function io(e) {
|
|
|
11450
11450
|
}
|
|
11451
11451
|
function so(e, t) {
|
|
11452
11452
|
const n = gp(e, t), r = n.one(e, void 0), a = sp(n), i = Array.isArray(r) ? { type: "root", children: r } : r || { type: "root", children: [] };
|
|
11453
|
-
return a && (
|
|
11453
|
+
return a && (A("children" in i), i.children.push({ type: "text", value: `
|
|
11454
11454
|
` }, a)), i;
|
|
11455
11455
|
}
|
|
11456
11456
|
function Cp(e, t) {
|
|
@@ -11503,11 +11503,11 @@ function Ap() {
|
|
|
11503
11503
|
return l[d];
|
|
11504
11504
|
};
|
|
11505
11505
|
return _a = function c() {
|
|
11506
|
-
var l, d, f, h, m,
|
|
11506
|
+
var l, d, f, h, m, S, _ = arguments[0], O = 1, v = arguments.length, L = !1;
|
|
11507
11507
|
for (typeof _ == "boolean" && (L = _, _ = arguments[1] || {}, O = 2), (_ == null || typeof _ != "object" && typeof _ != "function") && (_ = {}); O < v; ++O)
|
|
11508
11508
|
if (l = arguments[O], l != null)
|
|
11509
11509
|
for (d in l)
|
|
11510
|
-
f = u(_, d), h = u(l, d), _ !== h && (L && h && (i(h) || (m = a(h))) ? (m ? (m = !1,
|
|
11510
|
+
f = u(_, d), h = u(l, d), _ !== h && (L && h && (i(h) || (m = a(h))) ? (m ? (m = !1, S = f && a(f) ? f : []) : S = f && i(f) ? f : {}, s(_, { name: d, newValue: c(L, S, h) })) : typeof h < "u" && s(_, { name: d, newValue: h }));
|
|
11511
11511
|
return _;
|
|
11512
11512
|
}, _a;
|
|
11513
11513
|
}
|
|
@@ -12358,15 +12358,15 @@ class Hi extends Fp {
|
|
|
12358
12358
|
/** @type {CompileTree extends undefined ? Node : CompileTree} */
|
|
12359
12359
|
/** @type {unknown} */
|
|
12360
12360
|
f
|
|
12361
|
-
),
|
|
12362
|
-
Vp(
|
|
12361
|
+
), S = r.stringify(m, h);
|
|
12362
|
+
Vp(S) ? h.value = S : h.result = S, l(
|
|
12363
12363
|
d,
|
|
12364
12364
|
/** @type {VFileWithOutput<CompileResult>} */
|
|
12365
12365
|
h
|
|
12366
12366
|
);
|
|
12367
12367
|
});
|
|
12368
12368
|
function l(d, f) {
|
|
12369
|
-
d || !f ? s(d) : i ? i(f) : (
|
|
12369
|
+
d || !f ? s(d) : i ? i(f) : (A(n, "`done` is defined if `resolve` is not"), n(void 0, f));
|
|
12370
12370
|
}
|
|
12371
12371
|
}
|
|
12372
12372
|
}
|
|
@@ -12403,7 +12403,7 @@ class Hi extends Fp {
|
|
|
12403
12403
|
*/
|
|
12404
12404
|
processSync(t) {
|
|
12405
12405
|
let n = !1, r;
|
|
12406
|
-
return this.freeze(), Ra("processSync", this.parser || this.Parser), Oa("processSync", this.compiler || this.Compiler), this.process(t, a), fo("processSync", "process", n),
|
|
12406
|
+
return this.freeze(), Ra("processSync", this.parser || this.Parser), Oa("processSync", this.compiler || this.Compiler), this.process(t, a), fo("processSync", "process", n), A(r, "we either bailed on an error or have a tree"), r;
|
|
12407
12407
|
function a(i, s) {
|
|
12408
12408
|
n = !0, oo(i), r = s;
|
|
12409
12409
|
}
|
|
@@ -12451,7 +12451,7 @@ class Hi extends Fp {
|
|
|
12451
12451
|
const a = this.transformers;
|
|
12452
12452
|
return !r && typeof n == "function" && (r = n, n = void 0), r ? i(void 0, r) : new Promise(i);
|
|
12453
12453
|
function i(s, u) {
|
|
12454
|
-
|
|
12454
|
+
A(
|
|
12455
12455
|
typeof n != "function",
|
|
12456
12456
|
"`file` can’t be a `done` anymore, we checked"
|
|
12457
12457
|
);
|
|
@@ -12462,7 +12462,7 @@ class Hi extends Fp {
|
|
|
12462
12462
|
/** @type {TailTree extends undefined ? Node : TailTree} */
|
|
12463
12463
|
f || t
|
|
12464
12464
|
);
|
|
12465
|
-
d ? u(d) : s ? s(m) : (
|
|
12465
|
+
d ? u(d) : s ? s(m) : (A(r, "`done` is defined if `resolve` is not"), r(void 0, m, h));
|
|
12466
12466
|
}
|
|
12467
12467
|
}
|
|
12468
12468
|
}
|
|
@@ -12485,7 +12485,7 @@ class Hi extends Fp {
|
|
|
12485
12485
|
*/
|
|
12486
12486
|
runSync(t, n) {
|
|
12487
12487
|
let r = !1, a;
|
|
12488
|
-
return this.run(t, n, i), fo("runSync", "run", r),
|
|
12488
|
+
return this.run(t, n, i), fo("runSync", "run", r), A(a, "we either bailed on an error or have a tree"), a;
|
|
12489
12489
|
function i(s, u) {
|
|
12490
12490
|
oo(s), a = u, r = !0;
|
|
12491
12491
|
}
|
|
@@ -12632,9 +12632,9 @@ class Hi extends Fp {
|
|
|
12632
12632
|
if (h === -1)
|
|
12633
12633
|
r.push([l, ...d]);
|
|
12634
12634
|
else if (d.length > 0) {
|
|
12635
|
-
let [m, ...
|
|
12635
|
+
let [m, ...S] = d;
|
|
12636
12636
|
const _ = r[h][1];
|
|
12637
|
-
ui(_) && ui(m) && (m = va(!0, _, m)), r[h] = [l, m, ...
|
|
12637
|
+
ui(_) && ui(m) && (m = va(!0, _, m)), r[h] = [l, m, ...S];
|
|
12638
12638
|
}
|
|
12639
12639
|
}
|
|
12640
12640
|
}
|
|
@@ -12710,8 +12710,8 @@ const $p = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md",
|
|
|
12710
12710
|
{ from: "transformLinkUri", id: "#add-urltransform", to: "urlTransform" }
|
|
12711
12711
|
];
|
|
12712
12712
|
function Ec(e) {
|
|
12713
|
-
const t = e.allowedElements, n = e.allowElement, r = e.children || "", a = e.className, i = e.components, s = e.disallowedElements, u = e.rehypePlugins || ho, c = e.remarkPlugins || ho, l = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...mo } : mo, d = e.skipHtml, f = e.unwrapDisallowed, h = e.urlTransform || qp, m = Up().use(Nm).use(c).use(Cp, l).use(u),
|
|
12714
|
-
typeof r == "string" ?
|
|
12713
|
+
const t = e.allowedElements, n = e.allowElement, r = e.children || "", a = e.className, i = e.components, s = e.disallowedElements, u = e.rehypePlugins || ho, c = e.remarkPlugins || ho, l = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...mo } : mo, d = e.skipHtml, f = e.unwrapDisallowed, h = e.urlTransform || qp, m = Up().use(Nm).use(c).use(Cp, l).use(u), S = new gc();
|
|
12714
|
+
typeof r == "string" ? S.value = r : ga(
|
|
12715
12715
|
"Unexpected value `" + r + "` for `children` prop, expected `string`"
|
|
12716
12716
|
), t && s && ga(
|
|
12717
12717
|
"Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"
|
|
@@ -12720,8 +12720,8 @@ function Ec(e) {
|
|
|
12720
12720
|
Object.hasOwn(e, L.from) && ga(
|
|
12721
12721
|
"Unexpected `" + L.from + "` prop, " + (L.to ? "use `" + L.to + "` instead" : "remove it") + " (see <" + $p + "#" + L.id + "> for more info)"
|
|
12722
12722
|
);
|
|
12723
|
-
const _ = m.parse(
|
|
12724
|
-
let O = m.runSync(_,
|
|
12723
|
+
const _ = m.parse(S);
|
|
12724
|
+
let O = m.runSync(_, S);
|
|
12725
12725
|
return a && (O = {
|
|
12726
12726
|
type: "element",
|
|
12727
12727
|
tagName: "div",
|
|
@@ -12997,7 +12997,7 @@ function Ui(e, t) {
|
|
|
12997
12997
|
data: { quirksMode: a }
|
|
12998
12998
|
}, e.file && e.location) {
|
|
12999
12999
|
const i = String(e.file), s = rb(i), u = s.toPoint(0), c = s.toPoint(i.length);
|
|
13000
|
-
|
|
13000
|
+
A(u, "expected `start`"), A(c, "expected `end`"), n.position = { start: u, end: c };
|
|
13001
13001
|
}
|
|
13002
13002
|
return n;
|
|
13003
13003
|
}
|
|
@@ -13076,7 +13076,7 @@ function ob(e, t, n) {
|
|
|
13076
13076
|
xc.call(n.attrs, s) && (i[Qr(e.schema, s).property] = Sn(
|
|
13077
13077
|
n.attrs[s]
|
|
13078
13078
|
));
|
|
13079
|
-
|
|
13079
|
+
A(n.startTag, "a start tag should exist");
|
|
13080
13080
|
const u = Sn(n.startTag), c = n.endTag ? Sn(n.endTag) : void 0, l = { opening: u };
|
|
13081
13081
|
c && (l.closing = c), l.properties = i, t.data = { position: l };
|
|
13082
13082
|
}
|
|
@@ -13175,7 +13175,7 @@ function bb(e, t) {
|
|
|
13175
13175
|
}
|
|
13176
13176
|
}
|
|
13177
13177
|
const s = r.space;
|
|
13178
|
-
|
|
13178
|
+
A(s);
|
|
13179
13179
|
const u = {
|
|
13180
13180
|
nodeName: e.tagName,
|
|
13181
13181
|
tagName: e.tagName,
|
|
@@ -13214,7 +13214,7 @@ function ji(e, t, n) {
|
|
|
13214
13214
|
}
|
|
13215
13215
|
function Pn(e, t) {
|
|
13216
13216
|
const n = e.position;
|
|
13217
|
-
n && n.start && n.end && (
|
|
13217
|
+
n && n.start && n.end && (A(typeof n.start.offset == "number"), A(typeof n.end.offset == "number"), t.sourceCodeLocation = {
|
|
13218
13218
|
startLine: n.start.line,
|
|
13219
13219
|
startCol: n.start.column,
|
|
13220
13220
|
startOffset: n.start.offset,
|
|
@@ -19215,7 +19215,7 @@ function cE(e, {
|
|
|
19215
19215
|
threshold: a = 0,
|
|
19216
19216
|
dedupeKey: i
|
|
19217
19217
|
} = {}) {
|
|
19218
|
-
const s =
|
|
19218
|
+
const s = Ve(!1), u = Ve();
|
|
19219
19219
|
return Wt(
|
|
19220
19220
|
(l) => {
|
|
19221
19221
|
if (u.current?.(), u.current = void 0, !l || s.current) return;
|
|
@@ -19227,8 +19227,8 @@ function cE(e, {
|
|
|
19227
19227
|
return;
|
|
19228
19228
|
}
|
|
19229
19229
|
const h = new IntersectionObserver(
|
|
19230
|
-
(m,
|
|
19231
|
-
m[0]?.isIntersecting && (
|
|
19230
|
+
(m, S) => {
|
|
19231
|
+
m[0]?.isIntersecting && (S.disconnect(), f());
|
|
19232
19232
|
},
|
|
19233
19233
|
{ root: d, rootMargin: r, threshold: a }
|
|
19234
19234
|
);
|
|
@@ -19267,12 +19267,12 @@ function lE({
|
|
|
19267
19267
|
...i
|
|
19268
19268
|
}) {
|
|
19269
19269
|
const s = e.startsWith("/") || typeof window < "u" && e.startsWith(window.location.origin), u = rr.getApiUrl(), c = () => {
|
|
19270
|
-
const
|
|
19270
|
+
const S = `${u}/tracking/clicked/${n.appToken}`, _ = {
|
|
19271
19271
|
discussionId: n.discussionId,
|
|
19272
19272
|
urlClicked: e
|
|
19273
19273
|
};
|
|
19274
19274
|
try {
|
|
19275
|
-
fetch(
|
|
19275
|
+
fetch(S, {
|
|
19276
19276
|
method: "POST",
|
|
19277
19277
|
headers: {
|
|
19278
19278
|
"Content-Type": "application/json",
|
|
@@ -19288,12 +19288,12 @@ function lE({
|
|
|
19288
19288
|
} catch {
|
|
19289
19289
|
}
|
|
19290
19290
|
}, l = () => {
|
|
19291
|
-
const
|
|
19291
|
+
const S = `${u}/tracking/displayed/${n.appToken}`, _ = {
|
|
19292
19292
|
discussionId: n.discussionId,
|
|
19293
19293
|
urlSeen: e
|
|
19294
19294
|
};
|
|
19295
19295
|
try {
|
|
19296
|
-
fetch(
|
|
19296
|
+
fetch(S, {
|
|
19297
19297
|
method: "POST",
|
|
19298
19298
|
headers: {
|
|
19299
19299
|
"Content-Type": "application/json",
|
|
@@ -19318,8 +19318,8 @@ function lE({
|
|
|
19318
19318
|
rootMargin: "0px 0px -10% 0px",
|
|
19319
19319
|
// avoid flicker at bottom edge
|
|
19320
19320
|
dedupeKey: d
|
|
19321
|
-
}), h = (
|
|
19322
|
-
c(), r?.(
|
|
19321
|
+
}), h = (S) => {
|
|
19322
|
+
c(), r?.(S);
|
|
19323
19323
|
}, m = s ? {} : { target: "_blank", rel: "noopener noreferrer" };
|
|
19324
19324
|
return s ? /* @__PURE__ */ M.jsxDEV(
|
|
19325
19325
|
"a",
|
|
@@ -19479,7 +19479,7 @@ const dE = ({ content: e, metaData: t, context: n, seenRootEl: r }) => {
|
|
|
19479
19479
|
}, void 0);
|
|
19480
19480
|
};
|
|
19481
19481
|
function hE(e, t, n) {
|
|
19482
|
-
let [r, a] = Oe(e || t), i =
|
|
19482
|
+
let [r, a] = Oe(e || t), i = Ve(e !== void 0), s = e !== void 0;
|
|
19483
19483
|
$e(() => {
|
|
19484
19484
|
let l = i.current;
|
|
19485
19485
|
l !== s && console.warn(`WARN: A component changed from ${l ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}.`), i.current = s;
|
|
@@ -19490,8 +19490,8 @@ function hE(e, t, n) {
|
|
|
19490
19490
|
let f = (h, ...m) => {
|
|
19491
19491
|
n && (Object.is(u, h) || n(h, ...m)), s || (u = h);
|
|
19492
19492
|
};
|
|
19493
|
-
typeof l == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), a((m, ...
|
|
19494
|
-
let _ = l(s ? u : m, ...
|
|
19493
|
+
typeof l == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), a((m, ...S) => {
|
|
19494
|
+
let _ = l(s ? u : m, ...S);
|
|
19495
19495
|
return f(_, ...d), s ? m : _;
|
|
19496
19496
|
})) : (s || a(l), f(l, ...d));
|
|
19497
19497
|
}, [
|
|
@@ -19510,7 +19510,7 @@ const Hr = {
|
|
|
19510
19510
|
}, il = /* @__PURE__ */ Ye.createContext(Hr), mE = /* @__PURE__ */ Ye.createContext(!1);
|
|
19511
19511
|
let pE = !!(typeof window < "u" && window.document && window.document.createElement), Ma = /* @__PURE__ */ new WeakMap();
|
|
19512
19512
|
function bE(e = !1) {
|
|
19513
|
-
let t = yt(il), n =
|
|
19513
|
+
let t = yt(il), n = Ve(null);
|
|
19514
19514
|
if (n.current === null && !e) {
|
|
19515
19515
|
var r, a;
|
|
19516
19516
|
let i = (a = Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || a === void 0 || (r = a.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
|
|
@@ -19565,7 +19565,7 @@ function SE() {
|
|
|
19565
19565
|
const pn = typeof document < "u" ? Ye.useLayoutEffect : () => {
|
|
19566
19566
|
};
|
|
19567
19567
|
function cn(e) {
|
|
19568
|
-
const t =
|
|
19568
|
+
const t = Ve(null);
|
|
19569
19569
|
return pn(() => {
|
|
19570
19570
|
t.current = e;
|
|
19571
19571
|
}, [
|
|
@@ -19576,7 +19576,7 @@ function cn(e) {
|
|
|
19576
19576
|
}, []);
|
|
19577
19577
|
}
|
|
19578
19578
|
function _E(e) {
|
|
19579
|
-
let [t, n] = Oe(e), r =
|
|
19579
|
+
let [t, n] = Oe(e), r = Ve(null), a = cn(() => {
|
|
19580
19580
|
if (!r.current) return;
|
|
19581
19581
|
let s = r.current.next();
|
|
19582
19582
|
if (s.done) {
|
|
@@ -19598,7 +19598,7 @@ function _E(e) {
|
|
|
19598
19598
|
}
|
|
19599
19599
|
let vE = !!(typeof window < "u" && window.document && window.document.createElement), Ur = /* @__PURE__ */ new Map();
|
|
19600
19600
|
function jr(e) {
|
|
19601
|
-
let [t, n] = Oe(e), r =
|
|
19601
|
+
let [t, n] = Oe(e), r = Ve(null), a = TE(t), i = Wt((s) => {
|
|
19602
19602
|
r.current = s;
|
|
19603
19603
|
}, []);
|
|
19604
19604
|
return vE && Ur.set(a, i), pn(() => {
|
|
@@ -19790,7 +19790,7 @@ function $E(e) {
|
|
|
19790
19790
|
return e.mozInputSource === 0 && e.isTrusted ? !0 : UE() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
19791
19791
|
}
|
|
19792
19792
|
function YE(e, t, n) {
|
|
19793
|
-
let r =
|
|
19793
|
+
let r = Ve(t), a = cn(() => {
|
|
19794
19794
|
n && n(r.current);
|
|
19795
19795
|
});
|
|
19796
19796
|
$e(() => {
|
|
@@ -19829,7 +19829,7 @@ class qE {
|
|
|
19829
19829
|
}
|
|
19830
19830
|
}
|
|
19831
19831
|
function WE(e) {
|
|
19832
|
-
let t =
|
|
19832
|
+
let t = Ve({
|
|
19833
19833
|
isFocused: !1,
|
|
19834
19834
|
observer: null
|
|
19835
19835
|
});
|
|
@@ -20055,7 +20055,7 @@ function iT(e) {
|
|
|
20055
20055
|
return r;
|
|
20056
20056
|
}
|
|
20057
20057
|
function sT(e, t) {
|
|
20058
|
-
let { focusProps: n } = XE(e), { keyboardProps: r } = tT(e), a = zr(n, r), i = iT(t), s = e.isDisabled ? {} : i, u =
|
|
20058
|
+
let { focusProps: n } = XE(e), { keyboardProps: r } = tT(e), a = zr(n, r), i = iT(t), s = e.isDisabled ? {} : i, u = Ve(e.autoFocus);
|
|
20059
20059
|
return $e(() => {
|
|
20060
20060
|
u.current && t.current && nT(t.current), u.current = !1;
|
|
20061
20061
|
}, [
|
|
@@ -20185,12 +20185,12 @@ function hT(e) {
|
|
|
20185
20185
|
let d = yt(dT), f = _n(() => r ? Array.isArray(r) ? r.flatMap((q) => Ei(d[q])) : Ei(d[r]) : [], [
|
|
20186
20186
|
d,
|
|
20187
20187
|
r
|
|
20188
|
-
]), [h, m] = Oe(d), [
|
|
20188
|
+
]), [h, m] = Oe(d), [S, _] = Oe(!1);
|
|
20189
20189
|
d !== h && (m(d), _(!1));
|
|
20190
|
-
let O = _n(() => jo(
|
|
20191
|
-
|
|
20190
|
+
let O = _n(() => jo(S ? [] : f), [
|
|
20191
|
+
S,
|
|
20192
20192
|
f
|
|
20193
|
-
]), v =
|
|
20193
|
+
]), v = Ve(Vn), [L, P] = Oe(Vn), j = Ve(Vn), R = () => {
|
|
20194
20194
|
if (!D) return;
|
|
20195
20195
|
re(!1);
|
|
20196
20196
|
let q = l || i || v.current;
|
|
@@ -20285,7 +20285,7 @@ function gT(e, t) {
|
|
|
20285
20285
|
let { inputElementType: n = "input", isDisabled: r = !1, isRequired: a = !1, isReadOnly: i = !1, type: s = "text", validationBehavior: u = "aria" } = e, [c, l] = hE(e.value, e.defaultValue || "", e.onChange), { focusableProps: d } = sT(e, t), f = fT({
|
|
20286
20286
|
...e,
|
|
20287
20287
|
value: c
|
|
20288
|
-
}), { isInvalid: h, validationErrors: m, validationDetails:
|
|
20288
|
+
}), { isInvalid: h, validationErrors: m, validationDetails: S } = f.displayValidation, { labelProps: _, fieldProps: O, descriptionProps: v, errorMessageProps: L } = bT({
|
|
20289
20289
|
...e,
|
|
20290
20290
|
isInvalid: h,
|
|
20291
20291
|
errorMessage: e.errorMessage || m
|
|
@@ -20349,7 +20349,7 @@ function gT(e, t) {
|
|
|
20349
20349
|
errorMessageProps: L,
|
|
20350
20350
|
isInvalid: h,
|
|
20351
20351
|
validationErrors: m,
|
|
20352
|
-
validationDetails:
|
|
20352
|
+
validationDetails: S
|
|
20353
20353
|
};
|
|
20354
20354
|
}
|
|
20355
20355
|
const ET = (e) => e.charCodeAt(e.length - 1) === 10, TT = (e) => {
|
|
@@ -20368,7 +20368,7 @@ const ET = (e) => e.charCodeAt(e.length - 1) === 10, TT = (e) => {
|
|
|
20368
20368
|
isLoadingStream: l,
|
|
20369
20369
|
LoadingComponent: d,
|
|
20370
20370
|
onPressLoadingButton: f
|
|
20371
|
-
} = e, h =
|
|
20371
|
+
} = e, h = Ve(null), { labelProps: m, inputProps: S } = gT(
|
|
20372
20372
|
{
|
|
20373
20373
|
...e,
|
|
20374
20374
|
inputElementType: "textarea"
|
|
@@ -20403,7 +20403,7 @@ const ET = (e) => e.charCodeAt(e.length - 1) === 10, TT = (e) => {
|
|
|
20403
20403
|
/* @__PURE__ */ M.jsxDEV(
|
|
20404
20404
|
"textarea",
|
|
20405
20405
|
{
|
|
20406
|
-
...
|
|
20406
|
+
...S,
|
|
20407
20407
|
ref: h,
|
|
20408
20408
|
className: `${e.classNameTextarea} p-3`,
|
|
20409
20409
|
onChange: _,
|
|
@@ -21006,12 +21006,12 @@ const pl = () => {
|
|
|
21006
21006
|
setDiscussionId: () => {
|
|
21007
21007
|
}
|
|
21008
21008
|
}), DT = (e) => {
|
|
21009
|
-
const t =
|
|
21009
|
+
const t = Ve(null), [n, r] = Oe(!1), a = Ve(!0), i = Ve(!1), s = Ve(0), u = () => {
|
|
21010
21010
|
const d = t.current, f = 4;
|
|
21011
21011
|
if (d) {
|
|
21012
21012
|
d.scrollTop < s.current - 1 && (i.current = !1);
|
|
21013
|
-
const m = d.scrollHeight > d.clientHeight,
|
|
21014
|
-
r(m && !
|
|
21013
|
+
const m = d.scrollHeight > d.clientHeight, S = d.scrollHeight - d.scrollTop <= d.clientHeight + f;
|
|
21014
|
+
r(m && !S), a.current = S, s.current = d.scrollTop;
|
|
21015
21015
|
}
|
|
21016
21016
|
}, c = ({
|
|
21017
21017
|
smooth: d = !1,
|
|
@@ -21206,12 +21206,12 @@ const gl = ({
|
|
|
21206
21206
|
containerClassName: t
|
|
21207
21207
|
}) => {
|
|
21208
21208
|
e || console.log("Dev - Admin settings");
|
|
21209
|
-
const n =
|
|
21209
|
+
const n = Ve(null), {
|
|
21210
21210
|
placeholderTranslation: r,
|
|
21211
21211
|
genericErrorTranslation: a,
|
|
21212
21212
|
tooManyRequestsTranslation: i,
|
|
21213
21213
|
conflictErrorTranslation: s
|
|
21214
|
-
} = vi(), { conversation: u, setConversation: c, discussionId: l, setDiscussionId: d } = yt(bl), [f, h] = Oe("notLoading"), { defaultStartingStep: m } = pl(), [
|
|
21214
|
+
} = vi(), { conversation: u, setConversation: c, discussionId: l, setDiscussionId: d } = yt(bl), [f, h] = Oe("notLoading"), { defaultStartingStep: m } = pl(), [S, _] = Oe(
|
|
21215
21215
|
null
|
|
21216
21216
|
), [O, v] = Oe(
|
|
21217
21217
|
m
|
|
@@ -21230,10 +21230,10 @@ const gl = ({
|
|
|
21230
21230
|
showScrollButton: q,
|
|
21231
21231
|
messagesContainerRef: Te,
|
|
21232
21232
|
removeStickyNess: ee
|
|
21233
|
-
} = DT(u), B = (le, ye,
|
|
21233
|
+
} = DT(u), B = (le, ye, Fe) => {
|
|
21234
21234
|
c((g) => [
|
|
21235
21235
|
...g,
|
|
21236
|
-
{ content: le, userType: ye, metaData:
|
|
21236
|
+
{ content: le, userType: ye, metaData: Fe }
|
|
21237
21237
|
]);
|
|
21238
21238
|
}, F = () => {
|
|
21239
21239
|
Ir.abort("cancelling"), console.log("Stream request aborted"), h("notLoading"), c(
|
|
@@ -21247,7 +21247,7 @@ const gl = ({
|
|
|
21247
21247
|
setDiscussionId: d
|
|
21248
21248
|
}), fe = async (le) => {
|
|
21249
21249
|
h("loadingIntermediaryStates");
|
|
21250
|
-
const ye = rr.getApiUrl(),
|
|
21250
|
+
const ye = rr.getApiUrl(), Fe = {
|
|
21251
21251
|
query: le,
|
|
21252
21252
|
language: R.locale
|
|
21253
21253
|
};
|
|
@@ -21259,10 +21259,10 @@ const gl = ({
|
|
|
21259
21259
|
}
|
|
21260
21260
|
]), requestAnimationFrame(
|
|
21261
21261
|
() => oe({ smooth: !1, sticky: !1 })
|
|
21262
|
-
), l && (
|
|
21262
|
+
), l && (Fe.discussionId = l);
|
|
21263
21263
|
const g = Ir.signal, Y = rr.getFetchConfig({
|
|
21264
21264
|
httpVerb: "POST",
|
|
21265
|
-
body:
|
|
21265
|
+
body: Fe,
|
|
21266
21266
|
contentType: "application/json",
|
|
21267
21267
|
options: {
|
|
21268
21268
|
signal: g
|
|
@@ -21274,8 +21274,8 @@ const gl = ({
|
|
|
21274
21274
|
const ue = W.headers.get("discussionId");
|
|
21275
21275
|
d(parseInt(ue, 10)), await new ReadableStream({
|
|
21276
21276
|
start($) {
|
|
21277
|
-
return
|
|
21278
|
-
async function
|
|
21277
|
+
return He();
|
|
21278
|
+
async function He() {
|
|
21279
21279
|
if (!W.ok) {
|
|
21280
21280
|
h("notLoading");
|
|
21281
21281
|
let We = a;
|
|
@@ -21295,15 +21295,15 @@ const gl = ({
|
|
|
21295
21295
|
content: Ee,
|
|
21296
21296
|
isLastAnswer: Ne,
|
|
21297
21297
|
streamSourceUuid: Ie,
|
|
21298
|
-
shouldStopStream:
|
|
21298
|
+
shouldStopStream: Ue
|
|
21299
21299
|
} = he;
|
|
21300
|
-
ce && ce !== Ie && (ae += '<span style="display:block;height:1rem;"></span>'), ce = Ie, (Ne ||
|
|
21300
|
+
ce && ce !== Ie && (ae += '<span style="display:block;height:1rem;"></span>'), ce = Ie, (Ne || Ue) && (Q = !0), $.enqueue(Ee), vT(Ee) ? (se += Ee, ae += se, se = "", ie = !1) : ie || _T(Ee) ? (se += Ee, ie = !0) : ae += Ee, c((I) => {
|
|
21301
21301
|
const w = [...I], G = w.length - 1, me = w[G];
|
|
21302
21302
|
return w[G] = {
|
|
21303
21303
|
...me,
|
|
21304
21304
|
content: me.content = ae,
|
|
21305
21305
|
metaData: {
|
|
21306
|
-
isErrorMessage:
|
|
21306
|
+
isErrorMessage: Ue
|
|
21307
21307
|
}
|
|
21308
21308
|
}, [...w];
|
|
21309
21309
|
});
|
|
@@ -21328,7 +21328,7 @@ const gl = ({
|
|
|
21328
21328
|
$.close(), h("notLoading"), v(m), P(null);
|
|
21329
21329
|
return;
|
|
21330
21330
|
}
|
|
21331
|
-
return
|
|
21331
|
+
return He();
|
|
21332
21332
|
});
|
|
21333
21333
|
}
|
|
21334
21334
|
}
|
|
@@ -21385,7 +21385,7 @@ const gl = ({
|
|
|
21385
21385
|
currentStepName: O,
|
|
21386
21386
|
currentStepNumber: L,
|
|
21387
21387
|
loadingStatus: f,
|
|
21388
|
-
numberOfSteps:
|
|
21388
|
+
numberOfSteps: S
|
|
21389
21389
|
},
|
|
21390
21390
|
void 0,
|
|
21391
21391
|
!1,
|
|
@@ -21638,8 +21638,8 @@ function FT() {
|
|
|
21638
21638
|
throw h.name = "Invariant Violation", h;
|
|
21639
21639
|
}
|
|
21640
21640
|
f = i[d](s, d, c, u, null, t);
|
|
21641
|
-
} catch (
|
|
21642
|
-
f =
|
|
21641
|
+
} catch (S) {
|
|
21642
|
+
f = S;
|
|
21643
21643
|
}
|
|
21644
21644
|
if (f && !(f instanceof Error) && e(
|
|
21645
21645
|
(c || "React class") + ": type specification of " + u + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
@@ -21702,7 +21702,7 @@ function HT() {
|
|
|
21702
21702
|
shape: ee,
|
|
21703
21703
|
exact: B
|
|
21704
21704
|
};
|
|
21705
|
-
function
|
|
21705
|
+
function S(g, Y) {
|
|
21706
21706
|
return g === Y ? g !== 0 || 1 / g === 1 / Y : g !== g && Y !== Y;
|
|
21707
21707
|
}
|
|
21708
21708
|
function _(g, Y) {
|
|
@@ -21720,11 +21720,11 @@ function HT() {
|
|
|
21720
21720
|
);
|
|
21721
21721
|
throw $.name = "Invariant Violation", $;
|
|
21722
21722
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
21723
|
-
var
|
|
21724
|
-
!Y[
|
|
21723
|
+
var He = Q + ":" + ie;
|
|
21724
|
+
!Y[He] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
21725
21725
|
W < 3 && (i(
|
|
21726
21726
|
"You are manually calling a React.PropTypes validation function for the `" + ue + "` prop on `" + Q + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
21727
|
-
), Y[
|
|
21727
|
+
), Y[He] = !0, W++);
|
|
21728
21728
|
}
|
|
21729
21729
|
}
|
|
21730
21730
|
return se[ie] == null ? ae ? se[ie] === null ? new _("The " + ce + " `" + ue + "` is marked as required " + ("in `" + Q + "`, but its value is `null`.")) : new _("The " + ce + " `" + ue + "` is marked as required in " + ("`" + Q + "`, but its value is `undefined`.")) : null : g(se, ie, Q, ce, ue);
|
|
@@ -21792,7 +21792,7 @@ function HT() {
|
|
|
21792
21792
|
function D(g) {
|
|
21793
21793
|
function Y(W, x, Z, ae, se) {
|
|
21794
21794
|
if (!(W[x] instanceof g)) {
|
|
21795
|
-
var ie = g.name || h, Q =
|
|
21795
|
+
var ie = g.name || h, Q = Fe(W[x]);
|
|
21796
21796
|
return new _("Invalid " + ae + " `" + se + "` of type " + ("`" + Q + "` supplied to `" + Z + "`, expected ") + ("instance of `" + ie + "`."));
|
|
21797
21797
|
}
|
|
21798
21798
|
return null;
|
|
@@ -21806,11 +21806,11 @@ function HT() {
|
|
|
21806
21806
|
) : i("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
21807
21807
|
function Y(W, x, Z, ae, se) {
|
|
21808
21808
|
for (var ie = W[x], Q = 0; Q < g.length; Q++)
|
|
21809
|
-
if (
|
|
21809
|
+
if (S(ie, g[Q]))
|
|
21810
21810
|
return null;
|
|
21811
21811
|
var ce = JSON.stringify(g, function(ke, $) {
|
|
21812
|
-
var
|
|
21813
|
-
return
|
|
21812
|
+
var He = le($);
|
|
21813
|
+
return He === "symbol" ? String($) : $;
|
|
21814
21814
|
});
|
|
21815
21815
|
return new _("Invalid " + ae + " `" + se + "` of value `" + String(ie) + "` " + ("supplied to `" + Z + "`, expected one of " + ce + "."));
|
|
21816
21816
|
}
|
|
@@ -21850,8 +21850,8 @@ function HT() {
|
|
|
21850
21850
|
return null;
|
|
21851
21851
|
$.data && r($.data, "expectedType") && ce.push($.data.expectedType);
|
|
21852
21852
|
}
|
|
21853
|
-
var
|
|
21854
|
-
return new _("Invalid " + ie + " `" + Q + "` supplied to " + ("`" + se + "`" +
|
|
21853
|
+
var He = ce.length > 0 ? ", expected one of type [" + ce.join(", ") + "]" : "";
|
|
21854
|
+
return new _("Invalid " + ie + " `" + Q + "` supplied to " + ("`" + se + "`" + He + "."));
|
|
21855
21855
|
}
|
|
21856
21856
|
return O(x);
|
|
21857
21857
|
}
|
|
@@ -21972,7 +21972,7 @@ Valid keys: ` + JSON.stringify(Object.keys(g), null, " ")
|
|
|
21972
21972
|
return Y;
|
|
21973
21973
|
}
|
|
21974
21974
|
}
|
|
21975
|
-
function
|
|
21975
|
+
function Fe(g) {
|
|
21976
21976
|
return !g.constructor || !g.constructor.name ? h : g.constructor.name;
|
|
21977
21977
|
}
|
|
21978
21978
|
return m.checkPropTypes = a, m.resetWarningCache = a.resetWarningCache, m.PropTypes = m, m;
|
|
@@ -22644,7 +22644,7 @@ const XT = Jo(
|
|
|
22644
22644
|
void 0
|
|
22645
22645
|
)
|
|
22646
22646
|
), QT = ({ isWidgetOpen: e, appToken: t }) => {
|
|
22647
|
-
const n =
|
|
22647
|
+
const n = Ve(null);
|
|
22648
22648
|
return /* @__PURE__ */ M.jsxDEV("div", { children: /* @__PURE__ */ M.jsxDEV(
|
|
22649
22649
|
Wi,
|
|
22650
22650
|
{
|
|
@@ -22784,18 +22784,18 @@ const XT = Jo(
|
|
|
22784
22784
|
contentType: "application/json"
|
|
22785
22785
|
});
|
|
22786
22786
|
fetch(`${f}/company/settings/${t}/${e}`, h).then(async (m) => {
|
|
22787
|
-
const
|
|
22788
|
-
a(
|
|
22787
|
+
const S = await m.json();
|
|
22788
|
+
a(S), u([
|
|
22789
22789
|
{
|
|
22790
22790
|
userType: "assistant",
|
|
22791
|
-
content:
|
|
22791
|
+
content: S.agent.text.initialText
|
|
22792
22792
|
}
|
|
22793
22793
|
]), n?.();
|
|
22794
22794
|
}).catch((m) => console.log("error in settings fetch", m));
|
|
22795
22795
|
}, [t, e]), { contextCompanySettings: i, contextInitialChatbotStartingText: d };
|
|
22796
22796
|
};
|
|
22797
22797
|
function s2(e, t = {}, n, r) {
|
|
22798
|
-
const { id: a, nonce: i, target: s, disableConstructable: u } = t, c = s ?? document.head, l =
|
|
22798
|
+
const { id: a, nonce: i, target: s, disableConstructable: u } = t, c = s ?? document.head, l = Ve(null), d = Ve(null);
|
|
22799
22799
|
$e(() => {
|
|
22800
22800
|
if (!e) {
|
|
22801
22801
|
n && (console.log("No custom css found."), r?.());
|
|
@@ -22808,8 +22808,8 @@ function s2(e, t = {}, n, r) {
|
|
|
22808
22808
|
]), l.current.replaceSync(e), console.log("Loading custom css via stylesheet."), r?.(), () => {
|
|
22809
22809
|
const h = c.adoptedStyleSheets || [], m = h.indexOf(l.current);
|
|
22810
22810
|
if (m >= 0) {
|
|
22811
|
-
const
|
|
22812
|
-
|
|
22811
|
+
const S = h.slice();
|
|
22812
|
+
S.splice(m, 1), c.adoptedStyleSheets = S;
|
|
22813
22813
|
}
|
|
22814
22814
|
l.current = null;
|
|
22815
22815
|
};
|
|
@@ -24501,68 +24501,57 @@ function C2({
|
|
|
24501
24501
|
displayMode: r,
|
|
24502
24502
|
...a
|
|
24503
24503
|
}) {
|
|
24504
|
-
const i =
|
|
24504
|
+
const i = Ve(null), [s, u] = Oe(null);
|
|
24505
24505
|
return Zo(() => {
|
|
24506
24506
|
if (typeof document > "u") return;
|
|
24507
|
-
const
|
|
24508
|
-
|
|
24509
|
-
const
|
|
24510
|
-
let
|
|
24507
|
+
const c = document.createElement("div");
|
|
24508
|
+
document.body.appendChild(c), i.current = c;
|
|
24509
|
+
const l = c.attachShadow({ mode: "open", delegatesFocus: !0 });
|
|
24510
|
+
let d = !1;
|
|
24511
24511
|
try {
|
|
24512
24512
|
if ("adoptedStyleSheets" in Document.prototype && !e) {
|
|
24513
|
-
const
|
|
24514
|
-
|
|
24515
|
-
...
|
|
24516
|
-
|
|
24517
|
-
],
|
|
24513
|
+
const h = new CSSStyleSheet();
|
|
24514
|
+
h.replaceSync(Ko), l.adoptedStyleSheets = [
|
|
24515
|
+
...l.adoptedStyleSheets ?? [],
|
|
24516
|
+
h
|
|
24517
|
+
], d = !0;
|
|
24518
24518
|
}
|
|
24519
24519
|
} catch {
|
|
24520
24520
|
}
|
|
24521
|
-
if (!
|
|
24521
|
+
if (!d)
|
|
24522
24522
|
if (e) {
|
|
24523
|
-
const
|
|
24524
|
-
|
|
24523
|
+
const h = document.createElement("link");
|
|
24524
|
+
h.rel = "stylesheet", h.href = e, l.appendChild(h);
|
|
24525
24525
|
} else {
|
|
24526
|
-
const
|
|
24527
|
-
|
|
24526
|
+
const h = document.createElement("style");
|
|
24527
|
+
h.textContent = Ko, l.appendChild(h);
|
|
24528
24528
|
}
|
|
24529
|
-
const
|
|
24530
|
-
return
|
|
24531
|
-
|
|
24529
|
+
const f = document.createElement("div");
|
|
24530
|
+
return l.appendChild(f), u(f), () => {
|
|
24531
|
+
c.remove(), i.current = null, u(null);
|
|
24532
24532
|
};
|
|
24533
24533
|
}, []), $e(() => {
|
|
24534
|
-
|
|
24535
|
-
}, []),
|
|
24536
|
-
|
|
24537
|
-
|
|
24538
|
-
|
|
24539
|
-
|
|
24540
|
-
|
|
24541
|
-
|
|
24542
|
-
|
|
24543
|
-
|
|
24544
|
-
|
|
24545
|
-
|
|
24546
|
-
|
|
24547
|
-
|
|
24548
|
-
|
|
24549
|
-
|
|
24550
|
-
|
|
24551
|
-
|
|
24552
|
-
|
|
24553
|
-
|
|
24554
|
-
|
|
24555
|
-
columnNumber: 9
|
|
24556
|
-
},
|
|
24557
|
-
this
|
|
24558
|
-
),
|
|
24559
|
-
c
|
|
24560
|
-
)
|
|
24561
|
-
] }, void 0, !0, {
|
|
24562
|
-
fileName: "/home/yoann/dev/aibot-client/lib/src/modules/app/App.tsx",
|
|
24563
|
-
lineNumber: 95,
|
|
24564
|
-
columnNumber: 5
|
|
24565
|
-
}, this) : null;
|
|
24534
|
+
i.current;
|
|
24535
|
+
}, []), s ? kl(
|
|
24536
|
+
/* @__PURE__ */ M.jsxDEV(
|
|
24537
|
+
h2,
|
|
24538
|
+
{
|
|
24539
|
+
...a,
|
|
24540
|
+
appToken: t,
|
|
24541
|
+
agentId: n,
|
|
24542
|
+
displayMode: r
|
|
24543
|
+
},
|
|
24544
|
+
void 0,
|
|
24545
|
+
!1,
|
|
24546
|
+
{
|
|
24547
|
+
fileName: "/home/yoann/dev/aibot-client/lib/src/modules/app/App.tsx",
|
|
24548
|
+
lineNumber: 85,
|
|
24549
|
+
columnNumber: 5
|
|
24550
|
+
},
|
|
24551
|
+
this
|
|
24552
|
+
),
|
|
24553
|
+
s
|
|
24554
|
+
) : null;
|
|
24566
24555
|
}
|
|
24567
24556
|
export {
|
|
24568
24557
|
C2 as App
|