@everymatrix/casino-game-thumb-view 1.44.0 → 1.45.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/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
- package/dist/casino-game-thumb-view/p-2207062c.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-39684b4a.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-af0284b5.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-b73b7a18.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-bd016895.entry.js +7 -0
- package/dist/casino-game-thumb-view/p-d2580653.js +8 -0
- package/dist/casino-game-thumb-view/p-d48c3566.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-e1255160.js +1 -0
- package/dist/casino-game-thumb-view/p-eef6f908.js +2 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +327 -322
- package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +45 -45
- package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +35 -34
- package/dist/cjs/casino-game-thumb-view.cjs.js +17 -11
- package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +469 -519
- package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +258 -251
- package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +14 -12
- package/dist/cjs/game-thumbnail-5a34c727.js +78 -0
- package/dist/cjs/index-48d13981.js +1709 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/locale.utils-53bf703a.js +132 -0
- package/dist/cjs/{utils-a0afc0a9.js → utils-c4ed3adc.js} +407 -404
- package/dist/collection/collection-manifest.json +10 -10
- package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +251 -230
- package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +136 -114
- package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +126 -119
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +1 -1
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1023 -1027
- package/dist/collection/components/casino-game-thumb-view/index.js +1 -0
- package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +78 -80
- package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +153 -150
- package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +201 -206
- package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +71 -58
- package/dist/collection/constants/game-thumbnail.js +66 -66
- package/dist/collection/models/casino-game-thumb-view.js +6 -6
- package/dist/collection/models/currency-symbols.js +170 -170
- package/dist/collection/utils/baccarat-board-svg.js +225 -225
- package/dist/collection/utils/locale.utils.js +122 -122
- package/dist/collection/utils/utils.js +41 -41
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-extrainfo-baccarat.entry.js +327 -322
- package/dist/esm/casino-extrainfo-blackjack.entry.js +45 -45
- package/dist/esm/casino-extrainfo-roulette.entry.js +35 -34
- package/dist/esm/casino-game-thumb-view.js +14 -11
- package/dist/esm/casino-game-thumb-view_2.entry.js +469 -519
- package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +258 -251
- package/dist/esm/casino-normal-game-thumbnail.entry.js +14 -12
- package/dist/esm/game-thumbnail-035e97e2.js +72 -0
- package/dist/esm/index-8c9a8030.js +1681 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/locale.utils-0c514ca8.js +130 -0
- package/dist/{components/utils.js → esm/utils-090ac2e9.js} +407 -404
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -35
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +36 -36
- package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +33 -33
- package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +18 -18
- package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +213 -213
- package/dist/types/components/casino-game-thumb-view/index.d.ts +1 -0
- package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +14 -14
- package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +13 -13
- package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +28 -28
- package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -4
- package/dist/types/components.d.ts +33 -2
- package/dist/types/constants/game-thumbnail.d.ts +66 -66
- package/dist/types/models/casino-game-thumb-view.d.ts +107 -107
- package/dist/types/models/currency-symbols.d.ts +170 -170
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/baccarat-board-svg.d.ts +29 -29
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -8
- package/dist/assets/baccarat.svg +0 -43
- package/dist/assets/fav.svg +0 -9
- package/dist/assets/favorite.svg +0 -12
- package/dist/assets/seat.svg +0 -6
- package/dist/assets/unfav.svg +0 -20
- package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-42bf2034.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-46dbb1cb.js +0 -1
- package/dist/casino-game-thumb-view/p-6a6b2a78.js +0 -8
- package/dist/casino-game-thumb-view/p-7ae107ed.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-d961aec4.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-db43bb56.entry.js +0 -7
- package/dist/cjs/game-thumbnail-31d518f0.js +0 -78
- package/dist/cjs/index-65a1d768.js +0 -1796
- package/dist/cjs/locale.utils-aa160787.js +0 -132
- package/dist/components/casino-extrainfo-baccarat.d.ts +0 -11
- package/dist/components/casino-extrainfo-baccarat.js +0 -400
- package/dist/components/casino-extrainfo-blackjack.d.ts +0 -11
- package/dist/components/casino-extrainfo-blackjack.js +0 -92
- package/dist/components/casino-extrainfo-roulette.d.ts +0 -11
- package/dist/components/casino-extrainfo-roulette.js +0 -78
- package/dist/components/casino-game-thumb-view.d.ts +0 -11
- package/dist/components/casino-game-thumb-view.js +0 -1625
- package/dist/components/casino-game-thumbnail-betlimit.d.ts +0 -11
- package/dist/components/casino-game-thumbnail-betlimit.js +0 -6
- package/dist/components/casino-game-thumbnail-betlimit2.js +0 -227
- package/dist/components/casino-game-thumbnail-extrainfo.d.ts +0 -11
- package/dist/components/casino-game-thumbnail-extrainfo.js +0 -6
- package/dist/components/casino-game-thumbnail-extrainfo2.js +0 -96
- package/dist/components/casino-game-thumbnail-overlay.d.ts +0 -11
- package/dist/components/casino-game-thumbnail-overlay.js +0 -6
- package/dist/components/casino-game-thumbnail-overlay2.js +0 -69
- package/dist/components/casino-normal-game-thumbnail.d.ts +0 -11
- package/dist/components/casino-normal-game-thumbnail.js +0 -52
- package/dist/components/game-thumbnail.js +0 -72
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/locale.utils.js +0 -130
- package/dist/esm/game-thumbnail-0a56ee03.js +0 -72
- package/dist/esm/index-1e44dd9f.js +0 -1769
- package/dist/esm/locale.utils-e0cf897e.js +0 -130
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/utils-e9314132.js +0 -5739
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +0 -2
- /package/dist/casino-game-thumb-view/{p-2d5f59fe.js → p-2d02adb1.js} +0 -0
- /package/dist/casino-game-thumb-view/{p-1e63a1ab.js → p-59ceeaaa.js} +0 -0
@@ -1,31 +1,19 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
2
|
-
import { c as convertGicBaccaratUpdateItem, i as isMobile } from './utils-
|
3
|
-
import { G as GAME_CATEGORY, a as GAME_TYPE, W as WIDGETTYPE_GAMECATEGORY } from './game-thumbnail-
|
4
|
-
import { t as translate } from './locale.utils-
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-8c9a8030.js';
|
2
|
+
import { c as convertGicBaccaratUpdateItem, i as isMobile } from './utils-090ac2e9.js';
|
3
|
+
import { G as GAME_CATEGORY, a as GAME_TYPE, W as WIDGETTYPE_GAMECATEGORY } from './game-thumbnail-035e97e2.js';
|
4
|
+
import { t as translate } from './locale.utils-0c514ca8.js';
|
5
5
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
7
7
|
|
8
|
-
|
9
|
-
return module = {
|
10
|
-
path: basedir,
|
11
|
-
exports: {},
|
12
|
-
require: function (path, base) {
|
13
|
-
return commonjsRequire();
|
14
|
-
}
|
15
|
-
}, fn(module, module.exports), module.exports;
|
16
|
-
}
|
8
|
+
var eventsource = {exports: {}};
|
17
9
|
|
18
|
-
function commonjsRequire () {
|
19
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
20
|
-
}
|
21
|
-
|
22
|
-
var eventsource = createCommonjsModule(function (module, exports) {
|
23
10
|
/** @license
|
24
11
|
* eventsource.js
|
25
12
|
* Available under MIT License (MIT)
|
26
13
|
* https://github.com/Yaffle/EventSource/
|
27
|
-
*/
|
28
|
-
|
14
|
+
*/
|
15
|
+
|
16
|
+
(function (module, exports) {
|
29
17
|
/*jslint indent: 2, vars: true, plusplus: true */
|
30
18
|
/*global setTimeout, clearTimeout */
|
31
19
|
|
@@ -1061,547 +1049,509 @@ var eventsource = createCommonjsModule(function (module, exports) {
|
|
1061
1049
|
exports.EventSource = R;
|
1062
1050
|
});
|
1063
1051
|
}(typeof globalThis === 'undefined' ? (typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : commonjsGlobal) : globalThis));
|
1064
|
-
});
|
1052
|
+
}(eventsource, eventsource.exports));
|
1065
1053
|
|
1066
|
-
const
|
1067
|
-
version="1.1"
|
1068
|
-
xmlns="http://www.w3.org/2000/svg"
|
1069
|
-
viewBox="0 0 19.481 19.481"
|
1070
|
-
enable-background="new 0 0 19.481 19.481"
|
1071
|
-
>
|
1072
|
-
<path
|
1073
|
-
d="m10.201,.758l2.478,5.865 6.344,.545c0.44,0.038 0.619,0.587 0.285,0.876l-4.812,4.169 1.442,6.202c0.1,0.431-0.367,0.77-0.745,0.541l-5.452-3.288-5.452,3.288c-0.379,0.228-0.845-0.111-0.745-0.541l1.442-6.202-4.813-4.17c-0.334-0.289-0.156-0.838 0.285-0.876l6.344-.545 2.478-5.864c0.172-0.408 0.749-0.408 0.921,0z"/>
|
1074
|
-
</svg>
|
1075
|
-
`;
|
1054
|
+
const favSvg = 'data:image/svg+xml;base64,PHN2ZwogIHZlcnNpb249IjEuMSIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgdmlld0JveD0iMCAwIDE5LjQ4MSAxOS40ODEiCiAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTkuNDgxIDE5LjQ4MSIKPgogIDxwYXRoCiAgICBkPSJtMTAuMjAxLC43NThsMi40NzgsNS44NjUgNi4zNDQsLjU0NWMwLjQ0LDAuMDM4IDAuNjE5LDAuNTg3IDAuMjg1LDAuODc2bC00LjgxMiw0LjE2OSAxLjQ0Miw2LjIwMmMwLjEsMC40MzEtMC4zNjcsMC43Ny0wLjc0NSwwLjU0MWwtNS40NTItMy4yODgtNS40NTIsMy4yODhjLTAuMzc5LDAuMjI4LTAuODQ1LTAuMTExLTAuNzQ1LTAuNTQxbDEuNDQyLTYuMjAyLTQuODEzLTQuMTdjLTAuMzM0LTAuMjg5LTAuMTU2LTAuODM4IDAuMjg1LTAuODc2bDYuMzQ0LS41NDUgMi40NzgtNS44NjRjMC4xNzItMC40MDggMC43NDktMC40MDggMC45MjEsMHoiLz4KPC9zdmc+Cg==';
|
1076
1055
|
|
1077
|
-
const
|
1078
|
-
version="1.1"
|
1079
|
-
class="UnfavoredIcon"
|
1080
|
-
xmlns="http://www.w3.org/2000/svg"
|
1081
|
-
x="20px"
|
1082
|
-
y="20px"
|
1083
|
-
viewBox="0 0 512.001 512.001"
|
1084
|
-
>
|
1085
|
-
<path
|
1086
|
-
d="M511.266,197.256c-1.764-5.431-6.458-9.388-12.108-10.209l-158.722-23.065L269.452,20.155
|
1087
|
-
c-2.527-5.12-7.741-8.361-13.451-8.361c-5.709,0-10.924,3.242-13.451,8.361l-70.988,143.828L12.843,187.047
|
1088
|
-
c-5.65,0.821-10.344,4.779-12.108,10.209c-1.765,5.43-0.293,11.391,3.795,15.376l114.848,111.955L92.27,482.67
|
1089
|
-
c-0.965,5.627,1.349,11.315,5.968,14.67c4.618,3.355,10.74,3.798,15.797,1.142L256,423.846l141.961,74.637
|
1090
|
-
c2.195,1.154,4.591,1.723,6.979,1.723c3.11,0,6.206-0.966,8.818-2.865c4.619-3.356,6.933-9.043,5.968-14.671L392.61,324.587
|
1091
|
-
l114.86-111.954C511.559,208.647,513.031,202.686,511.266,197.256z M366.023,308.608c-3.536,3.446-5.15,8.412-4.314,13.278
|
1092
|
-
l23.311,135.898l-122.038-64.162c-4.37-2.297-9.591-2.297-13.961,0l-122.045,64.163l23.304-135.9
|
1093
|
-
c0.834-4.866-0.779-9.83-4.313-13.276l-98.731-96.244l136.445-19.829c4.886-0.71,9.108-3.778,11.294-8.205L256,60.685
|
1094
|
-
l61.023,123.645c2.186,4.427,6.408,7.496,11.294,8.206l136.447,19.828L366.023,308.608z"
|
1095
|
-
/>
|
1096
|
-
</svg>
|
1097
|
-
`;
|
1056
|
+
const unfavSvg = 'data:image/svg+xml;base64,PHN2ZwogIHZlcnNpb249IjEuMSIKICBjbGFzcz0iVW5mYXZvcmVkSWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgeD0iMjBweCIKICB5PSIyMHB4IgogIHZpZXdCb3g9IjAgMCA1MTIuMDAxIDUxMi4wMDEiCj4KICA8cGF0aAogICAgZD0iTTUxMS4yNjYsMTk3LjI1NmMtMS43NjQtNS40MzEtNi40NTgtOS4zODgtMTIuMTA4LTEwLjIwOWwtMTU4LjcyMi0yMy4wNjVMMjY5LjQ1MiwyMC4xNTUKICAgICAgICAgICAgICAgICAgICAgIGMtMi41MjctNS4xMi03Ljc0MS04LjM2MS0xMy40NTEtOC4zNjFjLTUuNzA5LDAtMTAuOTI0LDMuMjQyLTEzLjQ1MSw4LjM2MWwtNzAuOTg4LDE0My44MjhMMTIuODQzLDE4Ny4wNDcKICAgICAgICAgICAgICAgICAgICAgIGMtNS42NSwwLjgyMS0xMC4zNDQsNC43NzktMTIuMTA4LDEwLjIwOWMtMS43NjUsNS40My0wLjI5MywxMS4zOTEsMy43OTUsMTUuMzc2bDExNC44NDgsMTExLjk1NUw5Mi4yNyw0ODIuNjcKICAgICAgICAgICAgICAgICAgICAgIGMtMC45NjUsNS42MjcsMS4zNDksMTEuMzE1LDUuOTY4LDE0LjY3YzQuNjE4LDMuMzU1LDEwLjc0LDMuNzk4LDE1Ljc5NywxLjE0MkwyNTYsNDIzLjg0NmwxNDEuOTYxLDc0LjYzNwogICAgICAgICAgICAgICAgICAgICAgYzIuMTk1LDEuMTU0LDQuNTkxLDEuNzIzLDYuOTc5LDEuNzIzYzMuMTEsMCw2LjIwNi0wLjk2Niw4LjgxOC0yLjg2NWM0LjYxOS0zLjM1Niw2LjkzMy05LjA0Myw1Ljk2OC0xNC42NzFMMzkyLjYxLDMyNC41ODcKICAgICAgICAgICAgICAgICAgICAgIGwxMTQuODYtMTExLjk1NEM1MTEuNTU5LDIwOC42NDcsNTEzLjAzMSwyMDIuNjg2LDUxMS4yNjYsMTk3LjI1NnogTTM2Ni4wMjMsMzA4LjYwOGMtMy41MzYsMy40NDYtNS4xNSw4LjQxMi00LjMxNCwxMy4yNzgKICAgICAgICAgICAgICAgICAgICAgIGwyMy4zMTEsMTM1Ljg5OGwtMTIyLjAzOC02NC4xNjJjLTQuMzctMi4yOTctOS41OTEtMi4yOTctMTMuOTYxLDBsLTEyMi4wNDUsNjQuMTYzbDIzLjMwNC0xMzUuOQogICAgICAgICAgICAgICAgICAgICAgYzAuODM0LTQuODY2LTAuNzc5LTkuODMtNC4zMTMtMTMuMjc2bC05OC43MzEtOTYuMjQ0bDEzNi40NDUtMTkuODI5YzQuODg2LTAuNzEsOS4xMDgtMy43NzgsMTEuMjk0LTguMjA1TDI1Niw2MC42ODUKICAgICAgICAgICAgICAgICAgICAgIGw2MS4wMjMsMTIzLjY0NWMyLjE4Niw0LjQyNyw2LjQwOCw3LjQ5NiwxMS4yOTQsOC4yMDZsMTM2LjQ0NywxOS44MjhMMzY2LjAyMywzMDguNjA4eiIKICAvPgo8L3N2Zz4K';
|
1098
1057
|
|
1099
|
-
const casinoGameThumbViewCss = ":host{display:block}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.GameContainer{width:100%;height:100%;position:relative}.GameInnerContainer{position:relative;width:100%;height:100%;overflow:hidden;border-radius:5px}.GameInnerContainer .GameBg{width:100%;height:100%;object-fit:unset;transition:all 150ms ease-in-out}.GameInnerContainer .GameBg.GameBg-1x2,.GameInnerContainer .GameBg.GameBg-2x1,.GameInnerContainer .GameBg.GameBg-2x2{object-fit:cover}.GameInnerContainer:hover{cursor:pointer}.GameInnerContainer:hover .GameInfoWrapper{display:block}.GameInnerContainer:hover .GameBg{filter:blur(5px) grayscale(1)}.ListGame.GameBackdrop .GameInnerContainer::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(0deg,
|
1058
|
+
const casinoGameThumbViewCss = ":host{display:block}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.GameContainer{width:100%;height:100%;position:relative}.GameInnerContainer{position:relative;width:100%;height:100%;overflow:hidden;border-radius:5px}.GameInnerContainer .GameBg{width:100%;height:100%;object-fit:unset;transition:all 150ms ease-in-out}.GameInnerContainer .GameBg.GameBg-1x2,.GameInnerContainer .GameBg.GameBg-2x1,.GameInnerContainer .GameBg.GameBg-2x2{object-fit:cover}.GameInnerContainer:hover{cursor:pointer}.GameInnerContainer:hover .GameInfoWrapper{display:block}.GameInnerContainer:hover .GameBg{filter:blur(5px) grayscale(1)}.ListGame.GameBackdrop .GameInnerContainer::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(0deg, rgb(0, 0, 0) 15%, rgba(0, 0, 0, 0) 100%)}.ListGame .GameInnerContainer{z-index:0}.ListGame .GameInnerContainer .GameBg{z-index:5}.ListGame .GameInnerContainer::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0}.ListGame .GameInnerContainer.GameInnerContainerUnavailable::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0, 0, 0, 0.9)}.ListGame .GameInnerContainer .ListGame:hover .OpenSeat,.ListGame .GameInnerContainer .ListGame:hover .ClosedSeat,.ListGame .GameInnerContainer .ListGame:hover .LiveLimits,.ListGame .GameInnerContainer .ListGame:hover .LatestResult,.ListGame .GameInnerContainer .ListGame:hover .FullTable,.ListGame .GameInnerContainer .ListGame:active .OpenSeat,.ListGame .GameInnerContainer .ListGame:active .ClosedSeat,.ListGame .GameInnerContainer .ListGame:active .LiveLimits,.ListGame .GameInnerContainer .ListGame:active .LatestResult,.ListGame .GameInnerContainer .ListGame:active .FullTable{opacity:0.2}.ListGame .GameInnerContainer .ListGame.GameContainerDimmed:before{display:block;content:\" \";width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background:rgba(0, 0, 0, 0.4);color:var(--emfe-w-color-white, #FFFFFF);fill:var(--emfe-w-color-white, #FFFFFF);opacity:1;border-radius:4px}.ListGame .GameInnerContainer .ListGame.GameContainerFullyDimmed:before{display:block;content:\" \";width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background:rgba(0, 0, 0, 0.8);color:var(--emfe-w-color-white, #FFFFFF);fill:var(--emfe-w-color-white, #FFFFFF);opacity:1;border-radius:4px}.ListGame .GameInnerContainer .ListGame:hover .LiveProps,.ListGame .GameInnerContainer .ListGameLink:hover .LiveProps{opacity:0}@keyframes red-pulse{0%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}15%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}30%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}50%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}65%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}80%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.75)}}@keyframes green-pulse{0%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}15%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}30%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}50%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}65%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}80%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}100%{box-shadow:0 0 0 0 rgba(86, 168, 10, 0.75)}}@keyframes flip-open{0%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 90deg);transform:perspective(400px) rotate3d(0, 1, 0, 90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -20deg);transform:perspective(400px) rotate3d(0, 1, 0, -20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 10deg);transform:perspective(400px) rotate3d(0, 1, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -5deg);transform:perspective(400px) rotate3d(0, 1, 0, -5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.ListGame .GameInnerContainer .silde-in-from-left{-webkit-animation-name:silde-in-from-left;animation-name:silde-in-from-left;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes silde-in-from-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes silde-in-from-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes flip-closed-seat{0%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 90deg);transform:perspective(400px) rotate3d(0, 1, 0, 90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -20deg);transform:perspective(400px) rotate3d(0, 1, 0, -20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 10deg);transform:perspective(400px) rotate3d(0, 1, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -5deg);transform:perspective(400px) rotate3d(0, 1, 0, -5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.ListGame .GameInnerContainer .ListGame.PulsatingGreenShadow{animation:green-pulse 2s linear}.ListGame .GameInnerContainer .ListGame.PulsatingRedShadow{animation:red-pulse 2s linear}.ListGame .GameInnerContainer .Blue{color:#4d90a7}.ListGame .GameInnerContainer .Red{background-color:red}.ListGame .GameInnerContainer .Black{background-color:var(--emfe-w-color-black, #000000)}.ListGame .GameInnerContainer .Green{background-color:#56A80A}.ListGame .GameInnerContainer .White{background-color:var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .Yellow{background-color:#eeca3d}.ListGame .GameInnerContainer .Gold{background-color:#866d0c}.ListGame .GameInnerContainer .Orange{background-color:#574708}.ListGame .GameInnerContainer .Purple{background-color:#330033}.ListGame .GameInnerContainer .Tie{background-color:var(--emfe-w-color-white, #FFFFFF);background-image:linear-gradient(135deg, var(--emfe-w-color-white, #FFFFFF) 25%, transparent 25%, transparent 50%, #212121 50%, var(--emfe-w-color-white, #FFFFFF) 75%, transparent 75%, var(--emfe-w-color-white, #FFFFFF))}.ListGame .GameInnerContainer .PlayersDisplay{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:2px 10px;background:linear-gradient(to bottom, rgba(33, 33, 33, 0.9) 0%, rgba(33, 33, 33, 0.1) 100%);color:var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .PlayersDisplay .PlayersIcon{width:14px;height:14px;margin-right:4px}.ListGame .GameInnerContainer .PlayersDisplay .PlayersIcon svg{fill:var(--emfe-w-color-white, #FFFFFF);width:100%;height:100%}.ListGame .GameInnerContainer .ClosedGame{opacity:1;z-index:10;padding:8px 10px;color:var(--emfe-w-color-white, #FFFFFF);font-size:18px}.ListGame .GameInnerContainer .ClosedGame span{font-size:18px}.ListGame .GameInnerContainer .Players{display:inline-block;width:19px;height:19px}.FavIconContainer{position:absolute;top:10px;right:10px;cursor:pointer;z-index:16;width:15px;height:15px;opacity:0}.FavIconContainer.Favorited{opacity:1}.FavIconContainer svg path{fill:#fff}.Hovered .FavIconContainer{opacity:1}.GameNameBelow{color:var(--emfe-w-color-white, #FFFFFF);position:relative;bottom:-5px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
|
1059
|
+
const CasinoGameThumbViewStyle0 = casinoGameThumbViewCss;
|
1100
1060
|
|
1101
1061
|
const CasinoGameThumbView = class {
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
.
|
1160
|
-
.
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
.
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
this.
|
1173
|
-
this.
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
gameContainerClass += ' GameBackdrop ';
|
1186
|
-
}
|
1187
|
-
}
|
1188
|
-
}
|
1189
|
-
return gameContainerClass;
|
1190
|
-
};
|
1191
|
-
}
|
1192
|
-
onSessionChanged() {
|
1193
|
-
this.isUserLoggedIn = !!(this.session && this.userId);
|
1194
|
-
}
|
1195
|
-
onTableFullChanged(newVal, oldVal) {
|
1196
|
-
if (oldVal == undefined) {
|
1197
|
-
return;
|
1198
|
-
}
|
1199
|
-
this.containerClassWhenDetailChange =
|
1200
|
-
newVal && !oldVal ? 'PulsatingRedShadow' : 'PulsatingGreenShadow';
|
1201
|
-
}
|
1202
|
-
handleMouseOver(event) {
|
1203
|
-
this.hover = event.type === 'mouseenter';
|
1204
|
-
}
|
1205
|
-
gameFavoritedHandler(event) {
|
1206
|
-
let eventDetail = event.detail;
|
1207
|
-
this.gameInfo.isFavorite = eventDetail[this.gameId];
|
1208
|
-
this.gameInfo = Object.assign({}, this.gameInfo);
|
1209
|
-
}
|
1210
|
-
connectLiveHandler() {
|
1211
|
-
this.toggleConnect();
|
1212
|
-
}
|
1213
|
-
visibilityConnectHandler() {
|
1214
|
-
this.toggleVisibilityConnect();
|
1215
|
-
}
|
1216
|
-
gameDetailChangeHandler(e) {
|
1217
|
-
var _a, _b;
|
1218
|
-
let message = JSON.parse(e.data);
|
1219
|
-
if (message.needReconnect && this.liveLobbyConnection) {
|
1220
|
-
this.liveLobbyConnection.close();
|
1221
|
-
this.liveLobbyConnection = null;
|
1222
|
-
this.connectGameToLiveLobby();
|
1223
|
-
return;
|
1062
|
+
constructor(hostRef) {
|
1063
|
+
registerInstance(this, hostRef);
|
1064
|
+
this.toggleFavoriteCasinoGameEvent = createEvent(this, "toggleCasinoGameFavorite", 7);
|
1065
|
+
this.thumbnailLoaded = false;
|
1066
|
+
this.containerClassWhenDetailChange = '';
|
1067
|
+
this.isUserLoggedIn = false;
|
1068
|
+
this.limitStylingAppends = false;
|
1069
|
+
//customize style setting
|
1070
|
+
this.setClientStyling = () => {
|
1071
|
+
let sheet = document.createElement('style');
|
1072
|
+
sheet.innerHTML = this.clientStyling;
|
1073
|
+
this.stylingContainer.prepend(sheet);
|
1074
|
+
};
|
1075
|
+
//customize style setting
|
1076
|
+
this.setClientStylingURL = () => {
|
1077
|
+
let url = new URL(this.clientStylingUrl);
|
1078
|
+
let cssFile = document.createElement('style');
|
1079
|
+
fetch(url.href)
|
1080
|
+
.then((res) => res.text())
|
1081
|
+
.then((data) => {
|
1082
|
+
cssFile.innerHTML = data;
|
1083
|
+
setTimeout(() => {
|
1084
|
+
this.stylingContainer.prepend(cssFile);
|
1085
|
+
}, 1);
|
1086
|
+
})
|
1087
|
+
.catch((err) => {
|
1088
|
+
console.error('error ', err);
|
1089
|
+
});
|
1090
|
+
};
|
1091
|
+
this.getGameCategoryType = () => {
|
1092
|
+
if (this.isLiveCasino &&
|
1093
|
+
this.gameCategory &&
|
1094
|
+
this.getWidgetTypeByGameCategory(this.gameCategory)) {
|
1095
|
+
return `casino-extrainfo-${this.getWidgetTypeByGameCategory(this.gameCategory).toLowerCase()}`;
|
1096
|
+
}
|
1097
|
+
return `casino-normal-game-thumbnail`;
|
1098
|
+
};
|
1099
|
+
this.getGameContainerClass = () => {
|
1100
|
+
let gameContainerClass = `GameContainer `;
|
1101
|
+
if (this.gameInfo) {
|
1102
|
+
if (this.gameInfo && this.gameInfo.details) {
|
1103
|
+
gameContainerClass += ' ListGame ';
|
1104
|
+
if (this.gameInfo.details.isOpen &&
|
1105
|
+
this.gameInfo.details.currentRouletteNumbers) {
|
1106
|
+
gameContainerClass += ' GameBackdrop ';
|
1107
|
+
}
|
1108
|
+
}
|
1109
|
+
}
|
1110
|
+
return gameContainerClass;
|
1111
|
+
};
|
1112
|
+
this.language = 'en';
|
1113
|
+
this.endpoint = undefined;
|
1114
|
+
this.userId = undefined;
|
1115
|
+
this.showGameName = undefined;
|
1116
|
+
this.session = undefined;
|
1117
|
+
this.showFavoredCategory = undefined;
|
1118
|
+
this.clientStyling = '';
|
1119
|
+
this.clientStylingUrl = '';
|
1120
|
+
this.integratedGameframeMobile = false;
|
1121
|
+
this.gamepageModalurl = undefined;
|
1122
|
+
this.integratedGameframeDesktop = false;
|
1123
|
+
this.loadDetails = false;
|
1124
|
+
this.showRoundBoard = false;
|
1125
|
+
this.visibilityConnect = undefined;
|
1126
|
+
this.connectLive = undefined;
|
1127
|
+
this.gameCategory = '';
|
1128
|
+
this.livelobbyEndpoint = undefined;
|
1129
|
+
this.gameId = undefined;
|
1130
|
+
this.gameName = undefined;
|
1131
|
+
this.subVendor = undefined;
|
1132
|
+
this.gameVendor = undefined;
|
1133
|
+
this.hasFunMode = undefined;
|
1134
|
+
this.hasAnonymousFunMode = undefined;
|
1135
|
+
this.platform = 'PC';
|
1136
|
+
this.thumbnail = undefined;
|
1137
|
+
this.isFavorite = undefined;
|
1138
|
+
this.isNew = undefined;
|
1139
|
+
this.cellSize = undefined;
|
1140
|
+
this.gameTag = undefined;
|
1141
|
+
this.type = undefined;
|
1142
|
+
this.gameInfo = undefined;
|
1143
|
+
this.isTableFull = undefined;
|
1144
|
+
this.hover = undefined;
|
1224
1145
|
}
|
1225
|
-
|
1226
|
-
|
1146
|
+
onSessionChanged() {
|
1147
|
+
this.isUserLoggedIn = !!(this.session && this.userId);
|
1227
1148
|
}
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
case 'TableClosed':
|
1232
|
-
this.gameInfo.details.isOpen = message.Open;
|
1233
|
-
break;
|
1234
|
-
case 'PlayersUpdated':
|
1235
|
-
this.gameInfo.details.numberOfPlayers = message.Players;
|
1236
|
-
break;
|
1237
|
-
case 'RouletteResultsUpdated':
|
1238
|
-
this.gameInfo.details.currentRouletteNumbers = message.Results;
|
1239
|
-
break;
|
1240
|
-
case 'DoubleBallRouletteResultsUpdated':
|
1241
|
-
this.gameInfo.details.currentDoubleBallRouletteNumbers =
|
1242
|
-
message.Results;
|
1243
|
-
break;
|
1244
|
-
case 'SeatsUpdated':
|
1245
|
-
this.gameInfo.details.currentOccupiedSeats = message.Seats;
|
1246
|
-
break;
|
1247
|
-
case 'DealerChanged':
|
1248
|
-
this.gameInfo.details.dealer = message.Dealer;
|
1249
|
-
break;
|
1250
|
-
case 'BaccaratResultsUpdated':
|
1251
|
-
if (this.showRoundBoard) {
|
1252
|
-
const Results = message.Results;
|
1253
|
-
this.gameInfo.details.results = [];
|
1254
|
-
Results.forEach((item) => {
|
1255
|
-
this.gameInfo.details.results.push(convertGicBaccaratUpdateItem(item));
|
1256
|
-
});
|
1257
|
-
(_a = this.extraInfoRef) === null || _a === void 0 ? void 0 : _a.onBaccaratResultChanged(this.gameInfo.details.results);
|
1149
|
+
onTableFullChanged(newVal, oldVal) {
|
1150
|
+
if (oldVal == undefined) {
|
1151
|
+
return;
|
1258
1152
|
}
|
1259
|
-
|
1153
|
+
this.containerClassWhenDetailChange =
|
1154
|
+
newVal && !oldVal ? 'PulsatingRedShadow' : 'PulsatingGreenShadow';
|
1155
|
+
}
|
1156
|
+
handleMouseOver(event) {
|
1157
|
+
this.hover = event.type === 'mouseenter';
|
1158
|
+
}
|
1159
|
+
gameFavoritedHandler(event) {
|
1160
|
+
let eventDetail = event.detail;
|
1161
|
+
this.gameInfo.isFavorite = eventDetail[this.gameId];
|
1162
|
+
this.gameInfo = Object.assign({}, this.gameInfo);
|
1260
1163
|
}
|
1261
|
-
|
1262
|
-
|
1263
|
-
window.postMessage({ messageType: MessageType, value: e.data });
|
1264
|
-
}
|
1265
|
-
messageHandler(e) {
|
1266
|
-
if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
|
1267
|
-
!this.showFavoredCategory) {
|
1268
|
-
this.gameInfo.isFavorite = true;
|
1164
|
+
connectLiveHandler() {
|
1165
|
+
this.toggleConnect();
|
1269
1166
|
}
|
1270
|
-
|
1271
|
-
|
1272
|
-
this.gameInfo.isFavorite = false;
|
1167
|
+
visibilityConnectHandler() {
|
1168
|
+
this.toggleVisibilityConnect();
|
1273
1169
|
}
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1170
|
+
gameDetailChangeHandler(e) {
|
1171
|
+
var _a, _b;
|
1172
|
+
let message = JSON.parse(e.data);
|
1173
|
+
if (message.needReconnect && this.liveLobbyConnection) {
|
1174
|
+
this.liveLobbyConnection.close();
|
1175
|
+
this.liveLobbyConnection = null;
|
1176
|
+
this.connectGameToLiveLobby();
|
1177
|
+
return;
|
1178
|
+
}
|
1179
|
+
if (!(message && message.InternalTableId == this.gameId)) {
|
1180
|
+
return;
|
1181
|
+
}
|
1182
|
+
let MessageType = message.MessageType;
|
1183
|
+
switch (MessageType) {
|
1184
|
+
case 'TableOpened':
|
1185
|
+
case 'TableClosed':
|
1186
|
+
this.gameInfo.details.isOpen = message.Open;
|
1187
|
+
break;
|
1188
|
+
case 'PlayersUpdated':
|
1189
|
+
this.gameInfo.details.numberOfPlayers = message.Players;
|
1190
|
+
break;
|
1191
|
+
case 'RouletteResultsUpdated':
|
1192
|
+
this.gameInfo.details.currentRouletteNumbers = message.Results;
|
1193
|
+
break;
|
1194
|
+
case 'DoubleBallRouletteResultsUpdated':
|
1195
|
+
this.gameInfo.details.currentDoubleBallRouletteNumbers =
|
1196
|
+
message.Results;
|
1197
|
+
break;
|
1198
|
+
case 'SeatsUpdated':
|
1199
|
+
this.gameInfo.details.currentOccupiedSeats = message.Seats;
|
1200
|
+
break;
|
1201
|
+
case 'DealerChanged':
|
1202
|
+
this.gameInfo.details.dealer = message.Dealer;
|
1203
|
+
break;
|
1204
|
+
case 'BaccaratResultsUpdated':
|
1205
|
+
if (this.showRoundBoard) {
|
1206
|
+
const Results = message.Results;
|
1207
|
+
this.gameInfo.details.results = [];
|
1208
|
+
Results.forEach((item) => {
|
1209
|
+
this.gameInfo.details.results.push(convertGicBaccaratUpdateItem(item));
|
1210
|
+
});
|
1211
|
+
(_a = this.extraInfoRef) === null || _a === void 0 ? void 0 : _a.onBaccaratResultChanged(this.gameInfo.details.results);
|
1212
|
+
}
|
1213
|
+
break;
|
1214
|
+
}
|
1215
|
+
this.resetLiveProperties();
|
1216
|
+
(_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameDetailUpdated(this.gameInfo.details);
|
1217
|
+
window.postMessage({ messageType: MessageType, value: e.data });
|
1278
1218
|
}
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1219
|
+
messageHandler(e) {
|
1220
|
+
if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
|
1221
|
+
!this.showFavoredCategory) {
|
1222
|
+
this.gameInfo.isFavorite = true;
|
1223
|
+
}
|
1224
|
+
if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
|
1225
|
+
!this.showFavoredCategory) {
|
1226
|
+
this.gameInfo.isFavorite = false;
|
1227
|
+
}
|
1228
|
+
if (e.data.type === 'UserSessionID') {
|
1229
|
+
this.isUserLoggedIn = true;
|
1230
|
+
this.session = e.data.session;
|
1231
|
+
this.userId = e.data.userID;
|
1232
|
+
}
|
1286
1233
|
}
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1234
|
+
resetLiveProperties() {
|
1235
|
+
var _a, _b;
|
1236
|
+
const details = this.gameInfo.details;
|
1237
|
+
if (this.isBlackJack(this.gameCategory.toLowerCase())) {
|
1238
|
+
this.isTableFull =
|
1239
|
+
details.totalSeats == ((_a = details.currentOccupiedSeats) === null || _a === void 0 ? void 0 : _a.length);
|
1240
|
+
}
|
1241
|
+
else if (this.isBaccarat(this.gameCategory.toLowerCase()) &&
|
1242
|
+
((_b = details.baccaratResults) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
1243
|
+
this.gameInfo.details.results = [];
|
1244
|
+
details.baccaratResults.forEach((item) => {
|
1245
|
+
this.gameInfo.details.results.push(convertGicBaccaratUpdateItem(item));
|
1246
|
+
});
|
1247
|
+
delete details.baccaratResults;
|
1248
|
+
}
|
1294
1249
|
}
|
1295
|
-
|
1296
|
-
|
1297
|
-
return gameCategory.toLowerCase() === GAME_CATEGORY.BLACKJACK;
|
1298
|
-
}
|
1299
|
-
isBaccarat(gameCategory) {
|
1300
|
-
return gameCategory.toLowerCase() === GAME_CATEGORY.BACCARAT;
|
1301
|
-
}
|
1302
|
-
/**
|
1303
|
-
* Calculate component properties by game info,
|
1304
|
-
* eg: isLiveCasino, gameInfo, isTableFull
|
1305
|
-
*/
|
1306
|
-
initCtrlProperties() {
|
1307
|
-
var _a;
|
1308
|
-
if (this.isLiveCasino && ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.details)) {
|
1309
|
-
this.resetLiveProperties();
|
1250
|
+
isBlackJack(gameCategory) {
|
1251
|
+
return gameCategory.toLowerCase() === GAME_CATEGORY.BLACKJACK;
|
1310
1252
|
}
|
1311
|
-
|
1312
|
-
|
1313
|
-
if (this.isLiveCasino && this.connectLive === 'connect') {
|
1314
|
-
this.connectGameToLiveLobby();
|
1253
|
+
isBaccarat(gameCategory) {
|
1254
|
+
return gameCategory.toLowerCase() === GAME_CATEGORY.BACCARAT;
|
1315
1255
|
}
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
if (this.isLiveCasino) {
|
1325
|
-
if (!this.gameInfo.details) {
|
1326
|
-
this.loadGameDetailInfo();
|
1256
|
+
/**
|
1257
|
+
* Calculate component properties by game info,
|
1258
|
+
* eg: isLiveCasino, gameInfo, isTableFull
|
1259
|
+
*/
|
1260
|
+
initCtrlProperties() {
|
1261
|
+
var _a;
|
1262
|
+
if (this.isLiveCasino && ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.details)) {
|
1263
|
+
this.resetLiveProperties();
|
1327
1264
|
}
|
1328
|
-
|
1329
|
-
|
1265
|
+
this.gameInfo = Object.assign({}, this.gameInfo);
|
1266
|
+
this.triggerExtraInfoLoad();
|
1267
|
+
if (this.isLiveCasino && this.connectLive === 'connect') {
|
1268
|
+
this.connectGameToLiveLobby();
|
1269
|
+
}
|
1270
|
+
}
|
1271
|
+
/**
|
1272
|
+
* Parse game info by game info api response
|
1273
|
+
* @param data
|
1274
|
+
*/
|
1275
|
+
parseGameResponse(data) {
|
1276
|
+
if (data.length == 1) {
|
1277
|
+
this.gameInfo = data[0];
|
1278
|
+
if (this.isLiveCasino) {
|
1279
|
+
if (!this.gameInfo.details) {
|
1280
|
+
this.loadGameDetailInfo();
|
1281
|
+
}
|
1282
|
+
else {
|
1283
|
+
this.parseGameDetailsResponse();
|
1284
|
+
}
|
1285
|
+
}
|
1286
|
+
else {
|
1287
|
+
this.initCtrlProperties();
|
1288
|
+
}
|
1330
1289
|
}
|
1331
|
-
}
|
1332
|
-
else {
|
1333
|
-
this.initCtrlProperties();
|
1334
|
-
}
|
1335
1290
|
}
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
this.initCtrlProperties();
|
1342
|
-
}
|
1343
|
-
connectGameToLiveLobby() {
|
1344
|
-
if (EventSource && !this.liveLobbyConnection) {
|
1345
|
-
const updateUrl = `${this.endpoint}/v1/encoder/lobby/updates/${this.gameInfo.vendor.name}/${this.gameInfo.id}`;
|
1346
|
-
this.liveLobbyConnection = new eventsource.EventSourcePolyfill(updateUrl);
|
1347
|
-
this.liveLobbyConnection.addEventListener('message', (evt) => {
|
1348
|
-
this.gameDetailChangeHandler(evt);
|
1349
|
-
});
|
1291
|
+
/**
|
1292
|
+
* Parse game detail info, set it to game info
|
1293
|
+
*/
|
1294
|
+
parseGameDetailsResponse() {
|
1295
|
+
this.initCtrlProperties();
|
1350
1296
|
}
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1297
|
+
connectGameToLiveLobby() {
|
1298
|
+
if (EventSource && !this.liveLobbyConnection) {
|
1299
|
+
const updateUrl = `${this.endpoint}/v1/encoder/lobby/updates/${this.gameInfo.vendor.name}/${this.gameInfo.id}`;
|
1300
|
+
this.liveLobbyConnection = new eventsource.exports.EventSourcePolyfill(updateUrl);
|
1301
|
+
this.liveLobbyConnection.addEventListener('message', (evt) => {
|
1302
|
+
this.gameDetailChangeHandler(evt);
|
1303
|
+
});
|
1304
|
+
}
|
1357
1305
|
}
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1306
|
+
disconnectGameFromLiveLobby() {
|
1307
|
+
if (this.liveLobbyConnection) {
|
1308
|
+
this.liveLobbyConnection.removeEventListener('message');
|
1309
|
+
this.liveLobbyConnection.close();
|
1310
|
+
this.liveLobbyConnection = undefined;
|
1311
|
+
}
|
1362
1312
|
}
|
1363
|
-
|
1364
|
-
|
1313
|
+
toggleConnect() {
|
1314
|
+
if (!this.isLiveCasino) {
|
1315
|
+
return;
|
1316
|
+
}
|
1317
|
+
if (this.connectLive === 'disconnect') {
|
1318
|
+
this.disconnectGameFromLiveLobby();
|
1319
|
+
}
|
1320
|
+
else if (this.connectLive === 'connect') {
|
1321
|
+
this.connectGameToLiveLobby();
|
1322
|
+
}
|
1365
1323
|
}
|
1366
|
-
|
1367
|
-
|
1324
|
+
toggleVisibilityConnect() {
|
1325
|
+
if (!this.isLiveCasino) {
|
1326
|
+
return;
|
1327
|
+
}
|
1328
|
+
if (this.visibilityConnect === 'disconnect') {
|
1329
|
+
this.disconnectGameFromLiveLobby();
|
1330
|
+
}
|
1331
|
+
else if (this.visibilityConnect === 'connect' &&
|
1332
|
+
this.connectLive === 'connect') {
|
1333
|
+
this.connectGameToLiveLobby();
|
1334
|
+
}
|
1368
1335
|
}
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1336
|
+
/**
|
1337
|
+
* Get game base info from game api(casino/games/{id})
|
1338
|
+
* @private
|
1339
|
+
*/
|
1340
|
+
loadGameById() {
|
1341
|
+
let url = `${this.endpoint}/v1/casino/games/${this.gameId}?expand=vendor&platform=${this.platform}&language=${this.language}`;
|
1342
|
+
fetch(url)
|
1343
|
+
.then((res) => res.json())
|
1344
|
+
.then((data) => this.parseGameResponse(data))
|
1345
|
+
.catch((err) => {
|
1346
|
+
console.error(err);
|
1347
|
+
});
|
1373
1348
|
}
|
1374
|
-
|
1375
|
-
|
1349
|
+
/*
|
1350
|
+
* Load game info when widget property 'livelobbyEndpoint' set
|
1351
|
+
* @private
|
1352
|
+
*/
|
1353
|
+
loadGameInfoByLobbyEndpoint() {
|
1354
|
+
let url = new URL(`${this.livelobbyEndpoint.split('?')[0]}`);
|
1355
|
+
url.searchParams.append('expand', 'vendor');
|
1356
|
+
url.searchParams.append('platform', this.platform);
|
1357
|
+
url.searchParams.append('language', this.language);
|
1358
|
+
fetch(url.toString())
|
1359
|
+
.then((res) => res.json())
|
1360
|
+
.then((data) => this.parseGameResponse(data))
|
1361
|
+
.catch((error) => console.error(error));
|
1376
1362
|
}
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1363
|
+
/*
|
1364
|
+
* load game info when widget property 'livelobbyEndpoint' setted
|
1365
|
+
* @private
|
1366
|
+
*/
|
1367
|
+
loadGameDetailInfo() {
|
1368
|
+
let url = new URL(`${this.endpoint}/v1/lobby/tables/${this.gameId}`);
|
1369
|
+
url.searchParams.append('platform', this.platform);
|
1370
|
+
url.searchParams.append('language', this.language);
|
1371
|
+
fetch(url.toString())
|
1372
|
+
.then((res) => res.json())
|
1373
|
+
.then((data) => {
|
1374
|
+
if (!(data === null || data === void 0 ? void 0 : data.category)) {
|
1375
|
+
return;
|
1376
|
+
}
|
1377
|
+
this.gameInfo.details = data;
|
1378
|
+
this.parseGameDetailsResponse();
|
1379
|
+
})
|
1380
|
+
.catch((err) => {
|
1381
|
+
console.error(err);
|
1382
|
+
setTimeout(() => this.loadGameDetailInfo(), 1000);
|
1383
|
+
});
|
1380
1384
|
}
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
/*
|
1396
|
-
* Load game info when widget property 'livelobbyEndpoint' set
|
1397
|
-
* @private
|
1398
|
-
*/
|
1399
|
-
loadGameInfoByLobbyEndpoint() {
|
1400
|
-
let url = new URL(`${this.livelobbyEndpoint.split('?')[0]}`);
|
1401
|
-
url.searchParams.append('expand', 'vendor');
|
1402
|
-
url.searchParams.append('platform', this.platform);
|
1403
|
-
url.searchParams.append('language', this.language);
|
1404
|
-
fetch(url.toString())
|
1405
|
-
.then((res) => res.json())
|
1406
|
-
.then((data) => this.parseGameResponse(data))
|
1407
|
-
.catch((error) => console.error(error));
|
1408
|
-
}
|
1409
|
-
/*
|
1410
|
-
* load game info when widget property 'livelobbyEndpoint' setted
|
1411
|
-
* @private
|
1412
|
-
*/
|
1413
|
-
loadGameDetailInfo() {
|
1414
|
-
let url = new URL(`${this.endpoint}/v1/lobby/tables/${this.gameId}`);
|
1415
|
-
url.searchParams.append('platform', this.platform);
|
1416
|
-
url.searchParams.append('language', this.language);
|
1417
|
-
fetch(url.toString())
|
1418
|
-
.then((res) => res.json())
|
1419
|
-
.then((data) => {
|
1420
|
-
if (!(data === null || data === void 0 ? void 0 : data.category)) {
|
1421
|
-
return;
|
1422
|
-
}
|
1423
|
-
this.gameInfo.details = data;
|
1424
|
-
this.parseGameDetailsResponse();
|
1425
|
-
})
|
1426
|
-
.catch((err) => {
|
1427
|
-
console.error(err);
|
1428
|
-
setTimeout(() => this.loadGameDetailInfo(), 1000);
|
1429
|
-
});
|
1430
|
-
}
|
1431
|
-
/**
|
1432
|
-
* Toggle game favorite property
|
1433
|
-
* @param gameId
|
1434
|
-
* @private
|
1435
|
-
*/
|
1436
|
-
toggleFavoriteGame(gameId) {
|
1437
|
-
let triggerFactor = 'thumbnail';
|
1438
|
-
if (this.gameInfo.isFavorite) {
|
1439
|
-
window.postMessage({ type: 'SetUnfavoredGame', gameId, triggerFactor }, window.location.href);
|
1385
|
+
/**
|
1386
|
+
* Toggle game favorite property
|
1387
|
+
* @param gameId
|
1388
|
+
* @private
|
1389
|
+
*/
|
1390
|
+
toggleFavoriteGame(gameId) {
|
1391
|
+
let triggerFactor = 'thumbnail';
|
1392
|
+
if (this.gameInfo.isFavorite) {
|
1393
|
+
window.postMessage({ type: 'SetUnfavoredGame', gameId, triggerFactor }, window.location.href);
|
1394
|
+
}
|
1395
|
+
else {
|
1396
|
+
window.postMessage({ type: 'SetFavoredGame', gameId, triggerFactor }, window.location.href);
|
1397
|
+
}
|
1398
|
+
this.toggleFavoriteCasinoGameEvent.emit(gameId);
|
1440
1399
|
}
|
1441
|
-
|
1442
|
-
|
1400
|
+
/**
|
1401
|
+
* Generate gameInfo obj by props
|
1402
|
+
* @private
|
1403
|
+
*/
|
1404
|
+
generateGameInfoByProps() {
|
1405
|
+
return {
|
1406
|
+
id: this.gameId,
|
1407
|
+
name: this.gameName,
|
1408
|
+
subVendor: this.subVendor,
|
1409
|
+
hasFunMode: this.hasFunMode,
|
1410
|
+
hasAnonymousFunMode: this.hasAnonymousFunMode,
|
1411
|
+
thumbnail: this.thumbnail,
|
1412
|
+
cellSize: this.cellSize,
|
1413
|
+
gameTag: this.gameTag,
|
1414
|
+
vendor: { href: '', name: this.gameVendor },
|
1415
|
+
isFavorite: this.isFavorite,
|
1416
|
+
isNew: this.isNew,
|
1417
|
+
type: this.type,
|
1418
|
+
liveCasinoCategory: this.gameCategory || '',
|
1419
|
+
};
|
1443
1420
|
}
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
hasFunMode: this.hasFunMode,
|
1456
|
-
hasAnonymousFunMode: this.hasAnonymousFunMode,
|
1457
|
-
thumbnail: this.thumbnail,
|
1458
|
-
cellSize: this.cellSize,
|
1459
|
-
gameTag: this.gameTag,
|
1460
|
-
vendor: { href: '', name: this.gameVendor },
|
1461
|
-
isFavorite: this.isFavorite,
|
1462
|
-
isNew: this.isNew,
|
1463
|
-
type: this.type,
|
1464
|
-
liveCasinoCategory: this.gameCategory || '',
|
1465
|
-
};
|
1466
|
-
}
|
1467
|
-
triggerExtraInfoLoad() {
|
1468
|
-
var _a, _b;
|
1469
|
-
//Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
|
1470
|
-
this.extraInfoRef =
|
1471
|
-
this.extraInfoRef ||
|
1472
|
-
((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
|
1473
|
-
(_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
|
1474
|
-
window.postMessage({
|
1475
|
-
type: 'casinoGameLoaded',
|
1476
|
-
gameInfo: this.gameInfo,
|
1477
|
-
});
|
1478
|
-
}
|
1479
|
-
componentDidRender() {
|
1480
|
-
// start custom styling area
|
1481
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
1482
|
-
if (this.clientStyling)
|
1483
|
-
this.setClientStyling();
|
1484
|
-
if (this.clientStylingUrl)
|
1485
|
-
this.setClientStylingURL();
|
1486
|
-
this.limitStylingAppends = true;
|
1421
|
+
triggerExtraInfoLoad() {
|
1422
|
+
var _a, _b;
|
1423
|
+
//Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
|
1424
|
+
this.extraInfoRef =
|
1425
|
+
this.extraInfoRef ||
|
1426
|
+
((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
|
1427
|
+
(_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
|
1428
|
+
window.postMessage({
|
1429
|
+
type: 'casinoGameLoaded',
|
1430
|
+
gameInfo: this.gameInfo,
|
1431
|
+
});
|
1487
1432
|
}
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1433
|
+
componentDidRender() {
|
1434
|
+
// start custom styling area
|
1435
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
1436
|
+
if (this.clientStyling)
|
1437
|
+
this.setClientStyling();
|
1438
|
+
if (this.clientStylingUrl)
|
1439
|
+
this.setClientStylingURL();
|
1440
|
+
this.limitStylingAppends = true;
|
1441
|
+
}
|
1442
|
+
// end custom styling area 500)
|
1443
|
+
if (this.gameInfo) {
|
1444
|
+
this.triggerExtraInfoLoad();
|
1445
|
+
}
|
1491
1446
|
}
|
1492
|
-
|
1493
|
-
|
1494
|
-
window.addEventListener('message', this.messageHandler);
|
1495
|
-
}
|
1496
|
-
componentWillLoad() {
|
1497
|
-
this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
|
1498
|
-
this.extraInfoWidget = this.getGameCategoryType();
|
1499
|
-
this.isUserLoggedIn = !!(this.session && this.userId);
|
1500
|
-
if (this.isLiveCasino && this.livelobbyEndpoint) {
|
1501
|
-
this.loadGameInfoByLobbyEndpoint();
|
1502
|
-
return;
|
1447
|
+
componentDidLoad() {
|
1448
|
+
window.addEventListener('message', this.messageHandler);
|
1503
1449
|
}
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1450
|
+
componentWillLoad() {
|
1451
|
+
this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
|
1452
|
+
this.extraInfoWidget = this.getGameCategoryType();
|
1453
|
+
this.isUserLoggedIn = !!(this.session && this.userId);
|
1454
|
+
if (this.isLiveCasino && this.livelobbyEndpoint) {
|
1455
|
+
this.loadGameInfoByLobbyEndpoint();
|
1456
|
+
return;
|
1457
|
+
}
|
1458
|
+
//generate gameInfo obj by props
|
1459
|
+
if (this.thumbnail) {
|
1460
|
+
this.gameInfo = this.generateGameInfoByProps();
|
1461
|
+
// loadLiveDetails if game is live casino
|
1462
|
+
if (this.isLiveCasino &&
|
1463
|
+
this.endpoint &&
|
1464
|
+
this.loadDetails &&
|
1465
|
+
this.gameId) {
|
1466
|
+
this.loadGameDetailInfo();
|
1467
|
+
}
|
1468
|
+
return;
|
1469
|
+
}
|
1470
|
+
//fetch data from api if no game properties set except gameId
|
1471
|
+
if (this.gameId && this.endpoint) {
|
1472
|
+
this.loadGameById();
|
1473
|
+
}
|
1515
1474
|
}
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1475
|
+
disconnectedCallback() {
|
1476
|
+
if (this.liveLobbyConnection) {
|
1477
|
+
this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
|
1478
|
+
}
|
1479
|
+
window.removeEventListener('message', this.messageHandler);
|
1519
1480
|
}
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
|
1481
|
+
// end custom styling area
|
1482
|
+
getWidgetTypeByGameCategory(gameCategory) {
|
1483
|
+
return WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
|
1524
1484
|
}
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
hasFunMode: this.gameInfo.hasFunMode,
|
1538
|
-
language: this.language,
|
1539
|
-
integratedGameframeMobile: this.integratedGameframeMobile,
|
1540
|
-
integratedGameframeDesktop: this.integratedGameframeDesktop,
|
1541
|
-
gamepageModalurl: this.gamepageModalurl,
|
1542
|
-
};
|
1543
|
-
}
|
1544
|
-
render() {
|
1545
|
-
var _a, _b;
|
1546
|
-
if (!this.gameInfo) {
|
1547
|
-
return (h("div", { class: "GameInnerContainer", part: "GameInnerContainer", slot: "Game-Inner" }, h("img", { src: this.thumbnail, alt: "", loading: "lazy", part: "GameContainer", class: "GameContainer", onLoad: () => (this.thumbnailLoaded = true) })));
|
1485
|
+
getGameOverlayProps() {
|
1486
|
+
var _a, _b;
|
1487
|
+
return {
|
1488
|
+
gameName: this.gameInfo.name,
|
1489
|
+
gameId: this.gameInfo.gameId,
|
1490
|
+
gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
|
1491
|
+
hasFunMode: this.gameInfo.hasFunMode,
|
1492
|
+
language: this.language,
|
1493
|
+
integratedGameframeMobile: this.integratedGameframeMobile,
|
1494
|
+
integratedGameframeDesktop: this.integratedGameframeDesktop,
|
1495
|
+
gamepageModalurl: this.gamepageModalurl,
|
1496
|
+
};
|
1548
1497
|
}
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1498
|
+
render() {
|
1499
|
+
var _a, _b;
|
1500
|
+
if (!this.gameInfo) {
|
1501
|
+
return (h("div", { class: "GameInnerContainer", part: "GameInnerContainer", slot: "Game-Inner" }, h("img", { src: this.thumbnail, alt: "", loading: "lazy", part: "GameContainer", class: "GameContainer", onLoad: () => (this.thumbnailLoaded = true) })));
|
1502
|
+
}
|
1503
|
+
const gameOverlayProps = this.getGameOverlayProps();
|
1504
|
+
const gameThumbnail = ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.thumbnail) || ((_b = this.gameInfo) === null || _b === void 0 ? void 0 : _b.defaultThumbnail);
|
1505
|
+
const gameContainerClass = this.getGameContainerClass();
|
1506
|
+
const gameThumbnailClass = `GameBg ${this.cellSize ? 'GameBg-' + this.cellSize : ''}
|
1553
1507
|
${this.hover ? ' GameContainerHovered' : ''} ${this.thumbnailLoaded ? ' Loaded' : ''}`;
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1508
|
+
return (h("div", { class: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, part: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, ref: (el) => (this.stylingContainer = el), "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrl }, h("div", { class: `GameInnerContainer ${this.hover ? 'Hovered' : ''}`, part: `GameInnerContainer ${this.hover ? 'Hovered' : ''}` }, h("img", { src: gameThumbnail, alt: "Game Thumbnail ", loading: "lazy", part: gameThumbnailClass, class: gameThumbnailClass, onLoad: () => (this.thumbnailLoaded = true) }), this.isUserLoggedIn && (h("div", { class: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, part: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, onClick: () => this.toggleFavoriteGame(this.gameId) }, this.gameInfo.isFavorite ? (h("slot", { name: "fav-icon" }, h("span", { class: "FavoredIcon", part: "FavoredIcon", innerHTML: favSvg }))) : (h("slot", { name: "UnFavIcon" }, !isMobile(window.navigator.userAgent) && (h("span", { class: "UnfavoredIcon", part: "UnfavoredIcon", innerHTML: unfavSvg })))))), h("slot", { name: "game-overlay" }, h("casino-game-thumbnail-overlay", Object.assign({ language: this.language }, gameOverlayProps))), h("slot", { name: "extra-info", ref: (el) => (this.extraInfoSlotRef = el) }, h(this.extraInfoWidget, { language: this.language, "show-round-board": this.showRoundBoard })), h("slot", { name: "game-property-slot" })), this.showGameName && (h("slot", { name: "game-name" }, h("p", { class: "GameNameBelow", part: "GameNameBelow", title: gameOverlayProps.gameName }, gameOverlayProps.gameName)))));
|
1509
|
+
}
|
1510
|
+
static get assetsDirs() { return ["static"]; }
|
1511
|
+
static get watchers() { return {
|
1512
|
+
"session": ["onSessionChanged"],
|
1513
|
+
"userId": ["onSessionChanged"],
|
1514
|
+
"isTableFull": ["onTableFullChanged"],
|
1515
|
+
"connectLive": ["connectLiveHandler"],
|
1516
|
+
"visibilityConnect": ["visibilityConnectHandler"]
|
1517
|
+
}; }
|
1564
1518
|
};
|
1565
|
-
CasinoGameThumbView.style =
|
1519
|
+
CasinoGameThumbView.style = CasinoGameThumbViewStyle0;
|
1566
1520
|
|
1567
1521
|
const casinoGameThumbnailOverlayCss = ":host{display:block}.GameInfoWrapper{display:none;position:absolute;width:100%;height:100%;top:0;right:0;bottom:0;left:0;background:rgba(0, 0, 0, 0.65);z-index:15}.GameInfoWrapper .GameInfo{display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center}.GameInfoWrapper .GameInfoName{color:white;margin-bottom:10px;text-align:center;font-size:14px}.GameInfoWrapper .GameInfoBtn{appearance:none;padding:6px;background:var(--emfe-w-color-primary, #D0046C);color:var(--emfe-w-color-primary-50, #FBECF4);font-size:16px;border:2px solid var(--emfe-w-color-primary-600, #99034F);border-radius:5px;cursor:pointer;transition:border 150ms ease-in-out}.GameInfoWrapper .GameInfoBtn:hover{border:2px solid var(--emfe-w-color-primary-100, #F1BED9)}.GameInfoVendor{display:block;position:absolute;bottom:8px;right:8px;color:white;font-size:12px;font-weight:normal}.GameInfoWrapper:hover{display:block !important}";
|
1522
|
+
const CasinoGameThumbnailOverlayStyle0 = casinoGameThumbnailOverlayCss;
|
1568
1523
|
|
1569
1524
|
const CasinoGameThumbnailOverlay = class {
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
}, window.location.href);
|
1600
|
-
}
|
1601
|
-
render() {
|
1602
|
-
return (h("div", { class: "GameInfoWrapper", part: "GameInfoWrapper" }, h("div", { class: "GameInfo ", part: "GameInfo " }, h("p", { class: "GameInfoName", part: "GameInfoName", title: this.gameName }, ' ', this.gameName, ' '), h("button", { class: "GameInfoBtn", part: "GameInfoBtn", onClick: () => this.onPlayNowClicked() }, translate('playNow', this.language))), h("slot", { name: "vendor-name" }, h("span", { class: "GameInfoVendor", part: "GameInfoVendor" }, this.gameVendor))));
|
1603
|
-
}
|
1525
|
+
constructor(hostRef) {
|
1526
|
+
registerInstance(this, hostRef);
|
1527
|
+
this.playClicked = createEvent(this, "playCasinoGame", 7);
|
1528
|
+
this.userAgent = window.navigator.userAgent;
|
1529
|
+
this.gamepageModalurl = undefined;
|
1530
|
+
this.integratedGameframeMobile = false;
|
1531
|
+
this.integratedGameframeDesktop = false;
|
1532
|
+
this.language = 'en';
|
1533
|
+
this.gameName = undefined;
|
1534
|
+
this.gameVendor = undefined;
|
1535
|
+
this.gameId = undefined;
|
1536
|
+
this.hasFunMode = undefined;
|
1537
|
+
}
|
1538
|
+
onPlayNowClicked() {
|
1539
|
+
this.playClicked.emit(this.gameId);
|
1540
|
+
let modalEventData = {
|
1541
|
+
gameId: this.gameId,
|
1542
|
+
isMobile: isMobile(this.userAgent),
|
1543
|
+
};
|
1544
|
+
let isFrameMode = this.integratedGameframeMobile || this.integratedGameframeDesktop;
|
1545
|
+
window.postMessage({
|
1546
|
+
type: isFrameMode ? 'OpenGameFrame' : 'ShowGameModal',
|
1547
|
+
eventData: isFrameMode
|
1548
|
+
? Object.assign(Object.assign({}, modalEventData), { gamefunmode: this.hasFunMode, source: 'GameThumbnail', identifier: 'Lobby' }) : modalEventData,
|
1549
|
+
}, window.location.href);
|
1550
|
+
}
|
1551
|
+
render() {
|
1552
|
+
return (h("div", { key: 'b552e85f9652d467595f9603e564387148d81417', class: "GameInfoWrapper", part: "GameInfoWrapper" }, h("div", { key: 'c8ad8953997fa38e46f076be71c8a26a5a47afcd', class: "GameInfo ", part: "GameInfo " }, h("p", { key: '7477d68d364589d8fd2ef80ec15f4457a0f8c69d', class: "GameInfoName", part: "GameInfoName", title: this.gameName }, ' ', this.gameName, ' '), h("button", { key: '280a36956cf541b909c8c6269f2bfd0e51ebf07b', class: "GameInfoBtn", part: "GameInfoBtn", onClick: () => this.onPlayNowClicked() }, translate('playNow', this.language))), h("slot", { key: '79c3e4ceb605025b5b25be04339a63096cd36e28', name: "vendor-name" }, h("span", { key: 'fdb2ebaa6eaf1f3e11356aff6c043ed6a0c41a35', class: "GameInfoVendor", part: "GameInfoVendor" }, this.gameVendor))));
|
1553
|
+
}
|
1604
1554
|
};
|
1605
|
-
CasinoGameThumbnailOverlay.style =
|
1555
|
+
CasinoGameThumbnailOverlay.style = CasinoGameThumbnailOverlayStyle0;
|
1606
1556
|
|
1607
1557
|
export { CasinoGameThumbView as casino_game_thumb_view, CasinoGameThumbnailOverlay as casino_game_thumbnail_overlay };
|