@hep-code-runner/vue2 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +70 -3
- package/dist/index.mjs +553 -1232
- package/package.json +7 -4
package/dist/index.mjs
CHANGED
|
@@ -1,846 +1,439 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
string: {
|
|
17
|
-
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
18
|
-
greedy: !0
|
|
19
|
-
},
|
|
20
|
-
"class-name": {
|
|
21
|
-
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
|
|
22
|
-
lookbehind: !0,
|
|
23
|
-
inside: {
|
|
24
|
-
punctuation: /[.\\]/
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
|
|
28
|
-
boolean: /\b(?:false|true)\b/,
|
|
29
|
-
function: /\b\w+(?=\()/,
|
|
30
|
-
number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
|
31
|
-
operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
|
|
32
|
-
punctuation: /[{}[\];(),.:]/
|
|
33
|
-
};
|
|
34
|
-
Prism.languages.javascript = Prism.languages.extend("clike", {
|
|
35
|
-
"class-name": [
|
|
36
|
-
Prism.languages.clike["class-name"],
|
|
37
|
-
{
|
|
38
|
-
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
|
39
|
-
lookbehind: !0
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
keyword: [
|
|
43
|
-
{
|
|
44
|
-
pattern: /((?:^|\})\s*)catch\b/,
|
|
45
|
-
lookbehind: !0
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
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/,
|
|
49
|
-
lookbehind: !0
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
|
|
53
|
-
function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
|
54
|
-
number: {
|
|
55
|
-
pattern: RegExp(
|
|
56
|
-
/(^|[^\w$])/.source + "(?:" + // constant
|
|
57
|
-
(/NaN|Infinity/.source + "|" + // binary integer
|
|
58
|
-
/0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
|
|
59
|
-
/0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
|
|
60
|
-
/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
|
|
61
|
-
/\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
|
|
62
|
-
/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
|
|
63
|
-
),
|
|
64
|
-
lookbehind: !0
|
|
65
|
-
},
|
|
66
|
-
operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
|
|
67
|
-
});
|
|
68
|
-
Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
|
|
69
|
-
Prism.languages.insertBefore("javascript", "keyword", {
|
|
70
|
-
regex: {
|
|
71
|
-
pattern: RegExp(
|
|
72
|
-
// lookbehind
|
|
73
|
-
// eslint-disable-next-line regexp/no-dupe-characters-character-class
|
|
74
|
-
/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
|
|
75
|
-
// There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
|
|
76
|
-
// classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
|
|
77
|
-
// with the only syntax, so we have to define 2 different regex patterns.
|
|
78
|
-
/\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
|
|
79
|
-
/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
|
|
80
|
-
/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
|
|
81
|
-
),
|
|
82
|
-
lookbehind: !0,
|
|
83
|
-
greedy: !0,
|
|
84
|
-
inside: {
|
|
85
|
-
"regex-source": {
|
|
86
|
-
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
|
|
87
|
-
lookbehind: !0,
|
|
88
|
-
alias: "language-regex",
|
|
89
|
-
inside: Prism.languages.regex
|
|
90
|
-
},
|
|
91
|
-
"regex-delimiter": /^\/|\/$/,
|
|
92
|
-
"regex-flags": /^[a-z]+$/
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
// This must be declared before keyword because we use "function" inside the look-forward
|
|
96
|
-
"function-variable": {
|
|
97
|
-
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*=>))/,
|
|
98
|
-
alias: "function"
|
|
99
|
-
},
|
|
100
|
-
parameter: [
|
|
101
|
-
{
|
|
102
|
-
pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
|
|
103
|
-
lookbehind: !0,
|
|
104
|
-
inside: Prism.languages.javascript
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
|
|
108
|
-
lookbehind: !0,
|
|
109
|
-
inside: Prism.languages.javascript
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
|
|
113
|
-
lookbehind: !0,
|
|
114
|
-
inside: Prism.languages.javascript
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
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*\{)/,
|
|
118
|
-
lookbehind: !0,
|
|
119
|
-
inside: Prism.languages.javascript
|
|
1
|
+
var te = Object.defineProperty, K = (e, t, i) => ((c, p, f) => p in c ? te(c, p, { enumerable: !0, configurable: !0, writable: !0, value: f }) : c[p] = f)(e, typeof t != "symbol" ? t + "" : t, i);
|
|
2
|
+
let B = null;
|
|
3
|
+
class ne {
|
|
4
|
+
constructor(t = {}) {
|
|
5
|
+
K(this, "baseUrl"), K(this, "timeout"), this.baseUrl = t.pistonUrl || "/api/piston", this.timeout = t.timeout || 3e3;
|
|
6
|
+
}
|
|
7
|
+
async getRuntimes(t = !1) {
|
|
8
|
+
if (B && !t) return B;
|
|
9
|
+
try {
|
|
10
|
+
const i = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: { "Content-Type": "application/json" } });
|
|
11
|
+
if (!i.ok) throw new Error(`Failed to fetch runtimes: ${i.statusText}`);
|
|
12
|
+
const c = await i.json();
|
|
13
|
+
return B = c, c;
|
|
14
|
+
} catch (i) {
|
|
15
|
+
throw i;
|
|
120
16
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
alias: "string"
|
|
137
|
-
},
|
|
138
|
-
interpolation: {
|
|
139
|
-
pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
140
|
-
lookbehind: !0,
|
|
141
|
-
inside: {
|
|
142
|
-
"interpolation-punctuation": {
|
|
143
|
-
pattern: /^\$\{|\}$/,
|
|
144
|
-
alias: "punctuation"
|
|
145
|
-
},
|
|
146
|
-
rest: Prism.languages.javascript
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
string: /[\s\S]+/
|
|
17
|
+
}
|
|
18
|
+
async execute(t, i, c = {}) {
|
|
19
|
+
const p = (await this.getRuntimes()).find((h) => {
|
|
20
|
+
var m;
|
|
21
|
+
return h.language.toLowerCase() === t.toLowerCase() || ((m = h.aliases) == null ? void 0 : m.some((k) => k.toLowerCase() === t.toLowerCase()));
|
|
22
|
+
});
|
|
23
|
+
if (!p) throw new Error(`Language '${t}' is not supported`);
|
|
24
|
+
const f = this.getFileName(t), l = { language: p.language, version: c.version || p.version, files: [{ name: f, content: i }], stdin: c.stdin || "", args: c.args || [], run_timeout: c.runTimeout || this.timeout, compile_timeout: this.timeout }, b = Date.now();
|
|
25
|
+
try {
|
|
26
|
+
const h = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(l) });
|
|
27
|
+
if (!h.ok) throw new Error(`Execute failed: ${h.statusText}`);
|
|
28
|
+
const m = await h.json(), k = Date.now() - b, S = m.run.stdout || "", T = m.run.stderr || "";
|
|
29
|
+
return { success: m.run.code === 0, output: S, stderr: T, code: m.run.code, executionTime: k, compile: m.compile ? { stdout: m.compile.stdout || "", stderr: m.compile.stderr || "", code: m.compile.code } : void 0 };
|
|
30
|
+
} catch (h) {
|
|
31
|
+
return { success: !1, output: "", stderr: h instanceof Error ? h.message : "Unknown error", code: -1, executionTime: Date.now() - b };
|
|
150
32
|
}
|
|
151
|
-
},
|
|
152
|
-
"string-property": {
|
|
153
|
-
pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
|
154
|
-
lookbehind: !0,
|
|
155
|
-
greedy: !0,
|
|
156
|
-
alias: "property"
|
|
157
33
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
"literal-property": {
|
|
161
|
-
pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
|
162
|
-
lookbehind: !0,
|
|
163
|
-
alias: "property"
|
|
34
|
+
getFileName(t) {
|
|
35
|
+
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}`;
|
|
164
36
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
"string-interpolation": {
|
|
178
|
-
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
|
|
179
|
-
greedy: !0,
|
|
180
|
-
inside: {
|
|
181
|
-
interpolation: {
|
|
182
|
-
// "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
|
|
183
|
-
pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
|
|
184
|
-
lookbehind: !0,
|
|
185
|
-
inside: {
|
|
186
|
-
"format-spec": {
|
|
187
|
-
pattern: /(:)[^:(){}]+(?=\}$)/,
|
|
188
|
-
lookbehind: !0
|
|
189
|
-
},
|
|
190
|
-
"conversion-option": {
|
|
191
|
-
pattern: //,
|
|
192
|
-
alias: "punctuation"
|
|
193
|
-
},
|
|
194
|
-
rest: null
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
string: /[\s\S]+/
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
"triple-quoted-string": {
|
|
201
|
-
pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
|
|
202
|
-
greedy: !0,
|
|
203
|
-
alias: "string"
|
|
204
|
-
},
|
|
205
|
-
string: {
|
|
206
|
-
pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
|
|
207
|
-
greedy: !0
|
|
208
|
-
},
|
|
209
|
-
function: {
|
|
210
|
-
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
|
|
211
|
-
lookbehind: !0
|
|
212
|
-
},
|
|
213
|
-
"class-name": {
|
|
214
|
-
pattern: /(\bclass\s+)\w+/i,
|
|
215
|
-
lookbehind: !0
|
|
216
|
-
},
|
|
217
|
-
decorator: {
|
|
218
|
-
pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
|
|
219
|
-
lookbehind: !0,
|
|
220
|
-
alias: ["annotation", "punctuation"],
|
|
221
|
-
inside: {
|
|
222
|
-
punctuation: /\./
|
|
37
|
+
}
|
|
38
|
+
const ae = { javascript: 'console.log("Hello, World!");', typescript: 'console.log("Hello, World!");', python: 'print("Hello, World!")', python3: 'print("Hello, World!")', go: `package main
|
|
39
|
+
|
|
40
|
+
import "fmt"
|
|
41
|
+
|
|
42
|
+
func main() {
|
|
43
|
+
fmt.Println("Hello, World!")
|
|
44
|
+
}`, rust: `fn main() {
|
|
45
|
+
println!("Hello, World!");
|
|
46
|
+
}`, java: `public class Main {
|
|
47
|
+
public static void main(String[] args) {
|
|
48
|
+
System.out.println("Hello, World!");
|
|
223
49
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
},
|
|
240
|
-
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/,
|
|
241
|
-
boolean: /\b(?:_|false|iota|nil|true)\b/,
|
|
242
|
-
number: [
|
|
243
|
-
// binary and octal integers
|
|
244
|
-
/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,
|
|
245
|
-
// hexadecimal integers and floats
|
|
246
|
-
/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
|
|
247
|
-
// decimal integers and floats
|
|
248
|
-
/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i
|
|
249
|
-
],
|
|
250
|
-
operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
|
|
251
|
-
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/
|
|
252
|
-
});
|
|
253
|
-
Prism.languages.insertBefore("go", "string", {
|
|
254
|
-
char: {
|
|
255
|
-
pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/,
|
|
256
|
-
greedy: !0
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
delete Prism.languages.go["class-name"];
|
|
260
|
-
(function(t) {
|
|
261
|
-
var e = /\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/, r = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, n = {
|
|
262
|
-
pattern: RegExp(/(^|[^\w.])/.source + r + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
263
|
-
lookbehind: !0,
|
|
264
|
-
inside: {
|
|
265
|
-
namespace: {
|
|
266
|
-
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
|
267
|
-
inside: {
|
|
268
|
-
punctuation: /\./
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
punctuation: /\./
|
|
50
|
+
}`, c: `#include <stdio.h>
|
|
51
|
+
|
|
52
|
+
int main() {
|
|
53
|
+
printf("Hello, World!\\n");
|
|
54
|
+
return 0;
|
|
55
|
+
}`, cpp: `#include <iostream>
|
|
56
|
+
|
|
57
|
+
int main() {
|
|
58
|
+
std::cout << "Hello, World!" << std::endl;
|
|
59
|
+
return 0;
|
|
60
|
+
}`, csharp: `using System;
|
|
61
|
+
|
|
62
|
+
class Main {
|
|
63
|
+
static void Main() {
|
|
64
|
+
Console.WriteLine("Hello, World!");
|
|
272
65
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
66
|
+
}`, ruby: 'puts "Hello, World!"', php: `<?php
|
|
67
|
+
echo "Hello, World!";
|
|
68
|
+
?>`, bash: 'echo "Hello, World!"', shell: 'echo "Hello, World!"', perl: 'print "Hello, World!\\n";', lua: 'print("Hello, World!")', r: 'print("Hello, World!")', swift: 'print("Hello, World!")', kotlin: `fun main() {
|
|
69
|
+
println("Hello, World!")
|
|
70
|
+
}`, scala: `object Main extends App {
|
|
71
|
+
println("Hello, World!")
|
|
72
|
+
}`, haskell: 'main = putStrLn "Hello, World!"', elixir: 'IO.puts "Hello, World!"', erlang: 'main() -> io:fwrite("Hello, World!~n").', clojure: '(println "Hello, World!")', fsharp: 'printfn "Hello, World!"', dart: `void main() {
|
|
73
|
+
print("Hello, World!");
|
|
74
|
+
}`, assembly: `section .data
|
|
75
|
+
msg db 'Hello, World!', 0
|
|
76
|
+
section .text
|
|
77
|
+
global _start
|
|
78
|
+
_start:
|
|
79
|
+
mov rax, 1
|
|
80
|
+
mov rdi, 1
|
|
81
|
+
mov rsi, msg
|
|
82
|
+
mov rdx, 13
|
|
83
|
+
syscall
|
|
84
|
+
mov rax, 60
|
|
85
|
+
xor rdi, rdi
|
|
86
|
+
syscall`, html: `<!DOCTYPE html>
|
|
87
|
+
<html>
|
|
88
|
+
<head>
|
|
89
|
+
<title>Hello</title>
|
|
90
|
+
</head>
|
|
91
|
+
<body>
|
|
92
|
+
<h1>Hello, World!</h1>
|
|
93
|
+
</body>
|
|
94
|
+
</html>`, css: `body {
|
|
95
|
+
background-color: #f0f0f0;
|
|
96
|
+
font-family: Arial, sans-serif;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
h1 {
|
|
100
|
+
color: #333;
|
|
101
|
+
}`, sql: "SELECT 'Hello, World!' AS message;", markdown: `# Hello, World!
|
|
102
|
+
|
|
103
|
+
This is a sample markdown document.` };
|
|
104
|
+
function j(e) {
|
|
105
|
+
const t = e.toLowerCase();
|
|
106
|
+
return ae[t] || `// ${e}
|
|
107
|
+
// Write your code here`;
|
|
108
|
+
}
|
|
109
|
+
var V = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
110
|
+
function re(e) {
|
|
111
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
112
|
+
}
|
|
113
|
+
var q = { exports: {} };
|
|
114
|
+
(function(e) {
|
|
115
|
+
var t = function(i) {
|
|
116
|
+
var c = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, p = 0, f = {}, l = { manual: i.Prism && i.Prism.manual, disableWorkerMessageHandler: i.Prism && i.Prism.disableWorkerMessageHandler, util: { encode: function a(n) {
|
|
117
|
+
return n instanceof b ? new b(n.type, a(n.content), n.alias) : Array.isArray(n) ? n.map(a) : n.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
118
|
+
}, type: function(a) {
|
|
119
|
+
return Object.prototype.toString.call(a).slice(8, -1);
|
|
120
|
+
}, objId: function(a) {
|
|
121
|
+
return a.__id || Object.defineProperty(a, "__id", { value: ++p }), a.__id;
|
|
122
|
+
}, clone: function a(n, r) {
|
|
123
|
+
var s, o;
|
|
124
|
+
switch (r = r || {}, l.util.type(n)) {
|
|
125
|
+
case "Object":
|
|
126
|
+
if (o = l.util.objId(n), r[o]) return r[o];
|
|
127
|
+
for (var d in s = {}, r[o] = s, n) n.hasOwnProperty(d) && (s[d] = a(n[d], r));
|
|
128
|
+
return s;
|
|
129
|
+
case "Array":
|
|
130
|
+
return o = l.util.objId(n), r[o] ? r[o] : (s = [], r[o] = s, n.forEach(function(u, g) {
|
|
131
|
+
s[g] = a(u, r);
|
|
132
|
+
}), s);
|
|
133
|
+
default:
|
|
134
|
+
return n;
|
|
303
135
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
311
|
-
}), t.languages.insertBefore("java", "string", {
|
|
312
|
-
"triple-quoted-string": {
|
|
313
|
-
// http://openjdk.java.net/jeps/355#Description
|
|
314
|
-
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
315
|
-
greedy: !0,
|
|
316
|
-
alias: "string"
|
|
317
|
-
},
|
|
318
|
-
char: {
|
|
319
|
-
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
|
320
|
-
greedy: !0
|
|
321
|
-
}
|
|
322
|
-
}), t.languages.insertBefore("java", "class-name", {
|
|
323
|
-
annotation: {
|
|
324
|
-
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
325
|
-
lookbehind: !0,
|
|
326
|
-
alias: "punctuation"
|
|
327
|
-
},
|
|
328
|
-
generics: {
|
|
329
|
-
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
330
|
-
inside: {
|
|
331
|
-
"class-name": n,
|
|
332
|
-
keyword: e,
|
|
333
|
-
punctuation: /[<>(),.:]/,
|
|
334
|
-
operator: /[?&|]/
|
|
136
|
+
}, getLanguage: function(a) {
|
|
137
|
+
for (; a; ) {
|
|
138
|
+
var n = c.exec(a.className);
|
|
139
|
+
if (n) return n[1].toLowerCase();
|
|
140
|
+
a = a.parentElement;
|
|
335
141
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
pattern: RegExp(/(\bimport\s+static\s+)/.source + r + /(?:\w+|\*)(?=\s*;)/.source),
|
|
350
|
-
lookbehind: !0,
|
|
351
|
-
alias: "static",
|
|
352
|
-
inside: {
|
|
353
|
-
namespace: n.inside.namespace,
|
|
354
|
-
static: /\b\w+$/,
|
|
355
|
-
punctuation: /\./,
|
|
356
|
-
operator: /\*/,
|
|
357
|
-
"class-name": /\w+/
|
|
142
|
+
return "none";
|
|
143
|
+
}, setLanguage: function(a, n) {
|
|
144
|
+
a.className = a.className.replace(RegExp(c, "gi"), ""), a.classList.add("language-" + n);
|
|
145
|
+
}, currentScript: function() {
|
|
146
|
+
if (typeof document > "u") return null;
|
|
147
|
+
if (document.currentScript && document.currentScript.tagName === "SCRIPT") return document.currentScript;
|
|
148
|
+
try {
|
|
149
|
+
throw new Error();
|
|
150
|
+
} catch (s) {
|
|
151
|
+
var a = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack) || [])[1];
|
|
152
|
+
if (a) {
|
|
153
|
+
var n = document.getElementsByTagName("script");
|
|
154
|
+
for (var r in n) if (n[r].src == a) return n[r];
|
|
358
155
|
}
|
|
156
|
+
return null;
|
|
359
157
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
),
|
|
367
|
-
lookbehind: !0,
|
|
368
|
-
inside: {
|
|
369
|
-
punctuation: /\./
|
|
158
|
+
}, isActive: function(a, n, r) {
|
|
159
|
+
for (var s = "no-" + n; a; ) {
|
|
160
|
+
var o = a.classList;
|
|
161
|
+
if (o.contains(n)) return !0;
|
|
162
|
+
if (o.contains(s)) return !1;
|
|
163
|
+
a = a.parentElement;
|
|
370
164
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
382
|
-
greedy: !0
|
|
383
|
-
},
|
|
384
|
-
"class-name": {
|
|
385
|
-
pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
|
|
386
|
-
lookbehind: !0
|
|
387
|
-
},
|
|
388
|
-
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/,
|
|
389
|
-
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
390
|
-
number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
|
|
391
|
-
operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
|
|
392
|
-
});
|
|
393
|
-
Prism.languages.insertBefore("c", "string", {
|
|
394
|
-
char: {
|
|
395
|
-
// https://en.cppreference.com/w/c/language/character_constant
|
|
396
|
-
pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
|
|
397
|
-
greedy: !0
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
Prism.languages.insertBefore("c", "string", {
|
|
401
|
-
macro: {
|
|
402
|
-
// allow for multiline macro definitions
|
|
403
|
-
// spaces after the # character compile fine with gcc
|
|
404
|
-
pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
|
|
405
|
-
lookbehind: !0,
|
|
406
|
-
greedy: !0,
|
|
407
|
-
alias: "property",
|
|
408
|
-
inside: {
|
|
409
|
-
string: [
|
|
410
|
-
{
|
|
411
|
-
// highlight the path of the include statement as a string
|
|
412
|
-
pattern: /^(#\s*include\s*)<[^>]+>/,
|
|
413
|
-
lookbehind: !0
|
|
414
|
-
},
|
|
415
|
-
Prism.languages.c.string
|
|
416
|
-
],
|
|
417
|
-
char: Prism.languages.c.char,
|
|
418
|
-
comment: Prism.languages.c.comment,
|
|
419
|
-
"macro-name": [
|
|
420
|
-
{
|
|
421
|
-
pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
|
|
422
|
-
lookbehind: !0
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
|
|
426
|
-
lookbehind: !0,
|
|
427
|
-
alias: "function"
|
|
428
|
-
}
|
|
429
|
-
],
|
|
430
|
-
// highlight macro directives as keywords
|
|
431
|
-
directive: {
|
|
432
|
-
pattern: /^(#\s*)[a-z]+/,
|
|
433
|
-
lookbehind: !0,
|
|
434
|
-
alias: "keyword"
|
|
435
|
-
},
|
|
436
|
-
"directive-hash": /^#/,
|
|
437
|
-
punctuation: /##|\\(?=[\r\n])/,
|
|
438
|
-
expression: {
|
|
439
|
-
pattern: /\S[\s\S]*/,
|
|
440
|
-
inside: Prism.languages.c
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
Prism.languages.insertBefore("c", "function", {
|
|
446
|
-
// highlight predefined macros as constants
|
|
447
|
-
constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
|
|
448
|
-
});
|
|
449
|
-
delete Prism.languages.c.boolean;
|
|
450
|
-
(function(t) {
|
|
451
|
-
for (var e = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, r = 0; r < 2; r++)
|
|
452
|
-
e = e.replace(/<self>/g, function() {
|
|
453
|
-
return e;
|
|
454
|
-
});
|
|
455
|
-
e = e.replace(/<self>/g, function() {
|
|
456
|
-
return /[^\s\S]/.source;
|
|
457
|
-
}), t.languages.rust = {
|
|
458
|
-
comment: [
|
|
459
|
-
{
|
|
460
|
-
pattern: RegExp(/(^|[^\\])/.source + e),
|
|
461
|
-
lookbehind: !0,
|
|
462
|
-
greedy: !0
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
pattern: /(^|[^\\:])\/\/.*/,
|
|
466
|
-
lookbehind: !0,
|
|
467
|
-
greedy: !0
|
|
165
|
+
return !!r;
|
|
166
|
+
} }, languages: { plain: f, plaintext: f, text: f, txt: f, extend: function(a, n) {
|
|
167
|
+
var r = l.util.clone(l.languages[a]);
|
|
168
|
+
for (var s in n) r[s] = n[s];
|
|
169
|
+
return r;
|
|
170
|
+
}, insertBefore: function(a, n, r, s) {
|
|
171
|
+
var o = (s = s || l.languages)[a], d = {};
|
|
172
|
+
for (var u in o) if (o.hasOwnProperty(u)) {
|
|
173
|
+
if (u == n) for (var g in r) r.hasOwnProperty(g) && (d[g] = r[g]);
|
|
174
|
+
r.hasOwnProperty(u) || (d[u] = o[u]);
|
|
468
175
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
greedy: !0,
|
|
481
|
-
alias: "attr-name",
|
|
482
|
-
inside: {
|
|
483
|
-
string: null
|
|
484
|
-
// see below
|
|
176
|
+
var E = s[a];
|
|
177
|
+
return s[a] = d, l.languages.DFS(l.languages, function(y, O) {
|
|
178
|
+
O === E && y != a && (this[y] = d);
|
|
179
|
+
}), d;
|
|
180
|
+
}, DFS: function a(n, r, s, o) {
|
|
181
|
+
o = o || {};
|
|
182
|
+
var d = l.util.objId;
|
|
183
|
+
for (var u in n) if (n.hasOwnProperty(u)) {
|
|
184
|
+
r.call(n, u, n[u], s || u);
|
|
185
|
+
var g = n[u], E = l.util.type(g);
|
|
186
|
+
E !== "Object" || o[d(g)] ? E !== "Array" || o[d(g)] || (o[d(g)] = !0, a(g, r, u, o)) : (o[d(g)] = !0, a(g, r, null, o));
|
|
485
187
|
}
|
|
486
|
-
},
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
188
|
+
} }, plugins: {}, highlightAll: function(a, n) {
|
|
189
|
+
l.highlightAllUnder(document, a, n);
|
|
190
|
+
}, highlightAllUnder: function(a, n, r) {
|
|
191
|
+
var s = { callback: r, container: a, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
|
|
192
|
+
l.hooks.run("before-highlightall", s), s.elements = Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)), l.hooks.run("before-all-elements-highlight", s);
|
|
193
|
+
for (var o, d = 0; o = s.elements[d++]; ) l.highlightElement(o, n === !0, s.callback);
|
|
194
|
+
}, highlightElement: function(a, n, r) {
|
|
195
|
+
var s = l.util.getLanguage(a), o = l.languages[s];
|
|
196
|
+
l.util.setLanguage(a, s);
|
|
197
|
+
var d = a.parentElement;
|
|
198
|
+
d && d.nodeName.toLowerCase() === "pre" && l.util.setLanguage(d, s);
|
|
199
|
+
var u = { element: a, language: s, grammar: o, code: a.textContent };
|
|
200
|
+
function g(y) {
|
|
201
|
+
u.highlightedCode = y, l.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, l.hooks.run("after-highlight", u), l.hooks.run("complete", u), r && r.call(u.element);
|
|
499
202
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
|
|
518
|
-
lookbehind: !0,
|
|
519
|
-
alias: "class-name"
|
|
520
|
-
},
|
|
521
|
-
"module-declaration": [
|
|
522
|
-
{
|
|
523
|
-
pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
|
|
524
|
-
lookbehind: !0,
|
|
525
|
-
alias: "namespace"
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
|
|
529
|
-
lookbehind: !0,
|
|
530
|
-
alias: "namespace",
|
|
531
|
-
inside: {
|
|
532
|
-
punctuation: /::/
|
|
533
|
-
}
|
|
203
|
+
if (l.hooks.run("before-sanity-check", u), (d = u.element.parentElement) && d.nodeName.toLowerCase() === "pre" && !d.hasAttribute("tabindex") && d.setAttribute("tabindex", "0"), !u.code) return l.hooks.run("complete", u), void (r && r.call(u.element));
|
|
204
|
+
if (l.hooks.run("before-highlight", u), u.grammar) if (n && i.Worker) {
|
|
205
|
+
var E = new Worker(l.filename);
|
|
206
|
+
E.onmessage = function(y) {
|
|
207
|
+
g(y.data);
|
|
208
|
+
}, E.postMessage(JSON.stringify({ language: u.language, code: u.code, immediateClose: !0 }));
|
|
209
|
+
} else g(l.highlight(u.code, u.grammar, u.language));
|
|
210
|
+
else g(l.util.encode(u.code));
|
|
211
|
+
}, highlight: function(a, n, r) {
|
|
212
|
+
var s = { code: a, grammar: n, language: r };
|
|
213
|
+
if (l.hooks.run("before-tokenize", s), !s.grammar) throw new Error('The language "' + s.language + '" has no grammar.');
|
|
214
|
+
return s.tokens = l.tokenize(s.code, s.grammar), l.hooks.run("after-tokenize", s), b.stringify(l.util.encode(s.tokens), s.language);
|
|
215
|
+
}, tokenize: function(a, n) {
|
|
216
|
+
var r = n.rest;
|
|
217
|
+
if (r) {
|
|
218
|
+
for (var s in r) n[s] = r[s];
|
|
219
|
+
delete n.rest;
|
|
534
220
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
punctuation: /::/
|
|
221
|
+
var o = new k();
|
|
222
|
+
return S(o, o.head, a), m(a, o, n, o.head, 0), function(d) {
|
|
223
|
+
for (var u = [], g = d.head.next; g !== d.tail; ) u.push(g.value), g = g.next;
|
|
224
|
+
return u;
|
|
225
|
+
}(o);
|
|
226
|
+
}, hooks: { all: {}, add: function(a, n) {
|
|
227
|
+
var r = l.hooks.all;
|
|
228
|
+
r[a] = r[a] || [], r[a].push(n);
|
|
229
|
+
}, run: function(a, n) {
|
|
230
|
+
var r = l.hooks.all[a];
|
|
231
|
+
if (r && r.length) for (var s, o = 0; s = r[o++]; ) s(n);
|
|
232
|
+
} }, Token: b };
|
|
233
|
+
function b(a, n, r, s) {
|
|
234
|
+
this.type = a, this.content = n, this.alias = r, this.length = 0 | (s || "").length;
|
|
235
|
+
}
|
|
236
|
+
function h(a, n, r, s) {
|
|
237
|
+
a.lastIndex = n;
|
|
238
|
+
var o = a.exec(r);
|
|
239
|
+
if (o && s && o[1]) {
|
|
240
|
+
var d = o[1].length;
|
|
241
|
+
o.index += d, o[0] = o[0].slice(d);
|
|
557
242
|
}
|
|
558
|
-
|
|
559
|
-
// Hex, oct, bin, dec numbers with visual separators and type suffix
|
|
560
|
-
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/,
|
|
561
|
-
boolean: /\b(?:false|true)\b/,
|
|
562
|
-
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
563
|
-
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
564
|
-
}, t.languages.rust["closure-params"].inside.rest = t.languages.rust, t.languages.rust.attribute.inside.string = t.languages.rust.string;
|
|
565
|
-
})(Prism);
|
|
566
|
-
Prism.languages.sql = {
|
|
567
|
-
comment: {
|
|
568
|
-
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
|
|
569
|
-
lookbehind: !0
|
|
570
|
-
},
|
|
571
|
-
variable: [
|
|
572
|
-
{
|
|
573
|
-
pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
|
|
574
|
-
greedy: !0
|
|
575
|
-
},
|
|
576
|
-
/@[\w.$]+/
|
|
577
|
-
],
|
|
578
|
-
string: {
|
|
579
|
-
pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
|
|
580
|
-
greedy: !0,
|
|
581
|
-
lookbehind: !0
|
|
582
|
-
},
|
|
583
|
-
identifier: {
|
|
584
|
-
pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
|
|
585
|
-
greedy: !0,
|
|
586
|
-
lookbehind: !0,
|
|
587
|
-
inside: {
|
|
588
|
-
punctuation: /^`|`$/
|
|
243
|
+
return o;
|
|
589
244
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
(
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
lookbehind: !0
|
|
624
|
-
},
|
|
625
|
-
/^\$\(\(/
|
|
626
|
-
],
|
|
627
|
-
number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
|
|
628
|
-
// Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
|
|
629
|
-
operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
|
|
630
|
-
// If there is no $ sign at the beginning highlight (( and )) as punctuation
|
|
631
|
-
punctuation: /\(\(?|\)\)?|,|;/
|
|
632
|
-
}
|
|
633
|
-
},
|
|
634
|
-
// [1]: Command Substitution
|
|
635
|
-
{
|
|
636
|
-
pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
|
|
637
|
-
greedy: !0,
|
|
638
|
-
inside: {
|
|
639
|
-
variable: /^\$\(|^`|\)$|`$/
|
|
640
|
-
}
|
|
641
|
-
},
|
|
642
|
-
// [2]: Brace expansion
|
|
643
|
-
{
|
|
644
|
-
pattern: /\$\{[^}]+\}/,
|
|
645
|
-
greedy: !0,
|
|
646
|
-
inside: {
|
|
647
|
-
operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
|
|
648
|
-
punctuation: /[\[\]]/,
|
|
649
|
-
environment: {
|
|
650
|
-
pattern: RegExp("(\\{)" + e),
|
|
651
|
-
lookbehind: !0,
|
|
652
|
-
alias: "constant"
|
|
245
|
+
function m(a, n, r, s, o, d) {
|
|
246
|
+
for (var u in r) if (r.hasOwnProperty(u) && r[u]) {
|
|
247
|
+
var g = r[u];
|
|
248
|
+
g = Array.isArray(g) ? g : [g];
|
|
249
|
+
for (var E = 0; E < g.length; ++E) {
|
|
250
|
+
if (d && d.cause == u + "," + E) return;
|
|
251
|
+
var y = g[E], O = y.inside, W = !!y.lookbehind, Y = !!y.greedy, J = y.alias;
|
|
252
|
+
if (Y && !y.pattern.global) {
|
|
253
|
+
var Q = y.pattern.toString().match(/[imsuy]*$/)[0];
|
|
254
|
+
y.pattern = RegExp(y.pattern.source, Q + "g");
|
|
255
|
+
}
|
|
256
|
+
for (var X = y.pattern || y, v = s.next, w = o; v !== n.tail && !(d && w >= d.reach); w += v.value.length, v = v.next) {
|
|
257
|
+
var F = v.value;
|
|
258
|
+
if (n.length > a.length) return;
|
|
259
|
+
if (!(F instanceof b)) {
|
|
260
|
+
var x, L = 1;
|
|
261
|
+
if (Y) {
|
|
262
|
+
if (!(x = h(X, w, a, W)) || x.index >= a.length) break;
|
|
263
|
+
var N = x.index, ee = x.index + x[0].length, I = w;
|
|
264
|
+
for (I += v.value.length; N >= I; ) I += (v = v.next).value.length;
|
|
265
|
+
if (w = I -= v.value.length, v.value instanceof b) continue;
|
|
266
|
+
for (var C = v; C !== n.tail && (I < ee || typeof C.value == "string"); C = C.next) L++, I += C.value.length;
|
|
267
|
+
L--, F = a.slice(w, I), x.index -= w;
|
|
268
|
+
} else if (!(x = h(X, 0, F, W))) continue;
|
|
269
|
+
N = x.index;
|
|
270
|
+
var P = x[0], M = F.slice(0, N), Z = F.slice(N + P.length), U = w + F.length;
|
|
271
|
+
d && U > d.reach && (d.reach = U);
|
|
272
|
+
var D = v.prev;
|
|
273
|
+
if (M && (D = S(n, D, M), w += M.length), T(n, D, L), v = S(n, D, new b(u, O ? l.tokenize(P, O) : P, J, P)), Z && S(n, v, Z), L > 1) {
|
|
274
|
+
var H = { cause: u + "," + E, reach: U };
|
|
275
|
+
m(a, n, r, v.prev, w, H), d && H.reach > d.reach && (d.reach = H.reach);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
653
278
|
}
|
|
654
279
|
}
|
|
655
|
-
},
|
|
656
|
-
/\$(?:\w+|[#?*!@$])/
|
|
657
|
-
],
|
|
658
|
-
// Escape sequences from echo and printf's manuals, and escaped quotes.
|
|
659
|
-
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})/
|
|
660
|
-
};
|
|
661
|
-
t.languages.bash = {
|
|
662
|
-
shebang: {
|
|
663
|
-
pattern: /^#!\s*\/.*/,
|
|
664
|
-
alias: "important"
|
|
665
|
-
},
|
|
666
|
-
comment: {
|
|
667
|
-
pattern: /(^|[^"{\\$])#.*/,
|
|
668
|
-
lookbehind: !0
|
|
669
|
-
},
|
|
670
|
-
"function-name": [
|
|
671
|
-
// a) function foo {
|
|
672
|
-
// b) foo() {
|
|
673
|
-
// c) function foo() {
|
|
674
|
-
// but not “foo {”
|
|
675
|
-
{
|
|
676
|
-
// a) and c)
|
|
677
|
-
pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
|
|
678
|
-
lookbehind: !0,
|
|
679
|
-
alias: "function"
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
// b)
|
|
683
|
-
pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
|
|
684
|
-
alias: "function"
|
|
685
280
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
},
|
|
707
|
-
// Highlight parameter names as variables
|
|
708
|
-
parameter: {
|
|
709
|
-
pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
|
|
710
|
-
alias: "variable",
|
|
711
|
-
lookbehind: !0
|
|
712
|
-
},
|
|
713
|
-
string: [
|
|
714
|
-
// Support for Here-documents https://en.wikipedia.org/wiki/Here_document
|
|
715
|
-
{
|
|
716
|
-
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
717
|
-
lookbehind: !0,
|
|
718
|
-
greedy: !0,
|
|
719
|
-
inside: n
|
|
720
|
-
},
|
|
721
|
-
// Here-document with quotes around the tag
|
|
722
|
-
// → No expansion (so no “inside”).
|
|
723
|
-
{
|
|
724
|
-
pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
|
|
725
|
-
lookbehind: !0,
|
|
726
|
-
greedy: !0,
|
|
727
|
-
inside: {
|
|
728
|
-
bash: r
|
|
729
|
-
}
|
|
730
|
-
},
|
|
731
|
-
// “Normal” string
|
|
732
|
-
{
|
|
733
|
-
// https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
|
|
734
|
-
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
735
|
-
lookbehind: !0,
|
|
736
|
-
greedy: !0,
|
|
737
|
-
inside: n
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
|
|
741
|
-
pattern: /(^|[^$\\])'[^']*'/,
|
|
742
|
-
lookbehind: !0,
|
|
743
|
-
greedy: !0
|
|
744
|
-
},
|
|
745
|
-
{
|
|
746
|
-
// https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
|
|
747
|
-
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
748
|
-
greedy: !0,
|
|
749
|
-
inside: {
|
|
750
|
-
entity: n.entity
|
|
751
|
-
}
|
|
281
|
+
}
|
|
282
|
+
function k() {
|
|
283
|
+
var a = { value: null, prev: null, next: null }, n = { value: null, prev: a, next: null };
|
|
284
|
+
a.next = n, this.head = a, this.tail = n, this.length = 0;
|
|
285
|
+
}
|
|
286
|
+
function S(a, n, r) {
|
|
287
|
+
var s = n.next, o = { value: r, prev: n, next: s };
|
|
288
|
+
return n.next = o, s.prev = o, a.length++, o;
|
|
289
|
+
}
|
|
290
|
+
function T(a, n, r) {
|
|
291
|
+
for (var s = n.next, o = 0; o < r && s !== a.tail; o++) s = s.next;
|
|
292
|
+
n.next = s, s.prev = n, a.length -= o;
|
|
293
|
+
}
|
|
294
|
+
if (i.Prism = l, b.stringify = function a(n, r) {
|
|
295
|
+
if (typeof n == "string") return n;
|
|
296
|
+
if (Array.isArray(n)) {
|
|
297
|
+
var s = "";
|
|
298
|
+
return n.forEach(function(E) {
|
|
299
|
+
s += a(E, r);
|
|
300
|
+
}), s;
|
|
752
301
|
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
}
|
|
778
|
-
"
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
302
|
+
var o = { type: n.type, content: a(n.content, r), tag: "span", classes: ["token", n.type], attributes: {}, language: r }, d = n.alias;
|
|
303
|
+
d && (Array.isArray(d) ? Array.prototype.push.apply(o.classes, d) : o.classes.push(d)), l.hooks.run("wrap", o);
|
|
304
|
+
var u = "";
|
|
305
|
+
for (var g in o.attributes) u += " " + g + '="' + (o.attributes[g] || "").replace(/"/g, """) + '"';
|
|
306
|
+
return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + u + ">" + o.content + "</" + o.tag + ">";
|
|
307
|
+
}, !i.document) return i.addEventListener && (l.disableWorkerMessageHandler || i.addEventListener("message", function(a) {
|
|
308
|
+
var n = JSON.parse(a.data), r = n.language, s = n.code, o = n.immediateClose;
|
|
309
|
+
i.postMessage(l.highlight(s, l.languages[r], r)), o && i.close();
|
|
310
|
+
}, !1)), l;
|
|
311
|
+
var _ = l.util.currentScript();
|
|
312
|
+
function R() {
|
|
313
|
+
l.manual || l.highlightAll();
|
|
314
|
+
}
|
|
315
|
+
if (_ && (l.filename = _.src, _.hasAttribute("data-manual") && (l.manual = !0)), !l.manual) {
|
|
316
|
+
var A = document.readyState;
|
|
317
|
+
A === "loading" || A === "interactive" && _ && _.defer ? document.addEventListener("DOMContentLoaded", R) : window.requestAnimationFrame ? window.requestAnimationFrame(R) : window.setTimeout(R, 16);
|
|
318
|
+
}
|
|
319
|
+
return l;
|
|
320
|
+
}(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
|
|
321
|
+
e.exports && (e.exports = t), V !== void 0 && (V.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(i) {
|
|
322
|
+
i.type === "entity" && (i.attributes.title = i.content.replace(/&/, "&"));
|
|
323
|
+
}), Object.defineProperty(t.languages.markup.tag, "addInlined", { value: function(i, c) {
|
|
324
|
+
var p = {};
|
|
325
|
+
p["language-" + c] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: t.languages[c] }, p.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
326
|
+
var f = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: p } };
|
|
327
|
+
f["language-" + c] = { pattern: /[\s\S]+/, inside: t.languages[c] };
|
|
328
|
+
var l = {};
|
|
329
|
+
l[i] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
330
|
+
return i;
|
|
331
|
+
}), "i"), lookbehind: !0, greedy: !0, inside: f }, t.languages.insertBefore("markup", "cdata", l);
|
|
332
|
+
} }), Object.defineProperty(t.languages.markup.tag, "addAttribute", { value: function(i, c) {
|
|
333
|
+
t.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + i + ")" + /\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: [c, "language-" + c], inside: t.languages[c] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
|
|
334
|
+
} }), 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(i) {
|
|
335
|
+
var c = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
336
|
+
i.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + c.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\\((?:" + c.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + c.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + c.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: c, 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: /[(){};:,]/ }, i.languages.css.atrule.inside.rest = i.languages.css;
|
|
337
|
+
var p = i.languages.markup;
|
|
338
|
+
p && (p.tag.addInlined("style", "css"), p.tag.addAttribute("style", "css"));
|
|
339
|
+
}(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() {
|
|
340
|
+
if (t !== void 0 && typeof document < "u") {
|
|
341
|
+
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
342
|
+
var i = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, c = "data-src-status", p = "loading", f = "loaded", l = "pre[data-src]:not([" + c + '="' + f + '"]):not([' + c + '="' + p + '"])';
|
|
343
|
+
t.hooks.add("before-highlightall", function(h) {
|
|
344
|
+
h.selector += ", " + l;
|
|
345
|
+
}), t.hooks.add("before-sanity-check", function(h) {
|
|
346
|
+
var m = h.element;
|
|
347
|
+
if (m.matches(l)) {
|
|
348
|
+
h.code = "", m.setAttribute(c, p);
|
|
349
|
+
var k = m.appendChild(document.createElement("CODE"));
|
|
350
|
+
k.textContent = "Loading…";
|
|
351
|
+
var S = m.getAttribute("data-src"), T = h.language;
|
|
352
|
+
if (T === "none") {
|
|
353
|
+
var _ = (/\.(\w+)$/.exec(S) || [, "none"])[1];
|
|
354
|
+
T = i[_] || _;
|
|
355
|
+
}
|
|
356
|
+
t.util.setLanguage(k, T), t.util.setLanguage(m, T);
|
|
357
|
+
var R = t.plugins.autoloader;
|
|
358
|
+
R && R.loadLanguages(T), function(A, a, n) {
|
|
359
|
+
var r = new XMLHttpRequest();
|
|
360
|
+
r.open("GET", A, !0), r.onreadystatechange = function() {
|
|
361
|
+
r.readyState == 4 && (r.status < 400 && r.responseText ? a(r.responseText) : r.status >= 400 ? n("✖ Error " + r.status + " while fetching file: " + r.statusText) : n("✖ Error: File does not exist or is empty"));
|
|
362
|
+
}, r.send(null);
|
|
363
|
+
}(S, function(A) {
|
|
364
|
+
m.setAttribute(c, f);
|
|
365
|
+
var a = function(o) {
|
|
366
|
+
var d = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(o || "");
|
|
367
|
+
if (d) {
|
|
368
|
+
var u = Number(d[1]), g = d[2], E = d[3];
|
|
369
|
+
return g ? E ? [u, Number(E)] : [u, void 0] : [u, u];
|
|
370
|
+
}
|
|
371
|
+
}(m.getAttribute("data-range"));
|
|
372
|
+
if (a) {
|
|
373
|
+
var n = A.split(/\r\n?|\n/g), r = a[0], s = a[1] == null ? n.length : a[1];
|
|
374
|
+
r < 0 && (r += n.length), r = Math.max(0, Math.min(r - 1, n.length)), s < 0 && (s += n.length), s = Math.max(0, Math.min(s, n.length)), A = n.slice(r, s).join(`
|
|
375
|
+
`), m.hasAttribute("data-start") || m.setAttribute("data-start", String(r + 1));
|
|
376
|
+
}
|
|
377
|
+
k.textContent = A, t.highlightElement(k);
|
|
378
|
+
}, function(A) {
|
|
379
|
+
m.setAttribute(c, "failed"), k.textContent = A;
|
|
380
|
+
});
|
|
789
381
|
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
382
|
+
}), t.plugins.fileHighlight = { highlight: function(h) {
|
|
383
|
+
for (var m, k = (h || document).querySelectorAll(l), S = 0; m = k[S++]; ) t.highlightElement(m);
|
|
384
|
+
} };
|
|
385
|
+
var b = !1;
|
|
386
|
+
t.fileHighlight = function() {
|
|
387
|
+
b || (b = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
|
|
388
|
+
};
|
|
796
389
|
}
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
], i
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
})(Prism
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
390
|
+
}();
|
|
391
|
+
})(q);
|
|
392
|
+
const G = re(q.exports);
|
|
393
|
+
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(e) {
|
|
394
|
+
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/, i = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, c = { pattern: RegExp(/(^|[^\w.])/.source + i + /[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: /\./ } };
|
|
395
|
+
e.languages.java = e.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [c, { pattern: RegExp(/(^|[^\w.])/.source + i + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: c.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + i + /[A-Z]\w*\b/.source), lookbehind: !0, inside: c.inside }], keyword: t, function: [e.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/ }), e.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), e.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": c, keyword: t, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + i + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: c.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + i + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: c.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() {
|
|
396
|
+
return t.source;
|
|
397
|
+
})), lookbehind: !0, inside: { punctuation: /\./ } } });
|
|
398
|
+
}(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(e) {
|
|
399
|
+
for (var t = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, i = 0; i < 2; i++) t = t.replace(/<self>/g, function() {
|
|
400
|
+
return t;
|
|
401
|
+
});
|
|
402
|
+
t = t.replace(/<self>/g, function() {
|
|
403
|
+
return /[^\s\S]/.source;
|
|
404
|
+
}), e.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: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ }, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
|
|
405
|
+
}(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(e) {
|
|
406
|
+
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", i = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, c = { bash: i, 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})/ };
|
|
407
|
+
e.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: c }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: i } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: c }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: c.entity } }], environment: { pattern: RegExp("\\$?" + t), alias: "constant" }, variable: c.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 } }, i.inside = e.languages.bash;
|
|
408
|
+
for (var p = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], f = c.variable[1].inside, l = 0; l < p.length; l++) f[p[l]] = e.languages.bash[p[l]];
|
|
409
|
+
e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
|
|
410
|
+
}(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;
|
|
411
|
+
function z(e, t, i, c, p, f, l, b) {
|
|
412
|
+
var h = typeof e == "function" ? e.options : e;
|
|
413
|
+
return t && (h.render = t, h.staticRenderFns = i, h._compiled = !0), f && (h._scopeId = "data-v-" + f), { exports: e, options: h };
|
|
414
|
+
}
|
|
415
|
+
typeof window < "u" && (window.Prism = G);
|
|
416
|
+
const $ = z({ name: "CodeRunner", components: { CodeEditor: z({ name: "CodeEditor", props: { value: { type: String, default: "" }, language: { type: String, default: "javascript" }, theme: { type: String, default: "dark" }, disabled: { type: Boolean, default: !1 } }, data: function() {
|
|
417
|
+
return { highlightRef: null, changeTimer: null };
|
|
418
|
+
}, mounted() {
|
|
419
|
+
this.loadPrismTheme(this.theme);
|
|
420
|
+
}, watch: { theme(e) {
|
|
421
|
+
this.loadPrismTheme(e);
|
|
422
|
+
} }, computed: { languageMap: function() {
|
|
423
|
+
return { 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" };
|
|
424
|
+
}, prismLanguage: function() {
|
|
425
|
+
return this.languageMap[this.language.toLowerCase()] || "javascript";
|
|
426
|
+
}, editorBackground: function() {
|
|
427
|
+
return this.theme === "dark" ? "#1e1e1e" : "#fafafa";
|
|
428
|
+
}, highlightedCode: function() {
|
|
429
|
+
try {
|
|
430
|
+
var e = G.languages[this.prismLanguage];
|
|
431
|
+
if (e) return G.highlight(this.value || "", e, this.prismLanguage);
|
|
432
|
+
} catch {
|
|
840
433
|
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
const
|
|
434
|
+
return this.escapeHtml(this.value || "");
|
|
435
|
+
} }, methods: { loadPrismTheme(e) {
|
|
436
|
+
const t = "hep-cr-prism-styles", i = document.getElementById(t), c = e === "dark" ? `
|
|
844
437
|
/* 默认代码颜色 */
|
|
845
438
|
.hep-cr-editor .hep-cr-highlight code,
|
|
846
439
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -924,7 +517,7 @@ const b = `
|
|
|
924
517
|
.hep-cr-editor .token.console {
|
|
925
518
|
color: #f8f8f2 !important;
|
|
926
519
|
}
|
|
927
|
-
|
|
520
|
+
` : `
|
|
928
521
|
/* 默认代码颜色 */
|
|
929
522
|
.hep-cr-editor .hep-cr-highlight code,
|
|
930
523
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -1002,424 +595,152 @@ const b = `
|
|
|
1002
595
|
color: #333 !important;
|
|
1003
596
|
}
|
|
1004
597
|
`;
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
type: String,
|
|
1022
|
-
default: "javascript"
|
|
1023
|
-
},
|
|
1024
|
-
theme: {
|
|
1025
|
-
type: String,
|
|
1026
|
-
default: "dark"
|
|
1027
|
-
},
|
|
1028
|
-
disabled: {
|
|
1029
|
-
type: Boolean,
|
|
1030
|
-
default: !1
|
|
1031
|
-
}
|
|
1032
|
-
},
|
|
1033
|
-
data: function() {
|
|
1034
|
-
return {
|
|
1035
|
-
highlightRef: null,
|
|
1036
|
-
changeTimer: null
|
|
1037
|
-
};
|
|
1038
|
-
},
|
|
1039
|
-
mounted() {
|
|
1040
|
-
this.loadPrismTheme(this.theme);
|
|
1041
|
-
},
|
|
1042
|
-
watch: {
|
|
1043
|
-
theme(t) {
|
|
1044
|
-
this.loadPrismTheme(t);
|
|
1045
|
-
}
|
|
1046
|
-
},
|
|
1047
|
-
computed: {
|
|
1048
|
-
languageMap: function() {
|
|
1049
|
-
return {
|
|
1050
|
-
javascript: "javascript",
|
|
1051
|
-
js: "javascript",
|
|
1052
|
-
typescript: "typescript",
|
|
1053
|
-
ts: "typescript",
|
|
1054
|
-
python: "python",
|
|
1055
|
-
py: "python",
|
|
1056
|
-
java: "java",
|
|
1057
|
-
c: "c",
|
|
1058
|
-
cpp: "cpp",
|
|
1059
|
-
"c++": "cpp",
|
|
1060
|
-
csharp: "csharp",
|
|
1061
|
-
"c#": "csharp",
|
|
1062
|
-
go: "go",
|
|
1063
|
-
golang: "go",
|
|
1064
|
-
rust: "rust",
|
|
1065
|
-
ruby: "ruby",
|
|
1066
|
-
rb: "ruby",
|
|
1067
|
-
php: "php",
|
|
1068
|
-
swift: "swift",
|
|
1069
|
-
kotlin: "kotlin",
|
|
1070
|
-
kt: "kotlin",
|
|
1071
|
-
sql: "sql",
|
|
1072
|
-
bash: "bash",
|
|
1073
|
-
sh: "bash",
|
|
1074
|
-
shell: "bash",
|
|
1075
|
-
json: "json",
|
|
1076
|
-
yaml: "yaml",
|
|
1077
|
-
yml: "yaml",
|
|
1078
|
-
markdown: "markdown",
|
|
1079
|
-
md: "markdown"
|
|
1080
|
-
};
|
|
1081
|
-
},
|
|
1082
|
-
prismLanguage: function() {
|
|
1083
|
-
return this.languageMap[this.language.toLowerCase()] || "javascript";
|
|
1084
|
-
},
|
|
1085
|
-
editorBackground: function() {
|
|
1086
|
-
return this.theme === "dark" ? "#1e1e1e" : "#fafafa";
|
|
1087
|
-
},
|
|
1088
|
-
highlightedCode: function() {
|
|
1089
|
-
try {
|
|
1090
|
-
var t = g.languages[this.prismLanguage];
|
|
1091
|
-
if (t)
|
|
1092
|
-
return g.highlight(
|
|
1093
|
-
this.value || "",
|
|
1094
|
-
t,
|
|
1095
|
-
this.prismLanguage
|
|
1096
|
-
);
|
|
1097
|
-
} catch {
|
|
1098
|
-
}
|
|
1099
|
-
return this.escapeHtml(this.value || "");
|
|
1100
|
-
}
|
|
1101
|
-
},
|
|
1102
|
-
methods: {
|
|
1103
|
-
loadPrismTheme(t) {
|
|
1104
|
-
const e = "hep-cr-prism-styles", r = document.getElementById(e), n = t === "dark" ? b : S;
|
|
1105
|
-
r && r.remove();
|
|
1106
|
-
const a = document.createElement("style");
|
|
1107
|
-
a.id = e, a.textContent = n, document.head.appendChild(a);
|
|
1108
|
-
},
|
|
1109
|
-
escapeHtml: function(t) {
|
|
1110
|
-
var e = document.createElement("div");
|
|
1111
|
-
return e.textContent = t, e.innerHTML;
|
|
1112
|
-
},
|
|
1113
|
-
handleInput: function(t) {
|
|
1114
|
-
this.$emit("input", t.target.value), this.$emit("update:value", t.target.value), this.emitChange(t.target.value);
|
|
1115
|
-
},
|
|
1116
|
-
handleScroll: function(t) {
|
|
1117
|
-
var e = this.$refs.highlightRef;
|
|
1118
|
-
e && (e.scrollTop = t.target.scrollTop, e.scrollLeft = t.target.scrollLeft);
|
|
1119
|
-
},
|
|
1120
|
-
handleKeydown: function(t) {
|
|
1121
|
-
if (t.key === "Tab") {
|
|
1122
|
-
t.preventDefault();
|
|
1123
|
-
var e = t.target, r = e.selectionStart, n = e.selectionEnd, a = e.value;
|
|
1124
|
-
e.value = a.substring(0, r) + " " + a.substring(n), e.selectionStart = e.selectionEnd = r + 2, this.$emit("input", e.value), this.$emit("update:value", e.value), this.emitChange(e.value);
|
|
1125
|
-
}
|
|
1126
|
-
},
|
|
1127
|
-
emitChange: function(t) {
|
|
1128
|
-
var e = this;
|
|
1129
|
-
e.changeTimer && clearTimeout(e.changeTimer), e.changeTimer = setTimeout(function() {
|
|
1130
|
-
e.$emit("change", t);
|
|
1131
|
-
}, 500);
|
|
1132
|
-
}
|
|
1133
|
-
},
|
|
1134
|
-
beforeDestroy: function() {
|
|
1135
|
-
this.changeTimer && clearTimeout(this.changeTimer);
|
|
598
|
+
i && i.remove();
|
|
599
|
+
const p = document.createElement("style");
|
|
600
|
+
p.id = t, p.textContent = c, document.head.appendChild(p);
|
|
601
|
+
}, escapeHtml: function(e) {
|
|
602
|
+
var t = document.createElement("div");
|
|
603
|
+
return t.textContent = e, t.innerHTML;
|
|
604
|
+
}, handleInput: function(e) {
|
|
605
|
+
this.$emit("input", e.target.value), this.$emit("update:value", e.target.value), this.emitChange(e.target.value);
|
|
606
|
+
}, handleScroll: function(e) {
|
|
607
|
+
var t = this.$refs.highlightRef;
|
|
608
|
+
t && (t.scrollTop = e.target.scrollTop, t.scrollLeft = e.target.scrollLeft);
|
|
609
|
+
}, handleKeydown: function(e) {
|
|
610
|
+
if (e.key === "Tab") {
|
|
611
|
+
e.preventDefault();
|
|
612
|
+
var t = e.target, i = t.selectionStart, c = t.selectionEnd, p = t.value;
|
|
613
|
+
t.value = p.substring(0, i) + " " + p.substring(c), t.selectionStart = t.selectionEnd = i + 2, this.$emit("input", t.value), this.$emit("update:value", t.value), this.emitChange(t.value);
|
|
1136
614
|
}
|
|
1137
|
-
}
|
|
1138
|
-
var
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
},
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
);
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
615
|
+
}, emitChange: function(e) {
|
|
616
|
+
var t = this;
|
|
617
|
+
t.changeTimer && clearTimeout(t.changeTimer), t.changeTimer = setTimeout(function() {
|
|
618
|
+
t.$emit("change", e);
|
|
619
|
+
}, 500);
|
|
620
|
+
} }, beforeDestroy: function() {
|
|
621
|
+
this.changeTimer && clearTimeout(this.changeTimer);
|
|
622
|
+
} }, function() {
|
|
623
|
+
var e = this, t = e._self._c;
|
|
624
|
+
return t("div", { staticClass: "hep-cr-editor", class: "hep-cr-theme-" + e.theme, style: { background: e.editorBackground } }, [t("pre", { ref: "highlightRef", staticClass: "hep-cr-highlight", class: "language-" + e.prismLanguage, attrs: { "aria-hidden": "true" } }, [t("code", { domProps: { innerHTML: e._s(e.highlightedCode) } })]), t("textarea", { staticClass: "hep-cr-input", attrs: { disabled: e.disabled, spellcheck: "false", placeholder: "Write your code here..." }, domProps: { value: e.value }, on: { input: e.handleInput, scroll: e.handleScroll, keydown: e.handleKeydown } })]);
|
|
625
|
+
}, [], 0, 0, "525880d3").exports }, props: { pistonUrl: { type: String, default: "/api/piston" }, language: { type: String, default: "javascript" }, theme: { type: String, default: "light", validator: function(e) {
|
|
626
|
+
return ["light", "dark"].indexOf(e) !== -1;
|
|
627
|
+
} }, themeColor: { type: String, default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, defaultCode: { type: String, default: "" }, executorLabel: { type: String, default: "运行" } }, data: function() {
|
|
628
|
+
var e = this, t = typeof window < "u" && localStorage.getItem("hep-cr-default-language") || null || e.language || "javascript";
|
|
629
|
+
return { runtimes: [], currentLanguage: t, currentTheme: e.theme, code: e.defaultCode || j(t.split(":")[0]), output: "", stderr: "", isRunning: !1, executionTime: null, activeTab: "stdout", error: null, runtimesLoading: !1, client: null, editorWidth: 60, copiedEditor: !1, copiedOutput: !1 };
|
|
630
|
+
}, computed: { themeClass: function() {
|
|
631
|
+
return "hep-cr-runner-" + this.currentTheme;
|
|
632
|
+
}, themeStyle: function() {
|
|
633
|
+
if (!this.themeColor) return {};
|
|
634
|
+
var e, t = this.currentTheme === "dark", i = this.themeColor, c = function(f, l) {
|
|
635
|
+
var b = parseInt(f.replace("#", ""), 16), h = Math.round(2.55 * l);
|
|
636
|
+
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (b >> 16) + h)) + 256 * Math.min(255, Math.max(0, (b >> 8 & 255) + h)) + Math.min(255, Math.max(0, (255 & b) + h))).toString(16).slice(1);
|
|
637
|
+
}, p = (0.299 * ((e = parseInt(i.replace("#", ""), 16)) >> 16 & 255) + 0.587 * (e >> 8 & 255) + 0.114 * (255 & e)) / 255 > 0.5 ? "#000" : "#fff";
|
|
638
|
+
return { "--hep-cr-theme-color": i, "--hep-cr-theme-color-hover": c(i, t ? 20 : -20), "--hep-cr-tab-active-color": p };
|
|
639
|
+
}, languageOptions: function() {
|
|
640
|
+
return this.runtimes.map(function(e) {
|
|
641
|
+
return { value: e.language + ":" + e.version, label: e.language.charAt(0).toUpperCase() + e.language.slice(1) + " " + e.version };
|
|
642
|
+
});
|
|
643
|
+
}, languageName: function() {
|
|
644
|
+
var e = this.currentLanguage;
|
|
645
|
+
return e.includes(":") ? e.split(":")[0] : e;
|
|
646
|
+
} }, watch: { currentLanguage: function(e) {
|
|
647
|
+
var t = e.includes(":") ? e.split(":")[0] : e;
|
|
648
|
+
this.code = j(t), this.$emit("language-change", t, this.code), typeof window < "u" && localStorage.setItem("hep-cr-default-language", e);
|
|
649
|
+
} }, mounted: function() {
|
|
650
|
+
this.client = new ne({ pistonUrl: this.pistonUrl }), this.loadRuntimes(), this.$emit("change", this.code);
|
|
651
|
+
}, methods: { getStoredLanguage: function() {
|
|
652
|
+
return typeof window > "u" ? this.language : localStorage.getItem("hep-cr-default-language") || this.language;
|
|
653
|
+
}, loadRuntimes: function() {
|
|
654
|
+
var e = this;
|
|
655
|
+
this.runtimesLoading = !0, this.error = null, this.client.getRuntimes().then(function(t) {
|
|
656
|
+
e.runtimes = t;
|
|
657
|
+
var i = e.currentLanguage.split(":")[0], c = t.find(function(p) {
|
|
658
|
+
return p.language === i;
|
|
659
|
+
});
|
|
660
|
+
c && !e.currentLanguage.includes(":") && (e.currentLanguage = i + ":" + c.version), e.$emit("language-change", i, e.code);
|
|
661
|
+
}).catch(function(t) {
|
|
662
|
+
e.error = t.message || "Failed to load runtimes";
|
|
663
|
+
}).finally(function() {
|
|
664
|
+
e.runtimesLoading = !1;
|
|
665
|
+
});
|
|
666
|
+
}, execute: function() {
|
|
667
|
+
var e = this;
|
|
668
|
+
this.isRunning || (this.isRunning = !0, this.output = "", this.stderr = "", this.executionTime = null, this.error = null, this.activeTab = "stdout", this.$emit("execute-start"), this.client.execute(this.languageName, this.code).then(function(t) {
|
|
669
|
+
e.output = t.output, e.stderr = t.stderr, e.executionTime = t.executionTime || null, e.activeTab = t.stderr ? "stderr" : "stdout", e.$emit("execute-end", t);
|
|
670
|
+
}).catch(function(t) {
|
|
671
|
+
e.error = t.message || "Execution failed", e.$emit("execute-end", { success: !1, output: "", stderr: e.error, code: -1 });
|
|
672
|
+
}).finally(function() {
|
|
673
|
+
e.isRunning = !1;
|
|
674
|
+
}));
|
|
675
|
+
}, clearOutput: function() {
|
|
676
|
+
this.output = "", this.stderr = "", this.executionTime = null, this.error = null;
|
|
677
|
+
}, copyCode: function() {
|
|
678
|
+
var e = this;
|
|
679
|
+
navigator.clipboard.writeText(this.code), this.copiedEditor = !0, setTimeout(function() {
|
|
680
|
+
e.copiedEditor = !1;
|
|
681
|
+
}, 2e3);
|
|
682
|
+
}, copyOutput: function() {
|
|
683
|
+
var e = this, t = this.activeTab === "stdout" ? this.output : this.stderr;
|
|
684
|
+
navigator.clipboard.writeText(t), this.copiedOutput = !0, setTimeout(function() {
|
|
685
|
+
e.copiedOutput = !1;
|
|
686
|
+
}, 2e3);
|
|
687
|
+
}, resetCode: function() {
|
|
688
|
+
this.code = j(this.languageName);
|
|
689
|
+
}, toggleTheme: function() {
|
|
690
|
+
this.currentTheme = this.currentTheme === "light" ? "dark" : "light";
|
|
691
|
+
}, startDrag: function(e) {
|
|
692
|
+
var t = this, i = document.querySelector(".hep-cr-runner-main");
|
|
693
|
+
if (i) {
|
|
694
|
+
var c = function(f) {
|
|
695
|
+
var l = i.getBoundingClientRect(), b = (f.clientX - l.left) / l.width * 100;
|
|
696
|
+
t.editorWidth = Math.max(20, Math.min(80, b));
|
|
697
|
+
}, p = function() {
|
|
698
|
+
document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", p), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1213
699
|
};
|
|
1214
|
-
|
|
1215
|
-
computed: {
|
|
1216
|
-
themeClass: function() {
|
|
1217
|
-
return "hep-cr-runner-" + this.currentTheme;
|
|
1218
|
-
},
|
|
1219
|
-
themeStyle: function() {
|
|
1220
|
-
if (!this.themeColor) return {};
|
|
1221
|
-
var t = this.currentTheme === "dark", e = this.themeColor, r = function(o, l) {
|
|
1222
|
-
var s = parseInt(o.replace("#", ""), 16), c = Math.round(2.55 * l), d = Math.min(255, Math.max(0, (s >> 16) + c)), p = Math.min(255, Math.max(0, (s >> 8 & 255) + c)), f = Math.min(255, Math.max(0, (s & 255) + c));
|
|
1223
|
-
return "#" + (16777216 + d * 65536 + p * 256 + f).toString(16).slice(1);
|
|
1224
|
-
}, n = function(o) {
|
|
1225
|
-
var l = parseInt(o.replace("#", ""), 16), s = l >> 16 & 255, c = l >> 8 & 255, d = l & 255, p = (0.299 * s + 0.587 * c + 0.114 * d) / 255;
|
|
1226
|
-
return p > 0.5;
|
|
1227
|
-
}, a = n(e), i = a ? "#000" : "#fff";
|
|
1228
|
-
return {
|
|
1229
|
-
"--hep-cr-theme-color": e,
|
|
1230
|
-
"--hep-cr-theme-color-hover": t ? r(e, 20) : r(e, -20),
|
|
1231
|
-
"--hep-cr-tab-active-color": i
|
|
1232
|
-
};
|
|
1233
|
-
},
|
|
1234
|
-
languageOptions: function() {
|
|
1235
|
-
return this.runtimes.map(function(t) {
|
|
1236
|
-
return {
|
|
1237
|
-
value: t.language + ":" + t.version,
|
|
1238
|
-
label: t.language.charAt(0).toUpperCase() + t.language.slice(1) + " " + t.version
|
|
1239
|
-
};
|
|
1240
|
-
});
|
|
1241
|
-
},
|
|
1242
|
-
languageName: function() {
|
|
1243
|
-
var t = this.currentLanguage;
|
|
1244
|
-
return t.includes(":") ? t.split(":")[0] : t;
|
|
1245
|
-
}
|
|
1246
|
-
},
|
|
1247
|
-
watch: {
|
|
1248
|
-
currentLanguage: function(t) {
|
|
1249
|
-
var e = t.includes(":") ? t.split(":")[0] : t;
|
|
1250
|
-
this.code = h(e), this.$emit("language-change", e, this.code), typeof window < "u" && localStorage.setItem("hep-cr-default-language", t);
|
|
1251
|
-
}
|
|
1252
|
-
},
|
|
1253
|
-
mounted: function() {
|
|
1254
|
-
this.client = new E({ pistonUrl: this.pistonUrl }), this.loadRuntimes(), this.$emit("change", this.code);
|
|
1255
|
-
},
|
|
1256
|
-
methods: {
|
|
1257
|
-
getStoredLanguage: function() {
|
|
1258
|
-
return typeof window > "u" ? this.language : localStorage.getItem("hep-cr-default-language") || this.language;
|
|
1259
|
-
},
|
|
1260
|
-
loadRuntimes: function() {
|
|
1261
|
-
var t = this;
|
|
1262
|
-
this.runtimesLoading = !0, this.error = null, this.client.getRuntimes().then(function(e) {
|
|
1263
|
-
t.runtimes = e;
|
|
1264
|
-
var r = t.currentLanguage.split(":")[0], n = e.find(function(a) {
|
|
1265
|
-
return a.language === r;
|
|
1266
|
-
});
|
|
1267
|
-
n && !t.currentLanguage.includes(":") && (t.currentLanguage = r + ":" + n.version), t.$emit("language-change", r, t.code);
|
|
1268
|
-
}).catch(function(e) {
|
|
1269
|
-
t.error = e.message || "Failed to load runtimes";
|
|
1270
|
-
}).finally(function() {
|
|
1271
|
-
t.runtimesLoading = !1;
|
|
1272
|
-
});
|
|
1273
|
-
},
|
|
1274
|
-
execute: function() {
|
|
1275
|
-
var t = this;
|
|
1276
|
-
this.isRunning || (this.isRunning = !0, this.output = "", this.stderr = "", this.executionTime = null, this.error = null, this.activeTab = "stdout", this.$emit("execute-start"), this.client.execute(this.languageName, this.code).then(function(e) {
|
|
1277
|
-
t.output = e.output, t.stderr = e.stderr, t.executionTime = e.executionTime || null, t.activeTab = e.stderr ? "stderr" : "stdout", t.$emit("execute-end", e);
|
|
1278
|
-
}).catch(function(e) {
|
|
1279
|
-
t.error = e.message || "Execution failed", t.$emit("execute-end", {
|
|
1280
|
-
success: !1,
|
|
1281
|
-
output: "",
|
|
1282
|
-
stderr: t.error,
|
|
1283
|
-
code: -1
|
|
1284
|
-
});
|
|
1285
|
-
}).finally(function() {
|
|
1286
|
-
t.isRunning = !1;
|
|
1287
|
-
}));
|
|
1288
|
-
},
|
|
1289
|
-
clearOutput: function() {
|
|
1290
|
-
this.output = "", this.stderr = "", this.executionTime = null, this.error = null;
|
|
1291
|
-
},
|
|
1292
|
-
copyCode: function() {
|
|
1293
|
-
var t = this;
|
|
1294
|
-
navigator.clipboard.writeText(this.code), this.copiedEditor = !0, setTimeout(function() {
|
|
1295
|
-
t.copiedEditor = !1;
|
|
1296
|
-
}, 2e3);
|
|
1297
|
-
},
|
|
1298
|
-
copyOutput: function() {
|
|
1299
|
-
var t = this, e = this.activeTab === "stdout" ? this.output : this.stderr;
|
|
1300
|
-
navigator.clipboard.writeText(e), this.copiedOutput = !0, setTimeout(function() {
|
|
1301
|
-
t.copiedOutput = !1;
|
|
1302
|
-
}, 2e3);
|
|
1303
|
-
},
|
|
1304
|
-
resetCode: function() {
|
|
1305
|
-
this.code = h(this.languageName);
|
|
1306
|
-
},
|
|
1307
|
-
toggleTheme: function() {
|
|
1308
|
-
this.currentTheme = this.currentTheme === "light" ? "dark" : "light";
|
|
1309
|
-
},
|
|
1310
|
-
startDrag: function(t) {
|
|
1311
|
-
var e = this, r = document.querySelector(".hep-cr-runner-main");
|
|
1312
|
-
if (r) {
|
|
1313
|
-
var n = function(i) {
|
|
1314
|
-
var o = r.getBoundingClientRect(), l = (i.clientX - o.left) / o.width * 100;
|
|
1315
|
-
e.editorWidth = Math.max(20, Math.min(80, l));
|
|
1316
|
-
}, a = function() {
|
|
1317
|
-
document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1318
|
-
};
|
|
1319
|
-
document.addEventListener("mousemove", n), document.addEventListener("mouseup", a), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
700
|
+
document.addEventListener("mousemove", c), document.addEventListener("mouseup", p), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
1322
701
|
}
|
|
1323
|
-
}
|
|
1324
|
-
var
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
var o = "_value" in i ? i._value : i.value;
|
|
1331
|
-
return o;
|
|
702
|
+
} } }, function() {
|
|
703
|
+
var e = this, t = e._self._c;
|
|
704
|
+
return t("div", { class: ["hep-cr-runner", e.themeClass], style: e.themeStyle }, [t("div", { staticClass: "hep-cr-runner-header" }, [t("div", { staticClass: "hep-cr-runner-controls" }, [e.showLanguageSelector ? t("select", { directives: [{ name: "model", rawName: "v-model", value: e.currentLanguage, expression: "currentLanguage" }], staticClass: "hep-cr-language-select", attrs: { disabled: e.isRunning }, on: { change: function(i) {
|
|
705
|
+
var c = Array.prototype.filter.call(i.target.options, function(p) {
|
|
706
|
+
return p.selected;
|
|
707
|
+
}).map(function(p) {
|
|
708
|
+
return "_value" in p ? p._value : p.value;
|
|
1332
709
|
});
|
|
1333
|
-
e.currentLanguage =
|
|
1334
|
-
} } }, [e.runtimesLoading ?
|
|
1335
|
-
return
|
|
1336
|
-
})], 2) : e._e()]),
|
|
1337
|
-
e.code =
|
|
1338
|
-
}, change: function(
|
|
1339
|
-
return e.$emit("change",
|
|
1340
|
-
} } })], 1) : e._e(), e.showEditor ?
|
|
710
|
+
e.currentLanguage = i.target.multiple ? c : c[0];
|
|
711
|
+
} } }, [e.runtimesLoading ? t("option", { attrs: { value: "" } }, [e._v("加载中...")]) : e._e(), e._l(e.languageOptions, function(i) {
|
|
712
|
+
return t("option", { key: i.value, domProps: { value: i.value } }, [e._v(" " + e._s(i.label) + " ")]);
|
|
713
|
+
})], 2) : e._e()]), t("div", { staticClass: "hep-cr-runner-actions" }, [t("button", { staticClass: "hep-cr-btn hep-cr-btn-run", attrs: { disabled: e.isRunning || e.runtimesLoading }, on: { click: e.execute } }, [e.isRunning ? t("span", { staticClass: "hep-cr-spinner" }) : t("span", { staticClass: "hep-cr-run-icon" }, [e._v("▶")]), e._v(" " + e._s(e.isRunning ? "运行中..." : e.executorLabel) + " ")]), e.showEditor && e.editable ? t("button", { staticClass: "hep-cr-btn hep-cr-btn-reset", on: { click: e.resetCode } }, [e._v(" 重置 ")]) : e._e(), t("button", { staticClass: "hep-cr-btn hep-cr-btn-theme", attrs: { title: e.currentTheme === "light" ? "Switch to dark mode" : "Switch to light mode" }, on: { click: e.toggleTheme } }, [e.currentTheme === "light" ? t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("path", { attrs: { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" } })]) : t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("circle", { attrs: { cx: "12", cy: "12", r: "5" } }), t("line", { attrs: { x1: "12", y1: "1", x2: "12", y2: "3" } }), t("line", { attrs: { x1: "12", y1: "21", x2: "12", y2: "23" } }), t("line", { attrs: { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" } }), t("line", { attrs: { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" } }), t("line", { attrs: { x1: "1", y1: "12", x2: "3", y2: "12" } }), t("line", { attrs: { x1: "21", y1: "12", x2: "23", y2: "12" } }), t("line", { attrs: { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" } }), t("line", { attrs: { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" } })])])])]), e.error ? t("div", { staticClass: "hep-cr-error-message" }, [e._v(" " + e._s(e.error) + " ")]) : e._e(), t("div", { staticClass: "hep-cr-runner-main" }, [e.showEditor ? t("div", { staticClass: "hep-cr-editor-panel", style: { width: e.editorWidth + "%" } }, [t("div", { staticClass: "hep-cr-panel-header" }, [t("span", { staticClass: "hep-cr-panel-title" }, [e._v("编辑器")]), t("div", { staticClass: "hep-cr-output-actions" }, [t("span", { staticClass: "hep-cr-language-badge" }, [e._v(e._s(e.languageName))]), t("button", { staticClass: "hep-cr-btn-icon", class: { "hep-cr-btn-copied": e.copiedEditor }, attrs: { disabled: e.copiedEditor, title: e.copiedEditor ? "已复制" : "复制" }, on: { click: e.copyCode } }, [e.copiedEditor ? t("span", { staticClass: "hep-cr-copied-text" }, [e._v("已复制")]) : t("svg", { attrs: { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("rect", { attrs: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" } }), t("path", { attrs: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" } })])])])]), t("CodeEditor", { attrs: { value: e.code, language: e.languageName, theme: e.currentTheme, disabled: !e.editable || e.isRunning }, on: { input: function(i) {
|
|
714
|
+
e.code = i;
|
|
715
|
+
}, change: function(i) {
|
|
716
|
+
return e.$emit("change", i);
|
|
717
|
+
} } })], 1) : e._e(), e.showEditor ? t("div", { staticClass: "hep-cr-resize-handle", on: { mousedown: e.startDrag } }, [t("div", { staticClass: "hep-cr-resize-line" })]) : e._e(), t("div", { staticClass: "hep-cr-output-panel", style: { width: e.showEditor ? 100 - e.editorWidth + "%" : "100%" } }, [t("div", { staticClass: "hep-cr-panel-header" }, [t("div", { staticClass: "hep-cr-output-tabs" }, [t("button", { class: ["hep-cr-tab", { active: e.activeTab === "stdout" }], on: { click: function(i) {
|
|
1341
718
|
e.activeTab = "stdout";
|
|
1342
|
-
} } }, [e._v(" 输出 ")]), e.stderr ?
|
|
719
|
+
} } }, [e._v(" 输出 ")]), e.stderr ? t("button", { class: ["hep-cr-tab", "hep-cr-tab-error", { active: e.activeTab === "stderr" }], on: { click: function(i) {
|
|
1343
720
|
e.activeTab = "stderr";
|
|
1344
|
-
} } }, [e._v(" 错误 ")]) : e._e()]),
|
|
1345
|
-
},
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
);
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
},
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
default: !1
|
|
1362
|
-
},
|
|
1363
|
-
title: {
|
|
1364
|
-
type: String,
|
|
1365
|
-
default: "代码执行器"
|
|
1366
|
-
},
|
|
1367
|
-
width: {
|
|
1368
|
-
type: [String, Number],
|
|
1369
|
-
default: 800
|
|
1370
|
-
}
|
|
1371
|
-
},
|
|
1372
|
-
model: {
|
|
1373
|
-
prop: "value",
|
|
1374
|
-
event: "input"
|
|
1375
|
-
},
|
|
1376
|
-
data() {
|
|
1377
|
-
return {
|
|
1378
|
-
localVisible: this.value
|
|
1379
|
-
};
|
|
1380
|
-
},
|
|
1381
|
-
computed: {
|
|
1382
|
-
dialogWidth() {
|
|
1383
|
-
return typeof this.width == "number" ? this.width + "px" : this.width;
|
|
1384
|
-
}
|
|
1385
|
-
},
|
|
1386
|
-
watch: {
|
|
1387
|
-
value(t) {
|
|
1388
|
-
this.localVisible = t;
|
|
1389
|
-
}
|
|
1390
|
-
},
|
|
1391
|
-
methods: {
|
|
1392
|
-
close() {
|
|
1393
|
-
this.localVisible = !1, this.$emit("input", !1), this.$emit("update:value", !1), this.$emit("close");
|
|
1394
|
-
},
|
|
1395
|
-
handleOverlayClick(t) {
|
|
1396
|
-
t.target === t.currentTarget && this.close();
|
|
1397
|
-
}
|
|
1398
|
-
},
|
|
1399
|
-
expose: ["close"]
|
|
1400
|
-
};
|
|
1401
|
-
var w = function() {
|
|
1402
|
-
var e = this, r = e._self._c;
|
|
1403
|
-
return e.localVisible ? r("div", { staticClass: "hep-cr-dialog-overlay", on: { click: e.handleOverlayClick } }, [r("div", { staticClass: "hep-cr-dialog-container", style: { width: e.dialogWidth } }, [r("div", { staticClass: "hep-cr-dialog-header" }, [r("h3", { staticClass: "hep-cr-dialog-title" }, [e._v(e._s(e.title))]), r("button", { staticClass: "hep-cr-dialog-close", on: { click: e.close } }, [r("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [r("line", { attrs: { x1: "18", y1: "6", x2: "6", y2: "18" } }), r("line", { attrs: { x1: "6", y1: "6", x2: "18", y2: "18" } })])])]), r("div", { staticClass: "hep-cr-dialog-body" }, [r("CodeRunner", e._g(e._b({}, "CodeRunner", e.$attrs, !1), e.$listeners))], 1), r("div", { staticClass: "hep-cr-dialog-footer" }, [e._t("footer", null, { close: e.close })], 2)])]) : e._e();
|
|
1404
|
-
}, O = [], L = /* @__PURE__ */ m(
|
|
1405
|
-
C,
|
|
1406
|
-
w,
|
|
1407
|
-
O,
|
|
1408
|
-
!1,
|
|
1409
|
-
null,
|
|
1410
|
-
"518c34f1"
|
|
1411
|
-
);
|
|
1412
|
-
const D = L.exports;
|
|
1413
|
-
u.install = (t) => {
|
|
1414
|
-
t.component("CodeRunner", u);
|
|
1415
|
-
};
|
|
1416
|
-
const P = {
|
|
1417
|
-
install(t) {
|
|
1418
|
-
t.component("CodeRunner", u);
|
|
1419
|
-
}
|
|
721
|
+
} } }, [e._v(" 错误 ")]) : e._e()]), t("div", { staticClass: "hep-cr-output-actions" }, [e.executionTime !== null ? t("span", { staticClass: "hep-cr-execution-time" }, [e._v(" " + e._s(e.executionTime) + "ms ")]) : e._e(), t("button", { staticClass: "hep-cr-btn-icon", class: { "hep-cr-btn-copied": e.copiedOutput }, attrs: { disabled: e.copiedOutput, title: e.copiedOutput ? "已复制" : "复制" }, on: { click: e.copyOutput } }, [e.copiedOutput ? t("span", { staticClass: "hep-cr-copied-text" }, [e._v("已复制")]) : t("svg", { attrs: { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("rect", { attrs: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" } }), t("path", { attrs: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" } })])])])]), t("div", { staticClass: "hep-cr-output-content" }, [e.activeTab === "stdout" ? t("pre", [e._v(e._s(e.isRunning ? "代码执行中..." : e.output || '点击"运行"执行代码'))]) : t("pre", { staticClass: "hep-cr-stderr" }, [e._v(e._s(e.stderr))])])])])]);
|
|
722
|
+
}, [], 0, 0, "b9693b7c").exports, ie = z({ name: "CodeRunnerDialog", components: { CodeRunner: $ }, props: { value: { type: Boolean, default: !1 }, title: { type: String, default: "代码执行器" }, width: { type: [String, Number], default: 800 } }, model: { prop: "value", event: "input" }, data() {
|
|
723
|
+
return { localVisible: this.value };
|
|
724
|
+
}, computed: { dialogWidth() {
|
|
725
|
+
return typeof this.width == "number" ? this.width + "px" : this.width;
|
|
726
|
+
} }, watch: { value(e) {
|
|
727
|
+
this.localVisible = e;
|
|
728
|
+
} }, methods: { close() {
|
|
729
|
+
this.localVisible = !1, this.$emit("input", !1), this.$emit("update:value", !1), this.$emit("close");
|
|
730
|
+
}, handleOverlayClick(e) {
|
|
731
|
+
e.target === e.currentTarget && this.close();
|
|
732
|
+
} }, expose: ["close"] }, function() {
|
|
733
|
+
var e = this, t = e._self._c;
|
|
734
|
+
return e.localVisible ? t("div", { staticClass: "hep-cr-dialog-overlay", on: { click: e.handleOverlayClick } }, [t("div", { staticClass: "hep-cr-dialog-container", style: { width: e.dialogWidth } }, [t("div", { staticClass: "hep-cr-dialog-header" }, [t("h3", { staticClass: "hep-cr-dialog-title" }, [e._v(e._s(e.title))]), t("button", { staticClass: "hep-cr-dialog-close", on: { click: e.close } }, [t("svg", { attrs: { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" } }, [t("line", { attrs: { x1: "18", y1: "6", x2: "6", y2: "18" } }), t("line", { attrs: { x1: "6", y1: "6", x2: "18", y2: "18" } })])])]), t("div", { staticClass: "hep-cr-dialog-body" }, [t("CodeRunner", e._g(e._b({}, "CodeRunner", e.$attrs, !1), e.$listeners))], 1), t("div", { staticClass: "hep-cr-dialog-footer" }, [e._t("footer", null, { close: e.close })], 2)])]) : e._e();
|
|
735
|
+
}, [], 0, 0, "518c34f1").exports;
|
|
736
|
+
$.install = (e) => {
|
|
737
|
+
e.component("CodeRunner", $);
|
|
1420
738
|
};
|
|
739
|
+
const se = { install(e) {
|
|
740
|
+
e.component("CodeRunner", $);
|
|
741
|
+
} };
|
|
1421
742
|
export {
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
743
|
+
$ as CodeRunner,
|
|
744
|
+
ie as CodeRunnerDialog,
|
|
745
|
+
se as default
|
|
1425
746
|
};
|