@redocly/replay 0.27.0-next.4 → 0.27.0-next.6

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.
Files changed (63) hide show
  1. package/dist/replay-AiChatProvider-D7E0a83D.js +1006 -0
  2. package/dist/replay-AiChatProvider-p9SioFWy.js +6 -0
  3. package/dist/replay-AiChatSqliteDBStorage-CKQJ5VZi.js +88 -0
  4. package/dist/replay-AiChatSqliteDBStorage-DgGB1XKW.js +1 -0
  5. package/dist/replay-AiPanel-BLkqnlmb.js +849 -0
  6. package/dist/replay-AiPanel-DvOGYsWl.js +2918 -0
  7. package/dist/replay-HistorySqliteDBStorage-BrILW8Fu.js +1 -0
  8. package/dist/replay-HistorySqliteDBStorage-CtF6-vY8.js +113 -0
  9. package/dist/replay-SqliteDBStorage-CNJbZXTw.js +14 -0
  10. package/dist/replay-SqliteDBStorage-D_31Bd3Z.js +2857 -0
  11. package/dist/replay-StepContextSqliteDBStorage-BSepLyBI.js +1 -0
  12. package/dist/replay-StepContextSqliteDBStorage-BfAAKDwA.js +83 -0
  13. package/dist/replay-agent-loop-DklepPbJ.js +1533 -0
  14. package/dist/replay-agent-loop-fKCHgyOD.js +1 -0
  15. package/dist/replay-ai-chat-mappers-D-vUBq2s.js +1 -0
  16. package/dist/replay-ai-chat-mappers-IWtvE0Nl.js +99 -0
  17. package/dist/replay-ai-message-parts.schema-BBdjwldJ.js +1 -0
  18. package/dist/replay-ai-message-parts.schema-E9u9-nqr.js +60 -0
  19. package/dist/replay-create-model-CfrWgdF7.js +38224 -0
  20. package/dist/replay-create-model-xGRAIhcu.js +104 -0
  21. package/dist/replay-db-BtdwaWh3.js +306 -0
  22. package/dist/replay-db-XlueEDU-.js +64 -0
  23. package/dist/replay-defaults-CzR6jw9a.js +32 -0
  24. package/dist/replay-defaults-DVvOnvnR.js +27 -0
  25. package/dist/replay-external-resolver-D6VSVDwt.js +34 -0
  26. package/dist/replay-external-resolver-Skh0OGde.js +2 -0
  27. package/dist/replay-history.schema-5ce6X0R1.js +28 -0
  28. package/dist/replay-history.schema-miM3Etuf.js +1 -0
  29. package/dist/replay-index-BEzVYZeb.js +504 -0
  30. package/dist/{replay-index-DCclzbQl.js → replay-index-BOB__Jm6.js} +1 -1
  31. package/dist/replay-index-C6SJPGDO.js +23 -0
  32. package/dist/{replay-index-D6LeDb4M.js → replay-index-CCvitTKt.js} +6 -6
  33. package/dist/replay-index-CUs62_1f.js +1 -0
  34. package/dist/replay-index-DXnDNeqk.js +93088 -0
  35. package/dist/replay-index-S_wAPmTA.js +6877 -0
  36. package/dist/replay-index-fVC8e5y9.js +1 -0
  37. package/dist/replay-indexes-CfsvVMi_.js +1242 -0
  38. package/dist/replay-indexes-Dqjl8m6C.js +1 -0
  39. package/dist/replay-lint-BCVeL_wb.js +184 -0
  40. package/dist/replay-lint-DjMIgYfF.js +33416 -0
  41. package/dist/{replay-lint-graphql-Cdmm_aJs.js → replay-lint-graphql-Bltv-T6_.js} +2 -2
  42. package/dist/{replay-lint-graphql-8tMA-ttz.js → replay-lint-graphql-bkrdHRy7.js} +5 -5
  43. package/dist/replay-resolve-BhcSceq-.js +3694 -0
  44. package/dist/replay-resolve-CQL6WBG1.js +47 -0
  45. package/dist/{replay-respect-run-DrWWHTWp.js → replay-respect-run-CecN1j9r.js} +1608 -1558
  46. package/dist/replay-respect-run-rJm4W93K.js +78 -0
  47. package/dist/replay-step-context.schema-BuuXkAck.js +1 -0
  48. package/dist/replay-step-context.schema-DBk4jufr.js +21 -0
  49. package/dist/{replay-tauri-path-BIIo3xjJ.js → replay-tauri-path--8KtMkGg.js} +1 -1
  50. package/dist/{replay-tauri-path-BQmCYwRI.js → replay-tauri-path--BfusnkB.js} +4 -4
  51. package/dist/replay-useAiChatQueries-B1-NwsZz.js +213 -0
  52. package/dist/replay-useAiChatQueries-Btd-PmIH.js +3532 -0
  53. package/dist/replay-validate-key-Bk0SFd3-.js +1 -0
  54. package/dist/replay-validate-key-CYsfegSv.js +28 -0
  55. package/dist/replay.cjs +1 -1
  56. package/dist/replay.d.ts +37 -5
  57. package/dist/replay.js +18 -18
  58. package/package.json +4 -4
  59. package/dist/replay-index-BFggGnsX.js +0 -181252
  60. package/dist/replay-index-BWX4r5us.js +0 -8354
  61. package/dist/replay-index-DuAFN7X8.js +0 -21
  62. package/dist/replay-index-tDvNtfHp.js +0 -1
  63. package/dist/replay-respect-run-DGe96SG3.js +0 -78
@@ -0,0 +1,3694 @@
1
+ import { g as fr, aK as Xe, aL as Ie } from "./replay-index-DXnDNeqk.js";
2
+ function pr(e) {
3
+ return !!e;
4
+ }
5
+ var yt = {}, Et, ln;
6
+ function ut() {
7
+ if (ln) return Et;
8
+ ln = 1;
9
+ const e = "\\\\/", t = `[^${e}]`, n = 0, r = "\\.", i = "\\+", o = "\\?", a = "\\/", s = "(?=.)", l = "[^/]", u = `(?:${a}|$)`, c = `(?:^|${a})`, y = `${r}{1,2}${u}`, g = `(?!${r})`, C = `(?!${c}${y})`, E = `(?!${r}{0,1}${u})`, w = `(?!${y})`, F = `[^.${a}]`, N = `${l}*?`, R = {
10
+ DOT_LITERAL: r,
11
+ PLUS_LITERAL: i,
12
+ QMARK_LITERAL: o,
13
+ SLASH_LITERAL: a,
14
+ ONE_CHAR: s,
15
+ QMARK: l,
16
+ END_ANCHOR: u,
17
+ DOTS_SLASH: y,
18
+ NO_DOT: g,
19
+ NO_DOTS: C,
20
+ NO_DOT_SLASH: E,
21
+ NO_DOTS_SLASH: w,
22
+ QMARK_NO_DOT: F,
23
+ STAR: N,
24
+ START_ANCHOR: c,
25
+ SEP: "/"
26
+ }, p = {
27
+ ...R,
28
+ SLASH_LITERAL: `[${e}]`,
29
+ QMARK: t,
30
+ STAR: `${t}*?`,
31
+ DOTS_SLASH: `${r}{1,2}(?:[${e}]|$)`,
32
+ NO_DOT: `(?!${r})`,
33
+ NO_DOTS: `(?!(?:^|[${e}])${r}{1,2}(?:[${e}]|$))`,
34
+ NO_DOT_SLASH: `(?!${r}{0,1}(?:[${e}]|$))`,
35
+ NO_DOTS_SLASH: `(?!${r}{1,2}(?:[${e}]|$))`,
36
+ QMARK_NO_DOT: `[^.${e}]`,
37
+ START_ANCHOR: `(?:^|[${e}])`,
38
+ END_ANCHOR: `(?:[${e}]|$)`,
39
+ SEP: "\\"
40
+ }, x = {
41
+ __proto__: null,
42
+ alnum: "a-zA-Z0-9",
43
+ alpha: "a-zA-Z",
44
+ ascii: "\\x00-\\x7F",
45
+ blank: " \\t",
46
+ cntrl: "\\x00-\\x1F\\x7F",
47
+ digit: "0-9",
48
+ graph: "\\x21-\\x7E",
49
+ lower: "a-z",
50
+ print: "\\x20-\\x7E ",
51
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
52
+ space: " \\t\\r\\n\\v\\f",
53
+ upper: "A-Z",
54
+ word: "A-Za-z0-9_",
55
+ xdigit: "A-Fa-f0-9"
56
+ };
57
+ return Et = {
58
+ DEFAULT_MAX_EXTGLOB_RECURSION: n,
59
+ MAX_LENGTH: 1024 * 64,
60
+ POSIX_REGEX_SOURCE: x,
61
+ // regular expressions
62
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
63
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
64
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
65
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
66
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
67
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
68
+ // Replace globs with equivalent patterns to reduce parsing time.
69
+ REPLACEMENTS: {
70
+ __proto__: null,
71
+ "***": "*",
72
+ "**/**": "**",
73
+ "**/**/**": "**"
74
+ },
75
+ // Digits
76
+ CHAR_0: 48,
77
+ /* 0 */
78
+ CHAR_9: 57,
79
+ /* 9 */
80
+ // Alphabet chars.
81
+ CHAR_UPPERCASE_A: 65,
82
+ /* A */
83
+ CHAR_LOWERCASE_A: 97,
84
+ /* a */
85
+ CHAR_UPPERCASE_Z: 90,
86
+ /* Z */
87
+ CHAR_LOWERCASE_Z: 122,
88
+ /* z */
89
+ CHAR_LEFT_PARENTHESES: 40,
90
+ /* ( */
91
+ CHAR_RIGHT_PARENTHESES: 41,
92
+ /* ) */
93
+ CHAR_ASTERISK: 42,
94
+ /* * */
95
+ // Non-alphabetic chars.
96
+ CHAR_AMPERSAND: 38,
97
+ /* & */
98
+ CHAR_AT: 64,
99
+ /* @ */
100
+ CHAR_BACKWARD_SLASH: 92,
101
+ /* \ */
102
+ CHAR_CARRIAGE_RETURN: 13,
103
+ /* \r */
104
+ CHAR_CIRCUMFLEX_ACCENT: 94,
105
+ /* ^ */
106
+ CHAR_COLON: 58,
107
+ /* : */
108
+ CHAR_COMMA: 44,
109
+ /* , */
110
+ CHAR_DOT: 46,
111
+ /* . */
112
+ CHAR_DOUBLE_QUOTE: 34,
113
+ /* " */
114
+ CHAR_EQUAL: 61,
115
+ /* = */
116
+ CHAR_EXCLAMATION_MARK: 33,
117
+ /* ! */
118
+ CHAR_FORM_FEED: 12,
119
+ /* \f */
120
+ CHAR_FORWARD_SLASH: 47,
121
+ /* / */
122
+ CHAR_GRAVE_ACCENT: 96,
123
+ /* ` */
124
+ CHAR_HASH: 35,
125
+ /* # */
126
+ CHAR_HYPHEN_MINUS: 45,
127
+ /* - */
128
+ CHAR_LEFT_ANGLE_BRACKET: 60,
129
+ /* < */
130
+ CHAR_LEFT_CURLY_BRACE: 123,
131
+ /* { */
132
+ CHAR_LEFT_SQUARE_BRACKET: 91,
133
+ /* [ */
134
+ CHAR_LINE_FEED: 10,
135
+ /* \n */
136
+ CHAR_NO_BREAK_SPACE: 160,
137
+ /* \u00A0 */
138
+ CHAR_PERCENT: 37,
139
+ /* % */
140
+ CHAR_PLUS: 43,
141
+ /* + */
142
+ CHAR_QUESTION_MARK: 63,
143
+ /* ? */
144
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
145
+ /* > */
146
+ CHAR_RIGHT_CURLY_BRACE: 125,
147
+ /* } */
148
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
149
+ /* ] */
150
+ CHAR_SEMICOLON: 59,
151
+ /* ; */
152
+ CHAR_SINGLE_QUOTE: 39,
153
+ /* ' */
154
+ CHAR_SPACE: 32,
155
+ /* */
156
+ CHAR_TAB: 9,
157
+ /* \t */
158
+ CHAR_UNDERSCORE: 95,
159
+ /* _ */
160
+ CHAR_VERTICAL_LINE: 124,
161
+ /* | */
162
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
163
+ /* \uFEFF */
164
+ /**
165
+ * Create EXTGLOB_CHARS
166
+ */
167
+ extglobChars(_) {
168
+ return {
169
+ "!": { type: "negate", open: "(?:(?!(?:", close: `))${_.STAR})` },
170
+ "?": { type: "qmark", open: "(?:", close: ")?" },
171
+ "+": { type: "plus", open: "(?:", close: ")+" },
172
+ "*": { type: "star", open: "(?:", close: ")*" },
173
+ "@": { type: "at", open: "(?:", close: ")" }
174
+ };
175
+ },
176
+ /**
177
+ * Create GLOB_CHARS
178
+ */
179
+ globChars(_) {
180
+ return _ === !0 ? p : R;
181
+ }
182
+ }, Et;
183
+ }
184
+ var cn;
185
+ function ft() {
186
+ return cn || (cn = 1, (function(e) {
187
+ const {
188
+ REGEX_BACKSLASH: t,
189
+ REGEX_REMOVE_BACKSLASH: n,
190
+ REGEX_SPECIAL_CHARS: r,
191
+ REGEX_SPECIAL_CHARS_GLOBAL: i
192
+ } = /* @__PURE__ */ ut();
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
+ if (typeof navigator < "u" && navigator.platform) {
195
+ const o = navigator.platform.toLowerCase();
196
+ return o === "win32" || o === "windows";
197
+ }
198
+ return typeof process < "u" && process.platform ? process.platform === "win32" : !1;
199
+ }, e.removeBackslashes = (o) => o.replace(n, (a) => a === "\\" ? "" : a), e.escapeLast = (o, a, s) => {
200
+ const l = o.lastIndexOf(a, s);
201
+ return l === -1 ? o : o[l - 1] === "\\" ? e.escapeLast(o, a, l - 1) : `${o.slice(0, l)}\\${o.slice(l)}`;
202
+ }, e.removePrefix = (o, a = {}) => {
203
+ let s = o;
204
+ return s.startsWith("./") && (s = s.slice(2), a.prefix = "./"), s;
205
+ }, e.wrapOutput = (o, a = {}, s = {}) => {
206
+ const l = s.contains ? "" : "^", u = s.contains ? "" : "$";
207
+ let c = `${l}(?:${o})${u}`;
208
+ return a.negated === !0 && (c = `(?:^(?!${c}).*$)`), c;
209
+ }, e.basename = (o, { windows: a } = {}) => {
210
+ const s = o.split(a ? /[\\/]/ : "/"), l = s[s.length - 1];
211
+ return l === "" ? s[s.length - 2] : l;
212
+ };
213
+ })(yt)), yt;
214
+ }
215
+ var St, un;
216
+ function dr() {
217
+ if (un) return St;
218
+ un = 1;
219
+ const e = /* @__PURE__ */ ft(), {
220
+ CHAR_ASTERISK: t,
221
+ /* * */
222
+ CHAR_AT: n,
223
+ /* @ */
224
+ CHAR_BACKWARD_SLASH: r,
225
+ /* \ */
226
+ CHAR_COMMA: i,
227
+ /* , */
228
+ CHAR_DOT: o,
229
+ /* . */
230
+ CHAR_EXCLAMATION_MARK: a,
231
+ /* ! */
232
+ CHAR_FORWARD_SLASH: s,
233
+ /* / */
234
+ CHAR_LEFT_CURLY_BRACE: l,
235
+ /* { */
236
+ CHAR_LEFT_PARENTHESES: u,
237
+ /* ( */
238
+ CHAR_LEFT_SQUARE_BRACKET: c,
239
+ /* [ */
240
+ CHAR_PLUS: y,
241
+ /* + */
242
+ CHAR_QUESTION_MARK: g,
243
+ /* ? */
244
+ CHAR_RIGHT_CURLY_BRACE: C,
245
+ /* } */
246
+ CHAR_RIGHT_PARENTHESES: E,
247
+ /* ) */
248
+ CHAR_RIGHT_SQUARE_BRACKET: w
249
+ /* ] */
250
+ } = /* @__PURE__ */ ut(), F = (R) => R === s || R === r, N = (R) => {
251
+ R.isPrefix !== !0 && (R.depth = R.isGlobstar ? 1 / 0 : 1);
252
+ };
253
+ return St = (R, p) => {
254
+ const x = p || {}, _ = R.length - 1, b = x.parts === !0 || x.scanToEnd === !0, S = [], m = [], Q = [];
255
+ let W = R, P = -1, G = 0, J = 0, le = !1, ce = !1, j = !1, Ee = !1, Re = !1, B = !1, oe = !1, be = !1, ke = !1, K = !1, ae = 0, me, $, f = { value: "", depth: 0, isGlob: !1 };
256
+ const Z = () => P >= _, de = () => W.charCodeAt(P + 1), ee = () => (me = $, W.charCodeAt(++P));
257
+ for (; P < _; ) {
258
+ $ = ee();
259
+ let V;
260
+ if ($ === r) {
261
+ oe = f.backslashes = !0, $ = ee(), $ === l && (B = !0);
262
+ continue;
263
+ }
264
+ if (B === !0 || $ === l) {
265
+ for (ae++; Z() !== !0 && ($ = ee()); ) {
266
+ if ($ === r) {
267
+ oe = f.backslashes = !0, ee();
268
+ continue;
269
+ }
270
+ if ($ === l) {
271
+ ae++;
272
+ continue;
273
+ }
274
+ if (B !== !0 && $ === o && ($ = ee()) === o) {
275
+ if (le = f.isBrace = !0, j = f.isGlob = !0, K = !0, b === !0)
276
+ continue;
277
+ break;
278
+ }
279
+ if (B !== !0 && $ === i) {
280
+ if (le = f.isBrace = !0, j = f.isGlob = !0, K = !0, b === !0)
281
+ continue;
282
+ break;
283
+ }
284
+ if ($ === C && (ae--, ae === 0)) {
285
+ B = !1, le = f.isBrace = !0, K = !0;
286
+ break;
287
+ }
288
+ }
289
+ if (b === !0)
290
+ continue;
291
+ break;
292
+ }
293
+ if ($ === s) {
294
+ if (S.push(P), m.push(f), f = { value: "", depth: 0, isGlob: !1 }, K === !0) continue;
295
+ if (me === o && P === G + 1) {
296
+ G += 2;
297
+ continue;
298
+ }
299
+ J = P + 1;
300
+ continue;
301
+ }
302
+ if (x.noext !== !0 && ($ === y || $ === n || $ === t || $ === g || $ === a) === !0 && de() === u) {
303
+ if (j = f.isGlob = !0, Ee = f.isExtglob = !0, K = !0, $ === a && P === G && (ke = !0), b === !0) {
304
+ for (; Z() !== !0 && ($ = ee()); ) {
305
+ if ($ === r) {
306
+ oe = f.backslashes = !0, $ = ee();
307
+ continue;
308
+ }
309
+ if ($ === E) {
310
+ j = f.isGlob = !0, K = !0;
311
+ break;
312
+ }
313
+ }
314
+ continue;
315
+ }
316
+ break;
317
+ }
318
+ if ($ === t) {
319
+ if (me === t && (Re = f.isGlobstar = !0), j = f.isGlob = !0, K = !0, b === !0)
320
+ continue;
321
+ break;
322
+ }
323
+ if ($ === g) {
324
+ if (j = f.isGlob = !0, K = !0, b === !0)
325
+ continue;
326
+ break;
327
+ }
328
+ if ($ === c) {
329
+ for (; Z() !== !0 && (V = ee()); ) {
330
+ if (V === r) {
331
+ oe = f.backslashes = !0, ee();
332
+ continue;
333
+ }
334
+ if (V === w) {
335
+ ce = f.isBracket = !0, j = f.isGlob = !0, K = !0;
336
+ break;
337
+ }
338
+ }
339
+ if (b === !0)
340
+ continue;
341
+ break;
342
+ }
343
+ if (x.nonegate !== !0 && $ === a && P === G) {
344
+ be = f.negated = !0, G++;
345
+ continue;
346
+ }
347
+ if (x.noparen !== !0 && $ === u) {
348
+ if (j = f.isGlob = !0, b === !0) {
349
+ for (; Z() !== !0 && ($ = ee()); ) {
350
+ if ($ === u) {
351
+ oe = f.backslashes = !0, $ = ee();
352
+ continue;
353
+ }
354
+ if ($ === E) {
355
+ K = !0;
356
+ break;
357
+ }
358
+ }
359
+ continue;
360
+ }
361
+ break;
362
+ }
363
+ if (j === !0) {
364
+ if (K = !0, b === !0)
365
+ continue;
366
+ break;
367
+ }
368
+ }
369
+ x.noext === !0 && (Ee = !1, j = !1);
370
+ let d = W, h = "", ue = "";
371
+ G > 0 && (h = W.slice(0, G), W = W.slice(G), J -= G), d && j === !0 && J > 0 ? (d = W.slice(0, J), ue = W.slice(J)) : j === !0 ? (d = "", ue = W) : d = W, d && d !== "" && d !== "/" && d !== W && F(d.charCodeAt(d.length - 1)) && (d = d.slice(0, -1)), x.unescape === !0 && (ue && (ue = e.removeBackslashes(ue)), d && oe === !0 && (d = e.removeBackslashes(d)));
372
+ const D = {
373
+ prefix: h,
374
+ input: R,
375
+ start: G,
376
+ base: d,
377
+ glob: ue,
378
+ isBrace: le,
379
+ isBracket: ce,
380
+ isGlob: j,
381
+ isExtglob: Ee,
382
+ isGlobstar: Re,
383
+ negated: be,
384
+ negatedExtglob: ke
385
+ };
386
+ if (x.tokens === !0 && (D.maxDepth = 0, F($) || m.push(f), D.tokens = m), x.parts === !0 || x.tokens === !0) {
387
+ let V;
388
+ for (let Y = 0; Y < S.length; Y++) {
389
+ const fe = V ? V + 1 : G, xe = S[Y], Ke = R.slice(fe, xe);
390
+ x.tokens && (Y === 0 && G !== 0 ? (m[Y].isPrefix = !0, m[Y].value = h) : m[Y].value = Ke, N(m[Y]), D.maxDepth += m[Y].depth), (Y !== 0 || Ke !== "") && Q.push(Ke), V = xe;
391
+ }
392
+ if (V && V + 1 < R.length) {
393
+ const Y = R.slice(V + 1);
394
+ Q.push(Y), x.tokens && (m[m.length - 1].value = Y, N(m[m.length - 1]), D.maxDepth += m[m.length - 1].depth);
395
+ }
396
+ D.slashes = S, D.parts = Q;
397
+ }
398
+ return D;
399
+ }, St;
400
+ }
401
+ var Ct, fn;
402
+ function hr() {
403
+ if (fn) return Ct;
404
+ fn = 1;
405
+ const e = /* @__PURE__ */ ut(), t = /* @__PURE__ */ ft(), {
406
+ MAX_LENGTH: n,
407
+ POSIX_REGEX_SOURCE: r,
408
+ REGEX_NON_SPECIAL_CHARS: i,
409
+ REGEX_SPECIAL_CHARS_BACKREF: o,
410
+ REPLACEMENTS: a
411
+ } = e, s = (A, R) => {
412
+ if (typeof R.expandRange == "function")
413
+ return R.expandRange(...A, R);
414
+ A.sort();
415
+ const p = `[${A.join("-")}]`;
416
+ try {
417
+ new RegExp(p);
418
+ } catch {
419
+ return A.map((_) => t.escapeRegex(_)).join("..");
420
+ }
421
+ return p;
422
+ }, l = (A, R) => `Missing ${A}: "${R}" - use "\\\\${R}" to match literal characters`, u = (A) => {
423
+ const R = [];
424
+ let p = 0, x = 0, _ = 0, b = "", S = !1;
425
+ for (const m of A) {
426
+ if (S === !0) {
427
+ b += m, S = !1;
428
+ continue;
429
+ }
430
+ if (m === "\\") {
431
+ b += m, S = !0;
432
+ continue;
433
+ }
434
+ if (m === '"') {
435
+ _ = _ === 1 ? 0 : 1, b += m;
436
+ continue;
437
+ }
438
+ if (_ === 0) {
439
+ if (m === "[")
440
+ p++;
441
+ else if (m === "]" && p > 0)
442
+ p--;
443
+ else if (p === 0) {
444
+ if (m === "(")
445
+ x++;
446
+ else if (m === ")" && x > 0)
447
+ x--;
448
+ else if (m === "|" && x === 0) {
449
+ R.push(b), b = "";
450
+ continue;
451
+ }
452
+ }
453
+ }
454
+ b += m;
455
+ }
456
+ return R.push(b), R;
457
+ }, c = (A) => {
458
+ let R = !1;
459
+ for (const p of A) {
460
+ if (R === !0) {
461
+ R = !1;
462
+ continue;
463
+ }
464
+ if (p === "\\") {
465
+ R = !0;
466
+ continue;
467
+ }
468
+ if (/[?*+@!()[\]{}]/.test(p))
469
+ return !1;
470
+ }
471
+ return !0;
472
+ }, y = (A) => {
473
+ let R = A.trim(), p = !0;
474
+ for (; p === !0; )
475
+ p = !1, /^@\([^\\()[\]{}|]+\)$/.test(R) && (R = R.slice(2, -1), p = !0);
476
+ if (c(R))
477
+ return R.replace(/\\(.)/g, "$1");
478
+ }, g = (A) => {
479
+ const R = A.map(y).filter(Boolean);
480
+ for (let p = 0; p < R.length; p++)
481
+ for (let x = p + 1; x < R.length; x++) {
482
+ const _ = R[p], b = R[x], S = _[0];
483
+ if (!(!S || _ !== S.repeat(_.length) || b !== S.repeat(b.length)) && (_ === b || _.startsWith(b) || b.startsWith(_)))
484
+ return !0;
485
+ }
486
+ return !1;
487
+ }, C = (A, R = !0) => {
488
+ if (A[0] !== "+" && A[0] !== "*" || A[1] !== "(")
489
+ return;
490
+ let p = 0, x = 0, _ = 0, b = !1;
491
+ for (let S = 1; S < A.length; S++) {
492
+ const m = A[S];
493
+ if (b === !0) {
494
+ b = !1;
495
+ continue;
496
+ }
497
+ if (m === "\\") {
498
+ b = !0;
499
+ continue;
500
+ }
501
+ if (m === '"') {
502
+ _ = _ === 1 ? 0 : 1;
503
+ continue;
504
+ }
505
+ if (_ !== 1) {
506
+ if (m === "[") {
507
+ p++;
508
+ continue;
509
+ }
510
+ if (m === "]" && p > 0) {
511
+ p--;
512
+ continue;
513
+ }
514
+ if (!(p > 0)) {
515
+ if (m === "(") {
516
+ x++;
517
+ continue;
518
+ }
519
+ if (m === ")" && (x--, x === 0))
520
+ return R === !0 && S !== A.length - 1 ? void 0 : {
521
+ type: A[0],
522
+ body: A.slice(2, S),
523
+ end: S
524
+ };
525
+ }
526
+ }
527
+ }
528
+ }, E = (A) => {
529
+ let R = 0;
530
+ const p = [];
531
+ for (; R < A.length; ) {
532
+ const _ = C(A.slice(R), !1);
533
+ if (!_ || _.type !== "*")
534
+ return;
535
+ const b = u(_.body).map((m) => m.trim());
536
+ if (b.length !== 1)
537
+ return;
538
+ const S = y(b[0]);
539
+ if (!S || S.length !== 1)
540
+ return;
541
+ p.push(S), R += _.end + 1;
542
+ }
543
+ return p.length < 1 ? void 0 : `${p.length === 1 ? t.escapeRegex(p[0]) : `[${p.map((_) => t.escapeRegex(_)).join("")}]`}*`;
544
+ }, w = (A) => {
545
+ let R = 0, p = A.trim(), x = C(p);
546
+ for (; x; )
547
+ R++, p = x.body.trim(), x = C(p);
548
+ return R;
549
+ }, F = (A, R) => {
550
+ if (R.maxExtglobRecursion === !1)
551
+ return { risky: !1 };
552
+ const p = typeof R.maxExtglobRecursion == "number" ? R.maxExtglobRecursion : e.DEFAULT_MAX_EXTGLOB_RECURSION, x = u(A).map((_) => _.trim());
553
+ if (x.length > 1 && (x.some((_) => _ === "") || x.some((_) => /^[*?]+$/.test(_)) || g(x)))
554
+ return { risky: !0 };
555
+ for (const _ of x) {
556
+ const b = E(_);
557
+ if (b)
558
+ return { risky: !0, safeOutput: b };
559
+ if (w(_) > p)
560
+ return { risky: !0 };
561
+ }
562
+ return { risky: !1 };
563
+ }, N = (A, R) => {
564
+ if (typeof A != "string")
565
+ throw new TypeError("Expected a string");
566
+ A = a[A] || A;
567
+ const p = { ...R }, x = typeof p.maxLength == "number" ? Math.min(n, p.maxLength) : n;
568
+ let _ = A.length;
569
+ if (_ > x)
570
+ throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);
571
+ const b = { type: "bos", value: "", output: p.prepend || "" }, S = [b], m = p.capture ? "" : "?:", Q = e.globChars(p.windows), W = e.extglobChars(Q), {
572
+ DOT_LITERAL: P,
573
+ PLUS_LITERAL: G,
574
+ SLASH_LITERAL: J,
575
+ ONE_CHAR: le,
576
+ DOTS_SLASH: ce,
577
+ NO_DOT: j,
578
+ NO_DOT_SLASH: Ee,
579
+ NO_DOTS_SLASH: Re,
580
+ QMARK: B,
581
+ QMARK_NO_DOT: oe,
582
+ STAR: be,
583
+ START_ANCHOR: ke
584
+ } = Q, K = (v) => `(${m}(?:(?!${ke}${v.dot ? ce : P}).)*?)`, ae = p.dot ? "" : j, me = p.dot ? B : oe;
585
+ let $ = p.bash === !0 ? K(p) : be;
586
+ p.capture && ($ = `(${$})`), typeof p.noext == "boolean" && (p.noextglob = p.noext);
587
+ const f = {
588
+ input: A,
589
+ index: -1,
590
+ start: 0,
591
+ dot: p.dot === !0,
592
+ consumed: "",
593
+ output: "",
594
+ prefix: "",
595
+ backtrack: !1,
596
+ negated: !1,
597
+ brackets: 0,
598
+ braces: 0,
599
+ parens: 0,
600
+ quotes: 0,
601
+ globstar: !1,
602
+ tokens: S
603
+ };
604
+ A = t.removePrefix(A, f), _ = A.length;
605
+ const Z = [], de = [], ee = [];
606
+ let d = b, h;
607
+ const ue = () => f.index === _ - 1, D = f.peek = (v = 1) => A[f.index + v], V = f.advance = () => A[++f.index] || "", Y = () => A.slice(f.index + 1), fe = (v = "", q = 0) => {
608
+ f.consumed += v, f.index += q;
609
+ }, xe = (v) => {
610
+ f.output += v.output != null ? v.output : v.value, fe(v.value);
611
+ }, Ke = () => {
612
+ let v = 1;
613
+ for (; D() === "!" && (D(2) !== "(" || D(3) === "?"); )
614
+ V(), f.start++, v++;
615
+ return v % 2 === 0 ? !1 : (f.negated = !0, f.start++, !0);
616
+ }, Je = (v) => {
617
+ f[v]++, ee.push(v);
618
+ }, Se = (v) => {
619
+ f[v]--, ee.pop();
620
+ }, L = (v) => {
621
+ if (d.type === "globstar") {
622
+ const q = f.braces > 0 && (v.type === "comma" || v.type === "brace"), T = v.extglob === !0 || Z.length && (v.type === "pipe" || v.type === "paren");
623
+ v.type !== "slash" && v.type !== "paren" && !q && !T && (f.output = f.output.slice(0, -d.output.length), d.type = "star", d.value = "*", d.output = $, f.output += d.output);
624
+ }
625
+ if (Z.length && v.type !== "paren" && (Z[Z.length - 1].inner += v.value), (v.value || v.output) && xe(v), d && d.type === "text" && v.type === "text") {
626
+ d.output = (d.output || d.value) + v.value, d.value += v.value;
627
+ return;
628
+ }
629
+ v.prev = d, S.push(v), d = v;
630
+ }, et = (v, q) => {
631
+ const T = { ...W[q], conditions: 1, inner: "" };
632
+ T.prev = d, T.parens = f.parens, T.output = f.output, T.startIndex = f.index, T.tokensIndex = S.length;
633
+ const k = (p.capture ? "(" : "") + T.open;
634
+ Je("parens"), L({ type: v, value: q, output: f.output ? "" : le }), L({ type: "paren", extglob: !0, value: V(), output: k }), Z.push(T);
635
+ }, ur = (v) => {
636
+ const q = A.slice(v.startIndex, f.index + 1), T = A.slice(v.startIndex + 2, f.index), k = F(T, p);
637
+ if ((v.type === "plus" || v.type === "star") && k.risky) {
638
+ const M = k.safeOutput ? (v.output ? "" : le) + (p.capture ? `(${k.safeOutput})` : k.safeOutput) : void 0, he = S[v.tokensIndex];
639
+ he.type = "text", he.value = q, he.output = M || t.escapeRegex(q);
640
+ for (let ge = v.tokensIndex + 1; ge < S.length; ge++)
641
+ S[ge].value = "", S[ge].output = "", delete S[ge].suffix;
642
+ f.output = v.output + he.output, f.backtrack = !0, L({ type: "paren", extglob: !0, value: h, output: "" }), Se("parens");
643
+ return;
644
+ }
645
+ let U = v.close + (p.capture ? ")" : ""), X;
646
+ if (v.type === "negate") {
647
+ let M = $;
648
+ if (v.inner && v.inner.length > 1 && v.inner.includes("/") && (M = K(p)), (M !== $ || ue() || /^\)+$/.test(Y())) && (U = v.close = `)$))${M}`), v.inner.includes("*") && (X = Y()) && /^\.[^\\/.]+$/.test(X)) {
649
+ const he = N(X, { ...R, fastpaths: !1 }).output;
650
+ U = v.close = `)${he})${M})`;
651
+ }
652
+ v.prev.type === "bos" && (f.negatedExtglob = !0);
653
+ }
654
+ L({ type: "paren", extglob: !0, value: h, output: U }), Se("parens");
655
+ };
656
+ if (p.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(A)) {
657
+ let v = !1, q = A.replace(o, (T, k, U, X, M, he) => X === "\\" ? (v = !0, T) : X === "?" ? k ? k + X + (M ? B.repeat(M.length) : "") : he === 0 ? me + (M ? B.repeat(M.length) : "") : B.repeat(U.length) : X === "." ? P.repeat(U.length) : X === "*" ? k ? k + X + (M ? $ : "") : $ : k ? T : `\\${T}`);
658
+ return v === !0 && (p.unescape === !0 ? q = q.replace(/\\/g, "") : q = q.replace(/\\+/g, (T) => T.length % 2 === 0 ? "\\\\" : T ? "\\" : "")), q === A && p.contains === !0 ? (f.output = A, f) : (f.output = t.wrapOutput(q, f, R), f);
659
+ }
660
+ for (; !ue(); ) {
661
+ if (h = V(), h === "\0")
662
+ continue;
663
+ if (h === "\\") {
664
+ const T = D();
665
+ if (T === "/" && p.bash !== !0 || T === "." || T === ";")
666
+ continue;
667
+ if (!T) {
668
+ h += "\\", L({ type: "text", value: h });
669
+ continue;
670
+ }
671
+ const k = /^\\+/.exec(Y());
672
+ let U = 0;
673
+ if (k && k[0].length > 2 && (U = k[0].length, f.index += U, U % 2 !== 0 && (h += "\\")), p.unescape === !0 ? h = V() : h += V(), f.brackets === 0) {
674
+ L({ type: "text", value: h });
675
+ continue;
676
+ }
677
+ }
678
+ if (f.brackets > 0 && (h !== "]" || d.value === "[" || d.value === "[^")) {
679
+ if (p.posix !== !1 && h === ":") {
680
+ const T = d.value.slice(1);
681
+ if (T.includes("[") && (d.posix = !0, T.includes(":"))) {
682
+ const k = d.value.lastIndexOf("["), U = d.value.slice(0, k), X = d.value.slice(k + 2), M = r[X];
683
+ if (M) {
684
+ d.value = U + M, f.backtrack = !0, V(), !b.output && S.indexOf(d) === 1 && (b.output = le);
685
+ continue;
686
+ }
687
+ }
688
+ }
689
+ (h === "[" && D() !== ":" || h === "-" && D() === "]") && (h = `\\${h}`), h === "]" && (d.value === "[" || d.value === "[^") && (h = `\\${h}`), p.posix === !0 && h === "!" && d.value === "[" && (h = "^"), d.value += h, xe({ value: h });
690
+ continue;
691
+ }
692
+ if (f.quotes === 1 && h !== '"') {
693
+ h = t.escapeRegex(h), d.value += h, xe({ value: h });
694
+ continue;
695
+ }
696
+ if (h === '"') {
697
+ f.quotes = f.quotes === 1 ? 0 : 1, p.keepQuotes === !0 && L({ type: "text", value: h });
698
+ continue;
699
+ }
700
+ if (h === "(") {
701
+ Je("parens"), L({ type: "paren", value: h });
702
+ continue;
703
+ }
704
+ if (h === ")") {
705
+ if (f.parens === 0 && p.strictBrackets === !0)
706
+ throw new SyntaxError(l("opening", "("));
707
+ const T = Z[Z.length - 1];
708
+ if (T && f.parens === T.parens + 1) {
709
+ ur(Z.pop());
710
+ continue;
711
+ }
712
+ L({ type: "paren", value: h, output: f.parens ? ")" : "\\)" }), Se("parens");
713
+ continue;
714
+ }
715
+ if (h === "[") {
716
+ if (p.nobracket === !0 || !Y().includes("]")) {
717
+ if (p.nobracket !== !0 && p.strictBrackets === !0)
718
+ throw new SyntaxError(l("closing", "]"));
719
+ h = `\\${h}`;
720
+ } else
721
+ Je("brackets");
722
+ L({ type: "bracket", value: h });
723
+ continue;
724
+ }
725
+ if (h === "]") {
726
+ if (p.nobracket === !0 || d && d.type === "bracket" && d.value.length === 1) {
727
+ L({ type: "text", value: h, output: `\\${h}` });
728
+ continue;
729
+ }
730
+ if (f.brackets === 0) {
731
+ if (p.strictBrackets === !0)
732
+ throw new SyntaxError(l("opening", "["));
733
+ L({ type: "text", value: h, output: `\\${h}` });
734
+ continue;
735
+ }
736
+ Se("brackets");
737
+ const T = d.value.slice(1);
738
+ if (d.posix !== !0 && T[0] === "^" && !T.includes("/") && (h = `/${h}`), d.value += h, xe({ value: h }), p.literalBrackets === !1 || t.hasRegexChars(T))
739
+ continue;
740
+ const k = t.escapeRegex(d.value);
741
+ if (f.output = f.output.slice(0, -d.value.length), p.literalBrackets === !0) {
742
+ f.output += k, d.value = k;
743
+ continue;
744
+ }
745
+ d.value = `(${m}${k}|${d.value})`, f.output += d.value;
746
+ continue;
747
+ }
748
+ if (h === "{" && p.nobrace !== !0) {
749
+ Je("braces");
750
+ const T = {
751
+ type: "brace",
752
+ value: h,
753
+ output: "(",
754
+ outputIndex: f.output.length,
755
+ tokensIndex: f.tokens.length
756
+ };
757
+ de.push(T), L(T);
758
+ continue;
759
+ }
760
+ if (h === "}") {
761
+ const T = de[de.length - 1];
762
+ if (p.nobrace === !0 || !T) {
763
+ L({ type: "text", value: h, output: h });
764
+ continue;
765
+ }
766
+ let k = ")";
767
+ if (T.dots === !0) {
768
+ const U = S.slice(), X = [];
769
+ for (let M = U.length - 1; M >= 0 && (S.pop(), U[M].type !== "brace"); M--)
770
+ U[M].type !== "dots" && X.unshift(U[M].value);
771
+ k = s(X, p), f.backtrack = !0;
772
+ }
773
+ if (T.comma !== !0 && T.dots !== !0) {
774
+ const U = f.output.slice(0, T.outputIndex), X = f.tokens.slice(T.tokensIndex);
775
+ T.value = T.output = "\\{", h = k = "\\}", f.output = U;
776
+ for (const M of X)
777
+ f.output += M.output || M.value;
778
+ }
779
+ L({ type: "brace", value: h, output: k }), Se("braces"), de.pop();
780
+ continue;
781
+ }
782
+ if (h === "|") {
783
+ Z.length > 0 && Z[Z.length - 1].conditions++, L({ type: "text", value: h });
784
+ continue;
785
+ }
786
+ if (h === ",") {
787
+ let T = h;
788
+ const k = de[de.length - 1];
789
+ k && ee[ee.length - 1] === "braces" && (k.comma = !0, T = "|"), L({ type: "comma", value: h, output: T });
790
+ continue;
791
+ }
792
+ if (h === "/") {
793
+ if (d.type === "dot" && f.index === f.start + 1) {
794
+ f.start = f.index + 1, f.consumed = "", f.output = "", S.pop(), d = b;
795
+ continue;
796
+ }
797
+ L({ type: "slash", value: h, output: J });
798
+ continue;
799
+ }
800
+ if (h === ".") {
801
+ if (f.braces > 0 && d.type === "dot") {
802
+ d.value === "." && (d.output = P);
803
+ const T = de[de.length - 1];
804
+ d.type = "dots", d.output += h, d.value += h, T.dots = !0;
805
+ continue;
806
+ }
807
+ if (f.braces + f.parens === 0 && d.type !== "bos" && d.type !== "slash") {
808
+ L({ type: "text", value: h, output: P });
809
+ continue;
810
+ }
811
+ L({ type: "dot", value: h, output: P });
812
+ continue;
813
+ }
814
+ if (h === "?") {
815
+ if (!(d && d.value === "(") && p.noextglob !== !0 && D() === "(" && D(2) !== "?") {
816
+ et("qmark", h);
817
+ continue;
818
+ }
819
+ if (d && d.type === "paren") {
820
+ const k = D();
821
+ let U = h;
822
+ (d.value === "(" && !/[!=<:]/.test(k) || k === "<" && !/<([!=]|\w+>)/.test(Y())) && (U = `\\${h}`), L({ type: "text", value: h, output: U });
823
+ continue;
824
+ }
825
+ if (p.dot !== !0 && (d.type === "slash" || d.type === "bos")) {
826
+ L({ type: "qmark", value: h, output: oe });
827
+ continue;
828
+ }
829
+ L({ type: "qmark", value: h, output: B });
830
+ continue;
831
+ }
832
+ if (h === "!") {
833
+ if (p.noextglob !== !0 && D() === "(" && (D(2) !== "?" || !/[!=<:]/.test(D(3)))) {
834
+ et("negate", h);
835
+ continue;
836
+ }
837
+ if (p.nonegate !== !0 && f.index === 0) {
838
+ Ke();
839
+ continue;
840
+ }
841
+ }
842
+ if (h === "+") {
843
+ if (p.noextglob !== !0 && D() === "(" && D(2) !== "?") {
844
+ et("plus", h);
845
+ continue;
846
+ }
847
+ if (d && d.value === "(" || p.regex === !1) {
848
+ L({ type: "plus", value: h, output: G });
849
+ continue;
850
+ }
851
+ if (d && (d.type === "bracket" || d.type === "paren" || d.type === "brace") || f.parens > 0) {
852
+ L({ type: "plus", value: h });
853
+ continue;
854
+ }
855
+ L({ type: "plus", value: G });
856
+ continue;
857
+ }
858
+ if (h === "@") {
859
+ if (p.noextglob !== !0 && D() === "(" && D(2) !== "?") {
860
+ L({ type: "at", extglob: !0, value: h, output: "" });
861
+ continue;
862
+ }
863
+ L({ type: "text", value: h });
864
+ continue;
865
+ }
866
+ if (h !== "*") {
867
+ (h === "$" || h === "^") && (h = `\\${h}`);
868
+ const T = i.exec(Y());
869
+ T && (h += T[0], f.index += T[0].length), L({ type: "text", value: h });
870
+ continue;
871
+ }
872
+ if (d && (d.type === "globstar" || d.star === !0)) {
873
+ d.type = "star", d.star = !0, d.value += h, d.output = $, f.backtrack = !0, f.globstar = !0, fe(h);
874
+ continue;
875
+ }
876
+ let v = Y();
877
+ if (p.noextglob !== !0 && /^\([^?]/.test(v)) {
878
+ et("star", h);
879
+ continue;
880
+ }
881
+ if (d.type === "star") {
882
+ if (p.noglobstar === !0) {
883
+ fe(h);
884
+ continue;
885
+ }
886
+ const T = d.prev, k = T.prev, U = T.type === "slash" || T.type === "bos", X = k && (k.type === "star" || k.type === "globstar");
887
+ if (p.bash === !0 && (!U || v[0] && v[0] !== "/")) {
888
+ L({ type: "star", value: h, output: "" });
889
+ continue;
890
+ }
891
+ const M = f.braces > 0 && (T.type === "comma" || T.type === "brace"), he = Z.length && (T.type === "pipe" || T.type === "paren");
892
+ if (!U && T.type !== "paren" && !M && !he) {
893
+ L({ type: "star", value: h, output: "" });
894
+ continue;
895
+ }
896
+ for (; v.slice(0, 3) === "/**"; ) {
897
+ const ge = A[f.index + 4];
898
+ if (ge && ge !== "/")
899
+ break;
900
+ v = v.slice(3), fe("/**", 3);
901
+ }
902
+ if (T.type === "bos" && ue()) {
903
+ d.type = "globstar", d.value += h, d.output = K(p), f.output = d.output, f.globstar = !0, fe(h);
904
+ continue;
905
+ }
906
+ if (T.type === "slash" && T.prev.type !== "bos" && !X && ue()) {
907
+ f.output = f.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = K(p) + (p.strictSlashes ? ")" : "|$)"), d.value += h, f.globstar = !0, f.output += T.output + d.output, fe(h);
908
+ continue;
909
+ }
910
+ if (T.type === "slash" && T.prev.type !== "bos" && v[0] === "/") {
911
+ const ge = v[1] !== void 0 ? "|$" : "";
912
+ f.output = f.output.slice(0, -(T.output + d.output).length), T.output = `(?:${T.output}`, d.type = "globstar", d.output = `${K(p)}${J}|${J}${ge})`, d.value += h, f.output += T.output + d.output, f.globstar = !0, fe(h + V()), L({ type: "slash", value: "/", output: "" });
913
+ continue;
914
+ }
915
+ if (T.type === "bos" && v[0] === "/") {
916
+ d.type = "globstar", d.value += h, d.output = `(?:^|${J}|${K(p)}${J})`, f.output = d.output, f.globstar = !0, fe(h + V()), L({ type: "slash", value: "/", output: "" });
917
+ continue;
918
+ }
919
+ f.output = f.output.slice(0, -d.output.length), d.type = "globstar", d.output = K(p), d.value += h, f.output += d.output, f.globstar = !0, fe(h);
920
+ continue;
921
+ }
922
+ const q = { type: "star", value: h, output: $ };
923
+ if (p.bash === !0) {
924
+ q.output = ".*?", (d.type === "bos" || d.type === "slash") && (q.output = ae + q.output), L(q);
925
+ continue;
926
+ }
927
+ if (d && (d.type === "bracket" || d.type === "paren") && p.regex === !0) {
928
+ q.output = h, L(q);
929
+ continue;
930
+ }
931
+ (f.index === f.start || d.type === "slash" || d.type === "dot") && (d.type === "dot" ? (f.output += Ee, d.output += Ee) : p.dot === !0 ? (f.output += Re, d.output += Re) : (f.output += ae, d.output += ae), D() !== "*" && (f.output += le, d.output += le)), L(q);
932
+ }
933
+ for (; f.brackets > 0; ) {
934
+ if (p.strictBrackets === !0) throw new SyntaxError(l("closing", "]"));
935
+ f.output = t.escapeLast(f.output, "["), Se("brackets");
936
+ }
937
+ for (; f.parens > 0; ) {
938
+ if (p.strictBrackets === !0) throw new SyntaxError(l("closing", ")"));
939
+ f.output = t.escapeLast(f.output, "("), Se("parens");
940
+ }
941
+ for (; f.braces > 0; ) {
942
+ if (p.strictBrackets === !0) throw new SyntaxError(l("closing", "}"));
943
+ f.output = t.escapeLast(f.output, "{"), Se("braces");
944
+ }
945
+ if (p.strictSlashes !== !0 && (d.type === "star" || d.type === "bracket") && L({ type: "maybe_slash", value: "", output: `${J}?` }), f.backtrack === !0) {
946
+ f.output = "";
947
+ for (const v of f.tokens)
948
+ f.output += v.output != null ? v.output : v.value, v.suffix && (f.output += v.suffix);
949
+ }
950
+ return f;
951
+ };
952
+ return N.fastpaths = (A, R) => {
953
+ const p = { ...R }, x = typeof p.maxLength == "number" ? Math.min(n, p.maxLength) : n, _ = A.length;
954
+ if (_ > x)
955
+ throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);
956
+ A = a[A] || A;
957
+ const {
958
+ DOT_LITERAL: b,
959
+ SLASH_LITERAL: S,
960
+ ONE_CHAR: m,
961
+ DOTS_SLASH: Q,
962
+ NO_DOT: W,
963
+ NO_DOTS: P,
964
+ NO_DOTS_SLASH: G,
965
+ STAR: J,
966
+ START_ANCHOR: le
967
+ } = e.globChars(p.windows), ce = p.dot ? P : W, j = p.dot ? G : W, Ee = p.capture ? "" : "?:", Re = { negated: !1, prefix: "" };
968
+ let B = p.bash === !0 ? ".*?" : J;
969
+ p.capture && (B = `(${B})`);
970
+ const oe = (ae) => ae.noglobstar === !0 ? B : `(${Ee}(?:(?!${le}${ae.dot ? Q : b}).)*?)`, be = (ae) => {
971
+ switch (ae) {
972
+ case "*":
973
+ return `${ce}${m}${B}`;
974
+ case ".*":
975
+ return `${b}${m}${B}`;
976
+ case "*.*":
977
+ return `${ce}${B}${b}${m}${B}`;
978
+ case "*/*":
979
+ return `${ce}${B}${S}${m}${j}${B}`;
980
+ case "**":
981
+ return ce + oe(p);
982
+ case "**/*":
983
+ return `(?:${ce}${oe(p)}${S})?${j}${m}${B}`;
984
+ case "**/*.*":
985
+ return `(?:${ce}${oe(p)}${S})?${j}${B}${b}${m}${B}`;
986
+ case "**/.*":
987
+ return `(?:${ce}${oe(p)}${S})?${b}${m}${B}`;
988
+ default: {
989
+ const me = /^(.*?)\.(\w+)$/.exec(ae);
990
+ if (!me) return;
991
+ const $ = be(me[1]);
992
+ return $ ? $ + b + me[2] : void 0;
993
+ }
994
+ }
995
+ }, ke = t.removePrefix(A, Re);
996
+ let K = be(ke);
997
+ return K && p.strictSlashes !== !0 && (K += `${S}?`), K;
998
+ }, Ct = N, Ct;
999
+ }
1000
+ var Tt, pn;
1001
+ function gr() {
1002
+ if (pn) return Tt;
1003
+ pn = 1;
1004
+ const e = /* @__PURE__ */ dr(), t = /* @__PURE__ */ hr(), n = /* @__PURE__ */ ft(), r = /* @__PURE__ */ ut(), i = (a) => a && typeof a == "object" && !Array.isArray(a), o = (a, s, l = !1) => {
1005
+ if (Array.isArray(a)) {
1006
+ const F = a.map((A) => o(A, s, l));
1007
+ return (A) => {
1008
+ for (const R of F) {
1009
+ const p = R(A);
1010
+ if (p) return p;
1011
+ }
1012
+ return !1;
1013
+ };
1014
+ }
1015
+ const u = i(a) && a.tokens && a.input;
1016
+ if (a === "" || typeof a != "string" && !u)
1017
+ throw new TypeError("Expected pattern to be a non-empty string");
1018
+ const c = s || {}, y = c.windows, g = u ? o.compileRe(a, s) : o.makeRe(a, s, !1, !0), C = g.state;
1019
+ delete g.state;
1020
+ let E = () => !1;
1021
+ if (c.ignore) {
1022
+ const F = { ...s, ignore: null, onMatch: null, onResult: null };
1023
+ E = o(c.ignore, F, l);
1024
+ }
1025
+ const w = (F, N = !1) => {
1026
+ const { isMatch: A, match: R, output: p } = o.test(F, g, s, { glob: a, posix: y }), x = { glob: a, state: C, regex: g, posix: y, input: F, output: p, match: R, isMatch: A };
1027
+ return typeof c.onResult == "function" && c.onResult(x), A === !1 ? (x.isMatch = !1, N ? x : !1) : E(F) ? (typeof c.onIgnore == "function" && c.onIgnore(x), x.isMatch = !1, N ? x : !1) : (typeof c.onMatch == "function" && c.onMatch(x), N ? x : !0);
1028
+ };
1029
+ return l && (w.state = C), w;
1030
+ };
1031
+ return o.test = (a, s, l, { glob: u, posix: c } = {}) => {
1032
+ if (typeof a != "string")
1033
+ throw new TypeError("Expected input to be a string");
1034
+ if (a === "")
1035
+ return { isMatch: !1, output: "" };
1036
+ const y = l || {}, g = y.format || (c ? n.toPosixSlashes : null);
1037
+ let C = a === u, E = C && g ? g(a) : a;
1038
+ return C === !1 && (E = g ? g(a) : a, C = E === u), (C === !1 || y.capture === !0) && (y.matchBase === !0 || y.basename === !0 ? C = o.matchBase(a, s, l, c) : C = s.exec(E)), { isMatch: !!C, match: C, output: E };
1039
+ }, o.matchBase = (a, s, l) => (s instanceof RegExp ? s : o.makeRe(s, l)).test(n.basename(a)), o.isMatch = (a, s, l) => o(s, l)(a), o.parse = (a, s) => Array.isArray(a) ? a.map((l) => o.parse(l, s)) : t(a, { ...s, fastpaths: !1 }), o.scan = (a, s) => e(a, s), o.compileRe = (a, s, l = !1, u = !1) => {
1040
+ if (l === !0)
1041
+ return a.output;
1042
+ const c = s || {}, y = c.contains ? "" : "^", g = c.contains ? "" : "$";
1043
+ let C = `${y}(?:${a.output})${g}`;
1044
+ a && a.negated === !0 && (C = `^(?!${C}).*$`);
1045
+ const E = o.toRegex(C, s);
1046
+ return u === !0 && (E.state = a), E;
1047
+ }, o.makeRe = (a, s = {}, l = !1, u = !1) => {
1048
+ if (!a || typeof a != "string")
1049
+ throw new TypeError("Expected a non-empty string");
1050
+ let c = { negated: !1, fastpaths: !0 };
1051
+ return s.fastpaths !== !1 && (a[0] === "." || a[0] === "*") && (c.output = t.fastpaths(a, s)), c.output || (c = t(a, s)), o.compileRe(c, s, l, u);
1052
+ }, o.toRegex = (a, s) => {
1053
+ try {
1054
+ const l = s || {};
1055
+ return new RegExp(a, l.flags || (l.nocase ? "i" : ""));
1056
+ } catch (l) {
1057
+ if (s && s.debug === !0) throw l;
1058
+ return /$^/;
1059
+ }
1060
+ }, o.constants = r, Tt = o, Tt;
1061
+ }
1062
+ var vt, dn;
1063
+ function mr() {
1064
+ if (dn) return vt;
1065
+ dn = 1;
1066
+ const e = /* @__PURE__ */ gr(), t = /* @__PURE__ */ ft();
1067
+ function n(r, i, o = !1) {
1068
+ return i && (i.windows === null || i.windows === void 0) && (i = { ...i, windows: t.isWindows() }), e(r, i, o);
1069
+ }
1070
+ return Object.assign(n, e), vt = n, vt;
1071
+ }
1072
+ var Ar = /* @__PURE__ */ mr();
1073
+ const yr = /* @__PURE__ */ fr(Ar), Er = typeof window < "u" || typeof process > "u" || process?.platform === "browser", Sr = Er ? {} : process.env || {};
1074
+ async function Cr(e, t) {
1075
+ const n = {};
1076
+ for (const i of t.headers)
1077
+ Tr(e, i.matches) && (n[i.name] = i.envVariable !== void 0 ? Sr[i.envVariable] || "" : i.value);
1078
+ const r = await (t.customFetch || fetch)(e, {
1079
+ headers: n
1080
+ });
1081
+ if (!r.ok)
1082
+ throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);
1083
+ return { body: await r.text(), mimeType: r.headers.get("content-type") };
1084
+ }
1085
+ function Tr(e, t) {
1086
+ return t.match(/^https?:\/\//) || (e = e.replace(/^https?:\/\//, "")), yr.isMatch(e, t);
1087
+ }
1088
+ function fa(e, t = {}) {
1089
+ return {
1090
+ name: `${e}List`,
1091
+ properties: {},
1092
+ items: e,
1093
+ ...t
1094
+ };
1095
+ }
1096
+ function pa(e, t = {}) {
1097
+ return {
1098
+ name: `${e}Map`,
1099
+ properties: {},
1100
+ additionalProperties: () => e,
1101
+ ...t
1102
+ };
1103
+ }
1104
+ const rt = {
1105
+ name: "SpecExtension",
1106
+ properties: {},
1107
+ // skip validation of additional properties for unknown extensions
1108
+ additionalProperties: { resolvable: !0 }
1109
+ };
1110
+ function da(e, t = {}) {
1111
+ const n = {};
1112
+ for (const o of Object.keys(e))
1113
+ n[o] = {
1114
+ ...e[o],
1115
+ name: o
1116
+ };
1117
+ for (const o of Object.values(n))
1118
+ r(o);
1119
+ return n.SpecExtension = rt, n;
1120
+ function r(o) {
1121
+ if (o.additionalProperties && (o.additionalProperties = i(o.additionalProperties)), o.items && (o.items = i(o.items)), o.properties) {
1122
+ const a = {};
1123
+ for (const [s, l] of Object.entries(o.properties))
1124
+ a[s] = i(l), t.doNotResolveExamples && l && l.isExample && (a[s] = {
1125
+ ...l,
1126
+ resolvable: !1
1127
+ });
1128
+ o.properties = a;
1129
+ }
1130
+ }
1131
+ function i(o) {
1132
+ if (typeof o == "string") {
1133
+ if (!n[o])
1134
+ throw new Error(`Unknown type name found: ${o}`);
1135
+ return n[o];
1136
+ } else return typeof o == "function" ? (a, s) => i(o(a, s)) : it(o) ? (o = { ...o }, r(o), o) : o?.directResolveAs !== void 0 ? {
1137
+ ...o,
1138
+ directResolveAs: i(o.directResolveAs) ?? void 0
1139
+ } : o;
1140
+ }
1141
+ }
1142
+ function it(e) {
1143
+ return typeof e?.name == "string";
1144
+ }
1145
+ function Ce(e, t) {
1146
+ return e === "" && (e = "#/"), e[e.length - 1] === "/" ? e + t : e + "/" + t;
1147
+ }
1148
+ function Rt(e) {
1149
+ return Ie(e) && typeof e.$ref == "string";
1150
+ }
1151
+ function vr(e) {
1152
+ return Ie(e) && typeof e.externalValue == "string";
1153
+ }
1154
+ class kn {
1155
+ source;
1156
+ pointer;
1157
+ constructor(t, n) {
1158
+ this.source = t, this.pointer = n;
1159
+ }
1160
+ child(t) {
1161
+ return new kn(this.source, Ce(this.pointer, (Array.isArray(t) ? t : [t]).map(Oe).join("/")));
1162
+ }
1163
+ key() {
1164
+ return { ...this, reportOnKey: !0 };
1165
+ }
1166
+ get absolutePointer() {
1167
+ return this.source.absoluteRef + (this.pointer === "#/" ? "" : this.pointer);
1168
+ }
1169
+ }
1170
+ function Rr(e) {
1171
+ const t = e.indexOf("~") === -1 ? e : e.replaceAll("~1", "/").replaceAll("~0", "~");
1172
+ try {
1173
+ return decodeURIComponent(t);
1174
+ } catch {
1175
+ return t;
1176
+ }
1177
+ }
1178
+ function Oe(e) {
1179
+ return typeof e == "number" || e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replaceAll("~", "~0").replaceAll("/", "~1");
1180
+ }
1181
+ function br(e) {
1182
+ const [t, n = ""] = e.split("#/");
1183
+ return {
1184
+ uri: (t.endsWith("#") ? t.slice(0, -1) : t) || null,
1185
+ pointer: xr(n)
1186
+ };
1187
+ }
1188
+ function xr(e) {
1189
+ return e.split("/").map(Rr).filter(pr);
1190
+ }
1191
+ function ha(e) {
1192
+ const t = e.split("/");
1193
+ return t[t.length - 1];
1194
+ }
1195
+ function ga(e) {
1196
+ const t = e.split(/[\/\\]/);
1197
+ return t[t.length - 1].replace(/\.[^.]+$/, "");
1198
+ }
1199
+ function Pe(e) {
1200
+ return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("file://") || e.startsWith("data:");
1201
+ }
1202
+ function ma(e) {
1203
+ return Xe.extname(e) ? Pe(e) ? e.substring(0, e.lastIndexOf("/")) : Xe.dirname(e) : e;
1204
+ }
1205
+ function Aa(e, t) {
1206
+ return Pe(e) ? new URL(t, e.endsWith("/") ? e : `${e}/`).href : Xe.resolve(e, t);
1207
+ }
1208
+ function ya(e) {
1209
+ return typeof e == "string" && (e.startsWith("#") || Pe(e) || e.startsWith("./") || e.startsWith("../") || e.indexOf("/") > -1 || /\.(ya?ml|json)$/i.test(e));
1210
+ }
1211
+ function _r(e) {
1212
+ return /^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e);
1213
+ }
1214
+ function Ea(e, t, n) {
1215
+ if (!Ie(t.node))
1216
+ n.parent[n.key] = t.node;
1217
+ else {
1218
+ delete e.$ref;
1219
+ const r = Object.assign({}, t.node, e);
1220
+ Object.assign(e, r);
1221
+ }
1222
+ }
1223
+ var O = /* @__PURE__ */ Symbol("NOT_RESOLVED"), Xt = /* @__PURE__ */ Symbol("MERGE_KEY");
1224
+ function te(e, t) {
1225
+ return {
1226
+ tagName: e,
1227
+ nodeKind: "scalar",
1228
+ implicit: t.implicit ?? !1,
1229
+ matchByTagPrefix: t.matchByTagPrefix ?? !1,
1230
+ implicitFirstChars: t.implicitFirstChars ?? null,
1231
+ resolve: t.resolve,
1232
+ identify: t.identify ?? null,
1233
+ represent: t.represent ?? ((n) => String(n)),
1234
+ representTagName: t.representTagName ?? null
1235
+ };
1236
+ }
1237
+ function Qt(e, t) {
1238
+ const n = t.finalize === void 0;
1239
+ return {
1240
+ tagName: e,
1241
+ nodeKind: "sequence",
1242
+ implicit: !1,
1243
+ matchByTagPrefix: t.matchByTagPrefix ?? !1,
1244
+ create: t.create,
1245
+ addItem: t.addItem,
1246
+ finalize: t.finalize ?? ((r) => r),
1247
+ carrierIsResult: n,
1248
+ identify: t.identify ?? null,
1249
+ represent: t.represent ?? ((r) => r),
1250
+ representTagName: t.representTagName ?? null
1251
+ };
1252
+ }
1253
+ function pt(e, t) {
1254
+ const n = t.finalize === void 0;
1255
+ return {
1256
+ tagName: e,
1257
+ nodeKind: "mapping",
1258
+ implicit: !1,
1259
+ matchByTagPrefix: t.matchByTagPrefix ?? !1,
1260
+ create: t.create,
1261
+ addPair: t.addPair,
1262
+ has: t.has,
1263
+ keys: t.keys,
1264
+ get: t.get,
1265
+ finalize: t.finalize ?? ((r) => r),
1266
+ carrierIsResult: n,
1267
+ identify: t.identify ?? null,
1268
+ represent: t.represent ?? ((r) => r),
1269
+ representTagName: t.representTagName ?? null
1270
+ };
1271
+ }
1272
+ var Ir = te("tag:yaml.org,2002:str", {
1273
+ resolve: (e) => e,
1274
+ identify: (e) => typeof e == "string"
1275
+ }), wr = [
1276
+ "",
1277
+ "~",
1278
+ "null",
1279
+ "Null",
1280
+ "NULL"
1281
+ ], Nr = te("tag:yaml.org,2002:null", {
1282
+ implicit: !0,
1283
+ implicitFirstChars: [
1284
+ "",
1285
+ "~",
1286
+ "n",
1287
+ "N"
1288
+ ],
1289
+ resolve: (e) => wr.indexOf(e) !== -1 ? null : O,
1290
+ identify: (e) => e === null,
1291
+ represent: () => "null"
1292
+ }), $r = te("tag:yaml.org,2002:null", {
1293
+ implicit: !0,
1294
+ implicitFirstChars: ["n"],
1295
+ resolve: (e, t) => e === "null" || t && e === "" ? null : O,
1296
+ identify: (e) => e === null,
1297
+ represent: () => "null"
1298
+ }), Lr = [
1299
+ "",
1300
+ "~",
1301
+ "null",
1302
+ "Null",
1303
+ "NULL"
1304
+ ], kr = te("tag:yaml.org,2002:null", {
1305
+ implicit: !0,
1306
+ implicitFirstChars: [
1307
+ "",
1308
+ "~",
1309
+ "n",
1310
+ "N"
1311
+ ],
1312
+ resolve: (e) => Lr.indexOf(e) !== -1 ? null : O,
1313
+ identify: (e) => e === null,
1314
+ represent: () => "null"
1315
+ }), Or = [
1316
+ "true",
1317
+ "True",
1318
+ "TRUE"
1319
+ ], Pr = [
1320
+ "false",
1321
+ "False",
1322
+ "FALSE"
1323
+ ], Fr = te("tag:yaml.org,2002:bool", {
1324
+ implicit: !0,
1325
+ implicitFirstChars: [
1326
+ "t",
1327
+ "T",
1328
+ "f",
1329
+ "F"
1330
+ ],
1331
+ resolve: (e) => Or.indexOf(e) !== -1 ? !0 : Pr.indexOf(e) !== -1 ? !1 : O,
1332
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
1333
+ represent: (e) => e ? "true" : "false"
1334
+ }), Hr = ["true"], Mr = ["false"], Br = te("tag:yaml.org,2002:bool", {
1335
+ implicit: !0,
1336
+ implicitFirstChars: ["t", "f"],
1337
+ resolve: (e) => Hr.indexOf(e) !== -1 ? !0 : Mr.indexOf(e) !== -1 ? !1 : O,
1338
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
1339
+ represent: (e) => e ? "true" : "false"
1340
+ }), Dr = [
1341
+ "true",
1342
+ "True",
1343
+ "TRUE",
1344
+ "y",
1345
+ "Y",
1346
+ "yes",
1347
+ "Yes",
1348
+ "YES",
1349
+ "on",
1350
+ "On",
1351
+ "ON"
1352
+ ], Ur = [
1353
+ "false",
1354
+ "False",
1355
+ "FALSE",
1356
+ "n",
1357
+ "N",
1358
+ "no",
1359
+ "No",
1360
+ "NO",
1361
+ "off",
1362
+ "Off",
1363
+ "OFF"
1364
+ ], qr = te("tag:yaml.org,2002:bool", {
1365
+ implicit: !0,
1366
+ implicitFirstChars: [
1367
+ "y",
1368
+ "Y",
1369
+ "n",
1370
+ "N",
1371
+ "t",
1372
+ "T",
1373
+ "f",
1374
+ "F",
1375
+ "o",
1376
+ "O"
1377
+ ],
1378
+ resolve: (e) => Dr.indexOf(e) !== -1 ? !0 : Ur.indexOf(e) !== -1 ? !1 : O,
1379
+ identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]",
1380
+ represent: (e) => e ? "true" : "false"
1381
+ }), Kr = /* @__PURE__ */ new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"), Gr = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
1382
+ function Yr(e) {
1383
+ let t = e, n = 1;
1384
+ return (t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b") ? n * parseInt(t.slice(2), 2) : t.startsWith("0o") ? n * parseInt(t.slice(2), 8) : t.startsWith("0x") ? n * parseInt(t.slice(2), 16) : n * parseInt(t, 10);
1385
+ }
1386
+ function Wr(e, t) {
1387
+ if (t) {
1388
+ if (!Gr.test(e)) return O;
1389
+ } else if (!Kr.test(e)) return O;
1390
+ const n = Yr(e);
1391
+ return Number.isFinite(n) ? n : O;
1392
+ }
1393
+ var On = te("tag:yaml.org,2002:int", {
1394
+ implicit: !0,
1395
+ implicitFirstChars: [
1396
+ "-",
1397
+ "+",
1398
+ ..."0123456789"
1399
+ ],
1400
+ resolve: Wr,
1401
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
1402
+ represent: (e) => e.toString(10)
1403
+ }), jr = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)$"), Vr = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");
1404
+ function Xr(e) {
1405
+ let t = e, n = 1;
1406
+ return (t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b") ? n * parseInt(t.slice(2), 2) : t.startsWith("0o") ? n * parseInt(t.slice(2), 8) : t.startsWith("0x") ? n * parseInt(t.slice(2), 16) : n * parseInt(t, 10);
1407
+ }
1408
+ function Qr(e, t) {
1409
+ if (t) {
1410
+ if (!Vr.test(e)) return O;
1411
+ } else if (!jr.test(e)) return O;
1412
+ const n = Xr(e);
1413
+ return Number.isFinite(n) ? n : O;
1414
+ }
1415
+ var zr = te("tag:yaml.org,2002:int", {
1416
+ implicit: !0,
1417
+ implicitFirstChars: ["-", ..."0123456789"],
1418
+ resolve: Qr,
1419
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
1420
+ represent: (e) => e.toString(10)
1421
+ }), Zr = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");
1422
+ function Jr(e) {
1423
+ let t = e.replace(/_/g, ""), n = 1;
1424
+ if ((t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b")) return n * parseInt(t.slice(2), 2);
1425
+ if (t.startsWith("0x")) return n * parseInt(t.slice(2), 16);
1426
+ if (t.includes(":")) {
1427
+ let r = 0;
1428
+ for (const i of t.split(":")) r = r * 60 + Number(i);
1429
+ return n * r;
1430
+ }
1431
+ return t !== "0" && t[0] === "0" ? n * parseInt(t, 8) : n * parseInt(t, 10);
1432
+ }
1433
+ function ei(e) {
1434
+ if (!Zr.test(e)) return O;
1435
+ const t = Jr(e);
1436
+ return Number.isFinite(t) ? t : O;
1437
+ }
1438
+ var Lt = te("tag:yaml.org,2002:int", {
1439
+ implicit: !0,
1440
+ implicitFirstChars: [
1441
+ "-",
1442
+ "+",
1443
+ ..."0123456789"
1444
+ ],
1445
+ resolve: ei,
1446
+ identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0,
1447
+ represent: (e) => e.toString(10)
1448
+ }), ti = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), ni = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
1449
+ function ri(e) {
1450
+ if (!ti.test(e)) return O;
1451
+ let t = e.toLowerCase();
1452
+ const n = t[0] === "-" ? -1 : 1;
1453
+ if ("+-".includes(t[0]) && (t = t.slice(1)), t === ".inf") return n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
1454
+ if (t === ".nan") return NaN;
1455
+ const r = n * parseFloat(t);
1456
+ return Number.isFinite(r) || ni.test(e) ? r : O;
1457
+ }
1458
+ function ii(e) {
1459
+ if (isNaN(e)) return ".nan";
1460
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
1461
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
1462
+ if (Object.is(e, -0)) return "-0.0";
1463
+ const t = e.toString(10);
1464
+ return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
1465
+ }
1466
+ var Pn = te("tag:yaml.org,2002:float", {
1467
+ implicit: !0,
1468
+ implicitFirstChars: [
1469
+ "-",
1470
+ "+",
1471
+ ".",
1472
+ ..."0123456789"
1473
+ ],
1474
+ resolve: ri,
1475
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
1476
+ represent: ii
1477
+ }), oi = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"), ai = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
1478
+ function si(e, t) {
1479
+ if (t) {
1480
+ if (!ai.test(e)) return O;
1481
+ let r = e.toLowerCase();
1482
+ const i = r[0] === "-" ? -1 : 1;
1483
+ if ("+-".includes(r[0]) && (r = r.slice(1)), r === ".inf") return i === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
1484
+ if (r === ".nan") return NaN;
1485
+ const o = i * parseFloat(r);
1486
+ return Number.isFinite(o) ? o : O;
1487
+ }
1488
+ if (!oi.test(e)) return O;
1489
+ const n = Number(e);
1490
+ return Number.isFinite(n) ? n : O;
1491
+ }
1492
+ function li(e) {
1493
+ if (isNaN(e)) return ".nan";
1494
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
1495
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
1496
+ if (Object.is(e, -0)) return "-0.0";
1497
+ const t = e.toString(10);
1498
+ return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
1499
+ }
1500
+ var ci = te("tag:yaml.org,2002:float", {
1501
+ implicit: !0,
1502
+ implicitFirstChars: ["-", ..."0123456789"],
1503
+ resolve: si,
1504
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
1505
+ represent: li
1506
+ }), ui = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), fi = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
1507
+ function pi(e) {
1508
+ if (!ui.test(e)) return O;
1509
+ let t = e.toLowerCase().replace(/_/g, "");
1510
+ const n = t[0] === "-" ? -1 : 1;
1511
+ if ("+-".includes(t[0]) && (t = t.slice(1)), t === ".inf") return n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
1512
+ if (t === ".nan") return NaN;
1513
+ let r = 0;
1514
+ if (t.includes(":")) {
1515
+ for (const i of t.split(":")) r = r * 60 + Number(i);
1516
+ r *= n;
1517
+ } else r = n * parseFloat(t);
1518
+ return Number.isFinite(r) || fi.test(e) ? r : O;
1519
+ }
1520
+ function di(e) {
1521
+ if (isNaN(e)) return ".nan";
1522
+ if (e === Number.POSITIVE_INFINITY) return ".inf";
1523
+ if (e === Number.NEGATIVE_INFINITY) return "-.inf";
1524
+ if (Object.is(e, -0)) return "-0.0";
1525
+ const t = e.toString(10);
1526
+ return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t;
1527
+ }
1528
+ var kt = te("tag:yaml.org,2002:float", {
1529
+ implicit: !0,
1530
+ implicitFirstChars: [
1531
+ "-",
1532
+ "+",
1533
+ ".",
1534
+ ..."0123456789"
1535
+ ],
1536
+ resolve: pi,
1537
+ identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0),
1538
+ represent: di
1539
+ }), Fn = te("tag:yaml.org,2002:merge", {
1540
+ implicit: !0,
1541
+ implicitFirstChars: ["<"],
1542
+ resolve: (e, t) => e === "<<" || t && e === "" ? Xt : O
1543
+ }), hi = /^[A-Za-z0-9+/]*={0,2}$/;
1544
+ function gi(e) {
1545
+ const t = e.replace(/\s/g, "");
1546
+ if (t.length % 4 !== 0 || !hi.test(t)) return O;
1547
+ const n = atob(t), r = new Uint8Array(n.length);
1548
+ for (let i = 0; i < n.length; i++) r[i] = n.charCodeAt(i);
1549
+ return r;
1550
+ }
1551
+ function mi(e) {
1552
+ let t = "";
1553
+ for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]);
1554
+ return btoa(t);
1555
+ }
1556
+ var Hn = te("tag:yaml.org,2002:binary", {
1557
+ resolve: gi,
1558
+ identify: (e) => Object.prototype.toString.call(e) === "[object Uint8Array]",
1559
+ represent: mi
1560
+ }), Ai = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), yi = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
1561
+ function Ei(e) {
1562
+ let t = Ai.exec(e);
1563
+ if (t === null && (t = yi.exec(e)), t === null) return O;
1564
+ const n = +t[1], r = +t[2] - 1, i = +t[3];
1565
+ if (!t[4]) {
1566
+ const c = new Date(Date.UTC(n, r, i));
1567
+ return c.getUTCFullYear() !== n || c.getUTCMonth() !== r || c.getUTCDate() !== i ? O : c;
1568
+ }
1569
+ const o = +t[4], a = +t[5], s = +t[6];
1570
+ let l = 0;
1571
+ if (o > 23 || a > 59 || s > 59) return O;
1572
+ if (t[7]) {
1573
+ let c = t[7].slice(0, 3);
1574
+ for (; c.length < 3; ) c += "0";
1575
+ l = +c;
1576
+ }
1577
+ const u = new Date(Date.UTC(n, r, i, o, a, s, l));
1578
+ if (u.getUTCFullYear() !== n || u.getUTCMonth() !== r || u.getUTCDate() !== i) return O;
1579
+ if (t[9]) {
1580
+ const c = +t[10], y = +(t[11] || 0);
1581
+ if (c > 23 || y > 59) return O;
1582
+ const g = (c * 60 + y) * 6e4;
1583
+ u.setTime(u.getTime() - (t[9] === "-" ? -g : g));
1584
+ }
1585
+ return u;
1586
+ }
1587
+ var Si = te("tag:yaml.org,2002:timestamp", {
1588
+ implicit: !0,
1589
+ implicitFirstChars: [..."0123456789"],
1590
+ resolve: Ei,
1591
+ identify: (e) => e instanceof Date,
1592
+ represent: (e) => e.toISOString()
1593
+ }), Ci = Qt("tag:yaml.org,2002:seq", {
1594
+ create: () => [],
1595
+ addItem: (e, t) => {
1596
+ e.push(t);
1597
+ },
1598
+ identify: Array.isArray
1599
+ });
1600
+ function dt(e) {
1601
+ if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
1602
+ const t = Object.getPrototypeOf(e);
1603
+ return t === null || t === Object.prototype;
1604
+ }
1605
+ function Ot(e, t) {
1606
+ const n = {};
1607
+ for (const r of t) e[r] !== void 0 && (n[r] = e[r]);
1608
+ return n;
1609
+ }
1610
+ var Mn = Qt("tag:yaml.org,2002:omap", {
1611
+ create: () => ({
1612
+ list: [],
1613
+ seen: /* @__PURE__ */ new Set()
1614
+ }),
1615
+ addItem: (e, t) => {
1616
+ let n;
1617
+ if (t instanceof Map) {
1618
+ if (t.size !== 1) return "cannot resolve an ordered map item";
1619
+ n = t.keys().next().value;
1620
+ } else if (dt(t)) {
1621
+ const r = Object.keys(t);
1622
+ if (r.length !== 1) return "cannot resolve an ordered map item";
1623
+ n = r[0];
1624
+ } else return "cannot resolve an ordered map item";
1625
+ return e.seen.has(n) ? "duplicate key in ordered map" : (e.seen.add(n), e.list.push(t), "");
1626
+ },
1627
+ finalize: (e) => e.list
1628
+ }), Bn = Qt("tag:yaml.org,2002:pairs", {
1629
+ create: () => [],
1630
+ addItem: (e, t) => {
1631
+ if (t instanceof Map)
1632
+ return t.size !== 1 ? "cannot resolve a pairs item" : (e.push(t.entries().next().value), "");
1633
+ if (Object.prototype.toString.call(t) !== "[object Object]") return "cannot resolve a pairs item";
1634
+ const n = t, r = Object.keys(n);
1635
+ return r.length !== 1 ? "cannot resolve a pairs item" : (e.push([r[0], n[r[0]]]), "");
1636
+ }
1637
+ }), Ti = pt("tag:yaml.org,2002:map", {
1638
+ create: () => ({}),
1639
+ identify: dt,
1640
+ represent: (e) => {
1641
+ const t = /* @__PURE__ */ new Map();
1642
+ for (const n of Object.keys(e)) t.set(n, e[n]);
1643
+ return t;
1644
+ },
1645
+ addPair: (e, t, n) => {
1646
+ if (t !== null && typeof t == "object") return "object-based map does not support complex keys";
1647
+ const r = String(t);
1648
+ return r === "__proto__" ? Object.defineProperty(e, r, {
1649
+ value: n,
1650
+ enumerable: !0,
1651
+ configurable: !0,
1652
+ writable: !0
1653
+ }) : e[r] = n, "";
1654
+ },
1655
+ has: (e, t) => t !== null && typeof t == "object" ? !1 : Object.prototype.hasOwnProperty.call(e, String(t)),
1656
+ keys: (e) => Object.keys(e),
1657
+ get: (e, t) => e[String(t)]
1658
+ }), Dn = pt("tag:yaml.org,2002:set", {
1659
+ create: () => /* @__PURE__ */ new Set(),
1660
+ identify: (e) => e instanceof Set,
1661
+ represent: (e) => {
1662
+ const t = /* @__PURE__ */ new Map();
1663
+ for (const n of e) t.set(n, null);
1664
+ return t;
1665
+ },
1666
+ addPair: (e, t, n) => n !== null ? "cannot resolve a set item" : (e.add(t), ""),
1667
+ has: (e, t) => e.has(t),
1668
+ keys: (e) => e.keys(),
1669
+ get: () => null
1670
+ });
1671
+ function vi() {
1672
+ return {
1673
+ scalar: {},
1674
+ sequence: {},
1675
+ mapping: {}
1676
+ };
1677
+ }
1678
+ function Ri() {
1679
+ return {
1680
+ scalar: [],
1681
+ sequence: [],
1682
+ mapping: []
1683
+ };
1684
+ }
1685
+ function bi(e) {
1686
+ const t = [];
1687
+ for (const n of e) {
1688
+ let r = t.length;
1689
+ for (let i = 0; i < t.length; i++) {
1690
+ const o = t[i];
1691
+ if (o.nodeKind === n.nodeKind && o.tagName === n.tagName && o.matchByTagPrefix === n.matchByTagPrefix) {
1692
+ r = i;
1693
+ break;
1694
+ }
1695
+ }
1696
+ t[r] = n;
1697
+ }
1698
+ return t;
1699
+ }
1700
+ var ht = class Un {
1701
+ tags;
1702
+ implicitScalarTags;
1703
+ implicitScalarByFirstChar;
1704
+ implicitScalarAnyFirstChar;
1705
+ defaultScalarTag;
1706
+ defaultSequenceTag;
1707
+ defaultMappingTag;
1708
+ exact;
1709
+ prefix;
1710
+ constructor(t) {
1711
+ const n = bi(t), r = [], i = vi(), o = Ri();
1712
+ for (const c of n) {
1713
+ if (c.nodeKind === "scalar" && c.implicit) {
1714
+ if (c.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix");
1715
+ r.push(c);
1716
+ }
1717
+ switch (c.nodeKind) {
1718
+ case "scalar":
1719
+ c.matchByTagPrefix ? o.scalar.push(c) : i.scalar[c.tagName] = c;
1720
+ break;
1721
+ case "sequence":
1722
+ c.matchByTagPrefix ? o.sequence.push(c) : i.sequence[c.tagName] = c;
1723
+ break;
1724
+ case "mapping":
1725
+ c.matchByTagPrefix ? o.mapping.push(c) : i.mapping[c.tagName] = c;
1726
+ break;
1727
+ }
1728
+ }
1729
+ const a = r.filter((c) => c.implicitFirstChars === null), s = /* @__PURE__ */ new Set();
1730
+ for (const c of r) if (c.implicitFirstChars !== null) for (const y of c.implicitFirstChars) s.add(y);
1731
+ const l = /* @__PURE__ */ new Map();
1732
+ for (const c of s) l.set(c, r.filter((y) => y.implicitFirstChars === null || y.implicitFirstChars.indexOf(c) !== -1));
1733
+ const u = i.scalar["tag:yaml.org,2002:str"];
1734
+ if (!u) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");
1735
+ this.tags = n, this.implicitScalarTags = r, this.implicitScalarByFirstChar = l, this.implicitScalarAnyFirstChar = a, this.defaultScalarTag = u, this.defaultSequenceTag = i.sequence["tag:yaml.org,2002:seq"], this.defaultMappingTag = i.mapping["tag:yaml.org,2002:map"], this.exact = i, this.prefix = o;
1736
+ }
1737
+ withTags(...t) {
1738
+ let n = [];
1739
+ for (const r of t) n = n.concat(r);
1740
+ return new Un([...this.tags, ...n]);
1741
+ }
1742
+ }, zt = new ht([
1743
+ Ir,
1744
+ Ci,
1745
+ Ti
1746
+ ]);
1747
+ new ht([
1748
+ ...zt.tags,
1749
+ $r,
1750
+ Br,
1751
+ zr,
1752
+ ci
1753
+ ]);
1754
+ var qn = new ht([
1755
+ ...zt.tags,
1756
+ Nr,
1757
+ Fr,
1758
+ On,
1759
+ Pn
1760
+ ]), xi = new ht([
1761
+ ...zt.tags,
1762
+ kr,
1763
+ qr,
1764
+ Lt,
1765
+ kt,
1766
+ Si,
1767
+ Fn,
1768
+ Hn,
1769
+ Mn,
1770
+ Bn,
1771
+ Dn
1772
+ ]);
1773
+ pt("tag:yaml.org,2002:map", {
1774
+ create: () => /* @__PURE__ */ new Map(),
1775
+ addPair: (e, t, n) => (e.set(t, n), ""),
1776
+ has: (e, t) => e.has(t),
1777
+ keys: (e) => e.keys(),
1778
+ get: (e, t) => e.get(t),
1779
+ identify: (e) => e instanceof Map || dt(e),
1780
+ represent: (e) => {
1781
+ if (e instanceof Map) return e;
1782
+ const t = /* @__PURE__ */ new Map(), n = e;
1783
+ for (const r of Object.keys(n)) t.set(r, n[r]);
1784
+ return t;
1785
+ }
1786
+ });
1787
+ function hn(e) {
1788
+ if (Array.isArray(e)) {
1789
+ const t = Array.prototype.slice.call(e);
1790
+ for (let n = 0; n < t.length; n++) {
1791
+ if (Array.isArray(t[n])) return null;
1792
+ typeof t[n] == "object" && Object.prototype.toString.call(t[n]) === "[object Object]" && (t[n] = "[object Object]");
1793
+ }
1794
+ return String(t);
1795
+ }
1796
+ return typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" ? "[object Object]" : String(e);
1797
+ }
1798
+ pt("tag:yaml.org,2002:map", {
1799
+ create: () => ({}),
1800
+ identify: dt,
1801
+ represent: (e) => {
1802
+ const t = /* @__PURE__ */ new Map();
1803
+ for (const n of Object.keys(e)) t.set(n, e[n]);
1804
+ return t;
1805
+ },
1806
+ addPair: (e, t, n) => {
1807
+ const r = hn(t);
1808
+ return r === null ? "nested arrays are not supported inside keys" : (r === "__proto__" ? Object.defineProperty(e, r, {
1809
+ value: n,
1810
+ enumerable: !0,
1811
+ configurable: !0,
1812
+ writable: !0
1813
+ }) : e[r] = n, "");
1814
+ },
1815
+ has: (e, t) => {
1816
+ const n = hn(t);
1817
+ return n !== null && Object.prototype.hasOwnProperty.call(e, n);
1818
+ },
1819
+ keys: (e) => Object.keys(e),
1820
+ get: (e, t) => e[String(t)]
1821
+ });
1822
+ var _i = {
1823
+ maxLength: 79,
1824
+ indent: 1,
1825
+ linesBefore: 3,
1826
+ linesAfter: 2
1827
+ };
1828
+ function bt(e, t, n, r, i) {
1829
+ let o = "", a = "";
1830
+ const s = Math.floor(i / 2) - 1;
1831
+ return r - t > s && (o = " ... ", t = r - s + o.length), n - r > s && (a = " ...", n = r + s - a.length), {
1832
+ str: o + e.slice(t, n).replace(/\t/g, "→") + a,
1833
+ pos: r - t + o.length
1834
+ };
1835
+ }
1836
+ function xt(e, t) {
1837
+ return " ".repeat(Math.max(t - e.length, 0)) + e;
1838
+ }
1839
+ function Ii(e, t) {
1840
+ if (!e.buffer) return null;
1841
+ const n = {
1842
+ ..._i,
1843
+ ...t
1844
+ }, r = /\r?\n|\r|\0/g, i = [0], o = [];
1845
+ let a, s = -1;
1846
+ for (; a = r.exec(e.buffer); )
1847
+ o.push(a.index), i.push(a.index + a[0].length), e.position <= a.index && s < 0 && (s = i.length - 2);
1848
+ s < 0 && (s = i.length - 1);
1849
+ let l = "";
1850
+ const u = Math.min(e.line + n.linesAfter, o.length).toString().length, c = n.maxLength - (n.indent + u + 3);
1851
+ for (let g = 1; g <= n.linesBefore && !(s - g < 0); g++) {
1852
+ const C = bt(e.buffer, i[s - g], o[s - g], e.position - (i[s] - i[s - g]), c);
1853
+ l = `${" ".repeat(n.indent)}${xt((e.line - g + 1).toString(), u)} | ${C.str}
1854
+ ${l}`;
1855
+ }
1856
+ const y = bt(e.buffer, i[s], o[s], e.position, c);
1857
+ l += `${" ".repeat(n.indent)}${xt((e.line + 1).toString(), u)} | ${y.str}
1858
+ `, l += `${"-".repeat(n.indent + u + 3 + y.pos)}^
1859
+ `;
1860
+ for (let g = 1; g <= n.linesAfter && !(s + g >= o.length); g++) {
1861
+ const C = bt(e.buffer, i[s + g], o[s + g], e.position - (i[s] - i[s + g]), c);
1862
+ l += `${" ".repeat(n.indent)}${xt((e.line + g + 1).toString(), u)} | ${C.str}
1863
+ `;
1864
+ }
1865
+ return l.replace(/\n$/, "");
1866
+ }
1867
+ function gn(e, t) {
1868
+ let n = "";
1869
+ return e.mark ? (e.mark.name && (n += `in "${e.mark.name}" `), n += `(${e.mark.line + 1}:${e.mark.column + 1})`, !t && e.mark.snippet && (n += `
1870
+
1871
+ ${e.mark.snippet}`), `${e.reason} ${n}`) : e.reason;
1872
+ }
1873
+ var gt = class extends Error {
1874
+ reason;
1875
+ mark;
1876
+ constructor(e, t) {
1877
+ super(), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = gn(this, !1), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
1878
+ }
1879
+ toString(e) {
1880
+ return `${this.name}: ${gn(this, e)}`;
1881
+ }
1882
+ };
1883
+ function mt(e, t, n, r = "") {
1884
+ let i = 0, o = 0;
1885
+ for (let s = 0; s < t; s++) {
1886
+ const l = e.charCodeAt(s);
1887
+ l === 10 ? (i++, o = s + 1) : l === 13 && (i++, e.charCodeAt(s + 1) === 10 && s++, o = s + 1);
1888
+ }
1889
+ const a = {
1890
+ name: r,
1891
+ buffer: e,
1892
+ position: t,
1893
+ line: i,
1894
+ column: t - o
1895
+ };
1896
+ throw a.snippet = Ii(a), new gt(n, a);
1897
+ }
1898
+ var wi = -1;
1899
+ function mn(e) {
1900
+ switch (e) {
1901
+ case 48:
1902
+ return "\0";
1903
+ case 97:
1904
+ return "\x07";
1905
+ case 98:
1906
+ return "\b";
1907
+ case 116:
1908
+ return " ";
1909
+ case 9:
1910
+ return " ";
1911
+ case 110:
1912
+ return `
1913
+ `;
1914
+ case 118:
1915
+ return "\v";
1916
+ case 102:
1917
+ return "\f";
1918
+ case 114:
1919
+ return "\r";
1920
+ case 101:
1921
+ return "\x1B";
1922
+ case 32:
1923
+ return " ";
1924
+ case 34:
1925
+ return '"';
1926
+ case 47:
1927
+ return "/";
1928
+ case 92:
1929
+ return "\\";
1930
+ case 78:
1931
+ return "…";
1932
+ case 95:
1933
+ return " ";
1934
+ case 76:
1935
+ return "\u2028";
1936
+ case 80:
1937
+ return "\u2029";
1938
+ default:
1939
+ return "";
1940
+ }
1941
+ }
1942
+ var Kn = new Array(256), Gn = new Array(256);
1943
+ for (let e = 0; e < 256; e++)
1944
+ Kn[e] = mn(e) ? 1 : 0, Gn[e] = mn(e);
1945
+ function Ni(e) {
1946
+ return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
1947
+ }
1948
+ function $i(e) {
1949
+ return e >= 48 && e <= 57 ? e - 48 : (e | 32) - 97 + 10;
1950
+ }
1951
+ function Li(e) {
1952
+ return e === 120 ? 2 : e === 117 ? 4 : 8;
1953
+ }
1954
+ function st(e, t, n) {
1955
+ let r = 0;
1956
+ for (; t < n; ) {
1957
+ const i = e.charCodeAt(t);
1958
+ if (i === 10)
1959
+ r++, t++;
1960
+ else if (i === 13)
1961
+ r++, t++, e.charCodeAt(t) === 10 && t++;
1962
+ else if (i === 32 || i === 9) t++;
1963
+ else break;
1964
+ }
1965
+ return {
1966
+ position: t,
1967
+ breaks: r
1968
+ };
1969
+ }
1970
+ function Zt(e) {
1971
+ return e === 1 ? " " : `
1972
+ `.repeat(e - 1);
1973
+ }
1974
+ function ki(e, t, n) {
1975
+ let r = "", i = t, o = t, a = t;
1976
+ for (; i < n; ) {
1977
+ const s = e.charCodeAt(i);
1978
+ if (s === 10 || s === 13) {
1979
+ r += e.slice(o, a);
1980
+ const l = st(e, i, n);
1981
+ r += Zt(l.breaks), i = o = a = l.position;
1982
+ } else
1983
+ i++, s !== 32 && s !== 9 && (a = i);
1984
+ }
1985
+ return r + e.slice(o, a);
1986
+ }
1987
+ function Oi(e, t, n) {
1988
+ let r = "", i = t, o = t, a = t;
1989
+ for (; i < n; ) {
1990
+ const s = e.charCodeAt(i);
1991
+ if (s === 39)
1992
+ r += e.slice(o, i) + "'", i += 2, o = a = i;
1993
+ else if (s === 10 || s === 13) {
1994
+ r += e.slice(o, a);
1995
+ const l = st(e, i, n);
1996
+ r += Zt(l.breaks), i = o = a = l.position;
1997
+ } else
1998
+ i++, s !== 32 && s !== 9 && (a = i);
1999
+ }
2000
+ return r + e.slice(o, n);
2001
+ }
2002
+ function Pi(e, t, n) {
2003
+ let r = "", i = t, o = t, a = t;
2004
+ for (; i < n; ) {
2005
+ const s = e.charCodeAt(i);
2006
+ if (s === 92) {
2007
+ r += e.slice(o, i), i++;
2008
+ const l = e.charCodeAt(i);
2009
+ if (l === 10 || l === 13) i = st(e, i, n).position;
2010
+ else if (l < 256 && Kn[l])
2011
+ r += Gn[l], i++;
2012
+ else {
2013
+ let u = Li(l), c = 0;
2014
+ for (; u > 0; u--) {
2015
+ i++;
2016
+ const y = $i(e.charCodeAt(i));
2017
+ c = (c << 4) + y;
2018
+ }
2019
+ r += Ni(c), i++;
2020
+ }
2021
+ o = a = i;
2022
+ } else if (s === 10 || s === 13) {
2023
+ r += e.slice(o, a);
2024
+ const l = st(e, i, n);
2025
+ r += Zt(l.breaks), i = o = a = l.position;
2026
+ } else
2027
+ i++, s !== 32 && s !== 9 && (a = i);
2028
+ }
2029
+ return r + e.slice(o, n);
2030
+ }
2031
+ function An(e, t, n, r, i, o) {
2032
+ const a = r < 0 ? 0 : r, s = e.slice(t, n).replace(/\r\n?/g, `
2033
+ `), l = s === "" ? [] : (s.endsWith(`
2034
+ `) ? s.slice(0, -1) : s).split(`
2035
+ `);
2036
+ let u = "", c = !1, y = 0, g = !1;
2037
+ for (const C of l) {
2038
+ let E = 0;
2039
+ for (; E < a && C.charCodeAt(E) === 32; ) E++;
2040
+ if (r < 0 || E >= C.length) {
2041
+ y++;
2042
+ continue;
2043
+ }
2044
+ const w = C.slice(a), F = w.charCodeAt(0);
2045
+ o ? F === 32 || F === 9 ? (g = !0, u += `
2046
+ `.repeat(c ? 1 + y : y)) : g ? (g = !1, u += `
2047
+ `.repeat(y + 1)) : y === 0 ? c && (u += " ") : u += `
2048
+ `.repeat(y) : u += `
2049
+ `.repeat(c ? 1 + y : y), u += w, c = !0, y = 0;
2050
+ }
2051
+ return i === 3 ? u += `
2052
+ `.repeat(c ? 1 + y : y) : i !== 2 && c && (u += `
2053
+ `), u;
2054
+ }
2055
+ function Fi(e, t) {
2056
+ if (t.valueStart === wi) return "";
2057
+ const { valueStart: n, valueEnd: r } = t;
2058
+ if (t.fast) return e.slice(n, r);
2059
+ switch (t.style) {
2060
+ case 2:
2061
+ return Oi(e, n, r);
2062
+ case 3:
2063
+ return Pi(e, n, r);
2064
+ case 4:
2065
+ return An(e, n, r, t.indent, t.chomping, !1);
2066
+ case 5:
2067
+ return An(e, n, r, t.indent, t.chomping, !0);
2068
+ default:
2069
+ return ki(e, n, r);
2070
+ }
2071
+ }
2072
+ var Hi = {
2073
+ "!": "!",
2074
+ "!!": "tag:yaml.org,2002:"
2075
+ };
2076
+ function _t(e) {
2077
+ return encodeURI(e).replace(/!/g, "%21");
2078
+ }
2079
+ function Yn(e, t) {
2080
+ if (e.startsWith("!<") && e.endsWith(">")) return decodeURIComponent(e.slice(2, -1));
2081
+ const n = e.indexOf("!", 1), r = n === -1 ? "!" : e.slice(0, n + 1), i = t?.[r] ?? Hi[r] ?? r;
2082
+ return decodeURIComponent(i) + decodeURIComponent(e.slice(r.length));
2083
+ }
2084
+ function Wn(e) {
2085
+ let t = e;
2086
+ return t.charCodeAt(0) === 33 ? (t = t.slice(1), `!${_t(t)}`) : t.slice(0, 18) === "tag:yaml.org,2002:" ? `!!${_t(t.slice(18))}` : `!<${_t(t)}>`;
2087
+ }
2088
+ var Fe = -1, Jt = {
2089
+ filename: "",
2090
+ schema: qn,
2091
+ json: !1,
2092
+ maxTotalMergeKeys: 1e4,
2093
+ maxAliases: -1
2094
+ };
2095
+ function Mi(e) {
2096
+ return "tagStart" in e && e.tagStart !== Fe ? e.tagStart : "anchorStart" in e && e.anchorStart !== Fe ? e.anchorStart : "valueStart" in e && e.valueStart !== Fe ? e.valueStart : "start" in e ? e.start : 0;
2097
+ }
2098
+ function se(e, t) {
2099
+ mt(e.source, e.position, t, e.filename);
2100
+ }
2101
+ function jn(e, t, n, r) {
2102
+ try {
2103
+ return n.finalize(r);
2104
+ } catch (i) {
2105
+ if (i instanceof gt) throw i;
2106
+ mt(e.source, t, i instanceof Error ? i.message : String(i), e.filename);
2107
+ }
2108
+ }
2109
+ function ot(e, t, n) {
2110
+ const r = e[n];
2111
+ if (r) return r;
2112
+ for (const i of t) if (n.startsWith(i.tagName)) return i;
2113
+ }
2114
+ function Bi(e, t, n, r, i) {
2115
+ const o = ot(t, n, r);
2116
+ if (o) return o;
2117
+ se(e, `unknown ${i} tag !<${r}>`);
2118
+ }
2119
+ function Di(e, t) {
2120
+ const n = Fi(e.source, t), r = t.tagStart === Fe ? "" : e.source.slice(t.tagStart, t.tagEnd), i = e.schema.defaultScalarTag;
2121
+ if (r !== "") {
2122
+ if (r === "!") return {
2123
+ value: n,
2124
+ tag: i
2125
+ };
2126
+ const o = Yn(r, e.tagHandlers), a = ot(e.schema.exact.scalar, e.schema.prefix.scalar, o);
2127
+ if (a) {
2128
+ const l = a.resolve(n, !0, o);
2129
+ return l === O && se(e, `cannot resolve a node with !<${o}> explicit tag`), {
2130
+ value: l,
2131
+ tag: a
2132
+ };
2133
+ }
2134
+ const s = ot(e.schema.exact.mapping, e.schema.prefix.mapping, o) ?? ot(e.schema.exact.sequence, e.schema.prefix.sequence, o);
2135
+ if (s) {
2136
+ n !== "" && se(e, `cannot resolve a node with !<${o}> explicit tag`);
2137
+ const l = s.create(o);
2138
+ return {
2139
+ value: s.carrierIsResult ? l : jn(e, e.position, s, l),
2140
+ tag: s
2141
+ };
2142
+ }
2143
+ se(e, `unknown scalar tag !<${o}>`);
2144
+ }
2145
+ if (t.style === 1) {
2146
+ const o = e.schema.implicitScalarByFirstChar.get(n.charAt(0)) ?? e.schema.implicitScalarAnyFirstChar;
2147
+ for (const a of o) {
2148
+ const s = a.resolve(n, !1, a.tagName);
2149
+ if (s !== O) return {
2150
+ value: s,
2151
+ tag: a
2152
+ };
2153
+ }
2154
+ }
2155
+ return {
2156
+ value: i.resolve(n, !1, i.tagName),
2157
+ tag: i
2158
+ };
2159
+ }
2160
+ function yn(e, t, n, r, i, o) {
2161
+ const a = t.tagStart === Fe ? "" : e.source.slice(t.tagStart, t.tagEnd), s = a === "" || a === "!" ? i : Yn(a, e.tagHandlers);
2162
+ return {
2163
+ tagName: s,
2164
+ tag: Bi(e, n, r, s, o)
2165
+ };
2166
+ }
2167
+ function Vn(e) {
2168
+ return e.nodeKind === "mapping";
2169
+ }
2170
+ function En(e, t, n, r) {
2171
+ for (const i of r.keys(n)) {
2172
+ if (e.maxTotalMergeKeys !== -1 && ++e.totalMergeKeys > e.maxTotalMergeKeys && se(e, `merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`), t.tag.has(t.value, i)) continue;
2173
+ const o = t.tag.addPair(t.value, i, r.get(n, i));
2174
+ o && se(e, o), (t.overridable ??= /* @__PURE__ */ new Set()).add(i);
2175
+ }
2176
+ }
2177
+ function Ui(e, t, n, r) {
2178
+ if (e.position = t.keyPosition, Vn(r)) En(e, t, n, r);
2179
+ else if (r.nodeKind === "sequence" && Array.isArray(n)) for (const i of n) En(e, t, i, t.tag);
2180
+ else se(e, "cannot merge mappings; the provided source object is unacceptable");
2181
+ }
2182
+ function qi(e, t, n, r, i) {
2183
+ if (e.position = t.keyPosition, n === Xt) {
2184
+ Ui(e, t, r, i);
2185
+ return;
2186
+ }
2187
+ !e.json && t.tag.has(t.value, n) && !t.overridable?.has(n) && se(e, "duplicated mapping key");
2188
+ const o = t.tag.addPair(t.value, n, r);
2189
+ o && se(e, o), t.overridable?.delete(n);
2190
+ }
2191
+ function It(e, t, n) {
2192
+ const r = e.frames[e.frames.length - 1];
2193
+ if (r.kind === "document")
2194
+ r.value = t, r.hasValue = !0;
2195
+ else if (r.kind === "sequence") {
2196
+ r.merge && (Vn(n) || se(e, "cannot merge mappings; the provided source object is unacceptable"));
2197
+ const i = r.tag.addItem(r.value, t, r.index++);
2198
+ i && se(e, i);
2199
+ } else if (r.hasKey) {
2200
+ const i = r.key;
2201
+ r.key = void 0, r.hasKey = !1, qi(e, r, i, t, n);
2202
+ } else
2203
+ r.key = t, r.keyPosition = e.position, r.hasKey = !0;
2204
+ }
2205
+ function wt(e, t, n, r, i) {
2206
+ if (t.anchorStart !== Fe) {
2207
+ const o = {
2208
+ value: n,
2209
+ tag: r,
2210
+ isValueFinal: i
2211
+ };
2212
+ return e.anchors.set(e.source.slice(t.anchorStart, t.anchorEnd), o), o;
2213
+ }
2214
+ return null;
2215
+ }
2216
+ function Ki(e, t) {
2217
+ const n = {
2218
+ ...Jt,
2219
+ ...t,
2220
+ events: e,
2221
+ documents: [],
2222
+ eventIndex: 0,
2223
+ position: 0,
2224
+ frames: [],
2225
+ anchors: /* @__PURE__ */ new Map(),
2226
+ tagHandlers: /* @__PURE__ */ Object.create(null),
2227
+ totalMergeKeys: 0,
2228
+ aliasCount: 0
2229
+ };
2230
+ for (; n.eventIndex < n.events.length; ) {
2231
+ const r = n.events[n.eventIndex++];
2232
+ switch (n.position = Mi(r), r.type) {
2233
+ case 1:
2234
+ n.anchors = /* @__PURE__ */ new Map(), n.aliasCount = 0, n.tagHandlers = /* @__PURE__ */ Object.create(null);
2235
+ for (const i of r.directives) i.kind === "tag" && (n.tagHandlers[i.handle] = i.prefix);
2236
+ n.frames.push({
2237
+ kind: "document",
2238
+ position: n.position,
2239
+ value: void 0,
2240
+ hasValue: !1
2241
+ });
2242
+ break;
2243
+ case 4: {
2244
+ const { value: i, tag: o } = Di(n, r);
2245
+ wt(n, r, i, o, !0), It(n, i, o);
2246
+ break;
2247
+ }
2248
+ case 2: {
2249
+ const i = yn(n, r, n.schema.exact.sequence, n.schema.prefix.sequence, "tag:yaml.org,2002:seq", "sequence"), o = i.tag.create(i.tagName), a = wt(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 === Xt;
2250
+ n.frames.push({
2251
+ kind: "sequence",
2252
+ position: n.position,
2253
+ value: o,
2254
+ tag: i.tag,
2255
+ anchor: a,
2256
+ index: 0,
2257
+ merge: l
2258
+ });
2259
+ break;
2260
+ }
2261
+ case 3: {
2262
+ const i = yn(n, r, n.schema.exact.mapping, n.schema.prefix.mapping, "tag:yaml.org,2002:map", "mapping"), o = i.tag.create(i.tagName), a = wt(n, r, o, i.tag, i.tag.carrierIsResult);
2263
+ n.frames.push({
2264
+ kind: "mapping",
2265
+ position: n.position,
2266
+ value: o,
2267
+ tag: i.tag,
2268
+ anchor: a,
2269
+ key: void 0,
2270
+ keyPosition: n.position,
2271
+ hasKey: !1,
2272
+ overridable: null
2273
+ });
2274
+ break;
2275
+ }
2276
+ case 5: {
2277
+ n.maxAliases !== -1 && ++n.aliasCount > n.maxAliases && se(n, `aliases exceeded maxAliases (${n.maxAliases})`);
2278
+ const i = n.source.slice(r.anchorStart, r.anchorEnd), o = n.anchors.get(i);
2279
+ o || se(n, `unidentified alias "${i}"`), o.isValueFinal || se(n, `recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`), It(n, o.value, o.tag);
2280
+ break;
2281
+ }
2282
+ case 6: {
2283
+ const i = n.frames.pop();
2284
+ if (i.kind === "document") n.documents.push(i.value);
2285
+ else {
2286
+ const o = i.tag.carrierIsResult ? i.value : jn(n, i.position, i.tag, i.value);
2287
+ i.anchor && (i.anchor.value = o, i.anchor.isValueFinal = !0), It(n, o, i.tag);
2288
+ }
2289
+ break;
2290
+ }
2291
+ }
2292
+ }
2293
+ return n.documents;
2294
+ }
2295
+ var H = -1, Xn = Object.prototype.hasOwnProperty, De = 1, Pt = 2, Qn = 3, lt = 4, Gi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Yi = /[,\[\]{}]/, zn = /^(?:!|!!|![0-9A-Za-z-]+!)$/, Ft = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`, Zn = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`, Wi = new RegExp(`^(?:${Ft})*$`), ji = new RegExp(`^(?:${Zn})+$`), Vi = new RegExp(`^(?:!(?:${Ft})*|${Zn}(?:${Ft})*)$`), en = {
2296
+ filename: "",
2297
+ maxDepth: 100
2298
+ };
2299
+ function Xi(e, t, n) {
2300
+ e.events.push({
2301
+ type: 1,
2302
+ explicitStart: t,
2303
+ explicitEnd: n,
2304
+ directives: e.directives
2305
+ });
2306
+ }
2307
+ function Jn(e, t, n, r, i, o, a) {
2308
+ e.events.push({
2309
+ type: 2,
2310
+ start: t,
2311
+ anchorStart: n,
2312
+ anchorEnd: r,
2313
+ tagStart: i,
2314
+ tagEnd: o,
2315
+ style: a
2316
+ });
2317
+ }
2318
+ function Ht(e, t, n, r, i, o, a) {
2319
+ e.events.push({
2320
+ type: 3,
2321
+ start: t,
2322
+ anchorStart: n,
2323
+ anchorEnd: r,
2324
+ tagStart: i,
2325
+ tagEnd: o,
2326
+ style: a
2327
+ });
2328
+ }
2329
+ function Sn(e, t) {
2330
+ e.events.splice(t.eventsLength, 0, {
2331
+ type: 3,
2332
+ start: t.position,
2333
+ anchorStart: H,
2334
+ anchorEnd: H,
2335
+ tagStart: H,
2336
+ tagEnd: H,
2337
+ style: 2
2338
+ });
2339
+ }
2340
+ function qe(e, t, n, r, i, o, a, s, l = 1, u = -1, c = !1) {
2341
+ e.events.push({
2342
+ type: 4,
2343
+ valueStart: t,
2344
+ valueEnd: n,
2345
+ anchorStart: r,
2346
+ anchorEnd: i,
2347
+ tagStart: o,
2348
+ tagEnd: a,
2349
+ style: s,
2350
+ chomping: l,
2351
+ indent: u,
2352
+ fast: c
2353
+ });
2354
+ }
2355
+ function Qi(e, t, n) {
2356
+ e.events.push({
2357
+ type: 5,
2358
+ anchorStart: t,
2359
+ anchorEnd: n
2360
+ });
2361
+ }
2362
+ function He(e) {
2363
+ e.events.push({ type: 6 });
2364
+ }
2365
+ function re(e) {
2366
+ qe(e, H, H, H, H, H, H, 1);
2367
+ }
2368
+ function Cn() {
2369
+ return {
2370
+ anchorStart: H,
2371
+ anchorEnd: H,
2372
+ tagStart: H,
2373
+ tagEnd: H
2374
+ };
2375
+ }
2376
+ function je(e) {
2377
+ return {
2378
+ position: e.position,
2379
+ line: e.line,
2380
+ lineStart: e.lineStart,
2381
+ lineIndent: e.lineIndent,
2382
+ firstTabInLine: e.firstTabInLine,
2383
+ eventsLength: e.events.length
2384
+ };
2385
+ }
2386
+ function Me(e, t) {
2387
+ 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;
2388
+ }
2389
+ function I(e, t) {
2390
+ mt(e.input.slice(0, e.length), e.position, t, e.filename);
2391
+ }
2392
+ function z(e) {
2393
+ return e === 10 || e === 13;
2394
+ }
2395
+ function Ne(e) {
2396
+ return e === 9 || e === 32;
2397
+ }
2398
+ function pe(e) {
2399
+ return Ne(e) || z(e);
2400
+ }
2401
+ function Ae(e) {
2402
+ return e === 0 || pe(e);
2403
+ }
2404
+ function $e(e) {
2405
+ return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
2406
+ }
2407
+ function zi(e) {
2408
+ return e >= 48 && e <= 57 ? e - 48 : -1;
2409
+ }
2410
+ function Zi(e) {
2411
+ if (e >= 48 && e <= 57) return e - 48;
2412
+ const t = e | 32;
2413
+ return t >= 97 && t <= 102 ? t - 97 + 10 : -1;
2414
+ }
2415
+ function Ji(e) {
2416
+ return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
2417
+ }
2418
+ function eo(e) {
2419
+ 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;
2420
+ }
2421
+ function ct(e) {
2422
+ 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;
2423
+ }
2424
+ function ie(e, t) {
2425
+ let n = 0, r = e.input.charCodeAt(e.position), i = e.position === e.lineStart || pe(e.input.charCodeAt(e.position - 1));
2426
+ for (; r !== 0; ) {
2427
+ for (; Ne(r); )
2428
+ i = !0, r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
2429
+ if (t && i && r === 35) do
2430
+ r = e.input.charCodeAt(++e.position);
2431
+ while (!z(r) && r !== 0);
2432
+ if (!z(r)) break;
2433
+ for (ct(e), n++, i = !0, r = e.input.charCodeAt(e.position); r === 32; )
2434
+ e.lineIndent++, r = e.input.charCodeAt(++e.position);
2435
+ }
2436
+ return n;
2437
+ }
2438
+ function ve(e, t = e.position) {
2439
+ const n = e.input.charCodeAt(t);
2440
+ if ((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2)) {
2441
+ const r = e.input.charCodeAt(t + 3);
2442
+ return r === 0 || pe(r);
2443
+ }
2444
+ return !1;
2445
+ }
2446
+ function Tn(e) {
2447
+ let t = e.input.charCodeAt(e.position);
2448
+ for (; t !== 0 && !z(t); ) t = e.input.charCodeAt(++e.position);
2449
+ }
2450
+ function er(e, t, n) {
2451
+ Gi.test(e.input.slice(t, n)) && I(e, "the stream contains non-printable characters");
2452
+ }
2453
+ function to(e, t, n) {
2454
+ if (e.input.charCodeAt(e.position) !== 33) return !1;
2455
+ t.tagStart !== H && I(e, "duplication of a tag property");
2456
+ const r = e.position;
2457
+ let i = !1, o = !1, a = "!", s = e.input.charCodeAt(++e.position);
2458
+ s === 60 ? (i = !0, s = e.input.charCodeAt(++e.position)) : s === 33 && (o = !0, a = "!!", s = e.input.charCodeAt(++e.position));
2459
+ let l = e.position, u;
2460
+ if (i) {
2461
+ for (; s !== 0 && s !== 62; ) s = e.input.charCodeAt(++e.position);
2462
+ s !== 62 && I(e, "unexpected end of the stream within a verbatim tag"), u = e.input.slice(l, e.position), e.position++;
2463
+ } else {
2464
+ for (; s !== 0 && !pe(s) && !(n && $e(s)); )
2465
+ s === 33 && (o ? I(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(l - 1, e.position + 1), zn.test(a) || I(e, "named tag handle cannot contain such characters"), o = !0, l = e.position + 1)), s = e.input.charCodeAt(++e.position);
2466
+ u = e.input.slice(l, e.position), Yi.test(u) && I(e, "tag suffix cannot contain flow indicator characters");
2467
+ }
2468
+ return u && !(i ? Wi.test(u) : ji.test(u)) && I(e, `tag name cannot contain such characters: ${u}`), !i && a !== "!" && a !== "!!" && !Xn.call(e.tagHandlers, a) && I(e, `undeclared tag handle "${a}"`), t.tagStart = r, t.tagEnd = e.position, !0;
2469
+ }
2470
+ function no(e, t) {
2471
+ if (e.input.charCodeAt(e.position) !== 38) return !1;
2472
+ t.anchorStart !== H && I(e, "duplication of an anchor property"), e.position++;
2473
+ const n = e.position;
2474
+ for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !$e(e.input.charCodeAt(e.position)); ) e.position++;
2475
+ return e.position === n && I(e, "name of an anchor node must contain at least one character"), t.anchorStart = n, t.anchorEnd = e.position, !0;
2476
+ }
2477
+ function ro(e, t) {
2478
+ if (e.input.charCodeAt(e.position) !== 42) return !1;
2479
+ (t.anchorStart !== H || t.tagStart !== H) && I(e, "alias node should not have any properties"), e.position++;
2480
+ const n = e.position;
2481
+ for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)) && !$e(e.input.charCodeAt(e.position)); ) e.position++;
2482
+ return e.position === n && I(e, "name of an alias node must contain at least one character"), Qi(e, n, e.position), !0;
2483
+ }
2484
+ function Mt(e, t) {
2485
+ ie(e, !1), e.lineIndent < t && I(e, "deficient indentation");
2486
+ }
2487
+ function io(e, t, n) {
2488
+ if (e.input.charCodeAt(e.position) !== 39) return !1;
2489
+ e.position++;
2490
+ const r = e.position;
2491
+ let i = !0;
2492
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
2493
+ const o = e.input.charCodeAt(e.position);
2494
+ if (o === 39) {
2495
+ if (e.input.charCodeAt(e.position + 1) === 39) {
2496
+ i = !1, e.position += 2;
2497
+ continue;
2498
+ }
2499
+ const a = e.position;
2500
+ return e.position++, qe(e, r, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2, 1, -1, i), !0;
2501
+ }
2502
+ z(o) ? (i = !1, Mt(e, t)) : e.position === e.lineStart && ve(e) ? I(e, "unexpected end of the document within a single quoted scalar") : o !== 9 && o < 32 ? I(e, "expected valid JSON character") : e.position++;
2503
+ }
2504
+ I(e, "unexpected end of the stream within a single quoted scalar");
2505
+ }
2506
+ function oo(e, t, n) {
2507
+ if (e.input.charCodeAt(e.position) !== 34) return !1;
2508
+ e.position++;
2509
+ const r = e.position;
2510
+ let i = !0;
2511
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
2512
+ const o = e.input.charCodeAt(e.position);
2513
+ if (o === 34) {
2514
+ const a = e.position;
2515
+ return e.position++, qe(e, r, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 3, 1, -1, i), !0;
2516
+ }
2517
+ if (o === 92) {
2518
+ i = !1;
2519
+ const a = e.input.charCodeAt(++e.position);
2520
+ if (z(a)) Mt(e, t);
2521
+ else if (eo(a)) e.position++;
2522
+ else {
2523
+ let s = Ji(a);
2524
+ for (s === 0 && I(e, "unknown escape sequence"); s-- > 0; )
2525
+ e.position++, Zi(e.input.charCodeAt(e.position)) < 0 && I(e, "expected hexadecimal character");
2526
+ e.position++;
2527
+ }
2528
+ } else z(o) ? (i = !1, Mt(e, t)) : e.position === e.lineStart && ve(e) ? I(e, "unexpected end of the document within a double quoted scalar") : o !== 9 && o < 32 ? I(e, "expected valid JSON character") : e.position++;
2529
+ }
2530
+ I(e, "unexpected end of the stream within a double quoted scalar");
2531
+ }
2532
+ function ao(e, t, n) {
2533
+ const r = e.input.charCodeAt(e.position);
2534
+ let i = 1, o = -1, a = !1;
2535
+ if (r !== 124 && r !== 62) return !1;
2536
+ const s = r === 124 ? 4 : 5;
2537
+ for (e.position++; e.input.charCodeAt(e.position) !== 0; ) {
2538
+ const C = e.input.charCodeAt(e.position), E = zi(C);
2539
+ if (C === 43 || C === 45)
2540
+ i !== 1 && I(e, "repeat of a chomping mode identifier"), i = C === 43 ? 3 : 2, e.position++;
2541
+ else if (E >= 0)
2542
+ E === 0 && I(e, "bad explicit indentation width of a block scalar; it cannot be less than one"), a && I(e, "repeat of an indentation width identifier"), o = t + E - 1, a = !0, e.position++;
2543
+ else break;
2544
+ }
2545
+ let l = !1;
2546
+ for (; Ne(e.input.charCodeAt(e.position)); )
2547
+ l = !0, e.position++;
2548
+ l && e.input.charCodeAt(e.position) === 35 && Tn(e), z(e.input.charCodeAt(e.position)) ? ct(e) : e.input.charCodeAt(e.position) !== 0 && I(e, "a line break is expected");
2549
+ let u = a ? o : -1, c = 0;
2550
+ const y = e.position;
2551
+ let g = e.position;
2552
+ for (; e.input.charCodeAt(e.position) !== 0; ) {
2553
+ const C = e.position;
2554
+ let E = 0;
2555
+ for (; e.input.charCodeAt(C + E) === 32; ) E++;
2556
+ const w = e.input.charCodeAt(C + E);
2557
+ if (w === 0) {
2558
+ u >= 0 ? E > u && (g = C + E) : E > 0 && (g = C + E);
2559
+ break;
2560
+ }
2561
+ if (C === e.lineStart && ve(e, C)) break;
2562
+ if (!a && u === -1 && z(w) && (c = Math.max(c, E)), !a && u === -1 && !z(w) && (w === 9 && E < t && (e.position = C + E, I(e, "tab characters must not be used in indentation")), E < c && (e.position = C + E, I(e, "bad indentation of a mapping entry"))), u === -1 && w !== 0 && !z(w) && E < t) {
2563
+ e.lineIndent = E, e.position = C + E;
2564
+ break;
2565
+ }
2566
+ !a && w !== 0 && !z(w) && u === -1 && (u = E);
2567
+ const F = u === -1 ? t + 1 : u;
2568
+ if (w !== 0 && !z(w) && E < F) {
2569
+ e.lineIndent = E, e.position = C + E;
2570
+ break;
2571
+ }
2572
+ Tn(e), g = e.position, z(e.input.charCodeAt(e.position)) && (ct(e), g = e.position);
2573
+ }
2574
+ return er(e, y, g), qe(e, y, g, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, s, i, u), !0;
2575
+ }
2576
+ function so(e, t) {
2577
+ const n = e.input.charCodeAt(e.position), r = t === De;
2578
+ 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 && $e(n)) return !1;
2579
+ if (n === 63 || n === 45) {
2580
+ const i = e.input.charCodeAt(e.position + 1);
2581
+ if (Ae(i) || r && $e(i)) return !1;
2582
+ }
2583
+ return !0;
2584
+ }
2585
+ function lo(e, t, n, r) {
2586
+ if (!so(e, n)) return !1;
2587
+ const i = e.position;
2588
+ let o = e.position, a = e.input.charCodeAt(e.position);
2589
+ const s = n === De;
2590
+ let l = !1;
2591
+ for (; a !== 0 && !(e.position === e.lineStart && ve(e)); ) {
2592
+ if (a === 58) {
2593
+ const u = e.input.charCodeAt(e.position + 1);
2594
+ if (Ae(u) || s && $e(u)) break;
2595
+ } else if (a === 35) {
2596
+ if (pe(e.input.charCodeAt(e.position - 1))) break;
2597
+ } else {
2598
+ if (s && $e(a)) break;
2599
+ if (z(a)) {
2600
+ const u = e.position, c = e.line, y = e.lineStart, g = e.lineIndent;
2601
+ if (ie(e, !1), e.lineIndent >= t) {
2602
+ l = !0, a = e.input.charCodeAt(e.position);
2603
+ continue;
2604
+ }
2605
+ e.position = u, e.line = c, e.lineStart = y, e.lineIndent = g;
2606
+ break;
2607
+ }
2608
+ }
2609
+ Ne(a) || (o = e.position + 1), a = e.input.charCodeAt(++e.position);
2610
+ }
2611
+ return o === i ? !1 : (er(e, i, o), qe(e, i, o, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1, 1, -1, !l), !0);
2612
+ }
2613
+ function Ge(e, t) {
2614
+ const n = e.line;
2615
+ ie(e, !0), (e.line > n && e.lineIndent < t || e.firstTabInLine !== -1 && e.lineIndent < t) && I(e, "deficient indentation");
2616
+ }
2617
+ function co(e, t, n) {
2618
+ const r = e.input.charCodeAt(e.position), i = r === 123, o = e.position;
2619
+ let a = !0;
2620
+ if (r !== 91 && r !== 123) return !1;
2621
+ const s = i ? 125 : 93;
2622
+ for (i ? Ht(e, o, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2) : Jn(e, o, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 2), e.position++; e.input.charCodeAt(e.position) !== 0; ) {
2623
+ Ge(e, t);
2624
+ let l = e.input.charCodeAt(e.position);
2625
+ if (l === s)
2626
+ return e.position++, He(e), !0;
2627
+ a ? l === 44 && I(e, "expected the node content, but found ','") : I(e, "missed comma between flow collection entries");
2628
+ let u = !1, c = !1;
2629
+ l === 63 && pe(e.input.charCodeAt(e.position + 1)) && (u = c = !0, e.position += 1, Ge(e, t));
2630
+ const y = e.line, g = je(e), C = we(e, t, De, !1, !0);
2631
+ Ge(e, t), l = e.input.charCodeAt(e.position), (i || c || e.line === y) && l === 58 ? (u = !0, e.position++, Ge(e, t), i || Sn(e, g), C || re(e), we(e, t, De, !1, !0) || re(e), Ge(e, t), i || He(e)) : i && u ? (C || re(e), re(e)) : i ? re(e) : u && (Sn(e, g), C || re(e), re(e), He(e)), l = e.input.charCodeAt(e.position), l === 44 ? (a = !0, e.position++) : a = !1;
2632
+ }
2633
+ I(e, "unexpected end of the stream within a flow collection");
2634
+ }
2635
+ function vn(e, t, n) {
2636
+ if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !Ae(e.input.charCodeAt(e.position + 1))) return !1;
2637
+ for (Jn(e, e.position, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, 1); e.input.charCodeAt(e.position) === 45 && Ae(e.input.charCodeAt(e.position + 1)); ) {
2638
+ e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, I(e, "tab characters must not be used in indentation"));
2639
+ const r = e.line;
2640
+ e.position++;
2641
+ const i = ie(e, !0) > 0;
2642
+ if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && Ae(e.input.charCodeAt(e.position + 1)) && I(e, "bad indentation of a sequence entry"), i && e.lineIndent <= t ? re(e) : we(e, t, Qn, !1, !0), ie(e, !0), e.lineIndent < t || e.position >= e.length) break;
2643
+ e.lineIndent > t && I(e, "bad indentation of a sequence entry"), e.line === r && e.input.charCodeAt(e.position) === 45 && Ae(e.input.charCodeAt(e.position + 1)) && I(e, "bad indentation of a sequence entry");
2644
+ }
2645
+ return He(e), !0;
2646
+ }
2647
+ function Nt(e, t, n, r) {
2648
+ let i = !1, o = !1, a = !1, s = !1;
2649
+ if (e.firstTabInLine !== -1) return !1;
2650
+ let l = e.input.charCodeAt(e.position);
2651
+ for (; l !== 0; ) {
2652
+ !i && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, I(e, "tab characters must not be used in indentation"));
2653
+ const u = e.input.charCodeAt(e.position + 1), c = e.line;
2654
+ if ((l === 63 || l === 58) && Ae(u))
2655
+ a || (Ht(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;
2656
+ else {
2657
+ i && (re(e), i = !1);
2658
+ const y = je(e);
2659
+ if (!we(e, n, Pt, !1, !0)) break;
2660
+ if (e.line === c) {
2661
+ for (l = e.input.charCodeAt(e.position); Ne(l); ) l = e.input.charCodeAt(++e.position);
2662
+ if (l === 58) {
2663
+ if (l = e.input.charCodeAt(++e.position), Ae(l) || I(e, "a whitespace character is expected after the key-value separator within a block mapping"), !a) {
2664
+ for (Me(e, y), Ht(e, y.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, 1), a = !0, we(e, n, Pt, !1, !0), l = e.input.charCodeAt(e.position); Ne(l); ) l = e.input.charCodeAt(++e.position);
2665
+ e.position++;
2666
+ }
2667
+ o = !0, i = !1, s = !1;
2668
+ } else if (o) I(e, "expected ':' after a mapping key");
2669
+ else
2670
+ return r.anchorStart !== H || r.tagStart !== H ? (Me(e, y), !1) : !0;
2671
+ } else if (o) I(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
2672
+ else
2673
+ return r.anchorStart !== H || r.tagStart !== H ? (Me(e, y), !1) : !0;
2674
+ }
2675
+ if (we(e, t, lt, !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) I(e, "bad indentation of a mapping entry");
2676
+ else if (e.lineIndent < t) break;
2677
+ }
2678
+ return o ? (i && re(e), a && He(e), !0) : !1;
2679
+ }
2680
+ function we(e, t, n, r, i, o = !0) {
2681
+ e.depth >= e.maxDepth && I(e, `nesting exceeded maxDepth (${e.maxDepth})`), e.depth++;
2682
+ let a = 1, s = !1, l = !1, u = null;
2683
+ const c = Cn();
2684
+ let y = n === lt || n === Qn, g = y;
2685
+ const C = y;
2686
+ if (r && ie(e, !0) && (s = !0, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1), e.position === e.lineStart && ve(e))
2687
+ return e.depth--, !1;
2688
+ if (a === 1) for (; ; ) {
2689
+ const E = e.input.charCodeAt(e.position), w = je(e);
2690
+ if (s && a !== 1 && (E === 33 || E === 38)) break;
2691
+ if (s && C && (c.tagStart !== H || c.anchorStart !== H) && (E === 33 || E === 38)) {
2692
+ const F = je(e), N = t + 1;
2693
+ if (Nt(e, e.position - e.lineStart, N, c) && e.events[F.eventsLength]?.type === 3)
2694
+ return e.depth--, !0;
2695
+ Me(e, F);
2696
+ }
2697
+ if (s && (E === 33 && c.tagStart !== H || E === 38 && c.anchorStart !== H) || !to(e, c, n === De) && !no(e, c)) break;
2698
+ u === null && (u = w), ie(e, !0) ? (s = !0, g = C, e.lineIndent > t ? a = 1 : e.lineIndent === t ? a = 0 : a = -1) : g = !1;
2699
+ }
2700
+ if (g && (g = s || i), a === 1 || n === lt) {
2701
+ const E = n === De || n === Pt ? t : t + 1, w = e.position - e.lineStart;
2702
+ if (a === 1) if (g && (vn(e, w, c) || Nt(e, w, E, c)) || co(e, E, c)) l = !0;
2703
+ else {
2704
+ const F = e.input.charCodeAt(e.position);
2705
+ if (u !== null && o && C && !g && F !== 124 && F !== 62) {
2706
+ const N = je(e), A = u.position - u.lineStart;
2707
+ Me(e, u), Nt(e, A, E, Cn()) && e.events[N.eventsLength]?.type === 3 ? l = !0 : Me(e, N);
2708
+ }
2709
+ !l && (y && ao(e, E, c) || io(e, E, c) || oo(e, E, c) || ro(e, c) || lo(e, E, n, c)) && (l = !0);
2710
+ }
2711
+ else a === 0 && (l = g && vn(e, w, c));
2712
+ }
2713
+ return y = y && !l, !l && (c.anchorStart !== H || c.tagStart !== H || y) && (qe(e, H, H, c.anchorStart, c.anchorEnd, c.tagStart, c.tagEnd, 1), l = !0), e.depth--, l || c.anchorStart !== H || c.tagStart !== H;
2714
+ }
2715
+ function uo(e) {
2716
+ if (e.lineIndent > 0 || e.input.charCodeAt(e.position) !== 37) return !1;
2717
+ e.position++;
2718
+ const t = e.position;
2719
+ for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
2720
+ const n = e.input.slice(t, e.position), r = [];
2721
+ for (n.length === 0 && I(e, "directive name must not be less than one character in length"); e.input.charCodeAt(e.position) !== 0 && !z(e.input.charCodeAt(e.position)); ) {
2722
+ for (; Ne(e.input.charCodeAt(e.position)); ) e.position++;
2723
+ if (e.input.charCodeAt(e.position) === 35 || z(e.input.charCodeAt(e.position)) || e.input.charCodeAt(e.position) === 0) break;
2724
+ const i = e.position;
2725
+ for (; e.input.charCodeAt(e.position) !== 0 && !pe(e.input.charCodeAt(e.position)); ) e.position++;
2726
+ r.push(e.input.slice(i, e.position));
2727
+ }
2728
+ if (z(e.input.charCodeAt(e.position)) && ct(e), n === "YAML") {
2729
+ e.directives.some((o) => o.kind === "yaml") && I(e, "duplication of %YAML directive"), r.length !== 1 && I(e, "YAML directive accepts exactly one argument");
2730
+ const i = /^([0-9]+)\.([0-9]+)$/.exec(r[0]);
2731
+ i === null && I(e, "ill-formed argument of the YAML directive"), parseInt(i[1], 10) !== 1 && I(e, "unacceptable YAML version of the document"), e.directives.push({
2732
+ kind: "yaml",
2733
+ version: r[0]
2734
+ });
2735
+ } else if (n === "TAG") {
2736
+ r.length !== 2 && I(e, "TAG directive accepts exactly two arguments");
2737
+ const [i, o] = r;
2738
+ zn.test(i) || I(e, "ill-formed tag handle (first argument) of the TAG directive"), Xn.call(e.tagHandlers, i) && I(e, `there is a previously declared suffix for "${i}" tag handle`), Vi.test(o) || I(e, "ill-formed tag prefix (second argument) of the TAG directive"), e.tagHandlers[i] = o, e.directives.push({
2739
+ kind: "tag",
2740
+ handle: i,
2741
+ prefix: o
2742
+ });
2743
+ }
2744
+ return !0;
2745
+ }
2746
+ function fo(e) {
2747
+ e.directives = [], e.tagHandlers = /* @__PURE__ */ Object.create(null);
2748
+ let t = !1;
2749
+ for (ie(e, !0); uo(e); )
2750
+ t = !0, ie(e, !0);
2751
+ let n = !1, r = !1, i = !0;
2752
+ if (e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 && Ae(e.input.charCodeAt(e.position + 3))) {
2753
+ n = !0;
2754
+ const s = e.line;
2755
+ e.position += 3, ie(e, !0), i = e.line > s;
2756
+ } else t && I(e, "directives end mark is expected");
2757
+ const o = e.events.length;
2758
+ if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 && ve(e)) {
2759
+ e.position += 3, ie(e, !0);
2760
+ return;
2761
+ }
2762
+ if (Xi(e, n, !1), we(e, e.lineIndent - 1, lt, !1, i, i) || re(e), ie(e, !0), e.position === e.lineStart && ve(e) && (r = e.input.charCodeAt(e.position) === 46, r)) {
2763
+ const s = e.line;
2764
+ e.position += 3, ie(e, !0), e.line === s && e.position < e.length && I(e, "end of the stream or a document separator is expected");
2765
+ }
2766
+ const a = e.events[o];
2767
+ a?.type === 1 && (a.explicitEnd = r), He(e), !r && e.position < e.length && !(e.position === e.lineStart && ve(e)) && I(e, "end of the stream or a document separator is expected");
2768
+ }
2769
+ function po(e, t) {
2770
+ const n = e.length, r = {
2771
+ ...en,
2772
+ ...t,
2773
+ input: `${e}\0`,
2774
+ length: n,
2775
+ position: 0,
2776
+ line: 0,
2777
+ lineStart: 0,
2778
+ lineIndent: 0,
2779
+ firstTabInLine: -1,
2780
+ depth: 0,
2781
+ directives: [],
2782
+ tagHandlers: /* @__PURE__ */ Object.create(null),
2783
+ events: []
2784
+ }, i = e.indexOf("\0");
2785
+ for (i !== -1 && mt(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)); ) {
2786
+ const o = r.position;
2787
+ fo(r), r.position === o && I(r, "can not read a document");
2788
+ }
2789
+ return r.events;
2790
+ }
2791
+ var ho = {
2792
+ ...en,
2793
+ ...Jt
2794
+ };
2795
+ function go(e, t = {}) {
2796
+ const n = {
2797
+ ...ho,
2798
+ ...t
2799
+ }, r = String(e), i = Object.keys(en), o = Object.keys(Jt);
2800
+ return Ki(po(r, Ot(n, i)), {
2801
+ ...Ot(n, o),
2802
+ source: r
2803
+ });
2804
+ }
2805
+ function mo(e, t, n) {
2806
+ let r = null;
2807
+ typeof t == "function" ? r = t : t !== null && typeof t == "object" && (n = t);
2808
+ const i = go(e, n);
2809
+ if (r === null) return i;
2810
+ for (const o of i) r(o);
2811
+ }
2812
+ var tt = class {
2813
+ tagged = !1;
2814
+ flow = !1;
2815
+ singleQuoted = !1;
2816
+ doubleQuoted = !1;
2817
+ literal = !1;
2818
+ folded = !1;
2819
+ }, _e = /* @__PURE__ */ Symbol("INVALID");
2820
+ function Ao(e) {
2821
+ const t = new Set([
2822
+ e.defaultScalarTag,
2823
+ e.defaultSequenceTag,
2824
+ e.defaultMappingTag
2825
+ ].filter((o) => o !== void 0)), n = e.implicitScalarTags, r = e.tags.filter((o) => !(o.nodeKind === "scalar" && o.implicit) && !t.has(o)), i = e.tags.filter((o) => t.has(o));
2826
+ return [
2827
+ ...n.map((o) => ({
2828
+ tag: o,
2829
+ implicitTag: !0
2830
+ })),
2831
+ ...r.map((o) => ({
2832
+ tag: o,
2833
+ implicitTag: !1
2834
+ })),
2835
+ ...i.map((o) => ({
2836
+ tag: o,
2837
+ implicitTag: !0
2838
+ }))
2839
+ ];
2840
+ }
2841
+ function yo(e, t) {
2842
+ for (let n = 0, r = e.representTypes.length; n < r; n += 1) {
2843
+ const { tag: i, implicitTag: o } = e.representTypes[n];
2844
+ if (i.identify && i.identify(t)) {
2845
+ let a;
2846
+ return i.matchByTagPrefix && i.representTagName ? a = i.representTagName(t) : a = i.tagName, {
2847
+ tag: i,
2848
+ tagName: a,
2849
+ implicitTag: o
2850
+ };
2851
+ }
2852
+ }
2853
+ return null;
2854
+ }
2855
+ function We(e, t) {
2856
+ if (!e.noRefs && t !== null && typeof t == "object") {
2857
+ const c = e.refs.get(t);
2858
+ if (c)
2859
+ return c.anchor === void 0 && (c.anchor = `ref_${e.refCounter++}`), {
2860
+ kind: "alias",
2861
+ tag: "",
2862
+ style: new tt(),
2863
+ anchor: c.anchor
2864
+ };
2865
+ }
2866
+ const n = yo(e, t);
2867
+ if (!n) {
2868
+ if (t === void 0 || e.skipInvalid) return _e;
2869
+ throw new gt(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`);
2870
+ }
2871
+ const { tag: r, tagName: i, implicitTag: o } = n, a = o ? i : Wn(i);
2872
+ if (r.nodeKind === "scalar") {
2873
+ const c = new tt();
2874
+ return c.tagged = !o, {
2875
+ kind: "scalar",
2876
+ tag: a,
2877
+ style: c,
2878
+ value: r.represent(t)
2879
+ };
2880
+ }
2881
+ if (r.nodeKind === "sequence") {
2882
+ const c = r.represent(t), y = new tt();
2883
+ y.tagged = !o;
2884
+ const g = {
2885
+ kind: "sequence",
2886
+ tag: a,
2887
+ style: y,
2888
+ items: []
2889
+ };
2890
+ e.noRefs || e.refs.set(t, g);
2891
+ for (let C = 0, E = c.length; C < E; C += 1) {
2892
+ let w = We(e, c[C]);
2893
+ w === _e && c[C] === void 0 && (w = We(e, null)), w !== _e && g.items.push(w);
2894
+ }
2895
+ return g;
2896
+ }
2897
+ const s = r.represent(t), l = new tt();
2898
+ l.tagged = !o;
2899
+ const u = {
2900
+ kind: "mapping",
2901
+ tag: a,
2902
+ style: l,
2903
+ items: []
2904
+ };
2905
+ e.noRefs || e.refs.set(t, u);
2906
+ for (const [c, y] of s) {
2907
+ const g = We(e, c);
2908
+ if (g === _e) continue;
2909
+ const C = We(e, y);
2910
+ C !== _e && u.items.push({
2911
+ key: g,
2912
+ value: C
2913
+ });
2914
+ }
2915
+ return u;
2916
+ }
2917
+ function Eo(e, t, n = {}) {
2918
+ const r = We({
2919
+ representTypes: Ao(t),
2920
+ noRefs: n.noRefs ?? !1,
2921
+ skipInvalid: n.skipInvalid ?? !1,
2922
+ refs: /* @__PURE__ */ new Map(),
2923
+ refCounter: 0
2924
+ }, e);
2925
+ return [{
2926
+ contents: r === _e ? null : r,
2927
+ directives: []
2928
+ }];
2929
+ }
2930
+ var So = /* @__PURE__ */ Symbol("visit:break"), tr = /* @__PURE__ */ Symbol("visit:skip");
2931
+ function at(e, t, n) {
2932
+ const r = t(e, n);
2933
+ if (r === So) return !0;
2934
+ if (r === tr) return !1;
2935
+ const i = n.depth + 1;
2936
+ switch (e.kind) {
2937
+ case "sequence":
2938
+ for (const o of e.items) if (at(o, t, {
2939
+ depth: i,
2940
+ parent: e,
2941
+ isKey: !1
2942
+ })) return !0;
2943
+ break;
2944
+ case "mapping":
2945
+ for (const { key: o, value: a } of e.items)
2946
+ if (at(o, t, {
2947
+ depth: i,
2948
+ parent: e,
2949
+ isKey: !0
2950
+ }) || at(a, t, {
2951
+ depth: i,
2952
+ parent: e,
2953
+ isKey: !1
2954
+ })) return !0;
2955
+ break;
2956
+ }
2957
+ return !1;
2958
+ }
2959
+ function Co(e, t) {
2960
+ for (const n of e) if (n.contents && at(n.contents, t, {
2961
+ depth: 0,
2962
+ parent: null,
2963
+ isKey: !1
2964
+ })) return;
2965
+ }
2966
+ var tn = 65279, To = 9, Le = 10, nr = 13, vo = 32, Ro = 33, rr = 34, Bt = 35, bo = 37, xo = 38, ir = 39, _o = 42, Dt = 44, nn = 45, Qe = 58, Io = 61, wo = 62, or = 63, No = 64, Ut = 91, qt = 93, $o = 96, Kt = 123, Lo = 124, Gt = 125, ne = {};
2967
+ ne[0] = "\\0";
2968
+ ne[7] = "\\a";
2969
+ ne[8] = "\\b";
2970
+ ne[9] = "\\t";
2971
+ ne[10] = "\\n";
2972
+ ne[11] = "\\v";
2973
+ ne[12] = "\\f";
2974
+ ne[13] = "\\r";
2975
+ ne[27] = "\\e";
2976
+ ne[34] = '\\"';
2977
+ ne[92] = "\\\\";
2978
+ ne[133] = "\\N";
2979
+ ne[160] = "\\_";
2980
+ ne[8232] = "\\L";
2981
+ ne[8233] = "\\P";
2982
+ var rn = {
2983
+ indent: 2,
2984
+ seqNoIndent: !1,
2985
+ seqInlineFirst: !0,
2986
+ sortKeys: !1,
2987
+ lineWidth: 80,
2988
+ flowBracketPadding: !1,
2989
+ flowSkipCommaSpace: !1,
2990
+ flowSkipColonSpace: !1,
2991
+ quoteFlowKeys: !1,
2992
+ quoteStyle: "single",
2993
+ forceQuotes: !1,
2994
+ tagBeforeAnchor: !1
2995
+ };
2996
+ function ko(e) {
2997
+ return e.style.tagged ? e.tag : Wn(e.tag);
2998
+ }
2999
+ function Oo(e) {
3000
+ const t = {
3001
+ ...rn,
3002
+ ...e
3003
+ };
3004
+ return {
3005
+ ...t,
3006
+ defaultScalarTagName: t.schema.defaultScalarTag.tagName,
3007
+ implicitResolvers: t.schema.implicitScalarTags
3008
+ };
3009
+ }
3010
+ function Po(e) {
3011
+ const t = e.toString(16).toUpperCase(), n = e <= 255 ? "x" : "u", r = e <= 255 ? 2 : 4;
3012
+ return `\\${n}${"0".repeat(r - t.length)}${t}`;
3013
+ }
3014
+ function Rn(e, t) {
3015
+ const n = " ".repeat(t);
3016
+ let r = 0, i = "";
3017
+ const o = e.length;
3018
+ for (; r < o; ) {
3019
+ let a;
3020
+ const s = e.indexOf(`
3021
+ `, r);
3022
+ s === -1 ? (a = e.slice(r), r = o) : (a = e.slice(r, s + 1), r = s + 1), a.length && a !== `
3023
+ ` && (i += n), i += a;
3024
+ }
3025
+ return i;
3026
+ }
3027
+ function Yt(e, t) {
3028
+ return `
3029
+ ${" ".repeat(e.indent * t)}`;
3030
+ }
3031
+ function Fo(e, t) {
3032
+ const n = e.indent * Math.max(1, t);
3033
+ return {
3034
+ indent: n,
3035
+ blockIndent: t === 0 ? e.indent + 1 : e.indent,
3036
+ lineWidth: e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - n)
3037
+ };
3038
+ }
3039
+ function bn(e, t) {
3040
+ for (let n = 0, r = e.implicitResolvers.length; n < r; n += 1) {
3041
+ const i = e.implicitResolvers[n];
3042
+ if (i.resolve(t, !1, i.tagName) !== O) return i.tagName;
3043
+ }
3044
+ return e.defaultScalarTagName;
3045
+ }
3046
+ function Ue(e) {
3047
+ return e === vo || e === To;
3048
+ }
3049
+ function Ho(e) {
3050
+ const t = e.charCodeAt(0);
3051
+ if (t !== nn && t !== 46 || e.charCodeAt(1) !== t || e.charCodeAt(2) !== t) return !1;
3052
+ if (e.length === 3) return !0;
3053
+ const n = e.charCodeAt(3);
3054
+ return Ue(n) || n === nr || n === Le;
3055
+ }
3056
+ function ze(e) {
3057
+ return e >= 32 && e <= 126 || e >= 161 && e <= 55295 && e !== 8232 && e !== 8233 || e >= 57344 && e <= 65533 && e !== tn || e >= 65536 && e <= 1114111;
3058
+ }
3059
+ function xn(e) {
3060
+ return ze(e) && e !== tn && e !== nr && e !== Le;
3061
+ }
3062
+ function Wt(e, t, n) {
3063
+ const r = xn(e), i = r && !Ue(e);
3064
+ return (n ? r : r && e !== Dt && e !== Ut && e !== qt && e !== Kt && e !== Gt) && e !== Bt && !(t === Qe && !i) || xn(t) && !Ue(t) && e === Bt || t === Qe && i && (n || e !== Dt && e !== Ut && e !== qt && e !== Kt && e !== Gt);
3065
+ }
3066
+ function Mo(e) {
3067
+ return ze(e) && e !== tn && !Ue(e) && e !== nn && e !== or && e !== Qe && e !== Dt && e !== Ut && e !== qt && e !== Kt && e !== Gt && e !== Bt && e !== xo && e !== _o && e !== Ro && e !== Lo && e !== Io && e !== wo && e !== ir && e !== rr && e !== bo && e !== No && e !== $o;
3068
+ }
3069
+ function Bo(e, t) {
3070
+ const n = Be(e, 0);
3071
+ if (Mo(n)) return !0;
3072
+ if (e.length > 1 && (n === nn || n === or || n === Qe)) {
3073
+ const r = Be(e, 1);
3074
+ return !Ue(r) && Wt(r, n, t);
3075
+ }
3076
+ return !1;
3077
+ }
3078
+ function Do(e) {
3079
+ return !Ue(e) && e !== Qe;
3080
+ }
3081
+ function Be(e, t) {
3082
+ const n = e.charCodeAt(t);
3083
+ let r;
3084
+ return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
3085
+ }
3086
+ function ar(e) {
3087
+ return /^\n* /.test(e);
3088
+ }
3089
+ var Ze = 1, Ve = 2, on = 3, an = 4, Te = 5;
3090
+ function Uo(e, t, n, r, i, o) {
3091
+ const { blockIndent: a, lineWidth: s } = n;
3092
+ let l, u = 0, c = -1, y = !1, g = !1;
3093
+ const C = s !== -1;
3094
+ let E = -1, w = !Ho(t) && Bo(t, o) && Do(Be(t, t.length - 1));
3095
+ if (r || i) for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
3096
+ if (u = Be(t, l), !ze(u)) return Te;
3097
+ w = w && Wt(u, c, o), c = u;
3098
+ }
3099
+ else {
3100
+ for (l = 0; l < t.length; u >= 65536 ? l += 2 : l++) {
3101
+ if (u = Be(t, l), u === Le)
3102
+ y = !0, C && (g = g || l - E - 1 > s && t[E + 1] !== " ", E = l);
3103
+ else if (!ze(u)) return Te;
3104
+ w = w && Wt(u, c, o), c = u;
3105
+ }
3106
+ g = g || C && l - E - 1 > s && t[E + 1] !== " ";
3107
+ }
3108
+ return !y && !g ? w && !i ? Ze : e.quoteStyle === "double" ? Te : Ve : a > 9 && ar(t) ? Te : g ? an : on;
3109
+ }
3110
+ function qo(e, t, n) {
3111
+ const { indent: r, blockIndent: i, lineWidth: o } = n;
3112
+ switch (t) {
3113
+ case Ze:
3114
+ return In(e, r);
3115
+ case Ve:
3116
+ return `'${In(e, r).replace(/'/g, "''")}'`;
3117
+ case on:
3118
+ return "|" + _n(e, i) + wn(Rn(e, r));
3119
+ case an:
3120
+ return ">" + _n(e, i) + wn(Rn(Go(e, o), r));
3121
+ case Te:
3122
+ return `"${Yo(e)}"`;
3123
+ }
3124
+ }
3125
+ function Ko(e, t, n, r, i) {
3126
+ const o = r || !i;
3127
+ if (t.style.singleQuoted) return Ve;
3128
+ if (t.style.doubleQuoted) return Te;
3129
+ if (!o) {
3130
+ if (t.style.literal) return on;
3131
+ if (t.style.folded) return an;
3132
+ }
3133
+ const a = t.value;
3134
+ if (a.length === 0)
3135
+ return t.style.tagged || bn(e, a) === t.tag ? Ze : e.quoteStyle === "double" ? Te : Ve;
3136
+ const s = Uo(e, a, n, o, e.forceQuotes && !r, i);
3137
+ return s === Ze && !t.style.tagged && bn(e, a) !== t.tag ? e.quoteStyle === "double" ? Te : Ve : s;
3138
+ }
3139
+ function _n(e, t) {
3140
+ const n = ar(e) ? String(t) : "", r = e[e.length - 1] === `
3141
+ `;
3142
+ return `${n}${r && (e[e.length - 2] === `
3143
+ ` || e === `
3144
+ `) ? "+" : r ? "" : "-"}
3145
+ `;
3146
+ }
3147
+ function In(e, t) {
3148
+ let n = e.indexOf(`
3149
+ `);
3150
+ if (n === -1) return e;
3151
+ const r = " ".repeat(t);
3152
+ let i = e.slice(0, n);
3153
+ const o = /(\n+)([^\n]*)/g;
3154
+ o.lastIndex = n;
3155
+ let a;
3156
+ for (; a = o.exec(e); ) {
3157
+ const s = a[1].length, l = a[2];
3158
+ i += `
3159
+ `.repeat(s + 1) + r + l;
3160
+ }
3161
+ return i;
3162
+ }
3163
+ function wn(e) {
3164
+ return e[e.length - 1] === `
3165
+ ` ? e.slice(0, -1) : e;
3166
+ }
3167
+ function Go(e, t) {
3168
+ const n = /(\n+)([^\n]*)/g;
3169
+ let r = e.indexOf(`
3170
+ `);
3171
+ r === -1 && (r = e.length), n.lastIndex = r;
3172
+ let i = Nn(e.slice(0, r), t), o = e[0] === `
3173
+ ` || e[0] === " ", a, s;
3174
+ for (; s = n.exec(e); ) {
3175
+ const l = s[1], u = s[2];
3176
+ a = u[0] === " ", i += l + (!o && !a && u !== "" ? `
3177
+ ` : "") + Nn(u, t), o = a;
3178
+ }
3179
+ return i;
3180
+ }
3181
+ function Nn(e, t) {
3182
+ if (e === "" || e[0] === " ") return e;
3183
+ const n = / [^ ]/g;
3184
+ let r, i = 0, o, a = 0, s = 0, l = "";
3185
+ for (; r = n.exec(e); )
3186
+ s = r.index, s - i > t && (o = a > i ? a : s, l += `
3187
+ ${e.slice(i, o)}`, i = o + 1), a = s;
3188
+ return l += `
3189
+ `, e.length - i > t && a > i ? l += `${e.slice(i, a)}
3190
+ ${e.slice(a + 1)}` : l += e.slice(i), l.slice(1);
3191
+ }
3192
+ function Yo(e) {
3193
+ let t = "", n = 0;
3194
+ for (let r = 0; r < e.length; n >= 65536 ? r += 2 : r++) {
3195
+ n = Be(e, r);
3196
+ const i = ne[n];
3197
+ if (i) {
3198
+ t += i;
3199
+ continue;
3200
+ }
3201
+ if (ze(n)) {
3202
+ t += e[r], n >= 65536 && (t += e[r + 1]);
3203
+ continue;
3204
+ }
3205
+ t += Po(n);
3206
+ }
3207
+ return t;
3208
+ }
3209
+ function Wo(e, t, n) {
3210
+ let r = "";
3211
+ for (let o = 0, a = n.items.length; o < a; o += 1) {
3212
+ const s = ye(e, t, n.items[o], {});
3213
+ r !== "" && (r += `,${e.flowSkipCommaSpace ? "" : " "}`), r += s;
3214
+ }
3215
+ const i = e.flowBracketPadding && r !== "" ? " " : "";
3216
+ return `[${i}${r}${i}]`;
3217
+ }
3218
+ function $n(e, t, n, r) {
3219
+ let i = "";
3220
+ for (let o = 0, a = n.items.length; o < a; o += 1) {
3221
+ const s = ye(e, t + 1, n.items[o], {
3222
+ block: !0,
3223
+ compact: e.seqInlineFirst,
3224
+ isblockseq: !0
3225
+ });
3226
+ (!r || i !== "") && (i += Yt(e, t)), s === "" || Le === s.charCodeAt(0) ? i += "-" : i += "- ", i += s;
3227
+ }
3228
+ return i;
3229
+ }
3230
+ function jo(e, t, n) {
3231
+ let r = "";
3232
+ const i = sr(e, n.items);
3233
+ for (const { key: a, value: s } of i) {
3234
+ let l = "";
3235
+ r !== "" && (l += `,${e.flowSkipCommaSpace ? "" : " "}`);
3236
+ const u = ye(e, t, a, { iskey: !0 }), c = u.length > 1024;
3237
+ c ? l += "? " : e.quoteFlowKeys && (l += '"');
3238
+ const y = ye(e, t, s, {}), g = e.flowSkipColonSpace || y === "" ? "" : " ";
3239
+ l += `${u}${e.quoteFlowKeys && !c ? '"' : ""}:${g}${y}`, r += l;
3240
+ }
3241
+ const o = e.flowBracketPadding && r !== "" ? " " : "";
3242
+ return `{${o}${r}${o}}`;
3243
+ }
3244
+ function nt(e) {
3245
+ return e.kind === "scalar" ? e.value : e;
3246
+ }
3247
+ function sr(e, t) {
3248
+ if (!e.sortKeys) return t;
3249
+ const n = t.slice();
3250
+ if (e.sortKeys === !0) n.sort((r, i) => {
3251
+ const o = nt(r.key), a = nt(i.key);
3252
+ return o < a ? -1 : o > a ? 1 : 0;
3253
+ });
3254
+ else {
3255
+ const r = e.sortKeys;
3256
+ n.sort((i, o) => r(nt(i.key), nt(o.key)));
3257
+ }
3258
+ return n;
3259
+ }
3260
+ function Vo(e, t, n, r) {
3261
+ let i = "";
3262
+ const o = sr(e, n.items);
3263
+ for (let a = 0, s = o.length; a < s; a += 1) {
3264
+ let l = "";
3265
+ (!r || i !== "") && (l += Yt(e, t));
3266
+ const { key: u, value: c } = o[a], y = (u.kind === "mapping" || u.kind === "sequence") && !u.style.flow && u.items.length !== 0 || u.kind === "scalar" && (u.style.literal || u.style.folded), g = y ? ye(e, t + 1, u, {
3267
+ block: !0,
3268
+ compact: !0,
3269
+ isblockseq: !jt(e, u, t + 1)
3270
+ }) : ye(e, t + 1, u, {
3271
+ block: !0,
3272
+ compact: !0,
3273
+ iskey: !0
3274
+ }), C = u.kind === "scalar" && u.value.indexOf(`
3275
+ `) !== -1, E = y || C || g.length > 1024;
3276
+ E && (g && Le === g.charCodeAt(0) ? l += "?" : l += "? "), l += g, E && (l += Yt(e, t));
3277
+ const w = ye(e, t + 1, c, {
3278
+ block: !0,
3279
+ compact: E,
3280
+ isblockseq: E && !jt(e, c, t + 1)
3281
+ }), F = u.kind === "scalar" && u.value === "" && g !== "" && g.charCodeAt(g.length - 1) !== ir && g.charCodeAt(g.length - 1) !== rr, N = !E && (u.kind === "alias" || F) ? " " : "";
3282
+ w === "" || Le === w.charCodeAt(0) ? l += `${N}:` : l += `${N}: `, l += w, i += l;
3283
+ }
3284
+ return i;
3285
+ }
3286
+ function jt(e, t, n) {
3287
+ return t.style.tagged || t.anchor !== void 0 || e.indent < 2 && n > 0;
3288
+ }
3289
+ function ye(e, t, n, r) {
3290
+ if (n.kind === "alias") return `*${n.anchor}`;
3291
+ const { block: i = !1, iskey: o = !1, isblockseq: a = !1 } = r;
3292
+ let s = r.compact ?? !1;
3293
+ const l = n.anchor !== void 0;
3294
+ jt(e, n, t) && (s = !1);
3295
+ let u, c = n.style.tagged;
3296
+ const y = i && (n.kind === "mapping" || n.kind === "sequence") && !n.style.flow && n.items.length !== 0;
3297
+ if (n.kind === "mapping") y ? u = Vo(e, t, n, s) : u = jo(e, t, n);
3298
+ else if (n.kind === "sequence") y ? e.seqNoIndent && !a && t > 0 ? u = $n(e, t - 1, n, s) : u = $n(e, t, n, s) : u = Wo(e, t, n);
3299
+ else {
3300
+ const g = Fo(e, t), C = Ko(e, n, g, o, i);
3301
+ u = qo(n.value, C, g), c = n.style.tagged || C !== Ze && n.tag !== e.defaultScalarTagName;
3302
+ }
3303
+ if (y && s && t > 0 && e.indent > 2 && (u = `${" ".repeat(e.indent - 2)}${u}`), c || l) {
3304
+ const g = [], C = c ? ko(n) : null, E = l ? `&${n.anchor}` : null;
3305
+ e.tagBeforeAnchor ? (C !== null && g.push(C), E !== null && g.push(E)) : (E !== null && g.push(E), C !== null && g.push(C));
3306
+ const w = u === "" || u.charCodeAt(0) === Le ? "" : " ";
3307
+ u = `${g.join(" ")}${w}${u}`;
3308
+ }
3309
+ return u;
3310
+ }
3311
+ function Xo(e) {
3312
+ return (e.kind === "sequence" || e.kind === "mapping") && !e.style.flow && e.items.length !== 0 && !e.style.tagged && e.anchor === void 0;
3313
+ }
3314
+ function Qo(e) {
3315
+ let t = e;
3316
+ for (; (t.kind === "sequence" || t.kind === "mapping") && !t.style.flow && t.items.length !== 0; ) t = t.kind === "sequence" ? t.items[t.items.length - 1] : t.items[t.items.length - 1].value;
3317
+ if (t.kind !== "scalar" || !(t.style.literal || t.style.folded)) return !1;
3318
+ const { value: n } = t;
3319
+ return n.endsWith(`
3320
+
3321
+ `) || n === `
3322
+ `;
3323
+ }
3324
+ function zo(e) {
3325
+ let t = "";
3326
+ for (const n of e.directives) {
3327
+ if (n.kind === "yaml") {
3328
+ t += `%YAML ${n.version}
3329
+ `;
3330
+ continue;
3331
+ }
3332
+ const { handle: r, prefix: i } = n;
3333
+ t += `%TAG ${r} ${i}
3334
+ `;
3335
+ }
3336
+ return t;
3337
+ }
3338
+ function Zo(e, t) {
3339
+ const n = Oo(t);
3340
+ let r = "", i = !1;
3341
+ for (let o = 0; o < e.length; o += 1) {
3342
+ const a = e[o], s = zo(a), l = s !== "", u = a.explicitStart || l || o > 0 && !i;
3343
+ if (r += s, a.contents === null)
3344
+ u && (r += `---
3345
+ `);
3346
+ else if (u) {
3347
+ const c = ye(n, 0, a.contents, {
3348
+ block: !0,
3349
+ compact: !0
3350
+ }), y = c === "" ? "" : l || Xo(a.contents) ? `
3351
+ ` : " ";
3352
+ r += `---${y}${c}
3353
+ `;
3354
+ } else r += ye(n, 0, a.contents, {
3355
+ block: !0,
3356
+ compact: !0
3357
+ }) + `
3358
+ `;
3359
+ i = a.explicitEnd || a.contents !== null && Qo(a.contents), i && (r += `...
3360
+ `);
3361
+ }
3362
+ return r;
3363
+ }
3364
+ var Jo = xi.withTags({
3365
+ ...Lt,
3366
+ resolve: (e, t, n) => {
3367
+ const r = Lt.resolve(e, t, n);
3368
+ return r === O ? On.resolve(e, t, n) : r;
3369
+ }
3370
+ }, {
3371
+ ...kt,
3372
+ resolve: (e, t, n) => {
3373
+ const r = kt.resolve(e, t, n);
3374
+ return r === O ? Pn.resolve(e, t, n) : r;
3375
+ }
3376
+ }), ea = {
3377
+ ...rn,
3378
+ schema: Jo,
3379
+ skipInvalid: !1,
3380
+ noRefs: !1,
3381
+ flowLevel: -1,
3382
+ transform: () => {
3383
+ }
3384
+ };
3385
+ function ta(e, t = {}) {
3386
+ const n = {
3387
+ ...ea,
3388
+ ...t
3389
+ }, r = Eo(e, n.schema, {
3390
+ noRefs: n.noRefs,
3391
+ skipInvalid: n.skipInvalid
3392
+ });
3393
+ return n.flowLevel >= 0 && Co(r, (i, o) => {
3394
+ if (!(o.depth < n.flowLevel))
3395
+ return i.style.flow = !0, tr;
3396
+ }), n.transform(r), Zo(r, {
3397
+ ...Ot(n, Object.keys(rn)),
3398
+ schema: n.schema
3399
+ });
3400
+ }
3401
+ const na = qn.withTags(Fn, Hn, Mn, Bn, Dn), lr = (e, t) => {
3402
+ const n = mo(e, { schema: na, ...t });
3403
+ if (n.length === 0)
3404
+ return e.trim() === "" ? void 0 : null;
3405
+ if (n.length > 1)
3406
+ throw new gt("expected a single document in the stream, but found more");
3407
+ return n[0];
3408
+ }, Sa = (e, t) => ta(e, t);
3409
+ function ra(e, t) {
3410
+ return e.hasOwnProperty(t) ? e[t] : void 0;
3411
+ }
3412
+ const ia = /\((\d+):(\d+)\)$/;
3413
+ class At extends Error {
3414
+ originalError;
3415
+ source;
3416
+ col;
3417
+ line;
3418
+ constructor(t, n) {
3419
+ super(t.message.split(`
3420
+ `)[0]), this.originalError = t, this.source = n, Object.setPrototypeOf(this, At.prototype);
3421
+ const [, r, i] = this.message.match(ia) || [];
3422
+ this.line = parseInt(r, 10), this.col = parseInt(i, 10);
3423
+ }
3424
+ }
3425
+ function oa(e) {
3426
+ return e.endsWith(".yaml") || e.endsWith(".yml") || e.endsWith(".json");
3427
+ }
3428
+ const aa = [".graphql", ".gql"];
3429
+ function cr(e) {
3430
+ const t = e.toLowerCase();
3431
+ return aa.some((n) => t.endsWith(n));
3432
+ }
3433
+ function $t(e, t) {
3434
+ return e + "::" + t;
3435
+ }
3436
+ function sa() {
3437
+ return new Promise((e) => {
3438
+ setTimeout(e);
3439
+ });
3440
+ }
3441
+ class Vt {
3442
+ absoluteRef;
3443
+ body;
3444
+ mimeType;
3445
+ constructor(t, n, r) {
3446
+ this.absoluteRef = t, this.body = n, this.mimeType = r;
3447
+ }
3448
+ #e;
3449
+ #t;
3450
+ // pass safeLoad as argument to separate it from browser bundle
3451
+ getAst(t) {
3452
+ return this.#e === void 0 && (this.#e = t(this.body, { filename: this.absoluteRef }) ?? void 0, this.#e && this.#e.kind === 0 && // KIND.scalar = 0
3453
+ this.#e.value === "" && this.#e.startPosition !== 1 && (this.#e.startPosition = 1, this.#e.endPosition = 1)), this.#e;
3454
+ }
3455
+ getLines() {
3456
+ return this.#t === void 0 && (this.#t = this.body.split(/\r\n|[\n\r]/g)), this.#t;
3457
+ }
3458
+ }
3459
+ class sn extends Error {
3460
+ originalError;
3461
+ constructor(t) {
3462
+ super(t.message), this.originalError = t, Object.setPrototypeOf(this, sn.prototype);
3463
+ }
3464
+ }
3465
+ function Ca(e, t) {
3466
+ const n = new Vt(t, e);
3467
+ if (cr(t))
3468
+ return { source: n, parsed: e };
3469
+ try {
3470
+ return {
3471
+ source: n,
3472
+ parsed: lr(e, { filename: t })
3473
+ };
3474
+ } catch (r) {
3475
+ throw new At(r, n);
3476
+ }
3477
+ }
3478
+ class Ta {
3479
+ config;
3480
+ cache = /* @__PURE__ */ new Map();
3481
+ constructor(t = { http: { headers: [] } }) {
3482
+ this.config = t;
3483
+ }
3484
+ getFiles() {
3485
+ return new Set(Array.from(this.cache.keys()));
3486
+ }
3487
+ resolveExternalRef(t, n) {
3488
+ return Pe(n) ? n : t && Pe(t) ? new URL(n, t).href : Xe.resolve(t ? Xe.dirname(t) : process.cwd(), n);
3489
+ }
3490
+ async loadExternalRef(t) {
3491
+ try {
3492
+ if (Pe(t)) {
3493
+ const { body: n, mimeType: r } = await Cr(t, this.config.http);
3494
+ return new Vt(t, n, r);
3495
+ } else {
3496
+ if ((void 0)(t).isDirectory())
3497
+ throw new Error(`Expected a file but received a folder at ${t}.`);
3498
+ const n = await (void 0).readFile(t, "utf-8");
3499
+ return new Vt(t, n.replace(/\r\n/g, `
3500
+ `));
3501
+ }
3502
+ } catch (n) {
3503
+ throw n.message = n.message.replace(", lstat", ""), new sn(n);
3504
+ }
3505
+ }
3506
+ parseDocument(t, n = !1) {
3507
+ if (cr(t.absoluteRef))
3508
+ return { source: t, parsed: t.body };
3509
+ if (!oa(t.absoluteRef) && !t.mimeType?.match(/(json|yaml|openapi)/) && !n)
3510
+ return { source: t, parsed: t.body };
3511
+ try {
3512
+ return {
3513
+ source: t,
3514
+ parsed: lr(t.body, { filename: t.absoluteRef })
3515
+ };
3516
+ } catch (r) {
3517
+ throw new At(r, t);
3518
+ }
3519
+ }
3520
+ async resolveDocument(t, n, r = !1) {
3521
+ const i = this.resolveExternalRef(t, n), o = this.cache.get(i);
3522
+ if (o)
3523
+ return o;
3524
+ const a = this.loadExternalRef(i).then((s) => this.parseDocument(s, r));
3525
+ return this.cache.set(i, a), a;
3526
+ }
3527
+ }
3528
+ function Ln(e, t) {
3529
+ return {
3530
+ prev: e,
3531
+ node: t
3532
+ };
3533
+ }
3534
+ function la(e, t) {
3535
+ for (; e; ) {
3536
+ if (e.node === t)
3537
+ return !0;
3538
+ e = e.prev;
3539
+ }
3540
+ return !1;
3541
+ }
3542
+ const Ye = { name: "unknown", properties: {} }, ca = { name: "scalar", properties: {} };
3543
+ async function va(e) {
3544
+ const { rootDocument: t, externalRefResolver: n, rootType: r } = e, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), a = [];
3545
+ l(t.parsed, t, "#/", r);
3546
+ let s;
3547
+ do
3548
+ s = await Promise.all(a);
3549
+ while (a.length !== s.length);
3550
+ return i;
3551
+ function l(u, c, y, g) {
3552
+ const C = c.source.absoluteRef, E = /* @__PURE__ */ new Map();
3553
+ w(u, g, C + y);
3554
+ function w(N, A, R) {
3555
+ if (!Ie(N) && !Array.isArray(N))
3556
+ return;
3557
+ const p = `${A.name}::${R}`;
3558
+ if (o.has(p))
3559
+ return;
3560
+ if (o.add(p), Array.isArray(N)) {
3561
+ const b = A.items;
3562
+ if (b === void 0 && A !== Ye && A !== rt)
3563
+ return;
3564
+ const S = typeof b == "function";
3565
+ for (let m = 0; m < N.length; m++) {
3566
+ let Q = S ? b(N[m], Ce(R, m)) : b;
3567
+ if (Q === void 0 && A !== Ye && A !== rt)
3568
+ continue;
3569
+ const W = Q?.directResolveAs ? { $ref: N[m] } : N[m];
3570
+ Q = Q?.directResolveAs || Q, w(W, it(Q) ? Q : Ye, Ce(R, m));
3571
+ }
3572
+ return;
3573
+ }
3574
+ const [x, _] = Object.entries(N).find(([b]) => b === "$anchor") || [];
3575
+ _ && E.set(`#${_}`, N);
3576
+ for (const b of Object.keys(N)) {
3577
+ let S = N[b], m = ra(A.properties, b);
3578
+ m === void 0 && (m = A.additionalProperties), typeof m == "function" && (m = m(S, b)), m === void 0 && (m = Ye), A.extensionsPrefix && b.startsWith(A.extensionsPrefix) && m === Ye && (m = rt), !it(m) && m?.directResolveAs && (m = m.directResolveAs, S = { $ref: S }), m && m.name === void 0 && m.resolvable !== !1 && (m = ca), !(!it(m) || !(Ie(S) || Array.isArray(S))) && w(S, m, Ce(R, Oe(b)));
3579
+ }
3580
+ if (Rt(N)) {
3581
+ const b = F(c, N, {
3582
+ prev: null,
3583
+ node: N
3584
+ }).then((S) => {
3585
+ S.resolved && l(S.node, S.document, S.nodePointer, A);
3586
+ });
3587
+ a.push(b);
3588
+ }
3589
+ if (vr(N)) {
3590
+ const b = F(c, { $ref: N.externalValue }, {
3591
+ prev: null,
3592
+ node: N
3593
+ }).then((S) => {
3594
+ S.resolved && l(S.node, S.document, S.nodePointer, A);
3595
+ });
3596
+ a.push(b);
3597
+ }
3598
+ }
3599
+ async function F(N, A, R) {
3600
+ if (la(R.prev, A))
3601
+ throw new Error("Self-referencing circular pointer");
3602
+ if (_r(A.$ref)) {
3603
+ await sa();
3604
+ const P = {
3605
+ resolved: !0,
3606
+ isRemote: !1,
3607
+ node: E.get(A.$ref),
3608
+ document: N,
3609
+ nodePointer: A.$ref
3610
+ }, G = $t(N.source.absoluteRef, A.$ref);
3611
+ return i.set(G, P), P;
3612
+ }
3613
+ const { uri: p, pointer: x } = br(A.$ref), _ = p !== null && n.resolveExternalRef(N.source.absoluteRef, p) !== N.source.absoluteRef;
3614
+ let b;
3615
+ try {
3616
+ b = _ ? await n.resolveDocument(N.source.absoluteRef, p) : N;
3617
+ } catch (P) {
3618
+ const G = {
3619
+ resolved: !1,
3620
+ isRemote: _,
3621
+ document: void 0,
3622
+ error: P
3623
+ }, J = $t(N.source.absoluteRef, A.$ref);
3624
+ return i.set(J, G), G;
3625
+ }
3626
+ let S = {
3627
+ resolved: !0,
3628
+ document: b,
3629
+ isRemote: _,
3630
+ node: N.parsed,
3631
+ nodePointer: "#/"
3632
+ }, m = b.parsed;
3633
+ const Q = x;
3634
+ for (const P of Q)
3635
+ if (Ie(m) && m[P] !== void 0)
3636
+ m = m[P], S.nodePointer = Ce(S.nodePointer, Oe(P));
3637
+ else if (Array.isArray(m) && m[+P] !== void 0)
3638
+ m = m[+P], S.nodePointer = Ce(S.nodePointer, Oe(P));
3639
+ else if (Rt(m))
3640
+ if (S = await F(b, m, Ln(R, m)), b = S.document || b, Ie(S.node))
3641
+ m = S.node[P], S.nodePointer = Ce(S.nodePointer, Oe(P));
3642
+ else if (Array.isArray(S.node))
3643
+ m = S.node[+P], S.nodePointer = Ce(S.nodePointer, Oe(P));
3644
+ else {
3645
+ m = void 0;
3646
+ break;
3647
+ }
3648
+ else {
3649
+ m = void 0;
3650
+ break;
3651
+ }
3652
+ S.node = m, S.document = b;
3653
+ const W = $t(N.source.absoluteRef, A.$ref);
3654
+ return S.document && Rt(m) && (S = await F(S.document, m, Ln(R, m))), i.set(W, S), { ...S };
3655
+ }
3656
+ }
3657
+ }
3658
+ export {
3659
+ ha as A,
3660
+ Ta as B,
3661
+ ga as C,
3662
+ xr as D,
3663
+ Sr as E,
3664
+ kn as L,
3665
+ sn as R,
3666
+ Vt as S,
3667
+ At as Y,
3668
+ Er as a,
3669
+ cr as b,
3670
+ ya as c,
3671
+ Rt as d,
3672
+ Oe as e,
3673
+ oa as f,
3674
+ ma as g,
3675
+ pr as h,
3676
+ Pe as i,
3677
+ Cr as j,
3678
+ Aa as k,
3679
+ fa as l,
3680
+ Ca as m,
3681
+ da as n,
3682
+ pa as o,
3683
+ lr as p,
3684
+ br as q,
3685
+ va as r,
3686
+ Sa as s,
3687
+ ra as t,
3688
+ Rr as u,
3689
+ rt as v,
3690
+ it as w,
3691
+ Ea as x,
3692
+ $t as y,
3693
+ vr as z
3694
+ };