jaml-ui 4.3.1 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/assets/jammy-seed-mascot.png +0 -0
  2. package/dist/assets/8BitDeck-B09C1jGy.png +0 -0
  3. package/dist/assets/BlindChips-Bnvhn76w.png +0 -0
  4. package/dist/assets/Boosters-Bqv_YhIn.png +0 -0
  5. package/dist/assets/Editions-B3YPqPOl.png +0 -0
  6. package/dist/assets/Enhancers-DhIlUuTX.png +0 -0
  7. package/dist/assets/Jokers-1egXSFFQ.png +0 -0
  8. package/dist/assets/Tarots-DkrFk7iW.png +0 -0
  9. package/dist/assets/Vouchers-Cdp8BeSE.png +0 -0
  10. package/dist/assets/balatro-stake-chips-BdO-bw7c.png +0 -0
  11. package/dist/assets/jammy-seed-mascot-BdoW3O33.png +0 -0
  12. package/dist/assets/m6x11plus-C8RqtTtG.ttf +0 -0
  13. package/dist/assets/stickers-B6y5vEyc.png +0 -0
  14. package/dist/assets/tags-BdxcVWR4.png +0 -0
  15. package/dist/chunks/JimboSwipeDeck-DbzWak3V.js +2051 -0
  16. package/dist/chunks/JimboSwipeDeck-DbzWak3V.js.map +1 -0
  17. package/dist/chunks/spriteMapper-gImEz0wa.js +501 -0
  18. package/dist/chunks/spriteMapper-gImEz0wa.js.map +1 -0
  19. package/dist/components/DailyRitualView.d.ts +17 -0
  20. package/dist/components/DeckStakePicker.d.ts +12 -0
  21. package/dist/components/JamlIde.d.ts +9 -0
  22. package/dist/components/JamlIdeToolbar.d.ts +2 -5
  23. package/dist/components/JamlIdeVisual.d.ts +30 -0
  24. package/dist/components/JamlMapPreview.d.ts +12 -0
  25. package/dist/components/Jamlyzer.d.ts +14 -2
  26. package/dist/components/JamlyzerBulk.d.ts +5 -4
  27. package/dist/components/JamlyzerView.d.ts +1 -12
  28. package/dist/components/SeedLab.d.ts +12 -0
  29. package/dist/components/jamlSeedUtils.d.ts +1 -0
  30. package/dist/components/jamlyzer/JamlyzerAnteDetails.d.ts +4 -0
  31. package/dist/components/jamlyzer/JamlyzerErraticDeck.d.ts +2 -2
  32. package/dist/components/jamlyzer/JamlyzerPackSection.d.ts +1 -5
  33. package/dist/components/jamlyzer/JamlyzerPulls.d.ts +2 -2
  34. package/dist/components/jamlyzer/JamlyzerSeedCard.d.ts +21 -0
  35. package/dist/components/jamlyzer/JamlyzerTape.d.ts +10 -0
  36. package/dist/components/jamlyzer/highlight.d.ts +3 -3
  37. package/dist/core.js +2 -2
  38. package/dist/decode/motelyItemDecoder.d.ts +1 -0
  39. package/dist/decode/motelySprite.d.ts +10 -13
  40. package/dist/decode/motelySpriteLut.generated.d.ts +2 -0
  41. package/dist/index.d.ts +13 -1
  42. package/dist/index.js +20903 -17732
  43. package/dist/index.js.map +1 -1
  44. package/dist/json-render/JimboJsonRenderer.d.ts +21 -0
  45. package/dist/json-render/catalog.d.ts +304 -180
  46. package/dist/json-render/index.d.ts +5 -30
  47. package/dist/json-render/registry.d.ts +2 -12
  48. package/dist/lib/daily/ritual.d.ts +43 -0
  49. package/dist/lib/jaml/{parseClauses.d.ts → jaml.d.ts} +17 -13
  50. package/dist/lib/jaml/rarity.d.ts +53 -0
  51. package/dist/lib/jaml/rarityData.generated.d.ts +727 -0
  52. package/dist/ui/JimboApp.d.ts +8 -6
  53. package/dist/ui/JimboBackground.d.ts +5 -13
  54. package/dist/ui/JimboBox.d.ts +16 -0
  55. package/dist/ui/JimboButton.d.ts +1 -1
  56. package/dist/ui/JimboCanvas.d.ts +12 -0
  57. package/dist/ui/JimboDock.d.ts +21 -0
  58. package/dist/ui/JimboInline.d.ts +11 -0
  59. package/dist/ui/JimboLink.d.ts +11 -0
  60. package/dist/ui/JimboMascot.d.ts +51 -5
  61. package/dist/ui/JimboOrbitalMenu.d.ts +81 -9
  62. package/dist/ui/JimboPanelSpinner.d.ts +14 -0
  63. package/dist/ui/JimboPicker.d.ts +1 -1
  64. package/dist/ui/JimboSeedCopyChip.d.ts +1 -2
  65. package/dist/ui/JimboShopBelt.d.ts +9 -0
  66. package/dist/ui/dockTree.d.ts +31 -0
  67. package/dist/ui/hooks.d.ts +1 -1
  68. package/dist/ui/jammySeedMascotImage.d.ts +1 -1
  69. package/dist/ui/jimbo.css +1 -1
  70. package/dist/ui/orbitalLayout.d.ts +149 -0
  71. package/dist/ui/orbitalMenuStore.d.ts +70 -0
  72. package/dist/ui/tokens.d.ts +9 -36
  73. package/dist/ui/useMotionPreference.d.ts +19 -0
  74. package/dist/ui.d.ts +20 -2
  75. package/dist/ui.js +77 -30
  76. package/dist/vocab.d.ts +26 -0
  77. package/package.json +36 -40
  78. package/README.md +0 -78
  79. package/assets/fonts/README.md +0 -14
  80. package/dist/chunks/JimboSwipeDeck-D2AVuZep.js +0 -967
  81. package/dist/chunks/JimboSwipeDeck-D2AVuZep.js.map +0 -1
  82. package/dist/chunks/motelyItemDecoder-Cb-RjvQ0.js +0 -692
  83. package/dist/chunks/motelyItemDecoder-Cb-RjvQ0.js.map +0 -1
  84. package/dist/chunks/spriteMapper-Dfr2_j0_.js +0 -501
  85. package/dist/chunks/spriteMapper-Dfr2_j0_.js.map +0 -1
  86. package/dist/components/jamlyzer/JamlyzerRail.d.ts +0 -14
  87. package/dist/json-render/builders/analyzer.d.ts +0 -23
  88. package/dist/json-render/builders/encyclopedia.d.ts +0 -14
  89. package/dist/json-render/builders/search.d.ts +0 -24
  90. package/dist/json-render/components/domain.d.ts +0 -59
  91. package/dist/json-render/components/game.d.ts +0 -18
  92. package/dist/json-render/components/layout.d.ts +0 -47
  93. package/dist/json-render/components/mascot.d.ts +0 -23
  94. package/dist/json-render/components/reference.d.ts +0 -39
  95. package/dist/json-render/engine.d.ts +0 -38
  96. package/dist/json-render/knowledge/bosses.d.ts +0 -18
  97. package/dist/json-render/knowledge/decks.d.ts +0 -22
  98. package/dist/json-render/knowledge/jokers.d.ts +0 -23
  99. package/dist/json-render/knowledge/synergies.d.ts +0 -21
  100. package/dist/lib/motely/jamlParse.d.ts +0 -4
  101. package/dist/lib/motely/runtime.d.ts +0 -1
  102. package/dist/motely.d.ts +0 -4
  103. package/dist/motely.js +0 -84
  104. package/dist/motely.js.map +0 -1
@@ -0,0 +1,2051 @@
1
+ import { jsx as a, jsxs as _, Fragment as Ge } from "react/jsx-runtime";
2
+ import U, { useState as T, useRef as J, useEffect as W, useId as Ye, useCallback as q, useLayoutEffect as Ee, useSyncExternalStore as Xe, useMemo as Ce, Children as Ke } from "react";
3
+ import { j as He, k as Ze, r as Ve } from "./spriteMapper-gImEz0wa.js";
4
+ const $ = U.forwardRef(
5
+ function({ as: t = "div", children: n, ...r }, o) {
6
+ return /* @__PURE__ */ a(t, { ref: o, ...r, children: n });
7
+ }
8
+ ), pn = U.forwardRef(
9
+ function({ children: t, ...n }, r) {
10
+ return /* @__PURE__ */ a("canvas", { ref: r, ...n, children: t });
11
+ }
12
+ ), qe = {
13
+ red: "j-section-header__tag--red",
14
+ orange: "j-section-header__tag--orange",
15
+ blue: "j-section-header__tag--blue",
16
+ green: "j-section-header__tag--green",
17
+ purple: "j-section-header__tag--purple",
18
+ gold: "j-section-header__tag--gold",
19
+ grey: "j-section-header__tag--grey"
20
+ }, Qe = {
21
+ red: "j-section-header__rule--red",
22
+ orange: "j-section-header__rule--orange",
23
+ blue: "j-section-header__rule--blue",
24
+ green: "j-section-header__rule--green",
25
+ purple: "j-section-header__rule--purple",
26
+ gold: "j-section-header__rule--gold",
27
+ grey: "j-section-header__rule--grey"
28
+ };
29
+ function et({
30
+ label: e,
31
+ tone: t = "blue",
32
+ className: n,
33
+ ...r
34
+ }) {
35
+ const o = ["j-section-header", n].filter(Boolean).join(" ");
36
+ return /* @__PURE__ */ _("div", { className: o, ...r, children: [
37
+ /* @__PURE__ */ a("span", { className: `j-section-header__tag ${qe[t]}`, children: e }),
38
+ /* @__PURE__ */ a("span", { className: `j-section-header__rule ${Qe[t]}`, "aria-hidden": !0 })
39
+ ] });
40
+ }
41
+ function fn({
42
+ title: e,
43
+ tone: t = "blue",
44
+ body: n,
45
+ className: r,
46
+ children: o,
47
+ ...i
48
+ }) {
49
+ const s = ["j-panel", r].filter(Boolean).join(" "), u = n ?? !!e;
50
+ return /* @__PURE__ */ _("div", { className: s, ...i, children: [
51
+ e != null && e !== !1 ? /* @__PURE__ */ a(et, { label: e, tone: t }) : null,
52
+ u ? /* @__PURE__ */ a("div", { className: "j-panel__body", children: o }) : o
53
+ ] });
54
+ }
55
+ const tt = {
56
+ micro: "j-text--micro",
57
+ xs: "j-text--xs",
58
+ sm: "j-text--sm",
59
+ md: "j-text--md",
60
+ lg: "j-text--lg",
61
+ xl: "j-text--xl",
62
+ display: "j-text--display"
63
+ }, nt = {
64
+ white: "j-text--white",
65
+ grey: "j-text--grey",
66
+ gold: "j-text--gold",
67
+ red: "j-text--red",
68
+ blue: "j-text--blue",
69
+ green: "j-text--green",
70
+ orange: "j-text--orange",
71
+ purple: "j-text--purple"
72
+ };
73
+ function Y({ size: e = "md", tone: t = "white", className: n, children: r, ...o }) {
74
+ const i = ["j-text", tt[e], nt[t], n].filter(Boolean).join(" ");
75
+ return /* @__PURE__ */ a("span", { className: i, ...o, children: r });
76
+ }
77
+ const rt = {
78
+ "j-stack": {
79
+ gap: {
80
+ xs: "j-stack--gap-xs",
81
+ sm: "j-stack--gap-sm",
82
+ md: "j-stack--gap-md",
83
+ lg: "j-stack--gap-lg",
84
+ xl: "j-stack--gap-xl"
85
+ },
86
+ align: {
87
+ start: "j-stack--align-start",
88
+ center: "j-stack--align-center",
89
+ end: "j-stack--align-end",
90
+ stretch: "j-stack--align-stretch"
91
+ },
92
+ justify: {
93
+ start: "j-stack--justify-start",
94
+ center: "j-stack--justify-center",
95
+ end: "j-stack--justify-end",
96
+ between: "j-stack--justify-between"
97
+ }
98
+ },
99
+ "j-row": {
100
+ gap: {
101
+ xs: "j-row--gap-xs",
102
+ sm: "j-row--gap-sm",
103
+ md: "j-row--gap-md",
104
+ lg: "j-row--gap-lg",
105
+ xl: "j-row--gap-xl"
106
+ },
107
+ align: {
108
+ start: "j-row--align-start",
109
+ center: "j-row--align-center",
110
+ end: "j-row--align-end",
111
+ stretch: "j-row--align-stretch"
112
+ },
113
+ justify: {
114
+ start: "j-row--justify-start",
115
+ center: "j-row--justify-center",
116
+ end: "j-row--justify-end",
117
+ between: "j-row--justify-between"
118
+ }
119
+ }
120
+ };
121
+ function Le(e, { gap: t = "md", align: n, justify: r }, o, i) {
122
+ const s = rt[e];
123
+ return [
124
+ e,
125
+ s.gap[t],
126
+ n && s.align[n],
127
+ r && s.justify[r],
128
+ i,
129
+ o
130
+ ].filter(Boolean).join(" ");
131
+ }
132
+ function mn({
133
+ gap: e,
134
+ align: t,
135
+ justify: n,
136
+ className: r,
137
+ children: o,
138
+ ...i
139
+ }) {
140
+ return /* @__PURE__ */ a("div", { className: Le("j-stack", { gap: e, align: t, justify: n }, r), ...i, children: o });
141
+ }
142
+ function ot({
143
+ gap: e,
144
+ align: t = "center",
145
+ justify: n,
146
+ wrap: r,
147
+ className: o,
148
+ children: i,
149
+ ...s
150
+ }) {
151
+ return /* @__PURE__ */ a(
152
+ "div",
153
+ {
154
+ className: Le(
155
+ "j-row",
156
+ { gap: e, align: t, justify: n },
157
+ o,
158
+ r ? "j-row--wrap" : void 0
159
+ ),
160
+ ...s,
161
+ children: i
162
+ }
163
+ );
164
+ }
165
+ var Pe = {
166
+ color: void 0,
167
+ size: void 0,
168
+ className: void 0,
169
+ style: void 0,
170
+ attr: void 0
171
+ }, he = U.createContext && /* @__PURE__ */ U.createContext(Pe), at = ["attr", "size", "title"];
172
+ function it(e, t) {
173
+ if (e == null) return {};
174
+ var n, r, o = st(e, t);
175
+ if (Object.getOwnPropertySymbols) {
176
+ var i = Object.getOwnPropertySymbols(e);
177
+ for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
178
+ }
179
+ return o;
180
+ }
181
+ function st(e, t) {
182
+ if (e == null) return {};
183
+ var n = {};
184
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
185
+ if (t.indexOf(r) !== -1) continue;
186
+ n[r] = e[r];
187
+ }
188
+ return n;
189
+ }
190
+ function ie() {
191
+ return ie = Object.assign ? Object.assign.bind() : function(e) {
192
+ for (var t = 1; t < arguments.length; t++) {
193
+ var n = arguments[t];
194
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
195
+ }
196
+ return e;
197
+ }, ie.apply(null, arguments);
198
+ }
199
+ function ge(e, t) {
200
+ var n = Object.keys(e);
201
+ if (Object.getOwnPropertySymbols) {
202
+ var r = Object.getOwnPropertySymbols(e);
203
+ t && (r = r.filter(function(o) {
204
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
205
+ })), n.push.apply(n, r);
206
+ }
207
+ return n;
208
+ }
209
+ function se(e) {
210
+ for (var t = 1; t < arguments.length; t++) {
211
+ var n = arguments[t] != null ? arguments[t] : {};
212
+ t % 2 ? ge(Object(n), !0).forEach(function(r) {
213
+ lt(e, r, n[r]);
214
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ge(Object(n)).forEach(function(r) {
215
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
216
+ });
217
+ }
218
+ return e;
219
+ }
220
+ function lt(e, t, n) {
221
+ return (t = ct(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
222
+ }
223
+ function ct(e) {
224
+ var t = ut(e, "string");
225
+ return typeof t == "symbol" ? t : t + "";
226
+ }
227
+ function ut(e, t) {
228
+ if (typeof e != "object" || !e) return e;
229
+ var n = e[Symbol.toPrimitive];
230
+ if (n !== void 0) {
231
+ var r = n.call(e, t);
232
+ if (typeof r != "object") return r;
233
+ throw new TypeError("@@toPrimitive must return a primitive value.");
234
+ }
235
+ return (t === "string" ? String : Number)(e);
236
+ }
237
+ function Ae(e) {
238
+ return e && e.map((t, n) => /* @__PURE__ */ U.createElement(t.tag, se({
239
+ key: n
240
+ }, t.attr), Ae(t.child)));
241
+ }
242
+ function I(e) {
243
+ return (t) => /* @__PURE__ */ U.createElement(dt, ie({
244
+ attr: se({}, e.attr)
245
+ }, t), Ae(e.child));
246
+ }
247
+ function dt(e) {
248
+ var t = (n) => {
249
+ var r = e.attr, o = e.size, i = e.title, s = it(e, at), u = o || n.size || "1em", p;
250
+ return n.className && (p = n.className), e.className && (p = (p ? p + " " : "") + e.className), /* @__PURE__ */ U.createElement("svg", ie({
251
+ stroke: "currentColor",
252
+ fill: "currentColor",
253
+ strokeWidth: "0"
254
+ }, n.attr, r, s, {
255
+ className: p,
256
+ style: se(se({
257
+ color: e.color || n.color
258
+ }, n.style), e.style),
259
+ height: u,
260
+ width: u,
261
+ xmlns: "http://www.w3.org/2000/svg"
262
+ }), i && /* @__PURE__ */ U.createElement("title", null, i), e.children);
263
+ };
264
+ return he !== void 0 ? /* @__PURE__ */ U.createElement(he.Consumer, null, (n) => t(n)) : t(Pe);
265
+ }
266
+ function Te(e) {
267
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "line", attr: { x1: "18", y1: "6", x2: "6", y2: "18" }, child: [] }, { tag: "line", attr: { x1: "6", y1: "6", x2: "18", y2: "18" }, child: [] }] })(e);
268
+ }
269
+ function hn(e) {
270
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polygon", attr: { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }, child: [] }] })(e);
271
+ }
272
+ function gn(e) {
273
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(e);
274
+ }
275
+ function pt(e) {
276
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "1 4 1 10 7 10" }, child: [] }, { tag: "path", attr: { d: "M3.51 15a9 9 0 1 0 2.13-9.36L1 10" }, child: [] }] })(e);
277
+ }
278
+ function bn(e) {
279
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polygon", attr: { points: "5 3 19 12 5 21 5 3" }, child: [] }] })(e);
280
+ }
281
+ function ft(e) {
282
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "5 9 2 12 5 15" }, child: [] }, { tag: "polyline", attr: { points: "9 5 12 2 15 5" }, child: [] }, { tag: "polyline", attr: { points: "15 19 12 22 9 19" }, child: [] }, { tag: "polyline", attr: { points: "19 9 22 12 19 15" }, child: [] }, { tag: "line", attr: { x1: "2", y1: "12", x2: "22", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "2", x2: "12", y2: "22" }, child: [] }] })(e);
283
+ }
284
+ function mt(e) {
285
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "4 14 10 14 10 20" }, child: [] }, { tag: "polyline", attr: { points: "20 10 14 10 14 4" }, child: [] }, { tag: "line", attr: { x1: "14", y1: "10", x2: "21", y2: "3" }, child: [] }, { tag: "line", attr: { x1: "3", y1: "21", x2: "10", y2: "14" }, child: [] }] })(e);
286
+ }
287
+ function ht(e) {
288
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "15 3 21 3 21 9" }, child: [] }, { tag: "polyline", attr: { points: "9 21 3 21 3 15" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "3", x2: "14", y2: "10" }, child: [] }, { tag: "line", attr: { x1: "3", y1: "21", x2: "10", y2: "14" }, child: [] }] })(e);
289
+ }
290
+ function jn(e) {
291
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, child: [] }, { tag: "polyline", attr: { points: "7 10 12 15 17 10" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "15", x2: "12", y2: "3" }, child: [] }] })(e);
292
+ }
293
+ function gt(e) {
294
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "rect", attr: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, child: [] }, { tag: "path", attr: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, child: [] }] })(e);
295
+ }
296
+ function vn(e) {
297
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "16 18 22 12 16 6" }, child: [] }, { tag: "polyline", attr: { points: "8 6 2 12 8 18" }, child: [] }] })(e);
298
+ }
299
+ function bt(e) {
300
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "9 18 15 12 9 6" }, child: [] }] })(e);
301
+ }
302
+ function jt(e) {
303
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "15 18 9 12 15 6" }, child: [] }] })(e);
304
+ }
305
+ function Re(e) {
306
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "20 6 9 17 4 12" }, child: [] }] })(e);
307
+ }
308
+ const vt = {
309
+ xs: "j-btn--xs",
310
+ sm: "j-btn--sm",
311
+ md: "j-btn--md",
312
+ lg: "j-btn--lg"
313
+ }, _t = {
314
+ orange: "j-btn--orange",
315
+ red: "j-btn--red",
316
+ blue: "j-btn--blue",
317
+ green: "j-btn--green",
318
+ purple: "j-btn--purple",
319
+ grey: "j-btn--grey"
320
+ };
321
+ function X({
322
+ size: e = "md",
323
+ tone: t = "orange",
324
+ fullWidth: n = !1,
325
+ label: r,
326
+ className: o,
327
+ children: i,
328
+ disabled: s,
329
+ ...u
330
+ }) {
331
+ const p = [
332
+ "j-btn",
333
+ vt[e],
334
+ _t[t],
335
+ n ? "j-btn--full" : "",
336
+ s ? "j-btn--disabled" : "",
337
+ o
338
+ ].filter(Boolean).join(" ");
339
+ return /* @__PURE__ */ a("button", { className: p, disabled: s, ...u, children: /* @__PURE__ */ a("span", { className: "j-btn__face", children: r ?? i }) });
340
+ }
341
+ function _n({
342
+ value: e,
343
+ placeholder: t = "--------",
344
+ disabled: n = !1,
345
+ copiedLabel: r = "Copied!",
346
+ copiedDurationMs: o = 2e3,
347
+ onCopy: i,
348
+ className: s = "",
349
+ style: u
350
+ }) {
351
+ const [p, j] = T(!1), l = J(null), c = e.trim(), f = !n && c.length > 0;
352
+ W(
353
+ () => () => {
354
+ l.current && clearTimeout(l.current);
355
+ },
356
+ []
357
+ );
358
+ const y = async () => {
359
+ var k;
360
+ if (f) {
361
+ try {
362
+ typeof navigator < "u" && ((k = navigator.clipboard) != null && k.writeText) && await navigator.clipboard.writeText(c);
363
+ } catch {
364
+ }
365
+ j(!0), i == null || i(c), l.current && clearTimeout(l.current), l.current = setTimeout(() => j(!1), o);
366
+ }
367
+ }, x = ["j-seed-copy", p ? "j-seed-copy--copied" : "", s].filter(Boolean).join(" ");
368
+ return /* @__PURE__ */ _(
369
+ X,
370
+ {
371
+ className: x,
372
+ style: u,
373
+ onClick: y,
374
+ disabled: !f,
375
+ fullWidth: !0,
376
+ "aria-label": f ? `Copy seed ${c}` : "Seed unavailable",
377
+ children: [
378
+ /* @__PURE__ */ a("span", { className: "j-seed-copy__icon", "aria-hidden": !0, children: p ? /* @__PURE__ */ a(Re, { size: 18 }) : /* @__PURE__ */ a(gt, { size: 18 }) }),
379
+ /* @__PURE__ */ a("span", { className: "j-seed-copy__text", children: p ? r : c || t })
380
+ ]
381
+ }
382
+ );
383
+ }
384
+ function yn({ className: e, children: t, ...n }) {
385
+ const r = ["j-inner-panel", e].filter(Boolean).join(" ");
386
+ return /* @__PURE__ */ a("div", { className: r, ...n, children: t });
387
+ }
388
+ function xn({ open: e, onClose: t, title: n, className: r, children: o }) {
389
+ const i = Ye();
390
+ return W(() => {
391
+ if (!e || !t) return;
392
+ const s = (u) => {
393
+ u.key === "Escape" && t();
394
+ };
395
+ return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
396
+ }, [e, t]), e ? /* @__PURE__ */ a("div", { className: "j-modal-overlay", onClick: t, children: /* @__PURE__ */ _(
397
+ "div",
398
+ {
399
+ className: ["j-modal", "j-panel", r].filter(Boolean).join(" "),
400
+ role: "dialog",
401
+ "aria-modal": "true",
402
+ "aria-labelledby": n ? i : void 0,
403
+ onClick: (s) => s.stopPropagation(),
404
+ children: [
405
+ n && /* @__PURE__ */ a("h2", { id: i, className: "j-modal__title", children: n }),
406
+ /* @__PURE__ */ a("div", { className: "j-panel__body", children: o })
407
+ ]
408
+ }
409
+ ) }) : null;
410
+ }
411
+ function kn({
412
+ value: e,
413
+ label: t,
414
+ onPrev: n,
415
+ onNext: r,
416
+ canPrev: o = !0,
417
+ canNext: i = !0,
418
+ className: s = ""
419
+ }) {
420
+ return /* @__PURE__ */ _("div", { className: `j-spinner-wrap ${s}`, children: [
421
+ t && /* @__PURE__ */ a("div", { className: "j-spinner__label", children: /* @__PURE__ */ a(Y, { size: "sm", tone: "white", children: t }) }),
422
+ /* @__PURE__ */ _("div", { className: "j-spinner", children: [
423
+ /* @__PURE__ */ a(
424
+ X,
425
+ {
426
+ tone: "red",
427
+ size: "sm",
428
+ onClick: n,
429
+ disabled: !o,
430
+ "aria-label": `Previous ${t ?? "value"}`,
431
+ children: "<"
432
+ }
433
+ ),
434
+ /* @__PURE__ */ a("div", { className: "j-spinner__value", children: /* @__PURE__ */ a(Y, { size: "sm", tone: "white", children: e }) }),
435
+ /* @__PURE__ */ a(
436
+ X,
437
+ {
438
+ tone: "red",
439
+ size: "sm",
440
+ onClick: r,
441
+ disabled: !i,
442
+ "aria-label": `Next ${t ?? "value"}`,
443
+ children: ">"
444
+ }
445
+ )
446
+ ] })
447
+ ] });
448
+ }
449
+ const yt = {
450
+ RED: "#fe5148",
451
+ BLUE: "#0093ff",
452
+ GREEN: "#429f79",
453
+ ORANGE: "#ff9800",
454
+ GOLD: "#e4b643",
455
+ PURPLE: "#9e74ce",
456
+ PLANET: "#00a7ca",
457
+ SPECTRAL: "#2e76fd",
458
+ DARK_RED: "#a02721",
459
+ DARK_BLUE: "#0057a1",
460
+ DARK_ORANGE: "#a05b00",
461
+ DARK_GREEN: "#215f46",
462
+ DARK_GREY: "#3a5055",
463
+ DARKEST: "#1e2b2d",
464
+ GREY: "#a8bcbf",
465
+ TEAL_GREY: "#404c4e",
466
+ SURFACE: "#3a5055",
467
+ SURFACE_INSET: "#2a3a3f",
468
+ PANEL_EDGE: "#1e2e32",
469
+ INNER_BORDER: "#334461",
470
+ BORDER_SILVER: "#b9c2d2",
471
+ BORDER_SOUTH: "#777e89",
472
+ GREEN_TEXT: "#35bd86",
473
+ WHITE: "#ffffff",
474
+ BLACK: "#000000",
475
+ /** Same decision as GOLD — kept so CodeMirror / old callers don't grow a second gold. */
476
+ GOLD_TEXT: "#e4b643"
477
+ };
478
+ function wn(e, t) {
479
+ const n = e.replace("#", ""), r = parseInt(n.slice(0, 2), 16), o = parseInt(n.slice(2, 4), 16), i = parseInt(n.slice(4, 6), 16);
480
+ return `rgba(${r}, ${o}, ${i}, ${t})`;
481
+ }
482
+ const Sn = {
483
+ JUICE_UP_SCALE: 1.05,
484
+ JUICE_EASING: "cubic-bezier(0.16, 1, 0.3, 1)",
485
+ SWAY_AMOUNT: 1.5,
486
+ SWAY_DURATION: 4e3
487
+ }, Z = yt, xt = {
488
+ xs: 22,
489
+ sm: 26,
490
+ md: 30
491
+ }, kt = {
492
+ default: { rest: Z.DARKEST, hover: Z.DARK_GREY, border: Z.PANEL_EDGE },
493
+ destructive: { rest: Z.RED, hover: Z.ORANGE, border: Z.BLACK }
494
+ };
495
+ function ee({
496
+ onClick: e,
497
+ onMouseDown: t,
498
+ onTouchStart: n,
499
+ title: r,
500
+ "aria-label": o,
501
+ disabled: i = !1,
502
+ size: s = "md",
503
+ tone: u = "default",
504
+ children: p
505
+ }) {
506
+ const [j, l] = T(!1), c = xt[s], f = kt[u], y = u === "destructive" ? 2 : 1, x = u === "destructive" ? `inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 ${Z.BLACK}` : void 0;
507
+ return /* @__PURE__ */ a(
508
+ "button",
509
+ {
510
+ "aria-label": o ?? r,
511
+ disabled: i,
512
+ onClick: (k) => !i && (e == null ? void 0 : e(k)),
513
+ onMouseDown: t,
514
+ onTouchStart: n,
515
+ onMouseEnter: () => l(!0),
516
+ onMouseLeave: () => l(!1),
517
+ style: {
518
+ width: c,
519
+ height: c,
520
+ display: "inline-grid",
521
+ placeItems: "center",
522
+ background: j && !i ? f.hover : f.rest,
523
+ color: Z.WHITE,
524
+ border: `${y}px solid ${f.border}`,
525
+ borderRadius: 4,
526
+ boxShadow: x,
527
+ cursor: i ? "not-allowed" : "pointer",
528
+ opacity: i ? 0.55 : 1,
529
+ padding: 0,
530
+ fontSize: 14,
531
+ lineHeight: 1,
532
+ transition: "background 80ms ease"
533
+ },
534
+ title: r,
535
+ type: "button",
536
+ children: p
537
+ }
538
+ );
539
+ }
540
+ const wt = 280, St = 260;
541
+ function Nn({ children: e, className: t, onNearEnd: n, snap: r = !1 }) {
542
+ const o = J(null), i = J(null), [s, u] = T(!1), p = q(() => {
543
+ const c = o.current;
544
+ !c || !n || c.scrollWidth - (c.scrollLeft + c.clientWidth) <= wt && n();
545
+ }, [n]);
546
+ W(() => {
547
+ const c = o.current;
548
+ if (!c) return;
549
+ const f = (y) => {
550
+ if (c.scrollWidth <= c.clientWidth) return;
551
+ const x = Math.abs(y.deltaY) > Math.abs(y.deltaX) ? y.deltaY : y.deltaX;
552
+ x !== 0 && (c.scrollLeft += x, y.preventDefault(), p());
553
+ };
554
+ return c.addEventListener("wheel", f, { passive: !1 }), () => c.removeEventListener("wheel", f);
555
+ }, [p]);
556
+ const j = (c) => {
557
+ var f;
558
+ (f = o.current) == null || f.scrollBy({ left: c * St, behavior: "smooth" }), c > 0 && p();
559
+ }, l = [
560
+ "j-shop-belt",
561
+ "j-shop-belt--grab",
562
+ r ? "j-shop-belt--snap" : "",
563
+ s ? "j-shop-belt--grabbing" : "",
564
+ t
565
+ ].filter(Boolean).join(" ");
566
+ return /* @__PURE__ */ _($, { className: "j-shop-belt-wrap", children: [
567
+ /* @__PURE__ */ a(ee, { size: "sm", "aria-label": "Scroll left", onClick: () => j(-1), children: /* @__PURE__ */ a(jt, {}) }),
568
+ /* @__PURE__ */ a(
569
+ $,
570
+ {
571
+ ref: o,
572
+ className: l,
573
+ onScroll: p,
574
+ onPointerDown: (c) => {
575
+ c.button === 0 && (i.current = { id: c.pointerId, x: c.clientX, left: c.currentTarget.scrollLeft }, c.currentTarget.setPointerCapture(c.pointerId), u(!0));
576
+ },
577
+ onPointerMove: (c) => {
578
+ const f = i.current;
579
+ !f || f.id !== c.pointerId || (c.currentTarget.scrollLeft = f.left - (c.clientX - f.x));
580
+ },
581
+ onPointerUp: (c) => {
582
+ var f;
583
+ ((f = i.current) == null ? void 0 : f.id) === c.pointerId && (c.currentTarget.hasPointerCapture(c.pointerId) && c.currentTarget.releasePointerCapture(c.pointerId), i.current = null, u(!1), p());
584
+ },
585
+ onPointerCancel: () => {
586
+ i.current = null, u(!1);
587
+ },
588
+ children: e
589
+ }
590
+ ),
591
+ /* @__PURE__ */ a(ee, { size: "sm", "aria-label": "Scroll right", onClick: () => j(1), children: /* @__PURE__ */ a(bt, {}) })
592
+ ] });
593
+ }
594
+ const Nt = {
595
+ sm: "j-badge--sm",
596
+ md: "j-badge--md"
597
+ }, Et = {
598
+ dark: "j-badge--dark",
599
+ blue: "j-badge--blue",
600
+ red: "j-badge--red",
601
+ green: "j-badge--green",
602
+ grey: "j-badge--grey",
603
+ orange: "j-badge--orange",
604
+ purple: "j-badge--purple"
605
+ };
606
+ function En({ size: e = "sm", tone: t = "dark", className: n, children: r, ...o }) {
607
+ const i = ["j-badge", Nt[e], Et[t], n].filter(Boolean).join(" ");
608
+ return /* @__PURE__ */ a("span", { className: i, ...o, children: r });
609
+ }
610
+ function Cn({ children: e, ...t }) {
611
+ return /* @__PURE__ */ a("span", { ...t, children: e });
612
+ }
613
+ function Ln({ children: e, ...t }) {
614
+ return /* @__PURE__ */ a("a", { ...t, children: e });
615
+ }
616
+ function Pn({ className: e, ref: t, ...n }) {
617
+ const r = ["j-text-input", e].filter(Boolean).join(" ");
618
+ return /* @__PURE__ */ a("input", { ref: t, className: r, ...n });
619
+ }
620
+ function An({
621
+ onPrev: e,
622
+ onNext: t,
623
+ canPrev: n = !0,
624
+ canNext: r = !0,
625
+ prevLabel: o = "Previous",
626
+ nextLabel: i = "Next",
627
+ children: s,
628
+ className: u = "",
629
+ style: p
630
+ }) {
631
+ return /* @__PURE__ */ _("div", { className: `j-flank ${u}`, style: p, children: [
632
+ /* @__PURE__ */ a(be, { direction: "left", onClick: e, disabled: !n, "aria-label": o }),
633
+ /* @__PURE__ */ a("div", { className: "j-flank__content", children: s }),
634
+ /* @__PURE__ */ a(be, { direction: "right", onClick: t, disabled: !r, "aria-label": i })
635
+ ] });
636
+ }
637
+ function be({
638
+ direction: e,
639
+ onClick: t,
640
+ disabled: n,
641
+ "aria-label": r
642
+ }) {
643
+ const [o, i] = U.useState(!1);
644
+ return /* @__PURE__ */ a(
645
+ "button",
646
+ {
647
+ type: "button",
648
+ className: "j-flank__btn",
649
+ "data-pressed": o && !n,
650
+ onClick: t,
651
+ disabled: n,
652
+ "aria-label": r,
653
+ title: r,
654
+ onMouseDown: () => !n && i(!0),
655
+ onMouseUp: () => i(!1),
656
+ onMouseLeave: () => i(!1),
657
+ onTouchStart: () => !n && i(!0),
658
+ onTouchEnd: () => i(!1),
659
+ children: /* @__PURE__ */ a(Ct, { direction: e })
660
+ }
661
+ );
662
+ }
663
+ function Ct({ direction: e }) {
664
+ return /* @__PURE__ */ a("svg", { width: 28, height: 28, viewBox: "0 0 28 28", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ a("polyline", { points: e === "left" ? "18,4 8,14 18,24" : "10,4 20,14 10,24" }) });
665
+ }
666
+ function Tn({
667
+ label: e,
668
+ title: t,
669
+ description: n,
670
+ media: r,
671
+ onPrev: o,
672
+ onNext: i,
673
+ canPrev: s = !0,
674
+ canNext: u = !0,
675
+ className: p = ""
676
+ }) {
677
+ return /* @__PURE__ */ _("div", { className: ["j-panel-spinner", p].filter(Boolean).join(" "), children: [
678
+ e ? /* @__PURE__ */ a("div", { className: "j-panel-spinner__label", children: /* @__PURE__ */ a(Y, { size: "sm", tone: "white", children: e }) }) : null,
679
+ /* @__PURE__ */ _("div", { className: "j-panel-spinner__row", children: [
680
+ /* @__PURE__ */ a(
681
+ X,
682
+ {
683
+ tone: "red",
684
+ size: "sm",
685
+ className: "j-panel-spinner__arrow j-panel-spinner__arrow--left",
686
+ onClick: o,
687
+ disabled: !s,
688
+ "aria-label": `Previous ${e ?? t}`,
689
+ children: "<"
690
+ }
691
+ ),
692
+ /* @__PURE__ */ _("div", { className: "j-panel-spinner__panel", children: [
693
+ r ? /* @__PURE__ */ a("div", { className: "j-panel-spinner__media", children: r }) : null,
694
+ /* @__PURE__ */ a("div", { className: "j-panel-spinner__title", children: /* @__PURE__ */ a(Y, { size: "md", tone: "white", children: t }) }),
695
+ n ? /* @__PURE__ */ a("div", { className: "j-panel-spinner__description", children: /* @__PURE__ */ a(Y, { size: "xs", tone: "grey", children: n }) }) : null
696
+ ] }),
697
+ /* @__PURE__ */ a(
698
+ X,
699
+ {
700
+ tone: "red",
701
+ size: "sm",
702
+ className: "j-panel-spinner__arrow j-panel-spinner__arrow--right",
703
+ onClick: i,
704
+ disabled: !u,
705
+ "aria-label": `Next ${e ?? t}`,
706
+ children: ">"
707
+ }
708
+ )
709
+ ] })
710
+ ] });
711
+ }
712
+ const Lt = /* @__PURE__ */ new Set(["Jokers", "Tarots", "Vouchers", "Boosters"]);
713
+ function Rn({ name: e, sheet: t, width: n, className: r, style: o }) {
714
+ const { pos: i, type: s } = He(e, t), u = Ze[s], p = Lt.has(s) ? Math.round(n * (95 / 71)) : n;
715
+ return /* @__PURE__ */ a(
716
+ "div",
717
+ {
718
+ className: r,
719
+ style: {
720
+ position: "relative",
721
+ display: "inline-block",
722
+ width: n,
723
+ height: p,
724
+ overflow: "hidden",
725
+ imageRendering: "pixelated",
726
+ ...o
727
+ },
728
+ title: e,
729
+ children: /* @__PURE__ */ a(
730
+ "div",
731
+ {
732
+ style: {
733
+ position: "absolute",
734
+ inset: 0,
735
+ backgroundImage: `url(${Ve(u.assetKey)})`,
736
+ backgroundSize: `${u.cols * 100}% ${u.rows * 100}%`,
737
+ backgroundPosition: `${i.x / (u.cols - 1) * 100}% ${i.y / (u.rows - 1) * 100}%`,
738
+ backgroundRepeat: "no-repeat"
739
+ }
740
+ }
741
+ )
742
+ }
743
+ );
744
+ }
745
+ function Bn({ className: e, children: t, ...n }) {
746
+ return /* @__PURE__ */ a("div", { className: ["j-picker", e].filter(Boolean).join(" "), ...n, children: t });
747
+ }
748
+ function Mn({ className: e, children: t, ...n }) {
749
+ return /* @__PURE__ */ a("div", { className: ["j-picker__section", e].filter(Boolean).join(" "), ...n, children: t });
750
+ }
751
+ function On({ className: e, children: t, ...n }) {
752
+ return /* @__PURE__ */ a("div", { className: ["j-picker__search", e].filter(Boolean).join(" "), ...n, children: t });
753
+ }
754
+ function In({ className: e, children: t, ...n }) {
755
+ return /* @__PURE__ */ a("div", { className: ["j-picker__hint", e].filter(Boolean).join(" "), ...n, children: t });
756
+ }
757
+ function Dn({ legendary: e, className: t, children: n, ...r }) {
758
+ const o = ["j-picker__grid", e ? "j-picker__grid--legendary" : "", t].filter(Boolean).join(" ");
759
+ return /* @__PURE__ */ a("div", { className: o, ...r, children: n });
760
+ }
761
+ function Jn({ muted: e, className: t, children: n, ...r }) {
762
+ const o = ["j-picker__item", t].filter(Boolean).join(" ");
763
+ return /* @__PURE__ */ a("button", { type: "button", className: o, "data-muted": e, ...r, children: n });
764
+ }
765
+ function Fn({ className: e, children: t, ...n }) {
766
+ return /* @__PURE__ */ a("div", { className: ["j-picker__pair", e].filter(Boolean).join(" "), ...n, children: t });
767
+ }
768
+ function $n({ className: e, children: t, ...n }) {
769
+ return /* @__PURE__ */ a("div", { className: ["j-picker__empty", e].filter(Boolean).join(" "), ...n, children: t });
770
+ }
771
+ function zn({ tabs: e, activeTab: t, onTabChange: n }) {
772
+ return /* @__PURE__ */ a("div", { className: "j-tabs", children: e.map((r) => {
773
+ const o = r.id === t;
774
+ return /* @__PURE__ */ _("div", { className: "j-tab", children: [
775
+ /* @__PURE__ */ a("div", { className: "j-tab__indicator", "data-active": o, children: /* @__PURE__ */ a("svg", { width: "10", height: "8", viewBox: "0 0 10 8", children: /* @__PURE__ */ a("path", { d: "M5 8 L0 0 L10 0 Z" }) }) }),
776
+ /* @__PURE__ */ a(
777
+ X,
778
+ {
779
+ size: "sm",
780
+ tone: "red",
781
+ label: r.label,
782
+ onClick: () => n(r.id)
783
+ }
784
+ )
785
+ ] }, r.id);
786
+ }) });
787
+ }
788
+ function Un({ active: e, className: t, children: n, ...r }) {
789
+ const o = ["j-list-item", t].filter(Boolean).join(" ");
790
+ return /* @__PURE__ */ a("button", { type: "button", className: o, "data-active": e, ...r, children: n });
791
+ }
792
+ const je = "data-j-motion", de = "jimbo-motion", ve = "(prefers-reduced-motion: reduce)";
793
+ function Pt(e) {
794
+ const t = document.documentElement;
795
+ e === "auto" ? t.removeAttribute(je) : t.setAttribute(je, e);
796
+ }
797
+ function At() {
798
+ try {
799
+ const e = window.localStorage.getItem(de);
800
+ if (e === "full" || e === "reduced") return e;
801
+ } catch {
802
+ }
803
+ return "auto";
804
+ }
805
+ function Wn() {
806
+ const [e, t] = T(
807
+ () => typeof document > "u" ? "auto" : At()
808
+ ), [n, r] = T(
809
+ () => typeof window > "u" ? !1 : window.matchMedia(ve).matches
810
+ );
811
+ W(() => {
812
+ Pt(e);
813
+ }, [e]), W(() => {
814
+ const s = window.matchMedia(ve), u = () => r(s.matches);
815
+ return s.addEventListener("change", u), () => s.removeEventListener("change", u);
816
+ }, []);
817
+ const o = q((s) => {
818
+ t(s);
819
+ try {
820
+ s === "auto" ? window.localStorage.removeItem(de) : window.localStorage.setItem(de, s);
821
+ } catch {
822
+ }
823
+ }, []);
824
+ return { setting: e, setSetting: o, osPrefersReduced: n, effectiveReducedMotion: e === "reduced" ? !0 : e === "full" ? !1 : n };
825
+ }
826
+ const D = {
827
+ primary: [1, 0.2, 0.2],
828
+ // red
829
+ secondary: [0, 0.5, 1],
830
+ // blue
831
+ dark: [0.05, 0.08, 0.1],
832
+ // near-black
833
+ speed: 1,
834
+ spinRotation: -2,
835
+ spinAmount: 0.35,
836
+ pixelFilter: 740 * 0.33,
837
+ contrast: 4.5,
838
+ lighting: 0.5,
839
+ transitionMs: 800
840
+ };
841
+ function Q(e, t) {
842
+ if (!e) return t;
843
+ if (Array.isArray(e)) return [e[0], e[1], e[2]];
844
+ let n = e.trim().replace(/^#/, "");
845
+ if (n.length === 3 && (n = n.split("").map((o) => o + o).join("")), n.length !== 6) return t;
846
+ const r = parseInt(n, 16);
847
+ return Number.isNaN(r) ? t : [(r >> 16 & 255) / 255, (r >> 8 & 255) / 255, (r & 255) / 255];
848
+ }
849
+ function Tt(e = {}) {
850
+ const t = J(null), n = J(e);
851
+ return Ee(() => {
852
+ n.current = e;
853
+ }), W(() => {
854
+ const r = t.current;
855
+ if (!r) return;
856
+ const o = r.getContext("webgl");
857
+ if (!o) return;
858
+ const i = `
859
+ attribute vec2 position;
860
+ void main() {
861
+ gl_Position = vec4(position, 0.0, 1.0);
862
+ }
863
+ `, s = `
864
+ precision mediump float;
865
+
866
+ uniform float u_time;
867
+ uniform vec2 u_resolution;
868
+ uniform vec3 u_color1;
869
+ uniform vec3 u_color2;
870
+ uniform vec3 u_color3;
871
+ uniform float u_spinRotation;
872
+ uniform float u_spinSpeed;
873
+ uniform float u_spinAmount;
874
+ uniform float u_pixelFilter;
875
+ uniform float u_contrast;
876
+ uniform float u_lighting;
877
+
878
+ void main() {
879
+ vec2 screenSize = u_resolution;
880
+ float pixel_size = length(screenSize.xy) / max(1.0, u_pixelFilter);
881
+ vec2 uv = (floor(gl_FragCoord.xy*(1.0/pixel_size))*pixel_size - 0.5*screenSize.xy)/length(screenSize.xy);
882
+ float uv_len = length(uv);
883
+
884
+ float speed = (u_spinRotation * 0.2) + 302.2;
885
+ float new_pixel_angle = atan(uv.y, uv.x) + speed - 20.0*(u_spinAmount*uv_len + (1.0 - u_spinAmount));
886
+
887
+ vec2 mid = (screenSize.xy/length(screenSize.xy))/2.0;
888
+ uv = (vec2((uv_len * cos(new_pixel_angle) + mid.x), (uv_len * sin(new_pixel_angle) + mid.y)) - mid);
889
+
890
+ uv *= 30.0;
891
+ speed = u_time * u_spinSpeed;
892
+ vec2 uv2 = vec2(uv.x, uv.y);
893
+
894
+ for(int i=0; i < 5; i++) {
895
+ uv2 += sin(max(uv.x, uv.y)) + uv;
896
+ uv += 0.5*vec2(cos(5.1123314 + 0.353*uv2.y + speed*0.131121), sin(uv2.x - 0.113*speed));
897
+ uv -= 1.0*cos(uv.x + uv.y) - 1.0*sin(uv.x*0.711 - uv.y);
898
+ }
899
+
900
+ float contrast_mod = (0.25*u_contrast + 0.5*u_spinAmount + 1.2);
901
+ float paint_res = min(2.0, max(0.0, length(uv)*(0.035)*contrast_mod));
902
+ float c1p = max(0.0, 1.0 - contrast_mod*abs(1.0 - paint_res));
903
+ float c2p = max(0.0, 1.0 - contrast_mod*abs(paint_res));
904
+ float c3p = 1.0 - min(1.0, c1p + c2p);
905
+ float light = (u_lighting - 0.2)*max(c1p*5.0 - 4.0, 0.0) + u_lighting*max(c2p*5.0 - 4.0, 0.0);
906
+
907
+ vec3 base = (0.3/u_contrast)*u_color1 + (1.0 - 0.3/u_contrast)*(u_color1*c1p + u_color2*c2p + c3p*u_color3) + vec3(light);
908
+ gl_FragColor = vec4(base, 1.0);
909
+ }
910
+ `, u = (B, te) => {
911
+ const O = o.createShader(B);
912
+ return O ? (o.shaderSource(O, te), o.compileShader(O), o.getShaderParameter(O, o.COMPILE_STATUS) ? O : (console.error("[JimboBackground] shader compile error:", o.getShaderInfoLog(O)), o.deleteShader(O), null)) : null;
913
+ }, p = u(o.VERTEX_SHADER, i), j = u(o.FRAGMENT_SHADER, s);
914
+ if (!p || !j) return;
915
+ const l = o.createProgram();
916
+ if (!l) return;
917
+ if (o.attachShader(l, p), o.attachShader(l, j), o.linkProgram(l), !o.getProgramParameter(l, o.LINK_STATUS)) {
918
+ console.error("[JimboBackground] program link error:", o.getProgramInfoLog(l));
919
+ return;
920
+ }
921
+ o.useProgram(l);
922
+ const c = o.createBuffer();
923
+ o.bindBuffer(o.ARRAY_BUFFER, c), o.bufferData(
924
+ o.ARRAY_BUFFER,
925
+ new Float32Array([
926
+ -1,
927
+ -1,
928
+ 1,
929
+ -1,
930
+ -1,
931
+ 1,
932
+ -1,
933
+ 1,
934
+ 1,
935
+ -1,
936
+ 1,
937
+ 1
938
+ ]),
939
+ o.STATIC_DRAW
940
+ );
941
+ const f = o.getAttribLocation(l, "position");
942
+ o.enableVertexAttribArray(f), o.vertexAttribPointer(f, 2, o.FLOAT, !1, 0, 0);
943
+ const y = o.getUniformLocation(l, "u_time"), x = o.getUniformLocation(l, "u_resolution"), k = o.getUniformLocation(l, "u_color1"), b = o.getUniformLocation(l, "u_color2"), d = o.getUniformLocation(l, "u_color3"), g = o.getUniformLocation(l, "u_spinRotation"), h = o.getUniformLocation(l, "u_spinSpeed"), m = o.getUniformLocation(l, "u_spinAmount"), v = o.getUniformLocation(l, "u_pixelFilter"), w = o.getUniformLocation(l, "u_contrast"), E = o.getUniformLocation(l, "u_lighting"), M = (B) => ({
944
+ spinRotation: B.spinRotation ?? D.spinRotation,
945
+ spinSpeed: 4.5 * (B.speed ?? D.speed),
946
+ spinAmount: B.spinAmount ?? D.spinAmount,
947
+ pixelFilter: B.pixelFilter ?? D.pixelFilter,
948
+ contrast: B.contrast ?? D.contrast,
949
+ lighting: B.lighting ?? D.lighting
950
+ }), R = n.current, S = [
951
+ Q(R.primary, D.primary),
952
+ Q(R.secondary, D.secondary),
953
+ Q(R.dark, D.dark)
954
+ ], A = M(R), N = performance.now();
955
+ let L = N, C = 0;
956
+ const z = () => {
957
+ const B = performance.now(), te = Math.max(0, B - L);
958
+ L = B;
959
+ const O = n.current, oe = [
960
+ Q(O.primary, D.primary),
961
+ Q(O.secondary, D.secondary),
962
+ Q(O.dark, D.dark)
963
+ ], P = M(O), K = Math.max(1, O.transitionMs ?? D.transitionMs), V = 1 - Math.exp(-te / K);
964
+ for (let G = 0; G < 3; G++)
965
+ for (let ne = 0; ne < 3; ne++)
966
+ S[G][ne] += (oe[G][ne] - S[G][ne]) * V;
967
+ const H = (G) => {
968
+ A[G] += (P[G] - A[G]) * V;
969
+ };
970
+ H("spinRotation"), H("spinSpeed"), H("spinAmount"), H("pixelFilter"), H("contrast"), H("lighting");
971
+ const fe = r.clientWidth, me = r.clientHeight;
972
+ (r.width !== fe || r.height !== me) && (r.width = fe, r.height = me, o.viewport(0, 0, o.drawingBufferWidth, o.drawingBufferHeight)), o.uniform1f(y, (B - N) / 1e3), o.uniform2f(x, r.width, r.height), o.uniform3f(k, S[0][0], S[0][1], S[0][2]), o.uniform3f(b, S[1][0], S[1][1], S[1][2]), o.uniform3f(d, S[2][0], S[2][1], S[2][2]), o.uniform1f(g, A.spinRotation), o.uniform1f(h, A.spinSpeed), o.uniform1f(m, A.spinAmount), o.uniform1f(v, A.pixelFilter), o.uniform1f(w, A.contrast), o.uniform1f(E, A.lighting), o.drawArrays(o.TRIANGLES, 0, 6), C = requestAnimationFrame(z);
973
+ };
974
+ return C = requestAnimationFrame(z), () => {
975
+ cancelAnimationFrame(C), o.deleteProgram(l), o.deleteShader(p), o.deleteShader(j), o.deleteBuffer(c);
976
+ };
977
+ }, []), t;
978
+ }
979
+ function Gn(e, t, n) {
980
+ const [r, o] = T(null), [i, s] = T(null), [u, p] = T(null), j = q(
981
+ (b, d, g) => {
982
+ const h = "touches" in b ? b.touches[0] : b, m = b.currentTarget.getBoundingClientRect();
983
+ s({
984
+ clause: d,
985
+ fromZone: g,
986
+ x: h.clientX,
987
+ y: h.clientY,
988
+ offX: h.clientX - m.left,
989
+ offY: h.clientY - m.top
990
+ }), p(null);
991
+ },
992
+ []
993
+ ), l = J(r), c = J(i), f = J(u), y = J(e), x = J(t);
994
+ Ee(() => {
995
+ l.current = r, c.current = i, f.current = u, y.current = e, x.current = t;
996
+ });
997
+ const k = r !== null || i !== null;
998
+ return W(() => {
999
+ if (!k) return;
1000
+ const b = (g) => {
1001
+ var M;
1002
+ const h = "touches" in g ? g : null, m = h ? h.touches[0] : g;
1003
+ if (!m) return;
1004
+ let v = l.current;
1005
+ if (!v && c.current) {
1006
+ const R = m.clientX - c.current.x, S = m.clientY - c.current.y;
1007
+ if (Math.hypot(R, S) < 8) return;
1008
+ v = {
1009
+ ...c.current,
1010
+ x: m.clientX,
1011
+ y: m.clientY
1012
+ }, s(null), o(v);
1013
+ } else v && (v = { ...v, x: m.clientX, y: m.clientY }, o(v));
1014
+ if (!v) return;
1015
+ h != null && h.cancelable && h.preventDefault();
1016
+ const w = ((M = n.current) == null ? void 0 : M.querySelectorAll("[data-zone]")) ?? [];
1017
+ let E = null;
1018
+ for (const R of w) {
1019
+ const S = R.getBoundingClientRect();
1020
+ if (m.clientX >= S.left && m.clientX <= S.right && m.clientY >= S.top && m.clientY <= S.bottom) {
1021
+ E = R.getAttribute("data-zone");
1022
+ break;
1023
+ }
1024
+ }
1025
+ p(E);
1026
+ }, d = () => {
1027
+ const g = l.current, h = f.current;
1028
+ if (g && h && h !== g.fromZone) {
1029
+ const m = h, v = y.current;
1030
+ x.current({
1031
+ ...v,
1032
+ [g.fromZone]: v[g.fromZone].filter((w) => w.id !== g.clause.id),
1033
+ [m]: [...v[m], { ...g.clause }]
1034
+ });
1035
+ }
1036
+ s(null), o(null), p(null);
1037
+ };
1038
+ return window.addEventListener("mousemove", b), window.addEventListener("mouseup", d), window.addEventListener("touchmove", b, { passive: !1 }), window.addEventListener("touchend", d), () => {
1039
+ window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", d), window.removeEventListener("touchmove", b), window.removeEventListener("touchend", d);
1040
+ };
1041
+ }, [k, n]), {
1042
+ drag: r,
1043
+ hoverZone: u,
1044
+ onDragStart: j
1045
+ };
1046
+ }
1047
+ const Rt = {
1048
+ xs: "j-inline-edit--xs",
1049
+ sm: "j-inline-edit--sm",
1050
+ md: "j-inline-edit--md",
1051
+ lg: "j-inline-edit--lg"
1052
+ }, Bt = {
1053
+ white: "j-inline-edit--white",
1054
+ gold: "j-inline-edit--gold",
1055
+ grey: "j-inline-edit--grey"
1056
+ }, Yn = U.forwardRef(
1057
+ function({ size: t = "md", tone: n = "white", dim: r = !1, className: o = "", ...i }, s) {
1058
+ const u = [
1059
+ "j-inline-edit",
1060
+ Rt[t],
1061
+ Bt[n],
1062
+ r ? "j-inline-edit--dim" : null,
1063
+ o || null
1064
+ ].filter(Boolean).join(" ");
1065
+ return /* @__PURE__ */ a("input", { ref: s, type: "text", className: u, ...i });
1066
+ }
1067
+ );
1068
+ function Xn({
1069
+ className: e,
1070
+ minHeight: t = 320,
1071
+ style: n,
1072
+ ref: r,
1073
+ ...o
1074
+ }) {
1075
+ const i = ["j-code-surface", e].filter(Boolean).join(" "), s = {
1076
+ "--j-code-surface-min-height": `${t}px`,
1077
+ ...n
1078
+ };
1079
+ return /* @__PURE__ */ a("div", { ref: r, className: i, style: s, ...o });
1080
+ }
1081
+ const Mt = {
1082
+ blue: "j-outer-tab--blue",
1083
+ red: "j-outer-tab--red",
1084
+ orange: "j-outer-tab--orange",
1085
+ green: "j-outer-tab--green",
1086
+ purple: "j-outer-tab--purple",
1087
+ gold: "j-outer-tab--gold"
1088
+ };
1089
+ function Ot({
1090
+ label: e,
1091
+ tone: t,
1092
+ active: n = !1,
1093
+ fullscreen: r = !1,
1094
+ onToggleFullscreen: o,
1095
+ className: i,
1096
+ children: s,
1097
+ ...u
1098
+ }) {
1099
+ const p = [
1100
+ "j-outer-tab",
1101
+ t ? Mt[t] : "",
1102
+ n ? "j-outer-tab--active" : "",
1103
+ i
1104
+ ].filter(Boolean).join(" ");
1105
+ return /* @__PURE__ */ _("div", { className: p, ...u, children: [
1106
+ /* @__PURE__ */ a("span", { className: "j-outer-tab__grip", "aria-hidden": !0, children: /* @__PURE__ */ a(ft, {}) }),
1107
+ /* @__PURE__ */ a("span", { className: "j-outer-tab__label", children: e }),
1108
+ /* @__PURE__ */ a("span", { className: "j-outer-tab__space", children: s }),
1109
+ o ? /* @__PURE__ */ a(
1110
+ "button",
1111
+ {
1112
+ type: "button",
1113
+ className: "j-outer-tab__fs",
1114
+ "aria-label": r ? "Restore pane" : "Fullscreen pane",
1115
+ onClick: (j) => {
1116
+ j.stopPropagation(), o();
1117
+ },
1118
+ children: r ? /* @__PURE__ */ a(mt, {}) : /* @__PURE__ */ a(ht, {})
1119
+ }
1120
+ ) : null
1121
+ ] });
1122
+ }
1123
+ let It = 0;
1124
+ function _e(e) {
1125
+ return `${e}${++It}-${Date.now().toString(36)}`;
1126
+ }
1127
+ function Dt(e) {
1128
+ return {
1129
+ type: "split",
1130
+ id: "s-root",
1131
+ dir: "column",
1132
+ ratio: 0.34,
1133
+ children: [
1134
+ {
1135
+ type: "split",
1136
+ id: "s-entry",
1137
+ dir: "row",
1138
+ ratio: 0.55,
1139
+ children: [
1140
+ { type: "group", id: "g-filter", panes: [e.filter], active: e.filter },
1141
+ { type: "group", id: "g-search", panes: [e.search], active: e.search }
1142
+ ]
1143
+ },
1144
+ {
1145
+ type: "group",
1146
+ id: "g-results",
1147
+ panes: [e.results, e.jamlyze],
1148
+ active: e.results
1149
+ }
1150
+ ]
1151
+ };
1152
+ }
1153
+ function Be(e, t) {
1154
+ if (e.type === "group") {
1155
+ if (!e.panes.includes(t)) return e;
1156
+ const r = e.panes.filter((i) => i !== t), o = e.active === t ? r[0] ?? null : e.active;
1157
+ return { ...e, panes: r, active: o };
1158
+ }
1159
+ const n = e.children.map((r) => Be(r, t)).filter((r) => !(r.type === "group" && r.panes.length === 0));
1160
+ return n.length === 1 ? n[0] : { ...e, children: n };
1161
+ }
1162
+ function pe(e, t, n) {
1163
+ return e.type === "group" ? e.id === t ? n(e) : e : { ...e, children: e.children.map((r) => pe(r, t, n)) };
1164
+ }
1165
+ function Me(e, t, n, r) {
1166
+ if (r === "center") return e;
1167
+ if (e.type === "group") {
1168
+ if (e.id !== t) return e;
1169
+ const o = { type: "group", id: _e("g"), panes: [n], active: n }, i = r === "left" || r === "right" ? "row" : "column", s = r === "left" || r === "top" ? [o, e] : [e, o];
1170
+ return { type: "split", id: _e("s"), dir: i, ratio: 0.5, children: s };
1171
+ }
1172
+ return { ...e, children: e.children.map((o) => Me(o, t, n, r)) };
1173
+ }
1174
+ function Oe(e, t = []) {
1175
+ return e.type === "group" ? (t.push(e), t) : (e.children.forEach((n) => Oe(n, t)), t);
1176
+ }
1177
+ function Jt(e, t) {
1178
+ return e.type === "group" ? e.panes.includes(t) ? { ...e, active: t } : e : { ...e, children: e.children.map((n) => Jt(n, t)) };
1179
+ }
1180
+ function Ft(e, t) {
1181
+ const n = Oe(e);
1182
+ if (!n.length) return !1;
1183
+ const r = n.flatMap((o) => o.panes);
1184
+ return r.length > 0 && r.every((o) => t.includes(o)) && n.every((o) => o.panes.length > 0);
1185
+ }
1186
+ function $t(e, t, n) {
1187
+ try {
1188
+ const r = localStorage.getItem(e);
1189
+ if (!r) return t;
1190
+ const o = JSON.parse(r);
1191
+ return Ft(o, n) ? o : t;
1192
+ } catch {
1193
+ return t;
1194
+ }
1195
+ }
1196
+ function zt(e, t) {
1197
+ try {
1198
+ localStorage.setItem(e, JSON.stringify(t));
1199
+ } catch {
1200
+ }
1201
+ }
1202
+ function Kn({
1203
+ panes: e,
1204
+ pyramid: t,
1205
+ storageKey: n,
1206
+ className: r
1207
+ }) {
1208
+ const o = Object.keys(e), i = t && o.includes(t.filter) ? Dt(t) : {
1209
+ type: "group",
1210
+ id: "g-all",
1211
+ panes: o,
1212
+ active: o[0] ?? null
1213
+ }, [s, u] = T(
1214
+ () => n && typeof localStorage < "u" ? $t(n, i, o) : i
1215
+ ), [p, j] = T(null), [l, c] = T(null);
1216
+ W(() => {
1217
+ n && zt(n, s);
1218
+ }, [n, s]);
1219
+ const f = (d) => {
1220
+ if (d.target.closest(".j-dock-tabs")) return "center";
1221
+ const h = d.currentTarget.getBoundingClientRect(), m = (d.clientX - h.left) / h.width, v = (d.clientY - h.top) / h.height;
1222
+ return m < 0.25 ? "left" : m > 0.75 ? "right" : v < 0.25 ? "top" : v > 0.75 ? "bottom" : "center";
1223
+ }, y = (d, g, h) => {
1224
+ e[d] && (g.panes.length === 1 && g.panes[0] === d || u((m) => {
1225
+ const v = Be(m, d);
1226
+ return h === "center" ? pe(v, g.id, (w) => ({
1227
+ ...w,
1228
+ panes: [...w.panes, d],
1229
+ active: d
1230
+ })) : Me(v, g.id, d, h);
1231
+ }));
1232
+ }, x = (d, g) => {
1233
+ const h = e[d];
1234
+ return h ? /* @__PURE__ */ a(
1235
+ Ot,
1236
+ {
1237
+ label: h.label,
1238
+ tone: h.tone,
1239
+ active: g,
1240
+ fullscreen: l === d,
1241
+ onToggleFullscreen: () => c((m) => m === d ? null : d),
1242
+ draggable: !0,
1243
+ onDragStart: (m) => m.dataTransfer.setData("text/plain", d)
1244
+ },
1245
+ d
1246
+ ) : null;
1247
+ }, k = (d) => {
1248
+ const g = p && p.groupId === d.id ? p.zone : null, h = g && g !== "center" ? ` j-dock-pane--drop-${g}` : "";
1249
+ return /* @__PURE__ */ _(
1250
+ $,
1251
+ {
1252
+ className: `j-dock-pane${h}`,
1253
+ onDragOver: (m) => {
1254
+ m.preventDefault();
1255
+ const v = f(m);
1256
+ j(
1257
+ (w) => w && w.groupId === d.id && w.zone === v ? w : { groupId: d.id, zone: v }
1258
+ );
1259
+ },
1260
+ onDragLeave: () => j((m) => m && m.groupId === d.id ? null : m),
1261
+ onDrop: (m) => {
1262
+ m.preventDefault();
1263
+ const v = m.dataTransfer.getData("text/plain"), w = f(m);
1264
+ j(null), y(v, d, w);
1265
+ },
1266
+ children: [
1267
+ /* @__PURE__ */ a(
1268
+ $,
1269
+ {
1270
+ className: `j-dock-tabs${g === "center" ? " j-dock-tabs--drop" : ""}`,
1271
+ children: d.panes.map((m) => /* @__PURE__ */ a(
1272
+ $,
1273
+ {
1274
+ onClick: () => u((v) => pe(v, d.id, (w) => ({ ...w, active: m }))),
1275
+ children: x(m, d.active === m)
1276
+ },
1277
+ m
1278
+ ))
1279
+ }
1280
+ ),
1281
+ /* @__PURE__ */ a($, { className: "j-dock-body", children: d.active && e[d.active] ? e[d.active].content : null })
1282
+ ]
1283
+ },
1284
+ d.id
1285
+ );
1286
+ }, b = (d) => {
1287
+ if (d.type === "group") return k(d);
1288
+ const [g, h] = d.children;
1289
+ return /* @__PURE__ */ _(
1290
+ $,
1291
+ {
1292
+ className: `j-dock-split j-dock-split--${d.dir}`,
1293
+ style: {
1294
+ "--j-dock-a": `${d.ratio}fr`,
1295
+ "--j-dock-b": `${1 - d.ratio}fr`
1296
+ },
1297
+ children: [
1298
+ b(g),
1299
+ /* @__PURE__ */ a($, { className: `j-dock-gutter j-dock-gutter--${d.dir}` }),
1300
+ b(h)
1301
+ ]
1302
+ },
1303
+ d.id
1304
+ );
1305
+ };
1306
+ return l && e[l] ? /* @__PURE__ */ _($, { className: `j-dock j-dock--fs ${r ?? ""}`.trim(), children: [
1307
+ /* @__PURE__ */ a($, { className: "j-dock-tabs", children: x(l, !0) }),
1308
+ /* @__PURE__ */ a($, { className: "j-dock-body", children: e[l].content })
1309
+ ] }) : /* @__PURE__ */ a($, { className: `j-dock ${r ?? ""}`.trim(), children: b(s) });
1310
+ }
1311
+ const Ut = {
1312
+ idle: "j-status-pill--idle",
1313
+ running: "j-status-pill--running",
1314
+ ok: "j-status-pill--ok",
1315
+ error: "j-status-pill--error",
1316
+ paused: "j-status-pill--paused"
1317
+ };
1318
+ function Wt({ status: e = "idle", label: t, className: n, children: r, ...o }) {
1319
+ const i = ["j-status-pill", Ut[e], n].filter(Boolean).join(" ");
1320
+ return /* @__PURE__ */ _("span", { className: i, ...o, children: [
1321
+ /* @__PURE__ */ a("span", { className: "j-status-pill__dot", "aria-hidden": !0 }),
1322
+ t ?? r ?? e
1323
+ ] });
1324
+ }
1325
+ function Hn({ className: e, style: t, ...n }) {
1326
+ const r = ["j-textarea", e].filter(Boolean).join(" ");
1327
+ return /* @__PURE__ */ a("textarea", { className: r, style: t, ...n });
1328
+ }
1329
+ function Zn(e = {}) {
1330
+ const t = Tt(e);
1331
+ return /* @__PURE__ */ a("canvas", { ref: t, className: "j-background-canvas", "aria-hidden": !0 });
1332
+ }
1333
+ function Vn({
1334
+ variant: e = "embed",
1335
+ scroll: t = !0,
1336
+ footer: n,
1337
+ className: r,
1338
+ children: o,
1339
+ ...i
1340
+ }) {
1341
+ if (e === "page") {
1342
+ const p = ["j-page", "j-page--full", r].filter(Boolean).join(" ");
1343
+ return /* @__PURE__ */ _("div", { className: p, ...i, children: [
1344
+ /* @__PURE__ */ a("div", { className: "j-page__main", children: o }),
1345
+ n ? /* @__PURE__ */ a("div", { className: "j-page__footer", children: n }) : null
1346
+ ] });
1347
+ }
1348
+ if (e === "phone") {
1349
+ const p = ["j-phone", r].filter(Boolean).join(" ");
1350
+ return /* @__PURE__ */ _("div", { className: p, ...i, children: [
1351
+ /* @__PURE__ */ a("div", { className: t ? "j-phone__scroll" : "j-phone__content", children: o }),
1352
+ n ? /* @__PURE__ */ a("div", { className: "j-phone__footer", children: n }) : null
1353
+ ] });
1354
+ }
1355
+ const s = ["j-app", r].filter(Boolean).join(" ");
1356
+ return /* @__PURE__ */ _("div", { className: s, ...i, children: [
1357
+ /* @__PURE__ */ a("div", { className: t ? "j-app__scroll" : "j-app__content", children: o }),
1358
+ n ? /* @__PURE__ */ a("div", { className: "j-app__footer", children: n }) : null
1359
+ ] });
1360
+ }
1361
+ function qn({ className: e, children: t, ...n }) {
1362
+ const r = ["j-inset", e].filter(Boolean).join(" ");
1363
+ return /* @__PURE__ */ a("div", { className: r, ...n, children: t });
1364
+ }
1365
+ function Qn({ title: e, sub: t, className: n, ...r }) {
1366
+ const o = ["j-wordmark", n].filter(Boolean).join(" ");
1367
+ return /* @__PURE__ */ _("div", { className: o, ...r, children: [
1368
+ /* @__PURE__ */ a("div", { className: "j-wordmark__title", children: e }),
1369
+ t != null && t !== !1 ? /* @__PURE__ */ a("div", { className: "j-wordmark__sub", children: t }) : null
1370
+ ] });
1371
+ }
1372
+ const Gt = {
1373
+ xs: "var(--j-space-xs)",
1374
+ sm: "var(--j-space-sm)",
1375
+ md: "var(--j-space-md)",
1376
+ lg: "var(--j-space-lg)",
1377
+ xl: "var(--j-space-xl)"
1378
+ };
1379
+ function er({ columns: e = 3, minColWidth: t, gap: n = "md", style: r, ...o }) {
1380
+ const i = t ? `repeat(auto-fit, minmax(${t}px, 1fr))` : `repeat(${e}, minmax(0, 1fr))`;
1381
+ return /* @__PURE__ */ a(
1382
+ "div",
1383
+ {
1384
+ style: {
1385
+ ...r,
1386
+ display: "grid",
1387
+ gridTemplateColumns: i,
1388
+ gap: Gt[n],
1389
+ width: "100%"
1390
+ },
1391
+ ...o
1392
+ }
1393
+ );
1394
+ }
1395
+ function tr({ size: e = 16, style: t, ...n }) {
1396
+ return /* @__PURE__ */ a("div", { "aria-hidden": !0, style: { ...t, height: e, width: "100%" }, ...n });
1397
+ }
1398
+ function nr({ vert: e = !1, className: t, ...n }) {
1399
+ const r = ["j-divider", e ? "j-divider--vert" : "", t].filter(Boolean).join(" ");
1400
+ return /* @__PURE__ */ a("hr", { className: r, ...n });
1401
+ }
1402
+ function rr({ title: e, onDismiss: t, className: n, children: r, ...o }) {
1403
+ const [i, s] = T(!1);
1404
+ if (i) return null;
1405
+ const u = ["j-error-block", n].filter(Boolean).join(" ");
1406
+ return /* @__PURE__ */ a("div", { className: u, role: "alert", ...o, children: /* @__PURE__ */ _(ot, { justify: "between", align: "center", children: [
1407
+ /* @__PURE__ */ _("div", { children: [
1408
+ e != null && /* @__PURE__ */ a("div", { className: "j-error-block__title", children: e }),
1409
+ r
1410
+ ] }),
1411
+ t && /* @__PURE__ */ a(
1412
+ ee,
1413
+ {
1414
+ size: "sm",
1415
+ tone: "destructive",
1416
+ "aria-label": "Dismiss error",
1417
+ onClick: () => {
1418
+ s(!0), t();
1419
+ },
1420
+ children: /* @__PURE__ */ a(Te, {})
1421
+ }
1422
+ )
1423
+ ] }) });
1424
+ }
1425
+ const Ie = 2 * Math.PI, ye = Math.PI / 2, F = 16, De = 10, Je = 148, le = 4, ce = 6, Fe = 22, $e = 8;
1426
+ function ze(e, t) {
1427
+ return Math.min(200, Math.max(56, 32 + (t ? 15 : 0) + e.length * 6.6));
1428
+ }
1429
+ function Yt(e, t) {
1430
+ return e + De + Math.hypot(t, F);
1431
+ }
1432
+ function Xt(e, t, n, r, o, i, s) {
1433
+ if (e.length === 0) return [];
1434
+ const u = Math.max(0, i) / 2;
1435
+ return e.map((p, j) => {
1436
+ const l = r + j * o, c = Math.cos(l) * t, f = Math.sin(l) * n, y = Math.hypot(c, f), { label: x, hasToggleDot: k } = s(p), b = Yt(u, ze(x, k) / 2);
1437
+ if (y < 1e-4) return { item: p, x: b, y: 0 };
1438
+ const d = Math.max(1, b / y);
1439
+ return { item: p, x: c * d, y: f * d };
1440
+ });
1441
+ }
1442
+ function Kt(e, t, n, r, o) {
1443
+ if (e.length === 0) return [];
1444
+ const i = t / 2, s = n / 2, u = -s + F, p = Math.min(s - F, r - F - ce), j = Math.ceil(e.length / 2), l = e.length - j, c = 2 * F + ce, f = (k, b) => {
1445
+ if (b <= 1) return u;
1446
+ const d = p - u, h = c * (b - 1) <= d ? c : d / (b - 1);
1447
+ return p - k * h;
1448
+ };
1449
+ let y = 0, x = 0;
1450
+ return e.map((k, b) => {
1451
+ const d = b < j ? -1 : 1, g = d < 0 ? f(y++, j) : f(x++, l), { label: h, hasToggleDot: m } = o(k), v = ze(h, m) / 2;
1452
+ return { item: k, x: d * Math.max(0, i - v - le), y: g };
1453
+ });
1454
+ }
1455
+ function Ht(e) {
1456
+ if (!Number.isFinite(e) || e <= 0) return 2;
1457
+ const t = e / 2, n = -t + F, o = t - F - le - Fe - F - F - ce, i = 2 * F + ce;
1458
+ return 2 * Math.max(1, Math.floor((o - n) / i) + 1);
1459
+ }
1460
+ function Zt(e, t, n) {
1461
+ const r = e <= 1 ? Math.round(2 * t * 1.05) : Math.round(2 * t * Math.sin(Ie / e / 2) * 1.28);
1462
+ return Math.max(Je, Math.min(r, n - 16));
1463
+ }
1464
+ function Vt(e, t, n) {
1465
+ return Math.max(84, n + t * 3, e / 2 + 42);
1466
+ }
1467
+ function or(e, t) {
1468
+ return Math.max(0, Math.min(e, t) / 2 - F - $e);
1469
+ }
1470
+ function qt(e, t, n) {
1471
+ return n == null || !Number.isFinite(n) || n <= 0 ? e : Math.max(t / 2 + De, Math.min(e, n));
1472
+ }
1473
+ const Ue = (e) => typeof e.active == "boolean", xe = (e) => ({
1474
+ label: e.label,
1475
+ hasToggleDot: Ue(e)
1476
+ });
1477
+ function Qt({
1478
+ items: e,
1479
+ onAction: t,
1480
+ onNavigate: n,
1481
+ onBack: r,
1482
+ currentMenu: o = "main",
1483
+ closing: i = !1,
1484
+ mascotSize: s = 96,
1485
+ radius: u = 90,
1486
+ radiusY: p,
1487
+ boxHeight: j,
1488
+ translateY: l = 0,
1489
+ breadcrumb: c,
1490
+ showPageControls: f = !1,
1491
+ onPagePrev: y,
1492
+ onPageNext: x,
1493
+ center: k,
1494
+ className: b,
1495
+ "aria-label": d = "Orbital menu"
1496
+ }) {
1497
+ const g = J(null), [h, m] = T(375);
1498
+ if (W(() => {
1499
+ const P = g.current;
1500
+ if (!P) return;
1501
+ const K = () => m(Math.max(1, P.clientWidth));
1502
+ K();
1503
+ const V = new ResizeObserver(K);
1504
+ return V.observe(P), () => V.disconnect();
1505
+ }, []), e.length === 0)
1506
+ return k ? /* @__PURE__ */ a(
1507
+ "div",
1508
+ {
1509
+ ref: g,
1510
+ className: ["j-orbital-menu", b].filter(Boolean).join(" "),
1511
+ style: { transform: `translateY(${l}px)` },
1512
+ children: /* @__PURE__ */ a("div", { className: "j-orbital-menu__center", children: k })
1513
+ }
1514
+ ) : null;
1515
+ const v = u, w = p ?? u, E = e.find((P) => P.south) ?? null, M = e.filter((P) => !P.south), R = M.length + (E ? 1 : 0), S = Ie / R, A = E ? ye + S : ye, N = j != null && Number.isFinite(j) && j > 0, L = N ? Math.max(Je, h - le * 2) : Zt(R, v, h), C = N ? j / 2 - F - le : w + $e, z = Math.min(96, Math.max(56, Math.floor(L * 0.5))), B = C - Fe, te = (f && E ? B : C) - F, O = N && j != null ? Kt(M, h, j, te, xe) : Xt(M, v, w, A, S, s, xe), oe = (P) => (K) => {
1516
+ K.stopPropagation(), P.south ? r == null || r() : P.submenu ? n == null || n(P.submenu) : P.action && (t == null || t(P.action, P));
1517
+ };
1518
+ return /* @__PURE__ */ _(
1519
+ "div",
1520
+ {
1521
+ ref: g,
1522
+ className: ["j-orbital-menu", b].filter(Boolean).join(" "),
1523
+ style: { transform: `translateY(${l}px)` },
1524
+ children: [
1525
+ k ? /* @__PURE__ */ a("div", { className: "j-orbital-menu__center", children: k }) : null,
1526
+ /* @__PURE__ */ _("div", { className: "j-orbital-menu__anchor", role: "menu", "aria-label": d, children: [
1527
+ c ? /* @__PURE__ */ a(re, { x: 0, y: C - 46, hiding: i, interactive: !1, children: c }) : null,
1528
+ O.map(({ item: P, x: K, y: V }, H) => /* @__PURE__ */ a(
1529
+ re,
1530
+ {
1531
+ x: K,
1532
+ y: V,
1533
+ hiding: i,
1534
+ dim: P.dim,
1535
+ children: /* @__PURE__ */ a(en, { item: P, onClick: oe(P) })
1536
+ },
1537
+ `${o}-${P.label}-${H}`
1538
+ )),
1539
+ E ? /* @__PURE__ */ a(re, { x: 0, y: C, hiding: i, children: /* @__PURE__ */ a(
1540
+ X,
1541
+ {
1542
+ tone: E.tone ?? "orange",
1543
+ size: "sm",
1544
+ fullWidth: !0,
1545
+ className: "j-orbital-btn j-orbital-btn--south",
1546
+ style: { width: L },
1547
+ title: E.tooltip ?? E.label,
1548
+ onClick: oe(E),
1549
+ role: "menuitem",
1550
+ children: E.label
1551
+ }
1552
+ ) }) : null,
1553
+ E && f ? /* @__PURE__ */ _(Ge, { children: [
1554
+ /* @__PURE__ */ a(re, { x: -(L / 2) + z / 2, y: B, hiding: i, children: /* @__PURE__ */ a(ke, { label: "<", title: "Previous page", width: z, onClick: y }) }),
1555
+ /* @__PURE__ */ a(re, { x: L / 2 - z / 2, y: B, hiding: i, children: /* @__PURE__ */ a(ke, { label: ">", title: "Next page", width: z, onClick: x }) })
1556
+ ] }) : null
1557
+ ] })
1558
+ ]
1559
+ }
1560
+ );
1561
+ }
1562
+ function re({
1563
+ x: e,
1564
+ y: t,
1565
+ hiding: n,
1566
+ dim: r,
1567
+ interactive: o = !0,
1568
+ children: i
1569
+ }) {
1570
+ return /* @__PURE__ */ a(
1571
+ "div",
1572
+ {
1573
+ className: "j-orbital-pill",
1574
+ "data-hiding": n ? "true" : "false",
1575
+ "data-dim": r ? "true" : void 0,
1576
+ "data-static": o ? void 0 : "true",
1577
+ style: {
1578
+ "--j-orbit-x": `${n ? 0 : e}px`,
1579
+ "--j-orbit-y": `${n ? 0 : t}px`
1580
+ },
1581
+ children: i
1582
+ }
1583
+ );
1584
+ }
1585
+ function en({
1586
+ item: e,
1587
+ onClick: t
1588
+ }) {
1589
+ if (e.badge)
1590
+ return /* @__PURE__ */ a(Wt, { status: e.badge.status, label: e.badge.label, title: e.tooltip });
1591
+ const n = Ue(e);
1592
+ return /* @__PURE__ */ _(
1593
+ X,
1594
+ {
1595
+ tone: e.tone ?? (n ? "orange" : "red"),
1596
+ size: "sm",
1597
+ className: "j-orbital-btn",
1598
+ disabled: e.disabled,
1599
+ title: e.tooltip ?? e.label,
1600
+ "aria-label": n ? `${e.label} (${e.active ? "on" : "off"})` : e.label,
1601
+ "aria-pressed": n ? e.active : void 0,
1602
+ role: "menuitem",
1603
+ onClick: t,
1604
+ children: [
1605
+ n ? /* @__PURE__ */ a("span", { className: "j-orbital-dot", "data-on": e.active ? "true" : "false", "aria-hidden": !0 }) : null,
1606
+ /* @__PURE__ */ a("span", { children: e.label }),
1607
+ e.icon ? /* @__PURE__ */ a("span", { className: "j-orbital-glyph", "aria-hidden": !0, children: e.icon }) : typeof e.count == "number" ? /* @__PURE__ */ a("span", { className: "j-orbital-count", "data-any": e.count > 0 ? "true" : "false", children: e.count }) : null
1608
+ ]
1609
+ }
1610
+ );
1611
+ }
1612
+ function ke({
1613
+ label: e,
1614
+ title: t,
1615
+ width: n,
1616
+ onClick: r
1617
+ }) {
1618
+ return /* @__PURE__ */ a(
1619
+ X,
1620
+ {
1621
+ tone: "blue",
1622
+ size: "sm",
1623
+ className: "j-orbital-btn",
1624
+ style: { width: n },
1625
+ title: t,
1626
+ "aria-label": t,
1627
+ onClick: (o) => {
1628
+ o.stopPropagation(), r == null || r();
1629
+ },
1630
+ children: e
1631
+ }
1632
+ );
1633
+ }
1634
+ const we = 200, tn = 320, ae = { stack: [], page: 0, breadcrumb: [], closing: !1 };
1635
+ function We() {
1636
+ let e = ae, t = -1, n = 0, r = null;
1637
+ const o = /* @__PURE__ */ new Set(), i = () => o.forEach((l) => l()), s = (l) => {
1638
+ e = { ...e, ...l }, i();
1639
+ }, u = () => {
1640
+ r !== null && (clearTimeout(r), r = null);
1641
+ }, p = (l, c) => {
1642
+ u(), r = setTimeout(() => {
1643
+ r = null, l();
1644
+ }, c);
1645
+ }, j = () => {
1646
+ u(), s({ closing: !0 }), p(() => s({ ...ae }), tn);
1647
+ };
1648
+ return {
1649
+ subscribe: (l) => (o.add(l), () => o.delete(l)),
1650
+ getState: () => e,
1651
+ open: (l = "main") => {
1652
+ e.stack.length === 1 && e.stack[0] === l && e.page === 0 || (u(), s({ stack: [l], page: 0, breadcrumb: [], closing: !1 }));
1653
+ },
1654
+ close: j,
1655
+ back: () => {
1656
+ if (e.stack.length <= 1) {
1657
+ s({ breadcrumb: [] }), j();
1658
+ return;
1659
+ }
1660
+ u(), s({ breadcrumb: e.breadcrumb.slice(0, -1), closing: !0 }), p(
1661
+ () => s({ stack: e.stack.slice(0, -1), page: 0, closing: !1 }),
1662
+ we
1663
+ );
1664
+ },
1665
+ navigateTo: (l) => {
1666
+ u(), s({ breadcrumb: [...e.breadcrumb, l], closing: !0 }), p(
1667
+ () => s({ stack: [...e.stack, l], page: 0, closing: !1 }),
1668
+ we
1669
+ );
1670
+ },
1671
+ nextPage: (l) => {
1672
+ const c = Math.max(1, l);
1673
+ s({ page: c <= 1 ? 0 : (e.page + 1) % c });
1674
+ },
1675
+ prevPage: (l) => {
1676
+ const c = Math.max(1, l);
1677
+ s({ page: c <= 1 ? 0 : (e.page - 1 + c) % c });
1678
+ },
1679
+ reset: () => {
1680
+ u(), t = -1, n = 0, s({ ...ae });
1681
+ },
1682
+ signalIncomingResults: ({ count: l, topScore: c }) => {
1683
+ let f = !1;
1684
+ l > 0 && c !== void 0 && c > t && (f = e.stack.length > 1), l > 0 && l > n && (f = f || e.stack.length > 0), t = l > 0 && c !== void 0 ? c : -1, n = l, f && j();
1685
+ }
1686
+ };
1687
+ }
1688
+ const nn = We();
1689
+ function rn({
1690
+ root: e = "main",
1691
+ store: t = nn
1692
+ } = {}) {
1693
+ const n = Xe(t.subscribe, t.getState, () => ae), r = q(() => t.open(e), [t, e]), o = q(() => {
1694
+ const { stack: i, closing: s } = t.getState();
1695
+ i.length === 0 && !s ? t.open(e) : t.close();
1696
+ }, [t, e]);
1697
+ return Ce(
1698
+ () => ({
1699
+ ...n,
1700
+ currentMenu: n.stack.at(-1) ?? e,
1701
+ isOpen: n.stack.length > 0,
1702
+ isClosing: n.closing && n.stack.length > 0,
1703
+ canGoBack: n.stack.length > 1,
1704
+ open: r,
1705
+ close: t.close,
1706
+ back: t.back,
1707
+ navigateTo: t.navigateTo,
1708
+ nextPage: t.nextPage,
1709
+ prevPage: t.prevPage,
1710
+ toggle: o
1711
+ }),
1712
+ [n, e, r, o, t]
1713
+ );
1714
+ }
1715
+ const on = new URL("../assets/jammy-seed-mascot-BdoW3O33.png", import.meta.url).href, an = on;
1716
+ function sn(e) {
1717
+ return (t) => {
1718
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
1719
+ };
1720
+ }
1721
+ const Se = 14;
1722
+ function ln(e) {
1723
+ return e == null || !Number.isFinite(e) || e <= 0 ? Se : Math.max(2, Math.min(Se, Ht(e)));
1724
+ }
1725
+ function ar({
1726
+ mood: e = "idle",
1727
+ size: t = 96,
1728
+ menuItems: n,
1729
+ getMenuItems: r,
1730
+ onMenuAction: o,
1731
+ maxOrbitRadius: i,
1732
+ orbitBoxHeight: s,
1733
+ orbitBoxWidth: u,
1734
+ baseOrbitRadius: p = 90,
1735
+ menuHidden: j = !1,
1736
+ closeLabel: l = "Close",
1737
+ orbitalStore: c,
1738
+ renderImage: f,
1739
+ className: y = "",
1740
+ ...x
1741
+ }) {
1742
+ const [k] = T(We), b = rn({ store: c ?? k }), d = Ce(
1743
+ () => r ?? (n ? () => n : null),
1744
+ [r, n]
1745
+ ), g = d != null && !j, h = () => {
1746
+ g && b.toggle();
1747
+ }, m = e === "happy" ? "jammy-happy" : e === "surprised" ? "jammy-shake" : "jammy-idle", v = g && (b.isOpen || b.isClosing), w = v && d ? d(b.stack) : [], E = ln(s), M = Math.max(1, Math.ceil(w.length / E)), R = Math.min(Math.max(0, b.page), M - 1), S = w.slice(R * E, (R + 1) * E), A = {
1748
+ label: b.canGoBack ? "Back" : l,
1749
+ south: !0
1750
+ }, N = v ? [...S, A] : [], L = qt(
1751
+ Vt(t, S.length, p),
1752
+ t,
1753
+ i
1754
+ ), C = /* @__PURE__ */ a(
1755
+ "div",
1756
+ {
1757
+ role: g ? "button" : void 0,
1758
+ tabIndex: g ? 0 : void 0,
1759
+ onClick: h,
1760
+ onKeyDown: g ? sn(h) : void 0,
1761
+ "aria-label": "Jammy mascot",
1762
+ "aria-expanded": g ? b.isOpen : void 0,
1763
+ className: g ? "j-mascot__hit j-mascot__hit--interactive" : "j-mascot__hit",
1764
+ children: f ? f({ size: t }) : /* @__PURE__ */ a("img", { src: an, alt: "Jammy", draggable: !1, className: "j-mascot__img" })
1765
+ }
1766
+ );
1767
+ return /* @__PURE__ */ _(
1768
+ "div",
1769
+ {
1770
+ className: ["j-mascot", m, y].filter(Boolean).join(" "),
1771
+ style: { "--j-mascot-size": `${t}px` },
1772
+ ...x,
1773
+ children: [
1774
+ C,
1775
+ v ? /* @__PURE__ */ a(
1776
+ "div",
1777
+ {
1778
+ className: "j-mascot__orbit",
1779
+ style: {
1780
+ "--j-orbit-w": u != null ? `${u}px` : void 0,
1781
+ "--j-orbit-h": s != null ? `${s}px` : void 0
1782
+ },
1783
+ children: /* @__PURE__ */ a(
1784
+ Qt,
1785
+ {
1786
+ items: N,
1787
+ currentMenu: b.currentMenu,
1788
+ closing: b.isClosing,
1789
+ mascotSize: t,
1790
+ radius: L,
1791
+ boxHeight: s,
1792
+ showPageControls: w.length > E,
1793
+ onPagePrev: () => b.prevPage(M),
1794
+ onPageNext: () => b.nextPage(M),
1795
+ breadcrumb: b.breadcrumb.length > 0 ? /* @__PURE__ */ a(Y, { size: "xs", tone: "grey", children: b.breadcrumb.join(" / ") }) : null,
1796
+ onNavigate: b.navigateTo,
1797
+ onBack: b.back,
1798
+ onAction: (z, B) => {
1799
+ o == null || o(z, B), b.close();
1800
+ }
1801
+ }
1802
+ )
1803
+ }
1804
+ ) : null
1805
+ ]
1806
+ }
1807
+ );
1808
+ }
1809
+ const Ne = 3, ue = 220;
1810
+ function ir({
1811
+ children: e,
1812
+ onDecide: t,
1813
+ width: n = 300,
1814
+ height: r = 420,
1815
+ threshold: o = 90
1816
+ }) {
1817
+ const i = Ke.toArray(e), [s, u] = T(0), [p, j] = T(0), [l, c] = T(!1), [f, y] = T(null), [x, k] = T([]), b = J(0), d = J(null);
1818
+ W(
1819
+ () => () => {
1820
+ d.current && clearTimeout(d.current);
1821
+ },
1822
+ []
1823
+ );
1824
+ const g = i.length - s, h = q(
1825
+ (N) => {
1826
+ if (f || s >= i.length) return;
1827
+ const L = s;
1828
+ y(N), c(!1), t == null || t(L, N), d.current = setTimeout(() => {
1829
+ k((C) => [...C, { index: L, direction: N }]), u(L + 1), y(null), j(0);
1830
+ }, ue);
1831
+ },
1832
+ [i.length, s, f, t]
1833
+ ), m = q(() => {
1834
+ if (f || x.length === 0) return;
1835
+ const N = x[x.length - 1];
1836
+ k((L) => L.slice(0, -1)), u(N.index), j(0);
1837
+ }, [f, x]), v = (N) => {
1838
+ f || (N.currentTarget.setPointerCapture(N.pointerId), b.current = N.clientX, c(!0));
1839
+ }, w = (N) => {
1840
+ !l || f || j(N.clientX - b.current);
1841
+ }, E = () => {
1842
+ !l || f || (c(!1), Math.abs(p) >= o ? h(p > 0 ? "keep" : "pass") : j(0));
1843
+ }, M = (N) => {
1844
+ N.key === "ArrowRight" && h("keep"), N.key === "ArrowLeft" && h("pass"), N.key === "Backspace" && m();
1845
+ }, R = f ? f === "keep" ? n * 2 : -n * 2 : p, S = Math.max(-14, Math.min(14, R * 0.05)), A = Math.abs(p) >= o ? p > 0 ? "keep" : "pass" : null;
1846
+ return /* @__PURE__ */ _(
1847
+ "div",
1848
+ {
1849
+ style: {
1850
+ display: "grid",
1851
+ gridTemplateRows: `${r}px auto auto`,
1852
+ gap: 14,
1853
+ justifyItems: "center"
1854
+ },
1855
+ children: [
1856
+ /* @__PURE__ */ _(
1857
+ "div",
1858
+ {
1859
+ role: "group",
1860
+ "aria-label": "Seed triage deck",
1861
+ tabIndex: 0,
1862
+ onKeyDown: M,
1863
+ style: {
1864
+ position: "relative",
1865
+ width: n,
1866
+ height: r,
1867
+ touchAction: "none",
1868
+ outline: "none"
1869
+ },
1870
+ children: [
1871
+ g === 0 ? /* @__PURE__ */ a("div", { style: { position: "absolute", inset: 0, display: "grid", placeItems: "center" }, children: /* @__PURE__ */ a(Y, { size: "sm", tone: "grey", children: "No seeds left" }) }) : null,
1872
+ i.slice(s, s + Ne).map((N, L) => {
1873
+ const C = L === 0, z = C ? `translate3d(${R}px, 0, 0) rotate(${S}deg)` : `translate3d(0, ${L * 9}px, 0) scale(${1 - L * 0.045})`;
1874
+ return /* @__PURE__ */ _(
1875
+ "div",
1876
+ {
1877
+ onPointerDown: C ? v : void 0,
1878
+ onPointerMove: C ? w : void 0,
1879
+ onPointerUp: C ? E : void 0,
1880
+ onPointerCancel: C ? E : void 0,
1881
+ style: {
1882
+ position: "absolute",
1883
+ inset: 0,
1884
+ zIndex: Ne - L,
1885
+ transform: z,
1886
+ transition: l && C ? "none" : `transform ${ue}ms ease-out, opacity ${ue}ms ease-out`,
1887
+ opacity: C && f ? 0 : 1,
1888
+ cursor: C ? l ? "grabbing" : "grab" : "default",
1889
+ overflow: "hidden"
1890
+ },
1891
+ children: [
1892
+ N,
1893
+ C && A ? /* @__PURE__ */ a(
1894
+ "div",
1895
+ {
1896
+ style: {
1897
+ position: "absolute",
1898
+ top: 14,
1899
+ left: A === "keep" ? 14 : void 0,
1900
+ right: A === "pass" ? 14 : void 0,
1901
+ padding: "4px 10px",
1902
+ borderRadius: 4,
1903
+ border: `2px solid ${A === "keep" ? "#3fa34d" : "#c0392b"}`,
1904
+ transform: `rotate(${A === "keep" ? -8 : 8}deg)`,
1905
+ pointerEvents: "none"
1906
+ },
1907
+ children: /* @__PURE__ */ a(Y, { size: "xs", tone: A === "keep" ? "green" : "red", children: A === "keep" ? "Keep" : "Pass" })
1908
+ }
1909
+ ) : null
1910
+ ]
1911
+ },
1912
+ s + L
1913
+ );
1914
+ })
1915
+ ]
1916
+ }
1917
+ ),
1918
+ /* @__PURE__ */ _("div", { style: { display: "grid", gridAutoFlow: "column", gap: 16, alignItems: "center" }, children: [
1919
+ /* @__PURE__ */ a(
1920
+ ee,
1921
+ {
1922
+ "aria-label": "Pass",
1923
+ title: "Pass (left arrow)",
1924
+ tone: "destructive",
1925
+ onClick: () => h("pass"),
1926
+ disabled: g === 0,
1927
+ children: /* @__PURE__ */ a(Te, {})
1928
+ }
1929
+ ),
1930
+ /* @__PURE__ */ a(
1931
+ ee,
1932
+ {
1933
+ "aria-label": "Undo",
1934
+ title: "Undo (backspace)",
1935
+ size: "sm",
1936
+ onClick: m,
1937
+ disabled: x.length === 0,
1938
+ children: /* @__PURE__ */ a(pt, {})
1939
+ }
1940
+ ),
1941
+ /* @__PURE__ */ a(
1942
+ ee,
1943
+ {
1944
+ "aria-label": "Keep",
1945
+ title: "Keep (right arrow)",
1946
+ onClick: () => h("keep"),
1947
+ disabled: g === 0,
1948
+ children: /* @__PURE__ */ a(Re, {})
1949
+ }
1950
+ )
1951
+ ] }),
1952
+ /* @__PURE__ */ _(Y, { size: "micro", tone: "grey", children: [
1953
+ g,
1954
+ " of ",
1955
+ i.length,
1956
+ " left"
1957
+ ] })
1958
+ ]
1959
+ }
1960
+ );
1961
+ }
1962
+ export {
1963
+ Je as $,
1964
+ ce as A,
1965
+ Bn as B,
1966
+ $n as C,
1967
+ Dn as D,
1968
+ In as E,
1969
+ Ie as F,
1970
+ Jn as G,
1971
+ Fn as H,
1972
+ On as I,
1973
+ Sn as J,
1974
+ Mn as K,
1975
+ ot as L,
1976
+ et as M,
1977
+ _n as N,
1978
+ Nn as O,
1979
+ tr as P,
1980
+ kn as Q,
1981
+ Rn as R,
1982
+ mn as S,
1983
+ Wt as T,
1984
+ ir as U,
1985
+ zn as V,
1986
+ Y as W,
1987
+ Hn as X,
1988
+ Pn as Y,
1989
+ Qn as Z,
1990
+ De as _,
1991
+ Vn as a,
1992
+ tn as a0,
1993
+ we as a1,
1994
+ Fe as a2,
1995
+ F as a3,
1996
+ ye as a4,
1997
+ le as a5,
1998
+ $e as a6,
1999
+ Ht as a7,
2000
+ qt as a8,
2001
+ We as a9,
2002
+ Dt as aa,
2003
+ Jt as ab,
2004
+ ze as ac,
2005
+ nn as ad,
2006
+ Kt as ae,
2007
+ Xt as af,
2008
+ or as ag,
2009
+ Yt as ah,
2010
+ Vt as ai,
2011
+ Zt as aj,
2012
+ rn as ak,
2013
+ Wn as al,
2014
+ wn as am,
2015
+ I as an,
2016
+ hn as ao,
2017
+ Re as ap,
2018
+ jn as aq,
2019
+ gn as ar,
2020
+ Te as as,
2021
+ bn as at,
2022
+ vn as au,
2023
+ gt as av,
2024
+ Gn as aw,
2025
+ Zn as b,
2026
+ En as c,
2027
+ $ as d,
2028
+ X as e,
2029
+ pn as f,
2030
+ Xn as g,
2031
+ yt as h,
2032
+ nr as i,
2033
+ Kn as j,
2034
+ rr as k,
2035
+ An as l,
2036
+ er as m,
2037
+ ee as n,
2038
+ Cn as o,
2039
+ Yn as p,
2040
+ yn as q,
2041
+ qn as r,
2042
+ Ln as s,
2043
+ Un as t,
2044
+ ar as u,
2045
+ xn as v,
2046
+ Qt as w,
2047
+ Ot as x,
2048
+ fn as y,
2049
+ Tn as z
2050
+ };
2051
+ //# sourceMappingURL=JimboSwipeDeck-DbzWak3V.js.map