@hep-code-runner/react 1.5.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 +23 -22
- package/dist/index.mjs +170 -169
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -17,13 +17,13 @@ var Xe;
|
|
|
17
17
|
function wt() {
|
|
18
18
|
if (Xe) return be;
|
|
19
19
|
Xe = 1;
|
|
20
|
-
var u = qe,
|
|
21
|
-
function k(l,
|
|
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
28
|
return be.Fragment = n, be.jsx = k, be.jsxs = k, be;
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ var ve = {};
|
|
|
40
40
|
var Ke;
|
|
41
41
|
function At() {
|
|
42
42
|
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var u = qe,
|
|
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
44
|
function S(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
@@ -68,7 +68,7 @@ function At() {
|
|
|
68
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.
|
|
@@ -92,13 +92,13 @@ function At() {
|
|
|
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
99
|
case R:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case m:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case y:
|
|
104
104
|
return "Suspense";
|
|
@@ -113,7 +113,7 @@ function At() {
|
|
|
113
113
|
case k:
|
|
114
114
|
var c = e;
|
|
115
115
|
return z(c._context) + ".Provider";
|
|
116
|
-
case
|
|
116
|
+
case b:
|
|
117
117
|
return P(e, e.render, "ForwardRef");
|
|
118
118
|
case O:
|
|
119
119
|
var v = e.displayName || null;
|
|
@@ -303,7 +303,7 @@ function At() {
|
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
306
|
+
case b:
|
|
307
307
|
return re(e.render);
|
|
308
308
|
case O:
|
|
309
309
|
return ye(e.type, a, c);
|
|
@@ -418,7 +418,7 @@ function At() {
|
|
|
418
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,
|
|
@@ -473,7 +473,7 @@ function At() {
|
|
|
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
|
{
|
|
@@ -543,7 +543,7 @@ Check the top-level render call using <` + c + ">.");
|
|
|
543
543
|
var c;
|
|
544
544
|
if (typeof a == "function")
|
|
545
545
|
c = a.propTypes;
|
|
546
|
-
else if (typeof a == "object" && (a.$$typeof ===
|
|
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;
|
|
@@ -582,7 +582,7 @@ Check the top-level render call using <` + c + ">.");
|
|
|
582
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
587
|
var U = ut(e, a, c, N, L);
|
|
588
588
|
if (U == null)
|
|
@@ -614,7 +614,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
614
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
620
|
function ht(e, a, c) {
|
|
@@ -624,13 +624,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
624
624
|
return Ye(e, a, c, !1);
|
|
625
625
|
}
|
|
626
626
|
var bt = mt, vt = ht;
|
|
627
|
-
ve.Fragment =
|
|
627
|
+
ve.Fragment = p, ve.jsx = bt, ve.jsxs = vt;
|
|
628
628
|
}()), ve;
|
|
629
629
|
}
|
|
630
630
|
process.env.NODE_ENV === "production" ? Ie.exports = wt() : Ie.exports = At();
|
|
631
631
|
var h = Ie.exports, Je = { exports: {} };
|
|
632
632
|
(function(u) {
|
|
633
|
-
var
|
|
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
|
*
|
|
@@ -696,7 +696,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
696
696
|
*/
|
|
697
697
|
util: {
|
|
698
698
|
encode: function t(r) {
|
|
699
|
-
return r instanceof
|
|
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.
|
|
@@ -772,7 +772,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
772
772
|
*/
|
|
773
773
|
getLanguage: function(t) {
|
|
774
774
|
for (; t; ) {
|
|
775
|
-
var r =
|
|
775
|
+
var r = m.exec(t.className);
|
|
776
776
|
if (r)
|
|
777
777
|
return r[1].toLowerCase();
|
|
778
778
|
t = t.parentElement;
|
|
@@ -787,7 +787,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
787
787
|
* @returns {void}
|
|
788
788
|
*/
|
|
789
789
|
setLanguage: function(t, r) {
|
|
790
|
-
t.className = t.className.replace(RegExp(
|
|
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.
|
|
@@ -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 (r &&
|
|
1094
|
+
if (r && p.Worker) {
|
|
1095
1095
|
var P = new Worker(l.filename);
|
|
1096
1096
|
P.onmessage = function(z) {
|
|
1097
1097
|
C(z.data);
|
|
@@ -1131,7 +1131,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1131
1131
|
};
|
|
1132
1132
|
if (l.hooks.run("before-tokenize", o), !o.grammar)
|
|
1133
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),
|
|
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
|
|
@@ -1206,13 +1206,13 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1206
1206
|
s(r);
|
|
1207
1207
|
}
|
|
1208
1208
|
},
|
|
1209
|
-
Token:
|
|
1209
|
+
Token: b
|
|
1210
1210
|
};
|
|
1211
|
-
|
|
1212
|
-
function
|
|
1211
|
+
p.Prism = l;
|
|
1212
|
+
function b(t, r, i, o) {
|
|
1213
1213
|
this.type = t, this.content = r, this.alias = i, this.length = (o || "").length | 0;
|
|
1214
1214
|
}
|
|
1215
|
-
|
|
1215
|
+
b.stringify = function t(r, i) {
|
|
1216
1216
|
if (typeof r == "string")
|
|
1217
1217
|
return r;
|
|
1218
1218
|
if (Array.isArray(r)) {
|
|
@@ -1261,7 +1261,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1261
1261
|
var ee = j.value;
|
|
1262
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
1267
|
if (G = y(ce, H, t, V), !G || G.index >= t.length)
|
|
@@ -1269,7 +1269,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
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
1274
|
for (var se = j; se !== r.tail && (q < pe || typeof se.value == "string"); se = se.next)
|
|
1275
1275
|
X++, q += se.value.length;
|
|
@@ -1280,7 +1280,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1280
1280
|
f && te > f.reach && (f.reach = te);
|
|
1281
1281
|
var w = j.prev;
|
|
1282
1282
|
ie && (w = D(r, w, ie), H += ie.length), I(r, w, X);
|
|
1283
|
-
var M = new
|
|
1283
|
+
var M = new b(E, z ? l.tokenize(J, z) : J, ne, J);
|
|
1284
1284
|
if (j = D(r, w, M), oe && D(r, j, oe), X > 1) {
|
|
1285
1285
|
var re = {
|
|
1286
1286
|
cause: E + "," + C,
|
|
@@ -1311,10 +1311,10 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1311
1311
|
r.push(i.value), i = i.next;
|
|
1312
1312
|
return r;
|
|
1313
1313
|
}
|
|
1314
|
-
if (!
|
|
1315
|
-
return
|
|
1314
|
+
if (!p.document)
|
|
1315
|
+
return p.addEventListener && (l.disableWorkerMessageHandler || p.addEventListener("message", function(t) {
|
|
1316
1316
|
var r = JSON.parse(t.data), i = r.language, o = r.code, s = r.immediateClose;
|
|
1317
|
-
|
|
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));
|
|
@@ -1326,7 +1326,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1326
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
|
-
}(
|
|
1329
|
+
}(d);
|
|
1330
1330
|
u.exports && (u.exports = n), typeof Ve < "u" && (Ve.Prism = n), n.languages.markup = {
|
|
1331
1331
|
comment: {
|
|
1332
1332
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
@@ -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,7 +1418,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1418
1418
|
* @example
|
|
1419
1419
|
* addInlined('style', 'css');
|
|
1420
1420
|
*/
|
|
1421
|
-
value: function(
|
|
1421
|
+
value: function(m, R) {
|
|
1422
1422
|
var k = {};
|
|
1423
1423
|
k["language-" + R] = {
|
|
1424
1424
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
@@ -1435,15 +1435,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1435
1435
|
pattern: /[\s\S]+/,
|
|
1436
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,8 +1538,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1538
1538
|
lookbehind: !0
|
|
1539
1539
|
},
|
|
1540
1540
|
punctuation: /[(){};:,]/
|
|
1541
|
-
},
|
|
1542
|
-
var R =
|
|
1541
|
+
}, p.languages.css.atrule.inside.rest = p.languages.css;
|
|
1542
|
+
var R = p.languages.markup;
|
|
1543
1543
|
R && (R.tag.addInlined("style", "css"), R.tag.addAttribute("style", "css"));
|
|
1544
1544
|
}(n), n.languages.clike = {
|
|
1545
1545
|
comment: [
|
|
@@ -1705,7 +1705,7 @@ 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
|
|
1708
|
+
var p = "Loading…", m = function(F, S) {
|
|
1709
1709
|
return "✖ Error " + F + " while fetching file: " + S;
|
|
1710
1710
|
}, R = "✖ Error: File does not exist or is empty", k = {
|
|
1711
1711
|
js: "javascript",
|
|
@@ -1717,11 +1717,11 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1717
1717
|
bat: "batch",
|
|
1718
1718
|
h: "c",
|
|
1719
1719
|
tex: "latex"
|
|
1720
|
-
}, l = "data-src-status",
|
|
1720
|
+
}, l = "data-src-status", b = "loading", y = "loaded", _ = "failed", O = "pre[data-src]:not([" + l + '="' + y + '"]):not([' + l + '="' + b + '"])';
|
|
1721
1721
|
function D(F, S, T) {
|
|
1722
1722
|
var t = new XMLHttpRequest();
|
|
1723
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(
|
|
1724
|
+
t.readyState == 4 && (t.status < 400 && t.responseText ? S(t.responseText) : t.status >= 400 ? T(m(t.status, t.statusText)) : T(R));
|
|
1725
1725
|
}, t.send(null);
|
|
1726
1726
|
}
|
|
1727
1727
|
function I(F) {
|
|
@@ -1739,9 +1739,9 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1739
1739
|
F.element
|
|
1740
1740
|
);
|
|
1741
1741
|
if (S.matches(O)) {
|
|
1742
|
-
F.code = "", S.setAttribute(l,
|
|
1742
|
+
F.code = "", S.setAttribute(l, b);
|
|
1743
1743
|
var T = S.appendChild(document.createElement("CODE"));
|
|
1744
|
-
T.textContent =
|
|
1744
|
+
T.textContent = p;
|
|
1745
1745
|
var t = S.getAttribute("data-src"), r = F.language;
|
|
1746
1746
|
if (r === "none") {
|
|
1747
1747
|
var i = (/\.(\w+)$/.exec(t) || [, "none"])[1];
|
|
@@ -2045,7 +2045,7 @@ Prism.languages.insertBefore("go", "string", {
|
|
|
2045
2045
|
});
|
|
2046
2046
|
delete Prism.languages.go["class-name"];
|
|
2047
2047
|
(function(u) {
|
|
2048
|
-
var
|
|
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: {
|
|
@@ -2065,23 +2065,23 @@ delete Prism.languages.go["class-name"];
|
|
|
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
|
{
|
|
@@ -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,
|
|
@@ -2235,16 +2235,16 @@ Prism.languages.insertBefore("c", "function", {
|
|
|
2235
2235
|
});
|
|
2236
2236
|
delete Prism.languages.c.boolean;
|
|
2237
2237
|
(function(u) {
|
|
2238
|
-
for (var
|
|
2239
|
-
|
|
2240
|
-
return
|
|
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
|
},
|
|
@@ -2384,17 +2384,17 @@ Prism.languages.sql = {
|
|
|
2384
2384
|
punctuation: /[;[\]()`,.]/
|
|
2385
2385
|
};
|
|
2386
2386
|
(function(u) {
|
|
2387
|
-
var
|
|
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
|
}
|
|
@@ -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
|
|
@@ -2582,7 +2582,7 @@ Prism.languages.sql = {
|
|
|
2582
2582
|
lookbehind: !0
|
|
2583
2583
|
}
|
|
2584
2584
|
}, n.inside = u.languages.bash;
|
|
2585
|
-
for (var
|
|
2585
|
+
for (var m = [
|
|
2586
2586
|
"comment",
|
|
2587
2587
|
"function-name",
|
|
2588
2588
|
"for-or-select",
|
|
@@ -2598,8 +2598,8 @@ Prism.languages.sql = {
|
|
|
2598
2598
|
"operator",
|
|
2599
2599
|
"punctuation",
|
|
2600
2600
|
"number"
|
|
2601
|
-
], R =
|
|
2602
|
-
R[
|
|
2601
|
+
], R = p.variable[1].inside, k = 0; k < m.length; k++)
|
|
2602
|
+
R[m[k]] = u.languages.bash[m[k]];
|
|
2603
2603
|
u.languages.sh = u.languages.bash, u.languages.shell = u.languages.bash;
|
|
2604
2604
|
})(Prism);
|
|
2605
2605
|
Prism.languages.json = {
|
|
@@ -2632,11 +2632,11 @@ const Rt = `
|
|
|
2632
2632
|
.hep-cr-editor .token.prolog,
|
|
2633
2633
|
.hep-cr-editor .token.doctype,
|
|
2634
2634
|
.hep-cr-editor .token.cdata {
|
|
2635
|
-
color: #8292a2;
|
|
2635
|
+
color: #8292a2 !important;
|
|
2636
2636
|
}
|
|
2637
2637
|
|
|
2638
2638
|
.hep-cr-editor .token.punctuation {
|
|
2639
|
-
color: #f8f8f2;
|
|
2639
|
+
color: #f8f8f2 !important;
|
|
2640
2640
|
}
|
|
2641
2641
|
|
|
2642
2642
|
.hep-cr-editor .token.property,
|
|
@@ -2644,12 +2644,12 @@ const Rt = `
|
|
|
2644
2644
|
.hep-cr-editor .token.constant,
|
|
2645
2645
|
.hep-cr-editor .token.symbol,
|
|
2646
2646
|
.hep-cr-editor .token.deleted {
|
|
2647
|
-
color: #f92672;
|
|
2647
|
+
color: #f92672 !important;
|
|
2648
2648
|
}
|
|
2649
2649
|
|
|
2650
2650
|
.hep-cr-editor .token.boolean,
|
|
2651
2651
|
.hep-cr-editor .token.number {
|
|
2652
|
-
color: #ae81ff;
|
|
2652
|
+
color: #ae81ff !important;
|
|
2653
2653
|
}
|
|
2654
2654
|
|
|
2655
2655
|
.hep-cr-editor .token.selector,
|
|
@@ -2658,7 +2658,7 @@ const Rt = `
|
|
|
2658
2658
|
.hep-cr-editor .token.char,
|
|
2659
2659
|
.hep-cr-editor .token.builtin,
|
|
2660
2660
|
.hep-cr-editor .token.inserted {
|
|
2661
|
-
color: #a6e22e;
|
|
2661
|
+
color: #a6e22e !important;
|
|
2662
2662
|
}
|
|
2663
2663
|
|
|
2664
2664
|
.hep-cr-editor .token.operator,
|
|
@@ -2667,23 +2667,24 @@ const Rt = `
|
|
|
2667
2667
|
.hep-cr-editor .language-css .hep-cr-editor .token.string,
|
|
2668
2668
|
.hep-cr-editor .style .hep-cr-editor .token.string,
|
|
2669
2669
|
.hep-cr-editor .token.variable {
|
|
2670
|
-
color: #f8f8f2;
|
|
2670
|
+
color: #f8f8f2 !important;
|
|
2671
2671
|
}
|
|
2672
2672
|
|
|
2673
2673
|
.hep-cr-editor .token.atrule,
|
|
2674
2674
|
.hep-cr-editor .token.attr-value,
|
|
2675
2675
|
.hep-cr-editor .token.function,
|
|
2676
2676
|
.hep-cr-editor .token.class-name {
|
|
2677
|
-
color: #e6db74;
|
|
2677
|
+
color: #e6db74 !important;
|
|
2678
2678
|
}
|
|
2679
2679
|
|
|
2680
|
-
.hep-cr-editor .token.keyword
|
|
2681
|
-
|
|
2680
|
+
.hep-cr-editor .token.keyword,
|
|
2681
|
+
.hep-cr-editor .token.keyword-control {
|
|
2682
|
+
color: #66d9ef !important;
|
|
2682
2683
|
}
|
|
2683
2684
|
|
|
2684
2685
|
.hep-cr-editor .token.regex,
|
|
2685
2686
|
.hep-cr-editor .token.important {
|
|
2686
|
-
color: #fd971f;
|
|
2687
|
+
color: #fd971f !important;
|
|
2687
2688
|
}
|
|
2688
2689
|
`, _t = `
|
|
2689
2690
|
.hep-cr-editor .token.comment,
|
|
@@ -2747,10 +2748,10 @@ const Rt = `
|
|
|
2747
2748
|
window.Prism = Ne;
|
|
2748
2749
|
function Ft(u) {
|
|
2749
2750
|
if (typeof document > "u") return;
|
|
2750
|
-
const
|
|
2751
|
-
|
|
2752
|
-
const
|
|
2753
|
-
|
|
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);
|
|
2754
2755
|
}
|
|
2755
2756
|
const Ot = {
|
|
2756
2757
|
javascript: "javascript",
|
|
@@ -2785,17 +2786,17 @@ const Ot = {
|
|
|
2785
2786
|
md: "markdown"
|
|
2786
2787
|
};
|
|
2787
2788
|
function It(u) {
|
|
2788
|
-
const
|
|
2789
|
-
return
|
|
2789
|
+
const d = document.createElement("div");
|
|
2790
|
+
return d.textContent = u, d.innerHTML;
|
|
2790
2791
|
}
|
|
2791
2792
|
const Nt = ({
|
|
2792
2793
|
value: u,
|
|
2793
|
-
language:
|
|
2794
|
+
language: d,
|
|
2794
2795
|
theme: n = "dark",
|
|
2795
|
-
disabled:
|
|
2796
|
-
onChange:
|
|
2796
|
+
disabled: p = !1,
|
|
2797
|
+
onChange: m
|
|
2797
2798
|
}) => {
|
|
2798
|
-
const R = Oe(null), k = Oe(null), l = Ee(() => Ot[
|
|
2799
|
+
const R = Oe(null), k = Oe(null), l = Ee(() => Ot[d.toLowerCase()] || "javascript", [d]), b = n === "dark" ? "#1e1e1e" : "#fafafa", y = Ee(() => {
|
|
2799
2800
|
try {
|
|
2800
2801
|
const I = Ne.languages[l];
|
|
2801
2802
|
if (I)
|
|
@@ -2804,21 +2805,21 @@ const Nt = ({
|
|
|
2804
2805
|
}
|
|
2805
2806
|
return It(u || "");
|
|
2806
2807
|
}, [u, l]), _ = (I) => {
|
|
2807
|
-
|
|
2808
|
+
m == null || m(I.target.value);
|
|
2808
2809
|
}, O = () => {
|
|
2809
2810
|
R.current && k.current && (k.current.scrollTop = R.current.scrollTop, k.current.scrollLeft = R.current.scrollLeft);
|
|
2810
2811
|
}, D = (I) => {
|
|
2811
2812
|
if (I.key === "Tab") {
|
|
2812
2813
|
I.preventDefault();
|
|
2813
2814
|
const B = I.target, F = B.selectionStart, S = B.selectionEnd, T = u.substring(0, F) + " " + u.substring(S);
|
|
2814
|
-
|
|
2815
|
+
m == null || m(T), requestAnimationFrame(() => {
|
|
2815
2816
|
B.selectionStart = B.selectionEnd = F + 2;
|
|
2816
2817
|
});
|
|
2817
2818
|
}
|
|
2818
2819
|
};
|
|
2819
2820
|
return ke(() => {
|
|
2820
2821
|
Ft(n);
|
|
2821
|
-
}, [n]), /* @__PURE__ */ h.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background:
|
|
2822
|
+
}, [n]), /* @__PURE__ */ h.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background: b }, children: [
|
|
2822
2823
|
/* @__PURE__ */ h.jsx(
|
|
2823
2824
|
"pre",
|
|
2824
2825
|
{
|
|
@@ -2834,7 +2835,7 @@ const Nt = ({
|
|
|
2834
2835
|
ref: R,
|
|
2835
2836
|
className: "hep-cr-input",
|
|
2836
2837
|
value: u,
|
|
2837
|
-
disabled:
|
|
2838
|
+
disabled: p,
|
|
2838
2839
|
onChange: _,
|
|
2839
2840
|
onScroll: O,
|
|
2840
2841
|
onKeyDown: D,
|
|
@@ -2904,18 +2905,18 @@ const Nt = ({
|
|
|
2904
2905
|
if (typeof document < "u") {
|
|
2905
2906
|
const u = "hep-cr-editor-styles";
|
|
2906
2907
|
if (!document.getElementById(u)) {
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2908
|
+
const d = document.createElement("style");
|
|
2909
|
+
d.id = u, d.textContent = Ct, document.head.appendChild(d);
|
|
2909
2910
|
}
|
|
2910
2911
|
}
|
|
2911
|
-
var Lt = Object.defineProperty, Pt = (u,
|
|
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);
|
|
2912
2913
|
let _e = null;
|
|
2913
2914
|
class Dt {
|
|
2914
|
-
constructor(
|
|
2915
|
-
Ze(this, "baseUrl"), Ze(this, "timeout"), this.baseUrl =
|
|
2915
|
+
constructor(d = {}) {
|
|
2916
|
+
Ze(this, "baseUrl"), Ze(this, "timeout"), this.baseUrl = d.pistonUrl || "/api/piston", this.timeout = d.timeout || 3e3;
|
|
2916
2917
|
}
|
|
2917
|
-
async getRuntimes(
|
|
2918
|
-
if (_e && !
|
|
2918
|
+
async getRuntimes(d = !1) {
|
|
2919
|
+
if (_e && !d)
|
|
2919
2920
|
return _e;
|
|
2920
2921
|
try {
|
|
2921
2922
|
const n = await fetch(`${this.baseUrl}/runtimes`, {
|
|
@@ -2926,46 +2927,46 @@ class Dt {
|
|
|
2926
2927
|
});
|
|
2927
2928
|
if (!n.ok)
|
|
2928
2929
|
throw new Error(`Failed to fetch runtimes: ${n.statusText}`);
|
|
2929
|
-
const
|
|
2930
|
-
return _e =
|
|
2930
|
+
const p = await n.json();
|
|
2931
|
+
return _e = p, p;
|
|
2931
2932
|
} catch (n) {
|
|
2932
2933
|
throw console.error("Failed to fetch runtimes:", n), n;
|
|
2933
2934
|
}
|
|
2934
2935
|
}
|
|
2935
|
-
async execute(
|
|
2936
|
-
const
|
|
2937
|
-
(
|
|
2936
|
+
async execute(d, n, p = {}) {
|
|
2937
|
+
const m = (await this.getRuntimes()).find(
|
|
2938
|
+
(b) => {
|
|
2938
2939
|
var y;
|
|
2939
|
-
return
|
|
2940
|
+
return b.language.toLowerCase() === d.toLowerCase() || ((y = b.aliases) == null ? void 0 : y.some((_) => _.toLowerCase() === d.toLowerCase()));
|
|
2940
2941
|
}
|
|
2941
2942
|
);
|
|
2942
|
-
if (!
|
|
2943
|
-
throw new Error(`Language '${
|
|
2944
|
-
const R = this.getFileName(
|
|
2945
|
-
language:
|
|
2946
|
-
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,
|
|
2947
2948
|
files: [
|
|
2948
2949
|
{
|
|
2949
2950
|
name: R,
|
|
2950
2951
|
content: n
|
|
2951
2952
|
}
|
|
2952
2953
|
],
|
|
2953
|
-
stdin:
|
|
2954
|
-
args:
|
|
2955
|
-
run_timeout:
|
|
2954
|
+
stdin: p.stdin || "",
|
|
2955
|
+
args: p.args || [],
|
|
2956
|
+
run_timeout: p.runTimeout || this.timeout,
|
|
2956
2957
|
compile_timeout: this.timeout
|
|
2957
2958
|
}, l = Date.now();
|
|
2958
2959
|
try {
|
|
2959
|
-
const
|
|
2960
|
+
const b = await fetch(`${this.baseUrl}/execute`, {
|
|
2960
2961
|
method: "POST",
|
|
2961
2962
|
headers: {
|
|
2962
2963
|
"Content-Type": "application/json"
|
|
2963
2964
|
},
|
|
2964
2965
|
body: JSON.stringify(k)
|
|
2965
2966
|
});
|
|
2966
|
-
if (!
|
|
2967
|
-
throw new Error(`Execute failed: ${
|
|
2968
|
-
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 || "";
|
|
2969
2970
|
return {
|
|
2970
2971
|
success: y.run.code === 0,
|
|
2971
2972
|
output: O,
|
|
@@ -2978,17 +2979,17 @@ class Dt {
|
|
|
2978
2979
|
code: y.compile.code
|
|
2979
2980
|
} : void 0
|
|
2980
2981
|
};
|
|
2981
|
-
} catch (
|
|
2982
|
+
} catch (b) {
|
|
2982
2983
|
return {
|
|
2983
2984
|
success: !1,
|
|
2984
2985
|
output: "",
|
|
2985
|
-
stderr:
|
|
2986
|
+
stderr: b instanceof Error ? b.message : "Unknown error",
|
|
2986
2987
|
code: -1,
|
|
2987
2988
|
executionTime: Date.now() - l
|
|
2988
2989
|
};
|
|
2989
2990
|
}
|
|
2990
2991
|
}
|
|
2991
|
-
getFileName(
|
|
2992
|
+
getFileName(d) {
|
|
2992
2993
|
return {
|
|
2993
2994
|
javascript: "main.js",
|
|
2994
2995
|
typescript: "main.ts",
|
|
@@ -3015,7 +3016,7 @@ class Dt {
|
|
|
3015
3016
|
css: "style.css",
|
|
3016
3017
|
sql: "query.sql",
|
|
3017
3018
|
markdown: "readme.md"
|
|
3018
|
-
}[
|
|
3019
|
+
}[d.toLowerCase()] || `main.${d}`;
|
|
3019
3020
|
}
|
|
3020
3021
|
}
|
|
3021
3022
|
const jt = {
|
|
@@ -3117,24 +3118,24 @@ h1 {
|
|
|
3117
3118
|
This is a sample markdown document.`
|
|
3118
3119
|
};
|
|
3119
3120
|
function Fe(u) {
|
|
3120
|
-
const
|
|
3121
|
-
return jt[
|
|
3121
|
+
const d = u.toLowerCase();
|
|
3122
|
+
return jt[d] || `// ${u}
|
|
3122
3123
|
// Write your code here`;
|
|
3123
3124
|
}
|
|
3124
3125
|
const $t = ({
|
|
3125
3126
|
pistonUrl: u = "/api/piston",
|
|
3126
|
-
language:
|
|
3127
|
+
language: d = "javascript",
|
|
3127
3128
|
theme: n = "light",
|
|
3128
|
-
showLanguageSelector:
|
|
3129
|
-
showEditor:
|
|
3129
|
+
showLanguageSelector: p = !0,
|
|
3130
|
+
showEditor: m = !0,
|
|
3130
3131
|
editable: R = !0,
|
|
3131
3132
|
defaultCode: k = "",
|
|
3132
3133
|
executorLabel: l = "运行",
|
|
3133
|
-
onExecuteStart:
|
|
3134
|
+
onExecuteStart: b,
|
|
3134
3135
|
onExecuteEnd: y,
|
|
3135
3136
|
onLanguageChange: _
|
|
3136
3137
|
}) => {
|
|
3137
|
-
const [O, D] = Z([]), [I, B] = Z(
|
|
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) => ({
|
|
3138
3139
|
value: `${w.language}:${w.version}`,
|
|
3139
3140
|
label: `${w.language.charAt(0).toUpperCase() + w.language.slice(1)} ${w.version}`
|
|
3140
3141
|
})), [O]), X = Ee(() => I.includes(":") ? I.split(":")[0] : I, [I]);
|
|
@@ -3164,7 +3165,7 @@ const $t = ({
|
|
|
3164
3165
|
[_]
|
|
3165
3166
|
), pe = le(async () => {
|
|
3166
3167
|
if (!f) {
|
|
3167
|
-
E(!0), i(""), s(""), C(null), W(null), z("stdout"),
|
|
3168
|
+
E(!0), i(""), s(""), C(null), W(null), z("stdout"), b == null || b();
|
|
3168
3169
|
try {
|
|
3169
3170
|
const w = await H.execute(X, T);
|
|
3170
3171
|
i(w.output), s(w.stderr), C(w.executionTime || null), z(w.stderr ? "stderr" : "stdout"), y == null || y(w);
|
|
@@ -3180,7 +3181,7 @@ const $t = ({
|
|
|
3180
3181
|
E(!1);
|
|
3181
3182
|
}
|
|
3182
3183
|
}
|
|
3183
|
-
}, [f, I, T, H,
|
|
3184
|
+
}, [f, I, T, H, b, y]), q = le(() => {
|
|
3184
3185
|
i(""), s(""), C(null), W(null);
|
|
3185
3186
|
}, []), se = le(async () => {
|
|
3186
3187
|
const w = P === "stdout" ? r : o;
|
|
@@ -3200,7 +3201,7 @@ const $t = ({
|
|
|
3200
3201
|
}, [oe]);
|
|
3201
3202
|
return /* @__PURE__ */ h.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${F}`, children: [
|
|
3202
3203
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-header", children: [
|
|
3203
|
-
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-controls", children:
|
|
3204
|
+
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-controls", children: p && /* @__PURE__ */ h.jsxs(
|
|
3204
3205
|
"select",
|
|
3205
3206
|
{
|
|
3206
3207
|
value: I,
|
|
@@ -3226,7 +3227,7 @@ const $t = ({
|
|
|
3226
3227
|
]
|
|
3227
3228
|
}
|
|
3228
3229
|
),
|
|
3229
|
-
|
|
3230
|
+
m && R && /* @__PURE__ */ h.jsx("button", { className: "hep-cr-btn hep-cr-btn-reset", onClick: ae, children: "重置" }),
|
|
3230
3231
|
/* @__PURE__ */ h.jsx(
|
|
3231
3232
|
"button",
|
|
3232
3233
|
{
|
|
@@ -3240,7 +3241,7 @@ const $t = ({
|
|
|
3240
3241
|
] }),
|
|
3241
3242
|
V && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-error-message", children: V }),
|
|
3242
3243
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-main", children: [
|
|
3243
|
-
|
|
3244
|
+
m && /* @__PURE__ */ h.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${ce}%` }, children: [
|
|
3244
3245
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3245
3246
|
/* @__PURE__ */ h.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }),
|
|
3246
3247
|
/* @__PURE__ */ h.jsx("span", { className: "hep-cr-language-badge", children: X })
|
|
@@ -3256,12 +3257,12 @@ const $t = ({
|
|
|
3256
3257
|
}
|
|
3257
3258
|
)
|
|
3258
3259
|
] }),
|
|
3259
|
-
|
|
3260
|
+
m && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: ie, children: /* @__PURE__ */ h.jsx("div", { className: "hep-cr-resize-line" }) }),
|
|
3260
3261
|
/* @__PURE__ */ h.jsxs(
|
|
3261
3262
|
"div",
|
|
3262
3263
|
{
|
|
3263
3264
|
className: "hep-cr-output-panel",
|
|
3264
|
-
style: { width:
|
|
3265
|
+
style: { width: m ? `${100 - ce}%` : "100%" },
|
|
3265
3266
|
children: [
|
|
3266
3267
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3267
3268
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-output-tabs", children: [
|
|
@@ -3544,27 +3545,27 @@ const $t = ({
|
|
|
3544
3545
|
}, Mt = xt(
|
|
3545
3546
|
({
|
|
3546
3547
|
open: u,
|
|
3547
|
-
defaultOpen:
|
|
3548
|
+
defaultOpen: d = !1,
|
|
3548
3549
|
title: n = "代码执行器",
|
|
3549
|
-
width:
|
|
3550
|
-
onClose:
|
|
3550
|
+
width: p = 800,
|
|
3551
|
+
onClose: m,
|
|
3551
3552
|
footer: R,
|
|
3552
3553
|
theme: k = "light",
|
|
3553
3554
|
...l
|
|
3554
|
-
},
|
|
3555
|
-
const [y, _] = Z(
|
|
3555
|
+
}, b) => {
|
|
3556
|
+
const [y, _] = Z(d), O = u !== void 0, D = O ? u : y;
|
|
3556
3557
|
ke(() => {
|
|
3557
3558
|
O && u !== y && _(u);
|
|
3558
3559
|
}, [u, O]);
|
|
3559
3560
|
const I = le(() => {
|
|
3560
|
-
O || _(!1),
|
|
3561
|
-
}, [O,
|
|
3561
|
+
O || _(!1), m == null || m();
|
|
3562
|
+
}, [O, m]), B = (S) => {
|
|
3562
3563
|
S.target === S.currentTarget && I();
|
|
3563
3564
|
};
|
|
3564
|
-
kt(
|
|
3565
|
+
kt(b, () => ({
|
|
3565
3566
|
close: I
|
|
3566
3567
|
}));
|
|
3567
|
-
const F = typeof
|
|
3568
|
+
const F = typeof p == "number" ? `${p}px` : p;
|
|
3568
3569
|
return D ? /* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: B, children: [
|
|
3569
3570
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-container", style: { width: F }, children: [
|
|
3570
3571
|
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-header", children: [
|