odm-client 0.0.2 → 0.0.3

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 (51) hide show
  1. package/dist/client/mongodb-client.d.ts +9 -7
  2. package/dist/client/mongodb-index.d.ts +2 -2
  3. package/dist/cloudbase-index.cjs +1 -1
  4. package/dist/cloudbase-index.js +66 -56
  5. package/dist/decorators/index.d.ts +55 -0
  6. package/dist/deps/_commonjsHelpers-KaVRbhAgd4-5pgl5rkso.js +28 -0
  7. package/dist/deps/_commonjsHelpers-KaVRbhAgd4-r4alsdeis.js +1 -0
  8. package/dist/deps/acorn-DYjaOAP8Gz-29lcn4w0b.js +16 -0
  9. package/dist/deps/acorn-DYjaOAP8Gz-gyct7wut5.js +3005 -0
  10. package/dist/deps/angular-1bp1uAROl4-bz9b1prej.js +2533 -0
  11. package/dist/deps/angular-1bp1uAROl4-z3xa5q2km.js +3 -0
  12. package/dist/deps/babel-_P9jsDBVVy-ipfz7c01i.js +7217 -0
  13. package/dist/deps/babel-_P9jsDBVVy-kjb76ly0t.js +15 -0
  14. package/dist/deps/estree-Q-oFBmJEml-u09jq3zep.js +44 -0
  15. package/dist/deps/estree-Q-oFBmJEml-w9z7zljkf.js +4528 -0
  16. package/dist/deps/flow-j77MFvzLrn-kf5rv1yl1.js +20 -0
  17. package/dist/deps/flow-j77MFvzLrn-l8rtylmcl.js +27411 -0
  18. package/dist/deps/glimmer-ewQPb5nTUl-5p9240228.js +37 -0
  19. package/dist/deps/glimmer-ewQPb5nTUl-xsdp5ejns.js +2703 -0
  20. package/dist/deps/graphql-8EXR1_taGG-a4my17998.js +28 -0
  21. package/dist/deps/graphql-8EXR1_taGG-iqqy1396h.js +1221 -0
  22. package/dist/deps/html-dGbiW_CFWL-inuu6eaf1.js +25 -0
  23. package/dist/deps/html-dGbiW_CFWL-mq1pmq7je.js +2791 -0
  24. package/dist/deps/markdown-vAYIRClyWZ-el25zjeip.js +62 -0
  25. package/dist/deps/markdown-vAYIRClyWZ-f8svm8az3.js +3190 -0
  26. package/dist/deps/meriyah-d5_qqf88x--ntk7vora9.js +5 -0
  27. package/dist/deps/meriyah-d5_qqf88x--tbqv1nv9b.js +2645 -0
  28. package/dist/deps/postcss-Vz5bDQ3hJO-if8y8k5xi.js +4739 -0
  29. package/dist/deps/postcss-Vz5bDQ3hJO-rmv75nb4j.js +61 -0
  30. package/dist/deps/typescript-2hCq12HCbJ-n0w7fscoa.js +21 -0
  31. package/dist/deps/typescript-2hCq12HCbJ-yusfiayfb.js +12947 -0
  32. package/dist/deps/yaml-I5o0CrcX7J-ibk1yd293.js +4079 -0
  33. package/dist/deps/yaml-I5o0CrcX7J-xyc4o9p22.js +159 -0
  34. package/dist/generator/cloudbase-init-generator.d.ts +8 -0
  35. package/dist/generator/enum-generator.d.ts +3 -0
  36. package/dist/generator/index.d.ts +6 -0
  37. package/dist/generator/mongodb-init-generator.d.ts +9 -0
  38. package/dist/generator/parser.d.ts +21 -0
  39. package/dist/generator/table-generator.d.ts +3 -0
  40. package/dist/generator/type-generator.d.ts +6 -0
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +3 -1
  44. package/dist/index2.cjs +42770 -0
  45. package/dist/index2.js +242204 -0
  46. package/dist/mongodb-index.cjs +11 -11
  47. package/dist/mongodb-index.js +2103 -2106
  48. package/dist/types/index.d.ts +14 -0
  49. package/package.json +3 -1
  50. /package/dist/deps/{query-builder-h6B2D2BCoQ-7t1lrgoqc.js → query-builder-h6B2D2BCoQ-f5zcr506g.js} +0 -0
  51. /package/dist/deps/{query-builder-h6B2D2BCoQ-lveomig6j.js → query-builder-h6B2D2BCoQ-iw94q0kiz.js} +0 -0
@@ -0,0 +1,4079 @@
1
+ var cr = Object.defineProperty;
2
+ var Ft = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var fr = (t, e, n) => e in t ? cr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var Ue = (t, e, n) => fr(t, typeof e != "symbol" ? e + "" : e, n), ct = (t, e, n) => e.has(t) || Ft("Cannot " + n);
7
+ var Be = (t, e, n) => (ct(t, e, "read from private field"), n ? n.call(t) : e.get(t)), tt = (t, e, n) => e.has(t) ? Ft("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), ft = (t, e, n, c) => (ct(t, e, "write to private field"), c ? c.call(t, n) : e.set(t, n), n), Ve = (t, e, n) => (ct(t, e, "access private method"), n);
8
+ var pr = Object.create, Tt = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, hr = Object.getOwnPropertyNames, mr = Object.getPrototypeOf, gr = Object.prototype.hasOwnProperty, Me = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), tn = (t, e) => {
9
+ for (var n in e) Tt(t, n, { get: e[n], enumerable: !0 });
10
+ }, yr = (t, e, n, c) => {
11
+ if (e && typeof e == "object" || typeof e == "function") for (let g of hr(e)) !gr.call(t, g) && g !== n && Tt(t, g, { get: () => e[g], enumerable: !(c = dr(e, g)) || c.enumerable });
12
+ return t;
13
+ }, xt = (t, e, n) => (n = t != null ? pr(mr(t)) : {}, yr(Tt(n, "default", { value: t, enumerable: !0 }), t)), Re = Me((t) => {
14
+ var e = { ANCHOR: "&", COMMENT: "#", TAG: "!", DIRECTIVES_END: "-", DOCUMENT_END: "." }, n = { ALIAS: "ALIAS", BLANK_LINE: "BLANK_LINE", BLOCK_FOLDED: "BLOCK_FOLDED", BLOCK_LITERAL: "BLOCK_LITERAL", COMMENT: "COMMENT", DIRECTIVE: "DIRECTIVE", DOCUMENT: "DOCUMENT", FLOW_MAP: "FLOW_MAP", FLOW_SEQ: "FLOW_SEQ", MAP: "MAP", MAP_KEY: "MAP_KEY", MAP_VALUE: "MAP_VALUE", PLAIN: "PLAIN", QUOTE_DOUBLE: "QUOTE_DOUBLE", QUOTE_SINGLE: "QUOTE_SINGLE", SEQ: "SEQ", SEQ_ITEM: "SEQ_ITEM" }, c = "tag:yaml.org,2002:", g = { MAP: "tag:yaml.org,2002:map", SEQ: "tag:yaml.org,2002:seq", STR: "tag:yaml.org,2002:str" };
15
+ function y(l) {
16
+ let i = [0], r = l.indexOf(`
17
+ `);
18
+ for (; r !== -1; ) r += 1, i.push(r), r = l.indexOf(`
19
+ `, r);
20
+ return i;
21
+ }
22
+ function w(l) {
23
+ let i, r;
24
+ return typeof l == "string" ? (i = y(l), r = l) : (Array.isArray(l) && (l = l[0]), l && l.context && (l.lineStarts || (l.lineStarts = y(l.context.src)), i = l.lineStarts, r = l.context.src)), { lineStarts: i, src: r };
25
+ }
26
+ function A(l, i) {
27
+ if (typeof l != "number" || l < 0) return null;
28
+ let { lineStarts: r, src: s } = w(i);
29
+ if (!r || !s || l > s.length) return null;
30
+ for (let p = 0; p < r.length; ++p) {
31
+ let u = r[p];
32
+ if (l < u) return { line: p, col: l - r[p - 1] + 1 };
33
+ if (l === u) return { line: p + 1, col: 1 };
34
+ }
35
+ let o = r.length;
36
+ return { line: o, col: l - r[o - 1] + 1 };
37
+ }
38
+ function k(l, i) {
39
+ let { lineStarts: r, src: s } = w(i);
40
+ if (!r || !(l >= 1) || l > r.length) return null;
41
+ let o = r[l - 1], p = r[l];
42
+ for (; p && p > o && s[p - 1] === `
43
+ `; ) --p;
44
+ return s.slice(o, p);
45
+ }
46
+ function C({ start: l, end: i }, r, s = 80) {
47
+ let o = k(l.line, r);
48
+ if (!o) return null;
49
+ let { col: p } = l;
50
+ if (o.length > s) if (p <= s - 10) o = o.substr(0, s - 1) + "…";
51
+ else {
52
+ let x = Math.round(s / 2);
53
+ o.length > p + x && (o = o.substr(0, p + x - 1) + "…"), p -= o.length - s, o = "…" + o.substr(1 - s);
54
+ }
55
+ let u = 1, h = "";
56
+ i && (i.line === l.line && p + (i.col - l.col) <= s + 1 ? u = i.col - l.col : (u = Math.min(o.length + 1, s) - p, h = "…"));
57
+ let E = p > 1 ? " ".repeat(p - 1) : "", O = "^".repeat(u);
58
+ return `${o}
59
+ ${E}${O}${h}`;
60
+ }
61
+ var P = class nn {
62
+ static copy(i) {
63
+ return new nn(i.start, i.end);
64
+ }
65
+ constructor(i, r) {
66
+ this.start = i, this.end = r || i;
67
+ }
68
+ isEmpty() {
69
+ return typeof this.start != "number" || !this.end || this.end <= this.start;
70
+ }
71
+ setOrigRange(i, r) {
72
+ let { start: s, end: o } = this;
73
+ if (i.length === 0 || o <= i[0]) return this.origStart = s, this.origEnd = o, r;
74
+ let p = r;
75
+ for (; p < i.length && !(i[p] > s); ) ++p;
76
+ this.origStart = s + p;
77
+ let u = p;
78
+ for (; p < i.length && !(i[p] >= o); ) ++p;
79
+ return this.origEnd = o + p, u;
80
+ }
81
+ }, j = class Ae {
82
+ static addStringTerminator(i, r, s) {
83
+ if (s[s.length - 1] === `
84
+ `) return s;
85
+ let o = Ae.endOfWhiteSpace(i, r);
86
+ return o >= i.length || i[o] === `
87
+ ` ? s + `
88
+ ` : s;
89
+ }
90
+ static atDocumentBoundary(i, r, s) {
91
+ let o = i[r];
92
+ if (!o) return !0;
93
+ let p = i[r - 1];
94
+ if (p && p !== `
95
+ `) return !1;
96
+ if (s) {
97
+ if (o !== s) return !1;
98
+ } else if (o !== e.DIRECTIVES_END && o !== e.DOCUMENT_END) return !1;
99
+ let u = i[r + 1], h = i[r + 2];
100
+ if (u !== o || h !== o) return !1;
101
+ let E = i[r + 3];
102
+ return !E || E === `
103
+ ` || E === " " || E === " ";
104
+ }
105
+ static endOfIdentifier(i, r) {
106
+ let s = i[r], o = s === "<", p = o ? [`
107
+ `, " ", " ", ">"] : [`
108
+ `, " ", " ", "[", "]", "{", "}", ","];
109
+ for (; s && p.indexOf(s) === -1; ) s = i[r += 1];
110
+ return o && s === ">" && (r += 1), r;
111
+ }
112
+ static endOfIndent(i, r) {
113
+ let s = i[r];
114
+ for (; s === " "; ) s = i[r += 1];
115
+ return r;
116
+ }
117
+ static endOfLine(i, r) {
118
+ let s = i[r];
119
+ for (; s && s !== `
120
+ `; ) s = i[r += 1];
121
+ return r;
122
+ }
123
+ static endOfWhiteSpace(i, r) {
124
+ let s = i[r];
125
+ for (; s === " " || s === " "; ) s = i[r += 1];
126
+ return r;
127
+ }
128
+ static startOfLine(i, r) {
129
+ let s = i[r - 1];
130
+ if (s === `
131
+ `) return r;
132
+ for (; s && s !== `
133
+ `; ) s = i[r -= 1];
134
+ return r + 1;
135
+ }
136
+ static endOfBlockIndent(i, r, s) {
137
+ let o = Ae.endOfIndent(i, s);
138
+ if (o > s + r) return o;
139
+ {
140
+ let p = Ae.endOfWhiteSpace(i, o), u = i[p];
141
+ if (!u || u === `
142
+ `) return p;
143
+ }
144
+ return null;
145
+ }
146
+ static atBlank(i, r, s) {
147
+ let o = i[r];
148
+ return o === `
149
+ ` || o === " " || o === " " || s && !o;
150
+ }
151
+ static nextNodeIsIndented(i, r, s) {
152
+ return !i || r < 0 ? !1 : r > 0 ? !0 : s && i === "-";
153
+ }
154
+ static normalizeOffset(i, r) {
155
+ let s = i[r];
156
+ return s ? s !== `
157
+ ` && i[r - 1] === `
158
+ ` ? r - 1 : Ae.endOfWhiteSpace(i, r) : r;
159
+ }
160
+ static foldNewline(i, r, s) {
161
+ let o = 0, p = !1, u = "", h = i[r + 1];
162
+ for (; h === " " || h === " " || h === `
163
+ `; ) {
164
+ switch (h) {
165
+ case `
166
+ `:
167
+ o = 0, r += 1, u += `
168
+ `;
169
+ break;
170
+ case " ":
171
+ o <= s && (p = !0), r = Ae.endOfWhiteSpace(i, r + 2) - 1;
172
+ break;
173
+ case " ":
174
+ o += 1, r += 1;
175
+ break;
176
+ }
177
+ h = i[r + 1];
178
+ }
179
+ return u || (u = " "), h && o <= s && (p = !0), { fold: u, offset: r, error: p };
180
+ }
181
+ constructor(i, r, s) {
182
+ Object.defineProperty(this, "context", { value: s || null, writable: !0 }), this.error = null, this.range = null, this.valueRange = null, this.props = r || [], this.type = i, this.value = null;
183
+ }
184
+ getPropValue(i, r, s) {
185
+ if (!this.context) return null;
186
+ let { src: o } = this.context, p = this.props[i];
187
+ return p && o[p.start] === r ? o.slice(p.start + (s ? 1 : 0), p.end) : null;
188
+ }
189
+ get anchor() {
190
+ for (let i = 0; i < this.props.length; ++i) {
191
+ let r = this.getPropValue(i, e.ANCHOR, !0);
192
+ if (r != null) return r;
193
+ }
194
+ return null;
195
+ }
196
+ get comment() {
197
+ let i = [];
198
+ for (let r = 0; r < this.props.length; ++r) {
199
+ let s = this.getPropValue(r, e.COMMENT, !0);
200
+ s != null && i.push(s);
201
+ }
202
+ return i.length > 0 ? i.join(`
203
+ `) : null;
204
+ }
205
+ commentHasRequiredWhitespace(i) {
206
+ let { src: r } = this.context;
207
+ if (this.header && i === this.header.end || !this.valueRange) return !1;
208
+ let { end: s } = this.valueRange;
209
+ return i !== s || Ae.atBlank(r, s - 1);
210
+ }
211
+ get hasComment() {
212
+ if (this.context) {
213
+ let { src: i } = this.context;
214
+ for (let r = 0; r < this.props.length; ++r) if (i[this.props[r].start] === e.COMMENT) return !0;
215
+ }
216
+ return !1;
217
+ }
218
+ get hasProps() {
219
+ if (this.context) {
220
+ let { src: i } = this.context;
221
+ for (let r = 0; r < this.props.length; ++r) if (i[this.props[r].start] !== e.COMMENT) return !0;
222
+ }
223
+ return !1;
224
+ }
225
+ get includesTrailingLines() {
226
+ return !1;
227
+ }
228
+ get jsonLike() {
229
+ return [n.FLOW_MAP, n.FLOW_SEQ, n.QUOTE_DOUBLE, n.QUOTE_SINGLE].indexOf(this.type) !== -1;
230
+ }
231
+ get rangeAsLinePos() {
232
+ if (!this.range || !this.context) return;
233
+ let i = A(this.range.start, this.context.root);
234
+ if (!i) return;
235
+ let r = A(this.range.end, this.context.root);
236
+ return { start: i, end: r };
237
+ }
238
+ get rawValue() {
239
+ if (!this.valueRange || !this.context) return null;
240
+ let { start: i, end: r } = this.valueRange;
241
+ return this.context.src.slice(i, r);
242
+ }
243
+ get tag() {
244
+ for (let i = 0; i < this.props.length; ++i) {
245
+ let r = this.getPropValue(i, e.TAG, !1);
246
+ if (r != null) {
247
+ if (r[1] === "<") return { verbatim: r.slice(2, -1) };
248
+ {
249
+ let [s, o, p] = r.match(/^(.*!)([^!]*)$/);
250
+ return { handle: o, suffix: p };
251
+ }
252
+ }
253
+ }
254
+ return null;
255
+ }
256
+ get valueRangeContainsNewline() {
257
+ if (!this.valueRange || !this.context) return !1;
258
+ let { start: i, end: r } = this.valueRange, { src: s } = this.context;
259
+ for (let o = i; o < r; ++o) if (s[o] === `
260
+ `) return !0;
261
+ return !1;
262
+ }
263
+ parseComment(i) {
264
+ let { src: r } = this.context;
265
+ if (r[i] === e.COMMENT) {
266
+ let s = Ae.endOfLine(r, i + 1), o = new P(i, s);
267
+ return this.props.push(o), s;
268
+ }
269
+ return i;
270
+ }
271
+ setOrigRanges(i, r) {
272
+ return this.range && (r = this.range.setOrigRange(i, r)), this.valueRange && this.valueRange.setOrigRange(i, r), this.props.forEach((s) => s.setOrigRange(i, r)), r;
273
+ }
274
+ toString() {
275
+ let { context: { src: i }, range: r, value: s } = this;
276
+ if (s != null) return s;
277
+ let o = i.slice(r.start, r.end);
278
+ return Ae.addStringTerminator(i, r.end, o);
279
+ }
280
+ }, ie = class extends Error {
281
+ constructor(l, i, r) {
282
+ if (!r || !(i instanceof j)) throw new Error(`Invalid arguments for new ${l}`);
283
+ super(), this.name = l, this.message = r, this.source = i;
284
+ }
285
+ makePretty() {
286
+ if (!this.source) return;
287
+ this.nodeType = this.source.type;
288
+ let l = this.source.context && this.source.context.root;
289
+ if (typeof this.offset == "number") {
290
+ this.range = new P(this.offset, this.offset + 1);
291
+ let i = l && A(this.offset, l);
292
+ if (i) {
293
+ let r = { line: i.line, col: i.col + 1 };
294
+ this.linePos = { start: i, end: r };
295
+ }
296
+ delete this.offset;
297
+ } else this.range = this.source.range, this.linePos = this.source.rangeAsLinePos;
298
+ if (this.linePos) {
299
+ let { line: i, col: r } = this.linePos.start;
300
+ this.message += ` at line ${i}, column ${r}`;
301
+ let s = l && C(this.linePos, l);
302
+ s && (this.message += `:
303
+
304
+ ${s}
305
+ `);
306
+ }
307
+ delete this.source;
308
+ }
309
+ }, q = class extends ie {
310
+ constructor(l, i) {
311
+ super("YAMLReferenceError", l, i);
312
+ }
313
+ }, z = class extends ie {
314
+ constructor(l, i) {
315
+ super("YAMLSemanticError", l, i);
316
+ }
317
+ }, K = class extends ie {
318
+ constructor(l, i) {
319
+ super("YAMLSyntaxError", l, i);
320
+ }
321
+ }, ee = class extends ie {
322
+ constructor(l, i) {
323
+ super("YAMLWarning", l, i);
324
+ }
325
+ };
326
+ function le(l, i, r) {
327
+ return i in l ? Object.defineProperty(l, i, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : l[i] = r, l;
328
+ }
329
+ var M = class yt extends j {
330
+ static endOfLine(i, r, s) {
331
+ let o = i[r], p = r;
332
+ for (; o && o !== `
333
+ ` && !(s && (o === "[" || o === "]" || o === "{" || o === "}" || o === ",")); ) {
334
+ let u = i[p + 1];
335
+ if (o === ":" && (!u || u === `
336
+ ` || u === " " || u === " " || s && u === ",") || (o === " " || o === " ") && u === "#") break;
337
+ p += 1, o = u;
338
+ }
339
+ return p;
340
+ }
341
+ get strValue() {
342
+ if (!this.valueRange || !this.context) return null;
343
+ let { start: i, end: r } = this.valueRange, { src: s } = this.context, o = s[r - 1];
344
+ for (; i < r && (o === `
345
+ ` || o === " " || o === " "); ) o = s[--r - 1];
346
+ let p = "";
347
+ for (let h = i; h < r; ++h) {
348
+ let E = s[h];
349
+ if (E === `
350
+ `) {
351
+ let { fold: O, offset: x } = j.foldNewline(s, h, -1);
352
+ p += O, h = x;
353
+ } else if (E === " " || E === " ") {
354
+ let O = h, x = s[h + 1];
355
+ for (; h < r && (x === " " || x === " "); ) h += 1, x = s[h + 1];
356
+ x !== `
357
+ ` && (p += h > O ? s.slice(O, h + 1) : E);
358
+ } else p += E;
359
+ }
360
+ let u = s[i];
361
+ switch (u) {
362
+ case " ": {
363
+ let h = "Plain value cannot start with a tab character";
364
+ return { errors: [new z(this, h)], str: p };
365
+ }
366
+ case "@":
367
+ case "`": {
368
+ let h = `Plain value cannot start with reserved character ${u}`;
369
+ return { errors: [new z(this, h)], str: p };
370
+ }
371
+ default:
372
+ return p;
373
+ }
374
+ }
375
+ parseBlockValue(i) {
376
+ let { indent: r, inFlow: s, src: o } = this.context, p = i, u = i;
377
+ for (let h = o[p]; h === `
378
+ ` && !j.atDocumentBoundary(o, p + 1); h = o[p]) {
379
+ let E = j.endOfBlockIndent(o, r, p + 1);
380
+ if (E === null || o[E] === "#") break;
381
+ o[E] === `
382
+ ` ? p = E : (u = yt.endOfLine(o, E, s), p = u);
383
+ }
384
+ return this.valueRange.isEmpty() && (this.valueRange.start = i), this.valueRange.end = u, u;
385
+ }
386
+ parse(i, r) {
387
+ this.context = i;
388
+ let { inFlow: s, src: o } = i, p = r, u = o[p];
389
+ return u && u !== "#" && u !== `
390
+ ` && (p = yt.endOfLine(o, r, s)), this.valueRange = new P(r, p), p = j.endOfWhiteSpace(o, p), p = this.parseComment(p), (!this.hasComment || this.valueRange.isEmpty()) && (p = this.parseBlockValue(p)), p;
391
+ }
392
+ };
393
+ t.Char = e, t.Node = j, t.PlainValue = M, t.Range = P, t.Type = n, t.YAMLError = ie, t.YAMLReferenceError = q, t.YAMLSemanticError = z, t.YAMLSyntaxError = K, t.YAMLWarning = ee, t._defineProperty = le, t.defaultTagPrefix = c, t.defaultTags = g;
394
+ }), vr = Me((t) => {
395
+ var e = Re(), n = class extends e.Node {
396
+ constructor() {
397
+ super(e.Type.BLANK_LINE);
398
+ }
399
+ get includesTrailingLines() {
400
+ return !0;
401
+ }
402
+ parse(M, l) {
403
+ return this.context = M, this.range = new e.Range(l, l + 1), l + 1;
404
+ }
405
+ }, c = class extends e.Node {
406
+ constructor(M, l) {
407
+ super(M, l), this.node = null;
408
+ }
409
+ get includesTrailingLines() {
410
+ return !!this.node && this.node.includesTrailingLines;
411
+ }
412
+ parse(M, l) {
413
+ this.context = M;
414
+ let { parseNode: i, src: r } = M, { atLineStart: s, lineStart: o } = M;
415
+ !s && this.type === e.Type.SEQ_ITEM && (this.error = new e.YAMLSemanticError(this, "Sequence items must not have preceding content on the same line"));
416
+ let p = s ? l - o : M.indent, u = e.Node.endOfWhiteSpace(r, l + 1), h = r[u], E = h === "#", O = [], x = null;
417
+ for (; h === `
418
+ ` || h === "#"; ) {
419
+ if (h === "#") {
420
+ let W = e.Node.endOfLine(r, u + 1);
421
+ O.push(new e.Range(u, W)), u = W;
422
+ } else {
423
+ s = !0, o = u + 1;
424
+ let W = e.Node.endOfWhiteSpace(r, o);
425
+ r[W] === `
426
+ ` && O.length === 0 && (x = new n(), o = x.parse({ src: r }, o)), u = e.Node.endOfIndent(r, o);
427
+ }
428
+ h = r[u];
429
+ }
430
+ if (e.Node.nextNodeIsIndented(h, u - (o + p), this.type !== e.Type.SEQ_ITEM) ? this.node = i({ atLineStart: s, inCollection: !1, indent: p, lineStart: o, parent: this }, u) : h && o > l + 1 && (u = o - 1), this.node) {
431
+ if (x) {
432
+ let W = M.parent.items || M.parent.contents;
433
+ W && W.push(x);
434
+ }
435
+ O.length && Array.prototype.push.apply(this.props, O), u = this.node.range.end;
436
+ } else if (E) {
437
+ let W = O[0];
438
+ this.props.push(W), u = W.end;
439
+ } else u = e.Node.endOfLine(r, l + 1);
440
+ let _ = this.node ? this.node.valueRange.end : u;
441
+ return this.valueRange = new e.Range(l, _), u;
442
+ }
443
+ setOrigRanges(M, l) {
444
+ return l = super.setOrigRanges(M, l), this.node ? this.node.setOrigRanges(M, l) : l;
445
+ }
446
+ toString() {
447
+ let { context: { src: M }, node: l, range: i, value: r } = this;
448
+ if (r != null) return r;
449
+ let s = l ? M.slice(i.start, l.range.start) + String(l) : M.slice(i.start, i.end);
450
+ return e.Node.addStringTerminator(M, i.end, s);
451
+ }
452
+ }, g = class extends e.Node {
453
+ constructor() {
454
+ super(e.Type.COMMENT);
455
+ }
456
+ parse(M, l) {
457
+ this.context = M;
458
+ let i = this.parseComment(l);
459
+ return this.range = new e.Range(l, i), i;
460
+ }
461
+ };
462
+ function y(M) {
463
+ let l = M;
464
+ for (; l instanceof c; ) l = l.node;
465
+ if (!(l instanceof w)) return null;
466
+ let i = l.items.length, r = -1;
467
+ for (let p = i - 1; p >= 0; --p) {
468
+ let u = l.items[p];
469
+ if (u.type === e.Type.COMMENT) {
470
+ let { indent: h, lineStart: E } = u.context;
471
+ if (h > 0 && u.range.start >= E + h) break;
472
+ r = p;
473
+ } else if (u.type === e.Type.BLANK_LINE) r = p;
474
+ else break;
475
+ }
476
+ if (r === -1) return null;
477
+ let s = l.items.splice(r, i - r), o = s[0].range.start;
478
+ for (; l.range.end = o, l.valueRange && l.valueRange.end > o && (l.valueRange.end = o), l !== M; ) l = l.context.parent;
479
+ return s;
480
+ }
481
+ var w = class vt extends e.Node {
482
+ static nextContentHasIndent(l, i, r) {
483
+ let s = e.Node.endOfLine(l, i) + 1;
484
+ i = e.Node.endOfWhiteSpace(l, s);
485
+ let o = l[i];
486
+ return o ? i >= s + r ? !0 : o !== "#" && o !== `
487
+ ` ? !1 : vt.nextContentHasIndent(l, i, r) : !1;
488
+ }
489
+ constructor(l) {
490
+ super(l.type === e.Type.SEQ_ITEM ? e.Type.SEQ : e.Type.MAP);
491
+ for (let r = l.props.length - 1; r >= 0; --r) if (l.props[r].start < l.context.lineStart) {
492
+ this.props = l.props.slice(0, r + 1), l.props = l.props.slice(r + 1);
493
+ let s = l.props[0] || l.valueRange;
494
+ l.range.start = s.start;
495
+ break;
496
+ }
497
+ this.items = [l];
498
+ let i = y(l);
499
+ i && Array.prototype.push.apply(this.items, i);
500
+ }
501
+ get includesTrailingLines() {
502
+ return this.items.length > 0;
503
+ }
504
+ parse(l, i) {
505
+ this.context = l;
506
+ let { parseNode: r, src: s } = l, o = e.Node.startOfLine(s, i), p = this.items[0];
507
+ p.context.parent = this, this.valueRange = e.Range.copy(p.valueRange);
508
+ let u = p.range.start - p.context.lineStart, h = i;
509
+ h = e.Node.normalizeOffset(s, h);
510
+ let E = s[h], O = e.Node.endOfWhiteSpace(s, o) === h, x = !1;
511
+ for (; E; ) {
512
+ for (; E === `
513
+ ` || E === "#"; ) {
514
+ if (O && E === `
515
+ ` && !x) {
516
+ let B = new n();
517
+ if (h = B.parse({ src: s }, h), this.valueRange.end = h, h >= s.length) {
518
+ E = null;
519
+ break;
520
+ }
521
+ this.items.push(B), h -= 1;
522
+ } else if (E === "#") {
523
+ if (h < o + u && !vt.nextContentHasIndent(s, h, u)) return h;
524
+ let B = new g();
525
+ if (h = B.parse({ indent: u, lineStart: o, src: s }, h), this.items.push(B), this.valueRange.end = h, h >= s.length) {
526
+ E = null;
527
+ break;
528
+ }
529
+ }
530
+ if (o = h + 1, h = e.Node.endOfIndent(s, o), e.Node.atBlank(s, h)) {
531
+ let B = e.Node.endOfWhiteSpace(s, h), U = s[B];
532
+ (!U || U === `
533
+ ` || U === "#") && (h = B);
534
+ }
535
+ E = s[h], O = !0;
536
+ }
537
+ if (!E) break;
538
+ if (h !== o + u && (O || E !== ":")) {
539
+ if (h < o + u) {
540
+ o > i && (h = o);
541
+ break;
542
+ } else if (!this.error) {
543
+ let B = "All collection items must start at the same column";
544
+ this.error = new e.YAMLSyntaxError(this, B);
545
+ }
546
+ }
547
+ if (p.type === e.Type.SEQ_ITEM) {
548
+ if (E !== "-") {
549
+ o > i && (h = o);
550
+ break;
551
+ }
552
+ } else if (E === "-" && !this.error) {
553
+ let B = s[h + 1];
554
+ if (!B || B === `
555
+ ` || B === " " || B === " ") {
556
+ let U = "A collection cannot be both a mapping and a sequence";
557
+ this.error = new e.YAMLSyntaxError(this, U);
558
+ }
559
+ }
560
+ let _ = r({ atLineStart: O, inCollection: !0, indent: u, lineStart: o, parent: this }, h);
561
+ if (!_) return h;
562
+ if (this.items.push(_), this.valueRange.end = _.valueRange.end, h = e.Node.normalizeOffset(s, _.range.end), E = s[h], O = !1, x = _.includesTrailingLines, E) {
563
+ let B = h - 1, U = s[B];
564
+ for (; U === " " || U === " "; ) U = s[--B];
565
+ U === `
566
+ ` && (o = B + 1, O = !0);
567
+ }
568
+ let W = y(_);
569
+ W && Array.prototype.push.apply(this.items, W);
570
+ }
571
+ return h;
572
+ }
573
+ setOrigRanges(l, i) {
574
+ return i = super.setOrigRanges(l, i), this.items.forEach((r) => {
575
+ i = r.setOrigRanges(l, i);
576
+ }), i;
577
+ }
578
+ toString() {
579
+ let { context: { src: l }, items: i, range: r, value: s } = this;
580
+ if (s != null) return s;
581
+ let o = l.slice(r.start, i[0].range.start) + String(i[0]);
582
+ for (let p = 1; p < i.length; ++p) {
583
+ let u = i[p], { atLineStart: h, indent: E } = u.context;
584
+ if (h) for (let O = 0; O < E; ++O) o += " ";
585
+ o += String(u);
586
+ }
587
+ return e.Node.addStringTerminator(l, r.end, o);
588
+ }
589
+ }, A = class extends e.Node {
590
+ constructor() {
591
+ super(e.Type.DIRECTIVE), this.name = null;
592
+ }
593
+ get parameters() {
594
+ let M = this.rawValue;
595
+ return M ? M.trim().split(/[ \t]+/) : [];
596
+ }
597
+ parseName(M) {
598
+ let { src: l } = this.context, i = M, r = l[i];
599
+ for (; r && r !== `
600
+ ` && r !== " " && r !== " "; ) r = l[i += 1];
601
+ return this.name = l.slice(M, i), i;
602
+ }
603
+ parseParameters(M) {
604
+ let { src: l } = this.context, i = M, r = l[i];
605
+ for (; r && r !== `
606
+ ` && r !== "#"; ) r = l[i += 1];
607
+ return this.valueRange = new e.Range(M, i), i;
608
+ }
609
+ parse(M, l) {
610
+ this.context = M;
611
+ let i = this.parseName(l + 1);
612
+ return i = this.parseParameters(i), i = this.parseComment(i), this.range = new e.Range(l, i), i;
613
+ }
614
+ }, k = class Et extends e.Node {
615
+ static startCommentOrEndBlankLine(l, i) {
616
+ let r = e.Node.endOfWhiteSpace(l, i), s = l[r];
617
+ return s === "#" || s === `
618
+ ` ? r : i;
619
+ }
620
+ constructor() {
621
+ super(e.Type.DOCUMENT), this.directives = null, this.contents = null, this.directivesEndMarker = null, this.documentEndMarker = null;
622
+ }
623
+ parseDirectives(l) {
624
+ let { src: i } = this.context;
625
+ this.directives = [];
626
+ let r = !0, s = !1, o = l;
627
+ for (; !e.Node.atDocumentBoundary(i, o, e.Char.DIRECTIVES_END); ) switch (o = Et.startCommentOrEndBlankLine(i, o), i[o]) {
628
+ case `
629
+ `:
630
+ if (r) {
631
+ let p = new n();
632
+ o = p.parse({ src: i }, o), o < i.length && this.directives.push(p);
633
+ } else o += 1, r = !0;
634
+ break;
635
+ case "#":
636
+ {
637
+ let p = new g();
638
+ o = p.parse({ src: i }, o), this.directives.push(p), r = !1;
639
+ }
640
+ break;
641
+ case "%":
642
+ {
643
+ let p = new A();
644
+ o = p.parse({ parent: this, src: i }, o), this.directives.push(p), s = !0, r = !1;
645
+ }
646
+ break;
647
+ default:
648
+ return s ? this.error = new e.YAMLSemanticError(this, "Missing directives-end indicator line") : this.directives.length > 0 && (this.contents = this.directives, this.directives = []), o;
649
+ }
650
+ return i[o] ? (this.directivesEndMarker = new e.Range(o, o + 3), o + 3) : (s ? this.error = new e.YAMLSemanticError(this, "Missing directives-end indicator line") : this.directives.length > 0 && (this.contents = this.directives, this.directives = []), o);
651
+ }
652
+ parseContents(l) {
653
+ let { parseNode: i, src: r } = this.context;
654
+ this.contents || (this.contents = []);
655
+ let s = l;
656
+ for (; r[s - 1] === "-"; ) s -= 1;
657
+ let o = e.Node.endOfWhiteSpace(r, l), p = s === l;
658
+ for (this.valueRange = new e.Range(o); !e.Node.atDocumentBoundary(r, o, e.Char.DOCUMENT_END); ) {
659
+ switch (r[o]) {
660
+ case `
661
+ `:
662
+ if (p) {
663
+ let u = new n();
664
+ o = u.parse({ src: r }, o), o < r.length && this.contents.push(u);
665
+ } else o += 1, p = !0;
666
+ s = o;
667
+ break;
668
+ case "#":
669
+ {
670
+ let u = new g();
671
+ o = u.parse({ src: r }, o), this.contents.push(u), p = !1;
672
+ }
673
+ break;
674
+ default: {
675
+ let u = e.Node.endOfIndent(r, o), h = i({ atLineStart: p, indent: -1, inFlow: !1, inCollection: !1, lineStart: s, parent: this }, u);
676
+ if (!h) return this.valueRange.end = u;
677
+ this.contents.push(h), o = h.range.end, p = !1;
678
+ let E = y(h);
679
+ E && Array.prototype.push.apply(this.contents, E);
680
+ }
681
+ }
682
+ o = Et.startCommentOrEndBlankLine(r, o);
683
+ }
684
+ if (this.valueRange.end = o, r[o] && (this.documentEndMarker = new e.Range(o, o + 3), o += 3, r[o])) {
685
+ if (o = e.Node.endOfWhiteSpace(r, o), r[o] === "#") {
686
+ let u = new g();
687
+ o = u.parse({ src: r }, o), this.contents.push(u);
688
+ }
689
+ switch (r[o]) {
690
+ case `
691
+ `:
692
+ o += 1;
693
+ break;
694
+ case void 0:
695
+ break;
696
+ default:
697
+ this.error = new e.YAMLSyntaxError(this, "Document end marker line cannot have a non-comment suffix");
698
+ }
699
+ }
700
+ return o;
701
+ }
702
+ parse(l, i) {
703
+ l.root = this, this.context = l;
704
+ let { src: r } = l, s = r.charCodeAt(i) === 65279 ? i + 1 : i;
705
+ return s = this.parseDirectives(s), s = this.parseContents(s), s;
706
+ }
707
+ setOrigRanges(l, i) {
708
+ return i = super.setOrigRanges(l, i), this.directives.forEach((r) => {
709
+ i = r.setOrigRanges(l, i);
710
+ }), this.directivesEndMarker && (i = this.directivesEndMarker.setOrigRange(l, i)), this.contents.forEach((r) => {
711
+ i = r.setOrigRanges(l, i);
712
+ }), this.documentEndMarker && (i = this.documentEndMarker.setOrigRange(l, i)), i;
713
+ }
714
+ toString() {
715
+ let { contents: l, directives: i, value: r } = this;
716
+ if (r != null) return r;
717
+ let s = i.join("");
718
+ return l.length > 0 && ((i.length > 0 || l[0].type === e.Type.COMMENT) && (s += `---
719
+ `), s += l.join("")), s[s.length - 1] !== `
720
+ ` && (s += `
721
+ `), s;
722
+ }
723
+ }, C = class extends e.Node {
724
+ parse(M, l) {
725
+ this.context = M;
726
+ let { src: i } = M, r = e.Node.endOfIdentifier(i, l + 1);
727
+ return this.valueRange = new e.Range(l + 1, r), r = e.Node.endOfWhiteSpace(i, r), r = this.parseComment(r), r;
728
+ }
729
+ }, P = { CLIP: "CLIP", KEEP: "KEEP", STRIP: "STRIP" }, j = class extends e.Node {
730
+ constructor(M, l) {
731
+ super(M, l), this.blockIndent = null, this.chomping = P.CLIP, this.header = null;
732
+ }
733
+ get includesTrailingLines() {
734
+ return this.chomping === P.KEEP;
735
+ }
736
+ get strValue() {
737
+ if (!this.valueRange || !this.context) return null;
738
+ let { start: M, end: l } = this.valueRange, { indent: i, src: r } = this.context;
739
+ if (this.valueRange.isEmpty()) return "";
740
+ let s = null, o = r[l - 1];
741
+ for (; o === `
742
+ ` || o === " " || o === " "; ) {
743
+ if (l -= 1, l <= M) {
744
+ if (this.chomping === P.KEEP) break;
745
+ return "";
746
+ }
747
+ o === `
748
+ ` && (s = l), o = r[l - 1];
749
+ }
750
+ let p = l + 1;
751
+ s && (this.chomping === P.KEEP ? (p = s, l = this.valueRange.end) : l = s);
752
+ let u = i + this.blockIndent, h = this.type === e.Type.BLOCK_FOLDED, E = !0, O = "", x = "", _ = !1;
753
+ for (let W = M; W < l; ++W) {
754
+ for (let U = 0; U < u && r[W] === " "; ++U) W += 1;
755
+ let B = r[W];
756
+ if (B === `
757
+ `) x === `
758
+ ` ? O += `
759
+ ` : x = `
760
+ `;
761
+ else {
762
+ let U = e.Node.endOfLine(r, W), oe = r.slice(W, U);
763
+ W = U, h && (B === " " || B === " ") && W < p ? (x === " " ? x = `
764
+ ` : !_ && !E && x === `
765
+ ` && (x = `
766
+
767
+ `), O += x + oe, x = U < l && r[U] || "", _ = !0) : (O += x + oe, x = h && W < p ? " " : `
768
+ `, _ = !1), E && oe !== "" && (E = !1);
769
+ }
770
+ }
771
+ return this.chomping === P.STRIP ? O : O + `
772
+ `;
773
+ }
774
+ parseBlockHeader(M) {
775
+ let { src: l } = this.context, i = M + 1, r = "";
776
+ for (; ; ) {
777
+ let s = l[i];
778
+ switch (s) {
779
+ case "-":
780
+ this.chomping = P.STRIP;
781
+ break;
782
+ case "+":
783
+ this.chomping = P.KEEP;
784
+ break;
785
+ case "0":
786
+ case "1":
787
+ case "2":
788
+ case "3":
789
+ case "4":
790
+ case "5":
791
+ case "6":
792
+ case "7":
793
+ case "8":
794
+ case "9":
795
+ r += s;
796
+ break;
797
+ default:
798
+ return this.blockIndent = Number(r) || null, this.header = new e.Range(M, i), i;
799
+ }
800
+ i += 1;
801
+ }
802
+ }
803
+ parseBlockValue(M) {
804
+ let { indent: l, src: i } = this.context, r = !!this.blockIndent, s = M, o = M, p = 1;
805
+ for (let u = i[s]; u === `
806
+ ` && (s += 1, !e.Node.atDocumentBoundary(i, s)); u = i[s]) {
807
+ let h = e.Node.endOfBlockIndent(i, l, s);
808
+ if (h === null) break;
809
+ let E = i[h], O = h - (s + l);
810
+ if (this.blockIndent) {
811
+ if (E && E !== `
812
+ ` && O < this.blockIndent) {
813
+ if (i[h] === "#") break;
814
+ if (!this.error) {
815
+ let x = `Block scalars must not be less indented than their ${r ? "explicit indentation indicator" : "first line"}`;
816
+ this.error = new e.YAMLSemanticError(this, x);
817
+ }
818
+ }
819
+ } else if (i[h] !== `
820
+ `) {
821
+ if (O < p) {
822
+ let x = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator";
823
+ this.error = new e.YAMLSemanticError(this, x);
824
+ }
825
+ this.blockIndent = O;
826
+ } else O > p && (p = O);
827
+ i[h] === `
828
+ ` ? s = h : s = o = e.Node.endOfLine(i, h);
829
+ }
830
+ return this.chomping !== P.KEEP && (s = i[o] ? o + 1 : o), this.valueRange = new e.Range(M + 1, s), s;
831
+ }
832
+ parse(M, l) {
833
+ this.context = M;
834
+ let { src: i } = M, r = this.parseBlockHeader(l);
835
+ return r = e.Node.endOfWhiteSpace(i, r), r = this.parseComment(r), r = this.parseBlockValue(r), r;
836
+ }
837
+ setOrigRanges(M, l) {
838
+ return l = super.setOrigRanges(M, l), this.header ? this.header.setOrigRange(M, l) : l;
839
+ }
840
+ }, ie = class extends e.Node {
841
+ constructor(M, l) {
842
+ super(M, l), this.items = null;
843
+ }
844
+ prevNodeIsJsonLike(M = this.items.length) {
845
+ let l = this.items[M - 1];
846
+ return !!l && (l.jsonLike || l.type === e.Type.COMMENT && this.prevNodeIsJsonLike(M - 1));
847
+ }
848
+ parse(M, l) {
849
+ this.context = M;
850
+ let { parseNode: i, src: r } = M, { indent: s, lineStart: o } = M, p = r[l];
851
+ this.items = [{ char: p, offset: l }];
852
+ let u = e.Node.endOfWhiteSpace(r, l + 1);
853
+ for (p = r[u]; p && p !== "]" && p !== "}"; ) {
854
+ switch (p) {
855
+ case `
856
+ `:
857
+ {
858
+ o = u + 1;
859
+ let h = e.Node.endOfWhiteSpace(r, o);
860
+ if (r[h] === `
861
+ `) {
862
+ let E = new n();
863
+ o = E.parse({ src: r }, o), this.items.push(E);
864
+ }
865
+ if (u = e.Node.endOfIndent(r, o), u <= o + s && (p = r[u], u < o + s || p !== "]" && p !== "}")) {
866
+ let E = "Insufficient indentation in flow collection";
867
+ this.error = new e.YAMLSemanticError(this, E);
868
+ }
869
+ }
870
+ break;
871
+ case ",":
872
+ this.items.push({ char: p, offset: u }), u += 1;
873
+ break;
874
+ case "#":
875
+ {
876
+ let h = new g();
877
+ u = h.parse({ src: r }, u), this.items.push(h);
878
+ }
879
+ break;
880
+ case "?":
881
+ case ":": {
882
+ let h = r[u + 1];
883
+ if (h === `
884
+ ` || h === " " || h === " " || h === "," || p === ":" && this.prevNodeIsJsonLike()) {
885
+ this.items.push({ char: p, offset: u }), u += 1;
886
+ break;
887
+ }
888
+ }
889
+ default: {
890
+ let h = i({ atLineStart: !1, inCollection: !1, inFlow: !0, indent: -1, lineStart: o, parent: this }, u);
891
+ if (!h) return this.valueRange = new e.Range(l, u), u;
892
+ this.items.push(h), u = e.Node.normalizeOffset(r, h.range.end);
893
+ }
894
+ }
895
+ u = e.Node.endOfWhiteSpace(r, u), p = r[u];
896
+ }
897
+ return this.valueRange = new e.Range(l, u + 1), p && (this.items.push({ char: p, offset: u }), u = e.Node.endOfWhiteSpace(r, u + 1), u = this.parseComment(u)), u;
898
+ }
899
+ setOrigRanges(M, l) {
900
+ return l = super.setOrigRanges(M, l), this.items.forEach((i) => {
901
+ if (i instanceof e.Node) l = i.setOrigRanges(M, l);
902
+ else if (M.length === 0) i.origOffset = i.offset;
903
+ else {
904
+ let r = l;
905
+ for (; r < M.length && !(M[r] > i.offset); ) ++r;
906
+ i.origOffset = i.offset + r, l = r;
907
+ }
908
+ }), l;
909
+ }
910
+ toString() {
911
+ let { context: { src: M }, items: l, range: i, value: r } = this;
912
+ if (r != null) return r;
913
+ let s = l.filter((u) => u instanceof e.Node), o = "", p = i.start;
914
+ return s.forEach((u) => {
915
+ let h = M.slice(p, u.range.start);
916
+ p = u.range.end, o += h + String(u), o[o.length - 1] === `
917
+ ` && M[p - 1] !== `
918
+ ` && M[p] === `
919
+ ` && (p += 1);
920
+ }), o += M.slice(p, i.end), e.Node.addStringTerminator(M, i.end, o);
921
+ }
922
+ }, q = class rn extends e.Node {
923
+ static endOfQuote(l, i) {
924
+ let r = l[i];
925
+ for (; r && r !== '"'; ) i += r === "\\" ? 2 : 1, r = l[i];
926
+ return i + 1;
927
+ }
928
+ get strValue() {
929
+ if (!this.valueRange || !this.context) return null;
930
+ let l = [], { start: i, end: r } = this.valueRange, { indent: s, src: o } = this.context;
931
+ o[r - 1] !== '"' && l.push(new e.YAMLSyntaxError(this, 'Missing closing "quote'));
932
+ let p = "";
933
+ for (let u = i + 1; u < r - 1; ++u) {
934
+ let h = o[u];
935
+ if (h === `
936
+ `) {
937
+ e.Node.atDocumentBoundary(o, u + 1) && l.push(new e.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values"));
938
+ let { fold: E, offset: O, error: x } = e.Node.foldNewline(o, u, s);
939
+ p += E, u = O, x && l.push(new e.YAMLSemanticError(this, "Multi-line double-quoted string needs to be sufficiently indented"));
940
+ } else if (h === "\\") switch (u += 1, o[u]) {
941
+ case "0":
942
+ p += "\0";
943
+ break;
944
+ case "a":
945
+ p += "\x07";
946
+ break;
947
+ case "b":
948
+ p += "\b";
949
+ break;
950
+ case "e":
951
+ p += "\x1B";
952
+ break;
953
+ case "f":
954
+ p += "\f";
955
+ break;
956
+ case "n":
957
+ p += `
958
+ `;
959
+ break;
960
+ case "r":
961
+ p += "\r";
962
+ break;
963
+ case "t":
964
+ p += " ";
965
+ break;
966
+ case "v":
967
+ p += "\v";
968
+ break;
969
+ case "N":
970
+ p += "…";
971
+ break;
972
+ case "_":
973
+ p += " ";
974
+ break;
975
+ case "L":
976
+ p += "\u2028";
977
+ break;
978
+ case "P":
979
+ p += "\u2029";
980
+ break;
981
+ case " ":
982
+ p += " ";
983
+ break;
984
+ case '"':
985
+ p += '"';
986
+ break;
987
+ case "/":
988
+ p += "/";
989
+ break;
990
+ case "\\":
991
+ p += "\\";
992
+ break;
993
+ case " ":
994
+ p += " ";
995
+ break;
996
+ case "x":
997
+ p += this.parseCharCode(u + 1, 2, l), u += 2;
998
+ break;
999
+ case "u":
1000
+ p += this.parseCharCode(u + 1, 4, l), u += 4;
1001
+ break;
1002
+ case "U":
1003
+ p += this.parseCharCode(u + 1, 8, l), u += 8;
1004
+ break;
1005
+ case `
1006
+ `:
1007
+ for (; o[u + 1] === " " || o[u + 1] === " "; ) u += 1;
1008
+ break;
1009
+ default:
1010
+ l.push(new e.YAMLSyntaxError(this, `Invalid escape sequence ${o.substr(u - 1, 2)}`)), p += "\\" + o[u];
1011
+ }
1012
+ else if (h === " " || h === " ") {
1013
+ let E = u, O = o[u + 1];
1014
+ for (; O === " " || O === " "; ) u += 1, O = o[u + 1];
1015
+ O !== `
1016
+ ` && (p += u > E ? o.slice(E, u + 1) : h);
1017
+ } else p += h;
1018
+ }
1019
+ return l.length > 0 ? { errors: l, str: p } : p;
1020
+ }
1021
+ parseCharCode(l, i, r) {
1022
+ let { src: s } = this.context, o = s.substr(l, i), p = o.length === i && /^[0-9a-fA-F]+$/.test(o) ? parseInt(o, 16) : NaN;
1023
+ return isNaN(p) ? (r.push(new e.YAMLSyntaxError(this, `Invalid escape sequence ${s.substr(l - 2, i + 2)}`)), s.substr(l - 2, i + 2)) : String.fromCodePoint(p);
1024
+ }
1025
+ parse(l, i) {
1026
+ this.context = l;
1027
+ let { src: r } = l, s = rn.endOfQuote(r, i + 1);
1028
+ return this.valueRange = new e.Range(i, s), s = e.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
1029
+ }
1030
+ }, z = class sn extends e.Node {
1031
+ static endOfQuote(l, i) {
1032
+ let r = l[i];
1033
+ for (; r; ) if (r === "'") {
1034
+ if (l[i + 1] !== "'") break;
1035
+ r = l[i += 2];
1036
+ } else r = l[i += 1];
1037
+ return i + 1;
1038
+ }
1039
+ get strValue() {
1040
+ if (!this.valueRange || !this.context) return null;
1041
+ let l = [], { start: i, end: r } = this.valueRange, { indent: s, src: o } = this.context;
1042
+ o[r - 1] !== "'" && l.push(new e.YAMLSyntaxError(this, "Missing closing 'quote"));
1043
+ let p = "";
1044
+ for (let u = i + 1; u < r - 1; ++u) {
1045
+ let h = o[u];
1046
+ if (h === `
1047
+ `) {
1048
+ e.Node.atDocumentBoundary(o, u + 1) && l.push(new e.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values"));
1049
+ let { fold: E, offset: O, error: x } = e.Node.foldNewline(o, u, s);
1050
+ p += E, u = O, x && l.push(new e.YAMLSemanticError(this, "Multi-line single-quoted string needs to be sufficiently indented"));
1051
+ } else if (h === "'") p += h, u += 1, o[u] !== "'" && l.push(new e.YAMLSyntaxError(this, "Unescaped single quote? This should not happen."));
1052
+ else if (h === " " || h === " ") {
1053
+ let E = u, O = o[u + 1];
1054
+ for (; O === " " || O === " "; ) u += 1, O = o[u + 1];
1055
+ O !== `
1056
+ ` && (p += u > E ? o.slice(E, u + 1) : h);
1057
+ } else p += h;
1058
+ }
1059
+ return l.length > 0 ? { errors: l, str: p } : p;
1060
+ }
1061
+ parse(l, i) {
1062
+ this.context = l;
1063
+ let { src: r } = l, s = sn.endOfQuote(r, i + 1);
1064
+ return this.valueRange = new e.Range(i, s), s = e.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
1065
+ }
1066
+ };
1067
+ function K(M, l) {
1068
+ switch (M) {
1069
+ case e.Type.ALIAS:
1070
+ return new C(M, l);
1071
+ case e.Type.BLOCK_FOLDED:
1072
+ case e.Type.BLOCK_LITERAL:
1073
+ return new j(M, l);
1074
+ case e.Type.FLOW_MAP:
1075
+ case e.Type.FLOW_SEQ:
1076
+ return new ie(M, l);
1077
+ case e.Type.MAP_KEY:
1078
+ case e.Type.MAP_VALUE:
1079
+ case e.Type.SEQ_ITEM:
1080
+ return new c(M, l);
1081
+ case e.Type.COMMENT:
1082
+ case e.Type.PLAIN:
1083
+ return new e.PlainValue(M, l);
1084
+ case e.Type.QUOTE_DOUBLE:
1085
+ return new q(M, l);
1086
+ case e.Type.QUOTE_SINGLE:
1087
+ return new z(M, l);
1088
+ default:
1089
+ return null;
1090
+ }
1091
+ }
1092
+ var ee = class nt {
1093
+ static parseType(l, i, r) {
1094
+ switch (l[i]) {
1095
+ case "*":
1096
+ return e.Type.ALIAS;
1097
+ case ">":
1098
+ return e.Type.BLOCK_FOLDED;
1099
+ case "|":
1100
+ return e.Type.BLOCK_LITERAL;
1101
+ case "{":
1102
+ return e.Type.FLOW_MAP;
1103
+ case "[":
1104
+ return e.Type.FLOW_SEQ;
1105
+ case "?":
1106
+ return !r && e.Node.atBlank(l, i + 1, !0) ? e.Type.MAP_KEY : e.Type.PLAIN;
1107
+ case ":":
1108
+ return !r && e.Node.atBlank(l, i + 1, !0) ? e.Type.MAP_VALUE : e.Type.PLAIN;
1109
+ case "-":
1110
+ return !r && e.Node.atBlank(l, i + 1, !0) ? e.Type.SEQ_ITEM : e.Type.PLAIN;
1111
+ case '"':
1112
+ return e.Type.QUOTE_DOUBLE;
1113
+ case "'":
1114
+ return e.Type.QUOTE_SINGLE;
1115
+ default:
1116
+ return e.Type.PLAIN;
1117
+ }
1118
+ }
1119
+ constructor(l = {}, { atLineStart: i, inCollection: r, inFlow: s, indent: o, lineStart: p, parent: u } = {}) {
1120
+ e._defineProperty(this, "parseNode", (h, E) => {
1121
+ if (e.Node.atDocumentBoundary(this.src, E)) return null;
1122
+ let O = new nt(this, h), { props: x, type: _, valueStart: W } = O.parseProps(E), B = K(_, x), U = B.parse(O, W);
1123
+ if (B.range = new e.Range(E, U), U <= E && (B.error = new Error("Node#parse consumed no characters"), B.error.parseEnd = U, B.error.source = B, B.range.end = E + 1), O.nodeStartsCollection(B)) {
1124
+ !B.error && !O.atLineStart && O.parent.type === e.Type.DOCUMENT && (B.error = new e.YAMLSyntaxError(B, "Block collection must not have preceding content here (e.g. directives-end indicator)"));
1125
+ let oe = new w(B);
1126
+ return U = oe.parse(new nt(O), U), oe.range = new e.Range(E, U), oe;
1127
+ }
1128
+ return B;
1129
+ }), this.atLineStart = i ?? (l.atLineStart || !1), this.inCollection = r ?? (l.inCollection || !1), this.inFlow = s ?? (l.inFlow || !1), this.indent = o ?? l.indent, this.lineStart = p ?? l.lineStart, this.parent = u ?? (l.parent || {}), this.root = l.root, this.src = l.src;
1130
+ }
1131
+ nodeStartsCollection(l) {
1132
+ let { inCollection: i, inFlow: r, src: s } = this;
1133
+ if (i || r) return !1;
1134
+ if (l instanceof c) return !0;
1135
+ let o = l.range.end;
1136
+ return s[o] === `
1137
+ ` || s[o - 1] === `
1138
+ ` ? !1 : (o = e.Node.endOfWhiteSpace(s, o), s[o] === ":");
1139
+ }
1140
+ parseProps(l) {
1141
+ let { inFlow: i, parent: r, src: s } = this, o = [], p = !1;
1142
+ l = this.atLineStart ? e.Node.endOfIndent(s, l) : e.Node.endOfWhiteSpace(s, l);
1143
+ let u = s[l];
1144
+ for (; u === e.Char.ANCHOR || u === e.Char.COMMENT || u === e.Char.TAG || u === `
1145
+ `; ) {
1146
+ if (u === `
1147
+ `) {
1148
+ let E = l, O;
1149
+ do
1150
+ O = E + 1, E = e.Node.endOfIndent(s, O);
1151
+ while (s[E] === `
1152
+ `);
1153
+ let x = E - (O + this.indent), _ = r.type === e.Type.SEQ_ITEM && r.context.atLineStart;
1154
+ if (s[E] !== "#" && !e.Node.nextNodeIsIndented(s[E], x, !_)) break;
1155
+ this.atLineStart = !0, this.lineStart = O, p = !1, l = E;
1156
+ } else if (u === e.Char.COMMENT) {
1157
+ let E = e.Node.endOfLine(s, l + 1);
1158
+ o.push(new e.Range(l, E)), l = E;
1159
+ } else {
1160
+ let E = e.Node.endOfIdentifier(s, l + 1);
1161
+ u === e.Char.TAG && s[E] === "," && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(l + 1, E + 13)) && (E = e.Node.endOfIdentifier(s, E + 5)), o.push(new e.Range(l, E)), p = !0, l = e.Node.endOfWhiteSpace(s, E);
1162
+ }
1163
+ u = s[l];
1164
+ }
1165
+ p && u === ":" && e.Node.atBlank(s, l + 1, !0) && (l -= 1);
1166
+ let h = nt.parseType(s, l, i);
1167
+ return { props: o, type: h, valueStart: l };
1168
+ }
1169
+ };
1170
+ function le(M) {
1171
+ let l = [];
1172
+ M.indexOf("\r") !== -1 && (M = M.replace(/\r\n?/g, (s, o) => (s.length > 1 && l.push(o), `
1173
+ `)));
1174
+ let i = [], r = 0;
1175
+ do {
1176
+ let s = new k(), o = new ee({ src: M });
1177
+ r = s.parse(o, r), i.push(s);
1178
+ } while (r < M.length);
1179
+ return i.setOrigRanges = () => {
1180
+ if (l.length === 0) return !1;
1181
+ for (let o = 1; o < l.length; ++o) l[o] -= o;
1182
+ let s = 0;
1183
+ for (let o = 0; o < i.length; ++o) s = i[o].setOrigRanges(l, s);
1184
+ return l.splice(0, l.length), !0;
1185
+ }, i.toString = () => i.join(`...
1186
+ `), i;
1187
+ }
1188
+ t.parse = le;
1189
+ }), ze = Me((t) => {
1190
+ var e = Re();
1191
+ function n(f, a, d) {
1192
+ return d ? `#${d.replace(/[\s\S]^/gm, `$&${a}#`)}
1193
+ ${a}${f}` : f;
1194
+ }
1195
+ function c(f, a, d) {
1196
+ return d ? d.indexOf(`
1197
+ `) === -1 ? `${f} #${d}` : `${f}
1198
+ ` + d.replace(/^/gm, `${a || ""}#`) : f;
1199
+ }
1200
+ var g = class {
1201
+ };
1202
+ function y(f, a, d) {
1203
+ if (Array.isArray(f)) return f.map((m, v) => y(m, String(v), d));
1204
+ if (f && typeof f.toJSON == "function") {
1205
+ let m = d && d.anchors && d.anchors.get(f);
1206
+ m && (d.onCreate = (S) => {
1207
+ m.res = S, delete d.onCreate;
1208
+ });
1209
+ let v = f.toJSON(a, d);
1210
+ return m && d.onCreate && d.onCreate(v), v;
1211
+ }
1212
+ return (!d || !d.keep) && typeof f == "bigint" ? Number(f) : f;
1213
+ }
1214
+ var w = class extends g {
1215
+ constructor(f) {
1216
+ super(), this.value = f;
1217
+ }
1218
+ toJSON(f, a) {
1219
+ return a && a.keep ? this.value : y(this.value, f, a);
1220
+ }
1221
+ toString() {
1222
+ return String(this.value);
1223
+ }
1224
+ };
1225
+ function A(f, a, d) {
1226
+ let m = d;
1227
+ for (let v = a.length - 1; v >= 0; --v) {
1228
+ let S = a[v];
1229
+ if (Number.isInteger(S) && S >= 0) {
1230
+ let N = [];
1231
+ N[S] = m, m = N;
1232
+ } else {
1233
+ let N = {};
1234
+ Object.defineProperty(N, S, { value: m, writable: !0, enumerable: !0, configurable: !0 }), m = N;
1235
+ }
1236
+ }
1237
+ return f.createNode(m, !1);
1238
+ }
1239
+ var k = (f) => f == null || typeof f == "object" && f[Symbol.iterator]().next().done, C = class Ie extends g {
1240
+ constructor(a) {
1241
+ super(), e._defineProperty(this, "items", []), this.schema = a;
1242
+ }
1243
+ addIn(a, d) {
1244
+ if (k(a)) this.add(d);
1245
+ else {
1246
+ let [m, ...v] = a, S = this.get(m, !0);
1247
+ if (S instanceof Ie) S.addIn(v, d);
1248
+ else if (S === void 0 && this.schema) this.set(m, A(this.schema, v, d));
1249
+ else throw new Error(`Expected YAML collection at ${m}. Remaining path: ${v}`);
1250
+ }
1251
+ }
1252
+ deleteIn([a, ...d]) {
1253
+ if (d.length === 0) return this.delete(a);
1254
+ let m = this.get(a, !0);
1255
+ if (m instanceof Ie) return m.deleteIn(d);
1256
+ throw new Error(`Expected YAML collection at ${a}. Remaining path: ${d}`);
1257
+ }
1258
+ getIn([a, ...d], m) {
1259
+ let v = this.get(a, !0);
1260
+ return d.length === 0 ? !m && v instanceof w ? v.value : v : v instanceof Ie ? v.getIn(d, m) : void 0;
1261
+ }
1262
+ hasAllNullValues() {
1263
+ return this.items.every((a) => {
1264
+ if (!a || a.type !== "PAIR") return !1;
1265
+ let d = a.value;
1266
+ return d == null || d instanceof w && d.value == null && !d.commentBefore && !d.comment && !d.tag;
1267
+ });
1268
+ }
1269
+ hasIn([a, ...d]) {
1270
+ if (d.length === 0) return this.has(a);
1271
+ let m = this.get(a, !0);
1272
+ return m instanceof Ie ? m.hasIn(d) : !1;
1273
+ }
1274
+ setIn([a, ...d], m) {
1275
+ if (d.length === 0) this.set(a, m);
1276
+ else {
1277
+ let v = this.get(a, !0);
1278
+ if (v instanceof Ie) v.setIn(d, m);
1279
+ else if (v === void 0 && this.schema) this.set(a, A(this.schema, d, m));
1280
+ else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${d}`);
1281
+ }
1282
+ }
1283
+ toJSON() {
1284
+ return null;
1285
+ }
1286
+ toString(a, { blockItem: d, flowChars: m, isMap: v, itemIndent: S }, N, L) {
1287
+ let { indent: T, indentStep: I, stringify: R } = a, F = this.type === e.Type.FLOW_MAP || this.type === e.Type.FLOW_SEQ || a.inFlow;
1288
+ F && (S += I);
1289
+ let ne = v && this.hasAllNullValues();
1290
+ a = Object.assign({}, a, { allNullValues: ne, indent: S, inFlow: F, type: null });
1291
+ let Q = !1, re = !1, J = this.items.reduce((ce, X, se) => {
1292
+ let Z;
1293
+ X && (!Q && X.spaceBefore && ce.push({ type: "comment", str: "" }), X.commentBefore && X.commentBefore.match(/^.*$/gm).forEach((ur) => {
1294
+ ce.push({ type: "comment", str: `#${ur}` });
1295
+ }), X.comment && (Z = X.comment), F && (!Q && X.spaceBefore || X.commentBefore || X.comment || X.key && (X.key.commentBefore || X.key.comment) || X.value && (X.value.commentBefore || X.value.comment)) && (re = !0)), Q = !1;
1296
+ let fe = R(X, a, () => Z = null, () => Q = !0);
1297
+ return F && !re && fe.includes(`
1298
+ `) && (re = !0), F && se < this.items.length - 1 && (fe += ","), fe = c(fe, S, Z), Q && (Z || F) && (Q = !1), ce.push({ type: "item", str: fe }), ce;
1299
+ }, []), te;
1300
+ if (J.length === 0) te = m.start + m.end;
1301
+ else if (F) {
1302
+ let { start: ce, end: X } = m, se = J.map((Z) => Z.str);
1303
+ if (re || se.reduce((Z, fe) => Z + fe.length + 2, 2) > Ie.maxFlowStringSingleLineLength) {
1304
+ te = ce;
1305
+ for (let Z of se) te += Z ? `
1306
+ ${I}${T}${Z}` : `
1307
+ `;
1308
+ te += `
1309
+ ${T}${X}`;
1310
+ } else te = `${ce} ${se.join(" ")} ${X}`;
1311
+ } else {
1312
+ let ce = J.map(d);
1313
+ te = ce.shift();
1314
+ for (let X of ce) te += X ? `
1315
+ ${T}${X}` : `
1316
+ `;
1317
+ }
1318
+ return this.comment ? (te += `
1319
+ ` + this.comment.replace(/^/gm, `${T}#`), N && N()) : Q && L && L(), te;
1320
+ }
1321
+ };
1322
+ e._defineProperty(C, "maxFlowStringSingleLineLength", 60);
1323
+ function P(f) {
1324
+ let a = f instanceof w ? f.value : f;
1325
+ return a && typeof a == "string" && (a = Number(a)), Number.isInteger(a) && a >= 0 ? a : null;
1326
+ }
1327
+ var j = class extends C {
1328
+ add(f) {
1329
+ this.items.push(f);
1330
+ }
1331
+ delete(f) {
1332
+ let a = P(f);
1333
+ return typeof a != "number" ? !1 : this.items.splice(a, 1).length > 0;
1334
+ }
1335
+ get(f, a) {
1336
+ let d = P(f);
1337
+ if (typeof d != "number") return;
1338
+ let m = this.items[d];
1339
+ return !a && m instanceof w ? m.value : m;
1340
+ }
1341
+ has(f) {
1342
+ let a = P(f);
1343
+ return typeof a == "number" && a < this.items.length;
1344
+ }
1345
+ set(f, a) {
1346
+ let d = P(f);
1347
+ if (typeof d != "number") throw new Error(`Expected a valid index, not ${f}.`);
1348
+ this.items[d] = a;
1349
+ }
1350
+ toJSON(f, a) {
1351
+ let d = [];
1352
+ a && a.onCreate && a.onCreate(d);
1353
+ let m = 0;
1354
+ for (let v of this.items) d.push(y(v, String(m++), a));
1355
+ return d;
1356
+ }
1357
+ toString(f, a, d) {
1358
+ return f ? super.toString(f, { blockItem: (m) => m.type === "comment" ? m.str : `- ${m.str}`, flowChars: { start: "[", end: "]" }, isMap: !1, itemIndent: (f.indent || "") + " " }, a, d) : JSON.stringify(this);
1359
+ }
1360
+ }, ie = (f, a, d) => a === null ? "" : typeof a != "object" ? String(a) : f instanceof g && d && d.doc ? f.toString({ anchors: /* @__PURE__ */ Object.create(null), doc: d.doc, indent: "", indentStep: d.indentStep, inFlow: !0, inStringifyKey: !0, stringify: d.stringify }) : JSON.stringify(a), q = class on extends g {
1361
+ constructor(a, d = null) {
1362
+ super(), this.key = a, this.value = d, this.type = on.Type.PAIR;
1363
+ }
1364
+ get commentBefore() {
1365
+ return this.key instanceof g ? this.key.commentBefore : void 0;
1366
+ }
1367
+ set commentBefore(a) {
1368
+ if (this.key == null && (this.key = new w(null)), this.key instanceof g) this.key.commentBefore = a;
1369
+ else {
1370
+ let d = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";
1371
+ throw new Error(d);
1372
+ }
1373
+ }
1374
+ addToJSMap(a, d) {
1375
+ let m = y(this.key, "", a);
1376
+ if (d instanceof Map) {
1377
+ let v = y(this.value, m, a);
1378
+ d.set(m, v);
1379
+ } else if (d instanceof Set) d.add(m);
1380
+ else {
1381
+ let v = ie(this.key, m, a), S = y(this.value, v, a);
1382
+ v in d ? Object.defineProperty(d, v, { value: S, writable: !0, enumerable: !0, configurable: !0 }) : d[v] = S;
1383
+ }
1384
+ return d;
1385
+ }
1386
+ toJSON(a, d) {
1387
+ let m = d && d.mapAsMap ? /* @__PURE__ */ new Map() : {};
1388
+ return this.addToJSMap(d, m);
1389
+ }
1390
+ toString(a, d, m) {
1391
+ if (!a || !a.doc) return JSON.stringify(this);
1392
+ let { indent: v, indentSeq: S, simpleKeys: N } = a.doc.options, { key: L, value: T } = this, I = L instanceof g && L.comment;
1393
+ if (N) {
1394
+ if (I) throw new Error("With simple keys, key nodes cannot have comments");
1395
+ if (L instanceof C) {
1396
+ let fe = "With simple keys, collection cannot be used as a key value";
1397
+ throw new Error(fe);
1398
+ }
1399
+ }
1400
+ let R = !N && (!L || I || (L instanceof g ? L instanceof C || L.type === e.Type.BLOCK_FOLDED || L.type === e.Type.BLOCK_LITERAL : typeof L == "object")), { doc: F, indent: ne, indentStep: Q, stringify: re } = a;
1401
+ a = Object.assign({}, a, { implicitKey: !R, indent: ne + Q });
1402
+ let J = !1, te = re(L, a, () => I = null, () => J = !0);
1403
+ if (te = c(te, a.indent, I), !R && te.length > 1024) {
1404
+ if (N) throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
1405
+ R = !0;
1406
+ }
1407
+ if (a.allNullValues && !N) return this.comment ? (te = c(te, a.indent, this.comment), d && d()) : J && !I && m && m(), a.inFlow && !R ? te : `? ${te}`;
1408
+ te = R ? `? ${te}
1409
+ ${ne}:` : `${te}:`, this.comment && (te = c(te, a.indent, this.comment), d && d());
1410
+ let ce = "", X = null;
1411
+ if (T instanceof g) {
1412
+ if (T.spaceBefore && (ce = `
1413
+ `), T.commentBefore) {
1414
+ let fe = T.commentBefore.replace(/^/gm, `${a.indent}#`);
1415
+ ce += `
1416
+ ${fe}`;
1417
+ }
1418
+ X = T.comment;
1419
+ } else T && typeof T == "object" && (T = F.schema.createNode(T, !0));
1420
+ a.implicitKey = !1, !R && !this.comment && T instanceof w && (a.indentAtStart = te.length + 1), J = !1, !S && v >= 2 && !a.inFlow && !R && T instanceof j && T.type !== e.Type.FLOW_SEQ && !T.tag && !F.anchors.getName(T) && (a.indent = a.indent.substr(2));
1421
+ let se = re(T, a, () => X = null, () => J = !0), Z = " ";
1422
+ return ce || this.comment ? Z = `${ce}
1423
+ ${a.indent}` : !R && T instanceof C ? (!(se[0] === "[" || se[0] === "{") || se.includes(`
1424
+ `)) && (Z = `
1425
+ ${a.indent}`) : se[0] === `
1426
+ ` && (Z = ""), J && !X && m && m(), c(te + Z + se, a.indent, X);
1427
+ }
1428
+ };
1429
+ e._defineProperty(q, "Type", { PAIR: "PAIR", MERGE_PAIR: "MERGE_PAIR" });
1430
+ var z = (f, a) => {
1431
+ if (f instanceof K) {
1432
+ let d = a.get(f.source);
1433
+ return d.count * d.aliasCount;
1434
+ } else if (f instanceof C) {
1435
+ let d = 0;
1436
+ for (let m of f.items) {
1437
+ let v = z(m, a);
1438
+ v > d && (d = v);
1439
+ }
1440
+ return d;
1441
+ } else if (f instanceof q) {
1442
+ let d = z(f.key, a), m = z(f.value, a);
1443
+ return Math.max(d, m);
1444
+ }
1445
+ return 1;
1446
+ }, K = class an extends g {
1447
+ static stringify({ range: a, source: d }, { anchors: m, doc: v, implicitKey: S, inStringifyKey: N }) {
1448
+ let L = Object.keys(m).find((I) => m[I] === d);
1449
+ if (!L && N && (L = v.anchors.getName(d) || v.anchors.newName()), L) return `*${L}${S ? " " : ""}`;
1450
+ let T = v.anchors.getName(d) ? "Alias node must be after source node" : "Source node not found for alias node";
1451
+ throw new Error(`${T} [${a}]`);
1452
+ }
1453
+ constructor(a) {
1454
+ super(), this.source = a, this.type = e.Type.ALIAS;
1455
+ }
1456
+ set tag(a) {
1457
+ throw new Error("Alias nodes cannot have tags");
1458
+ }
1459
+ toJSON(a, d) {
1460
+ if (!d) return y(this.source, a, d);
1461
+ let { anchors: m, maxAliasCount: v } = d, S = m.get(this.source);
1462
+ if (!S || S.res === void 0) {
1463
+ let N = "This should not happen: Alias anchor was not resolved?";
1464
+ throw this.cstNode ? new e.YAMLReferenceError(this.cstNode, N) : new ReferenceError(N);
1465
+ }
1466
+ if (v >= 0 && (S.count += 1, S.aliasCount === 0 && (S.aliasCount = z(this.source, m)), S.count * S.aliasCount > v)) {
1467
+ let N = "Excessive alias count indicates a resource exhaustion attack";
1468
+ throw this.cstNode ? new e.YAMLReferenceError(this.cstNode, N) : new ReferenceError(N);
1469
+ }
1470
+ return S.res;
1471
+ }
1472
+ toString(a) {
1473
+ return an.stringify(this, a);
1474
+ }
1475
+ };
1476
+ e._defineProperty(K, "default", !0);
1477
+ function ee(f, a) {
1478
+ let d = a instanceof w ? a.value : a;
1479
+ for (let m of f) if (m instanceof q && (m.key === a || m.key === d || m.key && m.key.value === d)) return m;
1480
+ }
1481
+ var le = class extends C {
1482
+ add(f, a) {
1483
+ f ? f instanceof q || (f = new q(f.key || f, f.value)) : f = new q(f);
1484
+ let d = ee(this.items, f.key), m = this.schema && this.schema.sortMapEntries;
1485
+ if (d) if (a) d.value = f.value;
1486
+ else throw new Error(`Key ${f.key} already set`);
1487
+ else if (m) {
1488
+ let v = this.items.findIndex((S) => m(f, S) < 0);
1489
+ v === -1 ? this.items.push(f) : this.items.splice(v, 0, f);
1490
+ } else this.items.push(f);
1491
+ }
1492
+ delete(f) {
1493
+ let a = ee(this.items, f);
1494
+ return a ? this.items.splice(this.items.indexOf(a), 1).length > 0 : !1;
1495
+ }
1496
+ get(f, a) {
1497
+ let d = ee(this.items, f), m = d && d.value;
1498
+ return !a && m instanceof w ? m.value : m;
1499
+ }
1500
+ has(f) {
1501
+ return !!ee(this.items, f);
1502
+ }
1503
+ set(f, a) {
1504
+ this.add(new q(f, a), !0);
1505
+ }
1506
+ toJSON(f, a, d) {
1507
+ let m = d ? new d() : a && a.mapAsMap ? /* @__PURE__ */ new Map() : {};
1508
+ a && a.onCreate && a.onCreate(m);
1509
+ for (let v of this.items) v.addToJSMap(a, m);
1510
+ return m;
1511
+ }
1512
+ toString(f, a, d) {
1513
+ if (!f) return JSON.stringify(this);
1514
+ for (let m of this.items) if (!(m instanceof q)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(m)} instead`);
1515
+ return super.toString(f, { blockItem: (m) => m.str, flowChars: { start: "{", end: "}" }, isMap: !0, itemIndent: f.indent || "" }, a, d);
1516
+ }
1517
+ }, M = "<<", l = class extends q {
1518
+ constructor(f) {
1519
+ if (f instanceof q) {
1520
+ let a = f.value;
1521
+ a instanceof j || (a = new j(), a.items.push(f.value), a.range = f.value.range), super(f.key, a), this.range = f.range;
1522
+ } else super(new w(M), new j());
1523
+ this.type = q.Type.MERGE_PAIR;
1524
+ }
1525
+ addToJSMap(f, a) {
1526
+ for (let { source: d } of this.value.items) {
1527
+ if (!(d instanceof le)) throw new Error("Merge sources must be maps");
1528
+ let m = d.toJSON(null, f, Map);
1529
+ for (let [v, S] of m) a instanceof Map ? a.has(v) || a.set(v, S) : a instanceof Set ? a.add(v) : Object.prototype.hasOwnProperty.call(a, v) || Object.defineProperty(a, v, { value: S, writable: !0, enumerable: !0, configurable: !0 });
1530
+ }
1531
+ return a;
1532
+ }
1533
+ toString(f, a) {
1534
+ let d = this.value;
1535
+ if (d.items.length > 1) return super.toString(f, a);
1536
+ this.value = d.items[0];
1537
+ let m = super.toString(f, a);
1538
+ return this.value = d, m;
1539
+ }
1540
+ }, i = { defaultType: e.Type.BLOCK_LITERAL, lineWidth: 76 }, r = { trueStr: "true", falseStr: "false" }, s = { asBigInt: !1 }, o = { nullStr: "null" }, p = { defaultType: e.Type.PLAIN, doubleQuoted: { jsonEncoding: !1, minMultiLineLength: 40 }, fold: { lineWidth: 80, minContentWidth: 20 } };
1541
+ function u(f, a, d) {
1542
+ for (let { format: m, test: v, resolve: S } of a) if (v) {
1543
+ let N = f.match(v);
1544
+ if (N) {
1545
+ let L = S.apply(null, N);
1546
+ return L instanceof w || (L = new w(L)), m && (L.format = m), L;
1547
+ }
1548
+ }
1549
+ return d && (f = d(f)), new w(f);
1550
+ }
1551
+ var h = "flow", E = "block", O = "quoted", x = (f, a) => {
1552
+ let d = f[a + 1];
1553
+ for (; d === " " || d === " "; ) {
1554
+ do
1555
+ d = f[a += 1];
1556
+ while (d && d !== `
1557
+ `);
1558
+ d = f[a + 1];
1559
+ }
1560
+ return a;
1561
+ };
1562
+ function _(f, a, d, { indentAtStart: m, lineWidth: v = 80, minContentWidth: S = 20, onFold: N, onOverflow: L }) {
1563
+ if (!v || v < 0) return f;
1564
+ let T = Math.max(1 + S, 1 + v - a.length);
1565
+ if (f.length <= T) return f;
1566
+ let I = [], R = {}, F = v - a.length;
1567
+ typeof m == "number" && (m > v - Math.max(2, S) ? I.push(0) : F = v - m);
1568
+ let ne, Q, re = !1, J = -1, te = -1, ce = -1;
1569
+ d === E && (J = x(f, J), J !== -1 && (F = J + T));
1570
+ for (let se; se = f[J += 1]; ) {
1571
+ if (d === O && se === "\\") {
1572
+ switch (te = J, f[J + 1]) {
1573
+ case "x":
1574
+ J += 3;
1575
+ break;
1576
+ case "u":
1577
+ J += 5;
1578
+ break;
1579
+ case "U":
1580
+ J += 9;
1581
+ break;
1582
+ default:
1583
+ J += 1;
1584
+ }
1585
+ ce = J;
1586
+ }
1587
+ if (se === `
1588
+ `) d === E && (J = x(f, J)), F = J + T, ne = void 0;
1589
+ else {
1590
+ if (se === " " && Q && Q !== " " && Q !== `
1591
+ ` && Q !== " ") {
1592
+ let Z = f[J + 1];
1593
+ Z && Z !== " " && Z !== `
1594
+ ` && Z !== " " && (ne = J);
1595
+ }
1596
+ if (J >= F) if (ne) I.push(ne), F = ne + T, ne = void 0;
1597
+ else if (d === O) {
1598
+ for (; Q === " " || Q === " "; ) Q = se, se = f[J += 1], re = !0;
1599
+ let Z = J > ce + 1 ? J - 2 : te - 1;
1600
+ if (R[Z]) return f;
1601
+ I.push(Z), R[Z] = !0, F = Z + T, ne = void 0;
1602
+ } else re = !0;
1603
+ }
1604
+ Q = se;
1605
+ }
1606
+ if (re && L && L(), I.length === 0) return f;
1607
+ N && N();
1608
+ let X = f.slice(0, I[0]);
1609
+ for (let se = 0; se < I.length; ++se) {
1610
+ let Z = I[se], fe = I[se + 1] || f.length;
1611
+ Z === 0 ? X = `
1612
+ ${a}${f.slice(0, fe)}` : (d === O && R[Z] && (X += `${f[Z]}\\`), X += `
1613
+ ${a}${f.slice(Z + 1, fe)}`);
1614
+ }
1615
+ return X;
1616
+ }
1617
+ var W = ({ indentAtStart: f }) => f ? Object.assign({ indentAtStart: f }, p.fold) : p.fold, B = (f) => /^(%|---|\.\.\.)/m.test(f);
1618
+ function U(f, a, d) {
1619
+ if (!a || a < 0) return !1;
1620
+ let m = a - d, v = f.length;
1621
+ if (v <= m) return !1;
1622
+ for (let S = 0, N = 0; S < v; ++S) if (f[S] === `
1623
+ `) {
1624
+ if (S - N > m) return !0;
1625
+ if (N = S + 1, v - N <= m) return !1;
1626
+ }
1627
+ return !0;
1628
+ }
1629
+ function oe(f, a) {
1630
+ let { implicitKey: d } = a, { jsonEncoding: m, minMultiLineLength: v } = p.doubleQuoted, S = JSON.stringify(f);
1631
+ if (m) return S;
1632
+ let N = a.indent || (B(f) ? " " : ""), L = "", T = 0;
1633
+ for (let I = 0, R = S[I]; R; R = S[++I]) if (R === " " && S[I + 1] === "\\" && S[I + 2] === "n" && (L += S.slice(T, I) + "\\ ", I += 1, T = I, R = "\\"), R === "\\") switch (S[I + 1]) {
1634
+ case "u":
1635
+ {
1636
+ L += S.slice(T, I);
1637
+ let F = S.substr(I + 2, 4);
1638
+ switch (F) {
1639
+ case "0000":
1640
+ L += "\\0";
1641
+ break;
1642
+ case "0007":
1643
+ L += "\\a";
1644
+ break;
1645
+ case "000b":
1646
+ L += "\\v";
1647
+ break;
1648
+ case "001b":
1649
+ L += "\\e";
1650
+ break;
1651
+ case "0085":
1652
+ L += "\\N";
1653
+ break;
1654
+ case "00a0":
1655
+ L += "\\_";
1656
+ break;
1657
+ case "2028":
1658
+ L += "\\L";
1659
+ break;
1660
+ case "2029":
1661
+ L += "\\P";
1662
+ break;
1663
+ default:
1664
+ F.substr(0, 2) === "00" ? L += "\\x" + F.substr(2) : L += S.substr(I, 6);
1665
+ }
1666
+ I += 5, T = I + 1;
1667
+ }
1668
+ break;
1669
+ case "n":
1670
+ if (d || S[I + 2] === '"' || S.length < v) I += 1;
1671
+ else {
1672
+ for (L += S.slice(T, I) + `
1673
+
1674
+ `; S[I + 2] === "\\" && S[I + 3] === "n" && S[I + 4] !== '"'; ) L += `
1675
+ `, I += 2;
1676
+ L += N, S[I + 2] === " " && (L += "\\"), I += 1, T = I + 1;
1677
+ }
1678
+ break;
1679
+ default:
1680
+ I += 1;
1681
+ }
1682
+ return L = T ? L + S.slice(T) : S, d ? L : _(L, N, O, W(a));
1683
+ }
1684
+ function he(f, a) {
1685
+ if (a.implicitKey) {
1686
+ if (/\n/.test(f)) return oe(f, a);
1687
+ } else if (/[ \t]\n|\n[ \t]/.test(f)) return oe(f, a);
1688
+ let d = a.indent || (B(f) ? " " : ""), m = "'" + f.replace(/'/g, "''").replace(/\n+/g, `$&
1689
+ ${d}`) + "'";
1690
+ return a.implicitKey ? m : _(m, d, h, W(a));
1691
+ }
1692
+ function Se({ comment: f, type: a, value: d }, m, v, S) {
1693
+ if (/\n[\t ]+$/.test(d) || /^\s*$/.test(d)) return oe(d, m);
1694
+ let N = m.indent || (m.forceBlockIndent || B(d) ? " " : ""), L = N ? "2" : "1", T = a === e.Type.BLOCK_FOLDED ? !1 : a === e.Type.BLOCK_LITERAL ? !0 : !U(d, p.fold.lineWidth, N.length), I = T ? "|" : ">";
1695
+ if (!d) return I + `
1696
+ `;
1697
+ let R = "", F = "";
1698
+ if (d = d.replace(/[\n\t ]*$/, (Q) => {
1699
+ let re = Q.indexOf(`
1700
+ `);
1701
+ return re === -1 ? I += "-" : (d === Q || re !== Q.length - 1) && (I += "+", S && S()), F = Q.replace(/\n$/, ""), "";
1702
+ }).replace(/^[\n ]*/, (Q) => {
1703
+ Q.indexOf(" ") !== -1 && (I += L);
1704
+ let re = Q.match(/ +$/);
1705
+ return re ? (R = Q.slice(0, -re[0].length), re[0]) : (R = Q, "");
1706
+ }), F && (F = F.replace(/\n+(?!\n|$)/g, `$&${N}`)), R && (R = R.replace(/\n+/g, `$&${N}`)), f && (I += " #" + f.replace(/ ?[\r\n]+/g, " "), v && v()), !d) return `${I}${L}
1707
+ ${N}${F}`;
1708
+ if (T) return d = d.replace(/\n+/g, `$&${N}`), `${I}
1709
+ ${N}${R}${d}${F}`;
1710
+ d = d.replace(/\n+/g, `
1711
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${N}`);
1712
+ let ne = _(`${R}${d}${F}`, N, E, p.fold);
1713
+ return `${I}
1714
+ ${N}${ne}`;
1715
+ }
1716
+ function b(f, a, d, m) {
1717
+ let { comment: v, type: S, value: N } = f, { actualString: L, implicitKey: T, indent: I, inFlow: R } = a;
1718
+ if (T && /[\n[\]{},]/.test(N) || R && /[[\]{},]/.test(N)) return oe(N, a);
1719
+ if (!N || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(N)) return T || R || N.indexOf(`
1720
+ `) === -1 ? N.indexOf('"') !== -1 && N.indexOf("'") === -1 ? he(N, a) : oe(N, a) : Se(f, a, d, m);
1721
+ if (!T && !R && S !== e.Type.PLAIN && N.indexOf(`
1722
+ `) !== -1) return Se(f, a, d, m);
1723
+ if (I === "" && B(N)) return a.forceBlockIndent = !0, Se(f, a, d, m);
1724
+ let F = N.replace(/\n+/g, `$&
1725
+ ${I}`);
1726
+ if (L) {
1727
+ let { tags: Q } = a.doc.schema;
1728
+ if (typeof u(F, Q, Q.scalarFallback).value != "string") return oe(N, a);
1729
+ }
1730
+ let ne = T ? F : _(F, I, h, W(a));
1731
+ return v && !R && (ne.indexOf(`
1732
+ `) !== -1 || v.indexOf(`
1733
+ `) !== -1) ? (d && d(), n(ne, I, v)) : ne;
1734
+ }
1735
+ function $(f, a, d, m) {
1736
+ let { defaultType: v } = p, { implicitKey: S, inFlow: N } = a, { type: L, value: T } = f;
1737
+ typeof T != "string" && (T = String(T), f = Object.assign({}, f, { value: T }));
1738
+ let I = (F) => {
1739
+ switch (F) {
1740
+ case e.Type.BLOCK_FOLDED:
1741
+ case e.Type.BLOCK_LITERAL:
1742
+ return Se(f, a, d, m);
1743
+ case e.Type.QUOTE_DOUBLE:
1744
+ return oe(T, a);
1745
+ case e.Type.QUOTE_SINGLE:
1746
+ return he(T, a);
1747
+ case e.Type.PLAIN:
1748
+ return b(f, a, d, m);
1749
+ default:
1750
+ return null;
1751
+ }
1752
+ };
1753
+ (L !== e.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(T) || (S || N) && (L === e.Type.BLOCK_FOLDED || L === e.Type.BLOCK_LITERAL)) && (L = e.Type.QUOTE_DOUBLE);
1754
+ let R = I(L);
1755
+ if (R === null && (R = I(v), R === null)) throw new Error(`Unsupported default string type ${v}`);
1756
+ return R;
1757
+ }
1758
+ function D({ format: f, minFractionDigits: a, tag: d, value: m }) {
1759
+ if (typeof m == "bigint") return String(m);
1760
+ if (!isFinite(m)) return isNaN(m) ? ".nan" : m < 0 ? "-.inf" : ".inf";
1761
+ let v = JSON.stringify(m);
1762
+ if (!f && a && (!d || d === "tag:yaml.org,2002:float") && /^\d/.test(v)) {
1763
+ let S = v.indexOf(".");
1764
+ S < 0 && (S = v.length, v += ".");
1765
+ let N = a - (v.length - S - 1);
1766
+ for (; N-- > 0; ) v += "0";
1767
+ }
1768
+ return v;
1769
+ }
1770
+ function Y(f, a) {
1771
+ let d, m;
1772
+ switch (a.type) {
1773
+ case e.Type.FLOW_MAP:
1774
+ d = "}", m = "flow map";
1775
+ break;
1776
+ case e.Type.FLOW_SEQ:
1777
+ d = "]", m = "flow sequence";
1778
+ break;
1779
+ default:
1780
+ f.push(new e.YAMLSemanticError(a, "Not a flow collection!?"));
1781
+ return;
1782
+ }
1783
+ let v;
1784
+ for (let S = a.items.length - 1; S >= 0; --S) {
1785
+ let N = a.items[S];
1786
+ if (!N || N.type !== e.Type.COMMENT) {
1787
+ v = N;
1788
+ break;
1789
+ }
1790
+ }
1791
+ if (v && v.char !== d) {
1792
+ let S = `Expected ${m} to end with ${d}`, N;
1793
+ typeof v.offset == "number" ? (N = new e.YAMLSemanticError(a, S), N.offset = v.offset + 1) : (N = new e.YAMLSemanticError(v, S), v.range && v.range.end && (N.offset = v.range.end - v.range.start)), f.push(N);
1794
+ }
1795
+ }
1796
+ function V(f, a) {
1797
+ let d = a.context.src[a.range.start - 1];
1798
+ if (d !== `
1799
+ ` && d !== " " && d !== " ") {
1800
+ let m = "Comments must be separated from other tokens by white space characters";
1801
+ f.push(new e.YAMLSemanticError(a, m));
1802
+ }
1803
+ }
1804
+ function G(f, a) {
1805
+ let d = String(a), m = d.substr(0, 8) + "..." + d.substr(-8);
1806
+ return new e.YAMLSemanticError(f, `The "${m}" key is too long`);
1807
+ }
1808
+ function me(f, a) {
1809
+ for (let { afterKey: d, before: m, comment: v } of a) {
1810
+ let S = f.items[m];
1811
+ S ? (d && S.value && (S = S.value), v === void 0 ? (d || !S.commentBefore) && (S.spaceBefore = !0) : S.commentBefore ? S.commentBefore += `
1812
+ ` + v : S.commentBefore = v) : v !== void 0 && (f.comment ? f.comment += `
1813
+ ` + v : f.comment = v);
1814
+ }
1815
+ }
1816
+ function Ne(f, a) {
1817
+ let d = a.strValue;
1818
+ return d ? typeof d == "string" ? d : (d.errors.forEach((m) => {
1819
+ m.source || (m.source = a), f.errors.push(m);
1820
+ }), d.str) : "";
1821
+ }
1822
+ function Le(f, a) {
1823
+ let { handle: d, suffix: m } = a.tag, v = f.tagPrefixes.find((S) => S.handle === d);
1824
+ if (!v) {
1825
+ let S = f.getDefaults().tagPrefixes;
1826
+ if (S && (v = S.find((N) => N.handle === d)), !v) throw new e.YAMLSemanticError(a, `The ${d} tag handle is non-default and was not declared.`);
1827
+ }
1828
+ if (!m) throw new e.YAMLSemanticError(a, `The ${d} tag has no suffix.`);
1829
+ if (d === "!" && (f.version || f.options.version) === "1.0") {
1830
+ if (m[0] === "^") return f.warnings.push(new e.YAMLWarning(a, "YAML 1.0 ^ tag expansion is not supported")), m;
1831
+ if (/[:/]/.test(m)) {
1832
+ let S = m.match(/^([a-z0-9-]+)\/(.*)/i);
1833
+ return S ? `tag:${S[1]}.yaml.org,2002:${S[2]}` : `tag:${m}`;
1834
+ }
1835
+ }
1836
+ return v.prefix + decodeURIComponent(m);
1837
+ }
1838
+ function be(f, a) {
1839
+ let { tag: d, type: m } = a, v = !1;
1840
+ if (d) {
1841
+ let { handle: S, suffix: N, verbatim: L } = d;
1842
+ if (L) {
1843
+ if (L !== "!" && L !== "!!") return L;
1844
+ let T = `Verbatim tags aren't resolved, so ${L} is invalid.`;
1845
+ f.errors.push(new e.YAMLSemanticError(a, T));
1846
+ } else if (S === "!" && !N) v = !0;
1847
+ else try {
1848
+ return Le(f, a);
1849
+ } catch (T) {
1850
+ f.errors.push(T);
1851
+ }
1852
+ }
1853
+ switch (m) {
1854
+ case e.Type.BLOCK_FOLDED:
1855
+ case e.Type.BLOCK_LITERAL:
1856
+ case e.Type.QUOTE_DOUBLE:
1857
+ case e.Type.QUOTE_SINGLE:
1858
+ return e.defaultTags.STR;
1859
+ case e.Type.FLOW_MAP:
1860
+ case e.Type.MAP:
1861
+ return e.defaultTags.MAP;
1862
+ case e.Type.FLOW_SEQ:
1863
+ case e.Type.SEQ:
1864
+ return e.defaultTags.SEQ;
1865
+ case e.Type.PLAIN:
1866
+ return v ? e.defaultTags.STR : null;
1867
+ default:
1868
+ return null;
1869
+ }
1870
+ }
1871
+ function Ke(f, a, d) {
1872
+ let { tags: m } = f.schema, v = [];
1873
+ for (let N of m) if (N.tag === d) if (N.test) v.push(N);
1874
+ else {
1875
+ let L = N.resolve(f, a);
1876
+ return L instanceof C ? L : new w(L);
1877
+ }
1878
+ let S = Ne(f, a);
1879
+ return typeof S == "string" && v.length > 0 ? u(S, v, m.scalarFallback) : null;
1880
+ }
1881
+ function et({ type: f }) {
1882
+ switch (f) {
1883
+ case e.Type.FLOW_MAP:
1884
+ case e.Type.MAP:
1885
+ return e.defaultTags.MAP;
1886
+ case e.Type.FLOW_SEQ:
1887
+ case e.Type.SEQ:
1888
+ return e.defaultTags.SEQ;
1889
+ default:
1890
+ return e.defaultTags.STR;
1891
+ }
1892
+ }
1893
+ function zn(f, a, d) {
1894
+ try {
1895
+ let m = Ke(f, a, d);
1896
+ if (m) return d && a.tag && (m.tag = d), m;
1897
+ } catch (m) {
1898
+ return m.source || (m.source = a), f.errors.push(m), null;
1899
+ }
1900
+ try {
1901
+ let m = et(a);
1902
+ if (!m) throw new Error(`The tag ${d} is unavailable`);
1903
+ let v = `The tag ${d} is unavailable, falling back to ${m}`;
1904
+ f.warnings.push(new e.YAMLWarning(a, v));
1905
+ let S = Ke(f, a, m);
1906
+ return S.tag = d, S;
1907
+ } catch (m) {
1908
+ let v = new e.YAMLReferenceError(a, m.message);
1909
+ return v.stack = m.stack, f.errors.push(v), null;
1910
+ }
1911
+ }
1912
+ var Xn = (f) => {
1913
+ if (!f) return !1;
1914
+ let { type: a } = f;
1915
+ return a === e.Type.MAP_KEY || a === e.Type.MAP_VALUE || a === e.Type.SEQ_ITEM;
1916
+ };
1917
+ function Zn(f, a) {
1918
+ let d = { before: [], after: [] }, m = !1, v = !1, S = Xn(a.context.parent) ? a.context.parent.props.concat(a.props) : a.props;
1919
+ for (let { start: N, end: L } of S) switch (a.context.src[N]) {
1920
+ case e.Char.COMMENT: {
1921
+ if (!a.commentHasRequiredWhitespace(N)) {
1922
+ let R = "Comments must be separated from other tokens by white space characters";
1923
+ f.push(new e.YAMLSemanticError(a, R));
1924
+ }
1925
+ let { header: T, valueRange: I } = a;
1926
+ (I && (N > I.start || T && N > T.start) ? d.after : d.before).push(a.context.src.slice(N + 1, L));
1927
+ break;
1928
+ }
1929
+ case e.Char.ANCHOR:
1930
+ if (m) {
1931
+ let T = "A node can have at most one anchor";
1932
+ f.push(new e.YAMLSemanticError(a, T));
1933
+ }
1934
+ m = !0;
1935
+ break;
1936
+ case e.Char.TAG:
1937
+ if (v) {
1938
+ let T = "A node can have at most one tag";
1939
+ f.push(new e.YAMLSemanticError(a, T));
1940
+ }
1941
+ v = !0;
1942
+ break;
1943
+ }
1944
+ return { comments: d, hasAnchor: m, hasTag: v };
1945
+ }
1946
+ function er(f, a) {
1947
+ let { anchors: d, errors: m, schema: v } = f;
1948
+ if (a.type === e.Type.ALIAS) {
1949
+ let N = a.rawValue, L = d.getNode(N);
1950
+ if (!L) {
1951
+ let I = `Aliased anchor not found: ${N}`;
1952
+ return m.push(new e.YAMLReferenceError(a, I)), null;
1953
+ }
1954
+ let T = new K(L);
1955
+ return d._cstAliases.push(T), T;
1956
+ }
1957
+ let S = be(f, a);
1958
+ if (S) return zn(f, a, S);
1959
+ if (a.type !== e.Type.PLAIN) {
1960
+ let N = `Failed to resolve ${a.type} node here`;
1961
+ return m.push(new e.YAMLSyntaxError(a, N)), null;
1962
+ }
1963
+ try {
1964
+ let N = Ne(f, a);
1965
+ return u(N, v.tags, v.tags.scalarFallback);
1966
+ } catch (N) {
1967
+ return N.source || (N.source = a), m.push(N), null;
1968
+ }
1969
+ }
1970
+ function Te(f, a) {
1971
+ if (!a) return null;
1972
+ a.error && f.errors.push(a.error);
1973
+ let { comments: d, hasAnchor: m, hasTag: v } = Zn(f.errors, a);
1974
+ if (m) {
1975
+ let { anchors: N } = f, L = a.anchor, T = N.getNode(L);
1976
+ T && (N.map[N.newName(L)] = T), N.map[L] = a;
1977
+ }
1978
+ if (a.type === e.Type.ALIAS && (m || v)) {
1979
+ let N = "An alias node must not specify any properties";
1980
+ f.errors.push(new e.YAMLSemanticError(a, N));
1981
+ }
1982
+ let S = er(f, a);
1983
+ if (S) {
1984
+ S.range = [a.range.start, a.range.end], f.options.keepCstNodes && (S.cstNode = a), f.options.keepNodeTypes && (S.type = a.type);
1985
+ let N = d.before.join(`
1986
+ `);
1987
+ N && (S.commentBefore = S.commentBefore ? `${S.commentBefore}
1988
+ ${N}` : N);
1989
+ let L = d.after.join(`
1990
+ `);
1991
+ L && (S.comment = S.comment ? `${S.comment}
1992
+ ${L}` : L);
1993
+ }
1994
+ return a.resolved = S;
1995
+ }
1996
+ function tr(f, a) {
1997
+ if (a.type !== e.Type.MAP && a.type !== e.Type.FLOW_MAP) {
1998
+ let N = `A ${a.type} node cannot be resolved as a mapping`;
1999
+ return f.errors.push(new e.YAMLSyntaxError(a, N)), null;
2000
+ }
2001
+ let { comments: d, items: m } = a.type === e.Type.FLOW_MAP ? sr(f, a) : ir(f, a), v = new le();
2002
+ v.items = m, me(v, d);
2003
+ let S = !1;
2004
+ for (let N = 0; N < m.length; ++N) {
2005
+ let { key: L } = m[N];
2006
+ if (L instanceof C && (S = !0), f.schema.merge && L && L.value === M) {
2007
+ m[N] = new l(m[N]);
2008
+ let T = m[N].value.items, I = null;
2009
+ T.some((R) => {
2010
+ if (R instanceof K) {
2011
+ let { type: F } = R.source;
2012
+ return F === e.Type.MAP || F === e.Type.FLOW_MAP ? !1 : I = "Merge nodes aliases can only point to maps";
2013
+ }
2014
+ return I = "Merge nodes can only have Alias nodes as values";
2015
+ }), I && f.errors.push(new e.YAMLSemanticError(a, I));
2016
+ } else for (let T = N + 1; T < m.length; ++T) {
2017
+ let { key: I } = m[T];
2018
+ if (L === I || L && I && Object.prototype.hasOwnProperty.call(L, "value") && L.value === I.value) {
2019
+ let R = `Map keys must be unique; "${L}" is repeated`;
2020
+ f.errors.push(new e.YAMLSemanticError(a, R));
2021
+ break;
2022
+ }
2023
+ }
2024
+ }
2025
+ if (S && !f.options.mapAsMap) {
2026
+ let N = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
2027
+ f.warnings.push(new e.YAMLWarning(a, N));
2028
+ }
2029
+ return a.resolved = v, v;
2030
+ }
2031
+ var nr = ({ context: { lineStart: f, node: a, src: d }, props: m }) => {
2032
+ if (m.length === 0) return !1;
2033
+ let { start: v } = m[0];
2034
+ if (a && v > a.valueRange.start || d[v] !== e.Char.COMMENT) return !1;
2035
+ for (let S = f; S < v; ++S) if (d[S] === `
2036
+ `) return !1;
2037
+ return !0;
2038
+ };
2039
+ function rr(f, a) {
2040
+ if (!nr(f)) return;
2041
+ let d = f.getPropValue(0, e.Char.COMMENT, !0), m = !1, v = a.value.commentBefore;
2042
+ if (v && v.startsWith(d)) a.value.commentBefore = v.substr(d.length + 1), m = !0;
2043
+ else {
2044
+ let S = a.value.comment;
2045
+ !f.node && S && S.startsWith(d) && (a.value.comment = S.substr(d.length + 1), m = !0);
2046
+ }
2047
+ m && (a.comment = d);
2048
+ }
2049
+ function ir(f, a) {
2050
+ let d = [], m = [], v, S = null;
2051
+ for (let N = 0; N < a.items.length; ++N) {
2052
+ let L = a.items[N];
2053
+ switch (L.type) {
2054
+ case e.Type.BLANK_LINE:
2055
+ d.push({ afterKey: !!v, before: m.length });
2056
+ break;
2057
+ case e.Type.COMMENT:
2058
+ d.push({ afterKey: !!v, before: m.length, comment: L.comment });
2059
+ break;
2060
+ case e.Type.MAP_KEY:
2061
+ v !== void 0 && m.push(new q(v)), L.error && f.errors.push(L.error), v = Te(f, L.node), S = null;
2062
+ break;
2063
+ case e.Type.MAP_VALUE:
2064
+ {
2065
+ if (v === void 0 && (v = null), L.error && f.errors.push(L.error), !L.context.atLineStart && L.node && L.node.type === e.Type.MAP && !L.node.context.atLineStart) {
2066
+ let R = "Nested mappings are not allowed in compact mappings";
2067
+ f.errors.push(new e.YAMLSemanticError(L.node, R));
2068
+ }
2069
+ let T = L.node;
2070
+ if (!T && L.props.length > 0) {
2071
+ T = new e.PlainValue(e.Type.PLAIN, []), T.context = { parent: L, src: L.context.src };
2072
+ let R = L.range.start + 1;
2073
+ if (T.range = { start: R, end: R }, T.valueRange = { start: R, end: R }, typeof L.range.origStart == "number") {
2074
+ let F = L.range.origStart + 1;
2075
+ T.range.origStart = T.range.origEnd = F, T.valueRange.origStart = T.valueRange.origEnd = F;
2076
+ }
2077
+ }
2078
+ let I = new q(v, Te(f, T));
2079
+ rr(L, I), m.push(I), v && typeof S == "number" && L.range.start > S + 1024 && f.errors.push(G(a, v)), v = void 0, S = null;
2080
+ }
2081
+ break;
2082
+ default:
2083
+ v !== void 0 && m.push(new q(v)), v = Te(f, L), S = L.range.start, L.error && f.errors.push(L.error);
2084
+ e: for (let T = N + 1; ; ++T) {
2085
+ let I = a.items[T];
2086
+ switch (I && I.type) {
2087
+ case e.Type.BLANK_LINE:
2088
+ case e.Type.COMMENT:
2089
+ continue e;
2090
+ case e.Type.MAP_VALUE:
2091
+ break e;
2092
+ default: {
2093
+ let R = "Implicit map keys need to be followed by map values";
2094
+ f.errors.push(new e.YAMLSemanticError(L, R));
2095
+ break e;
2096
+ }
2097
+ }
2098
+ }
2099
+ if (L.valueRangeContainsNewline) {
2100
+ let T = "Implicit map keys need to be on a single line";
2101
+ f.errors.push(new e.YAMLSemanticError(L, T));
2102
+ }
2103
+ }
2104
+ }
2105
+ return v !== void 0 && m.push(new q(v)), { comments: d, items: m };
2106
+ }
2107
+ function sr(f, a) {
2108
+ let d = [], m = [], v, S = !1, N = "{";
2109
+ for (let L = 0; L < a.items.length; ++L) {
2110
+ let T = a.items[L];
2111
+ if (typeof T.char == "string") {
2112
+ let { char: I, offset: R } = T;
2113
+ if (I === "?" && v === void 0 && !S) {
2114
+ S = !0, N = ":";
2115
+ continue;
2116
+ }
2117
+ if (I === ":") {
2118
+ if (v === void 0 && (v = null), N === ":") {
2119
+ N = ",";
2120
+ continue;
2121
+ }
2122
+ } else if (S && (v === void 0 && I !== "," && (v = null), S = !1), v !== void 0 && (m.push(new q(v)), v = void 0, I === ",")) {
2123
+ N = ":";
2124
+ continue;
2125
+ }
2126
+ if (I === "}") {
2127
+ if (L === a.items.length - 1) continue;
2128
+ } else if (I === N) {
2129
+ N = ":";
2130
+ continue;
2131
+ }
2132
+ let F = `Flow map contains an unexpected ${I}`, ne = new e.YAMLSyntaxError(a, F);
2133
+ ne.offset = R, f.errors.push(ne);
2134
+ } else T.type === e.Type.BLANK_LINE ? d.push({ afterKey: !!v, before: m.length }) : T.type === e.Type.COMMENT ? (V(f.errors, T), d.push({ afterKey: !!v, before: m.length, comment: T.comment })) : v === void 0 ? (N === "," && f.errors.push(new e.YAMLSemanticError(T, "Separator , missing in flow map")), v = Te(f, T)) : (N !== "," && f.errors.push(new e.YAMLSemanticError(T, "Indicator : missing in flow map entry")), m.push(new q(v, Te(f, T))), v = void 0, S = !1);
2135
+ }
2136
+ return Y(f.errors, a), v !== void 0 && m.push(new q(v)), { comments: d, items: m };
2137
+ }
2138
+ function or(f, a) {
2139
+ if (a.type !== e.Type.SEQ && a.type !== e.Type.FLOW_SEQ) {
2140
+ let S = `A ${a.type} node cannot be resolved as a sequence`;
2141
+ return f.errors.push(new e.YAMLSyntaxError(a, S)), null;
2142
+ }
2143
+ let { comments: d, items: m } = a.type === e.Type.FLOW_SEQ ? lr(f, a) : ar(f, a), v = new j();
2144
+ if (v.items = m, me(v, d), !f.options.mapAsMap && m.some((S) => S instanceof q && S.key instanceof C)) {
2145
+ let S = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
2146
+ f.warnings.push(new e.YAMLWarning(a, S));
2147
+ }
2148
+ return a.resolved = v, v;
2149
+ }
2150
+ function ar(f, a) {
2151
+ let d = [], m = [];
2152
+ for (let v = 0; v < a.items.length; ++v) {
2153
+ let S = a.items[v];
2154
+ switch (S.type) {
2155
+ case e.Type.BLANK_LINE:
2156
+ d.push({ before: m.length });
2157
+ break;
2158
+ case e.Type.COMMENT:
2159
+ d.push({ comment: S.comment, before: m.length });
2160
+ break;
2161
+ case e.Type.SEQ_ITEM:
2162
+ if (S.error && f.errors.push(S.error), m.push(Te(f, S.node)), S.hasProps) {
2163
+ let N = "Sequence items cannot have tags or anchors before the - indicator";
2164
+ f.errors.push(new e.YAMLSemanticError(S, N));
2165
+ }
2166
+ break;
2167
+ default:
2168
+ S.error && f.errors.push(S.error), f.errors.push(new e.YAMLSyntaxError(S, `Unexpected ${S.type} node in sequence`));
2169
+ }
2170
+ }
2171
+ return { comments: d, items: m };
2172
+ }
2173
+ function lr(f, a) {
2174
+ let d = [], m = [], v = !1, S, N = null, L = "[", T = null;
2175
+ for (let I = 0; I < a.items.length; ++I) {
2176
+ let R = a.items[I];
2177
+ if (typeof R.char == "string") {
2178
+ let { char: F, offset: ne } = R;
2179
+ if (F !== ":" && (v || S !== void 0) && (v && S === void 0 && (S = L ? m.pop() : null), m.push(new q(S)), v = !1, S = void 0, N = null), F === L) L = null;
2180
+ else if (!L && F === "?") v = !0;
2181
+ else if (L !== "[" && F === ":" && S === void 0) {
2182
+ if (L === ",") {
2183
+ if (S = m.pop(), S instanceof q) {
2184
+ let Q = "Chaining flow sequence pairs is invalid", re = new e.YAMLSemanticError(a, Q);
2185
+ re.offset = ne, f.errors.push(re);
2186
+ }
2187
+ if (!v && typeof N == "number") {
2188
+ let Q = R.range ? R.range.start : R.offset;
2189
+ Q > N + 1024 && f.errors.push(G(a, S));
2190
+ let { src: re } = T.context;
2191
+ for (let J = N; J < Q; ++J) if (re[J] === `
2192
+ `) {
2193
+ let te = "Implicit keys of flow sequence pairs need to be on a single line";
2194
+ f.errors.push(new e.YAMLSemanticError(T, te));
2195
+ break;
2196
+ }
2197
+ }
2198
+ } else S = null;
2199
+ N = null, v = !1, L = null;
2200
+ } else if (L === "[" || F !== "]" || I < a.items.length - 1) {
2201
+ let Q = `Flow sequence contains an unexpected ${F}`, re = new e.YAMLSyntaxError(a, Q);
2202
+ re.offset = ne, f.errors.push(re);
2203
+ }
2204
+ } else if (R.type === e.Type.BLANK_LINE) d.push({ before: m.length });
2205
+ else if (R.type === e.Type.COMMENT) V(f.errors, R), d.push({ comment: R.comment, before: m.length });
2206
+ else {
2207
+ if (L) {
2208
+ let ne = `Expected a ${L} in flow sequence`;
2209
+ f.errors.push(new e.YAMLSemanticError(R, ne));
2210
+ }
2211
+ let F = Te(f, R);
2212
+ S === void 0 ? (m.push(F), T = R) : (m.push(new q(S, F)), S = void 0), N = R.range.start, L = ",";
2213
+ }
2214
+ }
2215
+ return Y(f.errors, a), S !== void 0 && m.push(new q(S)), { comments: d, items: m };
2216
+ }
2217
+ t.Alias = K, t.Collection = C, t.Merge = l, t.Node = g, t.Pair = q, t.Scalar = w, t.YAMLMap = le, t.YAMLSeq = j, t.addComment = c, t.binaryOptions = i, t.boolOptions = r, t.findPair = ee, t.intOptions = s, t.isEmptyPath = k, t.nullOptions = o, t.resolveMap = tr, t.resolveNode = Te, t.resolveSeq = or, t.resolveString = Ne, t.strOptions = p, t.stringifyNumber = D, t.stringifyString = $, t.toJSON = y;
2218
+ }), ln = Me((t) => {
2219
+ var e = Re(), n = ze(), c = { identify: (u) => u instanceof Uint8Array, default: !1, tag: "tag:yaml.org,2002:binary", resolve: (u, h) => {
2220
+ let E = n.resolveString(u, h);
2221
+ if (typeof Buffer == "function") return Buffer.from(E, "base64");
2222
+ if (typeof atob == "function") {
2223
+ let O = atob(E.replace(/[\n\r]/g, "")), x = new Uint8Array(O.length);
2224
+ for (let _ = 0; _ < O.length; ++_) x[_] = O.charCodeAt(_);
2225
+ return x;
2226
+ } else {
2227
+ let O = "This environment does not support reading binary tags; either Buffer or atob is required";
2228
+ return u.errors.push(new e.YAMLReferenceError(h, O)), null;
2229
+ }
2230
+ }, options: n.binaryOptions, stringify: ({ comment: u, type: h, value: E }, O, x, _) => {
2231
+ let W;
2232
+ if (typeof Buffer == "function") W = E instanceof Buffer ? E.toString("base64") : Buffer.from(E.buffer).toString("base64");
2233
+ else if (typeof btoa == "function") {
2234
+ let B = "";
2235
+ for (let U = 0; U < E.length; ++U) B += String.fromCharCode(E[U]);
2236
+ W = btoa(B);
2237
+ } else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
2238
+ if (h || (h = n.binaryOptions.defaultType), h === e.Type.QUOTE_DOUBLE) E = W;
2239
+ else {
2240
+ let { lineWidth: B } = n.binaryOptions, U = Math.ceil(W.length / B), oe = new Array(U);
2241
+ for (let he = 0, Se = 0; he < U; ++he, Se += B) oe[he] = W.substr(Se, B);
2242
+ E = oe.join(h === e.Type.BLOCK_LITERAL ? `
2243
+ ` : " ");
2244
+ }
2245
+ return n.stringifyString({ comment: u, type: h, value: E }, O, x, _);
2246
+ } };
2247
+ function g(u, h) {
2248
+ let E = n.resolveSeq(u, h);
2249
+ for (let O = 0; O < E.items.length; ++O) {
2250
+ let x = E.items[O];
2251
+ if (!(x instanceof n.Pair)) {
2252
+ if (x instanceof n.YAMLMap) {
2253
+ if (x.items.length > 1) {
2254
+ let W = "Each pair must have its own sequence indicator";
2255
+ throw new e.YAMLSemanticError(h, W);
2256
+ }
2257
+ let _ = x.items[0] || new n.Pair();
2258
+ x.commentBefore && (_.commentBefore = _.commentBefore ? `${x.commentBefore}
2259
+ ${_.commentBefore}` : x.commentBefore), x.comment && (_.comment = _.comment ? `${x.comment}
2260
+ ${_.comment}` : x.comment), x = _;
2261
+ }
2262
+ E.items[O] = x instanceof n.Pair ? x : new n.Pair(x);
2263
+ }
2264
+ }
2265
+ return E;
2266
+ }
2267
+ function y(u, h, E) {
2268
+ let O = new n.YAMLSeq(u);
2269
+ O.tag = "tag:yaml.org,2002:pairs";
2270
+ for (let x of h) {
2271
+ let _, W;
2272
+ if (Array.isArray(x)) if (x.length === 2) _ = x[0], W = x[1];
2273
+ else throw new TypeError(`Expected [key, value] tuple: ${x}`);
2274
+ else if (x && x instanceof Object) {
2275
+ let U = Object.keys(x);
2276
+ if (U.length === 1) _ = U[0], W = x[_];
2277
+ else throw new TypeError(`Expected { key: value } tuple: ${x}`);
2278
+ } else _ = x;
2279
+ let B = u.createPair(_, W, E);
2280
+ O.items.push(B);
2281
+ }
2282
+ return O;
2283
+ }
2284
+ var w = { default: !1, tag: "tag:yaml.org,2002:pairs", resolve: g, createNode: y }, A = class un extends n.YAMLSeq {
2285
+ constructor() {
2286
+ super(), e._defineProperty(this, "add", n.YAMLMap.prototype.add.bind(this)), e._defineProperty(this, "delete", n.YAMLMap.prototype.delete.bind(this)), e._defineProperty(this, "get", n.YAMLMap.prototype.get.bind(this)), e._defineProperty(this, "has", n.YAMLMap.prototype.has.bind(this)), e._defineProperty(this, "set", n.YAMLMap.prototype.set.bind(this)), this.tag = un.tag;
2287
+ }
2288
+ toJSON(h, E) {
2289
+ let O = /* @__PURE__ */ new Map();
2290
+ E && E.onCreate && E.onCreate(O);
2291
+ for (let x of this.items) {
2292
+ let _, W;
2293
+ if (x instanceof n.Pair ? (_ = n.toJSON(x.key, "", E), W = n.toJSON(x.value, _, E)) : _ = n.toJSON(x, "", E), O.has(_)) throw new Error("Ordered maps must not include duplicate keys");
2294
+ O.set(_, W);
2295
+ }
2296
+ return O;
2297
+ }
2298
+ };
2299
+ e._defineProperty(A, "tag", "tag:yaml.org,2002:omap");
2300
+ function k(u, h) {
2301
+ let E = g(u, h), O = [];
2302
+ for (let { key: x } of E.items) if (x instanceof n.Scalar) if (O.includes(x.value)) {
2303
+ let _ = "Ordered maps must not include duplicate keys";
2304
+ throw new e.YAMLSemanticError(h, _);
2305
+ } else O.push(x.value);
2306
+ return Object.assign(new A(), E);
2307
+ }
2308
+ function C(u, h, E) {
2309
+ let O = y(u, h, E), x = new A();
2310
+ return x.items = O.items, x;
2311
+ }
2312
+ var P = { identify: (u) => u instanceof Map, nodeClass: A, default: !1, tag: "tag:yaml.org,2002:omap", resolve: k, createNode: C }, j = class cn extends n.YAMLMap {
2313
+ constructor() {
2314
+ super(), this.tag = cn.tag;
2315
+ }
2316
+ add(h) {
2317
+ let E = h instanceof n.Pair ? h : new n.Pair(h);
2318
+ n.findPair(this.items, E.key) || this.items.push(E);
2319
+ }
2320
+ get(h, E) {
2321
+ let O = n.findPair(this.items, h);
2322
+ return !E && O instanceof n.Pair ? O.key instanceof n.Scalar ? O.key.value : O.key : O;
2323
+ }
2324
+ set(h, E) {
2325
+ if (typeof E != "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof E}`);
2326
+ let O = n.findPair(this.items, h);
2327
+ O && !E ? this.items.splice(this.items.indexOf(O), 1) : !O && E && this.items.push(new n.Pair(h));
2328
+ }
2329
+ toJSON(h, E) {
2330
+ return super.toJSON(h, E, Set);
2331
+ }
2332
+ toString(h, E, O) {
2333
+ if (!h) return JSON.stringify(this);
2334
+ if (this.hasAllNullValues()) return super.toString(h, E, O);
2335
+ throw new Error("Set items must all have null values");
2336
+ }
2337
+ };
2338
+ e._defineProperty(j, "tag", "tag:yaml.org,2002:set");
2339
+ function ie(u, h) {
2340
+ let E = n.resolveMap(u, h);
2341
+ if (!E.hasAllNullValues()) throw new e.YAMLSemanticError(h, "Set items must all have null values");
2342
+ return Object.assign(new j(), E);
2343
+ }
2344
+ function q(u, h, E) {
2345
+ let O = new j();
2346
+ for (let x of h) O.items.push(u.createPair(x, null, E));
2347
+ return O;
2348
+ }
2349
+ var z = { identify: (u) => u instanceof Set, nodeClass: j, default: !1, tag: "tag:yaml.org,2002:set", resolve: ie, createNode: q }, K = (u, h) => {
2350
+ let E = h.split(":").reduce((O, x) => O * 60 + Number(x), 0);
2351
+ return u === "-" ? -E : E;
2352
+ }, ee = ({ value: u }) => {
2353
+ if (isNaN(u) || !isFinite(u)) return n.stringifyNumber(u);
2354
+ let h = "";
2355
+ u < 0 && (h = "-", u = Math.abs(u));
2356
+ let E = [u % 60];
2357
+ return u < 60 ? E.unshift(0) : (u = Math.round((u - E[0]) / 60), E.unshift(u % 60), u >= 60 && (u = Math.round((u - E[0]) / 60), E.unshift(u))), h + E.map((O) => O < 10 ? "0" + String(O) : String(O)).join(":").replace(/000000\d*$/, "");
2358
+ }, le = { identify: (u) => typeof u == "number", default: !0, tag: "tag:yaml.org,2002:int", format: "TIME", test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, resolve: (u, h, E) => K(h, E.replace(/_/g, "")), stringify: ee }, M = { identify: (u) => typeof u == "number", default: !0, tag: "tag:yaml.org,2002:float", format: "TIME", test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, resolve: (u, h, E) => K(h, E.replace(/_/g, "")), stringify: ee }, l = { identify: (u) => u instanceof Date, default: !0, tag: "tag:yaml.org,2002:timestamp", test: RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"), resolve: (u, h, E, O, x, _, W, B, U) => {
2359
+ B && (B = (B + "00").substr(1, 3));
2360
+ let oe = Date.UTC(h, E - 1, O, x || 0, _ || 0, W || 0, B || 0);
2361
+ if (U && U !== "Z") {
2362
+ let he = K(U[0], U.slice(1));
2363
+ Math.abs(he) < 30 && (he *= 60), oe -= 6e4 * he;
2364
+ }
2365
+ return new Date(oe);
2366
+ }, stringify: ({ value: u }) => u.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") };
2367
+ function i(u) {
2368
+ let h = {};
2369
+ return u ? typeof YAML_SILENCE_DEPRECATION_WARNINGS < "u" ? !YAML_SILENCE_DEPRECATION_WARNINGS : !h.YAML_SILENCE_DEPRECATION_WARNINGS : typeof YAML_SILENCE_WARNINGS < "u" ? !YAML_SILENCE_WARNINGS : !h.YAML_SILENCE_WARNINGS;
2370
+ }
2371
+ function r(u, h) {
2372
+ i(!1) && console.warn(h ? `${h}: ${u}` : u);
2373
+ }
2374
+ function s(u) {
2375
+ if (i(!0)) {
2376
+ let h = u.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/");
2377
+ r(`The endpoint 'yaml/${h}' will be removed in a future release.`, "DeprecationWarning");
2378
+ }
2379
+ }
2380
+ var o = {};
2381
+ function p(u, h) {
2382
+ if (!o[u] && i(!0)) {
2383
+ o[u] = !0;
2384
+ let E = `The option '${u}' will be removed in a future release`;
2385
+ E += h ? `, use '${h}' instead.` : ".", r(E, "DeprecationWarning");
2386
+ }
2387
+ }
2388
+ t.binary = c, t.floatTime = M, t.intTime = le, t.omap = P, t.pairs = w, t.set = z, t.timestamp = l, t.warn = r, t.warnFileDeprecation = s, t.warnOptionDeprecation = p;
2389
+ }), fn = Me((t) => {
2390
+ var e = Re(), n = ze(), c = ln();
2391
+ function g(b, $, D) {
2392
+ let Y = new n.YAMLMap(b);
2393
+ if ($ instanceof Map) for (let [V, G] of $) Y.items.push(b.createPair(V, G, D));
2394
+ else if ($ && typeof $ == "object") for (let V of Object.keys($)) Y.items.push(b.createPair(V, $[V], D));
2395
+ return typeof b.sortMapEntries == "function" && Y.items.sort(b.sortMapEntries), Y;
2396
+ }
2397
+ var y = { createNode: g, default: !0, nodeClass: n.YAMLMap, tag: "tag:yaml.org,2002:map", resolve: n.resolveMap };
2398
+ function w(b, $, D) {
2399
+ let Y = new n.YAMLSeq(b);
2400
+ if ($ && $[Symbol.iterator]) for (let V of $) {
2401
+ let G = b.createNode(V, D.wrapScalars, null, D);
2402
+ Y.items.push(G);
2403
+ }
2404
+ return Y;
2405
+ }
2406
+ var A = { createNode: w, default: !0, nodeClass: n.YAMLSeq, tag: "tag:yaml.org,2002:seq", resolve: n.resolveSeq }, k = { identify: (b) => typeof b == "string", default: !0, tag: "tag:yaml.org,2002:str", resolve: n.resolveString, stringify(b, $, D, Y) {
2407
+ return $ = Object.assign({ actualString: !0 }, $), n.stringifyString(b, $, D, Y);
2408
+ }, options: n.strOptions }, C = [y, A, k], P = (b) => typeof b == "bigint" || Number.isInteger(b), j = (b, $, D) => n.intOptions.asBigInt ? BigInt(b) : parseInt($, D);
2409
+ function ie(b, $, D) {
2410
+ let { value: Y } = b;
2411
+ return P(Y) && Y >= 0 ? D + Y.toString($) : n.stringifyNumber(b);
2412
+ }
2413
+ var q = { identify: (b) => b == null, createNode: (b, $, D) => D.wrapScalars ? new n.Scalar(null) : null, default: !0, tag: "tag:yaml.org,2002:null", test: /^(?:~|[Nn]ull|NULL)?$/, resolve: () => null, options: n.nullOptions, stringify: () => n.nullOptions.nullStr }, z = { identify: (b) => typeof b == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, resolve: (b) => b[0] === "t" || b[0] === "T", options: n.boolOptions, stringify: ({ value: b }) => b ? n.boolOptions.trueStr : n.boolOptions.falseStr }, K = { identify: (b) => P(b) && b >= 0, default: !0, tag: "tag:yaml.org,2002:int", format: "OCT", test: /^0o([0-7]+)$/, resolve: (b, $) => j(b, $, 8), options: n.intOptions, stringify: (b) => ie(b, 8, "0o") }, ee = { identify: P, default: !0, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9]+$/, resolve: (b) => j(b, b, 10), options: n.intOptions, stringify: n.stringifyNumber }, le = { identify: (b) => P(b) && b >= 0, default: !0, tag: "tag:yaml.org,2002:int", format: "HEX", test: /^0x([0-9a-fA-F]+)$/, resolve: (b, $) => j(b, $, 16), options: n.intOptions, stringify: (b) => ie(b, 16, "0x") }, M = { identify: (b) => typeof b == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.inf|(\.nan))$/i, resolve: (b, $) => $ ? NaN : b[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: n.stringifyNumber }, l = { identify: (b) => typeof b == "number", default: !0, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, resolve: (b) => parseFloat(b), stringify: ({ value: b }) => Number(b).toExponential() }, i = { identify: (b) => typeof b == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, resolve(b, $, D) {
2414
+ let Y = $ || D, V = new n.Scalar(parseFloat(b));
2415
+ return Y && Y[Y.length - 1] === "0" && (V.minFractionDigits = Y.length), V;
2416
+ }, stringify: n.stringifyNumber }, r = C.concat([q, z, K, ee, le, M, l, i]), s = (b) => typeof b == "bigint" || Number.isInteger(b), o = ({ value: b }) => JSON.stringify(b), p = [y, A, { identify: (b) => typeof b == "string", default: !0, tag: "tag:yaml.org,2002:str", resolve: n.resolveString, stringify: o }, { identify: (b) => b == null, createNode: (b, $, D) => D.wrapScalars ? new n.Scalar(null) : null, default: !0, tag: "tag:yaml.org,2002:null", test: /^null$/, resolve: () => null, stringify: o }, { identify: (b) => typeof b == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^true|false$/, resolve: (b) => b === "true", stringify: o }, { identify: s, default: !0, tag: "tag:yaml.org,2002:int", test: /^-?(?:0|[1-9][0-9]*)$/, resolve: (b) => n.intOptions.asBigInt ? BigInt(b) : parseInt(b, 10), stringify: ({ value: b }) => s(b) ? b.toString() : JSON.stringify(b) }, { identify: (b) => typeof b == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, resolve: (b) => parseFloat(b), stringify: o }];
2417
+ p.scalarFallback = (b) => {
2418
+ throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(b)}`);
2419
+ };
2420
+ var u = ({ value: b }) => b ? n.boolOptions.trueStr : n.boolOptions.falseStr, h = (b) => typeof b == "bigint" || Number.isInteger(b);
2421
+ function E(b, $, D) {
2422
+ let Y = $.replace(/_/g, "");
2423
+ if (n.intOptions.asBigInt) {
2424
+ switch (D) {
2425
+ case 2:
2426
+ Y = `0b${Y}`;
2427
+ break;
2428
+ case 8:
2429
+ Y = `0o${Y}`;
2430
+ break;
2431
+ case 16:
2432
+ Y = `0x${Y}`;
2433
+ break;
2434
+ }
2435
+ let G = BigInt(Y);
2436
+ return b === "-" ? BigInt(-1) * G : G;
2437
+ }
2438
+ let V = parseInt(Y, D);
2439
+ return b === "-" ? -1 * V : V;
2440
+ }
2441
+ function O(b, $, D) {
2442
+ let { value: Y } = b;
2443
+ if (h(Y)) {
2444
+ let V = Y.toString($);
2445
+ return Y < 0 ? "-" + D + V.substr(1) : D + V;
2446
+ }
2447
+ return n.stringifyNumber(b);
2448
+ }
2449
+ var x = C.concat([{ identify: (b) => b == null, createNode: (b, $, D) => D.wrapScalars ? new n.Scalar(null) : null, default: !0, tag: "tag:yaml.org,2002:null", test: /^(?:~|[Nn]ull|NULL)?$/, resolve: () => null, options: n.nullOptions, stringify: () => n.nullOptions.nullStr }, { identify: (b) => typeof b == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, resolve: () => !0, options: n.boolOptions, stringify: u }, { identify: (b) => typeof b == "boolean", default: !0, tag: "tag:yaml.org,2002:bool", test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, resolve: () => !1, options: n.boolOptions, stringify: u }, { identify: h, default: !0, tag: "tag:yaml.org,2002:int", format: "BIN", test: /^([-+]?)0b([0-1_]+)$/, resolve: (b, $, D) => E($, D, 2), stringify: (b) => O(b, 2, "0b") }, { identify: h, default: !0, tag: "tag:yaml.org,2002:int", format: "OCT", test: /^([-+]?)0([0-7_]+)$/, resolve: (b, $, D) => E($, D, 8), stringify: (b) => O(b, 8, "0") }, { identify: h, default: !0, tag: "tag:yaml.org,2002:int", test: /^([-+]?)([0-9][0-9_]*)$/, resolve: (b, $, D) => E($, D, 10), stringify: n.stringifyNumber }, { identify: h, default: !0, tag: "tag:yaml.org,2002:int", format: "HEX", test: /^([-+]?)0x([0-9a-fA-F_]+)$/, resolve: (b, $, D) => E($, D, 16), stringify: (b) => O(b, 16, "0x") }, { identify: (b) => typeof b == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.inf|(\.nan))$/i, resolve: (b, $) => $ ? NaN : b[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: n.stringifyNumber }, { identify: (b) => typeof b == "number", default: !0, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, resolve: (b) => parseFloat(b.replace(/_/g, "")), stringify: ({ value: b }) => Number(b).toExponential() }, { identify: (b) => typeof b == "number", default: !0, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, resolve(b, $) {
2450
+ let D = new n.Scalar(parseFloat(b.replace(/_/g, "")));
2451
+ if ($) {
2452
+ let Y = $.replace(/_/g, "");
2453
+ Y[Y.length - 1] === "0" && (D.minFractionDigits = Y.length);
2454
+ }
2455
+ return D;
2456
+ }, stringify: n.stringifyNumber }], c.binary, c.omap, c.pairs, c.set, c.intTime, c.floatTime, c.timestamp), _ = { core: r, failsafe: C, json: p, yaml11: x }, W = { binary: c.binary, bool: z, float: i, floatExp: l, floatNaN: M, floatTime: c.floatTime, int: ee, intHex: le, intOct: K, intTime: c.intTime, map: y, null: q, omap: c.omap, pairs: c.pairs, seq: A, set: c.set, timestamp: c.timestamp };
2457
+ function B(b, $, D) {
2458
+ if ($) {
2459
+ let Y = D.filter((G) => G.tag === $), V = Y.find((G) => !G.format) || Y[0];
2460
+ if (!V) throw new Error(`Tag ${$} not found`);
2461
+ return V;
2462
+ }
2463
+ return D.find((Y) => (Y.identify && Y.identify(b) || Y.class && b instanceof Y.class) && !Y.format);
2464
+ }
2465
+ function U(b, $, D) {
2466
+ if (b instanceof n.Node) return b;
2467
+ let { defaultPrefix: Y, onTagObj: V, prevObjects: G, schema: me, wrapScalars: Ne } = D;
2468
+ $ && $.startsWith("!!") && ($ = Y + $.slice(2));
2469
+ let Le = B(b, $, me.tags);
2470
+ if (!Le) {
2471
+ if (typeof b.toJSON == "function" && (b = b.toJSON()), !b || typeof b != "object") return Ne ? new n.Scalar(b) : b;
2472
+ Le = b instanceof Map ? y : b[Symbol.iterator] ? A : y;
2473
+ }
2474
+ V && (V(Le), delete D.onTagObj);
2475
+ let be = { value: void 0, node: void 0 };
2476
+ if (b && typeof b == "object" && G) {
2477
+ let Ke = G.get(b);
2478
+ if (Ke) {
2479
+ let et = new n.Alias(Ke);
2480
+ return D.aliasNodes.push(et), et;
2481
+ }
2482
+ be.value = b, G.set(b, be);
2483
+ }
2484
+ return be.node = Le.createNode ? Le.createNode(D.schema, b, D) : Ne ? new n.Scalar(b) : b, $ && be.node instanceof n.Node && (be.node.tag = $), be.node;
2485
+ }
2486
+ function oe(b, $, D, Y) {
2487
+ let V = b[Y.replace(/\W/g, "")];
2488
+ if (!V) {
2489
+ let G = Object.keys(b).map((me) => JSON.stringify(me)).join(", ");
2490
+ throw new Error(`Unknown schema "${Y}"; use one of ${G}`);
2491
+ }
2492
+ if (Array.isArray(D)) for (let G of D) V = V.concat(G);
2493
+ else typeof D == "function" && (V = D(V.slice()));
2494
+ for (let G = 0; G < V.length; ++G) {
2495
+ let me = V[G];
2496
+ if (typeof me == "string") {
2497
+ let Ne = $[me];
2498
+ if (!Ne) {
2499
+ let Le = Object.keys($).map((be) => JSON.stringify(be)).join(", ");
2500
+ throw new Error(`Unknown custom tag "${me}"; use one of ${Le}`);
2501
+ }
2502
+ V[G] = Ne;
2503
+ }
2504
+ }
2505
+ return V;
2506
+ }
2507
+ var he = (b, $) => b.key < $.key ? -1 : b.key > $.key ? 1 : 0, Se = class pn {
2508
+ constructor({ customTags: $, merge: D, schema: Y, sortMapEntries: V, tags: G }) {
2509
+ this.merge = !!D, this.name = Y, this.sortMapEntries = V === !0 ? he : V || null, !$ && G && c.warnOptionDeprecation("tags", "customTags"), this.tags = oe(_, W, $ || G, Y);
2510
+ }
2511
+ createNode($, D, Y, V) {
2512
+ let G = { defaultPrefix: pn.defaultPrefix, schema: this, wrapScalars: D }, me = V ? Object.assign(V, G) : G;
2513
+ return U($, Y, me);
2514
+ }
2515
+ createPair($, D, Y) {
2516
+ Y || (Y = { wrapScalars: !0 });
2517
+ let V = this.createNode($, Y.wrapScalars, null, Y), G = this.createNode(D, Y.wrapScalars, null, Y);
2518
+ return new n.Pair(V, G);
2519
+ }
2520
+ };
2521
+ e._defineProperty(Se, "defaultPrefix", e.defaultTagPrefix), e._defineProperty(Se, "defaultTags", e.defaultTags), t.Schema = Se;
2522
+ }), Er = Me((t) => {
2523
+ var e = Re(), n = ze(), c = fn(), g = { anchorPrefix: "a", customTags: null, indent: 2, indentSeq: !0, keepCstNodes: !1, keepNodeTypes: !0, keepBlobsInJSON: !0, mapAsMap: !1, maxAliasCount: 100, prettyErrors: !1, simpleKeys: !1, version: "1.2" }, y = { get binary() {
2524
+ return n.binaryOptions;
2525
+ }, set binary(i) {
2526
+ Object.assign(n.binaryOptions, i);
2527
+ }, get bool() {
2528
+ return n.boolOptions;
2529
+ }, set bool(i) {
2530
+ Object.assign(n.boolOptions, i);
2531
+ }, get int() {
2532
+ return n.intOptions;
2533
+ }, set int(i) {
2534
+ Object.assign(n.intOptions, i);
2535
+ }, get null() {
2536
+ return n.nullOptions;
2537
+ }, set null(i) {
2538
+ Object.assign(n.nullOptions, i);
2539
+ }, get str() {
2540
+ return n.strOptions;
2541
+ }, set str(i) {
2542
+ Object.assign(n.strOptions, i);
2543
+ } }, w = { "1.0": { schema: "yaml-1.1", merge: !0, tagPrefixes: [{ handle: "!", prefix: e.defaultTagPrefix }, { handle: "!!", prefix: "tag:private.yaml.org,2002:" }] }, 1.1: { schema: "yaml-1.1", merge: !0, tagPrefixes: [{ handle: "!", prefix: "!" }, { handle: "!!", prefix: e.defaultTagPrefix }] }, 1.2: { schema: "core", merge: !1, tagPrefixes: [{ handle: "!", prefix: "!" }, { handle: "!!", prefix: e.defaultTagPrefix }] } };
2544
+ function A(i, r) {
2545
+ if ((i.version || i.options.version) === "1.0") {
2546
+ let p = r.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);
2547
+ if (p) return "!" + p[1];
2548
+ let u = r.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);
2549
+ return u ? `!${u[1]}/${u[2]}` : `!${r.replace(/^tag:/, "")}`;
2550
+ }
2551
+ let s = i.tagPrefixes.find((p) => r.indexOf(p.prefix) === 0);
2552
+ if (!s) {
2553
+ let p = i.getDefaults().tagPrefixes;
2554
+ s = p && p.find((u) => r.indexOf(u.prefix) === 0);
2555
+ }
2556
+ if (!s) return r[0] === "!" ? r : `!<${r}>`;
2557
+ let o = r.substr(s.prefix.length).replace(/[!,[\]{}]/g, (p) => ({ "!": "%21", ",": "%2C", "[": "%5B", "]": "%5D", "{": "%7B", "}": "%7D" })[p]);
2558
+ return s.handle + o;
2559
+ }
2560
+ function k(i, r) {
2561
+ if (r instanceof n.Alias) return n.Alias;
2562
+ if (r.tag) {
2563
+ let p = i.filter((u) => u.tag === r.tag);
2564
+ if (p.length > 0) return p.find((u) => u.format === r.format) || p[0];
2565
+ }
2566
+ let s, o;
2567
+ if (r instanceof n.Scalar) {
2568
+ o = r.value;
2569
+ let p = i.filter((u) => u.identify && u.identify(o) || u.class && o instanceof u.class);
2570
+ s = p.find((u) => u.format === r.format) || p.find((u) => !u.format);
2571
+ } else o = r, s = i.find((p) => p.nodeClass && o instanceof p.nodeClass);
2572
+ if (!s) {
2573
+ let p = o && o.constructor ? o.constructor.name : typeof o;
2574
+ throw new Error(`Tag not resolved for ${p} value`);
2575
+ }
2576
+ return s;
2577
+ }
2578
+ function C(i, r, { anchors: s, doc: o }) {
2579
+ let p = [], u = o.anchors.getName(i);
2580
+ return u && (s[u] = i, p.push(`&${u}`)), i.tag ? p.push(A(o, i.tag)) : r.default || p.push(A(o, r.tag)), p.join(" ");
2581
+ }
2582
+ function P(i, r, s, o) {
2583
+ let { anchors: p, schema: u } = r.doc, h;
2584
+ if (!(i instanceof n.Node)) {
2585
+ let x = { aliasNodes: [], onTagObj: (_) => h = _, prevObjects: /* @__PURE__ */ new Map() };
2586
+ i = u.createNode(i, !0, null, x);
2587
+ for (let _ of x.aliasNodes) {
2588
+ _.source = _.source.node;
2589
+ let W = p.getName(_.source);
2590
+ W || (W = p.newName(), p.map[W] = _.source);
2591
+ }
2592
+ }
2593
+ if (i instanceof n.Pair) return i.toString(r, s, o);
2594
+ h || (h = k(u.tags, i));
2595
+ let E = C(i, h, r);
2596
+ E.length > 0 && (r.indentAtStart = (r.indentAtStart || 0) + E.length + 1);
2597
+ let O = typeof h.stringify == "function" ? h.stringify(i, r, s, o) : i instanceof n.Scalar ? n.stringifyString(i, r, s, o) : i.toString(r, s, o);
2598
+ return E ? i instanceof n.Scalar || O[0] === "{" || O[0] === "[" ? `${E} ${O}` : `${E}
2599
+ ${r.indent}${O}` : O;
2600
+ }
2601
+ var j = class dn {
2602
+ static validAnchorNode(r) {
2603
+ return r instanceof n.Scalar || r instanceof n.YAMLSeq || r instanceof n.YAMLMap;
2604
+ }
2605
+ constructor(r) {
2606
+ e._defineProperty(this, "map", /* @__PURE__ */ Object.create(null)), this.prefix = r;
2607
+ }
2608
+ createAlias(r, s) {
2609
+ return this.setAnchor(r, s), new n.Alias(r);
2610
+ }
2611
+ createMergePair(...r) {
2612
+ let s = new n.Merge();
2613
+ return s.value.items = r.map((o) => {
2614
+ if (o instanceof n.Alias) {
2615
+ if (o.source instanceof n.YAMLMap) return o;
2616
+ } else if (o instanceof n.YAMLMap) return this.createAlias(o);
2617
+ throw new Error("Merge sources must be Map nodes or their Aliases");
2618
+ }), s;
2619
+ }
2620
+ getName(r) {
2621
+ let { map: s } = this;
2622
+ return Object.keys(s).find((o) => s[o] === r);
2623
+ }
2624
+ getNames() {
2625
+ return Object.keys(this.map);
2626
+ }
2627
+ getNode(r) {
2628
+ return this.map[r];
2629
+ }
2630
+ newName(r) {
2631
+ r || (r = this.prefix);
2632
+ let s = Object.keys(this.map);
2633
+ for (let o = 1; ; ++o) {
2634
+ let p = `${r}${o}`;
2635
+ if (!s.includes(p)) return p;
2636
+ }
2637
+ }
2638
+ resolveNodes() {
2639
+ let { map: r, _cstAliases: s } = this;
2640
+ Object.keys(r).forEach((o) => {
2641
+ r[o] = r[o].resolved;
2642
+ }), s.forEach((o) => {
2643
+ o.source = o.source.resolved;
2644
+ }), delete this._cstAliases;
2645
+ }
2646
+ setAnchor(r, s) {
2647
+ if (r != null && !dn.validAnchorNode(r)) throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");
2648
+ if (s && /[\x00-\x19\s,[\]{}]/.test(s)) throw new Error("Anchor names must not contain whitespace or control characters");
2649
+ let { map: o } = this, p = r && Object.keys(o).find((u) => o[u] === r);
2650
+ if (p) if (s) p !== s && (delete o[p], o[s] = r);
2651
+ else return p;
2652
+ else {
2653
+ if (!s) {
2654
+ if (!r) return null;
2655
+ s = this.newName();
2656
+ }
2657
+ o[s] = r;
2658
+ }
2659
+ return s;
2660
+ }
2661
+ }, ie = (i, r) => {
2662
+ if (i && typeof i == "object") {
2663
+ let { tag: s } = i;
2664
+ i instanceof n.Collection ? (s && (r[s] = !0), i.items.forEach((o) => ie(o, r))) : i instanceof n.Pair ? (ie(i.key, r), ie(i.value, r)) : i instanceof n.Scalar && s && (r[s] = !0);
2665
+ }
2666
+ return r;
2667
+ }, q = (i) => Object.keys(ie(i, {}));
2668
+ function z(i, r) {
2669
+ let s = { before: [], after: [] }, o, p = !1;
2670
+ for (let u of r) if (u.valueRange) {
2671
+ if (o !== void 0) {
2672
+ let E = "Document contains trailing content not separated by a ... or --- line";
2673
+ i.errors.push(new e.YAMLSyntaxError(u, E));
2674
+ break;
2675
+ }
2676
+ let h = n.resolveNode(i, u);
2677
+ p && (h.spaceBefore = !0, p = !1), o = h;
2678
+ } else u.comment !== null ? (o === void 0 ? s.before : s.after).push(u.comment) : u.type === e.Type.BLANK_LINE && (p = !0, o === void 0 && s.before.length > 0 && !i.commentBefore && (i.commentBefore = s.before.join(`
2679
+ `), s.before = []));
2680
+ if (i.contents = o || null, !o) i.comment = s.before.concat(s.after).join(`
2681
+ `) || null;
2682
+ else {
2683
+ let u = s.before.join(`
2684
+ `);
2685
+ if (u) {
2686
+ let h = o instanceof n.Collection && o.items[0] ? o.items[0] : o;
2687
+ h.commentBefore = h.commentBefore ? `${u}
2688
+ ${h.commentBefore}` : u;
2689
+ }
2690
+ i.comment = s.after.join(`
2691
+ `) || null;
2692
+ }
2693
+ }
2694
+ function K({ tagPrefixes: i }, r) {
2695
+ let [s, o] = r.parameters;
2696
+ if (!s || !o) {
2697
+ let p = "Insufficient parameters given for %TAG directive";
2698
+ throw new e.YAMLSemanticError(r, p);
2699
+ }
2700
+ if (i.some((p) => p.handle === s)) {
2701
+ let p = "The %TAG directive must only be given at most once per handle in the same document.";
2702
+ throw new e.YAMLSemanticError(r, p);
2703
+ }
2704
+ return { handle: s, prefix: o };
2705
+ }
2706
+ function ee(i, r) {
2707
+ let [s] = r.parameters;
2708
+ if (r.name === "YAML:1.0" && (s = "1.0"), !s) {
2709
+ let o = "Insufficient parameters given for %YAML directive";
2710
+ throw new e.YAMLSemanticError(r, o);
2711
+ }
2712
+ if (!w[s]) {
2713
+ let o = `Document will be parsed as YAML ${i.version || i.options.version} rather than YAML ${s}`;
2714
+ i.warnings.push(new e.YAMLWarning(r, o));
2715
+ }
2716
+ return s;
2717
+ }
2718
+ function le(i, r, s) {
2719
+ let o = [], p = !1;
2720
+ for (let u of r) {
2721
+ let { comment: h, name: E } = u;
2722
+ switch (E) {
2723
+ case "TAG":
2724
+ try {
2725
+ i.tagPrefixes.push(K(i, u));
2726
+ } catch (O) {
2727
+ i.errors.push(O);
2728
+ }
2729
+ p = !0;
2730
+ break;
2731
+ case "YAML":
2732
+ case "YAML:1.0":
2733
+ if (i.version) {
2734
+ let O = "The %YAML directive must only be given at most once per document.";
2735
+ i.errors.push(new e.YAMLSemanticError(u, O));
2736
+ }
2737
+ try {
2738
+ i.version = ee(i, u);
2739
+ } catch (O) {
2740
+ i.errors.push(O);
2741
+ }
2742
+ p = !0;
2743
+ break;
2744
+ default:
2745
+ if (E) {
2746
+ let O = `YAML only supports %TAG and %YAML directives, and not %${E}`;
2747
+ i.warnings.push(new e.YAMLWarning(u, O));
2748
+ }
2749
+ }
2750
+ h && o.push(h);
2751
+ }
2752
+ if (s && !p && (i.version || s.version || i.options.version) === "1.1") {
2753
+ let u = ({ handle: h, prefix: E }) => ({ handle: h, prefix: E });
2754
+ i.tagPrefixes = s.tagPrefixes.map(u), i.version = s.version;
2755
+ }
2756
+ i.commentBefore = o.join(`
2757
+ `) || null;
2758
+ }
2759
+ function M(i) {
2760
+ if (i instanceof n.Collection) return !0;
2761
+ throw new Error("Expected a YAML collection as document contents");
2762
+ }
2763
+ var l = class St {
2764
+ constructor(r) {
2765
+ this.anchors = new j(r.anchorPrefix), this.commentBefore = null, this.comment = null, this.contents = null, this.directivesEndMarker = null, this.errors = [], this.options = r, this.schema = null, this.tagPrefixes = [], this.version = null, this.warnings = [];
2766
+ }
2767
+ add(r) {
2768
+ return M(this.contents), this.contents.add(r);
2769
+ }
2770
+ addIn(r, s) {
2771
+ M(this.contents), this.contents.addIn(r, s);
2772
+ }
2773
+ delete(r) {
2774
+ return M(this.contents), this.contents.delete(r);
2775
+ }
2776
+ deleteIn(r) {
2777
+ return n.isEmptyPath(r) ? this.contents == null ? !1 : (this.contents = null, !0) : (M(this.contents), this.contents.deleteIn(r));
2778
+ }
2779
+ getDefaults() {
2780
+ return St.defaults[this.version] || St.defaults[this.options.version] || {};
2781
+ }
2782
+ get(r, s) {
2783
+ return this.contents instanceof n.Collection ? this.contents.get(r, s) : void 0;
2784
+ }
2785
+ getIn(r, s) {
2786
+ return n.isEmptyPath(r) ? !s && this.contents instanceof n.Scalar ? this.contents.value : this.contents : this.contents instanceof n.Collection ? this.contents.getIn(r, s) : void 0;
2787
+ }
2788
+ has(r) {
2789
+ return this.contents instanceof n.Collection ? this.contents.has(r) : !1;
2790
+ }
2791
+ hasIn(r) {
2792
+ return n.isEmptyPath(r) ? this.contents !== void 0 : this.contents instanceof n.Collection ? this.contents.hasIn(r) : !1;
2793
+ }
2794
+ set(r, s) {
2795
+ M(this.contents), this.contents.set(r, s);
2796
+ }
2797
+ setIn(r, s) {
2798
+ n.isEmptyPath(r) ? this.contents = s : (M(this.contents), this.contents.setIn(r, s));
2799
+ }
2800
+ setSchema(r, s) {
2801
+ if (!r && !s && this.schema) return;
2802
+ typeof r == "number" && (r = r.toFixed(1)), r === "1.0" || r === "1.1" || r === "1.2" ? (this.version ? this.version = r : this.options.version = r, delete this.options.schema) : r && typeof r == "string" && (this.options.schema = r), Array.isArray(s) && (this.options.customTags = s);
2803
+ let o = Object.assign({}, this.getDefaults(), this.options);
2804
+ this.schema = new c.Schema(o);
2805
+ }
2806
+ parse(r, s) {
2807
+ this.options.keepCstNodes && (this.cstNode = r), this.options.keepNodeTypes && (this.type = "DOCUMENT");
2808
+ let { directives: o = [], contents: p = [], directivesEndMarker: u, error: h, valueRange: E } = r;
2809
+ if (h && (h.source || (h.source = this), this.errors.push(h)), le(this, o, s), u && (this.directivesEndMarker = !0), this.range = E ? [E.start, E.end] : null, this.setSchema(), this.anchors._cstAliases = [], z(this, p), this.anchors.resolveNodes(), this.options.prettyErrors) {
2810
+ for (let O of this.errors) O instanceof e.YAMLError && O.makePretty();
2811
+ for (let O of this.warnings) O instanceof e.YAMLError && O.makePretty();
2812
+ }
2813
+ return this;
2814
+ }
2815
+ listNonDefaultTags() {
2816
+ return q(this.contents).filter((r) => r.indexOf(c.Schema.defaultPrefix) !== 0);
2817
+ }
2818
+ setTagPrefix(r, s) {
2819
+ if (r[0] !== "!" || r[r.length - 1] !== "!") throw new Error("Handle must start and end with !");
2820
+ if (s) {
2821
+ let o = this.tagPrefixes.find((p) => p.handle === r);
2822
+ o ? o.prefix = s : this.tagPrefixes.push({ handle: r, prefix: s });
2823
+ } else this.tagPrefixes = this.tagPrefixes.filter((o) => o.handle !== r);
2824
+ }
2825
+ toJSON(r, s) {
2826
+ let { keepBlobsInJSON: o, mapAsMap: p, maxAliasCount: u } = this.options, h = o && (typeof r != "string" || !(this.contents instanceof n.Scalar)), E = { doc: this, indentStep: " ", keep: h, mapAsMap: h && !!p, maxAliasCount: u, stringify: P }, O = Object.keys(this.anchors.map);
2827
+ O.length > 0 && (E.anchors = new Map(O.map((_) => [this.anchors.map[_], { alias: [], aliasCount: 0, count: 1 }])));
2828
+ let x = n.toJSON(this.contents, r, E);
2829
+ if (typeof s == "function" && E.anchors) for (let { count: _, res: W } of E.anchors.values()) s(W, _);
2830
+ return x;
2831
+ }
2832
+ toString() {
2833
+ if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified");
2834
+ let r = this.options.indent;
2835
+ if (!Number.isInteger(r) || r <= 0) {
2836
+ let O = JSON.stringify(r);
2837
+ throw new Error(`"indent" option must be a positive integer, not ${O}`);
2838
+ }
2839
+ this.setSchema();
2840
+ let s = [], o = !1;
2841
+ if (this.version) {
2842
+ let O = "%YAML 1.2";
2843
+ this.schema.name === "yaml-1.1" && (this.version === "1.0" ? O = "%YAML:1.0" : this.version === "1.1" && (O = "%YAML 1.1")), s.push(O), o = !0;
2844
+ }
2845
+ let p = this.listNonDefaultTags();
2846
+ this.tagPrefixes.forEach(({ handle: O, prefix: x }) => {
2847
+ p.some((_) => _.indexOf(x) === 0) && (s.push(`%TAG ${O} ${x}`), o = !0);
2848
+ }), (o || this.directivesEndMarker) && s.push("---"), this.commentBefore && ((o || !this.directivesEndMarker) && s.unshift(""), s.unshift(this.commentBefore.replace(/^/gm, "#")));
2849
+ let u = { anchors: /* @__PURE__ */ Object.create(null), doc: this, indent: "", indentStep: " ".repeat(r), stringify: P }, h = !1, E = null;
2850
+ if (this.contents) {
2851
+ this.contents instanceof n.Node && (this.contents.spaceBefore && (o || this.directivesEndMarker) && s.push(""), this.contents.commentBefore && s.push(this.contents.commentBefore.replace(/^/gm, "#")), u.forceBlockIndent = !!this.comment, E = this.contents.comment);
2852
+ let O = E ? null : () => h = !0, x = P(this.contents, u, () => E = null, O);
2853
+ s.push(n.addComment(x, "", E));
2854
+ } else this.contents !== void 0 && s.push(P(this.contents, u));
2855
+ return this.comment && ((!h || E) && s[s.length - 1] !== "" && s.push(""), s.push(this.comment.replace(/^/gm, "#"))), s.join(`
2856
+ `) + `
2857
+ `;
2858
+ }
2859
+ };
2860
+ e._defineProperty(l, "defaults", w), t.Document = l, t.defaultOptions = g, t.scalarOptions = y;
2861
+ }), Sr = Me((t) => {
2862
+ var e = vr(), n = Er(), c = fn(), g = Re(), y = ln();
2863
+ ze();
2864
+ function w(q, z = !0, K) {
2865
+ K === void 0 && typeof z == "string" && (K = z, z = !0);
2866
+ let ee = Object.assign({}, n.Document.defaults[n.defaultOptions.version], n.defaultOptions);
2867
+ return new c.Schema(ee).createNode(q, z, K);
2868
+ }
2869
+ var A = class extends n.Document {
2870
+ constructor(q) {
2871
+ super(Object.assign({}, n.defaultOptions, q));
2872
+ }
2873
+ };
2874
+ function k(q, z) {
2875
+ let K = [], ee;
2876
+ for (let le of e.parse(q)) {
2877
+ let M = new A(z);
2878
+ M.parse(le, ee), K.push(M), ee = M;
2879
+ }
2880
+ return K;
2881
+ }
2882
+ function C(q, z) {
2883
+ let K = e.parse(q), ee = new A(z).parse(K[0]);
2884
+ if (K.length > 1) {
2885
+ let le = "Source contains multiple documents; please use YAML.parseAllDocuments()";
2886
+ ee.errors.unshift(new g.YAMLSemanticError(K[1], le));
2887
+ }
2888
+ return ee;
2889
+ }
2890
+ function P(q, z) {
2891
+ let K = C(q, z);
2892
+ if (K.warnings.forEach((ee) => y.warn(ee)), K.errors.length > 0) throw K.errors[0];
2893
+ return K.toJSON();
2894
+ }
2895
+ function j(q, z) {
2896
+ let K = new A(z);
2897
+ return K.contents = q, String(K);
2898
+ }
2899
+ var ie = { createNode: w, defaultOptions: n.defaultOptions, Document: A, parse: P, parseAllDocuments: k, parseCST: e.parse, parseDocument: C, scalarOptions: n.scalarOptions, stringify: j };
2900
+ t.YAML = ie;
2901
+ }), hn = Me((t, e) => {
2902
+ e.exports = Sr().YAML;
2903
+ }), wr = Me((t) => {
2904
+ var e = ze(), n = Re();
2905
+ t.findPair = e.findPair, t.parseMap = e.resolveMap, t.parseSeq = e.resolveSeq, t.stringifyNumber = e.stringifyNumber, t.stringifyString = e.stringifyString, t.toJSON = e.toJSON, t.Type = n.Type, t.YAMLError = n.YAMLError, t.YAMLReferenceError = n.YAMLReferenceError, t.YAMLSemanticError = n.YAMLSemanticError, t.YAMLSyntaxError = n.YAMLSyntaxError, t.YAMLWarning = n.YAMLWarning;
2906
+ }), br = {};
2907
+ tn(br, { __parsePrettierYamlConfig: () => Hs, languages: () => $i, options: () => _i, parsers: () => Yn, printers: () => Js });
2908
+ var mn = (t, e) => (n, c, ...g) => n | 1 && c == null ? void 0 : (e.call(c) ?? c[t]).apply(c, g);
2909
+ function Or(t) {
2910
+ return this[t < 0 ? this.length + t : t];
2911
+ }
2912
+ var Nr = mn("at", function() {
2913
+ if (Array.isArray(this) || typeof this == "string") return Or;
2914
+ }), ve = Nr, Lr = String.prototype.replaceAll ?? function(t, e) {
2915
+ return t.global ? this.replace(t, e) : this.split(t).join(e);
2916
+ }, Ar = mn("replaceAll", function() {
2917
+ if (typeof this == "string") return Lr;
2918
+ }), pt = Ar, Mr = () => {
2919
+ }, Tr = Mr, gn = "string", yn = "array", vn = "cursor", En = "indent", kt = "align", Sn = "trim", Ct = "group", It = "fill", Pt = "if-break", wn = "indent-if-break", $t = "line-suffix", bn = "line-suffix-boundary", je = "line", On = "label", Rt = "break-parent", Nn = /* @__PURE__ */ new Set([vn, En, kt, Sn, Ct, It, Pt, wn, $t, bn, je, On, Rt]);
2920
+ function xr(t) {
2921
+ if (typeof t == "string") return gn;
2922
+ if (Array.isArray(t)) return yn;
2923
+ if (!t) return;
2924
+ let { type: e } = t;
2925
+ if (Nn.has(e)) return e;
2926
+ }
2927
+ var Ln = xr, kr = (t) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(t);
2928
+ function Cr(t) {
2929
+ let e = t === null ? "null" : typeof t;
2930
+ if (e !== "string" && e !== "object") return `Unexpected doc '${e}',
2931
+ Expected it to be 'string' or 'object'.`;
2932
+ if (Ln(t)) throw new Error("doc is valid.");
2933
+ let n = Object.prototype.toString.call(t);
2934
+ if (n !== "[object Object]") return `Unexpected doc '${n}'.`;
2935
+ let c = kr([...Nn].map((g) => `'${g}'`));
2936
+ return `Unexpected doc.type '${t.type}'.
2937
+ Expected it to be ${c}.`;
2938
+ }
2939
+ var Ir = class extends Error {
2940
+ constructor(e) {
2941
+ super(Cr(e));
2942
+ Ue(this, "name", "InvalidDocError");
2943
+ this.doc = e;
2944
+ }
2945
+ }, Pr = Ir;
2946
+ function $r(t, e) {
2947
+ if (typeof t == "string") return e(t);
2948
+ let n = /* @__PURE__ */ new Map();
2949
+ return c(t);
2950
+ function c(y) {
2951
+ if (n.has(y)) return n.get(y);
2952
+ let w = g(y);
2953
+ return n.set(y, w), w;
2954
+ }
2955
+ function g(y) {
2956
+ switch (Ln(y)) {
2957
+ case yn:
2958
+ return e(y.map(c));
2959
+ case It:
2960
+ return e({ ...y, parts: y.parts.map(c) });
2961
+ case Pt:
2962
+ return e({ ...y, breakContents: c(y.breakContents), flatContents: c(y.flatContents) });
2963
+ case Ct: {
2964
+ let { expandedStates: w, contents: A } = y;
2965
+ return w ? (w = w.map(c), A = w[0]) : A = c(A), e({ ...y, contents: A, expandedStates: w });
2966
+ }
2967
+ case kt:
2968
+ case En:
2969
+ case wn:
2970
+ case On:
2971
+ case $t:
2972
+ return e({ ...y, contents: c(y.contents) });
2973
+ case gn:
2974
+ case vn:
2975
+ case Sn:
2976
+ case bn:
2977
+ case je:
2978
+ case Rt:
2979
+ return e(y);
2980
+ default:
2981
+ throw new Pr(y);
2982
+ }
2983
+ }
2984
+ }
2985
+ function Rr(t, e = bt) {
2986
+ return $r(t, (n) => typeof n == "string" ? pe(e, n.split(`
2987
+ `)) : n);
2988
+ }
2989
+ var _r = Tr;
2990
+ function at(t, e) {
2991
+ return { type: kt, contents: e, n: t };
2992
+ }
2993
+ function jt(t) {
2994
+ return at(Number.NEGATIVE_INFINITY, t);
2995
+ }
2996
+ function Yr(t) {
2997
+ return at({ type: "root" }, t);
2998
+ }
2999
+ function Br(t) {
3000
+ return at(-1, t);
3001
+ }
3002
+ var _t = { type: Rt };
3003
+ function An(t) {
3004
+ return { type: It, parts: t };
3005
+ }
3006
+ function it(t, e = {}) {
3007
+ return _r(e.expandedStates), { type: Ct, id: e.id, contents: t, break: !!e.shouldBreak, expandedStates: e.expandedStates };
3008
+ }
3009
+ function qt(t, e) {
3010
+ return it(t[0], { ...e, expandedStates: t });
3011
+ }
3012
+ function wt(t, e = "", n = {}) {
3013
+ return { type: Pt, breakContents: t, flatContents: e, groupId: n.groupId };
3014
+ }
3015
+ function pe(t, e) {
3016
+ let n = [];
3017
+ for (let c = 0; c < e.length; c++) c !== 0 && n.push(t), n.push(e[c]);
3018
+ return n;
3019
+ }
3020
+ var Xe = { type: je }, Mn = { type: je, soft: !0 }, Dr = { type: je, hard: !0 }, H = [Dr, _t], Wr = { type: je, hard: !0, literal: !0 }, bt = [Wr, _t];
3021
+ function Fr(t) {
3022
+ return { type: $t, contents: t };
3023
+ }
3024
+ function jr(t) {
3025
+ return (e, n, c) => {
3026
+ let g = !!(c != null && c.backwards);
3027
+ if (n === !1) return !1;
3028
+ let { length: y } = e, w = n;
3029
+ for (; w >= 0 && w < y; ) {
3030
+ let A = e.charAt(w);
3031
+ if (t instanceof RegExp) {
3032
+ if (!t.test(A)) return w;
3033
+ } else if (!t.includes(A)) return w;
3034
+ g ? w-- : w++;
3035
+ }
3036
+ return w === -1 || w === y ? w : !1;
3037
+ };
3038
+ }
3039
+ var Kt = jr(" "), Ut = (t) => t === `
3040
+ ` || t === "\r" || t === "\u2028" || t === "\u2029";
3041
+ function qr(t, e, n) {
3042
+ let c = !!(n != null && n.backwards);
3043
+ if (e === !1) return !1;
3044
+ let g = t.charAt(e);
3045
+ if (c) {
3046
+ if (t.charAt(e - 1) === "\r" && g === `
3047
+ `) return e - 2;
3048
+ if (Ut(g)) return e - 1;
3049
+ } else {
3050
+ if (g === "\r" && t.charAt(e + 1) === `
3051
+ `) return e + 2;
3052
+ if (Ut(g)) return e + 1;
3053
+ }
3054
+ return e;
3055
+ }
3056
+ var Vt = qr;
3057
+ function Kr(t, e) {
3058
+ let n = e - 1;
3059
+ n = Kt(t, n, { backwards: !0 }), n = Vt(t, n, { backwards: !0 }), n = Kt(t, n, { backwards: !0 });
3060
+ let c = Vt(t, n, { backwards: !0 });
3061
+ return n !== c;
3062
+ }
3063
+ var Tn = Kr, Ur = class extends Error {
3064
+ constructor(e, n, c = "type") {
3065
+ super(`Unexpected ${n} node ${c}: ${JSON.stringify(e[c])}.`);
3066
+ Ue(this, "name", "UnexpectedNodeError");
3067
+ this.node = e;
3068
+ }
3069
+ }, Vr = Ur, Qr = "format", Jr = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u, Gr = /^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u, Hr = /^\s*@(?:format|prettier)\s*$/u, zr = (t) => Hr.test(t), Xr = (t) => Gr.test(t), Zr = (t) => Jr.test(t), ei = (t) => `# @${Qr}
3070
+
3071
+ ${t}`;
3072
+ function xn(t, e) {
3073
+ switch (t.type) {
3074
+ case "comment":
3075
+ if (zr(t.value)) return null;
3076
+ break;
3077
+ case "quoteDouble":
3078
+ case "quoteSingle":
3079
+ e.type = "quote";
3080
+ break;
3081
+ case "document":
3082
+ e.directivesEndMarker || delete e.directivesEndMarker, e.documentEndMarker || delete e.documentEndMarker;
3083
+ break;
3084
+ }
3085
+ }
3086
+ xn.ignoredProperties = /* @__PURE__ */ new Set(["position"]);
3087
+ var ti = xn;
3088
+ function kn(t, e) {
3089
+ let { node: n } = t;
3090
+ if (n.type === "root" && e.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath)) return async (c) => {
3091
+ let g = await c(e.originalText, { parser: "json" });
3092
+ return g ? [g, H] : void 0;
3093
+ };
3094
+ }
3095
+ kn.getVisitorKeys = () => [];
3096
+ var ni = kn, Qe = null;
3097
+ function He(t) {
3098
+ if (Qe !== null && typeof Qe.property) {
3099
+ let e = Qe;
3100
+ return Qe = He.prototype = null, e;
3101
+ }
3102
+ return Qe = He.prototype = t ?? /* @__PURE__ */ Object.create(null), new He();
3103
+ }
3104
+ var ri = 10;
3105
+ for (let t = 0; t <= ri; t++) He();
3106
+ function ii(t) {
3107
+ return He(t);
3108
+ }
3109
+ function si(t, e = "type") {
3110
+ ii(t);
3111
+ function n(c) {
3112
+ let g = c[e], y = t[g];
3113
+ if (!Array.isArray(y)) throw Object.assign(new Error(`Missing visitor keys for '${g}'.`), { node: c });
3114
+ return y;
3115
+ }
3116
+ return n;
3117
+ }
3118
+ var oi = si, ae = [["children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["key", "value", "children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["content", "children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], ["indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"]], ai = { root: ae[0], document: ["head", "body", "children", "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"], documentHead: ae[0], documentBody: ae[0], directive: ae[1], alias: ae[1], blockLiteral: ae[1], blockFolded: ae[0], plain: ae[0], quoteSingle: ae[1], quoteDouble: ae[1], mapping: ae[0], mappingItem: ae[2], mappingKey: ae[3], mappingValue: ae[3], sequence: ae[0], sequenceItem: ae[3], flowMapping: ae[0], flowMappingItem: ae[2], flowSequence: ae[0], flowSequenceItem: ae[3], comment: ae[1], tag: ae[4], anchor: ae[4] }, li = oi(ai), ui = li, Yt = (t) => t.position.start.offset, ci = (t) => t.position.end.offset;
3119
+ function fi(t) {
3120
+ return Array.isArray(t) && t.length > 0;
3121
+ }
3122
+ var Ze = fi;
3123
+ function Oe(t, e) {
3124
+ return typeof (t == null ? void 0 : t.type) == "string" && e.includes(t.type);
3125
+ }
3126
+ function Cn(t, e, n) {
3127
+ return e("children" in t ? { ...t, children: t.children.map((c) => Cn(c, e, t)) } : t, n);
3128
+ }
3129
+ function Je(t, e, n) {
3130
+ Object.defineProperty(t, e, { get: n, enumerable: !1 });
3131
+ }
3132
+ function pi(t, e) {
3133
+ let n = 0, c = e.length;
3134
+ for (let g = t.position.end.offset - 1; g < c; g++) {
3135
+ let y = e[g];
3136
+ if (y === `
3137
+ ` && n++, n === 1 && /\S/u.test(y)) return !1;
3138
+ if (n === 2) return !0;
3139
+ }
3140
+ return !1;
3141
+ }
3142
+ function In(t) {
3143
+ let { node: e } = t;
3144
+ switch (e.type) {
3145
+ case "tag":
3146
+ case "anchor":
3147
+ case "comment":
3148
+ return !1;
3149
+ }
3150
+ let n = t.stack.length;
3151
+ for (let c = 1; c < n; c++) {
3152
+ let g = t.stack[c], y = t.stack[c - 1];
3153
+ if (Array.isArray(y) && typeof g == "number" && g !== y.length - 1) return !1;
3154
+ }
3155
+ return !0;
3156
+ }
3157
+ function Ot(t) {
3158
+ return Ze(t.children) ? Ot(ve(0, t.children, -1)) : t;
3159
+ }
3160
+ function Qt(t) {
3161
+ return t.value.trim() === "prettier-ignore";
3162
+ }
3163
+ function di(t) {
3164
+ let { node: e } = t;
3165
+ if (e.type === "documentBody") {
3166
+ let n = t.parent.head;
3167
+ return ye(n) && Qt(ve(0, n.endComments, -1));
3168
+ }
3169
+ return xe(e) && Qt(ve(0, e.leadingComments, -1));
3170
+ }
3171
+ function st(t) {
3172
+ return !Ze(t.children) && !hi(t);
3173
+ }
3174
+ function hi(t) {
3175
+ return xe(t) || De(t) || Pn(t) || we(t) || ye(t);
3176
+ }
3177
+ function xe(t) {
3178
+ return Ze(t == null ? void 0 : t.leadingComments);
3179
+ }
3180
+ function De(t) {
3181
+ return Ze(t == null ? void 0 : t.middleComments);
3182
+ }
3183
+ function Pn(t) {
3184
+ return t == null ? void 0 : t.indicatorComment;
3185
+ }
3186
+ function we(t) {
3187
+ return t == null ? void 0 : t.trailingComment;
3188
+ }
3189
+ function ye(t) {
3190
+ return Ze(t == null ? void 0 : t.endComments);
3191
+ }
3192
+ function $n(t) {
3193
+ return t ? t.split(new RegExp("(?<!^| ) (?! |$)", "u")) : [];
3194
+ }
3195
+ function mi(t, e, n) {
3196
+ let c = e.split(`
3197
+ `).map((y, w, A) => w === 0 && w === A.length - 1 ? y : w !== 0 && w !== A.length - 1 ? y.trim() : w === 0 ? y.trimEnd() : y.trimStart());
3198
+ if (n.proseWrap === "preserve") return c.map((y) => y ? [y] : []);
3199
+ let g = [];
3200
+ for (let [y, w] of c.entries()) {
3201
+ let A = $n(w);
3202
+ y > 0 && c[y - 1].length > 0 && A.length > 0 && !(t === "quoteDouble" && ve(0, ve(0, g, -1), -1).endsWith("\\")) ? g[g.length - 1] = [...ve(0, g, -1), ...A] : g.push(A);
3203
+ }
3204
+ return n.proseWrap === "never" ? g.map((y) => [y.join(" ")]) : g;
3205
+ }
3206
+ function gi(t, { parentIndent: e, isLastDescendant: n, options: c }) {
3207
+ let g = t.position.start.line === t.position.end.line ? "" : c.originalText.slice(t.position.start.offset, t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1], y;
3208
+ if (t.indent === null) {
3209
+ let C = g.match(/^(?<leadingSpace> *)[^\n\r ]/mu);
3210
+ y = C ? C.groups.leadingSpace.length : Number.POSITIVE_INFINITY;
3211
+ } else y = t.indent - 1 + e;
3212
+ let w = g.split(`
3213
+ `).map((C) => C.slice(y));
3214
+ if (c.proseWrap === "preserve" || t.type === "blockLiteral") return k(w.map((C) => C ? [C] : []));
3215
+ let A = [];
3216
+ for (let [C, P] of w.entries()) {
3217
+ let j = $n(P);
3218
+ C > 0 && j.length > 0 && w[C - 1].length > 0 && !/^\s/u.test(j[0]) && !/^\s|\s$/u.test(ve(0, A, -1)) ? A[A.length - 1] = [...ve(0, A, -1), ...j] : A.push(j);
3219
+ }
3220
+ return A = A.map((C) => {
3221
+ let P = [];
3222
+ for (let j of C) P.length > 0 && /\s$/u.test(ve(0, P, -1)) ? P[P.length - 1] += " " + j : P.push(j);
3223
+ return P;
3224
+ }), c.proseWrap === "never" && (A = A.map((C) => [C.join(" ")])), k(A);
3225
+ function k(C) {
3226
+ if (t.chomping === "keep") return ve(0, C, -1).length === 0 ? C.slice(0, -1) : C;
3227
+ let P = 0;
3228
+ for (let j = C.length - 1; j >= 0 && C[j].length === 0; j--) P++;
3229
+ return P === 0 ? C : P >= 2 && !n ? C.slice(0, -(P - 1)) : C.slice(0, -P);
3230
+ }
3231
+ }
3232
+ function Nt(t) {
3233
+ if (!t) return !0;
3234
+ switch (t.type) {
3235
+ case "plain":
3236
+ case "quoteDouble":
3237
+ case "quoteSingle":
3238
+ case "alias":
3239
+ case "flowMapping":
3240
+ case "flowSequence":
3241
+ return !0;
3242
+ default:
3243
+ return !1;
3244
+ }
3245
+ }
3246
+ var dt = /* @__PURE__ */ new WeakMap();
3247
+ function Rn(t, e) {
3248
+ let { node: n, root: c } = t, g;
3249
+ return dt.has(c) ? g = dt.get(c) : (g = /* @__PURE__ */ new Set(), dt.set(c, g)), !g.has(n.position.end.line) && (g.add(n.position.end.line), pi(n, e) && !_n(t.parent)) ? Mn : "";
3250
+ }
3251
+ function _n(t) {
3252
+ return ye(t) && !Oe(t, ["documentHead", "documentBody", "flowMapping", "flowSequence"]);
3253
+ }
3254
+ function ge(t, e) {
3255
+ return at(" ".repeat(t), e);
3256
+ }
3257
+ function yi(t, e, n) {
3258
+ let { node: c } = t, g = t.ancestors.filter((C) => C.type === "sequence" || C.type === "mapping").length, y = In(t), w = [c.type === "blockFolded" ? ">" : "|"];
3259
+ c.indent !== null && w.push(c.indent.toString()), c.chomping !== "clip" && w.push(c.chomping === "keep" ? "+" : "-"), Pn(c) && w.push(" ", n("indicatorComment"));
3260
+ let A = gi(c, { parentIndent: g, isLastDescendant: y, options: e }), k = [];
3261
+ for (let [C, P] of A.entries()) C === 0 && k.push(H), k.push(An(pe(Xe, P))), C !== A.length - 1 ? k.push(P.length === 0 ? H : Yr(bt)) : c.chomping === "keep" && y && k.push(jt(P.length === 0 ? H : bt));
3262
+ return c.indent === null ? w.push(Br(ge(e.tabWidth, k))) : w.push(jt(ge(c.indent - 1 + g, k))), w;
3263
+ }
3264
+ var vi = yi;
3265
+ function Jt(t, e, n) {
3266
+ let { node: c } = t, g = c.type === "flowMapping", y = g ? "{" : "[", w = g ? "}" : "]", A = Mn;
3267
+ g && c.children.length > 0 && e.bracketSpacing && (A = Xe);
3268
+ let k = ve(0, c.children, -1), C = (k == null ? void 0 : k.type) === "flowMappingItem" && st(k.key) && st(k.value);
3269
+ return [y, ge(e.tabWidth, [A, Ei(t, e, n), e.trailingComma === "none" ? "" : wt(","), ye(c) ? [H, pe(H, t.map(n, "endComments"))] : ""]), C ? "" : A, w];
3270
+ }
3271
+ function Ei(t, e, n) {
3272
+ return t.map(({ isLast: c, node: g, next: y }) => [n(), c ? "" : [",", Xe, g.position.start.line !== y.position.start.line ? Rn(t, e.originalText) : ""]], "children");
3273
+ }
3274
+ function Si(t, e, n) {
3275
+ var le;
3276
+ let { node: c, parent: g } = t, { key: y, value: w } = c, A = st(y), k = st(w);
3277
+ if (A && k) return ": ";
3278
+ let C = n("key"), P = wi(c) ? " " : "";
3279
+ if (k) return c.type === "flowMappingItem" && g.type === "flowMapping" ? C : c.type === "mappingItem" && ht(y.content, e) && !we(y.content) && ((le = g.tag) == null ? void 0 : le.value) !== "tag:yaml.org,2002:set" ? [C, P, ":"] : ["? ", ge(2, C)];
3280
+ let j = n("value");
3281
+ if (A) return [": ", ge(2, j)];
3282
+ if (xe(w) || !Nt(y.content)) return ["? ", ge(2, C), H, ...t.map(() => [n(), H], "value", "leadingComments"), ": ", ge(2, j)];
3283
+ if (bi(y.content) && !xe(y.content) && !De(y.content) && !we(y.content) && !ye(y) && !xe(w.content) && !De(w.content) && !ye(w) && ht(w.content, e)) return [C, P, ": ", j];
3284
+ let ie = Symbol("mappingKey"), q = it([wt("? "), it(ge(2, C), { id: ie })]), z = [H, ": ", ge(2, j)], K = [P, ":"];
3285
+ ye(w) && w.content && Oe(w.content, ["flowMapping", "flowSequence"]) && w.content.children.length === 0 ? K.push(" ") : xe(w.content) || ye(w) && w.content && !Oe(w.content, ["mapping", "sequence"]) || g.type === "mapping" && we(y.content) && Nt(w.content) || Oe(w.content, ["mapping", "sequence"]) && w.content.tag === null && w.content.anchor === null ? K.push(H) : w.content ? K.push(Xe) : we(w) && K.push(" "), K.push(j);
3286
+ let ee = ge(e.tabWidth, K);
3287
+ return ht(y.content, e) && !xe(y.content) && !De(y.content) && !we(y.content) && !ye(y) ? qt([[C, ee]]) : qt([[q, wt(z, ee, { groupId: ie })]]);
3288
+ }
3289
+ function ht(t, e) {
3290
+ if (!t) return !0;
3291
+ switch (t.type) {
3292
+ case "plain":
3293
+ case "quoteSingle":
3294
+ case "quoteDouble":
3295
+ break;
3296
+ case "alias":
3297
+ return !0;
3298
+ default:
3299
+ return !1;
3300
+ }
3301
+ if (e.proseWrap === "preserve") return t.position.start.line === t.position.end.line;
3302
+ if (/\\$/mu.test(e.originalText.slice(t.position.start.offset, t.position.end.offset))) return !1;
3303
+ switch (e.proseWrap) {
3304
+ case "never":
3305
+ return !t.value.includes(`
3306
+ `);
3307
+ case "always":
3308
+ return !/[\n ]/u.test(t.value);
3309
+ default:
3310
+ return !1;
3311
+ }
3312
+ }
3313
+ function wi(t) {
3314
+ var e;
3315
+ return ((e = t.key.content) == null ? void 0 : e.type) === "alias";
3316
+ }
3317
+ function bi(t) {
3318
+ if (!t) return !0;
3319
+ switch (t.type) {
3320
+ case "plain":
3321
+ case "quoteDouble":
3322
+ case "quoteSingle":
3323
+ return t.position.start.line === t.position.end.line;
3324
+ case "alias":
3325
+ return !0;
3326
+ default:
3327
+ return !1;
3328
+ }
3329
+ }
3330
+ var Oi = Si;
3331
+ function Ni(t) {
3332
+ return Cn(t, Li);
3333
+ }
3334
+ function Li(t) {
3335
+ switch (t.type) {
3336
+ case "document":
3337
+ Je(t, "head", () => t.children[0]), Je(t, "body", () => t.children[1]);
3338
+ break;
3339
+ case "documentBody":
3340
+ case "sequenceItem":
3341
+ case "flowSequenceItem":
3342
+ case "mappingKey":
3343
+ case "mappingValue":
3344
+ Je(t, "content", () => t.children[0]);
3345
+ break;
3346
+ case "mappingItem":
3347
+ case "flowMappingItem":
3348
+ Je(t, "key", () => t.children[0]), Je(t, "value", () => t.children[1]);
3349
+ break;
3350
+ }
3351
+ return t;
3352
+ }
3353
+ var Ai = Ni;
3354
+ function Mi(t, e, n) {
3355
+ let { node: c } = t, g = [];
3356
+ c.type !== "mappingValue" && xe(c) && g.push([pe(H, t.map(n, "leadingComments")), H]);
3357
+ let { tag: y, anchor: w } = c;
3358
+ y && g.push(n("tag")), y && w && g.push(" "), w && g.push(n("anchor"));
3359
+ let A = "";
3360
+ return Oe(c, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !In(t) && (A = Rn(t, e.originalText)), (y || w) && (Oe(c, ["sequence", "mapping"]) && !De(c) ? g.push(H) : g.push(" ")), De(c) && g.push([c.middleComments.length === 1 ? "" : H, pe(H, t.map(n, "middleComments")), H]), di(t) ? g.push(Rr(e.originalText.slice(c.position.start.offset, c.position.end.offset).trimEnd())) : g.push(it(Ti(t, e, n))), we(c) && !Oe(c, ["document", "documentHead"]) && g.push(Fr([c.type === "mappingValue" && !c.content ? "" : " ", t.parent.type === "mappingKey" && t.getParentNode(2).type === "mapping" && Nt(c) ? "" : _t, n("trailingComment")])), _n(c) && g.push(ge(c.type === "sequenceItem" ? 2 : 0, [H, pe(H, t.map(({ node: k }) => [Tn(e.originalText, Yt(k)) ? H : "", n()], "endComments"))])), g.push(A), g;
3361
+ }
3362
+ function Ti(t, e, n) {
3363
+ let { node: c } = t;
3364
+ switch (c.type) {
3365
+ case "root": {
3366
+ let g = Ot(c), y = !(Oe(g, ["blockLiteral", "blockFolded"]) && g.chomping === "keep"), w = [];
3367
+ return t.each(({ node: A, isFirst: k }) => {
3368
+ k || w.push(H), w.push(n()), ki(t) && (y && w.push(H), w.push("..."), we(A) && w.push(" ", n("trailingComment")));
3369
+ }, "children"), y && w.push(H), w;
3370
+ }
3371
+ case "document": {
3372
+ let g = [];
3373
+ return Ci(t) && ((c.head.children.length > 0 || c.head.endComments.length > 0) && g.push(n("head")), we(c.head) ? g.push(["---", " ", n(["head", "trailingComment"])]) : g.push("---")), xi(c) && g.push(n("body")), pe(H, g);
3374
+ }
3375
+ case "documentHead":
3376
+ return pe(H, [...t.map(n, "children"), ...t.map(n, "endComments")]);
3377
+ case "documentBody": {
3378
+ let { children: g, endComments: y } = c, w = "";
3379
+ if (g.length > 0 && y.length > 0) {
3380
+ let A = Ot(c);
3381
+ if (Oe(A, ["blockFolded", "blockLiteral"])) A.chomping !== "keep" && (w = [H, H]);
3382
+ else {
3383
+ let k = ve(0, g, -1);
3384
+ w = Oe(k, ["mapping"]) && Tn(e.originalText, Yt(y[0])) ? [H, H] : H;
3385
+ }
3386
+ }
3387
+ return [pe(H, t.map(n, "children")), w, pe(H, t.map(n, "endComments"))];
3388
+ }
3389
+ case "directive":
3390
+ return ["%", pe(" ", [c.name, ...c.parameters])];
3391
+ case "comment":
3392
+ return ["#", c.value];
3393
+ case "alias":
3394
+ return ["*", c.value];
3395
+ case "tag":
3396
+ return e.originalText.slice(c.position.start.offset, c.position.end.offset);
3397
+ case "anchor":
3398
+ return ["&", c.value];
3399
+ case "plain":
3400
+ return Ge(c.type, e.originalText.slice(c.position.start.offset, c.position.end.offset), e);
3401
+ case "quoteDouble":
3402
+ case "quoteSingle": {
3403
+ let g = e.originalText.slice(c.position.start.offset + 1, c.position.end.offset - 1);
3404
+ if (c.type === "quoteSingle" && g.includes("\\") || c.type === "quoteDouble" && /\\[^"]/u.test(g)) {
3405
+ let w = c.type === "quoteDouble" ? '"' : "'";
3406
+ return [w, Ge(c.type, g, e), w];
3407
+ }
3408
+ if (g.includes('"')) return ["'", Ge(c.type, c.type === "quoteDouble" ? pt(0, pt(0, g, '\\"', '"'), "'", "'".repeat(2)) : g, e), "'"];
3409
+ if (g.includes("'")) return ['"', Ge(c.type, c.type === "quoteSingle" ? pt(0, g, "''", "'") : g, e), '"'];
3410
+ let y = e.singleQuote ? "'" : '"';
3411
+ return [y, Ge(c.type, g, e), y];
3412
+ }
3413
+ case "blockFolded":
3414
+ case "blockLiteral":
3415
+ return vi(t, e, n);
3416
+ case "mapping":
3417
+ case "sequence":
3418
+ return pe(H, t.map(n, "children"));
3419
+ case "sequenceItem":
3420
+ return ["- ", ge(2, c.content ? n("content") : "")];
3421
+ case "mappingKey":
3422
+ case "mappingValue":
3423
+ return c.content ? n("content") : "";
3424
+ case "mappingItem":
3425
+ case "flowMappingItem":
3426
+ return Oi(t, e, n);
3427
+ case "flowMapping":
3428
+ return Jt(t, e, n);
3429
+ case "flowSequence":
3430
+ return Jt(t, e, n);
3431
+ case "flowSequenceItem":
3432
+ return n("content");
3433
+ default:
3434
+ throw new Vr(c, "YAML");
3435
+ }
3436
+ }
3437
+ function xi(t) {
3438
+ return t.body.children.length > 0 || ye(t.body);
3439
+ }
3440
+ function ki(t) {
3441
+ let e = t.node;
3442
+ if (e.documentEndMarker || we(e)) return !0;
3443
+ if (t.isLast) return !1;
3444
+ let n = t.next;
3445
+ return n.head.children.length > 0 || ye(n.head);
3446
+ }
3447
+ function Ci(t) {
3448
+ let e = t.node;
3449
+ return e.directivesEndMarker || e.head.children.length > 0 || ye(e.head) || we(e.head);
3450
+ }
3451
+ function Ge(t, e, n) {
3452
+ let c = mi(t, e, n);
3453
+ return pe(H, c.map((g) => An(pe(Xe, g))));
3454
+ }
3455
+ var Ii = { preprocess: Ai, embed: ni, print: Mi, massageAstNode: ti, insertPragma: ei, getVisitorKeys: ui }, Pi = Ii, $i = [{ name: "YAML", type: "data", aceMode: "yaml", extensions: [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yaml.sed", ".yml.mysql"], filenames: [".clang-format", ".clang-tidy", ".clangd", ".gemrc", "CITATION.cff", "glide.lock", "pixi.lock", ".prettierrc", ".stylelintrc", ".lintstagedrc"], tmScope: "source.yaml", aliases: ["yml"], codemirrorMode: "yaml", codemirrorMimeType: "text/x-yaml", parsers: ["yaml"], vscodeLanguageIds: ["yaml", "ansible", "dockercompose", "github-actions-workflow", "home-assistant"], linguistLanguageId: 407 }], mt = { bracketSpacing: { category: "Common", type: "boolean", default: !0, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, singleQuote: { category: "Common", type: "boolean", default: !1, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] } }, Ri = { bracketSpacing: mt.bracketSpacing, singleQuote: mt.singleQuote, proseWrap: mt.proseWrap }, _i = Ri, Yn = {};
3456
+ tn(Yn, { yaml: () => Qs });
3457
+ var Gt = xt(hn()), Ee = xt(wr());
3458
+ Ee.default.findPair;
3459
+ Ee.default.toJSON;
3460
+ Ee.default.parseMap;
3461
+ Ee.default.parseSeq;
3462
+ Ee.default.stringifyNumber;
3463
+ Ee.default.stringifyString;
3464
+ Ee.default.Type;
3465
+ Ee.default.YAMLError;
3466
+ Ee.default.YAMLReferenceError;
3467
+ var Yi = Ee.default.YAMLSemanticError;
3468
+ Ee.default.YAMLSyntaxError;
3469
+ Ee.default.YAMLWarning;
3470
+ function de(t, e = null) {
3471
+ "children" in t && t.children.forEach((n) => de(n, t)), "anchor" in t && t.anchor && de(t.anchor, t), "tag" in t && t.tag && de(t.tag, t), "leadingComments" in t && t.leadingComments.forEach((n) => de(n, t)), "middleComments" in t && t.middleComments.forEach((n) => de(n, t)), "indicatorComment" in t && t.indicatorComment && de(t.indicatorComment, t), "trailingComment" in t && t.trailingComment && de(t.trailingComment, t), "endComments" in t && t.endComments.forEach((n) => de(n, t)), Object.defineProperty(t, "_parent", { value: e, enumerable: !1 });
3472
+ }
3473
+ function ot(t) {
3474
+ return `${t.line}:${t.column}`;
3475
+ }
3476
+ function Bi(t) {
3477
+ de(t);
3478
+ let e = Di(t), n = t.children.slice();
3479
+ t.comments.sort((c, g) => c.position.start.offset - g.position.end.offset).filter((c) => !c._parent).forEach((c) => {
3480
+ for (; n.length > 1 && c.position.start.line > n[0].position.end.line; ) n.shift();
3481
+ Wi(c, e, n[0]);
3482
+ });
3483
+ }
3484
+ function Di(t) {
3485
+ let e = Array.from(new Array(t.position.end.line), () => ({}));
3486
+ for (let n of t.comments) e[n.position.start.line - 1].comment = n;
3487
+ return Bn(e, t), e;
3488
+ }
3489
+ function Bn(t, e) {
3490
+ if (e.position.start.offset !== e.position.end.offset) {
3491
+ if ("leadingComments" in e) {
3492
+ let { start: n } = e.position, { leadingAttachableNode: c } = t[n.line - 1];
3493
+ (!c || n.column < c.position.start.column) && (t[n.line - 1].leadingAttachableNode = e);
3494
+ }
3495
+ if ("trailingComment" in e && e.position.end.column > 1 && e.type !== "document" && e.type !== "documentHead") {
3496
+ let { end: n } = e.position, { trailingAttachableNode: c } = t[n.line - 1];
3497
+ (!c || n.column >= c.position.end.column) && (t[n.line - 1].trailingAttachableNode = e);
3498
+ }
3499
+ if (e.type !== "root" && e.type !== "document" && e.type !== "documentHead" && e.type !== "documentBody") {
3500
+ let { start: n, end: c } = e.position, g = [c.line].concat(n.line === c.line ? [] : n.line);
3501
+ for (let y of g) {
3502
+ let w = t[y - 1].trailingNode;
3503
+ (!w || c.column >= w.position.end.column) && (t[y - 1].trailingNode = e);
3504
+ }
3505
+ }
3506
+ "children" in e && e.children.forEach((n) => {
3507
+ Bn(t, n);
3508
+ });
3509
+ }
3510
+ }
3511
+ function Wi(t, e, n) {
3512
+ let c = t.position.start.line, { trailingAttachableNode: g } = e[c - 1];
3513
+ if (g) {
3514
+ if (g.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${ot(t.position.start)}`);
3515
+ de(t, g), g.trailingComment = t;
3516
+ return;
3517
+ }
3518
+ for (let w = c; w >= n.position.start.line; w--) {
3519
+ let { trailingNode: A } = e[w - 1], k;
3520
+ if (A) k = A;
3521
+ else if (w !== c && e[w - 1].comment) k = e[w - 1].comment._parent;
3522
+ else continue;
3523
+ if ((k.type === "sequence" || k.type === "mapping") && (k = k.children[0]), k.type === "mappingItem") {
3524
+ let [C, P] = k.children;
3525
+ k = Dn(C) ? C : P;
3526
+ }
3527
+ for (; ; ) {
3528
+ if (Fi(k, t)) {
3529
+ de(t, k), k.endComments.push(t);
3530
+ return;
3531
+ }
3532
+ if (!k._parent) break;
3533
+ k = k._parent;
3534
+ }
3535
+ break;
3536
+ }
3537
+ for (let w = c + 1; w <= n.position.end.line; w++) {
3538
+ let { leadingAttachableNode: A } = e[w - 1];
3539
+ if (A) {
3540
+ de(t, A), A.leadingComments.push(t);
3541
+ return;
3542
+ }
3543
+ }
3544
+ let y = n.children[1];
3545
+ de(t, y), y.endComments.push(t);
3546
+ }
3547
+ function Fi(t, e) {
3548
+ if (t.position.start.offset < e.position.start.offset && t.position.end.offset > e.position.end.offset) switch (t.type) {
3549
+ case "flowMapping":
3550
+ case "flowSequence":
3551
+ return t.children.length === 0 || e.position.start.line > t.children[t.children.length - 1].position.end.line;
3552
+ }
3553
+ if (e.position.end.offset < t.position.end.offset) return !1;
3554
+ switch (t.type) {
3555
+ case "sequenceItem":
3556
+ return e.position.start.column > t.position.start.column;
3557
+ case "mappingKey":
3558
+ case "mappingValue":
3559
+ return e.position.start.column > t._parent.position.start.column && (t.children.length === 0 || t.children.length === 1 && t.children[0].type !== "blockFolded" && t.children[0].type !== "blockLiteral") && (t.type === "mappingValue" || Dn(t));
3560
+ default:
3561
+ return !1;
3562
+ }
3563
+ }
3564
+ function Dn(t) {
3565
+ return t.position.start !== t.position.end && (t.children.length === 0 || t.position.start.offset !== t.children[0].position.start.offset);
3566
+ }
3567
+ function ue(t, e) {
3568
+ return { type: t, position: e };
3569
+ }
3570
+ function ji(t, e, n) {
3571
+ return { ...ue("root", t), children: e, comments: n };
3572
+ }
3573
+ function rt(t) {
3574
+ switch (t.type) {
3575
+ case "DOCUMENT":
3576
+ for (let e = t.contents.length - 1; e >= 0; e--) t.contents[e].type === "BLANK_LINE" ? t.contents.splice(e, 1) : rt(t.contents[e]);
3577
+ for (let e = t.directives.length - 1; e >= 0; e--) t.directives[e].type === "BLANK_LINE" && t.directives.splice(e, 1);
3578
+ break;
3579
+ case "FLOW_MAP":
3580
+ case "FLOW_SEQ":
3581
+ case "MAP":
3582
+ case "SEQ":
3583
+ for (let e = t.items.length - 1; e >= 0; e--) {
3584
+ let n = t.items[e];
3585
+ "char" in n || (n.type === "BLANK_LINE" ? t.items.splice(e, 1) : rt(n));
3586
+ }
3587
+ break;
3588
+ case "MAP_KEY":
3589
+ case "MAP_VALUE":
3590
+ case "SEQ_ITEM":
3591
+ t.node && rt(t.node);
3592
+ break;
3593
+ case "ALIAS":
3594
+ case "BLANK_LINE":
3595
+ case "BLOCK_FOLDED":
3596
+ case "BLOCK_LITERAL":
3597
+ case "COMMENT":
3598
+ case "DIRECTIVE":
3599
+ case "PLAIN":
3600
+ case "QUOTE_DOUBLE":
3601
+ case "QUOTE_SINGLE":
3602
+ break;
3603
+ default:
3604
+ throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`);
3605
+ }
3606
+ }
3607
+ function $e(t, e) {
3608
+ return { start: t, end: e };
3609
+ }
3610
+ function Ht(t) {
3611
+ return { start: t, end: t };
3612
+ }
3613
+ var We;
3614
+ (function(t) {
3615
+ t.Tag = "!", t.Anchor = "&", t.Comment = "#";
3616
+ })(We || (We = {}));
3617
+ function qi(t, e) {
3618
+ return { ...ue("anchor", t), value: e };
3619
+ }
3620
+ function Bt(t, e) {
3621
+ return { ...ue("comment", t), value: e };
3622
+ }
3623
+ function Ki(t, e, n) {
3624
+ return { anchor: e, tag: t, middleComments: n };
3625
+ }
3626
+ function Ui(t, e) {
3627
+ return { ...ue("tag", t), value: e };
3628
+ }
3629
+ function Wn(t, e, n = () => !1) {
3630
+ let c = t.cstNode, g = [], y = null, w = null, A = null;
3631
+ for (let k of c.props) {
3632
+ let C = e.text[k.origStart];
3633
+ switch (C) {
3634
+ case We.Tag:
3635
+ y = y || k, w = Ui(e.transformRange(k), t.tag);
3636
+ break;
3637
+ case We.Anchor:
3638
+ y = y || k, A = qi(e.transformRange(k), c.anchor);
3639
+ break;
3640
+ case We.Comment: {
3641
+ let P = Bt(e.transformRange(k), e.text.slice(k.origStart + 1, k.origEnd));
3642
+ e.comments.push(P), !n(P) && y && y.origEnd <= k.origStart && k.origEnd <= c.valueRange.origStart && g.push(P);
3643
+ break;
3644
+ }
3645
+ default:
3646
+ throw new Error(`Unexpected leading character ${JSON.stringify(C)}`);
3647
+ }
3648
+ }
3649
+ return Ki(w, A, g);
3650
+ }
3651
+ function qe() {
3652
+ return { leadingComments: [] };
3653
+ }
3654
+ function lt(t = null) {
3655
+ return { trailingComment: t };
3656
+ }
3657
+ function _e() {
3658
+ return { ...qe(), ...lt() };
3659
+ }
3660
+ function Vi(t, e, n) {
3661
+ return { ...ue("alias", t), ..._e(), ...e, value: n };
3662
+ }
3663
+ function Qi(t, e) {
3664
+ let n = t.cstNode;
3665
+ return Vi(e.transformRange({ origStart: n.valueRange.origStart - 1, origEnd: n.valueRange.origEnd }), e.transformContent(t), n.rawValue);
3666
+ }
3667
+ function Ji(t) {
3668
+ return { ...t, type: "blockFolded" };
3669
+ }
3670
+ function Gi(t, e, n, c, g, y) {
3671
+ return { ...ue("blockValue", t), ...qe(), ...e, chomping: n, indent: c, value: g, indicatorComment: y };
3672
+ }
3673
+ var Lt;
3674
+ (function(t) {
3675
+ t.CLIP = "clip", t.STRIP = "strip", t.KEEP = "keep";
3676
+ })(Lt || (Lt = {}));
3677
+ function Fn(t, e) {
3678
+ let n = t.cstNode, c = 1, g = n.chomping === "CLIP" ? 0 : 1, y = n.header.origEnd - n.header.origStart - c - g !== 0, w = e.transformRange({ origStart: n.header.origStart, origEnd: n.valueRange.origEnd }), A = null, k = Wn(t, e, (C) => {
3679
+ if (!(w.start.offset < C.position.start.offset && C.position.end.offset < w.end.offset)) return !1;
3680
+ if (A) throw new Error(`Unexpected multiple indicator comments at ${ot(C.position.start)}`);
3681
+ return A = C, !0;
3682
+ });
3683
+ return Gi(w, k, Lt[n.chomping], y ? n.blockIndent : null, n.strValue, A);
3684
+ }
3685
+ function Hi(t, e) {
3686
+ return Ji(Fn(t, e));
3687
+ }
3688
+ function zi(t) {
3689
+ return { ...t, type: "blockLiteral" };
3690
+ }
3691
+ function Xi(t, e) {
3692
+ return zi(Fn(t, e));
3693
+ }
3694
+ function Zi(t, e) {
3695
+ return Bt(e.transformRange(t.range), t.comment);
3696
+ }
3697
+ function es(t, e, n) {
3698
+ return { ...ue("directive", t), ..._e(), name: e, parameters: n };
3699
+ }
3700
+ function Dt(t, e) {
3701
+ for (let n of t.props) {
3702
+ let c = e.text[n.origStart];
3703
+ switch (c) {
3704
+ case We.Comment:
3705
+ e.comments.push(Bt(e.transformRange(n), e.text.slice(n.origStart + 1, n.origEnd)));
3706
+ break;
3707
+ default:
3708
+ throw new Error(`Unexpected leading character ${JSON.stringify(c)}`);
3709
+ }
3710
+ }
3711
+ }
3712
+ function ts(t, e) {
3713
+ return Dt(t, e), es(e.transformRange(t.range), t.name, t.parameters);
3714
+ }
3715
+ function ns(t, e, n, c, g, y) {
3716
+ return { ...ue("document", t), ...lt(y), directivesEndMarker: e, documentEndMarker: n, children: [c, g] };
3717
+ }
3718
+ function Ye(t = []) {
3719
+ return { endComments: t };
3720
+ }
3721
+ function rs(t, e, n) {
3722
+ return { ...ue("documentBody", t), ...Ye(n), children: e ? [e] : [] };
3723
+ }
3724
+ function ke(t) {
3725
+ return t[t.length - 1];
3726
+ }
3727
+ function jn(t, e) {
3728
+ let n = t.match(e);
3729
+ return n ? n.index : -1;
3730
+ }
3731
+ function is(t, e, n) {
3732
+ let c = t.cstNode, { comments: g, endComments: y, documentTrailingComment: w, documentHeadTrailingComment: A } = ss(c, e, n), k = e.transformNode(t.contents), { position: C, documentEndPoint: P } = os(c, k, e);
3733
+ return e.comments.push(...g, ...y), { documentBody: rs(C, k, y), documentEndPoint: P, documentTrailingComment: w, documentHeadTrailingComment: A };
3734
+ }
3735
+ function ss(t, e, n) {
3736
+ let c = [], g = [], y = [], w = [], A = !1;
3737
+ for (let k = t.contents.length - 1; k >= 0; k--) {
3738
+ let C = t.contents[k];
3739
+ if (C.type === "COMMENT") {
3740
+ let P = e.transformNode(C);
3741
+ n && n.line === P.position.start.line ? w.unshift(P) : A ? c.unshift(P) : P.position.start.offset >= t.valueRange.origEnd ? y.unshift(P) : c.unshift(P);
3742
+ } else A = !0;
3743
+ }
3744
+ if (y.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${ot(y[1].position.start)}`);
3745
+ if (w.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${ot(w[1].position.start)}`);
3746
+ return { comments: c, endComments: g, documentTrailingComment: ke(y) || null, documentHeadTrailingComment: ke(w) || null };
3747
+ }
3748
+ function os(t, e, n) {
3749
+ let c = jn(n.text.slice(t.valueRange.origEnd), /^\.\.\./), g = c === -1 ? t.valueRange.origEnd : Math.max(0, t.valueRange.origEnd - 1);
3750
+ n.text[g - 1] === "\r" && g--;
3751
+ let y = n.transformRange({ origStart: e !== null ? e.position.start.offset : g, origEnd: g }), w = c === -1 ? y.end : n.transformOffset(t.valueRange.origEnd + 3);
3752
+ return { position: y, documentEndPoint: w };
3753
+ }
3754
+ function as(t, e, n, c) {
3755
+ return { ...ue("documentHead", t), ...Ye(n), ...lt(c), children: e };
3756
+ }
3757
+ function ls(t, e) {
3758
+ let n = t.cstNode, { directives: c, comments: g, endComments: y } = us(n, e), { position: w, documentEndMarkererPoint: A } = cs(n, c, e);
3759
+ return e.comments.push(...g, ...y), { createDocumentHeadWithTrailingComment: (k) => (k && e.comments.push(k), as(w, c, y, k)), documentHeadEndMarkerPoint: A };
3760
+ }
3761
+ function us(t, e) {
3762
+ let n = [], c = [], g = [], y = !1;
3763
+ for (let w = t.directives.length - 1; w >= 0; w--) {
3764
+ let A = e.transformNode(t.directives[w]);
3765
+ A.type === "comment" ? y ? c.unshift(A) : g.unshift(A) : (y = !0, n.unshift(A));
3766
+ }
3767
+ return { directives: n, comments: c, endComments: g };
3768
+ }
3769
+ function cs(t, e, n) {
3770
+ let c = jn(n.text.slice(0, t.valueRange.origStart), /---\s*$/);
3771
+ c > 0 && !/[\r\n]/.test(n.text[c - 1]) && (c = -1);
3772
+ let g = c === -1 ? { origStart: t.valueRange.origStart, origEnd: t.valueRange.origStart } : { origStart: c, origEnd: c + 3 };
3773
+ return e.length !== 0 && (g.origStart = e[0].position.start.offset), { position: n.transformRange(g), documentEndMarkererPoint: c === -1 ? null : n.transformOffset(c) };
3774
+ }
3775
+ function fs(t, e) {
3776
+ let { createDocumentHeadWithTrailingComment: n, documentHeadEndMarkerPoint: c } = ls(t, e), { documentBody: g, documentEndPoint: y, documentTrailingComment: w, documentHeadTrailingComment: A } = is(t, e, c), k = n(A);
3777
+ w && e.comments.push(w);
3778
+ let C = t.cstNode;
3779
+ return ns($e(k.position.start, y), !!C.directivesEndMarker, !!C.documentEndMarker, k, g, w);
3780
+ }
3781
+ function qn(t, e, n) {
3782
+ return { ...ue("flowCollection", t), ..._e(), ...Ye(), ...e, children: n };
3783
+ }
3784
+ function ps(t, e, n) {
3785
+ return { ...qn(t, e, n), type: "flowMapping" };
3786
+ }
3787
+ function Kn(t, e, n) {
3788
+ return { ...ue("flowMappingItem", t), ...qe(), children: [e, n] };
3789
+ }
3790
+ function ut(t, e) {
3791
+ let n = [];
3792
+ for (let c of t) c && "type" in c && c.type === "COMMENT" ? e.comments.push(e.transformNode(c)) : n.push(c);
3793
+ return n;
3794
+ }
3795
+ function Un(t) {
3796
+ let [e, n] = ["?", ":"].map((c) => {
3797
+ let g = t.find((y) => "char" in y && y.char === c);
3798
+ return g ? { origStart: g.origOffset, origEnd: g.origOffset + 1 } : null;
3799
+ });
3800
+ return { additionalKeyRange: e, additionalValueRange: n };
3801
+ }
3802
+ function Vn(t, e) {
3803
+ let n = e;
3804
+ return (c) => t.slice(n, n = c);
3805
+ }
3806
+ function Qn(t) {
3807
+ let e = [], n = Vn(t, 1), c = !1;
3808
+ for (let g = 1; g < t.length - 1; g++) {
3809
+ let y = t[g];
3810
+ if ("char" in y && y.char === ",") {
3811
+ e.push(n(g)), n(g + 1), c = !1;
3812
+ continue;
3813
+ }
3814
+ c = !0;
3815
+ }
3816
+ return c && e.push(n(t.length - 1)), e;
3817
+ }
3818
+ function zt(t, e) {
3819
+ return { ...ue("mappingKey", t), ...lt(), ...Ye(), children: e ? [e] : [] };
3820
+ }
3821
+ function Xt(t, e) {
3822
+ return { ...ue("mappingValue", t), ..._e(), ...Ye(), children: e ? [e] : [] };
3823
+ }
3824
+ function Wt(t, e, n, c, g) {
3825
+ let y = e.transformNode(t.key), w = e.transformNode(t.value), A = y || c ? zt(e.transformRange({ origStart: c ? c.origStart : y.position.start.offset, origEnd: y ? y.position.end.offset : c.origStart + 1 }), y) : null, k = w || g ? Xt(e.transformRange({ origStart: g ? g.origStart : w.position.start.offset, origEnd: w ? w.position.end.offset : g.origStart + 1 }), w) : null;
3826
+ return n($e(A ? A.position.start : k.position.start, k ? k.position.end : A.position.end), A || zt(Ht(k.position.start), null), k || Xt(Ht(A.position.end), null));
3827
+ }
3828
+ function ds(t, e) {
3829
+ let n = ut(t.cstNode.items, e), c = Qn(n), g = t.items.map((A, k) => {
3830
+ let C = c[k], { additionalKeyRange: P, additionalValueRange: j } = Un(C);
3831
+ return Wt(A, e, Kn, P, j);
3832
+ }), y = n[0], w = ke(n);
3833
+ return ps(e.transformRange({ origStart: y.origOffset, origEnd: w.origOffset + 1 }), e.transformContent(t), g);
3834
+ }
3835
+ function hs(t, e, n) {
3836
+ return { ...qn(t, e, n), type: "flowSequence" };
3837
+ }
3838
+ function ms(t, e) {
3839
+ return { ...ue("flowSequenceItem", t), children: [e] };
3840
+ }
3841
+ function gs(t, e) {
3842
+ let n = ut(t.cstNode.items, e), c = Qn(n), g = t.items.map((A, k) => {
3843
+ if (A.type !== "PAIR") {
3844
+ let C = e.transformNode(A);
3845
+ return ms($e(C.position.start, C.position.end), C);
3846
+ } else {
3847
+ let C = c[k], { additionalKeyRange: P, additionalValueRange: j } = Un(C);
3848
+ return Wt(A, e, Kn, P, j);
3849
+ }
3850
+ }), y = n[0], w = ke(n);
3851
+ return hs(e.transformRange({ origStart: y.origOffset, origEnd: w.origOffset + 1 }), e.transformContent(t), g);
3852
+ }
3853
+ function ys(t, e, n) {
3854
+ return { ...ue("mapping", t), ...qe(), ...e, children: n };
3855
+ }
3856
+ function vs(t, e, n) {
3857
+ return { ...ue("mappingItem", t), ...qe(), children: [e, n] };
3858
+ }
3859
+ function Es(t, e) {
3860
+ let n = t.cstNode;
3861
+ n.items.filter((w) => w.type === "MAP_KEY" || w.type === "MAP_VALUE").forEach((w) => Dt(w, e));
3862
+ let c = ut(n.items, e), g = Ss(c), y = t.items.map((w, A) => {
3863
+ let k = g[A], [C, P] = k[0].type === "MAP_VALUE" ? [null, k[0].range] : [k[0].range, k.length === 1 ? null : k[1].range];
3864
+ return Wt(w, e, vs, C, P);
3865
+ });
3866
+ return ys($e(y[0].position.start, ke(y).position.end), e.transformContent(t), y);
3867
+ }
3868
+ function Ss(t) {
3869
+ let e = [], n = Vn(t, 0), c = !1;
3870
+ for (let g = 0; g < t.length; g++) {
3871
+ if (t[g].type === "MAP_VALUE") {
3872
+ e.push(n(g + 1)), c = !1;
3873
+ continue;
3874
+ }
3875
+ c && e.push(n(g)), c = !0;
3876
+ }
3877
+ return c && e.push(n(1 / 0)), e;
3878
+ }
3879
+ function ws(t, e, n) {
3880
+ return { ...ue("plain", t), ..._e(), ...e, value: n };
3881
+ }
3882
+ function bs(t, e, n) {
3883
+ for (let c = e; c >= 0; c--) if (n.test(t[c])) return c;
3884
+ return -1;
3885
+ }
3886
+ function Os(t, e) {
3887
+ let n = t.cstNode;
3888
+ return ws(e.transformRange({ origStart: n.valueRange.origStart, origEnd: bs(e.text, n.valueRange.origEnd - 1, /\S/) + 1 }), e.transformContent(t), n.strValue);
3889
+ }
3890
+ function Ns(t) {
3891
+ return { ...t, type: "quoteDouble" };
3892
+ }
3893
+ function Ls(t, e, n) {
3894
+ return { ...ue("quoteValue", t), ...e, ..._e(), value: n };
3895
+ }
3896
+ function Jn(t, e) {
3897
+ let n = t.cstNode;
3898
+ return Ls(e.transformRange(n.valueRange), e.transformContent(t), n.strValue);
3899
+ }
3900
+ function As(t, e) {
3901
+ return Ns(Jn(t, e));
3902
+ }
3903
+ function Ms(t) {
3904
+ return { ...t, type: "quoteSingle" };
3905
+ }
3906
+ function Ts(t, e) {
3907
+ return Ms(Jn(t, e));
3908
+ }
3909
+ function xs(t, e, n) {
3910
+ return { ...ue("sequence", t), ...qe(), ...Ye(), ...e, children: n };
3911
+ }
3912
+ function ks(t, e) {
3913
+ return { ...ue("sequenceItem", t), ..._e(), ...Ye(), children: e ? [e] : [] };
3914
+ }
3915
+ function Cs(t, e) {
3916
+ let n = ut(t.cstNode.items, e).map((c, g) => {
3917
+ Dt(c, e);
3918
+ let y = e.transformNode(t.items[g]);
3919
+ return ks($e(e.transformOffset(c.valueRange.origStart), y === null ? e.transformOffset(c.valueRange.origStart + 1) : y.position.end), y);
3920
+ });
3921
+ return xs($e(n[0].position.start, ke(n).position.end), e.transformContent(t), n);
3922
+ }
3923
+ function Is(t, e) {
3924
+ if (t === null || t.type === void 0 && t.value === null) return null;
3925
+ switch (t.type) {
3926
+ case "ALIAS":
3927
+ return Qi(t, e);
3928
+ case "BLOCK_FOLDED":
3929
+ return Hi(t, e);
3930
+ case "BLOCK_LITERAL":
3931
+ return Xi(t, e);
3932
+ case "COMMENT":
3933
+ return Zi(t, e);
3934
+ case "DIRECTIVE":
3935
+ return ts(t, e);
3936
+ case "DOCUMENT":
3937
+ return fs(t, e);
3938
+ case "FLOW_MAP":
3939
+ return ds(t, e);
3940
+ case "FLOW_SEQ":
3941
+ return gs(t, e);
3942
+ case "MAP":
3943
+ return Es(t, e);
3944
+ case "PLAIN":
3945
+ return Os(t, e);
3946
+ case "QUOTE_DOUBLE":
3947
+ return As(t, e);
3948
+ case "QUOTE_SINGLE":
3949
+ return Ts(t, e);
3950
+ case "SEQ":
3951
+ return Cs(t, e);
3952
+ default:
3953
+ throw new Error(`Unexpected node type ${t.type}`);
3954
+ }
3955
+ }
3956
+ var gt, Pe, Fe, Ce, At, Mt, en, Ps = (en = class {
3957
+ constructor(t, e) {
3958
+ tt(this, Ce);
3959
+ Ue(this, "text");
3960
+ Ue(this, "comments", []);
3961
+ tt(this, Pe);
3962
+ tt(this, Fe);
3963
+ this.text = e, ft(this, Pe, t);
3964
+ }
3965
+ setOrigRanges() {
3966
+ if (!Be(this, Pe).setOrigRanges()) for (let t of Be(this, Pe)) t.setOrigRanges([], 0);
3967
+ }
3968
+ transformOffset(t) {
3969
+ return Ve(this, Ce, At).call(this, { origStart: t, origEnd: t }).start;
3970
+ }
3971
+ transformRange(t) {
3972
+ let { start: e, end: n } = Ve(this, Ce, At).call(this, t);
3973
+ return $e(e, n);
3974
+ }
3975
+ transformNode(t) {
3976
+ return Is(t, this);
3977
+ }
3978
+ transformContent(t) {
3979
+ return Wn(t, this);
3980
+ }
3981
+ }, Pe = new WeakMap(), Fe = new WeakMap(), Ce = new WeakSet(), At = function(t) {
3982
+ if (!gt) {
3983
+ let [y] = Be(this, Pe), w = Object.getPrototypeOf(Object.getPrototypeOf(y));
3984
+ gt = Object.getOwnPropertyDescriptor(w, "rangeAsLinePos").get;
3985
+ }
3986
+ if (Be(this, Fe) ?? ft(this, Fe, { root: { context: { src: this.text } } }), this.text === "" && t.origStart === 0 && t.origEnd === 0) return { start: { offset: 0, line: 1, column: 1 }, end: { offset: 0, line: 1, column: 1 } };
3987
+ let { start: { line: e, col: n }, end: { line: c, col: g } } = gt.call({ range: { start: Ve(this, Ce, Mt).call(this, t.origStart), end: Ve(this, Ce, Mt).call(this, t.origEnd) }, context: Be(this, Fe) });
3988
+ return { start: { offset: t.origStart, line: e, column: n }, end: { offset: t.origEnd, line: c, column: g } };
3989
+ }, Mt = function(t) {
3990
+ return t < 0 ? 0 : t > this.text.length ? this.text.length : t;
3991
+ }, en), $s = Ps;
3992
+ function Rs(t, e, n) {
3993
+ let c = new SyntaxError(t);
3994
+ return c.name = "YAMLSyntaxError", c.source = e, c.position = n, c;
3995
+ }
3996
+ function _s(t, e) {
3997
+ let n = t.source.range || t.source.valueRange;
3998
+ return Rs(t.message, e.text, e.transformRange(n));
3999
+ }
4000
+ function Gn(t) {
4001
+ if ("children" in t) {
4002
+ if (t.children.length === 1) {
4003
+ let e = t.children[0];
4004
+ if (e.type === "plain" && e.tag === null && e.anchor === null && e.value === "") return t.children.splice(0, 1), t;
4005
+ }
4006
+ t.children.forEach(Gn);
4007
+ }
4008
+ return t;
4009
+ }
4010
+ function Zt(t, e, n, c) {
4011
+ let g = e(t);
4012
+ return (y) => {
4013
+ c(g, y) && n(t, g = y);
4014
+ };
4015
+ }
4016
+ function Hn(t) {
4017
+ if (t === null || !("children" in t)) return;
4018
+ let e = t.children;
4019
+ if (e.forEach(Hn), t.type === "document") {
4020
+ let [y, w] = t.children;
4021
+ y.position.start.offset === y.position.end.offset ? y.position.start = y.position.end = w.position.start : w.position.start.offset === w.position.end.offset && (w.position.start = w.position.end = y.position.end);
4022
+ }
4023
+ let n = Zt(t.position, Ys, Bs, Fs), c = Zt(t.position, Ds, Ws, js);
4024
+ "endComments" in t && t.endComments.length !== 0 && (n(t.endComments[0].position.start), c(ke(t.endComments).position.end));
4025
+ let g = e.filter((y) => y !== null);
4026
+ if (g.length !== 0) {
4027
+ let y = g[0], w = ke(g);
4028
+ n(y.position.start), c(w.position.end), "leadingComments" in y && y.leadingComments.length !== 0 && n(y.leadingComments[0].position.start), "tag" in y && y.tag && n(y.tag.position.start), "anchor" in y && y.anchor && n(y.anchor.position.start), "trailingComment" in w && w.trailingComment && c(w.trailingComment.position.end);
4029
+ }
4030
+ }
4031
+ function Ys(t) {
4032
+ return t.start;
4033
+ }
4034
+ function Bs(t, e) {
4035
+ t.start = e;
4036
+ }
4037
+ function Ds(t) {
4038
+ return t.end;
4039
+ }
4040
+ function Ws(t, e) {
4041
+ t.end = e;
4042
+ }
4043
+ function Fs(t, e) {
4044
+ return e.offset < t.offset;
4045
+ }
4046
+ function js(t, e) {
4047
+ return e.offset > t.offset;
4048
+ }
4049
+ function qs(t) {
4050
+ let e = Gt.default.parseCST(t), n = new $s(e, t);
4051
+ n.setOrigRanges();
4052
+ let c = e.map((y) => new Gt.default.Document({ merge: !1, keepCstNodes: !0 }).parse(y));
4053
+ for (let y of c) for (let w of y.errors) if (!(w instanceof Yi && w.message === 'Map keys must be unique; "<<" is repeated')) throw _s(w, n);
4054
+ c.forEach((y) => rt(y.cstNode));
4055
+ let g = ji(n.transformRange({ origStart: 0, origEnd: t.length }), c.map((y) => n.transformNode(y)), n.comments);
4056
+ return Bi(g), Hn(g), Gn(g), g;
4057
+ }
4058
+ function Ks(t, e) {
4059
+ let n = new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")");
4060
+ return Object.assign(n, e);
4061
+ }
4062
+ var Us = Ks;
4063
+ function Vs(t) {
4064
+ try {
4065
+ let e = qs(t);
4066
+ return delete e.comments, e;
4067
+ } catch (e) {
4068
+ throw e != null && e.position ? Us(e.message, { loc: e.position, cause: e }) : e;
4069
+ }
4070
+ }
4071
+ var Qs = { astFormat: "yaml", parse: Vs, hasPragma: Xr, hasIgnorePragma: Zr, locStart: Yt, locEnd: ci }, Js = { yaml: Pi }, Gs = xt(hn()), Hs = Gs.default.parse;
4072
+ export {
4073
+ Hs as __parsePrettierYamlConfig,
4074
+ br as default,
4075
+ $i as languages,
4076
+ _i as options,
4077
+ Yn as parsers,
4078
+ Js as printers
4079
+ };