vite-plugin-norg 1.2.8 → 1.2.9
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/apex-oLhhs58q.js +6 -0
- package/dist/berry-DODBq_Ff.js +6 -0
- package/dist/{csharp-COJ2mCKr.js → csharp-C7yUs7-w.js} +1 -1
- package/dist/{dark-plus-CRFsux2L.js → dark-plus-pUHDTVV0.js} +1 -1
- package/dist/{latex-CO8r39zT.js → latex-Cs75fyNk.js} +1 -1
- package/dist/{lean-k2QBx9cb.js → lean-D5yRrexI.js} +1 -1
- package/dist/napi/index.js +52 -52
- package/dist/napi/index.linux-x64-gnu.node +0 -0
- package/dist/{nextflow-BAAEJxI_.js → nextflow-DmSVRGjG.js} +1 -1
- package/dist/nix-BZK5F767.js +9 -0
- package/dist/openscad-Sp5uZ6f2.js +6 -0
- package/dist/plugin/index.js +733 -684
- package/dist/{razor-Dh1wKTmh.js → razor-B1z-bksM.js} +1 -1
- package/dist/{rose-pine-Cr4kwgAY.js → rose-pine-BKc3yVeu.js} +1 -1
- package/dist/{rose-pine-dawn-ClRRUdXX.js → rose-pine-dawn-BulJcPZT.js} +1 -1
- package/dist/{rose-pine-moon-ucNn3Gm8.js → rose-pine-moon-j6jiXKV8.js} +1 -1
- package/dist/{solidity-CneOhxmR.js → solidity-DUWnFhS6.js} +1 -1
- package/dist/{tex-BUUuwxQS.js → tex-DpOayVob.js} +1 -1
- package/dist/typespec-DWqp-kUU.js +6 -0
- package/dist/vue-DOVAQqiz.js +31 -0
- package/dist/{vue-html-CQOyCFnQ.js → vue-html-C7WI2elu.js} +1 -1
- package/dist/{vue-vine-CAyeVfAj.js → vue-vine-D386fra9.js} +1 -1
- package/package.json +3 -3
- package/dist/apex-CtcXmQ6V.js +0 -6
- package/dist/berry-PwsHPR_K.js +0 -6
- package/dist/nix-B_7Vy2bT.js +0 -6
- package/dist/typespec-Djmco60m.js +0 -6
- package/dist/vue-DrinnB8Y.js +0 -31
package/dist/plugin/index.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { createFilter as
|
|
1
|
+
import { createFilter as Nr } from "vite";
|
|
2
2
|
import { parseNorg as Gt } from "../napi/index.js";
|
|
3
3
|
function v(t, e, n) {
|
|
4
4
|
function r(l, a) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
if (l._zod || Object.defineProperty(l, "_zod", {
|
|
6
|
+
value: {
|
|
7
|
+
def: a,
|
|
8
|
+
constr: s,
|
|
9
|
+
traits: /* @__PURE__ */ new Set()
|
|
10
|
+
},
|
|
8
11
|
enumerable: !1
|
|
9
|
-
}),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
}), l._zod.traits.has(t))
|
|
13
|
+
return;
|
|
14
|
+
l._zod.traits.add(t), e(l, a);
|
|
15
|
+
const c = s.prototype, u = Object.keys(c);
|
|
16
|
+
for (let h = 0; h < u.length; h++) {
|
|
17
|
+
const p = u[h];
|
|
18
|
+
p in l || (l[p] = c[p].bind(l));
|
|
19
|
+
}
|
|
13
20
|
}
|
|
14
21
|
const o = n?.Parent ?? Object;
|
|
15
22
|
class i extends o {
|
|
@@ -32,16 +39,16 @@ class oe extends Error {
|
|
|
32
39
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
33
40
|
}
|
|
34
41
|
}
|
|
35
|
-
class
|
|
42
|
+
class Nn extends Error {
|
|
36
43
|
constructor(e) {
|
|
37
44
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
|
-
const
|
|
47
|
+
const En = {};
|
|
41
48
|
function J(t) {
|
|
42
|
-
return
|
|
49
|
+
return En;
|
|
43
50
|
}
|
|
44
|
-
function
|
|
51
|
+
function Er(t) {
|
|
45
52
|
const e = Object.values(t).filter((r) => typeof r == "number");
|
|
46
53
|
return Object.entries(t).filter(([r, o]) => e.indexOf(+r) === -1).map(([r, o]) => o);
|
|
47
54
|
}
|
|
@@ -101,12 +108,12 @@ function Q(...t) {
|
|
|
101
108
|
function Ft(t) {
|
|
102
109
|
return JSON.stringify(t);
|
|
103
110
|
}
|
|
104
|
-
const
|
|
111
|
+
const xn = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
|
|
105
112
|
};
|
|
106
113
|
function xe(t) {
|
|
107
114
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
108
115
|
}
|
|
109
|
-
const
|
|
116
|
+
const xr = St(() => {
|
|
110
117
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
111
118
|
return !1;
|
|
112
119
|
try {
|
|
@@ -120,16 +127,16 @@ function me(t) {
|
|
|
120
127
|
if (xe(t) === !1)
|
|
121
128
|
return !1;
|
|
122
129
|
const e = t.constructor;
|
|
123
|
-
if (e === void 0)
|
|
130
|
+
if (e === void 0 || typeof e != "function")
|
|
124
131
|
return !0;
|
|
125
132
|
const n = e.prototype;
|
|
126
133
|
return !(xe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
127
134
|
}
|
|
128
|
-
function
|
|
135
|
+
function Ln(t) {
|
|
129
136
|
return me(t) ? { ...t } : Array.isArray(t) ? [...t] : t;
|
|
130
137
|
}
|
|
131
|
-
const
|
|
132
|
-
function
|
|
138
|
+
const Lr = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
139
|
+
function Or(t) {
|
|
133
140
|
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
134
141
|
}
|
|
135
142
|
function Z(t, e, n) {
|
|
@@ -149,10 +156,10 @@ function j(t) {
|
|
|
149
156
|
}
|
|
150
157
|
return delete e.message, typeof e.error == "string" ? { ...e, error: () => e.error } : e;
|
|
151
158
|
}
|
|
152
|
-
function
|
|
159
|
+
function Ir(t) {
|
|
153
160
|
return Object.keys(t).filter((e) => t[e]._zod.optin === "optional" && t[e]._zod.optout === "optional");
|
|
154
161
|
}
|
|
155
|
-
function
|
|
162
|
+
function zr(t, e) {
|
|
156
163
|
const n = t._zod.def, r = Q(t._zod.def, {
|
|
157
164
|
get shape() {
|
|
158
165
|
const o = {};
|
|
@@ -167,7 +174,7 @@ function Ir(t, e) {
|
|
|
167
174
|
});
|
|
168
175
|
return Z(t, r);
|
|
169
176
|
}
|
|
170
|
-
function
|
|
177
|
+
function Mr(t, e) {
|
|
171
178
|
const n = t._zod.def, r = Q(t._zod.def, {
|
|
172
179
|
get shape() {
|
|
173
180
|
const o = { ...t._zod.def.shape };
|
|
@@ -182,7 +189,7 @@ function zr(t, e) {
|
|
|
182
189
|
});
|
|
183
190
|
return Z(t, r);
|
|
184
191
|
}
|
|
185
|
-
function
|
|
192
|
+
function $r(t, e) {
|
|
186
193
|
if (!me(e))
|
|
187
194
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
188
195
|
const n = t._zod.def.checks;
|
|
@@ -197,7 +204,7 @@ function Mr(t, e) {
|
|
|
197
204
|
});
|
|
198
205
|
return Z(t, o);
|
|
199
206
|
}
|
|
200
|
-
function
|
|
207
|
+
function jr(t, e) {
|
|
201
208
|
if (!me(e))
|
|
202
209
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
203
210
|
const n = {
|
|
@@ -210,7 +217,7 @@ function $r(t, e) {
|
|
|
210
217
|
};
|
|
211
218
|
return Z(t, n);
|
|
212
219
|
}
|
|
213
|
-
function
|
|
220
|
+
function Dr(t, e) {
|
|
214
221
|
const n = Q(t._zod.def, {
|
|
215
222
|
get shape() {
|
|
216
223
|
const r = { ...t._zod.def.shape, ...e._zod.def.shape };
|
|
@@ -224,7 +231,7 @@ function jr(t, e) {
|
|
|
224
231
|
});
|
|
225
232
|
return Z(t, n);
|
|
226
233
|
}
|
|
227
|
-
function
|
|
234
|
+
function Br(t, e, n) {
|
|
228
235
|
const r = Q(e._zod.def, {
|
|
229
236
|
get shape() {
|
|
230
237
|
const o = e._zod.def.shape, i = { ...o };
|
|
@@ -249,7 +256,7 @@ function Dr(t, e, n) {
|
|
|
249
256
|
});
|
|
250
257
|
return Z(e, r);
|
|
251
258
|
}
|
|
252
|
-
function
|
|
259
|
+
function Gr(t, e, n) {
|
|
253
260
|
const r = Q(e._zod.def, {
|
|
254
261
|
get shape() {
|
|
255
262
|
const o = e._zod.def.shape, i = { ...o };
|
|
@@ -282,7 +289,7 @@ function ne(t, e = 0) {
|
|
|
282
289
|
return !0;
|
|
283
290
|
return !1;
|
|
284
291
|
}
|
|
285
|
-
function
|
|
292
|
+
function On(t, e) {
|
|
286
293
|
return e.map((n) => {
|
|
287
294
|
var r;
|
|
288
295
|
return (r = n).path ?? (r.path = []), n.path.unshift(t), n;
|
|
@@ -311,7 +318,7 @@ function fe(...t) {
|
|
|
311
318
|
inst: r
|
|
312
319
|
} : { ...e };
|
|
313
320
|
}
|
|
314
|
-
const
|
|
321
|
+
const In = (t, e) => {
|
|
315
322
|
t.name = "$ZodError", Object.defineProperty(t, "_zod", {
|
|
316
323
|
value: t._zod,
|
|
317
324
|
enumerable: !1
|
|
@@ -322,14 +329,14 @@ const On = (t, e) => {
|
|
|
322
329
|
value: () => t.message,
|
|
323
330
|
enumerable: !1
|
|
324
331
|
});
|
|
325
|
-
},
|
|
326
|
-
function
|
|
332
|
+
}, zn = v("$ZodError", In), Mn = v("$ZodError", In, { Parent: Error });
|
|
333
|
+
function Ur(t, e = (n) => n.message) {
|
|
327
334
|
const n = {}, r = [];
|
|
328
335
|
for (const o of t.issues)
|
|
329
336
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(e(o))) : r.push(e(o));
|
|
330
337
|
return { formErrors: r, fieldErrors: n };
|
|
331
338
|
}
|
|
332
|
-
function
|
|
339
|
+
function Fr(t, e = (n) => n.message) {
|
|
333
340
|
const n = { _errors: [] }, r = (o) => {
|
|
334
341
|
for (const i of o.issues)
|
|
335
342
|
if (i.code === "invalid_union" && i.errors.length)
|
|
@@ -356,7 +363,7 @@ const Pt = (t) => (e, n, r, o) => {
|
|
|
356
363
|
throw new oe();
|
|
357
364
|
if (s.issues.length) {
|
|
358
365
|
const l = new (o?.Err ?? t)(s.issues.map((a) => Y(a, i, J())));
|
|
359
|
-
throw
|
|
366
|
+
throw xn(l, o?.callee), l;
|
|
360
367
|
}
|
|
361
368
|
return s.value;
|
|
362
369
|
}, Rt = (t) => async (e, n, r, o) => {
|
|
@@ -364,7 +371,7 @@ const Pt = (t) => (e, n, r, o) => {
|
|
|
364
371
|
let s = e._zod.run({ value: n, issues: [] }, i);
|
|
365
372
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
366
373
|
const l = new (o?.Err ?? t)(s.issues.map((a) => Y(a, i, J())));
|
|
367
|
-
throw
|
|
374
|
+
throw xn(l, o?.callee), l;
|
|
368
375
|
}
|
|
369
376
|
return s.value;
|
|
370
377
|
}, He = (t) => (e, n, r) => {
|
|
@@ -373,31 +380,31 @@ const Pt = (t) => (e, n, r, o) => {
|
|
|
373
380
|
throw new oe();
|
|
374
381
|
return i.issues.length ? {
|
|
375
382
|
success: !1,
|
|
376
|
-
error: new (t ??
|
|
383
|
+
error: new (t ?? zn)(i.issues.map((s) => Y(s, o, J())))
|
|
377
384
|
} : { success: !0, data: i.value };
|
|
378
|
-
},
|
|
385
|
+
}, Hr = /* @__PURE__ */ He(Mn), We = (t) => async (e, n, r) => {
|
|
379
386
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
380
387
|
let i = e._zod.run({ value: n, issues: [] }, o);
|
|
381
388
|
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
382
389
|
success: !1,
|
|
383
390
|
error: new t(i.issues.map((s) => Y(s, o, J())))
|
|
384
391
|
} : { success: !0, data: i.value };
|
|
385
|
-
},
|
|
392
|
+
}, Wr = /* @__PURE__ */ We(Mn), Zr = (t) => (e, n, r) => {
|
|
386
393
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
387
394
|
return Pt(t)(e, n, o);
|
|
388
|
-
},
|
|
395
|
+
}, qr = (t) => (e, n, r) => Pt(t)(e, n, r), Vr = (t) => async (e, n, r) => {
|
|
389
396
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
390
397
|
return Rt(t)(e, n, o);
|
|
391
|
-
},
|
|
398
|
+
}, Kr = (t) => async (e, n, r) => Rt(t)(e, n, r), Jr = (t) => (e, n, r) => {
|
|
392
399
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
393
400
|
return He(t)(e, n, o);
|
|
394
|
-
},
|
|
401
|
+
}, Yr = (t) => (e, n, r) => He(t)(e, n, r), Xr = (t) => async (e, n, r) => {
|
|
395
402
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
396
403
|
return We(t)(e, n, o);
|
|
397
|
-
},
|
|
404
|
+
}, Qr = (t) => async (e, n, r) => We(t)(e, n, r), le = /* @__PURE__ */ v("$ZodCheck", (t, e) => {
|
|
398
405
|
var n;
|
|
399
406
|
t._zod ?? (t._zod = {}), t._zod.def = e, (n = t._zod).onattach ?? (n.onattach = []);
|
|
400
|
-
}),
|
|
407
|
+
}), eo = /* @__PURE__ */ v("$ZodCheckMaxLength", (t, e) => {
|
|
401
408
|
var n;
|
|
402
409
|
le.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
403
410
|
const o = r.value;
|
|
@@ -420,7 +427,7 @@ const Pt = (t) => (e, n, r, o) => {
|
|
|
420
427
|
continue: !e.abort
|
|
421
428
|
});
|
|
422
429
|
};
|
|
423
|
-
}),
|
|
430
|
+
}), to = /* @__PURE__ */ v("$ZodCheckMinLength", (t, e) => {
|
|
424
431
|
var n;
|
|
425
432
|
le.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
426
433
|
const o = r.value;
|
|
@@ -443,7 +450,7 @@ const Pt = (t) => (e, n, r, o) => {
|
|
|
443
450
|
continue: !e.abort
|
|
444
451
|
});
|
|
445
452
|
};
|
|
446
|
-
}),
|
|
453
|
+
}), no = /* @__PURE__ */ v("$ZodCheckLengthEquals", (t, e) => {
|
|
447
454
|
var n;
|
|
448
455
|
le.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
|
|
449
456
|
const o = r.value;
|
|
@@ -466,12 +473,12 @@ const Pt = (t) => (e, n, r, o) => {
|
|
|
466
473
|
continue: !e.abort
|
|
467
474
|
});
|
|
468
475
|
};
|
|
469
|
-
}),
|
|
476
|
+
}), ro = /* @__PURE__ */ v("$ZodCheckOverwrite", (t, e) => {
|
|
470
477
|
le.init(t, e), t._zod.check = (n) => {
|
|
471
478
|
n.value = e.tx(n.value);
|
|
472
479
|
};
|
|
473
480
|
});
|
|
474
|
-
class
|
|
481
|
+
class oo {
|
|
475
482
|
constructor(e = []) {
|
|
476
483
|
this.content = [], this.indent = 0, this && (this.args = e);
|
|
477
484
|
}
|
|
@@ -494,13 +501,13 @@ class ro {
|
|
|
494
501
|
`));
|
|
495
502
|
}
|
|
496
503
|
}
|
|
497
|
-
const
|
|
504
|
+
const io = {
|
|
498
505
|
major: 4,
|
|
499
506
|
minor: 1,
|
|
500
|
-
patch:
|
|
507
|
+
patch: 13
|
|
501
508
|
}, E = /* @__PURE__ */ v("$ZodType", (t, e) => {
|
|
502
509
|
var n;
|
|
503
|
-
t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version =
|
|
510
|
+
t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = io;
|
|
504
511
|
const r = [...t._zod.def.checks ?? []];
|
|
505
512
|
t._zod.traits.has("$ZodCheck") && r.unshift(t);
|
|
506
513
|
for (const o of r)
|
|
@@ -563,20 +570,20 @@ const oo = {
|
|
|
563
570
|
t["~standard"] = {
|
|
564
571
|
validate: (o) => {
|
|
565
572
|
try {
|
|
566
|
-
const i =
|
|
573
|
+
const i = Hr(t, o);
|
|
567
574
|
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
568
575
|
} catch {
|
|
569
|
-
return
|
|
576
|
+
return Wr(t, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
570
577
|
}
|
|
571
578
|
},
|
|
572
579
|
vendor: "zod",
|
|
573
580
|
version: 1
|
|
574
581
|
};
|
|
575
|
-
}),
|
|
582
|
+
}), so = /* @__PURE__ */ v("$ZodAny", (t, e) => {
|
|
576
583
|
E.init(t, e), t._zod.parse = (n) => n;
|
|
577
|
-
}),
|
|
584
|
+
}), ao = /* @__PURE__ */ v("$ZodUnknown", (t, e) => {
|
|
578
585
|
E.init(t, e), t._zod.parse = (n) => n;
|
|
579
|
-
}),
|
|
586
|
+
}), lo = /* @__PURE__ */ v("$ZodNever", (t, e) => {
|
|
580
587
|
E.init(t, e), t._zod.parse = (n, r) => (n.issues.push({
|
|
581
588
|
expected: "never",
|
|
582
589
|
code: "invalid_type",
|
|
@@ -585,9 +592,9 @@ const oo = {
|
|
|
585
592
|
}), n);
|
|
586
593
|
});
|
|
587
594
|
function Ht(t, e, n) {
|
|
588
|
-
t.issues.length && e.issues.push(...
|
|
595
|
+
t.issues.length && e.issues.push(...On(n, t.issues)), e.value[n] = t.value;
|
|
589
596
|
}
|
|
590
|
-
const
|
|
597
|
+
const co = /* @__PURE__ */ v("$ZodArray", (t, e) => {
|
|
591
598
|
E.init(t, e), t._zod.parse = (n, r) => {
|
|
592
599
|
const o = n.value;
|
|
593
600
|
if (!Array.isArray(o))
|
|
@@ -610,14 +617,14 @@ const lo = /* @__PURE__ */ v("$ZodArray", (t, e) => {
|
|
|
610
617
|
};
|
|
611
618
|
});
|
|
612
619
|
function Le(t, e, n, r) {
|
|
613
|
-
t.issues.length && e.issues.push(...
|
|
620
|
+
t.issues.length && e.issues.push(...On(n, t.issues)), t.value === void 0 ? n in r && (e.value[n] = void 0) : e.value[n] = t.value;
|
|
614
621
|
}
|
|
615
|
-
function
|
|
622
|
+
function $n(t) {
|
|
616
623
|
const e = Object.keys(t.shape);
|
|
617
624
|
for (const r of e)
|
|
618
625
|
if (!t.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
619
626
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
620
|
-
const n =
|
|
627
|
+
const n = Ir(t.shape);
|
|
621
628
|
return {
|
|
622
629
|
...t,
|
|
623
630
|
keys: e,
|
|
@@ -626,9 +633,9 @@ function Mn(t) {
|
|
|
626
633
|
optionalKeys: new Set(n)
|
|
627
634
|
};
|
|
628
635
|
}
|
|
629
|
-
function
|
|
636
|
+
function jn(t, e, n, r, o, i) {
|
|
630
637
|
const s = [], l = o.keySet, a = o.catchall._zod, c = a.def.type;
|
|
631
|
-
for (const u
|
|
638
|
+
for (const u in e) {
|
|
632
639
|
if (l.has(u))
|
|
633
640
|
continue;
|
|
634
641
|
if (c === "never") {
|
|
@@ -645,7 +652,7 @@ function $n(t, e, n, r, o, i) {
|
|
|
645
652
|
inst: i
|
|
646
653
|
}), t.length ? Promise.all(t).then(() => n) : n;
|
|
647
654
|
}
|
|
648
|
-
const
|
|
655
|
+
const uo = /* @__PURE__ */ v("$ZodObject", (t, e) => {
|
|
649
656
|
if (E.init(t, e), !Object.getOwnPropertyDescriptor(e, "shape")?.get) {
|
|
650
657
|
const l = e.shape;
|
|
651
658
|
Object.defineProperty(e, "shape", {
|
|
@@ -657,7 +664,7 @@ const co = /* @__PURE__ */ v("$ZodObject", (t, e) => {
|
|
|
657
664
|
}
|
|
658
665
|
});
|
|
659
666
|
}
|
|
660
|
-
const r = St(() =>
|
|
667
|
+
const r = St(() => $n(e));
|
|
661
668
|
P(t._zod, "propValues", () => {
|
|
662
669
|
const l = e.shape, a = {};
|
|
663
670
|
for (const c in l) {
|
|
@@ -688,12 +695,12 @@ const co = /* @__PURE__ */ v("$ZodObject", (t, e) => {
|
|
|
688
695
|
const m = h[p]._zod.run({ value: c[p], issues: [] }, a);
|
|
689
696
|
m instanceof Promise ? u.push(m.then((w) => Le(w, l, p, c))) : Le(m, l, p, c);
|
|
690
697
|
}
|
|
691
|
-
return i ?
|
|
698
|
+
return i ? jn(u, c, l, a, r.value, t) : u.length ? Promise.all(u).then(() => l) : l;
|
|
692
699
|
};
|
|
693
|
-
}),
|
|
694
|
-
|
|
695
|
-
const n = t._zod.parse, r = St(() =>
|
|
696
|
-
const d = new
|
|
700
|
+
}), ho = /* @__PURE__ */ v("$ZodObjectJIT", (t, e) => {
|
|
701
|
+
uo.init(t, e);
|
|
702
|
+
const n = t._zod.parse, r = St(() => $n(e)), o = (p) => {
|
|
703
|
+
const d = new oo(["shape", "payload", "ctx"]), m = r.value, w = (_) => {
|
|
697
704
|
const k = Ft(_);
|
|
698
705
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
699
706
|
};
|
|
@@ -729,12 +736,12 @@ const co = /* @__PURE__ */ v("$ZodObject", (t, e) => {
|
|
|
729
736
|
return (_, k) => g(p, _, k);
|
|
730
737
|
};
|
|
731
738
|
let i;
|
|
732
|
-
const s = xe, l = !
|
|
739
|
+
const s = xe, l = !En.jitless, c = l && xr.value, u = e.catchall;
|
|
733
740
|
let h;
|
|
734
741
|
t._zod.parse = (p, d) => {
|
|
735
742
|
h ?? (h = r.value);
|
|
736
743
|
const m = p.value;
|
|
737
|
-
return s(m) ? l && c && d?.async === !1 && d.jitless !== !0 ? (i || (i = o(e.shape)), p = i(p, d), u ?
|
|
744
|
+
return s(m) ? l && c && d?.async === !1 && d.jitless !== !0 ? (i || (i = o(e.shape)), p = i(p, d), u ? jn([], m, p, d, h, t) : p) : n(p, d) : (p.issues.push({
|
|
738
745
|
expected: "object",
|
|
739
746
|
code: "invalid_type",
|
|
740
747
|
input: m,
|
|
@@ -754,7 +761,7 @@ function Wt(t, e, n, r) {
|
|
|
754
761
|
errors: t.map((i) => i.issues.map((s) => Y(s, r, J())))
|
|
755
762
|
}), e);
|
|
756
763
|
}
|
|
757
|
-
const
|
|
764
|
+
const po = /* @__PURE__ */ v("$ZodUnion", (t, e) => {
|
|
758
765
|
E.init(t, e), P(t._zod, "optin", () => e.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), P(t._zod, "optout", () => e.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), P(t._zod, "values", () => {
|
|
759
766
|
if (e.options.every((o) => o._zod.values))
|
|
760
767
|
return new Set(e.options.flatMap((o) => Array.from(o._zod.values)));
|
|
@@ -785,7 +792,7 @@ const ho = /* @__PURE__ */ v("$ZodUnion", (t, e) => {
|
|
|
785
792
|
}
|
|
786
793
|
return s ? Promise.all(l).then((a) => Wt(a, o, t, i)) : Wt(l, o, t, i);
|
|
787
794
|
};
|
|
788
|
-
}),
|
|
795
|
+
}), mo = /* @__PURE__ */ v("$ZodIntersection", (t, e) => {
|
|
789
796
|
E.init(t, e), t._zod.parse = (n, r) => {
|
|
790
797
|
const o = n.value, i = e.left._zod.run({ value: o, issues: [] }, r), s = e.right._zod.run({ value: o, issues: [] }, r);
|
|
791
798
|
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, c]) => Zt(n, a, c)) : Zt(n, i, s);
|
|
@@ -834,10 +841,10 @@ function Zt(t, e, n) {
|
|
|
834
841
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
835
842
|
return t.value = r.data, t;
|
|
836
843
|
}
|
|
837
|
-
const
|
|
844
|
+
const fo = /* @__PURE__ */ v("$ZodEnum", (t, e) => {
|
|
838
845
|
E.init(t, e);
|
|
839
|
-
const n =
|
|
840
|
-
t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
846
|
+
const n = Er(e.entries), r = new Set(n);
|
|
847
|
+
t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((o) => Lr.has(typeof o)).map((o) => typeof o == "string" ? Or(o) : o.toString()).join("|")})$`), t._zod.parse = (o, i) => {
|
|
841
848
|
const s = o.value;
|
|
842
849
|
return r.has(s) || o.issues.push({
|
|
843
850
|
code: "invalid_value",
|
|
@@ -846,10 +853,10 @@ const mo = /* @__PURE__ */ v("$ZodEnum", (t, e) => {
|
|
|
846
853
|
inst: t
|
|
847
854
|
}), o;
|
|
848
855
|
};
|
|
849
|
-
}),
|
|
856
|
+
}), go = /* @__PURE__ */ v("$ZodTransform", (t, e) => {
|
|
850
857
|
E.init(t, e), t._zod.parse = (n, r) => {
|
|
851
858
|
if (r.direction === "backward")
|
|
852
|
-
throw new
|
|
859
|
+
throw new Nn(t.constructor.name);
|
|
853
860
|
const o = e.transform(n.value, n);
|
|
854
861
|
if (r.async)
|
|
855
862
|
return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
|
|
@@ -861,7 +868,7 @@ const mo = /* @__PURE__ */ v("$ZodEnum", (t, e) => {
|
|
|
861
868
|
function qt(t, e) {
|
|
862
869
|
return t.issues.length && e === void 0 ? { issues: [], value: void 0 } : t;
|
|
863
870
|
}
|
|
864
|
-
const
|
|
871
|
+
const yo = /* @__PURE__ */ v("$ZodOptional", (t, e) => {
|
|
865
872
|
E.init(t, e), t._zod.optin = "optional", t._zod.optout = "optional", P(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, void 0]) : void 0), P(t._zod, "pattern", () => {
|
|
866
873
|
const n = e.innerType._zod.pattern;
|
|
867
874
|
return n ? new RegExp(`^(${Ct(n.source)})?$`) : void 0;
|
|
@@ -872,12 +879,12 @@ const go = /* @__PURE__ */ v("$ZodOptional", (t, e) => {
|
|
|
872
879
|
}
|
|
873
880
|
return n.value === void 0 ? n : e.innerType._zod.run(n, r);
|
|
874
881
|
};
|
|
875
|
-
}),
|
|
882
|
+
}), _o = /* @__PURE__ */ v("$ZodNullable", (t, e) => {
|
|
876
883
|
E.init(t, e), P(t._zod, "optin", () => e.innerType._zod.optin), P(t._zod, "optout", () => e.innerType._zod.optout), P(t._zod, "pattern", () => {
|
|
877
884
|
const n = e.innerType._zod.pattern;
|
|
878
885
|
return n ? new RegExp(`^(${Ct(n.source)}|null)$`) : void 0;
|
|
879
886
|
}), P(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, null]) : void 0), t._zod.parse = (n, r) => n.value === null ? n : e.innerType._zod.run(n, r);
|
|
880
|
-
}),
|
|
887
|
+
}), bo = /* @__PURE__ */ v("$ZodDefault", (t, e) => {
|
|
881
888
|
E.init(t, e), t._zod.optin = "optional", P(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => {
|
|
882
889
|
if (r.direction === "backward")
|
|
883
890
|
return e.innerType._zod.run(n, r);
|
|
@@ -890,9 +897,9 @@ const go = /* @__PURE__ */ v("$ZodOptional", (t, e) => {
|
|
|
890
897
|
function Vt(t, e) {
|
|
891
898
|
return t.value === void 0 && (t.value = e.defaultValue), t;
|
|
892
899
|
}
|
|
893
|
-
const
|
|
900
|
+
const wo = /* @__PURE__ */ v("$ZodPrefault", (t, e) => {
|
|
894
901
|
E.init(t, e), t._zod.optin = "optional", P(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = e.defaultValue), e.innerType._zod.run(n, r));
|
|
895
|
-
}),
|
|
902
|
+
}), vo = /* @__PURE__ */ v("$ZodNonOptional", (t, e) => {
|
|
896
903
|
E.init(t, e), P(t._zod, "values", () => {
|
|
897
904
|
const n = e.innerType._zod.values;
|
|
898
905
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
@@ -909,7 +916,7 @@ function Kt(t, e) {
|
|
|
909
916
|
inst: e
|
|
910
917
|
}), t;
|
|
911
918
|
}
|
|
912
|
-
const
|
|
919
|
+
const So = /* @__PURE__ */ v("$ZodCatch", (t, e) => {
|
|
913
920
|
E.init(t, e), P(t._zod, "optin", () => e.innerType._zod.optin), P(t._zod, "optout", () => e.innerType._zod.optout), P(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => {
|
|
914
921
|
if (r.direction === "backward")
|
|
915
922
|
return e.innerType._zod.run(n, r);
|
|
@@ -928,7 +935,7 @@ const vo = /* @__PURE__ */ v("$ZodCatch", (t, e) => {
|
|
|
928
935
|
input: n.value
|
|
929
936
|
}), n.issues = []), n);
|
|
930
937
|
};
|
|
931
|
-
}),
|
|
938
|
+
}), ko = /* @__PURE__ */ v("$ZodPipe", (t, e) => {
|
|
932
939
|
E.init(t, e), P(t._zod, "values", () => e.in._zod.values), P(t._zod, "optin", () => e.in._zod.optin), P(t._zod, "optout", () => e.out._zod.optout), P(t._zod, "propValues", () => e.in._zod.propValues), t._zod.parse = (n, r) => {
|
|
933
940
|
if (r.direction === "backward") {
|
|
934
941
|
const i = e.out._zod.run(n, r);
|
|
@@ -941,8 +948,8 @@ const vo = /* @__PURE__ */ v("$ZodCatch", (t, e) => {
|
|
|
941
948
|
function ke(t, e, n) {
|
|
942
949
|
return t.issues.length ? (t.aborted = !0, t) : e._zod.run({ value: t.value, issues: t.issues }, n);
|
|
943
950
|
}
|
|
944
|
-
const
|
|
945
|
-
E.init(t, e), P(t._zod, "propValues", () => e.innerType._zod.propValues), P(t._zod, "values", () => e.innerType._zod.values), P(t._zod, "optin", () => e.innerType
|
|
951
|
+
const Co = /* @__PURE__ */ v("$ZodReadonly", (t, e) => {
|
|
952
|
+
E.init(t, e), P(t._zod, "propValues", () => e.innerType._zod.propValues), P(t._zod, "values", () => e.innerType._zod.values), P(t._zod, "optin", () => e.innerType?._zod?.optin), P(t._zod, "optout", () => e.innerType?._zod?.optout), t._zod.parse = (n, r) => {
|
|
946
953
|
if (r.direction === "backward")
|
|
947
954
|
return e.innerType._zod.run(n, r);
|
|
948
955
|
const o = e.innerType._zod.run(n, r);
|
|
@@ -952,7 +959,7 @@ const ko = /* @__PURE__ */ v("$ZodReadonly", (t, e) => {
|
|
|
952
959
|
function Jt(t) {
|
|
953
960
|
return t.value = Object.freeze(t.value), t;
|
|
954
961
|
}
|
|
955
|
-
const
|
|
962
|
+
const To = /* @__PURE__ */ v("$ZodCustom", (t, e) => {
|
|
956
963
|
le.init(t, e), E.init(t, e), t._zod.parse = (n, r) => n, t._zod.check = (n) => {
|
|
957
964
|
const r = n.value, o = e.fn(r);
|
|
958
965
|
if (o instanceof Promise)
|
|
@@ -975,7 +982,8 @@ function Yt(t, e, n, r) {
|
|
|
975
982
|
r._zod.def.params && (o.params = r._zod.def.params), e.issues.push(fe(o));
|
|
976
983
|
}
|
|
977
984
|
}
|
|
978
|
-
|
|
985
|
+
var Xt;
|
|
986
|
+
class Po {
|
|
979
987
|
constructor() {
|
|
980
988
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
981
989
|
}
|
|
@@ -1009,54 +1017,55 @@ class To {
|
|
|
1009
1017
|
return this._map.has(e);
|
|
1010
1018
|
}
|
|
1011
1019
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return new
|
|
1020
|
+
function Ro() {
|
|
1021
|
+
return new Po();
|
|
1014
1022
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1023
|
+
(Xt = globalThis).__zod_globalRegistry ?? (Xt.__zod_globalRegistry = Ro());
|
|
1024
|
+
const Ce = globalThis.__zod_globalRegistry;
|
|
1025
|
+
function Ao(t) {
|
|
1017
1026
|
return new t({
|
|
1018
1027
|
type: "any"
|
|
1019
1028
|
});
|
|
1020
1029
|
}
|
|
1021
|
-
function
|
|
1030
|
+
function No(t) {
|
|
1022
1031
|
return new t({
|
|
1023
1032
|
type: "unknown"
|
|
1024
1033
|
});
|
|
1025
1034
|
}
|
|
1026
|
-
function
|
|
1035
|
+
function Eo(t, e) {
|
|
1027
1036
|
return new t({
|
|
1028
1037
|
type: "never",
|
|
1029
1038
|
...j(e)
|
|
1030
1039
|
});
|
|
1031
1040
|
}
|
|
1032
|
-
function
|
|
1033
|
-
return new
|
|
1041
|
+
function xo(t, e) {
|
|
1042
|
+
return new eo({
|
|
1034
1043
|
check: "max_length",
|
|
1035
1044
|
...j(e),
|
|
1036
1045
|
maximum: t
|
|
1037
1046
|
});
|
|
1038
1047
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return new
|
|
1048
|
+
function Qt(t, e) {
|
|
1049
|
+
return new to({
|
|
1041
1050
|
check: "min_length",
|
|
1042
1051
|
...j(e),
|
|
1043
1052
|
minimum: t
|
|
1044
1053
|
});
|
|
1045
1054
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return new
|
|
1055
|
+
function Lo(t, e) {
|
|
1056
|
+
return new no({
|
|
1048
1057
|
check: "length_equals",
|
|
1049
1058
|
...j(e),
|
|
1050
1059
|
length: t
|
|
1051
1060
|
});
|
|
1052
1061
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return new
|
|
1062
|
+
function Oo(t) {
|
|
1063
|
+
return new ro({
|
|
1055
1064
|
check: "overwrite",
|
|
1056
1065
|
tx: t
|
|
1057
1066
|
});
|
|
1058
1067
|
}
|
|
1059
|
-
function
|
|
1068
|
+
function Io(t, e, n) {
|
|
1060
1069
|
return new t({
|
|
1061
1070
|
type: "array",
|
|
1062
1071
|
element: e,
|
|
@@ -1066,7 +1075,7 @@ function Oo(t, e, n) {
|
|
|
1066
1075
|
...j(n)
|
|
1067
1076
|
});
|
|
1068
1077
|
}
|
|
1069
|
-
function
|
|
1078
|
+
function zo(t, e, n) {
|
|
1070
1079
|
return new t({
|
|
1071
1080
|
type: "custom",
|
|
1072
1081
|
check: "custom",
|
|
@@ -1074,8 +1083,8 @@ function Io(t, e, n) {
|
|
|
1074
1083
|
...j(n)
|
|
1075
1084
|
});
|
|
1076
1085
|
}
|
|
1077
|
-
function
|
|
1078
|
-
const e =
|
|
1086
|
+
function Mo(t) {
|
|
1087
|
+
const e = $o((n) => (n.addIssue = (r) => {
|
|
1079
1088
|
if (typeof r == "string")
|
|
1080
1089
|
n.issues.push(fe(r, n.value, e._zod.def));
|
|
1081
1090
|
else {
|
|
@@ -1085,21 +1094,21 @@ function zo(t) {
|
|
|
1085
1094
|
}, t(n.value, n)));
|
|
1086
1095
|
return e;
|
|
1087
1096
|
}
|
|
1088
|
-
function
|
|
1097
|
+
function $o(t, e) {
|
|
1089
1098
|
const n = new le({
|
|
1090
1099
|
check: "custom",
|
|
1091
1100
|
...j(e)
|
|
1092
1101
|
});
|
|
1093
1102
|
return n._zod.check = t, n;
|
|
1094
1103
|
}
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1104
|
+
const jo = (t, e) => {
|
|
1105
|
+
zn.init(t, e), t.name = "ZodError", Object.defineProperties(t, {
|
|
1097
1106
|
format: {
|
|
1098
|
-
value: (n) =>
|
|
1107
|
+
value: (n) => Fr(t, n)
|
|
1099
1108
|
// enumerable: false,
|
|
1100
1109
|
},
|
|
1101
1110
|
flatten: {
|
|
1102
|
-
value: (n) =>
|
|
1111
|
+
value: (n) => Ur(t, n)
|
|
1103
1112
|
// enumerable: false,
|
|
1104
1113
|
},
|
|
1105
1114
|
addIssue: {
|
|
@@ -1121,14 +1130,14 @@ const $o = (t, e) => {
|
|
|
1121
1130
|
// enumerable: false,
|
|
1122
1131
|
}
|
|
1123
1132
|
});
|
|
1124
|
-
}, B = v("ZodError",
|
|
1133
|
+
}, B = v("ZodError", jo, {
|
|
1125
1134
|
Parent: Error
|
|
1126
|
-
}),
|
|
1135
|
+
}), Do = /* @__PURE__ */ Pt(B), Bo = /* @__PURE__ */ Rt(B), Go = /* @__PURE__ */ He(B), Uo = /* @__PURE__ */ We(B), Fo = /* @__PURE__ */ Zr(B), Ho = /* @__PURE__ */ qr(B), Wo = /* @__PURE__ */ Vr(B), Zo = /* @__PURE__ */ Kr(B), qo = /* @__PURE__ */ Jr(B), Vo = /* @__PURE__ */ Yr(B), Ko = /* @__PURE__ */ Xr(B), Jo = /* @__PURE__ */ Qr(B), O = /* @__PURE__ */ v("ZodType", (t, e) => (E.init(t, e), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...n) => t.clone(Q(e, {
|
|
1127
1136
|
checks: [
|
|
1128
1137
|
...e.checks ?? [],
|
|
1129
1138
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
1130
1139
|
]
|
|
1131
|
-
})), t.clone = (n, r) => Z(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) =>
|
|
1140
|
+
})), t.clone = (n, r) => Z(t, n, r), t.brand = () => t, t.register = ((n, r) => (n.add(t, r), t)), t.parse = (n, r) => Do(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Go(t, n, r), t.parseAsync = async (n, r) => Bo(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => Uo(t, n, r), t.spa = t.safeParseAsync, t.encode = (n, r) => Fo(t, n, r), t.decode = (n, r) => Ho(t, n, r), t.encodeAsync = async (n, r) => Wo(t, n, r), t.decodeAsync = async (n, r) => Zo(t, n, r), t.safeEncode = (n, r) => qo(t, n, r), t.safeDecode = (n, r) => Vo(t, n, r), t.safeEncodeAsync = async (n, r) => Ko(t, n, r), t.safeDecodeAsync = async (n, r) => Jo(t, n, r), t.refine = (n, r) => t.check(ki(n, r)), t.superRefine = (n) => t.check(Ci(n)), t.overwrite = (n) => t.check(Oo(n)), t.optional = () => tn(t), t.nullable = () => nn(t), t.nullish = () => tn(nn(t)), t.nonoptional = (n) => gi(t, n), t.array = () => ni(t), t.or = (n) => si([t, n]), t.and = (n) => li(t, n), t.transform = (n) => rn(t, ui(n)), t.default = (n) => di(t, n), t.prefault = (n) => fi(t, n), t.catch = (n) => _i(t, n), t.pipe = (n) => rn(t, n), t.readonly = () => vi(t), t.describe = (n) => {
|
|
1132
1141
|
const r = t.clone();
|
|
1133
1142
|
return Ce.add(r, { description: n }), r;
|
|
1134
1143
|
}, Object.defineProperty(t, "description", {
|
|
@@ -1141,63 +1150,63 @@ const $o = (t, e) => {
|
|
|
1141
1150
|
return Ce.get(t);
|
|
1142
1151
|
const r = t.clone();
|
|
1143
1152
|
return Ce.add(r, n[0]), r;
|
|
1144
|
-
}, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)),
|
|
1145
|
-
io.init(t, e), O.init(t, e);
|
|
1146
|
-
});
|
|
1147
|
-
function Xe() {
|
|
1148
|
-
return Ro(Jo);
|
|
1149
|
-
}
|
|
1150
|
-
const Yo = /* @__PURE__ */ v("ZodUnknown", (t, e) => {
|
|
1153
|
+
}, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), Yo = /* @__PURE__ */ v("ZodAny", (t, e) => {
|
|
1151
1154
|
so.init(t, e), O.init(t, e);
|
|
1152
1155
|
});
|
|
1153
|
-
function
|
|
1156
|
+
function Xe() {
|
|
1154
1157
|
return Ao(Yo);
|
|
1155
1158
|
}
|
|
1156
|
-
const Xo = /* @__PURE__ */ v("
|
|
1159
|
+
const Xo = /* @__PURE__ */ v("ZodUnknown", (t, e) => {
|
|
1157
1160
|
ao.init(t, e), O.init(t, e);
|
|
1158
1161
|
});
|
|
1159
|
-
function
|
|
1160
|
-
return No(Xo
|
|
1162
|
+
function en() {
|
|
1163
|
+
return No(Xo);
|
|
1161
1164
|
}
|
|
1162
|
-
const
|
|
1163
|
-
lo.init(t, e), O.init(t, e)
|
|
1165
|
+
const Qo = /* @__PURE__ */ v("ZodNever", (t, e) => {
|
|
1166
|
+
lo.init(t, e), O.init(t, e);
|
|
1164
1167
|
});
|
|
1165
|
-
function
|
|
1166
|
-
return
|
|
1168
|
+
function ei(t) {
|
|
1169
|
+
return Eo(Qo, t);
|
|
1167
1170
|
}
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1171
|
+
const ti = /* @__PURE__ */ v("ZodArray", (t, e) => {
|
|
1172
|
+
co.init(t, e), O.init(t, e), t.element = e.element, t.min = (n, r) => t.check(Qt(n, r)), t.nonempty = (n) => t.check(Qt(1, n)), t.max = (n, r) => t.check(xo(n, r)), t.length = (n, r) => t.check(Lo(n, r)), t.unwrap = () => t.element;
|
|
1170
1173
|
});
|
|
1171
|
-
function
|
|
1174
|
+
function ni(t, e) {
|
|
1175
|
+
return Io(ti, t, e);
|
|
1176
|
+
}
|
|
1177
|
+
const ri = /* @__PURE__ */ v("ZodObject", (t, e) => {
|
|
1178
|
+
ho.init(t, e), O.init(t, e), P(t, "shape", () => e.shape), t.keyof = () => Dn(Object.keys(t._zod.def.shape)), t.catchall = (n) => t.clone({ ...t._zod.def, catchall: n }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: en() }), t.loose = () => t.clone({ ...t._zod.def, catchall: en() }), t.strict = () => t.clone({ ...t._zod.def, catchall: ei() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (n) => $r(t, n), t.safeExtend = (n) => jr(t, n), t.merge = (n) => Dr(t, n), t.pick = (n) => zr(t, n), t.omit = (n) => Mr(t, n), t.partial = (...n) => Br(Bn, t, n[0]), t.required = (...n) => Gr(Gn, t, n[0]);
|
|
1179
|
+
});
|
|
1180
|
+
function oi(t, e) {
|
|
1172
1181
|
const n = {
|
|
1173
1182
|
type: "object",
|
|
1174
1183
|
shape: t ?? {},
|
|
1175
1184
|
...j(e)
|
|
1176
1185
|
};
|
|
1177
|
-
return new
|
|
1186
|
+
return new ri(n);
|
|
1178
1187
|
}
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1188
|
+
const ii = /* @__PURE__ */ v("ZodUnion", (t, e) => {
|
|
1189
|
+
po.init(t, e), O.init(t, e), t.options = e.options;
|
|
1181
1190
|
});
|
|
1182
|
-
function
|
|
1183
|
-
return new
|
|
1191
|
+
function si(t, e) {
|
|
1192
|
+
return new ii({
|
|
1184
1193
|
type: "union",
|
|
1185
1194
|
options: t,
|
|
1186
1195
|
...j(e)
|
|
1187
1196
|
});
|
|
1188
1197
|
}
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1198
|
+
const ai = /* @__PURE__ */ v("ZodIntersection", (t, e) => {
|
|
1199
|
+
mo.init(t, e), O.init(t, e);
|
|
1191
1200
|
});
|
|
1192
|
-
function
|
|
1193
|
-
return new
|
|
1201
|
+
function li(t, e) {
|
|
1202
|
+
return new ai({
|
|
1194
1203
|
type: "intersection",
|
|
1195
1204
|
left: t,
|
|
1196
1205
|
right: e
|
|
1197
1206
|
});
|
|
1198
1207
|
}
|
|
1199
1208
|
const ct = /* @__PURE__ */ v("ZodEnum", (t, e) => {
|
|
1200
|
-
|
|
1209
|
+
fo.init(t, e), O.init(t, e), t.enum = e.entries, t.options = Object.values(e.entries);
|
|
1201
1210
|
const n = new Set(Object.keys(e.entries));
|
|
1202
1211
|
t.extract = (r, o) => {
|
|
1203
1212
|
const i = {};
|
|
@@ -1227,7 +1236,7 @@ const ct = /* @__PURE__ */ v("ZodEnum", (t, e) => {
|
|
|
1227
1236
|
});
|
|
1228
1237
|
};
|
|
1229
1238
|
});
|
|
1230
|
-
function
|
|
1239
|
+
function Dn(t, e) {
|
|
1231
1240
|
const n = Array.isArray(t) ? Object.fromEntries(t.map((r) => [r, r])) : t;
|
|
1232
1241
|
return new ct({
|
|
1233
1242
|
type: "enum",
|
|
@@ -1235,10 +1244,10 @@ function jn(t, e) {
|
|
|
1235
1244
|
...j(e)
|
|
1236
1245
|
});
|
|
1237
1246
|
}
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1247
|
+
const ci = /* @__PURE__ */ v("ZodTransform", (t, e) => {
|
|
1248
|
+
go.init(t, e), O.init(t, e), t._zod.parse = (n, r) => {
|
|
1240
1249
|
if (r.direction === "backward")
|
|
1241
|
-
throw new
|
|
1250
|
+
throw new Nn(t.constructor.name);
|
|
1242
1251
|
n.addIssue = (i) => {
|
|
1243
1252
|
if (typeof i == "string")
|
|
1244
1253
|
n.issues.push(fe(i, n.value, e));
|
|
@@ -1251,104 +1260,104 @@ const li = /* @__PURE__ */ v("ZodTransform", (t, e) => {
|
|
|
1251
1260
|
return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
|
|
1252
1261
|
};
|
|
1253
1262
|
});
|
|
1254
|
-
function
|
|
1255
|
-
return new
|
|
1263
|
+
function ui(t) {
|
|
1264
|
+
return new ci({
|
|
1256
1265
|
type: "transform",
|
|
1257
1266
|
transform: t
|
|
1258
1267
|
});
|
|
1259
1268
|
}
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1269
|
+
const Bn = /* @__PURE__ */ v("ZodOptional", (t, e) => {
|
|
1270
|
+
yo.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType;
|
|
1262
1271
|
});
|
|
1263
|
-
function
|
|
1264
|
-
return new
|
|
1272
|
+
function tn(t) {
|
|
1273
|
+
return new Bn({
|
|
1265
1274
|
type: "optional",
|
|
1266
1275
|
innerType: t
|
|
1267
1276
|
});
|
|
1268
1277
|
}
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1278
|
+
const hi = /* @__PURE__ */ v("ZodNullable", (t, e) => {
|
|
1279
|
+
_o.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType;
|
|
1271
1280
|
});
|
|
1272
|
-
function
|
|
1273
|
-
return new
|
|
1281
|
+
function nn(t) {
|
|
1282
|
+
return new hi({
|
|
1274
1283
|
type: "nullable",
|
|
1275
1284
|
innerType: t
|
|
1276
1285
|
});
|
|
1277
1286
|
}
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1287
|
+
const pi = /* @__PURE__ */ v("ZodDefault", (t, e) => {
|
|
1288
|
+
bo.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType, t.removeDefault = t.unwrap;
|
|
1280
1289
|
});
|
|
1281
|
-
function
|
|
1282
|
-
return new
|
|
1290
|
+
function di(t, e) {
|
|
1291
|
+
return new pi({
|
|
1283
1292
|
type: "default",
|
|
1284
1293
|
innerType: t,
|
|
1285
1294
|
get defaultValue() {
|
|
1286
|
-
return typeof e == "function" ? e() :
|
|
1295
|
+
return typeof e == "function" ? e() : Ln(e);
|
|
1287
1296
|
}
|
|
1288
1297
|
});
|
|
1289
1298
|
}
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1299
|
+
const mi = /* @__PURE__ */ v("ZodPrefault", (t, e) => {
|
|
1300
|
+
wo.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType;
|
|
1292
1301
|
});
|
|
1293
|
-
function
|
|
1294
|
-
return new
|
|
1302
|
+
function fi(t, e) {
|
|
1303
|
+
return new mi({
|
|
1295
1304
|
type: "prefault",
|
|
1296
1305
|
innerType: t,
|
|
1297
1306
|
get defaultValue() {
|
|
1298
|
-
return typeof e == "function" ? e() :
|
|
1307
|
+
return typeof e == "function" ? e() : Ln(e);
|
|
1299
1308
|
}
|
|
1300
1309
|
});
|
|
1301
1310
|
}
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1311
|
+
const Gn = /* @__PURE__ */ v("ZodNonOptional", (t, e) => {
|
|
1312
|
+
vo.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType;
|
|
1304
1313
|
});
|
|
1305
|
-
function
|
|
1306
|
-
return new
|
|
1314
|
+
function gi(t, e) {
|
|
1315
|
+
return new Gn({
|
|
1307
1316
|
type: "nonoptional",
|
|
1308
1317
|
innerType: t,
|
|
1309
1318
|
...j(e)
|
|
1310
1319
|
});
|
|
1311
1320
|
}
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1321
|
+
const yi = /* @__PURE__ */ v("ZodCatch", (t, e) => {
|
|
1322
|
+
So.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType, t.removeCatch = t.unwrap;
|
|
1314
1323
|
});
|
|
1315
|
-
function
|
|
1316
|
-
return new
|
|
1324
|
+
function _i(t, e) {
|
|
1325
|
+
return new yi({
|
|
1317
1326
|
type: "catch",
|
|
1318
1327
|
innerType: t,
|
|
1319
1328
|
catchValue: typeof e == "function" ? e : () => e
|
|
1320
1329
|
});
|
|
1321
1330
|
}
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1331
|
+
const bi = /* @__PURE__ */ v("ZodPipe", (t, e) => {
|
|
1332
|
+
ko.init(t, e), O.init(t, e), t.in = e.in, t.out = e.out;
|
|
1324
1333
|
});
|
|
1325
|
-
function
|
|
1326
|
-
return new
|
|
1334
|
+
function rn(t, e) {
|
|
1335
|
+
return new bi({
|
|
1327
1336
|
type: "pipe",
|
|
1328
1337
|
in: t,
|
|
1329
1338
|
out: e
|
|
1330
1339
|
// ...util.normalizeParams(params),
|
|
1331
1340
|
});
|
|
1332
1341
|
}
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1342
|
+
const wi = /* @__PURE__ */ v("ZodReadonly", (t, e) => {
|
|
1343
|
+
Co.init(t, e), O.init(t, e), t.unwrap = () => t._zod.def.innerType;
|
|
1335
1344
|
});
|
|
1336
|
-
function
|
|
1337
|
-
return new
|
|
1345
|
+
function vi(t) {
|
|
1346
|
+
return new wi({
|
|
1338
1347
|
type: "readonly",
|
|
1339
1348
|
innerType: t
|
|
1340
1349
|
});
|
|
1341
1350
|
}
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1351
|
+
const Si = /* @__PURE__ */ v("ZodCustom", (t, e) => {
|
|
1352
|
+
To.init(t, e), O.init(t, e);
|
|
1344
1353
|
});
|
|
1345
|
-
function
|
|
1346
|
-
return
|
|
1354
|
+
function ki(t, e = {}) {
|
|
1355
|
+
return zo(Si, t, e);
|
|
1347
1356
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return
|
|
1357
|
+
function Ci(t) {
|
|
1358
|
+
return Mo(t);
|
|
1350
1359
|
}
|
|
1351
|
-
const
|
|
1360
|
+
const Ti = ({ html: t, metadata: e }) => {
|
|
1352
1361
|
const n = JSON.stringify(e ?? {}), r = JSON.stringify(t);
|
|
1353
1362
|
return [
|
|
1354
1363
|
`export const metadata = ${n};`,
|
|
@@ -1357,7 +1366,7 @@ const Ci = ({ html: t, metadata: e }) => {
|
|
|
1357
1366
|
].join(`
|
|
1358
1367
|
`);
|
|
1359
1368
|
};
|
|
1360
|
-
function
|
|
1369
|
+
function Pi({ html: t, metadata: e }) {
|
|
1361
1370
|
const n = JSON.stringify(e ?? {});
|
|
1362
1371
|
return [
|
|
1363
1372
|
"<script>",
|
|
@@ -1370,7 +1379,7 @@ function Ti({ html: t, metadata: e }) {
|
|
|
1370
1379
|
].join(`
|
|
1371
1380
|
`);
|
|
1372
1381
|
}
|
|
1373
|
-
function
|
|
1382
|
+
function Ri({ html: t, metadata: e }) {
|
|
1374
1383
|
const n = JSON.stringify(e ?? {}), r = JSON.stringify(t);
|
|
1375
1384
|
return [
|
|
1376
1385
|
'import React from "react";',
|
|
@@ -1386,33 +1395,33 @@ let A = class extends Error {
|
|
|
1386
1395
|
super(e), this.name = "ShikiError";
|
|
1387
1396
|
}
|
|
1388
1397
|
};
|
|
1389
|
-
function
|
|
1398
|
+
function Ai(t) {
|
|
1390
1399
|
return At(t);
|
|
1391
1400
|
}
|
|
1392
1401
|
function At(t) {
|
|
1393
|
-
return Array.isArray(t) ?
|
|
1402
|
+
return Array.isArray(t) ? Ni(t) : t instanceof RegExp ? t : typeof t == "object" ? Ei(t) : t;
|
|
1394
1403
|
}
|
|
1395
|
-
function
|
|
1404
|
+
function Ni(t) {
|
|
1396
1405
|
let e = [];
|
|
1397
1406
|
for (let n = 0, r = t.length; n < r; n++)
|
|
1398
1407
|
e[n] = At(t[n]);
|
|
1399
1408
|
return e;
|
|
1400
1409
|
}
|
|
1401
|
-
function
|
|
1410
|
+
function Ei(t) {
|
|
1402
1411
|
let e = {};
|
|
1403
1412
|
for (let n in t)
|
|
1404
1413
|
e[n] = At(t[n]);
|
|
1405
1414
|
return e;
|
|
1406
1415
|
}
|
|
1407
|
-
function
|
|
1416
|
+
function Un(t, ...e) {
|
|
1408
1417
|
return e.forEach((n) => {
|
|
1409
1418
|
for (let r in n)
|
|
1410
1419
|
t[r] = n[r];
|
|
1411
1420
|
}), t;
|
|
1412
1421
|
}
|
|
1413
|
-
function
|
|
1422
|
+
function Fn(t) {
|
|
1414
1423
|
const e = ~t.lastIndexOf("/") || ~t.lastIndexOf("\\");
|
|
1415
|
-
return e === 0 ? t : ~e === t.length - 1 ?
|
|
1424
|
+
return e === 0 ? t : ~e === t.length - 1 ? Fn(t.substring(0, t.length - 1)) : t.substr(~e + 1);
|
|
1416
1425
|
}
|
|
1417
1426
|
var Qe = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Te = class {
|
|
1418
1427
|
static hasCaptures(t) {
|
|
@@ -1438,10 +1447,10 @@ var Qe = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Te = class {
|
|
|
1438
1447
|
});
|
|
1439
1448
|
}
|
|
1440
1449
|
};
|
|
1441
|
-
function
|
|
1450
|
+
function Hn(t, e) {
|
|
1442
1451
|
return t < e ? -1 : t > e ? 1 : 0;
|
|
1443
1452
|
}
|
|
1444
|
-
function
|
|
1453
|
+
function Wn(t, e) {
|
|
1445
1454
|
if (t === null && e === null)
|
|
1446
1455
|
return 0;
|
|
1447
1456
|
if (!t)
|
|
@@ -1451,7 +1460,7 @@ function Hn(t, e) {
|
|
|
1451
1460
|
let n = t.length, r = e.length;
|
|
1452
1461
|
if (n === r) {
|
|
1453
1462
|
for (let o = 0; o < n; o++) {
|
|
1454
|
-
let i =
|
|
1463
|
+
let i = Hn(t[o], e[o]);
|
|
1455
1464
|
if (i !== 0)
|
|
1456
1465
|
return i;
|
|
1457
1466
|
}
|
|
@@ -1459,13 +1468,13 @@ function Hn(t, e) {
|
|
|
1459
1468
|
}
|
|
1460
1469
|
return n - r;
|
|
1461
1470
|
}
|
|
1462
|
-
function
|
|
1471
|
+
function on(t) {
|
|
1463
1472
|
return !!(/^#[0-9a-f]{6}$/i.test(t) || /^#[0-9a-f]{8}$/i.test(t) || /^#[0-9a-f]{3}$/i.test(t) || /^#[0-9a-f]{4}$/i.test(t));
|
|
1464
1473
|
}
|
|
1465
|
-
function
|
|
1474
|
+
function Zn(t) {
|
|
1466
1475
|
return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
|
|
1467
1476
|
}
|
|
1468
|
-
var
|
|
1477
|
+
var qn = class {
|
|
1469
1478
|
constructor(t) {
|
|
1470
1479
|
this.fn = t;
|
|
1471
1480
|
}
|
|
@@ -1481,12 +1490,12 @@ var Zn = class {
|
|
|
1481
1490
|
this._colorMap = t, this._defaults = e, this._root = n;
|
|
1482
1491
|
}
|
|
1483
1492
|
static createFromRawTheme(t, e) {
|
|
1484
|
-
return this.createFromParsedTheme(
|
|
1493
|
+
return this.createFromParsedTheme(Oi(t), e);
|
|
1485
1494
|
}
|
|
1486
1495
|
static createFromParsedTheme(t, e) {
|
|
1487
|
-
return
|
|
1496
|
+
return zi(t, e);
|
|
1488
1497
|
}
|
|
1489
|
-
_cachedMatchRoot = new
|
|
1498
|
+
_cachedMatchRoot = new qn(
|
|
1490
1499
|
(t) => this._root.match(t)
|
|
1491
1500
|
);
|
|
1492
1501
|
getColorMap() {
|
|
@@ -1499,9 +1508,9 @@ var Zn = class {
|
|
|
1499
1508
|
if (t === null)
|
|
1500
1509
|
return this._defaults;
|
|
1501
1510
|
const e = t.scopeName, r = this._cachedMatchRoot.get(e).find(
|
|
1502
|
-
(o) =>
|
|
1511
|
+
(o) => xi(t.parent, o.parentScopes)
|
|
1503
1512
|
);
|
|
1504
|
-
return r ? new
|
|
1513
|
+
return r ? new Vn(
|
|
1505
1514
|
r.fontStyle,
|
|
1506
1515
|
r.foreground,
|
|
1507
1516
|
r.background
|
|
@@ -1546,7 +1555,7 @@ var Zn = class {
|
|
|
1546
1555
|
return r === e ? n.reverse() : void 0;
|
|
1547
1556
|
}
|
|
1548
1557
|
};
|
|
1549
|
-
function
|
|
1558
|
+
function xi(t, e) {
|
|
1550
1559
|
if (e.length === 0)
|
|
1551
1560
|
return !0;
|
|
1552
1561
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -1556,7 +1565,7 @@ function Ei(t, e) {
|
|
|
1556
1565
|
return !1;
|
|
1557
1566
|
r = e[++n], o = !0;
|
|
1558
1567
|
}
|
|
1559
|
-
for (; t && !
|
|
1568
|
+
for (; t && !Li(t.scopeName, r); ) {
|
|
1560
1569
|
if (o)
|
|
1561
1570
|
return !1;
|
|
1562
1571
|
t = t.parent;
|
|
@@ -1567,15 +1576,15 @@ function Ei(t, e) {
|
|
|
1567
1576
|
}
|
|
1568
1577
|
return !0;
|
|
1569
1578
|
}
|
|
1570
|
-
function
|
|
1579
|
+
function Li(t, e) {
|
|
1571
1580
|
return e === t || t.startsWith(e) && t[e.length] === ".";
|
|
1572
1581
|
}
|
|
1573
|
-
var
|
|
1582
|
+
var Vn = class {
|
|
1574
1583
|
constructor(t, e, n) {
|
|
1575
1584
|
this.fontStyle = t, this.foregroundId = e, this.backgroundId = n;
|
|
1576
1585
|
}
|
|
1577
1586
|
};
|
|
1578
|
-
function
|
|
1587
|
+
function Oi(t) {
|
|
1579
1588
|
if (!t)
|
|
1580
1589
|
return [];
|
|
1581
1590
|
if (!t.settings || !Array.isArray(t.settings))
|
|
@@ -1611,12 +1620,12 @@ function Li(t) {
|
|
|
1611
1620
|
}
|
|
1612
1621
|
}
|
|
1613
1622
|
let c = null;
|
|
1614
|
-
typeof s.settings.foreground == "string" &&
|
|
1623
|
+
typeof s.settings.foreground == "string" && on(s.settings.foreground) && (c = s.settings.foreground);
|
|
1615
1624
|
let u = null;
|
|
1616
|
-
typeof s.settings.background == "string" &&
|
|
1625
|
+
typeof s.settings.background == "string" && on(s.settings.background) && (u = s.settings.background);
|
|
1617
1626
|
for (let h = 0, p = l.length; h < p; h++) {
|
|
1618
1627
|
let m = l[h].trim().split(" "), w = m[m.length - 1], b = null;
|
|
1619
|
-
m.length > 1 && (b = m.slice(0, m.length - 1), b.reverse()), n[r++] = new
|
|
1628
|
+
m.length > 1 && (b = m.slice(0, m.length - 1), b.reverse()), n[r++] = new Ii(
|
|
1620
1629
|
w,
|
|
1621
1630
|
b,
|
|
1622
1631
|
o,
|
|
@@ -1628,29 +1637,29 @@ function Li(t) {
|
|
|
1628
1637
|
}
|
|
1629
1638
|
return n;
|
|
1630
1639
|
}
|
|
1631
|
-
var
|
|
1640
|
+
var Ii = class {
|
|
1632
1641
|
constructor(t, e, n, r, o, i) {
|
|
1633
1642
|
this.scope = t, this.parentScopes = e, this.index = n, this.fontStyle = r, this.foreground = o, this.background = i;
|
|
1634
1643
|
}
|
|
1635
1644
|
}, z = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(z || {});
|
|
1636
|
-
function
|
|
1645
|
+
function zi(t, e) {
|
|
1637
1646
|
t.sort((a, c) => {
|
|
1638
|
-
let u =
|
|
1639
|
-
return u !== 0 || (u =
|
|
1647
|
+
let u = Hn(a.scope, c.scope);
|
|
1648
|
+
return u !== 0 || (u = Wn(a.parentScopes, c.parentScopes), u !== 0) ? u : a.index - c.index;
|
|
1640
1649
|
});
|
|
1641
1650
|
let n = 0, r = "#000000", o = "#ffffff";
|
|
1642
1651
|
for (; t.length >= 1 && t[0].scope === ""; ) {
|
|
1643
1652
|
let a = t.shift();
|
|
1644
1653
|
a.fontStyle !== -1 && (n = a.fontStyle), a.foreground !== null && (r = a.foreground), a.background !== null && (o = a.background);
|
|
1645
1654
|
}
|
|
1646
|
-
let i = new
|
|
1655
|
+
let i = new Mi(e), s = new Vn(n, i.getId(r), i.getId(o)), l = new ji(new ut(0, null, -1, 0, 0), []);
|
|
1647
1656
|
for (let a = 0, c = t.length; a < c; a++) {
|
|
1648
1657
|
let u = t[a];
|
|
1649
1658
|
l.insert(0, u.scope, u.parentScopes, u.fontStyle, i.getId(u.foreground), i.getId(u.background));
|
|
1650
1659
|
}
|
|
1651
1660
|
return new Oe(i, s, l);
|
|
1652
1661
|
}
|
|
1653
|
-
var
|
|
1662
|
+
var Mi = class {
|
|
1654
1663
|
_isFrozen;
|
|
1655
1664
|
_lastColorId;
|
|
1656
1665
|
_id2color;
|
|
@@ -1677,17 +1686,17 @@ var zi = class {
|
|
|
1677
1686
|
getColorMap() {
|
|
1678
1687
|
return this._id2color.slice(0);
|
|
1679
1688
|
}
|
|
1680
|
-
},
|
|
1689
|
+
}, $i = Object.freeze([]), ut = class Kn {
|
|
1681
1690
|
scopeDepth;
|
|
1682
1691
|
parentScopes;
|
|
1683
1692
|
fontStyle;
|
|
1684
1693
|
foreground;
|
|
1685
1694
|
background;
|
|
1686
1695
|
constructor(e, n, r, o, i) {
|
|
1687
|
-
this.scopeDepth = e, this.parentScopes = n ||
|
|
1696
|
+
this.scopeDepth = e, this.parentScopes = n || $i, this.fontStyle = r, this.foreground = o, this.background = i;
|
|
1688
1697
|
}
|
|
1689
1698
|
clone() {
|
|
1690
|
-
return new
|
|
1699
|
+
return new Kn(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
|
|
1691
1700
|
}
|
|
1692
1701
|
static cloneArr(e) {
|
|
1693
1702
|
let n = [];
|
|
@@ -1698,7 +1707,7 @@ var zi = class {
|
|
|
1698
1707
|
acceptOverwrite(e, n, r, o) {
|
|
1699
1708
|
this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, n !== -1 && (this.fontStyle = n), r !== 0 && (this.foreground = r), o !== 0 && (this.background = o);
|
|
1700
1709
|
}
|
|
1701
|
-
},
|
|
1710
|
+
}, ji = class ht {
|
|
1702
1711
|
constructor(e, n = [], r = {}) {
|
|
1703
1712
|
this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
|
|
1704
1713
|
}
|
|
@@ -1741,7 +1750,7 @@ var zi = class {
|
|
|
1741
1750
|
}
|
|
1742
1751
|
for (let s = 0, l = this._rulesWithParentScopes.length; s < l; s++) {
|
|
1743
1752
|
let a = this._rulesWithParentScopes[s];
|
|
1744
|
-
if (
|
|
1753
|
+
if (Wn(a.parentScopes, n) === 0) {
|
|
1745
1754
|
a.acceptOverwrite(e, r, o, i);
|
|
1746
1755
|
return;
|
|
1747
1756
|
}
|
|
@@ -1790,7 +1799,7 @@ var zi = class {
|
|
|
1790
1799
|
}
|
|
1791
1800
|
};
|
|
1792
1801
|
function Ie(t, e) {
|
|
1793
|
-
const n = [], r =
|
|
1802
|
+
const n = [], r = Di(t);
|
|
1794
1803
|
let o = r.next();
|
|
1795
1804
|
for (; o !== null; ) {
|
|
1796
1805
|
let a = 0;
|
|
@@ -1824,11 +1833,11 @@ function Ie(t, e) {
|
|
|
1824
1833
|
const a = l();
|
|
1825
1834
|
return o === ")" && (o = r.next()), a;
|
|
1826
1835
|
}
|
|
1827
|
-
if (
|
|
1836
|
+
if (sn(o)) {
|
|
1828
1837
|
const a = [];
|
|
1829
1838
|
do
|
|
1830
1839
|
a.push(o), o = r.next();
|
|
1831
|
-
while (
|
|
1840
|
+
while (sn(o));
|
|
1832
1841
|
return (c) => e(a, c);
|
|
1833
1842
|
}
|
|
1834
1843
|
return null;
|
|
@@ -1852,10 +1861,10 @@ function Ie(t, e) {
|
|
|
1852
1861
|
return (u) => a.some((h) => h(u));
|
|
1853
1862
|
}
|
|
1854
1863
|
}
|
|
1855
|
-
function
|
|
1864
|
+
function sn(t) {
|
|
1856
1865
|
return !!t && !!t.match(/[\w\.:]+/);
|
|
1857
1866
|
}
|
|
1858
|
-
function
|
|
1867
|
+
function Di(t) {
|
|
1859
1868
|
let e = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = e.exec(t);
|
|
1860
1869
|
return {
|
|
1861
1870
|
next: () => {
|
|
@@ -1866,7 +1875,7 @@ function ji(t) {
|
|
|
1866
1875
|
}
|
|
1867
1876
|
};
|
|
1868
1877
|
}
|
|
1869
|
-
function
|
|
1878
|
+
function Jn(t) {
|
|
1870
1879
|
typeof t.dispose == "function" && t.dispose();
|
|
1871
1880
|
}
|
|
1872
1881
|
var ge = class {
|
|
@@ -1876,14 +1885,14 @@ var ge = class {
|
|
|
1876
1885
|
toKey() {
|
|
1877
1886
|
return this.scopeName;
|
|
1878
1887
|
}
|
|
1879
|
-
},
|
|
1888
|
+
}, Bi = class {
|
|
1880
1889
|
constructor(t, e) {
|
|
1881
1890
|
this.scopeName = t, this.ruleName = e;
|
|
1882
1891
|
}
|
|
1883
1892
|
toKey() {
|
|
1884
1893
|
return `${this.scopeName}#${this.ruleName}`;
|
|
1885
1894
|
}
|
|
1886
|
-
},
|
|
1895
|
+
}, Gi = class {
|
|
1887
1896
|
_references = [];
|
|
1888
1897
|
_seenReferenceKeys = /* @__PURE__ */ new Set();
|
|
1889
1898
|
get references() {
|
|
@@ -1894,7 +1903,7 @@ var ge = class {
|
|
|
1894
1903
|
const e = t.toKey();
|
|
1895
1904
|
this._seenReferenceKeys.has(e) || (this._seenReferenceKeys.add(e), this._references.push(t));
|
|
1896
1905
|
}
|
|
1897
|
-
},
|
|
1906
|
+
}, Ui = class {
|
|
1898
1907
|
constructor(t, e) {
|
|
1899
1908
|
this.repo = t, this.initialScopeName = e, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new ge(this.initialScopeName)];
|
|
1900
1909
|
}
|
|
@@ -1904,9 +1913,9 @@ var ge = class {
|
|
|
1904
1913
|
processQueue() {
|
|
1905
1914
|
const t = this.Q;
|
|
1906
1915
|
this.Q = [];
|
|
1907
|
-
const e = new
|
|
1916
|
+
const e = new Gi();
|
|
1908
1917
|
for (const n of t)
|
|
1909
|
-
|
|
1918
|
+
Fi(n, this.initialScopeName, this.repo, e);
|
|
1910
1919
|
for (const n of e.references)
|
|
1911
1920
|
if (n instanceof ge) {
|
|
1912
1921
|
if (this.seenFullScopeRequests.has(n.scopeName))
|
|
@@ -1919,7 +1928,7 @@ var ge = class {
|
|
|
1919
1928
|
}
|
|
1920
1929
|
}
|
|
1921
1930
|
};
|
|
1922
|
-
function
|
|
1931
|
+
function Fi(t, e, n, r) {
|
|
1923
1932
|
const o = n.lookup(t.scopeName);
|
|
1924
1933
|
if (!o) {
|
|
1925
1934
|
if (t.scopeName === e)
|
|
@@ -1959,12 +1968,12 @@ function ze(t, e, n) {
|
|
|
1959
1968
|
if (n.visitedRule.has(r))
|
|
1960
1969
|
continue;
|
|
1961
1970
|
n.visitedRule.add(r);
|
|
1962
|
-
const o = r.repository ?
|
|
1971
|
+
const o = r.repository ? Un({}, e.repository, r.repository) : e.repository;
|
|
1963
1972
|
Array.isArray(r.patterns) && ze(r.patterns, { ...e, repository: o }, n);
|
|
1964
1973
|
const i = r.include;
|
|
1965
1974
|
if (!i)
|
|
1966
1975
|
continue;
|
|
1967
|
-
const s =
|
|
1976
|
+
const s = Yn(i);
|
|
1968
1977
|
switch (s.kind) {
|
|
1969
1978
|
case 0:
|
|
1970
1979
|
Ee({ ...e, selfGrammar: e.baseGrammar }, n);
|
|
@@ -1982,47 +1991,47 @@ function ze(t, e, n) {
|
|
|
1982
1991
|
const a = { baseGrammar: e.baseGrammar, selfGrammar: l, repository: o };
|
|
1983
1992
|
s.kind === 4 ? pt(s.ruleName, a, n) : Ee(a, n);
|
|
1984
1993
|
} else
|
|
1985
|
-
s.kind === 4 ? n.add(new
|
|
1994
|
+
s.kind === 4 ? n.add(new Bi(s.scopeName, s.ruleName)) : n.add(new ge(s.scopeName));
|
|
1986
1995
|
break;
|
|
1987
1996
|
}
|
|
1988
1997
|
}
|
|
1989
1998
|
}
|
|
1990
|
-
var
|
|
1999
|
+
var Hi = class {
|
|
1991
2000
|
kind = 0;
|
|
1992
|
-
}, Hi = class {
|
|
1993
|
-
kind = 1;
|
|
1994
2001
|
}, Wi = class {
|
|
2002
|
+
kind = 1;
|
|
2003
|
+
}, Zi = class {
|
|
1995
2004
|
constructor(t) {
|
|
1996
2005
|
this.ruleName = t;
|
|
1997
2006
|
}
|
|
1998
2007
|
kind = 2;
|
|
1999
|
-
},
|
|
2008
|
+
}, qi = class {
|
|
2000
2009
|
constructor(t) {
|
|
2001
2010
|
this.scopeName = t;
|
|
2002
2011
|
}
|
|
2003
2012
|
kind = 3;
|
|
2004
|
-
},
|
|
2013
|
+
}, Vi = class {
|
|
2005
2014
|
constructor(t, e) {
|
|
2006
2015
|
this.scopeName = t, this.ruleName = e;
|
|
2007
2016
|
}
|
|
2008
2017
|
kind = 4;
|
|
2009
2018
|
};
|
|
2010
|
-
function
|
|
2019
|
+
function Yn(t) {
|
|
2011
2020
|
if (t === "$base")
|
|
2012
|
-
return new Fi();
|
|
2013
|
-
if (t === "$self")
|
|
2014
2021
|
return new Hi();
|
|
2022
|
+
if (t === "$self")
|
|
2023
|
+
return new Wi();
|
|
2015
2024
|
const e = t.indexOf("#");
|
|
2016
2025
|
if (e === -1)
|
|
2017
|
-
return new
|
|
2026
|
+
return new qi(t);
|
|
2018
2027
|
if (e === 0)
|
|
2019
|
-
return new
|
|
2028
|
+
return new Zi(t.substring(1));
|
|
2020
2029
|
{
|
|
2021
2030
|
const n = t.substring(0, e), r = t.substring(e + 1);
|
|
2022
|
-
return new
|
|
2031
|
+
return new Vi(n, r);
|
|
2023
2032
|
}
|
|
2024
2033
|
}
|
|
2025
|
-
var
|
|
2034
|
+
var Ki = /\\(\d+)/, an = /\\(\d+)/g, Ji = -1, Xn = -2;
|
|
2026
2035
|
var we = class {
|
|
2027
2036
|
$location;
|
|
2028
2037
|
id;
|
|
@@ -2034,7 +2043,7 @@ var we = class {
|
|
|
2034
2043
|
this.$location = t, this.id = e, this._name = n || null, this._nameIsCapturing = Te.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = Te.hasCaptures(this._contentName);
|
|
2035
2044
|
}
|
|
2036
2045
|
get debugName() {
|
|
2037
|
-
const t = this.$location ? `${
|
|
2046
|
+
const t = this.$location ? `${Fn(this.$location.filename)}:${this.$location.line}` : "unknown";
|
|
2038
2047
|
return `${this.constructor.name}#${this.id} @ ${t}`;
|
|
2039
2048
|
}
|
|
2040
2049
|
getName(t, e) {
|
|
@@ -2043,7 +2052,7 @@ var we = class {
|
|
|
2043
2052
|
getContentName(t, e) {
|
|
2044
2053
|
return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : Te.replaceCaptures(this._contentName, t, e);
|
|
2045
2054
|
}
|
|
2046
|
-
},
|
|
2055
|
+
}, Yi = class extends we {
|
|
2047
2056
|
retokenizeCapturedWithRuleId;
|
|
2048
2057
|
constructor(t, e, n, r, o) {
|
|
2049
2058
|
super(t, e, n, r), this.retokenizeCapturedWithRuleId = o;
|
|
@@ -2059,7 +2068,7 @@ var we = class {
|
|
|
2059
2068
|
compileAG(t, e, n, r) {
|
|
2060
2069
|
throw new Error("Not supported!");
|
|
2061
2070
|
}
|
|
2062
|
-
},
|
|
2071
|
+
}, Xi = class extends we {
|
|
2063
2072
|
_match;
|
|
2064
2073
|
captures;
|
|
2065
2074
|
_cachedCompiledPatterns;
|
|
@@ -2084,7 +2093,7 @@ var we = class {
|
|
|
2084
2093
|
_getCachedCompiledPatterns(t) {
|
|
2085
2094
|
return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new _e(), this.collectPatterns(t, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
|
|
2086
2095
|
}
|
|
2087
|
-
},
|
|
2096
|
+
}, ln = class extends we {
|
|
2088
2097
|
hasMissingPatterns;
|
|
2089
2098
|
patterns;
|
|
2090
2099
|
_cachedCompiledPatterns;
|
|
@@ -2161,7 +2170,7 @@ var we = class {
|
|
|
2161
2170
|
_cachedCompiledPatterns;
|
|
2162
2171
|
_cachedCompiledWhilePatterns;
|
|
2163
2172
|
constructor(t, e, n, r, o, i, s, l, a) {
|
|
2164
|
-
super(t, e, n, r), this._begin = new ye(o, this.id), this.beginCaptures = i, this.whileCaptures = l, this._while = new ye(s,
|
|
2173
|
+
super(t, e, n, r), this._begin = new ye(o, this.id), this.beginCaptures = i, this.whileCaptures = l, this._while = new ye(s, Xn), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = a.patterns, this.hasMissingPatterns = a.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
|
|
2165
2174
|
}
|
|
2166
2175
|
dispose() {
|
|
2167
2176
|
this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null), this._cachedCompiledWhilePatterns && (this._cachedCompiledWhilePatterns.dispose(), this._cachedCompiledWhilePatterns = null);
|
|
@@ -2201,14 +2210,14 @@ var we = class {
|
|
|
2201
2210
|
_getCachedCompiledWhilePatterns(t, e) {
|
|
2202
2211
|
return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new _e(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, e || ""), this._cachedCompiledWhilePatterns;
|
|
2203
2212
|
}
|
|
2204
|
-
},
|
|
2213
|
+
}, Qn = class I {
|
|
2205
2214
|
static createCaptureRule(e, n, r, o, i) {
|
|
2206
|
-
return e.registerRule((s) => new
|
|
2215
|
+
return e.registerRule((s) => new Yi(n, s, r, o, i));
|
|
2207
2216
|
}
|
|
2208
2217
|
static getCompiledRuleId(e, n, r) {
|
|
2209
2218
|
return e.id || n.registerRule((o) => {
|
|
2210
2219
|
if (e.id = o, e.match)
|
|
2211
|
-
return new
|
|
2220
|
+
return new Xi(
|
|
2212
2221
|
e.$vscodeTextmateLocation,
|
|
2213
2222
|
e.id,
|
|
2214
2223
|
e.name,
|
|
@@ -2216,9 +2225,9 @@ var we = class {
|
|
|
2216
2225
|
I._compileCaptures(e.captures, n, r)
|
|
2217
2226
|
);
|
|
2218
2227
|
if (typeof e.begin > "u") {
|
|
2219
|
-
e.repository && (r =
|
|
2228
|
+
e.repository && (r = Un({}, r, e.repository));
|
|
2220
2229
|
let i = e.patterns;
|
|
2221
|
-
return typeof i > "u" && e.include && (i = [{ include: e.include }]), new
|
|
2230
|
+
return typeof i > "u" && e.include && (i = [{ include: e.include }]), new ln(
|
|
2222
2231
|
e.$vscodeTextmateLocation,
|
|
2223
2232
|
e.id,
|
|
2224
2233
|
e.name,
|
|
@@ -2279,7 +2288,7 @@ var we = class {
|
|
|
2279
2288
|
const l = e[i];
|
|
2280
2289
|
let a = -1;
|
|
2281
2290
|
if (l.include) {
|
|
2282
|
-
const c =
|
|
2291
|
+
const c = Yn(l.include);
|
|
2283
2292
|
switch (c.kind) {
|
|
2284
2293
|
case 0:
|
|
2285
2294
|
case 1:
|
|
@@ -2305,7 +2314,7 @@ var we = class {
|
|
|
2305
2314
|
if (a !== -1) {
|
|
2306
2315
|
const c = n.getRule(a);
|
|
2307
2316
|
let u = !1;
|
|
2308
|
-
if ((c instanceof
|
|
2317
|
+
if ((c instanceof ln || c instanceof dt || c instanceof Me) && c.hasMissingPatterns && c.patterns.length === 0 && (u = !0), u)
|
|
2309
2318
|
continue;
|
|
2310
2319
|
o.push(a);
|
|
2311
2320
|
}
|
|
@@ -2315,7 +2324,7 @@ var we = class {
|
|
|
2315
2324
|
hasMissingPatterns: (e ? e.length : 0) !== o.length
|
|
2316
2325
|
};
|
|
2317
2326
|
}
|
|
2318
|
-
}, ye = class
|
|
2327
|
+
}, ye = class er {
|
|
2319
2328
|
source;
|
|
2320
2329
|
ruleId;
|
|
2321
2330
|
hasAnchor;
|
|
@@ -2333,10 +2342,10 @@ var we = class {
|
|
|
2333
2342
|
this.hasAnchor = s, o === 0 ? this.source = e : (i.push(e.substring(o, r)), this.source = i.join(""));
|
|
2334
2343
|
} else
|
|
2335
2344
|
this.hasAnchor = !1, this.source = e;
|
|
2336
|
-
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences =
|
|
2345
|
+
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = Ki.test(this.source) : this.hasBackReferences = !1;
|
|
2337
2346
|
}
|
|
2338
2347
|
clone() {
|
|
2339
|
-
return new
|
|
2348
|
+
return new er(this.source, this.ruleId);
|
|
2340
2349
|
}
|
|
2341
2350
|
setSource(e) {
|
|
2342
2351
|
this.source !== e && (this.source = e, this.hasAnchor && (this._anchorCache = this._buildAnchorCache()));
|
|
@@ -2345,7 +2354,7 @@ var we = class {
|
|
|
2345
2354
|
if (typeof this.source != "string")
|
|
2346
2355
|
throw new Error("This method should only be called if the source is a string");
|
|
2347
2356
|
let r = n.map((o) => e.substring(o.start, o.end));
|
|
2348
|
-
return
|
|
2357
|
+
return an.lastIndex = 0, this.source.replace(an, (o, i) => Zn(r[parseInt(i, 10)] || ""));
|
|
2349
2358
|
}
|
|
2350
2359
|
_buildAnchorCache() {
|
|
2351
2360
|
if (typeof this.source != "string")
|
|
@@ -2397,7 +2406,7 @@ var we = class {
|
|
|
2397
2406
|
compile(t) {
|
|
2398
2407
|
if (!this._cached) {
|
|
2399
2408
|
let e = this._items.map((n) => n.source);
|
|
2400
|
-
this._cached = new
|
|
2409
|
+
this._cached = new cn(t, e, this._items.map((n) => n.ruleId));
|
|
2401
2410
|
}
|
|
2402
2411
|
return this._cached;
|
|
2403
2412
|
}
|
|
@@ -2406,9 +2415,9 @@ var we = class {
|
|
|
2406
2415
|
}
|
|
2407
2416
|
_resolveAnchors(t, e, n) {
|
|
2408
2417
|
let r = this._items.map((o) => o.resolveAnchors(e, n));
|
|
2409
|
-
return new
|
|
2418
|
+
return new cn(t, r, this._items.map((o) => o.ruleId));
|
|
2410
2419
|
}
|
|
2411
|
-
},
|
|
2420
|
+
}, cn = class {
|
|
2412
2421
|
constructor(t, e, n) {
|
|
2413
2422
|
this.regExps = e, this.rules = n, this.scanner = t.createOnigScanner(e);
|
|
2414
2423
|
}
|
|
@@ -2434,7 +2443,7 @@ var we = class {
|
|
|
2434
2443
|
constructor(t, e) {
|
|
2435
2444
|
this.languageId = t, this.tokenType = e;
|
|
2436
2445
|
}
|
|
2437
|
-
},
|
|
2446
|
+
}, Qi = class mt {
|
|
2438
2447
|
_defaultAttributes;
|
|
2439
2448
|
_embeddedLanguagesMatcher;
|
|
2440
2449
|
constructor(e, n) {
|
|
@@ -2442,7 +2451,7 @@ var we = class {
|
|
|
2442
2451
|
e,
|
|
2443
2452
|
8
|
|
2444
2453
|
/* NotSet */
|
|
2445
|
-
), this._embeddedLanguagesMatcher = new
|
|
2454
|
+
), this._embeddedLanguagesMatcher = new es(Object.entries(n || {}));
|
|
2446
2455
|
}
|
|
2447
2456
|
getDefaultAttributes() {
|
|
2448
2457
|
return this._defaultAttributes;
|
|
@@ -2451,7 +2460,7 @@ var we = class {
|
|
|
2451
2460
|
return e === null ? mt._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(e);
|
|
2452
2461
|
}
|
|
2453
2462
|
static _NULL_SCOPE_METADATA = new tt(0, 0);
|
|
2454
|
-
_getBasicScopeAttributes = new
|
|
2463
|
+
_getBasicScopeAttributes = new qn((e) => {
|
|
2455
2464
|
const n = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
|
|
2456
2465
|
return new tt(n, r);
|
|
2457
2466
|
});
|
|
@@ -2479,7 +2488,7 @@ var we = class {
|
|
|
2479
2488
|
throw new Error("Unexpected match for standard token type!");
|
|
2480
2489
|
}
|
|
2481
2490
|
static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
|
|
2482
|
-
},
|
|
2491
|
+
}, es = class {
|
|
2483
2492
|
values;
|
|
2484
2493
|
scopesRegExp;
|
|
2485
2494
|
constructor(t) {
|
|
@@ -2488,7 +2497,7 @@ var we = class {
|
|
|
2488
2497
|
else {
|
|
2489
2498
|
this.values = new Map(t);
|
|
2490
2499
|
const e = t.map(
|
|
2491
|
-
([n, r]) =>
|
|
2500
|
+
([n, r]) => Zn(n)
|
|
2492
2501
|
);
|
|
2493
2502
|
e.sort(), e.reverse(), this.scopesRegExp = new RegExp(
|
|
2494
2503
|
`^((${e.join(")|(")}))($|\\.)`,
|
|
@@ -2505,16 +2514,16 @@ var we = class {
|
|
|
2505
2514
|
}
|
|
2506
2515
|
};
|
|
2507
2516
|
typeof process < "u" && process.env.VSCODE_TEXTMATE_DEBUG;
|
|
2508
|
-
var
|
|
2517
|
+
var un = class {
|
|
2509
2518
|
constructor(t, e) {
|
|
2510
2519
|
this.stack = t, this.stoppedEarly = e;
|
|
2511
2520
|
}
|
|
2512
2521
|
};
|
|
2513
|
-
function
|
|
2522
|
+
function tr(t, e, n, r, o, i, s, l) {
|
|
2514
2523
|
const a = e.content.length;
|
|
2515
2524
|
let c = !1, u = -1;
|
|
2516
2525
|
if (s) {
|
|
2517
|
-
const d =
|
|
2526
|
+
const d = ts(
|
|
2518
2527
|
t,
|
|
2519
2528
|
e,
|
|
2520
2529
|
n,
|
|
@@ -2527,12 +2536,12 @@ function er(t, e, n, r, o, i, s, l) {
|
|
|
2527
2536
|
const h = Date.now();
|
|
2528
2537
|
for (; !c; ) {
|
|
2529
2538
|
if (l !== 0 && Date.now() - h > l)
|
|
2530
|
-
return new
|
|
2539
|
+
return new un(o, !0);
|
|
2531
2540
|
p();
|
|
2532
2541
|
}
|
|
2533
|
-
return new
|
|
2542
|
+
return new un(o, !1);
|
|
2534
2543
|
function p() {
|
|
2535
|
-
const d =
|
|
2544
|
+
const d = ns(
|
|
2536
2545
|
t,
|
|
2537
2546
|
e,
|
|
2538
2547
|
n,
|
|
@@ -2545,7 +2554,7 @@ function er(t, e, n, r, o, i, s, l) {
|
|
|
2545
2554
|
return;
|
|
2546
2555
|
}
|
|
2547
2556
|
const m = d.captureIndices, w = d.matchedRuleId, b = m && m.length > 0 ? m[0].end > r : !1;
|
|
2548
|
-
if (w ===
|
|
2557
|
+
if (w === Ji) {
|
|
2549
2558
|
const y = o.getRule(t);
|
|
2550
2559
|
i.produce(o, m[0].start), o = o.withContentNameScopesList(o.nameScopesList), pe(
|
|
2551
2560
|
t,
|
|
@@ -2646,7 +2655,7 @@ function er(t, e, n, r, o, i, s, l) {
|
|
|
2646
2655
|
m[0].end > r && (r = m[0].end, n = !1);
|
|
2647
2656
|
}
|
|
2648
2657
|
}
|
|
2649
|
-
function
|
|
2658
|
+
function ts(t, e, n, r, o, i) {
|
|
2650
2659
|
let s = o.beginRuleCapturedEOL ? 0 : -1;
|
|
2651
2660
|
const l = [];
|
|
2652
2661
|
for (let a = o; a; a = a.pop()) {
|
|
@@ -2657,9 +2666,9 @@ function es(t, e, n, r, o, i) {
|
|
|
2657
2666
|
});
|
|
2658
2667
|
}
|
|
2659
2668
|
for (let a = l.pop(); a; a = l.pop()) {
|
|
2660
|
-
const { ruleScanner: c, findOptions: u } =
|
|
2669
|
+
const { ruleScanner: c, findOptions: u } = is(a.rule, t, a.stack.endRule, n, r === s), h = c.findNextMatchSync(e, r, u);
|
|
2661
2670
|
if (h) {
|
|
2662
|
-
if (h.ruleId !==
|
|
2671
|
+
if (h.ruleId !== Xn) {
|
|
2663
2672
|
o = a.stack.pop();
|
|
2664
2673
|
break;
|
|
2665
2674
|
}
|
|
@@ -2671,11 +2680,11 @@ function es(t, e, n, r, o, i) {
|
|
|
2671
2680
|
}
|
|
2672
2681
|
return { stack: o, linePos: r, anchorPosition: s, isFirstLine: n };
|
|
2673
2682
|
}
|
|
2674
|
-
function
|
|
2675
|
-
const s =
|
|
2683
|
+
function ns(t, e, n, r, o, i) {
|
|
2684
|
+
const s = rs(t, e, n, r, o, i), l = t.getInjections();
|
|
2676
2685
|
if (l.length === 0)
|
|
2677
2686
|
return s;
|
|
2678
|
-
const a =
|
|
2687
|
+
const a = os(l, t, e, n, r, o, i);
|
|
2679
2688
|
if (!a)
|
|
2680
2689
|
return s;
|
|
2681
2690
|
if (!s)
|
|
@@ -2683,21 +2692,21 @@ function ts(t, e, n, r, o, i) {
|
|
|
2683
2692
|
const c = s.captureIndices[0].start, u = a.captureIndices[0].start;
|
|
2684
2693
|
return u < c || a.priorityMatch && u === c ? a : s;
|
|
2685
2694
|
}
|
|
2686
|
-
function
|
|
2687
|
-
const s = o.getRule(t), { ruleScanner: l, findOptions: a } =
|
|
2695
|
+
function rs(t, e, n, r, o, i) {
|
|
2696
|
+
const s = o.getRule(t), { ruleScanner: l, findOptions: a } = nr(s, t, o.endRule, n, r === i), c = l.findNextMatchSync(e, r, a);
|
|
2688
2697
|
return c ? {
|
|
2689
2698
|
captureIndices: c.captureIndices,
|
|
2690
2699
|
matchedRuleId: c.ruleId
|
|
2691
2700
|
} : null;
|
|
2692
2701
|
}
|
|
2693
|
-
function
|
|
2702
|
+
function os(t, e, n, r, o, i, s) {
|
|
2694
2703
|
let l = Number.MAX_VALUE, a = null, c, u = 0;
|
|
2695
2704
|
const h = i.contentNameScopesList.getScopeNames();
|
|
2696
2705
|
for (let p = 0, d = t.length; p < d; p++) {
|
|
2697
2706
|
const m = t[p];
|
|
2698
2707
|
if (!m.matcher(h))
|
|
2699
2708
|
continue;
|
|
2700
|
-
const w = e.getRule(m.ruleId), { ruleScanner: b, findOptions: y } =
|
|
2709
|
+
const w = e.getRule(m.ruleId), { ruleScanner: b, findOptions: y } = nr(w, e, null, r, o === s), g = b.findNextMatchSync(n, o, y);
|
|
2701
2710
|
if (!g)
|
|
2702
2711
|
continue;
|
|
2703
2712
|
const _ = g.captureIndices[0].start;
|
|
@@ -2710,14 +2719,14 @@ function rs(t, e, n, r, o, i, s) {
|
|
|
2710
2719
|
matchedRuleId: c
|
|
2711
2720
|
} : null;
|
|
2712
2721
|
}
|
|
2713
|
-
function
|
|
2722
|
+
function nr(t, e, n, r, o) {
|
|
2714
2723
|
return {
|
|
2715
2724
|
ruleScanner: t.compileAG(e, n, r, o),
|
|
2716
2725
|
findOptions: 0
|
|
2717
2726
|
/* None */
|
|
2718
2727
|
};
|
|
2719
2728
|
}
|
|
2720
|
-
function
|
|
2729
|
+
function is(t, e, n, r, o) {
|
|
2721
2730
|
return {
|
|
2722
2731
|
ruleScanner: t.compileWhileAG(e, n, r, o),
|
|
2723
2732
|
findOptions: 0
|
|
@@ -2741,7 +2750,7 @@ function pe(t, e, n, r, o, i, s) {
|
|
|
2741
2750
|
o.produceFromScopes(c[c.length - 1].scopes, c[c.length - 1].endPos), c.pop();
|
|
2742
2751
|
if (c.length > 0 ? o.produceFromScopes(c[c.length - 1].scopes, d.start) : o.produce(r, d.start), p.retokenizeCapturedWithRuleId) {
|
|
2743
2752
|
const w = p.getName(l, s), b = r.contentNameScopesList.pushAttributed(w, t), y = p.getContentName(l, s), g = b.pushAttributed(y, t), _ = r.push(p.retokenizeCapturedWithRuleId, d.start, -1, !1, null, b, g), k = t.createOnigString(l.substring(0, d.end));
|
|
2744
|
-
|
|
2753
|
+
tr(
|
|
2745
2754
|
t,
|
|
2746
2755
|
k,
|
|
2747
2756
|
n && d.start === 0,
|
|
@@ -2751,27 +2760,27 @@ function pe(t, e, n, r, o, i, s) {
|
|
|
2751
2760
|
!1,
|
|
2752
2761
|
/* no time limit */
|
|
2753
2762
|
0
|
|
2754
|
-
),
|
|
2763
|
+
), Jn(k);
|
|
2755
2764
|
continue;
|
|
2756
2765
|
}
|
|
2757
2766
|
const m = p.getName(l, s);
|
|
2758
2767
|
if (m !== null) {
|
|
2759
2768
|
const b = (c.length > 0 ? c[c.length - 1].scopes : r.contentNameScopesList).pushAttributed(m, t);
|
|
2760
|
-
c.push(new
|
|
2769
|
+
c.push(new ss(b, d.end));
|
|
2761
2770
|
}
|
|
2762
2771
|
}
|
|
2763
2772
|
for (; c.length > 0; )
|
|
2764
2773
|
o.produceFromScopes(c[c.length - 1].scopes, c[c.length - 1].endPos), c.pop();
|
|
2765
2774
|
}
|
|
2766
|
-
var
|
|
2775
|
+
var ss = class {
|
|
2767
2776
|
scopes;
|
|
2768
2777
|
endPos;
|
|
2769
2778
|
constructor(t, e) {
|
|
2770
2779
|
this.scopes = t, this.endPos = e;
|
|
2771
2780
|
}
|
|
2772
2781
|
};
|
|
2773
|
-
function
|
|
2774
|
-
return new
|
|
2782
|
+
function as(t, e, n, r, o, i, s, l) {
|
|
2783
|
+
return new cs(
|
|
2775
2784
|
t,
|
|
2776
2785
|
e,
|
|
2777
2786
|
n,
|
|
@@ -2782,8 +2791,8 @@ function ss(t, e, n, r, o, i, s, l) {
|
|
|
2782
2791
|
l
|
|
2783
2792
|
);
|
|
2784
2793
|
}
|
|
2785
|
-
function
|
|
2786
|
-
const i = Ie(e, $e), s =
|
|
2794
|
+
function hn(t, e, n, r, o) {
|
|
2795
|
+
const i = Ie(e, $e), s = Qn.getCompiledRuleId(n, r, o.repository);
|
|
2787
2796
|
for (const l of i)
|
|
2788
2797
|
t.push({
|
|
2789
2798
|
debugSelector: e,
|
|
@@ -2799,12 +2808,12 @@ function $e(t, e) {
|
|
|
2799
2808
|
let n = 0;
|
|
2800
2809
|
return t.every((r) => {
|
|
2801
2810
|
for (let o = n; o < e.length; o++)
|
|
2802
|
-
if (
|
|
2811
|
+
if (ls(e[o], r))
|
|
2803
2812
|
return n = o + 1, !0;
|
|
2804
2813
|
return !1;
|
|
2805
2814
|
});
|
|
2806
2815
|
}
|
|
2807
|
-
function
|
|
2816
|
+
function ls(t, e) {
|
|
2808
2817
|
if (!t)
|
|
2809
2818
|
return !1;
|
|
2810
2819
|
if (t === e)
|
|
@@ -2812,12 +2821,12 @@ function as(t, e) {
|
|
|
2812
2821
|
const n = e.length;
|
|
2813
2822
|
return t.length > n && t.substr(0, n) === e && t[n] === ".";
|
|
2814
2823
|
}
|
|
2815
|
-
var
|
|
2824
|
+
var cs = class {
|
|
2816
2825
|
constructor(t, e, n, r, o, i, s, l) {
|
|
2817
|
-
if (this._rootScopeName = t, this.balancedBracketSelectors = i, this._onigLib = l, this._basicScopeAttributesProvider = new
|
|
2826
|
+
if (this._rootScopeName = t, this.balancedBracketSelectors = i, this._onigLib = l, this._basicScopeAttributesProvider = new Qi(
|
|
2818
2827
|
n,
|
|
2819
2828
|
r
|
|
2820
|
-
), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = s, this._grammar =
|
|
2829
|
+
), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = s, this._grammar = pn(e, null), this._injections = null, this._tokenTypeMatchers = [], o)
|
|
2821
2830
|
for (const a of Object.keys(o)) {
|
|
2822
2831
|
const c = Ie(a, $e);
|
|
2823
2832
|
for (const u of c)
|
|
@@ -2861,7 +2870,7 @@ var ls = class {
|
|
|
2861
2870
|
const o = r.injections;
|
|
2862
2871
|
if (o)
|
|
2863
2872
|
for (let s in o)
|
|
2864
|
-
|
|
2873
|
+
hn(
|
|
2865
2874
|
e,
|
|
2866
2875
|
s,
|
|
2867
2876
|
o[s],
|
|
@@ -2873,7 +2882,7 @@ var ls = class {
|
|
|
2873
2882
|
const l = this.getExternalGrammar(s);
|
|
2874
2883
|
if (l) {
|
|
2875
2884
|
const a = l.injectionSelector;
|
|
2876
|
-
a &&
|
|
2885
|
+
a && hn(
|
|
2877
2886
|
e,
|
|
2878
2887
|
a,
|
|
2879
2888
|
l,
|
|
@@ -2901,7 +2910,7 @@ var ls = class {
|
|
|
2901
2910
|
if (this._grammarRepository) {
|
|
2902
2911
|
const n = this._grammarRepository.lookup(t);
|
|
2903
2912
|
if (n)
|
|
2904
|
-
return this._includedGrammars[t] =
|
|
2913
|
+
return this._includedGrammars[t] = pn(
|
|
2905
2914
|
n,
|
|
2906
2915
|
e && e.$base
|
|
2907
2916
|
), this._includedGrammars[t];
|
|
@@ -2924,7 +2933,7 @@ var ls = class {
|
|
|
2924
2933
|
};
|
|
2925
2934
|
}
|
|
2926
2935
|
_tokenize(t, e, n, r) {
|
|
2927
|
-
this._rootId === -1 && (this._rootId =
|
|
2936
|
+
this._rootId === -1 && (this._rootId = Qn.getCompiledRuleId(
|
|
2928
2937
|
this._grammar.repository.$self,
|
|
2929
2938
|
this,
|
|
2930
2939
|
this._grammar.repository
|
|
@@ -2966,12 +2975,12 @@ var ls = class {
|
|
|
2966
2975
|
o = !1, e.reset();
|
|
2967
2976
|
t = t + `
|
|
2968
2977
|
`;
|
|
2969
|
-
const i = this.createOnigString(t), s = i.content.length, l = new
|
|
2978
|
+
const i = this.createOnigString(t), s = i.content.length, l = new hs(
|
|
2970
2979
|
n,
|
|
2971
2980
|
t,
|
|
2972
2981
|
this._tokenTypeMatchers,
|
|
2973
2982
|
this.balancedBracketSelectors
|
|
2974
|
-
), a =
|
|
2983
|
+
), a = tr(
|
|
2975
2984
|
this,
|
|
2976
2985
|
i,
|
|
2977
2986
|
o,
|
|
@@ -2981,7 +2990,7 @@ var ls = class {
|
|
|
2981
2990
|
!0,
|
|
2982
2991
|
r
|
|
2983
2992
|
);
|
|
2984
|
-
return
|
|
2993
|
+
return Jn(i), {
|
|
2985
2994
|
lineLength: s,
|
|
2986
2995
|
lineTokens: l,
|
|
2987
2996
|
ruleStack: a.stack,
|
|
@@ -2989,8 +2998,8 @@ var ls = class {
|
|
|
2989
2998
|
};
|
|
2990
2999
|
}
|
|
2991
3000
|
};
|
|
2992
|
-
function
|
|
2993
|
-
return t =
|
|
3001
|
+
function pn(t, e) {
|
|
3002
|
+
return t = Ai(t), t.repository = t.repository || {}, t.repository.$self = {
|
|
2994
3003
|
$vscodeTextmateLocation: t.$vscodeTextmateLocation,
|
|
2995
3004
|
patterns: t.patterns,
|
|
2996
3005
|
name: t.scopeName
|
|
@@ -3247,7 +3256,7 @@ var de = class U {
|
|
|
3247
3256
|
de.fromExtension(r, n.contentNameScopesList)
|
|
3248
3257
|
);
|
|
3249
3258
|
}
|
|
3250
|
-
},
|
|
3259
|
+
}, us = class {
|
|
3251
3260
|
balancedBracketScopes;
|
|
3252
3261
|
unbalancedBracketScopes;
|
|
3253
3262
|
allowAny = !1;
|
|
@@ -3273,7 +3282,7 @@ var de = class U {
|
|
|
3273
3282
|
return !0;
|
|
3274
3283
|
return this.allowAny;
|
|
3275
3284
|
}
|
|
3276
|
-
},
|
|
3285
|
+
}, hs = class {
|
|
3277
3286
|
constructor(t, e, n, r) {
|
|
3278
3287
|
this.balancedBracketSelectors = r, this._emitBinaryTokens = t, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
|
|
3279
3288
|
}
|
|
@@ -3347,7 +3356,7 @@ var de = class U {
|
|
|
3347
3356
|
n[r] = this._binaryTokens[r];
|
|
3348
3357
|
return n;
|
|
3349
3358
|
}
|
|
3350
|
-
},
|
|
3359
|
+
}, ps = class {
|
|
3351
3360
|
constructor(t, e) {
|
|
3352
3361
|
this._onigLib = e, this._theme = t;
|
|
3353
3362
|
}
|
|
@@ -3403,7 +3412,7 @@ var de = class U {
|
|
|
3403
3412
|
let i = this._rawGrammars.get(t);
|
|
3404
3413
|
if (!i)
|
|
3405
3414
|
return null;
|
|
3406
|
-
this._grammars.set(t,
|
|
3415
|
+
this._grammars.set(t, as(
|
|
3407
3416
|
t,
|
|
3408
3417
|
i,
|
|
3409
3418
|
e,
|
|
@@ -3416,12 +3425,12 @@ var de = class U {
|
|
|
3416
3425
|
}
|
|
3417
3426
|
return this._grammars.get(t);
|
|
3418
3427
|
}
|
|
3419
|
-
},
|
|
3428
|
+
}, ds = class {
|
|
3420
3429
|
_options;
|
|
3421
3430
|
_syncRegistry;
|
|
3422
3431
|
_ensureGrammarCache;
|
|
3423
3432
|
constructor(e) {
|
|
3424
|
-
this._options = e, this._syncRegistry = new
|
|
3433
|
+
this._options = e, this._syncRegistry = new ps(
|
|
3425
3434
|
Oe.createFromRawTheme(e.theme, e.colorMap),
|
|
3426
3435
|
e.onigLib
|
|
3427
3436
|
), this._ensureGrammarCache = /* @__PURE__ */ new Map();
|
|
@@ -3458,7 +3467,7 @@ var de = class U {
|
|
|
3458
3467
|
n,
|
|
3459
3468
|
r.embeddedLanguages,
|
|
3460
3469
|
r.tokenTypes,
|
|
3461
|
-
new
|
|
3470
|
+
new us(
|
|
3462
3471
|
r.balancedBracketSelectors || [],
|
|
3463
3472
|
r.unbalancedBracketSelectors || []
|
|
3464
3473
|
)
|
|
@@ -3471,7 +3480,7 @@ var de = class U {
|
|
|
3471
3480
|
return this._loadGrammar(e, 0, null, null, null);
|
|
3472
3481
|
}
|
|
3473
3482
|
_loadGrammar(e, n, r, o, i) {
|
|
3474
|
-
const s = new
|
|
3483
|
+
const s = new Ui(this._syncRegistry, e);
|
|
3475
3484
|
for (; s.Q.length > 0; )
|
|
3476
3485
|
s.Q.map((l) => this._loadSingleGrammar(l.scopeName)), s.processQueue();
|
|
3477
3486
|
return this._grammarForScopeName(
|
|
@@ -3511,7 +3520,7 @@ var de = class U {
|
|
|
3511
3520
|
);
|
|
3512
3521
|
}
|
|
3513
3522
|
}, gt = ft.NULL;
|
|
3514
|
-
const
|
|
3523
|
+
const ms = [
|
|
3515
3524
|
"area",
|
|
3516
3525
|
"base",
|
|
3517
3526
|
"basefont",
|
|
@@ -3551,7 +3560,7 @@ class ve {
|
|
|
3551
3560
|
ve.prototype.normal = {};
|
|
3552
3561
|
ve.prototype.property = {};
|
|
3553
3562
|
ve.prototype.space = void 0;
|
|
3554
|
-
function
|
|
3563
|
+
function rr(t, e) {
|
|
3555
3564
|
const n = {}, r = {};
|
|
3556
3565
|
for (const o of t)
|
|
3557
3566
|
Object.assign(n, o.property), Object.assign(r, o.normal);
|
|
@@ -3585,10 +3594,10 @@ M.prototype.overloadedBoolean = !1;
|
|
|
3585
3594
|
M.prototype.property = "";
|
|
3586
3595
|
M.prototype.spaceSeparated = !1;
|
|
3587
3596
|
M.prototype.space = void 0;
|
|
3588
|
-
let
|
|
3597
|
+
let fs = 0;
|
|
3589
3598
|
const S = ee(), R = ee(), _t = ee(), f = ee(), T = ee(), ie = ee(), $ = ee();
|
|
3590
3599
|
function ee() {
|
|
3591
|
-
return 2 ** ++
|
|
3600
|
+
return 2 ** ++fs;
|
|
3592
3601
|
}
|
|
3593
3602
|
const bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3594
3603
|
__proto__: null,
|
|
@@ -3619,15 +3628,15 @@ class Nt extends M {
|
|
|
3619
3628
|
*/
|
|
3620
3629
|
constructor(e, n, r, o) {
|
|
3621
3630
|
let i = -1;
|
|
3622
|
-
if (super(e, n),
|
|
3631
|
+
if (super(e, n), dn(this, "space", o), typeof r == "number")
|
|
3623
3632
|
for (; ++i < nt.length; ) {
|
|
3624
3633
|
const s = nt[i];
|
|
3625
|
-
|
|
3634
|
+
dn(this, nt[i], (r & bt[s]) === bt[s]);
|
|
3626
3635
|
}
|
|
3627
3636
|
}
|
|
3628
3637
|
}
|
|
3629
3638
|
Nt.prototype.defined = !0;
|
|
3630
|
-
function
|
|
3639
|
+
function dn(t, e, n) {
|
|
3631
3640
|
n && (t[e] = n);
|
|
3632
3641
|
}
|
|
3633
3642
|
function ce(t) {
|
|
@@ -3643,7 +3652,7 @@ function ce(t) {
|
|
|
3643
3652
|
}
|
|
3644
3653
|
return new ve(e, n, t.space);
|
|
3645
3654
|
}
|
|
3646
|
-
const
|
|
3655
|
+
const or = ce({
|
|
3647
3656
|
properties: {
|
|
3648
3657
|
ariaActiveDescendant: null,
|
|
3649
3658
|
ariaAtomic: R,
|
|
@@ -3699,13 +3708,13 @@ const rr = ce({
|
|
|
3699
3708
|
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
3700
3709
|
}
|
|
3701
3710
|
});
|
|
3702
|
-
function
|
|
3711
|
+
function ir(t, e) {
|
|
3703
3712
|
return e in t ? t[e] : e;
|
|
3704
3713
|
}
|
|
3705
|
-
function
|
|
3706
|
-
return
|
|
3714
|
+
function sr(t, e) {
|
|
3715
|
+
return ir(t, e.toLowerCase());
|
|
3707
3716
|
}
|
|
3708
|
-
const
|
|
3717
|
+
const gs = ce({
|
|
3709
3718
|
attributes: {
|
|
3710
3719
|
acceptcharset: "accept-charset",
|
|
3711
3720
|
classname: "class",
|
|
@@ -4065,8 +4074,8 @@ const fs = ce({
|
|
|
4065
4074
|
unselectable: null
|
|
4066
4075
|
},
|
|
4067
4076
|
space: "html",
|
|
4068
|
-
transform:
|
|
4069
|
-
}),
|
|
4077
|
+
transform: sr
|
|
4078
|
+
}), ys = ce({
|
|
4070
4079
|
attributes: {
|
|
4071
4080
|
accentHeight: "accent-height",
|
|
4072
4081
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -4624,8 +4633,8 @@ const fs = ce({
|
|
|
4624
4633
|
zoomAndPan: null
|
|
4625
4634
|
},
|
|
4626
4635
|
space: "svg",
|
|
4627
|
-
transform:
|
|
4628
|
-
}),
|
|
4636
|
+
transform: ir
|
|
4637
|
+
}), ar = ce({
|
|
4629
4638
|
properties: {
|
|
4630
4639
|
xLinkActuate: null,
|
|
4631
4640
|
xLinkArcRole: null,
|
|
@@ -4639,31 +4648,31 @@ const fs = ce({
|
|
|
4639
4648
|
transform(t, e) {
|
|
4640
4649
|
return "xlink:" + e.slice(5).toLowerCase();
|
|
4641
4650
|
}
|
|
4642
|
-
}),
|
|
4651
|
+
}), lr = ce({
|
|
4643
4652
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
4644
4653
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
4645
4654
|
space: "xmlns",
|
|
4646
|
-
transform:
|
|
4647
|
-
}),
|
|
4655
|
+
transform: sr
|
|
4656
|
+
}), cr = ce({
|
|
4648
4657
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
4649
4658
|
space: "xml",
|
|
4650
4659
|
transform(t, e) {
|
|
4651
4660
|
return "xml:" + e.slice(3).toLowerCase();
|
|
4652
4661
|
}
|
|
4653
|
-
}),
|
|
4654
|
-
function
|
|
4662
|
+
}), _s = /[A-Z]/g, mn = /-[a-z]/g, bs = /^data[-\w.:]+$/i;
|
|
4663
|
+
function ws(t, e) {
|
|
4655
4664
|
const n = yt(e);
|
|
4656
4665
|
let r = e, o = M;
|
|
4657
4666
|
if (n in t.normal)
|
|
4658
4667
|
return t.property[t.normal[n]];
|
|
4659
|
-
if (n.length > 4 && n.slice(0, 4) === "data" &&
|
|
4668
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && bs.test(e)) {
|
|
4660
4669
|
if (e.charAt(4) === "-") {
|
|
4661
|
-
const i = e.slice(5).replace(
|
|
4670
|
+
const i = e.slice(5).replace(mn, Ss);
|
|
4662
4671
|
r = "data" + i.charAt(0).toUpperCase() + i.slice(1);
|
|
4663
4672
|
} else {
|
|
4664
4673
|
const i = e.slice(4);
|
|
4665
|
-
if (!
|
|
4666
|
-
let s = i.replace(
|
|
4674
|
+
if (!mn.test(i)) {
|
|
4675
|
+
let s = i.replace(_s, vs);
|
|
4667
4676
|
s.charAt(0) !== "-" && (s = "-" + s), e = "data" + s;
|
|
4668
4677
|
}
|
|
4669
4678
|
}
|
|
@@ -4671,38 +4680,38 @@ function bs(t, e) {
|
|
|
4671
4680
|
}
|
|
4672
4681
|
return new o(r, e);
|
|
4673
4682
|
}
|
|
4674
|
-
function
|
|
4683
|
+
function vs(t) {
|
|
4675
4684
|
return "-" + t.toLowerCase();
|
|
4676
4685
|
}
|
|
4677
|
-
function
|
|
4686
|
+
function Ss(t) {
|
|
4678
4687
|
return t.charAt(1).toUpperCase();
|
|
4679
4688
|
}
|
|
4680
|
-
const
|
|
4681
|
-
function
|
|
4689
|
+
const ks = rr([or, gs, ar, lr, cr], "html"), ur = rr([or, ys, ar, lr, cr], "svg"), fn = {}.hasOwnProperty;
|
|
4690
|
+
function Cs(t, e) {
|
|
4682
4691
|
const n = e || {};
|
|
4683
4692
|
function r(o, ...i) {
|
|
4684
4693
|
let s = r.invalid;
|
|
4685
4694
|
const l = r.handlers;
|
|
4686
|
-
if (o &&
|
|
4695
|
+
if (o && fn.call(o, t)) {
|
|
4687
4696
|
const a = String(o[t]);
|
|
4688
|
-
s =
|
|
4697
|
+
s = fn.call(l, a) ? l[a] : r.unknown;
|
|
4689
4698
|
}
|
|
4690
4699
|
if (s)
|
|
4691
4700
|
return s.call(this, o, ...i);
|
|
4692
4701
|
}
|
|
4693
4702
|
return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
|
|
4694
4703
|
}
|
|
4695
|
-
const
|
|
4704
|
+
const Ts = /["&'<>`]/g, Ps = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, Rs = (
|
|
4696
4705
|
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
|
|
4697
4706
|
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
|
|
4698
|
-
),
|
|
4699
|
-
function
|
|
4707
|
+
), As = /[|\\{}()[\]^$+*?.]/g, gn = /* @__PURE__ */ new WeakMap();
|
|
4708
|
+
function Ns(t, e) {
|
|
4700
4709
|
if (t = t.replace(
|
|
4701
|
-
e.subset ?
|
|
4710
|
+
e.subset ? Es(e.subset) : Ts,
|
|
4702
4711
|
r
|
|
4703
4712
|
), e.subset || e.escapeOnly)
|
|
4704
4713
|
return t;
|
|
4705
|
-
return t.replace(
|
|
4714
|
+
return t.replace(Ps, n).replace(Rs, r);
|
|
4706
4715
|
function n(o, i, s) {
|
|
4707
4716
|
return e.format(
|
|
4708
4717
|
(o.charCodeAt(0) - 55296) * 1024 + o.charCodeAt(1) - 56320 + 65536,
|
|
@@ -4718,28 +4727,28 @@ function As(t, e) {
|
|
|
4718
4727
|
);
|
|
4719
4728
|
}
|
|
4720
4729
|
}
|
|
4721
|
-
function Ns(t) {
|
|
4722
|
-
let e = fn.get(t);
|
|
4723
|
-
return e || (e = Es(t), fn.set(t, e)), e;
|
|
4724
|
-
}
|
|
4725
4730
|
function Es(t) {
|
|
4731
|
+
let e = gn.get(t);
|
|
4732
|
+
return e || (e = xs(t), gn.set(t, e)), e;
|
|
4733
|
+
}
|
|
4734
|
+
function xs(t) {
|
|
4726
4735
|
const e = [];
|
|
4727
4736
|
let n = -1;
|
|
4728
4737
|
for (; ++n < t.length; )
|
|
4729
|
-
e.push(t[n].replace(
|
|
4738
|
+
e.push(t[n].replace(As, "\\$&"));
|
|
4730
4739
|
return new RegExp("(?:" + e.join("|") + ")", "g");
|
|
4731
4740
|
}
|
|
4732
|
-
const
|
|
4733
|
-
function
|
|
4741
|
+
const Ls = /[\dA-Fa-f]/;
|
|
4742
|
+
function Os(t, e, n) {
|
|
4734
4743
|
const r = "&#x" + t.toString(16).toUpperCase();
|
|
4735
|
-
return n && e && !
|
|
4744
|
+
return n && e && !Ls.test(String.fromCharCode(e)) ? r : r + ";";
|
|
4736
4745
|
}
|
|
4737
|
-
const
|
|
4738
|
-
function
|
|
4746
|
+
const Is = /\d/;
|
|
4747
|
+
function zs(t, e, n) {
|
|
4739
4748
|
const r = "&#" + String(t);
|
|
4740
|
-
return n && e && !
|
|
4749
|
+
return n && e && !Is.test(String.fromCharCode(e)) ? r : r + ";";
|
|
4741
4750
|
}
|
|
4742
|
-
const
|
|
4751
|
+
const Ms = [
|
|
4743
4752
|
"AElig",
|
|
4744
4753
|
"AMP",
|
|
4745
4754
|
"Aacute",
|
|
@@ -5099,7 +5108,7 @@ const zs = [
|
|
|
5099
5108
|
lsaquo: "‹",
|
|
5100
5109
|
rsaquo: "›",
|
|
5101
5110
|
euro: "€"
|
|
5102
|
-
},
|
|
5111
|
+
}, $s = [
|
|
5103
5112
|
"cent",
|
|
5104
5113
|
"copy",
|
|
5105
5114
|
"divide",
|
|
@@ -5108,56 +5117,56 @@ const zs = [
|
|
|
5108
5117
|
"not",
|
|
5109
5118
|
"para",
|
|
5110
5119
|
"times"
|
|
5111
|
-
],
|
|
5120
|
+
], hr = {}.hasOwnProperty, wt = {};
|
|
5112
5121
|
let Pe;
|
|
5113
5122
|
for (Pe in rt)
|
|
5114
|
-
|
|
5115
|
-
const
|
|
5116
|
-
function
|
|
5123
|
+
hr.call(rt, Pe) && (wt[rt[Pe]] = Pe);
|
|
5124
|
+
const js = /[^\dA-Za-z]/;
|
|
5125
|
+
function Ds(t, e, n, r) {
|
|
5117
5126
|
const o = String.fromCharCode(t);
|
|
5118
|
-
if (
|
|
5127
|
+
if (hr.call(wt, o)) {
|
|
5119
5128
|
const i = wt[o], s = "&" + i;
|
|
5120
|
-
return n &&
|
|
5129
|
+
return n && Ms.includes(i) && !$s.includes(i) && (!r || e && e !== 61 && js.test(String.fromCharCode(e))) ? s : s + ";";
|
|
5121
5130
|
}
|
|
5122
5131
|
return "";
|
|
5123
5132
|
}
|
|
5124
|
-
function
|
|
5125
|
-
let r =
|
|
5126
|
-
if ((n.useNamedReferences || n.useShortestReferences) && (o =
|
|
5133
|
+
function Bs(t, e, n) {
|
|
5134
|
+
let r = Os(t, e, n.omitOptionalSemicolons), o;
|
|
5135
|
+
if ((n.useNamedReferences || n.useShortestReferences) && (o = Ds(
|
|
5127
5136
|
t,
|
|
5128
5137
|
e,
|
|
5129
5138
|
n.omitOptionalSemicolons,
|
|
5130
5139
|
n.attribute
|
|
5131
5140
|
)), (n.useShortestReferences || !o) && n.useShortestReferences) {
|
|
5132
|
-
const i =
|
|
5141
|
+
const i = zs(t, e, n.omitOptionalSemicolons);
|
|
5133
5142
|
i.length < r.length && (r = i);
|
|
5134
5143
|
}
|
|
5135
5144
|
return o && (!n.useShortestReferences || o.length < r.length) ? o : r;
|
|
5136
5145
|
}
|
|
5137
5146
|
function se(t, e) {
|
|
5138
|
-
return
|
|
5147
|
+
return Ns(t, Object.assign({ format: Bs }, e));
|
|
5139
5148
|
}
|
|
5140
|
-
const
|
|
5141
|
-
function
|
|
5149
|
+
const Gs = /^>|^->|<!--|-->|--!>|<!-$/g, Us = [">"], Fs = ["<", ">"];
|
|
5150
|
+
function Hs(t, e, n, r) {
|
|
5142
5151
|
return r.settings.bogusComments ? "<?" + se(
|
|
5143
5152
|
t.value,
|
|
5144
5153
|
Object.assign({}, r.settings.characterReferences, {
|
|
5145
|
-
subset:
|
|
5154
|
+
subset: Us
|
|
5146
5155
|
})
|
|
5147
|
-
) + ">" : "<!--" + t.value.replace(
|
|
5156
|
+
) + ">" : "<!--" + t.value.replace(Gs, o) + "-->";
|
|
5148
5157
|
function o(i) {
|
|
5149
5158
|
return se(
|
|
5150
5159
|
i,
|
|
5151
5160
|
Object.assign({}, r.settings.characterReferences, {
|
|
5152
|
-
subset:
|
|
5161
|
+
subset: Fs
|
|
5153
5162
|
})
|
|
5154
5163
|
);
|
|
5155
5164
|
}
|
|
5156
5165
|
}
|
|
5157
|
-
function
|
|
5166
|
+
function Ws(t, e, n, r) {
|
|
5158
5167
|
return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
|
|
5159
5168
|
}
|
|
5160
|
-
function
|
|
5169
|
+
function yn(t, e) {
|
|
5161
5170
|
const n = String(t);
|
|
5162
5171
|
if (typeof e != "string")
|
|
5163
5172
|
throw new TypeError("Expected character");
|
|
@@ -5166,27 +5175,27 @@ function gn(t, e) {
|
|
|
5166
5175
|
r++, o = n.indexOf(e, o + e.length);
|
|
5167
5176
|
return r;
|
|
5168
5177
|
}
|
|
5169
|
-
function
|
|
5178
|
+
function Zs(t, e) {
|
|
5170
5179
|
const n = e || {};
|
|
5171
5180
|
return (t[t.length - 1] === "" ? [...t, ""] : t).join(
|
|
5172
5181
|
(n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
|
|
5173
5182
|
).trim();
|
|
5174
5183
|
}
|
|
5175
|
-
function
|
|
5184
|
+
function qs(t) {
|
|
5176
5185
|
return t.join(" ").trim();
|
|
5177
5186
|
}
|
|
5178
|
-
const
|
|
5187
|
+
const Vs = /[ \t\n\f\r]/g;
|
|
5179
5188
|
function Et(t) {
|
|
5180
|
-
return typeof t == "object" ? t.type === "text" ?
|
|
5189
|
+
return typeof t == "object" ? t.type === "text" ? _n(t.value) : !1 : _n(t);
|
|
5181
5190
|
}
|
|
5182
|
-
function
|
|
5183
|
-
return t.replace(
|
|
5191
|
+
function _n(t) {
|
|
5192
|
+
return t.replace(Vs, "") === "";
|
|
5184
5193
|
}
|
|
5185
|
-
const x =
|
|
5186
|
-
function
|
|
5194
|
+
const x = dr(1), pr = dr(-1), Ks = [];
|
|
5195
|
+
function dr(t) {
|
|
5187
5196
|
return e;
|
|
5188
5197
|
function e(n, r, o) {
|
|
5189
|
-
const i = n ? n.children :
|
|
5198
|
+
const i = n ? n.children : Ks;
|
|
5190
5199
|
let s = (r || 0) + t, l = i[s];
|
|
5191
5200
|
if (!o)
|
|
5192
5201
|
for (; l && Et(l); )
|
|
@@ -5194,106 +5203,106 @@ function pr(t) {
|
|
|
5194
5203
|
return l;
|
|
5195
5204
|
}
|
|
5196
5205
|
}
|
|
5197
|
-
const
|
|
5198
|
-
function
|
|
5206
|
+
const Js = {}.hasOwnProperty;
|
|
5207
|
+
function mr(t) {
|
|
5199
5208
|
return e;
|
|
5200
5209
|
function e(n, r, o) {
|
|
5201
|
-
return
|
|
5210
|
+
return Js.call(t, n.tagName) && t[n.tagName](n, r, o);
|
|
5202
5211
|
}
|
|
5203
5212
|
}
|
|
5204
|
-
const xt =
|
|
5205
|
-
body:
|
|
5213
|
+
const xt = mr({
|
|
5214
|
+
body: Xs,
|
|
5206
5215
|
caption: ot,
|
|
5207
5216
|
colgroup: ot,
|
|
5208
|
-
dd:
|
|
5209
|
-
dt:
|
|
5217
|
+
dd: na,
|
|
5218
|
+
dt: ta,
|
|
5210
5219
|
head: ot,
|
|
5211
|
-
html:
|
|
5212
|
-
li:
|
|
5213
|
-
optgroup:
|
|
5214
|
-
option:
|
|
5215
|
-
p:
|
|
5216
|
-
rp:
|
|
5217
|
-
rt:
|
|
5218
|
-
tbody:
|
|
5219
|
-
td:
|
|
5220
|
-
tfoot:
|
|
5221
|
-
th:
|
|
5222
|
-
thead:
|
|
5223
|
-
tr:
|
|
5220
|
+
html: Ys,
|
|
5221
|
+
li: ea,
|
|
5222
|
+
optgroup: ra,
|
|
5223
|
+
option: oa,
|
|
5224
|
+
p: Qs,
|
|
5225
|
+
rp: bn,
|
|
5226
|
+
rt: bn,
|
|
5227
|
+
tbody: sa,
|
|
5228
|
+
td: wn,
|
|
5229
|
+
tfoot: aa,
|
|
5230
|
+
th: wn,
|
|
5231
|
+
thead: ia,
|
|
5232
|
+
tr: la
|
|
5224
5233
|
});
|
|
5225
5234
|
function ot(t, e, n) {
|
|
5226
5235
|
const r = x(n, e, !0);
|
|
5227
5236
|
return !r || r.type !== "comment" && !(r.type === "text" && Et(r.value.charAt(0)));
|
|
5228
5237
|
}
|
|
5229
|
-
function
|
|
5238
|
+
function Ys(t, e, n) {
|
|
5230
5239
|
const r = x(n, e);
|
|
5231
5240
|
return !r || r.type !== "comment";
|
|
5232
5241
|
}
|
|
5233
|
-
function
|
|
5242
|
+
function Xs(t, e, n) {
|
|
5234
5243
|
const r = x(n, e);
|
|
5235
5244
|
return !r || r.type !== "comment";
|
|
5236
5245
|
}
|
|
5237
|
-
function
|
|
5246
|
+
function Qs(t, e, n) {
|
|
5238
5247
|
const r = x(n, e);
|
|
5239
5248
|
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 || // Confusing parent.
|
|
5240
5249
|
!(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
|
|
5241
5250
|
}
|
|
5242
|
-
function
|
|
5251
|
+
function ea(t, e, n) {
|
|
5243
5252
|
const r = x(n, e);
|
|
5244
5253
|
return !r || r.type === "element" && r.tagName === "li";
|
|
5245
5254
|
}
|
|
5246
|
-
function
|
|
5255
|
+
function ta(t, e, n) {
|
|
5247
5256
|
const r = x(n, e);
|
|
5248
5257
|
return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
|
|
5249
5258
|
}
|
|
5250
|
-
function
|
|
5259
|
+
function na(t, e, n) {
|
|
5251
5260
|
const r = x(n, e);
|
|
5252
5261
|
return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
|
|
5253
5262
|
}
|
|
5254
|
-
function
|
|
5263
|
+
function bn(t, e, n) {
|
|
5255
5264
|
const r = x(n, e);
|
|
5256
5265
|
return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
|
|
5257
5266
|
}
|
|
5258
|
-
function
|
|
5267
|
+
function ra(t, e, n) {
|
|
5259
5268
|
const r = x(n, e);
|
|
5260
5269
|
return !r || r.type === "element" && r.tagName === "optgroup";
|
|
5261
5270
|
}
|
|
5262
|
-
function
|
|
5271
|
+
function oa(t, e, n) {
|
|
5263
5272
|
const r = x(n, e);
|
|
5264
5273
|
return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
|
|
5265
5274
|
}
|
|
5266
|
-
function
|
|
5275
|
+
function ia(t, e, n) {
|
|
5267
5276
|
const r = x(n, e);
|
|
5268
5277
|
return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
|
|
5269
5278
|
}
|
|
5270
|
-
function
|
|
5279
|
+
function sa(t, e, n) {
|
|
5271
5280
|
const r = x(n, e);
|
|
5272
5281
|
return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
|
|
5273
5282
|
}
|
|
5274
|
-
function
|
|
5283
|
+
function aa(t, e, n) {
|
|
5275
5284
|
return !x(n, e);
|
|
5276
5285
|
}
|
|
5277
|
-
function
|
|
5286
|
+
function la(t, e, n) {
|
|
5278
5287
|
const r = x(n, e);
|
|
5279
5288
|
return !r || r.type === "element" && r.tagName === "tr";
|
|
5280
5289
|
}
|
|
5281
|
-
function
|
|
5290
|
+
function wn(t, e, n) {
|
|
5282
5291
|
const r = x(n, e);
|
|
5283
5292
|
return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
|
|
5284
5293
|
}
|
|
5285
|
-
const
|
|
5286
|
-
body:
|
|
5287
|
-
colgroup:
|
|
5288
|
-
head:
|
|
5289
|
-
html:
|
|
5290
|
-
tbody:
|
|
5294
|
+
const ca = mr({
|
|
5295
|
+
body: pa,
|
|
5296
|
+
colgroup: da,
|
|
5297
|
+
head: ha,
|
|
5298
|
+
html: ua,
|
|
5299
|
+
tbody: ma
|
|
5291
5300
|
});
|
|
5292
|
-
function
|
|
5301
|
+
function ua(t) {
|
|
5293
5302
|
const e = x(t, -1);
|
|
5294
5303
|
return !e || e.type !== "comment";
|
|
5295
5304
|
}
|
|
5296
|
-
function
|
|
5305
|
+
function ha(t) {
|
|
5297
5306
|
const e = /* @__PURE__ */ new Set();
|
|
5298
5307
|
for (const r of t.children)
|
|
5299
5308
|
if (r.type === "element" && (r.tagName === "base" || r.tagName === "title")) {
|
|
@@ -5303,16 +5312,16 @@ function ua(t) {
|
|
|
5303
5312
|
const n = t.children[0];
|
|
5304
5313
|
return !n || n.type === "element";
|
|
5305
5314
|
}
|
|
5306
|
-
function
|
|
5315
|
+
function pa(t) {
|
|
5307
5316
|
const e = x(t, -1, !0);
|
|
5308
5317
|
return !e || e.type !== "comment" && !(e.type === "text" && Et(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
|
|
5309
5318
|
}
|
|
5310
|
-
function
|
|
5311
|
-
const r =
|
|
5319
|
+
function da(t, e, n) {
|
|
5320
|
+
const r = pr(n, e), o = x(t, -1, !0);
|
|
5312
5321
|
return n && r && r.type === "element" && r.tagName === "colgroup" && xt(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "col");
|
|
5313
5322
|
}
|
|
5314
|
-
function
|
|
5315
|
-
const r =
|
|
5323
|
+
function ma(t, e, n) {
|
|
5324
|
+
const r = pr(n, e), o = x(t, -1);
|
|
5316
5325
|
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && xt(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "tr");
|
|
5317
5326
|
}
|
|
5318
5327
|
const Re = {
|
|
@@ -5345,24 +5354,24 @@ const Re = {
|
|
|
5345
5354
|
['\0"&'.split(""), "\0\"&'`".split("")]
|
|
5346
5355
|
]
|
|
5347
5356
|
};
|
|
5348
|
-
function
|
|
5357
|
+
function fa(t, e, n, r) {
|
|
5349
5358
|
const o = r.schema, i = o.space === "svg" ? !1 : r.settings.omitOptionalTags;
|
|
5350
5359
|
let s = o.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(t.tagName.toLowerCase());
|
|
5351
5360
|
const l = [];
|
|
5352
5361
|
let a;
|
|
5353
|
-
o.space === "html" && t.tagName === "svg" && (r.schema =
|
|
5354
|
-
const c =
|
|
5362
|
+
o.space === "html" && t.tagName === "svg" && (r.schema = ur);
|
|
5363
|
+
const c = ga(r, t.properties), u = r.all(
|
|
5355
5364
|
o.space === "html" && t.tagName === "template" ? t.content : t
|
|
5356
5365
|
);
|
|
5357
|
-
return r.schema = o, u && (s = !1), (c || !i || !
|
|
5366
|
+
return r.schema = o, u && (s = !1), (c || !i || !ca(t, e, n)) && (l.push("<", t.tagName, c ? " " + c : ""), s && (o.space === "svg" || r.settings.closeSelfClosing) && (a = c.charAt(c.length - 1), (!r.settings.tightSelfClosing || a === "/" || a && a !== '"' && a !== "'") && l.push(" "), l.push("/")), l.push(">")), l.push(u), !s && (!i || !xt(t, e, n)) && l.push("</" + t.tagName + ">"), l.join("");
|
|
5358
5367
|
}
|
|
5359
|
-
function
|
|
5368
|
+
function ga(t, e) {
|
|
5360
5369
|
const n = [];
|
|
5361
5370
|
let r = -1, o;
|
|
5362
5371
|
if (e) {
|
|
5363
5372
|
for (o in e)
|
|
5364
5373
|
if (e[o] !== null && e[o] !== void 0) {
|
|
5365
|
-
const i =
|
|
5374
|
+
const i = ya(t, o, e[o]);
|
|
5366
5375
|
i && n.push(i);
|
|
5367
5376
|
}
|
|
5368
5377
|
}
|
|
@@ -5372,8 +5381,8 @@ function fa(t, e) {
|
|
|
5372
5381
|
}
|
|
5373
5382
|
return n.join("");
|
|
5374
5383
|
}
|
|
5375
|
-
function
|
|
5376
|
-
const r =
|
|
5384
|
+
function ya(t, e, n) {
|
|
5385
|
+
const r = ws(t.schema, e), o = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, i = t.settings.allowDangerousCharacters ? 0 : 1;
|
|
5377
5386
|
let s = t.quote, l;
|
|
5378
5387
|
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))
|
|
5379
5388
|
return "";
|
|
@@ -5384,7 +5393,7 @@ function ga(t, e, n) {
|
|
|
5384
5393
|
subset: Re.name[o][i]
|
|
5385
5394
|
})
|
|
5386
5395
|
);
|
|
5387
|
-
return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ?
|
|
5396
|
+
return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? Zs : qs)(n, {
|
|
5388
5397
|
padLeft: !t.settings.tightCommaSeparatedLists
|
|
5389
5398
|
}) : String(n), t.settings.collapseEmptyAttributes && !n) ? a : (t.settings.preferUnquoted && (l = se(
|
|
5390
5399
|
n,
|
|
@@ -5392,7 +5401,7 @@ function ga(t, e, n) {
|
|
|
5392
5401
|
attribute: !0,
|
|
5393
5402
|
subset: Re.unquoted[o][i]
|
|
5394
5403
|
})
|
|
5395
|
-
)), l !== n && (t.settings.quoteSmart &&
|
|
5404
|
+
)), l !== n && (t.settings.quoteSmart && yn(n, s) > yn(n, t.alternative) && (s = t.alternative), l = s + se(
|
|
5396
5405
|
n,
|
|
5397
5406
|
Object.assign({}, t.settings.characterReferences, {
|
|
5398
5407
|
// Always encode without parse errors in non-HTML.
|
|
@@ -5401,44 +5410,44 @@ function ga(t, e, n) {
|
|
|
5401
5410
|
})
|
|
5402
5411
|
) + s), a + (l && "=" + l));
|
|
5403
5412
|
}
|
|
5404
|
-
const
|
|
5405
|
-
function
|
|
5413
|
+
const _a = ["<", "&"];
|
|
5414
|
+
function fr(t, e, n, r) {
|
|
5406
5415
|
return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? t.value : se(
|
|
5407
5416
|
t.value,
|
|
5408
5417
|
Object.assign({}, r.settings.characterReferences, {
|
|
5409
|
-
subset:
|
|
5418
|
+
subset: _a
|
|
5410
5419
|
})
|
|
5411
5420
|
);
|
|
5412
5421
|
}
|
|
5413
|
-
function _a(t, e, n, r) {
|
|
5414
|
-
return r.settings.allowDangerousHtml ? t.value : mr(t, e, n, r);
|
|
5415
|
-
}
|
|
5416
5422
|
function ba(t, e, n, r) {
|
|
5423
|
+
return r.settings.allowDangerousHtml ? t.value : fr(t, e, n, r);
|
|
5424
|
+
}
|
|
5425
|
+
function wa(t, e, n, r) {
|
|
5417
5426
|
return r.all(t);
|
|
5418
5427
|
}
|
|
5419
|
-
const
|
|
5420
|
-
invalid:
|
|
5421
|
-
unknown:
|
|
5422
|
-
handlers: { comment:
|
|
5428
|
+
const va = Cs("type", {
|
|
5429
|
+
invalid: Sa,
|
|
5430
|
+
unknown: ka,
|
|
5431
|
+
handlers: { comment: Hs, doctype: Ws, element: fa, raw: ba, root: wa, text: fr }
|
|
5423
5432
|
});
|
|
5424
|
-
function
|
|
5433
|
+
function Sa(t) {
|
|
5425
5434
|
throw new Error("Expected node, not `" + t + "`");
|
|
5426
5435
|
}
|
|
5427
|
-
function
|
|
5436
|
+
function ka(t) {
|
|
5428
5437
|
const e = (
|
|
5429
5438
|
/** @type {Nodes} */
|
|
5430
5439
|
t
|
|
5431
5440
|
);
|
|
5432
5441
|
throw new Error("Cannot compile unknown node `" + e.type + "`");
|
|
5433
5442
|
}
|
|
5434
|
-
const
|
|
5435
|
-
function
|
|
5436
|
-
const n = e ||
|
|
5443
|
+
const Ca = {}, Ta = {}, Pa = [];
|
|
5444
|
+
function Ra(t, e) {
|
|
5445
|
+
const n = e || Ca, r = n.quote || '"', o = r === '"' ? "'" : '"';
|
|
5437
5446
|
if (r !== '"' && r !== "'")
|
|
5438
5447
|
throw new Error("Invalid quote `" + r + "`, expected `'` or `\"`");
|
|
5439
5448
|
return {
|
|
5440
|
-
one:
|
|
5441
|
-
all:
|
|
5449
|
+
one: Aa,
|
|
5450
|
+
all: Na,
|
|
5442
5451
|
settings: {
|
|
5443
5452
|
omitOptionalTags: n.omitOptionalTags || !1,
|
|
5444
5453
|
allowParseErrors: n.allowParseErrors || !1,
|
|
@@ -5453,12 +5462,12 @@ function Pa(t, e) {
|
|
|
5453
5462
|
tightSelfClosing: n.tightSelfClosing || !1,
|
|
5454
5463
|
collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
|
|
5455
5464
|
allowDangerousHtml: n.allowDangerousHtml || !1,
|
|
5456
|
-
voids: n.voids ||
|
|
5457
|
-
characterReferences: n.characterReferences ||
|
|
5465
|
+
voids: n.voids || ms,
|
|
5466
|
+
characterReferences: n.characterReferences || Ta,
|
|
5458
5467
|
closeSelfClosing: n.closeSelfClosing || !1,
|
|
5459
5468
|
closeEmptyElements: n.closeEmptyElements || !1
|
|
5460
5469
|
},
|
|
5461
|
-
schema: n.space === "svg" ?
|
|
5470
|
+
schema: n.space === "svg" ? ur : ks,
|
|
5462
5471
|
quote: r,
|
|
5463
5472
|
alternative: o
|
|
5464
5473
|
}.one(
|
|
@@ -5467,11 +5476,11 @@ function Pa(t, e) {
|
|
|
5467
5476
|
void 0
|
|
5468
5477
|
);
|
|
5469
5478
|
}
|
|
5470
|
-
function
|
|
5471
|
-
return
|
|
5479
|
+
function Aa(t, e, n) {
|
|
5480
|
+
return va(t, e, n, this);
|
|
5472
5481
|
}
|
|
5473
|
-
function
|
|
5474
|
-
const e = [], n = t && t.children ||
|
|
5482
|
+
function Na(t) {
|
|
5483
|
+
const e = [], n = t && t.children || Pa;
|
|
5475
5484
|
let r = -1;
|
|
5476
5485
|
for (; ++r < n.length; )
|
|
5477
5486
|
e[r] = this.one(n[r], r, t);
|
|
@@ -5486,25 +5495,25 @@ function je(t, e) {
|
|
|
5486
5495
|
function W(t, e) {
|
|
5487
5496
|
return t && (e?.[t?.toLowerCase()] || t);
|
|
5488
5497
|
}
|
|
5489
|
-
function
|
|
5498
|
+
function Ea(t) {
|
|
5490
5499
|
return Array.isArray(t) ? t : [t];
|
|
5491
5500
|
}
|
|
5492
|
-
async function
|
|
5501
|
+
async function gr(t) {
|
|
5493
5502
|
return Promise.resolve(typeof t == "function" ? t() : t).then((e) => e.default || e);
|
|
5494
5503
|
}
|
|
5495
5504
|
function Lt(t) {
|
|
5496
5505
|
return !t || ["plaintext", "txt", "text", "plain"].includes(t);
|
|
5497
5506
|
}
|
|
5498
|
-
function
|
|
5507
|
+
function yr(t) {
|
|
5499
5508
|
return t === "ansi" || Lt(t);
|
|
5500
5509
|
}
|
|
5501
5510
|
function Ot(t) {
|
|
5502
5511
|
return t === "none";
|
|
5503
5512
|
}
|
|
5504
|
-
function
|
|
5513
|
+
function _r(t) {
|
|
5505
5514
|
return Ot(t);
|
|
5506
5515
|
}
|
|
5507
|
-
function
|
|
5516
|
+
function br(t, e) {
|
|
5508
5517
|
if (!e)
|
|
5509
5518
|
return t;
|
|
5510
5519
|
t.properties ||= {}, t.properties.class ||= [], typeof t.properties.class == "string" && (t.properties.class = t.properties.class.split(/\s+/g)), Array.isArray(t.properties.class) || (t.properties.class = []);
|
|
@@ -5523,7 +5532,7 @@ function Ze(t, e = !1) {
|
|
|
5523
5532
|
}
|
|
5524
5533
|
return o;
|
|
5525
5534
|
}
|
|
5526
|
-
function
|
|
5535
|
+
function xa(t) {
|
|
5527
5536
|
const e = Ze(t, !0).map(([o]) => o);
|
|
5528
5537
|
function n(o) {
|
|
5529
5538
|
if (o === t.length)
|
|
@@ -5551,7 +5560,7 @@ function Ea(t) {
|
|
|
5551
5560
|
posToIndex: r
|
|
5552
5561
|
};
|
|
5553
5562
|
}
|
|
5554
|
-
function
|
|
5563
|
+
function La(t, e, n) {
|
|
5555
5564
|
const r = /* @__PURE__ */ new Set();
|
|
5556
5565
|
for (const i of t.matchAll(/lang=["']([\w-]+)["']/g))
|
|
5557
5566
|
r.add(i[1]);
|
|
@@ -5564,8 +5573,8 @@ function xa(t, e, n) {
|
|
|
5564
5573
|
const o = n.getBundledLanguages();
|
|
5565
5574
|
return Array.from(r).filter((i) => i && o[i]);
|
|
5566
5575
|
}
|
|
5567
|
-
const It = "light-dark()",
|
|
5568
|
-
function
|
|
5576
|
+
const It = "light-dark()", Oa = ["color", "background-color"];
|
|
5577
|
+
function Ia(t, e) {
|
|
5569
5578
|
let n = 0;
|
|
5570
5579
|
const r = [];
|
|
5571
5580
|
for (const o of e)
|
|
@@ -5580,14 +5589,14 @@ function Oa(t, e) {
|
|
|
5580
5589
|
offset: t.offset + n
|
|
5581
5590
|
}), r;
|
|
5582
5591
|
}
|
|
5583
|
-
function
|
|
5592
|
+
function za(t, e) {
|
|
5584
5593
|
const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
|
|
5585
5594
|
return n.length ? t.map((r) => r.flatMap((o) => {
|
|
5586
5595
|
const i = n.filter((s) => o.offset < s && s < o.offset + o.content.length).map((s) => s - o.offset).sort((s, l) => s - l);
|
|
5587
|
-
return i.length ?
|
|
5596
|
+
return i.length ? Ia(o, i) : o;
|
|
5588
5597
|
})) : t;
|
|
5589
5598
|
}
|
|
5590
|
-
function
|
|
5599
|
+
function Ma(t, e, n, r, o = "css-vars") {
|
|
5591
5600
|
const i = {
|
|
5592
5601
|
content: t.content,
|
|
5593
5602
|
explanation: t.explanation,
|
|
@@ -5599,7 +5608,7 @@ function za(t, e, n, r, o = "css-vars") {
|
|
|
5599
5608
|
return s.forEach((u, h) => {
|
|
5600
5609
|
for (const p of l) {
|
|
5601
5610
|
const d = u[p] || "inherit";
|
|
5602
|
-
if (h === 0 && r &&
|
|
5611
|
+
if (h === 0 && r && Oa.includes(p))
|
|
5603
5612
|
if (r === It && s.length > 1) {
|
|
5604
5613
|
const m = e.findIndex((g) => g === "light"), w = e.findIndex((g) => g === "dark");
|
|
5605
5614
|
if (m === -1 || w === -1)
|
|
@@ -5625,12 +5634,12 @@ function De(t) {
|
|
|
5625
5634
|
function vt(t) {
|
|
5626
5635
|
return typeof t == "string" ? t : Object.entries(t).map(([e, n]) => `${e}:${n}`).join(";");
|
|
5627
5636
|
}
|
|
5628
|
-
const
|
|
5637
|
+
const wr = /* @__PURE__ */ new WeakMap();
|
|
5629
5638
|
function qe(t, e) {
|
|
5630
|
-
|
|
5639
|
+
wr.set(t, e);
|
|
5631
5640
|
}
|
|
5632
5641
|
function be(t) {
|
|
5633
|
-
return
|
|
5642
|
+
return wr.get(t);
|
|
5634
5643
|
}
|
|
5635
5644
|
class ue {
|
|
5636
5645
|
/**
|
|
@@ -5652,7 +5661,7 @@ class ue {
|
|
|
5652
5661
|
*/
|
|
5653
5662
|
static initial(e, n) {
|
|
5654
5663
|
return new ue(
|
|
5655
|
-
Object.fromEntries(
|
|
5664
|
+
Object.fromEntries(Ea(n).map((r) => [r, gt])),
|
|
5656
5665
|
e
|
|
5657
5666
|
);
|
|
5658
5667
|
}
|
|
@@ -5673,7 +5682,7 @@ class ue {
|
|
|
5673
5682
|
return this._stacks[e];
|
|
5674
5683
|
}
|
|
5675
5684
|
getScopes(e = this.theme) {
|
|
5676
|
-
return
|
|
5685
|
+
return $a(this._stacks[e]);
|
|
5677
5686
|
}
|
|
5678
5687
|
toJSON() {
|
|
5679
5688
|
return {
|
|
@@ -5684,7 +5693,7 @@ class ue {
|
|
|
5684
5693
|
};
|
|
5685
5694
|
}
|
|
5686
5695
|
}
|
|
5687
|
-
function
|
|
5696
|
+
function $a(t) {
|
|
5688
5697
|
const e = [], n = /* @__PURE__ */ new Set();
|
|
5689
5698
|
function r(o) {
|
|
5690
5699
|
if (n.has(o))
|
|
@@ -5695,12 +5704,12 @@ function Ma(t) {
|
|
|
5695
5704
|
}
|
|
5696
5705
|
return r(t), e;
|
|
5697
5706
|
}
|
|
5698
|
-
function
|
|
5707
|
+
function ja(t, e) {
|
|
5699
5708
|
if (!(t instanceof ue))
|
|
5700
5709
|
throw new A("Invalid grammar state");
|
|
5701
5710
|
return t.getInternalStack(e);
|
|
5702
5711
|
}
|
|
5703
|
-
function
|
|
5712
|
+
function Da() {
|
|
5704
5713
|
const t = /* @__PURE__ */ new WeakMap();
|
|
5705
5714
|
function e(n) {
|
|
5706
5715
|
if (!t.has(n.meta)) {
|
|
@@ -5726,12 +5735,12 @@ function ja() {
|
|
|
5726
5735
|
};
|
|
5727
5736
|
}
|
|
5728
5737
|
};
|
|
5729
|
-
const o =
|
|
5738
|
+
const o = xa(n.source), i = (n.options.decorations || []).map((s) => ({
|
|
5730
5739
|
...s,
|
|
5731
5740
|
start: r(s.start),
|
|
5732
5741
|
end: r(s.end)
|
|
5733
5742
|
}));
|
|
5734
|
-
|
|
5743
|
+
Ba(i), t.set(n.meta, {
|
|
5735
5744
|
decorations: i,
|
|
5736
5745
|
converter: o,
|
|
5737
5746
|
source: n.source
|
|
@@ -5745,7 +5754,7 @@ function ja() {
|
|
|
5745
5754
|
if (!this.options.decorations?.length)
|
|
5746
5755
|
return;
|
|
5747
5756
|
const o = e(this).decorations.flatMap((s) => [s.start.offset, s.end.offset]);
|
|
5748
|
-
return
|
|
5757
|
+
return za(n, o);
|
|
5749
5758
|
},
|
|
5750
5759
|
code(n) {
|
|
5751
5760
|
if (!this.options.decorations?.length)
|
|
@@ -5758,7 +5767,7 @@ function ja() {
|
|
|
5758
5767
|
let w = "", b = -1, y = -1;
|
|
5759
5768
|
if (h === 0 && (b = 0), p === 0 && (y = 0), p === Number.POSITIVE_INFINITY && (y = m.children.length), b === -1 || y === -1)
|
|
5760
5769
|
for (let _ = 0; _ < m.children.length; _++)
|
|
5761
|
-
w +=
|
|
5770
|
+
w += vr(m.children[_]), b === -1 && w.length === h && (b = _ + 1), y === -1 && w.length === p && (y = _ + 1);
|
|
5762
5771
|
if (b === -1)
|
|
5763
5772
|
throw new A(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
|
|
5764
5773
|
if (y === -1)
|
|
@@ -5787,7 +5796,7 @@ function ja() {
|
|
|
5787
5796
|
...u.properties,
|
|
5788
5797
|
...d,
|
|
5789
5798
|
class: u.properties.class
|
|
5790
|
-
}, h.properties?.class &&
|
|
5799
|
+
}, h.properties?.class && br(u, h.properties.class), u = m(u, p) || u, u;
|
|
5791
5800
|
}
|
|
5792
5801
|
const a = [], c = r.decorations.sort((u, h) => h.start.offset - u.start.offset || u.end.offset - h.end.offset);
|
|
5793
5802
|
for (const u of c) {
|
|
@@ -5805,7 +5814,7 @@ function ja() {
|
|
|
5805
5814
|
}
|
|
5806
5815
|
};
|
|
5807
5816
|
}
|
|
5808
|
-
function
|
|
5817
|
+
function Ba(t) {
|
|
5809
5818
|
for (let e = 0; e < t.length; e++) {
|
|
5810
5819
|
const n = t[e];
|
|
5811
5820
|
if (n.start.offset > n.end.offset)
|
|
@@ -5820,22 +5829,22 @@ function Da(t) {
|
|
|
5820
5829
|
}
|
|
5821
5830
|
}
|
|
5822
5831
|
}
|
|
5823
|
-
function
|
|
5824
|
-
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(
|
|
5832
|
+
function vr(t) {
|
|
5833
|
+
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(vr).join("") : "";
|
|
5825
5834
|
}
|
|
5826
|
-
const
|
|
5827
|
-
/* @__PURE__ */
|
|
5835
|
+
const Ga = [
|
|
5836
|
+
/* @__PURE__ */ Da()
|
|
5828
5837
|
];
|
|
5829
5838
|
function Be(t) {
|
|
5830
|
-
const e =
|
|
5839
|
+
const e = Ua(t.transformers || []);
|
|
5831
5840
|
return [
|
|
5832
5841
|
...e.pre,
|
|
5833
5842
|
...e.normal,
|
|
5834
5843
|
...e.post,
|
|
5835
|
-
...
|
|
5844
|
+
...Ga
|
|
5836
5845
|
];
|
|
5837
5846
|
}
|
|
5838
|
-
function
|
|
5847
|
+
function Ua(t) {
|
|
5839
5848
|
const e = [], n = [], r = [];
|
|
5840
5849
|
for (const o of t)
|
|
5841
5850
|
switch (o.enforce) {
|
|
@@ -5876,7 +5885,7 @@ var K = [
|
|
|
5876
5885
|
8: "hidden",
|
|
5877
5886
|
9: "strikethrough"
|
|
5878
5887
|
};
|
|
5879
|
-
function
|
|
5888
|
+
function Fa(t, e) {
|
|
5880
5889
|
const n = t.indexOf("\x1B", e);
|
|
5881
5890
|
if (n !== -1 && t[n + 1] === "[") {
|
|
5882
5891
|
const r = t.indexOf("m", n);
|
|
@@ -5891,7 +5900,7 @@ function Ua(t, e) {
|
|
|
5891
5900
|
position: t.length
|
|
5892
5901
|
};
|
|
5893
5902
|
}
|
|
5894
|
-
function
|
|
5903
|
+
function vn(t) {
|
|
5895
5904
|
const e = t.shift();
|
|
5896
5905
|
if (e === "2") {
|
|
5897
5906
|
const n = t.splice(0, 3).map((r) => Number.parseInt(r));
|
|
@@ -5905,7 +5914,7 @@ function wn(t) {
|
|
|
5905
5914
|
return { type: "table", index: Number(n) };
|
|
5906
5915
|
}
|
|
5907
5916
|
}
|
|
5908
|
-
function
|
|
5917
|
+
function Ha(t) {
|
|
5909
5918
|
const e = [];
|
|
5910
5919
|
for (; t.length > 0; ) {
|
|
5911
5920
|
const n = t.shift();
|
|
@@ -5935,7 +5944,7 @@ function Fa(t) {
|
|
|
5935
5944
|
value: { type: "named", name: K[r - 30] }
|
|
5936
5945
|
});
|
|
5937
5946
|
else if (r === 38) {
|
|
5938
|
-
const o =
|
|
5947
|
+
const o = vn(t);
|
|
5939
5948
|
o && e.push({
|
|
5940
5949
|
type: "setForegroundColor",
|
|
5941
5950
|
value: o
|
|
@@ -5950,7 +5959,7 @@ function Fa(t) {
|
|
|
5950
5959
|
value: { type: "named", name: K[r - 40] }
|
|
5951
5960
|
});
|
|
5952
5961
|
else if (r === 48) {
|
|
5953
|
-
const o =
|
|
5962
|
+
const o = vn(t);
|
|
5954
5963
|
o && e.push({
|
|
5955
5964
|
type: "setBackgroundColor",
|
|
5956
5965
|
value: o
|
|
@@ -5973,21 +5982,21 @@ function Fa(t) {
|
|
|
5973
5982
|
}
|
|
5974
5983
|
return e;
|
|
5975
5984
|
}
|
|
5976
|
-
function
|
|
5985
|
+
function Wa() {
|
|
5977
5986
|
let t = null, e = null, n = /* @__PURE__ */ new Set();
|
|
5978
5987
|
return {
|
|
5979
5988
|
parse(r) {
|
|
5980
5989
|
const o = [];
|
|
5981
5990
|
let i = 0;
|
|
5982
5991
|
do {
|
|
5983
|
-
const s =
|
|
5992
|
+
const s = Fa(r, i), l = s.sequence ? r.substring(i, s.startPosition) : r.substring(i);
|
|
5984
5993
|
if (l.length > 0 && o.push({
|
|
5985
5994
|
value: l,
|
|
5986
5995
|
foreground: t,
|
|
5987
5996
|
background: e,
|
|
5988
5997
|
decorations: new Set(n)
|
|
5989
5998
|
}), s.sequence) {
|
|
5990
|
-
const a =
|
|
5999
|
+
const a = Ha(s.sequence);
|
|
5991
6000
|
for (const c of a)
|
|
5992
6001
|
c.type === "resetAll" ? (t = null, e = null, n.clear()) : c.type === "resetForegroundColor" ? t = null : c.type === "resetBackgroundColor" ? e = null : c.type === "resetDecoration" && n.delete(c.value);
|
|
5993
6002
|
for (const c of a)
|
|
@@ -5999,7 +6008,7 @@ function Ha() {
|
|
|
5999
6008
|
}
|
|
6000
6009
|
};
|
|
6001
6010
|
}
|
|
6002
|
-
var
|
|
6011
|
+
var Za = {
|
|
6003
6012
|
black: "#000000",
|
|
6004
6013
|
red: "#bb0000",
|
|
6005
6014
|
green: "#00bb00",
|
|
@@ -6017,7 +6026,7 @@ var Wa = {
|
|
|
6017
6026
|
brightCyan: "#55ffff",
|
|
6018
6027
|
brightWhite: "#ffffff"
|
|
6019
6028
|
};
|
|
6020
|
-
function
|
|
6029
|
+
function qa(t = Za) {
|
|
6021
6030
|
function e(l) {
|
|
6022
6031
|
return t[l];
|
|
6023
6032
|
}
|
|
@@ -6058,7 +6067,7 @@ function Za(t = Wa) {
|
|
|
6058
6067
|
value: s
|
|
6059
6068
|
};
|
|
6060
6069
|
}
|
|
6061
|
-
const
|
|
6070
|
+
const Va = {
|
|
6062
6071
|
black: "#000000",
|
|
6063
6072
|
red: "#cd3131",
|
|
6064
6073
|
green: "#0DBC79",
|
|
@@ -6076,17 +6085,17 @@ const qa = {
|
|
|
6076
6085
|
brightCyan: "#29B8DB",
|
|
6077
6086
|
brightWhite: "#FFFFFF"
|
|
6078
6087
|
};
|
|
6079
|
-
function
|
|
6088
|
+
function Ka(t, e, n) {
|
|
6080
6089
|
const r = je(t, n), o = Ze(e), i = Object.fromEntries(
|
|
6081
6090
|
K.map((a) => {
|
|
6082
6091
|
const c = `terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`, u = t.colors?.[c];
|
|
6083
|
-
return [a, u ||
|
|
6092
|
+
return [a, u || Va[a]];
|
|
6084
6093
|
})
|
|
6085
|
-
), s =
|
|
6094
|
+
), s = qa(i), l = Wa();
|
|
6086
6095
|
return o.map(
|
|
6087
6096
|
(a) => l.parse(a[0]).map((c) => {
|
|
6088
6097
|
let u, h;
|
|
6089
|
-
c.decorations.has("reverse") ? (u = c.background ? s.value(c.background) : t.bg, h = c.foreground ? s.value(c.foreground) : t.fg) : (u = c.foreground ? s.value(c.foreground) : t.fg, h = c.background ? s.value(c.background) : void 0), u = W(u, r), h = W(h, r), c.decorations.has("dim") && (u =
|
|
6098
|
+
c.decorations.has("reverse") ? (u = c.background ? s.value(c.background) : t.bg, h = c.foreground ? s.value(c.foreground) : t.fg) : (u = c.foreground ? s.value(c.foreground) : t.fg, h = c.background ? s.value(c.background) : void 0), u = W(u, r), h = W(h, r), c.decorations.has("dim") && (u = Ja(u));
|
|
6090
6099
|
let p = z.None;
|
|
6091
6100
|
return c.decorations.has("bold") && (p |= z.Bold), c.decorations.has("italic") && (p |= z.Italic), c.decorations.has("underline") && (p |= z.Underline), c.decorations.has("strikethrough") && (p |= z.Strikethrough), {
|
|
6092
6101
|
content: c.value,
|
|
@@ -6099,7 +6108,7 @@ function Va(t, e, n) {
|
|
|
6099
6108
|
})
|
|
6100
6109
|
);
|
|
6101
6110
|
}
|
|
6102
|
-
function
|
|
6111
|
+
function Ja(t) {
|
|
6103
6112
|
const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/i);
|
|
6104
6113
|
if (e)
|
|
6105
6114
|
if (e[3]) {
|
|
@@ -6118,7 +6127,7 @@ function zt(t, e, n = {}) {
|
|
|
6118
6127
|
return Ze(e).map((a) => [{ content: a[0], offset: a[1] }]);
|
|
6119
6128
|
const { theme: i, colorMap: s } = t.setTheme(o);
|
|
6120
6129
|
if (r === "ansi")
|
|
6121
|
-
return
|
|
6130
|
+
return Ka(i, e, n);
|
|
6122
6131
|
const l = t.getLanguage(r);
|
|
6123
6132
|
if (n.grammarState) {
|
|
6124
6133
|
if (n.grammarState.lang !== l.name)
|
|
@@ -6126,9 +6135,9 @@ function zt(t, e, n = {}) {
|
|
|
6126
6135
|
if (!n.grammarState.themes.includes(i.name))
|
|
6127
6136
|
throw new A(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`);
|
|
6128
6137
|
}
|
|
6129
|
-
return
|
|
6138
|
+
return Xa(e, l, i, s, n);
|
|
6130
6139
|
}
|
|
6131
|
-
function
|
|
6140
|
+
function Ya(...t) {
|
|
6132
6141
|
if (t.length === 2)
|
|
6133
6142
|
return be(t[1]);
|
|
6134
6143
|
const [e, n, r = {}] = t, {
|
|
@@ -6146,7 +6155,7 @@ function Ja(...t) {
|
|
|
6146
6155
|
s.name
|
|
6147
6156
|
);
|
|
6148
6157
|
}
|
|
6149
|
-
function
|
|
6158
|
+
function Xa(t, e, n, r, o) {
|
|
6150
6159
|
const i = Ge(t, e, n, r, o), s = new ue(
|
|
6151
6160
|
Ge(t, e, n, r, o).stateStack,
|
|
6152
6161
|
e.name,
|
|
@@ -6159,7 +6168,7 @@ function Ge(t, e, n, r, o) {
|
|
|
6159
6168
|
tokenizeMaxLineLength: s = 0,
|
|
6160
6169
|
tokenizeTimeLimit: l = 500
|
|
6161
6170
|
} = o, a = Ze(t);
|
|
6162
|
-
let c = o.grammarState ?
|
|
6171
|
+
let c = o.grammarState ? ja(o.grammarState, n.name) ?? gt : o.grammarContextCode != null ? Ge(
|
|
6163
6172
|
o.grammarContextCode,
|
|
6164
6173
|
e,
|
|
6165
6174
|
n,
|
|
@@ -6193,14 +6202,14 @@ function Ge(t, e, n, r, o) {
|
|
|
6193
6202
|
const G = _.tokens[2 * C], q = C + 1 < k ? _.tokens[2 * C + 2] : m.length;
|
|
6194
6203
|
if (G === q)
|
|
6195
6204
|
continue;
|
|
6196
|
-
const jt = _.tokens[2 * C + 1],
|
|
6205
|
+
const jt = _.tokens[2 * C + 1], Rr = W(
|
|
6197
6206
|
r[ae.getForeground(jt)],
|
|
6198
6207
|
i
|
|
6199
|
-
),
|
|
6208
|
+
), Ar = ae.getFontStyle(jt), Je = {
|
|
6200
6209
|
content: m.substring(G, q),
|
|
6201
6210
|
offset: w + G,
|
|
6202
|
-
color:
|
|
6203
|
-
fontStyle:
|
|
6211
|
+
color: Rr,
|
|
6212
|
+
fontStyle: Ar
|
|
6204
6213
|
};
|
|
6205
6214
|
if (o.includeExplanation) {
|
|
6206
6215
|
const Dt = [];
|
|
@@ -6231,9 +6240,9 @@ function Ge(t, e, n, r, o) {
|
|
|
6231
6240
|
);
|
|
6232
6241
|
Bt += te.length, Je.explanation.push({
|
|
6233
6242
|
content: te,
|
|
6234
|
-
scopes: o.includeExplanation === "scopeName" ?
|
|
6243
|
+
scopes: o.includeExplanation === "scopeName" ? Qa(
|
|
6235
6244
|
H.scopes
|
|
6236
|
-
) :
|
|
6245
|
+
) : el(
|
|
6237
6246
|
Dt,
|
|
6238
6247
|
H.scopes
|
|
6239
6248
|
)
|
|
@@ -6249,42 +6258,42 @@ function Ge(t, e, n, r, o) {
|
|
|
6249
6258
|
stateStack: c
|
|
6250
6259
|
};
|
|
6251
6260
|
}
|
|
6252
|
-
function
|
|
6261
|
+
function Qa(t) {
|
|
6253
6262
|
return t.map((e) => ({ scopeName: e }));
|
|
6254
6263
|
}
|
|
6255
|
-
function
|
|
6264
|
+
function el(t, e) {
|
|
6256
6265
|
const n = [];
|
|
6257
6266
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
6258
6267
|
const i = e[r];
|
|
6259
6268
|
n[r] = {
|
|
6260
6269
|
scopeName: i,
|
|
6261
|
-
themeMatches:
|
|
6270
|
+
themeMatches: nl(t, i, e.slice(0, r))
|
|
6262
6271
|
};
|
|
6263
6272
|
}
|
|
6264
6273
|
return n;
|
|
6265
6274
|
}
|
|
6266
|
-
function
|
|
6275
|
+
function Sn(t, e) {
|
|
6267
6276
|
return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
|
|
6268
6277
|
}
|
|
6269
|
-
function
|
|
6270
|
-
if (!
|
|
6278
|
+
function tl(t, e, n) {
|
|
6279
|
+
if (!Sn(t[t.length - 1], e))
|
|
6271
6280
|
return !1;
|
|
6272
6281
|
let r = t.length - 2, o = n.length - 1;
|
|
6273
6282
|
for (; r >= 0 && o >= 0; )
|
|
6274
|
-
|
|
6283
|
+
Sn(t[r], n[o]) && (r -= 1), o -= 1;
|
|
6275
6284
|
return r === -1;
|
|
6276
6285
|
}
|
|
6277
|
-
function
|
|
6286
|
+
function nl(t, e, n) {
|
|
6278
6287
|
const r = [];
|
|
6279
6288
|
for (const { selectors: o, settings: i } of t)
|
|
6280
6289
|
for (const s of o)
|
|
6281
|
-
if (
|
|
6290
|
+
if (tl(s, e, n)) {
|
|
6282
6291
|
r.push(i);
|
|
6283
6292
|
break;
|
|
6284
6293
|
}
|
|
6285
6294
|
return r;
|
|
6286
6295
|
}
|
|
6287
|
-
function
|
|
6296
|
+
function Sr(t, e, n) {
|
|
6288
6297
|
const r = Object.entries(n.themes).filter((a) => a[1]).map((a) => ({ color: a[0], theme: a[1] })), o = r.map((a) => {
|
|
6289
6298
|
const c = zt(t, e, {
|
|
6290
6299
|
...n,
|
|
@@ -6295,7 +6304,7 @@ function vr(t, e, n) {
|
|
|
6295
6304
|
state: u,
|
|
6296
6305
|
theme: h
|
|
6297
6306
|
};
|
|
6298
|
-
}), i =
|
|
6307
|
+
}), i = rl(
|
|
6299
6308
|
...o.map((a) => a.tokens)
|
|
6300
6309
|
), s = i[0].map(
|
|
6301
6310
|
(a, c) => a.map((u, h) => {
|
|
@@ -6320,7 +6329,7 @@ function vr(t, e, n) {
|
|
|
6320
6329
|
) : void 0;
|
|
6321
6330
|
return l && qe(s, l), s;
|
|
6322
6331
|
}
|
|
6323
|
-
function
|
|
6332
|
+
function rl(...t) {
|
|
6324
6333
|
const e = t.map(() => []), n = t.length;
|
|
6325
6334
|
for (let r = 0; r < t[0].length; r++) {
|
|
6326
6335
|
const o = t.map((a) => a[r]), i = e.map(() => []);
|
|
@@ -6353,7 +6362,7 @@ function Ue(t, e, n) {
|
|
|
6353
6362
|
} = n, p = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y, g) => y.color === c ? -1 : g.color === c ? 1 : 0);
|
|
6354
6363
|
if (p.length === 0)
|
|
6355
6364
|
throw new A("`themes` option must not be empty");
|
|
6356
|
-
const d =
|
|
6365
|
+
const d = Sr(
|
|
6357
6366
|
t,
|
|
6358
6367
|
e,
|
|
6359
6368
|
n
|
|
@@ -6361,9 +6370,9 @@ function Ue(t, e, n) {
|
|
|
6361
6370
|
if (a = be(d), c && It !== c && !p.find((y) => y.color === c))
|
|
6362
6371
|
throw new A(`\`themes\` option must contain the defaultColor key \`${c}\``);
|
|
6363
6372
|
const m = p.map((y) => t.getTheme(y.theme)), w = p.map((y) => y.color);
|
|
6364
|
-
i = d.map((y) => y.map((g) =>
|
|
6373
|
+
i = d.map((y) => y.map((g) => Ma(g, w, u, c, h))), a && qe(i, a);
|
|
6365
6374
|
const b = p.map((y) => je(y.theme, n));
|
|
6366
|
-
o =
|
|
6375
|
+
o = kn(p, m, b, u, c, "fg", h), r = kn(p, m, b, u, c, "bg", h), s = `shiki-themes ${m.map((y) => y.name).join(" ")}`, l = c ? void 0 : [o, r].join(";");
|
|
6367
6376
|
} else if ("theme" in n) {
|
|
6368
6377
|
const c = je(n.theme, n);
|
|
6369
6378
|
i = zt(
|
|
@@ -6384,7 +6393,7 @@ function Ue(t, e, n) {
|
|
|
6384
6393
|
grammarState: a
|
|
6385
6394
|
};
|
|
6386
6395
|
}
|
|
6387
|
-
function
|
|
6396
|
+
function kn(t, e, n, r, o, i, s) {
|
|
6388
6397
|
return t.map((l, a) => {
|
|
6389
6398
|
const c = W(e[a][i], n[a]) || "inherit", u = `${r + l.color}${i === "bg" ? "-bg" : ""}:${c}`;
|
|
6390
6399
|
if (a === 0 && o) {
|
|
@@ -6421,7 +6430,7 @@ function Fe(t, e, n, r = {
|
|
|
6421
6430
|
mergeWhitespaces: h = !0,
|
|
6422
6431
|
mergeSameStyleTokens: p = !1
|
|
6423
6432
|
} = n;
|
|
6424
|
-
h === !0 ? i =
|
|
6433
|
+
h === !0 ? i = il(i) : h === "never" && (i = sl(i)), p && (i = al(i));
|
|
6425
6434
|
const d = {
|
|
6426
6435
|
...r,
|
|
6427
6436
|
get source() {
|
|
@@ -6430,7 +6439,7 @@ function Fe(t, e, n, r = {
|
|
|
6430
6439
|
};
|
|
6431
6440
|
for (const m of Be(n))
|
|
6432
6441
|
i = m.tokens?.call(d, i) || i;
|
|
6433
|
-
return
|
|
6442
|
+
return ol(
|
|
6434
6443
|
i,
|
|
6435
6444
|
{
|
|
6436
6445
|
...n,
|
|
@@ -6443,7 +6452,7 @@ function Fe(t, e, n, r = {
|
|
|
6443
6452
|
u
|
|
6444
6453
|
);
|
|
6445
6454
|
}
|
|
6446
|
-
function
|
|
6455
|
+
function ol(t, e, n, r = be(t)) {
|
|
6447
6456
|
const o = Be(e), i = [], s = {
|
|
6448
6457
|
type: "root",
|
|
6449
6458
|
children: []
|
|
@@ -6476,7 +6485,7 @@ function rl(t, e, n, r = be(t)) {
|
|
|
6476
6485
|
const h = [], p = {
|
|
6477
6486
|
...n,
|
|
6478
6487
|
structure: l,
|
|
6479
|
-
addClassToHast:
|
|
6488
|
+
addClassToHast: br,
|
|
6480
6489
|
get source() {
|
|
6481
6490
|
return n.source;
|
|
6482
6491
|
},
|
|
@@ -6527,7 +6536,7 @@ function rl(t, e, n, r = be(t)) {
|
|
|
6527
6536
|
for (const g of o)
|
|
6528
6537
|
b = g?.line?.call(p, b, w + 1) || b;
|
|
6529
6538
|
h.push(b), i.push(b);
|
|
6530
|
-
}
|
|
6539
|
+
} else l === "inline" && h.push(b);
|
|
6531
6540
|
}), l === "classic") {
|
|
6532
6541
|
for (const m of o)
|
|
6533
6542
|
u = m?.code?.call(p, u) || u;
|
|
@@ -6535,13 +6544,43 @@ function rl(t, e, n, r = be(t)) {
|
|
|
6535
6544
|
for (const m of o)
|
|
6536
6545
|
c = m?.pre?.call(p, c) || c;
|
|
6537
6546
|
s.children.push(c);
|
|
6547
|
+
} else if (l === "inline") {
|
|
6548
|
+
const m = [];
|
|
6549
|
+
let w = {
|
|
6550
|
+
type: "element",
|
|
6551
|
+
tagName: "span",
|
|
6552
|
+
properties: { class: "line" },
|
|
6553
|
+
children: []
|
|
6554
|
+
};
|
|
6555
|
+
for (const g of s.children)
|
|
6556
|
+
g.type === "element" && g.tagName === "br" ? (m.push(w), w = {
|
|
6557
|
+
type: "element",
|
|
6558
|
+
tagName: "span",
|
|
6559
|
+
properties: { class: "line" },
|
|
6560
|
+
children: []
|
|
6561
|
+
}) : (g.type === "element" || g.type === "text") && w.children.push(g);
|
|
6562
|
+
m.push(w);
|
|
6563
|
+
let y = {
|
|
6564
|
+
type: "element",
|
|
6565
|
+
tagName: "code",
|
|
6566
|
+
properties: {},
|
|
6567
|
+
children: m
|
|
6568
|
+
};
|
|
6569
|
+
for (const g of o)
|
|
6570
|
+
y = g?.code?.call(p, y) || y;
|
|
6571
|
+
s.children = [];
|
|
6572
|
+
for (let g = 0; g < y.children.length; g++) {
|
|
6573
|
+
g > 0 && s.children.push({ type: "element", tagName: "br", properties: {}, children: [] });
|
|
6574
|
+
const _ = y.children[g];
|
|
6575
|
+
_.type === "element" && s.children.push(..._.children);
|
|
6576
|
+
}
|
|
6538
6577
|
}
|
|
6539
6578
|
let d = s;
|
|
6540
6579
|
for (const m of o)
|
|
6541
6580
|
d = m?.root?.call(p, d) || d;
|
|
6542
6581
|
return r && qe(d, r), d;
|
|
6543
6582
|
}
|
|
6544
|
-
function
|
|
6583
|
+
function il(t) {
|
|
6545
6584
|
return t.map((e) => {
|
|
6546
6585
|
const n = [];
|
|
6547
6586
|
let r = "", o = 0;
|
|
@@ -6561,7 +6600,7 @@ function ol(t) {
|
|
|
6561
6600
|
}), n;
|
|
6562
6601
|
});
|
|
6563
6602
|
}
|
|
6564
|
-
function
|
|
6603
|
+
function sl(t) {
|
|
6565
6604
|
return t.map((e) => e.flatMap((n) => {
|
|
6566
6605
|
if (n.content.match(/^\s+$/))
|
|
6567
6606
|
return n;
|
|
@@ -6585,7 +6624,7 @@ function il(t) {
|
|
|
6585
6624
|
}), l;
|
|
6586
6625
|
}));
|
|
6587
6626
|
}
|
|
6588
|
-
function
|
|
6627
|
+
function al(t) {
|
|
6589
6628
|
return t.map((e) => {
|
|
6590
6629
|
const n = [];
|
|
6591
6630
|
for (const r of e) {
|
|
@@ -6599,22 +6638,22 @@ function sl(t) {
|
|
|
6599
6638
|
return n;
|
|
6600
6639
|
});
|
|
6601
6640
|
}
|
|
6602
|
-
const
|
|
6603
|
-
function
|
|
6641
|
+
const ll = Ra;
|
|
6642
|
+
function cl(t, e, n) {
|
|
6604
6643
|
const r = {
|
|
6605
6644
|
meta: {},
|
|
6606
6645
|
options: n,
|
|
6607
6646
|
codeToHast: (i, s) => Fe(t, i, s),
|
|
6608
6647
|
codeToTokens: (i, s) => Ue(t, i, s)
|
|
6609
6648
|
};
|
|
6610
|
-
let o =
|
|
6649
|
+
let o = ll(Fe(t, e, n, r));
|
|
6611
6650
|
for (const i of Be(n))
|
|
6612
6651
|
o = i.postprocess?.call(r, o, n) || o;
|
|
6613
6652
|
return o;
|
|
6614
6653
|
}
|
|
6615
|
-
const
|
|
6654
|
+
const Cn = { light: "#333333", dark: "#bbbbbb" }, Tn = { light: "#fffffe", dark: "#1e1e1e" }, Pn = "__shiki_resolved";
|
|
6616
6655
|
function Mt(t) {
|
|
6617
|
-
if (t?.[
|
|
6656
|
+
if (t?.[Pn])
|
|
6618
6657
|
return t;
|
|
6619
6658
|
const e = {
|
|
6620
6659
|
...t
|
|
@@ -6623,7 +6662,7 @@ function Mt(t) {
|
|
|
6623
6662
|
let { bg: n, fg: r } = e;
|
|
6624
6663
|
if (!n || !r) {
|
|
6625
6664
|
const l = e.settings ? e.settings.find((a) => !a.name && !a.scope) : void 0;
|
|
6626
|
-
l?.settings?.foreground && (r = l.settings.foreground), l?.settings?.background && (n = l.settings.background), !r && e?.colors?.["editor.foreground"] && (r = e.colors["editor.foreground"]), !n && e?.colors?.["editor.background"] && (n = e.colors["editor.background"]), r || (r = e.type === "light" ?
|
|
6665
|
+
l?.settings?.foreground && (r = l.settings.foreground), l?.settings?.background && (n = l.settings.background), !r && e?.colors?.["editor.foreground"] && (r = e.colors["editor.foreground"]), !n && e?.colors?.["editor.background"] && (n = e.colors["editor.background"]), r || (r = e.type === "light" ? Cn.light : Cn.dark), n || (n = e.type === "light" ? Tn.light : Tn.dark), e.fg = r, e.bg = n;
|
|
6627
6666
|
}
|
|
6628
6667
|
e.settings[0] && e.settings[0].settings && !e.settings[0].scope || e.settings.unshift({
|
|
6629
6668
|
settings: {
|
|
@@ -6665,34 +6704,34 @@ function Mt(t) {
|
|
|
6665
6704
|
const a = s(e.colors[l]);
|
|
6666
6705
|
e.colorReplacements[a] = e.colors[l], e.colors[l] = a;
|
|
6667
6706
|
}
|
|
6668
|
-
return Object.defineProperty(e,
|
|
6707
|
+
return Object.defineProperty(e, Pn, {
|
|
6669
6708
|
enumerable: !1,
|
|
6670
6709
|
writable: !1,
|
|
6671
6710
|
value: !0
|
|
6672
6711
|
}), e;
|
|
6673
6712
|
}
|
|
6674
|
-
async function
|
|
6713
|
+
async function kr(t) {
|
|
6675
6714
|
return Array.from(new Set((await Promise.all(
|
|
6676
|
-
t.filter((e) => !
|
|
6715
|
+
t.filter((e) => !yr(e)).map(async (e) => await gr(e).then((n) => Array.isArray(n) ? n : [n]))
|
|
6677
6716
|
)).flat()));
|
|
6678
6717
|
}
|
|
6679
|
-
async function
|
|
6718
|
+
async function Cr(t) {
|
|
6680
6719
|
return (await Promise.all(
|
|
6681
6720
|
t.map(
|
|
6682
|
-
async (n) =>
|
|
6721
|
+
async (n) => _r(n) ? null : Mt(await gr(n))
|
|
6683
6722
|
)
|
|
6684
6723
|
)).filter((n) => !!n);
|
|
6685
6724
|
}
|
|
6686
|
-
let
|
|
6687
|
-
function
|
|
6688
|
-
e >
|
|
6725
|
+
let ul = 3;
|
|
6726
|
+
function hl(t, e = 3) {
|
|
6727
|
+
e > ul || console.trace(`[SHIKI DEPRECATE]: ${t}`);
|
|
6689
6728
|
}
|
|
6690
6729
|
let re = class extends Error {
|
|
6691
6730
|
constructor(e) {
|
|
6692
6731
|
super(e), this.name = "ShikiError";
|
|
6693
6732
|
}
|
|
6694
6733
|
};
|
|
6695
|
-
class
|
|
6734
|
+
class pl extends ds {
|
|
6696
6735
|
constructor(e, n, r, o = {}) {
|
|
6697
6736
|
super(e), this._resolver = e, this._themes = n, this._langs = r, this._alias = o, this._themes.map((i) => this.loadTheme(i)), this.loadLanguages(this._langs);
|
|
6698
6737
|
}
|
|
@@ -6774,12 +6813,14 @@ class hl extends ps {
|
|
|
6774
6813
|
]), this._loadedLanguagesCache;
|
|
6775
6814
|
}
|
|
6776
6815
|
resolveEmbeddedLanguages(e) {
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6816
|
+
this._langMap.set(e.name, e), this._langGraph.set(e.name, e);
|
|
6817
|
+
const n = e.embeddedLanguages ?? e.embeddedLangs;
|
|
6818
|
+
if (n)
|
|
6819
|
+
for (const r of n)
|
|
6820
|
+
this._langGraph.set(r, this._langMap.get(r));
|
|
6780
6821
|
}
|
|
6781
6822
|
}
|
|
6782
|
-
class
|
|
6823
|
+
class dl {
|
|
6783
6824
|
_langs = /* @__PURE__ */ new Map();
|
|
6784
6825
|
_scopeToLang = /* @__PURE__ */ new Map();
|
|
6785
6826
|
_injections = /* @__PURE__ */ new Map();
|
|
@@ -6817,12 +6858,12 @@ class pl {
|
|
|
6817
6858
|
}
|
|
6818
6859
|
}
|
|
6819
6860
|
let he = 0;
|
|
6820
|
-
function
|
|
6861
|
+
function ml(t) {
|
|
6821
6862
|
he += 1, t.warnings !== !1 && he >= 10 && he % 10 === 0 && console.warn(`[Shiki] ${he} 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.`);
|
|
6822
6863
|
let e = !1;
|
|
6823
6864
|
if (!t.engine)
|
|
6824
6865
|
throw new re("`engine` option is required for synchronous mode");
|
|
6825
|
-
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(Mt), o = new
|
|
6866
|
+
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(Mt), o = new dl(t.engine, n), i = new pl(o, r, n, t.langAlias);
|
|
6826
6867
|
let s;
|
|
6827
6868
|
function l(g) {
|
|
6828
6869
|
b();
|
|
@@ -6860,7 +6901,7 @@ function dl(t) {
|
|
|
6860
6901
|
b(), i.loadLanguages(g.flat(1));
|
|
6861
6902
|
}
|
|
6862
6903
|
async function d(...g) {
|
|
6863
|
-
return p(await
|
|
6904
|
+
return p(await kr(g));
|
|
6864
6905
|
}
|
|
6865
6906
|
function m(...g) {
|
|
6866
6907
|
b();
|
|
@@ -6868,7 +6909,7 @@ function dl(t) {
|
|
|
6868
6909
|
i.loadTheme(_);
|
|
6869
6910
|
}
|
|
6870
6911
|
async function w(...g) {
|
|
6871
|
-
return b(), m(await
|
|
6912
|
+
return b(), m(await Cr(g));
|
|
6872
6913
|
}
|
|
6873
6914
|
function b() {
|
|
6874
6915
|
if (e)
|
|
@@ -6891,45 +6932,45 @@ function dl(t) {
|
|
|
6891
6932
|
[Symbol.dispose]: y
|
|
6892
6933
|
};
|
|
6893
6934
|
}
|
|
6894
|
-
async function
|
|
6895
|
-
t.engine ||
|
|
6935
|
+
async function fl(t) {
|
|
6936
|
+
t.engine || hl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
|
|
6896
6937
|
const [
|
|
6897
6938
|
e,
|
|
6898
6939
|
n,
|
|
6899
6940
|
r
|
|
6900
6941
|
] = await Promise.all([
|
|
6901
|
-
|
|
6902
|
-
|
|
6942
|
+
Cr(t.themes || []),
|
|
6943
|
+
kr(t.langs || []),
|
|
6903
6944
|
t.engine
|
|
6904
6945
|
]);
|
|
6905
|
-
return
|
|
6946
|
+
return ml({
|
|
6906
6947
|
...t,
|
|
6907
6948
|
themes: e,
|
|
6908
6949
|
langs: n,
|
|
6909
6950
|
engine: r
|
|
6910
6951
|
});
|
|
6911
6952
|
}
|
|
6912
|
-
async function
|
|
6913
|
-
const e = await
|
|
6953
|
+
async function gl(t) {
|
|
6954
|
+
const e = await fl(t);
|
|
6914
6955
|
return {
|
|
6915
|
-
getLastGrammarState: (...n) =>
|
|
6956
|
+
getLastGrammarState: (...n) => Ya(e, ...n),
|
|
6916
6957
|
codeToTokensBase: (n, r) => zt(e, n, r),
|
|
6917
|
-
codeToTokensWithThemes: (n, r) =>
|
|
6958
|
+
codeToTokensWithThemes: (n, r) => Sr(e, n, r),
|
|
6918
6959
|
codeToTokens: (n, r) => Ue(e, n, r),
|
|
6919
6960
|
codeToHast: (n, r) => Fe(e, n, r),
|
|
6920
|
-
codeToHtml: (n, r) =>
|
|
6961
|
+
codeToHtml: (n, r) => cl(e, n, r),
|
|
6921
6962
|
getBundledLanguages: () => ({}),
|
|
6922
6963
|
getBundledThemes: () => ({}),
|
|
6923
6964
|
...e,
|
|
6924
6965
|
getInternalContext: () => e
|
|
6925
6966
|
};
|
|
6926
6967
|
}
|
|
6927
|
-
function
|
|
6968
|
+
function yl(t) {
|
|
6928
6969
|
const e = t.langs, n = t.themes, r = t.engine;
|
|
6929
6970
|
async function o(i) {
|
|
6930
6971
|
function s(h) {
|
|
6931
6972
|
if (typeof h == "string") {
|
|
6932
|
-
if (
|
|
6973
|
+
if (yr(h))
|
|
6933
6974
|
return [];
|
|
6934
6975
|
h = i.langAlias?.[h] || h;
|
|
6935
6976
|
const p = e[h];
|
|
@@ -6940,7 +6981,7 @@ function gl(t) {
|
|
|
6940
6981
|
return h;
|
|
6941
6982
|
}
|
|
6942
6983
|
function l(h) {
|
|
6943
|
-
if (
|
|
6984
|
+
if (_r(h))
|
|
6944
6985
|
return "none";
|
|
6945
6986
|
if (typeof h == "string") {
|
|
6946
6987
|
const p = n[h];
|
|
@@ -6950,7 +6991,7 @@ function gl(t) {
|
|
|
6950
6991
|
}
|
|
6951
6992
|
return h;
|
|
6952
6993
|
}
|
|
6953
|
-
const a = (i.themes ?? []).map((h) => l(h)), c = (i.langs ?? []).map((h) => s(h)), u = await
|
|
6994
|
+
const a = (i.themes ?? []).map((h) => l(h)), c = (i.langs ?? []).map((h) => s(h)), u = await gl({
|
|
6954
6995
|
engine: i.engine ?? r(),
|
|
6955
6996
|
...i,
|
|
6956
6997
|
themes: a,
|
|
@@ -6974,7 +7015,7 @@ function gl(t) {
|
|
|
6974
7015
|
}
|
|
6975
7016
|
return o;
|
|
6976
7017
|
}
|
|
6977
|
-
function
|
|
7018
|
+
function _l(t) {
|
|
6978
7019
|
let e;
|
|
6979
7020
|
async function n(r = {}) {
|
|
6980
7021
|
if (e) {
|
|
@@ -6998,8 +7039,8 @@ function yl(t) {
|
|
|
6998
7039
|
}
|
|
6999
7040
|
return n;
|
|
7000
7041
|
}
|
|
7001
|
-
function
|
|
7002
|
-
const n =
|
|
7042
|
+
function bl(t, e) {
|
|
7043
|
+
const n = _l(t);
|
|
7003
7044
|
async function r(o, i) {
|
|
7004
7045
|
const s = await n({
|
|
7005
7046
|
langs: [i.lang],
|
|
@@ -7034,7 +7075,7 @@ function _l(t, e) {
|
|
|
7034
7075
|
}
|
|
7035
7076
|
};
|
|
7036
7077
|
}
|
|
7037
|
-
const
|
|
7078
|
+
const Tr = [
|
|
7038
7079
|
{
|
|
7039
7080
|
id: "abap",
|
|
7040
7081
|
name: "ABAP",
|
|
@@ -7068,7 +7109,7 @@ const Cr = [
|
|
|
7068
7109
|
{
|
|
7069
7110
|
id: "apex",
|
|
7070
7111
|
name: "Apex",
|
|
7071
|
-
import: (() => import("../apex-
|
|
7112
|
+
import: (() => import("../apex-oLhhs58q.js"))
|
|
7072
7113
|
},
|
|
7073
7114
|
{
|
|
7074
7115
|
id: "apl",
|
|
@@ -7132,7 +7173,7 @@ const Cr = [
|
|
|
7132
7173
|
aliases: [
|
|
7133
7174
|
"be"
|
|
7134
7175
|
],
|
|
7135
|
-
import: (() => import("../berry-
|
|
7176
|
+
import: (() => import("../berry-DODBq_Ff.js"))
|
|
7136
7177
|
},
|
|
7137
7178
|
{
|
|
7138
7179
|
id: "bibtex",
|
|
@@ -7252,7 +7293,7 @@ const Cr = [
|
|
|
7252
7293
|
"c#",
|
|
7253
7294
|
"cs"
|
|
7254
7295
|
],
|
|
7255
|
-
import: (() => import("../csharp-
|
|
7296
|
+
import: (() => import("../csharp-C7yUs7-w.js"))
|
|
7256
7297
|
},
|
|
7257
7298
|
{
|
|
7258
7299
|
id: "css",
|
|
@@ -7674,7 +7715,7 @@ const Cr = [
|
|
|
7674
7715
|
{
|
|
7675
7716
|
id: "latex",
|
|
7676
7717
|
name: "LaTeX",
|
|
7677
|
-
import: (() => import("../latex-
|
|
7718
|
+
import: (() => import("../latex-Cs75fyNk.js"))
|
|
7678
7719
|
},
|
|
7679
7720
|
{
|
|
7680
7721
|
id: "lean",
|
|
@@ -7682,7 +7723,7 @@ const Cr = [
|
|
|
7682
7723
|
aliases: [
|
|
7683
7724
|
"lean4"
|
|
7684
7725
|
],
|
|
7685
|
-
import: (() => import("../lean-
|
|
7726
|
+
import: (() => import("../lean-D5yRrexI.js"))
|
|
7686
7727
|
},
|
|
7687
7728
|
{
|
|
7688
7729
|
id: "less",
|
|
@@ -7795,7 +7836,7 @@ const Cr = [
|
|
|
7795
7836
|
aliases: [
|
|
7796
7837
|
"nf"
|
|
7797
7838
|
],
|
|
7798
|
-
import: (() => import("../nextflow-
|
|
7839
|
+
import: (() => import("../nextflow-DmSVRGjG.js"))
|
|
7799
7840
|
},
|
|
7800
7841
|
{
|
|
7801
7842
|
id: "nginx",
|
|
@@ -7810,7 +7851,7 @@ const Cr = [
|
|
|
7810
7851
|
{
|
|
7811
7852
|
id: "nix",
|
|
7812
7853
|
name: "Nix",
|
|
7813
|
-
import: (() => import("../nix-
|
|
7854
|
+
import: (() => import("../nix-BZK5F767.js"))
|
|
7814
7855
|
},
|
|
7815
7856
|
{
|
|
7816
7857
|
id: "nushell",
|
|
@@ -7838,6 +7879,14 @@ const Cr = [
|
|
|
7838
7879
|
name: "OCaml",
|
|
7839
7880
|
import: (() => import("../ocaml-eSVK32Eg.js"))
|
|
7840
7881
|
},
|
|
7882
|
+
{
|
|
7883
|
+
id: "openscad",
|
|
7884
|
+
name: "OpenSCAD",
|
|
7885
|
+
aliases: [
|
|
7886
|
+
"scad"
|
|
7887
|
+
],
|
|
7888
|
+
import: (() => import("../openscad-Sp5uZ6f2.js"))
|
|
7889
|
+
},
|
|
7841
7890
|
{
|
|
7842
7891
|
id: "pascal",
|
|
7843
7892
|
name: "Pascal",
|
|
@@ -7976,7 +8025,7 @@ const Cr = [
|
|
|
7976
8025
|
{
|
|
7977
8026
|
id: "razor",
|
|
7978
8027
|
name: "ASP.NET Razor",
|
|
7979
|
-
import: (() => import("../razor-
|
|
8028
|
+
import: (() => import("../razor-B1z-bksM.js"))
|
|
7980
8029
|
},
|
|
7981
8030
|
{
|
|
7982
8031
|
id: "reg",
|
|
@@ -8095,7 +8144,7 @@ const Cr = [
|
|
|
8095
8144
|
{
|
|
8096
8145
|
id: "solidity",
|
|
8097
8146
|
name: "Solidity",
|
|
8098
|
-
import: (() => import("../solidity-
|
|
8147
|
+
import: (() => import("../solidity-DUWnFhS6.js"))
|
|
8099
8148
|
},
|
|
8100
8149
|
{
|
|
8101
8150
|
id: "soy",
|
|
@@ -8196,7 +8245,7 @@ const Cr = [
|
|
|
8196
8245
|
{
|
|
8197
8246
|
id: "tex",
|
|
8198
8247
|
name: "TeX",
|
|
8199
|
-
import: (() => import("../tex-
|
|
8248
|
+
import: (() => import("../tex-DpOayVob.js"))
|
|
8200
8249
|
},
|
|
8201
8250
|
{
|
|
8202
8251
|
id: "toml",
|
|
@@ -8247,7 +8296,7 @@ const Cr = [
|
|
|
8247
8296
|
aliases: [
|
|
8248
8297
|
"tsp"
|
|
8249
8298
|
],
|
|
8250
|
-
import: (() => import("../typespec-
|
|
8299
|
+
import: (() => import("../typespec-DWqp-kUU.js"))
|
|
8251
8300
|
},
|
|
8252
8301
|
{
|
|
8253
8302
|
id: "typst",
|
|
@@ -8297,17 +8346,17 @@ const Cr = [
|
|
|
8297
8346
|
{
|
|
8298
8347
|
id: "vue",
|
|
8299
8348
|
name: "Vue",
|
|
8300
|
-
import: (() => import("../vue-
|
|
8349
|
+
import: (() => import("../vue-DOVAQqiz.js"))
|
|
8301
8350
|
},
|
|
8302
8351
|
{
|
|
8303
8352
|
id: "vue-html",
|
|
8304
8353
|
name: "Vue HTML",
|
|
8305
|
-
import: (() => import("../vue-html-
|
|
8354
|
+
import: (() => import("../vue-html-C7WI2elu.js"))
|
|
8306
8355
|
},
|
|
8307
8356
|
{
|
|
8308
8357
|
id: "vue-vine",
|
|
8309
8358
|
name: "Vue Vine",
|
|
8310
|
-
import: (() => import("../vue-vine-
|
|
8359
|
+
import: (() => import("../vue-vine-D386fra9.js"))
|
|
8311
8360
|
},
|
|
8312
8361
|
{
|
|
8313
8362
|
id: "vyper",
|
|
@@ -8385,10 +8434,10 @@ const Cr = [
|
|
|
8385
8434
|
name: "Zig",
|
|
8386
8435
|
import: (() => import("../zig-Vm0PO9wB.js"))
|
|
8387
8436
|
}
|
|
8388
|
-
],
|
|
8389
|
-
...
|
|
8390
|
-
...
|
|
8391
|
-
},
|
|
8437
|
+
], wl = Object.fromEntries(Tr.map((t) => [t.id, t.import])), vl = Object.fromEntries(Tr.flatMap((t) => t.aliases?.map((e) => [e, t.import]) || [])), Sl = {
|
|
8438
|
+
...wl,
|
|
8439
|
+
...vl
|
|
8440
|
+
}, kl = [
|
|
8392
8441
|
{
|
|
8393
8442
|
id: "andromeeda",
|
|
8394
8443
|
displayName: "Andromeeda",
|
|
@@ -8435,7 +8484,7 @@ const Cr = [
|
|
|
8435
8484
|
id: "dark-plus",
|
|
8436
8485
|
displayName: "Dark Plus",
|
|
8437
8486
|
type: "dark",
|
|
8438
|
-
import: (() => import("../dark-plus-
|
|
8487
|
+
import: (() => import("../dark-plus-pUHDTVV0.js"))
|
|
8439
8488
|
},
|
|
8440
8489
|
{
|
|
8441
8490
|
id: "dracula",
|
|
@@ -8669,19 +8718,19 @@ const Cr = [
|
|
|
8669
8718
|
id: "rose-pine",
|
|
8670
8719
|
displayName: "Rosé Pine",
|
|
8671
8720
|
type: "dark",
|
|
8672
|
-
import: (() => import("../rose-pine-
|
|
8721
|
+
import: (() => import("../rose-pine-BKc3yVeu.js"))
|
|
8673
8722
|
},
|
|
8674
8723
|
{
|
|
8675
8724
|
id: "rose-pine-dawn",
|
|
8676
8725
|
displayName: "Rosé Pine Dawn",
|
|
8677
8726
|
type: "light",
|
|
8678
|
-
import: (() => import("../rose-pine-dawn-
|
|
8727
|
+
import: (() => import("../rose-pine-dawn-BulJcPZT.js"))
|
|
8679
8728
|
},
|
|
8680
8729
|
{
|
|
8681
8730
|
id: "rose-pine-moon",
|
|
8682
8731
|
displayName: "Rosé Pine Moon",
|
|
8683
8732
|
type: "dark",
|
|
8684
|
-
import: (() => import("../rose-pine-moon-
|
|
8733
|
+
import: (() => import("../rose-pine-moon-j6jiXKV8.js"))
|
|
8685
8734
|
},
|
|
8686
8735
|
{
|
|
8687
8736
|
id: "slack-dark",
|
|
@@ -8749,20 +8798,20 @@ const Cr = [
|
|
|
8749
8798
|
type: "light",
|
|
8750
8799
|
import: (() => import("../vitesse-light-CcmG315c.js"))
|
|
8751
8800
|
}
|
|
8752
|
-
],
|
|
8801
|
+
], Cl = Object.fromEntries(kl.map((t) => [t.id, t.import]));
|
|
8753
8802
|
class $t extends Error {
|
|
8754
8803
|
constructor(e) {
|
|
8755
8804
|
super(e), this.name = "ShikiError";
|
|
8756
8805
|
}
|
|
8757
8806
|
}
|
|
8758
|
-
function
|
|
8807
|
+
function Tl() {
|
|
8759
8808
|
return 2147483648;
|
|
8760
8809
|
}
|
|
8761
|
-
function
|
|
8810
|
+
function Pl() {
|
|
8762
8811
|
return typeof performance < "u" ? performance.now() : Date.now();
|
|
8763
8812
|
}
|
|
8764
|
-
const
|
|
8765
|
-
async function
|
|
8813
|
+
const Rl = (t, e) => t + (e - t % e) % e;
|
|
8814
|
+
async function Al(t) {
|
|
8766
8815
|
let e, n;
|
|
8767
8816
|
const r = {};
|
|
8768
8817
|
function o(d) {
|
|
@@ -8780,13 +8829,13 @@ async function Rl(t) {
|
|
|
8780
8829
|
function l(d) {
|
|
8781
8830
|
const m = r.HEAPU8.length;
|
|
8782
8831
|
d = d >>> 0;
|
|
8783
|
-
const w =
|
|
8832
|
+
const w = Tl();
|
|
8784
8833
|
if (d > w)
|
|
8785
8834
|
return !1;
|
|
8786
8835
|
for (let b = 1; b <= 4; b *= 2) {
|
|
8787
8836
|
let y = m * (1 + 0.2 / b);
|
|
8788
8837
|
y = Math.min(y, d + 100663296);
|
|
8789
|
-
const g = Math.min(w,
|
|
8838
|
+
const g = Math.min(w, Rl(Math.max(d, y), 65536));
|
|
8790
8839
|
if (s(g))
|
|
8791
8840
|
return !0;
|
|
8792
8841
|
}
|
|
@@ -8825,7 +8874,7 @@ async function Rl(t) {
|
|
|
8825
8874
|
return d ? c(r.HEAPU8, d, m) : "";
|
|
8826
8875
|
}
|
|
8827
8876
|
const h = {
|
|
8828
|
-
emscripten_get_now:
|
|
8877
|
+
emscripten_get_now: Pl,
|
|
8829
8878
|
emscripten_memcpy_big: i,
|
|
8830
8879
|
emscripten_resize_heap: l,
|
|
8831
8880
|
fd_write: () => 0
|
|
@@ -8839,9 +8888,9 @@ async function Rl(t) {
|
|
|
8839
8888
|
}
|
|
8840
8889
|
return await p(), r;
|
|
8841
8890
|
}
|
|
8842
|
-
var
|
|
8891
|
+
var Nl = Object.defineProperty, El = (t, e, n) => e in t ? Nl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, N = (t, e, n) => El(t, typeof e != "symbol" ? e + "" : e, n);
|
|
8843
8892
|
let L = null;
|
|
8844
|
-
function
|
|
8893
|
+
function xl(t) {
|
|
8845
8894
|
throw new $t(t.UTF8ToString(t.getLastOnigError()));
|
|
8846
8895
|
}
|
|
8847
8896
|
class Ve {
|
|
@@ -8903,8 +8952,8 @@ const Ke = class F {
|
|
|
8903
8952
|
N(Ke, "LAST_ID", 0);
|
|
8904
8953
|
N(Ke, "_sharedPtr", 0);
|
|
8905
8954
|
N(Ke, "_sharedPtrInUse", !1);
|
|
8906
|
-
let
|
|
8907
|
-
class
|
|
8955
|
+
let Pr = Ke;
|
|
8956
|
+
class Ll {
|
|
8908
8957
|
constructor(e) {
|
|
8909
8958
|
if (N(this, "_onigBinding"), N(this, "_ptr"), !L)
|
|
8910
8959
|
throw new $t("Must invoke loadWasm first.");
|
|
@@ -8920,7 +8969,7 @@ class xl {
|
|
|
8920
8969
|
const s = L.createOnigScanner(o, i, e.length);
|
|
8921
8970
|
for (let l = 0, a = e.length; l < a; l++)
|
|
8922
8971
|
L.ofree(n[l]);
|
|
8923
|
-
L.ofree(i), L.ofree(o), s === 0 &&
|
|
8972
|
+
L.ofree(i), L.ofree(o), s === 0 && xl(L), this._onigBinding = L, this._ptr = s;
|
|
8924
8973
|
}
|
|
8925
8974
|
dispose() {
|
|
8926
8975
|
this._onigBinding.freeOnigScanner(this._ptr);
|
|
@@ -8928,7 +8977,7 @@ class xl {
|
|
|
8928
8977
|
findNextMatchSync(e, n, r) {
|
|
8929
8978
|
let o = 0;
|
|
8930
8979
|
if (typeof r == "number" && (o = r), typeof e == "string") {
|
|
8931
|
-
e = new
|
|
8980
|
+
e = new Pr(e);
|
|
8932
8981
|
const i = this._findNextMatchSync(e, n, !1, o);
|
|
8933
8982
|
return e.dispose(), i;
|
|
8934
8983
|
}
|
|
@@ -8955,29 +9004,29 @@ class xl {
|
|
|
8955
9004
|
};
|
|
8956
9005
|
}
|
|
8957
9006
|
}
|
|
8958
|
-
function
|
|
9007
|
+
function Ol(t) {
|
|
8959
9008
|
return typeof t.instantiator == "function";
|
|
8960
9009
|
}
|
|
8961
|
-
function
|
|
9010
|
+
function Il(t) {
|
|
8962
9011
|
return typeof t.default == "function";
|
|
8963
9012
|
}
|
|
8964
|
-
function
|
|
9013
|
+
function zl(t) {
|
|
8965
9014
|
return typeof t.data < "u";
|
|
8966
9015
|
}
|
|
8967
|
-
function
|
|
9016
|
+
function Ml(t) {
|
|
8968
9017
|
return typeof Response < "u" && t instanceof Response;
|
|
8969
9018
|
}
|
|
8970
|
-
function
|
|
9019
|
+
function $l(t) {
|
|
8971
9020
|
return typeof ArrayBuffer < "u" && (t instanceof ArrayBuffer || ArrayBuffer.isView(t)) || typeof Buffer < "u" && Buffer.isBuffer?.(t) || typeof SharedArrayBuffer < "u" && t instanceof SharedArrayBuffer || typeof Uint32Array < "u" && t instanceof Uint32Array;
|
|
8972
9021
|
}
|
|
8973
9022
|
let Ae;
|
|
8974
|
-
function
|
|
9023
|
+
function jl(t) {
|
|
8975
9024
|
if (Ae)
|
|
8976
9025
|
return Ae;
|
|
8977
9026
|
async function e() {
|
|
8978
|
-
L = await
|
|
9027
|
+
L = await Al(async (n) => {
|
|
8979
9028
|
let r = t;
|
|
8980
|
-
return r = await r, typeof r == "function" && (r = await r(n)), typeof r == "function" && (r = await r(n)),
|
|
9029
|
+
return r = await r, typeof r == "function" && (r = await r(n)), typeof r == "function" && (r = await r(n)), Ol(r) ? r = await r.instantiator(n) : Il(r) ? r = await r.default(n) : (zl(r) && (r = r.data), Ml(r) ? typeof WebAssembly.instantiateStreaming == "function" ? r = await Dl(r)(n) : r = await Bl(r)(n) : $l(r) ? r = await st(r)(n) : r instanceof WebAssembly.Module ? r = await st(r)(n) : "default" in r && r.default instanceof WebAssembly.Module && (r = await st(r.default)(n))), "instance" in r && (r = r.instance), "exports" in r && (r = r.exports), r;
|
|
8981
9030
|
});
|
|
8982
9031
|
}
|
|
8983
9032
|
return Ae = e(), Ae;
|
|
@@ -8985,46 +9034,46 @@ function $l(t) {
|
|
|
8985
9034
|
function st(t) {
|
|
8986
9035
|
return (e) => WebAssembly.instantiate(t, e);
|
|
8987
9036
|
}
|
|
8988
|
-
function
|
|
9037
|
+
function Dl(t) {
|
|
8989
9038
|
return (e) => WebAssembly.instantiateStreaming(t, e);
|
|
8990
9039
|
}
|
|
8991
|
-
function
|
|
9040
|
+
function Bl(t) {
|
|
8992
9041
|
return async (e) => {
|
|
8993
9042
|
const n = await t.arrayBuffer();
|
|
8994
9043
|
return WebAssembly.instantiate(n, e);
|
|
8995
9044
|
};
|
|
8996
9045
|
}
|
|
8997
|
-
async function
|
|
8998
|
-
return t && await
|
|
9046
|
+
async function Gl(t) {
|
|
9047
|
+
return t && await jl(t), {
|
|
8999
9048
|
createScanner(e) {
|
|
9000
|
-
return new
|
|
9049
|
+
return new Ll(e.map((n) => typeof n == "string" ? n : n.source));
|
|
9001
9050
|
},
|
|
9002
9051
|
createString(e) {
|
|
9003
|
-
return new
|
|
9052
|
+
return new Pr(e);
|
|
9004
9053
|
}
|
|
9005
9054
|
};
|
|
9006
9055
|
}
|
|
9007
|
-
const
|
|
9008
|
-
langs:
|
|
9009
|
-
themes:
|
|
9010
|
-
engine: () =>
|
|
9056
|
+
const Ul = /* @__PURE__ */ yl({
|
|
9057
|
+
langs: Sl,
|
|
9058
|
+
themes: Cl,
|
|
9059
|
+
engine: () => Gl(import("../wasm-DQxwEHae.js"))
|
|
9011
9060
|
}), {
|
|
9012
|
-
codeToHtml:
|
|
9013
|
-
} = /* @__PURE__ */
|
|
9014
|
-
|
|
9015
|
-
{ guessEmbeddedLanguages:
|
|
9016
|
-
),
|
|
9017
|
-
mode:
|
|
9061
|
+
codeToHtml: Rn
|
|
9062
|
+
} = /* @__PURE__ */ bl(
|
|
9063
|
+
Ul,
|
|
9064
|
+
{ guessEmbeddedLanguages: La }
|
|
9065
|
+
), Fl = oi({
|
|
9066
|
+
mode: Dn(["html", "svelte", "react"]),
|
|
9018
9067
|
include: Xe().optional(),
|
|
9019
9068
|
exclude: Xe().optional(),
|
|
9020
9069
|
shikiOptions: Xe().optional()
|
|
9021
|
-
}),
|
|
9022
|
-
html:
|
|
9023
|
-
svelte:
|
|
9024
|
-
react:
|
|
9070
|
+
}), An = {
|
|
9071
|
+
html: Ti,
|
|
9072
|
+
svelte: Pi,
|
|
9073
|
+
react: Ri
|
|
9025
9074
|
};
|
|
9026
|
-
function
|
|
9027
|
-
const e =
|
|
9075
|
+
function Kl(t) {
|
|
9076
|
+
const e = Fl.parse(t), { include: n, exclude: r, mode: o, shikiOptions: i } = e, s = Nr(n, r), l = {
|
|
9028
9077
|
themes: { light: "github-light", dark: "github-dark" },
|
|
9029
9078
|
...i
|
|
9030
9079
|
}, a = (u) => u.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(///g, "/").replace(/`/g, "`").replace(/&#(\d+);/g, (h, p) => String.fromCharCode(p)).replace(/&#x([0-9a-fA-F]+);/g, (h, p) => String.fromCharCode(parseInt(p, 16))), c = async (u) => {
|
|
@@ -9033,14 +9082,14 @@ function Vl(t) {
|
|
|
9033
9082
|
for (const [m, w, b] of p) {
|
|
9034
9083
|
const y = a(b), g = w ? w.toLowerCase() : "text";
|
|
9035
9084
|
try {
|
|
9036
|
-
const _ = await
|
|
9085
|
+
const _ = await Rn(y, {
|
|
9037
9086
|
...l,
|
|
9038
9087
|
lang: g
|
|
9039
9088
|
});
|
|
9040
9089
|
d = d.replace(m, _);
|
|
9041
9090
|
} catch (_) {
|
|
9042
9091
|
try {
|
|
9043
|
-
const k = await
|
|
9092
|
+
const k = await Rn(y, {
|
|
9044
9093
|
...l,
|
|
9045
9094
|
lang: "text"
|
|
9046
9095
|
});
|
|
@@ -9063,8 +9112,8 @@ function Vl(t) {
|
|
|
9063
9112
|
async load(u) {
|
|
9064
9113
|
if (s(u))
|
|
9065
9114
|
try {
|
|
9066
|
-
const { readFile: h } = await import("node:fs/promises"), p = await h(u, "utf-8"), d = Gt(p), m =
|
|
9067
|
-
return
|
|
9115
|
+
const { readFile: h } = await import("node:fs/promises"), p = await h(u, "utf-8"), d = Gt(p), m = await c(d.html);
|
|
9116
|
+
return An[o]({ ...d, html: m });
|
|
9068
9117
|
} catch (h) {
|
|
9069
9118
|
this.error(new Error(`Failed to parse norg file ${u}: ${h}`));
|
|
9070
9119
|
}
|
|
@@ -9074,8 +9123,8 @@ function Vl(t) {
|
|
|
9074
9123
|
const h = u.read;
|
|
9075
9124
|
u.read = async function() {
|
|
9076
9125
|
try {
|
|
9077
|
-
const p = await h(), d = Gt(p), m =
|
|
9078
|
-
return
|
|
9126
|
+
const p = await h(), d = Gt(p), m = await c(d.html);
|
|
9127
|
+
return An[o]({ ...d, html: m });
|
|
9079
9128
|
} catch (p) {
|
|
9080
9129
|
throw new Error(`Failed to parse norg file ${u.file}: ${p}`);
|
|
9081
9130
|
}
|
|
@@ -9084,6 +9133,6 @@ function Vl(t) {
|
|
|
9084
9133
|
};
|
|
9085
9134
|
}
|
|
9086
9135
|
export {
|
|
9087
|
-
|
|
9088
|
-
|
|
9136
|
+
Kl as default,
|
|
9137
|
+
Kl as norgPlugin
|
|
9089
9138
|
};
|