@energy8platform/platform-core 0.25.4 → 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 +1749 -173
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +77 -9
- package/dist/index.esm.js +1749 -173
- 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 +1516 -83
- package/dist/shell.cjs.js.map +1 -1
- package/dist/shell.d.ts +43 -11
- package/dist/shell.esm.js +1515 -84
- package/dist/shell.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/game-spec/types.ts +3 -0
- package/src/loading/CSSPreloader.ts +21 -115
- package/src/loading/index.ts +6 -0
- package/src/loading/variants/energy8.ts +105 -0
- package/src/loading/variants/index.ts +19 -0
- package/src/loading/variants/types.ts +36 -0
- package/src/loading/variants/voidmoon.ts +134 -0
- package/src/shell/GameShell.ts +87 -41
- package/src/shell/components/BuyBonus.ts +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 +17 -0
- package/src/shell/types.ts +8 -0
- package/src/shell/version.ts +1 -1
- package/src/types.ts +8 -0
package/dist/index.esm.js
CHANGED
|
@@ -710,7 +710,7 @@ const GRADIENT_DEFS = `
|
|
|
710
710
|
<stop stop-color="#316FB0"/><stop stop-color="#1FCDE6" offset=".5"/><stop stop-color="#29FEE7" offset="1"/>
|
|
711
711
|
</linearGradient>`;
|
|
712
712
|
/** Max width of the loader bar in SVG units */
|
|
713
|
-
const LOADER_BAR_MAX_WIDTH = 174;
|
|
713
|
+
const LOADER_BAR_MAX_WIDTH$1 = 174;
|
|
714
714
|
/**
|
|
715
715
|
* Build the Energy8 SVG logo with a loader bar, using unique IDs.
|
|
716
716
|
*
|
|
@@ -743,61 +743,27 @@ ${defs}
|
|
|
743
743
|
</svg>`;
|
|
744
744
|
}
|
|
745
745
|
|
|
746
|
-
|
|
747
|
-
const RECT_ID = 'ge-pl-loader-rect';
|
|
748
|
-
const TEXT_ID = 'ge-pl-loader-text';
|
|
749
|
-
const
|
|
750
|
-
const LOGO_SVG = buildLogoSVG({
|
|
746
|
+
/** Element ids the lifecycle handle binds to (also asserted by tests). */
|
|
747
|
+
const RECT_ID$1 = 'ge-pl-loader-rect';
|
|
748
|
+
const TEXT_ID$1 = 'ge-pl-loader-text';
|
|
749
|
+
const LOGO_SVG$1 = buildLogoSVG({
|
|
751
750
|
idPrefix: 'pl',
|
|
752
751
|
svgClass: 'ge-logo-svg',
|
|
753
752
|
clipRectClass: 'ge-clip-rect',
|
|
754
|
-
clipRectId: RECT_ID,
|
|
753
|
+
clipRectId: RECT_ID$1,
|
|
755
754
|
textClass: 'ge-preloader-svg-text',
|
|
756
|
-
textId: TEXT_ID,
|
|
755
|
+
textId: TEXT_ID$1,
|
|
757
756
|
});
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
return
|
|
762
|
-
return Math.max(0, Math.min(1, p));
|
|
763
|
-
}
|
|
764
|
-
function createCSSPreloader(container, config) {
|
|
765
|
-
if (document.getElementById(PRELOADER_ID))
|
|
766
|
-
return;
|
|
767
|
-
const bgColor = typeof config?.backgroundColor === 'string'
|
|
768
|
-
? config.backgroundColor
|
|
769
|
-
: typeof config?.backgroundColor === 'number'
|
|
770
|
-
? `#${config.backgroundColor.toString(16).padStart(6, '0')}`
|
|
771
|
-
: '#0a0a1a';
|
|
772
|
-
const bgGradient = config?.backgroundGradient ?? `linear-gradient(135deg, ${bgColor} 0%, #1a1a3e 100%)`;
|
|
773
|
-
const customHTML = config?.cssPreloaderHTML ?? '';
|
|
774
|
-
const overlay = document.createElement('div');
|
|
775
|
-
overlay.id = PRELOADER_ID;
|
|
776
|
-
overlay.innerHTML = customHTML || `
|
|
757
|
+
/** The default Energy8-branded preloader: animated wordmark + shimmering loader bar. */
|
|
758
|
+
const energy8Variant = {
|
|
759
|
+
buildContentHTML() {
|
|
760
|
+
return `
|
|
777
761
|
<div class="ge-preloader-content">
|
|
778
|
-
${LOGO_SVG}
|
|
762
|
+
${LOGO_SVG$1}
|
|
779
763
|
</div>
|
|
780
764
|
`;
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
#${PRELOADER_ID} {
|
|
784
|
-
position: absolute;
|
|
785
|
-
top: 0; left: 0;
|
|
786
|
-
width: 100%; height: 100%;
|
|
787
|
-
background: ${bgGradient};
|
|
788
|
-
display: flex;
|
|
789
|
-
align-items: center;
|
|
790
|
-
justify-content: center;
|
|
791
|
-
z-index: 10000;
|
|
792
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
793
|
-
transition: opacity 0.4s ease-out;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
#${PRELOADER_ID}.ge-preloader-hidden {
|
|
797
|
-
opacity: 0;
|
|
798
|
-
pointer-events: none;
|
|
799
|
-
}
|
|
800
|
-
|
|
765
|
+
},
|
|
766
|
+
css: `
|
|
801
767
|
.ge-preloader-content {
|
|
802
768
|
display: flex;
|
|
803
769
|
flex-direction: column;
|
|
@@ -848,6 +814,219 @@ function createCSSPreloader(container, config) {
|
|
|
848
814
|
0%, 100% { opacity: 0.5; }
|
|
849
815
|
50% { opacity: 1; }
|
|
850
816
|
}
|
|
817
|
+
`,
|
|
818
|
+
mount(overlay) {
|
|
819
|
+
const rectEl = overlay.querySelector(`#${RECT_ID$1}`);
|
|
820
|
+
const textEl = overlay.querySelector(`#${TEXT_ID$1}`);
|
|
821
|
+
// Custom HTML mode (or missing logo) — no progress target; lifecycle inert.
|
|
822
|
+
if (!rectEl || !textEl)
|
|
823
|
+
return null;
|
|
824
|
+
let driven = false;
|
|
825
|
+
return {
|
|
826
|
+
setProgress(p, showPercentage) {
|
|
827
|
+
if (!driven) {
|
|
828
|
+
rectEl.classList.add('driven');
|
|
829
|
+
driven = true;
|
|
830
|
+
}
|
|
831
|
+
rectEl.setAttribute('width', String(p * LOADER_BAR_MAX_WIDTH$1));
|
|
832
|
+
if (showPercentage) {
|
|
833
|
+
textEl.textContent = `${Math.round(p * 100)}%`;
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
showTapText(text) {
|
|
837
|
+
textEl.textContent = text;
|
|
838
|
+
textEl.classList.add('ge-svg-pulse');
|
|
839
|
+
},
|
|
840
|
+
};
|
|
841
|
+
},
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
/** Element ids the lifecycle handle binds to. */
|
|
845
|
+
const RECT_ID = 'ge-vm-loader-rect';
|
|
846
|
+
const TEXT_ID = 'ge-vm-loader-text';
|
|
847
|
+
/** Max width (SVG units) of the voidmoon loader bar fill. Spans the first 'o' → end of the crescent. */
|
|
848
|
+
const LOADER_BAR_MAX_WIDTH = 751;
|
|
849
|
+
/**
|
|
850
|
+
* "voidmoon" wordmark — the official logo, embedded verbatim as SVG outlines:
|
|
851
|
+
* thin white letters with the final "o" of "moon" rendered as a purple crescent
|
|
852
|
+
* (#9D63FE). The glyphs live in a flipped group (`translate(0,941) scale(1,-1)`)
|
|
853
|
+
* exactly as exported; the loader bar + status text are added beneath it in the
|
|
854
|
+
* outer (un-flipped) viewBox space.
|
|
855
|
+
*/
|
|
856
|
+
const LOGO_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="301 339 1075 335" class="ge-vm-logo-svg" style="overflow:visible" role="img">
|
|
857
|
+
<title>voidmoon</title>
|
|
858
|
+
<g transform="translate(0,941) scale(1,-1)">
|
|
859
|
+
<g fill="#ffffff" fill-rule="evenodd">
|
|
860
|
+
<path d="M627 562 c-4 -2 -7 -6 -7 -12 0 -13 14 -18 23 -10 3 3 3 5 4 9 0 7 -2 11 -7 13 -5 2 -9 2 -13 0z"/>
|
|
861
|
+
<path d="M780 531 l0 -31 -6 5 c-14 14 -35 17 -56 10 -24 -8 -40 -28 -42 -53 0 -11 1 -19 6 -30 8 -16 22 -27 40 -32 8 -2 23 -2 31 0 18 4 34 17 42 33 2 5 4 11 5 14 1 3 1 24 1 61 l0 55 -10 0 -11 0 0 -32z m-24 -38 c20 -10 28 -31 20 -50 -3 -6 -13 -16 -19 -19 -21 -10 -45 -2 -56 18 -2 4 -2 7 -3 14 -1 14 4 24 15 33 8 6 15 8 27 8 9 -1 10 -1 16 -4z"/>
|
|
862
|
+
<path d="M520 518 c-26 -6 -45 -25 -50 -51 -1 -9 -1 -11 0 -19 3 -12 7 -21 15 -30 8 -8 16 -13 28 -17 6 -2 9 -2 19 -2 10 0 13 0 20 2 21 8 36 24 41 46 1 8 1 13 0 22 -5 23 -21 40 -44 47 -6 2 -23 3 -29 2z m29 -25 c9 -4 16 -11 20 -19 2 -5 3 -6 3 -15 0 -10 -1 -11 -3 -16 -8 -15 -23 -24 -40 -23 -9 1 -15 3 -22 8 -22 15 -21 48 2 63 7 4 14 6 24 6 8 -1 10 -1 16 -4z"/>
|
|
863
|
+
<path d="M869 518 c-21 -4 -35 -18 -40 -38 -1 -6 -1 -14 -1 -43 l1 -35 10 0 11 0 0 37 c0 33 1 38 2 41 3 7 7 11 13 14 5 2 8 3 13 3 11 0 20 -5 25 -16 l3 -5 0 -37 1 -37 10 0 10 0 0 37 c0 35 1 37 3 42 5 10 14 16 26 16 11 0 21 -7 25 -17 2 -5 2 -7 2 -41 0 -19 0 -36 1 -37 0 -1 3 -1 11 -1 l10 1 0 35 c0 23 0 38 -1 42 -2 9 -8 21 -14 27 -20 17 -51 17 -68 -1 l-5 -5 -5 5 c-9 9 -19 13 -31 14 -5 0 -10 0 -12 -1z"/>
|
|
864
|
+
<path d="M1077 517 c-9 -1 -20 -7 -27 -12 -7 -6 -14 -16 -18 -25 -4 -11 -5 -25 -3 -35 5 -21 21 -37 42 -44 38 -12 78 14 81 53 1 15 -4 31 -14 43 -14 17 -38 25 -61 20z m25 -22 c19 -5 31 -24 28 -42 -4 -26 -34 -41 -59 -29 -20 10 -27 32 -17 52 8 16 29 25 48 19z"/>
|
|
865
|
+
<path d="M1282 516 c-18 -5 -34 -21 -38 -39 -1 -4 -1 -18 -1 -40 l1 -35 10 -1 10 0 0 32 c0 20 0 35 1 38 2 11 8 18 18 23 7 3 18 3 26 0 6 -3 12 -9 15 -16 2 -4 3 -6 3 -40 l1 -36 10 0 11 0 0 33 c0 38 0 43 -6 54 -7 14 -19 24 -34 28 -7 1 -20 1 -27 -1z"/>
|
|
866
|
+
<path d="M329 515 c0 -1 2 -5 4 -9 2 -5 13 -28 24 -53 12 -24 21 -45 22 -46 2 -4 10 -7 15 -7 4 0 11 3 13 6 3 2 50 105 50 108 0 1 -3 1 -11 1 l-11 0 -7 -14 c-3 -8 -12 -28 -20 -45 -7 -17 -13 -31 -14 -31 -1 -1 -3 5 -17 35 -19 43 -23 53 -24 54 -1 1 -5 1 -13 1 -6 0 -11 0 -11 0z"/>
|
|
867
|
+
<path d="M623 514 c0 -1 0 -26 0 -57 l1 -55 10 0 10 0 0 56 0 57 -10 0 c-7 0 -10 0 -11 -1z"/>
|
|
868
|
+
</g>
|
|
869
|
+
<g fill="#9D63FE" fill-rule="evenodd">
|
|
870
|
+
<path d="M1150 515 c-3 0 -6 -1 -6 -1 0 -1 2 -2 5 -2 10 -4 26 -17 31 -27 11 -21 8 -44 -7 -62 -5 -7 -17 -16 -24 -18 -3 -1 -5 -2 -4 -2 0 -2 16 -3 24 -3 35 3 59 40 49 74 -2 8 -7 18 -13 24 -5 6 -15 13 -23 16 -8 3 -24 4 -32 1z"/>
|
|
871
|
+
</g>
|
|
872
|
+
</g>
|
|
873
|
+
|
|
874
|
+
<rect x="469" y="600" width="751" height="9" rx="4.5" fill="rgba(255,255,255,0.12)"/>
|
|
875
|
+
<clipPath id="vm-loader-clip">
|
|
876
|
+
<rect id="${RECT_ID}" x="469" y="600" width="0" height="9" rx="4.5" class="ge-vm-clip-rect"/>
|
|
877
|
+
</clipPath>
|
|
878
|
+
<rect x="469" y="600" width="751" height="9" rx="4.5" fill="#9D63FE" clip-path="url(#vm-loader-clip)"/>
|
|
879
|
+
|
|
880
|
+
<text id="${TEXT_ID}" x="844.5" y="650" text-anchor="middle" class="ge-vm-text">Loading...</text>
|
|
881
|
+
</svg>`;
|
|
882
|
+
const voidmoonVariant = {
|
|
883
|
+
buildContentHTML() {
|
|
884
|
+
return `
|
|
885
|
+
<div class="ge-vm-content">
|
|
886
|
+
${LOGO_SVG}
|
|
887
|
+
</div>
|
|
888
|
+
`;
|
|
889
|
+
},
|
|
890
|
+
css: `
|
|
891
|
+
.ge-vm-content {
|
|
892
|
+
display: flex;
|
|
893
|
+
flex-direction: column;
|
|
894
|
+
align-items: center;
|
|
895
|
+
width: 82%;
|
|
896
|
+
max-width: 680px;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.ge-vm-logo-svg {
|
|
900
|
+
width: 100%;
|
|
901
|
+
height: auto;
|
|
902
|
+
filter: drop-shadow(0 0 26px rgba(157, 99, 254, 0.3));
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/* Shimmer the loader bar while waiting */
|
|
906
|
+
.ge-vm-clip-rect {
|
|
907
|
+
animation: ge-vm-fill 2s ease-in-out infinite;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
@keyframes ge-vm-fill {
|
|
911
|
+
0% { width: 0; }
|
|
912
|
+
50% { width: 751; }
|
|
913
|
+
100% { width: 0; }
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/* Stop shimmer once JS-driven progress takes over. */
|
|
917
|
+
.ge-vm-clip-rect.driven {
|
|
918
|
+
animation: none;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.ge-vm-text {
|
|
922
|
+
fill: rgba(255, 255, 255, 0.6);
|
|
923
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
924
|
+
font-size: 20px;
|
|
925
|
+
font-weight: 600;
|
|
926
|
+
letter-spacing: 3px;
|
|
927
|
+
animation: ge-vm-pulse 1.5s ease-in-out infinite;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
@keyframes ge-vm-pulse {
|
|
931
|
+
0%, 100% { opacity: 0.4; }
|
|
932
|
+
50% { opacity: 1; }
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/* Tap-to-start CTA pulse. Compound selector outweighs the ambient
|
|
936
|
+
.ge-vm-text rule, swapping the animation cleanly. */
|
|
937
|
+
.ge-vm-text.ge-vm-tap-pulse {
|
|
938
|
+
animation: ge-vm-tap 1.2s ease-in-out infinite;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
@keyframes ge-vm-tap {
|
|
942
|
+
0%, 100% { opacity: 0.5; }
|
|
943
|
+
50% { opacity: 1; }
|
|
944
|
+
}
|
|
945
|
+
`,
|
|
946
|
+
mount(overlay) {
|
|
947
|
+
const rectEl = overlay.querySelector(`#${RECT_ID}`);
|
|
948
|
+
const textEl = overlay.querySelector(`#${TEXT_ID}`);
|
|
949
|
+
if (!rectEl || !textEl)
|
|
950
|
+
return null;
|
|
951
|
+
let driven = false;
|
|
952
|
+
return {
|
|
953
|
+
setProgress(p, showPercentage) {
|
|
954
|
+
if (!driven) {
|
|
955
|
+
rectEl.classList.add('driven');
|
|
956
|
+
driven = true;
|
|
957
|
+
}
|
|
958
|
+
rectEl.setAttribute('width', String(p * LOADER_BAR_MAX_WIDTH));
|
|
959
|
+
if (showPercentage) {
|
|
960
|
+
textEl.textContent = `${Math.round(p * 100)}%`;
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
showTapText(text) {
|
|
964
|
+
textEl.textContent = text;
|
|
965
|
+
textEl.classList.add('ge-vm-tap-pulse');
|
|
966
|
+
},
|
|
967
|
+
};
|
|
968
|
+
},
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* Registry of selectable preloader variants. Add a new variant by writing a
|
|
973
|
+
* file in this folder and adding one entry here — `PreloaderVariantName` and
|
|
974
|
+
* `LoadingScreenConfig.preloaderVariant` widen automatically.
|
|
975
|
+
*/
|
|
976
|
+
const VARIANTS = {
|
|
977
|
+
energy8: energy8Variant,
|
|
978
|
+
voidmoon: voidmoonVariant,
|
|
979
|
+
};
|
|
980
|
+
/** Default variant used when `preloaderVariant` is omitted or unknown. */
|
|
981
|
+
const DEFAULT_VARIANT_NAME = 'energy8';
|
|
982
|
+
|
|
983
|
+
const PRELOADER_ID = '__ge-css-preloader__';
|
|
984
|
+
const REMOVE_FADE_TIMEOUT_MS = 600;
|
|
985
|
+
let state = null;
|
|
986
|
+
function clampProgress(p) {
|
|
987
|
+
if (!Number.isFinite(p))
|
|
988
|
+
return 0;
|
|
989
|
+
return Math.max(0, Math.min(1, p));
|
|
990
|
+
}
|
|
991
|
+
function createCSSPreloader(container, config) {
|
|
992
|
+
if (document.getElementById(PRELOADER_ID))
|
|
993
|
+
return;
|
|
994
|
+
const bgColor = typeof config?.backgroundColor === 'string'
|
|
995
|
+
? config.backgroundColor
|
|
996
|
+
: typeof config?.backgroundColor === 'number'
|
|
997
|
+
? `#${config.backgroundColor.toString(16).padStart(6, '0')}`
|
|
998
|
+
: '#0a0a1a';
|
|
999
|
+
const bgGradient = config?.backgroundGradient ?? `linear-gradient(135deg, ${bgColor} 0%, #1a1a3e 100%)`;
|
|
1000
|
+
const customHTML = config?.cssPreloaderHTML ?? '';
|
|
1001
|
+
// Pick the visual identity. Unknown names fall back to the default so a bad
|
|
1002
|
+
// config value degrades to a working preloader rather than a blank overlay.
|
|
1003
|
+
const variant = VARIANTS[config?.preloaderVariant ?? DEFAULT_VARIANT_NAME] ??
|
|
1004
|
+
VARIANTS[DEFAULT_VARIANT_NAME];
|
|
1005
|
+
const overlay = document.createElement('div');
|
|
1006
|
+
overlay.id = PRELOADER_ID;
|
|
1007
|
+
overlay.innerHTML = customHTML || variant.buildContentHTML(config);
|
|
1008
|
+
const styleEl = document.createElement('style');
|
|
1009
|
+
// Shared overlay infrastructure (positioning / background / fade) plus the
|
|
1010
|
+
// variant's own content styling and animations.
|
|
1011
|
+
styleEl.textContent = `
|
|
1012
|
+
#${PRELOADER_ID} {
|
|
1013
|
+
position: absolute;
|
|
1014
|
+
top: 0; left: 0;
|
|
1015
|
+
width: 100%; height: 100%;
|
|
1016
|
+
background: ${bgGradient};
|
|
1017
|
+
display: flex;
|
|
1018
|
+
align-items: center;
|
|
1019
|
+
justify-content: center;
|
|
1020
|
+
z-index: 10000;
|
|
1021
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1022
|
+
transition: opacity 0.4s ease-out;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
#${PRELOADER_ID}.ge-preloader-hidden {
|
|
1026
|
+
opacity: 0;
|
|
1027
|
+
pointer-events: none;
|
|
1028
|
+
}
|
|
1029
|
+
${variant.css}
|
|
851
1030
|
`;
|
|
852
1031
|
// The absolute overlay needs a positioned ancestor. Only override a STATIC container, and
|
|
853
1032
|
// remember the prior inline value so removeCSSPreloader can restore it (an inline `relative`
|
|
@@ -856,41 +1035,18 @@ function createCSSPreloader(container, config) {
|
|
|
856
1035
|
container.style.position = container.style.position || 'relative';
|
|
857
1036
|
container.appendChild(styleEl);
|
|
858
1037
|
container.appendChild(overlay);
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
// Custom HTML mode — no logo SVG, lifecycle API becomes mostly inert.
|
|
863
|
-
// We still record state so removeCSSPreloader works.
|
|
864
|
-
state = {
|
|
865
|
-
container,
|
|
866
|
-
prevPosition,
|
|
867
|
-
overlay,
|
|
868
|
-
styleEl,
|
|
869
|
-
rectEl: null,
|
|
870
|
-
textEl: null,
|
|
871
|
-
showPercentage: false,
|
|
872
|
-
tapToStart: config?.tapToStart !== false,
|
|
873
|
-
tapToStartText: config?.tapToStartText ?? 'TAP TO START',
|
|
874
|
-
driven: false,
|
|
875
|
-
tapState: 'idle',
|
|
876
|
-
tapPromise: null,
|
|
877
|
-
tapResolve: null,
|
|
878
|
-
tapHandler: null,
|
|
879
|
-
removed: false,
|
|
880
|
-
};
|
|
881
|
-
return;
|
|
882
|
-
}
|
|
1038
|
+
// Custom HTML bypasses the variant's content, so there is no progress target
|
|
1039
|
+
// to bind to and the handle stays null (lifecycle API becomes inert).
|
|
1040
|
+
const handle = customHTML ? null : variant.mount(overlay, config);
|
|
883
1041
|
state = {
|
|
884
1042
|
container,
|
|
885
1043
|
prevPosition,
|
|
886
1044
|
overlay,
|
|
887
1045
|
styleEl,
|
|
888
|
-
|
|
889
|
-
textEl,
|
|
1046
|
+
handle,
|
|
890
1047
|
showPercentage: config?.showPercentage === true,
|
|
891
1048
|
tapToStart: config?.tapToStart !== false,
|
|
892
1049
|
tapToStartText: config?.tapToStartText ?? 'TAP TO START',
|
|
893
|
-
driven: false,
|
|
894
1050
|
tapState: 'idle',
|
|
895
1051
|
tapPromise: null,
|
|
896
1052
|
tapResolve: null,
|
|
@@ -903,17 +1059,9 @@ function setCSSPreloaderProgress(progress) {
|
|
|
903
1059
|
return;
|
|
904
1060
|
if (state.tapState === 'waiting' || state.tapState === 'resolved')
|
|
905
1061
|
return;
|
|
906
|
-
if (!state.
|
|
1062
|
+
if (!state.handle)
|
|
907
1063
|
return;
|
|
908
|
-
|
|
909
|
-
if (!state.driven) {
|
|
910
|
-
state.rectEl.classList.add('driven');
|
|
911
|
-
state.driven = true;
|
|
912
|
-
}
|
|
913
|
-
state.rectEl.setAttribute('width', String(p * LOADER_BAR_MAX_WIDTH));
|
|
914
|
-
if (state.showPercentage && state.textEl) {
|
|
915
|
-
state.textEl.textContent = `${Math.round(p * 100)}%`;
|
|
916
|
-
}
|
|
1064
|
+
state.handle.setProgress(clampProgress(progress), state.showPercentage);
|
|
917
1065
|
}
|
|
918
1066
|
function waitCSSPreloaderTap() {
|
|
919
1067
|
if (!state) {
|
|
@@ -925,10 +1073,7 @@ function waitCSSPreloaderTap() {
|
|
|
925
1073
|
return Promise.resolve();
|
|
926
1074
|
if (state.tapPromise)
|
|
927
1075
|
return state.tapPromise;
|
|
928
|
-
|
|
929
|
-
state.textEl.textContent = state.tapToStartText;
|
|
930
|
-
state.textEl.classList.add('ge-svg-pulse');
|
|
931
|
-
}
|
|
1076
|
+
state.handle?.showTapText(state.tapToStartText);
|
|
932
1077
|
state.overlay.style.cursor = 'pointer';
|
|
933
1078
|
state.tapState = 'waiting';
|
|
934
1079
|
state.tapPromise = new Promise((resolve) => {
|
|
@@ -982,6 +1127,221 @@ function removeCSSPreloader(_container) {
|
|
|
982
1127
|
});
|
|
983
1128
|
}
|
|
984
1129
|
|
|
1130
|
+
// Bet key detection: bet-up needs Shift for arrow/equal, NumpadAdd is bare; same logic for down.
|
|
1131
|
+
// Exported so overlays with their own bet stepper (Buy bonus) honour the SAME keys as the bar.
|
|
1132
|
+
function betDir(e) {
|
|
1133
|
+
if (e.code === 'ArrowUp' && e.shiftKey)
|
|
1134
|
+
return 1;
|
|
1135
|
+
if (e.code === 'Equal' && e.shiftKey)
|
|
1136
|
+
return 1;
|
|
1137
|
+
if (e.code === 'NumpadAdd')
|
|
1138
|
+
return 1;
|
|
1139
|
+
if (e.code === 'ArrowDown' && e.shiftKey)
|
|
1140
|
+
return -1;
|
|
1141
|
+
if (e.code === 'Minus' && e.shiftKey)
|
|
1142
|
+
return -1;
|
|
1143
|
+
if (e.code === 'NumpadSubtract')
|
|
1144
|
+
return -1;
|
|
1145
|
+
return null;
|
|
1146
|
+
}
|
|
1147
|
+
class KeyboardController {
|
|
1148
|
+
host;
|
|
1149
|
+
doc;
|
|
1150
|
+
spaceHeld = false;
|
|
1151
|
+
holdTimer = null;
|
|
1152
|
+
// Bet hold-repeat state
|
|
1153
|
+
betHeldCode = null;
|
|
1154
|
+
betTimer = null;
|
|
1155
|
+
constructor(host, doc) {
|
|
1156
|
+
this.host = host;
|
|
1157
|
+
this.doc = doc ?? (typeof document !== 'undefined' ? document : null);
|
|
1158
|
+
}
|
|
1159
|
+
isSpinAllowed() {
|
|
1160
|
+
const h = this.host;
|
|
1161
|
+
const s = h.state;
|
|
1162
|
+
return (h.spacebarEnabled &&
|
|
1163
|
+
h.hotkeysEnabled &&
|
|
1164
|
+
!h.hasOpenLayer() &&
|
|
1165
|
+
s.mode === 'base' &&
|
|
1166
|
+
!s.autoplay.active);
|
|
1167
|
+
}
|
|
1168
|
+
isBetAllowed() {
|
|
1169
|
+
const h = this.host;
|
|
1170
|
+
const s = h.state;
|
|
1171
|
+
return (h.hotkeysEnabled &&
|
|
1172
|
+
!h.hasOpenLayer() &&
|
|
1173
|
+
s.mode === 'base' &&
|
|
1174
|
+
!s.busy);
|
|
1175
|
+
}
|
|
1176
|
+
clearBetTimer() {
|
|
1177
|
+
if (this.betTimer !== null) {
|
|
1178
|
+
clearTimeout(this.betTimer);
|
|
1179
|
+
this.betTimer = null;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
startBetRepeat(dir, elapsed) {
|
|
1183
|
+
// elapsed is ms already spent holding; use it to accelerate toward 45ms floor.
|
|
1184
|
+
// Start at 90ms, decrease ~1ms per 10ms held after the first repeat, floor at 45ms.
|
|
1185
|
+
const interval = Math.max(45, 90 - Math.floor(elapsed / 10));
|
|
1186
|
+
this.betTimer = setTimeout(() => {
|
|
1187
|
+
this.betTimer = null;
|
|
1188
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
1189
|
+
this.host.stepBet(dir);
|
|
1190
|
+
this.startBetRepeat(dir, elapsed + interval);
|
|
1191
|
+
}
|
|
1192
|
+
}, interval);
|
|
1193
|
+
}
|
|
1194
|
+
onKeyDown = (e) => {
|
|
1195
|
+
const target = e.target;
|
|
1196
|
+
// Editable element guard — never intercept keyboard input
|
|
1197
|
+
if (target && (target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName)))
|
|
1198
|
+
return;
|
|
1199
|
+
// For Space: claim preventDefault early (before layer/mode/busy bail) so the browser's
|
|
1200
|
+
// native "Space activates focused button" can't re-fire a shell control and flicker a modal.
|
|
1201
|
+
if (e.code === 'Space' && !e.repeat) {
|
|
1202
|
+
if (!this.host.spacebarEnabled || !this.host.hotkeysEnabled)
|
|
1203
|
+
return;
|
|
1204
|
+
e.preventDefault();
|
|
1205
|
+
if (this.host.hasOpenLayer()) {
|
|
1206
|
+
this.host.routeToLayer(e);
|
|
1207
|
+
return;
|
|
1208
|
+
}
|
|
1209
|
+
const s = this.host.state;
|
|
1210
|
+
if (s.mode !== 'base' || s.busy || s.autoplay.active)
|
|
1211
|
+
return;
|
|
1212
|
+
this.spaceHeld = true;
|
|
1213
|
+
this.host.spin();
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
// Bet step keys (Shift+arrows, Shift+=/-, NumpadAdd/Subtract) — non-repeat only
|
|
1217
|
+
if (!e.repeat) {
|
|
1218
|
+
const dir = betDir(e);
|
|
1219
|
+
if (dir !== null && this.isBetAllowed()) {
|
|
1220
|
+
this.betHeldCode = e.code;
|
|
1221
|
+
this.host.stepBet(dir);
|
|
1222
|
+
// First repeat after 350ms initial delay
|
|
1223
|
+
this.clearBetTimer();
|
|
1224
|
+
const capturedDir = dir;
|
|
1225
|
+
this.betTimer = setTimeout(() => {
|
|
1226
|
+
this.betTimer = null;
|
|
1227
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
1228
|
+
this.host.stepBet(capturedDir);
|
|
1229
|
+
this.startBetRepeat(capturedDir, 350);
|
|
1230
|
+
}
|
|
1231
|
+
}, 350);
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
// Non-Space keys: give the open layer first refusal. If it consumes the key, done; Escape closes
|
|
1236
|
+
// it. Anything the layer does NOT consume falls through to the chrome hotkeys below — so the
|
|
1237
|
+
// Settings/Info pages still honour Shift+I (Game info), Shift+M (sound), Shift+S, etc.
|
|
1238
|
+
if (this.host.hasOpenLayer()) {
|
|
1239
|
+
const consumed = this.host.routeToLayer(e);
|
|
1240
|
+
if (consumed)
|
|
1241
|
+
return;
|
|
1242
|
+
if (e.code === 'Escape') {
|
|
1243
|
+
this.host.closeLayer();
|
|
1244
|
+
return;
|
|
1245
|
+
}
|
|
1246
|
+
// not consumed → fall through to the Shift+letter chrome hotkeys
|
|
1247
|
+
}
|
|
1248
|
+
// Shift+letter bar hotkeys — fire when no layer is open, OR when an open layer left the key
|
|
1249
|
+
// unconsumed (see fall-through above); gated on hotkeys being enabled.
|
|
1250
|
+
if (!e.repeat && e.shiftKey && this.host.hotkeysEnabled) {
|
|
1251
|
+
const h = this.host;
|
|
1252
|
+
const s = h.state;
|
|
1253
|
+
switch (e.code) {
|
|
1254
|
+
case 'KeyA':
|
|
1255
|
+
if (h.autoplayEnabled && !s.replay) {
|
|
1256
|
+
h.toggleAutoplay();
|
|
1257
|
+
return;
|
|
1258
|
+
}
|
|
1259
|
+
break;
|
|
1260
|
+
case 'KeyT':
|
|
1261
|
+
if (h.turboLevels > 0 && !s.replay) {
|
|
1262
|
+
h.cycleTurbo();
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
break;
|
|
1266
|
+
case 'KeyB':
|
|
1267
|
+
if (h.buyBonusEnabled && s.mode === 'base' && !s.replay) {
|
|
1268
|
+
h.openBuyBonus();
|
|
1269
|
+
return;
|
|
1270
|
+
}
|
|
1271
|
+
break;
|
|
1272
|
+
case 'KeyI':
|
|
1273
|
+
h.openInfo();
|
|
1274
|
+
return;
|
|
1275
|
+
case 'KeyS':
|
|
1276
|
+
h.openMenu();
|
|
1277
|
+
return;
|
|
1278
|
+
case 'KeyM':
|
|
1279
|
+
h.toggleMute();
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
};
|
|
1284
|
+
onKeyUp = (e) => {
|
|
1285
|
+
if (e.code === 'Space') {
|
|
1286
|
+
this.spaceHeld = false;
|
|
1287
|
+
this.clearHoldTimer();
|
|
1288
|
+
}
|
|
1289
|
+
// Stop bet repeat on key release
|
|
1290
|
+
if (e.code === this.betHeldCode) {
|
|
1291
|
+
this.betHeldCode = null;
|
|
1292
|
+
this.clearBetTimer();
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
onBlur = () => {
|
|
1296
|
+
// Window blur — stop bet repeat AND hold-to-spin (same as releasing both keys)
|
|
1297
|
+
this.betHeldCode = null;
|
|
1298
|
+
this.clearBetTimer();
|
|
1299
|
+
this.spaceHeld = false;
|
|
1300
|
+
this.clearHoldTimer();
|
|
1301
|
+
};
|
|
1302
|
+
clearHoldTimer() {
|
|
1303
|
+
if (this.holdTimer !== null) {
|
|
1304
|
+
clearTimeout(this.holdTimer);
|
|
1305
|
+
this.holdTimer = null;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
attach() {
|
|
1309
|
+
this.doc.addEventListener('keydown', this.onKeyDown);
|
|
1310
|
+
this.doc.addEventListener('keyup', this.onKeyUp);
|
|
1311
|
+
// Use window if available for blur events
|
|
1312
|
+
if (typeof window !== 'undefined') {
|
|
1313
|
+
window.addEventListener('blur', this.onBlur);
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
detach() {
|
|
1317
|
+
this.doc.removeEventListener('keydown', this.onKeyDown);
|
|
1318
|
+
this.doc.removeEventListener('keyup', this.onKeyUp);
|
|
1319
|
+
if (typeof window !== 'undefined') {
|
|
1320
|
+
window.removeEventListener('blur', this.onBlur);
|
|
1321
|
+
}
|
|
1322
|
+
this.spaceHeld = false;
|
|
1323
|
+
this.clearHoldTimer();
|
|
1324
|
+
this.betHeldCode = null;
|
|
1325
|
+
this.clearBetTimer();
|
|
1326
|
+
}
|
|
1327
|
+
notifyBusyChanged(busy) {
|
|
1328
|
+
if (busy)
|
|
1329
|
+
return;
|
|
1330
|
+
if (!this.spaceHeld)
|
|
1331
|
+
return;
|
|
1332
|
+
if (!this.isSpinAllowed())
|
|
1333
|
+
return;
|
|
1334
|
+
// Schedule the next spin after the 120 ms floor (gap between completion and next spin).
|
|
1335
|
+
this.clearHoldTimer();
|
|
1336
|
+
this.holdTimer = setTimeout(() => {
|
|
1337
|
+
this.holdTimer = null;
|
|
1338
|
+
if (this.spaceHeld && this.isSpinAllowed()) {
|
|
1339
|
+
this.host.spin();
|
|
1340
|
+
}
|
|
1341
|
+
}, 120);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
|
|
985
1345
|
function createInitialState(config) {
|
|
986
1346
|
return {
|
|
987
1347
|
mode: config.mode,
|
|
@@ -1251,6 +1611,21 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
1251
1611
|
#${SHELL_ROOT_ID} .ge-gi-version { text-align:center; color:var(--shell-muted); font-size:11px;
|
|
1252
1612
|
letter-spacing:.08em; opacity:.7; margin:4px 0 2px; }
|
|
1253
1613
|
|
|
1614
|
+
/* hotkeys — keycap chips → localized action label, mirrors controls row layout */
|
|
1615
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-block { display:flex; flex-direction:column; }
|
|
1616
|
+
#${SHELL_ROOT_ID} .ge-gi-hk { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; }
|
|
1617
|
+
#${SHELL_ROOT_ID} .ge-gi-hk + .ge-gi-hk { border-top:1px solid var(--shell-plaque-line); }
|
|
1618
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chips { display:flex; align-items:center; flex-wrap:wrap; gap:4px; flex:0 0 auto; }
|
|
1619
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-combo { display:inline-flex; align-items:center; gap:4px; }
|
|
1620
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chip { display:inline-flex; align-items:center; justify-content:center;
|
|
1621
|
+
padding:2px 7px; border-radius:6px; border:1px solid var(--shell-plaque-line);
|
|
1622
|
+
background:var(--shell-plaque-dark); color:#fff;
|
|
1623
|
+
font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace; font-size:12px;
|
|
1624
|
+
font-weight:600; line-height:1.5; white-space:nowrap; min-width:1.6em; text-align:center; }
|
|
1625
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep { color:var(--shell-plaque-label); font-size:11px; padding:0 1px; }
|
|
1626
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep2 { color:var(--shell-plaque-label); font-size:11px; padding:0 4px; }
|
|
1627
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-tx { color:rgba(255,255,255,.88); font-size:14px; font-weight:600; text-align:right; flex:1; }
|
|
1628
|
+
|
|
1254
1629
|
/* controls — two blocks (gameplay / menu & info), icon/name/description per control */
|
|
1255
1630
|
#${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); }
|
|
1256
1631
|
#${SHELL_ROOT_ID} .ge-gi-ctl-block-h { color:var(--shell-plaque-label); font-size:11px; letter-spacing:.12em;
|
|
@@ -1359,6 +1734,8 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
1359
1734
|
pointer-events:auto; cursor:pointer; transition:box-shadow .12s ease, background .12s ease; }
|
|
1360
1735
|
#${SHELL_ROOT_ID} .ge-bonus-card:hover:not(.ge-bonus-off) {
|
|
1361
1736
|
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
1737
|
+
#${SHELL_ROOT_ID} .ge-bonus-card--kbd-focus:not(.ge-bonus-off) {
|
|
1738
|
+
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
1362
1739
|
/* custom card (BonusOption.custom): keep grid sizing + accent vars, drop the default chrome so the game owns the UI */
|
|
1363
1740
|
#${SHELL_ROOT_ID} .ge-bonus-card--custom { background:none; border:none; cursor:default; }
|
|
1364
1741
|
#${SHELL_ROOT_ID} .ge-bonus-body { display:flex; flex-direction:column; align-items:center; flex:1; padding:1.25em 1.1em .9em; }
|
|
@@ -1637,7 +2014,8 @@ function createCardModal(opts) {
|
|
|
1637
2014
|
}
|
|
1638
2015
|
return { root, card, body };
|
|
1639
2016
|
}
|
|
1640
|
-
/** Full-screen overlay. Returns { root, body }; append content to body.
|
|
2017
|
+
/** Full-screen overlay. Returns { root, body, scroll }; append content to body.
|
|
2018
|
+
* The `scroll` element is the scrollable container (overflow-y: auto). */
|
|
1641
2019
|
function createOverlay(opts) {
|
|
1642
2020
|
const root = document.createElement('div');
|
|
1643
2021
|
root.className = 'ge-shell-overlay';
|
|
@@ -1675,7 +2053,7 @@ function createOverlay(opts) {
|
|
|
1675
2053
|
body.className = 'ge-ov-body';
|
|
1676
2054
|
scroll.appendChild(body);
|
|
1677
2055
|
root.append(head, scroll);
|
|
1678
|
-
return { root, body };
|
|
2056
|
+
return { root, body, scroll };
|
|
1679
2057
|
}
|
|
1680
2058
|
|
|
1681
2059
|
/** A floating labelled money readout (balance/win/bet). */
|
|
@@ -1927,24 +2305,22 @@ function applyBusy(shell, bar) {
|
|
|
1927
2305
|
function openSettingsModal(shell) {
|
|
1928
2306
|
const { root, body } = createOverlay({ title: shell.t('Settings'), onClose: () => root.remove() });
|
|
1929
2307
|
root.dataset.ge = 'settings-modal';
|
|
1930
|
-
// Sound on/off
|
|
2308
|
+
// Sound on/off — backed by the shell's shared `soundOn` state so this toggle and the Shift+M
|
|
2309
|
+
// hotkey stay in sync; `setSound` emits `settingChange({ key: 'sound' })` and refreshes the icon.
|
|
1931
2310
|
const sound = (() => {
|
|
1932
|
-
let on = true;
|
|
1933
2311
|
const btn = document.createElement('button');
|
|
1934
|
-
btn.className = 'ge-snd
|
|
2312
|
+
btn.className = 'ge-snd';
|
|
1935
2313
|
btn.dataset.ge = 'setting-sound';
|
|
1936
|
-
btn.setAttribute('aria-label', 'Sound');
|
|
1937
|
-
const paint = () => {
|
|
2314
|
+
btn.setAttribute('aria-label', shell.t('Sound'));
|
|
2315
|
+
const paint = (on) => {
|
|
1938
2316
|
btn.innerHTML = icon(on ? 'soundOn' : 'soundOff');
|
|
1939
2317
|
btn.classList.toggle('ge-active', on);
|
|
1940
2318
|
btn.setAttribute('aria-pressed', String(on));
|
|
1941
2319
|
};
|
|
1942
|
-
paint();
|
|
1943
|
-
btn.addEventListener('click', () =>
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
shell.emit('settingChange', { key: 'sound', value: on });
|
|
1947
|
-
});
|
|
2320
|
+
paint(shell.soundOn);
|
|
2321
|
+
btn.addEventListener('click', () => shell.setSound(!shell.soundOn));
|
|
2322
|
+
// Live-update the icon when sound changes from here OR via Shift+M (shell clears on close).
|
|
2323
|
+
shell.setSoundRefresh(paint);
|
|
1948
2324
|
const row = document.createElement('div');
|
|
1949
2325
|
row.className = 'ge-ov-row';
|
|
1950
2326
|
row.innerHTML = `<span class="ge-grow">${shell.t('Sound')}</span>`;
|
|
@@ -1994,17 +2370,25 @@ function openSettingsModal(shell) {
|
|
|
1994
2370
|
|
|
1995
2371
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1996
2372
|
/** The @energy8platform/platform-core package version, stamped at build time. */
|
|
1997
|
-
const PACKAGE_VERSION = '0.
|
|
2373
|
+
const PACKAGE_VERSION = '0.26.0';
|
|
1998
2374
|
|
|
2375
|
+
/** Default order key for the auto-injected hotkeys section: just after `controls` (-1). */
|
|
2376
|
+
const HOTKEYS_DEFAULT_ORDER = -0.5;
|
|
1999
2377
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
2000
2378
|
function openGameInfoModal(shell) {
|
|
2001
|
-
const { root, body } = createOverlay({
|
|
2379
|
+
const { root, body, scroll } = createOverlay({
|
|
2002
2380
|
title: shell.t('Game info'),
|
|
2003
2381
|
onClose: () => root.remove(),
|
|
2004
2382
|
onBack: () => { root.remove(); shell.openSettings(); },
|
|
2005
2383
|
});
|
|
2006
2384
|
root.dataset.ge = 'info-modal';
|
|
2007
|
-
const
|
|
2385
|
+
const rawSections = shell.config.gameInfo.sections ?? [];
|
|
2386
|
+
// Auto-inject a hotkeys section unless the game already provides one or features.hotkeys === false.
|
|
2387
|
+
const sectionsWithHotkeys = [...rawSections];
|
|
2388
|
+
if (shell.config.features.hotkeys !== false && !rawSections.some((s) => s.type === 'hotkeys')) {
|
|
2389
|
+
sectionsWithHotkeys.push({ type: 'hotkeys', order: HOTKEYS_DEFAULT_ORDER });
|
|
2390
|
+
}
|
|
2391
|
+
const sections = sectionsWithHotkeys;
|
|
2008
2392
|
// Default placement: modes first, controls second, the rest in declaration order.
|
|
2009
2393
|
// An explicit `order` overrides; ties keep declaration order (stable).
|
|
2010
2394
|
const base = (s, i) => s.order ?? (s.type === 'modes' ? -2 : s.type === 'controls' ? -1 : i);
|
|
@@ -2013,7 +2397,40 @@ function openGameInfoModal(shell) {
|
|
|
2013
2397
|
.sort((a, b) => a.k - b.k || a.i - b.i)
|
|
2014
2398
|
.forEach(({ s }) => body.appendChild(renderSection(shell, s)));
|
|
2015
2399
|
body.appendChild(versionFooter(shell));
|
|
2016
|
-
|
|
2400
|
+
const LINE = 60;
|
|
2401
|
+
const PAGE = () => Math.floor(scroll.clientHeight * 0.9) || Math.floor(540 * 0.9);
|
|
2402
|
+
const onKey = (e) => {
|
|
2403
|
+
switch (e.code) {
|
|
2404
|
+
case 'ArrowDown':
|
|
2405
|
+
scroll.scrollTop += LINE;
|
|
2406
|
+
return true;
|
|
2407
|
+
case 'ArrowUp':
|
|
2408
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - LINE);
|
|
2409
|
+
return true;
|
|
2410
|
+
case 'PageDown':
|
|
2411
|
+
scroll.scrollTop += PAGE();
|
|
2412
|
+
return true;
|
|
2413
|
+
case 'PageUp':
|
|
2414
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
2415
|
+
return true;
|
|
2416
|
+
case 'Space':
|
|
2417
|
+
if (e.shiftKey) {
|
|
2418
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
2419
|
+
}
|
|
2420
|
+
else {
|
|
2421
|
+
scroll.scrollTop += PAGE();
|
|
2422
|
+
}
|
|
2423
|
+
return true;
|
|
2424
|
+
case 'Home':
|
|
2425
|
+
scroll.scrollTop = 0;
|
|
2426
|
+
return true;
|
|
2427
|
+
case 'End':
|
|
2428
|
+
scroll.scrollTop = scroll.scrollHeight - scroll.clientHeight;
|
|
2429
|
+
return true;
|
|
2430
|
+
default: return false;
|
|
2431
|
+
}
|
|
2432
|
+
};
|
|
2433
|
+
return { root, onKey };
|
|
2017
2434
|
}
|
|
2018
2435
|
/** A muted version stamp pinned to the bottom of the game-info modal:
|
|
2019
2436
|
* `${config.version ?? '1.0.0'}.${engine version without dots}` (e.g. '1.0.0.0246'). */
|
|
@@ -2029,9 +2446,11 @@ function renderSection(shell, s) {
|
|
|
2029
2446
|
switch (s.type) {
|
|
2030
2447
|
case 'modes': return sectionModes(shell, s.modes, sec('info-modes', s.title, shell.t('Modes')));
|
|
2031
2448
|
case 'controls': return sectionControls(shell, sec('info-controls', s.title, shell.t('Controls')));
|
|
2449
|
+
case 'hotkeys': return sectionHotkeys(shell, sec('info-hotkeys', s.title, shell.t('Hotkeys')));
|
|
2032
2450
|
case 'paytable': return sectionPaytable(s.rows, sec('info-paytable', s.title, shell.t('Paytable')));
|
|
2033
2451
|
case 'wins': return sectionWins(s, sec('info-wins', s.title, shell.t(winFallbackTitle(s.kind))));
|
|
2034
|
-
|
|
2452
|
+
// Translate the heading (e.g. the host-built DISCLAIMER title); the body stays verbatim.
|
|
2453
|
+
case 'custom': return sectionCustom(s, sec('info-custom', s.title != null ? shell.t(s.title) : undefined, ''));
|
|
2035
2454
|
}
|
|
2036
2455
|
}
|
|
2037
2456
|
/** A titled glass-plaque section shell. */
|
|
@@ -2113,6 +2532,57 @@ function ctlBlock(shell, label, rows) {
|
|
|
2113
2532
|
}
|
|
2114
2533
|
return block;
|
|
2115
2534
|
}
|
|
2535
|
+
function sectionHotkeys(shell, el) {
|
|
2536
|
+
const { features } = shell.config;
|
|
2537
|
+
/** Render one or more key names as keycap chips joined by " / ". */
|
|
2538
|
+
const chips = (...keys) => keys.map((k) => `<span class="ge-gi-hk-chip">${k}</span>`).join('<span class="ge-gi-hk-sep"> / </span>');
|
|
2539
|
+
const rows = [
|
|
2540
|
+
{ chips: ['Space'], name: 'Spin', on: true },
|
|
2541
|
+
{ chips: ['Shift', '↑', 'Shift', '='], name: 'Raise bet', on: true },
|
|
2542
|
+
{ chips: ['Shift', '↓', 'Shift', '-'], name: 'Lower bet', on: true },
|
|
2543
|
+
{ chips: ['Shift', 'A'], name: 'Autoplay', on: features.autoplay != null },
|
|
2544
|
+
{ chips: ['Shift', 'T'], name: 'Turbo', on: features.turbo > 0 },
|
|
2545
|
+
{ chips: ['Shift', 'B'], name: 'Buy bonus', on: features.buyBonus !== false },
|
|
2546
|
+
{ chips: ['Shift', 'I'], name: 'Game info', on: true },
|
|
2547
|
+
{ chips: ['Shift', 'S'], name: 'Menu', on: true },
|
|
2548
|
+
{ chips: ['Shift', 'M'], name: 'Mute', on: true },
|
|
2549
|
+
{ chips: ['←', '→'], name: 'Navigate', on: true },
|
|
2550
|
+
{ chips: ['Enter'], name: 'Confirm', on: true },
|
|
2551
|
+
{ chips: ['Esc'], name: 'Close', on: true },
|
|
2552
|
+
];
|
|
2553
|
+
const block = document.createElement('div');
|
|
2554
|
+
block.className = 'ge-gi-hk-block';
|
|
2555
|
+
for (const r of rows.filter((x) => x.on)) {
|
|
2556
|
+
const row = document.createElement('div');
|
|
2557
|
+
row.className = 'ge-gi-hk';
|
|
2558
|
+
// Build the chips column
|
|
2559
|
+
const chipsEl = document.createElement('div');
|
|
2560
|
+
chipsEl.className = 'ge-gi-hk-chips';
|
|
2561
|
+
if (r.name === 'Raise bet' || r.name === 'Lower bet') {
|
|
2562
|
+
// Two combos separated by " / ": Shift+↑ / Shift+= and Shift+↓ / Shift+-
|
|
2563
|
+
const [k1, k2, k3, k4] = r.chips;
|
|
2564
|
+
chipsEl.innerHTML =
|
|
2565
|
+
`<span class="ge-gi-hk-combo">${chips(k1, k2)}</span>` +
|
|
2566
|
+
`<span class="ge-gi-hk-sep2"> / </span>` +
|
|
2567
|
+
`<span class="ge-gi-hk-combo">${chips(k3, k4)}</span>`;
|
|
2568
|
+
}
|
|
2569
|
+
else if (r.chips.length > 1) {
|
|
2570
|
+
// Chord: Shift + X
|
|
2571
|
+
chipsEl.innerHTML = `<span class="ge-gi-hk-combo">${chips(...r.chips)}</span>`;
|
|
2572
|
+
}
|
|
2573
|
+
else {
|
|
2574
|
+
chipsEl.innerHTML = chips(...r.chips);
|
|
2575
|
+
}
|
|
2576
|
+
const tx = document.createElement('div');
|
|
2577
|
+
tx.className = 'ge-gi-hk-tx';
|
|
2578
|
+
tx.textContent = shell.t(r.name);
|
|
2579
|
+
row.appendChild(chipsEl);
|
|
2580
|
+
row.appendChild(tx);
|
|
2581
|
+
block.appendChild(row);
|
|
2582
|
+
}
|
|
2583
|
+
el.appendChild(block);
|
|
2584
|
+
return el;
|
|
2585
|
+
}
|
|
2116
2586
|
// ── paytable (cards — image on top, name, then win tiers "<count> x<mult>") ────
|
|
2117
2587
|
function sectionPaytable(rows, el) {
|
|
2118
2588
|
const grid = document.createElement('div');
|
|
@@ -2311,25 +2781,165 @@ function sectionCustom(s, el) {
|
|
|
2311
2781
|
return el;
|
|
2312
2782
|
}
|
|
2313
2783
|
|
|
2314
|
-
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
2784
|
+
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
2785
|
+
* Returns the overlay element + a keyboard handler for the shell's `showModal`. */
|
|
2315
2786
|
function openBuyBonusOverlay(shell) {
|
|
2316
2787
|
const bonuses = shell.config.features.buyBonus;
|
|
2317
2788
|
if (bonuses === false || bonuses.length === 0)
|
|
2318
2789
|
return null;
|
|
2319
|
-
const
|
|
2790
|
+
const st = { focusIndex: -1, confirmBonus: undefined };
|
|
2791
|
+
const { root, body } = createOverlay({ title: shell.t('Buy bonus'), onClose: () => shell.closeModal() });
|
|
2320
2792
|
root.dataset.ge = 'buybonus-overlay';
|
|
2321
2793
|
// Re-render the grid whenever the bet changes so every card's price stays live.
|
|
2322
2794
|
const renderGrid = () => {
|
|
2323
2795
|
body.innerHTML = '';
|
|
2324
2796
|
const grid = document.createElement('div');
|
|
2325
2797
|
grid.className = 'ge-bb-grid';
|
|
2326
|
-
|
|
2327
|
-
|
|
2798
|
+
const affordable = [];
|
|
2799
|
+
for (const bonus of bonuses) {
|
|
2800
|
+
const card = buildCard(shell, bonus, root, st);
|
|
2801
|
+
grid.appendChild(card);
|
|
2802
|
+
if (isAffordable(shell, bonus))
|
|
2803
|
+
affordable.push(bonus);
|
|
2804
|
+
}
|
|
2328
2805
|
body.appendChild(grid);
|
|
2806
|
+
// Initialize or restore focus index
|
|
2807
|
+
if (affordable.length > 0) {
|
|
2808
|
+
if (st.focusIndex < 0)
|
|
2809
|
+
st.focusIndex = 0;
|
|
2810
|
+
else
|
|
2811
|
+
st.focusIndex = Math.min(st.focusIndex, affordable.length - 1);
|
|
2812
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
2813
|
+
}
|
|
2814
|
+
else {
|
|
2815
|
+
st.focusIndex = -1;
|
|
2816
|
+
}
|
|
2329
2817
|
};
|
|
2330
2818
|
renderGrid();
|
|
2331
2819
|
root.appendChild(buildBetBar(shell, renderGrid)); // thin bottom footer, only as tall as the pill
|
|
2332
|
-
|
|
2820
|
+
/** Step the bet by `dir` and re-render the grid (live prices + affordability) when it changed.
|
|
2821
|
+
* Shared by the keyboard bet keys (the footer ± buttons keep their own copy). */
|
|
2822
|
+
const stepBetBy = (dir) => {
|
|
2823
|
+
const next = stepBet(shell.state, dir);
|
|
2824
|
+
if (next === shell.state.bet)
|
|
2825
|
+
return;
|
|
2826
|
+
shell.state.bet = next;
|
|
2827
|
+
shell.emit('betChange', next);
|
|
2828
|
+
shell.render();
|
|
2829
|
+
renderGrid();
|
|
2830
|
+
};
|
|
2831
|
+
/** Keyboard handler for both browse and confirm phases. */
|
|
2832
|
+
const onKey = (e) => {
|
|
2833
|
+
const affordable = bonuses.filter((b) => isAffordable(shell, b));
|
|
2834
|
+
// ── Confirm phase ──
|
|
2835
|
+
if (st.confirmBonus) {
|
|
2836
|
+
switch (e.code) {
|
|
2837
|
+
case 'Enter':
|
|
2838
|
+
case 'Space': {
|
|
2839
|
+
const bonus = st.confirmBonus;
|
|
2840
|
+
if (!isAffordable(shell, bonus))
|
|
2841
|
+
return true;
|
|
2842
|
+
if (bonus.type === 'feature')
|
|
2843
|
+
shell.activateFeature(bonus);
|
|
2844
|
+
else
|
|
2845
|
+
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
2846
|
+
shell.closeModal();
|
|
2847
|
+
return true;
|
|
2848
|
+
}
|
|
2849
|
+
case 'Escape':
|
|
2850
|
+
// Remove the confirm dialog, return to browse
|
|
2851
|
+
closeConfirm(root, st);
|
|
2852
|
+
return true;
|
|
2853
|
+
default:
|
|
2854
|
+
return false;
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
// ── Browse phase ──
|
|
2858
|
+
const last = affordable.length - 1;
|
|
2859
|
+
const mobile = shell.layout === 'mobile';
|
|
2860
|
+
// Bet stepping mirrors the bar's keys (Shift+↑/↓, Shift+=/-, Numpad ±). Checked BEFORE arrow
|
|
2861
|
+
// navigation so a bare arrow still moves card focus while a Shift+arrow changes the bet.
|
|
2862
|
+
const bet = betDir(e);
|
|
2863
|
+
if (bet !== null) {
|
|
2864
|
+
stepBetBy(bet);
|
|
2865
|
+
return true;
|
|
2866
|
+
}
|
|
2867
|
+
// Determine navigation direction from key code + layout (mobile uses vertical arrows)
|
|
2868
|
+
const fwdKey = e.code === 'ArrowRight' || (mobile && e.code === 'ArrowDown');
|
|
2869
|
+
const bwdKey = e.code === 'ArrowLeft' || (mobile && e.code === 'ArrowUp');
|
|
2870
|
+
if (fwdKey) {
|
|
2871
|
+
if (last < 0)
|
|
2872
|
+
return true;
|
|
2873
|
+
if (st.focusIndex < last) {
|
|
2874
|
+
st.focusIndex++;
|
|
2875
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
2876
|
+
}
|
|
2877
|
+
return true;
|
|
2878
|
+
}
|
|
2879
|
+
if (bwdKey) {
|
|
2880
|
+
if (last < 0)
|
|
2881
|
+
return true;
|
|
2882
|
+
if (st.focusIndex > 0) {
|
|
2883
|
+
st.focusIndex--;
|
|
2884
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
2885
|
+
}
|
|
2886
|
+
return true;
|
|
2887
|
+
}
|
|
2888
|
+
switch (e.code) {
|
|
2889
|
+
case 'Enter':
|
|
2890
|
+
case 'Space':
|
|
2891
|
+
if (last < 0 || st.focusIndex < 0)
|
|
2892
|
+
return true;
|
|
2893
|
+
{
|
|
2894
|
+
const bonus = affordable[st.focusIndex];
|
|
2895
|
+
openConfirm(shell, bonus, root, st);
|
|
2896
|
+
}
|
|
2897
|
+
return true;
|
|
2898
|
+
// Bare =/- also step the bet (the Shift+=/- and Numpad variants are handled by betDir above).
|
|
2899
|
+
case 'Equal':
|
|
2900
|
+
stepBetBy(1);
|
|
2901
|
+
return true;
|
|
2902
|
+
case 'Minus':
|
|
2903
|
+
stepBetBy(-1);
|
|
2904
|
+
return true;
|
|
2905
|
+
case 'Escape':
|
|
2906
|
+
shell.closeModal();
|
|
2907
|
+
return true;
|
|
2908
|
+
default:
|
|
2909
|
+
return false;
|
|
2910
|
+
}
|
|
2911
|
+
};
|
|
2912
|
+
return { root, onKey };
|
|
2913
|
+
}
|
|
2914
|
+
/** Apply a CSS keyboard-focus class to the currently focused affordable card. */
|
|
2915
|
+
function applyFocusClass(overlay, bonuses, affordable, focusIndex) {
|
|
2916
|
+
for (const b of bonuses) {
|
|
2917
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${b.id}"]`);
|
|
2918
|
+
if (!card)
|
|
2919
|
+
continue;
|
|
2920
|
+
card.classList.remove('ge-bonus-card--kbd-focus');
|
|
2921
|
+
}
|
|
2922
|
+
const focused = affordable[focusIndex];
|
|
2923
|
+
if (!focused)
|
|
2924
|
+
return;
|
|
2925
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${focused.id}"]`);
|
|
2926
|
+
if (card)
|
|
2927
|
+
card.classList.add('ge-bonus-card--kbd-focus');
|
|
2928
|
+
}
|
|
2929
|
+
/** Open the confirm dialog for the given bonus and track it in overlay state. */
|
|
2930
|
+
function openConfirm(shell, bonus, overlay, st) {
|
|
2931
|
+
closeConfirm(overlay, st); // remove any existing confirm
|
|
2932
|
+
st.confirmBonus = bonus;
|
|
2933
|
+
overlay.appendChild(buildConfirm(shell, bonus, overlay, st));
|
|
2934
|
+
shell.fitModals();
|
|
2935
|
+
}
|
|
2936
|
+
/** Remove the confirm dialog and clear the overlay state. */
|
|
2937
|
+
function closeConfirm(overlay, st) {
|
|
2938
|
+
// The confirm dialog is a .ge-sheet with data-ge="bonus-confirm" appended directly to overlay.
|
|
2939
|
+
const sheet = overlay.querySelector('[data-ge="bonus-confirm"]');
|
|
2940
|
+
if (sheet)
|
|
2941
|
+
sheet.remove();
|
|
2942
|
+
st.confirmBonus = undefined;
|
|
2333
2943
|
}
|
|
2334
2944
|
/** Bet control — a compact −/+ pill around the live stake, in a thin footer at the screen bottom.
|
|
2335
2945
|
* Stepping repaints the value, re-prices the cards, and updates the control bar. */
|
|
@@ -2376,7 +2986,7 @@ function stepButton(ge, name) {
|
|
|
2376
2986
|
}
|
|
2377
2987
|
/** A grid card: title → thumbnail → description → volatility → price → full-bleed CTA.
|
|
2378
2988
|
* Clicking (when affordable) opens the confirmation modal. */
|
|
2379
|
-
function buildCard(shell, bonus, overlay) {
|
|
2989
|
+
function buildCard(shell, bonus, overlay, st) {
|
|
2380
2990
|
const accent = effectiveAccent(bonus);
|
|
2381
2991
|
const card = document.createElement('div');
|
|
2382
2992
|
card.className = 'ge-bonus-card';
|
|
@@ -2389,8 +2999,7 @@ function buildCard(shell, bonus, overlay) {
|
|
|
2389
2999
|
const select = () => {
|
|
2390
3000
|
if (!isAffordable(shell, bonus))
|
|
2391
3001
|
return;
|
|
2392
|
-
|
|
2393
|
-
shell.fitModals();
|
|
3002
|
+
openConfirm(shell, bonus, overlay, st);
|
|
2394
3003
|
};
|
|
2395
3004
|
// Game-supplied card UI: the shell keeps the wrapper (grid sizing + accent vars) and runs the
|
|
2396
3005
|
// buy flow when the game calls ctx.select(); the game owns everything inside.
|
|
@@ -2435,9 +3044,9 @@ function cardBody(shell, bonus) {
|
|
|
2435
3044
|
}
|
|
2436
3045
|
/** Confirmation modal — the shared card chrome (accent title heading, no ✕) with a bonus
|
|
2437
3046
|
* preview body and a full-bleed Cancel + action footer. */
|
|
2438
|
-
function buildConfirm(shell, bonus, overlay) {
|
|
3047
|
+
function buildConfirm(shell, bonus, overlay, st) {
|
|
2439
3048
|
const accent = effectiveAccent(bonus);
|
|
2440
|
-
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () =>
|
|
3049
|
+
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () => { closeConfirm(overlay, st); } });
|
|
2441
3050
|
const price = bonus.priceMultiplier * shell.state.bet;
|
|
2442
3051
|
const preview = document.createElement('div');
|
|
2443
3052
|
preview.className = 'ge-confirm-preview';
|
|
@@ -2453,7 +3062,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
2453
3062
|
cancel.className = 'ge-modal-btn ge-modal-btn--ghost';
|
|
2454
3063
|
cancel.dataset.ge = 'bonus-confirm-cancel';
|
|
2455
3064
|
cancel.textContent = shell.t('Cancel');
|
|
2456
|
-
cancel.addEventListener('click', () =>
|
|
3065
|
+
cancel.addEventListener('click', () => closeConfirm(overlay, st));
|
|
2457
3066
|
const buy = document.createElement('button');
|
|
2458
3067
|
buy.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
2459
3068
|
buy.dataset.ge = 'bonus-confirm-buy';
|
|
@@ -2468,8 +3077,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
2468
3077
|
shell.activateFeature(bonus);
|
|
2469
3078
|
else
|
|
2470
3079
|
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
2471
|
-
|
|
2472
|
-
overlay.remove();
|
|
3080
|
+
shell.closeModal();
|
|
2473
3081
|
});
|
|
2474
3082
|
actions.append(cancel, buy);
|
|
2475
3083
|
ui.card.appendChild(actions);
|
|
@@ -2498,36 +3106,79 @@ function isAffordable(shell, bonus) {
|
|
|
2498
3106
|
|
|
2499
3107
|
/** A centred picker (chips grid + accent Confirm) on the shared card modal. */
|
|
2500
3108
|
function buildSheet(opts) {
|
|
2501
|
-
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () =>
|
|
3109
|
+
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () => opts.onClose() });
|
|
2502
3110
|
const grid = document.createElement('div');
|
|
2503
3111
|
grid.className = 'ge-sheet-grid';
|
|
2504
3112
|
const cols = typeof opts.columns === 'number' ? { wide: opts.columns, mobile: opts.columns } : opts.columns;
|
|
2505
3113
|
grid.style.setProperty('--cols', String(cols.wide));
|
|
2506
3114
|
grid.style.setProperty('--cols-m', String(cols.mobile));
|
|
2507
3115
|
let selected = opts.selected;
|
|
3116
|
+
let focusIndex = opts.choices.findIndex((c) => c.id === selected);
|
|
3117
|
+
if (focusIndex < 0)
|
|
3118
|
+
focusIndex = 0;
|
|
2508
3119
|
const chips = [];
|
|
2509
|
-
|
|
3120
|
+
/** Update chip visuals to reflect the current selected/focused index. */
|
|
3121
|
+
function setHighlight(newIndex) {
|
|
3122
|
+
focusIndex = newIndex;
|
|
3123
|
+
selected = opts.choices[focusIndex].id;
|
|
3124
|
+
for (let i = 0; i < chips.length; i++) {
|
|
3125
|
+
chips[i].classList.toggle('ge-on', i === focusIndex);
|
|
3126
|
+
}
|
|
3127
|
+
}
|
|
3128
|
+
for (let i = 0; i < opts.choices.length; i++) {
|
|
3129
|
+
const c = opts.choices[i];
|
|
2510
3130
|
const chip = document.createElement('button');
|
|
2511
|
-
chip.className = 'ge-chip' + (
|
|
3131
|
+
chip.className = 'ge-chip' + (i === focusIndex ? ' ge-on' : '');
|
|
2512
3132
|
chip.dataset.id = c.id;
|
|
2513
3133
|
chip.textContent = c.label;
|
|
3134
|
+
const idx = i; // capture for closure
|
|
2514
3135
|
chip.addEventListener('click', () => {
|
|
2515
|
-
|
|
2516
|
-
for (const x of chips)
|
|
2517
|
-
x.classList.toggle('ge-on', x.dataset.id === selected);
|
|
3136
|
+
setHighlight(idx);
|
|
2518
3137
|
});
|
|
2519
3138
|
chips.push(chip);
|
|
2520
3139
|
grid.appendChild(chip);
|
|
2521
3140
|
}
|
|
2522
3141
|
ui.body.appendChild(grid);
|
|
3142
|
+
function doConfirm() {
|
|
3143
|
+
opts.onConfirm(selected);
|
|
3144
|
+
opts.onClose();
|
|
3145
|
+
}
|
|
2523
3146
|
// Single full-bleed Confirm; dismissal is the ✕ (top-right). No Cancel button.
|
|
2524
3147
|
const confirm = document.createElement('button');
|
|
2525
3148
|
confirm.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
2526
3149
|
confirm.dataset.ge = 'sheet-confirm';
|
|
2527
3150
|
confirm.textContent = opts.confirmLabel;
|
|
2528
|
-
confirm.addEventListener('click',
|
|
3151
|
+
confirm.addEventListener('click', doConfirm);
|
|
2529
3152
|
ui.card.appendChild(confirm);
|
|
2530
|
-
|
|
3153
|
+
function onKey(e) {
|
|
3154
|
+
const last = opts.choices.length - 1;
|
|
3155
|
+
switch (e.code) {
|
|
3156
|
+
case 'ArrowRight':
|
|
3157
|
+
case 'ArrowDown':
|
|
3158
|
+
case 'Equal': // + on most keyboards
|
|
3159
|
+
case 'NumpadAdd':
|
|
3160
|
+
if (focusIndex < last)
|
|
3161
|
+
setHighlight(focusIndex + 1);
|
|
3162
|
+
return true;
|
|
3163
|
+
case 'ArrowLeft':
|
|
3164
|
+
case 'ArrowUp':
|
|
3165
|
+
case 'Minus':
|
|
3166
|
+
case 'NumpadSubtract':
|
|
3167
|
+
if (focusIndex > 0)
|
|
3168
|
+
setHighlight(focusIndex - 1);
|
|
3169
|
+
return true;
|
|
3170
|
+
case 'Enter':
|
|
3171
|
+
case 'Space':
|
|
3172
|
+
doConfirm();
|
|
3173
|
+
return true;
|
|
3174
|
+
case 'Escape':
|
|
3175
|
+
opts.onClose();
|
|
3176
|
+
return true;
|
|
3177
|
+
default:
|
|
3178
|
+
return false;
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
return { root: ui.root, onKey };
|
|
2531
3182
|
}
|
|
2532
3183
|
/** Bet picker — all available bets as chips (6 per row, 3 on mobile), accent Confirm applies it. */
|
|
2533
3184
|
function openBetModal(shell) {
|
|
@@ -2535,6 +3186,7 @@ function openBetModal(shell) {
|
|
|
2535
3186
|
ge: 'bet-modal', title: shell.t('Bet'), columns: { wide: 6, mobile: 3 }, confirmLabel: shell.t('Confirm'),
|
|
2536
3187
|
choices: shell.state.availableBets.map((b) => ({ id: String(b), label: formatCurrency(b, shell.config.currency) })),
|
|
2537
3188
|
selected: String(shell.state.bet),
|
|
3189
|
+
onClose: () => shell.closeModal(),
|
|
2538
3190
|
onConfirm: (id) => {
|
|
2539
3191
|
const v = Number(id);
|
|
2540
3192
|
if (v !== shell.state.bet) {
|
|
@@ -2565,6 +3217,7 @@ function openAutoplayModal(shell) {
|
|
|
2565
3217
|
ge: 'autoplay-modal', title: shell.t('Autoplay'), columns: 3, confirmLabel: shell.t('Start'),
|
|
2566
3218
|
choices: counts.map((n) => ({ id: String(n), label: Number.isFinite(n) ? String(n) : '∞' })),
|
|
2567
3219
|
selected: String(shell.state.autoplay.remaining || counts[0]),
|
|
3220
|
+
onClose: () => shell.closeModal(),
|
|
2568
3221
|
onConfirm: (id) => {
|
|
2569
3222
|
let remaining = Number(id); // "Infinity" → Infinity
|
|
2570
3223
|
if (maxCount != null)
|
|
@@ -2712,6 +3365,868 @@ function countUp(el, from, to, fmt, durationMs = 450) {
|
|
|
2712
3365
|
};
|
|
2713
3366
|
}
|
|
2714
3367
|
|
|
3368
|
+
// MACHINE-TRANSLATED — native QA required before production use.
|
|
3369
|
+
// Keys are the English source strings exactly as they appear at t('…') call sites.
|
|
3370
|
+
// Entries within each language block are sorted alphabetically by key for diff stability.
|
|
3371
|
+
// 'en' is omitted: the resolver returns the source string unchanged for English.
|
|
3372
|
+
const LOCALES = {
|
|
3373
|
+
da: {
|
|
3374
|
+
DISCLAIMER: 'Ansvarsfraskrivelse',
|
|
3375
|
+
Activate: 'Aktivér',
|
|
3376
|
+
Autoplay: 'Autoplay',
|
|
3377
|
+
Balance: 'Saldo',
|
|
3378
|
+
Bet: 'Indsats',
|
|
3379
|
+
'BUY BONUS': 'KØB BONUS',
|
|
3380
|
+
Buy: 'Køb',
|
|
3381
|
+
'Buy bonus': 'Køb bonus',
|
|
3382
|
+
Cancel: 'Annuller',
|
|
3383
|
+
Close: 'Luk',
|
|
3384
|
+
'Cluster pays': 'Klyngeudbetaling',
|
|
3385
|
+
Confirm: 'Bekræft',
|
|
3386
|
+
Controls: 'Kontroller',
|
|
3387
|
+
'Decrease your stake.': 'Reducer din indsats.',
|
|
3388
|
+
DISABLE: 'DEAKTIVER',
|
|
3389
|
+
'Dismiss the current overlay.': 'Luk det aktuelle overlay.',
|
|
3390
|
+
'Free spins': 'Gratisspins',
|
|
3391
|
+
Game: 'Spil',
|
|
3392
|
+
'Game info': 'Spilinfo',
|
|
3393
|
+
Hotkeys: 'Tastaturgenveje',
|
|
3394
|
+
'Increase your stake.': 'Forøg din indsats.',
|
|
3395
|
+
'Lower bet': 'Lavere indsats',
|
|
3396
|
+
'Master volume': 'Hovedvolumen',
|
|
3397
|
+
'Max win': 'Maks gevinst',
|
|
3398
|
+
Menu: 'Menu',
|
|
3399
|
+
'Menu & info': 'Menu og info',
|
|
3400
|
+
Modes: 'Tilstande',
|
|
3401
|
+
Music: 'Musik',
|
|
3402
|
+
Mute: 'Lydløs',
|
|
3403
|
+
'Mute or unmute the game.': 'Slå lyden til/fra.',
|
|
3404
|
+
Navigate: 'Naviger',
|
|
3405
|
+
'Open settings and game info.': 'Åbn indstillinger og spilinfo.',
|
|
3406
|
+
'Open the paytable and rules.': 'Åbn gevinsttabel og regler.',
|
|
3407
|
+
'Pay a fixed cost to enter a bonus feature.': 'Betal en fast pris for at aktivere en bonusfunktion.',
|
|
3408
|
+
Paylines: 'Gevinstlinjer',
|
|
3409
|
+
Paytable: 'Gevinsttabel',
|
|
3410
|
+
'Pays anywhere': 'Udbetaler overalt',
|
|
3411
|
+
Price: 'Pris',
|
|
3412
|
+
'Raise bet': 'Hæv indsats',
|
|
3413
|
+
Replay: 'Genspil',
|
|
3414
|
+
RTP: 'RTP',
|
|
3415
|
+
SFX: 'Lydeffekter',
|
|
3416
|
+
Settings: 'Indstillinger',
|
|
3417
|
+
Sound: 'Lyd',
|
|
3418
|
+
Spin: 'Drej',
|
|
3419
|
+
'Spin automatically a set number of times.': 'Spin automatisk et bestemt antal gange.',
|
|
3420
|
+
'Speed up spin animations.': 'Gør spilanimationer hurtigere.',
|
|
3421
|
+
Start: 'Start',
|
|
3422
|
+
'Start a spin at the current bet.': 'Start et spin med den aktuelle indsats.',
|
|
3423
|
+
'Start replay': 'Start genspil',
|
|
3424
|
+
'Total win': 'Samlet gevinst',
|
|
3425
|
+
Turbo: 'Turbo',
|
|
3426
|
+
'Ways to win': 'Vindermuligheder',
|
|
3427
|
+
Win: 'Gevinst',
|
|
3428
|
+
'Winning shapes': 'Vindende former',
|
|
3429
|
+
},
|
|
3430
|
+
de: {
|
|
3431
|
+
DISCLAIMER: 'Haftungsausschluss',
|
|
3432
|
+
Activate: 'Aktivieren',
|
|
3433
|
+
Autoplay: 'Autoplay',
|
|
3434
|
+
Balance: 'Kontostand',
|
|
3435
|
+
Bet: 'Einsatz',
|
|
3436
|
+
'BUY BONUS': 'BONUS KAUFEN',
|
|
3437
|
+
Buy: 'Kaufen',
|
|
3438
|
+
'Buy bonus': 'Bonus kaufen',
|
|
3439
|
+
Cancel: 'Abbrechen',
|
|
3440
|
+
Close: 'Schließen',
|
|
3441
|
+
'Cluster pays': 'Cluster-Gewinne',
|
|
3442
|
+
Confirm: 'Bestätigen',
|
|
3443
|
+
Controls: 'Steuerung',
|
|
3444
|
+
'Decrease your stake.': 'Einsatz verringern.',
|
|
3445
|
+
DISABLE: 'DEAKTIVIEREN',
|
|
3446
|
+
'Dismiss the current overlay.': 'Aktuelles Overlay schließen.',
|
|
3447
|
+
'Free spins': 'Freispiele',
|
|
3448
|
+
Game: 'Spiel',
|
|
3449
|
+
'Game info': 'Spielinfo',
|
|
3450
|
+
Hotkeys: 'Tastenkürzel',
|
|
3451
|
+
'Increase your stake.': 'Einsatz erhöhen.',
|
|
3452
|
+
'Lower bet': 'Einsatz senken',
|
|
3453
|
+
'Master volume': 'Gesamtlautstärke',
|
|
3454
|
+
'Max win': 'Max. Gewinn',
|
|
3455
|
+
Menu: 'Menü',
|
|
3456
|
+
'Menu & info': 'Menü & Info',
|
|
3457
|
+
Modes: 'Modi',
|
|
3458
|
+
Music: 'Musik',
|
|
3459
|
+
Mute: 'Stummschalten',
|
|
3460
|
+
'Mute or unmute the game.': 'Ton stummschalten oder aktivieren.',
|
|
3461
|
+
Navigate: 'Navigieren',
|
|
3462
|
+
'Open settings and game info.': 'Einstellungen und Spielinfo öffnen.',
|
|
3463
|
+
'Open the paytable and rules.': 'Gewinntabelle und Regeln öffnen.',
|
|
3464
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zahle einen festen Betrag, um ein Bonus-Feature zu aktivieren.',
|
|
3465
|
+
Paylines: 'Gewinnlinien',
|
|
3466
|
+
Paytable: 'Gewinntabelle',
|
|
3467
|
+
'Pays anywhere': 'Zahlt überall',
|
|
3468
|
+
Price: 'Preis',
|
|
3469
|
+
'Raise bet': 'Einsatz erhöhen',
|
|
3470
|
+
Replay: 'Wiederholen',
|
|
3471
|
+
RTP: 'RTP',
|
|
3472
|
+
SFX: 'Soundeffekte',
|
|
3473
|
+
Settings: 'Einstellungen',
|
|
3474
|
+
Sound: 'Ton',
|
|
3475
|
+
Spin: 'Drehen',
|
|
3476
|
+
'Spin automatically a set number of times.': 'Automatisch eine festgelegte Anzahl von Runden spielen.',
|
|
3477
|
+
'Speed up spin animations.': 'Animationen beschleunigen.',
|
|
3478
|
+
Start: 'Start',
|
|
3479
|
+
'Start a spin at the current bet.': 'Mit dem aktuellen Einsatz drehen.',
|
|
3480
|
+
'Start replay': 'Wiederholen',
|
|
3481
|
+
'Total win': 'Gesamtgewinn',
|
|
3482
|
+
Turbo: 'Turbo',
|
|
3483
|
+
'Ways to win': 'Gewinnwege',
|
|
3484
|
+
Win: 'Gewinn',
|
|
3485
|
+
'Winning shapes': 'Gewinnmuster',
|
|
3486
|
+
},
|
|
3487
|
+
es: {
|
|
3488
|
+
DISCLAIMER: 'Aviso legal',
|
|
3489
|
+
Activate: 'Activar',
|
|
3490
|
+
Autoplay: 'Giro automático',
|
|
3491
|
+
Balance: 'Saldo',
|
|
3492
|
+
Bet: 'Apuesta',
|
|
3493
|
+
'BUY BONUS': 'COMPRAR BONO',
|
|
3494
|
+
Buy: 'Comprar',
|
|
3495
|
+
'Buy bonus': 'Comprar bono',
|
|
3496
|
+
Cancel: 'Cancelar',
|
|
3497
|
+
Close: 'Cerrar',
|
|
3498
|
+
'Cluster pays': 'Pago en racimo',
|
|
3499
|
+
Confirm: 'Confirmar',
|
|
3500
|
+
Controls: 'Controles',
|
|
3501
|
+
'Decrease your stake.': 'Reducir apuesta.',
|
|
3502
|
+
DISABLE: 'DESACTIVAR',
|
|
3503
|
+
'Dismiss the current overlay.': 'Cerrar el panel actual.',
|
|
3504
|
+
'Free spins': 'Giros gratis',
|
|
3505
|
+
Game: 'Juego',
|
|
3506
|
+
'Game info': 'Info del juego',
|
|
3507
|
+
Hotkeys: 'Atajos de teclado',
|
|
3508
|
+
'Increase your stake.': 'Aumentar apuesta.',
|
|
3509
|
+
'Lower bet': 'Bajar apuesta',
|
|
3510
|
+
'Master volume': 'Volumen principal',
|
|
3511
|
+
'Max win': 'Ganancia máxima',
|
|
3512
|
+
Menu: 'Menú',
|
|
3513
|
+
'Menu & info': 'Menú e info',
|
|
3514
|
+
Modes: 'Modos',
|
|
3515
|
+
Music: 'Música',
|
|
3516
|
+
Mute: 'Silenciar',
|
|
3517
|
+
'Mute or unmute the game.': 'Activar o silenciar el sonido.',
|
|
3518
|
+
Navigate: 'Navegar',
|
|
3519
|
+
'Open settings and game info.': 'Abrir ajustes e info del juego.',
|
|
3520
|
+
'Open the paytable and rules.': 'Abrir tabla de pagos y reglas.',
|
|
3521
|
+
'Pay a fixed cost to enter a bonus feature.': 'Paga un coste fijo para acceder a una función de bono.',
|
|
3522
|
+
Paylines: 'Líneas de pago',
|
|
3523
|
+
Paytable: 'Tabla de pagos',
|
|
3524
|
+
'Pays anywhere': 'Paga en cualquier lugar',
|
|
3525
|
+
Price: 'Precio',
|
|
3526
|
+
'Raise bet': 'Subir apuesta',
|
|
3527
|
+
Replay: 'Repetir',
|
|
3528
|
+
RTP: 'RTP',
|
|
3529
|
+
SFX: 'Efectos de sonido',
|
|
3530
|
+
Settings: 'Ajustes',
|
|
3531
|
+
Sound: 'Sonido',
|
|
3532
|
+
Spin: 'Girar',
|
|
3533
|
+
'Spin automatically a set number of times.': 'Girar automáticamente un número determinado de veces.',
|
|
3534
|
+
'Speed up spin animations.': 'Acelerar las animaciones de giro.',
|
|
3535
|
+
Start: 'Iniciar',
|
|
3536
|
+
'Start a spin at the current bet.': 'Iniciar un giro con la apuesta actual.',
|
|
3537
|
+
'Start replay': 'Iniciar repetición',
|
|
3538
|
+
'Total win': 'Ganancia total',
|
|
3539
|
+
Turbo: 'Turbo',
|
|
3540
|
+
'Ways to win': 'Formas de ganar',
|
|
3541
|
+
Win: 'Premio',
|
|
3542
|
+
'Winning shapes': 'Figuras ganadoras',
|
|
3543
|
+
},
|
|
3544
|
+
fi: {
|
|
3545
|
+
DISCLAIMER: 'Vastuuvapauslauseke',
|
|
3546
|
+
Activate: 'Aktivoi',
|
|
3547
|
+
Autoplay: 'Automaattipeli',
|
|
3548
|
+
Balance: 'Saldo',
|
|
3549
|
+
Bet: 'Panos',
|
|
3550
|
+
'BUY BONUS': 'OSTA BONUS',
|
|
3551
|
+
Buy: 'Osta',
|
|
3552
|
+
'Buy bonus': 'Osta bonus',
|
|
3553
|
+
Cancel: 'Peruuta',
|
|
3554
|
+
Close: 'Sulje',
|
|
3555
|
+
'Cluster pays': 'Ryhmävoitto',
|
|
3556
|
+
Confirm: 'Vahvista',
|
|
3557
|
+
Controls: 'Ohjaimet',
|
|
3558
|
+
'Decrease your stake.': 'Pienennä panostasi.',
|
|
3559
|
+
DISABLE: 'POISTA KÄYTÖSTÄ',
|
|
3560
|
+
'Dismiss the current overlay.': 'Sulje nykyinen näkymä.',
|
|
3561
|
+
'Free spins': 'Ilmaiskierrokset',
|
|
3562
|
+
Game: 'Peli',
|
|
3563
|
+
'Game info': 'Pelitiedot',
|
|
3564
|
+
Hotkeys: 'Pikanäppäimet',
|
|
3565
|
+
'Increase your stake.': 'Kasvata panostasi.',
|
|
3566
|
+
'Lower bet': 'Pienennä panosta',
|
|
3567
|
+
'Master volume': 'Pääänenvoimakkuus',
|
|
3568
|
+
'Max win': 'Maksimivoitto',
|
|
3569
|
+
Menu: 'Valikko',
|
|
3570
|
+
'Menu & info': 'Valikko ja tiedot',
|
|
3571
|
+
Modes: 'Tilat',
|
|
3572
|
+
Music: 'Musiikki',
|
|
3573
|
+
Mute: 'Mykistä',
|
|
3574
|
+
'Mute or unmute the game.': 'Mykistä tai poista mykistys.',
|
|
3575
|
+
Navigate: 'Navigoi',
|
|
3576
|
+
'Open settings and game info.': 'Avaa asetukset ja pelitiedot.',
|
|
3577
|
+
'Open the paytable and rules.': 'Avaa voittotaulukko ja säännöt.',
|
|
3578
|
+
'Pay a fixed cost to enter a bonus feature.': 'Maksa kiinteä summa päästäksesi bonusominaisuuteen.',
|
|
3579
|
+
Paylines: 'Voittolinjat',
|
|
3580
|
+
Paytable: 'Voittotaulukko',
|
|
3581
|
+
'Pays anywhere': 'Voittaa missä tahansa',
|
|
3582
|
+
Price: 'Hinta',
|
|
3583
|
+
'Raise bet': 'Nosta panosta',
|
|
3584
|
+
Replay: 'Toista uudelleen',
|
|
3585
|
+
RTP: 'RTP',
|
|
3586
|
+
SFX: 'Ääniefektit',
|
|
3587
|
+
Settings: 'Asetukset',
|
|
3588
|
+
Sound: 'Ääni',
|
|
3589
|
+
Spin: 'Pyöräytä',
|
|
3590
|
+
'Spin automatically a set number of times.': 'Pyöräytä automaattisesti määritetty määrä kertoja.',
|
|
3591
|
+
'Speed up spin animations.': 'Nopeuta pyöräytysanimaatioita.',
|
|
3592
|
+
Start: 'Aloita',
|
|
3593
|
+
'Start a spin at the current bet.': 'Aloita pyöräytys nykyisellä panoksella.',
|
|
3594
|
+
'Start replay': 'Aloita uudelleentoisto',
|
|
3595
|
+
'Total win': 'Kokonaisvoitto',
|
|
3596
|
+
Turbo: 'Turbo',
|
|
3597
|
+
'Ways to win': 'Voittotavat',
|
|
3598
|
+
Win: 'Voitto',
|
|
3599
|
+
'Winning shapes': 'Voittokuviot',
|
|
3600
|
+
},
|
|
3601
|
+
fr: {
|
|
3602
|
+
DISCLAIMER: 'Avertissement',
|
|
3603
|
+
Activate: 'Activer',
|
|
3604
|
+
Autoplay: 'Jeu automatique',
|
|
3605
|
+
Balance: 'Solde',
|
|
3606
|
+
Bet: 'Mise',
|
|
3607
|
+
'BUY BONUS': 'ACHETER BONUS',
|
|
3608
|
+
Buy: 'Acheter',
|
|
3609
|
+
'Buy bonus': 'Acheter un bonus',
|
|
3610
|
+
Cancel: 'Annuler',
|
|
3611
|
+
Close: 'Fermer',
|
|
3612
|
+
'Cluster pays': 'Gains en grappe',
|
|
3613
|
+
Confirm: 'Confirmer',
|
|
3614
|
+
Controls: 'Commandes',
|
|
3615
|
+
'Decrease your stake.': 'Diminuer votre mise.',
|
|
3616
|
+
DISABLE: 'DÉSACTIVER',
|
|
3617
|
+
'Dismiss the current overlay.': 'Fermer le panneau actuel.',
|
|
3618
|
+
'Free spins': 'Tours gratuits',
|
|
3619
|
+
Game: 'Jeu',
|
|
3620
|
+
'Game info': 'Infos du jeu',
|
|
3621
|
+
Hotkeys: 'Raccourcis clavier',
|
|
3622
|
+
'Increase your stake.': 'Augmenter votre mise.',
|
|
3623
|
+
'Lower bet': 'Baisser la mise',
|
|
3624
|
+
'Master volume': 'Volume principal',
|
|
3625
|
+
'Max win': 'Gain maximum',
|
|
3626
|
+
Menu: 'Menu',
|
|
3627
|
+
'Menu & info': 'Menu et info',
|
|
3628
|
+
Modes: 'Modes',
|
|
3629
|
+
Music: 'Musique',
|
|
3630
|
+
Mute: 'Couper le son',
|
|
3631
|
+
'Mute or unmute the game.': 'Couper ou rétablir le son.',
|
|
3632
|
+
Navigate: 'Naviguer',
|
|
3633
|
+
'Open settings and game info.': 'Ouvrir les paramètres et infos du jeu.',
|
|
3634
|
+
'Open the paytable and rules.': 'Ouvrir la table des gains et les règles.',
|
|
3635
|
+
'Pay a fixed cost to enter a bonus feature.': 'Payez un coût fixe pour accéder à une fonctionnalité bonus.',
|
|
3636
|
+
Paylines: 'Lignes de paiement',
|
|
3637
|
+
Paytable: 'Table des gains',
|
|
3638
|
+
'Pays anywhere': 'Gains sur toute la grille',
|
|
3639
|
+
Price: 'Prix',
|
|
3640
|
+
'Raise bet': 'Augmenter la mise',
|
|
3641
|
+
Replay: 'Revoir',
|
|
3642
|
+
RTP: 'RTP',
|
|
3643
|
+
SFX: 'Effets sonores',
|
|
3644
|
+
Settings: 'Paramètres',
|
|
3645
|
+
Sound: 'Son',
|
|
3646
|
+
Spin: 'Tourner',
|
|
3647
|
+
'Spin automatically a set number of times.': 'Tourner automatiquement un nombre de fois défini.',
|
|
3648
|
+
'Speed up spin animations.': 'Accélérer les animations de spin.',
|
|
3649
|
+
Start: 'Lancer',
|
|
3650
|
+
'Start a spin at the current bet.': 'Lancer un tour avec la mise actuelle.',
|
|
3651
|
+
'Start replay': 'Lancer le replay',
|
|
3652
|
+
'Total win': 'Gain total',
|
|
3653
|
+
Turbo: 'Turbo',
|
|
3654
|
+
'Ways to win': 'Façons de gagner',
|
|
3655
|
+
Win: 'Gain',
|
|
3656
|
+
'Winning shapes': 'Figures gagnantes',
|
|
3657
|
+
},
|
|
3658
|
+
hi: {
|
|
3659
|
+
DISCLAIMER: 'अस्वीकरण',
|
|
3660
|
+
Activate: 'सक्रिय करें',
|
|
3661
|
+
Autoplay: 'ऑटोप्ले',
|
|
3662
|
+
Balance: 'बैलेंस',
|
|
3663
|
+
Bet: 'दांव',
|
|
3664
|
+
'BUY BONUS': 'बोनस खरीदें',
|
|
3665
|
+
Buy: 'खरीदें',
|
|
3666
|
+
'Buy bonus': 'बोनस खरीदें',
|
|
3667
|
+
Cancel: 'रद्द करें',
|
|
3668
|
+
Close: 'बंद करें',
|
|
3669
|
+
'Cluster pays': 'क्लस्टर भुगतान',
|
|
3670
|
+
Confirm: 'पुष्टि करें',
|
|
3671
|
+
Controls: 'नियंत्रण',
|
|
3672
|
+
'Decrease your stake.': 'अपना दांव कम करें।',
|
|
3673
|
+
DISABLE: 'बंद करें',
|
|
3674
|
+
'Dismiss the current overlay.': 'वर्तमान ओवरले बंद करें।',
|
|
3675
|
+
'Free spins': 'फ्री स्पिन',
|
|
3676
|
+
Game: 'खेल',
|
|
3677
|
+
'Game info': 'गेम जानकारी',
|
|
3678
|
+
Hotkeys: 'कीबोर्ड शॉर्टकट',
|
|
3679
|
+
'Increase your stake.': 'अपना दांव बढ़ाएं।',
|
|
3680
|
+
'Lower bet': 'दांव घटाएं',
|
|
3681
|
+
'Master volume': 'मुख्य वॉल्यूम',
|
|
3682
|
+
'Max win': 'अधिकतम जीत',
|
|
3683
|
+
Menu: 'मेनू',
|
|
3684
|
+
'Menu & info': 'मेनू और जानकारी',
|
|
3685
|
+
Modes: 'मोड',
|
|
3686
|
+
Music: 'संगीत',
|
|
3687
|
+
Mute: 'म्यूट करें',
|
|
3688
|
+
'Mute or unmute the game.': 'गेम को म्यूट या अनम्यूट करें।',
|
|
3689
|
+
Navigate: 'नेविगेट करें',
|
|
3690
|
+
'Open settings and game info.': 'सेटिंग और गेम जानकारी खोलें।',
|
|
3691
|
+
'Open the paytable and rules.': 'पेटेबल और नियम खोलें।',
|
|
3692
|
+
'Pay a fixed cost to enter a bonus feature.': 'बोनस फीचर में प्रवेश के लिए एक निश्चित राशि दें।',
|
|
3693
|
+
Paylines: 'पेलाइन',
|
|
3694
|
+
Paytable: 'पेटेबल',
|
|
3695
|
+
'Pays anywhere': 'कहीं भी जीत',
|
|
3696
|
+
Price: 'मूल्य',
|
|
3697
|
+
'Raise bet': 'दांव बढ़ाएं',
|
|
3698
|
+
Replay: 'दोबारा खेलें',
|
|
3699
|
+
RTP: 'RTP',
|
|
3700
|
+
SFX: 'ध्वनि प्रभाव',
|
|
3701
|
+
Settings: 'सेटिंग',
|
|
3702
|
+
Sound: 'ध्वनि',
|
|
3703
|
+
Spin: 'स्पिन',
|
|
3704
|
+
'Spin automatically a set number of times.': 'एक निश्चित संख्या में स्वचालित रूप से स्पिन करें।',
|
|
3705
|
+
'Speed up spin animations.': 'स्पिन एनिमेशन को तेज़ करें।',
|
|
3706
|
+
Start: 'शुरू करें',
|
|
3707
|
+
'Start a spin at the current bet.': 'वर्तमान दांव पर स्पिन शुरू करें।',
|
|
3708
|
+
'Start replay': 'रीप्ले शुरू करें',
|
|
3709
|
+
'Total win': 'कुल जीत',
|
|
3710
|
+
Turbo: 'टर्बो',
|
|
3711
|
+
'Ways to win': 'जीत के तरीके',
|
|
3712
|
+
Win: 'जीत',
|
|
3713
|
+
'Winning shapes': 'जीत के आकार',
|
|
3714
|
+
},
|
|
3715
|
+
id: {
|
|
3716
|
+
DISCLAIMER: 'Penafian',
|
|
3717
|
+
Activate: 'Aktifkan',
|
|
3718
|
+
Autoplay: 'Putar Otomatis',
|
|
3719
|
+
Balance: 'Saldo',
|
|
3720
|
+
Bet: 'Taruhan',
|
|
3721
|
+
'BUY BONUS': 'BELI BONUS',
|
|
3722
|
+
Buy: 'Beli',
|
|
3723
|
+
'Buy bonus': 'Beli bonus',
|
|
3724
|
+
Cancel: 'Batal',
|
|
3725
|
+
Close: 'Tutup',
|
|
3726
|
+
'Cluster pays': 'Bayar kluster',
|
|
3727
|
+
Confirm: 'Konfirmasi',
|
|
3728
|
+
Controls: 'Kontrol',
|
|
3729
|
+
'Decrease your stake.': 'Kurangi taruhan Anda.',
|
|
3730
|
+
DISABLE: 'NONAKTIFKAN',
|
|
3731
|
+
'Dismiss the current overlay.': 'Tutup overlay saat ini.',
|
|
3732
|
+
'Free spins': 'Putaran gratis',
|
|
3733
|
+
Game: 'Permainan',
|
|
3734
|
+
'Game info': 'Info permainan',
|
|
3735
|
+
Hotkeys: 'Pintasan keyboard',
|
|
3736
|
+
'Increase your stake.': 'Tingkatkan taruhan Anda.',
|
|
3737
|
+
'Lower bet': 'Turunkan taruhan',
|
|
3738
|
+
'Master volume': 'Volume utama',
|
|
3739
|
+
'Max win': 'Kemenangan maks',
|
|
3740
|
+
Menu: 'Menu',
|
|
3741
|
+
'Menu & info': 'Menu & info',
|
|
3742
|
+
Modes: 'Mode',
|
|
3743
|
+
Music: 'Musik',
|
|
3744
|
+
Mute: 'Bisukan',
|
|
3745
|
+
'Mute or unmute the game.': 'Bisukan atau aktifkan suara permainan.',
|
|
3746
|
+
Navigate: 'Navigasi',
|
|
3747
|
+
'Open settings and game info.': 'Buka pengaturan dan info permainan.',
|
|
3748
|
+
'Open the paytable and rules.': 'Buka tabel pembayaran dan aturan.',
|
|
3749
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bayar biaya tetap untuk masuk ke fitur bonus.',
|
|
3750
|
+
Paylines: 'Garis pembayaran',
|
|
3751
|
+
Paytable: 'Tabel pembayaran',
|
|
3752
|
+
'Pays anywhere': 'Menang di mana saja',
|
|
3753
|
+
Price: 'Harga',
|
|
3754
|
+
'Raise bet': 'Naikkan taruhan',
|
|
3755
|
+
Replay: 'Putar ulang',
|
|
3756
|
+
RTP: 'RTP',
|
|
3757
|
+
SFX: 'Efek suara',
|
|
3758
|
+
Settings: 'Pengaturan',
|
|
3759
|
+
Sound: 'Suara',
|
|
3760
|
+
Spin: 'Putar',
|
|
3761
|
+
'Spin automatically a set number of times.': 'Putar otomatis sejumlah kali yang ditentukan.',
|
|
3762
|
+
'Speed up spin animations.': 'Percepat animasi putaran.',
|
|
3763
|
+
Start: 'Mulai',
|
|
3764
|
+
'Start a spin at the current bet.': 'Mulai putaran dengan taruhan saat ini.',
|
|
3765
|
+
'Start replay': 'Mulai putar ulang',
|
|
3766
|
+
'Total win': 'Total kemenangan',
|
|
3767
|
+
Turbo: 'Turbo',
|
|
3768
|
+
'Ways to win': 'Cara menang',
|
|
3769
|
+
Win: 'Menang',
|
|
3770
|
+
'Winning shapes': 'Bentuk kemenangan',
|
|
3771
|
+
},
|
|
3772
|
+
ja: {
|
|
3773
|
+
DISCLAIMER: '免責事項',
|
|
3774
|
+
Activate: '有効化',
|
|
3775
|
+
Autoplay: 'オートプレイ',
|
|
3776
|
+
Balance: '残高',
|
|
3777
|
+
Bet: 'ベット',
|
|
3778
|
+
'BUY BONUS': 'ボーナス購入',
|
|
3779
|
+
Buy: '購入',
|
|
3780
|
+
'Buy bonus': 'ボーナス購入',
|
|
3781
|
+
Cancel: 'キャンセル',
|
|
3782
|
+
Close: '閉じる',
|
|
3783
|
+
'Cluster pays': 'クラスター配当',
|
|
3784
|
+
Confirm: '確認',
|
|
3785
|
+
Controls: '操作方法',
|
|
3786
|
+
'Decrease your stake.': 'ベットを減らす。',
|
|
3787
|
+
DISABLE: '無効',
|
|
3788
|
+
'Dismiss the current overlay.': '現在のオーバーレイを閉じる。',
|
|
3789
|
+
'Free spins': 'フリースピン',
|
|
3790
|
+
Game: 'ゲーム',
|
|
3791
|
+
'Game info': 'ゲーム情報',
|
|
3792
|
+
Hotkeys: 'キーボードショートカット',
|
|
3793
|
+
'Increase your stake.': 'ベットを増やす。',
|
|
3794
|
+
'Lower bet': 'ベットを下げる',
|
|
3795
|
+
'Master volume': 'マスターボリューム',
|
|
3796
|
+
'Max win': '最大当選',
|
|
3797
|
+
Menu: 'メニュー',
|
|
3798
|
+
'Menu & info': 'メニューと情報',
|
|
3799
|
+
Modes: 'モード',
|
|
3800
|
+
Music: 'ミュージック',
|
|
3801
|
+
Mute: 'ミュート',
|
|
3802
|
+
'Mute or unmute the game.': 'ゲームをミュート/ミュート解除する。',
|
|
3803
|
+
Navigate: 'ナビゲート',
|
|
3804
|
+
'Open settings and game info.': '設定とゲーム情報を開く。',
|
|
3805
|
+
'Open the paytable and rules.': '配当表とルールを開く。',
|
|
3806
|
+
'Pay a fixed cost to enter a bonus feature.': 'ボーナス機能に入るために固定料金を支払う。',
|
|
3807
|
+
Paylines: 'ペイライン',
|
|
3808
|
+
Paytable: '配当表',
|
|
3809
|
+
'Pays anywhere': 'どこでも当選',
|
|
3810
|
+
Price: '価格',
|
|
3811
|
+
'Raise bet': 'ベットを上げる',
|
|
3812
|
+
Replay: 'リプレイ',
|
|
3813
|
+
RTP: 'RTP',
|
|
3814
|
+
SFX: '効果音',
|
|
3815
|
+
Settings: '設定',
|
|
3816
|
+
Sound: 'サウンド',
|
|
3817
|
+
Spin: 'スピン',
|
|
3818
|
+
'Spin automatically a set number of times.': '設定した回数だけ自動でスピンする。',
|
|
3819
|
+
'Speed up spin animations.': 'スピンアニメーションを高速化する。',
|
|
3820
|
+
Start: 'スタート',
|
|
3821
|
+
'Start a spin at the current bet.': '現在のベットでスピンを開始する。',
|
|
3822
|
+
'Start replay': 'リプレイ開始',
|
|
3823
|
+
'Total win': '合計当選',
|
|
3824
|
+
Turbo: 'ターボ',
|
|
3825
|
+
'Ways to win': '当選方法',
|
|
3826
|
+
Win: '当選',
|
|
3827
|
+
'Winning shapes': '当選形状',
|
|
3828
|
+
},
|
|
3829
|
+
ko: {
|
|
3830
|
+
DISCLAIMER: '면책 조항',
|
|
3831
|
+
Activate: '활성화',
|
|
3832
|
+
Autoplay: '자동 플레이',
|
|
3833
|
+
Balance: '잔액',
|
|
3834
|
+
Bet: '베팅',
|
|
3835
|
+
'BUY BONUS': '보너스 구매',
|
|
3836
|
+
Buy: '구매',
|
|
3837
|
+
'Buy bonus': '보너스 구매',
|
|
3838
|
+
Cancel: '취소',
|
|
3839
|
+
Close: '닫기',
|
|
3840
|
+
'Cluster pays': '클러스터 페이',
|
|
3841
|
+
Confirm: '확인',
|
|
3842
|
+
Controls: '조작법',
|
|
3843
|
+
'Decrease your stake.': '베팅을 줄이세요.',
|
|
3844
|
+
DISABLE: '비활성화',
|
|
3845
|
+
'Dismiss the current overlay.': '현재 오버레이를 닫습니다.',
|
|
3846
|
+
'Free spins': '무료 스핀',
|
|
3847
|
+
Game: '게임',
|
|
3848
|
+
'Game info': '게임 정보',
|
|
3849
|
+
Hotkeys: '키보드 단축키',
|
|
3850
|
+
'Increase your stake.': '베팅을 늘리세요.',
|
|
3851
|
+
'Lower bet': '베팅 낮추기',
|
|
3852
|
+
'Master volume': '마스터 볼륨',
|
|
3853
|
+
'Max win': '최대 당첨',
|
|
3854
|
+
Menu: '메뉴',
|
|
3855
|
+
'Menu & info': '메뉴 & 정보',
|
|
3856
|
+
Modes: '모드',
|
|
3857
|
+
Music: '음악',
|
|
3858
|
+
Mute: '음소거',
|
|
3859
|
+
'Mute or unmute the game.': '게임 소리를 켜거나 끕니다.',
|
|
3860
|
+
Navigate: '이동',
|
|
3861
|
+
'Open settings and game info.': '설정 및 게임 정보를 엽니다.',
|
|
3862
|
+
'Open the paytable and rules.': '페이테이블 및 규칙을 엽니다.',
|
|
3863
|
+
'Pay a fixed cost to enter a bonus feature.': '고정 비용을 지불하고 보너스 기능에 진입하세요.',
|
|
3864
|
+
Paylines: '페이라인',
|
|
3865
|
+
Paytable: '페이테이블',
|
|
3866
|
+
'Pays anywhere': '어디서나 당첨',
|
|
3867
|
+
Price: '가격',
|
|
3868
|
+
'Raise bet': '베팅 올리기',
|
|
3869
|
+
Replay: '다시보기',
|
|
3870
|
+
RTP: 'RTP',
|
|
3871
|
+
SFX: '효과음',
|
|
3872
|
+
Settings: '설정',
|
|
3873
|
+
Sound: '사운드',
|
|
3874
|
+
Spin: '스핀',
|
|
3875
|
+
'Spin automatically a set number of times.': '정해진 횟수만큼 자동으로 스핀합니다.',
|
|
3876
|
+
'Speed up spin animations.': '스핀 애니메이션을 빠르게 합니다.',
|
|
3877
|
+
Start: '시작',
|
|
3878
|
+
'Start a spin at the current bet.': '현재 베팅으로 스핀을 시작합니다.',
|
|
3879
|
+
'Start replay': '다시보기 시작',
|
|
3880
|
+
'Total win': '총 당첨',
|
|
3881
|
+
Turbo: '터보',
|
|
3882
|
+
'Ways to win': '당첨 방법',
|
|
3883
|
+
Win: '당첨',
|
|
3884
|
+
'Winning shapes': '당첨 패턴',
|
|
3885
|
+
},
|
|
3886
|
+
pl: {
|
|
3887
|
+
DISCLAIMER: 'Zastrzeżenie',
|
|
3888
|
+
Activate: 'Aktywuj',
|
|
3889
|
+
Autoplay: 'Autoplay',
|
|
3890
|
+
Balance: 'Saldo',
|
|
3891
|
+
Bet: 'Zakład',
|
|
3892
|
+
'BUY BONUS': 'KUP BONUS',
|
|
3893
|
+
Buy: 'Kup',
|
|
3894
|
+
'Buy bonus': 'Kup bonus',
|
|
3895
|
+
Cancel: 'Anuluj',
|
|
3896
|
+
Close: 'Zamknij',
|
|
3897
|
+
'Cluster pays': 'Wypłaty klastrowe',
|
|
3898
|
+
Confirm: 'Potwierdź',
|
|
3899
|
+
Controls: 'Sterowanie',
|
|
3900
|
+
'Decrease your stake.': 'Zmniejsz swój zakład.',
|
|
3901
|
+
DISABLE: 'WYŁĄCZ',
|
|
3902
|
+
'Dismiss the current overlay.': 'Zamknij bieżące okno.',
|
|
3903
|
+
'Free spins': 'Darmowe spiny',
|
|
3904
|
+
Game: 'Gra',
|
|
3905
|
+
'Game info': 'Informacje o grze',
|
|
3906
|
+
Hotkeys: 'Skróty klawiaturowe',
|
|
3907
|
+
'Increase your stake.': 'Zwiększ swój zakład.',
|
|
3908
|
+
'Lower bet': 'Obniż zakład',
|
|
3909
|
+
'Master volume': 'Głośność główna',
|
|
3910
|
+
'Max win': 'Maks. wygrana',
|
|
3911
|
+
Menu: 'Menu',
|
|
3912
|
+
'Menu & info': 'Menu i informacje',
|
|
3913
|
+
Modes: 'Tryby',
|
|
3914
|
+
Music: 'Muzyka',
|
|
3915
|
+
Mute: 'Wycisz',
|
|
3916
|
+
'Mute or unmute the game.': 'Wycisz lub odcisz dźwięk gry.',
|
|
3917
|
+
Navigate: 'Nawiguj',
|
|
3918
|
+
'Open settings and game info.': 'Otwórz ustawienia i informacje o grze.',
|
|
3919
|
+
'Open the paytable and rules.': 'Otwórz tabelę wygranych i zasady.',
|
|
3920
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zapłać stałą kwotę, aby wejść do funkcji bonusowej.',
|
|
3921
|
+
Paylines: 'Linie wygrywające',
|
|
3922
|
+
Paytable: 'Tabela wygranych',
|
|
3923
|
+
'Pays anywhere': 'Wypłaca wszędzie',
|
|
3924
|
+
Price: 'Cena',
|
|
3925
|
+
'Raise bet': 'Podnieś zakład',
|
|
3926
|
+
Replay: 'Odtwórz ponownie',
|
|
3927
|
+
RTP: 'RTP',
|
|
3928
|
+
SFX: 'Efekty dźwiękowe',
|
|
3929
|
+
Settings: 'Ustawienia',
|
|
3930
|
+
Sound: 'Dźwięk',
|
|
3931
|
+
Spin: 'Zakręć',
|
|
3932
|
+
'Spin automatically a set number of times.': 'Obracaj automatycznie określoną liczbę razy.',
|
|
3933
|
+
'Speed up spin animations.': 'Przyspiesz animacje obrotów.',
|
|
3934
|
+
Start: 'Start',
|
|
3935
|
+
'Start a spin at the current bet.': 'Rozpocznij obrót przy bieżącym zakładzie.',
|
|
3936
|
+
'Start replay': 'Rozpocznij odtwarzanie',
|
|
3937
|
+
'Total win': 'Łączna wygrana',
|
|
3938
|
+
Turbo: 'Turbo',
|
|
3939
|
+
'Ways to win': 'Sposoby wygrywania',
|
|
3940
|
+
Win: 'Wygrana',
|
|
3941
|
+
'Winning shapes': 'Wzory wygrywające',
|
|
3942
|
+
},
|
|
3943
|
+
pt: {
|
|
3944
|
+
DISCLAIMER: 'Aviso legal',
|
|
3945
|
+
Activate: 'Ativar',
|
|
3946
|
+
Autoplay: 'Giro automático',
|
|
3947
|
+
Balance: 'Saldo',
|
|
3948
|
+
Bet: 'Aposta',
|
|
3949
|
+
'BUY BONUS': 'COMPRAR BÔNUS',
|
|
3950
|
+
Buy: 'Comprar',
|
|
3951
|
+
'Buy bonus': 'Comprar bônus',
|
|
3952
|
+
Cancel: 'Cancelar',
|
|
3953
|
+
Close: 'Fechar',
|
|
3954
|
+
'Cluster pays': 'Pagamento em cluster',
|
|
3955
|
+
Confirm: 'Confirmar',
|
|
3956
|
+
Controls: 'Controles',
|
|
3957
|
+
'Decrease your stake.': 'Diminuir aposta.',
|
|
3958
|
+
DISABLE: 'DESATIVAR',
|
|
3959
|
+
'Dismiss the current overlay.': 'Fechar o painel atual.',
|
|
3960
|
+
'Free spins': 'Giros grátis',
|
|
3961
|
+
Game: 'Jogo',
|
|
3962
|
+
'Game info': 'Info do jogo',
|
|
3963
|
+
Hotkeys: 'Atalhos de teclado',
|
|
3964
|
+
'Increase your stake.': 'Aumentar aposta.',
|
|
3965
|
+
'Lower bet': 'Baixar aposta',
|
|
3966
|
+
'Master volume': 'Volume principal',
|
|
3967
|
+
'Max win': 'Ganho máximo',
|
|
3968
|
+
Menu: 'Menu',
|
|
3969
|
+
'Menu & info': 'Menu e info',
|
|
3970
|
+
Modes: 'Modos',
|
|
3971
|
+
Music: 'Música',
|
|
3972
|
+
Mute: 'Silenciar',
|
|
3973
|
+
'Mute or unmute the game.': 'Ativar ou silenciar o som do jogo.',
|
|
3974
|
+
Navigate: 'Navegar',
|
|
3975
|
+
'Open settings and game info.': 'Abrir configurações e info do jogo.',
|
|
3976
|
+
'Open the paytable and rules.': 'Abrir tabela de pagamentos e regras.',
|
|
3977
|
+
'Pay a fixed cost to enter a bonus feature.': 'Pague um custo fixo para entrar numa funcionalidade de bônus.',
|
|
3978
|
+
Paylines: 'Linhas de pagamento',
|
|
3979
|
+
Paytable: 'Tabela de pagamentos',
|
|
3980
|
+
'Pays anywhere': 'Paga em qualquer posição',
|
|
3981
|
+
Price: 'Preço',
|
|
3982
|
+
'Raise bet': 'Aumentar aposta',
|
|
3983
|
+
Replay: 'Repetir',
|
|
3984
|
+
RTP: 'RTP',
|
|
3985
|
+
SFX: 'Efeitos sonoros',
|
|
3986
|
+
Settings: 'Configurações',
|
|
3987
|
+
Sound: 'Som',
|
|
3988
|
+
Spin: 'Girar',
|
|
3989
|
+
'Spin automatically a set number of times.': 'Girar automaticamente um número definido de vezes.',
|
|
3990
|
+
'Speed up spin animations.': 'Acelerar as animações de giro.',
|
|
3991
|
+
Start: 'Iniciar',
|
|
3992
|
+
'Start a spin at the current bet.': 'Iniciar um giro com a aposta atual.',
|
|
3993
|
+
'Start replay': 'Iniciar repetição',
|
|
3994
|
+
'Total win': 'Ganho total',
|
|
3995
|
+
Turbo: 'Turbo',
|
|
3996
|
+
'Ways to win': 'Formas de ganhar',
|
|
3997
|
+
Win: 'Ganho',
|
|
3998
|
+
'Winning shapes': 'Figuras vencedoras',
|
|
3999
|
+
},
|
|
4000
|
+
ru: {
|
|
4001
|
+
DISCLAIMER: 'Отказ от ответственности',
|
|
4002
|
+
Activate: 'Активировать',
|
|
4003
|
+
Autoplay: 'Автоигра',
|
|
4004
|
+
Balance: 'Баланс',
|
|
4005
|
+
Bet: 'Ставка',
|
|
4006
|
+
'BUY BONUS': 'КУПИТЬ БОНУС',
|
|
4007
|
+
Buy: 'Купить',
|
|
4008
|
+
'Buy bonus': 'Купить бонус',
|
|
4009
|
+
Cancel: 'Отмена',
|
|
4010
|
+
Close: 'Закрыть',
|
|
4011
|
+
'Cluster pays': 'Кластерные выплаты',
|
|
4012
|
+
Confirm: 'Подтвердить',
|
|
4013
|
+
Controls: 'Управление',
|
|
4014
|
+
'Decrease your stake.': 'Уменьшить ставку.',
|
|
4015
|
+
DISABLE: 'ОТКЛЮЧИТЬ',
|
|
4016
|
+
'Dismiss the current overlay.': 'Закрыть текущее окно.',
|
|
4017
|
+
'Free spins': 'Бесплатные вращения',
|
|
4018
|
+
Game: 'Игра',
|
|
4019
|
+
'Game info': 'Информация об игре',
|
|
4020
|
+
Hotkeys: 'Горячие клавиши',
|
|
4021
|
+
'Increase your stake.': 'Увеличить ставку.',
|
|
4022
|
+
'Lower bet': 'Уменьшить ставку',
|
|
4023
|
+
'Master volume': 'Общая громкость',
|
|
4024
|
+
'Max win': 'Макс. выигрыш',
|
|
4025
|
+
Menu: 'Меню',
|
|
4026
|
+
'Menu & info': 'Меню и информация',
|
|
4027
|
+
Modes: 'Режимы',
|
|
4028
|
+
Music: 'Музыка',
|
|
4029
|
+
Mute: 'Отключить звук',
|
|
4030
|
+
'Mute or unmute the game.': 'Включить или отключить звук.',
|
|
4031
|
+
Navigate: 'Навигация',
|
|
4032
|
+
'Open settings and game info.': 'Открыть настройки и информацию об игре.',
|
|
4033
|
+
'Open the paytable and rules.': 'Открыть таблицу выплат и правила.',
|
|
4034
|
+
'Pay a fixed cost to enter a bonus feature.': 'Заплатите фиксированную сумму для входа в бонусный раунд.',
|
|
4035
|
+
Paylines: 'Линии выплат',
|
|
4036
|
+
Paytable: 'Таблица выплат',
|
|
4037
|
+
'Pays anywhere': 'Выплачивает в любом месте',
|
|
4038
|
+
Price: 'Цена',
|
|
4039
|
+
'Raise bet': 'Повысить ставку',
|
|
4040
|
+
Replay: 'Повтор',
|
|
4041
|
+
RTP: 'RTP',
|
|
4042
|
+
SFX: 'Звуковые эффекты',
|
|
4043
|
+
Settings: 'Настройки',
|
|
4044
|
+
Sound: 'Звук',
|
|
4045
|
+
Spin: 'Вращение',
|
|
4046
|
+
'Spin automatically a set number of times.': 'Автоматически вращать заданное количество раз.',
|
|
4047
|
+
'Speed up spin animations.': 'Ускорить анимацию вращений.',
|
|
4048
|
+
Start: 'Начать',
|
|
4049
|
+
'Start a spin at the current bet.': 'Начать вращение с текущей ставкой.',
|
|
4050
|
+
'Start replay': 'Начать повтор',
|
|
4051
|
+
'Total win': 'Общий выигрыш',
|
|
4052
|
+
Turbo: 'Турбо',
|
|
4053
|
+
'Ways to win': 'Способы выигрыша',
|
|
4054
|
+
Win: 'Выигрыш',
|
|
4055
|
+
'Winning shapes': 'Выигрышные комбинации',
|
|
4056
|
+
},
|
|
4057
|
+
tr: {
|
|
4058
|
+
DISCLAIMER: 'Yasal uyarı',
|
|
4059
|
+
Activate: 'Etkinleştir',
|
|
4060
|
+
Autoplay: 'Otomatik Oyun',
|
|
4061
|
+
Balance: 'Bakiye',
|
|
4062
|
+
Bet: 'Bahis',
|
|
4063
|
+
'BUY BONUS': 'BONUS SATIN AL',
|
|
4064
|
+
Buy: 'Satın al',
|
|
4065
|
+
'Buy bonus': 'Bonus satın al',
|
|
4066
|
+
Cancel: 'İptal',
|
|
4067
|
+
Close: 'Kapat',
|
|
4068
|
+
'Cluster pays': 'Küme ödemeleri',
|
|
4069
|
+
Confirm: 'Onayla',
|
|
4070
|
+
Controls: 'Kontroller',
|
|
4071
|
+
'Decrease your stake.': 'Bahsinizi azaltın.',
|
|
4072
|
+
DISABLE: 'DEVRE DIŞI',
|
|
4073
|
+
'Dismiss the current overlay.': 'Mevcut pencereyi kapat.',
|
|
4074
|
+
'Free spins': 'Ücretsiz dönüşler',
|
|
4075
|
+
Game: 'Oyun',
|
|
4076
|
+
'Game info': 'Oyun bilgisi',
|
|
4077
|
+
Hotkeys: 'Klavye kısayolları',
|
|
4078
|
+
'Increase your stake.': 'Bahsinizi artırın.',
|
|
4079
|
+
'Lower bet': 'Bahsi düşür',
|
|
4080
|
+
'Master volume': 'Ana ses',
|
|
4081
|
+
'Max win': 'Maks kazanç',
|
|
4082
|
+
Menu: 'Menü',
|
|
4083
|
+
'Menu & info': 'Menü ve bilgi',
|
|
4084
|
+
Modes: 'Modlar',
|
|
4085
|
+
Music: 'Müzik',
|
|
4086
|
+
Mute: 'Sessiz',
|
|
4087
|
+
'Mute or unmute the game.': 'Oyun sesini aç ya da kapat.',
|
|
4088
|
+
Navigate: 'Gezin',
|
|
4089
|
+
'Open settings and game info.': 'Ayarları ve oyun bilgisini aç.',
|
|
4090
|
+
'Open the paytable and rules.': 'Ödeme tablosunu ve kuralları aç.',
|
|
4091
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bonus özelliğine girmek için sabit bir ücret ödeyin.',
|
|
4092
|
+
Paylines: 'Ödeme çizgileri',
|
|
4093
|
+
Paytable: 'Ödeme tablosu',
|
|
4094
|
+
'Pays anywhere': 'Her yerde kazandırır',
|
|
4095
|
+
Price: 'Fiyat',
|
|
4096
|
+
'Raise bet': 'Bahsi artır',
|
|
4097
|
+
Replay: 'Tekrar oynat',
|
|
4098
|
+
RTP: 'RTP',
|
|
4099
|
+
SFX: 'Ses efektleri',
|
|
4100
|
+
Settings: 'Ayarlar',
|
|
4101
|
+
Sound: 'Ses',
|
|
4102
|
+
Spin: 'Döndür',
|
|
4103
|
+
'Spin automatically a set number of times.': 'Belirlenen sayıda otomatik döndür.',
|
|
4104
|
+
'Speed up spin animations.': 'Döndürme animasyonlarını hızlandır.',
|
|
4105
|
+
Start: 'Başlat',
|
|
4106
|
+
'Start a spin at the current bet.': 'Mevcut bahisle döndürmeyi başlat.',
|
|
4107
|
+
'Start replay': 'Tekrarı başlat',
|
|
4108
|
+
'Total win': 'Toplam kazanç',
|
|
4109
|
+
Turbo: 'Turbo',
|
|
4110
|
+
'Ways to win': 'Kazanma yolları',
|
|
4111
|
+
Win: 'Kazanç',
|
|
4112
|
+
'Winning shapes': 'Kazanan şekiller',
|
|
4113
|
+
},
|
|
4114
|
+
vi: {
|
|
4115
|
+
DISCLAIMER: 'Tuyên bố miễn trừ trách nhiệm',
|
|
4116
|
+
Activate: 'Kích hoạt',
|
|
4117
|
+
Autoplay: 'Tự động quay',
|
|
4118
|
+
Balance: 'Số dư',
|
|
4119
|
+
Bet: 'Cược',
|
|
4120
|
+
'BUY BONUS': 'MUA THƯỞNG',
|
|
4121
|
+
Buy: 'Mua',
|
|
4122
|
+
'Buy bonus': 'Mua thưởng',
|
|
4123
|
+
Cancel: 'Hủy',
|
|
4124
|
+
Close: 'Đóng',
|
|
4125
|
+
'Cluster pays': 'Trả theo cụm',
|
|
4126
|
+
Confirm: 'Xác nhận',
|
|
4127
|
+
Controls: 'Điều khiển',
|
|
4128
|
+
'Decrease your stake.': 'Giảm mức cược.',
|
|
4129
|
+
DISABLE: 'TẮT',
|
|
4130
|
+
'Dismiss the current overlay.': 'Đóng lớp phủ hiện tại.',
|
|
4131
|
+
'Free spins': 'Quay miễn phí',
|
|
4132
|
+
Game: 'Trò chơi',
|
|
4133
|
+
'Game info': 'Thông tin trò chơi',
|
|
4134
|
+
Hotkeys: 'Phím tắt',
|
|
4135
|
+
'Increase your stake.': 'Tăng mức cược.',
|
|
4136
|
+
'Lower bet': 'Giảm cược',
|
|
4137
|
+
'Master volume': 'Âm lượng chính',
|
|
4138
|
+
'Max win': 'Thắng tối đa',
|
|
4139
|
+
Menu: 'Menu',
|
|
4140
|
+
'Menu & info': 'Menu & thông tin',
|
|
4141
|
+
Modes: 'Chế độ',
|
|
4142
|
+
Music: 'Âm nhạc',
|
|
4143
|
+
Mute: 'Tắt âm',
|
|
4144
|
+
'Mute or unmute the game.': 'Tắt hoặc bật âm thanh trò chơi.',
|
|
4145
|
+
Navigate: 'Điều hướng',
|
|
4146
|
+
'Open settings and game info.': 'Mở cài đặt và thông tin trò chơi.',
|
|
4147
|
+
'Open the paytable and rules.': 'Mở bảng trả thưởng và quy tắc.',
|
|
4148
|
+
'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.',
|
|
4149
|
+
Paylines: 'Đường thắng',
|
|
4150
|
+
Paytable: 'Bảng trả thưởng',
|
|
4151
|
+
'Pays anywhere': 'Trả bất cứ đâu',
|
|
4152
|
+
Price: 'Giá',
|
|
4153
|
+
'Raise bet': 'Tăng cược',
|
|
4154
|
+
Replay: 'Xem lại',
|
|
4155
|
+
RTP: 'RTP',
|
|
4156
|
+
SFX: 'Hiệu ứng âm thanh',
|
|
4157
|
+
Settings: 'Cài đặt',
|
|
4158
|
+
Sound: 'Âm thanh',
|
|
4159
|
+
Spin: 'Quay',
|
|
4160
|
+
'Spin automatically a set number of times.': 'Tự động quay một số lần nhất định.',
|
|
4161
|
+
'Speed up spin animations.': 'Tăng tốc độ hoạt ảnh quay.',
|
|
4162
|
+
Start: 'Bắt đầu',
|
|
4163
|
+
'Start a spin at the current bet.': 'Bắt đầu quay với mức cược hiện tại.',
|
|
4164
|
+
'Start replay': 'Bắt đầu xem lại',
|
|
4165
|
+
'Total win': 'Tổng thắng',
|
|
4166
|
+
Turbo: 'Turbo',
|
|
4167
|
+
'Ways to win': 'Cách thắng',
|
|
4168
|
+
Win: 'Thắng',
|
|
4169
|
+
'Winning shapes': 'Hình thắng',
|
|
4170
|
+
},
|
|
4171
|
+
zh: {
|
|
4172
|
+
DISCLAIMER: '免责声明',
|
|
4173
|
+
Activate: '激活',
|
|
4174
|
+
Autoplay: '自动游戏',
|
|
4175
|
+
Balance: '余额',
|
|
4176
|
+
Bet: '投注',
|
|
4177
|
+
'BUY BONUS': '购买奖励',
|
|
4178
|
+
Buy: '购买',
|
|
4179
|
+
'Buy bonus': '购买奖励',
|
|
4180
|
+
Cancel: '取消',
|
|
4181
|
+
Close: '关闭',
|
|
4182
|
+
'Cluster pays': '集群赔付',
|
|
4183
|
+
Confirm: '确认',
|
|
4184
|
+
Controls: '控制',
|
|
4185
|
+
'Decrease your stake.': '降低投注额。',
|
|
4186
|
+
DISABLE: '禁用',
|
|
4187
|
+
'Dismiss the current overlay.': '关闭当前弹窗。',
|
|
4188
|
+
'Free spins': '免费旋转',
|
|
4189
|
+
Game: '游戏',
|
|
4190
|
+
'Game info': '游戏信息',
|
|
4191
|
+
Hotkeys: '快捷键',
|
|
4192
|
+
'Increase your stake.': '提高投注额。',
|
|
4193
|
+
'Lower bet': '降低投注',
|
|
4194
|
+
'Master volume': '主音量',
|
|
4195
|
+
'Max win': '最大奖金',
|
|
4196
|
+
Menu: '菜单',
|
|
4197
|
+
'Menu & info': '菜单与信息',
|
|
4198
|
+
Modes: '模式',
|
|
4199
|
+
Music: '音乐',
|
|
4200
|
+
Mute: '静音',
|
|
4201
|
+
'Mute or unmute the game.': '静音或取消静音。',
|
|
4202
|
+
Navigate: '导航',
|
|
4203
|
+
'Open settings and game info.': '打开设置和游戏信息。',
|
|
4204
|
+
'Open the paytable and rules.': '打开赔付表和规则。',
|
|
4205
|
+
'Pay a fixed cost to enter a bonus feature.': '支付固定费用以进入奖励功能。',
|
|
4206
|
+
Paylines: '赔付线',
|
|
4207
|
+
Paytable: '赔付表',
|
|
4208
|
+
'Pays anywhere': '任意位置赢',
|
|
4209
|
+
Price: '价格',
|
|
4210
|
+
'Raise bet': '提高投注',
|
|
4211
|
+
Replay: '重播',
|
|
4212
|
+
RTP: 'RTP',
|
|
4213
|
+
SFX: '音效',
|
|
4214
|
+
Settings: '设置',
|
|
4215
|
+
Sound: '声音',
|
|
4216
|
+
Spin: '旋转',
|
|
4217
|
+
'Spin automatically a set number of times.': '自动旋转设定次数。',
|
|
4218
|
+
'Speed up spin animations.': '加速旋转动画。',
|
|
4219
|
+
Start: '开始',
|
|
4220
|
+
'Start a spin at the current bet.': '以当前投注额开始旋转。',
|
|
4221
|
+
'Start replay': '开始重播',
|
|
4222
|
+
'Total win': '总奖金',
|
|
4223
|
+
Turbo: '急速',
|
|
4224
|
+
'Ways to win': '赢法',
|
|
4225
|
+
Win: '奖金',
|
|
4226
|
+
'Winning shapes': '赢利图形',
|
|
4227
|
+
},
|
|
4228
|
+
};
|
|
4229
|
+
|
|
2715
4230
|
// Social-casino language. English is the source (and, for now, the only) language; `socialize`
|
|
2716
4231
|
// rewrites the restricted gambling vocabulary into social-safe phrasing while preserving case.
|
|
2717
4232
|
//
|
|
@@ -2784,6 +4299,21 @@ function socialize(text) {
|
|
|
2784
4299
|
return repl == null ? m : applyCase(m, repl);
|
|
2785
4300
|
});
|
|
2786
4301
|
}
|
|
4302
|
+
const LANGS = ['de', 'en', 'es', 'fi', 'fr', 'hi', 'id', 'ja', 'ko', 'pl', 'pt', 'ru', 'tr', 'vi', 'zh', 'da'];
|
|
4303
|
+
const LANG_SET = new Set(LANGS);
|
|
4304
|
+
function normalizeLang(code) {
|
|
4305
|
+
const base = (code ?? '').toLowerCase().split(/[-_]/)[0];
|
|
4306
|
+
return (LANG_SET.has(base) ? base : 'en');
|
|
4307
|
+
}
|
|
4308
|
+
function createI18n(opts) {
|
|
4309
|
+
const lang = normalizeLang(opts.language);
|
|
4310
|
+
const t = (src) => {
|
|
4311
|
+
if (lang === 'en')
|
|
4312
|
+
return opts.isSocial ? socialize(src) : src;
|
|
4313
|
+
return opts.messages?.[lang]?.[src] ?? LOCALES[lang]?.[src] ?? src;
|
|
4314
|
+
};
|
|
4315
|
+
return { lang, t };
|
|
4316
|
+
}
|
|
2787
4317
|
|
|
2788
4318
|
const REMOVE_FADE_MS = 300;
|
|
2789
4319
|
class GameShell extends EventEmitter {
|
|
@@ -2799,10 +4329,19 @@ class GameShell extends EventEmitter {
|
|
|
2799
4329
|
prevBalance = 0;
|
|
2800
4330
|
prevWin = 0;
|
|
2801
4331
|
moneyAnims = [];
|
|
2802
|
-
|
|
4332
|
+
kbd;
|
|
4333
|
+
i18n;
|
|
4334
|
+
/** onKey handler of the currently open modal/overlay, if any (set in showModal, cleared in closeModal). */
|
|
4335
|
+
modalOnKey = undefined;
|
|
4336
|
+
/** Shared sound on/off state — Settings speaker toggle and the Shift+M hotkey stay in sync. The
|
|
4337
|
+
* game listens to `settingChange({ key: 'sound' })` to (un)mute audio. */
|
|
4338
|
+
soundOn = true;
|
|
4339
|
+
/** Set by the open Settings modal so Shift+M live-updates its speaker icon; cleared on close. */
|
|
4340
|
+
soundRefresh = null;
|
|
2803
4341
|
constructor(config) {
|
|
2804
4342
|
super();
|
|
2805
4343
|
this.config = config;
|
|
4344
|
+
this.i18n = createI18n({ language: config.language, isSocial: config.isSocial });
|
|
2806
4345
|
this.state = createInitialState(config);
|
|
2807
4346
|
this.styleEl = document.createElement('style');
|
|
2808
4347
|
this.styleEl.textContent = SHELL_CSS;
|
|
@@ -2818,12 +4357,54 @@ class GameShell extends EventEmitter {
|
|
|
2818
4357
|
this.prevWin = this.state.win;
|
|
2819
4358
|
this.observeLayout();
|
|
2820
4359
|
if (typeof document !== 'undefined') {
|
|
2821
|
-
|
|
4360
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
4361
|
+
const shell = this;
|
|
4362
|
+
const host = {
|
|
4363
|
+
get state() { return shell.state; },
|
|
4364
|
+
get hotkeysEnabled() { return shell.config.features.hotkeys !== false; },
|
|
4365
|
+
get spacebarEnabled() { return shell.config.features.spacebar !== false; },
|
|
4366
|
+
get turboLevels() { return shell.config.features.turbo; },
|
|
4367
|
+
get autoplayEnabled() { return shell.config.features.autoplay != null; },
|
|
4368
|
+
get buyBonusEnabled() { return shell.config.features.buyBonus !== false; },
|
|
4369
|
+
hasOpenLayer: () => shell.modalHost.childElementCount > 0,
|
|
4370
|
+
routeToLayer: (e) => shell.modalOnKey?.(e) ?? false,
|
|
4371
|
+
spin: () => shell.emit('spin'),
|
|
4372
|
+
stepBet: (dir) => {
|
|
4373
|
+
const next = stepBet(shell.state, dir);
|
|
4374
|
+
if (next === shell.state.bet)
|
|
4375
|
+
return;
|
|
4376
|
+
shell.state.bet = next;
|
|
4377
|
+
shell.emit('betChange', next);
|
|
4378
|
+
shell.render();
|
|
4379
|
+
},
|
|
4380
|
+
toggleAutoplay: () => {
|
|
4381
|
+
if (shell.state.autoplay.active) {
|
|
4382
|
+
shell.state.autoplay = { active: false, remaining: 0 };
|
|
4383
|
+
shell.emit('autoplayStop');
|
|
4384
|
+
shell.render();
|
|
4385
|
+
}
|
|
4386
|
+
else {
|
|
4387
|
+
shell.openAutoplayPicker();
|
|
4388
|
+
}
|
|
4389
|
+
},
|
|
4390
|
+
cycleTurbo: () => {
|
|
4391
|
+
const next = nextTurbo(shell.state.turbo, shell.config.features.turbo);
|
|
4392
|
+
shell.state.turbo = next;
|
|
4393
|
+
shell.emit('turboChange', next);
|
|
4394
|
+
shell.render();
|
|
4395
|
+
},
|
|
4396
|
+
openBuyBonus: () => shell.openBuyBonus(),
|
|
4397
|
+
openInfo: () => shell.openInfo(),
|
|
4398
|
+
openMenu: () => shell.openMenu(),
|
|
4399
|
+
toggleMute: () => shell.setSound(!shell.soundOn),
|
|
4400
|
+
closeLayer: () => shell.closeModal(),
|
|
4401
|
+
};
|
|
4402
|
+
this.kbd = new KeyboardController(host);
|
|
4403
|
+
this.kbd.attach();
|
|
2822
4404
|
// Stake serves the game in an iframe; on first paint focus is on the HOST page, so a `document`
|
|
2823
4405
|
// keydown never fires and Space scrolls the parent. Pull window focus into the iframe on the
|
|
2824
4406
|
// first pointer interaction so the spacebar shortcut works. Harmless on full-page Energy8.
|
|
2825
4407
|
document.addEventListener('pointerdown', this.pullFocus, true);
|
|
2826
|
-
this.keysBound = true;
|
|
2827
4408
|
}
|
|
2828
4409
|
this.render();
|
|
2829
4410
|
// re-fit once the bundled webfont swaps in (text metrics change → row width changes)
|
|
@@ -2926,46 +4507,32 @@ class GameShell extends EventEmitter {
|
|
|
2926
4507
|
zoomBar(s * (bar.clientWidth / bar.scrollWidth));
|
|
2927
4508
|
}
|
|
2928
4509
|
}
|
|
2929
|
-
/** Spacebar starts a spin — same path as the spin disc. Ignored when `features.spacebar` is
|
|
2930
|
-
* false, while a spin is running, while autoplay is active, outside base mode, when an
|
|
2931
|
-
* overlay/modal is open, or when an editable element is focused. `repeat` (held key) is
|
|
2932
|
-
* ignored so it can't spam. */
|
|
2933
4510
|
/** Pull window focus into the iframe on first pointer interaction so `document` keydown (the
|
|
2934
4511
|
* spacebar shortcut) fires. No-op / harmless when already focused or full-page. */
|
|
2935
4512
|
pullFocus = () => { try {
|
|
2936
4513
|
window.focus();
|
|
2937
4514
|
}
|
|
2938
4515
|
catch { /* cross-origin / non-browser */ } };
|
|
2939
|
-
handleKeyDown = (e) => {
|
|
2940
|
-
if (this.destroyed || e.code !== 'Space' || e.repeat)
|
|
2941
|
-
return;
|
|
2942
|
-
if (this.config.features.spacebar === false)
|
|
2943
|
-
return; // shortcut disabled (e.g. jurisdiction)
|
|
2944
|
-
const t = e.target;
|
|
2945
|
-
if (t && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)))
|
|
2946
|
-
return;
|
|
2947
|
-
// Space is ours now — swallow the browser default before any no-op bail. Otherwise the
|
|
2948
|
-
// native "Space activates the focused button" still fires and re-clicks whichever shell
|
|
2949
|
-
// <button> (menu/buy/auto) opened the overlay, tearing down + rebuilding the modal: a
|
|
2950
|
-
// visible flicker. (Also stops the page from scrolling on Space.)
|
|
2951
|
-
e.preventDefault();
|
|
2952
|
-
if (this.modalHost.childElementCount > 0)
|
|
2953
|
-
return; // an overlay/modal is open
|
|
2954
|
-
if (this.state.mode !== 'base' || this.state.busy || this.state.autoplay.active)
|
|
2955
|
-
return;
|
|
2956
|
-
this.emit('spin');
|
|
2957
|
-
};
|
|
2958
4516
|
setLayout(layout) {
|
|
2959
4517
|
if (layout === this.layout)
|
|
2960
4518
|
return;
|
|
2961
4519
|
this.layout = layout;
|
|
2962
4520
|
this.render();
|
|
2963
4521
|
}
|
|
2964
|
-
/** Resolve a built-in shell string
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
4522
|
+
/** Resolve a built-in shell string through the i18n resolver (translation + optional socialize). */
|
|
4523
|
+
t(text) { return this.i18n.t(text); }
|
|
4524
|
+
/** Toggle the social vocabulary at runtime (rebuilds resolver, re-renders bar). */
|
|
4525
|
+
setSocial(isSocial) {
|
|
4526
|
+
this.config.isSocial = isSocial;
|
|
4527
|
+
this.i18n = createI18n({ language: this.config.language, isSocial });
|
|
4528
|
+
this.render();
|
|
4529
|
+
}
|
|
4530
|
+
/** Swap the active language at runtime (rebuilds resolver, re-renders bar). */
|
|
4531
|
+
setLanguage(lang) {
|
|
4532
|
+
this.config.language = lang;
|
|
4533
|
+
this.i18n = createI18n({ language: lang, isSocial: this.config.isSocial });
|
|
4534
|
+
this.render();
|
|
4535
|
+
}
|
|
2969
4536
|
/** Recolour the shell at runtime (e.g. switch dark/light scheme). */
|
|
2970
4537
|
setTheme(theme) {
|
|
2971
4538
|
this.config.theme = theme;
|
|
@@ -3006,7 +4573,7 @@ class GameShell extends EventEmitter {
|
|
|
3006
4573
|
this.state.mode = mode;
|
|
3007
4574
|
this.render();
|
|
3008
4575
|
}
|
|
3009
|
-
setBusy(busy) { this.state.busy = busy; this.render(); }
|
|
4576
|
+
setBusy(busy) { this.state.busy = busy; this.render(); this.kbd?.notifyBusyChanged(busy); }
|
|
3010
4577
|
setAutoplay(a) { this.state.autoplay = a; this.render(); }
|
|
3011
4578
|
setTurbo(level) { this.state.turbo = level; this.render(); }
|
|
3012
4579
|
/** Currency-aware money formatter for WIN amounts (variable decimals: 0.0041 stays 0.0041, not
|
|
@@ -3014,7 +4581,7 @@ class GameShell extends EventEmitter {
|
|
|
3014
4581
|
formatWin(value) { return formatCurrency(value, this.config.currency, true); }
|
|
3015
4582
|
setBuyBonusEnabled(enabled) { this.state.buyBonusEnabled = enabled; this.render(); }
|
|
3016
4583
|
setFreeSpins(fs) { this.state.freeSpins = fs; this.render(); }
|
|
3017
|
-
showModal(el) {
|
|
4584
|
+
showModal(el, onKey) {
|
|
3018
4585
|
// The control that opened this overlay (menu/buy/auto) keeps DOM focus. Drop it, or a
|
|
3019
4586
|
// stray Space/Enter would natively re-activate that <button> and rebuild the modal — a
|
|
3020
4587
|
// visible flicker. Only relinquish focus we own (a shell control), never the host page's.
|
|
@@ -3023,6 +4590,7 @@ class GameShell extends EventEmitter {
|
|
|
3023
4590
|
active.blur();
|
|
3024
4591
|
this.modalHost.innerHTML = '';
|
|
3025
4592
|
this.modalHost.appendChild(el);
|
|
4593
|
+
this.modalOnKey = onKey;
|
|
3026
4594
|
this.fitModals();
|
|
3027
4595
|
}
|
|
3028
4596
|
/** Uniformly scale every open centred card modal (`.ge-sheet`) down so it fits a short/narrow
|
|
@@ -3075,22 +4643,31 @@ class GameShell extends EventEmitter {
|
|
|
3075
4643
|
}
|
|
3076
4644
|
openMenu() { this.emit('menuOpen'); this.openSettings(); }
|
|
3077
4645
|
openSettings() { this.emit('settingsOpen'); this.showModal(openSettingsModal(this)); }
|
|
3078
|
-
openInfo() { this.emit('infoOpen'); this.showModal(
|
|
4646
|
+
openInfo() { this.emit('infoOpen'); const { root, onKey } = openGameInfoModal(this); this.showModal(root, onKey); }
|
|
3079
4647
|
openBuyBonus() {
|
|
3080
4648
|
if (this.config.onBonusBuy) {
|
|
3081
4649
|
this.config.onBonusBuy();
|
|
3082
4650
|
return;
|
|
3083
4651
|
} // game handles it (own UI)
|
|
3084
|
-
const
|
|
3085
|
-
if (
|
|
3086
|
-
this.showModal(
|
|
4652
|
+
const result = openBuyBonusOverlay(this);
|
|
4653
|
+
if (result)
|
|
4654
|
+
this.showModal(result.root, result.onKey);
|
|
3087
4655
|
}
|
|
3088
4656
|
/** Open a generic, externally-driven modal (title + body + optional action buttons).
|
|
3089
4657
|
* Each action runs its `on` then closes; the ✕ shows when `availableClose` is true. */
|
|
3090
|
-
openModal(opts) { this.showModal(buildModal(opts)); }
|
|
4658
|
+
openModal(opts) { this.showModal(buildModal(opts), opts.onKey); }
|
|
3091
4659
|
/** Programmatically dismiss whatever modal/overlay is currently shown (e.g. auto-close the
|
|
3092
4660
|
* reconnect overlay once the link is restored). No-op when nothing is open. */
|
|
3093
|
-
closeModal() { this.modalHost.innerHTML = ''; }
|
|
4661
|
+
closeModal() { this.modalOnKey = undefined; this.soundRefresh = null; this.modalHost.innerHTML = ''; }
|
|
4662
|
+
/** Flip the shared sound state, notify the game (`settingChange({ key: 'sound' })`), and live-update
|
|
4663
|
+
* the Settings speaker icon if that modal is open. Used by both the Settings toggle and Shift+M. */
|
|
4664
|
+
setSound(on) {
|
|
4665
|
+
this.soundOn = on;
|
|
4666
|
+
this.emit('settingChange', { key: 'sound', value: on });
|
|
4667
|
+
this.soundRefresh?.(on);
|
|
4668
|
+
}
|
|
4669
|
+
/** The Settings modal registers an icon-updater while open (cleared on close). */
|
|
4670
|
+
setSoundRefresh(fn) { this.soundRefresh = fn; }
|
|
3094
4671
|
/** Open the non-dismissable replay summary modal (START REPLAY → onReplay → reopen). */
|
|
3095
4672
|
openReplay(opts) {
|
|
3096
4673
|
if (this.destroyed)
|
|
@@ -3098,19 +4675,18 @@ class GameShell extends EventEmitter {
|
|
|
3098
4675
|
this.showModal(buildReplayModal(this, opts));
|
|
3099
4676
|
}
|
|
3100
4677
|
/** Bet picker — list of available bets with an accent Confirm. */
|
|
3101
|
-
openBetPicker() { this.showModal(
|
|
4678
|
+
openBetPicker() { const { root, onKey } = openBetModal(this); this.showModal(root, onKey); }
|
|
3102
4679
|
/** Autoplay picker — spin-count list; Confirm starts autoplay. */
|
|
3103
|
-
openAutoplayPicker() { this.showModal(
|
|
4680
|
+
openAutoplayPicker() { const { root, onKey } = openAutoplayModal(this); this.showModal(root, onKey); }
|
|
3104
4681
|
destroy() {
|
|
3105
4682
|
if (this.destroyed)
|
|
3106
4683
|
return Promise.resolve();
|
|
3107
4684
|
this.destroyed = true;
|
|
3108
4685
|
this.ro?.disconnect();
|
|
3109
4686
|
this.ro = null;
|
|
3110
|
-
if (
|
|
3111
|
-
|
|
4687
|
+
if (typeof document !== 'undefined') {
|
|
4688
|
+
this.kbd?.detach();
|
|
3112
4689
|
document.removeEventListener('pointerdown', this.pullFocus, true);
|
|
3113
|
-
this.keysBound = false;
|
|
3114
4690
|
}
|
|
3115
4691
|
this.cancelMoneyAnims();
|
|
3116
4692
|
this.removeAllListeners();
|
|
@@ -3154,5 +4730,5 @@ function removeGameShell() {
|
|
|
3154
4730
|
return shell.destroy();
|
|
3155
4731
|
}
|
|
3156
4732
|
|
|
3157
|
-
export { DevBridge, EventEmitter, GameShell, LOADER_BAR_MAX_WIDTH, PlatformSession, buildLogoSVG, createCSSPreloader, createGameShell, createPlatformSession, removeCSSPreloader, removeGameShell, setCSSPreloaderProgress, waitCSSPreloaderTap };
|
|
4733
|
+
export { DevBridge, EventEmitter, GameShell, LOADER_BAR_MAX_WIDTH$1 as LOADER_BAR_MAX_WIDTH, PlatformSession, buildLogoSVG, createCSSPreloader, createGameShell, createPlatformSession, removeCSSPreloader, removeGameShell, setCSSPreloaderProgress, waitCSSPreloaderTap };
|
|
3158
4734
|
//# sourceMappingURL=index.esm.js.map
|