@redocly/replay 0.28.0-next.0 → 0.28.0-next.10
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/replay-AiChatProvider-BWL86hXh.js +6 -0
- package/dist/{replay-AiChatProvider-BZUzXfD-.js → replay-AiChatProvider-CY3b_ggu.js} +376 -376
- package/dist/{replay-AiChatSqliteDBStorage-CTVtufnx.js → replay-AiChatSqliteDBStorage-BtV53vvj.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage-JpKE0iGm.js → replay-AiChatSqliteDBStorage-CjzLqUwK.js} +6 -6
- package/dist/{replay-AiPanel-DkR-vZTK.js → replay-AiPanel-B3HBaMPh.js} +706 -709
- package/dist/replay-AiPanel-BzaoPsXZ.js +742 -0
- package/dist/replay-FileWatcher-BFtAqsmL.js +1 -0
- package/dist/replay-FileWatcher-d1_qKRfS.js +364 -0
- package/dist/{replay-HistorySqliteDBStorage-CtF6-vY8.js → replay-HistorySqliteDBStorage-Bi5vBQ2T.js} +2 -2
- package/dist/replay-SemanticSearchService-CTWesmRy.js +1 -0
- package/dist/{replay-SemanticSearchService-CSsOmkV_.js → replay-SemanticSearchService-DcR4Q6w6.js} +27 -31
- package/dist/{replay-SqliteDBStorage-DpAEbsAQ.js → replay-SqliteDBStorage-BeDAsnlF.js} +1 -1
- package/dist/{replay-SqliteDBStorage-BSMAgfUS.js → replay-SqliteDBStorage-BlVDbZhU.js} +49 -49
- package/dist/{replay-StepContextSqliteDBStorage-BfAAKDwA.js → replay-StepContextSqliteDBStorage-BkB2NM27.js} +2 -2
- package/dist/replay-TauriFileSystemAdapter-B_VaAUfL.js +1 -0
- package/dist/replay-TauriFileSystemAdapter-Cu-Q6QS_.js +108 -0
- package/dist/replay-TauriRootStorage-Cidjagk-.js +1 -0
- package/dist/{replay-TauriRootStorage-g9zf2-FS.js → replay-TauriRootStorage-DVeU3RvV.js} +213 -210
- package/dist/{replay-agent-loop-be2meQsN.js → replay-agent-loop-B42P9R-q.js} +1 -1
- package/dist/{replay-agent-loop-ClVUvt0C.js → replay-agent-loop-DweKWrQp.js} +5 -5
- package/dist/{replay-ai-chat-mappers-JOZvaHV_.js → replay-ai-chat-mappers-Cno0s3T8.js} +1 -1
- package/dist/{replay-ai-chat-mappers-CwvRub6i.js → replay-ai-chat-mappers-DusPRQPG.js} +3 -3
- package/dist/{replay-ai-message-parts.schema-E9u9-nqr.js → replay-ai-message-parts.schema-DKLf0SiG.js} +1 -1
- package/dist/{replay-create-model-rzGPB8KT.js → replay-create-model-CeSlm24x.js} +4 -4
- package/dist/{replay-create-model-CJ3dsZg8.js → replay-create-model-DdPq1CIm.js} +3 -3
- package/dist/{replay-db-CW7044b2.js → replay-db-Bj8Qpvpw.js} +1 -1
- package/dist/{replay-db-zC1KPTH0.js → replay-db-he8XQjrM.js} +1 -1
- package/dist/{replay-external-resolver-BDPRz7Xd.js → replay-external-resolver-BRs5F07f.js} +7 -7
- package/dist/{replay-external-resolver-Dty0CDYE.js → replay-external-resolver-gQ0egbx7.js} +1 -1
- package/dist/{replay-history.schema-5ce6X0R1.js → replay-history.schema-B0lLwmdG.js} +3 -3
- package/dist/replay-index-B1qPs-GR.js +4 -0
- package/dist/replay-index-C2b91LJZ.js +7013 -0
- package/dist/{replay-index--hMZLQs8.js → replay-index-CA6OI1Qg.js} +1 -1
- package/dist/replay-index-CYphcClc.js +1 -0
- package/dist/{replay-index-F4GEOEUz.js → replay-index-DRb3mixV.js} +65311 -63618
- package/dist/replay-index-Dtxwps1s.js +574 -0
- package/dist/replay-index-NgGicGfR.js +1 -0
- package/dist/{replay-index-DZN7KzbY.js → replay-index-uF3nFq_Y.js} +1 -1
- package/dist/{replay-indexes-CfsvVMi_.js → replay-indexes-B3PJtgeh.js} +43 -43
- package/dist/replay-lint-C2hyYWRS.js +177 -0
- package/dist/{replay-lint-9YeYgRBU.js → replay-lint-gY_wyYPJ.js} +17581 -21140
- package/dist/{replay-lint-graphql-Dba0twW-.js → replay-lint-graphql-BA9t8-Ua.js} +1 -1
- package/dist/{replay-lint-graphql-BelJUl9-.js → replay-lint-graphql-DDrnrINc.js} +1 -1
- package/dist/replay-periodic-revalidation-BbAt74oL.js +21 -0
- package/dist/replay-periodic-revalidation-kmD2RQn1.js +1 -0
- package/dist/replay-resolve-BJ_AY-Mn.js +47 -0
- package/dist/{replay-resolve-RxCCaHXw.js → replay-resolve-_V8uYdTK.js} +470 -468
- package/dist/replay-respect-run-CLLZoRh1.js +8392 -0
- package/dist/replay-respect-run-qOz91QPQ.js +82 -0
- package/dist/replay-step-context.schema-BOprzd6Z.js +21 -0
- package/dist/{replay-tauri-path-hGM_JYax.js → replay-tauri-path-lH8t5rdX.js} +1 -1
- package/dist/replay-tauri-path-twTA2lKs.js +22 -0
- package/dist/replay-useAiChatQueries-BIqM2KQW.js +215 -0
- package/dist/{replay-useAiChatQueries-DD84oZan.js → replay-useAiChatQueries-yCsYY1j2.js} +1583 -1371
- package/dist/{replay-validate-key-xk-9xmJ6.js → replay-validate-key-Bh41yY9h.js} +2 -2
- package/dist/{replay-validate-key-PS5qrafQ.js → replay-validate-key-_oaOw5Jy.js} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.d.ts +10 -3
- package/dist/replay.js +14 -14
- package/package.json +20 -13
- package/dist/replay-AiChatProvider-Dllh11wo.js +0 -6
- package/dist/replay-AiPanel-DruBN19L.js +0 -742
- package/dist/replay-FileWatcher-D3W6TGFC.js +0 -1
- package/dist/replay-FileWatcher-v7Qw29PS.js +0 -343
- package/dist/replay-SemanticSearchService-Dfx2W4Za.js +0 -1
- package/dist/replay-TauriFileSystemAdapter-BLPH1Vx3.js +0 -1
- package/dist/replay-TauriFileSystemAdapter-Ddq9xfo1.js +0 -99
- package/dist/replay-TauriRootStorage-l_sNXRNW.js +0 -1
- package/dist/replay-index-5UkXwLrd.js +0 -504
- package/dist/replay-index-9h4E2FR8.js +0 -1
- package/dist/replay-index-B7GU_aMu.js +0 -25
- package/dist/replay-index-DbWKCsKW.js +0 -6906
- package/dist/replay-index-ko78Z8QX.js +0 -1
- package/dist/replay-lint-DK6LCpO2.js +0 -184
- package/dist/replay-periodic-revalidation-BoyLQHtg.js +0 -1
- package/dist/replay-periodic-revalidation-Dsp-n7ui.js +0 -21
- package/dist/replay-resolve-CRBvIGPM.js +0 -47
- package/dist/replay-respect-run-BP5Q5L8N.js +0 -78
- package/dist/replay-respect-run-CRGPD-UQ.js +0 -8200
- package/dist/replay-step-context.schema-DBk4jufr.js +0 -21
- package/dist/replay-tauri-path-BmHpvlYp.js +0 -22
- package/dist/replay-useAiChatQueries-KVveua_P.js +0 -215
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as hr, _ as Ve, $ as Re } from "./replay-index-DRb3mixV.js";
|
|
2
2
|
function gr(e) {
|
|
3
3
|
return !!e;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (un) return
|
|
5
|
+
var Ct = {}, Tt, un;
|
|
6
|
+
function dt() {
|
|
7
|
+
if (un) return Tt;
|
|
8
8
|
un = 1;
|
|
9
|
-
const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`, S = `${r}{1,2}${u}`, m = `(?!${r})`, C = `(?!${c}${S})`, E = `(?!${r}{0,1}${u})`,
|
|
9
|
+
const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`, S = `${r}{1,2}${u}`, m = `(?!${r})`, C = `(?!${c}${S})`, E = `(?!${r}{0,1}${u})`, w = `(?!${S})`, M = `[^.${a}]`, N = `${l}*?`, y = {
|
|
10
10
|
DOT_LITERAL: r,
|
|
11
11
|
PLUS_LITERAL: i,
|
|
12
12
|
QMARK_LITERAL: o,
|
|
@@ -18,7 +18,7 @@ function pt() {
|
|
|
18
18
|
NO_DOT: m,
|
|
19
19
|
NO_DOTS: C,
|
|
20
20
|
NO_DOT_SLASH: E,
|
|
21
|
-
NO_DOTS_SLASH:
|
|
21
|
+
NO_DOTS_SLASH: w,
|
|
22
22
|
QMARK_NO_DOT: M,
|
|
23
23
|
STAR: N,
|
|
24
24
|
START_ANCHOR: c,
|
|
@@ -54,7 +54,7 @@ function pt() {
|
|
|
54
54
|
word: "A-Za-z0-9_",
|
|
55
55
|
xdigit: "A-Fa-f0-9"
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return Tt = {
|
|
58
58
|
DEFAULT_MAX_EXTGLOB_RECURSION: n,
|
|
59
59
|
MAX_LENGTH: 1024 * 64,
|
|
60
60
|
POSIX_REGEX_SOURCE: f,
|
|
@@ -164,9 +164,9 @@ function pt() {
|
|
|
164
164
|
/**
|
|
165
165
|
* Create EXTGLOB_CHARS
|
|
166
166
|
*/
|
|
167
|
-
extglobChars(
|
|
167
|
+
extglobChars(I) {
|
|
168
168
|
return {
|
|
169
|
-
"!": { type: "negate", open: "(?:(?!(?:", close: `))${
|
|
169
|
+
"!": { type: "negate", open: "(?:(?!(?:", close: `))${I.STAR})` },
|
|
170
170
|
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
171
171
|
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
172
172
|
"*": { type: "star", open: "(?:", close: ")*" },
|
|
@@ -176,20 +176,20 @@ function pt() {
|
|
|
176
176
|
/**
|
|
177
177
|
* Create GLOB_CHARS
|
|
178
178
|
*/
|
|
179
|
-
globChars(
|
|
180
|
-
return
|
|
179
|
+
globChars(I) {
|
|
180
|
+
return I === !0 ? R : y;
|
|
181
181
|
}
|
|
182
|
-
},
|
|
182
|
+
}, Tt;
|
|
183
183
|
}
|
|
184
184
|
var fn;
|
|
185
|
-
function
|
|
185
|
+
function ht() {
|
|
186
186
|
return fn || (fn = 1, (function(e) {
|
|
187
187
|
const {
|
|
188
188
|
REGEX_BACKSLASH: t,
|
|
189
189
|
REGEX_REMOVE_BACKSLASH: n,
|
|
190
190
|
REGEX_SPECIAL_CHARS: r,
|
|
191
191
|
REGEX_SPECIAL_CHARS_GLOBAL: i
|
|
192
|
-
} = /* @__PURE__ */
|
|
192
|
+
} = /* @__PURE__ */ dt();
|
|
193
193
|
e.isObject = (o) => o !== null && typeof o == "object" && !Array.isArray(o), e.hasRegexChars = (o) => r.test(o), e.isRegexChar = (o) => o.length === 1 && e.hasRegexChars(o), e.escapeRegex = (o) => o.replace(i, "\\$1"), e.toPosixSlashes = (o) => o.replace(t, "/"), e.isWindows = () => {
|
|
194
194
|
if (typeof navigator < "u" && navigator.platform) {
|
|
195
195
|
const o = navigator.platform.toLowerCase();
|
|
@@ -210,13 +210,13 @@ function dt() {
|
|
|
210
210
|
const s = o.split(a ? /[\\/]/ : "/"), l = s[s.length - 1];
|
|
211
211
|
return l === "" ? s[s.length - 2] : l;
|
|
212
212
|
};
|
|
213
|
-
})(
|
|
213
|
+
})(Ct)), Ct;
|
|
214
214
|
}
|
|
215
|
-
var
|
|
215
|
+
var bt, pn;
|
|
216
216
|
function mr() {
|
|
217
|
-
if (pn) return
|
|
217
|
+
if (pn) return bt;
|
|
218
218
|
pn = 1;
|
|
219
|
-
const e = /* @__PURE__ */
|
|
219
|
+
const e = /* @__PURE__ */ ht(), {
|
|
220
220
|
CHAR_ASTERISK: t,
|
|
221
221
|
/* * */
|
|
222
222
|
CHAR_AT: n,
|
|
@@ -245,16 +245,16 @@ function mr() {
|
|
|
245
245
|
/* } */
|
|
246
246
|
CHAR_RIGHT_PARENTHESES: E,
|
|
247
247
|
/* ) */
|
|
248
|
-
CHAR_RIGHT_SQUARE_BRACKET:
|
|
248
|
+
CHAR_RIGHT_SQUARE_BRACKET: w
|
|
249
249
|
/* ] */
|
|
250
|
-
} = /* @__PURE__ */
|
|
250
|
+
} = /* @__PURE__ */ dt(), M = (y) => y === s || y === r, N = (y) => {
|
|
251
251
|
y.isPrefix !== !0 && (y.depth = y.isGlobstar ? 1 / 0 : 1);
|
|
252
252
|
};
|
|
253
|
-
return
|
|
254
|
-
const f = R || {},
|
|
255
|
-
let W = y, L = -1, q = 0, ce = 0, se = !1, de = !1, j = !1, ye = !1,
|
|
256
|
-
const h = () => L >=
|
|
257
|
-
for (; L <
|
|
253
|
+
return bt = (y, R) => {
|
|
254
|
+
const f = R || {}, I = y.length - 1, v = f.parts === !0 || f.scanToEnd === !0, A = [], g = [], x = [];
|
|
255
|
+
let W = y, L = -1, q = 0, ce = 0, se = !1, de = !1, j = !1, ye = !1, _e = !1, he = !1, U = !1, ge = !1, we = !1, ne = !1, J = 0, le, $, F = { value: "", depth: 0, isGlob: !1 };
|
|
256
|
+
const h = () => L >= I, ae = () => W.charCodeAt(L + 1), z = () => (le = $, W.charCodeAt(++L));
|
|
257
|
+
for (; L < I; ) {
|
|
258
258
|
$ = z();
|
|
259
259
|
let D;
|
|
260
260
|
if ($ === r) {
|
|
@@ -272,12 +272,12 @@ function mr() {
|
|
|
272
272
|
continue;
|
|
273
273
|
}
|
|
274
274
|
if (he !== !0 && $ === o && ($ = z()) === o) {
|
|
275
|
-
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0,
|
|
275
|
+
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0, v === !0)
|
|
276
276
|
continue;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
if (he !== !0 && $ === i) {
|
|
280
|
-
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0,
|
|
280
|
+
if (se = F.isBrace = !0, j = F.isGlob = !0, ne = !0, v === !0)
|
|
281
281
|
continue;
|
|
282
282
|
break;
|
|
283
283
|
}
|
|
@@ -286,7 +286,7 @@ function mr() {
|
|
|
286
286
|
break;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
if (
|
|
289
|
+
if (v === !0)
|
|
290
290
|
continue;
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
@@ -300,7 +300,7 @@ function mr() {
|
|
|
300
300
|
continue;
|
|
301
301
|
}
|
|
302
302
|
if (f.noext !== !0 && ($ === S || $ === n || $ === t || $ === m || $ === a) === !0 && ae() === u) {
|
|
303
|
-
if (j = F.isGlob = !0, ye = F.isExtglob = !0, ne = !0, $ === a && L === q && (
|
|
303
|
+
if (j = F.isGlob = !0, ye = F.isExtglob = !0, ne = !0, $ === a && L === q && (we = !0), v === !0) {
|
|
304
304
|
for (; h() !== !0 && ($ = z()); ) {
|
|
305
305
|
if ($ === r) {
|
|
306
306
|
U = F.backslashes = !0, $ = z();
|
|
@@ -316,12 +316,12 @@ function mr() {
|
|
|
316
316
|
break;
|
|
317
317
|
}
|
|
318
318
|
if ($ === t) {
|
|
319
|
-
if (le === t && (
|
|
319
|
+
if (le === t && (_e = F.isGlobstar = !0), j = F.isGlob = !0, ne = !0, v === !0)
|
|
320
320
|
continue;
|
|
321
321
|
break;
|
|
322
322
|
}
|
|
323
323
|
if ($ === m) {
|
|
324
|
-
if (j = F.isGlob = !0, ne = !0,
|
|
324
|
+
if (j = F.isGlob = !0, ne = !0, v === !0)
|
|
325
325
|
continue;
|
|
326
326
|
break;
|
|
327
327
|
}
|
|
@@ -331,12 +331,12 @@ function mr() {
|
|
|
331
331
|
U = F.backslashes = !0, z();
|
|
332
332
|
continue;
|
|
333
333
|
}
|
|
334
|
-
if (D ===
|
|
334
|
+
if (D === w) {
|
|
335
335
|
de = F.isBracket = !0, j = F.isGlob = !0, ne = !0;
|
|
336
336
|
break;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
if (
|
|
339
|
+
if (v === !0)
|
|
340
340
|
continue;
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
@@ -345,7 +345,7 @@ function mr() {
|
|
|
345
345
|
continue;
|
|
346
346
|
}
|
|
347
347
|
if (f.noparen !== !0 && $ === u) {
|
|
348
|
-
if (j = F.isGlob = !0,
|
|
348
|
+
if (j = F.isGlob = !0, v === !0) {
|
|
349
349
|
for (; h() !== !0 && ($ = z()); ) {
|
|
350
350
|
if ($ === u) {
|
|
351
351
|
U = F.backslashes = !0, $ = z();
|
|
@@ -361,7 +361,7 @@ function mr() {
|
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
if (j === !0) {
|
|
364
|
-
if (ne = !0,
|
|
364
|
+
if (ne = !0, v === !0)
|
|
365
365
|
continue;
|
|
366
366
|
break;
|
|
367
367
|
}
|
|
@@ -379,9 +379,9 @@ function mr() {
|
|
|
379
379
|
isBracket: de,
|
|
380
380
|
isGlob: j,
|
|
381
381
|
isExtglob: ye,
|
|
382
|
-
isGlobstar:
|
|
382
|
+
isGlobstar: _e,
|
|
383
383
|
negated: ge,
|
|
384
|
-
negatedExtglob:
|
|
384
|
+
negatedExtglob: we
|
|
385
385
|
};
|
|
386
386
|
if (f.tokens === !0 && (ue.maxDepth = 0, M($) || g.push(F), ue.tokens = g), f.parts === !0 || f.tokens === !0) {
|
|
387
387
|
let D;
|
|
@@ -396,13 +396,13 @@ function mr() {
|
|
|
396
396
|
ue.slashes = A, ue.parts = x;
|
|
397
397
|
}
|
|
398
398
|
return ue;
|
|
399
|
-
},
|
|
399
|
+
}, bt;
|
|
400
400
|
}
|
|
401
401
|
var vt, dn;
|
|
402
402
|
function Ar() {
|
|
403
403
|
if (dn) return vt;
|
|
404
404
|
dn = 1;
|
|
405
|
-
const e = /* @__PURE__ */
|
|
405
|
+
const e = /* @__PURE__ */ dt(), t = /* @__PURE__ */ ht(), {
|
|
406
406
|
MAX_LENGTH: n,
|
|
407
407
|
POSIX_REGEX_SOURCE: r,
|
|
408
408
|
REGEX_NON_SPECIAL_CHARS: i,
|
|
@@ -416,12 +416,12 @@ function Ar() {
|
|
|
416
416
|
try {
|
|
417
417
|
new RegExp(f);
|
|
418
418
|
} catch {
|
|
419
|
-
return y.map((
|
|
419
|
+
return y.map((v) => t.escapeRegex(v)).join("..");
|
|
420
420
|
}
|
|
421
421
|
return f;
|
|
422
422
|
}, l = (y, R) => `Missing ${y}: "${R}" - use "\\\\${R}" to match literal characters`, u = (y) => {
|
|
423
423
|
const R = [];
|
|
424
|
-
let f = 0,
|
|
424
|
+
let f = 0, I = 0, v = 0, A = "", g = !1;
|
|
425
425
|
for (const x of y) {
|
|
426
426
|
if (g === !0) {
|
|
427
427
|
A += x, g = !1;
|
|
@@ -432,20 +432,20 @@ function Ar() {
|
|
|
432
432
|
continue;
|
|
433
433
|
}
|
|
434
434
|
if (x === '"') {
|
|
435
|
-
|
|
435
|
+
v = v === 1 ? 0 : 1, A += x;
|
|
436
436
|
continue;
|
|
437
437
|
}
|
|
438
|
-
if (
|
|
438
|
+
if (v === 0) {
|
|
439
439
|
if (x === "[")
|
|
440
440
|
f++;
|
|
441
441
|
else if (x === "]" && f > 0)
|
|
442
442
|
f--;
|
|
443
443
|
else if (f === 0) {
|
|
444
444
|
if (x === "(")
|
|
445
|
-
|
|
446
|
-
else if (x === ")" &&
|
|
447
|
-
|
|
448
|
-
else if (x === "|" &&
|
|
445
|
+
I++;
|
|
446
|
+
else if (x === ")" && I > 0)
|
|
447
|
+
I--;
|
|
448
|
+
else if (x === "|" && I === 0) {
|
|
449
449
|
R.push(A), A = "";
|
|
450
450
|
continue;
|
|
451
451
|
}
|
|
@@ -478,16 +478,16 @@ function Ar() {
|
|
|
478
478
|
}, m = (y) => {
|
|
479
479
|
const R = y.map(S).filter(Boolean);
|
|
480
480
|
for (let f = 0; f < R.length; f++)
|
|
481
|
-
for (let
|
|
482
|
-
const
|
|
483
|
-
if (!(!g ||
|
|
481
|
+
for (let I = f + 1; I < R.length; I++) {
|
|
482
|
+
const v = R[f], A = R[I], g = v[0];
|
|
483
|
+
if (!(!g || v !== g.repeat(v.length) || A !== g.repeat(A.length)) && (v === A || v.startsWith(A) || A.startsWith(v)))
|
|
484
484
|
return !0;
|
|
485
485
|
}
|
|
486
486
|
return !1;
|
|
487
487
|
}, C = (y, R = !0) => {
|
|
488
488
|
if (y[0] !== "+" && y[0] !== "*" || y[1] !== "(")
|
|
489
489
|
return;
|
|
490
|
-
let f = 0,
|
|
490
|
+
let f = 0, I = 0, v = 0, A = !1;
|
|
491
491
|
for (let g = 1; g < y.length; g++) {
|
|
492
492
|
const x = y[g];
|
|
493
493
|
if (A === !0) {
|
|
@@ -499,10 +499,10 @@ function Ar() {
|
|
|
499
499
|
continue;
|
|
500
500
|
}
|
|
501
501
|
if (x === '"') {
|
|
502
|
-
|
|
502
|
+
v = v === 1 ? 0 : 1;
|
|
503
503
|
continue;
|
|
504
504
|
}
|
|
505
|
-
if (
|
|
505
|
+
if (v !== 1) {
|
|
506
506
|
if (x === "[") {
|
|
507
507
|
f++;
|
|
508
508
|
continue;
|
|
@@ -513,10 +513,10 @@ function Ar() {
|
|
|
513
513
|
}
|
|
514
514
|
if (!(f > 0)) {
|
|
515
515
|
if (x === "(") {
|
|
516
|
-
|
|
516
|
+
I++;
|
|
517
517
|
continue;
|
|
518
518
|
}
|
|
519
|
-
if (x === ")" && (
|
|
519
|
+
if (x === ")" && (I--, I === 0))
|
|
520
520
|
return R === !0 && g !== y.length - 1 ? void 0 : {
|
|
521
521
|
type: y[0],
|
|
522
522
|
body: y.slice(2, g),
|
|
@@ -525,59 +525,59 @@ function Ar() {
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
}, E = (y) => `${y.length === 1 ? t.escapeRegex(y[0]) : `[${y.map((f) => t.escapeRegex(f)).join("")}]`}*`,
|
|
528
|
+
}, E = (y) => `${y.length === 1 ? t.escapeRegex(y[0]) : `[${y.map((f) => t.escapeRegex(f)).join("")}]`}*`, w = (y) => {
|
|
529
529
|
let R = 0;
|
|
530
530
|
const f = [];
|
|
531
531
|
for (; R < y.length; ) {
|
|
532
|
-
const
|
|
533
|
-
if (!
|
|
532
|
+
const I = C(y.slice(R), !1);
|
|
533
|
+
if (!I || I.type !== "*")
|
|
534
534
|
return;
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
535
|
+
const v = u(I.body).map((g) => g.trim());
|
|
536
|
+
if (v.length !== 1)
|
|
537
537
|
return;
|
|
538
|
-
const A = S(
|
|
538
|
+
const A = S(v[0]);
|
|
539
539
|
if (!A || A.length !== 1)
|
|
540
540
|
return;
|
|
541
|
-
f.push(A), R +=
|
|
541
|
+
f.push(A), R += I.end + 1;
|
|
542
542
|
}
|
|
543
543
|
if (!(f.length < 1))
|
|
544
544
|
return f;
|
|
545
545
|
}, M = (y) => {
|
|
546
|
-
let R = 0, f = y.trim(),
|
|
547
|
-
for (;
|
|
548
|
-
R++, f =
|
|
546
|
+
let R = 0, f = y.trim(), I = C(f);
|
|
547
|
+
for (; I; )
|
|
548
|
+
R++, f = I.body.trim(), I = C(f);
|
|
549
549
|
return R;
|
|
550
550
|
}, N = (y, R) => {
|
|
551
551
|
if (R.maxExtglobRecursion === !1)
|
|
552
552
|
return { risky: !1 };
|
|
553
|
-
const f = typeof R.maxExtglobRecursion == "number" ? R.maxExtglobRecursion : e.DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
554
|
-
if (
|
|
553
|
+
const f = typeof R.maxExtglobRecursion == "number" ? R.maxExtglobRecursion : e.DEFAULT_MAX_EXTGLOB_RECURSION, I = u(y).map((x) => x.trim());
|
|
554
|
+
if (I.length > 1 && (I.some((x) => x === "") || I.some((x) => /^[*?]+$/.test(x)) || m(I)))
|
|
555
555
|
return { risky: !0 };
|
|
556
|
-
const
|
|
556
|
+
const v = [];
|
|
557
557
|
let A = !1, g = !0;
|
|
558
|
-
for (const x of
|
|
559
|
-
const W =
|
|
558
|
+
for (const x of I) {
|
|
559
|
+
const W = w(x);
|
|
560
560
|
if (W) {
|
|
561
|
-
A = !0,
|
|
561
|
+
A = !0, v.push(...W);
|
|
562
562
|
continue;
|
|
563
563
|
}
|
|
564
564
|
const L = S(x);
|
|
565
565
|
if (L && L.length === 1) {
|
|
566
|
-
|
|
566
|
+
v.push(L);
|
|
567
567
|
continue;
|
|
568
568
|
}
|
|
569
569
|
if (g = !1, M(x) > f)
|
|
570
570
|
return { risky: !0 };
|
|
571
571
|
}
|
|
572
|
-
return A ? g ? { risky: !0, safeOutput: E([...new Set(
|
|
572
|
+
return A ? g ? { risky: !0, safeOutput: E([...new Set(v)]) } : { risky: !0 } : { risky: !1 };
|
|
573
573
|
}, k = (y, R) => {
|
|
574
574
|
if (typeof y != "string")
|
|
575
575
|
throw new TypeError("Expected a string");
|
|
576
576
|
y = a[y] || y;
|
|
577
|
-
const f = { ...R },
|
|
578
|
-
let
|
|
579
|
-
if (
|
|
580
|
-
throw new SyntaxError(`Input length: ${
|
|
577
|
+
const f = { ...R }, I = typeof f.maxLength == "number" ? Math.min(n, f.maxLength) : n;
|
|
578
|
+
let v = y.length;
|
|
579
|
+
if (v > I)
|
|
580
|
+
throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${I}`);
|
|
581
581
|
const A = { type: "bos", value: "", output: f.prepend || "" }, g = [A], x = f.capture ? "" : "?:", W = e.globChars(f.windows), L = e.extglobChars(W), {
|
|
582
582
|
DOT_LITERAL: q,
|
|
583
583
|
PLUS_LITERAL: ce,
|
|
@@ -585,14 +585,14 @@ function Ar() {
|
|
|
585
585
|
ONE_CHAR: de,
|
|
586
586
|
DOTS_SLASH: j,
|
|
587
587
|
NO_DOT: ye,
|
|
588
|
-
NO_DOT_SLASH:
|
|
588
|
+
NO_DOT_SLASH: _e,
|
|
589
589
|
NO_DOTS_SLASH: he,
|
|
590
590
|
QMARK: U,
|
|
591
591
|
QMARK_NO_DOT: ge,
|
|
592
|
-
STAR:
|
|
592
|
+
STAR: we,
|
|
593
593
|
START_ANCHOR: ne
|
|
594
|
-
} = W, J = (
|
|
595
|
-
let F = f.bash === !0 ? J(f) :
|
|
594
|
+
} = W, J = (b) => `(${x}(?:(?!${ne}${b.dot ? j : q}).)*?)`, le = f.dot ? "" : ye, $ = f.dot ? U : ge;
|
|
595
|
+
let F = f.bash === !0 ? J(f) : we;
|
|
596
596
|
f.capture && (F = `(${F})`), typeof f.noext == "boolean" && (f.noextglob = f.noext);
|
|
597
597
|
const h = {
|
|
598
598
|
input: y,
|
|
@@ -611,61 +611,61 @@ function Ar() {
|
|
|
611
611
|
globstar: !1,
|
|
612
612
|
tokens: g
|
|
613
613
|
};
|
|
614
|
-
y = t.removePrefix(y, h),
|
|
614
|
+
y = t.removePrefix(y, h), v = y.length;
|
|
615
615
|
const ae = [], z = [], X = [];
|
|
616
616
|
let d = A, p;
|
|
617
|
-
const ue = () => h.index ===
|
|
618
|
-
h.consumed +=
|
|
619
|
-
}, Te = (
|
|
620
|
-
h.output +=
|
|
617
|
+
const ue = () => h.index === v - 1, D = h.peek = (b = 1) => y[h.index + b], V = h.advance = () => y[++h.index] || "", Se = () => y.slice(h.index + 1), fe = (b = "", Y = 0) => {
|
|
618
|
+
h.consumed += b, h.index += Y;
|
|
619
|
+
}, Te = (b) => {
|
|
620
|
+
h.output += b.output != null ? b.output : b.value, fe(b.value);
|
|
621
621
|
}, pr = () => {
|
|
622
|
-
let
|
|
622
|
+
let b = 1;
|
|
623
623
|
for (; D() === "!" && (D(2) !== "(" || D(3) === "?"); )
|
|
624
|
-
V(), h.start++,
|
|
625
|
-
return
|
|
626
|
-
},
|
|
627
|
-
h[
|
|
628
|
-
},
|
|
629
|
-
h[
|
|
630
|
-
}, O = (
|
|
624
|
+
V(), h.start++, b++;
|
|
625
|
+
return b % 2 === 0 ? !1 : (h.negated = !0, h.start++, !0);
|
|
626
|
+
}, Je = (b) => {
|
|
627
|
+
h[b]++, X.push(b);
|
|
628
|
+
}, be = (b) => {
|
|
629
|
+
h[b]--, X.pop();
|
|
630
|
+
}, O = (b) => {
|
|
631
631
|
if (d.type === "globstar") {
|
|
632
|
-
const Y = h.braces > 0 && (
|
|
633
|
-
|
|
632
|
+
const Y = h.braces > 0 && (b.type === "comma" || b.type === "brace"), T = b.extglob === !0 || ae.length && (b.type === "pipe" || b.type === "paren");
|
|
633
|
+
b.type !== "slash" && b.type !== "paren" && !Y && !T && (h.output = h.output.slice(0, -d.output.length), d.type = "star", d.value = "*", d.output = F, h.output += d.output);
|
|
634
634
|
}
|
|
635
|
-
if (ae.length &&
|
|
636
|
-
d.output = (d.output || d.value) +
|
|
635
|
+
if (ae.length && b.type !== "paren" && (ae[ae.length - 1].inner += b.value), (b.value || b.output) && Te(b), d && d.type === "text" && b.type === "text") {
|
|
636
|
+
d.output = (d.output || d.value) + b.value, d.value += b.value;
|
|
637
637
|
return;
|
|
638
638
|
}
|
|
639
|
-
|
|
640
|
-
},
|
|
639
|
+
b.prev = d, g.push(b), d = b;
|
|
640
|
+
}, et = (b, Y) => {
|
|
641
641
|
const T = { ...L[Y], conditions: 1, inner: "" };
|
|
642
642
|
T.prev = d, T.parens = h.parens, T.output = h.output, T.startIndex = h.index, T.tokensIndex = g.length;
|
|
643
643
|
const P = (f.capture ? "(" : "") + T.open;
|
|
644
|
-
|
|
645
|
-
}, dr = (
|
|
646
|
-
const Y = y.slice(
|
|
647
|
-
if ((
|
|
648
|
-
const K = P.safeOutput ? (
|
|
644
|
+
Je("parens"), O({ type: b, value: Y, output: h.output ? "" : de }), O({ type: "paren", extglob: !0, value: V(), output: P }), ae.push(T);
|
|
645
|
+
}, dr = (b) => {
|
|
646
|
+
const Y = y.slice(b.startIndex, h.index + 1), T = y.slice(b.startIndex + 2, h.index), P = N(T, f);
|
|
647
|
+
if ((b.type === "plus" || b.type === "star") && P.risky) {
|
|
648
|
+
const K = P.safeOutput ? (b.output ? "" : de) + (f.capture ? `(${P.safeOutput})` : P.safeOutput) : void 0, me = g[b.tokensIndex];
|
|
649
649
|
me.type = "text", me.value = Y, me.output = K || t.escapeRegex(Y);
|
|
650
|
-
for (let Ae =
|
|
650
|
+
for (let Ae = b.tokensIndex + 1; Ae < g.length; Ae++)
|
|
651
651
|
g[Ae].value = "", g[Ae].output = "", delete g[Ae].suffix;
|
|
652
|
-
h.output =
|
|
652
|
+
h.output = b.output + me.output, h.backtrack = !0, O({ type: "paren", extglob: !0, value: p, output: "" }), be("parens");
|
|
653
653
|
return;
|
|
654
654
|
}
|
|
655
|
-
let G =
|
|
656
|
-
if (
|
|
655
|
+
let G = b.close + (f.capture ? ")" : ""), Q;
|
|
656
|
+
if (b.type === "negate") {
|
|
657
657
|
let K = F;
|
|
658
|
-
if (
|
|
658
|
+
if (b.inner && b.inner.length > 1 && b.inner.includes("/") && (K = J(f)), (K !== F || ue() || /^\)+$/.test(Se())) && (G = b.close = `)$))${K}`), b.inner.includes("*") && (Q = Se()) && /^\.[^\\/.]+$/.test(Q)) {
|
|
659
659
|
const me = k(Q, { ...R, fastpaths: !1 }).output;
|
|
660
|
-
G =
|
|
660
|
+
G = b.close = `)${me})${K})`;
|
|
661
661
|
}
|
|
662
|
-
|
|
662
|
+
b.prev.type === "bos" && (h.negatedExtglob = !0);
|
|
663
663
|
}
|
|
664
|
-
O({ type: "paren", extglob: !0, value: p, output: G }),
|
|
664
|
+
O({ type: "paren", extglob: !0, value: p, output: G }), be("parens");
|
|
665
665
|
};
|
|
666
666
|
if (f.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(y)) {
|
|
667
|
-
let
|
|
668
|
-
return
|
|
667
|
+
let b = !1, Y = y.replace(o, (T, P, G, Q, K, me) => Q === "\\" ? (b = !0, T) : Q === "?" ? P ? P + Q + (K ? U.repeat(K.length) : "") : me === 0 ? $ + (K ? U.repeat(K.length) : "") : U.repeat(G.length) : Q === "." ? q.repeat(G.length) : Q === "*" ? P ? P + Q + (K ? F : "") : F : P ? T : `\\${T}`);
|
|
668
|
+
return b === !0 && (f.unescape === !0 ? Y = Y.replace(/\\/g, "") : Y = Y.replace(/\\+/g, (T) => T.length % 2 === 0 ? "\\\\" : T ? "\\" : "")), Y === y && f.contains === !0 ? (h.output = y, h) : (h.output = t.wrapOutput(Y, h, R), h);
|
|
669
669
|
}
|
|
670
670
|
for (; !ue(); ) {
|
|
671
671
|
if (p = V(), p === "\0")
|
|
@@ -708,7 +708,7 @@ function Ar() {
|
|
|
708
708
|
continue;
|
|
709
709
|
}
|
|
710
710
|
if (p === "(") {
|
|
711
|
-
|
|
711
|
+
Je("parens"), O({ type: "paren", value: p });
|
|
712
712
|
continue;
|
|
713
713
|
}
|
|
714
714
|
if (p === ")") {
|
|
@@ -719,7 +719,7 @@ function Ar() {
|
|
|
719
719
|
dr(ae.pop());
|
|
720
720
|
continue;
|
|
721
721
|
}
|
|
722
|
-
O({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }),
|
|
722
|
+
O({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }), be("parens");
|
|
723
723
|
continue;
|
|
724
724
|
}
|
|
725
725
|
if (p === "[") {
|
|
@@ -728,7 +728,7 @@ function Ar() {
|
|
|
728
728
|
throw new SyntaxError(l("closing", "]"));
|
|
729
729
|
p = `\\${p}`;
|
|
730
730
|
} else
|
|
731
|
-
|
|
731
|
+
Je("brackets");
|
|
732
732
|
O({ type: "bracket", value: p });
|
|
733
733
|
continue;
|
|
734
734
|
}
|
|
@@ -743,7 +743,7 @@ function Ar() {
|
|
|
743
743
|
O({ type: "text", value: p, output: `\\${p}` });
|
|
744
744
|
continue;
|
|
745
745
|
}
|
|
746
|
-
|
|
746
|
+
be("brackets");
|
|
747
747
|
const T = d.value.slice(1);
|
|
748
748
|
if (d.posix !== !0 && T[0] === "^" && !T.includes("/") && (p = `/${p}`), d.value += p, Te({ value: p }), f.literalBrackets === !1 || t.hasRegexChars(T))
|
|
749
749
|
continue;
|
|
@@ -756,7 +756,7 @@ function Ar() {
|
|
|
756
756
|
continue;
|
|
757
757
|
}
|
|
758
758
|
if (p === "{" && f.nobrace !== !0) {
|
|
759
|
-
|
|
759
|
+
Je("braces");
|
|
760
760
|
const T = {
|
|
761
761
|
type: "brace",
|
|
762
762
|
value: p,
|
|
@@ -786,7 +786,7 @@ function Ar() {
|
|
|
786
786
|
for (const K of Q)
|
|
787
787
|
h.output += K.output || K.value;
|
|
788
788
|
}
|
|
789
|
-
O({ type: "brace", value: p, output: P }),
|
|
789
|
+
O({ type: "brace", value: p, output: P }), be("braces"), z.pop();
|
|
790
790
|
continue;
|
|
791
791
|
}
|
|
792
792
|
if (p === "|") {
|
|
@@ -823,7 +823,7 @@ function Ar() {
|
|
|
823
823
|
}
|
|
824
824
|
if (p === "?") {
|
|
825
825
|
if (!(d && d.value === "(") && f.noextglob !== !0 && D() === "(" && D(2) !== "?") {
|
|
826
|
-
|
|
826
|
+
et("qmark", p);
|
|
827
827
|
continue;
|
|
828
828
|
}
|
|
829
829
|
if (d && d.type === "paren") {
|
|
@@ -841,7 +841,7 @@ function Ar() {
|
|
|
841
841
|
}
|
|
842
842
|
if (p === "!") {
|
|
843
843
|
if (f.noextglob !== !0 && D() === "(" && (D(2) !== "?" || !/[!=<:]/.test(D(3)))) {
|
|
844
|
-
|
|
844
|
+
et("negate", p);
|
|
845
845
|
continue;
|
|
846
846
|
}
|
|
847
847
|
if (f.nonegate !== !0 && h.index === 0) {
|
|
@@ -851,7 +851,7 @@ function Ar() {
|
|
|
851
851
|
}
|
|
852
852
|
if (p === "+") {
|
|
853
853
|
if (f.noextglob !== !0 && D() === "(" && D(2) !== "?") {
|
|
854
|
-
|
|
854
|
+
et("plus", p);
|
|
855
855
|
continue;
|
|
856
856
|
}
|
|
857
857
|
if (d && d.value === "(" || f.regex === !1) {
|
|
@@ -883,9 +883,9 @@ function Ar() {
|
|
|
883
883
|
d.type = "star", d.star = !0, d.value += p, d.output = F, h.backtrack = !0, h.globstar = !0, fe(p);
|
|
884
884
|
continue;
|
|
885
885
|
}
|
|
886
|
-
let
|
|
887
|
-
if (f.noextglob !== !0 && /^\([^?]/.test(
|
|
888
|
-
|
|
886
|
+
let b = Se();
|
|
887
|
+
if (f.noextglob !== !0 && /^\([^?]/.test(b)) {
|
|
888
|
+
et("star", p);
|
|
889
889
|
continue;
|
|
890
890
|
}
|
|
891
891
|
if (d.type === "star") {
|
|
@@ -894,7 +894,7 @@ function Ar() {
|
|
|
894
894
|
continue;
|
|
895
895
|
}
|
|
896
896
|
const T = d.prev, P = T.prev, G = T.type === "slash" || T.type === "bos", Q = P && (P.type === "star" || P.type === "globstar");
|
|
897
|
-
if (f.bash === !0 && (!G ||
|
|
897
|
+
if (f.bash === !0 && (!G || b[0] && b[0] !== "/")) {
|
|
898
898
|
O({ type: "star", value: p, output: "" });
|
|
899
899
|
continue;
|
|
900
900
|
}
|
|
@@ -903,11 +903,11 @@ function Ar() {
|
|
|
903
903
|
O({ type: "star", value: p, output: "" });
|
|
904
904
|
continue;
|
|
905
905
|
}
|
|
906
|
-
for (;
|
|
906
|
+
for (; b.slice(0, 3) === "/**"; ) {
|
|
907
907
|
const Ae = y[h.index + 4];
|
|
908
908
|
if (Ae && Ae !== "/")
|
|
909
909
|
break;
|
|
910
|
-
|
|
910
|
+
b = b.slice(3), fe("/**", 3);
|
|
911
911
|
}
|
|
912
912
|
if (T.type === "bos" && ue()) {
|
|
913
913
|
d.type = "globstar", d.value += p, d.output = J(f), h.output = d.output, h.globstar = !0, fe(p);
|
|
@@ -917,12 +917,12 @@ function Ar() {
|
|
|
917
917
|
h.output = h.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = J(f) + (f.strictSlashes ? ")" : "|$)"), d.value += p, h.globstar = !0, h.output += T.output + d.output, fe(p);
|
|
918
918
|
continue;
|
|
919
919
|
}
|
|
920
|
-
if (T.type === "slash" && T.prev.type !== "bos" &&
|
|
921
|
-
const Ae =
|
|
920
|
+
if (T.type === "slash" && T.prev.type !== "bos" && b[0] === "/") {
|
|
921
|
+
const Ae = b[1] !== void 0 ? "|$" : "";
|
|
922
922
|
h.output = h.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = `${J(f)}${se}|${se}${Ae})`, d.value += p, h.output += T.output + d.output, h.globstar = !0, fe(p + V()), O({ type: "slash", value: "/", output: "" });
|
|
923
923
|
continue;
|
|
924
924
|
}
|
|
925
|
-
if (T.type === "bos" &&
|
|
925
|
+
if (T.type === "bos" && b[0] === "/") {
|
|
926
926
|
d.type = "globstar", d.value += p, d.output = `(?:^|${se}|${J(f)}${se})`, h.output = d.output, h.globstar = !0, fe(p + V()), O({ type: "slash", value: "/", output: "" });
|
|
927
927
|
continue;
|
|
928
928
|
}
|
|
@@ -938,31 +938,31 @@ function Ar() {
|
|
|
938
938
|
Y.output = p, O(Y);
|
|
939
939
|
continue;
|
|
940
940
|
}
|
|
941
|
-
(h.index === h.start || d.type === "slash" || d.type === "dot") && (d.type === "dot" ? (h.output +=
|
|
941
|
+
(h.index === h.start || d.type === "slash" || d.type === "dot") && (d.type === "dot" ? (h.output += _e, d.output += _e) : f.dot === !0 ? (h.output += he, d.output += he) : (h.output += le, d.output += le), D() !== "*" && (h.output += de, d.output += de)), O(Y);
|
|
942
942
|
}
|
|
943
943
|
for (; h.brackets > 0; ) {
|
|
944
944
|
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", "]"));
|
|
945
|
-
h.output = t.escapeLast(h.output, "["),
|
|
945
|
+
h.output = t.escapeLast(h.output, "["), be("brackets");
|
|
946
946
|
}
|
|
947
947
|
for (; h.parens > 0; ) {
|
|
948
948
|
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", ")"));
|
|
949
|
-
h.output = t.escapeLast(h.output, "("),
|
|
949
|
+
h.output = t.escapeLast(h.output, "("), be("parens");
|
|
950
950
|
}
|
|
951
951
|
for (; h.braces > 0; ) {
|
|
952
952
|
if (f.strictBrackets === !0) throw new SyntaxError(l("closing", "}"));
|
|
953
|
-
h.output = t.escapeLast(h.output, "{"),
|
|
953
|
+
h.output = t.escapeLast(h.output, "{"), be("braces");
|
|
954
954
|
}
|
|
955
955
|
if (f.strictSlashes !== !0 && (d.type === "star" || d.type === "bracket") && O({ type: "maybe_slash", value: "", output: `${se}?` }), h.backtrack === !0) {
|
|
956
956
|
h.output = "";
|
|
957
|
-
for (const
|
|
958
|
-
h.output +=
|
|
957
|
+
for (const b of h.tokens)
|
|
958
|
+
h.output += b.output != null ? b.output : b.value, b.suffix && (h.output += b.suffix);
|
|
959
959
|
}
|
|
960
960
|
return h;
|
|
961
961
|
};
|
|
962
962
|
return k.fastpaths = (y, R) => {
|
|
963
|
-
const f = { ...R },
|
|
964
|
-
if (
|
|
965
|
-
throw new SyntaxError(`Input length: ${
|
|
963
|
+
const f = { ...R }, I = typeof f.maxLength == "number" ? Math.min(n, f.maxLength) : n, v = y.length;
|
|
964
|
+
if (v > I)
|
|
965
|
+
throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${I}`);
|
|
966
966
|
y = a[y] || y;
|
|
967
967
|
const {
|
|
968
968
|
DOT_LITERAL: A,
|
|
@@ -974,10 +974,10 @@ function Ar() {
|
|
|
974
974
|
NO_DOTS_SLASH: ce,
|
|
975
975
|
STAR: se,
|
|
976
976
|
START_ANCHOR: de
|
|
977
|
-
} = e.globChars(f.windows), j = f.dot ? q : L, ye = f.dot ? ce : L,
|
|
977
|
+
} = e.globChars(f.windows), j = f.dot ? q : L, ye = f.dot ? ce : L, _e = f.capture ? "" : "?:", he = { negated: !1, prefix: "" };
|
|
978
978
|
let U = f.bash === !0 ? ".*?" : se;
|
|
979
979
|
f.capture && (U = `(${U})`);
|
|
980
|
-
const ge = (le) => le.noglobstar === !0 ? U : `(${
|
|
980
|
+
const ge = (le) => le.noglobstar === !0 ? U : `(${_e}(?:(?!${de}${le.dot ? W : A}).)*?)`, we = (le) => {
|
|
981
981
|
switch (le) {
|
|
982
982
|
case "*":
|
|
983
983
|
return `${j}${x}${U}`;
|
|
@@ -998,20 +998,20 @@ function Ar() {
|
|
|
998
998
|
default: {
|
|
999
999
|
const $ = /^(.*?)\.(\w+)$/.exec(le);
|
|
1000
1000
|
if (!$) return;
|
|
1001
|
-
const F =
|
|
1001
|
+
const F = we($[1]);
|
|
1002
1002
|
return F ? F + A + $[2] : void 0;
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
}, ne = t.removePrefix(y, he);
|
|
1006
|
-
let J =
|
|
1006
|
+
let J = we(ne);
|
|
1007
1007
|
return J && f.strictSlashes !== !0 && (J += `${g}?`), J;
|
|
1008
1008
|
}, vt = k, vt;
|
|
1009
1009
|
}
|
|
1010
|
-
var
|
|
1010
|
+
var Rt, hn;
|
|
1011
1011
|
function yr() {
|
|
1012
|
-
if (hn) return
|
|
1012
|
+
if (hn) return Rt;
|
|
1013
1013
|
hn = 1;
|
|
1014
|
-
const e = /* @__PURE__ */ mr(), t = /* @__PURE__ */ Ar(), n = /* @__PURE__ */
|
|
1014
|
+
const e = /* @__PURE__ */ mr(), t = /* @__PURE__ */ Ar(), n = /* @__PURE__ */ ht(), r = /* @__PURE__ */ dt(), i = (a) => a && typeof a == "object" && !Array.isArray(a), o = (a, s, l = !1) => {
|
|
1015
1015
|
if (Array.isArray(a)) {
|
|
1016
1016
|
const M = a.map((k) => o(k, s, l));
|
|
1017
1017
|
return (k) => {
|
|
@@ -1032,11 +1032,11 @@ function yr() {
|
|
|
1032
1032
|
const M = { ...s, ignore: null, onMatch: null, onResult: null };
|
|
1033
1033
|
E = o(c.ignore, M, l);
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1035
|
+
const w = (M, N = !1) => {
|
|
1036
1036
|
const { isMatch: k, match: y, output: R } = o.test(M, m, s, { glob: a, posix: S }), f = { glob: a, state: C, regex: m, posix: S, input: M, output: R, match: y, isMatch: k };
|
|
1037
1037
|
return typeof c.onResult == "function" && c.onResult(f), k === !1 ? (f.isMatch = !1, N ? f : !1) : E(M) ? (typeof c.onIgnore == "function" && c.onIgnore(f), f.isMatch = !1, N ? f : !1) : (typeof c.onMatch == "function" && c.onMatch(f), N ? f : !0);
|
|
1038
1038
|
};
|
|
1039
|
-
return l && (
|
|
1039
|
+
return l && (w.state = C), w;
|
|
1040
1040
|
};
|
|
1041
1041
|
return o.test = (a, s, l, { glob: u, posix: c } = {}) => {
|
|
1042
1042
|
if (typeof a != "string")
|
|
@@ -1067,24 +1067,24 @@ function yr() {
|
|
|
1067
1067
|
if (s && s.debug === !0) throw l;
|
|
1068
1068
|
return /$^/;
|
|
1069
1069
|
}
|
|
1070
|
-
}, o.constants = r,
|
|
1070
|
+
}, o.constants = r, Rt = o, Rt;
|
|
1071
1071
|
}
|
|
1072
|
-
var
|
|
1072
|
+
var xt, gn;
|
|
1073
1073
|
function Sr() {
|
|
1074
|
-
if (gn) return
|
|
1074
|
+
if (gn) return xt;
|
|
1075
1075
|
gn = 1;
|
|
1076
|
-
const e = /* @__PURE__ */ yr(), t = /* @__PURE__ */
|
|
1076
|
+
const e = /* @__PURE__ */ yr(), t = /* @__PURE__ */ ht();
|
|
1077
1077
|
function n(r, i, o = !1) {
|
|
1078
1078
|
return i && (i.windows === null || i.windows === void 0) && (i = { ...i, windows: t.isWindows() }), e(r, i, o);
|
|
1079
1079
|
}
|
|
1080
|
-
return Object.assign(n, e),
|
|
1080
|
+
return Object.assign(n, e), xt = n, xt;
|
|
1081
1081
|
}
|
|
1082
1082
|
var Er = /* @__PURE__ */ Sr();
|
|
1083
|
-
const Cr = /* @__PURE__ */ hr(Er), Tr = typeof window < "u" || typeof process > "u" || process?.platform === "browser",
|
|
1084
|
-
async function
|
|
1083
|
+
const Cr = /* @__PURE__ */ hr(Er), Tr = typeof window < "u" || typeof process > "u" || process?.platform === "browser", br = Tr ? {} : process.env || {};
|
|
1084
|
+
async function vr(e, t) {
|
|
1085
1085
|
const n = {};
|
|
1086
1086
|
for (const i of t.headers)
|
|
1087
|
-
Rr(e, i.matches) && (n[i.name] = i.envVariable !== void 0 ?
|
|
1087
|
+
Rr(e, i.matches) && (n[i.name] = i.envVariable !== void 0 ? br[i.envVariable] || "" : i.value);
|
|
1088
1088
|
const r = await (t.customFetch || fetch)(e, {
|
|
1089
1089
|
headers: n
|
|
1090
1090
|
});
|
|
@@ -1152,35 +1152,35 @@ function Aa(e, t = {}) {
|
|
|
1152
1152
|
function ot(e) {
|
|
1153
1153
|
return typeof e?.name == "string";
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function ve(e, t) {
|
|
1156
1156
|
return e === "" && (e = "#/"), e[e.length - 1] === "/" ? e + t : e + "/" + t;
|
|
1157
1157
|
}
|
|
1158
1158
|
function at(e) {
|
|
1159
1159
|
return Re(e) && typeof e.$ref == "string";
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function xr(e) {
|
|
1162
1162
|
return at(e) && Object.keys(e).length > 1;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function _r(e) {
|
|
1165
1165
|
return Re(e) && typeof e.externalValue == "string";
|
|
1166
1166
|
}
|
|
1167
|
-
class
|
|
1167
|
+
class ct {
|
|
1168
1168
|
source;
|
|
1169
1169
|
pointer;
|
|
1170
1170
|
constructor(t, n) {
|
|
1171
1171
|
this.source = t, this.pointer = n;
|
|
1172
1172
|
}
|
|
1173
1173
|
child(t) {
|
|
1174
|
-
return new
|
|
1174
|
+
return new ct(this.source, ve(this.pointer, (Array.isArray(t) ? t : [t]).map(Fe).join("/")));
|
|
1175
1175
|
}
|
|
1176
1176
|
key() {
|
|
1177
|
-
return
|
|
1177
|
+
return Object.assign(Object.create(ct.prototype), this, { reportOnKey: !0 });
|
|
1178
1178
|
}
|
|
1179
1179
|
get absolutePointer() {
|
|
1180
1180
|
return this.source.absoluteRef + (this.pointer === "#/" ? "" : this.pointer);
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function wr(e) {
|
|
1184
1184
|
const t = e.indexOf("~") === -1 ? e : e.replaceAll("~1", "/").replaceAll("~0", "~");
|
|
1185
1185
|
try {
|
|
1186
1186
|
return decodeURIComponent(t);
|
|
@@ -1188,10 +1188,10 @@ function Ir(e) {
|
|
|
1188
1188
|
return t;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Fe(e) {
|
|
1192
1192
|
return typeof e == "number" || e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Ir(e) {
|
|
1195
1195
|
const [t, n = ""] = e.split("#/");
|
|
1196
1196
|
return {
|
|
1197
1197
|
uri: (t.endsWith("#") ? t.slice(0, -1) : t) || null,
|
|
@@ -1199,7 +1199,7 @@ function wr(e) {
|
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
1201
|
function Nr(e) {
|
|
1202
|
-
return e.split("/").map(
|
|
1202
|
+
return e.split("/").map(wr).filter(gr);
|
|
1203
1203
|
}
|
|
1204
1204
|
function ya(e) {
|
|
1205
1205
|
const t = e.split("/");
|
|
@@ -1209,22 +1209,22 @@ function Sa(e) {
|
|
|
1209
1209
|
const t = e.split(/[\/\\]/);
|
|
1210
1210
|
return t[t.length - 1].replace(/\.[^.]+$/, "");
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Ne(e) {
|
|
1213
1213
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("file://") || e.startsWith("data:");
|
|
1214
1214
|
}
|
|
1215
1215
|
function Ea(e) {
|
|
1216
|
-
return
|
|
1216
|
+
return Ve.extname(e) ? Ne(e) ? e.substring(0, e.lastIndexOf("/")) : Ve.dirname(e) : e;
|
|
1217
1217
|
}
|
|
1218
1218
|
function Ca(e, t) {
|
|
1219
|
-
return
|
|
1219
|
+
return Ne(e) ? new URL(t, e.endsWith("/") ? e : `${e}/`).href : Ve.resolve(e, t);
|
|
1220
1220
|
}
|
|
1221
1221
|
function Ta(e) {
|
|
1222
|
-
return typeof e == "string" && (e.startsWith("#") ||
|
|
1222
|
+
return typeof e == "string" && (e.startsWith("#") || Ne(e) || e.startsWith("./") || e.startsWith("../") || e.indexOf("/") > -1 || /\.(ya?ml|json)$/i.test(e));
|
|
1223
1223
|
}
|
|
1224
1224
|
function $r(e) {
|
|
1225
1225
|
return /^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e);
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function ba(e, t, n) {
|
|
1228
1228
|
if (!Re(t.node) && n.parent) {
|
|
1229
1229
|
n.parent[n.key] = t.node;
|
|
1230
1230
|
return;
|
|
@@ -1261,7 +1261,7 @@ function Zt(e, t) {
|
|
|
1261
1261
|
representTagName: t.representTagName ?? null
|
|
1262
1262
|
};
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function gt(e, t) {
|
|
1265
1265
|
const n = t.finalize === void 0;
|
|
1266
1266
|
return {
|
|
1267
1267
|
tagName: e,
|
|
@@ -1446,7 +1446,7 @@ function ii(e) {
|
|
|
1446
1446
|
const t = ri(e);
|
|
1447
1447
|
return Number.isFinite(t) ? t : H;
|
|
1448
1448
|
}
|
|
1449
|
-
var
|
|
1449
|
+
var Ot = ee("tag:yaml.org,2002:int", {
|
|
1450
1450
|
implicit: !0,
|
|
1451
1451
|
implicitFirstChars: [
|
|
1452
1452
|
"-",
|
|
@@ -1536,7 +1536,7 @@ function Ai(e) {
|
|
|
1536
1536
|
const t = e.toString(10);
|
|
1537
1537
|
return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
|
|
1538
1538
|
}
|
|
1539
|
-
var
|
|
1539
|
+
var Pt = ee("tag:yaml.org,2002:float", {
|
|
1540
1540
|
implicit: !0,
|
|
1541
1541
|
implicitFirstChars: [
|
|
1542
1542
|
"-",
|
|
@@ -1573,7 +1573,7 @@ function mn(e, t, n, r = 0, i = 0, o = 0, a = 0) {
|
|
|
1573
1573
|
const s = new Date(Date.UTC(e, t, n, r, i, o, a));
|
|
1574
1574
|
return s.setUTCFullYear(e, t, n), s;
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1576
|
+
function bi(e) {
|
|
1577
1577
|
let t = Ci.exec(e);
|
|
1578
1578
|
if (t === null && (t = Ti.exec(e)), t === null) return H;
|
|
1579
1579
|
const n = +t[1], r = +t[2] - 1, i = +t[3];
|
|
@@ -1599,10 +1599,10 @@ function vi(e) {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
return u;
|
|
1601
1601
|
}
|
|
1602
|
-
var
|
|
1602
|
+
var vi = ee("tag:yaml.org,2002:timestamp", {
|
|
1603
1603
|
implicit: !0,
|
|
1604
1604
|
implicitFirstChars: [..."0123456789"],
|
|
1605
|
-
resolve:
|
|
1605
|
+
resolve: bi,
|
|
1606
1606
|
identify: (e) => e instanceof Date,
|
|
1607
1607
|
represent: (e) => e.toISOString()
|
|
1608
1608
|
}), Ri = Zt("tag:yaml.org,2002:seq", {
|
|
@@ -1612,12 +1612,12 @@ var bi = ee("tag:yaml.org,2002:timestamp", {
|
|
|
1612
1612
|
},
|
|
1613
1613
|
identify: Array.isArray
|
|
1614
1614
|
});
|
|
1615
|
-
function
|
|
1615
|
+
function mt(e) {
|
|
1616
1616
|
if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
|
|
1617
1617
|
const t = Object.getPrototypeOf(e);
|
|
1618
1618
|
return t === null || t === Object.prototype;
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function Ft(e, t) {
|
|
1621
1621
|
const n = {};
|
|
1622
1622
|
for (const r of t) e[r] !== void 0 && (n[r] = e[r]);
|
|
1623
1623
|
return n;
|
|
@@ -1632,7 +1632,7 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1632
1632
|
if (t instanceof Map) {
|
|
1633
1633
|
if (t.size !== 1) return "cannot resolve an ordered map item";
|
|
1634
1634
|
n = t.keys().next().value;
|
|
1635
|
-
} else if (
|
|
1635
|
+
} else if (mt(t)) {
|
|
1636
1636
|
const r = Object.keys(t);
|
|
1637
1637
|
if (r.length !== 1) return "cannot resolve an ordered map item";
|
|
1638
1638
|
n = r[0];
|
|
@@ -1649,9 +1649,9 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1649
1649
|
const n = t, r = Object.keys(n);
|
|
1650
1650
|
return r.length !== 1 ? "cannot resolve a pairs item" : (e.push([r[0], n[r[0]]]), "");
|
|
1651
1651
|
}
|
|
1652
|
-
}),
|
|
1652
|
+
}), xi = gt("tag:yaml.org,2002:map", {
|
|
1653
1653
|
create: () => ({}),
|
|
1654
|
-
identify:
|
|
1654
|
+
identify: mt,
|
|
1655
1655
|
represent: (e) => {
|
|
1656
1656
|
const t = /* @__PURE__ */ new Map();
|
|
1657
1657
|
for (const n of Object.keys(e)) t.set(n, e[n]);
|
|
@@ -1673,7 +1673,7 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1673
1673
|
const n = String(t);
|
|
1674
1674
|
return Object.prototype.hasOwnProperty.call(e, n) ? e[n] : null;
|
|
1675
1675
|
}
|
|
1676
|
-
}), Kn =
|
|
1676
|
+
}), Kn = gt("tag:yaml.org,2002:set", {
|
|
1677
1677
|
create: () => /* @__PURE__ */ new Set(),
|
|
1678
1678
|
identify: (e) => e instanceof Set,
|
|
1679
1679
|
represent: (e) => {
|
|
@@ -1686,21 +1686,21 @@ var Dn = Zt("tag:yaml.org,2002:omap", {
|
|
|
1686
1686
|
keys: (e) => e.keys(),
|
|
1687
1687
|
get: () => null
|
|
1688
1688
|
});
|
|
1689
|
-
function
|
|
1689
|
+
function _i() {
|
|
1690
1690
|
return {
|
|
1691
1691
|
scalar: /* @__PURE__ */ Object.create(null),
|
|
1692
1692
|
sequence: /* @__PURE__ */ Object.create(null),
|
|
1693
1693
|
mapping: /* @__PURE__ */ Object.create(null)
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function wi() {
|
|
1697
1697
|
return {
|
|
1698
1698
|
scalar: [],
|
|
1699
1699
|
sequence: [],
|
|
1700
1700
|
mapping: []
|
|
1701
1701
|
};
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function Ii(e) {
|
|
1704
1704
|
const t = [];
|
|
1705
1705
|
for (const n of e) {
|
|
1706
1706
|
let r = t.length;
|
|
@@ -1715,7 +1715,7 @@ function wi(e) {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
return t;
|
|
1717
1717
|
}
|
|
1718
|
-
var
|
|
1718
|
+
var At = class qn {
|
|
1719
1719
|
tags;
|
|
1720
1720
|
implicitScalarTags;
|
|
1721
1721
|
implicitScalarByFirstChar;
|
|
@@ -1726,7 +1726,7 @@ var mt = class qn {
|
|
|
1726
1726
|
exact;
|
|
1727
1727
|
prefix;
|
|
1728
1728
|
constructor(t) {
|
|
1729
|
-
const n =
|
|
1729
|
+
const n = Ii(t), r = [], i = _i(), o = wi();
|
|
1730
1730
|
for (const c of n) {
|
|
1731
1731
|
if (c.nodeKind === "scalar" && c.implicit) {
|
|
1732
1732
|
if (c.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
|
|
@@ -1757,44 +1757,44 @@ var mt = class qn {
|
|
|
1757
1757
|
for (const r of t) n = n.concat(r);
|
|
1758
1758
|
return new qn([...this.tags, ...n]);
|
|
1759
1759
|
}
|
|
1760
|
-
}, Jt = new
|
|
1760
|
+
}, Jt = new At([
|
|
1761
1761
|
kr,
|
|
1762
1762
|
Ri,
|
|
1763
|
-
|
|
1763
|
+
xi
|
|
1764
1764
|
]);
|
|
1765
|
-
new
|
|
1765
|
+
new At([
|
|
1766
1766
|
...Jt.tags,
|
|
1767
1767
|
Pr,
|
|
1768
1768
|
qr,
|
|
1769
1769
|
ti,
|
|
1770
1770
|
di
|
|
1771
1771
|
]);
|
|
1772
|
-
var Gn = new
|
|
1772
|
+
var Gn = new At([
|
|
1773
1773
|
...Jt.tags,
|
|
1774
1774
|
Or,
|
|
1775
1775
|
Dr,
|
|
1776
1776
|
Fn,
|
|
1777
1777
|
Hn
|
|
1778
|
-
]), Ni = new
|
|
1778
|
+
]), Ni = new At([
|
|
1779
1779
|
...Jt.tags,
|
|
1780
1780
|
Hr,
|
|
1781
1781
|
Wr,
|
|
1782
|
-
Lt,
|
|
1783
1782
|
Ot,
|
|
1784
|
-
|
|
1783
|
+
Pt,
|
|
1784
|
+
vi,
|
|
1785
1785
|
Mn,
|
|
1786
1786
|
Bn,
|
|
1787
1787
|
Dn,
|
|
1788
1788
|
Un,
|
|
1789
1789
|
Kn
|
|
1790
1790
|
]);
|
|
1791
|
-
|
|
1791
|
+
gt("tag:yaml.org,2002:map", {
|
|
1792
1792
|
create: () => /* @__PURE__ */ new Map(),
|
|
1793
1793
|
addPair: (e, t, n) => (e.set(t, n), ""),
|
|
1794
1794
|
has: (e, t) => e.has(t),
|
|
1795
1795
|
keys: (e) => e.keys(),
|
|
1796
1796
|
get: (e, t) => e.get(t),
|
|
1797
|
-
identify: (e) => e instanceof Map ||
|
|
1797
|
+
identify: (e) => e instanceof Map || mt(e),
|
|
1798
1798
|
represent: (e) => {
|
|
1799
1799
|
if (e instanceof Map) return e;
|
|
1800
1800
|
const t = /* @__PURE__ */ new Map(), n = e;
|
|
@@ -1813,9 +1813,9 @@ function An(e) {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
return typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" ? "[object Object]" : String(e);
|
|
1815
1815
|
}
|
|
1816
|
-
|
|
1816
|
+
gt("tag:yaml.org,2002:map", {
|
|
1817
1817
|
create: () => ({}),
|
|
1818
|
-
identify:
|
|
1818
|
+
identify: mt,
|
|
1819
1819
|
represent: (e) => {
|
|
1820
1820
|
const t = /* @__PURE__ */ new Map();
|
|
1821
1821
|
for (const n of Object.keys(e)) t.set(n, e[n]);
|
|
@@ -1854,7 +1854,7 @@ function _t(e, t, n, r, i) {
|
|
|
1854
1854
|
pos: r - t + o.length
|
|
1855
1855
|
};
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function wt(e, t) {
|
|
1858
1858
|
return " ".repeat(Math.max(t - e.length, 0)) + e;
|
|
1859
1859
|
}
|
|
1860
1860
|
function ki(e, t) {
|
|
@@ -1871,16 +1871,16 @@ function ki(e, t) {
|
|
|
1871
1871
|
const u = Math.min(e.line + n.linesAfter, o.length).toString().length, c = n.maxLength - (n.indent + u + 3);
|
|
1872
1872
|
for (let m = 1; m <= n.linesBefore && !(s - m < 0); m++) {
|
|
1873
1873
|
const C = _t(e.buffer, i[s - m], o[s - m], e.position - (i[s] - i[s - m]), c);
|
|
1874
|
-
l = `${" ".repeat(n.indent)}${
|
|
1874
|
+
l = `${" ".repeat(n.indent)}${wt((e.line - m + 1).toString(), u)} | ${C.str}
|
|
1875
1875
|
${l}`;
|
|
1876
1876
|
}
|
|
1877
1877
|
const S = _t(e.buffer, i[s], o[s], e.position, c);
|
|
1878
|
-
l += `${" ".repeat(n.indent)}${
|
|
1878
|
+
l += `${" ".repeat(n.indent)}${wt((e.line + 1).toString(), u)} | ${S.str}
|
|
1879
1879
|
`, l += `${"-".repeat(n.indent + u + 3 + S.pos)}^
|
|
1880
1880
|
`;
|
|
1881
1881
|
for (let m = 1; m <= n.linesAfter && !(s + m >= o.length); m++) {
|
|
1882
1882
|
const C = _t(e.buffer, i[s + m], o[s + m], e.position - (i[s] - i[s + m]), c);
|
|
1883
|
-
l += `${" ".repeat(n.indent)}${
|
|
1883
|
+
l += `${" ".repeat(n.indent)}${wt((e.line + m + 1).toString(), u)} | ${C.str}
|
|
1884
1884
|
`;
|
|
1885
1885
|
}
|
|
1886
1886
|
return l.replace(/\n$/, "");
|
|
@@ -1891,7 +1891,7 @@ function yn(e, t) {
|
|
|
1891
1891
|
|
|
1892
1892
|
${e.mark.snippet}`), `${e.reason} ${n}`) : e.reason;
|
|
1893
1893
|
}
|
|
1894
|
-
var
|
|
1894
|
+
var yt = class extends Error {
|
|
1895
1895
|
reason;
|
|
1896
1896
|
mark;
|
|
1897
1897
|
constructor(e, t) {
|
|
@@ -1901,7 +1901,7 @@ var At = class extends Error {
|
|
|
1901
1901
|
return `${this.name}: ${yn(this, e)}`;
|
|
1902
1902
|
}
|
|
1903
1903
|
};
|
|
1904
|
-
function
|
|
1904
|
+
function St(e, t, n, r = "") {
|
|
1905
1905
|
let i = 0, o = 0;
|
|
1906
1906
|
for (let s = 0; s < t; s++) {
|
|
1907
1907
|
const l = e.charCodeAt(s);
|
|
@@ -1914,7 +1914,7 @@ function yt(e, t, n, r = "") {
|
|
|
1914
1914
|
line: i,
|
|
1915
1915
|
column: t - o
|
|
1916
1916
|
};
|
|
1917
|
-
throw a.snippet = ki(a), new
|
|
1917
|
+
throw a.snippet = ki(a), new yt(n, a);
|
|
1918
1918
|
}
|
|
1919
1919
|
var Li = -1;
|
|
1920
1920
|
function Sn(e) {
|
|
@@ -1972,7 +1972,7 @@ function Pi(e) {
|
|
|
1972
1972
|
function Fi(e) {
|
|
1973
1973
|
return e === 120 ? 2 : e === 117 ? 4 : 8;
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function ut(e, t, n) {
|
|
1976
1976
|
let r = 0;
|
|
1977
1977
|
for (; t < n; ) {
|
|
1978
1978
|
const i = e.charCodeAt(t);
|
|
@@ -1998,7 +1998,7 @@ function Hi(e, t, n) {
|
|
|
1998
1998
|
const s = e.charCodeAt(i);
|
|
1999
1999
|
if (s === 10 || s === 13) {
|
|
2000
2000
|
r += e.slice(o, a);
|
|
2001
|
-
const l =
|
|
2001
|
+
const l = ut(e, i, n);
|
|
2002
2002
|
r += en(l.breaks), i = o = a = l.position;
|
|
2003
2003
|
} else
|
|
2004
2004
|
i++, s !== 32 && s !== 9 && (a = i);
|
|
@@ -2013,7 +2013,7 @@ function Mi(e, t, n) {
|
|
|
2013
2013
|
r += e.slice(o, i) + "'", i += 2, o = a = i;
|
|
2014
2014
|
else if (s === 10 || s === 13) {
|
|
2015
2015
|
r += e.slice(o, a);
|
|
2016
|
-
const l =
|
|
2016
|
+
const l = ut(e, i, n);
|
|
2017
2017
|
r += en(l.breaks), i = o = a = l.position;
|
|
2018
2018
|
} else
|
|
2019
2019
|
i++, s !== 32 && s !== 9 && (a = i);
|
|
@@ -2027,7 +2027,7 @@ function Bi(e, t, n) {
|
|
|
2027
2027
|
if (s === 92) {
|
|
2028
2028
|
r += e.slice(o, i), i++;
|
|
2029
2029
|
const l = e.charCodeAt(i);
|
|
2030
|
-
if (l === 10 || l === 13) i =
|
|
2030
|
+
if (l === 10 || l === 13) i = ut(e, i, n).position;
|
|
2031
2031
|
else if (l < 256 && Yn[l])
|
|
2032
2032
|
r += Wn[l], i++;
|
|
2033
2033
|
else {
|
|
@@ -2042,7 +2042,7 @@ function Bi(e, t, n) {
|
|
|
2042
2042
|
o = a = i;
|
|
2043
2043
|
} else if (s === 10 || s === 13) {
|
|
2044
2044
|
r += e.slice(o, a);
|
|
2045
|
-
const l =
|
|
2045
|
+
const l = ut(e, i, n);
|
|
2046
2046
|
r += en(l.breaks), i = o = a = l.position;
|
|
2047
2047
|
} else
|
|
2048
2048
|
i++, s !== 32 && s !== 9 && (a = i);
|
|
@@ -2062,12 +2062,12 @@ function En(e, t, n, r, i, o) {
|
|
|
2062
2062
|
S++;
|
|
2063
2063
|
continue;
|
|
2064
2064
|
}
|
|
2065
|
-
const
|
|
2065
|
+
const w = C.slice(a), M = w.charCodeAt(0);
|
|
2066
2066
|
o ? M === 32 || M === 9 ? (m = !0, u += `
|
|
2067
2067
|
`.repeat(c ? 1 + S : S)) : m ? (m = !1, u += `
|
|
2068
2068
|
`.repeat(S + 1)) : S === 0 ? c && (u += " ") : u += `
|
|
2069
2069
|
`.repeat(S) : u += `
|
|
2070
|
-
`.repeat(c ? 1 + S : S), u +=
|
|
2070
|
+
`.repeat(c ? 1 + S : S), u += w, c = !0, S = 0;
|
|
2071
2071
|
}
|
|
2072
2072
|
return i === 3 ? u += `
|
|
2073
2073
|
`.repeat(c ? 1 + S : S) : i !== 2 && c && (u += `
|
|
@@ -2117,14 +2117,14 @@ function Ki(e) {
|
|
|
2117
2117
|
return "tagStart" in e && e.tagStart !== He ? e.tagStart : "anchorStart" in e && e.anchorStart !== He ? e.anchorStart : "valueStart" in e && e.valueStart !== He ? e.valueStart : "start" in e ? e.start : 0;
|
|
2118
2118
|
}
|
|
2119
2119
|
function oe(e, t) {
|
|
2120
|
-
|
|
2120
|
+
St(e.source, e.position, t, e.filename);
|
|
2121
2121
|
}
|
|
2122
2122
|
function Xn(e, t, n, r) {
|
|
2123
2123
|
try {
|
|
2124
2124
|
return n.finalize(r);
|
|
2125
2125
|
} catch (i) {
|
|
2126
|
-
if (i instanceof
|
|
2127
|
-
|
|
2126
|
+
if (i instanceof yt) throw i;
|
|
2127
|
+
St(e.source, t, i instanceof Error ? i.message : String(i), e.filename);
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
2130
|
function st(e, t, n) {
|
|
@@ -2209,7 +2209,7 @@ function Wi(e, t, n, r, i) {
|
|
|
2209
2209
|
const o = t.tag.addPair(t.value, n, r);
|
|
2210
2210
|
o && oe(e, o), t.overridable?.delete(n);
|
|
2211
2211
|
}
|
|
2212
|
-
function
|
|
2212
|
+
function Nt(e, t, n) {
|
|
2213
2213
|
const r = e.frames[e.frames.length - 1];
|
|
2214
2214
|
if (r.kind === "document")
|
|
2215
2215
|
r.value = t, r.hasValue = !0;
|
|
@@ -2223,7 +2223,7 @@ function wt(e, t, n) {
|
|
|
2223
2223
|
} else
|
|
2224
2224
|
r.key = t, r.keyPosition = e.position, r.hasKey = !0;
|
|
2225
2225
|
}
|
|
2226
|
-
function
|
|
2226
|
+
function $t(e, t, n, r, i) {
|
|
2227
2227
|
if (t.anchorStart !== He) {
|
|
2228
2228
|
const o = {
|
|
2229
2229
|
value: n,
|
|
@@ -2263,11 +2263,11 @@ function ji(e, t) {
|
|
|
2263
2263
|
break;
|
|
2264
2264
|
case 4: {
|
|
2265
2265
|
const { value: i, tag: o } = Gi(n, r);
|
|
2266
|
-
|
|
2266
|
+
$t(n, r, i, o, !0), Nt(n, i, o);
|
|
2267
2267
|
break;
|
|
2268
2268
|
}
|
|
2269
2269
|
case 2: {
|
|
2270
|
-
const i = Cn(n, r, n.schema.exact.sequence, n.schema.prefix.sequence, "tag:yaml.org,2002:seq", "sequence"), o = i.tag.create(i.tagName), a =
|
|
2270
|
+
const i = Cn(n, r, n.schema.exact.sequence, n.schema.prefix.sequence, "tag:yaml.org,2002:seq", "sequence"), o = i.tag.create(i.tagName), a = $t(n, r, o, i.tag, i.tag.carrierIsResult), s = n.frames[n.frames.length - 1], l = s !== void 0 && s.kind === "mapping" && s.hasKey && s.key === Qt;
|
|
2271
2271
|
n.frames.push({
|
|
2272
2272
|
kind: "sequence",
|
|
2273
2273
|
position: n.position,
|
|
@@ -2280,7 +2280,7 @@ function ji(e, t) {
|
|
|
2280
2280
|
break;
|
|
2281
2281
|
}
|
|
2282
2282
|
case 3: {
|
|
2283
|
-
const i = Cn(n, r, n.schema.exact.mapping, n.schema.prefix.mapping, "tag:yaml.org,2002:map", "mapping"), o = i.tag.create(i.tagName), a =
|
|
2283
|
+
const i = Cn(n, r, n.schema.exact.mapping, n.schema.prefix.mapping, "tag:yaml.org,2002:map", "mapping"), o = i.tag.create(i.tagName), a = $t(n, r, o, i.tag, i.tag.carrierIsResult);
|
|
2284
2284
|
n.frames.push({
|
|
2285
2285
|
kind: "mapping",
|
|
2286
2286
|
position: n.position,
|
|
@@ -2297,7 +2297,7 @@ function ji(e, t) {
|
|
|
2297
2297
|
case 5: {
|
|
2298
2298
|
n.maxAliases !== -1 && ++n.aliasCount > n.maxAliases && oe(n, `aliases exceeded maxAliases (${n.maxAliases})`);
|
|
2299
2299
|
const i = n.source.slice(r.anchorStart, r.anchorEnd), o = n.anchors.get(i);
|
|
2300
|
-
o || oe(n, `unidentified alias "${i}"`), o.isValueFinal || oe(n, `recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),
|
|
2300
|
+
o || oe(n, `unidentified alias "${i}"`), o.isValueFinal || oe(n, `recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`), Nt(n, o.value, o.tag);
|
|
2301
2301
|
break;
|
|
2302
2302
|
}
|
|
2303
2303
|
case 6: {
|
|
@@ -2305,7 +2305,7 @@ function ji(e, t) {
|
|
|
2305
2305
|
if (i.kind === "mapping" && i.hasKey && (n.position = i.keyPosition, oe(n, "incomplete mapping pair in event stream")), i.kind === "document") n.documents.push(i.value);
|
|
2306
2306
|
else {
|
|
2307
2307
|
const o = i.tag.carrierIsResult ? i.value : Xn(n, i.position, i.tag, i.value);
|
|
2308
|
-
i.anchor && (i.anchor.value = o, i.anchor.isValueFinal = !0),
|
|
2308
|
+
i.anchor && (i.anchor.value = o, i.anchor.isValueFinal = !0), Nt(n, o, i.tag);
|
|
2309
2309
|
}
|
|
2310
2310
|
break;
|
|
2311
2311
|
}
|
|
@@ -2313,7 +2313,7 @@ function ji(e, t) {
|
|
|
2313
2313
|
}
|
|
2314
2314
|
return n.documents;
|
|
2315
2315
|
}
|
|
2316
|
-
var B = -1, Qn = Object.prototype.hasOwnProperty, Ue = 1,
|
|
2316
|
+
var B = -1, Qn = Object.prototype.hasOwnProperty, Ue = 1, Ht = 2, Zn = 3, ft = 4, Vi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Xi = /[,\[\]{}]/, Jn = /^(?:!|!!|![0-9A-Za-z-]+!)$/, Mt = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`, er = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`, zi = new RegExp(`^(?:${Mt})*$`), Qi = new RegExp(`^(?:${er})+$`), Zi = new RegExp(`^(?:!(?:${Mt})*|${er}(?:${Mt})*)$`), nn = {
|
|
2317
2317
|
filename: "",
|
|
2318
2318
|
maxDepth: 100
|
|
2319
2319
|
};
|
|
@@ -2336,7 +2336,7 @@ function tr(e, t, n, r, i, o, a) {
|
|
|
2336
2336
|
style: a
|
|
2337
2337
|
});
|
|
2338
2338
|
}
|
|
2339
|
-
function
|
|
2339
|
+
function Bt(e, t, n, r, i, o, a) {
|
|
2340
2340
|
e.events.push({
|
|
2341
2341
|
type: 3,
|
|
2342
2342
|
start: t,
|
|
@@ -2347,7 +2347,7 @@ function Mt(e, t, n, r, i, o, a) {
|
|
|
2347
2347
|
style: a
|
|
2348
2348
|
});
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function bn(e, t) {
|
|
2351
2351
|
e.events.splice(t.eventsLength, 0, {
|
|
2352
2352
|
type: 3,
|
|
2353
2353
|
start: t.position,
|
|
@@ -2386,7 +2386,7 @@ function Me(e) {
|
|
|
2386
2386
|
function re(e) {
|
|
2387
2387
|
qe(e, B, B, B, B, B, B, 1);
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function vn() {
|
|
2390
2390
|
return {
|
|
2391
2391
|
anchorStart: B,
|
|
2392
2392
|
anchorEnd: B,
|
|
@@ -2394,7 +2394,7 @@ function bn() {
|
|
|
2394
2394
|
tagEnd: B
|
|
2395
2395
|
};
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2397
|
+
function We(e) {
|
|
2398
2398
|
return {
|
|
2399
2399
|
position: e.position,
|
|
2400
2400
|
line: e.line,
|
|
@@ -2408,21 +2408,21 @@ function Be(e, t) {
|
|
|
2408
2408
|
e.position = t.position, e.line = t.line, e.lineStart = t.lineStart, e.lineIndent = t.lineIndent, e.firstTabInLine = t.firstTabInLine, e.events.length = t.eventsLength;
|
|
2409
2409
|
}
|
|
2410
2410
|
function _(e, t) {
|
|
2411
|
-
|
|
2411
|
+
St(e.input.slice(0, e.length), e.position, t, e.filename);
|
|
2412
2412
|
}
|
|
2413
2413
|
function Z(e) {
|
|
2414
2414
|
return e === 10 || e === 13;
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function Le(e) {
|
|
2417
2417
|
return e === 9 || e === 32;
|
|
2418
2418
|
}
|
|
2419
2419
|
function pe(e) {
|
|
2420
|
-
return
|
|
2420
|
+
return Le(e) || Z(e);
|
|
2421
2421
|
}
|
|
2422
2422
|
function Ee(e) {
|
|
2423
2423
|
return e === 0 || pe(e);
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function Oe(e) {
|
|
2426
2426
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
2427
2427
|
}
|
|
2428
2428
|
function to(e) {
|
|
@@ -2439,24 +2439,24 @@ function ro(e) {
|
|
|
2439
2439
|
function io(e) {
|
|
2440
2440
|
return e === 48 || e === 97 || e === 98 || e === 116 || e === 9 || e === 110 || e === 118 || e === 102 || e === 114 || e === 101 || e === 32 || e === 34 || e === 47 || e === 92 || e === 78 || e === 95 || e === 76 || e === 80;
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2442
|
+
function pt(e) {
|
|
2443
2443
|
e.input.charCodeAt(e.position) === 10 ? e.position++ : (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++), e.line++, e.lineStart = e.position, e.lineIndent = 0, e.firstTabInLine = -1;
|
|
2444
2444
|
}
|
|
2445
2445
|
function ie(e, t) {
|
|
2446
2446
|
let n = 0, r = e.input.charCodeAt(e.position), i = e.position === e.lineStart || pe(e.input.charCodeAt(e.position - 1));
|
|
2447
2447
|
for (; r !== 0; ) {
|
|
2448
|
-
for (;
|
|
2448
|
+
for (; Le(r); )
|
|
2449
2449
|
i = !0, r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
2450
2450
|
if (t && i && r === 35) do
|
|
2451
2451
|
r = e.input.charCodeAt(++e.position);
|
|
2452
2452
|
while (!Z(r) && r !== 0);
|
|
2453
2453
|
if (!Z(r)) break;
|
|
2454
|
-
for (
|
|
2454
|
+
for (pt(e), n++, i = !0, r = e.input.charCodeAt(e.position); r === 32; )
|
|
2455
2455
|
e.lineIndent++, r = e.input.charCodeAt(++e.position);
|
|
2456
2456
|
}
|
|
2457
2457
|
return n;
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function $e(e, t = e.position) {
|
|
2460
2460
|
const n = e.input.charCodeAt(t);
|
|
2461
2461
|
if ((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2)) {
|
|
2462
2462
|
const r = e.input.charCodeAt(t + 3);
|
|
@@ -2482,7 +2482,7 @@ function oo(e, t, n) {
|
|
|
2482
2482
|
for (; s !== 0 && s !== 62; ) s = e.input.charCodeAt(++e.position);
|
|
2483
2483
|
s !== 62 && _(e, "unexpected end of the stream within a verbatim tag"), u = e.input.slice(l, e.position), e.position++;
|
|
2484
2484
|
} else {
|
|
2485
|
-
for (; s !== 0 && !pe(s) && !(n &&
|
|
2485
|
+
for (; s !== 0 && !pe(s) && !(n && Oe(s)); )
|
|
2486
2486
|
s === 33 && (o ? _(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(l - 1, e.position + 1), Jn.test(a) || _(e, "named tag handle cannot contain such characters"), o = !0, l = e.position + 1)), s = e.input.charCodeAt(++e.position);
|
|
2487
2487
|
u = e.input.slice(l, e.position), Xi.test(u) && _(e, "tag suffix cannot contain flow indicator characters");
|
|
2488
2488
|
}
|
|
@@ -2492,17 +2492,17 @@ function ao(e, t) {
|
|
|
2492
2492
|
if (e.input.charCodeAt(e.position) !== 38) return !1;
|
|
2493
2493
|
t.anchorStart !== B && _(e, "duplication of an anchor property"), e.position++;
|
|
2494
2494
|
const n = e.position;
|
|
2495
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !
|
|
2495
|
+
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !Oe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2496
2496
|
return e.position === n && _(e, "name of an anchor node must contain at least one character"), t.anchorStart = n, t.anchorEnd = e.position, !0;
|
|
2497
2497
|
}
|
|
2498
2498
|
function so(e, t) {
|
|
2499
2499
|
if (e.input.charCodeAt(e.position) !== 42) return !1;
|
|
2500
2500
|
(t.anchorStart !== B || t.tagStart !== B) && _(e, "alias node should not have any properties"), e.position++;
|
|
2501
2501
|
const n = e.position;
|
|
2502
|
-
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !
|
|
2502
|
+
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !Oe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2503
2503
|
return e.position === n && _(e, "name of an alias node must contain at least one character"), eo(e, n, e.position), !0;
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function Dt(e, t) {
|
|
2506
2506
|
ie(e, !1), e.lineIndent < t && _(e, "deficient indentation");
|
|
2507
2507
|
}
|
|
2508
2508
|
function lo(e, t, n) {
|
|
@@ -2520,7 +2520,7 @@ function lo(e, t, n) {
|
|
|
2520
2520
|
const a = e.position;
|
|
2521
2521
|
return e.position++, qe(e, r, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2, 1, -1, i), !0;
|
|
2522
2522
|
}
|
|
2523
|
-
Z(o) ? (i = !1,
|
|
2523
|
+
Z(o) ? (i = !1, Dt(e, t)) : e.position === e.lineStart && $e(e) ? _(e, "unexpected end of the document within a single quoted scalar") : o !== 9 && o < 32 ? _(e, "expected valid JSON character") : e.position++;
|
|
2524
2524
|
}
|
|
2525
2525
|
_(e, "unexpected end of the stream within a single quoted scalar");
|
|
2526
2526
|
}
|
|
@@ -2538,7 +2538,7 @@ function co(e, t, n) {
|
|
|
2538
2538
|
if (o === 92) {
|
|
2539
2539
|
i = !1;
|
|
2540
2540
|
const a = e.input.charCodeAt(++e.position);
|
|
2541
|
-
if (Z(a))
|
|
2541
|
+
if (Z(a)) Dt(e, t);
|
|
2542
2542
|
else if (io(a)) e.position++;
|
|
2543
2543
|
else {
|
|
2544
2544
|
let s = ro(a);
|
|
@@ -2546,7 +2546,7 @@ function co(e, t, n) {
|
|
|
2546
2546
|
e.position++, no(e.input.charCodeAt(e.position)) < 0 && _(e, "expected hexadecimal character");
|
|
2547
2547
|
e.position++;
|
|
2548
2548
|
}
|
|
2549
|
-
} else Z(o) ? (i = !1,
|
|
2549
|
+
} else Z(o) ? (i = !1, Dt(e, t)) : e.position === e.lineStart && $e(e) ? _(e, "unexpected end of the document within a double quoted scalar") : o !== 9 && o < 32 ? _(e, "expected valid JSON character") : e.position++;
|
|
2550
2550
|
}
|
|
2551
2551
|
_(e, "unexpected end of the stream within a double quoted scalar");
|
|
2552
2552
|
}
|
|
@@ -2564,9 +2564,9 @@ function uo(e, t, n) {
|
|
|
2564
2564
|
else break;
|
|
2565
2565
|
}
|
|
2566
2566
|
let l = !1;
|
|
2567
|
-
for (;
|
|
2567
|
+
for (; Le(e.input.charCodeAt(e.position)); )
|
|
2568
2568
|
l = !0, e.position++;
|
|
2569
|
-
l && e.input.charCodeAt(e.position) === 35 && Rn(e), Z(e.input.charCodeAt(e.position)) ?
|
|
2569
|
+
l && e.input.charCodeAt(e.position) === 35 && Rn(e), Z(e.input.charCodeAt(e.position)) ? pt(e) : e.input.charCodeAt(e.position) !== 0 && _(e, "a line break is expected");
|
|
2570
2570
|
let u = a ? o : -1, c = 0;
|
|
2571
2571
|
const S = e.position;
|
|
2572
2572
|
let m = e.position;
|
|
@@ -2574,32 +2574,32 @@ function uo(e, t, n) {
|
|
|
2574
2574
|
const C = e.position;
|
|
2575
2575
|
let E = 0;
|
|
2576
2576
|
for (; e.input.charCodeAt(C + E) === 32; ) E++;
|
|
2577
|
-
const
|
|
2578
|
-
if (
|
|
2577
|
+
const w = e.input.charCodeAt(C + E);
|
|
2578
|
+
if (w === 0) {
|
|
2579
2579
|
u >= 0 ? E > u && (m = C + E) : E > 0 && (m = C + E);
|
|
2580
2580
|
break;
|
|
2581
2581
|
}
|
|
2582
|
-
if (C === e.lineStart &&
|
|
2583
|
-
if (!a && u === -1 && Z(
|
|
2582
|
+
if (C === e.lineStart && $e(e, C)) break;
|
|
2583
|
+
if (!a && u === -1 && Z(w) && (c = Math.max(c, E)), !a && u === -1 && !Z(w) && (w === 9 && E < t && (e.position = C + E, _(e, "tab characters must not be used in indentation")), E < c && (e.position = C + E, _(e, "bad indentation of a mapping entry"))), u === -1 && w !== 0 && !Z(w) && E < t) {
|
|
2584
2584
|
e.lineIndent = E, e.position = C + E;
|
|
2585
2585
|
break;
|
|
2586
2586
|
}
|
|
2587
|
-
!a &&
|
|
2587
|
+
!a && w !== 0 && !Z(w) && u === -1 && (u = E);
|
|
2588
2588
|
const M = u === -1 ? t + 1 : u;
|
|
2589
|
-
if (
|
|
2589
|
+
if (w !== 0 && !Z(w) && E < M) {
|
|
2590
2590
|
e.lineIndent = E, e.position = C + E;
|
|
2591
2591
|
break;
|
|
2592
2592
|
}
|
|
2593
|
-
Rn(e), m = e.position, Z(e.input.charCodeAt(e.position)) && (
|
|
2593
|
+
Rn(e), m = e.position, Z(e.input.charCodeAt(e.position)) && (pt(e), m = e.position);
|
|
2594
2594
|
}
|
|
2595
2595
|
return nr(e, S, m), qe(e, S, m, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, s, i, u), !0;
|
|
2596
2596
|
}
|
|
2597
2597
|
function fo(e, t) {
|
|
2598
2598
|
const n = e.input.charCodeAt(e.position), r = t === Ue;
|
|
2599
|
-
if (n === 0 || pe(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || r &&
|
|
2599
|
+
if (n === 0 || pe(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || r && Oe(n)) return !1;
|
|
2600
2600
|
if (n === 63 || n === 45) {
|
|
2601
2601
|
const i = e.input.charCodeAt(e.position + 1);
|
|
2602
|
-
if (Ee(i) || r &&
|
|
2602
|
+
if (Ee(i) || r && Oe(i)) return !1;
|
|
2603
2603
|
}
|
|
2604
2604
|
return !0;
|
|
2605
2605
|
}
|
|
@@ -2609,14 +2609,14 @@ function po(e, t, n, r) {
|
|
|
2609
2609
|
let o = e.position, a = e.input.charCodeAt(e.position);
|
|
2610
2610
|
const s = n === Ue;
|
|
2611
2611
|
let l = !1;
|
|
2612
|
-
for (; a !== 0 && !(e.position === e.lineStart &&
|
|
2612
|
+
for (; a !== 0 && !(e.position === e.lineStart && $e(e)); ) {
|
|
2613
2613
|
if (a === 58) {
|
|
2614
2614
|
const u = e.input.charCodeAt(e.position + 1);
|
|
2615
|
-
if (Ee(u) || s &&
|
|
2615
|
+
if (Ee(u) || s && Oe(u)) break;
|
|
2616
2616
|
} else if (a === 35) {
|
|
2617
2617
|
if (pe(e.input.charCodeAt(e.position - 1))) break;
|
|
2618
2618
|
} else {
|
|
2619
|
-
if (s &&
|
|
2619
|
+
if (s && Oe(a)) break;
|
|
2620
2620
|
if (Z(a)) {
|
|
2621
2621
|
const u = e.position, c = e.line, S = e.lineStart, m = e.lineIndent;
|
|
2622
2622
|
if (ie(e, !1), e.lineIndent >= t) {
|
|
@@ -2627,7 +2627,7 @@ function po(e, t, n, r) {
|
|
|
2627
2627
|
break;
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
|
-
|
|
2630
|
+
Le(a) || (o = e.position + 1), a = e.input.charCodeAt(++e.position);
|
|
2631
2631
|
}
|
|
2632
2632
|
return o === i ? !1 : (nr(e, i, o), qe(e, i, o, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1, 1, -1, !l), !0);
|
|
2633
2633
|
}
|
|
@@ -2640,7 +2640,7 @@ function ho(e, t, n) {
|
|
|
2640
2640
|
let a = !0;
|
|
2641
2641
|
if (r !== 91 && r !== 123) return !1;
|
|
2642
2642
|
const s = i ? 125 : 93;
|
|
2643
|
-
for (i ?
|
|
2643
|
+
for (i ? Bt(e, o, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2) : tr(e, o, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2), e.position++; e.input.charCodeAt(e.position) !== 0; ) {
|
|
2644
2644
|
Ge(e, t);
|
|
2645
2645
|
let l = e.input.charCodeAt(e.position);
|
|
2646
2646
|
if (l === s)
|
|
@@ -2648,24 +2648,24 @@ function ho(e, t, n) {
|
|
|
2648
2648
|
a ? l === 44 && _(e, "expected the node content, but found ','") : _(e, "missed comma between flow collection entries");
|
|
2649
2649
|
let u = !1, c = !1;
|
|
2650
2650
|
l === 63 && pe(e.input.charCodeAt(e.position + 1)) && (u = c = !0, e.position += 1, Ge(e, t));
|
|
2651
|
-
const S = e.line, m =
|
|
2652
|
-
Ge(e, t), l = e.input.charCodeAt(e.position), (i || c || e.line === S) && l === 58 ? (u = !0, e.position++, Ge(e, t), i ||
|
|
2651
|
+
const S = e.line, m = We(e), C = ke(e, t, Ue, !1, !0);
|
|
2652
|
+
Ge(e, t), l = e.input.charCodeAt(e.position), (i || c || e.line === S) && l === 58 ? (u = !0, e.position++, Ge(e, t), i || bn(e, m), C || re(e), ke(e, t, Ue, !1, !0) || re(e), Ge(e, t), i || Me(e)) : i && u ? (C || re(e), re(e)) : i ? re(e) : u && (bn(e, m), C || re(e), re(e), Me(e)), l = e.input.charCodeAt(e.position), l === 44 ? (a = !0, e.position++) : a = !1;
|
|
2653
2653
|
}
|
|
2654
2654
|
_(e, "unexpected end of the stream within a flow collection");
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2656
|
+
function xn(e, t, n) {
|
|
2657
2657
|
if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !Ee(e.input.charCodeAt(e.position + 1))) return !1;
|
|
2658
2658
|
for (tr(e, e.position, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 1); e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)); ) {
|
|
2659
2659
|
e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation"));
|
|
2660
2660
|
const r = e.line;
|
|
2661
2661
|
e.position++;
|
|
2662
2662
|
const i = ie(e, !0) > 0;
|
|
2663
|
-
if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry"), i && e.lineIndent <= t ? re(e) :
|
|
2663
|
+
if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry"), i && e.lineIndent <= t ? re(e) : ke(e, t, Zn, !1, !0), ie(e, !0), e.lineIndent < t || e.position >= e.length) break;
|
|
2664
2664
|
e.lineIndent > t && _(e, "bad indentation of a sequence entry"), e.line === r && e.input.charCodeAt(e.position) === 45 && Ee(e.input.charCodeAt(e.position + 1)) && _(e, "bad indentation of a sequence entry");
|
|
2665
2665
|
}
|
|
2666
2666
|
return Me(e), !0;
|
|
2667
2667
|
}
|
|
2668
|
-
function
|
|
2668
|
+
function kt(e, t, n, r) {
|
|
2669
2669
|
let i = !1, o = !1, a = !1, s = !1;
|
|
2670
2670
|
if (e.firstTabInLine !== -1) return !1;
|
|
2671
2671
|
let l = e.input.charCodeAt(e.position);
|
|
@@ -2673,16 +2673,16 @@ function $t(e, t, n, r) {
|
|
|
2673
2673
|
!i && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, _(e, "tab characters must not be used in indentation"));
|
|
2674
2674
|
const u = e.input.charCodeAt(e.position + 1), c = e.line;
|
|
2675
2675
|
if ((l === 63 || l === 58) && Ee(u))
|
|
2676
|
-
a || (
|
|
2676
|
+
a || (Bt(e, e.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0), l === 63 ? (i && re(e), o = !0, i = !0) : (i || (re(e), o = !0), i = !1), e.position += 1, s = !0;
|
|
2677
2677
|
else {
|
|
2678
2678
|
i && (re(e), i = !1);
|
|
2679
|
-
const S =
|
|
2680
|
-
if (
|
|
2679
|
+
const S = We(e);
|
|
2680
|
+
if (!ke(e, n, Ht, !1, !0)) break;
|
|
2681
2681
|
if (e.line === c) {
|
|
2682
|
-
for (l = e.input.charCodeAt(e.position);
|
|
2682
|
+
for (l = e.input.charCodeAt(e.position); Le(l); ) l = e.input.charCodeAt(++e.position);
|
|
2683
2683
|
if (l === 58) {
|
|
2684
2684
|
if (l = e.input.charCodeAt(++e.position), Ee(l) || _(e, "a whitespace character is expected after the key-value separator within a block mapping"), !a) {
|
|
2685
|
-
for (Be(e, S),
|
|
2685
|
+
for (Be(e, S), Bt(e, S.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0, ke(e, n, Ht, !1, !0), l = e.input.charCodeAt(e.position); Le(l); ) l = e.input.charCodeAt(++e.position);
|
|
2686
2686
|
e.position++;
|
|
2687
2687
|
}
|
|
2688
2688
|
o = !0, i = !1, s = !1;
|
|
@@ -2693,41 +2693,41 @@ function $t(e, t, n, r) {
|
|
|
2693
2693
|
else
|
|
2694
2694
|
return r.anchorStart !== B || r.tagStart !== B ? (Be(e, S), !1) : !0;
|
|
2695
2695
|
}
|
|
2696
|
-
if (
|
|
2696
|
+
if (ke(e, t, ft, !0, s) && (s = !1), i || s && (re(e), s = !1), ie(e, !0), l = e.input.charCodeAt(e.position), (e.line === c || e.lineIndent > t) && l !== 0) _(e, "bad indentation of a mapping entry");
|
|
2697
2697
|
else if (e.lineIndent < t) break;
|
|
2698
2698
|
}
|
|
2699
2699
|
return o ? (i && re(e), a && Me(e), !0) : !1;
|
|
2700
2700
|
}
|
|
2701
|
-
function
|
|
2701
|
+
function ke(e, t, n, r, i, o = !0) {
|
|
2702
2702
|
e.depth >= e.maxDepth && _(e, `nesting exceeded maxDepth (${e.maxDepth})`), e.depth++;
|
|
2703
2703
|
let a = 1, s = !1, l = !1, u = null;
|
|
2704
|
-
const c =
|
|
2705
|
-
let S = n ===
|
|
2704
|
+
const c = vn();
|
|
2705
|
+
let S = n === ft || n === Zn, m = S;
|
|
2706
2706
|
const C = S;
|
|
2707
2707
|
if (r && ie(e, !0) && (s = !0, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1), a === 1) for (; ; ) {
|
|
2708
|
-
const E = e.input.charCodeAt(e.position),
|
|
2708
|
+
const E = e.input.charCodeAt(e.position), w = We(e);
|
|
2709
2709
|
if (s && a !== 1 && (E === 33 || E === 38)) break;
|
|
2710
2710
|
if (s && C && (c.tagStart !== B || c.anchorStart !== B) && (E === 33 || E === 38)) {
|
|
2711
|
-
const M =
|
|
2712
|
-
if (
|
|
2711
|
+
const M = We(e), N = t + 1;
|
|
2712
|
+
if (kt(e, e.position - e.lineStart, N, c) && e.events[M.eventsLength]?.type === 3)
|
|
2713
2713
|
return e.depth--, !0;
|
|
2714
2714
|
Be(e, M);
|
|
2715
2715
|
}
|
|
2716
2716
|
if (s && (E === 33 && c.tagStart !== B || E === 38 && c.anchorStart !== B) || !oo(e, c, n === Ue) && !ao(e, c)) break;
|
|
2717
|
-
u === null && (u =
|
|
2717
|
+
u === null && (u = w), ie(e, !0) ? (s = !0, m = C, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1) : m = !1;
|
|
2718
2718
|
}
|
|
2719
|
-
if (m && (m = s || i), a === 1 || n ===
|
|
2720
|
-
const E = n === Ue || n ===
|
|
2721
|
-
if (a === 1) if (m && (
|
|
2719
|
+
if (m && (m = s || i), a === 1 || n === ft) {
|
|
2720
|
+
const E = n === Ue || n === Ht ? t : t + 1, w = e.position - e.lineStart;
|
|
2721
|
+
if (a === 1) if (m && (xn(e, w, c) || kt(e, w, E, c)) || ho(e, E, c)) l = !0;
|
|
2722
2722
|
else {
|
|
2723
2723
|
const M = e.input.charCodeAt(e.position);
|
|
2724
2724
|
if (u !== null && o && C && !m && M !== 124 && M !== 62) {
|
|
2725
|
-
const N =
|
|
2726
|
-
Be(e, u),
|
|
2725
|
+
const N = We(e), k = u.position - u.lineStart;
|
|
2726
|
+
Be(e, u), kt(e, k, E, vn()) && e.events[N.eventsLength]?.type === 3 ? l = !0 : Be(e, N);
|
|
2727
2727
|
}
|
|
2728
2728
|
!l && (S && uo(e, E, c) || lo(e, E, c) || co(e, E, c) || so(e, c) || po(e, E, n, c)) && (l = !0);
|
|
2729
2729
|
}
|
|
2730
|
-
else a === 0 && (l = m &&
|
|
2730
|
+
else a === 0 && (l = m && xn(e, w, c));
|
|
2731
2731
|
}
|
|
2732
2732
|
return S = S && !l, !l && (c.anchorStart !== B || c.tagStart !== B || S) && (qe(e, B, B, c.anchorStart, c.anchorEnd, c.tagStart, c.tagEnd, 1), l = !0), e.depth--, l || c.anchorStart !== B || c.tagStart !== B;
|
|
2733
2733
|
}
|
|
@@ -2738,13 +2738,13 @@ function go(e) {
|
|
|
2738
2738
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2739
2739
|
const n = e.input.slice(t, e.position), r = [];
|
|
2740
2740
|
for (n.length === 0 && _(e, "directive name must not be less than one character in length"); e.input.charCodeAt(e.position) !== 0 && !Z(e.input.charCodeAt(e.position)); ) {
|
|
2741
|
-
for (;
|
|
2741
|
+
for (; Le(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2742
2742
|
if (e.input.charCodeAt(e.position) === 35 || Z(e.input.charCodeAt(e.position)) || e.input.charCodeAt(e.position) === 0) break;
|
|
2743
2743
|
const i = e.position;
|
|
2744
2744
|
for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
|
|
2745
2745
|
r.push(e.input.slice(i, e.position));
|
|
2746
2746
|
}
|
|
2747
|
-
if (Z(e.input.charCodeAt(e.position)) &&
|
|
2747
|
+
if (Z(e.input.charCodeAt(e.position)) && pt(e), n === "YAML") {
|
|
2748
2748
|
e.directives.some((o) => o.kind === "yaml") && _(e, "duplication of %YAML directive"), r.length !== 1 && _(e, "YAML directive accepts exactly one argument");
|
|
2749
2749
|
const i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]);
|
|
2750
2750
|
i === null && _(e, "ill-formed argument of the YAML directive"), parseInt(i[1], 10) !== 1 && _(e, "unacceptable YAML version of the document"), e.directives.push({
|
|
@@ -2774,16 +2774,16 @@ function mo(e) {
|
|
|
2774
2774
|
e.position += 3, ie(e, !0), i = e.line > s;
|
|
2775
2775
|
} else t && _(e, "directives end mark is expected");
|
|
2776
2776
|
const o = e.events.length;
|
|
2777
|
-
if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 &&
|
|
2777
|
+
if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 && $e(e)) {
|
|
2778
2778
|
e.position += 3, ie(e, !0);
|
|
2779
2779
|
return;
|
|
2780
2780
|
}
|
|
2781
|
-
if (Ji(e, n, !1),
|
|
2781
|
+
if (Ji(e, n, !1), ke(e, e.lineIndent - 1, ft, !1, i, i) || re(e), ie(e, !0), e.position === e.lineStart && $e(e) && (r = e.input.charCodeAt(e.position) === 46, r)) {
|
|
2782
2782
|
const s = e.line;
|
|
2783
2783
|
e.position += 3, ie(e, !0), e.line === s && e.position < e.length && _(e, "end of the stream or a document separator is expected");
|
|
2784
2784
|
}
|
|
2785
2785
|
const a = e.events[o];
|
|
2786
|
-
a?.type === 1 && (a.explicitEnd = r), Me(e), !r && e.position < e.length && !(e.position === e.lineStart &&
|
|
2786
|
+
a?.type === 1 && (a.explicitEnd = r), Me(e), !r && e.position < e.length && !(e.position === e.lineStart && $e(e)) && _(e, "end of the stream or a document separator is expected");
|
|
2787
2787
|
}
|
|
2788
2788
|
function Ao(e, t) {
|
|
2789
2789
|
const n = e.length, r = {
|
|
@@ -2801,7 +2801,7 @@ function Ao(e, t) {
|
|
|
2801
2801
|
tagHandlers: /* @__PURE__ */ Object.create(null),
|
|
2802
2802
|
events: []
|
|
2803
2803
|
}, i = e.indexOf("\0");
|
|
2804
|
-
for (i !== -1 &&
|
|
2804
|
+
for (i !== -1 && St(e, i, "null byte is not allowed in input", r.filename), r.input.charCodeAt(r.position) === 65279 && r.position++; r.position < r.length && (ie(r, !0), !(r.position >= r.length)); ) {
|
|
2805
2805
|
const o = r.position;
|
|
2806
2806
|
mo(r), r.position === o && _(r, "can not read a document");
|
|
2807
2807
|
}
|
|
@@ -2816,8 +2816,8 @@ function So(e, t = {}) {
|
|
|
2816
2816
|
...yo,
|
|
2817
2817
|
...t
|
|
2818
2818
|
}, r = String(e), i = Object.keys(nn), o = Object.keys(tn);
|
|
2819
|
-
return ji(Ao(r,
|
|
2820
|
-
...
|
|
2819
|
+
return ji(Ao(r, Ft(n, i)), {
|
|
2820
|
+
...Ft(n, o),
|
|
2821
2821
|
source: r
|
|
2822
2822
|
});
|
|
2823
2823
|
}
|
|
@@ -2828,14 +2828,14 @@ function Eo(e, t, n) {
|
|
|
2828
2828
|
if (r === null) return i;
|
|
2829
2829
|
for (const o of i) r(o);
|
|
2830
2830
|
}
|
|
2831
|
-
var
|
|
2831
|
+
var tt = class {
|
|
2832
2832
|
tagged = !1;
|
|
2833
2833
|
flow = !1;
|
|
2834
2834
|
singleQuoted = !1;
|
|
2835
2835
|
doubleQuoted = !1;
|
|
2836
2836
|
literal = !1;
|
|
2837
2837
|
folded = !1;
|
|
2838
|
-
},
|
|
2838
|
+
}, Ie = /* @__PURE__ */ Symbol("INVALID");
|
|
2839
2839
|
function Co(e) {
|
|
2840
2840
|
const t = new Set([
|
|
2841
2841
|
e.defaultScalarTag,
|
|
@@ -2871,25 +2871,25 @@ function To(e, t) {
|
|
|
2871
2871
|
}
|
|
2872
2872
|
return null;
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function Ye(e, t) {
|
|
2875
2875
|
if (!e.noRefs && t !== null && typeof t == "object") {
|
|
2876
2876
|
const c = e.refs.get(t);
|
|
2877
2877
|
if (c)
|
|
2878
2878
|
return c.anchor === void 0 && (c.anchor = `ref_${e.refCounter++}`), {
|
|
2879
2879
|
kind: "alias",
|
|
2880
2880
|
tag: "",
|
|
2881
|
-
style: new
|
|
2881
|
+
style: new tt(),
|
|
2882
2882
|
anchor: c.anchor
|
|
2883
2883
|
};
|
|
2884
2884
|
}
|
|
2885
2885
|
const n = To(e, t);
|
|
2886
2886
|
if (!n) {
|
|
2887
|
-
if (t === void 0 || e.skipInvalid) return
|
|
2888
|
-
throw new
|
|
2887
|
+
if (t === void 0 || e.skipInvalid) return Ie;
|
|
2888
|
+
throw new yt(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`);
|
|
2889
2889
|
}
|
|
2890
2890
|
const { tag: r, tagName: i, implicitTag: o } = n, a = o ? i : Vn(i);
|
|
2891
2891
|
if (r.nodeKind === "scalar") {
|
|
2892
|
-
const c = new
|
|
2892
|
+
const c = new tt();
|
|
2893
2893
|
return c.tagged = !o, {
|
|
2894
2894
|
kind: "scalar",
|
|
2895
2895
|
tag: a,
|
|
@@ -2898,7 +2898,7 @@ function We(e, t) {
|
|
|
2898
2898
|
};
|
|
2899
2899
|
}
|
|
2900
2900
|
if (r.nodeKind === "sequence") {
|
|
2901
|
-
const c = r.represent(t), S = new
|
|
2901
|
+
const c = r.represent(t), S = new tt();
|
|
2902
2902
|
S.tagged = !o;
|
|
2903
2903
|
const m = {
|
|
2904
2904
|
kind: "sequence",
|
|
@@ -2908,12 +2908,12 @@ function We(e, t) {
|
|
|
2908
2908
|
};
|
|
2909
2909
|
e.noRefs || e.refs.set(t, m);
|
|
2910
2910
|
for (let C = 0, E = c.length; C < E; C += 1) {
|
|
2911
|
-
let
|
|
2912
|
-
|
|
2911
|
+
let w = Ye(e, c[C]);
|
|
2912
|
+
w === Ie && c[C] === void 0 && (w = Ye(e, null)), w !== Ie && m.items.push(w);
|
|
2913
2913
|
}
|
|
2914
2914
|
return m;
|
|
2915
2915
|
}
|
|
2916
|
-
const s = r.represent(t), l = new
|
|
2916
|
+
const s = r.represent(t), l = new tt();
|
|
2917
2917
|
l.tagged = !o;
|
|
2918
2918
|
const u = {
|
|
2919
2919
|
kind: "mapping",
|
|
@@ -2923,18 +2923,18 @@ function We(e, t) {
|
|
|
2923
2923
|
};
|
|
2924
2924
|
e.noRefs || e.refs.set(t, u);
|
|
2925
2925
|
for (const [c, S] of s) {
|
|
2926
|
-
const m =
|
|
2927
|
-
if (m ===
|
|
2928
|
-
const C =
|
|
2929
|
-
C !==
|
|
2926
|
+
const m = Ye(e, c);
|
|
2927
|
+
if (m === Ie) continue;
|
|
2928
|
+
const C = Ye(e, S);
|
|
2929
|
+
C !== Ie && u.items.push({
|
|
2930
2930
|
key: m,
|
|
2931
2931
|
value: C
|
|
2932
2932
|
});
|
|
2933
2933
|
}
|
|
2934
2934
|
return u;
|
|
2935
2935
|
}
|
|
2936
|
-
function
|
|
2937
|
-
const r =
|
|
2936
|
+
function bo(e, t, n = {}) {
|
|
2937
|
+
const r = Ye({
|
|
2938
2938
|
representTypes: Co(t),
|
|
2939
2939
|
noRefs: n.noRefs ?? !1,
|
|
2940
2940
|
skipInvalid: n.skipInvalid ?? !1,
|
|
@@ -2942,14 +2942,14 @@ function vo(e, t, n = {}) {
|
|
|
2942
2942
|
refCounter: 0
|
|
2943
2943
|
}, e);
|
|
2944
2944
|
return [{
|
|
2945
|
-
contents: r ===
|
|
2945
|
+
contents: r === Ie ? null : r,
|
|
2946
2946
|
directives: []
|
|
2947
2947
|
}];
|
|
2948
2948
|
}
|
|
2949
|
-
var
|
|
2949
|
+
var vo = /* @__PURE__ */ Symbol("visit:break"), rr = /* @__PURE__ */ Symbol("visit:skip");
|
|
2950
2950
|
function lt(e, t, n) {
|
|
2951
2951
|
const r = t(e, n);
|
|
2952
|
-
if (r ===
|
|
2952
|
+
if (r === vo) return !0;
|
|
2953
2953
|
if (r === rr) return !1;
|
|
2954
2954
|
const i = n.depth + 1;
|
|
2955
2955
|
switch (e.kind) {
|
|
@@ -2982,7 +2982,7 @@ function Ro(e, t) {
|
|
|
2982
2982
|
isKey: !1
|
|
2983
2983
|
})) return;
|
|
2984
2984
|
}
|
|
2985
|
-
var rn = 65279,
|
|
2985
|
+
var rn = 65279, xo = 9, Pe = 10, ir = 13, _o = 32, wo = 33, or = 34, Ut = 35, Io = 37, No = 38, ar = 39, $o = 42, Kt = 44, on = 45, Xe = 58, ko = 61, Lo = 62, sr = 63, Oo = 64, qt = 91, Gt = 93, Po = 96, Yt = 123, Fo = 124, Wt = 125, te = {};
|
|
2986
2986
|
te[0] = "\\0";
|
|
2987
2987
|
te[7] = "\\a";
|
|
2988
2988
|
te[8] = "\\b";
|
|
@@ -3030,7 +3030,7 @@ function Bo(e) {
|
|
|
3030
3030
|
const t = e.toString(16).toUpperCase(), n = e <= 255 ? "x" : "u", r = e <= 255 ? 2 : 4;
|
|
3031
3031
|
return `\\${n}${"0".repeat(r - t.length)}${t}`;
|
|
3032
3032
|
}
|
|
3033
|
-
function
|
|
3033
|
+
function _n(e, t) {
|
|
3034
3034
|
const n = " ".repeat(t);
|
|
3035
3035
|
let r = 0, i = "";
|
|
3036
3036
|
const o = e.length;
|
|
@@ -3043,7 +3043,7 @@ function xn(e, t) {
|
|
|
3043
3043
|
}
|
|
3044
3044
|
return i;
|
|
3045
3045
|
}
|
|
3046
|
-
function
|
|
3046
|
+
function jt(e, t) {
|
|
3047
3047
|
return `
|
|
3048
3048
|
${" ".repeat(e.indent * t)}`;
|
|
3049
3049
|
}
|
|
@@ -3055,7 +3055,7 @@ function Do(e, t) {
|
|
|
3055
3055
|
lineWidth: e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - n)
|
|
3056
3056
|
};
|
|
3057
3057
|
}
|
|
3058
|
-
function
|
|
3058
|
+
function wn(e, t) {
|
|
3059
3059
|
for (let n = 0, r = e.implicitResolvers.length; n < r; n += 1) {
|
|
3060
3060
|
const i = e.implicitResolvers[n];
|
|
3061
3061
|
if (i.resolve(t, !1, i.tagName) !== H) return i.tagName;
|
|
@@ -3063,39 +3063,39 @@ function In(e, t) {
|
|
|
3063
3063
|
return e.defaultScalarTagName;
|
|
3064
3064
|
}
|
|
3065
3065
|
function Ke(e) {
|
|
3066
|
-
return e ===
|
|
3066
|
+
return e === _o || e === xo;
|
|
3067
3067
|
}
|
|
3068
3068
|
function Uo(e) {
|
|
3069
3069
|
const t = e.charCodeAt(0);
|
|
3070
3070
|
if (t !== on && t !== 46 || e.charCodeAt(1) !== t || e.charCodeAt(2) !== t) return !1;
|
|
3071
3071
|
if (e.length === 3) return !0;
|
|
3072
3072
|
const n = e.charCodeAt(3);
|
|
3073
|
-
return Ke(n) || n === ir || n ===
|
|
3073
|
+
return Ke(n) || n === ir || n === Pe;
|
|
3074
3074
|
}
|
|
3075
|
-
function
|
|
3075
|
+
function ze(e) {
|
|
3076
3076
|
return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !== rn || e >= 65536 && e <= 1114111;
|
|
3077
3077
|
}
|
|
3078
|
-
function
|
|
3079
|
-
return
|
|
3078
|
+
function In(e) {
|
|
3079
|
+
return ze(e) && e !== rn && e !== ir && e !== Pe;
|
|
3080
3080
|
}
|
|
3081
|
-
function
|
|
3082
|
-
const r =
|
|
3083
|
-
return (n ? r : r && e !==
|
|
3081
|
+
function Vt(e, t, n) {
|
|
3082
|
+
const r = In(e), i = r && !Ke(e);
|
|
3083
|
+
return (n ? r : r && e !== Kt && e !== qt && e !== Gt && e !== Yt && e !== Wt) && e !== Ut && !(t === Xe && !i) || In(t) && !Ke(t) && e === Ut || t === Xe && i && (n || e !== Kt && e !== qt && e !== Gt && e !== Yt && e !== Wt);
|
|
3084
3084
|
}
|
|
3085
3085
|
function Ko(e) {
|
|
3086
|
-
return
|
|
3086
|
+
return ze(e) && e !== rn && !Ke(e) && e !== on && e !== sr && e !== Xe && e !== Kt && e !== qt && e !== Gt && e !== Yt && e !== Wt && e !== Ut && e !== No && e !== $o && e !== wo && e !== Fo && e !== ko && e !== Lo && e !== ar && e !== or && e !== Io && e !== Oo && e !== Po;
|
|
3087
3087
|
}
|
|
3088
3088
|
function qo(e, t) {
|
|
3089
3089
|
const n = De(e, 0);
|
|
3090
3090
|
if (Ko(n)) return !0;
|
|
3091
|
-
if (e.length > 1 && (n === on || n === sr || n ===
|
|
3091
|
+
if (e.length > 1 && (n === on || n === sr || n === Xe)) {
|
|
3092
3092
|
const r = De(e, 1);
|
|
3093
|
-
return !Ke(r) &&
|
|
3093
|
+
return !Ke(r) && Vt(r, n, t);
|
|
3094
3094
|
}
|
|
3095
3095
|
return !1;
|
|
3096
3096
|
}
|
|
3097
3097
|
function Go(e) {
|
|
3098
|
-
return !Ke(e) && e !==
|
|
3098
|
+
return !Ke(e) && e !== Xe;
|
|
3099
3099
|
}
|
|
3100
3100
|
function De(e, t) {
|
|
3101
3101
|
const n = e.charCodeAt(t);
|
|
@@ -3105,55 +3105,55 @@ function De(e, t) {
|
|
|
3105
3105
|
function lr(e) {
|
|
3106
3106
|
return /^\n* /.test(e);
|
|
3107
3107
|
}
|
|
3108
|
-
var
|
|
3108
|
+
var Qe = 1, je = 2, sn = 3, ln = 4, xe = 5;
|
|
3109
3109
|
function Yo(e, t, n, r, i, o) {
|
|
3110
3110
|
const { blockIndent: a, lineWidth: s } = n;
|
|
3111
3111
|
let l, u = 0, c = -1, S = !1, m = !1;
|
|
3112
3112
|
const C = s !== -1;
|
|
3113
|
-
let E = -1,
|
|
3113
|
+
let E = -1, w = !Uo(t) && qo(t, o) && Go(De(t, t.length - 1));
|
|
3114
3114
|
if (r || i) for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3115
|
-
if (u = De(t, l), !
|
|
3116
|
-
|
|
3115
|
+
if (u = De(t, l), !ze(u)) return xe;
|
|
3116
|
+
w = w && Vt(u, c, o), c = u;
|
|
3117
3117
|
}
|
|
3118
3118
|
else {
|
|
3119
3119
|
for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
|
|
3120
|
-
if (u = De(t, l), u ===
|
|
3121
|
-
S = !0, C && (m = m || l - E - 1 > s && !
|
|
3122
|
-
else if (!
|
|
3123
|
-
|
|
3120
|
+
if (u = De(t, l), u === Pe)
|
|
3121
|
+
S = !0, C && (m = m || l - E - 1 > s && !Ze(t[E + 1]), E = l);
|
|
3122
|
+
else if (!ze(u)) return xe;
|
|
3123
|
+
w = w && Vt(u, c, o), c = u;
|
|
3124
3124
|
}
|
|
3125
|
-
m = m || C && l - E - 1 > s && !
|
|
3125
|
+
m = m || C && l - E - 1 > s && !Ze(t[E + 1]);
|
|
3126
3126
|
}
|
|
3127
|
-
return !S && !m ?
|
|
3127
|
+
return !S && !m ? w && !i ? Qe : e.quoteStyle === "double" ? xe : je : a > 9 && lr(t) ? xe : m ? ln : sn;
|
|
3128
3128
|
}
|
|
3129
3129
|
function Wo(e, t, n) {
|
|
3130
3130
|
const { indent: r, blockIndent: i, lineWidth: o } = n;
|
|
3131
3131
|
switch (t) {
|
|
3132
|
-
case
|
|
3132
|
+
case Qe:
|
|
3133
3133
|
return $n(e, r);
|
|
3134
|
-
case
|
|
3134
|
+
case je:
|
|
3135
3135
|
return `'${$n(e, r).replace(/'/g, "''")}'`;
|
|
3136
3136
|
case sn:
|
|
3137
|
-
return "|" + Nn(e, i) + kn(
|
|
3137
|
+
return "|" + Nn(e, i) + kn(_n(e, r));
|
|
3138
3138
|
case ln:
|
|
3139
|
-
return ">" + Nn(e, i) + kn(
|
|
3140
|
-
case
|
|
3139
|
+
return ">" + Nn(e, i) + kn(_n(Vo(e, o), r));
|
|
3140
|
+
case xe:
|
|
3141
3141
|
return `"${Xo(e)}"`;
|
|
3142
3142
|
}
|
|
3143
3143
|
}
|
|
3144
3144
|
function jo(e, t, n, r, i) {
|
|
3145
3145
|
const o = r || !i;
|
|
3146
|
-
if (t.style.singleQuoted) return
|
|
3147
|
-
if (t.style.doubleQuoted) return
|
|
3146
|
+
if (t.style.singleQuoted) return je;
|
|
3147
|
+
if (t.style.doubleQuoted) return xe;
|
|
3148
3148
|
if (!o) {
|
|
3149
3149
|
if (t.style.literal) return sn;
|
|
3150
3150
|
if (t.style.folded) return ln;
|
|
3151
3151
|
}
|
|
3152
3152
|
const a = t.value;
|
|
3153
3153
|
if (a.length === 0)
|
|
3154
|
-
return t.style.tagged ||
|
|
3154
|
+
return t.style.tagged || wn(e, a) === t.tag ? Qe : e.quoteStyle === "double" ? xe : je;
|
|
3155
3155
|
const s = Yo(e, a, n, o, e.forceQuotes && !r, i);
|
|
3156
|
-
return s ===
|
|
3156
|
+
return s === Qe && !t.style.tagged && wn(e, a) !== t.tag ? e.quoteStyle === "double" ? xe : je : s;
|
|
3157
3157
|
}
|
|
3158
3158
|
function Nn(e, t) {
|
|
3159
3159
|
const n = lr(e) ? String(t) : "", r = e[e.length - 1] === `
|
|
@@ -3183,7 +3183,7 @@ function kn(e) {
|
|
|
3183
3183
|
return e[e.length - 1] === `
|
|
3184
3184
|
` ? e.slice(0, -1) : e;
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3186
|
+
function Ze(e) {
|
|
3187
3187
|
return e === " " || e === " ";
|
|
3188
3188
|
}
|
|
3189
3189
|
function Vo(e, t) {
|
|
@@ -3192,16 +3192,16 @@ function Vo(e, t) {
|
|
|
3192
3192
|
`);
|
|
3193
3193
|
r === -1 && (r = e.length), n.lastIndex = r;
|
|
3194
3194
|
let i = Ln(e.slice(0, r), t), o = e[0] === `
|
|
3195
|
-
` ||
|
|
3195
|
+
` || Ze(e[0]), a, s;
|
|
3196
3196
|
for (; s = n.exec(e); ) {
|
|
3197
3197
|
const l = s[1], u = s[2];
|
|
3198
|
-
a = u !== "" &&
|
|
3198
|
+
a = u !== "" && Ze(u[0]), i += l + (!o && !a && u !== "" ? `
|
|
3199
3199
|
` : "") + Ln(u, t), o = a;
|
|
3200
3200
|
}
|
|
3201
3201
|
return i;
|
|
3202
3202
|
}
|
|
3203
3203
|
function Ln(e, t) {
|
|
3204
|
-
if (e === "" ||
|
|
3204
|
+
if (e === "" || Ze(e[0])) return e;
|
|
3205
3205
|
const n = / [^ \t]/g;
|
|
3206
3206
|
let r, i = 0, o, a = 0, s = 0, l = "";
|
|
3207
3207
|
for (; r = n.exec(e); )
|
|
@@ -3220,7 +3220,7 @@ function Xo(e) {
|
|
|
3220
3220
|
t += i;
|
|
3221
3221
|
continue;
|
|
3222
3222
|
}
|
|
3223
|
-
if (
|
|
3223
|
+
if (ze(n)) {
|
|
3224
3224
|
t += e[r], n >= 65536 && (t += e[r + 1]);
|
|
3225
3225
|
continue;
|
|
3226
3226
|
}
|
|
@@ -3245,7 +3245,7 @@ function On(e, t, n, r) {
|
|
|
3245
3245
|
compact: e.seqInlineFirst,
|
|
3246
3246
|
isblockseq: !0
|
|
3247
3247
|
});
|
|
3248
|
-
(!r || i !== "") && (i +=
|
|
3248
|
+
(!r || i !== "") && (i += jt(e, t)), s === "" || Pe === s.charCodeAt(0) ? i += "-" : i += "- ", i += s;
|
|
3249
3249
|
}
|
|
3250
3250
|
return i;
|
|
3251
3251
|
}
|
|
@@ -3263,19 +3263,19 @@ function Qo(e, t, n) {
|
|
|
3263
3263
|
const o = e.flowBracketPadding && r !== "" ? " " : "";
|
|
3264
3264
|
return `{${o}${r}${o}}`;
|
|
3265
3265
|
}
|
|
3266
|
-
function
|
|
3266
|
+
function nt(e) {
|
|
3267
3267
|
return e.kind === "scalar" ? e.value : e;
|
|
3268
3268
|
}
|
|
3269
3269
|
function cr(e, t) {
|
|
3270
3270
|
if (!e.sortKeys) return t;
|
|
3271
3271
|
const n = t.slice();
|
|
3272
3272
|
if (e.sortKeys === !0) n.sort((r, i) => {
|
|
3273
|
-
const o =
|
|
3273
|
+
const o = nt(r.key), a = nt(i.key);
|
|
3274
3274
|
return o < a ? -1 : o > a ? 1 : 0;
|
|
3275
3275
|
});
|
|
3276
3276
|
else {
|
|
3277
3277
|
const r = e.sortKeys;
|
|
3278
|
-
n.sort((i, o) => r(
|
|
3278
|
+
n.sort((i, o) => r(nt(i.key), nt(o.key)));
|
|
3279
3279
|
}
|
|
3280
3280
|
return n;
|
|
3281
3281
|
}
|
|
@@ -3284,28 +3284,28 @@ function Zo(e, t, n, r) {
|
|
|
3284
3284
|
const o = cr(e, n.items);
|
|
3285
3285
|
for (let a = 0, s = o.length; a < s; a += 1) {
|
|
3286
3286
|
let l = "";
|
|
3287
|
-
(!r || i !== "") && (l +=
|
|
3287
|
+
(!r || i !== "") && (l += jt(e, t));
|
|
3288
3288
|
const { key: u, value: c } = o[a], S = (u.kind === "mapping" || u.kind === "sequence") && !u.style.flow && u.items.length !== 0 || u.kind === "scalar" && (u.style.literal || u.style.folded), m = S ? Ce(e, t + 1, u, {
|
|
3289
3289
|
block: !0,
|
|
3290
3290
|
compact: !0,
|
|
3291
|
-
isblockseq: !
|
|
3291
|
+
isblockseq: !Xt(e, u, t + 1)
|
|
3292
3292
|
}) : Ce(e, t + 1, u, {
|
|
3293
3293
|
block: !0,
|
|
3294
3294
|
compact: !0,
|
|
3295
3295
|
iskey: !0
|
|
3296
3296
|
}), C = u.kind === "scalar" && u.value.indexOf(`
|
|
3297
3297
|
`) !== -1, E = S || C || m.length > 1024;
|
|
3298
|
-
E && (m &&
|
|
3299
|
-
const
|
|
3298
|
+
E && (m && Pe === m.charCodeAt(0) ? l += "?" : l += "? "), l += m, E && (l += jt(e, t));
|
|
3299
|
+
const w = Ce(e, t + 1, c, {
|
|
3300
3300
|
block: !0,
|
|
3301
3301
|
compact: E,
|
|
3302
|
-
isblockseq: E && !
|
|
3302
|
+
isblockseq: E && !Xt(e, c, t + 1)
|
|
3303
3303
|
}), M = u.kind === "scalar" && u.value === "" && m !== "" && m.charCodeAt(m.length - 1) !== ar && m.charCodeAt(m.length - 1) !== or, N = !E && (u.kind === "alias" || M) ? " " : "";
|
|
3304
|
-
|
|
3304
|
+
w === "" || Pe === w.charCodeAt(0) ? l += `${N}:` : l += `${N}: `, l += w, i += l;
|
|
3305
3305
|
}
|
|
3306
3306
|
return i;
|
|
3307
3307
|
}
|
|
3308
|
-
function
|
|
3308
|
+
function Xt(e, t, n) {
|
|
3309
3309
|
return t.style.tagged || t.anchor !== void 0 || e.indent < 2 && n > 0;
|
|
3310
3310
|
}
|
|
3311
3311
|
function Ce(e, t, n, r) {
|
|
@@ -3313,20 +3313,20 @@ function Ce(e, t, n, r) {
|
|
|
3313
3313
|
const { block: i = !1, iskey: o = !1, isblockseq: a = !1 } = r;
|
|
3314
3314
|
let s = r.compact ?? !1;
|
|
3315
3315
|
const l = n.anchor !== void 0;
|
|
3316
|
-
|
|
3316
|
+
Xt(e, n, t) && (s = !1);
|
|
3317
3317
|
let u, c = n.style.tagged;
|
|
3318
3318
|
const S = i && (n.kind === "mapping" || n.kind === "sequence") && !n.style.flow && n.items.length !== 0;
|
|
3319
3319
|
if (n.kind === "mapping") S ? u = Zo(e, t, n, s) : u = Qo(e, t, n);
|
|
3320
3320
|
else if (n.kind === "sequence") S ? e.seqNoIndent && !a && t > 0 ? u = On(e, t - 1, n, s) : u = On(e, t, n, s) : u = zo(e, t, n);
|
|
3321
3321
|
else {
|
|
3322
3322
|
const m = Do(e, t), C = jo(e, n, m, o, i);
|
|
3323
|
-
u = Wo(n.value, C, m), c = n.style.tagged || C !==
|
|
3323
|
+
u = Wo(n.value, C, m), c = n.style.tagged || C !== Qe && n.tag !== e.defaultScalarTagName;
|
|
3324
3324
|
}
|
|
3325
3325
|
if (S && s && t > 0 && e.indent > 2 && (u = `${" ".repeat(e.indent - 2)}${u}`), c || l) {
|
|
3326
3326
|
const m = [], C = c ? Ho(n) : null, E = l ? `&${n.anchor}` : null;
|
|
3327
3327
|
e.tagBeforeAnchor ? (C !== null && m.push(C), E !== null && m.push(E)) : (E !== null && m.push(E), C !== null && m.push(C));
|
|
3328
|
-
const
|
|
3329
|
-
u = `${m.join(" ")}${
|
|
3328
|
+
const w = u === "" || u.charCodeAt(0) === Pe ? "" : " ";
|
|
3329
|
+
u = `${m.join(" ")}${w}${u}`;
|
|
3330
3330
|
}
|
|
3331
3331
|
return u;
|
|
3332
3332
|
}
|
|
@@ -3384,15 +3384,15 @@ function na(e, t) {
|
|
|
3384
3384
|
return r;
|
|
3385
3385
|
}
|
|
3386
3386
|
var ra = Ni.withTags({
|
|
3387
|
-
...
|
|
3387
|
+
...Ot,
|
|
3388
3388
|
resolve: (e, t, n) => {
|
|
3389
|
-
const r =
|
|
3389
|
+
const r = Ot.resolve(e, t, n);
|
|
3390
3390
|
return r === H ? Fn.resolve(e, t, n) : r;
|
|
3391
3391
|
}
|
|
3392
3392
|
}, {
|
|
3393
|
-
...
|
|
3393
|
+
...Pt,
|
|
3394
3394
|
resolve: (e, t, n) => {
|
|
3395
|
-
const r =
|
|
3395
|
+
const r = Pt.resolve(e, t, n);
|
|
3396
3396
|
return r === H ? Hn.resolve(e, t, n) : r;
|
|
3397
3397
|
}
|
|
3398
3398
|
}), ia = {
|
|
@@ -3408,7 +3408,7 @@ function oa(e, t = {}) {
|
|
|
3408
3408
|
const n = {
|
|
3409
3409
|
...ia,
|
|
3410
3410
|
...t
|
|
3411
|
-
}, r =
|
|
3411
|
+
}, r = bo(e, n.schema, {
|
|
3412
3412
|
noRefs: n.noRefs,
|
|
3413
3413
|
skipInvalid: n.skipInvalid
|
|
3414
3414
|
});
|
|
@@ -3416,7 +3416,7 @@ function oa(e, t = {}) {
|
|
|
3416
3416
|
if (!(o.depth < n.flowLevel))
|
|
3417
3417
|
return i.style.flow = !0, rr;
|
|
3418
3418
|
}), n.transform(r), na(r, {
|
|
3419
|
-
...
|
|
3419
|
+
...Ft(n, Object.keys(an)),
|
|
3420
3420
|
schema: n.schema
|
|
3421
3421
|
});
|
|
3422
3422
|
}
|
|
@@ -3425,34 +3425,33 @@ const aa = Gn.withTags(Mn, Bn, Dn, Un, Kn), ur = (e, t) => {
|
|
|
3425
3425
|
if (n.length === 0)
|
|
3426
3426
|
return e.trim() === "" ? void 0 : null;
|
|
3427
3427
|
if (n.length > 1)
|
|
3428
|
-
throw new
|
|
3428
|
+
throw new yt("expected a single document in the stream, but found more");
|
|
3429
3429
|
return n[0];
|
|
3430
|
-
},
|
|
3431
|
-
|
|
3432
|
-
return e.hasOwnProperty(t) ? e[t] : void 0;
|
|
3433
|
-
}
|
|
3434
|
-
const la = /\((\d+):(\d+)\)$/;
|
|
3435
|
-
class St extends Error {
|
|
3430
|
+
}, va = (e, t) => oa(e, t), sa = /\((\d+):(\d+)\)$/;
|
|
3431
|
+
class Et extends Error {
|
|
3436
3432
|
originalError;
|
|
3437
3433
|
source;
|
|
3438
3434
|
col;
|
|
3439
3435
|
line;
|
|
3440
3436
|
constructor(t, n) {
|
|
3441
3437
|
super(t.message.split(`
|
|
3442
|
-
`)[0]), this.originalError = t, this.source = n, Object.setPrototypeOf(this,
|
|
3443
|
-
const [, r, i] = this.message.match(
|
|
3438
|
+
`)[0]), this.originalError = t, this.source = n, Object.setPrototypeOf(this, Et.prototype);
|
|
3439
|
+
const [, r, i] = this.message.match(sa) || [];
|
|
3444
3440
|
this.line = parseInt(r, 10), this.col = parseInt(i, 10);
|
|
3445
3441
|
}
|
|
3446
3442
|
}
|
|
3447
|
-
|
|
3448
|
-
return e.endsWith(".yaml") || e.endsWith(".yml") || e.endsWith(".json");
|
|
3449
|
-
}
|
|
3450
|
-
const ua = [".graphql", ".gql"];
|
|
3443
|
+
const la = [".graphql", ".gql"];
|
|
3451
3444
|
function fr(e) {
|
|
3452
3445
|
const t = e.toLowerCase();
|
|
3453
|
-
return
|
|
3446
|
+
return la.some((n) => t.endsWith(n));
|
|
3447
|
+
}
|
|
3448
|
+
function ca(e, t) {
|
|
3449
|
+
return e.hasOwnProperty(t) ? e[t] : void 0;
|
|
3450
|
+
}
|
|
3451
|
+
function ua(e) {
|
|
3452
|
+
return e.endsWith(".yaml") || e.endsWith(".yml") || e.endsWith(".json");
|
|
3454
3453
|
}
|
|
3455
|
-
function
|
|
3454
|
+
function Lt(e, t) {
|
|
3456
3455
|
return e + "::" + t;
|
|
3457
3456
|
}
|
|
3458
3457
|
function fa() {
|
|
@@ -3460,7 +3459,7 @@ function fa() {
|
|
|
3460
3459
|
setTimeout(e);
|
|
3461
3460
|
});
|
|
3462
3461
|
}
|
|
3463
|
-
class
|
|
3462
|
+
class zt {
|
|
3464
3463
|
absoluteRef;
|
|
3465
3464
|
body;
|
|
3466
3465
|
mimeType;
|
|
@@ -3485,7 +3484,7 @@ class cn extends Error {
|
|
|
3485
3484
|
}
|
|
3486
3485
|
}
|
|
3487
3486
|
function Ra(e, t) {
|
|
3488
|
-
const n = new
|
|
3487
|
+
const n = new zt(t, e);
|
|
3489
3488
|
if (fr(t))
|
|
3490
3489
|
return { source: n, parsed: e };
|
|
3491
3490
|
try {
|
|
@@ -3494,10 +3493,10 @@ function Ra(e, t) {
|
|
|
3494
3493
|
parsed: ur(e, { filename: t })
|
|
3495
3494
|
};
|
|
3496
3495
|
} catch (r) {
|
|
3497
|
-
throw new
|
|
3496
|
+
throw new Et(r, n);
|
|
3498
3497
|
}
|
|
3499
3498
|
}
|
|
3500
|
-
class
|
|
3499
|
+
class xa {
|
|
3501
3500
|
config;
|
|
3502
3501
|
cache = /* @__PURE__ */ new Map();
|
|
3503
3502
|
constructor(t = { http: { headers: [] } }) {
|
|
@@ -3507,18 +3506,18 @@ class _a {
|
|
|
3507
3506
|
return new Set(Array.from(this.cache.keys()));
|
|
3508
3507
|
}
|
|
3509
3508
|
resolveExternalRef(t, n) {
|
|
3510
|
-
return
|
|
3509
|
+
return Ne(n) ? n : t && Ne(t) ? new URL(n, t).href : Ve.resolve(t ? Ve.dirname(t) : process.cwd(), n);
|
|
3511
3510
|
}
|
|
3512
3511
|
async loadExternalRef(t) {
|
|
3513
3512
|
try {
|
|
3514
|
-
if (
|
|
3515
|
-
const { body: n, mimeType: r } = await
|
|
3516
|
-
return new
|
|
3513
|
+
if (Ne(t)) {
|
|
3514
|
+
const { body: n, mimeType: r } = await vr(t, this.config.http);
|
|
3515
|
+
return new zt(t, n, r);
|
|
3517
3516
|
} else {
|
|
3518
3517
|
if ((void 0)(t).isDirectory())
|
|
3519
3518
|
throw new Error(`Expected a file but received a folder at ${t}.`);
|
|
3520
3519
|
const n = await (void 0).readFile(t, "utf-8");
|
|
3521
|
-
return new
|
|
3520
|
+
return new zt(t, n.replace(/\r\n/g, `
|
|
3522
3521
|
`));
|
|
3523
3522
|
}
|
|
3524
3523
|
} catch (n) {
|
|
@@ -3528,15 +3527,16 @@ class _a {
|
|
|
3528
3527
|
parseDocument(t, n = !1) {
|
|
3529
3528
|
if (fr(t.absoluteRef))
|
|
3530
3529
|
return { source: t, parsed: t.body };
|
|
3531
|
-
|
|
3530
|
+
const r = Ne(t.absoluteRef) ? new URL(t.absoluteRef).pathname : t.absoluteRef;
|
|
3531
|
+
if (!ua(r) && !t.mimeType?.match(/(json|yaml|openapi)/) && !n)
|
|
3532
3532
|
return { source: t, parsed: t.body };
|
|
3533
3533
|
try {
|
|
3534
3534
|
return {
|
|
3535
3535
|
source: t,
|
|
3536
3536
|
parsed: ur(t.body, { filename: t.absoluteRef })
|
|
3537
3537
|
};
|
|
3538
|
-
} catch (
|
|
3539
|
-
throw new
|
|
3538
|
+
} catch (i) {
|
|
3539
|
+
throw new Et(i, t);
|
|
3540
3540
|
}
|
|
3541
3541
|
}
|
|
3542
3542
|
async resolveDocument(t, n, r = !1) {
|
|
@@ -3561,8 +3561,8 @@ function pa(e, t) {
|
|
|
3561
3561
|
}
|
|
3562
3562
|
return !1;
|
|
3563
3563
|
}
|
|
3564
|
-
const
|
|
3565
|
-
async function
|
|
3564
|
+
const rt = { name: "unknown", properties: {} }, da = { name: "scalar", properties: {} };
|
|
3565
|
+
async function _a(e) {
|
|
3566
3566
|
const { rootDocument: t, externalRefResolver: n, rootType: r } = e, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), a = [];
|
|
3567
3567
|
l(t.parsed, t, "#/", r);
|
|
3568
3568
|
let s;
|
|
@@ -3572,35 +3572,36 @@ async function xa(e) {
|
|
|
3572
3572
|
return i;
|
|
3573
3573
|
function l(u, c, S, m) {
|
|
3574
3574
|
const C = c.source.absoluteRef, E = /* @__PURE__ */ new Map();
|
|
3575
|
-
|
|
3576
|
-
function
|
|
3575
|
+
w(u, m, C + S);
|
|
3576
|
+
function w(N, k, y) {
|
|
3577
3577
|
if (!Re(N) && !Array.isArray(N))
|
|
3578
3578
|
return;
|
|
3579
3579
|
const R = `${k.name}::${y}`;
|
|
3580
3580
|
if (o.has(R))
|
|
3581
3581
|
return;
|
|
3582
3582
|
if (o.add(R), Array.isArray(N)) {
|
|
3583
|
-
const
|
|
3584
|
-
if (
|
|
3583
|
+
const v = k.items;
|
|
3584
|
+
if (v === void 0 && k !== rt && k !== it)
|
|
3585
3585
|
return;
|
|
3586
|
-
const A = typeof
|
|
3586
|
+
const A = typeof v == "function";
|
|
3587
3587
|
for (let g = 0; g < N.length; g++) {
|
|
3588
|
-
let x = A ?
|
|
3589
|
-
if (x === void 0 && k !==
|
|
3588
|
+
let x = A ? v(N[g], ve(y, g)) : v;
|
|
3589
|
+
if (x === void 0 && k !== rt && k !== it)
|
|
3590
3590
|
continue;
|
|
3591
3591
|
const W = x?.directResolveAs ? { $ref: N[g] } : N[g];
|
|
3592
|
-
x = x?.directResolveAs || x,
|
|
3592
|
+
x = x?.directResolveAs || x, w(W, ot(x) ? x : rt, ve(y, g));
|
|
3593
3593
|
}
|
|
3594
3594
|
return;
|
|
3595
3595
|
}
|
|
3596
|
-
const [f,
|
|
3597
|
-
|
|
3598
|
-
for (const
|
|
3599
|
-
let A = N[
|
|
3600
|
-
|
|
3596
|
+
const [f, I] = Object.entries(N).find(([v]) => v === "$anchor") || [];
|
|
3597
|
+
I && E.set(`#${I}`, N);
|
|
3598
|
+
for (const v of Object.keys(N)) {
|
|
3599
|
+
let A = N[v], g = ca(k.properties, v);
|
|
3600
|
+
const x = k.extensionsPrefix !== void 0 && v.startsWith(k.extensionsPrefix);
|
|
3601
|
+
g === void 0 && !x && (g = k.additionalProperties), typeof g == "function" && (g = g(A, v)), x && g === void 0 && (g = it), g === void 0 && (g = rt), !ot(g) && g?.directResolveAs && (g = g.directResolveAs, A = { $ref: A }), g && g.name === void 0 && g.resolvable !== !1 && (g = da), !(!ot(g) || !(Re(A) || Array.isArray(A))) && w(A, g, ve(y, Fe(v)));
|
|
3601
3602
|
}
|
|
3602
3603
|
if (at(N)) {
|
|
3603
|
-
const
|
|
3604
|
+
const v = M(c, N, {
|
|
3604
3605
|
prev: null,
|
|
3605
3606
|
node: N
|
|
3606
3607
|
}).then((A) => {
|
|
@@ -3610,16 +3611,16 @@ async function xa(e) {
|
|
|
3610
3611
|
l(g.node, g.document, g.location.pointer, k);
|
|
3611
3612
|
}
|
|
3612
3613
|
});
|
|
3613
|
-
a.push(
|
|
3614
|
+
a.push(v);
|
|
3614
3615
|
}
|
|
3615
|
-
if (
|
|
3616
|
-
const
|
|
3616
|
+
if (_r(N)) {
|
|
3617
|
+
const v = M(c, { $ref: N.externalValue }, {
|
|
3617
3618
|
prev: null,
|
|
3618
3619
|
node: N
|
|
3619
3620
|
}).then((A) => {
|
|
3620
3621
|
A.resolved && l(A.node, A.document, A.nodePointer, k);
|
|
3621
3622
|
});
|
|
3622
|
-
a.push(
|
|
3623
|
+
a.push(v);
|
|
3623
3624
|
}
|
|
3624
3625
|
}
|
|
3625
3626
|
async function M(N, k, y) {
|
|
@@ -3633,40 +3634,40 @@ async function xa(e) {
|
|
|
3633
3634
|
node: E.get(k.$ref),
|
|
3634
3635
|
document: N,
|
|
3635
3636
|
nodePointer: k.$ref
|
|
3636
|
-
}, q =
|
|
3637
|
+
}, q = Lt(N.source.absoluteRef, k.$ref);
|
|
3637
3638
|
return i.set(q, L), L;
|
|
3638
3639
|
}
|
|
3639
|
-
const { uri: R, pointer: f } =
|
|
3640
|
-
let
|
|
3640
|
+
const { uri: R, pointer: f } = Ir(k.$ref), I = R !== null && n.resolveExternalRef(N.source.absoluteRef, R) !== N.source.absoluteRef;
|
|
3641
|
+
let v;
|
|
3641
3642
|
try {
|
|
3642
|
-
|
|
3643
|
+
v = I ? await n.resolveDocument(N.source.absoluteRef, R) : N;
|
|
3643
3644
|
} catch (L) {
|
|
3644
3645
|
const q = {
|
|
3645
3646
|
resolved: !1,
|
|
3646
|
-
isRemote:
|
|
3647
|
+
isRemote: I,
|
|
3647
3648
|
document: void 0,
|
|
3648
3649
|
error: L
|
|
3649
|
-
}, ce =
|
|
3650
|
+
}, ce = Lt(N.source.absoluteRef, k.$ref);
|
|
3650
3651
|
return i.set(ce, q), q;
|
|
3651
3652
|
}
|
|
3652
3653
|
let A = {
|
|
3653
3654
|
resolved: !0,
|
|
3654
|
-
document:
|
|
3655
|
-
isRemote:
|
|
3655
|
+
document: v,
|
|
3656
|
+
isRemote: I,
|
|
3656
3657
|
node: N.parsed,
|
|
3657
3658
|
nodePointer: "#/"
|
|
3658
|
-
}, g =
|
|
3659
|
+
}, g = v.parsed;
|
|
3659
3660
|
const x = f;
|
|
3660
3661
|
for (const L of x)
|
|
3661
3662
|
if (Re(g) && g[L] !== void 0)
|
|
3662
|
-
g = g[L], A.nodePointer =
|
|
3663
|
+
g = g[L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3663
3664
|
else if (Array.isArray(g) && g[+L] !== void 0)
|
|
3664
|
-
g = g[+L], A.nodePointer =
|
|
3665
|
+
g = g[+L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3665
3666
|
else if (at(g))
|
|
3666
|
-
if (A = await M(
|
|
3667
|
-
g = A.node[L], A.nodePointer =
|
|
3667
|
+
if (A = await M(v, g, Pn(y, g)), A.chain = void 0, v = A.document || v, Re(A.node))
|
|
3668
|
+
g = A.node[L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3668
3669
|
else if (Array.isArray(A.node))
|
|
3669
|
-
g = A.node[+L], A.nodePointer =
|
|
3670
|
+
g = A.node[+L], A.nodePointer = ve(A.nodePointer, Fe(L));
|
|
3670
3671
|
else {
|
|
3671
3672
|
g = void 0;
|
|
3672
3673
|
break;
|
|
@@ -3675,13 +3676,13 @@ async function xa(e) {
|
|
|
3675
3676
|
g = void 0;
|
|
3676
3677
|
break;
|
|
3677
3678
|
}
|
|
3678
|
-
A.node = g, A.document =
|
|
3679
|
-
const W =
|
|
3679
|
+
A.node = g, A.document = v;
|
|
3680
|
+
const W = Lt(N.source.absoluteRef, k.$ref);
|
|
3680
3681
|
if (A.document && at(g)) {
|
|
3681
|
-
const L =
|
|
3682
|
+
const L = xr(g) ? {
|
|
3682
3683
|
node: g,
|
|
3683
3684
|
document: A.document,
|
|
3684
|
-
location: new
|
|
3685
|
+
location: new ct(A.document.source, A.nodePointer)
|
|
3685
3686
|
} : void 0;
|
|
3686
3687
|
A = await M(A.document, g, Pn(y, g)), L && A.resolved && (A = { ...A, chain: [L, ...A.chain ?? []] });
|
|
3687
3688
|
}
|
|
@@ -3690,40 +3691,41 @@ async function xa(e) {
|
|
|
3690
3691
|
}
|
|
3691
3692
|
}
|
|
3692
3693
|
export {
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3694
|
+
Lt as A,
|
|
3695
|
+
xa as B,
|
|
3696
|
+
_r as C,
|
|
3697
|
+
ya as D,
|
|
3698
|
+
Sa as E,
|
|
3699
|
+
Nr as F,
|
|
3700
|
+
br as G,
|
|
3701
|
+
ct as L,
|
|
3700
3702
|
cn as R,
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3703
|
+
zt as S,
|
|
3704
|
+
Et as Y,
|
|
3705
|
+
_a as a,
|
|
3706
|
+
Ne as b,
|
|
3707
|
+
Tr as c,
|
|
3708
|
+
fr as d,
|
|
3709
|
+
Fe as e,
|
|
3710
|
+
Ta as f,
|
|
3709
3711
|
Ea as g,
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3712
|
+
ua as h,
|
|
3713
|
+
at as i,
|
|
3714
|
+
gr as j,
|
|
3713
3715
|
Ca as k,
|
|
3714
3716
|
ga as l,
|
|
3715
3717
|
Ra as m,
|
|
3716
3718
|
Aa as n,
|
|
3717
3719
|
ma as o,
|
|
3718
3720
|
ur as p,
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3721
|
+
ve as q,
|
|
3722
|
+
vr as r,
|
|
3723
|
+
va as s,
|
|
3724
|
+
Ir as t,
|
|
3725
|
+
wr as u,
|
|
3726
|
+
ca as v,
|
|
3727
|
+
it as w,
|
|
3728
|
+
ot as x,
|
|
3729
|
+
ba as y,
|
|
3730
|
+
xr as z
|
|
3729
3731
|
};
|