@covalent/components 6.3.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-ribbon.js +6 -6
- package/action-ribbon.mjs +23 -24
- package/alert.js +4 -4
- package/alert.mjs +27 -28
- package/app-shell.js +4 -4
- package/app-shell.mjs +10 -10
- package/{base-element-d5abe37a.js → base-element-58a3f9ea.js} +1 -1
- package/{base-element-c3dc926e.mjs → base-element-67ae173f.mjs} +2 -2
- package/button.js +4 -4
- package/button.mjs +13 -13
- package/card.js +8 -8
- package/card.mjs +4 -4
- package/check-list-item.js +3 -3
- package/check-list-item.mjs +16 -16
- package/checkbox.js +1 -1
- package/checkbox.mjs +15 -15
- package/circular-progress.js +7 -7
- package/circular-progress.mjs +6 -6
- package/class-map-4b94b017.mjs +62 -0
- package/class-map-b5efe8da.js +9 -0
- package/code-snippet.js +9 -9
- package/code-snippet.mjs +1276 -1213
- package/{dialog-8ee07177.js → dialog-79036d60.js} +4 -4
- package/{dialog-85c21333.mjs → dialog-9ac44447.mjs} +39 -39
- package/dialog.js +1 -1
- package/dialog.mjs +8 -8
- package/{directive-helpers-fce8cf91.js → directive-helpers-0ce1f995.js} +2 -2
- package/{directive-helpers-725a181d.mjs → directive-helpers-e3ea6592.mjs} +3 -3
- package/drawer.js +1 -1
- package/drawer.mjs +8 -8
- package/empty-state.js +7 -7
- package/empty-state.mjs +4 -4
- package/{event-options-7bc382d8.js → event-options-3f5eb195.js} +1 -1
- package/{event-options-3937d997.mjs → event-options-78d6cf94.mjs} +1 -1
- package/{form-element-6dbd7afa.mjs → form-element-bd973124.mjs} +4 -4
- package/{form-element-d4e7bcdb.js → form-element-ead758d4.js} +2 -2
- package/{foundation-c580100a.mjs → foundation-3f556da7.mjs} +78 -28
- package/{foundation-3f55a9dc.js → foundation-62d4413d.js} +24 -3
- package/icon-button.js +5 -5
- package/icon-button.mjs +12 -12
- package/icon-check-toggle.js +5 -5
- package/icon-check-toggle.mjs +15 -15
- package/icon-radio-toggle.js +4 -4
- package/icon-radio-toggle.mjs +15 -15
- package/icon.js +1 -1
- package/icon.mjs +3 -3
- package/{if-defined-639ed018.mjs → if-defined-c367f208.mjs} +1 -1
- package/if-defined-f1c45245.js +5 -0
- package/index.js +1 -1
- package/index.mjs +120 -121
- package/linear-progress.js +6 -6
- package/linear-progress.mjs +13 -13
- package/{list-defdaa3b.js → list-05db7fed.js} +2 -2
- package/{list-d616957b.mjs → list-066f5de4.mjs} +3 -3
- package/list-expansion.js +4 -4
- package/list-expansion.mjs +25 -25
- package/{list-item-3fa66f09.js → list-item-8da7ba96.js} +3 -3
- package/{list-item-d5c05e10.mjs → list-item-ba77097d.mjs} +6 -6
- package/list-item.js +1 -1
- package/list-item.mjs +13 -13
- package/list.js +1 -1
- package/list.mjs +15 -15
- package/menu.js +1 -1
- package/menu.mjs +15 -15
- package/{mwc-checkbox-base-10e977f2.mjs → mwc-checkbox-base-3da36456.mjs} +21 -21
- package/{mwc-checkbox-base-435c1f1d.js → mwc-checkbox-base-d46c7666.js} +9 -9
- package/{mwc-checkbox.css-b7abc7fd.mjs → mwc-checkbox.css-8f4f1a9b.mjs} +1 -1
- package/{mwc-checkbox.css-956e3d6c.js → mwc-checkbox.css-b3434429.js} +1 -1
- package/{mwc-drawer-base-f44fcf34.js → mwc-drawer-base-8eecb1de.js} +6 -6
- package/{mwc-drawer-base-b2b772c3.mjs → mwc-drawer-base-fe660bdf.mjs} +10 -10
- package/{mwc-icon-b96fb867.js → mwc-icon-8c9cd0c9.js} +2 -2
- package/{mwc-icon-c7013880.mjs → mwc-icon-ba18383d.mjs} +2 -2
- package/{mwc-line-ripple-directive-a97ce725.js → mwc-line-ripple-directive-d1cf9570.js} +3 -3
- package/{mwc-line-ripple-directive-c3e1f04a.mjs → mwc-line-ripple-directive-ffce2cff.mjs} +6 -6
- package/{mwc-list-base-c0f8af1c.mjs → mwc-list-base-32d4ac31.mjs} +9 -9
- package/{mwc-list-base-7d5f7278.js → mwc-list-base-cb3500b4.js} +4 -4
- package/{mwc-list-item-base-803b9771.js → mwc-list-item-base-4a4d1e1b.js} +8 -8
- package/{mwc-list-item-base-acef0223.mjs → mwc-list-item-base-8654347d.mjs} +7 -7
- package/{mwc-list-item.css-401e2407.js → mwc-list-item.css-25adc0c4.js} +1 -1
- package/{mwc-list-item.css-b5481d96.mjs → mwc-list-item.css-b0009fc7.mjs} +1 -1
- package/{mwc-menu-base-8970b43d.mjs → mwc-menu-base-572a76b9.mjs} +11 -11
- package/{mwc-menu-base-ac49fe54.js → mwc-menu-base-f14ec544.js} +17 -17
- package/{mwc-radio-base-442d495a.js → mwc-radio-base-470b4fcc.js} +4 -4
- package/{mwc-radio-base-c29e6f42.mjs → mwc-radio-base-9446d39b.mjs} +11 -11
- package/{mwc-radio.css-388ad26d.js → mwc-radio.css-4e140252.js} +1 -1
- package/{mwc-radio.css-4694aa9c.mjs → mwc-radio.css-7454bb11.mjs} +1 -1
- package/{mwc-slider.css-336f809b.mjs → mwc-slider.css-10adbaf8.mjs} +12 -12
- package/{mwc-slider.css-48f02f1e.js → mwc-slider.css-9dd57b10.js} +11 -11
- package/{mwc-tab-base-7fb3d339.mjs → mwc-tab-base-4ba47acc.mjs} +14 -14
- package/{mwc-tab-base-1a19b299.js → mwc-tab-base-fc3ffb43.js} +13 -13
- package/{mwc-top-app-bar-base-14e0a018.js → mwc-top-app-bar-base-0304e67f.js} +8 -8
- package/{mwc-top-app-bar-base-79c87e69.mjs → mwc-top-app-bar-base-adc4168a.mjs} +22 -24
- package/nav-list-item.js +2 -2
- package/nav-list-item.mjs +13 -13
- package/package.json +1 -1
- package/{property-074570d1.js → property-57f6f6fe.js} +1 -1
- package/{property-ca27685b.mjs → property-9b6ea53b.mjs} +9 -9
- package/{query-2ba749b7.js → query-680f1868.js} +1 -1
- package/{query-assigned-elements-514e5265.mjs → query-assigned-elements-4a39219d.mjs} +153 -152
- package/query-assigned-elements-f623705d.js +31 -0
- package/{query-assigned-nodes-9ec0fa5f.js → query-assigned-nodes-99eae71d.js} +1 -1
- package/{query-assigned-nodes-bea12e0c.mjs → query-assigned-nodes-df691e78.mjs} +1 -1
- package/{query-1e7846ea.mjs → query-d843aa92.mjs} +1 -1
- package/radio-list-item.js +3 -3
- package/radio-list-item.mjs +18 -18
- package/radio.js +1 -1
- package/radio.mjs +15 -15
- package/{ripple-handlers-227497d3.mjs → ripple-handlers-321219b8.mjs} +10 -10
- package/{ripple-handlers-2176f137.js → ripple-handlers-c82b1232.js} +5 -5
- package/select.js +10 -10
- package/select.mjs +20 -20
- package/side-sheet.js +2 -2
- package/side-sheet.mjs +21 -21
- package/slider-range.js +7 -7
- package/slider-range.mjs +13 -13
- package/slider.js +3 -3
- package/slider.mjs +15 -15
- package/snackbar.js +6 -6
- package/snackbar.mjs +12 -12
- package/state-0974a8e5.js +5 -0
- package/{state-6f7e570d.mjs → state-b5e865db.mjs} +1 -1
- package/status-header-item.js +3 -3
- package/status-header-item.mjs +15 -15
- package/status-header.js +2 -2
- package/status-header.mjs +3 -3
- package/style-map-88d2563f.js +5 -0
- package/style-map-bc3ed3e0.mjs +44 -0
- package/style.css +1 -1
- package/switch.js +8 -8
- package/switch.mjs +13 -13
- package/tab-bar.js +5 -5
- package/tab-bar.mjs +16 -16
- package/tab.js +1 -1
- package/tab.mjs +12 -12
- package/text-lockup.js +4 -4
- package/text-lockup.mjs +7 -7
- package/textarea.js +4 -4
- package/textarea.mjs +26 -26
- package/{textfield-507c6a06.js → textfield-0993c163.js} +12 -12
- package/{textfield-276b0ded.mjs → textfield-2cee5a1a.mjs} +14 -14
- package/textfield.js +1 -1
- package/textfield.mjs +14 -14
- package/toolbar.js +1 -1
- package/toolbar.mjs +8 -8
- package/tooltip/tooltip.d.ts.map +1 -1
- package/tooltip.js +32 -11
- package/tooltip.mjs +611 -516
- package/{top-app-bar-34e85527.js → top-app-bar-a531c1b4.js} +1 -1
- package/{top-app-bar-a236c3bc.mjs → top-app-bar-f83386e0.mjs} +1 -1
- package/top-app-bar-fixed.js +89 -5
- package/top-app-bar-fixed.mjs +279 -37
- package/top-app-bar.js +1 -1
- package/top-app-bar.mjs +9 -9
- package/tree-list-item.js +7 -7
- package/tree-list-item.mjs +6 -6
- package/tree-list.js +2 -2
- package/tree-list.mjs +1 -1
- package/tslib.es6-e6a11c8a.js +1 -0
- package/tslib.es6-f1eaf65c.mjs +82 -0
- package/typography.js +3 -3
- package/typography.mjs +2 -2
- package/{utils-dc65fdc9.mjs → utils-2932417c.mjs} +2 -2
- package/class-map-08c84aeb.mjs +0 -62
- package/class-map-50b8edb4.js +0 -9
- package/foundation-2334d146.mjs +0 -60
- package/foundation-e830bd94.js +0 -22
- package/if-defined-cb12d481.js +0 -5
- package/query-assigned-elements-07e38f46.js +0 -33
- package/state-949232e6.js +0 -5
- package/style-map-2cb0fb63.mjs +0 -40
- package/style-map-3056a771.js +0 -5
- package/tslib.es6-6b53b818.js +0 -1
- package/tslib.es6-b5e819a6.mjs +0 -82
package/code-snippet.mjs
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
import { i as Tt, r as St, s as
|
2
|
-
import {
|
3
|
-
import { o as Rt } from "./query-assigned-nodes-
|
4
|
-
import { o as At } from "./class-map-
|
5
|
-
|
1
|
+
import { i as Tt, r as St, s as Ot, x as Ae, e as wt } from "./query-assigned-elements-4a39219d.mjs";
|
2
|
+
import { n as Se } from "./property-9b6ea53b.mjs";
|
3
|
+
import { o as Rt } from "./query-assigned-nodes-df691e78.mjs";
|
4
|
+
import { o as At } from "./class-map-4b94b017.mjs";
|
5
|
+
function Mt(n) {
|
6
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
7
|
+
}
|
8
|
+
const It = `:host{background-color:var(--mdc-theme-surface-canvas);border-radius:var(--mdc-shape-medium);display:block;position:relative;overflow:hidden}:host pre{margin:0;padding:16px 0;overflow:auto}:host pre code.hljs.cv-code-snippet{padding:0 16px;display:block;overflow-x:auto}:host .hljs{color:var(--cov-theme-code-snippet-color, #abb2bf)}:host .hljs-comment,:host .hljs-quote{color:var(--cov-theme-code-snippet-comment, #5c6370);font-style:italic}:host .hljs-doctag,:host .hljs-formula,:host .hljs-keyword{color:var(--cov-theme-code-snippet-keyword, #c678dd)}:host .hljs-deletion,:host .hljs-name,:host .hljs-section,:host .hljs-selector-tag,:host .hljs-subst{color:var(--cov-theme-code-snippet-selector, #e06c75)}:host .hljs-literal{color:var(--cov-theme-code-snippet-literal, #56b6c2)}:host .hljs-addition,:host .hljs-attribute,:host .hljs-meta .hljs-string,:host .hljs-regexp,:host .hljs-string{color:var(--cov-theme-code-snippet-string, #98c379)}:host .hljs-attr,:host .hljs-number,:host .hljs-selector-attr,:host .hljs-selector-class,:host .hljs-selector-pseudo,:host .hljs-template-variable,:host .hljs-type,:host .hljs-variable{color:var(--cov-theme-code-snippet-variable, #d19a66)}:host .hljs-bullet,:host .hljs-link,:host .hljs-meta,:host .hljs-selector-id,:host .hljs-symbol,:host .hljs-title{color:var(--cov-theme-code-snippet-title, #61aeee)}:host .hljs-built_in,:host .hljs-class .hljs-title,:host .hljs-title.class_{color:var(--cov-theme-code-snippet-class, #e6c07b)}:host .hljs-emphasis{font-style:italic}:host .hljs-strong{font-weight:700}:host .hljs-link{text-decoration:underline}:host([inline]){border-radius:0}.header{border-bottom:1px solid var(--mdc-theme-border);position:sticky;top:-8px;background-color:var(--mdc-theme-surface-canvas);display:flex;justify-content:space-between;padding:4px 8px 4px 16px;align-items:center;border-radius:var(--mdc-shape-medium) var(--mdc-shape-medium) 0 0}.title{font-family:var(--mdc-typography-subtitle2-font-family);font-size:var(--mdc-typography-subtitle2-font-size);font-weight:var(--mdc-typography-subtitle2-font-weight);line-height:var(--mdc-typography-subtitle2-line-height);padding-right:16px}
|
6
9
|
`;
|
7
|
-
|
8
|
-
function mn(n) {
|
10
|
+
function dt(n) {
|
9
11
|
return n instanceof Map ? n.clear = n.delete = n.set = function() {
|
10
12
|
throw new Error("map is read-only");
|
11
13
|
} : n instanceof Set && (n.add = n.clear = n.delete = function() {
|
12
14
|
throw new Error("set is read-only");
|
13
|
-
}), Object.freeze(n), Object.getOwnPropertyNames(n).forEach(
|
14
|
-
|
15
|
-
|
15
|
+
}), Object.freeze(n), Object.getOwnPropertyNames(n).forEach((e) => {
|
16
|
+
const t = n[e], s = typeof t;
|
17
|
+
(s === "object" || s === "function") && !Object.isFrozen(t) && dt(t);
|
16
18
|
}), n;
|
17
19
|
}
|
18
|
-
|
19
|
-
_n.exports.default = mn;
|
20
|
-
class Tn {
|
20
|
+
class yn {
|
21
21
|
/**
|
22
22
|
* @param {CompiledMode} mode
|
23
23
|
*/
|
@@ -28,10 +28,10 @@ class Tn {
|
|
28
28
|
this.isMatchIgnored = !0;
|
29
29
|
}
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function ut(n) {
|
32
32
|
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
33
33
|
}
|
34
|
-
function
|
34
|
+
function de(n, ...e) {
|
35
35
|
const t = /* @__PURE__ */ Object.create(null);
|
36
36
|
for (const s in n)
|
37
37
|
t[s] = n[s];
|
@@ -41,7 +41,9 @@ function ue(n, ...e) {
|
|
41
41
|
}), /** @type {T} */
|
42
42
|
t;
|
43
43
|
}
|
44
|
-
const
|
44
|
+
const Ct = "</span>", vn = (n) => !!n.scope, kt = (n, { prefix: e }) => {
|
45
|
+
if (n.startsWith("language:"))
|
46
|
+
return n.replace("language:", "language-");
|
45
47
|
if (n.includes(".")) {
|
46
48
|
const t = n.split(".");
|
47
49
|
return [
|
@@ -51,7 +53,7 @@ const It = "</span>", Sn = (n) => !!n.scope || n.sublanguage && n.language, Ct =
|
|
51
53
|
}
|
52
54
|
return `${e}${n}`;
|
53
55
|
};
|
54
|
-
class
|
56
|
+
class xt {
|
55
57
|
/**
|
56
58
|
* Creates a new HTMLRenderer
|
57
59
|
*
|
@@ -66,24 +68,27 @@ class kt {
|
|
66
68
|
*
|
67
69
|
* @param {string} text */
|
68
70
|
addText(e) {
|
69
|
-
this.buffer +=
|
71
|
+
this.buffer += ut(e);
|
70
72
|
}
|
71
73
|
/**
|
72
74
|
* Adds a node open to the output stream (if needed)
|
73
75
|
*
|
74
76
|
* @param {Node} node */
|
75
77
|
openNode(e) {
|
76
|
-
if (!
|
78
|
+
if (!vn(e))
|
77
79
|
return;
|
78
|
-
|
79
|
-
|
80
|
+
const t = kt(
|
81
|
+
e.scope,
|
82
|
+
{ prefix: this.classPrefix }
|
83
|
+
);
|
84
|
+
this.span(t);
|
80
85
|
}
|
81
86
|
/**
|
82
87
|
* Adds a node close to the output stream (if needed)
|
83
88
|
*
|
84
89
|
* @param {Node} node */
|
85
90
|
closeNode(e) {
|
86
|
-
|
91
|
+
vn(e) && (this.buffer += Ct);
|
87
92
|
}
|
88
93
|
/**
|
89
94
|
* returns the accumulated buffer
|
@@ -100,13 +105,13 @@ class kt {
|
|
100
105
|
this.buffer += `<span class="${e}">`;
|
101
106
|
}
|
102
107
|
}
|
103
|
-
const
|
108
|
+
const Tn = (n = {}) => {
|
104
109
|
const e = { children: [] };
|
105
110
|
return Object.assign(e, n), e;
|
106
111
|
};
|
107
|
-
class
|
112
|
+
class mn {
|
108
113
|
constructor() {
|
109
|
-
this.rootNode =
|
114
|
+
this.rootNode = Tn(), this.stack = [this.rootNode];
|
110
115
|
}
|
111
116
|
get top() {
|
112
117
|
return this.stack[this.stack.length - 1];
|
@@ -120,7 +125,7 @@ class En {
|
|
120
125
|
}
|
121
126
|
/** @param {string} scope */
|
122
127
|
openNode(e) {
|
123
|
-
const t =
|
128
|
+
const t = Tn({ scope: e });
|
124
129
|
this.add(t), this.stack.push(t);
|
125
130
|
}
|
126
131
|
closeNode() {
|
@@ -153,83 +158,83 @@ class En {
|
|
153
158
|
*/
|
154
159
|
static _collapse(e) {
|
155
160
|
typeof e != "string" && e.children && (e.children.every((t) => typeof t == "string") ? e.children = [e.children.join("")] : e.children.forEach((t) => {
|
156
|
-
|
161
|
+
mn._collapse(t);
|
157
162
|
}));
|
158
163
|
}
|
159
164
|
}
|
160
|
-
class
|
165
|
+
class Dt extends mn {
|
161
166
|
/**
|
162
167
|
* @param {*} options
|
163
168
|
*/
|
164
169
|
constructor(e) {
|
165
170
|
super(), this.options = e;
|
166
171
|
}
|
167
|
-
/**
|
168
|
-
* @param {string} text
|
169
|
-
* @param {string} scope
|
170
|
-
*/
|
171
|
-
addKeyword(e, t) {
|
172
|
-
e !== "" && (this.openNode(t), this.addText(e), this.closeNode());
|
173
|
-
}
|
174
172
|
/**
|
175
173
|
* @param {string} text
|
176
174
|
*/
|
177
175
|
addText(e) {
|
178
176
|
e !== "" && this.add(e);
|
179
177
|
}
|
178
|
+
/** @param {string} scope */
|
179
|
+
startScope(e) {
|
180
|
+
this.openNode(e);
|
181
|
+
}
|
182
|
+
endScope() {
|
183
|
+
this.closeNode();
|
184
|
+
}
|
180
185
|
/**
|
181
186
|
* @param {Emitter & {root: DataNode}} emitter
|
182
187
|
* @param {string} name
|
183
188
|
*/
|
184
|
-
|
189
|
+
__addSublanguage(e, t) {
|
185
190
|
const s = e.root;
|
186
|
-
|
191
|
+
t && (s.scope = `language:${t}`), this.add(s);
|
187
192
|
}
|
188
193
|
toHTML() {
|
189
|
-
return new
|
194
|
+
return new xt(this, this.options).value();
|
190
195
|
}
|
191
196
|
finalize() {
|
192
|
-
return !0;
|
197
|
+
return this.closeAllNodes(), !0;
|
193
198
|
}
|
194
199
|
}
|
195
|
-
function
|
200
|
+
function ve(n) {
|
196
201
|
return n ? typeof n == "string" ? n : n.source : null;
|
197
202
|
}
|
198
|
-
function
|
203
|
+
function gt(n) {
|
199
204
|
return be("(?=", n, ")");
|
200
205
|
}
|
201
|
-
function
|
206
|
+
function Lt(n) {
|
202
207
|
return be("(?:", n, ")*");
|
203
208
|
}
|
204
|
-
function
|
209
|
+
function Bt(n) {
|
205
210
|
return be("(?:", n, ")?");
|
206
211
|
}
|
207
212
|
function be(...n) {
|
208
|
-
return n.map((t) =>
|
213
|
+
return n.map((t) => ve(t)).join("");
|
209
214
|
}
|
210
|
-
function
|
215
|
+
function Ut(n) {
|
211
216
|
const e = n[n.length - 1];
|
212
217
|
return typeof e == "object" && e.constructor === Object ? (n.splice(n.length - 1, 1), e) : {};
|
213
218
|
}
|
214
|
-
function
|
215
|
-
return "(" + (
|
219
|
+
function En(...n) {
|
220
|
+
return "(" + (Ut(n).capture ? "" : "?:") + n.map((s) => ve(s)).join("|") + ")";
|
216
221
|
}
|
217
|
-
function
|
222
|
+
function bt(n) {
|
218
223
|
return new RegExp(n.toString() + "|").exec("").length - 1;
|
219
224
|
}
|
220
|
-
function
|
225
|
+
function Pt(n, e) {
|
221
226
|
const t = n && n.exec(e);
|
222
227
|
return t && t.index === 0;
|
223
228
|
}
|
224
|
-
const
|
225
|
-
function
|
229
|
+
const Ft = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
230
|
+
function fn(n, { joinWith: e }) {
|
226
231
|
let t = 0;
|
227
232
|
return n.map((s) => {
|
228
233
|
t += 1;
|
229
234
|
const c = t;
|
230
|
-
let o =
|
235
|
+
let o = ve(s), a = "";
|
231
236
|
for (; o.length > 0; ) {
|
232
|
-
const r =
|
237
|
+
const r = Ft.exec(o);
|
233
238
|
if (!r) {
|
234
239
|
a += o;
|
235
240
|
break;
|
@@ -239,14 +244,14 @@ function hn(n, { joinWith: e }) {
|
|
239
244
|
return a;
|
240
245
|
}).map((s) => `(${s})`).join(e);
|
241
246
|
}
|
242
|
-
const
|
247
|
+
const $t = /\b\B/, pt = "[a-zA-Z]\\w*", hn = "[a-zA-Z_]\\w*", _t = "\\b\\d+(\\.\\d+)?", mt = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Et = "\\b(0b[01]+)", zt = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Kt = (n = {}) => {
|
243
248
|
const e = /^#![ ]*\//;
|
244
249
|
return n.binary && (n.begin = be(
|
245
250
|
e,
|
246
251
|
/.*\b/,
|
247
252
|
n.binary,
|
248
253
|
/\b.*/
|
249
|
-
)),
|
254
|
+
)), de({
|
250
255
|
scope: "meta",
|
251
256
|
begin: e,
|
252
257
|
end: /$/,
|
@@ -256,25 +261,25 @@ const Ft = /\b\B/, _t = "[a-zA-Z]\\w*", Nn = "[a-zA-Z_]\\w*", mt = "\\b\\d+(\\.\
|
|
256
261
|
t.index !== 0 && s.ignoreMatch();
|
257
262
|
}
|
258
263
|
}, n);
|
259
|
-
},
|
264
|
+
}, Te = {
|
260
265
|
begin: "\\\\[\\s\\S]",
|
261
266
|
relevance: 0
|
262
|
-
},
|
267
|
+
}, qt = {
|
263
268
|
scope: "string",
|
264
269
|
begin: "'",
|
265
270
|
end: "'",
|
266
271
|
illegal: "\\n",
|
267
|
-
contains: [
|
268
|
-
},
|
272
|
+
contains: [Te]
|
273
|
+
}, Ht = {
|
269
274
|
scope: "string",
|
270
275
|
begin: '"',
|
271
276
|
end: '"',
|
272
277
|
illegal: "\\n",
|
273
|
-
contains: [
|
278
|
+
contains: [Te]
|
274
279
|
}, Gt = {
|
275
280
|
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
276
|
-
},
|
277
|
-
const s =
|
281
|
+
}, Ce = function(n, e, t = {}) {
|
282
|
+
const s = de(
|
278
283
|
{
|
279
284
|
scope: "comment",
|
280
285
|
begin: n,
|
@@ -292,7 +297,7 @@ const Ft = /\b\B/, _t = "[a-zA-Z]\\w*", Nn = "[a-zA-Z_]\\w*", mt = "\\b\\d+(\\.\
|
|
292
297
|
excludeBegin: !0,
|
293
298
|
relevance: 0
|
294
299
|
});
|
295
|
-
const c =
|
300
|
+
const c = En(
|
296
301
|
// list of common 1 and 2 letter words in English
|
297
302
|
"I",
|
298
303
|
"a",
|
@@ -339,19 +344,19 @@ const Ft = /\b\B/, _t = "[a-zA-Z]\\w*", Nn = "[a-zA-Z_]\\w*", mt = "\\b\\d+(\\.\
|
|
339
344
|
// look for 3 words in a row
|
340
345
|
}
|
341
346
|
), s;
|
342
|
-
},
|
343
|
-
scope: "number",
|
344
|
-
begin: mt,
|
345
|
-
relevance: 0
|
346
|
-
}, Vt = {
|
347
|
+
}, Wt = Ce("//", "$"), Yt = Ce("/\\*", "\\*/"), Zt = Ce("#", "$"), Vt = {
|
347
348
|
scope: "number",
|
348
|
-
begin:
|
349
|
+
begin: _t,
|
349
350
|
relevance: 0
|
350
351
|
}, Xt = {
|
351
352
|
scope: "number",
|
352
|
-
begin:
|
353
|
+
begin: mt,
|
353
354
|
relevance: 0
|
354
355
|
}, Qt = {
|
356
|
+
scope: "number",
|
357
|
+
begin: Et,
|
358
|
+
relevance: 0
|
359
|
+
}, Jt = {
|
355
360
|
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
356
361
|
// an expression such as:
|
357
362
|
//
|
@@ -365,28 +370,28 @@ const Ft = /\b\B/, _t = "[a-zA-Z]\\w*", Nn = "[a-zA-Z_]\\w*", mt = "\\b\\d+(\\.\
|
|
365
370
|
end: /\/[gimuy]*/,
|
366
371
|
illegal: /\n/,
|
367
372
|
contains: [
|
368
|
-
|
373
|
+
Te,
|
369
374
|
{
|
370
375
|
begin: /\[/,
|
371
376
|
end: /\]/,
|
372
377
|
relevance: 0,
|
373
|
-
contains: [
|
378
|
+
contains: [Te]
|
374
379
|
}
|
375
380
|
]
|
376
381
|
}]
|
377
|
-
}, Jt = {
|
378
|
-
scope: "title",
|
379
|
-
begin: _t,
|
380
|
-
relevance: 0
|
381
382
|
}, jt = {
|
382
383
|
scope: "title",
|
383
|
-
begin:
|
384
|
+
begin: pt,
|
384
385
|
relevance: 0
|
385
386
|
}, er = {
|
387
|
+
scope: "title",
|
388
|
+
begin: hn,
|
389
|
+
relevance: 0
|
390
|
+
}, nr = {
|
386
391
|
// excludes method names from keyword processing
|
387
|
-
begin: "\\.\\s*" +
|
392
|
+
begin: "\\.\\s*" + hn,
|
388
393
|
relevance: 0
|
389
|
-
},
|
394
|
+
}, tr = function(n) {
|
390
395
|
return Object.assign(
|
391
396
|
n,
|
392
397
|
{
|
@@ -401,56 +406,56 @@ const Ft = /\b\B/, _t = "[a-zA-Z]\\w*", Nn = "[a-zA-Z_]\\w*", mt = "\\b\\d+(\\.\
|
|
401
406
|
}
|
402
407
|
);
|
403
408
|
};
|
404
|
-
var
|
409
|
+
var Me = /* @__PURE__ */ Object.freeze({
|
405
410
|
__proto__: null,
|
406
|
-
MATCH_NOTHING_RE:
|
407
|
-
IDENT_RE:
|
408
|
-
UNDERSCORE_IDENT_RE:
|
409
|
-
NUMBER_RE:
|
410
|
-
C_NUMBER_RE:
|
411
|
-
BINARY_NUMBER_RE:
|
412
|
-
RE_STARTERS_RE:
|
413
|
-
SHEBANG:
|
414
|
-
BACKSLASH_ESCAPE:
|
415
|
-
APOS_STRING_MODE:
|
416
|
-
QUOTE_STRING_MODE:
|
411
|
+
MATCH_NOTHING_RE: $t,
|
412
|
+
IDENT_RE: pt,
|
413
|
+
UNDERSCORE_IDENT_RE: hn,
|
414
|
+
NUMBER_RE: _t,
|
415
|
+
C_NUMBER_RE: mt,
|
416
|
+
BINARY_NUMBER_RE: Et,
|
417
|
+
RE_STARTERS_RE: zt,
|
418
|
+
SHEBANG: Kt,
|
419
|
+
BACKSLASH_ESCAPE: Te,
|
420
|
+
APOS_STRING_MODE: qt,
|
421
|
+
QUOTE_STRING_MODE: Ht,
|
417
422
|
PHRASAL_WORDS_MODE: Gt,
|
418
|
-
COMMENT:
|
419
|
-
C_LINE_COMMENT_MODE:
|
420
|
-
C_BLOCK_COMMENT_MODE:
|
421
|
-
HASH_COMMENT_MODE:
|
422
|
-
NUMBER_MODE:
|
423
|
-
C_NUMBER_MODE:
|
424
|
-
BINARY_NUMBER_MODE:
|
425
|
-
REGEXP_MODE:
|
426
|
-
TITLE_MODE:
|
427
|
-
UNDERSCORE_TITLE_MODE:
|
428
|
-
METHOD_GUARD:
|
429
|
-
END_SAME_AS_BEGIN:
|
423
|
+
COMMENT: Ce,
|
424
|
+
C_LINE_COMMENT_MODE: Wt,
|
425
|
+
C_BLOCK_COMMENT_MODE: Yt,
|
426
|
+
HASH_COMMENT_MODE: Zt,
|
427
|
+
NUMBER_MODE: Vt,
|
428
|
+
C_NUMBER_MODE: Xt,
|
429
|
+
BINARY_NUMBER_MODE: Qt,
|
430
|
+
REGEXP_MODE: Jt,
|
431
|
+
TITLE_MODE: jt,
|
432
|
+
UNDERSCORE_TITLE_MODE: er,
|
433
|
+
METHOD_GUARD: nr,
|
434
|
+
END_SAME_AS_BEGIN: tr
|
430
435
|
});
|
431
|
-
function tr(n, e) {
|
432
|
-
n.input[n.index - 1] === "." && e.ignoreMatch();
|
433
|
-
}
|
434
436
|
function rr(n, e) {
|
435
|
-
n.
|
437
|
+
n.input[n.index - 1] === "." && e.ignoreMatch();
|
436
438
|
}
|
437
439
|
function ar(n, e) {
|
438
|
-
|
440
|
+
n.className !== void 0 && (n.scope = n.className, delete n.className);
|
439
441
|
}
|
440
442
|
function ir(n, e) {
|
441
|
-
|
443
|
+
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin = rr, n.keywords = n.keywords || n.beginKeywords, delete n.beginKeywords, n.relevance === void 0 && (n.relevance = 0));
|
442
444
|
}
|
443
445
|
function sr(n, e) {
|
446
|
+
Array.isArray(n.illegal) && (n.illegal = En(...n.illegal));
|
447
|
+
}
|
448
|
+
function or(n, e) {
|
444
449
|
if (n.match) {
|
445
450
|
if (n.begin || n.end)
|
446
451
|
throw new Error("begin & end are not supported with match");
|
447
452
|
n.begin = n.match, delete n.match;
|
448
453
|
}
|
449
454
|
}
|
450
|
-
function
|
455
|
+
function cr(n, e) {
|
451
456
|
n.relevance === void 0 && (n.relevance = 1);
|
452
457
|
}
|
453
|
-
const
|
458
|
+
const lr = (n, e) => {
|
454
459
|
if (!n.beforeMatch)
|
455
460
|
return;
|
456
461
|
if (n.starts)
|
@@ -458,13 +463,13 @@ const cr = (n, e) => {
|
|
458
463
|
const t = Object.assign({}, n);
|
459
464
|
Object.keys(n).forEach((s) => {
|
460
465
|
delete n[s];
|
461
|
-
}), n.keywords = t.keywords, n.begin = be(t.beforeMatch,
|
466
|
+
}), n.keywords = t.keywords, n.begin = be(t.beforeMatch, gt(t.begin)), n.starts = {
|
462
467
|
relevance: 0,
|
463
468
|
contains: [
|
464
469
|
Object.assign(t, { endsParent: !0 })
|
465
470
|
]
|
466
471
|
}, n.relevance = 0, delete t.beforeMatch;
|
467
|
-
},
|
472
|
+
}, dr = [
|
468
473
|
"of",
|
469
474
|
"and",
|
470
475
|
"for",
|
@@ -479,70 +484,70 @@ const cr = (n, e) => {
|
|
479
484
|
// common variable name
|
480
485
|
"value"
|
481
486
|
// common variable name
|
482
|
-
],
|
483
|
-
function
|
487
|
+
], ur = "keyword";
|
488
|
+
function ft(n, e, t = ur) {
|
484
489
|
const s = /* @__PURE__ */ Object.create(null);
|
485
490
|
return typeof n == "string" ? c(t, n.split(" ")) : Array.isArray(n) ? c(t, n) : Object.keys(n).forEach(function(o) {
|
486
491
|
Object.assign(
|
487
492
|
s,
|
488
|
-
|
493
|
+
ft(n[o], e, o)
|
489
494
|
);
|
490
495
|
}), s;
|
491
496
|
function c(o, a) {
|
492
497
|
e && (a = a.map((r) => r.toLowerCase())), a.forEach(function(r) {
|
493
498
|
const i = r.split("|");
|
494
|
-
s[i[0]] = [o,
|
499
|
+
s[i[0]] = [o, gr(i[0], i[1])];
|
495
500
|
});
|
496
501
|
}
|
497
502
|
}
|
498
|
-
function
|
499
|
-
return e ? Number(e) :
|
503
|
+
function gr(n, e) {
|
504
|
+
return e ? Number(e) : br(n) ? 0 : 1;
|
500
505
|
}
|
501
|
-
function
|
502
|
-
return
|
506
|
+
function br(n) {
|
507
|
+
return dr.includes(n.toLowerCase());
|
503
508
|
}
|
504
|
-
const
|
509
|
+
const Sn = {}, ge = (n) => {
|
505
510
|
console.error(n);
|
506
|
-
},
|
511
|
+
}, On = (n, ...e) => {
|
507
512
|
console.log(`WARN: ${n}`, ...e);
|
508
|
-
},
|
509
|
-
|
510
|
-
},
|
511
|
-
function
|
513
|
+
}, fe = (n, e) => {
|
514
|
+
Sn[`${n}/${e}`] || (console.log(`Deprecated as of ${n}. ${e}`), Sn[`${n}/${e}`] = !0);
|
515
|
+
}, Ie = new Error();
|
516
|
+
function ht(n, e, { key: t }) {
|
512
517
|
let s = 0;
|
513
518
|
const c = n[t], o = {}, a = {};
|
514
519
|
for (let r = 1; r <= e.length; r++)
|
515
|
-
a[r + s] = c[r], o[r + s] = !0, s +=
|
520
|
+
a[r + s] = c[r], o[r + s] = !0, s += bt(e[r - 1]);
|
516
521
|
n[t] = a, n[t]._emit = o, n[t]._multi = !0;
|
517
522
|
}
|
518
|
-
function
|
523
|
+
function pr(n) {
|
519
524
|
if (Array.isArray(n.begin)) {
|
520
525
|
if (n.skip || n.excludeBegin || n.returnBegin)
|
521
|
-
throw ge("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
|
526
|
+
throw ge("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Ie;
|
522
527
|
if (typeof n.beginScope != "object" || n.beginScope === null)
|
523
|
-
throw ge("beginScope must be object"),
|
524
|
-
|
528
|
+
throw ge("beginScope must be object"), Ie;
|
529
|
+
ht(n, n.begin, { key: "beginScope" }), n.begin = fn(n.begin, { joinWith: "" });
|
525
530
|
}
|
526
531
|
}
|
527
|
-
function
|
532
|
+
function _r(n) {
|
528
533
|
if (Array.isArray(n.end)) {
|
529
534
|
if (n.skip || n.excludeEnd || n.returnEnd)
|
530
|
-
throw ge("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
|
535
|
+
throw ge("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Ie;
|
531
536
|
if (typeof n.endScope != "object" || n.endScope === null)
|
532
|
-
throw ge("endScope must be object"),
|
533
|
-
|
537
|
+
throw ge("endScope must be object"), Ie;
|
538
|
+
ht(n, n.end, { key: "endScope" }), n.end = fn(n.end, { joinWith: "" });
|
534
539
|
}
|
535
540
|
}
|
536
|
-
function _r(n) {
|
537
|
-
n.scope && typeof n.scope == "object" && n.scope !== null && (n.beginScope = n.scope, delete n.scope);
|
538
|
-
}
|
539
541
|
function mr(n) {
|
540
|
-
|
542
|
+
n.scope && typeof n.scope == "object" && n.scope !== null && (n.beginScope = n.scope, delete n.scope);
|
541
543
|
}
|
542
544
|
function Er(n) {
|
545
|
+
mr(n), typeof n.beginScope == "string" && (n.beginScope = { _wrap: n.beginScope }), typeof n.endScope == "string" && (n.endScope = { _wrap: n.endScope }), pr(n), _r(n);
|
546
|
+
}
|
547
|
+
function fr(n) {
|
543
548
|
function e(a, r) {
|
544
549
|
return new RegExp(
|
545
|
-
|
550
|
+
ve(a),
|
546
551
|
"m" + (n.case_insensitive ? "i" : "") + (n.unicodeRegex ? "u" : "") + (r ? "g" : "")
|
547
552
|
);
|
548
553
|
}
|
@@ -552,12 +557,12 @@ function Er(n) {
|
|
552
557
|
}
|
553
558
|
// @ts-ignore
|
554
559
|
addRule(r, i) {
|
555
|
-
i.position = this.position++, this.matchIndexes[this.matchAt] = i, this.regexes.push([i, r]), this.matchAt +=
|
560
|
+
i.position = this.position++, this.matchIndexes[this.matchAt] = i, this.regexes.push([i, r]), this.matchAt += bt(r) + 1;
|
556
561
|
}
|
557
562
|
compile() {
|
558
563
|
this.regexes.length === 0 && (this.exec = () => null);
|
559
564
|
const r = this.regexes.map((i) => i[1]);
|
560
|
-
this.matcherRe = e(
|
565
|
+
this.matcherRe = e(fn(r, { joinWith: "|" }), !0), this.lastIndex = 0;
|
561
566
|
}
|
562
567
|
/** @param {string} s */
|
563
568
|
exec(r) {
|
@@ -565,7 +570,7 @@ function Er(n) {
|
|
565
570
|
const i = this.matcherRe.exec(r);
|
566
571
|
if (!i)
|
567
572
|
return null;
|
568
|
-
const d = i.findIndex((
|
573
|
+
const d = i.findIndex((g, b) => b > 0 && g !== void 0), l = this.matchIndexes[d];
|
569
574
|
return i.splice(0, d), Object.assign(i, l);
|
570
575
|
}
|
571
576
|
}
|
@@ -614,26 +619,26 @@ function Er(n) {
|
|
614
619
|
if (a.isCompiled)
|
615
620
|
return i;
|
616
621
|
[
|
617
|
-
|
622
|
+
ar,
|
618
623
|
// do this early so compiler extensions generally don't have to worry about
|
619
624
|
// the distinction between match/begin
|
620
|
-
|
621
|
-
|
622
|
-
|
625
|
+
or,
|
626
|
+
Er,
|
627
|
+
lr
|
623
628
|
].forEach((l) => l(a, r)), n.compilerExtensions.forEach((l) => l(a, r)), a.__beforeBegin = null, [
|
624
|
-
|
629
|
+
ir,
|
625
630
|
// do this later so compiler extensions that come earlier have access to the
|
626
631
|
// raw array if they wanted to perhaps manipulate it, etc.
|
627
|
-
|
632
|
+
sr,
|
628
633
|
// default to 1 relevance if not specified
|
629
|
-
|
634
|
+
cr
|
630
635
|
].forEach((l) => l(a, r)), a.isCompiled = !0;
|
631
636
|
let d = null;
|
632
|
-
return typeof a.keywords == "object" && a.keywords.$pattern && (a.keywords = Object.assign({}, a.keywords), d = a.keywords.$pattern, delete a.keywords.$pattern), d = d || /\w+/, a.keywords && (a.keywords =
|
637
|
+
return typeof a.keywords == "object" && a.keywords.$pattern && (a.keywords = Object.assign({}, a.keywords), d = a.keywords.$pattern, delete a.keywords.$pattern), d = d || /\w+/, a.keywords && (a.keywords = ft(a.keywords, n.case_insensitive)), i.keywordPatternRe = e(d, !0), r && (a.begin || (a.begin = /\B|\b/), i.beginRe = e(i.begin), !a.end && !a.endsWithParent && (a.end = /\B|\b/), a.end && (i.endRe = e(i.end)), i.terminatorEnd = ve(i.end) || "", a.endsWithParent && r.terminatorEnd && (i.terminatorEnd += (a.end ? "|" : "") + r.terminatorEnd)), a.illegal && (i.illegalRe = e(
|
633
638
|
/** @type {RegExp | string} */
|
634
639
|
a.illegal
|
635
640
|
)), a.contains || (a.contains = []), a.contains = [].concat(...a.contains.map(function(l) {
|
636
|
-
return
|
641
|
+
return hr(l === "self" ? a : l);
|
637
642
|
})), a.contains.forEach(function(l) {
|
638
643
|
o(
|
639
644
|
/** @type Mode */
|
@@ -644,26 +649,26 @@ function Er(n) {
|
|
644
649
|
}
|
645
650
|
if (n.compilerExtensions || (n.compilerExtensions = []), n.contains && n.contains.includes("self"))
|
646
651
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
647
|
-
return n.classNameAliases =
|
652
|
+
return n.classNameAliases = de(n.classNameAliases || {}), o(
|
648
653
|
/** @type Mode */
|
649
654
|
n
|
650
655
|
);
|
651
656
|
}
|
652
|
-
function
|
653
|
-
return n ? n.endsWithParent ||
|
657
|
+
function Nt(n) {
|
658
|
+
return n ? n.endsWithParent || Nt(n.starts) : !1;
|
654
659
|
}
|
655
|
-
function
|
660
|
+
function hr(n) {
|
656
661
|
return n.variants && !n.cachedVariants && (n.cachedVariants = n.variants.map(function(e) {
|
657
|
-
return
|
658
|
-
})), n.cachedVariants ? n.cachedVariants :
|
662
|
+
return de(n, { variants: null }, e);
|
663
|
+
})), n.cachedVariants ? n.cachedVariants : Nt(n) ? de(n, { starts: n.starts ? de(n.starts) : null }) : Object.isFrozen(n) ? de(n) : n;
|
659
664
|
}
|
660
|
-
var
|
661
|
-
class
|
665
|
+
var Nr = "11.8.0";
|
666
|
+
class yr extends Error {
|
662
667
|
constructor(e, t) {
|
663
668
|
super(e), this.name = "HTMLInjectionError", this.html = t;
|
664
669
|
}
|
665
670
|
}
|
666
|
-
const
|
671
|
+
const ke = ut, wn = de, Rn = Symbol("nomatch"), vr = 7, yt = function(n) {
|
667
672
|
const e = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null), s = [];
|
668
673
|
let c = !0;
|
669
674
|
const o = "Could not find the language '{}', did you forget to load/include a language module?", a = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
@@ -677,397 +682,411 @@ const Ce = gt, An = ue, Mn = Symbol("nomatch"), yr = 7, vr = function(n) {
|
|
677
682
|
languages: null,
|
678
683
|
// beta configuration options, subject to change, welcome to discuss
|
679
684
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
680
|
-
__emitter:
|
685
|
+
__emitter: Dt
|
681
686
|
};
|
682
|
-
function i(
|
683
|
-
return r.noHighlightRe.test(
|
687
|
+
function i(u) {
|
688
|
+
return r.noHighlightRe.test(u);
|
684
689
|
}
|
685
|
-
function d(
|
686
|
-
let
|
687
|
-
|
688
|
-
const
|
689
|
-
if (
|
690
|
-
const
|
691
|
-
return
|
690
|
+
function d(u) {
|
691
|
+
let f = u.className + " ";
|
692
|
+
f += u.parentNode ? u.parentNode.className : "";
|
693
|
+
const O = r.languageDetectRe.exec(f);
|
694
|
+
if (O) {
|
695
|
+
const x = C(O[1]);
|
696
|
+
return x || (On(o.replace("{}", O[1])), On("Falling back to no-highlight mode for this block.", u)), x ? O[1] : "no-highlight";
|
692
697
|
}
|
693
|
-
return
|
698
|
+
return f.split(/\s+/).find((x) => i(x) || C(x));
|
694
699
|
}
|
695
|
-
function l(
|
696
|
-
let
|
697
|
-
typeof
|
698
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
699
|
-
const
|
700
|
-
code:
|
701
|
-
language:
|
700
|
+
function l(u, f, O) {
|
701
|
+
let x = "", P = "";
|
702
|
+
typeof f == "object" ? (x = u, O = f.ignoreIllegals, P = f.language) : (fe("10.7.0", "highlight(lang, code, ...args) has been deprecated."), fe("10.7.0", `Please use highlight(code, options) instead.
|
703
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), P = u, x = f), O === void 0 && (O = !0);
|
704
|
+
const Y = {
|
705
|
+
code: x,
|
706
|
+
language: P
|
702
707
|
};
|
703
|
-
|
704
|
-
const
|
705
|
-
return
|
708
|
+
U("before:highlight", Y);
|
709
|
+
const ne = Y.result ? Y.result : g(Y.language, Y.code, O);
|
710
|
+
return ne.code = Y.code, U("after:highlight", ne), ne;
|
706
711
|
}
|
707
|
-
function u
|
708
|
-
const
|
709
|
-
function
|
712
|
+
function g(u, f, O, x) {
|
713
|
+
const P = /* @__PURE__ */ Object.create(null);
|
714
|
+
function Y(_, y) {
|
710
715
|
return _.keywords[y];
|
711
716
|
}
|
712
|
-
function
|
717
|
+
function ne() {
|
713
718
|
if (!T.keywords) {
|
714
|
-
|
719
|
+
q.addText(k);
|
715
720
|
return;
|
716
721
|
}
|
717
722
|
let _ = 0;
|
718
723
|
T.keywordPatternRe.lastIndex = 0;
|
719
|
-
let y = T.keywordPatternRe.exec(
|
724
|
+
let y = T.keywordPatternRe.exec(k), w = "";
|
720
725
|
for (; y; ) {
|
721
|
-
w +=
|
722
|
-
const
|
723
|
-
if (
|
724
|
-
const [
|
725
|
-
if (
|
726
|
+
w += k.substring(_, y.index);
|
727
|
+
const D = ie.case_insensitive ? y[0].toLowerCase() : y[0], V = Y(T, D);
|
728
|
+
if (V) {
|
729
|
+
const [oe, $] = V;
|
730
|
+
if (q.addText(w), w = "", P[D] = (P[D] || 0) + 1, P[D] <= vr && (_e += $), oe.startsWith("_"))
|
726
731
|
w += y[0];
|
727
732
|
else {
|
728
|
-
const
|
729
|
-
|
733
|
+
const Re = ie.classNameAliases[oe] || oe;
|
734
|
+
Z(y[0], Re);
|
730
735
|
}
|
731
736
|
} else
|
732
737
|
w += y[0];
|
733
|
-
_ = T.keywordPatternRe.lastIndex, y = T.keywordPatternRe.exec(
|
738
|
+
_ = T.keywordPatternRe.lastIndex, y = T.keywordPatternRe.exec(k);
|
734
739
|
}
|
735
|
-
w +=
|
740
|
+
w += k.substring(_), q.addText(w);
|
736
741
|
}
|
737
|
-
function
|
738
|
-
if (
|
742
|
+
function te() {
|
743
|
+
if (k === "")
|
739
744
|
return;
|
740
745
|
let _ = null;
|
741
746
|
if (typeof T.subLanguage == "string") {
|
742
747
|
if (!e[T.subLanguage]) {
|
743
|
-
|
748
|
+
q.addText(k);
|
744
749
|
return;
|
745
750
|
}
|
746
|
-
_ =
|
751
|
+
_ = g(T.subLanguage, k, !0, we[T.subLanguage]), we[T.subLanguage] = /** @type {CompiledMode} */
|
747
752
|
_._top;
|
748
753
|
} else
|
749
|
-
_ = p(
|
750
|
-
T.relevance > 0 && (
|
754
|
+
_ = p(k, T.subLanguage.length ? T.subLanguage : null);
|
755
|
+
T.relevance > 0 && (_e += _.relevance), q.__addSublanguage(_._emitter, _.language);
|
751
756
|
}
|
752
|
-
function
|
753
|
-
T.subLanguage != null ?
|
757
|
+
function z() {
|
758
|
+
T.subLanguage != null ? te() : ne(), k = "";
|
754
759
|
}
|
755
|
-
function
|
760
|
+
function Z(_, y) {
|
761
|
+
_ !== "" && (q.startScope(y), q.addText(_), q.endScope());
|
762
|
+
}
|
763
|
+
function H(_, y) {
|
756
764
|
let w = 1;
|
757
|
-
const
|
758
|
-
for (; w <=
|
765
|
+
const D = y.length - 1;
|
766
|
+
for (; w <= D; ) {
|
759
767
|
if (!_._emit[w]) {
|
760
768
|
w++;
|
761
769
|
continue;
|
762
770
|
}
|
763
|
-
const
|
764
|
-
|
771
|
+
const V = ie.classNameAliases[_[w]] || _[w], oe = y[w];
|
772
|
+
V ? Z(oe, V) : (k = oe, ne(), k = ""), w++;
|
765
773
|
}
|
766
774
|
}
|
767
|
-
function
|
768
|
-
return _.scope && typeof _.scope == "string" &&
|
775
|
+
function K(_, y) {
|
776
|
+
return _.scope && typeof _.scope == "string" && q.openNode(ie.classNameAliases[_.scope] || _.scope), _.beginScope && (_.beginScope._wrap ? (Z(k, ie.classNameAliases[_.beginScope._wrap] || _.beginScope._wrap), k = "") : _.beginScope._multi && (H(_.beginScope, y), k = "")), T = Object.create(_, { parent: { value: T } }), T;
|
769
777
|
}
|
770
|
-
function
|
771
|
-
let
|
772
|
-
if (
|
778
|
+
function Q(_, y, w) {
|
779
|
+
let D = Pt(_.endRe, w);
|
780
|
+
if (D) {
|
773
781
|
if (_["on:end"]) {
|
774
|
-
const
|
775
|
-
_["on:end"](y,
|
782
|
+
const V = new yn(_);
|
783
|
+
_["on:end"](y, V), V.isMatchIgnored && (D = !1);
|
776
784
|
}
|
777
|
-
if (
|
785
|
+
if (D) {
|
778
786
|
for (; _.endsParent && _.parent; )
|
779
787
|
_ = _.parent;
|
780
788
|
return _;
|
781
789
|
}
|
782
790
|
}
|
783
791
|
if (_.endsWithParent)
|
784
|
-
return
|
792
|
+
return Q(_.parent, y, w);
|
785
793
|
}
|
786
|
-
function
|
787
|
-
return T.matcher.regexIndex === 0 ? (
|
794
|
+
function j(_) {
|
795
|
+
return T.matcher.regexIndex === 0 ? (k += _[0], 1) : (Ee = !0, 0);
|
788
796
|
}
|
789
797
|
function ee(_) {
|
790
|
-
const y = _[0], w = _.rule,
|
791
|
-
for (const
|
792
|
-
if (
|
793
|
-
return
|
794
|
-
return w.skip ?
|
798
|
+
const y = _[0], w = _.rule, D = new yn(w), V = [w.__beforeBegin, w["on:begin"]];
|
799
|
+
for (const oe of V)
|
800
|
+
if (oe && (oe(_, D), D.isMatchIgnored))
|
801
|
+
return j(y);
|
802
|
+
return w.skip ? k += y : (w.excludeBegin && (k += y), z(), !w.returnBegin && !w.excludeBegin && (k = y)), K(w, _), w.returnBegin ? 0 : y.length;
|
795
803
|
}
|
796
|
-
function
|
797
|
-
const y = _[0], w =
|
798
|
-
if (!
|
799
|
-
return
|
800
|
-
const
|
801
|
-
T.endScope && T.endScope._wrap ? (
|
804
|
+
function ae(_) {
|
805
|
+
const y = _[0], w = f.substring(_.index), D = Q(T, _, w);
|
806
|
+
if (!D)
|
807
|
+
return Rn;
|
808
|
+
const V = T;
|
809
|
+
T.endScope && T.endScope._wrap ? (z(), Z(y, T.endScope._wrap)) : T.endScope && T.endScope._multi ? (z(), H(T.endScope, _)) : V.skip ? k += y : (V.returnEnd || V.excludeEnd || (k += y), z(), V.excludeEnd && (k = y));
|
802
810
|
do
|
803
|
-
T.scope &&
|
804
|
-
while (T !==
|
805
|
-
return
|
811
|
+
T.scope && q.closeNode(), !T.skip && !T.subLanguage && (_e += T.relevance), T = T.parent;
|
812
|
+
while (T !== D.parent);
|
813
|
+
return D.starts && K(D.starts, _), V.returnEnd ? 0 : y.length;
|
806
814
|
}
|
807
|
-
function
|
815
|
+
function se() {
|
808
816
|
const _ = [];
|
809
817
|
for (let y = T; y !== ie; y = y.parent)
|
810
818
|
y.scope && _.unshift(y.scope);
|
811
|
-
_.forEach((y) =>
|
819
|
+
_.forEach((y) => q.openNode(y));
|
812
820
|
}
|
813
|
-
let
|
814
|
-
function
|
821
|
+
let ue = {};
|
822
|
+
function Oe(_, y) {
|
815
823
|
const w = y && y[0];
|
816
|
-
if (
|
817
|
-
return
|
818
|
-
if (
|
819
|
-
if (
|
820
|
-
const
|
821
|
-
throw
|
824
|
+
if (k += _, w == null)
|
825
|
+
return z(), 0;
|
826
|
+
if (ue.type === "begin" && y.type === "end" && ue.index === y.index && w === "") {
|
827
|
+
if (k += f.slice(y.index, y.index + 1), !c) {
|
828
|
+
const D = new Error(`0 width match regex (${u})`);
|
829
|
+
throw D.languageName = u, D.badRule = ue.rule, D;
|
822
830
|
}
|
823
831
|
return 1;
|
824
832
|
}
|
825
|
-
if (
|
833
|
+
if (ue = y, y.type === "begin")
|
826
834
|
return ee(y);
|
827
|
-
if (y.type === "illegal" && !
|
828
|
-
const
|
829
|
-
throw
|
835
|
+
if (y.type === "illegal" && !O) {
|
836
|
+
const D = new Error('Illegal lexeme "' + w + '" for mode "' + (T.scope || "<unnamed>") + '"');
|
837
|
+
throw D.mode = T, D;
|
830
838
|
} else if (y.type === "end") {
|
831
|
-
const
|
832
|
-
if (
|
833
|
-
return
|
839
|
+
const D = ae(y);
|
840
|
+
if (D !== Rn)
|
841
|
+
return D;
|
834
842
|
}
|
835
843
|
if (y.type === "illegal" && w === "")
|
836
844
|
return 1;
|
837
|
-
if (
|
845
|
+
if (me > 1e5 && me > y.index * 3)
|
838
846
|
throw new Error("potential infinite loop, way more iterations than matches");
|
839
|
-
return
|
847
|
+
return k += w, w.length;
|
840
848
|
}
|
841
|
-
const ie = C(
|
849
|
+
const ie = C(u);
|
842
850
|
if (!ie)
|
843
|
-
throw ge(o.replace("{}",
|
844
|
-
const
|
845
|
-
let
|
846
|
-
const
|
847
|
-
|
848
|
-
let
|
851
|
+
throw ge(o.replace("{}", u)), new Error('Unknown language: "' + u + '"');
|
852
|
+
const Ne = fr(ie);
|
853
|
+
let ye = "", T = x || Ne;
|
854
|
+
const we = {}, q = new r.__emitter(r);
|
855
|
+
se();
|
856
|
+
let k = "", _e = 0, le = 0, me = 0, Ee = !1;
|
849
857
|
try {
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
858
|
+
if (ie.__emitTokens)
|
859
|
+
ie.__emitTokens(f, q);
|
860
|
+
else {
|
861
|
+
for (T.matcher.considerAll(); ; ) {
|
862
|
+
me++, Ee ? Ee = !1 : T.matcher.considerAll(), T.matcher.lastIndex = le;
|
863
|
+
const _ = T.matcher.exec(f);
|
864
|
+
if (!_)
|
865
|
+
break;
|
866
|
+
const y = f.substring(le, _.index), w = Oe(y, _);
|
867
|
+
le = _.index + w;
|
868
|
+
}
|
869
|
+
Oe(f.substring(le));
|
857
870
|
}
|
858
|
-
return
|
859
|
-
language:
|
860
|
-
value:
|
861
|
-
relevance:
|
871
|
+
return q.finalize(), ye = q.toHTML(), {
|
872
|
+
language: u,
|
873
|
+
value: ye,
|
874
|
+
relevance: _e,
|
862
875
|
illegal: !1,
|
863
|
-
_emitter:
|
876
|
+
_emitter: q,
|
864
877
|
_top: T
|
865
878
|
};
|
866
879
|
} catch (_) {
|
867
880
|
if (_.message && _.message.includes("Illegal"))
|
868
881
|
return {
|
869
|
-
language:
|
870
|
-
value:
|
882
|
+
language: u,
|
883
|
+
value: ke(f),
|
871
884
|
illegal: !0,
|
872
885
|
relevance: 0,
|
873
886
|
_illegalBy: {
|
874
887
|
message: _.message,
|
875
|
-
index:
|
876
|
-
context:
|
888
|
+
index: le,
|
889
|
+
context: f.slice(le - 100, le + 100),
|
877
890
|
mode: _.mode,
|
878
|
-
resultSoFar:
|
891
|
+
resultSoFar: ye
|
879
892
|
},
|
880
|
-
_emitter:
|
893
|
+
_emitter: q
|
881
894
|
};
|
882
895
|
if (c)
|
883
896
|
return {
|
884
|
-
language:
|
885
|
-
value:
|
897
|
+
language: u,
|
898
|
+
value: ke(f),
|
886
899
|
illegal: !1,
|
887
900
|
relevance: 0,
|
888
901
|
errorRaised: _,
|
889
|
-
_emitter:
|
902
|
+
_emitter: q,
|
890
903
|
_top: T
|
891
904
|
};
|
892
905
|
throw _;
|
893
906
|
}
|
894
907
|
}
|
895
|
-
function b(
|
896
|
-
const
|
897
|
-
value:
|
908
|
+
function b(u) {
|
909
|
+
const f = {
|
910
|
+
value: ke(u),
|
898
911
|
illegal: !1,
|
899
912
|
relevance: 0,
|
900
913
|
_top: a,
|
901
914
|
_emitter: new r.__emitter(r)
|
902
915
|
};
|
903
|
-
return
|
916
|
+
return f._emitter.addText(u), f;
|
904
917
|
}
|
905
|
-
function p(
|
906
|
-
|
907
|
-
const
|
908
|
-
(
|
918
|
+
function p(u, f) {
|
919
|
+
f = f || r.languages || Object.keys(e);
|
920
|
+
const O = b(u), x = f.filter(C).filter(F).map(
|
921
|
+
(z) => g(z, u, !1)
|
909
922
|
);
|
910
|
-
|
911
|
-
const
|
912
|
-
if (
|
913
|
-
return
|
914
|
-
if (
|
915
|
-
if (C(
|
923
|
+
x.unshift(O);
|
924
|
+
const P = x.sort((z, Z) => {
|
925
|
+
if (z.relevance !== Z.relevance)
|
926
|
+
return Z.relevance - z.relevance;
|
927
|
+
if (z.language && Z.language) {
|
928
|
+
if (C(z.language).supersetOf === Z.language)
|
916
929
|
return 1;
|
917
|
-
if (C(
|
930
|
+
if (C(Z.language).supersetOf === z.language)
|
918
931
|
return -1;
|
919
932
|
}
|
920
933
|
return 0;
|
921
|
-
}), [
|
922
|
-
return
|
934
|
+
}), [Y, ne] = P, te = Y;
|
935
|
+
return te.secondBest = ne, te;
|
923
936
|
}
|
924
|
-
function m(
|
925
|
-
const
|
926
|
-
|
937
|
+
function m(u, f, O) {
|
938
|
+
const x = f && t[f] || O;
|
939
|
+
u.classList.add("hljs"), u.classList.add(`language-${x}`);
|
927
940
|
}
|
928
|
-
function E(
|
929
|
-
let
|
930
|
-
const
|
931
|
-
if (i(
|
941
|
+
function E(u) {
|
942
|
+
let f = null;
|
943
|
+
const O = d(u);
|
944
|
+
if (i(O))
|
932
945
|
return;
|
933
|
-
if (
|
946
|
+
if (U(
|
934
947
|
"before:highlightElement",
|
935
|
-
{ el:
|
936
|
-
),
|
937
|
-
throw new
|
948
|
+
{ el: u, language: O }
|
949
|
+
), u.children.length > 0 && (r.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(u)), r.throwUnescapedHTML))
|
950
|
+
throw new yr(
|
938
951
|
"One of your code blocks includes unescaped HTML.",
|
939
|
-
|
952
|
+
u.innerHTML
|
940
953
|
);
|
941
|
-
|
942
|
-
const
|
943
|
-
|
944
|
-
language:
|
954
|
+
f = u;
|
955
|
+
const x = f.textContent, P = O ? l(x, { language: O, ignoreIllegals: !0 }) : p(x);
|
956
|
+
u.innerHTML = P.value, m(u, O, P.language), u.result = {
|
957
|
+
language: P.language,
|
945
958
|
// TODO: remove with version 11.0
|
946
|
-
re:
|
947
|
-
relevance:
|
948
|
-
},
|
949
|
-
language:
|
950
|
-
relevance:
|
951
|
-
}),
|
959
|
+
re: P.relevance,
|
960
|
+
relevance: P.relevance
|
961
|
+
}, P.secondBest && (u.secondBest = {
|
962
|
+
language: P.secondBest.language,
|
963
|
+
relevance: P.secondBest.relevance
|
964
|
+
}), U("after:highlightElement", { el: u, result: P, text: x });
|
952
965
|
}
|
953
|
-
function
|
954
|
-
r =
|
966
|
+
function N(u) {
|
967
|
+
r = wn(r, u);
|
955
968
|
}
|
956
|
-
const
|
957
|
-
|
969
|
+
const h = () => {
|
970
|
+
A(), fe("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
958
971
|
};
|
959
|
-
function
|
960
|
-
|
972
|
+
function S() {
|
973
|
+
A(), fe("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
961
974
|
}
|
962
|
-
let
|
963
|
-
function
|
975
|
+
let I = !1;
|
976
|
+
function A() {
|
964
977
|
if (document.readyState === "loading") {
|
965
|
-
|
978
|
+
I = !0;
|
966
979
|
return;
|
967
980
|
}
|
968
981
|
document.querySelectorAll(r.cssSelector).forEach(E);
|
969
982
|
}
|
970
|
-
function
|
971
|
-
|
983
|
+
function M() {
|
984
|
+
I && A();
|
972
985
|
}
|
973
|
-
typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
974
|
-
function L(
|
975
|
-
let
|
986
|
+
typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", M, !1);
|
987
|
+
function L(u, f) {
|
988
|
+
let O = null;
|
976
989
|
try {
|
977
|
-
|
978
|
-
} catch (
|
979
|
-
if (ge("Language definition for '{}' could not be registered.".replace("{}",
|
980
|
-
ge(
|
990
|
+
O = f(n);
|
991
|
+
} catch (x) {
|
992
|
+
if (ge("Language definition for '{}' could not be registered.".replace("{}", u)), c)
|
993
|
+
ge(x);
|
981
994
|
else
|
982
|
-
throw
|
983
|
-
|
995
|
+
throw x;
|
996
|
+
O = a;
|
984
997
|
}
|
985
|
-
|
998
|
+
O.name || (O.name = u), e[u] = O, O.rawDefinition = f.bind(null, n), O.aliases && G(O.aliases, { languageName: u });
|
986
999
|
}
|
987
|
-
function
|
988
|
-
delete e[
|
989
|
-
for (const
|
990
|
-
t[
|
1000
|
+
function B(u) {
|
1001
|
+
delete e[u];
|
1002
|
+
for (const f of Object.keys(t))
|
1003
|
+
t[f] === u && delete t[f];
|
991
1004
|
}
|
992
1005
|
function v() {
|
993
1006
|
return Object.keys(e);
|
994
1007
|
}
|
995
|
-
function C(
|
996
|
-
return
|
1008
|
+
function C(u) {
|
1009
|
+
return u = (u || "").toLowerCase(), e[u] || e[t[u]];
|
997
1010
|
}
|
998
|
-
function
|
999
|
-
typeof
|
1000
|
-
t[
|
1011
|
+
function G(u, { languageName: f }) {
|
1012
|
+
typeof u == "string" && (u = [u]), u.forEach((O) => {
|
1013
|
+
t[O.toLowerCase()] = f;
|
1001
1014
|
});
|
1002
1015
|
}
|
1003
|
-
function
|
1004
|
-
const
|
1005
|
-
return
|
1016
|
+
function F(u) {
|
1017
|
+
const f = C(u);
|
1018
|
+
return f && !f.disableAutodetect;
|
1006
1019
|
}
|
1007
|
-
function
|
1008
|
-
|
1009
|
-
|
1010
|
-
Object.assign({ block:
|
1020
|
+
function J(u) {
|
1021
|
+
u["before:highlightBlock"] && !u["before:highlightElement"] && (u["before:highlightElement"] = (f) => {
|
1022
|
+
u["before:highlightBlock"](
|
1023
|
+
Object.assign({ block: f.el }, f)
|
1011
1024
|
);
|
1012
|
-
}),
|
1013
|
-
|
1014
|
-
Object.assign({ block:
|
1025
|
+
}), u["after:highlightBlock"] && !u["after:highlightElement"] && (u["after:highlightElement"] = (f) => {
|
1026
|
+
u["after:highlightBlock"](
|
1027
|
+
Object.assign({ block: f.el }, f)
|
1015
1028
|
);
|
1016
1029
|
});
|
1017
1030
|
}
|
1018
|
-
function
|
1019
|
-
|
1031
|
+
function re(u) {
|
1032
|
+
J(u), s.push(u);
|
1020
1033
|
}
|
1021
|
-
function
|
1022
|
-
const
|
1023
|
-
s.
|
1024
|
-
|
1034
|
+
function W(u) {
|
1035
|
+
const f = s.indexOf(u);
|
1036
|
+
f !== -1 && s.splice(f, 1);
|
1037
|
+
}
|
1038
|
+
function U(u, f) {
|
1039
|
+
const O = u;
|
1040
|
+
s.forEach(function(x) {
|
1041
|
+
x[O] && x[O](f);
|
1025
1042
|
});
|
1026
1043
|
}
|
1027
|
-
function
|
1028
|
-
return
|
1044
|
+
function X(u) {
|
1045
|
+
return fe("10.7.0", "highlightBlock will be removed entirely in v12.0"), fe("10.7.0", "Please use highlightElement now."), E(u);
|
1029
1046
|
}
|
1030
1047
|
Object.assign(n, {
|
1031
1048
|
highlight: l,
|
1032
1049
|
highlightAuto: p,
|
1033
|
-
highlightAll:
|
1050
|
+
highlightAll: A,
|
1034
1051
|
highlightElement: E,
|
1035
1052
|
// TODO: Remove with v12 API
|
1036
|
-
highlightBlock:
|
1037
|
-
configure:
|
1038
|
-
initHighlighting:
|
1039
|
-
initHighlightingOnLoad:
|
1053
|
+
highlightBlock: X,
|
1054
|
+
configure: N,
|
1055
|
+
initHighlighting: h,
|
1056
|
+
initHighlightingOnLoad: S,
|
1040
1057
|
registerLanguage: L,
|
1041
|
-
unregisterLanguage:
|
1058
|
+
unregisterLanguage: B,
|
1042
1059
|
listLanguages: v,
|
1043
1060
|
getLanguage: C,
|
1044
|
-
registerAliases:
|
1045
|
-
autoDetection:
|
1046
|
-
inherit:
|
1047
|
-
addPlugin:
|
1061
|
+
registerAliases: G,
|
1062
|
+
autoDetection: F,
|
1063
|
+
inherit: wn,
|
1064
|
+
addPlugin: re,
|
1065
|
+
removePlugin: W
|
1048
1066
|
}), n.debugMode = function() {
|
1049
1067
|
c = !1;
|
1050
1068
|
}, n.safeMode = function() {
|
1051
1069
|
c = !0;
|
1052
|
-
}, n.versionString =
|
1070
|
+
}, n.versionString = Nr, n.regex = {
|
1053
1071
|
concat: be,
|
1054
|
-
lookahead:
|
1055
|
-
either:
|
1056
|
-
optional:
|
1057
|
-
anyNumberOfTimes:
|
1072
|
+
lookahead: gt,
|
1073
|
+
either: En,
|
1074
|
+
optional: Bt,
|
1075
|
+
anyNumberOfTimes: Lt
|
1058
1076
|
};
|
1059
|
-
for (const
|
1060
|
-
typeof
|
1061
|
-
return Object.assign(n,
|
1062
|
-
};
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1077
|
+
for (const u in Me)
|
1078
|
+
typeof Me[u] == "object" && dt(Me[u]);
|
1079
|
+
return Object.assign(n, Me), n;
|
1080
|
+
}, he = yt({});
|
1081
|
+
he.newInstance = () => yt({});
|
1082
|
+
var Tr = he;
|
1083
|
+
he.HighlightJS = he;
|
1084
|
+
he.default = he;
|
1085
|
+
var xe, An;
|
1067
1086
|
function Sr() {
|
1068
|
-
if (
|
1069
|
-
return
|
1070
|
-
|
1087
|
+
if (An)
|
1088
|
+
return xe;
|
1089
|
+
An = 1;
|
1071
1090
|
function n(e) {
|
1072
1091
|
const t = e.regex, s = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), c = /[\p{L}0-9._:-]+/u, o = {
|
1073
1092
|
className: "symbol",
|
@@ -1284,13 +1303,13 @@ function Sr() {
|
|
1284
1303
|
]
|
1285
1304
|
};
|
1286
1305
|
}
|
1287
|
-
return
|
1306
|
+
return xe = n, xe;
|
1288
1307
|
}
|
1289
|
-
var
|
1290
|
-
function
|
1291
|
-
if (
|
1292
|
-
return
|
1293
|
-
|
1308
|
+
var De, Mn;
|
1309
|
+
function Or() {
|
1310
|
+
if (Mn)
|
1311
|
+
return De;
|
1312
|
+
Mn = 1;
|
1294
1313
|
function n(e) {
|
1295
1314
|
const t = e.regex, s = {}, c = {
|
1296
1315
|
begin: /\$\{/,
|
@@ -1359,7 +1378,7 @@ function wr() {
|
|
1359
1378
|
e.NUMBER_MODE,
|
1360
1379
|
s
|
1361
1380
|
]
|
1362
|
-
},
|
1381
|
+
}, g = [
|
1363
1382
|
"fish",
|
1364
1383
|
"bash",
|
1365
1384
|
"zsh",
|
@@ -1370,7 +1389,7 @@ function wr() {
|
|
1370
1389
|
"dash",
|
1371
1390
|
"scsh"
|
1372
1391
|
], b = e.SHEBANG({
|
1373
|
-
binary: `(${
|
1392
|
+
binary: `(${g.join("|")})`,
|
1374
1393
|
relevance: 10
|
1375
1394
|
}), p = {
|
1376
1395
|
className: "function",
|
@@ -1386,16 +1405,18 @@ function wr() {
|
|
1386
1405
|
"fi",
|
1387
1406
|
"for",
|
1388
1407
|
"while",
|
1408
|
+
"until",
|
1389
1409
|
"in",
|
1390
1410
|
"do",
|
1391
1411
|
"done",
|
1392
1412
|
"case",
|
1393
1413
|
"esac",
|
1394
|
-
"function"
|
1414
|
+
"function",
|
1415
|
+
"select"
|
1395
1416
|
], E = [
|
1396
1417
|
"true",
|
1397
1418
|
"false"
|
1398
|
-
],
|
1419
|
+
], N = { match: /(\/[a-z._-]+)+/ }, h = [
|
1399
1420
|
"break",
|
1400
1421
|
"cd",
|
1401
1422
|
"continue",
|
@@ -1414,7 +1435,7 @@ function wr() {
|
|
1414
1435
|
"trap",
|
1415
1436
|
"umask",
|
1416
1437
|
"unset"
|
1417
|
-
],
|
1438
|
+
], S = [
|
1418
1439
|
"alias",
|
1419
1440
|
"bind",
|
1420
1441
|
"builtin",
|
@@ -1436,7 +1457,7 @@ function wr() {
|
|
1436
1457
|
"typeset",
|
1437
1458
|
"ulimit",
|
1438
1459
|
"unalias"
|
1439
|
-
],
|
1460
|
+
], I = [
|
1440
1461
|
"autoload",
|
1441
1462
|
"bg",
|
1442
1463
|
"bindkey",
|
@@ -1505,7 +1526,7 @@ function wr() {
|
|
1505
1526
|
"zsocket",
|
1506
1527
|
"zstyle",
|
1507
1528
|
"ztcp"
|
1508
|
-
],
|
1529
|
+
], A = [
|
1509
1530
|
"chcon",
|
1510
1531
|
"chgrp",
|
1511
1532
|
"chown",
|
@@ -1618,13 +1639,13 @@ function wr() {
|
|
1618
1639
|
keyword: m,
|
1619
1640
|
literal: E,
|
1620
1641
|
built_in: [
|
1621
|
-
...
|
1622
|
-
...
|
1642
|
+
...h,
|
1643
|
+
...S,
|
1623
1644
|
// Shell modifiers
|
1624
1645
|
"set",
|
1625
1646
|
"shopt",
|
1626
|
-
...
|
1627
|
-
...
|
1647
|
+
...I,
|
1648
|
+
...A
|
1628
1649
|
]
|
1629
1650
|
},
|
1630
1651
|
contains: [
|
@@ -1636,7 +1657,7 @@ function wr() {
|
|
1636
1657
|
l,
|
1637
1658
|
e.HASH_COMMENT_MODE,
|
1638
1659
|
a,
|
1639
|
-
|
1660
|
+
N,
|
1640
1661
|
r,
|
1641
1662
|
i,
|
1642
1663
|
d,
|
@@ -1644,13 +1665,13 @@ function wr() {
|
|
1644
1665
|
]
|
1645
1666
|
};
|
1646
1667
|
}
|
1647
|
-
return
|
1668
|
+
return De = n, De;
|
1648
1669
|
}
|
1649
|
-
var
|
1650
|
-
function
|
1651
|
-
if (
|
1652
|
-
return
|
1653
|
-
|
1670
|
+
var Le, In;
|
1671
|
+
function wr() {
|
1672
|
+
if (In)
|
1673
|
+
return Le;
|
1674
|
+
In = 1;
|
1654
1675
|
function n(e) {
|
1655
1676
|
const t = e.regex, s = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), c = "decltype\\(auto\\)", o = "[a-zA-Z_]\\w*::", a = "<[^<>]+>", r = "(" + c + "|" + t.optional(o) + "[a-zA-Z_]\\w*" + t.optional(a) + ")", i = {
|
1656
1677
|
className: "type",
|
@@ -1677,7 +1698,7 @@ function Or() {
|
|
1677
1698
|
end: /\)([^()\\ ]{0,16})"/
|
1678
1699
|
})
|
1679
1700
|
]
|
1680
|
-
},
|
1701
|
+
}, g = {
|
1681
1702
|
className: "number",
|
1682
1703
|
variants: [
|
1683
1704
|
{ begin: "\\b(0b[01']+)" },
|
@@ -1707,7 +1728,7 @@ function Or() {
|
|
1707
1728
|
className: "title",
|
1708
1729
|
begin: t.optional(o) + e.IDENT_RE,
|
1709
1730
|
relevance: 0
|
1710
|
-
}, m = t.optional(o) + e.IDENT_RE + "\\s*\\(",
|
1731
|
+
}, m = t.optional(o) + e.IDENT_RE + "\\s*\\(", h = {
|
1711
1732
|
keyword: [
|
1712
1733
|
"asm",
|
1713
1734
|
"auto",
|
@@ -1777,14 +1798,14 @@ function Or() {
|
|
1777
1798
|
literal: "true false NULL",
|
1778
1799
|
// TODO: apply hinting work similar to what was done in cpp.js
|
1779
1800
|
built_in: "std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"
|
1780
|
-
},
|
1801
|
+
}, S = [
|
1781
1802
|
b,
|
1782
1803
|
i,
|
1783
1804
|
s,
|
1784
1805
|
e.C_BLOCK_COMMENT_MODE,
|
1785
|
-
|
1806
|
+
g,
|
1786
1807
|
l
|
1787
|
-
],
|
1808
|
+
], I = {
|
1788
1809
|
// This mode covers expression context where we can't expect a function
|
1789
1810
|
// definition and shouldn't highlight anything that looks like one:
|
1790
1811
|
// `return some()`, `else if()`, `(x*sum(1, 2))`
|
@@ -1802,29 +1823,29 @@ function Or() {
|
|
1802
1823
|
end: /;/
|
1803
1824
|
}
|
1804
1825
|
],
|
1805
|
-
keywords:
|
1806
|
-
contains:
|
1826
|
+
keywords: h,
|
1827
|
+
contains: S.concat([
|
1807
1828
|
{
|
1808
1829
|
begin: /\(/,
|
1809
1830
|
end: /\)/,
|
1810
|
-
keywords:
|
1811
|
-
contains:
|
1831
|
+
keywords: h,
|
1832
|
+
contains: S.concat(["self"]),
|
1812
1833
|
relevance: 0
|
1813
1834
|
}
|
1814
1835
|
]),
|
1815
1836
|
relevance: 0
|
1816
|
-
},
|
1837
|
+
}, A = {
|
1817
1838
|
begin: "(" + r + "[\\*&\\s]+)+" + m,
|
1818
1839
|
returnBegin: !0,
|
1819
1840
|
end: /[{;=]/,
|
1820
1841
|
excludeEnd: !0,
|
1821
|
-
keywords:
|
1842
|
+
keywords: h,
|
1822
1843
|
illegal: /[^\w\s\*&:<>.]/,
|
1823
1844
|
contains: [
|
1824
1845
|
{
|
1825
1846
|
// to prevent it from being confused as the function title
|
1826
1847
|
begin: c,
|
1827
|
-
keywords:
|
1848
|
+
keywords: h,
|
1828
1849
|
relevance: 0
|
1829
1850
|
},
|
1830
1851
|
{
|
@@ -1843,26 +1864,26 @@ function Or() {
|
|
1843
1864
|
className: "params",
|
1844
1865
|
begin: /\(/,
|
1845
1866
|
end: /\)/,
|
1846
|
-
keywords:
|
1867
|
+
keywords: h,
|
1847
1868
|
relevance: 0,
|
1848
1869
|
contains: [
|
1849
1870
|
s,
|
1850
1871
|
e.C_BLOCK_COMMENT_MODE,
|
1851
1872
|
l,
|
1852
|
-
|
1873
|
+
g,
|
1853
1874
|
i,
|
1854
1875
|
// Count matching parentheses.
|
1855
1876
|
{
|
1856
1877
|
begin: /\(/,
|
1857
1878
|
end: /\)/,
|
1858
|
-
keywords:
|
1879
|
+
keywords: h,
|
1859
1880
|
relevance: 0,
|
1860
1881
|
contains: [
|
1861
1882
|
"self",
|
1862
1883
|
s,
|
1863
1884
|
e.C_BLOCK_COMMENT_MODE,
|
1864
1885
|
l,
|
1865
|
-
|
1886
|
+
g,
|
1866
1887
|
i
|
1867
1888
|
]
|
1868
1889
|
}
|
@@ -1877,20 +1898,20 @@ function Or() {
|
|
1877
1898
|
return {
|
1878
1899
|
name: "C",
|
1879
1900
|
aliases: ["h"],
|
1880
|
-
keywords:
|
1901
|
+
keywords: h,
|
1881
1902
|
// Until differentiations are added between `c` and `cpp`, `c` will
|
1882
1903
|
// not be auto-detected to avoid auto-detect conflicts between C and C++
|
1883
1904
|
disableAutodetect: !0,
|
1884
1905
|
illegal: "</",
|
1885
1906
|
contains: [].concat(
|
1886
|
-
|
1887
|
-
M,
|
1907
|
+
I,
|
1888
1908
|
A,
|
1909
|
+
S,
|
1889
1910
|
[
|
1890
1911
|
b,
|
1891
1912
|
{
|
1892
1913
|
begin: e.IDENT_RE + "::",
|
1893
|
-
keywords:
|
1914
|
+
keywords: h
|
1894
1915
|
},
|
1895
1916
|
{
|
1896
1917
|
className: "class",
|
@@ -1906,17 +1927,17 @@ function Or() {
|
|
1906
1927
|
exports: {
|
1907
1928
|
preprocessor: b,
|
1908
1929
|
strings: l,
|
1909
|
-
keywords:
|
1930
|
+
keywords: h
|
1910
1931
|
}
|
1911
1932
|
};
|
1912
1933
|
}
|
1913
|
-
return
|
1934
|
+
return Le = n, Le;
|
1914
1935
|
}
|
1915
|
-
var
|
1936
|
+
var Be, Cn;
|
1916
1937
|
function Rr() {
|
1917
|
-
if (
|
1918
|
-
return
|
1919
|
-
|
1938
|
+
if (Cn)
|
1939
|
+
return Be;
|
1940
|
+
Cn = 1;
|
1920
1941
|
function n(e) {
|
1921
1942
|
const t = e.regex, s = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), c = "decltype\\(auto\\)", o = "[a-zA-Z_]\\w*::", a = "<[^<>]+>", r = "(?!struct)(" + c + "|" + t.optional(o) + "[a-zA-Z_]\\w*" + t.optional(a) + ")", i = {
|
1922
1943
|
className: "type",
|
@@ -1940,7 +1961,7 @@ function Rr() {
|
|
1940
1961
|
end: /\)([^()\\ ]{0,16})"/
|
1941
1962
|
})
|
1942
1963
|
]
|
1943
|
-
},
|
1964
|
+
}, g = {
|
1944
1965
|
className: "number",
|
1945
1966
|
variants: [
|
1946
1967
|
{ begin: "\\b(0b[01']+)" },
|
@@ -2058,7 +2079,7 @@ function Rr() {
|
|
2058
2079
|
"while",
|
2059
2080
|
"xor",
|
2060
2081
|
"xor_eq"
|
2061
|
-
],
|
2082
|
+
], N = [
|
2062
2083
|
"bool",
|
2063
2084
|
"char",
|
2064
2085
|
"char16_t",
|
@@ -2075,7 +2096,7 @@ function Rr() {
|
|
2075
2096
|
"signed",
|
2076
2097
|
"const",
|
2077
2098
|
"static"
|
2078
|
-
],
|
2099
|
+
], h = [
|
2079
2100
|
"any",
|
2080
2101
|
"auto_ptr",
|
2081
2102
|
"barrier",
|
@@ -2131,7 +2152,7 @@ function Rr() {
|
|
2131
2152
|
"weak_ptr",
|
2132
2153
|
"wstring",
|
2133
2154
|
"wstring_view"
|
2134
|
-
],
|
2155
|
+
], S = [
|
2135
2156
|
"abort",
|
2136
2157
|
"abs",
|
2137
2158
|
"acos",
|
@@ -2232,8 +2253,8 @@ function Rr() {
|
|
2232
2253
|
"visit",
|
2233
2254
|
"vprintf",
|
2234
2255
|
"vsprintf"
|
2235
|
-
],
|
2236
|
-
type:
|
2256
|
+
], M = {
|
2257
|
+
type: N,
|
2237
2258
|
keyword: E,
|
2238
2259
|
literal: [
|
2239
2260
|
"NULL",
|
@@ -2243,13 +2264,13 @@ function Rr() {
|
|
2243
2264
|
"true"
|
2244
2265
|
],
|
2245
2266
|
built_in: ["_Pragma"],
|
2246
|
-
_type_hints:
|
2267
|
+
_type_hints: h
|
2247
2268
|
}, L = {
|
2248
2269
|
className: "function.dispatch",
|
2249
2270
|
relevance: 0,
|
2250
2271
|
keywords: {
|
2251
2272
|
// Only for relevance, not highlighting.
|
2252
|
-
_hint:
|
2273
|
+
_hint: S
|
2253
2274
|
},
|
2254
2275
|
begin: t.concat(
|
2255
2276
|
/\b/,
|
@@ -2261,13 +2282,13 @@ function Rr() {
|
|
2261
2282
|
e.IDENT_RE,
|
2262
2283
|
t.lookahead(/(<[^<>]+>|)\s*\(/)
|
2263
2284
|
)
|
2264
|
-
},
|
2285
|
+
}, B = [
|
2265
2286
|
L,
|
2266
2287
|
b,
|
2267
2288
|
i,
|
2268
2289
|
s,
|
2269
2290
|
e.C_BLOCK_COMMENT_MODE,
|
2270
|
-
|
2291
|
+
g,
|
2271
2292
|
l
|
2272
2293
|
], v = {
|
2273
2294
|
// This mode covers expression context where we can't expect a function
|
@@ -2287,13 +2308,13 @@ function Rr() {
|
|
2287
2308
|
end: /;/
|
2288
2309
|
}
|
2289
2310
|
],
|
2290
|
-
keywords:
|
2291
|
-
contains:
|
2311
|
+
keywords: M,
|
2312
|
+
contains: B.concat([
|
2292
2313
|
{
|
2293
2314
|
begin: /\(/,
|
2294
2315
|
end: /\)/,
|
2295
|
-
keywords:
|
2296
|
-
contains:
|
2316
|
+
keywords: M,
|
2317
|
+
contains: B.concat(["self"]),
|
2297
2318
|
relevance: 0
|
2298
2319
|
}
|
2299
2320
|
]),
|
@@ -2304,13 +2325,13 @@ function Rr() {
|
|
2304
2325
|
returnBegin: !0,
|
2305
2326
|
end: /[{;=]/,
|
2306
2327
|
excludeEnd: !0,
|
2307
|
-
keywords:
|
2328
|
+
keywords: M,
|
2308
2329
|
illegal: /[^\w\s\*&:<>.]/,
|
2309
2330
|
contains: [
|
2310
2331
|
{
|
2311
2332
|
// to prevent it from being confused as the function title
|
2312
2333
|
begin: c,
|
2313
|
-
keywords:
|
2334
|
+
keywords: M,
|
2314
2335
|
relevance: 0
|
2315
2336
|
},
|
2316
2337
|
{
|
@@ -2331,7 +2352,7 @@ function Rr() {
|
|
2331
2352
|
endsWithParent: !0,
|
2332
2353
|
contains: [
|
2333
2354
|
l,
|
2334
|
-
|
2355
|
+
g
|
2335
2356
|
]
|
2336
2357
|
},
|
2337
2358
|
// allow for multiple declarations, e.g.:
|
@@ -2344,26 +2365,26 @@ function Rr() {
|
|
2344
2365
|
className: "params",
|
2345
2366
|
begin: /\(/,
|
2346
2367
|
end: /\)/,
|
2347
|
-
keywords:
|
2368
|
+
keywords: M,
|
2348
2369
|
relevance: 0,
|
2349
2370
|
contains: [
|
2350
2371
|
s,
|
2351
2372
|
e.C_BLOCK_COMMENT_MODE,
|
2352
2373
|
l,
|
2353
|
-
|
2374
|
+
g,
|
2354
2375
|
i,
|
2355
2376
|
// Count matching parentheses.
|
2356
2377
|
{
|
2357
2378
|
begin: /\(/,
|
2358
2379
|
end: /\)/,
|
2359
|
-
keywords:
|
2380
|
+
keywords: M,
|
2360
2381
|
relevance: 0,
|
2361
2382
|
contains: [
|
2362
2383
|
"self",
|
2363
2384
|
s,
|
2364
2385
|
e.C_BLOCK_COMMENT_MODE,
|
2365
2386
|
l,
|
2366
|
-
|
2387
|
+
g,
|
2367
2388
|
i
|
2368
2389
|
]
|
2369
2390
|
}
|
@@ -2386,21 +2407,21 @@ function Rr() {
|
|
2386
2407
|
"hxx",
|
2387
2408
|
"cxx"
|
2388
2409
|
],
|
2389
|
-
keywords:
|
2410
|
+
keywords: M,
|
2390
2411
|
illegal: "</",
|
2391
2412
|
classNameAliases: { "function.dispatch": "built_in" },
|
2392
2413
|
contains: [].concat(
|
2393
2414
|
v,
|
2394
2415
|
C,
|
2395
2416
|
L,
|
2396
|
-
|
2417
|
+
B,
|
2397
2418
|
[
|
2398
2419
|
b,
|
2399
2420
|
{
|
2400
2421
|
// containers: ie, `vector <int> rooms (9);`
|
2401
2422
|
begin: "\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",
|
2402
2423
|
end: ">",
|
2403
|
-
keywords:
|
2424
|
+
keywords: M,
|
2404
2425
|
contains: [
|
2405
2426
|
"self",
|
2406
2427
|
i
|
@@ -2408,7 +2429,7 @@ function Rr() {
|
|
2408
2429
|
},
|
2409
2430
|
{
|
2410
2431
|
begin: e.IDENT_RE + "::",
|
2411
|
-
keywords:
|
2432
|
+
keywords: M
|
2412
2433
|
},
|
2413
2434
|
{
|
2414
2435
|
match: [
|
@@ -2426,13 +2447,13 @@ function Rr() {
|
|
2426
2447
|
)
|
2427
2448
|
};
|
2428
2449
|
}
|
2429
|
-
return
|
2450
|
+
return Be = n, Be;
|
2430
2451
|
}
|
2431
|
-
var
|
2452
|
+
var Ue, kn;
|
2432
2453
|
function Ar() {
|
2433
|
-
if (
|
2434
|
-
return
|
2435
|
-
|
2454
|
+
if (kn)
|
2455
|
+
return Ue;
|
2456
|
+
kn = 1;
|
2436
2457
|
function n(e) {
|
2437
2458
|
const t = [
|
2438
2459
|
"bool",
|
@@ -2586,7 +2607,7 @@ function Ar() {
|
|
2586
2607
|
begin: '@"',
|
2587
2608
|
end: '"',
|
2588
2609
|
contains: [{ begin: '""' }]
|
2589
|
-
},
|
2610
|
+
}, g = e.inherit(l, { illegal: /\n/ }), b = {
|
2590
2611
|
className: "subst",
|
2591
2612
|
begin: /\{/,
|
2592
2613
|
end: /\}/,
|
@@ -2612,7 +2633,7 @@ function Ar() {
|
|
2612
2633
|
{ begin: '""' },
|
2613
2634
|
b
|
2614
2635
|
]
|
2615
|
-
},
|
2636
|
+
}, N = e.inherit(E, {
|
2616
2637
|
illegal: /\n/,
|
2617
2638
|
contains: [
|
2618
2639
|
{ begin: /\{\{/ },
|
@@ -2630,28 +2651,28 @@ function Ar() {
|
|
2630
2651
|
d,
|
2631
2652
|
e.C_BLOCK_COMMENT_MODE
|
2632
2653
|
], p.contains = [
|
2633
|
-
|
2654
|
+
N,
|
2634
2655
|
m,
|
2635
|
-
|
2656
|
+
g,
|
2636
2657
|
e.APOS_STRING_MODE,
|
2637
2658
|
e.QUOTE_STRING_MODE,
|
2638
2659
|
d,
|
2639
2660
|
e.inherit(e.C_BLOCK_COMMENT_MODE, { illegal: /\n/ })
|
2640
2661
|
];
|
2641
|
-
const
|
2662
|
+
const h = { variants: [
|
2642
2663
|
E,
|
2643
2664
|
m,
|
2644
2665
|
l,
|
2645
2666
|
e.APOS_STRING_MODE,
|
2646
2667
|
e.QUOTE_STRING_MODE
|
2647
|
-
] },
|
2668
|
+
] }, S = {
|
2648
2669
|
begin: "<",
|
2649
2670
|
end: ">",
|
2650
2671
|
contains: [
|
2651
2672
|
{ beginKeywords: "in out" },
|
2652
2673
|
i
|
2653
2674
|
]
|
2654
|
-
},
|
2675
|
+
}, I = e.IDENT_RE + "(<" + e.IDENT_RE + "(\\s*,\\s*" + e.IDENT_RE + ")*>)?(\\[\\])?", A = {
|
2655
2676
|
// prevents expressions like `@class` from incorrect flagging
|
2656
2677
|
// `class` as a keyword
|
2657
2678
|
begin: "@" + e.IDENT_RE,
|
@@ -2697,7 +2718,7 @@ function Ar() {
|
|
2697
2718
|
end: "$",
|
2698
2719
|
keywords: { keyword: "if else elif endif define undef warning error line region endregion pragma checksum" }
|
2699
2720
|
},
|
2700
|
-
|
2721
|
+
h,
|
2701
2722
|
d,
|
2702
2723
|
{
|
2703
2724
|
beginKeywords: "class interface",
|
@@ -2707,7 +2728,7 @@ function Ar() {
|
|
2707
2728
|
contains: [
|
2708
2729
|
{ beginKeywords: "where class" },
|
2709
2730
|
i,
|
2710
|
-
|
2731
|
+
S,
|
2711
2732
|
e.C_LINE_COMMENT_MODE,
|
2712
2733
|
e.C_BLOCK_COMMENT_MODE
|
2713
2734
|
]
|
@@ -2730,7 +2751,7 @@ function Ar() {
|
|
2730
2751
|
illegal: /[^\s:]/,
|
2731
2752
|
contains: [
|
2732
2753
|
i,
|
2733
|
-
|
2754
|
+
S,
|
2734
2755
|
e.C_LINE_COMMENT_MODE,
|
2735
2756
|
e.C_BLOCK_COMMENT_MODE
|
2736
2757
|
]
|
@@ -2758,7 +2779,7 @@ function Ar() {
|
|
2758
2779
|
},
|
2759
2780
|
{
|
2760
2781
|
className: "function",
|
2761
|
-
begin: "(" +
|
2782
|
+
begin: "(" + I + "\\s+)+" + e.IDENT_RE + "\\s*(<[^=]+>\\s*)?\\(",
|
2762
2783
|
returnBegin: !0,
|
2763
2784
|
end: /\s*[{;=]/,
|
2764
2785
|
excludeEnd: !0,
|
@@ -2774,7 +2795,7 @@ function Ar() {
|
|
2774
2795
|
returnBegin: !0,
|
2775
2796
|
contains: [
|
2776
2797
|
e.TITLE_MODE,
|
2777
|
-
|
2798
|
+
S
|
2778
2799
|
],
|
2779
2800
|
relevance: 0
|
2780
2801
|
},
|
@@ -2788,7 +2809,7 @@ function Ar() {
|
|
2788
2809
|
keywords: r,
|
2789
2810
|
relevance: 0,
|
2790
2811
|
contains: [
|
2791
|
-
|
2812
|
+
h,
|
2792
2813
|
d,
|
2793
2814
|
e.C_BLOCK_COMMENT_MODE
|
2794
2815
|
]
|
@@ -2797,17 +2818,17 @@ function Ar() {
|
|
2797
2818
|
e.C_BLOCK_COMMENT_MODE
|
2798
2819
|
]
|
2799
2820
|
},
|
2800
|
-
|
2821
|
+
A
|
2801
2822
|
]
|
2802
2823
|
};
|
2803
2824
|
}
|
2804
|
-
return
|
2825
|
+
return Ue = n, Ue;
|
2805
2826
|
}
|
2806
|
-
var
|
2827
|
+
var Pe, xn;
|
2807
2828
|
function Mr() {
|
2808
|
-
if (
|
2809
|
-
return
|
2810
|
-
|
2829
|
+
if (xn)
|
2830
|
+
return Pe;
|
2831
|
+
xn = 1;
|
2811
2832
|
const n = (r) => ({
|
2812
2833
|
IMPORTANT: {
|
2813
2834
|
scope: "meta",
|
@@ -3402,7 +3423,7 @@ function Mr() {
|
|
3402
3423
|
// instead of getting false positives on say `font`
|
3403
3424
|
].reverse();
|
3404
3425
|
function a(r) {
|
3405
|
-
const i = r.regex, d = n(r), l = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ },
|
3426
|
+
const i = r.regex, d = n(r), l = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ }, g = "and or not only", b = /@-?\w[\w]*(-\w+)*/, p = "[a-zA-Z-][a-zA-Z0-9_-]*", m = [
|
3406
3427
|
r.APOS_STRING_MODE,
|
3407
3428
|
r.QUOTE_STRING_MODE
|
3408
3429
|
];
|
@@ -3503,7 +3524,7 @@ function Mr() {
|
|
3503
3524
|
relevance: 0,
|
3504
3525
|
keywords: {
|
3505
3526
|
$pattern: /[a-z-]+/,
|
3506
|
-
keyword:
|
3527
|
+
keyword: g,
|
3507
3528
|
attribute: t.join(" ")
|
3508
3529
|
},
|
3509
3530
|
contains: [
|
@@ -3524,13 +3545,13 @@ function Mr() {
|
|
3524
3545
|
]
|
3525
3546
|
};
|
3526
3547
|
}
|
3527
|
-
return
|
3548
|
+
return Pe = a, Pe;
|
3528
3549
|
}
|
3529
|
-
var
|
3550
|
+
var Fe, Dn;
|
3530
3551
|
function Ir() {
|
3531
|
-
if (
|
3532
|
-
return
|
3533
|
-
|
3552
|
+
if (Dn)
|
3553
|
+
return Fe;
|
3554
|
+
Dn = 1;
|
3534
3555
|
function n(e) {
|
3535
3556
|
const t = e.regex, s = {
|
3536
3557
|
begin: /<\/?[A-Za-z_]/,
|
@@ -3665,7 +3686,7 @@ function Ir() {
|
|
3665
3686
|
end: /\*{2}/
|
3666
3687
|
}
|
3667
3688
|
]
|
3668
|
-
},
|
3689
|
+
}, g = {
|
3669
3690
|
className: "emphasis",
|
3670
3691
|
contains: [],
|
3671
3692
|
// defined later
|
@@ -3680,20 +3701,20 @@ function Ir() {
|
|
3680
3701
|
relevance: 0
|
3681
3702
|
}
|
3682
3703
|
]
|
3683
|
-
}, b = e.inherit(l, { contains: [] }), p = e.inherit(
|
3684
|
-
l.contains.push(p),
|
3704
|
+
}, b = e.inherit(l, { contains: [] }), p = e.inherit(g, { contains: [] });
|
3705
|
+
l.contains.push(p), g.contains.push(b);
|
3685
3706
|
let m = [
|
3686
3707
|
s,
|
3687
3708
|
d
|
3688
3709
|
];
|
3689
3710
|
return [
|
3690
3711
|
l,
|
3691
|
-
|
3712
|
+
g,
|
3692
3713
|
b,
|
3693
3714
|
p
|
3694
|
-
].forEach((
|
3695
|
-
|
3696
|
-
}), m = m.concat(l,
|
3715
|
+
].forEach((h) => {
|
3716
|
+
h.contains = h.contains.concat(m);
|
3717
|
+
}), m = m.concat(l, g), {
|
3697
3718
|
name: "Markdown",
|
3698
3719
|
aliases: [
|
3699
3720
|
"md",
|
@@ -3725,7 +3746,7 @@ function Ir() {
|
|
3725
3746
|
s,
|
3726
3747
|
a,
|
3727
3748
|
l,
|
3728
|
-
|
3749
|
+
g,
|
3729
3750
|
{
|
3730
3751
|
className: "quote",
|
3731
3752
|
begin: "^>\\s+",
|
@@ -3739,13 +3760,13 @@ function Ir() {
|
|
3739
3760
|
]
|
3740
3761
|
};
|
3741
3762
|
}
|
3742
|
-
return
|
3763
|
+
return Fe = n, Fe;
|
3743
3764
|
}
|
3744
|
-
var
|
3765
|
+
var $e, Ln;
|
3745
3766
|
function Cr() {
|
3746
|
-
if (
|
3747
|
-
return
|
3748
|
-
|
3767
|
+
if (Ln)
|
3768
|
+
return $e;
|
3769
|
+
Ln = 1;
|
3749
3770
|
function n(e) {
|
3750
3771
|
const t = e.regex;
|
3751
3772
|
return {
|
@@ -3797,13 +3818,13 @@ function Cr() {
|
|
3797
3818
|
]
|
3798
3819
|
};
|
3799
3820
|
}
|
3800
|
-
return
|
3821
|
+
return $e = n, $e;
|
3801
3822
|
}
|
3802
|
-
var
|
3823
|
+
var ze, Bn;
|
3803
3824
|
function kr() {
|
3804
|
-
if (
|
3805
|
-
return
|
3806
|
-
|
3825
|
+
if (Bn)
|
3826
|
+
return ze;
|
3827
|
+
Bn = 1;
|
3807
3828
|
function n(e) {
|
3808
3829
|
const t = e.regex, s = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)", c = t.either(
|
3809
3830
|
/\b([A-Z]+[a-z0-9]+)+/,
|
@@ -3900,7 +3921,7 @@ function kr() {
|
|
3900
3921
|
}
|
3901
3922
|
),
|
3902
3923
|
e.COMMENT("^__END__", e.MATCH_NOTHING_RE)
|
3903
|
-
],
|
3924
|
+
], g = {
|
3904
3925
|
className: "subst",
|
3905
3926
|
begin: /#\{/,
|
3906
3927
|
end: /\}/,
|
@@ -3909,7 +3930,7 @@ function kr() {
|
|
3909
3930
|
className: "string",
|
3910
3931
|
contains: [
|
3911
3932
|
e.BACKSLASH_ESCAPE,
|
3912
|
-
|
3933
|
+
g
|
3913
3934
|
],
|
3914
3935
|
variants: [
|
3915
3936
|
{
|
@@ -3978,7 +3999,7 @@ function kr() {
|
|
3978
3999
|
end: /(\w+)/,
|
3979
4000
|
contains: [
|
3980
4001
|
e.BACKSLASH_ESCAPE,
|
3981
|
-
|
4002
|
+
g
|
3982
4003
|
]
|
3983
4004
|
})
|
3984
4005
|
]
|
@@ -3999,7 +4020,7 @@ function kr() {
|
|
3999
4020
|
// 0-prefixed implicit octal integer, optionally rational and/or imaginary
|
4000
4021
|
{ begin: "\\b0(_?[0-7])+r?i?\\b" }
|
4001
4022
|
]
|
4002
|
-
},
|
4023
|
+
}, N = {
|
4003
4024
|
variants: [
|
4004
4025
|
{
|
4005
4026
|
match: /\(\)/
|
@@ -4013,7 +4034,7 @@ function kr() {
|
|
4013
4034
|
keywords: r
|
4014
4035
|
}
|
4015
4036
|
]
|
4016
|
-
},
|
4037
|
+
}, B = [
|
4017
4038
|
b,
|
4018
4039
|
{
|
4019
4040
|
variants: [
|
@@ -4079,7 +4100,7 @@ function kr() {
|
|
4079
4100
|
3: "title.function"
|
4080
4101
|
},
|
4081
4102
|
contains: [
|
4082
|
-
|
4103
|
+
N
|
4083
4104
|
]
|
4084
4105
|
},
|
4085
4106
|
{
|
@@ -4126,7 +4147,7 @@ function kr() {
|
|
4126
4147
|
className: "regexp",
|
4127
4148
|
contains: [
|
4128
4149
|
e.BACKSLASH_ESCAPE,
|
4129
|
-
|
4150
|
+
g
|
4130
4151
|
],
|
4131
4152
|
illegal: /\n/,
|
4132
4153
|
variants: [
|
@@ -4156,22 +4177,22 @@ function kr() {
|
|
4156
4177
|
relevance: 0
|
4157
4178
|
}
|
4158
4179
|
].concat(d, l);
|
4159
|
-
|
4160
|
-
const v = "[>?]>", C = "[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]",
|
4180
|
+
g.contains = B, N.contains = B;
|
4181
|
+
const v = "[>?]>", C = "[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]", G = "(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>", F = [
|
4161
4182
|
{
|
4162
4183
|
begin: /^\s*=>/,
|
4163
4184
|
starts: {
|
4164
4185
|
end: "$",
|
4165
|
-
contains:
|
4186
|
+
contains: B
|
4166
4187
|
}
|
4167
4188
|
},
|
4168
4189
|
{
|
4169
4190
|
className: "meta.prompt",
|
4170
|
-
begin: "^(" + v + "|" + C + "|" +
|
4191
|
+
begin: "^(" + v + "|" + C + "|" + G + ")(?=[ ])",
|
4171
4192
|
starts: {
|
4172
4193
|
end: "$",
|
4173
4194
|
keywords: r,
|
4174
|
-
contains:
|
4195
|
+
contains: B
|
4175
4196
|
}
|
4176
4197
|
}
|
4177
4198
|
];
|
@@ -4186,16 +4207,16 @@ function kr() {
|
|
4186
4207
|
],
|
4187
4208
|
keywords: r,
|
4188
4209
|
illegal: /\/\*/,
|
4189
|
-
contains: [e.SHEBANG({ binary: "ruby" })].concat(
|
4210
|
+
contains: [e.SHEBANG({ binary: "ruby" })].concat(F).concat(l).concat(B)
|
4190
4211
|
};
|
4191
4212
|
}
|
4192
|
-
return
|
4213
|
+
return ze = n, ze;
|
4193
4214
|
}
|
4194
|
-
var
|
4215
|
+
var Ke, Un;
|
4195
4216
|
function xr() {
|
4196
|
-
if (
|
4197
|
-
return
|
4198
|
-
|
4217
|
+
if (Un)
|
4218
|
+
return Ke;
|
4219
|
+
Un = 1;
|
4199
4220
|
function n(e) {
|
4200
4221
|
const a = {
|
4201
4222
|
keyword: [
|
@@ -4324,13 +4345,13 @@ function xr() {
|
|
4324
4345
|
]
|
4325
4346
|
};
|
4326
4347
|
}
|
4327
|
-
return
|
4348
|
+
return Ke = n, Ke;
|
4328
4349
|
}
|
4329
|
-
var
|
4350
|
+
var qe, Pn;
|
4330
4351
|
function Dr() {
|
4331
|
-
if (
|
4332
|
-
return
|
4333
|
-
|
4352
|
+
if (Pn)
|
4353
|
+
return qe;
|
4354
|
+
Pn = 1;
|
4334
4355
|
function n(e) {
|
4335
4356
|
const t = e.regex, s = /[_A-Za-z][_0-9A-Za-z]*/;
|
4336
4357
|
return {
|
@@ -4398,13 +4419,13 @@ function Dr() {
|
|
4398
4419
|
]
|
4399
4420
|
};
|
4400
4421
|
}
|
4401
|
-
return
|
4422
|
+
return qe = n, qe;
|
4402
4423
|
}
|
4403
|
-
var
|
4424
|
+
var He, Fn;
|
4404
4425
|
function Lr() {
|
4405
|
-
if (
|
4406
|
-
return
|
4407
|
-
|
4426
|
+
if (Fn)
|
4427
|
+
return He;
|
4428
|
+
Fn = 1;
|
4408
4429
|
function n(e) {
|
4409
4430
|
const t = e.regex, s = {
|
4410
4431
|
className: "number",
|
@@ -4468,10 +4489,10 @@ function Lr() {
|
|
4468
4489
|
"self"
|
4469
4490
|
],
|
4470
4491
|
relevance: 0
|
4471
|
-
}, d = /[A-Za-z0-9_-]+/, l = /"(\\"|[^"])*"/,
|
4492
|
+
}, d = /[A-Za-z0-9_-]+/, l = /"(\\"|[^"])*"/, g = /'[^']*'/, b = t.either(
|
4472
4493
|
d,
|
4473
4494
|
l,
|
4474
|
-
|
4495
|
+
g
|
4475
4496
|
), p = t.concat(
|
4476
4497
|
b,
|
4477
4498
|
"(\\s*\\.\\s*",
|
@@ -4509,13 +4530,13 @@ function Lr() {
|
|
4509
4530
|
]
|
4510
4531
|
};
|
4511
4532
|
}
|
4512
|
-
return
|
4533
|
+
return He = n, He;
|
4513
4534
|
}
|
4514
|
-
var Ge,
|
4535
|
+
var Ge, $n;
|
4515
4536
|
function Br() {
|
4516
|
-
if (
|
4537
|
+
if ($n)
|
4517
4538
|
return Ge;
|
4518
|
-
|
4539
|
+
$n = 1;
|
4519
4540
|
var n = "[0-9](_*[0-9])*", e = `\\.(${n})`, t = "[0-9a-fA-F](_*[0-9a-fA-F])*", s = {
|
4520
4541
|
className: "number",
|
4521
4542
|
variants: [
|
@@ -4618,7 +4639,7 @@ function Br() {
|
|
4618
4639
|
// allow nested () inside our annotation
|
4619
4640
|
}
|
4620
4641
|
]
|
4621
|
-
},
|
4642
|
+
}, N = {
|
4622
4643
|
className: "params",
|
4623
4644
|
begin: /\(/,
|
4624
4645
|
end: /\)/,
|
@@ -4708,7 +4729,7 @@ function Br() {
|
|
4708
4729
|
3: "title.class"
|
4709
4730
|
},
|
4710
4731
|
contains: [
|
4711
|
-
|
4732
|
+
N,
|
4712
4733
|
a.C_LINE_COMMENT_MODE,
|
4713
4734
|
a.C_BLOCK_COMMENT_MODE
|
4714
4735
|
]
|
@@ -4753,11 +4774,11 @@ function Br() {
|
|
4753
4774
|
}
|
4754
4775
|
return Ge = o, Ge;
|
4755
4776
|
}
|
4756
|
-
var
|
4777
|
+
var We, zn;
|
4757
4778
|
function Ur() {
|
4758
|
-
if (
|
4759
|
-
return
|
4760
|
-
|
4779
|
+
if (zn)
|
4780
|
+
return We;
|
4781
|
+
zn = 1;
|
4761
4782
|
const n = "[A-Za-z$_][0-9A-Za-z$_]*", e = [
|
4762
4783
|
"as",
|
4763
4784
|
// for exports
|
@@ -4893,6 +4914,7 @@ function Ur() {
|
|
4893
4914
|
"window",
|
4894
4915
|
"document",
|
4895
4916
|
"localStorage",
|
4917
|
+
"sessionStorage",
|
4896
4918
|
"module",
|
4897
4919
|
"global"
|
4898
4920
|
// Node.js
|
@@ -4902,9 +4924,9 @@ function Ur() {
|
|
4902
4924
|
c
|
4903
4925
|
);
|
4904
4926
|
function i(d) {
|
4905
|
-
const l = d.regex,
|
4906
|
-
const
|
4907
|
-
return
|
4927
|
+
const l = d.regex, g = (H, { after: K }) => {
|
4928
|
+
const Q = "</" + H[0].slice(1);
|
4929
|
+
return H.input.indexOf(Q, K) !== -1;
|
4908
4930
|
}, b = n, p = {
|
4909
4931
|
begin: "<>",
|
4910
4932
|
end: "</>"
|
@@ -4915,43 +4937,43 @@ function Ur() {
|
|
4915
4937
|
* @param {RegExpMatchArray} match
|
4916
4938
|
* @param {CallbackResponse} response
|
4917
4939
|
*/
|
4918
|
-
isTrulyOpeningTag: (
|
4919
|
-
const
|
4940
|
+
isTrulyOpeningTag: (H, K) => {
|
4941
|
+
const Q = H[0].length + H.index, j = H.input[Q];
|
4920
4942
|
if (
|
4921
4943
|
// HTML should not include another raw `<` inside a tag
|
4922
4944
|
// nested type?
|
4923
4945
|
// `<Array<Array<number>>`, etc.
|
4924
|
-
|
4946
|
+
j === "<" || // the , gives away that this is not HTML
|
4925
4947
|
// `<T, A extends keyof T, V>`
|
4926
|
-
|
4948
|
+
j === ","
|
4927
4949
|
) {
|
4928
|
-
|
4950
|
+
K.ignoreMatch();
|
4929
4951
|
return;
|
4930
4952
|
}
|
4931
|
-
|
4932
|
-
let
|
4933
|
-
const
|
4934
|
-
if (
|
4935
|
-
|
4953
|
+
j === ">" && (g(H, { after: Q }) || K.ignoreMatch());
|
4954
|
+
let ee;
|
4955
|
+
const ae = H.input.substring(Q);
|
4956
|
+
if (ee = ae.match(/^\s*=/)) {
|
4957
|
+
K.ignoreMatch();
|
4936
4958
|
return;
|
4937
4959
|
}
|
4938
|
-
if ((
|
4939
|
-
|
4960
|
+
if ((ee = ae.match(/^\s+extends\s+/)) && ee.index === 0) {
|
4961
|
+
K.ignoreMatch();
|
4940
4962
|
return;
|
4941
4963
|
}
|
4942
4964
|
}
|
4943
|
-
},
|
4965
|
+
}, N = {
|
4944
4966
|
$pattern: n,
|
4945
4967
|
keyword: e,
|
4946
4968
|
literal: t,
|
4947
4969
|
built_in: r,
|
4948
4970
|
"variable.language": a
|
4949
|
-
},
|
4971
|
+
}, h = "[0-9](_?[0-9])*", S = `\\.(${h})`, I = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", A = {
|
4950
4972
|
className: "number",
|
4951
4973
|
variants: [
|
4952
4974
|
// DecimalLiteral
|
4953
|
-
{ begin: `(\\b(${
|
4954
|
-
{ begin: `\\b(${
|
4975
|
+
{ begin: `(\\b(${I})((${S})|\\.)?|(${S}))[eE][+-]?(${h})\\b` },
|
4976
|
+
{ begin: `\\b(${I})\\b((${S})\\b|\\.)?|(${S})\\b` },
|
4955
4977
|
// DecimalBigIntegerLiteral
|
4956
4978
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
4957
4979
|
// NonDecimalIntegerLiteral
|
@@ -4963,11 +4985,11 @@ function Ur() {
|
|
4963
4985
|
{ begin: "\\b0[0-7]+n?\\b" }
|
4964
4986
|
],
|
4965
4987
|
relevance: 0
|
4966
|
-
},
|
4988
|
+
}, M = {
|
4967
4989
|
className: "subst",
|
4968
4990
|
begin: "\\$\\{",
|
4969
4991
|
end: "\\}",
|
4970
|
-
keywords:
|
4992
|
+
keywords: N,
|
4971
4993
|
contains: []
|
4972
4994
|
// defined later
|
4973
4995
|
}, L = {
|
@@ -4978,11 +5000,11 @@ function Ur() {
|
|
4978
5000
|
returnEnd: !1,
|
4979
5001
|
contains: [
|
4980
5002
|
d.BACKSLASH_ESCAPE,
|
4981
|
-
|
5003
|
+
M
|
4982
5004
|
],
|
4983
5005
|
subLanguage: "xml"
|
4984
5006
|
}
|
4985
|
-
},
|
5007
|
+
}, B = {
|
4986
5008
|
begin: "css`",
|
4987
5009
|
end: "",
|
4988
5010
|
starts: {
|
@@ -4990,19 +5012,31 @@ function Ur() {
|
|
4990
5012
|
returnEnd: !1,
|
4991
5013
|
contains: [
|
4992
5014
|
d.BACKSLASH_ESCAPE,
|
4993
|
-
|
5015
|
+
M
|
4994
5016
|
],
|
4995
5017
|
subLanguage: "css"
|
4996
5018
|
}
|
4997
5019
|
}, v = {
|
5020
|
+
begin: "gql`",
|
5021
|
+
end: "",
|
5022
|
+
starts: {
|
5023
|
+
end: "`",
|
5024
|
+
returnEnd: !1,
|
5025
|
+
contains: [
|
5026
|
+
d.BACKSLASH_ESCAPE,
|
5027
|
+
M
|
5028
|
+
],
|
5029
|
+
subLanguage: "graphql"
|
5030
|
+
}
|
5031
|
+
}, C = {
|
4998
5032
|
className: "string",
|
4999
5033
|
begin: "`",
|
5000
5034
|
end: "`",
|
5001
5035
|
contains: [
|
5002
5036
|
d.BACKSLASH_ESCAPE,
|
5003
|
-
|
5037
|
+
M
|
5004
5038
|
]
|
5005
|
-
},
|
5039
|
+
}, F = {
|
5006
5040
|
className: "comment",
|
5007
5041
|
variants: [
|
5008
5042
|
d.COMMENT(
|
@@ -5047,46 +5081,47 @@ function Ur() {
|
|
5047
5081
|
d.C_BLOCK_COMMENT_MODE,
|
5048
5082
|
d.C_LINE_COMMENT_MODE
|
5049
5083
|
]
|
5050
|
-
},
|
5084
|
+
}, J = [
|
5051
5085
|
d.APOS_STRING_MODE,
|
5052
5086
|
d.QUOTE_STRING_MODE,
|
5053
5087
|
L,
|
5054
|
-
|
5088
|
+
B,
|
5055
5089
|
v,
|
5090
|
+
C,
|
5056
5091
|
// Skip numbers when they are part of a variable name
|
5057
5092
|
{ match: /\$\d+/ },
|
5058
|
-
|
5093
|
+
A
|
5059
5094
|
// This is intentional:
|
5060
5095
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
5061
5096
|
// hljs.REGEXP_MODE
|
5062
5097
|
];
|
5063
|
-
|
5098
|
+
M.contains = J.concat({
|
5064
5099
|
// we need to pair up {} inside our subst to prevent
|
5065
5100
|
// it from ending too early by matching another }
|
5066
5101
|
begin: /\{/,
|
5067
5102
|
end: /\}/,
|
5068
|
-
keywords:
|
5103
|
+
keywords: N,
|
5069
5104
|
contains: [
|
5070
5105
|
"self"
|
5071
|
-
].concat(
|
5106
|
+
].concat(J)
|
5072
5107
|
});
|
5073
|
-
const
|
5108
|
+
const re = [].concat(F, M.contains), W = re.concat([
|
5074
5109
|
// eat recursive parens in sub expressions
|
5075
5110
|
{
|
5076
5111
|
begin: /\(/,
|
5077
5112
|
end: /\)/,
|
5078
|
-
keywords:
|
5079
|
-
contains: ["self"].concat(
|
5113
|
+
keywords: N,
|
5114
|
+
contains: ["self"].concat(re)
|
5080
5115
|
}
|
5081
|
-
]),
|
5116
|
+
]), U = {
|
5082
5117
|
className: "params",
|
5083
5118
|
begin: /\(/,
|
5084
5119
|
end: /\)/,
|
5085
5120
|
excludeBegin: !0,
|
5086
5121
|
excludeEnd: !0,
|
5087
|
-
keywords:
|
5088
|
-
contains:
|
5089
|
-
},
|
5122
|
+
keywords: N,
|
5123
|
+
contains: W
|
5124
|
+
}, X = {
|
5090
5125
|
variants: [
|
5091
5126
|
// class Car extends vehicle
|
5092
5127
|
{
|
@@ -5119,7 +5154,7 @@ function Ur() {
|
|
5119
5154
|
}
|
5120
5155
|
}
|
5121
5156
|
]
|
5122
|
-
},
|
5157
|
+
}, u = {
|
5123
5158
|
relevance: 0,
|
5124
5159
|
match: l.either(
|
5125
5160
|
// Hard coded exceptions
|
@@ -5143,12 +5178,12 @@ function Ur() {
|
|
5143
5178
|
...c
|
5144
5179
|
]
|
5145
5180
|
}
|
5146
|
-
},
|
5181
|
+
}, f = {
|
5147
5182
|
label: "use_strict",
|
5148
5183
|
className: "meta",
|
5149
5184
|
relevance: 10,
|
5150
5185
|
begin: /^\s*['"]use (strict|asm)['"]/
|
5151
|
-
},
|
5186
|
+
}, O = {
|
5152
5187
|
variants: [
|
5153
5188
|
{
|
5154
5189
|
match: [
|
@@ -5171,20 +5206,20 @@ function Ur() {
|
|
5171
5206
|
3: "title.function"
|
5172
5207
|
},
|
5173
5208
|
label: "func.def",
|
5174
|
-
contains: [
|
5209
|
+
contains: [U],
|
5175
5210
|
illegal: /%/
|
5176
|
-
},
|
5211
|
+
}, x = {
|
5177
5212
|
relevance: 0,
|
5178
5213
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
5179
5214
|
className: "variable.constant"
|
5180
5215
|
};
|
5181
|
-
function
|
5182
|
-
return l.concat("(?!",
|
5216
|
+
function P(H) {
|
5217
|
+
return l.concat("(?!", H.join("|"), ")");
|
5183
5218
|
}
|
5184
|
-
const
|
5219
|
+
const Y = {
|
5185
5220
|
match: l.concat(
|
5186
5221
|
/\b/,
|
5187
|
-
|
5222
|
+
P([
|
5188
5223
|
...o,
|
5189
5224
|
"super",
|
5190
5225
|
"import"
|
@@ -5194,7 +5229,7 @@ function Ur() {
|
|
5194
5229
|
),
|
5195
5230
|
className: "title.function",
|
5196
5231
|
relevance: 0
|
5197
|
-
},
|
5232
|
+
}, ne = {
|
5198
5233
|
begin: l.concat(/\./, l.lookahead(
|
5199
5234
|
l.concat(b, /(?![0-9A-Za-z$_(])/)
|
5200
5235
|
)),
|
@@ -5203,7 +5238,7 @@ function Ur() {
|
|
5203
5238
|
keywords: "prototype",
|
5204
5239
|
className: "property",
|
5205
5240
|
relevance: 0
|
5206
|
-
},
|
5241
|
+
}, te = {
|
5207
5242
|
match: [
|
5208
5243
|
/get|set/,
|
5209
5244
|
/\s+/,
|
@@ -5219,9 +5254,9 @@ function Ur() {
|
|
5219
5254
|
// eat to avoid empty params
|
5220
5255
|
begin: /\(\)/
|
5221
5256
|
},
|
5222
|
-
|
5257
|
+
U
|
5223
5258
|
]
|
5224
|
-
},
|
5259
|
+
}, z = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + d.UNDERSCORE_IDENT_RE + ")\\s*=>", Z = {
|
5225
5260
|
match: [
|
5226
5261
|
/const|var|let/,
|
5227
5262
|
/\s+/,
|
@@ -5230,7 +5265,7 @@ function Ur() {
|
|
5230
5265
|
/=\s*/,
|
5231
5266
|
/(async\s*)?/,
|
5232
5267
|
// async is optional
|
5233
|
-
l.lookahead(
|
5268
|
+
l.lookahead(z)
|
5234
5269
|
],
|
5235
5270
|
keywords: "async",
|
5236
5271
|
className: {
|
@@ -5238,15 +5273,15 @@ function Ur() {
|
|
5238
5273
|
3: "title.function"
|
5239
5274
|
},
|
5240
5275
|
contains: [
|
5241
|
-
|
5276
|
+
U
|
5242
5277
|
]
|
5243
5278
|
};
|
5244
5279
|
return {
|
5245
|
-
name: "
|
5280
|
+
name: "JavaScript",
|
5246
5281
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
5247
|
-
keywords:
|
5282
|
+
keywords: N,
|
5248
5283
|
// this will be extended by TypeScript
|
5249
|
-
exports: { PARAMS_CONTAINS:
|
5284
|
+
exports: { PARAMS_CONTAINS: W, CLASS_REFERENCE: u },
|
5250
5285
|
illegal: /#(?![$_A-z])/,
|
5251
5286
|
contains: [
|
5252
5287
|
d.SHEBANG({
|
@@ -5254,37 +5289,38 @@ function Ur() {
|
|
5254
5289
|
binary: "node",
|
5255
5290
|
relevance: 5
|
5256
5291
|
}),
|
5257
|
-
|
5292
|
+
f,
|
5258
5293
|
d.APOS_STRING_MODE,
|
5259
5294
|
d.QUOTE_STRING_MODE,
|
5260
5295
|
L,
|
5261
|
-
|
5296
|
+
B,
|
5262
5297
|
v,
|
5263
|
-
|
5298
|
+
C,
|
5299
|
+
F,
|
5264
5300
|
// Skip numbers when they are part of a variable name
|
5265
5301
|
{ match: /\$\d+/ },
|
5266
|
-
|
5267
|
-
|
5302
|
+
A,
|
5303
|
+
u,
|
5268
5304
|
{
|
5269
5305
|
className: "attr",
|
5270
5306
|
begin: b + l.lookahead(":"),
|
5271
5307
|
relevance: 0
|
5272
5308
|
},
|
5273
|
-
|
5309
|
+
Z,
|
5274
5310
|
{
|
5275
5311
|
// "value" container
|
5276
5312
|
begin: "(" + d.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
5277
5313
|
keywords: "return throw case",
|
5278
5314
|
relevance: 0,
|
5279
5315
|
contains: [
|
5280
|
-
|
5316
|
+
F,
|
5281
5317
|
d.REGEXP_MODE,
|
5282
5318
|
{
|
5283
5319
|
className: "function",
|
5284
5320
|
// we have to count the parens to make sure we actually have the
|
5285
5321
|
// correct bounding ( ) before the =>. There could be any number of
|
5286
5322
|
// sub-expressions inside also surrounded by parens.
|
5287
|
-
begin:
|
5323
|
+
begin: z,
|
5288
5324
|
returnBegin: !0,
|
5289
5325
|
end: "\\s*=>",
|
5290
5326
|
contains: [
|
@@ -5305,8 +5341,8 @@ function Ur() {
|
|
5305
5341
|
end: /\)/,
|
5306
5342
|
excludeBegin: !0,
|
5307
5343
|
excludeEnd: !0,
|
5308
|
-
keywords:
|
5309
|
-
contains:
|
5344
|
+
keywords: N,
|
5345
|
+
contains: W
|
5310
5346
|
}
|
5311
5347
|
]
|
5312
5348
|
}
|
@@ -5346,7 +5382,7 @@ function Ur() {
|
|
5346
5382
|
}
|
5347
5383
|
]
|
5348
5384
|
},
|
5349
|
-
|
5385
|
+
O,
|
5350
5386
|
{
|
5351
5387
|
// prevent this from getting swallowed up by function
|
5352
5388
|
// since they appear "function like"
|
@@ -5361,7 +5397,7 @@ function Ur() {
|
|
5361
5397
|
returnBegin: !0,
|
5362
5398
|
label: "func.def",
|
5363
5399
|
contains: [
|
5364
|
-
|
5400
|
+
U,
|
5365
5401
|
d.inherit(d.TITLE_MODE, { begin: b, className: "title.function" })
|
5366
5402
|
]
|
5367
5403
|
},
|
@@ -5370,7 +5406,7 @@ function Ur() {
|
|
5370
5406
|
match: /\.\.\./,
|
5371
5407
|
relevance: 0
|
5372
5408
|
},
|
5373
|
-
|
5409
|
+
ne,
|
5374
5410
|
// hack: prevents detection of keywords in some circumstances
|
5375
5411
|
// .keyword()
|
5376
5412
|
// $keyword = x
|
@@ -5381,12 +5417,12 @@ function Ur() {
|
|
5381
5417
|
{
|
5382
5418
|
match: [/\bconstructor(?=\s*\()/],
|
5383
5419
|
className: { 1: "title.function" },
|
5384
|
-
contains: [
|
5420
|
+
contains: [U]
|
5385
5421
|
},
|
5386
|
-
|
5387
|
-
|
5388
|
-
|
5389
|
-
|
5422
|
+
Y,
|
5423
|
+
x,
|
5424
|
+
X,
|
5425
|
+
te,
|
5390
5426
|
{
|
5391
5427
|
match: /\$[(.]/
|
5392
5428
|
// relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
@@ -5394,13 +5430,13 @@ function Ur() {
|
|
5394
5430
|
]
|
5395
5431
|
};
|
5396
5432
|
}
|
5397
|
-
return
|
5433
|
+
return We = i, We;
|
5398
5434
|
}
|
5399
|
-
var
|
5435
|
+
var Ye, Kn;
|
5400
5436
|
function Pr() {
|
5401
|
-
if (
|
5402
|
-
return
|
5403
|
-
|
5437
|
+
if (Kn)
|
5438
|
+
return Ye;
|
5439
|
+
Kn = 1;
|
5404
5440
|
function n(e) {
|
5405
5441
|
const t = {
|
5406
5442
|
className: "attr",
|
@@ -5435,13 +5471,13 @@ function Pr() {
|
|
5435
5471
|
illegal: "\\S"
|
5436
5472
|
};
|
5437
5473
|
}
|
5438
|
-
return
|
5474
|
+
return Ye = n, Ye;
|
5439
5475
|
}
|
5440
|
-
var
|
5476
|
+
var Ze, qn;
|
5441
5477
|
function Fr() {
|
5442
|
-
if (
|
5443
|
-
return
|
5444
|
-
|
5478
|
+
if (qn)
|
5479
|
+
return Ze;
|
5480
|
+
qn = 1;
|
5445
5481
|
var n = "[0-9](_*[0-9])*", e = `\\.(${n})`, t = "[0-9a-fA-F](_*[0-9a-fA-F])*", s = {
|
5446
5482
|
className: "number",
|
5447
5483
|
variants: [
|
@@ -5490,7 +5526,7 @@ function Fr() {
|
|
5490
5526
|
}, l = {
|
5491
5527
|
className: "variable",
|
5492
5528
|
begin: "\\$" + o.UNDERSCORE_IDENT_RE
|
5493
|
-
},
|
5529
|
+
}, g = {
|
5494
5530
|
className: "string",
|
5495
5531
|
variants: [
|
5496
5532
|
{
|
@@ -5522,7 +5558,7 @@ function Fr() {
|
|
5522
5558
|
}
|
5523
5559
|
]
|
5524
5560
|
};
|
5525
|
-
d.contains.push(
|
5561
|
+
d.contains.push(g);
|
5526
5562
|
const b = {
|
5527
5563
|
className: "meta",
|
5528
5564
|
begin: "@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*" + o.UNDERSCORE_IDENT_RE + ")?"
|
@@ -5534,7 +5570,7 @@ function Fr() {
|
|
5534
5570
|
begin: /\(/,
|
5535
5571
|
end: /\)/,
|
5536
5572
|
contains: [
|
5537
|
-
o.inherit(
|
5573
|
+
o.inherit(g, { className: "string" }),
|
5538
5574
|
"self"
|
5539
5575
|
]
|
5540
5576
|
}
|
@@ -5543,7 +5579,7 @@ function Fr() {
|
|
5543
5579
|
"/\\*",
|
5544
5580
|
"\\*/",
|
5545
5581
|
{ contains: [o.C_BLOCK_COMMENT_MODE] }
|
5546
|
-
),
|
5582
|
+
), N = { variants: [
|
5547
5583
|
{
|
5548
5584
|
className: "type",
|
5549
5585
|
begin: o.UNDERSCORE_IDENT_RE
|
@@ -5554,8 +5590,8 @@ function Fr() {
|
|
5554
5590
|
contains: []
|
5555
5591
|
// defined later
|
5556
5592
|
}
|
5557
|
-
] },
|
5558
|
-
return
|
5593
|
+
] }, h = N;
|
5594
|
+
return h.variants[1].contains = [N], N.variants[1].contains = [h], {
|
5559
5595
|
name: "Kotlin",
|
5560
5596
|
aliases: [
|
5561
5597
|
"kt",
|
@@ -5617,7 +5653,7 @@ function Fr() {
|
|
5617
5653
|
end: /[=,\/]/,
|
5618
5654
|
endsWithParent: !0,
|
5619
5655
|
contains: [
|
5620
|
-
|
5656
|
+
N,
|
5621
5657
|
o.C_LINE_COMMENT_MODE,
|
5622
5658
|
E
|
5623
5659
|
],
|
@@ -5627,7 +5663,7 @@ function Fr() {
|
|
5627
5663
|
E,
|
5628
5664
|
b,
|
5629
5665
|
p,
|
5630
|
-
|
5666
|
+
g,
|
5631
5667
|
o.C_NUMBER_MODE
|
5632
5668
|
]
|
5633
5669
|
},
|
@@ -5669,7 +5705,7 @@ function Fr() {
|
|
5669
5705
|
p
|
5670
5706
|
]
|
5671
5707
|
},
|
5672
|
-
|
5708
|
+
g,
|
5673
5709
|
{
|
5674
5710
|
className: "meta",
|
5675
5711
|
begin: "^#!/usr/bin/env",
|
@@ -5681,13 +5717,13 @@ function Fr() {
|
|
5681
5717
|
]
|
5682
5718
|
};
|
5683
5719
|
}
|
5684
|
-
return
|
5720
|
+
return Ze = c, Ze;
|
5685
5721
|
}
|
5686
|
-
var
|
5722
|
+
var Ve, Hn;
|
5687
5723
|
function $r() {
|
5688
|
-
if (
|
5689
|
-
return
|
5690
|
-
|
5724
|
+
if (Hn)
|
5725
|
+
return Ve;
|
5726
|
+
Hn = 1;
|
5691
5727
|
const n = (i) => ({
|
5692
5728
|
IMPORTANT: {
|
5693
5729
|
scope: "meta",
|
@@ -6282,35 +6318,35 @@ function $r() {
|
|
6282
6318
|
// instead of getting false positives on say `font`
|
6283
6319
|
].reverse(), a = s.concat(c);
|
6284
6320
|
function r(i) {
|
6285
|
-
const d = n(i), l = a,
|
6321
|
+
const d = n(i), l = a, g = "and or not only", b = "[\\w-]+", p = "(" + b + "|@\\{" + b + "\\})", m = [], E = [], N = function(F) {
|
6286
6322
|
return {
|
6287
6323
|
// Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings)
|
6288
6324
|
className: "string",
|
6289
|
-
begin: "~?" +
|
6325
|
+
begin: "~?" + F + ".*?" + F
|
6290
6326
|
};
|
6291
|
-
},
|
6327
|
+
}, h = function(F, J, re) {
|
6292
6328
|
return {
|
6293
|
-
className:
|
6294
|
-
begin:
|
6295
|
-
relevance:
|
6329
|
+
className: F,
|
6330
|
+
begin: J,
|
6331
|
+
relevance: re
|
6296
6332
|
};
|
6297
|
-
},
|
6333
|
+
}, S = {
|
6298
6334
|
$pattern: /[a-z-]+/,
|
6299
|
-
keyword:
|
6335
|
+
keyword: g,
|
6300
6336
|
attribute: t.join(" ")
|
6301
|
-
},
|
6337
|
+
}, I = {
|
6302
6338
|
// used only to properly balance nested parens inside mixin call, def. arg list
|
6303
6339
|
begin: "\\(",
|
6304
6340
|
end: "\\)",
|
6305
6341
|
contains: E,
|
6306
|
-
keywords:
|
6342
|
+
keywords: S,
|
6307
6343
|
relevance: 0
|
6308
6344
|
};
|
6309
6345
|
E.push(
|
6310
6346
|
i.C_LINE_COMMENT_MODE,
|
6311
6347
|
i.C_BLOCK_COMMENT_MODE,
|
6312
|
-
|
6313
|
-
|
6348
|
+
N("'"),
|
6349
|
+
N('"'),
|
6314
6350
|
d.CSS_NUMBER_MODE,
|
6315
6351
|
// fixme: it does not include dot for numbers like .5em :(
|
6316
6352
|
{
|
@@ -6322,10 +6358,10 @@ function $r() {
|
|
6322
6358
|
}
|
6323
6359
|
},
|
6324
6360
|
d.HEXCOLOR,
|
6325
|
-
|
6326
|
-
|
6327
|
-
|
6328
|
-
|
6361
|
+
I,
|
6362
|
+
h("variable", "@@?" + b, 10),
|
6363
|
+
h("variable", "@\\{" + b + "\\}"),
|
6364
|
+
h("built_in", "~?`[^`]*?`"),
|
6329
6365
|
// inline javascript (or whatever host language) *multiline* string
|
6330
6366
|
{
|
6331
6367
|
// @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):
|
@@ -6339,11 +6375,11 @@ function $r() {
|
|
6339
6375
|
{ beginKeywords: "and not" },
|
6340
6376
|
d.FUNCTION_DISPATCH
|
6341
6377
|
);
|
6342
|
-
const
|
6378
|
+
const A = E.concat({
|
6343
6379
|
begin: /\{/,
|
6344
6380
|
end: /\}/,
|
6345
6381
|
contains: m
|
6346
|
-
}),
|
6382
|
+
}), M = {
|
6347
6383
|
beginKeywords: "when",
|
6348
6384
|
endsWithParent: !0,
|
6349
6385
|
contains: [{ beginKeywords: "and not" }].concat(E)
|
@@ -6368,12 +6404,12 @@ function $r() {
|
|
6368
6404
|
}
|
6369
6405
|
}
|
6370
6406
|
]
|
6371
|
-
},
|
6407
|
+
}, B = {
|
6372
6408
|
className: "keyword",
|
6373
6409
|
begin: "@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",
|
6374
6410
|
starts: {
|
6375
6411
|
end: "[;{}]",
|
6376
|
-
keywords:
|
6412
|
+
keywords: S,
|
6377
6413
|
returnEnd: !0,
|
6378
6414
|
contains: E,
|
6379
6415
|
relevance: 0
|
@@ -6394,7 +6430,7 @@ function $r() {
|
|
6394
6430
|
starts: {
|
6395
6431
|
end: "[;}]",
|
6396
6432
|
returnEnd: !0,
|
6397
|
-
contains:
|
6433
|
+
contains: A
|
6398
6434
|
}
|
6399
6435
|
}, C = {
|
6400
6436
|
// first parse unambiguous selectors (i.e. those not starting with tag)
|
@@ -6418,19 +6454,19 @@ function $r() {
|
|
6418
6454
|
contains: [
|
6419
6455
|
i.C_LINE_COMMENT_MODE,
|
6420
6456
|
i.C_BLOCK_COMMENT_MODE,
|
6421
|
-
|
6422
|
-
|
6423
|
-
|
6457
|
+
M,
|
6458
|
+
h("keyword", "all\\b"),
|
6459
|
+
h("variable", "@\\{" + b + "\\}"),
|
6424
6460
|
// otherwise it’s identified as tag
|
6425
6461
|
{
|
6426
6462
|
begin: "\\b(" + e.join("|") + ")\\b",
|
6427
6463
|
className: "selector-tag"
|
6428
6464
|
},
|
6429
6465
|
d.CSS_NUMBER_MODE,
|
6430
|
-
|
6431
|
-
|
6432
|
-
|
6433
|
-
|
6466
|
+
h("selector-tag", p, 0),
|
6467
|
+
h("selector-id", "#" + p),
|
6468
|
+
h("selector-class", "\\." + p, 0),
|
6469
|
+
h("selector-tag", "&", 0),
|
6434
6470
|
d.ATTRIBUTE_SELECTOR_MODE,
|
6435
6471
|
{
|
6436
6472
|
className: "selector-pseudo",
|
@@ -6444,14 +6480,14 @@ function $r() {
|
|
6444
6480
|
begin: /\(/,
|
6445
6481
|
end: /\)/,
|
6446
6482
|
relevance: 0,
|
6447
|
-
contains:
|
6483
|
+
contains: A
|
6448
6484
|
},
|
6449
6485
|
// argument list of parametric mixins
|
6450
6486
|
{ begin: "!important" },
|
6451
6487
|
// eat !important after mixin call or it will be colored as tag
|
6452
6488
|
d.FUNCTION_DISPATCH
|
6453
6489
|
]
|
6454
|
-
},
|
6490
|
+
}, G = {
|
6455
6491
|
begin: b + `:(:)?(${l.join("|")})`,
|
6456
6492
|
returnBegin: !0,
|
6457
6493
|
contains: [C]
|
@@ -6459,12 +6495,12 @@ function $r() {
|
|
6459
6495
|
return m.push(
|
6460
6496
|
i.C_LINE_COMMENT_MODE,
|
6461
6497
|
i.C_BLOCK_COMMENT_MODE,
|
6462
|
-
|
6498
|
+
B,
|
6463
6499
|
v,
|
6464
|
-
|
6500
|
+
G,
|
6465
6501
|
L,
|
6466
6502
|
C,
|
6467
|
-
|
6503
|
+
M,
|
6468
6504
|
d.FUNCTION_DISPATCH
|
6469
6505
|
), {
|
6470
6506
|
name: "Less",
|
@@ -6473,13 +6509,13 @@ function $r() {
|
|
6473
6509
|
contains: m
|
6474
6510
|
};
|
6475
6511
|
}
|
6476
|
-
return
|
6512
|
+
return Ve = r, Ve;
|
6477
6513
|
}
|
6478
|
-
var
|
6514
|
+
var Xe, Gn;
|
6479
6515
|
function zr() {
|
6480
|
-
if (
|
6481
|
-
return
|
6482
|
-
|
6516
|
+
if (Gn)
|
6517
|
+
return Xe;
|
6518
|
+
Gn = 1;
|
6483
6519
|
function n(e) {
|
6484
6520
|
const t = "\\[=*\\[", s = "\\]=*\\]", c = {
|
6485
6521
|
begin: t,
|
@@ -6535,13 +6571,13 @@ function zr() {
|
|
6535
6571
|
])
|
6536
6572
|
};
|
6537
6573
|
}
|
6538
|
-
return
|
6574
|
+
return Xe = n, Xe;
|
6539
6575
|
}
|
6540
|
-
var
|
6576
|
+
var Qe, Wn;
|
6541
6577
|
function Kr() {
|
6542
|
-
if (
|
6543
|
-
return
|
6544
|
-
|
6578
|
+
if (Wn)
|
6579
|
+
return Qe;
|
6580
|
+
Wn = 1;
|
6545
6581
|
function n(e) {
|
6546
6582
|
const t = {
|
6547
6583
|
className: "variable",
|
@@ -6602,13 +6638,13 @@ function Kr() {
|
|
6602
6638
|
]
|
6603
6639
|
};
|
6604
6640
|
}
|
6605
|
-
return
|
6641
|
+
return Qe = n, Qe;
|
6606
6642
|
}
|
6607
|
-
var
|
6643
|
+
var Je, Yn;
|
6608
6644
|
function qr() {
|
6609
|
-
if (
|
6610
|
-
return
|
6611
|
-
|
6645
|
+
if (Yn)
|
6646
|
+
return Je;
|
6647
|
+
Yn = 1;
|
6612
6648
|
function n(e) {
|
6613
6649
|
const t = e.regex, s = [
|
6614
6650
|
"abs",
|
@@ -6879,22 +6915,22 @@ function qr() {
|
|
6879
6915
|
// valid but infrequent and weird
|
6880
6916
|
/#/
|
6881
6917
|
// valid but infrequent and weird
|
6882
|
-
],
|
6883
|
-
const
|
6918
|
+
], g = (m, E, N = "\\1") => {
|
6919
|
+
const h = N === "\\1" ? N : t.concat(N, E);
|
6884
6920
|
return t.concat(
|
6885
6921
|
t.concat("(?:", m, ")"),
|
6886
6922
|
E,
|
6887
6923
|
/(?:\\.|[^\\\/])*?/,
|
6888
|
-
f,
|
6889
|
-
/(?:\\.|[^\\\/])*?/,
|
6890
6924
|
h,
|
6925
|
+
/(?:\\.|[^\\\/])*?/,
|
6926
|
+
N,
|
6891
6927
|
c
|
6892
6928
|
);
|
6893
|
-
}, b = (m, E,
|
6929
|
+
}, b = (m, E, N) => t.concat(
|
6894
6930
|
t.concat("(?:", m, ")"),
|
6895
6931
|
E,
|
6896
6932
|
/(?:\\.|[^\\\/])*?/,
|
6897
|
-
|
6933
|
+
N,
|
6898
6934
|
c
|
6899
6935
|
), p = [
|
6900
6936
|
i,
|
@@ -6979,11 +7015,11 @@ function qr() {
|
|
6979
7015
|
className: "regexp",
|
6980
7016
|
variants: [
|
6981
7017
|
// allow matching common delimiters
|
6982
|
-
{ begin:
|
7018
|
+
{ begin: g("s|tr|y", t.either(...l, { capture: !0 })) },
|
6983
7019
|
// and then paired delmis
|
6984
|
-
{ begin:
|
6985
|
-
{ begin:
|
6986
|
-
{ begin:
|
7020
|
+
{ begin: g("s|tr|y", "\\(", "\\)") },
|
7021
|
+
{ begin: g("s|tr|y", "\\[", "\\]") },
|
7022
|
+
{ begin: g("s|tr|y", "\\{", "\\}") }
|
6987
7023
|
],
|
6988
7024
|
relevance: 2
|
6989
7025
|
},
|
@@ -7043,13 +7079,13 @@ function qr() {
|
|
7043
7079
|
contains: p
|
7044
7080
|
};
|
7045
7081
|
}
|
7046
|
-
return
|
7082
|
+
return Je = n, Je;
|
7047
7083
|
}
|
7048
|
-
var
|
7049
|
-
function
|
7050
|
-
if (
|
7051
|
-
return
|
7052
|
-
|
7084
|
+
var je, Zn;
|
7085
|
+
function Hr() {
|
7086
|
+
if (Zn)
|
7087
|
+
return je;
|
7088
|
+
Zn = 1;
|
7053
7089
|
function n(e) {
|
7054
7090
|
const t = {
|
7055
7091
|
className: "built_in",
|
@@ -7284,13 +7320,13 @@ function Gr() {
|
|
7284
7320
|
]
|
7285
7321
|
};
|
7286
7322
|
}
|
7287
|
-
return
|
7323
|
+
return je = n, je;
|
7288
7324
|
}
|
7289
|
-
var
|
7290
|
-
function
|
7291
|
-
if (
|
7292
|
-
return
|
7293
|
-
|
7325
|
+
var en, Vn;
|
7326
|
+
function Gr() {
|
7327
|
+
if (Vn)
|
7328
|
+
return en;
|
7329
|
+
Vn = 1;
|
7294
7330
|
function n(e) {
|
7295
7331
|
const t = e.regex, s = /(?![A-Za-z0-9])(?![$])/, c = t.concat(
|
7296
7332
|
/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,
|
@@ -7324,19 +7360,29 @@ function Hr() {
|
|
7324
7360
|
}, d = e.inherit(e.APOS_STRING_MODE, { illegal: null }), l = e.inherit(e.QUOTE_STRING_MODE, {
|
7325
7361
|
illegal: null,
|
7326
7362
|
contains: e.QUOTE_STRING_MODE.contains.concat(i)
|
7327
|
-
}),
|
7328
|
-
begin: /<<<[ \t]*(\w+)\n/,
|
7363
|
+
}), g = {
|
7364
|
+
begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
|
7329
7365
|
end: /[ \t]*(\w+)\b/,
|
7330
|
-
contains: e.QUOTE_STRING_MODE.contains.concat(i)
|
7331
|
-
|
7332
|
-
]
|
7366
|
+
contains: e.QUOTE_STRING_MODE.contains.concat(i),
|
7367
|
+
"on:begin": (W, U) => {
|
7368
|
+
U.data._beginMatch = W[1] || W[2];
|
7369
|
+
},
|
7370
|
+
"on:end": (W, U) => {
|
7371
|
+
U.data._beginMatch !== W[1] && U.ignoreMatch();
|
7372
|
+
}
|
7373
|
+
}, b = e.END_SAME_AS_BEGIN({
|
7374
|
+
begin: /<<<[ \t]*'(\w+)'\n/,
|
7375
|
+
end: /[ \t]*(\w+)\b/
|
7376
|
+
}), p = `[
|
7377
|
+
]`, m = {
|
7333
7378
|
scope: "string",
|
7334
7379
|
variants: [
|
7335
7380
|
l,
|
7336
7381
|
d,
|
7337
|
-
|
7382
|
+
g,
|
7383
|
+
b
|
7338
7384
|
]
|
7339
|
-
},
|
7385
|
+
}, E = {
|
7340
7386
|
scope: "number",
|
7341
7387
|
variants: [
|
7342
7388
|
{ begin: "\\b0[bB][01]+(?:_[01]+)*\\b" },
|
@@ -7349,7 +7395,7 @@ function Hr() {
|
|
7349
7395
|
{ begin: "(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?" }
|
7350
7396
|
],
|
7351
7397
|
relevance: 0
|
7352
|
-
},
|
7398
|
+
}, N = [
|
7353
7399
|
"false",
|
7354
7400
|
"null",
|
7355
7401
|
"true"
|
@@ -7453,7 +7499,7 @@ function Hr() {
|
|
7453
7499
|
"while",
|
7454
7500
|
"xor",
|
7455
7501
|
"yield"
|
7456
|
-
],
|
7502
|
+
], S = [
|
7457
7503
|
// Standard PHP library:
|
7458
7504
|
// <https://www.php.net/manual/en/book.spl.php>
|
7459
7505
|
"Error|0",
|
@@ -7548,22 +7594,22 @@ function Hr() {
|
|
7548
7594
|
"self",
|
7549
7595
|
"static",
|
7550
7596
|
"stdClass"
|
7551
|
-
],
|
7597
|
+
], A = {
|
7552
7598
|
keyword: h,
|
7553
|
-
literal: ((
|
7554
|
-
const
|
7555
|
-
return
|
7556
|
-
|
7557
|
-
}),
|
7558
|
-
})(
|
7559
|
-
built_in:
|
7560
|
-
}, M = (
|
7599
|
+
literal: ((W) => {
|
7600
|
+
const U = [];
|
7601
|
+
return W.forEach((X) => {
|
7602
|
+
U.push(X), X.toLowerCase() === X ? U.push(X.toUpperCase()) : U.push(X.toLowerCase());
|
7603
|
+
}), U;
|
7604
|
+
})(N),
|
7605
|
+
built_in: S
|
7606
|
+
}, M = (W) => W.map((U) => U.replace(/\|\d+$/, "")), L = { variants: [
|
7561
7607
|
{
|
7562
7608
|
match: [
|
7563
7609
|
/new/,
|
7564
|
-
t.concat(
|
7610
|
+
t.concat(p, "+"),
|
7565
7611
|
// to prevent built ins from being confused as the class constructor call
|
7566
|
-
t.concat("(?!", M(
|
7612
|
+
t.concat("(?!", M(S).join("\\b|"), "\\b)"),
|
7567
7613
|
o
|
7568
7614
|
],
|
7569
7615
|
scope: {
|
@@ -7571,14 +7617,14 @@ function Hr() {
|
|
7571
7617
|
4: "title.class"
|
7572
7618
|
}
|
7573
7619
|
}
|
7574
|
-
] },
|
7620
|
+
] }, B = t.concat(c, "\\b(?!\\()"), v = { variants: [
|
7575
7621
|
{
|
7576
7622
|
match: [
|
7577
7623
|
t.concat(
|
7578
7624
|
/::/,
|
7579
7625
|
t.lookahead(/(?!class\b)/)
|
7580
7626
|
),
|
7581
|
-
|
7627
|
+
B
|
7582
7628
|
],
|
7583
7629
|
scope: { 2: "variable.constant" }
|
7584
7630
|
},
|
@@ -7596,7 +7642,7 @@ function Hr() {
|
|
7596
7642
|
/::/,
|
7597
7643
|
t.lookahead(/(?!class\b)/)
|
7598
7644
|
),
|
7599
|
-
|
7645
|
+
B
|
7600
7646
|
],
|
7601
7647
|
scope: {
|
7602
7648
|
1: "title.class",
|
@@ -7624,51 +7670,51 @@ function Hr() {
|
|
7624
7670
|
3: "variable.language"
|
7625
7671
|
}
|
7626
7672
|
}
|
7627
|
-
] },
|
7673
|
+
] }, C = {
|
7628
7674
|
scope: "attr",
|
7629
7675
|
match: t.concat(c, t.lookahead(":"), t.lookahead(/(?!::)/))
|
7630
|
-
},
|
7676
|
+
}, G = {
|
7631
7677
|
relevance: 0,
|
7632
7678
|
begin: /\(/,
|
7633
7679
|
end: /\)/,
|
7634
|
-
keywords:
|
7680
|
+
keywords: A,
|
7635
7681
|
contains: [
|
7636
|
-
|
7682
|
+
C,
|
7637
7683
|
a,
|
7638
|
-
|
7684
|
+
v,
|
7639
7685
|
e.C_BLOCK_COMMENT_MODE,
|
7640
|
-
p,
|
7641
7686
|
m,
|
7642
|
-
|
7687
|
+
E,
|
7688
|
+
L
|
7643
7689
|
]
|
7644
|
-
},
|
7690
|
+
}, F = {
|
7645
7691
|
relevance: 0,
|
7646
7692
|
match: [
|
7647
7693
|
/\b/,
|
7648
7694
|
// to prevent keywords from being confused as the function title
|
7649
|
-
t.concat("(?!fn\\b|function\\b|", M(h).join("\\b|"), "|", M(
|
7695
|
+
t.concat("(?!fn\\b|function\\b|", M(h).join("\\b|"), "|", M(S).join("\\b|"), "\\b)"),
|
7650
7696
|
c,
|
7651
|
-
t.concat(
|
7697
|
+
t.concat(p, "*"),
|
7652
7698
|
t.lookahead(/(?=\()/)
|
7653
7699
|
],
|
7654
7700
|
scope: { 3: "title.function.invoke" },
|
7655
|
-
contains: [
|
7701
|
+
contains: [G]
|
7656
7702
|
};
|
7657
|
-
|
7658
|
-
const
|
7703
|
+
G.contains.push(F);
|
7704
|
+
const J = [
|
7705
|
+
C,
|
7659
7706
|
v,
|
7660
|
-
D,
|
7661
7707
|
e.C_BLOCK_COMMENT_MODE,
|
7662
|
-
p,
|
7663
7708
|
m,
|
7664
|
-
|
7665
|
-
|
7709
|
+
E,
|
7710
|
+
L
|
7711
|
+
], re = {
|
7666
7712
|
begin: t.concat(/#\[\s*/, o),
|
7667
7713
|
beginScope: "meta",
|
7668
7714
|
end: /]/,
|
7669
7715
|
endScope: "meta",
|
7670
7716
|
keywords: {
|
7671
|
-
literal:
|
7717
|
+
literal: N,
|
7672
7718
|
keyword: [
|
7673
7719
|
"new",
|
7674
7720
|
"array"
|
@@ -7679,7 +7725,7 @@ function Hr() {
|
|
7679
7725
|
begin: /\[/,
|
7680
7726
|
end: /]/,
|
7681
7727
|
keywords: {
|
7682
|
-
literal:
|
7728
|
+
literal: N,
|
7683
7729
|
keyword: [
|
7684
7730
|
"new",
|
7685
7731
|
"array"
|
@@ -7687,10 +7733,10 @@ function Hr() {
|
|
7687
7733
|
},
|
7688
7734
|
contains: [
|
7689
7735
|
"self",
|
7690
|
-
...
|
7736
|
+
...J
|
7691
7737
|
]
|
7692
7738
|
},
|
7693
|
-
...
|
7739
|
+
...J,
|
7694
7740
|
{
|
7695
7741
|
scope: "meta",
|
7696
7742
|
match: o
|
@@ -7699,9 +7745,9 @@ function Hr() {
|
|
7699
7745
|
};
|
7700
7746
|
return {
|
7701
7747
|
case_insensitive: !1,
|
7702
|
-
keywords:
|
7748
|
+
keywords: A,
|
7703
7749
|
contains: [
|
7704
|
-
|
7750
|
+
re,
|
7705
7751
|
e.HASH_COMMENT_MODE,
|
7706
7752
|
e.COMMENT("//", "$"),
|
7707
7753
|
e.COMMENT(
|
@@ -7735,8 +7781,8 @@ function Hr() {
|
|
7735
7781
|
match: /\$this\b/
|
7736
7782
|
},
|
7737
7783
|
a,
|
7738
|
-
|
7739
|
-
|
7784
|
+
F,
|
7785
|
+
v,
|
7740
7786
|
{
|
7741
7787
|
match: [
|
7742
7788
|
/const/,
|
@@ -7748,7 +7794,7 @@ function Hr() {
|
|
7748
7794
|
3: "variable.constant"
|
7749
7795
|
}
|
7750
7796
|
},
|
7751
|
-
|
7797
|
+
L,
|
7752
7798
|
{
|
7753
7799
|
scope: "function",
|
7754
7800
|
relevance: 0,
|
@@ -7770,14 +7816,14 @@ function Hr() {
|
|
7770
7816
|
end: "\\)",
|
7771
7817
|
excludeBegin: !0,
|
7772
7818
|
excludeEnd: !0,
|
7773
|
-
keywords:
|
7819
|
+
keywords: A,
|
7774
7820
|
contains: [
|
7775
7821
|
"self",
|
7776
7822
|
a,
|
7777
|
-
|
7823
|
+
v,
|
7778
7824
|
e.C_BLOCK_COMMENT_MODE,
|
7779
|
-
|
7780
|
-
|
7825
|
+
m,
|
7826
|
+
E
|
7781
7827
|
]
|
7782
7828
|
}
|
7783
7829
|
]
|
@@ -7826,18 +7872,18 @@ function Hr() {
|
|
7826
7872
|
e.UNDERSCORE_TITLE_MODE
|
7827
7873
|
]
|
7828
7874
|
},
|
7829
|
-
|
7830
|
-
|
7875
|
+
m,
|
7876
|
+
E
|
7831
7877
|
]
|
7832
7878
|
};
|
7833
7879
|
}
|
7834
|
-
return
|
7880
|
+
return en = n, en;
|
7835
7881
|
}
|
7836
|
-
var
|
7882
|
+
var nn, Xn;
|
7837
7883
|
function Wr() {
|
7838
|
-
if (
|
7839
|
-
return
|
7840
|
-
|
7884
|
+
if (Xn)
|
7885
|
+
return nn;
|
7886
|
+
Xn = 1;
|
7841
7887
|
function n(e) {
|
7842
7888
|
return {
|
7843
7889
|
name: "PHP template",
|
@@ -7882,13 +7928,13 @@ function Wr() {
|
|
7882
7928
|
]
|
7883
7929
|
};
|
7884
7930
|
}
|
7885
|
-
return
|
7931
|
+
return nn = n, nn;
|
7886
7932
|
}
|
7887
|
-
var
|
7933
|
+
var tn, Qn;
|
7888
7934
|
function Yr() {
|
7889
|
-
if (
|
7890
|
-
return
|
7891
|
-
|
7935
|
+
if (Qn)
|
7936
|
+
return tn;
|
7937
|
+
Qn = 1;
|
7892
7938
|
function n(e) {
|
7893
7939
|
return {
|
7894
7940
|
name: "Plain text",
|
@@ -7899,13 +7945,13 @@ function Yr() {
|
|
7899
7945
|
disableAutodetect: !0
|
7900
7946
|
};
|
7901
7947
|
}
|
7902
|
-
return
|
7948
|
+
return tn = n, tn;
|
7903
7949
|
}
|
7904
|
-
var
|
7950
|
+
var rn, Jn;
|
7905
7951
|
function Zr() {
|
7906
|
-
if (
|
7907
|
-
return
|
7908
|
-
|
7952
|
+
if (Jn)
|
7953
|
+
return rn;
|
7954
|
+
Jn = 1;
|
7909
7955
|
function n(e) {
|
7910
7956
|
const t = e.regex, s = /[\p{XID_Start}_]\p{XID_Continue}*/u, c = [
|
7911
7957
|
"and",
|
@@ -8048,7 +8094,7 @@ function Zr() {
|
|
8048
8094
|
end: /\}/,
|
8049
8095
|
keywords: i,
|
8050
8096
|
illegal: /#/
|
8051
|
-
},
|
8097
|
+
}, g = {
|
8052
8098
|
begin: /\{\{/,
|
8053
8099
|
relevance: 0
|
8054
8100
|
}, b = {
|
@@ -8079,7 +8125,7 @@ function Zr() {
|
|
8079
8125
|
contains: [
|
8080
8126
|
e.BACKSLASH_ESCAPE,
|
8081
8127
|
d,
|
8082
|
-
|
8128
|
+
g,
|
8083
8129
|
l
|
8084
8130
|
]
|
8085
8131
|
},
|
@@ -8089,7 +8135,7 @@ function Zr() {
|
|
8089
8135
|
contains: [
|
8090
8136
|
e.BACKSLASH_ESCAPE,
|
8091
8137
|
d,
|
8092
|
-
|
8138
|
+
g,
|
8093
8139
|
l
|
8094
8140
|
]
|
8095
8141
|
},
|
@@ -8116,7 +8162,7 @@ function Zr() {
|
|
8116
8162
|
end: /'/,
|
8117
8163
|
contains: [
|
8118
8164
|
e.BACKSLASH_ESCAPE,
|
8119
|
-
|
8165
|
+
g,
|
8120
8166
|
l
|
8121
8167
|
]
|
8122
8168
|
},
|
@@ -8125,14 +8171,14 @@ function Zr() {
|
|
8125
8171
|
end: /"/,
|
8126
8172
|
contains: [
|
8127
8173
|
e.BACKSLASH_ESCAPE,
|
8128
|
-
|
8174
|
+
g,
|
8129
8175
|
l
|
8130
8176
|
]
|
8131
8177
|
},
|
8132
8178
|
e.APOS_STRING_MODE,
|
8133
8179
|
e.QUOTE_STRING_MODE
|
8134
8180
|
]
|
8135
|
-
}, p = "[0-9](_?[0-9])*", m = `(\\b(${p}))?\\.(${p})|\\b(${p})\\.`, E = `\\b|${c.join("|")}`,
|
8181
|
+
}, p = "[0-9](_?[0-9])*", m = `(\\b(${p}))?\\.(${p})|\\b(${p})\\.`, E = `\\b|${c.join("|")}`, N = {
|
8136
8182
|
className: "number",
|
8137
8183
|
relevance: 0,
|
8138
8184
|
variants: [
|
@@ -8176,7 +8222,7 @@ function Zr() {
|
|
8176
8222
|
begin: `\\b(${p})[jJ](?=${E})`
|
8177
8223
|
}
|
8178
8224
|
]
|
8179
|
-
},
|
8225
|
+
}, h = {
|
8180
8226
|
className: "comment",
|
8181
8227
|
begin: t.lookahead(/# type:/),
|
8182
8228
|
end: /$/,
|
@@ -8193,7 +8239,7 @@ function Zr() {
|
|
8193
8239
|
endsWithParent: !0
|
8194
8240
|
}
|
8195
8241
|
]
|
8196
|
-
},
|
8242
|
+
}, S = {
|
8197
8243
|
className: "params",
|
8198
8244
|
variants: [
|
8199
8245
|
// Exclude params in functions without params
|
@@ -8211,7 +8257,7 @@ function Zr() {
|
|
8211
8257
|
contains: [
|
8212
8258
|
"self",
|
8213
8259
|
d,
|
8214
|
-
|
8260
|
+
N,
|
8215
8261
|
b,
|
8216
8262
|
e.HASH_COMMENT_MODE
|
8217
8263
|
]
|
@@ -8220,7 +8266,7 @@ function Zr() {
|
|
8220
8266
|
};
|
8221
8267
|
return l.contains = [
|
8222
8268
|
b,
|
8223
|
-
|
8269
|
+
N,
|
8224
8270
|
d
|
8225
8271
|
], {
|
8226
8272
|
name: "Python",
|
@@ -8231,10 +8277,10 @@ function Zr() {
|
|
8231
8277
|
],
|
8232
8278
|
unicodeRegex: !0,
|
8233
8279
|
keywords: i,
|
8234
|
-
illegal: /(
|
8280
|
+
illegal: /(<\/|\?)|=>/,
|
8235
8281
|
contains: [
|
8236
8282
|
d,
|
8237
|
-
|
8283
|
+
N,
|
8238
8284
|
{
|
8239
8285
|
// very common convention
|
8240
8286
|
begin: /\bself\b/
|
@@ -8246,7 +8292,7 @@ function Zr() {
|
|
8246
8292
|
relevance: 0
|
8247
8293
|
},
|
8248
8294
|
b,
|
8249
|
-
|
8295
|
+
h,
|
8250
8296
|
e.HASH_COMMENT_MODE,
|
8251
8297
|
{
|
8252
8298
|
match: [
|
@@ -8258,7 +8304,7 @@ function Zr() {
|
|
8258
8304
|
1: "keyword",
|
8259
8305
|
3: "title.function"
|
8260
8306
|
},
|
8261
|
-
contains: [
|
8307
|
+
contains: [S]
|
8262
8308
|
},
|
8263
8309
|
{
|
8264
8310
|
variants: [
|
@@ -8292,21 +8338,21 @@ function Zr() {
|
|
8292
8338
|
begin: /^[\t ]*@/,
|
8293
8339
|
end: /(?=#)|$/,
|
8294
8340
|
contains: [
|
8295
|
-
|
8296
|
-
|
8341
|
+
N,
|
8342
|
+
S,
|
8297
8343
|
b
|
8298
8344
|
]
|
8299
8345
|
}
|
8300
8346
|
]
|
8301
8347
|
};
|
8302
8348
|
}
|
8303
|
-
return
|
8349
|
+
return rn = n, rn;
|
8304
8350
|
}
|
8305
|
-
var
|
8351
|
+
var an, jn;
|
8306
8352
|
function Vr() {
|
8307
|
-
if (
|
8308
|
-
return
|
8309
|
-
|
8353
|
+
if (jn)
|
8354
|
+
return an;
|
8355
|
+
jn = 1;
|
8310
8356
|
function n(e) {
|
8311
8357
|
return {
|
8312
8358
|
aliases: ["pycon"],
|
@@ -8330,13 +8376,13 @@ function Vr() {
|
|
8330
8376
|
]
|
8331
8377
|
};
|
8332
8378
|
}
|
8333
|
-
return
|
8379
|
+
return an = n, an;
|
8334
8380
|
}
|
8335
|
-
var
|
8381
|
+
var sn, et;
|
8336
8382
|
function Xr() {
|
8337
|
-
if (
|
8338
|
-
return
|
8339
|
-
|
8383
|
+
if (et)
|
8384
|
+
return sn;
|
8385
|
+
et = 1;
|
8340
8386
|
function n(e) {
|
8341
8387
|
const t = e.regex, s = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/, c = t.either(
|
8342
8388
|
// Special case: only hexadecimal binary powers can contain fractions
|
@@ -8541,13 +8587,13 @@ function Xr() {
|
|
8541
8587
|
]
|
8542
8588
|
};
|
8543
8589
|
}
|
8544
|
-
return
|
8590
|
+
return sn = n, sn;
|
8545
8591
|
}
|
8546
|
-
var
|
8592
|
+
var on, nt;
|
8547
8593
|
function Qr() {
|
8548
|
-
if (
|
8549
|
-
return
|
8550
|
-
|
8594
|
+
if (nt)
|
8595
|
+
return on;
|
8596
|
+
nt = 1;
|
8551
8597
|
function n(e) {
|
8552
8598
|
const t = e.regex, s = {
|
8553
8599
|
className: "title.function.invoke",
|
@@ -8835,13 +8881,13 @@ function Qr() {
|
|
8835
8881
|
]
|
8836
8882
|
};
|
8837
8883
|
}
|
8838
|
-
return
|
8884
|
+
return on = n, on;
|
8839
8885
|
}
|
8840
|
-
var
|
8886
|
+
var cn, tt;
|
8841
8887
|
function Jr() {
|
8842
|
-
if (
|
8843
|
-
return
|
8844
|
-
|
8888
|
+
if (tt)
|
8889
|
+
return cn;
|
8890
|
+
tt = 1;
|
8845
8891
|
const n = (r) => ({
|
8846
8892
|
IMPORTANT: {
|
8847
8893
|
scope: "meta",
|
@@ -9436,7 +9482,7 @@ function Jr() {
|
|
9436
9482
|
// instead of getting false positives on say `font`
|
9437
9483
|
].reverse();
|
9438
9484
|
function a(r) {
|
9439
|
-
const i = n(r), d = c, l = s,
|
9485
|
+
const i = n(r), d = c, l = s, g = "@[a-z-]+", b = "and or not only", m = {
|
9440
9486
|
className: "variable",
|
9441
9487
|
begin: "(\\$" + "[a-zA-Z-][a-zA-Z0-9_-]*" + ")\\b",
|
9442
9488
|
relevance: 0
|
@@ -9510,7 +9556,7 @@ function Jr() {
|
|
9510
9556
|
{
|
9511
9557
|
begin: "@(page|font-face)",
|
9512
9558
|
keywords: {
|
9513
|
-
$pattern:
|
9559
|
+
$pattern: g,
|
9514
9560
|
keyword: "@page @font-face"
|
9515
9561
|
}
|
9516
9562
|
},
|
@@ -9525,7 +9571,7 @@ function Jr() {
|
|
9525
9571
|
},
|
9526
9572
|
contains: [
|
9527
9573
|
{
|
9528
|
-
begin:
|
9574
|
+
begin: g,
|
9529
9575
|
className: "keyword"
|
9530
9576
|
},
|
9531
9577
|
{
|
@@ -9543,13 +9589,13 @@ function Jr() {
|
|
9543
9589
|
]
|
9544
9590
|
};
|
9545
9591
|
}
|
9546
|
-
return
|
9592
|
+
return cn = a, cn;
|
9547
9593
|
}
|
9548
|
-
var
|
9594
|
+
var ln, rt;
|
9549
9595
|
function jr() {
|
9550
|
-
if (
|
9551
|
-
return
|
9552
|
-
|
9596
|
+
if (rt)
|
9597
|
+
return ln;
|
9598
|
+
rt = 1;
|
9553
9599
|
function n(e) {
|
9554
9600
|
return {
|
9555
9601
|
name: "Shell Session",
|
@@ -9572,13 +9618,13 @@ function jr() {
|
|
9572
9618
|
]
|
9573
9619
|
};
|
9574
9620
|
}
|
9575
|
-
return
|
9621
|
+
return ln = n, ln;
|
9576
9622
|
}
|
9577
|
-
var
|
9623
|
+
var dn, at;
|
9578
9624
|
function ea() {
|
9579
|
-
if (
|
9580
|
-
return
|
9581
|
-
|
9625
|
+
if (at)
|
9626
|
+
return dn;
|
9627
|
+
at = 1;
|
9582
9628
|
function n(e) {
|
9583
9629
|
const t = e.regex, s = e.COMMENT("--", "$"), c = {
|
9584
9630
|
className: "string",
|
@@ -10009,7 +10055,7 @@ function ea() {
|
|
10009
10055
|
"within",
|
10010
10056
|
"without",
|
10011
10057
|
"year"
|
10012
|
-
],
|
10058
|
+
], g = [
|
10013
10059
|
"abs",
|
10014
10060
|
"acos",
|
10015
10061
|
"array_agg",
|
@@ -10128,27 +10174,27 @@ function ea() {
|
|
10128
10174
|
"nulls last",
|
10129
10175
|
"depth first",
|
10130
10176
|
"breadth first"
|
10131
|
-
], m =
|
10177
|
+
], m = g, E = [
|
10132
10178
|
...l,
|
10133
10179
|
...d
|
10134
|
-
].filter((
|
10180
|
+
].filter((A) => !g.includes(A)), N = {
|
10135
10181
|
className: "variable",
|
10136
|
-
begin: /@[a-z0-9]
|
10137
|
-
},
|
10182
|
+
begin: /@[a-z0-9][a-z0-9_]*/
|
10183
|
+
}, h = {
|
10138
10184
|
className: "operator",
|
10139
10185
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
10140
10186
|
relevance: 0
|
10141
|
-
},
|
10187
|
+
}, S = {
|
10142
10188
|
begin: t.concat(/\b/, t.either(...m), /\s*\(/),
|
10143
10189
|
relevance: 0,
|
10144
10190
|
keywords: { built_in: m }
|
10145
10191
|
};
|
10146
|
-
function
|
10147
|
-
exceptions:
|
10192
|
+
function I(A, {
|
10193
|
+
exceptions: M,
|
10148
10194
|
when: L
|
10149
10195
|
} = {}) {
|
10150
|
-
const
|
10151
|
-
return
|
10196
|
+
const B = L;
|
10197
|
+
return M = M || [], A.map((v) => v.match(/\|\d+$/) || M.includes(v) ? v : B(v) ? `${v}|0` : v);
|
10152
10198
|
}
|
10153
10199
|
return {
|
10154
10200
|
name: "SQL",
|
@@ -10157,7 +10203,7 @@ function ea() {
|
|
10157
10203
|
illegal: /[{}]|<\//,
|
10158
10204
|
keywords: {
|
10159
10205
|
$pattern: /\b[\w\.]+/,
|
10160
|
-
keyword:
|
10206
|
+
keyword: I(E, { when: (A) => A.length < 3 }),
|
10161
10207
|
literal: a,
|
10162
10208
|
type: i,
|
10163
10209
|
built_in: b
|
@@ -10177,24 +10223,24 @@ function ea() {
|
|
10177
10223
|
className: "type",
|
10178
10224
|
begin: t.either(...r)
|
10179
10225
|
},
|
10180
|
-
|
10181
|
-
|
10226
|
+
S,
|
10227
|
+
N,
|
10182
10228
|
c,
|
10183
10229
|
o,
|
10184
10230
|
e.C_NUMBER_MODE,
|
10185
10231
|
e.C_BLOCK_COMMENT_MODE,
|
10186
10232
|
s,
|
10187
|
-
|
10233
|
+
h
|
10188
10234
|
]
|
10189
10235
|
};
|
10190
10236
|
}
|
10191
|
-
return
|
10237
|
+
return dn = n, dn;
|
10192
10238
|
}
|
10193
|
-
var
|
10239
|
+
var un, it;
|
10194
10240
|
function na() {
|
10195
|
-
if (
|
10196
|
-
return
|
10197
|
-
|
10241
|
+
if (it)
|
10242
|
+
return un;
|
10243
|
+
it = 1;
|
10198
10244
|
function n(v) {
|
10199
10245
|
return v ? typeof v == "string" ? v : v.source : null;
|
10200
10246
|
}
|
@@ -10202,14 +10248,14 @@ function na() {
|
|
10202
10248
|
return t("(?=", v, ")");
|
10203
10249
|
}
|
10204
10250
|
function t(...v) {
|
10205
|
-
return v.map((
|
10251
|
+
return v.map((G) => n(G)).join("");
|
10206
10252
|
}
|
10207
10253
|
function s(v) {
|
10208
10254
|
const C = v[v.length - 1];
|
10209
10255
|
return typeof C == "object" && C.constructor === Object ? (v.splice(v.length - 1, 1), C) : {};
|
10210
10256
|
}
|
10211
10257
|
function c(...v) {
|
10212
|
-
return "(" + (s(v).capture ? "" : "?:") + v.map((
|
10258
|
+
return "(" + (s(v).capture ? "" : "?:") + v.map((F) => n(F)).join("|") + ")";
|
10213
10259
|
}
|
10214
10260
|
const o = (v) => t(
|
10215
10261
|
/\b/,
|
@@ -10355,7 +10401,7 @@ function na() {
|
|
10355
10401
|
"false",
|
10356
10402
|
"nil",
|
10357
10403
|
"true"
|
10358
|
-
],
|
10404
|
+
], g = [
|
10359
10405
|
"assignment",
|
10360
10406
|
"associativity",
|
10361
10407
|
"higherThan",
|
@@ -10447,7 +10493,7 @@ function na() {
|
|
10447
10493
|
/[\uFE20-\uFE2F]/
|
10448
10494
|
// TODO: The following characters are also allowed, but the regex isn't supported yet.
|
10449
10495
|
// /[\u{E0100}-\u{E01EF}]/u
|
10450
|
-
),
|
10496
|
+
), N = t(m, E, "*"), h = c(
|
10451
10497
|
/[a-zA-Z_]/,
|
10452
10498
|
/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,
|
10453
10499
|
/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,
|
@@ -10465,11 +10511,11 @@ function na() {
|
|
10465
10511
|
// /[\u{50000}-\u{5FFFD}\u{60000-\u{6FFFD}\u{70000}-\u{7FFFD}\u{80000}-\u{8FFFD}]/u,
|
10466
10512
|
// /[\u{90000}-\u{9FFFD}\u{A0000-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}]/u,
|
10467
10513
|
// /[\u{D0000}-\u{DFFFD}\u{E0000-\u{EFFFD}]/u
|
10468
|
-
),
|
10469
|
-
|
10514
|
+
), S = c(
|
10515
|
+
h,
|
10470
10516
|
/\d/,
|
10471
10517
|
/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/
|
10472
|
-
),
|
10518
|
+
), I = t(h, S, "*"), A = t(/[A-Z]/, S, "*"), M = [
|
10473
10519
|
"autoclosure",
|
10474
10520
|
t(/convention\(/, c("swift", "block", "c"), /\)/),
|
10475
10521
|
"discardableResult",
|
@@ -10489,7 +10535,7 @@ function na() {
|
|
10489
10535
|
"NSApplicationMain",
|
10490
10536
|
"NSCopying",
|
10491
10537
|
"NSManaged",
|
10492
|
-
t(/objc\(/,
|
10538
|
+
t(/objc\(/, I, /\)/),
|
10493
10539
|
"objc",
|
10494
10540
|
"objcMembers",
|
10495
10541
|
"propertyWrapper",
|
@@ -10512,64 +10558,64 @@ function na() {
|
|
10512
10558
|
"tvOSApplicationExtension",
|
10513
10559
|
"swift"
|
10514
10560
|
];
|
10515
|
-
function
|
10561
|
+
function B(v) {
|
10516
10562
|
const C = {
|
10517
10563
|
match: /\s+/,
|
10518
10564
|
relevance: 0
|
10519
|
-
},
|
10565
|
+
}, G = v.COMMENT(
|
10520
10566
|
"/\\*",
|
10521
10567
|
"\\*/",
|
10522
10568
|
{ contains: ["self"] }
|
10523
|
-
),
|
10569
|
+
), F = [
|
10524
10570
|
v.C_LINE_COMMENT_MODE,
|
10525
|
-
|
10526
|
-
],
|
10571
|
+
G
|
10572
|
+
], J = {
|
10527
10573
|
match: [
|
10528
10574
|
/\./,
|
10529
10575
|
c(...a, ...r)
|
10530
10576
|
],
|
10531
10577
|
className: { 2: "keyword" }
|
10532
|
-
},
|
10578
|
+
}, re = {
|
10533
10579
|
// Consume .keyword to prevent highlighting properties and methods as keywords.
|
10534
10580
|
match: t(/\./, c(...d)),
|
10535
10581
|
relevance: 0
|
10536
|
-
},
|
10582
|
+
}, W = d.filter(($) => typeof $ == "string").concat(["_|0"]), U = d.filter(($) => typeof $ != "string").concat(i).map(o), X = { variants: [
|
10537
10583
|
{
|
10538
10584
|
className: "keyword",
|
10539
|
-
match: c(...
|
10585
|
+
match: c(...U, ...r)
|
10540
10586
|
}
|
10541
|
-
] },
|
10587
|
+
] }, u = {
|
10542
10588
|
$pattern: c(
|
10543
10589
|
/\b\w+/,
|
10544
10590
|
// regular keywords
|
10545
10591
|
/#\w+/
|
10546
10592
|
// number keywords
|
10547
10593
|
),
|
10548
|
-
keyword:
|
10594
|
+
keyword: W.concat(b),
|
10549
10595
|
literal: l
|
10550
|
-
},
|
10551
|
-
|
10552
|
-
|
10553
|
-
|
10554
|
-
],
|
10596
|
+
}, f = [
|
10597
|
+
J,
|
10598
|
+
re,
|
10599
|
+
X
|
10600
|
+
], O = {
|
10555
10601
|
// Consume .built_in to prevent highlighting properties and methods.
|
10556
10602
|
match: t(/\./, c(...p)),
|
10557
10603
|
relevance: 0
|
10558
|
-
},
|
10604
|
+
}, x = {
|
10559
10605
|
className: "built_in",
|
10560
10606
|
match: t(/\b/, c(...p), /(?=\()/)
|
10561
|
-
},
|
10562
|
-
|
10563
|
-
|
10564
|
-
],
|
10607
|
+
}, P = [
|
10608
|
+
O,
|
10609
|
+
x
|
10610
|
+
], Y = {
|
10565
10611
|
// Prevent -> from being highlighting as an operator.
|
10566
10612
|
match: /->/,
|
10567
10613
|
relevance: 0
|
10568
|
-
},
|
10614
|
+
}, ne = {
|
10569
10615
|
className: "operator",
|
10570
10616
|
relevance: 0,
|
10571
10617
|
variants: [
|
10572
|
-
{ match:
|
10618
|
+
{ match: N },
|
10573
10619
|
{
|
10574
10620
|
// dot-operator: only operators that start with a dot are allowed to use dots as
|
10575
10621
|
// characters (..., ...<, .*, etc). So there rule here is: a dot followed by one or more
|
@@ -10577,74 +10623,74 @@ function na() {
|
|
10577
10623
|
match: `\\.(\\.|${E})+`
|
10578
10624
|
}
|
10579
10625
|
]
|
10580
|
-
},
|
10581
|
-
|
10582
|
-
|
10583
|
-
],
|
10626
|
+
}, te = [
|
10627
|
+
Y,
|
10628
|
+
ne
|
10629
|
+
], z = "([0-9]_*)+", Z = "([0-9a-fA-F]_*)+", H = {
|
10584
10630
|
className: "number",
|
10585
10631
|
relevance: 0,
|
10586
10632
|
variants: [
|
10587
10633
|
// decimal floating-point-literal (subsumes decimal-literal)
|
10588
|
-
{ match: `\\b(${
|
10634
|
+
{ match: `\\b(${z})(\\.(${z}))?([eE][+-]?(${z}))?\\b` },
|
10589
10635
|
// hexadecimal floating-point-literal (subsumes hexadecimal-literal)
|
10590
|
-
{ match: `\\b0x(${
|
10636
|
+
{ match: `\\b0x(${Z})(\\.(${Z}))?([pP][+-]?(${z}))?\\b` },
|
10591
10637
|
// octal-literal
|
10592
10638
|
{ match: /\b0o([0-7]_*)+\b/ },
|
10593
10639
|
// binary-literal
|
10594
10640
|
{ match: /\b0b([01]_*)+\b/ }
|
10595
10641
|
]
|
10596
|
-
},
|
10642
|
+
}, K = ($ = "") => ({
|
10597
10643
|
className: "subst",
|
10598
10644
|
variants: [
|
10599
|
-
{ match: t(/\\/,
|
10600
|
-
{ match: t(/\\/,
|
10645
|
+
{ match: t(/\\/, $, /[0\\tnr"']/) },
|
10646
|
+
{ match: t(/\\/, $, /u\{[0-9a-fA-F]{1,8}\}/) }
|
10601
10647
|
]
|
10602
|
-
}),
|
10648
|
+
}), Q = ($ = "") => ({
|
10603
10649
|
className: "subst",
|
10604
|
-
match: t(/\\/,
|
10605
|
-
}),
|
10650
|
+
match: t(/\\/, $, /[\t ]*(?:[\r\n]|\r\n)/)
|
10651
|
+
}), j = ($ = "") => ({
|
10606
10652
|
className: "subst",
|
10607
10653
|
label: "interpol",
|
10608
|
-
begin: t(/\\/,
|
10654
|
+
begin: t(/\\/, $, /\(/),
|
10609
10655
|
end: /\)/
|
10610
|
-
}),
|
10611
|
-
begin: t(
|
10612
|
-
end: t(/"""/,
|
10656
|
+
}), ee = ($ = "") => ({
|
10657
|
+
begin: t($, /"""/),
|
10658
|
+
end: t(/"""/, $),
|
10613
10659
|
contains: [
|
10614
|
-
|
10615
|
-
|
10616
|
-
|
10660
|
+
K($),
|
10661
|
+
Q($),
|
10662
|
+
j($)
|
10617
10663
|
]
|
10618
|
-
}), ae = (
|
10619
|
-
begin: t(
|
10620
|
-
end: t(/"/,
|
10664
|
+
}), ae = ($ = "") => ({
|
10665
|
+
begin: t($, /"/),
|
10666
|
+
end: t(/"/, $),
|
10621
10667
|
contains: [
|
10622
|
-
|
10623
|
-
|
10668
|
+
K($),
|
10669
|
+
j($)
|
10624
10670
|
]
|
10625
|
-
}),
|
10671
|
+
}), se = {
|
10626
10672
|
className: "string",
|
10627
10673
|
variants: [
|
10628
|
-
|
10629
|
-
|
10630
|
-
|
10631
|
-
|
10674
|
+
ee(),
|
10675
|
+
ee("#"),
|
10676
|
+
ee("##"),
|
10677
|
+
ee("###"),
|
10632
10678
|
ae(),
|
10633
10679
|
ae("#"),
|
10634
10680
|
ae("##"),
|
10635
10681
|
ae("###")
|
10636
10682
|
]
|
10637
|
-
},
|
10683
|
+
}, ue = { match: t(/`/, I, /`/) }, Oe = {
|
10638
10684
|
className: "variable",
|
10639
10685
|
match: /\$\d+/
|
10640
|
-
},
|
10686
|
+
}, ie = {
|
10641
10687
|
className: "variable",
|
10642
|
-
match: `\\$${
|
10643
|
-
},
|
10644
|
-
|
10645
|
-
|
10646
|
-
|
10647
|
-
],
|
10688
|
+
match: `\\$${S}+`
|
10689
|
+
}, Ne = [
|
10690
|
+
ue,
|
10691
|
+
Oe,
|
10692
|
+
ie
|
10693
|
+
], ye = {
|
10648
10694
|
match: /(@|#(un)?)available/,
|
10649
10695
|
className: "keyword",
|
10650
10696
|
starts: { contains: [
|
@@ -10653,35 +10699,35 @@ function na() {
|
|
10653
10699
|
end: /\)/,
|
10654
10700
|
keywords: L,
|
10655
10701
|
contains: [
|
10656
|
-
|
10657
|
-
|
10658
|
-
|
10702
|
+
...te,
|
10703
|
+
H,
|
10704
|
+
se
|
10659
10705
|
]
|
10660
10706
|
}
|
10661
10707
|
] }
|
10662
|
-
},
|
10708
|
+
}, T = {
|
10663
10709
|
className: "keyword",
|
10664
|
-
match: t(/@/, c(...
|
10665
|
-
},
|
10710
|
+
match: t(/@/, c(...M))
|
10711
|
+
}, we = {
|
10666
10712
|
className: "meta",
|
10667
|
-
match: t(/@/,
|
10668
|
-
},
|
10669
|
-
|
10670
|
-
|
10671
|
-
|
10672
|
-
],
|
10713
|
+
match: t(/@/, I)
|
10714
|
+
}, q = [
|
10715
|
+
ye,
|
10716
|
+
T,
|
10717
|
+
we
|
10718
|
+
], k = {
|
10673
10719
|
match: e(/\b[A-Z]/),
|
10674
10720
|
relevance: 0,
|
10675
10721
|
contains: [
|
10676
10722
|
{
|
10677
10723
|
// Common Apple frameworks, for relevance boost
|
10678
10724
|
className: "type",
|
10679
|
-
match: t(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,
|
10725
|
+
match: t(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/, S, "+")
|
10680
10726
|
},
|
10681
10727
|
{
|
10682
10728
|
// Type identifier
|
10683
10729
|
className: "type",
|
10684
|
-
match:
|
10730
|
+
match: A,
|
10685
10731
|
relevance: 0
|
10686
10732
|
},
|
10687
10733
|
{
|
@@ -10696,56 +10742,56 @@ function na() {
|
|
10696
10742
|
},
|
10697
10743
|
{
|
10698
10744
|
// Protocol composition
|
10699
|
-
match: t(/\s+&\s+/, e(
|
10745
|
+
match: t(/\s+&\s+/, e(A)),
|
10700
10746
|
relevance: 0
|
10701
10747
|
}
|
10702
10748
|
]
|
10703
|
-
},
|
10749
|
+
}, _e = {
|
10704
10750
|
begin: /</,
|
10705
10751
|
end: />/,
|
10706
|
-
keywords:
|
10752
|
+
keywords: u,
|
10707
10753
|
contains: [
|
10708
|
-
...
|
10709
|
-
...
|
10710
|
-
...
|
10711
|
-
|
10712
|
-
|
10754
|
+
...F,
|
10755
|
+
...f,
|
10756
|
+
...q,
|
10757
|
+
Y,
|
10758
|
+
k
|
10713
10759
|
]
|
10714
10760
|
};
|
10715
|
-
|
10716
|
-
const
|
10717
|
-
match: t(
|
10761
|
+
k.contains.push(_e);
|
10762
|
+
const le = {
|
10763
|
+
match: t(I, /\s*:/),
|
10718
10764
|
keywords: "_|0",
|
10719
10765
|
relevance: 0
|
10720
|
-
},
|
10766
|
+
}, me = {
|
10721
10767
|
begin: /\(/,
|
10722
10768
|
end: /\)/,
|
10723
10769
|
relevance: 0,
|
10724
|
-
keywords:
|
10770
|
+
keywords: u,
|
10725
10771
|
contains: [
|
10726
10772
|
"self",
|
10727
|
-
fe,
|
10728
|
-
...B,
|
10729
|
-
...S,
|
10730
|
-
...H,
|
10731
|
-
...$,
|
10732
|
-
P,
|
10733
10773
|
le,
|
10734
|
-
...
|
10735
|
-
...
|
10736
|
-
|
10774
|
+
...F,
|
10775
|
+
...f,
|
10776
|
+
...P,
|
10777
|
+
...te,
|
10778
|
+
H,
|
10779
|
+
se,
|
10780
|
+
...Ne,
|
10781
|
+
...q,
|
10782
|
+
k
|
10737
10783
|
]
|
10738
|
-
},
|
10784
|
+
}, Ee = {
|
10739
10785
|
begin: /</,
|
10740
10786
|
end: />/,
|
10741
10787
|
contains: [
|
10742
|
-
...
|
10743
|
-
|
10788
|
+
...F,
|
10789
|
+
k
|
10744
10790
|
]
|
10745
|
-
},
|
10791
|
+
}, _ = {
|
10746
10792
|
begin: c(
|
10747
|
-
e(t(
|
10748
|
-
e(t(
|
10793
|
+
e(t(I, /\s*:/)),
|
10794
|
+
e(t(I, /\s+/, I, /\s*:/))
|
10749
10795
|
),
|
10750
10796
|
end: /:/,
|
10751
10797
|
relevance: 0,
|
@@ -10756,154 +10802,154 @@ function na() {
|
|
10756
10802
|
},
|
10757
10803
|
{
|
10758
10804
|
className: "params",
|
10759
|
-
match:
|
10805
|
+
match: I
|
10760
10806
|
}
|
10761
10807
|
]
|
10762
|
-
},
|
10808
|
+
}, y = {
|
10763
10809
|
begin: /\(/,
|
10764
10810
|
end: /\)/,
|
10765
|
-
keywords:
|
10811
|
+
keywords: u,
|
10766
10812
|
contains: [
|
10767
|
-
|
10768
|
-
...
|
10769
|
-
...
|
10770
|
-
|
10771
|
-
|
10772
|
-
|
10773
|
-
...
|
10774
|
-
|
10775
|
-
|
10813
|
+
_,
|
10814
|
+
...F,
|
10815
|
+
...f,
|
10816
|
+
...te,
|
10817
|
+
H,
|
10818
|
+
se,
|
10819
|
+
...q,
|
10820
|
+
k,
|
10821
|
+
me
|
10776
10822
|
],
|
10777
10823
|
endsParent: !0,
|
10778
10824
|
illegal: /["']/
|
10779
|
-
},
|
10825
|
+
}, w = {
|
10780
10826
|
match: [
|
10781
10827
|
/func/,
|
10782
10828
|
/\s+/,
|
10783
|
-
c(
|
10829
|
+
c(ue.match, I, N)
|
10784
10830
|
],
|
10785
10831
|
className: {
|
10786
10832
|
1: "keyword",
|
10787
10833
|
3: "title.function"
|
10788
10834
|
},
|
10789
10835
|
contains: [
|
10836
|
+
Ee,
|
10790
10837
|
y,
|
10791
|
-
x,
|
10792
10838
|
C
|
10793
10839
|
],
|
10794
10840
|
illegal: [
|
10795
10841
|
/\[/,
|
10796
10842
|
/%/
|
10797
10843
|
]
|
10798
|
-
},
|
10844
|
+
}, D = {
|
10799
10845
|
match: [
|
10800
10846
|
/\b(?:subscript|init[?!]?)/,
|
10801
10847
|
/\s*(?=[<(])/
|
10802
10848
|
],
|
10803
10849
|
className: { 1: "keyword" },
|
10804
10850
|
contains: [
|
10851
|
+
Ee,
|
10805
10852
|
y,
|
10806
|
-
x,
|
10807
10853
|
C
|
10808
10854
|
],
|
10809
10855
|
illegal: /\[|%/
|
10810
|
-
},
|
10856
|
+
}, V = {
|
10811
10857
|
match: [
|
10812
10858
|
/operator/,
|
10813
10859
|
/\s+/,
|
10814
|
-
|
10860
|
+
N
|
10815
10861
|
],
|
10816
10862
|
className: {
|
10817
10863
|
1: "keyword",
|
10818
10864
|
3: "title"
|
10819
10865
|
}
|
10820
|
-
},
|
10866
|
+
}, oe = {
|
10821
10867
|
begin: [
|
10822
10868
|
/precedencegroup/,
|
10823
10869
|
/\s+/,
|
10824
|
-
|
10870
|
+
A
|
10825
10871
|
],
|
10826
10872
|
className: {
|
10827
10873
|
1: "keyword",
|
10828
10874
|
3: "title"
|
10829
10875
|
},
|
10830
|
-
contains: [
|
10876
|
+
contains: [k],
|
10831
10877
|
keywords: [
|
10832
|
-
...
|
10878
|
+
...g,
|
10833
10879
|
...l
|
10834
10880
|
],
|
10835
10881
|
end: /}/
|
10836
10882
|
};
|
10837
|
-
for (const
|
10838
|
-
const
|
10839
|
-
|
10840
|
-
const
|
10841
|
-
...
|
10842
|
-
...
|
10843
|
-
|
10844
|
-
|
10845
|
-
|
10846
|
-
...
|
10883
|
+
for (const $ of se.variants) {
|
10884
|
+
const Re = $.contains.find((vt) => vt.label === "interpol");
|
10885
|
+
Re.keywords = u;
|
10886
|
+
const Nn = [
|
10887
|
+
...f,
|
10888
|
+
...P,
|
10889
|
+
...te,
|
10890
|
+
H,
|
10891
|
+
se,
|
10892
|
+
...Ne
|
10847
10893
|
];
|
10848
|
-
|
10849
|
-
...
|
10894
|
+
Re.contains = [
|
10895
|
+
...Nn,
|
10850
10896
|
{
|
10851
10897
|
begin: /\(/,
|
10852
10898
|
end: /\)/,
|
10853
10899
|
contains: [
|
10854
10900
|
"self",
|
10855
|
-
...
|
10901
|
+
...Nn
|
10856
10902
|
]
|
10857
10903
|
}
|
10858
10904
|
];
|
10859
10905
|
}
|
10860
10906
|
return {
|
10861
10907
|
name: "Swift",
|
10862
|
-
keywords:
|
10908
|
+
keywords: u,
|
10863
10909
|
contains: [
|
10864
|
-
...
|
10865
|
-
|
10866
|
-
|
10910
|
+
...F,
|
10911
|
+
w,
|
10912
|
+
D,
|
10867
10913
|
{
|
10868
10914
|
beginKeywords: "struct protocol class extension enum actor",
|
10869
10915
|
end: "\\{",
|
10870
10916
|
excludeEnd: !0,
|
10871
|
-
keywords:
|
10917
|
+
keywords: u,
|
10872
10918
|
contains: [
|
10873
10919
|
v.inherit(v.TITLE_MODE, {
|
10874
10920
|
className: "title.class",
|
10875
10921
|
begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/
|
10876
10922
|
}),
|
10877
|
-
...
|
10923
|
+
...f
|
10878
10924
|
]
|
10879
10925
|
},
|
10880
|
-
|
10881
|
-
|
10926
|
+
V,
|
10927
|
+
oe,
|
10882
10928
|
{
|
10883
10929
|
beginKeywords: "import",
|
10884
10930
|
end: /$/,
|
10885
|
-
contains: [...
|
10931
|
+
contains: [...F],
|
10886
10932
|
relevance: 0
|
10887
10933
|
},
|
10888
|
-
...
|
10889
|
-
...
|
10890
|
-
|
10891
|
-
|
10892
|
-
|
10893
|
-
...
|
10894
|
-
...
|
10895
|
-
|
10896
|
-
|
10934
|
+
...f,
|
10935
|
+
...P,
|
10936
|
+
...te,
|
10937
|
+
H,
|
10938
|
+
se,
|
10939
|
+
...Ne,
|
10940
|
+
...q,
|
10941
|
+
k,
|
10942
|
+
me
|
10897
10943
|
]
|
10898
10944
|
};
|
10899
10945
|
}
|
10900
|
-
return
|
10946
|
+
return un = B, un;
|
10901
10947
|
}
|
10902
|
-
var
|
10948
|
+
var gn, st;
|
10903
10949
|
function ta() {
|
10904
|
-
if (
|
10905
|
-
return
|
10906
|
-
|
10950
|
+
if (st)
|
10951
|
+
return gn;
|
10952
|
+
st = 1;
|
10907
10953
|
function n(e) {
|
10908
10954
|
const t = "true false yes no null", s = "[\\w#;/?:@&=+$,.~*'()[\\]]+", c = {
|
10909
10955
|
className: "attr",
|
@@ -10960,9 +11006,9 @@ function ta() {
|
|
10960
11006
|
end: /"/
|
10961
11007
|
},
|
10962
11008
|
{ begin: /[^\s,{}[\]]+/ }
|
10963
|
-
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", d = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", l = "(\\.[0-9]*)?",
|
11009
|
+
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", d = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", l = "(\\.[0-9]*)?", g = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", b = {
|
10964
11010
|
className: "number",
|
10965
|
-
begin: "\\b" + i + d + l +
|
11011
|
+
begin: "\\b" + i + d + l + g + "\\b"
|
10966
11012
|
}, p = {
|
10967
11013
|
end: ",",
|
10968
11014
|
endsWithParent: !0,
|
@@ -10981,7 +11027,7 @@ function ta() {
|
|
10981
11027
|
contains: [p],
|
10982
11028
|
illegal: "\\n",
|
10983
11029
|
relevance: 0
|
10984
|
-
},
|
11030
|
+
}, N = [
|
10985
11031
|
c,
|
10986
11032
|
{
|
10987
11033
|
className: "meta",
|
@@ -11060,21 +11106,21 @@ function ta() {
|
|
11060
11106
|
m,
|
11061
11107
|
E,
|
11062
11108
|
a
|
11063
|
-
],
|
11064
|
-
return
|
11109
|
+
], h = [...N];
|
11110
|
+
return h.pop(), h.push(r), p.contains = h, {
|
11065
11111
|
name: "YAML",
|
11066
11112
|
case_insensitive: !0,
|
11067
11113
|
aliases: ["yml"],
|
11068
|
-
contains:
|
11114
|
+
contains: N
|
11069
11115
|
};
|
11070
11116
|
}
|
11071
|
-
return
|
11117
|
+
return gn = n, gn;
|
11072
11118
|
}
|
11073
|
-
var
|
11119
|
+
var bn, ot;
|
11074
11120
|
function ra() {
|
11075
|
-
if (
|
11076
|
-
return
|
11077
|
-
|
11121
|
+
if (ot)
|
11122
|
+
return bn;
|
11123
|
+
ot = 1;
|
11078
11124
|
const n = "[A-Za-z$_][0-9A-Za-z$_]*", e = [
|
11079
11125
|
"as",
|
11080
11126
|
// for exports
|
@@ -11210,6 +11256,7 @@ function ra() {
|
|
11210
11256
|
"window",
|
11211
11257
|
"document",
|
11212
11258
|
"localStorage",
|
11259
|
+
"sessionStorage",
|
11213
11260
|
"module",
|
11214
11261
|
"global"
|
11215
11262
|
// Node.js
|
@@ -11219,56 +11266,56 @@ function ra() {
|
|
11219
11266
|
c
|
11220
11267
|
);
|
11221
11268
|
function i(l) {
|
11222
|
-
const
|
11223
|
-
const
|
11224
|
-
return
|
11269
|
+
const g = l.regex, b = (K, { after: Q }) => {
|
11270
|
+
const j = "</" + K[0].slice(1);
|
11271
|
+
return K.input.indexOf(j, Q) !== -1;
|
11225
11272
|
}, p = n, m = {
|
11226
11273
|
begin: "<>",
|
11227
11274
|
end: "</>"
|
11228
|
-
}, E = /<[A-Za-z0-9\\._:-]+\s*\/>/,
|
11275
|
+
}, E = /<[A-Za-z0-9\\._:-]+\s*\/>/, N = {
|
11229
11276
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
11230
11277
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
11231
11278
|
/**
|
11232
11279
|
* @param {RegExpMatchArray} match
|
11233
11280
|
* @param {CallbackResponse} response
|
11234
11281
|
*/
|
11235
|
-
isTrulyOpeningTag: (
|
11236
|
-
const
|
11282
|
+
isTrulyOpeningTag: (K, Q) => {
|
11283
|
+
const j = K[0].length + K.index, ee = K.input[j];
|
11237
11284
|
if (
|
11238
11285
|
// HTML should not include another raw `<` inside a tag
|
11239
11286
|
// nested type?
|
11240
11287
|
// `<Array<Array<number>>`, etc.
|
11241
|
-
|
11288
|
+
ee === "<" || // the , gives away that this is not HTML
|
11242
11289
|
// `<T, A extends keyof T, V>`
|
11243
|
-
|
11290
|
+
ee === ","
|
11244
11291
|
) {
|
11245
|
-
|
11292
|
+
Q.ignoreMatch();
|
11246
11293
|
return;
|
11247
11294
|
}
|
11248
|
-
|
11249
|
-
let
|
11250
|
-
const
|
11251
|
-
if (
|
11252
|
-
|
11295
|
+
ee === ">" && (b(K, { after: j }) || Q.ignoreMatch());
|
11296
|
+
let ae;
|
11297
|
+
const se = K.input.substring(j);
|
11298
|
+
if (ae = se.match(/^\s*=/)) {
|
11299
|
+
Q.ignoreMatch();
|
11253
11300
|
return;
|
11254
11301
|
}
|
11255
|
-
if ((
|
11256
|
-
|
11302
|
+
if ((ae = se.match(/^\s+extends\s+/)) && ae.index === 0) {
|
11303
|
+
Q.ignoreMatch();
|
11257
11304
|
return;
|
11258
11305
|
}
|
11259
11306
|
}
|
11260
|
-
},
|
11307
|
+
}, h = {
|
11261
11308
|
$pattern: n,
|
11262
11309
|
keyword: e,
|
11263
11310
|
literal: t,
|
11264
11311
|
built_in: r,
|
11265
11312
|
"variable.language": a
|
11266
|
-
},
|
11313
|
+
}, S = "[0-9](_?[0-9])*", I = `\\.(${S})`, A = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", M = {
|
11267
11314
|
className: "number",
|
11268
11315
|
variants: [
|
11269
11316
|
// DecimalLiteral
|
11270
|
-
{ begin: `(\\b(${
|
11271
|
-
{ begin: `\\b(${
|
11317
|
+
{ begin: `(\\b(${A})((${I})|\\.)?|(${I}))[eE][+-]?(${S})\\b` },
|
11318
|
+
{ begin: `\\b(${A})\\b((${I})\\b|\\.)?|(${I})\\b` },
|
11272
11319
|
// DecimalBigIntegerLiteral
|
11273
11320
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
11274
11321
|
// NonDecimalIntegerLiteral
|
@@ -11284,10 +11331,10 @@ function ra() {
|
|
11284
11331
|
className: "subst",
|
11285
11332
|
begin: "\\$\\{",
|
11286
11333
|
end: "\\}",
|
11287
|
-
keywords:
|
11334
|
+
keywords: h,
|
11288
11335
|
contains: []
|
11289
11336
|
// defined later
|
11290
|
-
},
|
11337
|
+
}, B = {
|
11291
11338
|
begin: "html`",
|
11292
11339
|
end: "",
|
11293
11340
|
starts: {
|
@@ -11312,6 +11359,18 @@ function ra() {
|
|
11312
11359
|
subLanguage: "css"
|
11313
11360
|
}
|
11314
11361
|
}, C = {
|
11362
|
+
begin: "gql`",
|
11363
|
+
end: "",
|
11364
|
+
starts: {
|
11365
|
+
end: "`",
|
11366
|
+
returnEnd: !1,
|
11367
|
+
contains: [
|
11368
|
+
l.BACKSLASH_ESCAPE,
|
11369
|
+
L
|
11370
|
+
],
|
11371
|
+
subLanguage: "graphql"
|
11372
|
+
}
|
11373
|
+
}, G = {
|
11315
11374
|
className: "string",
|
11316
11375
|
begin: "`",
|
11317
11376
|
end: "`",
|
@@ -11319,7 +11378,7 @@ function ra() {
|
|
11319
11378
|
l.BACKSLASH_ESCAPE,
|
11320
11379
|
L
|
11321
11380
|
]
|
11322
|
-
},
|
11381
|
+
}, J = {
|
11323
11382
|
className: "comment",
|
11324
11383
|
variants: [
|
11325
11384
|
l.COMMENT(
|
@@ -11364,46 +11423,47 @@ function ra() {
|
|
11364
11423
|
l.C_BLOCK_COMMENT_MODE,
|
11365
11424
|
l.C_LINE_COMMENT_MODE
|
11366
11425
|
]
|
11367
|
-
},
|
11426
|
+
}, re = [
|
11368
11427
|
l.APOS_STRING_MODE,
|
11369
11428
|
l.QUOTE_STRING_MODE,
|
11370
|
-
|
11429
|
+
B,
|
11371
11430
|
v,
|
11372
11431
|
C,
|
11432
|
+
G,
|
11373
11433
|
// Skip numbers when they are part of a variable name
|
11374
11434
|
{ match: /\$\d+/ },
|
11375
|
-
|
11435
|
+
M
|
11376
11436
|
// This is intentional:
|
11377
11437
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
11378
11438
|
// hljs.REGEXP_MODE
|
11379
11439
|
];
|
11380
|
-
L.contains =
|
11440
|
+
L.contains = re.concat({
|
11381
11441
|
// we need to pair up {} inside our subst to prevent
|
11382
11442
|
// it from ending too early by matching another }
|
11383
11443
|
begin: /\{/,
|
11384
11444
|
end: /\}/,
|
11385
|
-
keywords:
|
11445
|
+
keywords: h,
|
11386
11446
|
contains: [
|
11387
11447
|
"self"
|
11388
|
-
].concat(
|
11448
|
+
].concat(re)
|
11389
11449
|
});
|
11390
|
-
const
|
11450
|
+
const W = [].concat(J, L.contains), U = W.concat([
|
11391
11451
|
// eat recursive parens in sub expressions
|
11392
11452
|
{
|
11393
11453
|
begin: /\(/,
|
11394
11454
|
end: /\)/,
|
11395
|
-
keywords:
|
11396
|
-
contains: ["self"].concat(
|
11455
|
+
keywords: h,
|
11456
|
+
contains: ["self"].concat(W)
|
11397
11457
|
}
|
11398
|
-
]),
|
11458
|
+
]), X = {
|
11399
11459
|
className: "params",
|
11400
11460
|
begin: /\(/,
|
11401
11461
|
end: /\)/,
|
11402
11462
|
excludeBegin: !0,
|
11403
11463
|
excludeEnd: !0,
|
11404
|
-
keywords:
|
11405
|
-
contains:
|
11406
|
-
},
|
11464
|
+
keywords: h,
|
11465
|
+
contains: U
|
11466
|
+
}, u = {
|
11407
11467
|
variants: [
|
11408
11468
|
// class Car extends vehicle
|
11409
11469
|
{
|
@@ -11414,7 +11474,7 @@ function ra() {
|
|
11414
11474
|
/\s+/,
|
11415
11475
|
/extends/,
|
11416
11476
|
/\s+/,
|
11417
|
-
|
11477
|
+
g.concat(p, "(", g.concat(/\./, p), ")*")
|
11418
11478
|
],
|
11419
11479
|
scope: {
|
11420
11480
|
1: "keyword",
|
@@ -11436,9 +11496,9 @@ function ra() {
|
|
11436
11496
|
}
|
11437
11497
|
}
|
11438
11498
|
]
|
11439
|
-
},
|
11499
|
+
}, f = {
|
11440
11500
|
relevance: 0,
|
11441
|
-
match:
|
11501
|
+
match: g.either(
|
11442
11502
|
// Hard coded exceptions
|
11443
11503
|
/\bJSON/,
|
11444
11504
|
// Float32Array, OutT
|
@@ -11460,12 +11520,12 @@ function ra() {
|
|
11460
11520
|
...c
|
11461
11521
|
]
|
11462
11522
|
}
|
11463
|
-
},
|
11523
|
+
}, O = {
|
11464
11524
|
label: "use_strict",
|
11465
11525
|
className: "meta",
|
11466
11526
|
relevance: 10,
|
11467
11527
|
begin: /^\s*['"]use (strict|asm)['"]/
|
11468
|
-
},
|
11528
|
+
}, x = {
|
11469
11529
|
variants: [
|
11470
11530
|
{
|
11471
11531
|
match: [
|
@@ -11488,39 +11548,39 @@ function ra() {
|
|
11488
11548
|
3: "title.function"
|
11489
11549
|
},
|
11490
11550
|
label: "func.def",
|
11491
|
-
contains: [
|
11551
|
+
contains: [X],
|
11492
11552
|
illegal: /%/
|
11493
|
-
},
|
11553
|
+
}, P = {
|
11494
11554
|
relevance: 0,
|
11495
11555
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
11496
11556
|
className: "variable.constant"
|
11497
11557
|
};
|
11498
|
-
function
|
11499
|
-
return
|
11558
|
+
function Y(K) {
|
11559
|
+
return g.concat("(?!", K.join("|"), ")");
|
11500
11560
|
}
|
11501
|
-
const
|
11502
|
-
match:
|
11561
|
+
const ne = {
|
11562
|
+
match: g.concat(
|
11503
11563
|
/\b/,
|
11504
|
-
|
11564
|
+
Y([
|
11505
11565
|
...o,
|
11506
11566
|
"super",
|
11507
11567
|
"import"
|
11508
11568
|
]),
|
11509
11569
|
p,
|
11510
|
-
|
11570
|
+
g.lookahead(/\(/)
|
11511
11571
|
),
|
11512
11572
|
className: "title.function",
|
11513
11573
|
relevance: 0
|
11514
|
-
},
|
11515
|
-
begin:
|
11516
|
-
|
11574
|
+
}, te = {
|
11575
|
+
begin: g.concat(/\./, g.lookahead(
|
11576
|
+
g.concat(p, /(?![0-9A-Za-z$_(])/)
|
11517
11577
|
)),
|
11518
11578
|
end: p,
|
11519
11579
|
excludeBegin: !0,
|
11520
11580
|
keywords: "prototype",
|
11521
11581
|
className: "property",
|
11522
11582
|
relevance: 0
|
11523
|
-
},
|
11583
|
+
}, z = {
|
11524
11584
|
match: [
|
11525
11585
|
/get|set/,
|
11526
11586
|
/\s+/,
|
@@ -11536,9 +11596,9 @@ function ra() {
|
|
11536
11596
|
// eat to avoid empty params
|
11537
11597
|
begin: /\(\)/
|
11538
11598
|
},
|
11539
|
-
|
11599
|
+
X
|
11540
11600
|
]
|
11541
|
-
},
|
11601
|
+
}, Z = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + l.UNDERSCORE_IDENT_RE + ")\\s*=>", H = {
|
11542
11602
|
match: [
|
11543
11603
|
/const|var|let/,
|
11544
11604
|
/\s+/,
|
@@ -11547,7 +11607,7 @@ function ra() {
|
|
11547
11607
|
/=\s*/,
|
11548
11608
|
/(async\s*)?/,
|
11549
11609
|
// async is optional
|
11550
|
-
|
11610
|
+
g.lookahead(Z)
|
11551
11611
|
],
|
11552
11612
|
keywords: "async",
|
11553
11613
|
className: {
|
@@ -11555,15 +11615,15 @@ function ra() {
|
|
11555
11615
|
3: "title.function"
|
11556
11616
|
},
|
11557
11617
|
contains: [
|
11558
|
-
|
11618
|
+
X
|
11559
11619
|
]
|
11560
11620
|
};
|
11561
11621
|
return {
|
11562
|
-
name: "
|
11622
|
+
name: "JavaScript",
|
11563
11623
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
11564
|
-
keywords:
|
11624
|
+
keywords: h,
|
11565
11625
|
// this will be extended by TypeScript
|
11566
|
-
exports: { PARAMS_CONTAINS:
|
11626
|
+
exports: { PARAMS_CONTAINS: U, CLASS_REFERENCE: f },
|
11567
11627
|
illegal: /#(?![$_A-z])/,
|
11568
11628
|
contains: [
|
11569
11629
|
l.SHEBANG({
|
@@ -11571,37 +11631,38 @@ function ra() {
|
|
11571
11631
|
binary: "node",
|
11572
11632
|
relevance: 5
|
11573
11633
|
}),
|
11574
|
-
|
11634
|
+
O,
|
11575
11635
|
l.APOS_STRING_MODE,
|
11576
11636
|
l.QUOTE_STRING_MODE,
|
11577
|
-
|
11637
|
+
B,
|
11578
11638
|
v,
|
11579
11639
|
C,
|
11580
|
-
|
11640
|
+
G,
|
11641
|
+
J,
|
11581
11642
|
// Skip numbers when they are part of a variable name
|
11582
11643
|
{ match: /\$\d+/ },
|
11583
|
-
|
11584
|
-
|
11644
|
+
M,
|
11645
|
+
f,
|
11585
11646
|
{
|
11586
11647
|
className: "attr",
|
11587
|
-
begin: p +
|
11648
|
+
begin: p + g.lookahead(":"),
|
11588
11649
|
relevance: 0
|
11589
11650
|
},
|
11590
|
-
|
11651
|
+
H,
|
11591
11652
|
{
|
11592
11653
|
// "value" container
|
11593
11654
|
begin: "(" + l.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
11594
11655
|
keywords: "return throw case",
|
11595
11656
|
relevance: 0,
|
11596
11657
|
contains: [
|
11597
|
-
|
11658
|
+
J,
|
11598
11659
|
l.REGEXP_MODE,
|
11599
11660
|
{
|
11600
11661
|
className: "function",
|
11601
11662
|
// we have to count the parens to make sure we actually have the
|
11602
11663
|
// correct bounding ( ) before the =>. There could be any number of
|
11603
11664
|
// sub-expressions inside also surrounded by parens.
|
11604
|
-
begin:
|
11665
|
+
begin: Z,
|
11605
11666
|
returnBegin: !0,
|
11606
11667
|
end: "\\s*=>",
|
11607
11668
|
contains: [
|
@@ -11622,8 +11683,8 @@ function ra() {
|
|
11622
11683
|
end: /\)/,
|
11623
11684
|
excludeBegin: !0,
|
11624
11685
|
excludeEnd: !0,
|
11625
|
-
keywords:
|
11626
|
-
contains:
|
11686
|
+
keywords: h,
|
11687
|
+
contains: U
|
11627
11688
|
}
|
11628
11689
|
]
|
11629
11690
|
}
|
@@ -11644,18 +11705,18 @@ function ra() {
|
|
11644
11705
|
{ begin: m.begin, end: m.end },
|
11645
11706
|
{ match: E },
|
11646
11707
|
{
|
11647
|
-
begin:
|
11708
|
+
begin: N.begin,
|
11648
11709
|
// we carefully check the opening tag to see if it truly
|
11649
11710
|
// is a tag and not a false positive
|
11650
|
-
"on:begin":
|
11651
|
-
end:
|
11711
|
+
"on:begin": N.isTrulyOpeningTag,
|
11712
|
+
end: N.end
|
11652
11713
|
}
|
11653
11714
|
],
|
11654
11715
|
subLanguage: "xml",
|
11655
11716
|
contains: [
|
11656
11717
|
{
|
11657
|
-
begin:
|
11658
|
-
end:
|
11718
|
+
begin: N.begin,
|
11719
|
+
end: N.end,
|
11659
11720
|
skip: !0,
|
11660
11721
|
contains: ["self"]
|
11661
11722
|
}
|
@@ -11663,7 +11724,7 @@ function ra() {
|
|
11663
11724
|
}
|
11664
11725
|
]
|
11665
11726
|
},
|
11666
|
-
|
11727
|
+
x,
|
11667
11728
|
{
|
11668
11729
|
// prevent this from getting swallowed up by function
|
11669
11730
|
// since they appear "function like"
|
@@ -11678,7 +11739,7 @@ function ra() {
|
|
11678
11739
|
returnBegin: !0,
|
11679
11740
|
label: "func.def",
|
11680
11741
|
contains: [
|
11681
|
-
|
11742
|
+
X,
|
11682
11743
|
l.inherit(l.TITLE_MODE, { begin: p, className: "title.function" })
|
11683
11744
|
]
|
11684
11745
|
},
|
@@ -11687,7 +11748,7 @@ function ra() {
|
|
11687
11748
|
match: /\.\.\./,
|
11688
11749
|
relevance: 0
|
11689
11750
|
},
|
11690
|
-
|
11751
|
+
te,
|
11691
11752
|
// hack: prevents detection of keywords in some circumstances
|
11692
11753
|
// .keyword()
|
11693
11754
|
// $keyword = x
|
@@ -11698,12 +11759,12 @@ function ra() {
|
|
11698
11759
|
{
|
11699
11760
|
match: [/\bconstructor(?=\s*\()/],
|
11700
11761
|
className: { 1: "title.function" },
|
11701
|
-
contains: [
|
11762
|
+
contains: [X]
|
11702
11763
|
},
|
11703
|
-
|
11704
|
-
|
11705
|
-
|
11706
|
-
|
11764
|
+
ne,
|
11765
|
+
P,
|
11766
|
+
u,
|
11767
|
+
z,
|
11707
11768
|
{
|
11708
11769
|
match: /\$[(.]/
|
11709
11770
|
// relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
@@ -11712,7 +11773,7 @@ function ra() {
|
|
11712
11773
|
};
|
11713
11774
|
}
|
11714
11775
|
function d(l) {
|
11715
|
-
const
|
11776
|
+
const g = i(l), b = n, p = [
|
11716
11777
|
"any",
|
11717
11778
|
"void",
|
11718
11779
|
"number",
|
@@ -11727,7 +11788,7 @@ function ra() {
|
|
11727
11788
|
beginKeywords: "namespace",
|
11728
11789
|
end: /\{/,
|
11729
11790
|
excludeEnd: !0,
|
11730
|
-
contains: [
|
11791
|
+
contains: [g.exports.CLASS_REFERENCE]
|
11731
11792
|
}, E = {
|
11732
11793
|
beginKeywords: "interface",
|
11733
11794
|
end: /\{/,
|
@@ -11736,12 +11797,12 @@ function ra() {
|
|
11736
11797
|
keyword: "interface extends",
|
11737
11798
|
built_in: p
|
11738
11799
|
},
|
11739
|
-
contains: [
|
11740
|
-
},
|
11800
|
+
contains: [g.exports.CLASS_REFERENCE]
|
11801
|
+
}, N = {
|
11741
11802
|
className: "meta",
|
11742
11803
|
relevance: 10,
|
11743
11804
|
begin: /^\s*['"]use strict['"]/
|
11744
|
-
},
|
11805
|
+
}, h = [
|
11745
11806
|
"type",
|
11746
11807
|
"namespace",
|
11747
11808
|
"interface",
|
@@ -11754,42 +11815,44 @@ function ra() {
|
|
11754
11815
|
"readonly",
|
11755
11816
|
"enum",
|
11756
11817
|
"override"
|
11757
|
-
],
|
11818
|
+
], S = {
|
11758
11819
|
$pattern: n,
|
11759
|
-
keyword: e.concat(
|
11820
|
+
keyword: e.concat(h),
|
11760
11821
|
literal: t,
|
11761
11822
|
built_in: r.concat(p),
|
11762
11823
|
"variable.language": a
|
11763
|
-
},
|
11824
|
+
}, I = {
|
11764
11825
|
className: "meta",
|
11765
11826
|
begin: "@" + b
|
11766
|
-
},
|
11767
|
-
const C = L.contains.findIndex((
|
11827
|
+
}, A = (L, B, v) => {
|
11828
|
+
const C = L.contains.findIndex((G) => G.label === B);
|
11768
11829
|
if (C === -1)
|
11769
11830
|
throw new Error("can not find mode to replace");
|
11770
11831
|
L.contains.splice(C, 1, v);
|
11771
11832
|
};
|
11772
|
-
Object.assign(
|
11773
|
-
|
11833
|
+
Object.assign(g.keywords, S), g.exports.PARAMS_CONTAINS.push(I), g.contains = g.contains.concat([
|
11834
|
+
I,
|
11774
11835
|
m,
|
11775
11836
|
E
|
11776
|
-
]),
|
11777
|
-
const
|
11778
|
-
return
|
11837
|
+
]), A(g, "shebang", l.SHEBANG()), A(g, "use_strict", N);
|
11838
|
+
const M = g.contains.find((L) => L.label === "func.def");
|
11839
|
+
return M.relevance = 0, Object.assign(g, {
|
11779
11840
|
name: "TypeScript",
|
11780
11841
|
aliases: [
|
11781
11842
|
"ts",
|
11782
|
-
"tsx"
|
11843
|
+
"tsx",
|
11844
|
+
"mts",
|
11845
|
+
"cts"
|
11783
11846
|
]
|
11784
|
-
}),
|
11847
|
+
}), g;
|
11785
11848
|
}
|
11786
|
-
return
|
11849
|
+
return bn = d, bn;
|
11787
11850
|
}
|
11788
|
-
var
|
11851
|
+
var pn, ct;
|
11789
11852
|
function aa() {
|
11790
|
-
if (
|
11791
|
-
return
|
11792
|
-
|
11853
|
+
if (ct)
|
11854
|
+
return pn;
|
11855
|
+
ct = 1;
|
11793
11856
|
function n(e) {
|
11794
11857
|
const t = e.regex, s = {
|
11795
11858
|
className: "string",
|
@@ -11856,7 +11919,7 @@ function aa() {
|
|
11856
11919
|
begin: /&B[01_]+((U?[SIL])|[%&])?/
|
11857
11920
|
}
|
11858
11921
|
]
|
11859
|
-
},
|
11922
|
+
}, g = {
|
11860
11923
|
className: "label",
|
11861
11924
|
begin: /^\w+:/
|
11862
11925
|
}, b = e.COMMENT(/'''/, /$/, { contains: [
|
@@ -11895,7 +11958,7 @@ function aa() {
|
|
11895
11958
|
c,
|
11896
11959
|
d,
|
11897
11960
|
l,
|
11898
|
-
|
11961
|
+
g,
|
11899
11962
|
b,
|
11900
11963
|
p,
|
11901
11964
|
{
|
@@ -11909,13 +11972,13 @@ function aa() {
|
|
11909
11972
|
]
|
11910
11973
|
};
|
11911
11974
|
}
|
11912
|
-
return
|
11975
|
+
return pn = n, pn;
|
11913
11976
|
}
|
11914
|
-
var
|
11977
|
+
var _n, lt;
|
11915
11978
|
function ia() {
|
11916
|
-
if (
|
11917
|
-
return
|
11918
|
-
|
11979
|
+
if (lt)
|
11980
|
+
return _n;
|
11981
|
+
lt = 1;
|
11919
11982
|
function n(e) {
|
11920
11983
|
e.regex;
|
11921
11984
|
const t = e.COMMENT(/\(;/, /;\)/);
|
@@ -12027,55 +12090,55 @@ function ia() {
|
|
12027
12090
|
]
|
12028
12091
|
};
|
12029
12092
|
}
|
12030
|
-
return
|
12093
|
+
return _n = n, _n;
|
12031
12094
|
}
|
12032
|
-
var
|
12033
|
-
|
12034
|
-
|
12035
|
-
|
12036
|
-
|
12037
|
-
|
12038
|
-
|
12039
|
-
|
12040
|
-
|
12041
|
-
|
12042
|
-
|
12043
|
-
|
12044
|
-
|
12045
|
-
|
12046
|
-
|
12047
|
-
|
12048
|
-
|
12049
|
-
|
12050
|
-
|
12051
|
-
|
12052
|
-
|
12053
|
-
|
12054
|
-
|
12055
|
-
|
12056
|
-
|
12057
|
-
|
12058
|
-
|
12059
|
-
|
12060
|
-
|
12061
|
-
|
12062
|
-
|
12063
|
-
|
12064
|
-
|
12065
|
-
|
12066
|
-
|
12067
|
-
|
12068
|
-
|
12069
|
-
|
12070
|
-
|
12071
|
-
var sa =
|
12072
|
-
const oa = sa;
|
12095
|
+
var R = Tr;
|
12096
|
+
R.registerLanguage("xml", Sr());
|
12097
|
+
R.registerLanguage("bash", Or());
|
12098
|
+
R.registerLanguage("c", wr());
|
12099
|
+
R.registerLanguage("cpp", Rr());
|
12100
|
+
R.registerLanguage("csharp", Ar());
|
12101
|
+
R.registerLanguage("css", Mr());
|
12102
|
+
R.registerLanguage("markdown", Ir());
|
12103
|
+
R.registerLanguage("diff", Cr());
|
12104
|
+
R.registerLanguage("ruby", kr());
|
12105
|
+
R.registerLanguage("go", xr());
|
12106
|
+
R.registerLanguage("graphql", Dr());
|
12107
|
+
R.registerLanguage("ini", Lr());
|
12108
|
+
R.registerLanguage("java", Br());
|
12109
|
+
R.registerLanguage("javascript", Ur());
|
12110
|
+
R.registerLanguage("json", Pr());
|
12111
|
+
R.registerLanguage("kotlin", Fr());
|
12112
|
+
R.registerLanguage("less", $r());
|
12113
|
+
R.registerLanguage("lua", zr());
|
12114
|
+
R.registerLanguage("makefile", Kr());
|
12115
|
+
R.registerLanguage("perl", qr());
|
12116
|
+
R.registerLanguage("objectivec", Hr());
|
12117
|
+
R.registerLanguage("php", Gr());
|
12118
|
+
R.registerLanguage("php-template", Wr());
|
12119
|
+
R.registerLanguage("plaintext", Yr());
|
12120
|
+
R.registerLanguage("python", Zr());
|
12121
|
+
R.registerLanguage("python-repl", Vr());
|
12122
|
+
R.registerLanguage("r", Xr());
|
12123
|
+
R.registerLanguage("rust", Qr());
|
12124
|
+
R.registerLanguage("scss", Jr());
|
12125
|
+
R.registerLanguage("shell", jr());
|
12126
|
+
R.registerLanguage("sql", ea());
|
12127
|
+
R.registerLanguage("swift", na());
|
12128
|
+
R.registerLanguage("yaml", ta());
|
12129
|
+
R.registerLanguage("typescript", ra());
|
12130
|
+
R.registerLanguage("vbnet", aa());
|
12131
|
+
R.registerLanguage("wasm", ia());
|
12132
|
+
R.HighlightJS = R;
|
12133
|
+
R.default = R;
|
12134
|
+
var sa = R;
|
12135
|
+
const oa = /* @__PURE__ */ Mt(sa);
|
12073
12136
|
var ca = Object.defineProperty, la = Object.getOwnPropertyDescriptor, pe = (n, e, t, s) => {
|
12074
12137
|
for (var c = s > 1 ? void 0 : s ? la(e, t) : e, o = n.length - 1, a; o >= 0; o--)
|
12075
12138
|
(a = n[o]) && (c = (s ? a(e, t, c) : a(c)) || c);
|
12076
12139
|
return s && c && ca(e, t, c), c;
|
12077
12140
|
};
|
12078
|
-
let ce = class extends
|
12141
|
+
let ce = class extends Ot {
|
12079
12142
|
constructor() {
|
12080
12143
|
super(...arguments), this.inline = !1, this.hideHeader = !1, this._code = "";
|
12081
12144
|
}
|
@@ -12087,8 +12150,8 @@ let ce = class extends wt {
|
|
12087
12150
|
});
|
12088
12151
|
}
|
12089
12152
|
render() {
|
12090
|
-
let n =
|
12091
|
-
return this.hideHeader || (n =
|
12153
|
+
let n = Ae`${this.renderContainer()}`;
|
12154
|
+
return this.hideHeader || (n = Ae`${this.renderHeader()}${this.renderContainer()}`), n;
|
12092
12155
|
}
|
12093
12156
|
renderContainer() {
|
12094
12157
|
const n = {
|
@@ -12100,13 +12163,13 @@ let ce = class extends wt {
|
|
12100
12163
|
const e = document.createElement("div");
|
12101
12164
|
e.innerHTML = this._code ? this._code.trim() : "<slot></slot>";
|
12102
12165
|
let t;
|
12103
|
-
return this.maxHeight && this.maxHeight > 0 && (t = `max-height: ${this.maxHeight}px`),
|
12166
|
+
return this.maxHeight && this.maxHeight > 0 && (t = `max-height: ${this.maxHeight}px`), Ae`<pre
|
12104
12167
|
style="${t}"
|
12105
12168
|
part="container"
|
12106
12169
|
><code class="${At(n)}">${e}</code></pre>`;
|
12107
12170
|
}
|
12108
12171
|
renderHeader() {
|
12109
|
-
return
|
12172
|
+
return Ae`<div class="header" part="header">
|
12110
12173
|
<div class="title">${this.label}</div>
|
12111
12174
|
<span><slot name="actionItems"></slot></span>
|
12112
12175
|
</div>`;
|
@@ -12114,29 +12177,29 @@ let ce = class extends wt {
|
|
12114
12177
|
};
|
12115
12178
|
ce.styles = [
|
12116
12179
|
Tt`
|
12117
|
-
${St(
|
12180
|
+
${St(It)}
|
12118
12181
|
`
|
12119
12182
|
];
|
12120
12183
|
pe([
|
12121
|
-
|
12184
|
+
Se()
|
12122
12185
|
], ce.prototype, "language", 2);
|
12123
12186
|
pe([
|
12124
|
-
|
12187
|
+
Se()
|
12125
12188
|
], ce.prototype, "label", 2);
|
12126
12189
|
pe([
|
12127
|
-
|
12190
|
+
Se({ type: Boolean, reflect: !0 })
|
12128
12191
|
], ce.prototype, "inline", 2);
|
12129
12192
|
pe([
|
12130
|
-
|
12193
|
+
Se({ type: Boolean, reflect: !0 })
|
12131
12194
|
], ce.prototype, "hideHeader", 2);
|
12132
12195
|
pe([
|
12133
12196
|
Rt({})
|
12134
12197
|
], ce.prototype, "_codeItems", 2);
|
12135
12198
|
pe([
|
12136
|
-
|
12199
|
+
Se()
|
12137
12200
|
], ce.prototype, "maxHeight", 2);
|
12138
12201
|
ce = pe([
|
12139
|
-
|
12202
|
+
wt("cv-code-snippet")
|
12140
12203
|
], ce);
|
12141
12204
|
const pa = ce;
|
12142
12205
|
export {
|