@moldea.ai/cli 14.0.0 → 14.0.2

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 (38) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{composition-_3bygS_a.js → composition-BzwNJ346.js} +2 -2
  3. package/dist/chunks/{composition-_3bygS_a.js.map → composition-BzwNJ346.js.map} +1 -1
  4. package/dist/chunks/{composition-D1OYuZ5d.js → composition-aJXeA6un.js} +1 -1
  5. package/dist/chunks/{core-composition-BKcJ--NX.js → core-composition-CzdeqYS9.js} +2 -2
  6. package/dist/chunks/{core-composition-BKcJ--NX.js.map → core-composition-CzdeqYS9.js.map} +1 -1
  7. package/dist/moldea.js +3 -3
  8. package/dist/portable/SHA256SUMS +16 -16
  9. package/dist/portable/analysis-worker.mjs +110 -133
  10. package/dist/portable/chunk-1b3c5f05.mjs +1837 -0
  11. package/dist/portable/chunk-24ea7c23.mjs +328 -0
  12. package/dist/portable/chunk-2cc3bf5c.mjs +399 -0
  13. package/dist/portable/chunk-2e9d4c63.mjs +95 -0
  14. package/dist/portable/chunk-8a1dadf9.mjs +2 -0
  15. package/dist/portable/chunk-8f198616.mjs +4414 -0
  16. package/dist/portable/chunk-936e5d09.mjs +112519 -0
  17. package/dist/portable/chunk-98d84174.mjs +422 -0
  18. package/dist/portable/chunk-a6007228.mjs +302 -0
  19. package/dist/portable/chunk-b1f86976.mjs +2 -0
  20. package/dist/portable/chunk-cea1378f.mjs +50 -0
  21. package/dist/portable/chunk-d372f5e0.mjs +3120 -0
  22. package/dist/portable/chunk-d6656fa6.mjs +14 -0
  23. package/dist/portable/moldea.mjs +1997 -2870
  24. package/dist/portable/node-runner.mjs +77 -106
  25. package/package.json +2 -2
  26. package/dist/portable/chunk-131f8005.mjs +0 -115
  27. package/dist/portable/chunk-2ba7e89e.mjs +0 -26
  28. package/dist/portable/chunk-459da9cf.mjs +0 -4138
  29. package/dist/portable/chunk-728df961.mjs +0 -544
  30. package/dist/portable/chunk-8d6114d2.mjs +0 -588
  31. package/dist/portable/chunk-90403e67.mjs +0 -2
  32. package/dist/portable/chunk-94b5ac22.mjs +0 -59
  33. package/dist/portable/chunk-a5514957.mjs +0 -5870
  34. package/dist/portable/chunk-b98ca669.mjs +0 -2
  35. package/dist/portable/chunk-c13db66a.mjs +0 -380
  36. package/dist/portable/chunk-d5af3eda.mjs +0 -2926
  37. package/dist/portable/chunk-ec3f49d3.mjs +0 -367
  38. package/dist/portable/chunk-fcbcf4e3.mjs +0 -147458
@@ -0,0 +1,4414 @@
1
+ import { c as e, n as t, o as n, t as r, u as i } from "./chunk-2cc3bf5c.mjs";
2
+ //#region ../../node_modules/.pnpm/jg-utilities@1.7.2/node_modules/jg-utilities/dist/transformers/string.js
3
+ var a = (t, n) => {
4
+ n !== void 0 && e(n);
5
+ let r = n ?? Infinity, i = 0;
6
+ for (let e = 0; e < t.length && i <= r; e += 1) {
7
+ let n = t.charCodeAt(e);
8
+ n < 128 ? i += 1 : n < 2048 ? i += 2 : n >= 55296 && n <= 56319 && (t.charCodeAt(e + 1) & 64512) == 56320 ? (i += 4, e += 1) : i += 3;
9
+ }
10
+ return i;
11
+ }, o = (e, t) => {
12
+ let n = 0;
13
+ for (; n < e.length && n < t.length;) {
14
+ let r = e.codePointAt(n), i = t.codePointAt(n);
15
+ if (r !== i) return r < i ? -1 : 1;
16
+ n += r > 65535 ? 2 : 1;
17
+ }
18
+ return Math.sign(e.length - t.length);
19
+ }, s = (e) => {
20
+ let t = new WeakSet(), n = [e];
21
+ for (; n.length > 0;) {
22
+ let e = n.pop();
23
+ if (!(typeof e != "object" || !e || t.has(e)) && (t.add(e), !ArrayBuffer.isView(e))) {
24
+ for (let t of Reflect.ownKeys(e)) {
25
+ let r = Reflect.getOwnPropertyDescriptor(e, t);
26
+ r !== void 0 && "value" in r && n.push(r.value);
27
+ }
28
+ Object.freeze(e);
29
+ }
30
+ }
31
+ return e;
32
+ }, c = (t, { maxBytes: r, measurePage: i }) => {
33
+ e(r);
34
+ let a = [], o = 2;
35
+ for (let e of t) if (o += (a.length === 0 ? 0 : 1) + n(e, r), a.push(e), o > r || i(a, o) > r) {
36
+ a.pop();
37
+ break;
38
+ }
39
+ return a;
40
+ }, l = Symbol.for("yaml.alias"), u = Symbol.for("yaml.document"), d = Symbol.for("yaml.map"), f = Symbol.for("yaml.pair"), p = Symbol.for("yaml.scalar"), m = Symbol.for("yaml.seq"), h = Symbol.for("yaml.node.type"), g = (e) => !!e && typeof e == "object" && e[h] === l, _ = (e) => !!e && typeof e == "object" && e[h] === u, v = (e) => !!e && typeof e == "object" && e[h] === d, y = (e) => !!e && typeof e == "object" && e[h] === f, b = (e) => !!e && typeof e == "object" && e[h] === p, x = (e) => !!e && typeof e == "object" && e[h] === m;
41
+ function S(e) {
42
+ if (e && typeof e == "object") switch (e[h]) {
43
+ case d:
44
+ case m: return !0;
45
+ }
46
+ return !1;
47
+ }
48
+ function C(e) {
49
+ if (e && typeof e == "object") switch (e[h]) {
50
+ case l:
51
+ case d:
52
+ case p:
53
+ case m: return !0;
54
+ }
55
+ return !1;
56
+ }
57
+ var ee = (e) => (b(e) || S(e)) && !!e.anchor, w = Symbol("break visit"), T = Symbol("skip children"), te = Symbol("remove node");
58
+ function E(e, t) {
59
+ let n = ne(t);
60
+ _(e) ? D(null, e.contents, n, Object.freeze([e])) === te && (e.contents = null) : D(null, e, n, Object.freeze([]));
61
+ }
62
+ E.BREAK = w, E.SKIP = T, E.REMOVE = te;
63
+ function D(e, t, n, r) {
64
+ let i = re(e, t, n, r);
65
+ if (C(i) || y(i)) return ie(e, r, i), D(e, i, n, r);
66
+ if (typeof i != "symbol") {
67
+ if (S(t)) {
68
+ r = Object.freeze(r.concat(t));
69
+ for (let e = 0; e < t.items.length; ++e) {
70
+ let i = D(e, t.items[e], n, r);
71
+ if (typeof i == "number") e = i - 1;
72
+ else if (i === w) return w;
73
+ else i === te && (t.items.splice(e, 1), --e);
74
+ }
75
+ } else if (y(t)) {
76
+ r = Object.freeze(r.concat(t));
77
+ let e = D("key", t.key, n, r);
78
+ if (e === w) return w;
79
+ e === te && (t.key = null);
80
+ let i = D("value", t.value, n, r);
81
+ if (i === w) return w;
82
+ i === te && (t.value = null);
83
+ }
84
+ }
85
+ return i;
86
+ }
87
+ function ne(e) {
88
+ return typeof e == "object" && (e.Collection || e.Node || e.Value) ? Object.assign({
89
+ Alias: e.Node,
90
+ Map: e.Node,
91
+ Scalar: e.Node,
92
+ Seq: e.Node
93
+ }, e.Value && {
94
+ Map: e.Value,
95
+ Scalar: e.Value,
96
+ Seq: e.Value
97
+ }, e.Collection && {
98
+ Map: e.Collection,
99
+ Seq: e.Collection
100
+ }, e) : e;
101
+ }
102
+ function re(e, t, n, r) {
103
+ if (typeof n == "function") return n(e, t, r);
104
+ if (v(t)) return n.Map?.(e, t, r);
105
+ if (x(t)) return n.Seq?.(e, t, r);
106
+ if (y(t)) return n.Pair?.(e, t, r);
107
+ if (b(t)) return n.Scalar?.(e, t, r);
108
+ if (g(t)) return n.Alias?.(e, t, r);
109
+ }
110
+ function ie(e, t, n) {
111
+ let r = t[t.length - 1];
112
+ if (S(r)) r.items[e] = n;
113
+ else if (y(r)) e === "key" ? r.key = n : r.value = n;
114
+ else if (_(r)) r.contents = n;
115
+ else {
116
+ let e = g(r) ? "alias" : "scalar";
117
+ throw Error(`Cannot replace node with ${e} parent`);
118
+ }
119
+ }
120
+ //#endregion
121
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js
122
+ var ae = {
123
+ "!": "%21",
124
+ ",": "%2C",
125
+ "[": "%5B",
126
+ "]": "%5D",
127
+ "{": "%7B",
128
+ "}": "%7D"
129
+ }, oe = (e) => e.replace(/[!,[\]{}]/g, (e) => ae[e]), O = class e {
130
+ constructor(t, n) {
131
+ this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, e.defaultYaml, t), this.tags = Object.assign({}, e.defaultTags, n);
132
+ }
133
+ clone() {
134
+ let t = new e(this.yaml, this.tags);
135
+ return t.docStart = this.docStart, t;
136
+ }
137
+ atDocument() {
138
+ let t = new e(this.yaml, this.tags);
139
+ switch (this.yaml.version) {
140
+ case "1.1":
141
+ this.atNextDocument = !0;
142
+ break;
143
+ case "1.2": this.atNextDocument = !1, this.yaml = {
144
+ explicit: e.defaultYaml.explicit,
145
+ version: "1.2"
146
+ }, this.tags = Object.assign({}, e.defaultTags);
147
+ }
148
+ return t;
149
+ }
150
+ add(t, n) {
151
+ this.atNextDocument &&= (this.yaml = {
152
+ explicit: e.defaultYaml.explicit,
153
+ version: "1.1"
154
+ }, this.tags = Object.assign({}, e.defaultTags), !1);
155
+ let r = t.trim().split(/[ \t]+/), i = r.shift();
156
+ switch (i) {
157
+ case "%TAG": {
158
+ if (r.length !== 2 && (n(0, "%TAG directive should contain exactly two parts"), r.length < 2)) return !1;
159
+ let [e, t] = r;
160
+ return this.tags[e] = t, !0;
161
+ }
162
+ case "%YAML": {
163
+ if (this.yaml.explicit = !0, r.length !== 1) return n(0, "%YAML directive should contain exactly one part"), !1;
164
+ let [e] = r;
165
+ if (e === "1.1" || e === "1.2") return this.yaml.version = e, !0;
166
+ {
167
+ let t = /^\d+\.\d+$/.test(e);
168
+ return n(6, `Unsupported YAML version ${e}`, t), !1;
169
+ }
170
+ }
171
+ default: return n(0, `Unknown directive ${i}`, !0), !1;
172
+ }
173
+ }
174
+ tagName(e, t) {
175
+ if (e === "!") return "!";
176
+ if (e[0] !== "!") return t(`Not a valid tag: ${e}`), null;
177
+ if (e[1] === "<") {
178
+ let n = e.slice(2, -1);
179
+ return n === "!" || n === "!!" ? (t(`Verbatim tags aren't resolved, so ${e} is invalid.`), null) : (e[e.length - 1] !== ">" && t("Verbatim tags must end with a >"), n);
180
+ }
181
+ let [, n, r] = e.match(/^(.*!)([^!]*)$/s);
182
+ r || t(`The ${e} tag has no suffix`);
183
+ let i = this.tags[n];
184
+ if (i) try {
185
+ return i + decodeURIComponent(r);
186
+ } catch (e) {
187
+ return t(String(e)), null;
188
+ }
189
+ return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
190
+ }
191
+ tagString(e) {
192
+ for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + oe(e.substring(n.length));
193
+ return e[0] === "!" ? e : `!<${e}>`;
194
+ }
195
+ toString(e) {
196
+ let t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags), r;
197
+ if (e && n.length > 0 && C(e.contents)) {
198
+ let t = {};
199
+ E(e.contents, (e, n) => {
200
+ C(n) && n.tag && (t[n.tag] = !0);
201
+ }), r = Object.keys(t);
202
+ } else r = [];
203
+ for (let [i, a] of n) (i !== "!!" || a !== "tag:yaml.org,2002:") && (!e || r.some((e) => e.startsWith(a))) && t.push(`%TAG ${i} ${a}`);
204
+ return t.join("\n");
205
+ }
206
+ };
207
+ O.defaultYaml = {
208
+ explicit: !1,
209
+ version: "1.2"
210
+ }, O.defaultTags = { "!!": "tag:yaml.org,2002:" };
211
+ //#endregion
212
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js
213
+ function se(e) {
214
+ if (/[\x00-\x19\s,[\]{}]/.test(e)) {
215
+ let t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
216
+ throw Error(t);
217
+ }
218
+ return !0;
219
+ }
220
+ function ce(e) {
221
+ let t = new Set();
222
+ return E(e, { Value(e, n) {
223
+ n.anchor && t.add(n.anchor);
224
+ } }), t;
225
+ }
226
+ function le(e, t) {
227
+ for (let n = 1;; ++n) {
228
+ let r = `${e}${n}`;
229
+ if (!t.has(r)) return r;
230
+ }
231
+ }
232
+ function ue(e, t) {
233
+ let n = [], r = new Map(), i = null;
234
+ return {
235
+ onAnchor: (r) => {
236
+ n.push(r), i ??= ce(e);
237
+ let a = le(t, i);
238
+ return i.add(a), a;
239
+ },
240
+ setAnchors: () => {
241
+ for (let e of n) {
242
+ let t = r.get(e);
243
+ if (typeof t == "object" && t.anchor && (b(t.node) || S(t.node))) t.node.anchor = t.anchor;
244
+ else {
245
+ let t = Error("Failed to resolve repeated object (this should not happen)");
246
+ throw t.source = e, t;
247
+ }
248
+ }
249
+ },
250
+ sourceObjects: r
251
+ };
252
+ }
253
+ //#endregion
254
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js
255
+ function k(e, t, n, r) {
256
+ if (r && typeof r == "object") {
257
+ if (Array.isArray(r)) for (let t = 0, n = r.length; t < n; ++t) {
258
+ let n = r[t], i = k(e, r, String(t), n);
259
+ i === void 0 ? delete r[t] : i !== n && (r[t] = i);
260
+ }
261
+ else if (r instanceof Map) for (let t of Array.from(r.keys())) {
262
+ let n = r.get(t), i = k(e, r, t, n);
263
+ i === void 0 ? r.delete(t) : i !== n && r.set(t, i);
264
+ }
265
+ else if (r instanceof Set) for (let t of Array.from(r)) {
266
+ let n = k(e, r, t, t);
267
+ n === void 0 ? r.delete(t) : n !== t && (r.delete(t), r.add(n));
268
+ }
269
+ else for (let [t, n] of Object.entries(r)) {
270
+ let i = k(e, r, t, n);
271
+ i === void 0 ? delete r[t] : i !== n && (r[t] = i);
272
+ }
273
+ }
274
+ return e.call(t, n, r);
275
+ }
276
+ //#endregion
277
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js
278
+ function A(e, t, n) {
279
+ if (Array.isArray(e)) return e.map((e, t) => A(e, String(t), n));
280
+ if (e && typeof e.toJSON == "function") {
281
+ if (!n || !ee(e)) return e.toJSON(t, n);
282
+ let r = {
283
+ aliasCount: 0,
284
+ count: 1,
285
+ res: void 0
286
+ };
287
+ n.anchors.set(e, r), n.onCreate = (e) => {
288
+ r.res = e, delete n.onCreate;
289
+ };
290
+ let i = e.toJSON(t, n);
291
+ return n.onCreate && n.onCreate(i), i;
292
+ }
293
+ return typeof e == "bigint" && !n?.keep ? Number(e) : e;
294
+ }
295
+ //#endregion
296
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js
297
+ var de = class {
298
+ constructor(e) {
299
+ Object.defineProperty(this, h, { value: e });
300
+ }
301
+ clone() {
302
+ let e = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
303
+ return this.range && (e.range = this.range.slice()), e;
304
+ }
305
+ toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: r, reviver: i } = {}) {
306
+ if (!_(e)) throw TypeError("A document argument is required");
307
+ let a = {
308
+ anchors: new Map(),
309
+ doc: e,
310
+ keep: !0,
311
+ mapAsMap: t === !0,
312
+ mapKeyWarned: !1,
313
+ maxAliasCount: typeof n == "number" ? n : 100
314
+ }, o = A(this, "", a);
315
+ if (typeof r == "function") for (let { count: e, res: t } of a.anchors.values()) r(t, e);
316
+ return typeof i == "function" ? k(i, { "": o }, "", o) : o;
317
+ }
318
+ }, fe = class extends de {
319
+ constructor(e) {
320
+ super(l), this.source = e, Object.defineProperty(this, "tag", { set() {
321
+ throw Error("Alias nodes cannot have tags");
322
+ } });
323
+ }
324
+ resolve(e, t) {
325
+ if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
326
+ let n;
327
+ t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], E(e, { Node: (e, t) => {
328
+ (g(t) || ee(t)) && n.push(t);
329
+ } }), t && (t.aliasResolveCache = n));
330
+ let r;
331
+ for (let e of n) {
332
+ if (e === this) break;
333
+ e.anchor === this.source && (r = e);
334
+ }
335
+ return r;
336
+ }
337
+ toJSON(e, t) {
338
+ if (!t) return { source: this.source };
339
+ let { anchors: n, doc: r, maxAliasCount: i } = t, a = this.resolve(r, t);
340
+ if (!a) {
341
+ let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
342
+ throw ReferenceError(e);
343
+ }
344
+ let o = n.get(a);
345
+ if (o ||= (A(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
346
+ if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = pe(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
347
+ return o.res;
348
+ }
349
+ toString(e, t, n) {
350
+ let r = `*${this.source}`;
351
+ if (e) {
352
+ if (se(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
353
+ let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
354
+ throw Error(e);
355
+ }
356
+ if (e.implicitKey) return `${r} `;
357
+ }
358
+ return r;
359
+ }
360
+ };
361
+ function pe(e, t, n) {
362
+ if (g(t)) {
363
+ let r = t.resolve(e), i = n && r && n.get(r);
364
+ return i ? i.count * i.aliasCount : 0;
365
+ }
366
+ if (S(t)) {
367
+ let r = 0;
368
+ for (let i of t.items) {
369
+ let t = pe(e, i, n);
370
+ t > r && (r = t);
371
+ }
372
+ return r;
373
+ }
374
+ if (y(t)) {
375
+ let r = pe(e, t.key, n), i = pe(e, t.value, n);
376
+ return Math.max(r, i);
377
+ }
378
+ return 1;
379
+ }
380
+ //#endregion
381
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js
382
+ var me = (e) => !e || typeof e != "function" && typeof e != "object", j = class extends de {
383
+ constructor(e) {
384
+ super(p), this.value = e;
385
+ }
386
+ toJSON(e, t) {
387
+ return t?.keep ? this.value : A(this.value, e, t);
388
+ }
389
+ toString() {
390
+ return String(this.value);
391
+ }
392
+ };
393
+ j.BLOCK_FOLDED = "BLOCK_FOLDED", j.BLOCK_LITERAL = "BLOCK_LITERAL", j.PLAIN = "PLAIN", j.QUOTE_DOUBLE = "QUOTE_DOUBLE", j.QUOTE_SINGLE = "QUOTE_SINGLE";
394
+ //#endregion
395
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js
396
+ var he = "tag:yaml.org,2002:";
397
+ function ge(e, t, n) {
398
+ if (t) {
399
+ let e = n.filter((e) => e.tag === t), r = e.find((e) => !e.format) ?? e[0];
400
+ if (!r) throw Error(`Tag ${t} not found`);
401
+ return r;
402
+ }
403
+ return n.find((t) => t.identify?.(e) && !t.format);
404
+ }
405
+ function _e(e, t, n) {
406
+ if (_(e) && (e = e.contents), C(e)) return e;
407
+ if (y(e)) {
408
+ let t = n.schema[d].createNode?.(n.schema, null, n);
409
+ return t.items.push(e), t;
410
+ }
411
+ (e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
412
+ let { aliasDuplicateObjects: r, onAnchor: i, onTagObj: a, schema: o, sourceObjects: s } = n, c;
413
+ if (r && e && typeof e == "object") {
414
+ if (c = s.get(e), c) return c.anchor ?? (c.anchor = i(e)), new fe(c.anchor);
415
+ c = {
416
+ anchor: null,
417
+ node: null
418
+ }, s.set(e, c);
419
+ }
420
+ t?.startsWith("!!") && (t = he + t.slice(2));
421
+ let l = ge(e, t, o.tags);
422
+ if (!l) {
423
+ if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
424
+ let t = new j(e);
425
+ return c && (c.node = t), t;
426
+ }
427
+ l = e instanceof Map ? o[d] : Symbol.iterator in Object(e) ? o[m] : o[d];
428
+ }
429
+ a && (a(l), delete n.onTagObj);
430
+ let u = l?.createNode ? l.createNode(n.schema, e, n) : typeof l?.nodeClass?.from == "function" ? l.nodeClass.from(n.schema, e, n) : new j(e);
431
+ return t ? u.tag = t : l.default || (u.tag = l.tag), c && (c.node = u), u;
432
+ }
433
+ //#endregion
434
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js
435
+ function ve(e, t, n) {
436
+ let r = n;
437
+ for (let e = t.length - 1; e >= 0; --e) {
438
+ let n = t[e];
439
+ if (typeof n == "number" && Number.isInteger(n) && n >= 0) {
440
+ let e = [];
441
+ e[n] = r, r = e;
442
+ } else r = new Map([[n, r]]);
443
+ }
444
+ return _e(r, void 0, {
445
+ aliasDuplicateObjects: !1,
446
+ keepUndefined: !1,
447
+ onAnchor: () => {
448
+ throw Error("This should not happen, please report a bug.");
449
+ },
450
+ schema: e,
451
+ sourceObjects: new Map()
452
+ });
453
+ }
454
+ var ye = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, be = class extends de {
455
+ constructor(e, t) {
456
+ super(e), Object.defineProperty(this, "schema", {
457
+ value: t,
458
+ configurable: !0,
459
+ enumerable: !1,
460
+ writable: !0
461
+ });
462
+ }
463
+ clone(e) {
464
+ let t = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
465
+ return e && (t.schema = e), t.items = t.items.map((t) => C(t) || y(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
466
+ }
467
+ addIn(e, t) {
468
+ if (ye(e)) this.add(t);
469
+ else {
470
+ let [n, ...r] = e, i = this.get(n, !0);
471
+ if (S(i)) i.addIn(r, t);
472
+ else if (i === void 0 && this.schema) this.set(n, ve(this.schema, r, t));
473
+ else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
474
+ }
475
+ }
476
+ deleteIn(e) {
477
+ let [t, ...n] = e;
478
+ if (n.length === 0) return this.delete(t);
479
+ let r = this.get(t, !0);
480
+ if (S(r)) return r.deleteIn(n);
481
+ throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`);
482
+ }
483
+ getIn(e, t) {
484
+ let [n, ...r] = e, i = this.get(n, !0);
485
+ return r.length === 0 ? !t && b(i) ? i.value : i : S(i) ? i.getIn(r, t) : void 0;
486
+ }
487
+ hasAllNullValues(e) {
488
+ return this.items.every((t) => {
489
+ if (!y(t)) return !1;
490
+ let n = t.value;
491
+ return n == null || e && b(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
492
+ });
493
+ }
494
+ hasIn(e) {
495
+ let [t, ...n] = e;
496
+ if (n.length === 0) return this.has(t);
497
+ let r = this.get(t, !0);
498
+ return S(r) ? r.hasIn(n) : !1;
499
+ }
500
+ setIn(e, t) {
501
+ let [n, ...r] = e;
502
+ if (r.length === 0) this.set(n, t);
503
+ else {
504
+ let e = this.get(n, !0);
505
+ if (S(e)) e.setIn(r, t);
506
+ else if (e === void 0 && this.schema) this.set(n, ve(this.schema, r, t));
507
+ else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
508
+ }
509
+ }
510
+ }, xe = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
511
+ function M(e, t) {
512
+ return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
513
+ }
514
+ var N = (e, t, n) => e.endsWith("\n") ? M(n, t) : n.includes("\n") ? "\n" + M(n, t) : (e.endsWith(" ") ? "" : " ") + n, Se = "flow", Ce = "block", we = "quoted";
515
+ function Te(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
516
+ if (!i || i < 0) return e;
517
+ i < a && (a = 0);
518
+ let c = Math.max(1 + a, 1 + i - t.length);
519
+ if (e.length <= c) return e;
520
+ let l = [], u = {}, d = i - t.length;
521
+ typeof r == "number" && (r > i - Math.max(2, a) ? l.push(0) : d = i - r);
522
+ let f, p, m = !1, h = -1, g = -1, _ = -1;
523
+ n === "block" && (h = Ee(e, h, t.length), h !== -1 && (d = h + c));
524
+ for (let r; r = e[h += 1];) {
525
+ if (n === "quoted" && r === "\\") {
526
+ switch (g = h, e[h + 1]) {
527
+ case "x":
528
+ h += 3;
529
+ break;
530
+ case "u":
531
+ h += 5;
532
+ break;
533
+ case "U":
534
+ h += 9;
535
+ break;
536
+ default: h += 1;
537
+ }
538
+ _ = h;
539
+ }
540
+ if (r === "\n") n === "block" && (h = Ee(e, h, t.length)), d = h + t.length + c, f = void 0;
541
+ else {
542
+ if (r === " " && p && p !== " " && p !== "\n" && p !== " ") {
543
+ let t = e[h + 1];
544
+ t && t !== " " && t !== "\n" && t !== " " && (f = h);
545
+ }
546
+ if (h >= d) {
547
+ if (f) l.push(f), d = f + c, f = void 0;
548
+ else if (n === "quoted") {
549
+ for (; p === " " || p === " ";) p = r, r = e[h += 1], m = !0;
550
+ let t = h > _ + 1 ? h - 2 : g - 1;
551
+ if (u[t]) return e;
552
+ l.push(t), u[t] = !0, d = t + c, f = void 0;
553
+ } else m = !0;
554
+ }
555
+ }
556
+ p = r;
557
+ }
558
+ if (m && s && s(), l.length === 0) return e;
559
+ o && o();
560
+ let v = e.slice(0, l[0]);
561
+ for (let r = 0; r < l.length; ++r) {
562
+ let i = l[r], a = l[r + 1] || e.length;
563
+ i === 0 ? v = `\n${t}${e.slice(0, a)}` : (n === "quoted" && u[i] && (v += `${e[i]}\\`), v += `\n${t}${e.slice(i + 1, a)}`);
564
+ }
565
+ return v;
566
+ }
567
+ function Ee(e, t, n) {
568
+ let r = t, i = t + 1, a = e[i];
569
+ for (; a === " " || a === " ";) if (t < i + n) a = e[++t];
570
+ else {
571
+ do
572
+ a = e[++t];
573
+ while (a && a !== "\n");
574
+ r = t, i = t + 1, a = e[i];
575
+ }
576
+ return r;
577
+ }
578
+ //#endregion
579
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js
580
+ var De = (e, t) => ({
581
+ indentAtStart: t ? e.indent.length : e.indentAtStart,
582
+ lineWidth: e.options.lineWidth,
583
+ minContentWidth: e.options.minContentWidth
584
+ }), Oe = (e) => /^(%|---|\.\.\.)/m.test(e);
585
+ function ke(e, t, n) {
586
+ if (!t || t < 0) return !1;
587
+ let r = t - n, i = e.length;
588
+ if (i <= r) return !1;
589
+ for (let t = 0, n = 0; t < i; ++t) if (e[t] === "\n") {
590
+ if (t - n > r) return !0;
591
+ if (n = t + 1, i - n <= r) return !1;
592
+ }
593
+ return !0;
594
+ }
595
+ function P(e, t) {
596
+ let n = JSON.stringify(e);
597
+ if (t.options.doubleQuotedAsJSON) return n;
598
+ let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (Oe(e) ? " " : ""), o = "", s = 0;
599
+ for (let e = 0, t = n[e]; t; t = n[++e]) if (t === " " && n[e + 1] === "\\" && n[e + 2] === "n" && (o += n.slice(s, e) + "\\ ", e += 1, s = e, t = "\\"), t === "\\") switch (n[e + 1]) {
600
+ case "u":
601
+ {
602
+ o += n.slice(s, e);
603
+ let t = n.substr(e + 2, 4);
604
+ switch (t) {
605
+ case "0000":
606
+ o += "\\0";
607
+ break;
608
+ case "0007":
609
+ o += "\\a";
610
+ break;
611
+ case "000b":
612
+ o += "\\v";
613
+ break;
614
+ case "001b":
615
+ o += "\\e";
616
+ break;
617
+ case "0085":
618
+ o += "\\N";
619
+ break;
620
+ case "00a0":
621
+ o += "\\_";
622
+ break;
623
+ case "2028":
624
+ o += "\\L";
625
+ break;
626
+ case "2029":
627
+ o += "\\P";
628
+ break;
629
+ default: t.substr(0, 2) === "00" ? o += "\\x" + t.substr(2) : o += n.substr(e, 6);
630
+ }
631
+ e += 5, s = e + 1;
632
+ }
633
+ break;
634
+ case "n":
635
+ if (r || n[e + 2] === "\"" || n.length < i) e += 1;
636
+ else {
637
+ for (o += n.slice(s, e) + "\n\n"; n[e + 2] === "\\" && n[e + 3] === "n" && n[e + 4] !== "\"";) o += "\n", e += 2;
638
+ o += a, n[e + 2] === " " && (o += "\\"), e += 1, s = e + 1;
639
+ }
640
+ break;
641
+ default: e += 1;
642
+ }
643
+ return o = s ? o + n.slice(s) : n, r ? o : Te(o, a, we, De(t, !1));
644
+ }
645
+ function Ae(e, t) {
646
+ if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return P(e, t);
647
+ let n = t.indent || (Oe(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
648
+ return t.implicitKey ? r : Te(r, n, Se, De(t, !1));
649
+ }
650
+ function F(e, t) {
651
+ let { singleQuote: n } = t.options, r;
652
+ if (n === !1) r = P;
653
+ else {
654
+ let t = e.includes("\""), i = e.includes("'");
655
+ r = t && !i ? Ae : i && !t ? P : n ? Ae : P;
656
+ }
657
+ return r(e, t);
658
+ }
659
+ var je;
660
+ try {
661
+ je = RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
662
+ } catch {
663
+ je = /\n+(?!\n|$)/g;
664
+ }
665
+ function Me({ comment: e, type: t, value: n }, r, i, a) {
666
+ let { blockQuote: o, commentString: s, lineWidth: c } = r.options;
667
+ if (!o || /\n[\t ]+$/.test(n)) return F(n, r);
668
+ let l = r.indent || (r.forceBlockIndent || Oe(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === j.BLOCK_FOLDED ? !1 : t === j.BLOCK_LITERAL || !ke(n, c, l.length);
669
+ if (!n) return u ? "|\n" : ">\n";
670
+ let d, f;
671
+ for (f = n.length; f > 0; --f) {
672
+ let e = n[f - 1];
673
+ if (e !== "\n" && e !== " " && e !== " ") break;
674
+ }
675
+ let p = n.substring(f), m = p.indexOf("\n");
676
+ m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(je, `$&${l}`));
677
+ let h = !1, g, _ = -1;
678
+ for (g = 0; g < n.length; ++g) {
679
+ let e = n[g];
680
+ if (e === " ") h = !0;
681
+ else if (e === "\n") _ = g;
682
+ else break;
683
+ }
684
+ let v = n.substring(0, _ < g ? _ + 1 : g);
685
+ v &&= (n = n.substring(v.length), v.replace(/\n+/g, `$&${l}`));
686
+ let y = (h ? l ? "2" : "1" : "") + d;
687
+ if (e && (y += " " + s(e.replace(/ ?[\r\n]+/g, " ")), i && i()), !u) {
688
+ let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a = De(r, !0);
689
+ o !== "folded" && t !== j.BLOCK_FOLDED && (a.onOverflow = () => {
690
+ i = !0;
691
+ });
692
+ let s = Te(`${v}${e}${p}`, l, Ce, a);
693
+ if (!i) return `>${y}\n${l}${s}`;
694
+ }
695
+ return n = n.replace(/\n+/g, `$&${l}`), `|${y}\n${l}${v}${n}${p}`;
696
+ }
697
+ function Ne(e, t, n, r) {
698
+ let { type: i, value: a } = e, { actualString: o, implicitKey: s, indent: c, indentStep: l, inFlow: u } = t;
699
+ if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return F(a, t);
700
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? F(a, t) : Me(e, t, n, r);
701
+ if (!s && !u && i !== j.PLAIN && a.includes("\n")) return Me(e, t, n, r);
702
+ if (Oe(a)) {
703
+ if (c === "") return t.forceBlockIndent = !0, Me(e, t, n, r);
704
+ if (s && c === l) return F(a, t);
705
+ }
706
+ let d = a.replace(/\n+/g, `$&\n${c}`);
707
+ if (o) {
708
+ let e = (e) => e.default && e.tag !== "tag:yaml.org,2002:str" && e.test?.test(d), { compat: n, tags: r } = t.doc.schema;
709
+ if (r.some(e) || n?.some(e)) return F(a, t);
710
+ }
711
+ return s ? d : Te(d, c, Se, De(t, !1));
712
+ }
713
+ function Pe(e, t, n, r) {
714
+ let { implicitKey: i, inFlow: a } = t, o = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) }), { type: s } = e;
715
+ s !== j.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = j.QUOTE_DOUBLE);
716
+ let c = (e) => {
717
+ switch (e) {
718
+ case j.BLOCK_FOLDED:
719
+ case j.BLOCK_LITERAL: return i || a ? F(o.value, t) : Me(o, t, n, r);
720
+ case j.QUOTE_DOUBLE: return P(o.value, t);
721
+ case j.QUOTE_SINGLE: return Ae(o.value, t);
722
+ case j.PLAIN: return Ne(o, t, n, r);
723
+ default: return null;
724
+ }
725
+ }, l = c(s);
726
+ if (l === null) {
727
+ let { defaultKeyType: e, defaultStringType: n } = t.options, r = i && e || n;
728
+ if (l = c(r), l === null) throw Error(`Unsupported default string type ${r}`);
729
+ }
730
+ return l;
731
+ }
732
+ //#endregion
733
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js
734
+ function Fe(e, t) {
735
+ let n = Object.assign({
736
+ blockQuote: !0,
737
+ commentString: xe,
738
+ defaultKeyType: null,
739
+ defaultStringType: "PLAIN",
740
+ directives: null,
741
+ doubleQuotedAsJSON: !1,
742
+ doubleQuotedMinMultiLineLength: 40,
743
+ falseStr: "false",
744
+ flowCollectionPadding: !0,
745
+ indentSeq: !0,
746
+ lineWidth: 80,
747
+ minContentWidth: 20,
748
+ nullStr: "null",
749
+ simpleKeys: !1,
750
+ singleQuote: null,
751
+ trailingComma: !1,
752
+ trueStr: "true",
753
+ verifyAliasOrder: !0
754
+ }, e.schema.toStringOptions, t), r;
755
+ switch (n.collectionStyle) {
756
+ case "block":
757
+ r = !1;
758
+ break;
759
+ case "flow":
760
+ r = !0;
761
+ break;
762
+ default: r = null;
763
+ }
764
+ return {
765
+ anchors: new Set(),
766
+ doc: e,
767
+ flowCollectionPadding: n.flowCollectionPadding ? " " : "",
768
+ indent: "",
769
+ indentStep: typeof n.indent == "number" ? " ".repeat(n.indent) : " ",
770
+ inFlow: r,
771
+ options: n
772
+ };
773
+ }
774
+ function Ie(e, t) {
775
+ if (t.tag) {
776
+ let n = e.filter((e) => e.tag === t.tag);
777
+ if (n.length > 0) return n.find((e) => e.format === t.format) ?? n[0];
778
+ }
779
+ let n, r;
780
+ if (b(t)) {
781
+ r = t.value;
782
+ let i = e.filter((e) => e.identify?.(r));
783
+ if (i.length > 1) {
784
+ let e = i.filter((e) => e.test);
785
+ e.length > 0 && (i = e);
786
+ }
787
+ n = i.find((e) => e.format === t.format) ?? i.find((e) => !e.format);
788
+ } else r = t, n = e.find((e) => e.nodeClass && r instanceof e.nodeClass);
789
+ if (!n) {
790
+ let e = r?.constructor?.name ?? (r === null ? "null" : typeof r);
791
+ throw Error(`Tag not resolved for ${e} value`);
792
+ }
793
+ return n;
794
+ }
795
+ function Le(e, t, { anchors: n, doc: r }) {
796
+ if (!r.directives) return "";
797
+ let i = [], a = (b(e) || S(e)) && e.anchor;
798
+ a && se(a) && (n.add(a), i.push(`&${a}`));
799
+ let o = e.tag ?? (t.default ? null : t.tag);
800
+ return o && i.push(r.directives.tagString(o)), i.join(" ");
801
+ }
802
+ function I(e, t, n, r) {
803
+ if (y(e)) return e.toString(t, n, r);
804
+ if (g(e)) {
805
+ if (t.doc.directives) return e.toString(t);
806
+ if (t.resolvedAliases?.has(e)) throw TypeError("Cannot stringify circular structure without alias nodes");
807
+ t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = new Set([e]), e = e.resolve(t.doc);
808
+ }
809
+ let i, a = C(e) ? e : t.doc.createNode(e, { onTagObj: (e) => i = e });
810
+ i ??= Ie(t.doc.schema.tags, a);
811
+ let o = Le(a, i, t);
812
+ o.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + o.length + 1);
813
+ let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : b(a) ? Pe(a, t, n, r) : a.toString(t, n, r);
814
+ return o ? b(a) || s[0] === "{" || s[0] === "[" ? `${o} ${s}` : `${o}\n${t.indent}${s}` : s;
815
+ }
816
+ //#endregion
817
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js
818
+ function Re({ key: e, value: t }, n, r, i) {
819
+ let { allNullValues: a, doc: o, indent: s, indentStep: c, options: { commentString: l, indentSeq: u, simpleKeys: d } } = n, f = C(e) && e.comment || null;
820
+ if (d) {
821
+ if (f) throw Error("With simple keys, key nodes cannot have comments");
822
+ if (S(e) || !C(e) && typeof e == "object") throw Error("With simple keys, collection cannot be used as a key value");
823
+ }
824
+ let p = !d && (!e || f && t == null && !n.inFlow || S(e) || (b(e) ? e.type === j.BLOCK_FOLDED || e.type === j.BLOCK_LITERAL : typeof e == "object"));
825
+ n = Object.assign({}, n, {
826
+ allNullValues: !1,
827
+ implicitKey: !p && (d || !a),
828
+ indent: s + c
829
+ });
830
+ let m = !1, h = !1, g = I(e, n, () => m = !0, () => h = !0);
831
+ if (!p && !n.inFlow && g.length > 1024) {
832
+ if (d) throw Error("With simple keys, single line scalar must not span more than 1024 characters");
833
+ p = !0;
834
+ }
835
+ if (n.inFlow) {
836
+ if (a || t == null) return m && r && r(), g === "" ? "?" : p ? `? ${g}` : g;
837
+ } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += N(g, n.indent, l(f)) : h && i && i(), g;
838
+ m && (f = null), p ? (f && (g += N(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += N(g, n.indent, l(f))));
839
+ let _, v, y;
840
+ C(t) ? (_ = !!t.spaceBefore, v = t.commentBefore, y = t.comment) : (_ = !1, v = null, y = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !p && !f && b(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p && x(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
841
+ let ee = !1, w = I(t, n, () => ee = !0, () => h = !0), T = " ";
842
+ if (f || _ || v) {
843
+ if (T = _ ? "\n" : "", v) {
844
+ let e = l(v);
845
+ T += `\n${M(e, n.indent)}`;
846
+ }
847
+ w === "" && !n.inFlow ? T === "\n" && y && (T = "\n\n") : T += `\n${n.indent}`;
848
+ } else if (!p && S(t)) {
849
+ let e = w[0], r = w.indexOf("\n"), i = r !== -1, a = n.inFlow ?? t.flow ?? t.items.length === 0;
850
+ if (i || !a) {
851
+ let t = !1;
852
+ if (i && (e === "&" || e === "!")) {
853
+ let n = w.indexOf(" ");
854
+ e === "&" && n !== -1 && n < r && w[n + 1] === "!" && (n = w.indexOf(" ", n + 1)), (n === -1 || r < n) && (t = !0);
855
+ }
856
+ t || (T = `\n${n.indent}`);
857
+ }
858
+ } else (w === "" || w[0] === "\n") && (T = "");
859
+ return g += T + w, n.inFlow ? ee && r && r() : y && !ee ? g += N(g, n.indent, l(y)) : h && i && i(), g;
860
+ }
861
+ //#endregion
862
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js
863
+ function ze(e, t) {
864
+ (e === "debug" || e === "warn") && console.warn(t);
865
+ }
866
+ //#endregion
867
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
868
+ var Be = "<<", L = {
869
+ identify: (e) => e === Be || typeof e == "symbol" && e.description === Be,
870
+ default: "key",
871
+ tag: "tag:yaml.org,2002:merge",
872
+ test: /^<<$/,
873
+ resolve: () => Object.assign(new j(Symbol(Be)), { addToJSMap: He }),
874
+ stringify: () => Be
875
+ }, Ve = (e, t) => (L.identify(t) || b(t) && (!t.type || t.type === j.PLAIN) && L.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === L.tag && e.default);
876
+ function He(e, t, n) {
877
+ let r = We(e, n);
878
+ if (x(r)) for (let n of r.items) Ue(e, t, n);
879
+ else if (Array.isArray(r)) for (let n of r) Ue(e, t, n);
880
+ else Ue(e, t, r);
881
+ }
882
+ function Ue(e, t, n) {
883
+ let r = We(e, n);
884
+ if (!v(r)) throw Error("Merge sources must be maps or map aliases");
885
+ let i = r.toJSON(null, e, Map);
886
+ for (let [e, n] of i) t instanceof Map ? t.has(e) || t.set(e, n) : t instanceof Set ? t.add(e) : Object.prototype.hasOwnProperty.call(t, e) || Object.defineProperty(t, e, {
887
+ value: n,
888
+ writable: !0,
889
+ enumerable: !0,
890
+ configurable: !0
891
+ });
892
+ return t;
893
+ }
894
+ function We(e, t) {
895
+ return e && g(t) ? t.resolve(e.doc, e) : t;
896
+ }
897
+ //#endregion
898
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
899
+ function Ge(e, t, { key: n, value: r }) {
900
+ if (C(n) && n.addToJSMap) n.addToJSMap(e, t, r);
901
+ else if (Ve(e, n)) He(e, t, r);
902
+ else {
903
+ let i = A(n, "", e);
904
+ if (t instanceof Map) t.set(i, A(r, i, e));
905
+ else if (t instanceof Set) t.add(i);
906
+ else {
907
+ let a = Ke(n, i, e), o = A(r, a, e);
908
+ a in t ? Object.defineProperty(t, a, {
909
+ value: o,
910
+ writable: !0,
911
+ enumerable: !0,
912
+ configurable: !0
913
+ }) : t[a] = o;
914
+ }
915
+ }
916
+ return t;
917
+ }
918
+ function Ke(e, t, n) {
919
+ if (t === null) return "";
920
+ if (typeof t != "object") return String(t);
921
+ if (C(e) && n?.doc) {
922
+ let t = Fe(n.doc, {});
923
+ t.anchors = new Set();
924
+ for (let e of n.anchors.keys()) t.anchors.add(e.anchor);
925
+ t.inFlow = !0, t.inStringifyKey = !0;
926
+ let r = e.toString(t);
927
+ if (!n.mapKeyWarned) {
928
+ let e = JSON.stringify(r);
929
+ e.length > 40 && (e = e.substring(0, 36) + "...\""), ze(n.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), n.mapKeyWarned = !0;
930
+ }
931
+ return r;
932
+ }
933
+ return JSON.stringify(t);
934
+ }
935
+ //#endregion
936
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js
937
+ function qe(e, t, n) {
938
+ return new R(_e(e, void 0, n), _e(t, void 0, n));
939
+ }
940
+ var R = class e {
941
+ constructor(e, t = null) {
942
+ Object.defineProperty(this, h, { value: f }), this.key = e, this.value = t;
943
+ }
944
+ clone(t) {
945
+ let { key: n, value: r } = this;
946
+ return C(n) && (n = n.clone(t)), C(r) && (r = r.clone(t)), new e(n, r);
947
+ }
948
+ toJSON(e, t) {
949
+ return Ge(t, t?.mapAsMap ? new Map() : {}, this);
950
+ }
951
+ toString(e, t, n) {
952
+ return e?.doc ? Re(this, e, t, n) : JSON.stringify(this);
953
+ }
954
+ };
955
+ //#endregion
956
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
957
+ function Je(e, t, n) {
958
+ return (t.inFlow ?? e.flow ? Xe : Ye)(e, t, n);
959
+ }
960
+ function Ye({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
961
+ let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
962
+ indent: a,
963
+ type: null
964
+ }), d = !1, f = [];
965
+ for (let e = 0; e < t.length; ++e) {
966
+ let i = t[e], o = null;
967
+ if (C(i)) !d && i.spaceBefore && f.push(""), Ze(n, f, i.commentBefore, d), i.comment && (o = i.comment);
968
+ else if (y(i)) {
969
+ let e = C(i.key) ? i.key : null;
970
+ e && (!d && e.spaceBefore && f.push(""), Ze(n, f, e.commentBefore, d));
971
+ }
972
+ d = !1;
973
+ let s = I(i, u, () => o = null, () => d = !0);
974
+ o && (s += N(s, a, l(o))), d && o && (d = !1), f.push(r + s);
975
+ }
976
+ let p;
977
+ if (f.length === 0) p = i.start + i.end;
978
+ else {
979
+ p = f[0];
980
+ for (let e = 1; e < f.length; ++e) {
981
+ let t = f[e];
982
+ p += t ? `\n${c}${t}` : "\n";
983
+ }
984
+ }
985
+ return e ? (p += "\n" + M(l(e), c), s && s()) : d && o && o(), p;
986
+ }
987
+ function Xe({ items: e }, t, { flowChars: n, itemIndent: r }) {
988
+ let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
989
+ r += a;
990
+ let c = Object.assign({}, t, {
991
+ indent: r,
992
+ inFlow: !0,
993
+ type: null
994
+ }), l = !1, u = 0, d = [];
995
+ for (let n = 0; n < e.length; ++n) {
996
+ let i = e[n], a = null;
997
+ if (C(i)) i.spaceBefore && d.push(""), Ze(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
998
+ else if (y(i)) {
999
+ let e = C(i.key) ? i.key : null;
1000
+ e && (e.spaceBefore && d.push(""), Ze(t, d, e.commentBefore, !1), e.comment && (l = !0));
1001
+ let n = C(i.value) ? i.value : null;
1002
+ n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
1003
+ }
1004
+ a && (l = !0);
1005
+ let o = I(i, c, () => a = null);
1006
+ l ||= d.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= d.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o += N(o, r, s(a))), d.push(o), u = d.length;
1007
+ }
1008
+ let { start: f, end: p } = n;
1009
+ if (d.length === 0) return f + p;
1010
+ if (!l) {
1011
+ let e = d.reduce((e, t) => e + t.length + 2, 2);
1012
+ l = t.options.lineWidth > 0 && e > t.options.lineWidth;
1013
+ }
1014
+ if (l) {
1015
+ let e = f;
1016
+ for (let t of d) e += t ? `\n${a}${i}${t}` : "\n";
1017
+ return `${e}\n${i}${p}`;
1018
+ }
1019
+ return `${f}${o}${d.join(" ")}${o}${p}`;
1020
+ }
1021
+ function Ze({ indent: e, options: { commentString: t } }, n, r, i) {
1022
+ if (r && i && (r = r.replace(/^\n+/, "")), r) {
1023
+ let i = M(t(r), e);
1024
+ n.push(i.trimStart());
1025
+ }
1026
+ }
1027
+ //#endregion
1028
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js
1029
+ function z(e, t) {
1030
+ let n = b(t) ? t.value : t;
1031
+ for (let r of e) if (y(r) && (r.key === t || r.key === n || b(r.key) && r.key.value === n)) return r;
1032
+ }
1033
+ var B = class extends be {
1034
+ static get tagName() {
1035
+ return "tag:yaml.org,2002:map";
1036
+ }
1037
+ constructor(e) {
1038
+ super(d, e), this.items = [];
1039
+ }
1040
+ static from(e, t, n) {
1041
+ let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
1042
+ if (typeof i == "function") o = i.call(t, e, o);
1043
+ else if (Array.isArray(i) && !i.includes(e)) return;
1044
+ (o !== void 0 || r) && a.items.push(qe(e, o, n));
1045
+ };
1046
+ if (t instanceof Map) for (let [e, n] of t) o(e, n);
1047
+ else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
1048
+ return typeof e.sortMapEntries == "function" && a.items.sort(e.sortMapEntries), a;
1049
+ }
1050
+ add(e, t) {
1051
+ let n;
1052
+ n = y(e) ? e : !e || typeof e != "object" || !("key" in e) ? new R(e, e?.value) : new R(e.key, e.value);
1053
+ let r = z(this.items, n.key), i = this.schema?.sortMapEntries;
1054
+ if (r) {
1055
+ if (!t) throw Error(`Key ${n.key} already set`);
1056
+ b(r.value) && me(n.value) ? r.value.value = n.value : r.value = n.value;
1057
+ } else if (i) {
1058
+ let e = this.items.findIndex((e) => i(n, e) < 0);
1059
+ e === -1 ? this.items.push(n) : this.items.splice(e, 0, n);
1060
+ } else this.items.push(n);
1061
+ }
1062
+ delete(e) {
1063
+ let t = z(this.items, e);
1064
+ return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1065
+ }
1066
+ get(e, t) {
1067
+ let n = z(this.items, e)?.value;
1068
+ return (!t && b(n) ? n.value : n) ?? void 0;
1069
+ }
1070
+ has(e) {
1071
+ return !!z(this.items, e);
1072
+ }
1073
+ set(e, t) {
1074
+ this.add(new R(e, t), !0);
1075
+ }
1076
+ toJSON(e, t, n) {
1077
+ let r = n ? new n() : t?.mapAsMap ? new Map() : {};
1078
+ t?.onCreate && t.onCreate(r);
1079
+ for (let e of this.items) Ge(t, r, e);
1080
+ return r;
1081
+ }
1082
+ toString(e, t, n) {
1083
+ if (!e) return JSON.stringify(this);
1084
+ for (let e of this.items) if (!y(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
1085
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), Je(this, e, {
1086
+ blockItemPrefix: "",
1087
+ flowChars: {
1088
+ start: "{",
1089
+ end: "}"
1090
+ },
1091
+ itemIndent: e.indent || "",
1092
+ onChompKeep: n,
1093
+ onComment: t
1094
+ });
1095
+ }
1096
+ }, V = {
1097
+ collection: "map",
1098
+ default: !0,
1099
+ nodeClass: B,
1100
+ tag: "tag:yaml.org,2002:map",
1101
+ resolve(e, t) {
1102
+ return v(e) || t("Expected a mapping for this tag"), e;
1103
+ },
1104
+ createNode: (e, t, n) => B.from(e, t, n)
1105
+ }, H = class extends be {
1106
+ static get tagName() {
1107
+ return "tag:yaml.org,2002:seq";
1108
+ }
1109
+ constructor(e) {
1110
+ super(m, e), this.items = [];
1111
+ }
1112
+ add(e) {
1113
+ this.items.push(e);
1114
+ }
1115
+ delete(e) {
1116
+ let t = Qe(e);
1117
+ return typeof t == "number" && this.items.splice(t, 1).length > 0;
1118
+ }
1119
+ get(e, t) {
1120
+ let n = Qe(e);
1121
+ if (typeof n != "number") return;
1122
+ let r = this.items[n];
1123
+ return !t && b(r) ? r.value : r;
1124
+ }
1125
+ has(e) {
1126
+ let t = Qe(e);
1127
+ return typeof t == "number" && t < this.items.length;
1128
+ }
1129
+ set(e, t) {
1130
+ let n = Qe(e);
1131
+ if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
1132
+ let r = this.items[n];
1133
+ b(r) && me(t) ? r.value = t : this.items[n] = t;
1134
+ }
1135
+ toJSON(e, t) {
1136
+ let n = [];
1137
+ t?.onCreate && t.onCreate(n);
1138
+ let r = 0;
1139
+ for (let e of this.items) n.push(A(e, String(r++), t));
1140
+ return n;
1141
+ }
1142
+ toString(e, t, n) {
1143
+ return e ? Je(this, e, {
1144
+ blockItemPrefix: "- ",
1145
+ flowChars: {
1146
+ start: "[",
1147
+ end: "]"
1148
+ },
1149
+ itemIndent: (e.indent || "") + " ",
1150
+ onChompKeep: n,
1151
+ onComment: t
1152
+ }) : JSON.stringify(this);
1153
+ }
1154
+ static from(e, t, n) {
1155
+ let { replacer: r } = n, i = new this(e);
1156
+ if (t && Symbol.iterator in Object(t)) {
1157
+ let e = 0;
1158
+ for (let a of t) {
1159
+ if (typeof r == "function") {
1160
+ let n = t instanceof Set ? a : String(e++);
1161
+ a = r.call(t, n, a);
1162
+ }
1163
+ i.items.push(_e(a, void 0, n));
1164
+ }
1165
+ }
1166
+ return i;
1167
+ }
1168
+ };
1169
+ function Qe(e) {
1170
+ let t = b(e) ? e.value : e;
1171
+ return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
1172
+ }
1173
+ //#endregion
1174
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js
1175
+ var U = {
1176
+ collection: "seq",
1177
+ default: !0,
1178
+ nodeClass: H,
1179
+ tag: "tag:yaml.org,2002:seq",
1180
+ resolve(e, t) {
1181
+ return x(e) || t("Expected a sequence for this tag"), e;
1182
+ },
1183
+ createNode: (e, t, n) => H.from(e, t, n)
1184
+ }, $e = {
1185
+ identify: (e) => typeof e == "string",
1186
+ default: !0,
1187
+ tag: "tag:yaml.org,2002:str",
1188
+ resolve: (e) => e,
1189
+ stringify(e, t, n, r) {
1190
+ return t = Object.assign({ actualString: !0 }, t), Pe(e, t, n, r);
1191
+ }
1192
+ }, et = {
1193
+ identify: (e) => e == null,
1194
+ createNode: () => new j(null),
1195
+ default: !0,
1196
+ tag: "tag:yaml.org,2002:null",
1197
+ test: /^(?:~|[Nn]ull|NULL)?$/,
1198
+ resolve: () => new j(null),
1199
+ stringify: ({ source: e }, t) => typeof e == "string" && et.test.test(e) ? e : t.options.nullStr
1200
+ }, tt = {
1201
+ identify: (e) => typeof e == "boolean",
1202
+ default: !0,
1203
+ tag: "tag:yaml.org,2002:bool",
1204
+ test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1205
+ resolve: (e) => new j(e[0] === "t" || e[0] === "T"),
1206
+ stringify({ source: e, value: t }, n) {
1207
+ return e && tt.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
1208
+ }
1209
+ };
1210
+ //#endregion
1211
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyNumber.js
1212
+ function W({ format: e, minFractionDigits: t, tag: n, value: r }) {
1213
+ if (typeof r == "bigint") return String(r);
1214
+ let i = typeof r == "number" ? r : Number(r);
1215
+ if (!isFinite(i)) return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
1216
+ let a = Object.is(r, -0) ? "-0" : JSON.stringify(r);
1217
+ if (!e && t && (!n || n === "tag:yaml.org,2002:float") && /^-?\d/.test(a) && !a.includes("e")) {
1218
+ let e = a.indexOf(".");
1219
+ e < 0 && (e = a.length, a += ".");
1220
+ let n = t - (a.length - e - 1);
1221
+ for (; n-- > 0;) a += "0";
1222
+ }
1223
+ return a;
1224
+ }
1225
+ //#endregion
1226
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js
1227
+ var nt = {
1228
+ identify: (e) => typeof e == "number",
1229
+ default: !0,
1230
+ tag: "tag:yaml.org,2002:float",
1231
+ test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1232
+ resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
1233
+ stringify: W
1234
+ }, rt = {
1235
+ identify: (e) => typeof e == "number",
1236
+ default: !0,
1237
+ tag: "tag:yaml.org,2002:float",
1238
+ format: "EXP",
1239
+ test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
1240
+ resolve: (e) => parseFloat(e),
1241
+ stringify(e) {
1242
+ let t = Number(e.value);
1243
+ return isFinite(t) ? t.toExponential() : W(e);
1244
+ }
1245
+ }, it = {
1246
+ identify: (e) => typeof e == "number",
1247
+ default: !0,
1248
+ tag: "tag:yaml.org,2002:float",
1249
+ test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1250
+ resolve(e) {
1251
+ let t = new j(parseFloat(e)), n = e.indexOf(".");
1252
+ return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
1253
+ },
1254
+ stringify: W
1255
+ }, at = (e) => typeof e == "bigint" || Number.isInteger(e), ot = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
1256
+ function st(e, t, n) {
1257
+ let { value: r } = e;
1258
+ return at(r) && r >= 0 ? n + r.toString(t) : W(e);
1259
+ }
1260
+ var ct = {
1261
+ identify: (e) => at(e) && e >= 0,
1262
+ default: !0,
1263
+ tag: "tag:yaml.org,2002:int",
1264
+ format: "OCT",
1265
+ test: /^0o[0-7]+$/,
1266
+ resolve: (e, t, n) => ot(e, 2, 8, n),
1267
+ stringify: (e) => st(e, 8, "0o")
1268
+ }, lt = {
1269
+ identify: at,
1270
+ default: !0,
1271
+ tag: "tag:yaml.org,2002:int",
1272
+ test: /^[-+]?[0-9]+$/,
1273
+ resolve: (e, t, n) => ot(e, 0, 10, n),
1274
+ stringify: W
1275
+ }, ut = {
1276
+ identify: (e) => at(e) && e >= 0,
1277
+ default: !0,
1278
+ tag: "tag:yaml.org,2002:int",
1279
+ format: "HEX",
1280
+ test: /^0x[0-9a-fA-F]+$/,
1281
+ resolve: (e, t, n) => ot(e, 2, 16, n),
1282
+ stringify: (e) => st(e, 16, "0x")
1283
+ }, dt = [
1284
+ V,
1285
+ U,
1286
+ $e,
1287
+ et,
1288
+ tt,
1289
+ ct,
1290
+ lt,
1291
+ ut,
1292
+ nt,
1293
+ rt,
1294
+ it
1295
+ ];
1296
+ //#endregion
1297
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js
1298
+ function ft(e) {
1299
+ return typeof e == "bigint" || Number.isInteger(e);
1300
+ }
1301
+ var pt = ({ value: e }) => JSON.stringify(e), mt = [
1302
+ {
1303
+ identify: (e) => typeof e == "string",
1304
+ default: !0,
1305
+ tag: "tag:yaml.org,2002:str",
1306
+ resolve: (e) => e,
1307
+ stringify: pt
1308
+ },
1309
+ {
1310
+ identify: (e) => e == null,
1311
+ createNode: () => new j(null),
1312
+ default: !0,
1313
+ tag: "tag:yaml.org,2002:null",
1314
+ test: /^null$/,
1315
+ resolve: () => null,
1316
+ stringify: pt
1317
+ },
1318
+ {
1319
+ identify: (e) => typeof e == "boolean",
1320
+ default: !0,
1321
+ tag: "tag:yaml.org,2002:bool",
1322
+ test: /^true$|^false$/,
1323
+ resolve: (e) => e === "true",
1324
+ stringify: pt
1325
+ },
1326
+ {
1327
+ identify: ft,
1328
+ default: !0,
1329
+ tag: "tag:yaml.org,2002:int",
1330
+ test: /^-?(?:0|[1-9][0-9]*)$/,
1331
+ resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
1332
+ stringify: ({ value: e }) => ft(e) ? e.toString() : JSON.stringify(e)
1333
+ },
1334
+ {
1335
+ identify: (e) => typeof e == "number",
1336
+ default: !0,
1337
+ tag: "tag:yaml.org,2002:float",
1338
+ test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1339
+ resolve: (e) => parseFloat(e),
1340
+ stringify: pt
1341
+ }
1342
+ ], ht = [V, U].concat(mt, {
1343
+ default: !0,
1344
+ tag: "",
1345
+ test: /^/,
1346
+ resolve(e, t) {
1347
+ return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
1348
+ }
1349
+ }), gt = {
1350
+ identify: (e) => e instanceof Uint8Array,
1351
+ default: !1,
1352
+ tag: "tag:yaml.org,2002:binary",
1353
+ resolve(e, t) {
1354
+ if (typeof atob == "function") {
1355
+ let t = atob(e.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
1356
+ for (let e = 0; e < t.length; ++e) n[e] = t.charCodeAt(e);
1357
+ return n;
1358
+ }
1359
+ return t("This environment does not support reading binary tags; either Buffer or atob is required"), e;
1360
+ },
1361
+ stringify({ comment: e, type: t, value: n }, r, i, a) {
1362
+ if (!n) return "";
1363
+ let o = n, s;
1364
+ if (typeof btoa == "function") {
1365
+ let e = "";
1366
+ for (let t = 0; t < o.length; ++t) e += String.fromCharCode(o[t]);
1367
+ s = btoa(e);
1368
+ } else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1369
+ if (t ??= j.BLOCK_LITERAL, t !== j.QUOTE_DOUBLE) {
1370
+ let e = Math.max(r.options.lineWidth - r.indent.length, r.options.minContentWidth), n = Math.ceil(s.length / e), i = Array(n);
1371
+ for (let t = 0, r = 0; t < n; ++t, r += e) i[t] = s.substr(r, e);
1372
+ s = i.join(t === j.BLOCK_LITERAL ? "\n" : " ");
1373
+ }
1374
+ return Pe({
1375
+ comment: e,
1376
+ type: t,
1377
+ value: s
1378
+ }, r, i, a);
1379
+ }
1380
+ };
1381
+ //#endregion
1382
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
1383
+ function _t(e, t) {
1384
+ if (x(e)) for (let n = 0; n < e.items.length; ++n) {
1385
+ let r = e.items[n];
1386
+ if (!y(r)) {
1387
+ if (v(r)) {
1388
+ r.items.length > 1 && t("Each pair must have its own sequence indicator");
1389
+ let e = r.items[0] || new R(new j(null));
1390
+ if (r.commentBefore && (e.key.commentBefore = e.key.commentBefore ? `${r.commentBefore}\n${e.key.commentBefore}` : r.commentBefore), r.comment) {
1391
+ let t = e.value ?? e.key;
1392
+ t.comment = t.comment ? `${r.comment}\n${t.comment}` : r.comment;
1393
+ }
1394
+ r = e;
1395
+ }
1396
+ e.items[n] = y(r) ? r : new R(r);
1397
+ }
1398
+ }
1399
+ else t("Expected a sequence for this tag");
1400
+ return e;
1401
+ }
1402
+ function vt(e, t, n) {
1403
+ let { replacer: r } = n, i = new H(e);
1404
+ i.tag = "tag:yaml.org,2002:pairs";
1405
+ let a = 0;
1406
+ if (t && Symbol.iterator in Object(t)) for (let e of t) {
1407
+ typeof r == "function" && (e = r.call(t, String(a++), e));
1408
+ let o, s;
1409
+ if (Array.isArray(e)) {
1410
+ if (e.length === 2) o = e[0], s = e[1];
1411
+ else throw TypeError(`Expected [key, value] tuple: ${e}`);
1412
+ } else if (e && e instanceof Object) {
1413
+ let t = Object.keys(e);
1414
+ if (t.length === 1) o = t[0], s = e[o];
1415
+ else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
1416
+ } else o = e;
1417
+ i.items.push(qe(o, s, n));
1418
+ }
1419
+ return i;
1420
+ }
1421
+ var yt = {
1422
+ collection: "seq",
1423
+ default: !1,
1424
+ tag: "tag:yaml.org,2002:pairs",
1425
+ resolve: _t,
1426
+ createNode: vt
1427
+ }, bt = class e extends H {
1428
+ constructor() {
1429
+ super(), this.add = B.prototype.add.bind(this), this.delete = B.prototype.delete.bind(this), this.get = B.prototype.get.bind(this), this.has = B.prototype.has.bind(this), this.set = B.prototype.set.bind(this), this.tag = e.tag;
1430
+ }
1431
+ toJSON(e, t) {
1432
+ if (!t) return super.toJSON(e);
1433
+ let n = new Map();
1434
+ t?.onCreate && t.onCreate(n);
1435
+ for (let e of this.items) {
1436
+ let r, i;
1437
+ if (y(e) ? (r = A(e.key, "", t), i = A(e.value, r, t)) : r = A(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
1438
+ n.set(r, i);
1439
+ }
1440
+ return n;
1441
+ }
1442
+ static from(e, t, n) {
1443
+ let r = vt(e, t, n), i = new this();
1444
+ return i.items = r.items, i;
1445
+ }
1446
+ };
1447
+ bt.tag = "tag:yaml.org,2002:omap";
1448
+ var xt = {
1449
+ collection: "seq",
1450
+ identify: (e) => e instanceof Map,
1451
+ nodeClass: bt,
1452
+ default: !1,
1453
+ tag: "tag:yaml.org,2002:omap",
1454
+ resolve(e, t) {
1455
+ let n = _t(e, t), r = [];
1456
+ for (let { key: e } of n.items) b(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
1457
+ return Object.assign(new bt(), n);
1458
+ },
1459
+ createNode: (e, t, n) => bt.from(e, t, n)
1460
+ };
1461
+ //#endregion
1462
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
1463
+ function St({ value: e, source: t }, n) {
1464
+ return t && (e ? Ct : wt).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
1465
+ }
1466
+ var Ct = {
1467
+ identify: (e) => e === !0,
1468
+ default: !0,
1469
+ tag: "tag:yaml.org,2002:bool",
1470
+ test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1471
+ resolve: () => new j(!0),
1472
+ stringify: St
1473
+ }, wt = {
1474
+ identify: (e) => e === !1,
1475
+ default: !0,
1476
+ tag: "tag:yaml.org,2002:bool",
1477
+ test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1478
+ resolve: () => new j(!1),
1479
+ stringify: St
1480
+ }, Tt = {
1481
+ identify: (e) => typeof e == "number",
1482
+ default: !0,
1483
+ tag: "tag:yaml.org,2002:float",
1484
+ test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1485
+ resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
1486
+ stringify: W
1487
+ }, Et = {
1488
+ identify: (e) => typeof e == "number",
1489
+ default: !0,
1490
+ tag: "tag:yaml.org,2002:float",
1491
+ format: "EXP",
1492
+ test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
1493
+ resolve: (e) => parseFloat(e.replace(/_/g, "")),
1494
+ stringify(e) {
1495
+ let t = Number(e.value);
1496
+ return isFinite(t) ? t.toExponential() : W(e);
1497
+ }
1498
+ }, Dt = {
1499
+ identify: (e) => typeof e == "number",
1500
+ default: !0,
1501
+ tag: "tag:yaml.org,2002:float",
1502
+ test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1503
+ resolve(e) {
1504
+ let t = new j(parseFloat(e.replace(/_/g, ""))), n = e.indexOf(".");
1505
+ if (n !== -1) {
1506
+ let r = e.substring(n + 1).replace(/_/g, "");
1507
+ r[r.length - 1] === "0" && (t.minFractionDigits = r.length);
1508
+ }
1509
+ return t;
1510
+ },
1511
+ stringify: W
1512
+ }, G = (e) => typeof e == "bigint" || Number.isInteger(e);
1513
+ function Ot(e, t, n, { intAsBigInt: r }) {
1514
+ let i = e[0];
1515
+ if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
1516
+ switch (n) {
1517
+ case 2:
1518
+ e = `0b${e}`;
1519
+ break;
1520
+ case 8:
1521
+ e = `0o${e}`;
1522
+ break;
1523
+ case 16: e = `0x${e}`;
1524
+ }
1525
+ let t = BigInt(e);
1526
+ return i === "-" ? BigInt(-1) * t : t;
1527
+ }
1528
+ let a = parseInt(e, n);
1529
+ return i === "-" ? -1 * a : a;
1530
+ }
1531
+ function kt(e, t, n) {
1532
+ let { value: r } = e;
1533
+ if (G(r)) {
1534
+ let e = r.toString(t);
1535
+ return r < 0 ? "-" + n + e.substr(1) : n + e;
1536
+ }
1537
+ return W(e);
1538
+ }
1539
+ var At = {
1540
+ identify: G,
1541
+ default: !0,
1542
+ tag: "tag:yaml.org,2002:int",
1543
+ format: "BIN",
1544
+ test: /^[-+]?0b[0-1_]+$/,
1545
+ resolve: (e, t, n) => Ot(e, 2, 2, n),
1546
+ stringify: (e) => kt(e, 2, "0b")
1547
+ }, jt = {
1548
+ identify: G,
1549
+ default: !0,
1550
+ tag: "tag:yaml.org,2002:int",
1551
+ format: "OCT",
1552
+ test: /^[-+]?0[0-7_]+$/,
1553
+ resolve: (e, t, n) => Ot(e, 1, 8, n),
1554
+ stringify: (e) => kt(e, 8, "0")
1555
+ }, Mt = {
1556
+ identify: G,
1557
+ default: !0,
1558
+ tag: "tag:yaml.org,2002:int",
1559
+ test: /^[-+]?[0-9][0-9_]*$/,
1560
+ resolve: (e, t, n) => Ot(e, 0, 10, n),
1561
+ stringify: W
1562
+ }, Nt = {
1563
+ identify: G,
1564
+ default: !0,
1565
+ tag: "tag:yaml.org,2002:int",
1566
+ format: "HEX",
1567
+ test: /^[-+]?0x[0-9a-fA-F_]+$/,
1568
+ resolve: (e, t, n) => Ot(e, 2, 16, n),
1569
+ stringify: (e) => kt(e, 16, "0x")
1570
+ }, Pt = class e extends B {
1571
+ constructor(t) {
1572
+ super(t), this.tag = e.tag;
1573
+ }
1574
+ add(e) {
1575
+ let t;
1576
+ t = y(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new R(e.key, null) : new R(e, null), z(this.items, t.key) || this.items.push(t);
1577
+ }
1578
+ get(e, t) {
1579
+ let n = z(this.items, e);
1580
+ return !t && y(n) ? b(n.key) ? n.key.value : n.key : n;
1581
+ }
1582
+ set(e, t) {
1583
+ if (typeof t != "boolean") throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1584
+ let n = z(this.items, e);
1585
+ n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new R(e));
1586
+ }
1587
+ toJSON(e, t) {
1588
+ return super.toJSON(e, t, Set);
1589
+ }
1590
+ toString(e, t, n) {
1591
+ if (!e) return JSON.stringify(this);
1592
+ if (this.hasAllNullValues(!0)) return super.toString(Object.assign({}, e, { allNullValues: !0 }), t, n);
1593
+ throw Error("Set items must all have null values");
1594
+ }
1595
+ static from(e, t, n) {
1596
+ let { replacer: r } = n, i = new this(e);
1597
+ if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(qe(e, null, n));
1598
+ return i;
1599
+ }
1600
+ };
1601
+ Pt.tag = "tag:yaml.org,2002:set";
1602
+ var Ft = {
1603
+ collection: "map",
1604
+ identify: (e) => e instanceof Set,
1605
+ nodeClass: Pt,
1606
+ default: !1,
1607
+ tag: "tag:yaml.org,2002:set",
1608
+ createNode: (e, t, n) => Pt.from(e, t, n),
1609
+ resolve(e, t) {
1610
+ if (v(e)) {
1611
+ if (e.hasAllNullValues(!0)) return Object.assign(new Pt(), e);
1612
+ t("Set items must all have null values");
1613
+ } else t("Expected a mapping for this tag");
1614
+ return e;
1615
+ }
1616
+ };
1617
+ //#endregion
1618
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
1619
+ function It(e, t) {
1620
+ let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
1621
+ return n === "-" ? i(-1) * a : a;
1622
+ }
1623
+ function Lt(e) {
1624
+ let { value: t } = e, n = (e) => e;
1625
+ if (typeof t == "bigint") n = (e) => BigInt(e);
1626
+ else if (isNaN(t) || !isFinite(t)) return W(e);
1627
+ let r = "";
1628
+ t < 0 && (r = "-", t *= n(-1));
1629
+ let i = n(60), a = [t % i];
1630
+ return t < 60 ? a.unshift(0) : (t = (t - a[0]) / i, a.unshift(t % i), t >= 60 && (t = (t - a[0]) / i, a.unshift(t))), r + a.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1631
+ }
1632
+ var Rt = {
1633
+ identify: (e) => typeof e == "bigint" || Number.isInteger(e),
1634
+ default: !0,
1635
+ tag: "tag:yaml.org,2002:int",
1636
+ format: "TIME",
1637
+ test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1638
+ resolve: (e, t, { intAsBigInt: n }) => It(e, n),
1639
+ stringify: Lt
1640
+ }, zt = {
1641
+ identify: (e) => typeof e == "number",
1642
+ default: !0,
1643
+ tag: "tag:yaml.org,2002:float",
1644
+ format: "TIME",
1645
+ test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1646
+ resolve: (e) => It(e, !1),
1647
+ stringify: Lt
1648
+ }, Bt = {
1649
+ identify: (e) => e instanceof Date,
1650
+ default: !0,
1651
+ tag: "tag:yaml.org,2002:timestamp",
1652
+ 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})?))?)?$"),
1653
+ resolve(e) {
1654
+ let t = e.match(Bt.test);
1655
+ if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1656
+ let [, n, r, i, a, o, s] = t.map(Number), c = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, l = Date.UTC(n, r - 1, i, a || 0, o || 0, s || 0, c), u = t[8];
1657
+ if (u && u !== "Z") {
1658
+ let e = It(u, !1);
1659
+ Math.abs(e) < 30 && (e *= 60), l -= 6e4 * e;
1660
+ }
1661
+ return new Date(l);
1662
+ },
1663
+ stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
1664
+ }, Vt = [
1665
+ V,
1666
+ U,
1667
+ $e,
1668
+ et,
1669
+ Ct,
1670
+ wt,
1671
+ At,
1672
+ jt,
1673
+ Mt,
1674
+ Nt,
1675
+ Tt,
1676
+ Et,
1677
+ Dt,
1678
+ gt,
1679
+ L,
1680
+ xt,
1681
+ yt,
1682
+ Ft,
1683
+ Rt,
1684
+ zt,
1685
+ Bt
1686
+ ], Ht = new Map([
1687
+ ["core", dt],
1688
+ ["failsafe", [
1689
+ V,
1690
+ U,
1691
+ $e
1692
+ ]],
1693
+ ["json", ht],
1694
+ ["yaml11", Vt],
1695
+ ["yaml-1.1", Vt]
1696
+ ]), Ut = {
1697
+ binary: gt,
1698
+ bool: tt,
1699
+ float: it,
1700
+ floatExp: rt,
1701
+ floatNaN: nt,
1702
+ floatTime: zt,
1703
+ int: lt,
1704
+ intHex: ut,
1705
+ intOct: ct,
1706
+ intTime: Rt,
1707
+ map: V,
1708
+ merge: L,
1709
+ null: et,
1710
+ omap: xt,
1711
+ pairs: yt,
1712
+ seq: U,
1713
+ set: Ft,
1714
+ timestamp: Bt
1715
+ }, Wt = {
1716
+ "tag:yaml.org,2002:binary": gt,
1717
+ "tag:yaml.org,2002:merge": L,
1718
+ "tag:yaml.org,2002:omap": xt,
1719
+ "tag:yaml.org,2002:pairs": yt,
1720
+ "tag:yaml.org,2002:set": Ft,
1721
+ "tag:yaml.org,2002:timestamp": Bt
1722
+ };
1723
+ function Gt(e, t, n) {
1724
+ let r = Ht.get(t);
1725
+ if (r && !e) return n && !r.includes(L) ? r.concat(L) : r.slice();
1726
+ let i = r;
1727
+ if (!i) {
1728
+ if (Array.isArray(e)) i = [];
1729
+ else {
1730
+ let e = Array.from(Ht.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
1731
+ throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
1732
+ }
1733
+ }
1734
+ if (Array.isArray(e)) for (let t of e) i = i.concat(t);
1735
+ else typeof e == "function" && (i = e(i.slice()));
1736
+ return n && (i = i.concat(L)), i.reduce((e, t) => {
1737
+ let n = typeof t == "string" ? Ut[t] : t;
1738
+ if (!n) {
1739
+ let e = JSON.stringify(t), n = Object.keys(Ut).map((e) => JSON.stringify(e)).join(", ");
1740
+ throw Error(`Unknown custom tag ${e}; use one of ${n}`);
1741
+ }
1742
+ return e.includes(n) || e.push(n), e;
1743
+ }, []);
1744
+ }
1745
+ //#endregion
1746
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js
1747
+ var Kt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), qt = class e {
1748
+ constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
1749
+ this.compat = Array.isArray(e) ? Gt(e, "compat") : e ? Gt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? Wt : {}, this.tags = Gt(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, d, { value: V }), Object.defineProperty(this, p, { value: $e }), Object.defineProperty(this, m, { value: U }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Kt : null;
1750
+ }
1751
+ clone() {
1752
+ let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
1753
+ return t.tags = this.tags.slice(), t;
1754
+ }
1755
+ };
1756
+ //#endregion
1757
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js
1758
+ function Jt(e, t) {
1759
+ let n = [], r = t.directives === !0;
1760
+ if (t.directives !== !1 && e.directives) {
1761
+ let t = e.directives.toString(e);
1762
+ t ? (n.push(t), r = !0) : e.directives.docStart && (r = !0);
1763
+ }
1764
+ r && n.push("---");
1765
+ let i = Fe(e, t), { commentString: a } = i.options;
1766
+ if (e.commentBefore) {
1767
+ n.length !== 1 && n.unshift("");
1768
+ let t = a(e.commentBefore);
1769
+ n.unshift(M(t, ""));
1770
+ }
1771
+ let o = !1, s = null;
1772
+ if (e.contents) {
1773
+ if (C(e.contents)) {
1774
+ if (e.contents.spaceBefore && r && n.push(""), e.contents.commentBefore) {
1775
+ let t = a(e.contents.commentBefore);
1776
+ n.push(M(t, ""));
1777
+ }
1778
+ i.forceBlockIndent = !!e.comment, s = e.contents.comment;
1779
+ }
1780
+ let t = s ? void 0 : () => o = !0, c = I(e.contents, i, () => s = null, t);
1781
+ s && (c += N(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1782
+ } else n.push(I(e.contents, i));
1783
+ if (e.directives?.docEnd) {
1784
+ if (e.comment) {
1785
+ let t = a(e.comment);
1786
+ t.includes("\n") ? (n.push("..."), n.push(M(t, ""))) : n.push(`... ${t}`);
1787
+ } else n.push("...");
1788
+ } else {
1789
+ let t = e.comment;
1790
+ t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(M(a(t), "")));
1791
+ }
1792
+ return n.join("\n") + "\n";
1793
+ }
1794
+ //#endregion
1795
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js
1796
+ var Yt = class e {
1797
+ constructor(e, t, n) {
1798
+ this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, h, { value: u });
1799
+ let r = null;
1800
+ typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t, t = void 0);
1801
+ let i = Object.assign({
1802
+ intAsBigInt: !1,
1803
+ keepSourceTokens: !1,
1804
+ logLevel: "warn",
1805
+ prettyErrors: !0,
1806
+ strict: !0,
1807
+ stringKeys: !1,
1808
+ uniqueKeys: !0,
1809
+ version: "1.2"
1810
+ }, n);
1811
+ this.options = i;
1812
+ let { version: a } = i;
1813
+ n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new O({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
1814
+ }
1815
+ clone() {
1816
+ let t = Object.create(e.prototype, { [h]: { value: u } });
1817
+ return t.commentBefore = this.commentBefore, t.comment = this.comment, t.errors = this.errors.slice(), t.warnings = this.warnings.slice(), t.options = Object.assign({}, this.options), this.directives && (t.directives = this.directives.clone()), t.schema = this.schema.clone(), t.contents = C(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
1818
+ }
1819
+ add(e) {
1820
+ K(this.contents) && this.contents.add(e);
1821
+ }
1822
+ addIn(e, t) {
1823
+ K(this.contents) && this.contents.addIn(e, t);
1824
+ }
1825
+ createAlias(e, t) {
1826
+ if (!e.anchor) {
1827
+ let n = ce(this);
1828
+ e.anchor = !t || n.has(t) ? le(t || "a", n) : t;
1829
+ }
1830
+ return new fe(e.anchor);
1831
+ }
1832
+ createNode(e, t, n) {
1833
+ let r;
1834
+ if (typeof t == "function") e = t.call({ "": e }, "", e), r = t;
1835
+ else if (Array.isArray(t)) {
1836
+ let e = t.filter((e) => typeof e == "number" || e instanceof String || e instanceof Number).map(String);
1837
+ e.length > 0 && (t = t.concat(e)), r = t;
1838
+ } else n === void 0 && t && (n = t, t = void 0);
1839
+ let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = ue(this, a || "a"), p = {
1840
+ aliasDuplicateObjects: i ?? !0,
1841
+ keepUndefined: s ?? !1,
1842
+ onAnchor: u,
1843
+ onTagObj: c,
1844
+ replacer: r,
1845
+ schema: this.schema,
1846
+ sourceObjects: f
1847
+ }, m = _e(e, l, p);
1848
+ return o && S(m) && (m.flow = !0), d(), m;
1849
+ }
1850
+ createPair(e, t, n = {}) {
1851
+ return new R(this.createNode(e, null, n), this.createNode(t, null, n));
1852
+ }
1853
+ delete(e) {
1854
+ return K(this.contents) ? this.contents.delete(e) : !1;
1855
+ }
1856
+ deleteIn(e) {
1857
+ return ye(e) ? this.contents != null && (this.contents = null, !0) : K(this.contents) ? this.contents.deleteIn(e) : !1;
1858
+ }
1859
+ get(e, t) {
1860
+ return S(this.contents) ? this.contents.get(e, t) : void 0;
1861
+ }
1862
+ getIn(e, t) {
1863
+ return ye(e) ? !t && b(this.contents) ? this.contents.value : this.contents : S(this.contents) ? this.contents.getIn(e, t) : void 0;
1864
+ }
1865
+ has(e) {
1866
+ return S(this.contents) ? this.contents.has(e) : !1;
1867
+ }
1868
+ hasIn(e) {
1869
+ return ye(e) ? this.contents !== void 0 : S(this.contents) ? this.contents.hasIn(e) : !1;
1870
+ }
1871
+ set(e, t) {
1872
+ this.contents == null ? this.contents = ve(this.schema, [e], t) : K(this.contents) && this.contents.set(e, t);
1873
+ }
1874
+ setIn(e, t) {
1875
+ ye(e) ? this.contents = t : this.contents == null ? this.contents = ve(this.schema, Array.from(e), t) : K(this.contents) && this.contents.setIn(e, t);
1876
+ }
1877
+ setSchema(e, t = {}) {
1878
+ typeof e == "number" && (e = String(e));
1879
+ let n;
1880
+ switch (e) {
1881
+ case "1.1":
1882
+ this.directives ? this.directives.yaml.version = "1.1" : this.directives = new O({ version: "1.1" }), n = {
1883
+ resolveKnownTags: !1,
1884
+ schema: "yaml-1.1"
1885
+ };
1886
+ break;
1887
+ case "1.2":
1888
+ case "next":
1889
+ this.directives ? this.directives.yaml.version = e : this.directives = new O({ version: e }), n = {
1890
+ resolveKnownTags: !0,
1891
+ schema: "core"
1892
+ };
1893
+ break;
1894
+ case null:
1895
+ this.directives && delete this.directives, n = null;
1896
+ break;
1897
+ default: {
1898
+ let t = JSON.stringify(e);
1899
+ throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`);
1900
+ }
1901
+ }
1902
+ if (t.schema instanceof Object) this.schema = t.schema;
1903
+ else if (n) this.schema = new qt(Object.assign(n, t));
1904
+ else throw Error("With a null YAML version, the { schema: Schema } option is required");
1905
+ }
1906
+ toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: a } = {}) {
1907
+ let o = {
1908
+ anchors: new Map(),
1909
+ doc: this,
1910
+ keep: !e,
1911
+ mapAsMap: n === !0,
1912
+ mapKeyWarned: !1,
1913
+ maxAliasCount: typeof r == "number" ? r : 100
1914
+ }, s = A(this.contents, t ?? "", o);
1915
+ if (typeof i == "function") for (let { count: e, res: t } of o.anchors.values()) i(t, e);
1916
+ return typeof a == "function" ? k(a, { "": s }, "", s) : s;
1917
+ }
1918
+ toJSON(e, t) {
1919
+ return this.toJS({
1920
+ json: !0,
1921
+ jsonArg: e,
1922
+ mapAsMap: !1,
1923
+ onAnchor: t
1924
+ });
1925
+ }
1926
+ toString(e = {}) {
1927
+ if (this.errors.length > 0) throw Error("Document with errors cannot be stringified");
1928
+ if ("indent" in e && (!Number.isInteger(e.indent) || Number(e.indent) <= 0)) {
1929
+ let t = JSON.stringify(e.indent);
1930
+ throw Error(`"indent" option must be a positive integer, not ${t}`);
1931
+ }
1932
+ return Jt(this, e);
1933
+ }
1934
+ };
1935
+ function K(e) {
1936
+ if (S(e)) return !0;
1937
+ throw Error("Expected a YAML collection as document contents");
1938
+ }
1939
+ //#endregion
1940
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js
1941
+ var Xt = class extends Error {
1942
+ constructor(e, t, n, r) {
1943
+ super(), this.name = e, this.code = n, this.message = r, this.pos = t;
1944
+ }
1945
+ }, Zt = class extends Xt {
1946
+ constructor(e, t, n) {
1947
+ super("YAMLParseError", e, t, n);
1948
+ }
1949
+ }, Qt = class extends Xt {
1950
+ constructor(e, t, n) {
1951
+ super("YAMLWarning", e, t, n);
1952
+ }
1953
+ }, $t = (e, t) => (n) => {
1954
+ if (n.pos[0] === -1) return;
1955
+ n.linePos = n.pos.map((e) => t.linePos(e));
1956
+ let { line: r, col: i } = n.linePos[0];
1957
+ n.message += ` at line ${r}, column ${i}`;
1958
+ let a = i - 1, o = e.substring(t.lineStarts[r - 1], t.lineStarts[r]).replace(/[\n\r]+$/, "");
1959
+ if (a >= 60 && o.length > 80) {
1960
+ let e = Math.min(a - 39, o.length - 79);
1961
+ o = "…" + o.substring(e), a -= e - 1;
1962
+ }
1963
+ if (o.length > 80 && (o = o.substring(0, 79) + "…"), r > 1 && /^ *$/.test(o.substring(0, a))) {
1964
+ let n = e.substring(t.lineStarts[r - 2], t.lineStarts[r - 1]);
1965
+ n.length > 80 && (n = n.substring(0, 79) + "…\n"), o = n + o;
1966
+ }
1967
+ if (/[^ ]/.test(o)) {
1968
+ let e = 1, t = n.linePos[1];
1969
+ t?.line === r && t.col > i && (e = Math.max(1, Math.min(t.col - i, 80 - a)));
1970
+ let s = " ".repeat(a) + "^".repeat(e);
1971
+ n.message += `:\n\n${o}\n${s}\n`;
1972
+ }
1973
+ };
1974
+ //#endregion
1975
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js
1976
+ function q(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
1977
+ let c = !1, l = s, u = s, d = "", f = "", p = !1, m = !1, h = null, g = null, _ = null, v = null, y = null, b = null, x = null;
1978
+ for (let i of e) switch (m &&= (i.type !== "space" && i.type !== "newline" && i.type !== "comma" && a(i.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), !1), h &&= (l && i.type !== "comment" && i.type !== "newline" && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), null), i.type) {
1979
+ case "space":
1980
+ !t && (n !== "doc-start" || r?.type !== "flow-collection") && i.source.includes(" ") && (h = i), u = !0;
1981
+ break;
1982
+ case "comment": {
1983
+ u || a(i, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
1984
+ let e = i.source.substring(1) || " ";
1985
+ d ? d += f + e : d = e, f = "", l = !1;
1986
+ break;
1987
+ }
1988
+ case "newline":
1989
+ l ? d ? d += i.source : (!b || n !== "seq-item-ind") && (c = !0) : f += i.source, l = !0, p = !0, (g || _) && (v = i), u = !0;
1990
+ break;
1991
+ case "anchor":
1992
+ g && a(i, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), i.source.endsWith(":") && a(i.offset + i.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), g = i, x ??= i.offset, l = !1, u = !1, m = !0;
1993
+ break;
1994
+ case "tag":
1995
+ _ && a(i, "MULTIPLE_TAGS", "A node can have at most one tag"), _ = i, x ??= i.offset, l = !1, u = !1, m = !0;
1996
+ break;
1997
+ case n:
1998
+ (g || _) && a(i, "BAD_PROP_ORDER", `Anchors and tags must be after the ${i.source} indicator`), b && a(i, "UNEXPECTED_TOKEN", `Unexpected ${i.source} in ${t ?? "collection"}`), b = i, l = n === "seq-item-ind" || n === "explicit-key-ind", u = !1;
1999
+ break;
2000
+ case "comma": if (t) {
2001
+ y && a(i, "UNEXPECTED_TOKEN", `Unexpected , in ${t}`), y = i, l = !1, u = !1;
2002
+ break;
2003
+ }
2004
+ default: a(i, "UNEXPECTED_TOKEN", `Unexpected ${i.type} token`), l = !1, u = !1;
2005
+ }
2006
+ let S = e[e.length - 1], C = S ? S.offset + S.source.length : i;
2007
+ return m && r && r.type !== "space" && r.type !== "newline" && r.type !== "comma" && (r.type !== "scalar" || r.source !== "") && a(r.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), h && (l && h.indent <= o || r?.type === "block-map" || r?.type === "block-seq") && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
2008
+ comma: y,
2009
+ found: b,
2010
+ spaceBefore: c,
2011
+ comment: d,
2012
+ hasNewline: p,
2013
+ anchor: g,
2014
+ tag: _,
2015
+ newlineAfterProp: v,
2016
+ end: C,
2017
+ start: x ?? C
2018
+ };
2019
+ }
2020
+ //#endregion
2021
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js
2022
+ function J(e) {
2023
+ if (!e) return null;
2024
+ switch (e.type) {
2025
+ case "alias":
2026
+ case "scalar":
2027
+ case "double-quoted-scalar":
2028
+ case "single-quoted-scalar":
2029
+ if (e.source.includes("\n")) return !0;
2030
+ if (e.end) {
2031
+ for (let t of e.end) if (t.type === "newline") return !0;
2032
+ }
2033
+ return !1;
2034
+ case "flow-collection":
2035
+ for (let t of e.items) {
2036
+ for (let e of t.start) if (e.type === "newline") return !0;
2037
+ if (t.sep) {
2038
+ for (let e of t.sep) if (e.type === "newline") return !0;
2039
+ }
2040
+ if (J(t.key) || J(t.value)) return !0;
2041
+ }
2042
+ return !1;
2043
+ default: return !0;
2044
+ }
2045
+ }
2046
+ //#endregion
2047
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
2048
+ function en(e, t, n) {
2049
+ if (t?.type === "flow-collection") {
2050
+ let r = t.end[0];
2051
+ r.indent === e && (r.source === "]" || r.source === "}") && J(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2052
+ }
2053
+ }
2054
+ //#endregion
2055
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js
2056
+ function tn(e, t, n) {
2057
+ let { uniqueKeys: r } = e.options;
2058
+ if (r === !1) return !1;
2059
+ let i = typeof r == "function" ? r : (e, t) => e === t || b(e) && b(t) && e.value === t.value;
2060
+ return t.some((e) => i(e.key, n));
2061
+ }
2062
+ //#endregion
2063
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js
2064
+ var nn = "All mapping items must start at the same column";
2065
+ function rn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2066
+ let o = new ((a?.nodeClass) ?? B)(n.schema);
2067
+ n.atRoot &&= !1;
2068
+ let s = r.offset, c = null;
2069
+ for (let a of r.items) {
2070
+ let { start: l, key: u, sep: d, value: f } = a, p = q(l, {
2071
+ indicator: "explicit-key-ind",
2072
+ next: u ?? d?.[0],
2073
+ offset: s,
2074
+ onError: i,
2075
+ parentIndent: r.indent,
2076
+ startOnNewline: !0
2077
+ }), m = !p.found;
2078
+ if (m) {
2079
+ if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", nn)), !p.anchor && !p.tag && !d) {
2080
+ c = p.end, p.comment && (o.comment ? o.comment += "\n" + p.comment : o.comment = p.comment);
2081
+ continue;
2082
+ }
2083
+ (p.newlineAfterProp || J(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2084
+ } else p.found?.indent !== r.indent && i(s, "BAD_INDENT", nn);
2085
+ n.atKey = !0;
2086
+ let h = p.end, g = u ? e(n, u, p, i) : t(n, h, l, null, p, i);
2087
+ n.schema.compat && en(r.indent, u, i), n.atKey = !1, tn(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
2088
+ let _ = q(d ?? [], {
2089
+ indicator: "map-value-ind",
2090
+ next: f,
2091
+ offset: g.range[2],
2092
+ onError: i,
2093
+ parentIndent: r.indent,
2094
+ startOnNewline: !u || u.type === "block-scalar"
2095
+ });
2096
+ if (s = _.end, _.found) {
2097
+ m && (f?.type === "block-map" && !_.hasNewline && i(s, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && p.start < _.found.offset - 1024 && i(g.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2098
+ let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
2099
+ n.schema.compat && en(r.indent, f, i), s = c.range[2];
2100
+ let l = new R(g, c);
2101
+ n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
2102
+ } else {
2103
+ m && i(g.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2104
+ let e = new R(g);
2105
+ n.options.keepSourceTokens && (e.srcToken = a), o.items.push(e);
2106
+ }
2107
+ }
2108
+ return c && c < s && i(c, "IMPOSSIBLE", "Map comment with trailing content"), o.range = [
2109
+ r.offset,
2110
+ s,
2111
+ c ?? s
2112
+ ], o;
2113
+ }
2114
+ //#endregion
2115
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js
2116
+ function an({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2117
+ let o = new ((a?.nodeClass) ?? H)(n.schema);
2118
+ n.atRoot &&= !1, n.atKey &&= !1;
2119
+ let s = r.offset, c = null;
2120
+ for (let { start: a, value: l } of r.items) {
2121
+ let u = q(a, {
2122
+ indicator: "seq-item-ind",
2123
+ next: l,
2124
+ offset: s,
2125
+ onError: i,
2126
+ parentIndent: r.indent,
2127
+ startOnNewline: !0
2128
+ });
2129
+ if (!u.found) {
2130
+ if (u.anchor || u.tag || l) l?.type === "block-seq" ? i(u.end, "BAD_INDENT", "All sequence items must start at the same column") : i(s, "MISSING_CHAR", "Sequence item without - indicator");
2131
+ else {
2132
+ c = u.end, u.comment && (o.comment = u.comment);
2133
+ continue;
2134
+ }
2135
+ }
2136
+ let d = l ? e(n, l, u, i) : t(n, u.end, a, null, u, i);
2137
+ n.schema.compat && en(r.indent, l, i), s = d.range[2], o.items.push(d);
2138
+ }
2139
+ return o.range = [
2140
+ r.offset,
2141
+ s,
2142
+ c ?? s
2143
+ ], o;
2144
+ }
2145
+ //#endregion
2146
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js
2147
+ function on(e, t, n, r) {
2148
+ let i = "";
2149
+ if (e) {
2150
+ let a = !1, o = "";
2151
+ for (let s of e) {
2152
+ let { source: e, type: c } = s;
2153
+ switch (c) {
2154
+ case "space":
2155
+ a = !0;
2156
+ break;
2157
+ case "comment": {
2158
+ n && !a && r(s, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2159
+ let t = e.substring(1) || " ";
2160
+ i ? i += o + t : i = t, o = "";
2161
+ break;
2162
+ }
2163
+ case "newline":
2164
+ i && (o += e), a = !0;
2165
+ break;
2166
+ default: r(s, "UNEXPECTED_TOKEN", `Unexpected ${c} at node end`);
2167
+ }
2168
+ t += e.length;
2169
+ }
2170
+ }
2171
+ return {
2172
+ comment: i,
2173
+ offset: t
2174
+ };
2175
+ }
2176
+ //#endregion
2177
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
2178
+ var sn = "Block collections are not allowed within flow collections", cn = (e) => e && (e.type === "block-map" || e.type === "block-seq");
2179
+ function ln({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2180
+ let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? B : H))(n.schema);
2181
+ c.flow = !0;
2182
+ let l = n.atRoot;
2183
+ l && (n.atRoot = !1), n.atKey &&= !1;
2184
+ let u = r.offset + r.start.source.length;
2185
+ for (let a = 0; a < r.items.length; ++a) {
2186
+ let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = q(d, {
2187
+ flow: s,
2188
+ indicator: "explicit-key-ind",
2189
+ next: f ?? p?.[0],
2190
+ offset: u,
2191
+ onError: i,
2192
+ parentIndent: r.indent,
2193
+ startOnNewline: !1
2194
+ });
2195
+ if (!h.found) {
2196
+ if (!h.anchor && !h.tag && !p && !m) {
2197
+ a === 0 && h.comma ? i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`) : a < r.items.length - 1 && i(h.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${s}`), h.comment && (c.comment ? c.comment += "\n" + h.comment : c.comment = h.comment), u = h.end;
2198
+ continue;
2199
+ }
2200
+ !o && n.options.strict && J(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2201
+ }
2202
+ if (a === 0) h.comma && i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`);
2203
+ else if (h.comma || i(h.start, "MISSING_CHAR", `Missing , between ${s} items`), h.comment) {
2204
+ let e = "";
2205
+ loop: for (let t of d) switch (t.type) {
2206
+ case "comma":
2207
+ case "space": break;
2208
+ case "comment":
2209
+ e = t.source.substring(1);
2210
+ break loop;
2211
+ default: break loop;
2212
+ }
2213
+ if (e) {
2214
+ let t = c.items[c.items.length - 1];
2215
+ y(t) && (t = t.value ?? t.key), t.comment ? t.comment += "\n" + e : t.comment = e, h.comment = h.comment.substring(e.length + 1);
2216
+ }
2217
+ }
2218
+ if (!o && !p && !h.found) {
2219
+ let r = m ? e(n, m, h, i) : t(n, h.end, p, null, h, i);
2220
+ c.items.push(r), u = r.range[2], cn(m) && i(r.range, "BLOCK_IN_FLOW", sn);
2221
+ } else {
2222
+ n.atKey = !0;
2223
+ let a = h.end, g = f ? e(n, f, h, i) : t(n, a, d, null, h, i);
2224
+ cn(f) && i(g.range, "BLOCK_IN_FLOW", sn), n.atKey = !1;
2225
+ let _ = q(p ?? [], {
2226
+ flow: s,
2227
+ indicator: "map-value-ind",
2228
+ next: m,
2229
+ offset: g.range[2],
2230
+ onError: i,
2231
+ parentIndent: r.indent,
2232
+ startOnNewline: !1
2233
+ });
2234
+ if (_.found) {
2235
+ if (!o && !h.found && n.options.strict) {
2236
+ if (p) for (let e of p) {
2237
+ if (e === _.found) break;
2238
+ if (e.type === "newline") {
2239
+ i(e, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2240
+ break;
2241
+ }
2242
+ }
2243
+ h.start < _.found.offset - 1024 && i(_.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
2244
+ }
2245
+ } else m && ("source" in m && m.source?.[0] === ":" ? i(m, "MISSING_CHAR", `Missing space after : in ${s}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${s} items`));
2246
+ let v = m ? e(n, m, _, i) : _.found ? t(n, _.end, p, null, _, i) : null;
2247
+ v ? cn(m) && i(v.range, "BLOCK_IN_FLOW", sn) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2248
+ let y = new R(g, v);
2249
+ if (n.options.keepSourceTokens && (y.srcToken = l), o) {
2250
+ let e = c;
2251
+ tn(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
2252
+ } else {
2253
+ let e = new B(n.schema);
2254
+ e.flow = !0, e.items.push(y);
2255
+ let t = (v ?? g).range;
2256
+ e.range = [
2257
+ g.range[0],
2258
+ t[1],
2259
+ t[2]
2260
+ ], c.items.push(e);
2261
+ }
2262
+ u = v ? v.range[2] : _.end;
2263
+ }
2264
+ }
2265
+ let d = o ? "}" : "]", [f, ...p] = r.end, m = u;
2266
+ if (f?.source === d) m = f.offset + f.source.length;
2267
+ else {
2268
+ let e = s[0].toUpperCase() + s.substring(1), t = l ? `${e} must end with a ${d}` : `${e} in block collection must be sufficiently indented and end with a ${d}`;
2269
+ i(u, l ? "MISSING_CHAR" : "BAD_INDENT", t), f && f.source.length !== 1 && p.unshift(f);
2270
+ }
2271
+ if (p.length > 0) {
2272
+ let e = on(p, m, n.options.strict, i);
2273
+ e.comment && (c.comment ? c.comment += "\n" + e.comment : c.comment = e.comment), c.range = [
2274
+ r.offset,
2275
+ m,
2276
+ e.offset
2277
+ ];
2278
+ } else c.range = [
2279
+ r.offset,
2280
+ m,
2281
+ m
2282
+ ];
2283
+ return c;
2284
+ }
2285
+ //#endregion
2286
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js
2287
+ function un(e, t, n, r, i, a) {
2288
+ let o = n.type === "block-map" ? rn(e, t, n, r, a) : n.type === "block-seq" ? an(e, t, n, r, a) : ln(e, t, n, r, a), s = o.constructor;
2289
+ return i === "!" || i === s.tagName ? (o.tag = s.tagName, o) : (i && (o.tag = i), o);
2290
+ }
2291
+ function dn(e, t, n, r, i) {
2292
+ let a = r.tag, o = a ? t.directives.tagName(a.source, (e) => i(a, "TAG_RESOLVE_FAILED", e)) : null;
2293
+ if (n.type === "block-seq") {
2294
+ let { anchor: e, newlineAfterProp: t } = r, n = e && a ? e.offset > a.offset ? e : a : e ?? a;
2295
+ n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
2296
+ }
2297
+ let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
2298
+ if (!a || !o || o === "!" || o === B.tagName && s === "map" || o === H.tagName && s === "seq") return un(e, t, n, i, o);
2299
+ let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
2300
+ if (!c) {
2301
+ let r = t.schema.knownTags[o];
2302
+ if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
2303
+ else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), un(e, t, n, i, o);
2304
+ }
2305
+ let l = un(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = C(u) ? u : new j(u);
2306
+ return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
2307
+ }
2308
+ //#endregion
2309
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
2310
+ function fn(e, t, n) {
2311
+ let r = t.offset, i = pn(t, e.options.strict, n);
2312
+ if (!i) return {
2313
+ value: "",
2314
+ type: null,
2315
+ comment: "",
2316
+ range: [
2317
+ r,
2318
+ r,
2319
+ r
2320
+ ]
2321
+ };
2322
+ let a = i.mode === ">" ? j.BLOCK_FOLDED : j.BLOCK_LITERAL, o = t.source ? mn(t.source) : [], s = o.length;
2323
+ for (let e = o.length - 1; e >= 0; --e) {
2324
+ let t = o[e][1];
2325
+ if (t === "" || t === "\r") s = e;
2326
+ else break;
2327
+ }
2328
+ if (s === 0) {
2329
+ let e = i.chomp === "+" && o.length > 0 ? "\n".repeat(Math.max(1, o.length - 1)) : "", n = r + i.length;
2330
+ return t.source && (n += t.source.length), {
2331
+ value: e,
2332
+ type: a,
2333
+ comment: i.comment,
2334
+ range: [
2335
+ r,
2336
+ n,
2337
+ n
2338
+ ]
2339
+ };
2340
+ }
2341
+ let c = t.indent + i.indent, l = t.offset + i.length, u = 0;
2342
+ for (let t = 0; t < s; ++t) {
2343
+ let [r, a] = o[t];
2344
+ if (a === "" || a === "\r") i.indent === 0 && r.length > c && (c = r.length);
2345
+ else {
2346
+ r.length < c && n(l + r.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), i.indent === 0 && (c = r.length), u = t, c === 0 && !e.atRoot && n(l, "BAD_INDENT", "Block scalar values in collections must be indented");
2347
+ break;
2348
+ }
2349
+ l += r.length + a.length + 1;
2350
+ }
2351
+ for (let e = o.length - 1; e >= s; --e) o[e][0].length > c && (s = e + 1);
2352
+ let d = "", f = "", p = !1;
2353
+ for (let e = 0; e < u; ++e) d += o[e][0].slice(c) + "\n";
2354
+ for (let e = u; e < s; ++e) {
2355
+ let [t, r] = o[e];
2356
+ l += t.length + r.length + 1;
2357
+ let s = r[r.length - 1] === "\r";
2358
+ if (s && (r = r.slice(0, -1)), r && t.length < c) {
2359
+ let e = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2360
+ n(l - r.length - (s ? 2 : 1), "BAD_INDENT", e), t = "";
2361
+ }
2362
+ a === j.BLOCK_LITERAL ? (d += f + t.slice(c) + r, f = "\n") : t.length > c || r[0] === " " ? (f === " " ? f = "\n" : !p && f === "\n" && (f = "\n\n"), d += f + t.slice(c) + r, f = "\n", p = !0) : r === "" ? f === "\n" ? d += "\n" : f = "\n" : (d += f + r, f = " ", p = !1);
2363
+ }
2364
+ switch (i.chomp) {
2365
+ case "-": break;
2366
+ case "+":
2367
+ for (let e = s; e < o.length; ++e) d += "\n" + o[e][0].slice(c);
2368
+ d[d.length - 1] !== "\n" && (d += "\n");
2369
+ break;
2370
+ default: d += "\n";
2371
+ }
2372
+ let m = r + i.length + t.source.length;
2373
+ return {
2374
+ value: d,
2375
+ type: a,
2376
+ comment: i.comment,
2377
+ range: [
2378
+ r,
2379
+ m,
2380
+ m
2381
+ ]
2382
+ };
2383
+ }
2384
+ function pn({ offset: e, props: t }, n, r) {
2385
+ if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2386
+ let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
2387
+ for (let t = 1; t < i.length; ++t) {
2388
+ let n = i[t];
2389
+ if (!s && (n === "-" || n === "+")) s = n;
2390
+ else {
2391
+ let r = Number(n);
2392
+ !o && r ? o = r : c === -1 && (c = e + t);
2393
+ }
2394
+ }
2395
+ c !== -1 && r(c, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
2396
+ let l = !1, u = "", d = i.length;
2397
+ for (let e = 1; e < t.length; ++e) {
2398
+ let i = t[e];
2399
+ switch (i.type) {
2400
+ case "space": l = !0;
2401
+ case "newline":
2402
+ d += i.source.length;
2403
+ break;
2404
+ case "comment":
2405
+ n && !l && r(i, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), d += i.source.length, u = i.source.substring(1);
2406
+ break;
2407
+ case "error":
2408
+ r(i, "UNEXPECTED_TOKEN", i.message), d += i.source.length;
2409
+ break;
2410
+ default: {
2411
+ r(i, "UNEXPECTED_TOKEN", `Unexpected token in block scalar header: ${i.type}`);
2412
+ let e = i.source;
2413
+ e && typeof e == "string" && (d += e.length);
2414
+ }
2415
+ }
2416
+ }
2417
+ return {
2418
+ mode: a,
2419
+ indent: o,
2420
+ chomp: s,
2421
+ comment: u,
2422
+ length: d
2423
+ };
2424
+ }
2425
+ function mn(e) {
2426
+ let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
2427
+ for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
2428
+ return i;
2429
+ }
2430
+ //#endregion
2431
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
2432
+ function hn(e, t, n) {
2433
+ let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
2434
+ switch (i) {
2435
+ case "scalar":
2436
+ s = j.PLAIN, c = gn(a, l);
2437
+ break;
2438
+ case "single-quoted-scalar":
2439
+ s = j.QUOTE_SINGLE, c = _n(a, l);
2440
+ break;
2441
+ case "double-quoted-scalar":
2442
+ s = j.QUOTE_DOUBLE, c = yn(a, l);
2443
+ break;
2444
+ default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
2445
+ value: "",
2446
+ type: null,
2447
+ comment: "",
2448
+ range: [
2449
+ r,
2450
+ r + a.length,
2451
+ r + a.length
2452
+ ]
2453
+ };
2454
+ }
2455
+ let u = r + a.length, d = on(o, u, t, n);
2456
+ return {
2457
+ value: c,
2458
+ type: s,
2459
+ comment: d.comment,
2460
+ range: [
2461
+ r,
2462
+ u,
2463
+ d.offset
2464
+ ]
2465
+ };
2466
+ }
2467
+ function gn(e, t) {
2468
+ let n = "";
2469
+ switch (e[0]) {
2470
+ case " ":
2471
+ n = "a tab character";
2472
+ break;
2473
+ case ",":
2474
+ n = "flow indicator character ,";
2475
+ break;
2476
+ case "%":
2477
+ n = "directive indicator character %";
2478
+ break;
2479
+ case "|":
2480
+ case ">":
2481
+ n = `block scalar indicator ${e[0]}`;
2482
+ break;
2483
+ case "@":
2484
+ case "`": n = `reserved character ${e[0]}`;
2485
+ }
2486
+ return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), vn(e);
2487
+ }
2488
+ function _n(e, t) {
2489
+ return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), vn(e.slice(1, -1)).replace(/''/g, "'");
2490
+ }
2491
+ function vn(e) {
2492
+ let t, n;
2493
+ try {
2494
+ t = RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy"), n = RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
2495
+ } catch {
2496
+ t = /(.*?)[ \t]*\r?\n/sy, n = /[ \t]*(.*?)[ \t]*\r?\n/sy;
2497
+ }
2498
+ let r = t.exec(e);
2499
+ if (!r) return e;
2500
+ let i = r[1], a = " ", o = t.lastIndex;
2501
+ for (n.lastIndex = o; r = n.exec(e);) r[1] === "" ? a === "\n" ? i += a : a = "\n" : (i += a + r[1], a = " "), o = n.lastIndex;
2502
+ let s = /[ \t]*(.*)/sy;
2503
+ return s.lastIndex = o, r = s.exec(e), i + a + (r?.[1] ?? "");
2504
+ }
2505
+ function yn(e, t) {
2506
+ let n = "";
2507
+ for (let r = 1; r < e.length - 1; ++r) {
2508
+ let i = e[r];
2509
+ if (i !== "\r" || e[r + 1] !== "\n") {
2510
+ if (i === "\n") {
2511
+ let { fold: t, offset: i } = bn(e, r);
2512
+ n += t, r = i;
2513
+ } else if (i === "\\") {
2514
+ let i = e[++r], a = xn[i];
2515
+ if (a) n += a;
2516
+ else if (i === "\n") for (i = e[r + 1]; i === " " || i === " ";) i = e[++r + 1];
2517
+ else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === " ";) i = e[++r + 1];
2518
+ else if (i === "x" || i === "u" || i === "U") {
2519
+ let a = i === "x" ? 2 : i === "u" ? 4 : 8;
2520
+ n += Sn(e, r + 1, a, t), r += a;
2521
+ } else {
2522
+ let i = e.substr(r - 1, 2);
2523
+ t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
2524
+ }
2525
+ } else if (i === " " || i === " ") {
2526
+ let t = r, a = e[r + 1];
2527
+ for (; a === " " || a === " ";) a = e[++r + 1];
2528
+ a !== "\n" && (a !== "\r" || e[r + 2] !== "\n") && (n += r > t ? e.slice(t, r + 1) : i);
2529
+ } else n += i;
2530
+ }
2531
+ }
2532
+ return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
2533
+ }
2534
+ function bn(e, t) {
2535
+ let n = "", r = e[t + 1];
2536
+ for (; (r === " " || r === " " || r === "\n" || r === "\r") && (r !== "\r" || e[t + 2] === "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
2537
+ return n ||= " ", {
2538
+ fold: n,
2539
+ offset: t
2540
+ };
2541
+ }
2542
+ var xn = {
2543
+ 0: "\0",
2544
+ a: "\x07",
2545
+ b: "\b",
2546
+ e: "\x1B",
2547
+ f: "\f",
2548
+ n: "\n",
2549
+ r: "\r",
2550
+ t: " ",
2551
+ v: "\v",
2552
+ N: "…",
2553
+ _: "\xA0",
2554
+ L: "\u2028",
2555
+ P: "\u2029",
2556
+ " ": " ",
2557
+ "\"": "\"",
2558
+ "/": "/",
2559
+ "\\": "\\",
2560
+ " ": " "
2561
+ };
2562
+ function Sn(e, t, n, r) {
2563
+ let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
2564
+ try {
2565
+ return String.fromCodePoint(a);
2566
+ } catch {
2567
+ let i = e.substr(t - 2, n + 2);
2568
+ return r(t - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), i;
2569
+ }
2570
+ }
2571
+ //#endregion
2572
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js
2573
+ function Cn(e, t, n, r) {
2574
+ let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? fn(e, t, r) : hn(t, e.options.strict, r), c = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, l;
2575
+ l = e.options.stringKeys && e.atKey ? e.schema[p] : c ? wn(e.schema, i, c, n, r) : t.type === "scalar" ? Tn(e, i, t, r) : e.schema[p];
2576
+ let u;
2577
+ try {
2578
+ let a = l.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
2579
+ u = b(a) ? a : new j(a);
2580
+ } catch (e) {
2581
+ let a = e instanceof Error ? e.message : String(e);
2582
+ r(n ?? t, "TAG_RESOLVE_FAILED", a), u = new j(i);
2583
+ }
2584
+ return u.range = s, u.source = i, a && (u.type = a), c && (u.tag = c), l.format && (u.format = l.format), o && (u.comment = o), u;
2585
+ }
2586
+ function wn(e, t, n, r, i) {
2587
+ if (n === "!") return e[p];
2588
+ let a = [];
2589
+ for (let t of e.tags) if (!t.collection && t.tag === n) {
2590
+ if (t.default && t.test) a.push(t);
2591
+ else return t;
2592
+ }
2593
+ for (let e of a) if (e.test?.test(t)) return e;
2594
+ let o = e.knownTags[n];
2595
+ return o && !o.collection ? (e.tags.push(Object.assign({}, o, {
2596
+ default: !1,
2597
+ test: void 0
2598
+ })), o) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[p]);
2599
+ }
2600
+ function Tn({ atKey: e, directives: t, schema: n }, r, i, a) {
2601
+ let o = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[p];
2602
+ if (n.compat) {
2603
+ let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[p];
2604
+ o.tag !== e.tag && a(i, "TAG_RESOLVE_FAILED", `Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`, !0);
2605
+ }
2606
+ return o;
2607
+ }
2608
+ //#endregion
2609
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
2610
+ function En(e, t, n) {
2611
+ if (t) {
2612
+ n ??= t.length;
2613
+ for (let r = n - 1; r >= 0; --r) {
2614
+ let n = t[r];
2615
+ switch (n.type) {
2616
+ case "space":
2617
+ case "comment":
2618
+ case "newline":
2619
+ e -= n.source.length;
2620
+ continue;
2621
+ }
2622
+ for (n = t[++r]; n?.type === "space";) e += n.source.length, n = t[++r];
2623
+ break;
2624
+ }
2625
+ }
2626
+ return e;
2627
+ }
2628
+ //#endregion
2629
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js
2630
+ var Dn = {
2631
+ composeNode: On,
2632
+ composeEmptyNode: kn
2633
+ };
2634
+ function On(e, t, n, r) {
2635
+ let i = e.atKey, { spaceBefore: a, comment: o, anchor: s, tag: c } = n, l, u = !0;
2636
+ switch (t.type) {
2637
+ case "alias":
2638
+ l = An(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
2639
+ break;
2640
+ case "scalar":
2641
+ case "single-quoted-scalar":
2642
+ case "double-quoted-scalar":
2643
+ case "block-scalar":
2644
+ l = Cn(e, t, c, r), s && (l.anchor = s.source.substring(1));
2645
+ break;
2646
+ case "block-map":
2647
+ case "block-seq":
2648
+ case "flow-collection":
2649
+ try {
2650
+ l = dn(Dn, e, t, n, r), s && (l.anchor = s.source.substring(1));
2651
+ } catch (e) {
2652
+ r(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
2653
+ }
2654
+ break;
2655
+ default: r(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), u = !1;
2656
+ }
2657
+ return l ??= kn(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!b(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
2658
+ }
2659
+ function kn(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
2660
+ let u = Cn(e, {
2661
+ type: "scalar",
2662
+ offset: En(t, n, r),
2663
+ indent: -1,
2664
+ source: ""
2665
+ }, s, l);
2666
+ return o && (u.anchor = o.source.substring(1), u.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), a && (u.comment = a, u.range[2] = c), u;
2667
+ }
2668
+ function An({ options: e }, { offset: t, source: n, end: r }, i) {
2669
+ let a = new fe(n.substring(1));
2670
+ a.source === "" && i(t, "BAD_ALIAS", "Alias cannot be an empty string"), a.source.endsWith(":") && i(t + n.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
2671
+ let o = t + n.length, s = on(r, o, e.strict, i);
2672
+ return a.range = [
2673
+ t,
2674
+ o,
2675
+ s.offset
2676
+ ], s.comment && (a.comment = s.comment), a;
2677
+ }
2678
+ //#endregion
2679
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js
2680
+ function jn(e, t, { offset: n, start: r, value: i, end: a }, o) {
2681
+ let s = new Yt(void 0, Object.assign({ _directives: t }, e)), c = {
2682
+ atKey: !1,
2683
+ atRoot: !0,
2684
+ directives: s.directives,
2685
+ options: s.options,
2686
+ schema: s.schema
2687
+ }, l = q(r, {
2688
+ indicator: "doc-start",
2689
+ next: i ?? a?.[0],
2690
+ offset: n,
2691
+ onError: o,
2692
+ parentIndent: 0,
2693
+ startOnNewline: !0
2694
+ });
2695
+ l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? On(c, i, l, o) : kn(c, l.end, r, null, l, o);
2696
+ let u = s.contents.range[2], d = on(a, u, !1, o);
2697
+ return d.comment && (s.comment = d.comment), s.range = [
2698
+ n,
2699
+ u,
2700
+ d.offset
2701
+ ], s;
2702
+ }
2703
+ //#endregion
2704
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js
2705
+ function Mn(e) {
2706
+ if (typeof e == "number") return [e, e + 1];
2707
+ if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
2708
+ let { offset: t, source: n } = e;
2709
+ return [t, t + (typeof n == "string" ? n.length : 1)];
2710
+ }
2711
+ function Nn(e) {
2712
+ let t = "", n = !1, r = !1;
2713
+ for (let i = 0; i < e.length; ++i) {
2714
+ let a = e[i];
2715
+ switch (a[0]) {
2716
+ case "#":
2717
+ t += (t === "" ? "" : r ? "\n\n" : "\n") + (a.substring(1) || " "), n = !0, r = !1;
2718
+ break;
2719
+ case "%":
2720
+ e[i + 1]?.[0] !== "#" && (i += 1), n = !1;
2721
+ break;
2722
+ default: n || (r = !0), n = !1;
2723
+ }
2724
+ }
2725
+ return {
2726
+ comment: t,
2727
+ afterEmptyLine: r
2728
+ };
2729
+ }
2730
+ var Pn = class {
2731
+ constructor(e = {}) {
2732
+ this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
2733
+ let i = Mn(e);
2734
+ r ? this.warnings.push(new Qt(i, t, n)) : this.errors.push(new Zt(i, t, n));
2735
+ }, this.directives = new O({ version: e.version || "1.2" }), this.options = e;
2736
+ }
2737
+ decorate(e, t) {
2738
+ let { comment: n, afterEmptyLine: r } = Nn(this.prelude);
2739
+ if (n) {
2740
+ let i = e.contents;
2741
+ if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
2742
+ else if (r || e.directives.docStart || !i) e.commentBefore = n;
2743
+ else if (S(i) && !i.flow && i.items.length > 0) {
2744
+ let e = i.items[0];
2745
+ y(e) && (e = e.key);
2746
+ let t = e.commentBefore;
2747
+ e.commentBefore = t ? `${n}\n${t}` : n;
2748
+ } else {
2749
+ let e = i.commentBefore;
2750
+ i.commentBefore = e ? `${n}\n${e}` : n;
2751
+ }
2752
+ }
2753
+ if (t) {
2754
+ for (let t = 0; t < this.errors.length; ++t) e.errors.push(this.errors[t]);
2755
+ for (let t = 0; t < this.warnings.length; ++t) e.warnings.push(this.warnings[t]);
2756
+ } else e.errors = this.errors, e.warnings = this.warnings;
2757
+ this.prelude = [], this.errors = [], this.warnings = [];
2758
+ }
2759
+ streamInfo() {
2760
+ return {
2761
+ comment: Nn(this.prelude).comment,
2762
+ directives: this.directives,
2763
+ errors: this.errors,
2764
+ warnings: this.warnings
2765
+ };
2766
+ }
2767
+ *compose(e, t = !1, n = -1) {
2768
+ for (let t of e) yield* this.next(t);
2769
+ yield* this.end(t, n);
2770
+ }
2771
+ *next(e) {
2772
+ switch (e.type) {
2773
+ case "directive":
2774
+ this.directives.add(e.source, (t, n, r) => {
2775
+ let i = Mn(e);
2776
+ i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
2777
+ }), this.prelude.push(e.source), this.atDirectives = !0;
2778
+ break;
2779
+ case "document": {
2780
+ let t = jn(this.options, this.directives, e, this.onError);
2781
+ this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
2782
+ break;
2783
+ }
2784
+ case "byte-order-mark":
2785
+ case "space": break;
2786
+ case "comment":
2787
+ case "newline":
2788
+ this.prelude.push(e.source);
2789
+ break;
2790
+ case "error": {
2791
+ let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new Zt(Mn(e), "UNEXPECTED_TOKEN", t);
2792
+ this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
2793
+ break;
2794
+ }
2795
+ case "doc-end": {
2796
+ if (!this.doc) {
2797
+ this.errors.push(new Zt(Mn(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
2798
+ break;
2799
+ }
2800
+ this.doc.directives.docEnd = !0;
2801
+ let t = on(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
2802
+ if (this.decorate(this.doc, !0), t.comment) {
2803
+ let e = this.doc.comment;
2804
+ this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
2805
+ }
2806
+ this.doc.range[2] = t.offset;
2807
+ break;
2808
+ }
2809
+ default: this.errors.push(new Zt(Mn(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
2810
+ }
2811
+ }
2812
+ *end(e = !1, t = -1) {
2813
+ if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
2814
+ else if (e) {
2815
+ let e = new Yt(void 0, Object.assign({ _directives: this.directives }, this.options));
2816
+ this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), e.range = [
2817
+ 0,
2818
+ t,
2819
+ t
2820
+ ], this.decorate(e, !1), yield e;
2821
+ }
2822
+ }
2823
+ }, Fn = Symbol("break visit"), In = Symbol("skip children"), Ln = Symbol("remove item");
2824
+ function Y(e, t) {
2825
+ "type" in e && e.type === "document" && (e = {
2826
+ start: e.start,
2827
+ value: e.value
2828
+ }), Rn(Object.freeze([]), e, t);
2829
+ }
2830
+ Y.BREAK = Fn, Y.SKIP = In, Y.REMOVE = Ln, Y.itemAtPath = (e, t) => {
2831
+ let n = e;
2832
+ for (let [e, r] of t) {
2833
+ let t = n?.[e];
2834
+ if (t && "items" in t) n = t.items[r];
2835
+ else return;
2836
+ }
2837
+ return n;
2838
+ }, Y.parentCollection = (e, t) => {
2839
+ let n = Y.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
2840
+ if (i && "items" in i) return i;
2841
+ throw Error("Parent collection not found");
2842
+ };
2843
+ function Rn(e, t, n) {
2844
+ let r = n(t, e);
2845
+ if (typeof r == "symbol") return r;
2846
+ for (let i of ["key", "value"]) {
2847
+ let a = t[i];
2848
+ if (a && "items" in a) {
2849
+ for (let t = 0; t < a.items.length; ++t) {
2850
+ let r = Rn(Object.freeze(e.concat([[i, t]])), a.items[t], n);
2851
+ if (typeof r == "number") t = r - 1;
2852
+ else if (r === Fn) return Fn;
2853
+ else r === Ln && (a.items.splice(t, 1), --t);
2854
+ }
2855
+ typeof r == "function" && i === "key" && (r = r(t, e));
2856
+ }
2857
+ }
2858
+ return typeof r == "function" ? r(t, e) : r;
2859
+ }
2860
+ function zn(e) {
2861
+ switch (e) {
2862
+ case "": return "byte-order-mark";
2863
+ case "": return "doc-mode";
2864
+ case "": return "flow-error-end";
2865
+ case "": return "scalar";
2866
+ case "---": return "doc-start";
2867
+ case "...": return "doc-end";
2868
+ case "":
2869
+ case "\n":
2870
+ case "\r\n": return "newline";
2871
+ case "-": return "seq-item-ind";
2872
+ case "?": return "explicit-key-ind";
2873
+ case ":": return "map-value-ind";
2874
+ case "{": return "flow-map-start";
2875
+ case "}": return "flow-map-end";
2876
+ case "[": return "flow-seq-start";
2877
+ case "]": return "flow-seq-end";
2878
+ case ",": return "comma";
2879
+ }
2880
+ switch (e[0]) {
2881
+ case " ":
2882
+ case " ": return "space";
2883
+ case "#": return "comment";
2884
+ case "%": return "directive-line";
2885
+ case "*": return "alias";
2886
+ case "&": return "anchor";
2887
+ case "!": return "tag";
2888
+ case "'": return "single-quoted-scalar";
2889
+ case "\"": return "double-quoted-scalar";
2890
+ case "|":
2891
+ case ">": return "block-scalar-header";
2892
+ }
2893
+ return null;
2894
+ }
2895
+ //#endregion
2896
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js
2897
+ function X(e) {
2898
+ switch (e) {
2899
+ case void 0:
2900
+ case " ":
2901
+ case "\n":
2902
+ case "\r":
2903
+ case " ": return !0;
2904
+ default: return !1;
2905
+ }
2906
+ }
2907
+ var Bn = new Set("0123456789ABCDEFabcdef"), Vn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Hn = new Set(",[]{}"), Un = new Set(" ,[]{}\n\r "), Wn = (e) => !e || Un.has(e), Gn = class {
2908
+ constructor() {
2909
+ this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
2910
+ }
2911
+ *lex(e, t = !1) {
2912
+ if (e) {
2913
+ if (typeof e != "string") throw TypeError("source is not a string");
2914
+ this.buffer = this.buffer ? this.buffer + e : e, this.lineEndPos = null;
2915
+ }
2916
+ this.atEnd = !t;
2917
+ let n = this.next ?? "stream";
2918
+ for (; n && (t || this.hasChars(1));) n = yield* this.parseNext(n);
2919
+ }
2920
+ atLineEnd() {
2921
+ let e = this.pos, t = this.buffer[e];
2922
+ for (; t === " " || t === " ";) t = this.buffer[++e];
2923
+ return !t || t === "#" || t === "\n" || t === "\r" && this.buffer[e + 1] === "\n";
2924
+ }
2925
+ charAt(e) {
2926
+ return this.buffer[this.pos + e];
2927
+ }
2928
+ continueScalar(e) {
2929
+ let t = this.buffer[e];
2930
+ if (this.indentNext > 0) {
2931
+ let n = 0;
2932
+ for (; t === " ";) t = this.buffer[++n + e];
2933
+ if (t === "\r") {
2934
+ let t = this.buffer[n + e + 1];
2935
+ if (t === "\n" || !t && !this.atEnd) return e + n + 1;
2936
+ }
2937
+ return t === "\n" || n >= this.indentNext || !t && !this.atEnd ? e + n : -1;
2938
+ }
2939
+ if (t === "-" || t === ".") {
2940
+ let t = this.buffer.substr(e, 3);
2941
+ if ((t === "---" || t === "...") && X(this.buffer[e + 3])) return -1;
2942
+ }
2943
+ return e;
2944
+ }
2945
+ getLine() {
2946
+ let e = this.lineEndPos;
2947
+ return (typeof e != "number" || e !== -1 && e < this.pos) && (e = this.buffer.indexOf("\n", this.pos), this.lineEndPos = e), e === -1 ? this.atEnd ? this.buffer.substring(this.pos) : null : (this.buffer[e - 1] === "\r" && --e, this.buffer.substring(this.pos, e));
2948
+ }
2949
+ hasChars(e) {
2950
+ return this.pos + e <= this.buffer.length;
2951
+ }
2952
+ setNext(e) {
2953
+ return this.buffer = this.buffer.substring(this.pos), this.pos = 0, this.lineEndPos = null, this.next = e, null;
2954
+ }
2955
+ peek(e) {
2956
+ return this.buffer.substr(this.pos, e);
2957
+ }
2958
+ *parseNext(e) {
2959
+ switch (e) {
2960
+ case "stream": return yield* this.parseStream();
2961
+ case "line-start": return yield* this.parseLineStart();
2962
+ case "block-start": return yield* this.parseBlockStart();
2963
+ case "doc": return yield* this.parseDocument();
2964
+ case "flow": return yield* this.parseFlowCollection();
2965
+ case "quoted-scalar": return yield* this.parseQuotedScalar();
2966
+ case "block-scalar": return yield* this.parseBlockScalar();
2967
+ case "plain-scalar": return yield* this.parsePlainScalar();
2968
+ }
2969
+ }
2970
+ *parseStream() {
2971
+ let e = this.getLine();
2972
+ if (e === null) return this.setNext("stream");
2973
+ if (e[0] === "" && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
2974
+ let t = e.length, n = e.indexOf("#");
2975
+ for (; n !== -1;) {
2976
+ let r = e[n - 1];
2977
+ if (r === " " || r === " ") {
2978
+ t = n - 1;
2979
+ break;
2980
+ }
2981
+ n = e.indexOf("#", n + 1);
2982
+ }
2983
+ for (;;) {
2984
+ let n = e[t - 1];
2985
+ if (n === " " || n === " ") --t;
2986
+ else break;
2987
+ }
2988
+ let r = (yield* this.pushCount(t)) + (yield* this.pushSpaces(!0));
2989
+ return yield* this.pushCount(e.length - r), this.pushNewline(), "stream";
2990
+ }
2991
+ if (this.atLineEnd()) {
2992
+ let t = yield* this.pushSpaces(!0);
2993
+ return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
2994
+ }
2995
+ return yield "", yield* this.parseLineStart();
2996
+ }
2997
+ *parseLineStart() {
2998
+ let e = this.charAt(0);
2999
+ if (!e && !this.atEnd) return this.setNext("line-start");
3000
+ if (e === "-" || e === ".") {
3001
+ if (!this.atEnd && !this.hasChars(4)) return this.setNext("line-start");
3002
+ let e = this.peek(3);
3003
+ if ((e === "---" || e === "...") && X(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
3004
+ }
3005
+ return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !X(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3006
+ }
3007
+ *parseBlockStart() {
3008
+ let [e, t] = this.peek(2);
3009
+ if (!t && !this.atEnd) return this.setNext("block-start");
3010
+ if ((e === "-" || e === "?" || e === ":") && X(t)) {
3011
+ let e = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
3012
+ return this.indentNext = this.indentValue + 1, this.indentValue += e, "block-start";
3013
+ }
3014
+ return "doc";
3015
+ }
3016
+ *parseDocument() {
3017
+ yield* this.pushSpaces(!0);
3018
+ let e = this.getLine();
3019
+ if (e === null) return this.setNext("doc");
3020
+ let t = yield* this.pushIndicators();
3021
+ switch (e[t]) {
3022
+ case "#": yield* this.pushCount(e.length - t);
3023
+ case void 0: return yield* this.pushNewline(), yield* this.parseLineStart();
3024
+ case "{":
3025
+ case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
3026
+ case "}":
3027
+ case "]": return yield* this.pushCount(1), "doc";
3028
+ case "*": return yield* this.pushUntil(Wn), "doc";
3029
+ case "\"":
3030
+ case "'": return yield* this.parseQuotedScalar();
3031
+ case "|":
3032
+ case ">": return t += yield* this.parseBlockScalarHeader(), t += yield* this.pushSpaces(!0), yield* this.pushCount(e.length - t), yield* this.pushNewline(), yield* this.parseBlockScalar();
3033
+ default: return yield* this.parsePlainScalar();
3034
+ }
3035
+ }
3036
+ *parseFlowCollection() {
3037
+ let e, t, n = -1;
3038
+ do
3039
+ e = yield* this.pushNewline(), e > 0 ? (t = yield* this.pushSpaces(!1), this.indentValue = n = t) : t = 0, t += yield* this.pushSpaces(!0);
3040
+ while (e + t > 0);
3041
+ let r = this.getLine();
3042
+ if (r === null) return this.setNext("flow");
3043
+ if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) && X(r[3])) && (n !== this.indentNext - 1 || this.flowLevel !== 1 || r[0] !== "]" && r[0] !== "}")) return this.flowLevel = 0, yield "", yield* this.parseLineStart();
3044
+ let i = 0;
3045
+ for (; r[i] === ",";) i += yield* this.pushCount(1), i += yield* this.pushSpaces(!0), this.flowKey = !1;
3046
+ switch (i += yield* this.pushIndicators(), r[i]) {
3047
+ case void 0: return "flow";
3048
+ case "#": return yield* this.pushCount(r.length - i), "flow";
3049
+ case "{":
3050
+ case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
3051
+ case "}":
3052
+ case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
3053
+ case "*": return yield* this.pushUntil(Wn), "flow";
3054
+ case "\"":
3055
+ case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
3056
+ case ":": {
3057
+ let e = this.charAt(1);
3058
+ if (this.flowKey || X(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3059
+ }
3060
+ default: return this.flowKey = !1, yield* this.parsePlainScalar();
3061
+ }
3062
+ }
3063
+ *parseQuotedScalar() {
3064
+ let e = this.charAt(0), t = this.buffer.indexOf(e, this.pos + 1);
3065
+ if (e === "'") for (; t !== -1 && this.buffer[t + 1] === "'";) t = this.buffer.indexOf("'", t + 2);
3066
+ else for (; t !== -1;) {
3067
+ let e = 0;
3068
+ for (; this.buffer[t - 1 - e] === "\\";) e += 1;
3069
+ if (e % 2 == 0) break;
3070
+ t = this.buffer.indexOf("\"", t + 1);
3071
+ }
3072
+ let n = this.buffer.substring(0, t), r = n.indexOf("\n", this.pos);
3073
+ if (r !== -1) {
3074
+ for (; r !== -1;) {
3075
+ let e = this.continueScalar(r + 1);
3076
+ if (e === -1) break;
3077
+ r = n.indexOf("\n", e);
3078
+ }
3079
+ r !== -1 && (t = r - (n[r - 1] === "\r" ? 2 : 1));
3080
+ }
3081
+ if (t === -1) {
3082
+ if (!this.atEnd) return this.setNext("quoted-scalar");
3083
+ t = this.buffer.length;
3084
+ }
3085
+ return yield* this.pushToIndex(t + 1, !1), this.flowLevel ? "flow" : "doc";
3086
+ }
3087
+ *parseBlockScalarHeader() {
3088
+ this.blockScalarIndent = -1, this.blockScalarKeep = !1;
3089
+ let e = this.pos;
3090
+ for (;;) {
3091
+ let t = this.buffer[++e];
3092
+ if (t === "+") this.blockScalarKeep = !0;
3093
+ else if (t > "0" && t <= "9") this.blockScalarIndent = Number(t) - 1;
3094
+ else if (t !== "-") break;
3095
+ }
3096
+ return yield* this.pushUntil((e) => X(e) || e === "#");
3097
+ }
3098
+ *parseBlockScalar() {
3099
+ let e = this.pos - 1, t = 0, n;
3100
+ loop: for (let r = this.pos; n = this.buffer[r]; ++r) switch (n) {
3101
+ case " ":
3102
+ t += 1;
3103
+ break;
3104
+ case "\n":
3105
+ e = r, t = 0;
3106
+ break;
3107
+ case "\r": {
3108
+ let e = this.buffer[r + 1];
3109
+ if (!e && !this.atEnd) return this.setNext("block-scalar");
3110
+ if (e === "\n") break;
3111
+ }
3112
+ default: break loop;
3113
+ }
3114
+ if (!n && !this.atEnd) return this.setNext("block-scalar");
3115
+ if (t >= this.indentNext) {
3116
+ this.indentNext = this.blockScalarIndent === -1 ? t : this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
3117
+ do {
3118
+ let t = this.continueScalar(e + 1);
3119
+ if (t === -1) break;
3120
+ e = this.buffer.indexOf("\n", t);
3121
+ } while (e !== -1);
3122
+ if (e === -1) {
3123
+ if (!this.atEnd) return this.setNext("block-scalar");
3124
+ e = this.buffer.length;
3125
+ }
3126
+ }
3127
+ let r = e + 1;
3128
+ for (n = this.buffer[r]; n === " ";) n = this.buffer[++r];
3129
+ if (n === " ") {
3130
+ for (; n === " " || n === " " || n === "\r" || n === "\n";) n = this.buffer[++r];
3131
+ e = r - 1;
3132
+ } else if (!this.blockScalarKeep) do {
3133
+ let n = e - 1, r = this.buffer[n];
3134
+ r === "\r" && (r = this.buffer[--n]);
3135
+ let i = n;
3136
+ for (; r === " ";) r = this.buffer[--n];
3137
+ if (r === "\n" && n >= this.pos && n + 1 + t > i) e = n;
3138
+ else break;
3139
+ } while (!0);
3140
+ return yield "", yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3141
+ }
3142
+ *parsePlainScalar() {
3143
+ let e = this.flowLevel > 0, t = this.pos - 1, n = this.pos - 1, r;
3144
+ for (; r = this.buffer[++n];) if (r === ":") {
3145
+ let r = this.buffer[n + 1];
3146
+ if (X(r) || e && Hn.has(r)) break;
3147
+ t = n;
3148
+ } else if (X(r)) {
3149
+ let i = this.buffer[n + 1];
3150
+ if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && Hn.has(i)) break;
3151
+ if (r === "\n") {
3152
+ let e = this.continueScalar(n + 1);
3153
+ if (e === -1) break;
3154
+ n = Math.max(n, e - 2);
3155
+ }
3156
+ } else {
3157
+ if (e && Hn.has(r)) break;
3158
+ t = n;
3159
+ }
3160
+ return !r && !this.atEnd ? this.setNext("plain-scalar") : (yield "", yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3161
+ }
3162
+ *pushCount(e) {
3163
+ return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
3164
+ }
3165
+ *pushToIndex(e, t) {
3166
+ let n = this.buffer.slice(this.pos, e);
3167
+ return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
3168
+ }
3169
+ *pushIndicators() {
3170
+ let e = 0;
3171
+ loop: for (;;) {
3172
+ switch (this.charAt(0)) {
3173
+ case "!":
3174
+ e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
3175
+ continue loop;
3176
+ case "&":
3177
+ e += yield* this.pushUntil(Wn), e += yield* this.pushSpaces(!0);
3178
+ continue loop;
3179
+ case "-":
3180
+ case "?":
3181
+ case ":": {
3182
+ let t = this.flowLevel > 0, n = this.charAt(1);
3183
+ if (X(n) || t && Hn.has(n)) {
3184
+ t ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
3185
+ continue loop;
3186
+ }
3187
+ }
3188
+ }
3189
+ break loop;
3190
+ }
3191
+ return e;
3192
+ }
3193
+ *pushTag() {
3194
+ if (this.charAt(1) === "<") {
3195
+ let e = this.pos + 2, t = this.buffer[e];
3196
+ for (; !X(t) && t !== ">";) t = this.buffer[++e];
3197
+ return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
3198
+ }
3199
+ {
3200
+ let e = this.pos + 1, t = this.buffer[e];
3201
+ for (; t;) if (Vn.has(t)) t = this.buffer[++e];
3202
+ else if (t === "%" && Bn.has(this.buffer[e + 1]) && Bn.has(this.buffer[e + 2])) t = this.buffer[e += 3];
3203
+ else break;
3204
+ return yield* this.pushToIndex(e, !1);
3205
+ }
3206
+ }
3207
+ *pushNewline() {
3208
+ let e = this.buffer[this.pos];
3209
+ return e === "\n" ? yield* this.pushCount(1) : e === "\r" && this.charAt(1) === "\n" ? yield* this.pushCount(2) : 0;
3210
+ }
3211
+ *pushSpaces(e) {
3212
+ let t = this.pos - 1, n;
3213
+ do
3214
+ n = this.buffer[++t];
3215
+ while (n === " " || e && n === " ");
3216
+ let r = t - this.pos;
3217
+ return r > 0 && (yield this.buffer.substr(this.pos, r), this.pos = t), r;
3218
+ }
3219
+ *pushUntil(e) {
3220
+ let t = this.pos, n = this.buffer[t];
3221
+ for (; !e(n);) n = this.buffer[++t];
3222
+ return yield* this.pushToIndex(t, !1);
3223
+ }
3224
+ }, Kn = class {
3225
+ constructor() {
3226
+ this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
3227
+ let t = 0, n = this.lineStarts.length;
3228
+ for (; t < n;) {
3229
+ let r = t + n >> 1;
3230
+ this.lineStarts[r] < e ? t = r + 1 : n = r;
3231
+ }
3232
+ if (this.lineStarts[t] === e) return {
3233
+ line: t + 1,
3234
+ col: 1
3235
+ };
3236
+ if (t === 0) return {
3237
+ line: 0,
3238
+ col: e
3239
+ };
3240
+ let r = this.lineStarts[t - 1];
3241
+ return {
3242
+ line: t,
3243
+ col: e - r + 1
3244
+ };
3245
+ };
3246
+ }
3247
+ };
3248
+ //#endregion
3249
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js
3250
+ function Z(e, t) {
3251
+ for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
3252
+ return !1;
3253
+ }
3254
+ function qn(e) {
3255
+ for (let t = 0; t < e.length; ++t) switch (e[t].type) {
3256
+ case "space":
3257
+ case "comment":
3258
+ case "newline": break;
3259
+ default: return t;
3260
+ }
3261
+ return -1;
3262
+ }
3263
+ function Jn(e) {
3264
+ switch (e?.type) {
3265
+ case "alias":
3266
+ case "scalar":
3267
+ case "single-quoted-scalar":
3268
+ case "double-quoted-scalar":
3269
+ case "flow-collection": return !0;
3270
+ default: return !1;
3271
+ }
3272
+ }
3273
+ function Yn(e) {
3274
+ switch (e.type) {
3275
+ case "document": return e.start;
3276
+ case "block-map": {
3277
+ let t = e.items[e.items.length - 1];
3278
+ return t.sep ?? t.start;
3279
+ }
3280
+ case "block-seq": return e.items[e.items.length - 1].start;
3281
+ default: return [];
3282
+ }
3283
+ }
3284
+ function Q(e) {
3285
+ if (e.length === 0) return [];
3286
+ let t = e.length;
3287
+ loop: for (; --t >= 0;) switch (e[t].type) {
3288
+ case "doc-start":
3289
+ case "explicit-key-ind":
3290
+ case "map-value-ind":
3291
+ case "seq-item-ind":
3292
+ case "newline": break loop;
3293
+ }
3294
+ for (; e[++t]?.type === "space";);
3295
+ return e.splice(t, e.length);
3296
+ }
3297
+ function Xn(e, t) {
3298
+ if (t.length < 1e5) Array.prototype.push.apply(e, t);
3299
+ else for (let n = 0; n < t.length; ++n) e.push(t[n]);
3300
+ }
3301
+ function Zn(e) {
3302
+ if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !Z(t.start, "explicit-key-ind") && !Z(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, Jn(t.value) ? t.value.end ? Xn(t.value.end, t.sep) : t.value.end = t.sep : Xn(t.start, t.sep), delete t.sep);
3303
+ }
3304
+ var Qn = class {
3305
+ constructor(e) {
3306
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Gn(), this.onNewLine = e;
3307
+ }
3308
+ *parse(e, t = !1) {
3309
+ this.onNewLine && this.offset === 0 && this.onNewLine(0);
3310
+ for (let n of this.lexer.lex(e, t)) yield* this.next(n);
3311
+ t || (yield* this.end());
3312
+ }
3313
+ *next(e) {
3314
+ if (this.source = e, this.atScalar) {
3315
+ this.atScalar = !1, yield* this.step(), this.offset += e.length;
3316
+ return;
3317
+ }
3318
+ let t = zn(e);
3319
+ if (!t) {
3320
+ let t = `Not a YAML token: ${e}`;
3321
+ yield* this.pop({
3322
+ type: "error",
3323
+ offset: this.offset,
3324
+ message: t,
3325
+ source: e
3326
+ }), this.offset += e.length;
3327
+ } else if (t === "scalar") this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
3328
+ else {
3329
+ switch (this.type = t, yield* this.step(), t) {
3330
+ case "newline":
3331
+ this.atNewLine = !0, this.indent = 0, this.onNewLine && this.onNewLine(this.offset + e.length);
3332
+ break;
3333
+ case "space":
3334
+ this.atNewLine && e[0] === " " && (this.indent += e.length);
3335
+ break;
3336
+ case "explicit-key-ind":
3337
+ case "map-value-ind":
3338
+ case "seq-item-ind":
3339
+ this.atNewLine && (this.indent += e.length);
3340
+ break;
3341
+ case "doc-mode":
3342
+ case "flow-error-end": return;
3343
+ default: this.atNewLine = !1;
3344
+ }
3345
+ this.offset += e.length;
3346
+ }
3347
+ }
3348
+ *end() {
3349
+ for (; this.stack.length > 0;) yield* this.pop();
3350
+ }
3351
+ get sourceToken() {
3352
+ return {
3353
+ type: this.type,
3354
+ offset: this.offset,
3355
+ indent: this.indent,
3356
+ source: this.source
3357
+ };
3358
+ }
3359
+ *step() {
3360
+ let e = this.peek(1);
3361
+ if (this.type === "doc-end" && e?.type !== "doc-end") {
3362
+ for (; this.stack.length > 0;) yield* this.pop();
3363
+ this.stack.push({
3364
+ type: "doc-end",
3365
+ offset: this.offset,
3366
+ source: this.source
3367
+ });
3368
+ return;
3369
+ }
3370
+ if (!e) return yield* this.stream();
3371
+ switch (e.type) {
3372
+ case "document": return yield* this.document(e);
3373
+ case "alias":
3374
+ case "scalar":
3375
+ case "single-quoted-scalar":
3376
+ case "double-quoted-scalar": return yield* this.scalar(e);
3377
+ case "block-scalar": return yield* this.blockScalar(e);
3378
+ case "block-map": return yield* this.blockMap(e);
3379
+ case "block-seq": return yield* this.blockSequence(e);
3380
+ case "flow-collection": return yield* this.flowCollection(e);
3381
+ case "doc-end": return yield* this.documentEnd(e);
3382
+ }
3383
+ yield* this.pop();
3384
+ }
3385
+ peek(e) {
3386
+ return this.stack[this.stack.length - e];
3387
+ }
3388
+ *pop(e) {
3389
+ let t = e ?? this.stack.pop();
3390
+ if (!t) yield {
3391
+ type: "error",
3392
+ offset: this.offset,
3393
+ source: "",
3394
+ message: "Tried to pop an empty stack"
3395
+ };
3396
+ else if (this.stack.length === 0) yield t;
3397
+ else {
3398
+ let e = this.peek(1);
3399
+ switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && Zn(t), e.type) {
3400
+ case "document":
3401
+ e.value = t;
3402
+ break;
3403
+ case "block-scalar":
3404
+ e.props.push(t);
3405
+ break;
3406
+ case "block-map": {
3407
+ let n = e.items[e.items.length - 1];
3408
+ if (n.value) {
3409
+ e.items.push({
3410
+ start: [],
3411
+ key: t,
3412
+ sep: []
3413
+ }), this.onKeyLine = !0;
3414
+ return;
3415
+ }
3416
+ if (n.sep) n.value = t;
3417
+ else {
3418
+ Object.assign(n, {
3419
+ key: t,
3420
+ sep: []
3421
+ }), this.onKeyLine = !n.explicitKey;
3422
+ return;
3423
+ }
3424
+ break;
3425
+ }
3426
+ case "block-seq": {
3427
+ let n = e.items[e.items.length - 1];
3428
+ n.value ? e.items.push({
3429
+ start: [],
3430
+ value: t
3431
+ }) : n.value = t;
3432
+ break;
3433
+ }
3434
+ case "flow-collection": {
3435
+ let n = e.items[e.items.length - 1];
3436
+ !n || n.value ? e.items.push({
3437
+ start: [],
3438
+ key: t,
3439
+ sep: []
3440
+ }) : n.sep ? n.value = t : Object.assign(n, {
3441
+ key: t,
3442
+ sep: []
3443
+ });
3444
+ return;
3445
+ }
3446
+ default: yield* this.pop(), yield* this.pop(t);
3447
+ }
3448
+ if ((e.type === "document" || e.type === "block-map" || e.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
3449
+ let n = t.items[t.items.length - 1];
3450
+ n && !n.sep && !n.value && n.start.length > 0 && qn(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
3451
+ }
3452
+ }
3453
+ }
3454
+ *stream() {
3455
+ switch (this.type) {
3456
+ case "directive-line":
3457
+ yield {
3458
+ type: "directive",
3459
+ offset: this.offset,
3460
+ source: this.source
3461
+ };
3462
+ return;
3463
+ case "byte-order-mark":
3464
+ case "space":
3465
+ case "comment":
3466
+ case "newline":
3467
+ yield this.sourceToken;
3468
+ return;
3469
+ case "doc-mode":
3470
+ case "doc-start": {
3471
+ let e = {
3472
+ type: "document",
3473
+ offset: this.offset,
3474
+ start: []
3475
+ };
3476
+ this.type === "doc-start" && e.start.push(this.sourceToken), this.stack.push(e);
3477
+ return;
3478
+ }
3479
+ }
3480
+ yield {
3481
+ type: "error",
3482
+ offset: this.offset,
3483
+ message: `Unexpected ${this.type} token in YAML stream`,
3484
+ source: this.source
3485
+ };
3486
+ }
3487
+ *document(e) {
3488
+ if (e.value) return yield* this.lineEnd(e);
3489
+ switch (this.type) {
3490
+ case "doc-start":
3491
+ qn(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
3492
+ return;
3493
+ case "anchor":
3494
+ case "tag":
3495
+ case "space":
3496
+ case "comment":
3497
+ case "newline":
3498
+ e.start.push(this.sourceToken);
3499
+ return;
3500
+ }
3501
+ let t = this.startBlockValue(e);
3502
+ t ? this.stack.push(t) : yield {
3503
+ type: "error",
3504
+ offset: this.offset,
3505
+ message: `Unexpected ${this.type} token in YAML document`,
3506
+ source: this.source
3507
+ };
3508
+ }
3509
+ *scalar(e) {
3510
+ if (this.type === "map-value-ind") {
3511
+ let t = Q(Yn(this.peek(2))), n;
3512
+ e.end ? (n = e.end, n.push(this.sourceToken), delete e.end) : n = [this.sourceToken];
3513
+ let r = {
3514
+ type: "block-map",
3515
+ offset: e.offset,
3516
+ indent: e.indent,
3517
+ items: [{
3518
+ start: t,
3519
+ key: e,
3520
+ sep: n
3521
+ }]
3522
+ };
3523
+ this.onKeyLine = !0, this.stack[this.stack.length - 1] = r;
3524
+ } else yield* this.lineEnd(e);
3525
+ }
3526
+ *blockScalar(e) {
3527
+ switch (this.type) {
3528
+ case "space":
3529
+ case "comment":
3530
+ case "newline":
3531
+ e.props.push(this.sourceToken);
3532
+ return;
3533
+ case "scalar":
3534
+ if (e.source = this.source, this.atNewLine = !0, this.indent = 0, this.onNewLine) {
3535
+ let e = this.source.indexOf("\n") + 1;
3536
+ for (; e !== 0;) this.onNewLine(this.offset + e), e = this.source.indexOf("\n", e) + 1;
3537
+ }
3538
+ yield* this.pop();
3539
+ break;
3540
+ default: yield* this.pop(), yield* this.step();
3541
+ }
3542
+ }
3543
+ *blockMap(e) {
3544
+ let t = e.items[e.items.length - 1];
3545
+ switch (this.type) {
3546
+ case "newline":
3547
+ if (this.onKeyLine = !1, t.value) {
3548
+ let n = "end" in t.value ? t.value.end : void 0;
3549
+ (Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
3550
+ } else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
3551
+ return;
3552
+ case "space":
3553
+ case "comment":
3554
+ if (t.value) e.items.push({ start: [this.sourceToken] });
3555
+ else if (t.sep) t.sep.push(this.sourceToken);
3556
+ else {
3557
+ if (this.atIndentedComment(t.start, e.indent)) {
3558
+ let n = e.items[e.items.length - 2]?.value?.end;
3559
+ if (Array.isArray(n)) {
3560
+ Xn(n, t.start), n.push(this.sourceToken), e.items.pop();
3561
+ return;
3562
+ }
3563
+ }
3564
+ t.start.push(this.sourceToken);
3565
+ }
3566
+ return;
3567
+ }
3568
+ if (this.indent >= e.indent) {
3569
+ let n = !this.onKeyLine && this.indent === e.indent, r = n && (t.sep || t.explicitKey) && this.type !== "seq-item-ind", i = [];
3570
+ if (r && t.sep && !t.value) {
3571
+ let n = [];
3572
+ for (let r = 0; r < t.sep.length; ++r) {
3573
+ let i = t.sep[r];
3574
+ switch (i.type) {
3575
+ case "newline":
3576
+ n.push(r);
3577
+ break;
3578
+ case "space": break;
3579
+ case "comment":
3580
+ i.indent > e.indent && (n.length = 0);
3581
+ break;
3582
+ default: n.length = 0;
3583
+ }
3584
+ }
3585
+ n.length >= 2 && (i = t.sep.splice(n[1]));
3586
+ }
3587
+ switch (this.type) {
3588
+ case "anchor":
3589
+ case "tag":
3590
+ r || t.value ? (i.push(this.sourceToken), e.items.push({ start: i }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
3591
+ return;
3592
+ case "explicit-key-ind":
3593
+ !t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : r || t.value ? (i.push(this.sourceToken), e.items.push({
3594
+ start: i,
3595
+ explicitKey: !0
3596
+ })) : this.stack.push({
3597
+ type: "block-map",
3598
+ offset: this.offset,
3599
+ indent: this.indent,
3600
+ items: [{
3601
+ start: [this.sourceToken],
3602
+ explicitKey: !0
3603
+ }]
3604
+ }), this.onKeyLine = !0;
3605
+ return;
3606
+ case "map-value-ind":
3607
+ if (t.explicitKey) {
3608
+ if (!t.sep) {
3609
+ if (Z(t.start, "newline")) Object.assign(t, {
3610
+ key: null,
3611
+ sep: [this.sourceToken]
3612
+ });
3613
+ else {
3614
+ let e = Q(t.start);
3615
+ this.stack.push({
3616
+ type: "block-map",
3617
+ offset: this.offset,
3618
+ indent: this.indent,
3619
+ items: [{
3620
+ start: e,
3621
+ key: null,
3622
+ sep: [this.sourceToken]
3623
+ }]
3624
+ });
3625
+ }
3626
+ } else if (t.value) e.items.push({
3627
+ start: [],
3628
+ key: null,
3629
+ sep: [this.sourceToken]
3630
+ });
3631
+ else if (Z(t.sep, "map-value-ind")) this.stack.push({
3632
+ type: "block-map",
3633
+ offset: this.offset,
3634
+ indent: this.indent,
3635
+ items: [{
3636
+ start: i,
3637
+ key: null,
3638
+ sep: [this.sourceToken]
3639
+ }]
3640
+ });
3641
+ else if (Jn(t.key) && !Z(t.sep, "newline")) {
3642
+ let e = Q(t.start), n = t.key, r = t.sep;
3643
+ r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
3644
+ type: "block-map",
3645
+ offset: this.offset,
3646
+ indent: this.indent,
3647
+ items: [{
3648
+ start: e,
3649
+ key: n,
3650
+ sep: r
3651
+ }]
3652
+ });
3653
+ } else i.length > 0 ? t.sep = t.sep.concat(i, this.sourceToken) : t.sep.push(this.sourceToken);
3654
+ } else t.sep ? t.value || r ? e.items.push({
3655
+ start: i,
3656
+ key: null,
3657
+ sep: [this.sourceToken]
3658
+ }) : Z(t.sep, "map-value-ind") ? this.stack.push({
3659
+ type: "block-map",
3660
+ offset: this.offset,
3661
+ indent: this.indent,
3662
+ items: [{
3663
+ start: [],
3664
+ key: null,
3665
+ sep: [this.sourceToken]
3666
+ }]
3667
+ }) : t.sep.push(this.sourceToken) : Object.assign(t, {
3668
+ key: null,
3669
+ sep: [this.sourceToken]
3670
+ });
3671
+ this.onKeyLine = !0;
3672
+ return;
3673
+ case "alias":
3674
+ case "scalar":
3675
+ case "single-quoted-scalar":
3676
+ case "double-quoted-scalar": {
3677
+ let n = this.flowScalar(this.type);
3678
+ r || t.value ? (e.items.push({
3679
+ start: i,
3680
+ key: n,
3681
+ sep: []
3682
+ }), this.onKeyLine = !0) : t.sep ? this.stack.push(n) : (Object.assign(t, {
3683
+ key: n,
3684
+ sep: []
3685
+ }), this.onKeyLine = !0);
3686
+ return;
3687
+ }
3688
+ default: {
3689
+ let r = this.startBlockValue(e);
3690
+ if (r) {
3691
+ if (r.type === "block-seq") {
3692
+ if (!t.explicitKey && t.sep && !Z(t.sep, "newline")) {
3693
+ yield* this.pop({
3694
+ type: "error",
3695
+ offset: this.offset,
3696
+ message: "Unexpected block-seq-ind on same line with key",
3697
+ source: this.source
3698
+ });
3699
+ return;
3700
+ }
3701
+ } else n && e.items.push({ start: i });
3702
+ this.stack.push(r);
3703
+ return;
3704
+ }
3705
+ }
3706
+ }
3707
+ }
3708
+ yield* this.pop(), yield* this.step();
3709
+ }
3710
+ *blockSequence(e) {
3711
+ let t = e.items[e.items.length - 1];
3712
+ switch (this.type) {
3713
+ case "newline":
3714
+ if (t.value) {
3715
+ let n = "end" in t.value ? t.value.end : void 0;
3716
+ (Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
3717
+ } else t.start.push(this.sourceToken);
3718
+ return;
3719
+ case "space":
3720
+ case "comment":
3721
+ if (t.value) e.items.push({ start: [this.sourceToken] });
3722
+ else {
3723
+ if (this.atIndentedComment(t.start, e.indent)) {
3724
+ let n = e.items[e.items.length - 2]?.value?.end;
3725
+ if (Array.isArray(n)) {
3726
+ Xn(n, t.start), n.push(this.sourceToken), e.items.pop();
3727
+ return;
3728
+ }
3729
+ }
3730
+ t.start.push(this.sourceToken);
3731
+ }
3732
+ return;
3733
+ case "anchor":
3734
+ case "tag":
3735
+ if (t.value || this.indent <= e.indent) break;
3736
+ t.start.push(this.sourceToken);
3737
+ return;
3738
+ case "seq-item-ind":
3739
+ if (this.indent !== e.indent) break;
3740
+ t.value || Z(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
3741
+ return;
3742
+ }
3743
+ if (this.indent > e.indent) {
3744
+ let t = this.startBlockValue(e);
3745
+ if (t) {
3746
+ this.stack.push(t);
3747
+ return;
3748
+ }
3749
+ }
3750
+ yield* this.pop(), yield* this.step();
3751
+ }
3752
+ *flowCollection(e) {
3753
+ let t = e.items[e.items.length - 1];
3754
+ if (this.type === "flow-error-end") {
3755
+ let e;
3756
+ do
3757
+ yield* this.pop(), e = this.peek(1);
3758
+ while (e?.type === "flow-collection");
3759
+ } else if (e.end.length === 0) {
3760
+ switch (this.type) {
3761
+ case "comma":
3762
+ case "explicit-key-ind":
3763
+ !t || t.sep ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
3764
+ return;
3765
+ case "map-value-ind":
3766
+ !t || t.value ? e.items.push({
3767
+ start: [],
3768
+ key: null,
3769
+ sep: [this.sourceToken]
3770
+ }) : t.sep ? t.sep.push(this.sourceToken) : Object.assign(t, {
3771
+ key: null,
3772
+ sep: [this.sourceToken]
3773
+ });
3774
+ return;
3775
+ case "space":
3776
+ case "comment":
3777
+ case "newline":
3778
+ case "anchor":
3779
+ case "tag":
3780
+ !t || t.value ? e.items.push({ start: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
3781
+ return;
3782
+ case "alias":
3783
+ case "scalar":
3784
+ case "single-quoted-scalar":
3785
+ case "double-quoted-scalar": {
3786
+ let n = this.flowScalar(this.type);
3787
+ !t || t.value ? e.items.push({
3788
+ start: [],
3789
+ key: n,
3790
+ sep: []
3791
+ }) : t.sep ? this.stack.push(n) : Object.assign(t, {
3792
+ key: n,
3793
+ sep: []
3794
+ });
3795
+ return;
3796
+ }
3797
+ case "flow-map-end":
3798
+ case "flow-seq-end":
3799
+ e.end.push(this.sourceToken);
3800
+ return;
3801
+ }
3802
+ let n = this.startBlockValue(e);
3803
+ n ? this.stack.push(n) : (yield* this.pop(), yield* this.step());
3804
+ } else {
3805
+ let t = this.peek(2);
3806
+ if (t.type === "block-map" && (this.type === "map-value-ind" && t.indent === e.indent || this.type === "newline" && !t.items[t.items.length - 1].sep)) yield* this.pop(), yield* this.step();
3807
+ else if (this.type === "map-value-ind" && t.type !== "flow-collection") {
3808
+ let n = Q(Yn(t));
3809
+ Zn(e);
3810
+ let r = e.end.splice(1, e.end.length);
3811
+ r.push(this.sourceToken);
3812
+ let i = {
3813
+ type: "block-map",
3814
+ offset: e.offset,
3815
+ indent: e.indent,
3816
+ items: [{
3817
+ start: n,
3818
+ key: e,
3819
+ sep: r
3820
+ }]
3821
+ };
3822
+ this.onKeyLine = !0, this.stack[this.stack.length - 1] = i;
3823
+ } else yield* this.lineEnd(e);
3824
+ }
3825
+ }
3826
+ flowScalar(e) {
3827
+ if (this.onNewLine) {
3828
+ let e = this.source.indexOf("\n") + 1;
3829
+ for (; e !== 0;) this.onNewLine(this.offset + e), e = this.source.indexOf("\n", e) + 1;
3830
+ }
3831
+ return {
3832
+ type: e,
3833
+ offset: this.offset,
3834
+ indent: this.indent,
3835
+ source: this.source
3836
+ };
3837
+ }
3838
+ startBlockValue(e) {
3839
+ switch (this.type) {
3840
+ case "alias":
3841
+ case "scalar":
3842
+ case "single-quoted-scalar":
3843
+ case "double-quoted-scalar": return this.flowScalar(this.type);
3844
+ case "block-scalar-header": return {
3845
+ type: "block-scalar",
3846
+ offset: this.offset,
3847
+ indent: this.indent,
3848
+ props: [this.sourceToken],
3849
+ source: ""
3850
+ };
3851
+ case "flow-map-start":
3852
+ case "flow-seq-start": return {
3853
+ type: "flow-collection",
3854
+ offset: this.offset,
3855
+ indent: this.indent,
3856
+ start: this.sourceToken,
3857
+ items: [],
3858
+ end: []
3859
+ };
3860
+ case "seq-item-ind": return {
3861
+ type: "block-seq",
3862
+ offset: this.offset,
3863
+ indent: this.indent,
3864
+ items: [{ start: [this.sourceToken] }]
3865
+ };
3866
+ case "explicit-key-ind": {
3867
+ this.onKeyLine = !0;
3868
+ let t = Q(Yn(e));
3869
+ return t.push(this.sourceToken), {
3870
+ type: "block-map",
3871
+ offset: this.offset,
3872
+ indent: this.indent,
3873
+ items: [{
3874
+ start: t,
3875
+ explicitKey: !0
3876
+ }]
3877
+ };
3878
+ }
3879
+ case "map-value-ind": {
3880
+ this.onKeyLine = !0;
3881
+ let t = Q(Yn(e));
3882
+ return {
3883
+ type: "block-map",
3884
+ offset: this.offset,
3885
+ indent: this.indent,
3886
+ items: [{
3887
+ start: t,
3888
+ key: null,
3889
+ sep: [this.sourceToken]
3890
+ }]
3891
+ };
3892
+ }
3893
+ }
3894
+ return null;
3895
+ }
3896
+ atIndentedComment(e, t) {
3897
+ return this.type !== "comment" || this.indent <= t ? !1 : e.every((e) => e.type === "newline" || e.type === "space");
3898
+ }
3899
+ *documentEnd(e) {
3900
+ this.type !== "doc-mode" && (e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop()));
3901
+ }
3902
+ *lineEnd(e) {
3903
+ switch (this.type) {
3904
+ case "comma":
3905
+ case "doc-start":
3906
+ case "doc-end":
3907
+ case "flow-seq-end":
3908
+ case "flow-map-end":
3909
+ case "map-value-ind":
3910
+ yield* this.pop(), yield* this.step();
3911
+ break;
3912
+ case "newline": this.onKeyLine = !1;
3913
+ default: e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop());
3914
+ }
3915
+ }
3916
+ };
3917
+ //#endregion
3918
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js
3919
+ function $n(e) {
3920
+ let t = e.prettyErrors !== !1;
3921
+ return {
3922
+ lineCounter: e.lineCounter || t && new Kn() || null,
3923
+ prettyErrors: t
3924
+ };
3925
+ }
3926
+ function er(e, t = {}) {
3927
+ let { lineCounter: n, prettyErrors: r } = $n(t), i = new Qn(n?.addNewLine), a = new Pn(t), o = Array.from(a.compose(i.parse(e)));
3928
+ if (r && n) for (let t of o) t.errors.forEach($t(e, n)), t.warnings.forEach($t(e, n));
3929
+ return o.length > 0 ? o : Object.assign([], { empty: !0 }, a.streamInfo());
3930
+ }
3931
+ //#endregion
3932
+ //#region ../core/dist/chunks/options-BZlMUCoR.js
3933
+ var tr = Object.freeze([
3934
+ "MOLDEA_IMPACT_PATTERN_UNMATCHED",
3935
+ "MOLDEA_INTEGRATION_BLOCK_MISSING",
3936
+ "MOLDEA_INTEGRATION_SKILL_MISSING",
3937
+ "MOLDEA_INTEGRATION_BLOCK_STALE",
3938
+ "MOLDEA_INTEGRATION_LINK_UNRESOLVED",
3939
+ "MOLDEA_INTEGRATION_CLAUDE_IMPORT_MISSING"
3940
+ ]), nr = Object.freeze([1]), rr = Object.freeze({
3941
+ maxDiagnostics: 1e4,
3942
+ maxEntries: 1e5,
3943
+ maxCoverage: 1e4,
3944
+ maxAcceptedWarnings: 256,
3945
+ maxFileBytes: 8388608,
3946
+ maxManifestBytes: 2097152,
3947
+ maxRetainedBytes: 536870912,
3948
+ maxTotalBytesRead: 134217728
3949
+ }), ir = (e) => {
3950
+ let t = Object.create(null);
3951
+ for (let [n, r] of e) t[n] = r;
3952
+ return t;
3953
+ }, ar = new WeakMap(), or = 512, sr = (e, t) => {
3954
+ if (t === "") return e.range;
3955
+ if (!t.startsWith("/")) return null;
3956
+ let n = t.slice(1).split("/");
3957
+ if (n.some((e) => /~(?:[^01]|$)/u.test(e))) return null;
3958
+ let r = e, i = e.range;
3959
+ for (let e of n) {
3960
+ let t = e.replaceAll("~1", "/").replaceAll("~0", "~");
3961
+ if (r.kind === "mapping") {
3962
+ let e = ar.get(r);
3963
+ if (e === void 0) {
3964
+ let t = new Map();
3965
+ for (let e of r.entries) e.key.kind === "scalar" && typeof e.key.value == "string" && t.set(e.key.value, e);
3966
+ e = t, ar.set(r, e);
3967
+ }
3968
+ let n = e.get(t);
3969
+ if (n === void 0) break;
3970
+ i = {
3971
+ start: n.key.range.start,
3972
+ end: n.value.range.end
3973
+ }, r = n.value;
3974
+ continue;
3975
+ }
3976
+ if (r.kind !== "sequence" || !/^(?:0|[1-9][0-9]*)$/u.test(t)) break;
3977
+ let n = Number(t);
3978
+ if (!Number.isSafeInteger(n) || n >= r.items.length) break;
3979
+ let a = r.items[n];
3980
+ if (a === void 0) break;
3981
+ r = a, i = a.range;
3982
+ }
3983
+ return i;
3984
+ }, cr = (e) => {
3985
+ let t = [e], n = 0;
3986
+ for (; t.length > 0;) {
3987
+ let e = t.pop();
3988
+ if (n += or, e.kind === "mapping") for (let n of e.entries) t.push(n.key, n.value);
3989
+ else if (e.kind === "sequence") for (let n of e.items) t.push(n);
3990
+ else n += e.source.length * 2, typeof e.value == "string" && (n += e.value.length * 2);
3991
+ }
3992
+ return n;
3993
+ }, lr = new Set([
3994
+ "tag:yaml.org,2002:bool",
3995
+ "tag:yaml.org,2002:float",
3996
+ "tag:yaml.org,2002:int",
3997
+ "tag:yaml.org,2002:map",
3998
+ "tag:yaml.org,2002:null",
3999
+ "tag:yaml.org,2002:seq",
4000
+ "tag:yaml.org,2002:str"
4001
+ ]), ur = (e, t) => t.locateRange(e?.[0] ?? 0, e?.[1] ?? e?.[0] ?? 0), dr = (e, t, n, r) => {
4002
+ e.add({
4003
+ code: "MOLDEA_YAML_FEATURE_UNSUPPORTED",
4004
+ details: { reason: r },
4005
+ path: t,
4006
+ range: n
4007
+ });
4008
+ }, fr = (e) => {
4009
+ switch (e.tag) {
4010
+ case "tag:yaml.org,2002:bool": return b(e) && typeof e.value == "boolean";
4011
+ case "tag:yaml.org,2002:float": return b(e) && typeof e.value == "number";
4012
+ case "tag:yaml.org,2002:int": return b(e) && typeof e.value == "bigint";
4013
+ case "tag:yaml.org,2002:map": return v(e);
4014
+ case "tag:yaml.org,2002:null": return b(e) && e.value === null;
4015
+ case "tag:yaml.org,2002:seq": return x(e);
4016
+ case "tag:yaml.org,2002:str": return b(e) && typeof e.value == "string";
4017
+ default: return !1;
4018
+ }
4019
+ }, pr = (e, t, n, r) => {
4020
+ let i = ur(e.range, n);
4021
+ if (g(e)) return dr(r, t, i, "alias"), null;
4022
+ if ("anchor" in e && typeof e.anchor == "string" && dr(r, t, i, "anchor"), e.tag !== void 0) {
4023
+ if (!lr.has(e.tag)) return dr(r, t, i, "custom-tag"), null;
4024
+ if (!fr(e)) return r.add({
4025
+ code: "MOLDEA_YAML_MALFORMED",
4026
+ details: { reason: "tag-value" },
4027
+ path: t,
4028
+ range: i
4029
+ }), null;
4030
+ }
4031
+ if (b(e)) {
4032
+ let n = e.value;
4033
+ return n !== null && typeof n != "string" && typeof n != "number" && typeof n != "bigint" && typeof n != "boolean" ? (r.add({
4034
+ code: "MOLDEA_YAML_MALFORMED",
4035
+ details: { reason: "scalar-type" },
4036
+ path: t,
4037
+ range: i
4038
+ }), null) : typeof n == "string" && !n.isWellFormed() ? (r.add({
4039
+ code: "MOLDEA_YAML_MALFORMED",
4040
+ details: { reason: "invalid-unicode" },
4041
+ path: t,
4042
+ range: i
4043
+ }), null) : {
4044
+ kind: "scalar",
4045
+ range: i,
4046
+ source: e.source,
4047
+ style: e.type ?? null,
4048
+ value: n
4049
+ };
4050
+ }
4051
+ if (x(e)) {
4052
+ let a = [];
4053
+ for (let o of e.items) {
4054
+ if (o === null) {
4055
+ a.push({
4056
+ kind: "scalar",
4057
+ range: i,
4058
+ source: "",
4059
+ style: null,
4060
+ value: null
4061
+ });
4062
+ continue;
4063
+ }
4064
+ let e = pr(o, t, n, r);
4065
+ e !== null && a.push(e);
4066
+ }
4067
+ return {
4068
+ items: a,
4069
+ kind: "sequence",
4070
+ range: i
4071
+ };
4072
+ }
4073
+ if (v(e)) {
4074
+ let a = [];
4075
+ for (let o of e.items) {
4076
+ let e = pr(o.key, t, n, r), s = o.value === null ? {
4077
+ kind: "scalar",
4078
+ range: e?.range ?? i,
4079
+ source: "",
4080
+ style: null,
4081
+ value: null
4082
+ } : pr(o.value, t, n, r);
4083
+ e?.kind === "scalar" && e.value === "<<" && e.style === "PLAIN" && dr(r, t, e.range, "merge-key"), e !== null && s !== null && a.push({
4084
+ key: e,
4085
+ value: s
4086
+ });
4087
+ }
4088
+ return {
4089
+ entries: a,
4090
+ kind: "mapping",
4091
+ range: i
4092
+ };
4093
+ }
4094
+ return r.add({
4095
+ code: "MOLDEA_YAML_MALFORMED",
4096
+ details: { reason: "node-type" },
4097
+ path: t,
4098
+ range: i
4099
+ }), null;
4100
+ }, mr = (e, t, n, r, i, a) => {
4101
+ if (e !== "BAD_DIRECTIVE") {
4102
+ if (e === "DUPLICATE_KEY") {
4103
+ a.add({
4104
+ code: "MOLDEA_YAML_DUPLICATE_KEY",
4105
+ path: r,
4106
+ range: i.locateRange(t, n)
4107
+ });
4108
+ return;
4109
+ }
4110
+ e !== "TAG_RESOLVE_FAILED" && a.add({
4111
+ code: "MOLDEA_YAML_MALFORMED",
4112
+ details: { reason: e === "RESOURCE_EXHAUSTION" ? "resource-exhaustion" : "syntax" },
4113
+ path: r,
4114
+ range: i.locateRange(t, n)
4115
+ });
4116
+ }
4117
+ }, hr = (e, t, n, r) => {
4118
+ let i = r.size;
4119
+ for (let i of new Qn().parse(e)) i.type === "directive" && dr(r, t, n.locateRange(i.offset, i.offset + i.source.length), "directive");
4120
+ let a = er(e, {
4121
+ intAsBigInt: !0,
4122
+ keepSourceTokens: !0,
4123
+ logLevel: "silent",
4124
+ merge: !1,
4125
+ prettyErrors: !1,
4126
+ resolveKnownTags: !1,
4127
+ schema: "core",
4128
+ strict: !0,
4129
+ uniqueKeys: !0,
4130
+ version: "1.2"
4131
+ });
4132
+ if (a.length > 1) {
4133
+ let e = a[1]?.range;
4134
+ r.add({
4135
+ code: "MOLDEA_YAML_MULTIPLE_DOCUMENTS",
4136
+ path: t,
4137
+ range: n.locateRange(e?.[0] ?? 0, e?.[0] ?? 0)
4138
+ });
4139
+ }
4140
+ for (let e of a) for (let i of [...e.errors, ...e.warnings]) mr(i.code, i.pos[0], i.pos[1], t, n, r);
4141
+ if (a.length > 1 || r.size > i) return {
4142
+ valid: !1,
4143
+ value: null
4144
+ };
4145
+ let o = a[0];
4146
+ if (o === void 0 || o.contents === null) return {
4147
+ valid: !0,
4148
+ value: {
4149
+ kind: "scalar",
4150
+ range: n.locateRange(0, 0),
4151
+ source: "",
4152
+ style: null,
4153
+ value: null
4154
+ }
4155
+ };
4156
+ let s = pr(o.contents, t, n, r);
4157
+ return {
4158
+ valid: s !== null && r.size === i,
4159
+ value: r.size === i ? s : null
4160
+ };
4161
+ }, gr = {
4162
+ MOLDEA_AGENT_DESCRIPTION_INVALID: "The agent description is invalid.",
4163
+ MOLDEA_AGENT_DESCRIPTION_MISSING: "The agent description is missing.",
4164
+ MOLDEA_AGENT_DIRECTORY_MISSING: "The registered agent directory is missing.",
4165
+ MOLDEA_AGENT_DIRECTORY_UNREGISTERED: "The agent directory is not registered.",
4166
+ MOLDEA_AGENT_IDENTITY_INVALID: "The agent instruction identity is invalid.",
4167
+ MOLDEA_AGENT_INSTRUCTION_EMPTY: "The agent instruction is empty.",
4168
+ MOLDEA_AGENT_INSTRUCTION_MISSING: "The agent instruction is missing.",
4169
+ MOLDEA_CANONICAL_ASSET_SYMLINK: "The canonical asset is a symlink.",
4170
+ MOLDEA_CANONICAL_PATH_UNRECOGNIZED: "The canonical path is unrecognized.",
4171
+ MOLDEA_CAPABILITY_DESCRIPTION_INVALID: "The capability description is invalid.",
4172
+ MOLDEA_CAPABILITY_DESCRIPTION_MISSING: "The capability description is missing.",
4173
+ MOLDEA_CONTEXT_FILE_EMPTY: "The focused context file is empty.",
4174
+ MOLDEA_CONTEXT_PATH_INVALID: "The context relationship path is invalid.",
4175
+ MOLDEA_CONTEXT_RELATIONSHIP_EMPTY: "The declared relationship has no bindings or impact paths.",
4176
+ MOLDEA_DECISION_BODY_EMPTY: "The decision Markdown body is empty.",
4177
+ MOLDEA_DECISION_CREATED_AT_INVALID: "The decision createdAt value is invalid.",
4178
+ MOLDEA_DECISION_FILENAME_INVALID: "The decision path or filename is invalid.",
4179
+ MOLDEA_DECISION_FRONTMATTER_INVALID: "The decision frontmatter is invalid.",
4180
+ MOLDEA_DECISION_FRONTMATTER_MISSING: "The decision frontmatter or its delimiters are missing.",
4181
+ MOLDEA_DECISION_ID_DUPLICATE: "The decision ID is duplicated.",
4182
+ MOLDEA_DECISION_PROPERTY_UNKNOWN: "The decision frontmatter contains an unknown property.",
4183
+ MOLDEA_DECISION_REFERENCE_MISSING: "The referenced decision does not exist.",
4184
+ MOLDEA_DECISION_RELATIONSHIP_INACTIVE: "The referenced decision is not accepted.",
4185
+ MOLDEA_DECISION_SELF_SUPERSESSION: "The decision supersedes itself.",
4186
+ MOLDEA_DECISION_STATUS_INVALID: "The decision status is invalid.",
4187
+ MOLDEA_DECISION_SUPERSEDED_ORPHAN: "The superseded decision has no active supersession relationship.",
4188
+ MOLDEA_DECISION_SUPERSESSION_CYCLE: "The decision supersession graph contains a cycle.",
4189
+ MOLDEA_DECISION_SUPERSESSION_STATUS_INVALID: "The decision supersession relationship has inconsistent statuses.",
4190
+ MOLDEA_DECISION_TIMESTAMP_MISMATCH: "The decision filename timestamp and createdAt value do not match.",
4191
+ MOLDEA_ENTRY_TYPE_INVALID: "The repository entry type is invalid.",
4192
+ MOLDEA_GLOB_INVALID: "The impact pattern is invalid.",
4193
+ MOLDEA_ID_DUPLICATE: "An ID is duplicated within its required scope.",
4194
+ MOLDEA_ID_INVALID: "The ID is invalid.",
4195
+ MOLDEA_ID_RESERVED: "The ID uses a reserved filesystem name.",
4196
+ MOLDEA_IMPACT_PATH_MISSING: "The exact impact path does not exist.",
4197
+ MOLDEA_IMPACT_PATH_NOT_FILE: "The exact impact path is not a regular file.",
4198
+ MOLDEA_MANIFEST_MISSING: "The project manifest is missing.",
4199
+ MOLDEA_MANIFEST_PATH_INVALID: "The manifest path is not the canonical manifest path.",
4200
+ MOLDEA_MANIFEST_PROPERTY_UNKNOWN: "The manifest contains an unknown property.",
4201
+ MOLDEA_MANIFEST_ROOT_INVALID: "The manifest root is not a mapping.",
4202
+ MOLDEA_MANIFEST_VALUE_INVALID: "The manifest value is invalid.",
4203
+ MOLDEA_MANIFEST_VERSION_INVALID: "The manifest version is not a valid integer major version.",
4204
+ MOLDEA_MANIFEST_VERSION_MISSING: "The manifest version is missing.",
4205
+ MOLDEA_MANIFEST_VERSION_UNSUPPORTED: "The manifest version is unsupported.",
4206
+ MOLDEA_MIRROR_PATH_DUPLICATE: "The mirror path is assigned more than once.",
4207
+ MOLDEA_MIRROR_PATH_INSIDE_MOLDEA: "The mirror path is inside /moldea.",
4208
+ MOLDEA_MIRROR_PATH_INVALID: "The mirror path is invalid.",
4209
+ MOLDEA_MIRROR_MISSING: "The declared mirror does not exist.",
4210
+ MOLDEA_MIRROR_NOT_FILE: "The declared mirror is not a regular file.",
4211
+ MOLDEA_MIRROR_STALE: "The declared mirror differs from its canonical instruction.",
4212
+ MOLDEA_MIRROR_SYMLINK: "The declared mirror is a symlink.",
4213
+ MOLDEA_PATH_DUPLICATE: "The path is duplicated.",
4214
+ MOLDEA_PATH_INVALID: "The manifest logical path is invalid.",
4215
+ MOLDEA_PATTERN_DUPLICATE: "The impact pattern is duplicated.",
4216
+ MOLDEA_PROJECT_FILE_EMPTY: "The project file is empty.",
4217
+ MOLDEA_PROJECT_FILE_MISSING: "The project file is missing.",
4218
+ MOLDEA_INTEGRATION_BLOCK_MISSING: "The AGENTS.md moldea block is missing.",
4219
+ MOLDEA_INTEGRATION_SKILL_MISSING: "The skill installation referenced by the AGENTS.md moldea block was not found.",
4220
+ MOLDEA_INTEGRATION_BLOCK_STALE: "The AGENTS.md moldea block differs from its skill installation.",
4221
+ MOLDEA_INTEGRATION_LINK_UNRESOLVED: "This instruction file's link doesn't lead to a file in the repository.",
4222
+ MOLDEA_INTEGRATION_CLAUDE_IMPORT_MISSING: "Claude Code instructions do not load AGENTS.md.",
4223
+ MOLDEA_IMPACT_PATTERN_UNMATCHED: "The impact pattern matches no files.",
4224
+ MOLDEA_ACCEPTANCE_UNMATCHED: "The warning acceptance matches no reported warning.",
4225
+ MOLDEA_REFERENCE_EXPORT_MISSING: "The referenced export is missing.",
4226
+ MOLDEA_REFERENCE_MISSING: "The referenced repository path does not exist.",
4227
+ MOLDEA_REFERENCE_NOT_FILE: "The referenced repository path is not a regular file.",
4228
+ MOLDEA_REFERENCE_SYMLINK: "The referenced repository path is a symlink.",
4229
+ MOLDEA_SKILL_IMPLEMENTATION_MISSING: "The registered skill implementation is missing.",
4230
+ MOLDEA_SYMBOL_FORBIDDEN: "A canonical moldea reference must not include a symbol.",
4231
+ MOLDEA_SYMBOL_INVALID: "The repository-reference symbol is invalid.",
4232
+ MOLDEA_TEXT_EMPTY: "The required text document is empty.",
4233
+ MOLDEA_TEXT_INVALID_UNICODE: "The text document contains an invalid Unicode scalar representation.",
4234
+ MOLDEA_TEXT_INVALID_UTF8: "The text document is not valid UTF-8.",
4235
+ MOLDEA_TEXT_NUL_FORBIDDEN: "The text document contains a forbidden NUL character.",
4236
+ MOLDEA_TOOL_IMPLEMENTATION_MISSING: "The registered tool implementation is missing.",
4237
+ MOLDEA_YAML_DUPLICATE_KEY: "The YAML document contains a duplicate mapping key.",
4238
+ MOLDEA_YAML_FEATURE_UNSUPPORTED: "The YAML document uses an unsupported feature.",
4239
+ MOLDEA_YAML_MALFORMED: "The YAML document is malformed.",
4240
+ MOLDEA_YAML_MULTIPLE_DOCUMENTS: "The YAML stream contains more than one document."
4241
+ }, _r = [
4242
+ "agentId",
4243
+ "capabilityKind",
4244
+ "capabilityId",
4245
+ "decisionId",
4246
+ "contextPath",
4247
+ "integrationPath"
4248
+ ], vr = Symbol("core-diagnostic-budget"), yr = (e) => e[vr] === void 0 ? Object.freeze({
4249
+ ...e,
4250
+ [vr]: { count: 0 }
4251
+ }) : e, br = (e, n, r, i = 0) => {
4252
+ let a = e[vr], o = a?.count ?? i;
4253
+ if (n > e.maxDiagnostics - o) throw new t({
4254
+ code: "RESOURCE_LIMIT_EXCEEDED",
4255
+ limit: "maxDiagnostics",
4256
+ limitMaximum: e.maxDiagnostics,
4257
+ nextAction: "reduce-input-or-increase-limit",
4258
+ observedUsage: o + n,
4259
+ operation: r
4260
+ });
4261
+ return a !== void 0 && (a.count += n), i + n;
4262
+ }, xr = (e, t) => e === null ? t === null ? 0 : -1 : t === null ? 1 : o(e, t), Sr = (e) => s(ir(Object.entries(e ?? {}).sort(([e], [t]) => o(e, t)).map(([e, t]) => [e, typeof t == "number" && Object.is(t, -0) ? 0 : t]))), Cr = (e) => e == null ? null : s(ir(_r.flatMap((t) => {
4263
+ let n = e[t];
4264
+ return n === void 0 ? [] : [[t, n]];
4265
+ }))), wr = (e) => {
4266
+ let t = Object.entries(e).sort(([e], [t]) => o(e, t));
4267
+ return JSON.stringify(t);
4268
+ }, Tr = (e) => {
4269
+ let t = e.entity === null ? null : _r.map((t) => [t, e.entity?.[t] ?? null]), n = e.range === null ? null : [
4270
+ e.range.start.line,
4271
+ e.range.start.column,
4272
+ e.range.start.offset,
4273
+ e.range.end.line,
4274
+ e.range.end.column,
4275
+ e.range.end.offset
4276
+ ];
4277
+ return JSON.stringify([
4278
+ e.code,
4279
+ e.severity,
4280
+ e.severity === "warning" ? [
4281
+ e.subject,
4282
+ e.qualifier,
4283
+ e.accepted ?? !1,
4284
+ e.reason ?? null
4285
+ ] : null,
4286
+ wr(e.details),
4287
+ t,
4288
+ e.message,
4289
+ e.path,
4290
+ e.pointer,
4291
+ n,
4292
+ e.source
4293
+ ]);
4294
+ }, Er = (e, t) => e === null ? t === null ? 0 : -1 : t === null ? 1 : e.start.line - t.start.line || e.start.column - t.start.column || e.start.offset - t.start.offset || e.end.line - t.end.line || e.end.column - t.end.column || e.end.offset - t.end.offset, $ = (e, t) => e?.[t] ?? "", Dr = (e, t) => xr(e.path, t.path) || Er(e.range, t.range) || xr(e.pointer, t.pointer) || o(e.source, t.source) || o(e.code, t.code) || o(e.severity, t.severity) || o(e.severity === "warning" ? JSON.stringify([
4295
+ e.subject,
4296
+ e.qualifier,
4297
+ e.accepted ?? !1,
4298
+ e.reason ?? null
4299
+ ]) : "", t.severity === "warning" ? JSON.stringify([
4300
+ t.subject,
4301
+ t.qualifier,
4302
+ t.accepted ?? !1,
4303
+ t.reason ?? null
4304
+ ]) : "") || o($(e.entity, "agentId"), $(t.entity, "agentId")) || o($(e.entity, "capabilityKind"), $(t.entity, "capabilityKind")) || o($(e.entity, "capabilityId"), $(t.entity, "capabilityId")) || o($(e.entity, "decisionId"), $(t.entity, "decisionId")) || o($(e.entity, "contextPath"), $(t.entity, "contextPath")) || o($(e.entity, "integrationPath"), $(t.entity, "integrationPath")) || o(wr(e.details), wr(t.details)) || o(e.message, t.message), Or = (e) => e.startsWith("MOLDEA_INTEGRATION_") ? "integration" : e.startsWith("MOLDEA_MIRROR_") ? "mirrors" : /^MOLDEA_(REFERENCE|IMPACT|SYMBOL|CONTEXT|DECISION)_/.test(e) ? "references" : /^MOLDEA_(AGENT|CAPABILITY|TOOL|SKILL)_/.test(e) ? "agents" : /^MOLDEA_(MANIFEST_MISSING|PROJECT_FILE|ENTRY_TYPE|CANONICAL|TEXT)_/.test(e) ? "discovery" : "manifest", kr = (e) => {
4305
+ let t = gr[e.code];
4306
+ if (t === void 0) throw TypeError("The requested Core diagnostic is not implemented.");
4307
+ let n = {
4308
+ code: e.code,
4309
+ details: Sr(e.details),
4310
+ entity: Cr(e.entity),
4311
+ message: t,
4312
+ path: e.path,
4313
+ pointer: e.pointer ?? null,
4314
+ range: e.range ?? null,
4315
+ group: Or(e.code),
4316
+ source: "core"
4317
+ };
4318
+ if (e.code === "MOLDEA_IMPACT_PATTERN_UNMATCHED" || e.code === "MOLDEA_ACCEPTANCE_UNMATCHED" || e.code === "MOLDEA_INTEGRATION_BLOCK_MISSING" || e.code === "MOLDEA_INTEGRATION_SKILL_MISSING" || e.code === "MOLDEA_INTEGRATION_BLOCK_STALE" || e.code === "MOLDEA_INTEGRATION_LINK_UNRESOLVED" || e.code === "MOLDEA_INTEGRATION_CLAUDE_IMPORT_MISSING") {
4319
+ if (e.subject === void 0) throw TypeError("A warning subject is required.");
4320
+ return s({
4321
+ ...n,
4322
+ code: e.code,
4323
+ severity: "warning",
4324
+ subject: e.subject,
4325
+ qualifier: e.qualifier ?? null,
4326
+ acceptable: tr.some((t) => t === e.code)
4327
+ });
4328
+ }
4329
+ return s({
4330
+ ...n,
4331
+ code: e.code,
4332
+ severity: "error"
4333
+ });
4334
+ }, Ar = (e) => {
4335
+ let t = new Map();
4336
+ for (let n of e) {
4337
+ let e = Tr(n);
4338
+ t.has(e) || t.set(e, n);
4339
+ }
4340
+ return s([...t.values()].sort(Dr));
4341
+ }, jr = (e, t) => Ar(e.map((e) => {
4342
+ if (e.range !== null || e.path === null || e.pointer === null) return e;
4343
+ let n = t.get(e.path);
4344
+ if (n === void 0) return e;
4345
+ let r = sr(n, e.pointer);
4346
+ return r === null ? e : {
4347
+ ...e,
4348
+ range: r
4349
+ };
4350
+ })), Mr = (e) => {
4351
+ let t = 0, n = 0, r = 0;
4352
+ for (let i of e) i.severity === "error" ? t += 1 : i.accepted === !0 ? r += 1 : n += 1;
4353
+ return {
4354
+ errorCount: t,
4355
+ warningCount: n,
4356
+ acceptedWarningCount: r,
4357
+ diagnosticCount: e.length
4358
+ };
4359
+ }, Nr = (e, t) => {
4360
+ let n = new Map(), r = 0, i = 0, a = (e) => {
4361
+ let t = kr(e), i = Tr(t);
4362
+ r += 1, n.has(i) || n.set(i, t);
4363
+ };
4364
+ return {
4365
+ add: (n) => {
4366
+ i = br(e, 1, t, i), a(n);
4367
+ },
4368
+ merge: a,
4369
+ finalize: () => Ar([...n.values()]),
4370
+ get size() {
4371
+ return r;
4372
+ }
4373
+ };
4374
+ }, Pr = (e) => e.replaceAll("~", "~0").replaceAll("/", "~1"), Fr = (e) => Object.freeze({ limits: yr(e.limits) }), Ir = [
4375
+ "maxEntries",
4376
+ "maxTotalBytesRead",
4377
+ "maxFileBytes",
4378
+ "maxManifestBytes",
4379
+ "maxRetainedBytes",
4380
+ "maxDiagnostics",
4381
+ "maxCoverage",
4382
+ "maxAcceptedWarnings"
4383
+ ], Lr = (e) => {
4384
+ if (e === void 0) return rr;
4385
+ if (!i(e, !0)) throw new r({
4386
+ code: "INVALID_RESOURCE_LIMIT",
4387
+ operation: "create-core"
4388
+ });
4389
+ let t = new Set(Ir);
4390
+ if (Object.keys(e).some((e) => !t.has(e))) throw new r({
4391
+ code: "INVALID_RESOURCE_LIMIT",
4392
+ operation: "create-core"
4393
+ });
4394
+ let n = { ...rr };
4395
+ for (let t of Ir) {
4396
+ let i = e[t];
4397
+ if (i !== void 0) {
4398
+ if (!Number.isSafeInteger(i) || i <= 0) throw new r({
4399
+ code: "INVALID_RESOURCE_LIMIT",
4400
+ operation: "create-core"
4401
+ });
4402
+ n[t] = i;
4403
+ }
4404
+ }
4405
+ return s(n);
4406
+ }, Rr = (e) => {
4407
+ if (e !== void 0 && (!i(e, !0) || Reflect.ownKeys(e).some((e) => e !== "limits"))) throw new r({
4408
+ code: "INVALID_RESOURCE_LIMIT",
4409
+ operation: "create-core"
4410
+ });
4411
+ return s({ limits: Lr(e?.limits) });
4412
+ };
4413
+ //#endregion
4414
+ export { Fr as a, jr as c, Ar as d, hr as f, a as g, o as h, Nr as i, cr as l, c as m, nr as n, ir as o, s as p, Mr as r, Pr as s, tr as t, Rr as u };