jaml-ui 1.0.0 → 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.
Files changed (44) hide show
  1. package/dist/assets/{searchPoolWorker-DWobBIhl.js → searchPoolWorker-DHh9a5GD.js} +2 -2
  2. package/dist/assets/searchPoolWorker-DHh9a5GD.js.map +1 -0
  3. package/dist/chunks/{jamlSeeds-3ILzc_rj.js → jamlSeeds-CKHvpjhC.js} +1 -1
  4. package/dist/chunks/{jamlSeeds-3ILzc_rj.js.map → jamlSeeds-CKHvpjhC.js.map} +1 -1
  5. package/dist/chunks/{motelyItemFormats-CNrFzcCI.js → motelyItemFormats-Dyq1BINO.js} +275 -267
  6. package/dist/chunks/motelyItemFormats-Dyq1BINO.js.map +1 -0
  7. package/dist/chunks/{searchPoolWorker-tBaSbLZu.js → searchPoolWorker-DgRqVj_q.js} +2 -2
  8. package/dist/chunks/searchPoolWorker-DgRqVj_q.js.map +1 -0
  9. package/dist/chunks/{assets-Bb6wV80_.js → spriteMapper-C2mqQHLj.js} +2417 -2
  10. package/dist/chunks/spriteMapper-C2mqQHLj.js.map +1 -0
  11. package/dist/chunks/{ui-Dn8IIoV3.js → ui-LfKBGL5-.js} +675 -791
  12. package/dist/chunks/ui-LfKBGL5-.js.map +1 -0
  13. package/dist/core.js +7 -8
  14. package/dist/core.js.map +1 -1
  15. package/dist/index.d.ts +0 -1
  16. package/dist/index.js +1185 -1230
  17. package/dist/index.js.map +1 -1
  18. package/dist/lib/motely/runtime.d.ts +7 -0
  19. package/dist/motely.js +10 -11
  20. package/dist/motely.js.map +1 -1
  21. package/dist/ui/jimbo.css +1 -1
  22. package/dist/ui/jimboApp.d.ts +3 -6
  23. package/dist/ui/jimboBackground.d.ts +4 -8
  24. package/dist/ui/sprites.d.ts +2 -1
  25. package/dist/ui.d.ts +0 -2
  26. package/dist/ui.js +2 -3
  27. package/package.json +15 -39
  28. package/dist/assets/searchPoolWorker-DWobBIhl.js.map +0 -1
  29. package/dist/chunks/assets-Bb6wV80_.js.map +0 -1
  30. package/dist/chunks/motelyItemFormats-CNrFzcCI.js.map +0 -1
  31. package/dist/chunks/searchPoolWorker-tBaSbLZu.js.map +0 -1
  32. package/dist/chunks/spriteMapper-CajFGgUU.js +0 -2419
  33. package/dist/chunks/spriteMapper-CajFGgUU.js.map +0 -1
  34. package/dist/chunks/tokens-Qrhlekc4.js +0 -57
  35. package/dist/chunks/tokens-Qrhlekc4.js.map +0 -1
  36. package/dist/chunks/ui-Dn8IIoV3.js.map +0 -1
  37. package/dist/r3f/Card3D.d.ts +0 -25
  38. package/dist/r3f/JimboBillboard.d.ts +0 -10
  39. package/dist/r3f/JimboText3D.d.ts +0 -9
  40. package/dist/r3f.d.ts +0 -3
  41. package/dist/r3f.js +0 -235
  42. package/dist/r3f.js.map +0 -1
  43. package/dist/ui/JimboPanelSplitter.d.ts +0 -8
  44. package/dist/ui/showcase.d.ts +0 -38
@@ -1,18 +1,70 @@
1
- import { n as e, t } from "./tokens-Qrhlekc4.js";
2
- import { n } from "./assets-Bb6wV80_.js";
3
- import { n as r, p as i, r as a, t as o } from "./spriteMapper-CajFGgUU.js";
4
- import s, { createContext as c, createElement as l, forwardRef as u, memo as d, useCallback as f, useContext as p, useEffect as m, useLayoutEffect as h, useMemo as g, useRef as _, useState as v } from "react";
5
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
6
- import { FiCheck as S, FiCopy as C } from "react-icons/fi";
7
- import { createPortal as w } from "react-dom";
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 T(e) {
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 E(e, t, n, r, i) {
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 D(e) {
25
- let n = _(null);
26
- return m(() => {
27
- if (!e || !n.current) return;
28
- let r, i = Date.now(), a = n.current, o = () => {
29
- let e = (Date.now() - i) % t.SWAY_DURATION / t.SWAY_DURATION * Math.PI * 2;
30
- a.style.transform = `translate(${Math.sin(e) * t.SWAY_AMOUNT * .3}px, ${Math.sin(e * .8) * t.SWAY_AMOUNT}px)`, r = requestAnimationFrame(o);
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 r = requestAnimationFrame(o), () => {
33
- cancelAnimationFrame(r), a && (a.style.transform = "");
84
+ return n = requestAnimationFrame(a), () => {
85
+ cancelAnimationFrame(n), i && (i.style.transform = "");
34
86
  };
35
- }, [e]), n;
87
+ }, [e]), t;
36
88
  }
37
- var O = {
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 k(e, t) {
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 A(e = {}) {
78
- let t = _(null), n = _(e);
79
- return h(() => {
129
+ function j(e = {}) {
130
+ let t = h(null), n = h(e);
131
+ return p(() => {
80
132
  n.current = e;
81
- }), m(() => {
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 ?? O.spinRotation,
117
- spinSpeed: 4.5 * (e.speed ?? O.speed),
118
- spinAmount: e.spinAmount ?? O.spinAmount,
119
- pixelFilter: e.pixelFilter ?? O.pixelFilter,
120
- contrast: e.contrast ?? O.contrast,
121
- lighting: e.lighting ?? O.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
- k(S.primary, O.primary),
124
- k(S.secondary, O.secondary),
125
- k(S.dark, O.dark)
126
- ], w = x(S), T = performance.now(), E = T, D = 0, A = () => {
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
- k(a.primary, O.primary),
131
- k(a.secondary, O.secondary),
132
- k(a.dark, O.dark)
133
- ], s = x(a), c = Math.max(1, a.transitionMs ?? O.transitionMs), l = 1 - Math.exp(-i / c);
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(A);
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(A), () => {
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 j({ mode: e = "snap", placement: t = "auto", delay: n = 80, disabled: r = !1 }) {
148
- let [i, a] = v(!1), [o, s] = v(null), c = _(null), l = _(null), u = _(null), d = f(() => {
149
- r || (u.current && clearTimeout(u.current), u.current = setTimeout(() => a(!0), n));
150
- }, [r, n]), p = f(() => {
151
- u.current && clearTimeout(u.current), a(!1), s(null);
152
- }, []), h = f(() => {
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 m(() => {
214
+ return f(() => {
163
215
  if (!i || e !== "snap") return;
164
- let t = requestAnimationFrame(h);
165
- return window.addEventListener("resize", h), window.addEventListener("scroll", h, !0), () => {
166
- cancelAnimationFrame(t), window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
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
- h
172
- ]), m(() => () => {
173
- u.current && clearTimeout(u.current);
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: d,
180
- hide: p,
181
- handleMouseMove: f((t) => {
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 M({ layers: e, invert: t = !1, hoverTilt: n = !1 }) {
191
- let r = _(null), a = _(null), o = _(/* @__PURE__ */ new Map()), [s, c] = v(3 / 4), [, l] = v(0), u = _(null), d = _({
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
- }), p = _({
247
+ }), m = h({
196
248
  rx: 0,
197
249
  ry: 0,
198
250
  rz: 0
199
- }), h = e?.some((e) => e.animated);
200
- m(() => {
251
+ }), _ = e?.some((e) => e.animated);
252
+ f(() => {
201
253
  let e = !1, t = o.current;
202
254
  return (async () => {
203
- let n = Array.from(new Set(Object.values(i).map((e) => e.src))), r = await Promise.all(n.map((e) => T(e)));
204
- e || (r.forEach((e, r) => {
205
- e && t.set(n[r], e);
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
- }, []), m(() => {
211
- let n = r.current;
262
+ }, []), f(() => {
263
+ let n = i.current;
212
264
  if (!n || !e || e.length === 0) return;
213
- let i = n.getContext("2d");
214
- if (!i) return;
215
- let a = !1, s = null, u, d = (r) => {
216
- i.clearRect(0, 0, n.width, n.height), [...e].sort((e, t) => e.order - t.order).forEach((e) => {
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 = E(n, i, t, e, h ? r : void 0);
271
+ let a = D(n, r, t, e, _ ? i : void 0);
220
272
  e.order === 0 && c(a);
221
273
  return;
222
274
  }
223
- T(e.source).then((t) => {
275
+ E(e.source).then((t) => {
224
276
  if (!(a || !t)) {
225
- if (o.current.set(e.source, t), !h) {
226
- let r = E(n, i, t, e);
227
- e.order === 0 && c(r);
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 (h) {
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
- h
298
+ _
247
299
  ]);
248
- let g = f(() => {
249
- u.current !== null && (cancelAnimationFrame(u.current), u.current = null);
250
- }, []), y = f(() => {
251
- let e = r.current;
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 = p.current;
305
+ let t = m.current;
254
306
  e.style.transform = `rotateX(${t.rx}deg) rotateY(${t.ry}deg) rotateZ(${t.rz}deg)`;
255
- }, []), b = f((e, t) => {
256
- g();
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 = d.current, s = p.current, c = 1 - Math.exp(-e * a);
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(), u.current = null, t?.();
314
+ s.rx = o.rx, s.ry = o.ry, s.rz = o.rz, y(), d.current = null, t?.();
263
315
  return;
264
316
  }
265
- u.current = requestAnimationFrame(r);
317
+ d.current = requestAnimationFrame(r);
266
318
  };
267
- u.current = requestAnimationFrame(r);
268
- }, [g, y]);
269
- return m(() => () => g(), [g]), {
270
- canvasRef: r,
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: n ? (e) => {
275
- !n || e.pointerType === "touch" || (a.current?.setAttribute("data-hovered", "true"), b(22));
326
+ onPointerEnter: r ? (e) => {
327
+ !r || e.pointerType === "touch" || (a.current?.setAttribute("data-hovered", "true"), b(22));
276
328
  } : void 0,
277
- onPointerLeave: n ? () => {
278
- n && (a.current?.setAttribute("data-hovered", "false"), d.current = {
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 = r.current;
335
+ let e = i.current;
284
336
  e && (e.style.transform = "");
285
337
  }));
286
338
  } : void 0,
287
- onPointerMove: n ? (e) => {
288
- if (!n || e.pointerType === "touch") return;
289
- let t = e.currentTarget.getBoundingClientRect(), r = 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));
290
- d.current = {
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: r * 12,
293
- rz: r * i * -1.2
294
- }, a.current?.style.setProperty("--j-card-glare-x", `${(r + 1) * 50}%`), a.current?.style.setProperty("--j-card-glare-y", `${(1 - i) * 50}%`), b(22);
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 ee(e, t, n) {
300
- let [r, i] = v(null), [a, o] = v(null), [s, c] = v(null), l = f((e, t, n) => {
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
- }, []), u = _(r), d = _(a), p = _(s), g = _(e), y = _(t);
311
- h(() => {
312
- u.current = r, d.current = a, p.current = s, g.current = e, y.current = t;
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 m(() => {
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 = u.current;
321
- if (!a && d.current) {
322
- let e = r.clientX - d.current.x, t = r.clientY - d.current.y;
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
- ...d.current,
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 = u.current, t = p.current;
398
+ let e = d.current, t = _.current;
347
399
  if (e && t && t !== e.fromZone) {
348
- let n = t, r = g.current;
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 te({ name: e, sheet: t, width: i = 40, height: s, style: c }) {
369
- let l = a(e), u = t ?? l?.type ?? "Jokers", d = o[u], f = r(u), p = l?.pos ?? f.pos, m = i;
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(u) && (m = Math.round(i * 95 / 71));
379
- let h = s ?? m;
380
- if (!d) return null;
381
- let g = i * d.cols, _ = h * d.rows, v = -(p.x * i), y = -(p.y * h);
382
- return /* @__PURE__ */ b("div", { style: {
383
- width: i,
384
- height: h,
385
- flexShrink: 0,
386
- backgroundImage: `url(${n(d.assetKey)})`,
387
- backgroundSize: `${g}px ${_}px`,
388
- backgroundPosition: `${v}px ${y}px`,
389
- backgroundRepeat: "no-repeat",
390
- imageRendering: "pixelated",
391
- ...c
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 ne = [
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 re({ stake: e, width: t = 29, height: r, style: i }) {
405
- let a = ne.indexOf(e.replace(" Stake", "")), o = a >= 0 ? a : 0, s = o % 5, c = Math.floor(o / 5), l = r ?? t, u = t * 5, d = l * 2;
406
- return /* @__PURE__ */ b("div", { style: {
407
- width: t,
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(${n("stakes")})`,
465
+ backgroundImage: `url(${e("stakes")})`,
411
466
  backgroundSize: `${u}px ${d}px`,
412
- backgroundPosition: `-${s * t}px -${c * l}px`,
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 ie = {
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 ae({ deck: e, width: t = 71, height: r, style: a }) {
445
- let o = ie[e.replace(" Deck", "")] ?? ie.Red, s = r ?? t * 95 / 71, c = i.enhancers;
446
- return /* @__PURE__ */ b("div", { style: {
447
- width: t,
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(${n(c.asset)})`,
451
- backgroundSize: `${t * c.columns}px ${s * c.rows}px`,
452
- backgroundPosition: `${-o.x * t}px ${-o.y * s}px`,
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__ */ b("span", {
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__ */ b(a, {
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 oe = s.forwardRef(function({ className: e = "", invalid: t = !1, "aria-invalid": n, ...r }, i) {
478
- return /* @__PURE__ */ b("input", {
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
- }), se = d(({ children: e, className: t = "", sway: n = !1, onBack: r, hideBack: i = !1, style: a, ...o }) => /* @__PURE__ */ x("div", {
486
- ref: D(n),
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__ */ b("div", {
545
+ children: [/* @__PURE__ */ v("div", {
491
546
  className: "j-panel__body",
492
547
  children: e
493
- }), r && !i && /* @__PURE__ */ b("div", {
548
+ }), r && !i && /* @__PURE__ */ v("div", {
494
549
  className: "j-panel__back",
495
- children: /* @__PURE__ */ b(le, { onClick: r })
550
+ children: /* @__PURE__ */ v(ue, { onClick: r })
496
551
  })]
497
552
  }));
498
- se.displayName = "JimboPanel";
499
- var ce = d(({ children: e, className: t = "", style: n, ...r }) => /* @__PURE__ */ b("div", {
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
- ce.displayName = "JimboInnerPanel";
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__ */ b("button", {
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__ */ b("div", {
570
+ children: /* @__PURE__ */ v("div", {
516
571
  className: "j-btn__face",
517
- children: /* @__PURE__ */ b(N, {
572
+ children: /* @__PURE__ */ v(N, {
518
573
  size: l,
519
574
  children: s
520
575
  })
521
576
  })
522
577
  });
523
578
  }
524
- function le({ onClick: e, size: t = "sm" }) {
525
- return /* @__PURE__ */ b("div", {
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__ */ b(P, {
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 ue({ children: e, open: t, onClose: n, title: r, className: i, showBack: a = !0 }) {
538
- return t ? /* @__PURE__ */ b("div", {
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__ */ x(se, {
595
+ children: /* @__PURE__ */ y(ce, {
541
596
  onBack: a ? n : void 0,
542
597
  className: `j-modal ${i ?? ""}`,
543
- children: [r && /* @__PURE__ */ b("div", {
598
+ children: [r && /* @__PURE__ */ v("div", {
544
599
  className: "j-modal__title-wrap",
545
600
  "aria-hidden": !1,
546
- children: /* @__PURE__ */ b(N, {
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 de({ tabs: e, activeTab: t, onTabChange: n, className: r = "", style: i }) {
559
- return /* @__PURE__ */ b("div", {
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__ */ x("div", {
619
+ return /* @__PURE__ */ y("div", {
565
620
  className: "j-tab",
566
621
  "data-active": r,
567
- children: [/* @__PURE__ */ b("div", {
622
+ children: [/* @__PURE__ */ v("div", {
568
623
  className: "j-tab__indicator",
569
624
  "data-active": r,
570
625
  "aria-hidden": !0,
571
- children: /* @__PURE__ */ b("svg", {
626
+ children: /* @__PURE__ */ v("svg", {
572
627
  width: 14,
573
628
  height: 10,
574
629
  viewBox: "0 0 14 10",
575
- children: /* @__PURE__ */ b("polygon", { points: "7,10 0,0 14,0" })
630
+ children: /* @__PURE__ */ v("polygon", { points: "7,10 0,0 14,0" })
576
631
  })
577
- }), /* @__PURE__ */ b(P, {
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 fe = s.forwardRef(function({ active: e = !1, className: t = "", children: n, ...r }, i) {
590
- return /* @__PURE__ */ b("button", {
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 = e, pe = {
653
+ }), F = C, me = {
599
654
  xs: 22,
600
655
  sm: 26,
601
656
  md: 30
602
- }, me = {
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 he({ onClick: e, onMouseDown: t, onTouchStart: n, title: r, "aria-label": i, disabled: a = !1, size: o = "md", tone: s = "default", children: c }) {
615
- let [l, u] = v(!1), d = pe[o], f = me[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;
616
- return /* @__PURE__ */ b("button", {
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 ge = s.forwardRef(function({ size: e = "md", tone: t = "white", dim: n = !1, className: r = "", ...i }, a) {
650
- return /* @__PURE__ */ b("input", {
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 _e({ size: e = "sm", tone: t = "dark", className: n, children: r, ...i }) {
666
- return /* @__PURE__ */ b("span", {
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 ve({ onPrev: e, onNext: t, canPrev: n = !0, canNext: r = !0, prevLabel: i = "Previous", nextLabel: a = "Next", children: o, className: s = "", style: c }) {
675
- return /* @__PURE__ */ x("div", {
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__ */ b(ye, {
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__ */ b("div", {
740
+ /* @__PURE__ */ v("div", {
686
741
  className: "j-flank__content",
687
742
  children: o
688
743
  }),
689
- /* @__PURE__ */ b(ye, {
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 ye({ direction: e, onClick: t, disabled: n, "aria-label": r }) {
699
- let [i, a] = s.useState(!1);
700
- return /* @__PURE__ */ b("button", {
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 && a(!0),
709
- onMouseUp: () => a(!1),
710
- onMouseLeave: () => a(!1),
711
- onTouchStart: () => !n && a(!0),
712
- onTouchEnd: () => a(!1),
713
- children: /* @__PURE__ */ b(be, { direction: e })
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 be({ direction: e }) {
717
- return /* @__PURE__ */ b("svg", {
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__ */ b("polyline", { points: e === "left" ? "18,4 8,14 18,24" : "10,4 20,14 10,24" })
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 xe({ value: e, placeholder: t = "--------", disabled: n = !1, copiedLabel: r = "Copied!", copiedDurationMs: i = 2e3, onCopy: a, className: o = "", style: s }) {
733
- let [c, l] = v(!1), u = e.trim(), d = !n && u.length > 0;
734
- return /* @__PURE__ */ x("button", {
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__ */ b("span", {
804
+ children: [/* @__PURE__ */ v("span", {
750
805
  className: "j-seed-copy__icon",
751
806
  "aria-hidden": !0,
752
- children: b(c ? S : C, { size: 18 })
753
- }), /* @__PURE__ */ b("span", {
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 Se({ value: e, label: t, onPrev: n, onNext: r, canPrev: i = !0, canNext: a = !0, className: o = "" }) {
762
- return /* @__PURE__ */ x("div", {
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__ */ b("div", {
819
+ children: [t && /* @__PURE__ */ v("div", {
765
820
  className: "j-spinner__label",
766
- children: /* @__PURE__ */ b(N, {
821
+ children: /* @__PURE__ */ v(N, {
767
822
  size: "sm",
768
823
  tone: "white",
769
824
  children: t
770
825
  })
771
- }), /* @__PURE__ */ x("div", {
826
+ }), /* @__PURE__ */ y("div", {
772
827
  className: "j-spinner",
773
828
  children: [
774
- /* @__PURE__ */ b(P, {
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__ */ b("div", {
837
+ /* @__PURE__ */ v("div", {
783
838
  className: "j-spinner__value",
784
- children: /* @__PURE__ */ b(N, {
839
+ children: /* @__PURE__ */ v(N, {
785
840
  size: "sm",
786
841
  tone: "white",
787
842
  children: e
788
843
  })
789
844
  }),
790
- /* @__PURE__ */ b(P, {
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/jimboApp.tsx
804
- function Ce({ children: e, fluid: t, className: n = "", ...r }) {
805
- return /* @__PURE__ */ b("div", {
806
- className: `j-app${t ? " j-app--fluid" : ""} ${n}`.trim(),
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: e
868
+ children: n
809
869
  });
810
870
  }
811
- function we({ children: e, className: t = "", ...n }) {
812
- return /* @__PURE__ */ b("div", {
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 Te({ children: e, className: t = "", ...n }) {
819
- return /* @__PURE__ */ b("div", {
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 Ee({ items: e, onToggle: t, title: n, variant: r = "row" }) {
828
- return /* @__PURE__ */ b(se, { children: /* @__PURE__ */ x("div", {
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__ */ b("div", {
979
+ children: [n && /* @__PURE__ */ v("div", {
831
980
  className: "j-toggle-list__title",
832
981
  children: n
833
- }), e.map((e) => /* @__PURE__ */ x("button", {
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__ */ b("span", {
988
+ children: [/* @__PURE__ */ v("span", {
840
989
  className: "j-toggle-item__label",
841
990
  children: e.label
842
- }), /* @__PURE__ */ b("span", {
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 De({ search: e, onSearchChange: t, searchPlaceholder: n = "Search...", searchLabel: r = "Search", sort: i, onSortChange: a, sortLabel: o = "Sort By", sortOptions: s, className: c = "", style: l }) {
852
- return /* @__PURE__ */ x("div", {
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__ */ x("div", {
1004
+ children: [t ? /* @__PURE__ */ y("div", {
856
1005
  className: "j-filter-bar__field",
857
- children: [/* @__PURE__ */ b("div", {
1006
+ children: [/* @__PURE__ */ v("div", {
858
1007
  className: "j-filter-bar__pill",
859
- children: /* @__PURE__ */ b(N, {
1008
+ children: /* @__PURE__ */ v(N, {
860
1009
  size: "xs",
861
1010
  children: r
862
1011
  })
863
- }), /* @__PURE__ */ x("div", {
1012
+ }), /* @__PURE__ */ y("div", {
864
1013
  className: "j-relative",
865
- children: [/* @__PURE__ */ b("div", {
1014
+ children: [/* @__PURE__ */ v("div", {
866
1015
  className: "j-filter-bar__search-icon",
867
- children: /* @__PURE__ */ b(Oe, {})
868
- }), /* @__PURE__ */ b("input", {
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__ */ x("div", {
1025
+ }) : null, s && a ? /* @__PURE__ */ y("div", {
877
1026
  className: "j-filter-bar__field",
878
- children: [/* @__PURE__ */ b("div", {
1027
+ children: [/* @__PURE__ */ v("div", {
879
1028
  className: "j-filter-bar__pill",
880
- children: /* @__PURE__ */ b(N, {
1029
+ children: /* @__PURE__ */ v(N, {
881
1030
  size: "xs",
882
1031
  children: o
883
1032
  })
884
- }), /* @__PURE__ */ x("div", {
1033
+ }), /* @__PURE__ */ y("div", {
885
1034
  className: "j-relative",
886
- children: [/* @__PURE__ */ b("select", {
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__ */ b("option", {
1039
+ children: s.map((e) => /* @__PURE__ */ v("option", {
891
1040
  value: e.value,
892
1041
  children: e.label
893
1042
  }, e.value))
894
- }), /* @__PURE__ */ b("div", {
1043
+ }), /* @__PURE__ */ v("div", {
895
1044
  className: "j-filter-bar__sort-icon",
896
- children: /* @__PURE__ */ b(ke, {})
1045
+ children: /* @__PURE__ */ v(Pe, {})
897
1046
  })]
898
1047
  })]
899
1048
  }) : null]
900
1049
  });
901
1050
  }
902
- function Oe() {
903
- return /* @__PURE__ */ x("svg", {
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__ */ b("circle", {
1062
+ children: [/* @__PURE__ */ v("circle", {
914
1063
  cx: 11,
915
1064
  cy: 11,
916
1065
  r: 8
917
- }), /* @__PURE__ */ b("line", {
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 ke() {
926
- return /* @__PURE__ */ x("svg", {
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__ */ b("polyline", { points: "7 4 7 20" }),
938
- /* @__PURE__ */ b("polyline", { points: "3 8 7 4 11 8" }),
939
- /* @__PURE__ */ b("polyline", { points: "17 20 17 4" }),
940
- /* @__PURE__ */ b("polyline", { points: "21 16 17 20 13 16" })
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 Pe({ hideFooter: e = !1, ...t }) {
1041
- return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("canvas", {
1042
- ref: A(t),
1095
+ function Fe(e) {
1096
+ return /* @__PURE__ */ v("canvas", {
1097
+ ref: j(e),
1043
1098
  "aria-hidden": !0,
1044
- style: {
1045
- position: "fixed",
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 Fe(e, t) {
1104
+ function Ie(e, t) {
1057
1105
  typeof e == "function" ? e(t) : e && typeof e == "object" && (e.current = t);
1058
1106
  }
1059
- function Ie({ content: e, badge: t, variant: n = "dark", children: r, mode: i = "snap", placement: a = "auto", delay: o = 80, maxWidth: c = 280, disabled: l = !1 }) {
1060
- let { visible: u, pos: d, targetRef: p, tooltipRef: m, show: h, hide: g, handleMouseMove: _ } = j({
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: a,
1063
- delay: o,
1110
+ placement: o,
1111
+ delay: s,
1064
1112
  disabled: l
1065
- }), v = s.Children.only(r), S = v.ref, C = f((e) => {
1066
- p.current = e, Fe(S, 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__ */ x(y, { children: [s.cloneElement(v, {
1116
+ return /* @__PURE__ */ y(_, { children: [a.cloneElement(x, {
1069
1117
  ref: C,
1070
1118
  onMouseEnter: (e) => {
1071
- h(), v.props.onMouseEnter?.(e);
1119
+ h(), x.props.onMouseEnter?.(e);
1072
1120
  },
1073
1121
  onMouseLeave: (e) => {
1074
- g(), v.props.onMouseLeave?.(e);
1122
+ g(), x.props.onMouseLeave?.(e);
1075
1123
  },
1076
1124
  onFocus: (e) => {
1077
- h(), v.props.onFocus?.(e);
1125
+ h(), x.props.onFocus?.(e);
1078
1126
  },
1079
1127
  onBlur: (e) => {
1080
- g(), v.props.onBlur?.(e);
1128
+ g(), x.props.onBlur?.(e);
1081
1129
  },
1082
1130
  onMouseMove: (e) => {
1083
- _(e), v.props.onMouseMove?.(e);
1131
+ b(e), x.props.onMouseMove?.(e);
1084
1132
  }
1085
- }), u ? /* @__PURE__ */ x("div", {
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: d?.left ?? -9999,
1091
- top: d?.top ?? -9999,
1138
+ left: f?.left ?? -9999,
1139
+ top: f?.top ?? -9999,
1092
1140
  maxWidth: c,
1093
- opacity: +!!d
1141
+ opacity: +!!f
1094
1142
  },
1095
- children: [/* @__PURE__ */ b("div", {
1143
+ children: [/* @__PURE__ */ v("div", {
1096
1144
  className: "j-tooltip__body",
1097
1145
  children: e
1098
- }), t && /* @__PURE__ */ b("div", {
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 Le({ value: e, label: t = "Copy", copiedLabel: n = "Copied", tone: r = "blue", size: i = "sm", copiedDurationMs: a = 1500, onCopy: o, className: s }) {
1107
- let [c, l] = v(!1);
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__ */ b(P, {
1161
+ return /* @__PURE__ */ v(P, {
1114
1162
  tone: r,
1115
1163
  size: i,
1116
1164
  onClick: u,
@@ -1120,245 +1168,116 @@ 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 Re({ code: e, language: t, filename: n, className: r = "" }) {
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__ */ x("div", {
1173
+ return /* @__PURE__ */ y("div", {
1126
1174
  className: `j-code-block ${r}`,
1127
- children: [/* @__PURE__ */ x("div", {
1175
+ children: [/* @__PURE__ */ y("div", {
1128
1176
  className: "j-code-block__header",
1129
- children: [/* @__PURE__ */ x("div", {
1177
+ children: [/* @__PURE__ */ y("div", {
1130
1178
  className: "j-code-block__meta",
1131
- children: [n && /* @__PURE__ */ b(N, {
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__ */ b("span", {
1184
+ }), i && /* @__PURE__ */ v("span", {
1137
1185
  className: "j-code-block__lang",
1138
- children: /* @__PURE__ */ b(N, {
1186
+ children: /* @__PURE__ */ v(N, {
1139
1187
  size: "micro",
1140
1188
  tone: "blue",
1141
1189
  children: i
1142
1190
  })
1143
1191
  })]
1144
- }), /* @__PURE__ */ b(Le, { value: e })]
1145
- }), /* @__PURE__ */ b("pre", {
1192
+ }), /* @__PURE__ */ v(Re, { value: e })]
1193
+ }), /* @__PURE__ */ v("pre", {
1146
1194
  className: "j-code-block__pre",
1147
- children: /* @__PURE__ */ b("code", { children: e })
1195
+ children: /* @__PURE__ */ v("code", { children: e })
1196
+ })]
1197
+ });
1198
+ }
1199
+ //#endregion
1200
+ //#region src/ui/jimboCopyRow.tsx
1201
+ function Be({ value: e, label: t }) {
1202
+ return /* @__PURE__ */ y("div", {
1203
+ className: "j-copy-row",
1204
+ children: [t ? /* @__PURE__ */ v(N, {
1205
+ size: "xs",
1206
+ tone: "grey",
1207
+ className: "j-copy-row__label",
1208
+ children: t
1209
+ }) : null, /* @__PURE__ */ v(Se, { value: e })]
1210
+ });
1211
+ }
1212
+ //#endregion
1213
+ //#region src/ui/jimboWordmark.tsx
1214
+ function Ve({ title: e, subtitle: t, className: n = "" }) {
1215
+ return /* @__PURE__ */ y("div", {
1216
+ className: `j-wordmark ${n}`,
1217
+ children: [/* @__PURE__ */ v("div", {
1218
+ className: "j-wordmark__title",
1219
+ children: e
1220
+ }), t && /* @__PURE__ */ v("div", {
1221
+ className: "j-wordmark__sub",
1222
+ children: t
1148
1223
  })]
1149
1224
  });
1150
1225
  }
1151
1226
  //#endregion
1152
1227
  //#region src/ui/jimboSectionHeader.tsx
1153
- function ze({ label: e, tone: t = "blue", className: n = "" }) {
1154
- return /* @__PURE__ */ x("div", {
1228
+ function He({ label: e, tone: t = "blue", className: n = "" }) {
1229
+ return /* @__PURE__ */ y("div", {
1155
1230
  className: `j-section-header ${n}`,
1156
- children: [/* @__PURE__ */ b("div", {
1231
+ children: [/* @__PURE__ */ v("div", {
1157
1232
  className: `j-section-header__tag j-bg--${t}`,
1158
1233
  children: e
1159
- }), /* @__PURE__ */ b("div", { className: `j-section-header__rule j-bg--${t}` })]
1234
+ }), /* @__PURE__ */ v("div", { className: `j-section-header__rule j-bg--${t}` })]
1160
1235
  });
1161
1236
  }
1162
1237
  //#endregion
1163
1238
  //#region src/ui/jimboInfoCard.tsx
1164
- function Be({ tone: e, children: t, className: n = "", ...r }) {
1165
- return /* @__PURE__ */ b("div", {
1239
+ function Ue({ tone: e, children: t, className: n = "", ...r }) {
1240
+ return /* @__PURE__ */ v("div", {
1166
1241
  className: `j-info-card ${e ? `j-border--${e}` : ""} ${n}`,
1167
1242
  style: e ? { borderColor: void 0 } : void 0,
1168
1243
  ...r,
1169
1244
  children: t
1170
1245
  });
1171
1246
  }
1172
- function Ve({ children: e, className: t = "" }) {
1173
- return /* @__PURE__ */ b("div", {
1247
+ function We({ children: e, className: t = "" }) {
1248
+ return /* @__PURE__ */ v("div", {
1174
1249
  className: `j-info-card__body ${t}`,
1175
1250
  children: e
1176
1251
  });
1177
1252
  }
1178
- function He({ children: e, className: t = "" }) {
1179
- return /* @__PURE__ */ b("div", {
1253
+ function Ge({ children: e, className: t = "" }) {
1254
+ return /* @__PURE__ */ v("div", {
1180
1255
  className: `j-info-card__title ${t}`,
1181
1256
  children: e
1182
1257
  });
1183
1258
  }
1184
- function Ue({ children: e, className: t = "" }) {
1185
- return /* @__PURE__ */ b("div", {
1259
+ function Ke({ children: e, className: t = "" }) {
1260
+ return /* @__PURE__ */ v("div", {
1186
1261
  className: `j-info-card__sub ${t}`,
1187
1262
  children: e
1188
1263
  });
1189
1264
  }
1190
- function We({ children: e, className: t = "" }) {
1191
- return /* @__PURE__ */ b("div", {
1265
+ function qe({ children: e, className: t = "" }) {
1266
+ return /* @__PURE__ */ v("div", {
1192
1267
  className: `j-info-card__aside ${t}`,
1193
1268
  children: e
1194
1269
  });
1195
1270
  }
1196
1271
  //#endregion
1197
- //#region src/ui/showcase.tsx
1198
- function Ge({ title: e = "Balatro", subtitle: t = "Seed Curator", hotFilters: n = [], recentFinds: r = [], mcpInfo: i, onNewSearch: a, onBrowseFilters: o, onFilterClick: s }) {
1199
- return /* @__PURE__ */ x(Ce, { children: [/* @__PURE__ */ x("div", {
1200
- style: {
1201
- padding: "12px 12px 8px",
1202
- display: "flex",
1203
- flexDirection: "column",
1204
- gap: 6
1205
- },
1206
- children: [
1207
- /* @__PURE__ */ x("div", {
1208
- className: "j-text-center",
1209
- children: [/* @__PURE__ */ b(N, {
1210
- size: "display",
1211
- tone: "gold",
1212
- children: e
1213
- }), /* @__PURE__ */ b(N, {
1214
- size: "micro",
1215
- tone: "grey",
1216
- style: { letterSpacing: 1 },
1217
- children: t
1218
- })]
1219
- }),
1220
- i && /* @__PURE__ */ x("div", {
1221
- className: "j-flex j-justify-between",
1222
- style: {
1223
- padding: "3px 8px",
1224
- background: "var(--j-surface-inset)",
1225
- borderRadius: 4,
1226
- border: "1px solid var(--j-panel-edge)"
1227
- },
1228
- children: [/* @__PURE__ */ b(N, {
1229
- size: "micro",
1230
- tone: "purple",
1231
- children: i.engine
1232
- }), /* @__PURE__ */ b(N, {
1233
- size: "micro",
1234
- tone: "white",
1235
- children: i.features
1236
- })]
1237
- }),
1238
- n.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(ze, {
1239
- label: "Filters",
1240
- tone: "blue"
1241
- }), /* @__PURE__ */ b("div", {
1242
- className: "j-flex-col",
1243
- style: { gap: 4 },
1244
- children: n.slice(0, 4).map((e, t) => /* @__PURE__ */ x(Be, {
1245
- tone: e.tone,
1246
- onClick: () => s?.(e, t),
1247
- style: { cursor: s ? "pointer" : void 0 },
1248
- children: [
1249
- /* @__PURE__ */ b("div", {
1250
- className: "j-flex j-gap-xs",
1251
- children: e.sample.slice(0, 2).map((e, t) => /* @__PURE__ */ b("div", {
1252
- style: {
1253
- width: 22,
1254
- height: 28,
1255
- display: "flex",
1256
- alignItems: "center",
1257
- justifyContent: "center"
1258
- },
1259
- children: /* @__PURE__ */ b(te, {
1260
- name: e,
1261
- width: 20
1262
- })
1263
- }, t))
1264
- }),
1265
- /* @__PURE__ */ x(Ve, { children: [/* @__PURE__ */ b(He, { children: e.name }), /* @__PURE__ */ x(Ue, { children: ["by ", e.author] })] }),
1266
- /* @__PURE__ */ b(We, { children: /* @__PURE__ */ b(N, {
1267
- size: "xs",
1268
- tone: e.tone === "gold" ? "gold" : e.tone,
1269
- children: e.hits
1270
- }) })
1271
- ]
1272
- }, t))
1273
- })] }),
1274
- r.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(ze, {
1275
- label: "Recent",
1276
- tone: "green"
1277
- }), /* @__PURE__ */ b("div", {
1278
- style: {
1279
- background: "var(--j-surface-inset)",
1280
- borderRadius: "var(--j-radius-md)",
1281
- padding: "6px 8px",
1282
- lineHeight: 1.5
1283
- },
1284
- children: r.slice(0, 3).map((e, t) => /* @__PURE__ */ x("div", {
1285
- className: "j-flex j-gap-sm",
1286
- style: {
1287
- background: t % 2 == 1 ? "var(--j-surface-inset-alt)" : "transparent",
1288
- borderRadius: "var(--j-radius-sm)",
1289
- padding: "1px 4px"
1290
- },
1291
- children: [
1292
- /* @__PURE__ */ b(N, {
1293
- size: "micro",
1294
- tone: "gold",
1295
- children: e.seed
1296
- }),
1297
- /* @__PURE__ */ b(N, {
1298
- size: "micro",
1299
- tone: "grey",
1300
- children: e.filterName
1301
- }),
1302
- e.score > 0 && /* @__PURE__ */ x(N, {
1303
- size: "micro",
1304
- tone: "green",
1305
- children: ["+", e.score]
1306
- })
1307
- ]
1308
- }, t))
1309
- })] })
1310
- ]
1311
- }), /* @__PURE__ */ x(Te, { children: [/* @__PURE__ */ b(P, {
1312
- tone: "red",
1313
- fullWidth: !0,
1314
- size: "lg",
1315
- onClick: a,
1316
- children: "New Search"
1317
- }), /* @__PURE__ */ b(P, {
1318
- tone: "blue",
1319
- fullWidth: !0,
1320
- size: "lg",
1321
- onClick: o,
1322
- children: "Browse Filters"
1323
- })] })] });
1324
- }
1325
- //#endregion
1326
- //#region src/ui/jimboCopyRow.tsx
1327
- function Ke({ value: e, label: t }) {
1328
- return /* @__PURE__ */ x("div", {
1329
- className: "j-copy-row",
1330
- children: [t ? /* @__PURE__ */ b(N, {
1331
- size: "xs",
1332
- tone: "grey",
1333
- className: "j-copy-row__label",
1334
- children: t
1335
- }) : null, /* @__PURE__ */ b(xe, { value: e })]
1336
- });
1337
- }
1338
- //#endregion
1339
- //#region src/ui/jimboWordmark.tsx
1340
- function qe({ title: e, subtitle: t, className: n = "" }) {
1341
- return /* @__PURE__ */ x("div", {
1342
- className: `j-wordmark ${n}`,
1343
- children: [/* @__PURE__ */ b("div", {
1344
- className: "j-wordmark__title",
1345
- children: e
1346
- }), t && /* @__PURE__ */ b("div", {
1347
- className: "j-wordmark__sub",
1348
- children: t
1349
- })]
1350
- });
1351
- }
1352
- //#endregion
1353
1272
  //#region src/ui/jimboStatGrid.tsx
1354
1273
  function Je({ items: e, className: t = "", ...n }) {
1355
- return /* @__PURE__ */ b("div", {
1274
+ return /* @__PURE__ */ v("div", {
1356
1275
  className: `j-stat-grid ${t}`,
1357
1276
  ...n,
1358
- children: e.map((e) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("div", {
1277
+ children: e.map((e) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
1359
1278
  className: "j-stat-grid__value",
1360
1279
  children: e.value
1361
- }), /* @__PURE__ */ b("div", {
1280
+ }), /* @__PURE__ */ v("div", {
1362
1281
  className: "j-stat-grid__label",
1363
1282
  children: e.label
1364
1283
  })] }, e.label))
@@ -1367,7 +1286,7 @@ function Je({ items: e, className: t = "", ...n }) {
1367
1286
  //#endregion
1368
1287
  //#region src/ui/jimboLayout.tsx
1369
1288
  function Ye({ gap: e, align: t, justify: n, className: r = "", ...i }) {
1370
- return /* @__PURE__ */ b("div", {
1289
+ return /* @__PURE__ */ v("div", {
1371
1290
  className: [
1372
1291
  "j-stack",
1373
1292
  e && `j-stack--gap-${e}`,
@@ -1379,7 +1298,7 @@ function Ye({ gap: e, align: t, justify: n, className: r = "", ...i }) {
1379
1298
  });
1380
1299
  }
1381
1300
  function Xe({ gap: e, align: t, justify: n, wrap: r = !1, className: i = "", ...a }) {
1382
- return /* @__PURE__ */ b("div", {
1301
+ return /* @__PURE__ */ v("div", {
1383
1302
  className: [
1384
1303
  "j-row",
1385
1304
  e && `j-row--gap-${e}`,
@@ -1394,7 +1313,7 @@ function Xe({ gap: e, align: t, justify: n, wrap: r = !1, className: i = "", ...
1394
1313
  //#endregion
1395
1314
  //#region src/ui/jimboInset.tsx
1396
1315
  function Ze({ children: e, className: t = "", ...n }) {
1397
- return /* @__PURE__ */ b("div", {
1316
+ return /* @__PURE__ */ v("div", {
1398
1317
  className: `j-inset ${t}`.trim(),
1399
1318
  ...n,
1400
1319
  children: e
@@ -1403,20 +1322,20 @@ function Ze({ children: e, className: t = "", ...n }) {
1403
1322
  //#endregion
1404
1323
  //#region src/ui/JimboPanelSpinner.tsx
1405
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 }) {
1406
- return /* @__PURE__ */ x("div", {
1325
+ return /* @__PURE__ */ y("div", {
1407
1326
  className: `j-panel-spinner ${a}`.trim(),
1408
1327
  style: o,
1409
- children: [e ? /* @__PURE__ */ b("div", {
1328
+ children: [e ? /* @__PURE__ */ v("div", {
1410
1329
  className: "j-panel-spinner__label",
1411
- children: /* @__PURE__ */ b(N, {
1330
+ children: /* @__PURE__ */ v(N, {
1412
1331
  size: "xs",
1413
1332
  tone: "grey",
1414
1333
  children: e
1415
1334
  })
1416
- }) : null, /* @__PURE__ */ x("div", {
1335
+ }) : null, /* @__PURE__ */ y("div", {
1417
1336
  className: "j-panel-spinner__row",
1418
1337
  children: [
1419
- /* @__PURE__ */ b(P, {
1338
+ /* @__PURE__ */ v(P, {
1420
1339
  tone: "red",
1421
1340
  size: "lg",
1422
1341
  className: "j-panel-spinner__arrow j-panel-spinner__arrow--left",
@@ -1425,28 +1344,28 @@ function Qe({ label: e, title: t, description: n, media: r, meta: i, className:
1425
1344
  "aria-label": "Previous",
1426
1345
  children: "<"
1427
1346
  }),
1428
- /* @__PURE__ */ x("div", {
1347
+ /* @__PURE__ */ y("div", {
1429
1348
  className: "j-panel-spinner__panel",
1430
1349
  children: [
1431
- r ? /* @__PURE__ */ b("div", {
1350
+ r ? /* @__PURE__ */ v("div", {
1432
1351
  className: "j-panel-spinner__media",
1433
1352
  children: r
1434
1353
  }) : null,
1435
- /* @__PURE__ */ b("div", {
1354
+ /* @__PURE__ */ v("div", {
1436
1355
  className: "j-panel-spinner__title",
1437
- children: /* @__PURE__ */ b(N, {
1356
+ children: /* @__PURE__ */ v(N, {
1438
1357
  size: "md",
1439
1358
  tone: "white",
1440
1359
  children: t
1441
1360
  })
1442
1361
  }),
1443
- i ? /* @__PURE__ */ b("div", {
1362
+ i ? /* @__PURE__ */ v("div", {
1444
1363
  className: "j-panel-spinner__meta",
1445
1364
  children: i
1446
1365
  }) : null,
1447
- n ? /* @__PURE__ */ b("div", {
1366
+ n ? /* @__PURE__ */ v("div", {
1448
1367
  className: "j-panel-spinner__description",
1449
- children: /* @__PURE__ */ b(N, {
1368
+ children: /* @__PURE__ */ v(N, {
1450
1369
  size: "micro",
1451
1370
  tone: "grey",
1452
1371
  children: n
@@ -1454,7 +1373,7 @@ function Qe({ label: e, title: t, description: n, media: r, meta: i, className:
1454
1373
  }) : null
1455
1374
  ]
1456
1375
  }),
1457
- /* @__PURE__ */ b(P, {
1376
+ /* @__PURE__ */ v(P, {
1458
1377
  tone: "red",
1459
1378
  size: "lg",
1460
1379
  className: "j-panel-spinner__arrow j-panel-spinner__arrow--right",
@@ -1474,28 +1393,28 @@ function $e(e, t, n) {
1474
1393
  return r < 0 ? e[0] ?? t : e[(r + n + e.length) % e.length] ?? t;
1475
1394
  }
1476
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 }) {
1477
- return /* @__PURE__ */ b(ue, {
1396
+ return /* @__PURE__ */ v(de, {
1478
1397
  open: e,
1479
1398
  onClose: t,
1480
1399
  title: c,
1481
- children: /* @__PURE__ */ x(Ye, {
1400
+ children: /* @__PURE__ */ y(Ye, {
1482
1401
  gap: "md",
1483
1402
  align: "stretch",
1484
- children: [/* @__PURE__ */ b(Qe, {
1403
+ children: [/* @__PURE__ */ v(Qe, {
1485
1404
  label: "Deck",
1486
1405
  title: `${i} Deck`,
1487
1406
  description: l ? l(i) : " ",
1488
- media: /* @__PURE__ */ b(ae, {
1407
+ media: /* @__PURE__ */ v(oe, {
1489
1408
  deck: i,
1490
1409
  width: 64
1491
1410
  }),
1492
1411
  onPrev: () => o($e(n, i, -1)),
1493
1412
  onNext: () => o($e(n, i, 1))
1494
- }), /* @__PURE__ */ b(Qe, {
1413
+ }), /* @__PURE__ */ v(Qe, {
1495
1414
  label: "Stake",
1496
1415
  title: `${a} Stake`,
1497
1416
  description: u ? u(a) : " ",
1498
- media: /* @__PURE__ */ b(re, {
1417
+ media: /* @__PURE__ */ v(ie, {
1499
1418
  stake: a,
1500
1419
  width: 48
1501
1420
  }),
@@ -2578,21 +2497,21 @@ var Ei = {
2578
2497
  }, Mi = (e) => {
2579
2498
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
2580
2499
  return !1;
2581
- }, Ni = c({}), Pi = () => p(Ni), Fi = u(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => {
2500
+ }, Ni = o({}), Pi = () => d(Ni), Fi = c(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...c }, l) => {
2582
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;
2583
- return l("svg", {
2584
- ref: c,
2502
+ return s("svg", {
2503
+ ref: l,
2585
2504
  ...ji,
2586
2505
  width: t ?? u ?? ji.width,
2587
2506
  height: t ?? u ?? ji.height,
2588
2507
  stroke: e ?? p,
2589
2508
  strokeWidth: h,
2590
2509
  className: Di("lucide", m, i),
2591
- ...!a && !Mi(s) && { "aria-hidden": "true" },
2592
- ...s
2593
- }, [...o.map(([e, t]) => l(e, t)), ...Array.isArray(a) ? a : [a]]);
2510
+ ...!a && !Mi(c) && { "aria-hidden": "true" },
2511
+ ...c
2512
+ }, [...o.map(([e, t]) => s(e, t)), ...Array.isArray(a) ? a : [a]]);
2594
2513
  }), Ii = (e, t) => {
2595
- let n = u(({ className: n, ...r }, i) => l(Fi, {
2514
+ let n = c(({ className: n, ...r }, i) => s(Fi, {
2596
2515
  ref: i,
2597
2516
  iconNode: t,
2598
2517
  className: Di(`lucide-${Oi(Ai(e))}`, `lucide-${e}`, n),
@@ -2664,22 +2583,22 @@ var Ei = {
2664
2583
  "event"
2665
2584
  ];
2666
2585
  function qi({ suggestions: e, selectedIndex: t, onSelect: n, onHover: r }) {
2667
- return e.length === 0 ? /* @__PURE__ */ b("div", {
2586
+ return e.length === 0 ? /* @__PURE__ */ v("div", {
2668
2587
  className: "p-2 text-xs text-white/40 italic",
2669
2588
  children: "No suggestions..."
2670
- }) : /* @__PURE__ */ b("div", {
2589
+ }) : /* @__PURE__ */ v("div", {
2671
2590
  className: "flex flex-col max-h-[200px] overflow-y-auto",
2672
2591
  onMouseDown: (e) => e.preventDefault(),
2673
2592
  children: e.map((e, i) => {
2674
2593
  let a = i === t;
2675
- return /* @__PURE__ */ x("div", {
2594
+ return /* @__PURE__ */ y("div", {
2676
2595
  onClick: () => n(e.text),
2677
2596
  onMouseEnter: () => r(i),
2678
2597
  className: `
2679
2598
  flex items-center justify-between px-3 py-1.5 cursor-pointer font-mono text-[13px] transition-colors
2680
2599
  ${a ? "bg-[var(--balatro-gold)] text-black" : "text-white hover:bg-white/10"}
2681
2600
  `,
2682
- children: [/* @__PURE__ */ b("span", { children: e.displayText }), a && /* @__PURE__ */ b("span", {
2601
+ children: [/* @__PURE__ */ v("span", { children: e.displayText }), a && /* @__PURE__ */ v("span", {
2683
2602
  className: "opacity-50 text-[11px] ml-2",
2684
2603
  children: "↵"
2685
2604
  })]
@@ -2688,12 +2607,12 @@ function qi({ suggestions: e, selectedIndex: t, onSelect: n, onHover: r }) {
2688
2607
  });
2689
2608
  }
2690
2609
  function Ji({ values: e, onToggle: t, color: n }) {
2691
- let [r, i] = v(!1), a = new Set(e.map((e) => parseInt(e, 10)).filter((e) => !isNaN(e)));
2692
- return r ? /* @__PURE__ */ x("div", {
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", {
2693
2612
  className: "flex flex-row items-center",
2694
2613
  children: [Array.from({ length: 9 }, (e, t) => t).map((e) => {
2695
2614
  let r = a.has(e);
2696
- return /* @__PURE__ */ b("div", {
2615
+ return /* @__PURE__ */ v("div", {
2697
2616
  onClick: (n) => {
2698
2617
  n.stopPropagation(), t(e.toString());
2699
2618
  },
@@ -2707,15 +2626,15 @@ function Ji({ values: e, onToggle: t, color: n }) {
2707
2626
  },
2708
2627
  children: e
2709
2628
  }, e);
2710
- }), /* @__PURE__ */ b("div", {
2629
+ }), /* @__PURE__ */ v("div", {
2711
2630
  onClick: () => i(!1),
2712
2631
  className: "jaml-block jaml-antes-confirm",
2713
- children: /* @__PURE__ */ b(Li, {
2632
+ children: /* @__PURE__ */ v(Li, {
2714
2633
  size: 16,
2715
2634
  strokeWidth: 3
2716
2635
  })
2717
2636
  })]
2718
- }) : /* @__PURE__ */ b("div", {
2637
+ }) : /* @__PURE__ */ v("div", {
2719
2638
  onClick: () => i(!0),
2720
2639
  className: "jaml-block",
2721
2640
  style: {
@@ -2735,8 +2654,8 @@ function Ji({ values: e, onToggle: t, color: n }) {
2735
2654
  });
2736
2655
  }
2737
2656
  function Yi(e, t) {
2738
- let [n, r] = v(null);
2739
- return m(() => {
2657
+ let [n, r] = g(null);
2658
+ return f(() => {
2740
2659
  if (!t || !e.current) {
2741
2660
  r(null);
2742
2661
  return;
@@ -2756,7 +2675,7 @@ function Yi(e, t) {
2756
2675
  }, [t, e]), n;
2757
2676
  }
2758
2677
  function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2759
- let [r, i] = v([]), [a, o] = v(null), [s, c] = v(null), [l, u] = v(null), d = _(null), p = f((e) => {
2678
+ let [r, i] = g([]), [a, o] = g(null), [s, c] = g(null), [l, d] = g(null), f = h(null), p = u((e) => {
2760
2679
  let t = e.split("\n"), n;
2761
2680
  return t.map((e, t) => {
2762
2681
  let r = e.search(/\S|$/), i = e.trim(), a = i.startsWith("#"), o = i.startsWith("- "), s, c, l = !1, u;
@@ -2782,13 +2701,13 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2782
2701
  arrayValues: u
2783
2702
  };
2784
2703
  });
2785
- }, []), m = f((e) => e.map((e) => e.raw).join("\n"), []), [h, y] = v(e);
2786
- if (e !== h) {
2787
- y(e);
2704
+ }, []), _ = u((e) => e.map((e) => e.raw).join("\n"), []), [b, x] = g(e);
2705
+ if (e !== b) {
2706
+ x(e);
2788
2707
  let t = e || Wi;
2789
- (r.length === 0 || m(r) !== t) && i(p(t));
2708
+ (r.length === 0 || _(r) !== t) && i(p(t));
2790
2709
  }
2791
- let S = f((e, n, a) => {
2710
+ let S = u((e, n, a) => {
2792
2711
  let o = r.map((t) => {
2793
2712
  if (t.id !== e) return t;
2794
2713
  let r = " ".repeat(t.indent), i = t.isArrayItem ? "- " : "", o = t.raw;
@@ -2803,7 +2722,7 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2803
2722
  };
2804
2723
  });
2805
2724
  i(o);
2806
- let s = m(o);
2725
+ let s = _(o);
2807
2726
  if (t) try {
2808
2727
  t(s, Ei.load(s), !0);
2809
2728
  } catch {
@@ -2811,9 +2730,9 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2811
2730
  }
2812
2731
  }, [
2813
2732
  r,
2814
- m,
2733
+ _,
2815
2734
  t
2816
- ]), C = f((e, n, a) => {
2735
+ ]), C = u((e, n, a) => {
2817
2736
  let o = r.map((t) => {
2818
2737
  if (t.id !== e || !t.arrayValues) return t;
2819
2738
  let r = [...t.arrayValues];
@@ -2827,7 +2746,7 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2827
2746
  };
2828
2747
  });
2829
2748
  i(o);
2830
- let s = m(o);
2749
+ let s = _(o);
2831
2750
  if (t) try {
2832
2751
  t(s, Ei.load(s), !0);
2833
2752
  } catch {
@@ -2835,9 +2754,9 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2835
2754
  }
2836
2755
  }, [
2837
2756
  r,
2838
- m,
2757
+ _,
2839
2758
  t
2840
- ]), w = f((e, n) => {
2759
+ ]), w = u((e, n) => {
2841
2760
  let a = r.map((t) => {
2842
2761
  if (t.id !== e) return t;
2843
2762
  let r = [...t.arrayValues || [], n], i = `[${r.join(", ")}]`, a = `${" ".repeat(t.indent)}${t.isArrayItem ? "- " : ""}${t.key}: ${i}`;
@@ -2850,7 +2769,7 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2850
2769
  };
2851
2770
  });
2852
2771
  i(a);
2853
- let o = m(a);
2772
+ let o = _(a);
2854
2773
  if (t) try {
2855
2774
  t(o, Ei.load(o), !0);
2856
2775
  } catch {
@@ -2858,9 +2777,9 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2858
2777
  }
2859
2778
  }, [
2860
2779
  r,
2861
- m,
2780
+ _,
2862
2781
  t
2863
- ]), T = f((e, n) => {
2782
+ ]), T = u((e, n) => {
2864
2783
  let a = r.map((t) => {
2865
2784
  if (t.id !== e || !t.arrayValues) return t;
2866
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}`;
@@ -2873,7 +2792,7 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2873
2792
  };
2874
2793
  });
2875
2794
  i(a);
2876
- let o = m(a);
2795
+ let o = _(a);
2877
2796
  if (t) try {
2878
2797
  t(o, Ei.load(o), !0);
2879
2798
  } catch {
@@ -2881,16 +2800,16 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2881
2800
  }
2882
2801
  }, [
2883
2802
  r,
2884
- m,
2803
+ _,
2885
2804
  t
2886
- ]), E = f((e) => {
2805
+ ]), E = u((e) => {
2887
2806
  let n = r.filter((t) => t.id !== e).map((e, t) => ({
2888
2807
  ...e,
2889
2808
  lineNumber: t,
2890
2809
  id: `line-${t}`
2891
2810
  }));
2892
2811
  i(n);
2893
- let a = m(n);
2812
+ let a = _(n);
2894
2813
  if (t) try {
2895
2814
  t(a, Ei.load(a), !0);
2896
2815
  } catch {
@@ -2898,30 +2817,30 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2898
2817
  }
2899
2818
  }, [
2900
2819
  r,
2901
- m,
2820
+ _,
2902
2821
  t
2903
- ]), D = g(() => {
2822
+ ]), D = m(() => {
2904
2823
  let e = {};
2905
2824
  for (let t of r) t.key && (e[t.indent] = Math.min(Math.max(e[t.indent] || 0, t.key.length), 12));
2906
2825
  return e;
2907
2826
  }, [r]);
2908
- return /* @__PURE__ */ x("div", {
2909
- ref: d,
2827
+ return /* @__PURE__ */ y("div", {
2828
+ ref: f,
2910
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}`,
2911
2830
  tabIndex: 0,
2912
- children: [/* @__PURE__ */ b("div", {
2831
+ children: [/* @__PURE__ */ v("div", {
2913
2832
  className: "flex flex-col gap-0.5",
2914
- children: r.map((e) => /* @__PURE__ */ b(Zi, {
2833
+ children: r.map((e) => /* @__PURE__ */ v(Zi, {
2915
2834
  line: e,
2916
2835
  keyWidth: D[e.indent] || 8,
2917
2836
  isEditing: a === e.id,
2918
2837
  editingPart: a === e.id ? s : null,
2919
2838
  editingArrayIndex: a === e.id ? l : null,
2920
2839
  onStartEdit: (t, n) => {
2921
- o(e.id), c(t), u(n ?? null);
2840
+ o(e.id), c(t), d(n ?? null);
2922
2841
  },
2923
2842
  onEndEdit: () => {
2924
- o(null), c(null), u(null);
2843
+ o(null), c(null), d(null);
2925
2844
  },
2926
2845
  onChange: (t, n) => S(e.id, t, n),
2927
2846
  onArrayItemChange: (t, n) => C(e.id, t, n),
@@ -2929,26 +2848,26 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2929
2848
  onArrayItemRemove: (t) => T(e.id, t),
2930
2849
  onDelete: () => E(e.id)
2931
2850
  }, e.id))
2932
- }), /* @__PURE__ */ x("div", {
2851
+ }), /* @__PURE__ */ y("div", {
2933
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",
2934
2853
  children: [
2935
- /* @__PURE__ */ x("span", {
2854
+ /* @__PURE__ */ y("span", {
2936
2855
  className: "flex items-center gap-1.5",
2937
- children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--red" }), " required"]
2856
+ children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--red" }), " required"]
2938
2857
  }),
2939
- /* @__PURE__ */ x("span", {
2858
+ /* @__PURE__ */ y("span", {
2940
2859
  className: "flex items-center gap-1.5",
2941
- children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--blue" }), " optional"]
2860
+ children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--blue" }), " optional"]
2942
2861
  }),
2943
- /* @__PURE__ */ x("span", {
2862
+ /* @__PURE__ */ y("span", {
2944
2863
  className: "flex items-center gap-1.5",
2945
- children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--green" }), " complete"]
2864
+ children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--green" }), " complete"]
2946
2865
  }),
2947
- /* @__PURE__ */ x("span", {
2866
+ /* @__PURE__ */ y("span", {
2948
2867
  className: "flex items-center gap-1.5",
2949
- children: [/* @__PURE__ */ b("span", { className: "jaml-legend-dot jaml-legend-dot--purple" }), " metadata"]
2868
+ children: [/* @__PURE__ */ v("span", { className: "jaml-legend-dot jaml-legend-dot--purple" }), " metadata"]
2950
2869
  }),
2951
- /* @__PURE__ */ b("span", {
2870
+ /* @__PURE__ */ v("span", {
2952
2871
  className: "ml-auto opacity-40",
2953
2872
  children: "Click to edit • Tab to navigate"
2954
2873
  })
@@ -2957,7 +2876,7 @@ function Xi({ initialJaml: e, onJamlChange: t, className: n }) {
2957
2876
  });
2958
2877
  }
2959
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 }) {
2960
- let [f, p] = v(0), [h, y] = v(""), [S, C] = v(""), [T, E] = v({
2879
+ let [p, _] = g(0), [b, x] = g(""), [C, w] = g(""), [T, E] = g({
2961
2880
  isEditing: n,
2962
2881
  editingPart: r,
2963
2882
  editingArrayIndex: i,
@@ -2968,16 +2887,16 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
2968
2887
  editingPart: r,
2969
2888
  editingArrayIndex: i,
2970
2889
  lineRaw: e.raw
2971
- }), n && y(r === "key" ? e.key || "" : r === "value" ? (e.value || "").replace(/^~|~$/g, "") : r === "arrayItem" && i !== null && e.arrayValues?.[i] || ""));
2972
- let D = g(() => !n || !r ? "" : r === "value" && e.key ? `${e.key}: ${h}` : r === "key" ? h : e.raw, [
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, [
2973
2892
  n,
2974
2893
  r,
2975
- h,
2894
+ b,
2976
2895
  e.raw,
2977
2896
  e.key
2978
- ]), O = g(() => D ? Ui.getCompletions(D).slice(0, 10) : [], [D]);
2979
- D !== S && (C(D), p(0));
2980
- let k = _(null), A = _(null), j = Yi(A, n && O.length > 0), M = () => {
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 = () => {
2981
2900
  switch (e.validationState) {
2982
2901
  case "required-incomplete": return $.red;
2983
2902
  case "optional-incomplete": return $.blue;
@@ -2996,22 +2915,22 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
2996
2915
  default: return "#FFF";
2997
2916
  }
2998
2917
  };
2999
- m(() => {
2918
+ f(() => {
3000
2919
  n && k.current && k.current.focus();
3001
2920
  }, [n]);
3002
2921
  let te = (t) => {
3003
2922
  if (t.key === "Enter") {
3004
2923
  t.preventDefault();
3005
- let n = O.length > 0 && f >= 0 ? O[f].text : h;
2924
+ let n = O.length > 0 && p >= 0 ? O[p].text : b;
3006
2925
  r === "key" ? s("key", n) : r === "value" ? s("value", n) : r === "arrayItem" && (i >= (e.arrayValues?.length || 0) ? l(n) : c(i, n)), o();
3007
- } else t.key === "ArrowDown" ? (t.preventDefault(), p(Math.min(f + 1, O.length - 1))) : t.key === "ArrowUp" ? (t.preventDefault(), p(Math.max(f - 1, 0))) : t.key === "Escape" ? o() : t.key === "Backspace" && h === "" && r === "arrayItem" && (u(i), o());
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());
3008
2927
  };
3009
- if (e.isComment) return /* @__PURE__ */ b("div", {
2928
+ if (e.isComment) return /* @__PURE__ */ v("div", {
3010
2929
  className: "pl-8 text-stone-400 italic text-xs py-0.5",
3011
2930
  children: e.raw
3012
2931
  });
3013
- if (!e.key && !e.raw.trim()) return /* @__PURE__ */ b("div", { className: "h-5" });
3014
- if ((e.key === "must" || e.key === "should" || e.key === "mustNot") && !e.value) return /* @__PURE__ */ b("div", {
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", {
3015
2934
  className: "jaml-clause-header pl-8 py-1 text-[16px] border-b border-white/10 mt-4 mb-2 tracking-widest",
3016
2935
  style: { "--jaml-color": e.key === "must" ? $.red : $.blue },
3017
2936
  children: e.raw
@@ -3021,26 +2940,26 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
3021
2940
  "--popover-left": `${j.left}px`,
3022
2941
  "--popover-transform": j.position === "top" ? "translateY(-100%)" : "none"
3023
2942
  } : {};
3024
- return /* @__PURE__ */ x("div", {
2943
+ return /* @__PURE__ */ y("div", {
3025
2944
  className: "relative flex items-center py-0.5 group",
3026
2945
  children: [
3027
- /* @__PURE__ */ b("div", {
2946
+ /* @__PURE__ */ v("div", {
3028
2947
  className: "w-6 h-full flex items-center justify-center cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
3029
2948
  onClick: (e) => {
3030
2949
  e.stopPropagation(), d();
3031
2950
  },
3032
- children: /* @__PURE__ */ b(Ri, {
2951
+ children: /* @__PURE__ */ v(Ri, {
3033
2952
  size: 12,
3034
2953
  className: "text-orange-500 hover:bg-orange-100 rounded"
3035
2954
  })
3036
2955
  }),
3037
- /* @__PURE__ */ x("span", {
2956
+ /* @__PURE__ */ y("span", {
3038
2957
  className: "whitespace-pre text-stone-400",
3039
2958
  children: [ne, re]
3040
2959
  }),
3041
- e.key && /* @__PURE__ */ x("div", {
2960
+ e.key && /* @__PURE__ */ y("div", {
3042
2961
  className: "relative",
3043
- children: [/* @__PURE__ */ b("div", {
2962
+ children: [/* @__PURE__ */ v("div", {
3044
2963
  ref: r === "key" ? A : null,
3045
2964
  onClick: (e) => {
3046
2965
  e.stopPropagation(), a("key");
@@ -3051,43 +2970,43 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
3051
2970
  "--jaml-color": n && r === "key" ? ee() : M(),
3052
2971
  "--jaml-bg": n && r === "key" ? `${ee()}15` : "transparent"
3053
2972
  },
3054
- children: n && r === "key" ? /* @__PURE__ */ b("input", {
2973
+ children: n && r === "key" ? /* @__PURE__ */ v("input", {
3055
2974
  ref: k,
3056
2975
  title: "Edit key",
3057
- value: h,
3058
- onChange: (e) => y(e.target.value),
2976
+ value: b,
2977
+ onChange: (e) => x(e.target.value),
3059
2978
  onKeyDown: te,
3060
2979
  onBlur: () => setTimeout(o, 200),
3061
2980
  className: "jaml-inline-input",
3062
2981
  style: { "--jaml-color": ee() }
3063
2982
  }) : e.key
3064
- }), n && r === "key" && O.length > 0 && j && w(/* @__PURE__ */ b("div", {
2983
+ }), n && r === "key" && O.length > 0 && j && S(/* @__PURE__ */ v("div", {
3065
2984
  className: "jaml-suggestion-popover",
3066
2985
  style: ie,
3067
- children: /* @__PURE__ */ b(qi, {
2986
+ children: /* @__PURE__ */ v(qi, {
3068
2987
  suggestions: O,
3069
- selectedIndex: f,
3070
- onHover: p,
2988
+ selectedIndex: p,
2989
+ onHover: _,
3071
2990
  onSelect: (e) => {
3072
2991
  s("key", e), o();
3073
2992
  }
3074
2993
  })
3075
2994
  }), document.body)]
3076
2995
  }),
3077
- e.key && /* @__PURE__ */ b("span", {
2996
+ e.key && /* @__PURE__ */ v("span", {
3078
2997
  className: "text-stone-400 mr-1",
3079
2998
  children: ":"
3080
2999
  }),
3081
- e.key && (e.isArrayValue && e.arrayValues ? e.key === "antes" ? /* @__PURE__ */ b(Ji, {
3000
+ e.key && (e.isArrayValue && e.arrayValues ? e.key === "antes" ? /* @__PURE__ */ v(Ji, {
3082
3001
  values: e.arrayValues,
3083
3002
  onToggle: (t) => {
3084
3003
  let n = e.arrayValues.indexOf(t);
3085
3004
  n >= 0 ? u(n) : l(t);
3086
3005
  },
3087
3006
  color: ee()
3088
- }) : /* @__PURE__ */ x("div", {
3007
+ }) : /* @__PURE__ */ y("div", {
3089
3008
  className: "flex gap-0.5 items-center",
3090
- children: [e.arrayValues.map((e, t) => /* @__PURE__ */ b("div", {
3009
+ children: [e.arrayValues.map((e, t) => /* @__PURE__ */ v("div", {
3091
3010
  onClick: (e) => {
3092
3011
  e.stopPropagation(), a("arrayItem", t);
3093
3012
  },
@@ -3098,16 +3017,16 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
3098
3017
  "--jaml-border": `1px solid ${M()}40`,
3099
3018
  "--jaml-color": M()
3100
3019
  },
3101
- children: n && r === "arrayItem" && i === t ? /* @__PURE__ */ b("input", {
3020
+ children: n && r === "arrayItem" && i === t ? /* @__PURE__ */ v("input", {
3102
3021
  ref: k,
3103
3022
  title: "Edit array item",
3104
- value: h,
3105
- onChange: (e) => y(e.target.value),
3023
+ value: b,
3024
+ onChange: (e) => x(e.target.value),
3106
3025
  onKeyDown: te,
3107
3026
  onBlur: () => setTimeout(o, 200),
3108
3027
  className: "bg-transparent w-[3ch] text-center outline-none"
3109
3028
  }) : e
3110
- }, t)), /* @__PURE__ */ b("div", {
3029
+ }, t)), /* @__PURE__ */ v("div", {
3111
3030
  onClick: (t) => {
3112
3031
  t.stopPropagation(), a("arrayItem", e.arrayValues.length);
3113
3032
  },
@@ -3118,11 +3037,11 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
3118
3037
  "--jaml-border": `1px solid ${$.green}40`,
3119
3038
  "--jaml-color": $.green
3120
3039
  },
3121
- children: /* @__PURE__ */ b(zi, { size: 12 })
3040
+ children: /* @__PURE__ */ v(zi, { size: 12 })
3122
3041
  })]
3123
- }) : /* @__PURE__ */ x("div", {
3042
+ }) : /* @__PURE__ */ y("div", {
3124
3043
  className: "relative",
3125
- children: [/* @__PURE__ */ b("div", {
3044
+ children: [/* @__PURE__ */ v("div", {
3126
3045
  ref: r === "value" ? A : null,
3127
3046
  onClick: (e) => {
3128
3047
  e.stopPropagation(), a("value");
@@ -3135,26 +3054,26 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
3135
3054
  "--jaml-border": `1px solid ${e.isInvalidValue ? `${$.red}60` : e.value ? `${M()}40` : `${$.red}40`}`,
3136
3055
  "--jaml-text-decoration": e.isInvalidValue ? "line-through" : "none"
3137
3056
  },
3138
- children: n && r === "value" ? /* @__PURE__ */ b("input", {
3057
+ children: n && r === "value" ? /* @__PURE__ */ v("input", {
3139
3058
  ref: k,
3140
3059
  title: "Edit value",
3141
- value: h,
3142
- onChange: (e) => y(e.target.value),
3060
+ value: b,
3061
+ onChange: (e) => x(e.target.value),
3143
3062
  onKeyDown: te,
3144
3063
  onBlur: () => setTimeout(o, 200),
3145
3064
  className: "jaml-inline-input jaml-inline-input--sized",
3146
3065
  style: {
3147
3066
  "--jaml-color": M(),
3148
- "--jaml-input-w": `${Math.max(h.length, 4)}ch`
3067
+ "--jaml-input-w": `${Math.max(b.length, 4)}ch`
3149
3068
  }
3150
3069
  }) : e.isInvalidValue ? e.value?.replace(/~/g, "") : e.value || "???"
3151
- }), n && r === "value" && O.length > 0 && j && w(/* @__PURE__ */ b("div", {
3070
+ }), n && r === "value" && O.length > 0 && j && S(/* @__PURE__ */ v("div", {
3152
3071
  className: "jaml-suggestion-popover",
3153
3072
  style: ie,
3154
- children: /* @__PURE__ */ b(qi, {
3073
+ children: /* @__PURE__ */ v(qi, {
3155
3074
  suggestions: O,
3156
- selectedIndex: f,
3157
- onHover: p,
3075
+ selectedIndex: p,
3076
+ onHover: _,
3158
3077
  onSelect: (e) => {
3159
3078
  s("value", e), o();
3160
3079
  }
@@ -3167,59 +3086,59 @@ function Zi({ line: e, keyWidth: t, isEditing: n, editingPart: r, editingArrayIn
3167
3086
  //#endregion
3168
3087
  //#region src/ui/JimboInputModal.tsx
3169
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 }) {
3170
- let [u, d] = v(i), [f, p] = v(null), h = _(null), [g, y] = v(e);
3171
- e !== g && (y(e), e && (d(i), p(null))), m(() => {
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(() => {
3172
3091
  if (e) {
3173
- let e = setTimeout(() => h.current?.focus(), 30);
3092
+ let e = setTimeout(() => _.current?.focus(), 30);
3174
3093
  return () => clearTimeout(e);
3175
3094
  }
3176
3095
  }, [e]);
3177
3096
  function S() {
3178
3097
  let e = s?.(u) ?? null;
3179
3098
  if (e) {
3180
- p(e);
3099
+ m(e);
3181
3100
  return;
3182
3101
  }
3183
3102
  c(u);
3184
3103
  }
3185
- return /* @__PURE__ */ x(ue, {
3104
+ return /* @__PURE__ */ y(de, {
3186
3105
  onClose: l,
3187
3106
  open: e,
3188
3107
  title: t,
3189
3108
  children: [
3190
- n && /* @__PURE__ */ b(N, {
3109
+ n && /* @__PURE__ */ v(N, {
3191
3110
  size: "sm",
3192
3111
  className: "j-input-modal__message",
3193
3112
  tone: "grey",
3194
3113
  children: n
3195
3114
  }),
3196
- /* @__PURE__ */ b(oe, {
3197
- invalid: !!f,
3115
+ /* @__PURE__ */ v(se, {
3116
+ invalid: !!p,
3198
3117
  onChange: (e) => {
3199
- d(e.target.value), f && p(null);
3118
+ d(e.target.value), p && m(null);
3200
3119
  },
3201
3120
  onKeyDown: (e) => {
3202
3121
  e.key === "Enter" && S(), e.key === "Escape" && l();
3203
3122
  },
3204
3123
  placeholder: r,
3205
- ref: h,
3124
+ ref: _,
3206
3125
  type: "text",
3207
3126
  value: u
3208
3127
  }),
3209
- f && /* @__PURE__ */ b(N, {
3128
+ p && /* @__PURE__ */ v(N, {
3210
3129
  size: "sm",
3211
3130
  className: "j-input-modal__error",
3212
3131
  tone: "red",
3213
- children: f
3132
+ children: p
3214
3133
  }),
3215
- /* @__PURE__ */ x("div", {
3134
+ /* @__PURE__ */ y("div", {
3216
3135
  className: "j-input-modal__actions",
3217
- children: [/* @__PURE__ */ b(P, {
3136
+ children: [/* @__PURE__ */ v(P, {
3218
3137
  onClick: l,
3219
3138
  size: "sm",
3220
3139
  tone: "red",
3221
3140
  children: o
3222
- }), /* @__PURE__ */ b(P, {
3141
+ }), /* @__PURE__ */ v(P, {
3223
3142
  onClick: S,
3224
3143
  size: "sm",
3225
3144
  tone: "blue",
@@ -3237,10 +3156,10 @@ function $i({ value: e, options: t, onChange: n, disabled: r = !1, label: i, "ar
3237
3156
  function u(e) {
3238
3157
  r || s.length === 0 || n(s[(c + e + s.length) % s.length].value);
3239
3158
  }
3240
- return /* @__PURE__ */ b("div", {
3159
+ return /* @__PURE__ */ v("div", {
3241
3160
  style: o,
3242
3161
  "aria-label": a,
3243
- children: /* @__PURE__ */ b(Se, {
3162
+ children: /* @__PURE__ */ v(Ce, {
3244
3163
  label: i,
3245
3164
  value: l.label ?? l.value,
3246
3165
  onPrev: () => u(-1),
@@ -3255,18 +3174,18 @@ function $i({ value: e, options: t, onChange: n, disabled: r = !1, label: i, "ar
3255
3174
  function ea({ count: e, index: t, onIndexChange: n, ariaLabel: r = "Page indicator", className: i = "", style: a }) {
3256
3175
  if (e <= 1) return null;
3257
3176
  let o = !!n;
3258
- return /* @__PURE__ */ b("div", {
3177
+ return /* @__PURE__ */ v("div", {
3259
3178
  className: `j-stepper ${i}`,
3260
3179
  role: "tablist",
3261
3180
  "aria-label": r,
3262
3181
  style: a,
3263
3182
  children: Array.from({ length: e }).map((r, i) => {
3264
- let a = i === t, s = /* @__PURE__ */ b("span", {
3183
+ let a = i === t, s = /* @__PURE__ */ v("span", {
3265
3184
  className: "j-stepper__dot",
3266
3185
  "data-active": a,
3267
3186
  "aria-hidden": !0
3268
3187
  });
3269
- return o ? /* @__PURE__ */ b("button", {
3188
+ return o ? /* @__PURE__ */ v("button", {
3270
3189
  type: "button",
3271
3190
  className: "j-stepper__hit",
3272
3191
  role: "tab",
@@ -3274,7 +3193,7 @@ function ea({ count: e, index: t, onIndexChange: n, ariaLabel: r = "Page indicat
3274
3193
  "aria-label": `Page ${i + 1} of ${e}`,
3275
3194
  onClick: () => n?.(i),
3276
3195
  children: s
3277
- }, i) : /* @__PURE__ */ b("span", {
3196
+ }, i) : /* @__PURE__ */ v("span", {
3278
3197
  role: "tab",
3279
3198
  "aria-selected": a,
3280
3199
  children: s
@@ -3285,14 +3204,14 @@ function ea({ count: e, index: t, onIndexChange: n, ariaLabel: r = "Page indicat
3285
3204
  //#endregion
3286
3205
  //#region src/ui/JimboValueBadge.tsx
3287
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 }) {
3288
- let [l, u] = v(!1), [d, f] = v(String(e)), p = _(null);
3289
- m(() => {
3290
- l && (p.current?.focus(), p.current?.select());
3207
+ let [l, u] = g(!1), [d, p] = g(String(e)), m = h(null);
3208
+ f(() => {
3209
+ l && (m.current?.focus(), m.current?.select());
3291
3210
  }, [l]);
3292
- function h() {
3293
- f(String(e)), u(!0);
3211
+ function _() {
3212
+ p(String(e)), u(!0);
3294
3213
  }
3295
- function g() {
3214
+ function y() {
3296
3215
  let e = Number(d);
3297
3216
  if (Number.isFinite(e)) {
3298
3217
  let a = Math.min(r, Math.max(n, e)), o = i > 0 ? Math.round(a / i) * i : a;
@@ -3300,35 +3219,35 @@ function ta({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, unit
3300
3219
  }
3301
3220
  u(!1);
3302
3221
  }
3303
- function y() {
3304
- f(String(e)), u(!1);
3222
+ function b() {
3223
+ p(String(e)), u(!1);
3305
3224
  }
3306
3225
  let x = !o && !!t, S = a ? `${Math.round(e)}${a}` : String(Math.round(e));
3307
- return l ? /* @__PURE__ */ b("div", {
3226
+ return l ? /* @__PURE__ */ v("div", {
3308
3227
  className: `j-value-badge j-value-badge--editing ${s}`,
3309
3228
  style: c,
3310
- children: /* @__PURE__ */ b("input", {
3311
- ref: p,
3229
+ children: /* @__PURE__ */ v("input", {
3230
+ ref: m,
3312
3231
  className: "j-value-badge__input",
3313
3232
  type: "number",
3314
3233
  min: n,
3315
3234
  max: r,
3316
3235
  step: i,
3317
3236
  value: d,
3318
- onChange: (e) => f(e.currentTarget.value),
3319
- onBlur: g,
3237
+ onChange: (e) => p(e.currentTarget.value),
3238
+ onBlur: y,
3320
3239
  onKeyDown: (e) => {
3321
- e.key === "Enter" ? g() : e.key === "Escape" && y();
3240
+ e.key === "Enter" ? y() : e.key === "Escape" && b();
3322
3241
  }
3323
3242
  })
3324
- }) : /* @__PURE__ */ b("button", {
3243
+ }) : /* @__PURE__ */ v("button", {
3325
3244
  type: "button",
3326
3245
  className: `j-value-badge ${x ? "" : "j-value-badge--static"} ${s}`,
3327
3246
  style: c,
3328
- onClick: x ? h : void 0,
3247
+ onClick: x ? _ : void 0,
3329
3248
  disabled: !x,
3330
3249
  tabIndex: x ? 0 : -1,
3331
- children: /* @__PURE__ */ b(N, {
3250
+ children: /* @__PURE__ */ v(N, {
3332
3251
  size: "xs",
3333
3252
  tone: "white",
3334
3253
  children: S
@@ -3337,30 +3256,30 @@ function ta({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, unit
3337
3256
  }
3338
3257
  //#endregion
3339
3258
  //#region src/ui/JimboSlider.tsx
3340
- function na({ value: e, min: t = 0, max: n = 100, step: r = 1, label: i, onChange: a, className: o = "", id: c }) {
3341
- let l = n === t ? 0 : (e - t) / (n - t) * 100, u = s.useId(), d = c ?? u;
3342
- return /* @__PURE__ */ x("div", {
3343
- className: `j-slider-wrap ${o}`,
3344
- children: [i && /* @__PURE__ */ b("label", {
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", {
3345
3264
  htmlFor: d,
3346
3265
  className: "j-slider__label",
3347
- children: /* @__PURE__ */ b(N, {
3266
+ children: /* @__PURE__ */ v(N, {
3348
3267
  size: "sm",
3349
3268
  tone: "white",
3350
3269
  children: i
3351
3270
  })
3352
- }), /* @__PURE__ */ x("div", {
3271
+ }), /* @__PURE__ */ y("div", {
3353
3272
  className: "j-slider",
3354
3273
  children: [
3355
- /* @__PURE__ */ b("div", {
3274
+ /* @__PURE__ */ v("div", {
3356
3275
  className: "j-slider__track",
3357
3276
  "aria-hidden": !0,
3358
- children: /* @__PURE__ */ b("div", {
3277
+ children: /* @__PURE__ */ v("div", {
3359
3278
  className: "j-slider__fill",
3360
3279
  style: { width: `${l}%` }
3361
3280
  })
3362
3281
  }),
3363
- /* @__PURE__ */ b("input", {
3282
+ /* @__PURE__ */ v("input", {
3364
3283
  id: d,
3365
3284
  type: "range",
3366
3285
  className: "j-slider__input",
@@ -3368,17 +3287,17 @@ function na({ value: e, min: t = 0, max: n = 100, step: r = 1, label: i, onChang
3368
3287
  max: n,
3369
3288
  step: r,
3370
3289
  value: e,
3371
- onChange: (e) => a?.(Number(e.currentTarget.value))
3290
+ onChange: (e) => o?.(Number(e.currentTarget.value))
3372
3291
  }),
3373
- /* @__PURE__ */ b("div", {
3292
+ /* @__PURE__ */ v("div", {
3374
3293
  className: "j-slider__thumb",
3375
3294
  style: { left: `${l}%` },
3376
- children: /* @__PURE__ */ b(ta, {
3295
+ children: /* @__PURE__ */ v(ta, {
3377
3296
  value: e,
3378
3297
  min: t,
3379
3298
  max: n,
3380
3299
  step: r,
3381
- onChange: a
3300
+ onChange: o
3382
3301
  })
3383
3302
  })
3384
3303
  ]
@@ -3388,18 +3307,18 @@ function na({ value: e, min: t = 0, max: n = 100, step: r = 1, label: i, onChang
3388
3307
  //#endregion
3389
3308
  //#region src/ui/JimboDualChip.tsx
3390
3309
  function ra({ left: e, right: t, className: n = "" }) {
3391
- return /* @__PURE__ */ x("div", {
3310
+ return /* @__PURE__ */ y("div", {
3392
3311
  className: `j-dual-chip ${n}`,
3393
- children: [/* @__PURE__ */ b("div", {
3312
+ children: [/* @__PURE__ */ v("div", {
3394
3313
  className: `j-dual-chip__half j-dual-chip__half--left j-dual-chip__half--${e.tone}`,
3395
- children: /* @__PURE__ */ b(N, {
3314
+ children: /* @__PURE__ */ v(N, {
3396
3315
  size: "md",
3397
3316
  tone: e.tone === "gold" ? "default" : "white",
3398
3317
  children: e.value
3399
3318
  })
3400
- }), /* @__PURE__ */ b("div", {
3319
+ }), /* @__PURE__ */ v("div", {
3401
3320
  className: `j-dual-chip__half j-dual-chip__half--${t.tone}`,
3402
- children: /* @__PURE__ */ b(N, {
3321
+ children: /* @__PURE__ */ v(N, {
3403
3322
  size: "md",
3404
3323
  tone: t.tone === "gold" ? "default" : "white",
3405
3324
  children: t.value
@@ -3408,41 +3327,6 @@ function ra({ left: e, right: t, className: n = "" }) {
3408
3327
  });
3409
3328
  }
3410
3329
  //#endregion
3411
- //#region src/ui/JimboPanelSplitter.tsx
3412
- function ia({ orientation: e = "vertical", onDrag: t, onKeyAdjust: n, className: r = "", "aria-label": i }) {
3413
- let a = _(!1), o = _(0), s = _(t);
3414
- h(() => {
3415
- s.current = t;
3416
- });
3417
- let c = f((t) => {
3418
- t.preventDefault(), t.target.setPointerCapture(t.pointerId), a.current = !0, o.current = e === "vertical" ? t.clientX : t.clientY;
3419
- }, [e]);
3420
- m(() => {
3421
- function t(t) {
3422
- if (!a.current) return;
3423
- let n = e === "vertical" ? t.clientX : t.clientY, r = n - o.current;
3424
- r !== 0 && (o.current = n, s.current(r));
3425
- }
3426
- function n() {
3427
- a.current = !1;
3428
- }
3429
- return window.addEventListener("pointermove", t), window.addEventListener("pointerup", n), window.addEventListener("pointercancel", n), () => {
3430
- window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", n), window.removeEventListener("pointercancel", n);
3431
- };
3432
- }, [e]);
3433
- let l = e === "vertical";
3434
- return /* @__PURE__ */ b("button", {
3435
- "aria-label": i ?? "Resize panel",
3436
- onKeyDown: (e) => {
3437
- 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));
3438
- },
3439
- onPointerDown: c,
3440
- className: `j-panel-splitter ${r}`.trim(),
3441
- "data-orientation": e,
3442
- type: "button"
3443
- });
3444
- }
3445
- //#endregion
3446
- export { M as $, De as A, he as B, ze as C, Pe as D, Ie as E, Se as F, ce as G, de as H, xe as I, oe as J, ue as K, ve as L, Ce as M, Te as N, Ne as O, we as P, re as Q, _e as R, He as S, Le as T, le as U, fe as V, P as W, ae as X, N as Y, te as Z, Ge as _, ea as a, Ve as b, Xi as c, Ze as d, ee as et, Xe as f, Ke as g, qe as h, ta as i, Ee as j, Ae as k, et as l, Je as m, ra as n, $i as o, Ye as p, se as q, na as r, Qi as s, ia as t, Qe as u, Be as v, Re as w, Ue as x, We as y, ge 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 };
3447
3331
 
3448
- //# sourceMappingURL=ui-Dn8IIoV3.js.map
3332
+ //# sourceMappingURL=ui-LfKBGL5-.js.map