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