@arach/arc-iso 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arc-iso-slim.es.js +204 -202
- package/dist/arc-iso-slim.umd.js +3 -3
- package/dist/arc-iso.es.js +451 -450
- package/dist/arc-iso.umd.js +18 -18
- package/dist/index.d.ts +61 -2
- package/package.json +1 -1
package/dist/arc-iso.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import jr, { useId as Qe, useMemo as Fr, useState as Le, useEffect as Lr } from "react";
|
|
2
|
+
const Rn = 30 * (Math.PI / 180), Rr = Math.cos(Rn), Ir = Math.sin(Rn);
|
|
3
|
+
function E(e, n, r = 0) {
|
|
4
4
|
return {
|
|
5
|
-
screenX: (e - n) *
|
|
5
|
+
screenX: (e - n) * Rr,
|
|
6
6
|
screenY: -(e + n) * Ir - r
|
|
7
7
|
// Negated so +X,+Y go UP on screen
|
|
8
8
|
};
|
|
@@ -10,59 +10,59 @@ function w(e, n, r = 0) {
|
|
|
10
10
|
function he(e, n, r, t = 0, i = 0, l = 0) {
|
|
11
11
|
const o = {
|
|
12
12
|
// Bottom face
|
|
13
|
-
frontBottom:
|
|
14
|
-
rightBottom:
|
|
15
|
-
backBottom:
|
|
16
|
-
leftBottom:
|
|
13
|
+
frontBottom: E(e, 0, 0),
|
|
14
|
+
rightBottom: E(e, n, 0),
|
|
15
|
+
backBottom: E(0, n, 0),
|
|
16
|
+
leftBottom: E(0, 0, 0),
|
|
17
17
|
// Top face
|
|
18
|
-
frontTop:
|
|
19
|
-
rightTop:
|
|
20
|
-
backTop:
|
|
21
|
-
leftTop:
|
|
22
|
-
}, a = (
|
|
23
|
-
x:
|
|
24
|
-
y:
|
|
18
|
+
frontTop: E(e, 0, r),
|
|
19
|
+
rightTop: E(e, n, r),
|
|
20
|
+
backTop: E(0, n, r),
|
|
21
|
+
leftTop: E(0, 0, r)
|
|
22
|
+
}, a = (w) => ({
|
|
23
|
+
x: w.screenX + t,
|
|
24
|
+
y: w.screenY + i
|
|
25
25
|
}), c = Object.fromEntries(
|
|
26
|
-
Object.entries(o).map(([
|
|
27
|
-
), s = (
|
|
26
|
+
Object.entries(o).map(([w, j]) => [w, a(j)])
|
|
27
|
+
), s = (w, j, I, $) => {
|
|
28
28
|
if ($ <= 0) {
|
|
29
|
-
const J =
|
|
29
|
+
const J = E(0, 0, I), q = E(w, 0, I), T = E(w, j, I), W = E(0, j, I);
|
|
30
30
|
return `M ${J.screenX + t},${J.screenY + i} L ${q.screenX + t},${q.screenY + i} L ${T.screenX + t},${T.screenY + i} L ${W.screenX + t},${W.screenY + i} Z`;
|
|
31
31
|
}
|
|
32
|
-
const B = Math.min(
|
|
33
|
-
for (let Q = 0; Q <=
|
|
34
|
-
const O = T + (W - T) * (Q /
|
|
32
|
+
const B = Math.min(w, j) / 2, N = Math.min($, B), R = 8, M = [], ne = (J, q, T, W) => {
|
|
33
|
+
for (let Q = 0; Q <= R; Q++) {
|
|
34
|
+
const O = T + (W - T) * (Q / R), S = J + N * Math.cos(O), h = q + N * Math.sin(O), k = E(S, h, I);
|
|
35
35
|
M.push(`${k.screenX + t},${k.screenY + i}`);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
return ne(N, N, Math.PI, Math.PI * 1.5), ne(
|
|
39
|
-
}, u = (
|
|
38
|
+
return ne(N, N, Math.PI, Math.PI * 1.5), ne(w - N, N, Math.PI * 1.5, Math.PI * 2), ne(w - N, j - N, 0, Math.PI * 0.5), ne(N, j - N, Math.PI * 0.5, Math.PI), `M ${M[0]} L ${M.slice(1).join(" L ")} Z`;
|
|
39
|
+
}, u = (w) => `M ${w.map((j) => `${j.x},${j.y}`).join(" L ")} Z`, x = (w, j, I, $, B, N) => {
|
|
40
40
|
const M = [];
|
|
41
41
|
for (let T = 0; T < 6; T++) {
|
|
42
|
-
const W = B + (N - B) * (T / 6), Q = B + (N - B) * ((T + 1) / 6), O = (W + Q) / 2, S = Math.cos(O), h = Math.sin(O), F = S * -0.577 + h * -0.577 + 0 * 0.577, ce = 0.3 + Math.max(0, F + 0.4) * 0.5, se = w
|
|
42
|
+
const W = B + (N - B) * (T / 6), Q = B + (N - B) * ((T + 1) / 6), O = (W + Q) / 2, S = Math.cos(O), h = Math.sin(O), F = S * -0.577 + h * -0.577 + 0 * 0.577, ce = 0.3 + Math.max(0, F + 0.4) * 0.5, se = E(w + I * Math.cos(W), j + I * Math.sin(W), 0), P = E(w + I * Math.cos(Q), j + I * Math.sin(Q), 0), ie = E(w + I * Math.cos(W), j + I * Math.sin(W), $), le = E(w + I * Math.cos(Q), j + I * Math.sin(Q), $), ke = `M ${se.screenX + t},${se.screenY + i} L ${P.screenX + t},${P.screenY + i} L ${le.screenX + t},${le.screenY + i} L ${ie.screenX + t},${ie.screenY + i} Z`;
|
|
43
43
|
M.push({ path: ke, intensity: ce });
|
|
44
44
|
}
|
|
45
45
|
return M;
|
|
46
46
|
}, p = Math.min(l, Math.min(e, n) / 2), f = s(e, n, r, p);
|
|
47
47
|
let m, y, A, v, b, D;
|
|
48
48
|
if (p > 0) {
|
|
49
|
-
const
|
|
50
|
-
{ x:
|
|
51
|
-
{ x:
|
|
52
|
-
{ x:
|
|
53
|
-
{ x:
|
|
49
|
+
const w = [
|
|
50
|
+
{ x: E(0, p, 0).screenX + t, y: E(0, p, 0).screenY + i },
|
|
51
|
+
{ x: E(0, n - p, 0).screenX + t, y: E(0, n - p, 0).screenY + i },
|
|
52
|
+
{ x: E(0, n - p, r).screenX + t, y: E(0, n - p, r).screenY + i },
|
|
53
|
+
{ x: E(0, p, r).screenX + t, y: E(0, p, r).screenY + i }
|
|
54
54
|
];
|
|
55
|
-
m = u(
|
|
55
|
+
m = u(w);
|
|
56
56
|
const j = [
|
|
57
|
-
{ x:
|
|
58
|
-
{ x:
|
|
59
|
-
{ x:
|
|
60
|
-
{ x:
|
|
57
|
+
{ x: E(p, 0, 0).screenX + t, y: E(p, 0, 0).screenY + i },
|
|
58
|
+
{ x: E(e - p, 0, 0).screenX + t, y: E(e - p, 0, 0).screenY + i },
|
|
59
|
+
{ x: E(e - p, 0, r).screenX + t, y: E(e - p, 0, r).screenY + i },
|
|
60
|
+
{ x: E(p, 0, r).screenX + t, y: E(p, 0, r).screenY + i }
|
|
61
61
|
];
|
|
62
62
|
y = u(j), A = x(p, p, p, r, Math.PI, Math.PI * 1.5), v = x(e - p, p, p, r, Math.PI * 1.5, Math.PI * 2), b = x(p, n - p, p, r, Math.PI * 0.5, Math.PI), D = x(e - p, n - p, p, r, 0, Math.PI * 0.5);
|
|
63
63
|
} else {
|
|
64
|
-
const
|
|
65
|
-
m = u(
|
|
64
|
+
const w = [c.leftBottom, c.backBottom, c.backTop, c.leftTop], j = [c.leftBottom, c.frontBottom, c.frontTop, c.leftTop];
|
|
65
|
+
m = u(w), y = u(j), A = [], v = [], b = [], D = [];
|
|
66
66
|
}
|
|
67
67
|
const L = `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
68
|
return {
|
|
@@ -76,7 +76,7 @@ function he(e, n, r, t = 0, i = 0, l = 0) {
|
|
|
76
76
|
outline: L
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Mr(e, n = 60, r = 50) {
|
|
80
80
|
return {
|
|
81
81
|
top: `hsl(${e}, ${n}%, ${Math.min(r + 15, 95)}%)`,
|
|
82
82
|
right: `hsl(${e}, ${n}%, ${r}%)`,
|
|
@@ -93,13 +93,13 @@ const un = {
|
|
|
93
93
|
slate: { hue: 220, saturation: 15, lightness: 50 },
|
|
94
94
|
zinc: { hue: 240, saturation: 5, lightness: 50 }
|
|
95
95
|
};
|
|
96
|
-
function
|
|
96
|
+
function Po(e) {
|
|
97
97
|
const n = un[e] || un.slate;
|
|
98
|
-
return
|
|
98
|
+
return Mr(n.hue, n.saturation, n.lightness);
|
|
99
99
|
}
|
|
100
|
-
var
|
|
100
|
+
var Re = { exports: {} }, Se = {};
|
|
101
101
|
var pn;
|
|
102
|
-
function
|
|
102
|
+
function Nr() {
|
|
103
103
|
if (pn) return Se;
|
|
104
104
|
pn = 1;
|
|
105
105
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -120,14 +120,14 @@ function Mr() {
|
|
|
120
120
|
}
|
|
121
121
|
return Se.Fragment = n, Se.jsx = r, Se.jsxs = r, Se;
|
|
122
122
|
}
|
|
123
|
-
var
|
|
123
|
+
var Ee = {};
|
|
124
124
|
var dn;
|
|
125
|
-
function
|
|
125
|
+
function Pr() {
|
|
126
126
|
return dn || (dn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
127
127
|
function e(h) {
|
|
128
128
|
if (h == null) return null;
|
|
129
129
|
if (typeof h == "function")
|
|
130
|
-
return h.$$typeof ===
|
|
130
|
+
return h.$$typeof === R ? null : h.displayName || h.name || null;
|
|
131
131
|
if (typeof h == "string") return h;
|
|
132
132
|
switch (h) {
|
|
133
133
|
case A:
|
|
@@ -138,7 +138,7 @@ function Nr() {
|
|
|
138
138
|
return "StrictMode";
|
|
139
139
|
case j:
|
|
140
140
|
return "Suspense";
|
|
141
|
-
case
|
|
141
|
+
case I:
|
|
142
142
|
return "SuspenseList";
|
|
143
143
|
case N:
|
|
144
144
|
return "Activity";
|
|
@@ -153,7 +153,7 @@ function Nr() {
|
|
|
153
153
|
return h.displayName || "Context";
|
|
154
154
|
case D:
|
|
155
155
|
return (h._context.displayName || "Context") + ".Consumer";
|
|
156
|
-
case
|
|
156
|
+
case w:
|
|
157
157
|
var k = h.render;
|
|
158
158
|
return h = h.displayName, h || (h = k.displayName || k.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
|
|
159
159
|
case $:
|
|
@@ -317,7 +317,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
317
317
|
function p(h) {
|
|
318
318
|
return typeof h == "object" && h !== null && h.$$typeof === m;
|
|
319
319
|
}
|
|
320
|
-
var f =
|
|
320
|
+
var f = jr, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), A = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), b = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), L = /* @__PURE__ */ Symbol.for("react.context"), w = /* @__PURE__ */ Symbol.for("react.forward_ref"), j = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), $ = /* @__PURE__ */ Symbol.for("react.memo"), B = /* @__PURE__ */ Symbol.for("react.lazy"), N = /* @__PURE__ */ Symbol.for("react.activity"), R = /* @__PURE__ */ Symbol.for("react.client.reference"), M = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ne = Object.prototype.hasOwnProperty, J = Array.isArray, q = console.createTask ? console.createTask : function() {
|
|
321
321
|
return null;
|
|
322
322
|
};
|
|
323
323
|
f = {
|
|
@@ -329,7 +329,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
329
329
|
f,
|
|
330
330
|
l
|
|
331
331
|
)(), O = q(t(l)), S = {};
|
|
332
|
-
|
|
332
|
+
Ee.Fragment = A, Ee.jsx = function(h, k, F) {
|
|
333
333
|
var Y = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
334
334
|
return u(
|
|
335
335
|
h,
|
|
@@ -339,7 +339,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
339
339
|
Y ? Error("react-stack-top-frame") : Q,
|
|
340
340
|
Y ? q(t(h)) : O
|
|
341
341
|
);
|
|
342
|
-
},
|
|
342
|
+
}, Ee.jsxs = function(h, k, F) {
|
|
343
343
|
var Y = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
344
344
|
return u(
|
|
345
345
|
h,
|
|
@@ -350,14 +350,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
350
350
|
Y ? q(t(h)) : O
|
|
351
351
|
);
|
|
352
352
|
};
|
|
353
|
-
})()),
|
|
353
|
+
})()), Ee;
|
|
354
354
|
}
|
|
355
355
|
var hn;
|
|
356
|
-
function
|
|
357
|
-
return hn || (hn = 1, process.env.NODE_ENV === "production" ?
|
|
356
|
+
function Dr() {
|
|
357
|
+
return hn || (hn = 1, process.env.NODE_ENV === "production" ? Re.exports = Nr() : Re.exports = Pr()), Re.exports;
|
|
358
358
|
}
|
|
359
|
-
var d =
|
|
360
|
-
const en = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace',
|
|
359
|
+
var d = Dr();
|
|
360
|
+
const Yr = ["solid", "blueprint", "cyanotype"], en = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace', Br = 0.78, g = (e) => Math.round(e * Br * 10) / 10, In = {
|
|
361
361
|
id: "solid",
|
|
362
362
|
name: "Solid",
|
|
363
363
|
description: "Shaded isometric boxes",
|
|
@@ -375,7 +375,7 @@ const en = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, C
|
|
|
375
375
|
hatchOpacity: { top: 0, right: 0, left: 0 },
|
|
376
376
|
font: en,
|
|
377
377
|
strokeWidth: 0.5
|
|
378
|
-
},
|
|
378
|
+
}, Wr = {
|
|
379
379
|
id: "blueprint",
|
|
380
380
|
name: "Blueprint",
|
|
381
381
|
description: "Sepia engineering plate on parchment",
|
|
@@ -393,7 +393,7 @@ const en = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, C
|
|
|
393
393
|
hatchOpacity: { top: 0.3, right: 0.55, left: 0.85 },
|
|
394
394
|
font: en,
|
|
395
395
|
strokeWidth: 1
|
|
396
|
-
},
|
|
396
|
+
}, Hr = {
|
|
397
397
|
id: "cyanotype",
|
|
398
398
|
name: "Cyanotype",
|
|
399
399
|
description: "White linework on classic blueprint blue",
|
|
@@ -411,11 +411,13 @@ const en = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, C
|
|
|
411
411
|
hatchOpacity: { top: 0.28, right: 0.5, left: 0.78 },
|
|
412
412
|
font: en,
|
|
413
413
|
strokeWidth: 1
|
|
414
|
-
},
|
|
415
|
-
function
|
|
416
|
-
return
|
|
414
|
+
}, Mn = { solid: In, blueprint: Wr, cyanotype: Hr };
|
|
415
|
+
function Ur(e) {
|
|
416
|
+
return Mn[e] || In;
|
|
417
417
|
}
|
|
418
|
-
const
|
|
418
|
+
const Xr = Yr.filter((e) => Mn[e].technical);
|
|
419
|
+
Xr[0];
|
|
420
|
+
const Gr = {
|
|
419
421
|
violet: "cross",
|
|
420
422
|
blue: "lines",
|
|
421
423
|
sky: "lines",
|
|
@@ -427,10 +429,10 @@ const Ur = {
|
|
|
427
429
|
zinc: "plain",
|
|
428
430
|
slate: "plain"
|
|
429
431
|
};
|
|
430
|
-
function
|
|
431
|
-
return
|
|
432
|
+
function Nn(e) {
|
|
433
|
+
return Gr[e || "zinc"] || "lines";
|
|
432
434
|
}
|
|
433
|
-
const
|
|
435
|
+
const zr = {
|
|
434
436
|
plain: "PLAIN",
|
|
435
437
|
lines: "HATCH-A",
|
|
436
438
|
cross: "HATCH-X",
|
|
@@ -440,7 +442,7 @@ const Xr = {
|
|
|
440
442
|
};
|
|
441
443
|
function xn(e, n, r, t = 0, i = 0) {
|
|
442
444
|
const l = (v, b, D) => {
|
|
443
|
-
const L =
|
|
445
|
+
const L = E(v, b, D);
|
|
444
446
|
return { x: L.screenX + t, y: L.screenY + i };
|
|
445
447
|
}, o = l(0, 0, 0), a = l(e, 0, 0), c = l(e, n, 0), s = l(0, n, 0), u = l(0, 0, r), x = l(e, 0, r), p = l(e, n, r), f = l(0, n, r), m = (v) => `M ${v.map((b) => `${b.x},${b.y}`).join(" L ")} Z`, y = (v, b) => `M ${v.x},${v.y} L ${b.x},${b.y}`, A = [o, a, c, s, u, x, p, f];
|
|
446
448
|
return {
|
|
@@ -467,17 +469,17 @@ function xn(e, n, r, t = 0, i = 0) {
|
|
|
467
469
|
function Pe(e) {
|
|
468
470
|
return String(e).padStart(2, "0");
|
|
469
471
|
}
|
|
470
|
-
const
|
|
472
|
+
const qr = {
|
|
471
473
|
top: ["n30", "p30"],
|
|
472
474
|
right: ["n30", "v"],
|
|
473
475
|
left: ["p30", "v"]
|
|
474
|
-
},
|
|
476
|
+
}, Kr = { n30: -30, p30: 30, v: 90 }, Vr = [
|
|
475
477
|
{ key: "line", spacing: 6.2, strokeWidth: 0.55 },
|
|
476
478
|
{ key: "dense", spacing: 3.1, strokeWidth: 0.45 },
|
|
477
479
|
{ key: "dash", spacing: 6.2, strokeWidth: 0.55, dash: "2.6 2.6" }
|
|
478
|
-
],
|
|
479
|
-
function
|
|
480
|
-
const [t, i] =
|
|
480
|
+
], we = 22;
|
|
481
|
+
function Pn(e, n, r) {
|
|
482
|
+
const [t, i] = qr[r];
|
|
481
483
|
switch (n) {
|
|
482
484
|
case "plain":
|
|
483
485
|
return [];
|
|
@@ -495,7 +497,7 @@ function Nn(e, n, r) {
|
|
|
495
497
|
return [`${e}-line-${t}`];
|
|
496
498
|
}
|
|
497
499
|
}
|
|
498
|
-
const
|
|
500
|
+
const Dn = (e) => `${e}-paper`, Yn = (e) => `${e}-grain`, Zr = (e, n = "line") => `${e}-arrow-${n}`, Jr = (e) => [`${e}-grid-n30`, `${e}-grid-p30`];
|
|
499
501
|
function nn({
|
|
500
502
|
uid: e,
|
|
501
503
|
style: n,
|
|
@@ -504,8 +506,8 @@ function nn({
|
|
|
504
506
|
gridTransform: r = ""
|
|
505
507
|
}) {
|
|
506
508
|
return /* @__PURE__ */ d.jsxs("defs", { children: [
|
|
507
|
-
|
|
508
|
-
(t) => Object.entries(
|
|
509
|
+
Vr.flatMap(
|
|
510
|
+
(t) => Object.entries(Kr).map(([i, l]) => /* @__PURE__ */ d.jsx(
|
|
509
511
|
"pattern",
|
|
510
512
|
{
|
|
511
513
|
id: `${e}-${t.key}-${i}`,
|
|
@@ -537,17 +539,17 @@ function nn({
|
|
|
537
539
|
"pattern",
|
|
538
540
|
{
|
|
539
541
|
id: t,
|
|
540
|
-
width:
|
|
541
|
-
height:
|
|
542
|
+
width: we,
|
|
543
|
+
height: we,
|
|
542
544
|
patternUnits: "userSpaceOnUse",
|
|
543
545
|
patternTransform: `${r} rotate(${i})`.trim(),
|
|
544
546
|
children: /* @__PURE__ */ d.jsx(
|
|
545
547
|
"line",
|
|
546
548
|
{
|
|
547
549
|
x1: -1,
|
|
548
|
-
y1:
|
|
549
|
-
x2:
|
|
550
|
-
y2:
|
|
550
|
+
y1: we / 2,
|
|
551
|
+
x2: we + 1,
|
|
552
|
+
y2: we / 2,
|
|
551
553
|
stroke: n.paper.grid,
|
|
552
554
|
strokeWidth: 0.5
|
|
553
555
|
}
|
|
@@ -555,18 +557,18 @@ function nn({
|
|
|
555
557
|
},
|
|
556
558
|
t
|
|
557
559
|
)),
|
|
558
|
-
/* @__PURE__ */ d.jsxs("linearGradient", { id:
|
|
560
|
+
/* @__PURE__ */ d.jsxs("linearGradient", { id: Dn(e), x1: "0", y1: "0", x2: "0.35", y2: "1", children: [
|
|
559
561
|
/* @__PURE__ */ d.jsx("stop", { offset: "0%", stopColor: n.paper.from }),
|
|
560
562
|
/* @__PURE__ */ d.jsx("stop", { offset: "100%", stopColor: n.paper.to })
|
|
561
563
|
] }),
|
|
562
|
-
/* @__PURE__ */ d.jsxs("filter", { id:
|
|
564
|
+
/* @__PURE__ */ d.jsxs("filter", { id: Yn(e), x: "0%", y: "0%", width: "100%", height: "100%", children: [
|
|
563
565
|
/* @__PURE__ */ d.jsx("feTurbulence", { type: "fractalNoise", baseFrequency: "0.85", numOctaves: 3, stitchTiles: "stitch" }),
|
|
564
566
|
/* @__PURE__ */ d.jsx("feColorMatrix", { type: "saturate", values: "0" })
|
|
565
567
|
] }),
|
|
566
568
|
["line", "accent"].map((t) => /* @__PURE__ */ d.jsx(
|
|
567
569
|
"marker",
|
|
568
570
|
{
|
|
569
|
-
id:
|
|
571
|
+
id: Zr(e, t),
|
|
570
572
|
markerWidth: "10",
|
|
571
573
|
markerHeight: "10",
|
|
572
574
|
refX: "8",
|
|
@@ -589,7 +591,7 @@ function nn({
|
|
|
589
591
|
))
|
|
590
592
|
] });
|
|
591
593
|
}
|
|
592
|
-
function
|
|
594
|
+
function Qr({
|
|
593
595
|
style: e,
|
|
594
596
|
rect: n,
|
|
595
597
|
pan: r,
|
|
@@ -599,13 +601,13 @@ function Zr({
|
|
|
599
601
|
const l = Qe().replace(/:/g, ""), o = r ? `translate(${r.x} ${r.y}) scale(${t})` : t !== 1 ? `scale(${t})` : "", a = n ? { x: n.x, y: n.y, width: n.width, height: n.height } : { x: 0, y: 0, width: "100%", height: "100%" };
|
|
600
602
|
return /* @__PURE__ */ d.jsxs("svg", { className: i, "aria-hidden": "true", children: [
|
|
601
603
|
/* @__PURE__ */ d.jsx(nn, { uid: l, style: e, gridTransform: o }),
|
|
602
|
-
/* @__PURE__ */ d.jsx("rect", { ...a, fill: `url(#${
|
|
603
|
-
|
|
604
|
-
e.paper.grain > 0 && /* @__PURE__ */ d.jsx("rect", { ...a, filter: `url(#${
|
|
604
|
+
/* @__PURE__ */ d.jsx("rect", { ...a, fill: `url(#${Dn(l)})` }),
|
|
605
|
+
Jr(l).map((c) => /* @__PURE__ */ d.jsx("rect", { ...a, fill: `url(#${c})`, opacity: 0.6 }, c)),
|
|
606
|
+
e.paper.grain > 0 && /* @__PURE__ */ d.jsx("rect", { ...a, filter: `url(#${Yn(l)})`, opacity: e.paper.grain })
|
|
605
607
|
] });
|
|
606
608
|
}
|
|
607
|
-
const
|
|
608
|
-
function
|
|
609
|
+
const Ie = g(10), ei = 9, mn = (e, n) => e.length > n ? `${e.slice(0, n - 1)}…` : e;
|
|
610
|
+
function ni({
|
|
609
611
|
style: e,
|
|
610
612
|
plate: n,
|
|
611
613
|
rows: r,
|
|
@@ -613,15 +615,15 @@ function Qr({
|
|
|
613
615
|
tally: i,
|
|
614
616
|
className: l = "absolute inset-0 w-full h-full pointer-events-none"
|
|
615
617
|
}) {
|
|
616
|
-
const o = Qe().replace(/:/g, ""), a = r.slice(0,
|
|
617
|
-
x: n.minX +
|
|
618
|
-
y: n.minY +
|
|
619
|
-
width: n.maxX - n.minX -
|
|
620
|
-
height: n.maxY - n.minY -
|
|
618
|
+
const o = Qe().replace(/:/g, ""), a = r.slice(0, ei), c = r.length - a.length, s = {
|
|
619
|
+
x: n.minX + Ie,
|
|
620
|
+
y: n.minY + Ie,
|
|
621
|
+
width: n.maxX - n.minX - Ie * 2,
|
|
622
|
+
height: n.maxY - n.minY - Ie * 2
|
|
621
623
|
}, u = {
|
|
622
624
|
fontFamily: e.font,
|
|
623
625
|
letterSpacing: "0.08em"
|
|
624
|
-
}, x = g(236), p = g(13), f = g(16), m = f + Math.max(a.length, 1) * p + (c > 0 ? p : 0), y = s.x + g(14), A = s.y + g(14), v = g(264), b = g(74), D = g(126), L = s.x + s.width - v - g(14),
|
|
626
|
+
}, x = g(236), p = g(13), f = g(16), m = f + Math.max(a.length, 1) * p + (c > 0 ? p : 0), y = s.x + g(14), A = s.y + g(14), v = g(264), b = g(74), D = g(126), L = s.x + s.width - v - g(14), w = s.y + s.height - b - g(14);
|
|
625
627
|
return /* @__PURE__ */ d.jsxs("svg", { className: l, style: { overflow: "visible" }, "aria-hidden": "true", children: [
|
|
626
628
|
/* @__PURE__ */ d.jsx(nn, { uid: o, style: e }),
|
|
627
629
|
/* @__PURE__ */ d.jsx(
|
|
@@ -654,10 +656,10 @@ function Qr({
|
|
|
654
656
|
[s.x + s.width, s.y, -1, 1],
|
|
655
657
|
[s.x, s.y + s.height, 1, -1],
|
|
656
658
|
[s.x + s.width, s.y + s.height, -1, -1]
|
|
657
|
-
].map(([j,
|
|
659
|
+
].map(([j, I, $, B], N) => /* @__PURE__ */ d.jsx(
|
|
658
660
|
"path",
|
|
659
661
|
{
|
|
660
|
-
d: `M ${j + $ * g(16)} ${
|
|
662
|
+
d: `M ${j + $ * g(16)} ${I} L ${j} ${I} L ${j} ${I + B * g(16)}`,
|
|
661
663
|
fill: "none",
|
|
662
664
|
stroke: e.ink.line,
|
|
663
665
|
strokeWidth: 1.2
|
|
@@ -705,8 +707,8 @@ function Qr({
|
|
|
705
707
|
]
|
|
706
708
|
}
|
|
707
709
|
),
|
|
708
|
-
a.map((j,
|
|
709
|
-
const $ = A + f +
|
|
710
|
+
a.map((j, I) => {
|
|
711
|
+
const $ = A + f + I * p, B = Nn(j.color), N = Pn(o, B, "top");
|
|
710
712
|
return /* @__PURE__ */ d.jsxs("g", { children: [
|
|
711
713
|
/* @__PURE__ */ d.jsx("text", { x: y + g(8), y: $ + g(9.5), fill: e.ink.muted, fontSize: g(7.5), style: u, children: Pe(j.n) }),
|
|
712
714
|
/* @__PURE__ */ d.jsx(
|
|
@@ -721,17 +723,17 @@ function Qr({
|
|
|
721
723
|
strokeWidth: 0.4
|
|
722
724
|
}
|
|
723
725
|
),
|
|
724
|
-
N.map((
|
|
726
|
+
N.map((R) => /* @__PURE__ */ d.jsx(
|
|
725
727
|
"rect",
|
|
726
728
|
{
|
|
727
729
|
x: y + g(28),
|
|
728
730
|
y: $ + g(3),
|
|
729
731
|
width: g(14),
|
|
730
732
|
height: g(7),
|
|
731
|
-
fill: `url(#${
|
|
733
|
+
fill: `url(#${R})`,
|
|
732
734
|
opacity: 0.85
|
|
733
735
|
},
|
|
734
|
-
|
|
736
|
+
R
|
|
735
737
|
)),
|
|
736
738
|
/* @__PURE__ */ d.jsx("text", { x: y + g(50), y: $ + g(9.5), fill: e.ink.text, fontSize: g(7.5), style: u, children: mn((j.name || "").toUpperCase(), 18) }),
|
|
737
739
|
/* @__PURE__ */ d.jsx(
|
|
@@ -743,7 +745,7 @@ function Qr({
|
|
|
743
745
|
fill: e.ink.muted,
|
|
744
746
|
fontSize: g(7),
|
|
745
747
|
style: u,
|
|
746
|
-
children:
|
|
748
|
+
children: zr[B]
|
|
747
749
|
}
|
|
748
750
|
)
|
|
749
751
|
] }, j.n);
|
|
@@ -765,7 +767,7 @@ function Qr({
|
|
|
765
767
|
"rect",
|
|
766
768
|
{
|
|
767
769
|
x: L,
|
|
768
|
-
y:
|
|
770
|
+
y: w,
|
|
769
771
|
width: v,
|
|
770
772
|
height: b,
|
|
771
773
|
fill: e.paper.from,
|
|
@@ -774,23 +776,23 @@ function Qr({
|
|
|
774
776
|
strokeWidth: 0.8
|
|
775
777
|
}
|
|
776
778
|
),
|
|
777
|
-
/* @__PURE__ */ d.jsx("line", { x1: L, y1:
|
|
778
|
-
/* @__PURE__ */ d.jsx("line", { x1: L, y1:
|
|
779
|
-
/* @__PURE__ */ d.jsx("line", { x1: L + D, y1:
|
|
780
|
-
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y:
|
|
781
|
-
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y:
|
|
782
|
-
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y:
|
|
783
|
-
/* @__PURE__ */ d.jsx("text", { x: L + D - g(9), y:
|
|
784
|
-
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y:
|
|
785
|
-
/* @__PURE__ */ d.jsx("text", { x: L + D - g(9), y:
|
|
786
|
-
/* @__PURE__ */ d.jsx("text", { x: L + D + g(9), y:
|
|
787
|
-
/* @__PURE__ */ d.jsx("text", { x: L + v - g(9), y:
|
|
788
|
-
/* @__PURE__ */ d.jsx("text", { x: L + D + g(9), y:
|
|
789
|
-
/* @__PURE__ */ d.jsx("text", { x: L + v - g(9), y:
|
|
779
|
+
/* @__PURE__ */ d.jsx("line", { x1: L, y1: w + g(30), x2: L + v, y2: w + g(30), stroke: e.ink.line, strokeWidth: 0.8 }),
|
|
780
|
+
/* @__PURE__ */ d.jsx("line", { x1: L, y1: w + g(52), x2: L + v, y2: w + g(52), stroke: e.ink.line, strokeWidth: 0.5 }),
|
|
781
|
+
/* @__PURE__ */ d.jsx("line", { x1: L + D, y1: w + g(30), x2: L + D, y2: w + b, stroke: e.ink.line, strokeWidth: 0.5 }),
|
|
782
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(12), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "DRAWING TITLE" }),
|
|
783
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(24), fill: e.ink.text, fontSize: g(10), fontWeight: 600, style: u, children: mn((t || "UNTITLED ASSEMBLY").toUpperCase(), 26) }),
|
|
784
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(43), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "PROJECTION" }),
|
|
785
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D - g(9), y: w + g(43), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: "ISOMETRIC 30°" }),
|
|
786
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(65), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "SCALE" }),
|
|
787
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D - g(9), y: w + g(65), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: "1:1" }),
|
|
788
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D + g(9), y: w + g(43), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "QTY" }),
|
|
789
|
+
/* @__PURE__ */ d.jsx("text", { x: L + v - g(9), y: w + g(43), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: i || `${Pe(r.length)} CMP` }),
|
|
790
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D + g(9), y: w + g(65), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "SHEET" }),
|
|
791
|
+
/* @__PURE__ */ d.jsx("text", { x: L + v - g(9), y: w + g(65), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: "1 OF 1" })
|
|
790
792
|
] })
|
|
791
793
|
] });
|
|
792
794
|
}
|
|
793
|
-
function
|
|
795
|
+
function ri({
|
|
794
796
|
uid: e,
|
|
795
797
|
style: n,
|
|
796
798
|
box: r,
|
|
@@ -801,7 +803,7 @@ function ei({
|
|
|
801
803
|
onClick: a,
|
|
802
804
|
onPointerDown: c
|
|
803
805
|
}) {
|
|
804
|
-
const s =
|
|
806
|
+
const s = Nn(t), u = l ? n.ink.accent : n.ink.line, x = l ? n.ink.accent : n.ink.text, p = [
|
|
805
807
|
{ face: "left", path: r.left },
|
|
806
808
|
{ face: "right", path: r.right },
|
|
807
809
|
{ face: "top", path: r.top }
|
|
@@ -816,7 +818,7 @@ function ei({
|
|
|
816
818
|
children: [
|
|
817
819
|
p.map(({ face: f, path: m }) => /* @__PURE__ */ d.jsxs("g", { children: [
|
|
818
820
|
/* @__PURE__ */ d.jsx("path", { d: m, fill: n.face[f] }),
|
|
819
|
-
|
|
821
|
+
Pn(e, s, f).map((y) => /* @__PURE__ */ d.jsx("path", { d: m, fill: `url(#${y})`, opacity: n.hatchOpacity[f] }, y))
|
|
820
822
|
] }, f)),
|
|
821
823
|
/* @__PURE__ */ d.jsx(
|
|
822
824
|
"path",
|
|
@@ -859,7 +861,7 @@ function ei({
|
|
|
859
861
|
}
|
|
860
862
|
);
|
|
861
863
|
}
|
|
862
|
-
function
|
|
864
|
+
function ii({
|
|
863
865
|
style: e,
|
|
864
866
|
box: n,
|
|
865
867
|
name: r,
|
|
@@ -928,7 +930,7 @@ function ni({
|
|
|
928
930
|
)
|
|
929
931
|
] });
|
|
930
932
|
}
|
|
931
|
-
const
|
|
933
|
+
const Bn = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', ti = {
|
|
932
934
|
blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
|
|
933
935
|
violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
|
|
934
936
|
cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
|
|
@@ -936,7 +938,7 @@ const Yn = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', ri =
|
|
|
936
938
|
amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
|
|
937
939
|
rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
|
|
938
940
|
slate: { top: "#475569", side: "#334155", front: "#1e293b" }
|
|
939
|
-
},
|
|
941
|
+
}, oi = {
|
|
940
942
|
blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
|
|
941
943
|
violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
|
|
942
944
|
cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
|
|
@@ -956,8 +958,8 @@ function Me(e, n, r) {
|
|
|
956
958
|
}, i = t(e), l = t(n), o = Math.round(i.r + (l.r - i.r) * r), a = Math.round(i.g + (l.g - i.g) * r), c = Math.round(i.b + (l.b - i.b) * r);
|
|
957
959
|
return `rgb(${o},${a},${c})`;
|
|
958
960
|
}
|
|
959
|
-
function
|
|
960
|
-
const a =
|
|
961
|
+
function li({ x: e, y: n, z: r, children: t, fontSize: i = 8, color: l = "#1e293b", shadow: o }) {
|
|
962
|
+
const a = E(e, n, r);
|
|
961
963
|
return /* @__PURE__ */ d.jsx("g", { transform: `translate(${a.screenX}, ${a.screenY})`, filter: o, children: /* @__PURE__ */ d.jsx("g", { transform: "matrix(0.866, -0.5, 0.866, 0.5, 0, 0)", children: /* @__PURE__ */ d.jsx(
|
|
962
964
|
"text",
|
|
963
965
|
{
|
|
@@ -967,14 +969,14 @@ function ti({ x: e, y: n, z: r, children: t, fontSize: i = 8, color: l = "#1e293
|
|
|
967
969
|
fill: l,
|
|
968
970
|
fontSize: i,
|
|
969
971
|
fontWeight: 600,
|
|
970
|
-
fontFamily:
|
|
972
|
+
fontFamily: Bn,
|
|
971
973
|
style: { textTransform: "uppercase", letterSpacing: "0.06em" },
|
|
972
974
|
children: t
|
|
973
975
|
}
|
|
974
976
|
) }) });
|
|
975
977
|
}
|
|
976
|
-
function
|
|
977
|
-
const s = he(e, n, a ? 8 : 2, 0, 0), u =
|
|
978
|
+
function ai({ width: e, depth: n, elevation: r, color: t, opacity: i, borderColor: l, theme: o, isGround: a }) {
|
|
979
|
+
const s = he(e, n, a ? 8 : 2, 0, 0), u = E(0, 0, r);
|
|
978
980
|
return /* @__PURE__ */ d.jsxs("g", { transform: `translate(${u.screenX}, ${u.screenY})`, children: [
|
|
979
981
|
a && /* @__PURE__ */ d.jsx("g", { transform: "translate(4, 4)", opacity: 0.2, children: /* @__PURE__ */ d.jsx("path", { d: s.top, fill: "#000" }) }),
|
|
980
982
|
/* @__PURE__ */ d.jsx("path", { d: s.top, fill: t, opacity: i }),
|
|
@@ -994,17 +996,17 @@ function oi({ width: e, depth: n, elevation: r, color: t, opacity: i, borderColo
|
|
|
994
996
|
)
|
|
995
997
|
] });
|
|
996
998
|
}
|
|
997
|
-
function
|
|
998
|
-
const { interactive: o = !0, animate: a = !0, showLabels: c = !0, expandOnHover: s = !0 } = n, { theme: u, canvas: x, origin: p, tiers: f, floorSize: m, nodes: y, cornerRadius: A = 0 } = e, v =
|
|
999
|
+
function Do({ config: e, options: n = {}, className: r, style: t, onNodeClick: i, onLayerClick: l }) {
|
|
1000
|
+
const { interactive: o = !0, animate: a = !0, showLabels: c = !0, expandOnHover: s = !0 } = n, { theme: u, canvas: x, origin: p, tiers: f, floorSize: m, nodes: y, cornerRadius: A = 0 } = e, v = Ur(e.style), b = v.technical, D = Qe().replace(/:/g, ""), L = u === "dark" ? ti : oi, w = b ? v.paper.to : u === "dark" ? "#0f172a" : "#fafafa", j = b ? v.ink.text : u === "dark" ? "#e2e8f0" : "#1e293b", I = b ? v.ink.muted : u === "dark" ? "#64748b" : "#94a3b8", $ = Fr(() => {
|
|
999
1001
|
const O = y.map((h, k) => ({ node: h, i: k })).sort((h, k) => h.node.tier - k.node.tier || h.node.y - k.node.y || h.node.x - k.node.x), S = /* @__PURE__ */ new Map();
|
|
1000
1002
|
return O.forEach(({ i: h }, k) => S.set(h, k + 1)), S;
|
|
1001
|
-
}, [y]), B = { minX: 16, minY: 16, maxX: x.width - 16, maxY: x.height - 16 }, [N,
|
|
1002
|
-
|
|
1003
|
-
a ? (
|
|
1003
|
+
}, [y]), B = { minX: 16, minY: 16, maxX: x.width - 16, maxY: x.height - 16 }, [N, R] = Le(/* @__PURE__ */ new Set());
|
|
1004
|
+
Lr(() => {
|
|
1005
|
+
a ? (R(/* @__PURE__ */ new Set()), f.forEach((O, S) => {
|
|
1004
1006
|
setTimeout(() => {
|
|
1005
|
-
|
|
1007
|
+
R((h) => /* @__PURE__ */ new Set([...h, S]));
|
|
1006
1008
|
}, S * 150 + 100);
|
|
1007
|
-
})) :
|
|
1009
|
+
})) : R(new Set(f.map((O, S) => S)));
|
|
1008
1010
|
}, [e.id, a, f.length]);
|
|
1009
1011
|
const [M, ne] = Le(null), [J, q] = Le(null), [T, W] = Le(null), Q = [...y].sort((O, S) => {
|
|
1010
1012
|
const h = f[O.tier]?.elevation || 0, k = f[S.tier]?.elevation || 0;
|
|
@@ -1017,7 +1019,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1017
1019
|
{
|
|
1018
1020
|
width: x.width,
|
|
1019
1021
|
height: x.height,
|
|
1020
|
-
style: { backgroundColor:
|
|
1022
|
+
style: { backgroundColor: w },
|
|
1021
1023
|
onClick: () => {
|
|
1022
1024
|
o && (W(null), q(null));
|
|
1023
1025
|
},
|
|
@@ -1054,7 +1056,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1054
1056
|
b ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1055
1057
|
/* @__PURE__ */ d.jsx(nn, { uid: D, style: v }),
|
|
1056
1058
|
/* @__PURE__ */ d.jsx(
|
|
1057
|
-
|
|
1059
|
+
Qr,
|
|
1058
1060
|
{
|
|
1059
1061
|
style: v,
|
|
1060
1062
|
rect: { x: 0, y: 0, width: x.width, height: x.height },
|
|
@@ -1066,7 +1068,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1066
1068
|
/* @__PURE__ */ d.jsx("rect", { width: "100%", height: "100%", fill: `url(#grid-${e.id})`, opacity: "0.5" })
|
|
1067
1069
|
] }),
|
|
1068
1070
|
/* @__PURE__ */ d.jsx("g", { transform: `translate(${p.x}, ${p.y})`, children: f.map((O, S) => {
|
|
1069
|
-
const h = Q.filter((_) => _.tier === S), k = N.has(S), F = o && (J === S || J === null && T === null && M === S), Y = o && (J !== null || M !== null || T !== null), ce = T?.tier === S, se = Y && !F && !ce, P = k ? 0 : 60, ie = k ? 1 : 0, le = F && s ? { x: 10, y: -34 } : { x: 0, y: 0 }, ke = F ? 1.03 : 1, Fe =
|
|
1071
|
+
const h = Q.filter((_) => _.tier === S), k = N.has(S), F = o && (J === S || J === null && T === null && M === S), Y = o && (J !== null || M !== null || T !== null), ce = T?.tier === S, se = Y && !F && !ce, P = k ? 0 : 60, ie = k ? 1 : 0, le = F && s ? { x: 10, y: -34 } : { x: 0, y: 0 }, ke = F ? 1.03 : 1, Fe = E(m.width / 2, m.depth / 2, O.elevation), sn = O.offset || { x: 0, y: 0 };
|
|
1070
1072
|
return /* @__PURE__ */ d.jsxs(
|
|
1071
1073
|
"g",
|
|
1072
1074
|
{
|
|
@@ -1085,7 +1087,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1085
1087
|
},
|
|
1086
1088
|
children: [
|
|
1087
1089
|
b ? /* @__PURE__ */ d.jsx(
|
|
1088
|
-
|
|
1090
|
+
ci,
|
|
1089
1091
|
{
|
|
1090
1092
|
width: m.width,
|
|
1091
1093
|
depth: m.depth,
|
|
@@ -1094,7 +1096,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1094
1096
|
isGround: S === 0
|
|
1095
1097
|
}
|
|
1096
1098
|
) : /* @__PURE__ */ d.jsx(
|
|
1097
|
-
|
|
1099
|
+
ai,
|
|
1098
1100
|
{
|
|
1099
1101
|
width: m.width,
|
|
1100
1102
|
depth: m.depth,
|
|
@@ -1107,9 +1109,9 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1107
1109
|
}
|
|
1108
1110
|
),
|
|
1109
1111
|
b && h.map((_, X) => {
|
|
1110
|
-
const me = O.elevation + 5, fe =
|
|
1112
|
+
const me = O.elevation + 5, fe = E(_.x, _.y, me), V = xn(_.width, _.depth, _.height, fe.screenX, fe.screenY), G = T?.tier === S && T?.index === X, de = o && T !== null && !G;
|
|
1111
1113
|
return /* @__PURE__ */ d.jsx(
|
|
1112
|
-
|
|
1114
|
+
ri,
|
|
1113
1115
|
{
|
|
1114
1116
|
uid: D,
|
|
1115
1117
|
style: v,
|
|
@@ -1130,9 +1132,9 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1130
1132
|
);
|
|
1131
1133
|
}),
|
|
1132
1134
|
b && c && h.map((_, X) => {
|
|
1133
|
-
const me = O.elevation + 5, fe =
|
|
1135
|
+
const me = O.elevation + 5, fe = E(_.x, _.y, me), V = xn(_.width, _.depth, _.height, fe.screenX, fe.screenY), G = T?.tier === S && T?.index === X, de = o && T !== null && !G;
|
|
1134
1136
|
return /* @__PURE__ */ d.jsx(
|
|
1135
|
-
|
|
1137
|
+
ii,
|
|
1136
1138
|
{
|
|
1137
1139
|
style: v,
|
|
1138
1140
|
box: V,
|
|
@@ -1144,7 +1146,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1144
1146
|
);
|
|
1145
1147
|
}),
|
|
1146
1148
|
!b && h.map((_, X) => {
|
|
1147
|
-
const me = O.elevation + 5, fe =
|
|
1149
|
+
const me = O.elevation + 5, fe = E(_.x, _.y, me), V = he(_.width, _.depth, _.height, fe.screenX, fe.screenY, A), G = L[_.color] || L.slate, de = T?.tier === S && T?.index === X, Ce = o && T !== null && !de, fn = E(_.x - 3, _.y - 3, O.elevation), Or = he(_.width + 6, _.depth + 6, 0, fn.screenX, fn.screenY, A).top;
|
|
1148
1150
|
return /* @__PURE__ */ d.jsxs(
|
|
1149
1151
|
"g",
|
|
1150
1152
|
{
|
|
@@ -1159,7 +1161,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1159
1161
|
} : void 0,
|
|
1160
1162
|
style: { cursor: o ? "pointer" : "default", transition: "opacity 0.3s ease-out" },
|
|
1161
1163
|
children: [
|
|
1162
|
-
/* @__PURE__ */ d.jsx("path", { d:
|
|
1164
|
+
/* @__PURE__ */ d.jsx("path", { d: Or, fill: "#000000", opacity: 0.3, filter: `url(#contact-${e.id})` }),
|
|
1163
1165
|
V.cornerBackRight?.map((re, te) => /* @__PURE__ */ d.jsx(
|
|
1164
1166
|
"path",
|
|
1165
1167
|
{
|
|
@@ -1209,7 +1211,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1209
1211
|
}
|
|
1210
1212
|
),
|
|
1211
1213
|
c && _.label && /* @__PURE__ */ d.jsx(
|
|
1212
|
-
|
|
1214
|
+
li,
|
|
1213
1215
|
{
|
|
1214
1216
|
x: _.x + _.width / 2,
|
|
1215
1217
|
y: _.y + _.depth / 2,
|
|
@@ -1228,12 +1230,12 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1228
1230
|
c && /* @__PURE__ */ d.jsx(
|
|
1229
1231
|
"text",
|
|
1230
1232
|
{
|
|
1231
|
-
x:
|
|
1232
|
-
y:
|
|
1233
|
-
fill:
|
|
1233
|
+
x: E(-25, m.depth / 2, O.elevation + 15).screenX - 35,
|
|
1234
|
+
y: E(-25, m.depth / 2, O.elevation + 15).screenY,
|
|
1235
|
+
fill: I,
|
|
1234
1236
|
fontSize: 9,
|
|
1235
1237
|
fontWeight: 500,
|
|
1236
|
-
fontFamily:
|
|
1238
|
+
fontFamily: Bn,
|
|
1237
1239
|
opacity: b ? 0.9 : 0.6,
|
|
1238
1240
|
style: { letterSpacing: "0.05em", textTransform: b ? "uppercase" : "none" },
|
|
1239
1241
|
children: O.name
|
|
@@ -1245,7 +1247,7 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1245
1247
|
);
|
|
1246
1248
|
}) }),
|
|
1247
1249
|
b && /* @__PURE__ */ d.jsx(
|
|
1248
|
-
|
|
1250
|
+
ni,
|
|
1249
1251
|
{
|
|
1250
1252
|
style: v,
|
|
1251
1253
|
plate: B,
|
|
@@ -1264,8 +1266,8 @@ function No({ config: e, options: n = {}, className: r, style: t, onNodeClick: i
|
|
|
1264
1266
|
}
|
|
1265
1267
|
) });
|
|
1266
1268
|
}
|
|
1267
|
-
function
|
|
1268
|
-
const l =
|
|
1269
|
+
function ci({ width: e, depth: n, elevation: r, ink: t, isGround: i }) {
|
|
1270
|
+
const l = E(0, 0, r), o = he(e, n, 0, l.screenX, l.screenY).top;
|
|
1269
1271
|
return /* @__PURE__ */ d.jsx(
|
|
1270
1272
|
"path",
|
|
1271
1273
|
{
|
|
@@ -1278,7 +1280,7 @@ function li({ width: e, depth: n, elevation: r, ink: t, isGround: i }) {
|
|
|
1278
1280
|
}
|
|
1279
1281
|
);
|
|
1280
1282
|
}
|
|
1281
|
-
const gn = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',
|
|
1283
|
+
const gn = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', si = {
|
|
1282
1284
|
blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
|
|
1283
1285
|
violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
|
|
1284
1286
|
cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
|
|
@@ -1286,7 +1288,7 @@ const gn = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', ai =
|
|
|
1286
1288
|
amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
|
|
1287
1289
|
rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
|
|
1288
1290
|
slate: { top: "#475569", side: "#334155", front: "#1e293b" }
|
|
1289
|
-
},
|
|
1291
|
+
}, fi = {
|
|
1290
1292
|
blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
|
|
1291
1293
|
violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
|
|
1292
1294
|
cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
|
|
@@ -1306,8 +1308,8 @@ function Ne(e, n, r) {
|
|
|
1306
1308
|
}, i = t(e), l = t(n), o = Math.round(i.r + (l.r - i.r) * r), a = Math.round(i.g + (l.g - i.g) * r), c = Math.round(i.b + (l.b - i.b) * r);
|
|
1307
1309
|
return `rgb(${o},${a},${c})`;
|
|
1308
1310
|
}
|
|
1309
|
-
function
|
|
1310
|
-
const { theme: n, canvas: r, origin: t, tiers: i, floorSize: l, nodes: o, cornerRadius: a = 0 } = e, c = n === "dark" ?
|
|
1311
|
+
function ui(e) {
|
|
1312
|
+
const { theme: n, canvas: r, origin: t, tiers: i, floorSize: l, nodes: o, cornerRadius: a = 0 } = e, c = n === "dark" ? si : fi, s = n === "dark" ? "#0f172a" : "#fafafa", u = n === "dark" ? "#e2e8f0" : "#1e293b", x = n === "dark" ? "#64748b" : "#94a3b8", p = [...o].sort((m, y) => {
|
|
1311
1313
|
const A = i[m.tier]?.elevation || 0, v = i[y.tier]?.elevation || 0;
|
|
1312
1314
|
return A !== v ? A - v : y.x + y.width + (y.y + y.depth) - (m.x + m.width + (m.y + m.depth));
|
|
1313
1315
|
});
|
|
@@ -1329,84 +1331,84 @@ function si(e) {
|
|
|
1329
1331
|
for (let m = 0; m < i.length; m++) {
|
|
1330
1332
|
const y = i[m], A = p.filter(($) => $.tier === m), v = y.offset || { x: 0, y: 0 };
|
|
1331
1333
|
f += `<g transform="translate(${v.x},${v.y})">`;
|
|
1332
|
-
const b = m === 0 ? 8 : 2, D = he(l.width, l.depth, b, 0, 0), L =
|
|
1333
|
-
f += `<g transform="translate(${L.screenX},${L.screenY})">`, m === 0 && (f += `<g transform="translate(4,4)" opacity="0.2"><path d="${D.top}" fill="#000"/></g>`), f += `<path d="${D.top}" fill="${
|
|
1334
|
+
const b = m === 0 ? 8 : 2, D = he(l.width, l.depth, b, 0, 0), L = E(0, 0, m === 0 ? -2 : y.elevation), w = y.floorColor || (n === "dark" ? "#0f172a" : "#f8fafc"), j = y.floorOpacity || (m === 0 ? 0.95 : 0.5);
|
|
1335
|
+
f += `<g transform="translate(${L.screenX},${L.screenY})">`, m === 0 && (f += `<g transform="translate(4,4)" opacity="0.2"><path d="${D.top}" fill="#000"/></g>`), f += `<path d="${D.top}" fill="${w}" opacity="${j}"/>`, m === 0 && (f += `<path d="${D.left}" fill="${n === "dark" ? "#0f172a" : "#cbd5e1"}" opacity="0.8"/>`, f += `<path d="${D.right}" fill="${n === "dark" ? "#1e293b" : "#94a3b8"}" opacity="0.8"/>`), f += `<path d="${D.top}" fill="none" stroke="${y.borderColor || (n === "dark" ? "#475569" : "#94a3b8")}" stroke-width="${m === 0 ? 1.5 : 0.75}" opacity="${m === 0 ? 1 : 0.6}"/>`, f += "</g>";
|
|
1334
1336
|
for (const $ of A) {
|
|
1335
|
-
const B = y.elevation + 5, N =
|
|
1337
|
+
const B = y.elevation + 5, N = E($.x, $.y, B), R = he($.width, $.depth, $.height, N.screenX, N.screenY, a), M = c[$.color] || c.slate, ne = $.opacity ?? 1;
|
|
1336
1338
|
f += `<g opacity="${ne}">`;
|
|
1337
|
-
const J =
|
|
1338
|
-
if (f += `<path d="${q}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`,
|
|
1339
|
-
for (const T of
|
|
1339
|
+
const J = E($.x - 3, $.y - 3, y.elevation), q = he($.width + 6, $.depth + 6, 0, J.screenX, J.screenY, a).top;
|
|
1340
|
+
if (f += `<path d="${q}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`, R.cornerBackRight)
|
|
1341
|
+
for (const T of R.cornerBackRight)
|
|
1340
1342
|
f += `<path d="${T.path}" fill="${Ne(M.front, M.side, T.intensity)}"/>`;
|
|
1341
|
-
if (
|
|
1342
|
-
for (const T of
|
|
1343
|
+
if (R.cornerBackLeft)
|
|
1344
|
+
for (const T of R.cornerBackLeft)
|
|
1343
1345
|
f += `<path d="${T.path}" fill="${Ne(M.side, M.front, T.intensity)}"/>`;
|
|
1344
|
-
if (f += `<path d="${
|
|
1345
|
-
for (const T of
|
|
1346
|
+
if (f += `<path d="${R.left}" fill="${M.side}"/>`, f += `<path d="${R.left}" fill="url(#shade)"/>`, f += `<path d="${R.right}" fill="${M.front}"/>`, f += `<path d="${R.right}" fill="url(#shade)"/>`, R.cornerFrontRight)
|
|
1347
|
+
for (const T of R.cornerFrontRight)
|
|
1346
1348
|
f += `<path d="${T.path}" fill="${Ne(M.front, M.side, T.intensity)}"/>`;
|
|
1347
|
-
if (
|
|
1348
|
-
for (const T of
|
|
1349
|
+
if (R.cornerFrontLeft)
|
|
1350
|
+
for (const T of R.cornerFrontLeft)
|
|
1349
1351
|
f += `<path d="${T.path}" fill="${Ne(M.front, M.side, T.intensity)}"/>`;
|
|
1350
|
-
if (f += `<path d="${
|
|
1351
|
-
const T =
|
|
1352
|
+
if (f += `<path d="${R.top}" fill="${M.top}"/>`, f += `<path d="${R.top}" fill="url(#sheen)"/>`, f += `<path d="${R.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`, $.label) {
|
|
1353
|
+
const T = E($.x + $.width / 2, $.y + $.depth / 2, B + $.height + 2), W = $.width > 70 ? 9 : 8;
|
|
1352
1354
|
f += `<g transform="translate(${T.screenX},${T.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="${u}" font-size="${W}" font-weight="600" font-family='${gn}' style="text-transform:uppercase;letter-spacing:0.06em">${$.label}</text>`, f += "</g></g>";
|
|
1353
1355
|
}
|
|
1354
1356
|
f += "</g>";
|
|
1355
1357
|
}
|
|
1356
|
-
const
|
|
1357
|
-
f += `<text x="${
|
|
1358
|
+
const I = E(-25, l.depth / 2, y.elevation + 15);
|
|
1359
|
+
f += `<text x="${I.screenX - 35}" y="${I.screenY}" fill="${x}" font-size="9" font-weight="500" font-family='${gn}' opacity="0.6" style="letter-spacing:0.05em">${y.name}</text>`, f += "</g>";
|
|
1358
1360
|
}
|
|
1359
1361
|
return f += "</g></svg>", f;
|
|
1360
1362
|
}
|
|
1361
|
-
function
|
|
1362
|
-
e.innerHTML =
|
|
1363
|
+
function Yo(e, n) {
|
|
1364
|
+
e.innerHTML = ui(n);
|
|
1363
1365
|
}
|
|
1364
|
-
function
|
|
1366
|
+
function Wn(e) {
|
|
1365
1367
|
return typeof e > "u" || e === null;
|
|
1366
1368
|
}
|
|
1367
|
-
function
|
|
1369
|
+
function pi(e) {
|
|
1368
1370
|
return typeof e == "object" && e !== null;
|
|
1369
1371
|
}
|
|
1370
|
-
function
|
|
1371
|
-
return Array.isArray(e) ? e :
|
|
1372
|
+
function di(e) {
|
|
1373
|
+
return Array.isArray(e) ? e : Wn(e) ? [] : [e];
|
|
1372
1374
|
}
|
|
1373
|
-
function
|
|
1375
|
+
function hi(e, n) {
|
|
1374
1376
|
var r, t, i, l;
|
|
1375
1377
|
if (n)
|
|
1376
1378
|
for (l = Object.keys(n), r = 0, t = l.length; r < t; r += 1)
|
|
1377
1379
|
i = l[r], e[i] = n[i];
|
|
1378
1380
|
return e;
|
|
1379
1381
|
}
|
|
1380
|
-
function
|
|
1382
|
+
function xi(e, n) {
|
|
1381
1383
|
var r = "", t;
|
|
1382
1384
|
for (t = 0; t < n; t += 1)
|
|
1383
1385
|
r += e;
|
|
1384
1386
|
return r;
|
|
1385
1387
|
}
|
|
1386
|
-
function
|
|
1388
|
+
function mi(e) {
|
|
1387
1389
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1388
1390
|
}
|
|
1389
|
-
var
|
|
1390
|
-
isNothing:
|
|
1391
|
-
isObject:
|
|
1392
|
-
toArray:
|
|
1393
|
-
repeat:
|
|
1394
|
-
isNegativeZero:
|
|
1395
|
-
extend:
|
|
1391
|
+
var gi = Wn, yi = pi, vi = di, bi = xi, Ai = mi, ki = hi, U = {
|
|
1392
|
+
isNothing: gi,
|
|
1393
|
+
isObject: yi,
|
|
1394
|
+
toArray: vi,
|
|
1395
|
+
repeat: bi,
|
|
1396
|
+
isNegativeZero: Ai,
|
|
1397
|
+
extend: ki
|
|
1396
1398
|
};
|
|
1397
|
-
function
|
|
1399
|
+
function Hn(e, n) {
|
|
1398
1400
|
var r = "", t = e.reason || "(unknown reason)";
|
|
1399
1401
|
return e.mark ? (e.mark.name && (r += 'in "' + e.mark.name + '" '), r += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (r += `
|
|
1400
1402
|
|
|
1401
1403
|
` + e.mark.snippet), t + " " + r) : t;
|
|
1402
1404
|
}
|
|
1403
1405
|
function Te(e, n) {
|
|
1404
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message =
|
|
1406
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = Hn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1405
1407
|
}
|
|
1406
1408
|
Te.prototype = Object.create(Error.prototype);
|
|
1407
1409
|
Te.prototype.constructor = Te;
|
|
1408
1410
|
Te.prototype.toString = function(n) {
|
|
1409
|
-
return this.name + ": " +
|
|
1411
|
+
return this.name + ": " + Hn(this, n);
|
|
1410
1412
|
};
|
|
1411
1413
|
var Z = Te;
|
|
1412
1414
|
function Xe(e, n, r, t, i) {
|
|
@@ -1420,7 +1422,7 @@ function Xe(e, n, r, t, i) {
|
|
|
1420
1422
|
function Ge(e, n) {
|
|
1421
1423
|
return U.repeat(" ", n - e.length) + e;
|
|
1422
1424
|
}
|
|
1423
|
-
function
|
|
1425
|
+
function Ci(e, n) {
|
|
1424
1426
|
if (n = Object.create(n || null), !e.buffer) return null;
|
|
1425
1427
|
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
1426
1428
|
for (var r = /\r?\n|\r|\0/g, t = [0], i = [], l, o = -1; l = r.exec(e.buffer); )
|
|
@@ -1449,7 +1451,7 @@ function Ai(e, n) {
|
|
|
1449
1451
|
`;
|
|
1450
1452
|
return a.replace(/\n$/, "");
|
|
1451
1453
|
}
|
|
1452
|
-
var
|
|
1454
|
+
var Si = Ci, Ei = [
|
|
1453
1455
|
"kind",
|
|
1454
1456
|
"multi",
|
|
1455
1457
|
"resolve",
|
|
@@ -1460,12 +1462,12 @@ var ki = Ai, Ci = [
|
|
|
1460
1462
|
"representName",
|
|
1461
1463
|
"defaultStyle",
|
|
1462
1464
|
"styleAliases"
|
|
1463
|
-
],
|
|
1465
|
+
], wi = [
|
|
1464
1466
|
"scalar",
|
|
1465
1467
|
"sequence",
|
|
1466
1468
|
"mapping"
|
|
1467
1469
|
];
|
|
1468
|
-
function
|
|
1470
|
+
function _i(e) {
|
|
1469
1471
|
var n = {};
|
|
1470
1472
|
return e !== null && Object.keys(e).forEach(function(r) {
|
|
1471
1473
|
e[r].forEach(function(t) {
|
|
@@ -1473,18 +1475,18 @@ function wi(e) {
|
|
|
1473
1475
|
});
|
|
1474
1476
|
}), n;
|
|
1475
1477
|
}
|
|
1476
|
-
function
|
|
1478
|
+
function Ti(e, n) {
|
|
1477
1479
|
if (n = n || {}, Object.keys(n).forEach(function(r) {
|
|
1478
|
-
if (
|
|
1480
|
+
if (Ei.indexOf(r) === -1)
|
|
1479
1481
|
throw new Z('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
|
|
1480
1482
|
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
1481
1483
|
return !0;
|
|
1482
1484
|
}, this.construct = n.construct || function(r) {
|
|
1483
1485
|
return r;
|
|
1484
|
-
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases =
|
|
1486
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = _i(n.styleAliases || null), wi.indexOf(this.kind) === -1)
|
|
1485
1487
|
throw new Z('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1486
1488
|
}
|
|
1487
|
-
var z =
|
|
1489
|
+
var z = Ti;
|
|
1488
1490
|
function yn(e, n) {
|
|
1489
1491
|
var r = [];
|
|
1490
1492
|
return e[n].forEach(function(t) {
|
|
@@ -1494,7 +1496,7 @@ function yn(e, n) {
|
|
|
1494
1496
|
}), r[i] = t;
|
|
1495
1497
|
}), r;
|
|
1496
1498
|
}
|
|
1497
|
-
function
|
|
1499
|
+
function $i() {
|
|
1498
1500
|
var e = {
|
|
1499
1501
|
scalar: {},
|
|
1500
1502
|
sequence: {},
|
|
@@ -1539,46 +1541,46 @@ qe.prototype.extend = function(n) {
|
|
|
1539
1541
|
throw new Z("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1540
1542
|
});
|
|
1541
1543
|
var i = Object.create(qe.prototype);
|
|
1542
|
-
return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(t), i.compiledImplicit = yn(i, "implicit"), i.compiledExplicit = yn(i, "explicit"), i.compiledTypeMap =
|
|
1544
|
+
return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(t), i.compiledImplicit = yn(i, "implicit"), i.compiledExplicit = yn(i, "explicit"), i.compiledTypeMap = $i(i.compiledImplicit, i.compiledExplicit), i;
|
|
1543
1545
|
};
|
|
1544
|
-
var
|
|
1546
|
+
var Un = qe, Xn = new z("tag:yaml.org,2002:str", {
|
|
1545
1547
|
kind: "scalar",
|
|
1546
1548
|
construct: function(e) {
|
|
1547
1549
|
return e !== null ? e : "";
|
|
1548
1550
|
}
|
|
1549
|
-
}),
|
|
1551
|
+
}), Gn = new z("tag:yaml.org,2002:seq", {
|
|
1550
1552
|
kind: "sequence",
|
|
1551
1553
|
construct: function(e) {
|
|
1552
1554
|
return e !== null ? e : [];
|
|
1553
1555
|
}
|
|
1554
|
-
}),
|
|
1556
|
+
}), zn = new z("tag:yaml.org,2002:map", {
|
|
1555
1557
|
kind: "mapping",
|
|
1556
1558
|
construct: function(e) {
|
|
1557
1559
|
return e !== null ? e : {};
|
|
1558
1560
|
}
|
|
1559
|
-
}),
|
|
1561
|
+
}), qn = new Un({
|
|
1560
1562
|
explicit: [
|
|
1561
|
-
Un,
|
|
1562
1563
|
Xn,
|
|
1563
|
-
Gn
|
|
1564
|
+
Gn,
|
|
1565
|
+
zn
|
|
1564
1566
|
]
|
|
1565
1567
|
});
|
|
1566
|
-
function
|
|
1568
|
+
function Oi(e) {
|
|
1567
1569
|
if (e === null) return !0;
|
|
1568
1570
|
var n = e.length;
|
|
1569
1571
|
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1570
1572
|
}
|
|
1571
|
-
function
|
|
1573
|
+
function ji() {
|
|
1572
1574
|
return null;
|
|
1573
1575
|
}
|
|
1574
|
-
function
|
|
1576
|
+
function Fi(e) {
|
|
1575
1577
|
return e === null;
|
|
1576
1578
|
}
|
|
1577
|
-
var
|
|
1579
|
+
var Kn = new z("tag:yaml.org,2002:null", {
|
|
1578
1580
|
kind: "scalar",
|
|
1579
|
-
resolve:
|
|
1580
|
-
construct:
|
|
1581
|
-
predicate:
|
|
1581
|
+
resolve: Oi,
|
|
1582
|
+
construct: ji,
|
|
1583
|
+
predicate: Fi,
|
|
1582
1584
|
represent: {
|
|
1583
1585
|
canonical: function() {
|
|
1584
1586
|
return "~";
|
|
@@ -1598,22 +1600,22 @@ var qn = new z("tag:yaml.org,2002:null", {
|
|
|
1598
1600
|
},
|
|
1599
1601
|
defaultStyle: "lowercase"
|
|
1600
1602
|
});
|
|
1601
|
-
function
|
|
1603
|
+
function Li(e) {
|
|
1602
1604
|
if (e === null) return !1;
|
|
1603
1605
|
var n = e.length;
|
|
1604
1606
|
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1605
1607
|
}
|
|
1606
|
-
function
|
|
1608
|
+
function Ri(e) {
|
|
1607
1609
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1608
1610
|
}
|
|
1609
|
-
function
|
|
1611
|
+
function Ii(e) {
|
|
1610
1612
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1611
1613
|
}
|
|
1612
|
-
var
|
|
1614
|
+
var Vn = new z("tag:yaml.org,2002:bool", {
|
|
1613
1615
|
kind: "scalar",
|
|
1614
|
-
resolve:
|
|
1615
|
-
construct:
|
|
1616
|
-
predicate:
|
|
1616
|
+
resolve: Li,
|
|
1617
|
+
construct: Ri,
|
|
1618
|
+
predicate: Ii,
|
|
1617
1619
|
represent: {
|
|
1618
1620
|
lowercase: function(e) {
|
|
1619
1621
|
return e ? "true" : "false";
|
|
@@ -1627,16 +1629,16 @@ var Kn = new z("tag:yaml.org,2002:bool", {
|
|
|
1627
1629
|
},
|
|
1628
1630
|
defaultStyle: "lowercase"
|
|
1629
1631
|
});
|
|
1630
|
-
function
|
|
1632
|
+
function Mi(e) {
|
|
1631
1633
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1632
1634
|
}
|
|
1633
|
-
function
|
|
1635
|
+
function Ni(e) {
|
|
1634
1636
|
return 48 <= e && e <= 55;
|
|
1635
1637
|
}
|
|
1636
|
-
function
|
|
1638
|
+
function Pi(e) {
|
|
1637
1639
|
return 48 <= e && e <= 57;
|
|
1638
1640
|
}
|
|
1639
|
-
function
|
|
1641
|
+
function Di(e) {
|
|
1640
1642
|
if (e === null) return !1;
|
|
1641
1643
|
var n = e.length, r = 0, t = !1, i;
|
|
1642
1644
|
if (!n) return !1;
|
|
@@ -1653,7 +1655,7 @@ function Ni(e) {
|
|
|
1653
1655
|
if (i === "x") {
|
|
1654
1656
|
for (r++; r < n; r++)
|
|
1655
1657
|
if (i = e[r], i !== "_") {
|
|
1656
|
-
if (!
|
|
1658
|
+
if (!Mi(e.charCodeAt(r))) return !1;
|
|
1657
1659
|
t = !0;
|
|
1658
1660
|
}
|
|
1659
1661
|
return t && i !== "_";
|
|
@@ -1661,7 +1663,7 @@ function Ni(e) {
|
|
|
1661
1663
|
if (i === "o") {
|
|
1662
1664
|
for (r++; r < n; r++)
|
|
1663
1665
|
if (i = e[r], i !== "_") {
|
|
1664
|
-
if (!
|
|
1666
|
+
if (!Ni(e.charCodeAt(r))) return !1;
|
|
1665
1667
|
t = !0;
|
|
1666
1668
|
}
|
|
1667
1669
|
return t && i !== "_";
|
|
@@ -1670,13 +1672,13 @@ function Ni(e) {
|
|
|
1670
1672
|
if (i === "_") return !1;
|
|
1671
1673
|
for (; r < n; r++)
|
|
1672
1674
|
if (i = e[r], i !== "_") {
|
|
1673
|
-
if (!
|
|
1675
|
+
if (!Pi(e.charCodeAt(r)))
|
|
1674
1676
|
return !1;
|
|
1675
1677
|
t = !0;
|
|
1676
1678
|
}
|
|
1677
1679
|
return !(!t || i === "_");
|
|
1678
1680
|
}
|
|
1679
|
-
function
|
|
1681
|
+
function Yi(e) {
|
|
1680
1682
|
var n = e, r = 1, t;
|
|
1681
1683
|
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), t = n[0], (t === "-" || t === "+") && (t === "-" && (r = -1), n = n.slice(1), t = n[0]), n === "0") return 0;
|
|
1682
1684
|
if (t === "0") {
|
|
@@ -1686,14 +1688,14 @@ function Pi(e) {
|
|
|
1686
1688
|
}
|
|
1687
1689
|
return r * parseInt(n, 10);
|
|
1688
1690
|
}
|
|
1689
|
-
function
|
|
1691
|
+
function Bi(e) {
|
|
1690
1692
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !U.isNegativeZero(e);
|
|
1691
1693
|
}
|
|
1692
|
-
var
|
|
1694
|
+
var Zn = new z("tag:yaml.org,2002:int", {
|
|
1693
1695
|
kind: "scalar",
|
|
1694
|
-
resolve:
|
|
1695
|
-
construct:
|
|
1696
|
-
predicate:
|
|
1696
|
+
resolve: Di,
|
|
1697
|
+
construct: Yi,
|
|
1698
|
+
predicate: Bi,
|
|
1697
1699
|
represent: {
|
|
1698
1700
|
binary: function(e) {
|
|
1699
1701
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1716,21 +1718,21 @@ var Vn = new z("tag:yaml.org,2002:int", {
|
|
|
1716
1718
|
decimal: [10, "dec"],
|
|
1717
1719
|
hexadecimal: [16, "hex"]
|
|
1718
1720
|
}
|
|
1719
|
-
}),
|
|
1721
|
+
}), Wi = new RegExp(
|
|
1720
1722
|
// 2.5e4, 2.5 and integers
|
|
1721
1723
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1722
1724
|
);
|
|
1723
|
-
function
|
|
1724
|
-
return !(e === null || !
|
|
1725
|
+
function Hi(e) {
|
|
1726
|
+
return !(e === null || !Wi.test(e) || // Quick hack to not allow integers end with `_`
|
|
1725
1727
|
// Probably should update regexp & check speed
|
|
1726
1728
|
e[e.length - 1] === "_");
|
|
1727
1729
|
}
|
|
1728
|
-
function
|
|
1730
|
+
function Ui(e) {
|
|
1729
1731
|
var n, r;
|
|
1730
1732
|
return n = e.replace(/_/g, "").toLowerCase(), r = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : r * parseFloat(n, 10);
|
|
1731
1733
|
}
|
|
1732
|
-
var
|
|
1733
|
-
function
|
|
1734
|
+
var Xi = /^[-+]?[0-9]+e/;
|
|
1735
|
+
function Gi(e, n) {
|
|
1734
1736
|
var r;
|
|
1735
1737
|
if (isNaN(e))
|
|
1736
1738
|
switch (n) {
|
|
@@ -1761,36 +1763,36 @@ function Ui(e, n) {
|
|
|
1761
1763
|
}
|
|
1762
1764
|
else if (U.isNegativeZero(e))
|
|
1763
1765
|
return "-0.0";
|
|
1764
|
-
return r = e.toString(10),
|
|
1766
|
+
return r = e.toString(10), Xi.test(r) ? r.replace("e", ".e") : r;
|
|
1765
1767
|
}
|
|
1766
|
-
function
|
|
1768
|
+
function zi(e) {
|
|
1767
1769
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || U.isNegativeZero(e));
|
|
1768
1770
|
}
|
|
1769
|
-
var
|
|
1771
|
+
var Jn = new z("tag:yaml.org,2002:float", {
|
|
1770
1772
|
kind: "scalar",
|
|
1771
|
-
resolve:
|
|
1772
|
-
construct:
|
|
1773
|
-
predicate:
|
|
1774
|
-
represent:
|
|
1773
|
+
resolve: Hi,
|
|
1774
|
+
construct: Ui,
|
|
1775
|
+
predicate: zi,
|
|
1776
|
+
represent: Gi,
|
|
1775
1777
|
defaultStyle: "lowercase"
|
|
1776
|
-
}),
|
|
1778
|
+
}), Qn = qn.extend({
|
|
1777
1779
|
implicit: [
|
|
1778
|
-
qn,
|
|
1779
1780
|
Kn,
|
|
1780
1781
|
Vn,
|
|
1781
|
-
Zn
|
|
1782
|
+
Zn,
|
|
1783
|
+
Jn
|
|
1782
1784
|
]
|
|
1783
|
-
}),
|
|
1785
|
+
}), er = Qn, nr = new RegExp(
|
|
1784
1786
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1785
|
-
),
|
|
1787
|
+
), rr = new RegExp(
|
|
1786
1788
|
"^([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]))?))?$"
|
|
1787
1789
|
);
|
|
1788
|
-
function
|
|
1789
|
-
return e === null ? !1 :
|
|
1790
|
+
function qi(e) {
|
|
1791
|
+
return e === null ? !1 : nr.exec(e) !== null || rr.exec(e) !== null;
|
|
1790
1792
|
}
|
|
1791
|
-
function
|
|
1793
|
+
function Ki(e) {
|
|
1792
1794
|
var n, r, t, i, l, o, a, c = 0, s = null, u, x, p;
|
|
1793
|
-
if (n =
|
|
1795
|
+
if (n = nr.exec(e), n === null && (n = rr.exec(e)), n === null) throw new Error("Date resolve error");
|
|
1794
1796
|
if (r = +n[1], t = +n[2] - 1, i = +n[3], !n[4])
|
|
1795
1797
|
return new Date(Date.UTC(r, t, i));
|
|
1796
1798
|
if (l = +n[4], o = +n[5], a = +n[6], n[7]) {
|
|
@@ -1800,25 +1802,25 @@ function zi(e) {
|
|
|
1800
1802
|
}
|
|
1801
1803
|
return n[9] && (u = +n[10], x = +(n[11] || 0), s = (u * 60 + x) * 6e4, n[9] === "-" && (s = -s)), p = new Date(Date.UTC(r, t, i, l, o, a, c)), s && p.setTime(p.getTime() - s), p;
|
|
1802
1804
|
}
|
|
1803
|
-
function
|
|
1805
|
+
function Vi(e) {
|
|
1804
1806
|
return e.toISOString();
|
|
1805
1807
|
}
|
|
1806
|
-
var
|
|
1808
|
+
var ir = new z("tag:yaml.org,2002:timestamp", {
|
|
1807
1809
|
kind: "scalar",
|
|
1808
|
-
resolve:
|
|
1809
|
-
construct:
|
|
1810
|
+
resolve: qi,
|
|
1811
|
+
construct: Ki,
|
|
1810
1812
|
instanceOf: Date,
|
|
1811
|
-
represent:
|
|
1813
|
+
represent: Vi
|
|
1812
1814
|
});
|
|
1813
|
-
function
|
|
1815
|
+
function Zi(e) {
|
|
1814
1816
|
return e === "<<" || e === null;
|
|
1815
1817
|
}
|
|
1816
|
-
var
|
|
1818
|
+
var tr = new z("tag:yaml.org,2002:merge", {
|
|
1817
1819
|
kind: "scalar",
|
|
1818
|
-
resolve:
|
|
1820
|
+
resolve: Zi
|
|
1819
1821
|
}), rn = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1820
1822
|
\r`;
|
|
1821
|
-
function
|
|
1823
|
+
function Ji(e) {
|
|
1822
1824
|
if (e === null) return !1;
|
|
1823
1825
|
var n, r, t = 0, i = e.length, l = rn;
|
|
1824
1826
|
for (r = 0; r < i; r++)
|
|
@@ -1828,35 +1830,35 @@ function Vi(e) {
|
|
|
1828
1830
|
}
|
|
1829
1831
|
return t % 8 === 0;
|
|
1830
1832
|
}
|
|
1831
|
-
function
|
|
1833
|
+
function Qi(e) {
|
|
1832
1834
|
var n, r, t = e.replace(/[\r\n=]/g, ""), i = t.length, l = rn, o = 0, a = [];
|
|
1833
1835
|
for (n = 0; n < i; n++)
|
|
1834
1836
|
n % 4 === 0 && n && (a.push(o >> 16 & 255), a.push(o >> 8 & 255), a.push(o & 255)), o = o << 6 | l.indexOf(t.charAt(n));
|
|
1835
1837
|
return r = i % 4 * 6, r === 0 ? (a.push(o >> 16 & 255), a.push(o >> 8 & 255), a.push(o & 255)) : r === 18 ? (a.push(o >> 10 & 255), a.push(o >> 2 & 255)) : r === 12 && a.push(o >> 4 & 255), new Uint8Array(a);
|
|
1836
1838
|
}
|
|
1837
|
-
function
|
|
1839
|
+
function et(e) {
|
|
1838
1840
|
var n = "", r = 0, t, i, l = e.length, o = rn;
|
|
1839
1841
|
for (t = 0; t < l; t++)
|
|
1840
1842
|
t % 3 === 0 && t && (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]), r = (r << 8) + e[t];
|
|
1841
1843
|
return i = l % 3, i === 0 ? (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]) : i === 2 ? (n += o[r >> 10 & 63], n += o[r >> 4 & 63], n += o[r << 2 & 63], n += o[64]) : i === 1 && (n += o[r >> 2 & 63], n += o[r << 4 & 63], n += o[64], n += o[64]), n;
|
|
1842
1844
|
}
|
|
1843
|
-
function
|
|
1845
|
+
function nt(e) {
|
|
1844
1846
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1845
1847
|
}
|
|
1846
|
-
var
|
|
1848
|
+
var or = new z("tag:yaml.org,2002:binary", {
|
|
1847
1849
|
kind: "scalar",
|
|
1848
|
-
resolve:
|
|
1849
|
-
construct:
|
|
1850
|
-
predicate:
|
|
1851
|
-
represent:
|
|
1852
|
-
}),
|
|
1853
|
-
function
|
|
1850
|
+
resolve: Ji,
|
|
1851
|
+
construct: Qi,
|
|
1852
|
+
predicate: nt,
|
|
1853
|
+
represent: et
|
|
1854
|
+
}), rt = Object.prototype.hasOwnProperty, it = Object.prototype.toString;
|
|
1855
|
+
function tt(e) {
|
|
1854
1856
|
if (e === null) return !0;
|
|
1855
1857
|
var n = [], r, t, i, l, o, a = e;
|
|
1856
1858
|
for (r = 0, t = a.length; r < t; r += 1) {
|
|
1857
|
-
if (i = a[r], o = !1,
|
|
1859
|
+
if (i = a[r], o = !1, it.call(i) !== "[object Object]") return !1;
|
|
1858
1860
|
for (l in i)
|
|
1859
|
-
if (
|
|
1861
|
+
if (rt.call(i, l))
|
|
1860
1862
|
if (!o) o = !0;
|
|
1861
1863
|
else return !1;
|
|
1862
1864
|
if (!o) return !1;
|
|
@@ -1865,62 +1867,62 @@ function rt(e) {
|
|
|
1865
1867
|
}
|
|
1866
1868
|
return !0;
|
|
1867
1869
|
}
|
|
1868
|
-
function
|
|
1870
|
+
function ot(e) {
|
|
1869
1871
|
return e !== null ? e : [];
|
|
1870
1872
|
}
|
|
1871
|
-
var
|
|
1873
|
+
var lr = new z("tag:yaml.org,2002:omap", {
|
|
1872
1874
|
kind: "sequence",
|
|
1873
|
-
resolve:
|
|
1874
|
-
construct:
|
|
1875
|
-
}),
|
|
1876
|
-
function
|
|
1875
|
+
resolve: tt,
|
|
1876
|
+
construct: ot
|
|
1877
|
+
}), lt = Object.prototype.toString;
|
|
1878
|
+
function at(e) {
|
|
1877
1879
|
if (e === null) return !0;
|
|
1878
1880
|
var n, r, t, i, l, o = e;
|
|
1879
1881
|
for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1) {
|
|
1880
|
-
if (t = o[n],
|
|
1882
|
+
if (t = o[n], lt.call(t) !== "[object Object]" || (i = Object.keys(t), i.length !== 1)) return !1;
|
|
1881
1883
|
l[n] = [i[0], t[i[0]]];
|
|
1882
1884
|
}
|
|
1883
1885
|
return !0;
|
|
1884
1886
|
}
|
|
1885
|
-
function
|
|
1887
|
+
function ct(e) {
|
|
1886
1888
|
if (e === null) return [];
|
|
1887
1889
|
var n, r, t, i, l, o = e;
|
|
1888
1890
|
for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1)
|
|
1889
1891
|
t = o[n], i = Object.keys(t), l[n] = [i[0], t[i[0]]];
|
|
1890
1892
|
return l;
|
|
1891
1893
|
}
|
|
1892
|
-
var
|
|
1894
|
+
var ar = new z("tag:yaml.org,2002:pairs", {
|
|
1893
1895
|
kind: "sequence",
|
|
1894
|
-
resolve:
|
|
1895
|
-
construct:
|
|
1896
|
-
}),
|
|
1897
|
-
function
|
|
1896
|
+
resolve: at,
|
|
1897
|
+
construct: ct
|
|
1898
|
+
}), st = Object.prototype.hasOwnProperty;
|
|
1899
|
+
function ft(e) {
|
|
1898
1900
|
if (e === null) return !0;
|
|
1899
1901
|
var n, r = e;
|
|
1900
1902
|
for (n in r)
|
|
1901
|
-
if (
|
|
1903
|
+
if (st.call(r, n) && r[n] !== null)
|
|
1902
1904
|
return !1;
|
|
1903
1905
|
return !0;
|
|
1904
1906
|
}
|
|
1905
|
-
function
|
|
1907
|
+
function ut(e) {
|
|
1906
1908
|
return e !== null ? e : {};
|
|
1907
1909
|
}
|
|
1908
|
-
var
|
|
1910
|
+
var cr = new z("tag:yaml.org,2002:set", {
|
|
1909
1911
|
kind: "mapping",
|
|
1910
|
-
resolve:
|
|
1911
|
-
construct:
|
|
1912
|
-
}), tn =
|
|
1912
|
+
resolve: ft,
|
|
1913
|
+
construct: ut
|
|
1914
|
+
}), tn = er.extend({
|
|
1913
1915
|
implicit: [
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
+
ir,
|
|
1917
|
+
tr
|
|
1916
1918
|
],
|
|
1917
1919
|
explicit: [
|
|
1918
|
-
tr,
|
|
1919
1920
|
or,
|
|
1920
1921
|
lr,
|
|
1921
|
-
ar
|
|
1922
|
+
ar,
|
|
1923
|
+
cr
|
|
1922
1924
|
]
|
|
1923
|
-
}), pe = Object.prototype.hasOwnProperty, De = 1,
|
|
1925
|
+
}), pe = Object.prototype.hasOwnProperty, De = 1, sr = 2, fr = 3, Ye = 4, ze = 1, pt = 2, vn = 3, dt = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ht = /[\x85\u2028\u2029]/, xt = /[,\[\]\{\}]/, ur = /^(?:!|!!|![a-z\-]+!)$/i, pr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1924
1926
|
function bn(e) {
|
|
1925
1927
|
return Object.prototype.toString.call(e);
|
|
1926
1928
|
}
|
|
@@ -1936,27 +1938,27 @@ function ee(e) {
|
|
|
1936
1938
|
function ve(e) {
|
|
1937
1939
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1938
1940
|
}
|
|
1939
|
-
function
|
|
1941
|
+
function mt(e) {
|
|
1940
1942
|
var n;
|
|
1941
1943
|
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1942
1944
|
}
|
|
1943
|
-
function
|
|
1945
|
+
function gt(e) {
|
|
1944
1946
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1945
1947
|
}
|
|
1946
|
-
function
|
|
1948
|
+
function yt(e) {
|
|
1947
1949
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1948
1950
|
}
|
|
1949
1951
|
function An(e) {
|
|
1950
1952
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1951
1953
|
` : 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" : "";
|
|
1952
1954
|
}
|
|
1953
|
-
function
|
|
1955
|
+
function vt(e) {
|
|
1954
1956
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1955
1957
|
(e - 65536 >> 10) + 55296,
|
|
1956
1958
|
(e - 65536 & 1023) + 56320
|
|
1957
1959
|
);
|
|
1958
1960
|
}
|
|
1959
|
-
function
|
|
1961
|
+
function dr(e, n, r) {
|
|
1960
1962
|
n === "__proto__" ? Object.defineProperty(e, n, {
|
|
1961
1963
|
configurable: !0,
|
|
1962
1964
|
enumerable: !0,
|
|
@@ -1964,13 +1966,13 @@ function pr(e, n, r) {
|
|
|
1964
1966
|
value: r
|
|
1965
1967
|
}) : e[n] = r;
|
|
1966
1968
|
}
|
|
1967
|
-
var
|
|
1969
|
+
var hr = new Array(256), xr = new Array(256);
|
|
1968
1970
|
for (var ge = 0; ge < 256; ge++)
|
|
1969
|
-
|
|
1970
|
-
function
|
|
1971
|
+
hr[ge] = An(ge) ? 1 : 0, xr[ge] = An(ge);
|
|
1972
|
+
function bt(e, n) {
|
|
1971
1973
|
this.input = e, this.filename = n.filename || null, this.schema = n.schema || tn, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.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 = [];
|
|
1972
1974
|
}
|
|
1973
|
-
function
|
|
1975
|
+
function mr(e, n) {
|
|
1974
1976
|
var r = {
|
|
1975
1977
|
name: e.filename,
|
|
1976
1978
|
buffer: e.input.slice(0, -1),
|
|
@@ -1979,13 +1981,13 @@ function xr(e, n) {
|
|
|
1979
1981
|
line: e.line,
|
|
1980
1982
|
column: e.position - e.lineStart
|
|
1981
1983
|
};
|
|
1982
|
-
return r.snippet =
|
|
1984
|
+
return r.snippet = Si(r), new Z(n, r);
|
|
1983
1985
|
}
|
|
1984
1986
|
function C(e, n) {
|
|
1985
|
-
throw
|
|
1987
|
+
throw mr(e, n);
|
|
1986
1988
|
}
|
|
1987
1989
|
function Be(e, n) {
|
|
1988
|
-
e.onWarning && e.onWarning.call(null,
|
|
1990
|
+
e.onWarning && e.onWarning.call(null, mr(e, n));
|
|
1989
1991
|
}
|
|
1990
1992
|
var kn = {
|
|
1991
1993
|
YAML: function(n, r, t) {
|
|
@@ -1994,7 +1996,7 @@ var kn = {
|
|
|
1994
1996
|
},
|
|
1995
1997
|
TAG: function(n, r, t) {
|
|
1996
1998
|
var i, l;
|
|
1997
|
-
t.length !== 2 && C(n, "TAG directive accepts exactly two arguments"), i = t[0], l = t[1],
|
|
1999
|
+
t.length !== 2 && C(n, "TAG directive accepts exactly two arguments"), i = t[0], l = t[1], ur.test(i) || C(n, "ill-formed tag handle (first argument) of the TAG directive"), pe.call(n.tagMap, i) && C(n, 'there is a previously declared suffix for "' + i + '" tag handle'), pr.test(l) || C(n, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1998
2000
|
try {
|
|
1999
2001
|
l = decodeURIComponent(l);
|
|
2000
2002
|
} catch {
|
|
@@ -2009,14 +2011,14 @@ function ue(e, n, r, t) {
|
|
|
2009
2011
|
if (a = e.input.slice(n, r), t)
|
|
2010
2012
|
for (i = 0, l = a.length; i < l; i += 1)
|
|
2011
2013
|
o = a.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || C(e, "expected valid JSON character");
|
|
2012
|
-
else
|
|
2014
|
+
else dt.test(a) && C(e, "the stream contains non-printable characters");
|
|
2013
2015
|
e.result += a;
|
|
2014
2016
|
}
|
|
2015
2017
|
}
|
|
2016
2018
|
function Cn(e, n, r, t) {
|
|
2017
2019
|
var i, l, o, a;
|
|
2018
2020
|
for (U.isObject(r) || C(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(r), o = 0, a = i.length; o < a; o += 1)
|
|
2019
|
-
l = i[o], pe.call(n, l) || (
|
|
2021
|
+
l = i[o], pe.call(n, l) || (dr(n, l, r[l]), t[l] = !0);
|
|
2020
2022
|
}
|
|
2021
2023
|
function be(e, n, r, t, i, l, o, a, c) {
|
|
2022
2024
|
var s, u;
|
|
@@ -2030,7 +2032,7 @@ function be(e, n, r, t, i, l, o, a, c) {
|
|
|
2030
2032
|
else
|
|
2031
2033
|
Cn(e, n, l, r);
|
|
2032
2034
|
else
|
|
2033
|
-
!e.json && !pe.call(r, i) && pe.call(n, i) && (e.line = o || e.line, e.lineStart = a || e.lineStart, e.position = c || e.position, C(e, "duplicated mapping key")),
|
|
2035
|
+
!e.json && !pe.call(r, i) && pe.call(n, i) && (e.line = o || e.line, e.lineStart = a || e.lineStart, e.position = c || e.position, C(e, "duplicated mapping key")), dr(n, i, l), delete r[i];
|
|
2034
2036
|
return n;
|
|
2035
2037
|
}
|
|
2036
2038
|
function on(e) {
|
|
@@ -2061,7 +2063,7 @@ function ln(e, n) {
|
|
|
2061
2063
|
n === 1 ? e.result += " " : n > 1 && (e.result += U.repeat(`
|
|
2062
2064
|
`, n - 1));
|
|
2063
2065
|
}
|
|
2064
|
-
function
|
|
2066
|
+
function At(e, n, r) {
|
|
2065
2067
|
var t, i, l, o, a, c, s, u, x = e.kind, p = e.result, f;
|
|
2066
2068
|
if (f = e.input.charCodeAt(e.position), ee(f) || ve(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), ee(i) || r && ve(i)))
|
|
2067
2069
|
return !1;
|
|
@@ -2088,7 +2090,7 @@ function vt(e, n, r) {
|
|
|
2088
2090
|
}
|
|
2089
2091
|
return ue(e, l, o, !1), e.result ? !0 : (e.kind = x, e.result = p, !1);
|
|
2090
2092
|
}
|
|
2091
|
-
function
|
|
2093
|
+
function kt(e, n) {
|
|
2092
2094
|
var r, t, i;
|
|
2093
2095
|
if (r = e.input.charCodeAt(e.position), r !== 39)
|
|
2094
2096
|
return !1;
|
|
@@ -2101,7 +2103,7 @@ function bt(e, n) {
|
|
|
2101
2103
|
else oe(r) ? (ue(e, t, i, !0), ln(e, H(e, !1, n)), t = i = e.position) : e.position === e.lineStart && Ue(e) ? C(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
2102
2104
|
C(e, "unexpected end of the stream within a single quoted scalar");
|
|
2103
2105
|
}
|
|
2104
|
-
function
|
|
2106
|
+
function Ct(e, n) {
|
|
2105
2107
|
var r, t, i, l, o, a;
|
|
2106
2108
|
if (a = e.input.charCodeAt(e.position), a !== 34)
|
|
2107
2109
|
return !1;
|
|
@@ -2111,12 +2113,12 @@ function At(e, n) {
|
|
|
2111
2113
|
if (a === 92) {
|
|
2112
2114
|
if (ue(e, r, e.position, !0), a = e.input.charCodeAt(++e.position), oe(a))
|
|
2113
2115
|
H(e, !1, n);
|
|
2114
|
-
else if (a < 256 &&
|
|
2115
|
-
e.result +=
|
|
2116
|
-
else if ((o =
|
|
2116
|
+
else if (a < 256 && hr[a])
|
|
2117
|
+
e.result += xr[a], e.position++;
|
|
2118
|
+
else if ((o = gt(a)) > 0) {
|
|
2117
2119
|
for (i = o, l = 0; i > 0; i--)
|
|
2118
|
-
a = e.input.charCodeAt(++e.position), (o =
|
|
2119
|
-
e.result +=
|
|
2120
|
+
a = e.input.charCodeAt(++e.position), (o = mt(a)) >= 0 ? l = (l << 4) + o : C(e, "expected hexadecimal character");
|
|
2121
|
+
e.result += vt(l), e.position++;
|
|
2120
2122
|
} else
|
|
2121
2123
|
C(e, "unknown escape sequence");
|
|
2122
2124
|
r = t = e.position;
|
|
@@ -2124,7 +2126,7 @@ function At(e, n) {
|
|
|
2124
2126
|
}
|
|
2125
2127
|
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
2126
2128
|
}
|
|
2127
|
-
function
|
|
2129
|
+
function St(e, n) {
|
|
2128
2130
|
var r = !0, t, i, l, o = e.tag, a, c = e.anchor, s, u, x, p, f, m = /* @__PURE__ */ Object.create(null), y, A, v, b;
|
|
2129
2131
|
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
2130
2132
|
u = 93, f = !1, a = [];
|
|
@@ -2139,7 +2141,7 @@ function kt(e, n) {
|
|
|
2139
2141
|
}
|
|
2140
2142
|
C(e, "unexpected end of the stream within a flow collection");
|
|
2141
2143
|
}
|
|
2142
|
-
function
|
|
2144
|
+
function Et(e, n) {
|
|
2143
2145
|
var r, t, i = ze, l = !1, o = !1, a = n, c = 0, s = !1, u, x;
|
|
2144
2146
|
if (x = e.input.charCodeAt(e.position), x === 124)
|
|
2145
2147
|
t = !1;
|
|
@@ -2149,8 +2151,8 @@ function Ct(e, n) {
|
|
|
2149
2151
|
return !1;
|
|
2150
2152
|
for (e.kind = "scalar", e.result = ""; x !== 0; )
|
|
2151
2153
|
if (x = e.input.charCodeAt(++e.position), x === 43 || x === 45)
|
|
2152
|
-
ze === i ? i = x === 43 ? vn :
|
|
2153
|
-
else if ((u =
|
|
2154
|
+
ze === i ? i = x === 43 ? vn : pt : C(e, "repeat of a chomping mode identifier");
|
|
2155
|
+
else if ((u = yt(x)) >= 0)
|
|
2154
2156
|
u === 0 ? C(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? C(e, "repeat of an indentation width identifier") : (a = n + u - 1, o = !0);
|
|
2155
2157
|
else
|
|
2156
2158
|
break;
|
|
@@ -2194,21 +2196,21 @@ function Sn(e, n) {
|
|
|
2194
2196
|
l.push(null), c = e.input.charCodeAt(e.position);
|
|
2195
2197
|
continue;
|
|
2196
2198
|
}
|
|
2197
|
-
if (r = e.line, Ae(e, n,
|
|
2199
|
+
if (r = e.line, Ae(e, n, fr, !1, !0), l.push(e.result), H(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === r || e.lineIndent > n) && c !== 0)
|
|
2198
2200
|
C(e, "bad indentation of a sequence entry");
|
|
2199
2201
|
else if (e.lineIndent < n)
|
|
2200
2202
|
break;
|
|
2201
2203
|
}
|
|
2202
2204
|
return a ? (e.tag = t, e.anchor = i, e.kind = "sequence", e.result = l, !0) : !1;
|
|
2203
2205
|
}
|
|
2204
|
-
function
|
|
2206
|
+
function wt(e, n, r) {
|
|
2205
2207
|
var t, i, l, o, a, c, s = e.tag, u = e.anchor, x = {}, p = /* @__PURE__ */ Object.create(null), f = null, m = null, y = null, A = !1, v = !1, b;
|
|
2206
2208
|
if (e.firstTabInLine !== -1) return !1;
|
|
2207
2209
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = x), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
2208
2210
|
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, C(e, "tab characters must not be used in indentation")), t = e.input.charCodeAt(e.position + 1), l = e.line, (b === 63 || b === 58) && ee(t))
|
|
2209
2211
|
b === 63 ? (A && (be(e, x, p, f, m, null, o, a, c), f = m = y = null), v = !0, A = !0, i = !0) : A ? (A = !1, i = !0) : C(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = t;
|
|
2210
2212
|
else {
|
|
2211
|
-
if (o = e.line, a = e.lineStart, c = e.position, !Ae(e, r,
|
|
2213
|
+
if (o = e.line, a = e.lineStart, c = e.position, !Ae(e, r, sr, !1, !0))
|
|
2212
2214
|
break;
|
|
2213
2215
|
if (e.line === l) {
|
|
2214
2216
|
for (b = e.input.charCodeAt(e.position); xe(b); )
|
|
@@ -2231,7 +2233,7 @@ function St(e, n, r) {
|
|
|
2231
2233
|
}
|
|
2232
2234
|
return A && be(e, x, p, f, m, null, o, a, c), v && (e.tag = s, e.anchor = u, e.kind = "mapping", e.result = x), v;
|
|
2233
2235
|
}
|
|
2234
|
-
function
|
|
2236
|
+
function _t(e) {
|
|
2235
2237
|
var n, r = !1, t = !1, i, l, o;
|
|
2236
2238
|
if (o = e.input.charCodeAt(e.position), o !== 33) return !1;
|
|
2237
2239
|
if (e.tag !== null && C(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (r = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (t = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", n = e.position, r) {
|
|
@@ -2241,10 +2243,10 @@ function wt(e) {
|
|
|
2241
2243
|
e.position < e.length ? (l = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) : C(e, "unexpected end of the stream within a verbatim tag");
|
|
2242
2244
|
} else {
|
|
2243
2245
|
for (; o !== 0 && !ee(o); )
|
|
2244
|
-
o === 33 && (t ? C(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(n - 1, e.position + 1),
|
|
2245
|
-
l = e.input.slice(n, e.position),
|
|
2246
|
+
o === 33 && (t ? C(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(n - 1, e.position + 1), ur.test(i) || C(e, "named tag handle cannot contain such characters"), t = !0, n = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2247
|
+
l = e.input.slice(n, e.position), xt.test(l) && C(e, "tag suffix cannot contain flow indicator characters");
|
|
2246
2248
|
}
|
|
2247
|
-
l && !
|
|
2249
|
+
l && !pr.test(l) && C(e, "tag name cannot contain such characters: " + l);
|
|
2248
2250
|
try {
|
|
2249
2251
|
l = decodeURIComponent(l);
|
|
2250
2252
|
} catch {
|
|
@@ -2252,14 +2254,14 @@ function wt(e) {
|
|
|
2252
2254
|
}
|
|
2253
2255
|
return r ? e.tag = l : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + l : i === "!" ? e.tag = "!" + l : i === "!!" ? e.tag = "tag:yaml.org,2002:" + l : C(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
2254
2256
|
}
|
|
2255
|
-
function
|
|
2257
|
+
function Tt(e) {
|
|
2256
2258
|
var n, r;
|
|
2257
2259
|
if (r = e.input.charCodeAt(e.position), r !== 38) return !1;
|
|
2258
2260
|
for (e.anchor !== null && C(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ee(r) && !ve(r); )
|
|
2259
2261
|
r = e.input.charCodeAt(++e.position);
|
|
2260
2262
|
return e.position === n && C(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2261
2263
|
}
|
|
2262
|
-
function
|
|
2264
|
+
function $t(e) {
|
|
2263
2265
|
var n, r, t;
|
|
2264
2266
|
if (t = e.input.charCodeAt(e.position), t !== 42) return !1;
|
|
2265
2267
|
for (t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ee(t) && !ve(t); )
|
|
@@ -2268,10 +2270,10 @@ function _t(e) {
|
|
|
2268
2270
|
}
|
|
2269
2271
|
function Ae(e, n, r, t, i) {
|
|
2270
2272
|
var l, o, a, c = 1, s = !1, u = !1, x, p, f, m, y, A;
|
|
2271
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l = o = a = Ye === r ||
|
|
2272
|
-
for (;
|
|
2273
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l = o = a = Ye === r || fr === r, t && H(e, !0, -1) && (s = !0, e.lineIndent > n ? c = 1 : e.lineIndent === n ? c = 0 : e.lineIndent < n && (c = -1)), c === 1)
|
|
2274
|
+
for (; _t(e) || Tt(e); )
|
|
2273
2275
|
H(e, !0, -1) ? (s = !0, a = l, e.lineIndent > n ? c = 1 : e.lineIndent === n ? c = 0 : e.lineIndent < n && (c = -1)) : a = !1;
|
|
2274
|
-
if (a && (a = s || i), (c === 1 || Ye === r) && (De === r ||
|
|
2276
|
+
if (a && (a = s || i), (c === 1 || Ye === r) && (De === r || sr === r ? y = n : y = n + 1, A = e.position - e.lineStart, c === 1 ? a && (Sn(e, A) || wt(e, A, y)) || St(e, y) ? u = !0 : (o && Et(e, y) || kt(e, y) || Ct(e, y) ? u = !0 : $t(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : At(e, y, De === r) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (u = a && Sn(e, A))), e.tag === null)
|
|
2275
2277
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2276
2278
|
else if (e.tag === "?") {
|
|
2277
2279
|
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), x = 0, p = e.implicitTypes.length; x < p; x += 1)
|
|
@@ -2292,7 +2294,7 @@ function Ae(e, n, r, t, i) {
|
|
|
2292
2294
|
}
|
|
2293
2295
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
|
|
2294
2296
|
}
|
|
2295
|
-
function
|
|
2297
|
+
function Ot(e) {
|
|
2296
2298
|
var n = e.position, r, t, i, l = !1, o;
|
|
2297
2299
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (H(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2298
2300
|
for (l = !0, o = e.input.charCodeAt(++e.position), r = e.position; o !== 0 && !ee(o); )
|
|
@@ -2313,7 +2315,7 @@ function Tt(e) {
|
|
|
2313
2315
|
}
|
|
2314
2316
|
o !== 0 && on(e), pe.call(kn, t) ? kn[t](e, t, i) : Be(e, 'unknown document directive "' + t + '"');
|
|
2315
2317
|
}
|
|
2316
|
-
if (H(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, H(e, !0, -1)) : l && C(e, "directives end mark is expected"), Ae(e, e.lineIndent - 1, Ye, !1, !0), H(e, !0, -1), e.checkLineBreaks &&
|
|
2318
|
+
if (H(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, H(e, !0, -1)) : l && C(e, "directives end mark is expected"), Ae(e, e.lineIndent - 1, Ye, !1, !0), H(e, !0, -1), e.checkLineBreaks && ht.test(e.input.slice(n, e.position)) && Be(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ue(e)) {
|
|
2317
2319
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, H(e, !0, -1));
|
|
2318
2320
|
return;
|
|
2319
2321
|
}
|
|
@@ -2322,36 +2324,36 @@ function Tt(e) {
|
|
|
2322
2324
|
else
|
|
2323
2325
|
return;
|
|
2324
2326
|
}
|
|
2325
|
-
function
|
|
2327
|
+
function gr(e, n) {
|
|
2326
2328
|
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2327
2329
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2328
|
-
var r = new
|
|
2330
|
+
var r = new bt(e, n), t = e.indexOf("\0");
|
|
2329
2331
|
for (t !== -1 && (r.position = t, C(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
|
|
2330
2332
|
r.lineIndent += 1, r.position += 1;
|
|
2331
2333
|
for (; r.position < r.length - 1; )
|
|
2332
|
-
|
|
2334
|
+
Ot(r);
|
|
2333
2335
|
return r.documents;
|
|
2334
2336
|
}
|
|
2335
|
-
function
|
|
2337
|
+
function jt(e, n, r) {
|
|
2336
2338
|
n !== null && typeof n == "object" && typeof r > "u" && (r = n, n = null);
|
|
2337
|
-
var t =
|
|
2339
|
+
var t = gr(e, r);
|
|
2338
2340
|
if (typeof n != "function")
|
|
2339
2341
|
return t;
|
|
2340
2342
|
for (var i = 0, l = t.length; i < l; i += 1)
|
|
2341
2343
|
n(t[i]);
|
|
2342
2344
|
}
|
|
2343
|
-
function
|
|
2344
|
-
var r =
|
|
2345
|
+
function Ft(e, n) {
|
|
2346
|
+
var r = gr(e, n);
|
|
2345
2347
|
if (r.length !== 0) {
|
|
2346
2348
|
if (r.length === 1)
|
|
2347
2349
|
return r[0];
|
|
2348
2350
|
throw new Z("expected a single document in the stream, but found more");
|
|
2349
2351
|
}
|
|
2350
2352
|
}
|
|
2351
|
-
var
|
|
2352
|
-
loadAll:
|
|
2353
|
-
load:
|
|
2354
|
-
},
|
|
2353
|
+
var Lt = jt, Rt = Ft, yr = {
|
|
2354
|
+
loadAll: Lt,
|
|
2355
|
+
load: Rt
|
|
2356
|
+
}, vr = Object.prototype.toString, br = Object.prototype.hasOwnProperty, an = 65279, It = 9, $e = 10, Mt = 13, Nt = 32, Pt = 33, Dt = 34, Ke = 35, Yt = 37, Bt = 38, Wt = 39, Ht = 42, Ar = 44, Ut = 45, We = 58, Xt = 61, Gt = 62, zt = 63, qt = 64, kr = 91, Cr = 93, Kt = 96, Sr = 123, Vt = 124, Er = 125, K = {};
|
|
2355
2357
|
K[0] = "\\0";
|
|
2356
2358
|
K[7] = "\\a";
|
|
2357
2359
|
K[8] = "\\b";
|
|
@@ -2367,7 +2369,7 @@ K[133] = "\\N";
|
|
|
2367
2369
|
K[160] = "\\_";
|
|
2368
2370
|
K[8232] = "\\L";
|
|
2369
2371
|
K[8233] = "\\P";
|
|
2370
|
-
var
|
|
2372
|
+
var Zt = [
|
|
2371
2373
|
"y",
|
|
2372
2374
|
"Y",
|
|
2373
2375
|
"yes",
|
|
@@ -2384,15 +2386,15 @@ var Kt = [
|
|
|
2384
2386
|
"off",
|
|
2385
2387
|
"Off",
|
|
2386
2388
|
"OFF"
|
|
2387
|
-
],
|
|
2388
|
-
function
|
|
2389
|
+
], Jt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2390
|
+
function Qt(e, n) {
|
|
2389
2391
|
var r, t, i, l, o, a, c;
|
|
2390
2392
|
if (n === null) return {};
|
|
2391
2393
|
for (r = {}, t = Object.keys(n), i = 0, l = t.length; i < l; i += 1)
|
|
2392
|
-
o = t[i], a = String(n[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c &&
|
|
2394
|
+
o = t[i], a = String(n[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && br.call(c.styleAliases, a) && (a = c.styleAliases[a]), r[o] = a;
|
|
2393
2395
|
return r;
|
|
2394
2396
|
}
|
|
2395
|
-
function
|
|
2397
|
+
function eo(e) {
|
|
2396
2398
|
var n, r, t;
|
|
2397
2399
|
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2398
2400
|
r = "x", t = 2;
|
|
@@ -2404,11 +2406,11 @@ function Jt(e) {
|
|
|
2404
2406
|
throw new Z("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2405
2407
|
return "\\" + r + U.repeat("0", t - n.length) + n;
|
|
2406
2408
|
}
|
|
2407
|
-
var
|
|
2408
|
-
function
|
|
2409
|
-
this.schema = e.schema || tn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = U.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2409
|
+
var no = 1, Oe = 2;
|
|
2410
|
+
function ro(e) {
|
|
2411
|
+
this.schema = e.schema || tn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = U.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Qt(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 === '"' ? Oe : no, 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;
|
|
2410
2412
|
}
|
|
2411
|
-
function
|
|
2413
|
+
function En(e, n) {
|
|
2412
2414
|
for (var r = U.repeat(" ", n), t = 0, i = -1, l = "", o, a = e.length; t < a; )
|
|
2413
2415
|
i = e.indexOf(`
|
|
2414
2416
|
`, t), i === -1 ? (o = e.slice(t), t = a) : (o = e.slice(t, i + 1), t = i + 1), o.length && o !== `
|
|
@@ -2419,7 +2421,7 @@ function Ve(e, n) {
|
|
|
2419
2421
|
return `
|
|
2420
2422
|
` + U.repeat(" ", e.indent * n);
|
|
2421
2423
|
}
|
|
2422
|
-
function
|
|
2424
|
+
function io(e, n) {
|
|
2423
2425
|
var r, t, i;
|
|
2424
2426
|
for (r = 0, t = e.implicitTypes.length; r < t; r += 1)
|
|
2425
2427
|
if (i = e.implicitTypes[r], i.resolve(n))
|
|
@@ -2427,28 +2429,28 @@ function no(e, n) {
|
|
|
2427
2429
|
return !1;
|
|
2428
2430
|
}
|
|
2429
2431
|
function He(e) {
|
|
2430
|
-
return e ===
|
|
2432
|
+
return e === Nt || e === It;
|
|
2431
2433
|
}
|
|
2432
2434
|
function je(e) {
|
|
2433
2435
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== an || 65536 <= e && e <= 1114111;
|
|
2434
2436
|
}
|
|
2435
|
-
function
|
|
2436
|
-
return je(e) && e !== an && e !==
|
|
2437
|
+
function wn(e) {
|
|
2438
|
+
return je(e) && e !== an && e !== Mt && e !== $e;
|
|
2437
2439
|
}
|
|
2438
2440
|
function _n(e, n, r) {
|
|
2439
|
-
var t =
|
|
2441
|
+
var t = wn(e), i = t && !He(e);
|
|
2440
2442
|
return (
|
|
2441
2443
|
// ns-plain-safe
|
|
2442
2444
|
(r ? (
|
|
2443
2445
|
// c = flow-in
|
|
2444
2446
|
t
|
|
2445
|
-
) : t && e !==
|
|
2447
|
+
) : t && e !== Ar && e !== kr && e !== Cr && e !== Sr && e !== Er) && e !== Ke && !(n === We && !i) || wn(n) && !He(n) && e === Ke || n === We && i
|
|
2446
2448
|
);
|
|
2447
2449
|
}
|
|
2448
|
-
function
|
|
2449
|
-
return je(e) && e !== an && !He(e) && e !==
|
|
2450
|
+
function to(e) {
|
|
2451
|
+
return je(e) && e !== an && !He(e) && e !== Ut && e !== zt && e !== We && e !== Ar && e !== kr && e !== Cr && e !== Sr && e !== Er && e !== Ke && e !== Bt && e !== Ht && e !== Pt && e !== Vt && e !== Xt && e !== Gt && e !== Wt && e !== Dt && e !== Yt && e !== qt && e !== Kt;
|
|
2450
2452
|
}
|
|
2451
|
-
function
|
|
2453
|
+
function oo(e) {
|
|
2452
2454
|
return !He(e) && e !== We;
|
|
2453
2455
|
}
|
|
2454
2456
|
function _e(e, n) {
|
|
@@ -2459,9 +2461,9 @@ function wr(e) {
|
|
|
2459
2461
|
var n = /^\n* /;
|
|
2460
2462
|
return n.test(e);
|
|
2461
2463
|
}
|
|
2462
|
-
var
|
|
2463
|
-
function
|
|
2464
|
-
var c, s = 0, u = null, x = !1, p = !1, f = t !== -1, m = -1, y =
|
|
2464
|
+
var _r = 1, Ze = 2, Tr = 3, $r = 4, ye = 5;
|
|
2465
|
+
function lo(e, n, r, t, i, l, o, a) {
|
|
2466
|
+
var c, s = 0, u = null, x = !1, p = !1, f = t !== -1, m = -1, y = to(_e(e, 0)) && oo(_e(e, e.length - 1));
|
|
2465
2467
|
if (n || o)
|
|
2466
2468
|
for (c = 0; c < e.length; s >= 65536 ? c += 2 : c++) {
|
|
2467
2469
|
if (s = _e(e, c), !je(s))
|
|
@@ -2479,19 +2481,19 @@ function to(e, n, r, t, i, l, o, a) {
|
|
|
2479
2481
|
}
|
|
2480
2482
|
p = p || f && c - m - 1 > t && e[m + 1] !== " ";
|
|
2481
2483
|
}
|
|
2482
|
-
return !x && !p ? y && !o && !i(e) ?
|
|
2484
|
+
return !x && !p ? y && !o && !i(e) ? _r : l === Oe ? ye : Ze : r > 9 && wr(e) ? ye : o ? l === Oe ? ye : Ze : p ? $r : Tr;
|
|
2483
2485
|
}
|
|
2484
|
-
function
|
|
2486
|
+
function ao(e, n, r, t, i) {
|
|
2485
2487
|
e.dump = (function() {
|
|
2486
2488
|
if (n.length === 0)
|
|
2487
2489
|
return e.quotingType === Oe ? '""' : "''";
|
|
2488
|
-
if (!e.noCompatMode && (
|
|
2490
|
+
if (!e.noCompatMode && (Zt.indexOf(n) !== -1 || Jt.test(n)))
|
|
2489
2491
|
return e.quotingType === Oe ? '"' + n + '"' : "'" + n + "'";
|
|
2490
2492
|
var l = e.indent * Math.max(1, r), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - l), a = t || e.flowLevel > -1 && r >= e.flowLevel;
|
|
2491
2493
|
function c(s) {
|
|
2492
|
-
return
|
|
2494
|
+
return io(e, s);
|
|
2493
2495
|
}
|
|
2494
|
-
switch (
|
|
2496
|
+
switch (lo(
|
|
2495
2497
|
n,
|
|
2496
2498
|
a,
|
|
2497
2499
|
e.indent,
|
|
@@ -2501,16 +2503,16 @@ function oo(e, n, r, t, i) {
|
|
|
2501
2503
|
e.forceQuotes && !t,
|
|
2502
2504
|
i
|
|
2503
2505
|
)) {
|
|
2504
|
-
case
|
|
2506
|
+
case _r:
|
|
2505
2507
|
return n;
|
|
2506
2508
|
case Ze:
|
|
2507
2509
|
return "'" + n.replace(/'/g, "''") + "'";
|
|
2508
|
-
case _r:
|
|
2509
|
-
return "|" + Tn(n, e.indent) + $n(wn(n, l));
|
|
2510
2510
|
case Tr:
|
|
2511
|
-
return "
|
|
2511
|
+
return "|" + Tn(n, e.indent) + $n(En(n, l));
|
|
2512
|
+
case $r:
|
|
2513
|
+
return ">" + Tn(n, e.indent) + $n(En(co(n, o), l));
|
|
2512
2514
|
case ye:
|
|
2513
|
-
return '"' +
|
|
2515
|
+
return '"' + so(n) + '"';
|
|
2514
2516
|
default:
|
|
2515
2517
|
throw new Z("impossible error: invalid scalar style");
|
|
2516
2518
|
}
|
|
@@ -2528,7 +2530,7 @@ function $n(e) {
|
|
|
2528
2530
|
return e[e.length - 1] === `
|
|
2529
2531
|
` ? e.slice(0, -1) : e;
|
|
2530
2532
|
}
|
|
2531
|
-
function
|
|
2533
|
+
function co(e, n) {
|
|
2532
2534
|
for (var r = /(\n+)([^\n]*)/g, t = (function() {
|
|
2533
2535
|
var s = e.indexOf(`
|
|
2534
2536
|
`);
|
|
@@ -2550,12 +2552,12 @@ function On(e, n) {
|
|
|
2550
2552
|
`, e.length - i > n && o > i ? c += e.slice(i, o) + `
|
|
2551
2553
|
` + e.slice(o + 1) : c += e.slice(i), c.slice(1);
|
|
2552
2554
|
}
|
|
2553
|
-
function
|
|
2555
|
+
function so(e) {
|
|
2554
2556
|
for (var n = "", r = 0, t, i = 0; i < e.length; r >= 65536 ? i += 2 : i++)
|
|
2555
|
-
r = _e(e, i), t = K[r], !t && je(r) ? (n += e[i], r >= 65536 && (n += e[i + 1])) : n += t ||
|
|
2557
|
+
r = _e(e, i), t = K[r], !t && je(r) ? (n += e[i], r >= 65536 && (n += e[i + 1])) : n += t || eo(r);
|
|
2556
2558
|
return n;
|
|
2557
2559
|
}
|
|
2558
|
-
function
|
|
2560
|
+
function fo(e, n, r) {
|
|
2559
2561
|
var t = "", i = e.tag, l, o, a;
|
|
2560
2562
|
for (l = 0, o = r.length; l < o; l += 1)
|
|
2561
2563
|
a = r[l], e.replacer && (a = e.replacer.call(r, String(l), a)), (ae(e, n, a, !1, !1) || typeof a > "u" && ae(e, n, null, !1, !1)) && (t !== "" && (t += "," + (e.condenseFlow ? "" : " ")), t += e.dump);
|
|
@@ -2567,13 +2569,13 @@ function jn(e, n, r, t) {
|
|
|
2567
2569
|
c = r[o], e.replacer && (c = e.replacer.call(r, String(o), c)), (ae(e, n + 1, c, !0, !0, !1, !0) || typeof c > "u" && ae(e, n + 1, null, !0, !0, !1, !0)) && ((!t || i !== "") && (i += Ve(e, n)), e.dump && $e === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2568
2570
|
e.tag = l, e.dump = i || "[]";
|
|
2569
2571
|
}
|
|
2570
|
-
function
|
|
2572
|
+
function uo(e, n, r) {
|
|
2571
2573
|
var t = "", i = e.tag, l = Object.keys(r), o, a, c, s, u;
|
|
2572
2574
|
for (o = 0, a = l.length; o < a; o += 1)
|
|
2573
2575
|
u = "", t !== "" && (u += ", "), e.condenseFlow && (u += '"'), c = l[o], s = r[c], e.replacer && (s = e.replacer.call(r, c, s)), ae(e, n, c, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ae(e, n, s, !1, !1) && (u += e.dump, t += u));
|
|
2574
2576
|
e.tag = i, e.dump = "{" + t + "}";
|
|
2575
2577
|
}
|
|
2576
|
-
function
|
|
2578
|
+
function po(e, n, r, t) {
|
|
2577
2579
|
var i = "", l = e.tag, o = Object.keys(r), a, c, s, u, x, p;
|
|
2578
2580
|
if (e.sortKeys === !0)
|
|
2579
2581
|
o.sort();
|
|
@@ -2590,9 +2592,9 @@ function Fn(e, n, r) {
|
|
|
2590
2592
|
for (i = r ? e.explicitTypes : e.implicitTypes, l = 0, o = i.length; l < o; l += 1)
|
|
2591
2593
|
if (a = i[l], (a.instanceOf || a.predicate) && (!a.instanceOf || typeof n == "object" && n instanceof a.instanceOf) && (!a.predicate || a.predicate(n))) {
|
|
2592
2594
|
if (r ? a.multi && a.representName ? e.tag = a.representName(n) : e.tag = a.tag : e.tag = "?", a.represent) {
|
|
2593
|
-
if (c = e.styleMap[a.tag] || a.defaultStyle,
|
|
2595
|
+
if (c = e.styleMap[a.tag] || a.defaultStyle, vr.call(a.represent) === "[object Function]")
|
|
2594
2596
|
t = a.represent(n, c);
|
|
2595
|
-
else if (
|
|
2597
|
+
else if (br.call(a.represent, c))
|
|
2596
2598
|
t = a.represent[c](n, c);
|
|
2597
2599
|
else
|
|
2598
2600
|
throw new Z("!<" + a.tag + '> tag resolver accepts not "' + c + '" style');
|
|
@@ -2604,18 +2606,18 @@ function Fn(e, n, r) {
|
|
|
2604
2606
|
}
|
|
2605
2607
|
function ae(e, n, r, t, i, l, o) {
|
|
2606
2608
|
e.tag = null, e.dump = r, Fn(e, r, !1) || Fn(e, r, !0);
|
|
2607
|
-
var a =
|
|
2609
|
+
var a = vr.call(e.dump), c = t, s;
|
|
2608
2610
|
t && (t = e.flowLevel < 0 || e.flowLevel > n);
|
|
2609
2611
|
var u = a === "[object Object]" || a === "[object Array]", x, p;
|
|
2610
2612
|
if (u && (x = e.duplicates.indexOf(r), p = x !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && n > 0) && (i = !1), p && e.usedDuplicates[x])
|
|
2611
2613
|
e.dump = "*ref_" + x;
|
|
2612
2614
|
else {
|
|
2613
2615
|
if (u && p && !e.usedDuplicates[x] && (e.usedDuplicates[x] = !0), a === "[object Object]")
|
|
2614
|
-
t && Object.keys(e.dump).length !== 0 ? (
|
|
2616
|
+
t && Object.keys(e.dump).length !== 0 ? (po(e, n, e.dump, i), p && (e.dump = "&ref_" + x + e.dump)) : (uo(e, n, e.dump), p && (e.dump = "&ref_" + x + " " + e.dump));
|
|
2615
2617
|
else if (a === "[object Array]")
|
|
2616
|
-
t && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ? jn(e, n - 1, e.dump, i) : jn(e, n, e.dump, i), p && (e.dump = "&ref_" + x + e.dump)) : (
|
|
2618
|
+
t && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ? jn(e, n - 1, e.dump, i) : jn(e, n, e.dump, i), p && (e.dump = "&ref_" + x + e.dump)) : (fo(e, n, e.dump), p && (e.dump = "&ref_" + x + " " + e.dump));
|
|
2617
2619
|
else if (a === "[object String]")
|
|
2618
|
-
e.tag !== "?" &&
|
|
2620
|
+
e.tag !== "?" && ao(e, e.dump, n, l, c);
|
|
2619
2621
|
else {
|
|
2620
2622
|
if (a === "[object Undefined]")
|
|
2621
2623
|
return !1;
|
|
@@ -2628,7 +2630,7 @@ function ae(e, n, r, t, i, l, o) {
|
|
|
2628
2630
|
}
|
|
2629
2631
|
return !0;
|
|
2630
2632
|
}
|
|
2631
|
-
function
|
|
2633
|
+
function ho(e, n) {
|
|
2632
2634
|
var r = [], t = [], i, l;
|
|
2633
2635
|
for (Je(e, r, t), i = 0, l = t.length; i < l; i += 1)
|
|
2634
2636
|
n.duplicates.push(r[t[i]]);
|
|
@@ -2646,53 +2648,53 @@ function Je(e, n, r) {
|
|
|
2646
2648
|
for (t = Object.keys(e), i = 0, l = t.length; i < l; i += 1)
|
|
2647
2649
|
Je(e[t[i]], n, r);
|
|
2648
2650
|
}
|
|
2649
|
-
function
|
|
2651
|
+
function xo(e, n) {
|
|
2650
2652
|
n = n || {};
|
|
2651
|
-
var r = new
|
|
2652
|
-
r.noRefs ||
|
|
2653
|
+
var r = new ro(n);
|
|
2654
|
+
r.noRefs || ho(e, r);
|
|
2653
2655
|
var t = e;
|
|
2654
2656
|
return r.replacer && (t = r.replacer.call({ "": t }, "", t)), ae(r, 0, t, !0, !0) ? r.dump + `
|
|
2655
2657
|
` : "";
|
|
2656
2658
|
}
|
|
2657
|
-
var
|
|
2658
|
-
dump:
|
|
2659
|
+
var mo = xo, go = {
|
|
2660
|
+
dump: mo
|
|
2659
2661
|
};
|
|
2660
2662
|
function cn(e, n) {
|
|
2661
2663
|
return function() {
|
|
2662
2664
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2663
2665
|
};
|
|
2664
2666
|
}
|
|
2665
|
-
var
|
|
2666
|
-
binary:
|
|
2667
|
-
float:
|
|
2668
|
-
map:
|
|
2669
|
-
null:
|
|
2670
|
-
pairs:
|
|
2671
|
-
set:
|
|
2672
|
-
timestamp:
|
|
2673
|
-
bool:
|
|
2674
|
-
int:
|
|
2675
|
-
merge:
|
|
2676
|
-
omap:
|
|
2677
|
-
seq:
|
|
2678
|
-
str:
|
|
2679
|
-
},
|
|
2680
|
-
Type:
|
|
2681
|
-
Schema:
|
|
2682
|
-
FAILSAFE_SCHEMA:
|
|
2683
|
-
JSON_SCHEMA:
|
|
2684
|
-
CORE_SCHEMA:
|
|
2685
|
-
DEFAULT_SCHEMA:
|
|
2686
|
-
load:
|
|
2687
|
-
loadAll:
|
|
2688
|
-
dump:
|
|
2689
|
-
YAMLException:
|
|
2690
|
-
types:
|
|
2691
|
-
safeLoad:
|
|
2692
|
-
safeLoadAll:
|
|
2693
|
-
safeDump:
|
|
2667
|
+
var yo = z, vo = Un, bo = qn, Ao = Qn, ko = er, Co = tn, So = yr.load, Eo = yr.loadAll, wo = go.dump, _o = Z, To = {
|
|
2668
|
+
binary: or,
|
|
2669
|
+
float: Jn,
|
|
2670
|
+
map: zn,
|
|
2671
|
+
null: Kn,
|
|
2672
|
+
pairs: ar,
|
|
2673
|
+
set: cr,
|
|
2674
|
+
timestamp: ir,
|
|
2675
|
+
bool: Vn,
|
|
2676
|
+
int: Zn,
|
|
2677
|
+
merge: tr,
|
|
2678
|
+
omap: lr,
|
|
2679
|
+
seq: Gn,
|
|
2680
|
+
str: Xn
|
|
2681
|
+
}, $o = cn("safeLoad", "load"), Oo = cn("safeLoadAll", "loadAll"), jo = cn("safeDump", "dump"), Fo = {
|
|
2682
|
+
Type: yo,
|
|
2683
|
+
Schema: vo,
|
|
2684
|
+
FAILSAFE_SCHEMA: bo,
|
|
2685
|
+
JSON_SCHEMA: Ao,
|
|
2686
|
+
CORE_SCHEMA: ko,
|
|
2687
|
+
DEFAULT_SCHEMA: Co,
|
|
2688
|
+
load: So,
|
|
2689
|
+
loadAll: Eo,
|
|
2690
|
+
dump: wo,
|
|
2691
|
+
YAMLException: _o,
|
|
2692
|
+
types: To,
|
|
2693
|
+
safeLoad: $o,
|
|
2694
|
+
safeLoadAll: Oo,
|
|
2695
|
+
safeDump: jo
|
|
2694
2696
|
};
|
|
2695
|
-
function
|
|
2697
|
+
function Lo(e) {
|
|
2696
2698
|
const n = e.match(/^(\d+)x(\d+)x(\d+)$/);
|
|
2697
2699
|
return n ? {
|
|
2698
2700
|
width: parseInt(n[1], 10),
|
|
@@ -2707,23 +2709,22 @@ function Ln(e) {
|
|
|
2707
2709
|
height: parseInt(n[2], 10)
|
|
2708
2710
|
} : null;
|
|
2709
2711
|
}
|
|
2710
|
-
function
|
|
2712
|
+
function Ro(e) {
|
|
2711
2713
|
const n = e.match(/^(-?\d+),(-?\d+)$/);
|
|
2712
2714
|
return n ? {
|
|
2713
2715
|
x: parseInt(n[1], 10),
|
|
2714
2716
|
y: parseInt(n[2], 10)
|
|
2715
2717
|
} : null;
|
|
2716
2718
|
}
|
|
2717
|
-
function
|
|
2719
|
+
function Io(e) {
|
|
2718
2720
|
const n = e.match(/^(.+?)\s*@\s*(\d+)$/);
|
|
2719
2721
|
return n ? {
|
|
2720
2722
|
name: n[1].trim(),
|
|
2721
2723
|
elevation: parseInt(n[2], 10)
|
|
2722
2724
|
} : null;
|
|
2723
2725
|
}
|
|
2724
|
-
function
|
|
2725
|
-
|
|
2726
|
-
const i = e.match(/\{([^}]+)\}\s*$/);
|
|
2726
|
+
function Mo(e, n, r) {
|
|
2727
|
+
const t = {}, i = e.match(/\{([^}]+)\}\s*$/);
|
|
2727
2728
|
if (i) {
|
|
2728
2729
|
const f = i[1].split(/\s+/);
|
|
2729
2730
|
for (const m of f) {
|
|
@@ -2737,7 +2738,7 @@ function Io(e, n, r) {
|
|
|
2737
2738
|
}
|
|
2738
2739
|
const l = e.trim().split(/\s+/);
|
|
2739
2740
|
if (l.length < 4) return null;
|
|
2740
|
-
const o = l[0], a = l[1], c = l[2], s = l[3], u =
|
|
2741
|
+
const o = l[0], a = l[1], c = l[2], s = l[3], u = Ro(c), x = Lo(s);
|
|
2741
2742
|
if (!u || !x) return null;
|
|
2742
2743
|
const p = r[a] || a;
|
|
2743
2744
|
return {
|
|
@@ -2752,8 +2753,8 @@ function Io(e, n, r) {
|
|
|
2752
2753
|
...t
|
|
2753
2754
|
};
|
|
2754
2755
|
}
|
|
2755
|
-
function
|
|
2756
|
-
const n =
|
|
2756
|
+
function Bo(e) {
|
|
2757
|
+
const n = Fo.load(e);
|
|
2757
2758
|
let r = { width: 1100, height: 700 };
|
|
2758
2759
|
if (typeof n.canvas == "string") {
|
|
2759
2760
|
const p = Ln(n.canvas);
|
|
@@ -2779,7 +2780,7 @@ function Do(e) {
|
|
|
2779
2780
|
}, s = n.theme || "dark";
|
|
2780
2781
|
Array.isArray(n.tiers) && n.tiers.forEach((p, f) => {
|
|
2781
2782
|
if (typeof p == "string") {
|
|
2782
|
-
const m =
|
|
2783
|
+
const m = Io(p);
|
|
2783
2784
|
m && o.push({
|
|
2784
2785
|
name: m.name,
|
|
2785
2786
|
elevation: m.elevation,
|
|
@@ -2806,7 +2807,7 @@ function Do(e) {
|
|
|
2806
2807
|
if (!(isNaN(y) || !Array.isArray(m))) {
|
|
2807
2808
|
for (const A of m)
|
|
2808
2809
|
if (typeof A == "string") {
|
|
2809
|
-
const v =
|
|
2810
|
+
const v = Mo(A, y, l);
|
|
2810
2811
|
v && u.push(v);
|
|
2811
2812
|
} else if (A && typeof A == "object") {
|
|
2812
2813
|
const v = A;
|
|
@@ -2862,7 +2863,7 @@ function Do(e) {
|
|
|
2862
2863
|
pillars: x.length > 0 ? x : void 0
|
|
2863
2864
|
};
|
|
2864
2865
|
}
|
|
2865
|
-
function
|
|
2866
|
+
function Wo(e) {
|
|
2866
2867
|
const n = [];
|
|
2867
2868
|
n.push(`title: ${e.title}`), e.description && n.push(`description: ${e.description}`), n.push(`theme: ${e.theme}`), e.style && e.style !== "solid" && n.push(`style: ${e.style}`), n.push(`canvas: ${e.canvas.width}x${e.canvas.height}`), n.push(`floor: ${e.floorSize.width}x${e.floorSize.depth}`), e.cornerRadius && n.push(`corner: ${e.cornerRadius}`), n.push("");
|
|
2868
2869
|
const r = {};
|
|
@@ -2891,12 +2892,12 @@ function Yo(e) {
|
|
|
2891
2892
|
`);
|
|
2892
2893
|
}
|
|
2893
2894
|
export {
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2895
|
+
Do as ArcDiagram,
|
|
2896
|
+
Wo as configToYaml,
|
|
2897
|
+
Po as getColorShading,
|
|
2897
2898
|
he as isoBox,
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2899
|
+
E as isoToScreen,
|
|
2900
|
+
Bo as parseYamlConfig,
|
|
2901
|
+
Yo as renderToElement,
|
|
2902
|
+
ui as renderToString
|
|
2902
2903
|
};
|