react-markdown-table-ts 1.3.7 → 1.3.8
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/dark.png +0 -0
- package/dist/index.cjs +61 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1291 -0
- package/dist/light.png +0 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/validation.d.ts +18 -0
- package/dist/validation.d.ts.map +1 -0
- package/package.json +8 -4
package/dist/index.mjs
ADDED
@@ -0,0 +1,1291 @@
|
|
1
|
+
import Ie, { useRef as hr, useId as vr, useDeferredValue as br, useTransition as yr, useMemo as wr, useEffect as Ae } from "react";
|
2
|
+
import Er from "prismjs";
|
3
|
+
var K = { exports: {} }, W = {};
|
4
|
+
/**
|
5
|
+
* @license React
|
6
|
+
* react-jsx-runtime.production.min.js
|
7
|
+
*
|
8
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
9
|
+
*
|
10
|
+
* This source code is licensed under the MIT license found in the
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
12
|
+
*/
|
13
|
+
var $e;
|
14
|
+
function _r() {
|
15
|
+
if ($e) return W;
|
16
|
+
$e = 1;
|
17
|
+
var t = Ie, a = Symbol.for("react.element"), c = Symbol.for("react.fragment"), w = Object.prototype.hasOwnProperty, d = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
|
18
|
+
function l(f, o, p) {
|
19
|
+
var s, i = {}, g = null, b = null;
|
20
|
+
p !== void 0 && (g = "" + p), o.key !== void 0 && (g = "" + o.key), o.ref !== void 0 && (b = o.ref);
|
21
|
+
for (s in o) w.call(o, s) && !v.hasOwnProperty(s) && (i[s] = o[s]);
|
22
|
+
if (f && f.defaultProps) for (s in o = f.defaultProps, o) i[s] === void 0 && (i[s] = o[s]);
|
23
|
+
return { $$typeof: a, type: f, key: g, ref: b, props: i, _owner: d.current };
|
24
|
+
}
|
25
|
+
return W.Fragment = c, W.jsx = l, W.jsxs = l, W;
|
26
|
+
}
|
27
|
+
var H = {};
|
28
|
+
/**
|
29
|
+
* @license React
|
30
|
+
* react-jsx-runtime.development.js
|
31
|
+
*
|
32
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
33
|
+
*
|
34
|
+
* This source code is licensed under the MIT license found in the
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
36
|
+
*/
|
37
|
+
var Oe;
|
38
|
+
function Rr() {
|
39
|
+
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
|
40
|
+
var t = Ie, a = Symbol.for("react.element"), c = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), f = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), S = Symbol.iterator, C = "@@iterator";
|
41
|
+
function $(e) {
|
42
|
+
if (e === null || typeof e != "object")
|
43
|
+
return null;
|
44
|
+
var r = S && e[S] || e[C];
|
45
|
+
return typeof r == "function" ? r : null;
|
46
|
+
}
|
47
|
+
var R = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
48
|
+
function E(e) {
|
49
|
+
{
|
50
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
51
|
+
n[u - 1] = arguments[u];
|
52
|
+
j("error", e, n);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
function j(e, r, n) {
|
56
|
+
{
|
57
|
+
var u = R.ReactDebugCurrentFrame, y = u.getStackAddendum();
|
58
|
+
y !== "" && (r += "%s", n = n.concat([y]));
|
59
|
+
var _ = n.map(function(h) {
|
60
|
+
return String(h);
|
61
|
+
});
|
62
|
+
_.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, _);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
var Y = !1, De = !1, Me = !1, ze = !1, Le = !1, ae;
|
66
|
+
ae = Symbol.for("react.module.reference");
|
67
|
+
function We(e) {
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === w || e === v || Le || e === d || e === p || e === s || ze || e === b || Y || De || Me || typeof e == "object" && e !== null && (e.$$typeof === g || e.$$typeof === i || e.$$typeof === l || e.$$typeof === f || e.$$typeof === o || // This needs to include all possible module reference object
|
69
|
+
// types supported by any Flight configuration anywhere since
|
70
|
+
// we don't know which Flight build this will end up being used
|
71
|
+
// with.
|
72
|
+
e.$$typeof === ae || e.getModuleId !== void 0));
|
73
|
+
}
|
74
|
+
function He(e, r, n) {
|
75
|
+
var u = e.displayName;
|
76
|
+
if (u)
|
77
|
+
return u;
|
78
|
+
var y = r.displayName || r.name || "";
|
79
|
+
return y !== "" ? n + "(" + y + ")" : n;
|
80
|
+
}
|
81
|
+
function ie(e) {
|
82
|
+
return e.displayName || "Context";
|
83
|
+
}
|
84
|
+
function P(e) {
|
85
|
+
if (e == null)
|
86
|
+
return null;
|
87
|
+
if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
88
|
+
return e.displayName || e.name || null;
|
89
|
+
if (typeof e == "string")
|
90
|
+
return e;
|
91
|
+
switch (e) {
|
92
|
+
case w:
|
93
|
+
return "Fragment";
|
94
|
+
case c:
|
95
|
+
return "Portal";
|
96
|
+
case v:
|
97
|
+
return "Profiler";
|
98
|
+
case d:
|
99
|
+
return "StrictMode";
|
100
|
+
case p:
|
101
|
+
return "Suspense";
|
102
|
+
case s:
|
103
|
+
return "SuspenseList";
|
104
|
+
}
|
105
|
+
if (typeof e == "object")
|
106
|
+
switch (e.$$typeof) {
|
107
|
+
case f:
|
108
|
+
var r = e;
|
109
|
+
return ie(r) + ".Consumer";
|
110
|
+
case l:
|
111
|
+
var n = e;
|
112
|
+
return ie(n._context) + ".Provider";
|
113
|
+
case o:
|
114
|
+
return He(e, e.render, "ForwardRef");
|
115
|
+
case i:
|
116
|
+
var u = e.displayName || null;
|
117
|
+
return u !== null ? u : P(e.type) || "Memo";
|
118
|
+
case g: {
|
119
|
+
var y = e, _ = y._payload, h = y._init;
|
120
|
+
try {
|
121
|
+
return P(h(_));
|
122
|
+
} catch {
|
123
|
+
return null;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
return null;
|
128
|
+
}
|
129
|
+
var N = Object.assign, z = 0, oe, se, le, ue, ce, fe, de;
|
130
|
+
function pe() {
|
131
|
+
}
|
132
|
+
pe.__reactDisabledLog = !0;
|
133
|
+
function qe() {
|
134
|
+
{
|
135
|
+
if (z === 0) {
|
136
|
+
oe = console.log, se = console.info, le = console.warn, ue = console.error, ce = console.group, fe = console.groupCollapsed, de = console.groupEnd;
|
137
|
+
var e = {
|
138
|
+
configurable: !0,
|
139
|
+
enumerable: !0,
|
140
|
+
value: pe,
|
141
|
+
writable: !0
|
142
|
+
};
|
143
|
+
Object.defineProperties(console, {
|
144
|
+
info: e,
|
145
|
+
log: e,
|
146
|
+
warn: e,
|
147
|
+
error: e,
|
148
|
+
group: e,
|
149
|
+
groupCollapsed: e,
|
150
|
+
groupEnd: e
|
151
|
+
});
|
152
|
+
}
|
153
|
+
z++;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
function Ye() {
|
157
|
+
{
|
158
|
+
if (z--, z === 0) {
|
159
|
+
var e = {
|
160
|
+
configurable: !0,
|
161
|
+
enumerable: !0,
|
162
|
+
writable: !0
|
163
|
+
};
|
164
|
+
Object.defineProperties(console, {
|
165
|
+
log: N({}, e, {
|
166
|
+
value: oe
|
167
|
+
}),
|
168
|
+
info: N({}, e, {
|
169
|
+
value: se
|
170
|
+
}),
|
171
|
+
warn: N({}, e, {
|
172
|
+
value: le
|
173
|
+
}),
|
174
|
+
error: N({}, e, {
|
175
|
+
value: ue
|
176
|
+
}),
|
177
|
+
group: N({}, e, {
|
178
|
+
value: ce
|
179
|
+
}),
|
180
|
+
groupCollapsed: N({}, e, {
|
181
|
+
value: fe
|
182
|
+
}),
|
183
|
+
groupEnd: N({}, e, {
|
184
|
+
value: de
|
185
|
+
})
|
186
|
+
});
|
187
|
+
}
|
188
|
+
z < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
189
|
+
}
|
190
|
+
}
|
191
|
+
var G = R.ReactCurrentDispatcher, X;
|
192
|
+
function V(e, r, n) {
|
193
|
+
{
|
194
|
+
if (X === void 0)
|
195
|
+
try {
|
196
|
+
throw Error();
|
197
|
+
} catch (y) {
|
198
|
+
var u = y.stack.trim().match(/\n( *(at )?)/);
|
199
|
+
X = u && u[1] || "";
|
200
|
+
}
|
201
|
+
return `
|
202
|
+
` + X + e;
|
203
|
+
}
|
204
|
+
}
|
205
|
+
var Z = !1, U;
|
206
|
+
{
|
207
|
+
var Ve = typeof WeakMap == "function" ? WeakMap : Map;
|
208
|
+
U = new Ve();
|
209
|
+
}
|
210
|
+
function ge(e, r) {
|
211
|
+
if (!e || Z)
|
212
|
+
return "";
|
213
|
+
{
|
214
|
+
var n = U.get(e);
|
215
|
+
if (n !== void 0)
|
216
|
+
return n;
|
217
|
+
}
|
218
|
+
var u;
|
219
|
+
Z = !0;
|
220
|
+
var y = Error.prepareStackTrace;
|
221
|
+
Error.prepareStackTrace = void 0;
|
222
|
+
var _;
|
223
|
+
_ = G.current, G.current = null, qe();
|
224
|
+
try {
|
225
|
+
if (r) {
|
226
|
+
var h = function() {
|
227
|
+
throw Error();
|
228
|
+
};
|
229
|
+
if (Object.defineProperty(h.prototype, "props", {
|
230
|
+
set: function() {
|
231
|
+
throw Error();
|
232
|
+
}
|
233
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
234
|
+
try {
|
235
|
+
Reflect.construct(h, []);
|
236
|
+
} catch (A) {
|
237
|
+
u = A;
|
238
|
+
}
|
239
|
+
Reflect.construct(e, [], h);
|
240
|
+
} else {
|
241
|
+
try {
|
242
|
+
h.call();
|
243
|
+
} catch (A) {
|
244
|
+
u = A;
|
245
|
+
}
|
246
|
+
e.call(h.prototype);
|
247
|
+
}
|
248
|
+
} else {
|
249
|
+
try {
|
250
|
+
throw Error();
|
251
|
+
} catch (A) {
|
252
|
+
u = A;
|
253
|
+
}
|
254
|
+
e();
|
255
|
+
}
|
256
|
+
} catch (A) {
|
257
|
+
if (A && u && typeof A.stack == "string") {
|
258
|
+
for (var m = A.stack.split(`
|
259
|
+
`), T = u.stack.split(`
|
260
|
+
`), k = m.length - 1, x = T.length - 1; k >= 1 && x >= 0 && m[k] !== T[x]; )
|
261
|
+
x--;
|
262
|
+
for (; k >= 1 && x >= 0; k--, x--)
|
263
|
+
if (m[k] !== T[x]) {
|
264
|
+
if (k !== 1 || x !== 1)
|
265
|
+
do
|
266
|
+
if (k--, x--, x < 0 || m[k] !== T[x]) {
|
267
|
+
var O = `
|
268
|
+
` + m[k].replace(" at new ", " at ");
|
269
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, O), O;
|
270
|
+
}
|
271
|
+
while (k >= 1 && x >= 0);
|
272
|
+
break;
|
273
|
+
}
|
274
|
+
}
|
275
|
+
} finally {
|
276
|
+
Z = !1, G.current = _, Ye(), Error.prepareStackTrace = y;
|
277
|
+
}
|
278
|
+
var D = e ? e.displayName || e.name : "", I = D ? V(D) : "";
|
279
|
+
return typeof e == "function" && U.set(e, I), I;
|
280
|
+
}
|
281
|
+
function Ue(e, r, n) {
|
282
|
+
return ge(e, !1);
|
283
|
+
}
|
284
|
+
function Be(e) {
|
285
|
+
var r = e.prototype;
|
286
|
+
return !!(r && r.isReactComponent);
|
287
|
+
}
|
288
|
+
function B(e, r, n) {
|
289
|
+
if (e == null)
|
290
|
+
return "";
|
291
|
+
if (typeof e == "function")
|
292
|
+
return ge(e, Be(e));
|
293
|
+
if (typeof e == "string")
|
294
|
+
return V(e);
|
295
|
+
switch (e) {
|
296
|
+
case p:
|
297
|
+
return V("Suspense");
|
298
|
+
case s:
|
299
|
+
return V("SuspenseList");
|
300
|
+
}
|
301
|
+
if (typeof e == "object")
|
302
|
+
switch (e.$$typeof) {
|
303
|
+
case o:
|
304
|
+
return Ue(e.render);
|
305
|
+
case i:
|
306
|
+
return B(e.type, r, n);
|
307
|
+
case g: {
|
308
|
+
var u = e, y = u._payload, _ = u._init;
|
309
|
+
try {
|
310
|
+
return B(_(y), r, n);
|
311
|
+
} catch {
|
312
|
+
}
|
313
|
+
}
|
314
|
+
}
|
315
|
+
return "";
|
316
|
+
}
|
317
|
+
var L = Object.prototype.hasOwnProperty, me = {}, he = R.ReactDebugCurrentFrame;
|
318
|
+
function J(e) {
|
319
|
+
if (e) {
|
320
|
+
var r = e._owner, n = B(e.type, e._source, r ? r.type : null);
|
321
|
+
he.setExtraStackFrame(n);
|
322
|
+
} else
|
323
|
+
he.setExtraStackFrame(null);
|
324
|
+
}
|
325
|
+
function Je(e, r, n, u, y) {
|
326
|
+
{
|
327
|
+
var _ = Function.call.bind(L);
|
328
|
+
for (var h in e)
|
329
|
+
if (_(e, h)) {
|
330
|
+
var m = void 0;
|
331
|
+
try {
|
332
|
+
if (typeof e[h] != "function") {
|
333
|
+
var T = Error((u || "React class") + ": " + n + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
334
|
+
throw T.name = "Invariant Violation", T;
|
335
|
+
}
|
336
|
+
m = e[h](r, h, u, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
337
|
+
} catch (k) {
|
338
|
+
m = k;
|
339
|
+
}
|
340
|
+
m && !(m instanceof Error) && (J(y), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", n, h, typeof m), J(null)), m instanceof Error && !(m.message in me) && (me[m.message] = !0, J(y), E("Failed %s type: %s", n, m.message), J(null));
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
var Ke = Array.isArray;
|
345
|
+
function Q(e) {
|
346
|
+
return Ke(e);
|
347
|
+
}
|
348
|
+
function Ge(e) {
|
349
|
+
{
|
350
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
351
|
+
return n;
|
352
|
+
}
|
353
|
+
}
|
354
|
+
function Xe(e) {
|
355
|
+
try {
|
356
|
+
return ve(e), !1;
|
357
|
+
} catch {
|
358
|
+
return !0;
|
359
|
+
}
|
360
|
+
}
|
361
|
+
function ve(e) {
|
362
|
+
return "" + e;
|
363
|
+
}
|
364
|
+
function be(e) {
|
365
|
+
if (Xe(e))
|
366
|
+
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), ve(e);
|
367
|
+
}
|
368
|
+
var ye = R.ReactCurrentOwner, Ze = {
|
369
|
+
key: !0,
|
370
|
+
ref: !0,
|
371
|
+
__self: !0,
|
372
|
+
__source: !0
|
373
|
+
}, we, Ee;
|
374
|
+
function Qe(e) {
|
375
|
+
if (L.call(e, "ref")) {
|
376
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
377
|
+
if (r && r.isReactWarning)
|
378
|
+
return !1;
|
379
|
+
}
|
380
|
+
return e.ref !== void 0;
|
381
|
+
}
|
382
|
+
function er(e) {
|
383
|
+
if (L.call(e, "key")) {
|
384
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
385
|
+
if (r && r.isReactWarning)
|
386
|
+
return !1;
|
387
|
+
}
|
388
|
+
return e.key !== void 0;
|
389
|
+
}
|
390
|
+
function rr(e, r) {
|
391
|
+
typeof e.ref == "string" && ye.current;
|
392
|
+
}
|
393
|
+
function nr(e, r) {
|
394
|
+
{
|
395
|
+
var n = function() {
|
396
|
+
we || (we = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
397
|
+
};
|
398
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
399
|
+
get: n,
|
400
|
+
configurable: !0
|
401
|
+
});
|
402
|
+
}
|
403
|
+
}
|
404
|
+
function tr(e, r) {
|
405
|
+
{
|
406
|
+
var n = function() {
|
407
|
+
Ee || (Ee = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
408
|
+
};
|
409
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
410
|
+
get: n,
|
411
|
+
configurable: !0
|
412
|
+
});
|
413
|
+
}
|
414
|
+
}
|
415
|
+
var ar = function(e, r, n, u, y, _, h) {
|
416
|
+
var m = {
|
417
|
+
// This tag allows us to uniquely identify this as a React Element
|
418
|
+
$$typeof: a,
|
419
|
+
// Built-in properties that belong on the element
|
420
|
+
type: e,
|
421
|
+
key: r,
|
422
|
+
ref: n,
|
423
|
+
props: h,
|
424
|
+
// Record the component responsible for creating this element.
|
425
|
+
_owner: _
|
426
|
+
};
|
427
|
+
return m._store = {}, Object.defineProperty(m._store, "validated", {
|
428
|
+
configurable: !1,
|
429
|
+
enumerable: !1,
|
430
|
+
writable: !0,
|
431
|
+
value: !1
|
432
|
+
}), Object.defineProperty(m, "_self", {
|
433
|
+
configurable: !1,
|
434
|
+
enumerable: !1,
|
435
|
+
writable: !1,
|
436
|
+
value: u
|
437
|
+
}), Object.defineProperty(m, "_source", {
|
438
|
+
configurable: !1,
|
439
|
+
enumerable: !1,
|
440
|
+
writable: !1,
|
441
|
+
value: y
|
442
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
443
|
+
};
|
444
|
+
function ir(e, r, n, u, y) {
|
445
|
+
{
|
446
|
+
var _, h = {}, m = null, T = null;
|
447
|
+
n !== void 0 && (be(n), m = "" + n), er(r) && (be(r.key), m = "" + r.key), Qe(r) && (T = r.ref, rr(r, y));
|
448
|
+
for (_ in r)
|
449
|
+
L.call(r, _) && !Ze.hasOwnProperty(_) && (h[_] = r[_]);
|
450
|
+
if (e && e.defaultProps) {
|
451
|
+
var k = e.defaultProps;
|
452
|
+
for (_ in k)
|
453
|
+
h[_] === void 0 && (h[_] = k[_]);
|
454
|
+
}
|
455
|
+
if (m || T) {
|
456
|
+
var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
457
|
+
m && nr(h, x), T && tr(h, x);
|
458
|
+
}
|
459
|
+
return ar(e, m, T, y, u, ye.current, h);
|
460
|
+
}
|
461
|
+
}
|
462
|
+
var ee = R.ReactCurrentOwner, _e = R.ReactDebugCurrentFrame;
|
463
|
+
function F(e) {
|
464
|
+
if (e) {
|
465
|
+
var r = e._owner, n = B(e.type, e._source, r ? r.type : null);
|
466
|
+
_e.setExtraStackFrame(n);
|
467
|
+
} else
|
468
|
+
_e.setExtraStackFrame(null);
|
469
|
+
}
|
470
|
+
var re;
|
471
|
+
re = !1;
|
472
|
+
function ne(e) {
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
474
|
+
}
|
475
|
+
function Re() {
|
476
|
+
{
|
477
|
+
if (ee.current) {
|
478
|
+
var e = P(ee.current.type);
|
479
|
+
if (e)
|
480
|
+
return `
|
481
|
+
|
482
|
+
Check the render method of \`` + e + "`.";
|
483
|
+
}
|
484
|
+
return "";
|
485
|
+
}
|
486
|
+
}
|
487
|
+
function or(e) {
|
488
|
+
return "";
|
489
|
+
}
|
490
|
+
var ke = {};
|
491
|
+
function sr(e) {
|
492
|
+
{
|
493
|
+
var r = Re();
|
494
|
+
if (!r) {
|
495
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
496
|
+
n && (r = `
|
497
|
+
|
498
|
+
Check the top-level render call using <` + n + ">.");
|
499
|
+
}
|
500
|
+
return r;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
function xe(e, r) {
|
504
|
+
{
|
505
|
+
if (!e._store || e._store.validated || e.key != null)
|
506
|
+
return;
|
507
|
+
e._store.validated = !0;
|
508
|
+
var n = sr(r);
|
509
|
+
if (ke[n])
|
510
|
+
return;
|
511
|
+
ke[n] = !0;
|
512
|
+
var u = "";
|
513
|
+
e && e._owner && e._owner !== ee.current && (u = " It was passed a child from " + P(e._owner.type) + "."), F(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, u), F(null);
|
514
|
+
}
|
515
|
+
}
|
516
|
+
function Se(e, r) {
|
517
|
+
{
|
518
|
+
if (typeof e != "object")
|
519
|
+
return;
|
520
|
+
if (Q(e))
|
521
|
+
for (var n = 0; n < e.length; n++) {
|
522
|
+
var u = e[n];
|
523
|
+
ne(u) && xe(u, r);
|
524
|
+
}
|
525
|
+
else if (ne(e))
|
526
|
+
e._store && (e._store.validated = !0);
|
527
|
+
else if (e) {
|
528
|
+
var y = $(e);
|
529
|
+
if (typeof y == "function" && y !== e.entries)
|
530
|
+
for (var _ = y.call(e), h; !(h = _.next()).done; )
|
531
|
+
ne(h.value) && xe(h.value, r);
|
532
|
+
}
|
533
|
+
}
|
534
|
+
}
|
535
|
+
function lr(e) {
|
536
|
+
{
|
537
|
+
var r = e.type;
|
538
|
+
if (r == null || typeof r == "string")
|
539
|
+
return;
|
540
|
+
var n;
|
541
|
+
if (typeof r == "function")
|
542
|
+
n = r.propTypes;
|
543
|
+
else if (typeof r == "object" && (r.$$typeof === o || // Note: Memo only checks outer props here.
|
544
|
+
// Inner props are checked in the reconciler.
|
545
|
+
r.$$typeof === i))
|
546
|
+
n = r.propTypes;
|
547
|
+
else
|
548
|
+
return;
|
549
|
+
if (n) {
|
550
|
+
var u = P(r);
|
551
|
+
Je(n, e.props, "prop", u, e);
|
552
|
+
} else if (r.PropTypes !== void 0 && !re) {
|
553
|
+
re = !0;
|
554
|
+
var y = P(r);
|
555
|
+
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", y || "Unknown");
|
556
|
+
}
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
558
|
+
}
|
559
|
+
}
|
560
|
+
function ur(e) {
|
561
|
+
{
|
562
|
+
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
563
|
+
var u = r[n];
|
564
|
+
if (u !== "children" && u !== "key") {
|
565
|
+
F(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), F(null);
|
566
|
+
break;
|
567
|
+
}
|
568
|
+
}
|
569
|
+
e.ref !== null && (F(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
570
|
+
}
|
571
|
+
}
|
572
|
+
var Ce = {};
|
573
|
+
function Te(e, r, n, u, y, _) {
|
574
|
+
{
|
575
|
+
var h = We(e);
|
576
|
+
if (!h) {
|
577
|
+
var m = "";
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (m += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
579
|
+
var T = or();
|
580
|
+
T ? m += T : m += Re();
|
581
|
+
var k;
|
582
|
+
e === null ? k = "null" : Q(e) ? k = "array" : e !== void 0 && e.$$typeof === a ? (k = "<" + (P(e.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : k = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, m);
|
583
|
+
}
|
584
|
+
var x = ir(e, r, n, y, _);
|
585
|
+
if (x == null)
|
586
|
+
return x;
|
587
|
+
if (h) {
|
588
|
+
var O = r.children;
|
589
|
+
if (O !== void 0)
|
590
|
+
if (u)
|
591
|
+
if (Q(O)) {
|
592
|
+
for (var D = 0; D < O.length; D++)
|
593
|
+
Se(O[D], e);
|
594
|
+
Object.freeze && Object.freeze(O);
|
595
|
+
} else
|
596
|
+
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
597
|
+
else
|
598
|
+
Se(O, e);
|
599
|
+
}
|
600
|
+
if (L.call(r, "key")) {
|
601
|
+
var I = P(e), A = Object.keys(r).filter(function(mr) {
|
602
|
+
return mr !== "key";
|
603
|
+
}), te = A.length > 0 ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}";
|
604
|
+
if (!Ce[I + te]) {
|
605
|
+
var gr = A.length > 0 ? "{" + A.join(": ..., ") + ": ...}" : "{}";
|
606
|
+
E(`A props object containing a "key" prop is being spread into JSX:
|
607
|
+
let props = %s;
|
608
|
+
<%s {...props} />
|
609
|
+
React keys must be passed directly to JSX without using spread:
|
610
|
+
let props = %s;
|
611
|
+
<%s key={someKey} {...props} />`, te, I, gr, I), Ce[I + te] = !0;
|
612
|
+
}
|
613
|
+
}
|
614
|
+
return e === w ? ur(x) : lr(x), x;
|
615
|
+
}
|
616
|
+
}
|
617
|
+
function cr(e, r, n) {
|
618
|
+
return Te(e, r, n, !0);
|
619
|
+
}
|
620
|
+
function fr(e, r, n) {
|
621
|
+
return Te(e, r, n, !1);
|
622
|
+
}
|
623
|
+
var dr = fr, pr = cr;
|
624
|
+
H.Fragment = w, H.jsx = dr, H.jsxs = pr;
|
625
|
+
})()), H;
|
626
|
+
}
|
627
|
+
var je;
|
628
|
+
function kr() {
|
629
|
+
return je || (je = 1, process.env.NODE_ENV === "production" ? K.exports = _r() : K.exports = Rr()), K.exports;
|
630
|
+
}
|
631
|
+
var M = kr();
|
632
|
+
(function(t) {
|
633
|
+
var a = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
634
|
+
function c(s) {
|
635
|
+
return s = s.replace(/<inner>/g, function() {
|
636
|
+
return a;
|
637
|
+
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + s + ")");
|
638
|
+
}
|
639
|
+
var w = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, d = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
640
|
+
return w;
|
641
|
+
}), v = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
|
642
|
+
t.languages.markdown = t.languages.extend("markup", {}), t.languages.insertBefore("markdown", "prolog", {
|
643
|
+
"front-matter-block": {
|
644
|
+
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
645
|
+
lookbehind: !0,
|
646
|
+
greedy: !0,
|
647
|
+
inside: {
|
648
|
+
punctuation: /^---|---$/,
|
649
|
+
"front-matter": {
|
650
|
+
pattern: /\S+(?:\s+\S+)*/,
|
651
|
+
alias: ["yaml", "language-yaml"],
|
652
|
+
inside: t.languages.yaml
|
653
|
+
}
|
654
|
+
}
|
655
|
+
},
|
656
|
+
blockquote: {
|
657
|
+
// > ...
|
658
|
+
pattern: /^>(?:[\t ]*>)*/m,
|
659
|
+
alias: "punctuation"
|
660
|
+
},
|
661
|
+
table: {
|
662
|
+
pattern: RegExp("^" + d + v + "(?:" + d + ")*", "m"),
|
663
|
+
inside: {
|
664
|
+
"table-data-rows": {
|
665
|
+
pattern: RegExp("^(" + d + v + ")(?:" + d + ")*$"),
|
666
|
+
lookbehind: !0,
|
667
|
+
inside: {
|
668
|
+
"table-data": {
|
669
|
+
pattern: RegExp(w),
|
670
|
+
inside: t.languages.markdown
|
671
|
+
},
|
672
|
+
punctuation: /\|/
|
673
|
+
}
|
674
|
+
},
|
675
|
+
"table-line": {
|
676
|
+
pattern: RegExp("^(" + d + ")" + v + "$"),
|
677
|
+
lookbehind: !0,
|
678
|
+
inside: {
|
679
|
+
punctuation: /\||:?-{3,}:?/
|
680
|
+
}
|
681
|
+
},
|
682
|
+
"table-header-row": {
|
683
|
+
pattern: RegExp("^" + d + "$"),
|
684
|
+
inside: {
|
685
|
+
"table-header": {
|
686
|
+
pattern: RegExp(w),
|
687
|
+
alias: "important",
|
688
|
+
inside: t.languages.markdown
|
689
|
+
},
|
690
|
+
punctuation: /\|/
|
691
|
+
}
|
692
|
+
}
|
693
|
+
}
|
694
|
+
},
|
695
|
+
code: [
|
696
|
+
{
|
697
|
+
// Prefixed by 4 spaces or 1 tab and preceded by an empty line
|
698
|
+
pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
|
699
|
+
lookbehind: !0,
|
700
|
+
alias: "keyword"
|
701
|
+
},
|
702
|
+
{
|
703
|
+
// ```optional language
|
704
|
+
// code block
|
705
|
+
// ```
|
706
|
+
pattern: /^```[\s\S]*?^```$/m,
|
707
|
+
greedy: !0,
|
708
|
+
inside: {
|
709
|
+
"code-block": {
|
710
|
+
pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
|
711
|
+
lookbehind: !0
|
712
|
+
},
|
713
|
+
"code-language": {
|
714
|
+
pattern: /^(```).+/,
|
715
|
+
lookbehind: !0
|
716
|
+
},
|
717
|
+
punctuation: /```/
|
718
|
+
}
|
719
|
+
}
|
720
|
+
],
|
721
|
+
title: [
|
722
|
+
{
|
723
|
+
// title 1
|
724
|
+
// =======
|
725
|
+
// title 2
|
726
|
+
// -------
|
727
|
+
pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
|
728
|
+
alias: "important",
|
729
|
+
inside: {
|
730
|
+
punctuation: /==+$|--+$/
|
731
|
+
}
|
732
|
+
},
|
733
|
+
{
|
734
|
+
// # title 1
|
735
|
+
// ###### title 6
|
736
|
+
pattern: /(^\s*)#.+/m,
|
737
|
+
lookbehind: !0,
|
738
|
+
alias: "important",
|
739
|
+
inside: {
|
740
|
+
punctuation: /^#+|#+$/
|
741
|
+
}
|
742
|
+
}
|
743
|
+
],
|
744
|
+
hr: {
|
745
|
+
// ***
|
746
|
+
// ---
|
747
|
+
// * * *
|
748
|
+
// -----------
|
749
|
+
pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
|
750
|
+
lookbehind: !0,
|
751
|
+
alias: "punctuation"
|
752
|
+
},
|
753
|
+
list: {
|
754
|
+
// * item
|
755
|
+
// + item
|
756
|
+
// - item
|
757
|
+
// 1. item
|
758
|
+
pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
|
759
|
+
lookbehind: !0,
|
760
|
+
alias: "punctuation"
|
761
|
+
},
|
762
|
+
"url-reference": {
|
763
|
+
// [id]: http://example.com "Optional title"
|
764
|
+
// [id]: http://example.com 'Optional title'
|
765
|
+
// [id]: http://example.com (Optional title)
|
766
|
+
// [id]: <http://example.com> "Optional title"
|
767
|
+
pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
|
768
|
+
inside: {
|
769
|
+
variable: {
|
770
|
+
pattern: /^(!?\[)[^\]]+/,
|
771
|
+
lookbehind: !0
|
772
|
+
},
|
773
|
+
string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
|
774
|
+
punctuation: /^[\[\]!:]|[<>]/
|
775
|
+
},
|
776
|
+
alias: "url"
|
777
|
+
},
|
778
|
+
bold: {
|
779
|
+
// **strong**
|
780
|
+
// __strong__
|
781
|
+
// allow one nested instance of italic text using the same delimiter
|
782
|
+
pattern: c(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
|
783
|
+
lookbehind: !0,
|
784
|
+
greedy: !0,
|
785
|
+
inside: {
|
786
|
+
content: {
|
787
|
+
pattern: /(^..)[\s\S]+(?=..$)/,
|
788
|
+
lookbehind: !0,
|
789
|
+
inside: {}
|
790
|
+
// see below
|
791
|
+
},
|
792
|
+
punctuation: /\*\*|__/
|
793
|
+
}
|
794
|
+
},
|
795
|
+
italic: {
|
796
|
+
// *em*
|
797
|
+
// _em_
|
798
|
+
// allow one nested instance of bold text using the same delimiter
|
799
|
+
pattern: c(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
|
800
|
+
lookbehind: !0,
|
801
|
+
greedy: !0,
|
802
|
+
inside: {
|
803
|
+
content: {
|
804
|
+
pattern: /(^.)[\s\S]+(?=.$)/,
|
805
|
+
lookbehind: !0,
|
806
|
+
inside: {}
|
807
|
+
// see below
|
808
|
+
},
|
809
|
+
punctuation: /[*_]/
|
810
|
+
}
|
811
|
+
},
|
812
|
+
strike: {
|
813
|
+
// ~~strike through~~
|
814
|
+
// ~strike~
|
815
|
+
// eslint-disable-next-line regexp/strict
|
816
|
+
pattern: c(/(~~?)(?:(?!~)<inner>)+\2/.source),
|
817
|
+
lookbehind: !0,
|
818
|
+
greedy: !0,
|
819
|
+
inside: {
|
820
|
+
content: {
|
821
|
+
pattern: /(^~~?)[\s\S]+(?=\1$)/,
|
822
|
+
lookbehind: !0,
|
823
|
+
inside: {}
|
824
|
+
// see below
|
825
|
+
},
|
826
|
+
punctuation: /~~?/
|
827
|
+
}
|
828
|
+
},
|
829
|
+
"code-snippet": {
|
830
|
+
// `code`
|
831
|
+
// ``code``
|
832
|
+
pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
|
833
|
+
lookbehind: !0,
|
834
|
+
greedy: !0,
|
835
|
+
alias: ["code", "keyword"]
|
836
|
+
},
|
837
|
+
url: {
|
838
|
+
// [example](http://example.com "Optional title")
|
839
|
+
// [example][id]
|
840
|
+
// [example] [id]
|
841
|
+
pattern: c(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
|
842
|
+
lookbehind: !0,
|
843
|
+
greedy: !0,
|
844
|
+
inside: {
|
845
|
+
operator: /^!/,
|
846
|
+
content: {
|
847
|
+
pattern: /(^\[)[^\]]+(?=\])/,
|
848
|
+
lookbehind: !0,
|
849
|
+
inside: {}
|
850
|
+
// see below
|
851
|
+
},
|
852
|
+
variable: {
|
853
|
+
pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
|
854
|
+
lookbehind: !0
|
855
|
+
},
|
856
|
+
url: {
|
857
|
+
pattern: /(^\]\()[^\s)]+/,
|
858
|
+
lookbehind: !0
|
859
|
+
},
|
860
|
+
string: {
|
861
|
+
pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
|
862
|
+
lookbehind: !0
|
863
|
+
}
|
864
|
+
}
|
865
|
+
}
|
866
|
+
}), ["url", "bold", "italic", "strike"].forEach(function(s) {
|
867
|
+
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(i) {
|
868
|
+
s !== i && (t.languages.markdown[s].inside.content.inside[i] = t.languages.markdown[i]);
|
869
|
+
});
|
870
|
+
}), t.hooks.add("after-tokenize", function(s) {
|
871
|
+
if (s.language !== "markdown" && s.language !== "md")
|
872
|
+
return;
|
873
|
+
function i(g) {
|
874
|
+
if (!(!g || typeof g == "string"))
|
875
|
+
for (var b = 0, S = g.length; b < S; b++) {
|
876
|
+
var C = g[b];
|
877
|
+
if (C.type !== "code") {
|
878
|
+
i(C.content);
|
879
|
+
continue;
|
880
|
+
}
|
881
|
+
var $ = C.content[1], R = C.content[3];
|
882
|
+
if ($ && R && $.type === "code-language" && R.type === "code-block" && typeof $.content == "string") {
|
883
|
+
var E = $.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
884
|
+
E = (/[a-z][\w-]*/i.exec(E) || [""])[0].toLowerCase();
|
885
|
+
var j = "language-" + E;
|
886
|
+
R.alias ? typeof R.alias == "string" ? R.alias = [R.alias, j] : R.alias.push(j) : R.alias = [j];
|
887
|
+
}
|
888
|
+
}
|
889
|
+
}
|
890
|
+
i(s.tokens);
|
891
|
+
}), t.hooks.add("wrap", function(s) {
|
892
|
+
if (s.type === "code-block") {
|
893
|
+
for (var i = "", g = 0, b = s.classes.length; g < b; g++) {
|
894
|
+
var S = s.classes[g], C = /language-(.+)/.exec(S);
|
895
|
+
if (C) {
|
896
|
+
i = C[1];
|
897
|
+
break;
|
898
|
+
}
|
899
|
+
}
|
900
|
+
var $ = t.languages[i];
|
901
|
+
if ($)
|
902
|
+
s.content = t.highlight(p(s.content), $, i);
|
903
|
+
else if (i && i !== "none" && t.plugins.autoloader) {
|
904
|
+
var R = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
|
905
|
+
s.attributes.id = R, t.plugins.autoloader.loadLanguages(i, function() {
|
906
|
+
var E = document.getElementById(R);
|
907
|
+
E && (E.innerHTML = t.highlight(E.textContent, t.languages[i], i));
|
908
|
+
});
|
909
|
+
}
|
910
|
+
}
|
911
|
+
});
|
912
|
+
var l = RegExp(t.languages.markup.tag.pattern.source, "gi"), f = {
|
913
|
+
amp: "&",
|
914
|
+
lt: "<",
|
915
|
+
gt: ">",
|
916
|
+
quot: '"'
|
917
|
+
}, o = String.fromCodePoint || String.fromCharCode;
|
918
|
+
function p(s) {
|
919
|
+
var i = s.replace(l, "");
|
920
|
+
return i = i.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(g, b) {
|
921
|
+
if (b = b.toLowerCase(), b[0] === "#") {
|
922
|
+
var S;
|
923
|
+
return b[1] === "x" ? S = parseInt(b.slice(2), 16) : S = Number(b.slice(1)), o(S);
|
924
|
+
} else {
|
925
|
+
var C = f[b];
|
926
|
+
return C || g;
|
927
|
+
}
|
928
|
+
}), i;
|
929
|
+
}
|
930
|
+
t.languages.md = t.languages.markdown;
|
931
|
+
})(Prism);
|
932
|
+
var Pe = {}, Ne;
|
933
|
+
function xr() {
|
934
|
+
return Ne || (Ne = 1, (function() {
|
935
|
+
if (typeof Prism > "u" || typeof document > "u")
|
936
|
+
return;
|
937
|
+
var t = "line-numbers", a = /\n(?!$)/g, c = Prism.plugins.lineNumbers = {
|
938
|
+
/**
|
939
|
+
* Get node for provided line number
|
940
|
+
*
|
941
|
+
* @param {Element} element pre element
|
942
|
+
* @param {number} number line number
|
943
|
+
* @returns {Element|undefined}
|
944
|
+
*/
|
945
|
+
getLine: function(l, f) {
|
946
|
+
if (!(l.tagName !== "PRE" || !l.classList.contains(t))) {
|
947
|
+
var o = l.querySelector(".line-numbers-rows");
|
948
|
+
if (o) {
|
949
|
+
var p = parseInt(l.getAttribute("data-start"), 10) || 1, s = p + (o.children.length - 1);
|
950
|
+
f < p && (f = p), f > s && (f = s);
|
951
|
+
var i = f - p;
|
952
|
+
return o.children[i];
|
953
|
+
}
|
954
|
+
}
|
955
|
+
},
|
956
|
+
/**
|
957
|
+
* Resizes the line numbers of the given element.
|
958
|
+
*
|
959
|
+
* This function will not add line numbers. It will only resize existing ones.
|
960
|
+
*
|
961
|
+
* @param {HTMLElement} element A `<pre>` element with line numbers.
|
962
|
+
* @returns {void}
|
963
|
+
*/
|
964
|
+
resize: function(l) {
|
965
|
+
w([l]);
|
966
|
+
},
|
967
|
+
/**
|
968
|
+
* Whether the plugin can assume that the units font sizes and margins are not depended on the size of
|
969
|
+
* the current viewport.
|
970
|
+
*
|
971
|
+
* Setting this to `true` will allow the plugin to do certain optimizations for better performance.
|
972
|
+
*
|
973
|
+
* Set this to `false` if you use any of the following CSS units: `vh`, `vw`, `vmin`, `vmax`.
|
974
|
+
*
|
975
|
+
* @type {boolean}
|
976
|
+
*/
|
977
|
+
assumeViewportIndependence: !0
|
978
|
+
};
|
979
|
+
function w(l) {
|
980
|
+
if (l = l.filter(function(o) {
|
981
|
+
var p = d(o), s = p["white-space"];
|
982
|
+
return s === "pre-wrap" || s === "pre-line";
|
983
|
+
}), l.length != 0) {
|
984
|
+
var f = l.map(function(o) {
|
985
|
+
var p = o.querySelector("code"), s = o.querySelector(".line-numbers-rows");
|
986
|
+
if (!(!p || !s)) {
|
987
|
+
var i = o.querySelector(".line-numbers-sizer"), g = p.textContent.split(a);
|
988
|
+
i || (i = document.createElement("span"), i.className = "line-numbers-sizer", p.appendChild(i)), i.innerHTML = "0", i.style.display = "block";
|
989
|
+
var b = i.getBoundingClientRect().height;
|
990
|
+
return i.innerHTML = "", {
|
991
|
+
element: o,
|
992
|
+
lines: g,
|
993
|
+
lineHeights: [],
|
994
|
+
oneLinerHeight: b,
|
995
|
+
sizer: i
|
996
|
+
};
|
997
|
+
}
|
998
|
+
}).filter(Boolean);
|
999
|
+
f.forEach(function(o) {
|
1000
|
+
var p = o.sizer, s = o.lines, i = o.lineHeights, g = o.oneLinerHeight;
|
1001
|
+
i[s.length - 1] = void 0, s.forEach(function(b, S) {
|
1002
|
+
if (b && b.length > 1) {
|
1003
|
+
var C = p.appendChild(document.createElement("span"));
|
1004
|
+
C.style.display = "block", C.textContent = b;
|
1005
|
+
} else
|
1006
|
+
i[S] = g;
|
1007
|
+
});
|
1008
|
+
}), f.forEach(function(o) {
|
1009
|
+
for (var p = o.sizer, s = o.lineHeights, i = 0, g = 0; g < s.length; g++)
|
1010
|
+
s[g] === void 0 && (s[g] = p.children[i++].getBoundingClientRect().height);
|
1011
|
+
}), f.forEach(function(o) {
|
1012
|
+
var p = o.sizer, s = o.element.querySelector(".line-numbers-rows");
|
1013
|
+
p.style.display = "none", p.innerHTML = "", o.lineHeights.forEach(function(i, g) {
|
1014
|
+
s.children[g].style.height = i + "px";
|
1015
|
+
});
|
1016
|
+
});
|
1017
|
+
}
|
1018
|
+
}
|
1019
|
+
function d(l) {
|
1020
|
+
return l ? window.getComputedStyle ? getComputedStyle(l) : l.currentStyle || null : null;
|
1021
|
+
}
|
1022
|
+
var v = void 0;
|
1023
|
+
window.addEventListener("resize", function() {
|
1024
|
+
c.assumeViewportIndependence && v === window.innerWidth || (v = window.innerWidth, w(Array.prototype.slice.call(document.querySelectorAll("pre." + t))));
|
1025
|
+
}), Prism.hooks.add("complete", function(l) {
|
1026
|
+
if (l.code) {
|
1027
|
+
var f = (
|
1028
|
+
/** @type {Element} */
|
1029
|
+
l.element
|
1030
|
+
), o = (
|
1031
|
+
/** @type {HTMLElement} */
|
1032
|
+
f.parentNode
|
1033
|
+
);
|
1034
|
+
if (!(!o || !/pre/i.test(o.nodeName)) && !f.querySelector(".line-numbers-rows") && Prism.util.isActive(f, t)) {
|
1035
|
+
f.classList.remove(t), o.classList.add(t);
|
1036
|
+
var p = l.code.match(a), s = p ? p.length + 1 : 1, i, g = new Array(s + 1).join("<span></span>");
|
1037
|
+
i = document.createElement("span"), i.setAttribute("aria-hidden", "true"), i.className = "line-numbers-rows", i.innerHTML = g, o.hasAttribute("data-start") && (o.style.counterReset = "linenumber " + (parseInt(o.getAttribute("data-start"), 10) - 1)), l.element.appendChild(i), w([o]), Prism.hooks.run("line-numbers", l);
|
1038
|
+
}
|
1039
|
+
}
|
1040
|
+
}), Prism.hooks.add("line-numbers", function(l) {
|
1041
|
+
l.plugins = l.plugins || {}, l.plugins.lineNumbers = !0;
|
1042
|
+
});
|
1043
|
+
})()), Pe;
|
1044
|
+
}
|
1045
|
+
xr();
|
1046
|
+
function Fe(t) {
|
1047
|
+
return t.useTabs ? " " : t.hasPadding ? " " : "";
|
1048
|
+
}
|
1049
|
+
class Sr {
|
1050
|
+
padding;
|
1051
|
+
constructor(a) {
|
1052
|
+
this.padding = Fe(a);
|
1053
|
+
}
|
1054
|
+
formatCell(a, c, w) {
|
1055
|
+
const d = w;
|
1056
|
+
switch (c) {
|
1057
|
+
case "right":
|
1058
|
+
return `${this.padding}${a.padStart(d)}${this.padding}`;
|
1059
|
+
case "center": {
|
1060
|
+
const v = d - a.length, l = Math.floor(v / 2), f = v - l;
|
1061
|
+
return `${this.padding}${" ".repeat(l)}${a}${" ".repeat(f)}${this.padding}`;
|
1062
|
+
}
|
1063
|
+
default:
|
1064
|
+
return `${this.padding}${a.padEnd(d)}${this.padding}`;
|
1065
|
+
}
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
class Cr {
|
1069
|
+
static indicators = {
|
1070
|
+
left: (a) => `:${"-".repeat(a - 1)}`,
|
1071
|
+
right: (a) => `${"-".repeat(a - 1)}:`,
|
1072
|
+
center: (a) => `:${"-".repeat(a - 2)}:`,
|
1073
|
+
none: (a) => "-".repeat(a)
|
1074
|
+
};
|
1075
|
+
static formatIndicator(a, c) {
|
1076
|
+
return this.indicators[a](c);
|
1077
|
+
}
|
1078
|
+
}
|
1079
|
+
class Tr {
|
1080
|
+
config;
|
1081
|
+
cellFormatter;
|
1082
|
+
adjustedAlignments;
|
1083
|
+
constructor(a) {
|
1084
|
+
this.config = a, this.cellFormatter = new Sr(a), this.adjustedAlignments = this.getAdjustedAlignments();
|
1085
|
+
}
|
1086
|
+
getAdjustedAlignments() {
|
1087
|
+
return this.config.columnAlignments.length < this.config.columnCount ? [
|
1088
|
+
...Array.from(this.config.columnAlignments),
|
1089
|
+
...Array(this.config.columnCount - this.config.columnAlignments.length).fill("none")
|
1090
|
+
] : Array.from(this.config.columnAlignments);
|
1091
|
+
}
|
1092
|
+
formatRow(a) {
|
1093
|
+
return `|${Array.from({ length: this.config.columnCount }, (w, d) => {
|
1094
|
+
let v = a[d] ?? "";
|
1095
|
+
this.config.replaceNewlines && (v = v.replace(/\n/g, "<br>"));
|
1096
|
+
const l = this.adjustedAlignments[d], f = this.config.columnWidths ? this.config.columnWidths[d] : v.length;
|
1097
|
+
return this.cellFormatter.formatCell(v, l, f);
|
1098
|
+
}).join("|")}|`;
|
1099
|
+
}
|
1100
|
+
formatAlignmentRow() {
|
1101
|
+
const a = Fe(this.config);
|
1102
|
+
return `|${Array.from({ length: this.config.columnCount }, (w, d) => {
|
1103
|
+
const v = this.adjustedAlignments[d], l = this.config.columnWidths ? this.config.columnWidths[d] : 3, f = Cr.formatIndicator(v, l);
|
1104
|
+
return `${a}${f}${a}`;
|
1105
|
+
}).join("|")}|`;
|
1106
|
+
}
|
1107
|
+
}
|
1108
|
+
function Ar(t, a) {
|
1109
|
+
const c = new Array(a).fill(3);
|
1110
|
+
return t.forEach((w) => {
|
1111
|
+
for (let d = 0; d < a; d++) {
|
1112
|
+
const v = w[d] ?? "";
|
1113
|
+
c[d] = Math.max(c[d], v.length);
|
1114
|
+
}
|
1115
|
+
}), c;
|
1116
|
+
}
|
1117
|
+
function $r(t) {
|
1118
|
+
const a = t.inputDataHeader.length, c = t.inputDataBody.map((w) => w.length);
|
1119
|
+
return Math.max(a, ...c);
|
1120
|
+
}
|
1121
|
+
function Or(t, a, c) {
|
1122
|
+
return c ? Ar(
|
1123
|
+
[t.inputDataHeader, ...t.inputDataBody],
|
1124
|
+
a
|
1125
|
+
) : void 0;
|
1126
|
+
}
|
1127
|
+
function jr(t, a, c = !0, w = !1, d = !1, v = !0) {
|
1128
|
+
const l = $r(t), f = Or(t, l, c), o = {
|
1129
|
+
columnCount: l,
|
1130
|
+
columnAlignments: a,
|
1131
|
+
columnWidths: f,
|
1132
|
+
useTabs: w,
|
1133
|
+
replaceNewlines: d,
|
1134
|
+
hasPadding: v
|
1135
|
+
}, p = new Tr(o), s = p.formatRow(t.inputDataHeader), i = p.formatAlignmentRow(), g = t.inputDataBody.map((b) => p.formatRow(b)).join(`
|
1136
|
+
`);
|
1137
|
+
return `${s}
|
1138
|
+
${i}
|
1139
|
+
${g}`.trimEnd();
|
1140
|
+
}
|
1141
|
+
function Pr(t) {
|
1142
|
+
let a = "", c = t;
|
1143
|
+
for (; c >= 0; )
|
1144
|
+
a = String.fromCharCode(c % 26 + 65) + a, c = Math.floor(c / 26) - 1;
|
1145
|
+
return a;
|
1146
|
+
}
|
1147
|
+
function Nr(t) {
|
1148
|
+
return Array.from({ length: t }, (a, c) => Pr(c));
|
1149
|
+
}
|
1150
|
+
class q extends Error {
|
1151
|
+
constructor(a, c) {
|
1152
|
+
super(a, c), this.name = "MarkdownTableError", Object.setPrototypeOf(this, q.prototype);
|
1153
|
+
}
|
1154
|
+
}
|
1155
|
+
function Ir(t) {
|
1156
|
+
if (t === null || !Array.isArray(t))
|
1157
|
+
throw new q("The 'data' prop must be a two-dimensional array.");
|
1158
|
+
if (t.length === 0)
|
1159
|
+
throw new q("The 'data' array must contain at least one row.");
|
1160
|
+
}
|
1161
|
+
const Fr = `
|
1162
|
+
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}pre[class*=language-].line-numbers{position:relative;padding-left:2.4em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.5em;text-align:right}
|
1163
|
+
`, Dr = `
|
1164
|
+
code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#282a36}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}pre[class*=language-].line-numbers{position:relative;padding-left:2.4em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.5em;text-align:right}
|
1165
|
+
`;
|
1166
|
+
function Mr(t, a) {
|
1167
|
+
return a ? { inputDataHeader: t[0], inputDataBody: t.slice(1) } : { inputDataHeader: Nr(t[0].length), inputDataBody: t };
|
1168
|
+
}
|
1169
|
+
function zr(t, a, c, w, d, v, l) {
|
1170
|
+
try {
|
1171
|
+
Ir(t);
|
1172
|
+
const { inputDataHeader: f, inputDataBody: o } = Mr(t, a);
|
1173
|
+
return jr(
|
1174
|
+
{ inputDataHeader: f, inputDataBody: o },
|
1175
|
+
c,
|
1176
|
+
w,
|
1177
|
+
d,
|
1178
|
+
v,
|
1179
|
+
l
|
1180
|
+
);
|
1181
|
+
} catch (f) {
|
1182
|
+
if (f instanceof q)
|
1183
|
+
return `Error: ${f.message}`;
|
1184
|
+
throw f;
|
1185
|
+
}
|
1186
|
+
}
|
1187
|
+
function Hr({
|
1188
|
+
inputData: t = null,
|
1189
|
+
hasHeader: a = !0,
|
1190
|
+
columnAlignments: c = [],
|
1191
|
+
isCompact: w = !1,
|
1192
|
+
hasTabs: d = !1,
|
1193
|
+
hasPadding: v = !0,
|
1194
|
+
convertLineBreaks: l = !1,
|
1195
|
+
className: f,
|
1196
|
+
onGenerate: o,
|
1197
|
+
theme: p = "light",
|
1198
|
+
preStyle: s,
|
1199
|
+
topPadding: i = 16,
|
1200
|
+
minWidth: g,
|
1201
|
+
showLineNumbers: b = !0
|
1202
|
+
}) {
|
1203
|
+
const S = hr(null), C = vr(), $ = br(t), [, R] = yr(), E = wr(() => zr(
|
1204
|
+
$,
|
1205
|
+
a,
|
1206
|
+
c,
|
1207
|
+
!w,
|
1208
|
+
d,
|
1209
|
+
l,
|
1210
|
+
v
|
1211
|
+
), [
|
1212
|
+
$,
|
1213
|
+
a,
|
1214
|
+
c,
|
1215
|
+
w,
|
1216
|
+
d,
|
1217
|
+
l,
|
1218
|
+
v
|
1219
|
+
]);
|
1220
|
+
return Ae(() => {
|
1221
|
+
o && o(E);
|
1222
|
+
}, [E, o]), Ae(() => {
|
1223
|
+
const j = S.current?.querySelector("code");
|
1224
|
+
j && E && R(() => {
|
1225
|
+
requestAnimationFrame(() => {
|
1226
|
+
if (Er.highlightElement(j), !b && S.current) {
|
1227
|
+
const Y = S.current.querySelector(".line-numbers-rows");
|
1228
|
+
Y && Y.remove();
|
1229
|
+
}
|
1230
|
+
});
|
1231
|
+
});
|
1232
|
+
}, [E, R, b]), /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
|
1233
|
+
/* @__PURE__ */ M.jsxs("style", { children: [
|
1234
|
+
p === "light" ? Fr : Dr,
|
1235
|
+
`
|
1236
|
+
pre {
|
1237
|
+
position: relative;
|
1238
|
+
padding-top: ${i}px !important;
|
1239
|
+
}
|
1240
|
+
pre::before {
|
1241
|
+
position: absolute;
|
1242
|
+
top: 8px;
|
1243
|
+
left: 12px;
|
1244
|
+
color: ${p === "light" ? "#666" : "#999"};
|
1245
|
+
letter-spacing: 2px;
|
1246
|
+
font-size: 12px;
|
1247
|
+
}
|
1248
|
+
/* Hide line numbers when showLineNumbers is false */
|
1249
|
+
pre:not(.line-numbers) .line-numbers-rows {
|
1250
|
+
display: none !important;
|
1251
|
+
}
|
1252
|
+
/* Remove left padding when line numbers are hidden */
|
1253
|
+
pre:not(.line-numbers) {
|
1254
|
+
padding-left: 1em !important;
|
1255
|
+
}
|
1256
|
+
pre:not(.line-numbers) > code {
|
1257
|
+
padding-left: 0 !important;
|
1258
|
+
}
|
1259
|
+
`
|
1260
|
+
] }),
|
1261
|
+
/* @__PURE__ */ M.jsx(
|
1262
|
+
"div",
|
1263
|
+
{
|
1264
|
+
id: C,
|
1265
|
+
style: {
|
1266
|
+
position: "relative",
|
1267
|
+
isolation: "isolate",
|
1268
|
+
display: "inline-block"
|
1269
|
+
},
|
1270
|
+
children: /* @__PURE__ */ M.jsx(
|
1271
|
+
"pre",
|
1272
|
+
{
|
1273
|
+
ref: S,
|
1274
|
+
className: `${f} language-markdown ${b ? "line-numbers" : ""} ${p === "dark" ? "dark-theme" : ""}`,
|
1275
|
+
style: {
|
1276
|
+
width: "fit-content",
|
1277
|
+
minWidth: g ? `${g}px` : "min-content",
|
1278
|
+
margin: 0,
|
1279
|
+
...s
|
1280
|
+
},
|
1281
|
+
children: /* @__PURE__ */ M.jsx("code", { className: "language-markdown", role: "code", children: E })
|
1282
|
+
}
|
1283
|
+
)
|
1284
|
+
}
|
1285
|
+
)
|
1286
|
+
] });
|
1287
|
+
}
|
1288
|
+
export {
|
1289
|
+
Hr as MarkdownTable,
|
1290
|
+
q as MarkdownTableError
|
1291
|
+
};
|