@hep-code-runner/react 1.4.0 → 1.5.1
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.js +130 -13
- package/dist/index.mjs +731 -604
- package/package.json +2 -2
- package/dist/style.css +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import qe, { useRef as
|
|
1
|
+
import qe, { useRef as Oe, useMemo as Ee, useEffect as ke, useState as Z, useCallback as le, forwardRef as xt, useImperativeHandle as kt } from "react";
|
|
2
2
|
var Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function St(u) {
|
|
4
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
5
5
|
}
|
|
6
6
|
var Ie = { exports: {} }, be = {};
|
|
7
7
|
/**
|
|
@@ -14,18 +14,18 @@ var Ie = { exports: {} }, be = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var Xe;
|
|
17
|
-
function
|
|
17
|
+
function wt() {
|
|
18
18
|
if (Xe) return be;
|
|
19
19
|
Xe = 1;
|
|
20
|
-
var
|
|
21
|
-
function
|
|
20
|
+
var u = qe, d = Symbol.for("react.element"), n = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, m = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function k(l, b, y) {
|
|
22
22
|
var _, O = {}, D = null, I = null;
|
|
23
|
-
y !== void 0 && (D = "" + y),
|
|
24
|
-
for (_ in
|
|
25
|
-
if (l && l.defaultProps) for (_ in
|
|
26
|
-
return { $$typeof:
|
|
23
|
+
y !== void 0 && (D = "" + y), b.key !== void 0 && (D = "" + b.key), b.ref !== void 0 && (I = b.ref);
|
|
24
|
+
for (_ in b) p.call(b, _) && !R.hasOwnProperty(_) && (O[_] = b[_]);
|
|
25
|
+
if (l && l.defaultProps) for (_ in b = l.defaultProps, b) O[_] === void 0 && (O[_] = b[_]);
|
|
26
|
+
return { $$typeof: d, type: l, key: D, ref: I, props: O, _owner: m.current };
|
|
27
27
|
}
|
|
28
|
-
return be.Fragment = n, be.jsx =
|
|
28
|
+
return be.Fragment = n, be.jsx = k, be.jsxs = k, be;
|
|
29
29
|
}
|
|
30
30
|
var ve = {};
|
|
31
31
|
/**
|
|
@@ -38,48 +38,48 @@ var ve = {};
|
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
40
|
var Ke;
|
|
41
|
-
function
|
|
41
|
+
function At() {
|
|
42
42
|
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var
|
|
44
|
-
function
|
|
43
|
+
var u = qe, d = Symbol.for("react.element"), n = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), l = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), B = Symbol.iterator, F = "@@iterator";
|
|
44
|
+
function S(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
47
|
var a = B && e[B] || e[F];
|
|
48
48
|
return typeof a == "function" ? a : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var T = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function t(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var a = arguments.length,
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
for (var a = arguments.length, c = new Array(a > 1 ? a - 1 : 0), v = 1; v < a; v++)
|
|
54
|
+
c[v - 1] = arguments[v];
|
|
55
|
+
r("error", e, c);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function r(e, a, c) {
|
|
59
59
|
{
|
|
60
|
-
var v =
|
|
61
|
-
N !== "" && (a += "%s",
|
|
62
|
-
var L =
|
|
63
|
-
return String(
|
|
60
|
+
var v = T.ReactDebugCurrentFrame, N = v.getStackAddendum();
|
|
61
|
+
N !== "" && (a += "%s", c = c.concat([N]));
|
|
62
|
+
var L = c.map(function(A) {
|
|
63
|
+
return String(A);
|
|
64
64
|
});
|
|
65
65
|
L.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, L);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var i = !1,
|
|
68
|
+
var i = !1, o = !1, s = !1, f = !1, E = !1, g;
|
|
69
69
|
g = Symbol.for("react.module.reference");
|
|
70
70
|
function C(e) {
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === p || e === R || E || e === m || e === y || e === _ || f || e === I || i || o || s || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === O || e.$$typeof === k || e.$$typeof === l || e.$$typeof === b || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
75
|
e.$$typeof === g || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function P(e, a,
|
|
77
|
+
function P(e, a, c) {
|
|
78
78
|
var v = e.displayName;
|
|
79
79
|
if (v)
|
|
80
80
|
return v;
|
|
81
81
|
var N = a.displayName || a.name || "";
|
|
82
|
-
return N !== "" ?
|
|
82
|
+
return N !== "" ? c + "(" + N + ")" : c;
|
|
83
83
|
}
|
|
84
84
|
function z(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
@@ -87,18 +87,18 @@ function Tr() {
|
|
|
87
87
|
function V(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
if (typeof e.tag == "number" && t("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
91
91
|
return e.displayName || e.name || null;
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
94
94
|
switch (e) {
|
|
95
|
-
case
|
|
95
|
+
case p:
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case n:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case R:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case m:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case y:
|
|
104
104
|
return "Suspense";
|
|
@@ -110,18 +110,18 @@ function Tr() {
|
|
|
110
110
|
case l:
|
|
111
111
|
var a = e;
|
|
112
112
|
return z(a) + ".Consumer";
|
|
113
|
-
case
|
|
114
|
-
var
|
|
115
|
-
return z(
|
|
116
|
-
case
|
|
113
|
+
case k:
|
|
114
|
+
var c = e;
|
|
115
|
+
return z(c._context) + ".Provider";
|
|
116
|
+
case b:
|
|
117
117
|
return P(e, e.render, "ForwardRef");
|
|
118
118
|
case O:
|
|
119
119
|
var v = e.displayName || null;
|
|
120
120
|
return v !== null ? v : V(e.type) || "Memo";
|
|
121
121
|
case D: {
|
|
122
|
-
var N = e, L = N._payload,
|
|
122
|
+
var N = e, L = N._payload, A = N._init;
|
|
123
123
|
try {
|
|
124
|
-
return V(
|
|
124
|
+
return V(A(L));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,14 +129,14 @@ function Tr() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var W = Object.assign, ne = 0,
|
|
132
|
+
var W = Object.assign, ne = 0, ue, ce, j, H, ee, X, G;
|
|
133
133
|
function pe() {
|
|
134
134
|
}
|
|
135
135
|
pe.__reactDisabledLog = !0;
|
|
136
136
|
function q() {
|
|
137
137
|
{
|
|
138
138
|
if (ne === 0) {
|
|
139
|
-
|
|
139
|
+
ue = console.log, ce = console.info, j = console.warn, H = console.error, ee = console.group, X = console.groupCollapsed, G = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -156,7 +156,7 @@ function Tr() {
|
|
|
156
156
|
ne++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function se() {
|
|
160
160
|
{
|
|
161
161
|
if (ne--, ne === 0) {
|
|
162
162
|
var e = {
|
|
@@ -166,10 +166,10 @@ function Tr() {
|
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
168
|
log: W({}, e, {
|
|
169
|
-
value:
|
|
169
|
+
value: ue
|
|
170
170
|
}),
|
|
171
171
|
info: W({}, e, {
|
|
172
|
-
value:
|
|
172
|
+
value: ce
|
|
173
173
|
}),
|
|
174
174
|
warn: W({}, e, {
|
|
175
175
|
value: j
|
|
@@ -188,11 +188,11 @@ function Tr() {
|
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
ne < 0 &&
|
|
191
|
+
ne < 0 && t("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var ae =
|
|
195
|
-
function ie(e, a,
|
|
194
|
+
var ae = T.ReactCurrentDispatcher, J;
|
|
195
|
+
function ie(e, a, c) {
|
|
196
196
|
{
|
|
197
197
|
if (J === void 0)
|
|
198
198
|
try {
|
|
@@ -205,48 +205,48 @@ function Tr() {
|
|
|
205
205
|
` + J + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var oe = !1, te;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var w = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
te = new w();
|
|
212
212
|
}
|
|
213
213
|
function M(e, a) {
|
|
214
|
-
if (!e ||
|
|
214
|
+
if (!e || oe)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
return
|
|
217
|
+
var c = te.get(e);
|
|
218
|
+
if (c !== void 0)
|
|
219
|
+
return c;
|
|
220
220
|
}
|
|
221
221
|
var v;
|
|
222
|
-
|
|
222
|
+
oe = !0;
|
|
223
223
|
var N = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
225
|
var L;
|
|
226
226
|
L = ae.current, ae.current = null, q();
|
|
227
227
|
try {
|
|
228
228
|
if (a) {
|
|
229
|
-
var
|
|
229
|
+
var A = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(A.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
238
|
+
Reflect.construct(A, []);
|
|
239
239
|
} catch (K) {
|
|
240
240
|
v = K;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], A);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
245
|
+
A.call();
|
|
246
246
|
} catch (K) {
|
|
247
247
|
v = K;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(A.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
@@ -269,26 +269,26 @@ function Tr() {
|
|
|
269
269
|
if ($--, U--, U < 0 || x[$] !== Y[U]) {
|
|
270
270
|
var Q = `
|
|
271
271
|
` + x[$].replace(" at new ", " at ");
|
|
272
|
-
return e.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
272
|
+
return e.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", e.displayName)), typeof e == "function" && te.set(e, Q), Q;
|
|
273
273
|
}
|
|
274
274
|
while ($ >= 1 && U >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
oe = !1, ae.current = L, se(), Error.prepareStackTrace = N;
|
|
280
280
|
}
|
|
281
281
|
var he = e ? e.displayName || e.name : "", de = he ? ie(he) : "";
|
|
282
|
-
return typeof e == "function" &&
|
|
282
|
+
return typeof e == "function" && te.set(e, de), de;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function re(e, a, c) {
|
|
285
285
|
return M(e, !1);
|
|
286
286
|
}
|
|
287
287
|
function fe(e) {
|
|
288
288
|
var a = e.prototype;
|
|
289
289
|
return !!(a && a.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function ye(e, a,
|
|
291
|
+
function ye(e, a, c) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
@@ -303,58 +303,58 @@ function Tr() {
|
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
307
|
-
return
|
|
306
|
+
case b:
|
|
307
|
+
return re(e.render);
|
|
308
308
|
case O:
|
|
309
|
-
return ye(e.type, a,
|
|
309
|
+
return ye(e.type, a, c);
|
|
310
310
|
case D: {
|
|
311
311
|
var v = e, N = v._payload, L = v._init;
|
|
312
312
|
try {
|
|
313
|
-
return ye(L(N), a,
|
|
313
|
+
return ye(L(N), a, c);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var me = Object.prototype.hasOwnProperty, Ce = {}, Le =
|
|
320
|
+
var me = Object.prototype.hasOwnProperty, Ce = {}, Le = T.ReactDebugCurrentFrame;
|
|
321
321
|
function xe(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var a = e._owner,
|
|
324
|
-
Le.setExtraStackFrame(
|
|
323
|
+
var a = e._owner, c = ye(e.type, e._source, a ? a.type : null);
|
|
324
|
+
Le.setExtraStackFrame(c);
|
|
325
325
|
} else
|
|
326
326
|
Le.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function Qe(e, a,
|
|
328
|
+
function Qe(e, a, c, v, N) {
|
|
329
329
|
{
|
|
330
330
|
var L = Function.call.bind(me);
|
|
331
|
-
for (var
|
|
332
|
-
if (L(e,
|
|
331
|
+
for (var A in e)
|
|
332
|
+
if (L(e, A)) {
|
|
333
333
|
var x = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var Y = Error((v || "React class") + ": " +
|
|
335
|
+
if (typeof e[A] != "function") {
|
|
336
|
+
var Y = Error((v || "React class") + ": " + c + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw Y.name = "Invariant Violation", Y;
|
|
338
338
|
}
|
|
339
|
-
x = e[
|
|
339
|
+
x = e[A](a, A, v, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
340
|
} catch ($) {
|
|
341
341
|
x = $;
|
|
342
342
|
}
|
|
343
|
-
x && !(x instanceof Error) && (xe(N),
|
|
343
|
+
x && !(x instanceof Error) && (xe(N), t("%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).", v || "React class", c, A, typeof x), xe(null)), x instanceof Error && !(x.message in Ce) && (Ce[x.message] = !0, xe(N), t("Failed %s type: %s", c, x.message), xe(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
347
|
+
var et = Array.isArray;
|
|
348
348
|
function Se(e) {
|
|
349
|
-
return
|
|
349
|
+
return et(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function tt(e) {
|
|
352
352
|
{
|
|
353
|
-
var a = typeof Symbol == "function" && Symbol.toStringTag,
|
|
354
|
-
return
|
|
353
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, c = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
|
+
return c;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function rt(e) {
|
|
358
358
|
try {
|
|
359
359
|
return Pe(e), !1;
|
|
360
360
|
} catch {
|
|
@@ -365,16 +365,16 @@ function Tr() {
|
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
367
|
function De(e) {
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
368
|
+
if (rt(e))
|
|
369
|
+
return t("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tt(e)), Pe(e);
|
|
370
370
|
}
|
|
371
|
-
var je =
|
|
371
|
+
var je = T.ReactCurrentOwner, nt = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
376
|
}, $e, Me;
|
|
377
|
-
function
|
|
377
|
+
function at(e) {
|
|
378
378
|
if (me.call(e, "ref")) {
|
|
379
379
|
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
380
380
|
if (a && a.isReactWarning)
|
|
@@ -382,7 +382,7 @@ function Tr() {
|
|
|
382
382
|
}
|
|
383
383
|
return e.ref !== void 0;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function it(e) {
|
|
386
386
|
if (me.call(e, "key")) {
|
|
387
387
|
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
388
388
|
if (a && a.isReactWarning)
|
|
@@ -390,40 +390,40 @@ function Tr() {
|
|
|
390
390
|
}
|
|
391
391
|
return e.key !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function ot(e, a) {
|
|
394
394
|
typeof e.ref == "string" && je.current;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function st(e, a) {
|
|
397
397
|
{
|
|
398
|
-
var
|
|
399
|
-
$e || ($e = !0,
|
|
398
|
+
var c = function() {
|
|
399
|
+
$e || ($e = !0, t("%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)", a));
|
|
400
400
|
};
|
|
401
|
-
|
|
402
|
-
get:
|
|
401
|
+
c.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
402
|
+
get: c,
|
|
403
403
|
configurable: !0
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function lt(e, a) {
|
|
408
408
|
{
|
|
409
|
-
var
|
|
410
|
-
Me || (Me = !0,
|
|
409
|
+
var c = function() {
|
|
410
|
+
Me || (Me = !0, t("%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)", a));
|
|
411
411
|
};
|
|
412
|
-
|
|
413
|
-
get:
|
|
412
|
+
c.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
413
|
+
get: c,
|
|
414
414
|
configurable: !0
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var
|
|
418
|
+
var ct = function(e, a, c, v, N, L, A) {
|
|
419
419
|
var x = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
|
-
$$typeof:
|
|
421
|
+
$$typeof: d,
|
|
422
422
|
// Built-in properties that belong on the element
|
|
423
423
|
type: e,
|
|
424
424
|
key: a,
|
|
425
|
-
ref:
|
|
426
|
-
props:
|
|
425
|
+
ref: c,
|
|
426
|
+
props: A,
|
|
427
427
|
// Record the component responsible for creating this element.
|
|
428
428
|
_owner: L
|
|
429
429
|
};
|
|
@@ -444,36 +444,36 @@ function Tr() {
|
|
|
444
444
|
value: N
|
|
445
445
|
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
446
446
|
};
|
|
447
|
-
function
|
|
447
|
+
function ut(e, a, c, v, N) {
|
|
448
448
|
{
|
|
449
|
-
var L,
|
|
450
|
-
|
|
449
|
+
var L, A = {}, x = null, Y = null;
|
|
450
|
+
c !== void 0 && (De(c), x = "" + c), it(a) && (De(a.key), x = "" + a.key), at(a) && (Y = a.ref, ot(a, N));
|
|
451
451
|
for (L in a)
|
|
452
|
-
me.call(a, L) && !
|
|
452
|
+
me.call(a, L) && !nt.hasOwnProperty(L) && (A[L] = a[L]);
|
|
453
453
|
if (e && e.defaultProps) {
|
|
454
454
|
var $ = e.defaultProps;
|
|
455
455
|
for (L in $)
|
|
456
|
-
|
|
456
|
+
A[L] === void 0 && (A[L] = $[L]);
|
|
457
457
|
}
|
|
458
458
|
if (x || Y) {
|
|
459
459
|
var U = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
460
|
-
x &&
|
|
460
|
+
x && st(A, U), Y && lt(A, U);
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return ct(e, x, Y, N, v, je.current, A);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var we =
|
|
465
|
+
var we = T.ReactCurrentOwner, Ue = T.ReactDebugCurrentFrame;
|
|
466
466
|
function ge(e) {
|
|
467
467
|
if (e) {
|
|
468
|
-
var a = e._owner,
|
|
469
|
-
Ue.setExtraStackFrame(
|
|
468
|
+
var a = e._owner, c = ye(e.type, e._source, a ? a.type : null);
|
|
469
|
+
Ue.setExtraStackFrame(c);
|
|
470
470
|
} else
|
|
471
471
|
Ue.setExtraStackFrame(null);
|
|
472
472
|
}
|
|
473
473
|
var Ae;
|
|
474
474
|
Ae = !1;
|
|
475
475
|
function Te(e) {
|
|
476
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
476
|
+
return typeof e == "object" && e !== null && e.$$typeof === d;
|
|
477
477
|
}
|
|
478
478
|
function He() {
|
|
479
479
|
{
|
|
@@ -487,18 +487,18 @@ Check the render method of \`` + e + "`.";
|
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function dt(e) {
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
var Be = {};
|
|
494
|
-
function
|
|
494
|
+
function pt(e) {
|
|
495
495
|
{
|
|
496
496
|
var a = He();
|
|
497
497
|
if (!a) {
|
|
498
|
-
var
|
|
499
|
-
|
|
498
|
+
var c = typeof e == "string" ? e : e.displayName || e.name;
|
|
499
|
+
c && (a = `
|
|
500
500
|
|
|
501
|
-
Check the top-level render call using <` +
|
|
501
|
+
Check the top-level render call using <` + c + ">.");
|
|
502
502
|
}
|
|
503
503
|
return a;
|
|
504
504
|
}
|
|
@@ -508,12 +508,12 @@ Check the top-level render call using <` + u + ">.");
|
|
|
508
508
|
if (!e._store || e._store.validated || e.key != null)
|
|
509
509
|
return;
|
|
510
510
|
e._store.validated = !0;
|
|
511
|
-
var
|
|
512
|
-
if (Be[
|
|
511
|
+
var c = pt(a);
|
|
512
|
+
if (Be[c])
|
|
513
513
|
return;
|
|
514
|
-
Be[
|
|
514
|
+
Be[c] = !0;
|
|
515
515
|
var v = "";
|
|
516
|
-
e && e._owner && e._owner !== we.current && (v = " It was passed a child from " + V(e._owner.type) + "."), ge(e),
|
|
516
|
+
e && e._owner && e._owner !== we.current && (v = " It was passed a child from " + V(e._owner.type) + "."), ge(e), t('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, v), ge(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
function We(e, a) {
|
|
@@ -521,73 +521,73 @@ Check the top-level render call using <` + u + ">.");
|
|
|
521
521
|
if (typeof e != "object")
|
|
522
522
|
return;
|
|
523
523
|
if (Se(e))
|
|
524
|
-
for (var
|
|
525
|
-
var v = e[
|
|
524
|
+
for (var c = 0; c < e.length; c++) {
|
|
525
|
+
var v = e[c];
|
|
526
526
|
Te(v) && ze(v, a);
|
|
527
527
|
}
|
|
528
528
|
else if (Te(e))
|
|
529
529
|
e._store && (e._store.validated = !0);
|
|
530
530
|
else if (e) {
|
|
531
|
-
var N =
|
|
531
|
+
var N = S(e);
|
|
532
532
|
if (typeof N == "function" && N !== e.entries)
|
|
533
|
-
for (var L = N.call(e),
|
|
534
|
-
Te(
|
|
533
|
+
for (var L = N.call(e), A; !(A = L.next()).done; )
|
|
534
|
+
Te(A.value) && ze(A.value, a);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function ft(e) {
|
|
539
539
|
{
|
|
540
540
|
var a = e.type;
|
|
541
541
|
if (a == null || typeof a == "string")
|
|
542
542
|
return;
|
|
543
|
-
var
|
|
543
|
+
var c;
|
|
544
544
|
if (typeof a == "function")
|
|
545
|
-
|
|
546
|
-
else if (typeof a == "object" && (a.$$typeof ===
|
|
545
|
+
c = a.propTypes;
|
|
546
|
+
else if (typeof a == "object" && (a.$$typeof === b || // Note: Memo only checks outer props here.
|
|
547
547
|
// Inner props are checked in the reconciler.
|
|
548
548
|
a.$$typeof === O))
|
|
549
|
-
|
|
549
|
+
c = a.propTypes;
|
|
550
550
|
else
|
|
551
551
|
return;
|
|
552
|
-
if (
|
|
552
|
+
if (c) {
|
|
553
553
|
var v = V(a);
|
|
554
|
-
Qe(
|
|
554
|
+
Qe(c, e.props, "prop", v, e);
|
|
555
555
|
} else if (a.PropTypes !== void 0 && !Ae) {
|
|
556
556
|
Ae = !0;
|
|
557
557
|
var N = V(a);
|
|
558
|
-
|
|
558
|
+
t("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
559
559
|
}
|
|
560
|
-
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved &&
|
|
560
|
+
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && t("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function gt(e) {
|
|
564
564
|
{
|
|
565
|
-
for (var a = Object.keys(e.props),
|
|
566
|
-
var v = a[
|
|
565
|
+
for (var a = Object.keys(e.props), c = 0; c < a.length; c++) {
|
|
566
|
+
var v = a[c];
|
|
567
567
|
if (v !== "children" && v !== "key") {
|
|
568
|
-
ge(e),
|
|
568
|
+
ge(e), t("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), ge(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
e.ref !== null && (ge(e),
|
|
572
|
+
e.ref !== null && (ge(e), t("Invalid attribute `ref` supplied to `React.Fragment`."), ge(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
var Ge = {};
|
|
576
|
-
function Ye(e, a,
|
|
576
|
+
function Ye(e, a, c, v, N, L) {
|
|
577
577
|
{
|
|
578
|
-
var
|
|
579
|
-
if (!
|
|
578
|
+
var A = C(e);
|
|
579
|
+
if (!A) {
|
|
580
580
|
var x = "";
|
|
581
581
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
582
|
-
var Y =
|
|
582
|
+
var Y = dt();
|
|
583
583
|
Y ? x += Y : x += He();
|
|
584
584
|
var $;
|
|
585
|
-
e === null ? $ = "null" : Se(e) ? $ = "array" : e !== void 0 && e.$$typeof ===
|
|
585
|
+
e === null ? $ = "null" : Se(e) ? $ = "array" : e !== void 0 && e.$$typeof === d ? ($ = "<" + (V(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, t("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, x);
|
|
586
586
|
}
|
|
587
|
-
var U =
|
|
587
|
+
var U = ut(e, a, c, N, L);
|
|
588
588
|
if (U == null)
|
|
589
589
|
return U;
|
|
590
|
-
if (
|
|
590
|
+
if (A) {
|
|
591
591
|
var Q = a.children;
|
|
592
592
|
if (Q !== void 0)
|
|
593
593
|
if (v)
|
|
@@ -596,41 +596,41 @@ Check the top-level render call using <` + u + ">.");
|
|
|
596
596
|
We(Q[he], e);
|
|
597
597
|
Object.freeze && Object.freeze(Q);
|
|
598
598
|
} else
|
|
599
|
-
|
|
599
|
+
t("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
600
600
|
else
|
|
601
601
|
We(Q, e);
|
|
602
602
|
}
|
|
603
603
|
if (me.call(a, "key")) {
|
|
604
|
-
var de = V(e), K = Object.keys(a).filter(function(
|
|
605
|
-
return
|
|
604
|
+
var de = V(e), K = Object.keys(a).filter(function(yt) {
|
|
605
|
+
return yt !== "key";
|
|
606
606
|
}), Re = K.length > 0 ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
607
|
if (!Ge[de + Re]) {
|
|
608
|
-
var
|
|
609
|
-
|
|
608
|
+
var Et = K.length > 0 ? "{" + K.join(": ..., ") + ": ...}" : "{}";
|
|
609
|
+
t(`A props object containing a "key" prop is being spread into JSX:
|
|
610
610
|
let props = %s;
|
|
611
611
|
<%s {...props} />
|
|
612
612
|
React keys must be passed directly to JSX without using spread:
|
|
613
613
|
let props = %s;
|
|
614
|
-
<%s key={someKey} {...props} />`, Re, de,
|
|
614
|
+
<%s key={someKey} {...props} />`, Re, de, Et, de), Ge[de + Re] = !0;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
return e ===
|
|
617
|
+
return e === p ? gt(U) : ft(U), U;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return Ye(e, a,
|
|
620
|
+
function ht(e, a, c) {
|
|
621
|
+
return Ye(e, a, c, !0);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
return Ye(e, a,
|
|
623
|
+
function mt(e, a, c) {
|
|
624
|
+
return Ye(e, a, c, !1);
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
ve.Fragment =
|
|
626
|
+
var bt = mt, vt = ht;
|
|
627
|
+
ve.Fragment = p, ve.jsx = bt, ve.jsxs = vt;
|
|
628
628
|
}()), ve;
|
|
629
629
|
}
|
|
630
|
-
process.env.NODE_ENV === "production" ? Ie.exports =
|
|
630
|
+
process.env.NODE_ENV === "production" ? Ie.exports = wt() : Ie.exports = At();
|
|
631
631
|
var h = Ie.exports, Je = { exports: {} };
|
|
632
|
-
(function(
|
|
633
|
-
var
|
|
632
|
+
(function(u) {
|
|
633
|
+
var d = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
634
634
|
/**
|
|
635
635
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
636
636
|
*
|
|
@@ -639,8 +639,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
639
639
|
* @namespace
|
|
640
640
|
* @public
|
|
641
641
|
*/
|
|
642
|
-
var n = function(
|
|
643
|
-
var
|
|
642
|
+
var n = function(p) {
|
|
643
|
+
var m = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, R = 0, k = {}, l = {
|
|
644
644
|
/**
|
|
645
645
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
646
646
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -662,7 +662,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
662
662
|
* @memberof Prism
|
|
663
663
|
* @public
|
|
664
664
|
*/
|
|
665
|
-
manual:
|
|
665
|
+
manual: p.Prism && p.Prism.manual,
|
|
666
666
|
/**
|
|
667
667
|
* By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
|
|
668
668
|
* `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
|
|
@@ -684,7 +684,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
684
684
|
* @memberof Prism
|
|
685
685
|
* @public
|
|
686
686
|
*/
|
|
687
|
-
disableWorkerMessageHandler:
|
|
687
|
+
disableWorkerMessageHandler: p.Prism && p.Prism.disableWorkerMessageHandler,
|
|
688
688
|
/**
|
|
689
689
|
* A namespace for utility methods.
|
|
690
690
|
*
|
|
@@ -695,8 +695,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
695
695
|
* @memberof Prism
|
|
696
696
|
*/
|
|
697
697
|
util: {
|
|
698
|
-
encode: function r
|
|
699
|
-
return
|
|
698
|
+
encode: function t(r) {
|
|
699
|
+
return r instanceof b ? new b(r.type, t(r.content), r.alias) : Array.isArray(r) ? r.map(t) : r.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
700
700
|
},
|
|
701
701
|
/**
|
|
702
702
|
* Returns the name of the type of the given value.
|
|
@@ -714,8 +714,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
714
714
|
* type(String) === 'Function'
|
|
715
715
|
* type(/abc+/) === 'RegExp'
|
|
716
716
|
*/
|
|
717
|
-
type: function(
|
|
718
|
-
return Object.prototype.toString.call(
|
|
717
|
+
type: function(t) {
|
|
718
|
+
return Object.prototype.toString.call(t).slice(8, -1);
|
|
719
719
|
},
|
|
720
720
|
/**
|
|
721
721
|
* Returns a unique number for the given object. Later calls will still return the same number.
|
|
@@ -723,8 +723,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
723
723
|
* @param {Object} obj
|
|
724
724
|
* @returns {number}
|
|
725
725
|
*/
|
|
726
|
-
objId: function(
|
|
727
|
-
return
|
|
726
|
+
objId: function(t) {
|
|
727
|
+
return t.__id || Object.defineProperty(t, "__id", { value: ++R }), t.__id;
|
|
728
728
|
},
|
|
729
729
|
/**
|
|
730
730
|
* Creates a deep clone of the given object.
|
|
@@ -736,30 +736,30 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
736
736
|
* @returns {T}
|
|
737
737
|
* @template T
|
|
738
738
|
*/
|
|
739
|
-
clone: function r
|
|
739
|
+
clone: function t(r, i) {
|
|
740
740
|
i = i || {};
|
|
741
|
-
var
|
|
742
|
-
switch (l.util.type(
|
|
741
|
+
var o, s;
|
|
742
|
+
switch (l.util.type(r)) {
|
|
743
743
|
case "Object":
|
|
744
|
-
if (
|
|
745
|
-
return i[
|
|
746
|
-
|
|
747
|
-
{}, i[
|
|
748
|
-
for (var f in
|
|
749
|
-
|
|
744
|
+
if (s = l.util.objId(r), i[s])
|
|
745
|
+
return i[s];
|
|
746
|
+
o = /** @type {Record<string, any>} */
|
|
747
|
+
{}, i[s] = o;
|
|
748
|
+
for (var f in r)
|
|
749
|
+
r.hasOwnProperty(f) && (o[f] = t(r[f], i));
|
|
750
750
|
return (
|
|
751
751
|
/** @type {any} */
|
|
752
|
-
|
|
752
|
+
o
|
|
753
753
|
);
|
|
754
754
|
case "Array":
|
|
755
|
-
return
|
|
755
|
+
return s = l.util.objId(r), i[s] ? i[s] : (o = [], i[s] = o, /** @type {Array} */
|
|
756
756
|
/** @type {any} */
|
|
757
|
-
|
|
758
|
-
|
|
757
|
+
r.forEach(function(E, g) {
|
|
758
|
+
o[g] = t(E, i);
|
|
759
759
|
}), /** @type {any} */
|
|
760
|
-
|
|
760
|
+
o);
|
|
761
761
|
default:
|
|
762
|
-
return
|
|
762
|
+
return r;
|
|
763
763
|
}
|
|
764
764
|
},
|
|
765
765
|
/**
|
|
@@ -770,12 +770,12 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
770
770
|
* @param {Element} element
|
|
771
771
|
* @returns {string}
|
|
772
772
|
*/
|
|
773
|
-
getLanguage: function(
|
|
774
|
-
for (;
|
|
775
|
-
var
|
|
776
|
-
if (
|
|
777
|
-
return
|
|
778
|
-
|
|
773
|
+
getLanguage: function(t) {
|
|
774
|
+
for (; t; ) {
|
|
775
|
+
var r = m.exec(t.className);
|
|
776
|
+
if (r)
|
|
777
|
+
return r[1].toLowerCase();
|
|
778
|
+
t = t.parentElement;
|
|
779
779
|
}
|
|
780
780
|
return "none";
|
|
781
781
|
},
|
|
@@ -786,8 +786,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
786
786
|
* @param {string} language
|
|
787
787
|
* @returns {void}
|
|
788
788
|
*/
|
|
789
|
-
setLanguage: function(
|
|
790
|
-
|
|
789
|
+
setLanguage: function(t, r) {
|
|
790
|
+
t.className = t.className.replace(RegExp(m, "gi"), ""), t.classList.add("language-" + r);
|
|
791
791
|
},
|
|
792
792
|
/**
|
|
793
793
|
* Returns the script element that is currently executing.
|
|
@@ -806,13 +806,13 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
806
806
|
);
|
|
807
807
|
try {
|
|
808
808
|
throw new Error();
|
|
809
|
-
} catch (
|
|
810
|
-
var
|
|
811
|
-
if (
|
|
812
|
-
var
|
|
813
|
-
for (var i in
|
|
814
|
-
if (
|
|
815
|
-
return
|
|
809
|
+
} catch (o) {
|
|
810
|
+
var t = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.stack) || [])[1];
|
|
811
|
+
if (t) {
|
|
812
|
+
var r = document.getElementsByTagName("script");
|
|
813
|
+
for (var i in r)
|
|
814
|
+
if (r[i].src == t)
|
|
815
|
+
return r[i];
|
|
816
816
|
}
|
|
817
817
|
return null;
|
|
818
818
|
}
|
|
@@ -836,14 +836,14 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
836
836
|
* @param {boolean} [defaultActivation=false]
|
|
837
837
|
* @returns {boolean}
|
|
838
838
|
*/
|
|
839
|
-
isActive: function(
|
|
840
|
-
for (var
|
|
841
|
-
var
|
|
842
|
-
if (
|
|
839
|
+
isActive: function(t, r, i) {
|
|
840
|
+
for (var o = "no-" + r; t; ) {
|
|
841
|
+
var s = t.classList;
|
|
842
|
+
if (s.contains(r))
|
|
843
843
|
return !0;
|
|
844
|
-
if (
|
|
844
|
+
if (s.contains(o))
|
|
845
845
|
return !1;
|
|
846
|
-
|
|
846
|
+
t = t.parentElement;
|
|
847
847
|
}
|
|
848
848
|
return !!i;
|
|
849
849
|
}
|
|
@@ -859,10 +859,10 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
859
859
|
/**
|
|
860
860
|
* The grammar for plain, unformatted text.
|
|
861
861
|
*/
|
|
862
|
-
plain:
|
|
863
|
-
plaintext:
|
|
864
|
-
text:
|
|
865
|
-
txt:
|
|
862
|
+
plain: k,
|
|
863
|
+
plaintext: k,
|
|
864
|
+
text: k,
|
|
865
|
+
txt: k,
|
|
866
866
|
/**
|
|
867
867
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
868
868
|
*
|
|
@@ -891,10 +891,10 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
891
891
|
* 'color': /\b(?:red|green|blue)\b/
|
|
892
892
|
* });
|
|
893
893
|
*/
|
|
894
|
-
extend: function(
|
|
895
|
-
var i = l.util.clone(l.languages[
|
|
896
|
-
for (var
|
|
897
|
-
i[
|
|
894
|
+
extend: function(t, r) {
|
|
895
|
+
var i = l.util.clone(l.languages[t]);
|
|
896
|
+
for (var o in r)
|
|
897
|
+
i[o] = r[o];
|
|
898
898
|
return i;
|
|
899
899
|
},
|
|
900
900
|
/**
|
|
@@ -972,31 +972,31 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
972
972
|
* @returns {Grammar} The new grammar object.
|
|
973
973
|
* @public
|
|
974
974
|
*/
|
|
975
|
-
insertBefore: function(
|
|
976
|
-
|
|
975
|
+
insertBefore: function(t, r, i, o) {
|
|
976
|
+
o = o || /** @type {any} */
|
|
977
977
|
l.languages;
|
|
978
|
-
var
|
|
979
|
-
for (var E in
|
|
980
|
-
if (
|
|
981
|
-
if (E ==
|
|
978
|
+
var s = o[t], f = {};
|
|
979
|
+
for (var E in s)
|
|
980
|
+
if (s.hasOwnProperty(E)) {
|
|
981
|
+
if (E == r)
|
|
982
982
|
for (var g in i)
|
|
983
983
|
i.hasOwnProperty(g) && (f[g] = i[g]);
|
|
984
|
-
i.hasOwnProperty(E) || (f[E] =
|
|
984
|
+
i.hasOwnProperty(E) || (f[E] = s[E]);
|
|
985
985
|
}
|
|
986
|
-
var C =
|
|
987
|
-
return
|
|
988
|
-
z === C && P !=
|
|
986
|
+
var C = o[t];
|
|
987
|
+
return o[t] = f, l.languages.DFS(l.languages, function(P, z) {
|
|
988
|
+
z === C && P != t && (this[P] = f);
|
|
989
989
|
}), f;
|
|
990
990
|
},
|
|
991
991
|
// Traverse a language definition with Depth First Search
|
|
992
|
-
DFS: function r
|
|
993
|
-
|
|
992
|
+
DFS: function t(r, i, o, s) {
|
|
993
|
+
s = s || {};
|
|
994
994
|
var f = l.util.objId;
|
|
995
|
-
for (var E in
|
|
996
|
-
if (
|
|
997
|
-
i.call(
|
|
998
|
-
var g =
|
|
999
|
-
C === "Object" && !
|
|
995
|
+
for (var E in r)
|
|
996
|
+
if (r.hasOwnProperty(E)) {
|
|
997
|
+
i.call(r, E, r[E], o || E);
|
|
998
|
+
var g = r[E], C = l.util.type(g);
|
|
999
|
+
C === "Object" && !s[f(g)] ? (s[f(g)] = !0, t(g, i, null, s)) : C === "Array" && !s[f(g)] && (s[f(g)] = !0, t(g, i, E, s));
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
},
|
|
@@ -1013,8 +1013,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1013
1013
|
* @memberof Prism
|
|
1014
1014
|
* @public
|
|
1015
1015
|
*/
|
|
1016
|
-
highlightAll: function(
|
|
1017
|
-
l.highlightAllUnder(document,
|
|
1016
|
+
highlightAll: function(t, r) {
|
|
1017
|
+
l.highlightAllUnder(document, t, r);
|
|
1018
1018
|
},
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
|
|
@@ -1031,15 +1031,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1031
1031
|
* @memberof Prism
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
highlightAllUnder: function(
|
|
1035
|
-
var
|
|
1034
|
+
highlightAllUnder: function(t, r, i) {
|
|
1035
|
+
var o = {
|
|
1036
1036
|
callback: i,
|
|
1037
|
-
container:
|
|
1037
|
+
container: t,
|
|
1038
1038
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
1039
1039
|
};
|
|
1040
|
-
l.hooks.run("before-highlightall",
|
|
1041
|
-
for (var
|
|
1042
|
-
l.highlightElement(f,
|
|
1040
|
+
l.hooks.run("before-highlightall", o), o.elements = Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)), l.hooks.run("before-all-elements-highlight", o);
|
|
1041
|
+
for (var s = 0, f; f = o.elements[s++]; )
|
|
1042
|
+
l.highlightElement(f, r === !0, o.callback);
|
|
1043
1043
|
},
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Highlights the code inside a single element.
|
|
@@ -1069,15 +1069,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1069
1069
|
* @memberof Prism
|
|
1070
1070
|
* @public
|
|
1071
1071
|
*/
|
|
1072
|
-
highlightElement: function(
|
|
1073
|
-
var
|
|
1074
|
-
l.util.setLanguage(
|
|
1075
|
-
var f =
|
|
1076
|
-
f && f.nodeName.toLowerCase() === "pre" && l.util.setLanguage(f,
|
|
1077
|
-
var E =
|
|
1078
|
-
element:
|
|
1079
|
-
language:
|
|
1080
|
-
grammar:
|
|
1072
|
+
highlightElement: function(t, r, i) {
|
|
1073
|
+
var o = l.util.getLanguage(t), s = l.languages[o];
|
|
1074
|
+
l.util.setLanguage(t, o);
|
|
1075
|
+
var f = t.parentElement;
|
|
1076
|
+
f && f.nodeName.toLowerCase() === "pre" && l.util.setLanguage(f, o);
|
|
1077
|
+
var E = t.textContent, g = {
|
|
1078
|
+
element: t,
|
|
1079
|
+
language: o,
|
|
1080
|
+
grammar: s,
|
|
1081
1081
|
code: E
|
|
1082
1082
|
};
|
|
1083
1083
|
function C(z) {
|
|
@@ -1091,7 +1091,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1091
1091
|
C(l.util.encode(g.code));
|
|
1092
1092
|
return;
|
|
1093
1093
|
}
|
|
1094
|
-
if (
|
|
1094
|
+
if (r && p.Worker) {
|
|
1095
1095
|
var P = new Worker(l.filename);
|
|
1096
1096
|
P.onmessage = function(z) {
|
|
1097
1097
|
C(z.data);
|
|
@@ -1123,15 +1123,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1123
1123
|
* @example
|
|
1124
1124
|
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
1125
1125
|
*/
|
|
1126
|
-
highlight: function(
|
|
1127
|
-
var
|
|
1128
|
-
code:
|
|
1129
|
-
grammar:
|
|
1126
|
+
highlight: function(t, r, i) {
|
|
1127
|
+
var o = {
|
|
1128
|
+
code: t,
|
|
1129
|
+
grammar: r,
|
|
1130
1130
|
language: i
|
|
1131
1131
|
};
|
|
1132
|
-
if (l.hooks.run("before-tokenize",
|
|
1133
|
-
throw new Error('The language "' +
|
|
1134
|
-
return
|
|
1132
|
+
if (l.hooks.run("before-tokenize", o), !o.grammar)
|
|
1133
|
+
throw new Error('The language "' + o.language + '" has no grammar.');
|
|
1134
|
+
return o.tokens = l.tokenize(o.code, o.grammar), l.hooks.run("after-tokenize", o), b.stringify(l.util.encode(o.tokens), o.language);
|
|
1135
1135
|
},
|
|
1136
1136
|
/**
|
|
1137
1137
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -1157,15 +1157,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1157
1157
|
* }
|
|
1158
1158
|
* });
|
|
1159
1159
|
*/
|
|
1160
|
-
tokenize: function(
|
|
1161
|
-
var i =
|
|
1160
|
+
tokenize: function(t, r) {
|
|
1161
|
+
var i = r.rest;
|
|
1162
1162
|
if (i) {
|
|
1163
|
-
for (var
|
|
1164
|
-
|
|
1165
|
-
delete
|
|
1163
|
+
for (var o in i)
|
|
1164
|
+
r[o] = i[o];
|
|
1165
|
+
delete r.rest;
|
|
1166
1166
|
}
|
|
1167
|
-
var
|
|
1168
|
-
return D(
|
|
1167
|
+
var s = new O();
|
|
1168
|
+
return D(s, s.head, t), _(t, s, r, s.head, 0), B(s);
|
|
1169
1169
|
},
|
|
1170
1170
|
/**
|
|
1171
1171
|
* @namespace
|
|
@@ -1186,9 +1186,9 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1186
1186
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
1187
1187
|
* @public
|
|
1188
1188
|
*/
|
|
1189
|
-
add: function(
|
|
1189
|
+
add: function(t, r) {
|
|
1190
1190
|
var i = l.hooks.all;
|
|
1191
|
-
i[
|
|
1191
|
+
i[t] = i[t] || [], i[t].push(r);
|
|
1192
1192
|
},
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
@@ -1199,52 +1199,52 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1199
1199
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
1200
1200
|
* @public
|
|
1201
1201
|
*/
|
|
1202
|
-
run: function(
|
|
1203
|
-
var i = l.hooks.all[
|
|
1202
|
+
run: function(t, r) {
|
|
1203
|
+
var i = l.hooks.all[t];
|
|
1204
1204
|
if (!(!i || !i.length))
|
|
1205
|
-
for (var
|
|
1206
|
-
|
|
1205
|
+
for (var o = 0, s; s = i[o++]; )
|
|
1206
|
+
s(r);
|
|
1207
1207
|
}
|
|
1208
1208
|
},
|
|
1209
|
-
Token:
|
|
1209
|
+
Token: b
|
|
1210
1210
|
};
|
|
1211
|
-
|
|
1212
|
-
function
|
|
1213
|
-
this.type =
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
if (typeof
|
|
1217
|
-
return
|
|
1218
|
-
if (Array.isArray(
|
|
1219
|
-
var
|
|
1220
|
-
return
|
|
1221
|
-
|
|
1222
|
-
}),
|
|
1211
|
+
p.Prism = l;
|
|
1212
|
+
function b(t, r, i, o) {
|
|
1213
|
+
this.type = t, this.content = r, this.alias = i, this.length = (o || "").length | 0;
|
|
1214
|
+
}
|
|
1215
|
+
b.stringify = function t(r, i) {
|
|
1216
|
+
if (typeof r == "string")
|
|
1217
|
+
return r;
|
|
1218
|
+
if (Array.isArray(r)) {
|
|
1219
|
+
var o = "";
|
|
1220
|
+
return r.forEach(function(C) {
|
|
1221
|
+
o += t(C, i);
|
|
1222
|
+
}), o;
|
|
1223
1223
|
}
|
|
1224
|
-
var
|
|
1225
|
-
type:
|
|
1226
|
-
content: r
|
|
1224
|
+
var s = {
|
|
1225
|
+
type: r.type,
|
|
1226
|
+
content: t(r.content, i),
|
|
1227
1227
|
tag: "span",
|
|
1228
|
-
classes: ["token",
|
|
1228
|
+
classes: ["token", r.type],
|
|
1229
1229
|
attributes: {},
|
|
1230
1230
|
language: i
|
|
1231
|
-
}, f =
|
|
1232
|
-
f && (Array.isArray(f) ? Array.prototype.push.apply(
|
|
1231
|
+
}, f = r.alias;
|
|
1232
|
+
f && (Array.isArray(f) ? Array.prototype.push.apply(s.classes, f) : s.classes.push(f)), l.hooks.run("wrap", s);
|
|
1233
1233
|
var E = "";
|
|
1234
|
-
for (var g in
|
|
1235
|
-
E += " " + g + '="' + (
|
|
1236
|
-
return "<" +
|
|
1234
|
+
for (var g in s.attributes)
|
|
1235
|
+
E += " " + g + '="' + (s.attributes[g] || "").replace(/"/g, """) + '"';
|
|
1236
|
+
return "<" + s.tag + ' class="' + s.classes.join(" ") + '"' + E + ">" + s.content + "</" + s.tag + ">";
|
|
1237
1237
|
};
|
|
1238
|
-
function y(
|
|
1239
|
-
|
|
1240
|
-
var
|
|
1241
|
-
if (
|
|
1242
|
-
var f =
|
|
1243
|
-
|
|
1238
|
+
function y(t, r, i, o) {
|
|
1239
|
+
t.lastIndex = r;
|
|
1240
|
+
var s = t.exec(i);
|
|
1241
|
+
if (s && o && s[1]) {
|
|
1242
|
+
var f = s[1].length;
|
|
1243
|
+
s.index += f, s[0] = s[0].slice(f);
|
|
1244
1244
|
}
|
|
1245
|
-
return
|
|
1245
|
+
return s;
|
|
1246
1246
|
}
|
|
1247
|
-
function _(
|
|
1247
|
+
function _(t, r, i, o, s, f) {
|
|
1248
1248
|
for (var E in i)
|
|
1249
1249
|
if (!(!i.hasOwnProperty(E) || !i[E])) {
|
|
1250
1250
|
var g = i[E];
|
|
@@ -1254,39 +1254,39 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1254
1254
|
return;
|
|
1255
1255
|
var P = g[C], z = P.inside, V = !!P.lookbehind, W = !!P.greedy, ne = P.alias;
|
|
1256
1256
|
if (W && !P.pattern.global) {
|
|
1257
|
-
var
|
|
1258
|
-
P.pattern = RegExp(P.pattern.source,
|
|
1257
|
+
var ue = P.pattern.toString().match(/[imsuy]*$/)[0];
|
|
1258
|
+
P.pattern = RegExp(P.pattern.source, ue + "g");
|
|
1259
1259
|
}
|
|
1260
|
-
for (var
|
|
1260
|
+
for (var ce = P.pattern || P, j = o.next, H = s; j !== r.tail && !(f && H >= f.reach); H += j.value.length, j = j.next) {
|
|
1261
1261
|
var ee = j.value;
|
|
1262
|
-
if (
|
|
1262
|
+
if (r.length > t.length)
|
|
1263
1263
|
return;
|
|
1264
|
-
if (!(ee instanceof
|
|
1264
|
+
if (!(ee instanceof b)) {
|
|
1265
1265
|
var X = 1, G;
|
|
1266
1266
|
if (W) {
|
|
1267
|
-
if (G = y(
|
|
1267
|
+
if (G = y(ce, H, t, V), !G || G.index >= t.length)
|
|
1268
1268
|
break;
|
|
1269
1269
|
var ae = G.index, pe = G.index + G[0].length, q = H;
|
|
1270
1270
|
for (q += j.value.length; ae >= q; )
|
|
1271
1271
|
j = j.next, q += j.value.length;
|
|
1272
|
-
if (q -= j.value.length, H = q, j.value instanceof
|
|
1272
|
+
if (q -= j.value.length, H = q, j.value instanceof b)
|
|
1273
1273
|
continue;
|
|
1274
|
-
for (var
|
|
1275
|
-
X++, q +=
|
|
1276
|
-
X--, ee =
|
|
1277
|
-
} else if (G = y(
|
|
1274
|
+
for (var se = j; se !== r.tail && (q < pe || typeof se.value == "string"); se = se.next)
|
|
1275
|
+
X++, q += se.value.length;
|
|
1276
|
+
X--, ee = t.slice(H, q), G.index -= H;
|
|
1277
|
+
} else if (G = y(ce, 0, ee, V), !G)
|
|
1278
1278
|
continue;
|
|
1279
|
-
var ae = G.index, J = G[0], ie = ee.slice(0, ae),
|
|
1280
|
-
f &&
|
|
1281
|
-
var
|
|
1282
|
-
ie && (
|
|
1283
|
-
var M = new
|
|
1284
|
-
if (j = D(
|
|
1285
|
-
var
|
|
1279
|
+
var ae = G.index, J = G[0], ie = ee.slice(0, ae), oe = ee.slice(ae + J.length), te = H + ee.length;
|
|
1280
|
+
f && te > f.reach && (f.reach = te);
|
|
1281
|
+
var w = j.prev;
|
|
1282
|
+
ie && (w = D(r, w, ie), H += ie.length), I(r, w, X);
|
|
1283
|
+
var M = new b(E, z ? l.tokenize(J, z) : J, ne, J);
|
|
1284
|
+
if (j = D(r, w, M), oe && D(r, j, oe), X > 1) {
|
|
1285
|
+
var re = {
|
|
1286
1286
|
cause: E + "," + C,
|
|
1287
|
-
reach:
|
|
1287
|
+
reach: te
|
|
1288
1288
|
};
|
|
1289
|
-
_(
|
|
1289
|
+
_(t, r, i, j.prev, H, re), f && re.reach > f.reach && (f.reach = re.reach);
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
@@ -1294,40 +1294,40 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
function O() {
|
|
1297
|
-
var
|
|
1298
|
-
|
|
1299
|
-
}
|
|
1300
|
-
function D(
|
|
1301
|
-
var
|
|
1302
|
-
return
|
|
1303
|
-
}
|
|
1304
|
-
function I(
|
|
1305
|
-
for (var
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
}
|
|
1309
|
-
function B(
|
|
1310
|
-
for (var
|
|
1311
|
-
|
|
1312
|
-
return
|
|
1313
|
-
}
|
|
1314
|
-
if (!
|
|
1315
|
-
return
|
|
1316
|
-
var
|
|
1317
|
-
|
|
1297
|
+
var t = { value: null, prev: null, next: null }, r = { value: null, prev: t, next: null };
|
|
1298
|
+
t.next = r, this.head = t, this.tail = r, this.length = 0;
|
|
1299
|
+
}
|
|
1300
|
+
function D(t, r, i) {
|
|
1301
|
+
var o = r.next, s = { value: i, prev: r, next: o };
|
|
1302
|
+
return r.next = s, o.prev = s, t.length++, s;
|
|
1303
|
+
}
|
|
1304
|
+
function I(t, r, i) {
|
|
1305
|
+
for (var o = r.next, s = 0; s < i && o !== t.tail; s++)
|
|
1306
|
+
o = o.next;
|
|
1307
|
+
r.next = o, o.prev = r, t.length -= s;
|
|
1308
|
+
}
|
|
1309
|
+
function B(t) {
|
|
1310
|
+
for (var r = [], i = t.head.next; i !== t.tail; )
|
|
1311
|
+
r.push(i.value), i = i.next;
|
|
1312
|
+
return r;
|
|
1313
|
+
}
|
|
1314
|
+
if (!p.document)
|
|
1315
|
+
return p.addEventListener && (l.disableWorkerMessageHandler || p.addEventListener("message", function(t) {
|
|
1316
|
+
var r = JSON.parse(t.data), i = r.language, o = r.code, s = r.immediateClose;
|
|
1317
|
+
p.postMessage(l.highlight(o, l.languages[i], i)), s && p.close();
|
|
1318
1318
|
}, !1)), l;
|
|
1319
1319
|
var F = l.util.currentScript();
|
|
1320
1320
|
F && (l.filename = F.src, F.hasAttribute("data-manual") && (l.manual = !0));
|
|
1321
|
-
function
|
|
1321
|
+
function S() {
|
|
1322
1322
|
l.manual || l.highlightAll();
|
|
1323
1323
|
}
|
|
1324
1324
|
if (!l.manual) {
|
|
1325
|
-
var
|
|
1326
|
-
|
|
1325
|
+
var T = document.readyState;
|
|
1326
|
+
T === "loading" || T === "interactive" && F && F.defer ? document.addEventListener("DOMContentLoaded", S) : window.requestAnimationFrame ? window.requestAnimationFrame(S) : window.setTimeout(S, 16);
|
|
1327
1327
|
}
|
|
1328
1328
|
return l;
|
|
1329
|
-
}(
|
|
1330
|
-
|
|
1329
|
+
}(d);
|
|
1330
|
+
u.exports && (u.exports = n), typeof Ve < "u" && (Ve.Prism = n), n.languages.markup = {
|
|
1331
1331
|
comment: {
|
|
1332
1332
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
1333
1333
|
greedy: !0
|
|
@@ -1404,8 +1404,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1404
1404
|
},
|
|
1405
1405
|
/&#x?[\da-f]{1,8};/i
|
|
1406
1406
|
]
|
|
1407
|
-
}, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(
|
|
1408
|
-
|
|
1407
|
+
}, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(p) {
|
|
1408
|
+
p.type === "entity" && (p.attributes.title = p.content.replace(/&/, "&"));
|
|
1409
1409
|
}), Object.defineProperty(n.languages.markup.tag, "addInlined", {
|
|
1410
1410
|
/**
|
|
1411
1411
|
* Adds an inlined language to markup.
|
|
@@ -1418,32 +1418,32 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1418
1418
|
* @example
|
|
1419
1419
|
* addInlined('style', 'css');
|
|
1420
1420
|
*/
|
|
1421
|
-
value: function(
|
|
1422
|
-
var
|
|
1423
|
-
|
|
1421
|
+
value: function(m, R) {
|
|
1422
|
+
var k = {};
|
|
1423
|
+
k["language-" + R] = {
|
|
1424
1424
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
1425
1425
|
lookbehind: !0,
|
|
1426
|
-
inside: n.languages[
|
|
1427
|
-
},
|
|
1426
|
+
inside: n.languages[R]
|
|
1427
|
+
}, k.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
1428
1428
|
var l = {
|
|
1429
1429
|
"included-cdata": {
|
|
1430
1430
|
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
1431
|
-
inside:
|
|
1431
|
+
inside: k
|
|
1432
1432
|
}
|
|
1433
1433
|
};
|
|
1434
|
-
l["language-" +
|
|
1434
|
+
l["language-" + R] = {
|
|
1435
1435
|
pattern: /[\s\S]+/,
|
|
1436
|
-
inside: n.languages[
|
|
1436
|
+
inside: n.languages[R]
|
|
1437
1437
|
};
|
|
1438
|
-
var
|
|
1439
|
-
m
|
|
1438
|
+
var b = {};
|
|
1439
|
+
b[m] = {
|
|
1440
1440
|
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
1441
|
-
return
|
|
1441
|
+
return m;
|
|
1442
1442
|
}), "i"),
|
|
1443
1443
|
lookbehind: !0,
|
|
1444
1444
|
greedy: !0,
|
|
1445
1445
|
inside: l
|
|
1446
|
-
}, n.languages.insertBefore("markup", "cdata",
|
|
1446
|
+
}, n.languages.insertBefore("markup", "cdata", b);
|
|
1447
1447
|
}
|
|
1448
1448
|
}), Object.defineProperty(n.languages.markup.tag, "addAttribute", {
|
|
1449
1449
|
/**
|
|
@@ -1457,10 +1457,10 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1457
1457
|
* @example
|
|
1458
1458
|
* addAttribute('style', 'css');
|
|
1459
1459
|
*/
|
|
1460
|
-
value: function(
|
|
1460
|
+
value: function(p, m) {
|
|
1461
1461
|
n.languages.markup.tag.inside["special-attr"].push({
|
|
1462
1462
|
pattern: RegExp(
|
|
1463
|
-
/(^|["'\s])/.source + "(?:" +
|
|
1463
|
+
/(^|["'\s])/.source + "(?:" + p + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
|
1464
1464
|
"i"
|
|
1465
1465
|
),
|
|
1466
1466
|
lookbehind: !0,
|
|
@@ -1472,8 +1472,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1472
1472
|
value: {
|
|
1473
1473
|
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
1474
1474
|
lookbehind: !0,
|
|
1475
|
-
alias: [
|
|
1476
|
-
inside: n.languages[
|
|
1475
|
+
alias: [m, "language-" + m],
|
|
1476
|
+
inside: n.languages[m]
|
|
1477
1477
|
},
|
|
1478
1478
|
punctuation: [
|
|
1479
1479
|
{
|
|
@@ -1487,12 +1487,12 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1487
1487
|
}
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
|
-
}), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(
|
|
1491
|
-
var
|
|
1492
|
-
|
|
1490
|
+
}), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(p) {
|
|
1491
|
+
var m = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
1492
|
+
p.languages.css = {
|
|
1493
1493
|
comment: /\/\*[\s\S]*?\*\//,
|
|
1494
1494
|
atrule: {
|
|
1495
|
-
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" +
|
|
1495
|
+
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + m.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
1496
1496
|
inside: {
|
|
1497
1497
|
rule: /^@[\w-]+/,
|
|
1498
1498
|
"selector-function-argument": {
|
|
@@ -1509,23 +1509,23 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1509
1509
|
},
|
|
1510
1510
|
url: {
|
|
1511
1511
|
// https://drafts.csswg.org/css-values-3/#urls
|
|
1512
|
-
pattern: RegExp("\\burl\\((?:" +
|
|
1512
|
+
pattern: RegExp("\\burl\\((?:" + m.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
|
1513
1513
|
greedy: !0,
|
|
1514
1514
|
inside: {
|
|
1515
1515
|
function: /^url/i,
|
|
1516
1516
|
punctuation: /^\(|\)$/,
|
|
1517
1517
|
string: {
|
|
1518
|
-
pattern: RegExp("^" +
|
|
1518
|
+
pattern: RegExp("^" + m.source + "$"),
|
|
1519
1519
|
alias: "url"
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
},
|
|
1523
1523
|
selector: {
|
|
1524
|
-
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` +
|
|
1524
|
+
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + m.source + ")*(?=\\s*\\{)"),
|
|
1525
1525
|
lookbehind: !0
|
|
1526
1526
|
},
|
|
1527
1527
|
string: {
|
|
1528
|
-
pattern:
|
|
1528
|
+
pattern: m,
|
|
1529
1529
|
greedy: !0
|
|
1530
1530
|
},
|
|
1531
1531
|
property: {
|
|
@@ -1538,9 +1538,9 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1538
1538
|
lookbehind: !0
|
|
1539
1539
|
},
|
|
1540
1540
|
punctuation: /[(){};:,]/
|
|
1541
|
-
},
|
|
1542
|
-
var
|
|
1543
|
-
|
|
1541
|
+
}, p.languages.css.atrule.inside.rest = p.languages.css;
|
|
1542
|
+
var R = p.languages.markup;
|
|
1543
|
+
R && (R.tag.addInlined("style", "css"), R.tag.addAttribute("style", "css"));
|
|
1544
1544
|
}(n), n.languages.clike = {
|
|
1545
1545
|
comment: [
|
|
1546
1546
|
{
|
|
@@ -1705,9 +1705,9 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1705
1705
|
if (typeof n > "u" || typeof document > "u")
|
|
1706
1706
|
return;
|
|
1707
1707
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1708
|
-
var
|
|
1709
|
-
return "✖ Error " + F + " while fetching file: " +
|
|
1710
|
-
},
|
|
1708
|
+
var p = "Loading…", m = function(F, S) {
|
|
1709
|
+
return "✖ Error " + F + " while fetching file: " + S;
|
|
1710
|
+
}, R = "✖ Error: File does not exist or is empty", k = {
|
|
1711
1711
|
js: "javascript",
|
|
1712
1712
|
py: "python",
|
|
1713
1713
|
rb: "ruby",
|
|
@@ -1717,52 +1717,52 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1717
1717
|
bat: "batch",
|
|
1718
1718
|
h: "c",
|
|
1719
1719
|
tex: "latex"
|
|
1720
|
-
}, l = "data-src-status",
|
|
1721
|
-
function D(F,
|
|
1722
|
-
var
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
},
|
|
1720
|
+
}, l = "data-src-status", b = "loading", y = "loaded", _ = "failed", O = "pre[data-src]:not([" + l + '="' + y + '"]):not([' + l + '="' + b + '"])';
|
|
1721
|
+
function D(F, S, T) {
|
|
1722
|
+
var t = new XMLHttpRequest();
|
|
1723
|
+
t.open("GET", F, !0), t.onreadystatechange = function() {
|
|
1724
|
+
t.readyState == 4 && (t.status < 400 && t.responseText ? S(t.responseText) : t.status >= 400 ? T(m(t.status, t.statusText)) : T(R));
|
|
1725
|
+
}, t.send(null);
|
|
1726
1726
|
}
|
|
1727
1727
|
function I(F) {
|
|
1728
|
-
var
|
|
1729
|
-
if (
|
|
1730
|
-
var
|
|
1731
|
-
return
|
|
1728
|
+
var S = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(F || "");
|
|
1729
|
+
if (S) {
|
|
1730
|
+
var T = Number(S[1]), t = S[2], r = S[3];
|
|
1731
|
+
return t ? r ? [T, Number(r)] : [T, void 0] : [T, T];
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
n.hooks.add("before-highlightall", function(F) {
|
|
1735
1735
|
F.selector += ", " + O;
|
|
1736
1736
|
}), n.hooks.add("before-sanity-check", function(F) {
|
|
1737
|
-
var
|
|
1737
|
+
var S = (
|
|
1738
1738
|
/** @type {HTMLPreElement} */
|
|
1739
1739
|
F.element
|
|
1740
1740
|
);
|
|
1741
|
-
if (
|
|
1742
|
-
F.code = "",
|
|
1743
|
-
var
|
|
1744
|
-
|
|
1745
|
-
var
|
|
1746
|
-
if (
|
|
1747
|
-
var i = (/\.(\w+)$/.exec(
|
|
1748
|
-
|
|
1749
|
-
}
|
|
1750
|
-
n.util.setLanguage(
|
|
1751
|
-
var
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
function(
|
|
1755
|
-
|
|
1756
|
-
var f = I(
|
|
1741
|
+
if (S.matches(O)) {
|
|
1742
|
+
F.code = "", S.setAttribute(l, b);
|
|
1743
|
+
var T = S.appendChild(document.createElement("CODE"));
|
|
1744
|
+
T.textContent = p;
|
|
1745
|
+
var t = S.getAttribute("data-src"), r = F.language;
|
|
1746
|
+
if (r === "none") {
|
|
1747
|
+
var i = (/\.(\w+)$/.exec(t) || [, "none"])[1];
|
|
1748
|
+
r = k[i] || i;
|
|
1749
|
+
}
|
|
1750
|
+
n.util.setLanguage(T, r), n.util.setLanguage(S, r);
|
|
1751
|
+
var o = n.plugins.autoloader;
|
|
1752
|
+
o && o.loadLanguages(r), D(
|
|
1753
|
+
t,
|
|
1754
|
+
function(s) {
|
|
1755
|
+
S.setAttribute(l, y);
|
|
1756
|
+
var f = I(S.getAttribute("data-range"));
|
|
1757
1757
|
if (f) {
|
|
1758
|
-
var E =
|
|
1759
|
-
g < 0 && (g += E.length), g = Math.max(0, Math.min(g - 1, E.length)), C < 0 && (C += E.length), C = Math.max(0, Math.min(C, E.length)),
|
|
1760
|
-
`),
|
|
1758
|
+
var E = s.split(/\r\n?|\n/g), g = f[0], C = f[1] == null ? E.length : f[1];
|
|
1759
|
+
g < 0 && (g += E.length), g = Math.max(0, Math.min(g - 1, E.length)), C < 0 && (C += E.length), C = Math.max(0, Math.min(C, E.length)), s = E.slice(g, C).join(`
|
|
1760
|
+
`), S.hasAttribute("data-start") || S.setAttribute("data-start", String(g + 1));
|
|
1761
1761
|
}
|
|
1762
|
-
|
|
1762
|
+
T.textContent = s, n.highlightElement(T);
|
|
1763
1763
|
},
|
|
1764
|
-
function(
|
|
1765
|
-
|
|
1764
|
+
function(s) {
|
|
1765
|
+
S.setAttribute(l, _), T.textContent = s;
|
|
1766
1766
|
}
|
|
1767
1767
|
);
|
|
1768
1768
|
}
|
|
@@ -1774,9 +1774,9 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1774
1774
|
*
|
|
1775
1775
|
* @param {ParentNode} [container=document]
|
|
1776
1776
|
*/
|
|
1777
|
-
highlight: function(
|
|
1778
|
-
for (var
|
|
1779
|
-
n.highlightElement(
|
|
1777
|
+
highlight: function(S) {
|
|
1778
|
+
for (var T = (S || document).querySelectorAll(O), t = 0, r; r = T[t++]; )
|
|
1779
|
+
n.highlightElement(r);
|
|
1780
1780
|
}
|
|
1781
1781
|
};
|
|
1782
1782
|
var B = !1;
|
|
@@ -1785,8 +1785,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1785
1785
|
};
|
|
1786
1786
|
}();
|
|
1787
1787
|
})(Je);
|
|
1788
|
-
var
|
|
1789
|
-
const Ne = /* @__PURE__ */
|
|
1788
|
+
var Tt = Je.exports;
|
|
1789
|
+
const Ne = /* @__PURE__ */ St(Tt);
|
|
1790
1790
|
Prism.languages.clike = {
|
|
1791
1791
|
comment: [
|
|
1792
1792
|
{
|
|
@@ -2044,8 +2044,8 @@ Prism.languages.insertBefore("go", "string", {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
});
|
|
2046
2046
|
delete Prism.languages.go["class-name"];
|
|
2047
|
-
(function(
|
|
2048
|
-
var
|
|
2047
|
+
(function(u) {
|
|
2048
|
+
var d = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, p = {
|
|
2049
2049
|
pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
2050
2050
|
lookbehind: !0,
|
|
2051
2051
|
inside: {
|
|
@@ -2058,32 +2058,32 @@ delete Prism.languages.go["class-name"];
|
|
|
2058
2058
|
punctuation: /\./
|
|
2059
2059
|
}
|
|
2060
2060
|
};
|
|
2061
|
-
|
|
2061
|
+
u.languages.java = u.languages.extend("clike", {
|
|
2062
2062
|
string: {
|
|
2063
2063
|
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
|
2064
2064
|
lookbehind: !0,
|
|
2065
2065
|
greedy: !0
|
|
2066
2066
|
},
|
|
2067
2067
|
"class-name": [
|
|
2068
|
-
|
|
2068
|
+
p,
|
|
2069
2069
|
{
|
|
2070
2070
|
// variables, parameters, and constructor references
|
|
2071
2071
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2072
2072
|
pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
|
|
2073
2073
|
lookbehind: !0,
|
|
2074
|
-
inside:
|
|
2074
|
+
inside: p.inside
|
|
2075
2075
|
},
|
|
2076
2076
|
{
|
|
2077
2077
|
// class names based on keyword
|
|
2078
2078
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2079
2079
|
pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + n + /[A-Z]\w*\b/.source),
|
|
2080
2080
|
lookbehind: !0,
|
|
2081
|
-
inside:
|
|
2081
|
+
inside: p.inside
|
|
2082
2082
|
}
|
|
2083
2083
|
],
|
|
2084
|
-
keyword:
|
|
2084
|
+
keyword: d,
|
|
2085
2085
|
function: [
|
|
2086
|
-
|
|
2086
|
+
u.languages.clike.function,
|
|
2087
2087
|
{
|
|
2088
2088
|
pattern: /(::\s*)[a-z_]\w*/,
|
|
2089
2089
|
lookbehind: !0
|
|
@@ -2095,7 +2095,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2095
2095
|
lookbehind: !0
|
|
2096
2096
|
},
|
|
2097
2097
|
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
2098
|
-
}),
|
|
2098
|
+
}), u.languages.insertBefore("java", "string", {
|
|
2099
2099
|
"triple-quoted-string": {
|
|
2100
2100
|
// http://openjdk.java.net/jeps/355#Description
|
|
2101
2101
|
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
@@ -2106,7 +2106,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2106
2106
|
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
|
2107
2107
|
greedy: !0
|
|
2108
2108
|
}
|
|
2109
|
-
}),
|
|
2109
|
+
}), u.languages.insertBefore("java", "class-name", {
|
|
2110
2110
|
annotation: {
|
|
2111
2111
|
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
2112
2112
|
lookbehind: !0,
|
|
@@ -2115,8 +2115,8 @@ delete Prism.languages.go["class-name"];
|
|
|
2115
2115
|
generics: {
|
|
2116
2116
|
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
2117
2117
|
inside: {
|
|
2118
|
-
"class-name":
|
|
2119
|
-
keyword:
|
|
2118
|
+
"class-name": p,
|
|
2119
|
+
keyword: d,
|
|
2120
2120
|
punctuation: /[<>(),.:]/,
|
|
2121
2121
|
operator: /[?&|]/
|
|
2122
2122
|
}
|
|
@@ -2126,7 +2126,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2126
2126
|
pattern: RegExp(/(\bimport\s+)/.source + n + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
|
|
2127
2127
|
lookbehind: !0,
|
|
2128
2128
|
inside: {
|
|
2129
|
-
namespace:
|
|
2129
|
+
namespace: p.inside.namespace,
|
|
2130
2130
|
punctuation: /\./,
|
|
2131
2131
|
operator: /\*/,
|
|
2132
2132
|
"class-name": /\w+/
|
|
@@ -2137,7 +2137,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2137
2137
|
lookbehind: !0,
|
|
2138
2138
|
alias: "static",
|
|
2139
2139
|
inside: {
|
|
2140
|
-
namespace:
|
|
2140
|
+
namespace: p.inside.namespace,
|
|
2141
2141
|
static: /\b\w+$/,
|
|
2142
2142
|
punctuation: /\./,
|
|
2143
2143
|
operator: /\*/,
|
|
@@ -2148,7 +2148,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2148
2148
|
namespace: {
|
|
2149
2149
|
pattern: RegExp(
|
|
2150
2150
|
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
|
|
2151
|
-
return
|
|
2151
|
+
return d.source;
|
|
2152
2152
|
})
|
|
2153
2153
|
),
|
|
2154
2154
|
lookbehind: !0,
|
|
@@ -2234,17 +2234,17 @@ Prism.languages.insertBefore("c", "function", {
|
|
|
2234
2234
|
constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
|
|
2235
2235
|
});
|
|
2236
2236
|
delete Prism.languages.c.boolean;
|
|
2237
|
-
(function(
|
|
2238
|
-
for (var
|
|
2239
|
-
|
|
2240
|
-
return
|
|
2237
|
+
(function(u) {
|
|
2238
|
+
for (var d = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, n = 0; n < 2; n++)
|
|
2239
|
+
d = d.replace(/<self>/g, function() {
|
|
2240
|
+
return d;
|
|
2241
2241
|
});
|
|
2242
|
-
|
|
2242
|
+
d = d.replace(/<self>/g, function() {
|
|
2243
2243
|
return /[^\s\S]/.source;
|
|
2244
|
-
}),
|
|
2244
|
+
}), u.languages.rust = {
|
|
2245
2245
|
comment: [
|
|
2246
2246
|
{
|
|
2247
|
-
pattern: RegExp(/(^|[^\\])/.source +
|
|
2247
|
+
pattern: RegExp(/(^|[^\\])/.source + d),
|
|
2248
2248
|
lookbehind: !0,
|
|
2249
2249
|
greedy: !0
|
|
2250
2250
|
},
|
|
@@ -2348,7 +2348,7 @@ delete Prism.languages.c.boolean;
|
|
|
2348
2348
|
boolean: /\b(?:false|true)\b/,
|
|
2349
2349
|
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
2350
2350
|
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
2351
|
-
},
|
|
2351
|
+
}, u.languages.rust["closure-params"].inside.rest = u.languages.rust, u.languages.rust.attribute.inside.string = u.languages.rust.string;
|
|
2352
2352
|
})(Prism);
|
|
2353
2353
|
Prism.languages.sql = {
|
|
2354
2354
|
comment: {
|
|
@@ -2383,18 +2383,18 @@ Prism.languages.sql = {
|
|
|
2383
2383
|
operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
|
|
2384
2384
|
punctuation: /[;[\]()`,.]/
|
|
2385
2385
|
};
|
|
2386
|
-
(function(
|
|
2387
|
-
var
|
|
2386
|
+
(function(u) {
|
|
2387
|
+
var d = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
|
|
2388
2388
|
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
|
|
2389
2389
|
lookbehind: !0,
|
|
2390
2390
|
alias: "punctuation",
|
|
2391
2391
|
// this looks reasonably well in all themes
|
|
2392
2392
|
inside: null
|
|
2393
2393
|
// see below
|
|
2394
|
-
},
|
|
2394
|
+
}, p = {
|
|
2395
2395
|
bash: n,
|
|
2396
2396
|
environment: {
|
|
2397
|
-
pattern: RegExp("\\$" +
|
|
2397
|
+
pattern: RegExp("\\$" + d),
|
|
2398
2398
|
alias: "constant"
|
|
2399
2399
|
},
|
|
2400
2400
|
variable: [
|
|
@@ -2434,7 +2434,7 @@ Prism.languages.sql = {
|
|
|
2434
2434
|
operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
|
|
2435
2435
|
punctuation: /[\[\]]/,
|
|
2436
2436
|
environment: {
|
|
2437
|
-
pattern: RegExp("(\\{)" +
|
|
2437
|
+
pattern: RegExp("(\\{)" + d),
|
|
2438
2438
|
lookbehind: !0,
|
|
2439
2439
|
alias: "constant"
|
|
2440
2440
|
}
|
|
@@ -2445,7 +2445,7 @@ Prism.languages.sql = {
|
|
|
2445
2445
|
// Escape sequences from echo and printf's manuals, and escaped quotes.
|
|
2446
2446
|
entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
|
|
2447
2447
|
};
|
|
2448
|
-
|
|
2448
|
+
u.languages.bash = {
|
|
2449
2449
|
shebang: {
|
|
2450
2450
|
pattern: /^#!\s*\/.*/,
|
|
2451
2451
|
alias: "important"
|
|
@@ -2483,7 +2483,7 @@ Prism.languages.sql = {
|
|
|
2483
2483
|
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
|
|
2484
2484
|
inside: {
|
|
2485
2485
|
environment: {
|
|
2486
|
-
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" +
|
|
2486
|
+
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + d),
|
|
2487
2487
|
lookbehind: !0,
|
|
2488
2488
|
alias: "constant"
|
|
2489
2489
|
}
|
|
@@ -2503,7 +2503,7 @@ Prism.languages.sql = {
|
|
|
2503
2503
|
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
2504
2504
|
lookbehind: !0,
|
|
2505
2505
|
greedy: !0,
|
|
2506
|
-
inside:
|
|
2506
|
+
inside: p
|
|
2507
2507
|
},
|
|
2508
2508
|
// Here-document with quotes around the tag
|
|
2509
2509
|
// → No expansion (so no “inside”).
|
|
@@ -2521,7 +2521,7 @@ Prism.languages.sql = {
|
|
|
2521
2521
|
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
2522
2522
|
lookbehind: !0,
|
|
2523
2523
|
greedy: !0,
|
|
2524
|
-
inside:
|
|
2524
|
+
inside: p
|
|
2525
2525
|
},
|
|
2526
2526
|
{
|
|
2527
2527
|
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
|
|
@@ -2534,15 +2534,15 @@ Prism.languages.sql = {
|
|
|
2534
2534
|
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
2535
2535
|
greedy: !0,
|
|
2536
2536
|
inside: {
|
|
2537
|
-
entity:
|
|
2537
|
+
entity: p.entity
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
2540
2540
|
],
|
|
2541
2541
|
environment: {
|
|
2542
|
-
pattern: RegExp("\\$?" +
|
|
2542
|
+
pattern: RegExp("\\$?" + d),
|
|
2543
2543
|
alias: "constant"
|
|
2544
2544
|
},
|
|
2545
|
-
variable:
|
|
2545
|
+
variable: p.variable,
|
|
2546
2546
|
function: {
|
|
2547
2547
|
pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
|
|
2548
2548
|
lookbehind: !0
|
|
@@ -2581,8 +2581,8 @@ Prism.languages.sql = {
|
|
|
2581
2581
|
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
|
|
2582
2582
|
lookbehind: !0
|
|
2583
2583
|
}
|
|
2584
|
-
}, n.inside =
|
|
2585
|
-
for (var
|
|
2584
|
+
}, n.inside = u.languages.bash;
|
|
2585
|
+
for (var m = [
|
|
2586
2586
|
"comment",
|
|
2587
2587
|
"function-name",
|
|
2588
2588
|
"for-or-select",
|
|
@@ -2598,9 +2598,9 @@ Prism.languages.sql = {
|
|
|
2598
2598
|
"operator",
|
|
2599
2599
|
"punctuation",
|
|
2600
2600
|
"number"
|
|
2601
|
-
],
|
|
2602
|
-
|
|
2603
|
-
|
|
2601
|
+
], R = p.variable[1].inside, k = 0; k < m.length; k++)
|
|
2602
|
+
R[m[k]] = u.languages.bash[m[k]];
|
|
2603
|
+
u.languages.sh = u.languages.bash, u.languages.shell = u.languages.bash;
|
|
2604
2604
|
})(Prism);
|
|
2605
2605
|
Prism.languages.json = {
|
|
2606
2606
|
property: {
|
|
@@ -2627,8 +2627,133 @@ Prism.languages.json = {
|
|
|
2627
2627
|
}
|
|
2628
2628
|
};
|
|
2629
2629
|
Prism.languages.webmanifest = Prism.languages.json;
|
|
2630
|
+
const Rt = `
|
|
2631
|
+
.hep-cr-editor .token.comment,
|
|
2632
|
+
.hep-cr-editor .token.prolog,
|
|
2633
|
+
.hep-cr-editor .token.doctype,
|
|
2634
|
+
.hep-cr-editor .token.cdata {
|
|
2635
|
+
color: #8292a2 !important;
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
.hep-cr-editor .token.punctuation {
|
|
2639
|
+
color: #f8f8f2 !important;
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
.hep-cr-editor .token.property,
|
|
2643
|
+
.hep-cr-editor .token.tag,
|
|
2644
|
+
.hep-cr-editor .token.constant,
|
|
2645
|
+
.hep-cr-editor .token.symbol,
|
|
2646
|
+
.hep-cr-editor .token.deleted {
|
|
2647
|
+
color: #f92672 !important;
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
.hep-cr-editor .token.boolean,
|
|
2651
|
+
.hep-cr-editor .token.number {
|
|
2652
|
+
color: #ae81ff !important;
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
.hep-cr-editor .token.selector,
|
|
2656
|
+
.hep-cr-editor .token.attr-name,
|
|
2657
|
+
.hep-cr-editor .token.string,
|
|
2658
|
+
.hep-cr-editor .token.char,
|
|
2659
|
+
.hep-cr-editor .token.builtin,
|
|
2660
|
+
.hep-cr-editor .token.inserted {
|
|
2661
|
+
color: #a6e22e !important;
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
.hep-cr-editor .token.operator,
|
|
2665
|
+
.hep-cr-editor .token.entity,
|
|
2666
|
+
.hep-cr-editor .token.url,
|
|
2667
|
+
.hep-cr-editor .language-css .hep-cr-editor .token.string,
|
|
2668
|
+
.hep-cr-editor .style .hep-cr-editor .token.string,
|
|
2669
|
+
.hep-cr-editor .token.variable {
|
|
2670
|
+
color: #f8f8f2 !important;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
.hep-cr-editor .token.atrule,
|
|
2674
|
+
.hep-cr-editor .token.attr-value,
|
|
2675
|
+
.hep-cr-editor .token.function,
|
|
2676
|
+
.hep-cr-editor .token.class-name {
|
|
2677
|
+
color: #e6db74 !important;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
.hep-cr-editor .token.keyword,
|
|
2681
|
+
.hep-cr-editor .token.keyword-control {
|
|
2682
|
+
color: #66d9ef !important;
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
.hep-cr-editor .token.regex,
|
|
2686
|
+
.hep-cr-editor .token.important {
|
|
2687
|
+
color: #fd971f !important;
|
|
2688
|
+
}
|
|
2689
|
+
`, _t = `
|
|
2690
|
+
.hep-cr-editor .token.comment,
|
|
2691
|
+
.hep-cr-editor .token.prolog,
|
|
2692
|
+
.hep-cr-editor .token.doctype,
|
|
2693
|
+
.hep-cr-editor .token.cdata {
|
|
2694
|
+
color: #708090;
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
.hep-cr-editor .token.punctuation {
|
|
2698
|
+
color: #333;
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
.hep-cr-editor .token.property,
|
|
2702
|
+
.hep-cr-editor .token.tag,
|
|
2703
|
+
.hep-cr-editor .token.constant,
|
|
2704
|
+
.hep-cr-editor .token.symbol,
|
|
2705
|
+
.hep-cr-editor .token.deleted {
|
|
2706
|
+
color: #d73a49;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
.hep-cr-editor .token.boolean,
|
|
2710
|
+
.hep-cr-editor .token.number {
|
|
2711
|
+
color: #005cc5;
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
.hep-cr-editor .token.selector,
|
|
2715
|
+
.hep-cr-editor .token.attr-name,
|
|
2716
|
+
.hep-cr-editor .token.string,
|
|
2717
|
+
.hep-cr-editor .token.char,
|
|
2718
|
+
.hep-cr-editor .token.builtin,
|
|
2719
|
+
.hep-cr-editor .token.inserted {
|
|
2720
|
+
color: #22863a;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
.hep-cr-editor .token.operator,
|
|
2724
|
+
.hep-cr-editor .token.entity,
|
|
2725
|
+
.hep-cr-editor .token.url,
|
|
2726
|
+
.hep-cr-editor .language-css .hep-cr-editor .token.string,
|
|
2727
|
+
.hep-cr-editor .style .hep-cr-editor .token.string,
|
|
2728
|
+
.hep-cr-editor .token.variable {
|
|
2729
|
+
color: #333;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
.hep-cr-editor .token.atrule,
|
|
2733
|
+
.hep-cr-editor .token.attr-value,
|
|
2734
|
+
.hep-cr-editor .token.function,
|
|
2735
|
+
.hep-cr-editor .token.class-name {
|
|
2736
|
+
color: #6f42c1;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
.hep-cr-editor .token.keyword {
|
|
2740
|
+
color: #d73a49;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
.hep-cr-editor .token.regex,
|
|
2744
|
+
.hep-cr-editor .token.important {
|
|
2745
|
+
color: #e36209;
|
|
2746
|
+
}
|
|
2747
|
+
`;
|
|
2630
2748
|
window.Prism = Ne;
|
|
2631
|
-
|
|
2749
|
+
function Ft(u) {
|
|
2750
|
+
if (typeof document > "u") return;
|
|
2751
|
+
const d = "hep-cr-prism-styles", n = document.getElementById(d), p = u === "dark" ? Rt : _t;
|
|
2752
|
+
n && n.remove();
|
|
2753
|
+
const m = document.createElement("style");
|
|
2754
|
+
m.id = d, m.textContent = p, document.head.appendChild(m);
|
|
2755
|
+
}
|
|
2756
|
+
const Ot = {
|
|
2632
2757
|
javascript: "javascript",
|
|
2633
2758
|
js: "javascript",
|
|
2634
2759
|
typescript: "typescript",
|
|
@@ -2660,43 +2785,45 @@ const kr = {
|
|
|
2660
2785
|
markdown: "markdown",
|
|
2661
2786
|
md: "markdown"
|
|
2662
2787
|
};
|
|
2663
|
-
function
|
|
2664
|
-
const
|
|
2665
|
-
return
|
|
2788
|
+
function It(u) {
|
|
2789
|
+
const d = document.createElement("div");
|
|
2790
|
+
return d.textContent = u, d.innerHTML;
|
|
2666
2791
|
}
|
|
2667
|
-
const
|
|
2668
|
-
value:
|
|
2669
|
-
language:
|
|
2792
|
+
const Nt = ({
|
|
2793
|
+
value: u,
|
|
2794
|
+
language: d,
|
|
2670
2795
|
theme: n = "dark",
|
|
2671
|
-
disabled:
|
|
2672
|
-
onChange:
|
|
2796
|
+
disabled: p = !1,
|
|
2797
|
+
onChange: m
|
|
2673
2798
|
}) => {
|
|
2674
|
-
const
|
|
2799
|
+
const R = Oe(null), k = Oe(null), l = Ee(() => Ot[d.toLowerCase()] || "javascript", [d]), b = n === "dark" ? "#1e1e1e" : "#fafafa", y = Ee(() => {
|
|
2675
2800
|
try {
|
|
2676
2801
|
const I = Ne.languages[l];
|
|
2677
2802
|
if (I)
|
|
2678
|
-
return Ne.highlight(
|
|
2803
|
+
return Ne.highlight(u || "", I, l);
|
|
2679
2804
|
} catch {
|
|
2680
2805
|
}
|
|
2681
|
-
return
|
|
2682
|
-
}, [
|
|
2683
|
-
|
|
2806
|
+
return It(u || "");
|
|
2807
|
+
}, [u, l]), _ = (I) => {
|
|
2808
|
+
m == null || m(I.target.value);
|
|
2684
2809
|
}, O = () => {
|
|
2685
|
-
|
|
2810
|
+
R.current && k.current && (k.current.scrollTop = R.current.scrollTop, k.current.scrollLeft = R.current.scrollLeft);
|
|
2686
2811
|
}, D = (I) => {
|
|
2687
2812
|
if (I.key === "Tab") {
|
|
2688
2813
|
I.preventDefault();
|
|
2689
|
-
const B = I.target, F = B.selectionStart,
|
|
2690
|
-
|
|
2814
|
+
const B = I.target, F = B.selectionStart, S = B.selectionEnd, T = u.substring(0, F) + " " + u.substring(S);
|
|
2815
|
+
m == null || m(T), requestAnimationFrame(() => {
|
|
2691
2816
|
B.selectionStart = B.selectionEnd = F + 2;
|
|
2692
2817
|
});
|
|
2693
2818
|
}
|
|
2694
2819
|
};
|
|
2695
|
-
return
|
|
2820
|
+
return ke(() => {
|
|
2821
|
+
Ft(n);
|
|
2822
|
+
}, [n]), /* @__PURE__ */ h.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background: b }, children: [
|
|
2696
2823
|
/* @__PURE__ */ h.jsx(
|
|
2697
2824
|
"pre",
|
|
2698
2825
|
{
|
|
2699
|
-
ref:
|
|
2826
|
+
ref: k,
|
|
2700
2827
|
className: `hep-cr-highlight language-${l}`,
|
|
2701
2828
|
"aria-hidden": "true",
|
|
2702
2829
|
children: /* @__PURE__ */ h.jsx("code", { dangerouslySetInnerHTML: { __html: y } })
|
|
@@ -2705,10 +2832,10 @@ const Fr = ({
|
|
|
2705
2832
|
/* @__PURE__ */ h.jsx(
|
|
2706
2833
|
"textarea",
|
|
2707
2834
|
{
|
|
2708
|
-
ref:
|
|
2835
|
+
ref: R,
|
|
2709
2836
|
className: "hep-cr-input",
|
|
2710
|
-
value:
|
|
2711
|
-
disabled:
|
|
2837
|
+
value: u,
|
|
2838
|
+
disabled: p,
|
|
2712
2839
|
onChange: _,
|
|
2713
2840
|
onScroll: O,
|
|
2714
2841
|
onKeyDown: D,
|
|
@@ -2717,7 +2844,7 @@ const Fr = ({
|
|
|
2717
2844
|
}
|
|
2718
2845
|
)
|
|
2719
2846
|
] });
|
|
2720
|
-
},
|
|
2847
|
+
}, Ct = `
|
|
2721
2848
|
.hep-cr-editor {
|
|
2722
2849
|
position: relative;
|
|
2723
2850
|
flex: 1;
|
|
@@ -2776,21 +2903,21 @@ const Fr = ({
|
|
|
2776
2903
|
}
|
|
2777
2904
|
`;
|
|
2778
2905
|
if (typeof document < "u") {
|
|
2779
|
-
const
|
|
2780
|
-
if (!document.getElementById(
|
|
2781
|
-
const
|
|
2782
|
-
|
|
2906
|
+
const u = "hep-cr-editor-styles";
|
|
2907
|
+
if (!document.getElementById(u)) {
|
|
2908
|
+
const d = document.createElement("style");
|
|
2909
|
+
d.id = u, d.textContent = Ct, document.head.appendChild(d);
|
|
2783
2910
|
}
|
|
2784
2911
|
}
|
|
2785
|
-
var
|
|
2786
|
-
let
|
|
2787
|
-
class
|
|
2788
|
-
constructor(
|
|
2789
|
-
Ze(this, "baseUrl"), Ze(this, "timeout"), this.baseUrl =
|
|
2912
|
+
var Lt = Object.defineProperty, Pt = (u, d, n) => d in u ? Lt(u, d, { enumerable: !0, configurable: !0, writable: !0, value: n }) : u[d] = n, Ze = (u, d, n) => Pt(u, typeof d != "symbol" ? d + "" : d, n);
|
|
2913
|
+
let _e = null;
|
|
2914
|
+
class Dt {
|
|
2915
|
+
constructor(d = {}) {
|
|
2916
|
+
Ze(this, "baseUrl"), Ze(this, "timeout"), this.baseUrl = d.pistonUrl || "/api/piston", this.timeout = d.timeout || 3e3;
|
|
2790
2917
|
}
|
|
2791
|
-
async getRuntimes(
|
|
2792
|
-
if (
|
|
2793
|
-
return
|
|
2918
|
+
async getRuntimes(d = !1) {
|
|
2919
|
+
if (_e && !d)
|
|
2920
|
+
return _e;
|
|
2794
2921
|
try {
|
|
2795
2922
|
const n = await fetch(`${this.baseUrl}/runtimes`, {
|
|
2796
2923
|
method: "GET",
|
|
@@ -2800,46 +2927,46 @@ class Cr {
|
|
|
2800
2927
|
});
|
|
2801
2928
|
if (!n.ok)
|
|
2802
2929
|
throw new Error(`Failed to fetch runtimes: ${n.statusText}`);
|
|
2803
|
-
const
|
|
2804
|
-
return
|
|
2930
|
+
const p = await n.json();
|
|
2931
|
+
return _e = p, p;
|
|
2805
2932
|
} catch (n) {
|
|
2806
2933
|
throw console.error("Failed to fetch runtimes:", n), n;
|
|
2807
2934
|
}
|
|
2808
2935
|
}
|
|
2809
|
-
async execute(
|
|
2810
|
-
const
|
|
2811
|
-
(
|
|
2936
|
+
async execute(d, n, p = {}) {
|
|
2937
|
+
const m = (await this.getRuntimes()).find(
|
|
2938
|
+
(b) => {
|
|
2812
2939
|
var y;
|
|
2813
|
-
return
|
|
2940
|
+
return b.language.toLowerCase() === d.toLowerCase() || ((y = b.aliases) == null ? void 0 : y.some((_) => _.toLowerCase() === d.toLowerCase()));
|
|
2814
2941
|
}
|
|
2815
2942
|
);
|
|
2816
|
-
if (!
|
|
2817
|
-
throw new Error(`Language '${
|
|
2818
|
-
const
|
|
2819
|
-
language:
|
|
2820
|
-
version:
|
|
2943
|
+
if (!m)
|
|
2944
|
+
throw new Error(`Language '${d}' is not supported`);
|
|
2945
|
+
const R = this.getFileName(d), k = {
|
|
2946
|
+
language: m.language,
|
|
2947
|
+
version: p.version || m.version,
|
|
2821
2948
|
files: [
|
|
2822
2949
|
{
|
|
2823
|
-
name:
|
|
2950
|
+
name: R,
|
|
2824
2951
|
content: n
|
|
2825
2952
|
}
|
|
2826
2953
|
],
|
|
2827
|
-
stdin:
|
|
2828
|
-
args:
|
|
2829
|
-
run_timeout:
|
|
2954
|
+
stdin: p.stdin || "",
|
|
2955
|
+
args: p.args || [],
|
|
2956
|
+
run_timeout: p.runTimeout || this.timeout,
|
|
2830
2957
|
compile_timeout: this.timeout
|
|
2831
2958
|
}, l = Date.now();
|
|
2832
2959
|
try {
|
|
2833
|
-
const
|
|
2960
|
+
const b = await fetch(`${this.baseUrl}/execute`, {
|
|
2834
2961
|
method: "POST",
|
|
2835
2962
|
headers: {
|
|
2836
2963
|
"Content-Type": "application/json"
|
|
2837
2964
|
},
|
|
2838
|
-
body: JSON.stringify(
|
|
2965
|
+
body: JSON.stringify(k)
|
|
2839
2966
|
});
|
|
2840
|
-
if (!
|
|
2841
|
-
throw new Error(`Execute failed: ${
|
|
2842
|
-
const y = await
|
|
2967
|
+
if (!b.ok)
|
|
2968
|
+
throw new Error(`Execute failed: ${b.statusText}`);
|
|
2969
|
+
const y = await b.json(), _ = Date.now() - l, O = y.run.stdout || "", D = y.run.stderr || "";
|
|
2843
2970
|
return {
|
|
2844
2971
|
success: y.run.code === 0,
|
|
2845
2972
|
output: O,
|
|
@@ -2852,17 +2979,17 @@ class Cr {
|
|
|
2852
2979
|
code: y.compile.code
|
|
2853
2980
|
} : void 0
|
|
2854
2981
|
};
|
|
2855
|
-
} catch (
|
|
2982
|
+
} catch (b) {
|
|
2856
2983
|
return {
|
|
2857
2984
|
success: !1,
|
|
2858
2985
|
output: "",
|
|
2859
|
-
stderr:
|
|
2986
|
+
stderr: b instanceof Error ? b.message : "Unknown error",
|
|
2860
2987
|
code: -1,
|
|
2861
2988
|
executionTime: Date.now() - l
|
|
2862
2989
|
};
|
|
2863
2990
|
}
|
|
2864
2991
|
}
|
|
2865
|
-
getFileName(
|
|
2992
|
+
getFileName(d) {
|
|
2866
2993
|
return {
|
|
2867
2994
|
javascript: "main.js",
|
|
2868
2995
|
typescript: "main.ts",
|
|
@@ -2889,10 +3016,10 @@ class Cr {
|
|
|
2889
3016
|
css: "style.css",
|
|
2890
3017
|
sql: "query.sql",
|
|
2891
3018
|
markdown: "readme.md"
|
|
2892
|
-
}[
|
|
3019
|
+
}[d.toLowerCase()] || `main.${d}`;
|
|
2893
3020
|
}
|
|
2894
3021
|
}
|
|
2895
|
-
const
|
|
3022
|
+
const jt = {
|
|
2896
3023
|
javascript: 'console.log("Hello, World!");',
|
|
2897
3024
|
typescript: 'console.log("Hello, World!");',
|
|
2898
3025
|
python: 'print("Hello, World!")',
|
|
@@ -2990,60 +3117,60 @@ h1 {
|
|
|
2990
3117
|
|
|
2991
3118
|
This is a sample markdown document.`
|
|
2992
3119
|
};
|
|
2993
|
-
function
|
|
2994
|
-
const
|
|
2995
|
-
return
|
|
3120
|
+
function Fe(u) {
|
|
3121
|
+
const d = u.toLowerCase();
|
|
3122
|
+
return jt[d] || `// ${u}
|
|
2996
3123
|
// Write your code here`;
|
|
2997
3124
|
}
|
|
2998
|
-
const
|
|
2999
|
-
pistonUrl:
|
|
3000
|
-
language:
|
|
3125
|
+
const $t = ({
|
|
3126
|
+
pistonUrl: u = "/api/piston",
|
|
3127
|
+
language: d = "javascript",
|
|
3001
3128
|
theme: n = "light",
|
|
3002
|
-
showLanguageSelector:
|
|
3003
|
-
showEditor:
|
|
3004
|
-
editable:
|
|
3005
|
-
defaultCode:
|
|
3129
|
+
showLanguageSelector: p = !0,
|
|
3130
|
+
showEditor: m = !0,
|
|
3131
|
+
editable: R = !0,
|
|
3132
|
+
defaultCode: k = "",
|
|
3006
3133
|
executorLabel: l = "运行",
|
|
3007
|
-
onExecuteStart:
|
|
3134
|
+
onExecuteStart: b,
|
|
3008
3135
|
onExecuteEnd: y,
|
|
3009
3136
|
onLanguageChange: _
|
|
3010
3137
|
}) => {
|
|
3011
|
-
const [O, D] = Z([]), [I, B] = Z(
|
|
3012
|
-
value: `${
|
|
3013
|
-
label: `${
|
|
3138
|
+
const [O, D] = Z([]), [I, B] = Z(d), [F, S] = Z(n), [T, t] = Z(k), [r, i] = Z(""), [o, s] = Z(""), [f, E] = Z(!1), [g, C] = Z(null), [P, z] = Z("stdout"), [V, W] = Z(null), [ne, ue] = Z(!0), [ce, j] = Z(60), H = Ee(() => new Dt({ pistonUrl: u }), [u]), ee = Ee(() => O.map((w) => ({
|
|
3139
|
+
value: `${w.language}:${w.version}`,
|
|
3140
|
+
label: `${w.language.charAt(0).toUpperCase() + w.language.slice(1)} ${w.version}`
|
|
3014
3141
|
})), [O]), X = Ee(() => I.includes(":") ? I.split(":")[0] : I, [I]);
|
|
3015
|
-
|
|
3016
|
-
async function
|
|
3017
|
-
|
|
3142
|
+
ke(() => {
|
|
3143
|
+
async function w() {
|
|
3144
|
+
ue(!0), W(null);
|
|
3018
3145
|
try {
|
|
3019
3146
|
const M = await H.getRuntimes();
|
|
3020
3147
|
D(M);
|
|
3021
3148
|
} catch (M) {
|
|
3022
3149
|
W(M instanceof Error ? M.message : "Failed to load runtimes");
|
|
3023
3150
|
} finally {
|
|
3024
|
-
|
|
3151
|
+
ue(!1);
|
|
3025
3152
|
}
|
|
3026
3153
|
}
|
|
3027
|
-
|
|
3028
|
-
}, [H]),
|
|
3029
|
-
!
|
|
3030
|
-
}, [O,
|
|
3154
|
+
w();
|
|
3155
|
+
}, [H]), ke(() => {
|
|
3156
|
+
!T && O.length > 0 && t(k || Fe(X));
|
|
3157
|
+
}, [O, T, k, X]);
|
|
3031
3158
|
const G = le(
|
|
3032
|
-
(
|
|
3033
|
-
const M =
|
|
3159
|
+
(w) => {
|
|
3160
|
+
const M = w.target.value, re = M.includes(":") ? M.split(":")[0] : M;
|
|
3034
3161
|
B(M);
|
|
3035
|
-
const fe =
|
|
3036
|
-
|
|
3162
|
+
const fe = Fe(re);
|
|
3163
|
+
t(fe), _ == null || _(re, fe);
|
|
3037
3164
|
},
|
|
3038
3165
|
[_]
|
|
3039
3166
|
), pe = le(async () => {
|
|
3040
3167
|
if (!f) {
|
|
3041
|
-
E(!0), i(""),
|
|
3168
|
+
E(!0), i(""), s(""), C(null), W(null), z("stdout"), b == null || b();
|
|
3042
3169
|
try {
|
|
3043
|
-
const
|
|
3044
|
-
i(
|
|
3045
|
-
} catch (
|
|
3046
|
-
const M =
|
|
3170
|
+
const w = await H.execute(X, T);
|
|
3171
|
+
i(w.output), s(w.stderr), C(w.executionTime || null), z(w.stderr ? "stderr" : "stdout"), y == null || y(w);
|
|
3172
|
+
} catch (w) {
|
|
3173
|
+
const M = w instanceof Error ? w.message : "Execution failed";
|
|
3047
3174
|
W(M), y == null || y({
|
|
3048
3175
|
success: !1,
|
|
3049
3176
|
output: "",
|
|
@@ -3054,27 +3181,27 @@ const Pr = ({
|
|
|
3054
3181
|
E(!1);
|
|
3055
3182
|
}
|
|
3056
3183
|
}
|
|
3057
|
-
}, [f, I,
|
|
3058
|
-
i(""),
|
|
3059
|
-
}, []),
|
|
3060
|
-
const
|
|
3061
|
-
await navigator.clipboard.writeText(
|
|
3062
|
-
}, [P,
|
|
3063
|
-
|
|
3064
|
-
}, [I]), J =
|
|
3065
|
-
J.current = !0, document.addEventListener("mousemove",
|
|
3066
|
-
}, []),
|
|
3184
|
+
}, [f, I, T, H, b, y]), q = le(() => {
|
|
3185
|
+
i(""), s(""), C(null), W(null);
|
|
3186
|
+
}, []), se = le(async () => {
|
|
3187
|
+
const w = P === "stdout" ? r : o;
|
|
3188
|
+
await navigator.clipboard.writeText(w);
|
|
3189
|
+
}, [P, r, o]), ae = le(() => {
|
|
3190
|
+
t(Fe(X));
|
|
3191
|
+
}, [I]), J = Oe(!1), ie = le((w) => {
|
|
3192
|
+
J.current = !0, document.addEventListener("mousemove", oe), document.addEventListener("mouseup", te), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
3193
|
+
}, []), oe = le((w) => {
|
|
3067
3194
|
if (!J.current) return;
|
|
3068
3195
|
const M = document.querySelector(".hep-cr-main");
|
|
3069
3196
|
if (!M) return;
|
|
3070
|
-
const
|
|
3197
|
+
const re = M.getBoundingClientRect(), fe = (w.clientX - re.left) / re.width * 100;
|
|
3071
3198
|
j(Math.max(20, Math.min(80, fe)));
|
|
3072
|
-
}, []),
|
|
3073
|
-
J.current = !1, document.removeEventListener("mousemove",
|
|
3074
|
-
}, [
|
|
3199
|
+
}, []), te = le(() => {
|
|
3200
|
+
J.current = !1, document.removeEventListener("mousemove", oe), document.removeEventListener("mouseup", te), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
3201
|
+
}, [oe]);
|
|
3075
3202
|
return /* @__PURE__ */ h.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${F}`, children: [
|
|
3076
3203
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-header", children: [
|
|
3077
|
-
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-controls", children:
|
|
3204
|
+
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-controls", children: p && /* @__PURE__ */ h.jsxs(
|
|
3078
3205
|
"select",
|
|
3079
3206
|
{
|
|
3080
3207
|
value: I,
|
|
@@ -3083,7 +3210,7 @@ const Pr = ({
|
|
|
3083
3210
|
disabled: f,
|
|
3084
3211
|
children: [
|
|
3085
3212
|
ne && /* @__PURE__ */ h.jsx("option", { value: "", children: "加载中..." }),
|
|
3086
|
-
ee.map((
|
|
3213
|
+
ee.map((w) => /* @__PURE__ */ h.jsx("option", { value: w.value, children: w.label }, w.value))
|
|
3087
3214
|
]
|
|
3088
3215
|
}
|
|
3089
3216
|
) }),
|
|
@@ -3100,12 +3227,12 @@ const Pr = ({
|
|
|
3100
3227
|
]
|
|
3101
3228
|
}
|
|
3102
3229
|
),
|
|
3103
|
-
|
|
3230
|
+
m && R && /* @__PURE__ */ h.jsx("button", { className: "hep-cr-btn hep-cr-btn-reset", onClick: ae, children: "重置" }),
|
|
3104
3231
|
/* @__PURE__ */ h.jsx(
|
|
3105
3232
|
"button",
|
|
3106
3233
|
{
|
|
3107
3234
|
className: "hep-cr-btn hep-cr-btn-theme",
|
|
3108
|
-
onClick: () =>
|
|
3235
|
+
onClick: () => S(F === "light" ? "dark" : "light"),
|
|
3109
3236
|
title: F === "light" ? "Switch to dark mode" : "Switch to light mode",
|
|
3110
3237
|
children: F === "light" ? "🌙" : "☀️"
|
|
3111
3238
|
}
|
|
@@ -3114,28 +3241,28 @@ const Pr = ({
|
|
|
3114
3241
|
] }),
|
|
3115
3242
|
V && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-error-message", children: V }),
|
|
3116
3243
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-main", children: [
|
|
3117
|
-
|
|
3244
|
+
m && /* @__PURE__ */ h.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${ce}%` }, children: [
|
|
3118
3245
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3119
3246
|
/* @__PURE__ */ h.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }),
|
|
3120
3247
|
/* @__PURE__ */ h.jsx("span", { className: "hep-cr-language-badge", children: X })
|
|
3121
3248
|
] }),
|
|
3122
3249
|
/* @__PURE__ */ h.jsx(
|
|
3123
|
-
|
|
3250
|
+
Nt,
|
|
3124
3251
|
{
|
|
3125
|
-
value:
|
|
3252
|
+
value: T,
|
|
3126
3253
|
language: X,
|
|
3127
3254
|
theme: F,
|
|
3128
|
-
disabled: !
|
|
3129
|
-
onChange:
|
|
3255
|
+
disabled: !R || f,
|
|
3256
|
+
onChange: t
|
|
3130
3257
|
}
|
|
3131
3258
|
)
|
|
3132
3259
|
] }),
|
|
3133
|
-
|
|
3260
|
+
m && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: ie, children: /* @__PURE__ */ h.jsx("div", { className: "hep-cr-resize-line" }) }),
|
|
3134
3261
|
/* @__PURE__ */ h.jsxs(
|
|
3135
3262
|
"div",
|
|
3136
3263
|
{
|
|
3137
3264
|
className: "hep-cr-output-panel",
|
|
3138
|
-
style: { width:
|
|
3265
|
+
style: { width: m ? `${100 - ce}%` : "100%" },
|
|
3139
3266
|
children: [
|
|
3140
3267
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3141
3268
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-output-tabs", children: [
|
|
@@ -3147,7 +3274,7 @@ const Pr = ({
|
|
|
3147
3274
|
children: "输出"
|
|
3148
3275
|
}
|
|
3149
3276
|
),
|
|
3150
|
-
|
|
3277
|
+
o && /* @__PURE__ */ h.jsx(
|
|
3151
3278
|
"button",
|
|
3152
3279
|
{
|
|
3153
3280
|
className: `hep-cr-tab ${P === "stderr" ? "active" : ""}`,
|
|
@@ -3161,7 +3288,7 @@ const Pr = ({
|
|
|
3161
3288
|
g,
|
|
3162
3289
|
"ms"
|
|
3163
3290
|
] }),
|
|
3164
|
-
/* @__PURE__ */ h.jsx("button", { className: "hep-cr-btn-icon", onClick:
|
|
3291
|
+
/* @__PURE__ */ h.jsx("button", { className: "hep-cr-btn-icon", onClick: se, title: "复制", children: /* @__PURE__ */ h.jsxs(
|
|
3165
3292
|
"svg",
|
|
3166
3293
|
{
|
|
3167
3294
|
width: "14",
|
|
@@ -3193,7 +3320,7 @@ const Pr = ({
|
|
|
3193
3320
|
) })
|
|
3194
3321
|
] })
|
|
3195
3322
|
] }),
|
|
3196
|
-
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ h.jsx("pre", { children: P === "stdout" ?
|
|
3323
|
+
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ h.jsx("pre", { children: P === "stdout" ? r || '点击"运行"执行代码' : o }) })
|
|
3197
3324
|
]
|
|
3198
3325
|
}
|
|
3199
3326
|
)
|
|
@@ -3415,30 +3542,30 @@ const Pr = ({
|
|
|
3415
3542
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
3416
3543
|
` })
|
|
3417
3544
|
] });
|
|
3418
|
-
},
|
|
3545
|
+
}, Mt = xt(
|
|
3419
3546
|
({
|
|
3420
|
-
open:
|
|
3421
|
-
defaultOpen:
|
|
3547
|
+
open: u,
|
|
3548
|
+
defaultOpen: d = !1,
|
|
3422
3549
|
title: n = "代码执行器",
|
|
3423
|
-
width:
|
|
3424
|
-
onClose:
|
|
3425
|
-
footer:
|
|
3426
|
-
theme:
|
|
3550
|
+
width: p = 800,
|
|
3551
|
+
onClose: m,
|
|
3552
|
+
footer: R,
|
|
3553
|
+
theme: k = "light",
|
|
3427
3554
|
...l
|
|
3428
|
-
},
|
|
3429
|
-
const [y, _] = Z(
|
|
3430
|
-
|
|
3431
|
-
O &&
|
|
3432
|
-
}, [
|
|
3555
|
+
}, b) => {
|
|
3556
|
+
const [y, _] = Z(d), O = u !== void 0, D = O ? u : y;
|
|
3557
|
+
ke(() => {
|
|
3558
|
+
O && u !== y && _(u);
|
|
3559
|
+
}, [u, O]);
|
|
3433
3560
|
const I = le(() => {
|
|
3434
|
-
O || _(!1),
|
|
3435
|
-
}, [O,
|
|
3436
|
-
|
|
3561
|
+
O || _(!1), m == null || m();
|
|
3562
|
+
}, [O, m]), B = (S) => {
|
|
3563
|
+
S.target === S.currentTarget && I();
|
|
3437
3564
|
};
|
|
3438
|
-
|
|
3565
|
+
kt(b, () => ({
|
|
3439
3566
|
close: I
|
|
3440
3567
|
}));
|
|
3441
|
-
const F = typeof
|
|
3568
|
+
const F = typeof p == "number" ? `${p}px` : p;
|
|
3442
3569
|
return D ? /* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: B, children: [
|
|
3443
3570
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-container", style: { width: F }, children: [
|
|
3444
3571
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-header", children: [
|
|
@@ -3459,8 +3586,8 @@ const Pr = ({
|
|
|
3459
3586
|
}
|
|
3460
3587
|
) })
|
|
3461
3588
|
] }),
|
|
3462
|
-
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-dialog-body", children: /* @__PURE__ */ h.jsx(
|
|
3463
|
-
|
|
3589
|
+
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-dialog-body", children: /* @__PURE__ */ h.jsx($t, { theme: k, ...l }) }),
|
|
3590
|
+
R && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-dialog-footer", children: R })
|
|
3464
3591
|
] }),
|
|
3465
3592
|
/* @__PURE__ */ h.jsx("style", { children: `
|
|
3466
3593
|
.hep-cr-dialog-overlay {
|
|
@@ -3554,9 +3681,9 @@ const Pr = ({
|
|
|
3554
3681
|
] }) : null;
|
|
3555
3682
|
}
|
|
3556
3683
|
);
|
|
3557
|
-
|
|
3684
|
+
Mt.displayName = "CodeRunnerDialog";
|
|
3558
3685
|
export {
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3686
|
+
$t as CodeRunner,
|
|
3687
|
+
Mt as CodeRunnerDialog,
|
|
3688
|
+
$t as default
|
|
3562
3689
|
};
|