@everymatrix/casino-game-thumbnail 0.0.232 → 0.0.236

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.
@@ -1,10 +1,12 @@
1
1
  <svelte:options tag={null} />
2
2
 
3
3
  <script lang="ts">
4
- import { onMount } from "svelte";
5
- import { isMobile, checkSession } from 'rvhelper';
4
+ import moment from 'moment';
5
+ import { onMount, tick } from "svelte";
6
+ import { isMobile, checkSession, getDevice } from 'rvhelper';
6
7
  import { _, addNewMessages } from './i18n';
7
8
  import { GameThumbnailTranslations } from './translations';
9
+ import { currenciesSymbols } from './currency-symbols';
8
10
 
9
11
  export let session:string = '';
10
12
  export let userid:string = '';
@@ -26,20 +28,121 @@
26
28
  export let showgamename:boolean = false;
27
29
  export let endpoint:string = '';
28
30
 
31
+ export let livelobbyendpoint:String = '';
32
+ export let currency:string='EUR';
33
+ export let connectlive:string = '';
34
+ export let visibilityconnect:string = '';
35
+
29
36
  let isLoggedIn:boolean = false;
30
37
  let sessionID:string;
31
38
  let playerID:string;
32
39
 
33
40
  let fav:boolean = false;
41
+ let hover:Boolean = false;
34
42
  let loaded:boolean = false
35
43
  let image:any;
36
44
  let userAgent:any = window.navigator.userAgent;
37
45
  let customStylingContainer:HTMLElement;
38
46
 
47
+ let livegamedata:any;
48
+ let liveLobbyConnection:EventSource;
49
+ let displaytype:string;
50
+ let starttime:any;
51
+ let timeformat = 'HH:mm';
52
+ let isopen:Boolean;
53
+ let betlimit:any = {};
54
+ let openhours:any;
55
+ let seats:any = [];
56
+ let currencySymbol:any='TRY';
57
+ let min:any;
58
+ let max:any;
59
+ let totalseats:any;
60
+ let currentoccupiedseats:any;
61
+ let currentroulettenumbers:any;
62
+ let currentdoubleballroulettenumbers:any;
63
+ let vendorcategory:any;
64
+ let isdouble:any;
65
+ let roulleteresults:any;
66
+ let roulettecontainerclassname:any;
67
+ let colorsourcearray:any;
68
+ let istablefull:boolean;
69
+ let oldistablefull:boolean;
70
+ let extraclassname:string='';
71
+ let roulletteref:any;
72
+ let dealername:string;
73
+ let numberofplayers:number;
74
+
75
+
76
+ const BLACKJACK = 'blackjack';
77
+ const ROULETTE = 'roulette';
78
+ const DOUBLE_ROULETTE = 'doubleballroulette';
79
+ const DEFAULT_BLACKJACK_TOTAL_SEATS = 7;
80
+ const blackjackcategory = [BLACKJACK];
81
+ const roulettecategory = [ROULETTE, DOUBLE_ROULETTE];
82
+ const DEFAULT_AMOUNT_SEPARATOR = ',';
83
+ const numberofdisplayedresults = 5;
84
+ export const MONEY_WHEEL_COLOR_MAP = {
85
+ '01': 'Yellow',
86
+ '02': 'Blue',
87
+ 10: 'Green',
88
+ 40: 'Red',
89
+ '05': 'Purple',
90
+ 20: 'Orange',
91
+ X7: 'Gold',
92
+ X2: 'Gold',
93
+ };
94
+ export const ROULETTE_COLOR_MAP = {
95
+ 1: 'Red',
96
+ 3: 'Red',
97
+ 5: 'Red',
98
+ 7: 'Red',
99
+ 9: 'Red',
100
+ 12: 'Red',
101
+ 14: 'Red',
102
+ 16: 'Red',
103
+ 18: 'Red',
104
+ 19: 'Red',
105
+ 21: 'Red',
106
+ 23: 'Red',
107
+ 25: 'Red',
108
+ 27: 'Red',
109
+ 30: 'Red',
110
+ 32: 'Red',
111
+ 34: 'Red',
112
+ 36: 'Red',
113
+ 2: 'Black',
114
+ 4: 'Black',
115
+ 6: 'Black',
116
+ 8: 'Black',
117
+ 10: 'Black',
118
+ 11: 'Black',
119
+ 13: 'Black',
120
+ 15: 'Black',
121
+ 17: 'Black',
122
+ 20: 'Black',
123
+ 22: 'Black',
124
+ 24: 'Black',
125
+ 26: 'Black',
126
+ 28: 'Black',
127
+ 29: 'Black',
128
+ 31: 'Black',
129
+ 33: 'Black',
130
+ 35: 'Black',
131
+ 0: 'Green',
132
+ '00': 'Green',
133
+ };
134
+
39
135
  Object.keys(GameThumbnailTranslations).forEach((item:any):void => {
40
136
  addNewMessages(item, GameThumbnailTranslations[item]);
41
137
  });
42
138
 
139
+ const enter = () => {
140
+ hover = true;
141
+ }
142
+ const leave = () => {
143
+ hover = false;
144
+ }
145
+
43
146
  const messageHandler = (e:any):void => {
44
147
  if (e.data.type === `AddFavoriteThumbnail_${gameid}` && !showfavoredcategory) {
45
148
  gamefavorite = true;
@@ -113,6 +216,24 @@
113
216
  }
114
217
  }
115
218
 
219
+ const getLiveLobbyURL = (vendorName, id) => {
220
+ return `${endpoint}/encoder/lobby/updates/${vendorName}/${id}`;
221
+ }
222
+ const connectGameToLiveLobby = () => {
223
+ if (livelobbyendpoint && EventSource && !liveLobbyConnection) {
224
+ if (gamevendor && gameid) {
225
+ liveLobbyConnection = new EventSource(getLiveLobbyURL(gamevendor, gameid)),
226
+ liveLobbyConnection.addEventListener('message', liveLobbyMessageHandler);
227
+ }
228
+ }
229
+ }
230
+ const disconnectGameFromLiveLobby = () => {
231
+ if (liveLobbyConnection) {
232
+ liveLobbyConnection.close();
233
+ liveLobbyConnection = undefined;
234
+ }
235
+ }
236
+
116
237
  const setClientStyling = ():void => {
117
238
  let sheet = document.createElement('style');
118
239
 
@@ -121,7 +242,6 @@
121
242
  setTimeout(() => { customStylingContainer.appendChild(sheet);});
122
243
  }
123
244
 
124
-
125
245
  const setFavorites = ():void => {
126
246
  if (favorites == 'true') {
127
247
  fav = true;
@@ -142,27 +262,295 @@
142
262
  });
143
263
  }
144
264
 
265
+ const liveLobbyMessageHandler = async (event) => {
266
+ const { type, data: rawData } = event;
267
+ let data;
268
+ switch (type) {
269
+ case 'message': {
270
+ if (rawData) {
271
+ try {
272
+ data = JSON.parse(rawData);
273
+ } catch (err) {
274
+ // eslint-disable-next-line no-console
275
+ console.error('MESSAGE PARSING ERROR: ', err);
276
+ }
277
+ }
278
+ if (data) {
279
+ const {
280
+ InternalTableId,
281
+ MessageType,
282
+ // TakenSeats,
283
+ Results,
284
+ // Roads, // for baccarat
285
+ Seats,
286
+ Open,
287
+ } = data;
288
+ if (InternalTableId) {
289
+ switch (MessageType) {
290
+ case 'SeatsUpdated': {
291
+ if (Seats && Array.isArray(Seats)) {
292
+ currentoccupiedseats = Seats;
293
+ livegamedata.currentOccupiedSeats = Seats;
294
+ await tick();
295
+ }
296
+ break;
297
+ }
298
+ case 'RouletteResultsUpdated': {
299
+ if (Results && Array.isArray(Results)) {
300
+ currentroulettenumbers = Results;
301
+ livegamedata.currentRouletteNumbers = Results;
302
+ await tick();
303
+ }
304
+ break;
305
+ }
306
+ case 'DoubleBallRouletteResultsUpdated': {
307
+ if (Results && Array.isArray(Results)) {
308
+ currentdoubleballroulettenumbers = Results;
309
+ livegamedata.currentDoubleBallRouletteNumbers = Results;
310
+ await tick();
311
+ }
312
+ break;
313
+ }
314
+ case 'TableOpened': {
315
+ isopen = Open;
316
+ livegamedata.isOpen = Open;
317
+ await tick();
318
+ break;
319
+ }
320
+ case 'TableClosed': {
321
+ isopen = Open;
322
+ livegamedata.isOpen = Open;
323
+ await tick();
324
+ break;
325
+ }
326
+ default: {
327
+ // default case
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
333
+ default: {
334
+ // default case
335
+ }
336
+ }
337
+ }
338
+
339
+ const setLiveLobbyData = () => {
340
+ let url:any = new URL(`${livelobbyendpoint.split('?')[0]}`);
341
+ url.searchParams.append("platform", getDevice(userAgent));
342
+ url.searchParams.append('language', lang);
343
+ fetch(url)
344
+ .then((res:any) => res.json())
345
+ .then((data:any) => {
346
+ const { details } = data[0];
347
+ livegamedata = details;
348
+ });
349
+ }
350
+ const numberWithSeparators = (value, sep = DEFAULT_AMOUNT_SEPARATOR) => {
351
+ if (value !== undefined && value !== null) {
352
+ return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, sep);
353
+ }
354
+ return '';
355
+ }
356
+ const contains = (array, value) => {
357
+ return array.some(item => item === value);
358
+ }
359
+ const getGameComponent = (livegamedata) => {
360
+ let GameComponent = null;
361
+ if (livegamedata) {
362
+ const { vendorCategory } = livegamedata;
363
+ if (vendorCategory) {
364
+ const gameTypeToLower = vendorCategory.toLowerCase();
365
+ if (contains(blackjackcategory, gameTypeToLower)) {
366
+ GameComponent = BLACKJACK;
367
+ } else if (contains(roulettecategory, gameTypeToLower)) {
368
+ GameComponent = ROULETTE;
369
+ }
370
+ // else if (contains(baccaratCategory, gameTypeToLower)) {
371
+ // GameComponent = 'baccarat';
372
+ // } else if (contains(otherLiveGamesCategory, gameTypeToLower)) {
373
+ // GameComponent = 'poker';
374
+ // }
375
+ }
376
+ }
377
+ return GameComponent;
378
+ };
379
+ const renderBetLimits = (min, max, currencySymbol) => {
380
+ let rightSideContent;
381
+ let leftSideContent;
382
+ if (min !== undefined && min !== null && max !== undefined && max !== null) {
383
+ leftSideContent = `
384
+ <span>
385
+ ${currencySymbol}
386
+ </span>
387
+ ${
388
+ numberWithSeparators(min)
389
+ }-${
390
+ numberWithSeparators(max)
391
+ }`;
392
+ }
393
+ if (numberofplayers) {
394
+ rightSideContent = `
395
+ <svg fill="white" width="13" height="13" viewBox="0 0 13 14" xmlns="http://www.w3.org/2000/svg"><path d="M4 8.2a4.6 4.6 0 0 0 5 0c2.7.8 4 2.6 4 4.8H0c0-2.2 1.3-4 4-4.8zM6.6 8c2 0 3.8-1.7 3.8-4 0-2.1-1.7-4-3.8-4a3.9 3.9 0 0 0-3.8 4c0 2.2 1.7 4 3.8 4z"/></svg>
396
+ <span class="NrOfPlayers">${numberofplayers}</span>`;
397
+ }
398
+ if (!rightSideContent && !leftSideContent) {
399
+ return '';
400
+ }
401
+ return `
402
+ <p class="LiveLimits">
403
+ <span class="BetLimitLeft">
404
+ ${leftSideContent || ''}
405
+ </span>
406
+ <span class="BetLimitRight">
407
+ ${rightSideContent || ''}
408
+ </span>
409
+ </p>`;
410
+ }
411
+ const renderDealerName = (dealername) => {
412
+ if (!dealername) {
413
+ return '';
414
+ }
415
+ return `
416
+ <p class="LiveLimits">
417
+ <span class="DealerName">${$_('gameThumbnail.dealer')}: ${dealername}</span>
418
+ </p>
419
+ `;
420
+ }
421
+ const createDisplayData = (livegamedata) => {
422
+ totalseats = livegamedata.totalSeats || DEFAULT_BLACKJACK_TOTAL_SEATS;
423
+ currentoccupiedseats = livegamedata.currentOccupiedSeats || [];
424
+ const seats = [];
425
+ for (let i = 1; i <= totalseats; i++) {
426
+ seats.push(i);
427
+ }
428
+ return { seats };
429
+ }
430
+ const renderSpan = (selectedClass, key, value, colorClass = '') => {
431
+ const rouletteItemClassname = `${selectedClass} ${colorClass}`;
432
+ const firstMatch = key.toString().match(/first0|second0|0/g);
433
+ if (key === 0 || (firstMatch && firstMatch.length !== 0)) {
434
+ return `
435
+ <span
436
+ id=${key}
437
+ class="${rouletteItemClassname}"
438
+ >
439
+ ${value}
440
+ </span>
441
+ `;
442
+ }
443
+ return `
444
+ <span id=${key} class="${rouletteItemClassname}">
445
+ ${value}
446
+ </span>
447
+ `;
448
+ }
449
+
450
+ const attachAnimations = () => {
451
+ const animatedClassName = 'FirstElementAnimated';
452
+ const firstElem = roulletteref.getElementsByClassName('First')[0];
453
+ if (firstElem) {
454
+ firstElem.classList.add(animatedClassName);
455
+ setTimeout(() => {
456
+ firstElem.classList.remove(animatedClassName);
457
+ }, 2000);
458
+ }
459
+ }
460
+ const updateComponent = () => {
461
+ if (livegamedata) {
462
+ isopen = livegamedata.isOpen;
463
+ betlimit = livegamedata.betLimit || {};
464
+ openhours = livegamedata.openHours;
465
+ seats = createDisplayData(livegamedata).seats;
466
+ if (openhours && openhours.value) {
467
+ const { value: { startTime: starttimeRaw /* , timeFormat: timeFormatRaw */, originalTimeFormat } } = openhours;
468
+ starttime = starttimeRaw;
469
+ timeformat = originalTimeFormat || timeformat;
470
+ }
471
+ if (isopen) {
472
+ displaytype = getGameComponent(livegamedata);
473
+ }
474
+ currencySymbol = currenciesSymbols[currency];
475
+ min = (betlimit.min || {})[currency];
476
+ max = (betlimit.max || {})[currency];
477
+ currentroulettenumbers = livegamedata.currentRouletteNumbers;
478
+ currentdoubleballroulettenumbers = livegamedata.currentDoubleBallRouletteNumbers;
479
+ vendorcategory = livegamedata.vendorCategory;
480
+ isdouble = vendorcategory.toLowerCase() === DOUBLE_ROULETTE;
481
+ roulleteresults = (isdouble ? currentdoubleballroulettenumbers : currentroulettenumbers) || [];
482
+ roulettecontainerclassname = 'GameProp LiveProps RoulleteProps';
483
+ roulettecontainerclassname += isdouble ? ' Double' : '';
484
+ colorsourcearray = contains(roulettecategory, vendorcategory.toLowerCase()) ? ROULETTE_COLOR_MAP : MONEY_WHEEL_COLOR_MAP;
485
+ oldistablefull = istablefull;
486
+ istablefull = Array.isArray(currentoccupiedseats) && currentoccupiedseats.length === totalseats;
487
+ if (livegamedata.dealer) {
488
+ dealername = livegamedata.dealer.DealerName;
489
+ }
490
+ numberofplayers = livegamedata.numberOfPlayers;
491
+ extraclassname = 'ListGame';
492
+ if (isopen && istablefull && min && max && livegamedata.currentOccupiedSeats) {
493
+ extraclassname += ' GameContainerDimmed';
494
+ } else {
495
+ if (isopen === false && starttime) {
496
+ extraclassname += ' GameContainerFullyDimmed';
497
+ }
498
+ }
499
+ if (customStylingContainer) {
500
+ if (!oldistablefull && istablefull) {
501
+ extraclassname += ' PulsatingRedShadow';
502
+ extraclassname = extraclassname.replace(' PulsatingGreenShadow', '');
503
+ } else if (oldistablefull && !istablefull) {
504
+ extraclassname += ' PulsatingGreenShadow';
505
+ extraclassname = extraclassname.replace(' PulsatingRedShadow', '');
506
+ }
507
+ }
508
+ }
509
+ }
510
+ const toggleConnect = ():void => {
511
+ if (connectlive === 'disconnect') {
512
+ disconnectGameFromLiveLobby();
513
+ } else if (connectlive === 'connect') {
514
+ connectGameToLiveLobby();
515
+ }
516
+ }
517
+ const toggleVisibilityConnect = ():void => {
518
+ if (visibilityconnect === 'disconnect') {
519
+ disconnectGameFromLiveLobby();
520
+ } else if (visibilityconnect === 'connect' && connectlive === 'connect') {
521
+ connectGameToLiveLobby();
522
+ }
523
+ }
524
+
145
525
  onMount(() => {
146
526
  window.addEventListener('message', messageHandler, false);
147
527
 
148
528
  return () => {
149
529
  window.removeEventListener('message', messageHandler);
530
+ if (liveLobbyConnection) {
531
+ liveLobbyConnection.removeEventListener('message', liveLobbyMessageHandler);
532
+ }
150
533
  }
151
534
  });
152
535
 
536
+ $: connectlive && toggleConnect();
537
+ $: visibilityconnect && toggleVisibilityConnect();
153
538
  $: lang && setActiveLanguage();
154
539
  $: session && userid && endpoint && setSession();
155
540
  $: gamethumbnail && setOnLoad();
156
541
  $: clientstyling && setClientStyling();
157
542
  $: favorites && setFavorites();
158
543
  $: clientstylingurl && setClientStylingURL();
544
+ $: endpoint && livelobbyendpoint && setLiveLobbyData();
545
+ $: livegamedata && updateComponent();
546
+ $: roulletteref && roulleteresults && attachAnimations();
159
547
  </script>
160
548
 
161
- <div class="GameContainer" bind:this={customStylingContainer}>
549
+ <div class={`GameContainer ${extraclassname}`} bind:this={customStylingContainer}>
162
550
  <div class="GameInnerContainer" on:mouseenter={gameHover} on:mouseleave={gameBlur} on:touchstart={gameTouch} on:touchleave={gameTouchLeave}>
163
- <img src={gamethumbnail} class="GameBg {loaded ? 'Loaded' : ''}" alt="" bind:this={image} loading="lazy" />
551
+ <img src={gamethumbnail} class="GameBg {hover ? 'GameContainerHovered' : ''} {loaded ? 'Loaded' : ''}" alt="" bind:this={image} loading="lazy" />
164
552
  <div class="GameInfoWrapper">
165
- <div class="GameInfo">
553
+ <div class="GameInfo {hover ? 'GameHovered' : ''}">
166
554
  {#if fav}
167
555
  {#if !isMobile(userAgent) && !gamefavorite && isLoggedIn}
168
556
  <div class="FavIconContainer" on:click="{() => toggleFavoriteGame(gameid)}">
@@ -206,6 +594,61 @@
206
594
  {#if (parseInt(gamepopularity) > 0)}
207
595
  <span class="GameExtraInfoLabel PopularGameTag">{$_('gameThumbnail.hot')}</span>
208
596
  {/if}
597
+ {#if livegamedata}
598
+ {#if !isopen && starttime && timeformat}
599
+ <div class="GameProp LiveProps">
600
+ <div class="ClosedGame">
601
+ {$_('gameThumbnail.opens')}
602
+ <span>
603
+ {moment.utc(starttime).local().format(timeformat)}
604
+ </span>
605
+ </div>
606
+ {@html renderDealerName(dealername)}
607
+ {@html renderBetLimits(min, max, currencySymbol)}
608
+ </div>
609
+ {/if}
610
+ {#if isopen && displaytype && displaytype === BLACKJACK}
611
+ <div class="GameProp LiveProps BlackjackDisplay">
612
+ <div class="LiveIcons">
613
+ {#if istablefull}
614
+ <span class="FullTable">
615
+ {$_('gameThumbnail.full')}
616
+ </span>
617
+ {:else}
618
+ {#each seats as seatData}
619
+ <span class={contains(currentoccupiedseats, seatData.toString()) ? 'ClosedSeat' : 'OpenSeat'}>
620
+ <svg xmlns="http://www.w3.org/2000/svg" width="13" height="14" viewBox="0 0 13 14">
621
+ <path d="M11.58 6c-1.17 0-2.13.95-2.13 2.12v.4a8.82 8.82 0 00-2.92-.4c-1.54 0-2.45.22-2.92.4v-.4A2.136 2.136 0 001.48 6a1.33 1.33 0 00-.5 2.55c.14.07.24.21.24.37l.26 1.06c0 .96.73 1.75 1.65 1.85a.65.65 0 00.28 1.23.65.65 0 00.3-1.22h5.64a.65.65 0 00.3 1.22.65.65 0 00.28-1.23c.93-.1 1.65-.9 1.65-1.85l.27-1.06c0-.16.1-.3.24-.37A1.33 1.33 0 0011.58 6z"/>
622
+ <path d="M4.34 7.5c.55-.1 1.27-.17 2.2-.17.91 0 1.63.07 2.18.17.21-.96.9-1.74 1.8-2.1V4a3.99 3.99 0 00-7.97 0v1.4c.9.36 1.58 1.14 1.79 2.1z"/>
623
+ </svg>
624
+ </span>
625
+ {/each}
626
+ {/if}
627
+ </div>
628
+ {@html renderDealerName(dealername)}
629
+ {@html renderBetLimits(min, max, currencySymbol)}
630
+ </div>
631
+ {:else if isopen && displaytype && displaytype === ROULETTE}
632
+ <div class="{roulettecontainerclassname}">
633
+ <div class="LiveIcons" bind:this={roulletteref}>
634
+ {#each new Array(numberofdisplayedresults) as garbage, i}
635
+ {#if roulleteresults && roulleteresults[i]}
636
+ {#if isdouble}
637
+ <div class="Double">
638
+ {@html renderSpan(`LatestResult ${i === 0 ? 'First' : ''}`, `first${i}${roulleteresults[i][0]}`, roulleteresults[i][0], colorsourcearray[roulleteresults[i][0]])}
639
+ {@html renderSpan(`LatestResult ${i === 0 ? 'First' : ''}`, `second${i}${roulleteresults[i][1]}`, roulleteresults[i][1], colorsourcearray[roulleteresults[i][1]])}
640
+ </div>
641
+ {:else}
642
+ {@html renderSpan(`LatestResult ${i === 0 ? 'First' : ''}`, i, roulleteresults[i], colorsourcearray[roulleteresults[i]])}
643
+ {/if}
644
+ {/if}
645
+ {/each}
646
+ </div>
647
+ {@html renderDealerName(dealername)}
648
+ {@html renderBetLimits(min, max, currencySymbol)}
649
+ </div>
650
+ {/if}
651
+ {/if}
209
652
  </div>
210
653
  </div>
211
654
  {#if showgamename}
@@ -236,6 +679,7 @@
236
679
  .GameContainer {
237
680
  width: 100%;
238
681
  height: 100%;
682
+ position: relative;
239
683
  }
240
684
 
241
685
  .GameInnerContainer {
@@ -261,6 +705,7 @@
261
705
  bottom: 0;
262
706
  left: 0;
263
707
  background: rgba(0, 0, 0, .65);
708
+ z-index: 15;
264
709
 
265
710
  .GameInfo {
266
711
  display: flex;
@@ -320,9 +765,11 @@
320
765
  .GameExtraInfo {
321
766
  display: block;
322
767
  position: absolute;
768
+ width: 100%;
769
+ height: 100%;
323
770
  top: ttp(.5);
324
771
  left: ttp(.5);
325
-
772
+ z-index: 0;
326
773
  &Label {
327
774
  font-size: ttp(.7);
328
775
  padding: ttp(.2);
@@ -354,4 +801,546 @@
354
801
  right: 10px;
355
802
  cursor: pointer;
356
803
  }
804
+
805
+ // LIVE LOBBY DATA STYLING
806
+ .GamesWrapper .ListGame:hover .GamePlayNowText {
807
+ @media (min-width: 1100px) {
808
+ z-index: 4;
809
+ }
810
+ }
811
+ // dim the game that doesn't have open seats or table is full
812
+ .ListGame:hover, .ListGame:active {
813
+ .OpenSeat, .ClosedSeat, .LiveLimits, .LatestResult, .FullTable {
814
+ opacity: .2;
815
+ }
816
+ }
817
+
818
+ .ListGame .GameInnerContainer {
819
+ z-index: 0;
820
+
821
+ .GameBg {
822
+ z-index: 5;
823
+ }
824
+
825
+ .GameExtraInfo {
826
+ z-index: 10;
827
+ }
828
+
829
+ &::after {
830
+ content: '';
831
+ position: absolute;
832
+ top: 0;
833
+ right: 0;
834
+ bottom: 0;
835
+ left: 0;
836
+ background: linear-gradient(0deg, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 100%);
837
+ }
838
+
839
+ .ListGame.GameContainerDimmed:before {
840
+ display: block;
841
+ content: ' ';
842
+ width: 100%;
843
+ height: 100%;
844
+ position: absolute;
845
+ top: 0;
846
+ right: 0;
847
+ bottom: 0;
848
+ left: 0;
849
+ z-index: 5;
850
+ background: rgba(0,0,0, .4);
851
+ color: var(--emfe-w-color-white, #FFFFFF);
852
+ fill: var(--emfe-w-color-white, #FFFFFF);
853
+ opacity: 1;
854
+ border-radius: ttp(.25);
855
+ }
856
+
857
+ .ListGame.GameContainerFullyDimmed:before {
858
+ display: block;
859
+ content: ' ';
860
+ width: 100%;
861
+ height: 100%;
862
+ position: absolute;
863
+ top: 0;
864
+ right: 0;
865
+ bottom: 0;
866
+ left: 0;
867
+ z-index: 5;
868
+ background: rgba(0,0,0, .8);
869
+ color: var(--emfe-w-color-white, #FFFFFF);
870
+ fill: var(--emfe-w-color-white, #FFFFFF);
871
+ opacity: 1;
872
+ border-radius: ttp(.25);
873
+ }
874
+
875
+ .LiveProps {
876
+ display: flex;
877
+ flex-direction: column;
878
+ position: absolute;
879
+ bottom: ttp(.5);
880
+ left: ttp(-.5);
881
+ right: 0;
882
+ width: 100%;
883
+ padding: 0;
884
+ background: linear-gradient(to top, rgba(0,0,0,.1) 0%, rgba(0,0,0,.2) 60%, rgba(0,0,0,.3) 80%, rgba(0,0,0,.99) 100%);
885
+ color: var(--emfe-w-color-white, #FFFFFF);
886
+ opacity: 1;
887
+ font-size: ttp(.875);
888
+ }
889
+
890
+ .ListGame:hover .LiveProps,
891
+ .ListGameLink:hover .LiveProps {
892
+ opacity: 0;
893
+ }
894
+ //--------------------------------------LIVE LOBBY ANIMATIONS------------------------------------------
895
+ // Pulsating animations
896
+ @keyframes red-pulse {
897
+ 0% {
898
+ box-shadow: 0 0 ttp(.125) 0 rgba(red, 0.75);
899
+ }
900
+
901
+ 15% {
902
+ box-shadow: 0 0 ttp(.625) ttp(.125) rgba(red, 0.75);
903
+ }
904
+
905
+ 30% {
906
+ box-shadow: 0 0 ttp(.125) 0 rgba(red, 0.75);
907
+ }
908
+
909
+ 50% {
910
+ box-shadow: 0 0 ttp(.625) ttp(.125) rgba(red, 0.75);
911
+ }
912
+
913
+ 65% {
914
+ box-shadow: 0 0 ttp(.125) 0 rgba(red, 0.75);
915
+ }
916
+
917
+ 80% {
918
+ box-shadow: 0 0 ttp(.625) ttp(.125) rgba(red, 0.75);
919
+ }
920
+
921
+ 100% {
922
+ box-shadow: 0 0 0 0 rgba(red, 0.75);
923
+ }
924
+ }
925
+
926
+ @keyframes green-pulse {
927
+ 0% {
928
+ box-shadow: 0 0 ttp(.125) 0 rgba(#56A80A, 0.75);
929
+ }
930
+
931
+ 15% {
932
+ box-shadow: 0 0 ttp(.625) ttp(.125) rgba(#56A80A, 0.75);
933
+ }
934
+
935
+ 30% {
936
+ box-shadow: 0 0 ttp(.125) 0 rgba(#56A80A, 0.75);
937
+ }
938
+
939
+ 50% {
940
+ box-shadow: 0 0 ttp(.625) ttp(.125) rgba(#56A80A, 0.75);
941
+ }
942
+
943
+ 65% {
944
+ box-shadow: 0 0 ttp(.125) 0 rgba(#56A80A, 0.75);
945
+ }
946
+
947
+ 80% {
948
+ box-shadow: 0 0 ttp(.625) ttp(.125) rgba(#56A80A, 0.75);
949
+ }
950
+
951
+ 100% {
952
+ box-shadow: 0 0 0 0 rgba(#56A80A, 0.75);
953
+ }
954
+ }
955
+ // Flip animation
956
+ @keyframes flip-open {
957
+ 0% {
958
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
959
+ transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
960
+ -webkit-transition-timing-function: ease-in;
961
+ transition-timing-function: ease-in;
962
+ opacity: 0;
963
+ }
964
+ 40% {
965
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
966
+ transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
967
+ -webkit-transition-timing-function: ease-in;
968
+ transition-timing-function: ease-in;
969
+ }
970
+ 60% {
971
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
972
+ transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
973
+ opacity: 1;
974
+ }
975
+ 80% {
976
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
977
+ transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
978
+ }
979
+ 100% {
980
+ -webkit-transform: perspective(400px);
981
+ transform: perspective(400px);
982
+ }
983
+ }
984
+
985
+ .silde-in-from-left {
986
+ -webkit-animation-name: silde-in-from-left;
987
+ animation-name: silde-in-from-left;
988
+ -webkit-animation-duration: 1s;
989
+ animation-duration: 1s;
990
+ -webkit-animation-fill-mode: both;
991
+ animation-fill-mode: both;
992
+ }
993
+ @-webkit-keyframes silde-in-from-left {
994
+ 0% {
995
+ -webkit-transform: translateX(-100%);
996
+ transform: translateX(-100%);
997
+ visibility: visible;
998
+ }
999
+ 100% {
1000
+ -webkit-transform: translateX(0);
1001
+ transform: translateX(0);
1002
+ }
1003
+ }
1004
+ @keyframes silde-in-from-left {
1005
+ 0% {
1006
+ -webkit-transform: translateX(-100%);
1007
+ transform: translateX(-100%);
1008
+ visibility: visible;
1009
+ }
1010
+ 100% {
1011
+ -webkit-transform: translateX(0);
1012
+ transform: translateX(0);
1013
+ }
1014
+ }
1015
+
1016
+ @keyframes flip-closed-seat {
1017
+ 0% {
1018
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1019
+ transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1020
+ -webkit-transition-timing-function: ease-in;
1021
+ transition-timing-function: ease-in;
1022
+ opacity: 0;
1023
+ }
1024
+ 40% {
1025
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
1026
+ transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
1027
+ -webkit-transition-timing-function: ease-in;
1028
+ transition-timing-function: ease-in;
1029
+ }
1030
+ 60% {
1031
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
1032
+ transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
1033
+ opacity: 1;
1034
+ }
1035
+ 80% {
1036
+ -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
1037
+ transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
1038
+ }
1039
+ 100% {
1040
+ -webkit-transform: perspective(400px);
1041
+ transform: perspective(400px);
1042
+ }
1043
+ }
1044
+
1045
+ // .Page-LiveCasino .GamesListContainer,
1046
+ // .Page-LiveCasino-Child .GamesListContainer,
1047
+ // .Page-LiveCasino .OperatorSticky .GamesListContainer,
1048
+ // .Page-LiveCasino .CasinoGames .GamesListContainer,
1049
+ // .Page-Live-casinoSource .GamesListContainer,
1050
+ // .Page-Live-casinoSource .GamesListContainer,
1051
+ // .Page-Live-casinoSource .OperatorSticky .GamesListContainer,
1052
+ // .Page-Live-casinoSource .CasinoGames .GamesListContainer {
1053
+ // overflow: visible;
1054
+ // }
1055
+
1056
+ .ListGame.PulsatingGreenShadow, .ListGame.PulsatingRedShadow {
1057
+ overflow: auto;
1058
+ }
1059
+
1060
+ .ListGame.PulsatingGreenShadow {
1061
+ animation: green-pulse 2s linear;
1062
+ }
1063
+
1064
+ .ListGame.PulsatingRedShadow {
1065
+ animation: red-pulse 2s linear;
1066
+ }
1067
+
1068
+ .LiveIcons {
1069
+ position: relative;
1070
+ display: flex;
1071
+ padding: 0 ttp(1);
1072
+ // flex-wrap: wrap;
1073
+ box-sizing: border-box;
1074
+ flex-direction: row;
1075
+ align-items: center;
1076
+ justify-content: flex-start;
1077
+ min-height: auto;
1078
+ margin-bottom: ttp(.3125);
1079
+ @media (min-width: 1100px) {
1080
+ min-height: auto;
1081
+ }
1082
+
1083
+ &:first-child {
1084
+ margin-left: 0;
1085
+ }
1086
+
1087
+ &:last-child {
1088
+ margin-right: 0;
1089
+ }
1090
+
1091
+ &.Black, &.Red, &.Green {
1092
+ color: var(--emfe-w-color-white, #FFFFFF);
1093
+ border: ttp(.0625) solid var(--emfe-w-color-white, #FFFFFF);
1094
+ }
1095
+
1096
+ .LatestResult {
1097
+ min-width: ttp(.75);
1098
+ padding: ttp(.1);
1099
+ margin: 0 ttp(.0625);
1100
+ margin-right: ttp(.4);
1101
+ font-size: ttp(.875);
1102
+ text-align: center;
1103
+ @media (min-width: 1100px) {
1104
+ min-width: ttp(.75);
1105
+ font-size: ttp(.875);
1106
+ margin: 0 ttp(.125);
1107
+ margin-right: ttp(.3);
1108
+ padding: ttp(.1);
1109
+ }
1110
+
1111
+ &.FirstElementAnimated {
1112
+ animation: flip-open 2s both;
1113
+ -webkit-animation: flip-open 2s both;
1114
+ -webkit-backface-visibility: visible;
1115
+ backface-visibility: visible;
1116
+ }
1117
+
1118
+ &.First {
1119
+ min-width: ttp(1.5);
1120
+ &.Black, &.Red, &.Green {
1121
+ color: var(--emfe-w-color-white, #FFFFFF);
1122
+ border: ttp(.0625) solid var(--emfe-w-color-white, #FFFFFF);
1123
+ }
1124
+ &.Black {
1125
+ background: var(--emfe-w-color-black, #000000)
1126
+ }
1127
+ &.Red {
1128
+ background: red;
1129
+ }
1130
+ &.Green {
1131
+ background: #56A80A;
1132
+ }
1133
+ padding: ttp(.25);
1134
+ @media (min-width: 1100px) {
1135
+ padding: ttp(.25);
1136
+ }
1137
+ }
1138
+ }
1139
+
1140
+ .Double {
1141
+ display: flex;
1142
+ flex-direction: column;
1143
+
1144
+ .LatestResult {
1145
+ &:first-child {
1146
+ margin-bottom: ttp(.625);
1147
+ }
1148
+ }
1149
+
1150
+ &:first-child {
1151
+ .LatestResult {
1152
+ margin-left: 0;
1153
+ margin-bottom: 0;
1154
+ }
1155
+ }
1156
+
1157
+ &:last-child {
1158
+ .LatestResult {
1159
+ margin-right: 0;
1160
+ }
1161
+ }
1162
+ }
1163
+
1164
+ .Black, .Red, .Green {
1165
+ background-color: transparent;
1166
+ }
1167
+
1168
+ .Black {
1169
+ color: var(--emfe-w-color-white, #FFFFFF);
1170
+ }
1171
+
1172
+ .Red {
1173
+ color: red;
1174
+ }
1175
+
1176
+ .Green {
1177
+ color: #56A80A;
1178
+ }
1179
+ }
1180
+
1181
+ .Blue {
1182
+ color: #4d90a7;
1183
+ }
1184
+
1185
+ .Red {
1186
+ background-color: red;
1187
+ }
1188
+
1189
+ .Black {
1190
+ background-color: var(--emfe-w-color-black, #000000);
1191
+ }
1192
+
1193
+ .Green {
1194
+ background-color: #56A80A;
1195
+ }
1196
+
1197
+ .White {
1198
+ background-color: var(--emfe-w-color-white, #FFFFFF);
1199
+ }
1200
+
1201
+ .Yellow {
1202
+ background-color: #eeca3d;
1203
+ }
1204
+
1205
+ .Gold {
1206
+ background-color: darken(#eeca3d, 30%);
1207
+ }
1208
+
1209
+ .Orange {
1210
+ background-color: darken(#eeca3d, 40%);
1211
+ }
1212
+
1213
+ .Purple {
1214
+ background-color: darken(#f0f, 40%);
1215
+ }
1216
+
1217
+ .Tie {
1218
+ background-color: var(--emfe-w-color-white, #FFFFFF);
1219
+ 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));
1220
+ }
1221
+ .OpenSeat, .ClosedSeat {
1222
+ display: inline-block;
1223
+ width: ttp(1);
1224
+ height: ttp(1);
1225
+ margin-right: ttp(.25);
1226
+ @media (min-width: 768px) {
1227
+ width: ttp(1);
1228
+ height: ttp(1);
1229
+ }
1230
+ @media (min-width: 1100px) {
1231
+ width: ttp(1);
1232
+ height: ttp(1);
1233
+ }
1234
+ svg {
1235
+ width: 100%;
1236
+ height: 100%;
1237
+ }
1238
+ }
1239
+ .OpenSeat {
1240
+ animation: flip-closed-seat 2s both;
1241
+ -webkit-animation: flip-closed-seat 2s both;
1242
+ -webkit-backface-visibility: visible;
1243
+ backface-visibility: visible;
1244
+ }
1245
+ .ClosedSeat {
1246
+ animation: flip-open 2s both;
1247
+ -webkit-animation: flip-open 2s both;
1248
+ -webkit-backface-visibility: visible;
1249
+ backface-visibility: visible;
1250
+ }
1251
+ .OpenSeat svg {
1252
+ fill: transparent;
1253
+ stroke: var(--emfe-w-color-white, #FFFFFF);
1254
+ }
1255
+ .ClosedSeat svg {
1256
+ fill: var(--emfe-w-color-white, #FFFFFF);
1257
+ }
1258
+ .FullTable {
1259
+ display: flex;
1260
+ position: relative;
1261
+ z-index: 10;
1262
+ height: ttp(1.25);
1263
+ padding: ttp(.0625) ttp(.25) ttp(.0625) 0;
1264
+ align-items: center;
1265
+ border-radius: ttp(.1875);
1266
+ font-size: ttp(.625);
1267
+ white-space: normal;
1268
+ text-transform: uppercase;
1269
+ -webkit-animation-name: silde-in-from-left;
1270
+ animation-name: silde-in-from-left;
1271
+ -webkit-animation-duration: 1s;
1272
+ animation-duration: 1s;
1273
+ -webkit-animation-fill-mode: both;
1274
+ animation-fill-mode: both;
1275
+ svg {
1276
+ width: 100%;
1277
+ height: 100%;
1278
+ fill: var(--emfe-w-color-white, #FFFFFF);
1279
+ }
1280
+ &.ClosedSeat {
1281
+ margin-right: ttp(-.1875);
1282
+ }
1283
+ }
1284
+ .PlayersDisplay {
1285
+ display: flex;
1286
+ flex-direction: row;
1287
+ flex-wrap: wrap;
1288
+ align-items: center;
1289
+ padding: ttp(.125) ttp(.625);
1290
+ background: linear-gradient(to bottom, rgba(33, 33, 33, .9) 0%, rgba(33, 33, 33, .1) 100%);
1291
+ color: var(--emfe-w-color-white, #FFFFFF);
1292
+ @media (min-width: 1100px) {
1293
+ padding: ttp(.125) ttp(1);
1294
+ }
1295
+ .PlayersIcon {
1296
+ width: ttp(.875);
1297
+ height: ttp(.875);
1298
+ margin-right: ttp(.25);
1299
+ //@media (min-width: 1100px) {
1300
+ // width: 1.7rem;
1301
+ // height: 1.7rem;
1302
+ //}
1303
+ svg {
1304
+ fill: var(--emfe-w-color-white, #FFFFFF);
1305
+ width: 100%;
1306
+ height: 100%;
1307
+ }
1308
+ }
1309
+ }
1310
+ .ClosedGame {
1311
+ opacity: 1;
1312
+ z-index: 10;
1313
+ padding: ttp(.5) ttp(.625);
1314
+ color: var(--emfe-w-color-white, #FFFFFF);
1315
+ font-size: ttp(1.125);
1316
+ @media (min-width: 1100px) {
1317
+ padding: ttp(.5) ttp(1);
1318
+ }
1319
+ span {
1320
+ font-size: ttp(1.125);
1321
+ }
1322
+ }
1323
+ .LiveLimits {
1324
+ opacity: 1;
1325
+ display: flex;
1326
+ flex-direction: row;
1327
+ justify-content: space-between;
1328
+ padding: ttp(.125) ttp(1.25) ttp(.3125) ttp(1.25);
1329
+ background: var(--emfe-w-color-black, #000000);
1330
+ color: var(--emfe-w-color-white, #FFFFFF);
1331
+ font-weight: normal;
1332
+ font-size: ttp(.75);
1333
+ @media (min-width: 1100px) {
1334
+ padding: ttp(.125) ttp(1.25) ttp(.3125) ttp(1.25);
1335
+ }
1336
+ span {
1337
+ font-size: ttp(.75);
1338
+ }
1339
+ }
1340
+ .Players {
1341
+ display: inline-block;
1342
+ width: ttp(1.1875);
1343
+ height: ttp(1.1875);
1344
+ }
1345
+ }
357
1346
  </style>