@brightsideoy/kama 0.1.0-alpha.115 → 0.1.0-alpha.116

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
@@ -127,7 +127,7 @@ var ne = {
127
127
  "]": "%5D",
128
128
  "{": "%7B",
129
129
  "}": "%7D"
130
- }, re = (e) => e.replace(/[!,[\]{}]/g, (e) => ne[e]), ie = class e {
130
+ }, re = (e) => e.replace(/[!,[\]{}]/g, (e) => ne[e]), A = class e {
131
131
  constructor(t, n) {
132
132
  this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, e.defaultYaml, t), this.tags = Object.assign({}, e.defaultTags, n);
133
133
  }
@@ -205,37 +205,37 @@ var ne = {
205
205
  return t.join("\n");
206
206
  }
207
207
  };
208
- ie.defaultYaml = {
208
+ A.defaultYaml = {
209
209
  explicit: !1,
210
210
  version: "1.2"
211
- }, ie.defaultTags = { "!!": "tag:yaml.org,2002:" };
211
+ }, A.defaultTags = { "!!": "tag:yaml.org,2002:" };
212
212
  //#endregion
213
213
  //#region node_modules/yaml/browser/dist/doc/anchors.js
214
- function ae(e) {
214
+ function ie(e) {
215
215
  if (/[\x00-\x19\s,[\]{}]/.test(e)) {
216
216
  let t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
217
217
  throw Error(t);
218
218
  }
219
219
  return !0;
220
220
  }
221
- function oe(e) {
221
+ function ae(e) {
222
222
  let t = /* @__PURE__ */ new Set();
223
223
  return T(e, { Value(e, n) {
224
224
  n.anchor && t.add(n.anchor);
225
225
  } }), t;
226
226
  }
227
- function se(e, t) {
227
+ function oe(e, t) {
228
228
  for (let n = 1;; ++n) {
229
229
  let r = `${e}${n}`;
230
230
  if (!t.has(r)) return r;
231
231
  }
232
232
  }
233
- function A(e, t) {
233
+ function j(e, t) {
234
234
  let n = [], r = /* @__PURE__ */ new Map(), i = null;
235
235
  return {
236
236
  onAnchor: (r) => {
237
- n.push(r), i ??= oe(e);
238
- let a = se(t, i);
237
+ n.push(r), i ??= ae(e);
238
+ let a = oe(t, i);
239
239
  return i.add(a), a;
240
240
  },
241
241
  setAnchors: () => {
@@ -253,22 +253,22 @@ function A(e, t) {
253
253
  }
254
254
  //#endregion
255
255
  //#region node_modules/yaml/browser/dist/doc/applyReviver.js
256
- function j(e, t, n, r) {
256
+ function M(e, t, n, r) {
257
257
  if (r && typeof r == "object") {
258
258
  if (Array.isArray(r)) for (let t = 0, n = r.length; t < n; ++t) {
259
- let n = r[t], i = j(e, r, String(t), n);
259
+ let n = r[t], i = M(e, r, String(t), n);
260
260
  i === void 0 ? delete r[t] : i !== n && (r[t] = i);
261
261
  }
262
262
  else if (r instanceof Map) for (let t of Array.from(r.keys())) {
263
- let n = r.get(t), i = j(e, r, t, n);
263
+ let n = r.get(t), i = M(e, r, t, n);
264
264
  i === void 0 ? r.delete(t) : i !== n && r.set(t, i);
265
265
  }
266
266
  else if (r instanceof Set) for (let t of Array.from(r)) {
267
- let n = j(e, r, t, t);
267
+ let n = M(e, r, t, t);
268
268
  n === void 0 ? r.delete(t) : n !== t && (r.delete(t), r.add(n));
269
269
  }
270
270
  else for (let [t, n] of Object.entries(r)) {
271
- let i = j(e, r, t, n);
271
+ let i = M(e, r, t, n);
272
272
  i === void 0 ? delete r[t] : i !== n && (r[t] = i);
273
273
  }
274
274
  }
@@ -276,8 +276,8 @@ function j(e, t, n, r) {
276
276
  }
277
277
  //#endregion
278
278
  //#region node_modules/yaml/browser/dist/nodes/toJS.js
279
- function M(e, t, n) {
280
- if (Array.isArray(e)) return e.map((e, t) => M(e, String(t), n));
279
+ function N(e, t, n) {
280
+ if (Array.isArray(e)) return e.map((e, t) => N(e, String(t), n));
281
281
  if (e && typeof e.toJSON == "function") {
282
282
  if (!n || !x(e)) return e.toJSON(t, n);
283
283
  let r = {
@@ -295,7 +295,7 @@ function M(e, t, n) {
295
295
  }
296
296
  //#endregion
297
297
  //#region node_modules/yaml/browser/dist/nodes/Node.js
298
- var ce = class {
298
+ var se = class {
299
299
  constructor(e) {
300
300
  Object.defineProperty(this, f, { value: e });
301
301
  }
@@ -312,11 +312,11 @@ var ce = class {
312
312
  mapAsMap: t === !0,
313
313
  mapKeyWarned: !1,
314
314
  maxAliasCount: typeof n == "number" ? n : 100
315
- }, o = M(this, "", a);
315
+ }, o = N(this, "", a);
316
316
  if (typeof r == "function") for (let { count: e, res: t } of a.anchors.values()) r(t, e);
317
- return typeof i == "function" ? j(i, { "": o }, "", o) : o;
317
+ return typeof i == "function" ? M(i, { "": o }, "", o) : o;
318
318
  }
319
- }, le = class extends ce {
319
+ }, ce = class extends se {
320
320
  constructor(e) {
321
321
  super(o), this.source = e, Object.defineProperty(this, "tag", { set() {
322
322
  throw Error("Alias nodes cannot have tags");
@@ -344,14 +344,14 @@ var ce = class {
344
344
  }
345
345
  let o = n.get(a);
346
346
  /* istanbul ignore if */
347
- if (o ||= (M(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
348
- if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = ue(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
347
+ if (o ||= (N(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
348
+ if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = le(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
349
349
  return o.res;
350
350
  }
351
351
  toString(e, t, n) {
352
352
  let r = `*${this.source}`;
353
353
  if (e) {
354
- if (ae(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
354
+ if (ie(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
355
355
  let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
356
356
  throw Error(e);
357
357
  }
@@ -360,7 +360,7 @@ var ce = class {
360
360
  return r;
361
361
  }
362
362
  };
363
- function ue(e, t, n) {
363
+ function le(e, t, n) {
364
364
  if (p(t)) {
365
365
  let r = t.resolve(e), i = n && r && n.get(r);
366
366
  return i ? i.count * i.aliasCount : 0;
@@ -368,35 +368,35 @@ function ue(e, t, n) {
368
368
  if (y(t)) {
369
369
  let r = 0;
370
370
  for (let i of t.items) {
371
- let t = ue(e, i, n);
371
+ let t = le(e, i, n);
372
372
  t > r && (r = t);
373
373
  }
374
374
  return r;
375
375
  }
376
376
  if (g(t)) {
377
- let r = ue(e, t.key, n), i = ue(e, t.value, n);
377
+ let r = le(e, t.key, n), i = le(e, t.value, n);
378
378
  return Math.max(r, i);
379
379
  }
380
380
  return 1;
381
381
  }
382
382
  //#endregion
383
383
  //#region node_modules/yaml/browser/dist/nodes/Scalar.js
384
- var de = (e) => !e || typeof e != "function" && typeof e != "object", N = class extends ce {
384
+ var ue = (e) => !e || typeof e != "function" && typeof e != "object", P = class extends se {
385
385
  constructor(e) {
386
386
  super(u), this.value = e;
387
387
  }
388
388
  toJSON(e, t) {
389
- return t?.keep ? this.value : M(this.value, e, t);
389
+ return t?.keep ? this.value : N(this.value, e, t);
390
390
  }
391
391
  toString() {
392
392
  return String(this.value);
393
393
  }
394
394
  };
395
- N.BLOCK_FOLDED = "BLOCK_FOLDED", N.BLOCK_LITERAL = "BLOCK_LITERAL", N.PLAIN = "PLAIN", N.QUOTE_DOUBLE = "QUOTE_DOUBLE", N.QUOTE_SINGLE = "QUOTE_SINGLE";
395
+ P.BLOCK_FOLDED = "BLOCK_FOLDED", P.BLOCK_LITERAL = "BLOCK_LITERAL", P.PLAIN = "PLAIN", P.QUOTE_DOUBLE = "QUOTE_DOUBLE", P.QUOTE_SINGLE = "QUOTE_SINGLE";
396
396
  //#endregion
397
397
  //#region node_modules/yaml/browser/dist/doc/createNode.js
398
- var fe = "tag:yaml.org,2002:";
399
- function pe(e, t, n) {
398
+ var de = "tag:yaml.org,2002:";
399
+ function fe(e, t, n) {
400
400
  if (t) {
401
401
  let e = n.filter((e) => e.tag === t), r = e.find((e) => !e.format) ?? e[0];
402
402
  if (!r) throw Error(`Tag ${t} not found`);
@@ -404,7 +404,7 @@ function pe(e, t, n) {
404
404
  }
405
405
  return n.find((t) => t.identify?.(e) && !t.format);
406
406
  }
407
- function me(e, t, n) {
407
+ function pe(e, t, n) {
408
408
  if (m(e) && (e = e.contents), b(e)) return e;
409
409
  if (g(e)) {
410
410
  let t = n.schema[c].createNode?.(n.schema, null, n);
@@ -413,28 +413,28 @@ function me(e, t, n) {
413
413
  (e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
414
414
  let { aliasDuplicateObjects: r, onAnchor: i, onTagObj: a, schema: o, sourceObjects: s } = n, l;
415
415
  if (r && e && typeof e == "object") {
416
- if (l = s.get(e), l) return l.anchor ?? (l.anchor = i(e)), new le(l.anchor);
416
+ if (l = s.get(e), l) return l.anchor ?? (l.anchor = i(e)), new ce(l.anchor);
417
417
  l = {
418
418
  anchor: null,
419
419
  node: null
420
420
  }, s.set(e, l);
421
421
  }
422
- t?.startsWith("!!") && (t = fe + t.slice(2));
423
- let u = pe(e, t, o.tags);
422
+ t?.startsWith("!!") && (t = de + t.slice(2));
423
+ let u = fe(e, t, o.tags);
424
424
  if (!u) {
425
425
  if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
426
- let t = new N(e);
426
+ let t = new P(e);
427
427
  return l && (l.node = t), t;
428
428
  }
429
429
  u = e instanceof Map ? o[c] : Symbol.iterator in Object(e) ? o[d] : o[c];
430
430
  }
431
431
  a && (a(u), delete n.onTagObj);
432
- let f = u?.createNode ? u.createNode(n.schema, e, n) : typeof u?.nodeClass?.from == "function" ? u.nodeClass.from(n.schema, e, n) : new N(e);
432
+ let f = u?.createNode ? u.createNode(n.schema, e, n) : typeof u?.nodeClass?.from == "function" ? u.nodeClass.from(n.schema, e, n) : new P(e);
433
433
  return t ? f.tag = t : u.default || (f.tag = u.tag), l && (l.node = f), f;
434
434
  }
435
435
  //#endregion
436
436
  //#region node_modules/yaml/browser/dist/nodes/Collection.js
437
- function he(e, t, n) {
437
+ function me(e, t, n) {
438
438
  let r = n;
439
439
  for (let e = t.length - 1; e >= 0; --e) {
440
440
  let n = t[e];
@@ -443,7 +443,7 @@ function he(e, t, n) {
443
443
  e[n] = r, r = e;
444
444
  } else r = /* @__PURE__ */ new Map([[n, r]]);
445
445
  }
446
- return me(r, void 0, {
446
+ return pe(r, void 0, {
447
447
  aliasDuplicateObjects: !1,
448
448
  keepUndefined: !1,
449
449
  onAnchor: () => {
@@ -453,7 +453,7 @@ function he(e, t, n) {
453
453
  sourceObjects: /* @__PURE__ */ new Map()
454
454
  });
455
455
  }
456
- var ge = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, P = class extends ce {
456
+ var he = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, F = class extends se {
457
457
  constructor(e, t) {
458
458
  super(e), Object.defineProperty(this, "schema", {
459
459
  value: t,
@@ -467,11 +467,11 @@ var ge = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
467
467
  return e && (t.schema = e), t.items = t.items.map((t) => b(t) || g(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
468
468
  }
469
469
  addIn(e, t) {
470
- if (ge(e)) this.add(t);
470
+ if (he(e)) this.add(t);
471
471
  else {
472
472
  let [n, ...r] = e, i = this.get(n, !0);
473
473
  if (y(i)) i.addIn(r, t);
474
- else if (i === void 0 && this.schema) this.set(n, he(this.schema, r, t));
474
+ else if (i === void 0 && this.schema) this.set(n, me(this.schema, r, t));
475
475
  else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
476
476
  }
477
477
  }
@@ -505,16 +505,16 @@ var ge = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
505
505
  else {
506
506
  let e = this.get(n, !0);
507
507
  if (y(e)) e.setIn(r, t);
508
- else if (e === void 0 && this.schema) this.set(n, he(this.schema, r, t));
508
+ else if (e === void 0 && this.schema) this.set(n, me(this.schema, r, t));
509
509
  else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
510
510
  }
511
511
  }
512
- }, _e = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
513
- function F(e, t) {
512
+ }, ge = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
513
+ function I(e, t) {
514
514
  return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
515
515
  }
516
- var I = (e, t, n) => e.endsWith("\n") ? F(n, t) : n.includes("\n") ? "\n" + F(n, t) : (e.endsWith(" ") ? "" : " ") + n, ve = "flow", ye = "block", be = "quoted";
517
- function xe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
516
+ var L = (e, t, n) => e.endsWith("\n") ? I(n, t) : n.includes("\n") ? "\n" + I(n, t) : (e.endsWith(" ") ? "" : " ") + n, _e = "flow", ve = "block", ye = "quoted";
517
+ function be(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
518
518
  if (!i || i < 0) return e;
519
519
  i < a && (a = 0);
520
520
  let c = Math.max(1 + a, 1 + i - t.length);
@@ -522,7 +522,7 @@ function xe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
522
522
  let l = [], u = {}, d = i - t.length;
523
523
  typeof r == "number" && (r > i - Math.max(2, a) ? l.push(0) : d = i - r);
524
524
  let f, p, m = !1, h = -1, g = -1, _ = -1;
525
- n === "block" && (h = Se(e, h, t.length), h !== -1 && (d = h + c));
525
+ n === "block" && (h = xe(e, h, t.length), h !== -1 && (d = h + c));
526
526
  for (let r; r = e[h += 1];) {
527
527
  if (n === "quoted" && r === "\\") {
528
528
  switch (g = h, e[h + 1]) {
@@ -539,7 +539,7 @@ function xe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
539
539
  }
540
540
  _ = h;
541
541
  }
542
- if (r === "\n") n === "block" && (h = Se(e, h, t.length)), d = h + t.length + c, f = void 0;
542
+ if (r === "\n") n === "block" && (h = xe(e, h, t.length)), d = h + t.length + c, f = void 0;
543
543
  else {
544
544
  if (r === " " && p && p !== " " && p !== "\n" && p !== " ") {
545
545
  let t = e[h + 1];
@@ -566,7 +566,7 @@ function xe(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
566
566
  }
567
567
  return v;
568
568
  }
569
- function Se(e, t, n) {
569
+ function xe(e, t, n) {
570
570
  let r = t, i = t + 1, a = e[i];
571
571
  for (; a === " " || a === " ";) if (t < i + n) a = e[++t];
572
572
  else {
@@ -579,12 +579,12 @@ function Se(e, t, n) {
579
579
  }
580
580
  //#endregion
581
581
  //#region node_modules/yaml/browser/dist/stringify/stringifyString.js
582
- var Ce = (e, t) => ({
582
+ var Se = (e, t) => ({
583
583
  indentAtStart: t ? e.indent.length : e.indentAtStart,
584
584
  lineWidth: e.options.lineWidth,
585
585
  minContentWidth: e.options.minContentWidth
586
- }), we = (e) => /^(%|---|\.\.\.)/m.test(e);
587
- function Te(e, t, n) {
586
+ }), Ce = (e) => /^(%|---|\.\.\.)/m.test(e);
587
+ function we(e, t, n) {
588
588
  if (!t || t < 0) return !1;
589
589
  let r = t - n, i = e.length;
590
590
  if (i <= r) return !1;
@@ -594,10 +594,10 @@ function Te(e, t, n) {
594
594
  }
595
595
  return !0;
596
596
  }
597
- function Ee(e, t) {
597
+ function Te(e, t) {
598
598
  let n = JSON.stringify(e);
599
599
  if (t.options.doubleQuotedAsJSON) return n;
600
- let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (we(e) ? " " : ""), o = "", s = 0;
600
+ let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (Ce(e) ? " " : ""), o = "", s = 0;
601
601
  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]) {
602
602
  case "u":
603
603
  {
@@ -642,32 +642,32 @@ function Ee(e, t) {
642
642
  break;
643
643
  default: e += 1;
644
644
  }
645
- return o = s ? o + n.slice(s) : n, r ? o : xe(o, a, be, Ce(t, !1));
645
+ return o = s ? o + n.slice(s) : n, r ? o : be(o, a, ye, Se(t, !1));
646
646
  }
647
- function De(e, t) {
648
- if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Ee(e, t);
649
- let n = t.indent || (we(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
650
- return t.implicitKey ? r : xe(r, n, ve, Ce(t, !1));
647
+ function Ee(e, t) {
648
+ if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Te(e, t);
649
+ let n = t.indent || (Ce(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
650
+ return t.implicitKey ? r : be(r, n, _e, Se(t, !1));
651
651
  }
652
- function Oe(e, t) {
652
+ function De(e, t) {
653
653
  let { singleQuote: n } = t.options, r;
654
- if (n === !1) r = Ee;
654
+ if (n === !1) r = Te;
655
655
  else {
656
656
  let t = e.includes("\""), i = e.includes("'");
657
- r = t && !i ? De : i && !t ? Ee : n ? De : Ee;
657
+ r = t && !i ? Ee : i && !t ? Te : n ? Ee : Te;
658
658
  }
659
659
  return r(e, t);
660
660
  }
661
- var ke;
661
+ var Oe;
662
662
  try {
663
- ke = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
663
+ Oe = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
664
664
  } catch {
665
- ke = /\n+(?!\n|$)/g;
665
+ Oe = /\n+(?!\n|$)/g;
666
666
  }
667
- function Ae({ comment: e, type: t, value: n }, r, i, a) {
667
+ function ke({ comment: e, type: t, value: n }, r, i, a) {
668
668
  let { blockQuote: o, commentString: s, lineWidth: c } = r.options;
669
- if (!o || /\n[\t ]+$/.test(n)) return Oe(n, r);
670
- let l = r.indent || (r.forceBlockIndent || we(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === N.BLOCK_FOLDED ? !1 : t === N.BLOCK_LITERAL || !Te(n, c, l.length);
669
+ if (!o || /\n[\t ]+$/.test(n)) return De(n, r);
670
+ let l = r.indent || (r.forceBlockIndent || Ce(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === P.BLOCK_FOLDED ? !1 : t === P.BLOCK_LITERAL || !we(n, c, l.length);
671
671
  if (!n) return u ? "|\n" : ">\n";
672
672
  let d, f;
673
673
  for (f = n.length; f > 0; --f) {
@@ -675,7 +675,7 @@ function Ae({ comment: e, type: t, value: n }, r, i, a) {
675
675
  if (e !== "\n" && e !== " " && e !== " ") break;
676
676
  }
677
677
  let p = n.substring(f), m = p.indexOf("\n");
678
- 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(ke, `$&${l}`));
678
+ 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(Oe, `$&${l}`));
679
679
  let h = !1, g, _ = -1;
680
680
  for (g = 0; g < n.length; ++g) {
681
681
  let e = n[g];
@@ -687,41 +687,41 @@ function Ae({ comment: e, type: t, value: n }, r, i, a) {
687
687
  v &&= (n = n.substring(v.length), v.replace(/\n+/g, `$&${l}`));
688
688
  let y = (h ? l ? "2" : "1" : "") + d;
689
689
  if (e && (y += " " + s(e.replace(/ ?[\r\n]+/g, " ")), i && i()), !u) {
690
- 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 = Ce(r, !0);
691
- o !== "folded" && t !== N.BLOCK_FOLDED && (a.onOverflow = () => {
690
+ 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 = Se(r, !0);
691
+ o !== "folded" && t !== P.BLOCK_FOLDED && (a.onOverflow = () => {
692
692
  i = !0;
693
693
  });
694
- let s = xe(`${v}${e}${p}`, l, ye, a);
694
+ let s = be(`${v}${e}${p}`, l, ve, a);
695
695
  if (!i) return `>${y}\n${l}${s}`;
696
696
  }
697
697
  return n = n.replace(/\n+/g, `$&${l}`), `|${y}\n${l}${v}${n}${p}`;
698
698
  }
699
- function je(e, t, n, r) {
699
+ function Ae(e, t, n, r) {
700
700
  let { type: i, value: a } = e, { actualString: o, implicitKey: s, indent: c, indentStep: l, inFlow: u } = t;
701
- if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return Oe(a, t);
702
- if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? Oe(a, t) : Ae(e, t, n, r);
703
- if (!s && !u && i !== N.PLAIN && a.includes("\n")) return Ae(e, t, n, r);
704
- if (we(a)) {
705
- if (c === "") return t.forceBlockIndent = !0, Ae(e, t, n, r);
706
- if (s && c === l) return Oe(a, t);
701
+ if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return De(a, t);
702
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? De(a, t) : ke(e, t, n, r);
703
+ if (!s && !u && i !== P.PLAIN && a.includes("\n")) return ke(e, t, n, r);
704
+ if (Ce(a)) {
705
+ if (c === "") return t.forceBlockIndent = !0, ke(e, t, n, r);
706
+ if (s && c === l) return De(a, t);
707
707
  }
708
708
  let d = a.replace(/\n+/g, `$&\n${c}`);
709
709
  if (o) {
710
710
  let e = (e) => e.default && e.tag !== "tag:yaml.org,2002:str" && e.test?.test(d), { compat: n, tags: r } = t.doc.schema;
711
- if (r.some(e) || n?.some(e)) return Oe(a, t);
711
+ if (r.some(e) || n?.some(e)) return De(a, t);
712
712
  }
713
- return s ? d : xe(d, c, ve, Ce(t, !1));
713
+ return s ? d : be(d, c, _e, Se(t, !1));
714
714
  }
715
- function Me(e, t, n, r) {
715
+ function je(e, t, n, r) {
716
716
  let { implicitKey: i, inFlow: a } = t, o = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) }), { type: s } = e;
717
- s !== N.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = N.QUOTE_DOUBLE);
717
+ s !== P.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = P.QUOTE_DOUBLE);
718
718
  let c = (e) => {
719
719
  switch (e) {
720
- case N.BLOCK_FOLDED:
721
- case N.BLOCK_LITERAL: return i || a ? Oe(o.value, t) : Ae(o, t, n, r);
722
- case N.QUOTE_DOUBLE: return Ee(o.value, t);
723
- case N.QUOTE_SINGLE: return De(o.value, t);
724
- case N.PLAIN: return je(o, t, n, r);
720
+ case P.BLOCK_FOLDED:
721
+ case P.BLOCK_LITERAL: return i || a ? De(o.value, t) : ke(o, t, n, r);
722
+ case P.QUOTE_DOUBLE: return Te(o.value, t);
723
+ case P.QUOTE_SINGLE: return Ee(o.value, t);
724
+ case P.PLAIN: return Ae(o, t, n, r);
725
725
  default: return null;
726
726
  }
727
727
  }, l = c(s);
@@ -733,10 +733,10 @@ function Me(e, t, n, r) {
733
733
  }
734
734
  //#endregion
735
735
  //#region node_modules/yaml/browser/dist/stringify/stringify.js
736
- function Ne(e, t) {
736
+ function Me(e, t) {
737
737
  let n = Object.assign({
738
738
  blockQuote: !0,
739
- commentString: _e,
739
+ commentString: ge,
740
740
  defaultKeyType: null,
741
741
  defaultStringType: "PLAIN",
742
742
  directives: null,
@@ -773,7 +773,7 @@ function Ne(e, t) {
773
773
  options: n
774
774
  };
775
775
  }
776
- function Pe(e, t) {
776
+ function Ne(e, t) {
777
777
  if (t.tag) {
778
778
  let n = e.filter((e) => e.tag === t.tag);
779
779
  if (n.length > 0) return n.find((e) => e.format === t.format) ?? n[0];
@@ -794,14 +794,14 @@ function Pe(e, t) {
794
794
  }
795
795
  return n;
796
796
  }
797
- function Fe(e, t, { anchors: n, doc: r }) {
797
+ function Pe(e, t, { anchors: n, doc: r }) {
798
798
  if (!r.directives) return "";
799
799
  let i = [], a = (_(e) || y(e)) && e.anchor;
800
- a && ae(a) && (n.add(a), i.push(`&${a}`));
800
+ a && ie(a) && (n.add(a), i.push(`&${a}`));
801
801
  let o = e.tag ?? (t.default ? null : t.tag);
802
802
  return o && i.push(r.directives.tagString(o)), i.join(" ");
803
803
  }
804
- function Ie(e, t, n, r) {
804
+ function Fe(e, t, n, r) {
805
805
  if (g(e)) return e.toString(t, n, r);
806
806
  if (p(e)) {
807
807
  if (t.doc.directives) return e.toString(t);
@@ -809,42 +809,42 @@ function Ie(e, t, n, r) {
809
809
  t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = /* @__PURE__ */ new Set([e]), e = e.resolve(t.doc);
810
810
  }
811
811
  let i, a = b(e) ? e : t.doc.createNode(e, { onTagObj: (e) => i = e });
812
- i ??= Pe(t.doc.schema.tags, a);
813
- let o = Fe(a, i, t);
812
+ i ??= Ne(t.doc.schema.tags, a);
813
+ let o = Pe(a, i, t);
814
814
  o.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + o.length + 1);
815
- let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : _(a) ? Me(a, t, n, r) : a.toString(t, n, r);
815
+ let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : _(a) ? je(a, t, n, r) : a.toString(t, n, r);
816
816
  return o ? _(a) || s[0] === "{" || s[0] === "[" ? `${o} ${s}` : `${o}\n${t.indent}${s}` : s;
817
817
  }
818
818
  //#endregion
819
819
  //#region node_modules/yaml/browser/dist/stringify/stringifyPair.js
820
- function Le({ key: e, value: t }, n, r, i) {
820
+ function Ie({ key: e, value: t }, n, r, i) {
821
821
  let { allNullValues: a, doc: o, indent: s, indentStep: c, options: { commentString: l, indentSeq: u, simpleKeys: d } } = n, f = b(e) && e.comment || null;
822
822
  if (d) {
823
823
  if (f) throw Error("With simple keys, key nodes cannot have comments");
824
824
  if (y(e) || !b(e) && typeof e == "object") throw Error("With simple keys, collection cannot be used as a key value");
825
825
  }
826
- let p = !d && (!e || f && t == null && !n.inFlow || y(e) || (_(e) ? e.type === N.BLOCK_FOLDED || e.type === N.BLOCK_LITERAL : typeof e == "object"));
826
+ let p = !d && (!e || f && t == null && !n.inFlow || y(e) || (_(e) ? e.type === P.BLOCK_FOLDED || e.type === P.BLOCK_LITERAL : typeof e == "object"));
827
827
  n = Object.assign({}, n, {
828
828
  allNullValues: !1,
829
829
  implicitKey: !p && (d || !a),
830
830
  indent: s + c
831
831
  });
832
- let m = !1, h = !1, g = Ie(e, n, () => m = !0, () => h = !0);
832
+ let m = !1, h = !1, g = Fe(e, n, () => m = !0, () => h = !0);
833
833
  if (!p && !n.inFlow && g.length > 1024) {
834
834
  if (d) throw Error("With simple keys, single line scalar must not span more than 1024 characters");
835
835
  p = !0;
836
836
  }
837
837
  if (n.inFlow) {
838
838
  if (a || t == null) return m && r && r(), g === "" ? "?" : p ? `? ${g}` : g;
839
- } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += I(g, n.indent, l(f)) : h && i && i(), g;
840
- m && (f = null), p ? (f && (g += I(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += I(g, n.indent, l(f))));
839
+ } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += L(g, n.indent, l(f)) : h && i && i(), g;
840
+ m && (f = null), p ? (f && (g += L(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += L(g, n.indent, l(f))));
841
841
  let x, S, C;
842
842
  b(t) ? (x = !!t.spaceBefore, S = t.commentBefore, C = t.comment) : (x = !1, S = null, C = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !p && !f && _(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p && v(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
843
- let w = !1, T = Ie(t, n, () => w = !0, () => h = !0), E = " ";
843
+ let w = !1, T = Fe(t, n, () => w = !0, () => h = !0), E = " ";
844
844
  if (f || x || S) {
845
845
  if (E = x ? "\n" : "", S) {
846
846
  let e = l(S);
847
- E += `\n${F(e, n.indent)}`;
847
+ E += `\n${I(e, n.indent)}`;
848
848
  }
849
849
  T === "" && !n.inFlow ? E === "\n" && C && (E = "\n\n") : E += `\n${n.indent}`;
850
850
  } else if (!p && y(t)) {
@@ -858,31 +858,31 @@ function Le({ key: e, value: t }, n, r, i) {
858
858
  t || (E = `\n${n.indent}`);
859
859
  }
860
860
  } else (T === "" || T[0] === "\n") && (E = "");
861
- return g += E + T, n.inFlow ? w && r && r() : C && !w ? g += I(g, n.indent, l(C)) : h && i && i(), g;
861
+ return g += E + T, n.inFlow ? w && r && r() : C && !w ? g += L(g, n.indent, l(C)) : h && i && i(), g;
862
862
  }
863
863
  //#endregion
864
864
  //#region node_modules/yaml/browser/dist/log.js
865
- function Re(e, t) {
865
+ function Le(e, t) {
866
866
  (e === "debug" || e === "warn") && console.warn(t);
867
867
  }
868
868
  //#endregion
869
869
  //#region node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
870
- var ze = "<<", L = {
871
- identify: (e) => e === ze || typeof e == "symbol" && e.description === ze,
870
+ var Re = "<<", R = {
871
+ identify: (e) => e === Re || typeof e == "symbol" && e.description === Re,
872
872
  default: "key",
873
873
  tag: "tag:yaml.org,2002:merge",
874
874
  test: /^<<$/,
875
- resolve: () => Object.assign(new N(Symbol(ze)), { addToJSMap: Ve }),
876
- stringify: () => ze
877
- }, Be = (e, t) => (L.identify(t) || _(t) && (!t.type || t.type === N.PLAIN) && L.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === L.tag && e.default);
878
- function Ve(e, t, n) {
879
- let r = Ue(e, n);
880
- if (v(r)) for (let n of r.items) He(e, t, n);
881
- else if (Array.isArray(r)) for (let n of r) He(e, t, n);
882
- else He(e, t, r);
875
+ resolve: () => Object.assign(new P(Symbol(Re)), { addToJSMap: Be }),
876
+ stringify: () => Re
877
+ }, ze = (e, t) => (R.identify(t) || _(t) && (!t.type || t.type === P.PLAIN) && R.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === R.tag && e.default);
878
+ function Be(e, t, n) {
879
+ let r = He(e, n);
880
+ if (v(r)) for (let n of r.items) Ve(e, t, n);
881
+ else if (Array.isArray(r)) for (let n of r) Ve(e, t, n);
882
+ else Ve(e, t, r);
883
883
  }
884
- function He(e, t, n) {
885
- let r = Ue(e, n);
884
+ function Ve(e, t, n) {
885
+ let r = He(e, n);
886
886
  if (!h(r)) throw Error("Merge sources must be maps or map aliases");
887
887
  let i = r.toJSON(null, e, Map);
888
888
  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, {
@@ -893,20 +893,20 @@ function He(e, t, n) {
893
893
  });
894
894
  return t;
895
895
  }
896
- function Ue(e, t) {
896
+ function He(e, t) {
897
897
  return e && p(t) ? t.resolve(e.doc, e) : t;
898
898
  }
899
899
  //#endregion
900
900
  //#region node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
901
- function We(e, t, { key: n, value: r }) {
901
+ function Ue(e, t, { key: n, value: r }) {
902
902
  if (b(n) && n.addToJSMap) n.addToJSMap(e, t, r);
903
- else if (Be(e, n)) Ve(e, t, r);
903
+ else if (ze(e, n)) Be(e, t, r);
904
904
  else {
905
- let i = M(n, "", e);
906
- if (t instanceof Map) t.set(i, M(r, i, e));
905
+ let i = N(n, "", e);
906
+ if (t instanceof Map) t.set(i, N(r, i, e));
907
907
  else if (t instanceof Set) t.add(i);
908
908
  else {
909
- let a = Ge(n, i, e), o = M(r, a, e);
909
+ let a = We(n, i, e), o = N(r, a, e);
910
910
  a in t ? Object.defineProperty(t, a, {
911
911
  value: o,
912
912
  writable: !0,
@@ -917,18 +917,18 @@ function We(e, t, { key: n, value: r }) {
917
917
  }
918
918
  return t;
919
919
  }
920
- function Ge(e, t, n) {
920
+ function We(e, t, n) {
921
921
  if (t === null) return "";
922
922
  if (typeof t != "object") return String(t);
923
923
  if (b(e) && n?.doc) {
924
- let t = Ne(n.doc, {});
924
+ let t = Me(n.doc, {});
925
925
  t.anchors = /* @__PURE__ */ new Set();
926
926
  for (let e of n.anchors.keys()) t.anchors.add(e.anchor);
927
927
  t.inFlow = !0, t.inStringifyKey = !0;
928
928
  let r = e.toString(t);
929
929
  if (!n.mapKeyWarned) {
930
930
  let e = JSON.stringify(r);
931
- e.length > 40 && (e = e.substring(0, 36) + "...\""), Re(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;
931
+ e.length > 40 && (e = e.substring(0, 36) + "...\""), Le(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;
932
932
  }
933
933
  return r;
934
934
  }
@@ -936,10 +936,10 @@ function Ge(e, t, n) {
936
936
  }
937
937
  //#endregion
938
938
  //#region node_modules/yaml/browser/dist/nodes/Pair.js
939
- function Ke(e, t, n) {
940
- return new R(me(e, void 0, n), me(t, void 0, n));
939
+ function Ge(e, t, n) {
940
+ return new z(pe(e, void 0, n), pe(t, void 0, n));
941
941
  }
942
- var R = class e {
942
+ var z = class e {
943
943
  constructor(e, t = null) {
944
944
  Object.defineProperty(this, f, { value: l }), this.key = e, this.value = t;
945
945
  }
@@ -948,32 +948,32 @@ var R = class e {
948
948
  return b(n) && (n = n.clone(t)), b(r) && (r = r.clone(t)), new e(n, r);
949
949
  }
950
950
  toJSON(e, t) {
951
- return We(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
951
+ return Ue(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
952
952
  }
953
953
  toString(e, t, n) {
954
- return e?.doc ? Le(this, e, t, n) : JSON.stringify(this);
954
+ return e?.doc ? Ie(this, e, t, n) : JSON.stringify(this);
955
955
  }
956
956
  };
957
957
  //#endregion
958
958
  //#region node_modules/yaml/browser/dist/stringify/stringifyCollection.js
959
- function qe(e, t, n) {
960
- return (t.inFlow ?? e.flow ? Ye : Je)(e, t, n);
959
+ function Ke(e, t, n) {
960
+ return (t.inFlow ?? e.flow ? Je : qe)(e, t, n);
961
961
  }
962
- function Je({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
962
+ function qe({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
963
963
  let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
964
964
  indent: a,
965
965
  type: null
966
966
  }), d = !1, f = [];
967
967
  for (let e = 0; e < t.length; ++e) {
968
968
  let i = t[e], o = null;
969
- if (b(i)) !d && i.spaceBefore && f.push(""), Xe(n, f, i.commentBefore, d), i.comment && (o = i.comment);
969
+ if (b(i)) !d && i.spaceBefore && f.push(""), Ye(n, f, i.commentBefore, d), i.comment && (o = i.comment);
970
970
  else if (g(i)) {
971
971
  let e = b(i.key) ? i.key : null;
972
- e && (!d && e.spaceBefore && f.push(""), Xe(n, f, e.commentBefore, d));
972
+ e && (!d && e.spaceBefore && f.push(""), Ye(n, f, e.commentBefore, d));
973
973
  }
974
974
  d = !1;
975
- let s = Ie(i, u, () => o = null, () => d = !0);
976
- o && (s += I(s, a, l(o))), d && o && (d = !1), f.push(r + s);
975
+ let s = Fe(i, u, () => o = null, () => d = !0);
976
+ o && (s += L(s, a, l(o))), d && o && (d = !1), f.push(r + s);
977
977
  }
978
978
  let p;
979
979
  if (f.length === 0) p = i.start + i.end;
@@ -984,9 +984,9 @@ function Je({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, ite
984
984
  p += t ? `\n${c}${t}` : "\n";
985
985
  }
986
986
  }
987
- return e ? (p += "\n" + F(l(e), c), s && s()) : d && o && o(), p;
987
+ return e ? (p += "\n" + I(l(e), c), s && s()) : d && o && o(), p;
988
988
  }
989
- function Ye({ items: e }, t, { flowChars: n, itemIndent: r }) {
989
+ function Je({ items: e }, t, { flowChars: n, itemIndent: r }) {
990
990
  let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
991
991
  r += a;
992
992
  let c = Object.assign({}, t, {
@@ -996,16 +996,16 @@ function Ye({ items: e }, t, { flowChars: n, itemIndent: r }) {
996
996
  }), l = !1, u = 0, d = [];
997
997
  for (let n = 0; n < e.length; ++n) {
998
998
  let i = e[n], a = null;
999
- if (b(i)) i.spaceBefore && d.push(""), Xe(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
999
+ if (b(i)) i.spaceBefore && d.push(""), Ye(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
1000
1000
  else if (g(i)) {
1001
1001
  let e = b(i.key) ? i.key : null;
1002
- e && (e.spaceBefore && d.push(""), Xe(t, d, e.commentBefore, !1), e.comment && (l = !0));
1002
+ e && (e.spaceBefore && d.push(""), Ye(t, d, e.commentBefore, !1), e.comment && (l = !0));
1003
1003
  let n = b(i.value) ? i.value : null;
1004
1004
  n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
1005
1005
  }
1006
1006
  a && (l = !0);
1007
- let o = Ie(i, c, () => a = null);
1008
- 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 += I(o, r, s(a))), d.push(o), u = d.length;
1007
+ let o = Fe(i, c, () => a = null);
1008
+ 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 += L(o, r, s(a))), d.push(o), u = d.length;
1009
1009
  }
1010
1010
  let { start: f, end: p } = n;
1011
1011
  if (d.length === 0) return f + p;
@@ -1020,19 +1020,19 @@ function Ye({ items: e }, t, { flowChars: n, itemIndent: r }) {
1020
1020
  }
1021
1021
  return `${f}${o}${d.join(" ")}${o}${p}`;
1022
1022
  }
1023
- function Xe({ indent: e, options: { commentString: t } }, n, r, i) {
1023
+ function Ye({ indent: e, options: { commentString: t } }, n, r, i) {
1024
1024
  if (r && i && (r = r.replace(/^\n+/, "")), r) {
1025
- let i = F(t(r), e);
1025
+ let i = I(t(r), e);
1026
1026
  n.push(i.trimStart());
1027
1027
  }
1028
1028
  }
1029
1029
  //#endregion
1030
1030
  //#region node_modules/yaml/browser/dist/nodes/YAMLMap.js
1031
- function Ze(e, t) {
1031
+ function Xe(e, t) {
1032
1032
  let n = _(t) ? t.value : t;
1033
1033
  for (let r of e) if (g(r) && (r.key === t || r.key === n || _(r.key) && r.key.value === n)) return r;
1034
1034
  }
1035
- var z = class extends P {
1035
+ var B = class extends F {
1036
1036
  static get tagName() {
1037
1037
  return "tag:yaml.org,2002:map";
1038
1038
  }
@@ -1043,7 +1043,7 @@ var z = class extends P {
1043
1043
  let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
1044
1044
  if (typeof i == "function") o = i.call(t, e, o);
1045
1045
  else if (Array.isArray(i) && !i.includes(e)) return;
1046
- (o !== void 0 || r) && a.items.push(Ke(e, o, n));
1046
+ (o !== void 0 || r) && a.items.push(Ge(e, o, n));
1047
1047
  };
1048
1048
  if (t instanceof Map) for (let [e, n] of t) o(e, n);
1049
1049
  else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
@@ -1051,40 +1051,40 @@ var z = class extends P {
1051
1051
  }
1052
1052
  add(e, t) {
1053
1053
  let n;
1054
- n = g(e) ? e : !e || typeof e != "object" || !("key" in e) ? new R(e, e?.value) : new R(e.key, e.value);
1055
- let r = Ze(this.items, n.key), i = this.schema?.sortMapEntries;
1054
+ n = g(e) ? e : !e || typeof e != "object" || !("key" in e) ? new z(e, e?.value) : new z(e.key, e.value);
1055
+ let r = Xe(this.items, n.key), i = this.schema?.sortMapEntries;
1056
1056
  if (r) {
1057
1057
  if (!t) throw Error(`Key ${n.key} already set`);
1058
- _(r.value) && de(n.value) ? r.value.value = n.value : r.value = n.value;
1058
+ _(r.value) && ue(n.value) ? r.value.value = n.value : r.value = n.value;
1059
1059
  } else if (i) {
1060
1060
  let e = this.items.findIndex((e) => i(n, e) < 0);
1061
1061
  e === -1 ? this.items.push(n) : this.items.splice(e, 0, n);
1062
1062
  } else this.items.push(n);
1063
1063
  }
1064
1064
  delete(e) {
1065
- let t = Ze(this.items, e);
1065
+ let t = Xe(this.items, e);
1066
1066
  return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1067
1067
  }
1068
1068
  get(e, t) {
1069
- let n = Ze(this.items, e)?.value;
1069
+ let n = Xe(this.items, e)?.value;
1070
1070
  return (!t && _(n) ? n.value : n) ?? void 0;
1071
1071
  }
1072
1072
  has(e) {
1073
- return !!Ze(this.items, e);
1073
+ return !!Xe(this.items, e);
1074
1074
  }
1075
1075
  set(e, t) {
1076
- this.add(new R(e, t), !0);
1076
+ this.add(new z(e, t), !0);
1077
1077
  }
1078
1078
  toJSON(e, t, n) {
1079
1079
  let r = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1080
1080
  t?.onCreate && t.onCreate(r);
1081
- for (let e of this.items) We(t, r, e);
1081
+ for (let e of this.items) Ue(t, r, e);
1082
1082
  return r;
1083
1083
  }
1084
1084
  toString(e, t, n) {
1085
1085
  if (!e) return JSON.stringify(this);
1086
1086
  for (let e of this.items) if (!g(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
1087
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), qe(this, e, {
1087
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), Ke(this, e, {
1088
1088
  blockItemPrefix: "",
1089
1089
  flowChars: {
1090
1090
  start: "{",
@@ -1095,16 +1095,16 @@ var z = class extends P {
1095
1095
  onComment: t
1096
1096
  });
1097
1097
  }
1098
- }, Qe = {
1098
+ }, Ze = {
1099
1099
  collection: "map",
1100
1100
  default: !0,
1101
- nodeClass: z,
1101
+ nodeClass: B,
1102
1102
  tag: "tag:yaml.org,2002:map",
1103
1103
  resolve(e, t) {
1104
1104
  return h(e) || t("Expected a mapping for this tag"), e;
1105
1105
  },
1106
- createNode: (e, t, n) => z.from(e, t, n)
1107
- }, B = class extends P {
1106
+ createNode: (e, t, n) => B.from(e, t, n)
1107
+ }, Qe = class extends F {
1108
1108
  static get tagName() {
1109
1109
  return "tag:yaml.org,2002:seq";
1110
1110
  }
@@ -1132,17 +1132,17 @@ var z = class extends P {
1132
1132
  let n = $e(e);
1133
1133
  if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
1134
1134
  let r = this.items[n];
1135
- _(r) && de(t) ? r.value = t : this.items[n] = t;
1135
+ _(r) && ue(t) ? r.value = t : this.items[n] = t;
1136
1136
  }
1137
1137
  toJSON(e, t) {
1138
1138
  let n = [];
1139
1139
  t?.onCreate && t.onCreate(n);
1140
1140
  let r = 0;
1141
- for (let e of this.items) n.push(M(e, String(r++), t));
1141
+ for (let e of this.items) n.push(N(e, String(r++), t));
1142
1142
  return n;
1143
1143
  }
1144
1144
  toString(e, t, n) {
1145
- return e ? qe(this, e, {
1145
+ return e ? Ke(this, e, {
1146
1146
  blockItemPrefix: "- ",
1147
1147
  flowChars: {
1148
1148
  start: "[",
@@ -1162,7 +1162,7 @@ var z = class extends P {
1162
1162
  let n = t instanceof Set ? a : String(e++);
1163
1163
  a = r.call(t, n, a);
1164
1164
  }
1165
- i.items.push(me(a, void 0, n));
1165
+ i.items.push(pe(a, void 0, n));
1166
1166
  }
1167
1167
  }
1168
1168
  return i;
@@ -1177,34 +1177,34 @@ function $e(e) {
1177
1177
  var et = {
1178
1178
  collection: "seq",
1179
1179
  default: !0,
1180
- nodeClass: B,
1180
+ nodeClass: Qe,
1181
1181
  tag: "tag:yaml.org,2002:seq",
1182
1182
  resolve(e, t) {
1183
1183
  return v(e) || t("Expected a sequence for this tag"), e;
1184
1184
  },
1185
- createNode: (e, t, n) => B.from(e, t, n)
1185
+ createNode: (e, t, n) => Qe.from(e, t, n)
1186
1186
  }, tt = {
1187
1187
  identify: (e) => typeof e == "string",
1188
1188
  default: !0,
1189
1189
  tag: "tag:yaml.org,2002:str",
1190
1190
  resolve: (e) => e,
1191
1191
  stringify(e, t, n, r) {
1192
- return t = Object.assign({ actualString: !0 }, t), Me(e, t, n, r);
1192
+ return t = Object.assign({ actualString: !0 }, t), je(e, t, n, r);
1193
1193
  }
1194
1194
  }, nt = {
1195
1195
  identify: (e) => e == null,
1196
- createNode: () => new N(null),
1196
+ createNode: () => new P(null),
1197
1197
  default: !0,
1198
1198
  tag: "tag:yaml.org,2002:null",
1199
1199
  test: /^(?:~|[Nn]ull|NULL)?$/,
1200
- resolve: () => new N(null),
1200
+ resolve: () => new P(null),
1201
1201
  stringify: ({ source: e }, t) => typeof e == "string" && nt.test.test(e) ? e : t.options.nullStr
1202
1202
  }, rt = {
1203
1203
  identify: (e) => typeof e == "boolean",
1204
1204
  default: !0,
1205
1205
  tag: "tag:yaml.org,2002:bool",
1206
1206
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1207
- resolve: (e) => new N(e[0] === "t" || e[0] === "T"),
1207
+ resolve: (e) => new P(e[0] === "t" || e[0] === "T"),
1208
1208
  stringify({ source: e, value: t }, n) {
1209
1209
  return e && rt.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
1210
1210
  }
@@ -1250,7 +1250,7 @@ var it = {
1250
1250
  tag: "tag:yaml.org,2002:float",
1251
1251
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1252
1252
  resolve(e) {
1253
- let t = new N(parseFloat(e)), n = e.indexOf(".");
1253
+ let t = new P(parseFloat(e)), n = e.indexOf(".");
1254
1254
  return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
1255
1255
  },
1256
1256
  stringify: V
@@ -1283,7 +1283,7 @@ var ut = {
1283
1283
  resolve: (e, t, n) => ct(e, 2, 16, n),
1284
1284
  stringify: (e) => lt(e, 16, "0x")
1285
1285
  }, pt = [
1286
- Qe,
1286
+ Ze,
1287
1287
  et,
1288
1288
  tt,
1289
1289
  nt,
@@ -1310,7 +1310,7 @@ var ht = ({ value: e }) => JSON.stringify(e), gt = [
1310
1310
  },
1311
1311
  {
1312
1312
  identify: (e) => e == null,
1313
- createNode: () => new N(null),
1313
+ createNode: () => new P(null),
1314
1314
  default: !0,
1315
1315
  tag: "tag:yaml.org,2002:null",
1316
1316
  test: /^null$/,
@@ -1341,7 +1341,7 @@ var ht = ({ value: e }) => JSON.stringify(e), gt = [
1341
1341
  resolve: (e) => parseFloat(e),
1342
1342
  stringify: ht
1343
1343
  }
1344
- ], _t = [Qe, et].concat(gt, {
1344
+ ], _t = [Ze, et].concat(gt, {
1345
1345
  default: !0,
1346
1346
  tag: "",
1347
1347
  test: /^/,
@@ -1368,12 +1368,12 @@ var ht = ({ value: e }) => JSON.stringify(e), gt = [
1368
1368
  for (let t = 0; t < o.length; ++t) e += String.fromCharCode(o[t]);
1369
1369
  s = btoa(e);
1370
1370
  } else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1371
- if (t ??= N.BLOCK_LITERAL, t !== N.QUOTE_DOUBLE) {
1371
+ if (t ??= P.BLOCK_LITERAL, t !== P.QUOTE_DOUBLE) {
1372
1372
  let e = Math.max(r.options.lineWidth - r.indent.length, r.options.minContentWidth), n = Math.ceil(s.length / e), i = Array(n);
1373
1373
  for (let t = 0, r = 0; t < n; ++t, r += e) i[t] = s.substr(r, e);
1374
- s = i.join(t === N.BLOCK_LITERAL ? "\n" : " ");
1374
+ s = i.join(t === P.BLOCK_LITERAL ? "\n" : " ");
1375
1375
  }
1376
- return Me({
1376
+ return je({
1377
1377
  comment: e,
1378
1378
  type: t,
1379
1379
  value: s
@@ -1388,21 +1388,21 @@ function yt(e, t) {
1388
1388
  if (!g(r)) {
1389
1389
  if (h(r)) {
1390
1390
  r.items.length > 1 && t("Each pair must have its own sequence indicator");
1391
- let e = r.items[0] || new R(new N(null));
1391
+ let e = r.items[0] || new z(new P(null));
1392
1392
  if (r.commentBefore && (e.key.commentBefore = e.key.commentBefore ? `${r.commentBefore}\n${e.key.commentBefore}` : r.commentBefore), r.comment) {
1393
1393
  let t = e.value ?? e.key;
1394
1394
  t.comment = t.comment ? `${r.comment}\n${t.comment}` : r.comment;
1395
1395
  }
1396
1396
  r = e;
1397
1397
  }
1398
- e.items[n] = g(r) ? r : new R(r);
1398
+ e.items[n] = g(r) ? r : new z(r);
1399
1399
  }
1400
1400
  }
1401
1401
  else t("Expected a sequence for this tag");
1402
1402
  return e;
1403
1403
  }
1404
1404
  function bt(e, t, n) {
1405
- let { replacer: r } = n, i = new B(e);
1405
+ let { replacer: r } = n, i = new Qe(e);
1406
1406
  i.tag = "tag:yaml.org,2002:pairs";
1407
1407
  let a = 0;
1408
1408
  if (t && Symbol.iterator in Object(t)) for (let e of t) {
@@ -1416,7 +1416,7 @@ function bt(e, t, n) {
1416
1416
  if (t.length === 1) o = t[0], s = e[o];
1417
1417
  else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
1418
1418
  } else o = e;
1419
- i.items.push(Ke(o, s, n));
1419
+ i.items.push(Ge(o, s, n));
1420
1420
  }
1421
1421
  return i;
1422
1422
  }
@@ -1426,9 +1426,9 @@ var xt = {
1426
1426
  tag: "tag:yaml.org,2002:pairs",
1427
1427
  resolve: yt,
1428
1428
  createNode: bt
1429
- }, St = class e extends B {
1429
+ }, St = class e extends Qe {
1430
1430
  constructor() {
1431
- super(), this.add = z.prototype.add.bind(this), this.delete = z.prototype.delete.bind(this), this.get = z.prototype.get.bind(this), this.has = z.prototype.has.bind(this), this.set = z.prototype.set.bind(this), this.tag = e.tag;
1431
+ super(), this.add = B.prototype.add.bind(this), this.delete = B.prototype.delete.bind(this), this.get = B.prototype.get.bind(this), this.has = B.prototype.has.bind(this), this.set = B.prototype.set.bind(this), this.tag = e.tag;
1432
1432
  }
1433
1433
  toJSON(e, t) {
1434
1434
  if (!t) return super.toJSON(e);
@@ -1436,7 +1436,7 @@ var xt = {
1436
1436
  t?.onCreate && t.onCreate(n);
1437
1437
  for (let e of this.items) {
1438
1438
  let r, i;
1439
- if (g(e) ? (r = M(e.key, "", t), i = M(e.value, r, t)) : r = M(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
1439
+ if (g(e) ? (r = N(e.key, "", t), i = N(e.value, r, t)) : r = N(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
1440
1440
  n.set(r, i);
1441
1441
  }
1442
1442
  return n;
@@ -1470,14 +1470,14 @@ var Tt = {
1470
1470
  default: !0,
1471
1471
  tag: "tag:yaml.org,2002:bool",
1472
1472
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1473
- resolve: () => new N(!0),
1473
+ resolve: () => new P(!0),
1474
1474
  stringify: wt
1475
1475
  }, Et = {
1476
1476
  identify: (e) => e === !1,
1477
1477
  default: !0,
1478
1478
  tag: "tag:yaml.org,2002:bool",
1479
1479
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1480
- resolve: () => new N(!1),
1480
+ resolve: () => new P(!1),
1481
1481
  stringify: wt
1482
1482
  }, Dt = {
1483
1483
  identify: (e) => typeof e == "number",
@@ -1503,7 +1503,7 @@ var Tt = {
1503
1503
  tag: "tag:yaml.org,2002:float",
1504
1504
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1505
1505
  resolve(e) {
1506
- let t = new N(parseFloat(e.replace(/_/g, ""))), n = e.indexOf(".");
1506
+ let t = new P(parseFloat(e.replace(/_/g, ""))), n = e.indexOf(".");
1507
1507
  if (n !== -1) {
1508
1508
  let r = e.substring(n + 1).replace(/_/g, "");
1509
1509
  r[r.length - 1] === "0" && (t.minFractionDigits = r.length);
@@ -1569,22 +1569,22 @@ var Nt = {
1569
1569
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
1570
1570
  resolve: (e, t, n) => jt(e, 2, 16, n),
1571
1571
  stringify: (e) => Mt(e, 16, "0x")
1572
- }, Lt = class e extends z {
1572
+ }, Lt = class e extends B {
1573
1573
  constructor(t) {
1574
1574
  super(t), this.tag = e.tag;
1575
1575
  }
1576
1576
  add(e) {
1577
1577
  let t;
1578
- t = g(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new R(e.key, null) : new R(e, null), Ze(this.items, t.key) || this.items.push(t);
1578
+ t = g(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new z(e.key, null) : new z(e, null), Xe(this.items, t.key) || this.items.push(t);
1579
1579
  }
1580
1580
  get(e, t) {
1581
- let n = Ze(this.items, e);
1581
+ let n = Xe(this.items, e);
1582
1582
  return !t && g(n) ? _(n.key) ? n.key.value : n.key : n;
1583
1583
  }
1584
1584
  set(e, t) {
1585
1585
  if (typeof t != "boolean") throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1586
- let n = Ze(this.items, e);
1587
- n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new R(e));
1586
+ let n = Xe(this.items, e);
1587
+ n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new z(e));
1588
1588
  }
1589
1589
  toJSON(e, t) {
1590
1590
  return super.toJSON(e, t, Set);
@@ -1596,7 +1596,7 @@ var Nt = {
1596
1596
  }
1597
1597
  static from(e, t, n) {
1598
1598
  let { replacer: r } = n, i = new this(e);
1599
- if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(Ke(e, null, n));
1599
+ if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(Ge(e, null, n));
1600
1600
  return i;
1601
1601
  }
1602
1602
  };
@@ -1664,7 +1664,7 @@ var Vt = {
1664
1664
  },
1665
1665
  stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
1666
1666
  }, Wt = [
1667
- Qe,
1667
+ Ze,
1668
1668
  et,
1669
1669
  tt,
1670
1670
  nt,
@@ -1678,7 +1678,7 @@ var Vt = {
1678
1678
  Ot,
1679
1679
  kt,
1680
1680
  vt,
1681
- L,
1681
+ R,
1682
1682
  Ct,
1683
1683
  xt,
1684
1684
  Rt,
@@ -1688,7 +1688,7 @@ var Vt = {
1688
1688
  ], Gt = /* @__PURE__ */ new Map([
1689
1689
  ["core", pt],
1690
1690
  ["failsafe", [
1691
- Qe,
1691
+ Ze,
1692
1692
  et,
1693
1693
  tt
1694
1694
  ]],
@@ -1706,8 +1706,8 @@ var Vt = {
1706
1706
  intHex: ft,
1707
1707
  intOct: ut,
1708
1708
  intTime: Vt,
1709
- map: Qe,
1710
- merge: L,
1709
+ map: Ze,
1710
+ merge: R,
1711
1711
  null: nt,
1712
1712
  omap: Ct,
1713
1713
  pairs: xt,
@@ -1716,7 +1716,7 @@ var Vt = {
1716
1716
  timestamp: Ut
1717
1717
  }, qt = {
1718
1718
  "tag:yaml.org,2002:binary": vt,
1719
- "tag:yaml.org,2002:merge": L,
1719
+ "tag:yaml.org,2002:merge": R,
1720
1720
  "tag:yaml.org,2002:omap": Ct,
1721
1721
  "tag:yaml.org,2002:pairs": xt,
1722
1722
  "tag:yaml.org,2002:set": Rt,
@@ -1724,7 +1724,7 @@ var Vt = {
1724
1724
  };
1725
1725
  function Jt(e, t, n) {
1726
1726
  let r = Gt.get(t);
1727
- if (r && !e) return n && !r.includes(L) ? r.concat(L) : r.slice();
1727
+ if (r && !e) return n && !r.includes(R) ? r.concat(R) : r.slice();
1728
1728
  let i = r;
1729
1729
  if (!i) {
1730
1730
  if (Array.isArray(e)) i = [];
@@ -1735,7 +1735,7 @@ function Jt(e, t, n) {
1735
1735
  }
1736
1736
  if (Array.isArray(e)) for (let t of e) i = i.concat(t);
1737
1737
  else typeof e == "function" && (i = e(i.slice()));
1738
- return n && (i = i.concat(L)), i.reduce((e, t) => {
1738
+ return n && (i = i.concat(R)), i.reduce((e, t) => {
1739
1739
  let n = typeof t == "string" ? Kt[t] : t;
1740
1740
  if (!n) {
1741
1741
  let e = JSON.stringify(t), n = Object.keys(Kt).map((e) => JSON.stringify(e)).join(", ");
@@ -1748,7 +1748,7 @@ function Jt(e, t, n) {
1748
1748
  //#region node_modules/yaml/browser/dist/schema/Schema.js
1749
1749
  var Yt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Xt = class e {
1750
1750
  constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
1751
- 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, c, { value: Qe }), Object.defineProperty(this, u, { value: tt }), Object.defineProperty(this, d, { value: et }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Yt : null;
1751
+ 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, c, { value: Ze }), Object.defineProperty(this, u, { value: tt }), Object.defineProperty(this, d, { value: et }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Yt : null;
1752
1752
  }
1753
1753
  clone() {
1754
1754
  let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
@@ -1764,32 +1764,32 @@ function Zt(e, t) {
1764
1764
  t ? (n.push(t), r = !0) : e.directives.docStart && (r = !0);
1765
1765
  }
1766
1766
  r && n.push("---");
1767
- let i = Ne(e, t), { commentString: a } = i.options;
1767
+ let i = Me(e, t), { commentString: a } = i.options;
1768
1768
  if (e.commentBefore) {
1769
1769
  n.length !== 1 && n.unshift("");
1770
1770
  let t = a(e.commentBefore);
1771
- n.unshift(F(t, ""));
1771
+ n.unshift(I(t, ""));
1772
1772
  }
1773
1773
  let o = !1, s = null;
1774
1774
  if (e.contents) {
1775
1775
  if (b(e.contents)) {
1776
1776
  if (e.contents.spaceBefore && r && n.push(""), e.contents.commentBefore) {
1777
1777
  let t = a(e.contents.commentBefore);
1778
- n.push(F(t, ""));
1778
+ n.push(I(t, ""));
1779
1779
  }
1780
1780
  i.forceBlockIndent = !!e.comment, s = e.contents.comment;
1781
1781
  }
1782
- let t = s ? void 0 : () => o = !0, c = Ie(e.contents, i, () => s = null, t);
1783
- s && (c += I(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1784
- } else n.push(Ie(e.contents, i));
1782
+ let t = s ? void 0 : () => o = !0, c = Fe(e.contents, i, () => s = null, t);
1783
+ s && (c += L(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
1784
+ } else n.push(Fe(e.contents, i));
1785
1785
  if (e.directives?.docEnd) {
1786
1786
  if (e.comment) {
1787
1787
  let t = a(e.comment);
1788
- t.includes("\n") ? (n.push("..."), n.push(F(t, ""))) : n.push(`... ${t}`);
1788
+ t.includes("\n") ? (n.push("..."), n.push(I(t, ""))) : n.push(`... ${t}`);
1789
1789
  } else n.push("...");
1790
1790
  } else {
1791
1791
  let t = e.comment;
1792
- t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(F(a(t), "")));
1792
+ t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(I(a(t), "")));
1793
1793
  }
1794
1794
  return n.join("\n") + "\n";
1795
1795
  }
@@ -1812,7 +1812,7 @@ var Qt = class e {
1812
1812
  }, n);
1813
1813
  this.options = i;
1814
1814
  let { version: a } = i;
1815
- n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new ie({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
1815
+ n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new A({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
1816
1816
  }
1817
1817
  clone() {
1818
1818
  let t = Object.create(e.prototype, { [f]: { value: s } });
@@ -1826,10 +1826,10 @@ var Qt = class e {
1826
1826
  }
1827
1827
  createAlias(e, t) {
1828
1828
  if (!e.anchor) {
1829
- let n = oe(this);
1830
- e.anchor = !t || n.has(t) ? se(t || "a", n) : t;
1829
+ let n = ae(this);
1830
+ e.anchor = !t || n.has(t) ? oe(t || "a", n) : t;
1831
1831
  }
1832
- return new le(e.anchor);
1832
+ return new ce(e.anchor);
1833
1833
  }
1834
1834
  createNode(e, t, n) {
1835
1835
  let r;
@@ -1838,7 +1838,7 @@ var Qt = class e {
1838
1838
  let e = t.filter((e) => typeof e == "number" || e instanceof String || e instanceof Number).map(String);
1839
1839
  e.length > 0 && (t = t.concat(e)), r = t;
1840
1840
  } else n === void 0 && t && (n = t, t = void 0);
1841
- let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = A(this, a || "a"), p = {
1841
+ let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = j(this, a || "a"), p = {
1842
1842
  aliasDuplicateObjects: i ?? !0,
1843
1843
  keepUndefined: s ?? !1,
1844
1844
  onAnchor: u,
@@ -1846,49 +1846,49 @@ var Qt = class e {
1846
1846
  replacer: r,
1847
1847
  schema: this.schema,
1848
1848
  sourceObjects: f
1849
- }, m = me(e, l, p);
1849
+ }, m = pe(e, l, p);
1850
1850
  return o && y(m) && (m.flow = !0), d(), m;
1851
1851
  }
1852
1852
  createPair(e, t, n = {}) {
1853
- return new R(this.createNode(e, null, n), this.createNode(t, null, n));
1853
+ return new z(this.createNode(e, null, n), this.createNode(t, null, n));
1854
1854
  }
1855
1855
  delete(e) {
1856
1856
  return $t(this.contents) ? this.contents.delete(e) : !1;
1857
1857
  }
1858
1858
  deleteIn(e) {
1859
- return ge(e) ? this.contents != null && (this.contents = null, !0) : $t(this.contents) ? this.contents.deleteIn(e) : !1;
1859
+ return he(e) ? this.contents != null && (this.contents = null, !0) : $t(this.contents) ? this.contents.deleteIn(e) : !1;
1860
1860
  }
1861
1861
  get(e, t) {
1862
1862
  return y(this.contents) ? this.contents.get(e, t) : void 0;
1863
1863
  }
1864
1864
  getIn(e, t) {
1865
- return ge(e) ? !t && _(this.contents) ? this.contents.value : this.contents : y(this.contents) ? this.contents.getIn(e, t) : void 0;
1865
+ return he(e) ? !t && _(this.contents) ? this.contents.value : this.contents : y(this.contents) ? this.contents.getIn(e, t) : void 0;
1866
1866
  }
1867
1867
  has(e) {
1868
1868
  return y(this.contents) ? this.contents.has(e) : !1;
1869
1869
  }
1870
1870
  hasIn(e) {
1871
- return ge(e) ? this.contents !== void 0 : y(this.contents) ? this.contents.hasIn(e) : !1;
1871
+ return he(e) ? this.contents !== void 0 : y(this.contents) ? this.contents.hasIn(e) : !1;
1872
1872
  }
1873
1873
  set(e, t) {
1874
- this.contents == null ? this.contents = he(this.schema, [e], t) : $t(this.contents) && this.contents.set(e, t);
1874
+ this.contents == null ? this.contents = me(this.schema, [e], t) : $t(this.contents) && this.contents.set(e, t);
1875
1875
  }
1876
1876
  setIn(e, t) {
1877
- ge(e) ? this.contents = t : this.contents == null ? this.contents = he(this.schema, Array.from(e), t) : $t(this.contents) && this.contents.setIn(e, t);
1877
+ he(e) ? this.contents = t : this.contents == null ? this.contents = me(this.schema, Array.from(e), t) : $t(this.contents) && this.contents.setIn(e, t);
1878
1878
  }
1879
1879
  setSchema(e, t = {}) {
1880
1880
  typeof e == "number" && (e = String(e));
1881
1881
  let n;
1882
1882
  switch (e) {
1883
1883
  case "1.1":
1884
- this.directives ? this.directives.yaml.version = "1.1" : this.directives = new ie({ version: "1.1" }), n = {
1884
+ this.directives ? this.directives.yaml.version = "1.1" : this.directives = new A({ version: "1.1" }), n = {
1885
1885
  resolveKnownTags: !1,
1886
1886
  schema: "yaml-1.1"
1887
1887
  };
1888
1888
  break;
1889
1889
  case "1.2":
1890
1890
  case "next":
1891
- this.directives ? this.directives.yaml.version = e : this.directives = new ie({ version: e }), n = {
1891
+ this.directives ? this.directives.yaml.version = e : this.directives = new A({ version: e }), n = {
1892
1892
  resolveKnownTags: !0,
1893
1893
  schema: "core"
1894
1894
  };
@@ -1913,9 +1913,9 @@ var Qt = class e {
1913
1913
  mapAsMap: n === !0,
1914
1914
  mapKeyWarned: !1,
1915
1915
  maxAliasCount: typeof r == "number" ? r : 100
1916
- }, s = M(this.contents, t ?? "", o);
1916
+ }, s = N(this.contents, t ?? "", o);
1917
1917
  if (typeof i == "function") for (let { count: e, res: t } of o.anchors.values()) i(t, e);
1918
- return typeof a == "function" ? j(a, { "": s }, "", s) : s;
1918
+ return typeof a == "function" ? M(a, { "": s }, "", s) : s;
1919
1919
  }
1920
1920
  toJSON(e, t) {
1921
1921
  return this.toJS({
@@ -2065,7 +2065,7 @@ function cn(e, t, n) {
2065
2065
  //#region node_modules/yaml/browser/dist/compose/resolve-block-map.js
2066
2066
  var ln = "All mapping items must start at the same column";
2067
2067
  function un({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2068
- let o = new ((a?.nodeClass) ?? z)(n.schema);
2068
+ let o = new ((a?.nodeClass) ?? B)(n.schema);
2069
2069
  n.atRoot &&= !1;
2070
2070
  let s = r.offset, c = null;
2071
2071
  for (let a of r.items) {
@@ -2099,11 +2099,11 @@ function un({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2099
2099
  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"));
2100
2100
  let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
2101
2101
  n.schema.compat && sn(r.indent, f, i), s = c.range[2];
2102
- let l = new R(g, c);
2102
+ let l = new z(g, c);
2103
2103
  n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
2104
2104
  } else {
2105
2105
  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);
2106
- let e = new R(g);
2106
+ let e = new z(g);
2107
2107
  n.options.keepSourceTokens && (e.srcToken = a), o.items.push(e);
2108
2108
  }
2109
2109
  }
@@ -2116,7 +2116,7 @@ function un({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2116
2116
  //#endregion
2117
2117
  //#region node_modules/yaml/browser/dist/compose/resolve-block-seq.js
2118
2118
  function dn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2119
- let o = new ((a?.nodeClass) ?? B)(n.schema);
2119
+ let o = new ((a?.nodeClass) ?? Qe)(n.schema);
2120
2120
  n.atRoot &&= !1, n.atKey &&= !1;
2121
2121
  let s = r.offset, c = null;
2122
2122
  for (let { start: a, value: l } of r.items) {
@@ -2179,7 +2179,7 @@ function fn(e, t, n, r) {
2179
2179
  //#region node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
2180
2180
  var pn = "Block collections are not allowed within flow collections", mn = (e) => e && (e.type === "block-map" || e.type === "block-seq");
2181
2181
  function hn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2182
- let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? z : B))(n.schema);
2182
+ let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? B : Qe))(n.schema);
2183
2183
  c.flow = !0;
2184
2184
  let l = n.atRoot;
2185
2185
  l && (n.atRoot = !1), n.atKey &&= !1;
@@ -2247,12 +2247,12 @@ function hn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
2247
2247
  } 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`));
2248
2248
  let v = m ? e(n, m, _, i) : _.found ? t(n, _.end, p, null, _, i) : null;
2249
2249
  v ? mn(m) && i(v.range, "BLOCK_IN_FLOW", pn) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
2250
- let y = new R(g, v);
2250
+ let y = new z(g, v);
2251
2251
  if (n.options.keepSourceTokens && (y.srcToken = l), o) {
2252
2252
  let e = c;
2253
2253
  cn(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
2254
2254
  } else {
2255
- let e = new z(n.schema);
2255
+ let e = new B(n.schema);
2256
2256
  e.flow = !0, e.items.push(y);
2257
2257
  let t = (v ?? g).range;
2258
2258
  e.range = [
@@ -2297,14 +2297,14 @@ function _n(e, t, n, r, i) {
2297
2297
  n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
2298
2298
  }
2299
2299
  let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
2300
- if (!a || !o || o === "!" || o === z.tagName && s === "map" || o === B.tagName && s === "seq") return gn(e, t, n, i, o);
2300
+ if (!a || !o || o === "!" || o === B.tagName && s === "map" || o === Qe.tagName && s === "seq") return gn(e, t, n, i, o);
2301
2301
  let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
2302
2302
  if (!c) {
2303
2303
  let r = t.schema.knownTags[o];
2304
2304
  if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
2305
2305
  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), gn(e, t, n, i, o);
2306
2306
  }
2307
- let l = gn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = b(u) ? u : new N(u);
2307
+ let l = gn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = b(u) ? u : new P(u);
2308
2308
  return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
2309
2309
  }
2310
2310
  //#endregion
@@ -2321,7 +2321,7 @@ function vn(e, t, n) {
2321
2321
  r
2322
2322
  ]
2323
2323
  };
2324
- let a = i.mode === ">" ? N.BLOCK_FOLDED : N.BLOCK_LITERAL, o = t.source ? bn(t.source) : [], s = o.length;
2324
+ let a = i.mode === ">" ? P.BLOCK_FOLDED : P.BLOCK_LITERAL, o = t.source ? bn(t.source) : [], s = o.length;
2325
2325
  for (let e = o.length - 1; e >= 0; --e) {
2326
2326
  let t = o[e][1];
2327
2327
  if (t === "" || t === "\r") s = e;
@@ -2362,7 +2362,7 @@ function vn(e, t, n) {
2362
2362
  let e = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2363
2363
  n(l - r.length - (s ? 2 : 1), "BAD_INDENT", e), t = "";
2364
2364
  }
2365
- a === N.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);
2365
+ a === P.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);
2366
2366
  }
2367
2367
  switch (i.chomp) {
2368
2368
  case "-": break;
@@ -2438,13 +2438,13 @@ function xn(e, t, n) {
2438
2438
  let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
2439
2439
  switch (i) {
2440
2440
  case "scalar":
2441
- s = N.PLAIN, c = Sn(a, l);
2441
+ s = P.PLAIN, c = Sn(a, l);
2442
2442
  break;
2443
2443
  case "single-quoted-scalar":
2444
- s = N.QUOTE_SINGLE, c = Cn(a, l);
2444
+ s = P.QUOTE_SINGLE, c = Cn(a, l);
2445
2445
  break;
2446
2446
  case "double-quoted-scalar":
2447
- s = N.QUOTE_DOUBLE, c = Tn(a, l);
2447
+ s = P.QUOTE_DOUBLE, c = Tn(a, l);
2448
2448
  break;
2449
2449
  /* istanbul ignore next should not happen */
2450
2450
  default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
@@ -2583,10 +2583,10 @@ function kn(e, t, n, r) {
2583
2583
  let d;
2584
2584
  try {
2585
2585
  let a = l.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
2586
- d = _(a) ? a : new N(a);
2586
+ d = _(a) ? a : new P(a);
2587
2587
  } catch (e) {
2588
2588
  let a = e instanceof Error ? e.message : String(e);
2589
- r(n ?? t, "TAG_RESOLVE_FAILED", a), d = new N(i);
2589
+ r(n ?? t, "TAG_RESOLVE_FAILED", a), d = new P(i);
2590
2590
  }
2591
2591
  return d.range = s, d.source = i, a && (d.type = a), c && (d.tag = c), l.format && (d.format = l.format), o && (d.comment = o), d;
2592
2592
  }
@@ -2673,7 +2673,7 @@ function Fn(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c
2673
2673
  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;
2674
2674
  }
2675
2675
  function In({ options: e }, { offset: t, source: n, end: r }, i) {
2676
- let a = new le(n.substring(1));
2676
+ let a = new ce(n.substring(1));
2677
2677
  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);
2678
2678
  let o = t + n.length, s = fn(r, o, e.strict, i);
2679
2679
  return a.range = [
@@ -2739,7 +2739,7 @@ var Bn = class {
2739
2739
  this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
2740
2740
  let i = Rn(e);
2741
2741
  r ? this.warnings.push(new nn(i, t, n)) : this.errors.push(new tn(i, t, n));
2742
- }, this.directives = new ie({ version: e.version || "1.2" }), this.options = e;
2742
+ }, this.directives = new A({ version: e.version || "1.2" }), this.options = e;
2743
2743
  }
2744
2744
  decorate(e, t) {
2745
2745
  let { comment: n, afterEmptyLine: r } = zn(this.prelude);
@@ -2847,7 +2847,7 @@ function Vn(e, t = !0, n) {
2847
2847
  return null;
2848
2848
  }
2849
2849
  function Hn(e, t) {
2850
- let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = Me({
2850
+ let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = je({
2851
2851
  type: o,
2852
2852
  value: e
2853
2853
  }, {
@@ -2926,7 +2926,7 @@ function Un(e, t, n = {}) {
2926
2926
  }
2927
2927
  default: o = "PLAIN";
2928
2928
  }
2929
- let c = Me({
2929
+ let c = je({
2930
2930
  type: o,
2931
2931
  value: t
2932
2932
  }, {
@@ -4232,7 +4232,7 @@ function Cr(e, t, n) {
4232
4232
  typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
4233
4233
  let i = Sr(e, n);
4234
4234
  if (!i) return null;
4235
- if (i.warnings.forEach((e) => Re(i.options.logLevel, e)), i.errors.length > 0) {
4235
+ if (i.warnings.forEach((e) => Le(i.options.logLevel, e)), i.errors.length > 0) {
4236
4236
  if (i.options.logLevel !== "silent") throw i.errors[0];
4237
4237
  i.errors = [];
4238
4238
  }
@@ -4253,20 +4253,20 @@ function wr(e, t, n) {
4253
4253
  //#endregion
4254
4254
  //#region node_modules/yaml/browser/index.js
4255
4255
  var Tr = /* @__PURE__ */ a({
4256
- Alias: () => le,
4256
+ Alias: () => ce,
4257
4257
  CST: () => tr,
4258
4258
  Composer: () => Bn,
4259
4259
  Document: () => Qt,
4260
4260
  Lexer: () => dr,
4261
4261
  LineCounter: () => fr,
4262
- Pair: () => R,
4262
+ Pair: () => z,
4263
4263
  Parser: () => yr,
4264
- Scalar: () => N,
4264
+ Scalar: () => P,
4265
4265
  Schema: () => Xt,
4266
4266
  YAMLError: () => en,
4267
- YAMLMap: () => z,
4267
+ YAMLMap: () => B,
4268
4268
  YAMLParseError: () => tn,
4269
- YAMLSeq: () => B,
4269
+ YAMLSeq: () => Qe,
4270
4270
  YAMLWarning: () => nn,
4271
4271
  isAlias: () => p,
4272
4272
  isCollection: () => y,
@@ -6717,14 +6717,58 @@ Z.get("/", async (e) => {
6717
6717
  dataJson: m
6718
6718
  },
6719
6719
  blocks: g
6720
- };
6721
- return await t.prepare("INSERT INTO node_revisions (nodeId, version, snapshotJson, createdById) VALUES (?, ?, ?, ?)").run(i, _, v.publishedAt, a), await J(e).clear(), new X(e.env).purgeNode(e, t, i, p), e.json({
6720
+ }, y = JSON.stringify(v);
6721
+ return await t.prepare("\n INSERT INTO node_revisions (nodeId, version, snapshotJson, createdById) \n VALUES (?, ?, ?, ?)\n ").run(i, _, y, a), await J(e).clear(), new X(e.env).purgeNode(e, t, i, p), e.json({
6722
6722
  success: !0,
6723
6723
  id: i,
6724
6724
  status: "published",
6725
6725
  version: _,
6726
6726
  publishedAt: v.publishedAt
6727
6727
  });
6728
+ }), Z.get("/revisions", async (e) => {
6729
+ let t = e.get("db"), n = Number(e.req.query("id"));
6730
+ if (!n || isNaN(n)) return e.json({ error: "Invalid Node ID" }, 400);
6731
+ let r = await t.prepare("\n SELECT r.id, r.version, r.createdAt, r.createdById, u.name as createdByName, u.email as createdByEmail\n FROM node_revisions r\n LEFT JOIN users u ON r.createdById = u.id\n WHERE r.nodeId = ?\n ORDER BY r.createdAt DESC\n LIMIT 50\n ").all(n), i = (Array.isArray(r) ? r : r?.results || []).map((e) => {
6732
+ let t = e.createdAt || "", n = t.includes("T") ? t : t.replace(" ", "T") + "Z";
6733
+ return {
6734
+ ...e,
6735
+ createdAt: n
6736
+ };
6737
+ });
6738
+ return e.json({ revisions: i });
6739
+ }), Z.get("/revisions/payload", async (e) => {
6740
+ let t = e.get("db"), n = Number(e.req.query("id")), r = Number(e.req.query("revisionId"));
6741
+ if (!n || isNaN(n) || !r || isNaN(r)) return e.json({ error: "Invalid IDs" }, 400);
6742
+ let i = await t.prepare("SELECT snapshotJson FROM node_revisions WHERE id = ? AND nodeId = ?").get(r, n);
6743
+ if (!i) return e.json({ error: "Revision not found" }, 404);
6744
+ let a = {};
6745
+ try {
6746
+ a = typeof i.snapshotJson == "string" ? JSON.parse(i.snapshotJson) : i.snapshotJson;
6747
+ } catch {
6748
+ return e.json({ error: "Failed to parse snapshot" }, 500);
6749
+ }
6750
+ let o = typeof a.node?.dataJson == "string" ? JSON.parse(a.node.dataJson) : a.node?.dataJson || {};
6751
+ o = await Li(t, Yi(o));
6752
+ let s = {
6753
+ ...a.node,
6754
+ ...o
6755
+ }, c = a.blocks || [], l = await Promise.all(c.map(async (e) => {
6756
+ let n = typeof e.dataJson == "string" ? JSON.parse(e.dataJson || "{}") : e.dataJson || {};
6757
+ n = await Li(t, n);
6758
+ let r = n.blockId || n._instanceId || e.instanceId || String(e.id), i = { ...n };
6759
+ return delete i._instanceId, {
6760
+ instanceId: String(r),
6761
+ blockId: String(r),
6762
+ componentId: e.elementType || e.componentId || "text-block",
6763
+ region: e.region !== void 0 && e.region !== null && String(e.region).trim() !== "" ? e.region : "content",
6764
+ data: i
6765
+ };
6766
+ }));
6767
+ return e.json({
6768
+ node: s,
6769
+ blocks: l,
6770
+ version: a.version
6771
+ });
6728
6772
  }), Z.delete("/", async (e) => {
6729
6773
  let t = e.get("db"), n = e.req.query("id");
6730
6774
  if (!n) return e.json({ error: "Node ID required" }, 400);
@@ -11806,23 +11850,23 @@ ha.get("/*", async (e) => {
11806
11850
  ne.tabs && Object.values(ne.tabs).forEach((e) => {
11807
11851
  Object.assign(re, e.fields || {});
11808
11852
  });
11809
- let ie = {}, ae = null, oe = null, se = !1, A = {}, j = s && _.draftDataJson ? _.draftDataJson : _.dataJson || _.draftDataJson;
11810
- if (j) try {
11811
- A = typeof j == "string" ? JSON.parse(j) : j;
11853
+ let A = {}, ie = null, ae = null, oe = !1, j = {}, M = s && _.draftDataJson ? _.draftDataJson : _.dataJson || _.draftDataJson;
11854
+ if (M) try {
11855
+ j = typeof M == "string" ? JSON.parse(M) : M;
11812
11856
  } catch {}
11813
- A.disabledRegions && (ie = A.disabledRegions), se = A.hidden === !0 || A.hidden === 1 || A.hidden === "1" || A.hidden === "true", ae = A.startShowingAt || null, oe = A.stopShowingAt || null;
11814
- let M = A.layoutId, ce = M && M !== "inherit", { resolvedLayoutId: le, inheritedFields: ue } = await Aa(t, O, D, s, re), de = ce ? M : le || ne.defaultLayout || null;
11815
- for (let [e, t] of Object.entries(ue)) (A[e] === void 0 || A[e] === null || A[e] === "" || A[e] === "inherit") && t !== void 0 && (A[e] = t);
11816
- let N = await Li(t, xa(A, re));
11817
- N = Sa(N), N = await Ca(t, N, n);
11818
- let fe = Oa(N);
11819
- delete N.socialImage, delete N.fbImage, delete N.xImage, delete N.whatsappImage, fe && (N.socialImages = fe), k.slug = _.slug, k.title = _.title, Object.assign(k, N), k.layoutId = de;
11820
- let pe = Number(_.isHidden) === 1 || se, me = !va(ae, oe);
11821
- if (!s && (pe || me)) return e.json({ error: "Node is hidden or outside its scheduled publishing window" }, 404);
11822
- let he = [];
11857
+ j.disabledRegions && (A = j.disabledRegions), oe = j.hidden === !0 || j.hidden === 1 || j.hidden === "1" || j.hidden === "true", ie = j.startShowingAt || null, ae = j.stopShowingAt || null;
11858
+ let N = j.layoutId, se = N && N !== "inherit", { resolvedLayoutId: ce, inheritedFields: le } = await Aa(t, O, D, s, re), ue = se ? N : ce || ne.defaultLayout || null;
11859
+ for (let [e, t] of Object.entries(le)) (j[e] === void 0 || j[e] === null || j[e] === "" || j[e] === "inherit") && t !== void 0 && (j[e] = t);
11860
+ let P = await Li(t, xa(j, re));
11861
+ P = Sa(P), P = await Ca(t, P, n);
11862
+ let de = Oa(P);
11863
+ delete P.socialImage, delete P.fbImage, delete P.xImage, delete P.whatsappImage, de && (P.socialImages = de), k.slug = _.slug, k.title = _.title, Object.assign(k, P), k.layoutId = ue;
11864
+ let fe = Number(_.isHidden) === 1 || oe, pe = !va(ie, ae);
11865
+ if (!s && (fe || pe)) return e.json({ error: "Node is hidden or outside its scheduled publishing window" }, 404);
11866
+ let me = [];
11823
11867
  if (v?.treeNodeId) {
11824
11868
  let e = await t.prepare("\n SELECT\n t.id as treeNodeId,\n t.contentId as id,\n c.title,\n c.slug,\n c.language,\n c.contentType as nodeType,\n c.isHidden,\n c.dataJson,\n c.draftDataJson\n FROM tree_nodes t\n INNER JOIN content_nodes c\n ON t.contentId = c.id\n WHERE t.parentId = ?\n AND t.treeId = ?\n ORDER BY t.sortOrder ASC\n ").all(v.treeNodeId, D), n = Array.isArray(e) ? e : e?.results || [], r = k.path === "/" ? "" : k.path;
11825
- he = n.map((e) => {
11869
+ me = n.map((e) => {
11826
11870
  let t = {}, n = s && e.draftDataJson ? e.draftDataJson : e.dataJson;
11827
11871
  try {
11828
11872
  t = (typeof n == "string" ? JSON.parse(n) : n) || {};
@@ -11839,10 +11883,10 @@ ha.get("/*", async (e) => {
11839
11883
  };
11840
11884
  }).filter(Boolean);
11841
11885
  }
11842
- k.children = he;
11843
- let ge = +!!s, P = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n AND isDraft = ?\n ORDER BY sortOrder ASC\n ").all(_.id, ge), _e = Array.isArray(P) ? P : P?.results || [];
11844
- _e.length === 0 && !s && (P = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n ORDER BY sortOrder ASC\n ").all(_.id), _e = Array.isArray(P) ? P : P?.results || []);
11845
- let F = {}, I = {}, ve = await Promise.all(_e.map(async (e) => {
11886
+ k.children = me;
11887
+ let he = +!!s, F = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n AND isDraft = ?\n ORDER BY sortOrder ASC\n ").all(_.id, he), ge = Array.isArray(F) ? F : F?.results || [];
11888
+ ge.length === 0 && !s && (F = await t.prepare("\n SELECT *\n FROM content_blocks\n WHERE contentId = ?\n ORDER BY sortOrder ASC\n ").all(_.id), ge = Array.isArray(F) ? F : F?.results || []);
11889
+ let I = {}, L = {}, _e = await Promise.all(ge.map(async (e) => {
11846
11890
  let r = e.region || "main", i = {};
11847
11891
  try {
11848
11892
  i = (typeof e.dataJson == "string" ? JSON.parse(e.dataJson) : e.dataJson) || {};
@@ -11860,8 +11904,8 @@ ha.get("/*", async (e) => {
11860
11904
  }
11861
11905
  };
11862
11906
  }));
11863
- for (let e of ve) e && (F[e.region] || (F[e.region] = [], I[e.region] = { isInherited: !1 }), F[e.region].push(e.block));
11864
- let ye = {
11907
+ for (let e of _e) e && (I[e.region] || (I[e.region] = [], L[e.region] = { isInherited: !1 }), I[e.region].push(e.block));
11908
+ let ve = {
11865
11909
  header: {
11866
11910
  label: "Header",
11867
11911
  inherit: "parent"
@@ -11870,33 +11914,33 @@ ha.get("/*", async (e) => {
11870
11914
  label: "Footer",
11871
11915
  inherit: "parent"
11872
11916
  },
11873
- ...(de ? h.nodeLayouts?.[de] || h.layouts?.[de] : null)?.regions || { main: { label: "Content" } }
11917
+ ...(ue ? h.nodeLayouts?.[ue] || h.layouts?.[ue] : null)?.regions || { main: { label: "Content" } }
11874
11918
  };
11875
- for (let [e, r] of Object.entries(ye)) {
11876
- let i = F[e] && F[e].length > 0, a = !!ie[e];
11877
- if (F[e] || (F[e] = [], I[e] = { isInherited: !1 }), (r?.inherit === "parent" || r?.inherit === !0 || r?.inherit === "true" || e === "header" || e === "footer") && !i && !a && O) {
11919
+ for (let [e, r] of Object.entries(ve)) {
11920
+ let i = I[e] && I[e].length > 0, a = !!A[e];
11921
+ if (I[e] || (I[e] = [], L[e] = { isInherited: !1 }), (r?.inherit === "parent" || r?.inherit === !0 || r?.inherit === "true" || e === "header" || e === "footer") && !i && !a && O) {
11878
11922
  let r = await ba(t, O, e, h, s, n);
11879
- if (r.blocks.length > 0 && (F[e] = r.blocks, I[e] = {
11923
+ if (r.blocks.length > 0 && (I[e] = r.blocks, L[e] = {
11880
11924
  isInherited: !0,
11881
11925
  inheritedFromId: r.inheritedFromId,
11882
11926
  inheritedFromTitle: r.inheritedFromTitle
11883
- }, r.subRegions)) for (let [t, n] of Object.entries(r.subRegions)) t !== e && (F[t] = n, I[t] = {
11927
+ }, r.subRegions)) for (let [t, n] of Object.entries(r.subRegions)) t !== e && (I[t] = n, L[t] = {
11884
11928
  isInherited: !0,
11885
11929
  inheritedFromId: r.inheritedFromId,
11886
11930
  inheritedFromTitle: r.inheritedFromTitle
11887
11931
  });
11888
11932
  }
11889
11933
  }
11890
- await Promise.all(Object.keys(F).map((e) => ya(t, F[e], u)));
11891
- let be = {
11934
+ await Promise.all(Object.keys(I).map((e) => ya(t, I[e], u)));
11935
+ let ye = {
11892
11936
  channelId: u || d,
11893
11937
  treeId: D,
11894
11938
  language: k.language,
11895
11939
  node: k,
11896
- content: F,
11897
- regionMeta: I
11940
+ content: I,
11941
+ regionMeta: L
11898
11942
  };
11899
- return !s && !m && (e.header("X-Cache", "MISS"), await Ma(f, p, be, ja(e))), e.json(be);
11943
+ return !s && !m && (e.header("X-Cache", "MISS"), await Ma(f, p, ye, ja(e))), e.json(ye);
11900
11944
  } catch (t) {
11901
11945
  console.error("[CMS Public API] Error fetching node by path:", t);
11902
11946
  let n = e.env?.ENVIRONMENT === "development";