@energy8platform/platform-core 0.25.4 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/game-spec.d.ts +3 -0
- package/dist/index.cjs.js +1772 -187
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +77 -9
- package/dist/index.esm.js +1772 -187
- package/dist/index.esm.js.map +1 -1
- package/dist/loading.cjs.js +237 -90
- package/dist/loading.cjs.js.map +1 -1
- package/dist/loading.d.ts +52 -2
- package/dist/loading.esm.js +235 -90
- package/dist/loading.esm.js.map +1 -1
- package/dist/shell.cjs.js +1539 -97
- package/dist/shell.cjs.js.map +1 -1
- package/dist/shell.d.ts +43 -11
- package/dist/shell.esm.js +1538 -98
- package/dist/shell.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/game-spec/types.ts +3 -0
- package/src/loading/CSSPreloader.ts +21 -115
- package/src/loading/index.ts +6 -0
- package/src/loading/variants/energy8.ts +105 -0
- package/src/loading/variants/index.ts +19 -0
- package/src/loading/variants/types.ts +36 -0
- package/src/loading/variants/voidmoon.ts +134 -0
- package/src/shell/GameShell.ts +87 -41
- package/src/shell/components/BuyBonus.ts +160 -14
- package/src/shell/components/GameInfo.ts +104 -5
- package/src/shell/components/Settings.ts +9 -10
- package/src/shell/components/pickers.ts +66 -10
- package/src/shell/components/primitives.ts +4 -3
- package/src/shell/i18n.ts +23 -0
- package/src/shell/index.ts +2 -1
- package/src/shell/keyboard.ts +229 -0
- package/src/shell/locales.ts +864 -0
- package/src/shell/shell.css.ts +37 -14
- package/src/shell/types.ts +8 -0
- package/src/shell/version.ts +1 -1
- package/src/types.ts +8 -0
package/dist/shell.cjs.js
CHANGED
|
@@ -50,6 +50,221 @@ class EventEmitter {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
// Bet key detection: bet-up needs Shift for arrow/equal, NumpadAdd is bare; same logic for down.
|
|
54
|
+
// Exported so overlays with their own bet stepper (Buy bonus) honour the SAME keys as the bar.
|
|
55
|
+
function betDir(e) {
|
|
56
|
+
if (e.code === 'ArrowUp' && e.shiftKey)
|
|
57
|
+
return 1;
|
|
58
|
+
if (e.code === 'Equal' && e.shiftKey)
|
|
59
|
+
return 1;
|
|
60
|
+
if (e.code === 'NumpadAdd')
|
|
61
|
+
return 1;
|
|
62
|
+
if (e.code === 'ArrowDown' && e.shiftKey)
|
|
63
|
+
return -1;
|
|
64
|
+
if (e.code === 'Minus' && e.shiftKey)
|
|
65
|
+
return -1;
|
|
66
|
+
if (e.code === 'NumpadSubtract')
|
|
67
|
+
return -1;
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
class KeyboardController {
|
|
71
|
+
host;
|
|
72
|
+
doc;
|
|
73
|
+
spaceHeld = false;
|
|
74
|
+
holdTimer = null;
|
|
75
|
+
// Bet hold-repeat state
|
|
76
|
+
betHeldCode = null;
|
|
77
|
+
betTimer = null;
|
|
78
|
+
constructor(host, doc) {
|
|
79
|
+
this.host = host;
|
|
80
|
+
this.doc = doc ?? (typeof document !== 'undefined' ? document : null);
|
|
81
|
+
}
|
|
82
|
+
isSpinAllowed() {
|
|
83
|
+
const h = this.host;
|
|
84
|
+
const s = h.state;
|
|
85
|
+
return (h.spacebarEnabled &&
|
|
86
|
+
h.hotkeysEnabled &&
|
|
87
|
+
!h.hasOpenLayer() &&
|
|
88
|
+
s.mode === 'base' &&
|
|
89
|
+
!s.autoplay.active);
|
|
90
|
+
}
|
|
91
|
+
isBetAllowed() {
|
|
92
|
+
const h = this.host;
|
|
93
|
+
const s = h.state;
|
|
94
|
+
return (h.hotkeysEnabled &&
|
|
95
|
+
!h.hasOpenLayer() &&
|
|
96
|
+
s.mode === 'base' &&
|
|
97
|
+
!s.busy);
|
|
98
|
+
}
|
|
99
|
+
clearBetTimer() {
|
|
100
|
+
if (this.betTimer !== null) {
|
|
101
|
+
clearTimeout(this.betTimer);
|
|
102
|
+
this.betTimer = null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
startBetRepeat(dir, elapsed) {
|
|
106
|
+
// elapsed is ms already spent holding; use it to accelerate toward 45ms floor.
|
|
107
|
+
// Start at 90ms, decrease ~1ms per 10ms held after the first repeat, floor at 45ms.
|
|
108
|
+
const interval = Math.max(45, 90 - Math.floor(elapsed / 10));
|
|
109
|
+
this.betTimer = setTimeout(() => {
|
|
110
|
+
this.betTimer = null;
|
|
111
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
112
|
+
this.host.stepBet(dir);
|
|
113
|
+
this.startBetRepeat(dir, elapsed + interval);
|
|
114
|
+
}
|
|
115
|
+
}, interval);
|
|
116
|
+
}
|
|
117
|
+
onKeyDown = (e) => {
|
|
118
|
+
const target = e.target;
|
|
119
|
+
// Editable element guard — never intercept keyboard input
|
|
120
|
+
if (target && (target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName)))
|
|
121
|
+
return;
|
|
122
|
+
// For Space: claim preventDefault early (before layer/mode/busy bail) so the browser's
|
|
123
|
+
// native "Space activates focused button" can't re-fire a shell control and flicker a modal.
|
|
124
|
+
if (e.code === 'Space' && !e.repeat) {
|
|
125
|
+
if (!this.host.spacebarEnabled || !this.host.hotkeysEnabled)
|
|
126
|
+
return;
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
if (this.host.hasOpenLayer()) {
|
|
129
|
+
this.host.routeToLayer(e);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const s = this.host.state;
|
|
133
|
+
if (s.mode !== 'base' || s.busy || s.autoplay.active)
|
|
134
|
+
return;
|
|
135
|
+
this.spaceHeld = true;
|
|
136
|
+
this.host.spin();
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
// Bet step keys (Shift+arrows, Shift+=/-, NumpadAdd/Subtract) — non-repeat only
|
|
140
|
+
if (!e.repeat) {
|
|
141
|
+
const dir = betDir(e);
|
|
142
|
+
if (dir !== null && this.isBetAllowed()) {
|
|
143
|
+
this.betHeldCode = e.code;
|
|
144
|
+
this.host.stepBet(dir);
|
|
145
|
+
// First repeat after 350ms initial delay
|
|
146
|
+
this.clearBetTimer();
|
|
147
|
+
const capturedDir = dir;
|
|
148
|
+
this.betTimer = setTimeout(() => {
|
|
149
|
+
this.betTimer = null;
|
|
150
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
151
|
+
this.host.stepBet(capturedDir);
|
|
152
|
+
this.startBetRepeat(capturedDir, 350);
|
|
153
|
+
}
|
|
154
|
+
}, 350);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// Non-Space keys: give the open layer first refusal. If it consumes the key, done; Escape closes
|
|
159
|
+
// it. Anything the layer does NOT consume falls through to the chrome hotkeys below — so the
|
|
160
|
+
// Settings/Info pages still honour Shift+I (Game info), Shift+M (sound), Shift+S, etc.
|
|
161
|
+
if (this.host.hasOpenLayer()) {
|
|
162
|
+
const consumed = this.host.routeToLayer(e);
|
|
163
|
+
if (consumed)
|
|
164
|
+
return;
|
|
165
|
+
if (e.code === 'Escape') {
|
|
166
|
+
this.host.closeLayer();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
// not consumed → fall through to the Shift+letter chrome hotkeys
|
|
170
|
+
}
|
|
171
|
+
// Shift+letter bar hotkeys — fire when no layer is open, OR when an open layer left the key
|
|
172
|
+
// unconsumed (see fall-through above); gated on hotkeys being enabled.
|
|
173
|
+
if (!e.repeat && e.shiftKey && this.host.hotkeysEnabled) {
|
|
174
|
+
const h = this.host;
|
|
175
|
+
const s = h.state;
|
|
176
|
+
switch (e.code) {
|
|
177
|
+
case 'KeyA':
|
|
178
|
+
if (h.autoplayEnabled && !s.replay) {
|
|
179
|
+
h.toggleAutoplay();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
break;
|
|
183
|
+
case 'KeyT':
|
|
184
|
+
if (h.turboLevels > 0 && !s.replay) {
|
|
185
|
+
h.cycleTurbo();
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
break;
|
|
189
|
+
case 'KeyB':
|
|
190
|
+
if (h.buyBonusEnabled && s.mode === 'base' && !s.replay) {
|
|
191
|
+
h.openBuyBonus();
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
case 'KeyI':
|
|
196
|
+
h.openInfo();
|
|
197
|
+
return;
|
|
198
|
+
case 'KeyS':
|
|
199
|
+
h.openMenu();
|
|
200
|
+
return;
|
|
201
|
+
case 'KeyM':
|
|
202
|
+
h.toggleMute();
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
onKeyUp = (e) => {
|
|
208
|
+
if (e.code === 'Space') {
|
|
209
|
+
this.spaceHeld = false;
|
|
210
|
+
this.clearHoldTimer();
|
|
211
|
+
}
|
|
212
|
+
// Stop bet repeat on key release
|
|
213
|
+
if (e.code === this.betHeldCode) {
|
|
214
|
+
this.betHeldCode = null;
|
|
215
|
+
this.clearBetTimer();
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
onBlur = () => {
|
|
219
|
+
// Window blur — stop bet repeat AND hold-to-spin (same as releasing both keys)
|
|
220
|
+
this.betHeldCode = null;
|
|
221
|
+
this.clearBetTimer();
|
|
222
|
+
this.spaceHeld = false;
|
|
223
|
+
this.clearHoldTimer();
|
|
224
|
+
};
|
|
225
|
+
clearHoldTimer() {
|
|
226
|
+
if (this.holdTimer !== null) {
|
|
227
|
+
clearTimeout(this.holdTimer);
|
|
228
|
+
this.holdTimer = null;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
attach() {
|
|
232
|
+
this.doc.addEventListener('keydown', this.onKeyDown);
|
|
233
|
+
this.doc.addEventListener('keyup', this.onKeyUp);
|
|
234
|
+
// Use window if available for blur events
|
|
235
|
+
if (typeof window !== 'undefined') {
|
|
236
|
+
window.addEventListener('blur', this.onBlur);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
detach() {
|
|
240
|
+
this.doc.removeEventListener('keydown', this.onKeyDown);
|
|
241
|
+
this.doc.removeEventListener('keyup', this.onKeyUp);
|
|
242
|
+
if (typeof window !== 'undefined') {
|
|
243
|
+
window.removeEventListener('blur', this.onBlur);
|
|
244
|
+
}
|
|
245
|
+
this.spaceHeld = false;
|
|
246
|
+
this.clearHoldTimer();
|
|
247
|
+
this.betHeldCode = null;
|
|
248
|
+
this.clearBetTimer();
|
|
249
|
+
}
|
|
250
|
+
notifyBusyChanged(busy) {
|
|
251
|
+
if (busy)
|
|
252
|
+
return;
|
|
253
|
+
if (!this.spaceHeld)
|
|
254
|
+
return;
|
|
255
|
+
if (!this.isSpinAllowed())
|
|
256
|
+
return;
|
|
257
|
+
// Schedule the next spin after the 120 ms floor (gap between completion and next spin).
|
|
258
|
+
this.clearHoldTimer();
|
|
259
|
+
this.holdTimer = setTimeout(() => {
|
|
260
|
+
this.holdTimer = null;
|
|
261
|
+
if (this.spaceHeld && this.isSpinAllowed()) {
|
|
262
|
+
this.host.spin();
|
|
263
|
+
}
|
|
264
|
+
}, 120);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
53
268
|
function createInitialState(config) {
|
|
54
269
|
return {
|
|
55
270
|
mode: config.mode,
|
|
@@ -319,6 +534,21 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
319
534
|
#${SHELL_ROOT_ID} .ge-gi-version { text-align:center; color:var(--shell-muted); font-size:11px;
|
|
320
535
|
letter-spacing:.08em; opacity:.7; margin:4px 0 2px; }
|
|
321
536
|
|
|
537
|
+
/* hotkeys — keycap chips → localized action label, mirrors controls row layout */
|
|
538
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-block { display:flex; flex-direction:column; }
|
|
539
|
+
#${SHELL_ROOT_ID} .ge-gi-hk { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; }
|
|
540
|
+
#${SHELL_ROOT_ID} .ge-gi-hk + .ge-gi-hk { border-top:1px solid var(--shell-plaque-line); }
|
|
541
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chips { display:flex; align-items:center; flex-wrap:wrap; gap:4px; flex:0 0 auto; }
|
|
542
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-combo { display:inline-flex; align-items:center; gap:4px; }
|
|
543
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chip { display:inline-flex; align-items:center; justify-content:center;
|
|
544
|
+
padding:2px 7px; border-radius:6px; border:1px solid var(--shell-plaque-line);
|
|
545
|
+
background:var(--shell-plaque-dark); color:#fff;
|
|
546
|
+
font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace; font-size:12px;
|
|
547
|
+
font-weight:600; line-height:1.5; white-space:nowrap; min-width:1.6em; text-align:center; }
|
|
548
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep { color:var(--shell-plaque-label); font-size:11px; padding:0 1px; }
|
|
549
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep2 { color:var(--shell-plaque-label); font-size:11px; padding:0 4px; }
|
|
550
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-tx { color:rgba(255,255,255,.88); font-size:14px; font-weight:600; text-align:right; flex:1; }
|
|
551
|
+
|
|
322
552
|
/* controls — two blocks (gameplay / menu & info), icon/name/description per control */
|
|
323
553
|
#${SHELL_ROOT_ID} .ge-gi-ctl-block + .ge-gi-ctl-block { margin-top:16px; padding-top:4px; border-top:1px solid var(--shell-plaque-line); }
|
|
324
554
|
#${SHELL_ROOT_ID} .ge-gi-ctl-block-h { color:var(--shell-plaque-label); font-size:11px; letter-spacing:.12em;
|
|
@@ -413,20 +643,26 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
413
643
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-body { max-width:none; padding:clamp(6px,2.5cqh,16px) clamp(12px,3vw,28px); }
|
|
414
644
|
#${SHELL_ROOT_ID} .ge-bb-grid { display:flex; gap:14px; justify-content:safe center; overflow-x:auto; overflow-y:hidden; padding-bottom:6px;
|
|
415
645
|
scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
|
|
416
|
-
/* the one knob that scales the whole card
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
646
|
+
/* the one knob that scales the whole card (its whole layout is em-relative). It is the SMALLER of two
|
|
647
|
+
fits, so the card is always fully visible:
|
|
648
|
+
• 3.4cqh — height: the card stays inside the band between the header and the bet footer (cqh
|
|
649
|
+
measures the overlay popout frame, not the browser window);
|
|
650
|
+
• 84cqw / (N*18) — width: the N cards (each 18em) fit the frame width side-by-side instead of
|
|
651
|
+
overflowing into an X-scroll. --ge-bb-n is the live card count, set in BuyBonus.ts.
|
|
652
|
+
Floor is deliberately tiny: on a 400×225 popout a fully visible card beats a bigger clipped one. */
|
|
420
653
|
#${SHELL_ROOT_ID} .ge-bb-grid .ge-bonus-card { flex:0 0 18em; scroll-snap-align:start;
|
|
421
|
-
font-size:clamp(4px, 3.4cqh, 12px); }
|
|
422
|
-
/* mobile: vertical stack at a fixed, readable size — scroll the list
|
|
654
|
+
font-size:clamp(4px, min(3.4cqh, calc(84cqw / (var(--ge-bb-n,3) * 18))), 12px); }
|
|
655
|
+
/* mobile: vertical stack at a fixed, readable size — scroll the list; only shrink if the card would
|
|
656
|
+
be wider than the frame (very narrow viewport), so it never overflows horizontally. */
|
|
423
657
|
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid { display:flex; flex-direction:column; gap:14px; overflow:visible; }
|
|
424
|
-
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:12px; }
|
|
658
|
+
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:min(12px, calc(92cqw / 18)); }
|
|
425
659
|
#${SHELL_ROOT_ID} .ge-bonus-card { display:flex; flex-direction:column; border-radius:1.4em; overflow:hidden;
|
|
426
660
|
background:var(--shell-plaque-glass); border:1px solid var(--shell-plaque-line); color:#fff; text-align:center;
|
|
427
661
|
pointer-events:auto; cursor:pointer; transition:box-shadow .12s ease, background .12s ease; }
|
|
428
662
|
#${SHELL_ROOT_ID} .ge-bonus-card:hover:not(.ge-bonus-off) {
|
|
429
663
|
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
664
|
+
#${SHELL_ROOT_ID} .ge-bonus-card--kbd-focus:not(.ge-bonus-off) {
|
|
665
|
+
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
430
666
|
/* custom card (BonusOption.custom): keep grid sizing + accent vars, drop the default chrome so the game owns the UI */
|
|
431
667
|
#${SHELL_ROOT_ID} .ge-bonus-card--custom { background:none; border:none; cursor:default; }
|
|
432
668
|
#${SHELL_ROOT_ID} .ge-bonus-body { display:flex; flex-direction:column; align-items:center; flex:1; padding:1.25em 1.1em .9em; }
|
|
@@ -482,13 +718,15 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
482
718
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-spacer { width:clamp(24px,7cqh,32px); }
|
|
483
719
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-nav { width:clamp(24px,7cqh,32px); height:clamp(24px,7cqh,32px);
|
|
484
720
|
font-size:clamp(14px,4cqh,18px); border-radius:clamp(7px,2cqh,9px); }
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-
|
|
488
|
-
|
|
489
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-
|
|
490
|
-
|
|
491
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval
|
|
721
|
+
/* the bet pill read too large next to the shrunk cards — size it ~0.8× across the board (the floors
|
|
722
|
+
stay readable; the maxima are what dominate on Popout L / wide frames). */
|
|
723
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betbar { padding:clamp(2px,.75cqh,3px); }
|
|
724
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betpill { padding:clamp(2px,.55cqh,3px) clamp(3px,.9cqh,4px); }
|
|
725
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betstep { width:clamp(20px,5.7cqh,26px); height:clamp(20px,5.7cqh,26px);
|
|
726
|
+
font-size:clamp(12px,3.5cqh,16px); }
|
|
727
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(50px,14cqh,66px); }
|
|
728
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(9px,2.5cqh,11px); }
|
|
729
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(5px,1.25cqh,6px); }
|
|
492
730
|
|
|
493
731
|
/* ═══ base/wide plaque bar — grouped dark + glass panels (reference-style) ═══ */
|
|
494
732
|
#${SHELL_ROOT_ID} .ge-zone-plaques { gap:0; } /* panels connect; buttons overlap */
|
|
@@ -705,7 +943,8 @@ function createCardModal(opts) {
|
|
|
705
943
|
}
|
|
706
944
|
return { root, card, body };
|
|
707
945
|
}
|
|
708
|
-
/** Full-screen overlay. Returns { root, body }; append content to body.
|
|
946
|
+
/** Full-screen overlay. Returns { root, body, scroll }; append content to body.
|
|
947
|
+
* The `scroll` element is the scrollable container (overflow-y: auto). */
|
|
709
948
|
function createOverlay(opts) {
|
|
710
949
|
const root = document.createElement('div');
|
|
711
950
|
root.className = 'ge-shell-overlay';
|
|
@@ -743,7 +982,7 @@ function createOverlay(opts) {
|
|
|
743
982
|
body.className = 'ge-ov-body';
|
|
744
983
|
scroll.appendChild(body);
|
|
745
984
|
root.append(head, scroll);
|
|
746
|
-
return { root, body };
|
|
985
|
+
return { root, body, scroll };
|
|
747
986
|
}
|
|
748
987
|
|
|
749
988
|
/** A floating labelled money readout (balance/win/bet). */
|
|
@@ -995,24 +1234,22 @@ function applyBusy(shell, bar) {
|
|
|
995
1234
|
function openSettingsModal(shell) {
|
|
996
1235
|
const { root, body } = createOverlay({ title: shell.t('Settings'), onClose: () => root.remove() });
|
|
997
1236
|
root.dataset.ge = 'settings-modal';
|
|
998
|
-
// Sound on/off
|
|
1237
|
+
// Sound on/off — backed by the shell's shared `soundOn` state so this toggle and the Shift+M
|
|
1238
|
+
// hotkey stay in sync; `setSound` emits `settingChange({ key: 'sound' })` and refreshes the icon.
|
|
999
1239
|
const sound = (() => {
|
|
1000
|
-
let on = true;
|
|
1001
1240
|
const btn = document.createElement('button');
|
|
1002
|
-
btn.className = 'ge-snd
|
|
1241
|
+
btn.className = 'ge-snd';
|
|
1003
1242
|
btn.dataset.ge = 'setting-sound';
|
|
1004
|
-
btn.setAttribute('aria-label', 'Sound');
|
|
1005
|
-
const paint = () => {
|
|
1243
|
+
btn.setAttribute('aria-label', shell.t('Sound'));
|
|
1244
|
+
const paint = (on) => {
|
|
1006
1245
|
btn.innerHTML = icon(on ? 'soundOn' : 'soundOff');
|
|
1007
1246
|
btn.classList.toggle('ge-active', on);
|
|
1008
1247
|
btn.setAttribute('aria-pressed', String(on));
|
|
1009
1248
|
};
|
|
1010
|
-
paint();
|
|
1011
|
-
btn.addEventListener('click', () =>
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
shell.emit('settingChange', { key: 'sound', value: on });
|
|
1015
|
-
});
|
|
1249
|
+
paint(shell.soundOn);
|
|
1250
|
+
btn.addEventListener('click', () => shell.setSound(!shell.soundOn));
|
|
1251
|
+
// Live-update the icon when sound changes from here OR via Shift+M (shell clears on close).
|
|
1252
|
+
shell.setSoundRefresh(paint);
|
|
1016
1253
|
const row = document.createElement('div');
|
|
1017
1254
|
row.className = 'ge-ov-row';
|
|
1018
1255
|
row.innerHTML = `<span class="ge-grow">${shell.t('Sound')}</span>`;
|
|
@@ -1062,17 +1299,25 @@ function openSettingsModal(shell) {
|
|
|
1062
1299
|
|
|
1063
1300
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1064
1301
|
/** The @energy8platform/platform-core package version, stamped at build time. */
|
|
1065
|
-
const PACKAGE_VERSION = '0.
|
|
1302
|
+
const PACKAGE_VERSION = '0.26.1';
|
|
1066
1303
|
|
|
1304
|
+
/** Default order key for the auto-injected hotkeys section: just after `controls` (-1). */
|
|
1305
|
+
const HOTKEYS_DEFAULT_ORDER = -0.5;
|
|
1067
1306
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
1068
1307
|
function openGameInfoModal(shell) {
|
|
1069
|
-
const { root, body } = createOverlay({
|
|
1308
|
+
const { root, body, scroll } = createOverlay({
|
|
1070
1309
|
title: shell.t('Game info'),
|
|
1071
1310
|
onClose: () => root.remove(),
|
|
1072
1311
|
onBack: () => { root.remove(); shell.openSettings(); },
|
|
1073
1312
|
});
|
|
1074
1313
|
root.dataset.ge = 'info-modal';
|
|
1075
|
-
const
|
|
1314
|
+
const rawSections = shell.config.gameInfo.sections ?? [];
|
|
1315
|
+
// Auto-inject a hotkeys section unless the game already provides one or features.hotkeys === false.
|
|
1316
|
+
const sectionsWithHotkeys = [...rawSections];
|
|
1317
|
+
if (shell.config.features.hotkeys !== false && !rawSections.some((s) => s.type === 'hotkeys')) {
|
|
1318
|
+
sectionsWithHotkeys.push({ type: 'hotkeys', order: HOTKEYS_DEFAULT_ORDER });
|
|
1319
|
+
}
|
|
1320
|
+
const sections = sectionsWithHotkeys;
|
|
1076
1321
|
// Default placement: modes first, controls second, the rest in declaration order.
|
|
1077
1322
|
// An explicit `order` overrides; ties keep declaration order (stable).
|
|
1078
1323
|
const base = (s, i) => s.order ?? (s.type === 'modes' ? -2 : s.type === 'controls' ? -1 : i);
|
|
@@ -1081,7 +1326,40 @@ function openGameInfoModal(shell) {
|
|
|
1081
1326
|
.sort((a, b) => a.k - b.k || a.i - b.i)
|
|
1082
1327
|
.forEach(({ s }) => body.appendChild(renderSection(shell, s)));
|
|
1083
1328
|
body.appendChild(versionFooter(shell));
|
|
1084
|
-
|
|
1329
|
+
const LINE = 60;
|
|
1330
|
+
const PAGE = () => Math.floor(scroll.clientHeight * 0.9) || Math.floor(540 * 0.9);
|
|
1331
|
+
const onKey = (e) => {
|
|
1332
|
+
switch (e.code) {
|
|
1333
|
+
case 'ArrowDown':
|
|
1334
|
+
scroll.scrollTop += LINE;
|
|
1335
|
+
return true;
|
|
1336
|
+
case 'ArrowUp':
|
|
1337
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - LINE);
|
|
1338
|
+
return true;
|
|
1339
|
+
case 'PageDown':
|
|
1340
|
+
scroll.scrollTop += PAGE();
|
|
1341
|
+
return true;
|
|
1342
|
+
case 'PageUp':
|
|
1343
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
1344
|
+
return true;
|
|
1345
|
+
case 'Space':
|
|
1346
|
+
if (e.shiftKey) {
|
|
1347
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
1348
|
+
}
|
|
1349
|
+
else {
|
|
1350
|
+
scroll.scrollTop += PAGE();
|
|
1351
|
+
}
|
|
1352
|
+
return true;
|
|
1353
|
+
case 'Home':
|
|
1354
|
+
scroll.scrollTop = 0;
|
|
1355
|
+
return true;
|
|
1356
|
+
case 'End':
|
|
1357
|
+
scroll.scrollTop = scroll.scrollHeight - scroll.clientHeight;
|
|
1358
|
+
return true;
|
|
1359
|
+
default: return false;
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
return { root, onKey };
|
|
1085
1363
|
}
|
|
1086
1364
|
/** A muted version stamp pinned to the bottom of the game-info modal:
|
|
1087
1365
|
* `${config.version ?? '1.0.0'}.${engine version without dots}` (e.g. '1.0.0.0246'). */
|
|
@@ -1097,9 +1375,11 @@ function renderSection(shell, s) {
|
|
|
1097
1375
|
switch (s.type) {
|
|
1098
1376
|
case 'modes': return sectionModes(shell, s.modes, sec('info-modes', s.title, shell.t('Modes')));
|
|
1099
1377
|
case 'controls': return sectionControls(shell, sec('info-controls', s.title, shell.t('Controls')));
|
|
1378
|
+
case 'hotkeys': return sectionHotkeys(shell, sec('info-hotkeys', s.title, shell.t('Hotkeys')));
|
|
1100
1379
|
case 'paytable': return sectionPaytable(s.rows, sec('info-paytable', s.title, shell.t('Paytable')));
|
|
1101
1380
|
case 'wins': return sectionWins(s, sec('info-wins', s.title, shell.t(winFallbackTitle(s.kind))));
|
|
1102
|
-
|
|
1381
|
+
// Translate the heading (e.g. the host-built DISCLAIMER title); the body stays verbatim.
|
|
1382
|
+
case 'custom': return sectionCustom(s, sec('info-custom', s.title != null ? shell.t(s.title) : undefined, ''));
|
|
1103
1383
|
}
|
|
1104
1384
|
}
|
|
1105
1385
|
/** A titled glass-plaque section shell. */
|
|
@@ -1181,6 +1461,57 @@ function ctlBlock(shell, label, rows) {
|
|
|
1181
1461
|
}
|
|
1182
1462
|
return block;
|
|
1183
1463
|
}
|
|
1464
|
+
function sectionHotkeys(shell, el) {
|
|
1465
|
+
const { features } = shell.config;
|
|
1466
|
+
/** Render one or more key names as keycap chips joined by " / ". */
|
|
1467
|
+
const chips = (...keys) => keys.map((k) => `<span class="ge-gi-hk-chip">${k}</span>`).join('<span class="ge-gi-hk-sep"> / </span>');
|
|
1468
|
+
const rows = [
|
|
1469
|
+
{ chips: ['Space'], name: 'Spin', on: true },
|
|
1470
|
+
{ chips: ['Shift', '↑', 'Shift', '='], name: 'Raise bet', on: true },
|
|
1471
|
+
{ chips: ['Shift', '↓', 'Shift', '-'], name: 'Lower bet', on: true },
|
|
1472
|
+
{ chips: ['Shift', 'A'], name: 'Autoplay', on: features.autoplay != null },
|
|
1473
|
+
{ chips: ['Shift', 'T'], name: 'Turbo', on: features.turbo > 0 },
|
|
1474
|
+
{ chips: ['Shift', 'B'], name: 'Buy bonus', on: features.buyBonus !== false },
|
|
1475
|
+
{ chips: ['Shift', 'I'], name: 'Game info', on: true },
|
|
1476
|
+
{ chips: ['Shift', 'S'], name: 'Menu', on: true },
|
|
1477
|
+
{ chips: ['Shift', 'M'], name: 'Mute', on: true },
|
|
1478
|
+
{ chips: ['←', '→'], name: 'Navigate', on: true },
|
|
1479
|
+
{ chips: ['Enter'], name: 'Confirm', on: true },
|
|
1480
|
+
{ chips: ['Esc'], name: 'Close', on: true },
|
|
1481
|
+
];
|
|
1482
|
+
const block = document.createElement('div');
|
|
1483
|
+
block.className = 'ge-gi-hk-block';
|
|
1484
|
+
for (const r of rows.filter((x) => x.on)) {
|
|
1485
|
+
const row = document.createElement('div');
|
|
1486
|
+
row.className = 'ge-gi-hk';
|
|
1487
|
+
// Build the chips column
|
|
1488
|
+
const chipsEl = document.createElement('div');
|
|
1489
|
+
chipsEl.className = 'ge-gi-hk-chips';
|
|
1490
|
+
if (r.name === 'Raise bet' || r.name === 'Lower bet') {
|
|
1491
|
+
// Two combos separated by " / ": Shift+↑ / Shift+= and Shift+↓ / Shift+-
|
|
1492
|
+
const [k1, k2, k3, k4] = r.chips;
|
|
1493
|
+
chipsEl.innerHTML =
|
|
1494
|
+
`<span class="ge-gi-hk-combo">${chips(k1, k2)}</span>` +
|
|
1495
|
+
`<span class="ge-gi-hk-sep2"> / </span>` +
|
|
1496
|
+
`<span class="ge-gi-hk-combo">${chips(k3, k4)}</span>`;
|
|
1497
|
+
}
|
|
1498
|
+
else if (r.chips.length > 1) {
|
|
1499
|
+
// Chord: Shift + X
|
|
1500
|
+
chipsEl.innerHTML = `<span class="ge-gi-hk-combo">${chips(...r.chips)}</span>`;
|
|
1501
|
+
}
|
|
1502
|
+
else {
|
|
1503
|
+
chipsEl.innerHTML = chips(...r.chips);
|
|
1504
|
+
}
|
|
1505
|
+
const tx = document.createElement('div');
|
|
1506
|
+
tx.className = 'ge-gi-hk-tx';
|
|
1507
|
+
tx.textContent = shell.t(r.name);
|
|
1508
|
+
row.appendChild(chipsEl);
|
|
1509
|
+
row.appendChild(tx);
|
|
1510
|
+
block.appendChild(row);
|
|
1511
|
+
}
|
|
1512
|
+
el.appendChild(block);
|
|
1513
|
+
return el;
|
|
1514
|
+
}
|
|
1184
1515
|
// ── paytable (cards — image on top, name, then win tiers "<count> x<mult>") ────
|
|
1185
1516
|
function sectionPaytable(rows, el) {
|
|
1186
1517
|
const grid = document.createElement('div');
|
|
@@ -1379,25 +1710,168 @@ function sectionCustom(s, el) {
|
|
|
1379
1710
|
return el;
|
|
1380
1711
|
}
|
|
1381
1712
|
|
|
1382
|
-
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
1713
|
+
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
1714
|
+
* Returns the overlay element + a keyboard handler for the shell's `showModal`. */
|
|
1383
1715
|
function openBuyBonusOverlay(shell) {
|
|
1384
1716
|
const bonuses = shell.config.features.buyBonus;
|
|
1385
1717
|
if (bonuses === false || bonuses.length === 0)
|
|
1386
1718
|
return null;
|
|
1387
|
-
const
|
|
1719
|
+
const st = { focusIndex: -1, confirmBonus: undefined };
|
|
1720
|
+
const { root, body } = createOverlay({ title: shell.t('Buy bonus'), onClose: () => shell.closeModal() });
|
|
1388
1721
|
root.dataset.ge = 'buybonus-overlay';
|
|
1389
1722
|
// Re-render the grid whenever the bet changes so every card's price stays live.
|
|
1390
1723
|
const renderGrid = () => {
|
|
1391
1724
|
body.innerHTML = '';
|
|
1392
1725
|
const grid = document.createElement('div');
|
|
1393
1726
|
grid.className = 'ge-bb-grid';
|
|
1394
|
-
|
|
1395
|
-
|
|
1727
|
+
// Card count drives the width-fit clamp in CSS (each card is 18em; N cards must fit the frame
|
|
1728
|
+
// width), so the row scales to the available width instead of overflowing into an X-scroll.
|
|
1729
|
+
grid.style.setProperty('--ge-bb-n', String(bonuses.length));
|
|
1730
|
+
const affordable = [];
|
|
1731
|
+
for (const bonus of bonuses) {
|
|
1732
|
+
const card = buildCard(shell, bonus, root, st);
|
|
1733
|
+
grid.appendChild(card);
|
|
1734
|
+
if (isAffordable(shell, bonus))
|
|
1735
|
+
affordable.push(bonus);
|
|
1736
|
+
}
|
|
1396
1737
|
body.appendChild(grid);
|
|
1738
|
+
// Initialize or restore focus index
|
|
1739
|
+
if (affordable.length > 0) {
|
|
1740
|
+
if (st.focusIndex < 0)
|
|
1741
|
+
st.focusIndex = 0;
|
|
1742
|
+
else
|
|
1743
|
+
st.focusIndex = Math.min(st.focusIndex, affordable.length - 1);
|
|
1744
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
1745
|
+
}
|
|
1746
|
+
else {
|
|
1747
|
+
st.focusIndex = -1;
|
|
1748
|
+
}
|
|
1397
1749
|
};
|
|
1398
1750
|
renderGrid();
|
|
1399
1751
|
root.appendChild(buildBetBar(shell, renderGrid)); // thin bottom footer, only as tall as the pill
|
|
1400
|
-
|
|
1752
|
+
/** Step the bet by `dir` and re-render the grid (live prices + affordability) when it changed.
|
|
1753
|
+
* Shared by the keyboard bet keys (the footer ± buttons keep their own copy). */
|
|
1754
|
+
const stepBetBy = (dir) => {
|
|
1755
|
+
const next = stepBet(shell.state, dir);
|
|
1756
|
+
if (next === shell.state.bet)
|
|
1757
|
+
return;
|
|
1758
|
+
shell.state.bet = next;
|
|
1759
|
+
shell.emit('betChange', next);
|
|
1760
|
+
shell.render();
|
|
1761
|
+
renderGrid();
|
|
1762
|
+
};
|
|
1763
|
+
/** Keyboard handler for both browse and confirm phases. */
|
|
1764
|
+
const onKey = (e) => {
|
|
1765
|
+
const affordable = bonuses.filter((b) => isAffordable(shell, b));
|
|
1766
|
+
// ── Confirm phase ──
|
|
1767
|
+
if (st.confirmBonus) {
|
|
1768
|
+
switch (e.code) {
|
|
1769
|
+
case 'Enter':
|
|
1770
|
+
case 'Space': {
|
|
1771
|
+
const bonus = st.confirmBonus;
|
|
1772
|
+
if (!isAffordable(shell, bonus))
|
|
1773
|
+
return true;
|
|
1774
|
+
if (bonus.type === 'feature')
|
|
1775
|
+
shell.activateFeature(bonus);
|
|
1776
|
+
else
|
|
1777
|
+
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
1778
|
+
shell.closeModal();
|
|
1779
|
+
return true;
|
|
1780
|
+
}
|
|
1781
|
+
case 'Escape':
|
|
1782
|
+
// Remove the confirm dialog, return to browse
|
|
1783
|
+
closeConfirm(root, st);
|
|
1784
|
+
return true;
|
|
1785
|
+
default:
|
|
1786
|
+
return false;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
// ── Browse phase ──
|
|
1790
|
+
const last = affordable.length - 1;
|
|
1791
|
+
const mobile = shell.layout === 'mobile';
|
|
1792
|
+
// Bet stepping mirrors the bar's keys (Shift+↑/↓, Shift+=/-, Numpad ±). Checked BEFORE arrow
|
|
1793
|
+
// navigation so a bare arrow still moves card focus while a Shift+arrow changes the bet.
|
|
1794
|
+
const bet = betDir(e);
|
|
1795
|
+
if (bet !== null) {
|
|
1796
|
+
stepBetBy(bet);
|
|
1797
|
+
return true;
|
|
1798
|
+
}
|
|
1799
|
+
// Determine navigation direction from key code + layout (mobile uses vertical arrows)
|
|
1800
|
+
const fwdKey = e.code === 'ArrowRight' || (mobile && e.code === 'ArrowDown');
|
|
1801
|
+
const bwdKey = e.code === 'ArrowLeft' || (mobile && e.code === 'ArrowUp');
|
|
1802
|
+
if (fwdKey) {
|
|
1803
|
+
if (last < 0)
|
|
1804
|
+
return true;
|
|
1805
|
+
if (st.focusIndex < last) {
|
|
1806
|
+
st.focusIndex++;
|
|
1807
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
1808
|
+
}
|
|
1809
|
+
return true;
|
|
1810
|
+
}
|
|
1811
|
+
if (bwdKey) {
|
|
1812
|
+
if (last < 0)
|
|
1813
|
+
return true;
|
|
1814
|
+
if (st.focusIndex > 0) {
|
|
1815
|
+
st.focusIndex--;
|
|
1816
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
1817
|
+
}
|
|
1818
|
+
return true;
|
|
1819
|
+
}
|
|
1820
|
+
switch (e.code) {
|
|
1821
|
+
case 'Enter':
|
|
1822
|
+
case 'Space':
|
|
1823
|
+
if (last < 0 || st.focusIndex < 0)
|
|
1824
|
+
return true;
|
|
1825
|
+
{
|
|
1826
|
+
const bonus = affordable[st.focusIndex];
|
|
1827
|
+
openConfirm(shell, bonus, root, st);
|
|
1828
|
+
}
|
|
1829
|
+
return true;
|
|
1830
|
+
// Bare =/- also step the bet (the Shift+=/- and Numpad variants are handled by betDir above).
|
|
1831
|
+
case 'Equal':
|
|
1832
|
+
stepBetBy(1);
|
|
1833
|
+
return true;
|
|
1834
|
+
case 'Minus':
|
|
1835
|
+
stepBetBy(-1);
|
|
1836
|
+
return true;
|
|
1837
|
+
case 'Escape':
|
|
1838
|
+
shell.closeModal();
|
|
1839
|
+
return true;
|
|
1840
|
+
default:
|
|
1841
|
+
return false;
|
|
1842
|
+
}
|
|
1843
|
+
};
|
|
1844
|
+
return { root, onKey };
|
|
1845
|
+
}
|
|
1846
|
+
/** Apply a CSS keyboard-focus class to the currently focused affordable card. */
|
|
1847
|
+
function applyFocusClass(overlay, bonuses, affordable, focusIndex) {
|
|
1848
|
+
for (const b of bonuses) {
|
|
1849
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${b.id}"]`);
|
|
1850
|
+
if (!card)
|
|
1851
|
+
continue;
|
|
1852
|
+
card.classList.remove('ge-bonus-card--kbd-focus');
|
|
1853
|
+
}
|
|
1854
|
+
const focused = affordable[focusIndex];
|
|
1855
|
+
if (!focused)
|
|
1856
|
+
return;
|
|
1857
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${focused.id}"]`);
|
|
1858
|
+
if (card)
|
|
1859
|
+
card.classList.add('ge-bonus-card--kbd-focus');
|
|
1860
|
+
}
|
|
1861
|
+
/** Open the confirm dialog for the given bonus and track it in overlay state. */
|
|
1862
|
+
function openConfirm(shell, bonus, overlay, st) {
|
|
1863
|
+
closeConfirm(overlay, st); // remove any existing confirm
|
|
1864
|
+
st.confirmBonus = bonus;
|
|
1865
|
+
overlay.appendChild(buildConfirm(shell, bonus, overlay, st));
|
|
1866
|
+
shell.fitModals();
|
|
1867
|
+
}
|
|
1868
|
+
/** Remove the confirm dialog and clear the overlay state. */
|
|
1869
|
+
function closeConfirm(overlay, st) {
|
|
1870
|
+
// The confirm dialog is a .ge-sheet with data-ge="bonus-confirm" appended directly to overlay.
|
|
1871
|
+
const sheet = overlay.querySelector('[data-ge="bonus-confirm"]');
|
|
1872
|
+
if (sheet)
|
|
1873
|
+
sheet.remove();
|
|
1874
|
+
st.confirmBonus = undefined;
|
|
1401
1875
|
}
|
|
1402
1876
|
/** Bet control — a compact −/+ pill around the live stake, in a thin footer at the screen bottom.
|
|
1403
1877
|
* Stepping repaints the value, re-prices the cards, and updates the control bar. */
|
|
@@ -1444,7 +1918,7 @@ function stepButton(ge, name) {
|
|
|
1444
1918
|
}
|
|
1445
1919
|
/** A grid card: title → thumbnail → description → volatility → price → full-bleed CTA.
|
|
1446
1920
|
* Clicking (when affordable) opens the confirmation modal. */
|
|
1447
|
-
function buildCard(shell, bonus, overlay) {
|
|
1921
|
+
function buildCard(shell, bonus, overlay, st) {
|
|
1448
1922
|
const accent = effectiveAccent(bonus);
|
|
1449
1923
|
const card = document.createElement('div');
|
|
1450
1924
|
card.className = 'ge-bonus-card';
|
|
@@ -1457,8 +1931,7 @@ function buildCard(shell, bonus, overlay) {
|
|
|
1457
1931
|
const select = () => {
|
|
1458
1932
|
if (!isAffordable(shell, bonus))
|
|
1459
1933
|
return;
|
|
1460
|
-
|
|
1461
|
-
shell.fitModals();
|
|
1934
|
+
openConfirm(shell, bonus, overlay, st);
|
|
1462
1935
|
};
|
|
1463
1936
|
// Game-supplied card UI: the shell keeps the wrapper (grid sizing + accent vars) and runs the
|
|
1464
1937
|
// buy flow when the game calls ctx.select(); the game owns everything inside.
|
|
@@ -1503,9 +1976,9 @@ function cardBody(shell, bonus) {
|
|
|
1503
1976
|
}
|
|
1504
1977
|
/** Confirmation modal — the shared card chrome (accent title heading, no ✕) with a bonus
|
|
1505
1978
|
* preview body and a full-bleed Cancel + action footer. */
|
|
1506
|
-
function buildConfirm(shell, bonus, overlay) {
|
|
1979
|
+
function buildConfirm(shell, bonus, overlay, st) {
|
|
1507
1980
|
const accent = effectiveAccent(bonus);
|
|
1508
|
-
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () =>
|
|
1981
|
+
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () => { closeConfirm(overlay, st); } });
|
|
1509
1982
|
const price = bonus.priceMultiplier * shell.state.bet;
|
|
1510
1983
|
const preview = document.createElement('div');
|
|
1511
1984
|
preview.className = 'ge-confirm-preview';
|
|
@@ -1521,7 +1994,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
1521
1994
|
cancel.className = 'ge-modal-btn ge-modal-btn--ghost';
|
|
1522
1995
|
cancel.dataset.ge = 'bonus-confirm-cancel';
|
|
1523
1996
|
cancel.textContent = shell.t('Cancel');
|
|
1524
|
-
cancel.addEventListener('click', () =>
|
|
1997
|
+
cancel.addEventListener('click', () => closeConfirm(overlay, st));
|
|
1525
1998
|
const buy = document.createElement('button');
|
|
1526
1999
|
buy.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
1527
2000
|
buy.dataset.ge = 'bonus-confirm-buy';
|
|
@@ -1536,8 +2009,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
1536
2009
|
shell.activateFeature(bonus);
|
|
1537
2010
|
else
|
|
1538
2011
|
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
1539
|
-
|
|
1540
|
-
overlay.remove();
|
|
2012
|
+
shell.closeModal();
|
|
1541
2013
|
});
|
|
1542
2014
|
actions.append(cancel, buy);
|
|
1543
2015
|
ui.card.appendChild(actions);
|
|
@@ -1566,36 +2038,79 @@ function isAffordable(shell, bonus) {
|
|
|
1566
2038
|
|
|
1567
2039
|
/** A centred picker (chips grid + accent Confirm) on the shared card modal. */
|
|
1568
2040
|
function buildSheet(opts) {
|
|
1569
|
-
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () =>
|
|
2041
|
+
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () => opts.onClose() });
|
|
1570
2042
|
const grid = document.createElement('div');
|
|
1571
2043
|
grid.className = 'ge-sheet-grid';
|
|
1572
2044
|
const cols = typeof opts.columns === 'number' ? { wide: opts.columns, mobile: opts.columns } : opts.columns;
|
|
1573
2045
|
grid.style.setProperty('--cols', String(cols.wide));
|
|
1574
2046
|
grid.style.setProperty('--cols-m', String(cols.mobile));
|
|
1575
2047
|
let selected = opts.selected;
|
|
2048
|
+
let focusIndex = opts.choices.findIndex((c) => c.id === selected);
|
|
2049
|
+
if (focusIndex < 0)
|
|
2050
|
+
focusIndex = 0;
|
|
1576
2051
|
const chips = [];
|
|
1577
|
-
|
|
2052
|
+
/** Update chip visuals to reflect the current selected/focused index. */
|
|
2053
|
+
function setHighlight(newIndex) {
|
|
2054
|
+
focusIndex = newIndex;
|
|
2055
|
+
selected = opts.choices[focusIndex].id;
|
|
2056
|
+
for (let i = 0; i < chips.length; i++) {
|
|
2057
|
+
chips[i].classList.toggle('ge-on', i === focusIndex);
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
for (let i = 0; i < opts.choices.length; i++) {
|
|
2061
|
+
const c = opts.choices[i];
|
|
1578
2062
|
const chip = document.createElement('button');
|
|
1579
|
-
chip.className = 'ge-chip' + (
|
|
2063
|
+
chip.className = 'ge-chip' + (i === focusIndex ? ' ge-on' : '');
|
|
1580
2064
|
chip.dataset.id = c.id;
|
|
1581
2065
|
chip.textContent = c.label;
|
|
2066
|
+
const idx = i; // capture for closure
|
|
1582
2067
|
chip.addEventListener('click', () => {
|
|
1583
|
-
|
|
1584
|
-
for (const x of chips)
|
|
1585
|
-
x.classList.toggle('ge-on', x.dataset.id === selected);
|
|
2068
|
+
setHighlight(idx);
|
|
1586
2069
|
});
|
|
1587
2070
|
chips.push(chip);
|
|
1588
2071
|
grid.appendChild(chip);
|
|
1589
2072
|
}
|
|
1590
2073
|
ui.body.appendChild(grid);
|
|
2074
|
+
function doConfirm() {
|
|
2075
|
+
opts.onConfirm(selected);
|
|
2076
|
+
opts.onClose();
|
|
2077
|
+
}
|
|
1591
2078
|
// Single full-bleed Confirm; dismissal is the ✕ (top-right). No Cancel button.
|
|
1592
2079
|
const confirm = document.createElement('button');
|
|
1593
2080
|
confirm.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
1594
2081
|
confirm.dataset.ge = 'sheet-confirm';
|
|
1595
2082
|
confirm.textContent = opts.confirmLabel;
|
|
1596
|
-
confirm.addEventListener('click',
|
|
2083
|
+
confirm.addEventListener('click', doConfirm);
|
|
1597
2084
|
ui.card.appendChild(confirm);
|
|
1598
|
-
|
|
2085
|
+
function onKey(e) {
|
|
2086
|
+
const last = opts.choices.length - 1;
|
|
2087
|
+
switch (e.code) {
|
|
2088
|
+
case 'ArrowRight':
|
|
2089
|
+
case 'ArrowDown':
|
|
2090
|
+
case 'Equal': // + on most keyboards
|
|
2091
|
+
case 'NumpadAdd':
|
|
2092
|
+
if (focusIndex < last)
|
|
2093
|
+
setHighlight(focusIndex + 1);
|
|
2094
|
+
return true;
|
|
2095
|
+
case 'ArrowLeft':
|
|
2096
|
+
case 'ArrowUp':
|
|
2097
|
+
case 'Minus':
|
|
2098
|
+
case 'NumpadSubtract':
|
|
2099
|
+
if (focusIndex > 0)
|
|
2100
|
+
setHighlight(focusIndex - 1);
|
|
2101
|
+
return true;
|
|
2102
|
+
case 'Enter':
|
|
2103
|
+
case 'Space':
|
|
2104
|
+
doConfirm();
|
|
2105
|
+
return true;
|
|
2106
|
+
case 'Escape':
|
|
2107
|
+
opts.onClose();
|
|
2108
|
+
return true;
|
|
2109
|
+
default:
|
|
2110
|
+
return false;
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
return { root: ui.root, onKey };
|
|
1599
2114
|
}
|
|
1600
2115
|
/** Bet picker — all available bets as chips (6 per row, 3 on mobile), accent Confirm applies it. */
|
|
1601
2116
|
function openBetModal(shell) {
|
|
@@ -1603,6 +2118,7 @@ function openBetModal(shell) {
|
|
|
1603
2118
|
ge: 'bet-modal', title: shell.t('Bet'), columns: { wide: 6, mobile: 3 }, confirmLabel: shell.t('Confirm'),
|
|
1604
2119
|
choices: shell.state.availableBets.map((b) => ({ id: String(b), label: formatCurrency(b, shell.config.currency) })),
|
|
1605
2120
|
selected: String(shell.state.bet),
|
|
2121
|
+
onClose: () => shell.closeModal(),
|
|
1606
2122
|
onConfirm: (id) => {
|
|
1607
2123
|
const v = Number(id);
|
|
1608
2124
|
if (v !== shell.state.bet) {
|
|
@@ -1633,6 +2149,7 @@ function openAutoplayModal(shell) {
|
|
|
1633
2149
|
ge: 'autoplay-modal', title: shell.t('Autoplay'), columns: 3, confirmLabel: shell.t('Start'),
|
|
1634
2150
|
choices: counts.map((n) => ({ id: String(n), label: Number.isFinite(n) ? String(n) : '∞' })),
|
|
1635
2151
|
selected: String(shell.state.autoplay.remaining || counts[0]),
|
|
2152
|
+
onClose: () => shell.closeModal(),
|
|
1636
2153
|
onConfirm: (id) => {
|
|
1637
2154
|
let remaining = Number(id); // "Infinity" → Infinity
|
|
1638
2155
|
if (maxCount != null)
|
|
@@ -1780,6 +2297,868 @@ function countUp(el, from, to, fmt, durationMs = 450) {
|
|
|
1780
2297
|
};
|
|
1781
2298
|
}
|
|
1782
2299
|
|
|
2300
|
+
// MACHINE-TRANSLATED — native QA required before production use.
|
|
2301
|
+
// Keys are the English source strings exactly as they appear at t('…') call sites.
|
|
2302
|
+
// Entries within each language block are sorted alphabetically by key for diff stability.
|
|
2303
|
+
// 'en' is omitted: the resolver returns the source string unchanged for English.
|
|
2304
|
+
const LOCALES = {
|
|
2305
|
+
da: {
|
|
2306
|
+
DISCLAIMER: 'Ansvarsfraskrivelse',
|
|
2307
|
+
Activate: 'Aktivér',
|
|
2308
|
+
Autoplay: 'Autoplay',
|
|
2309
|
+
Balance: 'Saldo',
|
|
2310
|
+
Bet: 'Indsats',
|
|
2311
|
+
'BUY BONUS': 'KØB BONUS',
|
|
2312
|
+
Buy: 'Køb',
|
|
2313
|
+
'Buy bonus': 'Køb bonus',
|
|
2314
|
+
Cancel: 'Annuller',
|
|
2315
|
+
Close: 'Luk',
|
|
2316
|
+
'Cluster pays': 'Klyngeudbetaling',
|
|
2317
|
+
Confirm: 'Bekræft',
|
|
2318
|
+
Controls: 'Kontroller',
|
|
2319
|
+
'Decrease your stake.': 'Reducer din indsats.',
|
|
2320
|
+
DISABLE: 'DEAKTIVER',
|
|
2321
|
+
'Dismiss the current overlay.': 'Luk det aktuelle overlay.',
|
|
2322
|
+
'Free spins': 'Gratisspins',
|
|
2323
|
+
Game: 'Spil',
|
|
2324
|
+
'Game info': 'Spilinfo',
|
|
2325
|
+
Hotkeys: 'Tastaturgenveje',
|
|
2326
|
+
'Increase your stake.': 'Forøg din indsats.',
|
|
2327
|
+
'Lower bet': 'Lavere indsats',
|
|
2328
|
+
'Master volume': 'Hovedvolumen',
|
|
2329
|
+
'Max win': 'Maks gevinst',
|
|
2330
|
+
Menu: 'Menu',
|
|
2331
|
+
'Menu & info': 'Menu og info',
|
|
2332
|
+
Modes: 'Tilstande',
|
|
2333
|
+
Music: 'Musik',
|
|
2334
|
+
Mute: 'Lydløs',
|
|
2335
|
+
'Mute or unmute the game.': 'Slå lyden til/fra.',
|
|
2336
|
+
Navigate: 'Naviger',
|
|
2337
|
+
'Open settings and game info.': 'Åbn indstillinger og spilinfo.',
|
|
2338
|
+
'Open the paytable and rules.': 'Åbn gevinsttabel og regler.',
|
|
2339
|
+
'Pay a fixed cost to enter a bonus feature.': 'Betal en fast pris for at aktivere en bonusfunktion.',
|
|
2340
|
+
Paylines: 'Gevinstlinjer',
|
|
2341
|
+
Paytable: 'Gevinsttabel',
|
|
2342
|
+
'Pays anywhere': 'Udbetaler overalt',
|
|
2343
|
+
Price: 'Pris',
|
|
2344
|
+
'Raise bet': 'Hæv indsats',
|
|
2345
|
+
Replay: 'Genspil',
|
|
2346
|
+
RTP: 'RTP',
|
|
2347
|
+
SFX: 'Lydeffekter',
|
|
2348
|
+
Settings: 'Indstillinger',
|
|
2349
|
+
Sound: 'Lyd',
|
|
2350
|
+
Spin: 'Drej',
|
|
2351
|
+
'Spin automatically a set number of times.': 'Spin automatisk et bestemt antal gange.',
|
|
2352
|
+
'Speed up spin animations.': 'Gør spilanimationer hurtigere.',
|
|
2353
|
+
Start: 'Start',
|
|
2354
|
+
'Start a spin at the current bet.': 'Start et spin med den aktuelle indsats.',
|
|
2355
|
+
'Start replay': 'Start genspil',
|
|
2356
|
+
'Total win': 'Samlet gevinst',
|
|
2357
|
+
Turbo: 'Turbo',
|
|
2358
|
+
'Ways to win': 'Vindermuligheder',
|
|
2359
|
+
Win: 'Gevinst',
|
|
2360
|
+
'Winning shapes': 'Vindende former',
|
|
2361
|
+
},
|
|
2362
|
+
de: {
|
|
2363
|
+
DISCLAIMER: 'Haftungsausschluss',
|
|
2364
|
+
Activate: 'Aktivieren',
|
|
2365
|
+
Autoplay: 'Autoplay',
|
|
2366
|
+
Balance: 'Kontostand',
|
|
2367
|
+
Bet: 'Einsatz',
|
|
2368
|
+
'BUY BONUS': 'BONUS KAUFEN',
|
|
2369
|
+
Buy: 'Kaufen',
|
|
2370
|
+
'Buy bonus': 'Bonus kaufen',
|
|
2371
|
+
Cancel: 'Abbrechen',
|
|
2372
|
+
Close: 'Schließen',
|
|
2373
|
+
'Cluster pays': 'Cluster-Gewinne',
|
|
2374
|
+
Confirm: 'Bestätigen',
|
|
2375
|
+
Controls: 'Steuerung',
|
|
2376
|
+
'Decrease your stake.': 'Einsatz verringern.',
|
|
2377
|
+
DISABLE: 'DEAKTIVIEREN',
|
|
2378
|
+
'Dismiss the current overlay.': 'Aktuelles Overlay schließen.',
|
|
2379
|
+
'Free spins': 'Freispiele',
|
|
2380
|
+
Game: 'Spiel',
|
|
2381
|
+
'Game info': 'Spielinfo',
|
|
2382
|
+
Hotkeys: 'Tastenkürzel',
|
|
2383
|
+
'Increase your stake.': 'Einsatz erhöhen.',
|
|
2384
|
+
'Lower bet': 'Einsatz senken',
|
|
2385
|
+
'Master volume': 'Gesamtlautstärke',
|
|
2386
|
+
'Max win': 'Max. Gewinn',
|
|
2387
|
+
Menu: 'Menü',
|
|
2388
|
+
'Menu & info': 'Menü & Info',
|
|
2389
|
+
Modes: 'Modi',
|
|
2390
|
+
Music: 'Musik',
|
|
2391
|
+
Mute: 'Stummschalten',
|
|
2392
|
+
'Mute or unmute the game.': 'Ton stummschalten oder aktivieren.',
|
|
2393
|
+
Navigate: 'Navigieren',
|
|
2394
|
+
'Open settings and game info.': 'Einstellungen und Spielinfo öffnen.',
|
|
2395
|
+
'Open the paytable and rules.': 'Gewinntabelle und Regeln öffnen.',
|
|
2396
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zahle einen festen Betrag, um ein Bonus-Feature zu aktivieren.',
|
|
2397
|
+
Paylines: 'Gewinnlinien',
|
|
2398
|
+
Paytable: 'Gewinntabelle',
|
|
2399
|
+
'Pays anywhere': 'Zahlt überall',
|
|
2400
|
+
Price: 'Preis',
|
|
2401
|
+
'Raise bet': 'Einsatz erhöhen',
|
|
2402
|
+
Replay: 'Wiederholen',
|
|
2403
|
+
RTP: 'RTP',
|
|
2404
|
+
SFX: 'Soundeffekte',
|
|
2405
|
+
Settings: 'Einstellungen',
|
|
2406
|
+
Sound: 'Ton',
|
|
2407
|
+
Spin: 'Drehen',
|
|
2408
|
+
'Spin automatically a set number of times.': 'Automatisch eine festgelegte Anzahl von Runden spielen.',
|
|
2409
|
+
'Speed up spin animations.': 'Animationen beschleunigen.',
|
|
2410
|
+
Start: 'Start',
|
|
2411
|
+
'Start a spin at the current bet.': 'Mit dem aktuellen Einsatz drehen.',
|
|
2412
|
+
'Start replay': 'Wiederholen',
|
|
2413
|
+
'Total win': 'Gesamtgewinn',
|
|
2414
|
+
Turbo: 'Turbo',
|
|
2415
|
+
'Ways to win': 'Gewinnwege',
|
|
2416
|
+
Win: 'Gewinn',
|
|
2417
|
+
'Winning shapes': 'Gewinnmuster',
|
|
2418
|
+
},
|
|
2419
|
+
es: {
|
|
2420
|
+
DISCLAIMER: 'Aviso legal',
|
|
2421
|
+
Activate: 'Activar',
|
|
2422
|
+
Autoplay: 'Giro automático',
|
|
2423
|
+
Balance: 'Saldo',
|
|
2424
|
+
Bet: 'Apuesta',
|
|
2425
|
+
'BUY BONUS': 'COMPRAR BONO',
|
|
2426
|
+
Buy: 'Comprar',
|
|
2427
|
+
'Buy bonus': 'Comprar bono',
|
|
2428
|
+
Cancel: 'Cancelar',
|
|
2429
|
+
Close: 'Cerrar',
|
|
2430
|
+
'Cluster pays': 'Pago en racimo',
|
|
2431
|
+
Confirm: 'Confirmar',
|
|
2432
|
+
Controls: 'Controles',
|
|
2433
|
+
'Decrease your stake.': 'Reducir apuesta.',
|
|
2434
|
+
DISABLE: 'DESACTIVAR',
|
|
2435
|
+
'Dismiss the current overlay.': 'Cerrar el panel actual.',
|
|
2436
|
+
'Free spins': 'Giros gratis',
|
|
2437
|
+
Game: 'Juego',
|
|
2438
|
+
'Game info': 'Info del juego',
|
|
2439
|
+
Hotkeys: 'Atajos de teclado',
|
|
2440
|
+
'Increase your stake.': 'Aumentar apuesta.',
|
|
2441
|
+
'Lower bet': 'Bajar apuesta',
|
|
2442
|
+
'Master volume': 'Volumen principal',
|
|
2443
|
+
'Max win': 'Ganancia máxima',
|
|
2444
|
+
Menu: 'Menú',
|
|
2445
|
+
'Menu & info': 'Menú e info',
|
|
2446
|
+
Modes: 'Modos',
|
|
2447
|
+
Music: 'Música',
|
|
2448
|
+
Mute: 'Silenciar',
|
|
2449
|
+
'Mute or unmute the game.': 'Activar o silenciar el sonido.',
|
|
2450
|
+
Navigate: 'Navegar',
|
|
2451
|
+
'Open settings and game info.': 'Abrir ajustes e info del juego.',
|
|
2452
|
+
'Open the paytable and rules.': 'Abrir tabla de pagos y reglas.',
|
|
2453
|
+
'Pay a fixed cost to enter a bonus feature.': 'Paga un coste fijo para acceder a una función de bono.',
|
|
2454
|
+
Paylines: 'Líneas de pago',
|
|
2455
|
+
Paytable: 'Tabla de pagos',
|
|
2456
|
+
'Pays anywhere': 'Paga en cualquier lugar',
|
|
2457
|
+
Price: 'Precio',
|
|
2458
|
+
'Raise bet': 'Subir apuesta',
|
|
2459
|
+
Replay: 'Repetir',
|
|
2460
|
+
RTP: 'RTP',
|
|
2461
|
+
SFX: 'Efectos de sonido',
|
|
2462
|
+
Settings: 'Ajustes',
|
|
2463
|
+
Sound: 'Sonido',
|
|
2464
|
+
Spin: 'Girar',
|
|
2465
|
+
'Spin automatically a set number of times.': 'Girar automáticamente un número determinado de veces.',
|
|
2466
|
+
'Speed up spin animations.': 'Acelerar las animaciones de giro.',
|
|
2467
|
+
Start: 'Iniciar',
|
|
2468
|
+
'Start a spin at the current bet.': 'Iniciar un giro con la apuesta actual.',
|
|
2469
|
+
'Start replay': 'Iniciar repetición',
|
|
2470
|
+
'Total win': 'Ganancia total',
|
|
2471
|
+
Turbo: 'Turbo',
|
|
2472
|
+
'Ways to win': 'Formas de ganar',
|
|
2473
|
+
Win: 'Premio',
|
|
2474
|
+
'Winning shapes': 'Figuras ganadoras',
|
|
2475
|
+
},
|
|
2476
|
+
fi: {
|
|
2477
|
+
DISCLAIMER: 'Vastuuvapauslauseke',
|
|
2478
|
+
Activate: 'Aktivoi',
|
|
2479
|
+
Autoplay: 'Automaattipeli',
|
|
2480
|
+
Balance: 'Saldo',
|
|
2481
|
+
Bet: 'Panos',
|
|
2482
|
+
'BUY BONUS': 'OSTA BONUS',
|
|
2483
|
+
Buy: 'Osta',
|
|
2484
|
+
'Buy bonus': 'Osta bonus',
|
|
2485
|
+
Cancel: 'Peruuta',
|
|
2486
|
+
Close: 'Sulje',
|
|
2487
|
+
'Cluster pays': 'Ryhmävoitto',
|
|
2488
|
+
Confirm: 'Vahvista',
|
|
2489
|
+
Controls: 'Ohjaimet',
|
|
2490
|
+
'Decrease your stake.': 'Pienennä panostasi.',
|
|
2491
|
+
DISABLE: 'POISTA KÄYTÖSTÄ',
|
|
2492
|
+
'Dismiss the current overlay.': 'Sulje nykyinen näkymä.',
|
|
2493
|
+
'Free spins': 'Ilmaiskierrokset',
|
|
2494
|
+
Game: 'Peli',
|
|
2495
|
+
'Game info': 'Pelitiedot',
|
|
2496
|
+
Hotkeys: 'Pikanäppäimet',
|
|
2497
|
+
'Increase your stake.': 'Kasvata panostasi.',
|
|
2498
|
+
'Lower bet': 'Pienennä panosta',
|
|
2499
|
+
'Master volume': 'Pääänenvoimakkuus',
|
|
2500
|
+
'Max win': 'Maksimivoitto',
|
|
2501
|
+
Menu: 'Valikko',
|
|
2502
|
+
'Menu & info': 'Valikko ja tiedot',
|
|
2503
|
+
Modes: 'Tilat',
|
|
2504
|
+
Music: 'Musiikki',
|
|
2505
|
+
Mute: 'Mykistä',
|
|
2506
|
+
'Mute or unmute the game.': 'Mykistä tai poista mykistys.',
|
|
2507
|
+
Navigate: 'Navigoi',
|
|
2508
|
+
'Open settings and game info.': 'Avaa asetukset ja pelitiedot.',
|
|
2509
|
+
'Open the paytable and rules.': 'Avaa voittotaulukko ja säännöt.',
|
|
2510
|
+
'Pay a fixed cost to enter a bonus feature.': 'Maksa kiinteä summa päästäksesi bonusominaisuuteen.',
|
|
2511
|
+
Paylines: 'Voittolinjat',
|
|
2512
|
+
Paytable: 'Voittotaulukko',
|
|
2513
|
+
'Pays anywhere': 'Voittaa missä tahansa',
|
|
2514
|
+
Price: 'Hinta',
|
|
2515
|
+
'Raise bet': 'Nosta panosta',
|
|
2516
|
+
Replay: 'Toista uudelleen',
|
|
2517
|
+
RTP: 'RTP',
|
|
2518
|
+
SFX: 'Ääniefektit',
|
|
2519
|
+
Settings: 'Asetukset',
|
|
2520
|
+
Sound: 'Ääni',
|
|
2521
|
+
Spin: 'Pyöräytä',
|
|
2522
|
+
'Spin automatically a set number of times.': 'Pyöräytä automaattisesti määritetty määrä kertoja.',
|
|
2523
|
+
'Speed up spin animations.': 'Nopeuta pyöräytysanimaatioita.',
|
|
2524
|
+
Start: 'Aloita',
|
|
2525
|
+
'Start a spin at the current bet.': 'Aloita pyöräytys nykyisellä panoksella.',
|
|
2526
|
+
'Start replay': 'Aloita uudelleentoisto',
|
|
2527
|
+
'Total win': 'Kokonaisvoitto',
|
|
2528
|
+
Turbo: 'Turbo',
|
|
2529
|
+
'Ways to win': 'Voittotavat',
|
|
2530
|
+
Win: 'Voitto',
|
|
2531
|
+
'Winning shapes': 'Voittokuviot',
|
|
2532
|
+
},
|
|
2533
|
+
fr: {
|
|
2534
|
+
DISCLAIMER: 'Avertissement',
|
|
2535
|
+
Activate: 'Activer',
|
|
2536
|
+
Autoplay: 'Jeu automatique',
|
|
2537
|
+
Balance: 'Solde',
|
|
2538
|
+
Bet: 'Mise',
|
|
2539
|
+
'BUY BONUS': 'ACHETER BONUS',
|
|
2540
|
+
Buy: 'Acheter',
|
|
2541
|
+
'Buy bonus': 'Acheter un bonus',
|
|
2542
|
+
Cancel: 'Annuler',
|
|
2543
|
+
Close: 'Fermer',
|
|
2544
|
+
'Cluster pays': 'Gains en grappe',
|
|
2545
|
+
Confirm: 'Confirmer',
|
|
2546
|
+
Controls: 'Commandes',
|
|
2547
|
+
'Decrease your stake.': 'Diminuer votre mise.',
|
|
2548
|
+
DISABLE: 'DÉSACTIVER',
|
|
2549
|
+
'Dismiss the current overlay.': 'Fermer le panneau actuel.',
|
|
2550
|
+
'Free spins': 'Tours gratuits',
|
|
2551
|
+
Game: 'Jeu',
|
|
2552
|
+
'Game info': 'Infos du jeu',
|
|
2553
|
+
Hotkeys: 'Raccourcis clavier',
|
|
2554
|
+
'Increase your stake.': 'Augmenter votre mise.',
|
|
2555
|
+
'Lower bet': 'Baisser la mise',
|
|
2556
|
+
'Master volume': 'Volume principal',
|
|
2557
|
+
'Max win': 'Gain maximum',
|
|
2558
|
+
Menu: 'Menu',
|
|
2559
|
+
'Menu & info': 'Menu et info',
|
|
2560
|
+
Modes: 'Modes',
|
|
2561
|
+
Music: 'Musique',
|
|
2562
|
+
Mute: 'Couper le son',
|
|
2563
|
+
'Mute or unmute the game.': 'Couper ou rétablir le son.',
|
|
2564
|
+
Navigate: 'Naviguer',
|
|
2565
|
+
'Open settings and game info.': 'Ouvrir les paramètres et infos du jeu.',
|
|
2566
|
+
'Open the paytable and rules.': 'Ouvrir la table des gains et les règles.',
|
|
2567
|
+
'Pay a fixed cost to enter a bonus feature.': 'Payez un coût fixe pour accéder à une fonctionnalité bonus.',
|
|
2568
|
+
Paylines: 'Lignes de paiement',
|
|
2569
|
+
Paytable: 'Table des gains',
|
|
2570
|
+
'Pays anywhere': 'Gains sur toute la grille',
|
|
2571
|
+
Price: 'Prix',
|
|
2572
|
+
'Raise bet': 'Augmenter la mise',
|
|
2573
|
+
Replay: 'Revoir',
|
|
2574
|
+
RTP: 'RTP',
|
|
2575
|
+
SFX: 'Effets sonores',
|
|
2576
|
+
Settings: 'Paramètres',
|
|
2577
|
+
Sound: 'Son',
|
|
2578
|
+
Spin: 'Tourner',
|
|
2579
|
+
'Spin automatically a set number of times.': 'Tourner automatiquement un nombre de fois défini.',
|
|
2580
|
+
'Speed up spin animations.': 'Accélérer les animations de spin.',
|
|
2581
|
+
Start: 'Lancer',
|
|
2582
|
+
'Start a spin at the current bet.': 'Lancer un tour avec la mise actuelle.',
|
|
2583
|
+
'Start replay': 'Lancer le replay',
|
|
2584
|
+
'Total win': 'Gain total',
|
|
2585
|
+
Turbo: 'Turbo',
|
|
2586
|
+
'Ways to win': 'Façons de gagner',
|
|
2587
|
+
Win: 'Gain',
|
|
2588
|
+
'Winning shapes': 'Figures gagnantes',
|
|
2589
|
+
},
|
|
2590
|
+
hi: {
|
|
2591
|
+
DISCLAIMER: 'अस्वीकरण',
|
|
2592
|
+
Activate: 'सक्रिय करें',
|
|
2593
|
+
Autoplay: 'ऑटोप्ले',
|
|
2594
|
+
Balance: 'बैलेंस',
|
|
2595
|
+
Bet: 'दांव',
|
|
2596
|
+
'BUY BONUS': 'बोनस खरीदें',
|
|
2597
|
+
Buy: 'खरीदें',
|
|
2598
|
+
'Buy bonus': 'बोनस खरीदें',
|
|
2599
|
+
Cancel: 'रद्द करें',
|
|
2600
|
+
Close: 'बंद करें',
|
|
2601
|
+
'Cluster pays': 'क्लस्टर भुगतान',
|
|
2602
|
+
Confirm: 'पुष्टि करें',
|
|
2603
|
+
Controls: 'नियंत्रण',
|
|
2604
|
+
'Decrease your stake.': 'अपना दांव कम करें।',
|
|
2605
|
+
DISABLE: 'बंद करें',
|
|
2606
|
+
'Dismiss the current overlay.': 'वर्तमान ओवरले बंद करें।',
|
|
2607
|
+
'Free spins': 'फ्री स्पिन',
|
|
2608
|
+
Game: 'खेल',
|
|
2609
|
+
'Game info': 'गेम जानकारी',
|
|
2610
|
+
Hotkeys: 'कीबोर्ड शॉर्टकट',
|
|
2611
|
+
'Increase your stake.': 'अपना दांव बढ़ाएं।',
|
|
2612
|
+
'Lower bet': 'दांव घटाएं',
|
|
2613
|
+
'Master volume': 'मुख्य वॉल्यूम',
|
|
2614
|
+
'Max win': 'अधिकतम जीत',
|
|
2615
|
+
Menu: 'मेनू',
|
|
2616
|
+
'Menu & info': 'मेनू और जानकारी',
|
|
2617
|
+
Modes: 'मोड',
|
|
2618
|
+
Music: 'संगीत',
|
|
2619
|
+
Mute: 'म्यूट करें',
|
|
2620
|
+
'Mute or unmute the game.': 'गेम को म्यूट या अनम्यूट करें।',
|
|
2621
|
+
Navigate: 'नेविगेट करें',
|
|
2622
|
+
'Open settings and game info.': 'सेटिंग और गेम जानकारी खोलें।',
|
|
2623
|
+
'Open the paytable and rules.': 'पेटेबल और नियम खोलें।',
|
|
2624
|
+
'Pay a fixed cost to enter a bonus feature.': 'बोनस फीचर में प्रवेश के लिए एक निश्चित राशि दें।',
|
|
2625
|
+
Paylines: 'पेलाइन',
|
|
2626
|
+
Paytable: 'पेटेबल',
|
|
2627
|
+
'Pays anywhere': 'कहीं भी जीत',
|
|
2628
|
+
Price: 'मूल्य',
|
|
2629
|
+
'Raise bet': 'दांव बढ़ाएं',
|
|
2630
|
+
Replay: 'दोबारा खेलें',
|
|
2631
|
+
RTP: 'RTP',
|
|
2632
|
+
SFX: 'ध्वनि प्रभाव',
|
|
2633
|
+
Settings: 'सेटिंग',
|
|
2634
|
+
Sound: 'ध्वनि',
|
|
2635
|
+
Spin: 'स्पिन',
|
|
2636
|
+
'Spin automatically a set number of times.': 'एक निश्चित संख्या में स्वचालित रूप से स्पिन करें।',
|
|
2637
|
+
'Speed up spin animations.': 'स्पिन एनिमेशन को तेज़ करें।',
|
|
2638
|
+
Start: 'शुरू करें',
|
|
2639
|
+
'Start a spin at the current bet.': 'वर्तमान दांव पर स्पिन शुरू करें।',
|
|
2640
|
+
'Start replay': 'रीप्ले शुरू करें',
|
|
2641
|
+
'Total win': 'कुल जीत',
|
|
2642
|
+
Turbo: 'टर्बो',
|
|
2643
|
+
'Ways to win': 'जीत के तरीके',
|
|
2644
|
+
Win: 'जीत',
|
|
2645
|
+
'Winning shapes': 'जीत के आकार',
|
|
2646
|
+
},
|
|
2647
|
+
id: {
|
|
2648
|
+
DISCLAIMER: 'Penafian',
|
|
2649
|
+
Activate: 'Aktifkan',
|
|
2650
|
+
Autoplay: 'Putar Otomatis',
|
|
2651
|
+
Balance: 'Saldo',
|
|
2652
|
+
Bet: 'Taruhan',
|
|
2653
|
+
'BUY BONUS': 'BELI BONUS',
|
|
2654
|
+
Buy: 'Beli',
|
|
2655
|
+
'Buy bonus': 'Beli bonus',
|
|
2656
|
+
Cancel: 'Batal',
|
|
2657
|
+
Close: 'Tutup',
|
|
2658
|
+
'Cluster pays': 'Bayar kluster',
|
|
2659
|
+
Confirm: 'Konfirmasi',
|
|
2660
|
+
Controls: 'Kontrol',
|
|
2661
|
+
'Decrease your stake.': 'Kurangi taruhan Anda.',
|
|
2662
|
+
DISABLE: 'NONAKTIFKAN',
|
|
2663
|
+
'Dismiss the current overlay.': 'Tutup overlay saat ini.',
|
|
2664
|
+
'Free spins': 'Putaran gratis',
|
|
2665
|
+
Game: 'Permainan',
|
|
2666
|
+
'Game info': 'Info permainan',
|
|
2667
|
+
Hotkeys: 'Pintasan keyboard',
|
|
2668
|
+
'Increase your stake.': 'Tingkatkan taruhan Anda.',
|
|
2669
|
+
'Lower bet': 'Turunkan taruhan',
|
|
2670
|
+
'Master volume': 'Volume utama',
|
|
2671
|
+
'Max win': 'Kemenangan maks',
|
|
2672
|
+
Menu: 'Menu',
|
|
2673
|
+
'Menu & info': 'Menu & info',
|
|
2674
|
+
Modes: 'Mode',
|
|
2675
|
+
Music: 'Musik',
|
|
2676
|
+
Mute: 'Bisukan',
|
|
2677
|
+
'Mute or unmute the game.': 'Bisukan atau aktifkan suara permainan.',
|
|
2678
|
+
Navigate: 'Navigasi',
|
|
2679
|
+
'Open settings and game info.': 'Buka pengaturan dan info permainan.',
|
|
2680
|
+
'Open the paytable and rules.': 'Buka tabel pembayaran dan aturan.',
|
|
2681
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bayar biaya tetap untuk masuk ke fitur bonus.',
|
|
2682
|
+
Paylines: 'Garis pembayaran',
|
|
2683
|
+
Paytable: 'Tabel pembayaran',
|
|
2684
|
+
'Pays anywhere': 'Menang di mana saja',
|
|
2685
|
+
Price: 'Harga',
|
|
2686
|
+
'Raise bet': 'Naikkan taruhan',
|
|
2687
|
+
Replay: 'Putar ulang',
|
|
2688
|
+
RTP: 'RTP',
|
|
2689
|
+
SFX: 'Efek suara',
|
|
2690
|
+
Settings: 'Pengaturan',
|
|
2691
|
+
Sound: 'Suara',
|
|
2692
|
+
Spin: 'Putar',
|
|
2693
|
+
'Spin automatically a set number of times.': 'Putar otomatis sejumlah kali yang ditentukan.',
|
|
2694
|
+
'Speed up spin animations.': 'Percepat animasi putaran.',
|
|
2695
|
+
Start: 'Mulai',
|
|
2696
|
+
'Start a spin at the current bet.': 'Mulai putaran dengan taruhan saat ini.',
|
|
2697
|
+
'Start replay': 'Mulai putar ulang',
|
|
2698
|
+
'Total win': 'Total kemenangan',
|
|
2699
|
+
Turbo: 'Turbo',
|
|
2700
|
+
'Ways to win': 'Cara menang',
|
|
2701
|
+
Win: 'Menang',
|
|
2702
|
+
'Winning shapes': 'Bentuk kemenangan',
|
|
2703
|
+
},
|
|
2704
|
+
ja: {
|
|
2705
|
+
DISCLAIMER: '免責事項',
|
|
2706
|
+
Activate: '有効化',
|
|
2707
|
+
Autoplay: 'オートプレイ',
|
|
2708
|
+
Balance: '残高',
|
|
2709
|
+
Bet: 'ベット',
|
|
2710
|
+
'BUY BONUS': 'ボーナス購入',
|
|
2711
|
+
Buy: '購入',
|
|
2712
|
+
'Buy bonus': 'ボーナス購入',
|
|
2713
|
+
Cancel: 'キャンセル',
|
|
2714
|
+
Close: '閉じる',
|
|
2715
|
+
'Cluster pays': 'クラスター配当',
|
|
2716
|
+
Confirm: '確認',
|
|
2717
|
+
Controls: '操作方法',
|
|
2718
|
+
'Decrease your stake.': 'ベットを減らす。',
|
|
2719
|
+
DISABLE: '無効',
|
|
2720
|
+
'Dismiss the current overlay.': '現在のオーバーレイを閉じる。',
|
|
2721
|
+
'Free spins': 'フリースピン',
|
|
2722
|
+
Game: 'ゲーム',
|
|
2723
|
+
'Game info': 'ゲーム情報',
|
|
2724
|
+
Hotkeys: 'キーボードショートカット',
|
|
2725
|
+
'Increase your stake.': 'ベットを増やす。',
|
|
2726
|
+
'Lower bet': 'ベットを下げる',
|
|
2727
|
+
'Master volume': 'マスターボリューム',
|
|
2728
|
+
'Max win': '最大当選',
|
|
2729
|
+
Menu: 'メニュー',
|
|
2730
|
+
'Menu & info': 'メニューと情報',
|
|
2731
|
+
Modes: 'モード',
|
|
2732
|
+
Music: 'ミュージック',
|
|
2733
|
+
Mute: 'ミュート',
|
|
2734
|
+
'Mute or unmute the game.': 'ゲームをミュート/ミュート解除する。',
|
|
2735
|
+
Navigate: 'ナビゲート',
|
|
2736
|
+
'Open settings and game info.': '設定とゲーム情報を開く。',
|
|
2737
|
+
'Open the paytable and rules.': '配当表とルールを開く。',
|
|
2738
|
+
'Pay a fixed cost to enter a bonus feature.': 'ボーナス機能に入るために固定料金を支払う。',
|
|
2739
|
+
Paylines: 'ペイライン',
|
|
2740
|
+
Paytable: '配当表',
|
|
2741
|
+
'Pays anywhere': 'どこでも当選',
|
|
2742
|
+
Price: '価格',
|
|
2743
|
+
'Raise bet': 'ベットを上げる',
|
|
2744
|
+
Replay: 'リプレイ',
|
|
2745
|
+
RTP: 'RTP',
|
|
2746
|
+
SFX: '効果音',
|
|
2747
|
+
Settings: '設定',
|
|
2748
|
+
Sound: 'サウンド',
|
|
2749
|
+
Spin: 'スピン',
|
|
2750
|
+
'Spin automatically a set number of times.': '設定した回数だけ自動でスピンする。',
|
|
2751
|
+
'Speed up spin animations.': 'スピンアニメーションを高速化する。',
|
|
2752
|
+
Start: 'スタート',
|
|
2753
|
+
'Start a spin at the current bet.': '現在のベットでスピンを開始する。',
|
|
2754
|
+
'Start replay': 'リプレイ開始',
|
|
2755
|
+
'Total win': '合計当選',
|
|
2756
|
+
Turbo: 'ターボ',
|
|
2757
|
+
'Ways to win': '当選方法',
|
|
2758
|
+
Win: '当選',
|
|
2759
|
+
'Winning shapes': '当選形状',
|
|
2760
|
+
},
|
|
2761
|
+
ko: {
|
|
2762
|
+
DISCLAIMER: '면책 조항',
|
|
2763
|
+
Activate: '활성화',
|
|
2764
|
+
Autoplay: '자동 플레이',
|
|
2765
|
+
Balance: '잔액',
|
|
2766
|
+
Bet: '베팅',
|
|
2767
|
+
'BUY BONUS': '보너스 구매',
|
|
2768
|
+
Buy: '구매',
|
|
2769
|
+
'Buy bonus': '보너스 구매',
|
|
2770
|
+
Cancel: '취소',
|
|
2771
|
+
Close: '닫기',
|
|
2772
|
+
'Cluster pays': '클러스터 페이',
|
|
2773
|
+
Confirm: '확인',
|
|
2774
|
+
Controls: '조작법',
|
|
2775
|
+
'Decrease your stake.': '베팅을 줄이세요.',
|
|
2776
|
+
DISABLE: '비활성화',
|
|
2777
|
+
'Dismiss the current overlay.': '현재 오버레이를 닫습니다.',
|
|
2778
|
+
'Free spins': '무료 스핀',
|
|
2779
|
+
Game: '게임',
|
|
2780
|
+
'Game info': '게임 정보',
|
|
2781
|
+
Hotkeys: '키보드 단축키',
|
|
2782
|
+
'Increase your stake.': '베팅을 늘리세요.',
|
|
2783
|
+
'Lower bet': '베팅 낮추기',
|
|
2784
|
+
'Master volume': '마스터 볼륨',
|
|
2785
|
+
'Max win': '최대 당첨',
|
|
2786
|
+
Menu: '메뉴',
|
|
2787
|
+
'Menu & info': '메뉴 & 정보',
|
|
2788
|
+
Modes: '모드',
|
|
2789
|
+
Music: '음악',
|
|
2790
|
+
Mute: '음소거',
|
|
2791
|
+
'Mute or unmute the game.': '게임 소리를 켜거나 끕니다.',
|
|
2792
|
+
Navigate: '이동',
|
|
2793
|
+
'Open settings and game info.': '설정 및 게임 정보를 엽니다.',
|
|
2794
|
+
'Open the paytable and rules.': '페이테이블 및 규칙을 엽니다.',
|
|
2795
|
+
'Pay a fixed cost to enter a bonus feature.': '고정 비용을 지불하고 보너스 기능에 진입하세요.',
|
|
2796
|
+
Paylines: '페이라인',
|
|
2797
|
+
Paytable: '페이테이블',
|
|
2798
|
+
'Pays anywhere': '어디서나 당첨',
|
|
2799
|
+
Price: '가격',
|
|
2800
|
+
'Raise bet': '베팅 올리기',
|
|
2801
|
+
Replay: '다시보기',
|
|
2802
|
+
RTP: 'RTP',
|
|
2803
|
+
SFX: '효과음',
|
|
2804
|
+
Settings: '설정',
|
|
2805
|
+
Sound: '사운드',
|
|
2806
|
+
Spin: '스핀',
|
|
2807
|
+
'Spin automatically a set number of times.': '정해진 횟수만큼 자동으로 스핀합니다.',
|
|
2808
|
+
'Speed up spin animations.': '스핀 애니메이션을 빠르게 합니다.',
|
|
2809
|
+
Start: '시작',
|
|
2810
|
+
'Start a spin at the current bet.': '현재 베팅으로 스핀을 시작합니다.',
|
|
2811
|
+
'Start replay': '다시보기 시작',
|
|
2812
|
+
'Total win': '총 당첨',
|
|
2813
|
+
Turbo: '터보',
|
|
2814
|
+
'Ways to win': '당첨 방법',
|
|
2815
|
+
Win: '당첨',
|
|
2816
|
+
'Winning shapes': '당첨 패턴',
|
|
2817
|
+
},
|
|
2818
|
+
pl: {
|
|
2819
|
+
DISCLAIMER: 'Zastrzeżenie',
|
|
2820
|
+
Activate: 'Aktywuj',
|
|
2821
|
+
Autoplay: 'Autoplay',
|
|
2822
|
+
Balance: 'Saldo',
|
|
2823
|
+
Bet: 'Zakład',
|
|
2824
|
+
'BUY BONUS': 'KUP BONUS',
|
|
2825
|
+
Buy: 'Kup',
|
|
2826
|
+
'Buy bonus': 'Kup bonus',
|
|
2827
|
+
Cancel: 'Anuluj',
|
|
2828
|
+
Close: 'Zamknij',
|
|
2829
|
+
'Cluster pays': 'Wypłaty klastrowe',
|
|
2830
|
+
Confirm: 'Potwierdź',
|
|
2831
|
+
Controls: 'Sterowanie',
|
|
2832
|
+
'Decrease your stake.': 'Zmniejsz swój zakład.',
|
|
2833
|
+
DISABLE: 'WYŁĄCZ',
|
|
2834
|
+
'Dismiss the current overlay.': 'Zamknij bieżące okno.',
|
|
2835
|
+
'Free spins': 'Darmowe spiny',
|
|
2836
|
+
Game: 'Gra',
|
|
2837
|
+
'Game info': 'Informacje o grze',
|
|
2838
|
+
Hotkeys: 'Skróty klawiaturowe',
|
|
2839
|
+
'Increase your stake.': 'Zwiększ swój zakład.',
|
|
2840
|
+
'Lower bet': 'Obniż zakład',
|
|
2841
|
+
'Master volume': 'Głośność główna',
|
|
2842
|
+
'Max win': 'Maks. wygrana',
|
|
2843
|
+
Menu: 'Menu',
|
|
2844
|
+
'Menu & info': 'Menu i informacje',
|
|
2845
|
+
Modes: 'Tryby',
|
|
2846
|
+
Music: 'Muzyka',
|
|
2847
|
+
Mute: 'Wycisz',
|
|
2848
|
+
'Mute or unmute the game.': 'Wycisz lub odcisz dźwięk gry.',
|
|
2849
|
+
Navigate: 'Nawiguj',
|
|
2850
|
+
'Open settings and game info.': 'Otwórz ustawienia i informacje o grze.',
|
|
2851
|
+
'Open the paytable and rules.': 'Otwórz tabelę wygranych i zasady.',
|
|
2852
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zapłać stałą kwotę, aby wejść do funkcji bonusowej.',
|
|
2853
|
+
Paylines: 'Linie wygrywające',
|
|
2854
|
+
Paytable: 'Tabela wygranych',
|
|
2855
|
+
'Pays anywhere': 'Wypłaca wszędzie',
|
|
2856
|
+
Price: 'Cena',
|
|
2857
|
+
'Raise bet': 'Podnieś zakład',
|
|
2858
|
+
Replay: 'Odtwórz ponownie',
|
|
2859
|
+
RTP: 'RTP',
|
|
2860
|
+
SFX: 'Efekty dźwiękowe',
|
|
2861
|
+
Settings: 'Ustawienia',
|
|
2862
|
+
Sound: 'Dźwięk',
|
|
2863
|
+
Spin: 'Zakręć',
|
|
2864
|
+
'Spin automatically a set number of times.': 'Obracaj automatycznie określoną liczbę razy.',
|
|
2865
|
+
'Speed up spin animations.': 'Przyspiesz animacje obrotów.',
|
|
2866
|
+
Start: 'Start',
|
|
2867
|
+
'Start a spin at the current bet.': 'Rozpocznij obrót przy bieżącym zakładzie.',
|
|
2868
|
+
'Start replay': 'Rozpocznij odtwarzanie',
|
|
2869
|
+
'Total win': 'Łączna wygrana',
|
|
2870
|
+
Turbo: 'Turbo',
|
|
2871
|
+
'Ways to win': 'Sposoby wygrywania',
|
|
2872
|
+
Win: 'Wygrana',
|
|
2873
|
+
'Winning shapes': 'Wzory wygrywające',
|
|
2874
|
+
},
|
|
2875
|
+
pt: {
|
|
2876
|
+
DISCLAIMER: 'Aviso legal',
|
|
2877
|
+
Activate: 'Ativar',
|
|
2878
|
+
Autoplay: 'Giro automático',
|
|
2879
|
+
Balance: 'Saldo',
|
|
2880
|
+
Bet: 'Aposta',
|
|
2881
|
+
'BUY BONUS': 'COMPRAR BÔNUS',
|
|
2882
|
+
Buy: 'Comprar',
|
|
2883
|
+
'Buy bonus': 'Comprar bônus',
|
|
2884
|
+
Cancel: 'Cancelar',
|
|
2885
|
+
Close: 'Fechar',
|
|
2886
|
+
'Cluster pays': 'Pagamento em cluster',
|
|
2887
|
+
Confirm: 'Confirmar',
|
|
2888
|
+
Controls: 'Controles',
|
|
2889
|
+
'Decrease your stake.': 'Diminuir aposta.',
|
|
2890
|
+
DISABLE: 'DESATIVAR',
|
|
2891
|
+
'Dismiss the current overlay.': 'Fechar o painel atual.',
|
|
2892
|
+
'Free spins': 'Giros grátis',
|
|
2893
|
+
Game: 'Jogo',
|
|
2894
|
+
'Game info': 'Info do jogo',
|
|
2895
|
+
Hotkeys: 'Atalhos de teclado',
|
|
2896
|
+
'Increase your stake.': 'Aumentar aposta.',
|
|
2897
|
+
'Lower bet': 'Baixar aposta',
|
|
2898
|
+
'Master volume': 'Volume principal',
|
|
2899
|
+
'Max win': 'Ganho máximo',
|
|
2900
|
+
Menu: 'Menu',
|
|
2901
|
+
'Menu & info': 'Menu e info',
|
|
2902
|
+
Modes: 'Modos',
|
|
2903
|
+
Music: 'Música',
|
|
2904
|
+
Mute: 'Silenciar',
|
|
2905
|
+
'Mute or unmute the game.': 'Ativar ou silenciar o som do jogo.',
|
|
2906
|
+
Navigate: 'Navegar',
|
|
2907
|
+
'Open settings and game info.': 'Abrir configurações e info do jogo.',
|
|
2908
|
+
'Open the paytable and rules.': 'Abrir tabela de pagamentos e regras.',
|
|
2909
|
+
'Pay a fixed cost to enter a bonus feature.': 'Pague um custo fixo para entrar numa funcionalidade de bônus.',
|
|
2910
|
+
Paylines: 'Linhas de pagamento',
|
|
2911
|
+
Paytable: 'Tabela de pagamentos',
|
|
2912
|
+
'Pays anywhere': 'Paga em qualquer posição',
|
|
2913
|
+
Price: 'Preço',
|
|
2914
|
+
'Raise bet': 'Aumentar aposta',
|
|
2915
|
+
Replay: 'Repetir',
|
|
2916
|
+
RTP: 'RTP',
|
|
2917
|
+
SFX: 'Efeitos sonoros',
|
|
2918
|
+
Settings: 'Configurações',
|
|
2919
|
+
Sound: 'Som',
|
|
2920
|
+
Spin: 'Girar',
|
|
2921
|
+
'Spin automatically a set number of times.': 'Girar automaticamente um número definido de vezes.',
|
|
2922
|
+
'Speed up spin animations.': 'Acelerar as animações de giro.',
|
|
2923
|
+
Start: 'Iniciar',
|
|
2924
|
+
'Start a spin at the current bet.': 'Iniciar um giro com a aposta atual.',
|
|
2925
|
+
'Start replay': 'Iniciar repetição',
|
|
2926
|
+
'Total win': 'Ganho total',
|
|
2927
|
+
Turbo: 'Turbo',
|
|
2928
|
+
'Ways to win': 'Formas de ganhar',
|
|
2929
|
+
Win: 'Ganho',
|
|
2930
|
+
'Winning shapes': 'Figuras vencedoras',
|
|
2931
|
+
},
|
|
2932
|
+
ru: {
|
|
2933
|
+
DISCLAIMER: 'Отказ от ответственности',
|
|
2934
|
+
Activate: 'Активировать',
|
|
2935
|
+
Autoplay: 'Автоигра',
|
|
2936
|
+
Balance: 'Баланс',
|
|
2937
|
+
Bet: 'Ставка',
|
|
2938
|
+
'BUY BONUS': 'КУПИТЬ БОНУС',
|
|
2939
|
+
Buy: 'Купить',
|
|
2940
|
+
'Buy bonus': 'Купить бонус',
|
|
2941
|
+
Cancel: 'Отмена',
|
|
2942
|
+
Close: 'Закрыть',
|
|
2943
|
+
'Cluster pays': 'Кластерные выплаты',
|
|
2944
|
+
Confirm: 'Подтвердить',
|
|
2945
|
+
Controls: 'Управление',
|
|
2946
|
+
'Decrease your stake.': 'Уменьшить ставку.',
|
|
2947
|
+
DISABLE: 'ОТКЛЮЧИТЬ',
|
|
2948
|
+
'Dismiss the current overlay.': 'Закрыть текущее окно.',
|
|
2949
|
+
'Free spins': 'Бесплатные вращения',
|
|
2950
|
+
Game: 'Игра',
|
|
2951
|
+
'Game info': 'Информация об игре',
|
|
2952
|
+
Hotkeys: 'Горячие клавиши',
|
|
2953
|
+
'Increase your stake.': 'Увеличить ставку.',
|
|
2954
|
+
'Lower bet': 'Уменьшить ставку',
|
|
2955
|
+
'Master volume': 'Общая громкость',
|
|
2956
|
+
'Max win': 'Макс. выигрыш',
|
|
2957
|
+
Menu: 'Меню',
|
|
2958
|
+
'Menu & info': 'Меню и информация',
|
|
2959
|
+
Modes: 'Режимы',
|
|
2960
|
+
Music: 'Музыка',
|
|
2961
|
+
Mute: 'Отключить звук',
|
|
2962
|
+
'Mute or unmute the game.': 'Включить или отключить звук.',
|
|
2963
|
+
Navigate: 'Навигация',
|
|
2964
|
+
'Open settings and game info.': 'Открыть настройки и информацию об игре.',
|
|
2965
|
+
'Open the paytable and rules.': 'Открыть таблицу выплат и правила.',
|
|
2966
|
+
'Pay a fixed cost to enter a bonus feature.': 'Заплатите фиксированную сумму для входа в бонусный раунд.',
|
|
2967
|
+
Paylines: 'Линии выплат',
|
|
2968
|
+
Paytable: 'Таблица выплат',
|
|
2969
|
+
'Pays anywhere': 'Выплачивает в любом месте',
|
|
2970
|
+
Price: 'Цена',
|
|
2971
|
+
'Raise bet': 'Повысить ставку',
|
|
2972
|
+
Replay: 'Повтор',
|
|
2973
|
+
RTP: 'RTP',
|
|
2974
|
+
SFX: 'Звуковые эффекты',
|
|
2975
|
+
Settings: 'Настройки',
|
|
2976
|
+
Sound: 'Звук',
|
|
2977
|
+
Spin: 'Вращение',
|
|
2978
|
+
'Spin automatically a set number of times.': 'Автоматически вращать заданное количество раз.',
|
|
2979
|
+
'Speed up spin animations.': 'Ускорить анимацию вращений.',
|
|
2980
|
+
Start: 'Начать',
|
|
2981
|
+
'Start a spin at the current bet.': 'Начать вращение с текущей ставкой.',
|
|
2982
|
+
'Start replay': 'Начать повтор',
|
|
2983
|
+
'Total win': 'Общий выигрыш',
|
|
2984
|
+
Turbo: 'Турбо',
|
|
2985
|
+
'Ways to win': 'Способы выигрыша',
|
|
2986
|
+
Win: 'Выигрыш',
|
|
2987
|
+
'Winning shapes': 'Выигрышные комбинации',
|
|
2988
|
+
},
|
|
2989
|
+
tr: {
|
|
2990
|
+
DISCLAIMER: 'Yasal uyarı',
|
|
2991
|
+
Activate: 'Etkinleştir',
|
|
2992
|
+
Autoplay: 'Otomatik Oyun',
|
|
2993
|
+
Balance: 'Bakiye',
|
|
2994
|
+
Bet: 'Bahis',
|
|
2995
|
+
'BUY BONUS': 'BONUS SATIN AL',
|
|
2996
|
+
Buy: 'Satın al',
|
|
2997
|
+
'Buy bonus': 'Bonus satın al',
|
|
2998
|
+
Cancel: 'İptal',
|
|
2999
|
+
Close: 'Kapat',
|
|
3000
|
+
'Cluster pays': 'Küme ödemeleri',
|
|
3001
|
+
Confirm: 'Onayla',
|
|
3002
|
+
Controls: 'Kontroller',
|
|
3003
|
+
'Decrease your stake.': 'Bahsinizi azaltın.',
|
|
3004
|
+
DISABLE: 'DEVRE DIŞI',
|
|
3005
|
+
'Dismiss the current overlay.': 'Mevcut pencereyi kapat.',
|
|
3006
|
+
'Free spins': 'Ücretsiz dönüşler',
|
|
3007
|
+
Game: 'Oyun',
|
|
3008
|
+
'Game info': 'Oyun bilgisi',
|
|
3009
|
+
Hotkeys: 'Klavye kısayolları',
|
|
3010
|
+
'Increase your stake.': 'Bahsinizi artırın.',
|
|
3011
|
+
'Lower bet': 'Bahsi düşür',
|
|
3012
|
+
'Master volume': 'Ana ses',
|
|
3013
|
+
'Max win': 'Maks kazanç',
|
|
3014
|
+
Menu: 'Menü',
|
|
3015
|
+
'Menu & info': 'Menü ve bilgi',
|
|
3016
|
+
Modes: 'Modlar',
|
|
3017
|
+
Music: 'Müzik',
|
|
3018
|
+
Mute: 'Sessiz',
|
|
3019
|
+
'Mute or unmute the game.': 'Oyun sesini aç ya da kapat.',
|
|
3020
|
+
Navigate: 'Gezin',
|
|
3021
|
+
'Open settings and game info.': 'Ayarları ve oyun bilgisini aç.',
|
|
3022
|
+
'Open the paytable and rules.': 'Ödeme tablosunu ve kuralları aç.',
|
|
3023
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bonus özelliğine girmek için sabit bir ücret ödeyin.',
|
|
3024
|
+
Paylines: 'Ödeme çizgileri',
|
|
3025
|
+
Paytable: 'Ödeme tablosu',
|
|
3026
|
+
'Pays anywhere': 'Her yerde kazandırır',
|
|
3027
|
+
Price: 'Fiyat',
|
|
3028
|
+
'Raise bet': 'Bahsi artır',
|
|
3029
|
+
Replay: 'Tekrar oynat',
|
|
3030
|
+
RTP: 'RTP',
|
|
3031
|
+
SFX: 'Ses efektleri',
|
|
3032
|
+
Settings: 'Ayarlar',
|
|
3033
|
+
Sound: 'Ses',
|
|
3034
|
+
Spin: 'Döndür',
|
|
3035
|
+
'Spin automatically a set number of times.': 'Belirlenen sayıda otomatik döndür.',
|
|
3036
|
+
'Speed up spin animations.': 'Döndürme animasyonlarını hızlandır.',
|
|
3037
|
+
Start: 'Başlat',
|
|
3038
|
+
'Start a spin at the current bet.': 'Mevcut bahisle döndürmeyi başlat.',
|
|
3039
|
+
'Start replay': 'Tekrarı başlat',
|
|
3040
|
+
'Total win': 'Toplam kazanç',
|
|
3041
|
+
Turbo: 'Turbo',
|
|
3042
|
+
'Ways to win': 'Kazanma yolları',
|
|
3043
|
+
Win: 'Kazanç',
|
|
3044
|
+
'Winning shapes': 'Kazanan şekiller',
|
|
3045
|
+
},
|
|
3046
|
+
vi: {
|
|
3047
|
+
DISCLAIMER: 'Tuyên bố miễn trừ trách nhiệm',
|
|
3048
|
+
Activate: 'Kích hoạt',
|
|
3049
|
+
Autoplay: 'Tự động quay',
|
|
3050
|
+
Balance: 'Số dư',
|
|
3051
|
+
Bet: 'Cược',
|
|
3052
|
+
'BUY BONUS': 'MUA THƯỞNG',
|
|
3053
|
+
Buy: 'Mua',
|
|
3054
|
+
'Buy bonus': 'Mua thưởng',
|
|
3055
|
+
Cancel: 'Hủy',
|
|
3056
|
+
Close: 'Đóng',
|
|
3057
|
+
'Cluster pays': 'Trả theo cụm',
|
|
3058
|
+
Confirm: 'Xác nhận',
|
|
3059
|
+
Controls: 'Điều khiển',
|
|
3060
|
+
'Decrease your stake.': 'Giảm mức cược.',
|
|
3061
|
+
DISABLE: 'TẮT',
|
|
3062
|
+
'Dismiss the current overlay.': 'Đóng lớp phủ hiện tại.',
|
|
3063
|
+
'Free spins': 'Quay miễn phí',
|
|
3064
|
+
Game: 'Trò chơi',
|
|
3065
|
+
'Game info': 'Thông tin trò chơi',
|
|
3066
|
+
Hotkeys: 'Phím tắt',
|
|
3067
|
+
'Increase your stake.': 'Tăng mức cược.',
|
|
3068
|
+
'Lower bet': 'Giảm cược',
|
|
3069
|
+
'Master volume': 'Âm lượng chính',
|
|
3070
|
+
'Max win': 'Thắng tối đa',
|
|
3071
|
+
Menu: 'Menu',
|
|
3072
|
+
'Menu & info': 'Menu & thông tin',
|
|
3073
|
+
Modes: 'Chế độ',
|
|
3074
|
+
Music: 'Âm nhạc',
|
|
3075
|
+
Mute: 'Tắt âm',
|
|
3076
|
+
'Mute or unmute the game.': 'Tắt hoặc bật âm thanh trò chơi.',
|
|
3077
|
+
Navigate: 'Điều hướng',
|
|
3078
|
+
'Open settings and game info.': 'Mở cài đặt và thông tin trò chơi.',
|
|
3079
|
+
'Open the paytable and rules.': 'Mở bảng trả thưởng và quy tắc.',
|
|
3080
|
+
'Pay a fixed cost to enter a bonus feature.': 'Trả một khoản phí cố định để tham gia tính năng thưởng.',
|
|
3081
|
+
Paylines: 'Đường thắng',
|
|
3082
|
+
Paytable: 'Bảng trả thưởng',
|
|
3083
|
+
'Pays anywhere': 'Trả bất cứ đâu',
|
|
3084
|
+
Price: 'Giá',
|
|
3085
|
+
'Raise bet': 'Tăng cược',
|
|
3086
|
+
Replay: 'Xem lại',
|
|
3087
|
+
RTP: 'RTP',
|
|
3088
|
+
SFX: 'Hiệu ứng âm thanh',
|
|
3089
|
+
Settings: 'Cài đặt',
|
|
3090
|
+
Sound: 'Âm thanh',
|
|
3091
|
+
Spin: 'Quay',
|
|
3092
|
+
'Spin automatically a set number of times.': 'Tự động quay một số lần nhất định.',
|
|
3093
|
+
'Speed up spin animations.': 'Tăng tốc độ hoạt ảnh quay.',
|
|
3094
|
+
Start: 'Bắt đầu',
|
|
3095
|
+
'Start a spin at the current bet.': 'Bắt đầu quay với mức cược hiện tại.',
|
|
3096
|
+
'Start replay': 'Bắt đầu xem lại',
|
|
3097
|
+
'Total win': 'Tổng thắng',
|
|
3098
|
+
Turbo: 'Turbo',
|
|
3099
|
+
'Ways to win': 'Cách thắng',
|
|
3100
|
+
Win: 'Thắng',
|
|
3101
|
+
'Winning shapes': 'Hình thắng',
|
|
3102
|
+
},
|
|
3103
|
+
zh: {
|
|
3104
|
+
DISCLAIMER: '免责声明',
|
|
3105
|
+
Activate: '激活',
|
|
3106
|
+
Autoplay: '自动游戏',
|
|
3107
|
+
Balance: '余额',
|
|
3108
|
+
Bet: '投注',
|
|
3109
|
+
'BUY BONUS': '购买奖励',
|
|
3110
|
+
Buy: '购买',
|
|
3111
|
+
'Buy bonus': '购买奖励',
|
|
3112
|
+
Cancel: '取消',
|
|
3113
|
+
Close: '关闭',
|
|
3114
|
+
'Cluster pays': '集群赔付',
|
|
3115
|
+
Confirm: '确认',
|
|
3116
|
+
Controls: '控制',
|
|
3117
|
+
'Decrease your stake.': '降低投注额。',
|
|
3118
|
+
DISABLE: '禁用',
|
|
3119
|
+
'Dismiss the current overlay.': '关闭当前弹窗。',
|
|
3120
|
+
'Free spins': '免费旋转',
|
|
3121
|
+
Game: '游戏',
|
|
3122
|
+
'Game info': '游戏信息',
|
|
3123
|
+
Hotkeys: '快捷键',
|
|
3124
|
+
'Increase your stake.': '提高投注额。',
|
|
3125
|
+
'Lower bet': '降低投注',
|
|
3126
|
+
'Master volume': '主音量',
|
|
3127
|
+
'Max win': '最大奖金',
|
|
3128
|
+
Menu: '菜单',
|
|
3129
|
+
'Menu & info': '菜单与信息',
|
|
3130
|
+
Modes: '模式',
|
|
3131
|
+
Music: '音乐',
|
|
3132
|
+
Mute: '静音',
|
|
3133
|
+
'Mute or unmute the game.': '静音或取消静音。',
|
|
3134
|
+
Navigate: '导航',
|
|
3135
|
+
'Open settings and game info.': '打开设置和游戏信息。',
|
|
3136
|
+
'Open the paytable and rules.': '打开赔付表和规则。',
|
|
3137
|
+
'Pay a fixed cost to enter a bonus feature.': '支付固定费用以进入奖励功能。',
|
|
3138
|
+
Paylines: '赔付线',
|
|
3139
|
+
Paytable: '赔付表',
|
|
3140
|
+
'Pays anywhere': '任意位置赢',
|
|
3141
|
+
Price: '价格',
|
|
3142
|
+
'Raise bet': '提高投注',
|
|
3143
|
+
Replay: '重播',
|
|
3144
|
+
RTP: 'RTP',
|
|
3145
|
+
SFX: '音效',
|
|
3146
|
+
Settings: '设置',
|
|
3147
|
+
Sound: '声音',
|
|
3148
|
+
Spin: '旋转',
|
|
3149
|
+
'Spin automatically a set number of times.': '自动旋转设定次数。',
|
|
3150
|
+
'Speed up spin animations.': '加速旋转动画。',
|
|
3151
|
+
Start: '开始',
|
|
3152
|
+
'Start a spin at the current bet.': '以当前投注额开始旋转。',
|
|
3153
|
+
'Start replay': '开始重播',
|
|
3154
|
+
'Total win': '总奖金',
|
|
3155
|
+
Turbo: '急速',
|
|
3156
|
+
'Ways to win': '赢法',
|
|
3157
|
+
Win: '奖金',
|
|
3158
|
+
'Winning shapes': '赢利图形',
|
|
3159
|
+
},
|
|
3160
|
+
};
|
|
3161
|
+
|
|
1783
3162
|
// Social-casino language. English is the source (and, for now, the only) language; `socialize`
|
|
1784
3163
|
// rewrites the restricted gambling vocabulary into social-safe phrasing while preserving case.
|
|
1785
3164
|
//
|
|
@@ -1852,6 +3231,21 @@ function socialize(text) {
|
|
|
1852
3231
|
return repl == null ? m : applyCase(m, repl);
|
|
1853
3232
|
});
|
|
1854
3233
|
}
|
|
3234
|
+
const LANGS = ['de', 'en', 'es', 'fi', 'fr', 'hi', 'id', 'ja', 'ko', 'pl', 'pt', 'ru', 'tr', 'vi', 'zh', 'da'];
|
|
3235
|
+
const LANG_SET = new Set(LANGS);
|
|
3236
|
+
function normalizeLang(code) {
|
|
3237
|
+
const base = (code ?? '').toLowerCase().split(/[-_]/)[0];
|
|
3238
|
+
return (LANG_SET.has(base) ? base : 'en');
|
|
3239
|
+
}
|
|
3240
|
+
function createI18n(opts) {
|
|
3241
|
+
const lang = normalizeLang(opts.language);
|
|
3242
|
+
const t = (src) => {
|
|
3243
|
+
if (lang === 'en')
|
|
3244
|
+
return opts.isSocial ? socialize(src) : src;
|
|
3245
|
+
return opts.messages?.[lang]?.[src] ?? LOCALES[lang]?.[src] ?? src;
|
|
3246
|
+
};
|
|
3247
|
+
return { lang, t };
|
|
3248
|
+
}
|
|
1855
3249
|
|
|
1856
3250
|
const REMOVE_FADE_MS = 300;
|
|
1857
3251
|
class GameShell extends EventEmitter {
|
|
@@ -1867,10 +3261,19 @@ class GameShell extends EventEmitter {
|
|
|
1867
3261
|
prevBalance = 0;
|
|
1868
3262
|
prevWin = 0;
|
|
1869
3263
|
moneyAnims = [];
|
|
1870
|
-
|
|
3264
|
+
kbd;
|
|
3265
|
+
i18n;
|
|
3266
|
+
/** onKey handler of the currently open modal/overlay, if any (set in showModal, cleared in closeModal). */
|
|
3267
|
+
modalOnKey = undefined;
|
|
3268
|
+
/** Shared sound on/off state — Settings speaker toggle and the Shift+M hotkey stay in sync. The
|
|
3269
|
+
* game listens to `settingChange({ key: 'sound' })` to (un)mute audio. */
|
|
3270
|
+
soundOn = true;
|
|
3271
|
+
/** Set by the open Settings modal so Shift+M live-updates its speaker icon; cleared on close. */
|
|
3272
|
+
soundRefresh = null;
|
|
1871
3273
|
constructor(config) {
|
|
1872
3274
|
super();
|
|
1873
3275
|
this.config = config;
|
|
3276
|
+
this.i18n = createI18n({ language: config.language, isSocial: config.isSocial });
|
|
1874
3277
|
this.state = createInitialState(config);
|
|
1875
3278
|
this.styleEl = document.createElement('style');
|
|
1876
3279
|
this.styleEl.textContent = SHELL_CSS;
|
|
@@ -1886,12 +3289,54 @@ class GameShell extends EventEmitter {
|
|
|
1886
3289
|
this.prevWin = this.state.win;
|
|
1887
3290
|
this.observeLayout();
|
|
1888
3291
|
if (typeof document !== 'undefined') {
|
|
1889
|
-
|
|
3292
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
3293
|
+
const shell = this;
|
|
3294
|
+
const host = {
|
|
3295
|
+
get state() { return shell.state; },
|
|
3296
|
+
get hotkeysEnabled() { return shell.config.features.hotkeys !== false; },
|
|
3297
|
+
get spacebarEnabled() { return shell.config.features.spacebar !== false; },
|
|
3298
|
+
get turboLevels() { return shell.config.features.turbo; },
|
|
3299
|
+
get autoplayEnabled() { return shell.config.features.autoplay != null; },
|
|
3300
|
+
get buyBonusEnabled() { return shell.config.features.buyBonus !== false; },
|
|
3301
|
+
hasOpenLayer: () => shell.modalHost.childElementCount > 0,
|
|
3302
|
+
routeToLayer: (e) => shell.modalOnKey?.(e) ?? false,
|
|
3303
|
+
spin: () => shell.emit('spin'),
|
|
3304
|
+
stepBet: (dir) => {
|
|
3305
|
+
const next = stepBet(shell.state, dir);
|
|
3306
|
+
if (next === shell.state.bet)
|
|
3307
|
+
return;
|
|
3308
|
+
shell.state.bet = next;
|
|
3309
|
+
shell.emit('betChange', next);
|
|
3310
|
+
shell.render();
|
|
3311
|
+
},
|
|
3312
|
+
toggleAutoplay: () => {
|
|
3313
|
+
if (shell.state.autoplay.active) {
|
|
3314
|
+
shell.state.autoplay = { active: false, remaining: 0 };
|
|
3315
|
+
shell.emit('autoplayStop');
|
|
3316
|
+
shell.render();
|
|
3317
|
+
}
|
|
3318
|
+
else {
|
|
3319
|
+
shell.openAutoplayPicker();
|
|
3320
|
+
}
|
|
3321
|
+
},
|
|
3322
|
+
cycleTurbo: () => {
|
|
3323
|
+
const next = nextTurbo(shell.state.turbo, shell.config.features.turbo);
|
|
3324
|
+
shell.state.turbo = next;
|
|
3325
|
+
shell.emit('turboChange', next);
|
|
3326
|
+
shell.render();
|
|
3327
|
+
},
|
|
3328
|
+
openBuyBonus: () => shell.openBuyBonus(),
|
|
3329
|
+
openInfo: () => shell.openInfo(),
|
|
3330
|
+
openMenu: () => shell.openMenu(),
|
|
3331
|
+
toggleMute: () => shell.setSound(!shell.soundOn),
|
|
3332
|
+
closeLayer: () => shell.closeModal(),
|
|
3333
|
+
};
|
|
3334
|
+
this.kbd = new KeyboardController(host);
|
|
3335
|
+
this.kbd.attach();
|
|
1890
3336
|
// Stake serves the game in an iframe; on first paint focus is on the HOST page, so a `document`
|
|
1891
3337
|
// keydown never fires and Space scrolls the parent. Pull window focus into the iframe on the
|
|
1892
3338
|
// first pointer interaction so the spacebar shortcut works. Harmless on full-page Energy8.
|
|
1893
3339
|
document.addEventListener('pointerdown', this.pullFocus, true);
|
|
1894
|
-
this.keysBound = true;
|
|
1895
3340
|
}
|
|
1896
3341
|
this.render();
|
|
1897
3342
|
// re-fit once the bundled webfont swaps in (text metrics change → row width changes)
|
|
@@ -1994,46 +3439,32 @@ class GameShell extends EventEmitter {
|
|
|
1994
3439
|
zoomBar(s * (bar.clientWidth / bar.scrollWidth));
|
|
1995
3440
|
}
|
|
1996
3441
|
}
|
|
1997
|
-
/** Spacebar starts a spin — same path as the spin disc. Ignored when `features.spacebar` is
|
|
1998
|
-
* false, while a spin is running, while autoplay is active, outside base mode, when an
|
|
1999
|
-
* overlay/modal is open, or when an editable element is focused. `repeat` (held key) is
|
|
2000
|
-
* ignored so it can't spam. */
|
|
2001
3442
|
/** Pull window focus into the iframe on first pointer interaction so `document` keydown (the
|
|
2002
3443
|
* spacebar shortcut) fires. No-op / harmless when already focused or full-page. */
|
|
2003
3444
|
pullFocus = () => { try {
|
|
2004
3445
|
window.focus();
|
|
2005
3446
|
}
|
|
2006
3447
|
catch { /* cross-origin / non-browser */ } };
|
|
2007
|
-
handleKeyDown = (e) => {
|
|
2008
|
-
if (this.destroyed || e.code !== 'Space' || e.repeat)
|
|
2009
|
-
return;
|
|
2010
|
-
if (this.config.features.spacebar === false)
|
|
2011
|
-
return; // shortcut disabled (e.g. jurisdiction)
|
|
2012
|
-
const t = e.target;
|
|
2013
|
-
if (t && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)))
|
|
2014
|
-
return;
|
|
2015
|
-
// Space is ours now — swallow the browser default before any no-op bail. Otherwise the
|
|
2016
|
-
// native "Space activates the focused button" still fires and re-clicks whichever shell
|
|
2017
|
-
// <button> (menu/buy/auto) opened the overlay, tearing down + rebuilding the modal: a
|
|
2018
|
-
// visible flicker. (Also stops the page from scrolling on Space.)
|
|
2019
|
-
e.preventDefault();
|
|
2020
|
-
if (this.modalHost.childElementCount > 0)
|
|
2021
|
-
return; // an overlay/modal is open
|
|
2022
|
-
if (this.state.mode !== 'base' || this.state.busy || this.state.autoplay.active)
|
|
2023
|
-
return;
|
|
2024
|
-
this.emit('spin');
|
|
2025
|
-
};
|
|
2026
3448
|
setLayout(layout) {
|
|
2027
3449
|
if (layout === this.layout)
|
|
2028
3450
|
return;
|
|
2029
3451
|
this.layout = layout;
|
|
2030
3452
|
this.render();
|
|
2031
3453
|
}
|
|
2032
|
-
/** Resolve a built-in shell string
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
3454
|
+
/** Resolve a built-in shell string through the i18n resolver (translation + optional socialize). */
|
|
3455
|
+
t(text) { return this.i18n.t(text); }
|
|
3456
|
+
/** Toggle the social vocabulary at runtime (rebuilds resolver, re-renders bar). */
|
|
3457
|
+
setSocial(isSocial) {
|
|
3458
|
+
this.config.isSocial = isSocial;
|
|
3459
|
+
this.i18n = createI18n({ language: this.config.language, isSocial });
|
|
3460
|
+
this.render();
|
|
3461
|
+
}
|
|
3462
|
+
/** Swap the active language at runtime (rebuilds resolver, re-renders bar). */
|
|
3463
|
+
setLanguage(lang) {
|
|
3464
|
+
this.config.language = lang;
|
|
3465
|
+
this.i18n = createI18n({ language: lang, isSocial: this.config.isSocial });
|
|
3466
|
+
this.render();
|
|
3467
|
+
}
|
|
2037
3468
|
/** Recolour the shell at runtime (e.g. switch dark/light scheme). */
|
|
2038
3469
|
setTheme(theme) {
|
|
2039
3470
|
this.config.theme = theme;
|
|
@@ -2074,7 +3505,7 @@ class GameShell extends EventEmitter {
|
|
|
2074
3505
|
this.state.mode = mode;
|
|
2075
3506
|
this.render();
|
|
2076
3507
|
}
|
|
2077
|
-
setBusy(busy) { this.state.busy = busy; this.render(); }
|
|
3508
|
+
setBusy(busy) { this.state.busy = busy; this.render(); this.kbd?.notifyBusyChanged(busy); }
|
|
2078
3509
|
setAutoplay(a) { this.state.autoplay = a; this.render(); }
|
|
2079
3510
|
setTurbo(level) { this.state.turbo = level; this.render(); }
|
|
2080
3511
|
/** Currency-aware money formatter for WIN amounts (variable decimals: 0.0041 stays 0.0041, not
|
|
@@ -2082,7 +3513,7 @@ class GameShell extends EventEmitter {
|
|
|
2082
3513
|
formatWin(value) { return formatCurrency(value, this.config.currency, true); }
|
|
2083
3514
|
setBuyBonusEnabled(enabled) { this.state.buyBonusEnabled = enabled; this.render(); }
|
|
2084
3515
|
setFreeSpins(fs) { this.state.freeSpins = fs; this.render(); }
|
|
2085
|
-
showModal(el) {
|
|
3516
|
+
showModal(el, onKey) {
|
|
2086
3517
|
// The control that opened this overlay (menu/buy/auto) keeps DOM focus. Drop it, or a
|
|
2087
3518
|
// stray Space/Enter would natively re-activate that <button> and rebuild the modal — a
|
|
2088
3519
|
// visible flicker. Only relinquish focus we own (a shell control), never the host page's.
|
|
@@ -2091,6 +3522,7 @@ class GameShell extends EventEmitter {
|
|
|
2091
3522
|
active.blur();
|
|
2092
3523
|
this.modalHost.innerHTML = '';
|
|
2093
3524
|
this.modalHost.appendChild(el);
|
|
3525
|
+
this.modalOnKey = onKey;
|
|
2094
3526
|
this.fitModals();
|
|
2095
3527
|
}
|
|
2096
3528
|
/** Uniformly scale every open centred card modal (`.ge-sheet`) down so it fits a short/narrow
|
|
@@ -2143,22 +3575,31 @@ class GameShell extends EventEmitter {
|
|
|
2143
3575
|
}
|
|
2144
3576
|
openMenu() { this.emit('menuOpen'); this.openSettings(); }
|
|
2145
3577
|
openSettings() { this.emit('settingsOpen'); this.showModal(openSettingsModal(this)); }
|
|
2146
|
-
openInfo() { this.emit('infoOpen'); this.showModal(
|
|
3578
|
+
openInfo() { this.emit('infoOpen'); const { root, onKey } = openGameInfoModal(this); this.showModal(root, onKey); }
|
|
2147
3579
|
openBuyBonus() {
|
|
2148
3580
|
if (this.config.onBonusBuy) {
|
|
2149
3581
|
this.config.onBonusBuy();
|
|
2150
3582
|
return;
|
|
2151
3583
|
} // game handles it (own UI)
|
|
2152
|
-
const
|
|
2153
|
-
if (
|
|
2154
|
-
this.showModal(
|
|
3584
|
+
const result = openBuyBonusOverlay(this);
|
|
3585
|
+
if (result)
|
|
3586
|
+
this.showModal(result.root, result.onKey);
|
|
2155
3587
|
}
|
|
2156
3588
|
/** Open a generic, externally-driven modal (title + body + optional action buttons).
|
|
2157
3589
|
* Each action runs its `on` then closes; the ✕ shows when `availableClose` is true. */
|
|
2158
|
-
openModal(opts) { this.showModal(buildModal(opts)); }
|
|
3590
|
+
openModal(opts) { this.showModal(buildModal(opts), opts.onKey); }
|
|
2159
3591
|
/** Programmatically dismiss whatever modal/overlay is currently shown (e.g. auto-close the
|
|
2160
3592
|
* reconnect overlay once the link is restored). No-op when nothing is open. */
|
|
2161
|
-
closeModal() { this.modalHost.innerHTML = ''; }
|
|
3593
|
+
closeModal() { this.modalOnKey = undefined; this.soundRefresh = null; this.modalHost.innerHTML = ''; }
|
|
3594
|
+
/** Flip the shared sound state, notify the game (`settingChange({ key: 'sound' })`), and live-update
|
|
3595
|
+
* the Settings speaker icon if that modal is open. Used by both the Settings toggle and Shift+M. */
|
|
3596
|
+
setSound(on) {
|
|
3597
|
+
this.soundOn = on;
|
|
3598
|
+
this.emit('settingChange', { key: 'sound', value: on });
|
|
3599
|
+
this.soundRefresh?.(on);
|
|
3600
|
+
}
|
|
3601
|
+
/** The Settings modal registers an icon-updater while open (cleared on close). */
|
|
3602
|
+
setSoundRefresh(fn) { this.soundRefresh = fn; }
|
|
2162
3603
|
/** Open the non-dismissable replay summary modal (START REPLAY → onReplay → reopen). */
|
|
2163
3604
|
openReplay(opts) {
|
|
2164
3605
|
if (this.destroyed)
|
|
@@ -2166,19 +3607,18 @@ class GameShell extends EventEmitter {
|
|
|
2166
3607
|
this.showModal(buildReplayModal(this, opts));
|
|
2167
3608
|
}
|
|
2168
3609
|
/** Bet picker — list of available bets with an accent Confirm. */
|
|
2169
|
-
openBetPicker() { this.showModal(
|
|
3610
|
+
openBetPicker() { const { root, onKey } = openBetModal(this); this.showModal(root, onKey); }
|
|
2170
3611
|
/** Autoplay picker — spin-count list; Confirm starts autoplay. */
|
|
2171
|
-
openAutoplayPicker() { this.showModal(
|
|
3612
|
+
openAutoplayPicker() { const { root, onKey } = openAutoplayModal(this); this.showModal(root, onKey); }
|
|
2172
3613
|
destroy() {
|
|
2173
3614
|
if (this.destroyed)
|
|
2174
3615
|
return Promise.resolve();
|
|
2175
3616
|
this.destroyed = true;
|
|
2176
3617
|
this.ro?.disconnect();
|
|
2177
3618
|
this.ro = null;
|
|
2178
|
-
if (
|
|
2179
|
-
|
|
3619
|
+
if (typeof document !== 'undefined') {
|
|
3620
|
+
this.kbd?.detach();
|
|
2180
3621
|
document.removeEventListener('pointerdown', this.pullFocus, true);
|
|
2181
|
-
this.keysBound = false;
|
|
2182
3622
|
}
|
|
2183
3623
|
this.cancelMoneyAnims();
|
|
2184
3624
|
this.removeAllListeners();
|
|
@@ -2224,6 +3664,8 @@ function removeGameShell() {
|
|
|
2224
3664
|
|
|
2225
3665
|
exports.GameShell = GameShell;
|
|
2226
3666
|
exports.createGameShell = createGameShell;
|
|
3667
|
+
exports.createI18n = createI18n;
|
|
3668
|
+
exports.normalizeLang = normalizeLang;
|
|
2227
3669
|
exports.removeGameShell = removeGameShell;
|
|
2228
3670
|
exports.socialize = socialize;
|
|
2229
3671
|
//# sourceMappingURL=shell.cjs.js.map
|