@arach/arc-iso 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2239 @@
1
+ import un, { useState as we, useEffect as pn } from "react";
2
+ const yr = 30 * (Math.PI / 180), dn = Math.cos(yr), hn = Math.sin(yr);
3
+ function b(e, r, n = 0) {
4
+ return {
5
+ screenX: (e - r) * dn,
6
+ screenY: -(e + r) * hn - n
7
+ // Negated so +X,+Y go UP on screen
8
+ };
9
+ }
10
+ function me(e, r, n, o = 0, i = 0, l = 0) {
11
+ const t = {
12
+ // Bottom face
13
+ frontBottom: b(e, 0, 0),
14
+ rightBottom: b(e, r, 0),
15
+ backBottom: b(0, r, 0),
16
+ leftBottom: b(0, 0, 0),
17
+ // Top face
18
+ frontTop: b(e, 0, n),
19
+ rightTop: b(e, r, n),
20
+ backTop: b(0, r, n),
21
+ leftTop: b(0, 0, n)
22
+ }, a = ($) => ({
23
+ x: $.screenX + o,
24
+ y: $.screenY + i
25
+ }), c = Object.fromEntries(
26
+ Object.entries(t).map(([$, F]) => [$, a(F)])
27
+ ), s = ($, F, j, T) => {
28
+ if (T <= 0) {
29
+ const k = b(0, 0, j), C = b($, 0, j), S = b($, F, j), P = b(0, F, j);
30
+ return `M ${k.screenX + o},${k.screenY + i} L ${C.screenX + o},${C.screenY + i} L ${S.screenX + o},${S.screenY + i} L ${P.screenX + o},${P.screenY + i} Z`;
31
+ }
32
+ const H = Math.min($, F) / 2, M = Math.min(T, H), O = 8, R = [], V = (k, C, S, P) => {
33
+ for (let Y = 0; Y <= O; Y++) {
34
+ const Z = S + (P - S) * (Y / O), te = k + M * Math.cos(Z), p = C + M * Math.sin(Z), _ = b(te, p, j);
35
+ R.push(`${_.screenX + o},${_.screenY + i}`);
36
+ }
37
+ };
38
+ return V(M, M, Math.PI, Math.PI * 1.5), V($ - M, M, Math.PI * 1.5, Math.PI * 2), V($ - M, F - M, 0, Math.PI * 0.5), V(M, F - M, Math.PI * 0.5, Math.PI), `M ${R[0]} L ${R.slice(1).join(" L ")} Z`;
39
+ }, h = ($) => `M ${$.map((F) => `${F.x},${F.y}`).join(" L ")} Z`, d = ($, F, j, T, H, M) => {
40
+ const R = [];
41
+ for (let S = 0; S < 6; S++) {
42
+ const P = H + (M - H) * (S / 6), Y = H + (M - H) * ((S + 1) / 6), Z = (P + Y) / 2, te = Math.cos(Z), p = Math.sin(Z), I = te * -0.577 + p * -0.577 + 0 * 0.577, le = 0.3 + Math.max(0, I + 0.4) * 0.5, Q = b($ + j * Math.cos(P), F + j * Math.sin(P), 0), L = b($ + j * Math.cos(Y), F + j * Math.sin(Y), 0), E = b($ + j * Math.cos(P), F + j * Math.sin(P), T), W = b($ + j * Math.cos(Y), F + j * Math.sin(Y), T), se = `M ${Q.screenX + o},${Q.screenY + i} L ${L.screenX + o},${L.screenY + i} L ${W.screenX + o},${W.screenY + i} L ${E.screenX + o},${E.screenY + i} Z`;
43
+ R.push({ path: se, intensity: le });
44
+ }
45
+ return R;
46
+ }, u = Math.min(l, Math.min(e, r) / 2), f = s(e, r, n, u);
47
+ let m, x, v, A, w, X;
48
+ if (u > 0) {
49
+ const $ = [
50
+ { x: b(0, u, 0).screenX + o, y: b(0, u, 0).screenY + i },
51
+ { x: b(0, r - u, 0).screenX + o, y: b(0, r - u, 0).screenY + i },
52
+ { x: b(0, r - u, n).screenX + o, y: b(0, r - u, n).screenY + i },
53
+ { x: b(0, u, n).screenX + o, y: b(0, u, n).screenY + i }
54
+ ];
55
+ m = h($);
56
+ const F = [
57
+ { x: b(u, 0, 0).screenX + o, y: b(u, 0, 0).screenY + i },
58
+ { x: b(e - u, 0, 0).screenX + o, y: b(e - u, 0, 0).screenY + i },
59
+ { x: b(e - u, 0, n).screenX + o, y: b(e - u, 0, n).screenY + i },
60
+ { x: b(u, 0, n).screenX + o, y: b(u, 0, n).screenY + i }
61
+ ];
62
+ x = h(F), v = d(u, u, u, n, Math.PI, Math.PI * 1.5), A = d(e - u, u, u, n, Math.PI * 1.5, Math.PI * 2), w = d(u, r - u, u, n, Math.PI * 0.5, Math.PI), X = d(e - u, r - u, u, n, 0, Math.PI * 0.5);
63
+ } else {
64
+ const $ = [c.leftBottom, c.backBottom, c.backTop, c.leftTop], F = [c.leftBottom, c.frontBottom, c.frontTop, c.leftTop];
65
+ m = h($), x = h(F), v = [], A = [], w = [], X = [];
66
+ }
67
+ const oe = `M ${c.leftBottom.x},${c.leftBottom.y} L ${c.frontBottom.x},${c.frontBottom.y} L ${c.rightBottom.x},${c.rightBottom.y} L ${c.backBottom.x},${c.backBottom.y} Z`;
68
+ return {
69
+ top: f,
70
+ left: m,
71
+ right: x,
72
+ cornerFrontLeft: v,
73
+ cornerFrontRight: A,
74
+ cornerBackLeft: w,
75
+ cornerBackRight: X,
76
+ outline: oe
77
+ };
78
+ }
79
+ function mn(e, r = 60, n = 50) {
80
+ return {
81
+ top: `hsl(${e}, ${r}%, ${Math.min(n + 15, 95)}%)`,
82
+ right: `hsl(${e}, ${r}%, ${n}%)`,
83
+ left: `hsl(${e}, ${r}%, ${Math.max(n - 15, 15)}%)`
84
+ };
85
+ }
86
+ const Ze = {
87
+ violet: { hue: 270, saturation: 60, lightness: 55 },
88
+ blue: { hue: 220, saturation: 70, lightness: 50 },
89
+ cyan: { hue: 190, saturation: 80, lightness: 45 },
90
+ emerald: { hue: 155, saturation: 65, lightness: 45 },
91
+ amber: { hue: 40, saturation: 90, lightness: 50 },
92
+ rose: { hue: 350, saturation: 70, lightness: 55 },
93
+ slate: { hue: 220, saturation: 15, lightness: 50 },
94
+ zinc: { hue: 240, saturation: 5, lightness: 50 }
95
+ };
96
+ function Qo(e) {
97
+ const r = Ze[e] || Ze.slate;
98
+ return mn(r.hue, r.saturation, r.lightness);
99
+ }
100
+ var Ee = { exports: {} }, ge = {};
101
+ var Qe;
102
+ function xn() {
103
+ if (Qe) return ge;
104
+ Qe = 1;
105
+ var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
106
+ function n(o, i, l) {
107
+ var t = null;
108
+ if (l !== void 0 && (t = "" + l), i.key !== void 0 && (t = "" + i.key), "key" in i) {
109
+ l = {};
110
+ for (var a in i)
111
+ a !== "key" && (l[a] = i[a]);
112
+ } else l = i;
113
+ return i = l.ref, {
114
+ $$typeof: e,
115
+ type: o,
116
+ key: t,
117
+ ref: i !== void 0 ? i : null,
118
+ props: l
119
+ };
120
+ }
121
+ return ge.Fragment = r, ge.jsx = n, ge.jsxs = n, ge;
122
+ }
123
+ var ye = {};
124
+ var Je;
125
+ function gn() {
126
+ return Je || (Je = 1, process.env.NODE_ENV !== "production" && (function() {
127
+ function e(p) {
128
+ if (p == null) return null;
129
+ if (typeof p == "function")
130
+ return p.$$typeof === O ? null : p.displayName || p.name || null;
131
+ if (typeof p == "string") return p;
132
+ switch (p) {
133
+ case v:
134
+ return "Fragment";
135
+ case w:
136
+ return "Profiler";
137
+ case A:
138
+ return "StrictMode";
139
+ case F:
140
+ return "Suspense";
141
+ case j:
142
+ return "SuspenseList";
143
+ case M:
144
+ return "Activity";
145
+ }
146
+ if (typeof p == "object")
147
+ switch (typeof p.tag == "number" && console.error(
148
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
149
+ ), p.$$typeof) {
150
+ case x:
151
+ return "Portal";
152
+ case oe:
153
+ return p.displayName || "Context";
154
+ case X:
155
+ return (p._context.displayName || "Context") + ".Consumer";
156
+ case $:
157
+ var _ = p.render;
158
+ return p = p.displayName, p || (p = _.displayName || _.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
159
+ case T:
160
+ return _ = p.displayName || null, _ !== null ? _ : e(p.type) || "Memo";
161
+ case H:
162
+ _ = p._payload, p = p._init;
163
+ try {
164
+ return e(p(_));
165
+ } catch {
166
+ }
167
+ }
168
+ return null;
169
+ }
170
+ function r(p) {
171
+ return "" + p;
172
+ }
173
+ function n(p) {
174
+ try {
175
+ r(p);
176
+ var _ = !1;
177
+ } catch {
178
+ _ = !0;
179
+ }
180
+ if (_) {
181
+ _ = console;
182
+ var I = _.error, N = typeof Symbol == "function" && Symbol.toStringTag && p[Symbol.toStringTag] || p.constructor.name || "Object";
183
+ return I.call(
184
+ _,
185
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
186
+ N
187
+ ), r(p);
188
+ }
189
+ }
190
+ function o(p) {
191
+ if (p === v) return "<>";
192
+ if (typeof p == "object" && p !== null && p.$$typeof === H)
193
+ return "<...>";
194
+ try {
195
+ var _ = e(p);
196
+ return _ ? "<" + _ + ">" : "<...>";
197
+ } catch {
198
+ return "<...>";
199
+ }
200
+ }
201
+ function i() {
202
+ var p = R.A;
203
+ return p === null ? null : p.getOwner();
204
+ }
205
+ function l() {
206
+ return Error("react-stack-top-frame");
207
+ }
208
+ function t(p) {
209
+ if (V.call(p, "key")) {
210
+ var _ = Object.getOwnPropertyDescriptor(p, "key").get;
211
+ if (_ && _.isReactWarning) return !1;
212
+ }
213
+ return p.key !== void 0;
214
+ }
215
+ function a(p, _) {
216
+ function I() {
217
+ S || (S = !0, console.error(
218
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
219
+ _
220
+ ));
221
+ }
222
+ I.isReactWarning = !0, Object.defineProperty(p, "key", {
223
+ get: I,
224
+ configurable: !0
225
+ });
226
+ }
227
+ function c() {
228
+ var p = e(this.type);
229
+ return P[p] || (P[p] = !0, console.error(
230
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
231
+ )), p = this.props.ref, p !== void 0 ? p : null;
232
+ }
233
+ function s(p, _, I, N, le, Q) {
234
+ var L = I.ref;
235
+ return p = {
236
+ $$typeof: m,
237
+ type: p,
238
+ key: _,
239
+ props: I,
240
+ _owner: N
241
+ }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(p, "ref", {
242
+ enumerable: !1,
243
+ get: c
244
+ }) : Object.defineProperty(p, "ref", { enumerable: !1, value: null }), p._store = {}, Object.defineProperty(p._store, "validated", {
245
+ configurable: !1,
246
+ enumerable: !1,
247
+ writable: !0,
248
+ value: 0
249
+ }), Object.defineProperty(p, "_debugInfo", {
250
+ configurable: !1,
251
+ enumerable: !1,
252
+ writable: !0,
253
+ value: null
254
+ }), Object.defineProperty(p, "_debugStack", {
255
+ configurable: !1,
256
+ enumerable: !1,
257
+ writable: !0,
258
+ value: le
259
+ }), Object.defineProperty(p, "_debugTask", {
260
+ configurable: !1,
261
+ enumerable: !1,
262
+ writable: !0,
263
+ value: Q
264
+ }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
265
+ }
266
+ function h(p, _, I, N, le, Q) {
267
+ var L = _.children;
268
+ if (L !== void 0)
269
+ if (N)
270
+ if (k(L)) {
271
+ for (N = 0; N < L.length; N++)
272
+ d(L[N]);
273
+ Object.freeze && Object.freeze(L);
274
+ } else
275
+ console.error(
276
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
277
+ );
278
+ else d(L);
279
+ if (V.call(_, "key")) {
280
+ L = e(p);
281
+ var E = Object.keys(_).filter(function(se) {
282
+ return se !== "key";
283
+ });
284
+ N = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", te[L + N] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
285
+ `A props object containing a "key" prop is being spread into JSX:
286
+ let props = %s;
287
+ <%s {...props} />
288
+ React keys must be passed directly to JSX without using spread:
289
+ let props = %s;
290
+ <%s key={someKey} {...props} />`,
291
+ N,
292
+ L,
293
+ E,
294
+ L
295
+ ), te[L + N] = !0);
296
+ }
297
+ if (L = null, I !== void 0 && (n(I), L = "" + I), t(_) && (n(_.key), L = "" + _.key), "key" in _) {
298
+ I = {};
299
+ for (var W in _)
300
+ W !== "key" && (I[W] = _[W]);
301
+ } else I = _;
302
+ return L && a(
303
+ I,
304
+ typeof p == "function" ? p.displayName || p.name || "Unknown" : p
305
+ ), s(
306
+ p,
307
+ L,
308
+ I,
309
+ i(),
310
+ le,
311
+ Q
312
+ );
313
+ }
314
+ function d(p) {
315
+ u(p) ? p._store && (p._store.validated = 1) : typeof p == "object" && p !== null && p.$$typeof === H && (p._payload.status === "fulfilled" ? u(p._payload.value) && p._payload.value._store && (p._payload.value._store.validated = 1) : p._store && (p._store.validated = 1));
316
+ }
317
+ function u(p) {
318
+ return typeof p == "object" && p !== null && p.$$typeof === m;
319
+ }
320
+ var f = un, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), x = /* @__PURE__ */ Symbol.for("react.portal"), v = /* @__PURE__ */ Symbol.for("react.fragment"), A = /* @__PURE__ */ Symbol.for("react.strict_mode"), w = /* @__PURE__ */ Symbol.for("react.profiler"), X = /* @__PURE__ */ Symbol.for("react.consumer"), oe = /* @__PURE__ */ Symbol.for("react.context"), $ = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), j = /* @__PURE__ */ Symbol.for("react.suspense_list"), T = /* @__PURE__ */ Symbol.for("react.memo"), H = /* @__PURE__ */ Symbol.for("react.lazy"), M = /* @__PURE__ */ Symbol.for("react.activity"), O = /* @__PURE__ */ Symbol.for("react.client.reference"), R = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, k = Array.isArray, C = console.createTask ? console.createTask : function() {
321
+ return null;
322
+ };
323
+ f = {
324
+ react_stack_bottom_frame: function(p) {
325
+ return p();
326
+ }
327
+ };
328
+ var S, P = {}, Y = f.react_stack_bottom_frame.bind(
329
+ f,
330
+ l
331
+ )(), Z = C(o(l)), te = {};
332
+ ye.Fragment = v, ye.jsx = function(p, _, I) {
333
+ var N = 1e4 > R.recentlyCreatedOwnerStacks++;
334
+ return h(
335
+ p,
336
+ _,
337
+ I,
338
+ !1,
339
+ N ? Error("react-stack-top-frame") : Y,
340
+ N ? C(o(p)) : Z
341
+ );
342
+ }, ye.jsxs = function(p, _, I) {
343
+ var N = 1e4 > R.recentlyCreatedOwnerStacks++;
344
+ return h(
345
+ p,
346
+ _,
347
+ I,
348
+ !0,
349
+ N ? Error("react-stack-top-frame") : Y,
350
+ N ? C(o(p)) : Z
351
+ );
352
+ };
353
+ })()), ye;
354
+ }
355
+ var er;
356
+ function yn() {
357
+ return er || (er = 1, process.env.NODE_ENV === "production" ? Ee.exports = xn() : Ee.exports = gn()), Ee.exports;
358
+ }
359
+ var y = yn();
360
+ const vr = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', vn = {
361
+ blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
362
+ violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
363
+ cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
364
+ emerald: { top: "#10b981", side: "#059669", front: "#047857" },
365
+ amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
366
+ rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
367
+ slate: { top: "#475569", side: "#334155", front: "#1e293b" }
368
+ }, bn = {
369
+ blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
370
+ violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
371
+ cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
372
+ emerald: { top: "#6ee7b7", side: "#34d399", front: "#10b981" },
373
+ amber: { top: "#fcd34d", side: "#fbbf24", front: "#f59e0b" },
374
+ rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
375
+ slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
376
+ };
377
+ function Se(e, r, n) {
378
+ const o = (s) => {
379
+ const h = s.replace("#", "");
380
+ return {
381
+ r: parseInt(h.substring(0, 2), 16),
382
+ g: parseInt(h.substring(2, 4), 16),
383
+ b: parseInt(h.substring(4, 6), 16)
384
+ };
385
+ }, i = o(e), l = o(r), t = Math.round(i.r + (l.r - i.r) * n), a = Math.round(i.g + (l.g - i.g) * n), c = Math.round(i.b + (l.b - i.b) * n);
386
+ return `rgb(${t},${a},${c})`;
387
+ }
388
+ function An({ x: e, y: r, z: n, children: o, fontSize: i = 8, color: l = "#1e293b", shadow: t }) {
389
+ const a = b(e, r, n);
390
+ return /* @__PURE__ */ y.jsx("g", { transform: `translate(${a.screenX}, ${a.screenY})`, filter: t, children: /* @__PURE__ */ y.jsx("g", { transform: "matrix(0.866, -0.5, 0.866, 0.5, 0, 0)", children: /* @__PURE__ */ y.jsx(
391
+ "text",
392
+ {
393
+ x: 0,
394
+ y: 0,
395
+ textAnchor: "middle",
396
+ fill: l,
397
+ fontSize: i,
398
+ fontWeight: 600,
399
+ fontFamily: vr,
400
+ style: { textTransform: "uppercase", letterSpacing: "0.06em" },
401
+ children: o
402
+ }
403
+ ) }) });
404
+ }
405
+ function _n({ width: e, depth: r, elevation: n, color: o, opacity: i, borderColor: l, theme: t, isGround: a }) {
406
+ const s = me(e, r, a ? 8 : 2, 0, 0), h = b(0, 0, n);
407
+ return /* @__PURE__ */ y.jsxs("g", { transform: `translate(${h.screenX}, ${h.screenY})`, children: [
408
+ a && /* @__PURE__ */ y.jsx("g", { transform: "translate(4, 4)", opacity: 0.2, children: /* @__PURE__ */ y.jsx("path", { d: s.top, fill: "#000" }) }),
409
+ /* @__PURE__ */ y.jsx("path", { d: s.top, fill: o, opacity: i }),
410
+ a && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
411
+ /* @__PURE__ */ y.jsx("path", { d: s.left, fill: t === "dark" ? "#0f172a" : "#cbd5e1", opacity: 0.8 }),
412
+ /* @__PURE__ */ y.jsx("path", { d: s.right, fill: t === "dark" ? "#1e293b" : "#94a3b8", opacity: 0.8 })
413
+ ] }),
414
+ /* @__PURE__ */ y.jsx(
415
+ "path",
416
+ {
417
+ d: s.top,
418
+ fill: "none",
419
+ stroke: l || (t === "dark" ? "#475569" : "#94a3b8"),
420
+ strokeWidth: a ? 1.5 : 0.75,
421
+ opacity: a ? 1 : 0.6
422
+ }
423
+ )
424
+ ] });
425
+ }
426
+ function Jo({ config: e, options: r = {}, className: n, style: o, onNodeClick: i, onLayerClick: l }) {
427
+ const { interactive: t = !0, animate: a = !0, showLabels: c = !0, expandOnHover: s = !0 } = r, { theme: h, canvas: d, origin: u, tiers: f, floorSize: m, nodes: x, cornerRadius: v = 0 } = e, A = h === "dark" ? vn : bn, w = h === "dark" ? "#0f172a" : "#fafafa", X = h === "dark" ? "#e2e8f0" : "#1e293b", oe = h === "dark" ? "#64748b" : "#94a3b8", [$, F] = we(/* @__PURE__ */ new Set());
428
+ pn(() => {
429
+ a ? (F(/* @__PURE__ */ new Set()), f.forEach((k, C) => {
430
+ setTimeout(() => {
431
+ F((S) => /* @__PURE__ */ new Set([...S, C]));
432
+ }, C * 150 + 100);
433
+ })) : F(new Set(f.map((k, C) => C)));
434
+ }, [e.id, a, f.length]);
435
+ const [j, T] = we(null), [H, M] = we(null), [O, R] = we(null), V = [...x].sort((k, C) => {
436
+ const S = f[k.tier]?.elevation || 0, P = f[C.tier]?.elevation || 0;
437
+ if (S !== P) return S - P;
438
+ const Y = k.x + k.width + (k.y + k.depth);
439
+ return C.x + C.width + (C.y + C.depth) - Y;
440
+ });
441
+ return /* @__PURE__ */ y.jsx("div", { className: n, style: { display: "inline-block", ...o }, children: /* @__PURE__ */ y.jsxs(
442
+ "svg",
443
+ {
444
+ width: d.width,
445
+ height: d.height,
446
+ style: { backgroundColor: w },
447
+ onClick: () => {
448
+ t && (R(null), M(null));
449
+ },
450
+ children: [
451
+ /* @__PURE__ */ y.jsxs("defs", { children: [
452
+ /* @__PURE__ */ y.jsx("pattern", { id: `grid-${e.id}`, width: "24", height: "24", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ y.jsx("circle", { cx: "12", cy: "12", r: "0.5", fill: h === "dark" ? "#1e293b" : "#e2e8f0" }) }),
453
+ /* @__PURE__ */ y.jsx("filter", { id: `glow-${e.id}`, x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ y.jsx(
454
+ "feDropShadow",
455
+ {
456
+ dx: "0",
457
+ dy: "4",
458
+ stdDeviation: "8",
459
+ floodColor: h === "dark" ? "#60a5fa" : "#3b82f6",
460
+ floodOpacity: "0.3"
461
+ }
462
+ ) }),
463
+ /* @__PURE__ */ y.jsxs("radialGradient", { id: `bg-${e.id}`, cx: "48%", cy: "34%", r: "82%", children: [
464
+ /* @__PURE__ */ y.jsx("stop", { offset: "0%", stopColor: h === "dark" ? "#16203a" : "#ffffff" }),
465
+ /* @__PURE__ */ y.jsx("stop", { offset: "55%", stopColor: h === "dark" ? "#0e1526" : "#f2f5f9" }),
466
+ /* @__PURE__ */ y.jsx("stop", { offset: "100%", stopColor: h === "dark" ? "#080d18" : "#e7ecf2" })
467
+ ] }),
468
+ /* @__PURE__ */ y.jsx("filter", { id: `contact-${e.id}`, x: "-60%", y: "-60%", width: "220%", height: "220%", children: /* @__PURE__ */ y.jsx("feGaussianBlur", { stdDeviation: "5" }) }),
469
+ /* @__PURE__ */ y.jsxs("linearGradient", { id: `sheen-${e.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
470
+ /* @__PURE__ */ y.jsx("stop", { offset: "0%", stopColor: "#ffffff", stopOpacity: "0.18" }),
471
+ /* @__PURE__ */ y.jsx("stop", { offset: "55%", stopColor: "#ffffff", stopOpacity: "0.04" }),
472
+ /* @__PURE__ */ y.jsx("stop", { offset: "100%", stopColor: "#ffffff", stopOpacity: "0" })
473
+ ] }),
474
+ /* @__PURE__ */ y.jsxs("linearGradient", { id: `shade-${e.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
475
+ /* @__PURE__ */ y.jsx("stop", { offset: "0%", stopColor: "#000000", stopOpacity: "0" }),
476
+ /* @__PURE__ */ y.jsx("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0.24" })
477
+ ] }),
478
+ /* @__PURE__ */ y.jsx("filter", { id: `label-${e.id}`, x: "-40%", y: "-40%", width: "180%", height: "180%", children: /* @__PURE__ */ y.jsx("feDropShadow", { dx: "0", dy: "0.5", stdDeviation: "0.7", floodColor: "#000000", floodOpacity: "0.7" }) })
479
+ ] }),
480
+ /* @__PURE__ */ y.jsx("rect", { width: "100%", height: "100%", fill: `url(#bg-${e.id})` }),
481
+ /* @__PURE__ */ y.jsx("rect", { width: "100%", height: "100%", fill: `url(#grid-${e.id})`, opacity: "0.5" }),
482
+ /* @__PURE__ */ y.jsx("g", { transform: `translate(${u.x}, ${u.y})`, children: f.map((k, C) => {
483
+ const S = V.filter((E) => E.tier === C), P = $.has(C), Y = t && (H === C || H === null && O === null && j === C), Z = t && (H !== null || j !== null || O !== null), te = O?.tier === C, p = Z && !Y && !te, _ = P ? 0 : 60, I = P ? 1 : 0, N = Y && s ? { x: 10, y: -34 } : { x: 0, y: 0 }, le = Y ? 1.03 : 1, Q = b(m.width / 2, m.depth / 2, k.elevation), L = k.offset || { x: 0, y: 0 };
484
+ return /* @__PURE__ */ y.jsxs(
485
+ "g",
486
+ {
487
+ "data-tier": C,
488
+ onMouseEnter: () => t && T(C),
489
+ onMouseLeave: () => t && T(null),
490
+ onClick: (E) => {
491
+ t && (E.stopPropagation(), R(null), M((W) => W === C ? null : C), l?.(C));
492
+ },
493
+ style: {
494
+ transform: `translate(${L.x + N.x}px, ${L.y + N.y}px) translate(${Q.screenX}px, ${Q.screenY + _}px) scale(${le}) translate(${-Q.screenX}px, ${-Q.screenY}px)`,
495
+ transition: "transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",
496
+ opacity: I * (p ? 0.35 : 1),
497
+ filter: Y ? `url(#glow-${e.id})` : "none",
498
+ cursor: t ? "pointer" : "default"
499
+ },
500
+ children: [
501
+ /* @__PURE__ */ y.jsx(
502
+ _n,
503
+ {
504
+ width: m.width,
505
+ depth: m.depth,
506
+ elevation: C === 0 ? -2 : k.elevation,
507
+ color: k.floorColor || (h === "dark" ? "#0f172a" : "#f8fafc"),
508
+ opacity: k.floorOpacity || (C === 0 ? 0.95 : 0.5),
509
+ borderColor: k.borderColor,
510
+ theme: h,
511
+ isGround: C === 0
512
+ }
513
+ ),
514
+ S.map((E, W) => {
515
+ const se = k.elevation + 5, ze = b(E.x, E.y, se), J = me(E.width, E.depth, E.height, ze.screenX, ze.screenY, v), ee = A[E.color] || A.slate, Le = O?.tier === C && O?.index === W, fn = t && O !== null && !Le, Ve = b(E.x - 3, E.y - 3, k.elevation), sn = me(E.width + 6, E.depth + 6, 0, Ve.screenX, Ve.screenY, v).top;
516
+ return /* @__PURE__ */ y.jsxs(
517
+ "g",
518
+ {
519
+ "data-node": `${C}-${W}`,
520
+ opacity: (E.opacity ?? 1) * (fn ? 0.3 : 1),
521
+ onClick: t ? (z) => {
522
+ if (z.stopPropagation(), M(null), R((re) => re && re.tier === C && re.index === W ? null : { tier: C, index: W }), i?.(E, { tier: C, index: W }), E.link)
523
+ try {
524
+ window.open(E.link, "_blank");
525
+ } catch {
526
+ }
527
+ } : void 0,
528
+ style: { cursor: t ? "pointer" : "default", transition: "opacity 0.3s ease-out" },
529
+ children: [
530
+ /* @__PURE__ */ y.jsx("path", { d: sn, fill: "#000000", opacity: 0.3, filter: `url(#contact-${e.id})` }),
531
+ J.cornerBackRight?.map((z, re) => /* @__PURE__ */ y.jsx(
532
+ "path",
533
+ {
534
+ d: z.path,
535
+ fill: Se(ee.front, ee.side, z.intensity)
536
+ },
537
+ `cbr-${re}`
538
+ )),
539
+ J.cornerBackLeft?.map((z, re) => /* @__PURE__ */ y.jsx(
540
+ "path",
541
+ {
542
+ d: z.path,
543
+ fill: Se(ee.side, ee.front, z.intensity)
544
+ },
545
+ `cbl-${re}`
546
+ )),
547
+ /* @__PURE__ */ y.jsx("path", { d: J.left, fill: ee.side }),
548
+ /* @__PURE__ */ y.jsx("path", { d: J.left, fill: `url(#shade-${e.id})` }),
549
+ /* @__PURE__ */ y.jsx("path", { d: J.right, fill: ee.front }),
550
+ /* @__PURE__ */ y.jsx("path", { d: J.right, fill: `url(#shade-${e.id})` }),
551
+ J.cornerFrontRight?.map((z, re) => /* @__PURE__ */ y.jsx(
552
+ "path",
553
+ {
554
+ d: z.path,
555
+ fill: Se(ee.front, ee.side, z.intensity)
556
+ },
557
+ `cfr-${re}`
558
+ )),
559
+ J.cornerFrontLeft?.map((z, re) => /* @__PURE__ */ y.jsx(
560
+ "path",
561
+ {
562
+ d: z.path,
563
+ fill: Se(ee.front, ee.side, z.intensity)
564
+ },
565
+ `cfl-${re}`
566
+ )),
567
+ /* @__PURE__ */ y.jsx("path", { d: J.top, fill: ee.top }),
568
+ /* @__PURE__ */ y.jsx("path", { d: J.top, fill: `url(#sheen-${e.id})` }),
569
+ /* @__PURE__ */ y.jsx(
570
+ "path",
571
+ {
572
+ d: J.top,
573
+ fill: "none",
574
+ stroke: Le ? "#ffffff" : "rgba(255,255,255,0.28)",
575
+ strokeWidth: Le ? 1.4 : 0.75,
576
+ strokeLinejoin: "round"
577
+ }
578
+ ),
579
+ c && E.label && /* @__PURE__ */ y.jsx(
580
+ An,
581
+ {
582
+ x: E.x + E.width / 2,
583
+ y: E.y + E.depth / 2,
584
+ z: se + E.height + 2,
585
+ fontSize: E.width > 70 ? 9 : 8,
586
+ color: X,
587
+ shadow: `url(#label-${e.id})`,
588
+ children: E.label
589
+ }
590
+ )
591
+ ]
592
+ },
593
+ W
594
+ );
595
+ }),
596
+ c && /* @__PURE__ */ y.jsx(
597
+ "text",
598
+ {
599
+ x: b(-25, m.depth / 2, k.elevation + 15).screenX - 35,
600
+ y: b(-25, m.depth / 2, k.elevation + 15).screenY,
601
+ fill: oe,
602
+ fontSize: 9,
603
+ fontWeight: 500,
604
+ fontFamily: vr,
605
+ opacity: 0.6,
606
+ style: { letterSpacing: "0.05em" },
607
+ children: k.name
608
+ }
609
+ )
610
+ ]
611
+ },
612
+ C
613
+ );
614
+ }) })
615
+ ]
616
+ }
617
+ ) });
618
+ }
619
+ const rr = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Cn = {
620
+ blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
621
+ violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
622
+ cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
623
+ emerald: { top: "#10b981", side: "#059669", front: "#047857" },
624
+ amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
625
+ rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
626
+ slate: { top: "#475569", side: "#334155", front: "#1e293b" }
627
+ }, wn = {
628
+ blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
629
+ violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
630
+ cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
631
+ emerald: { top: "#6ee7b7", side: "#34d399", front: "#10b981" },
632
+ amber: { top: "#fcd34d", side: "#fbbf24", front: "#f59e0b" },
633
+ rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
634
+ slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
635
+ };
636
+ function Te(e, r, n) {
637
+ const o = (s) => {
638
+ const h = s.replace("#", "");
639
+ return {
640
+ r: parseInt(h.substring(0, 2), 16),
641
+ g: parseInt(h.substring(2, 4), 16),
642
+ b: parseInt(h.substring(4, 6), 16)
643
+ };
644
+ }, i = o(e), l = o(r), t = Math.round(i.r + (l.r - i.r) * n), a = Math.round(i.g + (l.g - i.g) * n), c = Math.round(i.b + (l.b - i.b) * n);
645
+ return `rgb(${t},${a},${c})`;
646
+ }
647
+ function En(e) {
648
+ const { theme: r, canvas: n, origin: o, tiers: i, floorSize: l, nodes: t, cornerRadius: a = 0 } = e, c = r === "dark" ? Cn : wn, s = r === "dark" ? "#0f172a" : "#fafafa", h = r === "dark" ? "#e2e8f0" : "#1e293b", d = r === "dark" ? "#64748b" : "#94a3b8", u = [...t].sort((m, x) => {
649
+ const v = i[m.tier]?.elevation || 0, A = i[x.tier]?.elevation || 0;
650
+ return v !== A ? v - A : x.x + x.width + (x.y + x.depth) - (m.x + m.width + (m.y + m.depth));
651
+ });
652
+ let f = `<svg xmlns="http://www.w3.org/2000/svg" width="${n.width}" height="${n.height}" style="background:${s}">`;
653
+ f += `<defs>
654
+ <pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
655
+ <circle cx="12" cy="12" r="0.5" fill="${r === "dark" ? "#1e293b" : "#e2e8f0"}"/>
656
+ </pattern>
657
+ <radialGradient id="bg" cx="48%" cy="34%" r="82%">
658
+ <stop offset="0%" stop-color="${r === "dark" ? "#16203a" : "#ffffff"}"/>
659
+ <stop offset="55%" stop-color="${r === "dark" ? "#0e1526" : "#f2f5f9"}"/>
660
+ <stop offset="100%" stop-color="${r === "dark" ? "#080d18" : "#e7ecf2"}"/>
661
+ </radialGradient>
662
+ <filter id="contact" x="-60%" y="-60%" width="220%" height="220%"><feGaussianBlur stdDeviation="5"/></filter>
663
+ <linearGradient id="sheen" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.18"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.04"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></linearGradient>
664
+ <linearGradient id="shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000000" stop-opacity="0"/><stop offset="100%" stop-color="#000000" stop-opacity="0.24"/></linearGradient>
665
+ <filter id="labelshadow" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="0" dy="0.5" stdDeviation="0.7" flood-color="#000000" flood-opacity="0.7"/></filter>
666
+ </defs>`, f += '<rect width="100%" height="100%" fill="url(#bg)"/>', f += '<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>', f += `<g transform="translate(${o.x},${o.y})">`;
667
+ for (let m = 0; m < i.length; m++) {
668
+ const x = i[m], v = u.filter((T) => T.tier === m), A = x.offset || { x: 0, y: 0 };
669
+ f += `<g transform="translate(${A.x},${A.y})">`;
670
+ const w = m === 0 ? 8 : 2, X = me(l.width, l.depth, w, 0, 0), oe = b(0, 0, m === 0 ? -2 : x.elevation), $ = x.floorColor || (r === "dark" ? "#0f172a" : "#f8fafc"), F = x.floorOpacity || (m === 0 ? 0.95 : 0.5);
671
+ f += `<g transform="translate(${oe.screenX},${oe.screenY})">`, m === 0 && (f += `<g transform="translate(4,4)" opacity="0.2"><path d="${X.top}" fill="#000"/></g>`), f += `<path d="${X.top}" fill="${$}" opacity="${F}"/>`, m === 0 && (f += `<path d="${X.left}" fill="${r === "dark" ? "#0f172a" : "#cbd5e1"}" opacity="0.8"/>`, f += `<path d="${X.right}" fill="${r === "dark" ? "#1e293b" : "#94a3b8"}" opacity="0.8"/>`), f += `<path d="${X.top}" fill="none" stroke="${x.borderColor || (r === "dark" ? "#475569" : "#94a3b8")}" stroke-width="${m === 0 ? 1.5 : 0.75}" opacity="${m === 0 ? 1 : 0.6}"/>`, f += "</g>";
672
+ for (const T of v) {
673
+ const H = x.elevation + 5, M = b(T.x, T.y, H), O = me(T.width, T.depth, T.height, M.screenX, M.screenY, a), R = c[T.color] || c.slate, V = T.opacity ?? 1;
674
+ f += `<g opacity="${V}">`;
675
+ const k = b(T.x - 3, T.y - 3, x.elevation), C = me(T.width + 6, T.depth + 6, 0, k.screenX, k.screenY, a).top;
676
+ if (f += `<path d="${C}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`, O.cornerBackRight)
677
+ for (const S of O.cornerBackRight)
678
+ f += `<path d="${S.path}" fill="${Te(R.front, R.side, S.intensity)}"/>`;
679
+ if (O.cornerBackLeft)
680
+ for (const S of O.cornerBackLeft)
681
+ f += `<path d="${S.path}" fill="${Te(R.side, R.front, S.intensity)}"/>`;
682
+ if (f += `<path d="${O.left}" fill="${R.side}"/>`, f += `<path d="${O.left}" fill="url(#shade)"/>`, f += `<path d="${O.right}" fill="${R.front}"/>`, f += `<path d="${O.right}" fill="url(#shade)"/>`, O.cornerFrontRight)
683
+ for (const S of O.cornerFrontRight)
684
+ f += `<path d="${S.path}" fill="${Te(R.front, R.side, S.intensity)}"/>`;
685
+ if (O.cornerFrontLeft)
686
+ for (const S of O.cornerFrontLeft)
687
+ f += `<path d="${S.path}" fill="${Te(R.front, R.side, S.intensity)}"/>`;
688
+ if (f += `<path d="${O.top}" fill="${R.top}"/>`, f += `<path d="${O.top}" fill="url(#sheen)"/>`, f += `<path d="${O.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`, T.label) {
689
+ const S = b(T.x + T.width / 2, T.y + T.depth / 2, H + T.height + 2), P = T.width > 70 ? 9 : 8;
690
+ f += `<g transform="translate(${S.screenX},${S.screenY})" filter="url(#labelshadow)">`, f += '<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">', f += `<text x="0" y="0" text-anchor="middle" fill="${h}" font-size="${P}" font-weight="600" font-family='${rr}' style="text-transform:uppercase;letter-spacing:0.06em">${T.label}</text>`, f += "</g></g>";
691
+ }
692
+ f += "</g>";
693
+ }
694
+ const j = b(-25, l.depth / 2, x.elevation + 15);
695
+ f += `<text x="${j.screenX - 35}" y="${j.screenY}" fill="${d}" font-size="9" font-weight="500" font-family='${rr}' opacity="0.6" style="letter-spacing:0.05em">${x.name}</text>`, f += "</g>";
696
+ }
697
+ return f += "</g></svg>", f;
698
+ }
699
+ function et(e, r) {
700
+ e.innerHTML = En(r);
701
+ }
702
+ function br(e) {
703
+ return typeof e > "u" || e === null;
704
+ }
705
+ function Sn(e) {
706
+ return typeof e == "object" && e !== null;
707
+ }
708
+ function Tn(e) {
709
+ return Array.isArray(e) ? e : br(e) ? [] : [e];
710
+ }
711
+ function kn(e, r) {
712
+ var n, o, i, l;
713
+ if (r)
714
+ for (l = Object.keys(r), n = 0, o = l.length; n < o; n += 1)
715
+ i = l[n], e[i] = r[i];
716
+ return e;
717
+ }
718
+ function On(e, r) {
719
+ var n = "", o;
720
+ for (o = 0; o < r; o += 1)
721
+ n += e;
722
+ return n;
723
+ }
724
+ function $n(e) {
725
+ return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
726
+ }
727
+ var Fn = br, Rn = Sn, In = Tn, Ln = On, Nn = $n, jn = kn, B = {
728
+ isNothing: Fn,
729
+ isObject: Rn,
730
+ toArray: In,
731
+ repeat: Ln,
732
+ isNegativeZero: Nn,
733
+ extend: jn
734
+ };
735
+ function Ar(e, r) {
736
+ var n = "", o = e.reason || "(unknown reason)";
737
+ return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !r && e.mark.snippet && (n += `
738
+
739
+ ` + e.mark.snippet), o + " " + n) : o;
740
+ }
741
+ function be(e, r) {
742
+ Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = r, this.message = Ar(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
743
+ }
744
+ be.prototype = Object.create(Error.prototype);
745
+ be.prototype.constructor = be;
746
+ be.prototype.toString = function(r) {
747
+ return this.name + ": " + Ar(this, r);
748
+ };
749
+ var q = be;
750
+ function Ne(e, r, n, o, i) {
751
+ var l = "", t = "", a = Math.floor(i / 2) - 1;
752
+ return o - r > a && (l = " ... ", r = o - a + l.length), n - o > a && (t = " ...", n = o + a - t.length), {
753
+ str: l + e.slice(r, n).replace(/\t/g, "→") + t,
754
+ pos: o - r + l.length
755
+ // relative position
756
+ };
757
+ }
758
+ function je(e, r) {
759
+ return B.repeat(" ", r - e.length) + e;
760
+ }
761
+ function Mn(e, r) {
762
+ if (r = Object.create(r || null), !e.buffer) return null;
763
+ r.maxLength || (r.maxLength = 79), typeof r.indent != "number" && (r.indent = 1), typeof r.linesBefore != "number" && (r.linesBefore = 3), typeof r.linesAfter != "number" && (r.linesAfter = 2);
764
+ for (var n = /\r?\n|\r|\0/g, o = [0], i = [], l, t = -1; l = n.exec(e.buffer); )
765
+ i.push(l.index), o.push(l.index + l[0].length), e.position <= l.index && t < 0 && (t = o.length - 2);
766
+ t < 0 && (t = o.length - 1);
767
+ var a = "", c, s, h = Math.min(e.line + r.linesAfter, i.length).toString().length, d = r.maxLength - (r.indent + h + 3);
768
+ for (c = 1; c <= r.linesBefore && !(t - c < 0); c++)
769
+ s = Ne(
770
+ e.buffer,
771
+ o[t - c],
772
+ i[t - c],
773
+ e.position - (o[t] - o[t - c]),
774
+ d
775
+ ), a = B.repeat(" ", r.indent) + je((e.line - c + 1).toString(), h) + " | " + s.str + `
776
+ ` + a;
777
+ for (s = Ne(e.buffer, o[t], i[t], e.position, d), a += B.repeat(" ", r.indent) + je((e.line + 1).toString(), h) + " | " + s.str + `
778
+ `, a += B.repeat("-", r.indent + h + 3 + s.pos) + `^
779
+ `, c = 1; c <= r.linesAfter && !(t + c >= i.length); c++)
780
+ s = Ne(
781
+ e.buffer,
782
+ o[t + c],
783
+ i[t + c],
784
+ e.position - (o[t] - o[t + c]),
785
+ d
786
+ ), a += B.repeat(" ", r.indent) + je((e.line + c + 1).toString(), h) + " | " + s.str + `
787
+ `;
788
+ return a.replace(/\n$/, "");
789
+ }
790
+ var Pn = Mn, Dn = [
791
+ "kind",
792
+ "multi",
793
+ "resolve",
794
+ "construct",
795
+ "instanceOf",
796
+ "predicate",
797
+ "represent",
798
+ "representName",
799
+ "defaultStyle",
800
+ "styleAliases"
801
+ ], Yn = [
802
+ "scalar",
803
+ "sequence",
804
+ "mapping"
805
+ ];
806
+ function Bn(e) {
807
+ var r = {};
808
+ return e !== null && Object.keys(e).forEach(function(n) {
809
+ e[n].forEach(function(o) {
810
+ r[String(o)] = n;
811
+ });
812
+ }), r;
813
+ }
814
+ function Hn(e, r) {
815
+ if (r = r || {}, Object.keys(r).forEach(function(n) {
816
+ if (Dn.indexOf(n) === -1)
817
+ throw new q('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
818
+ }), this.options = r, this.tag = e, this.kind = r.kind || null, this.resolve = r.resolve || function() {
819
+ return !0;
820
+ }, this.construct = r.construct || function(n) {
821
+ return n;
822
+ }, this.instanceOf = r.instanceOf || null, this.predicate = r.predicate || null, this.represent = r.represent || null, this.representName = r.representName || null, this.defaultStyle = r.defaultStyle || null, this.multi = r.multi || !1, this.styleAliases = Bn(r.styleAliases || null), Yn.indexOf(this.kind) === -1)
823
+ throw new q('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
824
+ }
825
+ var U = Hn;
826
+ function nr(e, r) {
827
+ var n = [];
828
+ return e[r].forEach(function(o) {
829
+ var i = n.length;
830
+ n.forEach(function(l, t) {
831
+ l.tag === o.tag && l.kind === o.kind && l.multi === o.multi && (i = t);
832
+ }), n[i] = o;
833
+ }), n;
834
+ }
835
+ function Un() {
836
+ var e = {
837
+ scalar: {},
838
+ sequence: {},
839
+ mapping: {},
840
+ fallback: {},
841
+ multi: {
842
+ scalar: [],
843
+ sequence: [],
844
+ mapping: [],
845
+ fallback: []
846
+ }
847
+ }, r, n;
848
+ function o(i) {
849
+ i.multi ? (e.multi[i.kind].push(i), e.multi.fallback.push(i)) : e[i.kind][i.tag] = e.fallback[i.tag] = i;
850
+ }
851
+ for (r = 0, n = arguments.length; r < n; r += 1)
852
+ arguments[r].forEach(o);
853
+ return e;
854
+ }
855
+ function Pe(e) {
856
+ return this.extend(e);
857
+ }
858
+ Pe.prototype.extend = function(r) {
859
+ var n = [], o = [];
860
+ if (r instanceof U)
861
+ o.push(r);
862
+ else if (Array.isArray(r))
863
+ o = o.concat(r);
864
+ else if (r && (Array.isArray(r.implicit) || Array.isArray(r.explicit)))
865
+ r.implicit && (n = n.concat(r.implicit)), r.explicit && (o = o.concat(r.explicit));
866
+ else
867
+ throw new q("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
868
+ n.forEach(function(l) {
869
+ if (!(l instanceof U))
870
+ throw new q("Specified list of YAML types (or a single Type object) contains a non-Type object.");
871
+ if (l.loadKind && l.loadKind !== "scalar")
872
+ throw new q("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
873
+ if (l.multi)
874
+ throw new q("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
875
+ }), o.forEach(function(l) {
876
+ if (!(l instanceof U))
877
+ throw new q("Specified list of YAML types (or a single Type object) contains a non-Type object.");
878
+ });
879
+ var i = Object.create(Pe.prototype);
880
+ return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(o), i.compiledImplicit = nr(i, "implicit"), i.compiledExplicit = nr(i, "explicit"), i.compiledTypeMap = Un(i.compiledImplicit, i.compiledExplicit), i;
881
+ };
882
+ var _r = Pe, Cr = new U("tag:yaml.org,2002:str", {
883
+ kind: "scalar",
884
+ construct: function(e) {
885
+ return e !== null ? e : "";
886
+ }
887
+ }), wr = new U("tag:yaml.org,2002:seq", {
888
+ kind: "sequence",
889
+ construct: function(e) {
890
+ return e !== null ? e : [];
891
+ }
892
+ }), Er = new U("tag:yaml.org,2002:map", {
893
+ kind: "mapping",
894
+ construct: function(e) {
895
+ return e !== null ? e : {};
896
+ }
897
+ }), Sr = new _r({
898
+ explicit: [
899
+ Cr,
900
+ wr,
901
+ Er
902
+ ]
903
+ });
904
+ function Gn(e) {
905
+ if (e === null) return !0;
906
+ var r = e.length;
907
+ return r === 1 && e === "~" || r === 4 && (e === "null" || e === "Null" || e === "NULL");
908
+ }
909
+ function Wn() {
910
+ return null;
911
+ }
912
+ function qn(e) {
913
+ return e === null;
914
+ }
915
+ var Tr = new U("tag:yaml.org,2002:null", {
916
+ kind: "scalar",
917
+ resolve: Gn,
918
+ construct: Wn,
919
+ predicate: qn,
920
+ represent: {
921
+ canonical: function() {
922
+ return "~";
923
+ },
924
+ lowercase: function() {
925
+ return "null";
926
+ },
927
+ uppercase: function() {
928
+ return "NULL";
929
+ },
930
+ camelcase: function() {
931
+ return "Null";
932
+ },
933
+ empty: function() {
934
+ return "";
935
+ }
936
+ },
937
+ defaultStyle: "lowercase"
938
+ });
939
+ function Kn(e) {
940
+ if (e === null) return !1;
941
+ var r = e.length;
942
+ return r === 4 && (e === "true" || e === "True" || e === "TRUE") || r === 5 && (e === "false" || e === "False" || e === "FALSE");
943
+ }
944
+ function Xn(e) {
945
+ return e === "true" || e === "True" || e === "TRUE";
946
+ }
947
+ function zn(e) {
948
+ return Object.prototype.toString.call(e) === "[object Boolean]";
949
+ }
950
+ var kr = new U("tag:yaml.org,2002:bool", {
951
+ kind: "scalar",
952
+ resolve: Kn,
953
+ construct: Xn,
954
+ predicate: zn,
955
+ represent: {
956
+ lowercase: function(e) {
957
+ return e ? "true" : "false";
958
+ },
959
+ uppercase: function(e) {
960
+ return e ? "TRUE" : "FALSE";
961
+ },
962
+ camelcase: function(e) {
963
+ return e ? "True" : "False";
964
+ }
965
+ },
966
+ defaultStyle: "lowercase"
967
+ });
968
+ function Vn(e) {
969
+ return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
970
+ }
971
+ function Zn(e) {
972
+ return 48 <= e && e <= 55;
973
+ }
974
+ function Qn(e) {
975
+ return 48 <= e && e <= 57;
976
+ }
977
+ function Jn(e) {
978
+ if (e === null) return !1;
979
+ var r = e.length, n = 0, o = !1, i;
980
+ if (!r) return !1;
981
+ if (i = e[n], (i === "-" || i === "+") && (i = e[++n]), i === "0") {
982
+ if (n + 1 === r) return !0;
983
+ if (i = e[++n], i === "b") {
984
+ for (n++; n < r; n++)
985
+ if (i = e[n], i !== "_") {
986
+ if (i !== "0" && i !== "1") return !1;
987
+ o = !0;
988
+ }
989
+ return o && i !== "_";
990
+ }
991
+ if (i === "x") {
992
+ for (n++; n < r; n++)
993
+ if (i = e[n], i !== "_") {
994
+ if (!Vn(e.charCodeAt(n))) return !1;
995
+ o = !0;
996
+ }
997
+ return o && i !== "_";
998
+ }
999
+ if (i === "o") {
1000
+ for (n++; n < r; n++)
1001
+ if (i = e[n], i !== "_") {
1002
+ if (!Zn(e.charCodeAt(n))) return !1;
1003
+ o = !0;
1004
+ }
1005
+ return o && i !== "_";
1006
+ }
1007
+ }
1008
+ if (i === "_") return !1;
1009
+ for (; n < r; n++)
1010
+ if (i = e[n], i !== "_") {
1011
+ if (!Qn(e.charCodeAt(n)))
1012
+ return !1;
1013
+ o = !0;
1014
+ }
1015
+ return !(!o || i === "_");
1016
+ }
1017
+ function ei(e) {
1018
+ var r = e, n = 1, o;
1019
+ if (r.indexOf("_") !== -1 && (r = r.replace(/_/g, "")), o = r[0], (o === "-" || o === "+") && (o === "-" && (n = -1), r = r.slice(1), o = r[0]), r === "0") return 0;
1020
+ if (o === "0") {
1021
+ if (r[1] === "b") return n * parseInt(r.slice(2), 2);
1022
+ if (r[1] === "x") return n * parseInt(r.slice(2), 16);
1023
+ if (r[1] === "o") return n * parseInt(r.slice(2), 8);
1024
+ }
1025
+ return n * parseInt(r, 10);
1026
+ }
1027
+ function ri(e) {
1028
+ return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !B.isNegativeZero(e);
1029
+ }
1030
+ var Or = new U("tag:yaml.org,2002:int", {
1031
+ kind: "scalar",
1032
+ resolve: Jn,
1033
+ construct: ei,
1034
+ predicate: ri,
1035
+ represent: {
1036
+ binary: function(e) {
1037
+ return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
1038
+ },
1039
+ octal: function(e) {
1040
+ return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1);
1041
+ },
1042
+ decimal: function(e) {
1043
+ return e.toString(10);
1044
+ },
1045
+ /* eslint-disable max-len */
1046
+ hexadecimal: function(e) {
1047
+ return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1);
1048
+ }
1049
+ },
1050
+ defaultStyle: "decimal",
1051
+ styleAliases: {
1052
+ binary: [2, "bin"],
1053
+ octal: [8, "oct"],
1054
+ decimal: [10, "dec"],
1055
+ hexadecimal: [16, "hex"]
1056
+ }
1057
+ }), ni = new RegExp(
1058
+ // 2.5e4, 2.5 and integers
1059
+ "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
1060
+ );
1061
+ function ii(e) {
1062
+ return !(e === null || !ni.test(e) || // Quick hack to not allow integers end with `_`
1063
+ // Probably should update regexp & check speed
1064
+ e[e.length - 1] === "_");
1065
+ }
1066
+ function oi(e) {
1067
+ var r, n;
1068
+ return r = e.replace(/_/g, "").toLowerCase(), n = r[0] === "-" ? -1 : 1, "+-".indexOf(r[0]) >= 0 && (r = r.slice(1)), r === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : r === ".nan" ? NaN : n * parseFloat(r, 10);
1069
+ }
1070
+ var ti = /^[-+]?[0-9]+e/;
1071
+ function li(e, r) {
1072
+ var n;
1073
+ if (isNaN(e))
1074
+ switch (r) {
1075
+ case "lowercase":
1076
+ return ".nan";
1077
+ case "uppercase":
1078
+ return ".NAN";
1079
+ case "camelcase":
1080
+ return ".NaN";
1081
+ }
1082
+ else if (Number.POSITIVE_INFINITY === e)
1083
+ switch (r) {
1084
+ case "lowercase":
1085
+ return ".inf";
1086
+ case "uppercase":
1087
+ return ".INF";
1088
+ case "camelcase":
1089
+ return ".Inf";
1090
+ }
1091
+ else if (Number.NEGATIVE_INFINITY === e)
1092
+ switch (r) {
1093
+ case "lowercase":
1094
+ return "-.inf";
1095
+ case "uppercase":
1096
+ return "-.INF";
1097
+ case "camelcase":
1098
+ return "-.Inf";
1099
+ }
1100
+ else if (B.isNegativeZero(e))
1101
+ return "-0.0";
1102
+ return n = e.toString(10), ti.test(n) ? n.replace("e", ".e") : n;
1103
+ }
1104
+ function ai(e) {
1105
+ return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || B.isNegativeZero(e));
1106
+ }
1107
+ var $r = new U("tag:yaml.org,2002:float", {
1108
+ kind: "scalar",
1109
+ resolve: ii,
1110
+ construct: oi,
1111
+ predicate: ai,
1112
+ represent: li,
1113
+ defaultStyle: "lowercase"
1114
+ }), Fr = Sr.extend({
1115
+ implicit: [
1116
+ Tr,
1117
+ kr,
1118
+ Or,
1119
+ $r
1120
+ ]
1121
+ }), Rr = Fr, Ir = new RegExp(
1122
+ "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
1123
+ ), Lr = new RegExp(
1124
+ "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
1125
+ );
1126
+ function ci(e) {
1127
+ return e === null ? !1 : Ir.exec(e) !== null || Lr.exec(e) !== null;
1128
+ }
1129
+ function fi(e) {
1130
+ var r, n, o, i, l, t, a, c = 0, s = null, h, d, u;
1131
+ if (r = Ir.exec(e), r === null && (r = Lr.exec(e)), r === null) throw new Error("Date resolve error");
1132
+ if (n = +r[1], o = +r[2] - 1, i = +r[3], !r[4])
1133
+ return new Date(Date.UTC(n, o, i));
1134
+ if (l = +r[4], t = +r[5], a = +r[6], r[7]) {
1135
+ for (c = r[7].slice(0, 3); c.length < 3; )
1136
+ c += "0";
1137
+ c = +c;
1138
+ }
1139
+ return r[9] && (h = +r[10], d = +(r[11] || 0), s = (h * 60 + d) * 6e4, r[9] === "-" && (s = -s)), u = new Date(Date.UTC(n, o, i, l, t, a, c)), s && u.setTime(u.getTime() - s), u;
1140
+ }
1141
+ function si(e) {
1142
+ return e.toISOString();
1143
+ }
1144
+ var Nr = new U("tag:yaml.org,2002:timestamp", {
1145
+ kind: "scalar",
1146
+ resolve: ci,
1147
+ construct: fi,
1148
+ instanceOf: Date,
1149
+ represent: si
1150
+ });
1151
+ function ui(e) {
1152
+ return e === "<<" || e === null;
1153
+ }
1154
+ var jr = new U("tag:yaml.org,2002:merge", {
1155
+ kind: "scalar",
1156
+ resolve: ui
1157
+ }), Ue = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
1158
+ \r`;
1159
+ function pi(e) {
1160
+ if (e === null) return !1;
1161
+ var r, n, o = 0, i = e.length, l = Ue;
1162
+ for (n = 0; n < i; n++)
1163
+ if (r = l.indexOf(e.charAt(n)), !(r > 64)) {
1164
+ if (r < 0) return !1;
1165
+ o += 6;
1166
+ }
1167
+ return o % 8 === 0;
1168
+ }
1169
+ function di(e) {
1170
+ var r, n, o = e.replace(/[\r\n=]/g, ""), i = o.length, l = Ue, t = 0, a = [];
1171
+ for (r = 0; r < i; r++)
1172
+ r % 4 === 0 && r && (a.push(t >> 16 & 255), a.push(t >> 8 & 255), a.push(t & 255)), t = t << 6 | l.indexOf(o.charAt(r));
1173
+ return n = i % 4 * 6, n === 0 ? (a.push(t >> 16 & 255), a.push(t >> 8 & 255), a.push(t & 255)) : n === 18 ? (a.push(t >> 10 & 255), a.push(t >> 2 & 255)) : n === 12 && a.push(t >> 4 & 255), new Uint8Array(a);
1174
+ }
1175
+ function hi(e) {
1176
+ var r = "", n = 0, o, i, l = e.length, t = Ue;
1177
+ for (o = 0; o < l; o++)
1178
+ o % 3 === 0 && o && (r += t[n >> 18 & 63], r += t[n >> 12 & 63], r += t[n >> 6 & 63], r += t[n & 63]), n = (n << 8) + e[o];
1179
+ return i = l % 3, i === 0 ? (r += t[n >> 18 & 63], r += t[n >> 12 & 63], r += t[n >> 6 & 63], r += t[n & 63]) : i === 2 ? (r += t[n >> 10 & 63], r += t[n >> 4 & 63], r += t[n << 2 & 63], r += t[64]) : i === 1 && (r += t[n >> 2 & 63], r += t[n << 4 & 63], r += t[64], r += t[64]), r;
1180
+ }
1181
+ function mi(e) {
1182
+ return Object.prototype.toString.call(e) === "[object Uint8Array]";
1183
+ }
1184
+ var Mr = new U("tag:yaml.org,2002:binary", {
1185
+ kind: "scalar",
1186
+ resolve: pi,
1187
+ construct: di,
1188
+ predicate: mi,
1189
+ represent: hi
1190
+ }), xi = Object.prototype.hasOwnProperty, gi = Object.prototype.toString;
1191
+ function yi(e) {
1192
+ if (e === null) return !0;
1193
+ var r = [], n, o, i, l, t, a = e;
1194
+ for (n = 0, o = a.length; n < o; n += 1) {
1195
+ if (i = a[n], t = !1, gi.call(i) !== "[object Object]") return !1;
1196
+ for (l in i)
1197
+ if (xi.call(i, l))
1198
+ if (!t) t = !0;
1199
+ else return !1;
1200
+ if (!t) return !1;
1201
+ if (r.indexOf(l) === -1) r.push(l);
1202
+ else return !1;
1203
+ }
1204
+ return !0;
1205
+ }
1206
+ function vi(e) {
1207
+ return e !== null ? e : [];
1208
+ }
1209
+ var Pr = new U("tag:yaml.org,2002:omap", {
1210
+ kind: "sequence",
1211
+ resolve: yi,
1212
+ construct: vi
1213
+ }), bi = Object.prototype.toString;
1214
+ function Ai(e) {
1215
+ if (e === null) return !0;
1216
+ var r, n, o, i, l, t = e;
1217
+ for (l = new Array(t.length), r = 0, n = t.length; r < n; r += 1) {
1218
+ if (o = t[r], bi.call(o) !== "[object Object]" || (i = Object.keys(o), i.length !== 1)) return !1;
1219
+ l[r] = [i[0], o[i[0]]];
1220
+ }
1221
+ return !0;
1222
+ }
1223
+ function _i(e) {
1224
+ if (e === null) return [];
1225
+ var r, n, o, i, l, t = e;
1226
+ for (l = new Array(t.length), r = 0, n = t.length; r < n; r += 1)
1227
+ o = t[r], i = Object.keys(o), l[r] = [i[0], o[i[0]]];
1228
+ return l;
1229
+ }
1230
+ var Dr = new U("tag:yaml.org,2002:pairs", {
1231
+ kind: "sequence",
1232
+ resolve: Ai,
1233
+ construct: _i
1234
+ }), Ci = Object.prototype.hasOwnProperty;
1235
+ function wi(e) {
1236
+ if (e === null) return !0;
1237
+ var r, n = e;
1238
+ for (r in n)
1239
+ if (Ci.call(n, r) && n[r] !== null)
1240
+ return !1;
1241
+ return !0;
1242
+ }
1243
+ function Ei(e) {
1244
+ return e !== null ? e : {};
1245
+ }
1246
+ var Yr = new U("tag:yaml.org,2002:set", {
1247
+ kind: "mapping",
1248
+ resolve: wi,
1249
+ construct: Ei
1250
+ }), Ge = Rr.extend({
1251
+ implicit: [
1252
+ Nr,
1253
+ jr
1254
+ ],
1255
+ explicit: [
1256
+ Mr,
1257
+ Pr,
1258
+ Dr,
1259
+ Yr
1260
+ ]
1261
+ }), ce = Object.prototype.hasOwnProperty, ke = 1, Br = 2, Hr = 3, Oe = 4, Me = 1, Si = 2, ir = 3, Ti = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ki = /[\x85\u2028\u2029]/, Oi = /[,\[\]\{\}]/, Ur = /^(?:!|!!|![a-z\-]+!)$/i, Gr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1262
+ function or(e) {
1263
+ return Object.prototype.toString.call(e);
1264
+ }
1265
+ function ne(e) {
1266
+ return e === 10 || e === 13;
1267
+ }
1268
+ function fe(e) {
1269
+ return e === 9 || e === 32;
1270
+ }
1271
+ function K(e) {
1272
+ return e === 9 || e === 32 || e === 10 || e === 13;
1273
+ }
1274
+ function de(e) {
1275
+ return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
1276
+ }
1277
+ function $i(e) {
1278
+ var r;
1279
+ return 48 <= e && e <= 57 ? e - 48 : (r = e | 32, 97 <= r && r <= 102 ? r - 97 + 10 : -1);
1280
+ }
1281
+ function Fi(e) {
1282
+ return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
1283
+ }
1284
+ function Ri(e) {
1285
+ return 48 <= e && e <= 57 ? e - 48 : -1;
1286
+ }
1287
+ function tr(e) {
1288
+ return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
1289
+ ` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "…" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
1290
+ }
1291
+ function Ii(e) {
1292
+ return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
1293
+ (e - 65536 >> 10) + 55296,
1294
+ (e - 65536 & 1023) + 56320
1295
+ );
1296
+ }
1297
+ function Wr(e, r, n) {
1298
+ r === "__proto__" ? Object.defineProperty(e, r, {
1299
+ configurable: !0,
1300
+ enumerable: !0,
1301
+ writable: !0,
1302
+ value: n
1303
+ }) : e[r] = n;
1304
+ }
1305
+ var qr = new Array(256), Kr = new Array(256);
1306
+ for (var ue = 0; ue < 256; ue++)
1307
+ qr[ue] = tr(ue) ? 1 : 0, Kr[ue] = tr(ue);
1308
+ function Li(e, r) {
1309
+ this.input = e, this.filename = r.filename || null, this.schema = r.schema || Ge, this.onWarning = r.onWarning || null, this.legacy = r.legacy || !1, this.json = r.json || !1, this.listener = r.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
1310
+ }
1311
+ function Xr(e, r) {
1312
+ var n = {
1313
+ name: e.filename,
1314
+ buffer: e.input.slice(0, -1),
1315
+ // omit trailing \0
1316
+ position: e.position,
1317
+ line: e.line,
1318
+ column: e.position - e.lineStart
1319
+ };
1320
+ return n.snippet = Pn(n), new q(r, n);
1321
+ }
1322
+ function g(e, r) {
1323
+ throw Xr(e, r);
1324
+ }
1325
+ function $e(e, r) {
1326
+ e.onWarning && e.onWarning.call(null, Xr(e, r));
1327
+ }
1328
+ var lr = {
1329
+ YAML: function(r, n, o) {
1330
+ var i, l, t;
1331
+ r.version !== null && g(r, "duplication of %YAML directive"), o.length !== 1 && g(r, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(o[0]), i === null && g(r, "ill-formed argument of the YAML directive"), l = parseInt(i[1], 10), t = parseInt(i[2], 10), l !== 1 && g(r, "unacceptable YAML version of the document"), r.version = o[0], r.checkLineBreaks = t < 2, t !== 1 && t !== 2 && $e(r, "unsupported YAML version of the document");
1332
+ },
1333
+ TAG: function(r, n, o) {
1334
+ var i, l;
1335
+ o.length !== 2 && g(r, "TAG directive accepts exactly two arguments"), i = o[0], l = o[1], Ur.test(i) || g(r, "ill-formed tag handle (first argument) of the TAG directive"), ce.call(r.tagMap, i) && g(r, 'there is a previously declared suffix for "' + i + '" tag handle'), Gr.test(l) || g(r, "ill-formed tag prefix (second argument) of the TAG directive");
1336
+ try {
1337
+ l = decodeURIComponent(l);
1338
+ } catch {
1339
+ g(r, "tag prefix is malformed: " + l);
1340
+ }
1341
+ r.tagMap[i] = l;
1342
+ }
1343
+ };
1344
+ function ae(e, r, n, o) {
1345
+ var i, l, t, a;
1346
+ if (r < n) {
1347
+ if (a = e.input.slice(r, n), o)
1348
+ for (i = 0, l = a.length; i < l; i += 1)
1349
+ t = a.charCodeAt(i), t === 9 || 32 <= t && t <= 1114111 || g(e, "expected valid JSON character");
1350
+ else Ti.test(a) && g(e, "the stream contains non-printable characters");
1351
+ e.result += a;
1352
+ }
1353
+ }
1354
+ function ar(e, r, n, o) {
1355
+ var i, l, t, a;
1356
+ for (B.isObject(n) || g(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), t = 0, a = i.length; t < a; t += 1)
1357
+ l = i[t], ce.call(r, l) || (Wr(r, l, n[l]), o[l] = !0);
1358
+ }
1359
+ function he(e, r, n, o, i, l, t, a, c) {
1360
+ var s, h;
1361
+ if (Array.isArray(i))
1362
+ for (i = Array.prototype.slice.call(i), s = 0, h = i.length; s < h; s += 1)
1363
+ Array.isArray(i[s]) && g(e, "nested arrays are not supported inside keys"), typeof i == "object" && or(i[s]) === "[object Object]" && (i[s] = "[object Object]");
1364
+ if (typeof i == "object" && or(i) === "[object Object]" && (i = "[object Object]"), i = String(i), r === null && (r = {}), o === "tag:yaml.org,2002:merge")
1365
+ if (Array.isArray(l))
1366
+ for (s = 0, h = l.length; s < h; s += 1)
1367
+ ar(e, r, l[s], n);
1368
+ else
1369
+ ar(e, r, l, n);
1370
+ else
1371
+ !e.json && !ce.call(n, i) && ce.call(r, i) && (e.line = t || e.line, e.lineStart = a || e.lineStart, e.position = c || e.position, g(e, "duplicated mapping key")), Wr(r, i, l), delete n[i];
1372
+ return r;
1373
+ }
1374
+ function We(e) {
1375
+ var r;
1376
+ r = e.input.charCodeAt(e.position), r === 10 ? e.position++ : r === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : g(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
1377
+ }
1378
+ function D(e, r, n) {
1379
+ for (var o = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
1380
+ for (; fe(i); )
1381
+ i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
1382
+ if (r && i === 35)
1383
+ do
1384
+ i = e.input.charCodeAt(++e.position);
1385
+ while (i !== 10 && i !== 13 && i !== 0);
1386
+ if (ne(i))
1387
+ for (We(e), i = e.input.charCodeAt(e.position), o++, e.lineIndent = 0; i === 32; )
1388
+ e.lineIndent++, i = e.input.charCodeAt(++e.position);
1389
+ else
1390
+ break;
1391
+ }
1392
+ return n !== -1 && o !== 0 && e.lineIndent < n && $e(e, "deficient indentation"), o;
1393
+ }
1394
+ function Ie(e) {
1395
+ var r = e.position, n;
1396
+ return n = e.input.charCodeAt(r), !!((n === 45 || n === 46) && n === e.input.charCodeAt(r + 1) && n === e.input.charCodeAt(r + 2) && (r += 3, n = e.input.charCodeAt(r), n === 0 || K(n)));
1397
+ }
1398
+ function qe(e, r) {
1399
+ r === 1 ? e.result += " " : r > 1 && (e.result += B.repeat(`
1400
+ `, r - 1));
1401
+ }
1402
+ function Ni(e, r, n) {
1403
+ var o, i, l, t, a, c, s, h, d = e.kind, u = e.result, f;
1404
+ if (f = e.input.charCodeAt(e.position), K(f) || de(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), K(i) || n && de(i)))
1405
+ return !1;
1406
+ for (e.kind = "scalar", e.result = "", l = t = e.position, a = !1; f !== 0; ) {
1407
+ if (f === 58) {
1408
+ if (i = e.input.charCodeAt(e.position + 1), K(i) || n && de(i))
1409
+ break;
1410
+ } else if (f === 35) {
1411
+ if (o = e.input.charCodeAt(e.position - 1), K(o))
1412
+ break;
1413
+ } else {
1414
+ if (e.position === e.lineStart && Ie(e) || n && de(f))
1415
+ break;
1416
+ if (ne(f))
1417
+ if (c = e.line, s = e.lineStart, h = e.lineIndent, D(e, !1, -1), e.lineIndent >= r) {
1418
+ a = !0, f = e.input.charCodeAt(e.position);
1419
+ continue;
1420
+ } else {
1421
+ e.position = t, e.line = c, e.lineStart = s, e.lineIndent = h;
1422
+ break;
1423
+ }
1424
+ }
1425
+ a && (ae(e, l, t, !1), qe(e, e.line - c), l = t = e.position, a = !1), fe(f) || (t = e.position + 1), f = e.input.charCodeAt(++e.position);
1426
+ }
1427
+ return ae(e, l, t, !1), e.result ? !0 : (e.kind = d, e.result = u, !1);
1428
+ }
1429
+ function ji(e, r) {
1430
+ var n, o, i;
1431
+ if (n = e.input.charCodeAt(e.position), n !== 39)
1432
+ return !1;
1433
+ for (e.kind = "scalar", e.result = "", e.position++, o = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
1434
+ if (n === 39)
1435
+ if (ae(e, o, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
1436
+ o = e.position, e.position++, i = e.position;
1437
+ else
1438
+ return !0;
1439
+ else ne(n) ? (ae(e, o, i, !0), qe(e, D(e, !1, r)), o = i = e.position) : e.position === e.lineStart && Ie(e) ? g(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
1440
+ g(e, "unexpected end of the stream within a single quoted scalar");
1441
+ }
1442
+ function Mi(e, r) {
1443
+ var n, o, i, l, t, a;
1444
+ if (a = e.input.charCodeAt(e.position), a !== 34)
1445
+ return !1;
1446
+ for (e.kind = "scalar", e.result = "", e.position++, n = o = e.position; (a = e.input.charCodeAt(e.position)) !== 0; ) {
1447
+ if (a === 34)
1448
+ return ae(e, n, e.position, !0), e.position++, !0;
1449
+ if (a === 92) {
1450
+ if (ae(e, n, e.position, !0), a = e.input.charCodeAt(++e.position), ne(a))
1451
+ D(e, !1, r);
1452
+ else if (a < 256 && qr[a])
1453
+ e.result += Kr[a], e.position++;
1454
+ else if ((t = Fi(a)) > 0) {
1455
+ for (i = t, l = 0; i > 0; i--)
1456
+ a = e.input.charCodeAt(++e.position), (t = $i(a)) >= 0 ? l = (l << 4) + t : g(e, "expected hexadecimal character");
1457
+ e.result += Ii(l), e.position++;
1458
+ } else
1459
+ g(e, "unknown escape sequence");
1460
+ n = o = e.position;
1461
+ } else ne(a) ? (ae(e, n, o, !0), qe(e, D(e, !1, r)), n = o = e.position) : e.position === e.lineStart && Ie(e) ? g(e, "unexpected end of the document within a double quoted scalar") : (e.position++, o = e.position);
1462
+ }
1463
+ g(e, "unexpected end of the stream within a double quoted scalar");
1464
+ }
1465
+ function Pi(e, r) {
1466
+ var n = !0, o, i, l, t = e.tag, a, c = e.anchor, s, h, d, u, f, m = /* @__PURE__ */ Object.create(null), x, v, A, w;
1467
+ if (w = e.input.charCodeAt(e.position), w === 91)
1468
+ h = 93, f = !1, a = [];
1469
+ else if (w === 123)
1470
+ h = 125, f = !0, a = {};
1471
+ else
1472
+ return !1;
1473
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = a), w = e.input.charCodeAt(++e.position); w !== 0; ) {
1474
+ if (D(e, !0, r), w = e.input.charCodeAt(e.position), w === h)
1475
+ return e.position++, e.tag = t, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = a, !0;
1476
+ n ? w === 44 && g(e, "expected the node content, but found ','") : g(e, "missed comma between flow collection entries"), v = x = A = null, d = u = !1, w === 63 && (s = e.input.charCodeAt(e.position + 1), K(s) && (d = u = !0, e.position++, D(e, !0, r))), o = e.line, i = e.lineStart, l = e.position, xe(e, r, ke, !1, !0), v = e.tag, x = e.result, D(e, !0, r), w = e.input.charCodeAt(e.position), (u || e.line === o) && w === 58 && (d = !0, w = e.input.charCodeAt(++e.position), D(e, !0, r), xe(e, r, ke, !1, !0), A = e.result), f ? he(e, a, m, v, x, A, o, i, l) : d ? a.push(he(e, null, m, v, x, A, o, i, l)) : a.push(x), D(e, !0, r), w = e.input.charCodeAt(e.position), w === 44 ? (n = !0, w = e.input.charCodeAt(++e.position)) : n = !1;
1477
+ }
1478
+ g(e, "unexpected end of the stream within a flow collection");
1479
+ }
1480
+ function Di(e, r) {
1481
+ var n, o, i = Me, l = !1, t = !1, a = r, c = 0, s = !1, h, d;
1482
+ if (d = e.input.charCodeAt(e.position), d === 124)
1483
+ o = !1;
1484
+ else if (d === 62)
1485
+ o = !0;
1486
+ else
1487
+ return !1;
1488
+ for (e.kind = "scalar", e.result = ""; d !== 0; )
1489
+ if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45)
1490
+ Me === i ? i = d === 43 ? ir : Si : g(e, "repeat of a chomping mode identifier");
1491
+ else if ((h = Ri(d)) >= 0)
1492
+ h === 0 ? g(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : t ? g(e, "repeat of an indentation width identifier") : (a = r + h - 1, t = !0);
1493
+ else
1494
+ break;
1495
+ if (fe(d)) {
1496
+ do
1497
+ d = e.input.charCodeAt(++e.position);
1498
+ while (fe(d));
1499
+ if (d === 35)
1500
+ do
1501
+ d = e.input.charCodeAt(++e.position);
1502
+ while (!ne(d) && d !== 0);
1503
+ }
1504
+ for (; d !== 0; ) {
1505
+ for (We(e), e.lineIndent = 0, d = e.input.charCodeAt(e.position); (!t || e.lineIndent < a) && d === 32; )
1506
+ e.lineIndent++, d = e.input.charCodeAt(++e.position);
1507
+ if (!t && e.lineIndent > a && (a = e.lineIndent), ne(d)) {
1508
+ c++;
1509
+ continue;
1510
+ }
1511
+ if (e.lineIndent < a) {
1512
+ i === ir ? e.result += B.repeat(`
1513
+ `, l ? 1 + c : c) : i === Me && l && (e.result += `
1514
+ `);
1515
+ break;
1516
+ }
1517
+ for (o ? fe(d) ? (s = !0, e.result += B.repeat(`
1518
+ `, l ? 1 + c : c)) : s ? (s = !1, e.result += B.repeat(`
1519
+ `, c + 1)) : c === 0 ? l && (e.result += " ") : e.result += B.repeat(`
1520
+ `, c) : e.result += B.repeat(`
1521
+ `, l ? 1 + c : c), l = !0, t = !0, c = 0, n = e.position; !ne(d) && d !== 0; )
1522
+ d = e.input.charCodeAt(++e.position);
1523
+ ae(e, n, e.position, !1);
1524
+ }
1525
+ return !0;
1526
+ }
1527
+ function cr(e, r) {
1528
+ var n, o = e.tag, i = e.anchor, l = [], t, a = !1, c;
1529
+ if (e.firstTabInLine !== -1) return !1;
1530
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = l), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, g(e, "tab characters must not be used in indentation")), !(c !== 45 || (t = e.input.charCodeAt(e.position + 1), !K(t)))); ) {
1531
+ if (a = !0, e.position++, D(e, !0, -1) && e.lineIndent <= r) {
1532
+ l.push(null), c = e.input.charCodeAt(e.position);
1533
+ continue;
1534
+ }
1535
+ if (n = e.line, xe(e, r, Hr, !1, !0), l.push(e.result), D(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > r) && c !== 0)
1536
+ g(e, "bad indentation of a sequence entry");
1537
+ else if (e.lineIndent < r)
1538
+ break;
1539
+ }
1540
+ return a ? (e.tag = o, e.anchor = i, e.kind = "sequence", e.result = l, !0) : !1;
1541
+ }
1542
+ function Yi(e, r, n) {
1543
+ var o, i, l, t, a, c, s = e.tag, h = e.anchor, d = {}, u = /* @__PURE__ */ Object.create(null), f = null, m = null, x = null, v = !1, A = !1, w;
1544
+ if (e.firstTabInLine !== -1) return !1;
1545
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = d), w = e.input.charCodeAt(e.position); w !== 0; ) {
1546
+ if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, g(e, "tab characters must not be used in indentation")), o = e.input.charCodeAt(e.position + 1), l = e.line, (w === 63 || w === 58) && K(o))
1547
+ w === 63 ? (v && (he(e, d, u, f, m, null, t, a, c), f = m = x = null), A = !0, v = !0, i = !0) : v ? (v = !1, i = !0) : g(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = o;
1548
+ else {
1549
+ if (t = e.line, a = e.lineStart, c = e.position, !xe(e, n, Br, !1, !0))
1550
+ break;
1551
+ if (e.line === l) {
1552
+ for (w = e.input.charCodeAt(e.position); fe(w); )
1553
+ w = e.input.charCodeAt(++e.position);
1554
+ if (w === 58)
1555
+ w = e.input.charCodeAt(++e.position), K(w) || g(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (he(e, d, u, f, m, null, t, a, c), f = m = x = null), A = !0, v = !1, i = !1, f = e.tag, m = e.result;
1556
+ else if (A)
1557
+ g(e, "can not read an implicit mapping pair; a colon is missed");
1558
+ else
1559
+ return e.tag = s, e.anchor = h, !0;
1560
+ } else if (A)
1561
+ g(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1562
+ else
1563
+ return e.tag = s, e.anchor = h, !0;
1564
+ }
1565
+ if ((e.line === l || e.lineIndent > r) && (v && (t = e.line, a = e.lineStart, c = e.position), xe(e, r, Oe, !0, i) && (v ? m = e.result : x = e.result), v || (he(e, d, u, f, m, x, t, a, c), f = m = x = null), D(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === l || e.lineIndent > r) && w !== 0)
1566
+ g(e, "bad indentation of a mapping entry");
1567
+ else if (e.lineIndent < r)
1568
+ break;
1569
+ }
1570
+ return v && he(e, d, u, f, m, null, t, a, c), A && (e.tag = s, e.anchor = h, e.kind = "mapping", e.result = d), A;
1571
+ }
1572
+ function Bi(e) {
1573
+ var r, n = !1, o = !1, i, l, t;
1574
+ if (t = e.input.charCodeAt(e.position), t !== 33) return !1;
1575
+ if (e.tag !== null && g(e, "duplication of a tag property"), t = e.input.charCodeAt(++e.position), t === 60 ? (n = !0, t = e.input.charCodeAt(++e.position)) : t === 33 ? (o = !0, i = "!!", t = e.input.charCodeAt(++e.position)) : i = "!", r = e.position, n) {
1576
+ do
1577
+ t = e.input.charCodeAt(++e.position);
1578
+ while (t !== 0 && t !== 62);
1579
+ e.position < e.length ? (l = e.input.slice(r, e.position), t = e.input.charCodeAt(++e.position)) : g(e, "unexpected end of the stream within a verbatim tag");
1580
+ } else {
1581
+ for (; t !== 0 && !K(t); )
1582
+ t === 33 && (o ? g(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(r - 1, e.position + 1), Ur.test(i) || g(e, "named tag handle cannot contain such characters"), o = !0, r = e.position + 1)), t = e.input.charCodeAt(++e.position);
1583
+ l = e.input.slice(r, e.position), Oi.test(l) && g(e, "tag suffix cannot contain flow indicator characters");
1584
+ }
1585
+ l && !Gr.test(l) && g(e, "tag name cannot contain such characters: " + l);
1586
+ try {
1587
+ l = decodeURIComponent(l);
1588
+ } catch {
1589
+ g(e, "tag name is malformed: " + l);
1590
+ }
1591
+ return n ? e.tag = l : ce.call(e.tagMap, i) ? e.tag = e.tagMap[i] + l : i === "!" ? e.tag = "!" + l : i === "!!" ? e.tag = "tag:yaml.org,2002:" + l : g(e, 'undeclared tag handle "' + i + '"'), !0;
1592
+ }
1593
+ function Hi(e) {
1594
+ var r, n;
1595
+ if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
1596
+ for (e.anchor !== null && g(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), r = e.position; n !== 0 && !K(n) && !de(n); )
1597
+ n = e.input.charCodeAt(++e.position);
1598
+ return e.position === r && g(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(r, e.position), !0;
1599
+ }
1600
+ function Ui(e) {
1601
+ var r, n, o;
1602
+ if (o = e.input.charCodeAt(e.position), o !== 42) return !1;
1603
+ for (o = e.input.charCodeAt(++e.position), r = e.position; o !== 0 && !K(o) && !de(o); )
1604
+ o = e.input.charCodeAt(++e.position);
1605
+ return e.position === r && g(e, "name of an alias node must contain at least one character"), n = e.input.slice(r, e.position), ce.call(e.anchorMap, n) || g(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], D(e, !0, -1), !0;
1606
+ }
1607
+ function xe(e, r, n, o, i) {
1608
+ var l, t, a, c = 1, s = !1, h = !1, d, u, f, m, x, v;
1609
+ if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l = t = a = Oe === n || Hr === n, o && D(e, !0, -1) && (s = !0, e.lineIndent > r ? c = 1 : e.lineIndent === r ? c = 0 : e.lineIndent < r && (c = -1)), c === 1)
1610
+ for (; Bi(e) || Hi(e); )
1611
+ D(e, !0, -1) ? (s = !0, a = l, e.lineIndent > r ? c = 1 : e.lineIndent === r ? c = 0 : e.lineIndent < r && (c = -1)) : a = !1;
1612
+ if (a && (a = s || i), (c === 1 || Oe === n) && (ke === n || Br === n ? x = r : x = r + 1, v = e.position - e.lineStart, c === 1 ? a && (cr(e, v) || Yi(e, v, x)) || Pi(e, x) ? h = !0 : (t && Di(e, x) || ji(e, x) || Mi(e, x) ? h = !0 : Ui(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && g(e, "alias node should not have any properties")) : Ni(e, x, ke === n) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (h = a && cr(e, v))), e.tag === null)
1613
+ e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1614
+ else if (e.tag === "?") {
1615
+ for (e.result !== null && e.kind !== "scalar" && g(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), d = 0, u = e.implicitTypes.length; d < u; d += 1)
1616
+ if (m = e.implicitTypes[d], m.resolve(e.result)) {
1617
+ e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1618
+ break;
1619
+ }
1620
+ } else if (e.tag !== "!") {
1621
+ if (ce.call(e.typeMap[e.kind || "fallback"], e.tag))
1622
+ m = e.typeMap[e.kind || "fallback"][e.tag];
1623
+ else
1624
+ for (m = null, f = e.typeMap.multi[e.kind || "fallback"], d = 0, u = f.length; d < u; d += 1)
1625
+ if (e.tag.slice(0, f[d].tag.length) === f[d].tag) {
1626
+ m = f[d];
1627
+ break;
1628
+ }
1629
+ m || g(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && g(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + m.kind + '", not "' + e.kind + '"'), m.resolve(e.result, e.tag) ? (e.result = m.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : g(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
1630
+ }
1631
+ return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || h;
1632
+ }
1633
+ function Gi(e) {
1634
+ var r = e.position, n, o, i, l = !1, t;
1635
+ for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (t = e.input.charCodeAt(e.position)) !== 0 && (D(e, !0, -1), t = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || t !== 37)); ) {
1636
+ for (l = !0, t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !K(t); )
1637
+ t = e.input.charCodeAt(++e.position);
1638
+ for (o = e.input.slice(n, e.position), i = [], o.length < 1 && g(e, "directive name must not be less than one character in length"); t !== 0; ) {
1639
+ for (; fe(t); )
1640
+ t = e.input.charCodeAt(++e.position);
1641
+ if (t === 35) {
1642
+ do
1643
+ t = e.input.charCodeAt(++e.position);
1644
+ while (t !== 0 && !ne(t));
1645
+ break;
1646
+ }
1647
+ if (ne(t)) break;
1648
+ for (n = e.position; t !== 0 && !K(t); )
1649
+ t = e.input.charCodeAt(++e.position);
1650
+ i.push(e.input.slice(n, e.position));
1651
+ }
1652
+ t !== 0 && We(e), ce.call(lr, o) ? lr[o](e, o, i) : $e(e, 'unknown document directive "' + o + '"');
1653
+ }
1654
+ if (D(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, D(e, !0, -1)) : l && g(e, "directives end mark is expected"), xe(e, e.lineIndent - 1, Oe, !1, !0), D(e, !0, -1), e.checkLineBreaks && ki.test(e.input.slice(r, e.position)) && $e(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ie(e)) {
1655
+ e.input.charCodeAt(e.position) === 46 && (e.position += 3, D(e, !0, -1));
1656
+ return;
1657
+ }
1658
+ if (e.position < e.length - 1)
1659
+ g(e, "end of the stream or a document separator is expected");
1660
+ else
1661
+ return;
1662
+ }
1663
+ function zr(e, r) {
1664
+ e = String(e), r = r || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
1665
+ `), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
1666
+ var n = new Li(e, r), o = e.indexOf("\0");
1667
+ for (o !== -1 && (n.position = o, g(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
1668
+ n.lineIndent += 1, n.position += 1;
1669
+ for (; n.position < n.length - 1; )
1670
+ Gi(n);
1671
+ return n.documents;
1672
+ }
1673
+ function Wi(e, r, n) {
1674
+ r !== null && typeof r == "object" && typeof n > "u" && (n = r, r = null);
1675
+ var o = zr(e, n);
1676
+ if (typeof r != "function")
1677
+ return o;
1678
+ for (var i = 0, l = o.length; i < l; i += 1)
1679
+ r(o[i]);
1680
+ }
1681
+ function qi(e, r) {
1682
+ var n = zr(e, r);
1683
+ if (n.length !== 0) {
1684
+ if (n.length === 1)
1685
+ return n[0];
1686
+ throw new q("expected a single document in the stream, but found more");
1687
+ }
1688
+ }
1689
+ var Ki = Wi, Xi = qi, Vr = {
1690
+ loadAll: Ki,
1691
+ load: Xi
1692
+ }, Zr = Object.prototype.toString, Qr = Object.prototype.hasOwnProperty, Ke = 65279, zi = 9, Ae = 10, Vi = 13, Zi = 32, Qi = 33, Ji = 34, De = 35, eo = 37, ro = 38, no = 39, io = 42, Jr = 44, oo = 45, Fe = 58, to = 61, lo = 62, ao = 63, co = 64, en = 91, rn = 93, fo = 96, nn = 123, so = 124, on = 125, G = {};
1693
+ G[0] = "\\0";
1694
+ G[7] = "\\a";
1695
+ G[8] = "\\b";
1696
+ G[9] = "\\t";
1697
+ G[10] = "\\n";
1698
+ G[11] = "\\v";
1699
+ G[12] = "\\f";
1700
+ G[13] = "\\r";
1701
+ G[27] = "\\e";
1702
+ G[34] = '\\"';
1703
+ G[92] = "\\\\";
1704
+ G[133] = "\\N";
1705
+ G[160] = "\\_";
1706
+ G[8232] = "\\L";
1707
+ G[8233] = "\\P";
1708
+ var uo = [
1709
+ "y",
1710
+ "Y",
1711
+ "yes",
1712
+ "Yes",
1713
+ "YES",
1714
+ "on",
1715
+ "On",
1716
+ "ON",
1717
+ "n",
1718
+ "N",
1719
+ "no",
1720
+ "No",
1721
+ "NO",
1722
+ "off",
1723
+ "Off",
1724
+ "OFF"
1725
+ ], po = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1726
+ function ho(e, r) {
1727
+ var n, o, i, l, t, a, c;
1728
+ if (r === null) return {};
1729
+ for (n = {}, o = Object.keys(r), i = 0, l = o.length; i < l; i += 1)
1730
+ t = o[i], a = String(r[t]), t.slice(0, 2) === "!!" && (t = "tag:yaml.org,2002:" + t.slice(2)), c = e.compiledTypeMap.fallback[t], c && Qr.call(c.styleAliases, a) && (a = c.styleAliases[a]), n[t] = a;
1731
+ return n;
1732
+ }
1733
+ function mo(e) {
1734
+ var r, n, o;
1735
+ if (r = e.toString(16).toUpperCase(), e <= 255)
1736
+ n = "x", o = 2;
1737
+ else if (e <= 65535)
1738
+ n = "u", o = 4;
1739
+ else if (e <= 4294967295)
1740
+ n = "U", o = 8;
1741
+ else
1742
+ throw new q("code point within a string may not be greater than 0xFFFFFFFF");
1743
+ return "\\" + n + B.repeat("0", o - r.length) + r;
1744
+ }
1745
+ var xo = 1, _e = 2;
1746
+ function go(e) {
1747
+ this.schema = e.schema || Ge, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = B.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = ho(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? _e : xo, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1748
+ }
1749
+ function fr(e, r) {
1750
+ for (var n = B.repeat(" ", r), o = 0, i = -1, l = "", t, a = e.length; o < a; )
1751
+ i = e.indexOf(`
1752
+ `, o), i === -1 ? (t = e.slice(o), o = a) : (t = e.slice(o, i + 1), o = i + 1), t.length && t !== `
1753
+ ` && (l += n), l += t;
1754
+ return l;
1755
+ }
1756
+ function Ye(e, r) {
1757
+ return `
1758
+ ` + B.repeat(" ", e.indent * r);
1759
+ }
1760
+ function yo(e, r) {
1761
+ var n, o, i;
1762
+ for (n = 0, o = e.implicitTypes.length; n < o; n += 1)
1763
+ if (i = e.implicitTypes[n], i.resolve(r))
1764
+ return !0;
1765
+ return !1;
1766
+ }
1767
+ function Re(e) {
1768
+ return e === Zi || e === zi;
1769
+ }
1770
+ function Ce(e) {
1771
+ return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Ke || 65536 <= e && e <= 1114111;
1772
+ }
1773
+ function sr(e) {
1774
+ return Ce(e) && e !== Ke && e !== Vi && e !== Ae;
1775
+ }
1776
+ function ur(e, r, n) {
1777
+ var o = sr(e), i = o && !Re(e);
1778
+ return (
1779
+ // ns-plain-safe
1780
+ (n ? (
1781
+ // c = flow-in
1782
+ o
1783
+ ) : o && e !== Jr && e !== en && e !== rn && e !== nn && e !== on) && e !== De && !(r === Fe && !i) || sr(r) && !Re(r) && e === De || r === Fe && i
1784
+ );
1785
+ }
1786
+ function vo(e) {
1787
+ return Ce(e) && e !== Ke && !Re(e) && e !== oo && e !== ao && e !== Fe && e !== Jr && e !== en && e !== rn && e !== nn && e !== on && e !== De && e !== ro && e !== io && e !== Qi && e !== so && e !== to && e !== lo && e !== no && e !== Ji && e !== eo && e !== co && e !== fo;
1788
+ }
1789
+ function bo(e) {
1790
+ return !Re(e) && e !== Fe;
1791
+ }
1792
+ function ve(e, r) {
1793
+ var n = e.charCodeAt(r), o;
1794
+ return n >= 55296 && n <= 56319 && r + 1 < e.length && (o = e.charCodeAt(r + 1), o >= 56320 && o <= 57343) ? (n - 55296) * 1024 + o - 56320 + 65536 : n;
1795
+ }
1796
+ function tn(e) {
1797
+ var r = /^\n* /;
1798
+ return r.test(e);
1799
+ }
1800
+ var ln = 1, Be = 2, an = 3, cn = 4, pe = 5;
1801
+ function Ao(e, r, n, o, i, l, t, a) {
1802
+ var c, s = 0, h = null, d = !1, u = !1, f = o !== -1, m = -1, x = vo(ve(e, 0)) && bo(ve(e, e.length - 1));
1803
+ if (r || t)
1804
+ for (c = 0; c < e.length; s >= 65536 ? c += 2 : c++) {
1805
+ if (s = ve(e, c), !Ce(s))
1806
+ return pe;
1807
+ x = x && ur(s, h, a), h = s;
1808
+ }
1809
+ else {
1810
+ for (c = 0; c < e.length; s >= 65536 ? c += 2 : c++) {
1811
+ if (s = ve(e, c), s === Ae)
1812
+ d = !0, f && (u = u || // Foldable line = too long, and not more-indented.
1813
+ c - m - 1 > o && e[m + 1] !== " ", m = c);
1814
+ else if (!Ce(s))
1815
+ return pe;
1816
+ x = x && ur(s, h, a), h = s;
1817
+ }
1818
+ u = u || f && c - m - 1 > o && e[m + 1] !== " ";
1819
+ }
1820
+ return !d && !u ? x && !t && !i(e) ? ln : l === _e ? pe : Be : n > 9 && tn(e) ? pe : t ? l === _e ? pe : Be : u ? cn : an;
1821
+ }
1822
+ function _o(e, r, n, o, i) {
1823
+ e.dump = (function() {
1824
+ if (r.length === 0)
1825
+ return e.quotingType === _e ? '""' : "''";
1826
+ if (!e.noCompatMode && (uo.indexOf(r) !== -1 || po.test(r)))
1827
+ return e.quotingType === _e ? '"' + r + '"' : "'" + r + "'";
1828
+ var l = e.indent * Math.max(1, n), t = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - l), a = o || e.flowLevel > -1 && n >= e.flowLevel;
1829
+ function c(s) {
1830
+ return yo(e, s);
1831
+ }
1832
+ switch (Ao(
1833
+ r,
1834
+ a,
1835
+ e.indent,
1836
+ t,
1837
+ c,
1838
+ e.quotingType,
1839
+ e.forceQuotes && !o,
1840
+ i
1841
+ )) {
1842
+ case ln:
1843
+ return r;
1844
+ case Be:
1845
+ return "'" + r.replace(/'/g, "''") + "'";
1846
+ case an:
1847
+ return "|" + pr(r, e.indent) + dr(fr(r, l));
1848
+ case cn:
1849
+ return ">" + pr(r, e.indent) + dr(fr(Co(r, t), l));
1850
+ case pe:
1851
+ return '"' + wo(r) + '"';
1852
+ default:
1853
+ throw new q("impossible error: invalid scalar style");
1854
+ }
1855
+ })();
1856
+ }
1857
+ function pr(e, r) {
1858
+ var n = tn(e) ? String(r) : "", o = e[e.length - 1] === `
1859
+ `, i = o && (e[e.length - 2] === `
1860
+ ` || e === `
1861
+ `), l = i ? "+" : o ? "" : "-";
1862
+ return n + l + `
1863
+ `;
1864
+ }
1865
+ function dr(e) {
1866
+ return e[e.length - 1] === `
1867
+ ` ? e.slice(0, -1) : e;
1868
+ }
1869
+ function Co(e, r) {
1870
+ for (var n = /(\n+)([^\n]*)/g, o = (function() {
1871
+ var s = e.indexOf(`
1872
+ `);
1873
+ return s = s !== -1 ? s : e.length, n.lastIndex = s, hr(e.slice(0, s), r);
1874
+ })(), i = e[0] === `
1875
+ ` || e[0] === " ", l, t; t = n.exec(e); ) {
1876
+ var a = t[1], c = t[2];
1877
+ l = c[0] === " ", o += a + (!i && !l && c !== "" ? `
1878
+ ` : "") + hr(c, r), i = l;
1879
+ }
1880
+ return o;
1881
+ }
1882
+ function hr(e, r) {
1883
+ if (e === "" || e[0] === " ") return e;
1884
+ for (var n = / [^ ]/g, o, i = 0, l, t = 0, a = 0, c = ""; o = n.exec(e); )
1885
+ a = o.index, a - i > r && (l = t > i ? t : a, c += `
1886
+ ` + e.slice(i, l), i = l + 1), t = a;
1887
+ return c += `
1888
+ `, e.length - i > r && t > i ? c += e.slice(i, t) + `
1889
+ ` + e.slice(t + 1) : c += e.slice(i), c.slice(1);
1890
+ }
1891
+ function wo(e) {
1892
+ for (var r = "", n = 0, o, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
1893
+ n = ve(e, i), o = G[n], !o && Ce(n) ? (r += e[i], n >= 65536 && (r += e[i + 1])) : r += o || mo(n);
1894
+ return r;
1895
+ }
1896
+ function Eo(e, r, n) {
1897
+ var o = "", i = e.tag, l, t, a;
1898
+ for (l = 0, t = n.length; l < t; l += 1)
1899
+ a = n[l], e.replacer && (a = e.replacer.call(n, String(l), a)), (ie(e, r, a, !1, !1) || typeof a > "u" && ie(e, r, null, !1, !1)) && (o !== "" && (o += "," + (e.condenseFlow ? "" : " ")), o += e.dump);
1900
+ e.tag = i, e.dump = "[" + o + "]";
1901
+ }
1902
+ function mr(e, r, n, o) {
1903
+ var i = "", l = e.tag, t, a, c;
1904
+ for (t = 0, a = n.length; t < a; t += 1)
1905
+ c = n[t], e.replacer && (c = e.replacer.call(n, String(t), c)), (ie(e, r + 1, c, !0, !0, !1, !0) || typeof c > "u" && ie(e, r + 1, null, !0, !0, !1, !0)) && ((!o || i !== "") && (i += Ye(e, r)), e.dump && Ae === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
1906
+ e.tag = l, e.dump = i || "[]";
1907
+ }
1908
+ function So(e, r, n) {
1909
+ var o = "", i = e.tag, l = Object.keys(n), t, a, c, s, h;
1910
+ for (t = 0, a = l.length; t < a; t += 1)
1911
+ h = "", o !== "" && (h += ", "), e.condenseFlow && (h += '"'), c = l[t], s = n[c], e.replacer && (s = e.replacer.call(n, c, s)), ie(e, r, c, !1, !1) && (e.dump.length > 1024 && (h += "? "), h += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ie(e, r, s, !1, !1) && (h += e.dump, o += h));
1912
+ e.tag = i, e.dump = "{" + o + "}";
1913
+ }
1914
+ function To(e, r, n, o) {
1915
+ var i = "", l = e.tag, t = Object.keys(n), a, c, s, h, d, u;
1916
+ if (e.sortKeys === !0)
1917
+ t.sort();
1918
+ else if (typeof e.sortKeys == "function")
1919
+ t.sort(e.sortKeys);
1920
+ else if (e.sortKeys)
1921
+ throw new q("sortKeys must be a boolean or a function");
1922
+ for (a = 0, c = t.length; a < c; a += 1)
1923
+ u = "", (!o || i !== "") && (u += Ye(e, r)), s = t[a], h = n[s], e.replacer && (h = e.replacer.call(n, s, h)), ie(e, r + 1, s, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && Ae === e.dump.charCodeAt(0) ? u += "?" : u += "? "), u += e.dump, d && (u += Ye(e, r)), ie(e, r + 1, h, !0, d) && (e.dump && Ae === e.dump.charCodeAt(0) ? u += ":" : u += ": ", u += e.dump, i += u));
1924
+ e.tag = l, e.dump = i || "{}";
1925
+ }
1926
+ function xr(e, r, n) {
1927
+ var o, i, l, t, a, c;
1928
+ for (i = n ? e.explicitTypes : e.implicitTypes, l = 0, t = i.length; l < t; l += 1)
1929
+ if (a = i[l], (a.instanceOf || a.predicate) && (!a.instanceOf || typeof r == "object" && r instanceof a.instanceOf) && (!a.predicate || a.predicate(r))) {
1930
+ if (n ? a.multi && a.representName ? e.tag = a.representName(r) : e.tag = a.tag : e.tag = "?", a.represent) {
1931
+ if (c = e.styleMap[a.tag] || a.defaultStyle, Zr.call(a.represent) === "[object Function]")
1932
+ o = a.represent(r, c);
1933
+ else if (Qr.call(a.represent, c))
1934
+ o = a.represent[c](r, c);
1935
+ else
1936
+ throw new q("!<" + a.tag + '> tag resolver accepts not "' + c + '" style');
1937
+ e.dump = o;
1938
+ }
1939
+ return !0;
1940
+ }
1941
+ return !1;
1942
+ }
1943
+ function ie(e, r, n, o, i, l, t) {
1944
+ e.tag = null, e.dump = n, xr(e, n, !1) || xr(e, n, !0);
1945
+ var a = Zr.call(e.dump), c = o, s;
1946
+ o && (o = e.flowLevel < 0 || e.flowLevel > r);
1947
+ var h = a === "[object Object]" || a === "[object Array]", d, u;
1948
+ if (h && (d = e.duplicates.indexOf(n), u = d !== -1), (e.tag !== null && e.tag !== "?" || u || e.indent !== 2 && r > 0) && (i = !1), u && e.usedDuplicates[d])
1949
+ e.dump = "*ref_" + d;
1950
+ else {
1951
+ if (h && u && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), a === "[object Object]")
1952
+ o && Object.keys(e.dump).length !== 0 ? (To(e, r, e.dump, i), u && (e.dump = "&ref_" + d + e.dump)) : (So(e, r, e.dump), u && (e.dump = "&ref_" + d + " " + e.dump));
1953
+ else if (a === "[object Array]")
1954
+ o && e.dump.length !== 0 ? (e.noArrayIndent && !t && r > 0 ? mr(e, r - 1, e.dump, i) : mr(e, r, e.dump, i), u && (e.dump = "&ref_" + d + e.dump)) : (Eo(e, r, e.dump), u && (e.dump = "&ref_" + d + " " + e.dump));
1955
+ else if (a === "[object String]")
1956
+ e.tag !== "?" && _o(e, e.dump, r, l, c);
1957
+ else {
1958
+ if (a === "[object Undefined]")
1959
+ return !1;
1960
+ if (e.skipInvalid) return !1;
1961
+ throw new q("unacceptable kind of an object to dump " + a);
1962
+ }
1963
+ e.tag !== null && e.tag !== "?" && (s = encodeURI(
1964
+ e.tag[0] === "!" ? e.tag.slice(1) : e.tag
1965
+ ).replace(/!/g, "%21"), e.tag[0] === "!" ? s = "!" + s : s.slice(0, 18) === "tag:yaml.org,2002:" ? s = "!!" + s.slice(18) : s = "!<" + s + ">", e.dump = s + " " + e.dump);
1966
+ }
1967
+ return !0;
1968
+ }
1969
+ function ko(e, r) {
1970
+ var n = [], o = [], i, l;
1971
+ for (He(e, n, o), i = 0, l = o.length; i < l; i += 1)
1972
+ r.duplicates.push(n[o[i]]);
1973
+ r.usedDuplicates = new Array(l);
1974
+ }
1975
+ function He(e, r, n) {
1976
+ var o, i, l;
1977
+ if (e !== null && typeof e == "object")
1978
+ if (i = r.indexOf(e), i !== -1)
1979
+ n.indexOf(i) === -1 && n.push(i);
1980
+ else if (r.push(e), Array.isArray(e))
1981
+ for (i = 0, l = e.length; i < l; i += 1)
1982
+ He(e[i], r, n);
1983
+ else
1984
+ for (o = Object.keys(e), i = 0, l = o.length; i < l; i += 1)
1985
+ He(e[o[i]], r, n);
1986
+ }
1987
+ function Oo(e, r) {
1988
+ r = r || {};
1989
+ var n = new go(r);
1990
+ n.noRefs || ko(e, n);
1991
+ var o = e;
1992
+ return n.replacer && (o = n.replacer.call({ "": o }, "", o)), ie(n, 0, o, !0, !0) ? n.dump + `
1993
+ ` : "";
1994
+ }
1995
+ var $o = Oo, Fo = {
1996
+ dump: $o
1997
+ };
1998
+ function Xe(e, r) {
1999
+ return function() {
2000
+ throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + r + " instead, which is now safe by default.");
2001
+ };
2002
+ }
2003
+ var Ro = U, Io = _r, Lo = Sr, No = Fr, jo = Rr, Mo = Ge, Po = Vr.load, Do = Vr.loadAll, Yo = Fo.dump, Bo = q, Ho = {
2004
+ binary: Mr,
2005
+ float: $r,
2006
+ map: Er,
2007
+ null: Tr,
2008
+ pairs: Dr,
2009
+ set: Yr,
2010
+ timestamp: Nr,
2011
+ bool: kr,
2012
+ int: Or,
2013
+ merge: jr,
2014
+ omap: Pr,
2015
+ seq: wr,
2016
+ str: Cr
2017
+ }, Uo = Xe("safeLoad", "load"), Go = Xe("safeLoadAll", "loadAll"), Wo = Xe("safeDump", "dump"), qo = {
2018
+ Type: Ro,
2019
+ Schema: Io,
2020
+ FAILSAFE_SCHEMA: Lo,
2021
+ JSON_SCHEMA: No,
2022
+ CORE_SCHEMA: jo,
2023
+ DEFAULT_SCHEMA: Mo,
2024
+ load: Po,
2025
+ loadAll: Do,
2026
+ dump: Yo,
2027
+ YAMLException: Bo,
2028
+ types: Ho,
2029
+ safeLoad: Uo,
2030
+ safeLoadAll: Go,
2031
+ safeDump: Wo
2032
+ };
2033
+ function Ko(e) {
2034
+ const r = e.match(/^(\d+)x(\d+)x(\d+)$/);
2035
+ return r ? {
2036
+ width: parseInt(r[1], 10),
2037
+ depth: parseInt(r[2], 10),
2038
+ height: parseInt(r[3], 10)
2039
+ } : null;
2040
+ }
2041
+ function gr(e) {
2042
+ const r = e.match(/^(\d+)x(\d+)$/);
2043
+ return r ? {
2044
+ width: parseInt(r[1], 10),
2045
+ height: parseInt(r[2], 10)
2046
+ } : null;
2047
+ }
2048
+ function Xo(e) {
2049
+ const r = e.match(/^(-?\d+),(-?\d+)$/);
2050
+ return r ? {
2051
+ x: parseInt(r[1], 10),
2052
+ y: parseInt(r[2], 10)
2053
+ } : null;
2054
+ }
2055
+ function zo(e) {
2056
+ const r = e.match(/^(.+?)\s*@\s*(\d+)$/);
2057
+ return r ? {
2058
+ name: r[1].trim(),
2059
+ elevation: parseInt(r[2], 10)
2060
+ } : null;
2061
+ }
2062
+ function Vo(e, r, n) {
2063
+ let o = {};
2064
+ const i = e.match(/\{([^}]+)\}\s*$/);
2065
+ if (i) {
2066
+ const f = i[1].split(/\s+/);
2067
+ for (const m of f) {
2068
+ const [x, v] = m.split("=");
2069
+ if (x && v) {
2070
+ const A = parseFloat(v);
2071
+ o[x] = isNaN(A) ? v : A;
2072
+ }
2073
+ }
2074
+ e = e.replace(/\{[^}]+\}\s*$/, "").trim();
2075
+ }
2076
+ const l = e.trim().split(/\s+/);
2077
+ if (l.length < 4) return null;
2078
+ const t = l[0], a = l[1], c = l[2], s = l[3], h = Xo(c), d = Ko(s);
2079
+ if (!h || !d) return null;
2080
+ const u = n[a] || a;
2081
+ return {
2082
+ tier: r,
2083
+ label: t,
2084
+ color: u,
2085
+ x: h.x,
2086
+ y: h.y,
2087
+ width: d.width,
2088
+ depth: d.depth,
2089
+ height: d.height,
2090
+ ...o
2091
+ };
2092
+ }
2093
+ function rt(e) {
2094
+ const r = qo.load(e);
2095
+ let n = { width: 1100, height: 700 };
2096
+ if (typeof r.canvas == "string") {
2097
+ const u = gr(r.canvas);
2098
+ u && (n = u);
2099
+ } else r.canvas && typeof r.canvas == "object" && (n = r.canvas);
2100
+ let o = { width: 400, depth: 280 };
2101
+ if (typeof r.floor == "string") {
2102
+ const u = gr(r.floor);
2103
+ u && (o = { width: u.width, depth: u.height });
2104
+ } else r.floor && typeof r.floor == "object" && (o = r.floor);
2105
+ let i = { x: n.width / 2, y: n.height - 80 };
2106
+ r.origin && typeof r.origin == "object" && (i = r.origin);
2107
+ const l = {};
2108
+ if (r.colors && typeof r.colors == "object")
2109
+ for (const [u, f] of Object.entries(r.colors))
2110
+ l[u] = f;
2111
+ const t = [], a = {
2112
+ dark: ["#0f172a", "#1e293b", "#334155", "#475569"],
2113
+ light: ["#f1f5f9", "#e0f2fe", "#dbeafe", "#ede9fe"]
2114
+ }, c = {
2115
+ dark: ["#334155", "#475569", "#64748b", "#94a3b8"],
2116
+ light: ["#94a3b8", "#7dd3fc", "#93c5fd", "#c4b5fd"]
2117
+ }, s = r.theme || "dark";
2118
+ Array.isArray(r.tiers) && r.tiers.forEach((u, f) => {
2119
+ if (typeof u == "string") {
2120
+ const m = zo(u);
2121
+ m && t.push({
2122
+ name: m.name,
2123
+ elevation: m.elevation,
2124
+ floorColor: a[s][f] || a[s][0],
2125
+ floorOpacity: f === 0 ? 0.95 : 0.7 - f * 0.1,
2126
+ borderColor: c[s][f] || c[s][0]
2127
+ });
2128
+ } else if (u && typeof u == "object") {
2129
+ const m = u;
2130
+ t.push({
2131
+ name: m.name || `Tier ${f}`,
2132
+ elevation: m.elevation || f * 150,
2133
+ floorColor: m.floorColor || a[s][f],
2134
+ floorOpacity: m.floorOpacity ?? (f === 0 ? 0.95 : 0.7 - f * 0.1),
2135
+ borderColor: m.borderColor || c[s][f]
2136
+ });
2137
+ }
2138
+ });
2139
+ const h = [];
2140
+ if (r.nodes && typeof r.nodes == "object" && !Array.isArray(r.nodes)) {
2141
+ const u = r.nodes;
2142
+ for (const [f, m] of Object.entries(u)) {
2143
+ const x = parseInt(f, 10);
2144
+ if (!(isNaN(x) || !Array.isArray(m))) {
2145
+ for (const v of m)
2146
+ if (typeof v == "string") {
2147
+ const A = Vo(v, x, l);
2148
+ A && h.push(A);
2149
+ } else if (v && typeof v == "object") {
2150
+ const A = v;
2151
+ h.push({
2152
+ tier: x,
2153
+ label: A.label || "",
2154
+ color: l[A.color] || A.color || "slate",
2155
+ x: A.x || 0,
2156
+ y: A.y || 0,
2157
+ width: A.width || 100,
2158
+ depth: A.depth || 80,
2159
+ height: A.height || 40,
2160
+ opacity: A.opacity,
2161
+ blur: A.blur,
2162
+ translucent: A.translucent
2163
+ });
2164
+ }
2165
+ }
2166
+ }
2167
+ }
2168
+ const d = [];
2169
+ if (Array.isArray(r.pillars)) {
2170
+ for (const u of r.pillars)
2171
+ if (typeof u == "string") {
2172
+ const f = u.match(/^(-?\d+),(-?\d+)\s+(\d+)->(\d+)$/);
2173
+ f && d.push({
2174
+ x: parseInt(f[1], 10),
2175
+ y: parseInt(f[2], 10),
2176
+ fromTier: parseInt(f[3], 10),
2177
+ toTier: parseInt(f[4], 10)
2178
+ });
2179
+ } else if (u && typeof u == "object") {
2180
+ const f = u;
2181
+ d.push({
2182
+ x: f.x || 0,
2183
+ y: f.y || 0,
2184
+ fromTier: f.fromTier || 0,
2185
+ toTier: f.toTier || 1
2186
+ });
2187
+ }
2188
+ }
2189
+ return {
2190
+ title: r.title || "Untitled",
2191
+ description: r.description || "",
2192
+ theme: s,
2193
+ canvas: n,
2194
+ origin: i,
2195
+ cornerRadius: r.corner ?? r.cornerRadius ?? 14,
2196
+ tiers: t,
2197
+ floorSize: o,
2198
+ nodes: h,
2199
+ pillars: d.length > 0 ? d : void 0
2200
+ };
2201
+ }
2202
+ function nt(e) {
2203
+ const r = [];
2204
+ r.push(`title: ${e.title}`), e.description && r.push(`description: ${e.description}`), r.push(`theme: ${e.theme}`), r.push(`canvas: ${e.canvas.width}x${e.canvas.height}`), r.push(`floor: ${e.floorSize.width}x${e.floorSize.depth}`), e.cornerRadius && r.push(`corner: ${e.cornerRadius}`), r.push("");
2205
+ const n = {};
2206
+ e.nodes.forEach((i) => {
2207
+ n[i.color] = (n[i.color] || 0) + 1;
2208
+ });
2209
+ const o = Object.entries(n).filter(([, i]) => i >= 2).map(([i]) => i);
2210
+ return o.length > 0 && (r.push("colors:"), o.forEach((i) => {
2211
+ const l = i.slice(0, 3);
2212
+ r.push(` ${l}: &${l} ${i}`);
2213
+ }), r.push("")), r.push("tiers:"), e.tiers.forEach((i) => {
2214
+ r.push(` - ${i.name} @ ${i.elevation}`);
2215
+ }), r.push(""), r.push("nodes:"), e.tiers.forEach((i, l) => {
2216
+ const t = e.nodes.filter((a) => a.tier === l);
2217
+ t.length !== 0 && (r.push(` ${l}: # ${i.name}`), t.forEach((a) => {
2218
+ let c = a.color;
2219
+ o.includes(a.color) && (c = `*${a.color.slice(0, 3)}`);
2220
+ const s = [];
2221
+ a.opacity !== void 0 && s.push(`opacity=${a.opacity}`), a.blur !== void 0 && s.push(`blur=${a.blur}`), a.translucent && s.push("translucent=true");
2222
+ const h = s.length > 0 ? ` { ${s.join(" ")} }` : "", d = `${a.width}x${a.depth}x${a.height}`, u = `${a.x},${a.y}`, f = a.label.padEnd(12), m = c.padEnd(8);
2223
+ r.push(` - ${f} ${m} ${u.padEnd(8)} ${d}${h}`);
2224
+ }));
2225
+ }), e.pillars && e.pillars.length > 0 && (r.push(""), r.push("pillars:"), e.pillars.forEach((i) => {
2226
+ r.push(` - ${i.x},${i.y} ${i.fromTier}->${i.toTier}`);
2227
+ })), r.join(`
2228
+ `);
2229
+ }
2230
+ export {
2231
+ Jo as ArcDiagram,
2232
+ nt as configToYaml,
2233
+ Qo as getColorShading,
2234
+ me as isoBox,
2235
+ b as isoToScreen,
2236
+ rt as parseYamlConfig,
2237
+ et as renderToElement,
2238
+ En as renderToString
2239
+ };