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