@republicroad/seal-editor 1.32.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bash-Dfpezy65.js +2 -0
- package/dist/c-BdHHW7PX.js +5 -0
- package/dist/c-BdHHW7PX.js.map +1 -0
- package/dist/c-lfOsiBpu.js +2 -0
- package/dist/core-CAYwPm3F.js +4984 -0
- package/dist/core-CAYwPm3F.js.map +1 -0
- package/dist/cpp-BGootNWJ.js +15 -0
- package/dist/cpp-BGootNWJ.js.map +1 -0
- package/dist/cpp-DvjZUDSj.js +2 -0
- package/dist/csharp-RRkgh3c4.js +5 -0
- package/dist/csharp-RRkgh3c4.js.map +1 -0
- package/dist/css-BbwcBM_4.js +2 -0
- package/dist/css-HuzvwXs-.js +5 -0
- package/dist/css-HuzvwXs-.js.map +1 -0
- package/dist/diff-D0WgTNQn.js +5 -0
- package/dist/diff-D0WgTNQn.js.map +1 -0
- package/dist/docker-DMpUQ2UE.js +5 -0
- package/dist/docker-DMpUQ2UE.js.map +1 -0
- package/dist/engine-javascript-DkCwfYjr.js +2393 -0
- package/dist/engine-javascript-DkCwfYjr.js.map +1 -0
- package/dist/github-dark-C85MA6EW.js +6 -0
- package/dist/github-dark-C85MA6EW.js.map +1 -0
- package/dist/github-light-Dzg0sEwI.js +6 -0
- package/dist/github-light-Dzg0sEwI.js.map +1 -0
- package/dist/go-BEdBk4fh.js +5 -0
- package/dist/go-BEdBk4fh.js.map +1 -0
- package/dist/graphql-C4UuinIq.js +2 -0
- package/dist/graphql-DcYBXWWL.js +16 -0
- package/dist/graphql-DcYBXWWL.js.map +1 -0
- package/dist/html-BH9giSUA.js +2 -0
- package/dist/html-Ctxsat8s.js +12 -0
- package/dist/html-Ctxsat8s.js.map +1 -0
- package/dist/i18n-Dlie-Jrb.js +675 -0
- package/dist/i18n-Dlie-Jrb.js.map +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +5980 -6451
- package/dist/index.js.map +1 -1
- package/dist/java-CNN5-pjU.js +5 -0
- package/dist/java-CNN5-pjU.js.map +1 -0
- package/dist/java-CaG1IqbK.js +2 -0
- package/dist/javascript--0qAxhnA.js +2 -0
- package/dist/javascript-Bk0bJ4nQ.js +5 -0
- package/dist/javascript-Bk0bJ4nQ.js.map +1 -0
- package/dist/json-DFt_0dbD.js +5 -0
- package/dist/json-DFt_0dbD.js.map +1 -0
- package/dist/json-DVwBUiza.js +2 -0
- package/dist/jsx-DkJfxbAs.js +5 -0
- package/dist/jsx-DkJfxbAs.js.map +1 -0
- package/dist/jsx-cVAJ0Z2c.js +2 -0
- package/dist/kotlin-CQsNEM2o.js +5 -0
- package/dist/kotlin-CQsNEM2o.js.map +1 -0
- package/dist/markdown-nUtTZkU8.js +5 -0
- package/dist/markdown-nUtTZkU8.js.map +1 -0
- package/dist/php-CQpsnvwU.js +20 -0
- package/dist/php-CQpsnvwU.js.map +1 -0
- package/dist/python-D0AaDoWC.js +5 -0
- package/dist/python-D0AaDoWC.js.map +1 -0
- package/dist/rolldown-runtime-B0aSnxlc.js +20 -0
- package/dist/ruby-lBDztqPf.js +34 -0
- package/dist/ruby-lBDztqPf.js.map +1 -0
- package/dist/rust-BrRMzTsN.js +5 -0
- package/dist/rust-BrRMzTsN.js.map +1 -0
- package/dist/scss-CoGT9c_3.js +7 -0
- package/dist/scss-CoGT9c_3.js.map +1 -0
- package/dist/shellscript-B2AvTo4A.js +5 -0
- package/dist/shellscript-B2AvTo4A.js.map +1 -0
- package/dist/shellscript-Dfpezy65.js +2 -0
- package/dist/simulate-run-detail-C2IW2Sl0.js +1013 -0
- package/dist/simulate-run-detail-C2IW2Sl0.js.map +1 -0
- package/dist/sql-D_W5grEC.js +2 -0
- package/dist/sql-q7LBKUMn.js +5 -0
- package/dist/sql-q7LBKUMn.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/swift-B7Z-rXzN.js +5 -0
- package/dist/swift-B7Z-rXzN.js.map +1 -0
- package/dist/toml-CIQJnU5u.js +5 -0
- package/dist/toml-CIQJnU5u.js.map +1 -0
- package/dist/tsx-BqSm8fWw.js +5 -0
- package/dist/tsx-BqSm8fWw.js.map +1 -0
- package/dist/tsx-DiMnnori.js +2 -0
- package/dist/typescript-C4BXhs_3.js +5 -0
- package/dist/typescript-C4BXhs_3.js.map +1 -0
- package/dist/typescript-DFf19o_s.js +2 -0
- package/dist/vue-DnpuW72P.js +23 -0
- package/dist/vue-DnpuW72P.js.map +1 -0
- package/dist/xml-C-8BjZCy.js +7 -0
- package/dist/xml-C-8BjZCy.js.map +1 -0
- package/dist/yaml-BZ3x6E3N.js +5 -0
- package/dist/yaml-BZ3x6E3N.js.map +1 -0
- package/dist/yaml-BswqmnDe.js +2 -0
- package/package.json +2 -1
|
@@ -0,0 +1,4984 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@shikijs+types@4.4.3/node_modules/@shikijs/types/dist/index.mjs
|
|
3
|
+
var t = class extends Error {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
super(e), this.name = "ShikiError";
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region ../../node_modules/.pnpm/@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.js
|
|
10
|
+
function n(e) {
|
|
11
|
+
return r(e);
|
|
12
|
+
}
|
|
13
|
+
function r(e) {
|
|
14
|
+
return Array.isArray(e) ? i(e) : e instanceof RegExp ? e : typeof e == "object" ? a(e) : e;
|
|
15
|
+
}
|
|
16
|
+
function i(e) {
|
|
17
|
+
let t = [];
|
|
18
|
+
for (let n = 0, i = e.length; n < i; n++) t[n] = r(e[n]);
|
|
19
|
+
return t;
|
|
20
|
+
}
|
|
21
|
+
function a(e) {
|
|
22
|
+
let t = {};
|
|
23
|
+
for (let n in e) t[n] = r(e[n]);
|
|
24
|
+
return t;
|
|
25
|
+
}
|
|
26
|
+
function o(e, ...t) {
|
|
27
|
+
return t.forEach((t) => {
|
|
28
|
+
for (let n in t) e[n] = t[n];
|
|
29
|
+
}), e;
|
|
30
|
+
}
|
|
31
|
+
function s(e) {
|
|
32
|
+
let t = ~e.lastIndexOf("/") || ~e.lastIndexOf("\\");
|
|
33
|
+
return t === 0 ? e : ~t === e.length - 1 ? s(e.substring(0, e.length - 1)) : e.substr(~t + 1);
|
|
34
|
+
}
|
|
35
|
+
var c = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, l = class {
|
|
36
|
+
static hasCaptures(e) {
|
|
37
|
+
return e !== null && (c.lastIndex = 0, c.test(e));
|
|
38
|
+
}
|
|
39
|
+
static replaceCaptures(e, t, n) {
|
|
40
|
+
return e.replace(c, (e, r, i, a) => {
|
|
41
|
+
let o = n[parseInt(r || i, 10)];
|
|
42
|
+
if (o) {
|
|
43
|
+
let e = t.substring(o.start, o.end);
|
|
44
|
+
for (; e[0] === ".";) e = e.substring(1);
|
|
45
|
+
switch (a) {
|
|
46
|
+
case "downcase": return e.toLowerCase();
|
|
47
|
+
case "upcase": return e.toUpperCase();
|
|
48
|
+
default: return e;
|
|
49
|
+
}
|
|
50
|
+
} else return e;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
function u(e, t) {
|
|
55
|
+
return e < t ? -1 : +(e > t);
|
|
56
|
+
}
|
|
57
|
+
function d(e, t) {
|
|
58
|
+
if (e === null && t === null) return 0;
|
|
59
|
+
if (!e) return -1;
|
|
60
|
+
if (!t) return 1;
|
|
61
|
+
let n = e.length, r = t.length;
|
|
62
|
+
if (n === r) {
|
|
63
|
+
for (let r = 0; r < n; r++) {
|
|
64
|
+
let n = u(e[r], t[r]);
|
|
65
|
+
if (n !== 0) return n;
|
|
66
|
+
}
|
|
67
|
+
return 0;
|
|
68
|
+
}
|
|
69
|
+
return n - r;
|
|
70
|
+
}
|
|
71
|
+
function f(e) {
|
|
72
|
+
return !!(/^#[0-9a-f]{6}$/i.test(e) || /^#[0-9a-f]{8}$/i.test(e) || /^#[0-9a-f]{3}$/i.test(e) || /^#[0-9a-f]{4}$/i.test(e));
|
|
73
|
+
}
|
|
74
|
+
function p(e) {
|
|
75
|
+
return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
|
|
76
|
+
}
|
|
77
|
+
var m = class {
|
|
78
|
+
constructor(e) {
|
|
79
|
+
this.fn = e;
|
|
80
|
+
}
|
|
81
|
+
cache = /* @__PURE__ */ new Map();
|
|
82
|
+
get(e) {
|
|
83
|
+
if (this.cache.has(e)) return this.cache.get(e);
|
|
84
|
+
let t = this.fn(e);
|
|
85
|
+
return this.cache.set(e, t), t;
|
|
86
|
+
}
|
|
87
|
+
}, h = class {
|
|
88
|
+
constructor(e, t, n) {
|
|
89
|
+
this._colorMap = e, this._defaults = t, this._root = n;
|
|
90
|
+
}
|
|
91
|
+
static createFromRawTheme(e, t) {
|
|
92
|
+
return this.createFromParsedTheme(te(e), t);
|
|
93
|
+
}
|
|
94
|
+
static createFromParsedTheme(e, t) {
|
|
95
|
+
return re(e, t);
|
|
96
|
+
}
|
|
97
|
+
_cachedMatchRoot = new m((e) => this._root.match(e));
|
|
98
|
+
getColorMap() {
|
|
99
|
+
return this._colorMap.getColorMap();
|
|
100
|
+
}
|
|
101
|
+
getDefaults() {
|
|
102
|
+
return this._defaults;
|
|
103
|
+
}
|
|
104
|
+
match(e) {
|
|
105
|
+
if (e === null) return this._defaults;
|
|
106
|
+
let t = e.scopeName, n = this._cachedMatchRoot.get(t).find((t) => _(e.parent, t.parentScopes));
|
|
107
|
+
return n ? new ee(n.fontStyle, n.foreground, n.background) : null;
|
|
108
|
+
}
|
|
109
|
+
}, g = class e {
|
|
110
|
+
constructor(e, t) {
|
|
111
|
+
this.parent = e, this.scopeName = t;
|
|
112
|
+
}
|
|
113
|
+
static push(t, n) {
|
|
114
|
+
for (let r of n) t = new e(t, r);
|
|
115
|
+
return t;
|
|
116
|
+
}
|
|
117
|
+
static from(...t) {
|
|
118
|
+
let n = null;
|
|
119
|
+
for (let r = 0; r < t.length; r++) n = new e(n, t[r]);
|
|
120
|
+
return n;
|
|
121
|
+
}
|
|
122
|
+
push(t) {
|
|
123
|
+
return new e(this, t);
|
|
124
|
+
}
|
|
125
|
+
getSegments() {
|
|
126
|
+
let e = this, t = [];
|
|
127
|
+
for (; e;) t.push(e.scopeName), e = e.parent;
|
|
128
|
+
return t.reverse(), t;
|
|
129
|
+
}
|
|
130
|
+
toString() {
|
|
131
|
+
return this.getSegments().join(" ");
|
|
132
|
+
}
|
|
133
|
+
extends(e) {
|
|
134
|
+
return this === e || this.parent !== null && this.parent.extends(e);
|
|
135
|
+
}
|
|
136
|
+
getExtensionIfDefined(e) {
|
|
137
|
+
let t = [], n = this;
|
|
138
|
+
for (; n && n !== e;) t.push(n.scopeName), n = n.parent;
|
|
139
|
+
return n === e ? t.reverse() : void 0;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
function _(e, t) {
|
|
143
|
+
if (t.length === 0) return !0;
|
|
144
|
+
for (let n = 0; n < t.length; n++) {
|
|
145
|
+
let r = t[n], i = !1;
|
|
146
|
+
if (r === ">") {
|
|
147
|
+
if (n === t.length - 1) return !1;
|
|
148
|
+
r = t[++n], i = !0;
|
|
149
|
+
}
|
|
150
|
+
for (; e && !v(e.scopeName, r);) {
|
|
151
|
+
if (i) return !1;
|
|
152
|
+
e = e.parent;
|
|
153
|
+
}
|
|
154
|
+
if (!e) return !1;
|
|
155
|
+
e = e.parent;
|
|
156
|
+
}
|
|
157
|
+
return !0;
|
|
158
|
+
}
|
|
159
|
+
function v(e, t) {
|
|
160
|
+
return t === e || e.startsWith(t) && e[t.length] === ".";
|
|
161
|
+
}
|
|
162
|
+
var ee = class {
|
|
163
|
+
constructor(e, t, n) {
|
|
164
|
+
this.fontStyle = e, this.foregroundId = t, this.backgroundId = n;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
function te(e) {
|
|
168
|
+
if (!e || !e.settings || !Array.isArray(e.settings)) return [];
|
|
169
|
+
let t = e.settings, n = [], r = 0;
|
|
170
|
+
for (let e = 0, i = t.length; e < i; e++) {
|
|
171
|
+
let i = t[e];
|
|
172
|
+
if (!i.settings) continue;
|
|
173
|
+
let a;
|
|
174
|
+
if (typeof i.scope == "string") {
|
|
175
|
+
let e = i.scope;
|
|
176
|
+
e = e.replace(/^[,]+/, ""), e = e.replace(/[,]+$/, ""), a = e.split(",");
|
|
177
|
+
} else a = Array.isArray(i.scope) ? i.scope : [""];
|
|
178
|
+
let o = -1;
|
|
179
|
+
if (typeof i.settings.fontStyle == "string") {
|
|
180
|
+
o = 0;
|
|
181
|
+
let e = i.settings.fontStyle.split(" ");
|
|
182
|
+
for (let t = 0, n = e.length; t < n; t++) switch (e[t]) {
|
|
183
|
+
case "italic":
|
|
184
|
+
o |= 1;
|
|
185
|
+
break;
|
|
186
|
+
case "bold":
|
|
187
|
+
o |= 2;
|
|
188
|
+
break;
|
|
189
|
+
case "underline":
|
|
190
|
+
o |= 4;
|
|
191
|
+
break;
|
|
192
|
+
case "strikethrough": o |= 8;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
let s = null;
|
|
196
|
+
typeof i.settings.foreground == "string" && f(i.settings.foreground) && (s = i.settings.foreground);
|
|
197
|
+
let c = null;
|
|
198
|
+
typeof i.settings.background == "string" && f(i.settings.background) && (c = i.settings.background);
|
|
199
|
+
for (let t = 0, i = a.length; t < i; t++) {
|
|
200
|
+
let i = a[t].trim().split(" "), l = i[i.length - 1], u = null;
|
|
201
|
+
i.length > 1 && (u = i.slice(0, i.length - 1), u.reverse()), n[r++] = new ne(l, u, e, o, s, c);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return n;
|
|
205
|
+
}
|
|
206
|
+
var ne = class {
|
|
207
|
+
constructor(e, t, n, r, i, a) {
|
|
208
|
+
this.scope = e, this.parentScopes = t, this.index = n, this.fontStyle = r, this.foreground = i, this.background = a;
|
|
209
|
+
}
|
|
210
|
+
}, y = /* @__PURE__ */ ((e) => (e[e.NotSet = -1] = "NotSet", e[e.None = 0] = "None", e[e.Italic = 1] = "Italic", e[e.Bold = 2] = "Bold", e[e.Underline = 4] = "Underline", e[e.Strikethrough = 8] = "Strikethrough", e))(y || {});
|
|
211
|
+
function re(e, t) {
|
|
212
|
+
e.sort((e, t) => {
|
|
213
|
+
let n = u(e.scope, t.scope);
|
|
214
|
+
return n !== 0 || (n = d(e.parentScopes, t.parentScopes), n !== 0) ? n : e.index - t.index;
|
|
215
|
+
});
|
|
216
|
+
let n = 0, r = "#000000", i = "#ffffff";
|
|
217
|
+
for (; e.length >= 1 && e[0].scope === "";) {
|
|
218
|
+
let t = e.shift();
|
|
219
|
+
t.fontStyle !== -1 && (n = t.fontStyle), t.foreground !== null && (r = t.foreground), t.background !== null && (i = t.background);
|
|
220
|
+
}
|
|
221
|
+
let a = new ie(t), o = new ee(n, a.getId(r), a.getId(i)), s = new se(new oe(0, null, -1, 0, 0), []);
|
|
222
|
+
for (let t = 0, n = e.length; t < n; t++) {
|
|
223
|
+
let n = e[t];
|
|
224
|
+
s.insert(0, n.scope, n.parentScopes, n.fontStyle, a.getId(n.foreground), a.getId(n.background));
|
|
225
|
+
}
|
|
226
|
+
return new h(a, o, s);
|
|
227
|
+
}
|
|
228
|
+
var ie = class {
|
|
229
|
+
_isFrozen;
|
|
230
|
+
_lastColorId;
|
|
231
|
+
_id2color;
|
|
232
|
+
_color2id;
|
|
233
|
+
constructor(e) {
|
|
234
|
+
if (this._lastColorId = 0, this._id2color = [], this._color2id = /* @__PURE__ */ Object.create(null), Array.isArray(e)) {
|
|
235
|
+
this._isFrozen = !0;
|
|
236
|
+
for (let t = 0, n = e.length; t < n; t++) this._color2id[e[t]] = t, this._id2color[t] = e[t];
|
|
237
|
+
} else this._isFrozen = !1;
|
|
238
|
+
}
|
|
239
|
+
getId(e) {
|
|
240
|
+
if (e === null) return 0;
|
|
241
|
+
e = e.toUpperCase();
|
|
242
|
+
let t = this._color2id[e];
|
|
243
|
+
if (t) return t;
|
|
244
|
+
if (this._isFrozen) throw Error(`Missing color in color map - ${e}`);
|
|
245
|
+
return t = ++this._lastColorId, this._color2id[e] = t, this._id2color[t] = e, t;
|
|
246
|
+
}
|
|
247
|
+
getColorMap() {
|
|
248
|
+
return this._id2color.slice(0);
|
|
249
|
+
}
|
|
250
|
+
}, ae = Object.freeze([]), oe = class e {
|
|
251
|
+
scopeDepth;
|
|
252
|
+
parentScopes;
|
|
253
|
+
fontStyle;
|
|
254
|
+
foreground;
|
|
255
|
+
background;
|
|
256
|
+
constructor(e, t, n, r, i) {
|
|
257
|
+
this.scopeDepth = e, this.parentScopes = t || ae, this.fontStyle = n, this.foreground = r, this.background = i;
|
|
258
|
+
}
|
|
259
|
+
clone() {
|
|
260
|
+
return new e(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
|
|
261
|
+
}
|
|
262
|
+
static cloneArr(e) {
|
|
263
|
+
let t = [];
|
|
264
|
+
for (let n = 0, r = e.length; n < r; n++) t[n] = e[n].clone();
|
|
265
|
+
return t;
|
|
266
|
+
}
|
|
267
|
+
acceptOverwrite(e, t, n, r) {
|
|
268
|
+
this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, t !== -1 && (this.fontStyle = t), n !== 0 && (this.foreground = n), r !== 0 && (this.background = r);
|
|
269
|
+
}
|
|
270
|
+
}, se = class e {
|
|
271
|
+
constructor(e, t = [], n = {}) {
|
|
272
|
+
this._mainRule = e, this._children = n, this._rulesWithParentScopes = t;
|
|
273
|
+
}
|
|
274
|
+
_rulesWithParentScopes;
|
|
275
|
+
static _cmpBySpecificity(e, t) {
|
|
276
|
+
if (e.scopeDepth !== t.scopeDepth) return t.scopeDepth - e.scopeDepth;
|
|
277
|
+
let n = 0, r = 0;
|
|
278
|
+
for (; e.parentScopes[n] === ">" && n++, t.parentScopes[r] === ">" && r++, !(n >= e.parentScopes.length || r >= t.parentScopes.length);) {
|
|
279
|
+
let i = t.parentScopes[r].length - e.parentScopes[n].length;
|
|
280
|
+
if (i !== 0) return i;
|
|
281
|
+
n++, r++;
|
|
282
|
+
}
|
|
283
|
+
return t.parentScopes.length - e.parentScopes.length;
|
|
284
|
+
}
|
|
285
|
+
match(t) {
|
|
286
|
+
if (t !== "") {
|
|
287
|
+
let e = t.indexOf("."), n, r;
|
|
288
|
+
if (e === -1 ? (n = t, r = "") : (n = t.substring(0, e), r = t.substring(e + 1)), this._children.hasOwnProperty(n)) return this._children[n].match(r);
|
|
289
|
+
}
|
|
290
|
+
let n = this._rulesWithParentScopes.concat(this._mainRule);
|
|
291
|
+
return n.sort(e._cmpBySpecificity), n;
|
|
292
|
+
}
|
|
293
|
+
insert(t, n, r, i, a, o) {
|
|
294
|
+
if (n === "") {
|
|
295
|
+
this._doInsertHere(t, r, i, a, o);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
let s = n.indexOf("."), c, l;
|
|
299
|
+
s === -1 ? (c = n, l = "") : (c = n.substring(0, s), l = n.substring(s + 1));
|
|
300
|
+
let u;
|
|
301
|
+
this._children.hasOwnProperty(c) ? u = this._children[c] : (u = new e(this._mainRule.clone(), oe.cloneArr(this._rulesWithParentScopes)), this._children[c] = u), u.insert(t + 1, l, r, i, a, o);
|
|
302
|
+
}
|
|
303
|
+
_doInsertHere(e, t, n, r, i) {
|
|
304
|
+
if (t === null) {
|
|
305
|
+
this._mainRule.acceptOverwrite(e, n, r, i);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
for (let a = 0, o = this._rulesWithParentScopes.length; a < o; a++) {
|
|
309
|
+
let o = this._rulesWithParentScopes[a];
|
|
310
|
+
if (d(o.parentScopes, t) === 0) {
|
|
311
|
+
o.acceptOverwrite(e, n, r, i);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
n === -1 && (n = this._mainRule.fontStyle), r === 0 && (r = this._mainRule.foreground), i === 0 && (i = this._mainRule.background), this._rulesWithParentScopes.push(new oe(e, t, n, r, i));
|
|
316
|
+
}
|
|
317
|
+
}, b = class e {
|
|
318
|
+
static toBinaryStr(e) {
|
|
319
|
+
return e.toString(2).padStart(32, "0");
|
|
320
|
+
}
|
|
321
|
+
static print(t) {
|
|
322
|
+
let n = e.getLanguageId(t), r = e.getTokenType(t), i = e.getFontStyle(t), a = e.getForeground(t), o = e.getBackground(t);
|
|
323
|
+
console.log({
|
|
324
|
+
languageId: n,
|
|
325
|
+
tokenType: r,
|
|
326
|
+
fontStyle: i,
|
|
327
|
+
foreground: a,
|
|
328
|
+
background: o
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
static getLanguageId(e) {
|
|
332
|
+
return (e & 255) >>> 0;
|
|
333
|
+
}
|
|
334
|
+
static getTokenType(e) {
|
|
335
|
+
return (e & 768) >>> 8;
|
|
336
|
+
}
|
|
337
|
+
static containsBalancedBrackets(e) {
|
|
338
|
+
return !!(e & 1024);
|
|
339
|
+
}
|
|
340
|
+
static getFontStyle(e) {
|
|
341
|
+
return (e & 30720) >>> 11;
|
|
342
|
+
}
|
|
343
|
+
static getForeground(e) {
|
|
344
|
+
return (e & 16744448) >>> 15;
|
|
345
|
+
}
|
|
346
|
+
static getBackground(e) {
|
|
347
|
+
return (e & 4278190080) >>> 24;
|
|
348
|
+
}
|
|
349
|
+
static set(t, n, r, i, a, o, s) {
|
|
350
|
+
let c = e.getLanguageId(t), l = e.getTokenType(t), u = +!!e.containsBalancedBrackets(t), d = e.getFontStyle(t), f = e.getForeground(t), p = e.getBackground(t);
|
|
351
|
+
return n !== 0 && (c = n), r !== 8 && (l = le(r)), i !== null && (u = +!!i), a !== -1 && (d = a), o !== 0 && (f = o), s !== 0 && (p = s), (c << 0 | l << 8 | u << 10 | d << 11 | f << 15 | p << 24) >>> 0;
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
function ce(e) {
|
|
355
|
+
return e;
|
|
356
|
+
}
|
|
357
|
+
function le(e) {
|
|
358
|
+
return e;
|
|
359
|
+
}
|
|
360
|
+
function ue(e, t) {
|
|
361
|
+
let n = [], r = fe(e), i = r.next();
|
|
362
|
+
for (; i !== null;) {
|
|
363
|
+
let e = 0;
|
|
364
|
+
if (i.length === 2 && i.charAt(1) === ":") {
|
|
365
|
+
switch (i.charAt(0)) {
|
|
366
|
+
case "R":
|
|
367
|
+
e = 1;
|
|
368
|
+
break;
|
|
369
|
+
case "L":
|
|
370
|
+
e = -1;
|
|
371
|
+
break;
|
|
372
|
+
default: console.log(`Unknown priority ${i} in scope selector`);
|
|
373
|
+
}
|
|
374
|
+
i = r.next();
|
|
375
|
+
}
|
|
376
|
+
let t = o();
|
|
377
|
+
if (n.push({
|
|
378
|
+
matcher: t,
|
|
379
|
+
priority: e
|
|
380
|
+
}), i !== ",") break;
|
|
381
|
+
i = r.next();
|
|
382
|
+
}
|
|
383
|
+
return n;
|
|
384
|
+
function a() {
|
|
385
|
+
if (i === "-") {
|
|
386
|
+
i = r.next();
|
|
387
|
+
let e = a();
|
|
388
|
+
return (t) => !!e && !e(t);
|
|
389
|
+
}
|
|
390
|
+
if (i === "(") {
|
|
391
|
+
i = r.next();
|
|
392
|
+
let e = s();
|
|
393
|
+
return i === ")" && (i = r.next()), e;
|
|
394
|
+
}
|
|
395
|
+
if (de(i)) {
|
|
396
|
+
let e = [];
|
|
397
|
+
do
|
|
398
|
+
e.push(i), i = r.next();
|
|
399
|
+
while (de(i));
|
|
400
|
+
return (n) => t(e, n);
|
|
401
|
+
}
|
|
402
|
+
return null;
|
|
403
|
+
}
|
|
404
|
+
function o() {
|
|
405
|
+
let e = [], t = a();
|
|
406
|
+
for (; t;) e.push(t), t = a();
|
|
407
|
+
return (t) => e.every((e) => e(t));
|
|
408
|
+
}
|
|
409
|
+
function s() {
|
|
410
|
+
let e = [], t = o();
|
|
411
|
+
for (; t && (e.push(t), i === "|" || i === ",");) {
|
|
412
|
+
do
|
|
413
|
+
i = r.next();
|
|
414
|
+
while (i === "|" || i === ",");
|
|
415
|
+
t = o();
|
|
416
|
+
}
|
|
417
|
+
return (t) => e.some((e) => e(t));
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
function de(e) {
|
|
421
|
+
return !!e && !!e.match(/[\w\.:]+/);
|
|
422
|
+
}
|
|
423
|
+
function fe(e) {
|
|
424
|
+
let t = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = t.exec(e);
|
|
425
|
+
return { next: () => {
|
|
426
|
+
if (!n) return null;
|
|
427
|
+
let r = n[0];
|
|
428
|
+
return n = t.exec(e), r;
|
|
429
|
+
} };
|
|
430
|
+
}
|
|
431
|
+
function pe(e) {
|
|
432
|
+
typeof e.dispose == "function" && e.dispose();
|
|
433
|
+
}
|
|
434
|
+
var x = class {
|
|
435
|
+
constructor(e) {
|
|
436
|
+
this.scopeName = e;
|
|
437
|
+
}
|
|
438
|
+
toKey() {
|
|
439
|
+
return this.scopeName;
|
|
440
|
+
}
|
|
441
|
+
}, me = class {
|
|
442
|
+
constructor(e, t) {
|
|
443
|
+
this.scopeName = e, this.ruleName = t;
|
|
444
|
+
}
|
|
445
|
+
toKey() {
|
|
446
|
+
return `${this.scopeName}#${this.ruleName}`;
|
|
447
|
+
}
|
|
448
|
+
}, he = class {
|
|
449
|
+
_references = [];
|
|
450
|
+
_seenReferenceKeys = /* @__PURE__ */ new Set();
|
|
451
|
+
get references() {
|
|
452
|
+
return this._references;
|
|
453
|
+
}
|
|
454
|
+
visitedRule = /* @__PURE__ */ new Set();
|
|
455
|
+
add(e) {
|
|
456
|
+
let t = e.toKey();
|
|
457
|
+
this._seenReferenceKeys.has(t) || (this._seenReferenceKeys.add(t), this._references.push(e));
|
|
458
|
+
}
|
|
459
|
+
}, ge = class {
|
|
460
|
+
constructor(e, t) {
|
|
461
|
+
this.repo = e, this.initialScopeName = t, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new x(this.initialScopeName)];
|
|
462
|
+
}
|
|
463
|
+
seenFullScopeRequests = /* @__PURE__ */ new Set();
|
|
464
|
+
seenPartialScopeRequests = /* @__PURE__ */ new Set();
|
|
465
|
+
Q;
|
|
466
|
+
processQueue() {
|
|
467
|
+
let e = this.Q;
|
|
468
|
+
this.Q = [];
|
|
469
|
+
let t = new he();
|
|
470
|
+
for (let n of e) _e(n, this.initialScopeName, this.repo, t);
|
|
471
|
+
for (let e of t.references) if (e instanceof x) {
|
|
472
|
+
if (this.seenFullScopeRequests.has(e.scopeName)) continue;
|
|
473
|
+
this.seenFullScopeRequests.add(e.scopeName), this.Q.push(e);
|
|
474
|
+
} else {
|
|
475
|
+
if (this.seenFullScopeRequests.has(e.scopeName) || this.seenPartialScopeRequests.has(e.toKey())) continue;
|
|
476
|
+
this.seenPartialScopeRequests.add(e.toKey()), this.Q.push(e);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
function _e(e, t, n, r) {
|
|
481
|
+
let i = n.lookup(e.scopeName);
|
|
482
|
+
if (!i) {
|
|
483
|
+
if (e.scopeName === t) throw Error(`No grammar provided for <${t}>`);
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
let a = n.lookup(t);
|
|
487
|
+
e instanceof x ? ye({
|
|
488
|
+
baseGrammar: a,
|
|
489
|
+
selfGrammar: i
|
|
490
|
+
}, r) : ve(e.ruleName, {
|
|
491
|
+
baseGrammar: a,
|
|
492
|
+
selfGrammar: i,
|
|
493
|
+
repository: i.repository
|
|
494
|
+
}, r);
|
|
495
|
+
let o = n.injections(e.scopeName);
|
|
496
|
+
if (o) for (let e of o) r.add(new x(e));
|
|
497
|
+
}
|
|
498
|
+
function ve(e, t, n) {
|
|
499
|
+
if (t.repository && t.repository[e]) {
|
|
500
|
+
let r = t.repository[e];
|
|
501
|
+
be([r], t, n);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
function ye(e, t) {
|
|
505
|
+
e.selfGrammar.patterns && Array.isArray(e.selfGrammar.patterns) && be(e.selfGrammar.patterns, {
|
|
506
|
+
...e,
|
|
507
|
+
repository: e.selfGrammar.repository
|
|
508
|
+
}, t), e.selfGrammar.injections && be(Object.values(e.selfGrammar.injections), {
|
|
509
|
+
...e,
|
|
510
|
+
repository: e.selfGrammar.repository
|
|
511
|
+
}, t);
|
|
512
|
+
}
|
|
513
|
+
function be(e, t, n) {
|
|
514
|
+
for (let r of e) {
|
|
515
|
+
if (n.visitedRule.has(r)) continue;
|
|
516
|
+
n.visitedRule.add(r);
|
|
517
|
+
let e = r.repository ? o({}, t.repository, r.repository) : t.repository;
|
|
518
|
+
Array.isArray(r.patterns) && be(r.patterns, {
|
|
519
|
+
...t,
|
|
520
|
+
repository: e
|
|
521
|
+
}, n);
|
|
522
|
+
let i = r.include;
|
|
523
|
+
if (!i) continue;
|
|
524
|
+
let a = Ee(i);
|
|
525
|
+
switch (a.kind) {
|
|
526
|
+
case 0:
|
|
527
|
+
ye({
|
|
528
|
+
...t,
|
|
529
|
+
selfGrammar: t.baseGrammar
|
|
530
|
+
}, n);
|
|
531
|
+
break;
|
|
532
|
+
case 1:
|
|
533
|
+
ye(t, n);
|
|
534
|
+
break;
|
|
535
|
+
case 2:
|
|
536
|
+
ve(a.ruleName, {
|
|
537
|
+
...t,
|
|
538
|
+
repository: e
|
|
539
|
+
}, n);
|
|
540
|
+
break;
|
|
541
|
+
case 3:
|
|
542
|
+
case 4:
|
|
543
|
+
let r = a.scopeName === t.selfGrammar.scopeName ? t.selfGrammar : a.scopeName === t.baseGrammar.scopeName ? t.baseGrammar : void 0;
|
|
544
|
+
if (r) {
|
|
545
|
+
let i = {
|
|
546
|
+
baseGrammar: t.baseGrammar,
|
|
547
|
+
selfGrammar: r,
|
|
548
|
+
repository: e
|
|
549
|
+
};
|
|
550
|
+
a.kind === 4 ? ve(a.ruleName, i, n) : ye(i, n);
|
|
551
|
+
} else a.kind === 4 ? n.add(new me(a.scopeName, a.ruleName)) : n.add(new x(a.scopeName));
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
var xe = class {
|
|
556
|
+
kind = 0;
|
|
557
|
+
}, Se = class {
|
|
558
|
+
kind = 1;
|
|
559
|
+
}, Ce = class {
|
|
560
|
+
constructor(e) {
|
|
561
|
+
this.ruleName = e;
|
|
562
|
+
}
|
|
563
|
+
kind = 2;
|
|
564
|
+
}, we = class {
|
|
565
|
+
constructor(e) {
|
|
566
|
+
this.scopeName = e;
|
|
567
|
+
}
|
|
568
|
+
kind = 3;
|
|
569
|
+
}, Te = class {
|
|
570
|
+
constructor(e, t) {
|
|
571
|
+
this.scopeName = e, this.ruleName = t;
|
|
572
|
+
}
|
|
573
|
+
kind = 4;
|
|
574
|
+
};
|
|
575
|
+
function Ee(e) {
|
|
576
|
+
if (e === "$base") return new xe();
|
|
577
|
+
if (e === "$self") return new Se();
|
|
578
|
+
let t = e.indexOf("#");
|
|
579
|
+
return t === -1 ? new we(e) : t === 0 ? new Ce(e.substring(1)) : new Te(e.substring(0, t), e.substring(t + 1));
|
|
580
|
+
}
|
|
581
|
+
var De = /\\(\d+)/, Oe = /\\(\d+)/g, ke = -1, Ae = -2;
|
|
582
|
+
function je(e) {
|
|
583
|
+
return e;
|
|
584
|
+
}
|
|
585
|
+
function Me(e) {
|
|
586
|
+
return e;
|
|
587
|
+
}
|
|
588
|
+
var S = class {
|
|
589
|
+
$location;
|
|
590
|
+
id;
|
|
591
|
+
_nameIsCapturing;
|
|
592
|
+
_name;
|
|
593
|
+
_contentNameIsCapturing;
|
|
594
|
+
_contentName;
|
|
595
|
+
constructor(e, t, n, r) {
|
|
596
|
+
this.$location = e, this.id = t, this._name = n || null, this._nameIsCapturing = l.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = l.hasCaptures(this._contentName);
|
|
597
|
+
}
|
|
598
|
+
get debugName() {
|
|
599
|
+
let e = this.$location ? `${s(this.$location.filename)}:${this.$location.line}` : "unknown";
|
|
600
|
+
return `${this.constructor.name}#${this.id} @ ${e}`;
|
|
601
|
+
}
|
|
602
|
+
getName(e, t) {
|
|
603
|
+
return !this._nameIsCapturing || this._name === null || e === null || t === null ? this._name : l.replaceCaptures(this._name, e, t);
|
|
604
|
+
}
|
|
605
|
+
getContentName(e, t) {
|
|
606
|
+
return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : l.replaceCaptures(this._contentName, e, t);
|
|
607
|
+
}
|
|
608
|
+
}, Ne = class extends S {
|
|
609
|
+
retokenizeCapturedWithRuleId;
|
|
610
|
+
constructor(e, t, n, r, i) {
|
|
611
|
+
super(e, t, n, r), this.retokenizeCapturedWithRuleId = i;
|
|
612
|
+
}
|
|
613
|
+
dispose() {}
|
|
614
|
+
collectPatterns(e, t) {
|
|
615
|
+
throw Error("Not supported!");
|
|
616
|
+
}
|
|
617
|
+
compile(e, t) {
|
|
618
|
+
throw Error("Not supported!");
|
|
619
|
+
}
|
|
620
|
+
compileAG(e, t, n, r) {
|
|
621
|
+
throw Error("Not supported!");
|
|
622
|
+
}
|
|
623
|
+
}, Pe = class extends S {
|
|
624
|
+
_match;
|
|
625
|
+
captures;
|
|
626
|
+
_cachedCompiledPatterns;
|
|
627
|
+
constructor(e, t, n, r, i) {
|
|
628
|
+
super(e, t, n, null), this._match = new C(r, this.id), this.captures = i, this._cachedCompiledPatterns = null;
|
|
629
|
+
}
|
|
630
|
+
dispose() {
|
|
631
|
+
this._cachedCompiledPatterns &&= (this._cachedCompiledPatterns.dispose(), null);
|
|
632
|
+
}
|
|
633
|
+
get debugMatchRegExp() {
|
|
634
|
+
return `${this._match.source}`;
|
|
635
|
+
}
|
|
636
|
+
collectPatterns(e, t) {
|
|
637
|
+
t.push(this._match);
|
|
638
|
+
}
|
|
639
|
+
compile(e, t) {
|
|
640
|
+
return this._getCachedCompiledPatterns(e).compile(e);
|
|
641
|
+
}
|
|
642
|
+
compileAG(e, t, n, r) {
|
|
643
|
+
return this._getCachedCompiledPatterns(e).compileAG(e, n, r);
|
|
644
|
+
}
|
|
645
|
+
_getCachedCompiledPatterns(e) {
|
|
646
|
+
return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new w(), this.collectPatterns(e, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
|
|
647
|
+
}
|
|
648
|
+
}, Fe = class extends S {
|
|
649
|
+
hasMissingPatterns;
|
|
650
|
+
patterns;
|
|
651
|
+
_cachedCompiledPatterns;
|
|
652
|
+
constructor(e, t, n, r, i) {
|
|
653
|
+
super(e, t, n, r), this.patterns = i.patterns, this.hasMissingPatterns = i.hasMissingPatterns, this._cachedCompiledPatterns = null;
|
|
654
|
+
}
|
|
655
|
+
dispose() {
|
|
656
|
+
this._cachedCompiledPatterns &&= (this._cachedCompiledPatterns.dispose(), null);
|
|
657
|
+
}
|
|
658
|
+
collectPatterns(e, t) {
|
|
659
|
+
for (let n of this.patterns) e.getRule(n).collectPatterns(e, t);
|
|
660
|
+
}
|
|
661
|
+
compile(e, t) {
|
|
662
|
+
return this._getCachedCompiledPatterns(e).compile(e);
|
|
663
|
+
}
|
|
664
|
+
compileAG(e, t, n, r) {
|
|
665
|
+
return this._getCachedCompiledPatterns(e).compileAG(e, n, r);
|
|
666
|
+
}
|
|
667
|
+
_getCachedCompiledPatterns(e) {
|
|
668
|
+
return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new w(), this.collectPatterns(e, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
|
|
669
|
+
}
|
|
670
|
+
}, Ie = class extends S {
|
|
671
|
+
_begin;
|
|
672
|
+
beginCaptures;
|
|
673
|
+
_end;
|
|
674
|
+
endHasBackReferences;
|
|
675
|
+
endCaptures;
|
|
676
|
+
applyEndPatternLast;
|
|
677
|
+
hasMissingPatterns;
|
|
678
|
+
patterns;
|
|
679
|
+
_cachedCompiledPatterns;
|
|
680
|
+
constructor(e, t, n, r, i, a, o, s, c, l) {
|
|
681
|
+
super(e, t, n, r), this._begin = new C(i, this.id), this.beginCaptures = a, this._end = new C(o || "", -1), this.endHasBackReferences = this._end.hasBackReferences, this.endCaptures = s, this.applyEndPatternLast = c || !1, this.patterns = l.patterns, this.hasMissingPatterns = l.hasMissingPatterns, this._cachedCompiledPatterns = null;
|
|
682
|
+
}
|
|
683
|
+
dispose() {
|
|
684
|
+
this._cachedCompiledPatterns &&= (this._cachedCompiledPatterns.dispose(), null);
|
|
685
|
+
}
|
|
686
|
+
get debugBeginRegExp() {
|
|
687
|
+
return `${this._begin.source}`;
|
|
688
|
+
}
|
|
689
|
+
get debugEndRegExp() {
|
|
690
|
+
return `${this._end.source}`;
|
|
691
|
+
}
|
|
692
|
+
getEndWithResolvedBackReferences(e, t) {
|
|
693
|
+
return this._end.resolveBackReferences(e, t);
|
|
694
|
+
}
|
|
695
|
+
collectPatterns(e, t) {
|
|
696
|
+
t.push(this._begin);
|
|
697
|
+
}
|
|
698
|
+
compile(e, t) {
|
|
699
|
+
return this._getCachedCompiledPatterns(e, t).compile(e);
|
|
700
|
+
}
|
|
701
|
+
compileAG(e, t, n, r) {
|
|
702
|
+
return this._getCachedCompiledPatterns(e, t).compileAG(e, n, r);
|
|
703
|
+
}
|
|
704
|
+
_getCachedCompiledPatterns(e, t) {
|
|
705
|
+
if (!this._cachedCompiledPatterns) {
|
|
706
|
+
this._cachedCompiledPatterns = new w();
|
|
707
|
+
for (let t of this.patterns) e.getRule(t).collectPatterns(e, this._cachedCompiledPatterns);
|
|
708
|
+
this.applyEndPatternLast ? this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end) : this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);
|
|
709
|
+
}
|
|
710
|
+
return this._end.hasBackReferences && (this.applyEndPatternLast ? this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, t) : this._cachedCompiledPatterns.setSource(0, t)), this._cachedCompiledPatterns;
|
|
711
|
+
}
|
|
712
|
+
}, Le = class extends S {
|
|
713
|
+
_begin;
|
|
714
|
+
beginCaptures;
|
|
715
|
+
whileCaptures;
|
|
716
|
+
_while;
|
|
717
|
+
whileHasBackReferences;
|
|
718
|
+
hasMissingPatterns;
|
|
719
|
+
patterns;
|
|
720
|
+
_cachedCompiledPatterns;
|
|
721
|
+
_cachedCompiledWhilePatterns;
|
|
722
|
+
constructor(e, t, n, r, i, a, o, s, c) {
|
|
723
|
+
super(e, t, n, r), this._begin = new C(i, this.id), this.beginCaptures = a, this.whileCaptures = s, this._while = new C(o, Ae), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = c.patterns, this.hasMissingPatterns = c.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
|
|
724
|
+
}
|
|
725
|
+
dispose() {
|
|
726
|
+
this._cachedCompiledPatterns &&= (this._cachedCompiledPatterns.dispose(), null), this._cachedCompiledWhilePatterns &&= (this._cachedCompiledWhilePatterns.dispose(), null);
|
|
727
|
+
}
|
|
728
|
+
get debugBeginRegExp() {
|
|
729
|
+
return `${this._begin.source}`;
|
|
730
|
+
}
|
|
731
|
+
get debugWhileRegExp() {
|
|
732
|
+
return `${this._while.source}`;
|
|
733
|
+
}
|
|
734
|
+
getWhileWithResolvedBackReferences(e, t) {
|
|
735
|
+
return this._while.resolveBackReferences(e, t);
|
|
736
|
+
}
|
|
737
|
+
collectPatterns(e, t) {
|
|
738
|
+
t.push(this._begin);
|
|
739
|
+
}
|
|
740
|
+
compile(e, t) {
|
|
741
|
+
return this._getCachedCompiledPatterns(e).compile(e);
|
|
742
|
+
}
|
|
743
|
+
compileAG(e, t, n, r) {
|
|
744
|
+
return this._getCachedCompiledPatterns(e).compileAG(e, n, r);
|
|
745
|
+
}
|
|
746
|
+
_getCachedCompiledPatterns(e) {
|
|
747
|
+
if (!this._cachedCompiledPatterns) {
|
|
748
|
+
this._cachedCompiledPatterns = new w();
|
|
749
|
+
for (let t of this.patterns) e.getRule(t).collectPatterns(e, this._cachedCompiledPatterns);
|
|
750
|
+
}
|
|
751
|
+
return this._cachedCompiledPatterns;
|
|
752
|
+
}
|
|
753
|
+
compileWhile(e, t) {
|
|
754
|
+
return this._getCachedCompiledWhilePatterns(e, t).compile(e);
|
|
755
|
+
}
|
|
756
|
+
compileWhileAG(e, t, n, r) {
|
|
757
|
+
return this._getCachedCompiledWhilePatterns(e, t).compileAG(e, n, r);
|
|
758
|
+
}
|
|
759
|
+
_getCachedCompiledWhilePatterns(e, t) {
|
|
760
|
+
return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new w(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, t || ""), this._cachedCompiledWhilePatterns;
|
|
761
|
+
}
|
|
762
|
+
}, Re = class e {
|
|
763
|
+
static createCaptureRule(e, t, n, r, i) {
|
|
764
|
+
return e.registerRule((e) => new Ne(t, e, n, r, i));
|
|
765
|
+
}
|
|
766
|
+
static getCompiledRuleId(t, n, r) {
|
|
767
|
+
return t.id || n.registerRule((i) => {
|
|
768
|
+
if (t.id = i, t.match) return new Pe(t.$vscodeTextmateLocation, t.id, t.name, t.match, e._compileCaptures(t.captures, n, r));
|
|
769
|
+
if (t.begin === void 0) {
|
|
770
|
+
t.repository && (r = o({}, r, t.repository));
|
|
771
|
+
let i = t.patterns;
|
|
772
|
+
return i === void 0 && t.include && (i = [{ include: t.include }]), new Fe(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, e._compilePatterns(i, n, r));
|
|
773
|
+
}
|
|
774
|
+
return t.while ? new Le(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, t.begin, e._compileCaptures(t.beginCaptures || t.captures, n, r), t.while, e._compileCaptures(t.whileCaptures || t.captures, n, r), e._compilePatterns(t.patterns, n, r)) : new Ie(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, t.begin, e._compileCaptures(t.beginCaptures || t.captures, n, r), t.end, e._compileCaptures(t.endCaptures || t.captures, n, r), t.applyEndPatternLast, e._compilePatterns(t.patterns, n, r));
|
|
775
|
+
}), t.id;
|
|
776
|
+
}
|
|
777
|
+
static _compileCaptures(t, n, r) {
|
|
778
|
+
let i = [];
|
|
779
|
+
if (t) {
|
|
780
|
+
let a = 0;
|
|
781
|
+
for (let e in t) {
|
|
782
|
+
if (e === "$vscodeTextmateLocation") continue;
|
|
783
|
+
let t = parseInt(e, 10);
|
|
784
|
+
t > a && (a = t);
|
|
785
|
+
}
|
|
786
|
+
for (let e = 0; e <= a; e++) i[e] = null;
|
|
787
|
+
for (let a in t) {
|
|
788
|
+
if (a === "$vscodeTextmateLocation") continue;
|
|
789
|
+
let o = parseInt(a, 10), s = 0;
|
|
790
|
+
t[a].patterns && (s = e.getCompiledRuleId(t[a], n, r)), i[o] = e.createCaptureRule(n, t[a].$vscodeTextmateLocation, t[a].name, t[a].contentName, s);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
return i;
|
|
794
|
+
}
|
|
795
|
+
static _compilePatterns(t, n, r) {
|
|
796
|
+
let i = [];
|
|
797
|
+
if (t) for (let a = 0, o = t.length; a < o; a++) {
|
|
798
|
+
let o = t[a], s = -1;
|
|
799
|
+
if (o.include) {
|
|
800
|
+
let t = Ee(o.include);
|
|
801
|
+
switch (t.kind) {
|
|
802
|
+
case 0:
|
|
803
|
+
case 1:
|
|
804
|
+
s = e.getCompiledRuleId(r[o.include], n, r);
|
|
805
|
+
break;
|
|
806
|
+
case 2:
|
|
807
|
+
let i = r[t.ruleName];
|
|
808
|
+
i && (s = e.getCompiledRuleId(i, n, r));
|
|
809
|
+
break;
|
|
810
|
+
case 3:
|
|
811
|
+
case 4:
|
|
812
|
+
let a = t.scopeName, c = t.kind === 4 ? t.ruleName : null, l = n.getExternalGrammar(a, r);
|
|
813
|
+
if (l) {
|
|
814
|
+
if (c) {
|
|
815
|
+
let t = l.repository[c];
|
|
816
|
+
t && (s = e.getCompiledRuleId(t, n, l.repository));
|
|
817
|
+
} else s = e.getCompiledRuleId(l.repository.$self, n, l.repository);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
} else s = e.getCompiledRuleId(o, n, r);
|
|
821
|
+
if (s !== -1) {
|
|
822
|
+
let e = n.getRule(s), t = !1;
|
|
823
|
+
if ((e instanceof Fe || e instanceof Ie || e instanceof Le) && e.hasMissingPatterns && e.patterns.length === 0 && (t = !0), t) continue;
|
|
824
|
+
i.push(s);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return {
|
|
828
|
+
patterns: i,
|
|
829
|
+
hasMissingPatterns: (t ? t.length : 0) !== i.length
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
}, C = class e {
|
|
833
|
+
source;
|
|
834
|
+
ruleId;
|
|
835
|
+
hasAnchor;
|
|
836
|
+
hasBackReferences;
|
|
837
|
+
_anchorCache;
|
|
838
|
+
constructor(e, t) {
|
|
839
|
+
if (e && typeof e == "string") {
|
|
840
|
+
let t = e.length, n = 0, r = [], i = !1;
|
|
841
|
+
for (let a = 0; a < t; a++) if (e.charAt(a) === "\\" && a + 1 < t) {
|
|
842
|
+
let t = e.charAt(a + 1);
|
|
843
|
+
t === "z" ? (r.push(e.substring(n, a)), r.push("$(?!\\n)(?<!\\n)"), n = a + 2) : (t === "A" || t === "G") && (i = !0), a++;
|
|
844
|
+
}
|
|
845
|
+
this.hasAnchor = i, n === 0 ? this.source = e : (r.push(e.substring(n, t)), this.source = r.join(""));
|
|
846
|
+
} else this.hasAnchor = !1, this.source = e;
|
|
847
|
+
this._anchorCache = this.hasAnchor ? this._buildAnchorCache() : null, this.ruleId = t, this.hasBackReferences = typeof this.source == "string" && De.test(this.source);
|
|
848
|
+
}
|
|
849
|
+
clone() {
|
|
850
|
+
return new e(this.source, this.ruleId);
|
|
851
|
+
}
|
|
852
|
+
setSource(e) {
|
|
853
|
+
this.source !== e && (this.source = e, this.hasAnchor && (this._anchorCache = this._buildAnchorCache()));
|
|
854
|
+
}
|
|
855
|
+
resolveBackReferences(e, t) {
|
|
856
|
+
if (typeof this.source != "string") throw Error("This method should only be called if the source is a string");
|
|
857
|
+
let n = t.map((t) => e.substring(t.start, t.end));
|
|
858
|
+
return Oe.lastIndex = 0, this.source.replace(Oe, (e, t) => p(n[parseInt(t, 10)] || ""));
|
|
859
|
+
}
|
|
860
|
+
_buildAnchorCache() {
|
|
861
|
+
if (typeof this.source != "string") throw Error("This method should only be called if the source is a string");
|
|
862
|
+
let e = [], t = [], n = [], r = [], i, a, o, s;
|
|
863
|
+
for (i = 0, a = this.source.length; i < a; i++) o = this.source.charAt(i), e[i] = o, t[i] = o, n[i] = o, r[i] = o, o === "\\" && i + 1 < a && (s = this.source.charAt(i + 1), s === "A" ? (e[i + 1] = "", t[i + 1] = "", n[i + 1] = "A", r[i + 1] = "A") : s === "G" ? (e[i + 1] = "", t[i + 1] = "G", n[i + 1] = "", r[i + 1] = "G") : (e[i + 1] = s, t[i + 1] = s, n[i + 1] = s, r[i + 1] = s), i++);
|
|
864
|
+
return {
|
|
865
|
+
A0_G0: e.join(""),
|
|
866
|
+
A0_G1: t.join(""),
|
|
867
|
+
A1_G0: n.join(""),
|
|
868
|
+
A1_G1: r.join("")
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
resolveAnchors(e, t) {
|
|
872
|
+
return !this.hasAnchor || !this._anchorCache || typeof this.source != "string" ? this.source : e ? t ? this._anchorCache.A1_G1 : this._anchorCache.A1_G0 : t ? this._anchorCache.A0_G1 : this._anchorCache.A0_G0;
|
|
873
|
+
}
|
|
874
|
+
}, w = class {
|
|
875
|
+
_items;
|
|
876
|
+
_hasAnchors;
|
|
877
|
+
_cached;
|
|
878
|
+
_anchorCache;
|
|
879
|
+
constructor() {
|
|
880
|
+
this._items = [], this._hasAnchors = !1, this._cached = null, this._anchorCache = {
|
|
881
|
+
A0_G0: null,
|
|
882
|
+
A0_G1: null,
|
|
883
|
+
A1_G0: null,
|
|
884
|
+
A1_G1: null
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
dispose() {
|
|
888
|
+
this._disposeCaches();
|
|
889
|
+
}
|
|
890
|
+
_disposeCaches() {
|
|
891
|
+
this._cached &&= (this._cached.dispose(), null), this._anchorCache.A0_G0 && (this._anchorCache.A0_G0.dispose(), this._anchorCache.A0_G0 = null), this._anchorCache.A0_G1 && (this._anchorCache.A0_G1.dispose(), this._anchorCache.A0_G1 = null), this._anchorCache.A1_G0 && (this._anchorCache.A1_G0.dispose(), this._anchorCache.A1_G0 = null), this._anchorCache.A1_G1 && (this._anchorCache.A1_G1.dispose(), this._anchorCache.A1_G1 = null);
|
|
892
|
+
}
|
|
893
|
+
push(e) {
|
|
894
|
+
this._items.push(e), this._hasAnchors = this._hasAnchors || e.hasAnchor;
|
|
895
|
+
}
|
|
896
|
+
unshift(e) {
|
|
897
|
+
this._items.unshift(e), this._hasAnchors = this._hasAnchors || e.hasAnchor;
|
|
898
|
+
}
|
|
899
|
+
length() {
|
|
900
|
+
return this._items.length;
|
|
901
|
+
}
|
|
902
|
+
setSource(e, t) {
|
|
903
|
+
this._items[e].source !== t && (this._disposeCaches(), this._items[e].setSource(t));
|
|
904
|
+
}
|
|
905
|
+
compile(e) {
|
|
906
|
+
if (!this._cached) {
|
|
907
|
+
let t = this._items.map((e) => e.source);
|
|
908
|
+
this._cached = new ze(e, t, this._items.map((e) => e.ruleId));
|
|
909
|
+
}
|
|
910
|
+
return this._cached;
|
|
911
|
+
}
|
|
912
|
+
compileAG(e, t, n) {
|
|
913
|
+
return this._hasAnchors ? t ? n ? (this._anchorCache.A1_G1 || (this._anchorCache.A1_G1 = this._resolveAnchors(e, t, n)), this._anchorCache.A1_G1) : (this._anchorCache.A1_G0 || (this._anchorCache.A1_G0 = this._resolveAnchors(e, t, n)), this._anchorCache.A1_G0) : n ? (this._anchorCache.A0_G1 || (this._anchorCache.A0_G1 = this._resolveAnchors(e, t, n)), this._anchorCache.A0_G1) : (this._anchorCache.A0_G0 || (this._anchorCache.A0_G0 = this._resolveAnchors(e, t, n)), this._anchorCache.A0_G0) : this.compile(e);
|
|
914
|
+
}
|
|
915
|
+
_resolveAnchors(e, t, n) {
|
|
916
|
+
return new ze(e, this._items.map((e) => e.resolveAnchors(t, n)), this._items.map((e) => e.ruleId));
|
|
917
|
+
}
|
|
918
|
+
}, ze = class {
|
|
919
|
+
constructor(e, t, n) {
|
|
920
|
+
this.regExps = t, this.rules = n, this.scanner = e.createOnigScanner(t);
|
|
921
|
+
}
|
|
922
|
+
scanner;
|
|
923
|
+
dispose() {
|
|
924
|
+
typeof this.scanner.dispose == "function" && this.scanner.dispose();
|
|
925
|
+
}
|
|
926
|
+
toString() {
|
|
927
|
+
let e = [];
|
|
928
|
+
for (let t = 0, n = this.rules.length; t < n; t++) e.push(" - " + this.rules[t] + ": " + this.regExps[t]);
|
|
929
|
+
return e.join("\n");
|
|
930
|
+
}
|
|
931
|
+
findNextMatchSync(e, t, n) {
|
|
932
|
+
let r = this.scanner.findNextMatchSync(e, t, n);
|
|
933
|
+
return r ? {
|
|
934
|
+
ruleId: this.rules[r.index],
|
|
935
|
+
captureIndices: r.captureIndices
|
|
936
|
+
} : null;
|
|
937
|
+
}
|
|
938
|
+
}, Be = class {
|
|
939
|
+
constructor(e, t) {
|
|
940
|
+
this.languageId = e, this.tokenType = t;
|
|
941
|
+
}
|
|
942
|
+
}, Ve = class e {
|
|
943
|
+
_defaultAttributes;
|
|
944
|
+
_embeddedLanguagesMatcher;
|
|
945
|
+
constructor(e, t) {
|
|
946
|
+
this._defaultAttributes = new Be(e, 8), this._embeddedLanguagesMatcher = new He(Object.entries(t || {}));
|
|
947
|
+
}
|
|
948
|
+
getDefaultAttributes() {
|
|
949
|
+
return this._defaultAttributes;
|
|
950
|
+
}
|
|
951
|
+
getBasicScopeAttributes(t) {
|
|
952
|
+
return t === null ? e._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(t);
|
|
953
|
+
}
|
|
954
|
+
static _NULL_SCOPE_METADATA = new Be(0, 0);
|
|
955
|
+
_getBasicScopeAttributes = new m((e) => new Be(this._scopeToLanguage(e), this._toStandardTokenType(e)));
|
|
956
|
+
_scopeToLanguage(e) {
|
|
957
|
+
return this._embeddedLanguagesMatcher.match(e) || 0;
|
|
958
|
+
}
|
|
959
|
+
_toStandardTokenType(t) {
|
|
960
|
+
let n = t.match(e.STANDARD_TOKEN_TYPE_REGEXP);
|
|
961
|
+
if (!n) return 8;
|
|
962
|
+
switch (n[1]) {
|
|
963
|
+
case "comment": return 1;
|
|
964
|
+
case "string": return 2;
|
|
965
|
+
case "regex": return 3;
|
|
966
|
+
case "meta.embedded": return 0;
|
|
967
|
+
}
|
|
968
|
+
throw Error("Unexpected match for standard token type!");
|
|
969
|
+
}
|
|
970
|
+
static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
|
|
971
|
+
}, He = class {
|
|
972
|
+
values;
|
|
973
|
+
scopesRegExp;
|
|
974
|
+
constructor(e) {
|
|
975
|
+
if (e.length === 0) this.values = null, this.scopesRegExp = null;
|
|
976
|
+
else {
|
|
977
|
+
this.values = new Map(e);
|
|
978
|
+
let t = e.map(([e, t]) => p(e));
|
|
979
|
+
t.sort(), t.reverse(), this.scopesRegExp = RegExp(`^((${t.join(")|(")}))($|\\.)`, "");
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
match(e) {
|
|
983
|
+
if (!this.scopesRegExp) return;
|
|
984
|
+
let t = e.match(this.scopesRegExp);
|
|
985
|
+
if (t) return this.values.get(t[1]);
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
typeof process < "u" && process.env.VSCODE_TEXTMATE_DEBUG;
|
|
989
|
+
var Ue = class {
|
|
990
|
+
constructor(e, t) {
|
|
991
|
+
this.stack = e, this.stoppedEarly = t;
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
function We(e, t, n, r, i, a, o, s) {
|
|
995
|
+
let c = t.content.length, l = !1, u = -1;
|
|
996
|
+
if (o) {
|
|
997
|
+
let o = Ge(e, t, n, r, i, a);
|
|
998
|
+
i = o.stack, r = o.linePos, n = o.isFirstLine, u = o.anchorPosition;
|
|
999
|
+
}
|
|
1000
|
+
let d = Date.now();
|
|
1001
|
+
for (; !l;) {
|
|
1002
|
+
if (s !== 0 && Date.now() - d > s) return new Ue(i, !0);
|
|
1003
|
+
f();
|
|
1004
|
+
}
|
|
1005
|
+
return new Ue(i, !1);
|
|
1006
|
+
function f() {
|
|
1007
|
+
let o = Ke(e, t, n, r, i, u);
|
|
1008
|
+
if (!o) {
|
|
1009
|
+
a.produce(i, c), l = !0;
|
|
1010
|
+
return;
|
|
1011
|
+
}
|
|
1012
|
+
let s = o.captureIndices, d = o.matchedRuleId, f = s && s.length > 0 ? s[0].end > r : !1;
|
|
1013
|
+
if (d === ke) {
|
|
1014
|
+
let o = i.getRule(e);
|
|
1015
|
+
a.produce(i, s[0].start), i = i.withContentNameScopesList(i.nameScopesList), T(e, t, n, i, a, o.endCaptures, s), a.produce(i, s[0].end);
|
|
1016
|
+
let d = i;
|
|
1017
|
+
if (i = i.parent, u = d.getAnchorPos(), !f && d.getEnterPos() === r) {
|
|
1018
|
+
i = d, a.produce(i, c), l = !0;
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
} else {
|
|
1022
|
+
let o = e.getRule(d);
|
|
1023
|
+
a.produce(i, s[0].start);
|
|
1024
|
+
let p = i, m = o.getName(t.content, s), h = i.contentNameScopesList.pushAttributed(m, e);
|
|
1025
|
+
if (i = i.push(d, r, u, s[0].end === c, null, h, h), o instanceof Ie) {
|
|
1026
|
+
let r = o;
|
|
1027
|
+
T(e, t, n, i, a, r.beginCaptures, s), a.produce(i, s[0].end), u = s[0].end;
|
|
1028
|
+
let d = r.getContentName(t.content, s), m = h.pushAttributed(d, e);
|
|
1029
|
+
if (i = i.withContentNameScopesList(m), r.endHasBackReferences && (i = i.withEndRule(r.getEndWithResolvedBackReferences(t.content, s))), !f && p.hasSameRuleAs(i)) {
|
|
1030
|
+
i = i.pop(), a.produce(i, c), l = !0;
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
} else if (o instanceof Le) {
|
|
1034
|
+
let r = o;
|
|
1035
|
+
T(e, t, n, i, a, r.beginCaptures, s), a.produce(i, s[0].end), u = s[0].end;
|
|
1036
|
+
let d = r.getContentName(t.content, s), m = h.pushAttributed(d, e);
|
|
1037
|
+
if (i = i.withContentNameScopesList(m), r.whileHasBackReferences && (i = i.withEndRule(r.getWhileWithResolvedBackReferences(t.content, s))), !f && p.hasSameRuleAs(i)) {
|
|
1038
|
+
i = i.pop(), a.produce(i, c), l = !0;
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
} else if (T(e, t, n, i, a, o.captures, s), a.produce(i, s[0].end), i = i.pop(), !f) {
|
|
1042
|
+
i = i.safePop(), a.produce(i, c), l = !0;
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
s[0].end > r && (r = s[0].end, n = !1);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
function Ge(e, t, n, r, i, a) {
|
|
1050
|
+
let o = i.beginRuleCapturedEOL ? 0 : -1, s = [];
|
|
1051
|
+
for (let t = i; t; t = t.pop()) {
|
|
1052
|
+
let n = t.getRule(e);
|
|
1053
|
+
n instanceof Le && s.push({
|
|
1054
|
+
rule: n,
|
|
1055
|
+
stack: t
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
for (let c = s.pop(); c; c = s.pop()) {
|
|
1059
|
+
let { ruleScanner: s, findOptions: l } = Xe(c.rule, e, c.stack.endRule, n, r === o), u = s.findNextMatchSync(t, r, l);
|
|
1060
|
+
if (u) {
|
|
1061
|
+
if (u.ruleId !== Ae) {
|
|
1062
|
+
i = c.stack.pop();
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
u.captureIndices && u.captureIndices.length && (a.produce(c.stack, u.captureIndices[0].start), T(e, t, n, c.stack, a, c.rule.whileCaptures, u.captureIndices), a.produce(c.stack, u.captureIndices[0].end), o = u.captureIndices[0].end, u.captureIndices[0].end > r && (r = u.captureIndices[0].end, n = !1));
|
|
1066
|
+
} else {
|
|
1067
|
+
i = c.stack.pop();
|
|
1068
|
+
break;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
return {
|
|
1072
|
+
stack: i,
|
|
1073
|
+
linePos: r,
|
|
1074
|
+
anchorPosition: o,
|
|
1075
|
+
isFirstLine: n
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
function Ke(e, t, n, r, i, a) {
|
|
1079
|
+
let o = qe(e, t, n, r, i, a), s = e.getInjections();
|
|
1080
|
+
if (s.length === 0) return o;
|
|
1081
|
+
let c = Je(s, e, t, n, r, i, a);
|
|
1082
|
+
if (!c) return o;
|
|
1083
|
+
if (!o) return c;
|
|
1084
|
+
let l = o.captureIndices[0].start, u = c.captureIndices[0].start;
|
|
1085
|
+
return u < l || c.priorityMatch && u === l ? c : o;
|
|
1086
|
+
}
|
|
1087
|
+
function qe(e, t, n, r, i, a) {
|
|
1088
|
+
let { ruleScanner: o, findOptions: s } = Ye(i.getRule(e), e, i.endRule, n, r === a), c = o.findNextMatchSync(t, r, s);
|
|
1089
|
+
return c ? {
|
|
1090
|
+
captureIndices: c.captureIndices,
|
|
1091
|
+
matchedRuleId: c.ruleId
|
|
1092
|
+
} : null;
|
|
1093
|
+
}
|
|
1094
|
+
function Je(e, t, n, r, i, a, o) {
|
|
1095
|
+
let s = Number.MAX_VALUE, c = null, l, u = 0, d = a.contentNameScopesList.getScopeNames();
|
|
1096
|
+
for (let a = 0, f = e.length; a < f; a++) {
|
|
1097
|
+
let f = e[a];
|
|
1098
|
+
if (!f.matcher(d)) continue;
|
|
1099
|
+
let { ruleScanner: p, findOptions: m } = Ye(t.getRule(f.ruleId), t, null, r, i === o), h = p.findNextMatchSync(n, i, m);
|
|
1100
|
+
if (!h) continue;
|
|
1101
|
+
let g = h.captureIndices[0].start;
|
|
1102
|
+
if (!(g >= s) && (s = g, c = h.captureIndices, l = h.ruleId, u = f.priority, s === i)) break;
|
|
1103
|
+
}
|
|
1104
|
+
return c ? {
|
|
1105
|
+
priorityMatch: u === -1,
|
|
1106
|
+
captureIndices: c,
|
|
1107
|
+
matchedRuleId: l
|
|
1108
|
+
} : null;
|
|
1109
|
+
}
|
|
1110
|
+
function Ye(e, t, n, r, i) {
|
|
1111
|
+
return {
|
|
1112
|
+
ruleScanner: e.compileAG(t, n, r, i),
|
|
1113
|
+
findOptions: 0
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
function Xe(e, t, n, r, i) {
|
|
1117
|
+
return {
|
|
1118
|
+
ruleScanner: e.compileWhileAG(t, n, r, i),
|
|
1119
|
+
findOptions: 0
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
function T(e, t, n, r, i, a, o) {
|
|
1123
|
+
if (a.length === 0) return;
|
|
1124
|
+
let s = t.content, c = Math.min(a.length, o.length), l = [], u = o[0].end;
|
|
1125
|
+
for (let t = 0; t < c; t++) {
|
|
1126
|
+
let c = a[t];
|
|
1127
|
+
if (c === null) continue;
|
|
1128
|
+
let d = o[t];
|
|
1129
|
+
if (d.length === 0) continue;
|
|
1130
|
+
if (d.start > u) break;
|
|
1131
|
+
for (; l.length > 0 && l[l.length - 1].endPos <= d.start;) i.produceFromScopes(l[l.length - 1].scopes, l[l.length - 1].endPos), l.pop();
|
|
1132
|
+
if (l.length > 0 ? i.produceFromScopes(l[l.length - 1].scopes, d.start) : i.produce(r, d.start), c.retokenizeCapturedWithRuleId) {
|
|
1133
|
+
let t = c.getName(s, o), a = r.contentNameScopesList.pushAttributed(t, e), l = c.getContentName(s, o), u = a.pushAttributed(l, e), f = r.push(c.retokenizeCapturedWithRuleId, d.start, -1, !1, null, a, u), p = e.createOnigString(s.substring(0, d.end));
|
|
1134
|
+
We(e, p, n && d.start === 0, d.start, f, i, !1, 0), pe(p);
|
|
1135
|
+
continue;
|
|
1136
|
+
}
|
|
1137
|
+
let f = c.getName(s, o);
|
|
1138
|
+
if (f !== null) {
|
|
1139
|
+
let t = (l.length > 0 ? l[l.length - 1].scopes : r.contentNameScopesList).pushAttributed(f, e);
|
|
1140
|
+
l.push(new Ze(t, d.end));
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
for (; l.length > 0;) i.produceFromScopes(l[l.length - 1].scopes, l[l.length - 1].endPos), l.pop();
|
|
1144
|
+
}
|
|
1145
|
+
var Ze = class {
|
|
1146
|
+
scopes;
|
|
1147
|
+
endPos;
|
|
1148
|
+
constructor(e, t) {
|
|
1149
|
+
this.scopes = e, this.endPos = t;
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
1152
|
+
function Qe(e, t, n, r, i, a, o, s) {
|
|
1153
|
+
return new tt(e, t, n, r, i, a, o, s);
|
|
1154
|
+
}
|
|
1155
|
+
function $e(e, t, n, r, i) {
|
|
1156
|
+
let a = ue(t, E), o = Re.getCompiledRuleId(n, r, i.repository);
|
|
1157
|
+
for (let n of a) e.push({
|
|
1158
|
+
debugSelector: t,
|
|
1159
|
+
matcher: n.matcher,
|
|
1160
|
+
ruleId: o,
|
|
1161
|
+
grammar: i,
|
|
1162
|
+
priority: n.priority
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
function E(e, t) {
|
|
1166
|
+
if (t.length < e.length) return !1;
|
|
1167
|
+
let n = 0;
|
|
1168
|
+
return e.every((e) => {
|
|
1169
|
+
for (let r = n; r < t.length; r++) if (et(t[r], e)) return n = r + 1, !0;
|
|
1170
|
+
return !1;
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
function et(e, t) {
|
|
1174
|
+
if (!e) return !1;
|
|
1175
|
+
if (e === t) return !0;
|
|
1176
|
+
let n = t.length;
|
|
1177
|
+
return e.length > n && e.substr(0, n) === t && e[n] === ".";
|
|
1178
|
+
}
|
|
1179
|
+
var tt = class {
|
|
1180
|
+
constructor(e, t, n, r, i, a, o, s) {
|
|
1181
|
+
if (this._rootScopeName = e, this.balancedBracketSelectors = a, this._onigLib = s, this._basicScopeAttributesProvider = new Ve(n, r), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = o, this._grammar = nt(t, null), this._injections = null, this._tokenTypeMatchers = [], i) for (let e of Object.keys(i)) {
|
|
1182
|
+
let t = ue(e, E);
|
|
1183
|
+
for (let n of t) this._tokenTypeMatchers.push({
|
|
1184
|
+
matcher: n.matcher,
|
|
1185
|
+
type: i[e]
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
_rootId;
|
|
1190
|
+
_lastRuleId;
|
|
1191
|
+
_ruleId2desc;
|
|
1192
|
+
_includedGrammars;
|
|
1193
|
+
_grammarRepository;
|
|
1194
|
+
_grammar;
|
|
1195
|
+
_injections;
|
|
1196
|
+
_basicScopeAttributesProvider;
|
|
1197
|
+
_tokenTypeMatchers;
|
|
1198
|
+
get themeProvider() {
|
|
1199
|
+
return this._grammarRepository;
|
|
1200
|
+
}
|
|
1201
|
+
dispose() {
|
|
1202
|
+
for (let e of this._ruleId2desc) e && e.dispose();
|
|
1203
|
+
}
|
|
1204
|
+
createOnigScanner(e) {
|
|
1205
|
+
return this._onigLib.createOnigScanner(e);
|
|
1206
|
+
}
|
|
1207
|
+
createOnigString(e) {
|
|
1208
|
+
return this._onigLib.createOnigString(e);
|
|
1209
|
+
}
|
|
1210
|
+
getMetadataForScope(e) {
|
|
1211
|
+
return this._basicScopeAttributesProvider.getBasicScopeAttributes(e);
|
|
1212
|
+
}
|
|
1213
|
+
_collectInjections() {
|
|
1214
|
+
let e = {
|
|
1215
|
+
lookup: (e) => e === this._rootScopeName ? this._grammar : this.getExternalGrammar(e),
|
|
1216
|
+
injections: (e) => this._grammarRepository.injections(e)
|
|
1217
|
+
}, t = [], n = this._rootScopeName, r = e.lookup(n);
|
|
1218
|
+
if (r) {
|
|
1219
|
+
let e = r.injections;
|
|
1220
|
+
if (e) for (let n in e) $e(t, n, e[n], this, r);
|
|
1221
|
+
let i = this._grammarRepository.injections(n);
|
|
1222
|
+
i && i.forEach((e) => {
|
|
1223
|
+
let n = this.getExternalGrammar(e);
|
|
1224
|
+
if (n) {
|
|
1225
|
+
let e = n.injectionSelector;
|
|
1226
|
+
e && $e(t, e, n, this, n);
|
|
1227
|
+
}
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
return t.sort((e, t) => e.priority - t.priority), t;
|
|
1231
|
+
}
|
|
1232
|
+
getInjections() {
|
|
1233
|
+
return this._injections === null && (this._injections = this._collectInjections()), this._injections;
|
|
1234
|
+
}
|
|
1235
|
+
registerRule(e) {
|
|
1236
|
+
let t = ++this._lastRuleId, n = e(je(t));
|
|
1237
|
+
return this._ruleId2desc[t] = n, n;
|
|
1238
|
+
}
|
|
1239
|
+
getRule(e) {
|
|
1240
|
+
return this._ruleId2desc[Me(e)];
|
|
1241
|
+
}
|
|
1242
|
+
getExternalGrammar(e, t) {
|
|
1243
|
+
if (this._includedGrammars[e]) return this._includedGrammars[e];
|
|
1244
|
+
if (this._grammarRepository) {
|
|
1245
|
+
let n = this._grammarRepository.lookup(e);
|
|
1246
|
+
if (n) return this._includedGrammars[e] = nt(n, t && t.$base), this._includedGrammars[e];
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
tokenizeLine(e, t, n = 0) {
|
|
1250
|
+
let r = this._tokenize(e, t, !1, n);
|
|
1251
|
+
return {
|
|
1252
|
+
tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),
|
|
1253
|
+
ruleStack: r.ruleStack,
|
|
1254
|
+
stoppedEarly: r.stoppedEarly
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
tokenizeLine2(e, t, n = 0) {
|
|
1258
|
+
let r = this._tokenize(e, t, !0, n);
|
|
1259
|
+
return {
|
|
1260
|
+
tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),
|
|
1261
|
+
ruleStack: r.ruleStack,
|
|
1262
|
+
stoppedEarly: r.stoppedEarly
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
_tokenize(e, t, n, r) {
|
|
1266
|
+
this._rootId === -1 && (this._rootId = Re.getCompiledRuleId(this._grammar.repository.$self, this, this._grammar.repository), this.getInjections());
|
|
1267
|
+
let i;
|
|
1268
|
+
if (!t || t === rt.NULL) {
|
|
1269
|
+
i = !0;
|
|
1270
|
+
let e = this._basicScopeAttributesProvider.getDefaultAttributes(), n = this.themeProvider.getDefaults(), r = b.set(0, e.languageId, e.tokenType, null, n.fontStyle, n.foregroundId, n.backgroundId), a = this.getRule(this._rootId).getName(null, null), o;
|
|
1271
|
+
o = a ? D.createRootAndLookUpScopeName(a, r, this) : D.createRoot("unknown", r), t = new rt(null, this._rootId, -1, -1, !1, null, o, o);
|
|
1272
|
+
} else i = !1, t.reset();
|
|
1273
|
+
e += "\n";
|
|
1274
|
+
let a = this.createOnigString(e), o = a.content.length, s = new at(n, e, this._tokenTypeMatchers, this.balancedBracketSelectors), c = We(this, a, i, 0, t, s, !0, r);
|
|
1275
|
+
return pe(a), {
|
|
1276
|
+
lineLength: o,
|
|
1277
|
+
lineTokens: s,
|
|
1278
|
+
ruleStack: c.stack,
|
|
1279
|
+
stoppedEarly: c.stoppedEarly
|
|
1280
|
+
};
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
function nt(e, t) {
|
|
1284
|
+
return e = n(e), e.repository = e.repository || {}, e.repository.$self = {
|
|
1285
|
+
$vscodeTextmateLocation: e.$vscodeTextmateLocation,
|
|
1286
|
+
patterns: e.patterns,
|
|
1287
|
+
name: e.scopeName
|
|
1288
|
+
}, e.repository.$base = t || e.repository.$self, e;
|
|
1289
|
+
}
|
|
1290
|
+
var D = class e {
|
|
1291
|
+
constructor(e, t, n) {
|
|
1292
|
+
this.parent = e, this.scopePath = t, this.tokenAttributes = n;
|
|
1293
|
+
}
|
|
1294
|
+
static fromExtension(t, n) {
|
|
1295
|
+
let r = t, i = t?.scopePath ?? null;
|
|
1296
|
+
for (let t of n) i = g.push(i, t.scopeNames), r = new e(r, i, t.encodedTokenAttributes);
|
|
1297
|
+
return r;
|
|
1298
|
+
}
|
|
1299
|
+
static createRoot(t, n) {
|
|
1300
|
+
return new e(null, new g(null, t), n);
|
|
1301
|
+
}
|
|
1302
|
+
static createRootAndLookUpScopeName(t, n, r) {
|
|
1303
|
+
let i = r.getMetadataForScope(t), a = new g(null, t), o = r.themeProvider.themeMatch(a), s = e.mergeAttributes(n, i, o);
|
|
1304
|
+
return new e(null, a, s);
|
|
1305
|
+
}
|
|
1306
|
+
get scopeName() {
|
|
1307
|
+
return this.scopePath.scopeName;
|
|
1308
|
+
}
|
|
1309
|
+
toString() {
|
|
1310
|
+
return this.getScopeNames().join(" ");
|
|
1311
|
+
}
|
|
1312
|
+
equals(t) {
|
|
1313
|
+
return e.equals(this, t);
|
|
1314
|
+
}
|
|
1315
|
+
static equals(e, t) {
|
|
1316
|
+
do {
|
|
1317
|
+
if (e === t || !e && !t) return !0;
|
|
1318
|
+
if (!e || !t || e.scopeName !== t.scopeName || e.tokenAttributes !== t.tokenAttributes) return !1;
|
|
1319
|
+
e = e.parent, t = t.parent;
|
|
1320
|
+
} while (1);
|
|
1321
|
+
}
|
|
1322
|
+
static mergeAttributes(e, t, n) {
|
|
1323
|
+
let r = -1, i = 0, a = 0;
|
|
1324
|
+
return n !== null && (r = n.fontStyle, i = n.foregroundId, a = n.backgroundId), b.set(e, t.languageId, t.tokenType, null, r, i, a);
|
|
1325
|
+
}
|
|
1326
|
+
pushAttributed(t, n) {
|
|
1327
|
+
if (t === null) return this;
|
|
1328
|
+
if (t.indexOf(" ") === -1) return e._pushAttributed(this, t, n);
|
|
1329
|
+
let r = t.split(/ /g), i = this;
|
|
1330
|
+
for (let t of r) i = e._pushAttributed(i, t, n);
|
|
1331
|
+
return i;
|
|
1332
|
+
}
|
|
1333
|
+
static _pushAttributed(t, n, r) {
|
|
1334
|
+
let i = r.getMetadataForScope(n), a = t.scopePath.push(n), o = r.themeProvider.themeMatch(a), s = e.mergeAttributes(t.tokenAttributes, i, o);
|
|
1335
|
+
return new e(t, a, s);
|
|
1336
|
+
}
|
|
1337
|
+
getScopeNames() {
|
|
1338
|
+
return this.scopePath.getSegments();
|
|
1339
|
+
}
|
|
1340
|
+
getExtensionIfDefined(e) {
|
|
1341
|
+
let t = [], n = this;
|
|
1342
|
+
for (; n && n !== e;) t.push({
|
|
1343
|
+
encodedTokenAttributes: n.tokenAttributes,
|
|
1344
|
+
scopeNames: n.scopePath.getExtensionIfDefined(n.parent?.scopePath ?? null)
|
|
1345
|
+
}), n = n.parent;
|
|
1346
|
+
return n === e ? t.reverse() : void 0;
|
|
1347
|
+
}
|
|
1348
|
+
}, rt = class e {
|
|
1349
|
+
constructor(e, t, n, r, i, a, o, s) {
|
|
1350
|
+
this.parent = e, this.ruleId = t, this.beginRuleCapturedEOL = i, this.endRule = a, this.nameScopesList = o, this.contentNameScopesList = s, this.depth = this.parent ? this.parent.depth + 1 : 1, this._enterPos = n, this._anchorPos = r;
|
|
1351
|
+
}
|
|
1352
|
+
_stackElementBrand = void 0;
|
|
1353
|
+
static NULL = new e(null, 0, 0, 0, !1, null, null, null);
|
|
1354
|
+
_enterPos;
|
|
1355
|
+
_anchorPos;
|
|
1356
|
+
depth;
|
|
1357
|
+
equals(t) {
|
|
1358
|
+
return t !== null && e._equals(this, t);
|
|
1359
|
+
}
|
|
1360
|
+
static _equals(e, t) {
|
|
1361
|
+
return e === t ? !0 : this._structuralEquals(e, t) ? D.equals(e.contentNameScopesList, t.contentNameScopesList) : !1;
|
|
1362
|
+
}
|
|
1363
|
+
static _structuralEquals(e, t) {
|
|
1364
|
+
do {
|
|
1365
|
+
if (e === t || !e && !t) return !0;
|
|
1366
|
+
if (!e || !t || e.depth !== t.depth || e.ruleId !== t.ruleId || e.endRule !== t.endRule) return !1;
|
|
1367
|
+
e = e.parent, t = t.parent;
|
|
1368
|
+
} while (1);
|
|
1369
|
+
}
|
|
1370
|
+
clone() {
|
|
1371
|
+
return this;
|
|
1372
|
+
}
|
|
1373
|
+
static _reset(e) {
|
|
1374
|
+
for (; e;) e._enterPos = -1, e._anchorPos = -1, e = e.parent;
|
|
1375
|
+
}
|
|
1376
|
+
reset() {
|
|
1377
|
+
e._reset(this);
|
|
1378
|
+
}
|
|
1379
|
+
pop() {
|
|
1380
|
+
return this.parent;
|
|
1381
|
+
}
|
|
1382
|
+
safePop() {
|
|
1383
|
+
return this.parent ? this.parent : this;
|
|
1384
|
+
}
|
|
1385
|
+
push(t, n, r, i, a, o, s) {
|
|
1386
|
+
return new e(this, t, n, r, i, a, o, s);
|
|
1387
|
+
}
|
|
1388
|
+
getEnterPos() {
|
|
1389
|
+
return this._enterPos;
|
|
1390
|
+
}
|
|
1391
|
+
getAnchorPos() {
|
|
1392
|
+
return this._anchorPos;
|
|
1393
|
+
}
|
|
1394
|
+
getRule(e) {
|
|
1395
|
+
return e.getRule(this.ruleId);
|
|
1396
|
+
}
|
|
1397
|
+
toString() {
|
|
1398
|
+
let e = [];
|
|
1399
|
+
return this._writeString(e, 0), "[" + e.join(",") + "]";
|
|
1400
|
+
}
|
|
1401
|
+
_writeString(e, t) {
|
|
1402
|
+
return this.parent && (t = this.parent._writeString(e, t)), e[t++] = `(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`, t;
|
|
1403
|
+
}
|
|
1404
|
+
withContentNameScopesList(e) {
|
|
1405
|
+
return this.contentNameScopesList === e ? this : this.parent.push(this.ruleId, this._enterPos, this._anchorPos, this.beginRuleCapturedEOL, this.endRule, this.nameScopesList, e);
|
|
1406
|
+
}
|
|
1407
|
+
withEndRule(t) {
|
|
1408
|
+
return this.endRule === t ? this : new e(this.parent, this.ruleId, this._enterPos, this._anchorPos, this.beginRuleCapturedEOL, t, this.nameScopesList, this.contentNameScopesList);
|
|
1409
|
+
}
|
|
1410
|
+
hasSameRuleAs(e) {
|
|
1411
|
+
let t = this;
|
|
1412
|
+
for (; t && t._enterPos === e._enterPos;) {
|
|
1413
|
+
if (t.ruleId === e.ruleId) return !0;
|
|
1414
|
+
t = t.parent;
|
|
1415
|
+
}
|
|
1416
|
+
return !1;
|
|
1417
|
+
}
|
|
1418
|
+
toStateStackFrame() {
|
|
1419
|
+
return {
|
|
1420
|
+
ruleId: Me(this.ruleId),
|
|
1421
|
+
beginRuleCapturedEOL: this.beginRuleCapturedEOL,
|
|
1422
|
+
endRule: this.endRule,
|
|
1423
|
+
nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],
|
|
1424
|
+
contentNameScopesList: this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList) ?? []
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
static pushFrame(t, n) {
|
|
1428
|
+
let r = D.fromExtension(t?.nameScopesList ?? null, n.nameScopesList);
|
|
1429
|
+
return new e(t, je(n.ruleId), n.enterPos ?? -1, n.anchorPos ?? -1, n.beginRuleCapturedEOL, n.endRule, r, D.fromExtension(r, n.contentNameScopesList));
|
|
1430
|
+
}
|
|
1431
|
+
}, it = class {
|
|
1432
|
+
balancedBracketScopes;
|
|
1433
|
+
unbalancedBracketScopes;
|
|
1434
|
+
allowAny = !1;
|
|
1435
|
+
constructor(e, t) {
|
|
1436
|
+
this.balancedBracketScopes = e.flatMap((e) => e === "*" ? (this.allowAny = !0, []) : ue(e, E).map((e) => e.matcher)), this.unbalancedBracketScopes = t.flatMap((e) => ue(e, E).map((e) => e.matcher));
|
|
1437
|
+
}
|
|
1438
|
+
get matchesAlways() {
|
|
1439
|
+
return this.allowAny && this.unbalancedBracketScopes.length === 0;
|
|
1440
|
+
}
|
|
1441
|
+
get matchesNever() {
|
|
1442
|
+
return this.balancedBracketScopes.length === 0 && !this.allowAny;
|
|
1443
|
+
}
|
|
1444
|
+
match(e) {
|
|
1445
|
+
for (let t of this.unbalancedBracketScopes) if (t(e)) return !1;
|
|
1446
|
+
for (let t of this.balancedBracketScopes) if (t(e)) return !0;
|
|
1447
|
+
return this.allowAny;
|
|
1448
|
+
}
|
|
1449
|
+
}, at = class {
|
|
1450
|
+
constructor(e, t, n, r) {
|
|
1451
|
+
this.balancedBracketSelectors = r, this._emitBinaryTokens = e, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
|
|
1452
|
+
}
|
|
1453
|
+
_emitBinaryTokens;
|
|
1454
|
+
_lineText;
|
|
1455
|
+
_tokens;
|
|
1456
|
+
_binaryTokens;
|
|
1457
|
+
_lastTokenEndIndex;
|
|
1458
|
+
_tokenTypeOverrides;
|
|
1459
|
+
produce(e, t) {
|
|
1460
|
+
this.produceFromScopes(e.contentNameScopesList, t);
|
|
1461
|
+
}
|
|
1462
|
+
produceFromScopes(e, t) {
|
|
1463
|
+
if (this._lastTokenEndIndex >= t) return;
|
|
1464
|
+
if (this._emitBinaryTokens) {
|
|
1465
|
+
let n = e?.tokenAttributes ?? 0, r = !1;
|
|
1466
|
+
if (this.balancedBracketSelectors?.matchesAlways && (r = !0), this._tokenTypeOverrides.length > 0 || this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever) {
|
|
1467
|
+
let t = e?.getScopeNames() ?? [];
|
|
1468
|
+
for (let e of this._tokenTypeOverrides) e.matcher(t) && (n = b.set(n, 0, ce(e.type), null, -1, 0, 0));
|
|
1469
|
+
this.balancedBracketSelectors && (r = this.balancedBracketSelectors.match(t));
|
|
1470
|
+
}
|
|
1471
|
+
if (r && (n = b.set(n, 0, 8, r, -1, 0, 0)), this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === n) {
|
|
1472
|
+
this._lastTokenEndIndex = t;
|
|
1473
|
+
return;
|
|
1474
|
+
}
|
|
1475
|
+
this._binaryTokens.push(this._lastTokenEndIndex), this._binaryTokens.push(n), this._lastTokenEndIndex = t;
|
|
1476
|
+
return;
|
|
1477
|
+
}
|
|
1478
|
+
let n = e?.getScopeNames() ?? [];
|
|
1479
|
+
this._tokens.push({
|
|
1480
|
+
startIndex: this._lastTokenEndIndex,
|
|
1481
|
+
endIndex: t,
|
|
1482
|
+
scopes: n
|
|
1483
|
+
}), this._lastTokenEndIndex = t;
|
|
1484
|
+
}
|
|
1485
|
+
getResult(e, t) {
|
|
1486
|
+
return this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === t - 1 && this._tokens.pop(), this._tokens.length === 0 && (this._lastTokenEndIndex = -1, this.produce(e, t), this._tokens[this._tokens.length - 1].startIndex = 0), this._tokens;
|
|
1487
|
+
}
|
|
1488
|
+
getBinaryResult(e, t) {
|
|
1489
|
+
this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === t - 1 && (this._binaryTokens.pop(), this._binaryTokens.pop()), this._binaryTokens.length === 0 && (this._lastTokenEndIndex = -1, this.produce(e, t), this._binaryTokens[this._binaryTokens.length - 2] = 0);
|
|
1490
|
+
let n = new Uint32Array(this._binaryTokens.length);
|
|
1491
|
+
for (let e = 0, t = this._binaryTokens.length; e < t; e++) n[e] = this._binaryTokens[e];
|
|
1492
|
+
return n;
|
|
1493
|
+
}
|
|
1494
|
+
}, ot = class {
|
|
1495
|
+
constructor(e, t) {
|
|
1496
|
+
this._onigLib = t, this._theme = e;
|
|
1497
|
+
}
|
|
1498
|
+
_grammars = /* @__PURE__ */ new Map();
|
|
1499
|
+
_rawGrammars = /* @__PURE__ */ new Map();
|
|
1500
|
+
_injectionGrammars = /* @__PURE__ */ new Map();
|
|
1501
|
+
_theme;
|
|
1502
|
+
dispose() {
|
|
1503
|
+
for (let e of this._grammars.values()) e.dispose();
|
|
1504
|
+
}
|
|
1505
|
+
setTheme(e) {
|
|
1506
|
+
this._theme = e;
|
|
1507
|
+
}
|
|
1508
|
+
getColorMap() {
|
|
1509
|
+
return this._theme.getColorMap();
|
|
1510
|
+
}
|
|
1511
|
+
addGrammar(e, t) {
|
|
1512
|
+
this._rawGrammars.set(e.scopeName, e), t && this._injectionGrammars.set(e.scopeName, t);
|
|
1513
|
+
}
|
|
1514
|
+
lookup(e) {
|
|
1515
|
+
return this._rawGrammars.get(e);
|
|
1516
|
+
}
|
|
1517
|
+
injections(e) {
|
|
1518
|
+
return this._injectionGrammars.get(e);
|
|
1519
|
+
}
|
|
1520
|
+
getDefaults() {
|
|
1521
|
+
return this._theme.getDefaults();
|
|
1522
|
+
}
|
|
1523
|
+
themeMatch(e) {
|
|
1524
|
+
return this._theme.match(e);
|
|
1525
|
+
}
|
|
1526
|
+
grammarForScopeName(e, t, n, r, i) {
|
|
1527
|
+
if (!this._grammars.has(e)) {
|
|
1528
|
+
let a = this._rawGrammars.get(e);
|
|
1529
|
+
if (!a) return null;
|
|
1530
|
+
this._grammars.set(e, Qe(e, a, t, n, r, i, this, this._onigLib));
|
|
1531
|
+
}
|
|
1532
|
+
return this._grammars.get(e);
|
|
1533
|
+
}
|
|
1534
|
+
}, st = class {
|
|
1535
|
+
_options;
|
|
1536
|
+
_syncRegistry;
|
|
1537
|
+
_ensureGrammarCache;
|
|
1538
|
+
constructor(e) {
|
|
1539
|
+
this._options = e, this._syncRegistry = new ot(h.createFromRawTheme(e.theme, e.colorMap), e.onigLib), this._ensureGrammarCache = /* @__PURE__ */ new Map();
|
|
1540
|
+
}
|
|
1541
|
+
dispose() {
|
|
1542
|
+
this._syncRegistry.dispose();
|
|
1543
|
+
}
|
|
1544
|
+
setTheme(e, t) {
|
|
1545
|
+
this._syncRegistry.setTheme(h.createFromRawTheme(e, t));
|
|
1546
|
+
}
|
|
1547
|
+
getColorMap() {
|
|
1548
|
+
return this._syncRegistry.getColorMap();
|
|
1549
|
+
}
|
|
1550
|
+
loadGrammarWithEmbeddedLanguages(e, t, n) {
|
|
1551
|
+
return this.loadGrammarWithConfiguration(e, t, { embeddedLanguages: n });
|
|
1552
|
+
}
|
|
1553
|
+
loadGrammarWithConfiguration(e, t, n) {
|
|
1554
|
+
return this._loadGrammar(e, t, n.embeddedLanguages, n.tokenTypes, new it(n.balancedBracketSelectors || [], n.unbalancedBracketSelectors || []));
|
|
1555
|
+
}
|
|
1556
|
+
loadGrammar(e) {
|
|
1557
|
+
return this._loadGrammar(e, 0, null, null, null);
|
|
1558
|
+
}
|
|
1559
|
+
_loadGrammar(e, t, n, r, i) {
|
|
1560
|
+
let a = new ge(this._syncRegistry, e);
|
|
1561
|
+
for (; a.Q.length > 0;) a.Q.map((e) => this._loadSingleGrammar(e.scopeName)), a.processQueue();
|
|
1562
|
+
return this._grammarForScopeName(e, t, n, r, i);
|
|
1563
|
+
}
|
|
1564
|
+
_loadSingleGrammar(e) {
|
|
1565
|
+
this._ensureGrammarCache.has(e) || (this._doLoadSingleGrammar(e), this._ensureGrammarCache.set(e, !0));
|
|
1566
|
+
}
|
|
1567
|
+
_doLoadSingleGrammar(e) {
|
|
1568
|
+
let t = this._options.loadGrammar(e);
|
|
1569
|
+
if (t) {
|
|
1570
|
+
let n = typeof this._options.getInjections == "function" ? this._options.getInjections(e) : void 0;
|
|
1571
|
+
this._syncRegistry.addGrammar(t, n);
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
addGrammar(e, t = [], n = 0, r = null) {
|
|
1575
|
+
return this._syncRegistry.addGrammar(e, t), this._grammarForScopeName(e.scopeName, n, r);
|
|
1576
|
+
}
|
|
1577
|
+
_grammarForScopeName(e, t = 0, n = null, r = null, i = null) {
|
|
1578
|
+
return this._syncRegistry.grammarForScopeName(e, t, n, r, i);
|
|
1579
|
+
}
|
|
1580
|
+
}, ct = rt.NULL;
|
|
1581
|
+
//#endregion
|
|
1582
|
+
//#region ../../node_modules/.pnpm/@shikijs+primitive@4.4.3/node_modules/@shikijs/primitive/dist/index.mjs
|
|
1583
|
+
function O(e, t) {
|
|
1584
|
+
let n = typeof e == "string" ? {} : { ...e.colorReplacements }, r = typeof e == "string" ? e : e.name;
|
|
1585
|
+
for (let [e, i] of Object.entries(t?.colorReplacements || {})) typeof i == "string" ? n[e] = i : e === r && Object.assign(n, i);
|
|
1586
|
+
return n;
|
|
1587
|
+
}
|
|
1588
|
+
function k(e, t) {
|
|
1589
|
+
return e && (t?.[e?.toLowerCase()] || e);
|
|
1590
|
+
}
|
|
1591
|
+
function lt(e) {
|
|
1592
|
+
return Array.isArray(e) ? e : [e];
|
|
1593
|
+
}
|
|
1594
|
+
async function ut(e) {
|
|
1595
|
+
return Promise.resolve(typeof e == "function" ? e() : e).then((e) => e.default || e);
|
|
1596
|
+
}
|
|
1597
|
+
function A(e) {
|
|
1598
|
+
return !e || [
|
|
1599
|
+
"plaintext",
|
|
1600
|
+
"txt",
|
|
1601
|
+
"text",
|
|
1602
|
+
"plain"
|
|
1603
|
+
].includes(e);
|
|
1604
|
+
}
|
|
1605
|
+
function dt(e) {
|
|
1606
|
+
return e === "ansi" || A(e);
|
|
1607
|
+
}
|
|
1608
|
+
function j(e) {
|
|
1609
|
+
return e === "none";
|
|
1610
|
+
}
|
|
1611
|
+
function ft(e) {
|
|
1612
|
+
return j(e);
|
|
1613
|
+
}
|
|
1614
|
+
var pt = /(\r?\n)/g;
|
|
1615
|
+
function M(e, t = !1) {
|
|
1616
|
+
if (e.length === 0) return [["", 0]];
|
|
1617
|
+
let n = e.split(pt), r = 0, i = [];
|
|
1618
|
+
for (let e = 0; e < n.length; e += 2) {
|
|
1619
|
+
let a = t ? n[e] + (n[e + 1] || "") : n[e];
|
|
1620
|
+
i.push([a, r]), r += n[e].length, r += n[e + 1]?.length || 0;
|
|
1621
|
+
}
|
|
1622
|
+
return i;
|
|
1623
|
+
}
|
|
1624
|
+
var mt = {
|
|
1625
|
+
light: "#333333",
|
|
1626
|
+
dark: "#bbbbbb"
|
|
1627
|
+
}, ht = {
|
|
1628
|
+
light: "#fffffe",
|
|
1629
|
+
dark: "#1e1e1e"
|
|
1630
|
+
}, gt = "__shiki_resolved";
|
|
1631
|
+
function _t(e) {
|
|
1632
|
+
if (e?.[gt]) return e;
|
|
1633
|
+
let t = { ...e };
|
|
1634
|
+
t.tokenColors && !t.settings && (t.settings = t.tokenColors, delete t.tokenColors), t.type ||= "dark", t.colorReplacements = { ...t.colorReplacements }, t.settings ||= [];
|
|
1635
|
+
let { bg: n, fg: r } = t;
|
|
1636
|
+
if (!n || !r) {
|
|
1637
|
+
let e = t.settings ? t.settings.find((e) => !e.name && !e.scope) : void 0;
|
|
1638
|
+
e?.settings?.foreground && (r = e.settings.foreground), e?.settings?.background && (n = e.settings.background), !r && t?.colors?.["editor.foreground"] && (r = t.colors["editor.foreground"]), !n && t?.colors?.["editor.background"] && (n = t.colors["editor.background"]), r ||= t.type === "light" ? mt.light : mt.dark, n ||= t.type === "light" ? ht.light : ht.dark, t.fg = r, t.bg = n;
|
|
1639
|
+
}
|
|
1640
|
+
t.settings[0] && t.settings[0].settings && !t.settings[0].scope || t.settings.unshift({ settings: {
|
|
1641
|
+
foreground: t.fg,
|
|
1642
|
+
background: t.bg
|
|
1643
|
+
} });
|
|
1644
|
+
let i = 0, a = /* @__PURE__ */ new Map();
|
|
1645
|
+
function o(e) {
|
|
1646
|
+
if (a.has(e)) return a.get(e);
|
|
1647
|
+
i += 1;
|
|
1648
|
+
let n = `#${i.toString(16).padStart(8, "0").toLowerCase()}`;
|
|
1649
|
+
return t.colorReplacements?.[`#${n}`] ? o(e) : (a.set(e, n), n);
|
|
1650
|
+
}
|
|
1651
|
+
t.settings = t.settings.map((e) => {
|
|
1652
|
+
let n = e.settings?.foreground && !e.settings.foreground.startsWith("#"), r = e.settings?.background && !e.settings.background.startsWith("#");
|
|
1653
|
+
if (!n && !r) return e;
|
|
1654
|
+
let i = {
|
|
1655
|
+
...e,
|
|
1656
|
+
settings: { ...e.settings }
|
|
1657
|
+
};
|
|
1658
|
+
if (n) {
|
|
1659
|
+
let n = o(e.settings.foreground);
|
|
1660
|
+
t.colorReplacements[n] = e.settings.foreground, i.settings.foreground = n;
|
|
1661
|
+
}
|
|
1662
|
+
if (r) {
|
|
1663
|
+
let n = o(e.settings.background);
|
|
1664
|
+
t.colorReplacements[n] = e.settings.background, i.settings.background = n;
|
|
1665
|
+
}
|
|
1666
|
+
return i;
|
|
1667
|
+
});
|
|
1668
|
+
for (let e of Object.keys(t.colors || {})) if ((e === "editor.foreground" || e === "editor.background" || e.startsWith("terminal.ansi")) && !t.colors[e]?.startsWith("#")) {
|
|
1669
|
+
let n = o(t.colors[e]);
|
|
1670
|
+
t.colorReplacements[n] = t.colors[e], t.colors[e] = n;
|
|
1671
|
+
}
|
|
1672
|
+
return Object.defineProperty(t, gt, {
|
|
1673
|
+
enumerable: !1,
|
|
1674
|
+
writable: !1,
|
|
1675
|
+
value: !0
|
|
1676
|
+
}), t;
|
|
1677
|
+
}
|
|
1678
|
+
async function vt(e) {
|
|
1679
|
+
return [...new Set((await Promise.all(e.filter((e) => !dt(e)).map(async (e) => await ut(e).then((e) => Array.isArray(e) ? e : [e])))).flat())];
|
|
1680
|
+
}
|
|
1681
|
+
async function yt(e) {
|
|
1682
|
+
return (await Promise.all(e.map(async (e) => ft(e) ? null : _t(await ut(e))))).filter((e) => !!e);
|
|
1683
|
+
}
|
|
1684
|
+
function bt(e, n) {
|
|
1685
|
+
if (!n) return e;
|
|
1686
|
+
if (n[e]) {
|
|
1687
|
+
let r = /* @__PURE__ */ new Set([e]);
|
|
1688
|
+
for (; n[e];) {
|
|
1689
|
+
if (e = n[e], r.has(e)) throw new t(`Circular alias \`${[...r].join(" -> ")} -> ${e}\``);
|
|
1690
|
+
r.add(e);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
return e;
|
|
1694
|
+
}
|
|
1695
|
+
var xt = class extends st {
|
|
1696
|
+
_resolver;
|
|
1697
|
+
_themes;
|
|
1698
|
+
_langs;
|
|
1699
|
+
_alias;
|
|
1700
|
+
_resolvedThemes = /* @__PURE__ */ new Map();
|
|
1701
|
+
_resolvedGrammars = /* @__PURE__ */ new Map();
|
|
1702
|
+
_langMap = /* @__PURE__ */ new Map();
|
|
1703
|
+
_langGraph = /* @__PURE__ */ new Map();
|
|
1704
|
+
_textmateThemeCache = /* @__PURE__ */ new WeakMap();
|
|
1705
|
+
_loadedThemesCache = null;
|
|
1706
|
+
_loadedLanguagesCache = null;
|
|
1707
|
+
constructor(e, t, n, r = {}) {
|
|
1708
|
+
super(e), this._resolver = e, this._themes = t, this._langs = n, this._alias = r, this._themes.map((e) => this.loadTheme(e)), this.loadLanguages(this._langs);
|
|
1709
|
+
}
|
|
1710
|
+
getTheme(e) {
|
|
1711
|
+
return typeof e == "string" ? this._resolvedThemes.get(e) : this.loadTheme(e);
|
|
1712
|
+
}
|
|
1713
|
+
loadTheme(e) {
|
|
1714
|
+
let t = _t(e);
|
|
1715
|
+
return t.name && (this._resolvedThemes.set(t.name, t), this._loadedThemesCache = null), t;
|
|
1716
|
+
}
|
|
1717
|
+
getLoadedThemes() {
|
|
1718
|
+
return this._loadedThemesCache ||= [...this._resolvedThemes.keys()], this._loadedThemesCache;
|
|
1719
|
+
}
|
|
1720
|
+
setTheme(e) {
|
|
1721
|
+
let t = this._textmateThemeCache.get(e);
|
|
1722
|
+
t || (t = h.createFromRawTheme(e), this._textmateThemeCache.set(e, t)), this._syncRegistry.setTheme(t);
|
|
1723
|
+
}
|
|
1724
|
+
getGrammar(e) {
|
|
1725
|
+
return e = bt(e, this._alias), this._resolvedGrammars.get(e);
|
|
1726
|
+
}
|
|
1727
|
+
loadLanguage(e) {
|
|
1728
|
+
if (this.getGrammar(e.name)) return;
|
|
1729
|
+
let t = new Set([...this._langMap.values()].filter((t) => t.embeddedLangsLazy?.includes(e.name)));
|
|
1730
|
+
this._resolver.addLanguage(e);
|
|
1731
|
+
let n = {
|
|
1732
|
+
balancedBracketSelectors: e.balancedBracketSelectors || ["*"],
|
|
1733
|
+
unbalancedBracketSelectors: e.unbalancedBracketSelectors || []
|
|
1734
|
+
};
|
|
1735
|
+
this._syncRegistry._rawGrammars.set(e.scopeName, e);
|
|
1736
|
+
let r = this.loadGrammarWithConfiguration(e.scopeName, 1, n);
|
|
1737
|
+
if (r.name = e.name, this._resolvedGrammars.set(e.name, r), e.aliases && e.aliases.forEach((t) => {
|
|
1738
|
+
this._alias[t] = e.name;
|
|
1739
|
+
}), this._loadedLanguagesCache = null, t.size) for (let e of t) this._resolvedGrammars.delete(e.name), this._loadedLanguagesCache = null, this._syncRegistry?._injectionGrammars?.delete(e.scopeName), this._syncRegistry?._grammars?.delete(e.scopeName), this.loadLanguage(this._langMap.get(e.name));
|
|
1740
|
+
}
|
|
1741
|
+
dispose() {
|
|
1742
|
+
super.dispose(), this._resolvedThemes.clear(), this._resolvedGrammars.clear(), this._langMap.clear(), this._langGraph.clear(), this._loadedThemesCache = null;
|
|
1743
|
+
}
|
|
1744
|
+
loadLanguages(e) {
|
|
1745
|
+
for (let t of e) this.resolveEmbeddedLanguages(t);
|
|
1746
|
+
let n = [...this._langGraph.entries()], r = n.filter(([e, t]) => !t);
|
|
1747
|
+
if (r.length) {
|
|
1748
|
+
let e = n.filter(([e, t]) => t ? (t.embeddedLanguages || t.embeddedLangs)?.some((e) => r.map(([e]) => e).includes(e)) : !1).filter((e) => !r.includes(e));
|
|
1749
|
+
throw new t(`Missing languages ${r.map(([e]) => `\`${e}\``).join(", ")}, required by ${e.map(([e]) => `\`${e}\``).join(", ")}`);
|
|
1750
|
+
}
|
|
1751
|
+
for (let [e, t] of n) this._resolver.addLanguage(t);
|
|
1752
|
+
for (let [e, t] of n) this.loadLanguage(t);
|
|
1753
|
+
}
|
|
1754
|
+
getLoadedLanguages() {
|
|
1755
|
+
return this._loadedLanguagesCache ||= [.../* @__PURE__ */ new Set([...this._resolvedGrammars.keys(), ...Object.keys(this._alias)])], this._loadedLanguagesCache;
|
|
1756
|
+
}
|
|
1757
|
+
resolveEmbeddedLanguages(e) {
|
|
1758
|
+
this._langMap.set(e.name, e), this._langGraph.set(e.name, e);
|
|
1759
|
+
let t = e.embeddedLanguages ?? e.embeddedLangs;
|
|
1760
|
+
if (t) for (let e of t) this._langGraph.set(e, this._langMap.get(e));
|
|
1761
|
+
}
|
|
1762
|
+
}, St = class {
|
|
1763
|
+
_langs = /* @__PURE__ */ new Map();
|
|
1764
|
+
_scopeToLang = /* @__PURE__ */ new Map();
|
|
1765
|
+
_injections = /* @__PURE__ */ new Map();
|
|
1766
|
+
_onigLib;
|
|
1767
|
+
constructor(e, t) {
|
|
1768
|
+
this._onigLib = {
|
|
1769
|
+
createOnigScanner: (t) => e.createScanner(t),
|
|
1770
|
+
createOnigString: (t) => e.createString(t)
|
|
1771
|
+
}, t.forEach((e) => this.addLanguage(e));
|
|
1772
|
+
}
|
|
1773
|
+
get onigLib() {
|
|
1774
|
+
return this._onigLib;
|
|
1775
|
+
}
|
|
1776
|
+
getLangRegistration(e) {
|
|
1777
|
+
return this._langs.get(e);
|
|
1778
|
+
}
|
|
1779
|
+
loadGrammar(e) {
|
|
1780
|
+
return this._scopeToLang.get(e);
|
|
1781
|
+
}
|
|
1782
|
+
addLanguage(e) {
|
|
1783
|
+
this._langs.set(e.name, e), e.aliases && e.aliases.forEach((t) => {
|
|
1784
|
+
this._langs.set(t, e);
|
|
1785
|
+
}), this._scopeToLang.set(e.scopeName, e), e.injectTo && e.injectTo.forEach((t) => {
|
|
1786
|
+
this._injections.get(t) || this._injections.set(t, []), this._injections.get(t).push(e.scopeName);
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
getInjections(e) {
|
|
1790
|
+
let t = e.split("."), n = [];
|
|
1791
|
+
for (let e = 1; e <= t.length; e++) {
|
|
1792
|
+
let r = t.slice(0, e).join(".");
|
|
1793
|
+
n = [...n, ...this._injections.get(r) || []];
|
|
1794
|
+
}
|
|
1795
|
+
return n;
|
|
1796
|
+
}
|
|
1797
|
+
}, N = 0;
|
|
1798
|
+
function Ct(e) {
|
|
1799
|
+
N += 1, e.warnings !== !1 && N >= 10 && N % 10 == 0 && console.warn(`[Shiki] ${N} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
|
|
1800
|
+
let n = !1;
|
|
1801
|
+
if (!e.engine) throw new t("`engine` option is required for synchronous mode");
|
|
1802
|
+
let r = (e.langs || []).flat(1), i = (e.themes || []).flat(1).map(_t), a = new xt(new St(e.engine, r), i, r, e.langAlias), o;
|
|
1803
|
+
function s(t) {
|
|
1804
|
+
return bt(t, e.langAlias);
|
|
1805
|
+
}
|
|
1806
|
+
function c(e) {
|
|
1807
|
+
_();
|
|
1808
|
+
let n = a.getGrammar(typeof e == "string" ? e : e.name);
|
|
1809
|
+
if (!n) throw new t(`Language \`${e}\` not found, you may need to load it first`);
|
|
1810
|
+
return n;
|
|
1811
|
+
}
|
|
1812
|
+
function l(e) {
|
|
1813
|
+
if (e === "none") return {
|
|
1814
|
+
bg: "",
|
|
1815
|
+
fg: "",
|
|
1816
|
+
name: "none",
|
|
1817
|
+
settings: [],
|
|
1818
|
+
type: "dark"
|
|
1819
|
+
};
|
|
1820
|
+
_();
|
|
1821
|
+
let n = a.getTheme(e);
|
|
1822
|
+
if (!n) throw new t(`Theme \`${e}\` not found, you may need to load it first`);
|
|
1823
|
+
return n;
|
|
1824
|
+
}
|
|
1825
|
+
function u(e) {
|
|
1826
|
+
_();
|
|
1827
|
+
let t = l(e);
|
|
1828
|
+
return o !== e && (a.setTheme(t), o = e), {
|
|
1829
|
+
theme: t,
|
|
1830
|
+
colorMap: a.getColorMap()
|
|
1831
|
+
};
|
|
1832
|
+
}
|
|
1833
|
+
function d() {
|
|
1834
|
+
return _(), a.getLoadedThemes();
|
|
1835
|
+
}
|
|
1836
|
+
function f() {
|
|
1837
|
+
return _(), a.getLoadedLanguages();
|
|
1838
|
+
}
|
|
1839
|
+
function p(...e) {
|
|
1840
|
+
_(), a.loadLanguages(e.flat(1));
|
|
1841
|
+
}
|
|
1842
|
+
async function m(...e) {
|
|
1843
|
+
return p(await vt(e));
|
|
1844
|
+
}
|
|
1845
|
+
function h(...e) {
|
|
1846
|
+
_();
|
|
1847
|
+
for (let t of e.flat(1)) a.loadTheme(t);
|
|
1848
|
+
}
|
|
1849
|
+
async function g(...e) {
|
|
1850
|
+
return _(), h(await yt(e));
|
|
1851
|
+
}
|
|
1852
|
+
function _() {
|
|
1853
|
+
if (n) throw new t("Shiki instance has been disposed");
|
|
1854
|
+
}
|
|
1855
|
+
function v() {
|
|
1856
|
+
n || (n = !0, a.dispose(), --N);
|
|
1857
|
+
}
|
|
1858
|
+
return {
|
|
1859
|
+
setTheme: u,
|
|
1860
|
+
getTheme: l,
|
|
1861
|
+
getLanguage: c,
|
|
1862
|
+
getLoadedThemes: d,
|
|
1863
|
+
getLoadedLanguages: f,
|
|
1864
|
+
resolveLangAlias: s,
|
|
1865
|
+
loadLanguage: m,
|
|
1866
|
+
loadLanguageSync: p,
|
|
1867
|
+
loadTheme: g,
|
|
1868
|
+
loadThemeSync: h,
|
|
1869
|
+
dispose: v,
|
|
1870
|
+
[Symbol.dispose]: v
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
var wt = Ct;
|
|
1874
|
+
async function Tt(e) {
|
|
1875
|
+
e.engine || console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
|
|
1876
|
+
let [t, n, r] = await Promise.all([
|
|
1877
|
+
yt(e.themes || []),
|
|
1878
|
+
vt(e.langs || []),
|
|
1879
|
+
e.engine
|
|
1880
|
+
]);
|
|
1881
|
+
return Ct({
|
|
1882
|
+
...e,
|
|
1883
|
+
themes: t,
|
|
1884
|
+
langs: n,
|
|
1885
|
+
engine: r
|
|
1886
|
+
});
|
|
1887
|
+
}
|
|
1888
|
+
var Et = Tt, Dt = /* @__PURE__ */ new WeakMap();
|
|
1889
|
+
function Ot(e, t) {
|
|
1890
|
+
Dt.set(e, t);
|
|
1891
|
+
}
|
|
1892
|
+
function P(e) {
|
|
1893
|
+
return Dt.get(e);
|
|
1894
|
+
}
|
|
1895
|
+
var F = class e {
|
|
1896
|
+
_stacks = {};
|
|
1897
|
+
lang;
|
|
1898
|
+
get themes() {
|
|
1899
|
+
return Object.keys(this._stacks);
|
|
1900
|
+
}
|
|
1901
|
+
get theme() {
|
|
1902
|
+
return this.themes[0];
|
|
1903
|
+
}
|
|
1904
|
+
get _stack() {
|
|
1905
|
+
return this._stacks[this.theme];
|
|
1906
|
+
}
|
|
1907
|
+
static initial(t, n) {
|
|
1908
|
+
return new e(Object.fromEntries(lt(n).map((e) => [e, ct])), t);
|
|
1909
|
+
}
|
|
1910
|
+
constructor(...e) {
|
|
1911
|
+
if (e.length === 2) {
|
|
1912
|
+
let [t, n] = e;
|
|
1913
|
+
this.lang = n, this._stacks = t;
|
|
1914
|
+
} else {
|
|
1915
|
+
let [t, n, r] = e;
|
|
1916
|
+
this.lang = n, this._stacks = { [r]: t };
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
getInternalStack(e = this.theme) {
|
|
1920
|
+
return this._stacks[e];
|
|
1921
|
+
}
|
|
1922
|
+
getScopes(e = this.theme) {
|
|
1923
|
+
return kt(this._stacks[e]);
|
|
1924
|
+
}
|
|
1925
|
+
toJSON() {
|
|
1926
|
+
return {
|
|
1927
|
+
lang: this.lang,
|
|
1928
|
+
theme: this.theme,
|
|
1929
|
+
themes: this.themes,
|
|
1930
|
+
scopes: this.getScopes()
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
};
|
|
1934
|
+
function kt(e) {
|
|
1935
|
+
let t = [], n = /* @__PURE__ */ new Set();
|
|
1936
|
+
function r(e) {
|
|
1937
|
+
if (n.has(e)) return;
|
|
1938
|
+
n.add(e);
|
|
1939
|
+
let i = e?.nameScopesList?.scopeName;
|
|
1940
|
+
i && t.push(i), e.parent && r(e.parent);
|
|
1941
|
+
}
|
|
1942
|
+
return r(e), t;
|
|
1943
|
+
}
|
|
1944
|
+
function At(e, n) {
|
|
1945
|
+
if (!(e instanceof F)) throw new t("Invalid grammar state");
|
|
1946
|
+
return e.getInternalStack(n);
|
|
1947
|
+
}
|
|
1948
|
+
var jt = /,/, Mt = / /;
|
|
1949
|
+
function Nt(e, n, r = {}) {
|
|
1950
|
+
let { theme: i = e.getLoadedThemes()[0] } = r;
|
|
1951
|
+
if (A(e.resolveLangAlias(r.lang || "text")) || j(i)) return M(n).map((e) => [{
|
|
1952
|
+
content: e[0],
|
|
1953
|
+
offset: e[1]
|
|
1954
|
+
}]);
|
|
1955
|
+
let { theme: a, colorMap: o } = e.setTheme(i), s = e.getLanguage(r.lang || "text");
|
|
1956
|
+
if (r.grammarState) {
|
|
1957
|
+
if (r.grammarState.lang !== s.name) throw new t(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${s.name}"`);
|
|
1958
|
+
if (!r.grammarState.themes.includes(a.name)) throw new t(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${a.name}"`);
|
|
1959
|
+
}
|
|
1960
|
+
return Ft(n, s, a, o, r);
|
|
1961
|
+
}
|
|
1962
|
+
function Pt(...e) {
|
|
1963
|
+
if (e.length === 2) return P(e[1]);
|
|
1964
|
+
let [n, r, i = {}] = e, { lang: a = "text", theme: o = n.getLoadedThemes()[0] } = i;
|
|
1965
|
+
if (A(a) || j(o)) throw new t("Plain language does not have grammar state");
|
|
1966
|
+
if (a === "ansi") throw new t("ANSI language does not have grammar state");
|
|
1967
|
+
let { theme: s, colorMap: c } = n.setTheme(o), l = n.getLanguage(a);
|
|
1968
|
+
return new F(It(r, l, s, c, i).stateStack, l.name, s.name);
|
|
1969
|
+
}
|
|
1970
|
+
function Ft(e, t, n, r, i) {
|
|
1971
|
+
let a = It(e, t, n, r, i), o = new F(a.stateStack, t.name, n.name);
|
|
1972
|
+
return Ot(a.tokens, o), a.tokens;
|
|
1973
|
+
}
|
|
1974
|
+
function It(e, t, n, r, i) {
|
|
1975
|
+
let a = O(n, i), { tokenizeMaxLineLength: o = 0, tokenizeTimeLimit: s = 500, includeExplanation: c = !1 } = i, l = M(e), u = i.grammarState ? At(i.grammarState, n.name) ?? ct : i.grammarContextCode == null ? ct : It(i.grammarContextCode, t, n, r, {
|
|
1976
|
+
...i,
|
|
1977
|
+
grammarState: void 0,
|
|
1978
|
+
grammarContextCode: void 0
|
|
1979
|
+
}).stateStack, d = [], f = [];
|
|
1980
|
+
for (let e = 0, i = l.length; e < i; e++) {
|
|
1981
|
+
let [i, p] = l[e];
|
|
1982
|
+
if (i === "") {
|
|
1983
|
+
d = [], f.push([]);
|
|
1984
|
+
continue;
|
|
1985
|
+
}
|
|
1986
|
+
if (o > 0 && i.length >= o) {
|
|
1987
|
+
d = [], f.push([{
|
|
1988
|
+
content: i,
|
|
1989
|
+
offset: p,
|
|
1990
|
+
color: "",
|
|
1991
|
+
fontStyle: 0
|
|
1992
|
+
}]);
|
|
1993
|
+
continue;
|
|
1994
|
+
}
|
|
1995
|
+
let m, h, g;
|
|
1996
|
+
c && c !== "tokenType" && (m = t.tokenizeLine(i, u, s), h = m.tokens, g = 0);
|
|
1997
|
+
let _ = t.tokenizeLine2(i, u, s), v = _.tokens.length / 2;
|
|
1998
|
+
for (let e = 0; e < v; e++) {
|
|
1999
|
+
let t = _.tokens[2 * e], o = e + 1 < v ? _.tokens[2 * e + 2] : i.length;
|
|
2000
|
+
if (t === o) continue;
|
|
2001
|
+
let s = _.tokens[2 * e + 1], l = k(r[b.getForeground(s)], a), u = b.getFontStyle(s), f = {
|
|
2002
|
+
content: i.substring(t, o),
|
|
2003
|
+
offset: p + t,
|
|
2004
|
+
color: l,
|
|
2005
|
+
fontStyle: u
|
|
2006
|
+
};
|
|
2007
|
+
if (c === "tokenType") f.type = b.getTokenType(s);
|
|
2008
|
+
else if (c) {
|
|
2009
|
+
let e = [];
|
|
2010
|
+
if (c !== "scopeName") for (let t of n.settings) {
|
|
2011
|
+
let n;
|
|
2012
|
+
switch (typeof t.scope) {
|
|
2013
|
+
case "string":
|
|
2014
|
+
n = t.scope.split(jt).map((e) => e.trim());
|
|
2015
|
+
break;
|
|
2016
|
+
case "object":
|
|
2017
|
+
n = t.scope;
|
|
2018
|
+
break;
|
|
2019
|
+
default: continue;
|
|
2020
|
+
}
|
|
2021
|
+
e.push({
|
|
2022
|
+
settings: t,
|
|
2023
|
+
selectors: n.map((e) => e.split(Mt))
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
f.explanation = [];
|
|
2027
|
+
let r = 0;
|
|
2028
|
+
for (; t + r < o;) {
|
|
2029
|
+
let t = h[g], n = i.substring(t.startIndex, t.endIndex);
|
|
2030
|
+
r += n.length, f.explanation.push({
|
|
2031
|
+
content: n,
|
|
2032
|
+
scopes: c === "scopeName" ? Lt(t.scopes) : Rt(e, t.scopes)
|
|
2033
|
+
}), g += 1;
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
d.push(f);
|
|
2037
|
+
}
|
|
2038
|
+
f.push(d), d = [], u = _.ruleStack;
|
|
2039
|
+
}
|
|
2040
|
+
return {
|
|
2041
|
+
tokens: f,
|
|
2042
|
+
stateStack: u
|
|
2043
|
+
};
|
|
2044
|
+
}
|
|
2045
|
+
function Lt(e) {
|
|
2046
|
+
return e.map((e) => ({ scopeName: e }));
|
|
2047
|
+
}
|
|
2048
|
+
function Rt(e, t) {
|
|
2049
|
+
let n = [];
|
|
2050
|
+
for (let r = 0, i = t.length; r < i; r++) {
|
|
2051
|
+
let i = t[r];
|
|
2052
|
+
n[r] = {
|
|
2053
|
+
scopeName: i,
|
|
2054
|
+
themeMatches: Vt(e, i, t.slice(0, r))
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
return n;
|
|
2058
|
+
}
|
|
2059
|
+
function zt(e, t) {
|
|
2060
|
+
return e === t || t.substring(0, e.length) === e && t[e.length] === ".";
|
|
2061
|
+
}
|
|
2062
|
+
function Bt(e, t, n) {
|
|
2063
|
+
if (!zt(e.at(-1), t)) return !1;
|
|
2064
|
+
let r = e.length - 2, i = n.length - 1;
|
|
2065
|
+
for (; r >= 0 && i >= 0;) zt(e[r], n[i]) && --r, --i;
|
|
2066
|
+
return r === -1;
|
|
2067
|
+
}
|
|
2068
|
+
function Vt(e, t, n) {
|
|
2069
|
+
let r = [];
|
|
2070
|
+
for (let { selectors: i, settings: a } of e) for (let e of i) if (Bt(e, t, n)) {
|
|
2071
|
+
r.push(a);
|
|
2072
|
+
break;
|
|
2073
|
+
}
|
|
2074
|
+
return r;
|
|
2075
|
+
}
|
|
2076
|
+
function I(e, t, n, r = Nt) {
|
|
2077
|
+
let i = Object.entries(n.themes).filter((e) => e[1]).map((e) => ({
|
|
2078
|
+
color: e[0],
|
|
2079
|
+
theme: e[1]
|
|
2080
|
+
})), a = i.map((i) => {
|
|
2081
|
+
let a = r(e, t, {
|
|
2082
|
+
...n,
|
|
2083
|
+
theme: i.theme
|
|
2084
|
+
});
|
|
2085
|
+
return {
|
|
2086
|
+
tokens: a,
|
|
2087
|
+
state: P(a),
|
|
2088
|
+
theme: typeof i.theme == "string" ? i.theme : i.theme.name
|
|
2089
|
+
};
|
|
2090
|
+
}), o = Ht(...a.map((e) => e.tokens)), s = o[0].map((e, t) => e.map((e, r) => {
|
|
2091
|
+
let a = {
|
|
2092
|
+
content: e.content,
|
|
2093
|
+
variants: {},
|
|
2094
|
+
offset: e.offset
|
|
2095
|
+
};
|
|
2096
|
+
return "includeExplanation" in n && n.includeExplanation && (a.explanation = e.explanation), o.forEach((e, n) => {
|
|
2097
|
+
let { content: o, explanation: s, offset: c, ...l } = e[t][r];
|
|
2098
|
+
a.variants[i[n].color] = l;
|
|
2099
|
+
}), a;
|
|
2100
|
+
})), c = a[0].state ? new F(Object.fromEntries(a.map((e) => [e.theme, e.state?.getInternalStack(e.theme)])), a[0].state.lang) : void 0;
|
|
2101
|
+
return c && Ot(s, c), s;
|
|
2102
|
+
}
|
|
2103
|
+
function Ht(...e) {
|
|
2104
|
+
let t = e.map(() => []), n = e.length;
|
|
2105
|
+
for (let r = 0; r < e[0].length; r++) {
|
|
2106
|
+
let i = e.map((e) => e[r]), a = t.map(() => []);
|
|
2107
|
+
t.forEach((e, t) => e.push(a[t]));
|
|
2108
|
+
let o = i.map(() => 0), s = i.map((e) => e[0]);
|
|
2109
|
+
for (; s.every((e) => e);) {
|
|
2110
|
+
let e = Math.min(...s.map((e) => e.content.length));
|
|
2111
|
+
for (let t = 0; t < n; t++) {
|
|
2112
|
+
let n = s[t];
|
|
2113
|
+
n.content.length === e ? (a[t].push(n), o[t] += 1, s[t] = i[t][o[t]]) : (a[t].push({
|
|
2114
|
+
...n,
|
|
2115
|
+
content: n.content.slice(0, e)
|
|
2116
|
+
}), s[t] = {
|
|
2117
|
+
...n,
|
|
2118
|
+
content: n.content.slice(e),
|
|
2119
|
+
offset: n.offset + e
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
return t;
|
|
2125
|
+
}
|
|
2126
|
+
//#endregion
|
|
2127
|
+
//#region ../../node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js
|
|
2128
|
+
var Ut = [
|
|
2129
|
+
"area",
|
|
2130
|
+
"base",
|
|
2131
|
+
"basefont",
|
|
2132
|
+
"bgsound",
|
|
2133
|
+
"br",
|
|
2134
|
+
"col",
|
|
2135
|
+
"command",
|
|
2136
|
+
"embed",
|
|
2137
|
+
"frame",
|
|
2138
|
+
"hr",
|
|
2139
|
+
"image",
|
|
2140
|
+
"img",
|
|
2141
|
+
"input",
|
|
2142
|
+
"keygen",
|
|
2143
|
+
"link",
|
|
2144
|
+
"meta",
|
|
2145
|
+
"param",
|
|
2146
|
+
"source",
|
|
2147
|
+
"track",
|
|
2148
|
+
"wbr"
|
|
2149
|
+
], L = class {
|
|
2150
|
+
constructor(e, t, n) {
|
|
2151
|
+
this.normal = t, this.property = e, n && (this.space = n);
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
L.prototype.normal = {}, L.prototype.property = {}, L.prototype.space = void 0;
|
|
2155
|
+
//#endregion
|
|
2156
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/merge.js
|
|
2157
|
+
function Wt(e, t) {
|
|
2158
|
+
let n = {}, r = {};
|
|
2159
|
+
for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
|
|
2160
|
+
return new L(n, r, t);
|
|
2161
|
+
}
|
|
2162
|
+
//#endregion
|
|
2163
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/normalize.js
|
|
2164
|
+
function Gt(e) {
|
|
2165
|
+
return e.toLowerCase();
|
|
2166
|
+
}
|
|
2167
|
+
//#endregion
|
|
2168
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/info.js
|
|
2169
|
+
var R = class {
|
|
2170
|
+
constructor(e, t) {
|
|
2171
|
+
this.attribute = t, this.property = e;
|
|
2172
|
+
}
|
|
2173
|
+
};
|
|
2174
|
+
R.prototype.attribute = "", R.prototype.booleanish = !1, R.prototype.boolean = !1, R.prototype.commaOrSpaceSeparated = !1, R.prototype.commaSeparated = !1, R.prototype.defined = !1, R.prototype.mustUseProperty = !1, R.prototype.number = !1, R.prototype.overloadedBoolean = !1, R.prototype.property = "", R.prototype.spaceSeparated = !1, R.prototype.space = void 0;
|
|
2175
|
+
//#endregion
|
|
2176
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/types.js
|
|
2177
|
+
var Kt = /* @__PURE__ */ e({
|
|
2178
|
+
boolean: () => z,
|
|
2179
|
+
booleanish: () => B,
|
|
2180
|
+
commaOrSpaceSeparated: () => W,
|
|
2181
|
+
commaSeparated: () => U,
|
|
2182
|
+
number: () => V,
|
|
2183
|
+
overloadedBoolean: () => Jt,
|
|
2184
|
+
spaceSeparated: () => H
|
|
2185
|
+
}), qt = 0, z = G(), B = G(), Jt = G(), V = G(), H = G(), U = G(), W = G();
|
|
2186
|
+
function G() {
|
|
2187
|
+
return 2 ** ++qt;
|
|
2188
|
+
}
|
|
2189
|
+
//#endregion
|
|
2190
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/defined-info.js
|
|
2191
|
+
var Yt = Object.keys(Kt), Xt = class extends R {
|
|
2192
|
+
constructor(e, t, n, r) {
|
|
2193
|
+
let i = -1;
|
|
2194
|
+
if (super(e, t), Zt(this, "space", r), typeof n == "number") for (; ++i < Yt.length;) {
|
|
2195
|
+
let e = Yt[i];
|
|
2196
|
+
Zt(this, Yt[i], (n & Kt[e]) === Kt[e]);
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
};
|
|
2200
|
+
Xt.prototype.defined = !0;
|
|
2201
|
+
function Zt(e, t, n) {
|
|
2202
|
+
n && (e[t] = n);
|
|
2203
|
+
}
|
|
2204
|
+
//#endregion
|
|
2205
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/create.js
|
|
2206
|
+
function K(e) {
|
|
2207
|
+
let t = {}, n = {};
|
|
2208
|
+
for (let [r, i] of Object.entries(e.properties)) {
|
|
2209
|
+
let a = new Xt(r, e.transform(e.attributes || {}, r), i, e.space);
|
|
2210
|
+
e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[Gt(r)] = r, n[Gt(a.attribute)] = r;
|
|
2211
|
+
}
|
|
2212
|
+
return new L(t, n, e.space);
|
|
2213
|
+
}
|
|
2214
|
+
//#endregion
|
|
2215
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/aria.js
|
|
2216
|
+
var Qt = K({
|
|
2217
|
+
properties: {
|
|
2218
|
+
ariaActiveDescendant: null,
|
|
2219
|
+
ariaAtomic: B,
|
|
2220
|
+
ariaAutoComplete: null,
|
|
2221
|
+
ariaBusy: B,
|
|
2222
|
+
ariaChecked: B,
|
|
2223
|
+
ariaColCount: V,
|
|
2224
|
+
ariaColIndex: V,
|
|
2225
|
+
ariaColSpan: V,
|
|
2226
|
+
ariaControls: H,
|
|
2227
|
+
ariaCurrent: null,
|
|
2228
|
+
ariaDescribedBy: H,
|
|
2229
|
+
ariaDetails: null,
|
|
2230
|
+
ariaDisabled: B,
|
|
2231
|
+
ariaDropEffect: H,
|
|
2232
|
+
ariaErrorMessage: null,
|
|
2233
|
+
ariaExpanded: B,
|
|
2234
|
+
ariaFlowTo: H,
|
|
2235
|
+
ariaGrabbed: B,
|
|
2236
|
+
ariaHasPopup: null,
|
|
2237
|
+
ariaHidden: B,
|
|
2238
|
+
ariaInvalid: null,
|
|
2239
|
+
ariaKeyShortcuts: null,
|
|
2240
|
+
ariaLabel: null,
|
|
2241
|
+
ariaLabelledBy: H,
|
|
2242
|
+
ariaLevel: V,
|
|
2243
|
+
ariaLive: null,
|
|
2244
|
+
ariaModal: B,
|
|
2245
|
+
ariaMultiLine: B,
|
|
2246
|
+
ariaMultiSelectable: B,
|
|
2247
|
+
ariaOrientation: null,
|
|
2248
|
+
ariaOwns: H,
|
|
2249
|
+
ariaPlaceholder: null,
|
|
2250
|
+
ariaPosInSet: V,
|
|
2251
|
+
ariaPressed: B,
|
|
2252
|
+
ariaReadOnly: B,
|
|
2253
|
+
ariaRelevant: null,
|
|
2254
|
+
ariaRequired: B,
|
|
2255
|
+
ariaRoleDescription: H,
|
|
2256
|
+
ariaRowCount: V,
|
|
2257
|
+
ariaRowIndex: V,
|
|
2258
|
+
ariaRowSpan: V,
|
|
2259
|
+
ariaSelected: B,
|
|
2260
|
+
ariaSetSize: V,
|
|
2261
|
+
ariaSort: null,
|
|
2262
|
+
ariaValueMax: V,
|
|
2263
|
+
ariaValueMin: V,
|
|
2264
|
+
ariaValueNow: V,
|
|
2265
|
+
ariaValueText: null,
|
|
2266
|
+
role: null
|
|
2267
|
+
},
|
|
2268
|
+
transform(e, t) {
|
|
2269
|
+
return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
|
|
2270
|
+
}
|
|
2271
|
+
});
|
|
2272
|
+
//#endregion
|
|
2273
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/case-sensitive-transform.js
|
|
2274
|
+
function $t(e, t) {
|
|
2275
|
+
return t in e ? e[t] : t;
|
|
2276
|
+
}
|
|
2277
|
+
//#endregion
|
|
2278
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/case-insensitive-transform.js
|
|
2279
|
+
function en(e, t) {
|
|
2280
|
+
return $t(e, t.toLowerCase());
|
|
2281
|
+
}
|
|
2282
|
+
//#endregion
|
|
2283
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/html.js
|
|
2284
|
+
var tn = K({
|
|
2285
|
+
attributes: {
|
|
2286
|
+
acceptcharset: "accept-charset",
|
|
2287
|
+
classname: "class",
|
|
2288
|
+
htmlfor: "for",
|
|
2289
|
+
httpequiv: "http-equiv"
|
|
2290
|
+
},
|
|
2291
|
+
mustUseProperty: [
|
|
2292
|
+
"checked",
|
|
2293
|
+
"multiple",
|
|
2294
|
+
"muted",
|
|
2295
|
+
"selected"
|
|
2296
|
+
],
|
|
2297
|
+
properties: {
|
|
2298
|
+
abbr: null,
|
|
2299
|
+
accept: U,
|
|
2300
|
+
acceptCharset: H,
|
|
2301
|
+
accessKey: H,
|
|
2302
|
+
action: null,
|
|
2303
|
+
allow: null,
|
|
2304
|
+
allowFullScreen: z,
|
|
2305
|
+
allowPaymentRequest: z,
|
|
2306
|
+
allowUserMedia: z,
|
|
2307
|
+
alpha: z,
|
|
2308
|
+
alt: null,
|
|
2309
|
+
as: null,
|
|
2310
|
+
async: z,
|
|
2311
|
+
autoCapitalize: null,
|
|
2312
|
+
autoComplete: H,
|
|
2313
|
+
autoFocus: z,
|
|
2314
|
+
autoPlay: z,
|
|
2315
|
+
blocking: H,
|
|
2316
|
+
capture: null,
|
|
2317
|
+
charSet: null,
|
|
2318
|
+
checked: z,
|
|
2319
|
+
cite: null,
|
|
2320
|
+
className: H,
|
|
2321
|
+
closedBy: null,
|
|
2322
|
+
colorSpace: null,
|
|
2323
|
+
cols: V,
|
|
2324
|
+
colSpan: V,
|
|
2325
|
+
command: null,
|
|
2326
|
+
commandFor: null,
|
|
2327
|
+
content: null,
|
|
2328
|
+
contentEditable: B,
|
|
2329
|
+
controls: z,
|
|
2330
|
+
controlsList: H,
|
|
2331
|
+
coords: V | U,
|
|
2332
|
+
crossOrigin: null,
|
|
2333
|
+
data: null,
|
|
2334
|
+
dateTime: null,
|
|
2335
|
+
decoding: null,
|
|
2336
|
+
default: z,
|
|
2337
|
+
defer: z,
|
|
2338
|
+
dir: null,
|
|
2339
|
+
dirName: null,
|
|
2340
|
+
disabled: z,
|
|
2341
|
+
download: Jt,
|
|
2342
|
+
draggable: B,
|
|
2343
|
+
encType: null,
|
|
2344
|
+
enterKeyHint: null,
|
|
2345
|
+
fetchPriority: null,
|
|
2346
|
+
form: null,
|
|
2347
|
+
formAction: null,
|
|
2348
|
+
formEncType: null,
|
|
2349
|
+
formMethod: null,
|
|
2350
|
+
formNoValidate: z,
|
|
2351
|
+
formTarget: null,
|
|
2352
|
+
headers: H,
|
|
2353
|
+
height: V,
|
|
2354
|
+
hidden: Jt,
|
|
2355
|
+
high: V,
|
|
2356
|
+
href: null,
|
|
2357
|
+
hrefLang: null,
|
|
2358
|
+
htmlFor: H,
|
|
2359
|
+
httpEquiv: H,
|
|
2360
|
+
id: null,
|
|
2361
|
+
imageSizes: null,
|
|
2362
|
+
imageSrcSet: null,
|
|
2363
|
+
inert: z,
|
|
2364
|
+
inputMode: null,
|
|
2365
|
+
integrity: null,
|
|
2366
|
+
is: null,
|
|
2367
|
+
isMap: z,
|
|
2368
|
+
itemId: null,
|
|
2369
|
+
itemProp: H,
|
|
2370
|
+
itemRef: H,
|
|
2371
|
+
itemScope: z,
|
|
2372
|
+
itemType: H,
|
|
2373
|
+
kind: null,
|
|
2374
|
+
label: null,
|
|
2375
|
+
lang: null,
|
|
2376
|
+
language: null,
|
|
2377
|
+
list: null,
|
|
2378
|
+
loading: null,
|
|
2379
|
+
loop: z,
|
|
2380
|
+
low: V,
|
|
2381
|
+
manifest: null,
|
|
2382
|
+
max: null,
|
|
2383
|
+
maxLength: V,
|
|
2384
|
+
media: null,
|
|
2385
|
+
method: null,
|
|
2386
|
+
min: null,
|
|
2387
|
+
minLength: V,
|
|
2388
|
+
multiple: z,
|
|
2389
|
+
muted: z,
|
|
2390
|
+
name: null,
|
|
2391
|
+
nonce: null,
|
|
2392
|
+
noModule: z,
|
|
2393
|
+
noValidate: z,
|
|
2394
|
+
onAbort: null,
|
|
2395
|
+
onAfterPrint: null,
|
|
2396
|
+
onAuxClick: null,
|
|
2397
|
+
onBeforeMatch: null,
|
|
2398
|
+
onBeforePrint: null,
|
|
2399
|
+
onBeforeToggle: null,
|
|
2400
|
+
onBeforeUnload: null,
|
|
2401
|
+
onBlur: null,
|
|
2402
|
+
onCancel: null,
|
|
2403
|
+
onCanPlay: null,
|
|
2404
|
+
onCanPlayThrough: null,
|
|
2405
|
+
onChange: null,
|
|
2406
|
+
onClick: null,
|
|
2407
|
+
onClose: null,
|
|
2408
|
+
onContextLost: null,
|
|
2409
|
+
onContextMenu: null,
|
|
2410
|
+
onContextRestored: null,
|
|
2411
|
+
onCopy: null,
|
|
2412
|
+
onCueChange: null,
|
|
2413
|
+
onCut: null,
|
|
2414
|
+
onDblClick: null,
|
|
2415
|
+
onDrag: null,
|
|
2416
|
+
onDragEnd: null,
|
|
2417
|
+
onDragEnter: null,
|
|
2418
|
+
onDragExit: null,
|
|
2419
|
+
onDragLeave: null,
|
|
2420
|
+
onDragOver: null,
|
|
2421
|
+
onDragStart: null,
|
|
2422
|
+
onDrop: null,
|
|
2423
|
+
onDurationChange: null,
|
|
2424
|
+
onEmptied: null,
|
|
2425
|
+
onEnded: null,
|
|
2426
|
+
onError: null,
|
|
2427
|
+
onFocus: null,
|
|
2428
|
+
onFormData: null,
|
|
2429
|
+
onHashChange: null,
|
|
2430
|
+
onInput: null,
|
|
2431
|
+
onInvalid: null,
|
|
2432
|
+
onKeyDown: null,
|
|
2433
|
+
onKeyPress: null,
|
|
2434
|
+
onKeyUp: null,
|
|
2435
|
+
onLanguageChange: null,
|
|
2436
|
+
onLoad: null,
|
|
2437
|
+
onLoadedData: null,
|
|
2438
|
+
onLoadedMetadata: null,
|
|
2439
|
+
onLoadEnd: null,
|
|
2440
|
+
onLoadStart: null,
|
|
2441
|
+
onMessage: null,
|
|
2442
|
+
onMessageError: null,
|
|
2443
|
+
onMouseDown: null,
|
|
2444
|
+
onMouseEnter: null,
|
|
2445
|
+
onMouseLeave: null,
|
|
2446
|
+
onMouseMove: null,
|
|
2447
|
+
onMouseOut: null,
|
|
2448
|
+
onMouseOver: null,
|
|
2449
|
+
onMouseUp: null,
|
|
2450
|
+
onOffline: null,
|
|
2451
|
+
onOnline: null,
|
|
2452
|
+
onPageHide: null,
|
|
2453
|
+
onPageShow: null,
|
|
2454
|
+
onPaste: null,
|
|
2455
|
+
onPause: null,
|
|
2456
|
+
onPlay: null,
|
|
2457
|
+
onPlaying: null,
|
|
2458
|
+
onPopState: null,
|
|
2459
|
+
onProgress: null,
|
|
2460
|
+
onRateChange: null,
|
|
2461
|
+
onRejectionHandled: null,
|
|
2462
|
+
onReset: null,
|
|
2463
|
+
onResize: null,
|
|
2464
|
+
onScroll: null,
|
|
2465
|
+
onScrollEnd: null,
|
|
2466
|
+
onSecurityPolicyViolation: null,
|
|
2467
|
+
onSeeked: null,
|
|
2468
|
+
onSeeking: null,
|
|
2469
|
+
onSelect: null,
|
|
2470
|
+
onSlotChange: null,
|
|
2471
|
+
onStalled: null,
|
|
2472
|
+
onStorage: null,
|
|
2473
|
+
onSubmit: null,
|
|
2474
|
+
onSuspend: null,
|
|
2475
|
+
onTimeUpdate: null,
|
|
2476
|
+
onToggle: null,
|
|
2477
|
+
onUnhandledRejection: null,
|
|
2478
|
+
onUnload: null,
|
|
2479
|
+
onVolumeChange: null,
|
|
2480
|
+
onWaiting: null,
|
|
2481
|
+
onWheel: null,
|
|
2482
|
+
open: z,
|
|
2483
|
+
optimum: V,
|
|
2484
|
+
pattern: null,
|
|
2485
|
+
ping: H,
|
|
2486
|
+
placeholder: null,
|
|
2487
|
+
playsInline: z,
|
|
2488
|
+
popover: null,
|
|
2489
|
+
popoverTarget: null,
|
|
2490
|
+
popoverTargetAction: null,
|
|
2491
|
+
poster: null,
|
|
2492
|
+
preload: null,
|
|
2493
|
+
readOnly: z,
|
|
2494
|
+
referrerPolicy: null,
|
|
2495
|
+
rel: H,
|
|
2496
|
+
required: z,
|
|
2497
|
+
reversed: z,
|
|
2498
|
+
rows: V,
|
|
2499
|
+
rowSpan: V,
|
|
2500
|
+
sandbox: H,
|
|
2501
|
+
scope: null,
|
|
2502
|
+
scoped: z,
|
|
2503
|
+
seamless: z,
|
|
2504
|
+
selected: z,
|
|
2505
|
+
shadowRootClonable: z,
|
|
2506
|
+
shadowRootCustomElementRegistry: z,
|
|
2507
|
+
shadowRootDelegatesFocus: z,
|
|
2508
|
+
shadowRootMode: null,
|
|
2509
|
+
shadowRootSerializable: z,
|
|
2510
|
+
shape: null,
|
|
2511
|
+
size: V,
|
|
2512
|
+
sizes: null,
|
|
2513
|
+
slot: null,
|
|
2514
|
+
span: V,
|
|
2515
|
+
spellCheck: B,
|
|
2516
|
+
src: null,
|
|
2517
|
+
srcDoc: null,
|
|
2518
|
+
srcLang: null,
|
|
2519
|
+
srcSet: null,
|
|
2520
|
+
start: V,
|
|
2521
|
+
step: null,
|
|
2522
|
+
style: null,
|
|
2523
|
+
tabIndex: V,
|
|
2524
|
+
target: null,
|
|
2525
|
+
title: null,
|
|
2526
|
+
translate: null,
|
|
2527
|
+
type: null,
|
|
2528
|
+
typeMustMatch: z,
|
|
2529
|
+
useMap: null,
|
|
2530
|
+
value: B,
|
|
2531
|
+
width: V,
|
|
2532
|
+
wrap: null,
|
|
2533
|
+
writingSuggestions: null,
|
|
2534
|
+
align: null,
|
|
2535
|
+
aLink: null,
|
|
2536
|
+
archive: H,
|
|
2537
|
+
axis: null,
|
|
2538
|
+
background: null,
|
|
2539
|
+
bgColor: null,
|
|
2540
|
+
border: V,
|
|
2541
|
+
borderColor: null,
|
|
2542
|
+
bottomMargin: V,
|
|
2543
|
+
cellPadding: null,
|
|
2544
|
+
cellSpacing: null,
|
|
2545
|
+
char: null,
|
|
2546
|
+
charOff: null,
|
|
2547
|
+
classId: null,
|
|
2548
|
+
clear: null,
|
|
2549
|
+
code: null,
|
|
2550
|
+
codeBase: null,
|
|
2551
|
+
codeType: null,
|
|
2552
|
+
color: null,
|
|
2553
|
+
compact: z,
|
|
2554
|
+
declare: z,
|
|
2555
|
+
event: null,
|
|
2556
|
+
face: null,
|
|
2557
|
+
frame: null,
|
|
2558
|
+
frameBorder: null,
|
|
2559
|
+
hSpace: V,
|
|
2560
|
+
leftMargin: V,
|
|
2561
|
+
link: null,
|
|
2562
|
+
longDesc: null,
|
|
2563
|
+
lowSrc: null,
|
|
2564
|
+
marginHeight: V,
|
|
2565
|
+
marginWidth: V,
|
|
2566
|
+
noResize: z,
|
|
2567
|
+
noHref: z,
|
|
2568
|
+
noShade: z,
|
|
2569
|
+
noWrap: z,
|
|
2570
|
+
object: null,
|
|
2571
|
+
profile: null,
|
|
2572
|
+
prompt: null,
|
|
2573
|
+
rev: null,
|
|
2574
|
+
rightMargin: V,
|
|
2575
|
+
rules: null,
|
|
2576
|
+
scheme: null,
|
|
2577
|
+
scrolling: B,
|
|
2578
|
+
standby: null,
|
|
2579
|
+
summary: null,
|
|
2580
|
+
text: null,
|
|
2581
|
+
topMargin: V,
|
|
2582
|
+
valueType: null,
|
|
2583
|
+
version: null,
|
|
2584
|
+
vAlign: null,
|
|
2585
|
+
vLink: null,
|
|
2586
|
+
vSpace: V,
|
|
2587
|
+
allowTransparency: null,
|
|
2588
|
+
autoCorrect: null,
|
|
2589
|
+
autoSave: null,
|
|
2590
|
+
credentialless: z,
|
|
2591
|
+
disablePictureInPicture: z,
|
|
2592
|
+
disableRemotePlayback: z,
|
|
2593
|
+
exportParts: U,
|
|
2594
|
+
part: H,
|
|
2595
|
+
prefix: null,
|
|
2596
|
+
property: null,
|
|
2597
|
+
results: V,
|
|
2598
|
+
security: null,
|
|
2599
|
+
unselectable: null
|
|
2600
|
+
},
|
|
2601
|
+
space: "html",
|
|
2602
|
+
transform: en
|
|
2603
|
+
}), nn = K({
|
|
2604
|
+
attributes: {
|
|
2605
|
+
accentHeight: "accent-height",
|
|
2606
|
+
alignmentBaseline: "alignment-baseline",
|
|
2607
|
+
arabicForm: "arabic-form",
|
|
2608
|
+
baselineShift: "baseline-shift",
|
|
2609
|
+
capHeight: "cap-height",
|
|
2610
|
+
className: "class",
|
|
2611
|
+
clipPath: "clip-path",
|
|
2612
|
+
clipRule: "clip-rule",
|
|
2613
|
+
colorInterpolation: "color-interpolation",
|
|
2614
|
+
colorInterpolationFilters: "color-interpolation-filters",
|
|
2615
|
+
colorProfile: "color-profile",
|
|
2616
|
+
colorRendering: "color-rendering",
|
|
2617
|
+
crossOrigin: "crossorigin",
|
|
2618
|
+
dataType: "datatype",
|
|
2619
|
+
dominantBaseline: "dominant-baseline",
|
|
2620
|
+
enableBackground: "enable-background",
|
|
2621
|
+
fillOpacity: "fill-opacity",
|
|
2622
|
+
fillRule: "fill-rule",
|
|
2623
|
+
floodColor: "flood-color",
|
|
2624
|
+
floodOpacity: "flood-opacity",
|
|
2625
|
+
fontFamily: "font-family",
|
|
2626
|
+
fontSize: "font-size",
|
|
2627
|
+
fontSizeAdjust: "font-size-adjust",
|
|
2628
|
+
fontStretch: "font-stretch",
|
|
2629
|
+
fontStyle: "font-style",
|
|
2630
|
+
fontVariant: "font-variant",
|
|
2631
|
+
fontWeight: "font-weight",
|
|
2632
|
+
glyphName: "glyph-name",
|
|
2633
|
+
glyphOrientationHorizontal: "glyph-orientation-horizontal",
|
|
2634
|
+
glyphOrientationVertical: "glyph-orientation-vertical",
|
|
2635
|
+
hrefLang: "hreflang",
|
|
2636
|
+
horizAdvX: "horiz-adv-x",
|
|
2637
|
+
horizOriginX: "horiz-origin-x",
|
|
2638
|
+
horizOriginY: "horiz-origin-y",
|
|
2639
|
+
imageRendering: "image-rendering",
|
|
2640
|
+
letterSpacing: "letter-spacing",
|
|
2641
|
+
lightingColor: "lighting-color",
|
|
2642
|
+
markerEnd: "marker-end",
|
|
2643
|
+
markerMid: "marker-mid",
|
|
2644
|
+
markerStart: "marker-start",
|
|
2645
|
+
maskType: "mask-type",
|
|
2646
|
+
navDown: "nav-down",
|
|
2647
|
+
navDownLeft: "nav-down-left",
|
|
2648
|
+
navDownRight: "nav-down-right",
|
|
2649
|
+
navLeft: "nav-left",
|
|
2650
|
+
navNext: "nav-next",
|
|
2651
|
+
navPrev: "nav-prev",
|
|
2652
|
+
navRight: "nav-right",
|
|
2653
|
+
navUp: "nav-up",
|
|
2654
|
+
navUpLeft: "nav-up-left",
|
|
2655
|
+
navUpRight: "nav-up-right",
|
|
2656
|
+
onAbort: "onabort",
|
|
2657
|
+
onActivate: "onactivate",
|
|
2658
|
+
onAfterPrint: "onafterprint",
|
|
2659
|
+
onBeforePrint: "onbeforeprint",
|
|
2660
|
+
onBegin: "onbegin",
|
|
2661
|
+
onCancel: "oncancel",
|
|
2662
|
+
onCanPlay: "oncanplay",
|
|
2663
|
+
onCanPlayThrough: "oncanplaythrough",
|
|
2664
|
+
onChange: "onchange",
|
|
2665
|
+
onClick: "onclick",
|
|
2666
|
+
onClose: "onclose",
|
|
2667
|
+
onCopy: "oncopy",
|
|
2668
|
+
onCueChange: "oncuechange",
|
|
2669
|
+
onCut: "oncut",
|
|
2670
|
+
onDblClick: "ondblclick",
|
|
2671
|
+
onDrag: "ondrag",
|
|
2672
|
+
onDragEnd: "ondragend",
|
|
2673
|
+
onDragEnter: "ondragenter",
|
|
2674
|
+
onDragExit: "ondragexit",
|
|
2675
|
+
onDragLeave: "ondragleave",
|
|
2676
|
+
onDragOver: "ondragover",
|
|
2677
|
+
onDragStart: "ondragstart",
|
|
2678
|
+
onDrop: "ondrop",
|
|
2679
|
+
onDurationChange: "ondurationchange",
|
|
2680
|
+
onEmptied: "onemptied",
|
|
2681
|
+
onEnd: "onend",
|
|
2682
|
+
onEnded: "onended",
|
|
2683
|
+
onError: "onerror",
|
|
2684
|
+
onFocus: "onfocus",
|
|
2685
|
+
onFocusIn: "onfocusin",
|
|
2686
|
+
onFocusOut: "onfocusout",
|
|
2687
|
+
onHashChange: "onhashchange",
|
|
2688
|
+
onInput: "oninput",
|
|
2689
|
+
onInvalid: "oninvalid",
|
|
2690
|
+
onKeyDown: "onkeydown",
|
|
2691
|
+
onKeyPress: "onkeypress",
|
|
2692
|
+
onKeyUp: "onkeyup",
|
|
2693
|
+
onLoad: "onload",
|
|
2694
|
+
onLoadedData: "onloadeddata",
|
|
2695
|
+
onLoadedMetadata: "onloadedmetadata",
|
|
2696
|
+
onLoadStart: "onloadstart",
|
|
2697
|
+
onMessage: "onmessage",
|
|
2698
|
+
onMouseDown: "onmousedown",
|
|
2699
|
+
onMouseEnter: "onmouseenter",
|
|
2700
|
+
onMouseLeave: "onmouseleave",
|
|
2701
|
+
onMouseMove: "onmousemove",
|
|
2702
|
+
onMouseOut: "onmouseout",
|
|
2703
|
+
onMouseOver: "onmouseover",
|
|
2704
|
+
onMouseUp: "onmouseup",
|
|
2705
|
+
onMouseWheel: "onmousewheel",
|
|
2706
|
+
onOffline: "onoffline",
|
|
2707
|
+
onOnline: "ononline",
|
|
2708
|
+
onPageHide: "onpagehide",
|
|
2709
|
+
onPageShow: "onpageshow",
|
|
2710
|
+
onPaste: "onpaste",
|
|
2711
|
+
onPause: "onpause",
|
|
2712
|
+
onPlay: "onplay",
|
|
2713
|
+
onPlaying: "onplaying",
|
|
2714
|
+
onPopState: "onpopstate",
|
|
2715
|
+
onProgress: "onprogress",
|
|
2716
|
+
onRateChange: "onratechange",
|
|
2717
|
+
onRepeat: "onrepeat",
|
|
2718
|
+
onReset: "onreset",
|
|
2719
|
+
onResize: "onresize",
|
|
2720
|
+
onScroll: "onscroll",
|
|
2721
|
+
onSeeked: "onseeked",
|
|
2722
|
+
onSeeking: "onseeking",
|
|
2723
|
+
onSelect: "onselect",
|
|
2724
|
+
onShow: "onshow",
|
|
2725
|
+
onStalled: "onstalled",
|
|
2726
|
+
onStorage: "onstorage",
|
|
2727
|
+
onSubmit: "onsubmit",
|
|
2728
|
+
onSuspend: "onsuspend",
|
|
2729
|
+
onTimeUpdate: "ontimeupdate",
|
|
2730
|
+
onToggle: "ontoggle",
|
|
2731
|
+
onUnload: "onunload",
|
|
2732
|
+
onVolumeChange: "onvolumechange",
|
|
2733
|
+
onWaiting: "onwaiting",
|
|
2734
|
+
onZoom: "onzoom",
|
|
2735
|
+
overlinePosition: "overline-position",
|
|
2736
|
+
overlineThickness: "overline-thickness",
|
|
2737
|
+
paintOrder: "paint-order",
|
|
2738
|
+
panose1: "panose-1",
|
|
2739
|
+
pointerEvents: "pointer-events",
|
|
2740
|
+
referrerPolicy: "referrerpolicy",
|
|
2741
|
+
renderingIntent: "rendering-intent",
|
|
2742
|
+
shapeRendering: "shape-rendering",
|
|
2743
|
+
stopColor: "stop-color",
|
|
2744
|
+
stopOpacity: "stop-opacity",
|
|
2745
|
+
strikethroughPosition: "strikethrough-position",
|
|
2746
|
+
strikethroughThickness: "strikethrough-thickness",
|
|
2747
|
+
strokeDashArray: "stroke-dasharray",
|
|
2748
|
+
strokeDashOffset: "stroke-dashoffset",
|
|
2749
|
+
strokeLineCap: "stroke-linecap",
|
|
2750
|
+
strokeLineJoin: "stroke-linejoin",
|
|
2751
|
+
strokeMiterLimit: "stroke-miterlimit",
|
|
2752
|
+
strokeOpacity: "stroke-opacity",
|
|
2753
|
+
strokeWidth: "stroke-width",
|
|
2754
|
+
tabIndex: "tabindex",
|
|
2755
|
+
textAnchor: "text-anchor",
|
|
2756
|
+
textDecoration: "text-decoration",
|
|
2757
|
+
textRendering: "text-rendering",
|
|
2758
|
+
transformOrigin: "transform-origin",
|
|
2759
|
+
typeOf: "typeof",
|
|
2760
|
+
underlinePosition: "underline-position",
|
|
2761
|
+
underlineThickness: "underline-thickness",
|
|
2762
|
+
unicodeBidi: "unicode-bidi",
|
|
2763
|
+
unicodeRange: "unicode-range",
|
|
2764
|
+
unitsPerEm: "units-per-em",
|
|
2765
|
+
vAlphabetic: "v-alphabetic",
|
|
2766
|
+
vHanging: "v-hanging",
|
|
2767
|
+
vIdeographic: "v-ideographic",
|
|
2768
|
+
vMathematical: "v-mathematical",
|
|
2769
|
+
vectorEffect: "vector-effect",
|
|
2770
|
+
vertAdvY: "vert-adv-y",
|
|
2771
|
+
vertOriginX: "vert-origin-x",
|
|
2772
|
+
vertOriginY: "vert-origin-y",
|
|
2773
|
+
wordSpacing: "word-spacing",
|
|
2774
|
+
writingMode: "writing-mode",
|
|
2775
|
+
xHeight: "x-height",
|
|
2776
|
+
playbackOrder: "playbackorder",
|
|
2777
|
+
timelineBegin: "timelinebegin"
|
|
2778
|
+
},
|
|
2779
|
+
properties: {
|
|
2780
|
+
about: W,
|
|
2781
|
+
accentHeight: V,
|
|
2782
|
+
accumulate: null,
|
|
2783
|
+
additive: null,
|
|
2784
|
+
alignmentBaseline: null,
|
|
2785
|
+
alphabetic: V,
|
|
2786
|
+
amplitude: V,
|
|
2787
|
+
arabicForm: null,
|
|
2788
|
+
ascent: V,
|
|
2789
|
+
attributeName: null,
|
|
2790
|
+
attributeType: null,
|
|
2791
|
+
azimuth: V,
|
|
2792
|
+
bandwidth: null,
|
|
2793
|
+
baselineShift: null,
|
|
2794
|
+
baseFrequency: null,
|
|
2795
|
+
baseProfile: null,
|
|
2796
|
+
bbox: null,
|
|
2797
|
+
begin: null,
|
|
2798
|
+
bias: V,
|
|
2799
|
+
by: null,
|
|
2800
|
+
calcMode: null,
|
|
2801
|
+
capHeight: V,
|
|
2802
|
+
className: H,
|
|
2803
|
+
clip: null,
|
|
2804
|
+
clipPath: null,
|
|
2805
|
+
clipPathUnits: null,
|
|
2806
|
+
clipRule: null,
|
|
2807
|
+
color: null,
|
|
2808
|
+
colorInterpolation: null,
|
|
2809
|
+
colorInterpolationFilters: null,
|
|
2810
|
+
colorProfile: null,
|
|
2811
|
+
colorRendering: null,
|
|
2812
|
+
content: null,
|
|
2813
|
+
contentScriptType: null,
|
|
2814
|
+
contentStyleType: null,
|
|
2815
|
+
crossOrigin: null,
|
|
2816
|
+
cursor: null,
|
|
2817
|
+
cx: null,
|
|
2818
|
+
cy: null,
|
|
2819
|
+
d: null,
|
|
2820
|
+
dataType: null,
|
|
2821
|
+
defaultAction: null,
|
|
2822
|
+
descent: V,
|
|
2823
|
+
diffuseConstant: V,
|
|
2824
|
+
direction: null,
|
|
2825
|
+
display: null,
|
|
2826
|
+
dur: null,
|
|
2827
|
+
divisor: V,
|
|
2828
|
+
dominantBaseline: null,
|
|
2829
|
+
download: z,
|
|
2830
|
+
dx: null,
|
|
2831
|
+
dy: null,
|
|
2832
|
+
edgeMode: null,
|
|
2833
|
+
editable: null,
|
|
2834
|
+
elevation: V,
|
|
2835
|
+
enableBackground: null,
|
|
2836
|
+
end: null,
|
|
2837
|
+
event: null,
|
|
2838
|
+
exponent: V,
|
|
2839
|
+
externalResourcesRequired: null,
|
|
2840
|
+
fill: null,
|
|
2841
|
+
fillOpacity: V,
|
|
2842
|
+
fillRule: null,
|
|
2843
|
+
filter: null,
|
|
2844
|
+
filterRes: null,
|
|
2845
|
+
filterUnits: null,
|
|
2846
|
+
floodColor: null,
|
|
2847
|
+
floodOpacity: null,
|
|
2848
|
+
focusable: null,
|
|
2849
|
+
focusHighlight: null,
|
|
2850
|
+
fontFamily: null,
|
|
2851
|
+
fontSize: null,
|
|
2852
|
+
fontSizeAdjust: null,
|
|
2853
|
+
fontStretch: null,
|
|
2854
|
+
fontStyle: null,
|
|
2855
|
+
fontVariant: null,
|
|
2856
|
+
fontWeight: null,
|
|
2857
|
+
format: null,
|
|
2858
|
+
fr: null,
|
|
2859
|
+
from: null,
|
|
2860
|
+
fx: null,
|
|
2861
|
+
fy: null,
|
|
2862
|
+
g1: U,
|
|
2863
|
+
g2: U,
|
|
2864
|
+
glyphName: U,
|
|
2865
|
+
glyphOrientationHorizontal: null,
|
|
2866
|
+
glyphOrientationVertical: null,
|
|
2867
|
+
glyphRef: null,
|
|
2868
|
+
gradientTransform: null,
|
|
2869
|
+
gradientUnits: null,
|
|
2870
|
+
handler: null,
|
|
2871
|
+
hanging: V,
|
|
2872
|
+
hatchContentUnits: null,
|
|
2873
|
+
hatchUnits: null,
|
|
2874
|
+
height: null,
|
|
2875
|
+
href: null,
|
|
2876
|
+
hrefLang: null,
|
|
2877
|
+
horizAdvX: V,
|
|
2878
|
+
horizOriginX: V,
|
|
2879
|
+
horizOriginY: V,
|
|
2880
|
+
id: null,
|
|
2881
|
+
ideographic: V,
|
|
2882
|
+
imageRendering: null,
|
|
2883
|
+
initialVisibility: null,
|
|
2884
|
+
in: null,
|
|
2885
|
+
in2: null,
|
|
2886
|
+
intercept: V,
|
|
2887
|
+
k: V,
|
|
2888
|
+
k1: V,
|
|
2889
|
+
k2: V,
|
|
2890
|
+
k3: V,
|
|
2891
|
+
k4: V,
|
|
2892
|
+
kernelMatrix: W,
|
|
2893
|
+
kernelUnitLength: null,
|
|
2894
|
+
keyPoints: null,
|
|
2895
|
+
keySplines: null,
|
|
2896
|
+
keyTimes: null,
|
|
2897
|
+
kerning: null,
|
|
2898
|
+
lang: null,
|
|
2899
|
+
lengthAdjust: null,
|
|
2900
|
+
letterSpacing: null,
|
|
2901
|
+
lightingColor: null,
|
|
2902
|
+
limitingConeAngle: V,
|
|
2903
|
+
local: null,
|
|
2904
|
+
markerEnd: null,
|
|
2905
|
+
markerMid: null,
|
|
2906
|
+
markerStart: null,
|
|
2907
|
+
markerHeight: null,
|
|
2908
|
+
markerUnits: null,
|
|
2909
|
+
markerWidth: null,
|
|
2910
|
+
mask: null,
|
|
2911
|
+
maskContentUnits: null,
|
|
2912
|
+
maskType: null,
|
|
2913
|
+
maskUnits: null,
|
|
2914
|
+
mathematical: null,
|
|
2915
|
+
max: null,
|
|
2916
|
+
media: null,
|
|
2917
|
+
mediaCharacterEncoding: null,
|
|
2918
|
+
mediaContentEncodings: null,
|
|
2919
|
+
mediaSize: V,
|
|
2920
|
+
mediaTime: null,
|
|
2921
|
+
method: null,
|
|
2922
|
+
min: null,
|
|
2923
|
+
mode: null,
|
|
2924
|
+
name: null,
|
|
2925
|
+
navDown: null,
|
|
2926
|
+
navDownLeft: null,
|
|
2927
|
+
navDownRight: null,
|
|
2928
|
+
navLeft: null,
|
|
2929
|
+
navNext: null,
|
|
2930
|
+
navPrev: null,
|
|
2931
|
+
navRight: null,
|
|
2932
|
+
navUp: null,
|
|
2933
|
+
navUpLeft: null,
|
|
2934
|
+
navUpRight: null,
|
|
2935
|
+
numOctaves: null,
|
|
2936
|
+
observer: null,
|
|
2937
|
+
offset: null,
|
|
2938
|
+
onAbort: null,
|
|
2939
|
+
onActivate: null,
|
|
2940
|
+
onAfterPrint: null,
|
|
2941
|
+
onBeforePrint: null,
|
|
2942
|
+
onBegin: null,
|
|
2943
|
+
onCancel: null,
|
|
2944
|
+
onCanPlay: null,
|
|
2945
|
+
onCanPlayThrough: null,
|
|
2946
|
+
onChange: null,
|
|
2947
|
+
onClick: null,
|
|
2948
|
+
onClose: null,
|
|
2949
|
+
onCopy: null,
|
|
2950
|
+
onCueChange: null,
|
|
2951
|
+
onCut: null,
|
|
2952
|
+
onDblClick: null,
|
|
2953
|
+
onDrag: null,
|
|
2954
|
+
onDragEnd: null,
|
|
2955
|
+
onDragEnter: null,
|
|
2956
|
+
onDragExit: null,
|
|
2957
|
+
onDragLeave: null,
|
|
2958
|
+
onDragOver: null,
|
|
2959
|
+
onDragStart: null,
|
|
2960
|
+
onDrop: null,
|
|
2961
|
+
onDurationChange: null,
|
|
2962
|
+
onEmptied: null,
|
|
2963
|
+
onEnd: null,
|
|
2964
|
+
onEnded: null,
|
|
2965
|
+
onError: null,
|
|
2966
|
+
onFocus: null,
|
|
2967
|
+
onFocusIn: null,
|
|
2968
|
+
onFocusOut: null,
|
|
2969
|
+
onHashChange: null,
|
|
2970
|
+
onInput: null,
|
|
2971
|
+
onInvalid: null,
|
|
2972
|
+
onKeyDown: null,
|
|
2973
|
+
onKeyPress: null,
|
|
2974
|
+
onKeyUp: null,
|
|
2975
|
+
onLoad: null,
|
|
2976
|
+
onLoadedData: null,
|
|
2977
|
+
onLoadedMetadata: null,
|
|
2978
|
+
onLoadStart: null,
|
|
2979
|
+
onMessage: null,
|
|
2980
|
+
onMouseDown: null,
|
|
2981
|
+
onMouseEnter: null,
|
|
2982
|
+
onMouseLeave: null,
|
|
2983
|
+
onMouseMove: null,
|
|
2984
|
+
onMouseOut: null,
|
|
2985
|
+
onMouseOver: null,
|
|
2986
|
+
onMouseUp: null,
|
|
2987
|
+
onMouseWheel: null,
|
|
2988
|
+
onOffline: null,
|
|
2989
|
+
onOnline: null,
|
|
2990
|
+
onPageHide: null,
|
|
2991
|
+
onPageShow: null,
|
|
2992
|
+
onPaste: null,
|
|
2993
|
+
onPause: null,
|
|
2994
|
+
onPlay: null,
|
|
2995
|
+
onPlaying: null,
|
|
2996
|
+
onPopState: null,
|
|
2997
|
+
onProgress: null,
|
|
2998
|
+
onRateChange: null,
|
|
2999
|
+
onRepeat: null,
|
|
3000
|
+
onReset: null,
|
|
3001
|
+
onResize: null,
|
|
3002
|
+
onScroll: null,
|
|
3003
|
+
onSeeked: null,
|
|
3004
|
+
onSeeking: null,
|
|
3005
|
+
onSelect: null,
|
|
3006
|
+
onShow: null,
|
|
3007
|
+
onStalled: null,
|
|
3008
|
+
onStorage: null,
|
|
3009
|
+
onSubmit: null,
|
|
3010
|
+
onSuspend: null,
|
|
3011
|
+
onTimeUpdate: null,
|
|
3012
|
+
onToggle: null,
|
|
3013
|
+
onUnload: null,
|
|
3014
|
+
onVolumeChange: null,
|
|
3015
|
+
onWaiting: null,
|
|
3016
|
+
onZoom: null,
|
|
3017
|
+
opacity: null,
|
|
3018
|
+
operator: null,
|
|
3019
|
+
order: null,
|
|
3020
|
+
orient: null,
|
|
3021
|
+
orientation: null,
|
|
3022
|
+
origin: null,
|
|
3023
|
+
overflow: null,
|
|
3024
|
+
overlay: null,
|
|
3025
|
+
overlinePosition: V,
|
|
3026
|
+
overlineThickness: V,
|
|
3027
|
+
paintOrder: null,
|
|
3028
|
+
panose1: null,
|
|
3029
|
+
path: null,
|
|
3030
|
+
pathLength: V,
|
|
3031
|
+
patternContentUnits: null,
|
|
3032
|
+
patternTransform: null,
|
|
3033
|
+
patternUnits: null,
|
|
3034
|
+
phase: null,
|
|
3035
|
+
ping: H,
|
|
3036
|
+
pitch: null,
|
|
3037
|
+
playbackOrder: null,
|
|
3038
|
+
pointerEvents: null,
|
|
3039
|
+
points: null,
|
|
3040
|
+
pointsAtX: V,
|
|
3041
|
+
pointsAtY: V,
|
|
3042
|
+
pointsAtZ: V,
|
|
3043
|
+
preserveAlpha: null,
|
|
3044
|
+
preserveAspectRatio: null,
|
|
3045
|
+
primitiveUnits: null,
|
|
3046
|
+
propagate: null,
|
|
3047
|
+
property: W,
|
|
3048
|
+
r: null,
|
|
3049
|
+
radius: null,
|
|
3050
|
+
referrerPolicy: null,
|
|
3051
|
+
refX: null,
|
|
3052
|
+
refY: null,
|
|
3053
|
+
rel: W,
|
|
3054
|
+
rev: W,
|
|
3055
|
+
renderingIntent: null,
|
|
3056
|
+
repeatCount: null,
|
|
3057
|
+
repeatDur: null,
|
|
3058
|
+
requiredExtensions: W,
|
|
3059
|
+
requiredFeatures: W,
|
|
3060
|
+
requiredFonts: W,
|
|
3061
|
+
requiredFormats: W,
|
|
3062
|
+
resource: null,
|
|
3063
|
+
restart: null,
|
|
3064
|
+
result: null,
|
|
3065
|
+
rotate: null,
|
|
3066
|
+
rx: null,
|
|
3067
|
+
ry: null,
|
|
3068
|
+
scale: null,
|
|
3069
|
+
seed: null,
|
|
3070
|
+
shapeRendering: null,
|
|
3071
|
+
side: null,
|
|
3072
|
+
slope: null,
|
|
3073
|
+
snapshotTime: null,
|
|
3074
|
+
specularConstant: V,
|
|
3075
|
+
specularExponent: V,
|
|
3076
|
+
spreadMethod: null,
|
|
3077
|
+
spacing: null,
|
|
3078
|
+
startOffset: null,
|
|
3079
|
+
stdDeviation: null,
|
|
3080
|
+
stemh: null,
|
|
3081
|
+
stemv: null,
|
|
3082
|
+
stitchTiles: null,
|
|
3083
|
+
stopColor: null,
|
|
3084
|
+
stopOpacity: null,
|
|
3085
|
+
strikethroughPosition: V,
|
|
3086
|
+
strikethroughThickness: V,
|
|
3087
|
+
string: null,
|
|
3088
|
+
stroke: null,
|
|
3089
|
+
strokeDashArray: W,
|
|
3090
|
+
strokeDashOffset: null,
|
|
3091
|
+
strokeLineCap: null,
|
|
3092
|
+
strokeLineJoin: null,
|
|
3093
|
+
strokeMiterLimit: V,
|
|
3094
|
+
strokeOpacity: V,
|
|
3095
|
+
strokeWidth: null,
|
|
3096
|
+
style: null,
|
|
3097
|
+
surfaceScale: V,
|
|
3098
|
+
syncBehavior: null,
|
|
3099
|
+
syncBehaviorDefault: null,
|
|
3100
|
+
syncMaster: null,
|
|
3101
|
+
syncTolerance: null,
|
|
3102
|
+
syncToleranceDefault: null,
|
|
3103
|
+
systemLanguage: W,
|
|
3104
|
+
tabIndex: V,
|
|
3105
|
+
tableValues: null,
|
|
3106
|
+
target: null,
|
|
3107
|
+
targetX: V,
|
|
3108
|
+
targetY: V,
|
|
3109
|
+
textAnchor: null,
|
|
3110
|
+
textDecoration: null,
|
|
3111
|
+
textRendering: null,
|
|
3112
|
+
textLength: null,
|
|
3113
|
+
timelineBegin: null,
|
|
3114
|
+
title: null,
|
|
3115
|
+
transformBehavior: null,
|
|
3116
|
+
type: null,
|
|
3117
|
+
typeOf: W,
|
|
3118
|
+
to: null,
|
|
3119
|
+
transform: null,
|
|
3120
|
+
transformOrigin: null,
|
|
3121
|
+
u1: null,
|
|
3122
|
+
u2: null,
|
|
3123
|
+
underlinePosition: V,
|
|
3124
|
+
underlineThickness: V,
|
|
3125
|
+
unicode: null,
|
|
3126
|
+
unicodeBidi: null,
|
|
3127
|
+
unicodeRange: null,
|
|
3128
|
+
unitsPerEm: V,
|
|
3129
|
+
values: null,
|
|
3130
|
+
vAlphabetic: V,
|
|
3131
|
+
vMathematical: V,
|
|
3132
|
+
vectorEffect: null,
|
|
3133
|
+
vHanging: V,
|
|
3134
|
+
vIdeographic: V,
|
|
3135
|
+
version: null,
|
|
3136
|
+
vertAdvY: V,
|
|
3137
|
+
vertOriginX: V,
|
|
3138
|
+
vertOriginY: V,
|
|
3139
|
+
viewBox: null,
|
|
3140
|
+
viewTarget: null,
|
|
3141
|
+
visibility: null,
|
|
3142
|
+
width: null,
|
|
3143
|
+
widths: null,
|
|
3144
|
+
wordSpacing: null,
|
|
3145
|
+
writingMode: null,
|
|
3146
|
+
x: null,
|
|
3147
|
+
x1: null,
|
|
3148
|
+
x2: null,
|
|
3149
|
+
xChannelSelector: null,
|
|
3150
|
+
xHeight: V,
|
|
3151
|
+
y: null,
|
|
3152
|
+
y1: null,
|
|
3153
|
+
y2: null,
|
|
3154
|
+
yChannelSelector: null,
|
|
3155
|
+
z: null,
|
|
3156
|
+
zoomAndPan: null
|
|
3157
|
+
},
|
|
3158
|
+
space: "svg",
|
|
3159
|
+
transform: $t
|
|
3160
|
+
}), rn = K({
|
|
3161
|
+
properties: {
|
|
3162
|
+
xLinkActuate: null,
|
|
3163
|
+
xLinkArcRole: null,
|
|
3164
|
+
xLinkHref: null,
|
|
3165
|
+
xLinkRole: null,
|
|
3166
|
+
xLinkShow: null,
|
|
3167
|
+
xLinkTitle: null,
|
|
3168
|
+
xLinkType: null
|
|
3169
|
+
},
|
|
3170
|
+
space: "xlink",
|
|
3171
|
+
transform(e, t) {
|
|
3172
|
+
return "xlink:" + t.slice(5).toLowerCase();
|
|
3173
|
+
}
|
|
3174
|
+
}), an = K({
|
|
3175
|
+
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
3176
|
+
properties: {
|
|
3177
|
+
xmlnsXLink: null,
|
|
3178
|
+
xmlns: null
|
|
3179
|
+
},
|
|
3180
|
+
space: "xmlns",
|
|
3181
|
+
transform: en
|
|
3182
|
+
}), on = K({
|
|
3183
|
+
properties: {
|
|
3184
|
+
xmlBase: null,
|
|
3185
|
+
xmlLang: null,
|
|
3186
|
+
xmlSpace: null
|
|
3187
|
+
},
|
|
3188
|
+
space: "xml",
|
|
3189
|
+
transform(e, t) {
|
|
3190
|
+
return "xml:" + t.slice(3).toLowerCase();
|
|
3191
|
+
}
|
|
3192
|
+
}), sn = /[A-Z]/g, cn = /-[a-z]/g, ln = /^data[-\w.:]+$/i;
|
|
3193
|
+
function un(e, t) {
|
|
3194
|
+
let n = Gt(t), r = t, i = R;
|
|
3195
|
+
if (n in e.normal) return e.property[e.normal[n]];
|
|
3196
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && ln.test(t)) {
|
|
3197
|
+
if (t.charAt(4) === "-") {
|
|
3198
|
+
let e = t.slice(5).replace(cn, fn);
|
|
3199
|
+
r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
|
|
3200
|
+
} else {
|
|
3201
|
+
let e = t.slice(4);
|
|
3202
|
+
if (!cn.test(e)) {
|
|
3203
|
+
let n = e.replace(sn, dn);
|
|
3204
|
+
n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
|
|
3205
|
+
}
|
|
3206
|
+
}
|
|
3207
|
+
i = Xt;
|
|
3208
|
+
}
|
|
3209
|
+
return new i(r, t);
|
|
3210
|
+
}
|
|
3211
|
+
function dn(e) {
|
|
3212
|
+
return "-" + e.toLowerCase();
|
|
3213
|
+
}
|
|
3214
|
+
function fn(e) {
|
|
3215
|
+
return e.charAt(1).toUpperCase();
|
|
3216
|
+
}
|
|
3217
|
+
//#endregion
|
|
3218
|
+
//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/index.js
|
|
3219
|
+
var pn = Wt([
|
|
3220
|
+
Qt,
|
|
3221
|
+
tn,
|
|
3222
|
+
rn,
|
|
3223
|
+
an,
|
|
3224
|
+
on
|
|
3225
|
+
], "html"), mn = Wt([
|
|
3226
|
+
Qt,
|
|
3227
|
+
nn,
|
|
3228
|
+
rn,
|
|
3229
|
+
an,
|
|
3230
|
+
on
|
|
3231
|
+
], "svg"), hn = {}.hasOwnProperty;
|
|
3232
|
+
function gn(e, t) {
|
|
3233
|
+
let n = t || {};
|
|
3234
|
+
function r(t, ...n) {
|
|
3235
|
+
let i = r.invalid, a = r.handlers;
|
|
3236
|
+
if (t && hn.call(t, e)) {
|
|
3237
|
+
let n = String(t[e]);
|
|
3238
|
+
i = hn.call(a, n) ? a[n] : r.unknown;
|
|
3239
|
+
}
|
|
3240
|
+
if (i) return i.call(this, t, ...n);
|
|
3241
|
+
}
|
|
3242
|
+
return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
|
|
3243
|
+
}
|
|
3244
|
+
//#endregion
|
|
3245
|
+
//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js
|
|
3246
|
+
var _n = /["&'<>`]/g, vn = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, yn = /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g, bn = /[|\\{}()[\]^$+*?.]/g, xn = /* @__PURE__ */ new WeakMap();
|
|
3247
|
+
function Sn(e, t) {
|
|
3248
|
+
return e = e.replace(t.subset ? Cn(t.subset) : _n, r), t.subset || t.escapeOnly ? e : e.replace(vn, n).replace(yn, r);
|
|
3249
|
+
function n(e, n, r) {
|
|
3250
|
+
return t.format((e.charCodeAt(0) - 55296) * 1024 + e.charCodeAt(1) - 56320 + 65536, r.charCodeAt(n + 2), t);
|
|
3251
|
+
}
|
|
3252
|
+
function r(e, n, r) {
|
|
3253
|
+
return t.format(e.charCodeAt(0), r.charCodeAt(n + 1), t);
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
function Cn(e) {
|
|
3257
|
+
let t = xn.get(e);
|
|
3258
|
+
return t || (t = wn(e), xn.set(e, t)), t;
|
|
3259
|
+
}
|
|
3260
|
+
function wn(e) {
|
|
3261
|
+
let t = [], n = -1;
|
|
3262
|
+
for (; ++n < e.length;) t.push(e[n].replace(bn, "\\$&"));
|
|
3263
|
+
return RegExp("(?:" + t.join("|") + ")", "g");
|
|
3264
|
+
}
|
|
3265
|
+
//#endregion
|
|
3266
|
+
//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js
|
|
3267
|
+
var Tn = /[\dA-Fa-f]/;
|
|
3268
|
+
function En(e, t, n) {
|
|
3269
|
+
let r = "&#x" + e.toString(16).toUpperCase();
|
|
3270
|
+
return n && t && !Tn.test(String.fromCharCode(t)) ? r : r + ";";
|
|
3271
|
+
}
|
|
3272
|
+
//#endregion
|
|
3273
|
+
//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js
|
|
3274
|
+
var Dn = /\d/;
|
|
3275
|
+
function On(e, t, n) {
|
|
3276
|
+
let r = "&#" + String(e);
|
|
3277
|
+
return n && t && !Dn.test(String.fromCharCode(t)) ? r : r + ";";
|
|
3278
|
+
}
|
|
3279
|
+
//#endregion
|
|
3280
|
+
//#region ../../node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
|
|
3281
|
+
var kn = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), An = {
|
|
3282
|
+
nbsp: "\xA0",
|
|
3283
|
+
iexcl: "¡",
|
|
3284
|
+
cent: "¢",
|
|
3285
|
+
pound: "£",
|
|
3286
|
+
curren: "¤",
|
|
3287
|
+
yen: "¥",
|
|
3288
|
+
brvbar: "¦",
|
|
3289
|
+
sect: "§",
|
|
3290
|
+
uml: "¨",
|
|
3291
|
+
copy: "©",
|
|
3292
|
+
ordf: "ª",
|
|
3293
|
+
laquo: "«",
|
|
3294
|
+
not: "¬",
|
|
3295
|
+
shy: "",
|
|
3296
|
+
reg: "®",
|
|
3297
|
+
macr: "¯",
|
|
3298
|
+
deg: "°",
|
|
3299
|
+
plusmn: "±",
|
|
3300
|
+
sup2: "²",
|
|
3301
|
+
sup3: "³",
|
|
3302
|
+
acute: "´",
|
|
3303
|
+
micro: "µ",
|
|
3304
|
+
para: "¶",
|
|
3305
|
+
middot: "·",
|
|
3306
|
+
cedil: "¸",
|
|
3307
|
+
sup1: "¹",
|
|
3308
|
+
ordm: "º",
|
|
3309
|
+
raquo: "»",
|
|
3310
|
+
frac14: "¼",
|
|
3311
|
+
frac12: "½",
|
|
3312
|
+
frac34: "¾",
|
|
3313
|
+
iquest: "¿",
|
|
3314
|
+
Agrave: "À",
|
|
3315
|
+
Aacute: "Á",
|
|
3316
|
+
Acirc: "Â",
|
|
3317
|
+
Atilde: "Ã",
|
|
3318
|
+
Auml: "Ä",
|
|
3319
|
+
Aring: "Å",
|
|
3320
|
+
AElig: "Æ",
|
|
3321
|
+
Ccedil: "Ç",
|
|
3322
|
+
Egrave: "È",
|
|
3323
|
+
Eacute: "É",
|
|
3324
|
+
Ecirc: "Ê",
|
|
3325
|
+
Euml: "Ë",
|
|
3326
|
+
Igrave: "Ì",
|
|
3327
|
+
Iacute: "Í",
|
|
3328
|
+
Icirc: "Î",
|
|
3329
|
+
Iuml: "Ï",
|
|
3330
|
+
ETH: "Ð",
|
|
3331
|
+
Ntilde: "Ñ",
|
|
3332
|
+
Ograve: "Ò",
|
|
3333
|
+
Oacute: "Ó",
|
|
3334
|
+
Ocirc: "Ô",
|
|
3335
|
+
Otilde: "Õ",
|
|
3336
|
+
Ouml: "Ö",
|
|
3337
|
+
times: "×",
|
|
3338
|
+
Oslash: "Ø",
|
|
3339
|
+
Ugrave: "Ù",
|
|
3340
|
+
Uacute: "Ú",
|
|
3341
|
+
Ucirc: "Û",
|
|
3342
|
+
Uuml: "Ü",
|
|
3343
|
+
Yacute: "Ý",
|
|
3344
|
+
THORN: "Þ",
|
|
3345
|
+
szlig: "ß",
|
|
3346
|
+
agrave: "à",
|
|
3347
|
+
aacute: "á",
|
|
3348
|
+
acirc: "â",
|
|
3349
|
+
atilde: "ã",
|
|
3350
|
+
auml: "ä",
|
|
3351
|
+
aring: "å",
|
|
3352
|
+
aelig: "æ",
|
|
3353
|
+
ccedil: "ç",
|
|
3354
|
+
egrave: "è",
|
|
3355
|
+
eacute: "é",
|
|
3356
|
+
ecirc: "ê",
|
|
3357
|
+
euml: "ë",
|
|
3358
|
+
igrave: "ì",
|
|
3359
|
+
iacute: "í",
|
|
3360
|
+
icirc: "î",
|
|
3361
|
+
iuml: "ï",
|
|
3362
|
+
eth: "ð",
|
|
3363
|
+
ntilde: "ñ",
|
|
3364
|
+
ograve: "ò",
|
|
3365
|
+
oacute: "ó",
|
|
3366
|
+
ocirc: "ô",
|
|
3367
|
+
otilde: "õ",
|
|
3368
|
+
ouml: "ö",
|
|
3369
|
+
divide: "÷",
|
|
3370
|
+
oslash: "ø",
|
|
3371
|
+
ugrave: "ù",
|
|
3372
|
+
uacute: "ú",
|
|
3373
|
+
ucirc: "û",
|
|
3374
|
+
uuml: "ü",
|
|
3375
|
+
yacute: "ý",
|
|
3376
|
+
thorn: "þ",
|
|
3377
|
+
yuml: "ÿ",
|
|
3378
|
+
fnof: "ƒ",
|
|
3379
|
+
Alpha: "Α",
|
|
3380
|
+
Beta: "Β",
|
|
3381
|
+
Gamma: "Γ",
|
|
3382
|
+
Delta: "Δ",
|
|
3383
|
+
Epsilon: "Ε",
|
|
3384
|
+
Zeta: "Ζ",
|
|
3385
|
+
Eta: "Η",
|
|
3386
|
+
Theta: "Θ",
|
|
3387
|
+
Iota: "Ι",
|
|
3388
|
+
Kappa: "Κ",
|
|
3389
|
+
Lambda: "Λ",
|
|
3390
|
+
Mu: "Μ",
|
|
3391
|
+
Nu: "Ν",
|
|
3392
|
+
Xi: "Ξ",
|
|
3393
|
+
Omicron: "Ο",
|
|
3394
|
+
Pi: "Π",
|
|
3395
|
+
Rho: "Ρ",
|
|
3396
|
+
Sigma: "Σ",
|
|
3397
|
+
Tau: "Τ",
|
|
3398
|
+
Upsilon: "Υ",
|
|
3399
|
+
Phi: "Φ",
|
|
3400
|
+
Chi: "Χ",
|
|
3401
|
+
Psi: "Ψ",
|
|
3402
|
+
Omega: "Ω",
|
|
3403
|
+
alpha: "α",
|
|
3404
|
+
beta: "β",
|
|
3405
|
+
gamma: "γ",
|
|
3406
|
+
delta: "δ",
|
|
3407
|
+
epsilon: "ε",
|
|
3408
|
+
zeta: "ζ",
|
|
3409
|
+
eta: "η",
|
|
3410
|
+
theta: "θ",
|
|
3411
|
+
iota: "ι",
|
|
3412
|
+
kappa: "κ",
|
|
3413
|
+
lambda: "λ",
|
|
3414
|
+
mu: "μ",
|
|
3415
|
+
nu: "ν",
|
|
3416
|
+
xi: "ξ",
|
|
3417
|
+
omicron: "ο",
|
|
3418
|
+
pi: "π",
|
|
3419
|
+
rho: "ρ",
|
|
3420
|
+
sigmaf: "ς",
|
|
3421
|
+
sigma: "σ",
|
|
3422
|
+
tau: "τ",
|
|
3423
|
+
upsilon: "υ",
|
|
3424
|
+
phi: "φ",
|
|
3425
|
+
chi: "χ",
|
|
3426
|
+
psi: "ψ",
|
|
3427
|
+
omega: "ω",
|
|
3428
|
+
thetasym: "ϑ",
|
|
3429
|
+
upsih: "ϒ",
|
|
3430
|
+
piv: "ϖ",
|
|
3431
|
+
bull: "•",
|
|
3432
|
+
hellip: "…",
|
|
3433
|
+
prime: "′",
|
|
3434
|
+
Prime: "″",
|
|
3435
|
+
oline: "‾",
|
|
3436
|
+
frasl: "⁄",
|
|
3437
|
+
weierp: "℘",
|
|
3438
|
+
image: "ℑ",
|
|
3439
|
+
real: "ℜ",
|
|
3440
|
+
trade: "™",
|
|
3441
|
+
alefsym: "ℵ",
|
|
3442
|
+
larr: "←",
|
|
3443
|
+
uarr: "↑",
|
|
3444
|
+
rarr: "→",
|
|
3445
|
+
darr: "↓",
|
|
3446
|
+
harr: "↔",
|
|
3447
|
+
crarr: "↵",
|
|
3448
|
+
lArr: "⇐",
|
|
3449
|
+
uArr: "⇑",
|
|
3450
|
+
rArr: "⇒",
|
|
3451
|
+
dArr: "⇓",
|
|
3452
|
+
hArr: "⇔",
|
|
3453
|
+
forall: "∀",
|
|
3454
|
+
part: "∂",
|
|
3455
|
+
exist: "∃",
|
|
3456
|
+
empty: "∅",
|
|
3457
|
+
nabla: "∇",
|
|
3458
|
+
isin: "∈",
|
|
3459
|
+
notin: "∉",
|
|
3460
|
+
ni: "∋",
|
|
3461
|
+
prod: "∏",
|
|
3462
|
+
sum: "∑",
|
|
3463
|
+
minus: "−",
|
|
3464
|
+
lowast: "∗",
|
|
3465
|
+
radic: "√",
|
|
3466
|
+
prop: "∝",
|
|
3467
|
+
infin: "∞",
|
|
3468
|
+
ang: "∠",
|
|
3469
|
+
and: "∧",
|
|
3470
|
+
or: "∨",
|
|
3471
|
+
cap: "∩",
|
|
3472
|
+
cup: "∪",
|
|
3473
|
+
int: "∫",
|
|
3474
|
+
there4: "∴",
|
|
3475
|
+
sim: "∼",
|
|
3476
|
+
cong: "≅",
|
|
3477
|
+
asymp: "≈",
|
|
3478
|
+
ne: "≠",
|
|
3479
|
+
equiv: "≡",
|
|
3480
|
+
le: "≤",
|
|
3481
|
+
ge: "≥",
|
|
3482
|
+
sub: "⊂",
|
|
3483
|
+
sup: "⊃",
|
|
3484
|
+
nsub: "⊄",
|
|
3485
|
+
sube: "⊆",
|
|
3486
|
+
supe: "⊇",
|
|
3487
|
+
oplus: "⊕",
|
|
3488
|
+
otimes: "⊗",
|
|
3489
|
+
perp: "⊥",
|
|
3490
|
+
sdot: "⋅",
|
|
3491
|
+
lceil: "⌈",
|
|
3492
|
+
rceil: "⌉",
|
|
3493
|
+
lfloor: "⌊",
|
|
3494
|
+
rfloor: "⌋",
|
|
3495
|
+
lang: "〈",
|
|
3496
|
+
rang: "〉",
|
|
3497
|
+
loz: "◊",
|
|
3498
|
+
spades: "♠",
|
|
3499
|
+
clubs: "♣",
|
|
3500
|
+
hearts: "♥",
|
|
3501
|
+
diams: "♦",
|
|
3502
|
+
quot: "\"",
|
|
3503
|
+
amp: "&",
|
|
3504
|
+
lt: "<",
|
|
3505
|
+
gt: ">",
|
|
3506
|
+
OElig: "Œ",
|
|
3507
|
+
oelig: "œ",
|
|
3508
|
+
Scaron: "Š",
|
|
3509
|
+
scaron: "š",
|
|
3510
|
+
Yuml: "Ÿ",
|
|
3511
|
+
circ: "ˆ",
|
|
3512
|
+
tilde: "˜",
|
|
3513
|
+
ensp: " ",
|
|
3514
|
+
emsp: " ",
|
|
3515
|
+
thinsp: " ",
|
|
3516
|
+
zwnj: "",
|
|
3517
|
+
zwj: "",
|
|
3518
|
+
lrm: "",
|
|
3519
|
+
rlm: "",
|
|
3520
|
+
ndash: "–",
|
|
3521
|
+
mdash: "—",
|
|
3522
|
+
lsquo: "‘",
|
|
3523
|
+
rsquo: "’",
|
|
3524
|
+
sbquo: "‚",
|
|
3525
|
+
ldquo: "“",
|
|
3526
|
+
rdquo: "”",
|
|
3527
|
+
bdquo: "„",
|
|
3528
|
+
dagger: "†",
|
|
3529
|
+
Dagger: "‡",
|
|
3530
|
+
permil: "‰",
|
|
3531
|
+
lsaquo: "‹",
|
|
3532
|
+
rsaquo: "›",
|
|
3533
|
+
euro: "€"
|
|
3534
|
+
}, jn = [
|
|
3535
|
+
"cent",
|
|
3536
|
+
"copy",
|
|
3537
|
+
"divide",
|
|
3538
|
+
"gt",
|
|
3539
|
+
"lt",
|
|
3540
|
+
"not",
|
|
3541
|
+
"para",
|
|
3542
|
+
"times"
|
|
3543
|
+
], Mn = {}.hasOwnProperty, Nn = {}, Pn;
|
|
3544
|
+
for (Pn in An) Mn.call(An, Pn) && (Nn[An[Pn]] = Pn);
|
|
3545
|
+
var Fn = /[^\dA-Za-z]/;
|
|
3546
|
+
function In(e, t, n, r) {
|
|
3547
|
+
let i = String.fromCharCode(e);
|
|
3548
|
+
if (Mn.call(Nn, i)) {
|
|
3549
|
+
let e = Nn[i], a = "&" + e;
|
|
3550
|
+
return n && kn.includes(e) && !jn.includes(e) && (!r || t && t !== 61 && Fn.test(String.fromCharCode(t))) ? a : a + ";";
|
|
3551
|
+
}
|
|
3552
|
+
return "";
|
|
3553
|
+
}
|
|
3554
|
+
//#endregion
|
|
3555
|
+
//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js
|
|
3556
|
+
function Ln(e, t, n) {
|
|
3557
|
+
let r = En(e, t, n.omitOptionalSemicolons), i;
|
|
3558
|
+
if ((n.useNamedReferences || n.useShortestReferences) && (i = In(e, t, n.omitOptionalSemicolons, n.attribute)), (n.useShortestReferences || !i) && n.useShortestReferences) {
|
|
3559
|
+
let i = On(e, t, n.omitOptionalSemicolons);
|
|
3560
|
+
i.length < r.length && (r = i);
|
|
3561
|
+
}
|
|
3562
|
+
return i && (!n.useShortestReferences || i.length < r.length) ? i : r;
|
|
3563
|
+
}
|
|
3564
|
+
//#endregion
|
|
3565
|
+
//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js
|
|
3566
|
+
function q(e, t) {
|
|
3567
|
+
return Sn(e, Object.assign({ format: Ln }, t));
|
|
3568
|
+
}
|
|
3569
|
+
//#endregion
|
|
3570
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js
|
|
3571
|
+
var Rn = /^>|^->|<!--|-->|--!>|<!-$/g, zn = [">"], Bn = ["<", ">"];
|
|
3572
|
+
function Vn(e, t, n, r) {
|
|
3573
|
+
return r.settings.bogusComments ? "<?" + q(e.value, Object.assign({}, r.settings.characterReferences, { subset: zn })) + ">" : "<!--" + e.value.replace(Rn, i) + "-->";
|
|
3574
|
+
function i(e) {
|
|
3575
|
+
return q(e, Object.assign({}, r.settings.characterReferences, { subset: Bn }));
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
//#endregion
|
|
3579
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js
|
|
3580
|
+
function Hn(e, t, n, r) {
|
|
3581
|
+
return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
|
|
3582
|
+
}
|
|
3583
|
+
//#endregion
|
|
3584
|
+
//#region ../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
|
|
3585
|
+
function Un(e, t) {
|
|
3586
|
+
let n = String(e);
|
|
3587
|
+
if (typeof t != "string") throw TypeError("Expected character");
|
|
3588
|
+
let r = 0, i = n.indexOf(t);
|
|
3589
|
+
for (; i !== -1;) r++, i = n.indexOf(t, i + t.length);
|
|
3590
|
+
return r;
|
|
3591
|
+
}
|
|
3592
|
+
//#endregion
|
|
3593
|
+
//#region ../../node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js
|
|
3594
|
+
function Wn(e, t) {
|
|
3595
|
+
let n = t || {};
|
|
3596
|
+
return (e[e.length - 1] === "" ? [...e, ""] : e).join((n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")).trim();
|
|
3597
|
+
}
|
|
3598
|
+
//#endregion
|
|
3599
|
+
//#region ../../node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
|
|
3600
|
+
function Gn(e) {
|
|
3601
|
+
return e.join(" ").trim();
|
|
3602
|
+
}
|
|
3603
|
+
//#endregion
|
|
3604
|
+
//#region ../../node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js
|
|
3605
|
+
var Kn = /[ \t\n\f\r]/g;
|
|
3606
|
+
function qn(e) {
|
|
3607
|
+
return typeof e == "object" ? e.type === "text" && Jn(e.value) : Jn(e);
|
|
3608
|
+
}
|
|
3609
|
+
function Jn(e) {
|
|
3610
|
+
return e.replace(Kn, "") === "";
|
|
3611
|
+
}
|
|
3612
|
+
//#endregion
|
|
3613
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js
|
|
3614
|
+
var J = Zn(1), Yn = Zn(-1), Xn = [];
|
|
3615
|
+
function Zn(e) {
|
|
3616
|
+
return t;
|
|
3617
|
+
function t(t, n, r) {
|
|
3618
|
+
let i = t ? t.children : Xn, a = (n || 0) + e, o = i[a];
|
|
3619
|
+
if (!r) for (; o && qn(o);) a += e, o = i[a];
|
|
3620
|
+
return o;
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
//#endregion
|
|
3624
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js
|
|
3625
|
+
var Qn = {}.hasOwnProperty;
|
|
3626
|
+
function $n(e) {
|
|
3627
|
+
return t;
|
|
3628
|
+
function t(t, n, r) {
|
|
3629
|
+
return Qn.call(e, t.tagName) && e[t.tagName](t, n, r);
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
//#endregion
|
|
3633
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js
|
|
3634
|
+
var er = $n({
|
|
3635
|
+
body: rr,
|
|
3636
|
+
caption: tr,
|
|
3637
|
+
colgroup: tr,
|
|
3638
|
+
dd: sr,
|
|
3639
|
+
dt: or,
|
|
3640
|
+
head: tr,
|
|
3641
|
+
html: nr,
|
|
3642
|
+
li: ar,
|
|
3643
|
+
optgroup: lr,
|
|
3644
|
+
option: ur,
|
|
3645
|
+
p: ir,
|
|
3646
|
+
rp: cr,
|
|
3647
|
+
rt: cr,
|
|
3648
|
+
tbody: fr,
|
|
3649
|
+
td: hr,
|
|
3650
|
+
tfoot: pr,
|
|
3651
|
+
th: hr,
|
|
3652
|
+
thead: dr,
|
|
3653
|
+
tr: mr
|
|
3654
|
+
});
|
|
3655
|
+
function tr(e, t, n) {
|
|
3656
|
+
let r = J(n, t, !0);
|
|
3657
|
+
return !r || r.type !== "comment" && !(r.type === "text" && qn(r.value.charAt(0)));
|
|
3658
|
+
}
|
|
3659
|
+
function nr(e, t, n) {
|
|
3660
|
+
let r = J(n, t);
|
|
3661
|
+
return !r || r.type !== "comment";
|
|
3662
|
+
}
|
|
3663
|
+
function rr(e, t, n) {
|
|
3664
|
+
let r = J(n, t);
|
|
3665
|
+
return !r || r.type !== "comment";
|
|
3666
|
+
}
|
|
3667
|
+
function ir(e, t, n) {
|
|
3668
|
+
let r = J(n, t);
|
|
3669
|
+
return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || n.type !== "element" || n.tagName !== "a" && n.tagName !== "audio" && n.tagName !== "del" && n.tagName !== "ins" && n.tagName !== "map" && n.tagName !== "noscript" && n.tagName !== "video";
|
|
3670
|
+
}
|
|
3671
|
+
function ar(e, t, n) {
|
|
3672
|
+
let r = J(n, t);
|
|
3673
|
+
return !r || r.type === "element" && r.tagName === "li";
|
|
3674
|
+
}
|
|
3675
|
+
function or(e, t, n) {
|
|
3676
|
+
let r = J(n, t);
|
|
3677
|
+
return !(!r || r.type !== "element" || r.tagName !== "dt" && r.tagName !== "dd");
|
|
3678
|
+
}
|
|
3679
|
+
function sr(e, t, n) {
|
|
3680
|
+
let r = J(n, t);
|
|
3681
|
+
return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
|
|
3682
|
+
}
|
|
3683
|
+
function cr(e, t, n) {
|
|
3684
|
+
let r = J(n, t);
|
|
3685
|
+
return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
|
|
3686
|
+
}
|
|
3687
|
+
function lr(e, t, n) {
|
|
3688
|
+
let r = J(n, t);
|
|
3689
|
+
return !r || r.type === "element" && r.tagName === "optgroup";
|
|
3690
|
+
}
|
|
3691
|
+
function ur(e, t, n) {
|
|
3692
|
+
let r = J(n, t);
|
|
3693
|
+
return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
|
|
3694
|
+
}
|
|
3695
|
+
function dr(e, t, n) {
|
|
3696
|
+
let r = J(n, t);
|
|
3697
|
+
return !(!r || r.type !== "element" || r.tagName !== "tbody" && r.tagName !== "tfoot");
|
|
3698
|
+
}
|
|
3699
|
+
function fr(e, t, n) {
|
|
3700
|
+
let r = J(n, t);
|
|
3701
|
+
return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
|
|
3702
|
+
}
|
|
3703
|
+
function pr(e, t, n) {
|
|
3704
|
+
return !J(n, t);
|
|
3705
|
+
}
|
|
3706
|
+
function mr(e, t, n) {
|
|
3707
|
+
let r = J(n, t);
|
|
3708
|
+
return !r || r.type === "element" && r.tagName === "tr";
|
|
3709
|
+
}
|
|
3710
|
+
function hr(e, t, n) {
|
|
3711
|
+
let r = J(n, t);
|
|
3712
|
+
return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
|
|
3713
|
+
}
|
|
3714
|
+
//#endregion
|
|
3715
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js
|
|
3716
|
+
var gr = $n({
|
|
3717
|
+
body: yr,
|
|
3718
|
+
colgroup: br,
|
|
3719
|
+
head: vr,
|
|
3720
|
+
html: _r,
|
|
3721
|
+
tbody: xr
|
|
3722
|
+
});
|
|
3723
|
+
function _r(e) {
|
|
3724
|
+
let t = J(e, -1);
|
|
3725
|
+
return !t || t.type !== "comment";
|
|
3726
|
+
}
|
|
3727
|
+
function vr(e) {
|
|
3728
|
+
let t = /* @__PURE__ */ new Set();
|
|
3729
|
+
for (let n of e.children) if (n.type === "element" && (n.tagName === "base" || n.tagName === "title")) {
|
|
3730
|
+
if (t.has(n.tagName)) return !1;
|
|
3731
|
+
t.add(n.tagName);
|
|
3732
|
+
}
|
|
3733
|
+
let n = e.children[0];
|
|
3734
|
+
return !n || n.type === "element";
|
|
3735
|
+
}
|
|
3736
|
+
function yr(e) {
|
|
3737
|
+
let t = J(e, -1, !0);
|
|
3738
|
+
return !t || t.type !== "comment" && !(t.type === "text" && qn(t.value.charAt(0))) && (t.type !== "element" || t.tagName !== "meta" && t.tagName !== "link" && t.tagName !== "script" && t.tagName !== "style" && t.tagName !== "template");
|
|
3739
|
+
}
|
|
3740
|
+
function br(e, t, n) {
|
|
3741
|
+
let r = Yn(n, t), i = J(e, -1, !0);
|
|
3742
|
+
return n && r && r.type === "element" && r.tagName === "colgroup" && er(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "col");
|
|
3743
|
+
}
|
|
3744
|
+
function xr(e, t, n) {
|
|
3745
|
+
let r = Yn(n, t), i = J(e, -1);
|
|
3746
|
+
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && er(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "tr");
|
|
3747
|
+
}
|
|
3748
|
+
//#endregion
|
|
3749
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js
|
|
3750
|
+
var Sr = {
|
|
3751
|
+
name: [[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")], ["\0 \n\f\r \"&'/<=>".split(""), "\0 \n\f\r \"&'/<=>`".split("")]],
|
|
3752
|
+
unquoted: [[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")], ["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]],
|
|
3753
|
+
single: [["&'".split(""), "\"&'`".split("")], ["\0&'".split(""), "\0\"&'`".split("")]],
|
|
3754
|
+
double: [["\"&".split(""), "\"&'`".split("")], ["\0\"&".split(""), "\0\"&'`".split("")]]
|
|
3755
|
+
};
|
|
3756
|
+
function Cr(e, t, n, r) {
|
|
3757
|
+
let i = r.schema, a = i.space !== "svg" && r.settings.omitOptionalTags, o = i.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(e.tagName.toLowerCase()), s = [], c;
|
|
3758
|
+
i.space === "html" && e.tagName === "svg" && (r.schema = mn);
|
|
3759
|
+
let l = wr(r, e.properties), u = r.all(i.space === "html" && e.tagName === "template" ? e.content : e);
|
|
3760
|
+
return r.schema = i, u && (o = !1), (l || !a || !gr(e, t, n)) && (s.push("<", e.tagName, l ? " " + l : ""), o && (i.space === "svg" || r.settings.closeSelfClosing) && (c = l.charAt(l.length - 1), (!r.settings.tightSelfClosing || c === "/" || c && c !== "\"" && c !== "'") && s.push(" "), s.push("/")), s.push(">")), s.push(u), !o && (!a || !er(e, t, n)) && s.push("</" + e.tagName + ">"), s.join("");
|
|
3761
|
+
}
|
|
3762
|
+
function wr(e, t) {
|
|
3763
|
+
let n = [], r = -1, i;
|
|
3764
|
+
if (t) {
|
|
3765
|
+
for (i in t) if (t[i] !== null && t[i] !== void 0) {
|
|
3766
|
+
let r = Tr(e, i, t[i]);
|
|
3767
|
+
r && n.push(r);
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
for (; ++r < n.length;) {
|
|
3771
|
+
let t = e.settings.tightAttributes ? n[r].charAt(n[r].length - 1) : void 0;
|
|
3772
|
+
r !== n.length - 1 && t !== "\"" && t !== "'" && (n[r] += " ");
|
|
3773
|
+
}
|
|
3774
|
+
return n.join("");
|
|
3775
|
+
}
|
|
3776
|
+
function Tr(e, t, n) {
|
|
3777
|
+
let r = un(e.schema, t), i = e.settings.allowParseErrors && e.schema.space === "html" ? 0 : 1, a = +!e.settings.allowDangerousCharacters, o = e.quote, s;
|
|
3778
|
+
if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n)) return "";
|
|
3779
|
+
let c = q(r.attribute, Object.assign({}, e.settings.characterReferences, { subset: Sr.name[i][a] }));
|
|
3780
|
+
return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? Wn : Gn)(n, { padLeft: !e.settings.tightCommaSeparatedLists }) : String(n), e.settings.collapseEmptyAttributes && !n) ? c : (e.settings.preferUnquoted && (s = q(n, Object.assign({}, e.settings.characterReferences, {
|
|
3781
|
+
attribute: !0,
|
|
3782
|
+
subset: Sr.unquoted[i][a]
|
|
3783
|
+
}))), s !== n && (e.settings.quoteSmart && Un(n, o) > Un(n, e.alternative) && (o = e.alternative), s = o + q(n, Object.assign({}, e.settings.characterReferences, {
|
|
3784
|
+
subset: (o === "'" ? Sr.single : Sr.double)[i][a],
|
|
3785
|
+
attribute: !0
|
|
3786
|
+
})) + o), c + (s && "=" + s));
|
|
3787
|
+
}
|
|
3788
|
+
//#endregion
|
|
3789
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js
|
|
3790
|
+
var Er = ["<", "&"];
|
|
3791
|
+
function Dr(e, t, n, r) {
|
|
3792
|
+
return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? e.value : q(e.value, Object.assign({}, r.settings.characterReferences, { subset: Er }));
|
|
3793
|
+
}
|
|
3794
|
+
//#endregion
|
|
3795
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js
|
|
3796
|
+
function Or(e, t, n, r) {
|
|
3797
|
+
return r.settings.allowDangerousHtml ? e.value : Dr(e, t, n, r);
|
|
3798
|
+
}
|
|
3799
|
+
//#endregion
|
|
3800
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js
|
|
3801
|
+
function kr(e, t, n, r) {
|
|
3802
|
+
return r.all(e);
|
|
3803
|
+
}
|
|
3804
|
+
//#endregion
|
|
3805
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js
|
|
3806
|
+
var Ar = gn("type", {
|
|
3807
|
+
invalid: jr,
|
|
3808
|
+
unknown: Mr,
|
|
3809
|
+
handlers: {
|
|
3810
|
+
comment: Vn,
|
|
3811
|
+
doctype: Hn,
|
|
3812
|
+
element: Cr,
|
|
3813
|
+
raw: Or,
|
|
3814
|
+
root: kr,
|
|
3815
|
+
text: Dr
|
|
3816
|
+
}
|
|
3817
|
+
});
|
|
3818
|
+
function jr(e) {
|
|
3819
|
+
throw Error("Expected node, not `" + e + "`");
|
|
3820
|
+
}
|
|
3821
|
+
function Mr(e) {
|
|
3822
|
+
throw Error("Cannot compile unknown node `" + e.type + "`");
|
|
3823
|
+
}
|
|
3824
|
+
//#endregion
|
|
3825
|
+
//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js
|
|
3826
|
+
var Nr = {}, Pr = {}, Fr = [];
|
|
3827
|
+
function Ir(e, t) {
|
|
3828
|
+
let n = t || Nr, r = n.quote || "\"", i = r === "\"" ? "'" : "\"";
|
|
3829
|
+
if (r !== "\"" && r !== "'") throw Error("Invalid quote `" + r + "`, expected `'` or `\"`");
|
|
3830
|
+
return {
|
|
3831
|
+
one: Lr,
|
|
3832
|
+
all: Rr,
|
|
3833
|
+
settings: {
|
|
3834
|
+
omitOptionalTags: n.omitOptionalTags || !1,
|
|
3835
|
+
allowParseErrors: n.allowParseErrors || !1,
|
|
3836
|
+
allowDangerousCharacters: n.allowDangerousCharacters || !1,
|
|
3837
|
+
quoteSmart: n.quoteSmart || !1,
|
|
3838
|
+
preferUnquoted: n.preferUnquoted || !1,
|
|
3839
|
+
tightAttributes: n.tightAttributes || !1,
|
|
3840
|
+
upperDoctype: n.upperDoctype || !1,
|
|
3841
|
+
tightDoctype: n.tightDoctype || !1,
|
|
3842
|
+
bogusComments: n.bogusComments || !1,
|
|
3843
|
+
tightCommaSeparatedLists: n.tightCommaSeparatedLists || !1,
|
|
3844
|
+
tightSelfClosing: n.tightSelfClosing || !1,
|
|
3845
|
+
collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
|
|
3846
|
+
allowDangerousHtml: n.allowDangerousHtml || !1,
|
|
3847
|
+
voids: n.voids || Ut,
|
|
3848
|
+
characterReferences: n.characterReferences || Pr,
|
|
3849
|
+
closeSelfClosing: n.closeSelfClosing || !1,
|
|
3850
|
+
closeEmptyElements: n.closeEmptyElements || !1
|
|
3851
|
+
},
|
|
3852
|
+
schema: n.space === "svg" ? mn : pn,
|
|
3853
|
+
quote: r,
|
|
3854
|
+
alternative: i
|
|
3855
|
+
}.one(Array.isArray(e) ? {
|
|
3856
|
+
type: "root",
|
|
3857
|
+
children: e
|
|
3858
|
+
} : e, void 0, void 0);
|
|
3859
|
+
}
|
|
3860
|
+
function Lr(e, t, n) {
|
|
3861
|
+
return Ar(e, t, n, this);
|
|
3862
|
+
}
|
|
3863
|
+
function Rr(e) {
|
|
3864
|
+
let t = [], n = e && e.children || Fr, r = -1;
|
|
3865
|
+
for (; ++r < n.length;) t[r] = this.one(n[r], r, e);
|
|
3866
|
+
return t.join("");
|
|
3867
|
+
}
|
|
3868
|
+
//#endregion
|
|
3869
|
+
//#region ../../node_modules/.pnpm/@shikijs+core@4.4.3/node_modules/@shikijs/core/dist/index.mjs
|
|
3870
|
+
var zr = /\s+/g;
|
|
3871
|
+
function Br(e, t) {
|
|
3872
|
+
if (!t) return e;
|
|
3873
|
+
e.properties ||= {}, e.properties.class ||= [], typeof e.properties.class == "string" && (e.properties.class = e.properties.class.split(zr)), Array.isArray(e.properties.class) || (e.properties.class = []);
|
|
3874
|
+
let n = Array.isArray(t) ? t : t.split(zr);
|
|
3875
|
+
for (let t of n) t && !e.properties.class.includes(t) && e.properties.class.push(t);
|
|
3876
|
+
return e;
|
|
3877
|
+
}
|
|
3878
|
+
var Vr = /:?lang=["']([^"']+)["']/g, Hr = /(?:```|~~~)([\w-]+)/g, Ur = /\\begin\{([\w-]+)\}/g, Wr = /<script\s+(?:type|lang)=["']([^"']+)["']/gi, Gr = /^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;
|
|
3879
|
+
function Kr(e) {
|
|
3880
|
+
let t = M(e, !0).map(([e]) => e);
|
|
3881
|
+
function n(n) {
|
|
3882
|
+
if (n === e.length) return {
|
|
3883
|
+
line: t.length - 1,
|
|
3884
|
+
character: t.at(-1).length
|
|
3885
|
+
};
|
|
3886
|
+
let r = n, i = 0;
|
|
3887
|
+
for (let e of t) {
|
|
3888
|
+
if (r < e.length) break;
|
|
3889
|
+
r -= e.length, i++;
|
|
3890
|
+
}
|
|
3891
|
+
return {
|
|
3892
|
+
line: i,
|
|
3893
|
+
character: r
|
|
3894
|
+
};
|
|
3895
|
+
}
|
|
3896
|
+
function r(e, n) {
|
|
3897
|
+
let r = 0;
|
|
3898
|
+
for (let n = 0; n < e; n++) r += t[n].length;
|
|
3899
|
+
return r += n, r;
|
|
3900
|
+
}
|
|
3901
|
+
return {
|
|
3902
|
+
lines: t,
|
|
3903
|
+
indexToPos: n,
|
|
3904
|
+
posToIndex: r
|
|
3905
|
+
};
|
|
3906
|
+
}
|
|
3907
|
+
function qr(e, t, n) {
|
|
3908
|
+
let r = /* @__PURE__ */ new Set();
|
|
3909
|
+
for (let t of e.matchAll(Vr)) {
|
|
3910
|
+
let e = t[1].toLowerCase().trim();
|
|
3911
|
+
e && r.add(e);
|
|
3912
|
+
}
|
|
3913
|
+
for (let t of e.matchAll(Hr)) {
|
|
3914
|
+
let e = t[1].toLowerCase().trim();
|
|
3915
|
+
e && r.add(e);
|
|
3916
|
+
}
|
|
3917
|
+
for (let t of e.matchAll(Ur)) {
|
|
3918
|
+
let e = t[1].toLowerCase().trim();
|
|
3919
|
+
e && r.add(e);
|
|
3920
|
+
}
|
|
3921
|
+
for (let t of e.matchAll(Wr)) {
|
|
3922
|
+
let e = t[1].toLowerCase().trim(), n = e.includes("/") ? e.split("/").pop() : e;
|
|
3923
|
+
n && r.add(n);
|
|
3924
|
+
}
|
|
3925
|
+
if (Gr.test(e) && r.add("yaml"), !n) return [...r];
|
|
3926
|
+
let i = n.getBundledLanguages();
|
|
3927
|
+
return [...r].filter((e) => e && i[e]);
|
|
3928
|
+
}
|
|
3929
|
+
var Jr = ["color", "background-color"];
|
|
3930
|
+
function Yr(e, t) {
|
|
3931
|
+
let n = 0, r = [];
|
|
3932
|
+
for (let i of t) i > n && r.push({
|
|
3933
|
+
...e,
|
|
3934
|
+
content: e.content.slice(n, i),
|
|
3935
|
+
offset: e.offset + n
|
|
3936
|
+
}), n = i;
|
|
3937
|
+
return n < e.content.length && r.push({
|
|
3938
|
+
...e,
|
|
3939
|
+
content: e.content.slice(n),
|
|
3940
|
+
offset: e.offset + n
|
|
3941
|
+
}), r;
|
|
3942
|
+
}
|
|
3943
|
+
function Xr(e, t) {
|
|
3944
|
+
let n = 0, r = e.length;
|
|
3945
|
+
for (; n < r;) {
|
|
3946
|
+
let i = n + (r - n >> 1);
|
|
3947
|
+
e[i] <= t ? n = i + 1 : r = i;
|
|
3948
|
+
}
|
|
3949
|
+
return n;
|
|
3950
|
+
}
|
|
3951
|
+
function Zr(e, t) {
|
|
3952
|
+
let n = [...t instanceof Set ? t : new Set(t)].sort((e, t) => e - t);
|
|
3953
|
+
return n.length ? e.map((e) => e.flatMap((e) => {
|
|
3954
|
+
let t = e.offset + e.content.length, r = Xr(n, e.offset), i = r;
|
|
3955
|
+
for (; i < n.length && n[i] < t;) i++;
|
|
3956
|
+
if (r === i) return e;
|
|
3957
|
+
let a = n.slice(r, i);
|
|
3958
|
+
for (let t = 0; t < a.length; t++) a[t] -= e.offset;
|
|
3959
|
+
return Yr(e, a);
|
|
3960
|
+
})) : e;
|
|
3961
|
+
}
|
|
3962
|
+
function Qr(e, n, r, i, a = "css-vars") {
|
|
3963
|
+
let o = {
|
|
3964
|
+
content: e.content,
|
|
3965
|
+
explanation: e.explanation,
|
|
3966
|
+
offset: e.offset
|
|
3967
|
+
}, s = n.map((t) => Y(e.variants[t])), c = new Set(s.flatMap((e) => Object.keys(e))), l = {}, u = (e, t) => {
|
|
3968
|
+
let i = t === "color" ? "" : t === "background-color" ? "-bg" : `-${t}`;
|
|
3969
|
+
return r + n[e] + (t === "color" ? "" : i);
|
|
3970
|
+
};
|
|
3971
|
+
return s.forEach((e, r) => {
|
|
3972
|
+
for (let o of c) {
|
|
3973
|
+
let c = e[o] || "inherit";
|
|
3974
|
+
if (r === 0 && i && Jr.includes(o)) {
|
|
3975
|
+
if (i === "light-dark()" && s.length > 1) {
|
|
3976
|
+
let e = n.findIndex((e) => e === "light"), i = n.findIndex((e) => e === "dark");
|
|
3977
|
+
if (e === -1 || i === -1) throw new t("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
|
|
3978
|
+
let d = s[e][o] || "inherit", f = s[i][o] || "inherit";
|
|
3979
|
+
l[o] = `light-dark(${d}, ${f})`, a === "css-vars" && (l[u(r, o)] = c);
|
|
3980
|
+
} else l[o] = c;
|
|
3981
|
+
} else a === "css-vars" && (l[u(r, o)] = c);
|
|
3982
|
+
}
|
|
3983
|
+
}), o.htmlStyle = l, o;
|
|
3984
|
+
}
|
|
3985
|
+
function Y(e) {
|
|
3986
|
+
let t = {};
|
|
3987
|
+
if (e.color && (t.color = e.color), e.bgColor && (t["background-color"] = e.bgColor), e.fontStyle) {
|
|
3988
|
+
e.fontStyle & y.Italic && (t["font-style"] = "italic"), e.fontStyle & y.Bold && (t["font-weight"] = "bold");
|
|
3989
|
+
let n = [];
|
|
3990
|
+
e.fontStyle & y.Underline && n.push("underline"), e.fontStyle & y.Strikethrough && n.push("line-through"), n.length && (t["text-decoration"] = n.join(" "));
|
|
3991
|
+
}
|
|
3992
|
+
return t;
|
|
3993
|
+
}
|
|
3994
|
+
function $r(e) {
|
|
3995
|
+
return typeof e == "string" ? e : Object.entries(e).map(([e, t]) => `${e}:${t}`).join(";");
|
|
3996
|
+
}
|
|
3997
|
+
function ei() {
|
|
3998
|
+
let e = /* @__PURE__ */ new WeakMap();
|
|
3999
|
+
function n(n) {
|
|
4000
|
+
if (!e.has(n.meta)) {
|
|
4001
|
+
let r = Kr(n.source);
|
|
4002
|
+
function i(e) {
|
|
4003
|
+
if (typeof e == "number") {
|
|
4004
|
+
if (e < 0 || e > n.source.length) throw new t(`Invalid decoration offset: ${e}. Code length: ${n.source.length}`);
|
|
4005
|
+
return {
|
|
4006
|
+
...r.indexToPos(e),
|
|
4007
|
+
offset: e
|
|
4008
|
+
};
|
|
4009
|
+
}
|
|
4010
|
+
{
|
|
4011
|
+
let n = r.lines[e.line];
|
|
4012
|
+
if (n === void 0) throw new t(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);
|
|
4013
|
+
let i = e.character;
|
|
4014
|
+
if (i < 0 && (i = n.length + i), i < 0 || i > n.length) throw new t(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${n.length}`);
|
|
4015
|
+
return {
|
|
4016
|
+
...e,
|
|
4017
|
+
character: i,
|
|
4018
|
+
offset: r.posToIndex(e.line, i)
|
|
4019
|
+
};
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
let a = (n.options.decorations || []).map((e) => ({
|
|
4023
|
+
...e,
|
|
4024
|
+
start: i(e.start),
|
|
4025
|
+
end: i(e.end)
|
|
4026
|
+
}));
|
|
4027
|
+
ti(a), e.set(n.meta, {
|
|
4028
|
+
decorations: a,
|
|
4029
|
+
converter: r,
|
|
4030
|
+
source: n.source
|
|
4031
|
+
});
|
|
4032
|
+
}
|
|
4033
|
+
return e.get(n.meta);
|
|
4034
|
+
}
|
|
4035
|
+
return {
|
|
4036
|
+
name: "shiki:decorations",
|
|
4037
|
+
tokens(e) {
|
|
4038
|
+
if (this.options.decorations?.length) return Zr(e, n(this).decorations.flatMap((e) => [e.start.offset, e.end.offset]));
|
|
4039
|
+
},
|
|
4040
|
+
code(e) {
|
|
4041
|
+
if (!this.options.decorations?.length) return;
|
|
4042
|
+
let r = n(this), i = [...e.children].filter((e) => e.type === "element" && e.tagName === "span");
|
|
4043
|
+
if (i.length !== r.converter.lines.length) throw new t(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
|
|
4044
|
+
function a(e, n, r, a) {
|
|
4045
|
+
let o = i[e], c = "", l = -1, u = -1;
|
|
4046
|
+
if (n === 0 && (l = 0), r === 0 && (u = 0), r === Infinity && (u = o.children.length), l === -1 || u === -1) for (let e = 0; e < o.children.length; e++) c += ni(o.children[e]), l === -1 && c.length === n && (l = e + 1), u === -1 && c.length === r && (u = e + 1);
|
|
4047
|
+
if (l === -1) throw new t(`Failed to find start index for decoration ${JSON.stringify(a.start)}`);
|
|
4048
|
+
if (u === -1) throw new t(`Failed to find end index for decoration ${JSON.stringify(a.end)}`);
|
|
4049
|
+
let d = o.children.slice(l, u);
|
|
4050
|
+
if (!a.alwaysWrap && d.length === o.children.length) s(o, a, "line");
|
|
4051
|
+
else if (!a.alwaysWrap && d.length === 1 && d[0].type === "element") s(d[0], a, "token");
|
|
4052
|
+
else {
|
|
4053
|
+
let e = {
|
|
4054
|
+
type: "element",
|
|
4055
|
+
tagName: "span",
|
|
4056
|
+
properties: {},
|
|
4057
|
+
children: d
|
|
4058
|
+
};
|
|
4059
|
+
s(e, a, "wrapper"), o.children.splice(l, d.length, e);
|
|
4060
|
+
}
|
|
4061
|
+
}
|
|
4062
|
+
function o(e, t) {
|
|
4063
|
+
i[e] = s(i[e], t, "line");
|
|
4064
|
+
}
|
|
4065
|
+
function s(e, t, n) {
|
|
4066
|
+
let r = t.properties || {}, i = t.transform || ((e) => e);
|
|
4067
|
+
return e.tagName = t.tagName || "span", e.properties = {
|
|
4068
|
+
...e.properties,
|
|
4069
|
+
...r,
|
|
4070
|
+
class: e.properties.class
|
|
4071
|
+
}, t.properties?.class && Br(e, t.properties.class), e = i(e, n) || e, e;
|
|
4072
|
+
}
|
|
4073
|
+
let c = [], l = r.decorations.sort((e, t) => t.start.offset - e.start.offset || e.end.offset - t.end.offset);
|
|
4074
|
+
for (let e of l) {
|
|
4075
|
+
let { start: t, end: n } = e;
|
|
4076
|
+
if (t.line === n.line) a(t.line, t.character, n.character, e);
|
|
4077
|
+
else if (t.line < n.line) {
|
|
4078
|
+
a(t.line, t.character, Infinity, e);
|
|
4079
|
+
for (let r = t.line + 1; r < n.line; r++) c.unshift(() => o(r, e));
|
|
4080
|
+
a(n.line, 0, n.character, e);
|
|
4081
|
+
}
|
|
4082
|
+
}
|
|
4083
|
+
c.forEach((e) => e());
|
|
4084
|
+
}
|
|
4085
|
+
};
|
|
4086
|
+
}
|
|
4087
|
+
function ti(e) {
|
|
4088
|
+
for (let n = 0; n < e.length; n++) {
|
|
4089
|
+
let r = e[n];
|
|
4090
|
+
if (r.start.offset > r.end.offset) throw new t(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);
|
|
4091
|
+
for (let i = n + 1; i < e.length; i++) {
|
|
4092
|
+
let n = e[i], a = r.start.offset <= n.start.offset && n.start.offset < r.end.offset, o = r.start.offset < n.end.offset && n.end.offset <= r.end.offset, s = n.start.offset <= r.start.offset && r.start.offset < n.end.offset, c = n.start.offset < r.end.offset && r.end.offset <= n.end.offset;
|
|
4093
|
+
if (a || o || s || c) {
|
|
4094
|
+
if (a && o || s && c || s && r.start.offset === r.end.offset || o && n.start.offset === n.end.offset) continue;
|
|
4095
|
+
throw new t(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(n.start)} intersect.`);
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
}
|
|
4099
|
+
}
|
|
4100
|
+
function ni(e) {
|
|
4101
|
+
return e.type === "text" ? e.value : e.type === "element" ? e.children.map(ni).join("") : "";
|
|
4102
|
+
}
|
|
4103
|
+
var ri = [/* @__PURE__ */ ei()];
|
|
4104
|
+
function ii(e) {
|
|
4105
|
+
let t = ai(e.transformers || []);
|
|
4106
|
+
return [
|
|
4107
|
+
...t.pre,
|
|
4108
|
+
...t.normal,
|
|
4109
|
+
...t.post,
|
|
4110
|
+
...ri
|
|
4111
|
+
];
|
|
4112
|
+
}
|
|
4113
|
+
function ai(e) {
|
|
4114
|
+
let t = [], n = [], r = [];
|
|
4115
|
+
for (let i of e) switch (i.enforce) {
|
|
4116
|
+
case "pre":
|
|
4117
|
+
t.push(i);
|
|
4118
|
+
break;
|
|
4119
|
+
case "post":
|
|
4120
|
+
n.push(i);
|
|
4121
|
+
break;
|
|
4122
|
+
default: r.push(i);
|
|
4123
|
+
}
|
|
4124
|
+
return {
|
|
4125
|
+
pre: t,
|
|
4126
|
+
post: n,
|
|
4127
|
+
normal: r
|
|
4128
|
+
};
|
|
4129
|
+
}
|
|
4130
|
+
var X = [
|
|
4131
|
+
"black",
|
|
4132
|
+
"red",
|
|
4133
|
+
"green",
|
|
4134
|
+
"yellow",
|
|
4135
|
+
"blue",
|
|
4136
|
+
"magenta",
|
|
4137
|
+
"cyan",
|
|
4138
|
+
"white",
|
|
4139
|
+
"brightBlack",
|
|
4140
|
+
"brightRed",
|
|
4141
|
+
"brightGreen",
|
|
4142
|
+
"brightYellow",
|
|
4143
|
+
"brightBlue",
|
|
4144
|
+
"brightMagenta",
|
|
4145
|
+
"brightCyan",
|
|
4146
|
+
"brightWhite"
|
|
4147
|
+
], oi = {
|
|
4148
|
+
1: "bold",
|
|
4149
|
+
2: "dim",
|
|
4150
|
+
3: "italic",
|
|
4151
|
+
4: "underline",
|
|
4152
|
+
7: "reverse",
|
|
4153
|
+
8: "hidden",
|
|
4154
|
+
9: "strikethrough"
|
|
4155
|
+
};
|
|
4156
|
+
function si(e, t) {
|
|
4157
|
+
let n = e.indexOf("\x1B", t);
|
|
4158
|
+
if (n !== -1 && e[n + 1] === "[") {
|
|
4159
|
+
let t = e.indexOf("m", n);
|
|
4160
|
+
if (t !== -1) return {
|
|
4161
|
+
sequence: e.substring(n + 2, t).split(";"),
|
|
4162
|
+
startPosition: n,
|
|
4163
|
+
position: t + 1
|
|
4164
|
+
};
|
|
4165
|
+
}
|
|
4166
|
+
return { position: e.length };
|
|
4167
|
+
}
|
|
4168
|
+
function ci(e) {
|
|
4169
|
+
let t = e.shift();
|
|
4170
|
+
if (t === "2") {
|
|
4171
|
+
let t = e.splice(0, 3).map((e) => Number.parseInt(e));
|
|
4172
|
+
return t.length !== 3 || t.some((e) => Number.isNaN(e)) ? void 0 : {
|
|
4173
|
+
type: "rgb",
|
|
4174
|
+
rgb: t
|
|
4175
|
+
};
|
|
4176
|
+
}
|
|
4177
|
+
if (t === "5") {
|
|
4178
|
+
let t = e.shift();
|
|
4179
|
+
if (t) return {
|
|
4180
|
+
type: "table",
|
|
4181
|
+
index: Number(t)
|
|
4182
|
+
};
|
|
4183
|
+
}
|
|
4184
|
+
}
|
|
4185
|
+
function li(e) {
|
|
4186
|
+
let t = [];
|
|
4187
|
+
for (; e.length > 0;) {
|
|
4188
|
+
let n = e.shift();
|
|
4189
|
+
if (!n) continue;
|
|
4190
|
+
let r = Number.parseInt(n);
|
|
4191
|
+
if (!Number.isNaN(r)) {
|
|
4192
|
+
if (r === 0) t.push({ type: "resetAll" });
|
|
4193
|
+
else if (r <= 9) oi[r] && t.push({
|
|
4194
|
+
type: "setDecoration",
|
|
4195
|
+
value: oi[r]
|
|
4196
|
+
});
|
|
4197
|
+
else if (r <= 29) {
|
|
4198
|
+
let e = oi[r - 20];
|
|
4199
|
+
e && (t.push({
|
|
4200
|
+
type: "resetDecoration",
|
|
4201
|
+
value: e
|
|
4202
|
+
}), e === "dim" && t.push({
|
|
4203
|
+
type: "resetDecoration",
|
|
4204
|
+
value: "bold"
|
|
4205
|
+
}));
|
|
4206
|
+
} else if (r <= 37) t.push({
|
|
4207
|
+
type: "setForegroundColor",
|
|
4208
|
+
value: {
|
|
4209
|
+
type: "named",
|
|
4210
|
+
name: X[r - 30]
|
|
4211
|
+
}
|
|
4212
|
+
});
|
|
4213
|
+
else if (r === 38) {
|
|
4214
|
+
let n = ci(e);
|
|
4215
|
+
n && t.push({
|
|
4216
|
+
type: "setForegroundColor",
|
|
4217
|
+
value: n
|
|
4218
|
+
});
|
|
4219
|
+
} else if (r === 39) t.push({ type: "resetForegroundColor" });
|
|
4220
|
+
else if (r <= 47) t.push({
|
|
4221
|
+
type: "setBackgroundColor",
|
|
4222
|
+
value: {
|
|
4223
|
+
type: "named",
|
|
4224
|
+
name: X[r - 40]
|
|
4225
|
+
}
|
|
4226
|
+
});
|
|
4227
|
+
else if (r === 48) {
|
|
4228
|
+
let n = ci(e);
|
|
4229
|
+
n && t.push({
|
|
4230
|
+
type: "setBackgroundColor",
|
|
4231
|
+
value: n
|
|
4232
|
+
});
|
|
4233
|
+
} else r === 49 ? t.push({ type: "resetBackgroundColor" }) : r === 53 ? t.push({
|
|
4234
|
+
type: "setDecoration",
|
|
4235
|
+
value: "overline"
|
|
4236
|
+
}) : r === 55 ? t.push({
|
|
4237
|
+
type: "resetDecoration",
|
|
4238
|
+
value: "overline"
|
|
4239
|
+
}) : r >= 90 && r <= 97 ? t.push({
|
|
4240
|
+
type: "setForegroundColor",
|
|
4241
|
+
value: {
|
|
4242
|
+
type: "named",
|
|
4243
|
+
name: X[r - 90 + 8]
|
|
4244
|
+
}
|
|
4245
|
+
}) : r >= 100 && r <= 107 && t.push({
|
|
4246
|
+
type: "setBackgroundColor",
|
|
4247
|
+
value: {
|
|
4248
|
+
type: "named",
|
|
4249
|
+
name: X[r - 100 + 8]
|
|
4250
|
+
}
|
|
4251
|
+
});
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
return t;
|
|
4255
|
+
}
|
|
4256
|
+
function ui() {
|
|
4257
|
+
let e = null, t = null, n = /* @__PURE__ */ new Set();
|
|
4258
|
+
return { parse(r) {
|
|
4259
|
+
let i = [], a = 0;
|
|
4260
|
+
do {
|
|
4261
|
+
let o = si(r, a), s = o.sequence ? r.substring(a, o.startPosition) : r.substring(a);
|
|
4262
|
+
if (s.length > 0 && i.push({
|
|
4263
|
+
value: s,
|
|
4264
|
+
foreground: e,
|
|
4265
|
+
background: t,
|
|
4266
|
+
decorations: new Set(n)
|
|
4267
|
+
}), o.sequence) {
|
|
4268
|
+
let r = li(o.sequence);
|
|
4269
|
+
for (let i of r) i.type === "resetAll" ? (e = null, t = null, n.clear()) : i.type === "resetForegroundColor" ? e = null : i.type === "resetBackgroundColor" ? t = null : i.type === "resetDecoration" && n.delete(i.value);
|
|
4270
|
+
for (let i of r) i.type === "setForegroundColor" ? e = i.value : i.type === "setBackgroundColor" ? t = i.value : i.type === "setDecoration" && n.add(i.value);
|
|
4271
|
+
}
|
|
4272
|
+
a = o.position;
|
|
4273
|
+
} while (a < r.length);
|
|
4274
|
+
return i;
|
|
4275
|
+
} };
|
|
4276
|
+
}
|
|
4277
|
+
var di = {
|
|
4278
|
+
black: "#000000",
|
|
4279
|
+
red: "#bb0000",
|
|
4280
|
+
green: "#00bb00",
|
|
4281
|
+
yellow: "#bbbb00",
|
|
4282
|
+
blue: "#0000bb",
|
|
4283
|
+
magenta: "#ff00ff",
|
|
4284
|
+
cyan: "#00bbbb",
|
|
4285
|
+
white: "#eeeeee",
|
|
4286
|
+
brightBlack: "#555555",
|
|
4287
|
+
brightRed: "#ff5555",
|
|
4288
|
+
brightGreen: "#00ff00",
|
|
4289
|
+
brightYellow: "#ffff55",
|
|
4290
|
+
brightBlue: "#5555ff",
|
|
4291
|
+
brightMagenta: "#ff55ff",
|
|
4292
|
+
brightCyan: "#55ffff",
|
|
4293
|
+
brightWhite: "#ffffff"
|
|
4294
|
+
};
|
|
4295
|
+
function fi(e = di) {
|
|
4296
|
+
function t(t) {
|
|
4297
|
+
return e[t];
|
|
4298
|
+
}
|
|
4299
|
+
function n(e) {
|
|
4300
|
+
return `#${e.map((e) => Math.max(0, Math.min(e, 255)).toString(16).padStart(2, "0")).join("")}`;
|
|
4301
|
+
}
|
|
4302
|
+
let r;
|
|
4303
|
+
function i() {
|
|
4304
|
+
if (r) return r;
|
|
4305
|
+
r = [];
|
|
4306
|
+
for (let e = 0; e < X.length; e++) r.push(t(X[e]));
|
|
4307
|
+
let e = [
|
|
4308
|
+
0,
|
|
4309
|
+
95,
|
|
4310
|
+
135,
|
|
4311
|
+
175,
|
|
4312
|
+
215,
|
|
4313
|
+
255
|
|
4314
|
+
];
|
|
4315
|
+
for (let t = 0; t < 6; t++) for (let i = 0; i < 6; i++) for (let a = 0; a < 6; a++) r.push(n([
|
|
4316
|
+
e[t],
|
|
4317
|
+
e[i],
|
|
4318
|
+
e[a]
|
|
4319
|
+
]));
|
|
4320
|
+
let i = 8;
|
|
4321
|
+
for (let e = 0; e < 24; e++, i += 10) r.push(n([
|
|
4322
|
+
i,
|
|
4323
|
+
i,
|
|
4324
|
+
i
|
|
4325
|
+
]));
|
|
4326
|
+
return r;
|
|
4327
|
+
}
|
|
4328
|
+
function a(e) {
|
|
4329
|
+
return i()[e];
|
|
4330
|
+
}
|
|
4331
|
+
function o(e) {
|
|
4332
|
+
switch (e.type) {
|
|
4333
|
+
case "named": return t(e.name);
|
|
4334
|
+
case "rgb": return n(e.rgb);
|
|
4335
|
+
case "table": return a(e.index);
|
|
4336
|
+
}
|
|
4337
|
+
}
|
|
4338
|
+
return { value: o };
|
|
4339
|
+
}
|
|
4340
|
+
var pi = /#([0-9a-f]{3,8})/i, mi = /var\((--[\w-]+-ansi-[\w-]+)\)/, hi = {
|
|
4341
|
+
black: "#000000",
|
|
4342
|
+
red: "#cd3131",
|
|
4343
|
+
green: "#0DBC79",
|
|
4344
|
+
yellow: "#E5E510",
|
|
4345
|
+
blue: "#2472C8",
|
|
4346
|
+
magenta: "#BC3FBC",
|
|
4347
|
+
cyan: "#11A8CD",
|
|
4348
|
+
white: "#E5E5E5",
|
|
4349
|
+
brightBlack: "#666666",
|
|
4350
|
+
brightRed: "#F14C4C",
|
|
4351
|
+
brightGreen: "#23D18B",
|
|
4352
|
+
brightYellow: "#F5F543",
|
|
4353
|
+
brightBlue: "#3B8EEA",
|
|
4354
|
+
brightMagenta: "#D670D6",
|
|
4355
|
+
brightCyan: "#29B8DB",
|
|
4356
|
+
brightWhite: "#FFFFFF"
|
|
4357
|
+
};
|
|
4358
|
+
function gi(e, t, n) {
|
|
4359
|
+
let r = O(e, n), i = M(t), a = fi(Object.fromEntries(X.map((t) => {
|
|
4360
|
+
let n = `terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;
|
|
4361
|
+
return [t, e.colors?.[n] || hi[t]];
|
|
4362
|
+
}))), o = ui();
|
|
4363
|
+
return i.map((t) => o.parse(t[0]).map((n) => {
|
|
4364
|
+
let i, o;
|
|
4365
|
+
n.decorations.has("reverse") ? (i = n.background ? a.value(n.background) : e.bg, o = n.foreground ? a.value(n.foreground) : e.fg) : (i = n.foreground ? a.value(n.foreground) : e.fg, o = n.background ? a.value(n.background) : void 0), i = k(i, r), o = k(o, r), n.decorations.has("dim") && (i = _i(i));
|
|
4366
|
+
let s = y.None;
|
|
4367
|
+
return n.decorations.has("bold") && (s |= y.Bold), n.decorations.has("italic") && (s |= y.Italic), n.decorations.has("underline") && (s |= y.Underline), n.decorations.has("strikethrough") && (s |= y.Strikethrough), {
|
|
4368
|
+
content: n.value,
|
|
4369
|
+
offset: t[1],
|
|
4370
|
+
color: i,
|
|
4371
|
+
bgColor: o,
|
|
4372
|
+
fontStyle: s
|
|
4373
|
+
};
|
|
4374
|
+
}));
|
|
4375
|
+
}
|
|
4376
|
+
function _i(e) {
|
|
4377
|
+
let t = e.match(pi);
|
|
4378
|
+
if (t) {
|
|
4379
|
+
let e = t[1];
|
|
4380
|
+
if (e.length === 8) {
|
|
4381
|
+
let t = Math.round(Number.parseInt(e.slice(6, 8), 16) / 2).toString(16).padStart(2, "0");
|
|
4382
|
+
return `#${e.slice(0, 6)}${t}`;
|
|
4383
|
+
}
|
|
4384
|
+
if (e.length === 6) return `#${e}80`;
|
|
4385
|
+
if (e.length === 4) {
|
|
4386
|
+
let t = e[0], n = e[1], r = e[2], i = e[3];
|
|
4387
|
+
return `#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`, 16) / 2).toString(16).padStart(2, "0")}`;
|
|
4388
|
+
}
|
|
4389
|
+
if (e.length === 3) {
|
|
4390
|
+
let t = e[0], n = e[1], r = e[2];
|
|
4391
|
+
return `#${t}${t}${n}${n}${r}${r}80`;
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4394
|
+
let n = e.match(mi);
|
|
4395
|
+
return n ? `var(${n[1]}-dim)` : e;
|
|
4396
|
+
}
|
|
4397
|
+
function Z(e, t, n = {}) {
|
|
4398
|
+
let r = e.resolveLangAlias(n.lang || "text"), { theme: i = e.getLoadedThemes()[0] } = n;
|
|
4399
|
+
if (!A(r) && !j(i) && r === "ansi") {
|
|
4400
|
+
let { theme: r } = e.setTheme(i);
|
|
4401
|
+
return gi(r, t, n);
|
|
4402
|
+
}
|
|
4403
|
+
return Nt(e, t, n);
|
|
4404
|
+
}
|
|
4405
|
+
function Q(e, n, r) {
|
|
4406
|
+
let i, a, o, s, c, l;
|
|
4407
|
+
if ("themes" in r) {
|
|
4408
|
+
let { defaultColor: u = "light", cssVariablePrefix: d = "--shiki-", colorsRendering: f = "css-vars" } = r, p = Object.entries(r.themes).filter((e) => e[1]).map((e) => ({
|
|
4409
|
+
color: e[0],
|
|
4410
|
+
theme: e[1]
|
|
4411
|
+
})).sort((e, t) => e.color === u ? -1 : +(t.color === u));
|
|
4412
|
+
if (p.length === 0) throw new t("`themes` option must not be empty");
|
|
4413
|
+
let m = I(e, n, r, Z);
|
|
4414
|
+
if (l = P(m), u && u !== "light-dark()" && !p.some((e) => e.color === u)) throw new t(`\`themes\` option must contain the defaultColor key \`${u}\``);
|
|
4415
|
+
let h = p.map((t) => e.getTheme(t.theme)), g = p.map((e) => e.color);
|
|
4416
|
+
o = m.map((e) => e.map((e) => Qr(e, g, d, u, f))), l && Ot(o, l);
|
|
4417
|
+
let _ = p.map((e) => O(e.theme, r));
|
|
4418
|
+
a = vi(p, h, _, d, u, "fg", f), i = vi(p, h, _, d, u, "bg", f), s = `shiki-themes ${h.map((e) => e.name).join(" ")}`, c = u ? void 0 : [a, i].join(";");
|
|
4419
|
+
} else if ("theme" in r) {
|
|
4420
|
+
let t = O(r.theme, r);
|
|
4421
|
+
o = Z(e, n, r);
|
|
4422
|
+
let c = e.getTheme(r.theme);
|
|
4423
|
+
i = k(c.bg, t), a = k(c.fg, t), s = c.name, l = P(o);
|
|
4424
|
+
} else throw new t("Invalid options, either `theme` or `themes` must be provided");
|
|
4425
|
+
return {
|
|
4426
|
+
tokens: o,
|
|
4427
|
+
fg: a,
|
|
4428
|
+
bg: i,
|
|
4429
|
+
themeName: s,
|
|
4430
|
+
rootStyle: c,
|
|
4431
|
+
grammarState: l
|
|
4432
|
+
};
|
|
4433
|
+
}
|
|
4434
|
+
function vi(e, n, r, i, a, o, s) {
|
|
4435
|
+
return e.map((c, l) => {
|
|
4436
|
+
let u = k(n[l][o], r[l]) || "inherit", d = `${i + c.color}${o === "bg" ? "-bg" : ""}:${u}`;
|
|
4437
|
+
if (l === 0 && a) {
|
|
4438
|
+
if (a === "light-dark()" && e.length > 1) {
|
|
4439
|
+
let i = e.findIndex((e) => e.color === "light"), a = e.findIndex((e) => e.color === "dark");
|
|
4440
|
+
if (i === -1 || a === -1) throw new t("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
|
|
4441
|
+
return `light-dark(${k(n[i][o], r[i]) || "inherit"}, ${k(n[a][o], r[a]) || "inherit"});${d}`;
|
|
4442
|
+
}
|
|
4443
|
+
return u;
|
|
4444
|
+
}
|
|
4445
|
+
return s === "css-vars" ? d : null;
|
|
4446
|
+
}).filter((e) => !!e).join(";");
|
|
4447
|
+
}
|
|
4448
|
+
var yi = /^\s+$/, bi = /^(\s*)(.*?)(\s*)$/;
|
|
4449
|
+
function $(e, t, n, r = {
|
|
4450
|
+
meta: {},
|
|
4451
|
+
options: n,
|
|
4452
|
+
codeToHast: (t, n) => $(e, t, n),
|
|
4453
|
+
codeToTokens: (t, n) => Q(e, t, n)
|
|
4454
|
+
}) {
|
|
4455
|
+
let i = t;
|
|
4456
|
+
for (let e of ii(n)) i = e.preprocess?.call(r, i, n) || i;
|
|
4457
|
+
let { tokens: a, fg: o, bg: s, themeName: c, rootStyle: l, grammarState: u } = Q(e, i, n), { mergeWhitespaces: d = !0, mergeSameStyleTokens: f = !1 } = n;
|
|
4458
|
+
d === !0 ? a = Si(a) : d === "never" && (a = Ci(a)), f && (a = wi(a));
|
|
4459
|
+
let p = {
|
|
4460
|
+
...r,
|
|
4461
|
+
get source() {
|
|
4462
|
+
return i;
|
|
4463
|
+
}
|
|
4464
|
+
};
|
|
4465
|
+
for (let e of ii(n)) a = e.tokens?.call(p, a) || a;
|
|
4466
|
+
return xi(a, {
|
|
4467
|
+
...n,
|
|
4468
|
+
fg: o,
|
|
4469
|
+
bg: s,
|
|
4470
|
+
themeName: c,
|
|
4471
|
+
rootStyle: n.rootStyle === !1 ? !1 : n.rootStyle ?? l
|
|
4472
|
+
}, p, u);
|
|
4473
|
+
}
|
|
4474
|
+
function xi(e, t, n, r = P(e)) {
|
|
4475
|
+
let i = ii(t), a = [], o = {
|
|
4476
|
+
type: "root",
|
|
4477
|
+
children: []
|
|
4478
|
+
}, { structure: s = "classic", tabindex: c = "0" } = t, l = { class: `shiki ${t.themeName || ""}` };
|
|
4479
|
+
t.rootStyle !== !1 && (l.style = t.rootStyle == null ? `background-color:${t.bg};color:${t.fg}` : t.rootStyle), c !== !1 && c != null && (l.tabindex = c.toString());
|
|
4480
|
+
for (let [e, n] of Object.entries(t.meta || {})) e.startsWith("_") || (l[e] = n);
|
|
4481
|
+
let u = {
|
|
4482
|
+
type: "element",
|
|
4483
|
+
tagName: "pre",
|
|
4484
|
+
properties: l,
|
|
4485
|
+
children: [],
|
|
4486
|
+
data: t.data
|
|
4487
|
+
}, d = {
|
|
4488
|
+
type: "element",
|
|
4489
|
+
tagName: "code",
|
|
4490
|
+
properties: {},
|
|
4491
|
+
children: a
|
|
4492
|
+
}, f = [], p = {
|
|
4493
|
+
...n,
|
|
4494
|
+
structure: s,
|
|
4495
|
+
addClassToHast: Br,
|
|
4496
|
+
get source() {
|
|
4497
|
+
return n.source;
|
|
4498
|
+
},
|
|
4499
|
+
get tokens() {
|
|
4500
|
+
return e;
|
|
4501
|
+
},
|
|
4502
|
+
get options() {
|
|
4503
|
+
return t;
|
|
4504
|
+
},
|
|
4505
|
+
get root() {
|
|
4506
|
+
return o;
|
|
4507
|
+
},
|
|
4508
|
+
get pre() {
|
|
4509
|
+
return u;
|
|
4510
|
+
},
|
|
4511
|
+
get code() {
|
|
4512
|
+
return d;
|
|
4513
|
+
},
|
|
4514
|
+
get lines() {
|
|
4515
|
+
return f;
|
|
4516
|
+
}
|
|
4517
|
+
};
|
|
4518
|
+
if (e.forEach((e, t) => {
|
|
4519
|
+
t && (s === "inline" ? o.children.push({
|
|
4520
|
+
type: "element",
|
|
4521
|
+
tagName: "br",
|
|
4522
|
+
properties: {},
|
|
4523
|
+
children: []
|
|
4524
|
+
}) : s === "classic" && a.push({
|
|
4525
|
+
type: "text",
|
|
4526
|
+
value: "\n"
|
|
4527
|
+
}));
|
|
4528
|
+
let n = {
|
|
4529
|
+
type: "element",
|
|
4530
|
+
tagName: "span",
|
|
4531
|
+
properties: { class: "line" },
|
|
4532
|
+
children: []
|
|
4533
|
+
}, r = 0;
|
|
4534
|
+
for (let a of e) {
|
|
4535
|
+
let e = {
|
|
4536
|
+
type: "element",
|
|
4537
|
+
tagName: "span",
|
|
4538
|
+
properties: { ...a.htmlAttrs },
|
|
4539
|
+
children: [{
|
|
4540
|
+
type: "text",
|
|
4541
|
+
value: a.content
|
|
4542
|
+
}]
|
|
4543
|
+
}, c = $r(a.htmlStyle || Y(a));
|
|
4544
|
+
c && (e.properties.style = c);
|
|
4545
|
+
for (let o of i) e = o?.span?.call(p, e, t + 1, r, n, a) || e;
|
|
4546
|
+
s === "inline" ? o.children.push(e) : s === "classic" && n.children.push(e), r += a.content.length;
|
|
4547
|
+
}
|
|
4548
|
+
if (s === "classic") {
|
|
4549
|
+
for (let e of i) n = e?.line?.call(p, n, t + 1) || n;
|
|
4550
|
+
f.push(n), a.push(n);
|
|
4551
|
+
} else s === "inline" && f.push(n);
|
|
4552
|
+
}), s === "classic") {
|
|
4553
|
+
for (let e of i) d = e?.code?.call(p, d) || d;
|
|
4554
|
+
u.children.push(d);
|
|
4555
|
+
for (let e of i) u = e?.pre?.call(p, u) || u;
|
|
4556
|
+
o.children.push(u);
|
|
4557
|
+
} else if (s === "inline") {
|
|
4558
|
+
let e = [], t = {
|
|
4559
|
+
type: "element",
|
|
4560
|
+
tagName: "span",
|
|
4561
|
+
properties: { class: "line" },
|
|
4562
|
+
children: []
|
|
4563
|
+
};
|
|
4564
|
+
for (let n of o.children) n.type === "element" && n.tagName === "br" ? (e.push(t), t = {
|
|
4565
|
+
type: "element",
|
|
4566
|
+
tagName: "span",
|
|
4567
|
+
properties: { class: "line" },
|
|
4568
|
+
children: []
|
|
4569
|
+
}) : (n.type === "element" || n.type === "text") && t.children.push(n);
|
|
4570
|
+
e.push(t);
|
|
4571
|
+
let n = {
|
|
4572
|
+
type: "element",
|
|
4573
|
+
tagName: "code",
|
|
4574
|
+
properties: {},
|
|
4575
|
+
children: e
|
|
4576
|
+
};
|
|
4577
|
+
for (let e of i) n = e?.code?.call(p, n) || n;
|
|
4578
|
+
o.children = [];
|
|
4579
|
+
for (let e = 0; e < n.children.length; e++) {
|
|
4580
|
+
e > 0 && o.children.push({
|
|
4581
|
+
type: "element",
|
|
4582
|
+
tagName: "br",
|
|
4583
|
+
properties: {},
|
|
4584
|
+
children: []
|
|
4585
|
+
});
|
|
4586
|
+
let t = n.children[e];
|
|
4587
|
+
t.type === "element" && o.children.push(...t.children);
|
|
4588
|
+
}
|
|
4589
|
+
}
|
|
4590
|
+
let m = o;
|
|
4591
|
+
for (let e of i) m = e?.root?.call(p, m) || m;
|
|
4592
|
+
return r && Ot(m, r), m;
|
|
4593
|
+
}
|
|
4594
|
+
function Si(e) {
|
|
4595
|
+
return e.map((e) => {
|
|
4596
|
+
let t = [], n = "", r;
|
|
4597
|
+
return e.forEach((i, a) => {
|
|
4598
|
+
let o = !(i.fontStyle && (i.fontStyle & y.Underline || i.fontStyle & y.Strikethrough));
|
|
4599
|
+
o && yi.test(i.content) && e[a + 1] ? (r === void 0 && (r = i.offset), n += i.content) : n ? (o ? t.push({
|
|
4600
|
+
...i,
|
|
4601
|
+
offset: r,
|
|
4602
|
+
content: n + i.content
|
|
4603
|
+
}) : t.push({
|
|
4604
|
+
content: n,
|
|
4605
|
+
offset: r
|
|
4606
|
+
}, i), r = void 0, n = "") : t.push(i);
|
|
4607
|
+
}), t;
|
|
4608
|
+
});
|
|
4609
|
+
}
|
|
4610
|
+
function Ci(e) {
|
|
4611
|
+
return e.map((e) => e.flatMap((e) => {
|
|
4612
|
+
if (yi.test(e.content)) return e;
|
|
4613
|
+
let t = e.content.match(bi);
|
|
4614
|
+
if (!t) return e;
|
|
4615
|
+
let [, n, r, i] = t;
|
|
4616
|
+
if (!n && !i) return e;
|
|
4617
|
+
let a = [{
|
|
4618
|
+
...e,
|
|
4619
|
+
offset: e.offset + n.length,
|
|
4620
|
+
content: r
|
|
4621
|
+
}];
|
|
4622
|
+
return n && a.unshift({
|
|
4623
|
+
content: n,
|
|
4624
|
+
offset: e.offset
|
|
4625
|
+
}), i && a.push({
|
|
4626
|
+
content: i,
|
|
4627
|
+
offset: e.offset + n.length + r.length
|
|
4628
|
+
}), a;
|
|
4629
|
+
}));
|
|
4630
|
+
}
|
|
4631
|
+
function wi(e) {
|
|
4632
|
+
return e.map((e) => {
|
|
4633
|
+
let t = [];
|
|
4634
|
+
for (let n of e) {
|
|
4635
|
+
if (t.length === 0) {
|
|
4636
|
+
t.push({ ...n });
|
|
4637
|
+
continue;
|
|
4638
|
+
}
|
|
4639
|
+
let e = t.at(-1), r = $r(e.htmlStyle || Y(e)), i = $r(n.htmlStyle || Y(n)), a = e.fontStyle && (e.fontStyle & y.Underline || e.fontStyle & y.Strikethrough), o = n.fontStyle && (n.fontStyle & y.Underline || n.fontStyle & y.Strikethrough);
|
|
4640
|
+
!a && !o && r === i ? e.content += n.content : t.push({ ...n });
|
|
4641
|
+
}
|
|
4642
|
+
return t;
|
|
4643
|
+
});
|
|
4644
|
+
}
|
|
4645
|
+
var Ti = Ir;
|
|
4646
|
+
function Ei(e, t, n) {
|
|
4647
|
+
let r = {
|
|
4648
|
+
meta: {},
|
|
4649
|
+
options: n,
|
|
4650
|
+
codeToHast: (t, n) => $(e, t, n),
|
|
4651
|
+
codeToTokens: (t, n) => Q(e, t, n)
|
|
4652
|
+
}, i = Ti($(e, t, n, r));
|
|
4653
|
+
for (let e of ii(n)) i = e.postprocess?.call(r, i, n) || i;
|
|
4654
|
+
return i;
|
|
4655
|
+
}
|
|
4656
|
+
async function Di(e) {
|
|
4657
|
+
let t = await Tt(e);
|
|
4658
|
+
return {
|
|
4659
|
+
getLastGrammarState: (...e) => Pt(t, ...e),
|
|
4660
|
+
codeToTokensBase: (e, n) => Z(t, e, n),
|
|
4661
|
+
codeToTokensWithThemes: (e, n) => I(t, e, n),
|
|
4662
|
+
codeToTokens: (e, n) => Q(t, e, n),
|
|
4663
|
+
codeToHast: (e, n) => $(t, e, n),
|
|
4664
|
+
codeToHtml: (e, n) => Ei(t, e, n),
|
|
4665
|
+
getBundledLanguages: () => ({}),
|
|
4666
|
+
getBundledThemes: () => ({}),
|
|
4667
|
+
...t,
|
|
4668
|
+
getInternalContext: () => t
|
|
4669
|
+
};
|
|
4670
|
+
}
|
|
4671
|
+
function Oi(e) {
|
|
4672
|
+
let t = Ct(e);
|
|
4673
|
+
return {
|
|
4674
|
+
getLastGrammarState: (...e) => Pt(t, ...e),
|
|
4675
|
+
codeToTokensBase: (e, n) => Z(t, e, n),
|
|
4676
|
+
codeToTokensWithThemes: (e, n) => I(t, e, n),
|
|
4677
|
+
codeToTokens: (e, n) => Q(t, e, n),
|
|
4678
|
+
codeToHast: (e, n) => $(t, e, n),
|
|
4679
|
+
codeToHtml: (e, n) => Ei(t, e, n),
|
|
4680
|
+
getBundledLanguages: () => ({}),
|
|
4681
|
+
getBundledThemes: () => ({}),
|
|
4682
|
+
...t,
|
|
4683
|
+
getInternalContext: () => t
|
|
4684
|
+
};
|
|
4685
|
+
}
|
|
4686
|
+
function ki(e) {
|
|
4687
|
+
let t;
|
|
4688
|
+
async function n(n) {
|
|
4689
|
+
if (t) {
|
|
4690
|
+
let e = await t;
|
|
4691
|
+
return await Promise.all([e.loadTheme(...n.themes || []), e.loadLanguage(...n.langs || [])]), e;
|
|
4692
|
+
}
|
|
4693
|
+
return t = e({
|
|
4694
|
+
...n,
|
|
4695
|
+
themes: n.themes || [],
|
|
4696
|
+
langs: n.langs || []
|
|
4697
|
+
}), t;
|
|
4698
|
+
}
|
|
4699
|
+
return n;
|
|
4700
|
+
}
|
|
4701
|
+
var Ai = /* @__PURE__ */ ki(Di);
|
|
4702
|
+
function ji(e) {
|
|
4703
|
+
let n = e.langs, r = e.themes, i = e.engine;
|
|
4704
|
+
async function a(e) {
|
|
4705
|
+
function a(r) {
|
|
4706
|
+
if (typeof r == "string") {
|
|
4707
|
+
if (r = e.langAlias?.[r] || r, dt(r)) return [];
|
|
4708
|
+
let i = n[r];
|
|
4709
|
+
if (!i) throw new t(`Language \`${r}\` is not included in this bundle. You may want to load it from external source.`);
|
|
4710
|
+
return i;
|
|
4711
|
+
}
|
|
4712
|
+
return r;
|
|
4713
|
+
}
|
|
4714
|
+
function o(e) {
|
|
4715
|
+
if (ft(e)) return "none";
|
|
4716
|
+
if (typeof e == "string") {
|
|
4717
|
+
let n = r[e];
|
|
4718
|
+
if (!n) throw new t(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);
|
|
4719
|
+
return n;
|
|
4720
|
+
}
|
|
4721
|
+
return e;
|
|
4722
|
+
}
|
|
4723
|
+
let s = (e.themes ?? []).map((e) => o(e)), c = (e.langs ?? []).map((e) => a(e)), l = await Di({
|
|
4724
|
+
engine: e.engine ?? i(),
|
|
4725
|
+
...e,
|
|
4726
|
+
themes: s,
|
|
4727
|
+
langs: c
|
|
4728
|
+
});
|
|
4729
|
+
return {
|
|
4730
|
+
...l,
|
|
4731
|
+
loadLanguage(...e) {
|
|
4732
|
+
return l.loadLanguage(...e.map(a));
|
|
4733
|
+
},
|
|
4734
|
+
loadTheme(...e) {
|
|
4735
|
+
return l.loadTheme(...e.map(o));
|
|
4736
|
+
},
|
|
4737
|
+
getBundledLanguages() {
|
|
4738
|
+
return n;
|
|
4739
|
+
},
|
|
4740
|
+
getBundledThemes() {
|
|
4741
|
+
return r;
|
|
4742
|
+
}
|
|
4743
|
+
};
|
|
4744
|
+
}
|
|
4745
|
+
return a;
|
|
4746
|
+
}
|
|
4747
|
+
function Mi(e) {
|
|
4748
|
+
let t;
|
|
4749
|
+
async function n(n = {}) {
|
|
4750
|
+
if (t) {
|
|
4751
|
+
let e = await t;
|
|
4752
|
+
return await Promise.all([e.loadTheme(...n.themes || []), e.loadLanguage(...n.langs || [])]), e;
|
|
4753
|
+
}
|
|
4754
|
+
{
|
|
4755
|
+
t = e({
|
|
4756
|
+
...n,
|
|
4757
|
+
themes: [],
|
|
4758
|
+
langs: []
|
|
4759
|
+
});
|
|
4760
|
+
let r = await t;
|
|
4761
|
+
return await Promise.all([r.loadTheme(...n.themes || []), r.loadLanguage(...n.langs || [])]), r;
|
|
4762
|
+
}
|
|
4763
|
+
}
|
|
4764
|
+
return n;
|
|
4765
|
+
}
|
|
4766
|
+
function Ni(e, t) {
|
|
4767
|
+
let n = Mi(e);
|
|
4768
|
+
async function r(e, r) {
|
|
4769
|
+
let i = await n({
|
|
4770
|
+
langs: [r.lang],
|
|
4771
|
+
themes: "theme" in r ? [r.theme] : Object.values(r.themes)
|
|
4772
|
+
}), a = await t?.guessEmbeddedLanguages?.(e, r.lang, i);
|
|
4773
|
+
return a && await i.loadLanguage(...a), i;
|
|
4774
|
+
}
|
|
4775
|
+
return {
|
|
4776
|
+
getSingletonHighlighter(e) {
|
|
4777
|
+
return n(e);
|
|
4778
|
+
},
|
|
4779
|
+
async codeToHtml(e, t) {
|
|
4780
|
+
return (await r(e, t)).codeToHtml(e, t);
|
|
4781
|
+
},
|
|
4782
|
+
async codeToHast(e, t) {
|
|
4783
|
+
return (await r(e, t)).codeToHast(e, t);
|
|
4784
|
+
},
|
|
4785
|
+
async codeToTokens(e, t) {
|
|
4786
|
+
return (await r(e, t)).codeToTokens(e, t);
|
|
4787
|
+
},
|
|
4788
|
+
async codeToTokensBase(e, t) {
|
|
4789
|
+
return (await r(e, t)).codeToTokensBase(e, t);
|
|
4790
|
+
},
|
|
4791
|
+
async codeToTokensWithThemes(e, t) {
|
|
4792
|
+
return (await r(e, t)).codeToTokensWithThemes(e, t);
|
|
4793
|
+
},
|
|
4794
|
+
async getLastGrammarState(e, t) {
|
|
4795
|
+
return (await n({
|
|
4796
|
+
langs: [t.lang],
|
|
4797
|
+
themes: [t.theme]
|
|
4798
|
+
})).getLastGrammarState(e, t);
|
|
4799
|
+
}
|
|
4800
|
+
};
|
|
4801
|
+
}
|
|
4802
|
+
function Pi(e = {}) {
|
|
4803
|
+
let { name: t = "css-variables", variablePrefix: n = "--shiki-", fontStyle: r = !0 } = e, i = (t) => e.variableDefaults?.[t] ? `var(${n}${t}, ${e.variableDefaults[t]})` : `var(${n}${t})`, a = {
|
|
4804
|
+
name: t,
|
|
4805
|
+
type: "dark",
|
|
4806
|
+
colors: {
|
|
4807
|
+
"editor.foreground": i("foreground"),
|
|
4808
|
+
"editor.background": i("background"),
|
|
4809
|
+
"terminal.ansiBlack": i("ansi-black"),
|
|
4810
|
+
"terminal.ansiRed": i("ansi-red"),
|
|
4811
|
+
"terminal.ansiGreen": i("ansi-green"),
|
|
4812
|
+
"terminal.ansiYellow": i("ansi-yellow"),
|
|
4813
|
+
"terminal.ansiBlue": i("ansi-blue"),
|
|
4814
|
+
"terminal.ansiMagenta": i("ansi-magenta"),
|
|
4815
|
+
"terminal.ansiCyan": i("ansi-cyan"),
|
|
4816
|
+
"terminal.ansiWhite": i("ansi-white"),
|
|
4817
|
+
"terminal.ansiBrightBlack": i("ansi-bright-black"),
|
|
4818
|
+
"terminal.ansiBrightRed": i("ansi-bright-red"),
|
|
4819
|
+
"terminal.ansiBrightGreen": i("ansi-bright-green"),
|
|
4820
|
+
"terminal.ansiBrightYellow": i("ansi-bright-yellow"),
|
|
4821
|
+
"terminal.ansiBrightBlue": i("ansi-bright-blue"),
|
|
4822
|
+
"terminal.ansiBrightMagenta": i("ansi-bright-magenta"),
|
|
4823
|
+
"terminal.ansiBrightCyan": i("ansi-bright-cyan"),
|
|
4824
|
+
"terminal.ansiBrightWhite": i("ansi-bright-white")
|
|
4825
|
+
},
|
|
4826
|
+
tokenColors: [
|
|
4827
|
+
{
|
|
4828
|
+
scope: [
|
|
4829
|
+
"keyword.operator.accessor",
|
|
4830
|
+
"meta.group.braces.round.function.arguments",
|
|
4831
|
+
"meta.template.expression",
|
|
4832
|
+
"markup.fenced_code meta.embedded.block"
|
|
4833
|
+
],
|
|
4834
|
+
settings: { foreground: i("foreground") }
|
|
4835
|
+
},
|
|
4836
|
+
{
|
|
4837
|
+
scope: "emphasis",
|
|
4838
|
+
settings: { fontStyle: "italic" }
|
|
4839
|
+
},
|
|
4840
|
+
{
|
|
4841
|
+
scope: [
|
|
4842
|
+
"strong",
|
|
4843
|
+
"markup.heading.markdown",
|
|
4844
|
+
"markup.bold.markdown"
|
|
4845
|
+
],
|
|
4846
|
+
settings: { fontStyle: "bold" }
|
|
4847
|
+
},
|
|
4848
|
+
{
|
|
4849
|
+
scope: ["markup.italic.markdown"],
|
|
4850
|
+
settings: { fontStyle: "italic" }
|
|
4851
|
+
},
|
|
4852
|
+
{
|
|
4853
|
+
scope: "meta.link.inline.markdown",
|
|
4854
|
+
settings: {
|
|
4855
|
+
fontStyle: "underline",
|
|
4856
|
+
foreground: i("token-link")
|
|
4857
|
+
}
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
scope: [
|
|
4861
|
+
"string",
|
|
4862
|
+
"markup.fenced_code",
|
|
4863
|
+
"markup.inline"
|
|
4864
|
+
],
|
|
4865
|
+
settings: { foreground: i("token-string") }
|
|
4866
|
+
},
|
|
4867
|
+
{
|
|
4868
|
+
scope: ["comment", "string.quoted.docstring.multi"],
|
|
4869
|
+
settings: { foreground: i("token-comment") }
|
|
4870
|
+
},
|
|
4871
|
+
{
|
|
4872
|
+
scope: [
|
|
4873
|
+
"constant.numeric",
|
|
4874
|
+
"constant.language",
|
|
4875
|
+
"constant.other.placeholder",
|
|
4876
|
+
"constant.character.format.placeholder",
|
|
4877
|
+
"variable.language.this",
|
|
4878
|
+
"variable.other.object",
|
|
4879
|
+
"variable.other.class",
|
|
4880
|
+
"variable.other.constant",
|
|
4881
|
+
"meta.property-name",
|
|
4882
|
+
"meta.property-value",
|
|
4883
|
+
"support"
|
|
4884
|
+
],
|
|
4885
|
+
settings: { foreground: i("token-constant") }
|
|
4886
|
+
},
|
|
4887
|
+
{
|
|
4888
|
+
scope: [
|
|
4889
|
+
"keyword",
|
|
4890
|
+
"storage.modifier",
|
|
4891
|
+
"storage.type",
|
|
4892
|
+
"storage.control.clojure",
|
|
4893
|
+
"entity.name.function.clojure",
|
|
4894
|
+
"entity.name.tag.yaml",
|
|
4895
|
+
"support.function.node",
|
|
4896
|
+
"support.type.property-name.json",
|
|
4897
|
+
"punctuation.separator.key-value",
|
|
4898
|
+
"punctuation.definition.template-expression"
|
|
4899
|
+
],
|
|
4900
|
+
settings: { foreground: i("token-keyword") }
|
|
4901
|
+
},
|
|
4902
|
+
{
|
|
4903
|
+
scope: "variable.parameter.function",
|
|
4904
|
+
settings: { foreground: i("token-parameter") }
|
|
4905
|
+
},
|
|
4906
|
+
{
|
|
4907
|
+
scope: [
|
|
4908
|
+
"support.function",
|
|
4909
|
+
"entity.name.type",
|
|
4910
|
+
"entity.other.inherited-class",
|
|
4911
|
+
"meta.function-call",
|
|
4912
|
+
"meta.instance.constructor",
|
|
4913
|
+
"entity.other.attribute-name",
|
|
4914
|
+
"entity.name.function",
|
|
4915
|
+
"constant.keyword.clojure"
|
|
4916
|
+
],
|
|
4917
|
+
settings: { foreground: i("token-function") }
|
|
4918
|
+
},
|
|
4919
|
+
{
|
|
4920
|
+
scope: [
|
|
4921
|
+
"entity.name.tag",
|
|
4922
|
+
"string.quoted",
|
|
4923
|
+
"string.regexp",
|
|
4924
|
+
"string.interpolated",
|
|
4925
|
+
"string.template",
|
|
4926
|
+
"string.unquoted.plain.out.yaml",
|
|
4927
|
+
"keyword.other.template"
|
|
4928
|
+
],
|
|
4929
|
+
settings: { foreground: i("token-string-expression") }
|
|
4930
|
+
},
|
|
4931
|
+
{
|
|
4932
|
+
scope: [
|
|
4933
|
+
"punctuation.definition.arguments",
|
|
4934
|
+
"punctuation.definition.dict",
|
|
4935
|
+
"punctuation.separator",
|
|
4936
|
+
"meta.function-call.arguments"
|
|
4937
|
+
],
|
|
4938
|
+
settings: { foreground: i("token-punctuation") }
|
|
4939
|
+
},
|
|
4940
|
+
{
|
|
4941
|
+
scope: ["markup.underline.link", "punctuation.definition.metadata.markdown"],
|
|
4942
|
+
settings: { foreground: i("token-link") }
|
|
4943
|
+
},
|
|
4944
|
+
{
|
|
4945
|
+
scope: ["beginning.punctuation.definition.list.markdown"],
|
|
4946
|
+
settings: { foreground: i("token-string") }
|
|
4947
|
+
},
|
|
4948
|
+
{
|
|
4949
|
+
scope: [
|
|
4950
|
+
"punctuation.definition.string.begin.markdown",
|
|
4951
|
+
"punctuation.definition.string.end.markdown",
|
|
4952
|
+
"string.other.link.title.markdown",
|
|
4953
|
+
"string.other.link.description.markdown"
|
|
4954
|
+
],
|
|
4955
|
+
settings: { foreground: i("token-keyword") }
|
|
4956
|
+
},
|
|
4957
|
+
{
|
|
4958
|
+
scope: [
|
|
4959
|
+
"markup.inserted",
|
|
4960
|
+
"meta.diff.header.to-file",
|
|
4961
|
+
"punctuation.definition.inserted"
|
|
4962
|
+
],
|
|
4963
|
+
settings: { foreground: i("token-inserted") }
|
|
4964
|
+
},
|
|
4965
|
+
{
|
|
4966
|
+
scope: [
|
|
4967
|
+
"markup.deleted",
|
|
4968
|
+
"meta.diff.header.from-file",
|
|
4969
|
+
"punctuation.definition.deleted"
|
|
4970
|
+
],
|
|
4971
|
+
settings: { foreground: i("token-deleted") }
|
|
4972
|
+
},
|
|
4973
|
+
{
|
|
4974
|
+
scope: ["markup.changed", "punctuation.definition.changed"],
|
|
4975
|
+
settings: { foreground: i("token-changed") }
|
|
4976
|
+
}
|
|
4977
|
+
]
|
|
4978
|
+
};
|
|
4979
|
+
return r || (a.tokenColors = a.tokenColors?.map((e) => (e.settings?.fontStyle && delete e.settings.fontStyle, e))), a;
|
|
4980
|
+
}
|
|
4981
|
+
//#endregion
|
|
4982
|
+
export { t as ShikiError, Br as addClassToHast, k as applyColorReplacements, $ as codeToHast, Ei as codeToHtml, Q as codeToTokens, Z as codeToTokensBase, I as codeToTokensWithThemes, ji as createBundledHighlighter, Pi as createCssVariablesTheme, Di as createHighlighterCore, Oi as createHighlighterCoreSync, Kr as createPositionConverter, Et as createShikiInternal, wt as createShikiInternalSync, Ct as createShikiPrimitive, Tt as createShikiPrimitiveAsync, Ni as createSingletonShorthands, Qr as flatTokenVariants, Pt as getLastGrammarState, Ai as getSingletonHighlighterCore, Y as getTokenStyleObject, qr as guessEmbeddedLanguages, Ti as hastToHtml, j as isNoneTheme, A as isPlainLang, dt as isSpecialLang, ft as isSpecialTheme, Mi as makeSingletonHighlighter, ki as makeSingletonHighlighterCore, ut as normalizeGetter, _t as normalizeTheme, O as resolveColorReplacements, M as splitLines, Yr as splitToken, Zr as splitTokens, $r as stringifyTokenStyle, lt as toArray, gi as tokenizeAnsiWithTheme, Ft as tokenizeWithTheme, xi as tokensToHast, ei as transformerDecorations };
|
|
4983
|
+
|
|
4984
|
+
//# sourceMappingURL=core-CAYwPm3F.js.map
|