@redocly/replay 0.27.0-next.0 → 0.27.0-next.10

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