zudoku 0.46.3 → 0.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/app/main.js +2 -2
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/config.d.ts +11 -0
  4. package/dist/config/validators/InputSidebarSchema.d.ts +1 -1
  5. package/dist/config/validators/validate.d.ts +167 -47
  6. package/dist/config/validators/validate.js +22 -1
  7. package/dist/config/validators/validate.js.map +1 -1
  8. package/dist/config/validators/validate.test.d.ts +1 -0
  9. package/dist/config/validators/validate.test.js +80 -0
  10. package/dist/config/validators/validate.test.js.map +1 -0
  11. package/dist/lib/auth/issuer.d.ts +2 -0
  12. package/dist/lib/auth/issuer.js +37 -0
  13. package/dist/lib/auth/issuer.js.map +1 -0
  14. package/dist/lib/auth/issuer.test.d.ts +1 -0
  15. package/dist/lib/auth/issuer.test.js +94 -0
  16. package/dist/lib/auth/issuer.test.js.map +1 -0
  17. package/dist/lib/authentication/hook.d.ts +6 -0
  18. package/dist/lib/authentication/providers/auth0.js +1 -1
  19. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  20. package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
  21. package/dist/lib/authentication/providers/azureb2c.js +145 -0
  22. package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
  23. package/dist/lib/authentication/providers/clerk.js +3 -12
  24. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  25. package/dist/lib/authentication/providers/openid.d.ts +1 -0
  26. package/dist/lib/authentication/providers/openid.js +38 -0
  27. package/dist/lib/authentication/providers/openid.js.map +1 -1
  28. package/dist/lib/authentication/providers/supabase.js +2 -9
  29. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  30. package/dist/lib/authentication/state.d.ts +6 -5
  31. package/dist/lib/authentication/state.js +19 -6
  32. package/dist/lib/authentication/state.js.map +1 -1
  33. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  34. package/dist/lib/components/index.d.ts +6 -0
  35. package/dist/lib/hooks/index.d.ts +6 -0
  36. package/dist/lib/plugins/api-keys/index.js +1 -3
  37. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  38. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +1 -1
  39. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -2
  40. package/dist/lib/plugins/openapi/playground/fileUtils.js +1 -1
  41. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  42. package/dist/lib/util/MdxComponents.js +1 -1
  43. package/dist/lib/util/MdxComponents.js.map +1 -1
  44. package/dist/vite/build.js +1 -28
  45. package/dist/vite/build.js.map +1 -1
  46. package/lib/Drawer-BzkOKwgC.js.map +1 -1
  47. package/lib/{Markdown-D81l28Ib.js → Markdown-r4buN85T.js} +37 -37
  48. package/lib/{Markdown-D81l28Ib.js.map → Markdown-r4buN85T.js.map} +1 -1
  49. package/lib/{MdxPage-S_CxlNmX.js → MdxPage-DYKsTerz.js} +4 -4
  50. package/lib/{MdxPage-S_CxlNmX.js.map → MdxPage-DYKsTerz.js.map} +1 -1
  51. package/lib/{OasProvider-D5rt6WMb.js → OasProvider-8vNiLpIG.js} +2 -2
  52. package/lib/{OasProvider-D5rt6WMb.js.map → OasProvider-8vNiLpIG.js.map} +1 -1
  53. package/lib/{OperationList-CNhg654C.js → OperationList-BCVHtZNK.js} +6 -6
  54. package/lib/OperationList-BCVHtZNK.js.map +1 -0
  55. package/lib/{RouteGuard-CZ_uLv3g.js → RouteGuard-B7GVW4oL.js} +2 -2
  56. package/lib/{RouteGuard-CZ_uLv3g.js.map → RouteGuard-B7GVW4oL.js.map} +1 -1
  57. package/lib/{SchemaList-BvzCrTYg.js → SchemaList-1oJKvBxh.js} +6 -6
  58. package/lib/{SchemaList-BvzCrTYg.js.map → SchemaList-1oJKvBxh.js.map} +1 -1
  59. package/lib/{SchemaView-Br1RupCp.js → SchemaView-CTqaB-79.js} +3 -3
  60. package/lib/{SchemaView-Br1RupCp.js.map → SchemaView-CTqaB-79.js.map} +1 -1
  61. package/lib/{SignUp-B-1Pvc-8.js → SignUp-CRIKdWt9.js} +2 -2
  62. package/lib/{SignUp-B-1Pvc-8.js.map → SignUp-CRIKdWt9.js.map} +1 -1
  63. package/lib/{Slot-T8NJUkm4.js → Slot-B5qSAnwR.js} +4 -4
  64. package/lib/{Slot-T8NJUkm4.js.map → Slot-B5qSAnwR.js.map} +1 -1
  65. package/lib/{SyntaxHighlight-Cz6Me7-F.js → SyntaxHighlight-CqKHkyEy.js} +1291 -1265
  66. package/lib/SyntaxHighlight-CqKHkyEy.js.map +1 -0
  67. package/lib/{Toc-PA-j0gEu.js → Toc-lxYQEOzX.js} +2 -2
  68. package/lib/{Toc-PA-j0gEu.js.map → Toc-lxYQEOzX.js.map} +1 -1
  69. package/lib/{circular-5FeDWJOn.js → circular-ZGGPtwMq.js} +2 -2
  70. package/lib/{circular-5FeDWJOn.js.map → circular-ZGGPtwMq.js.map} +1 -1
  71. package/lib/clerk-yAKDC3Qz.js +24812 -0
  72. package/lib/clerk-yAKDC3Qz.js.map +1 -0
  73. package/lib/{createServer-BC2RZgmW.js → createServer-DUBpXfvA.js} +2627 -2617
  74. package/lib/createServer-DUBpXfvA.js.map +1 -0
  75. package/lib/errors-D27ZTQgx.js +78 -0
  76. package/lib/errors-D27ZTQgx.js.map +1 -0
  77. package/lib/{hook-k7PfUIsj.js → hook-7wZANGJP.js} +53 -35
  78. package/lib/{hook-k7PfUIsj.js.map → hook-7wZANGJP.js.map} +1 -1
  79. package/lib/index-CrcNWbel.js.map +1 -1
  80. package/lib/{index-CJZthJSj.js → index-Cucjfk3D.js} +10 -10
  81. package/lib/index-Cucjfk3D.js.map +1 -0
  82. package/lib/{index-zddirpDj.js → index-DmNq2fbN.js} +226 -221
  83. package/lib/index-DmNq2fbN.js.map +1 -0
  84. package/lib/{mutation-BSeQ8pEK.js → mutation-C1XCQTQL.js} +2 -2
  85. package/lib/{mutation-BSeQ8pEK.js.map → mutation-C1XCQTQL.js.map} +1 -1
  86. package/lib/ui/SyntaxHighlight.js +2 -2
  87. package/lib/{useMutation-CZSmsIGW.js → useMutation-BKvPttRn.js} +3 -3
  88. package/lib/{useMutation-CZSmsIGW.js.map → useMutation-BKvPttRn.js.map} +1 -1
  89. package/lib/zudoku.auth-auth0.js +2 -2
  90. package/lib/zudoku.auth-auth0.js.map +1 -1
  91. package/lib/zudoku.auth-azureb2c.js +9974 -0
  92. package/lib/zudoku.auth-azureb2c.js.map +1 -0
  93. package/lib/zudoku.auth-clerk.js +39 -48
  94. package/lib/zudoku.auth-clerk.js.map +1 -1
  95. package/lib/zudoku.auth-openid.js +291 -316
  96. package/lib/zudoku.auth-openid.js.map +1 -1
  97. package/lib/zudoku.components.js +1222 -1594
  98. package/lib/zudoku.components.js.map +1 -1
  99. package/lib/zudoku.hooks.js +2 -2
  100. package/lib/zudoku.plugin-api-catalog.js +2 -2
  101. package/lib/zudoku.plugin-api-keys.js +19 -21
  102. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  103. package/lib/zudoku.plugin-custom-pages.js +1 -1
  104. package/lib/zudoku.plugin-markdown.js +1 -1
  105. package/lib/zudoku.plugin-openapi.js +2 -2
  106. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  107. package/package.json +40 -22
  108. package/src/app/main.tsx +2 -2
  109. package/src/lib/auth/issuer.test.ts +120 -0
  110. package/src/lib/auth/issuer.ts +41 -0
  111. package/src/lib/authentication/providers/auth0.tsx +1 -1
  112. package/src/lib/authentication/providers/azureb2c.tsx +196 -0
  113. package/src/lib/authentication/providers/clerk.tsx +3 -12
  114. package/src/lib/authentication/providers/openid.tsx +53 -0
  115. package/src/lib/authentication/providers/supabase.tsx +2 -9
  116. package/src/lib/authentication/state.ts +37 -7
  117. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  118. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  119. package/src/lib/plugins/api-keys/index.tsx +1 -3
  120. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
  121. package/src/lib/plugins/openapi/playground/Headers.tsx +2 -2
  122. package/src/lib/plugins/openapi/playground/fileUtils.ts +1 -1
  123. package/src/lib/util/MdxComponents.tsx +1 -1
  124. package/lib/OperationList-CNhg654C.js.map +0 -1
  125. package/lib/SyntaxHighlight-Cz6Me7-F.js.map +0 -1
  126. package/lib/createServer-BC2RZgmW.js.map +0 -1
  127. package/lib/index-CJZthJSj.js.map +0 -1
  128. package/lib/index-zddirpDj.js.map +0 -1
@@ -1,4 +1,4 @@
1
- const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), G = Symbol.for("yaml.map"), qt = Symbol.for("yaml.pair"), R = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), P = Symbol.for("yaml.node.type"), Z = (s) => !!s && typeof s == "object" && s[P] === dt, ee = (s) => !!s && typeof s == "object" && s[P] === lt, de = (s) => !!s && typeof s == "object" && s[P] === G, T = (s) => !!s && typeof s == "object" && s[P] === qt, E = (s) => !!s && typeof s == "object" && s[P] === R, pe = (s) => !!s && typeof s == "object" && s[P] === he;
1
+ const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), G = Symbol.for("yaml.map"), qt = Symbol.for("yaml.pair"), F = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), P = Symbol.for("yaml.node.type"), W = (s) => !!s && typeof s == "object" && s[P] === dt, Z = (s) => !!s && typeof s == "object" && s[P] === lt, de = (s) => !!s && typeof s == "object" && s[P] === G, T = (s) => !!s && typeof s == "object" && s[P] === qt, E = (s) => !!s && typeof s == "object" && s[P] === F, pe = (s) => !!s && typeof s == "object" && s[P] === he;
2
2
  function L(s) {
3
3
  if (s && typeof s == "object")
4
4
  switch (s[P]) {
@@ -13,24 +13,24 @@ function $(s) {
13
13
  switch (s[P]) {
14
14
  case dt:
15
15
  case G:
16
- case R:
16
+ case F:
17
17
  case he:
18
18
  return !0;
19
19
  }
20
20
  return !1;
21
21
  }
22
- const vs = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Ft = Symbol("skip children"), F = Symbol("remove node");
23
- function Q(s, e) {
24
- const t = Rt(e);
25
- ee(s) ? ie(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : ie(null, s, t, Object.freeze([]));
22
+ const Rt = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Ft = Symbol("skip children"), R = Symbol("remove node");
23
+ function ee(s, e) {
24
+ const t = Ut(e);
25
+ Z(s) ? ie(null, s.contents, t, Object.freeze([s])) === R && (s.contents = null) : ie(null, s, t, Object.freeze([]));
26
26
  }
27
- Q.BREAK = M;
28
- Q.SKIP = Ft;
29
- Q.REMOVE = F;
27
+ ee.BREAK = M;
28
+ ee.SKIP = Ft;
29
+ ee.REMOVE = R;
30
30
  function ie(s, e, t, n) {
31
- const i = Ut(s, e, t, n);
31
+ const i = Vt(s, e, t, n);
32
32
  if ($(i) || T(i))
33
- return Vt(s, n, i), ie(s, i, t, n);
33
+ return Jt(s, n, i), ie(s, i, t, n);
34
34
  if (typeof i != "symbol") {
35
35
  if (L(e)) {
36
36
  n = Object.freeze(n.concat(e));
@@ -41,7 +41,7 @@ function ie(s, e, t, n) {
41
41
  else {
42
42
  if (o === M)
43
43
  return M;
44
- o === F && (e.items.splice(r, 1), r -= 1);
44
+ o === R && (e.items.splice(r, 1), r -= 1);
45
45
  }
46
46
  }
47
47
  } else if (T(e)) {
@@ -49,26 +49,26 @@ function ie(s, e, t, n) {
49
49
  const r = ie("key", e.key, t, n);
50
50
  if (r === M)
51
51
  return M;
52
- r === F && (e.key = null);
52
+ r === R && (e.key = null);
53
53
  const o = ie("value", e.value, t, n);
54
54
  if (o === M)
55
55
  return M;
56
- o === F && (e.value = null);
56
+ o === R && (e.value = null);
57
57
  }
58
58
  }
59
59
  return i;
60
60
  }
61
- async function Fe(s, e) {
62
- const t = Rt(e);
63
- ee(s) ? await re(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : await re(null, s, t, Object.freeze([]));
61
+ async function Re(s, e) {
62
+ const t = Ut(e);
63
+ Z(s) ? await re(null, s.contents, t, Object.freeze([s])) === R && (s.contents = null) : await re(null, s, t, Object.freeze([]));
64
64
  }
65
- Fe.BREAK = M;
66
- Fe.SKIP = Ft;
67
- Fe.REMOVE = F;
65
+ Re.BREAK = M;
66
+ Re.SKIP = Ft;
67
+ Re.REMOVE = R;
68
68
  async function re(s, e, t, n) {
69
- const i = await Ut(s, e, t, n);
69
+ const i = await Vt(s, e, t, n);
70
70
  if ($(i) || T(i))
71
- return Vt(s, n, i), re(s, i, t, n);
71
+ return Jt(s, n, i), re(s, i, t, n);
72
72
  if (typeof i != "symbol") {
73
73
  if (L(e)) {
74
74
  n = Object.freeze(n.concat(e));
@@ -79,7 +79,7 @@ async function re(s, e, t, n) {
79
79
  else {
80
80
  if (o === M)
81
81
  return M;
82
- o === F && (e.items.splice(r, 1), r -= 1);
82
+ o === R && (e.items.splice(r, 1), r -= 1);
83
83
  }
84
84
  }
85
85
  } else if (T(e)) {
@@ -87,16 +87,16 @@ async function re(s, e, t, n) {
87
87
  const r = await re("key", e.key, t, n);
88
88
  if (r === M)
89
89
  return M;
90
- r === F && (e.key = null);
90
+ r === R && (e.key = null);
91
91
  const o = await re("value", e.value, t, n);
92
92
  if (o === M)
93
93
  return M;
94
- o === F && (e.value = null);
94
+ o === R && (e.value = null);
95
95
  }
96
96
  }
97
97
  return i;
98
98
  }
99
- function Rt(s) {
99
+ function Ut(s) {
100
100
  return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
101
101
  Alias: s.Node,
102
102
  Map: s.Node,
@@ -111,7 +111,7 @@ function Rt(s) {
111
111
  Seq: s.Collection
112
112
  }, s) : s;
113
113
  }
114
- function Ut(s, e, t, n) {
114
+ function Vt(s, e, t, n) {
115
115
  if (typeof t == "function")
116
116
  return t(s, e, n);
117
117
  if (de(e))
@@ -122,19 +122,19 @@ function Ut(s, e, t, n) {
122
122
  return t.Pair?.(s, e, n);
123
123
  if (E(e))
124
124
  return t.Scalar?.(s, e, n);
125
- if (Z(e))
125
+ if (W(e))
126
126
  return t.Alias?.(s, e, n);
127
127
  }
128
- function Vt(s, e, t) {
128
+ function Jt(s, e, t) {
129
129
  const n = e[e.length - 1];
130
130
  if (L(n))
131
131
  n.items[s] = t;
132
132
  else if (T(n))
133
133
  s === "key" ? n.key = t : n.value = t;
134
- else if (ee(n))
134
+ else if (Z(n))
135
135
  n.contents = t;
136
136
  else {
137
- const i = Z(n) ? "alias" : "scalar";
137
+ const i = W(n) ? "alias" : "scalar";
138
138
  throw new Error(`Cannot replace node with ${i} parent`);
139
139
  }
140
140
  }
@@ -243,7 +243,7 @@ class B {
243
243
  let i;
244
244
  if (e && n.length > 0 && $(e.contents)) {
245
245
  const r = {};
246
- Q(e.contents, (o, l) => {
246
+ ee(e.contents, (o, l) => {
247
247
  $(l) && l.tag && (r[l.tag] = !0);
248
248
  }), i = Object.keys(r);
249
249
  } else
@@ -256,22 +256,22 @@ class B {
256
256
  }
257
257
  B.defaultYaml = { explicit: !1, version: "1.2" };
258
258
  B.defaultTags = { "!!": "tag:yaml.org,2002:" };
259
- function Jt(s) {
259
+ function Yt(s) {
260
260
  if (/[\x00-\x19\s,[\]{}]/.test(s)) {
261
261
  const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
262
262
  throw new Error(t);
263
263
  }
264
264
  return !0;
265
265
  }
266
- function Yt(s) {
266
+ function Gt(s) {
267
267
  const e = /* @__PURE__ */ new Set();
268
- return Q(s, {
268
+ return ee(s, {
269
269
  Value(t, n) {
270
270
  n.anchor && e.add(n.anchor);
271
271
  }
272
272
  }), e;
273
273
  }
274
- function Gt(s, e) {
274
+ function Qt(s, e) {
275
275
  for (let t = 1; ; ++t) {
276
276
  const n = `${s}${t}`;
277
277
  if (!e.has(n))
@@ -283,8 +283,8 @@ function Ks(s, e) {
283
283
  let i = null;
284
284
  return {
285
285
  onAnchor: (r) => {
286
- t.push(r), i || (i = Yt(s));
287
- const o = Gt(e, i);
286
+ t.push(r), i ?? (i = Gt(s));
287
+ const o = Qt(e, i);
288
288
  return i.add(o), o;
289
289
  },
290
290
  /**
@@ -334,7 +334,7 @@ function j(s, e, t) {
334
334
  if (Array.isArray(s))
335
335
  return s.map((n, i) => j(n, String(i), t));
336
336
  if (s && typeof s.toJSON == "function") {
337
- if (!t || !vs(s))
337
+ if (!t || !Rt(s))
338
338
  return s.toJSON(e, t);
339
339
  const n = { aliasCount: 0, count: 1, res: void 0 };
340
340
  t.anchors.set(s, n), t.onCreate = (r) => {
@@ -356,7 +356,7 @@ class pt {
356
356
  }
357
357
  /** A plain JavaScript representation of this node. */
358
358
  toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
359
- if (!ee(e))
359
+ if (!Z(e))
360
360
  throw new TypeError("A document argument is required");
361
361
  const o = {
362
362
  anchors: /* @__PURE__ */ new Map(),
@@ -372,7 +372,7 @@ class pt {
372
372
  return typeof r == "function" ? oe(r, { "": l }, "", l) : l;
373
373
  }
374
374
  }
375
- class Re extends pt {
375
+ class Fe extends pt {
376
376
  constructor(e) {
377
377
  super(dt), this.source = e, Object.defineProperty(this, "tag", {
378
378
  set() {
@@ -384,20 +384,25 @@ class Re extends pt {
384
384
  * Resolve the value of this alias within `doc`, finding the last
385
385
  * instance of the `source` anchor before this node.
386
386
  */
387
- resolve(e) {
388
- let t;
389
- return Q(e, {
390
- Node: (n, i) => {
391
- if (i === this)
392
- return Q.BREAK;
393
- i.anchor === this.source && (t = i);
387
+ resolve(e, t) {
388
+ let n;
389
+ t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], ee(e, {
390
+ Node: (r, o) => {
391
+ (W(o) || Rt(o)) && n.push(o);
394
392
  }
395
- }), t;
393
+ }), t && (t.aliasResolveCache = n));
394
+ let i;
395
+ for (const r of n) {
396
+ if (r === this)
397
+ break;
398
+ r.anchor === this.source && (i = r);
399
+ }
400
+ return i;
396
401
  }
397
402
  toJSON(e, t) {
398
403
  if (!t)
399
404
  return { source: this.source };
400
- const { anchors: n, doc: i, maxAliasCount: r } = t, o = this.resolve(i);
405
+ const { anchors: n, doc: i, maxAliasCount: r } = t, o = this.resolve(i, t);
401
406
  if (!o) {
402
407
  const a = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
403
408
  throw new ReferenceError(a);
@@ -416,7 +421,7 @@ class Re extends pt {
416
421
  toString(e, t, n) {
417
422
  const i = `*${this.source}`;
418
423
  if (e) {
419
- if (Jt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
424
+ if (Yt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
420
425
  const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
421
426
  throw new Error(r);
422
427
  }
@@ -427,7 +432,7 @@ class Re extends pt {
427
432
  }
428
433
  }
429
434
  function ve(s, e, t) {
430
- if (Z(e)) {
435
+ if (W(e)) {
431
436
  const n = e.resolve(s), i = t && n && t.get(n);
432
437
  return i ? i.count * i.aliasCount : 0;
433
438
  } else if (L(e)) {
@@ -443,10 +448,10 @@ function ve(s, e, t) {
443
448
  }
444
449
  return 1;
445
450
  }
446
- const Qt = (s) => !s || typeof s != "function" && typeof s != "object";
451
+ const Wt = (s) => !s || typeof s != "function" && typeof s != "object";
447
452
  class O extends pt {
448
453
  constructor(e) {
449
- super(R), this.value = e;
454
+ super(F), this.value = e;
450
455
  }
451
456
  toJSON(e, t) {
452
457
  return t?.keep ? this.value : j(this.value, e, t);
@@ -471,7 +476,7 @@ function Ps(s, e, t) {
471
476
  return t.find((n) => n.identify?.(s) && !n.format);
472
477
  }
473
478
  function ke(s, e, t) {
474
- if (ee(s) && (s = s.contents), $(s))
479
+ if (Z(s) && (s = s.contents), $(s))
475
480
  return s;
476
481
  if (T(s)) {
477
482
  const f = t.schema[G].createNode?.(t.schema, null, t);
@@ -482,7 +487,7 @@ function ke(s, e, t) {
482
487
  let a;
483
488
  if (n && s && typeof s == "object") {
484
489
  if (a = l.get(s), a)
485
- return a.anchor || (a.anchor = i(s)), new Re(a.anchor);
490
+ return a.anchor ?? (a.anchor = i(s)), new Fe(a.anchor);
486
491
  a = { anchor: null, node: null }, l.set(s, a);
487
492
  }
488
493
  e?.startsWith("!!") && (e = js + e.slice(2));
@@ -519,7 +524,7 @@ function je(s, e, t) {
519
524
  });
520
525
  }
521
526
  const we = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
522
- class Wt extends pt {
527
+ class Ht extends pt {
523
528
  constructor(e, t) {
524
529
  super(e), Object.defineProperty(this, "schema", {
525
530
  value: t,
@@ -621,7 +626,7 @@ function U(s, e) {
621
626
  const H = (s, e, t) => s.endsWith(`
622
627
  `) ? U(t, e) : t.includes(`
623
628
  `) ? `
624
- ` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Ht = "flow", at = "block", Be = "quoted";
629
+ ` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Xt = "flow", at = "block", Be = "quoted";
625
630
  function Ue(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
626
631
  if (!i || i < 0)
627
632
  return s;
@@ -790,7 +795,7 @@ function ct(s, e) {
790
795
  return Se(s, e);
791
796
  const t = e.indent || (Je(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
792
797
  ${t}`) + "'";
793
- return e.implicitKey ? n : Ue(n, t, Ht, Ve(e, !1));
798
+ return e.implicitKey ? n : Ue(n, t, Xt, Ve(e, !1));
794
799
  }
795
800
  function le(s, e) {
796
801
  const { singleQuote: t } = e.options;
@@ -863,12 +868,12 @@ ${c}${g}`;
863
868
  return t = t.replace(/\n+/g, `$&${c}`), `|${k}
864
869
  ${c}${w}${t}${m}`;
865
870
  }
866
- function Fs(s, e, t, n) {
871
+ function Rs(s, e, t, n) {
867
872
  const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: d } = e;
868
873
  if (l && r.includes(`
869
874
  `) || d && /[[\]{},]/.test(r))
870
875
  return le(r, e);
871
- if (!r || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
876
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
872
877
  return l || d || !r.includes(`
873
878
  `) ? le(r, e) : Me(s, e, t, n);
874
879
  if (!l && !d && i !== O.PLAIN && r.includes(`
@@ -887,7 +892,7 @@ ${a}`);
887
892
  if (y.some(u) || m?.some(u))
888
893
  return le(r, e);
889
894
  }
890
- return l ? f : Ue(f, a, Ht, Ve(e, !1));
895
+ return l ? f : Ue(f, a, Xt, Ve(e, !1));
891
896
  }
892
897
  function Ae(s, e, t, n) {
893
898
  const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
@@ -903,7 +908,7 @@ function Ae(s, e, t, n) {
903
908
  case O.QUOTE_SINGLE:
904
909
  return ct(o.value, e);
905
910
  case O.PLAIN:
906
- return Fs(o, e, t, n);
911
+ return Rs(o, e, t, n);
907
912
  default:
908
913
  return null;
909
914
  }
@@ -916,7 +921,7 @@ function Ae(s, e, t, n) {
916
921
  }
917
922
  return c;
918
923
  }
919
- function Xt(s, e) {
924
+ function zt(s, e) {
920
925
  const t = Object.assign({
921
926
  blockQuote: !0,
922
927
  commentString: Ds,
@@ -957,7 +962,7 @@ function Xt(s, e) {
957
962
  options: t
958
963
  };
959
964
  }
960
- function Rs(s, e) {
965
+ function Fs(s, e) {
961
966
  if (e.tag) {
962
967
  const i = s.filter((r) => r.tag === e.tag);
963
968
  if (i.length > 0)
@@ -975,7 +980,7 @@ function Rs(s, e) {
975
980
  } else
976
981
  n = e, t = s.find((i) => i.nodeClass && n instanceof i.nodeClass);
977
982
  if (!t) {
978
- const i = n?.constructor?.name ?? typeof n;
983
+ const i = n?.constructor?.name ?? (n === null ? "null" : typeof n);
979
984
  throw new Error(`Tag not resolved for ${i} value`);
980
985
  }
981
986
  return t;
@@ -984,14 +989,14 @@ function Us(s, e, { anchors: t, doc: n }) {
984
989
  if (!n.directives)
985
990
  return "";
986
991
  const i = [], r = (E(s) || L(s)) && s.anchor;
987
- r && Jt(r) && (t.add(r), i.push(`&${r}`));
988
- const o = s.tag ? s.tag : e.default ? null : e.tag;
992
+ r && Yt(r) && (t.add(r), i.push(`&${r}`));
993
+ const o = s.tag ?? (e.default ? null : e.tag);
989
994
  return o && i.push(n.directives.tagString(o)), i.join(" ");
990
995
  }
991
996
  function fe(s, e, t, n) {
992
997
  if (T(s))
993
998
  return s.toString(e, t, n);
994
- if (Z(s)) {
999
+ if (W(s)) {
995
1000
  if (e.doc.directives)
996
1001
  return s.toString(e);
997
1002
  if (e.resolvedAliases?.has(s))
@@ -1000,7 +1005,7 @@ function fe(s, e, t, n) {
1000
1005
  }
1001
1006
  let i;
1002
1007
  const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (a) => i = a });
1003
- i || (i = Rs(e.doc.schema.tags, r));
1008
+ i ?? (i = Fs(e.doc.schema.tags, r));
1004
1009
  const o = Us(r, i, e);
1005
1010
  o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1006
1011
  const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : E(r) ? Ae(r, e, t, n) : r.toString(e, t, n);
@@ -1070,7 +1075,7 @@ ${t.indent}`);
1070
1075
  `) && (A = "");
1071
1076
  return p += A + N, t.inFlow ? k && n && n() : S && !k ? p += H(p, t.indent, c(S)) : h && i && i(), p;
1072
1077
  }
1073
- function zt(s, e) {
1078
+ function xt(s, e) {
1074
1079
  (s === "debug" || s === "warn") && console.warn(e);
1075
1080
  }
1076
1081
  const Te = "<<", V = {
@@ -1079,12 +1084,12 @@ const Te = "<<", V = {
1079
1084
  tag: "tag:yaml.org,2002:merge",
1080
1085
  test: /^<<$/,
1081
1086
  resolve: () => Object.assign(new O(Symbol(Te)), {
1082
- addToJSMap: xt
1087
+ addToJSMap: Zt
1083
1088
  }),
1084
1089
  stringify: () => Te
1085
1090
  }, Js = (s, e) => (V.identify(e) || E(e) && (!e.type || e.type === O.PLAIN) && V.identify(e.value)) && s?.doc.schema.tags.some((t) => t.tag === V.tag && t.default);
1086
- function xt(s, e, t) {
1087
- if (t = s && Z(t) ? t.resolve(s.doc) : t, pe(t))
1091
+ function Zt(s, e, t) {
1092
+ if (t = s && W(t) ? t.resolve(s.doc) : t, pe(t))
1088
1093
  for (const n of t.items)
1089
1094
  et(s, e, n);
1090
1095
  else if (Array.isArray(t))
@@ -1094,7 +1099,7 @@ function xt(s, e, t) {
1094
1099
  et(s, e, t);
1095
1100
  }
1096
1101
  function et(s, e, t) {
1097
- const n = s && Z(t) ? t.resolve(s.doc) : t;
1102
+ const n = s && W(t) ? t.resolve(s.doc) : t;
1098
1103
  if (!de(n))
1099
1104
  throw new Error("Merge sources must be maps or map aliases");
1100
1105
  const i = n.toJSON(null, s, Map);
@@ -1107,11 +1112,11 @@ function et(s, e, t) {
1107
1112
  });
1108
1113
  return e;
1109
1114
  }
1110
- function Zt(s, e, { key: t, value: n }) {
1115
+ function es(s, e, { key: t, value: n }) {
1111
1116
  if ($(t) && t.addToJSMap)
1112
1117
  t.addToJSMap(s, e, n);
1113
1118
  else if (Js(s, t))
1114
- xt(s, e, n);
1119
+ Zt(s, e, n);
1115
1120
  else {
1116
1121
  const i = j(t, "", s);
1117
1122
  if (e instanceof Map)
@@ -1136,7 +1141,7 @@ function Ys(s, e, t) {
1136
1141
  if (typeof e != "object")
1137
1142
  return String(e);
1138
1143
  if ($(s) && t?.doc) {
1139
- const n = Xt(t.doc, {});
1144
+ const n = zt(t.doc, {});
1140
1145
  n.anchors = /* @__PURE__ */ new Set();
1141
1146
  for (const r of t.anchors.keys())
1142
1147
  n.anchors.add(r.anchor);
@@ -1144,7 +1149,7 @@ function Ys(s, e, t) {
1144
1149
  const i = s.toString(n);
1145
1150
  if (!t.mapKeyWarned) {
1146
1151
  let r = JSON.stringify(i);
1147
- r.length > 40 && (r = r.substring(0, 36) + '..."'), zt(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1152
+ r.length > 40 && (r = r.substring(0, 36) + '..."'), xt(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1148
1153
  }
1149
1154
  return i;
1150
1155
  }
@@ -1164,13 +1169,13 @@ class v {
1164
1169
  }
1165
1170
  toJSON(e, t) {
1166
1171
  const n = t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1167
- return Zt(t, n, this);
1172
+ return es(t, n, this);
1168
1173
  }
1169
1174
  toString(e, t, n) {
1170
1175
  return e?.doc ? Vs(this, e, t, n) : JSON.stringify(this);
1171
1176
  }
1172
1177
  }
1173
- function es(s, e, t) {
1178
+ function ts(s, e, t) {
1174
1179
  return (e.inFlow ?? s.flow ? Qs : Gs)(s, e, t);
1175
1180
  }
1176
1181
  function Gs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
@@ -1261,7 +1266,7 @@ function X(s, e) {
1261
1266
  if (T(n) && (n.key === e || n.key === t || E(n.key) && n.key.value === t))
1262
1267
  return n;
1263
1268
  }
1264
- class K extends Wt {
1269
+ class K extends Ht {
1265
1270
  static get tagName() {
1266
1271
  return "tag:yaml.org,2002:map";
1267
1272
  }
@@ -1301,7 +1306,7 @@ class K extends Wt {
1301
1306
  if (i) {
1302
1307
  if (!t)
1303
1308
  throw new Error(`Key ${n.key} already set`);
1304
- E(i.value) && Qt(n.value) ? i.value.value = n.value : i.value = n.value;
1309
+ E(i.value) && Wt(n.value) ? i.value.value = n.value : i.value = n.value;
1305
1310
  } else if (r) {
1306
1311
  const o = this.items.findIndex((l) => r(n, l) < 0);
1307
1312
  o === -1 ? this.items.push(n) : this.items.splice(o, 0, n);
@@ -1331,7 +1336,7 @@ class K extends Wt {
1331
1336
  const i = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1332
1337
  t?.onCreate && t.onCreate(i);
1333
1338
  for (const r of this.items)
1334
- Zt(t, i, r);
1339
+ es(t, i, r);
1335
1340
  return i;
1336
1341
  }
1337
1342
  toString(e, t, n) {
@@ -1340,7 +1345,7 @@ class K extends Wt {
1340
1345
  for (const i of this.items)
1341
1346
  if (!T(i))
1342
1347
  throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1343
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), es(this, e, {
1348
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), ts(this, e, {
1344
1349
  blockItemPrefix: "",
1345
1350
  flowChars: { start: "{", end: "}" },
1346
1351
  itemIndent: e.indent || "",
@@ -1359,7 +1364,7 @@ const me = {
1359
1364
  },
1360
1365
  createNode: (s, e, t) => K.from(s, e, t)
1361
1366
  };
1362
- class W extends Wt {
1367
+ class Q extends Ht {
1363
1368
  static get tagName() {
1364
1369
  return "tag:yaml.org,2002:seq";
1365
1370
  }
@@ -1410,7 +1415,7 @@ class W extends Wt {
1410
1415
  if (typeof n != "number")
1411
1416
  throw new Error(`Expected a valid index, not ${e}.`);
1412
1417
  const i = this.items[n];
1413
- E(i) && Qt(t) ? i.value = t : this.items[n] = t;
1418
+ E(i) && Wt(t) ? i.value = t : this.items[n] = t;
1414
1419
  }
1415
1420
  toJSON(e, t) {
1416
1421
  const n = [];
@@ -1421,7 +1426,7 @@ class W extends Wt {
1421
1426
  return n;
1422
1427
  }
1423
1428
  toString(e, t, n) {
1424
- return e ? es(this, e, {
1429
+ return e ? ts(this, e, {
1425
1430
  blockItemPrefix: "- ",
1426
1431
  flowChars: { start: "[", end: "]" },
1427
1432
  itemIndent: (e.indent || "") + " ",
@@ -1451,12 +1456,12 @@ function Le(s) {
1451
1456
  const ye = {
1452
1457
  collection: "seq",
1453
1458
  default: !0,
1454
- nodeClass: W,
1459
+ nodeClass: Q,
1455
1460
  tag: "tag:yaml.org,2002:seq",
1456
1461
  resolve(s, e) {
1457
1462
  return pe(s) || e("Expected a sequence for this tag"), s;
1458
1463
  },
1459
- createNode: (s, e, t) => W.from(s, e, t)
1464
+ createNode: (s, e, t) => Q.from(s, e, t)
1460
1465
  }, Ye = {
1461
1466
  identify: (s) => typeof s == "string",
1462
1467
  default: !0,
@@ -1504,14 +1509,14 @@ function q({ format: s, minFractionDigits: e, tag: t, value: n }) {
1504
1509
  }
1505
1510
  return r;
1506
1511
  }
1507
- const ts = {
1512
+ const ss = {
1508
1513
  identify: (s) => typeof s == "number",
1509
1514
  default: !0,
1510
1515
  tag: "tag:yaml.org,2002:float",
1511
1516
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1512
1517
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1513
1518
  stringify: q
1514
- }, ss = {
1519
+ }, ns = {
1515
1520
  identify: (s) => typeof s == "number",
1516
1521
  default: !0,
1517
1522
  tag: "tag:yaml.org,2002:float",
@@ -1522,7 +1527,7 @@ const ts = {
1522
1527
  const e = Number(s.value);
1523
1528
  return isFinite(e) ? e.toExponential() : q(s);
1524
1529
  }
1525
- }, ns = {
1530
+ }, is = {
1526
1531
  identify: (s) => typeof s == "number",
1527
1532
  default: !0,
1528
1533
  tag: "tag:yaml.org,2002:float",
@@ -1533,45 +1538,45 @@ const ts = {
1533
1538
  },
1534
1539
  stringify: q
1535
1540
  }, Qe = (s) => typeof s == "bigint" || Number.isInteger(s), gt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1536
- function is(s, e, t) {
1541
+ function rs(s, e, t) {
1537
1542
  const { value: n } = s;
1538
1543
  return Qe(n) && n >= 0 ? t + n.toString(e) : q(s);
1539
1544
  }
1540
- const rs = {
1545
+ const os = {
1541
1546
  identify: (s) => Qe(s) && s >= 0,
1542
1547
  default: !0,
1543
1548
  tag: "tag:yaml.org,2002:int",
1544
1549
  format: "OCT",
1545
1550
  test: /^0o[0-7]+$/,
1546
1551
  resolve: (s, e, t) => gt(s, 2, 8, t),
1547
- stringify: (s) => is(s, 8, "0o")
1548
- }, os = {
1552
+ stringify: (s) => rs(s, 8, "0o")
1553
+ }, ls = {
1549
1554
  identify: Qe,
1550
1555
  default: !0,
1551
1556
  tag: "tag:yaml.org,2002:int",
1552
1557
  test: /^[-+]?[0-9]+$/,
1553
1558
  resolve: (s, e, t) => gt(s, 0, 10, t),
1554
1559
  stringify: q
1555
- }, ls = {
1560
+ }, as = {
1556
1561
  identify: (s) => Qe(s) && s >= 0,
1557
1562
  default: !0,
1558
1563
  tag: "tag:yaml.org,2002:int",
1559
1564
  format: "HEX",
1560
1565
  test: /^0x[0-9a-fA-F]+$/,
1561
1566
  resolve: (s, e, t) => gt(s, 2, 16, t),
1562
- stringify: (s) => is(s, 16, "0x")
1567
+ stringify: (s) => rs(s, 16, "0x")
1563
1568
  }, Ws = [
1564
1569
  me,
1565
1570
  ye,
1566
1571
  Ye,
1567
1572
  Ge,
1568
1573
  yt,
1569
- rs,
1570
1574
  os,
1571
1575
  ls,
1572
- ts,
1576
+ as,
1573
1577
  ss,
1574
- ns
1578
+ ns,
1579
+ is
1575
1580
  ];
1576
1581
  function _t(s) {
1577
1582
  return typeof s == "bigint" || Number.isInteger(s);
@@ -1658,7 +1663,7 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
1658
1663
  l = btoa(a);
1659
1664
  } else
1660
1665
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1661
- if (e || (e = O.BLOCK_LITERAL), e !== O.QUOTE_DOUBLE) {
1666
+ if (e ?? (e = O.BLOCK_LITERAL), e !== O.QUOTE_DOUBLE) {
1662
1667
  const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), d = new Array(c);
1663
1668
  for (let f = 0, u = 0; f < c; ++f, u += a)
1664
1669
  d[f] = l.substr(u, a);
@@ -1668,7 +1673,7 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
1668
1673
  return Ae({ comment: s, type: e, value: l }, n, i, r);
1669
1674
  }
1670
1675
  };
1671
- function as(s, e) {
1676
+ function cs(s, e) {
1672
1677
  if (pe(s))
1673
1678
  for (let t = 0; t < s.items.length; ++t) {
1674
1679
  let n = s.items[t];
@@ -1691,8 +1696,8 @@ ${r.comment}` : n.comment;
1691
1696
  e("Expected a sequence for this tag");
1692
1697
  return s;
1693
1698
  }
1694
- function cs(s, e, t) {
1695
- const { replacer: n } = t, i = new W(s);
1699
+ function fs(s, e, t) {
1700
+ const { replacer: n } = t, i = new Q(s);
1696
1701
  i.tag = "tag:yaml.org,2002:pairs";
1697
1702
  let r = 0;
1698
1703
  if (e && Symbol.iterator in Object(e))
@@ -1720,10 +1725,10 @@ const wt = {
1720
1725
  collection: "seq",
1721
1726
  default: !1,
1722
1727
  tag: "tag:yaml.org,2002:pairs",
1723
- resolve: as,
1724
- createNode: cs
1728
+ resolve: cs,
1729
+ createNode: fs
1725
1730
  };
1726
- class ae extends W {
1731
+ class ae extends Q {
1727
1732
  constructor() {
1728
1733
  super(), this.add = K.prototype.add.bind(this), this.delete = K.prototype.delete.bind(this), this.get = K.prototype.get.bind(this), this.has = K.prototype.has.bind(this), this.set = K.prototype.set.bind(this), this.tag = ae.tag;
1729
1734
  }
@@ -1745,7 +1750,7 @@ class ae extends W {
1745
1750
  return n;
1746
1751
  }
1747
1752
  static from(e, t, n) {
1748
- const i = cs(e, t, n), r = new this();
1753
+ const i = fs(e, t, n), r = new this();
1749
1754
  return r.items = i.items, r;
1750
1755
  }
1751
1756
  }
@@ -1757,30 +1762,30 @@ const St = {
1757
1762
  default: !1,
1758
1763
  tag: "tag:yaml.org,2002:omap",
1759
1764
  resolve(s, e) {
1760
- const t = as(s, e), n = [];
1765
+ const t = cs(s, e), n = [];
1761
1766
  for (const { key: i } of t.items)
1762
1767
  E(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
1763
1768
  return Object.assign(new ae(), t);
1764
1769
  },
1765
1770
  createNode: (s, e, t) => ae.from(s, e, t)
1766
1771
  };
1767
- function fs({ value: s, source: e }, t) {
1768
- return e && (s ? us : hs).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1772
+ function us({ value: s, source: e }, t) {
1773
+ return e && (s ? hs : ds).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1769
1774
  }
1770
- const us = {
1775
+ const hs = {
1771
1776
  identify: (s) => s === !0,
1772
1777
  default: !0,
1773
1778
  tag: "tag:yaml.org,2002:bool",
1774
1779
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1775
1780
  resolve: () => new O(!0),
1776
- stringify: fs
1777
- }, hs = {
1781
+ stringify: us
1782
+ }, ds = {
1778
1783
  identify: (s) => s === !1,
1779
1784
  default: !0,
1780
1785
  tag: "tag:yaml.org,2002:bool",
1781
1786
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1782
1787
  resolve: () => new O(!1),
1783
- stringify: fs
1788
+ stringify: us
1784
1789
  }, xs = {
1785
1790
  identify: (s) => typeof s == "number",
1786
1791
  default: !0,
@@ -1936,7 +1941,7 @@ function Ot(s, e) {
1936
1941
  const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, l) => o * i(60) + i(l), i(0));
1937
1942
  return t === "-" ? i(-1) * r : r;
1938
1943
  }
1939
- function ds(s) {
1944
+ function ps(s) {
1940
1945
  let { value: e } = s, t = (o) => o;
1941
1946
  if (typeof e == "bigint")
1942
1947
  t = (o) => BigInt(o);
@@ -1947,22 +1952,22 @@ function ds(s) {
1947
1952
  const i = t(60), r = [e % i];
1948
1953
  return e < 60 ? r.unshift(0) : (e = (e - r[0]) / i, r.unshift(e % i), e >= 60 && (e = (e - r[0]) / i, r.unshift(e))), n + r.map((o) => String(o).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1949
1954
  }
1950
- const ps = {
1955
+ const ms = {
1951
1956
  identify: (s) => typeof s == "bigint" || Number.isInteger(s),
1952
1957
  default: !0,
1953
1958
  tag: "tag:yaml.org,2002:int",
1954
1959
  format: "TIME",
1955
1960
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1956
1961
  resolve: (s, e, { intAsBigInt: t }) => Ot(s, t),
1957
- stringify: ds
1958
- }, ms = {
1962
+ stringify: ps
1963
+ }, ys = {
1959
1964
  identify: (s) => typeof s == "number",
1960
1965
  default: !0,
1961
1966
  tag: "tag:yaml.org,2002:float",
1962
1967
  format: "TIME",
1963
1968
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1964
1969
  resolve: (s) => Ot(s, !1),
1965
- stringify: ds
1970
+ stringify: ps
1966
1971
  }, He = {
1967
1972
  identify: (s) => s instanceof Date,
1968
1973
  default: !0,
@@ -1990,8 +1995,8 @@ const ps = {
1990
1995
  ye,
1991
1996
  Ye,
1992
1997
  Ge,
1993
- us,
1994
1998
  hs,
1999
+ ds,
1995
2000
  tn,
1996
2001
  sn,
1997
2002
  nn,
@@ -2004,8 +2009,8 @@ const ps = {
2004
2009
  St,
2005
2010
  wt,
2006
2011
  Nt,
2007
- ps,
2008
2012
  ms,
2013
+ ys,
2009
2014
  He
2010
2015
  ], vt = /* @__PURE__ */ new Map([
2011
2016
  ["core", Ws],
@@ -2016,14 +2021,14 @@ const ps = {
2016
2021
  ]), Bt = {
2017
2022
  binary: bt,
2018
2023
  bool: yt,
2019
- float: ns,
2020
- floatExp: ss,
2021
- floatNaN: ts,
2022
- floatTime: ms,
2023
- int: os,
2024
- intHex: ls,
2025
- intOct: rs,
2026
- intTime: ps,
2024
+ float: is,
2025
+ floatExp: ns,
2026
+ floatNaN: ss,
2027
+ floatTime: ys,
2028
+ int: ls,
2029
+ intHex: as,
2030
+ intOct: os,
2031
+ intTime: ms,
2027
2032
  map: me,
2028
2033
  merge: V,
2029
2034
  null: Ge,
@@ -2068,7 +2073,7 @@ function tt(s, e, t) {
2068
2073
  const ln = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2069
2074
  class Xe {
2070
2075
  constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
2071
- this.compat = Array.isArray(e) ? tt(e, "compat") : e ? tt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? on : {}, this.tags = tt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, G, { value: me }), Object.defineProperty(this, R, { value: Ye }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ln : null;
2076
+ this.compat = Array.isArray(e) ? tt(e, "compat") : e ? tt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? on : {}, this.tags = tt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, G, { value: me }), Object.defineProperty(this, F, { value: Ye }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ln : null;
2072
2077
  }
2073
2078
  clone() {
2074
2079
  const e = Object.create(Xe.prototype, Object.getOwnPropertyDescriptors(this));
@@ -2083,7 +2088,7 @@ function an(s, e) {
2083
2088
  a ? (t.push(a), n = !0) : s.directives.docStart && (n = !0);
2084
2089
  }
2085
2090
  n && t.push("---");
2086
- const i = Xt(s, e), { commentString: r } = i.options;
2091
+ const i = zt(s, e), { commentString: r } = i.options;
2087
2092
  if (s.commentBefore) {
2088
2093
  t.length !== 1 && t.unshift("");
2089
2094
  const a = r(s.commentBefore);
@@ -2167,11 +2172,11 @@ class ge {
2167
2172
  */
2168
2173
  createAlias(e, t) {
2169
2174
  if (!e.anchor) {
2170
- const n = Yt(this);
2175
+ const n = Gt(this);
2171
2176
  e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2172
- !t || n.has(t) ? Gt(t || "a", n) : t;
2177
+ !t || n.has(t) ? Qt(t || "a", n) : t;
2173
2178
  }
2174
- return new Re(e.anchor);
2179
+ return new Fe(e.anchor);
2175
2180
  }
2176
2181
  createNode(e, t, n) {
2177
2182
  let i;
@@ -2343,7 +2348,7 @@ class z extends At {
2343
2348
  super("YAMLParseError", e, t, n);
2344
2349
  }
2345
2350
  }
2346
- class ys extends At {
2351
+ class gs extends At {
2347
2352
  constructor(e, t, n) {
2348
2353
  super("YAMLWarning", e, t, n);
2349
2354
  }
@@ -2393,10 +2398,10 @@ function ue(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIn
2393
2398
  c ? f ? f += g.source : (!k || t !== "seq-item-ind") && (a = !0) : u += g.source, c = !0, m = !0, (p || b) && (w = g), d = !0;
2394
2399
  break;
2395
2400
  case "anchor":
2396
- p && r(g, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), g.source.endsWith(":") && r(g.offset + g.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), p = g, N === null && (N = g.offset), c = !1, d = !1, y = !0;
2401
+ p && r(g, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), g.source.endsWith(":") && r(g.offset + g.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), p = g, N ?? (N = g.offset), c = !1, d = !1, y = !0;
2397
2402
  break;
2398
2403
  case "tag": {
2399
- b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, N === null && (N = g.offset), c = !1, d = !1, y = !0;
2404
+ b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, N ?? (N = g.offset), c = !1, d = !1, y = !0;
2400
2405
  break;
2401
2406
  }
2402
2407
  case t:
@@ -2466,7 +2471,7 @@ function ut(s, e, t) {
2466
2471
  n.indent === s && (n.source === "]" || n.source === "}") && Ne(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2467
2472
  }
2468
2473
  }
2469
- function gs(s, e, t) {
2474
+ function bs(s, e, t) {
2470
2475
  const { uniqueKeys: n } = s.options;
2471
2476
  if (n === !1)
2472
2477
  return !1;
@@ -2497,7 +2502,7 @@ function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2497
2502
  } else h.found?.indent !== n.indent && i(a, "BAD_INDENT", Mt);
2498
2503
  t.atKey = !0;
2499
2504
  const b = h.end, w = u ? s(t, u, h, i) : e(t, b, f, null, h, i);
2500
- t.schema.compat && ut(n.indent, u, i), t.atKey = !1, gs(t, l.items, w) && i(b, "DUPLICATE_KEY", "Map keys must be unique");
2505
+ t.schema.compat && ut(n.indent, u, i), t.atKey = !1, bs(t, l.items, w) && i(b, "DUPLICATE_KEY", "Map keys must be unique");
2501
2506
  const S = ue(m ?? [], {
2502
2507
  indicator: "map-value-ind",
2503
2508
  next: y,
@@ -2522,7 +2527,7 @@ function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2522
2527
  return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
2523
2528
  }
2524
2529
  function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2525
- const o = r?.nodeClass ?? W, l = new o(t.schema);
2530
+ const o = r?.nodeClass ?? Q, l = new o(t.schema);
2526
2531
  t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2527
2532
  let a = n.offset, c = null;
2528
2533
  for (const { start: d, value: f } of n.items) {
@@ -2575,7 +2580,7 @@ function Ie(s, e, t, n) {
2575
2580
  }
2576
2581
  const st = "Block collections are not allowed within flow collections", nt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2577
2582
  function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2578
- const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = r?.nodeClass ?? (o ? K : W), c = new a(t.schema);
2583
+ const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = r?.nodeClass ?? (o ? K : Q), c = new a(t.schema);
2579
2584
  c.flow = !0;
2580
2585
  const d = t.atRoot;
2581
2586
  d && (t.atRoot = !1), t.atKey && (t.atKey = !1);
@@ -2660,7 +2665,7 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2660
2665
  const te = new v(g, J);
2661
2666
  if (t.options.keepSourceTokens && (te.srcToken = b), o) {
2662
2667
  const C = c;
2663
- gs(t, C.items, g) && i(I, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(te);
2668
+ bs(t, C.items, g) && i(I, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(te);
2664
2669
  } else {
2665
2670
  const C = new K(t.schema);
2666
2671
  C.flow = !0, C.items.push(te);
@@ -2697,7 +2702,7 @@ function hn(s, e, t, n, i) {
2697
2702
  y && (!m || m.offset < y.offset) && i(y, "MISSING_CHAR", "Missing newline after block sequence props");
2698
2703
  }
2699
2704
  const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2700
- if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === W.tagName && l === "seq")
2705
+ if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === Q.tagName && l === "seq")
2701
2706
  return it(s, e, t, i, o);
2702
2707
  let a = e.schema.tags.find((u) => u.tag === o && u.collection === l);
2703
2708
  if (!a) {
@@ -2710,7 +2715,7 @@ function hn(s, e, t, n, i) {
2710
2715
  const c = it(s, e, t, i, o, a), d = a.resolve?.(c, (u) => i(r, "TAG_RESOLVE_FAILED", u), e.options) ?? c, f = $(d) ? d : new O(d);
2711
2716
  return f.range = c.range, f.tag = o, a?.format && (f.format = a.format), f;
2712
2717
  }
2713
- function bs(s, e, t) {
2718
+ function ws(s, e, t) {
2714
2719
  const n = e.offset, i = dn(e, s.options.strict, t);
2715
2720
  if (!i)
2716
2721
  return { value: "", type: null, comment: "", range: [n, n, n] };
@@ -2831,7 +2836,7 @@ function pn(s) {
2831
2836
  r.push([e[o], e[o + 1]]);
2832
2837
  return r;
2833
2838
  }
2834
- function ws(s, e, t) {
2839
+ function Ss(s, e, t) {
2835
2840
  const { offset: n, type: i, source: r, end: o } = s;
2836
2841
  let l, a;
2837
2842
  const c = (u, m, y) => t(n + u, m, y);
@@ -2886,12 +2891,12 @@ function mn(s, e) {
2886
2891
  break;
2887
2892
  }
2888
2893
  }
2889
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), Ss(s);
2894
+ return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), ks(s);
2890
2895
  }
2891
2896
  function yn(s, e) {
2892
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), Ss(s.slice(1, -1)).replace(/''/g, "'");
2897
+ return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), ks(s.slice(1, -1)).replace(/''/g, "'");
2893
2898
  }
2894
- function Ss(s) {
2899
+ function ks(s) {
2895
2900
  let e, t;
2896
2901
  try {
2897
2902
  e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
@@ -3006,10 +3011,10 @@ function Sn(s, e, t, n) {
3006
3011
  }
3007
3012
  return String.fromCodePoint(o);
3008
3013
  }
3009
- function ks(s, e, t, n) {
3010
- const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? bs(s, e, n) : ws(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3014
+ function Ns(s, e, t, n) {
3015
+ const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? ws(s, e, n) : Ss(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3011
3016
  let c;
3012
- s.options.stringKeys && s.atKey ? c = s.schema[R] : a ? c = kn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Nn(s, i, e, n) : c = s.schema[R];
3017
+ s.options.stringKeys && s.atKey ? c = s.schema[F] : a ? c = kn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Nn(s, i, e, n) : c = s.schema[F];
3013
3018
  let d;
3014
3019
  try {
3015
3020
  const f = c.resolve(i, (u) => n(t ?? e, "TAG_RESOLVE_FAILED", u), s.options);
@@ -3022,7 +3027,7 @@ function ks(s, e, t, n) {
3022
3027
  }
3023
3028
  function kn(s, e, t, n, i) {
3024
3029
  if (t === "!")
3025
- return s[R];
3030
+ return s[F];
3026
3031
  const r = [];
3027
3032
  for (const l of s.tags)
3028
3033
  if (!l.collection && l.tag === t)
@@ -3034,12 +3039,12 @@ function kn(s, e, t, n, i) {
3034
3039
  if (l.test?.test(e))
3035
3040
  return l;
3036
3041
  const o = s.knownTags[t];
3037
- return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[R]);
3042
+ return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[F]);
3038
3043
  }
3039
3044
  function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
3040
- const o = t.tags.find((l) => (l.default === !0 || s && l.default === "key") && l.test?.test(n)) || t[R];
3045
+ const o = t.tags.find((l) => (l.default === !0 || s && l.default === "key") && l.test?.test(n)) || t[F];
3041
3046
  if (t.compat) {
3042
- const l = t.compat.find((a) => a.default && a.test?.test(n)) ?? t[R];
3047
+ const l = t.compat.find((a) => a.default && a.test?.test(n)) ?? t[F];
3043
3048
  if (o.tag !== l.tag) {
3044
3049
  const a = e.tagString(o.tag), c = e.tagString(l.tag), d = `Value may be parsed as either ${a} or ${c}`;
3045
3050
  r(i, "TAG_RESOLVE_FAILED", d, !0);
@@ -3049,7 +3054,7 @@ function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
3049
3054
  }
3050
3055
  function On(s, e, t) {
3051
3056
  if (e) {
3052
- t === null && (t = e.length);
3057
+ t ?? (t = e.length);
3053
3058
  for (let n = t - 1; n >= 0; --n) {
3054
3059
  let i = e[n];
3055
3060
  switch (i.type) {
@@ -3066,8 +3071,8 @@ function On(s, e, t) {
3066
3071
  }
3067
3072
  return s;
3068
3073
  }
3069
- const An = { composeNode: Ns, composeEmptyNode: Et };
3070
- function Ns(s, e, t, n) {
3074
+ const An = { composeNode: Os, composeEmptyNode: Et };
3075
+ function Os(s, e, t, n) {
3071
3076
  const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
3072
3077
  let c, d = !0;
3073
3078
  switch (e.type) {
@@ -3078,7 +3083,7 @@ function Ns(s, e, t, n) {
3078
3083
  case "single-quoted-scalar":
3079
3084
  case "double-quoted-scalar":
3080
3085
  case "block-scalar":
3081
- c = ks(s, e, a, n), l && (c.anchor = l.source.substring(1));
3086
+ c = Ns(s, e, a, n), l && (c.anchor = l.source.substring(1));
3082
3087
  break;
3083
3088
  case "block-map":
3084
3089
  case "block-seq":
@@ -3098,11 +3103,11 @@ function Et(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a
3098
3103
  offset: On(e, t, n),
3099
3104
  indent: -1,
3100
3105
  source: ""
3101
- }, f = ks(s, d, l, c);
3106
+ }, f = Ns(s, d, l, c);
3102
3107
  return o && (f.anchor = o.source.substring(1), f.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = a), f;
3103
3108
  }
3104
3109
  function En({ options: s }, { offset: e, source: t, end: n }, i) {
3105
- const r = new Re(t.substring(1));
3110
+ const r = new Fe(t.substring(1));
3106
3111
  r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
3107
3112
  const o = e + t.length, l = Ie(n, o, s.strict, i);
3108
3113
  return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
@@ -3122,7 +3127,7 @@ function In(s, e, { offset: t, start: n, value: i, end: r }, o) {
3122
3127
  parentIndent: 0,
3123
3128
  startOnNewline: !0
3124
3129
  });
3125
- d.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !d.hasNewline && o(d.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? Ns(c, i, d, o) : Et(c, d.end, n, null, d, o);
3130
+ d.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !d.hasNewline && o(d.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? Os(c, i, d, o) : Et(c, d.end, n, null, d, o);
3126
3131
  const f = a.contents.range[2], u = Ie(r, f, !1, o);
3127
3132
  return u.comment && (a.comment = u.comment), a.range = [t, f, u.offset], a;
3128
3133
  }
@@ -3158,7 +3163,7 @@ class It {
3158
3163
  constructor(e = {}) {
3159
3164
  this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3160
3165
  const o = be(t);
3161
- r ? this.warnings.push(new ys(o, n, i)) : this.errors.push(new z(o, n, i));
3166
+ r ? this.warnings.push(new gs(o, n, i)) : this.errors.push(new z(o, n, i));
3162
3167
  }, this.directives = new B({ version: e.version || "1.2" }), this.options = e;
3163
3168
  }
3164
3169
  decorate(e, t) {
@@ -3282,9 +3287,9 @@ function Tn(s, e = !0, t) {
3282
3287
  case "scalar":
3283
3288
  case "single-quoted-scalar":
3284
3289
  case "double-quoted-scalar":
3285
- return ws(s, e, n);
3290
+ return Ss(s, e, n);
3286
3291
  case "block-scalar":
3287
- return bs({ options: { strict: e } }, s, n);
3292
+ return ws({ options: { strict: e } }, s, n);
3288
3293
  }
3289
3294
  }
3290
3295
  return null;
@@ -3307,7 +3312,7 @@ function Ln(s, e) {
3307
3312
  `, u = [
3308
3313
  { type: "block-scalar-header", offset: r, indent: n, source: d }
3309
3314
  ];
3310
- return Os(u, a) || u.push({ type: "newline", offset: -1, indent: n, source: `
3315
+ return As(u, a) || u.push({ type: "newline", offset: -1, indent: n, source: `
3311
3316
  ` }), { type: "block-scalar", offset: r, indent: n, props: u, source: f };
3312
3317
  }
3313
3318
  case '"':
@@ -3372,14 +3377,14 @@ function _n(s, e) {
3372
3377
  const { offset: r } = s, o = "indent" in s ? s.indent : -1, l = [
3373
3378
  { type: "block-scalar-header", offset: r, indent: o, source: n }
3374
3379
  ];
3375
- Os(l, "end" in s ? s.end : void 0) || l.push({ type: "newline", offset: -1, indent: o, source: `
3380
+ As(l, "end" in s ? s.end : void 0) || l.push({ type: "newline", offset: -1, indent: o, source: `
3376
3381
  ` });
3377
3382
  for (const a of Object.keys(s))
3378
3383
  a !== "type" && a !== "offset" && delete s[a];
3379
3384
  Object.assign(s, { type: "block-scalar", indent: o, props: l, source: i });
3380
3385
  }
3381
3386
  }
3382
- function Os(s, e) {
3387
+ function As(s, e) {
3383
3388
  if (e)
3384
3389
  for (const t of e)
3385
3390
  switch (t.type) {
@@ -3472,13 +3477,13 @@ function Ke({ start: s, key: e, sep: t, value: n }) {
3472
3477
  i += r.source;
3473
3478
  return n && (i += qe(n)), i;
3474
3479
  }
3475
- const ht = Symbol("break visit"), vn = Symbol("skip children"), As = Symbol("remove item");
3480
+ const ht = Symbol("break visit"), vn = Symbol("skip children"), Es = Symbol("remove item");
3476
3481
  function x(s, e) {
3477
- "type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Es(Object.freeze([]), s, e);
3482
+ "type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Is(Object.freeze([]), s, e);
3478
3483
  }
3479
3484
  x.BREAK = ht;
3480
3485
  x.SKIP = vn;
3481
- x.REMOVE = As;
3486
+ x.REMOVE = Es;
3482
3487
  x.itemAtPath = (s, e) => {
3483
3488
  let t = s;
3484
3489
  for (const [n, i] of e) {
@@ -3496,7 +3501,7 @@ x.parentCollection = (s, e) => {
3496
3501
  return i;
3497
3502
  throw new Error("Parent collection not found");
3498
3503
  };
3499
- function Es(s, e, t) {
3504
+ function Is(s, e, t) {
3500
3505
  let n = t(e, s);
3501
3506
  if (typeof n == "symbol")
3502
3507
  return n;
@@ -3504,13 +3509,13 @@ function Es(s, e, t) {
3504
3509
  const r = e[i];
3505
3510
  if (r && "items" in r) {
3506
3511
  for (let o = 0; o < r.items.length; ++o) {
3507
- const l = Es(Object.freeze(s.concat([[i, o]])), r.items[o], t);
3512
+ const l = Is(Object.freeze(s.concat([[i, o]])), r.items[o], t);
3508
3513
  if (typeof l == "number")
3509
3514
  o = l - 1;
3510
3515
  else {
3511
3516
  if (l === ht)
3512
3517
  return ht;
3513
- l === As && (r.items.splice(o, 1), o -= 1);
3518
+ l === Es && (r.items.splice(o, 1), o -= 1);
3514
3519
  }
3515
3520
  }
3516
3521
  typeof n == "function" && i === "key" && (n = n(e, s));
@@ -3533,7 +3538,7 @@ function Kn(s) {
3533
3538
  return JSON.stringify(s);
3534
3539
  }
3535
3540
  }
3536
- function Is(s) {
3541
+ function Ts(s) {
3537
3542
  switch (s) {
3538
3543
  case ze:
3539
3544
  return "byte-order-mark";
@@ -3607,7 +3612,7 @@ const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3607
3612
  resolveAsScalar: Tn,
3608
3613
  setScalarValue: $n,
3609
3614
  stringify: Cn,
3610
- tokenType: Is,
3615
+ tokenType: Ts,
3611
3616
  visit: x
3612
3617
  }, Symbol.toStringTag, { value: "Module" }));
3613
3618
  function D(s) {
@@ -3625,7 +3630,7 @@ function D(s) {
3625
3630
  }
3626
3631
  const jt = new Set("0123456789ABCDEFabcdef"), Pn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
3627
3632
  \r `), ot = (s) => !s || Dn.has(s);
3628
- class Ts {
3633
+ class Ls {
3629
3634
  constructor() {
3630
3635
  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;
3631
3636
  }
@@ -4040,7 +4045,7 @@ class Ts {
4040
4045
  return yield* this.pushToIndex(t, !1);
4041
4046
  }
4042
4047
  }
4043
- class Ls {
4048
+ class $s {
4044
4049
  constructor() {
4045
4050
  this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
4046
4051
  let t = 0, n = this.lineStarts.length;
@@ -4075,7 +4080,7 @@ function Pt(s) {
4075
4080
  }
4076
4081
  return -1;
4077
4082
  }
4078
- function $s(s) {
4083
+ function _s(s) {
4079
4084
  switch (s?.type) {
4080
4085
  case "alias":
4081
4086
  case "scalar":
@@ -4122,7 +4127,7 @@ function ne(s) {
4122
4127
  function Dt(s) {
4123
4128
  if (s.start.type === "flow-seq-start")
4124
4129
  for (const e of s.items)
4125
- e.sep && !e.value && !Y(e.start, "explicit-key-ind") && !Y(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, $s(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
4130
+ e.sep && !e.value && !Y(e.start, "explicit-key-ind") && !Y(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, _s(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
4126
4131
  }
4127
4132
  class Tt {
4128
4133
  /**
@@ -4130,7 +4135,7 @@ class Tt {
4130
4135
  * each new line (in `parse()`, including the start of input).
4131
4136
  */
4132
4137
  constructor(e) {
4133
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Ts(), this.onNewLine = e;
4138
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Ls(), this.onNewLine = e;
4134
4139
  }
4135
4140
  /**
4136
4141
  * Parse `source` as a YAML stream.
@@ -4154,7 +4159,7 @@ class Tt {
4154
4159
  this.atScalar = !1, yield* this.step(), this.offset += e.length;
4155
4160
  return;
4156
4161
  }
4157
- const t = Is(e);
4162
+ const t = Ts(e);
4158
4163
  if (t)
4159
4164
  if (t === "scalar")
4160
4165
  this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
@@ -4447,7 +4452,7 @@ class Tt {
4447
4452
  indent: this.indent,
4448
4453
  items: [{ start: r, key: null, sep: [this.sourceToken] }]
4449
4454
  });
4450
- else if ($s(t.key) && !Y(t.sep, "newline")) {
4455
+ else if (_s(t.key) && !Y(t.sep, "newline")) {
4451
4456
  const o = ne(t.start), l = t.key, a = t.sep;
4452
4457
  a.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4453
4458
  type: "block-map",
@@ -4706,19 +4711,19 @@ class Tt {
4706
4711
  }
4707
4712
  }
4708
4713
  }
4709
- function _s(s) {
4714
+ function Cs(s) {
4710
4715
  const e = s.prettyErrors !== !1;
4711
- return { lineCounter: s.lineCounter || e && new Ls() || null, prettyErrors: e };
4716
+ return { lineCounter: s.lineCounter || e && new $s() || null, prettyErrors: e };
4712
4717
  }
4713
4718
  function qn(s, e = {}) {
4714
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t?.addNewLine), r = new It(e), o = Array.from(r.compose(i.parse(s)));
4719
+ const { lineCounter: t, prettyErrors: n } = Cs(e), i = new Tt(t?.addNewLine), r = new It(e), o = Array.from(r.compose(i.parse(s)));
4715
4720
  if (n && t)
4716
4721
  for (const l of o)
4717
4722
  l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
4718
4723
  return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
4719
4724
  }
4720
- function Cs(s, e = {}) {
4721
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t?.addNewLine), r = new It(e);
4725
+ function vs(s, e = {}) {
4726
+ const { lineCounter: t, prettyErrors: n } = Cs(e), i = new Tt(t?.addNewLine), r = new It(e);
4722
4727
  let o = null;
4723
4728
  for (const l of r.compose(i.parse(s), !0, s.length))
4724
4729
  if (!o)
@@ -4729,20 +4734,20 @@ function Cs(s, e = {}) {
4729
4734
  }
4730
4735
  return n && t && (o.errors.forEach(De(s, t)), o.warnings.forEach(De(s, t))), o;
4731
4736
  }
4732
- function Fn(s, e, t) {
4737
+ function Rn(s, e, t) {
4733
4738
  let n;
4734
4739
  typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
4735
- const i = Cs(s, t);
4740
+ const i = vs(s, t);
4736
4741
  if (!i)
4737
4742
  return null;
4738
- if (i.warnings.forEach((r) => zt(i.options.logLevel, r)), i.errors.length > 0) {
4743
+ if (i.warnings.forEach((r) => xt(i.options.logLevel, r)), i.errors.length > 0) {
4739
4744
  if (i.options.logLevel !== "silent")
4740
4745
  throw i.errors[0];
4741
4746
  i.errors = [];
4742
4747
  }
4743
4748
  return i.toJS(Object.assign({ reviver: n }, t));
4744
4749
  }
4745
- function Rn(s, e, t) {
4750
+ function Fn(s, e, t) {
4746
4751
  let n = null;
4747
4752
  if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
4748
4753
  const i = Math.round(t);
@@ -4753,16 +4758,16 @@ function Rn(s, e, t) {
4753
4758
  if (!i)
4754
4759
  return;
4755
4760
  }
4756
- return ee(s) && !n ? s.toString(t) : new ge(s, n, t).toString(t);
4761
+ return Z(s) && !n ? s.toString(t) : new ge(s, n, t).toString(t);
4757
4762
  }
4758
4763
  const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4759
4764
  __proto__: null,
4760
- Alias: Re,
4765
+ Alias: Fe,
4761
4766
  CST: jn,
4762
4767
  Composer: It,
4763
4768
  Document: ge,
4764
- Lexer: Ts,
4765
- LineCounter: Ls,
4769
+ Lexer: Ls,
4770
+ LineCounter: $s,
4766
4771
  Pair: v,
4767
4772
  Parser: Tt,
4768
4773
  Scalar: O,
@@ -4770,30 +4775,30 @@ const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4770
4775
  YAMLError: At,
4771
4776
  YAMLMap: K,
4772
4777
  YAMLParseError: z,
4773
- YAMLSeq: W,
4774
- YAMLWarning: ys,
4775
- isAlias: Z,
4778
+ YAMLSeq: Q,
4779
+ YAMLWarning: gs,
4780
+ isAlias: W,
4776
4781
  isCollection: L,
4777
- isDocument: ee,
4782
+ isDocument: Z,
4778
4783
  isMap: de,
4779
4784
  isNode: $,
4780
4785
  isPair: T,
4781
4786
  isScalar: E,
4782
4787
  isSeq: pe,
4783
- parse: Fn,
4788
+ parse: Rn,
4784
4789
  parseAllDocuments: qn,
4785
- parseDocument: Cs,
4786
- stringify: Rn,
4787
- visit: Q,
4788
- visitAsync: Fe
4790
+ parseDocument: vs,
4791
+ stringify: Fn,
4792
+ visit: ee,
4793
+ visitAsync: Re
4789
4794
  }, Symbol.toStringTag, { value: "Module" }));
4790
4795
  export {
4791
- Re as Alias,
4796
+ Fe as Alias,
4792
4797
  jn as CST,
4793
4798
  It as Composer,
4794
4799
  ge as Document,
4795
- Ts as Lexer,
4796
- Ls as LineCounter,
4800
+ Ls as Lexer,
4801
+ $s as LineCounter,
4797
4802
  v as Pair,
4798
4803
  Tt as Parser,
4799
4804
  O as Scalar,
@@ -4801,22 +4806,22 @@ export {
4801
4806
  At as YAMLError,
4802
4807
  K as YAMLMap,
4803
4808
  z as YAMLParseError,
4804
- W as YAMLSeq,
4805
- ys as YAMLWarning,
4809
+ Q as YAMLSeq,
4810
+ gs as YAMLWarning,
4806
4811
  Un as default,
4807
- Z as isAlias,
4812
+ W as isAlias,
4808
4813
  L as isCollection,
4809
- ee as isDocument,
4814
+ Z as isDocument,
4810
4815
  de as isMap,
4811
4816
  $ as isNode,
4812
4817
  T as isPair,
4813
4818
  E as isScalar,
4814
4819
  pe as isSeq,
4815
- Fn as parse,
4820
+ Rn as parse,
4816
4821
  qn as parseAllDocuments,
4817
- Cs as parseDocument,
4818
- Rn as stringify,
4819
- Q as visit,
4820
- Fe as visitAsync
4822
+ vs as parseDocument,
4823
+ Fn as stringify,
4824
+ ee as visit,
4825
+ Re as visitAsync
4821
4826
  };
4822
- //# sourceMappingURL=index-zddirpDj.js.map
4827
+ //# sourceMappingURL=index-DmNq2fbN.js.map