@scalar/components 0.2.5 → 0.3.0
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.cjs +30 -27
- package/dist/index.d.ts +50 -10
- package/dist/index.js +953 -195
- package/dist/index.umd.cjs +14 -11
- package/dist/style.css +1 -1
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { defineConfig as
|
|
3
|
-
import { extendTailwindMerge as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { defineComponent as T, useCssVars as Q, openBlock as w, createElementBlock as y, normalizeClass as k, unref as v, createElementVNode as L, createCommentVNode as A, createStaticVNode as ee, reactive as V, computed as H, useAttrs as F, mergeProps as U, renderSlot as B, createVNode as D, ref as z, watch as te, nextTick as re, onMounted as Z, toDisplayString as M, defineAsyncComponent as ae, h as ne, createBlock as P, withCtx as O, normalizeStyle as W, createTextVNode as oe, resolveDynamicComponent as se, withKeys as le } from "vue";
|
|
2
|
+
import { defineConfig as ie } from "cva";
|
|
3
|
+
import { extendTailwindMerge as ce } from "tailwind-merge";
|
|
4
|
+
import de from "prismjs";
|
|
5
|
+
import { Dialog as ue, DialogPanel as pe, DialogTitle as me, DialogDescription as he } from "@headlessui/vue";
|
|
6
|
+
import { useTextareaAutosize as ve } from "@vueuse/core";
|
|
7
|
+
import { nanoid as ge } from "nanoid";
|
|
8
|
+
const R = "scalar-component", fe = ce({
|
|
8
9
|
extend: {
|
|
9
10
|
classGroups: {
|
|
10
11
|
// Add the scalar class prefix as a custom class to be deduped by tailwind-merge
|
|
11
|
-
[
|
|
12
|
+
[R]: [R]
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
}), { cva:
|
|
15
|
+
}), { cva: N, cx: x, compose: vt } = ie({
|
|
15
16
|
hooks: {
|
|
16
|
-
onComplete: (
|
|
17
|
+
onComplete: (r) => `${fe(r, R)}`
|
|
17
18
|
}
|
|
18
|
-
}),
|
|
19
|
+
}), be = /* @__PURE__ */ ee('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-0f0b7a55></path>', 5), ke = {
|
|
19
20
|
key: 0,
|
|
20
21
|
class: "circular-loader"
|
|
21
22
|
};
|
|
22
|
-
function
|
|
23
|
+
function gt() {
|
|
23
24
|
return V({
|
|
24
25
|
isValid: !1,
|
|
25
26
|
isInvalid: !1,
|
|
@@ -30,44 +31,44 @@ function tt() {
|
|
|
30
31
|
stopLoading() {
|
|
31
32
|
this.isLoading = !1;
|
|
32
33
|
},
|
|
33
|
-
validate(
|
|
34
|
+
validate(r = 800) {
|
|
34
35
|
this.isValid = !0;
|
|
35
|
-
const t =
|
|
36
|
+
const t = r - 300;
|
|
36
37
|
return new Promise(
|
|
37
38
|
(e) => setTimeout(() => this.clear().then(() => e(!0)), t)
|
|
38
39
|
);
|
|
39
40
|
},
|
|
40
|
-
invalidate(
|
|
41
|
+
invalidate(r = 1100) {
|
|
41
42
|
this.isInvalid = !0;
|
|
42
|
-
const t =
|
|
43
|
+
const t = r - 300;
|
|
43
44
|
return new Promise(
|
|
44
45
|
(e) => setTimeout(() => this.clear().then(() => e(!0)), t)
|
|
45
46
|
);
|
|
46
47
|
},
|
|
47
|
-
clear(
|
|
48
|
+
clear(r = 300) {
|
|
48
49
|
return this.isValid = !1, this.isInvalid = !1, this.isLoading = !1, new Promise((t) => {
|
|
49
50
|
setTimeout(() => {
|
|
50
51
|
t(!0);
|
|
51
|
-
},
|
|
52
|
+
}, r);
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
|
-
const
|
|
57
|
+
const we = /* @__PURE__ */ T({
|
|
57
58
|
__name: "ScalarLoading",
|
|
58
59
|
props: {
|
|
59
60
|
loadingState: {},
|
|
60
61
|
size: { default: "24px" }
|
|
61
62
|
},
|
|
62
|
-
setup(
|
|
63
|
-
return
|
|
63
|
+
setup(r) {
|
|
64
|
+
return Q((t) => ({
|
|
64
65
|
"50aa2fee": t.size
|
|
65
|
-
})), (t, e) => t.loadingState ? (
|
|
66
|
+
})), (t, e) => t.loadingState ? (w(), y("div", {
|
|
66
67
|
key: 0,
|
|
67
|
-
class:
|
|
68
|
+
class: k(v(x)("loader-wrapper"))
|
|
68
69
|
}, [
|
|
69
|
-
(
|
|
70
|
-
class:
|
|
70
|
+
(w(), y("svg", {
|
|
71
|
+
class: k(["svg-loader", {
|
|
71
72
|
"icon-is-valid": t.loadingState.isValid,
|
|
72
73
|
"icon-is-invalid": t.loadingState.isInvalid
|
|
73
74
|
}]),
|
|
@@ -75,10 +76,10 @@ const le = /* @__PURE__ */ g({
|
|
|
75
76
|
xmlns: "http://www.w3.org/2000/svg",
|
|
76
77
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
77
78
|
}, [
|
|
78
|
-
|
|
79
|
-
t.loadingState.isLoading ? (
|
|
80
|
-
|
|
81
|
-
class:
|
|
79
|
+
be,
|
|
80
|
+
t.loadingState.isLoading ? (w(), y("g", ke, [
|
|
81
|
+
L("circle", {
|
|
82
|
+
class: k(["loader-path", {
|
|
82
83
|
"loader-path-off": t.loadingState.isValid || t.loadingState.isInvalid
|
|
83
84
|
}]),
|
|
84
85
|
cx: "50",
|
|
@@ -87,16 +88,16 @@ const le = /* @__PURE__ */ g({
|
|
|
87
88
|
r: "20",
|
|
88
89
|
"stroke-width": "2"
|
|
89
90
|
}, null, 2)
|
|
90
|
-
])) :
|
|
91
|
+
])) : A("", !0)
|
|
91
92
|
], 2))
|
|
92
|
-
], 2)) :
|
|
93
|
+
], 2)) : A("", !0);
|
|
93
94
|
}
|
|
94
|
-
}),
|
|
95
|
-
const e =
|
|
96
|
-
for (const [
|
|
97
|
-
e[
|
|
95
|
+
}), $ = (r, t) => {
|
|
96
|
+
const e = r.__vccOpts || r;
|
|
97
|
+
for (const [l, c] of t)
|
|
98
|
+
e[l] = c;
|
|
98
99
|
return e;
|
|
99
|
-
},
|
|
100
|
+
}, X = /* @__PURE__ */ $(we, [["__scopeId", "data-v-0f0b7a55"]]), K = {
|
|
100
101
|
solid: [
|
|
101
102
|
"scalar-button-solid",
|
|
102
103
|
"bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"
|
|
@@ -113,7 +114,7 @@ const le = /* @__PURE__ */ g({
|
|
|
113
114
|
"scalar-button-danger",
|
|
114
115
|
"bg-error text-white active:brightness-90 hocus:brightness-90"
|
|
115
116
|
]
|
|
116
|
-
},
|
|
117
|
+
}, _e = N({
|
|
117
118
|
base: "scalar-button row cursor-pointer items-center justify-center rounded font-medium",
|
|
118
119
|
variants: {
|
|
119
120
|
disabled: {
|
|
@@ -121,7 +122,7 @@ const le = /* @__PURE__ */ g({
|
|
|
121
122
|
},
|
|
122
123
|
fullWidth: { true: "w-full" },
|
|
123
124
|
size: { md: "h-10 px-6 text-sm" },
|
|
124
|
-
variant:
|
|
125
|
+
variant: K
|
|
125
126
|
},
|
|
126
127
|
compoundVariants: [
|
|
127
128
|
{
|
|
@@ -130,13 +131,13 @@ const le = /* @__PURE__ */ g({
|
|
|
130
131
|
class: "bg-transparent text-ghost"
|
|
131
132
|
}
|
|
132
133
|
]
|
|
133
|
-
}),
|
|
134
|
+
}), Se = ["ariaDisabled"], ye = {
|
|
134
135
|
key: 0,
|
|
135
136
|
class: "mr-2 h-4 w-4"
|
|
136
|
-
},
|
|
137
|
+
}, xe = {
|
|
137
138
|
key: 1,
|
|
138
139
|
class: "ml-2"
|
|
139
|
-
},
|
|
140
|
+
}, Ce = /* @__PURE__ */ T({
|
|
140
141
|
inheritAttrs: !1,
|
|
141
142
|
__name: "ScalarButton",
|
|
142
143
|
props: {
|
|
@@ -146,81 +147,837 @@ const le = /* @__PURE__ */ g({
|
|
|
146
147
|
size: { default: "md" },
|
|
147
148
|
variant: { default: "solid" }
|
|
148
149
|
},
|
|
149
|
-
setup(
|
|
150
|
-
const t =
|
|
151
|
-
const { class: e, ...
|
|
152
|
-
return { className: e || "", rest:
|
|
150
|
+
setup(r) {
|
|
151
|
+
const t = H(() => {
|
|
152
|
+
const { class: e, ...l } = F();
|
|
153
|
+
return { className: e || "", rest: l };
|
|
153
154
|
});
|
|
154
|
-
return (e,
|
|
155
|
+
return (e, l) => (w(), y("button", U(t.value.rest, {
|
|
155
156
|
ariaDisabled: e.disabled || void 0,
|
|
156
|
-
class:
|
|
157
|
-
|
|
157
|
+
class: v(x)(
|
|
158
|
+
v(_e)({ fullWidth: e.fullWidth, disabled: e.disabled, size: e.size, variant: e.variant }),
|
|
158
159
|
{ "pl-9 pr-3": e.loading },
|
|
159
160
|
`${t.value.className}`
|
|
160
161
|
),
|
|
161
162
|
type: "button"
|
|
162
163
|
}), [
|
|
163
|
-
e.$slots.icon ? (
|
|
164
|
-
|
|
165
|
-
])) :
|
|
166
|
-
|
|
167
|
-
e.loading ? (
|
|
168
|
-
|
|
164
|
+
e.$slots.icon ? (w(), y("div", ye, [
|
|
165
|
+
B(e.$slots, "icon")
|
|
166
|
+
])) : A("", !0),
|
|
167
|
+
B(e.$slots, "default"),
|
|
168
|
+
e.loading ? (w(), y("div", xe, [
|
|
169
|
+
D(v(X), {
|
|
169
170
|
loadingState: e.loading,
|
|
170
171
|
size: "20px"
|
|
171
172
|
}, null, 8, ["loadingState"])
|
|
172
|
-
])) :
|
|
173
|
-
], 16,
|
|
173
|
+
])) : A("", !0)
|
|
174
|
+
], 16, Se));
|
|
174
175
|
}
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
});
|
|
177
|
+
(function(r) {
|
|
178
|
+
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", e = {
|
|
179
|
+
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
|
|
180
|
+
lookbehind: !0,
|
|
181
|
+
alias: "punctuation",
|
|
182
|
+
// this looks reasonably well in all themes
|
|
183
|
+
inside: null
|
|
184
|
+
// see below
|
|
185
|
+
}, l = {
|
|
186
|
+
bash: e,
|
|
187
|
+
environment: {
|
|
188
|
+
pattern: RegExp("\\$" + t),
|
|
189
|
+
alias: "constant"
|
|
190
|
+
},
|
|
191
|
+
variable: [
|
|
192
|
+
// [0]: Arithmetic Environment
|
|
193
|
+
{
|
|
194
|
+
pattern: /\$?\(\([\s\S]+?\)\)/,
|
|
195
|
+
greedy: !0,
|
|
196
|
+
inside: {
|
|
197
|
+
// If there is a $ sign at the beginning highlight $(( and )) as variable
|
|
198
|
+
variable: [
|
|
199
|
+
{
|
|
200
|
+
pattern: /(^\$\(\([\s\S]+)\)\)/,
|
|
201
|
+
lookbehind: !0
|
|
202
|
+
},
|
|
203
|
+
/^\$\(\(/
|
|
204
|
+
],
|
|
205
|
+
number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
|
|
206
|
+
// Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
|
|
207
|
+
operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
|
|
208
|
+
// If there is no $ sign at the beginning highlight (( and )) as punctuation
|
|
209
|
+
punctuation: /\(\(?|\)\)?|,|;/
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
// [1]: Command Substitution
|
|
213
|
+
{
|
|
214
|
+
pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
|
|
215
|
+
greedy: !0,
|
|
216
|
+
inside: {
|
|
217
|
+
variable: /^\$\(|^`|\)$|`$/
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
// [2]: Brace expansion
|
|
221
|
+
{
|
|
222
|
+
pattern: /\$\{[^}]+\}/,
|
|
223
|
+
greedy: !0,
|
|
224
|
+
inside: {
|
|
225
|
+
operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
|
|
226
|
+
punctuation: /[\[\]]/,
|
|
227
|
+
environment: {
|
|
228
|
+
pattern: RegExp("(\\{)" + t),
|
|
229
|
+
lookbehind: !0,
|
|
230
|
+
alias: "constant"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
/\$(?:\w+|[#?*!@$])/
|
|
235
|
+
],
|
|
236
|
+
// Escape sequences from echo and printf's manuals, and escaped quotes.
|
|
237
|
+
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})/
|
|
238
|
+
};
|
|
239
|
+
r.languages.bash = {
|
|
240
|
+
shebang: {
|
|
241
|
+
pattern: /^#!\s*\/.*/,
|
|
242
|
+
alias: "important"
|
|
243
|
+
},
|
|
244
|
+
comment: {
|
|
245
|
+
pattern: /(^|[^"{\\$])#.*/,
|
|
246
|
+
lookbehind: !0
|
|
247
|
+
},
|
|
248
|
+
"function-name": [
|
|
249
|
+
// a) function foo {
|
|
250
|
+
// b) foo() {
|
|
251
|
+
// c) function foo() {
|
|
252
|
+
// but not “foo {”
|
|
253
|
+
{
|
|
254
|
+
// a) and c)
|
|
255
|
+
pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
|
|
256
|
+
lookbehind: !0,
|
|
257
|
+
alias: "function"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
// b)
|
|
261
|
+
pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
|
|
262
|
+
alias: "function"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
// Highlight variable names as variables in for and select beginnings.
|
|
266
|
+
"for-or-select": {
|
|
267
|
+
pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
|
|
268
|
+
alias: "variable",
|
|
269
|
+
lookbehind: !0
|
|
270
|
+
},
|
|
271
|
+
// Highlight variable names as variables in the left-hand part
|
|
272
|
+
// of assignments (“=” and “+=”).
|
|
273
|
+
"assign-left": {
|
|
274
|
+
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
|
|
275
|
+
inside: {
|
|
276
|
+
environment: {
|
|
277
|
+
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t),
|
|
278
|
+
lookbehind: !0,
|
|
279
|
+
alias: "constant"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
alias: "variable",
|
|
283
|
+
lookbehind: !0
|
|
284
|
+
},
|
|
285
|
+
// Highlight parameter names as variables
|
|
286
|
+
parameter: {
|
|
287
|
+
pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
|
|
288
|
+
alias: "variable",
|
|
289
|
+
lookbehind: !0
|
|
290
|
+
},
|
|
291
|
+
string: [
|
|
292
|
+
// Support for Here-documents https://en.wikipedia.org/wiki/Here_document
|
|
293
|
+
{
|
|
294
|
+
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
295
|
+
lookbehind: !0,
|
|
296
|
+
greedy: !0,
|
|
297
|
+
inside: l
|
|
298
|
+
},
|
|
299
|
+
// Here-document with quotes around the tag
|
|
300
|
+
// → No expansion (so no “inside”).
|
|
301
|
+
{
|
|
302
|
+
pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
|
|
303
|
+
lookbehind: !0,
|
|
304
|
+
greedy: !0,
|
|
305
|
+
inside: {
|
|
306
|
+
bash: e
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
// “Normal” string
|
|
310
|
+
{
|
|
311
|
+
// https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
|
|
312
|
+
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
313
|
+
lookbehind: !0,
|
|
314
|
+
greedy: !0,
|
|
315
|
+
inside: l
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
|
|
319
|
+
pattern: /(^|[^$\\])'[^']*'/,
|
|
320
|
+
lookbehind: !0,
|
|
321
|
+
greedy: !0
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
// https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
|
|
325
|
+
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
326
|
+
greedy: !0,
|
|
327
|
+
inside: {
|
|
328
|
+
entity: l.entity
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
environment: {
|
|
333
|
+
pattern: RegExp("\\$?" + t),
|
|
334
|
+
alias: "constant"
|
|
335
|
+
},
|
|
336
|
+
variable: l.variable,
|
|
337
|
+
function: {
|
|
338
|
+
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;|&])/,
|
|
339
|
+
lookbehind: !0
|
|
340
|
+
},
|
|
341
|
+
keyword: {
|
|
342
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
|
|
343
|
+
lookbehind: !0
|
|
344
|
+
},
|
|
345
|
+
// https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
|
|
346
|
+
builtin: {
|
|
347
|
+
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;|&])/,
|
|
348
|
+
lookbehind: !0,
|
|
349
|
+
// Alias added to make those easier to distinguish from strings.
|
|
350
|
+
alias: "class-name"
|
|
351
|
+
},
|
|
352
|
+
boolean: {
|
|
353
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
|
|
354
|
+
lookbehind: !0
|
|
355
|
+
},
|
|
356
|
+
"file-descriptor": {
|
|
357
|
+
pattern: /\B&\d\b/,
|
|
358
|
+
alias: "important"
|
|
359
|
+
},
|
|
360
|
+
operator: {
|
|
361
|
+
// Lots of redirections here, but not just that.
|
|
362
|
+
pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
|
|
363
|
+
inside: {
|
|
364
|
+
"file-descriptor": {
|
|
365
|
+
pattern: /^\d/,
|
|
366
|
+
alias: "important"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
|
|
371
|
+
number: {
|
|
372
|
+
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
|
|
373
|
+
lookbehind: !0
|
|
374
|
+
}
|
|
375
|
+
}, e.inside = r.languages.bash;
|
|
376
|
+
for (var c = [
|
|
377
|
+
"comment",
|
|
378
|
+
"function-name",
|
|
379
|
+
"for-or-select",
|
|
380
|
+
"assign-left",
|
|
381
|
+
"parameter",
|
|
382
|
+
"string",
|
|
383
|
+
"environment",
|
|
384
|
+
"function",
|
|
385
|
+
"keyword",
|
|
386
|
+
"builtin",
|
|
387
|
+
"boolean",
|
|
388
|
+
"file-descriptor",
|
|
389
|
+
"operator",
|
|
390
|
+
"punctuation",
|
|
391
|
+
"number"
|
|
392
|
+
], b = l.variable[1].inside, n = 0; n < c.length; n++)
|
|
393
|
+
b[c[n]] = r.languages.bash[c[n]];
|
|
394
|
+
r.languages.sh = r.languages.bash, r.languages.shell = r.languages.bash;
|
|
395
|
+
})(Prism);
|
|
396
|
+
Prism.languages.json = {
|
|
397
|
+
property: {
|
|
398
|
+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
399
|
+
lookbehind: !0,
|
|
400
|
+
greedy: !0
|
|
401
|
+
},
|
|
402
|
+
string: {
|
|
403
|
+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
|
|
404
|
+
lookbehind: !0,
|
|
405
|
+
greedy: !0
|
|
406
|
+
},
|
|
407
|
+
comment: {
|
|
408
|
+
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
409
|
+
greedy: !0
|
|
410
|
+
},
|
|
411
|
+
number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
|
412
|
+
punctuation: /[{}[\],]/,
|
|
413
|
+
operator: /:/,
|
|
414
|
+
boolean: /\b(?:false|true)\b/,
|
|
415
|
+
null: {
|
|
416
|
+
pattern: /\bnull\b/,
|
|
417
|
+
alias: "keyword"
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
Prism.languages.webmanifest = Prism.languages.json;
|
|
421
|
+
(function() {
|
|
422
|
+
if (typeof Prism > "u" || typeof document > "u")
|
|
178
423
|
return;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
424
|
+
var r = (
|
|
425
|
+
/*dependencies_placeholder[*/
|
|
426
|
+
{
|
|
427
|
+
javascript: "clike",
|
|
428
|
+
actionscript: "javascript",
|
|
429
|
+
apex: [
|
|
430
|
+
"clike",
|
|
431
|
+
"sql"
|
|
432
|
+
],
|
|
433
|
+
arduino: "cpp",
|
|
434
|
+
aspnet: [
|
|
435
|
+
"markup",
|
|
436
|
+
"csharp"
|
|
437
|
+
],
|
|
438
|
+
birb: "clike",
|
|
439
|
+
bison: "c",
|
|
440
|
+
c: "clike",
|
|
441
|
+
csharp: "clike",
|
|
442
|
+
cpp: "c",
|
|
443
|
+
cfscript: "clike",
|
|
444
|
+
chaiscript: [
|
|
445
|
+
"clike",
|
|
446
|
+
"cpp"
|
|
447
|
+
],
|
|
448
|
+
cilkc: "c",
|
|
449
|
+
cilkcpp: "cpp",
|
|
450
|
+
coffeescript: "javascript",
|
|
451
|
+
crystal: "ruby",
|
|
452
|
+
"css-extras": "css",
|
|
453
|
+
d: "clike",
|
|
454
|
+
dart: "clike",
|
|
455
|
+
django: "markup-templating",
|
|
456
|
+
ejs: [
|
|
457
|
+
"javascript",
|
|
458
|
+
"markup-templating"
|
|
459
|
+
],
|
|
460
|
+
etlua: [
|
|
461
|
+
"lua",
|
|
462
|
+
"markup-templating"
|
|
463
|
+
],
|
|
464
|
+
erb: [
|
|
465
|
+
"ruby",
|
|
466
|
+
"markup-templating"
|
|
467
|
+
],
|
|
468
|
+
fsharp: "clike",
|
|
469
|
+
"firestore-security-rules": "clike",
|
|
470
|
+
flow: "javascript",
|
|
471
|
+
ftl: "markup-templating",
|
|
472
|
+
gml: "clike",
|
|
473
|
+
glsl: "c",
|
|
474
|
+
go: "clike",
|
|
475
|
+
gradle: "clike",
|
|
476
|
+
groovy: "clike",
|
|
477
|
+
haml: "ruby",
|
|
478
|
+
handlebars: "markup-templating",
|
|
479
|
+
haxe: "clike",
|
|
480
|
+
hlsl: "c",
|
|
481
|
+
idris: "haskell",
|
|
482
|
+
java: "clike",
|
|
483
|
+
javadoc: [
|
|
484
|
+
"markup",
|
|
485
|
+
"java",
|
|
486
|
+
"javadoclike"
|
|
487
|
+
],
|
|
488
|
+
jolie: "clike",
|
|
489
|
+
jsdoc: [
|
|
490
|
+
"javascript",
|
|
491
|
+
"javadoclike",
|
|
492
|
+
"typescript"
|
|
493
|
+
],
|
|
494
|
+
"js-extras": "javascript",
|
|
495
|
+
json5: "json",
|
|
496
|
+
jsonp: "json",
|
|
497
|
+
"js-templates": "javascript",
|
|
498
|
+
kotlin: "clike",
|
|
499
|
+
latte: [
|
|
500
|
+
"clike",
|
|
501
|
+
"markup-templating",
|
|
502
|
+
"php"
|
|
503
|
+
],
|
|
504
|
+
less: "css",
|
|
505
|
+
lilypond: "scheme",
|
|
506
|
+
liquid: "markup-templating",
|
|
507
|
+
markdown: "markup",
|
|
508
|
+
"markup-templating": "markup",
|
|
509
|
+
mongodb: "javascript",
|
|
510
|
+
n4js: "javascript",
|
|
511
|
+
objectivec: "c",
|
|
512
|
+
opencl: "c",
|
|
513
|
+
parser: "markup",
|
|
514
|
+
php: "markup-templating",
|
|
515
|
+
phpdoc: [
|
|
516
|
+
"php",
|
|
517
|
+
"javadoclike"
|
|
518
|
+
],
|
|
519
|
+
"php-extras": "php",
|
|
520
|
+
plsql: "sql",
|
|
521
|
+
processing: "clike",
|
|
522
|
+
protobuf: "clike",
|
|
523
|
+
pug: [
|
|
524
|
+
"markup",
|
|
525
|
+
"javascript"
|
|
526
|
+
],
|
|
527
|
+
purebasic: "clike",
|
|
528
|
+
purescript: "haskell",
|
|
529
|
+
qsharp: "clike",
|
|
530
|
+
qml: "javascript",
|
|
531
|
+
qore: "clike",
|
|
532
|
+
racket: "scheme",
|
|
533
|
+
cshtml: [
|
|
534
|
+
"markup",
|
|
535
|
+
"csharp"
|
|
536
|
+
],
|
|
537
|
+
jsx: [
|
|
538
|
+
"markup",
|
|
539
|
+
"javascript"
|
|
540
|
+
],
|
|
541
|
+
tsx: [
|
|
542
|
+
"jsx",
|
|
543
|
+
"typescript"
|
|
544
|
+
],
|
|
545
|
+
reason: "clike",
|
|
546
|
+
ruby: "clike",
|
|
547
|
+
sass: "css",
|
|
548
|
+
scss: "css",
|
|
549
|
+
scala: "java",
|
|
550
|
+
"shell-session": "bash",
|
|
551
|
+
smarty: "markup-templating",
|
|
552
|
+
solidity: "clike",
|
|
553
|
+
soy: "markup-templating",
|
|
554
|
+
sparql: "turtle",
|
|
555
|
+
sqf: "clike",
|
|
556
|
+
squirrel: "clike",
|
|
557
|
+
stata: [
|
|
558
|
+
"mata",
|
|
559
|
+
"java",
|
|
560
|
+
"python"
|
|
561
|
+
],
|
|
562
|
+
"t4-cs": [
|
|
563
|
+
"t4-templating",
|
|
564
|
+
"csharp"
|
|
565
|
+
],
|
|
566
|
+
"t4-vb": [
|
|
567
|
+
"t4-templating",
|
|
568
|
+
"vbnet"
|
|
569
|
+
],
|
|
570
|
+
tap: "yaml",
|
|
571
|
+
tt2: [
|
|
572
|
+
"clike",
|
|
573
|
+
"markup-templating"
|
|
574
|
+
],
|
|
575
|
+
textile: "markup",
|
|
576
|
+
twig: "markup-templating",
|
|
577
|
+
typescript: "javascript",
|
|
578
|
+
v: "clike",
|
|
579
|
+
vala: "clike",
|
|
580
|
+
vbnet: "basic",
|
|
581
|
+
velocity: "markup",
|
|
582
|
+
wiki: "markup",
|
|
583
|
+
xeora: "markup",
|
|
584
|
+
"xml-doc": "markup",
|
|
585
|
+
xquery: "markup"
|
|
586
|
+
}
|
|
587
|
+
), t = (
|
|
588
|
+
/*aliases_placeholder[*/
|
|
589
|
+
{
|
|
590
|
+
html: "markup",
|
|
591
|
+
xml: "markup",
|
|
592
|
+
svg: "markup",
|
|
593
|
+
mathml: "markup",
|
|
594
|
+
ssml: "markup",
|
|
595
|
+
atom: "markup",
|
|
596
|
+
rss: "markup",
|
|
597
|
+
js: "javascript",
|
|
598
|
+
g4: "antlr4",
|
|
599
|
+
ino: "arduino",
|
|
600
|
+
"arm-asm": "armasm",
|
|
601
|
+
art: "arturo",
|
|
602
|
+
adoc: "asciidoc",
|
|
603
|
+
avs: "avisynth",
|
|
604
|
+
avdl: "avro-idl",
|
|
605
|
+
gawk: "awk",
|
|
606
|
+
sh: "bash",
|
|
607
|
+
shell: "bash",
|
|
608
|
+
shortcode: "bbcode",
|
|
609
|
+
rbnf: "bnf",
|
|
610
|
+
oscript: "bsl",
|
|
611
|
+
cs: "csharp",
|
|
612
|
+
dotnet: "csharp",
|
|
613
|
+
cfc: "cfscript",
|
|
614
|
+
"cilk-c": "cilkc",
|
|
615
|
+
"cilk-cpp": "cilkcpp",
|
|
616
|
+
cilk: "cilkcpp",
|
|
617
|
+
coffee: "coffeescript",
|
|
618
|
+
conc: "concurnas",
|
|
619
|
+
jinja2: "django",
|
|
620
|
+
"dns-zone": "dns-zone-file",
|
|
621
|
+
dockerfile: "docker",
|
|
622
|
+
gv: "dot",
|
|
623
|
+
eta: "ejs",
|
|
624
|
+
xlsx: "excel-formula",
|
|
625
|
+
xls: "excel-formula",
|
|
626
|
+
gamemakerlanguage: "gml",
|
|
627
|
+
po: "gettext",
|
|
628
|
+
gni: "gn",
|
|
629
|
+
ld: "linker-script",
|
|
630
|
+
"go-mod": "go-module",
|
|
631
|
+
hbs: "handlebars",
|
|
632
|
+
mustache: "handlebars",
|
|
633
|
+
hs: "haskell",
|
|
634
|
+
idr: "idris",
|
|
635
|
+
gitignore: "ignore",
|
|
636
|
+
hgignore: "ignore",
|
|
637
|
+
npmignore: "ignore",
|
|
638
|
+
webmanifest: "json",
|
|
639
|
+
kt: "kotlin",
|
|
640
|
+
kts: "kotlin",
|
|
641
|
+
kum: "kumir",
|
|
642
|
+
tex: "latex",
|
|
643
|
+
context: "latex",
|
|
644
|
+
ly: "lilypond",
|
|
645
|
+
emacs: "lisp",
|
|
646
|
+
elisp: "lisp",
|
|
647
|
+
"emacs-lisp": "lisp",
|
|
648
|
+
md: "markdown",
|
|
649
|
+
moon: "moonscript",
|
|
650
|
+
n4jsd: "n4js",
|
|
651
|
+
nani: "naniscript",
|
|
652
|
+
objc: "objectivec",
|
|
653
|
+
qasm: "openqasm",
|
|
654
|
+
objectpascal: "pascal",
|
|
655
|
+
px: "pcaxis",
|
|
656
|
+
pcode: "peoplecode",
|
|
657
|
+
plantuml: "plant-uml",
|
|
658
|
+
pq: "powerquery",
|
|
659
|
+
mscript: "powerquery",
|
|
660
|
+
pbfasm: "purebasic",
|
|
661
|
+
purs: "purescript",
|
|
662
|
+
py: "python",
|
|
663
|
+
qs: "qsharp",
|
|
664
|
+
rkt: "racket",
|
|
665
|
+
razor: "cshtml",
|
|
666
|
+
rpy: "renpy",
|
|
667
|
+
res: "rescript",
|
|
668
|
+
robot: "robotframework",
|
|
669
|
+
rb: "ruby",
|
|
670
|
+
"sh-session": "shell-session",
|
|
671
|
+
shellsession: "shell-session",
|
|
672
|
+
smlnj: "sml",
|
|
673
|
+
sol: "solidity",
|
|
674
|
+
sln: "solution-file",
|
|
675
|
+
rq: "sparql",
|
|
676
|
+
sclang: "supercollider",
|
|
677
|
+
t4: "t4-cs",
|
|
678
|
+
trickle: "tremor",
|
|
679
|
+
troy: "tremor",
|
|
680
|
+
trig: "turtle",
|
|
681
|
+
ts: "typescript",
|
|
682
|
+
tsconfig: "typoscript",
|
|
683
|
+
uscript: "unrealscript",
|
|
684
|
+
uc: "unrealscript",
|
|
685
|
+
url: "uri",
|
|
686
|
+
vb: "visual-basic",
|
|
687
|
+
vba: "visual-basic",
|
|
688
|
+
webidl: "web-idl",
|
|
689
|
+
mathematica: "wolfram",
|
|
690
|
+
nb: "wolfram",
|
|
691
|
+
wl: "wolfram",
|
|
692
|
+
xeoracube: "xeora",
|
|
693
|
+
yml: "yaml"
|
|
694
|
+
}
|
|
695
|
+
), e = {}, l = "none", c = "components/", b = Prism.util.currentScript();
|
|
696
|
+
if (b) {
|
|
697
|
+
var n = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i, h = /(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i, o = b.getAttribute("data-autoloader-path");
|
|
698
|
+
if (o != null)
|
|
699
|
+
c = o.trim().replace(/\/?$/, "/");
|
|
700
|
+
else {
|
|
701
|
+
var d = b.src;
|
|
702
|
+
n.test(d) ? c = d.replace(n, "components/") : h.test(d) && (c = d.replace(h, "$1components/"));
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
var u = Prism.plugins.autoloader = {
|
|
706
|
+
languages_path: c,
|
|
707
|
+
use_minified: !0,
|
|
708
|
+
loadLanguages: I
|
|
709
|
+
};
|
|
710
|
+
function i(a, p, g) {
|
|
711
|
+
var m = document.createElement("script");
|
|
712
|
+
m.src = a, m.async = !0, m.onload = function() {
|
|
713
|
+
document.body.removeChild(m), p && p();
|
|
714
|
+
}, m.onerror = function() {
|
|
715
|
+
document.body.removeChild(m), g && g();
|
|
716
|
+
}, document.body.appendChild(m);
|
|
717
|
+
}
|
|
718
|
+
function s(a) {
|
|
719
|
+
var p = (a.getAttribute("data-dependencies") || "").trim();
|
|
720
|
+
if (!p) {
|
|
721
|
+
var g = a.parentElement;
|
|
722
|
+
g && g.tagName.toLowerCase() === "pre" && (p = (g.getAttribute("data-dependencies") || "").trim());
|
|
723
|
+
}
|
|
724
|
+
return p ? p.split(/\s*,\s*/g) : [];
|
|
725
|
+
}
|
|
726
|
+
function f(a) {
|
|
727
|
+
if (a.indexOf("!") >= 0)
|
|
728
|
+
return !1;
|
|
729
|
+
if (a = t[a] || a, a in Prism.languages)
|
|
730
|
+
return !0;
|
|
731
|
+
var p = e[a];
|
|
732
|
+
return p && !p.error && p.loading === !1;
|
|
733
|
+
}
|
|
734
|
+
function C(a) {
|
|
735
|
+
return u.languages_path + "prism-" + a + (u.use_minified ? ".min" : "") + ".js";
|
|
736
|
+
}
|
|
737
|
+
function I(a, p, g) {
|
|
738
|
+
typeof a == "string" && (a = [a]);
|
|
739
|
+
var m = a.length, E = 0, S = !1;
|
|
740
|
+
if (m === 0) {
|
|
741
|
+
p && setTimeout(p, 0);
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
function _() {
|
|
745
|
+
S || (E++, E === m && p && p(a));
|
|
746
|
+
}
|
|
747
|
+
a.forEach(function(G) {
|
|
748
|
+
J(G, _, function() {
|
|
749
|
+
S || (S = !0, g && g(G));
|
|
750
|
+
});
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
function J(a, p, g) {
|
|
754
|
+
var m = a.indexOf("!") >= 0;
|
|
755
|
+
a = a.replace("!", ""), a = t[a] || a;
|
|
756
|
+
function E() {
|
|
757
|
+
var _ = e[a];
|
|
758
|
+
_ || (_ = e[a] = {
|
|
759
|
+
callbacks: []
|
|
760
|
+
}), _.callbacks.push({
|
|
761
|
+
success: p,
|
|
762
|
+
error: g
|
|
763
|
+
}), !m && f(a) ? j(a, "success") : !m && _.error ? j(a, "error") : (m || !_.loading) && (_.loading = !0, _.error = !1, i(C(a), function() {
|
|
764
|
+
_.loading = !1, j(a, "success");
|
|
765
|
+
}, function() {
|
|
766
|
+
_.loading = !1, _.error = !0, j(a, "error");
|
|
767
|
+
}));
|
|
768
|
+
}
|
|
769
|
+
var S = r[a];
|
|
770
|
+
S && S.length ? I(S, E, g) : E();
|
|
771
|
+
}
|
|
772
|
+
function j(a, p) {
|
|
773
|
+
if (e[a]) {
|
|
774
|
+
for (var g = e[a].callbacks, m = 0, E = g.length; m < E; m++) {
|
|
775
|
+
var S = g[m][p];
|
|
776
|
+
S && setTimeout(S, 0);
|
|
777
|
+
}
|
|
778
|
+
g.length = 0;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
Prism.hooks.add("complete", function(a) {
|
|
782
|
+
var p = a.element, g = a.language;
|
|
783
|
+
if (!(!p || !g || g === l)) {
|
|
784
|
+
var m = s(p);
|
|
785
|
+
/^diff-./i.test(g) ? (m.push("diff"), m.push(g.substr(5))) : m.push(g), m.every(f) || I(m, function() {
|
|
786
|
+
Prism.highlightElement(p);
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
})();
|
|
791
|
+
(function() {
|
|
792
|
+
if (typeof Prism > "u" || typeof document > "u")
|
|
793
|
+
return;
|
|
794
|
+
var r = "line-numbers", t = /\n(?!$)/g, e = Prism.plugins.lineNumbers = {
|
|
795
|
+
/**
|
|
796
|
+
* Get node for provided line number
|
|
797
|
+
*
|
|
798
|
+
* @param {Element} element pre element
|
|
799
|
+
* @param {number} number line number
|
|
800
|
+
* @returns {Element|undefined}
|
|
801
|
+
*/
|
|
802
|
+
getLine: function(n, h) {
|
|
803
|
+
if (!(n.tagName !== "PRE" || !n.classList.contains(r))) {
|
|
804
|
+
var o = n.querySelector(".line-numbers-rows");
|
|
805
|
+
if (o) {
|
|
806
|
+
var d = parseInt(n.getAttribute("data-start"), 10) || 1, u = d + (o.children.length - 1);
|
|
807
|
+
h < d && (h = d), h > u && (h = u);
|
|
808
|
+
var i = h - d;
|
|
809
|
+
return o.children[i];
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
/**
|
|
814
|
+
* Resizes the line numbers of the given element.
|
|
815
|
+
*
|
|
816
|
+
* This function will not add line numbers. It will only resize existing ones.
|
|
817
|
+
*
|
|
818
|
+
* @param {HTMLElement} element A `<pre>` element with line numbers.
|
|
819
|
+
* @returns {void}
|
|
820
|
+
*/
|
|
821
|
+
resize: function(n) {
|
|
822
|
+
l([n]);
|
|
823
|
+
},
|
|
824
|
+
/**
|
|
825
|
+
* Whether the plugin can assume that the units font sizes and margins are not depended on the size of
|
|
826
|
+
* the current viewport.
|
|
827
|
+
*
|
|
828
|
+
* Setting this to `true` will allow the plugin to do certain optimizations for better performance.
|
|
829
|
+
*
|
|
830
|
+
* Set this to `false` if you use any of the following CSS units: `vh`, `vw`, `vmin`, `vmax`.
|
|
831
|
+
*
|
|
832
|
+
* @type {boolean}
|
|
833
|
+
*/
|
|
834
|
+
assumeViewportIndependence: !0
|
|
835
|
+
};
|
|
836
|
+
function l(n) {
|
|
837
|
+
if (n = n.filter(function(o) {
|
|
838
|
+
var d = c(o), u = d["white-space"];
|
|
839
|
+
return u === "pre-wrap" || u === "pre-line";
|
|
840
|
+
}), n.length != 0) {
|
|
841
|
+
var h = n.map(function(o) {
|
|
842
|
+
var d = o.querySelector("code"), u = o.querySelector(".line-numbers-rows");
|
|
843
|
+
if (!(!d || !u)) {
|
|
844
|
+
var i = o.querySelector(".line-numbers-sizer"), s = d.textContent.split(t);
|
|
845
|
+
i || (i = document.createElement("span"), i.className = "line-numbers-sizer", d.appendChild(i)), i.innerHTML = "0", i.style.display = "block";
|
|
846
|
+
var f = i.getBoundingClientRect().height;
|
|
847
|
+
return i.innerHTML = "", {
|
|
848
|
+
element: o,
|
|
849
|
+
lines: s,
|
|
850
|
+
lineHeights: [],
|
|
851
|
+
oneLinerHeight: f,
|
|
852
|
+
sizer: i
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
}).filter(Boolean);
|
|
856
|
+
h.forEach(function(o) {
|
|
857
|
+
var d = o.sizer, u = o.lines, i = o.lineHeights, s = o.oneLinerHeight;
|
|
858
|
+
i[u.length - 1] = void 0, u.forEach(function(f, C) {
|
|
859
|
+
if (f && f.length > 1) {
|
|
860
|
+
var I = d.appendChild(document.createElement("span"));
|
|
861
|
+
I.style.display = "block", I.textContent = f;
|
|
862
|
+
} else
|
|
863
|
+
i[C] = s;
|
|
864
|
+
});
|
|
865
|
+
}), h.forEach(function(o) {
|
|
866
|
+
for (var d = o.sizer, u = o.lineHeights, i = 0, s = 0; s < u.length; s++)
|
|
867
|
+
u[s] === void 0 && (u[s] = d.children[i++].getBoundingClientRect().height);
|
|
868
|
+
}), h.forEach(function(o) {
|
|
869
|
+
var d = o.sizer, u = o.element.querySelector(".line-numbers-rows");
|
|
870
|
+
d.style.display = "none", d.innerHTML = "", o.lineHeights.forEach(function(i, s) {
|
|
871
|
+
u.children[s].style.height = i + "px";
|
|
872
|
+
});
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
function c(n) {
|
|
877
|
+
return n ? window.getComputedStyle ? getComputedStyle(n) : n.currentStyle || null : null;
|
|
878
|
+
}
|
|
879
|
+
var b = void 0;
|
|
880
|
+
window.addEventListener("resize", function() {
|
|
881
|
+
e.assumeViewportIndependence && b === window.innerWidth || (b = window.innerWidth, l(Array.prototype.slice.call(document.querySelectorAll("pre." + r))));
|
|
882
|
+
}), Prism.hooks.add("complete", function(n) {
|
|
883
|
+
if (n.code) {
|
|
884
|
+
var h = (
|
|
885
|
+
/** @type {Element} */
|
|
886
|
+
n.element
|
|
887
|
+
), o = (
|
|
888
|
+
/** @type {HTMLElement} */
|
|
889
|
+
h.parentNode
|
|
890
|
+
);
|
|
891
|
+
if (!(!o || !/pre/i.test(o.nodeName)) && !h.querySelector(".line-numbers-rows") && Prism.util.isActive(h, r)) {
|
|
892
|
+
h.classList.remove(r), o.classList.add(r);
|
|
893
|
+
var d = n.code.match(t), u = d ? d.length + 1 : 1, i, s = new Array(u + 1).join("<span></span>");
|
|
894
|
+
i = document.createElement("span"), i.setAttribute("aria-hidden", "true"), i.className = "line-numbers-rows", i.innerHTML = s, o.hasAttribute("data-start") && (o.style.counterReset = "linenumber " + (parseInt(o.getAttribute("data-start"), 10) - 1)), n.element.appendChild(i), l([o]), Prism.hooks.run("line-numbers", n);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}), Prism.hooks.add("line-numbers", function(n) {
|
|
898
|
+
n.plugins = n.plugins || {}, n.plugins.lineNumbers = !0;
|
|
899
|
+
});
|
|
900
|
+
})();
|
|
901
|
+
const ft = /* @__PURE__ */ T({
|
|
902
|
+
__name: "ScalarCodeBlock",
|
|
903
|
+
props: {
|
|
904
|
+
content: {},
|
|
905
|
+
lang: { default: "js" },
|
|
906
|
+
lineNumbers: { type: Boolean, default: !1 }
|
|
907
|
+
},
|
|
908
|
+
setup(r) {
|
|
909
|
+
const t = r, { plugins: e, highlightElement: l } = de, c = z(null), b = H(() => t.lang === "node" ? "js" : t.lang);
|
|
910
|
+
return e.autoloader.languages_path = "https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/", te(
|
|
911
|
+
() => [t.lang, t.content],
|
|
912
|
+
() => {
|
|
913
|
+
c.value && re(() => l(c.value));
|
|
914
|
+
}
|
|
915
|
+
), Z(() => {
|
|
916
|
+
c.value && l(c.value);
|
|
917
|
+
}), (n, h) => (w(), y("pre", {
|
|
918
|
+
class: k(["scalar-component scalar-codeblock-pre", {
|
|
919
|
+
"line-numbers": n.lineNumbers
|
|
920
|
+
}])
|
|
921
|
+
}, [
|
|
922
|
+
L("code", {
|
|
923
|
+
ref_key: "el",
|
|
924
|
+
ref: c,
|
|
925
|
+
class: k(`scalar-codeblock-code lang-${b.value}`)
|
|
926
|
+
}, M(n.content), 3)
|
|
927
|
+
], 2));
|
|
928
|
+
}
|
|
929
|
+
}), Ee = (r) => Object.fromEntries(Array.from(r).map((t) => [t.name, t.value])), Le = (r) => ({ raw: t }) => {
|
|
930
|
+
const l = new r().parseFromString(t, "image/svg+xml");
|
|
931
|
+
if (l.getElementsByTagName("parsererror").length)
|
|
932
|
+
return;
|
|
933
|
+
const c = l.documentElement, b = Ee(c.attributes), { width: n, height: h, ...o } = b;
|
|
934
|
+
return ne("svg", { ...o, innerHTML: c.innerHTML });
|
|
935
|
+
}, Ae = ae(async () => {
|
|
936
|
+
const r = typeof DOMParser > "u" ? (await import("@xmldom/xmldom")).DOMParser : DOMParser, t = Le(r);
|
|
183
937
|
return t.props = {
|
|
184
938
|
raw: {
|
|
185
939
|
type: String,
|
|
186
940
|
required: !0
|
|
187
941
|
}
|
|
188
942
|
}, t;
|
|
189
|
-
}),
|
|
943
|
+
}), Te = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
190
944
|
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.429"
|
|
191
945
|
d="M24 1.714v44.572M1.714 24h44.572" />
|
|
192
|
-
</svg>`,
|
|
946
|
+
</svg>`, Ie = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 23.5" fill="currentColor">
|
|
193
947
|
<path d="M11.2 23.5 0 12.3l2.15-2.15 9.05 9.05L30.4 0l2.15 2.15z" />
|
|
194
|
-
</svg>`,
|
|
195
|
-
|
|
196
|
-
</svg
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
</svg>`,
|
|
948
|
+
</svg>`, Me = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
949
|
+
<path d="M4.5 8.25L12 15.75L19.5 8.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
950
|
+
</svg>
|
|
951
|
+
`, Ne = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
952
|
+
<path d="M15.75 19.5L8.25 12L15.75 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
953
|
+
</svg>
|
|
954
|
+
`, je = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
955
|
+
<path d="M8.25 19.5L15.75 12L8.25 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
956
|
+
</svg>`, Oe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
957
|
+
<path d="M19.5 15.75L12 8.25L4.5 15.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
958
|
+
</svg>
|
|
959
|
+
`, Be = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
|
|
203
960
|
<path d="M6,5h4c1.7,0,2-1.3,2-3c1.1,0,2,0.9,2,2v10c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V4c0-1.1,0.9-2,2-2C4,3.7,4.3,5,6,5z M6,2V1
|
|
204
961
|
c0-0.6,0.5-1,1-1h2c0.5,0,1,0.4,1,1v1.3C10,2.9,9.6,3,9,3H7C6.4,3,6,2.6,6,2z" />
|
|
205
|
-
</svg>`,
|
|
962
|
+
</svg>`, De = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
206
963
|
<path stroke="currentColor" d="m12.5 1.5-11 11m0-11 11 11" />
|
|
207
|
-
</svg>`,
|
|
964
|
+
</svg>`, Pe = `<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
|
|
208
965
|
<path
|
|
209
966
|
d="M9.557,7.243A.456.456,0,0,0,9.1,6.991C9.023,7,8.951,7,8.877,7A4,4,0,0,1,5.546.781.5.5,0,0,0,5.564.256.476.476,0,0,0,5.1,0,5,5,0,1,0,9.539,7.767.5.5,0,0,0,9.557,7.243Z"
|
|
210
967
|
fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
|
|
211
|
-
</svg>`,
|
|
968
|
+
</svg>`, ze = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
212
969
|
<path
|
|
213
970
|
d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" />
|
|
214
|
-
</svg>`,
|
|
971
|
+
</svg>`, Re = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 9">
|
|
215
972
|
<g fill="none" fill-rule="evenodd" transform="translate(.67 .67)">
|
|
216
973
|
<rect transform="rotate(180 4 4)" />
|
|
217
974
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"
|
|
218
975
|
d="M2.85 1.73h3.4v3.4m0-3.4L1.74 6.24" />
|
|
219
976
|
</g>
|
|
220
|
-
</svg>`,
|
|
977
|
+
</svg>`, He = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1024 1024">
|
|
221
978
|
<path
|
|
222
979
|
d="M512 0a512 512 0 0 0-162 998c26 4 35-11 35-25l-1-95c-128 23-161-32-172-60-6-15-31-61-52-73-18-10-44-33-1-33 40-1 69 37 78 52 46 78 120 56 149 43 5-33 18-56 33-69-114-13-234-56-234-253 0-56 20-101 53-137-5-13-23-65 5-136 0 0 43-13 141 53a487 487 0 0 1 256 0c98-66 141-53 141-53 28 71 10 123 5 136 33 36 53 81 53 137 0 197-120 240-234 253 18 16 35 47 35 95l-1 140c0 14 9 30 35 25A512 512 0 0 0 512 0z" />
|
|
223
|
-
</svg>`,
|
|
980
|
+
</svg>`, $e = `<svg
|
|
224
981
|
height="24"
|
|
225
982
|
viewBox="0 0 24 24"
|
|
226
983
|
width="24"
|
|
@@ -229,7 +986,7 @@ const le = /* @__PURE__ */ g({
|
|
|
229
986
|
d="M24 12a1 1 0 0 0 -1 -1h-3.91a0.51 0.51 0 0 1 -0.49 -0.4 6.83 6.83 0 0 0 -0.94 -2.28 0.5 0.5 0 0 1 0.06 -0.63l2.77 -2.76a1 1 0 1 0 -1.42 -1.42l-2.76 2.77a0.5 0.5 0 0 1 -0.63 0.06 6.83 6.83 0 0 0 -2.28 -0.94 0.5 0.5 0 0 1 -0.4 -0.49V1a1 1 0 0 0 -2 0v3.91a0.51 0.51 0 0 1 -0.4 0.49 6.83 6.83 0 0 0 -2.28 0.94 0.5 0.5 0 0 1 -0.63 -0.06L4.93 3.51a1 1 0 0 0 -1.42 1.42l2.77 2.76a0.5 0.5 0 0 1 0.06 0.63 6.83 6.83 0 0 0 -0.94 2.28 0.5 0.5 0 0 1 -0.49 0.4H1a1 1 0 0 0 0 2h3.91a0.51 0.51 0 0 1 0.49 0.4 6.83 6.83 0 0 0 0.94 2.28 0.5 0.5 0 0 1 -0.06 0.63l-2.77 2.76a1 1 0 1 0 1.42 1.42l2.76 -2.77a0.5 0.5 0 0 1 0.63 -0.06 6.83 6.83 0 0 0 2.28 0.94 0.5 0.5 0 0 1 0.4 0.49V23a1 1 0 0 0 2 0v-3.91a0.51 0.51 0 0 1 0.4 -0.49 6.83 6.83 0 0 0 2.28 -0.94 0.5 0.5 0 0 1 0.63 0.06l2.76 2.77a1 1 0 1 0 1.42 -1.42l-2.77 -2.76a0.5 0.5 0 0 1 -0.06 -0.63 6.83 6.83 0 0 0 0.94 -2.28 0.5 0.5 0 0 1 0.49 -0.4H23a1 1 0 0 0 1 -1Zm-8.74 2.5A5.76 5.76 0 0 1 9.5 8.74a5.66 5.66 0 0 1 0.16 -1.31 0.49 0.49 0 0 1 0.34 -0.36 5.36 5.36 0 0 1 1.8 -0.31 5.47 5.47 0 0 1 5.46 5.46 5.36 5.36 0 0 1 -0.31 1.8 0.49 0.49 0 0 1 -0.35 0.32 5.53 5.53 0 0 1 -1.34 0.16Z"
|
|
230
987
|
fill="currentColor"
|
|
231
988
|
stroke-width="1"></path>
|
|
232
|
-
</svg>`,
|
|
989
|
+
</svg>`, Ge = `<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
|
|
233
990
|
<path d="M3.500 5.000 A1.500 1.500 0 1 0 6.500 5.000 A1.500 1.500 0 1 0 3.500 5.000 Z" fill="currentColor"
|
|
234
991
|
stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
|
|
235
992
|
<path d="M5,2.25a.625.625,0,0,1-.625-.625v-1a.625.625,0,0,1,1.25,0v1A.625.625,0,0,1,5,2.25Z" fill="currentColor"
|
|
@@ -250,41 +1007,41 @@ const le = /* @__PURE__ */ g({
|
|
|
250
1007
|
<path
|
|
251
1008
|
d="M3.055,3.055a.623.623,0,0,1-.883,0l-.708-.707a.625.625,0,0,1,.884-.884l.707.708A.623.623,0,0,1,3.055,3.055Z"
|
|
252
1009
|
fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
|
|
253
|
-
</svg>`,
|
|
1010
|
+
</svg>`, qe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 593 593">
|
|
254
1011
|
<path fill="currentColor" fill-rule="evenodd"
|
|
255
1012
|
d="M347 0c6 0 12 5 12 12v134l94-95c5-5 13-5 17 0l72 72c4 4 5 12 0 16v1l-95 94h134c7 0 12 5 12 12v101c0 7-5 12-12 12H447l95 94c4 5 5 13 0 17l-72 72c-4 4-12 5-16 0h-1l-94-95v134c0 7-5 12-12 12H246c-7 0-12-5-12-12v-70c0-22 9-43 24-59l130-130c14-14 14-37 0-51L259 142a84 84 0 0 1-25-59V12c0-7 5-12 12-12h101ZM138 52h1l219 219c14 14 14 37 0 51L139 542c-4 5-12 5-17 0l-71-70c-4-5-5-12 0-17l95-96H12c-7 0-12-5-12-12V246c0-7 5-12 12-12h134l-95-94c-4-5-4-12 0-17l71-71c4-5 12-5 16 0Z" />
|
|
256
|
-
</svg>`,
|
|
1013
|
+
</svg>`, Ve = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 662 662">
|
|
257
1014
|
<path fill-rule="evenodd" fill="currentColor"
|
|
258
1015
|
d="M331 0a331 331 0 1 1 0 662 331 331 0 0 1 0-662Zm148.5 109 .6.9a187 187 0 1 1-297.6-.9 267 267 0 1 0 297 0Z" />
|
|
259
|
-
</svg>`,
|
|
1016
|
+
</svg>`, Fe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620">
|
|
260
1017
|
<path fill="currentColor"
|
|
261
1018
|
d="M-.653 309.29c-.078 82.272 31.848 159.735 89.739 218.178l.283.283c122.379 121.247 319.824 121.184 440.16-.283 119.967-121.1 119.409-316.933-.998-437.339l-.99-.99C468.681 30.845 390.716-1.017 307.893-.67c-82.83.354-160.443 32.994-218.814 91.79C31.209 149.555-.724 227.025-.653 309.29Zm469.271-160.789.778.778c87.9 87.9 88.325 231.005.707 319.33-77.753 78.46-199.786 87.412-288.959 26.862l198.513-198.513-.007 166.361 83.68-.07v-306.22H157.11l-.008 83.6h160.584L121.994 436.323c-59.347-87.689-50.536-208.59 26.51-286.343C236.34 61.294 379.94 60.67 468.61 148.494Z" />
|
|
262
|
-
</svg>`,
|
|
1019
|
+
</svg>`, Ue = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 642 642" fill="currentColor">
|
|
263
1020
|
<path
|
|
264
1021
|
d="M321 0a321 321 0 1 1 0 642 321 321 0 0 1 0-642Zm51.3 63L321 189.5 269.7 63l1 136.5-95.8-97.2L228 228l-125.7-53.1 97.2 95.8-136.5-1L189.5 321 63 372.3l136.5-1-97.2 95.8 125.7-53-53.1 125.6 95.8-97.2-1 136.5L321 452.5 372.3 579l-1-136.5 95.8 97.2-53-125.7 125.6 53.1-97.2-95.8 136.5 1L452.5 321 579 269.7l-136.5 1 97.2-95.8L414 228l53.1-125.7-95.8 97.2 1-136.5Z" />
|
|
265
|
-
</svg>`,
|
|
1022
|
+
</svg>`, Ze = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620" fill="currentColor">
|
|
266
1023
|
<path
|
|
267
1024
|
d="M529.2 90.8A310 310 0 1 0 90.8 529.2 310 310 0 0 0 529.2 90.8M122.4 498.2c-54.9-55-15.4-183.5 88.2-287 103.6-103.7 232.1-143.2 287-88.3 54.9 54.8 15.4 183.4-88.3 287-103.5 103.6-232 143.1-286.9 88.3m261.8-262.7A104.7 104.7 0 1 1 236 383.7a104.7 104.7 0 0 1 148.2-148.2" />
|
|
268
|
-
</svg>`,
|
|
1025
|
+
</svg>`, We = `<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 14 14">
|
|
269
1026
|
<path fill="none" stroke="currentColor" d="M14 3.4H0m14 7.2H0" />
|
|
270
|
-
</svg>`,
|
|
1027
|
+
</svg>`, Xe = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
271
1028
|
<path fill="currentColor" fill-rule="evenodd"
|
|
272
1029
|
d="M11.8214 0.0977942C12.1097 -0.00745677 12.4219 -0.0286524 12.7219 0.0367783C13.0248 0.102864 13.3024 0.254542 13.5216 0.47378C13.7408 0.693018 13.8925 0.970598 13.9586 1.27352C14.024 1.57344 14.0028 1.88572 13.8976 2.17395L10.3236 12.8859L10.3234 12.8866C10.2363 13.1501 10.083 13.3868 9.8781 13.574C9.6738 13.7606 9.42509 13.8918 9.15572 13.9549C8.8863 14.0206 8.60441 14.0151 8.33774 13.9389C8.07131 13.8628 7.82926 13.7187 7.63529 13.5209L5.71795 11.6124L3.70389 12.6538C3.54684 12.7351 3.35857 12.7273 3.20874 12.6334C3.05892 12.5395 2.96981 12.3735 2.9744 12.1967L3.05697 9.013L10.1019 3.8956C10.3812 3.69273 10.4432 3.30188 10.2403 3.02261C10.0374 2.74333 9.64659 2.68139 9.36731 2.88425L2.20283 8.08846L0.473125 6.35875L0.473067 6.3587L0.472941 6.35857C0.285618 6.17138 0.147716 5.9406 0.0716193 5.68694C-0.00393616 5.43509 -0.0162115 5.16853 0.0358379 4.91085C0.0879545 4.62934 0.213796 4.36664 0.400577 4.14957C0.588637 3.93101 0.83165 3.76664 1.1045 3.67345L1.10787 3.6723L1.10787 3.67231L11.8214 0.0977942Z"
|
|
273
1030
|
clip-rule="evenodd"></path>
|
|
274
|
-
</svg>`,
|
|
1031
|
+
</svg>`, Ke = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor">
|
|
275
1032
|
<path fill-rule="evenodd"
|
|
276
1033
|
d="M12.6 11.2h.1l3 3a1 1 0 1 1-1.4 1.5l-3-3a1 1 0 0 1-.1-.1 7 7 0 1 1 1.4-1.4zM7 12A5 5 0 1 0 7 2a5 5 0 0 0 0 10z" />
|
|
277
|
-
</svg>`,
|
|
278
|
-
const t = `./${
|
|
279
|
-
return
|
|
280
|
-
},
|
|
1034
|
+
</svg>`, q = /* @__PURE__ */ Object.assign({ "./Add.svg": Te, "./CheckMark.svg": Ie, "./ChevronDown.svg": Me, "./ChevronLeft.svg": Ne, "./ChevronRight.svg": je, "./ChevronUp.svg": Oe, "./Clipboard.svg": Be, "./Close.svg": De, "./DarkMode.svg": Pe, "./Ellipses.svg": ze, "./ExternalLink.svg": Re, "./GitHub.svg": He, "./LightDarkModeToggle.svg": $e, "./LightMode.svg": Ge, "./Logo.svg": qe, "./LogoAPI.svg": Ve, "./LogoClient.svg": Fe, "./LogoMarket.svg": Ue, "./LogoSwagger.svg": Ze, "./Menu.svg": We, "./PaperAirplane.svg": Xe, "./Search.svg": Ke }), Ye = (r) => {
|
|
1035
|
+
const t = `./${r}.svg`;
|
|
1036
|
+
return q[t] === void 0 ? (console.warn(`Could not find icon: ${r}`), "") : q[t];
|
|
1037
|
+
}, Y = /* @__PURE__ */ T({
|
|
281
1038
|
__name: "ScalarIcon",
|
|
282
1039
|
props: {
|
|
283
1040
|
icon: {},
|
|
284
1041
|
size: {}
|
|
285
1042
|
},
|
|
286
|
-
setup(
|
|
287
|
-
const t =
|
|
1043
|
+
setup(r) {
|
|
1044
|
+
const t = r, e = N({
|
|
288
1045
|
variants: {
|
|
289
1046
|
size: {
|
|
290
1047
|
xs: "h-3 w-3",
|
|
@@ -298,14 +1055,14 @@ const le = /* @__PURE__ */ g({
|
|
|
298
1055
|
defaultVariants: {
|
|
299
1056
|
size: "full"
|
|
300
1057
|
}
|
|
301
|
-
}),
|
|
302
|
-
return (
|
|
1058
|
+
}), l = H(() => Ye(t.icon));
|
|
1059
|
+
return (c, b) => l.value ? (w(), P(v(Ae), {
|
|
303
1060
|
key: 0,
|
|
304
|
-
class:
|
|
305
|
-
raw:
|
|
306
|
-
}, null, 8, ["class", "raw"])) :
|
|
1061
|
+
class: k(v(x)("scalar-icon", v(e)({ size: c.size }))),
|
|
1062
|
+
raw: l.value
|
|
1063
|
+
}, null, 8, ["class", "raw"])) : A("", !0);
|
|
307
1064
|
}
|
|
308
|
-
}),
|
|
1065
|
+
}), Je = ["ariaDisabled"], Qe = { class: "sr-only" }, et = /* @__PURE__ */ T({
|
|
309
1066
|
__name: "ScalarIconButton",
|
|
310
1067
|
props: {
|
|
311
1068
|
label: {},
|
|
@@ -314,8 +1071,8 @@ const le = /* @__PURE__ */ g({
|
|
|
314
1071
|
variant: { default: "ghost" },
|
|
315
1072
|
size: { default: "md" }
|
|
316
1073
|
},
|
|
317
|
-
setup(
|
|
318
|
-
const t =
|
|
1074
|
+
setup(r) {
|
|
1075
|
+
const t = N({
|
|
319
1076
|
base: "scalar-icon-button grid aspect-square cursor-pointer rounded",
|
|
320
1077
|
variants: {
|
|
321
1078
|
size: {
|
|
@@ -327,19 +1084,19 @@ const le = /* @__PURE__ */ g({
|
|
|
327
1084
|
disabled: {
|
|
328
1085
|
true: "cursor-not-allowed shadow-none"
|
|
329
1086
|
},
|
|
330
|
-
variant:
|
|
1087
|
+
variant: K
|
|
331
1088
|
}
|
|
332
1089
|
});
|
|
333
|
-
return (e,
|
|
1090
|
+
return (e, l) => (w(), y("button", {
|
|
334
1091
|
ariaDisabled: e.disabled || void 0,
|
|
335
|
-
class:
|
|
1092
|
+
class: k(v(x)(v(t)({ size: e.size, variant: e.variant, disabled: e.disabled }))),
|
|
336
1093
|
type: "button"
|
|
337
1094
|
}, [
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
], 10,
|
|
1095
|
+
D(v(Y), { icon: e.icon }, null, 8, ["icon"]),
|
|
1096
|
+
L("span", Qe, M(e.label), 1)
|
|
1097
|
+
], 10, Je));
|
|
341
1098
|
}
|
|
342
|
-
}),
|
|
1099
|
+
}), bt = () => V({
|
|
343
1100
|
open: !1,
|
|
344
1101
|
show() {
|
|
345
1102
|
this.open = !0;
|
|
@@ -347,7 +1104,7 @@ const le = /* @__PURE__ */ g({
|
|
|
347
1104
|
hide() {
|
|
348
1105
|
this.open = !1;
|
|
349
1106
|
}
|
|
350
|
-
}),
|
|
1107
|
+
}), tt = /* @__PURE__ */ T({
|
|
351
1108
|
__name: "ScalarModal",
|
|
352
1109
|
props: {
|
|
353
1110
|
state: {},
|
|
@@ -357,8 +1114,8 @@ const le = /* @__PURE__ */ g({
|
|
|
357
1114
|
size: { default: "md" },
|
|
358
1115
|
variant: {}
|
|
359
1116
|
},
|
|
360
|
-
setup(
|
|
361
|
-
const t =
|
|
1117
|
+
setup(r) {
|
|
1118
|
+
const t = N({
|
|
362
1119
|
base: [
|
|
363
1120
|
"scalar-modal",
|
|
364
1121
|
"col leading-snug relative mx-auto mb-0 mt-20 w-full rounded-lg bg-back-2 text-left text-fore-1 opacity-0"
|
|
@@ -376,46 +1133,46 @@ const le = /* @__PURE__ */ g({
|
|
|
376
1133
|
}
|
|
377
1134
|
}
|
|
378
1135
|
});
|
|
379
|
-
return (e,
|
|
1136
|
+
return (e, l) => (w(), P(v(ue), {
|
|
380
1137
|
open: e.state.open,
|
|
381
|
-
onClose:
|
|
1138
|
+
onClose: l[0] || (l[0] = (c) => e.state.hide())
|
|
382
1139
|
}, {
|
|
383
|
-
default:
|
|
384
|
-
|
|
385
|
-
class:
|
|
386
|
-
|
|
1140
|
+
default: O(() => [
|
|
1141
|
+
L("div", {
|
|
1142
|
+
class: k(
|
|
1143
|
+
v(x)(
|
|
387
1144
|
"scalar-modal-layout fixed left-0 top-0",
|
|
388
1145
|
"z-[1001] h-[100dvh] w-[100dvw]",
|
|
389
1146
|
"bg-backdrop p-5 opacity-0"
|
|
390
1147
|
)
|
|
391
1148
|
)
|
|
392
1149
|
}, [
|
|
393
|
-
|
|
394
|
-
class:
|
|
395
|
-
style:
|
|
1150
|
+
D(v(pe), {
|
|
1151
|
+
class: k(v(t)({ size: e.size, variant: e.variant })),
|
|
1152
|
+
style: W({ maxWidth: e.maxWidth })
|
|
396
1153
|
}, {
|
|
397
|
-
default:
|
|
398
|
-
e.title ? (
|
|
1154
|
+
default: O(() => [
|
|
1155
|
+
e.title ? (w(), P(v(me), {
|
|
399
1156
|
key: 0,
|
|
400
|
-
class:
|
|
1157
|
+
class: k(["scalar-modal-header font-semiBold m-0 rounded-lg px-6 py-3 text-left text-xs text-fore-1", { "pb-0 pt-6": e.variant === "history" }])
|
|
401
1158
|
}, {
|
|
402
|
-
default:
|
|
403
|
-
|
|
1159
|
+
default: O(() => [
|
|
1160
|
+
oe(M(e.title), 1)
|
|
404
1161
|
]),
|
|
405
1162
|
_: 1
|
|
406
|
-
}, 8, ["class"])) :
|
|
407
|
-
|
|
408
|
-
class:
|
|
1163
|
+
}, 8, ["class"])) : A("", !0),
|
|
1164
|
+
D(v(he), {
|
|
1165
|
+
class: k([
|
|
409
1166
|
"scalar-modal-body relative max-h-[calc(100dvh-240px)] overflow-y-auto rounded-lg bg-back-1 px-6 pb-4 pt-6",
|
|
410
|
-
|
|
1167
|
+
v(x)(
|
|
411
1168
|
e.bodyClass,
|
|
412
1169
|
e.variant === "history" && "pt-3",
|
|
413
1170
|
e.variant === "search" && "col max-h-[440px] overflow-hidden p-0"
|
|
414
1171
|
)
|
|
415
1172
|
])
|
|
416
1173
|
}, {
|
|
417
|
-
default:
|
|
418
|
-
|
|
1174
|
+
default: O(() => [
|
|
1175
|
+
B(e.$slots, "default", {}, void 0, !0)
|
|
419
1176
|
]),
|
|
420
1177
|
_: 3
|
|
421
1178
|
}, 8, ["class"])
|
|
@@ -427,7 +1184,7 @@ const le = /* @__PURE__ */ g({
|
|
|
427
1184
|
_: 3
|
|
428
1185
|
}, 8, ["open"]));
|
|
429
1186
|
}
|
|
430
|
-
}),
|
|
1187
|
+
}), rt = /* @__PURE__ */ $(tt, [["__scopeId", "data-v-4f0b1a0d"]]), at = { class: "scalar-input-container relative" }, nt = ["for"], ot = { class: "icon-slot cursor-pointer text-ghost hover:text-fore-1 !empty:flex !empty:w-7 !empty:items-center !empty:pr-3" }, st = /* @__PURE__ */ T({
|
|
431
1188
|
__name: "ScalarTextField",
|
|
432
1189
|
props: {
|
|
433
1190
|
modelValue: {},
|
|
@@ -443,8 +1200,8 @@ const le = /* @__PURE__ */ g({
|
|
|
443
1200
|
disableTrim: { type: Boolean, default: !1 }
|
|
444
1201
|
},
|
|
445
1202
|
emits: ["submit", "update:modelValue"],
|
|
446
|
-
setup(
|
|
447
|
-
const e =
|
|
1203
|
+
setup(r, { emit: t }) {
|
|
1204
|
+
const e = r, l = N({
|
|
448
1205
|
base: "scalar-input-wrapper relative flex items-center rounded border border-solid border-border",
|
|
449
1206
|
variants: {
|
|
450
1207
|
focus: {
|
|
@@ -452,81 +1209,81 @@ const le = /* @__PURE__ */ g({
|
|
|
452
1209
|
},
|
|
453
1210
|
error: { true: "scalar-input-wrapper-error border-error" }
|
|
454
1211
|
}
|
|
455
|
-
}),
|
|
456
|
-
let
|
|
1212
|
+
}), c = F(), b = c.id || `id-${ge()}`, n = z(), h = z(!1);
|
|
1213
|
+
let o;
|
|
457
1214
|
if (e.isMultiline) {
|
|
458
|
-
const { triggerResize:
|
|
459
|
-
element:
|
|
1215
|
+
const { triggerResize: s } = ve({
|
|
1216
|
+
element: n,
|
|
460
1217
|
input: e.modelValue
|
|
461
1218
|
});
|
|
462
|
-
|
|
1219
|
+
o = s;
|
|
463
1220
|
}
|
|
464
|
-
function
|
|
465
|
-
const
|
|
466
|
-
e.isMultiline &&
|
|
1221
|
+
function d(s) {
|
|
1222
|
+
const f = s.target.value;
|
|
1223
|
+
e.isMultiline && o(), e.handleFieldChange ? e.handleFieldChange(f) : t("update:modelValue", f);
|
|
467
1224
|
}
|
|
468
|
-
function
|
|
469
|
-
const
|
|
470
|
-
e.handleFieldSubmit ? e.handleFieldSubmit(
|
|
1225
|
+
function u(s) {
|
|
1226
|
+
const f = s.target, C = e.disableTrim || e.isMultiline ? f.value : f.value.trim();
|
|
1227
|
+
e.handleFieldSubmit ? e.handleFieldSubmit(C) : t("submit", C);
|
|
471
1228
|
}
|
|
472
|
-
function
|
|
473
|
-
|
|
1229
|
+
function i(s) {
|
|
1230
|
+
h.value = !1, e.emitOnBlur && e.modelValue && u(s);
|
|
474
1231
|
}
|
|
475
|
-
return
|
|
476
|
-
var
|
|
477
|
-
Object.prototype.hasOwnProperty.call(
|
|
478
|
-
}), (
|
|
479
|
-
|
|
480
|
-
class:
|
|
1232
|
+
return Z(() => {
|
|
1233
|
+
var s;
|
|
1234
|
+
Object.prototype.hasOwnProperty.call(c, "autofocus") && ((s = n.value) == null || s.focus());
|
|
1235
|
+
}), (s, f) => (w(), y("div", at, [
|
|
1236
|
+
L("div", {
|
|
1237
|
+
class: k(v(l)({ error: s.error, focus: h.value }))
|
|
481
1238
|
}, [
|
|
482
|
-
(
|
|
1239
|
+
(w(), P(se(s.isMultiline ? "textarea" : "input"), U({ id: v(b) }, s.$attrs, {
|
|
483
1240
|
ref_key: "input",
|
|
484
|
-
ref:
|
|
1241
|
+
ref: n,
|
|
485
1242
|
class: [
|
|
486
1243
|
"scalar-input",
|
|
487
|
-
|
|
488
|
-
{ "min-h-[77px]":
|
|
1244
|
+
v(x)(
|
|
1245
|
+
{ "min-h-[77px]": s.isMultiline },
|
|
489
1246
|
"z-10 w-full resize-none appearance-none border-0 bg-transparent p-3 text-sm text-fore-1",
|
|
490
1247
|
"outline-none transition-opacity"
|
|
491
1248
|
)
|
|
492
1249
|
],
|
|
493
|
-
placeholder:
|
|
494
|
-
value:
|
|
495
|
-
onBlur:
|
|
496
|
-
onFocus:
|
|
497
|
-
onInput:
|
|
498
|
-
onKeyup:
|
|
1250
|
+
placeholder: s.placeholder,
|
|
1251
|
+
value: s.modelValue,
|
|
1252
|
+
onBlur: i,
|
|
1253
|
+
onFocus: f[0] || (f[0] = (C) => h.value = !0),
|
|
1254
|
+
onInput: d,
|
|
1255
|
+
onKeyup: le(u, ["enter"])
|
|
499
1256
|
}), null, 16, ["id", "class", "placeholder", "value", "onKeyup"])),
|
|
500
|
-
|
|
1257
|
+
s.label ? (w(), y("label", {
|
|
501
1258
|
key: 0,
|
|
502
|
-
class:
|
|
503
|
-
|
|
1259
|
+
class: k(
|
|
1260
|
+
v(x)(
|
|
504
1261
|
"scalar-input-label pointer-events-none absolute left-0 top-0 mx-2 my-3 px-1 text-xs",
|
|
505
1262
|
"shadow-current z-10 origin-top-left rounded text-fore-3 transition-transform"
|
|
506
1263
|
)
|
|
507
1264
|
),
|
|
508
|
-
for:
|
|
509
|
-
style:
|
|
510
|
-
"box-shadow": `0 0 4px 4px ${
|
|
511
|
-
"background-color":
|
|
1265
|
+
for: v(b),
|
|
1266
|
+
style: W({
|
|
1267
|
+
"box-shadow": `0 0 4px 4px ${s.labelShadowColor}`,
|
|
1268
|
+
"background-color": s.labelShadowColor
|
|
512
1269
|
})
|
|
513
|
-
},
|
|
514
|
-
|
|
515
|
-
|
|
1270
|
+
}, M(s.label), 15, nt)) : A("", !0),
|
|
1271
|
+
L("div", ot, [
|
|
1272
|
+
B(s.$slots, "default", {}, void 0, !0)
|
|
516
1273
|
])
|
|
517
1274
|
], 2),
|
|
518
|
-
|
|
519
|
-
class:
|
|
520
|
-
|
|
1275
|
+
L("span", {
|
|
1276
|
+
class: k(
|
|
1277
|
+
v(x)(
|
|
521
1278
|
"helper-text before:rounded-full mt-1.5 flex items-center text-xs text-error before:font-black",
|
|
522
1279
|
"before:mr-1.5 before:block before:h-4 before:w-4 before:text-center before:text-xxs before:leading-4",
|
|
523
1280
|
"before:bg-error before:text-white before:content-['!'] empty:hidden"
|
|
524
1281
|
)
|
|
525
1282
|
)
|
|
526
|
-
},
|
|
1283
|
+
}, M(s.helperText), 3)
|
|
527
1284
|
]));
|
|
528
1285
|
}
|
|
529
|
-
}),
|
|
1286
|
+
}), lt = /* @__PURE__ */ $(st, [["__scopeId", "data-v-acbd8aa4"]]), kt = {
|
|
530
1287
|
boxShadow: {
|
|
531
1288
|
DEFAULT: "var(--theme-shadow-1, var(--default-theme-shadow-1))",
|
|
532
1289
|
md: "var(--theme-shadow-2, var(--default-theme-shadow-2))",
|
|
@@ -558,7 +1315,7 @@ const le = /* @__PURE__ */ g({
|
|
|
558
1315
|
ghost: "var(--theme-color-ghost, var(--default-theme-color-ghost))",
|
|
559
1316
|
transparent: "transparent"
|
|
560
1317
|
}
|
|
561
|
-
},
|
|
1318
|
+
}, wt = {
|
|
562
1319
|
borderRadius: {
|
|
563
1320
|
DEFAULT: "var(--theme-radius, var(--default-theme-radius))",
|
|
564
1321
|
md: "var(--theme-radius, var(--default-theme-radius))",
|
|
@@ -582,21 +1339,22 @@ const le = /* @__PURE__ */ g({
|
|
|
582
1339
|
"screen-md": "640px",
|
|
583
1340
|
"screen-lg": "800px"
|
|
584
1341
|
}
|
|
585
|
-
},
|
|
586
|
-
install: (
|
|
587
|
-
|
|
1342
|
+
}, _t = {
|
|
1343
|
+
install: (r) => {
|
|
1344
|
+
r.component("ScalarButton", Ce), r.component("ScalarIcon", Y), r.component("ScalarIconButton", et), r.component("ScalarLoading", X), r.component("ScalarModal", rt), r.component("ScalarTextField", lt);
|
|
588
1345
|
}
|
|
589
1346
|
};
|
|
590
1347
|
export {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
1348
|
+
Ce as ScalarButton,
|
|
1349
|
+
ft as ScalarCodeBlock,
|
|
1350
|
+
Y as ScalarIcon,
|
|
1351
|
+
et as ScalarIconButton,
|
|
1352
|
+
X as ScalarLoading,
|
|
1353
|
+
rt as ScalarModal,
|
|
1354
|
+
lt as ScalarTextField,
|
|
1355
|
+
_t as default,
|
|
1356
|
+
wt as extend,
|
|
1357
|
+
kt as theme,
|
|
1358
|
+
gt as useLoadingState,
|
|
1359
|
+
bt as useModal
|
|
602
1360
|
};
|