novelaid-markdown 0.3.0 → 0.5.0

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