@kingsimba/nc-ui 0.1.27 → 0.1.29

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.
@@ -1,4713 +0,0 @@
1
- import { jsx as ge, Fragment as Zt, jsxs as en } from "react/jsx-runtime";
2
- import Vt, { createElement as Xt, useCallback as ye, useMemo as ln, useState as Sn, useRef as Ne, useEffect as nn } from "react";
3
- var oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Vn = {}, U = oe && oe.__assign || function() {
4
- return U = Object.assign || function(e) {
5
- for (var n, t = 1, r = arguments.length; t < r; t++) {
6
- n = arguments[t];
7
- for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
8
- }
9
- return e;
10
- }, U.apply(this, arguments);
11
- }, Qt = oe && oe.__createBinding || (Object.create ? function(e, n, t, r) {
12
- r === void 0 && (r = t);
13
- var a = Object.getOwnPropertyDescriptor(n, t);
14
- (!a || ("get" in a ? !n.__esModule : a.writable || a.configurable)) && (a = { enumerable: !0, get: function() {
15
- return n[t];
16
- } }), Object.defineProperty(e, r, a);
17
- } : function(e, n, t, r) {
18
- r === void 0 && (r = t), e[r] = n[t];
19
- }), Jt = oe && oe.__setModuleDefault || (Object.create ? function(e, n) {
20
- Object.defineProperty(e, "default", { enumerable: !0, value: n });
21
- } : function(e, n) {
22
- e.default = n;
23
- }), er = oe && oe.__importStar || function(e) {
24
- if (e && e.__esModule) return e;
25
- var n = {};
26
- if (e != null) for (var t in e) t !== "default" && Object.prototype.hasOwnProperty.call(e, t) && Qt(n, e, t);
27
- return Jt(n, e), n;
28
- }, nr = oe && oe.__rest || function(e, n) {
29
- var t = {};
30
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
31
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
32
- for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
33
- n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
34
- return t;
35
- };
36
- Object.defineProperty(Vn, "__esModule", { value: !0 });
37
- var J = er(Vt), tr = 89, ze = 90, rr = 77, _n = 57, Fn = 219, Cn = 222, Tn = 192, In = 100, ar = 3e3, ir = typeof window < "u" && "navigator" in window && /Win/i.test(navigator.platform), tn = typeof window < "u" && "navigator" in window && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform), Ye = "npm__react-simple-code-editor__textarea", or = (
38
- /* CSS */
39
- `
40
- /**
41
- * Reset the text fill color so that placeholder is visible
42
- */
43
- .`.concat(Ye, `:empty {
44
- -webkit-text-fill-color: inherit !important;
45
- }
46
-
47
- /**
48
- * Hack to apply on some CSS on IE10 and IE11
49
- */
50
- @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
51
- /**
52
- * IE doesn't support '-webkit-text-fill-color'
53
- * So we use 'color: transparent' to make the text transparent on IE
54
- * Unlike other browsers, it doesn't affect caret color in IE
55
- */
56
- .`).concat(Ye, ` {
57
- color: transparent !important;
58
- }
59
-
60
- .`).concat(Ye, `::selection {
61
- background-color: #accef7 !important;
62
- color: transparent !important;
63
- }
64
- }
65
- `)
66
- ), lr = J.forwardRef(function(n, t) {
67
- var r = n.autoFocus, a = n.disabled, o = n.form, i = n.highlight, l = n.ignoreTabKey, s = l === void 0 ? !1 : l, u = n.insertSpaces, g = u === void 0 ? !0 : u, f = n.maxLength, m = n.minLength, v = n.name, c = n.onBlur, p = n.onClick, d = n.onFocus, b = n.onKeyDown, y = n.onKeyUp, w = n.onValueChange, E = n.padding, k = E === void 0 ? 0 : E, N = n.placeholder, L = n.preClassName, M = n.readOnly, D = n.required, W = n.style, q = n.tabSize, _ = q === void 0 ? 2 : q, O = n.textareaClassName, T = n.textareaId, $ = n.value, Y = nr(n, ["autoFocus", "disabled", "form", "highlight", "ignoreTabKey", "insertSpaces", "maxLength", "minLength", "name", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onValueChange", "padding", "placeholder", "preClassName", "readOnly", "required", "style", "tabSize", "textareaClassName", "textareaId", "value"]), F = J.useRef({
68
- stack: [],
69
- offset: -1
70
- }), R = J.useRef(null), be = J.useState(!0), V = be[0], le = be[1], ne = {
71
- paddingTop: typeof k == "object" ? k.top : k,
72
- paddingRight: typeof k == "object" ? k.right : k,
73
- paddingBottom: typeof k == "object" ? k.bottom : k,
74
- paddingLeft: typeof k == "object" ? k.left : k
75
- }, te = i($), ee = function(x, I) {
76
- return x.substring(0, I).split(`
77
- `);
78
- }, ve = J.useCallback(function(x, I) {
79
- var S, C, B;
80
- I === void 0 && (I = !1);
81
- var H = F.current, se = H.stack, Te = H.offset;
82
- if (se.length && Te > -1) {
83
- F.current.stack = se.slice(0, Te + 1);
84
- var Ie = F.current.stack.length;
85
- if (Ie > In) {
86
- var Ae = Ie - In;
87
- F.current.stack = se.slice(Ae, Ie), F.current.offset = Math.max(F.current.offset - Ae, 0);
88
- }
89
- }
90
- var re = Date.now();
91
- if (I) {
92
- var de = F.current.stack[F.current.offset];
93
- if (de && re - de.timestamp < ar) {
94
- var Oe = /[^a-z0-9]([a-z0-9]+)$/i, X = (S = ee(de.value, de.selectionStart).pop()) === null || S === void 0 ? void 0 : S.match(Oe), Le = (C = ee(x.value, x.selectionStart).pop()) === null || C === void 0 ? void 0 : C.match(Oe);
95
- if (X != null && X[1] && (!((B = Le == null ? void 0 : Le[1]) === null || B === void 0) && B.startsWith(X[1]))) {
96
- F.current.stack[F.current.offset] = U(U({}, x), { timestamp: re });
97
- return;
98
- }
99
- }
100
- }
101
- F.current.stack.push(U(U({}, x), { timestamp: re })), F.current.offset++;
102
- }, []), we = J.useCallback(function() {
103
- var x = R.current;
104
- if (x) {
105
- var I = x.value, S = x.selectionStart, C = x.selectionEnd;
106
- ve({
107
- value: I,
108
- selectionStart: S,
109
- selectionEnd: C
110
- });
111
- }
112
- }, [ve]), pe = function(x) {
113
- var I = R.current;
114
- I && (I.value = x.value, I.selectionStart = x.selectionStart, I.selectionEnd = x.selectionEnd, w == null || w(x.value));
115
- }, fe = function(x) {
116
- var I = R.current, S = F.current.stack[F.current.offset];
117
- S && I && (F.current.stack[F.current.offset] = U(U({}, S), { selectionStart: I.selectionStart, selectionEnd: I.selectionEnd })), ve(x), pe(x);
118
- }, Ce = function() {
119
- var x = F.current, I = x.stack, S = x.offset, C = I[S - 1];
120
- C && (pe(C), F.current.offset = Math.max(S - 1, 0));
121
- }, Ht = function() {
122
- var x = F.current, I = x.stack, S = x.offset, C = I[S + 1];
123
- C && (pe(C), F.current.offset = Math.min(S + 1, I.length - 1));
124
- }, Kt = function(x) {
125
- if (!(b && (b(x), x.defaultPrevented))) {
126
- x.key === "Escape" && x.currentTarget.blur();
127
- var I = x.currentTarget, S = I.value, C = I.selectionStart, B = I.selectionEnd, H = (g ? " " : " ").repeat(_);
128
- if (x.key === "Tab" && !s && V)
129
- if (x.preventDefault(), x.shiftKey) {
130
- var se = ee(S, C), Te = se.length - 1, Ie = ee(S, B).length - 1, Ae = S.split(`
131
- `).map(function(Re, An) {
132
- return An >= Te && An <= Ie && Re.startsWith(H) ? Re.substring(H.length) : Re;
133
- }).join(`
134
- `);
135
- if (S !== Ae) {
136
- var re = se[Te];
137
- fe({
138
- value: Ae,
139
- // Move the start cursor if first line in selection was modified
140
- // It was modified only if it started with a tab
141
- selectionStart: re != null && re.startsWith(H) ? C - H.length : C,
142
- // Move the end cursor by total number of characters removed
143
- selectionEnd: B - (S.length - Ae.length)
144
- });
145
- }
146
- } else if (C !== B) {
147
- var se = ee(S, C), de = se.length - 1, Oe = ee(S, B).length - 1, re = se[de];
148
- fe({
149
- value: S.split(`
150
- `).map(function(kn, En) {
151
- return En >= de && En <= Oe ? H + kn : kn;
152
- }).join(`
153
- `),
154
- // Move the start cursor by number of characters added in first line of selection
155
- // Don't move it if it there was no text before cursor
156
- selectionStart: re && /\S/.test(re) ? C + H.length : C,
157
- // Move the end cursor by total number of characters added
158
- selectionEnd: B + H.length * (Oe - de + 1)
159
- });
160
- } else {
161
- var X = C + H.length;
162
- fe({
163
- // Insert tab character at caret
164
- value: S.substring(0, C) + H + S.substring(B),
165
- // Update caret position
166
- selectionStart: X,
167
- selectionEnd: X
168
- });
169
- }
170
- else if (x.key === "Backspace") {
171
- var Le = C !== B, qt = S.substring(0, C);
172
- if (qt.endsWith(H) && !Le) {
173
- x.preventDefault();
174
- var X = C - H.length;
175
- fe({
176
- // Remove tab character at caret
177
- value: S.substring(0, C - H.length) + S.substring(B),
178
- // Update caret position
179
- selectionStart: X,
180
- selectionEnd: X
181
- });
182
- }
183
- } else if (x.key === "Enter") {
184
- if (C === B) {
185
- var Je = ee(S, C).pop(), Ue = Je == null ? void 0 : Je.match(/^\s+/);
186
- if (Ue != null && Ue[0]) {
187
- x.preventDefault();
188
- var wn = `
189
- ` + Ue[0], X = C + wn.length;
190
- fe({
191
- // Insert indentation character at caret
192
- value: S.substring(0, C) + wn + S.substring(B),
193
- // Update caret position
194
- selectionStart: X,
195
- selectionEnd: X
196
- });
197
- }
198
- }
199
- } else if (x.keyCode === _n || x.keyCode === Fn || x.keyCode === Cn || x.keyCode === Tn) {
200
- var ue = void 0;
201
- x.keyCode === _n && x.shiftKey ? ue = ["(", ")"] : x.keyCode === Fn ? x.shiftKey ? ue = ["{", "}"] : ue = ["[", "]"] : x.keyCode === Cn ? x.shiftKey ? ue = ['"', '"'] : ue = ["'", "'"] : x.keyCode === Tn && !x.shiftKey && (ue = ["`", "`"]), C !== B && ue && (x.preventDefault(), fe({
202
- value: S.substring(0, C) + ue[0] + S.substring(C, B) + ue[1] + S.substring(B),
203
- // Update caret position
204
- selectionStart: C,
205
- selectionEnd: B + 2
206
- }));
207
- } else (tn ? (
208
- // Trigger undo with ⌘+Z on Mac
209
- x.metaKey && x.keyCode === ze
210
- ) : (
211
- // Trigger undo with Ctrl+Z on other platforms
212
- x.ctrlKey && x.keyCode === ze
213
- )) && !x.shiftKey && !x.altKey ? (x.preventDefault(), Ce()) : (tn ? (
214
- // Trigger redo with ⌘+Shift+Z on Mac
215
- x.metaKey && x.keyCode === ze && x.shiftKey
216
- ) : ir ? (
217
- // Trigger redo with Ctrl+Y on Windows
218
- x.ctrlKey && x.keyCode === tr
219
- ) : (
220
- // Trigger redo with Ctrl+Shift+Z on other platforms
221
- x.ctrlKey && x.keyCode === ze && x.shiftKey
222
- )) && !x.altKey ? (x.preventDefault(), Ht()) : x.keyCode === rr && x.ctrlKey && (!tn || x.shiftKey) && (x.preventDefault(), le(function(Re) {
223
- return !Re;
224
- }));
225
- }
226
- }, Wt = function(x) {
227
- var I = x.currentTarget, S = I.value, C = I.selectionStart, B = I.selectionEnd;
228
- ve({
229
- value: S,
230
- selectionStart: C,
231
- selectionEnd: B
232
- }, !0), w(S);
233
- };
234
- return J.useEffect(function() {
235
- we();
236
- }, [we]), J.useImperativeHandle(t, function() {
237
- return {
238
- get session() {
239
- return {
240
- history: F.current
241
- };
242
- },
243
- set session(x) {
244
- F.current = x.history;
245
- }
246
- };
247
- }, []), J.createElement(
248
- "div",
249
- U({}, Y, { style: U(U({}, De.container), W) }),
250
- J.createElement("pre", U({ className: L, "aria-hidden": "true", style: U(U(U({}, De.editor), De.highlight), ne) }, typeof te == "string" ? { dangerouslySetInnerHTML: { __html: te + "<br />" } } : { children: te })),
251
- J.createElement("textarea", { ref: function(x) {
252
- return R.current = x;
253
- }, style: U(U(U({}, De.editor), De.textarea), ne), className: Ye + (O ? " ".concat(O) : ""), id: T, value: $, onChange: Wt, onKeyDown: Kt, onClick: p, onKeyUp: y, onFocus: d, onBlur: c, disabled: a, form: o, maxLength: f, minLength: m, name: v, placeholder: N, readOnly: M, required: D, autoFocus: r, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "data-gramm": !1 }),
254
- J.createElement("style", { dangerouslySetInnerHTML: { __html: or } })
255
- );
256
- }), De = {
257
- container: {
258
- position: "relative",
259
- textAlign: "left",
260
- boxSizing: "border-box",
261
- padding: 0,
262
- overflow: "hidden"
263
- },
264
- textarea: {
265
- position: "absolute",
266
- top: 0,
267
- left: 0,
268
- height: "100%",
269
- width: "100%",
270
- resize: "none",
271
- color: "inherit",
272
- overflow: "hidden",
273
- MozOsxFontSmoothing: "grayscale",
274
- WebkitFontSmoothing: "antialiased",
275
- WebkitTextFillColor: "transparent"
276
- },
277
- highlight: {
278
- position: "relative",
279
- pointerEvents: "none"
280
- },
281
- editor: {
282
- margin: 0,
283
- border: 0,
284
- background: "none",
285
- boxSizing: "inherit",
286
- display: "inherit",
287
- fontFamily: "inherit",
288
- fontSize: "inherit",
289
- fontStyle: "inherit",
290
- fontVariantLigatures: "inherit",
291
- fontWeight: "inherit",
292
- letterSpacing: "inherit",
293
- lineHeight: "inherit",
294
- tabSize: "inherit",
295
- textIndent: "inherit",
296
- textRendering: "inherit",
297
- textTransform: "inherit",
298
- whiteSpace: "pre-wrap",
299
- wordBreak: "keep-all",
300
- overflowWrap: "break-word"
301
- }
302
- }, sr = Vn.default = lr;
303
- function Xn(e) {
304
- var n, t, r = "";
305
- if (typeof e == "string" || typeof e == "number") r += e;
306
- else if (typeof e == "object") if (Array.isArray(e)) {
307
- var a = e.length;
308
- for (n = 0; n < a; n++) e[n] && (t = Xn(e[n])) && (r && (r += " "), r += t);
309
- } else for (t in e) e[t] && (r && (r += " "), r += t);
310
- return r;
311
- }
312
- function Qn() {
313
- for (var e, n, t = 0, r = "", a = arguments.length; t < a; t++) (e = arguments[t]) && (n = Xn(e)) && (r && (r += " "), r += n);
314
- return r;
315
- }
316
- var ur = Object.create, Ve = Object.defineProperty, cr = Object.defineProperties, pr = Object.getOwnPropertyDescriptor, fr = Object.getOwnPropertyDescriptors, Jn = Object.getOwnPropertyNames, Ge = Object.getOwnPropertySymbols, dr = Object.getPrototypeOf, gn = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, On = (e, n, t) => n in e ? Ve(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, ae = (e, n) => {
317
- for (var t in n || (n = {}))
318
- gn.call(n, t) && On(e, t, n[t]);
319
- if (Ge)
320
- for (var t of Ge(n))
321
- et.call(n, t) && On(e, t, n[t]);
322
- return e;
323
- }, Xe = (e, n) => cr(e, fr(n)), nt = (e, n) => {
324
- var t = {};
325
- for (var r in e)
326
- gn.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
327
- if (e != null && Ge)
328
- for (var r of Ge(e))
329
- n.indexOf(r) < 0 && et.call(e, r) && (t[r] = e[r]);
330
- return t;
331
- }, gr = (e, n) => function() {
332
- return n || (0, e[Jn(e)[0]])((n = { exports: {} }).exports, n), n.exports;
333
- }, yr = (e, n) => {
334
- for (var t in n)
335
- Ve(e, t, { get: n[t], enumerable: !0 });
336
- }, hr = (e, n, t, r) => {
337
- if (n && typeof n == "object" || typeof n == "function")
338
- for (let a of Jn(n))
339
- !gn.call(e, a) && a !== t && Ve(e, a, { get: () => n[a], enumerable: !(r = pr(n, a)) || r.enumerable });
340
- return e;
341
- }, mr = (e, n, t) => (t = e != null ? ur(dr(e)) : {}, hr(
342
- // If the importer is in node compatibility mode or this is not an ESM
343
- // file that has been converted to a CommonJS file using a Babel-
344
- // compatible transform (i.e. "__esModule" has not been set), then set
345
- // "default" to the CommonJS "module.exports" for node compatibility.
346
- !e || !e.__esModule ? Ve(t, "default", { value: e, enumerable: !0 }) : t,
347
- e
348
- )), br = gr({
349
- "../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e, n) {
350
- var t = function() {
351
- var r = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, a = 0, o = {}, i = {
352
- /**
353
- * A namespace for utility methods.
354
- *
355
- * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
356
- * change or disappear at any time.
357
- *
358
- * @namespace
359
- * @memberof Prism
360
- */
361
- util: {
362
- encode: function c(p) {
363
- return p instanceof l ? new l(p.type, c(p.content), p.alias) : Array.isArray(p) ? p.map(c) : p.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
364
- },
365
- /**
366
- * Returns the name of the type of the given value.
367
- *
368
- * @param {any} o
369
- * @returns {string}
370
- * @example
371
- * type(null) === 'Null'
372
- * type(undefined) === 'Undefined'
373
- * type(123) === 'Number'
374
- * type('foo') === 'String'
375
- * type(true) === 'Boolean'
376
- * type([1, 2]) === 'Array'
377
- * type({}) === 'Object'
378
- * type(String) === 'Function'
379
- * type(/abc+/) === 'RegExp'
380
- */
381
- type: function(c) {
382
- return Object.prototype.toString.call(c).slice(8, -1);
383
- },
384
- /**
385
- * Returns a unique number for the given object. Later calls will still return the same number.
386
- *
387
- * @param {Object} obj
388
- * @returns {number}
389
- */
390
- objId: function(c) {
391
- return c.__id || Object.defineProperty(c, "__id", { value: ++a }), c.__id;
392
- },
393
- /**
394
- * Creates a deep clone of the given object.
395
- *
396
- * The main intended use of this function is to clone language definitions.
397
- *
398
- * @param {T} o
399
- * @param {Record<number, any>} [visited]
400
- * @returns {T}
401
- * @template T
402
- */
403
- clone: function c(p, d) {
404
- d = d || {};
405
- var b, y;
406
- switch (i.util.type(p)) {
407
- case "Object":
408
- if (y = i.util.objId(p), d[y])
409
- return d[y];
410
- b = /** @type {Record<string, any>} */
411
- {}, d[y] = b;
412
- for (var w in p)
413
- p.hasOwnProperty(w) && (b[w] = c(p[w], d));
414
- return (
415
- /** @type {any} */
416
- b
417
- );
418
- case "Array":
419
- return y = i.util.objId(p), d[y] ? d[y] : (b = [], d[y] = b, p.forEach(function(E, k) {
420
- b[k] = c(E, d);
421
- }), /** @type {any} */
422
- b);
423
- default:
424
- return p;
425
- }
426
- },
427
- /**
428
- * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
429
- *
430
- * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
431
- *
432
- * @param {Element} element
433
- * @returns {string}
434
- */
435
- getLanguage: function(c) {
436
- for (; c; ) {
437
- var p = r.exec(c.className);
438
- if (p)
439
- return p[1].toLowerCase();
440
- c = c.parentElement;
441
- }
442
- return "none";
443
- },
444
- /**
445
- * Sets the Prism `language-xxxx` class of the given element.
446
- *
447
- * @param {Element} element
448
- * @param {string} language
449
- * @returns {void}
450
- */
451
- setLanguage: function(c, p) {
452
- c.className = c.className.replace(RegExp(r, "gi"), ""), c.classList.add("language-" + p);
453
- },
454
- /**
455
- * Returns whether a given class is active for `element`.
456
- *
457
- * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
458
- * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
459
- * given class is just the given class with a `no-` prefix.
460
- *
461
- * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
462
- * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
463
- * ancestors have the given class or the negated version of it, then the default activation will be returned.
464
- *
465
- * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
466
- * version of it, the class is considered active.
467
- *
468
- * @param {Element} element
469
- * @param {string} className
470
- * @param {boolean} [defaultActivation=false]
471
- * @returns {boolean}
472
- */
473
- isActive: function(c, p, d) {
474
- for (var b = "no-" + p; c; ) {
475
- var y = c.classList;
476
- if (y.contains(p))
477
- return !0;
478
- if (y.contains(b))
479
- return !1;
480
- c = c.parentElement;
481
- }
482
- return !!d;
483
- }
484
- },
485
- /**
486
- * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
487
- *
488
- * @namespace
489
- * @memberof Prism
490
- * @public
491
- */
492
- languages: {
493
- /**
494
- * The grammar for plain, unformatted text.
495
- */
496
- plain: o,
497
- plaintext: o,
498
- text: o,
499
- txt: o,
500
- /**
501
- * Creates a deep copy of the language with the given id and appends the given tokens.
502
- *
503
- * If a token in `redef` also appears in the copied language, then the existing token in the copied language
504
- * will be overwritten at its original position.
505
- *
506
- * ## Best practices
507
- *
508
- * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
509
- * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
510
- * understand the language definition because, normally, the order of tokens matters in Prism grammars.
511
- *
512
- * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
513
- * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
514
- *
515
- * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
516
- * @param {Grammar} redef The new tokens to append.
517
- * @returns {Grammar} The new language created.
518
- * @public
519
- * @example
520
- * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
521
- * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
522
- * // at its original position
523
- * 'comment': { ... },
524
- * // CSS doesn't have a 'color' token, so this token will be appended
525
- * 'color': /\b(?:red|green|blue)\b/
526
- * });
527
- */
528
- extend: function(c, p) {
529
- var d = i.util.clone(i.languages[c]);
530
- for (var b in p)
531
- d[b] = p[b];
532
- return d;
533
- },
534
- /**
535
- * Inserts tokens _before_ another token in a language definition or any other grammar.
536
- *
537
- * ## Usage
538
- *
539
- * This helper method makes it easy to modify existing languages. For example, the CSS language definition
540
- * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
541
- * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
542
- * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
543
- * this:
544
- *
545
- * ```js
546
- * Prism.languages.markup.style = {
547
- * // token
548
- * };
549
- * ```
550
- *
551
- * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
552
- * before existing tokens. For the CSS example above, you would use it like this:
553
- *
554
- * ```js
555
- * Prism.languages.insertBefore('markup', 'cdata', {
556
- * 'style': {
557
- * // token
558
- * }
559
- * });
560
- * ```
561
- *
562
- * ## Special cases
563
- *
564
- * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
565
- * will be ignored.
566
- *
567
- * This behavior can be used to insert tokens after `before`:
568
- *
569
- * ```js
570
- * Prism.languages.insertBefore('markup', 'comment', {
571
- * 'comment': Prism.languages.markup.comment,
572
- * // tokens after 'comment'
573
- * });
574
- * ```
575
- *
576
- * ## Limitations
577
- *
578
- * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
579
- * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
580
- * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
581
- * deleting properties which is necessary to insert at arbitrary positions.
582
- *
583
- * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
584
- * Instead, it will create a new object and replace all references to the target object with the new one. This
585
- * can be done without temporarily deleting properties, so the iteration order is well-defined.
586
- *
587
- * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
588
- * you hold the target object in a variable, then the value of the variable will not change.
589
- *
590
- * ```js
591
- * var oldMarkup = Prism.languages.markup;
592
- * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
593
- *
594
- * assert(oldMarkup !== Prism.languages.markup);
595
- * assert(newMarkup === Prism.languages.markup);
596
- * ```
597
- *
598
- * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
599
- * object to be modified.
600
- * @param {string} before The key to insert before.
601
- * @param {Grammar} insert An object containing the key-value pairs to be inserted.
602
- * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
603
- * object to be modified.
604
- *
605
- * Defaults to `Prism.languages`.
606
- * @returns {Grammar} The new grammar object.
607
- * @public
608
- */
609
- insertBefore: function(c, p, d, b) {
610
- b = b || /** @type {any} */
611
- i.languages;
612
- var y = b[c], w = {};
613
- for (var E in y)
614
- if (y.hasOwnProperty(E)) {
615
- if (E == p)
616
- for (var k in d)
617
- d.hasOwnProperty(k) && (w[k] = d[k]);
618
- d.hasOwnProperty(E) || (w[E] = y[E]);
619
- }
620
- var N = b[c];
621
- return b[c] = w, i.languages.DFS(i.languages, function(L, M) {
622
- M === N && L != c && (this[L] = w);
623
- }), w;
624
- },
625
- // Traverse a language definition with Depth First Search
626
- DFS: function c(p, d, b, y) {
627
- y = y || {};
628
- var w = i.util.objId;
629
- for (var E in p)
630
- if (p.hasOwnProperty(E)) {
631
- d.call(p, E, p[E], b || E);
632
- var k = p[E], N = i.util.type(k);
633
- N === "Object" && !y[w(k)] ? (y[w(k)] = !0, c(k, d, null, y)) : N === "Array" && !y[w(k)] && (y[w(k)] = !0, c(k, d, E, y));
634
- }
635
- }
636
- },
637
- plugins: {},
638
- /**
639
- * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
640
- * and the language definitions to use, and returns a string with the HTML produced.
641
- *
642
- * The following hooks will be run:
643
- * 1. `before-tokenize`
644
- * 2. `after-tokenize`
645
- * 3. `wrap`: On each {@link Token}.
646
- *
647
- * @param {string} text A string with the code to be highlighted.
648
- * @param {Grammar} grammar An object containing the tokens to use.
649
- *
650
- * Usually a language definition like `Prism.languages.markup`.
651
- * @param {string} language The name of the language definition passed to `grammar`.
652
- * @returns {string} The highlighted HTML.
653
- * @memberof Prism
654
- * @public
655
- * @example
656
- * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
657
- */
658
- highlight: function(c, p, d) {
659
- var b = {
660
- code: c,
661
- grammar: p,
662
- language: d
663
- };
664
- if (i.hooks.run("before-tokenize", b), !b.grammar)
665
- throw new Error('The language "' + b.language + '" has no grammar.');
666
- return b.tokens = i.tokenize(b.code, b.grammar), i.hooks.run("after-tokenize", b), l.stringify(i.util.encode(b.tokens), b.language);
667
- },
668
- /**
669
- * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
670
- * and the language definitions to use, and returns an array with the tokenized code.
671
- *
672
- * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
673
- *
674
- * This method could be useful in other contexts as well, as a very crude parser.
675
- *
676
- * @param {string} text A string with the code to be highlighted.
677
- * @param {Grammar} grammar An object containing the tokens to use.
678
- *
679
- * Usually a language definition like `Prism.languages.markup`.
680
- * @returns {TokenStream} An array of strings and tokens, a token stream.
681
- * @memberof Prism
682
- * @public
683
- * @example
684
- * let code = `var foo = 0;`;
685
- * let tokens = Prism.tokenize(code, Prism.languages.javascript);
686
- * tokens.forEach(token => {
687
- * if (token instanceof Prism.Token && token.type === 'number') {
688
- * console.log(`Found numeric literal: ${token.content}`);
689
- * }
690
- * });
691
- */
692
- tokenize: function(c, p) {
693
- var d = p.rest;
694
- if (d) {
695
- for (var b in d)
696
- p[b] = d[b];
697
- delete p.rest;
698
- }
699
- var y = new g();
700
- return f(y, y.head, c), u(c, y, p, y.head, 0), v(y);
701
- },
702
- /**
703
- * @namespace
704
- * @memberof Prism
705
- * @public
706
- */
707
- hooks: {
708
- all: {},
709
- /**
710
- * Adds the given callback to the list of callbacks for the given hook.
711
- *
712
- * The callback will be invoked when the hook it is registered for is run.
713
- * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
714
- *
715
- * One callback function can be registered to multiple hooks and the same hook multiple times.
716
- *
717
- * @param {string} name The name of the hook.
718
- * @param {HookCallback} callback The callback function which is given environment variables.
719
- * @public
720
- */
721
- add: function(c, p) {
722
- var d = i.hooks.all;
723
- d[c] = d[c] || [], d[c].push(p);
724
- },
725
- /**
726
- * Runs a hook invoking all registered callbacks with the given environment variables.
727
- *
728
- * Callbacks will be invoked synchronously and in the order in which they were registered.
729
- *
730
- * @param {string} name The name of the hook.
731
- * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
732
- * @public
733
- */
734
- run: function(c, p) {
735
- var d = i.hooks.all[c];
736
- if (!(!d || !d.length))
737
- for (var b = 0, y; y = d[b++]; )
738
- y(p);
739
- }
740
- },
741
- Token: l
742
- };
743
- function l(c, p, d, b) {
744
- this.type = c, this.content = p, this.alias = d, this.length = (b || "").length | 0;
745
- }
746
- l.stringify = function c(p, d) {
747
- if (typeof p == "string")
748
- return p;
749
- if (Array.isArray(p)) {
750
- var b = "";
751
- return p.forEach(function(N) {
752
- b += c(N, d);
753
- }), b;
754
- }
755
- var y = {
756
- type: p.type,
757
- content: c(p.content, d),
758
- tag: "span",
759
- classes: ["token", p.type],
760
- attributes: {},
761
- language: d
762
- }, w = p.alias;
763
- w && (Array.isArray(w) ? Array.prototype.push.apply(y.classes, w) : y.classes.push(w)), i.hooks.run("wrap", y);
764
- var E = "";
765
- for (var k in y.attributes)
766
- E += " " + k + '="' + (y.attributes[k] || "").replace(/"/g, "&quot;") + '"';
767
- return "<" + y.tag + ' class="' + y.classes.join(" ") + '"' + E + ">" + y.content + "</" + y.tag + ">";
768
- };
769
- function s(c, p, d, b) {
770
- c.lastIndex = p;
771
- var y = c.exec(d);
772
- if (y && b && y[1]) {
773
- var w = y[1].length;
774
- y.index += w, y[0] = y[0].slice(w);
775
- }
776
- return y;
777
- }
778
- function u(c, p, d, b, y, w) {
779
- for (var E in d)
780
- if (!(!d.hasOwnProperty(E) || !d[E])) {
781
- var k = d[E];
782
- k = Array.isArray(k) ? k : [k];
783
- for (var N = 0; N < k.length; ++N) {
784
- if (w && w.cause == E + "," + N)
785
- return;
786
- var L = k[N], M = L.inside, D = !!L.lookbehind, W = !!L.greedy, q = L.alias;
787
- if (W && !L.pattern.global) {
788
- var _ = L.pattern.toString().match(/[imsuy]*$/)[0];
789
- L.pattern = RegExp(L.pattern.source, _ + "g");
790
- }
791
- for (var O = L.pattern || L, T = b.next, $ = y; T !== p.tail && !(w && $ >= w.reach); $ += T.value.length, T = T.next) {
792
- var Y = T.value;
793
- if (p.length > c.length)
794
- return;
795
- if (!(Y instanceof l)) {
796
- var F = 1, R;
797
- if (W) {
798
- if (R = s(O, $, c, D), !R || R.index >= c.length)
799
- break;
800
- var ne = R.index, be = R.index + R[0].length, V = $;
801
- for (V += T.value.length; ne >= V; )
802
- T = T.next, V += T.value.length;
803
- if (V -= T.value.length, $ = V, T.value instanceof l)
804
- continue;
805
- for (var le = T; le !== p.tail && (V < be || typeof le.value == "string"); le = le.next)
806
- F++, V += le.value.length;
807
- F--, Y = c.slice($, V), R.index -= $;
808
- } else if (R = s(O, 0, Y, D), !R)
809
- continue;
810
- var ne = R.index, te = R[0], ee = Y.slice(0, ne), ve = Y.slice(ne + te.length), we = $ + Y.length;
811
- w && we > w.reach && (w.reach = we);
812
- var pe = T.prev;
813
- ee && (pe = f(p, pe, ee), $ += ee.length), m(p, pe, F);
814
- var fe = new l(E, M ? i.tokenize(te, M) : te, q, te);
815
- if (T = f(p, pe, fe), ve && f(p, T, ve), F > 1) {
816
- var Ce = {
817
- cause: E + "," + N,
818
- reach: we
819
- };
820
- u(c, p, d, T.prev, $, Ce), w && Ce.reach > w.reach && (w.reach = Ce.reach);
821
- }
822
- }
823
- }
824
- }
825
- }
826
- }
827
- function g() {
828
- var c = { value: null, prev: null, next: null }, p = { value: null, prev: c, next: null };
829
- c.next = p, this.head = c, this.tail = p, this.length = 0;
830
- }
831
- function f(c, p, d) {
832
- var b = p.next, y = { value: d, prev: p, next: b };
833
- return p.next = y, b.prev = y, c.length++, y;
834
- }
835
- function m(c, p, d) {
836
- for (var b = p.next, y = 0; y < d && b !== c.tail; y++)
837
- b = b.next;
838
- p.next = b, b.prev = p, c.length -= y;
839
- }
840
- function v(c) {
841
- for (var p = [], d = c.head.next; d !== c.tail; )
842
- p.push(d.value), d = d.next;
843
- return p;
844
- }
845
- return i;
846
- }();
847
- n.exports = t, t.default = t;
848
- }
849
- }), h = mr(br());
850
- h.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, h.languages.markup.tag.inside["attr-value"].inside.entity = h.languages.markup.entity, h.languages.markup.doctype.inside["internal-subset"].inside = h.languages.markup, h.hooks.add("wrap", function(e) {
851
- e.type === "entity" && (e.attributes.title = e.content.replace(/&amp;/, "&"));
852
- }), Object.defineProperty(h.languages.markup.tag, "addInlined", { value: function(e, r) {
853
- var t = {}, t = (t["language-" + r] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: h.languages[r] }, t.cdata = /^<!\[CDATA\[|\]\]>$/i, { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: t } }), r = (t["language-" + r] = { pattern: /[\s\S]+/, inside: h.languages[r] }, {});
854
- r[e] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
855
- return e;
856
- }), "i"), lookbehind: !0, greedy: !0, inside: t }, h.languages.insertBefore("markup", "cdata", r);
857
- } }), Object.defineProperty(h.languages.markup.tag, "addAttribute", { value: function(e, n) {
858
- h.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [n, "language-" + n], inside: h.languages[n] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
859
- } }), h.languages.html = h.languages.markup, h.languages.mathml = h.languages.markup, h.languages.svg = h.languages.markup, h.languages.xml = h.languages.extend("markup", {}), h.languages.ssml = h.languages.xml, h.languages.atom = h.languages.xml, h.languages.rss = h.languages.xml, function(e) {
860
- var n = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" }, t = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/, r = "(?:[^\\\\-]|" + t.source + ")", r = RegExp(r + "-" + r), a = { pattern: /(<|')[^<>']+(?=[>']$)/, lookbehind: !0, alias: "variable" };
861
- e.languages.regex = { "char-class": { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: !0, inside: { "char-class-negation": { pattern: /(^\[)\^/, lookbehind: !0, alias: "operator" }, "char-class-punctuation": { pattern: /^\[|\]$/, alias: "punctuation" }, range: { pattern: r, inside: { escape: t, "range-punctuation": { pattern: /-/, alias: "operator" } } }, "special-escape": n, "char-set": { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, escape: t } }, "special-escape": n, "char-set": { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, backreference: [{ pattern: /\\(?![123][0-7]{2})[1-9]/, alias: "keyword" }, { pattern: /\\k<[^<>']+>/, alias: "keyword", inside: { "group-name": a } }], anchor: { pattern: /[$^]|\\[ABbGZz]/, alias: "function" }, escape: t, group: [{ pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/, alias: "punctuation", inside: { "group-name": a } }, { pattern: /\)/, alias: "punctuation" }], quantifier: { pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/, alias: "number" }, alternation: { pattern: /\|/, alias: "keyword" } };
862
- }(h), h.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, h.languages.javascript = h.languages.extend("clike", { "class-name": [h.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), h.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, h.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: h.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: h.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: h.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: h.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: h.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), h.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: h.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), h.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), h.languages.markup && (h.languages.markup.tag.addInlined("script", "javascript"), h.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), h.languages.js = h.languages.javascript, h.languages.actionscript = h.languages.extend("javascript", { keyword: /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/, operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/ }), h.languages.actionscript["class-name"].alias = "function", delete h.languages.actionscript.parameter, delete h.languages.actionscript["literal-property"], h.languages.markup && h.languages.insertBefore("actionscript", "string", { xml: { pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/, lookbehind: !0, inside: h.languages.markup } }), function(e) {
863
- var n = /#(?!\{).+/, t = { pattern: /#\{[^}]+\}/, alias: "variable" };
864
- e.languages.coffeescript = e.languages.extend("javascript", { comment: n, string: [{ pattern: /'(?:\\[\s\S]|[^\\'])*'/, greedy: !0 }, { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: !0, inside: { interpolation: t } }], keyword: /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, "class-member": { pattern: /@(?!\d)\w+/, alias: "variable" } }), e.languages.insertBefore("coffeescript", "comment", { "multiline-comment": { pattern: /###[\s\S]+?###/, alias: "comment" }, "block-regex": { pattern: /\/{3}[\s\S]*?\/{3}/, alias: "regex", inside: { comment: n, interpolation: t } } }), e.languages.insertBefore("coffeescript", "string", { "inline-javascript": { pattern: /`(?:\\[\s\S]|[^\\`])*`/, inside: { delimiter: { pattern: /^`|`$/, alias: "punctuation" }, script: { pattern: /[\s\S]+/, alias: "language-javascript", inside: e.languages.javascript } } }, "multiline-string": [{ pattern: /'''[\s\S]*?'''/, greedy: !0, alias: "string" }, { pattern: /"""[\s\S]*?"""/, greedy: !0, alias: "string", inside: { interpolation: t } }] }), e.languages.insertBefore("coffeescript", "keyword", { property: /(?!\d)\w+(?=\s*:(?!:))/ }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
865
- }(h), function(e) {
866
- var n = e.languages.javadoclike = { parameter: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m, lookbehind: !0 }, keyword: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m, lookbehind: !0 }, punctuation: /[{}]/ };
867
- Object.defineProperty(n, "addSupport", { value: function(t, r) {
868
- (t = typeof t == "string" ? [t] : t).forEach(function(a) {
869
- var o = function(f) {
870
- f.inside || (f.inside = {}), f.inside.rest = r;
871
- }, i = "doc-comment";
872
- if (l = e.languages[a]) {
873
- var l, s = l[i];
874
- if ((s = s || (l = e.languages.insertBefore(a, "comment", { "doc-comment": { pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/, lookbehind: !0, alias: "comment" } }))[i]) instanceof RegExp && (s = l[i] = { pattern: s }), Array.isArray(s))
875
- for (var u = 0, g = s.length; u < g; u++)
876
- s[u] instanceof RegExp && (s[u] = { pattern: s[u] }), o(s[u]);
877
- else
878
- o(s);
879
- }
880
- });
881
- } }), n.addSupport(["java", "javascript", "php"], n);
882
- }(h), function(e) {
883
- var n = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/, n = (e.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + n.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + n.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + n.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + n.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: n, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, e.languages.css.atrule.inside.rest = e.languages.css, e.languages.markup);
884
- n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
885
- }(h), function(e) {
886
- var n = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, n = (e.languages.css.selector = { pattern: e.languages.css.selector.pattern, lookbehind: !0, inside: n = { "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, "pseudo-class": /:[-\w]+/, class: /\.[-\w]+/, id: /#[-\w]+/, attribute: { pattern: RegExp(`\\[(?:[^[\\]"']|` + n.source + ")*\\]"), greedy: !0, inside: { punctuation: /^\[|\]$/, "case-sensitivity": { pattern: /(\s)[si]$/i, lookbehind: !0, alias: "keyword" }, namespace: { pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/, lookbehind: !0, inside: { punctuation: /\|$/ } }, "attr-name": { pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/, lookbehind: !0 }, "attr-value": [n, { pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/, lookbehind: !0 }], operator: /[|~*^$]?=/ } }, "n-th": [{ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, lookbehind: !0, inside: { number: /[\dn]+/, operator: /[+-]/ } }, { pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, lookbehind: !0 }], combinator: />|\+|~|\|\|/, punctuation: /[(),]/ } }, e.languages.css.atrule.inside["selector-function-argument"].inside = n, e.languages.insertBefore("css", "property", { variable: { pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i, lookbehind: !0 } }), { pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/, lookbehind: !0 }), t = { pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/, lookbehind: !0 };
887
- e.languages.insertBefore("css", "function", { operator: { pattern: /(\s)[+\-*\/](?=\s)/, lookbehind: !0 }, hexcode: { pattern: /\B#[\da-f]{3,8}\b/i, alias: "color" }, color: [{ pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i, lookbehind: !0 }, { pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { unit: n, number: t, function: /[\w-]+(?=\()/, punctuation: /[(),]/ } }], entity: /\\[\da-f]{1,8}/i, unit: n, number: t });
888
- }(h), function(e) {
889
- var n = /[*&][^\s[\]{},]+/, t = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, r = "(?:" + t.source + "(?:[ ]+" + n.source + ")?|" + n.source + "(?:[ ]+" + t.source + ")?)", a = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
890
- return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
891
- }), o = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
892
- function i(l, s) {
893
- s = (s || "").replace(/m/g, "") + "m";
894
- var u = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
895
- return r;
896
- }).replace(/<<value>>/g, function() {
897
- return l;
898
- });
899
- return RegExp(u, s);
900
- }
901
- e.languages.yaml = { scalar: { pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
902
- return r;
903
- })), lookbehind: !0, alias: "string" }, comment: /#.*/, key: { pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
904
- return r;
905
- }).replace(/<<key>>/g, function() {
906
- return "(?:" + a + "|" + o + ")";
907
- })), lookbehind: !0, greedy: !0, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" }, datetime: { pattern: i(/\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), lookbehind: !0, alias: "number" }, boolean: { pattern: i(/false|true/.source, "i"), lookbehind: !0, alias: "important" }, null: { pattern: i(/null|~/.source, "i"), lookbehind: !0, alias: "important" }, string: { pattern: i(o), lookbehind: !0, greedy: !0 }, number: { pattern: i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"), lookbehind: !0 }, tag: t, important: n, punctuation: /---|[:[\]{}\-,|>?]|\.\.\./ }, e.languages.yml = e.languages.yaml;
908
- }(h), function(e) {
909
- var n = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
910
- function t(u) {
911
- return u = u.replace(/<inner>/g, function() {
912
- return n;
913
- }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + u + ")");
914
- }
915
- var r = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, a = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
916
- return r;
917
- }), o = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source, i = (e.languages.markdown = e.languages.extend("markup", {}), e.languages.insertBefore("markdown", "prolog", { "front-matter-block": { pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, lookbehind: !0, greedy: !0, inside: { punctuation: /^---|---$/, "front-matter": { pattern: /\S+(?:\s+\S+)*/, alias: ["yaml", "language-yaml"], inside: e.languages.yaml } } }, blockquote: { pattern: /^>(?:[\t ]*>)*/m, alias: "punctuation" }, table: { pattern: RegExp("^" + a + o + "(?:" + a + ")*", "m"), inside: { "table-data-rows": { pattern: RegExp("^(" + a + o + ")(?:" + a + ")*$"), lookbehind: !0, inside: { "table-data": { pattern: RegExp(r), inside: e.languages.markdown }, punctuation: /\|/ } }, "table-line": { pattern: RegExp("^(" + a + ")" + o + "$"), lookbehind: !0, inside: { punctuation: /\||:?-{3,}:?/ } }, "table-header-row": { pattern: RegExp("^" + a + "$"), inside: { "table-header": { pattern: RegExp(r), alias: "important", inside: e.languages.markdown }, punctuation: /\|/ } } } }, code: [{ pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, lookbehind: !0, alias: "keyword" }, { pattern: /^```[\s\S]*?^```$/m, greedy: !0, inside: { "code-block": { pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, lookbehind: !0 }, "code-language": { pattern: /^(```).+/, lookbehind: !0 }, punctuation: /```/ } }], title: [{ pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, alias: "important", inside: { punctuation: /==+$|--+$/ } }, { pattern: /(^\s*)#.+/m, lookbehind: !0, alias: "important", inside: { punctuation: /^#+|#+$/ } }], hr: { pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, lookbehind: !0, alias: "punctuation" }, list: { pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, lookbehind: !0, alias: "punctuation" }, "url-reference": { pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, inside: { variable: { pattern: /^(!?\[)[^\]]+/, lookbehind: !0 }, string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, punctuation: /^[\[\]!:]|[<>]/ }, alias: "url" }, bold: { pattern: t(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^..)[\s\S]+(?=..$)/, lookbehind: !0, inside: {} }, punctuation: /\*\*|__/ } }, italic: { pattern: t(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^.)[\s\S]+(?=.$)/, lookbehind: !0, inside: {} }, punctuation: /[*_]/ } }, strike: { pattern: t(/(~~?)(?:(?!~)<inner>)+\2/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^~~?)[\s\S]+(?=\1$)/, lookbehind: !0, inside: {} }, punctuation: /~~?/ } }, "code-snippet": { pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/, lookbehind: !0, greedy: !0, alias: ["code", "keyword"] }, url: { pattern: t(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source), lookbehind: !0, greedy: !0, inside: { operator: /^!/, content: { pattern: /(^\[)[^\]]+(?=\])/, lookbehind: !0, inside: {} }, variable: { pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/, lookbehind: !0 }, url: { pattern: /(^\]\()[^\s)]+/, lookbehind: !0 }, string: { pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/, lookbehind: !0 } } } }), ["url", "bold", "italic", "strike"].forEach(function(u) {
918
- ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(g) {
919
- u !== g && (e.languages.markdown[u].inside.content.inside[g] = e.languages.markdown[g]);
920
- });
921
- }), e.hooks.add("after-tokenize", function(u) {
922
- u.language !== "markdown" && u.language !== "md" || function g(f) {
923
- if (f && typeof f != "string")
924
- for (var m = 0, v = f.length; m < v; m++) {
925
- var c, p = f[m];
926
- p.type !== "code" ? g(p.content) : (c = p.content[1], p = p.content[3], c && p && c.type === "code-language" && p.type === "code-block" && typeof c.content == "string" && (c = c.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), c = "language-" + (c = (/[a-z][\w-]*/i.exec(c) || [""])[0].toLowerCase()), p.alias ? typeof p.alias == "string" ? p.alias = [p.alias, c] : p.alias.push(c) : p.alias = [c]));
927
- }
928
- }(u.tokens);
929
- }), e.hooks.add("wrap", function(u) {
930
- if (u.type === "code-block") {
931
- for (var g = "", f = 0, m = u.classes.length; f < m; f++) {
932
- var v = u.classes[f], v = /language-(.+)/.exec(v);
933
- if (v) {
934
- g = v[1];
935
- break;
936
- }
937
- }
938
- var c, p = e.languages[g];
939
- p ? u.content = e.highlight(function(d) {
940
- return d = d.replace(i, ""), d = d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(b, y) {
941
- var w;
942
- return (y = y.toLowerCase())[0] === "#" ? (w = y[1] === "x" ? parseInt(y.slice(2), 16) : Number(y.slice(1)), s(w)) : l[y] || b;
943
- });
944
- }(u.content), p, g) : g && g !== "none" && e.plugins.autoloader && (c = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(1e16 * Math.random()), u.attributes.id = c, e.plugins.autoloader.loadLanguages(g, function() {
945
- var d = document.getElementById(c);
946
- d && (d.innerHTML = e.highlight(d.textContent, e.languages[g], g));
947
- }));
948
- }
949
- }), RegExp(e.languages.markup.tag.pattern.source, "gi")), l = { amp: "&", lt: "<", gt: ">", quot: '"' }, s = String.fromCodePoint || String.fromCharCode;
950
- e.languages.md = e.languages.markdown;
951
- }(h), h.languages.graphql = { comment: /#.*/, description: { pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, greedy: !0, alias: "string", inside: { "language-markdown": { pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, lookbehind: !0, inside: h.languages.markdown } } }, string: { pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, greedy: !0 }, number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, boolean: /\b(?:false|true)\b/, variable: /\$[a-z_]\w*/i, directive: { pattern: /@[a-z_]\w*/i, alias: "function" }, "attr-name": { pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, greedy: !0 }, "atom-input": { pattern: /\b[A-Z]\w*Input\b/, alias: "class-name" }, scalar: /\b(?:Boolean|Float|ID|Int|String)\b/, constant: /\b[A-Z][A-Z_\d]*\b/, "class-name": { pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/, lookbehind: !0 }, fragment: { pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-mutation": { pattern: /(\bmutation\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-query": { pattern: /(\bquery\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, operator: /[!=|&]|\.{3}/, "property-query": /\w+(?=\s*\()/, object: /\w+(?=\s*\{)/, punctuation: /[!(){}\[\]:=,]/, property: /\w+/ }, h.hooks.add("after-tokenize", function(e) {
952
- if (e.language === "graphql")
953
- for (var n = e.tokens.filter(function(c) {
954
- return typeof c != "string" && c.type !== "comment" && c.type !== "scalar";
955
- }), t = 0; t < n.length; ) {
956
- var r = n[t++];
957
- if (r.type === "keyword" && r.content === "mutation") {
958
- var a = [];
959
- if (f(["definition-mutation", "punctuation"]) && g(1).content === "(") {
960
- t += 2;
961
- var o = m(/^\($/, /^\)$/);
962
- if (o === -1)
963
- continue;
964
- for (; t < o; t++) {
965
- var i = g(0);
966
- i.type === "variable" && (v(i, "variable-input"), a.push(i.content));
967
- }
968
- t = o + 1;
969
- }
970
- if (f(["punctuation", "property-query"]) && g(0).content === "{" && (t++, v(g(0), "property-mutation"), 0 < a.length)) {
971
- var l = m(/^\{$/, /^\}$/);
972
- if (l !== -1)
973
- for (var s = t; s < l; s++) {
974
- var u = n[s];
975
- u.type === "variable" && 0 <= a.indexOf(u.content) && v(u, "variable-input");
976
- }
977
- }
978
- }
979
- }
980
- function g(c) {
981
- return n[t + c];
982
- }
983
- function f(c, p) {
984
- p = p || 0;
985
- for (var d = 0; d < c.length; d++) {
986
- var b = g(d + p);
987
- if (!b || b.type !== c[d])
988
- return;
989
- }
990
- return 1;
991
- }
992
- function m(c, p) {
993
- for (var d = 1, b = t; b < n.length; b++) {
994
- var y = n[b], w = y.content;
995
- if (y.type === "punctuation" && typeof w == "string") {
996
- if (c.test(w))
997
- d++;
998
- else if (p.test(w) && --d === 0)
999
- return b;
1000
- }
1001
- }
1002
- return -1;
1003
- }
1004
- function v(c, p) {
1005
- var d = c.alias;
1006
- d ? Array.isArray(d) || (c.alias = d = [d]) : c.alias = d = [], d.push(p);
1007
- }
1008
- }), h.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(e) {
1009
- var n = e.languages.javascript["template-string"], t = n.pattern.source, r = n.inside.interpolation, a = r.inside["interpolation-punctuation"], o = r.pattern.source;
1010
- function i(f, m) {
1011
- if (e.languages[f])
1012
- return { pattern: RegExp("((?:" + m + ")\\s*)" + t), lookbehind: !0, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, "embedded-code": { pattern: /[\s\S]+/, alias: f } } };
1013
- }
1014
- function l(f, m, v) {
1015
- return f = { code: f, grammar: m, language: v }, e.hooks.run("before-tokenize", f), f.tokens = e.tokenize(f.code, f.grammar), e.hooks.run("after-tokenize", f), f.tokens;
1016
- }
1017
- function s(f, m, v) {
1018
- var d = e.tokenize(f, { interpolation: { pattern: RegExp(o), lookbehind: !0 } }), c = 0, p = {}, d = l(d.map(function(y) {
1019
- if (typeof y == "string")
1020
- return y;
1021
- for (var w, E, y = y.content; f.indexOf((E = c++, w = "___" + v.toUpperCase() + "_" + E + "___")) !== -1; )
1022
- ;
1023
- return p[w] = y, w;
1024
- }).join(""), m, v), b = Object.keys(p);
1025
- return c = 0, function y(w) {
1026
- for (var E = 0; E < w.length; E++) {
1027
- if (c >= b.length)
1028
- return;
1029
- var k, N, L, M, D, W, q, _ = w[E];
1030
- typeof _ == "string" || typeof _.content == "string" ? (k = b[c], (q = (W = typeof _ == "string" ? _ : _.content).indexOf(k)) !== -1 && (++c, N = W.substring(0, q), D = p[k], L = void 0, (M = {})["interpolation-punctuation"] = a, (M = e.tokenize(D, M)).length === 3 && ((L = [1, 1]).push.apply(L, l(M[1], e.languages.javascript, "javascript")), M.splice.apply(M, L)), L = new e.Token("interpolation", M, r.alias, D), M = W.substring(q + k.length), D = [], N && D.push(N), D.push(L), M && (y(W = [M]), D.push.apply(D, W)), typeof _ == "string" ? (w.splice.apply(w, [E, 1].concat(D)), E += D.length - 1) : _.content = D)) : (q = _.content, Array.isArray(q) ? y(q) : y([q]));
1031
- }
1032
- }(d), new e.Token(v, d, "language-" + v, f);
1033
- }
1034
- e.languages.javascript["template-string"] = [i("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source), i("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source), i("svg", /\bsvg/.source), i("markdown", /\b(?:markdown|md)/.source), i("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source), i("sql", /\bsql/.source), n].filter(Boolean);
1035
- var u = { javascript: !0, js: !0, typescript: !0, ts: !0, jsx: !0, tsx: !0 };
1036
- function g(f) {
1037
- return typeof f == "string" ? f : Array.isArray(f) ? f.map(g).join("") : g(f.content);
1038
- }
1039
- e.hooks.add("after-tokenize", function(f) {
1040
- f.language in u && function m(v) {
1041
- for (var c = 0, p = v.length; c < p; c++) {
1042
- var d, b, y, w = v[c];
1043
- typeof w != "string" && (d = w.content, Array.isArray(d) ? w.type === "template-string" ? (w = d[1], d.length === 3 && typeof w != "string" && w.type === "embedded-code" && (b = g(w), w = w.alias, w = Array.isArray(w) ? w[0] : w, y = e.languages[w]) && (d[1] = s(b, y, w))) : m(d) : typeof d != "string" && m([d]));
1044
- }
1045
- }(f.tokens);
1046
- });
1047
- }(h), function(e) {
1048
- e.languages.typescript = e.languages.extend("javascript", { "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, lookbehind: !0, greedy: !0, inside: null }, builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/ }), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
1049
- var n = e.languages.extend("typescript", {});
1050
- delete n["class-name"], e.languages.typescript["class-name"].inside = n, e.languages.insertBefore("typescript", "function", { decorator: { pattern: /@[$\w\xA0-\uFFFF]+/, inside: { at: { pattern: /^@/, alias: "operator" }, function: /^[\s\S]+/ } }, "generic-function": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, greedy: !0, inside: { function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: n } } } }), e.languages.ts = e.languages.typescript;
1051
- }(h), function(e) {
1052
- var n = e.languages.javascript, t = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source, r = "(@(?:arg|argument|param|property)\\s+(?:" + t + "\\s+)?)";
1053
- e.languages.jsdoc = e.languages.extend("javadoclike", { parameter: { pattern: RegExp(r + /(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source), lookbehind: !0, inside: { punctuation: /\./ } } }), e.languages.insertBefore("jsdoc", "keyword", { "optional-parameter": { pattern: RegExp(r + /\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source), lookbehind: !0, inside: { parameter: { pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/, lookbehind: !0, inside: { punctuation: /\./ } }, code: { pattern: /(=)[\s\S]*(?=\]$)/, lookbehind: !0, inside: n, alias: "language-javascript" }, punctuation: /[=[\]]/ } }, "class-name": [{ pattern: RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g, function() {
1054
- return t;
1055
- })), lookbehind: !0, inside: { punctuation: /\./ } }, { pattern: RegExp("(@[a-z]+\\s+)" + t), lookbehind: !0, inside: { string: n.string, number: n.number, boolean: n.boolean, keyword: e.languages.typescript.keyword, operator: /=>|\.\.\.|[&|?:*]/, punctuation: /[.,;=<>{}()[\]]/ } }], example: { pattern: /(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/, lookbehind: !0, inside: { code: { pattern: /^([\t ]*(?:\*\s*)?)\S.*$/m, lookbehind: !0, inside: n, alias: "language-javascript" } } } }), e.languages.javadoclike.addSupport("javascript", e.languages.jsdoc);
1056
- }(h), function(e) {
1057
- e.languages.flow = e.languages.extend("javascript", {}), e.languages.insertBefore("flow", "keyword", { type: [{ pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/, alias: "class-name" }] }), e.languages.flow["function-variable"].pattern = /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i, delete e.languages.flow.parameter, e.languages.insertBefore("flow", "operator", { "flow-punctuation": { pattern: /\{\||\|\}/, alias: "punctuation" } }), Array.isArray(e.languages.flow.keyword) || (e.languages.flow.keyword = [e.languages.flow.keyword]), e.languages.flow.keyword.unshift({ pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/, lookbehind: !0 }, { pattern: /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/, lookbehind: !0 });
1058
- }(h), h.languages.n4js = h.languages.extend("javascript", { keyword: /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ }), h.languages.insertBefore("n4js", "constant", { annotation: { pattern: /@+\w+/, alias: "operator" } }), h.languages.n4jsd = h.languages.n4js, function(e) {
1059
- function n(i, l) {
1060
- return RegExp(i.replace(/<ID>/g, function() {
1061
- return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
1062
- }), l);
1063
- }
1064
- e.languages.insertBefore("javascript", "function-variable", { "method-variable": { pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source), lookbehind: !0, alias: ["function-variable", "method", "function", "property-access"] } }), e.languages.insertBefore("javascript", "function", { method: { pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source), lookbehind: !0, alias: ["function", "property-access"] } }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{ pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/, alias: "class-name" }, { pattern: /\b(?:[A-Z]\w*)Error\b/, alias: "class-name" }] }), e.languages.insertBefore("javascript", "keyword", { imports: { pattern: n(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source), lookbehind: !0, inside: e.languages.javascript }, exports: { pattern: n(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source), lookbehind: !0, inside: e.languages.javascript } }), e.languages.javascript.keyword.unshift({ pattern: /\b(?:as|default|export|from|import)\b/, alias: "module" }, { pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/, alias: "control-flow" }, { pattern: /\bnull\b/, alias: ["null", "nil"] }, { pattern: /\bundefined\b/, alias: "nil" }), e.languages.insertBefore("javascript", "operator", { spread: { pattern: /\.{3}/, alias: "operator" }, arrow: { pattern: /=>/, alias: "operator" } }), e.languages.insertBefore("javascript", "punctuation", { "property-access": { pattern: n(/(\.\s*)#?<ID>/.source), lookbehind: !0 }, "maybe-class-name": { pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, lookbehind: !0 }, dom: { pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/, alias: "variable" }, console: { pattern: /\bconsole(?=\s*\.)/, alias: "class-name" } });
1065
- for (var t = ["function", "function-variable", "method", "method-variable", "property-access"], r = 0; r < t.length; r++) {
1066
- var o = t[r], a = e.languages.javascript[o], o = (a = e.util.type(a) === "RegExp" ? e.languages.javascript[o] = { pattern: a } : a).inside || {};
1067
- (a.inside = o)["maybe-class-name"] = /^[A-Z][\s\S]*/;
1068
- }
1069
- }(h), function(e) {
1070
- var n = e.util.clone(e.languages.javascript), t = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, r = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, a = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
1071
- function o(s, u) {
1072
- return s = s.replace(/<S>/g, function() {
1073
- return t;
1074
- }).replace(/<BRACES>/g, function() {
1075
- return r;
1076
- }).replace(/<SPREAD>/g, function() {
1077
- return a;
1078
- }), RegExp(s, u);
1079
- }
1080
- a = o(a).source, e.languages.jsx = e.languages.extend("markup", n), e.languages.jsx.tag.pattern = o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source), 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 = n.comment, e.languages.insertBefore("inside", "attr-name", { spread: { pattern: o(/<SPREAD>/.source), inside: e.languages.jsx } }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", { script: { pattern: o(/=<BRACES>/.source), alias: "language-javascript", inside: { "script-punctuation": { pattern: /^=(?=\{)/, alias: "punctuation" }, rest: e.languages.jsx } } }, e.languages.jsx.tag);
1081
- function i(s) {
1082
- for (var u = [], g = 0; g < s.length; g++) {
1083
- var f = s[g], m = !1;
1084
- typeof f != "string" && (f.type === "tag" && f.content[0] && f.content[0].type === "tag" ? f.content[0].content[0].content === "</" ? 0 < u.length && u[u.length - 1].tagName === l(f.content[0].content[1]) && u.pop() : f.content[f.content.length - 1].content !== "/>" && u.push({ tagName: l(f.content[0].content[1]), openedBraces: 0 }) : 0 < u.length && f.type === "punctuation" && f.content === "{" ? u[u.length - 1].openedBraces++ : 0 < u.length && 0 < u[u.length - 1].openedBraces && f.type === "punctuation" && f.content === "}" ? u[u.length - 1].openedBraces-- : m = !0), (m || typeof f == "string") && 0 < u.length && u[u.length - 1].openedBraces === 0 && (m = l(f), g < s.length - 1 && (typeof s[g + 1] == "string" || s[g + 1].type === "plain-text") && (m += l(s[g + 1]), s.splice(g + 1, 1)), 0 < g && (typeof s[g - 1] == "string" || s[g - 1].type === "plain-text") && (m = l(s[g - 1]) + m, s.splice(g - 1, 1), g--), s[g] = new e.Token("plain-text", m, null, m)), f.content && typeof f.content != "string" && i(f.content);
1085
- }
1086
- }
1087
- var l = function(s) {
1088
- return s ? typeof s == "string" ? s : typeof s.content == "string" ? s.content : s.content.map(l).join("") : "";
1089
- };
1090
- e.hooks.add("after-tokenize", function(s) {
1091
- s.language !== "jsx" && s.language !== "tsx" || i(s.tokens);
1092
- });
1093
- }(h), function(e) {
1094
- var n = e.util.clone(e.languages.typescript), n = (e.languages.tsx = e.languages.extend("jsx", n), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"], e.languages.tsx.tag);
1095
- n.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + n.pattern.source + ")", n.pattern.flags), n.lookbehind = !0;
1096
- }(h), h.languages.swift = { comment: { pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/, lookbehind: !0, greedy: !0 }, "string-literal": [{ pattern: RegExp(/(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: !0, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\\($/, alias: "punctuation" }, punctuation: /\\(?=[\r\n])/, string: /[\s\S]+/ } }, { pattern: RegExp(/(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: !0, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\#+\($/, alias: "punctuation" }, string: /[\s\S]+/ } }], directive: { pattern: RegExp(/#/.source + "(?:" + /(?:elseif|if)\b/.source + "(?:[ ]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+|" + /(?:else|endif)\b/.source + ")"), alias: "property", inside: { "directive-name": /^#\w+/, boolean: /\b(?:false|true)\b/, number: /\b\d+(?:\.\d+)*\b/, operator: /!|&&|\|\||[<>]=?/, punctuation: /[(),]/ } }, literal: { pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/, alias: "constant" }, "other-directive": { pattern: /#\w+\b/, alias: "property" }, attribute: { pattern: /@\w+/, alias: "atrule" }, "function-definition": { pattern: /(\bfunc\s+)\w+/, lookbehind: !0, alias: "function" }, label: { pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/, lookbehind: !0, alias: "important" }, keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/, boolean: /\b(?:false|true)\b/, nil: { pattern: /\bnil\b/, alias: "constant" }, "short-argument": /\$\d+\b/, omit: { pattern: /\b_\b/, alias: "keyword" }, number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i, "class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/, function: /\b[a-z_]\w*(?=\s*\()/i, constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/, operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/, punctuation: /[{}[\]();,.:\\]/ }, h.languages.swift["string-literal"].forEach(function(e) {
1097
- e.inside.interpolation.inside = h.languages.swift;
1098
- }), function(e) {
1099
- e.languages.kotlin = e.languages.extend("clike", { keyword: { pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/, lookbehind: !0 }, function: [{ pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/, greedy: !0 }, { pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/, lookbehind: !0, greedy: !0 }], number: /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/, operator: /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/ }), delete e.languages.kotlin["class-name"];
1100
- var n = { "interpolation-punctuation": { pattern: /^\$\{?|\}$/, alias: "punctuation" }, expression: { pattern: /[\s\S]+/, inside: e.languages.kotlin } };
1101
- e.languages.insertBefore("kotlin", "string", { "string-literal": [{ pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/, alias: "multiline", inside: { interpolation: { pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i, inside: n }, string: /[\s\S]+/ } }, { pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/, alias: "singleline", inside: { interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i, lookbehind: !0, inside: n }, string: /[\s\S]+/ } }], char: { pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/, greedy: !0 } }), delete e.languages.kotlin.string, e.languages.insertBefore("kotlin", "keyword", { annotation: { pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/, alias: "builtin" } }), e.languages.insertBefore("kotlin", "function", { label: { pattern: /\b\w+@|@\w+\b/, alias: "symbol" } }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
1102
- }(h), h.languages.c = h.languages.extend("clike", { comment: { pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, "class-name": { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: !0 }, keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ }), h.languages.insertBefore("c", "string", { char: { pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, greedy: !0 } }), h.languages.insertBefore("c", "string", { macro: { pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: !0, greedy: !0, alias: "property", inside: { string: [{ pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: !0 }, h.languages.c.string], char: h.languages.c.char, comment: h.languages.c.comment, "macro-name": [{ pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: !0 }, { pattern: /(^#\s*define\s+)\w+\b(?=\()/i, lookbehind: !0, alias: "function" }], directive: { pattern: /^(#\s*)[a-z]+/, lookbehind: !0, alias: "keyword" }, "directive-hash": /^#/, punctuation: /##|\\(?=[\r\n])/, expression: { pattern: /\S[\s\S]*/, inside: h.languages.c } } } }), h.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete h.languages.c.boolean, h.languages.objectivec = h.languages.extend("c", { string: { pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/, operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ }), delete h.languages.objectivec["class-name"], h.languages.objc = h.languages.objectivec, h.languages.reason = h.languages.extend("clike", { string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/, greedy: !0 }, "class-name": /\b[A-Z]\w*/, keyword: /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/, operator: /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/ }), h.languages.insertBefore("reason", "class-name", { char: { pattern: /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/, greedy: !0 }, constructor: /\b[A-Z]\w*\b(?!\s*\.)/, label: { pattern: /\b[a-z]\w*(?=::)/, alias: "symbol" } }), delete h.languages.reason.function, function(e) {
1103
- for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, t = 0; t < 2; t++)
1104
- n = n.replace(/<self>/g, function() {
1105
- return n;
1106
- });
1107
- n = n.replace(/<self>/g, function() {
1108
- return /[^\s\S]/.source;
1109
- }), e.languages.rust = { comment: [{ pattern: RegExp(/(^|[^\\])/.source + n), lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: !0 }, char: { pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: !0 }, attribute: { pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/, greedy: !0, alias: "attr-name", inside: { string: null } }, "closure-params": { pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, lookbehind: !0, greedy: !0, inside: { "closure-punctuation": { pattern: /^\||\|$/, alias: "punctuation" }, rest: null } }, "lifetime-annotation": { pattern: /'\w+/, alias: "symbol" }, "fragment-specifier": { pattern: /(\$\w+:)[a-z]+/, lookbehind: !0, alias: "punctuation" }, variable: /\$\w+/, "function-definition": { pattern: /(\bfn\s+)\w+/, lookbehind: !0, alias: "function" }, "type-definition": { pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/, lookbehind: !0, alias: "class-name" }, "module-declaration": [{ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/, lookbehind: !0, alias: "namespace" }, { pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/, lookbehind: !0, alias: "namespace", inside: { punctuation: /::/ } }], keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/], function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/, macro: { pattern: /\b\w+!/, alias: "property" }, constant: /\b[A-Z_][A-Z_\d]+\b/, "class-name": /\b[A-Z]\w*\b/, namespace: { pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/, inside: { punctuation: /::/ } }, number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, boolean: /\b(?:false|true)\b/, punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ }, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
1110
- }(h), h.languages.go = h.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), h.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete h.languages.go["class-name"], function(e) {
1111
- var n = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, t = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
1112
- return n.source;
1113
- });
1114
- e.languages.cpp = e.languages.extend("c", { "class-name": [{ pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
1115
- return n.source;
1116
- })), lookbehind: !0 }, /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/], keyword: n, number: { pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i, greedy: !0 }, operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, boolean: /\b(?:false|true)\b/ }), e.languages.insertBefore("cpp", "string", { module: { pattern: RegExp(/(\b(?:import|module)\s+)/.source + "(?:" + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
1117
- return t;
1118
- }) + ")"), lookbehind: !0, greedy: !0, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: !0 } }), e.languages.insertBefore("cpp", "keyword", { "generic-function": { pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { function: /^\w+/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: e.languages.cpp } } } }), e.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), e.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: e.languages.extend("cpp", {}) } }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
1119
- }(h), h.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: /![sra](?=[:}]$)/, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, h.languages.python["string-interpolation"].inside.interpolation.inside.rest = h.languages.python, h.languages.py = h.languages.python, h.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, h.languages.webmanifest = h.languages.json;
1120
- var sn = {};
1121
- yr(sn, {
1122
- dracula: () => xr,
1123
- duotoneDark: () => Ar,
1124
- duotoneLight: () => Er,
1125
- github: () => _r,
1126
- gruvboxMaterialDark: () => na,
1127
- gruvboxMaterialLight: () => ra,
1128
- jettwaveDark: () => Wr,
1129
- jettwaveLight: () => Zr,
1130
- nightOwl: () => Cr,
1131
- nightOwlLight: () => Ir,
1132
- oceanicNext: () => Lr,
1133
- okaidia: () => Nr,
1134
- oneDark: () => Xr,
1135
- oneLight: () => Jr,
1136
- palenight: () => Br,
1137
- shadesOfPurple: () => Mr,
1138
- synthwave84: () => $r,
1139
- ultramin: () => zr,
1140
- vsDark: () => tt,
1141
- vsLight: () => Hr
1142
- });
1143
- var vr = {
1144
- plain: {
1145
- color: "#F8F8F2",
1146
- backgroundColor: "#282A36"
1147
- },
1148
- styles: [
1149
- {
1150
- types: ["prolog", "constant", "builtin"],
1151
- style: {
1152
- color: "rgb(189, 147, 249)"
1153
- }
1154
- },
1155
- {
1156
- types: ["inserted", "function"],
1157
- style: {
1158
- color: "rgb(80, 250, 123)"
1159
- }
1160
- },
1161
- {
1162
- types: ["deleted"],
1163
- style: {
1164
- color: "rgb(255, 85, 85)"
1165
- }
1166
- },
1167
- {
1168
- types: ["changed"],
1169
- style: {
1170
- color: "rgb(255, 184, 108)"
1171
- }
1172
- },
1173
- {
1174
- types: ["punctuation", "symbol"],
1175
- style: {
1176
- color: "rgb(248, 248, 242)"
1177
- }
1178
- },
1179
- {
1180
- types: ["string", "char", "tag", "selector"],
1181
- style: {
1182
- color: "rgb(255, 121, 198)"
1183
- }
1184
- },
1185
- {
1186
- types: ["keyword", "variable"],
1187
- style: {
1188
- color: "rgb(189, 147, 249)",
1189
- fontStyle: "italic"
1190
- }
1191
- },
1192
- {
1193
- types: ["comment"],
1194
- style: {
1195
- color: "rgb(98, 114, 164)"
1196
- }
1197
- },
1198
- {
1199
- types: ["attr-name"],
1200
- style: {
1201
- color: "rgb(241, 250, 140)"
1202
- }
1203
- }
1204
- ]
1205
- }, xr = vr, wr = {
1206
- plain: {
1207
- backgroundColor: "#2a2734",
1208
- color: "#9a86fd"
1209
- },
1210
- styles: [
1211
- {
1212
- types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
1213
- style: {
1214
- color: "#6c6783"
1215
- }
1216
- },
1217
- {
1218
- types: ["namespace"],
1219
- style: {
1220
- opacity: 0.7
1221
- }
1222
- },
1223
- {
1224
- types: ["tag", "operator", "number"],
1225
- style: {
1226
- color: "#e09142"
1227
- }
1228
- },
1229
- {
1230
- types: ["property", "function"],
1231
- style: {
1232
- color: "#9a86fd"
1233
- }
1234
- },
1235
- {
1236
- types: ["tag-id", "selector", "atrule-id"],
1237
- style: {
1238
- color: "#eeebff"
1239
- }
1240
- },
1241
- {
1242
- types: ["attr-name"],
1243
- style: {
1244
- color: "#c4b9fe"
1245
- }
1246
- },
1247
- {
1248
- types: [
1249
- "boolean",
1250
- "string",
1251
- "entity",
1252
- "url",
1253
- "attr-value",
1254
- "keyword",
1255
- "control",
1256
- "directive",
1257
- "unit",
1258
- "statement",
1259
- "regex",
1260
- "atrule",
1261
- "placeholder",
1262
- "variable"
1263
- ],
1264
- style: {
1265
- color: "#ffcc99"
1266
- }
1267
- },
1268
- {
1269
- types: ["deleted"],
1270
- style: {
1271
- textDecorationLine: "line-through"
1272
- }
1273
- },
1274
- {
1275
- types: ["inserted"],
1276
- style: {
1277
- textDecorationLine: "underline"
1278
- }
1279
- },
1280
- {
1281
- types: ["italic"],
1282
- style: {
1283
- fontStyle: "italic"
1284
- }
1285
- },
1286
- {
1287
- types: ["important", "bold"],
1288
- style: {
1289
- fontWeight: "bold"
1290
- }
1291
- },
1292
- {
1293
- types: ["important"],
1294
- style: {
1295
- color: "#c4b9fe"
1296
- }
1297
- }
1298
- ]
1299
- }, Ar = wr, kr = {
1300
- plain: {
1301
- backgroundColor: "#faf8f5",
1302
- color: "#728fcb"
1303
- },
1304
- styles: [
1305
- {
1306
- types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
1307
- style: {
1308
- color: "#b6ad9a"
1309
- }
1310
- },
1311
- {
1312
- types: ["namespace"],
1313
- style: {
1314
- opacity: 0.7
1315
- }
1316
- },
1317
- {
1318
- types: ["tag", "operator", "number"],
1319
- style: {
1320
- color: "#063289"
1321
- }
1322
- },
1323
- {
1324
- types: ["property", "function"],
1325
- style: {
1326
- color: "#b29762"
1327
- }
1328
- },
1329
- {
1330
- types: ["tag-id", "selector", "atrule-id"],
1331
- style: {
1332
- color: "#2d2006"
1333
- }
1334
- },
1335
- {
1336
- types: ["attr-name"],
1337
- style: {
1338
- color: "#896724"
1339
- }
1340
- },
1341
- {
1342
- types: [
1343
- "boolean",
1344
- "string",
1345
- "entity",
1346
- "url",
1347
- "attr-value",
1348
- "keyword",
1349
- "control",
1350
- "directive",
1351
- "unit",
1352
- "statement",
1353
- "regex",
1354
- "atrule"
1355
- ],
1356
- style: {
1357
- color: "#728fcb"
1358
- }
1359
- },
1360
- {
1361
- types: ["placeholder", "variable"],
1362
- style: {
1363
- color: "#93abdc"
1364
- }
1365
- },
1366
- {
1367
- types: ["deleted"],
1368
- style: {
1369
- textDecorationLine: "line-through"
1370
- }
1371
- },
1372
- {
1373
- types: ["inserted"],
1374
- style: {
1375
- textDecorationLine: "underline"
1376
- }
1377
- },
1378
- {
1379
- types: ["italic"],
1380
- style: {
1381
- fontStyle: "italic"
1382
- }
1383
- },
1384
- {
1385
- types: ["important", "bold"],
1386
- style: {
1387
- fontWeight: "bold"
1388
- }
1389
- },
1390
- {
1391
- types: ["important"],
1392
- style: {
1393
- color: "#896724"
1394
- }
1395
- }
1396
- ]
1397
- }, Er = kr, Sr = {
1398
- plain: {
1399
- color: "#393A34",
1400
- backgroundColor: "#f6f8fa"
1401
- },
1402
- styles: [
1403
- {
1404
- types: ["comment", "prolog", "doctype", "cdata"],
1405
- style: {
1406
- color: "#999988",
1407
- fontStyle: "italic"
1408
- }
1409
- },
1410
- {
1411
- types: ["namespace"],
1412
- style: {
1413
- opacity: 0.7
1414
- }
1415
- },
1416
- {
1417
- types: ["string", "attr-value"],
1418
- style: {
1419
- color: "#e3116c"
1420
- }
1421
- },
1422
- {
1423
- types: ["punctuation", "operator"],
1424
- style: {
1425
- color: "#393A34"
1426
- }
1427
- },
1428
- {
1429
- types: [
1430
- "entity",
1431
- "url",
1432
- "symbol",
1433
- "number",
1434
- "boolean",
1435
- "variable",
1436
- "constant",
1437
- "property",
1438
- "regex",
1439
- "inserted"
1440
- ],
1441
- style: {
1442
- color: "#36acaa"
1443
- }
1444
- },
1445
- {
1446
- types: ["atrule", "keyword", "attr-name", "selector"],
1447
- style: {
1448
- color: "#00a4db"
1449
- }
1450
- },
1451
- {
1452
- types: ["function", "deleted", "tag"],
1453
- style: {
1454
- color: "#d73a49"
1455
- }
1456
- },
1457
- {
1458
- types: ["function-variable"],
1459
- style: {
1460
- color: "#6f42c1"
1461
- }
1462
- },
1463
- {
1464
- types: ["tag", "selector", "keyword"],
1465
- style: {
1466
- color: "#00009f"
1467
- }
1468
- }
1469
- ]
1470
- }, _r = Sr, Fr = {
1471
- plain: {
1472
- color: "#d6deeb",
1473
- backgroundColor: "#011627"
1474
- },
1475
- styles: [
1476
- {
1477
- types: ["changed"],
1478
- style: {
1479
- color: "rgb(162, 191, 252)",
1480
- fontStyle: "italic"
1481
- }
1482
- },
1483
- {
1484
- types: ["deleted"],
1485
- style: {
1486
- color: "rgba(239, 83, 80, 0.56)",
1487
- fontStyle: "italic"
1488
- }
1489
- },
1490
- {
1491
- types: ["inserted", "attr-name"],
1492
- style: {
1493
- color: "rgb(173, 219, 103)",
1494
- fontStyle: "italic"
1495
- }
1496
- },
1497
- {
1498
- types: ["comment"],
1499
- style: {
1500
- color: "rgb(99, 119, 119)",
1501
- fontStyle: "italic"
1502
- }
1503
- },
1504
- {
1505
- types: ["string", "url"],
1506
- style: {
1507
- color: "rgb(173, 219, 103)"
1508
- }
1509
- },
1510
- {
1511
- types: ["variable"],
1512
- style: {
1513
- color: "rgb(214, 222, 235)"
1514
- }
1515
- },
1516
- {
1517
- types: ["number"],
1518
- style: {
1519
- color: "rgb(247, 140, 108)"
1520
- }
1521
- },
1522
- {
1523
- types: ["builtin", "char", "constant", "function"],
1524
- style: {
1525
- color: "rgb(130, 170, 255)"
1526
- }
1527
- },
1528
- {
1529
- // This was manually added after the auto-generation
1530
- // so that punctuations are not italicised
1531
- types: ["punctuation"],
1532
- style: {
1533
- color: "rgb(199, 146, 234)"
1534
- }
1535
- },
1536
- {
1537
- types: ["selector", "doctype"],
1538
- style: {
1539
- color: "rgb(199, 146, 234)",
1540
- fontStyle: "italic"
1541
- }
1542
- },
1543
- {
1544
- types: ["class-name"],
1545
- style: {
1546
- color: "rgb(255, 203, 139)"
1547
- }
1548
- },
1549
- {
1550
- types: ["tag", "operator", "keyword"],
1551
- style: {
1552
- color: "rgb(127, 219, 202)"
1553
- }
1554
- },
1555
- {
1556
- types: ["boolean"],
1557
- style: {
1558
- color: "rgb(255, 88, 116)"
1559
- }
1560
- },
1561
- {
1562
- types: ["property"],
1563
- style: {
1564
- color: "rgb(128, 203, 196)"
1565
- }
1566
- },
1567
- {
1568
- types: ["namespace"],
1569
- style: {
1570
- color: "rgb(178, 204, 214)"
1571
- }
1572
- }
1573
- ]
1574
- }, Cr = Fr, Tr = {
1575
- plain: {
1576
- color: "#403f53",
1577
- backgroundColor: "#FBFBFB"
1578
- },
1579
- styles: [
1580
- {
1581
- types: ["changed"],
1582
- style: {
1583
- color: "rgb(162, 191, 252)",
1584
- fontStyle: "italic"
1585
- }
1586
- },
1587
- {
1588
- types: ["deleted"],
1589
- style: {
1590
- color: "rgba(239, 83, 80, 0.56)",
1591
- fontStyle: "italic"
1592
- }
1593
- },
1594
- {
1595
- types: ["inserted", "attr-name"],
1596
- style: {
1597
- color: "rgb(72, 118, 214)",
1598
- fontStyle: "italic"
1599
- }
1600
- },
1601
- {
1602
- types: ["comment"],
1603
- style: {
1604
- color: "rgb(152, 159, 177)",
1605
- fontStyle: "italic"
1606
- }
1607
- },
1608
- {
1609
- types: ["string", "builtin", "char", "constant", "url"],
1610
- style: {
1611
- color: "rgb(72, 118, 214)"
1612
- }
1613
- },
1614
- {
1615
- types: ["variable"],
1616
- style: {
1617
- color: "rgb(201, 103, 101)"
1618
- }
1619
- },
1620
- {
1621
- types: ["number"],
1622
- style: {
1623
- color: "rgb(170, 9, 130)"
1624
- }
1625
- },
1626
- {
1627
- // This was manually added after the auto-generation
1628
- // so that punctuations are not italicised
1629
- types: ["punctuation"],
1630
- style: {
1631
- color: "rgb(153, 76, 195)"
1632
- }
1633
- },
1634
- {
1635
- types: ["function", "selector", "doctype"],
1636
- style: {
1637
- color: "rgb(153, 76, 195)",
1638
- fontStyle: "italic"
1639
- }
1640
- },
1641
- {
1642
- types: ["class-name"],
1643
- style: {
1644
- color: "rgb(17, 17, 17)"
1645
- }
1646
- },
1647
- {
1648
- types: ["tag"],
1649
- style: {
1650
- color: "rgb(153, 76, 195)"
1651
- }
1652
- },
1653
- {
1654
- types: ["operator", "property", "keyword", "namespace"],
1655
- style: {
1656
- color: "rgb(12, 150, 155)"
1657
- }
1658
- },
1659
- {
1660
- types: ["boolean"],
1661
- style: {
1662
- color: "rgb(188, 84, 84)"
1663
- }
1664
- }
1665
- ]
1666
- }, Ir = Tr, Q = {
1667
- char: "#D8DEE9",
1668
- comment: "#999999",
1669
- keyword: "#c5a5c5",
1670
- primitive: "#5a9bcf",
1671
- string: "#8dc891",
1672
- variable: "#d7deea",
1673
- boolean: "#ff8b50",
1674
- tag: "#fc929e",
1675
- function: "#79b6f2",
1676
- className: "#FAC863"
1677
- }, Or = {
1678
- plain: {
1679
- backgroundColor: "#282c34",
1680
- color: "#ffffff"
1681
- },
1682
- styles: [
1683
- {
1684
- types: ["attr-name"],
1685
- style: {
1686
- color: Q.keyword
1687
- }
1688
- },
1689
- {
1690
- types: ["attr-value"],
1691
- style: {
1692
- color: Q.string
1693
- }
1694
- },
1695
- {
1696
- types: [
1697
- "comment",
1698
- "block-comment",
1699
- "prolog",
1700
- "doctype",
1701
- "cdata",
1702
- "shebang"
1703
- ],
1704
- style: {
1705
- color: Q.comment
1706
- }
1707
- },
1708
- {
1709
- types: [
1710
- "property",
1711
- "number",
1712
- "function-name",
1713
- "constant",
1714
- "symbol",
1715
- "deleted"
1716
- ],
1717
- style: {
1718
- color: Q.primitive
1719
- }
1720
- },
1721
- {
1722
- types: ["boolean"],
1723
- style: {
1724
- color: Q.boolean
1725
- }
1726
- },
1727
- {
1728
- types: ["tag"],
1729
- style: {
1730
- color: Q.tag
1731
- }
1732
- },
1733
- {
1734
- types: ["string"],
1735
- style: {
1736
- color: Q.string
1737
- }
1738
- },
1739
- {
1740
- types: ["punctuation"],
1741
- style: {
1742
- color: Q.string
1743
- }
1744
- },
1745
- {
1746
- types: ["selector", "char", "builtin", "inserted"],
1747
- style: {
1748
- color: Q.char
1749
- }
1750
- },
1751
- {
1752
- types: ["function"],
1753
- style: {
1754
- color: Q.function
1755
- }
1756
- },
1757
- {
1758
- types: ["operator", "entity", "url", "variable"],
1759
- style: {
1760
- color: Q.variable
1761
- }
1762
- },
1763
- {
1764
- types: ["keyword"],
1765
- style: {
1766
- color: Q.keyword
1767
- }
1768
- },
1769
- {
1770
- types: ["atrule", "class-name"],
1771
- style: {
1772
- color: Q.className
1773
- }
1774
- },
1775
- {
1776
- types: ["important"],
1777
- style: {
1778
- fontWeight: "400"
1779
- }
1780
- },
1781
- {
1782
- types: ["bold"],
1783
- style: {
1784
- fontWeight: "bold"
1785
- }
1786
- },
1787
- {
1788
- types: ["italic"],
1789
- style: {
1790
- fontStyle: "italic"
1791
- }
1792
- },
1793
- {
1794
- types: ["namespace"],
1795
- style: {
1796
- opacity: 0.7
1797
- }
1798
- }
1799
- ]
1800
- }, Lr = Or, Rr = {
1801
- plain: {
1802
- color: "#f8f8f2",
1803
- backgroundColor: "#272822"
1804
- },
1805
- styles: [
1806
- {
1807
- types: ["changed"],
1808
- style: {
1809
- color: "rgb(162, 191, 252)",
1810
- fontStyle: "italic"
1811
- }
1812
- },
1813
- {
1814
- types: ["deleted"],
1815
- style: {
1816
- color: "#f92672",
1817
- fontStyle: "italic"
1818
- }
1819
- },
1820
- {
1821
- types: ["inserted"],
1822
- style: {
1823
- color: "rgb(173, 219, 103)",
1824
- fontStyle: "italic"
1825
- }
1826
- },
1827
- {
1828
- types: ["comment"],
1829
- style: {
1830
- color: "#8292a2",
1831
- fontStyle: "italic"
1832
- }
1833
- },
1834
- {
1835
- types: ["string", "url"],
1836
- style: {
1837
- color: "#a6e22e"
1838
- }
1839
- },
1840
- {
1841
- types: ["variable"],
1842
- style: {
1843
- color: "#f8f8f2"
1844
- }
1845
- },
1846
- {
1847
- types: ["number"],
1848
- style: {
1849
- color: "#ae81ff"
1850
- }
1851
- },
1852
- {
1853
- types: ["builtin", "char", "constant", "function", "class-name"],
1854
- style: {
1855
- color: "#e6db74"
1856
- }
1857
- },
1858
- {
1859
- types: ["punctuation"],
1860
- style: {
1861
- color: "#f8f8f2"
1862
- }
1863
- },
1864
- {
1865
- types: ["selector", "doctype"],
1866
- style: {
1867
- color: "#a6e22e",
1868
- fontStyle: "italic"
1869
- }
1870
- },
1871
- {
1872
- types: ["tag", "operator", "keyword"],
1873
- style: {
1874
- color: "#66d9ef"
1875
- }
1876
- },
1877
- {
1878
- types: ["boolean"],
1879
- style: {
1880
- color: "#ae81ff"
1881
- }
1882
- },
1883
- {
1884
- types: ["namespace"],
1885
- style: {
1886
- color: "rgb(178, 204, 214)",
1887
- opacity: 0.7
1888
- }
1889
- },
1890
- {
1891
- types: ["tag", "property"],
1892
- style: {
1893
- color: "#f92672"
1894
- }
1895
- },
1896
- {
1897
- types: ["attr-name"],
1898
- style: {
1899
- color: "#a6e22e !important"
1900
- }
1901
- },
1902
- {
1903
- types: ["doctype"],
1904
- style: {
1905
- color: "#8292a2"
1906
- }
1907
- },
1908
- {
1909
- types: ["rule"],
1910
- style: {
1911
- color: "#e6db74"
1912
- }
1913
- }
1914
- ]
1915
- }, Nr = Rr, Dr = {
1916
- plain: {
1917
- color: "#bfc7d5",
1918
- backgroundColor: "#292d3e"
1919
- },
1920
- styles: [
1921
- {
1922
- types: ["comment"],
1923
- style: {
1924
- color: "rgb(105, 112, 152)",
1925
- fontStyle: "italic"
1926
- }
1927
- },
1928
- {
1929
- types: ["string", "inserted"],
1930
- style: {
1931
- color: "rgb(195, 232, 141)"
1932
- }
1933
- },
1934
- {
1935
- types: ["number"],
1936
- style: {
1937
- color: "rgb(247, 140, 108)"
1938
- }
1939
- },
1940
- {
1941
- types: ["builtin", "char", "constant", "function"],
1942
- style: {
1943
- color: "rgb(130, 170, 255)"
1944
- }
1945
- },
1946
- {
1947
- types: ["punctuation", "selector"],
1948
- style: {
1949
- color: "rgb(199, 146, 234)"
1950
- }
1951
- },
1952
- {
1953
- types: ["variable"],
1954
- style: {
1955
- color: "rgb(191, 199, 213)"
1956
- }
1957
- },
1958
- {
1959
- types: ["class-name", "attr-name"],
1960
- style: {
1961
- color: "rgb(255, 203, 107)"
1962
- }
1963
- },
1964
- {
1965
- types: ["tag", "deleted"],
1966
- style: {
1967
- color: "rgb(255, 85, 114)"
1968
- }
1969
- },
1970
- {
1971
- types: ["operator"],
1972
- style: {
1973
- color: "rgb(137, 221, 255)"
1974
- }
1975
- },
1976
- {
1977
- types: ["boolean"],
1978
- style: {
1979
- color: "rgb(255, 88, 116)"
1980
- }
1981
- },
1982
- {
1983
- types: ["keyword"],
1984
- style: {
1985
- fontStyle: "italic"
1986
- }
1987
- },
1988
- {
1989
- types: ["doctype"],
1990
- style: {
1991
- color: "rgb(199, 146, 234)",
1992
- fontStyle: "italic"
1993
- }
1994
- },
1995
- {
1996
- types: ["namespace"],
1997
- style: {
1998
- color: "rgb(178, 204, 214)"
1999
- }
2000
- },
2001
- {
2002
- types: ["url"],
2003
- style: {
2004
- color: "rgb(221, 221, 221)"
2005
- }
2006
- }
2007
- ]
2008
- }, Br = Dr, Pr = {
2009
- plain: {
2010
- color: "#9EFEFF",
2011
- backgroundColor: "#2D2A55"
2012
- },
2013
- styles: [
2014
- {
2015
- types: ["changed"],
2016
- style: {
2017
- color: "rgb(255, 238, 128)"
2018
- }
2019
- },
2020
- {
2021
- types: ["deleted"],
2022
- style: {
2023
- color: "rgba(239, 83, 80, 0.56)"
2024
- }
2025
- },
2026
- {
2027
- types: ["inserted"],
2028
- style: {
2029
- color: "rgb(173, 219, 103)"
2030
- }
2031
- },
2032
- {
2033
- types: ["comment"],
2034
- style: {
2035
- color: "rgb(179, 98, 255)",
2036
- fontStyle: "italic"
2037
- }
2038
- },
2039
- {
2040
- types: ["punctuation"],
2041
- style: {
2042
- color: "rgb(255, 255, 255)"
2043
- }
2044
- },
2045
- {
2046
- types: ["constant"],
2047
- style: {
2048
- color: "rgb(255, 98, 140)"
2049
- }
2050
- },
2051
- {
2052
- types: ["string", "url"],
2053
- style: {
2054
- color: "rgb(165, 255, 144)"
2055
- }
2056
- },
2057
- {
2058
- types: ["variable"],
2059
- style: {
2060
- color: "rgb(255, 238, 128)"
2061
- }
2062
- },
2063
- {
2064
- types: ["number", "boolean"],
2065
- style: {
2066
- color: "rgb(255, 98, 140)"
2067
- }
2068
- },
2069
- {
2070
- types: ["attr-name"],
2071
- style: {
2072
- color: "rgb(255, 180, 84)"
2073
- }
2074
- },
2075
- {
2076
- types: [
2077
- "keyword",
2078
- "operator",
2079
- "property",
2080
- "namespace",
2081
- "tag",
2082
- "selector",
2083
- "doctype"
2084
- ],
2085
- style: {
2086
- color: "rgb(255, 157, 0)"
2087
- }
2088
- },
2089
- {
2090
- types: ["builtin", "char", "constant", "function", "class-name"],
2091
- style: {
2092
- color: "rgb(250, 208, 0)"
2093
- }
2094
- }
2095
- ]
2096
- }, Mr = Pr, jr = {
2097
- plain: {
2098
- backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
2099
- backgroundImage: "#34294f",
2100
- color: "#f92aad",
2101
- textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
2102
- },
2103
- styles: [
2104
- {
2105
- types: ["comment", "block-comment", "prolog", "doctype", "cdata"],
2106
- style: {
2107
- color: "#495495",
2108
- fontStyle: "italic"
2109
- }
2110
- },
2111
- {
2112
- types: ["punctuation"],
2113
- style: {
2114
- color: "#ccc"
2115
- }
2116
- },
2117
- {
2118
- types: [
2119
- "tag",
2120
- "attr-name",
2121
- "namespace",
2122
- "number",
2123
- "unit",
2124
- "hexcode",
2125
- "deleted"
2126
- ],
2127
- style: {
2128
- color: "#e2777a"
2129
- }
2130
- },
2131
- {
2132
- types: ["property", "selector"],
2133
- style: {
2134
- color: "#72f1b8",
2135
- textShadow: "0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"
2136
- }
2137
- },
2138
- {
2139
- types: ["function-name"],
2140
- style: {
2141
- color: "#6196cc"
2142
- }
2143
- },
2144
- {
2145
- types: ["boolean", "selector-id", "function"],
2146
- style: {
2147
- color: "#fdfdfd",
2148
- textShadow: "0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"
2149
- }
2150
- },
2151
- {
2152
- types: ["class-name", "maybe-class-name", "builtin"],
2153
- style: {
2154
- color: "#fff5f6",
2155
- textShadow: "0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"
2156
- }
2157
- },
2158
- {
2159
- types: ["constant", "symbol"],
2160
- style: {
2161
- color: "#f92aad",
2162
- textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
2163
- }
2164
- },
2165
- {
2166
- types: ["important", "atrule", "keyword", "selector-class"],
2167
- style: {
2168
- color: "#f4eee4",
2169
- textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
2170
- }
2171
- },
2172
- {
2173
- types: ["string", "char", "attr-value", "regex", "variable"],
2174
- style: {
2175
- color: "#f87c32"
2176
- }
2177
- },
2178
- {
2179
- types: ["parameter"],
2180
- style: {
2181
- fontStyle: "italic"
2182
- }
2183
- },
2184
- {
2185
- types: ["entity", "url"],
2186
- style: {
2187
- color: "#67cdcc"
2188
- }
2189
- },
2190
- {
2191
- types: ["operator"],
2192
- style: {
2193
- color: "ffffffee"
2194
- }
2195
- },
2196
- {
2197
- types: ["important", "bold"],
2198
- style: {
2199
- fontWeight: "bold"
2200
- }
2201
- },
2202
- {
2203
- types: ["italic"],
2204
- style: {
2205
- fontStyle: "italic"
2206
- }
2207
- },
2208
- {
2209
- types: ["entity"],
2210
- style: {
2211
- cursor: "help"
2212
- }
2213
- },
2214
- {
2215
- types: ["inserted"],
2216
- style: {
2217
- color: "green"
2218
- }
2219
- }
2220
- ]
2221
- }, $r = jr, Ur = {
2222
- plain: {
2223
- color: "#282a2e",
2224
- backgroundColor: "#ffffff"
2225
- },
2226
- styles: [
2227
- {
2228
- types: ["comment"],
2229
- style: {
2230
- color: "rgb(197, 200, 198)"
2231
- }
2232
- },
2233
- {
2234
- types: ["string", "number", "builtin", "variable"],
2235
- style: {
2236
- color: "rgb(150, 152, 150)"
2237
- }
2238
- },
2239
- {
2240
- types: ["class-name", "function", "tag", "attr-name"],
2241
- style: {
2242
- color: "rgb(40, 42, 46)"
2243
- }
2244
- }
2245
- ]
2246
- }, zr = Ur, Yr = {
2247
- plain: {
2248
- color: "#9CDCFE",
2249
- backgroundColor: "#1E1E1E"
2250
- },
2251
- styles: [
2252
- {
2253
- types: ["prolog"],
2254
- style: {
2255
- color: "rgb(0, 0, 128)"
2256
- }
2257
- },
2258
- {
2259
- types: ["comment"],
2260
- style: {
2261
- color: "rgb(106, 153, 85)"
2262
- }
2263
- },
2264
- {
2265
- types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2266
- style: {
2267
- color: "rgb(86, 156, 214)"
2268
- }
2269
- },
2270
- {
2271
- types: ["number", "inserted"],
2272
- style: {
2273
- color: "rgb(181, 206, 168)"
2274
- }
2275
- },
2276
- {
2277
- types: ["constant"],
2278
- style: {
2279
- color: "rgb(100, 102, 149)"
2280
- }
2281
- },
2282
- {
2283
- types: ["attr-name", "variable"],
2284
- style: {
2285
- color: "rgb(156, 220, 254)"
2286
- }
2287
- },
2288
- {
2289
- types: ["deleted", "string", "attr-value", "template-punctuation"],
2290
- style: {
2291
- color: "rgb(206, 145, 120)"
2292
- }
2293
- },
2294
- {
2295
- types: ["selector"],
2296
- style: {
2297
- color: "rgb(215, 186, 125)"
2298
- }
2299
- },
2300
- {
2301
- // Fix tag color
2302
- types: ["tag"],
2303
- style: {
2304
- color: "rgb(78, 201, 176)"
2305
- }
2306
- },
2307
- {
2308
- // Fix tag color for HTML
2309
- types: ["tag"],
2310
- languages: ["markup"],
2311
- style: {
2312
- color: "rgb(86, 156, 214)"
2313
- }
2314
- },
2315
- {
2316
- types: ["punctuation", "operator"],
2317
- style: {
2318
- color: "rgb(212, 212, 212)"
2319
- }
2320
- },
2321
- {
2322
- // Fix punctuation color for HTML
2323
- types: ["punctuation"],
2324
- languages: ["markup"],
2325
- style: {
2326
- color: "#808080"
2327
- }
2328
- },
2329
- {
2330
- types: ["function"],
2331
- style: {
2332
- color: "rgb(220, 220, 170)"
2333
- }
2334
- },
2335
- {
2336
- types: ["class-name"],
2337
- style: {
2338
- color: "rgb(78, 201, 176)"
2339
- }
2340
- },
2341
- {
2342
- types: ["char"],
2343
- style: {
2344
- color: "rgb(209, 105, 105)"
2345
- }
2346
- }
2347
- ]
2348
- }, tt = Yr, Gr = {
2349
- plain: {
2350
- color: "#000000",
2351
- backgroundColor: "#ffffff"
2352
- },
2353
- styles: [
2354
- {
2355
- types: ["comment"],
2356
- style: {
2357
- color: "rgb(0, 128, 0)"
2358
- }
2359
- },
2360
- {
2361
- types: ["builtin"],
2362
- style: {
2363
- color: "rgb(0, 112, 193)"
2364
- }
2365
- },
2366
- {
2367
- types: ["number", "variable", "inserted"],
2368
- style: {
2369
- color: "rgb(9, 134, 88)"
2370
- }
2371
- },
2372
- {
2373
- types: ["operator"],
2374
- style: {
2375
- color: "rgb(0, 0, 0)"
2376
- }
2377
- },
2378
- {
2379
- types: ["constant", "char"],
2380
- style: {
2381
- color: "rgb(129, 31, 63)"
2382
- }
2383
- },
2384
- {
2385
- types: ["tag"],
2386
- style: {
2387
- color: "rgb(128, 0, 0)"
2388
- }
2389
- },
2390
- {
2391
- types: ["attr-name"],
2392
- style: {
2393
- color: "rgb(255, 0, 0)"
2394
- }
2395
- },
2396
- {
2397
- types: ["deleted", "string"],
2398
- style: {
2399
- color: "rgb(163, 21, 21)"
2400
- }
2401
- },
2402
- {
2403
- types: ["changed", "punctuation"],
2404
- style: {
2405
- color: "rgb(4, 81, 165)"
2406
- }
2407
- },
2408
- {
2409
- types: ["function", "keyword"],
2410
- style: {
2411
- color: "rgb(0, 0, 255)"
2412
- }
2413
- },
2414
- {
2415
- types: ["class-name"],
2416
- style: {
2417
- color: "rgb(38, 127, 153)"
2418
- }
2419
- }
2420
- ]
2421
- }, Hr = Gr, Kr = {
2422
- plain: {
2423
- color: "#f8fafc",
2424
- backgroundColor: "#011627"
2425
- },
2426
- styles: [
2427
- {
2428
- types: ["prolog"],
2429
- style: {
2430
- color: "#000080"
2431
- }
2432
- },
2433
- {
2434
- types: ["comment"],
2435
- style: {
2436
- color: "#6A9955"
2437
- }
2438
- },
2439
- {
2440
- types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2441
- style: {
2442
- color: "#569CD6"
2443
- }
2444
- },
2445
- {
2446
- types: ["number", "inserted"],
2447
- style: {
2448
- color: "#B5CEA8"
2449
- }
2450
- },
2451
- {
2452
- types: ["constant"],
2453
- style: {
2454
- color: "#f8fafc"
2455
- }
2456
- },
2457
- {
2458
- types: ["attr-name", "variable"],
2459
- style: {
2460
- color: "#9CDCFE"
2461
- }
2462
- },
2463
- {
2464
- types: ["deleted", "string", "attr-value", "template-punctuation"],
2465
- style: {
2466
- color: "#cbd5e1"
2467
- }
2468
- },
2469
- {
2470
- types: ["selector"],
2471
- style: {
2472
- color: "#D7BA7D"
2473
- }
2474
- },
2475
- {
2476
- types: ["tag"],
2477
- style: {
2478
- color: "#0ea5e9"
2479
- }
2480
- },
2481
- {
2482
- types: ["tag"],
2483
- languages: ["markup"],
2484
- style: {
2485
- color: "#0ea5e9"
2486
- }
2487
- },
2488
- {
2489
- types: ["punctuation", "operator"],
2490
- style: {
2491
- color: "#D4D4D4"
2492
- }
2493
- },
2494
- {
2495
- types: ["punctuation"],
2496
- languages: ["markup"],
2497
- style: {
2498
- color: "#808080"
2499
- }
2500
- },
2501
- {
2502
- types: ["function"],
2503
- style: {
2504
- color: "#7dd3fc"
2505
- }
2506
- },
2507
- {
2508
- types: ["class-name"],
2509
- style: {
2510
- color: "#0ea5e9"
2511
- }
2512
- },
2513
- {
2514
- types: ["char"],
2515
- style: {
2516
- color: "#D16969"
2517
- }
2518
- }
2519
- ]
2520
- }, Wr = Kr, qr = {
2521
- plain: {
2522
- color: "#0f172a",
2523
- backgroundColor: "#f1f5f9"
2524
- },
2525
- styles: [
2526
- {
2527
- types: ["prolog"],
2528
- style: {
2529
- color: "#000080"
2530
- }
2531
- },
2532
- {
2533
- types: ["comment"],
2534
- style: {
2535
- color: "#6A9955"
2536
- }
2537
- },
2538
- {
2539
- types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2540
- style: {
2541
- color: "#0c4a6e"
2542
- }
2543
- },
2544
- {
2545
- types: ["number", "inserted"],
2546
- style: {
2547
- color: "#B5CEA8"
2548
- }
2549
- },
2550
- {
2551
- types: ["constant"],
2552
- style: {
2553
- color: "#0f172a"
2554
- }
2555
- },
2556
- {
2557
- types: ["attr-name", "variable"],
2558
- style: {
2559
- color: "#0c4a6e"
2560
- }
2561
- },
2562
- {
2563
- types: ["deleted", "string", "attr-value", "template-punctuation"],
2564
- style: {
2565
- color: "#64748b"
2566
- }
2567
- },
2568
- {
2569
- types: ["selector"],
2570
- style: {
2571
- color: "#D7BA7D"
2572
- }
2573
- },
2574
- {
2575
- types: ["tag"],
2576
- style: {
2577
- color: "#0ea5e9"
2578
- }
2579
- },
2580
- {
2581
- types: ["tag"],
2582
- languages: ["markup"],
2583
- style: {
2584
- color: "#0ea5e9"
2585
- }
2586
- },
2587
- {
2588
- types: ["punctuation", "operator"],
2589
- style: {
2590
- color: "#475569"
2591
- }
2592
- },
2593
- {
2594
- types: ["punctuation"],
2595
- languages: ["markup"],
2596
- style: {
2597
- color: "#808080"
2598
- }
2599
- },
2600
- {
2601
- types: ["function"],
2602
- style: {
2603
- color: "#0e7490"
2604
- }
2605
- },
2606
- {
2607
- types: ["class-name"],
2608
- style: {
2609
- color: "#0ea5e9"
2610
- }
2611
- },
2612
- {
2613
- types: ["char"],
2614
- style: {
2615
- color: "#D16969"
2616
- }
2617
- }
2618
- ]
2619
- }, Zr = qr, Vr = {
2620
- plain: {
2621
- backgroundColor: "hsl(220, 13%, 18%)",
2622
- color: "hsl(220, 14%, 71%)",
2623
- textShadow: "0 1px rgba(0, 0, 0, 0.3)"
2624
- },
2625
- styles: [
2626
- {
2627
- types: ["comment", "prolog", "cdata"],
2628
- style: {
2629
- color: "hsl(220, 10%, 40%)"
2630
- }
2631
- },
2632
- {
2633
- types: ["doctype", "punctuation", "entity"],
2634
- style: {
2635
- color: "hsl(220, 14%, 71%)"
2636
- }
2637
- },
2638
- {
2639
- types: [
2640
- "attr-name",
2641
- "class-name",
2642
- "maybe-class-name",
2643
- "boolean",
2644
- "constant",
2645
- "number",
2646
- "atrule"
2647
- ],
2648
- style: { color: "hsl(29, 54%, 61%)" }
2649
- },
2650
- {
2651
- types: ["keyword"],
2652
- style: { color: "hsl(286, 60%, 67%)" }
2653
- },
2654
- {
2655
- types: ["property", "tag", "symbol", "deleted", "important"],
2656
- style: {
2657
- color: "hsl(355, 65%, 65%)"
2658
- }
2659
- },
2660
- {
2661
- types: [
2662
- "selector",
2663
- "string",
2664
- "char",
2665
- "builtin",
2666
- "inserted",
2667
- "regex",
2668
- "attr-value"
2669
- ],
2670
- style: {
2671
- color: "hsl(95, 38%, 62%)"
2672
- }
2673
- },
2674
- {
2675
- types: ["variable", "operator", "function"],
2676
- style: {
2677
- color: "hsl(207, 82%, 66%)"
2678
- }
2679
- },
2680
- {
2681
- types: ["url"],
2682
- style: {
2683
- color: "hsl(187, 47%, 55%)"
2684
- }
2685
- },
2686
- {
2687
- types: ["deleted"],
2688
- style: {
2689
- textDecorationLine: "line-through"
2690
- }
2691
- },
2692
- {
2693
- types: ["inserted"],
2694
- style: {
2695
- textDecorationLine: "underline"
2696
- }
2697
- },
2698
- {
2699
- types: ["italic"],
2700
- style: {
2701
- fontStyle: "italic"
2702
- }
2703
- },
2704
- {
2705
- types: ["important", "bold"],
2706
- style: {
2707
- fontWeight: "bold"
2708
- }
2709
- },
2710
- {
2711
- types: ["important"],
2712
- style: {
2713
- color: "hsl(220, 14%, 71%)"
2714
- }
2715
- }
2716
- ]
2717
- }, Xr = Vr, Qr = {
2718
- plain: {
2719
- backgroundColor: "hsl(230, 1%, 98%)",
2720
- color: "hsl(230, 8%, 24%)"
2721
- },
2722
- styles: [
2723
- {
2724
- types: ["comment", "prolog", "cdata"],
2725
- style: {
2726
- color: "hsl(230, 4%, 64%)"
2727
- }
2728
- },
2729
- {
2730
- types: ["doctype", "punctuation", "entity"],
2731
- style: {
2732
- color: "hsl(230, 8%, 24%)"
2733
- }
2734
- },
2735
- {
2736
- types: [
2737
- "attr-name",
2738
- "class-name",
2739
- "boolean",
2740
- "constant",
2741
- "number",
2742
- "atrule"
2743
- ],
2744
- style: {
2745
- color: "hsl(35, 99%, 36%)"
2746
- }
2747
- },
2748
- {
2749
- types: ["keyword"],
2750
- style: {
2751
- color: "hsl(301, 63%, 40%)"
2752
- }
2753
- },
2754
- {
2755
- types: ["property", "tag", "symbol", "deleted", "important"],
2756
- style: {
2757
- color: "hsl(5, 74%, 59%)"
2758
- }
2759
- },
2760
- {
2761
- types: [
2762
- "selector",
2763
- "string",
2764
- "char",
2765
- "builtin",
2766
- "inserted",
2767
- "regex",
2768
- "attr-value",
2769
- "punctuation"
2770
- ],
2771
- style: {
2772
- color: "hsl(119, 34%, 47%)"
2773
- }
2774
- },
2775
- {
2776
- types: ["variable", "operator", "function"],
2777
- style: {
2778
- color: "hsl(221, 87%, 60%)"
2779
- }
2780
- },
2781
- {
2782
- types: ["url"],
2783
- style: {
2784
- color: "hsl(198, 99%, 37%)"
2785
- }
2786
- },
2787
- {
2788
- types: ["deleted"],
2789
- style: {
2790
- textDecorationLine: "line-through"
2791
- }
2792
- },
2793
- {
2794
- types: ["inserted"],
2795
- style: {
2796
- textDecorationLine: "underline"
2797
- }
2798
- },
2799
- {
2800
- types: ["italic"],
2801
- style: {
2802
- fontStyle: "italic"
2803
- }
2804
- },
2805
- {
2806
- types: ["important", "bold"],
2807
- style: {
2808
- fontWeight: "bold"
2809
- }
2810
- },
2811
- {
2812
- types: ["important"],
2813
- style: {
2814
- color: "hsl(230, 8%, 24%)"
2815
- }
2816
- }
2817
- ]
2818
- }, Jr = Qr, ea = {
2819
- plain: {
2820
- color: "#ebdbb2",
2821
- backgroundColor: "#292828"
2822
- },
2823
- styles: [
2824
- {
2825
- types: [
2826
- "imports",
2827
- "class-name",
2828
- "maybe-class-name",
2829
- "constant",
2830
- "doctype",
2831
- "builtin",
2832
- "function"
2833
- ],
2834
- style: {
2835
- color: "#d8a657"
2836
- }
2837
- },
2838
- {
2839
- types: ["property-access"],
2840
- style: {
2841
- color: "#7daea3"
2842
- }
2843
- },
2844
- {
2845
- types: ["tag"],
2846
- style: {
2847
- color: "#e78a4e"
2848
- }
2849
- },
2850
- {
2851
- types: ["attr-name", "char", "url", "regex"],
2852
- style: {
2853
- color: "#a9b665"
2854
- }
2855
- },
2856
- {
2857
- types: ["attr-value", "string"],
2858
- style: {
2859
- color: "#89b482"
2860
- }
2861
- },
2862
- {
2863
- types: ["comment", "prolog", "cdata", "operator", "inserted"],
2864
- style: {
2865
- color: "#a89984"
2866
- }
2867
- },
2868
- {
2869
- types: [
2870
- "delimiter",
2871
- "boolean",
2872
- "keyword",
2873
- "selector",
2874
- "important",
2875
- "atrule",
2876
- "property",
2877
- "variable",
2878
- "deleted"
2879
- ],
2880
- style: {
2881
- color: "#ea6962"
2882
- }
2883
- },
2884
- {
2885
- types: ["entity", "number", "symbol"],
2886
- style: {
2887
- color: "#d3869b"
2888
- }
2889
- }
2890
- ]
2891
- }, na = ea, ta = {
2892
- plain: {
2893
- color: "#654735",
2894
- backgroundColor: "#f9f5d7"
2895
- },
2896
- styles: [
2897
- {
2898
- types: [
2899
- "delimiter",
2900
- "boolean",
2901
- "keyword",
2902
- "selector",
2903
- "important",
2904
- "atrule",
2905
- "property",
2906
- "variable",
2907
- "deleted"
2908
- ],
2909
- style: {
2910
- color: "#af2528"
2911
- }
2912
- },
2913
- {
2914
- types: [
2915
- "imports",
2916
- "class-name",
2917
- "maybe-class-name",
2918
- "constant",
2919
- "doctype",
2920
- "builtin"
2921
- ],
2922
- style: {
2923
- color: "#b4730e"
2924
- }
2925
- },
2926
- {
2927
- types: ["string", "attr-value"],
2928
- style: {
2929
- color: "#477a5b"
2930
- }
2931
- },
2932
- {
2933
- types: ["property-access"],
2934
- style: {
2935
- color: "#266b79"
2936
- }
2937
- },
2938
- {
2939
- types: ["function", "attr-name", "char", "url"],
2940
- style: {
2941
- color: "#72761e"
2942
- }
2943
- },
2944
- {
2945
- types: ["tag"],
2946
- style: {
2947
- color: "#b94c07"
2948
- }
2949
- },
2950
- {
2951
- types: ["comment", "prolog", "cdata", "operator", "inserted"],
2952
- style: {
2953
- color: "#a89984"
2954
- }
2955
- },
2956
- {
2957
- types: ["entity", "number", "symbol"],
2958
- style: {
2959
- color: "#924f79"
2960
- }
2961
- }
2962
- ]
2963
- }, ra = ta, aa = (e) => ye(
2964
- (n) => {
2965
- var t = n, { className: r, style: a, line: o } = t, i = nt(t, ["className", "style", "line"]);
2966
- const l = Xe(ae({}, i), {
2967
- className: Qn("token-line", r)
2968
- });
2969
- return typeof e == "object" && "plain" in e && (l.style = e.plain), typeof a == "object" && (l.style = ae(ae({}, l.style || {}), a)), l;
2970
- },
2971
- [e]
2972
- ), ia = (e) => {
2973
- const n = ye(
2974
- ({ types: t, empty: r }) => {
2975
- if (e != null) {
2976
- {
2977
- if (t.length === 1 && t[0] === "plain")
2978
- return r != null ? { display: "inline-block" } : void 0;
2979
- if (t.length === 1 && r != null)
2980
- return e[t[0]];
2981
- }
2982
- return Object.assign(
2983
- r != null ? { display: "inline-block" } : {},
2984
- ...t.map((a) => e[a])
2985
- );
2986
- }
2987
- },
2988
- [e]
2989
- );
2990
- return ye(
2991
- (t) => {
2992
- var r = t, { token: a, className: o, style: i } = r, l = nt(r, ["token", "className", "style"]);
2993
- const s = Xe(ae({}, l), {
2994
- className: Qn("token", ...a.types, o),
2995
- children: a.content,
2996
- style: n(a)
2997
- });
2998
- return i != null && (s.style = ae(ae({}, s.style || {}), i)), s;
2999
- },
3000
- [n]
3001
- );
3002
- }, oa = /\r\n|\r|\n/, Ln = (e) => {
3003
- e.length === 0 ? e.push({
3004
- types: ["plain"],
3005
- content: `
3006
- `,
3007
- empty: !0
3008
- }) : e.length === 1 && e[0].content === "" && (e[0].content = `
3009
- `, e[0].empty = !0);
3010
- }, Rn = (e, n) => {
3011
- const t = e.length;
3012
- return t > 0 && e[t - 1] === n ? e : e.concat(n);
3013
- }, la = (e) => {
3014
- const n = [[]], t = [e], r = [0], a = [e.length];
3015
- let o = 0, i = 0, l = [];
3016
- const s = [l];
3017
- for (; i > -1; ) {
3018
- for (; (o = r[i]++) < a[i]; ) {
3019
- let u, g = n[i];
3020
- const m = t[i][o];
3021
- if (typeof m == "string" ? (g = i > 0 ? g : ["plain"], u = m) : (g = Rn(g, m.type), m.alias && (g = Rn(g, m.alias)), u = m.content), typeof u != "string") {
3022
- i++, n.push(g), t.push(u), r.push(0), a.push(u.length);
3023
- continue;
3024
- }
3025
- const v = u.split(oa), c = v.length;
3026
- l.push({
3027
- types: g,
3028
- content: v[0]
3029
- });
3030
- for (let p = 1; p < c; p++)
3031
- Ln(l), s.push(l = []), l.push({
3032
- types: g,
3033
- content: v[p]
3034
- });
3035
- }
3036
- i--, n.pop(), t.pop(), r.pop(), a.pop();
3037
- }
3038
- return Ln(l), s;
3039
- }, Nn = la, sa = ({ prism: e, code: n, grammar: t, language: r }) => ln(() => {
3040
- if (t == null)
3041
- return Nn([n]);
3042
- const a = {
3043
- code: n,
3044
- grammar: t,
3045
- language: r,
3046
- tokens: []
3047
- };
3048
- return e.hooks.run("before-tokenize", a), a.tokens = e.tokenize(n, t), e.hooks.run("after-tokenize", a), Nn(a.tokens);
3049
- }, [
3050
- n,
3051
- t,
3052
- r,
3053
- // prism is a stable import
3054
- e
3055
- ]), ua = (e, n) => {
3056
- const { plain: t } = e, r = e.styles.reduce((a, o) => {
3057
- const { languages: i, style: l } = o;
3058
- return i && !i.includes(n) || o.types.forEach((s) => {
3059
- const u = ae(ae({}, a[s]), l);
3060
- a[s] = u;
3061
- }), a;
3062
- }, {});
3063
- return r.root = t, r.plain = Xe(ae({}, t), { backgroundColor: void 0 }), r;
3064
- }, ca = ua, pa = ({
3065
- children: e,
3066
- language: n,
3067
- code: t,
3068
- theme: r,
3069
- prism: a
3070
- }) => {
3071
- const o = n.toLowerCase(), i = ca(r, o), l = aa(i), s = ia(i), u = a.languages[o], g = sa({ prism: a, language: o, code: t, grammar: u });
3072
- return e({
3073
- tokens: g,
3074
- className: `prism-code language-${o}`,
3075
- style: i != null ? i.root : {},
3076
- getLineProps: l,
3077
- getTokenProps: s
3078
- });
3079
- }, fa = (e) => Xt(pa, Xe(ae({}, e), {
3080
- prism: e.prism || h,
3081
- theme: e.theme || tt,
3082
- code: e.code,
3083
- language: e.language
3084
- }));
3085
- /*! Bundled license information:
3086
-
3087
- prismjs/prism.js:
3088
- (**
3089
- * Prism: Lightweight, robust, elegant syntax highlighting
3090
- *
3091
- * @license MIT <https://opensource.org/licenses/MIT>
3092
- * @author Lea Verou <https://lea.verou.me>
3093
- * @namespace
3094
- * @public
3095
- *)
3096
- */
3097
- /*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
3098
- function rt(e) {
3099
- return typeof e > "u" || e === null;
3100
- }
3101
- function da(e) {
3102
- return typeof e == "object" && e !== null;
3103
- }
3104
- function ga(e) {
3105
- return Array.isArray(e) ? e : rt(e) ? [] : [e];
3106
- }
3107
- function ya(e, n) {
3108
- var t, r, a, o;
3109
- if (n)
3110
- for (o = Object.keys(n), t = 0, r = o.length; t < r; t += 1)
3111
- a = o[t], e[a] = n[a];
3112
- return e;
3113
- }
3114
- function ha(e, n) {
3115
- var t = "", r;
3116
- for (r = 0; r < n; r += 1)
3117
- t += e;
3118
- return t;
3119
- }
3120
- function ma(e) {
3121
- return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
3122
- }
3123
- var ba = rt, va = da, xa = ga, wa = ha, Aa = ma, ka = ya, j = {
3124
- isNothing: ba,
3125
- isObject: va,
3126
- toArray: xa,
3127
- repeat: wa,
3128
- isNegativeZero: Aa,
3129
- extend: ka
3130
- };
3131
- function at(e, n) {
3132
- var t = "", r = e.reason || "(unknown reason)";
3133
- return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (t += `
3134
-
3135
- ` + e.mark.snippet), r + " " + t) : r;
3136
- }
3137
- function Pe(e, n) {
3138
- Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = at(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
3139
- }
3140
- Pe.prototype = Object.create(Error.prototype);
3141
- Pe.prototype.constructor = Pe;
3142
- Pe.prototype.toString = function(n) {
3143
- return this.name + ": " + at(this, n);
3144
- };
3145
- var K = Pe;
3146
- function rn(e, n, t, r, a) {
3147
- var o = "", i = "", l = Math.floor(a / 2) - 1;
3148
- return r - n > l && (o = " ... ", n = r - l + o.length), t - r > l && (i = " ...", t = r + l - i.length), {
3149
- str: o + e.slice(n, t).replace(/\t/g, "→") + i,
3150
- pos: r - n + o.length
3151
- // relative position
3152
- };
3153
- }
3154
- function an(e, n) {
3155
- return j.repeat(" ", n - e.length) + e;
3156
- }
3157
- function Ea(e, n) {
3158
- if (n = Object.create(n || null), !e.buffer) return null;
3159
- n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
3160
- for (var t = /\r?\n|\r|\0/g, r = [0], a = [], o, i = -1; o = t.exec(e.buffer); )
3161
- a.push(o.index), r.push(o.index + o[0].length), e.position <= o.index && i < 0 && (i = r.length - 2);
3162
- i < 0 && (i = r.length - 1);
3163
- var l = "", s, u, g = Math.min(e.line + n.linesAfter, a.length).toString().length, f = n.maxLength - (n.indent + g + 3);
3164
- for (s = 1; s <= n.linesBefore && !(i - s < 0); s++)
3165
- u = rn(
3166
- e.buffer,
3167
- r[i - s],
3168
- a[i - s],
3169
- e.position - (r[i] - r[i - s]),
3170
- f
3171
- ), l = j.repeat(" ", n.indent) + an((e.line - s + 1).toString(), g) + " | " + u.str + `
3172
- ` + l;
3173
- for (u = rn(e.buffer, r[i], a[i], e.position, f), l += j.repeat(" ", n.indent) + an((e.line + 1).toString(), g) + " | " + u.str + `
3174
- `, l += j.repeat("-", n.indent + g + 3 + u.pos) + `^
3175
- `, s = 1; s <= n.linesAfter && !(i + s >= a.length); s++)
3176
- u = rn(
3177
- e.buffer,
3178
- r[i + s],
3179
- a[i + s],
3180
- e.position - (r[i] - r[i + s]),
3181
- f
3182
- ), l += j.repeat(" ", n.indent) + an((e.line + s + 1).toString(), g) + " | " + u.str + `
3183
- `;
3184
- return l.replace(/\n$/, "");
3185
- }
3186
- var Sa = Ea, _a = [
3187
- "kind",
3188
- "multi",
3189
- "resolve",
3190
- "construct",
3191
- "instanceOf",
3192
- "predicate",
3193
- "represent",
3194
- "representName",
3195
- "defaultStyle",
3196
- "styleAliases"
3197
- ], Fa = [
3198
- "scalar",
3199
- "sequence",
3200
- "mapping"
3201
- ];
3202
- function Ca(e) {
3203
- var n = {};
3204
- return e !== null && Object.keys(e).forEach(function(t) {
3205
- e[t].forEach(function(r) {
3206
- n[String(r)] = t;
3207
- });
3208
- }), n;
3209
- }
3210
- function Ta(e, n) {
3211
- if (n = n || {}, Object.keys(n).forEach(function(t) {
3212
- if (_a.indexOf(t) === -1)
3213
- throw new K('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
3214
- }), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
3215
- return !0;
3216
- }, this.construct = n.construct || function(t) {
3217
- return t;
3218
- }, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = Ca(n.styleAliases || null), Fa.indexOf(this.kind) === -1)
3219
- throw new K('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
3220
- }
3221
- var z = Ta;
3222
- function Dn(e, n) {
3223
- var t = [];
3224
- return e[n].forEach(function(r) {
3225
- var a = t.length;
3226
- t.forEach(function(o, i) {
3227
- o.tag === r.tag && o.kind === r.kind && o.multi === r.multi && (a = i);
3228
- }), t[a] = r;
3229
- }), t;
3230
- }
3231
- function Ia() {
3232
- var e = {
3233
- scalar: {},
3234
- sequence: {},
3235
- mapping: {},
3236
- fallback: {},
3237
- multi: {
3238
- scalar: [],
3239
- sequence: [],
3240
- mapping: [],
3241
- fallback: []
3242
- }
3243
- }, n, t;
3244
- function r(a) {
3245
- a.multi ? (e.multi[a.kind].push(a), e.multi.fallback.push(a)) : e[a.kind][a.tag] = e.fallback[a.tag] = a;
3246
- }
3247
- for (n = 0, t = arguments.length; n < t; n += 1)
3248
- arguments[n].forEach(r);
3249
- return e;
3250
- }
3251
- function un(e) {
3252
- return this.extend(e);
3253
- }
3254
- un.prototype.extend = function(n) {
3255
- var t = [], r = [];
3256
- if (n instanceof z)
3257
- r.push(n);
3258
- else if (Array.isArray(n))
3259
- r = r.concat(n);
3260
- else if (n && (Array.isArray(n.implicit) || Array.isArray(n.explicit)))
3261
- n.implicit && (t = t.concat(n.implicit)), n.explicit && (r = r.concat(n.explicit));
3262
- else
3263
- throw new K("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
3264
- t.forEach(function(o) {
3265
- if (!(o instanceof z))
3266
- throw new K("Specified list of YAML types (or a single Type object) contains a non-Type object.");
3267
- if (o.loadKind && o.loadKind !== "scalar")
3268
- throw new K("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
3269
- if (o.multi)
3270
- throw new K("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
3271
- }), r.forEach(function(o) {
3272
- if (!(o instanceof z))
3273
- throw new K("Specified list of YAML types (or a single Type object) contains a non-Type object.");
3274
- });
3275
- var a = Object.create(un.prototype);
3276
- return a.implicit = (this.implicit || []).concat(t), a.explicit = (this.explicit || []).concat(r), a.compiledImplicit = Dn(a, "implicit"), a.compiledExplicit = Dn(a, "explicit"), a.compiledTypeMap = Ia(a.compiledImplicit, a.compiledExplicit), a;
3277
- };
3278
- var it = un, ot = new z("tag:yaml.org,2002:str", {
3279
- kind: "scalar",
3280
- construct: function(e) {
3281
- return e !== null ? e : "";
3282
- }
3283
- }), lt = new z("tag:yaml.org,2002:seq", {
3284
- kind: "sequence",
3285
- construct: function(e) {
3286
- return e !== null ? e : [];
3287
- }
3288
- }), st = new z("tag:yaml.org,2002:map", {
3289
- kind: "mapping",
3290
- construct: function(e) {
3291
- return e !== null ? e : {};
3292
- }
3293
- }), ut = new it({
3294
- explicit: [
3295
- ot,
3296
- lt,
3297
- st
3298
- ]
3299
- });
3300
- function Oa(e) {
3301
- if (e === null) return !0;
3302
- var n = e.length;
3303
- return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
3304
- }
3305
- function La() {
3306
- return null;
3307
- }
3308
- function Ra(e) {
3309
- return e === null;
3310
- }
3311
- var ct = new z("tag:yaml.org,2002:null", {
3312
- kind: "scalar",
3313
- resolve: Oa,
3314
- construct: La,
3315
- predicate: Ra,
3316
- represent: {
3317
- canonical: function() {
3318
- return "~";
3319
- },
3320
- lowercase: function() {
3321
- return "null";
3322
- },
3323
- uppercase: function() {
3324
- return "NULL";
3325
- },
3326
- camelcase: function() {
3327
- return "Null";
3328
- },
3329
- empty: function() {
3330
- return "";
3331
- }
3332
- },
3333
- defaultStyle: "lowercase"
3334
- });
3335
- function Na(e) {
3336
- if (e === null) return !1;
3337
- var n = e.length;
3338
- return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
3339
- }
3340
- function Da(e) {
3341
- return e === "true" || e === "True" || e === "TRUE";
3342
- }
3343
- function Ba(e) {
3344
- return Object.prototype.toString.call(e) === "[object Boolean]";
3345
- }
3346
- var pt = new z("tag:yaml.org,2002:bool", {
3347
- kind: "scalar",
3348
- resolve: Na,
3349
- construct: Da,
3350
- predicate: Ba,
3351
- represent: {
3352
- lowercase: function(e) {
3353
- return e ? "true" : "false";
3354
- },
3355
- uppercase: function(e) {
3356
- return e ? "TRUE" : "FALSE";
3357
- },
3358
- camelcase: function(e) {
3359
- return e ? "True" : "False";
3360
- }
3361
- },
3362
- defaultStyle: "lowercase"
3363
- });
3364
- function Pa(e) {
3365
- return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
3366
- }
3367
- function Ma(e) {
3368
- return 48 <= e && e <= 55;
3369
- }
3370
- function ja(e) {
3371
- return 48 <= e && e <= 57;
3372
- }
3373
- function $a(e) {
3374
- if (e === null) return !1;
3375
- var n = e.length, t = 0, r = !1, a;
3376
- if (!n) return !1;
3377
- if (a = e[t], (a === "-" || a === "+") && (a = e[++t]), a === "0") {
3378
- if (t + 1 === n) return !0;
3379
- if (a = e[++t], a === "b") {
3380
- for (t++; t < n; t++)
3381
- if (a = e[t], a !== "_") {
3382
- if (a !== "0" && a !== "1") return !1;
3383
- r = !0;
3384
- }
3385
- return r && a !== "_";
3386
- }
3387
- if (a === "x") {
3388
- for (t++; t < n; t++)
3389
- if (a = e[t], a !== "_") {
3390
- if (!Pa(e.charCodeAt(t))) return !1;
3391
- r = !0;
3392
- }
3393
- return r && a !== "_";
3394
- }
3395
- if (a === "o") {
3396
- for (t++; t < n; t++)
3397
- if (a = e[t], a !== "_") {
3398
- if (!Ma(e.charCodeAt(t))) return !1;
3399
- r = !0;
3400
- }
3401
- return r && a !== "_";
3402
- }
3403
- }
3404
- if (a === "_") return !1;
3405
- for (; t < n; t++)
3406
- if (a = e[t], a !== "_") {
3407
- if (!ja(e.charCodeAt(t)))
3408
- return !1;
3409
- r = !0;
3410
- }
3411
- return !(!r || a === "_");
3412
- }
3413
- function Ua(e) {
3414
- var n = e, t = 1, r;
3415
- if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), r = n[0], (r === "-" || r === "+") && (r === "-" && (t = -1), n = n.slice(1), r = n[0]), n === "0") return 0;
3416
- if (r === "0") {
3417
- if (n[1] === "b") return t * parseInt(n.slice(2), 2);
3418
- if (n[1] === "x") return t * parseInt(n.slice(2), 16);
3419
- if (n[1] === "o") return t * parseInt(n.slice(2), 8);
3420
- }
3421
- return t * parseInt(n, 10);
3422
- }
3423
- function za(e) {
3424
- return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !j.isNegativeZero(e);
3425
- }
3426
- var ft = new z("tag:yaml.org,2002:int", {
3427
- kind: "scalar",
3428
- resolve: $a,
3429
- construct: Ua,
3430
- predicate: za,
3431
- represent: {
3432
- binary: function(e) {
3433
- return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
3434
- },
3435
- octal: function(e) {
3436
- return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1);
3437
- },
3438
- decimal: function(e) {
3439
- return e.toString(10);
3440
- },
3441
- /* eslint-disable max-len */
3442
- hexadecimal: function(e) {
3443
- return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1);
3444
- }
3445
- },
3446
- defaultStyle: "decimal",
3447
- styleAliases: {
3448
- binary: [2, "bin"],
3449
- octal: [8, "oct"],
3450
- decimal: [10, "dec"],
3451
- hexadecimal: [16, "hex"]
3452
- }
3453
- }), Ya = new RegExp(
3454
- // 2.5e4, 2.5 and integers
3455
- "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
3456
- );
3457
- function Ga(e) {
3458
- return !(e === null || !Ya.test(e) || // Quick hack to not allow integers end with `_`
3459
- // Probably should update regexp & check speed
3460
- e[e.length - 1] === "_");
3461
- }
3462
- function Ha(e) {
3463
- var n, t;
3464
- return n = e.replace(/_/g, "").toLowerCase(), t = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : t * parseFloat(n, 10);
3465
- }
3466
- var Ka = /^[-+]?[0-9]+e/;
3467
- function Wa(e, n) {
3468
- var t;
3469
- if (isNaN(e))
3470
- switch (n) {
3471
- case "lowercase":
3472
- return ".nan";
3473
- case "uppercase":
3474
- return ".NAN";
3475
- case "camelcase":
3476
- return ".NaN";
3477
- }
3478
- else if (Number.POSITIVE_INFINITY === e)
3479
- switch (n) {
3480
- case "lowercase":
3481
- return ".inf";
3482
- case "uppercase":
3483
- return ".INF";
3484
- case "camelcase":
3485
- return ".Inf";
3486
- }
3487
- else if (Number.NEGATIVE_INFINITY === e)
3488
- switch (n) {
3489
- case "lowercase":
3490
- return "-.inf";
3491
- case "uppercase":
3492
- return "-.INF";
3493
- case "camelcase":
3494
- return "-.Inf";
3495
- }
3496
- else if (j.isNegativeZero(e))
3497
- return "-0.0";
3498
- return t = e.toString(10), Ka.test(t) ? t.replace("e", ".e") : t;
3499
- }
3500
- function qa(e) {
3501
- return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || j.isNegativeZero(e));
3502
- }
3503
- var dt = new z("tag:yaml.org,2002:float", {
3504
- kind: "scalar",
3505
- resolve: Ga,
3506
- construct: Ha,
3507
- predicate: qa,
3508
- represent: Wa,
3509
- defaultStyle: "lowercase"
3510
- }), gt = ut.extend({
3511
- implicit: [
3512
- ct,
3513
- pt,
3514
- ft,
3515
- dt
3516
- ]
3517
- }), yt = gt, ht = new RegExp(
3518
- "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
3519
- ), mt = new RegExp(
3520
- "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
3521
- );
3522
- function Za(e) {
3523
- return e === null ? !1 : ht.exec(e) !== null || mt.exec(e) !== null;
3524
- }
3525
- function Va(e) {
3526
- var n, t, r, a, o, i, l, s = 0, u = null, g, f, m;
3527
- if (n = ht.exec(e), n === null && (n = mt.exec(e)), n === null) throw new Error("Date resolve error");
3528
- if (t = +n[1], r = +n[2] - 1, a = +n[3], !n[4])
3529
- return new Date(Date.UTC(t, r, a));
3530
- if (o = +n[4], i = +n[5], l = +n[6], n[7]) {
3531
- for (s = n[7].slice(0, 3); s.length < 3; )
3532
- s += "0";
3533
- s = +s;
3534
- }
3535
- return n[9] && (g = +n[10], f = +(n[11] || 0), u = (g * 60 + f) * 6e4, n[9] === "-" && (u = -u)), m = new Date(Date.UTC(t, r, a, o, i, l, s)), u && m.setTime(m.getTime() - u), m;
3536
- }
3537
- function Xa(e) {
3538
- return e.toISOString();
3539
- }
3540
- var bt = new z("tag:yaml.org,2002:timestamp", {
3541
- kind: "scalar",
3542
- resolve: Za,
3543
- construct: Va,
3544
- instanceOf: Date,
3545
- represent: Xa
3546
- });
3547
- function Qa(e) {
3548
- return e === "<<" || e === null;
3549
- }
3550
- var vt = new z("tag:yaml.org,2002:merge", {
3551
- kind: "scalar",
3552
- resolve: Qa
3553
- }), yn = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
3554
- \r`;
3555
- function Ja(e) {
3556
- if (e === null) return !1;
3557
- var n, t, r = 0, a = e.length, o = yn;
3558
- for (t = 0; t < a; t++)
3559
- if (n = o.indexOf(e.charAt(t)), !(n > 64)) {
3560
- if (n < 0) return !1;
3561
- r += 6;
3562
- }
3563
- return r % 8 === 0;
3564
- }
3565
- function ei(e) {
3566
- var n, t, r = e.replace(/[\r\n=]/g, ""), a = r.length, o = yn, i = 0, l = [];
3567
- for (n = 0; n < a; n++)
3568
- n % 4 === 0 && n && (l.push(i >> 16 & 255), l.push(i >> 8 & 255), l.push(i & 255)), i = i << 6 | o.indexOf(r.charAt(n));
3569
- return t = a % 4 * 6, t === 0 ? (l.push(i >> 16 & 255), l.push(i >> 8 & 255), l.push(i & 255)) : t === 18 ? (l.push(i >> 10 & 255), l.push(i >> 2 & 255)) : t === 12 && l.push(i >> 4 & 255), new Uint8Array(l);
3570
- }
3571
- function ni(e) {
3572
- var n = "", t = 0, r, a, o = e.length, i = yn;
3573
- for (r = 0; r < o; r++)
3574
- r % 3 === 0 && r && (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]), t = (t << 8) + e[r];
3575
- return a = o % 3, a === 0 ? (n += i[t >> 18 & 63], n += i[t >> 12 & 63], n += i[t >> 6 & 63], n += i[t & 63]) : a === 2 ? (n += i[t >> 10 & 63], n += i[t >> 4 & 63], n += i[t << 2 & 63], n += i[64]) : a === 1 && (n += i[t >> 2 & 63], n += i[t << 4 & 63], n += i[64], n += i[64]), n;
3576
- }
3577
- function ti(e) {
3578
- return Object.prototype.toString.call(e) === "[object Uint8Array]";
3579
- }
3580
- var xt = new z("tag:yaml.org,2002:binary", {
3581
- kind: "scalar",
3582
- resolve: Ja,
3583
- construct: ei,
3584
- predicate: ti,
3585
- represent: ni
3586
- }), ri = Object.prototype.hasOwnProperty, ai = Object.prototype.toString;
3587
- function ii(e) {
3588
- if (e === null) return !0;
3589
- var n = [], t, r, a, o, i, l = e;
3590
- for (t = 0, r = l.length; t < r; t += 1) {
3591
- if (a = l[t], i = !1, ai.call(a) !== "[object Object]") return !1;
3592
- for (o in a)
3593
- if (ri.call(a, o))
3594
- if (!i) i = !0;
3595
- else return !1;
3596
- if (!i) return !1;
3597
- if (n.indexOf(o) === -1) n.push(o);
3598
- else return !1;
3599
- }
3600
- return !0;
3601
- }
3602
- function oi(e) {
3603
- return e !== null ? e : [];
3604
- }
3605
- var wt = new z("tag:yaml.org,2002:omap", {
3606
- kind: "sequence",
3607
- resolve: ii,
3608
- construct: oi
3609
- }), li = Object.prototype.toString;
3610
- function si(e) {
3611
- if (e === null) return !0;
3612
- var n, t, r, a, o, i = e;
3613
- for (o = new Array(i.length), n = 0, t = i.length; n < t; n += 1) {
3614
- if (r = i[n], li.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1)) return !1;
3615
- o[n] = [a[0], r[a[0]]];
3616
- }
3617
- return !0;
3618
- }
3619
- function ui(e) {
3620
- if (e === null) return [];
3621
- var n, t, r, a, o, i = e;
3622
- for (o = new Array(i.length), n = 0, t = i.length; n < t; n += 1)
3623
- r = i[n], a = Object.keys(r), o[n] = [a[0], r[a[0]]];
3624
- return o;
3625
- }
3626
- var At = new z("tag:yaml.org,2002:pairs", {
3627
- kind: "sequence",
3628
- resolve: si,
3629
- construct: ui
3630
- }), ci = Object.prototype.hasOwnProperty;
3631
- function pi(e) {
3632
- if (e === null) return !0;
3633
- var n, t = e;
3634
- for (n in t)
3635
- if (ci.call(t, n) && t[n] !== null)
3636
- return !1;
3637
- return !0;
3638
- }
3639
- function fi(e) {
3640
- return e !== null ? e : {};
3641
- }
3642
- var kt = new z("tag:yaml.org,2002:set", {
3643
- kind: "mapping",
3644
- resolve: pi,
3645
- construct: fi
3646
- }), hn = yt.extend({
3647
- implicit: [
3648
- bt,
3649
- vt
3650
- ],
3651
- explicit: [
3652
- xt,
3653
- wt,
3654
- At,
3655
- kt
3656
- ]
3657
- }), me = Object.prototype.hasOwnProperty, He = 1, Et = 2, St = 3, Ke = 4, on = 1, di = 2, Bn = 3, gi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, yi = /[\x85\u2028\u2029]/, hi = /[,\[\]\{\}]/, _t = /^(?:!|!!|![a-z\-]+!)$/i, Ft = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
3658
- function Pn(e) {
3659
- return Object.prototype.toString.call(e);
3660
- }
3661
- function ie(e) {
3662
- return e === 10 || e === 13;
3663
- }
3664
- function xe(e) {
3665
- return e === 9 || e === 32;
3666
- }
3667
- function Z(e) {
3668
- return e === 9 || e === 32 || e === 10 || e === 13;
3669
- }
3670
- function Se(e) {
3671
- return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
3672
- }
3673
- function mi(e) {
3674
- var n;
3675
- return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
3676
- }
3677
- function bi(e) {
3678
- return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
3679
- }
3680
- function vi(e) {
3681
- return 48 <= e && e <= 57 ? e - 48 : -1;
3682
- }
3683
- function Mn(e) {
3684
- return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
3685
- ` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "…" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
3686
- }
3687
- function xi(e) {
3688
- return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
3689
- (e - 65536 >> 10) + 55296,
3690
- (e - 65536 & 1023) + 56320
3691
- );
3692
- }
3693
- function Ct(e, n, t) {
3694
- n === "__proto__" ? Object.defineProperty(e, n, {
3695
- configurable: !0,
3696
- enumerable: !0,
3697
- writable: !0,
3698
- value: t
3699
- }) : e[n] = t;
3700
- }
3701
- var Tt = new Array(256), It = new Array(256);
3702
- for (var ke = 0; ke < 256; ke++)
3703
- Tt[ke] = Mn(ke) ? 1 : 0, It[ke] = Mn(ke);
3704
- function wi(e, n) {
3705
- this.input = e, this.filename = n.filename || null, this.schema = n.schema || hn, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
3706
- }
3707
- function Ot(e, n) {
3708
- var t = {
3709
- name: e.filename,
3710
- buffer: e.input.slice(0, -1),
3711
- // omit trailing \0
3712
- position: e.position,
3713
- line: e.line,
3714
- column: e.position - e.lineStart
3715
- };
3716
- return t.snippet = Sa(t), new K(n, t);
3717
- }
3718
- function A(e, n) {
3719
- throw Ot(e, n);
3720
- }
3721
- function We(e, n) {
3722
- e.onWarning && e.onWarning.call(null, Ot(e, n));
3723
- }
3724
- var jn = {
3725
- YAML: function(n, t, r) {
3726
- var a, o, i;
3727
- n.version !== null && A(n, "duplication of %YAML directive"), r.length !== 1 && A(n, "YAML directive accepts exactly one argument"), a = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), a === null && A(n, "ill-formed argument of the YAML directive"), o = parseInt(a[1], 10), i = parseInt(a[2], 10), o !== 1 && A(n, "unacceptable YAML version of the document"), n.version = r[0], n.checkLineBreaks = i < 2, i !== 1 && i !== 2 && We(n, "unsupported YAML version of the document");
3728
- },
3729
- TAG: function(n, t, r) {
3730
- var a, o;
3731
- r.length !== 2 && A(n, "TAG directive accepts exactly two arguments"), a = r[0], o = r[1], _t.test(a) || A(n, "ill-formed tag handle (first argument) of the TAG directive"), me.call(n.tagMap, a) && A(n, 'there is a previously declared suffix for "' + a + '" tag handle'), Ft.test(o) || A(n, "ill-formed tag prefix (second argument) of the TAG directive");
3732
- try {
3733
- o = decodeURIComponent(o);
3734
- } catch {
3735
- A(n, "tag prefix is malformed: " + o);
3736
- }
3737
- n.tagMap[a] = o;
3738
- }
3739
- };
3740
- function he(e, n, t, r) {
3741
- var a, o, i, l;
3742
- if (n < t) {
3743
- if (l = e.input.slice(n, t), r)
3744
- for (a = 0, o = l.length; a < o; a += 1)
3745
- i = l.charCodeAt(a), i === 9 || 32 <= i && i <= 1114111 || A(e, "expected valid JSON character");
3746
- else gi.test(l) && A(e, "the stream contains non-printable characters");
3747
- e.result += l;
3748
- }
3749
- }
3750
- function $n(e, n, t, r) {
3751
- var a, o, i, l;
3752
- for (j.isObject(t) || A(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(t), i = 0, l = a.length; i < l; i += 1)
3753
- o = a[i], me.call(n, o) || (Ct(n, o, t[o]), r[o] = !0);
3754
- }
3755
- function _e(e, n, t, r, a, o, i, l, s) {
3756
- var u, g;
3757
- if (Array.isArray(a))
3758
- for (a = Array.prototype.slice.call(a), u = 0, g = a.length; u < g; u += 1)
3759
- Array.isArray(a[u]) && A(e, "nested arrays are not supported inside keys"), typeof a == "object" && Pn(a[u]) === "[object Object]" && (a[u] = "[object Object]");
3760
- if (typeof a == "object" && Pn(a) === "[object Object]" && (a = "[object Object]"), a = String(a), n === null && (n = {}), r === "tag:yaml.org,2002:merge")
3761
- if (Array.isArray(o))
3762
- for (u = 0, g = o.length; u < g; u += 1)
3763
- $n(e, n, o[u], t);
3764
- else
3765
- $n(e, n, o, t);
3766
- else
3767
- !e.json && !me.call(t, a) && me.call(n, a) && (e.line = i || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, A(e, "duplicated mapping key")), Ct(n, a, o), delete t[a];
3768
- return n;
3769
- }
3770
- function mn(e) {
3771
- var n;
3772
- n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : A(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
3773
- }
3774
- function P(e, n, t) {
3775
- for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
3776
- for (; xe(a); )
3777
- a === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), a = e.input.charCodeAt(++e.position);
3778
- if (n && a === 35)
3779
- do
3780
- a = e.input.charCodeAt(++e.position);
3781
- while (a !== 10 && a !== 13 && a !== 0);
3782
- if (ie(a))
3783
- for (mn(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
3784
- e.lineIndent++, a = e.input.charCodeAt(++e.position);
3785
- else
3786
- break;
3787
- }
3788
- return t !== -1 && r !== 0 && e.lineIndent < t && We(e, "deficient indentation"), r;
3789
- }
3790
- function Qe(e) {
3791
- var n = e.position, t;
3792
- return t = e.input.charCodeAt(n), !!((t === 45 || t === 46) && t === e.input.charCodeAt(n + 1) && t === e.input.charCodeAt(n + 2) && (n += 3, t = e.input.charCodeAt(n), t === 0 || Z(t)));
3793
- }
3794
- function bn(e, n) {
3795
- n === 1 ? e.result += " " : n > 1 && (e.result += j.repeat(`
3796
- `, n - 1));
3797
- }
3798
- function Ai(e, n, t) {
3799
- var r, a, o, i, l, s, u, g, f = e.kind, m = e.result, v;
3800
- if (v = e.input.charCodeAt(e.position), Z(v) || Se(v) || v === 35 || v === 38 || v === 42 || v === 33 || v === 124 || v === 62 || v === 39 || v === 34 || v === 37 || v === 64 || v === 96 || (v === 63 || v === 45) && (a = e.input.charCodeAt(e.position + 1), Z(a) || t && Se(a)))
3801
- return !1;
3802
- for (e.kind = "scalar", e.result = "", o = i = e.position, l = !1; v !== 0; ) {
3803
- if (v === 58) {
3804
- if (a = e.input.charCodeAt(e.position + 1), Z(a) || t && Se(a))
3805
- break;
3806
- } else if (v === 35) {
3807
- if (r = e.input.charCodeAt(e.position - 1), Z(r))
3808
- break;
3809
- } else {
3810
- if (e.position === e.lineStart && Qe(e) || t && Se(v))
3811
- break;
3812
- if (ie(v))
3813
- if (s = e.line, u = e.lineStart, g = e.lineIndent, P(e, !1, -1), e.lineIndent >= n) {
3814
- l = !0, v = e.input.charCodeAt(e.position);
3815
- continue;
3816
- } else {
3817
- e.position = i, e.line = s, e.lineStart = u, e.lineIndent = g;
3818
- break;
3819
- }
3820
- }
3821
- l && (he(e, o, i, !1), bn(e, e.line - s), o = i = e.position, l = !1), xe(v) || (i = e.position + 1), v = e.input.charCodeAt(++e.position);
3822
- }
3823
- return he(e, o, i, !1), e.result ? !0 : (e.kind = f, e.result = m, !1);
3824
- }
3825
- function ki(e, n) {
3826
- var t, r, a;
3827
- if (t = e.input.charCodeAt(e.position), t !== 39)
3828
- return !1;
3829
- for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
3830
- if (t === 39)
3831
- if (he(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
3832
- r = e.position, e.position++, a = e.position;
3833
- else
3834
- return !0;
3835
- else ie(t) ? (he(e, r, a, !0), bn(e, P(e, !1, n)), r = a = e.position) : e.position === e.lineStart && Qe(e) ? A(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
3836
- A(e, "unexpected end of the stream within a single quoted scalar");
3837
- }
3838
- function Ei(e, n) {
3839
- var t, r, a, o, i, l;
3840
- if (l = e.input.charCodeAt(e.position), l !== 34)
3841
- return !1;
3842
- for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
3843
- if (l === 34)
3844
- return he(e, t, e.position, !0), e.position++, !0;
3845
- if (l === 92) {
3846
- if (he(e, t, e.position, !0), l = e.input.charCodeAt(++e.position), ie(l))
3847
- P(e, !1, n);
3848
- else if (l < 256 && Tt[l])
3849
- e.result += It[l], e.position++;
3850
- else if ((i = bi(l)) > 0) {
3851
- for (a = i, o = 0; a > 0; a--)
3852
- l = e.input.charCodeAt(++e.position), (i = mi(l)) >= 0 ? o = (o << 4) + i : A(e, "expected hexadecimal character");
3853
- e.result += xi(o), e.position++;
3854
- } else
3855
- A(e, "unknown escape sequence");
3856
- t = r = e.position;
3857
- } else ie(l) ? (he(e, t, r, !0), bn(e, P(e, !1, n)), t = r = e.position) : e.position === e.lineStart && Qe(e) ? A(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
3858
- }
3859
- A(e, "unexpected end of the stream within a double quoted scalar");
3860
- }
3861
- function Si(e, n) {
3862
- var t = !0, r, a, o, i = e.tag, l, s = e.anchor, u, g, f, m, v, c = /* @__PURE__ */ Object.create(null), p, d, b, y;
3863
- if (y = e.input.charCodeAt(e.position), y === 91)
3864
- g = 93, v = !1, l = [];
3865
- else if (y === 123)
3866
- g = 125, v = !0, l = {};
3867
- else
3868
- return !1;
3869
- for (e.anchor !== null && (e.anchorMap[e.anchor] = l), y = e.input.charCodeAt(++e.position); y !== 0; ) {
3870
- if (P(e, !0, n), y = e.input.charCodeAt(e.position), y === g)
3871
- return e.position++, e.tag = i, e.anchor = s, e.kind = v ? "mapping" : "sequence", e.result = l, !0;
3872
- t ? y === 44 && A(e, "expected the node content, but found ','") : A(e, "missed comma between flow collection entries"), d = p = b = null, f = m = !1, y === 63 && (u = e.input.charCodeAt(e.position + 1), Z(u) && (f = m = !0, e.position++, P(e, !0, n))), r = e.line, a = e.lineStart, o = e.position, Fe(e, n, He, !1, !0), d = e.tag, p = e.result, P(e, !0, n), y = e.input.charCodeAt(e.position), (m || e.line === r) && y === 58 && (f = !0, y = e.input.charCodeAt(++e.position), P(e, !0, n), Fe(e, n, He, !1, !0), b = e.result), v ? _e(e, l, c, d, p, b, r, a, o) : f ? l.push(_e(e, null, c, d, p, b, r, a, o)) : l.push(p), P(e, !0, n), y = e.input.charCodeAt(e.position), y === 44 ? (t = !0, y = e.input.charCodeAt(++e.position)) : t = !1;
3873
- }
3874
- A(e, "unexpected end of the stream within a flow collection");
3875
- }
3876
- function _i(e, n) {
3877
- var t, r, a = on, o = !1, i = !1, l = n, s = 0, u = !1, g, f;
3878
- if (f = e.input.charCodeAt(e.position), f === 124)
3879
- r = !1;
3880
- else if (f === 62)
3881
- r = !0;
3882
- else
3883
- return !1;
3884
- for (e.kind = "scalar", e.result = ""; f !== 0; )
3885
- if (f = e.input.charCodeAt(++e.position), f === 43 || f === 45)
3886
- on === a ? a = f === 43 ? Bn : di : A(e, "repeat of a chomping mode identifier");
3887
- else if ((g = vi(f)) >= 0)
3888
- g === 0 ? A(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? A(e, "repeat of an indentation width identifier") : (l = n + g - 1, i = !0);
3889
- else
3890
- break;
3891
- if (xe(f)) {
3892
- do
3893
- f = e.input.charCodeAt(++e.position);
3894
- while (xe(f));
3895
- if (f === 35)
3896
- do
3897
- f = e.input.charCodeAt(++e.position);
3898
- while (!ie(f) && f !== 0);
3899
- }
3900
- for (; f !== 0; ) {
3901
- for (mn(e), e.lineIndent = 0, f = e.input.charCodeAt(e.position); (!i || e.lineIndent < l) && f === 32; )
3902
- e.lineIndent++, f = e.input.charCodeAt(++e.position);
3903
- if (!i && e.lineIndent > l && (l = e.lineIndent), ie(f)) {
3904
- s++;
3905
- continue;
3906
- }
3907
- if (e.lineIndent < l) {
3908
- a === Bn ? e.result += j.repeat(`
3909
- `, o ? 1 + s : s) : a === on && o && (e.result += `
3910
- `);
3911
- break;
3912
- }
3913
- for (r ? xe(f) ? (u = !0, e.result += j.repeat(`
3914
- `, o ? 1 + s : s)) : u ? (u = !1, e.result += j.repeat(`
3915
- `, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += j.repeat(`
3916
- `, s) : e.result += j.repeat(`
3917
- `, o ? 1 + s : s), o = !0, i = !0, s = 0, t = e.position; !ie(f) && f !== 0; )
3918
- f = e.input.charCodeAt(++e.position);
3919
- he(e, t, e.position, !1);
3920
- }
3921
- return !0;
3922
- }
3923
- function Un(e, n) {
3924
- var t, r = e.tag, a = e.anchor, o = [], i, l = !1, s;
3925
- if (e.firstTabInLine !== -1) return !1;
3926
- for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, A(e, "tab characters must not be used in indentation")), !(s !== 45 || (i = e.input.charCodeAt(e.position + 1), !Z(i)))); ) {
3927
- if (l = !0, e.position++, P(e, !0, -1) && e.lineIndent <= n) {
3928
- o.push(null), s = e.input.charCodeAt(e.position);
3929
- continue;
3930
- }
3931
- if (t = e.line, Fe(e, n, St, !1, !0), o.push(e.result), P(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > n) && s !== 0)
3932
- A(e, "bad indentation of a sequence entry");
3933
- else if (e.lineIndent < n)
3934
- break;
3935
- }
3936
- return l ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = o, !0) : !1;
3937
- }
3938
- function Fi(e, n, t) {
3939
- var r, a, o, i, l, s, u = e.tag, g = e.anchor, f = {}, m = /* @__PURE__ */ Object.create(null), v = null, c = null, p = null, d = !1, b = !1, y;
3940
- if (e.firstTabInLine !== -1) return !1;
3941
- for (e.anchor !== null && (e.anchorMap[e.anchor] = f), y = e.input.charCodeAt(e.position); y !== 0; ) {
3942
- if (!d && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, A(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (y === 63 || y === 58) && Z(r))
3943
- y === 63 ? (d && (_e(e, f, m, v, c, null, i, l, s), v = c = p = null), b = !0, d = !0, a = !0) : d ? (d = !1, a = !0) : A(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, y = r;
3944
- else {
3945
- if (i = e.line, l = e.lineStart, s = e.position, !Fe(e, t, Et, !1, !0))
3946
- break;
3947
- if (e.line === o) {
3948
- for (y = e.input.charCodeAt(e.position); xe(y); )
3949
- y = e.input.charCodeAt(++e.position);
3950
- if (y === 58)
3951
- y = e.input.charCodeAt(++e.position), Z(y) || A(e, "a whitespace character is expected after the key-value separator within a block mapping"), d && (_e(e, f, m, v, c, null, i, l, s), v = c = p = null), b = !0, d = !1, a = !1, v = e.tag, c = e.result;
3952
- else if (b)
3953
- A(e, "can not read an implicit mapping pair; a colon is missed");
3954
- else
3955
- return e.tag = u, e.anchor = g, !0;
3956
- } else if (b)
3957
- A(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
3958
- else
3959
- return e.tag = u, e.anchor = g, !0;
3960
- }
3961
- if ((e.line === o || e.lineIndent > n) && (d && (i = e.line, l = e.lineStart, s = e.position), Fe(e, n, Ke, !0, a) && (d ? c = e.result : p = e.result), d || (_e(e, f, m, v, c, p, i, l, s), v = c = p = null), P(e, !0, -1), y = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && y !== 0)
3962
- A(e, "bad indentation of a mapping entry");
3963
- else if (e.lineIndent < n)
3964
- break;
3965
- }
3966
- return d && _e(e, f, m, v, c, null, i, l, s), b && (e.tag = u, e.anchor = g, e.kind = "mapping", e.result = f), b;
3967
- }
3968
- function Ci(e) {
3969
- var n, t = !1, r = !1, a, o, i;
3970
- if (i = e.input.charCodeAt(e.position), i !== 33) return !1;
3971
- if (e.tag !== null && A(e, "duplication of a tag property"), i = e.input.charCodeAt(++e.position), i === 60 ? (t = !0, i = e.input.charCodeAt(++e.position)) : i === 33 ? (r = !0, a = "!!", i = e.input.charCodeAt(++e.position)) : a = "!", n = e.position, t) {
3972
- do
3973
- i = e.input.charCodeAt(++e.position);
3974
- while (i !== 0 && i !== 62);
3975
- e.position < e.length ? (o = e.input.slice(n, e.position), i = e.input.charCodeAt(++e.position)) : A(e, "unexpected end of the stream within a verbatim tag");
3976
- } else {
3977
- for (; i !== 0 && !Z(i); )
3978
- i === 33 && (r ? A(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(n - 1, e.position + 1), _t.test(a) || A(e, "named tag handle cannot contain such characters"), r = !0, n = e.position + 1)), i = e.input.charCodeAt(++e.position);
3979
- o = e.input.slice(n, e.position), hi.test(o) && A(e, "tag suffix cannot contain flow indicator characters");
3980
- }
3981
- o && !Ft.test(o) && A(e, "tag name cannot contain such characters: " + o);
3982
- try {
3983
- o = decodeURIComponent(o);
3984
- } catch {
3985
- A(e, "tag name is malformed: " + o);
3986
- }
3987
- return t ? e.tag = o : me.call(e.tagMap, a) ? e.tag = e.tagMap[a] + o : a === "!" ? e.tag = "!" + o : a === "!!" ? e.tag = "tag:yaml.org,2002:" + o : A(e, 'undeclared tag handle "' + a + '"'), !0;
3988
- }
3989
- function Ti(e) {
3990
- var n, t;
3991
- if (t = e.input.charCodeAt(e.position), t !== 38) return !1;
3992
- for (e.anchor !== null && A(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !Z(t) && !Se(t); )
3993
- t = e.input.charCodeAt(++e.position);
3994
- return e.position === n && A(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
3995
- }
3996
- function Ii(e) {
3997
- var n, t, r;
3998
- if (r = e.input.charCodeAt(e.position), r !== 42) return !1;
3999
- for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !Z(r) && !Se(r); )
4000
- r = e.input.charCodeAt(++e.position);
4001
- return e.position === n && A(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), me.call(e.anchorMap, t) || A(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], P(e, !0, -1), !0;
4002
- }
4003
- function Fe(e, n, t, r, a) {
4004
- var o, i, l, s = 1, u = !1, g = !1, f, m, v, c, p, d;
4005
- if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = i = l = Ke === t || St === t, r && P(e, !0, -1) && (u = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
4006
- for (; Ci(e) || Ti(e); )
4007
- P(e, !0, -1) ? (u = !0, l = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : l = !1;
4008
- if (l && (l = u || a), (s === 1 || Ke === t) && (He === t || Et === t ? p = n : p = n + 1, d = e.position - e.lineStart, s === 1 ? l && (Un(e, d) || Fi(e, d, p)) || Si(e, p) ? g = !0 : (i && _i(e, p) || ki(e, p) || Ei(e, p) ? g = !0 : Ii(e) ? (g = !0, (e.tag !== null || e.anchor !== null) && A(e, "alias node should not have any properties")) : Ai(e, p, He === t) && (g = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (g = l && Un(e, d))), e.tag === null)
4009
- e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
4010
- else if (e.tag === "?") {
4011
- for (e.result !== null && e.kind !== "scalar" && A(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), f = 0, m = e.implicitTypes.length; f < m; f += 1)
4012
- if (c = e.implicitTypes[f], c.resolve(e.result)) {
4013
- e.result = c.construct(e.result), e.tag = c.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
4014
- break;
4015
- }
4016
- } else if (e.tag !== "!") {
4017
- if (me.call(e.typeMap[e.kind || "fallback"], e.tag))
4018
- c = e.typeMap[e.kind || "fallback"][e.tag];
4019
- else
4020
- for (c = null, v = e.typeMap.multi[e.kind || "fallback"], f = 0, m = v.length; f < m; f += 1)
4021
- if (e.tag.slice(0, v[f].tag.length) === v[f].tag) {
4022
- c = v[f];
4023
- break;
4024
- }
4025
- c || A(e, "unknown tag !<" + e.tag + ">"), e.result !== null && c.kind !== e.kind && A(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + c.kind + '", not "' + e.kind + '"'), c.resolve(e.result, e.tag) ? (e.result = c.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : A(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
4026
- }
4027
- return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || g;
4028
- }
4029
- function Oi(e) {
4030
- var n = e.position, t, r, a, o = !1, i;
4031
- for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (i = e.input.charCodeAt(e.position)) !== 0 && (P(e, !0, -1), i = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || i !== 37)); ) {
4032
- for (o = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !Z(i); )
4033
- i = e.input.charCodeAt(++e.position);
4034
- for (r = e.input.slice(t, e.position), a = [], r.length < 1 && A(e, "directive name must not be less than one character in length"); i !== 0; ) {
4035
- for (; xe(i); )
4036
- i = e.input.charCodeAt(++e.position);
4037
- if (i === 35) {
4038
- do
4039
- i = e.input.charCodeAt(++e.position);
4040
- while (i !== 0 && !ie(i));
4041
- break;
4042
- }
4043
- if (ie(i)) break;
4044
- for (t = e.position; i !== 0 && !Z(i); )
4045
- i = e.input.charCodeAt(++e.position);
4046
- a.push(e.input.slice(t, e.position));
4047
- }
4048
- i !== 0 && mn(e), me.call(jn, r) ? jn[r](e, r, a) : We(e, 'unknown document directive "' + r + '"');
4049
- }
4050
- if (P(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, P(e, !0, -1)) : o && A(e, "directives end mark is expected"), Fe(e, e.lineIndent - 1, Ke, !1, !0), P(e, !0, -1), e.checkLineBreaks && yi.test(e.input.slice(n, e.position)) && We(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Qe(e)) {
4051
- e.input.charCodeAt(e.position) === 46 && (e.position += 3, P(e, !0, -1));
4052
- return;
4053
- }
4054
- if (e.position < e.length - 1)
4055
- A(e, "end of the stream or a document separator is expected");
4056
- else
4057
- return;
4058
- }
4059
- function Lt(e, n) {
4060
- e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
4061
- `), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
4062
- var t = new wi(e, n), r = e.indexOf("\0");
4063
- for (r !== -1 && (t.position = r, A(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
4064
- t.lineIndent += 1, t.position += 1;
4065
- for (; t.position < t.length - 1; )
4066
- Oi(t);
4067
- return t.documents;
4068
- }
4069
- function Li(e, n, t) {
4070
- n !== null && typeof n == "object" && typeof t > "u" && (t = n, n = null);
4071
- var r = Lt(e, t);
4072
- if (typeof n != "function")
4073
- return r;
4074
- for (var a = 0, o = r.length; a < o; a += 1)
4075
- n(r[a]);
4076
- }
4077
- function Ri(e, n) {
4078
- var t = Lt(e, n);
4079
- if (t.length !== 0) {
4080
- if (t.length === 1)
4081
- return t[0];
4082
- throw new K("expected a single document in the stream, but found more");
4083
- }
4084
- }
4085
- var Ni = Li, Di = Ri, Rt = {
4086
- loadAll: Ni,
4087
- load: Di
4088
- }, Nt = Object.prototype.toString, Dt = Object.prototype.hasOwnProperty, vn = 65279, Bi = 9, Me = 10, Pi = 13, Mi = 32, ji = 33, $i = 34, cn = 35, Ui = 37, zi = 38, Yi = 39, Gi = 42, Bt = 44, Hi = 45, qe = 58, Ki = 61, Wi = 62, qi = 63, Zi = 64, Pt = 91, Mt = 93, Vi = 96, jt = 123, Xi = 124, $t = 125, G = {};
4089
- G[0] = "\\0";
4090
- G[7] = "\\a";
4091
- G[8] = "\\b";
4092
- G[9] = "\\t";
4093
- G[10] = "\\n";
4094
- G[11] = "\\v";
4095
- G[12] = "\\f";
4096
- G[13] = "\\r";
4097
- G[27] = "\\e";
4098
- G[34] = '\\"';
4099
- G[92] = "\\\\";
4100
- G[133] = "\\N";
4101
- G[160] = "\\_";
4102
- G[8232] = "\\L";
4103
- G[8233] = "\\P";
4104
- var Qi = [
4105
- "y",
4106
- "Y",
4107
- "yes",
4108
- "Yes",
4109
- "YES",
4110
- "on",
4111
- "On",
4112
- "ON",
4113
- "n",
4114
- "N",
4115
- "no",
4116
- "No",
4117
- "NO",
4118
- "off",
4119
- "Off",
4120
- "OFF"
4121
- ], Ji = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
4122
- function eo(e, n) {
4123
- var t, r, a, o, i, l, s;
4124
- if (n === null) return {};
4125
- for (t = {}, r = Object.keys(n), a = 0, o = r.length; a < o; a += 1)
4126
- i = r[a], l = String(n[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), s = e.compiledTypeMap.fallback[i], s && Dt.call(s.styleAliases, l) && (l = s.styleAliases[l]), t[i] = l;
4127
- return t;
4128
- }
4129
- function no(e) {
4130
- var n, t, r;
4131
- if (n = e.toString(16).toUpperCase(), e <= 255)
4132
- t = "x", r = 2;
4133
- else if (e <= 65535)
4134
- t = "u", r = 4;
4135
- else if (e <= 4294967295)
4136
- t = "U", r = 8;
4137
- else
4138
- throw new K("code point within a string may not be greater than 0xFFFFFFFF");
4139
- return "\\" + t + j.repeat("0", r - n.length) + n;
4140
- }
4141
- var to = 1, je = 2;
4142
- function ro(e) {
4143
- this.schema = e.schema || hn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = j.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = eo(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? je : to, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
4144
- }
4145
- function zn(e, n) {
4146
- for (var t = j.repeat(" ", n), r = 0, a = -1, o = "", i, l = e.length; r < l; )
4147
- a = e.indexOf(`
4148
- `, r), a === -1 ? (i = e.slice(r), r = l) : (i = e.slice(r, a + 1), r = a + 1), i.length && i !== `
4149
- ` && (o += t), o += i;
4150
- return o;
4151
- }
4152
- function pn(e, n) {
4153
- return `
4154
- ` + j.repeat(" ", e.indent * n);
4155
- }
4156
- function ao(e, n) {
4157
- var t, r, a;
4158
- for (t = 0, r = e.implicitTypes.length; t < r; t += 1)
4159
- if (a = e.implicitTypes[t], a.resolve(n))
4160
- return !0;
4161
- return !1;
4162
- }
4163
- function Ze(e) {
4164
- return e === Mi || e === Bi;
4165
- }
4166
- function $e(e) {
4167
- return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== vn || 65536 <= e && e <= 1114111;
4168
- }
4169
- function Yn(e) {
4170
- return $e(e) && e !== vn && e !== Pi && e !== Me;
4171
- }
4172
- function Gn(e, n, t) {
4173
- var r = Yn(e), a = r && !Ze(e);
4174
- return (
4175
- // ns-plain-safe
4176
- (t ? (
4177
- // c = flow-in
4178
- r
4179
- ) : r && e !== Bt && e !== Pt && e !== Mt && e !== jt && e !== $t) && e !== cn && !(n === qe && !a) || Yn(n) && !Ze(n) && e === cn || n === qe && a
4180
- );
4181
- }
4182
- function io(e) {
4183
- return $e(e) && e !== vn && !Ze(e) && e !== Hi && e !== qi && e !== qe && e !== Bt && e !== Pt && e !== Mt && e !== jt && e !== $t && e !== cn && e !== zi && e !== Gi && e !== ji && e !== Xi && e !== Ki && e !== Wi && e !== Yi && e !== $i && e !== Ui && e !== Zi && e !== Vi;
4184
- }
4185
- function oo(e) {
4186
- return !Ze(e) && e !== qe;
4187
- }
4188
- function Be(e, n) {
4189
- var t = e.charCodeAt(n), r;
4190
- return t >= 55296 && t <= 56319 && n + 1 < e.length && (r = e.charCodeAt(n + 1), r >= 56320 && r <= 57343) ? (t - 55296) * 1024 + r - 56320 + 65536 : t;
4191
- }
4192
- function Ut(e) {
4193
- var n = /^\n* /;
4194
- return n.test(e);
4195
- }
4196
- var zt = 1, fn = 2, Yt = 3, Gt = 4, Ee = 5;
4197
- function lo(e, n, t, r, a, o, i, l) {
4198
- var s, u = 0, g = null, f = !1, m = !1, v = r !== -1, c = -1, p = io(Be(e, 0)) && oo(Be(e, e.length - 1));
4199
- if (n || i)
4200
- for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
4201
- if (u = Be(e, s), !$e(u))
4202
- return Ee;
4203
- p = p && Gn(u, g, l), g = u;
4204
- }
4205
- else {
4206
- for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
4207
- if (u = Be(e, s), u === Me)
4208
- f = !0, v && (m = m || // Foldable line = too long, and not more-indented.
4209
- s - c - 1 > r && e[c + 1] !== " ", c = s);
4210
- else if (!$e(u))
4211
- return Ee;
4212
- p = p && Gn(u, g, l), g = u;
4213
- }
4214
- m = m || v && s - c - 1 > r && e[c + 1] !== " ";
4215
- }
4216
- return !f && !m ? p && !i && !a(e) ? zt : o === je ? Ee : fn : t > 9 && Ut(e) ? Ee : i ? o === je ? Ee : fn : m ? Gt : Yt;
4217
- }
4218
- function so(e, n, t, r, a) {
4219
- e.dump = function() {
4220
- if (n.length === 0)
4221
- return e.quotingType === je ? '""' : "''";
4222
- if (!e.noCompatMode && (Qi.indexOf(n) !== -1 || Ji.test(n)))
4223
- return e.quotingType === je ? '"' + n + '"' : "'" + n + "'";
4224
- var o = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = r || e.flowLevel > -1 && t >= e.flowLevel;
4225
- function s(u) {
4226
- return ao(e, u);
4227
- }
4228
- switch (lo(
4229
- n,
4230
- l,
4231
- e.indent,
4232
- i,
4233
- s,
4234
- e.quotingType,
4235
- e.forceQuotes && !r,
4236
- a
4237
- )) {
4238
- case zt:
4239
- return n;
4240
- case fn:
4241
- return "'" + n.replace(/'/g, "''") + "'";
4242
- case Yt:
4243
- return "|" + Hn(n, e.indent) + Kn(zn(n, o));
4244
- case Gt:
4245
- return ">" + Hn(n, e.indent) + Kn(zn(uo(n, i), o));
4246
- case Ee:
4247
- return '"' + co(n) + '"';
4248
- default:
4249
- throw new K("impossible error: invalid scalar style");
4250
- }
4251
- }();
4252
- }
4253
- function Hn(e, n) {
4254
- var t = Ut(e) ? String(n) : "", r = e[e.length - 1] === `
4255
- `, a = r && (e[e.length - 2] === `
4256
- ` || e === `
4257
- `), o = a ? "+" : r ? "" : "-";
4258
- return t + o + `
4259
- `;
4260
- }
4261
- function Kn(e) {
4262
- return e[e.length - 1] === `
4263
- ` ? e.slice(0, -1) : e;
4264
- }
4265
- function uo(e, n) {
4266
- for (var t = /(\n+)([^\n]*)/g, r = function() {
4267
- var u = e.indexOf(`
4268
- `);
4269
- return u = u !== -1 ? u : e.length, t.lastIndex = u, Wn(e.slice(0, u), n);
4270
- }(), a = e[0] === `
4271
- ` || e[0] === " ", o, i; i = t.exec(e); ) {
4272
- var l = i[1], s = i[2];
4273
- o = s[0] === " ", r += l + (!a && !o && s !== "" ? `
4274
- ` : "") + Wn(s, n), a = o;
4275
- }
4276
- return r;
4277
- }
4278
- function Wn(e, n) {
4279
- if (e === "" || e[0] === " ") return e;
4280
- for (var t = / [^ ]/g, r, a = 0, o, i = 0, l = 0, s = ""; r = t.exec(e); )
4281
- l = r.index, l - a > n && (o = i > a ? i : l, s += `
4282
- ` + e.slice(a, o), a = o + 1), i = l;
4283
- return s += `
4284
- `, e.length - a > n && i > a ? s += e.slice(a, i) + `
4285
- ` + e.slice(i + 1) : s += e.slice(a), s.slice(1);
4286
- }
4287
- function co(e) {
4288
- for (var n = "", t = 0, r, a = 0; a < e.length; t >= 65536 ? a += 2 : a++)
4289
- t = Be(e, a), r = G[t], !r && $e(t) ? (n += e[a], t >= 65536 && (n += e[a + 1])) : n += r || no(t);
4290
- return n;
4291
- }
4292
- function po(e, n, t) {
4293
- var r = "", a = e.tag, o, i, l;
4294
- for (o = 0, i = t.length; o < i; o += 1)
4295
- l = t[o], e.replacer && (l = e.replacer.call(t, String(o), l)), (ce(e, n, l, !1, !1) || typeof l > "u" && ce(e, n, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
4296
- e.tag = a, e.dump = "[" + r + "]";
4297
- }
4298
- function qn(e, n, t, r) {
4299
- var a = "", o = e.tag, i, l, s;
4300
- for (i = 0, l = t.length; i < l; i += 1)
4301
- s = t[i], e.replacer && (s = e.replacer.call(t, String(i), s)), (ce(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && ce(e, n + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += pn(e, n)), e.dump && Me === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
4302
- e.tag = o, e.dump = a || "[]";
4303
- }
4304
- function fo(e, n, t) {
4305
- var r = "", a = e.tag, o = Object.keys(t), i, l, s, u, g;
4306
- for (i = 0, l = o.length; i < l; i += 1)
4307
- g = "", r !== "" && (g += ", "), e.condenseFlow && (g += '"'), s = o[i], u = t[s], e.replacer && (u = e.replacer.call(t, s, u)), ce(e, n, s, !1, !1) && (e.dump.length > 1024 && (g += "? "), g += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ce(e, n, u, !1, !1) && (g += e.dump, r += g));
4308
- e.tag = a, e.dump = "{" + r + "}";
4309
- }
4310
- function go(e, n, t, r) {
4311
- var a = "", o = e.tag, i = Object.keys(t), l, s, u, g, f, m;
4312
- if (e.sortKeys === !0)
4313
- i.sort();
4314
- else if (typeof e.sortKeys == "function")
4315
- i.sort(e.sortKeys);
4316
- else if (e.sortKeys)
4317
- throw new K("sortKeys must be a boolean or a function");
4318
- for (l = 0, s = i.length; l < s; l += 1)
4319
- m = "", (!r || a !== "") && (m += pn(e, n)), u = i[l], g = t[u], e.replacer && (g = e.replacer.call(t, u, g)), ce(e, n + 1, u, !0, !0, !0) && (f = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, f && (e.dump && Me === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, f && (m += pn(e, n)), ce(e, n + 1, g, !0, f) && (e.dump && Me === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, a += m));
4320
- e.tag = o, e.dump = a || "{}";
4321
- }
4322
- function Zn(e, n, t) {
4323
- var r, a, o, i, l, s;
4324
- for (a = t ? e.explicitTypes : e.implicitTypes, o = 0, i = a.length; o < i; o += 1)
4325
- if (l = a[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof n == "object" && n instanceof l.instanceOf) && (!l.predicate || l.predicate(n))) {
4326
- if (t ? l.multi && l.representName ? e.tag = l.representName(n) : e.tag = l.tag : e.tag = "?", l.represent) {
4327
- if (s = e.styleMap[l.tag] || l.defaultStyle, Nt.call(l.represent) === "[object Function]")
4328
- r = l.represent(n, s);
4329
- else if (Dt.call(l.represent, s))
4330
- r = l.represent[s](n, s);
4331
- else
4332
- throw new K("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
4333
- e.dump = r;
4334
- }
4335
- return !0;
4336
- }
4337
- return !1;
4338
- }
4339
- function ce(e, n, t, r, a, o, i) {
4340
- e.tag = null, e.dump = t, Zn(e, t, !1) || Zn(e, t, !0);
4341
- var l = Nt.call(e.dump), s = r, u;
4342
- r && (r = e.flowLevel < 0 || e.flowLevel > n);
4343
- var g = l === "[object Object]" || l === "[object Array]", f, m;
4344
- if (g && (f = e.duplicates.indexOf(t), m = f !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && n > 0) && (a = !1), m && e.usedDuplicates[f])
4345
- e.dump = "*ref_" + f;
4346
- else {
4347
- if (g && m && !e.usedDuplicates[f] && (e.usedDuplicates[f] = !0), l === "[object Object]")
4348
- r && Object.keys(e.dump).length !== 0 ? (go(e, n, e.dump, a), m && (e.dump = "&ref_" + f + e.dump)) : (fo(e, n, e.dump), m && (e.dump = "&ref_" + f + " " + e.dump));
4349
- else if (l === "[object Array]")
4350
- r && e.dump.length !== 0 ? (e.noArrayIndent && !i && n > 0 ? qn(e, n - 1, e.dump, a) : qn(e, n, e.dump, a), m && (e.dump = "&ref_" + f + e.dump)) : (po(e, n, e.dump), m && (e.dump = "&ref_" + f + " " + e.dump));
4351
- else if (l === "[object String]")
4352
- e.tag !== "?" && so(e, e.dump, n, o, s);
4353
- else {
4354
- if (l === "[object Undefined]")
4355
- return !1;
4356
- if (e.skipInvalid) return !1;
4357
- throw new K("unacceptable kind of an object to dump " + l);
4358
- }
4359
- e.tag !== null && e.tag !== "?" && (u = encodeURI(
4360
- e.tag[0] === "!" ? e.tag.slice(1) : e.tag
4361
- ).replace(/!/g, "%21"), e.tag[0] === "!" ? u = "!" + u : u.slice(0, 18) === "tag:yaml.org,2002:" ? u = "!!" + u.slice(18) : u = "!<" + u + ">", e.dump = u + " " + e.dump);
4362
- }
4363
- return !0;
4364
- }
4365
- function yo(e, n) {
4366
- var t = [], r = [], a, o;
4367
- for (dn(e, t, r), a = 0, o = r.length; a < o; a += 1)
4368
- n.duplicates.push(t[r[a]]);
4369
- n.usedDuplicates = new Array(o);
4370
- }
4371
- function dn(e, n, t) {
4372
- var r, a, o;
4373
- if (e !== null && typeof e == "object")
4374
- if (a = n.indexOf(e), a !== -1)
4375
- t.indexOf(a) === -1 && t.push(a);
4376
- else if (n.push(e), Array.isArray(e))
4377
- for (a = 0, o = e.length; a < o; a += 1)
4378
- dn(e[a], n, t);
4379
- else
4380
- for (r = Object.keys(e), a = 0, o = r.length; a < o; a += 1)
4381
- dn(e[r[a]], n, t);
4382
- }
4383
- function ho(e, n) {
4384
- n = n || {};
4385
- var t = new ro(n);
4386
- t.noRefs || yo(e, t);
4387
- var r = e;
4388
- return t.replacer && (r = t.replacer.call({ "": r }, "", r)), ce(t, 0, r, !0, !0) ? t.dump + `
4389
- ` : "";
4390
- }
4391
- var mo = ho, bo = {
4392
- dump: mo
4393
- };
4394
- function xn(e, n) {
4395
- return function() {
4396
- throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
4397
- };
4398
- }
4399
- var vo = z, xo = it, wo = ut, Ao = gt, ko = yt, Eo = hn, So = Rt.load, _o = Rt.loadAll, Fo = bo.dump, Co = K, To = {
4400
- binary: xt,
4401
- float: dt,
4402
- map: st,
4403
- null: ct,
4404
- pairs: At,
4405
- set: kt,
4406
- timestamp: bt,
4407
- bool: pt,
4408
- int: ft,
4409
- merge: vt,
4410
- omap: wt,
4411
- seq: lt,
4412
- str: ot
4413
- }, Io = xn("safeLoad", "load"), Oo = xn("safeLoadAll", "loadAll"), Lo = xn("safeDump", "dump"), Ro = {
4414
- Type: vo,
4415
- Schema: xo,
4416
- FAILSAFE_SCHEMA: wo,
4417
- JSON_SCHEMA: Ao,
4418
- CORE_SCHEMA: ko,
4419
- DEFAULT_SCHEMA: Eo,
4420
- load: So,
4421
- loadAll: _o,
4422
- dump: Fo,
4423
- YAMLException: Co,
4424
- types: To,
4425
- safeLoad: Io,
4426
- safeLoadAll: Oo,
4427
- safeDump: Lo
4428
- };
4429
- h.languages.yaml || (h.languages.yaml = {
4430
- scalar: {
4431
- pattern: /([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/,
4432
- lookbehind: !0,
4433
- alias: "string"
4434
- },
4435
- comment: /#.*/,
4436
- key: {
4437
- pattern: /(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,
4438
- lookbehind: !0,
4439
- alias: "atrule"
4440
- },
4441
- directive: {
4442
- pattern: /(^[ \t]*)%.+/m,
4443
- lookbehind: !0,
4444
- alias: "tag"
4445
- },
4446
- datetime: {
4447
- pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\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*)?)?)(?=[ \t]*(?:$|,|\]|\}))/m,
4448
- lookbehind: !0,
4449
- alias: "number"
4450
- },
4451
- boolean: {
4452
- pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:false|true)(?=[ \t]*(?:$|,|\]|\}|[\r\n]))/im,
4453
- lookbehind: !0,
4454
- alias: "boolean"
4455
- },
4456
- null: {
4457
- pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)(?=[ \t]*(?:$|,|\]|\}|[\r\n]))/im,
4458
- lookbehind: !0,
4459
- alias: "constant"
4460
- },
4461
- string: {
4462
- pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/m,
4463
- lookbehind: !0,
4464
- greedy: !0
4465
- },
4466
- number: {
4467
- pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)(?=[ \t]*(?:$|,|\]|\}|[\r\n]))/im,
4468
- lookbehind: !0
4469
- },
4470
- tag: /![^\s]+/,
4471
- anchor: /[&*][\w]+/,
4472
- punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
4473
- });
4474
- function Bo({
4475
- value: e,
4476
- onChange: n,
4477
- onValidationChange: t,
4478
- readOnly: r = !1,
4479
- minHeight: a = 100,
4480
- maxHeight: o,
4481
- debounceMs: i = 500,
4482
- className: l = "",
4483
- style: s = {},
4484
- language: u = "yaml"
4485
- }) {
4486
- const [g, f] = Sn(null), m = Ne(null), v = Ne(t), c = Ne(!1);
4487
- v.current = t;
4488
- const p = ye((_) => {
4489
- if (!_.trim()) return null;
4490
- if (u === "json")
4491
- try {
4492
- return JSON.parse(_), null;
4493
- } catch (O) {
4494
- const T = (O == null ? void 0 : O.message) || "Invalid JSON", $ = /position\s+(\d+)/i.exec(T);
4495
- let Y = 1;
4496
- if ($) {
4497
- const F = Math.min(parseInt($[1], 10), _.length);
4498
- Y = 1;
4499
- for (let R = 0; R < F; R++)
4500
- _.charCodeAt(R) === 10 && Y++;
4501
- } else {
4502
- const F = /line\s+(\d+)/i.exec(T);
4503
- F && (Y = parseInt(F[1], 10) || 1);
4504
- }
4505
- return { line: Y, message: T };
4506
- }
4507
- try {
4508
- return Ro.load(_), null;
4509
- } catch (O) {
4510
- const T = O.mark;
4511
- return {
4512
- line: (T == null ? void 0 : T.line) !== void 0 ? T.line + 1 : 1,
4513
- message: O.message || "Invalid YAML"
4514
- };
4515
- }
4516
- }, [u]), d = ye((_) => {
4517
- var O;
4518
- f(_), (O = v.current) == null || O.call(v, !_, _ == null ? void 0 : _.message);
4519
- }, []), b = ye(
4520
- (_) => {
4521
- r || (c.current = !0, m.current && clearTimeout(m.current), m.current = setTimeout(() => {
4522
- d(p(_)), m.current = null;
4523
- }, i), n(_));
4524
- },
4525
- [n, p, d, i, r]
4526
- );
4527
- nn(() => () => {
4528
- m.current && clearTimeout(m.current);
4529
- }, []), nn(() => {
4530
- if (c.current) {
4531
- c.current = !1;
4532
- return;
4533
- }
4534
- m.current && (clearTimeout(m.current), m.current = null), d(p(e));
4535
- }, [e, p, d]);
4536
- const y = ln(() => e.split(`
4537
- `).length, [e]), w = ln(() => Array.from({ length: y }, (_, O) => O + 1).join(`
4538
- `), [y]), [E, k] = Sn(!1);
4539
- nn(() => {
4540
- const _ = () => {
4541
- const T = getComputedStyle(document.documentElement).getPropertyValue("--nc-bg").trim();
4542
- k(T.startsWith("#0") || T.startsWith("#1") || T.startsWith("#2") || T.startsWith("#3"));
4543
- };
4544
- _();
4545
- const O = new MutationObserver(_);
4546
- return O.observe(document.documentElement, { attributes: !0, attributeFilter: ["class", "data-theme"] }), () => O.disconnect();
4547
- }, []);
4548
- const N = E ? sn.vsDark : sn.vsLight, L = ye(
4549
- (_) => {
4550
- const O = _[0];
4551
- return O === "boolean" ? { color: E ? "#569cd6" : "#0000ff" } : O === "constant" || O === "null" ? { color: E ? "#569cd6" : "#0000ff" } : {};
4552
- },
4553
- [E]
4554
- ), M = ye(
4555
- (_) => /* @__PURE__ */ ge(fa, { theme: N, code: _, language: u, children: ({ tokens: O, getLineProps: T, getTokenProps: $ }) => /* @__PURE__ */ ge(Zt, { children: O.map((Y, F) => {
4556
- const R = F + 1, be = (g == null ? void 0 : g.line) === R;
4557
- return /* @__PURE__ */ ge(
4558
- "div",
4559
- {
4560
- ...T({ line: Y }),
4561
- style: {
4562
- background: be ? "color-mix(in srgb, var(--nc-danger) 15%, transparent)" : void 0,
4563
- textDecoration: be ? "underline wavy var(--nc-danger)" : void 0
4564
- },
4565
- children: Y.map((V, le) => {
4566
- const ne = $({ token: V }), te = L(V.types);
4567
- return /* @__PURE__ */ ge(
4568
- "span",
4569
- {
4570
- ...ne,
4571
- style: {
4572
- ...ne.style,
4573
- ...te,
4574
- opacity: r ? 0.7 : void 0
4575
- }
4576
- },
4577
- le
4578
- );
4579
- })
4580
- },
4581
- F
4582
- );
4583
- }) }) }),
4584
- [g, N, L, u, r]
4585
- ), D = Ne(null), W = Ne(null), q = () => {
4586
- D.current && W.current && (W.current.scrollTop = D.current.scrollTop);
4587
- };
4588
- return /* @__PURE__ */ en(
4589
- "div",
4590
- {
4591
- className: `nc-yaml-textarea ${l}`.trim(),
4592
- style: { display: "flex", flexDirection: "column", gap: 4, ...s },
4593
- children: [
4594
- /* @__PURE__ */ ge("style", { children: `
4595
- .yaml-editor-container,
4596
- .yaml-editor-container * {
4597
- white-space: pre !important;
4598
- overflow-wrap: normal !important;
4599
- word-wrap: normal !important;
4600
- word-break: keep-all !important;
4601
- }
4602
- .yaml-editor-container textarea,
4603
- .yaml-editor-container pre {
4604
- white-space: pre !important;
4605
- overflow-wrap: normal !important;
4606
- word-wrap: normal !important;
4607
- word-break: keep-all !important;
4608
- overflow-x: visible !important;
4609
- resize: none !important;
4610
- }
4611
- .yaml-editor-container.read-only textarea {
4612
- caret-color: transparent !important;
4613
- color: var(--nc-text-weak) !important;
4614
- }
4615
- ` }),
4616
- /* @__PURE__ */ en(
4617
- "div",
4618
- {
4619
- className: `nc-yaml-textarea-container${g ? " error" : ""}`,
4620
- style: {
4621
- border: `1px solid ${g ? "var(--nc-danger)" : "var(--nc-border)"}`,
4622
- background: r ? "var(--nc-bg-secondary)" : "var(--nc-bg-tertiary)",
4623
- minHeight: a,
4624
- maxHeight: o
4625
- },
4626
- children: [
4627
- /* @__PURE__ */ ge(
4628
- "div",
4629
- {
4630
- ref: W,
4631
- style: {
4632
- padding: "10px 8px",
4633
- paddingRight: 12,
4634
- background: "var(--nc-bg-tertiary)",
4635
- borderRight: "1px solid var(--nc-border)",
4636
- color: "var(--nc-text-weak)",
4637
- fontFamily: 'Consolas, Monaco, "Courier New", monospace',
4638
- fontSize: 13,
4639
- lineHeight: "1.5",
4640
- textAlign: "right",
4641
- userSelect: "none",
4642
- whiteSpace: "pre",
4643
- minWidth: 40,
4644
- overflow: "hidden"
4645
- },
4646
- children: w
4647
- }
4648
- ),
4649
- /* @__PURE__ */ ge(
4650
- "div",
4651
- {
4652
- ref: D,
4653
- className: `yaml-editor-container${r ? " read-only" : ""}`,
4654
- style: {
4655
- flex: 1,
4656
- overflowX: "auto",
4657
- overflowY: "auto",
4658
- color: "var(--nc-text)"
4659
- },
4660
- onScroll: q,
4661
- children: /* @__PURE__ */ ge(
4662
- sr,
4663
- {
4664
- value: e,
4665
- onValueChange: b,
4666
- highlight: M,
4667
- padding: 10,
4668
- readOnly: r,
4669
- style: {
4670
- fontFamily: 'Consolas, Monaco, "Courier New", monospace',
4671
- fontSize: 13,
4672
- lineHeight: "1.5",
4673
- minHeight: Math.max(a - 2, 0),
4674
- background: "transparent",
4675
- color: "var(--nc-text)",
4676
- whiteSpace: "pre",
4677
- minWidth: "max-content"
4678
- },
4679
- textareaClassName: "yaml-editor-textarea"
4680
- }
4681
- )
4682
- }
4683
- )
4684
- ]
4685
- }
4686
- ),
4687
- g && /* @__PURE__ */ en(
4688
- "div",
4689
- {
4690
- style: {
4691
- color: "var(--nc-danger)",
4692
- fontSize: 12,
4693
- padding: "4px 8px",
4694
- background: "color-mix(in srgb, var(--nc-danger) 10%, transparent)",
4695
- borderRadius: 4
4696
- },
4697
- children: [
4698
- "Line ",
4699
- g.line,
4700
- ": ",
4701
- g.message
4702
- ]
4703
- }
4704
- )
4705
- ]
4706
- }
4707
- );
4708
- }
4709
- export {
4710
- Bo as Y,
4711
- Qn as c
4712
- };
4713
- //# sourceMappingURL=YamlTextArea-ee1d1TLc.js.map