@cloud-cli/on 1.59.1 → 1.60.0

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