@hep-code-runner/react 3.3.8 → 3.3.10
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.d.ts +1 -1
- package/dist/index.js +13 -13
- package/dist/index.mjs +358 -352
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import Be, { useRef as Ae, useMemo as Se, useCallback as pe, useEffect as xe, useState as K, forwardRef as Ze, useImperativeHandle as Ke } from "react";
|
|
2
|
+
var Ge = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
|
+
function Ve(d) {
|
|
4
|
+
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
5
5
|
}
|
|
6
|
-
var
|
|
7
|
-
process.env.NODE_ENV === "production" ?
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
var
|
|
6
|
+
var We, He = { exports: {} }, Fe = {}, Ye, De = {};
|
|
7
|
+
process.env.NODE_ENV === "production" ? He.exports = function() {
|
|
8
|
+
if (We) return Fe;
|
|
9
|
+
We = 1;
|
|
10
|
+
var d = Be, t = Symbol.for("react.element"), l = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, m = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, w = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
11
11
|
function s(_, y, b) {
|
|
12
|
-
var k, S = {}, L = null,
|
|
13
|
-
for (k in b !== void 0 && (L = "" + b), y.key !== void 0 && (L = "" + y.key), y.ref !== void 0 && (
|
|
12
|
+
var k, S = {}, L = null, E = null;
|
|
13
|
+
for (k in b !== void 0 && (L = "" + b), y.key !== void 0 && (L = "" + y.key), y.ref !== void 0 && (E = y.ref), y) p.call(y, k) && !w.hasOwnProperty(k) && (S[k] = y[k]);
|
|
14
14
|
if (_ && _.defaultProps) for (k in y = _.defaultProps) S[k] === void 0 && (S[k] = y[k]);
|
|
15
|
-
return { $$typeof: t, type: _, key: L, ref:
|
|
15
|
+
return { $$typeof: t, type: _, key: L, ref: E, props: S, _owner: m.current };
|
|
16
16
|
}
|
|
17
|
-
return
|
|
18
|
-
}() :
|
|
19
|
-
var
|
|
17
|
+
return Fe.Fragment = l, Fe.jsx = s, Fe.jsxs = s, Fe;
|
|
18
|
+
}() : He.exports = (Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
|
|
19
|
+
var d, t = Be, l = Symbol.for("react.element"), p = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), y = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), C = Symbol.iterator, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
20
20
|
function n(e) {
|
|
21
|
-
for (var g = arguments.length, f = new Array(g > 1 ? g - 1 : 0),
|
|
21
|
+
for (var g = arguments.length, f = new Array(g > 1 ? g - 1 : 0), P = 1; P < g; P++) f[P - 1] = arguments[P];
|
|
22
22
|
(function(F, R, T) {
|
|
23
23
|
var N = r.ReactDebugCurrentFrame.getStackAddendum();
|
|
24
24
|
N !== "" && (R += "%s", T = T.concat([N]));
|
|
@@ -38,7 +38,7 @@ process.env.NODE_ENV === "production" ? Ue.exports = function() {
|
|
|
38
38
|
switch (e) {
|
|
39
39
|
case m:
|
|
40
40
|
return "Fragment";
|
|
41
|
-
case
|
|
41
|
+
case p:
|
|
42
42
|
return "Portal";
|
|
43
43
|
case s:
|
|
44
44
|
return "Profiler";
|
|
@@ -64,46 +64,46 @@ process.env.NODE_ENV === "production" ? Ue.exports = function() {
|
|
|
64
64
|
case L:
|
|
65
65
|
var g = e.displayName || null;
|
|
66
66
|
return g !== null ? g : o(e.type) || "Memo";
|
|
67
|
-
case
|
|
68
|
-
var f = e,
|
|
67
|
+
case E:
|
|
68
|
+
var f = e, P = f._payload, F = f._init;
|
|
69
69
|
try {
|
|
70
|
-
return o(F(
|
|
70
|
+
return o(F(P));
|
|
71
71
|
} catch {
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
var i,
|
|
77
|
+
d = Symbol.for("react.module.reference");
|
|
78
|
+
var i, h, u, v, H, z, Q, V = Object.assign, X = 0;
|
|
79
79
|
function be() {
|
|
80
80
|
}
|
|
81
81
|
be.__reactDisabledLog = !0;
|
|
82
|
-
var
|
|
83
|
-
function
|
|
84
|
-
if (
|
|
82
|
+
var fe, ue = r.ReactCurrentDispatcher;
|
|
83
|
+
function D(e, g, f) {
|
|
84
|
+
if (fe === void 0) try {
|
|
85
85
|
throw Error();
|
|
86
86
|
} catch (F) {
|
|
87
|
-
var
|
|
88
|
-
|
|
87
|
+
var P = F.stack.trim().match(/\n( *(at )?)/);
|
|
88
|
+
fe = P && P[1] || "";
|
|
89
89
|
}
|
|
90
90
|
return `
|
|
91
|
-
` +
|
|
91
|
+
` + fe + e;
|
|
92
92
|
}
|
|
93
|
-
var G,
|
|
93
|
+
var G, q = !1, Z = typeof WeakMap == "function" ? WeakMap : Map;
|
|
94
94
|
function ie(e, g) {
|
|
95
|
-
if (!e ||
|
|
96
|
-
var f,
|
|
97
|
-
if (
|
|
98
|
-
|
|
95
|
+
if (!e || q) return "";
|
|
96
|
+
var f, P = G.get(e);
|
|
97
|
+
if (P !== void 0) return P;
|
|
98
|
+
q = !0;
|
|
99
99
|
var F, R = Error.prepareStackTrace;
|
|
100
|
-
Error.prepareStackTrace = void 0, F =
|
|
101
|
-
if (
|
|
102
|
-
i = console.log,
|
|
100
|
+
Error.prepareStackTrace = void 0, F = ue.current, ue.current = null, function() {
|
|
101
|
+
if (X === 0) {
|
|
102
|
+
i = console.log, h = console.info, u = console.warn, v = console.error, H = console.group, z = console.groupCollapsed, Q = console.groupEnd;
|
|
103
103
|
var O = { configurable: !0, enumerable: !0, value: be, writable: !0 };
|
|
104
104
|
Object.defineProperties(console, { info: O, log: O, warn: O, error: O, group: O, groupCollapsed: O, groupEnd: O });
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
X++;
|
|
107
107
|
}();
|
|
108
108
|
try {
|
|
109
109
|
if (g) {
|
|
@@ -152,78 +152,78 @@ process.env.NODE_ENV === "production" ? Ue.exports = function() {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
} finally {
|
|
155
|
-
|
|
156
|
-
if (--
|
|
155
|
+
q = !1, ue.current = F, function() {
|
|
156
|
+
if (--X === 0) {
|
|
157
157
|
var O = { configurable: !0, enumerable: !0, writable: !0 };
|
|
158
|
-
Object.defineProperties(console, { log:
|
|
158
|
+
Object.defineProperties(console, { log: V({}, O, { value: i }), info: V({}, O, { value: h }), warn: V({}, O, { value: u }), error: V({}, O, { value: v }), group: V({}, O, { value: H }), groupCollapsed: V({}, O, { value: z }), groupEnd: V({}, O, { value: Q }) });
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
X < 0 && n("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
161
161
|
}(), Error.prepareStackTrace = R;
|
|
162
162
|
}
|
|
163
|
-
var B = e ? e.displayName || e.name : "",
|
|
164
|
-
return typeof e == "function" && G.set(e,
|
|
163
|
+
var B = e ? e.displayName || e.name : "", Y = B ? D(B) : "";
|
|
164
|
+
return typeof e == "function" && G.set(e, Y), Y;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function ee(e, g, f) {
|
|
167
167
|
if (e == null) return "";
|
|
168
|
-
if (typeof e == "function") return ie(e, !(!(
|
|
169
|
-
var
|
|
170
|
-
if (typeof e == "string") return
|
|
168
|
+
if (typeof e == "function") return ie(e, !(!(P = e.prototype) || !P.isReactComponent));
|
|
169
|
+
var P;
|
|
170
|
+
if (typeof e == "string") return D(e);
|
|
171
171
|
switch (e) {
|
|
172
172
|
case k:
|
|
173
|
-
return
|
|
173
|
+
return D("Suspense");
|
|
174
174
|
case S:
|
|
175
|
-
return
|
|
175
|
+
return D("SuspenseList");
|
|
176
176
|
}
|
|
177
177
|
if (typeof e == "object") switch (e.$$typeof) {
|
|
178
178
|
case b:
|
|
179
179
|
return ie(e.render, !1);
|
|
180
180
|
case L:
|
|
181
|
-
return
|
|
182
|
-
case
|
|
181
|
+
return ee(e.type, g, f);
|
|
182
|
+
case E:
|
|
183
183
|
var F = e, R = F._payload, T = F._init;
|
|
184
184
|
try {
|
|
185
|
-
return
|
|
185
|
+
return ee(T(R), g, f);
|
|
186
186
|
} catch {
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
return "";
|
|
190
190
|
}
|
|
191
|
-
G = new
|
|
192
|
-
var se = Object.prototype.hasOwnProperty,
|
|
193
|
-
function
|
|
191
|
+
G = new Z();
|
|
192
|
+
var se = Object.prototype.hasOwnProperty, ne = {}, J = r.ReactDebugCurrentFrame;
|
|
193
|
+
function te(e) {
|
|
194
194
|
if (e) {
|
|
195
|
-
var g = e._owner, f =
|
|
196
|
-
|
|
197
|
-
} else
|
|
195
|
+
var g = e._owner, f = ee(e.type, e._source, g ? g.type : null);
|
|
196
|
+
J.setExtraStackFrame(f);
|
|
197
|
+
} else J.setExtraStackFrame(null);
|
|
198
198
|
}
|
|
199
199
|
var le = Array.isArray;
|
|
200
|
-
function
|
|
200
|
+
function de(e) {
|
|
201
201
|
return le(e);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function re(e) {
|
|
204
204
|
return "" + e;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function he(e) {
|
|
207
207
|
if (function(g) {
|
|
208
208
|
try {
|
|
209
|
-
return
|
|
209
|
+
return re(g), !1;
|
|
210
210
|
} catch {
|
|
211
211
|
return !0;
|
|
212
212
|
}
|
|
213
213
|
}(e)) return n("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", function(g) {
|
|
214
214
|
return typeof Symbol == "function" && Symbol.toStringTag && g[Symbol.toStringTag] || g.constructor.name || "Object";
|
|
215
|
-
}(e)),
|
|
215
|
+
}(e)), re(e);
|
|
216
216
|
}
|
|
217
|
-
var
|
|
218
|
-
function
|
|
217
|
+
var ae, Le, ye = r.ReactCurrentOwner, ke = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
218
|
+
function $e(e, g, f, P, F) {
|
|
219
219
|
var R, T = {}, N = null, $ = null;
|
|
220
|
-
for (R in f !== void 0 && (
|
|
220
|
+
for (R in f !== void 0 && (he(f), N = "" + f), function(A) {
|
|
221
221
|
if (se.call(A, "key")) {
|
|
222
222
|
var B = Object.getOwnPropertyDescriptor(A, "key").get;
|
|
223
223
|
if (B && B.isReactWarning) return !1;
|
|
224
224
|
}
|
|
225
225
|
return A.key !== void 0;
|
|
226
|
-
}(g) && (
|
|
226
|
+
}(g) && (he(g.key), N = "" + g.key), function(A) {
|
|
227
227
|
if (se.call(A, "ref")) {
|
|
228
228
|
var B = Object.getOwnPropertyDescriptor(A, "ref").get;
|
|
229
229
|
if (B && B.isReactWarning) return !1;
|
|
@@ -231,7 +231,7 @@ process.env.NODE_ENV === "production" ? Ue.exports = function() {
|
|
|
231
231
|
return A.ref !== void 0;
|
|
232
232
|
}(g) && ($ = g.ref, function(A) {
|
|
233
233
|
typeof A.ref == "string" && ye.current;
|
|
234
|
-
}(g)), g) se.call(g, R) && !
|
|
234
|
+
}(g)), g) se.call(g, R) && !ke.hasOwnProperty(R) && (T[R] = g[R]);
|
|
235
235
|
if (e && e.defaultProps) {
|
|
236
236
|
var M = e.defaultProps;
|
|
237
237
|
for (R in M) T[R] === void 0 && (T[R] = M[R]);
|
|
@@ -239,48 +239,48 @@ process.env.NODE_ENV === "production" ? Ue.exports = function() {
|
|
|
239
239
|
if (N || $) {
|
|
240
240
|
var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
241
241
|
N && function(A, B) {
|
|
242
|
-
var
|
|
243
|
-
|
|
242
|
+
var Y = function() {
|
|
243
|
+
ae || (ae = !0, n("%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)", B));
|
|
244
244
|
};
|
|
245
|
-
|
|
245
|
+
Y.isReactWarning = !0, Object.defineProperty(A, "key", { get: Y, configurable: !0 });
|
|
246
246
|
}(T, j), $ && function(A, B) {
|
|
247
|
-
var
|
|
248
|
-
|
|
247
|
+
var Y = function() {
|
|
248
|
+
Le || (Le = !0, n("%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)", B));
|
|
249
249
|
};
|
|
250
|
-
|
|
250
|
+
Y.isReactWarning = !0, Object.defineProperty(A, "ref", { get: Y, configurable: !0 });
|
|
251
251
|
}(T, j);
|
|
252
252
|
}
|
|
253
|
-
return function(A, B,
|
|
254
|
-
var
|
|
255
|
-
return Object.defineProperty(
|
|
256
|
-
}(e, N, $, F,
|
|
253
|
+
return function(A, B, Y, O, U, Pe, Oe) {
|
|
254
|
+
var ce = { $$typeof: l, type: A, key: B, ref: Y, props: Oe, _owner: Pe, _store: {} };
|
|
255
|
+
return Object.defineProperty(ce._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(ce, "_self", { configurable: !1, enumerable: !1, writable: !1, value: O }), Object.defineProperty(ce, "_source", { configurable: !1, enumerable: !1, writable: !1, value: U }), Object.freeze && (Object.freeze(ce.props), Object.freeze(ce)), ce;
|
|
256
|
+
}(e, N, $, F, P, ye.current, T);
|
|
257
257
|
}
|
|
258
|
-
var
|
|
258
|
+
var Te, _e = r.ReactCurrentOwner, Ce = r.ReactDebugCurrentFrame;
|
|
259
259
|
function me(e) {
|
|
260
260
|
if (e) {
|
|
261
|
-
var g = e._owner, f =
|
|
262
|
-
|
|
263
|
-
} else
|
|
261
|
+
var g = e._owner, f = ee(e.type, e._source, g ? g.type : null);
|
|
262
|
+
Ce.setExtraStackFrame(f);
|
|
263
|
+
} else Ce.setExtraStackFrame(null);
|
|
264
264
|
}
|
|
265
265
|
function Ee(e) {
|
|
266
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
266
|
+
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (
|
|
270
|
-
var e = o(
|
|
268
|
+
function je() {
|
|
269
|
+
if (_e.current) {
|
|
270
|
+
var e = o(_e.current.type);
|
|
271
271
|
if (e) return `
|
|
272
272
|
|
|
273
273
|
Check the render method of \`` + e + "`.";
|
|
274
274
|
}
|
|
275
275
|
return "";
|
|
276
276
|
}
|
|
277
|
-
|
|
278
|
-
var
|
|
279
|
-
function
|
|
277
|
+
Te = !1;
|
|
278
|
+
var we = {};
|
|
279
|
+
function Ne(e, g) {
|
|
280
280
|
if (e._store && !e._store.validated && e.key == null) {
|
|
281
281
|
e._store.validated = !0;
|
|
282
282
|
var f = function(F) {
|
|
283
|
-
var R =
|
|
283
|
+
var R = je();
|
|
284
284
|
if (!R) {
|
|
285
285
|
var T = typeof F == "string" ? F : F.displayName || F.name;
|
|
286
286
|
T && (R = `
|
|
@@ -289,18 +289,18 @@ Check the top-level render call using <` + T + ">.");
|
|
|
289
289
|
}
|
|
290
290
|
return R;
|
|
291
291
|
}(g);
|
|
292
|
-
if (!
|
|
293
|
-
|
|
294
|
-
var
|
|
295
|
-
e && e._owner && e._owner !==
|
|
292
|
+
if (!we[f]) {
|
|
293
|
+
we[f] = !0;
|
|
294
|
+
var P = "";
|
|
295
|
+
e && e._owner && e._owner !== _e.current && (P = " It was passed a child from " + o(e._owner.type) + "."), me(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, P), me(null);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
function x(e, g) {
|
|
300
300
|
if (typeof e == "object") {
|
|
301
|
-
if (
|
|
302
|
-
var
|
|
303
|
-
Ee(
|
|
301
|
+
if (de(e)) for (var f = 0; f < e.length; f++) {
|
|
302
|
+
var P = e[f];
|
|
303
|
+
Ee(P) && Ne(P, g);
|
|
304
304
|
}
|
|
305
305
|
else if (Ee(e)) e._store && (e._store.validated = !0);
|
|
306
306
|
else if (e) {
|
|
@@ -309,11 +309,11 @@ Check the top-level render call using <` + T + ">.");
|
|
|
309
309
|
var $ = C && N[C] || N["@@iterator"];
|
|
310
310
|
return typeof $ == "function" ? $ : null;
|
|
311
311
|
}(e);
|
|
312
|
-
if (typeof F == "function" && F !== e.entries) for (var R, T = F.call(e); !(R = T.next()).done; ) Ee(R.value) &&
|
|
312
|
+
if (typeof F == "function" && F !== e.entries) for (var R, T = F.call(e); !(R = T.next()).done; ) Ee(R.value) && Ne(R.value, g);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function W(e) {
|
|
317
317
|
var g, f = e.type;
|
|
318
318
|
if (f != null && typeof f != "string") {
|
|
319
319
|
if (typeof f == "function") g = f.propTypes;
|
|
@@ -322,7 +322,7 @@ Check the top-level render call using <` + T + ">.");
|
|
|
322
322
|
g = f.propTypes;
|
|
323
323
|
}
|
|
324
324
|
if (g) {
|
|
325
|
-
var
|
|
325
|
+
var P = o(f);
|
|
326
326
|
(function(F, R, T, N, $) {
|
|
327
327
|
var M = Function.call.bind(se);
|
|
328
328
|
for (var j in F) if (M(F, j)) {
|
|
@@ -333,68 +333,68 @@ Check the top-level render call using <` + T + ">.");
|
|
|
333
333
|
throw B.name = "Invariant Violation", B;
|
|
334
334
|
}
|
|
335
335
|
A = F[j](R, j, N, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
-
} catch (
|
|
337
|
-
A =
|
|
336
|
+
} catch (Y) {
|
|
337
|
+
A = Y;
|
|
338
338
|
}
|
|
339
|
-
!A || A instanceof Error || (
|
|
339
|
+
!A || A instanceof Error || (te($), n("%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).", N || "React class", T, j, typeof A), te(null)), A instanceof Error && !(A.message in ne) && (ne[A.message] = !0, te($), n("Failed %s type: %s", T, A.message), te(null));
|
|
340
340
|
}
|
|
341
|
-
})(g, e.props, "prop",
|
|
342
|
-
} else f.PropTypes === void 0 ||
|
|
341
|
+
})(g, e.props, "prop", P, e);
|
|
342
|
+
} else f.PropTypes === void 0 || Te || (Te = !0, n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o(f) || "Unknown"));
|
|
343
343
|
typeof f.getDefaultProps != "function" || f.getDefaultProps.isReactClassApproved || n("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
var
|
|
347
|
-
function
|
|
346
|
+
var ge = {};
|
|
347
|
+
function oe(e, g, f, P, F, R) {
|
|
348
348
|
var T = function(U) {
|
|
349
|
-
return typeof U == "string" || typeof U == "function" || U === m || U === s || U === w || U === k || U === S || U === I || typeof U == "object" && U !== null && (U.$$typeof ===
|
|
349
|
+
return typeof U == "string" || typeof U == "function" || U === m || U === s || U === w || U === k || U === S || U === I || typeof U == "object" && U !== null && (U.$$typeof === E || U.$$typeof === L || U.$$typeof === _ || U.$$typeof === y || U.$$typeof === b || U.$$typeof === d || U.getModuleId !== void 0);
|
|
350
350
|
}(e);
|
|
351
351
|
if (!T) {
|
|
352
352
|
var N, $ = "";
|
|
353
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && ($ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), $ +=
|
|
353
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && ($ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), $ += je(), e === null ? N = "null" : de(e) ? N = "array" : e !== void 0 && e.$$typeof === l ? (N = "<" + (o(e.type) || "Unknown") + " />", $ = " Did you accidentally export a JSX literal instead of a component?") : N = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, $);
|
|
354
354
|
}
|
|
355
|
-
var M =
|
|
355
|
+
var M = $e(e, g, f, F, R);
|
|
356
356
|
if (M == null) return M;
|
|
357
357
|
if (T) {
|
|
358
358
|
var j = g.children;
|
|
359
|
-
if (j !== void 0) if (
|
|
359
|
+
if (j !== void 0) if (P) if (de(j)) {
|
|
360
360
|
for (var A = 0; A < j.length; A++) x(j[A], e);
|
|
361
361
|
Object.freeze && Object.freeze(j);
|
|
362
362
|
} else n("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
363
363
|
else x(j, e);
|
|
364
364
|
}
|
|
365
365
|
if (se.call(g, "key")) {
|
|
366
|
-
var B = o(e),
|
|
366
|
+
var B = o(e), Y = Object.keys(g).filter(function(U) {
|
|
367
367
|
return U !== "key";
|
|
368
|
-
}), O =
|
|
369
|
-
|
|
368
|
+
}), O = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
369
|
+
ge[B + O] || (n(`A props object containing a "key" prop is being spread into JSX:
|
|
370
370
|
let props = %s;
|
|
371
371
|
<%s {...props} />
|
|
372
372
|
React keys must be passed directly to JSX without using spread:
|
|
373
373
|
let props = %s;
|
|
374
|
-
<%s key={someKey} {...props} />`, O, B,
|
|
374
|
+
<%s key={someKey} {...props} />`, O, B, Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}", B), ge[B + O] = !0);
|
|
375
375
|
}
|
|
376
376
|
return e === m ? function(U) {
|
|
377
|
-
for (var
|
|
378
|
-
var
|
|
379
|
-
if (
|
|
380
|
-
me(U), n("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
377
|
+
for (var Pe = Object.keys(U.props), Oe = 0; Oe < Pe.length; Oe++) {
|
|
378
|
+
var ce = Pe[Oe];
|
|
379
|
+
if (ce !== "children" && ce !== "key") {
|
|
380
|
+
me(U), n("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ce), me(null);
|
|
381
381
|
break;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
U.ref !== null && (me(U), n("Invalid attribute `ref` supplied to `React.Fragment`."), me(null));
|
|
385
|
-
}(M) :
|
|
385
|
+
}(M) : W(M), M;
|
|
386
386
|
}
|
|
387
387
|
var ve = function(e, g, f) {
|
|
388
|
-
return
|
|
389
|
-
},
|
|
390
|
-
return
|
|
388
|
+
return oe(e, g, f, !1);
|
|
389
|
+
}, Re = function(e, g, f) {
|
|
390
|
+
return oe(e, g, f, !0);
|
|
391
391
|
};
|
|
392
|
-
|
|
393
|
-
}()),
|
|
394
|
-
var
|
|
395
|
-
(function(
|
|
396
|
-
var t = function(
|
|
397
|
-
var
|
|
392
|
+
De.Fragment = m, De.jsx = ve, De.jsxs = Re;
|
|
393
|
+
}()), De);
|
|
394
|
+
var c = He.exports, Xe = { exports: {} };
|
|
395
|
+
(function(d) {
|
|
396
|
+
var t = function(l) {
|
|
397
|
+
var p = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, m = 0, w = {}, s = { manual: l.Prism && l.Prism.manual, disableWorkerMessageHandler: l.Prism && l.Prism.disableWorkerMessageHandler, util: { encode: function r(n) {
|
|
398
398
|
return n instanceof _ ? new _(n.type, r(n.content), n.alias) : Array.isArray(n) ? n.map(r) : n.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
399
399
|
}, type: function(r) {
|
|
400
400
|
return Object.prototype.toString.call(r).slice(8, -1);
|
|
@@ -405,24 +405,24 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
405
405
|
switch (a = a || {}, s.util.type(n)) {
|
|
406
406
|
case "Object":
|
|
407
407
|
if (i = s.util.objId(n), a[i]) return a[i];
|
|
408
|
-
for (var
|
|
408
|
+
for (var h in o = {}, a[i] = o, n) n.hasOwnProperty(h) && (o[h] = r(n[h], a));
|
|
409
409
|
return o;
|
|
410
410
|
case "Array":
|
|
411
|
-
return i = s.util.objId(n), a[i] ? a[i] : (o = [], a[i] = o, n.forEach(function(
|
|
412
|
-
o[
|
|
411
|
+
return i = s.util.objId(n), a[i] ? a[i] : (o = [], a[i] = o, n.forEach(function(u, v) {
|
|
412
|
+
o[v] = r(u, a);
|
|
413
413
|
}), o);
|
|
414
414
|
default:
|
|
415
415
|
return n;
|
|
416
416
|
}
|
|
417
417
|
}, getLanguage: function(r) {
|
|
418
418
|
for (; r; ) {
|
|
419
|
-
var n =
|
|
419
|
+
var n = p.exec(r.className);
|
|
420
420
|
if (n) return n[1].toLowerCase();
|
|
421
421
|
r = r.parentElement;
|
|
422
422
|
}
|
|
423
423
|
return "none";
|
|
424
424
|
}, setLanguage: function(r, n) {
|
|
425
|
-
r.className = r.className.replace(RegExp(
|
|
425
|
+
r.className = r.className.replace(RegExp(p, "gi"), ""), r.classList.add("language-" + n);
|
|
426
426
|
}, currentScript: function() {
|
|
427
427
|
if (typeof document > "u") return null;
|
|
428
428
|
if (document.currentScript && document.currentScript.tagName === "SCRIPT") return document.currentScript;
|
|
@@ -449,46 +449,46 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
449
449
|
for (var o in n) a[o] = n[o];
|
|
450
450
|
return a;
|
|
451
451
|
}, insertBefore: function(r, n, a, o) {
|
|
452
|
-
var i = (o = o || s.languages)[r],
|
|
453
|
-
for (var
|
|
454
|
-
if (
|
|
455
|
-
a.hasOwnProperty(
|
|
452
|
+
var i = (o = o || s.languages)[r], h = {};
|
|
453
|
+
for (var u in i) if (i.hasOwnProperty(u)) {
|
|
454
|
+
if (u == n) for (var v in a) a.hasOwnProperty(v) && (h[v] = a[v]);
|
|
455
|
+
a.hasOwnProperty(u) || (h[u] = i[u]);
|
|
456
456
|
}
|
|
457
|
-
var
|
|
458
|
-
return o[r] =
|
|
459
|
-
|
|
460
|
-
}),
|
|
457
|
+
var H = o[r];
|
|
458
|
+
return o[r] = h, s.languages.DFS(s.languages, function(z, Q) {
|
|
459
|
+
Q === H && z != r && (this[z] = h);
|
|
460
|
+
}), h;
|
|
461
461
|
}, DFS: function r(n, a, o, i) {
|
|
462
462
|
i = i || {};
|
|
463
|
-
var
|
|
464
|
-
for (var
|
|
465
|
-
a.call(n,
|
|
466
|
-
var
|
|
467
|
-
|
|
463
|
+
var h = s.util.objId;
|
|
464
|
+
for (var u in n) if (n.hasOwnProperty(u)) {
|
|
465
|
+
a.call(n, u, n[u], o || u);
|
|
466
|
+
var v = n[u], H = s.util.type(v);
|
|
467
|
+
H !== "Object" || i[h(v)] ? H !== "Array" || i[h(v)] || (i[h(v)] = !0, r(v, a, u, i)) : (i[h(v)] = !0, r(v, a, null, i));
|
|
468
468
|
}
|
|
469
469
|
} }, plugins: {}, highlightAll: function(r, n) {
|
|
470
470
|
s.highlightAllUnder(document, r, n);
|
|
471
471
|
}, highlightAllUnder: function(r, n, a) {
|
|
472
472
|
var o = { callback: a, container: r, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
|
|
473
473
|
s.hooks.run("before-highlightall", o), o.elements = Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)), s.hooks.run("before-all-elements-highlight", o);
|
|
474
|
-
for (var i,
|
|
474
|
+
for (var i, h = 0; i = o.elements[h++]; ) s.highlightElement(i, n === !0, o.callback);
|
|
475
475
|
}, highlightElement: function(r, n, a) {
|
|
476
476
|
var o = s.util.getLanguage(r), i = s.languages[o];
|
|
477
477
|
s.util.setLanguage(r, o);
|
|
478
|
-
var
|
|
479
|
-
|
|
480
|
-
var
|
|
481
|
-
function
|
|
482
|
-
|
|
478
|
+
var h = r.parentElement;
|
|
479
|
+
h && h.nodeName.toLowerCase() === "pre" && s.util.setLanguage(h, o);
|
|
480
|
+
var u = { element: r, language: o, grammar: i, code: r.textContent };
|
|
481
|
+
function v(z) {
|
|
482
|
+
u.highlightedCode = z, s.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, s.hooks.run("after-highlight", u), s.hooks.run("complete", u), a && a.call(u.element);
|
|
483
483
|
}
|
|
484
|
-
if (s.hooks.run("before-sanity-check",
|
|
485
|
-
if (s.hooks.run("before-highlight",
|
|
486
|
-
var
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
},
|
|
490
|
-
} else
|
|
491
|
-
else
|
|
484
|
+
if (s.hooks.run("before-sanity-check", u), (h = u.element.parentElement) && h.nodeName.toLowerCase() === "pre" && !h.hasAttribute("tabindex") && h.setAttribute("tabindex", "0"), !u.code) return s.hooks.run("complete", u), void (a && a.call(u.element));
|
|
485
|
+
if (s.hooks.run("before-highlight", u), u.grammar) if (n && l.Worker) {
|
|
486
|
+
var H = new Worker(s.filename);
|
|
487
|
+
H.onmessage = function(z) {
|
|
488
|
+
v(z.data);
|
|
489
|
+
}, H.postMessage(JSON.stringify({ language: u.language, code: u.code, immediateClose: !0 }));
|
|
490
|
+
} else v(s.highlight(u.code, u.grammar, u.language));
|
|
491
|
+
else v(s.util.encode(u.code));
|
|
492
492
|
}, highlight: function(r, n, a) {
|
|
493
493
|
var o = { code: r, grammar: n, language: a };
|
|
494
494
|
if (s.hooks.run("before-tokenize", o), !o.grammar) throw new Error('The language "' + o.language + '" has no grammar.');
|
|
@@ -500,9 +500,9 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
500
500
|
delete n.rest;
|
|
501
501
|
}
|
|
502
502
|
var i = new k();
|
|
503
|
-
return S(i, i.head, r), b(r, i, n, i.head, 0), function(
|
|
504
|
-
for (var
|
|
505
|
-
return
|
|
503
|
+
return S(i, i.head, r), b(r, i, n, i.head, 0), function(h) {
|
|
504
|
+
for (var u = [], v = h.head.next; v !== h.tail; ) u.push(v.value), v = v.next;
|
|
505
|
+
return u;
|
|
506
506
|
}(i);
|
|
507
507
|
}, hooks: { all: {}, add: function(r, n) {
|
|
508
508
|
var a = s.hooks.all;
|
|
@@ -518,42 +518,42 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
518
518
|
r.lastIndex = n;
|
|
519
519
|
var i = r.exec(a);
|
|
520
520
|
if (i && o && i[1]) {
|
|
521
|
-
var
|
|
522
|
-
i.index +=
|
|
521
|
+
var h = i[1].length;
|
|
522
|
+
i.index += h, i[0] = i[0].slice(h);
|
|
523
523
|
}
|
|
524
524
|
return i;
|
|
525
525
|
}
|
|
526
|
-
function b(r, n, a, o, i,
|
|
527
|
-
for (var
|
|
528
|
-
var
|
|
529
|
-
|
|
530
|
-
for (var
|
|
531
|
-
if (
|
|
532
|
-
var z =
|
|
533
|
-
if (
|
|
534
|
-
var
|
|
535
|
-
z.pattern = RegExp(z.pattern.source,
|
|
526
|
+
function b(r, n, a, o, i, h) {
|
|
527
|
+
for (var u in a) if (a.hasOwnProperty(u) && a[u]) {
|
|
528
|
+
var v = a[u];
|
|
529
|
+
v = Array.isArray(v) ? v : [v];
|
|
530
|
+
for (var H = 0; H < v.length; ++H) {
|
|
531
|
+
if (h && h.cause == u + "," + H) return;
|
|
532
|
+
var z = v[H], Q = z.inside, V = !!z.lookbehind, X = !!z.greedy, be = z.alias;
|
|
533
|
+
if (X && !z.pattern.global) {
|
|
534
|
+
var fe = z.pattern.toString().match(/[imsuy]*$/)[0];
|
|
535
|
+
z.pattern = RegExp(z.pattern.source, fe + "g");
|
|
536
536
|
}
|
|
537
|
-
for (var
|
|
538
|
-
var
|
|
537
|
+
for (var ue = z.pattern || z, D = o.next, G = i; D !== n.tail && !(h && G >= h.reach); G += D.value.length, D = D.next) {
|
|
538
|
+
var q = D.value;
|
|
539
539
|
if (n.length > r.length) return;
|
|
540
|
-
if (!(
|
|
541
|
-
var
|
|
542
|
-
if (
|
|
543
|
-
if (!(
|
|
544
|
-
var
|
|
545
|
-
for (
|
|
546
|
-
if (G =
|
|
547
|
-
for (var
|
|
548
|
-
ie--,
|
|
549
|
-
} else if (!(
|
|
550
|
-
|
|
551
|
-
var
|
|
552
|
-
|
|
553
|
-
var
|
|
554
|
-
if (le && (
|
|
555
|
-
var
|
|
556
|
-
b(r, n, a,
|
|
540
|
+
if (!(q instanceof _)) {
|
|
541
|
+
var Z, ie = 1;
|
|
542
|
+
if (X) {
|
|
543
|
+
if (!(Z = y(ue, G, r, V)) || Z.index >= r.length) break;
|
|
544
|
+
var ee = Z.index, se = Z.index + Z[0].length, ne = G;
|
|
545
|
+
for (ne += D.value.length; ee >= ne; ) ne += (D = D.next).value.length;
|
|
546
|
+
if (G = ne -= D.value.length, D.value instanceof _) continue;
|
|
547
|
+
for (var J = D; J !== n.tail && (ne < se || typeof J.value == "string"); J = J.next) ie++, ne += J.value.length;
|
|
548
|
+
ie--, q = r.slice(G, ne), Z.index -= G;
|
|
549
|
+
} else if (!(Z = y(ue, 0, q, V))) continue;
|
|
550
|
+
ee = Z.index;
|
|
551
|
+
var te = Z[0], le = q.slice(0, ee), de = q.slice(ee + te.length), re = G + q.length;
|
|
552
|
+
h && re > h.reach && (h.reach = re);
|
|
553
|
+
var he = D.prev;
|
|
554
|
+
if (le && (he = S(n, he, le), G += le.length), L(n, he, ie), D = S(n, he, new _(u, Q ? s.tokenize(te, Q) : te, be, te)), de && S(n, D, de), ie > 1) {
|
|
555
|
+
var ae = { cause: u + "," + H, reach: re };
|
|
556
|
+
b(r, n, a, D.prev, G, ae), h && ae.reach > h.reach && (h.reach = ae.reach);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -572,67 +572,67 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
572
572
|
for (var o = n.next, i = 0; i < a && o !== r.tail; i++) o = o.next;
|
|
573
573
|
n.next = o, o.prev = n, r.length -= i;
|
|
574
574
|
}
|
|
575
|
-
if (
|
|
575
|
+
if (l.Prism = s, _.stringify = function r(n, a) {
|
|
576
576
|
if (typeof n == "string") return n;
|
|
577
577
|
if (Array.isArray(n)) {
|
|
578
578
|
var o = "";
|
|
579
|
-
return n.forEach(function(
|
|
580
|
-
o += r(
|
|
579
|
+
return n.forEach(function(H) {
|
|
580
|
+
o += r(H, a);
|
|
581
581
|
}), o;
|
|
582
582
|
}
|
|
583
|
-
var i = { type: n.type, content: r(n.content, a), tag: "span", classes: ["token", n.type], attributes: {}, language: a },
|
|
584
|
-
|
|
585
|
-
var
|
|
586
|
-
for (var
|
|
587
|
-
return "<" + i.tag + ' class="' + i.classes.join(" ") + '"' +
|
|
588
|
-
}, !
|
|
583
|
+
var i = { type: n.type, content: r(n.content, a), tag: "span", classes: ["token", n.type], attributes: {}, language: a }, h = n.alias;
|
|
584
|
+
h && (Array.isArray(h) ? Array.prototype.push.apply(i.classes, h) : i.classes.push(h)), s.hooks.run("wrap", i);
|
|
585
|
+
var u = "";
|
|
586
|
+
for (var v in i.attributes) u += " " + v + '="' + (i.attributes[v] || "").replace(/"/g, """) + '"';
|
|
587
|
+
return "<" + i.tag + ' class="' + i.classes.join(" ") + '"' + u + ">" + i.content + "</" + i.tag + ">";
|
|
588
|
+
}, !l.document) return l.addEventListener && (s.disableWorkerMessageHandler || l.addEventListener("message", function(r) {
|
|
589
589
|
var n = JSON.parse(r.data), a = n.language, o = n.code, i = n.immediateClose;
|
|
590
|
-
|
|
590
|
+
l.postMessage(s.highlight(o, s.languages[a], a)), i && l.close();
|
|
591
591
|
}, !1)), s;
|
|
592
|
-
var
|
|
592
|
+
var E = s.util.currentScript();
|
|
593
593
|
function I() {
|
|
594
594
|
s.manual || s.highlightAll();
|
|
595
595
|
}
|
|
596
|
-
if (
|
|
596
|
+
if (E && (s.filename = E.src, E.hasAttribute("data-manual") && (s.manual = !0)), !s.manual) {
|
|
597
597
|
var C = document.readyState;
|
|
598
|
-
C === "loading" || C === "interactive" &&
|
|
598
|
+
C === "loading" || C === "interactive" && E && E.defer ? document.addEventListener("DOMContentLoaded", I) : window.requestAnimationFrame ? window.requestAnimationFrame(I) : window.setTimeout(I, 16);
|
|
599
599
|
}
|
|
600
600
|
return s;
|
|
601
601
|
}(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
}), Object.defineProperty(t.languages.markup.tag, "addInlined", { value: function(
|
|
602
|
+
d.exports && (d.exports = t), Ge !== void 0 && (Ge.Prism = t), t.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, t.languages.markup.tag.inside["attr-value"].inside.entity = t.languages.markup.entity, t.languages.markup.doctype.inside["internal-subset"].inside = t.languages.markup, t.hooks.add("wrap", function(l) {
|
|
603
|
+
l.type === "entity" && (l.attributes.title = l.content.replace(/&/, "&"));
|
|
604
|
+
}), Object.defineProperty(t.languages.markup.tag, "addInlined", { value: function(l, p) {
|
|
605
605
|
var m = {};
|
|
606
|
-
m["language-" +
|
|
606
|
+
m["language-" + p] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: t.languages[p] }, m.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
607
607
|
var w = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: m } };
|
|
608
|
-
w["language-" +
|
|
608
|
+
w["language-" + p] = { pattern: /[\s\S]+/, inside: t.languages[p] };
|
|
609
609
|
var s = {};
|
|
610
|
-
s[
|
|
611
|
-
return
|
|
610
|
+
s[l] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
611
|
+
return l;
|
|
612
612
|
}), "i"), lookbehind: !0, greedy: !0, inside: w }, t.languages.insertBefore("markup", "cdata", s);
|
|
613
|
-
} }), Object.defineProperty(t.languages.markup.tag, "addAttribute", { value: function(
|
|
614
|
-
t.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" +
|
|
615
|
-
} }), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, function(
|
|
616
|
-
var
|
|
617
|
-
|
|
618
|
-
var m =
|
|
613
|
+
} }), Object.defineProperty(t.languages.markup.tag, "addAttribute", { value: function(l, p) {
|
|
614
|
+
t.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + l + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [p, "language-" + p], inside: t.languages[p] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
|
|
615
|
+
} }), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, function(l) {
|
|
616
|
+
var p = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
617
|
+
l.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + p.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + p.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + p.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + p.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: p, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, l.languages.css.atrule.inside.rest = l.languages.css;
|
|
618
|
+
var m = l.languages.markup;
|
|
619
619
|
m && (m.tag.addInlined("style", "css"), m.tag.addAttribute("style", "css"));
|
|
620
620
|
}(t), t.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, t.languages.javascript = t.languages.extend("clike", { "class-name": [t.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), t.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, t.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: t.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: t.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: t.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: t.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: t.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), t.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: t.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), t.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), t.languages.markup && (t.languages.markup.tag.addInlined("script", "javascript"), t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), t.languages.js = t.languages.javascript, function() {
|
|
621
621
|
if (t !== void 0 && typeof document < "u") {
|
|
622
622
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
623
|
-
var
|
|
623
|
+
var l = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, p = "data-src-status", m = "loading", w = "loaded", s = "pre[data-src]:not([" + p + '="' + w + '"]):not([' + p + '="' + m + '"])';
|
|
624
624
|
t.hooks.add("before-highlightall", function(y) {
|
|
625
625
|
y.selector += ", " + s;
|
|
626
626
|
}), t.hooks.add("before-sanity-check", function(y) {
|
|
627
627
|
var b = y.element;
|
|
628
628
|
if (b.matches(s)) {
|
|
629
|
-
y.code = "", b.setAttribute(
|
|
629
|
+
y.code = "", b.setAttribute(p, m);
|
|
630
630
|
var k = b.appendChild(document.createElement("CODE"));
|
|
631
631
|
k.textContent = "Loading…";
|
|
632
632
|
var S = b.getAttribute("data-src"), L = y.language;
|
|
633
633
|
if (L === "none") {
|
|
634
|
-
var
|
|
635
|
-
L =
|
|
634
|
+
var E = (/\.(\w+)$/.exec(S) || [, "none"])[1];
|
|
635
|
+
L = l[E] || E;
|
|
636
636
|
}
|
|
637
637
|
t.util.setLanguage(k, L), t.util.setLanguage(b, L);
|
|
638
638
|
var I = t.plugins.autoloader;
|
|
@@ -642,12 +642,12 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
642
642
|
a.readyState == 4 && (a.status < 400 && a.responseText ? r(a.responseText) : a.status >= 400 ? n("✖ Error " + a.status + " while fetching file: " + a.statusText) : n("✖ Error: File does not exist or is empty"));
|
|
643
643
|
}, a.send(null);
|
|
644
644
|
}(S, function(C) {
|
|
645
|
-
b.setAttribute(
|
|
645
|
+
b.setAttribute(p, w);
|
|
646
646
|
var r = function(i) {
|
|
647
|
-
var
|
|
648
|
-
if (
|
|
649
|
-
var
|
|
650
|
-
return
|
|
647
|
+
var h = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(i || "");
|
|
648
|
+
if (h) {
|
|
649
|
+
var u = Number(h[1]), v = h[2], H = h[3];
|
|
650
|
+
return v ? H ? [u, Number(H)] : [u, void 0] : [u, u];
|
|
651
651
|
}
|
|
652
652
|
}(b.getAttribute("data-range"));
|
|
653
653
|
if (r) {
|
|
@@ -657,7 +657,7 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
657
657
|
}
|
|
658
658
|
k.textContent = C, t.highlightElement(k);
|
|
659
659
|
}, function(C) {
|
|
660
|
-
b.setAttribute(
|
|
660
|
+
b.setAttribute(p, "failed"), k.textContent = C;
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
}), t.plugins.fileHighlight = { highlight: function(y) {
|
|
@@ -669,49 +669,49 @@ var l = Ue.exports, Ye = { exports: {} };
|
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
671
|
}();
|
|
672
|
-
})(
|
|
673
|
-
const
|
|
674
|
-
Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.go = Prism.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), Prism.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete Prism.languages.go["class-name"], function(
|
|
675
|
-
var t = /\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/,
|
|
676
|
-
|
|
672
|
+
})(Xe);
|
|
673
|
+
const ze = Ve(Xe.exports);
|
|
674
|
+
Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.go = Prism.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), Prism.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete Prism.languages.go["class-name"], function(d) {
|
|
675
|
+
var t = /\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/, l = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, p = { pattern: RegExp(/(^|[^\w.])/.source + l + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, inside: { punctuation: /\./ } }, punctuation: /\./ } };
|
|
676
|
+
d.languages.java = d.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [p, { pattern: RegExp(/(^|[^\w.])/.source + l + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: p.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + l + /[A-Z]\w*\b/.source), lookbehind: !0, inside: p.inside }], keyword: t, function: [d.languages.clike.function, { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }], number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 }, constant: /\b[A-Z][A-Z_\d]+\b/ }), d.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), d.languages.insertBefore("java", "class-name", { annotation: { pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, lookbehind: !0, alias: "punctuation" }, generics: { pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { "class-name": p, keyword: t, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + l + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: p.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + l + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: p.inside.namespace, static: /\b\w+$/, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }], namespace: { pattern: RegExp(/(\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() {
|
|
677
677
|
return t.source;
|
|
678
678
|
})), lookbehind: !0, inside: { punctuation: /\./ } } });
|
|
679
|
-
}(Prism), Prism.languages.c = Prism.languages.extend("clike", { comment: { pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, "class-name": { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: !0 }, keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ }), Prism.languages.insertBefore("c", "string", { char: { pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, greedy: !0 } }), Prism.languages.insertBefore("c", "string", { macro: { pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: !0, greedy: !0, alias: "property", inside: { string: [{ pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: !0 }, Prism.languages.c.string], char: Prism.languages.c.char, comment: Prism.languages.c.comment, "macro-name": [{ pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: !0 }, { pattern: /(^#\s*define\s+)\w+\b(?=\()/i, lookbehind: !0, alias: "function" }], directive: { pattern: /^(#\s*)[a-z]+/, lookbehind: !0, alias: "keyword" }, "directive-hash": /^#/, punctuation: /##|\\(?=[\r\n])/, expression: { pattern: /\S[\s\S]*/, inside: Prism.languages.c } } } }), Prism.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete Prism.languages.c.boolean, function(
|
|
680
|
-
for (var t = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,
|
|
679
|
+
}(Prism), Prism.languages.c = Prism.languages.extend("clike", { comment: { pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, "class-name": { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: !0 }, keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ }), Prism.languages.insertBefore("c", "string", { char: { pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, greedy: !0 } }), Prism.languages.insertBefore("c", "string", { macro: { pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: !0, greedy: !0, alias: "property", inside: { string: [{ pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: !0 }, Prism.languages.c.string], char: Prism.languages.c.char, comment: Prism.languages.c.comment, "macro-name": [{ pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: !0 }, { pattern: /(^#\s*define\s+)\w+\b(?=\()/i, lookbehind: !0, alias: "function" }], directive: { pattern: /^(#\s*)[a-z]+/, lookbehind: !0, alias: "keyword" }, "directive-hash": /^#/, punctuation: /##|\\(?=[\r\n])/, expression: { pattern: /\S[\s\S]*/, inside: Prism.languages.c } } } }), Prism.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete Prism.languages.c.boolean, function(d) {
|
|
680
|
+
for (var t = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, l = 0; l < 2; l++) t = t.replace(/<self>/g, function() {
|
|
681
681
|
return t;
|
|
682
682
|
});
|
|
683
683
|
t = t.replace(/<self>/g, function() {
|
|
684
684
|
return /[^\s\S]/.source;
|
|
685
|
-
}),
|
|
686
|
-
}(Prism), Prism.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(
|
|
687
|
-
var t = "\\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",
|
|
688
|
-
|
|
689
|
-
for (var m = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], w =
|
|
690
|
-
|
|
685
|
+
}), d.languages.rust = { comment: [{ pattern: RegExp(/(^|[^\\])/.source + t), lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: !0 }, char: { pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: !0 }, attribute: { pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/, greedy: !0, alias: "attr-name", inside: { string: null } }, "closure-params": { pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, lookbehind: !0, greedy: !0, inside: { "closure-punctuation": { pattern: /^\||\|$/, alias: "punctuation" }, rest: null } }, "lifetime-annotation": { pattern: /'\w+/, alias: "symbol" }, "fragment-specifier": { pattern: /(\$\w+:)[a-z]+/, lookbehind: !0, alias: "punctuation" }, variable: /\$\w+/, "function-definition": { pattern: /(\bfn\s+)\w+/, lookbehind: !0, alias: "function" }, "type-definition": { pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/, lookbehind: !0, alias: "class-name" }, "module-declaration": [{ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/, lookbehind: !0, alias: "namespace" }, { pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/, lookbehind: !0, alias: "namespace", inside: { punctuation: /::/ } }], keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/], function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/, macro: { pattern: /\b\w+!/, alias: "property" }, constant: /\b[A-Z_][A-Z_\d]+\b/, "class-name": /\b[A-Z]\w*\b/, namespace: { pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/, inside: { punctuation: /::/ } }, number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, boolean: /\b(?:false|true)\b/, punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ }, d.languages.rust["closure-params"].inside.rest = d.languages.rust, d.languages.rust.attribute.inside.string = d.languages.rust.string;
|
|
686
|
+
}(Prism), Prism.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(d) {
|
|
687
|
+
var t = "\\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", l = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, p = { bash: l, environment: { pattern: RegExp("\\$" + t), alias: "constant" }, variable: [{ pattern: /\$?\(\([\s\S]+?\)\)/, greedy: !0, inside: { variable: [{ pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, /^\$\(\(/], number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, punctuation: /\(\(?|\)\)?|,|;/ } }, { pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, greedy: !0, inside: { variable: /^\$\(|^`|\)$|`$/ } }, { pattern: /\$\{[^}]+\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, punctuation: /[\[\]]/, environment: { pattern: RegExp("(\\{)" + t), lookbehind: !0, alias: "constant" } } }, /\$(?:\w+|[#?*!@$])/], 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})/ };
|
|
688
|
+
d.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" }, comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, "function-name": [{ pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: !0, alias: "function" }, { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: "function" }], "for-or-select": { pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, alias: "variable", lookbehind: !0 }, "assign-left": { pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, inside: { environment: { pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t), lookbehind: !0, alias: "constant" } }, alias: "variable", lookbehind: !0 }, parameter: { pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, alias: "variable", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: !0, greedy: !0, inside: p }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: l } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: p }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: p.entity } }], environment: { pattern: RegExp("\\$?" + t), alias: "constant" }, variable: p.variable, function: { 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;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: !0, alias: "class-name" }, boolean: { pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: !0 }, "file-descriptor": { pattern: /\B&\d\b/, alias: "important" }, operator: { pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, inside: { "file-descriptor": { pattern: /^\d/, alias: "important" } } }, punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } }, l.inside = d.languages.bash;
|
|
689
|
+
for (var m = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], w = p.variable[1].inside, s = 0; s < m.length; s++) w[m[s]] = d.languages.bash[m[s]];
|
|
690
|
+
d.languages.sh = d.languages.bash, d.languages.shell = d.languages.bash;
|
|
691
691
|
}(Prism), Prism.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, Prism.languages.webmanifest = Prism.languages.json;
|
|
692
|
-
window.Prism =
|
|
693
|
-
const
|
|
694
|
-
const s =
|
|
692
|
+
window.Prism = ze;
|
|
693
|
+
const qe = { javascript: "javascript", js: "javascript", typescript: "typescript", ts: "typescript", python: "python", py: "python", java: "java", c: "c", cpp: "cpp", "c++": "cpp", csharp: "csharp", "c#": "csharp", go: "go", golang: "go", rust: "rust", ruby: "ruby", rb: "ruby", php: "php", swift: "swift", kotlin: "kotlin", kt: "kotlin", sql: "sql", bash: "bash", sh: "bash", shell: "bash", json: "json", yaml: "yaml", yml: "yaml", markdown: "markdown", md: "markdown" }, Je = ({ value: d, language: t, theme: l = "dark", disabled: p = !1, onChange: m, onCodeChange: w }) => {
|
|
694
|
+
const s = Ae(null), _ = Ae(null), y = Ae(null), b = Se(() => qe[t.toLowerCase()] || "javascript", [t]), k = l === "dark" ? "#1e1e1e" : "#fafafa", S = Se(() => {
|
|
695
695
|
try {
|
|
696
|
-
const
|
|
697
|
-
if (
|
|
696
|
+
const E = ze.languages[b];
|
|
697
|
+
if (E) return ze.highlight(d || "", E, b);
|
|
698
698
|
} catch {
|
|
699
699
|
}
|
|
700
|
-
return function(
|
|
700
|
+
return function(E) {
|
|
701
701
|
const I = document.createElement("div");
|
|
702
|
-
return I.textContent =
|
|
703
|
-
}(
|
|
704
|
-
}, [
|
|
702
|
+
return I.textContent = E, I.innerHTML;
|
|
703
|
+
}(d || "");
|
|
704
|
+
}, [d, b]), L = pe((E) => {
|
|
705
705
|
y.current && clearTimeout(y.current), y.current = setTimeout(() => {
|
|
706
|
-
w == null || w(
|
|
706
|
+
w == null || w(E);
|
|
707
707
|
}, 500);
|
|
708
708
|
}, [w]);
|
|
709
|
-
return
|
|
709
|
+
return xe(() => () => {
|
|
710
710
|
y.current && clearTimeout(y.current);
|
|
711
|
-
}, []),
|
|
712
|
-
(function(
|
|
711
|
+
}, []), xe(() => {
|
|
712
|
+
(function(E) {
|
|
713
713
|
if (typeof document > "u") return;
|
|
714
|
-
const I = "hep-cr-prism-styles", C = document.getElementById(I), r =
|
|
714
|
+
const I = "hep-cr-prism-styles", C = document.getElementById(I), r = E === "dark" ? `
|
|
715
715
|
/* 默认代码颜色 */
|
|
716
716
|
.hep-cr-editor .hep-cr-highlight code,
|
|
717
717
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -876,16 +876,16 @@ const Ve = { javascript: "javascript", js: "javascript", typescript: "typescript
|
|
|
876
876
|
C && C.remove();
|
|
877
877
|
const n = document.createElement("style");
|
|
878
878
|
n.id = I, n.textContent = r, document.head.appendChild(n);
|
|
879
|
-
})(
|
|
880
|
-
}, [
|
|
881
|
-
const I =
|
|
879
|
+
})(l);
|
|
880
|
+
}, [l]), c.jsxs("div", { className: `hep-cr-editor theme-${l}`, style: { background: k }, children: [c.jsx("pre", { ref: _, className: `hep-cr-highlight language-${b}`, "aria-hidden": "true", children: c.jsx("code", { dangerouslySetInnerHTML: { __html: S } }) }), c.jsx("textarea", { ref: s, className: "hep-cr-input", value: d, disabled: p, onChange: (E) => {
|
|
881
|
+
const I = E.target.value;
|
|
882
882
|
m == null || m(I), L(I);
|
|
883
883
|
}, onScroll: () => {
|
|
884
884
|
s.current && _.current && (_.current.scrollTop = s.current.scrollTop, _.current.scrollLeft = s.current.scrollLeft);
|
|
885
|
-
}, onKeyDown: (
|
|
886
|
-
if (
|
|
887
|
-
|
|
888
|
-
const I =
|
|
885
|
+
}, onKeyDown: (E) => {
|
|
886
|
+
if (E.key === "Tab") {
|
|
887
|
+
E.preventDefault();
|
|
888
|
+
const I = E.target, C = I.selectionStart, r = I.selectionEnd, n = d.substring(0, C) + " " + d.substring(r);
|
|
889
889
|
m == null || m(n), L(n), requestAnimationFrame(() => {
|
|
890
890
|
I.selectionStart = I.selectionEnd = C + 2;
|
|
891
891
|
});
|
|
@@ -893,10 +893,10 @@ const Ve = { javascript: "javascript", js: "javascript", typescript: "typescript
|
|
|
893
893
|
}, spellCheck: !1, placeholder: "请输入代码..." })] });
|
|
894
894
|
};
|
|
895
895
|
if (typeof document < "u") {
|
|
896
|
-
const
|
|
897
|
-
if (!document.getElementById(
|
|
896
|
+
const d = "hep-cr-editor-styles";
|
|
897
|
+
if (!document.getElementById(d)) {
|
|
898
898
|
const t = document.createElement("style");
|
|
899
|
-
t.id =
|
|
899
|
+
t.id = d, t.textContent = `
|
|
900
900
|
.hep-cr-editor {
|
|
901
901
|
position: relative;
|
|
902
902
|
flex: 1;
|
|
@@ -956,34 +956,34 @@ if (typeof document < "u") {
|
|
|
956
956
|
`, document.head.appendChild(t);
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
var
|
|
960
|
-
let
|
|
961
|
-
class
|
|
959
|
+
var Qe = Object.defineProperty, Me = (d, t, l) => ((p, m, w) => m in p ? Qe(p, m, { enumerable: !0, configurable: !0, writable: !0, value: w }) : p[m] = w)(d, typeof t != "symbol" ? t + "" : t, l);
|
|
960
|
+
let Ue = null;
|
|
961
|
+
class en {
|
|
962
962
|
constructor(t = {}) {
|
|
963
|
-
|
|
963
|
+
Me(this, "baseUrl"), Me(this, "timeout"), Me(this, "token"), this.baseUrl = t.pistonUrl || "/api/piston", this.timeout = t.timeout || 3e3, this.token = t.token;
|
|
964
964
|
}
|
|
965
965
|
authHeaders() {
|
|
966
966
|
const t = { "Content-Type": "application/json" };
|
|
967
967
|
return this.token && (t.authorization = `Bearer ${this.token}`, t["id-token"] = this.token), t;
|
|
968
968
|
}
|
|
969
969
|
async getRuntimes(t = !1) {
|
|
970
|
-
if (
|
|
970
|
+
if (Ue && !t) return Ue;
|
|
971
971
|
try {
|
|
972
|
-
const
|
|
973
|
-
if (!
|
|
974
|
-
const
|
|
975
|
-
return
|
|
976
|
-
} catch (
|
|
977
|
-
throw
|
|
972
|
+
const l = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: this.authHeaders() });
|
|
973
|
+
if (!l.ok) throw new Error(`Failed to fetch runtimes: ${l.statusText}`);
|
|
974
|
+
const p = await l.json();
|
|
975
|
+
return Ue = p, p;
|
|
976
|
+
} catch (l) {
|
|
977
|
+
throw l;
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
|
-
async execute(t,
|
|
980
|
+
async execute(t, l, p = {}) {
|
|
981
981
|
const m = (await this.getRuntimes()).find((y) => {
|
|
982
982
|
var b;
|
|
983
983
|
return y.language.toLowerCase() === t.toLowerCase() || ((b = y.aliases) == null ? void 0 : b.some((k) => k.toLowerCase() === t.toLowerCase()));
|
|
984
984
|
});
|
|
985
985
|
if (!m) throw new Error(`Language '${t}' is not supported`);
|
|
986
|
-
const w = this.getFileName(t), s = { language: m.language, version:
|
|
986
|
+
const w = this.getFileName(t), s = { language: m.language, version: p.version || m.version, files: [{ name: w, content: l }], stdin: p.stdin || "", args: p.args || [], run_timeout: p.runTimeout || this.timeout, compile_timeout: this.timeout }, _ = Date.now();
|
|
987
987
|
try {
|
|
988
988
|
const y = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: this.authHeaders(), body: JSON.stringify(s) });
|
|
989
989
|
if (!y.ok) throw new Error(`Execute failed: ${y.statusText}`);
|
|
@@ -997,7 +997,7 @@ class Qe {
|
|
|
997
997
|
return { javascript: "main.js", typescript: "main.ts", python: "main.py", python3: "main.py", go: "main.go", rust: "main.rs", java: "Main.java", c: "main.c", cpp: "main.cpp", csharp: "Main.cs", ruby: "main.rb", php: "main.php", bash: "main.sh", shell: "main.sh", perl: "main.pl", lua: "main.lua", swift: "main.swift", kotlin: "Main.kt", scala: "Main.scala", haskell: "main.hs", dart: "main.dart", html: "index.html", css: "style.css", sql: "query.sql", markdown: "readme.md" }[t.toLowerCase()] || `main.${t}`;
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
const
|
|
1000
|
+
const nn = { javascript: 'console.log("Hello, World!");', typescript: 'console.log("Hello, World!");', python: 'print("Hello, World!")', python3: 'print("Hello, World!")', go: `package main
|
|
1001
1001
|
|
|
1002
1002
|
import "fmt"
|
|
1003
1003
|
|
|
@@ -1062,80 +1062,86 @@ h1 {
|
|
|
1062
1062
|
color: #333;
|
|
1063
1063
|
}`, sql: "SELECT 'Hello, World!' AS message;", markdown: `# Hello, World!
|
|
1064
1064
|
|
|
1065
|
-
This is a sample markdown document.` }
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
const
|
|
1065
|
+
This is a sample markdown document.` };
|
|
1066
|
+
function Ie(d) {
|
|
1067
|
+
const t = d.toLowerCase().split(":")[0];
|
|
1068
|
+
return nn[t] || `// ${d}
|
|
1069
|
+
// Write your code here`;
|
|
1070
|
+
}
|
|
1071
|
+
const tn = ({ pistonUrl: d = "/api/piston", token: t = "", language: l = "javascript", code: p = "", theme: m = "light", themeColor: w = "", showLanguageSelector: s = !0, showEditor: _ = !0, editable: y = !0, executorLabel: b = "运行", onExecuteStart: k, onExecuteEnd: S, onLanguageChange: L, onLanguageUpdate: E, onCodeUpdate: I, onChange: C }) => {
|
|
1072
|
+
const [r, n] = K([]), [a, o] = K(l || "javascript"), [i, h] = K(p), [u, v] = K(m), [H, z] = K(""), [Q, V] = K(""), [X, be] = K(!1), [fe, ue] = K(null), [D, G] = K("stdout"), [q, Z] = K(null), [ie, ee] = K(!0), [se, ne] = K(60), [J, te] = K(!1), [le, de] = K(!1);
|
|
1073
|
+
xe(() => {
|
|
1074
|
+
l && l !== a && o(l);
|
|
1075
|
+
}, [l]), xe(() => {
|
|
1076
|
+
p !== void 0 && p !== i && (h(p), ye.current = p, ke.current = !1);
|
|
1077
|
+
}, [p]), xe(() => {
|
|
1078
|
+
l && l !== a && (o(l), ye.current = Ie(l));
|
|
1079
|
+
}, [l]);
|
|
1080
|
+
const re = Se(() => new en({ pistonUrl: d, token: t }), [d, t]), he = Se(() => r.map((x) => ({ value: `${x.language}:${x.version}`, label: `${x.language.charAt(0).toUpperCase() + x.language.slice(1)} ${x.version}` })), [r]), ae = Se(() => a.includes(":") ? a.split(":")[0] : a, [a]), Le = Se(() => {
|
|
1073
1081
|
if (!w) return {};
|
|
1074
|
-
const x = m === "dark",
|
|
1075
|
-
const
|
|
1076
|
-
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (
|
|
1077
|
-
},
|
|
1078
|
-
const ve = parseInt(
|
|
1082
|
+
const x = m === "dark", W = (oe, ve) => {
|
|
1083
|
+
const Re = parseInt(oe.replace("#", ""), 16), e = Math.round(2.55 * ve);
|
|
1084
|
+
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (Re >> 16) + e)) + 256 * Math.min(255, Math.max(0, (Re >> 8 & 255) + e)) + Math.min(255, Math.max(0, (255 & Re) + e))).toString(16).slice(1);
|
|
1085
|
+
}, ge = ((oe) => {
|
|
1086
|
+
const ve = parseInt(oe.replace("#", ""), 16);
|
|
1079
1087
|
return (0.299 * (ve >> 16 & 255) + 0.587 * (ve >> 8 & 255) + 0.114 * (255 & ve)) / 255 > 0.5;
|
|
1080
1088
|
})(w) ? "#000" : "#fff";
|
|
1081
|
-
return { "--hep-cr-theme-color": w, "--hep-cr-theme-color-hover":
|
|
1089
|
+
return { "--hep-cr-theme-color": w, "--hep-cr-theme-color-hover": W(w, x ? 20 : -20), "--hep-cr-tab-active-color": ge };
|
|
1082
1090
|
}, [w, m]);
|
|
1083
|
-
|
|
1091
|
+
xe(() => {
|
|
1084
1092
|
(async function() {
|
|
1085
|
-
|
|
1093
|
+
ee(!0), Z(null);
|
|
1086
1094
|
try {
|
|
1087
|
-
const x = await
|
|
1095
|
+
const x = await re.getRuntimes();
|
|
1088
1096
|
n(x);
|
|
1089
1097
|
} catch (x) {
|
|
1090
|
-
|
|
1098
|
+
Z(x instanceof Error ? x.message : "Failed to load runtimes");
|
|
1091
1099
|
} finally {
|
|
1092
|
-
|
|
1100
|
+
ee(!1);
|
|
1093
1101
|
}
|
|
1094
1102
|
})();
|
|
1095
|
-
}, [
|
|
1096
|
-
const
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
}, [
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
if (!V) {
|
|
1107
|
-
ge(!0), J(""), be(""), G(null), q(null), X("stdout"), k == null || k();
|
|
1103
|
+
}, [re]);
|
|
1104
|
+
const ye = Ae(p !== "" ? p : Ie(l || "javascript")), ke = Ae(p !== ""), $e = pe((x) => {
|
|
1105
|
+
const W = x.target.value, ge = ye.current;
|
|
1106
|
+
ke.current && i !== ge || (h(Ie(W)), ye.current = Ie(W)), o(W), ke.current = !1, E == null || E(W);
|
|
1107
|
+
const oe = W.includes(":") ? W.split(":")[0] : W;
|
|
1108
|
+
L == null || L(oe, i, Ie(oe));
|
|
1109
|
+
}, [i, E, L]), Te = pe((x) => {
|
|
1110
|
+
h(x), ke.current = !0, I == null || I(x), C == null || C(x);
|
|
1111
|
+
}, [I, C]), _e = pe(async () => {
|
|
1112
|
+
if (!X) {
|
|
1113
|
+
be(!0), z(""), V(""), ue(null), Z(null), G("stdout"), k == null || k();
|
|
1108
1114
|
try {
|
|
1109
|
-
const x = await
|
|
1110
|
-
|
|
1115
|
+
const x = await re.execute(ae, i);
|
|
1116
|
+
z(x.output), V(x.stderr), ue(x.executionTime || null), G(x.stderr ? "stderr" : "stdout"), S == null || S(x);
|
|
1111
1117
|
} catch (x) {
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1118
|
+
const W = x instanceof Error ? x.message : "Execution failed";
|
|
1119
|
+
Z(W), S == null || S({ success: !1, output: "", stderr: W, code: -1 });
|
|
1114
1120
|
} finally {
|
|
1115
|
-
|
|
1121
|
+
be(!1);
|
|
1116
1122
|
}
|
|
1117
1123
|
}
|
|
1118
|
-
}, [
|
|
1119
|
-
await navigator.clipboard.writeText(
|
|
1120
|
-
|
|
1124
|
+
}, [X, ae, i, re, k, S]), Ce = pe(async () => {
|
|
1125
|
+
await navigator.clipboard.writeText(i), te(!0), setTimeout(() => {
|
|
1126
|
+
te(!1);
|
|
1121
1127
|
}, 2e3);
|
|
1122
|
-
}, [
|
|
1123
|
-
const x =
|
|
1124
|
-
await navigator.clipboard.writeText(x),
|
|
1125
|
-
|
|
1128
|
+
}, [i]), me = pe(async () => {
|
|
1129
|
+
const x = D === "stdout" ? H : Q;
|
|
1130
|
+
await navigator.clipboard.writeText(x), de(!0), setTimeout(() => {
|
|
1131
|
+
de(!1);
|
|
1126
1132
|
}, 2e3);
|
|
1127
|
-
}, [
|
|
1128
|
-
Ee.current = !0, document.addEventListener("mousemove",
|
|
1129
|
-
}, []),
|
|
1133
|
+
}, [D, H, Q]), Ee = Ae(!1), je = pe((x) => {
|
|
1134
|
+
Ee.current = !0, document.addEventListener("mousemove", we), document.addEventListener("mouseup", Ne), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
1135
|
+
}, []), we = pe((x) => {
|
|
1130
1136
|
if (!Ee.current) return;
|
|
1131
|
-
const
|
|
1132
|
-
if (!
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1135
|
-
}, []),
|
|
1136
|
-
Ee.current = !1, document.removeEventListener("mousemove",
|
|
1137
|
-
}, [
|
|
1138
|
-
return
|
|
1137
|
+
const W = document.querySelector(".hep-cr-main");
|
|
1138
|
+
if (!W) return;
|
|
1139
|
+
const ge = W.getBoundingClientRect(), oe = (x.clientX - ge.left) / ge.width * 100;
|
|
1140
|
+
ne(Math.max(20, Math.min(80, oe)));
|
|
1141
|
+
}, []), Ne = pe(() => {
|
|
1142
|
+
Ee.current = !1, document.removeEventListener("mousemove", we), document.removeEventListener("mouseup", Ne), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1143
|
+
}, [we]);
|
|
1144
|
+
return c.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${u}`, style: Le, children: [c.jsxs("div", { className: "hep-cr-header", children: [c.jsx("div", { className: "hep-cr-controls", children: s && c.jsx(c.Fragment, { children: c.jsxs("select", { value: a, onChange: $e, className: "hep-cr-language-select", disabled: X, children: [ie && c.jsx("option", { value: "", children: "加载中..." }), he.map((x) => c.jsx("option", { value: x.value, children: x.label }, x.value))] }) }) }), c.jsxs("div", { className: "hep-cr-actions", children: [c.jsxs("button", { className: "hep-cr-btn hep-cr-btn-run", disabled: X || ie, onClick: _e, children: [X ? c.jsx("span", { className: "hep-cr-spinner" }) : c.jsx("span", { className: "hep-cr-run-icon", children: "▶" }), X ? "运行中..." : b] }), c.jsx("button", { className: "hep-cr-btn hep-cr-btn-theme", onClick: () => v(u === "light" ? "dark" : "light"), title: u === "light" ? "Switch to dark mode" : "Switch to light mode", children: u === "light" ? c.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: c.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }) : c.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [c.jsx("circle", { cx: "12", cy: "12", r: "5" }), c.jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), c.jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), c.jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), c.jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), c.jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), c.jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), c.jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), c.jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })] }) })] })] }), q && c.jsx("div", { className: "hep-cr-error-message", children: q }), c.jsxs("div", { className: "hep-cr-main", children: [_ && c.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${se}%` }, children: [c.jsxs("div", { className: "hep-cr-panel-header", children: [c.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }), c.jsxs("div", { className: "hep-cr-output-actions", children: [c.jsx("span", { className: "hep-cr-language-badge", children: ae }), c.jsx("button", { className: "hep-cr-btn-icon " + (J ? "hep-cr-btn-copied" : ""), disabled: J, onClick: Ce, title: J ? "已复制" : "复制", children: J ? c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : c.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [c.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), c.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }) })] })] }), c.jsx(Je, { value: i, language: ae, theme: u, disabled: !y || X, onChange: Te, onCodeChange: C })] }), _ && c.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: je, children: c.jsx("div", { className: "hep-cr-resize-line" }) }), c.jsxs("div", { className: "hep-cr-output-panel", style: { width: _ ? 100 - se + "%" : "100%" }, children: [c.jsxs("div", { className: "hep-cr-panel-header", children: [c.jsxs("div", { className: "hep-cr-output-tabs", children: [c.jsx("button", { className: "hep-cr-tab " + (D === "stdout" ? "active" : ""), onClick: () => G("stdout"), children: "输出" }), Q && c.jsx("button", { className: "hep-cr-tab hep-cr-tab-error " + (D === "stderr" ? "active" : ""), onClick: () => G("stderr"), children: "错误" })] }), c.jsxs("div", { className: "hep-cr-output-actions", children: [fe !== null && c.jsxs("span", { className: "hep-cr-execution-time", children: [fe, "ms"] }), c.jsx("button", { className: "hep-cr-btn-icon " + (le ? "hep-cr-btn-copied" : ""), disabled: le, onClick: me, title: le ? "已复制" : "复制", children: le ? c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : c.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [c.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), c.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }) })] })] }), c.jsx("div", { className: "hep-cr-output-content", children: c.jsx("pre", { children: D === "stdout" ? X ? "代码执行中..." : H || '点击"运行"执行代码' : Q }) })] })] }), c.jsx("style", { children: `
|
|
1139
1145
|
.hep-cr-runner {
|
|
1140
1146
|
display: flex;
|
|
1141
1147
|
flex-direction: column;
|
|
@@ -1362,19 +1368,19 @@ This is a sample markdown document.` }, nn = ({ pistonUrl: h = "/api/piston", to
|
|
|
1362
1368
|
}
|
|
1363
1369
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
1364
1370
|
` })] });
|
|
1365
|
-
},
|
|
1366
|
-
const [b, k] = K(t), S =
|
|
1367
|
-
|
|
1368
|
-
S &&
|
|
1369
|
-
}, [
|
|
1370
|
-
const
|
|
1371
|
+
}, rn = Ze(({ open: d, defaultOpen: t = !1, title: l = "代码执行器", width: p = 800, onClose: m, footer: w, theme: s = "light", ..._ }, y) => {
|
|
1372
|
+
const [b, k] = K(t), S = d !== void 0, L = S ? d : b;
|
|
1373
|
+
xe(() => {
|
|
1374
|
+
S && d !== b && k(d);
|
|
1375
|
+
}, [d, S]);
|
|
1376
|
+
const E = pe(() => {
|
|
1371
1377
|
S || k(!1), m == null || m();
|
|
1372
1378
|
}, [S, m]);
|
|
1373
|
-
|
|
1374
|
-
const I = typeof
|
|
1375
|
-
return L ?
|
|
1376
|
-
C.target === C.currentTarget &&
|
|
1377
|
-
}, children: [
|
|
1379
|
+
Ke(y, () => ({ close: E }));
|
|
1380
|
+
const I = typeof p == "number" ? `${p}px` : p;
|
|
1381
|
+
return L ? c.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: (C) => {
|
|
1382
|
+
C.target === C.currentTarget && E();
|
|
1383
|
+
}, children: [c.jsxs("div", { className: "hep-cr-dialog-container", style: { width: I }, children: [c.jsxs("div", { className: "hep-cr-dialog-header", children: [c.jsx("h3", { className: "hep-cr-dialog-title", children: l }), c.jsx("button", { className: "hep-cr-dialog-close", onClick: E, children: c.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [c.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), c.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), c.jsx("div", { className: "hep-cr-dialog-body", children: c.jsx(tn, { theme: s, ..._ }) }), w && c.jsx("div", { className: "hep-cr-dialog-footer", children: w })] }), c.jsx("style", { children: `
|
|
1378
1384
|
.hep-cr-dialog-overlay {
|
|
1379
1385
|
position: fixed;
|
|
1380
1386
|
top: 0;
|
|
@@ -1464,9 +1470,9 @@ This is a sample markdown document.` }, nn = ({ pistonUrl: h = "/api/piston", to
|
|
|
1464
1470
|
}
|
|
1465
1471
|
` })] }) : null;
|
|
1466
1472
|
});
|
|
1467
|
-
|
|
1473
|
+
rn.displayName = "CodeRunnerDialog";
|
|
1468
1474
|
export {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1475
|
+
tn as CodeRunner,
|
|
1476
|
+
rn as CodeRunnerDialog,
|
|
1477
|
+
tn as default
|
|
1472
1478
|
};
|