jaml-ui 1.0.1 → 1.0.2
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/assets/{searchPoolWorker-DWobBIhl.js → searchPoolWorker-DHh9a5GD.js} +2 -2
- package/dist/assets/searchPoolWorker-DHh9a5GD.js.map +1 -0
- package/dist/chunks/{jamlSeeds-3ILzc_rj.js → jamlSeeds-CKHvpjhC.js} +1 -1
- package/dist/chunks/{jamlSeeds-3ILzc_rj.js.map → jamlSeeds-CKHvpjhC.js.map} +1 -1
- package/dist/chunks/{motelyItemFormats-CNrFzcCI.js → motelyItemFormats-Dyq1BINO.js} +275 -267
- package/dist/chunks/motelyItemFormats-Dyq1BINO.js.map +1 -0
- package/dist/chunks/{searchPoolWorker-tBaSbLZu.js → searchPoolWorker-DgRqVj_q.js} +2 -2
- package/dist/chunks/searchPoolWorker-DgRqVj_q.js.map +1 -0
- package/dist/chunks/{assets-Bb6wV80_.js → spriteMapper-C2mqQHLj.js} +2417 -2
- package/dist/chunks/spriteMapper-C2mqQHLj.js.map +1 -0
- package/dist/chunks/{ui-B6Oq-jPj.js → ui-LfKBGL5-.js} +1028 -1015
- package/dist/chunks/ui-LfKBGL5-.js.map +1 -0
- package/dist/core.js +7 -8
- package/dist/core.js.map +1 -1
- package/dist/index.js +1632 -1677
- package/dist/index.js.map +1 -1
- package/dist/lib/motely/runtime.d.ts +7 -0
- package/dist/motely.js +10 -11
- package/dist/motely.js.map +1 -1
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui/jimboApp.d.ts +3 -6
- package/dist/ui/jimboBackground.d.ts +4 -8
- package/dist/ui/sprites.d.ts +2 -1
- package/dist/ui.d.ts +0 -1
- package/dist/ui.js +2 -3
- package/package.json +15 -39
- package/dist/assets/searchPoolWorker-DWobBIhl.js.map +0 -1
- package/dist/chunks/assets-Bb6wV80_.js.map +0 -1
- package/dist/chunks/motelyItemFormats-CNrFzcCI.js.map +0 -1
- package/dist/chunks/searchPoolWorker-tBaSbLZu.js.map +0 -1
- package/dist/chunks/spriteMapper-CajFGgUU.js +0 -2419
- package/dist/chunks/spriteMapper-CajFGgUU.js.map +0 -1
- package/dist/chunks/tokens-Qrhlekc4.js +0 -57
- package/dist/chunks/tokens-Qrhlekc4.js.map +0 -1
- package/dist/chunks/ui-B6Oq-jPj.js.map +0 -1
- package/dist/r3f/Card3D.d.ts +0 -25
- package/dist/r3f/JimboBillboard.d.ts +0 -10
- package/dist/r3f/JimboText3D.d.ts +0 -9
- package/dist/r3f.d.ts +0 -3
- package/dist/r3f.js +0 -235
- package/dist/r3f.js.map +0 -1
- package/dist/ui/JimboPanelSplitter.d.ts +0 -8
|
@@ -1,18 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { b as e, n as t, p as n, r, t as i } from "./spriteMapper-C2mqQHLj.js";
|
|
2
|
+
import a, { createContext as o, createElement as s, forwardRef as c, memo as l, useCallback as u, useContext as d, useEffect as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
3
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
4
|
+
import { FiCheck as b, FiCopy as x } from "react-icons/fi";
|
|
5
|
+
import { createPortal as S } from "react-dom";
|
|
6
|
+
//#region src/ui/tokens.ts
|
|
7
|
+
var C = {
|
|
8
|
+
RED: "#ff4c40",
|
|
9
|
+
BLUE: "#0093ff",
|
|
10
|
+
GREEN: "#429f79",
|
|
11
|
+
ORANGE: "#ff9800",
|
|
12
|
+
GOLD: "#e4b643",
|
|
13
|
+
PURPLE: "#9e74ce",
|
|
14
|
+
DARK_RED: "#a02721",
|
|
15
|
+
DARK_BLUE: "#0057a1",
|
|
16
|
+
DARK_ORANGE: "#a05b00",
|
|
17
|
+
DARK_GREEN: "#215f46",
|
|
18
|
+
DARK_PURPLE: "#5e437e",
|
|
19
|
+
DARK_GREY: "#3a5055",
|
|
20
|
+
DARKEST: "#1e2b2d",
|
|
21
|
+
GREY: "#708386",
|
|
22
|
+
TEAL_GREY: "#404c4e",
|
|
23
|
+
PANEL_EDGE: "#1e2e32",
|
|
24
|
+
INNER_BORDER: "#334461",
|
|
25
|
+
BORDER_SILVER: "#b9c2d2",
|
|
26
|
+
BORDER_SOUTH: "#777e89",
|
|
27
|
+
GOLD_TEXT: "#e4b643",
|
|
28
|
+
GREEN_TEXT: "#35bd86",
|
|
29
|
+
ORANGE_TEXT: "#ff8f00",
|
|
30
|
+
WHITE: "#ffffff",
|
|
31
|
+
BLACK: "#000000",
|
|
32
|
+
TAROT_BUTTON: "#9e74ce",
|
|
33
|
+
PLANET_BUTTON: "#00a7ca",
|
|
34
|
+
SPECTRAL_BUTTON: "#2e76fd",
|
|
35
|
+
TAROT_BUTTON_DARK: "#5e437e",
|
|
36
|
+
PLANET_BUTTON_DARK: "#00657c",
|
|
37
|
+
SPECTRAL_BUTTON_DARK: "#14449e"
|
|
38
|
+
};
|
|
39
|
+
function w(e, t) {
|
|
40
|
+
let n = e.replace("#", "");
|
|
41
|
+
return `rgba(${parseInt(n.slice(0, 2), 16)}, ${parseInt(n.slice(2, 4), 16)}, ${parseInt(n.slice(4, 6), 16)}, ${t})`;
|
|
42
|
+
}
|
|
43
|
+
var T = {
|
|
44
|
+
JUICE_UP_SCALE: 1.05,
|
|
45
|
+
JUICE_DOWN_SCALE: 1,
|
|
46
|
+
JUICE_DURATION: 150,
|
|
47
|
+
JUICE_EASING: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
48
|
+
SWAY_AMOUNT: 1.5,
|
|
49
|
+
SWAY_DURATION: 4e3,
|
|
50
|
+
PRESS_TRANSLATE_Y: 2,
|
|
51
|
+
PRESS_DURATION: 50,
|
|
52
|
+
CARD_TILT_MAX: 6,
|
|
53
|
+
MENU_SINK_DURATION: 200,
|
|
54
|
+
MENU_RISE_DURATION: 300,
|
|
55
|
+
MENU_ORBIT_DURATION: 320,
|
|
56
|
+
LETTER_POP_RATE: 3,
|
|
57
|
+
LETTER_BUMP_RATE: 2.666
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
8
60
|
//#region src/ui/hooks.ts
|
|
9
|
-
function
|
|
61
|
+
function E(e) {
|
|
10
62
|
return new Promise((t) => {
|
|
11
63
|
let n = new window.Image();
|
|
12
64
|
n.addEventListener("load", () => t(n)), n.addEventListener("error", () => t(null)), n.src = e;
|
|
13
65
|
});
|
|
14
66
|
}
|
|
15
|
-
function
|
|
67
|
+
function D(e, t, n, r, i) {
|
|
16
68
|
if (!n || !r || !r?.pos) return 0;
|
|
17
69
|
let a = n.width / r.columns, o = n.height / r.rows, s = e.style;
|
|
18
70
|
if (r.order === 0 && (e.width = a, e.height = o, s.width = `${a}px`, s.height = `${o}px`), s.imageRendering = "pixelated", t.imageSmoothingEnabled = !0, t.save(), r.animated && i) {
|
|
@@ -21,20 +73,20 @@ function E(e, t, n, r, i) {
|
|
|
21
73
|
}
|
|
22
74
|
return t.drawImage(n, r.pos.x * a, r.pos.y * o, a, o, 0, 0, e.width, e.height), t.restore(), a / o;
|
|
23
75
|
}
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
return
|
|
27
|
-
if (!e || !
|
|
28
|
-
let
|
|
29
|
-
let e = (Date.now() -
|
|
30
|
-
|
|
76
|
+
function O(e) {
|
|
77
|
+
let t = h(null);
|
|
78
|
+
return f(() => {
|
|
79
|
+
if (!e || !t.current) return;
|
|
80
|
+
let n, r = Date.now(), i = t.current, a = () => {
|
|
81
|
+
let e = (Date.now() - r) % T.SWAY_DURATION / T.SWAY_DURATION * Math.PI * 2;
|
|
82
|
+
i.style.transform = `translate(${Math.sin(e) * T.SWAY_AMOUNT * .3}px, ${Math.sin(e * .8) * T.SWAY_AMOUNT}px)`, n = requestAnimationFrame(a);
|
|
31
83
|
};
|
|
32
|
-
return
|
|
33
|
-
cancelAnimationFrame(
|
|
84
|
+
return n = requestAnimationFrame(a), () => {
|
|
85
|
+
cancelAnimationFrame(n), i && (i.style.transform = "");
|
|
34
86
|
};
|
|
35
|
-
}, [e]),
|
|
87
|
+
}, [e]), t;
|
|
36
88
|
}
|
|
37
|
-
var
|
|
89
|
+
var k = {
|
|
38
90
|
primary: [
|
|
39
91
|
1,
|
|
40
92
|
.2,
|
|
@@ -58,7 +110,7 @@ var O = {
|
|
|
58
110
|
lighting: .5,
|
|
59
111
|
transitionMs: 800
|
|
60
112
|
};
|
|
61
|
-
function
|
|
113
|
+
function A(e, t) {
|
|
62
114
|
if (!e) return t;
|
|
63
115
|
if (Array.isArray(e)) return [
|
|
64
116
|
e[0],
|
|
@@ -74,11 +126,11 @@ function k(e, t) {
|
|
|
74
126
|
(r & 255) / 255
|
|
75
127
|
];
|
|
76
128
|
}
|
|
77
|
-
function
|
|
78
|
-
let t =
|
|
79
|
-
return
|
|
129
|
+
function j(e = {}) {
|
|
130
|
+
let t = h(null), n = h(e);
|
|
131
|
+
return p(() => {
|
|
80
132
|
n.current = e;
|
|
81
|
-
}),
|
|
133
|
+
}), f(() => {
|
|
82
134
|
let e = t.current;
|
|
83
135
|
if (!e) return;
|
|
84
136
|
let r = e.getContext("webgl");
|
|
@@ -113,43 +165,43 @@ function A(e = {}) {
|
|
|
113
165
|
let l = r.getAttribLocation(s, "position");
|
|
114
166
|
r.enableVertexAttribArray(l), r.vertexAttribPointer(l, 2, r.FLOAT, !1, 0, 0);
|
|
115
167
|
let u = r.getUniformLocation(s, "u_time"), d = r.getUniformLocation(s, "u_resolution"), f = r.getUniformLocation(s, "u_color1"), p = r.getUniformLocation(s, "u_color2"), m = r.getUniformLocation(s, "u_color3"), h = r.getUniformLocation(s, "u_spinRotation"), g = r.getUniformLocation(s, "u_spinSpeed"), _ = r.getUniformLocation(s, "u_spinAmount"), v = r.getUniformLocation(s, "u_pixelFilter"), y = r.getUniformLocation(s, "u_contrast"), b = r.getUniformLocation(s, "u_lighting"), x = (e) => ({
|
|
116
|
-
spinRotation: e.spinRotation ??
|
|
117
|
-
spinSpeed: 4.5 * (e.speed ??
|
|
118
|
-
spinAmount: e.spinAmount ??
|
|
119
|
-
pixelFilter: e.pixelFilter ??
|
|
120
|
-
contrast: e.contrast ??
|
|
121
|
-
lighting: e.lighting ??
|
|
168
|
+
spinRotation: e.spinRotation ?? k.spinRotation,
|
|
169
|
+
spinSpeed: 4.5 * (e.speed ?? k.speed),
|
|
170
|
+
spinAmount: e.spinAmount ?? k.spinAmount,
|
|
171
|
+
pixelFilter: e.pixelFilter ?? k.pixelFilter,
|
|
172
|
+
contrast: e.contrast ?? k.contrast,
|
|
173
|
+
lighting: e.lighting ?? k.lighting
|
|
122
174
|
}), S = n.current, C = [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
], w = x(S), T = performance.now(), E = T, D = 0,
|
|
175
|
+
A(S.primary, k.primary),
|
|
176
|
+
A(S.secondary, k.secondary),
|
|
177
|
+
A(S.dark, k.dark)
|
|
178
|
+
], w = x(S), T = performance.now(), E = T, D = 0, O = () => {
|
|
127
179
|
let t = performance.now(), i = Math.max(0, t - E);
|
|
128
180
|
E = t;
|
|
129
181
|
let a = n.current, o = [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
], s = x(a), c = Math.max(1, a.transitionMs ??
|
|
182
|
+
A(a.primary, k.primary),
|
|
183
|
+
A(a.secondary, k.secondary),
|
|
184
|
+
A(a.dark, k.dark)
|
|
185
|
+
], s = x(a), c = Math.max(1, a.transitionMs ?? k.transitionMs), l = 1 - Math.exp(-i / c);
|
|
134
186
|
for (let e = 0; e < 3; e++) for (let t = 0; t < 3; t++) C[e][t] += (o[e][t] - C[e][t]) * l;
|
|
135
187
|
let S = (e) => {
|
|
136
188
|
w[e] += (s[e] - w[e]) * l;
|
|
137
189
|
};
|
|
138
190
|
S("spinRotation"), S("spinSpeed"), S("spinAmount"), S("pixelFilter"), S("contrast"), S("lighting");
|
|
139
191
|
let j = e.clientWidth, M = e.clientHeight;
|
|
140
|
-
(e.width !== j || e.height !== M) && (e.width = j, e.height = M, r.viewport(0, 0, r.drawingBufferWidth, r.drawingBufferHeight)), r.uniform1f(u, (t - T) / 1e3), r.uniform2f(d, e.width, e.height), r.uniform3f(f, C[0][0], C[0][1], C[0][2]), r.uniform3f(p, C[1][0], C[1][1], C[1][2]), r.uniform3f(m, C[2][0], C[2][1], C[2][2]), r.uniform1f(h, w.spinRotation), r.uniform1f(g, w.spinSpeed), r.uniform1f(_, w.spinAmount), r.uniform1f(v, w.pixelFilter), r.uniform1f(y, w.contrast), r.uniform1f(b, w.lighting), r.drawArrays(r.TRIANGLES, 0, 6), D = requestAnimationFrame(
|
|
192
|
+
(e.width !== j || e.height !== M) && (e.width = j, e.height = M, r.viewport(0, 0, r.drawingBufferWidth, r.drawingBufferHeight)), r.uniform1f(u, (t - T) / 1e3), r.uniform2f(d, e.width, e.height), r.uniform3f(f, C[0][0], C[0][1], C[0][2]), r.uniform3f(p, C[1][0], C[1][1], C[1][2]), r.uniform3f(m, C[2][0], C[2][1], C[2][2]), r.uniform1f(h, w.spinRotation), r.uniform1f(g, w.spinSpeed), r.uniform1f(_, w.spinAmount), r.uniform1f(v, w.pixelFilter), r.uniform1f(y, w.contrast), r.uniform1f(b, w.lighting), r.drawArrays(r.TRIANGLES, 0, 6), D = requestAnimationFrame(O);
|
|
141
193
|
};
|
|
142
|
-
return D = requestAnimationFrame(
|
|
194
|
+
return D = requestAnimationFrame(O), () => {
|
|
143
195
|
cancelAnimationFrame(D), r.deleteProgram(s), r.deleteShader(a), r.deleteShader(o), r.deleteBuffer(c);
|
|
144
196
|
};
|
|
145
197
|
}, []), t;
|
|
146
198
|
}
|
|
147
|
-
function
|
|
148
|
-
let [i, a] =
|
|
149
|
-
r || (
|
|
150
|
-
}, [r, n]),
|
|
151
|
-
|
|
152
|
-
}, []),
|
|
199
|
+
function M({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r = !1 }) {
|
|
200
|
+
let [i, a] = g(!1), [o, s] = g(null), c = h(null), l = h(null), d = h(null), p = u(() => {
|
|
201
|
+
r || (d.current && clearTimeout(d.current), d.current = setTimeout(() => a(!0), n));
|
|
202
|
+
}, [r, n]), m = u(() => {
|
|
203
|
+
d.current && clearTimeout(d.current), a(!1), s(null);
|
|
204
|
+
}, []), _ = u(() => {
|
|
153
205
|
let e = c.current, n = l.current;
|
|
154
206
|
if (!e || !n) return;
|
|
155
207
|
let r = e.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.top, o = t === "top" ? "top" : t === "bottom" ? "bottom" : a >= i.height + 12 ? "top" : "bottom", u = r.left + r.width / 2 - i.width / 2, d = o === "top" ? r.top - i.height - 8 : r.bottom + 8;
|
|
@@ -159,26 +211,26 @@ function j({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r
|
|
|
159
211
|
align: o
|
|
160
212
|
});
|
|
161
213
|
}, [t]);
|
|
162
|
-
return
|
|
214
|
+
return f(() => {
|
|
163
215
|
if (!i || e !== "snap") return;
|
|
164
|
-
let t = requestAnimationFrame(
|
|
165
|
-
return window.addEventListener("resize",
|
|
166
|
-
cancelAnimationFrame(t), window.removeEventListener("resize",
|
|
216
|
+
let t = requestAnimationFrame(_);
|
|
217
|
+
return window.addEventListener("resize", _), window.addEventListener("scroll", _, !0), () => {
|
|
218
|
+
cancelAnimationFrame(t), window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
|
|
167
219
|
};
|
|
168
220
|
}, [
|
|
169
221
|
i,
|
|
170
222
|
e,
|
|
171
|
-
|
|
172
|
-
]),
|
|
173
|
-
|
|
223
|
+
_
|
|
224
|
+
]), f(() => () => {
|
|
225
|
+
d.current && clearTimeout(d.current);
|
|
174
226
|
}, []), {
|
|
175
227
|
visible: i,
|
|
176
228
|
pos: o,
|
|
177
229
|
targetRef: c,
|
|
178
230
|
tooltipRef: l,
|
|
179
|
-
show:
|
|
180
|
-
hide:
|
|
181
|
-
handleMouseMove:
|
|
231
|
+
show: p,
|
|
232
|
+
hide: m,
|
|
233
|
+
handleMouseMove: u((t) => {
|
|
182
234
|
e === "mouse" && s({
|
|
183
235
|
left: t.clientX + 12,
|
|
184
236
|
top: t.clientY + 16,
|
|
@@ -187,51 +239,51 @@ function j({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r
|
|
|
187
239
|
}, [e])
|
|
188
240
|
};
|
|
189
241
|
}
|
|
190
|
-
function
|
|
191
|
-
let
|
|
242
|
+
function ee({ layers: e, invert: t = !1, hoverTilt: r = !1 }) {
|
|
243
|
+
let i = h(null), a = h(null), o = h(/* @__PURE__ */ new Map()), [s, c] = g(3 / 4), [, l] = g(0), d = h(null), p = h({
|
|
192
244
|
rx: 0,
|
|
193
245
|
ry: 0,
|
|
194
246
|
rz: 0
|
|
195
|
-
}),
|
|
247
|
+
}), m = h({
|
|
196
248
|
rx: 0,
|
|
197
249
|
ry: 0,
|
|
198
250
|
rz: 0
|
|
199
|
-
}),
|
|
200
|
-
|
|
251
|
+
}), _ = e?.some((e) => e.animated);
|
|
252
|
+
f(() => {
|
|
201
253
|
let e = !1, t = o.current;
|
|
202
254
|
return (async () => {
|
|
203
|
-
let
|
|
204
|
-
e || (
|
|
205
|
-
e && t.set(n
|
|
255
|
+
let r = Array.from(new Set(Object.values(n).map((e) => e.src))), i = await Promise.all(r.map((e) => E(e)));
|
|
256
|
+
e || (i.forEach((e, n) => {
|
|
257
|
+
e && t.set(r[n], e);
|
|
206
258
|
}), l((e) => e + 1));
|
|
207
259
|
})().catch((e) => console.error("[JamlCardRenderer]", e)), () => {
|
|
208
260
|
e = !0, t.clear();
|
|
209
261
|
};
|
|
210
|
-
}, []),
|
|
211
|
-
let n =
|
|
262
|
+
}, []), f(() => {
|
|
263
|
+
let n = i.current;
|
|
212
264
|
if (!n || !e || e.length === 0) return;
|
|
213
|
-
let
|
|
214
|
-
if (!
|
|
215
|
-
let a = !1, s = null, u, d = (
|
|
216
|
-
|
|
265
|
+
let r = n.getContext("2d");
|
|
266
|
+
if (!r) return;
|
|
267
|
+
let a = !1, s = null, u, d = (i) => {
|
|
268
|
+
r.clearRect(0, 0, n.width, n.height), [...e].sort((e, t) => e.order - t.order).forEach((e) => {
|
|
217
269
|
let t = o.current.get(e.source);
|
|
218
270
|
if (t) {
|
|
219
|
-
let a =
|
|
271
|
+
let a = D(n, r, t, e, _ ? i : void 0);
|
|
220
272
|
e.order === 0 && c(a);
|
|
221
273
|
return;
|
|
222
274
|
}
|
|
223
|
-
|
|
275
|
+
E(e.source).then((t) => {
|
|
224
276
|
if (!(a || !t)) {
|
|
225
|
-
if (o.current.set(e.source, t), !
|
|
226
|
-
let
|
|
227
|
-
e.order === 0 && c(
|
|
277
|
+
if (o.current.set(e.source, t), !_) {
|
|
278
|
+
let i = D(n, r, t, e);
|
|
279
|
+
e.order === 0 && c(i);
|
|
228
280
|
}
|
|
229
281
|
l((e) => e + 1);
|
|
230
282
|
}
|
|
231
283
|
});
|
|
232
284
|
}), n.style.filter = t ? "invert(0.94)" : "none";
|
|
233
285
|
};
|
|
234
|
-
if (
|
|
286
|
+
if (_) {
|
|
235
287
|
let e = (t) => {
|
|
236
288
|
a || (u === void 0 && (u = t), d(t - u), s = requestAnimationFrame(e));
|
|
237
289
|
};
|
|
@@ -243,61 +295,61 @@ function M({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
|
|
|
243
295
|
}, [
|
|
244
296
|
e,
|
|
245
297
|
t,
|
|
246
|
-
|
|
298
|
+
_
|
|
247
299
|
]);
|
|
248
|
-
let
|
|
249
|
-
|
|
250
|
-
}, []), y =
|
|
251
|
-
let e =
|
|
300
|
+
let v = u(() => {
|
|
301
|
+
d.current !== null && (cancelAnimationFrame(d.current), d.current = null);
|
|
302
|
+
}, []), y = u(() => {
|
|
303
|
+
let e = i.current;
|
|
252
304
|
if (!e) return;
|
|
253
|
-
let t =
|
|
305
|
+
let t = m.current;
|
|
254
306
|
e.style.transform = `rotateX(${t.rx}deg) rotateY(${t.ry}deg) rotateZ(${t.rz}deg)`;
|
|
255
|
-
}, []), b =
|
|
256
|
-
|
|
307
|
+
}, []), b = u((e, t) => {
|
|
308
|
+
v();
|
|
257
309
|
let n = performance.now(), r = (i) => {
|
|
258
310
|
let a = Math.min(.05, (i - n) / 1e3);
|
|
259
311
|
n = i;
|
|
260
|
-
let o =
|
|
312
|
+
let o = p.current, s = m.current, c = 1 - Math.exp(-e * a);
|
|
261
313
|
if (s.rx += (o.rx - s.rx) * c, s.ry += (o.ry - s.ry) * c, s.rz += (o.rz - s.rz) * c, y(), Math.abs(o.rx - s.rx) < .02 && Math.abs(o.ry - s.ry) < .02 && Math.abs(o.rz - s.rz) < .02) {
|
|
262
|
-
s.rx = o.rx, s.ry = o.ry, s.rz = o.rz, y(),
|
|
314
|
+
s.rx = o.rx, s.ry = o.ry, s.rz = o.rz, y(), d.current = null, t?.();
|
|
263
315
|
return;
|
|
264
316
|
}
|
|
265
|
-
|
|
317
|
+
d.current = requestAnimationFrame(r);
|
|
266
318
|
};
|
|
267
|
-
|
|
268
|
-
}, [
|
|
269
|
-
return
|
|
270
|
-
canvasRef:
|
|
319
|
+
d.current = requestAnimationFrame(r);
|
|
320
|
+
}, [v, y]);
|
|
321
|
+
return f(() => () => v(), [v]), {
|
|
322
|
+
canvasRef: i,
|
|
271
323
|
containerRef: a,
|
|
272
324
|
ratio: s,
|
|
273
325
|
handlers: {
|
|
274
|
-
onPointerEnter:
|
|
275
|
-
!
|
|
326
|
+
onPointerEnter: r ? (e) => {
|
|
327
|
+
!r || e.pointerType === "touch" || (a.current?.setAttribute("data-hovered", "true"), b(22));
|
|
276
328
|
} : void 0,
|
|
277
|
-
onPointerLeave:
|
|
278
|
-
|
|
329
|
+
onPointerLeave: r ? () => {
|
|
330
|
+
r && (a.current?.setAttribute("data-hovered", "false"), p.current = {
|
|
279
331
|
rx: 0,
|
|
280
332
|
ry: 0,
|
|
281
333
|
rz: 0
|
|
282
334
|
}, b(14, () => {
|
|
283
|
-
let e =
|
|
335
|
+
let e = i.current;
|
|
284
336
|
e && (e.style.transform = "");
|
|
285
337
|
}));
|
|
286
338
|
} : void 0,
|
|
287
|
-
onPointerMove:
|
|
288
|
-
if (!
|
|
289
|
-
let t = e.currentTarget.getBoundingClientRect(),
|
|
290
|
-
|
|
339
|
+
onPointerMove: r ? (e) => {
|
|
340
|
+
if (!r || e.pointerType === "touch") return;
|
|
341
|
+
let t = e.currentTarget.getBoundingClientRect(), n = Math.max(-1, Math.min(1, ((e.clientX - t.left) / t.width - .5) * 2)), i = Math.max(-1, Math.min(1, ((e.clientY - t.top) / t.height - .5) * 2));
|
|
342
|
+
p.current = {
|
|
291
343
|
rx: i * -10,
|
|
292
|
-
ry:
|
|
293
|
-
rz:
|
|
294
|
-
}, a.current?.style.setProperty("--j-card-glare-x", `${(
|
|
344
|
+
ry: n * 12,
|
|
345
|
+
rz: n * i * -1.2
|
|
346
|
+
}, a.current?.style.setProperty("--j-card-glare-x", `${(n + 1) * 50}%`), a.current?.style.setProperty("--j-card-glare-y", `${(1 - i) * 50}%`), b(22);
|
|
295
347
|
} : void 0
|
|
296
348
|
}
|
|
297
349
|
};
|
|
298
350
|
}
|
|
299
|
-
function
|
|
300
|
-
let [r, i] =
|
|
351
|
+
function te(e, t, n) {
|
|
352
|
+
let [r, i] = g(null), [a, o] = g(null), [s, c] = g(null), l = u((e, t, n) => {
|
|
301
353
|
let r = "touches" in e ? e.touches[0] : e, i = e.currentTarget.getBoundingClientRect();
|
|
302
354
|
o({
|
|
303
355
|
clause: t,
|
|
@@ -307,22 +359,22 @@ function ee(e, t, n) {
|
|
|
307
359
|
offX: r.clientX - i.left,
|
|
308
360
|
offY: r.clientY - i.top
|
|
309
361
|
}), c(null);
|
|
310
|
-
}, []),
|
|
311
|
-
|
|
312
|
-
|
|
362
|
+
}, []), d = h(r), m = h(a), _ = h(s), v = h(e), y = h(t);
|
|
363
|
+
p(() => {
|
|
364
|
+
d.current = r, m.current = a, _.current = s, v.current = e, y.current = t;
|
|
313
365
|
});
|
|
314
366
|
let b = r !== null || a !== null;
|
|
315
|
-
return
|
|
367
|
+
return f(() => {
|
|
316
368
|
if (!b) return;
|
|
317
369
|
let e = (e) => {
|
|
318
370
|
let t = "touches" in e ? e : null, r = t ? t.touches[0] : e;
|
|
319
371
|
if (!r) return;
|
|
320
|
-
let a =
|
|
321
|
-
if (!a &&
|
|
322
|
-
let e = r.clientX -
|
|
372
|
+
let a = d.current;
|
|
373
|
+
if (!a && m.current) {
|
|
374
|
+
let e = r.clientX - m.current.x, t = r.clientY - m.current.y;
|
|
323
375
|
if (Math.hypot(e, t) < 8) return;
|
|
324
376
|
a = {
|
|
325
|
-
...
|
|
377
|
+
...m.current,
|
|
326
378
|
x: r.clientX,
|
|
327
379
|
y: r.clientY
|
|
328
380
|
}, o(null), i(a);
|
|
@@ -343,9 +395,9 @@ function ee(e, t, n) {
|
|
|
343
395
|
}
|
|
344
396
|
c(l);
|
|
345
397
|
}, t = () => {
|
|
346
|
-
let e =
|
|
398
|
+
let e = d.current, t = _.current;
|
|
347
399
|
if (e && t && t !== e.fromZone) {
|
|
348
|
-
let n = t, r =
|
|
400
|
+
let n = t, r = v.current;
|
|
349
401
|
y.current({
|
|
350
402
|
...r,
|
|
351
403
|
[e.fromZone]: r[e.fromZone].filter((t) => t.id !== e.clause.id),
|
|
@@ -365,8 +417,8 @@ function ee(e, t, n) {
|
|
|
365
417
|
}
|
|
366
418
|
//#endregion
|
|
367
419
|
//#region src/ui/sprites.tsx
|
|
368
|
-
function
|
|
369
|
-
let
|
|
420
|
+
function ne({ name: n, sheet: a, width: o = 40, height: s, style: c, className: l }) {
|
|
421
|
+
let u = r(n), d = a ?? u?.type ?? "Jokers", f = i[d], p = t(d), m = u?.pos ?? p.pos, h = o;
|
|
370
422
|
[
|
|
371
423
|
"Jokers",
|
|
372
424
|
"Tarots",
|
|
@@ -375,23 +427,26 @@ function te({ name: e, sheet: t, width: i = 40, height: s, style: c }) {
|
|
|
375
427
|
"Decks",
|
|
376
428
|
"Enhancers",
|
|
377
429
|
"Editions"
|
|
378
|
-
].includes(
|
|
379
|
-
let
|
|
380
|
-
if (!
|
|
381
|
-
let
|
|
382
|
-
return /* @__PURE__ */
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
430
|
+
].includes(d) && (h = Math.round(o * 95 / 71));
|
|
431
|
+
let g = s ?? h;
|
|
432
|
+
if (!f) return null;
|
|
433
|
+
let _ = o * f.cols, y = g * f.rows, b = -(m.x * o), x = -(m.y * g);
|
|
434
|
+
return /* @__PURE__ */ v("div", {
|
|
435
|
+
className: l,
|
|
436
|
+
style: {
|
|
437
|
+
width: o,
|
|
438
|
+
height: g,
|
|
439
|
+
flexShrink: 0,
|
|
440
|
+
backgroundImage: `url(${e(f.assetKey)})`,
|
|
441
|
+
backgroundSize: `${_}px ${y}px`,
|
|
442
|
+
backgroundPosition: `${b}px ${x}px`,
|
|
443
|
+
backgroundRepeat: "no-repeat",
|
|
444
|
+
imageRendering: "pixelated",
|
|
445
|
+
...c
|
|
446
|
+
}
|
|
447
|
+
});
|
|
393
448
|
}
|
|
394
|
-
var
|
|
449
|
+
var re = [
|
|
395
450
|
"White",
|
|
396
451
|
"Red",
|
|
397
452
|
"Green",
|
|
@@ -401,21 +456,21 @@ var ne = [
|
|
|
401
456
|
"Orange",
|
|
402
457
|
"Gold"
|
|
403
458
|
];
|
|
404
|
-
function
|
|
405
|
-
let a =
|
|
406
|
-
return /* @__PURE__ */
|
|
407
|
-
width:
|
|
459
|
+
function ie({ stake: t, width: n = 29, height: r, style: i }) {
|
|
460
|
+
let a = re.indexOf(t.replace(" Stake", "")), o = a >= 0 ? a : 0, s = o % 5, c = Math.floor(o / 5), l = r ?? n, u = n * 5, d = l * 2;
|
|
461
|
+
return /* @__PURE__ */ v("div", { style: {
|
|
462
|
+
width: n,
|
|
408
463
|
height: l,
|
|
409
464
|
flexShrink: 0,
|
|
410
|
-
backgroundImage: `url(${
|
|
465
|
+
backgroundImage: `url(${e("stakes")})`,
|
|
411
466
|
backgroundSize: `${u}px ${d}px`,
|
|
412
|
-
backgroundPosition: `-${s *
|
|
467
|
+
backgroundPosition: `-${s * n}px -${c * l}px`,
|
|
413
468
|
backgroundRepeat: "no-repeat",
|
|
414
469
|
imageRendering: "pixelated",
|
|
415
470
|
...i
|
|
416
471
|
} });
|
|
417
472
|
}
|
|
418
|
-
var
|
|
473
|
+
var ae = {
|
|
419
474
|
Red: {
|
|
420
475
|
x: 0,
|
|
421
476
|
y: 0
|
|
@@ -441,15 +496,15 @@ var ie = {
|
|
|
441
496
|
y: 2
|
|
442
497
|
}
|
|
443
498
|
};
|
|
444
|
-
function
|
|
445
|
-
let o =
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
-
width:
|
|
499
|
+
function oe({ deck: t, width: r = 71, height: i, style: a }) {
|
|
500
|
+
let o = ae[t.replace(" Deck", "")] ?? ae.Red, s = i ?? r * 95 / 71, c = n.enhancers;
|
|
501
|
+
return /* @__PURE__ */ v("div", { style: {
|
|
502
|
+
width: r,
|
|
448
503
|
height: s,
|
|
449
504
|
flexShrink: 0,
|
|
450
|
-
backgroundImage: `url(${
|
|
451
|
-
backgroundSize: `${
|
|
452
|
-
backgroundPosition: `${-o.x *
|
|
505
|
+
backgroundImage: `url(${e(c.asset)})`,
|
|
506
|
+
backgroundSize: `${r * c.columns}px ${s * c.rows}px`,
|
|
507
|
+
backgroundPosition: `${-o.x * r}px ${-o.y * s}px`,
|
|
453
508
|
backgroundRepeat: "no-repeat",
|
|
454
509
|
imageRendering: "pixelated",
|
|
455
510
|
...a
|
|
@@ -461,11 +516,11 @@ function N({ tone: e = "default", size: t = "md", shadow: n = !0, dance: r = !1,
|
|
|
461
516
|
let u = `j-text--${t}`, d = `j-text--${e}`, f = n ? "" : "j-text--no-shadow", p = r ? "j-text--dance-container" : "", m = {};
|
|
462
517
|
i != null && (m.letterSpacing = i), s && Object.assign(m, s);
|
|
463
518
|
let h = c;
|
|
464
|
-
return r && typeof c == "string" && (h = c.split("").map((e, t) => /* @__PURE__ */
|
|
519
|
+
return r && typeof c == "string" && (h = c.split("").map((e, t) => /* @__PURE__ */ v("span", {
|
|
465
520
|
className: "j-font-dance-char",
|
|
466
521
|
style: { animationDelay: `${t * -.15}s` },
|
|
467
522
|
children: e === " " ? "\xA0" : e
|
|
468
|
-
}, t))), /* @__PURE__ */
|
|
523
|
+
}, t))), /* @__PURE__ */ v(a, {
|
|
469
524
|
className: `j-text ${u} ${d} ${f} ${p} ${o}`.trim(),
|
|
470
525
|
style: Object.keys(m).length > 0 ? m : void 0,
|
|
471
526
|
...l,
|
|
@@ -474,57 +529,57 @@ function N({ tone: e = "default", size: t = "md", shadow: n = !0, dance: r = !1,
|
|
|
474
529
|
}
|
|
475
530
|
//#endregion
|
|
476
531
|
//#region src/ui/JimboTextInput.tsx
|
|
477
|
-
var
|
|
478
|
-
return /* @__PURE__ */
|
|
532
|
+
var se = a.forwardRef(function({ className: e = "", invalid: t = !1, "aria-invalid": n, ...r }, i) {
|
|
533
|
+
return /* @__PURE__ */ v("input", {
|
|
479
534
|
ref: i,
|
|
480
535
|
className: `j-text-input ${e}`.trim(),
|
|
481
536
|
"aria-invalid": n ?? t,
|
|
482
537
|
"data-invalid": t,
|
|
483
538
|
...r
|
|
484
539
|
});
|
|
485
|
-
}),
|
|
486
|
-
ref:
|
|
540
|
+
}), ce = l(({ children: e, className: t = "", sway: n = !1, onBack: r, hideBack: i = !1, style: a, ...o }) => /* @__PURE__ */ y("div", {
|
|
541
|
+
ref: O(n),
|
|
487
542
|
className: `j-panel ${t}`,
|
|
488
543
|
style: a,
|
|
489
544
|
...o,
|
|
490
|
-
children: [/* @__PURE__ */
|
|
545
|
+
children: [/* @__PURE__ */ v("div", {
|
|
491
546
|
className: "j-panel__body",
|
|
492
547
|
children: e
|
|
493
|
-
}), r && !i && /* @__PURE__ */
|
|
548
|
+
}), r && !i && /* @__PURE__ */ v("div", {
|
|
494
549
|
className: "j-panel__back",
|
|
495
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ v(ue, { onClick: r })
|
|
496
551
|
})]
|
|
497
552
|
}));
|
|
498
|
-
|
|
499
|
-
var
|
|
553
|
+
ce.displayName = "JimboPanel";
|
|
554
|
+
var le = l(({ children: e, className: t = "", style: n, ...r }) => /* @__PURE__ */ v("div", {
|
|
500
555
|
className: `j-inner-panel ${t}`,
|
|
501
556
|
style: n,
|
|
502
557
|
...r,
|
|
503
558
|
children: e
|
|
504
559
|
}));
|
|
505
|
-
|
|
560
|
+
le.displayName = "JimboInnerPanel";
|
|
506
561
|
function P({ tone: e = "orange", size: t = "md", fullWidth: n = !1, disabled: r = !1, onClick: i, style: a, className: o = "", children: s, ...c }) {
|
|
507
562
|
let l = t === "xs" ? "xs" : t === "sm" ? "sm" : t === "lg" ? "lg" : "md";
|
|
508
|
-
return /* @__PURE__ */
|
|
563
|
+
return /* @__PURE__ */ v("button", {
|
|
509
564
|
type: "button",
|
|
510
565
|
className: `j-btn j-btn--${e} j-btn--${t} ${n ? "j-btn--full" : ""} ${r ? "j-btn--disabled" : ""} ${o}`,
|
|
511
566
|
disabled: r,
|
|
512
567
|
onClick: i,
|
|
513
568
|
style: a,
|
|
514
569
|
...c,
|
|
515
|
-
children: /* @__PURE__ */
|
|
570
|
+
children: /* @__PURE__ */ v("div", {
|
|
516
571
|
className: "j-btn__face",
|
|
517
|
-
children: /* @__PURE__ */
|
|
572
|
+
children: /* @__PURE__ */ v(N, {
|
|
518
573
|
size: l,
|
|
519
574
|
children: s
|
|
520
575
|
})
|
|
521
576
|
})
|
|
522
577
|
});
|
|
523
578
|
}
|
|
524
|
-
function
|
|
525
|
-
return /* @__PURE__ */
|
|
579
|
+
function ue({ onClick: e, size: t = "sm" }) {
|
|
580
|
+
return /* @__PURE__ */ v("div", {
|
|
526
581
|
className: "j-back-btn-wrap j-flex j-justify-center j-w-full",
|
|
527
|
-
children: /* @__PURE__ */
|
|
582
|
+
children: /* @__PURE__ */ v(P, {
|
|
528
583
|
tone: "orange",
|
|
529
584
|
size: t,
|
|
530
585
|
fullWidth: !0,
|
|
@@ -534,16 +589,16 @@ function le({ onClick: e, size: t = "sm" }) {
|
|
|
534
589
|
})
|
|
535
590
|
});
|
|
536
591
|
}
|
|
537
|
-
function
|
|
538
|
-
return t ? /* @__PURE__ */
|
|
592
|
+
function de({ children: e, open: t, onClose: n, title: r, className: i, showBack: a = !0 }) {
|
|
593
|
+
return t ? /* @__PURE__ */ v("div", {
|
|
539
594
|
className: "j-modal-overlay",
|
|
540
|
-
children: /* @__PURE__ */
|
|
595
|
+
children: /* @__PURE__ */ y(ce, {
|
|
541
596
|
onBack: a ? n : void 0,
|
|
542
597
|
className: `j-modal ${i ?? ""}`,
|
|
543
|
-
children: [r && /* @__PURE__ */
|
|
598
|
+
children: [r && /* @__PURE__ */ v("div", {
|
|
544
599
|
className: "j-modal__title-wrap",
|
|
545
600
|
"aria-hidden": !1,
|
|
546
|
-
children: /* @__PURE__ */
|
|
601
|
+
children: /* @__PURE__ */ v(N, {
|
|
547
602
|
as: "h2",
|
|
548
603
|
size: "lg",
|
|
549
604
|
className: "j-modal__title",
|
|
@@ -555,26 +610,26 @@ function ue({ children: e, open: t, onClose: n, title: r, className: i, showBack
|
|
|
555
610
|
}
|
|
556
611
|
//#endregion
|
|
557
612
|
//#region src/ui/jimboTabs.tsx
|
|
558
|
-
function
|
|
559
|
-
return /* @__PURE__ */
|
|
613
|
+
function fe({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
|
|
614
|
+
return /* @__PURE__ */ v("div", {
|
|
560
615
|
className: `j-tabs ${r}`,
|
|
561
616
|
style: i,
|
|
562
617
|
children: e.map((e) => {
|
|
563
618
|
let r = t === e.id;
|
|
564
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ y("div", {
|
|
565
620
|
className: "j-tab",
|
|
566
621
|
"data-active": r,
|
|
567
|
-
children: [/* @__PURE__ */
|
|
622
|
+
children: [/* @__PURE__ */ v("div", {
|
|
568
623
|
className: "j-tab__indicator",
|
|
569
624
|
"data-active": r,
|
|
570
625
|
"aria-hidden": !0,
|
|
571
|
-
children: /* @__PURE__ */
|
|
626
|
+
children: /* @__PURE__ */ v("svg", {
|
|
572
627
|
width: 14,
|
|
573
628
|
height: 10,
|
|
574
629
|
viewBox: "0 0 14 10",
|
|
575
|
-
children: /* @__PURE__ */
|
|
630
|
+
children: /* @__PURE__ */ v("polygon", { points: "7,10 0,0 14,0" })
|
|
576
631
|
})
|
|
577
|
-
}), /* @__PURE__ */
|
|
632
|
+
}), /* @__PURE__ */ v(P, {
|
|
578
633
|
tone: "red",
|
|
579
634
|
size: "sm",
|
|
580
635
|
onClick: () => n(e.id),
|
|
@@ -586,8 +641,8 @@ function de({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i
|
|
|
586
641
|
}
|
|
587
642
|
//#endregion
|
|
588
643
|
//#region src/ui/JimboListItem.tsx
|
|
589
|
-
var
|
|
590
|
-
return /* @__PURE__ */
|
|
644
|
+
var pe = a.forwardRef(function({ active: e = !1, className: t = "", children: n, ...r }, i) {
|
|
645
|
+
return /* @__PURE__ */ v("button", {
|
|
591
646
|
ref: i,
|
|
592
647
|
type: "button",
|
|
593
648
|
className: `j-list-item ${t}`.trim(),
|
|
@@ -595,11 +650,11 @@ var fe = s.forwardRef(function({ active: e = !1, className: t = "", children: n,
|
|
|
595
650
|
...r,
|
|
596
651
|
children: n
|
|
597
652
|
});
|
|
598
|
-
}), F =
|
|
653
|
+
}), F = C, me = {
|
|
599
654
|
xs: 22,
|
|
600
655
|
sm: 26,
|
|
601
656
|
md: 30
|
|
602
|
-
},
|
|
657
|
+
}, he = {
|
|
603
658
|
default: {
|
|
604
659
|
rest: F.DARKEST,
|
|
605
660
|
hover: F.DARK_GREY,
|
|
@@ -611,9 +666,9 @@ var fe = s.forwardRef(function({ active: e = !1, className: t = "", children: n,
|
|
|
611
666
|
border: F.BLACK
|
|
612
667
|
}
|
|
613
668
|
};
|
|
614
|
-
function
|
|
615
|
-
let [l, u] =
|
|
616
|
-
return /* @__PURE__ */
|
|
669
|
+
function ge({ onClick: e, onMouseDown: t, onTouchStart: n, title: r, "aria-label": i, disabled: a = !1, size: o = "md", tone: s = "default", children: c }) {
|
|
670
|
+
let [l, u] = g(!1), d = me[o], f = he[s], p = s === "destructive" ? 2 : 1, m = s === "destructive" ? `inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 ${F.BLACK}` : void 0;
|
|
671
|
+
return /* @__PURE__ */ v("button", {
|
|
617
672
|
"aria-label": i ?? r,
|
|
618
673
|
disabled: a,
|
|
619
674
|
onClick: (t) => !a && e?.(t),
|
|
@@ -646,8 +701,8 @@ function he({ onClick: e, onMouseDown: t, onTouchStart: n, title: r, "aria-label
|
|
|
646
701
|
}
|
|
647
702
|
//#endregion
|
|
648
703
|
//#region src/ui/JimboInlineEdit.tsx
|
|
649
|
-
var
|
|
650
|
-
return /* @__PURE__ */
|
|
704
|
+
var _e = a.forwardRef(function({ size: e = "md", tone: t = "white", dim: n = !1, className: r = "", ...i }, a) {
|
|
705
|
+
return /* @__PURE__ */ v("input", {
|
|
651
706
|
ref: a,
|
|
652
707
|
type: "text",
|
|
653
708
|
className: [
|
|
@@ -662,8 +717,8 @@ var ge = s.forwardRef(function({ size: e = "md", tone: t = "white", dim: n = !1,
|
|
|
662
717
|
});
|
|
663
718
|
//#endregion
|
|
664
719
|
//#region src/ui/JimboBadge.tsx
|
|
665
|
-
function
|
|
666
|
-
return /* @__PURE__ */
|
|
720
|
+
function ve({ size: e = "sm", tone: t = "dark", className: n, children: r, ...i }) {
|
|
721
|
+
return /* @__PURE__ */ v("span", {
|
|
667
722
|
className: `j-badge j-badge--${e} j-badge--${t} ${n ?? ""}`,
|
|
668
723
|
...i,
|
|
669
724
|
children: r
|
|
@@ -671,22 +726,22 @@ function _e({ size: e = "sm", tone: t = "dark", className: n, children: r, ...i
|
|
|
671
726
|
}
|
|
672
727
|
//#endregion
|
|
673
728
|
//#region src/ui/jimboFlankNav.tsx
|
|
674
|
-
function
|
|
675
|
-
return /* @__PURE__ */
|
|
729
|
+
function ye({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel: i = "Previous", nextLabel: a = "Next", children: o, className: s = "", style: c }) {
|
|
730
|
+
return /* @__PURE__ */ y("div", {
|
|
676
731
|
className: `j-flank ${s}`,
|
|
677
732
|
style: c,
|
|
678
733
|
children: [
|
|
679
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ v(be, {
|
|
680
735
|
direction: "left",
|
|
681
736
|
onClick: e,
|
|
682
737
|
disabled: !n,
|
|
683
738
|
"aria-label": i
|
|
684
739
|
}),
|
|
685
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ v("div", {
|
|
686
741
|
className: "j-flank__content",
|
|
687
742
|
children: o
|
|
688
743
|
}),
|
|
689
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ v(be, {
|
|
690
745
|
direction: "right",
|
|
691
746
|
onClick: t,
|
|
692
747
|
disabled: !r,
|
|
@@ -695,9 +750,9 @@ function ve({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel:
|
|
|
695
750
|
]
|
|
696
751
|
});
|
|
697
752
|
}
|
|
698
|
-
function
|
|
699
|
-
let [i,
|
|
700
|
-
return /* @__PURE__ */
|
|
753
|
+
function be({ direction: e, onClick: t, disabled: n, "aria-label": r }) {
|
|
754
|
+
let [i, o] = a.useState(!1);
|
|
755
|
+
return /* @__PURE__ */ v("button", {
|
|
701
756
|
type: "button",
|
|
702
757
|
className: "j-flank__btn",
|
|
703
758
|
"data-pressed": i && !n,
|
|
@@ -705,16 +760,16 @@ function ye({ direction: e, onClick: t, disabled: n, "aria-label": r }) {
|
|
|
705
760
|
disabled: n,
|
|
706
761
|
"aria-label": r,
|
|
707
762
|
title: r,
|
|
708
|
-
onMouseDown: () => !n &&
|
|
709
|
-
onMouseUp: () =>
|
|
710
|
-
onMouseLeave: () =>
|
|
711
|
-
onTouchStart: () => !n &&
|
|
712
|
-
onTouchEnd: () =>
|
|
713
|
-
children: /* @__PURE__ */
|
|
763
|
+
onMouseDown: () => !n && o(!0),
|
|
764
|
+
onMouseUp: () => o(!1),
|
|
765
|
+
onMouseLeave: () => o(!1),
|
|
766
|
+
onTouchStart: () => !n && o(!0),
|
|
767
|
+
onTouchEnd: () => o(!1),
|
|
768
|
+
children: /* @__PURE__ */ v(xe, { direction: e })
|
|
714
769
|
});
|
|
715
770
|
}
|
|
716
|
-
function
|
|
717
|
-
return /* @__PURE__ */
|
|
771
|
+
function xe({ direction: e }) {
|
|
772
|
+
return /* @__PURE__ */ v("svg", {
|
|
718
773
|
width: 28,
|
|
719
774
|
height: 28,
|
|
720
775
|
viewBox: "0 0 28 28",
|
|
@@ -724,14 +779,14 @@ function be({ direction: e }) {
|
|
|
724
779
|
strokeLinecap: "round",
|
|
725
780
|
strokeLinejoin: "round",
|
|
726
781
|
"aria-hidden": !0,
|
|
727
|
-
children: /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ v("polyline", { points: e === "left" ? "18,4 8,14 18,24" : "10,4 20,14 10,24" })
|
|
728
783
|
});
|
|
729
784
|
}
|
|
730
785
|
//#endregion
|
|
731
786
|
//#region src/ui/JimboSeedCopyChip.tsx
|
|
732
|
-
function
|
|
733
|
-
let [c, l] =
|
|
734
|
-
return /* @__PURE__ */
|
|
787
|
+
function Se({ value: e, placeholder: t = "--------", disabled: n = !1, copiedLabel: r = "Copied!", copiedDurationMs: i = 2e3, onCopy: a, className: o = "", style: s }) {
|
|
788
|
+
let [c, l] = g(!1), u = e.trim(), d = !n && u.length > 0;
|
|
789
|
+
return /* @__PURE__ */ y("button", {
|
|
735
790
|
type: "button",
|
|
736
791
|
className: ["j-seed-copy", o].filter(Boolean).join(" "),
|
|
737
792
|
style: s,
|
|
@@ -746,11 +801,11 @@ function xe({ value: e, placeholder: t = "--------", disabled: n = !1, copiedLab
|
|
|
746
801
|
disabled: !d,
|
|
747
802
|
"data-copied": c,
|
|
748
803
|
"aria-label": d ? `Copy seed ${u}` : "Seed unavailable",
|
|
749
|
-
children: [/* @__PURE__ */
|
|
804
|
+
children: [/* @__PURE__ */ v("span", {
|
|
750
805
|
className: "j-seed-copy__icon",
|
|
751
806
|
"aria-hidden": !0,
|
|
752
|
-
children:
|
|
753
|
-
}), /* @__PURE__ */
|
|
807
|
+
children: v(c ? b : x, { size: 18 })
|
|
808
|
+
}), /* @__PURE__ */ v("span", {
|
|
754
809
|
className: "j-seed-copy__text",
|
|
755
810
|
children: c ? r : u || t
|
|
756
811
|
})]
|
|
@@ -758,20 +813,20 @@ function xe({ value: e, placeholder: t = "--------", disabled: n = !1, copiedLab
|
|
|
758
813
|
}
|
|
759
814
|
//#endregion
|
|
760
815
|
//#region src/ui/JimboSpinner.tsx
|
|
761
|
-
function
|
|
762
|
-
return /* @__PURE__ */
|
|
816
|
+
function Ce({ value: e, label: t, onPrev: n, onNext: r, canPrev: i = !0, canNext: a = !0, className: o = "" }) {
|
|
817
|
+
return /* @__PURE__ */ y("div", {
|
|
763
818
|
className: `j-spinner-wrap ${o}`,
|
|
764
|
-
children: [t && /* @__PURE__ */
|
|
819
|
+
children: [t && /* @__PURE__ */ v("div", {
|
|
765
820
|
className: "j-spinner__label",
|
|
766
|
-
children: /* @__PURE__ */
|
|
821
|
+
children: /* @__PURE__ */ v(N, {
|
|
767
822
|
size: "sm",
|
|
768
823
|
tone: "white",
|
|
769
824
|
children: t
|
|
770
825
|
})
|
|
771
|
-
}), /* @__PURE__ */
|
|
826
|
+
}), /* @__PURE__ */ y("div", {
|
|
772
827
|
className: "j-spinner",
|
|
773
828
|
children: [
|
|
774
|
-
/* @__PURE__ */
|
|
829
|
+
/* @__PURE__ */ v(P, {
|
|
775
830
|
tone: "red",
|
|
776
831
|
size: "sm",
|
|
777
832
|
onClick: n,
|
|
@@ -779,15 +834,15 @@ function Se({ value: e, label: t, onPrev: n, onNext: r, canPrev: i = !0, canNext
|
|
|
779
834
|
"aria-label": `Previous ${t ?? "value"}`,
|
|
780
835
|
children: "<"
|
|
781
836
|
}),
|
|
782
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ v("div", {
|
|
783
838
|
className: "j-spinner__value",
|
|
784
|
-
children: /* @__PURE__ */
|
|
839
|
+
children: /* @__PURE__ */ v(N, {
|
|
785
840
|
size: "sm",
|
|
786
841
|
tone: "white",
|
|
787
842
|
children: e
|
|
788
843
|
})
|
|
789
844
|
}),
|
|
790
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ v(P, {
|
|
791
846
|
tone: "red",
|
|
792
847
|
size: "sm",
|
|
793
848
|
onClick: r,
|
|
@@ -800,23 +855,117 @@ function Se({ value: e, label: t, onPrev: n, onNext: r, canPrev: i = !0, canNext
|
|
|
800
855
|
});
|
|
801
856
|
}
|
|
802
857
|
//#endregion
|
|
803
|
-
//#region src/ui/
|
|
804
|
-
function
|
|
805
|
-
|
|
806
|
-
|
|
858
|
+
//#region src/ui/jimboLink.tsx
|
|
859
|
+
function we({ external: e = !0, className: t = "", children: n, ...r }) {
|
|
860
|
+
let i = e ? {
|
|
861
|
+
target: "_blank",
|
|
862
|
+
rel: "noopener noreferrer"
|
|
863
|
+
} : {};
|
|
864
|
+
return /* @__PURE__ */ v("a", {
|
|
865
|
+
className: `j-link ${t}`.trim(),
|
|
866
|
+
...i,
|
|
807
867
|
...r,
|
|
808
|
-
children:
|
|
868
|
+
children: n
|
|
809
869
|
});
|
|
810
870
|
}
|
|
811
|
-
|
|
812
|
-
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region src/ui/JimboBalatroFooter.tsx
|
|
873
|
+
var Te = [
|
|
874
|
+
{
|
|
875
|
+
char: "♥️",
|
|
876
|
+
kf: "jaml-heart"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
char: "♠️",
|
|
880
|
+
kf: "jaml-spade"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
char: "♦️",
|
|
884
|
+
kf: "jaml-diamond"
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
char: "♣️",
|
|
888
|
+
kf: "jaml-club"
|
|
889
|
+
}
|
|
890
|
+
], Ee = "5s";
|
|
891
|
+
function De({ hidden: e = !1, className: t = "", children: n }) {
|
|
892
|
+
return e ? null : /* @__PURE__ */ y("div", {
|
|
893
|
+
className: ["j-footer", t].filter(Boolean).join(" "),
|
|
894
|
+
children: [/* @__PURE__ */ v("div", {
|
|
895
|
+
className: "j-footer__bar",
|
|
896
|
+
children: /* @__PURE__ */ y("p", {
|
|
897
|
+
className: "j-footer__line j-footer__line--wrap",
|
|
898
|
+
children: [
|
|
899
|
+
/* @__PURE__ */ v("span", {
|
|
900
|
+
className: "j-footer__chunk",
|
|
901
|
+
children: "Not affiliated with LocalThunk or PlayStack"
|
|
902
|
+
}),
|
|
903
|
+
/* @__PURE__ */ y("span", {
|
|
904
|
+
className: "j-footer__chunk j-footer__chunk--credit",
|
|
905
|
+
children: [
|
|
906
|
+
"Made with",
|
|
907
|
+
" ",
|
|
908
|
+
/* @__PURE__ */ v("span", {
|
|
909
|
+
style: {
|
|
910
|
+
position: "relative",
|
|
911
|
+
display: "inline-block",
|
|
912
|
+
width: "1.5em",
|
|
913
|
+
height: "1.2em",
|
|
914
|
+
verticalAlign: "middle"
|
|
915
|
+
},
|
|
916
|
+
children: Te.map(({ char: e, kf: t }) => /* @__PURE__ */ v("span", {
|
|
917
|
+
style: {
|
|
918
|
+
position: "absolute",
|
|
919
|
+
inset: 0,
|
|
920
|
+
display: "inline-flex",
|
|
921
|
+
alignItems: "center",
|
|
922
|
+
justifyContent: "center",
|
|
923
|
+
opacity: 0,
|
|
924
|
+
animationName: t,
|
|
925
|
+
animationDuration: Ee,
|
|
926
|
+
animationDelay: "0s",
|
|
927
|
+
animationIterationCount: "infinite",
|
|
928
|
+
animationTimingFunction: "ease-out"
|
|
929
|
+
},
|
|
930
|
+
children: e
|
|
931
|
+
}, e))
|
|
932
|
+
}),
|
|
933
|
+
" ",
|
|
934
|
+
"for the ",
|
|
935
|
+
/* @__PURE__ */ v(we, {
|
|
936
|
+
href: "https://playbalatro.com",
|
|
937
|
+
children: "Balatro"
|
|
938
|
+
}),
|
|
939
|
+
" community"
|
|
940
|
+
]
|
|
941
|
+
}),
|
|
942
|
+
n ? /* @__PURE__ */ v("span", {
|
|
943
|
+
className: "j-footer__extra",
|
|
944
|
+
children: n
|
|
945
|
+
}) : null
|
|
946
|
+
]
|
|
947
|
+
})
|
|
948
|
+
}), /* @__PURE__ */ v("style", { children: "\n @keyframes jaml-heart { 0%{opacity:0;transform:scale(1)} 1%{opacity:1;transform:scale(1.45)} 3.5%{opacity:1;transform:scale(1)} 61.5%{opacity:1;transform:scale(1)} 62%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-spade { 0%,61.5%{opacity:0} 62%{opacity:1;transform:scale(1.45)} 64.5%{opacity:1;transform:scale(1)} 71.5%{opacity:1} 72%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-diamond { 0%,71.5%{opacity:0} 72%{opacity:1;transform:scale(1.45)} 74.5%{opacity:1;transform:scale(1)} 81.5%{opacity:1} 82%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-club { 0%,81.5%{opacity:0} 82%{opacity:1;transform:scale(1.45)} 84.5%{opacity:1;transform:scale(1)} 95%{opacity:1} 96%{opacity:0} 100%{opacity:0} }\n " })]
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
//#endregion
|
|
952
|
+
//#region src/ui/jimboApp.tsx
|
|
953
|
+
function Oe({ children: e, className: t = "", ...n }) {
|
|
954
|
+
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
|
|
955
|
+
className: `j-app ${t}`.trim(),
|
|
956
|
+
...n,
|
|
957
|
+
children: e
|
|
958
|
+
}), /* @__PURE__ */ v(De, {})] });
|
|
959
|
+
}
|
|
960
|
+
function ke({ children: e, className: t = "", ...n }) {
|
|
961
|
+
return /* @__PURE__ */ v("div", {
|
|
813
962
|
className: `j-app__scroll ${t}`,
|
|
814
963
|
...n,
|
|
815
964
|
children: e
|
|
816
965
|
});
|
|
817
966
|
}
|
|
818
|
-
function
|
|
819
|
-
return /* @__PURE__ */
|
|
967
|
+
function Ae({ children: e, className: t = "", ...n }) {
|
|
968
|
+
return /* @__PURE__ */ v("div", {
|
|
820
969
|
className: `j-app__footer ${t}`,
|
|
821
970
|
...n,
|
|
822
971
|
children: e
|
|
@@ -824,22 +973,22 @@ function Te({ children: e, className: t = "", ...n }) {
|
|
|
824
973
|
}
|
|
825
974
|
//#endregion
|
|
826
975
|
//#region src/ui/JimboToggleList.tsx
|
|
827
|
-
function
|
|
828
|
-
return /* @__PURE__ */
|
|
976
|
+
function je({ items: e, onToggle: t, title: n, variant: r = "row" }) {
|
|
977
|
+
return /* @__PURE__ */ v(ce, { children: /* @__PURE__ */ y("div", {
|
|
829
978
|
className: `j-toggle-list j-toggle-list--${r}`,
|
|
830
|
-
children: [n && /* @__PURE__ */
|
|
979
|
+
children: [n && /* @__PURE__ */ v("div", {
|
|
831
980
|
className: "j-toggle-list__title",
|
|
832
981
|
children: n
|
|
833
|
-
}), e.map((e) => /* @__PURE__ */
|
|
982
|
+
}), e.map((e) => /* @__PURE__ */ y("button", {
|
|
834
983
|
type: "button",
|
|
835
984
|
className: "j-toggle-item",
|
|
836
985
|
"data-variant": r,
|
|
837
986
|
"aria-pressed": e.on,
|
|
838
987
|
onClick: () => t(e.id),
|
|
839
|
-
children: [/* @__PURE__ */
|
|
988
|
+
children: [/* @__PURE__ */ v("span", {
|
|
840
989
|
className: "j-toggle-item__label",
|
|
841
990
|
children: e.label
|
|
842
|
-
}), /* @__PURE__ */
|
|
991
|
+
}), /* @__PURE__ */ v("span", {
|
|
843
992
|
className: "j-toggle-check",
|
|
844
993
|
"data-on": e.on
|
|
845
994
|
})]
|
|
@@ -848,24 +997,24 @@ function Ee({ items: e, onToggle: t, title: n, variant: r = "row" }) {
|
|
|
848
997
|
}
|
|
849
998
|
//#endregion
|
|
850
999
|
//#region src/ui/jimboFilterBar.tsx
|
|
851
|
-
function
|
|
852
|
-
return /* @__PURE__ */
|
|
1000
|
+
function Me({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...", searchLabel: r = "Search", sort: i, onSortChange: a, sortLabel: o = "Sort By", sortOptions: s, className: c = "", style: l }) {
|
|
1001
|
+
return /* @__PURE__ */ y("div", {
|
|
853
1002
|
className: `j-filter-bar ${c}`,
|
|
854
1003
|
style: l,
|
|
855
|
-
children: [t ? /* @__PURE__ */
|
|
1004
|
+
children: [t ? /* @__PURE__ */ y("div", {
|
|
856
1005
|
className: "j-filter-bar__field",
|
|
857
|
-
children: [/* @__PURE__ */
|
|
1006
|
+
children: [/* @__PURE__ */ v("div", {
|
|
858
1007
|
className: "j-filter-bar__pill",
|
|
859
|
-
children: /* @__PURE__ */
|
|
1008
|
+
children: /* @__PURE__ */ v(N, {
|
|
860
1009
|
size: "xs",
|
|
861
1010
|
children: r
|
|
862
1011
|
})
|
|
863
|
-
}), /* @__PURE__ */
|
|
1012
|
+
}), /* @__PURE__ */ y("div", {
|
|
864
1013
|
className: "j-relative",
|
|
865
|
-
children: [/* @__PURE__ */
|
|
1014
|
+
children: [/* @__PURE__ */ v("div", {
|
|
866
1015
|
className: "j-filter-bar__search-icon",
|
|
867
|
-
children: /* @__PURE__ */
|
|
868
|
-
}), /* @__PURE__ */
|
|
1016
|
+
children: /* @__PURE__ */ v(Ne, {})
|
|
1017
|
+
}), /* @__PURE__ */ v("input", {
|
|
869
1018
|
type: "text",
|
|
870
1019
|
value: e ?? "",
|
|
871
1020
|
onChange: (e) => t(e.target.value),
|
|
@@ -873,34 +1022,34 @@ function De({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...",
|
|
|
873
1022
|
className: "j-filter-bar__input"
|
|
874
1023
|
})]
|
|
875
1024
|
})]
|
|
876
|
-
}) : null, s && a ? /* @__PURE__ */
|
|
1025
|
+
}) : null, s && a ? /* @__PURE__ */ y("div", {
|
|
877
1026
|
className: "j-filter-bar__field",
|
|
878
|
-
children: [/* @__PURE__ */
|
|
1027
|
+
children: [/* @__PURE__ */ v("div", {
|
|
879
1028
|
className: "j-filter-bar__pill",
|
|
880
|
-
children: /* @__PURE__ */
|
|
1029
|
+
children: /* @__PURE__ */ v(N, {
|
|
881
1030
|
size: "xs",
|
|
882
1031
|
children: o
|
|
883
1032
|
})
|
|
884
|
-
}), /* @__PURE__ */
|
|
1033
|
+
}), /* @__PURE__ */ y("div", {
|
|
885
1034
|
className: "j-relative",
|
|
886
|
-
children: [/* @__PURE__ */
|
|
1035
|
+
children: [/* @__PURE__ */ v("select", {
|
|
887
1036
|
value: i ?? s[0]?.value,
|
|
888
1037
|
onChange: (e) => a(e.target.value),
|
|
889
1038
|
className: "j-filter-bar__select",
|
|
890
|
-
children: s.map((e) => /* @__PURE__ */
|
|
1039
|
+
children: s.map((e) => /* @__PURE__ */ v("option", {
|
|
891
1040
|
value: e.value,
|
|
892
1041
|
children: e.label
|
|
893
1042
|
}, e.value))
|
|
894
|
-
}), /* @__PURE__ */
|
|
1043
|
+
}), /* @__PURE__ */ v("div", {
|
|
895
1044
|
className: "j-filter-bar__sort-icon",
|
|
896
|
-
children: /* @__PURE__ */
|
|
1045
|
+
children: /* @__PURE__ */ v(Pe, {})
|
|
897
1046
|
})]
|
|
898
1047
|
})]
|
|
899
1048
|
}) : null]
|
|
900
1049
|
});
|
|
901
1050
|
}
|
|
902
|
-
function
|
|
903
|
-
return /* @__PURE__ */
|
|
1051
|
+
function Ne() {
|
|
1052
|
+
return /* @__PURE__ */ y("svg", {
|
|
904
1053
|
width: 24,
|
|
905
1054
|
height: 24,
|
|
906
1055
|
viewBox: "0 0 24 24",
|
|
@@ -910,11 +1059,11 @@ function Oe() {
|
|
|
910
1059
|
strokeLinecap: "round",
|
|
911
1060
|
strokeLinejoin: "round",
|
|
912
1061
|
"aria-hidden": !0,
|
|
913
|
-
children: [/* @__PURE__ */
|
|
1062
|
+
children: [/* @__PURE__ */ v("circle", {
|
|
914
1063
|
cx: 11,
|
|
915
1064
|
cy: 11,
|
|
916
1065
|
r: 8
|
|
917
|
-
}), /* @__PURE__ */
|
|
1066
|
+
}), /* @__PURE__ */ v("line", {
|
|
918
1067
|
x1: 21,
|
|
919
1068
|
y1: 21,
|
|
920
1069
|
x2: 16.65,
|
|
@@ -922,8 +1071,8 @@ function Oe() {
|
|
|
922
1071
|
})]
|
|
923
1072
|
});
|
|
924
1073
|
}
|
|
925
|
-
function
|
|
926
|
-
return /* @__PURE__ */
|
|
1074
|
+
function Pe() {
|
|
1075
|
+
return /* @__PURE__ */ y("svg", {
|
|
927
1076
|
width: 20,
|
|
928
1077
|
height: 20,
|
|
929
1078
|
viewBox: "0 0 24 24",
|
|
@@ -934,168 +1083,67 @@ function ke() {
|
|
|
934
1083
|
strokeLinejoin: "round",
|
|
935
1084
|
"aria-hidden": !0,
|
|
936
1085
|
children: [
|
|
937
|
-
/* @__PURE__ */
|
|
938
|
-
/* @__PURE__ */
|
|
939
|
-
/* @__PURE__ */
|
|
940
|
-
/* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ v("polyline", { points: "7 4 7 20" }),
|
|
1087
|
+
/* @__PURE__ */ v("polyline", { points: "3 8 7 4 11 8" }),
|
|
1088
|
+
/* @__PURE__ */ v("polyline", { points: "17 20 17 4" }),
|
|
1089
|
+
/* @__PURE__ */ v("polyline", { points: "21 16 17 20 13 16" })
|
|
941
1090
|
]
|
|
942
1091
|
});
|
|
943
1092
|
}
|
|
944
1093
|
//#endregion
|
|
945
|
-
//#region src/ui/jimboLink.tsx
|
|
946
|
-
function Ae({ external: e = !0, className: t = "", children: n, ...r }) {
|
|
947
|
-
let i = e ? {
|
|
948
|
-
target: "_blank",
|
|
949
|
-
rel: "noopener noreferrer"
|
|
950
|
-
} : {};
|
|
951
|
-
return /* @__PURE__ */ b("a", {
|
|
952
|
-
className: `j-link ${t}`.trim(),
|
|
953
|
-
...i,
|
|
954
|
-
...r,
|
|
955
|
-
children: n
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
//#endregion
|
|
959
|
-
//#region src/ui/JimboBalatroFooter.tsx
|
|
960
|
-
var je = [
|
|
961
|
-
{
|
|
962
|
-
char: "♥️",
|
|
963
|
-
kf: "jaml-heart"
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
char: "♠️",
|
|
967
|
-
kf: "jaml-spade"
|
|
968
|
-
},
|
|
969
|
-
{
|
|
970
|
-
char: "♦️",
|
|
971
|
-
kf: "jaml-diamond"
|
|
972
|
-
},
|
|
973
|
-
{
|
|
974
|
-
char: "♣️",
|
|
975
|
-
kf: "jaml-club"
|
|
976
|
-
}
|
|
977
|
-
], Me = "5s";
|
|
978
|
-
function Ne({ hidden: e = !1, className: t = "", children: n }) {
|
|
979
|
-
return e ? null : /* @__PURE__ */ x("div", {
|
|
980
|
-
className: ["j-footer", t].filter(Boolean).join(" "),
|
|
981
|
-
children: [/* @__PURE__ */ b("div", {
|
|
982
|
-
className: "j-footer__bar",
|
|
983
|
-
children: /* @__PURE__ */ x("p", {
|
|
984
|
-
className: "j-footer__line j-footer__line--wrap",
|
|
985
|
-
children: [
|
|
986
|
-
/* @__PURE__ */ b("span", {
|
|
987
|
-
className: "j-footer__chunk",
|
|
988
|
-
children: "Not affiliated with LocalThunk or PlayStack"
|
|
989
|
-
}),
|
|
990
|
-
/* @__PURE__ */ x("span", {
|
|
991
|
-
className: "j-footer__chunk j-footer__chunk--credit",
|
|
992
|
-
children: [
|
|
993
|
-
"Made with",
|
|
994
|
-
" ",
|
|
995
|
-
/* @__PURE__ */ b("span", {
|
|
996
|
-
style: {
|
|
997
|
-
position: "relative",
|
|
998
|
-
display: "inline-block",
|
|
999
|
-
width: "1.5em",
|
|
1000
|
-
height: "1.2em",
|
|
1001
|
-
verticalAlign: "middle"
|
|
1002
|
-
},
|
|
1003
|
-
children: je.map(({ char: e, kf: t }) => /* @__PURE__ */ b("span", {
|
|
1004
|
-
style: {
|
|
1005
|
-
position: "absolute",
|
|
1006
|
-
inset: 0,
|
|
1007
|
-
display: "inline-flex",
|
|
1008
|
-
alignItems: "center",
|
|
1009
|
-
justifyContent: "center",
|
|
1010
|
-
opacity: 0,
|
|
1011
|
-
animationName: t,
|
|
1012
|
-
animationDuration: Me,
|
|
1013
|
-
animationDelay: "0s",
|
|
1014
|
-
animationIterationCount: "infinite",
|
|
1015
|
-
animationTimingFunction: "ease-out"
|
|
1016
|
-
},
|
|
1017
|
-
children: e
|
|
1018
|
-
}, e))
|
|
1019
|
-
}),
|
|
1020
|
-
" ",
|
|
1021
|
-
"for the ",
|
|
1022
|
-
/* @__PURE__ */ b(Ae, {
|
|
1023
|
-
href: "https://playbalatro.com",
|
|
1024
|
-
children: "Balatro"
|
|
1025
|
-
}),
|
|
1026
|
-
" community"
|
|
1027
|
-
]
|
|
1028
|
-
}),
|
|
1029
|
-
n ? /* @__PURE__ */ b("span", {
|
|
1030
|
-
className: "j-footer__extra",
|
|
1031
|
-
children: n
|
|
1032
|
-
}) : null
|
|
1033
|
-
]
|
|
1034
|
-
})
|
|
1035
|
-
}), /* @__PURE__ */ b("style", { children: "\n @keyframes jaml-heart { 0%{opacity:0;transform:scale(1)} 1%{opacity:1;transform:scale(1.45)} 3.5%{opacity:1;transform:scale(1)} 61.5%{opacity:1;transform:scale(1)} 62%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-spade { 0%,61.5%{opacity:0} 62%{opacity:1;transform:scale(1.45)} 64.5%{opacity:1;transform:scale(1)} 71.5%{opacity:1} 72%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-diamond { 0%,71.5%{opacity:0} 72%{opacity:1;transform:scale(1.45)} 74.5%{opacity:1;transform:scale(1)} 81.5%{opacity:1} 82%{opacity:0} 100%{opacity:0} }\n @keyframes jaml-club { 0%,81.5%{opacity:0} 82%{opacity:1;transform:scale(1.45)} 84.5%{opacity:1;transform:scale(1)} 95%{opacity:1} 96%{opacity:0} 100%{opacity:0} }\n " })]
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
//#endregion
|
|
1039
1094
|
//#region src/ui/jimboBackground.tsx
|
|
1040
|
-
function
|
|
1041
|
-
return /* @__PURE__ */
|
|
1042
|
-
ref:
|
|
1095
|
+
function Fe(e) {
|
|
1096
|
+
return /* @__PURE__ */ v("canvas", {
|
|
1097
|
+
ref: j(e),
|
|
1043
1098
|
"aria-hidden": !0,
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
inset: 0,
|
|
1047
|
-
width: "100%",
|
|
1048
|
-
height: "100%",
|
|
1049
|
-
zIndex: -10,
|
|
1050
|
-
pointerEvents: "none"
|
|
1051
|
-
}
|
|
1052
|
-
}), !e && /* @__PURE__ */ b(Ne, {})] });
|
|
1099
|
+
className: "j-background-canvas"
|
|
1100
|
+
});
|
|
1053
1101
|
}
|
|
1054
1102
|
//#endregion
|
|
1055
1103
|
//#region src/ui/jimboTooltip.tsx
|
|
1056
|
-
function
|
|
1104
|
+
function Ie(e, t) {
|
|
1057
1105
|
typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
|
|
1058
1106
|
}
|
|
1059
|
-
function
|
|
1060
|
-
let { visible:
|
|
1107
|
+
function Le({ content: e, badge: t, variant: n = "dark", children: r, mode: i = "snap", placement: o = "auto", delay: s = 80, maxWidth: c = 280, disabled: l = !1 }) {
|
|
1108
|
+
let { visible: d, pos: f, targetRef: p, tooltipRef: m, show: h, hide: g, handleMouseMove: b } = M({
|
|
1061
1109
|
mode: i,
|
|
1062
|
-
placement:
|
|
1063
|
-
delay:
|
|
1110
|
+
placement: o,
|
|
1111
|
+
delay: s,
|
|
1064
1112
|
disabled: l
|
|
1065
|
-
}),
|
|
1066
|
-
p.current = e,
|
|
1113
|
+
}), x = a.Children.only(r), S = x.ref, C = u((e) => {
|
|
1114
|
+
p.current = e, Ie(S, e);
|
|
1067
1115
|
}, [S, p]);
|
|
1068
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ y(_, { children: [a.cloneElement(x, {
|
|
1069
1117
|
ref: C,
|
|
1070
1118
|
onMouseEnter: (e) => {
|
|
1071
|
-
h(),
|
|
1119
|
+
h(), x.props.onMouseEnter?.(e);
|
|
1072
1120
|
},
|
|
1073
1121
|
onMouseLeave: (e) => {
|
|
1074
|
-
g(),
|
|
1122
|
+
g(), x.props.onMouseLeave?.(e);
|
|
1075
1123
|
},
|
|
1076
1124
|
onFocus: (e) => {
|
|
1077
|
-
h(),
|
|
1125
|
+
h(), x.props.onFocus?.(e);
|
|
1078
1126
|
},
|
|
1079
1127
|
onBlur: (e) => {
|
|
1080
|
-
g(),
|
|
1128
|
+
g(), x.props.onBlur?.(e);
|
|
1081
1129
|
},
|
|
1082
1130
|
onMouseMove: (e) => {
|
|
1083
|
-
|
|
1131
|
+
b(e), x.props.onMouseMove?.(e);
|
|
1084
1132
|
}
|
|
1085
|
-
}),
|
|
1133
|
+
}), d ? /* @__PURE__ */ y("div", {
|
|
1086
1134
|
ref: m,
|
|
1087
1135
|
role: "tooltip",
|
|
1088
1136
|
className: `j-tooltip j-tooltip--${n}`,
|
|
1089
1137
|
style: {
|
|
1090
|
-
left:
|
|
1091
|
-
top:
|
|
1138
|
+
left: f?.left ?? -9999,
|
|
1139
|
+
top: f?.top ?? -9999,
|
|
1092
1140
|
maxWidth: c,
|
|
1093
|
-
opacity: +!!
|
|
1141
|
+
opacity: +!!f
|
|
1094
1142
|
},
|
|
1095
|
-
children: [/* @__PURE__ */
|
|
1143
|
+
children: [/* @__PURE__ */ v("div", {
|
|
1096
1144
|
className: "j-tooltip__body",
|
|
1097
1145
|
children: e
|
|
1098
|
-
}), t && /* @__PURE__ */
|
|
1146
|
+
}), t && /* @__PURE__ */ v("div", {
|
|
1099
1147
|
className: `j-tooltip__badge j-bg--${t.tone}`,
|
|
1100
1148
|
children: t.label
|
|
1101
1149
|
})]
|
|
@@ -1103,14 +1151,14 @@ function Ie({ content: e, badge: t, variant: n = "dark", children: r, mode: i =
|
|
|
1103
1151
|
}
|
|
1104
1152
|
//#endregion
|
|
1105
1153
|
//#region src/ui/JimboCopyButton.tsx
|
|
1106
|
-
function
|
|
1107
|
-
let [c, l] =
|
|
1154
|
+
function Re({ value: e, label: t = "Copy", copiedLabel: n = "Copied", tone: r = "blue", size: i = "sm", copiedDurationMs: a = 1500, onCopy: o, className: s }) {
|
|
1155
|
+
let [c, l] = g(!1);
|
|
1108
1156
|
function u() {
|
|
1109
1157
|
navigator.clipboard.writeText(e).then(() => {
|
|
1110
1158
|
l(!0), o?.(), window.setTimeout(() => l(!1), a);
|
|
1111
1159
|
});
|
|
1112
1160
|
}
|
|
1113
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ v(P, {
|
|
1114
1162
|
tone: r,
|
|
1115
1163
|
size: i,
|
|
1116
1164
|
onClick: u,
|
|
@@ -1120,56 +1168,56 @@ function Le({ value: e, label: t = "Copy", copiedLabel: n = "Copied", tone: r =
|
|
|
1120
1168
|
}
|
|
1121
1169
|
//#endregion
|
|
1122
1170
|
//#region src/ui/codeBlock.tsx
|
|
1123
|
-
function
|
|
1171
|
+
function ze({ code: e, language: t, filename: n, className: r = "" }) {
|
|
1124
1172
|
let i = n?.toLowerCase().endsWith(".jaml") ? "JAML" : t?.toLowerCase() === "yaml" ? void 0 : t;
|
|
1125
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ y("div", {
|
|
1126
1174
|
className: `j-code-block ${r}`,
|
|
1127
|
-
children: [/* @__PURE__ */
|
|
1175
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1128
1176
|
className: "j-code-block__header",
|
|
1129
|
-
children: [/* @__PURE__ */
|
|
1177
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1130
1178
|
className: "j-code-block__meta",
|
|
1131
|
-
children: [n && /* @__PURE__ */
|
|
1179
|
+
children: [n && /* @__PURE__ */ v(N, {
|
|
1132
1180
|
size: "xs",
|
|
1133
1181
|
tone: "grey",
|
|
1134
1182
|
className: "j-code-block__filename",
|
|
1135
1183
|
children: n
|
|
1136
|
-
}), i && /* @__PURE__ */
|
|
1184
|
+
}), i && /* @__PURE__ */ v("span", {
|
|
1137
1185
|
className: "j-code-block__lang",
|
|
1138
|
-
children: /* @__PURE__ */
|
|
1186
|
+
children: /* @__PURE__ */ v(N, {
|
|
1139
1187
|
size: "micro",
|
|
1140
1188
|
tone: "blue",
|
|
1141
1189
|
children: i
|
|
1142
1190
|
})
|
|
1143
1191
|
})]
|
|
1144
|
-
}), /* @__PURE__ */
|
|
1145
|
-
}), /* @__PURE__ */
|
|
1192
|
+
}), /* @__PURE__ */ v(Re, { value: e })]
|
|
1193
|
+
}), /* @__PURE__ */ v("pre", {
|
|
1146
1194
|
className: "j-code-block__pre",
|
|
1147
|
-
children: /* @__PURE__ */
|
|
1195
|
+
children: /* @__PURE__ */ v("code", { children: e })
|
|
1148
1196
|
})]
|
|
1149
1197
|
});
|
|
1150
1198
|
}
|
|
1151
1199
|
//#endregion
|
|
1152
1200
|
//#region src/ui/jimboCopyRow.tsx
|
|
1153
|
-
function
|
|
1154
|
-
return /* @__PURE__ */
|
|
1201
|
+
function Be({ value: e, label: t }) {
|
|
1202
|
+
return /* @__PURE__ */ y("div", {
|
|
1155
1203
|
className: "j-copy-row",
|
|
1156
|
-
children: [t ? /* @__PURE__ */
|
|
1204
|
+
children: [t ? /* @__PURE__ */ v(N, {
|
|
1157
1205
|
size: "xs",
|
|
1158
1206
|
tone: "grey",
|
|
1159
1207
|
className: "j-copy-row__label",
|
|
1160
1208
|
children: t
|
|
1161
|
-
}) : null, /* @__PURE__ */
|
|
1209
|
+
}) : null, /* @__PURE__ */ v(Se, { value: e })]
|
|
1162
1210
|
});
|
|
1163
1211
|
}
|
|
1164
1212
|
//#endregion
|
|
1165
1213
|
//#region src/ui/jimboWordmark.tsx
|
|
1166
|
-
function
|
|
1167
|
-
return /* @__PURE__ */
|
|
1214
|
+
function Ve({ title: e, subtitle: t, className: n = "" }) {
|
|
1215
|
+
return /* @__PURE__ */ y("div", {
|
|
1168
1216
|
className: `j-wordmark ${n}`,
|
|
1169
|
-
children: [/* @__PURE__ */
|
|
1217
|
+
children: [/* @__PURE__ */ v("div", {
|
|
1170
1218
|
className: "j-wordmark__title",
|
|
1171
1219
|
children: e
|
|
1172
|
-
}), t && /* @__PURE__ */
|
|
1220
|
+
}), t && /* @__PURE__ */ v("div", {
|
|
1173
1221
|
className: "j-wordmark__sub",
|
|
1174
1222
|
children: t
|
|
1175
1223
|
})]
|
|
@@ -1177,59 +1225,59 @@ function Be({ title: e, subtitle: t, className: n = "" }) {
|
|
|
1177
1225
|
}
|
|
1178
1226
|
//#endregion
|
|
1179
1227
|
//#region src/ui/jimboSectionHeader.tsx
|
|
1180
|
-
function
|
|
1181
|
-
return /* @__PURE__ */
|
|
1228
|
+
function He({ label: e, tone: t = "blue", className: n = "" }) {
|
|
1229
|
+
return /* @__PURE__ */ y("div", {
|
|
1182
1230
|
className: `j-section-header ${n}`,
|
|
1183
|
-
children: [/* @__PURE__ */
|
|
1231
|
+
children: [/* @__PURE__ */ v("div", {
|
|
1184
1232
|
className: `j-section-header__tag j-bg--${t}`,
|
|
1185
1233
|
children: e
|
|
1186
|
-
}), /* @__PURE__ */
|
|
1234
|
+
}), /* @__PURE__ */ v("div", { className: `j-section-header__rule j-bg--${t}` })]
|
|
1187
1235
|
});
|
|
1188
1236
|
}
|
|
1189
1237
|
//#endregion
|
|
1190
1238
|
//#region src/ui/jimboInfoCard.tsx
|
|
1191
|
-
function
|
|
1192
|
-
return /* @__PURE__ */
|
|
1239
|
+
function Ue({ tone: e, children: t, className: n = "", ...r }) {
|
|
1240
|
+
return /* @__PURE__ */ v("div", {
|
|
1193
1241
|
className: `j-info-card ${e ? `j-border--${e}` : ""} ${n}`,
|
|
1194
1242
|
style: e ? { borderColor: void 0 } : void 0,
|
|
1195
1243
|
...r,
|
|
1196
1244
|
children: t
|
|
1197
1245
|
});
|
|
1198
1246
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return /* @__PURE__ */
|
|
1247
|
+
function We({ children: e, className: t = "" }) {
|
|
1248
|
+
return /* @__PURE__ */ v("div", {
|
|
1201
1249
|
className: `j-info-card__body ${t}`,
|
|
1202
1250
|
children: e
|
|
1203
1251
|
});
|
|
1204
1252
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return /* @__PURE__ */
|
|
1253
|
+
function Ge({ children: e, className: t = "" }) {
|
|
1254
|
+
return /* @__PURE__ */ v("div", {
|
|
1207
1255
|
className: `j-info-card__title ${t}`,
|
|
1208
1256
|
children: e
|
|
1209
1257
|
});
|
|
1210
1258
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return /* @__PURE__ */
|
|
1259
|
+
function Ke({ children: e, className: t = "" }) {
|
|
1260
|
+
return /* @__PURE__ */ v("div", {
|
|
1213
1261
|
className: `j-info-card__sub ${t}`,
|
|
1214
1262
|
children: e
|
|
1215
1263
|
});
|
|
1216
1264
|
}
|
|
1217
|
-
function
|
|
1218
|
-
return /* @__PURE__ */
|
|
1265
|
+
function qe({ children: e, className: t = "" }) {
|
|
1266
|
+
return /* @__PURE__ */ v("div", {
|
|
1219
1267
|
className: `j-info-card__aside ${t}`,
|
|
1220
1268
|
children: e
|
|
1221
1269
|
});
|
|
1222
1270
|
}
|
|
1223
1271
|
//#endregion
|
|
1224
1272
|
//#region src/ui/jimboStatGrid.tsx
|
|
1225
|
-
function
|
|
1226
|
-
return /* @__PURE__ */
|
|
1273
|
+
function Je({ items: e, className: t = "", ...n }) {
|
|
1274
|
+
return /* @__PURE__ */ v("div", {
|
|
1227
1275
|
className: `j-stat-grid ${t}`,
|
|
1228
1276
|
...n,
|
|
1229
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1277
|
+
children: e.map((e) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
1230
1278
|
className: "j-stat-grid__value",
|
|
1231
1279
|
children: e.value
|
|
1232
|
-
}), /* @__PURE__ */
|
|
1280
|
+
}), /* @__PURE__ */ v("div", {
|
|
1233
1281
|
className: "j-stat-grid__label",
|
|
1234
1282
|
children: e.label
|
|
1235
1283
|
})] }, e.label))
|
|
@@ -1237,8 +1285,8 @@ function qe({ items: e, className: t = "", ...n }) {
|
|
|
1237
1285
|
}
|
|
1238
1286
|
//#endregion
|
|
1239
1287
|
//#region src/ui/jimboLayout.tsx
|
|
1240
|
-
function
|
|
1241
|
-
return /* @__PURE__ */
|
|
1288
|
+
function Ye({ gap: e, align: t, justify: n, className: r = "", ...i }) {
|
|
1289
|
+
return /* @__PURE__ */ v("div", {
|
|
1242
1290
|
className: [
|
|
1243
1291
|
"j-stack",
|
|
1244
1292
|
e && `j-stack--gap-${e}`,
|
|
@@ -1249,8 +1297,8 @@ function Je({ gap: e, align: t, justify: n, className: r = "", ...i }) {
|
|
|
1249
1297
|
...i
|
|
1250
1298
|
});
|
|
1251
1299
|
}
|
|
1252
|
-
function
|
|
1253
|
-
return /* @__PURE__ */
|
|
1300
|
+
function Xe({ gap: e, align: t, justify: n, wrap: r = !1, className: i = "", ...a }) {
|
|
1301
|
+
return /* @__PURE__ */ v("div", {
|
|
1254
1302
|
className: [
|
|
1255
1303
|
"j-row",
|
|
1256
1304
|
e && `j-row--gap-${e}`,
|
|
@@ -1264,8 +1312,8 @@ function Ye({ gap: e, align: t, justify: n, wrap: r = !1, className: i = "", ...
|
|
|
1264
1312
|
}
|
|
1265
1313
|
//#endregion
|
|
1266
1314
|
//#region src/ui/jimboInset.tsx
|
|
1267
|
-
function
|
|
1268
|
-
return /* @__PURE__ */
|
|
1315
|
+
function Ze({ children: e, className: t = "", ...n }) {
|
|
1316
|
+
return /* @__PURE__ */ v("div", {
|
|
1269
1317
|
className: `j-inset ${t}`.trim(),
|
|
1270
1318
|
...n,
|
|
1271
1319
|
children: e
|
|
@@ -1273,21 +1321,21 @@ function Xe({ children: e, className: t = "", ...n }) {
|
|
|
1273
1321
|
}
|
|
1274
1322
|
//#endregion
|
|
1275
1323
|
//#region src/ui/JimboPanelSpinner.tsx
|
|
1276
|
-
function
|
|
1277
|
-
return /* @__PURE__ */
|
|
1324
|
+
function Qe({ label: e, title: t, description: n, media: r, meta: i, className: a = "", style: o, onPrev: s, onNext: c, prevDisabled: l = !1, nextDisabled: u = !1 }) {
|
|
1325
|
+
return /* @__PURE__ */ y("div", {
|
|
1278
1326
|
className: `j-panel-spinner ${a}`.trim(),
|
|
1279
1327
|
style: o,
|
|
1280
|
-
children: [e ? /* @__PURE__ */
|
|
1328
|
+
children: [e ? /* @__PURE__ */ v("div", {
|
|
1281
1329
|
className: "j-panel-spinner__label",
|
|
1282
|
-
children: /* @__PURE__ */
|
|
1330
|
+
children: /* @__PURE__ */ v(N, {
|
|
1283
1331
|
size: "xs",
|
|
1284
1332
|
tone: "grey",
|
|
1285
1333
|
children: e
|
|
1286
1334
|
})
|
|
1287
|
-
}) : null, /* @__PURE__ */
|
|
1335
|
+
}) : null, /* @__PURE__ */ y("div", {
|
|
1288
1336
|
className: "j-panel-spinner__row",
|
|
1289
1337
|
children: [
|
|
1290
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ v(P, {
|
|
1291
1339
|
tone: "red",
|
|
1292
1340
|
size: "lg",
|
|
1293
1341
|
className: "j-panel-spinner__arrow j-panel-spinner__arrow--left",
|
|
@@ -1296,28 +1344,28 @@ function Ze({ label: e, title: t, description: n, media: r, meta: i, className:
|
|
|
1296
1344
|
"aria-label": "Previous",
|
|
1297
1345
|
children: "<"
|
|
1298
1346
|
}),
|
|
1299
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ y("div", {
|
|
1300
1348
|
className: "j-panel-spinner__panel",
|
|
1301
1349
|
children: [
|
|
1302
|
-
r ? /* @__PURE__ */
|
|
1350
|
+
r ? /* @__PURE__ */ v("div", {
|
|
1303
1351
|
className: "j-panel-spinner__media",
|
|
1304
1352
|
children: r
|
|
1305
1353
|
}) : null,
|
|
1306
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ v("div", {
|
|
1307
1355
|
className: "j-panel-spinner__title",
|
|
1308
|
-
children: /* @__PURE__ */
|
|
1356
|
+
children: /* @__PURE__ */ v(N, {
|
|
1309
1357
|
size: "md",
|
|
1310
1358
|
tone: "white",
|
|
1311
1359
|
children: t
|
|
1312
1360
|
})
|
|
1313
1361
|
}),
|
|
1314
|
-
i ? /* @__PURE__ */
|
|
1362
|
+
i ? /* @__PURE__ */ v("div", {
|
|
1315
1363
|
className: "j-panel-spinner__meta",
|
|
1316
1364
|
children: i
|
|
1317
1365
|
}) : null,
|
|
1318
|
-
n ? /* @__PURE__ */
|
|
1366
|
+
n ? /* @__PURE__ */ v("div", {
|
|
1319
1367
|
className: "j-panel-spinner__description",
|
|
1320
|
-
children: /* @__PURE__ */
|
|
1368
|
+
children: /* @__PURE__ */ v(N, {
|
|
1321
1369
|
size: "micro",
|
|
1322
1370
|
tone: "grey",
|
|
1323
1371
|
children: n
|
|
@@ -1325,7 +1373,7 @@ function Ze({ label: e, title: t, description: n, media: r, meta: i, className:
|
|
|
1325
1373
|
}) : null
|
|
1326
1374
|
]
|
|
1327
1375
|
}),
|
|
1328
|
-
/* @__PURE__ */
|
|
1376
|
+
/* @__PURE__ */ v(P, {
|
|
1329
1377
|
tone: "red",
|
|
1330
1378
|
size: "lg",
|
|
1331
1379
|
className: "j-panel-spinner__arrow j-panel-spinner__arrow--right",
|
|
@@ -1340,106 +1388,106 @@ function Ze({ label: e, title: t, description: n, media: r, meta: i, className:
|
|
|
1340
1388
|
}
|
|
1341
1389
|
//#endregion
|
|
1342
1390
|
//#region src/ui/JimboDeckAndStakeSelectorModal.tsx
|
|
1343
|
-
function
|
|
1391
|
+
function $e(e, t, n) {
|
|
1344
1392
|
let r = e.indexOf(t);
|
|
1345
1393
|
return r < 0 ? e[0] ?? t : e[(r + n + e.length) % e.length] ?? t;
|
|
1346
1394
|
}
|
|
1347
|
-
function
|
|
1348
|
-
return /* @__PURE__ */
|
|
1395
|
+
function et({ open: e, onClose: t, decks: n, stakes: r, deck: i, stake: a, onDeckChange: o, onStakeChange: s, title: c = "Search seeds for", deckDescription: l, stakeDescription: u }) {
|
|
1396
|
+
return /* @__PURE__ */ v(de, {
|
|
1349
1397
|
open: e,
|
|
1350
1398
|
onClose: t,
|
|
1351
1399
|
title: c,
|
|
1352
|
-
children: /* @__PURE__ */
|
|
1400
|
+
children: /* @__PURE__ */ y(Ye, {
|
|
1353
1401
|
gap: "md",
|
|
1354
1402
|
align: "stretch",
|
|
1355
|
-
children: [/* @__PURE__ */
|
|
1403
|
+
children: [/* @__PURE__ */ v(Qe, {
|
|
1356
1404
|
label: "Deck",
|
|
1357
1405
|
title: `${i} Deck`,
|
|
1358
1406
|
description: l ? l(i) : " ",
|
|
1359
|
-
media: /* @__PURE__ */
|
|
1407
|
+
media: /* @__PURE__ */ v(oe, {
|
|
1360
1408
|
deck: i,
|
|
1361
1409
|
width: 64
|
|
1362
1410
|
}),
|
|
1363
|
-
onPrev: () => o(
|
|
1364
|
-
onNext: () => o(
|
|
1365
|
-
}), /* @__PURE__ */
|
|
1411
|
+
onPrev: () => o($e(n, i, -1)),
|
|
1412
|
+
onNext: () => o($e(n, i, 1))
|
|
1413
|
+
}), /* @__PURE__ */ v(Qe, {
|
|
1366
1414
|
label: "Stake",
|
|
1367
1415
|
title: `${a} Stake`,
|
|
1368
1416
|
description: u ? u(a) : " ",
|
|
1369
|
-
media: /* @__PURE__ */
|
|
1417
|
+
media: /* @__PURE__ */ v(ie, {
|
|
1370
1418
|
stake: a,
|
|
1371
1419
|
width: 48
|
|
1372
1420
|
}),
|
|
1373
|
-
onPrev: () => s(
|
|
1374
|
-
onNext: () => s(
|
|
1421
|
+
onPrev: () => s($e(r, a, -1)),
|
|
1422
|
+
onNext: () => s($e(r, a, 1))
|
|
1375
1423
|
})]
|
|
1376
1424
|
})
|
|
1377
1425
|
});
|
|
1378
1426
|
}
|
|
1379
1427
|
//#endregion
|
|
1380
1428
|
//#region node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.mjs
|
|
1381
|
-
function
|
|
1429
|
+
function tt(e) {
|
|
1382
1430
|
return e == null;
|
|
1383
1431
|
}
|
|
1384
|
-
function
|
|
1432
|
+
function nt(e) {
|
|
1385
1433
|
return typeof e == "object" && !!e;
|
|
1386
1434
|
}
|
|
1387
|
-
function
|
|
1388
|
-
return Array.isArray(e) ? e :
|
|
1435
|
+
function rt(e) {
|
|
1436
|
+
return Array.isArray(e) ? e : tt(e) ? [] : [e];
|
|
1389
1437
|
}
|
|
1390
|
-
function
|
|
1438
|
+
function it(e, t) {
|
|
1391
1439
|
var n, r, i, a;
|
|
1392
1440
|
if (t) for (a = Object.keys(t), n = 0, r = a.length; n < r; n += 1) i = a[n], e[i] = t[i];
|
|
1393
1441
|
return e;
|
|
1394
1442
|
}
|
|
1395
|
-
function
|
|
1443
|
+
function at(e, t) {
|
|
1396
1444
|
var n = "", r;
|
|
1397
1445
|
for (r = 0; r < t; r += 1) n += e;
|
|
1398
1446
|
return n;
|
|
1399
1447
|
}
|
|
1400
|
-
function
|
|
1448
|
+
function ot(e) {
|
|
1401
1449
|
return e === 0 && 1 / e == -Infinity;
|
|
1402
1450
|
}
|
|
1403
1451
|
var I = {
|
|
1404
|
-
isNothing:
|
|
1405
|
-
isObject:
|
|
1406
|
-
toArray:
|
|
1407
|
-
repeat:
|
|
1408
|
-
isNegativeZero:
|
|
1409
|
-
extend:
|
|
1452
|
+
isNothing: tt,
|
|
1453
|
+
isObject: nt,
|
|
1454
|
+
toArray: rt,
|
|
1455
|
+
repeat: at,
|
|
1456
|
+
isNegativeZero: ot,
|
|
1457
|
+
extend: it
|
|
1410
1458
|
};
|
|
1411
|
-
function
|
|
1459
|
+
function st(e, t) {
|
|
1412
1460
|
var n = "", r = e.reason || "(unknown reason)";
|
|
1413
1461
|
return e.mark ? (e.mark.name && (n += "in \"" + e.mark.name + "\" "), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += "\n\n" + e.mark.snippet), r + " " + n) : r;
|
|
1414
1462
|
}
|
|
1415
|
-
function
|
|
1416
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1463
|
+
function ct(e, t) {
|
|
1464
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = st(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ Error()).stack || "";
|
|
1417
1465
|
}
|
|
1418
|
-
|
|
1419
|
-
return this.name + ": " +
|
|
1466
|
+
ct.prototype = Object.create(Error.prototype), ct.prototype.constructor = ct, ct.prototype.toString = function(e) {
|
|
1467
|
+
return this.name + ": " + st(this, e);
|
|
1420
1468
|
};
|
|
1421
|
-
var L =
|
|
1422
|
-
function
|
|
1469
|
+
var L = ct;
|
|
1470
|
+
function lt(e, t, n, r, i) {
|
|
1423
1471
|
var a = "", o = "", s = Math.floor(i / 2) - 1;
|
|
1424
1472
|
return r - t > s && (a = " ... ", t = r - s + a.length), n - r > s && (o = " ...", n = r + s - o.length), {
|
|
1425
1473
|
str: a + e.slice(t, n).replace(/\t/g, "→") + o,
|
|
1426
1474
|
pos: r - t + a.length
|
|
1427
1475
|
};
|
|
1428
1476
|
}
|
|
1429
|
-
function
|
|
1477
|
+
function ut(e, t) {
|
|
1430
1478
|
return I.repeat(" ", t - e.length) + e;
|
|
1431
1479
|
}
|
|
1432
|
-
function
|
|
1480
|
+
function dt(e, t) {
|
|
1433
1481
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1434
1482
|
t.maxLength ||= 79, typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1435
1483
|
for (var n = /\r?\n|\r|\0/g, r = [0], i = [], a, o = -1; a = n.exec(e.buffer);) i.push(a.index), r.push(a.index + a[0].length), e.position <= a.index && o < 0 && (o = r.length - 2);
|
|
1436
1484
|
o < 0 && (o = r.length - 1);
|
|
1437
1485
|
var s = "", c, l, u = Math.min(e.line + t.linesAfter, i.length).toString().length, d = t.maxLength - (t.indent + u + 3);
|
|
1438
|
-
for (c = 1; c <= t.linesBefore && !(o - c < 0); c++) l =
|
|
1439
|
-
for (l =
|
|
1486
|
+
for (c = 1; c <= t.linesBefore && !(o - c < 0); c++) l = lt(e.buffer, r[o - c], i[o - c], e.position - (r[o] - r[o - c]), d), s = I.repeat(" ", t.indent) + ut((e.line - c + 1).toString(), u) + " | " + l.str + "\n" + s;
|
|
1487
|
+
for (l = lt(e.buffer, r[o], i[o], e.position, d), s += I.repeat(" ", t.indent) + ut((e.line + 1).toString(), u) + " | " + l.str + "\n", s += I.repeat("-", t.indent + u + 3 + l.pos) + "^\n", c = 1; c <= t.linesAfter && !(o + c >= i.length); c++) l = lt(e.buffer, r[o + c], i[o + c], e.position - (r[o] - r[o + c]), d), s += I.repeat(" ", t.indent) + ut((e.line + c + 1).toString(), u) + " | " + l.str + "\n";
|
|
1440
1488
|
return s.replace(/\n$/, "");
|
|
1441
1489
|
}
|
|
1442
|
-
var
|
|
1490
|
+
var ft = dt, pt = [
|
|
1443
1491
|
"kind",
|
|
1444
1492
|
"multi",
|
|
1445
1493
|
"resolve",
|
|
@@ -1450,12 +1498,12 @@ var dt = ut, ft = [
|
|
|
1450
1498
|
"representName",
|
|
1451
1499
|
"defaultStyle",
|
|
1452
1500
|
"styleAliases"
|
|
1453
|
-
],
|
|
1501
|
+
], mt = [
|
|
1454
1502
|
"scalar",
|
|
1455
1503
|
"sequence",
|
|
1456
1504
|
"mapping"
|
|
1457
1505
|
];
|
|
1458
|
-
function
|
|
1506
|
+
function ht(e) {
|
|
1459
1507
|
var t = {};
|
|
1460
1508
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1461
1509
|
e[n].forEach(function(e) {
|
|
@@ -1463,17 +1511,17 @@ function mt(e) {
|
|
|
1463
1511
|
});
|
|
1464
1512
|
}), t;
|
|
1465
1513
|
}
|
|
1466
|
-
function
|
|
1514
|
+
function gt(e, t) {
|
|
1467
1515
|
if (t ||= {}, Object.keys(t).forEach(function(t) {
|
|
1468
|
-
if (
|
|
1516
|
+
if (pt.indexOf(t) === -1) throw new L("Unknown option \"" + t + "\" is met in definition of \"" + e + "\" YAML type.");
|
|
1469
1517
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1470
1518
|
return !0;
|
|
1471
1519
|
}, this.construct = t.construct || function(e) {
|
|
1472
1520
|
return e;
|
|
1473
|
-
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases =
|
|
1521
|
+
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = ht(t.styleAliases || null), mt.indexOf(this.kind) === -1) throw new L("Unknown kind \"" + this.kind + "\" is specified for \"" + e + "\" YAML type.");
|
|
1474
1522
|
}
|
|
1475
|
-
var R =
|
|
1476
|
-
function
|
|
1523
|
+
var R = gt;
|
|
1524
|
+
function _t(e, t) {
|
|
1477
1525
|
var n = [];
|
|
1478
1526
|
return e[t].forEach(function(e) {
|
|
1479
1527
|
var t = n.length;
|
|
@@ -1482,7 +1530,7 @@ function gt(e, t) {
|
|
|
1482
1530
|
}), n[t] = e;
|
|
1483
1531
|
}), n;
|
|
1484
1532
|
}
|
|
1485
|
-
function
|
|
1533
|
+
function vt() {
|
|
1486
1534
|
var e = {
|
|
1487
1535
|
scalar: {},
|
|
1488
1536
|
sequence: {},
|
|
@@ -1501,10 +1549,10 @@ function _t() {
|
|
|
1501
1549
|
for (t = 0, n = arguments.length; t < n; t += 1) arguments[t].forEach(r);
|
|
1502
1550
|
return e;
|
|
1503
1551
|
}
|
|
1504
|
-
function
|
|
1552
|
+
function yt(e) {
|
|
1505
1553
|
return this.extend(e);
|
|
1506
1554
|
}
|
|
1507
|
-
|
|
1555
|
+
yt.prototype.extend = function(e) {
|
|
1508
1556
|
var t = [], n = [];
|
|
1509
1557
|
if (e instanceof R) n.push(e);
|
|
1510
1558
|
else if (Array.isArray(e)) n = n.concat(e);
|
|
@@ -1517,45 +1565,45 @@ vt.prototype.extend = function(e) {
|
|
|
1517
1565
|
}), n.forEach(function(e) {
|
|
1518
1566
|
if (!(e instanceof R)) throw new L("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1519
1567
|
});
|
|
1520
|
-
var r = Object.create(
|
|
1521
|
-
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit =
|
|
1568
|
+
var r = Object.create(yt.prototype);
|
|
1569
|
+
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = _t(r, "implicit"), r.compiledExplicit = _t(r, "explicit"), r.compiledTypeMap = vt(r.compiledImplicit, r.compiledExplicit), r;
|
|
1522
1570
|
};
|
|
1523
|
-
var
|
|
1571
|
+
var bt = yt, xt = new R("tag:yaml.org,2002:str", {
|
|
1524
1572
|
kind: "scalar",
|
|
1525
1573
|
construct: function(e) {
|
|
1526
1574
|
return e === null ? "" : e;
|
|
1527
1575
|
}
|
|
1528
|
-
}),
|
|
1576
|
+
}), St = new R("tag:yaml.org,2002:seq", {
|
|
1529
1577
|
kind: "sequence",
|
|
1530
1578
|
construct: function(e) {
|
|
1531
1579
|
return e === null ? [] : e;
|
|
1532
1580
|
}
|
|
1533
|
-
}),
|
|
1581
|
+
}), Ct = new R("tag:yaml.org,2002:map", {
|
|
1534
1582
|
kind: "mapping",
|
|
1535
1583
|
construct: function(e) {
|
|
1536
1584
|
return e === null ? {} : e;
|
|
1537
1585
|
}
|
|
1538
|
-
}),
|
|
1539
|
-
bt,
|
|
1586
|
+
}), wt = new bt({ explicit: [
|
|
1540
1587
|
xt,
|
|
1541
|
-
St
|
|
1588
|
+
St,
|
|
1589
|
+
Ct
|
|
1542
1590
|
] });
|
|
1543
|
-
function
|
|
1591
|
+
function Tt(e) {
|
|
1544
1592
|
if (e === null) return !0;
|
|
1545
1593
|
var t = e.length;
|
|
1546
1594
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1547
1595
|
}
|
|
1548
|
-
function
|
|
1596
|
+
function Et() {
|
|
1549
1597
|
return null;
|
|
1550
1598
|
}
|
|
1551
|
-
function
|
|
1599
|
+
function Dt(e) {
|
|
1552
1600
|
return e === null;
|
|
1553
1601
|
}
|
|
1554
|
-
var
|
|
1602
|
+
var Ot = new R("tag:yaml.org,2002:null", {
|
|
1555
1603
|
kind: "scalar",
|
|
1556
|
-
resolve:
|
|
1557
|
-
construct:
|
|
1558
|
-
predicate:
|
|
1604
|
+
resolve: Tt,
|
|
1605
|
+
construct: Et,
|
|
1606
|
+
predicate: Dt,
|
|
1559
1607
|
represent: {
|
|
1560
1608
|
canonical: function() {
|
|
1561
1609
|
return "~";
|
|
@@ -1575,22 +1623,22 @@ var Dt = new R("tag:yaml.org,2002:null", {
|
|
|
1575
1623
|
},
|
|
1576
1624
|
defaultStyle: "lowercase"
|
|
1577
1625
|
});
|
|
1578
|
-
function
|
|
1626
|
+
function kt(e) {
|
|
1579
1627
|
if (e === null) return !1;
|
|
1580
1628
|
var t = e.length;
|
|
1581
1629
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1582
1630
|
}
|
|
1583
|
-
function
|
|
1631
|
+
function At(e) {
|
|
1584
1632
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1585
1633
|
}
|
|
1586
|
-
function
|
|
1634
|
+
function jt(e) {
|
|
1587
1635
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1588
1636
|
}
|
|
1589
|
-
var
|
|
1637
|
+
var Mt = new R("tag:yaml.org,2002:bool", {
|
|
1590
1638
|
kind: "scalar",
|
|
1591
|
-
resolve:
|
|
1592
|
-
construct:
|
|
1593
|
-
predicate:
|
|
1639
|
+
resolve: kt,
|
|
1640
|
+
construct: At,
|
|
1641
|
+
predicate: jt,
|
|
1594
1642
|
represent: {
|
|
1595
1643
|
lowercase: function(e) {
|
|
1596
1644
|
return e ? "true" : "false";
|
|
@@ -1604,16 +1652,16 @@ var jt = new R("tag:yaml.org,2002:bool", {
|
|
|
1604
1652
|
},
|
|
1605
1653
|
defaultStyle: "lowercase"
|
|
1606
1654
|
});
|
|
1607
|
-
function
|
|
1655
|
+
function Nt(e) {
|
|
1608
1656
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1609
1657
|
}
|
|
1610
|
-
function
|
|
1658
|
+
function Pt(e) {
|
|
1611
1659
|
return 48 <= e && e <= 55;
|
|
1612
1660
|
}
|
|
1613
|
-
function
|
|
1661
|
+
function Ft(e) {
|
|
1614
1662
|
return 48 <= e && e <= 57;
|
|
1615
1663
|
}
|
|
1616
|
-
function
|
|
1664
|
+
function It(e) {
|
|
1617
1665
|
if (e === null) return !1;
|
|
1618
1666
|
var t = e.length, n = 0, r = !1, i;
|
|
1619
1667
|
if (!t) return !1;
|
|
@@ -1628,14 +1676,14 @@ function Ft(e) {
|
|
|
1628
1676
|
}
|
|
1629
1677
|
if (i === "x") {
|
|
1630
1678
|
for (n++; n < t; n++) if (i = e[n], i !== "_") {
|
|
1631
|
-
if (!
|
|
1679
|
+
if (!Nt(e.charCodeAt(n))) return !1;
|
|
1632
1680
|
r = !0;
|
|
1633
1681
|
}
|
|
1634
1682
|
return r && i !== "_";
|
|
1635
1683
|
}
|
|
1636
1684
|
if (i === "o") {
|
|
1637
1685
|
for (n++; n < t; n++) if (i = e[n], i !== "_") {
|
|
1638
|
-
if (!
|
|
1686
|
+
if (!Pt(e.charCodeAt(n))) return !1;
|
|
1639
1687
|
r = !0;
|
|
1640
1688
|
}
|
|
1641
1689
|
return r && i !== "_";
|
|
@@ -1643,12 +1691,12 @@ function Ft(e) {
|
|
|
1643
1691
|
}
|
|
1644
1692
|
if (i === "_") return !1;
|
|
1645
1693
|
for (; n < t; n++) if (i = e[n], i !== "_") {
|
|
1646
|
-
if (!
|
|
1694
|
+
if (!Ft(e.charCodeAt(n))) return !1;
|
|
1647
1695
|
r = !0;
|
|
1648
1696
|
}
|
|
1649
1697
|
return !(!r || i === "_");
|
|
1650
1698
|
}
|
|
1651
|
-
function
|
|
1699
|
+
function Lt(e) {
|
|
1652
1700
|
var t = e, n = 1, r;
|
|
1653
1701
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), r = t[0], (r === "-" || r === "+") && (r === "-" && (n = -1), t = t.slice(1), r = t[0]), t === "0") return 0;
|
|
1654
1702
|
if (r === "0") {
|
|
@@ -1658,14 +1706,14 @@ function It(e) {
|
|
|
1658
1706
|
}
|
|
1659
1707
|
return n * parseInt(t, 10);
|
|
1660
1708
|
}
|
|
1661
|
-
function
|
|
1709
|
+
function Rt(e) {
|
|
1662
1710
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 == 0 && !I.isNegativeZero(e);
|
|
1663
1711
|
}
|
|
1664
|
-
var
|
|
1712
|
+
var zt = new R("tag:yaml.org,2002:int", {
|
|
1665
1713
|
kind: "scalar",
|
|
1666
|
-
resolve:
|
|
1667
|
-
construct:
|
|
1668
|
-
predicate:
|
|
1714
|
+
resolve: It,
|
|
1715
|
+
construct: Lt,
|
|
1716
|
+
predicate: Rt,
|
|
1669
1717
|
represent: {
|
|
1670
1718
|
binary: function(e) {
|
|
1671
1719
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1687,16 +1735,16 @@ var Rt = new R("tag:yaml.org,2002:int", {
|
|
|
1687
1735
|
decimal: [10, "dec"],
|
|
1688
1736
|
hexadecimal: [16, "hex"]
|
|
1689
1737
|
}
|
|
1690
|
-
}),
|
|
1691
|
-
function Bt(e) {
|
|
1692
|
-
return !(e === null || !zt.test(e) || e[e.length - 1] === "_");
|
|
1693
|
-
}
|
|
1738
|
+
}), Bt = /* @__PURE__ */ RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
1694
1739
|
function Vt(e) {
|
|
1740
|
+
return !(e === null || !Bt.test(e) || e[e.length - 1] === "_");
|
|
1741
|
+
}
|
|
1742
|
+
function Ht(e) {
|
|
1695
1743
|
var t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1;
|
|
1696
1744
|
return "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Infinity : -Infinity : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1697
1745
|
}
|
|
1698
|
-
var
|
|
1699
|
-
function
|
|
1746
|
+
var Ut = /^[-+]?[0-9]+e/;
|
|
1747
|
+
function Wt(e, t) {
|
|
1700
1748
|
var n;
|
|
1701
1749
|
if (isNaN(e)) switch (t) {
|
|
1702
1750
|
case "lowercase": return ".nan";
|
|
@@ -1714,30 +1762,30 @@ function Ut(e, t) {
|
|
|
1714
1762
|
case "camelcase": return "-.Inf";
|
|
1715
1763
|
}
|
|
1716
1764
|
else if (I.isNegativeZero(e)) return "-0.0";
|
|
1717
|
-
return n = e.toString(10),
|
|
1765
|
+
return n = e.toString(10), Ut.test(n) ? n.replace("e", ".e") : n;
|
|
1718
1766
|
}
|
|
1719
|
-
function
|
|
1767
|
+
function Gt(e) {
|
|
1720
1768
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 != 0 || I.isNegativeZero(e));
|
|
1721
1769
|
}
|
|
1722
|
-
var
|
|
1770
|
+
var Kt = new R("tag:yaml.org,2002:float", {
|
|
1723
1771
|
kind: "scalar",
|
|
1724
|
-
resolve:
|
|
1725
|
-
construct:
|
|
1726
|
-
predicate:
|
|
1727
|
-
represent:
|
|
1772
|
+
resolve: Vt,
|
|
1773
|
+
construct: Ht,
|
|
1774
|
+
predicate: Gt,
|
|
1775
|
+
represent: Wt,
|
|
1728
1776
|
defaultStyle: "lowercase"
|
|
1729
|
-
}),
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
] }),
|
|
1735
|
-
function Xt(e) {
|
|
1736
|
-
return e === null ? !1 : Jt.exec(e) !== null || Yt.exec(e) !== null;
|
|
1737
|
-
}
|
|
1777
|
+
}), qt = wt.extend({ implicit: [
|
|
1778
|
+
Ot,
|
|
1779
|
+
Mt,
|
|
1780
|
+
zt,
|
|
1781
|
+
Kt
|
|
1782
|
+
] }), Jt = qt, Yt = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), Xt = /* @__PURE__ */ RegExp("^([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]))?))?$");
|
|
1738
1783
|
function Zt(e) {
|
|
1784
|
+
return e === null ? !1 : Yt.exec(e) !== null || Xt.exec(e) !== null;
|
|
1785
|
+
}
|
|
1786
|
+
function Qt(e) {
|
|
1739
1787
|
var t, n, r, i, a, o, s, c = 0, l = null, u, d, f;
|
|
1740
|
-
if (t =
|
|
1788
|
+
if (t = Yt.exec(e), t === null && (t = Xt.exec(e)), t === null) throw Error("Date resolve error");
|
|
1741
1789
|
if (n = +t[1], r = t[2] - 1, i = +t[3], !t[4]) return new Date(Date.UTC(n, r, i));
|
|
1742
1790
|
if (a = +t[4], o = +t[5], s = +t[6], t[7]) {
|
|
1743
1791
|
for (c = t[7].slice(0, 3); c.length < 3;) c += "0";
|
|
@@ -1745,58 +1793,58 @@ function Zt(e) {
|
|
|
1745
1793
|
}
|
|
1746
1794
|
return t[9] && (u = +t[10], d = +(t[11] || 0), l = (u * 60 + d) * 6e4, t[9] === "-" && (l = -l)), f = new Date(Date.UTC(n, r, i, a, o, s, c)), l && f.setTime(f.getTime() - l), f;
|
|
1747
1795
|
}
|
|
1748
|
-
function
|
|
1796
|
+
function $t(e) {
|
|
1749
1797
|
return e.toISOString();
|
|
1750
1798
|
}
|
|
1751
|
-
var
|
|
1799
|
+
var en = new R("tag:yaml.org,2002:timestamp", {
|
|
1752
1800
|
kind: "scalar",
|
|
1753
|
-
resolve:
|
|
1754
|
-
construct:
|
|
1801
|
+
resolve: Zt,
|
|
1802
|
+
construct: Qt,
|
|
1755
1803
|
instanceOf: Date,
|
|
1756
|
-
represent:
|
|
1804
|
+
represent: $t
|
|
1757
1805
|
});
|
|
1758
|
-
function
|
|
1806
|
+
function tn(e) {
|
|
1759
1807
|
return e === "<<" || e === null;
|
|
1760
1808
|
}
|
|
1761
|
-
var
|
|
1809
|
+
var nn = new R("tag:yaml.org,2002:merge", {
|
|
1762
1810
|
kind: "scalar",
|
|
1763
|
-
resolve:
|
|
1764
|
-
}),
|
|
1765
|
-
function
|
|
1811
|
+
resolve: tn
|
|
1812
|
+
}), rn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
1813
|
+
function an(e) {
|
|
1766
1814
|
if (e === null) return !1;
|
|
1767
|
-
var t, n, r = 0, i = e.length, a =
|
|
1815
|
+
var t, n, r = 0, i = e.length, a = rn;
|
|
1768
1816
|
for (n = 0; n < i; n++) if (t = a.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1769
1817
|
if (t < 0) return !1;
|
|
1770
1818
|
r += 6;
|
|
1771
1819
|
}
|
|
1772
1820
|
return r % 8 == 0;
|
|
1773
1821
|
}
|
|
1774
|
-
function
|
|
1775
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a =
|
|
1822
|
+
function on(e) {
|
|
1823
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), i = r.length, a = rn, o = 0, s = [];
|
|
1776
1824
|
for (t = 0; t < i; t++) t % 4 == 0 && t && (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)), o = o << 6 | a.indexOf(r.charAt(t));
|
|
1777
1825
|
return n = i % 4 * 6, n === 0 ? (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)) : n === 18 ? (s.push(o >> 10 & 255), s.push(o >> 2 & 255)) : n === 12 && s.push(o >> 4 & 255), new Uint8Array(s);
|
|
1778
1826
|
}
|
|
1779
|
-
function
|
|
1780
|
-
var t = "", n = 0, r, i, a = e.length, o =
|
|
1827
|
+
function sn(e) {
|
|
1828
|
+
var t = "", n = 0, r, i, a = e.length, o = rn;
|
|
1781
1829
|
for (r = 0; r < a; r++) r % 3 == 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1782
1830
|
return i = a % 3, i === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : i === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : i === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
1783
1831
|
}
|
|
1784
|
-
function
|
|
1832
|
+
function cn(e) {
|
|
1785
1833
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1786
1834
|
}
|
|
1787
|
-
var
|
|
1835
|
+
var ln = new R("tag:yaml.org,2002:binary", {
|
|
1788
1836
|
kind: "scalar",
|
|
1789
|
-
resolve:
|
|
1790
|
-
construct:
|
|
1791
|
-
predicate:
|
|
1792
|
-
represent:
|
|
1793
|
-
}),
|
|
1794
|
-
function
|
|
1837
|
+
resolve: an,
|
|
1838
|
+
construct: on,
|
|
1839
|
+
predicate: cn,
|
|
1840
|
+
represent: sn
|
|
1841
|
+
}), un = Object.prototype.hasOwnProperty, dn = Object.prototype.toString;
|
|
1842
|
+
function fn(e) {
|
|
1795
1843
|
if (e === null) return !0;
|
|
1796
1844
|
var t = [], n, r, i, a, o, s = e;
|
|
1797
1845
|
for (n = 0, r = s.length; n < r; n += 1) {
|
|
1798
|
-
if (i = s[n], o = !1,
|
|
1799
|
-
for (a in i) if (
|
|
1846
|
+
if (i = s[n], o = !1, dn.call(i) !== "[object Object]") return !1;
|
|
1847
|
+
for (a in i) if (un.call(i, a)) if (!o) o = !0;
|
|
1800
1848
|
else return !1;
|
|
1801
1849
|
if (!o) return !1;
|
|
1802
1850
|
if (t.indexOf(a) === -1) t.push(a);
|
|
@@ -1804,57 +1852,57 @@ function dn(e) {
|
|
|
1804
1852
|
}
|
|
1805
1853
|
return !0;
|
|
1806
1854
|
}
|
|
1807
|
-
function
|
|
1855
|
+
function pn(e) {
|
|
1808
1856
|
return e === null ? [] : e;
|
|
1809
1857
|
}
|
|
1810
|
-
var
|
|
1858
|
+
var mn = new R("tag:yaml.org,2002:omap", {
|
|
1811
1859
|
kind: "sequence",
|
|
1812
|
-
resolve:
|
|
1813
|
-
construct:
|
|
1814
|
-
}),
|
|
1815
|
-
function
|
|
1860
|
+
resolve: fn,
|
|
1861
|
+
construct: pn
|
|
1862
|
+
}), hn = Object.prototype.toString;
|
|
1863
|
+
function gn(e) {
|
|
1816
1864
|
if (e === null) return !0;
|
|
1817
1865
|
var t, n, r, i, a, o = e;
|
|
1818
1866
|
for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1819
|
-
if (r = o[t],
|
|
1867
|
+
if (r = o[t], hn.call(r) !== "[object Object]" || (i = Object.keys(r), i.length !== 1)) return !1;
|
|
1820
1868
|
a[t] = [i[0], r[i[0]]];
|
|
1821
1869
|
}
|
|
1822
1870
|
return !0;
|
|
1823
1871
|
}
|
|
1824
|
-
function
|
|
1872
|
+
function _n(e) {
|
|
1825
1873
|
if (e === null) return [];
|
|
1826
1874
|
var t, n, r, i, a, o = e;
|
|
1827
1875
|
for (a = Array(o.length), t = 0, n = o.length; t < n; t += 1) r = o[t], i = Object.keys(r), a[t] = [i[0], r[i[0]]];
|
|
1828
1876
|
return a;
|
|
1829
1877
|
}
|
|
1830
|
-
var
|
|
1878
|
+
var vn = new R("tag:yaml.org,2002:pairs", {
|
|
1831
1879
|
kind: "sequence",
|
|
1832
|
-
resolve:
|
|
1833
|
-
construct:
|
|
1834
|
-
}),
|
|
1835
|
-
function
|
|
1880
|
+
resolve: gn,
|
|
1881
|
+
construct: _n
|
|
1882
|
+
}), yn = Object.prototype.hasOwnProperty;
|
|
1883
|
+
function bn(e) {
|
|
1836
1884
|
if (e === null) return !0;
|
|
1837
1885
|
var t, n = e;
|
|
1838
|
-
for (t in n) if (
|
|
1886
|
+
for (t in n) if (yn.call(n, t) && n[t] !== null) return !1;
|
|
1839
1887
|
return !0;
|
|
1840
1888
|
}
|
|
1841
|
-
function
|
|
1889
|
+
function xn(e) {
|
|
1842
1890
|
return e === null ? {} : e;
|
|
1843
1891
|
}
|
|
1844
|
-
var
|
|
1892
|
+
var Sn = new R("tag:yaml.org,2002:set", {
|
|
1845
1893
|
kind: "mapping",
|
|
1846
|
-
resolve:
|
|
1847
|
-
construct:
|
|
1848
|
-
}),
|
|
1849
|
-
implicit: [
|
|
1894
|
+
resolve: bn,
|
|
1895
|
+
construct: xn
|
|
1896
|
+
}), Cn = Jt.extend({
|
|
1897
|
+
implicit: [en, nn],
|
|
1850
1898
|
explicit: [
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1899
|
+
ln,
|
|
1900
|
+
mn,
|
|
1901
|
+
vn,
|
|
1902
|
+
Sn
|
|
1855
1903
|
]
|
|
1856
|
-
}), z = Object.prototype.hasOwnProperty,
|
|
1857
|
-
function
|
|
1904
|
+
}), z = Object.prototype.hasOwnProperty, wn = 1, Tn = 2, En = 3, Dn = 4, On = 1, kn = 2, An = 3, jn = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Mn = /[\x85\u2028\u2029]/, Nn = /[,\[\]\{\}]/, Pn = /^(?:!|!!|![a-z\-]+!)$/i, Fn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1905
|
+
function In(e) {
|
|
1858
1906
|
return Object.prototype.toString.call(e);
|
|
1859
1907
|
}
|
|
1860
1908
|
function B(e) {
|
|
@@ -1869,23 +1917,23 @@ function H(e) {
|
|
|
1869
1917
|
function U(e) {
|
|
1870
1918
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1871
1919
|
}
|
|
1872
|
-
function
|
|
1920
|
+
function Ln(e) {
|
|
1873
1921
|
var t;
|
|
1874
1922
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1875
1923
|
}
|
|
1876
|
-
function
|
|
1924
|
+
function Rn(e) {
|
|
1877
1925
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1878
1926
|
}
|
|
1879
|
-
function
|
|
1927
|
+
function zn(e) {
|
|
1880
1928
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1881
1929
|
}
|
|
1882
|
-
function
|
|
1930
|
+
function Bn(e) {
|
|
1883
1931
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? "\n" : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? "\"" : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? "\xA0" : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1884
1932
|
}
|
|
1885
|
-
function
|
|
1933
|
+
function Vn(e) {
|
|
1886
1934
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320);
|
|
1887
1935
|
}
|
|
1888
|
-
function
|
|
1936
|
+
function Hn(e, t, n) {
|
|
1889
1937
|
t === "__proto__" ? Object.defineProperty(e, t, {
|
|
1890
1938
|
configurable: !0,
|
|
1891
1939
|
enumerable: !0,
|
|
@@ -1893,11 +1941,11 @@ function Vn(e, t, n) {
|
|
|
1893
1941
|
value: n
|
|
1894
1942
|
}) : e[t] = n;
|
|
1895
1943
|
}
|
|
1896
|
-
for (var
|
|
1897
|
-
function Wn(e, t) {
|
|
1898
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema || Sn, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.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 = [];
|
|
1899
|
-
}
|
|
1944
|
+
for (var Un = Array(256), Wn = Array(256), W = 0; W < 256; W++) Un[W] = +!!Bn(W), Wn[W] = Bn(W);
|
|
1900
1945
|
function Gn(e, t) {
|
|
1946
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || Cn, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.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 = [];
|
|
1947
|
+
}
|
|
1948
|
+
function Kn(e, t) {
|
|
1901
1949
|
var n = {
|
|
1902
1950
|
name: e.filename,
|
|
1903
1951
|
buffer: e.input.slice(0, -1),
|
|
@@ -1905,22 +1953,22 @@ function Gn(e, t) {
|
|
|
1905
1953
|
line: e.line,
|
|
1906
1954
|
column: e.position - e.lineStart
|
|
1907
1955
|
};
|
|
1908
|
-
return n.snippet =
|
|
1956
|
+
return n.snippet = ft(n), new L(t, n);
|
|
1909
1957
|
}
|
|
1910
1958
|
function G(e, t) {
|
|
1911
|
-
throw
|
|
1959
|
+
throw Kn(e, t);
|
|
1912
1960
|
}
|
|
1913
|
-
function
|
|
1914
|
-
e.onWarning && e.onWarning.call(null,
|
|
1961
|
+
function qn(e, t) {
|
|
1962
|
+
e.onWarning && e.onWarning.call(null, Kn(e, t));
|
|
1915
1963
|
}
|
|
1916
|
-
var
|
|
1964
|
+
var Jn = {
|
|
1917
1965
|
YAML: function(e, t, n) {
|
|
1918
1966
|
var r, i, a;
|
|
1919
|
-
e.version !== null && G(e, "duplication of %YAML directive"), n.length !== 1 && G(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && G(e, "ill-formed argument of the YAML directive"), i = parseInt(r[1], 10), a = parseInt(r[2], 10), i !== 1 && G(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 &&
|
|
1967
|
+
e.version !== null && G(e, "duplication of %YAML directive"), n.length !== 1 && G(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && G(e, "ill-formed argument of the YAML directive"), i = parseInt(r[1], 10), a = parseInt(r[2], 10), i !== 1 && G(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && qn(e, "unsupported YAML version of the document");
|
|
1920
1968
|
},
|
|
1921
1969
|
TAG: function(e, t, n) {
|
|
1922
1970
|
var r, i;
|
|
1923
|
-
n.length !== 2 && G(e, "TAG directive accepts exactly two arguments"), r = n[0], i = n[1],
|
|
1971
|
+
n.length !== 2 && G(e, "TAG directive accepts exactly two arguments"), r = n[0], i = n[1], Pn.test(r) || G(e, "ill-formed tag handle (first argument) of the TAG directive"), z.call(e.tagMap, r) && G(e, "there is a previously declared suffix for \"" + r + "\" tag handle"), Fn.test(i) || G(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1924
1972
|
try {
|
|
1925
1973
|
i = decodeURIComponent(i);
|
|
1926
1974
|
} catch {
|
|
@@ -1933,23 +1981,23 @@ function K(e, t, n, r) {
|
|
|
1933
1981
|
var i, a, o, s;
|
|
1934
1982
|
if (t < n) {
|
|
1935
1983
|
if (s = e.input.slice(t, n), r) for (i = 0, a = s.length; i < a; i += 1) o = s.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || G(e, "expected valid JSON character");
|
|
1936
|
-
else
|
|
1984
|
+
else jn.test(s) && G(e, "the stream contains non-printable characters");
|
|
1937
1985
|
e.result += s;
|
|
1938
1986
|
}
|
|
1939
1987
|
}
|
|
1940
|
-
function
|
|
1988
|
+
function Yn(e, t, n, r) {
|
|
1941
1989
|
var i, a, o, s;
|
|
1942
|
-
for (I.isObject(n) || G(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, s = i.length; o < s; o += 1) a = i[o], z.call(t, a) || (
|
|
1990
|
+
for (I.isObject(n) || G(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, s = i.length; o < s; o += 1) a = i[o], z.call(t, a) || (Hn(t, a, n[a]), r[a] = !0);
|
|
1943
1991
|
}
|
|
1944
1992
|
function q(e, t, n, r, i, a, o, s, c) {
|
|
1945
1993
|
var l, u;
|
|
1946
|
-
if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), l = 0, u = i.length; l < u; l += 1) Array.isArray(i[l]) && G(e, "nested arrays are not supported inside keys"), typeof i == "object" &&
|
|
1947
|
-
if (typeof i == "object" &&
|
|
1948
|
-
else
|
|
1949
|
-
else !e.json && !z.call(n, i) && z.call(t, i) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = c || e.position, G(e, "duplicated mapping key")),
|
|
1994
|
+
if (Array.isArray(i)) for (i = Array.prototype.slice.call(i), l = 0, u = i.length; l < u; l += 1) Array.isArray(i[l]) && G(e, "nested arrays are not supported inside keys"), typeof i == "object" && In(i[l]) === "[object Object]" && (i[l] = "[object Object]");
|
|
1995
|
+
if (typeof i == "object" && In(i) === "[object Object]" && (i = "[object Object]"), i = String(i), t === null && (t = {}), r === "tag:yaml.org,2002:merge") if (Array.isArray(a)) for (l = 0, u = a.length; l < u; l += 1) Yn(e, t, a[l], n);
|
|
1996
|
+
else Yn(e, t, a, n);
|
|
1997
|
+
else !e.json && !z.call(n, i) && z.call(t, i) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = c || e.position, G(e, "duplicated mapping key")), Hn(t, i, a), delete n[i];
|
|
1950
1998
|
return t;
|
|
1951
1999
|
}
|
|
1952
|
-
function
|
|
2000
|
+
function Xn(e) {
|
|
1953
2001
|
var t = e.input.charCodeAt(e.position);
|
|
1954
2002
|
t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : G(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1955
2003
|
}
|
|
@@ -1959,19 +2007,19 @@ function J(e, t, n) {
|
|
|
1959
2007
|
if (t && i === 35) do
|
|
1960
2008
|
i = e.input.charCodeAt(++e.position);
|
|
1961
2009
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1962
|
-
if (B(i)) for (
|
|
2010
|
+
if (B(i)) for (Xn(e), i = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; i === 32;) e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1963
2011
|
else break;
|
|
1964
2012
|
}
|
|
1965
|
-
return n !== -1 && r !== 0 && e.lineIndent < n &&
|
|
2013
|
+
return n !== -1 && r !== 0 && e.lineIndent < n && qn(e, "deficient indentation"), r;
|
|
1966
2014
|
}
|
|
1967
|
-
function
|
|
2015
|
+
function Zn(e) {
|
|
1968
2016
|
var t = e.position, n = e.input.charCodeAt(t);
|
|
1969
2017
|
return !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || H(n)));
|
|
1970
2018
|
}
|
|
1971
|
-
function
|
|
2019
|
+
function Qn(e, t) {
|
|
1972
2020
|
t === 1 ? e.result += " " : t > 1 && (e.result += I.repeat("\n", t - 1));
|
|
1973
2021
|
}
|
|
1974
|
-
function
|
|
2022
|
+
function $n(e, t, n) {
|
|
1975
2023
|
var r, i, a, o, s, c, l, u, d = e.kind, f = e.result, p = e.input.charCodeAt(e.position);
|
|
1976
2024
|
if (H(p) || U(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (i = e.input.charCodeAt(e.position + 1), H(i) || n && U(i))) return !1;
|
|
1977
2025
|
for (e.kind = "scalar", e.result = "", a = o = e.position, s = !1; p !== 0;) {
|
|
@@ -1979,7 +2027,7 @@ function Qn(e, t, n) {
|
|
|
1979
2027
|
if (i = e.input.charCodeAt(e.position + 1), H(i) || n && U(i)) break;
|
|
1980
2028
|
} else if (p === 35) {
|
|
1981
2029
|
if (r = e.input.charCodeAt(e.position - 1), H(r)) break;
|
|
1982
|
-
} else if (e.position === e.lineStart &&
|
|
2030
|
+
} else if (e.position === e.lineStart && Zn(e) || n && U(p)) break;
|
|
1983
2031
|
else if (B(p)) if (c = e.line, l = e.lineStart, u = e.lineIndent, J(e, !1, -1), e.lineIndent >= t) {
|
|
1984
2032
|
s = !0, p = e.input.charCodeAt(e.position);
|
|
1985
2033
|
continue;
|
|
@@ -1987,51 +2035,51 @@ function Qn(e, t, n) {
|
|
|
1987
2035
|
e.position = o, e.line = c, e.lineStart = l, e.lineIndent = u;
|
|
1988
2036
|
break;
|
|
1989
2037
|
}
|
|
1990
|
-
s &&= (K(e, a, o, !1),
|
|
2038
|
+
s &&= (K(e, a, o, !1), Qn(e, e.line - c), a = o = e.position, !1), V(p) || (o = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1991
2039
|
}
|
|
1992
2040
|
return K(e, a, o, !1), e.result ? !0 : (e.kind = d, e.result = f, !1);
|
|
1993
2041
|
}
|
|
1994
|
-
function
|
|
2042
|
+
function er(e, t) {
|
|
1995
2043
|
var n = e.input.charCodeAt(e.position), r, i;
|
|
1996
2044
|
if (n !== 39) return !1;
|
|
1997
2045
|
for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0;) if (n === 39) if (K(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39) r = e.position, e.position++, i = e.position;
|
|
1998
2046
|
else return !0;
|
|
1999
|
-
else B(n) ? (K(e, r, i, !0),
|
|
2047
|
+
else B(n) ? (K(e, r, i, !0), Qn(e, J(e, !1, t)), r = i = e.position) : e.position === e.lineStart && Zn(e) ? G(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
2000
2048
|
G(e, "unexpected end of the stream within a single quoted scalar");
|
|
2001
2049
|
}
|
|
2002
|
-
function
|
|
2050
|
+
function tr(e, t) {
|
|
2003
2051
|
var n, r, i, a, o, s = e.input.charCodeAt(e.position);
|
|
2004
2052
|
if (s !== 34) return !1;
|
|
2005
2053
|
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0;) if (s === 34) return K(e, n, e.position, !0), e.position++, !0;
|
|
2006
2054
|
else if (s === 92) {
|
|
2007
2055
|
if (K(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), B(s)) J(e, !1, t);
|
|
2008
|
-
else if (s < 256 &&
|
|
2009
|
-
else if ((o =
|
|
2010
|
-
for (i = o, a = 0; i > 0; i--) s = e.input.charCodeAt(++e.position), (o =
|
|
2011
|
-
e.result +=
|
|
2056
|
+
else if (s < 256 && Un[s]) e.result += Wn[s], e.position++;
|
|
2057
|
+
else if ((o = Rn(s)) > 0) {
|
|
2058
|
+
for (i = o, a = 0; i > 0; i--) s = e.input.charCodeAt(++e.position), (o = Ln(s)) >= 0 ? a = (a << 4) + o : G(e, "expected hexadecimal character");
|
|
2059
|
+
e.result += Vn(a), e.position++;
|
|
2012
2060
|
} else G(e, "unknown escape sequence");
|
|
2013
2061
|
n = r = e.position;
|
|
2014
|
-
} else B(s) ? (K(e, n, r, !0),
|
|
2062
|
+
} else B(s) ? (K(e, n, r, !0), Qn(e, J(e, !1, t)), n = r = e.position) : e.position === e.lineStart && Zn(e) ? G(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2015
2063
|
G(e, "unexpected end of the stream within a double quoted scalar");
|
|
2016
2064
|
}
|
|
2017
|
-
function
|
|
2065
|
+
function nr(e, t) {
|
|
2018
2066
|
var n = !0, r, i, a, o = e.tag, s, c = e.anchor, l, u, d, f, p, m = Object.create(null), h, g, _, v = e.input.charCodeAt(e.position);
|
|
2019
2067
|
if (v === 91) u = 93, p = !1, s = [];
|
|
2020
2068
|
else if (v === 123) u = 125, p = !0, s = {};
|
|
2021
2069
|
else return !1;
|
|
2022
2070
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), v = e.input.charCodeAt(++e.position); v !== 0;) {
|
|
2023
2071
|
if (J(e, !0, t), v = e.input.charCodeAt(e.position), v === u) return e.position++, e.tag = o, e.anchor = c, e.kind = p ? "mapping" : "sequence", e.result = s, !0;
|
|
2024
|
-
n ? v === 44 && G(e, "expected the node content, but found ','") : G(e, "missed comma between flow collection entries"), g = h = _ = null, d = f = !1, v === 63 && (l = e.input.charCodeAt(e.position + 1), H(l) && (d = f = !0, e.position++, J(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, Y(e, t,
|
|
2072
|
+
n ? v === 44 && G(e, "expected the node content, but found ','") : G(e, "missed comma between flow collection entries"), g = h = _ = null, d = f = !1, v === 63 && (l = e.input.charCodeAt(e.position + 1), H(l) && (d = f = !0, e.position++, J(e, !0, t))), r = e.line, i = e.lineStart, a = e.position, Y(e, t, wn, !1, !0), g = e.tag, h = e.result, J(e, !0, t), v = e.input.charCodeAt(e.position), (f || e.line === r) && v === 58 && (d = !0, v = e.input.charCodeAt(++e.position), J(e, !0, t), Y(e, t, wn, !1, !0), _ = e.result), p ? q(e, s, m, g, h, _, r, i, a) : d ? s.push(q(e, null, m, g, h, _, r, i, a)) : s.push(h), J(e, !0, t), v = e.input.charCodeAt(e.position), v === 44 ? (n = !0, v = e.input.charCodeAt(++e.position)) : n = !1;
|
|
2025
2073
|
}
|
|
2026
2074
|
G(e, "unexpected end of the stream within a flow collection");
|
|
2027
2075
|
}
|
|
2028
|
-
function
|
|
2029
|
-
var n, r, i =
|
|
2076
|
+
function rr(e, t) {
|
|
2077
|
+
var n, r, i = On, a = !1, o = !1, s = t, c = 0, l = !1, u, d = e.input.charCodeAt(e.position);
|
|
2030
2078
|
if (d === 124) r = !1;
|
|
2031
2079
|
else if (d === 62) r = !0;
|
|
2032
2080
|
else return !1;
|
|
2033
|
-
for (e.kind = "scalar", e.result = ""; d !== 0;) if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45)
|
|
2034
|
-
else if ((u =
|
|
2081
|
+
for (e.kind = "scalar", e.result = ""; d !== 0;) if (d = e.input.charCodeAt(++e.position), d === 43 || d === 45) On === i ? i = d === 43 ? An : kn : G(e, "repeat of a chomping mode identifier");
|
|
2082
|
+
else if ((u = zn(d)) >= 0) u === 0 ? G(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? G(e, "repeat of an indentation width identifier") : (s = t + u - 1, o = !0);
|
|
2035
2083
|
else break;
|
|
2036
2084
|
if (V(d)) {
|
|
2037
2085
|
do
|
|
@@ -2042,13 +2090,13 @@ function nr(e, t) {
|
|
|
2042
2090
|
while (!B(d) && d !== 0);
|
|
2043
2091
|
}
|
|
2044
2092
|
for (; d !== 0;) {
|
|
2045
|
-
for (
|
|
2093
|
+
for (Xn(e), e.lineIndent = 0, d = e.input.charCodeAt(e.position); (!o || e.lineIndent < s) && d === 32;) e.lineIndent++, d = e.input.charCodeAt(++e.position);
|
|
2046
2094
|
if (!o && e.lineIndent > s && (s = e.lineIndent), B(d)) {
|
|
2047
2095
|
c++;
|
|
2048
2096
|
continue;
|
|
2049
2097
|
}
|
|
2050
2098
|
if (e.lineIndent < s) {
|
|
2051
|
-
i ===
|
|
2099
|
+
i === An ? e.result += I.repeat("\n", a ? 1 + c : c) : i === On && a && (e.result += "\n");
|
|
2052
2100
|
break;
|
|
2053
2101
|
}
|
|
2054
2102
|
for (r ? V(d) ? (l = !0, e.result += I.repeat("\n", a ? 1 + c : c)) : l ? (l = !1, e.result += I.repeat("\n", c + 1)) : c === 0 ? a && (e.result += " ") : e.result += I.repeat("\n", c) : e.result += I.repeat("\n", a ? 1 + c : c), a = !0, o = !0, c = 0, n = e.position; !B(d) && d !== 0;) d = e.input.charCodeAt(++e.position);
|
|
@@ -2056,7 +2104,7 @@ function nr(e, t) {
|
|
|
2056
2104
|
}
|
|
2057
2105
|
return !0;
|
|
2058
2106
|
}
|
|
2059
|
-
function
|
|
2107
|
+
function ir(e, t) {
|
|
2060
2108
|
var n, r = e.tag, i = e.anchor, a = [], o, s = !1, c;
|
|
2061
2109
|
if (e.firstTabInLine !== -1) return !1;
|
|
2062
2110
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, G(e, "tab characters must not be used in indentation")), !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !H(o))));) {
|
|
@@ -2064,18 +2112,18 @@ function rr(e, t) {
|
|
|
2064
2112
|
a.push(null), c = e.input.charCodeAt(e.position);
|
|
2065
2113
|
continue;
|
|
2066
2114
|
}
|
|
2067
|
-
if (n = e.line, Y(e, t,
|
|
2115
|
+
if (n = e.line, Y(e, t, En, !1, !0), a.push(e.result), J(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && c !== 0) G(e, "bad indentation of a sequence entry");
|
|
2068
2116
|
else if (e.lineIndent < t) break;
|
|
2069
2117
|
}
|
|
2070
2118
|
return s ? (e.tag = r, e.anchor = i, e.kind = "sequence", e.result = a, !0) : !1;
|
|
2071
2119
|
}
|
|
2072
|
-
function
|
|
2120
|
+
function ar(e, t, n) {
|
|
2073
2121
|
var r, i, a, o, s, c, l = e.tag, u = e.anchor, d = {}, f = Object.create(null), p = null, m = null, h = null, g = !1, _ = !1, v;
|
|
2074
2122
|
if (e.firstTabInLine !== -1) return !1;
|
|
2075
2123
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), v = e.input.charCodeAt(e.position); v !== 0;) {
|
|
2076
2124
|
if (!g && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, G(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), a = e.line, (v === 63 || v === 58) && H(r)) v === 63 ? (g && (q(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !0, i = !0) : g ? (g = !1, i = !0) : G(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, v = r;
|
|
2077
2125
|
else {
|
|
2078
|
-
if (o = e.line, s = e.lineStart, c = e.position, !Y(e, n,
|
|
2126
|
+
if (o = e.line, s = e.lineStart, c = e.position, !Y(e, n, Tn, !1, !0)) break;
|
|
2079
2127
|
if (e.line === a) {
|
|
2080
2128
|
for (v = e.input.charCodeAt(e.position); V(v);) v = e.input.charCodeAt(++e.position);
|
|
2081
2129
|
if (v === 58) v = e.input.charCodeAt(++e.position), H(v) || G(e, "a whitespace character is expected after the key-value separator within a block mapping"), g && (q(e, d, f, p, m, null, o, s, c), p = m = h = null), _ = !0, g = !1, i = !1, p = e.tag, m = e.result;
|
|
@@ -2084,12 +2132,12 @@ function ir(e, t, n) {
|
|
|
2084
2132
|
} else if (_) G(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2085
2133
|
else return e.tag = l, e.anchor = u, !0;
|
|
2086
2134
|
}
|
|
2087
|
-
if ((e.line === a || e.lineIndent > t) && (g && (o = e.line, s = e.lineStart, c = e.position), Y(e, t,
|
|
2135
|
+
if ((e.line === a || e.lineIndent > t) && (g && (o = e.line, s = e.lineStart, c = e.position), Y(e, t, Dn, !0, i) && (g ? m = e.result : h = e.result), g || (q(e, d, f, p, m, h, o, s, c), p = m = h = null), J(e, !0, -1), v = e.input.charCodeAt(e.position)), (e.line === a || e.lineIndent > t) && v !== 0) G(e, "bad indentation of a mapping entry");
|
|
2088
2136
|
else if (e.lineIndent < t) break;
|
|
2089
2137
|
}
|
|
2090
2138
|
return g && q(e, d, f, p, m, null, o, s, c), _ && (e.tag = l, e.anchor = u, e.kind = "mapping", e.result = d), _;
|
|
2091
2139
|
}
|
|
2092
|
-
function
|
|
2140
|
+
function or(e) {
|
|
2093
2141
|
var t, n = !1, r = !1, i, a, o = e.input.charCodeAt(e.position);
|
|
2094
2142
|
if (o !== 33) return !1;
|
|
2095
2143
|
if (e.tag !== null && G(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", t = e.position, n) {
|
|
@@ -2098,10 +2146,10 @@ function ar(e) {
|
|
|
2098
2146
|
while (o !== 0 && o !== 62);
|
|
2099
2147
|
e.position < e.length ? (a = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : G(e, "unexpected end of the stream within a verbatim tag");
|
|
2100
2148
|
} else {
|
|
2101
|
-
for (; o !== 0 && !H(o);) o === 33 && (r ? G(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1),
|
|
2102
|
-
a = e.input.slice(t, e.position),
|
|
2149
|
+
for (; o !== 0 && !H(o);) o === 33 && (r ? G(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(t - 1, e.position + 1), Pn.test(i) || G(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2150
|
+
a = e.input.slice(t, e.position), Nn.test(a) && G(e, "tag suffix cannot contain flow indicator characters");
|
|
2103
2151
|
}
|
|
2104
|
-
a && !
|
|
2152
|
+
a && !Fn.test(a) && G(e, "tag name cannot contain such characters: " + a);
|
|
2105
2153
|
try {
|
|
2106
2154
|
a = decodeURIComponent(a);
|
|
2107
2155
|
} catch {
|
|
@@ -2109,13 +2157,13 @@ function ar(e) {
|
|
|
2109
2157
|
}
|
|
2110
2158
|
return n ? e.tag = a : z.call(e.tagMap, i) ? e.tag = e.tagMap[i] + a : i === "!" ? e.tag = "!" + a : i === "!!" ? e.tag = "tag:yaml.org,2002:" + a : G(e, "undeclared tag handle \"" + i + "\""), !0;
|
|
2111
2159
|
}
|
|
2112
|
-
function
|
|
2160
|
+
function sr(e) {
|
|
2113
2161
|
var t, n = e.input.charCodeAt(e.position);
|
|
2114
2162
|
if (n !== 38) return !1;
|
|
2115
2163
|
for (e.anchor !== null && G(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !H(n) && !U(n);) n = e.input.charCodeAt(++e.position);
|
|
2116
2164
|
return e.position === t && G(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2117
2165
|
}
|
|
2118
|
-
function
|
|
2166
|
+
function cr(e) {
|
|
2119
2167
|
var t, n, r = e.input.charCodeAt(e.position);
|
|
2120
2168
|
if (r !== 42) return !1;
|
|
2121
2169
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !H(r) && !U(r);) r = e.input.charCodeAt(++e.position);
|
|
@@ -2123,8 +2171,8 @@ function sr(e) {
|
|
|
2123
2171
|
}
|
|
2124
2172
|
function Y(e, t, n, r, i) {
|
|
2125
2173
|
var a, o, s, c = 1, l = !1, u = !1, d, f, p, m, h, g;
|
|
2126
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = s =
|
|
2127
|
-
if (s &&= l || i, (c === 1 ||
|
|
2174
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, a = o = s = Dn === n || En === n, r && J(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1) for (; or(e) || sr(e);) J(e, !0, -1) ? (l = !0, s = a, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : s = !1;
|
|
2175
|
+
if (s &&= l || i, (c === 1 || Dn === n) && (h = wn === n || Tn === n ? t : t + 1, g = e.position - e.lineStart, c === 1 ? s && (ir(e, g) || ar(e, g, h)) || nr(e, h) ? u = !0 : (o && rr(e, h) || er(e, h) || tr(e, h) ? u = !0 : cr(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && G(e, "alias node should not have any properties")) : $n(e, h, wn === n) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (u = s && ir(e, g))), e.tag === null) e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2128
2176
|
else if (e.tag === "?") {
|
|
2129
2177
|
for (e.result !== null && e.kind !== "scalar" && G(e, "unacceptable node kind for !<?> tag; it should be \"scalar\", not \"" + e.kind + "\""), d = 0, f = e.implicitTypes.length; d < f; d += 1) if (m = e.implicitTypes[d], m.resolve(e.result)) {
|
|
2130
2178
|
e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
@@ -2140,7 +2188,7 @@ function Y(e, t, n, r, i) {
|
|
|
2140
2188
|
}
|
|
2141
2189
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
|
|
2142
2190
|
}
|
|
2143
|
-
function
|
|
2191
|
+
function lr(e) {
|
|
2144
2192
|
var t = e.position, n, r, i, a = !1, o;
|
|
2145
2193
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = Object.create(null), e.anchorMap = Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (J(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37));) {
|
|
2146
2194
|
for (a = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !H(o);) o = e.input.charCodeAt(++e.position);
|
|
@@ -2156,41 +2204,41 @@ function cr(e) {
|
|
|
2156
2204
|
for (n = e.position; o !== 0 && !H(o);) o = e.input.charCodeAt(++e.position);
|
|
2157
2205
|
i.push(e.input.slice(n, e.position));
|
|
2158
2206
|
}
|
|
2159
|
-
o !== 0 &&
|
|
2207
|
+
o !== 0 && Xn(e), z.call(Jn, r) ? Jn[r](e, r, i) : qn(e, "unknown document directive \"" + r + "\"");
|
|
2160
2208
|
}
|
|
2161
|
-
if (J(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, J(e, !0, -1)) : a && G(e, "directives end mark is expected"), Y(e, e.lineIndent - 1,
|
|
2209
|
+
if (J(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, J(e, !0, -1)) : a && G(e, "directives end mark is expected"), Y(e, e.lineIndent - 1, Dn, !1, !0), J(e, !0, -1), e.checkLineBreaks && Mn.test(e.input.slice(t, e.position)) && qn(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Zn(e)) {
|
|
2162
2210
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, J(e, !0, -1));
|
|
2163
2211
|
return;
|
|
2164
2212
|
}
|
|
2165
2213
|
if (e.position < e.length - 1) G(e, "end of the stream or a document separator is expected");
|
|
2166
2214
|
else return;
|
|
2167
2215
|
}
|
|
2168
|
-
function
|
|
2216
|
+
function ur(e, t) {
|
|
2169
2217
|
e = String(e), t ||= {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += "\n"), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2170
|
-
var n = new
|
|
2218
|
+
var n = new Gn(e, t), r = e.indexOf("\0");
|
|
2171
2219
|
for (r !== -1 && (n.position = r, G(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32;) n.lineIndent += 1, n.position += 1;
|
|
2172
|
-
for (; n.position < n.length - 1;)
|
|
2220
|
+
for (; n.position < n.length - 1;) lr(n);
|
|
2173
2221
|
return n.documents;
|
|
2174
2222
|
}
|
|
2175
|
-
function
|
|
2223
|
+
function dr(e, t, n) {
|
|
2176
2224
|
typeof t == "object" && t && n === void 0 && (n = t, t = null);
|
|
2177
|
-
var r =
|
|
2225
|
+
var r = ur(e, n);
|
|
2178
2226
|
if (typeof t != "function") return r;
|
|
2179
2227
|
for (var i = 0, a = r.length; i < a; i += 1) t(r[i]);
|
|
2180
2228
|
}
|
|
2181
|
-
function
|
|
2182
|
-
var n =
|
|
2229
|
+
function fr(e, t) {
|
|
2230
|
+
var n = ur(e, t);
|
|
2183
2231
|
if (n.length !== 0) {
|
|
2184
2232
|
if (n.length === 1) return n[0];
|
|
2185
2233
|
throw new L("expected a single document in the stream, but found more");
|
|
2186
2234
|
}
|
|
2187
2235
|
}
|
|
2188
|
-
var
|
|
2189
|
-
loadAll:
|
|
2190
|
-
load:
|
|
2191
|
-
},
|
|
2236
|
+
var pr = {
|
|
2237
|
+
loadAll: dr,
|
|
2238
|
+
load: fr
|
|
2239
|
+
}, mr = Object.prototype.toString, hr = Object.prototype.hasOwnProperty, gr = 65279, _r = 9, vr = 10, yr = 13, br = 32, xr = 33, Sr = 34, Cr = 35, wr = 37, Tr = 38, Er = 39, Dr = 42, Or = 44, kr = 45, Ar = 58, jr = 61, Mr = 62, Nr = 63, Pr = 64, Fr = 91, Ir = 93, Lr = 96, Rr = 123, zr = 124, Br = 125, X = {};
|
|
2192
2240
|
X[0] = "\\0", X[7] = "\\a", X[8] = "\\b", X[9] = "\\t", X[10] = "\\n", X[11] = "\\v", X[12] = "\\f", X[13] = "\\r", X[27] = "\\e", X[34] = "\\\"", X[92] = "\\\\", X[133] = "\\N", X[160] = "\\_", X[8232] = "\\L", X[8233] = "\\P";
|
|
2193
|
-
var
|
|
2241
|
+
var Vr = [
|
|
2194
2242
|
"y",
|
|
2195
2243
|
"Y",
|
|
2196
2244
|
"yes",
|
|
@@ -2207,14 +2255,14 @@ var Br = [
|
|
|
2207
2255
|
"off",
|
|
2208
2256
|
"Off",
|
|
2209
2257
|
"OFF"
|
|
2210
|
-
],
|
|
2211
|
-
function
|
|
2258
|
+
], Hr = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2259
|
+
function Ur(e, t) {
|
|
2212
2260
|
var n, r, i, a, o, s, c;
|
|
2213
2261
|
if (t === null) return {};
|
|
2214
|
-
for (n = {}, r = Object.keys(t), i = 0, a = r.length; i < a; i += 1) o = r[i], s = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c &&
|
|
2262
|
+
for (n = {}, r = Object.keys(t), i = 0, a = r.length; i < a; i += 1) o = r[i], s = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && hr.call(c.styleAliases, s) && (s = c.styleAliases[s]), n[o] = s;
|
|
2215
2263
|
return n;
|
|
2216
2264
|
}
|
|
2217
|
-
function
|
|
2265
|
+
function Wr(e) {
|
|
2218
2266
|
var t = e.toString(16).toUpperCase(), n, r;
|
|
2219
2267
|
if (e <= 255) n = "x", r = 2;
|
|
2220
2268
|
else if (e <= 65535) n = "u", r = 4;
|
|
@@ -2222,138 +2270,138 @@ function Ur(e) {
|
|
|
2222
2270
|
else throw new L("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2223
2271
|
return "\\" + n + I.repeat("0", r - t.length) + t;
|
|
2224
2272
|
}
|
|
2225
|
-
var
|
|
2226
|
-
function
|
|
2227
|
-
this.schema = e.schema ||
|
|
2273
|
+
var Gr = 1, Kr = 2;
|
|
2274
|
+
function qr(e) {
|
|
2275
|
+
this.schema = e.schema || Cn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = I.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Ur(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 === "\"" ? Kr : Gr, 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;
|
|
2228
2276
|
}
|
|
2229
|
-
function
|
|
2277
|
+
function Jr(e, t) {
|
|
2230
2278
|
for (var n = I.repeat(" ", t), r = 0, i = -1, a = "", o, s = e.length; r < s;) i = e.indexOf("\n", r), i === -1 ? (o = e.slice(r), r = s) : (o = e.slice(r, i + 1), r = i + 1), o.length && o !== "\n" && (a += n), a += o;
|
|
2231
2279
|
return a;
|
|
2232
2280
|
}
|
|
2233
|
-
function
|
|
2281
|
+
function Yr(e, t) {
|
|
2234
2282
|
return "\n" + I.repeat(" ", e.indent * t);
|
|
2235
2283
|
}
|
|
2236
|
-
function
|
|
2284
|
+
function Xr(e, t) {
|
|
2237
2285
|
var n, r, i;
|
|
2238
2286
|
for (n = 0, r = e.implicitTypes.length; n < r; n += 1) if (i = e.implicitTypes[n], i.resolve(t)) return !0;
|
|
2239
2287
|
return !1;
|
|
2240
2288
|
}
|
|
2241
|
-
function Xr(e) {
|
|
2242
|
-
return e === yr || e === gr;
|
|
2243
|
-
}
|
|
2244
2289
|
function Zr(e) {
|
|
2245
|
-
return
|
|
2290
|
+
return e === br || e === _r;
|
|
2246
2291
|
}
|
|
2247
2292
|
function Qr(e) {
|
|
2248
|
-
return
|
|
2293
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== gr || 65536 <= e && e <= 1114111;
|
|
2249
2294
|
}
|
|
2250
|
-
function $r(e
|
|
2251
|
-
|
|
2252
|
-
return (n ? r : r && e !== Dr && e !== Pr && e !== Fr && e !== Lr && e !== zr) && e !== Sr && !(t === kr && !i) || Qr(t) && !Xr(t) && e === Sr || t === kr && i;
|
|
2295
|
+
function $r(e) {
|
|
2296
|
+
return Qr(e) && e !== gr && e !== yr && e !== vr;
|
|
2253
2297
|
}
|
|
2254
|
-
function ei(e) {
|
|
2255
|
-
|
|
2298
|
+
function ei(e, t, n) {
|
|
2299
|
+
var r = $r(e), i = r && !Zr(e);
|
|
2300
|
+
return (n ? r : r && e !== Or && e !== Fr && e !== Ir && e !== Rr && e !== Br) && e !== Cr && !(t === Ar && !i) || $r(t) && !Zr(t) && e === Cr || t === Ar && i;
|
|
2256
2301
|
}
|
|
2257
2302
|
function ti(e) {
|
|
2258
|
-
return !
|
|
2303
|
+
return Qr(e) && e !== gr && !Zr(e) && e !== kr && e !== Nr && e !== Ar && e !== Or && e !== Fr && e !== Ir && e !== Rr && e !== Br && e !== Cr && e !== Tr && e !== Dr && e !== xr && e !== zr && e !== jr && e !== Mr && e !== Er && e !== Sr && e !== wr && e !== Pr && e !== Lr;
|
|
2304
|
+
}
|
|
2305
|
+
function ni(e) {
|
|
2306
|
+
return !Zr(e) && e !== Ar;
|
|
2259
2307
|
}
|
|
2260
|
-
function
|
|
2308
|
+
function ri(e, t) {
|
|
2261
2309
|
var n = e.charCodeAt(t), r;
|
|
2262
2310
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (r = e.charCodeAt(t + 1), r >= 56320 && r <= 57343) ? (n - 55296) * 1024 + r - 56320 + 65536 : n;
|
|
2263
2311
|
}
|
|
2264
|
-
function
|
|
2312
|
+
function ii(e) {
|
|
2265
2313
|
return /^\n* /.test(e);
|
|
2266
2314
|
}
|
|
2267
|
-
var
|
|
2268
|
-
function
|
|
2269
|
-
var c, l = 0, u = null, d = !1, f = !1, p = r !== -1, m = -1, h =
|
|
2315
|
+
var ai = 1, oi = 2, si = 3, ci = 4, Z = 5;
|
|
2316
|
+
function li(e, t, n, r, i, a, o, s) {
|
|
2317
|
+
var c, l = 0, u = null, d = !1, f = !1, p = r !== -1, m = -1, h = ti(ri(e, 0)) && ni(ri(e, e.length - 1));
|
|
2270
2318
|
if (t || o) for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2271
|
-
if (l =
|
|
2272
|
-
h &&=
|
|
2319
|
+
if (l = ri(e, c), !Qr(l)) return Z;
|
|
2320
|
+
h &&= ei(l, u, s), u = l;
|
|
2273
2321
|
}
|
|
2274
2322
|
else {
|
|
2275
2323
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
2276
|
-
if (l =
|
|
2277
|
-
else if (!
|
|
2278
|
-
h &&=
|
|
2324
|
+
if (l = ri(e, c), l === vr) d = !0, p && (f ||= c - m - 1 > r && e[m + 1] !== " ", m = c);
|
|
2325
|
+
else if (!Qr(l)) return Z;
|
|
2326
|
+
h &&= ei(l, u, s), u = l;
|
|
2279
2327
|
}
|
|
2280
2328
|
f ||= p && c - m - 1 > r && e[m + 1] !== " ";
|
|
2281
2329
|
}
|
|
2282
|
-
return !d && !f ? h && !o && !i(e) ?
|
|
2330
|
+
return !d && !f ? h && !o && !i(e) ? ai : a === Kr ? Z : oi : n > 9 && ii(e) ? Z : o ? a === Kr ? Z : oi : f ? ci : si;
|
|
2283
2331
|
}
|
|
2284
|
-
function
|
|
2332
|
+
function ui(e, t, n, r, i) {
|
|
2285
2333
|
e.dump = function() {
|
|
2286
|
-
if (t.length === 0) return e.quotingType ===
|
|
2287
|
-
if (!e.noCompatMode && (
|
|
2334
|
+
if (t.length === 0) return e.quotingType === Kr ? "\"\"" : "''";
|
|
2335
|
+
if (!e.noCompatMode && (Vr.indexOf(t) !== -1 || Hr.test(t))) return e.quotingType === Kr ? "\"" + t + "\"" : "'" + t + "'";
|
|
2288
2336
|
var a = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2289
2337
|
function c(t) {
|
|
2290
|
-
return
|
|
2338
|
+
return Xr(e, t);
|
|
2291
2339
|
}
|
|
2292
|
-
switch (
|
|
2293
|
-
case
|
|
2294
|
-
case
|
|
2295
|
-
case
|
|
2296
|
-
case
|
|
2297
|
-
case Z: return "\"" +
|
|
2340
|
+
switch (li(t, s, e.indent, o, c, e.quotingType, e.forceQuotes && !r, i)) {
|
|
2341
|
+
case ai: return t;
|
|
2342
|
+
case oi: return "'" + t.replace(/'/g, "''") + "'";
|
|
2343
|
+
case si: return "|" + di(t, e.indent) + fi(Jr(t, a));
|
|
2344
|
+
case ci: return ">" + di(t, e.indent) + fi(Jr(pi(t, o), a));
|
|
2345
|
+
case Z: return "\"" + hi(t) + "\"";
|
|
2298
2346
|
default: throw new L("impossible error: invalid scalar style");
|
|
2299
2347
|
}
|
|
2300
2348
|
}();
|
|
2301
2349
|
}
|
|
2302
|
-
function
|
|
2303
|
-
var n =
|
|
2350
|
+
function di(e, t) {
|
|
2351
|
+
var n = ii(e) ? String(t) : "", r = e[e.length - 1] === "\n";
|
|
2304
2352
|
return n + (r && (e[e.length - 2] === "\n" || e === "\n") ? "+" : r ? "" : "-") + "\n";
|
|
2305
2353
|
}
|
|
2306
|
-
function
|
|
2354
|
+
function fi(e) {
|
|
2307
2355
|
return e[e.length - 1] === "\n" ? e.slice(0, -1) : e;
|
|
2308
2356
|
}
|
|
2309
|
-
function
|
|
2357
|
+
function pi(e, t) {
|
|
2310
2358
|
for (var n = /(\n+)([^\n]*)/g, r = function() {
|
|
2311
2359
|
var r = e.indexOf("\n");
|
|
2312
|
-
return r = r === -1 ? e.length : r, n.lastIndex = r,
|
|
2360
|
+
return r = r === -1 ? e.length : r, n.lastIndex = r, mi(e.slice(0, r), t);
|
|
2313
2361
|
}(), i = e[0] === "\n" || e[0] === " ", a, o; o = n.exec(e);) {
|
|
2314
2362
|
var s = o[1], c = o[2];
|
|
2315
|
-
a = c[0] === " ", r += s + (!i && !a && c !== "" ? "\n" : "") +
|
|
2363
|
+
a = c[0] === " ", r += s + (!i && !a && c !== "" ? "\n" : "") + mi(c, t), i = a;
|
|
2316
2364
|
}
|
|
2317
2365
|
return r;
|
|
2318
2366
|
}
|
|
2319
|
-
function
|
|
2367
|
+
function mi(e, t) {
|
|
2320
2368
|
if (e === "" || e[0] === " ") return e;
|
|
2321
2369
|
for (var n = / [^ ]/g, r, i = 0, a, o = 0, s = 0, c = ""; r = n.exec(e);) s = r.index, s - i > t && (a = o > i ? o : s, c += "\n" + e.slice(i, a), i = a + 1), o = s;
|
|
2322
2370
|
return c += "\n", e.length - i > t && o > i ? c += e.slice(i, o) + "\n" + e.slice(o + 1) : c += e.slice(i), c.slice(1);
|
|
2323
2371
|
}
|
|
2324
|
-
function
|
|
2325
|
-
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++) n =
|
|
2372
|
+
function hi(e) {
|
|
2373
|
+
for (var t = "", n = 0, r, i = 0; i < e.length; n >= 65536 ? i += 2 : i++) n = ri(e, i), r = X[n], !r && Qr(n) ? (t += e[i], n >= 65536 && (t += e[i + 1])) : t += r || Wr(n);
|
|
2326
2374
|
return t;
|
|
2327
2375
|
}
|
|
2328
|
-
function
|
|
2376
|
+
function gi(e, t, n) {
|
|
2329
2377
|
var r = "", i = e.tag, a, o, s;
|
|
2330
2378
|
for (a = 0, o = n.length; a < o; a += 1) s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (Q(e, t, s, !1, !1) || s === void 0 && Q(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2331
2379
|
e.tag = i, e.dump = "[" + r + "]";
|
|
2332
2380
|
}
|
|
2333
|
-
function
|
|
2381
|
+
function _i(e, t, n, r) {
|
|
2334
2382
|
var i = "", a = e.tag, o, s, c;
|
|
2335
|
-
for (o = 0, s = n.length; o < s; o += 1) c = n[o], e.replacer && (c = e.replacer.call(n, String(o), c)), (Q(e, t + 1, c, !0, !0, !1, !0) || c === void 0 && Q(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i +=
|
|
2383
|
+
for (o = 0, s = n.length; o < s; o += 1) c = n[o], e.replacer && (c = e.replacer.call(n, String(o), c)), (Q(e, t + 1, c, !0, !0, !1, !0) || c === void 0 && Q(e, t + 1, null, !0, !0, !1, !0)) && ((!r || i !== "") && (i += Yr(e, t)), e.dump && vr === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2336
2384
|
e.tag = a, e.dump = i || "[]";
|
|
2337
2385
|
}
|
|
2338
|
-
function
|
|
2386
|
+
function vi(e, t, n) {
|
|
2339
2387
|
var r = "", i = e.tag, a = Object.keys(n), o, s, c, l, u;
|
|
2340
2388
|
for (o = 0, s = a.length; o < s; o += 1) u = "", r !== "" && (u += ", "), e.condenseFlow && (u += "\""), c = a[o], l = n[c], e.replacer && (l = e.replacer.call(n, c, l)), Q(e, t, c, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? "\"" : "") + ":" + (e.condenseFlow ? "" : " "), Q(e, t, l, !1, !1) && (u += e.dump, r += u));
|
|
2341
2389
|
e.tag = i, e.dump = "{" + r + "}";
|
|
2342
2390
|
}
|
|
2343
|
-
function
|
|
2391
|
+
function yi(e, t, n, r) {
|
|
2344
2392
|
var i = "", a = e.tag, o = Object.keys(n), s, c, l, u, d, f;
|
|
2345
2393
|
if (e.sortKeys === !0) o.sort();
|
|
2346
2394
|
else if (typeof e.sortKeys == "function") o.sort(e.sortKeys);
|
|
2347
2395
|
else if (e.sortKeys) throw new L("sortKeys must be a boolean or a function");
|
|
2348
|
-
for (s = 0, c = o.length; s < c; s += 1) f = "", (!r || i !== "") && (f +=
|
|
2396
|
+
for (s = 0, c = o.length; s < c; s += 1) f = "", (!r || i !== "") && (f += Yr(e, t)), l = o[s], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)), Q(e, t + 1, l, !0, !0, !0) && (d = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, d && (e.dump && vr === e.dump.charCodeAt(0) ? f += "?" : f += "? "), f += e.dump, d && (f += Yr(e, t)), Q(e, t + 1, u, !0, d) && (e.dump && vr === e.dump.charCodeAt(0) ? f += ":" : f += ": ", f += e.dump, i += f));
|
|
2349
2397
|
e.tag = a, e.dump = i || "{}";
|
|
2350
2398
|
}
|
|
2351
|
-
function
|
|
2399
|
+
function bi(e, t, n) {
|
|
2352
2400
|
var r, i = n ? e.explicitTypes : e.implicitTypes, a, o, s, c;
|
|
2353
2401
|
for (a = 0, o = i.length; a < o; a += 1) if (s = i[a], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof t == "object" && t instanceof s.instanceOf) && (!s.predicate || s.predicate(t))) {
|
|
2354
2402
|
if (n ? s.multi && s.representName ? e.tag = s.representName(t) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2355
|
-
if (c = e.styleMap[s.tag] || s.defaultStyle,
|
|
2356
|
-
else if (
|
|
2403
|
+
if (c = e.styleMap[s.tag] || s.defaultStyle, mr.call(s.represent) === "[object Function]") r = s.represent(t, c);
|
|
2404
|
+
else if (hr.call(s.represent, c)) r = s.represent[c](t, c);
|
|
2357
2405
|
else throw new L("!<" + s.tag + "> tag resolver accepts not \"" + c + "\" style");
|
|
2358
2406
|
e.dump = r;
|
|
2359
2407
|
}
|
|
@@ -2362,15 +2410,15 @@ function yi(e, t, n) {
|
|
|
2362
2410
|
return !1;
|
|
2363
2411
|
}
|
|
2364
2412
|
function Q(e, t, n, r, i, a, o) {
|
|
2365
|
-
e.tag = null, e.dump = n,
|
|
2366
|
-
var s =
|
|
2413
|
+
e.tag = null, e.dump = n, bi(e, n, !1) || bi(e, n, !0);
|
|
2414
|
+
var s = mr.call(e.dump), c = r, l;
|
|
2367
2415
|
r &&= e.flowLevel < 0 || e.flowLevel > t;
|
|
2368
2416
|
var u = s === "[object Object]" || s === "[object Array]", d, f;
|
|
2369
2417
|
if (u && (d = e.duplicates.indexOf(n), f = d !== -1), (e.tag !== null && e.tag !== "?" || f || e.indent !== 2 && t > 0) && (i = !1), f && e.usedDuplicates[d]) e.dump = "*ref_" + d;
|
|
2370
2418
|
else {
|
|
2371
|
-
if (u && f && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), s === "[object Object]") r && Object.keys(e.dump).length !== 0 ? (
|
|
2372
|
-
else if (s === "[object Array]") r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ?
|
|
2373
|
-
else if (s === "[object String]") e.tag !== "?" &&
|
|
2419
|
+
if (u && f && !e.usedDuplicates[d] && (e.usedDuplicates[d] = !0), s === "[object Object]") r && Object.keys(e.dump).length !== 0 ? (yi(e, t, e.dump, i), f && (e.dump = "&ref_" + d + e.dump)) : (vi(e, t, e.dump), f && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2420
|
+
else if (s === "[object Array]") r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? _i(e, t - 1, e.dump, i) : _i(e, t, e.dump, i), f && (e.dump = "&ref_" + d + e.dump)) : (gi(e, t, e.dump), f && (e.dump = "&ref_" + d + " " + e.dump));
|
|
2421
|
+
else if (s === "[object String]") e.tag !== "?" && ui(e, e.dump, t, a, c);
|
|
2374
2422
|
else if (s === "[object Undefined]") return !1;
|
|
2375
2423
|
else {
|
|
2376
2424
|
if (e.skipInvalid) return !1;
|
|
@@ -2380,63 +2428,63 @@ function Q(e, t, n, r, i, a, o) {
|
|
|
2380
2428
|
}
|
|
2381
2429
|
return !0;
|
|
2382
2430
|
}
|
|
2383
|
-
function
|
|
2431
|
+
function xi(e, t) {
|
|
2384
2432
|
var n = [], r = [], i, a;
|
|
2385
|
-
for (
|
|
2433
|
+
for (Si(e, n, r), i = 0, a = r.length; i < a; i += 1) t.duplicates.push(n[r[i]]);
|
|
2386
2434
|
t.usedDuplicates = Array(a);
|
|
2387
2435
|
}
|
|
2388
|
-
function
|
|
2436
|
+
function Si(e, t, n) {
|
|
2389
2437
|
var r, i, a;
|
|
2390
2438
|
if (typeof e == "object" && e) if (i = t.indexOf(e), i !== -1) n.indexOf(i) === -1 && n.push(i);
|
|
2391
|
-
else if (t.push(e), Array.isArray(e)) for (i = 0, a = e.length; i < a; i += 1)
|
|
2392
|
-
else for (r = Object.keys(e), i = 0, a = r.length; i < a; i += 1)
|
|
2439
|
+
else if (t.push(e), Array.isArray(e)) for (i = 0, a = e.length; i < a; i += 1) Si(e[i], t, n);
|
|
2440
|
+
else for (r = Object.keys(e), i = 0, a = r.length; i < a; i += 1) Si(e[r[i]], t, n);
|
|
2393
2441
|
}
|
|
2394
|
-
function
|
|
2442
|
+
function Ci(e, t) {
|
|
2395
2443
|
t ||= {};
|
|
2396
|
-
var n = new
|
|
2397
|
-
n.noRefs ||
|
|
2444
|
+
var n = new qr(t);
|
|
2445
|
+
n.noRefs || xi(e, n);
|
|
2398
2446
|
var r = e;
|
|
2399
2447
|
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), Q(n, 0, r, !0, !0) ? n.dump + "\n" : "";
|
|
2400
2448
|
}
|
|
2401
|
-
var
|
|
2402
|
-
function
|
|
2449
|
+
var wi = { dump: Ci };
|
|
2450
|
+
function Ti(e, t) {
|
|
2403
2451
|
return function() {
|
|
2404
2452
|
throw Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2405
2453
|
};
|
|
2406
2454
|
}
|
|
2407
|
-
var
|
|
2455
|
+
var Ei = {
|
|
2408
2456
|
Type: R,
|
|
2409
|
-
Schema:
|
|
2410
|
-
FAILSAFE_SCHEMA:
|
|
2411
|
-
JSON_SCHEMA:
|
|
2412
|
-
CORE_SCHEMA:
|
|
2413
|
-
DEFAULT_SCHEMA:
|
|
2414
|
-
load:
|
|
2415
|
-
loadAll:
|
|
2416
|
-
dump:
|
|
2457
|
+
Schema: bt,
|
|
2458
|
+
FAILSAFE_SCHEMA: wt,
|
|
2459
|
+
JSON_SCHEMA: qt,
|
|
2460
|
+
CORE_SCHEMA: Jt,
|
|
2461
|
+
DEFAULT_SCHEMA: Cn,
|
|
2462
|
+
load: pr.load,
|
|
2463
|
+
loadAll: pr.loadAll,
|
|
2464
|
+
dump: wi.dump,
|
|
2417
2465
|
YAMLException: L,
|
|
2418
2466
|
types: {
|
|
2419
|
-
binary:
|
|
2420
|
-
float:
|
|
2421
|
-
map:
|
|
2422
|
-
null:
|
|
2423
|
-
pairs:
|
|
2424
|
-
set:
|
|
2425
|
-
timestamp:
|
|
2426
|
-
bool:
|
|
2427
|
-
int:
|
|
2428
|
-
merge:
|
|
2429
|
-
omap:
|
|
2430
|
-
seq:
|
|
2431
|
-
str:
|
|
2467
|
+
binary: ln,
|
|
2468
|
+
float: Kt,
|
|
2469
|
+
map: Ct,
|
|
2470
|
+
null: Ot,
|
|
2471
|
+
pairs: vn,
|
|
2472
|
+
set: Sn,
|
|
2473
|
+
timestamp: en,
|
|
2474
|
+
bool: Mt,
|
|
2475
|
+
int: zt,
|
|
2476
|
+
merge: nn,
|
|
2477
|
+
omap: mn,
|
|
2478
|
+
seq: St,
|
|
2479
|
+
str: xt
|
|
2432
2480
|
},
|
|
2433
|
-
safeLoad:
|
|
2434
|
-
safeLoadAll:
|
|
2435
|
-
safeDump:
|
|
2436
|
-
},
|
|
2437
|
-
let t =
|
|
2481
|
+
safeLoad: Ti("safeLoad", "load"),
|
|
2482
|
+
safeLoadAll: Ti("safeLoadAll", "loadAll"),
|
|
2483
|
+
safeDump: Ti("safeDump", "dump")
|
|
2484
|
+
}, Di = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Oi = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ki = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Ai = (e) => {
|
|
2485
|
+
let t = ki(e);
|
|
2438
2486
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2439
|
-
},
|
|
2487
|
+
}, ji = {
|
|
2440
2488
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2441
2489
|
width: 24,
|
|
2442
2490
|
height: 24,
|
|
@@ -2446,58 +2494,58 @@ var Ti = {
|
|
|
2446
2494
|
strokeWidth: 2,
|
|
2447
2495
|
strokeLinecap: "round",
|
|
2448
2496
|
strokeLinejoin: "round"
|
|
2449
|
-
},
|
|
2497
|
+
}, Mi = (e) => {
|
|
2450
2498
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
2451
2499
|
return !1;
|
|
2452
|
-
},
|
|
2453
|
-
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } =
|
|
2454
|
-
return
|
|
2455
|
-
ref:
|
|
2456
|
-
...
|
|
2457
|
-
width: t ?? u ??
|
|
2458
|
-
height: t ?? u ??
|
|
2500
|
+
}, Ni = o({}), Pi = () => d(Ni), Fi = c(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...c }, l) => {
|
|
2501
|
+
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } = Pi() ?? {}, h = r ?? f ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
|
|
2502
|
+
return s("svg", {
|
|
2503
|
+
ref: l,
|
|
2504
|
+
...ji,
|
|
2505
|
+
width: t ?? u ?? ji.width,
|
|
2506
|
+
height: t ?? u ?? ji.height,
|
|
2459
2507
|
stroke: e ?? p,
|
|
2460
2508
|
strokeWidth: h,
|
|
2461
|
-
className:
|
|
2462
|
-
...!a && !
|
|
2463
|
-
...
|
|
2464
|
-
}, [...o.map(([e, t]) =>
|
|
2465
|
-
}),
|
|
2466
|
-
let n =
|
|
2509
|
+
className: Di("lucide", m, i),
|
|
2510
|
+
...!a && !Mi(c) && { "aria-hidden": "true" },
|
|
2511
|
+
...c
|
|
2512
|
+
}, [...o.map(([e, t]) => s(e, t)), ...Array.isArray(a) ? a : [a]]);
|
|
2513
|
+
}), Ii = (e, t) => {
|
|
2514
|
+
let n = c(({ className: n, ...r }, i) => s(Fi, {
|
|
2467
2515
|
ref: i,
|
|
2468
2516
|
iconNode: t,
|
|
2469
|
-
className:
|
|
2517
|
+
className: Di(`lucide-${Oi(Ai(e))}`, `lucide-${e}`, n),
|
|
2470
2518
|
...r
|
|
2471
2519
|
}));
|
|
2472
|
-
return n.displayName =
|
|
2473
|
-
},
|
|
2520
|
+
return n.displayName = Ai(e), n;
|
|
2521
|
+
}, Li = Ii("check", [["path", {
|
|
2474
2522
|
d: "M20 6 9 17l-5-5",
|
|
2475
2523
|
key: "1gmf2c"
|
|
2476
|
-
}]]),
|
|
2524
|
+
}]]), Ri = Ii("minus", [["path", {
|
|
2477
2525
|
d: "M5 12h14",
|
|
2478
2526
|
key: "1ays0h"
|
|
2479
|
-
}]]),
|
|
2527
|
+
}]]), zi = Ii("plus", [["path", {
|
|
2480
2528
|
d: "M5 12h14",
|
|
2481
2529
|
key: "1ays0h"
|
|
2482
2530
|
}], ["path", {
|
|
2483
2531
|
d: "M12 5v14",
|
|
2484
2532
|
key: "s699le"
|
|
2485
|
-
}]]),
|
|
2533
|
+
}]]), Bi = [.../* @__PURE__ */ "joker.jokers.commonJoker.commonJokers.uncommonJoker.uncommonJokers.rareJoker.rareJokers.legendaryJoker.legendaryJokers.voucher.vouchers.tarotCard.tarotCards.spectralCard.spectralCards.planetCard.boss.tag.smallBlindTag.bigBlindTag.standardCard.standardCards.erraticRank.erraticSuit.erraticCard.startingDraw.event.luckyMoney.luckyMult.misprintMult.wheelOfFortune.cavendishExtinct.grosMichelExtinct.spaceLevelup.businessPayout.bloodstoneTrigger.parkingPayout.glassDestroy.wheelStaysFlipped.and.or.clauses".split(".")], Vi = [
|
|
2486
2534
|
"antes",
|
|
2487
2535
|
"tags",
|
|
2488
2536
|
"labels"
|
|
2489
|
-
],
|
|
2537
|
+
], Hi = [
|
|
2490
2538
|
"must",
|
|
2491
2539
|
"should",
|
|
2492
2540
|
"mustNot",
|
|
2493
2541
|
"any",
|
|
2494
2542
|
"Any",
|
|
2495
|
-
...
|
|
2496
|
-
...
|
|
2497
|
-
],
|
|
2543
|
+
...Bi,
|
|
2544
|
+
...Vi
|
|
2545
|
+
], Ui = class {
|
|
2498
2546
|
static getCompletions(e) {
|
|
2499
2547
|
let t = e.toLowerCase();
|
|
2500
|
-
return
|
|
2548
|
+
return Hi.filter((e) => e.toLowerCase().includes(t)).map((e) => ({
|
|
2501
2549
|
text: e,
|
|
2502
2550
|
displayText: e,
|
|
2503
2551
|
type: "keyword"
|
|
@@ -2515,14 +2563,14 @@ var Ti = {
|
|
|
2515
2563
|
gold: "#efb82d",
|
|
2516
2564
|
editorBg: "#0f1416",
|
|
2517
2565
|
editorBgAlt: "#1c2629"
|
|
2518
|
-
},
|
|
2566
|
+
}, Wi = "# My JAML Filter\nname: My Filter\ndeck: Red\nstake: White\n\nmust:\n - joker: Blueprint\n edition: Negative\n antes: [1, 2, 3]\n\nshould:\n - soulJoker: Any\n score: 5\n", Gi = [
|
|
2519
2567
|
"name",
|
|
2520
2568
|
"author",
|
|
2521
2569
|
"description",
|
|
2522
2570
|
"deck",
|
|
2523
2571
|
"stake",
|
|
2524
2572
|
"label"
|
|
2525
|
-
],
|
|
2573
|
+
], Ki = [
|
|
2526
2574
|
"joker",
|
|
2527
2575
|
"soulJoker",
|
|
2528
2576
|
"voucher",
|
|
@@ -2534,23 +2582,23 @@ var Ti = {
|
|
|
2534
2582
|
"boss",
|
|
2535
2583
|
"event"
|
|
2536
2584
|
];
|
|
2537
|
-
function
|
|
2538
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
2585
|
+
function qi({ suggestions: e, selectedIndex: t, onSelect: n, onHover: r }) {
|
|
2586
|
+
return e.length === 0 ? /* @__PURE__ */ v("div", {
|
|
2539
2587
|
className: "p-2 text-xs text-white/40 italic",
|
|
2540
2588
|
children: "No suggestions..."
|
|
2541
|
-
}) : /* @__PURE__ */
|
|
2589
|
+
}) : /* @__PURE__ */ v("div", {
|
|
2542
2590
|
className: "flex flex-col max-h-[200px] overflow-y-auto",
|
|
2543
2591
|
onMouseDown: (e) => e.preventDefault(),
|
|
2544
2592
|
children: e.map((e, i) => {
|
|
2545
2593
|
let a = i === t;
|
|
2546
|
-
return /* @__PURE__ */
|
|
2594
|
+
return /* @__PURE__ */ y("div", {
|
|
2547
2595
|
onClick: () => n(e.text),
|
|
2548
2596
|
onMouseEnter: () => r(i),
|
|
2549
2597
|
className: `
|
|
2550
2598
|
flex items-center justify-between px-3 py-1.5 cursor-pointer font-mono text-[13px] transition-colors
|
|
2551
2599
|
${a ? "bg-[var(--balatro-gold)] text-black" : "text-white hover:bg-white/10"}
|
|
2552
2600
|
`,
|
|
2553
|
-
children: [/* @__PURE__ */
|
|
2601
|
+
children: [/* @__PURE__ */ v("span", { children: e.displayText }), a && /* @__PURE__ */ v("span", {
|
|
2554
2602
|
className: "opacity-50 text-[11px] ml-2",
|
|
2555
2603
|
children: "↵"
|
|
2556
2604
|
})]
|
|
@@ -2558,13 +2606,13 @@ function Ki({ suggestions: e, selectedIndex: t, onSelect: n, onHover: r }) {
|
|
|
2558
2606
|
})
|
|
2559
2607
|
});
|
|
2560
2608
|
}
|
|
2561
|
-
function
|
|
2562
|
-
let [r, i] =
|
|
2563
|
-
return r ? /* @__PURE__ */
|
|
2609
|
+
function Ji({ values: e, onToggle: t, color: n }) {
|
|
2610
|
+
let [r, i] = g(!1), a = new Set(e.map((e) => parseInt(e, 10)).filter((e) => !isNaN(e)));
|
|
2611
|
+
return r ? /* @__PURE__ */ y("div", {
|
|
2564
2612
|
className: "flex flex-row items-center",
|
|
2565
2613
|
children: [Array.from({ length: 9 }, (e, t) => t).map((e) => {
|
|
2566
2614
|
let r = a.has(e);
|
|
2567
|
-
return /* @__PURE__ */
|
|
2615
|
+
return /* @__PURE__ */ v("div", {
|
|
2568
2616
|
onClick: (n) => {
|
|
2569
2617
|
n.stopPropagation(), t(e.toString());
|
|
2570
2618
|
},
|
|
@@ -2578,15 +2626,15 @@ function qi({ values: e, onToggle: t, color: n }) {
|
|
|
2578
2626
|
},
|
|
2579
2627
|
children: e
|
|
2580
2628
|
}, e);
|
|
2581
|
-
}), /* @__PURE__ */
|
|
2629
|
+
}), /* @__PURE__ */ v("div", {
|
|
2582
2630
|
onClick: () => i(!1),
|
|
2583
2631
|
className: "jaml-block jaml-antes-confirm",
|
|
2584
|
-
children: /* @__PURE__ */
|
|
2632
|
+
children: /* @__PURE__ */ v(Li, {
|
|
2585
2633
|
size: 16,
|
|
2586
2634
|
strokeWidth: 3
|
|
2587
2635
|
})
|
|
2588
2636
|
})]
|
|
2589
|
-
}) : /* @__PURE__ */
|
|
2637
|
+
}) : /* @__PURE__ */ v("div", {
|
|
2590
2638
|
onClick: () => i(!0),
|
|
2591
2639
|
className: "jaml-block",
|
|
2592
2640
|
style: {
|
|
@@ -2605,9 +2653,9 @@ function qi({ values: e, onToggle: t, color: n }) {
|
|
|
2605
2653
|
})()
|
|
2606
2654
|
});
|
|
2607
2655
|
}
|
|
2608
|
-
function
|
|
2609
|
-
let [n, r] =
|
|
2610
|
-
return
|
|
2656
|
+
function Yi(e, t) {
|
|
2657
|
+
let [n, r] = g(null);
|
|
2658
|
+
return f(() => {
|
|
2611
2659
|
if (!t || !e.current) {
|
|
2612
2660
|
r(null);
|
|
2613
2661
|
return;
|
|
@@ -2626,8 +2674,8 @@ function Ji(e, t) {
|
|
|
2626
2674
|
};
|
|
2627
2675
|
}, [t, e]), n;
|
|
2628
2676
|
}
|
|
2629
|
-
function
|
|
2630
|
-
let [r, i] =
|
|
2677
|
+
function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
2678
|
+
let [r, i] = g([]), [a, o] = g(null), [s, c] = g(null), [l, d] = g(null), f = h(null), p = u((e) => {
|
|
2631
2679
|
let t = e.split("\n"), n;
|
|
2632
2680
|
return t.map((e, t) => {
|
|
2633
2681
|
let r = e.search(/\S|$/), i = e.trim(), a = i.startsWith("#"), o = i.startsWith("- "), s, c, l = !1, u;
|
|
@@ -2635,9 +2683,9 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2635
2683
|
let e = i.indexOf(":"), t = i.slice(o ? 2 : 0, e).trim(), n = i.slice(e + 1).trim();
|
|
2636
2684
|
s = t, c = n || void 0, c && c.startsWith("[") && c.endsWith("]") && (l = !0, u = c.slice(1, -1).split(",").map((e) => e.trim()).filter((e) => e));
|
|
2637
2685
|
}
|
|
2638
|
-
r === 0 && !o && (n = void 0), o && s &&
|
|
2686
|
+
r === 0 && !o && (n = void 0), o && s && Ki.includes(s) && (n = s);
|
|
2639
2687
|
let d = "complete", f = !1;
|
|
2640
|
-
return s && (
|
|
2688
|
+
return s && (Gi.includes(s) ? d = "metadata" : Ki.includes(s) ? d = c ? "complete" : "required-incomplete" : !c && s !== "must" && s !== "should" && s !== "mustNot" && (d = "optional-incomplete"), c && c.startsWith("~") && c.endsWith("~") && (f = !0, d = "invalid")), {
|
|
2641
2689
|
id: `line-${t}`,
|
|
2642
2690
|
raw: e,
|
|
2643
2691
|
indent: r,
|
|
@@ -2653,13 +2701,13 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2653
2701
|
arrayValues: u
|
|
2654
2702
|
};
|
|
2655
2703
|
});
|
|
2656
|
-
}, []),
|
|
2657
|
-
if (e !==
|
|
2658
|
-
|
|
2659
|
-
let t = e ||
|
|
2660
|
-
(r.length === 0 ||
|
|
2704
|
+
}, []), _ = u((e) => e.map((e) => e.raw).join("\n"), []), [b, x] = g(e);
|
|
2705
|
+
if (e !== b) {
|
|
2706
|
+
x(e);
|
|
2707
|
+
let t = e || Wi;
|
|
2708
|
+
(r.length === 0 || _(r) !== t) && i(p(t));
|
|
2661
2709
|
}
|
|
2662
|
-
let S =
|
|
2710
|
+
let S = u((e, n, a) => {
|
|
2663
2711
|
let o = r.map((t) => {
|
|
2664
2712
|
if (t.id !== e) return t;
|
|
2665
2713
|
let r = " ".repeat(t.indent), i = t.isArrayItem ? "- " : "", o = t.raw;
|
|
@@ -2674,17 +2722,17 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2674
2722
|
};
|
|
2675
2723
|
});
|
|
2676
2724
|
i(o);
|
|
2677
|
-
let s =
|
|
2725
|
+
let s = _(o);
|
|
2678
2726
|
if (t) try {
|
|
2679
|
-
t(s,
|
|
2727
|
+
t(s, Ei.load(s), !0);
|
|
2680
2728
|
} catch {
|
|
2681
2729
|
t(s, null, !1);
|
|
2682
2730
|
}
|
|
2683
2731
|
}, [
|
|
2684
2732
|
r,
|
|
2685
|
-
|
|
2733
|
+
_,
|
|
2686
2734
|
t
|
|
2687
|
-
]), C =
|
|
2735
|
+
]), C = u((e, n, a) => {
|
|
2688
2736
|
let o = r.map((t) => {
|
|
2689
2737
|
if (t.id !== e || !t.arrayValues) return t;
|
|
2690
2738
|
let r = [...t.arrayValues];
|
|
@@ -2698,17 +2746,17 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2698
2746
|
};
|
|
2699
2747
|
});
|
|
2700
2748
|
i(o);
|
|
2701
|
-
let s =
|
|
2749
|
+
let s = _(o);
|
|
2702
2750
|
if (t) try {
|
|
2703
|
-
t(s,
|
|
2751
|
+
t(s, Ei.load(s), !0);
|
|
2704
2752
|
} catch {
|
|
2705
2753
|
t(s, null, !1);
|
|
2706
2754
|
}
|
|
2707
2755
|
}, [
|
|
2708
2756
|
r,
|
|
2709
|
-
|
|
2757
|
+
_,
|
|
2710
2758
|
t
|
|
2711
|
-
]), w =
|
|
2759
|
+
]), w = u((e, n) => {
|
|
2712
2760
|
let a = r.map((t) => {
|
|
2713
2761
|
if (t.id !== e) return t;
|
|
2714
2762
|
let r = [...t.arrayValues || [], n], i = `[${r.join(", ")}]`, a = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
|
|
@@ -2721,17 +2769,17 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2721
2769
|
};
|
|
2722
2770
|
});
|
|
2723
2771
|
i(a);
|
|
2724
|
-
let o =
|
|
2772
|
+
let o = _(a);
|
|
2725
2773
|
if (t) try {
|
|
2726
|
-
t(o,
|
|
2774
|
+
t(o, Ei.load(o), !0);
|
|
2727
2775
|
} catch {
|
|
2728
2776
|
t(o, null, !1);
|
|
2729
2777
|
}
|
|
2730
2778
|
}, [
|
|
2731
2779
|
r,
|
|
2732
|
-
|
|
2780
|
+
_,
|
|
2733
2781
|
t
|
|
2734
|
-
]), T =
|
|
2782
|
+
]), T = u((e, n) => {
|
|
2735
2783
|
let a = r.map((t) => {
|
|
2736
2784
|
if (t.id !== e || !t.arrayValues) return t;
|
|
2737
2785
|
let r = t.arrayValues.filter((e, t) => t !== n), i = r.length > 0 ? `[${r.join(", ")}]` : "", a = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
|
|
@@ -2744,55 +2792,55 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2744
2792
|
};
|
|
2745
2793
|
});
|
|
2746
2794
|
i(a);
|
|
2747
|
-
let o =
|
|
2795
|
+
let o = _(a);
|
|
2748
2796
|
if (t) try {
|
|
2749
|
-
t(o,
|
|
2797
|
+
t(o, Ei.load(o), !0);
|
|
2750
2798
|
} catch {
|
|
2751
2799
|
t(o, null, !1);
|
|
2752
2800
|
}
|
|
2753
2801
|
}, [
|
|
2754
2802
|
r,
|
|
2755
|
-
|
|
2803
|
+
_,
|
|
2756
2804
|
t
|
|
2757
|
-
]), E =
|
|
2805
|
+
]), E = u((e) => {
|
|
2758
2806
|
let n = r.filter((t) => t.id !== e).map((e, t) => ({
|
|
2759
2807
|
...e,
|
|
2760
2808
|
lineNumber: t,
|
|
2761
2809
|
id: `line-${t}`
|
|
2762
2810
|
}));
|
|
2763
2811
|
i(n);
|
|
2764
|
-
let a =
|
|
2812
|
+
let a = _(n);
|
|
2765
2813
|
if (t) try {
|
|
2766
|
-
t(a,
|
|
2814
|
+
t(a, Ei.load(a), !0);
|
|
2767
2815
|
} catch {
|
|
2768
2816
|
t(a, null, !1);
|
|
2769
2817
|
}
|
|
2770
2818
|
}, [
|
|
2771
2819
|
r,
|
|
2772
|
-
|
|
2820
|
+
_,
|
|
2773
2821
|
t
|
|
2774
|
-
]), D =
|
|
2822
|
+
]), D = m(() => {
|
|
2775
2823
|
let e = {};
|
|
2776
2824
|
for (let t of r) t.key && (e[t.indent] = Math.min(Math.max(e[t.indent] || 0, t.key.length), 12));
|
|
2777
2825
|
return e;
|
|
2778
2826
|
}, [r]);
|
|
2779
|
-
return /* @__PURE__ */
|
|
2780
|
-
ref:
|
|
2827
|
+
return /* @__PURE__ */ y("div", {
|
|
2828
|
+
ref: f,
|
|
2781
2829
|
className: `flex flex-col bg-[#0f1416] text-white font-mono text-[13px] leading-[1.8] outline-none rounded-md p-4 overflow-auto min-h-[500px] border border-white/5 ${n}`,
|
|
2782
2830
|
tabIndex: 0,
|
|
2783
|
-
children: [/* @__PURE__ */
|
|
2831
|
+
children: [/* @__PURE__ */ v("div", {
|
|
2784
2832
|
className: "flex flex-col gap-0.5",
|
|
2785
|
-
children: r.map((e) => /* @__PURE__ */
|
|
2833
|
+
children: r.map((e) => /* @__PURE__ */ v(Zi, {
|
|
2786
2834
|
line: e,
|
|
2787
2835
|
keyWidth: D[e.indent] || 8,
|
|
2788
2836
|
isEditing: a === e.id,
|
|
2789
2837
|
editingPart: a === e.id ? s : null,
|
|
2790
2838
|
editingArrayIndex: a === e.id ? l : null,
|
|
2791
2839
|
onStartEdit: (t, n) => {
|
|
2792
|
-
o(e.id), c(t),
|
|
2840
|
+
o(e.id), c(t), d(n ?? null);
|
|
2793
2841
|
},
|
|
2794
2842
|
onEndEdit: () => {
|
|
2795
|
-
o(null), c(null),
|
|
2843
|
+
o(null), c(null), d(null);
|
|
2796
2844
|
},
|
|
2797
2845
|
onChange: (t, n) => S(e.id, t, n),
|
|
2798
2846
|
onArrayItemChange: (t, n) => C(e.id, t, n),
|
|
@@ -2800,26 +2848,26 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2800
2848
|
onArrayItemRemove: (t) => T(e.id, t),
|
|
2801
2849
|
onDelete: () => E(e.id)
|
|
2802
2850
|
}, e.id))
|
|
2803
|
-
}), /* @__PURE__ */
|
|
2851
|
+
}), /* @__PURE__ */ y("div", {
|
|
2804
2852
|
className: "mt-4 p-2 bg-black/40 rounded border border-white/5 flex flex-wrap gap-4 text-[12px] text-white/50 font-mono",
|
|
2805
2853
|
children: [
|
|
2806
|
-
/* @__PURE__ */
|
|
2854
|
+
/* @__PURE__ */ y("span", {
|
|
2807
2855
|
className: "flex items-center gap-1.5",
|
|
2808
|
-
children: [/* @__PURE__ */
|
|
2856
|
+
children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--red" }), " required"]
|
|
2809
2857
|
}),
|
|
2810
|
-
/* @__PURE__ */
|
|
2858
|
+
/* @__PURE__ */ y("span", {
|
|
2811
2859
|
className: "flex items-center gap-1.5",
|
|
2812
|
-
children: [/* @__PURE__ */
|
|
2860
|
+
children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--blue" }), " optional"]
|
|
2813
2861
|
}),
|
|
2814
|
-
/* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ y("span", {
|
|
2815
2863
|
className: "flex items-center gap-1.5",
|
|
2816
|
-
children: [/* @__PURE__ */
|
|
2864
|
+
children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--green" }), " complete"]
|
|
2817
2865
|
}),
|
|
2818
|
-
/* @__PURE__ */
|
|
2866
|
+
/* @__PURE__ */ y("span", {
|
|
2819
2867
|
className: "flex items-center gap-1.5",
|
|
2820
|
-
children: [/* @__PURE__ */
|
|
2868
|
+
children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--purple" }), " metadata"]
|
|
2821
2869
|
}),
|
|
2822
|
-
/* @__PURE__ */
|
|
2870
|
+
/* @__PURE__ */ v("span", {
|
|
2823
2871
|
className: "ml-auto opacity-40",
|
|
2824
2872
|
children: "Click to edit • Tab to navigate"
|
|
2825
2873
|
})
|
|
@@ -2827,8 +2875,8 @@ function Yi({ initialJaml: e, onJamlChange: t, className: n }) {
|
|
|
2827
2875
|
})]
|
|
2828
2876
|
});
|
|
2829
2877
|
}
|
|
2830
|
-
function
|
|
2831
|
-
let [
|
|
2878
|
+
function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIndex: i, onStartEdit: a, onEndEdit: o, onChange: s, onArrayItemChange: c, onArrayItemAdd: l, onArrayItemRemove: u, onDelete: d }) {
|
|
2879
|
+
let [p, _] = g(0), [b, x] = g(""), [C, w] = g(""), [T, E] = g({
|
|
2832
2880
|
isEditing: n,
|
|
2833
2881
|
editingPart: r,
|
|
2834
2882
|
editingArrayIndex: i,
|
|
@@ -2839,16 +2887,16 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2839
2887
|
editingPart: r,
|
|
2840
2888
|
editingArrayIndex: i,
|
|
2841
2889
|
lineRaw: e.raw
|
|
2842
|
-
}), n &&
|
|
2843
|
-
let D =
|
|
2890
|
+
}), n && x(r === "key" ? e.key || "" : r === "value" ? (e.value || "").replace(/^~|~$/g, "") : r === "arrayItem" && i !== null && e.arrayValues?.[i] || ""));
|
|
2891
|
+
let D = m(() => !n || !r ? "" : r === "value" && e.key ? `${e.key}: ${b}` : r === "key" ? b : e.raw, [
|
|
2844
2892
|
n,
|
|
2845
2893
|
r,
|
|
2846
|
-
|
|
2894
|
+
b,
|
|
2847
2895
|
e.raw,
|
|
2848
2896
|
e.key
|
|
2849
|
-
]), O =
|
|
2850
|
-
D !==
|
|
2851
|
-
let k =
|
|
2897
|
+
]), O = m(() => D ? Ui.getCompletions(D).slice(0, 10) : [], [D]);
|
|
2898
|
+
D !== C && (w(D), _(0));
|
|
2899
|
+
let k = h(null), A = h(null), j = Yi(A, n && O.length > 0), M = () => {
|
|
2852
2900
|
switch (e.validationState) {
|
|
2853
2901
|
case "required-incomplete": return $.red;
|
|
2854
2902
|
case "optional-incomplete": return $.blue;
|
|
@@ -2867,22 +2915,22 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2867
2915
|
default: return "#FFF";
|
|
2868
2916
|
}
|
|
2869
2917
|
};
|
|
2870
|
-
|
|
2918
|
+
f(() => {
|
|
2871
2919
|
n && k.current && k.current.focus();
|
|
2872
2920
|
}, [n]);
|
|
2873
2921
|
let te = (t) => {
|
|
2874
2922
|
if (t.key === "Enter") {
|
|
2875
2923
|
t.preventDefault();
|
|
2876
|
-
let n = O.length > 0 &&
|
|
2924
|
+
let n = O.length > 0 && p >= 0 ? O[p].text : b;
|
|
2877
2925
|
r === "key" ? s("key", n) : r === "value" ? s("value", n) : r === "arrayItem" && (i >= (e.arrayValues?.length || 0) ? l(n) : c(i, n)), o();
|
|
2878
|
-
} else t.key === "ArrowDown" ? (t.preventDefault(),
|
|
2926
|
+
} else t.key === "ArrowDown" ? (t.preventDefault(), _(Math.min(p + 1, O.length - 1))) : t.key === "ArrowUp" ? (t.preventDefault(), _(Math.max(p - 1, 0))) : t.key === "Escape" ? o() : t.key === "Backspace" && b === "" && r === "arrayItem" && (u(i), o());
|
|
2879
2927
|
};
|
|
2880
|
-
if (e.isComment) return /* @__PURE__ */
|
|
2928
|
+
if (e.isComment) return /* @__PURE__ */ v("div", {
|
|
2881
2929
|
className: "pl-8 text-stone-400 italic text-xs py-0.5",
|
|
2882
2930
|
children: e.raw
|
|
2883
2931
|
});
|
|
2884
|
-
if (!e.key && !e.raw.trim()) return /* @__PURE__ */
|
|
2885
|
-
if ((e.key === "must" || e.key === "should" || e.key === "mustNot") && !e.value) return /* @__PURE__ */
|
|
2932
|
+
if (!e.key && !e.raw.trim()) return /* @__PURE__ */ v("div", { className: "h-5" });
|
|
2933
|
+
if ((e.key === "must" || e.key === "should" || e.key === "mustNot") && !e.value) return /* @__PURE__ */ v("div", {
|
|
2886
2934
|
className: "jaml-clause-header pl-8 py-1 text-[16px] border-b border-white/10 mt-4 mb-2 tracking-widest",
|
|
2887
2935
|
style: { "--jaml-color": e.key === "must" ? $.red : $.blue },
|
|
2888
2936
|
children: e.raw
|
|
@@ -2892,26 +2940,26 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2892
2940
|
"--popover-left": `${j.left}px`,
|
|
2893
2941
|
"--popover-transform": j.position === "top" ? "translateY(-100%)" : "none"
|
|
2894
2942
|
} : {};
|
|
2895
|
-
return /* @__PURE__ */
|
|
2943
|
+
return /* @__PURE__ */ y("div", {
|
|
2896
2944
|
className: "relative flex items-center py-0.5 group",
|
|
2897
2945
|
children: [
|
|
2898
|
-
/* @__PURE__ */
|
|
2946
|
+
/* @__PURE__ */ v("div", {
|
|
2899
2947
|
className: "w-6 h-full flex items-center justify-center cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2900
2948
|
onClick: (e) => {
|
|
2901
2949
|
e.stopPropagation(), d();
|
|
2902
2950
|
},
|
|
2903
|
-
children: /* @__PURE__ */
|
|
2951
|
+
children: /* @__PURE__ */ v(Ri, {
|
|
2904
2952
|
size: 12,
|
|
2905
2953
|
className: "text-orange-500 hover:bg-orange-100 rounded"
|
|
2906
2954
|
})
|
|
2907
2955
|
}),
|
|
2908
|
-
/* @__PURE__ */
|
|
2956
|
+
/* @__PURE__ */ y("span", {
|
|
2909
2957
|
className: "whitespace-pre text-stone-400",
|
|
2910
2958
|
children: [ne, re]
|
|
2911
2959
|
}),
|
|
2912
|
-
e.key && /* @__PURE__ */
|
|
2960
|
+
e.key && /* @__PURE__ */ y("div", {
|
|
2913
2961
|
className: "relative",
|
|
2914
|
-
children: [/* @__PURE__ */
|
|
2962
|
+
children: [/* @__PURE__ */ v("div", {
|
|
2915
2963
|
ref: r === "key" ? A : null,
|
|
2916
2964
|
onClick: (e) => {
|
|
2917
2965
|
e.stopPropagation(), a("key");
|
|
@@ -2922,43 +2970,43 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2922
2970
|
"--jaml-color": n && r === "key" ? ee() : M(),
|
|
2923
2971
|
"--jaml-bg": n && r === "key" ? `${ee()}15` : "transparent"
|
|
2924
2972
|
},
|
|
2925
|
-
children: n && r === "key" ? /* @__PURE__ */
|
|
2973
|
+
children: n && r === "key" ? /* @__PURE__ */ v("input", {
|
|
2926
2974
|
ref: k,
|
|
2927
2975
|
title: "Edit key",
|
|
2928
|
-
value:
|
|
2929
|
-
onChange: (e) =>
|
|
2976
|
+
value: b,
|
|
2977
|
+
onChange: (e) => x(e.target.value),
|
|
2930
2978
|
onKeyDown: te,
|
|
2931
2979
|
onBlur: () => setTimeout(o, 200),
|
|
2932
2980
|
className: "jaml-inline-input",
|
|
2933
2981
|
style: { "--jaml-color": ee() }
|
|
2934
2982
|
}) : e.key
|
|
2935
|
-
}), n && r === "key" && O.length > 0 && j &&
|
|
2983
|
+
}), n && r === "key" && O.length > 0 && j && S(/* @__PURE__ */ v("div", {
|
|
2936
2984
|
className: "jaml-suggestion-popover",
|
|
2937
2985
|
style: ie,
|
|
2938
|
-
children: /* @__PURE__ */
|
|
2986
|
+
children: /* @__PURE__ */ v(qi, {
|
|
2939
2987
|
suggestions: O,
|
|
2940
|
-
selectedIndex:
|
|
2941
|
-
onHover:
|
|
2988
|
+
selectedIndex: p,
|
|
2989
|
+
onHover: _,
|
|
2942
2990
|
onSelect: (e) => {
|
|
2943
2991
|
s("key", e), o();
|
|
2944
2992
|
}
|
|
2945
2993
|
})
|
|
2946
2994
|
}), document.body)]
|
|
2947
2995
|
}),
|
|
2948
|
-
e.key && /* @__PURE__ */
|
|
2996
|
+
e.key && /* @__PURE__ */ v("span", {
|
|
2949
2997
|
className: "text-stone-400 mr-1",
|
|
2950
2998
|
children: ":"
|
|
2951
2999
|
}),
|
|
2952
|
-
e.key && (e.isArrayValue && e.arrayValues ? e.key === "antes" ? /* @__PURE__ */
|
|
3000
|
+
e.key && (e.isArrayValue && e.arrayValues ? e.key === "antes" ? /* @__PURE__ */ v(Ji, {
|
|
2953
3001
|
values: e.arrayValues,
|
|
2954
3002
|
onToggle: (t) => {
|
|
2955
3003
|
let n = e.arrayValues.indexOf(t);
|
|
2956
3004
|
n >= 0 ? u(n) : l(t);
|
|
2957
3005
|
},
|
|
2958
3006
|
color: ee()
|
|
2959
|
-
}) : /* @__PURE__ */
|
|
3007
|
+
}) : /* @__PURE__ */ y("div", {
|
|
2960
3008
|
className: "flex gap-0.5 items-center",
|
|
2961
|
-
children: [e.arrayValues.map((e, t) => /* @__PURE__ */
|
|
3009
|
+
children: [e.arrayValues.map((e, t) => /* @__PURE__ */ v("div", {
|
|
2962
3010
|
onClick: (e) => {
|
|
2963
3011
|
e.stopPropagation(), a("arrayItem", t);
|
|
2964
3012
|
},
|
|
@@ -2969,16 +3017,16 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2969
3017
|
"--jaml-border": `1px solid ${M()}40`,
|
|
2970
3018
|
"--jaml-color": M()
|
|
2971
3019
|
},
|
|
2972
|
-
children: n && r === "arrayItem" && i === t ? /* @__PURE__ */
|
|
3020
|
+
children: n && r === "arrayItem" && i === t ? /* @__PURE__ */ v("input", {
|
|
2973
3021
|
ref: k,
|
|
2974
3022
|
title: "Edit array item",
|
|
2975
|
-
value:
|
|
2976
|
-
onChange: (e) =>
|
|
3023
|
+
value: b,
|
|
3024
|
+
onChange: (e) => x(e.target.value),
|
|
2977
3025
|
onKeyDown: te,
|
|
2978
3026
|
onBlur: () => setTimeout(o, 200),
|
|
2979
3027
|
className: "bg-transparent w-[3ch] text-center outline-none"
|
|
2980
3028
|
}) : e
|
|
2981
|
-
}, t)), /* @__PURE__ */
|
|
3029
|
+
}, t)), /* @__PURE__ */ v("div", {
|
|
2982
3030
|
onClick: (t) => {
|
|
2983
3031
|
t.stopPropagation(), a("arrayItem", e.arrayValues.length);
|
|
2984
3032
|
},
|
|
@@ -2989,11 +3037,11 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
2989
3037
|
"--jaml-border": `1px solid ${$.green}40`,
|
|
2990
3038
|
"--jaml-color": $.green
|
|
2991
3039
|
},
|
|
2992
|
-
children: /* @__PURE__ */
|
|
3040
|
+
children: /* @__PURE__ */ v(zi, { size: 12 })
|
|
2993
3041
|
})]
|
|
2994
|
-
}) : /* @__PURE__ */
|
|
3042
|
+
}) : /* @__PURE__ */ y("div", {
|
|
2995
3043
|
className: "relative",
|
|
2996
|
-
children: [/* @__PURE__ */
|
|
3044
|
+
children: [/* @__PURE__ */ v("div", {
|
|
2997
3045
|
ref: r === "value" ? A : null,
|
|
2998
3046
|
onClick: (e) => {
|
|
2999
3047
|
e.stopPropagation(), a("value");
|
|
@@ -3006,26 +3054,26 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
3006
3054
|
"--jaml-border": `1px solid ${e.isInvalidValue ? `${$.red}60` : e.value ? `${M()}40` : `${$.red}40`}`,
|
|
3007
3055
|
"--jaml-text-decoration": e.isInvalidValue ? "line-through" : "none"
|
|
3008
3056
|
},
|
|
3009
|
-
children: n && r === "value" ? /* @__PURE__ */
|
|
3057
|
+
children: n && r === "value" ? /* @__PURE__ */ v("input", {
|
|
3010
3058
|
ref: k,
|
|
3011
3059
|
title: "Edit value",
|
|
3012
|
-
value:
|
|
3013
|
-
onChange: (e) =>
|
|
3060
|
+
value: b,
|
|
3061
|
+
onChange: (e) => x(e.target.value),
|
|
3014
3062
|
onKeyDown: te,
|
|
3015
3063
|
onBlur: () => setTimeout(o, 200),
|
|
3016
3064
|
className: "jaml-inline-input jaml-inline-input--sized",
|
|
3017
3065
|
style: {
|
|
3018
3066
|
"--jaml-color": M(),
|
|
3019
|
-
"--jaml-input-w": `${Math.max(
|
|
3067
|
+
"--jaml-input-w": `${Math.max(b.length, 4)}ch`
|
|
3020
3068
|
}
|
|
3021
3069
|
}) : e.isInvalidValue ? e.value?.replace(/~/g, "") : e.value || "???"
|
|
3022
|
-
}), n && r === "value" && O.length > 0 && j &&
|
|
3070
|
+
}), n && r === "value" && O.length > 0 && j && S(/* @__PURE__ */ v("div", {
|
|
3023
3071
|
className: "jaml-suggestion-popover",
|
|
3024
3072
|
style: ie,
|
|
3025
|
-
children: /* @__PURE__ */
|
|
3073
|
+
children: /* @__PURE__ */ v(qi, {
|
|
3026
3074
|
suggestions: O,
|
|
3027
|
-
selectedIndex:
|
|
3028
|
-
onHover:
|
|
3075
|
+
selectedIndex: p,
|
|
3076
|
+
onHover: _,
|
|
3029
3077
|
onSelect: (e) => {
|
|
3030
3078
|
s("value", e), o();
|
|
3031
3079
|
}
|
|
@@ -3037,60 +3085,60 @@ function Xi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
|
|
|
3037
3085
|
}
|
|
3038
3086
|
//#endregion
|
|
3039
3087
|
//#region src/ui/JimboInputModal.tsx
|
|
3040
|
-
function
|
|
3041
|
-
let [u, d] =
|
|
3042
|
-
e !==
|
|
3088
|
+
function Qi({ open: e, title: t, message: n, placeholder: r, initialValue: i = "", confirmLabel: a = "Confirm", cancelLabel: o = "Cancel", validate: s, onConfirm: c, onCancel: l }) {
|
|
3089
|
+
let [u, d] = g(i), [p, m] = g(null), _ = h(null), [b, x] = g(e);
|
|
3090
|
+
e !== b && (x(e), e && (d(i), m(null))), f(() => {
|
|
3043
3091
|
if (e) {
|
|
3044
|
-
let e = setTimeout(() =>
|
|
3092
|
+
let e = setTimeout(() => _.current?.focus(), 30);
|
|
3045
3093
|
return () => clearTimeout(e);
|
|
3046
3094
|
}
|
|
3047
3095
|
}, [e]);
|
|
3048
3096
|
function S() {
|
|
3049
3097
|
let e = s?.(u) ?? null;
|
|
3050
3098
|
if (e) {
|
|
3051
|
-
|
|
3099
|
+
m(e);
|
|
3052
3100
|
return;
|
|
3053
3101
|
}
|
|
3054
3102
|
c(u);
|
|
3055
3103
|
}
|
|
3056
|
-
return /* @__PURE__ */
|
|
3104
|
+
return /* @__PURE__ */ y(de, {
|
|
3057
3105
|
onClose: l,
|
|
3058
3106
|
open: e,
|
|
3059
3107
|
title: t,
|
|
3060
3108
|
children: [
|
|
3061
|
-
n && /* @__PURE__ */
|
|
3109
|
+
n && /* @__PURE__ */ v(N, {
|
|
3062
3110
|
size: "sm",
|
|
3063
3111
|
className: "j-input-modal__message",
|
|
3064
3112
|
tone: "grey",
|
|
3065
3113
|
children: n
|
|
3066
3114
|
}),
|
|
3067
|
-
/* @__PURE__ */
|
|
3068
|
-
invalid: !!
|
|
3115
|
+
/* @__PURE__ */ v(se, {
|
|
3116
|
+
invalid: !!p,
|
|
3069
3117
|
onChange: (e) => {
|
|
3070
|
-
d(e.target.value),
|
|
3118
|
+
d(e.target.value), p && m(null);
|
|
3071
3119
|
},
|
|
3072
3120
|
onKeyDown: (e) => {
|
|
3073
3121
|
e.key === "Enter" && S(), e.key === "Escape" && l();
|
|
3074
3122
|
},
|
|
3075
3123
|
placeholder: r,
|
|
3076
|
-
ref:
|
|
3124
|
+
ref: _,
|
|
3077
3125
|
type: "text",
|
|
3078
3126
|
value: u
|
|
3079
3127
|
}),
|
|
3080
|
-
|
|
3128
|
+
p && /* @__PURE__ */ v(N, {
|
|
3081
3129
|
size: "sm",
|
|
3082
3130
|
className: "j-input-modal__error",
|
|
3083
3131
|
tone: "red",
|
|
3084
|
-
children:
|
|
3132
|
+
children: p
|
|
3085
3133
|
}),
|
|
3086
|
-
/* @__PURE__ */
|
|
3134
|
+
/* @__PURE__ */ y("div", {
|
|
3087
3135
|
className: "j-input-modal__actions",
|
|
3088
|
-
children: [/* @__PURE__ */
|
|
3136
|
+
children: [/* @__PURE__ */ v(P, {
|
|
3089
3137
|
onClick: l,
|
|
3090
3138
|
size: "sm",
|
|
3091
3139
|
tone: "red",
|
|
3092
3140
|
children: o
|
|
3093
|
-
}), /* @__PURE__ */
|
|
3141
|
+
}), /* @__PURE__ */ v(P, {
|
|
3094
3142
|
onClick: S,
|
|
3095
3143
|
size: "sm",
|
|
3096
3144
|
tone: "blue",
|
|
@@ -3102,16 +3150,16 @@ function Zi({ open: e, title: t, message: n, placeholder: r, initialValue: i = "
|
|
|
3102
3150
|
}
|
|
3103
3151
|
//#endregion
|
|
3104
3152
|
//#region src/ui/JimboSelect.tsx
|
|
3105
|
-
function
|
|
3153
|
+
function $i({ value: e, options: t, onChange: n, disabled: r = !1, label: i, "aria-label": a, style: o }) {
|
|
3106
3154
|
let s = (t.length === 0 ? [] : typeof t[0] == "string" ? t.map((e) => ({ value: e })) : t).filter((e) => !e.disabled), c = Math.max(0, s.findIndex((t) => t.value === e)), l = s[c] ?? s[0];
|
|
3107
3155
|
if (!l) return null;
|
|
3108
3156
|
function u(e) {
|
|
3109
3157
|
r || s.length === 0 || n(s[(c + e + s.length) % s.length].value);
|
|
3110
3158
|
}
|
|
3111
|
-
return /* @__PURE__ */
|
|
3159
|
+
return /* @__PURE__ */ v("div", {
|
|
3112
3160
|
style: o,
|
|
3113
3161
|
"aria-label": a,
|
|
3114
|
-
children: /* @__PURE__ */
|
|
3162
|
+
children: /* @__PURE__ */ v(Ce, {
|
|
3115
3163
|
label: i,
|
|
3116
3164
|
value: l.label ?? l.value,
|
|
3117
3165
|
onPrev: () => u(-1),
|
|
@@ -3123,21 +3171,21 @@ function Qi({ value: e, options: t, onChange: n, disabled: r = !1, label: i, "ar
|
|
|
3123
3171
|
}
|
|
3124
3172
|
//#endregion
|
|
3125
3173
|
//#region src/ui/JimboStepper.tsx
|
|
3126
|
-
function
|
|
3174
|
+
function ea({ count: e, index: t, onIndexChange: n, ariaLabel: r = "Page indicator", className: i = "", style: a }) {
|
|
3127
3175
|
if (e <= 1) return null;
|
|
3128
3176
|
let o = !!n;
|
|
3129
|
-
return /* @__PURE__ */
|
|
3177
|
+
return /* @__PURE__ */ v("div", {
|
|
3130
3178
|
className: `j-stepper ${i}`,
|
|
3131
3179
|
role: "tablist",
|
|
3132
3180
|
"aria-label": r,
|
|
3133
3181
|
style: a,
|
|
3134
3182
|
children: Array.from({ length: e }).map((r, i) => {
|
|
3135
|
-
let a = i === t, s = /* @__PURE__ */
|
|
3183
|
+
let a = i === t, s = /* @__PURE__ */ v("span", {
|
|
3136
3184
|
className: "j-stepper__dot",
|
|
3137
3185
|
"data-active": a,
|
|
3138
3186
|
"aria-hidden": !0
|
|
3139
3187
|
});
|
|
3140
|
-
return o ? /* @__PURE__ */
|
|
3188
|
+
return o ? /* @__PURE__ */ v("button", {
|
|
3141
3189
|
type: "button",
|
|
3142
3190
|
className: "j-stepper__hit",
|
|
3143
3191
|
role: "tab",
|
|
@@ -3145,7 +3193,7 @@ function $i({ count: e, index: t, onIndexChange: n, ariaLabel: r = "Page indicat
|
|
|
3145
3193
|
"aria-label": `Page ${i + 1} of ${e}`,
|
|
3146
3194
|
onClick: () => n?.(i),
|
|
3147
3195
|
children: s
|
|
3148
|
-
}, i) : /* @__PURE__ */
|
|
3196
|
+
}, i) : /* @__PURE__ */ v("span", {
|
|
3149
3197
|
role: "tab",
|
|
3150
3198
|
"aria-selected": a,
|
|
3151
3199
|
children: s
|
|
@@ -3155,15 +3203,15 @@ function $i({ count: e, index: t, onIndexChange: n, ariaLabel: r = "Page indicat
|
|
|
3155
3203
|
}
|
|
3156
3204
|
//#endregion
|
|
3157
3205
|
//#region src/ui/JimboValueBadge.tsx
|
|
3158
|
-
function
|
|
3159
|
-
let [l, u] =
|
|
3160
|
-
|
|
3161
|
-
l && (
|
|
3206
|
+
function ta({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, unit: a, readOnly: o = !1, className: s = "", style: c }) {
|
|
3207
|
+
let [l, u] = g(!1), [d, p] = g(String(e)), m = h(null);
|
|
3208
|
+
f(() => {
|
|
3209
|
+
l && (m.current?.focus(), m.current?.select());
|
|
3162
3210
|
}, [l]);
|
|
3163
|
-
function
|
|
3164
|
-
|
|
3211
|
+
function _() {
|
|
3212
|
+
p(String(e)), u(!0);
|
|
3165
3213
|
}
|
|
3166
|
-
function
|
|
3214
|
+
function y() {
|
|
3167
3215
|
let e = Number(d);
|
|
3168
3216
|
if (Number.isFinite(e)) {
|
|
3169
3217
|
let a = Math.min(r, Math.max(n, e)), o = i > 0 ? Math.round(a / i) * i : a;
|
|
@@ -3171,35 +3219,35 @@ function ea({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, unit
|
|
|
3171
3219
|
}
|
|
3172
3220
|
u(!1);
|
|
3173
3221
|
}
|
|
3174
|
-
function
|
|
3175
|
-
|
|
3222
|
+
function b() {
|
|
3223
|
+
p(String(e)), u(!1);
|
|
3176
3224
|
}
|
|
3177
3225
|
let x = !o && !!t, S = a ? `${Math.round(e)}${a}` : String(Math.round(e));
|
|
3178
|
-
return l ? /* @__PURE__ */
|
|
3226
|
+
return l ? /* @__PURE__ */ v("div", {
|
|
3179
3227
|
className: `j-value-badge j-value-badge--editing ${s}`,
|
|
3180
3228
|
style: c,
|
|
3181
|
-
children: /* @__PURE__ */
|
|
3182
|
-
ref:
|
|
3229
|
+
children: /* @__PURE__ */ v("input", {
|
|
3230
|
+
ref: m,
|
|
3183
3231
|
className: "j-value-badge__input",
|
|
3184
3232
|
type: "number",
|
|
3185
3233
|
min: n,
|
|
3186
3234
|
max: r,
|
|
3187
3235
|
step: i,
|
|
3188
3236
|
value: d,
|
|
3189
|
-
onChange: (e) =>
|
|
3190
|
-
onBlur:
|
|
3237
|
+
onChange: (e) => p(e.currentTarget.value),
|
|
3238
|
+
onBlur: y,
|
|
3191
3239
|
onKeyDown: (e) => {
|
|
3192
|
-
e.key === "Enter" ?
|
|
3240
|
+
e.key === "Enter" ? y() : e.key === "Escape" && b();
|
|
3193
3241
|
}
|
|
3194
3242
|
})
|
|
3195
|
-
}) : /* @__PURE__ */
|
|
3243
|
+
}) : /* @__PURE__ */ v("button", {
|
|
3196
3244
|
type: "button",
|
|
3197
3245
|
className: `j-value-badge ${x ? "" : "j-value-badge--static"} ${s}`,
|
|
3198
3246
|
style: c,
|
|
3199
|
-
onClick: x ?
|
|
3247
|
+
onClick: x ? _ : void 0,
|
|
3200
3248
|
disabled: !x,
|
|
3201
3249
|
tabIndex: x ? 0 : -1,
|
|
3202
|
-
children: /* @__PURE__ */
|
|
3250
|
+
children: /* @__PURE__ */ v(N, {
|
|
3203
3251
|
size: "xs",
|
|
3204
3252
|
tone: "white",
|
|
3205
3253
|
children: S
|
|
@@ -3208,30 +3256,30 @@ function ea({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, unit
|
|
|
3208
3256
|
}
|
|
3209
3257
|
//#endregion
|
|
3210
3258
|
//#region src/ui/JimboSlider.tsx
|
|
3211
|
-
function
|
|
3212
|
-
let l = n === t ? 0 : (e - t) / (n - t) * 100, u =
|
|
3213
|
-
return /* @__PURE__ */
|
|
3214
|
-
className: `j-slider-wrap ${
|
|
3215
|
-
children: [i && /* @__PURE__ */
|
|
3259
|
+
function na({ value: e, min: t = 0, max: n = 100, step: r = 1, label: i, onChange: o, className: s = "", id: c }) {
|
|
3260
|
+
let l = n === t ? 0 : (e - t) / (n - t) * 100, u = a.useId(), d = c ?? u;
|
|
3261
|
+
return /* @__PURE__ */ y("div", {
|
|
3262
|
+
className: `j-slider-wrap ${s}`,
|
|
3263
|
+
children: [i && /* @__PURE__ */ v("label", {
|
|
3216
3264
|
htmlFor: d,
|
|
3217
3265
|
className: "j-slider__label",
|
|
3218
|
-
children: /* @__PURE__ */
|
|
3266
|
+
children: /* @__PURE__ */ v(N, {
|
|
3219
3267
|
size: "sm",
|
|
3220
3268
|
tone: "white",
|
|
3221
3269
|
children: i
|
|
3222
3270
|
})
|
|
3223
|
-
}), /* @__PURE__ */
|
|
3271
|
+
}), /* @__PURE__ */ y("div", {
|
|
3224
3272
|
className: "j-slider",
|
|
3225
3273
|
children: [
|
|
3226
|
-
/* @__PURE__ */
|
|
3274
|
+
/* @__PURE__ */ v("div", {
|
|
3227
3275
|
className: "j-slider__track",
|
|
3228
3276
|
"aria-hidden": !0,
|
|
3229
|
-
children: /* @__PURE__ */
|
|
3277
|
+
children: /* @__PURE__ */ v("div", {
|
|
3230
3278
|
className: "j-slider__fill",
|
|
3231
3279
|
style: { width: `${l}%` }
|
|
3232
3280
|
})
|
|
3233
3281
|
}),
|
|
3234
|
-
/* @__PURE__ */
|
|
3282
|
+
/* @__PURE__ */ v("input", {
|
|
3235
3283
|
id: d,
|
|
3236
3284
|
type: "range",
|
|
3237
3285
|
className: "j-slider__input",
|
|
@@ -3239,17 +3287,17 @@ function ta({ value: e, min: t = 0, max: n = 100, step: r = 1, label: i, onChang
|
|
|
3239
3287
|
max: n,
|
|
3240
3288
|
step: r,
|
|
3241
3289
|
value: e,
|
|
3242
|
-
onChange: (e) =>
|
|
3290
|
+
onChange: (e) => o?.(Number(e.currentTarget.value))
|
|
3243
3291
|
}),
|
|
3244
|
-
/* @__PURE__ */
|
|
3292
|
+
/* @__PURE__ */ v("div", {
|
|
3245
3293
|
className: "j-slider__thumb",
|
|
3246
3294
|
style: { left: `${l}%` },
|
|
3247
|
-
children: /* @__PURE__ */
|
|
3295
|
+
children: /* @__PURE__ */ v(ta, {
|
|
3248
3296
|
value: e,
|
|
3249
3297
|
min: t,
|
|
3250
3298
|
max: n,
|
|
3251
3299
|
step: r,
|
|
3252
|
-
onChange:
|
|
3300
|
+
onChange: o
|
|
3253
3301
|
})
|
|
3254
3302
|
})
|
|
3255
3303
|
]
|
|
@@ -3258,19 +3306,19 @@ function ta({ value: e, min: t = 0, max: n = 100, step: r = 1, label: i, onChang
|
|
|
3258
3306
|
}
|
|
3259
3307
|
//#endregion
|
|
3260
3308
|
//#region src/ui/JimboDualChip.tsx
|
|
3261
|
-
function
|
|
3262
|
-
return /* @__PURE__ */
|
|
3309
|
+
function ra({ left: e, right: t, className: n = "" }) {
|
|
3310
|
+
return /* @__PURE__ */ y("div", {
|
|
3263
3311
|
className: `j-dual-chip ${n}`,
|
|
3264
|
-
children: [/* @__PURE__ */
|
|
3312
|
+
children: [/* @__PURE__ */ v("div", {
|
|
3265
3313
|
className: `j-dual-chip__half j-dual-chip__half--left j-dual-chip__half--${e.tone}`,
|
|
3266
|
-
children: /* @__PURE__ */
|
|
3314
|
+
children: /* @__PURE__ */ v(N, {
|
|
3267
3315
|
size: "md",
|
|
3268
3316
|
tone: e.tone === "gold" ? "default" : "white",
|
|
3269
3317
|
children: e.value
|
|
3270
3318
|
})
|
|
3271
|
-
}), /* @__PURE__ */
|
|
3319
|
+
}), /* @__PURE__ */ v("div", {
|
|
3272
3320
|
className: `j-dual-chip__half j-dual-chip__half--${t.tone}`,
|
|
3273
|
-
children: /* @__PURE__ */
|
|
3321
|
+
children: /* @__PURE__ */ v(N, {
|
|
3274
3322
|
size: "md",
|
|
3275
3323
|
tone: t.tone === "gold" ? "default" : "white",
|
|
3276
3324
|
children: t.value
|
|
@@ -3279,41 +3327,6 @@ function na({ left: e, right: t, className: n = "" }) {
|
|
|
3279
3327
|
});
|
|
3280
3328
|
}
|
|
3281
3329
|
//#endregion
|
|
3282
|
-
|
|
3283
|
-
function ra({ orientation: e = "vertical", onDrag: t, onKeyAdjust: n, className: r = "", "aria-label": i }) {
|
|
3284
|
-
let a = _(!1), o = _(0), s = _(t);
|
|
3285
|
-
h(() => {
|
|
3286
|
-
s.current = t;
|
|
3287
|
-
});
|
|
3288
|
-
let c = f((t) => {
|
|
3289
|
-
t.preventDefault(), t.target.setPointerCapture(t.pointerId), a.current = !0, o.current = e === "vertical" ? t.clientX : t.clientY;
|
|
3290
|
-
}, [e]);
|
|
3291
|
-
m(() => {
|
|
3292
|
-
function t(t) {
|
|
3293
|
-
if (!a.current) return;
|
|
3294
|
-
let n = e === "vertical" ? t.clientX : t.clientY, r = n - o.current;
|
|
3295
|
-
r !== 0 && (o.current = n, s.current(r));
|
|
3296
|
-
}
|
|
3297
|
-
function n() {
|
|
3298
|
-
a.current = !1;
|
|
3299
|
-
}
|
|
3300
|
-
return window.addEventListener("pointermove", t), window.addEventListener("pointerup", n), window.addEventListener("pointercancel", n), () => {
|
|
3301
|
-
window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", n), window.removeEventListener("pointercancel", n);
|
|
3302
|
-
};
|
|
3303
|
-
}, [e]);
|
|
3304
|
-
let l = e === "vertical";
|
|
3305
|
-
return /* @__PURE__ */ b("button", {
|
|
3306
|
-
"aria-label": i ?? "Resize panel",
|
|
3307
|
-
onKeyDown: (e) => {
|
|
3308
|
-
n && (l && e.key === "ArrowLeft" && n(-16), l && e.key === "ArrowRight" && n(16), !l && e.key === "ArrowUp" && n(-16), !l && e.key === "ArrowDown" && n(16));
|
|
3309
|
-
},
|
|
3310
|
-
onPointerDown: c,
|
|
3311
|
-
className: `j-panel-splitter ${r}`.trim(),
|
|
3312
|
-
"data-orientation": e,
|
|
3313
|
-
type: "button"
|
|
3314
|
-
});
|
|
3315
|
-
}
|
|
3316
|
-
//#endregion
|
|
3317
|
-
export { ee as $, Ee as A, fe as B, Re as C, Ne as D, Pe as E, xe as F, ue as G, le as H, ve as I, N as J, se as K, _e as L, Te as M, we as N, Ae as O, Se as P, M as Q, ge as R, ze as S, Ie as T, P as U, de as V, ce as W, te as X, ae as Y, re as Z, Ue as _, $i as a, Ve as b, Yi as c, Xe as d, Ye as f, Ke as g, He as h, ea as i, Ce as j, De as k, $e as l, qe as m, na as n, Qi as o, Je as p, oe as q, ta as r, Zi as s, ra as t, Ze as u, Ge as v, Le as w, Be as x, We as y, he as z };
|
|
3330
|
+
export { T as $, ke as A, fe as B, Re as C, je as D, Me as E, ye as F, ce as G, P as H, ve as I, oe as J, se as K, _e as L, we as M, Ce as N, Oe as O, Se as P, te as Q, ge as R, ze as S, Fe as T, le as U, ue as V, de as W, ie as X, ne as Y, ee as Z, Ke as _, $i as a, Ve as b, et as c, Xe as d, C as et, Ye as f, We as g, qe as h, ea as i, De as j, Ae as k, Qe as l, Ue as m, na as n, Qi as o, Je as p, N as q, ta as r, Xi as s, ra as t, w as tt, Ze as u, Ge as v, Le as w, Be as x, He as y, pe as z };
|
|
3318
3331
|
|
|
3319
|
-
//# sourceMappingURL=ui-
|
|
3332
|
+
//# sourceMappingURL=ui-LfKBGL5-.js.map
|