@quietmind/mdx-docs 0.1.18 → 0.1.20

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 DELETED
@@ -1,1548 +0,0 @@
1
- import { jsx as a, jsxs as m, Fragment as U } from "react/jsx-runtime";
2
- import X, { createContext as Z, useContext as K, useState as F, Suspense as q, useEffect as x, useLayoutEffect as Y, useMemo as V, StrictMode as J } from "react";
3
- import { createRoot as Q } from "react-dom/client";
4
- import { AppBar as ee, Toolbar as P, IconButton as v, Typography as te, Box as f, useTheme as D, Tooltip as re, CircularProgress as ae, List as ne, ListItem as oe, ListItemButton as se, ListItemText as ie, Drawer as $, createTheme as le, ThemeProvider as ce, CssBaseline as de } from "@mui/material";
5
- import { Link as L, Routes as pe, Route as I, useLocation as B, BrowserRouter as ue, useNavigate as fe } from "react-router-dom";
6
- import ge from "@mui/icons-material/DarkMode";
7
- import me from "@mui/icons-material/LightMode";
8
- import be from "@mui/icons-material/Menu";
9
- import { MDXProvider as he } from "@mdx-js/react";
10
- import ye from "@mui/icons-material/Check";
11
- import Se from "@mui/icons-material/ContentCopy";
12
- import { Highlight as M } from "prism-react-renderer";
13
- import xe from "prismjs";
14
- const j = Z(null), ke = ({ pages: e, site: t, children: r }) => /* @__PURE__ */ a(j.Provider, { value: { pages: e, site: t }, children: r }), E = () => {
15
- const e = K(j);
16
- if (!e)
17
- throw new Error("useDocsContext must be used within a DocsProvider");
18
- return e;
19
- };
20
- function we({ darkMode: e, setDarkMode: t, handleDrawerToggle: r }) {
21
- const { site: n } = E();
22
- return /* @__PURE__ */ a(
23
- ee,
24
- {
25
- position: "fixed",
26
- sx: { zIndex: (i) => i.zIndex.drawer + 1 },
27
- children: /* @__PURE__ */ m(P, { children: [
28
- /* @__PURE__ */ a(
29
- v,
30
- {
31
- color: "inherit",
32
- edge: "start",
33
- onClick: r,
34
- "aria-label": "Toggle navigation menu",
35
- sx: { mr: 2, display: { sm: "none" } },
36
- children: /* @__PURE__ */ a(be, {})
37
- }
38
- ),
39
- /* @__PURE__ */ a(
40
- te,
41
- {
42
- variant: "h6",
43
- noWrap: !0,
44
- component: L,
45
- to: "/",
46
- sx: {
47
- textDecoration: "none",
48
- color: "inherit",
49
- "&:hover": {
50
- color: "inherit"
51
- }
52
- },
53
- children: n.name
54
- }
55
- ),
56
- /* @__PURE__ */ a(f, { sx: { flexGrow: 1 } }),
57
- /* @__PURE__ */ a(
58
- v,
59
- {
60
- onClick: () => t(!e),
61
- color: "inherit",
62
- "aria-label": e ? "Switch to light mode" : "Switch to dark mode",
63
- sx: {
64
- ml: 1,
65
- "&:focus:not(:focus-visible)": {
66
- outline: "none"
67
- }
68
- },
69
- children: e ? /* @__PURE__ */ a(me, {}) : /* @__PURE__ */ a(ge, {})
70
- }
71
- )
72
- ] })
73
- }
74
- );
75
- }
76
- (function(e) {
77
- 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", r = {
78
- pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
79
- lookbehind: !0,
80
- alias: "punctuation",
81
- // this looks reasonably well in all themes
82
- inside: null
83
- // see below
84
- }, n = {
85
- bash: r,
86
- environment: {
87
- pattern: RegExp("\\$" + t),
88
- alias: "constant"
89
- },
90
- variable: [
91
- // [0]: Arithmetic Environment
92
- {
93
- pattern: /\$?\(\([\s\S]+?\)\)/,
94
- greedy: !0,
95
- inside: {
96
- // If there is a $ sign at the beginning highlight $(( and )) as variable
97
- variable: [
98
- {
99
- pattern: /(^\$\(\([\s\S]+)\)\)/,
100
- lookbehind: !0
101
- },
102
- /^\$\(\(/
103
- ],
104
- number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
105
- // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
106
- operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
107
- // If there is no $ sign at the beginning highlight (( and )) as punctuation
108
- punctuation: /\(\(?|\)\)?|,|;/
109
- }
110
- },
111
- // [1]: Command Substitution
112
- {
113
- pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
114
- greedy: !0,
115
- inside: {
116
- variable: /^\$\(|^`|\)$|`$/
117
- }
118
- },
119
- // [2]: Brace expansion
120
- {
121
- pattern: /\$\{[^}]+\}/,
122
- greedy: !0,
123
- inside: {
124
- operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
125
- punctuation: /[\[\]]/,
126
- environment: {
127
- pattern: RegExp("(\\{)" + t),
128
- lookbehind: !0,
129
- alias: "constant"
130
- }
131
- }
132
- },
133
- /\$(?:\w+|[#?*!@$])/
134
- ],
135
- // Escape sequences from echo and printf's manuals, and escaped quotes.
136
- 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})/
137
- };
138
- e.languages.bash = {
139
- shebang: {
140
- pattern: /^#!\s*\/.*/,
141
- alias: "important"
142
- },
143
- comment: {
144
- pattern: /(^|[^"{\\$])#.*/,
145
- lookbehind: !0
146
- },
147
- "function-name": [
148
- // a) function foo {
149
- // b) foo() {
150
- // c) function foo() {
151
- // but not “foo {”
152
- {
153
- // a) and c)
154
- pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
155
- lookbehind: !0,
156
- alias: "function"
157
- },
158
- {
159
- // b)
160
- pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
161
- alias: "function"
162
- }
163
- ],
164
- // Highlight variable names as variables in for and select beginnings.
165
- "for-or-select": {
166
- pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
167
- alias: "variable",
168
- lookbehind: !0
169
- },
170
- // Highlight variable names as variables in the left-hand part
171
- // of assignments (“=” and “+=”).
172
- "assign-left": {
173
- pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
174
- inside: {
175
- environment: {
176
- pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t),
177
- lookbehind: !0,
178
- alias: "constant"
179
- }
180
- },
181
- alias: "variable",
182
- lookbehind: !0
183
- },
184
- // Highlight parameter names as variables
185
- parameter: {
186
- pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
187
- alias: "variable",
188
- lookbehind: !0
189
- },
190
- string: [
191
- // Support for Here-documents https://en.wikipedia.org/wiki/Here_document
192
- {
193
- pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
194
- lookbehind: !0,
195
- greedy: !0,
196
- inside: n
197
- },
198
- // Here-document with quotes around the tag
199
- // → No expansion (so no “inside”).
200
- {
201
- pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
202
- lookbehind: !0,
203
- greedy: !0,
204
- inside: {
205
- bash: r
206
- }
207
- },
208
- // “Normal” string
209
- {
210
- // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
211
- pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
212
- lookbehind: !0,
213
- greedy: !0,
214
- inside: n
215
- },
216
- {
217
- // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
218
- pattern: /(^|[^$\\])'[^']*'/,
219
- lookbehind: !0,
220
- greedy: !0
221
- },
222
- {
223
- // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
224
- pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
225
- greedy: !0,
226
- inside: {
227
- entity: n.entity
228
- }
229
- }
230
- ],
231
- environment: {
232
- pattern: RegExp("\\$?" + t),
233
- alias: "constant"
234
- },
235
- variable: n.variable,
236
- function: {
237
- 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;|&])/,
238
- lookbehind: !0
239
- },
240
- keyword: {
241
- pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
242
- lookbehind: !0
243
- },
244
- // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
245
- builtin: {
246
- 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;|&])/,
247
- lookbehind: !0,
248
- // Alias added to make those easier to distinguish from strings.
249
- alias: "class-name"
250
- },
251
- boolean: {
252
- pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
253
- lookbehind: !0
254
- },
255
- "file-descriptor": {
256
- pattern: /\B&\d\b/,
257
- alias: "important"
258
- },
259
- operator: {
260
- // Lots of redirections here, but not just that.
261
- pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
262
- inside: {
263
- "file-descriptor": {
264
- pattern: /^\d/,
265
- alias: "important"
266
- }
267
- }
268
- },
269
- punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
270
- number: {
271
- pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
272
- lookbehind: !0
273
- }
274
- }, r.inside = e.languages.bash;
275
- for (var i = [
276
- "comment",
277
- "function-name",
278
- "for-or-select",
279
- "assign-left",
280
- "parameter",
281
- "string",
282
- "environment",
283
- "function",
284
- "keyword",
285
- "builtin",
286
- "boolean",
287
- "file-descriptor",
288
- "operator",
289
- "punctuation",
290
- "number"
291
- ], s = n.variable[1].inside, l = 0; l < i.length; l++)
292
- s[i[l]] = e.languages.bash[i[l]];
293
- e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
294
- })(Prism);
295
- var O = {}, R;
296
- function Ae() {
297
- return R || (R = 1, function(e) {
298
- var t = [
299
- // normal string
300
- /"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,
301
- /'[^']*'/.source,
302
- /\$'(?:[^'\\]|\\[\s\S])*'/.source,
303
- // here doc
304
- // 2 capturing groups
305
- /<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source
306
- ].join("|");
307
- e.languages["shell-session"] = {
308
- command: {
309
- pattern: RegExp(
310
- // user info
311
- /^/.source + "(?:" + // <user> ":" ( <path> )?
312
- (/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source + "|" + // <path>
313
- // Since the path pattern is quite general, we will require it to start with a special character to
314
- // prevent false positives.
315
- /[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source) + ")?" + // shell symbol
316
- /[$#%](?=\s)/.source + // bash command
317
- /(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<<str>>)+/.source.replace(/<<str>>/g, function() {
318
- return t;
319
- }),
320
- "m"
321
- ),
322
- greedy: !0,
323
- inside: {
324
- info: {
325
- // foo@bar:~/files$ exit
326
- // foo@bar$ exit
327
- // ~/files$ exit
328
- pattern: /^[^#$%]+/,
329
- alias: "punctuation",
330
- inside: {
331
- user: /^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,
332
- punctuation: /:/,
333
- path: /[\s\S]+/
334
- }
335
- },
336
- bash: {
337
- pattern: /(^[$#%]\s*)\S[\s\S]*/,
338
- lookbehind: !0,
339
- alias: "language-bash",
340
- inside: e.languages.bash
341
- },
342
- "shell-symbol": {
343
- pattern: /^[$#%]/,
344
- alias: "important"
345
- }
346
- }
347
- },
348
- output: /.(?:.*(?:[\r\n]|.$))*/
349
- }, e.languages["sh-session"] = e.languages.shellsession = e.languages["shell-session"];
350
- }(Prism)), O;
351
- }
352
- Ae();
353
- (function(e) {
354
- var t = /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source, r = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g, function() {
355
- return t;
356
- }), n = /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source, i = /--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g, function() {
357
- return n;
358
- }), s = {
359
- pattern: RegExp(n),
360
- greedy: !0
361
- }, l = {
362
- pattern: /(^[ \t]*)#.*/m,
363
- lookbehind: !0,
364
- greedy: !0
365
- };
366
- function p(o, c) {
367
- return o = o.replace(/<OPT>/g, function() {
368
- return i;
369
- }).replace(/<SP>/g, function() {
370
- return r;
371
- }), RegExp(o, c);
372
- }
373
- e.languages.docker = {
374
- instruction: {
375
- pattern: /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,
376
- lookbehind: !0,
377
- greedy: !0,
378
- inside: {
379
- options: {
380
- pattern: p(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source, "i"),
381
- lookbehind: !0,
382
- greedy: !0,
383
- inside: {
384
- property: {
385
- pattern: /(^|\s)--[\w-]+/,
386
- lookbehind: !0
387
- },
388
- string: [
389
- s,
390
- {
391
- pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/,
392
- lookbehind: !0
393
- }
394
- ],
395
- operator: /\\$/m,
396
- punctuation: /=/
397
- }
398
- },
399
- keyword: [
400
- {
401
- // https://docs.docker.com/engine/reference/builder/#healthcheck
402
- pattern: p(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source, "i"),
403
- lookbehind: !0,
404
- greedy: !0
405
- },
406
- {
407
- // https://docs.docker.com/engine/reference/builder/#from
408
- pattern: p(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source, "i"),
409
- lookbehind: !0,
410
- greedy: !0
411
- },
412
- {
413
- // https://docs.docker.com/engine/reference/builder/#onbuild
414
- pattern: p(/(^ONBUILD<SP>)\w+/.source, "i"),
415
- lookbehind: !0,
416
- greedy: !0
417
- },
418
- {
419
- pattern: /^\w+/,
420
- greedy: !0
421
- }
422
- ],
423
- comment: l,
424
- string: s,
425
- variable: /\$(?:\w+|\{[^{}"'\\]*\})/,
426
- operator: /\\$/m
427
- }
428
- },
429
- comment: l
430
- }, e.languages.dockerfile = e.languages.docker;
431
- })(Prism);
432
- (function(e) {
433
- var t = /[*&][^\s[\]{},]+/, r = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, n = "(?:" + r.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + r.source + ")?)", i = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
434
- return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
435
- }), s = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
436
- function l(p, o) {
437
- o = (o || "").replace(/m/g, "") + "m";
438
- var c = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
439
- return n;
440
- }).replace(/<<value>>/g, function() {
441
- return p;
442
- });
443
- return RegExp(c, o);
444
- }
445
- e.languages.yaml = {
446
- scalar: {
447
- pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
448
- return n;
449
- })),
450
- lookbehind: !0,
451
- alias: "string"
452
- },
453
- comment: /#.*/,
454
- key: {
455
- pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
456
- return n;
457
- }).replace(/<<key>>/g, function() {
458
- return "(?:" + i + "|" + s + ")";
459
- })),
460
- lookbehind: !0,
461
- greedy: !0,
462
- alias: "atrule"
463
- },
464
- directive: {
465
- pattern: /(^[ \t]*)%.+/m,
466
- lookbehind: !0,
467
- alias: "important"
468
- },
469
- datetime: {
470
- pattern: l(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),
471
- lookbehind: !0,
472
- alias: "number"
473
- },
474
- boolean: {
475
- pattern: l(/false|true/.source, "i"),
476
- lookbehind: !0,
477
- alias: "important"
478
- },
479
- null: {
480
- pattern: l(/null|~/.source, "i"),
481
- lookbehind: !0,
482
- alias: "important"
483
- },
484
- string: {
485
- pattern: l(s),
486
- lookbehind: !0,
487
- greedy: !0
488
- },
489
- number: {
490
- pattern: l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"),
491
- lookbehind: !0
492
- },
493
- tag: r,
494
- important: t,
495
- punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
496
- }, e.languages.yml = e.languages.yaml;
497
- })(Prism);
498
- (function(e) {
499
- var t = /(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;
500
- function r(n) {
501
- return n.replace(/__/g, function() {
502
- return t;
503
- });
504
- }
505
- e.languages.toml = {
506
- comment: {
507
- pattern: /#.*/,
508
- greedy: !0
509
- },
510
- table: {
511
- pattern: RegExp(r(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source), "m"),
512
- lookbehind: !0,
513
- greedy: !0,
514
- alias: "class-name"
515
- },
516
- key: {
517
- pattern: RegExp(r(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source), "m"),
518
- lookbehind: !0,
519
- greedy: !0,
520
- alias: "property"
521
- },
522
- string: {
523
- pattern: /"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,
524
- greedy: !0
525
- },
526
- date: [
527
- {
528
- // Offset Date-Time, Local Date-Time, Local Date
529
- pattern: /\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,
530
- alias: "number"
531
- },
532
- {
533
- // Local Time
534
- pattern: /\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,
535
- alias: "number"
536
- }
537
- ],
538
- number: /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,
539
- boolean: /\b(?:false|true)\b/,
540
- punctuation: /[.,=[\]{}]/
541
- };
542
- })(Prism);
543
- Prism.languages.javascript = Prism.languages.extend("clike", {
544
- "class-name": [
545
- Prism.languages.clike["class-name"],
546
- {
547
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
548
- lookbehind: !0
549
- }
550
- ],
551
- keyword: [
552
- {
553
- pattern: /((?:^|\})\s*)catch\b/,
554
- lookbehind: !0
555
- },
556
- {
557
- 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/,
558
- lookbehind: !0
559
- }
560
- ],
561
- // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
562
- function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
563
- number: {
564
- pattern: RegExp(
565
- /(^|[^\w$])/.source + "(?:" + // constant
566
- (/NaN|Infinity/.source + "|" + // binary integer
567
- /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
568
- /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
569
- /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
570
- /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
571
- /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
572
- ),
573
- lookbehind: !0
574
- },
575
- operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
576
- });
577
- Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
578
- Prism.languages.insertBefore("javascript", "keyword", {
579
- regex: {
580
- pattern: RegExp(
581
- // lookbehind
582
- // eslint-disable-next-line regexp/no-dupe-characters-character-class
583
- /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
584
- // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
585
- // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
586
- // with the only syntax, so we have to define 2 different regex patterns.
587
- /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
588
- /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
589
- /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
590
- ),
591
- lookbehind: !0,
592
- greedy: !0,
593
- inside: {
594
- "regex-source": {
595
- pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
596
- lookbehind: !0,
597
- alias: "language-regex",
598
- inside: Prism.languages.regex
599
- },
600
- "regex-delimiter": /^\/|\/$/,
601
- "regex-flags": /^[a-z]+$/
602
- }
603
- },
604
- // This must be declared before keyword because we use "function" inside the look-forward
605
- "function-variable": {
606
- 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*=>))/,
607
- alias: "function"
608
- },
609
- parameter: [
610
- {
611
- pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
612
- lookbehind: !0,
613
- inside: Prism.languages.javascript
614
- },
615
- {
616
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
617
- lookbehind: !0,
618
- inside: Prism.languages.javascript
619
- },
620
- {
621
- pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
622
- lookbehind: !0,
623
- inside: Prism.languages.javascript
624
- },
625
- {
626
- 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*\{)/,
627
- lookbehind: !0,
628
- inside: Prism.languages.javascript
629
- }
630
- ],
631
- constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
632
- });
633
- Prism.languages.insertBefore("javascript", "string", {
634
- hashbang: {
635
- pattern: /^#!.*/,
636
- greedy: !0,
637
- alias: "comment"
638
- },
639
- "template-string": {
640
- pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
641
- greedy: !0,
642
- inside: {
643
- "template-punctuation": {
644
- pattern: /^`|`$/,
645
- alias: "string"
646
- },
647
- interpolation: {
648
- pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
649
- lookbehind: !0,
650
- inside: {
651
- "interpolation-punctuation": {
652
- pattern: /^\$\{|\}$/,
653
- alias: "punctuation"
654
- },
655
- rest: Prism.languages.javascript
656
- }
657
- },
658
- string: /[\s\S]+/
659
- }
660
- },
661
- "string-property": {
662
- pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
663
- lookbehind: !0,
664
- greedy: !0,
665
- alias: "property"
666
- }
667
- });
668
- Prism.languages.insertBefore("javascript", "operator", {
669
- "literal-property": {
670
- pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
671
- lookbehind: !0,
672
- alias: "property"
673
- }
674
- });
675
- Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(
676
- /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,
677
- "javascript"
678
- ));
679
- Prism.languages.js = Prism.languages.javascript;
680
- (function(e) {
681
- var t = e.util.clone(e.languages.javascript), r = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, n = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, i = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
682
- function s(o, c) {
683
- return o = o.replace(/<S>/g, function() {
684
- return r;
685
- }).replace(/<BRACES>/g, function() {
686
- return n;
687
- }).replace(/<SPREAD>/g, function() {
688
- return i;
689
- }), RegExp(o, c);
690
- }
691
- i = s(i).source, e.languages.jsx = e.languages.extend("markup", t), e.languages.jsx.tag.pattern = s(
692
- /<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source
693
- ), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = t.comment, e.languages.insertBefore("inside", "attr-name", {
694
- spread: {
695
- pattern: s(/<SPREAD>/.source),
696
- inside: e.languages.jsx
697
- }
698
- }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", {
699
- script: {
700
- // Allow for two levels of nesting
701
- pattern: s(/=<BRACES>/.source),
702
- alias: "language-javascript",
703
- inside: {
704
- "script-punctuation": {
705
- pattern: /^=(?=\{)/,
706
- alias: "punctuation"
707
- },
708
- rest: e.languages.jsx
709
- }
710
- }
711
- }, e.languages.jsx.tag);
712
- var l = function(o) {
713
- return o ? typeof o == "string" ? o : typeof o.content == "string" ? o.content : o.content.map(l).join("") : "";
714
- }, p = function(o) {
715
- for (var c = [], u = 0; u < o.length; u++) {
716
- var d = o[u], b = !1;
717
- if (typeof d != "string" && (d.type === "tag" && d.content[0] && d.content[0].type === "tag" ? d.content[0].content[0].content === "</" ? c.length > 0 && c[c.length - 1].tagName === l(d.content[0].content[1]) && c.pop() : d.content[d.content.length - 1].content === "/>" || c.push({
718
- tagName: l(d.content[0].content[1]),
719
- openedBraces: 0
720
- }) : c.length > 0 && d.type === "punctuation" && d.content === "{" ? c[c.length - 1].openedBraces++ : c.length > 0 && c[c.length - 1].openedBraces > 0 && d.type === "punctuation" && d.content === "}" ? c[c.length - 1].openedBraces-- : b = !0), (b || typeof d == "string") && c.length > 0 && c[c.length - 1].openedBraces === 0) {
721
- var g = l(d);
722
- u < o.length - 1 && (typeof o[u + 1] == "string" || o[u + 1].type === "plain-text") && (g += l(o[u + 1]), o.splice(u + 1, 1)), u > 0 && (typeof o[u - 1] == "string" || o[u - 1].type === "plain-text") && (g = l(o[u - 1]) + g, o.splice(u - 1, 1), u--), o[u] = new e.Token("plain-text", g, null, g);
723
- }
724
- d.content && typeof d.content != "string" && p(d.content);
725
- }
726
- };
727
- e.hooks.add("after-tokenize", function(o) {
728
- o.language !== "jsx" && o.language !== "tsx" || p(o.tokens);
729
- });
730
- })(Prism);
731
- var C = {}, N;
732
- function ve() {
733
- return N || (N = 1, function(e) {
734
- e.languages.typescript = e.languages.extend("javascript", {
735
- "class-name": {
736
- pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
737
- lookbehind: !0,
738
- greedy: !0,
739
- inside: null
740
- // see below
741
- },
742
- builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
743
- }), e.languages.typescript.keyword.push(
744
- /\b(?:abstract|declare|is|keyof|readonly|require)\b/,
745
- // keywords that have to be followed by an identifier
746
- /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
747
- // This is for `import type *, {}`
748
- /\btype\b(?=\s*(?:[\{*]|$))/
749
- ), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
750
- var t = e.languages.extend("typescript", {});
751
- delete t["class-name"], e.languages.typescript["class-name"].inside = t, e.languages.insertBefore("typescript", "function", {
752
- decorator: {
753
- pattern: /@[$\w\xA0-\uFFFF]+/,
754
- inside: {
755
- at: {
756
- pattern: /^@/,
757
- alias: "operator"
758
- },
759
- function: /^[\s\S]+/
760
- }
761
- },
762
- "generic-function": {
763
- // e.g. foo<T extends "bar" | "baz">( ...
764
- pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
765
- greedy: !0,
766
- inside: {
767
- function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
768
- generic: {
769
- pattern: /<[\s\S]+/,
770
- // everything after the first <
771
- alias: "class-name",
772
- inside: t
773
- }
774
- }
775
- }
776
- }), e.languages.ts = e.languages.typescript;
777
- }(Prism)), C;
778
- }
779
- ve();
780
- (function(e) {
781
- var t = e.util.clone(e.languages.typescript);
782
- e.languages.tsx = e.languages.extend("jsx", t), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"];
783
- var r = e.languages.tsx.tag;
784
- r.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + r.pattern.source + ")", r.pattern.flags), r.lookbehind = !0;
785
- })(Prism);
786
- const Fe = {
787
- sh: "bash",
788
- shell: "bash",
789
- zsh: "bash",
790
- console: "bash"
791
- }, Ee = ({ children: e, className: t = "", ...r }) => {
792
- const [n, i] = F(!1), s = D(), l = t.replace("language-", "") || "jsx", p = Fe[l] ?? l;
793
- let o = "";
794
- typeof e == "string" ? o = e.trim() : e && typeof e == "object" && e.props && (typeof e.props.children == "string" ? o = e.props.children.trim() : Array.isArray(e.props.children) && (o = e.props.children.join("").trim()));
795
- const c = {
796
- plain: {
797
- color: s.palette.text.primary,
798
- backgroundColor: s.palette.background.paper
799
- },
800
- styles: [
801
- {
802
- types: ["comment", "prolog", "doctype", "cdata"],
803
- style: {
804
- color: s.palette.mode === "dark" ? "#6a737d" : "#6a7781"
805
- }
806
- },
807
- {
808
- types: ["punctuation"],
809
- style: {
810
- color: s.palette.mode === "dark" ? "#e1e4e8" : "#24292e"
811
- }
812
- },
813
- {
814
- types: ["property", "tag", "boolean", "number", "constant", "symbol"],
815
- style: {
816
- color: s.palette.mode === "dark" ? "#79b8ff" : "#005cc5"
817
- }
818
- },
819
- {
820
- types: ["selector", "attr-name", "string", "char", "builtin"],
821
- style: {
822
- color: s.palette.mode === "dark" ? "#a5d6ff" : "#032f62"
823
- }
824
- },
825
- {
826
- types: ["operator", "entity", "url"],
827
- style: {
828
- color: (s.palette.mode === "dark", "#d73a49")
829
- }
830
- },
831
- {
832
- types: ["atrule", "attr-value", "keyword"],
833
- style: {
834
- color: s.palette.mode === "dark" ? "#f97583" : "#d73a49"
835
- }
836
- },
837
- {
838
- types: ["function"],
839
- style: {
840
- color: s.palette.mode === "dark" ? "#b392f0" : "#6f42c1"
841
- }
842
- },
843
- {
844
- types: ["class-name"],
845
- style: {
846
- color: s.palette.mode === "dark" ? "#ffab70" : "#e36209"
847
- }
848
- }
849
- ]
850
- };
851
- return /* @__PURE__ */ m(f, { sx: { position: "relative", my: 2 }, children: [
852
- /* @__PURE__ */ a(f, { sx: { position: "absolute", top: 4, right: 4, zIndex: 1 }, children: /* @__PURE__ */ a(re, { title: n ? "Copied!" : "Copy", children: /* @__PURE__ */ a(
853
- v,
854
- {
855
- size: "small",
856
- onClick: async () => {
857
- try {
858
- await navigator.clipboard.writeText(o), i(!0), setTimeout(() => i(!1), 1500);
859
- } catch {
860
- }
861
- },
862
- color: "inherit",
863
- "aria-label": n ? "Code copied to clipboard" : "Copy code to clipboard",
864
- sx: { width: 24, height: 24 },
865
- children: n ? /* @__PURE__ */ a(ye, { sx: { fontSize: 16 } }) : /* @__PURE__ */ a(Se, { sx: { fontSize: 16 } })
866
- }
867
- ) }) }),
868
- /* @__PURE__ */ a(M, { prism: xe, code: o, language: p, theme: c, children: ({ className: d, style: b, tokens: g, getLineProps: k, getTokenProps: w }) => /* @__PURE__ */ m(
869
- f,
870
- {
871
- sx: {
872
- border: 1,
873
- borderColor: "divider",
874
- borderRadius: 2,
875
- overflow: "hidden",
876
- backgroundColor: s.palette.background.paper,
877
- boxShadow: 1
878
- },
879
- children: [
880
- /* @__PURE__ */ a(
881
- f,
882
- {
883
- sx: {
884
- px: 2,
885
- py: 1,
886
- backgroundColor: s.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.04)",
887
- borderBottom: 1,
888
- borderColor: "divider",
889
- fontSize: "0.75rem",
890
- color: s.palette.text.secondary,
891
- fontFamily: "monospace",
892
- textTransform: "uppercase",
893
- letterSpacing: 0.5
894
- },
895
- children: p
896
- }
897
- ),
898
- /* @__PURE__ */ a(
899
- "pre",
900
- {
901
- className: d,
902
- style: {
903
- ...b,
904
- margin: 0,
905
- padding: 16,
906
- overflowX: "auto",
907
- backgroundColor: "transparent",
908
- wordWrap: "break-word",
909
- overflowWrap: "break-word",
910
- whiteSpace: "pre-wrap"
911
- },
912
- ...r,
913
- children: g.map((h, S) => {
914
- const T = k({ line: h, key: S }), { key: A, ...H } = T;
915
- return /* @__PURE__ */ a("div", { ...H, children: h.map((G, _) => {
916
- const z = w({ token: G, key: _ }), { key: ze, ...W } = z;
917
- return /* @__PURE__ */ a("span", { ...W }, `${S}-${_}`);
918
- }) }, A);
919
- })
920
- }
921
- )
922
- ]
923
- }
924
- ) })
925
- ] });
926
- }, Te = ({ children: e, ...t }) => {
927
- const r = D(), n = typeof e == "string" ? e.trim() : "", i = {
928
- plain: {
929
- color: r.palette.text.primary,
930
- backgroundColor: r.palette.mode === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"
931
- },
932
- styles: [
933
- {
934
- types: ["comment", "prolog", "doctype", "cdata"],
935
- style: {
936
- color: r.palette.mode === "dark" ? "#6a737d" : "#6a7781"
937
- }
938
- },
939
- {
940
- types: ["punctuation"],
941
- style: {
942
- color: r.palette.mode === "dark" ? "#e1e4e8" : "#24292e"
943
- }
944
- },
945
- {
946
- types: ["property", "tag", "boolean", "number", "constant", "symbol"],
947
- style: {
948
- color: r.palette.mode === "dark" ? "#79b8ff" : "#005cc5"
949
- }
950
- },
951
- {
952
- types: ["selector", "attr-name", "string", "char", "builtin"],
953
- style: {
954
- color: r.palette.mode === "dark" ? "#a5d6ff" : "#032f62"
955
- }
956
- },
957
- {
958
- types: ["operator", "entity", "url"],
959
- style: {
960
- color: (r.palette.mode === "dark", "#d73a49")
961
- }
962
- },
963
- {
964
- types: ["atrule", "attr-value", "keyword"],
965
- style: {
966
- color: r.palette.mode === "dark" ? "#f97583" : "#d73a49"
967
- }
968
- },
969
- {
970
- types: ["function"],
971
- style: {
972
- color: r.palette.mode === "dark" ? "#b392f0" : "#6f42c1"
973
- }
974
- },
975
- {
976
- types: ["class-name"],
977
- style: {
978
- color: r.palette.mode === "dark" ? "#ffab70" : "#e36209"
979
- }
980
- }
981
- ]
982
- };
983
- return /* @__PURE__ */ a(M, { code: n, language: "jsx", theme: i, children: ({ className: s, style: l, tokens: p, getLineProps: o, getTokenProps: c }) => /* @__PURE__ */ a(
984
- "code",
985
- {
986
- className: s,
987
- style: {
988
- ...l,
989
- padding: "2px 4px",
990
- borderRadius: "3px",
991
- fontSize: "0.875em",
992
- fontFamily: "monospace",
993
- display: "inline-block",
994
- wordWrap: "break-word",
995
- overflowWrap: "break-word",
996
- maxWidth: "100%"
997
- },
998
- ...t,
999
- children: p.map((u, d) => {
1000
- const b = o({ line: u, key: d }), { key: g, ...k } = b;
1001
- return /* @__PURE__ */ a("div", { ...k, children: u.map((w, h) => {
1002
- const S = c({ token: w, key: h }), { key: T, ...A } = S;
1003
- return /* @__PURE__ */ a("span", { ...A }, `${d}-${h}`);
1004
- }) }, g);
1005
- })
1006
- }
1007
- ) });
1008
- }, _e = (e) => e.filter((t) => !t.isDefault), $e = (e) => e.find((t) => t.isDefault), Ie = (e) => e ? !!(e.startsWith("http://") || e.startsWith("https://") || e.startsWith("mailto:") || e.startsWith("tel:")) : !1, Oe = () => {
1009
- const { pages: e } = E();
1010
- return /* @__PURE__ */ a(
1011
- f,
1012
- {
1013
- sx: {
1014
- width: "100%",
1015
- maxWidth: 960,
1016
- mx: "auto",
1017
- pb: 4,
1018
- // Add mobile-specific styles to prevent text overflow
1019
- "& .MuiTypography-root": {
1020
- wordWrap: "break-word",
1021
- overflowWrap: "break-word"
1022
- },
1023
- "& pre": {
1024
- wordWrap: "break-word",
1025
- overflowWrap: "break-word",
1026
- whiteSpace: "pre-wrap"
1027
- },
1028
- "& code": {
1029
- wordWrap: "break-word",
1030
- overflowWrap: "break-word"
1031
- },
1032
- "& p": {
1033
- wordWrap: "break-word",
1034
- overflowWrap: "break-word"
1035
- },
1036
- "& h1, & h2, & h3, & h4, & h5, & h6": {
1037
- wordWrap: "break-word",
1038
- overflowWrap: "break-word"
1039
- },
1040
- // Mobile-specific overrides
1041
- "@media (max-width: 600px)": {
1042
- maxWidth: "100%",
1043
- px: 1,
1044
- "& *": {
1045
- wordWrap: "break-word",
1046
- overflowWrap: "break-word"
1047
- }
1048
- },
1049
- // Very small screen overrides
1050
- "@media (max-width: 378px)": {
1051
- maxWidth: "100%",
1052
- px: 0.5,
1053
- "& *": {
1054
- wordWrap: "break-word",
1055
- overflowWrap: "break-word"
1056
- }
1057
- }
1058
- },
1059
- children: /* @__PURE__ */ a(
1060
- he,
1061
- {
1062
- components: {
1063
- // pre: CodeBlock,
1064
- code: (t) => t.className ? /* @__PURE__ */ a(Ee, { ...t }) : /* @__PURE__ */ a(Te, { ...t }),
1065
- a: (t) => {
1066
- const r = Ie(t.href);
1067
- return /* @__PURE__ */ a(
1068
- "a",
1069
- {
1070
- ...t,
1071
- target: r ? "_blank" : void 0,
1072
- rel: r ? "noopener noreferrer" : void 0
1073
- }
1074
- );
1075
- },
1076
- blockquote: (t) => /* @__PURE__ */ a(
1077
- f,
1078
- {
1079
- component: "blockquote",
1080
- sx: {
1081
- borderLeft: "4px solid",
1082
- borderColor: "primary.main",
1083
- pl: 2,
1084
- py: 0.5,
1085
- my: 2,
1086
- mx: 0,
1087
- color: "text.secondary",
1088
- fontStyle: "italic",
1089
- bgcolor: "action.hover",
1090
- borderRadius: "0 4px 4px 0"
1091
- },
1092
- ...t
1093
- }
1094
- ),
1095
- p: (t) => t.children && (Array.isArray(t.children) ? t.children.some(
1096
- (n) => typeof n == "object" && n.type
1097
- ) : typeof t.children == "object" && t.children.type) ? /* @__PURE__ */ a(U, { children: t.children }) : /* @__PURE__ */ a("p", { ...t })
1098
- },
1099
- children: /* @__PURE__ */ a(
1100
- q,
1101
- {
1102
- fallback: /* @__PURE__ */ a(
1103
- f,
1104
- {
1105
- sx: {
1106
- display: "flex",
1107
- justifyContent: "center",
1108
- alignItems: "center",
1109
- minHeight: "200px"
1110
- },
1111
- children: /* @__PURE__ */ a(ae, {})
1112
- }
1113
- ),
1114
- children: /* @__PURE__ */ m(pe, { children: [
1115
- e.map((t) => {
1116
- const r = t.component;
1117
- return /* @__PURE__ */ a(
1118
- I,
1119
- {
1120
- path: t.route,
1121
- element: /* @__PURE__ */ a(r, {})
1122
- },
1123
- t.route
1124
- );
1125
- }),
1126
- /* @__PURE__ */ a(
1127
- I,
1128
- {
1129
- path: "*",
1130
- element: X.createElement($e(e).component)
1131
- }
1132
- )
1133
- ] })
1134
- }
1135
- )
1136
- }
1137
- )
1138
- }
1139
- );
1140
- }, y = 240, Re = ({ mobileOpen: e, handleDrawerToggle: t }) => {
1141
- const r = B(), { pages: n } = E(), i = _e(n);
1142
- x(() => {
1143
- const p = setTimeout(() => {
1144
- document.body.style.overflow = "";
1145
- }, 100);
1146
- return () => clearTimeout(p);
1147
- }, [r.pathname]);
1148
- const s = () => {
1149
- t();
1150
- }, l = /* @__PURE__ */ m("div", { children: [
1151
- /* @__PURE__ */ a(P, {}),
1152
- /* @__PURE__ */ a(ne, { children: i.map((p) => /* @__PURE__ */ a(oe, { disablePadding: !0, children: /* @__PURE__ */ a(
1153
- se,
1154
- {
1155
- component: L,
1156
- to: p.route,
1157
- onClick: () => s(),
1158
- sx: {
1159
- "&:hover": {
1160
- color: "inherit"
1161
- }
1162
- },
1163
- children: /* @__PURE__ */ a(ie, { primary: p.name })
1164
- }
1165
- ) }, p.route)) })
1166
- ] });
1167
- return /* @__PURE__ */ m(
1168
- f,
1169
- {
1170
- component: "nav",
1171
- sx: { width: { sm: y }, flexShrink: { sm: 0 } },
1172
- "aria-label": "sidebar navigation",
1173
- children: [
1174
- /* @__PURE__ */ a(
1175
- $,
1176
- {
1177
- variant: "temporary",
1178
- open: e,
1179
- onClose: t,
1180
- ModalProps: {
1181
- keepMounted: !1,
1182
- disableScrollLock: !0
1183
- },
1184
- sx: {
1185
- display: { xs: "block", sm: "none" },
1186
- "& .MuiDrawer-paper": {
1187
- boxSizing: "border-box",
1188
- width: { xs: "85vw", sm: y },
1189
- maxWidth: y
1190
- }
1191
- },
1192
- children: l
1193
- }
1194
- ),
1195
- /* @__PURE__ */ a(
1196
- $,
1197
- {
1198
- variant: "permanent",
1199
- sx: {
1200
- display: { xs: "none", sm: "block" },
1201
- "& .MuiDrawer-paper": {
1202
- boxSizing: "border-box",
1203
- width: y
1204
- }
1205
- },
1206
- open: !0,
1207
- children: l
1208
- }
1209
- )
1210
- ]
1211
- }
1212
- );
1213
- }, Ce = () => typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)").matches : !0, Ne = () => {
1214
- if (typeof window < "u") {
1215
- const e = localStorage.getItem("darkMode");
1216
- if (e !== null)
1217
- return JSON.parse(e);
1218
- }
1219
- return Ce();
1220
- }, Pe = () => {
1221
- const [e, t] = F(Ne);
1222
- return x(() => {
1223
- typeof window < "u" && localStorage.setItem("darkMode", JSON.stringify(e));
1224
- }, [e]), x(() => {
1225
- if (typeof window < "u" && window.matchMedia) {
1226
- const r = window.matchMedia("(prefers-color-scheme: dark)"), n = (i) => {
1227
- localStorage.getItem("darkMode") === null && t(i.matches);
1228
- };
1229
- return r.addEventListener("change", n), () => r.removeEventListener("change", n);
1230
- }
1231
- }, []), { darkMode: e, setDarkMode: t };
1232
- }, De = {
1233
- palette: {
1234
- primary: {
1235
- main: "#90caf9",
1236
- light: "rgb(166, 212, 250)",
1237
- dark: "rgb(100, 141, 174)",
1238
- contrastText: "rgba(0, 0, 0, 0.87)"
1239
- },
1240
- secondary: {
1241
- main: "#f48fb1",
1242
- light: "rgb(246, 165, 192)",
1243
- dark: "rgb(170, 100, 123)",
1244
- contrastText: "rgba(0, 0, 0, 0.87)"
1245
- },
1246
- background: {
1247
- default: "#121212",
1248
- paper: "#141414"
1249
- },
1250
- text: {
1251
- primary: "#ffffff",
1252
- secondary: "#b3b3b3",
1253
- disabled: "rgba(255, 255, 255, 0.5)",
1254
- icon: "rgba(255, 255, 255, 0.5)"
1255
- },
1256
- common: {
1257
- black: "#000",
1258
- white: "#fff"
1259
- },
1260
- error: {
1261
- main: "#f44336",
1262
- light: "#e57373",
1263
- dark: "#d32f2f",
1264
- contrastText: "#fff"
1265
- },
1266
- warning: {
1267
- main: "#ffa726",
1268
- light: "#ffb74d",
1269
- dark: "#f57c00",
1270
- contrastText: "rgba(0, 0, 0, 0.87)"
1271
- },
1272
- info: {
1273
- main: "#29b6f6",
1274
- light: "#4fc3f7",
1275
- dark: "#0288d1",
1276
- contrastText: "rgba(0, 0, 0, 0.87)"
1277
- },
1278
- success: {
1279
- main: "#66bb6a",
1280
- light: "#81c784",
1281
- dark: "#388e3c",
1282
- contrastText: "rgba(0, 0, 0, 0.87)"
1283
- },
1284
- grey: {
1285
- 50: "#fafafa",
1286
- 100: "#f5f5f5",
1287
- 200: "#eeeeee",
1288
- 300: "#e0e0e0",
1289
- 400: "#bdbdbd",
1290
- 500: "#9e9e9e",
1291
- 600: "#757575",
1292
- 700: "#616161",
1293
- 800: "#424242",
1294
- 900: "#212121",
1295
- A100: "#f5f5f5",
1296
- A200: "#eeeeee",
1297
- A400: "#bdbdbd",
1298
- A700: "#616161"
1299
- },
1300
- contrastThreshold: 3,
1301
- tonalOffset: 0.2,
1302
- divider: "rgba(255, 255, 255, 0.12)",
1303
- action: {
1304
- active: "#fff",
1305
- hover: "rgba(255, 255, 255, 0.08)",
1306
- hoverOpacity: 0.08,
1307
- selected: "rgba(255, 255, 255, 0.16)",
1308
- selectedOpacity: 0.16,
1309
- disabled: "rgba(255, 255, 255, 0.3)",
1310
- disabledBackground: "rgba(255, 255, 255, 0.12)",
1311
- disabledOpacity: 0.38,
1312
- focus: "rgba(255, 255, 255, 0.12)",
1313
- focusOpacity: 0.12,
1314
- activatedOpacity: 0.24
1315
- }
1316
- }
1317
- }, Le = {
1318
- palette: {
1319
- primary: {
1320
- main: "#1976d2",
1321
- light: "rgb(71, 145, 219)",
1322
- dark: "rgb(17, 82, 147)",
1323
- contrastText: "#fff"
1324
- },
1325
- secondary: {
1326
- main: "#dc004e",
1327
- light: "rgb(227, 51, 113)",
1328
- dark: "rgb(154, 0, 54)",
1329
- contrastText: "#fff"
1330
- },
1331
- background: {
1332
- default: "#fefefe",
1333
- paper: "#f5f5f5"
1334
- },
1335
- text: {
1336
- primary: "#212121",
1337
- secondary: "#757575",
1338
- disabled: "rgba(0, 0, 0, 0.38)"
1339
- },
1340
- common: {
1341
- black: "#000",
1342
- white: "#fff"
1343
- },
1344
- error: {
1345
- main: "#d32f2f",
1346
- light: "#ef5350",
1347
- dark: "#c62828",
1348
- contrastText: "#fff"
1349
- },
1350
- warning: {
1351
- main: "#ed6c02",
1352
- light: "#ff9800",
1353
- dark: "#e65100",
1354
- contrastText: "#fff"
1355
- },
1356
- info: {
1357
- main: "#0288d1",
1358
- light: "#03a9f4",
1359
- dark: "#01579b",
1360
- contrastText: "#fff"
1361
- },
1362
- success: {
1363
- main: "#2e7d32",
1364
- light: "#4caf50",
1365
- dark: "#1b5e20",
1366
- contrastText: "#fff"
1367
- },
1368
- grey: {
1369
- 50: "#fafafa",
1370
- 100: "#f5f5f5",
1371
- 200: "#eeeeee",
1372
- 300: "#e0e0e0",
1373
- 400: "#bdbdbd",
1374
- 500: "#9e9e9e",
1375
- 600: "#757575",
1376
- 700: "#616161",
1377
- 800: "#424242",
1378
- 900: "#212121",
1379
- A100: "#f5f5f5",
1380
- A200: "#eeeeee",
1381
- A400: "#bdbdbd",
1382
- A700: "#616161"
1383
- },
1384
- contrastThreshold: 3,
1385
- tonalOffset: 0.2,
1386
- divider: "rgba(0, 0, 0, 0.12)",
1387
- action: {
1388
- active: "rgba(0, 0, 0, 0.54)",
1389
- hover: "rgba(0, 0, 0, 0.04)",
1390
- hoverOpacity: 0.04,
1391
- selected: "rgba(0, 0, 0, 0.08)",
1392
- selectedOpacity: 0.08,
1393
- disabled: "rgba(0, 0, 0, 0.26)",
1394
- disabledBackground: "rgba(0, 0, 0, 0.12)",
1395
- disabledOpacity: 0.38,
1396
- focus: "rgba(0, 0, 0, 0.12)",
1397
- focusOpacity: 0.12,
1398
- activatedOpacity: 0.12
1399
- }
1400
- }
1401
- }, Be = {
1402
- components: {
1403
- MuiIconButton: {
1404
- styleOverrides: {
1405
- root: {
1406
- "&:focus": {
1407
- outline: "none"
1408
- },
1409
- "&:focus-visible": {
1410
- outline: "none"
1411
- },
1412
- "&:focus-within": {
1413
- outline: "none"
1414
- },
1415
- // Remove webkit focus ring
1416
- "&::-webkit-focus-inner": {
1417
- border: 0
1418
- },
1419
- "&::-webkit-focus-ring-color": {
1420
- outline: "none"
1421
- }
1422
- }
1423
- }
1424
- }
1425
- }
1426
- }, Me = (e = "light", t = {}) => {
1427
- const r = e === "dark" ? De : Le, n = t[e], i = {};
1428
- t.primaryColor && (i.palette = { primary: { main: t.primaryColor } }), t.fontFamily && (i.typography = { fontFamily: t.fontFamily });
1429
- const s = [
1430
- { ...r, palette: { ...r.palette, mode: e } },
1431
- i
1432
- ];
1433
- return n && s.push(n), s.push(Be), le(...s);
1434
- }, je = ({ children: e }) => {
1435
- const t = B(), r = fe();
1436
- return x(() => {
1437
- const n = new URLSearchParams(window.location.search), i = n.get("redirect");
1438
- if (i) {
1439
- n.delete("redirect");
1440
- const s = window.location.pathname + (n.toString() ? "?" + n.toString() : "");
1441
- window.history.replaceState({}, "", s), r(i);
1442
- }
1443
- }, [r]), Y(() => {
1444
- window.scrollTo({ top: 0, left: 0, behavior: "instant" });
1445
- }, [t.pathname]), e;
1446
- };
1447
- function He({ userTheme: e = {} }) {
1448
- const { darkMode: t, setDarkMode: r } = Pe(), [n, i] = F(!1), s = V(
1449
- () => Me(t ? "dark" : "light", e),
1450
- [t, e]
1451
- ), l = () => {
1452
- i(!n);
1453
- };
1454
- return /* @__PURE__ */ m(ce, { theme: s, children: [
1455
- /* @__PURE__ */ a(de, {}),
1456
- /* @__PURE__ */ m(f, { sx: { display: "flex" }, children: [
1457
- /* @__PURE__ */ a(
1458
- we,
1459
- {
1460
- darkMode: t,
1461
- setDarkMode: r,
1462
- handleDrawerToggle: l
1463
- }
1464
- ),
1465
- /* @__PURE__ */ a(
1466
- Re,
1467
- {
1468
- mobileOpen: n,
1469
- handleDrawerToggle: l
1470
- }
1471
- ),
1472
- /* @__PURE__ */ a(
1473
- f,
1474
- {
1475
- component: "main",
1476
- sx: {
1477
- flexGrow: 1,
1478
- pt: 8,
1479
- // Add top padding to account for AppBar
1480
- px: { xs: 0.5, sm: 3 },
1481
- // Reduce padding even more on very small screens
1482
- width: { sm: `calc(100% - ${y}px)` },
1483
- // Prevent horizontal overflow on very small screens
1484
- overflowX: "hidden"
1485
- },
1486
- children: /* @__PURE__ */ a(Oe, {})
1487
- }
1488
- )
1489
- ] })
1490
- ] });
1491
- }
1492
- function Ge({ pages: e, site: t, theme: r = {} }) {
1493
- return /* @__PURE__ */ a(ke, { pages: e, site: t, children: /* @__PURE__ */ a(ue, { basename: "/", children: /* @__PURE__ */ a(je, { children: /* @__PURE__ */ a(He, { userTheme: r }) }) }) });
1494
- }
1495
- function at({ pages: e, site: t, theme: r }) {
1496
- Q(document.getElementById("root")).render(
1497
- /* @__PURE__ */ a(J, { children: /* @__PURE__ */ a(Ge, { pages: e, site: t, theme: r }) })
1498
- );
1499
- }
1500
- const nt = {
1501
- default: {},
1502
- ocean: {
1503
- primaryColor: "#0077b6",
1504
- dark: {
1505
- palette: {
1506
- primary: { main: "#48cae4" },
1507
- background: { default: "#03045e", paper: "#023e8a" }
1508
- }
1509
- },
1510
- light: {
1511
- palette: {
1512
- background: { default: "#f0f9ff", paper: "#e0f2fe" }
1513
- }
1514
- }
1515
- },
1516
- forest: {
1517
- primaryColor: "#2d6a4f",
1518
- dark: {
1519
- palette: {
1520
- primary: { main: "#74c69d" },
1521
- background: { default: "#081c15", paper: "#1b4332" }
1522
- }
1523
- },
1524
- light: {
1525
- palette: {
1526
- background: { default: "#f0fdf4", paper: "#dcfce7" }
1527
- }
1528
- }
1529
- },
1530
- rose: {
1531
- primaryColor: "#be123c",
1532
- dark: {
1533
- palette: {
1534
- primary: { main: "#fb7185" },
1535
- background: { default: "#1c0a0d", paper: "#3b0015" }
1536
- }
1537
- },
1538
- light: {
1539
- palette: {
1540
- background: { default: "#fff1f2", paper: "#ffe4e6" }
1541
- }
1542
- }
1543
- }
1544
- };
1545
- export {
1546
- at as createApp,
1547
- nt as themes
1548
- };