@everymatrix/casino-game-thumb-view 0.0.2-9.1 → 1.0.70

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.
Files changed (132) hide show
  1. package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
  2. package/dist/casino-game-thumb-view/p-2207062c.entry.js +1 -0
  3. package/dist/casino-game-thumb-view/p-39684b4a.entry.js +1 -0
  4. package/dist/casino-game-thumb-view/p-59ceeaaa.js +1 -0
  5. package/dist/casino-game-thumb-view/p-af0284b5.entry.js +1 -0
  6. package/dist/casino-game-thumb-view/p-b73b7a18.entry.js +1 -0
  7. package/dist/casino-game-thumb-view/p-bd016895.entry.js +7 -0
  8. package/dist/casino-game-thumb-view/p-d2580653.js +8 -0
  9. package/dist/casino-game-thumb-view/p-d48c3566.entry.js +1 -0
  10. package/dist/casino-game-thumb-view/p-e1255160.js +1 -0
  11. package/dist/casino-game-thumb-view/p-eef6f908.js +2 -0
  12. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  13. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +327 -322
  14. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +45 -45
  15. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +35 -33
  16. package/dist/cjs/casino-game-thumb-view.cjs.js +17 -11
  17. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +469 -511
  18. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +259 -249
  19. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +14 -12
  20. package/dist/cjs/game-thumbnail-5a34c727.js +78 -0
  21. package/dist/cjs/index-48d13981.js +1709 -0
  22. package/dist/cjs/loader.cjs.js +7 -13
  23. package/dist/cjs/locale.utils-53bf703a.js +132 -0
  24. package/dist/cjs/{utils-a0afc0a9.js → utils-c4ed3adc.js} +407 -404
  25. package/dist/collection/collection-manifest.json +10 -10
  26. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +251 -230
  27. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +136 -114
  28. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +126 -118
  29. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +1 -1
  30. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1023 -1020
  31. package/dist/collection/components/casino-game-thumb-view/index.js +1 -0
  32. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +78 -80
  33. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +154 -148
  34. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +201 -205
  35. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +71 -58
  36. package/dist/collection/constants/game-thumbnail.js +66 -66
  37. package/dist/collection/models/casino-game-thumb-view.js +6 -6
  38. package/dist/collection/models/currency-symbols.js +170 -170
  39. package/dist/collection/utils/baccarat-board-svg.js +225 -225
  40. package/dist/collection/utils/locale.utils.js +123 -123
  41. package/dist/collection/utils/utils.js +41 -41
  42. package/dist/esm/app-globals-0f993ce5.js +3 -0
  43. package/dist/esm/casino-extrainfo-baccarat.entry.js +327 -322
  44. package/dist/esm/casino-extrainfo-blackjack.entry.js +45 -45
  45. package/dist/esm/casino-extrainfo-roulette.entry.js +35 -33
  46. package/dist/esm/casino-game-thumb-view.js +14 -11
  47. package/dist/esm/casino-game-thumb-view_2.entry.js +469 -511
  48. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +259 -249
  49. package/dist/esm/casino-normal-game-thumbnail.entry.js +14 -12
  50. package/dist/esm/game-thumbnail-035e97e2.js +72 -0
  51. package/dist/esm/index-8c9a8030.js +1681 -0
  52. package/dist/esm/loader.js +7 -13
  53. package/dist/esm/locale.utils-0c514ca8.js +130 -0
  54. package/dist/{components/utils.js → esm/utils-090ac2e9.js} +407 -404
  55. package/dist/stencil.config.dev.js +17 -0
  56. package/dist/stencil.config.js +12 -35
  57. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
  58. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
  59. package/dist/types/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +36 -36
  60. package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +33 -33
  61. package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +18 -18
  62. package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +213 -213
  63. package/dist/types/components/casino-game-thumb-view/index.d.ts +1 -0
  64. package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +14 -14
  65. package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +13 -13
  66. package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +28 -27
  67. package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -4
  68. package/dist/types/components.d.ts +55 -24
  69. package/dist/types/constants/game-thumbnail.d.ts +66 -66
  70. package/dist/types/models/casino-game-thumb-view.d.ts +107 -107
  71. package/dist/types/models/currency-symbols.d.ts +170 -170
  72. package/dist/types/stencil-public-runtime.d.ts +142 -33
  73. package/dist/types/utils/baccarat-board-svg.d.ts +29 -29
  74. package/loader/cdn.js +1 -3
  75. package/loader/index.cjs.js +1 -3
  76. package/loader/index.d.ts +13 -1
  77. package/loader/index.es2017.js +1 -3
  78. package/loader/index.js +1 -3
  79. package/loader/package.json +1 -0
  80. package/package.json +8 -8
  81. package/dist/assets/baccarat.svg +0 -43
  82. package/dist/assets/fav.svg +0 -9
  83. package/dist/assets/favorite.svg +0 -12
  84. package/dist/assets/seat.svg +0 -6
  85. package/dist/assets/unfav.svg +0 -20
  86. package/dist/casino-game-thumb-view/p-0bd6266b.entry.js +0 -1
  87. package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +0 -1
  88. package/dist/casino-game-thumb-view/p-2b51ea79.js +0 -1
  89. package/dist/casino-game-thumb-view/p-46dbb1cb.js +0 -1
  90. package/dist/casino-game-thumb-view/p-58134a43.entry.js +0 -7
  91. package/dist/casino-game-thumb-view/p-6a6b2a78.js +0 -8
  92. package/dist/casino-game-thumb-view/p-b153f943.entry.js +0 -1
  93. package/dist/casino-game-thumb-view/p-d961aec4.entry.js +0 -1
  94. package/dist/casino-game-thumb-view/p-eb23569d.entry.js +0 -1
  95. package/dist/cjs/game-thumbnail-31d518f0.js +0 -78
  96. package/dist/cjs/index-65a1d768.js +0 -1796
  97. package/dist/cjs/locale.utils-09067b6b.js +0 -132
  98. package/dist/components/casino-extrainfo-baccarat.d.ts +0 -11
  99. package/dist/components/casino-extrainfo-baccarat.js +0 -400
  100. package/dist/components/casino-extrainfo-blackjack.d.ts +0 -11
  101. package/dist/components/casino-extrainfo-blackjack.js +0 -92
  102. package/dist/components/casino-extrainfo-roulette.d.ts +0 -11
  103. package/dist/components/casino-extrainfo-roulette.js +0 -77
  104. package/dist/components/casino-game-thumb-view.d.ts +0 -11
  105. package/dist/components/casino-game-thumb-view.js +0 -1618
  106. package/dist/components/casino-game-thumbnail-betlimit.d.ts +0 -11
  107. package/dist/components/casino-game-thumbnail-betlimit.js +0 -6
  108. package/dist/components/casino-game-thumbnail-betlimit2.js +0 -227
  109. package/dist/components/casino-game-thumbnail-extrainfo.d.ts +0 -11
  110. package/dist/components/casino-game-thumbnail-extrainfo.js +0 -6
  111. package/dist/components/casino-game-thumbnail-extrainfo2.js +0 -93
  112. package/dist/components/casino-game-thumbnail-overlay.d.ts +0 -11
  113. package/dist/components/casino-game-thumbnail-overlay.js +0 -6
  114. package/dist/components/casino-game-thumbnail-overlay2.js +0 -68
  115. package/dist/components/casino-normal-game-thumbnail.d.ts +0 -11
  116. package/dist/components/casino-normal-game-thumbnail.js +0 -52
  117. package/dist/components/game-thumbnail.js +0 -72
  118. package/dist/components/index.d.ts +0 -26
  119. package/dist/components/index.js +0 -1
  120. package/dist/components/locale.utils.js +0 -130
  121. package/dist/esm/game-thumbnail-0a56ee03.js +0 -72
  122. package/dist/esm/index-1e44dd9f.js +0 -1769
  123. package/dist/esm/locale.utils-1c69bea3.js +0 -130
  124. package/dist/esm/polyfills/core-js.js +0 -11
  125. package/dist/esm/polyfills/css-shim.js +0 -1
  126. package/dist/esm/polyfills/dom.js +0 -79
  127. package/dist/esm/polyfills/es5-html-element.js +0 -1
  128. package/dist/esm/polyfills/index.js +0 -34
  129. package/dist/esm/polyfills/system.js +0 -6
  130. package/dist/esm/utils-e9314132.js +0 -5739
  131. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +0 -2
  132. /package/dist/casino-game-thumb-view/{p-2d5f59fe.js → p-2d02adb1.js} +0 -0
@@ -1,132 +0,0 @@
1
- 'use strict';
2
-
3
- const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
5
- const TRANSLATIONS = {
6
- en: {
7
- playNow: 'Start now!',
8
- new: 'NEW',
9
- hot: 'Hot',
10
- opens: 'Opens ',
11
- full: 'table full - bet behind',
12
- dealer: 'Dealer',
13
- },
14
- 'zh-hk': {
15
- playNow: '現在開始!',
16
- new: '新的',
17
- hot: '熱的',
18
- opens: '打開 ',
19
- full: '滿桌 - 下注',
20
- dealer: '經銷商',
21
- },
22
- de: {
23
- playNow: 'Jetzt beginnen!',
24
- new: 'NEU',
25
- hot: 'Hot',
26
- opens: 'Öffnet ',
27
- full: 'full - bet behind',
28
- dealer: 'Dealer',
29
- },
30
- it: {
31
- playNow: 'Inizia ora!',
32
- new: 'NOVITÀ',
33
- hot: 'HOT',
34
- opens: 'Opens ',
35
- full: 'table full - bet behind',
36
- dealer: 'Dealer',
37
- },
38
- fr: {
39
- playNow: 'Commencez maintenant',
40
- new: 'Nouveau',
41
- hot: 'Chaud',
42
- opens: 'Ouvre ',
43
- full: 'Table pleine - pari derrière',
44
- dealer: 'Concessionnaire',
45
- },
46
- es: {
47
- playNow: 'Juega ahora!',
48
- new: 'NUEVO',
49
- hot: 'HOT',
50
- opens: 'Abiertas',
51
- full: 'Mesa llena - Apostar de pie',
52
- dealer: 'Dealer',
53
- },
54
- tr: {
55
- playNow: 'Şimdi oyna',
56
- new: 'YENİ',
57
- hot: 'SICAK',
58
- opens: 'Açılır ',
59
- full: 'masa dolu - bet behind',
60
- dealer: 'Dealer',
61
- },
62
- ru: {
63
- playNow: 'Играть сейчас',
64
- new: 'НОВАЯ',
65
- hot: 'ГОРЯЧЕЙ',
66
- opens: 'Opens ',
67
- full: 'table full - bet behind',
68
- dealer: 'Dealer',
69
- },
70
- ro: {
71
- playNow: 'Joaca acum',
72
- new: 'NOU',
73
- hot: 'POPULAR',
74
- opens: 'Opens ',
75
- full: 'table full - bet behind',
76
- dealer: 'Dealer',
77
- },
78
- hr: {
79
- playNow: 'Započnite sada!',
80
- new: 'NOVO',
81
- hot: 'Vruće',
82
- opens: 'Opens ',
83
- full: 'table full - bet behind',
84
- dealer: 'Dealer',
85
- },
86
- hu: {
87
- playNow: 'Játsszon most!',
88
- new: 'ÚJ',
89
- hot: 'Hot',
90
- opens: 'Opens ',
91
- full: 'table full - bet behind',
92
- dealer: 'Dealer',
93
- },
94
- pl: {
95
- playNow: 'Rozpocznij teraz!',
96
- new: 'NOWOŚĆ',
97
- hot: 'Hot',
98
- opens: 'Opens ',
99
- full: 'table full - bet behind',
100
- dealer: 'Dealer',
101
- },
102
- pt: {
103
- playNow: 'Comece agora!',
104
- new: 'NOVO',
105
- hot: 'Hot',
106
- opens: 'Abrir ',
107
- full: 'Mesa cheia - aposta atrás',
108
- dealer: 'Dealer',
109
- },
110
- sl: {
111
- playNow: 'Začnite zdaj!',
112
- new: 'NOVO',
113
- hot: 'Vroče',
114
- opens: 'Opens ',
115
- full: 'table full - bet behind',
116
- dealer: 'Dealer',
117
- },
118
- sr: {
119
- playNow: 'Započnite sada!',
120
- new: 'NOVO',
121
- hot: 'Vruće',
122
- opens: 'Opens ',
123
- full: 'table full - bet behind',
124
- dealer: 'Dealer',
125
- }
126
- };
127
- const translate = (key, customLang) => {
128
- const lang = customLang;
129
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
130
- };
131
-
132
- exports.translate = translate;
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface CasinoExtrainfoBaccarat extends Components.CasinoExtrainfoBaccarat, HTMLElement {}
4
- export const CasinoExtrainfoBaccarat: {
5
- prototype: CasinoExtrainfoBaccarat;
6
- new (): CasinoExtrainfoBaccarat;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,400 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { W as WINNER_COLOR } from './game-thumbnail.js';
3
- import { d as defineCustomElement$3 } from './casino-game-thumbnail-betlimit2.js';
4
- import { d as defineCustomElement$2 } from './casino-game-thumbnail-extrainfo2.js';
5
-
6
- var CasinoGameCategory;
7
- (function (CasinoGameCategory) {
8
- CasinoGameCategory["ROULETTE"] = "ROULETTE";
9
- CasinoGameCategory["POKER"] = "POKER";
10
- CasinoGameCategory["BLACKJACK"] = "BLACKJACK";
11
- })(CasinoGameCategory || (CasinoGameCategory = {}));
12
- var BaccaratWinner;
13
- (function (BaccaratWinner) {
14
- BaccaratWinner["PLAYER"] = "Player";
15
- BaccaratWinner["WINNER"] = "Banker";
16
- BaccaratWinner["TIE"] = "Tie";
17
- })(BaccaratWinner || (BaccaratWinner = {}));
18
-
19
- const BACCARAT_ROW = 6;
20
- const BACCARTAT_COLUMN = 40;
21
- const TIE_ANGLE = 135;
22
- const PLAYER_ANGLE = 45;
23
- class BaccaratSvg {
24
- constructor() {
25
- this.svgNS = 'http://www.w3.org/2000/svg';
26
- this.svgVersion = '1.1';
27
- this.markGroupExtraClass = {
28
- name: '',
29
- strokeWidth: 1.8,
30
- cellPadding: 6
31
- };
32
- }
33
- resetSvg() {
34
- this.svgGroupObj.innerHTML = '';
35
- }
36
- createTag(tag, attrs) {
37
- let oTag = document.createElementNS(this.svgNS, tag);
38
- Object.keys(attrs).forEach((attr) => {
39
- oTag.setAttribute(attr, attrs[attr]);
40
- });
41
- return oTag;
42
- }
43
- ;
44
- //Y1 = Y2, X1=0;
45
- createHLine(lineIdx) {
46
- return this.createTag('line', {
47
- 'x1': 0,
48
- 'x2': this.svgWidth,
49
- 'y1': lineIdx * this.cellHeight,
50
- 'y2': lineIdx * this.cellHeight
51
- });
52
- }
53
- createVLine(lineIdx) {
54
- return this.createTag('line', {
55
- 'x1': lineIdx * this.cellWidth,
56
- 'x2': lineIdx * this.cellWidth,
57
- 'y1': 0,
58
- 'y2': this.svgHeight
59
- });
60
- }
61
- createBaccaratBoard(parentEle) {
62
- this.parentEle = parentEle;
63
- this.svgWidth = parentEle.clientWidth;
64
- this.cellWidth = this.svgWidth / BACCARTAT_COLUMN;
65
- this.cellHeight = this.cellWidth;
66
- this.svgHeight = this.cellHeight * BACCARAT_ROW;
67
- let dynamicStyles = {};
68
- if (this.svgWidth < 300) {
69
- dynamicStyles = {
70
- name: 'Min',
71
- strokeWidth: 0.8,
72
- cellPadding: 2
73
- };
74
- }
75
- else if (this.svgWidth >= 300 && this.svgWidth < 500) {
76
- dynamicStyles = {
77
- name: 'Mid',
78
- strokeWidth: 1.5,
79
- cellPadding: 3.8
80
- };
81
- }
82
- this.markGroupExtraClass = Object.assign(Object.assign({}, this.markGroupExtraClass), dynamicStyles);
83
- this.markGroupExtraClass.fontSize = this.cellWidth - this.markGroupExtraClass.cellPadding * 0.8;
84
- this.markGroupExtraClass.pairDotR = this.markGroupExtraClass.strokeWidth / 2;
85
- this.markGroupExtraClass.pairBackDotR = this.markGroupExtraClass.pairDotR + 0.4;
86
- let svgObj = this.createTag('svg', { 'xmlns': this.svgNS, 'version': this.svgVersion, 'width': '100%' });
87
- let svgGroup = this.createTag('g', {
88
- 'style': 'cursor: pointer',
89
- 'stroke': '#a1acb696',
90
- 'stroke-width': '0.6px',
91
- 'fill': 'transparent'
92
- });
93
- let markGroup = this.createTag('g', {
94
- 'style': 'cursor: pointer', 'class': `BoardRoundsGroup ${this.markGroupExtraClass.name}`,
95
- 'stroke-width': this.markGroupExtraClass.strokeWidth, 'fill': 'transparent'
96
- });
97
- for (let i = 0; i < BACCARAT_ROW + 1; i++) {
98
- svgGroup.appendChild(this.createHLine(i));
99
- }
100
- for (let i = 0; i < BACCARTAT_COLUMN + 1; i++) {
101
- svgGroup.appendChild(this.createVLine(i));
102
- }
103
- parentEle.setAttribute('style', `height: ${this.svgHeight}px`);
104
- svgObj.appendChild(svgGroup);
105
- svgObj.appendChild(markGroup);
106
- parentEle.replaceChildren(svgObj);
107
- this.svgGroupObj = markGroup;
108
- }
109
- getRadius() {
110
- return (this.cellHeight - this.markGroupExtraClass.cellPadding) / 2;
111
- }
112
- addAnimate(objToAddAnimate) {
113
- let animate = this.createTag('animate', {
114
- 'attributeName': 'opacity', attributeType: 'XML', 'from': '0', to: 0.8, repeatCount: '5',
115
- begin: '0s', dur: '1.5s', 'calcMode': 'spline', keySplines: "0.1 0.8 0.9 0.1", fill: 'freeze'
116
- });
117
- objToAddAnimate.appendChild(animate);
118
- }
119
- markNewRound(x, y, options, markNew = false) {
120
- let centre = this.getCenterPoint(x, y);
121
- let svgG = this.createTag('g', {
122
- 'class': `Round ${markNew ? 'NewRound' : ''} ${options.winner === BaccaratWinner.TIE ? 'Tie' : ''}`,
123
- 'part': `Round ${markNew ? 'NewRound' : ''}`, 'opacity': markNew ? 0.1 : 1
124
- });
125
- //RoundWinner: TIE
126
- if (options.winner === BaccaratWinner.TIE) {
127
- svgG.appendChild(this.createTieSvg(x, y));
128
- this.svgGroupObj.appendChild(svgG);
129
- if (options.ties && options.ties > 1) {
130
- let text = this.createTag('text', {
131
- 'x': centre.cx - 1.5,
132
- 'y': centre.cy + this.markGroupExtraClass.fontSize / 2 - 1.1,
133
- 'fill': '#12153d',
134
- 'class': 'TieNumber',
135
- 'font-size': `${this.markGroupExtraClass.fontSize}px`,
136
- 'font-weight': this.markGroupExtraClass.fontSize > 7 ? 'bold' : ''
137
- });
138
- text.innerHTML = options.ties;
139
- svgG.appendChild(text);
140
- }
141
- this.svgGroupObj.appendChild(svgG);
142
- return;
143
- }
144
- svgG.appendChild(this.createTag('circle', {
145
- r: this.getRadius(),
146
- 'class': 'Round',
147
- 'stroke': options.color,
148
- 'cx': x * this.cellHeight + (this.cellHeight) / 2,
149
- 'cy': y * this.cellHeight + (this.cellHeight) / 2
150
- }));
151
- if (options.ties) {
152
- svgG.appendChild(this.createTieSvg(x, y));
153
- if (options.ties > 1) {
154
- let text = this.createTag('text', {
155
- 'x': centre.cx - 1.5,
156
- 'y': centre.cy + this.markGroupExtraClass.fontSize / 2 - 1.1,
157
- 'fill': '#12153d',
158
- 'class': 'TieNumber',
159
- 'font-size': `${this.markGroupExtraClass.fontSize}px`,
160
- 'font-weight': this.markGroupExtraClass.fontSize > 7 ? 'bold' : ''
161
- });
162
- text.innerHTML = options.ties;
163
- svgG.appendChild(text);
164
- }
165
- this.svgGroupObj.appendChild(svgG);
166
- }
167
- if (options.bankerPair) {
168
- let dots = this.createPairDot(x, y, options.pairColor.banker, PLAYER_ANGLE + 180);
169
- dots.forEach(dot => svgG.appendChild(dot));
170
- }
171
- if (options.playerPair) {
172
- let dots = this.createPairDot(x, y, options.pairColor.player, PLAYER_ANGLE);
173
- dots.forEach(dot => svgG.appendChild(dot));
174
- }
175
- if (options.includeAnimate) {
176
- this.addAnimate(svgG);
177
- }
178
- this.svgGroupObj.appendChild(svgG);
179
- }
180
- markRound(x, y, color, includeAnimate = false) {
181
- let circleSvg = this.createTag('circle', {
182
- r: this.getRadius(),
183
- 'class': 'Round',
184
- 'stroke': color,
185
- 'cx': x * this.cellHeight + (this.cellHeight) / 2,
186
- 'cy': y * this.cellHeight + (this.cellHeight) / 2
187
- });
188
- if (includeAnimate) {
189
- this.addAnimate(circleSvg);
190
- }
191
- this.svgGroupObj.appendChild(circleSvg);
192
- }
193
- getCenterPoint(x, y) {
194
- return {
195
- 'cx': x * this.cellHeight + (this.cellHeight) / 2,
196
- 'cy': y * this.cellHeight + (this.cellHeight) / 2
197
- };
198
- }
199
- createTieSvg(x, y) {
200
- let centerXY = this.getCenterPoint(x, y), angle = TIE_ANGLE, r = (this.cellHeight) / 2;
201
- const x1 = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
202
- const y1 = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
203
- const x2 = centerXY.cx + r * Math.cos((angle + 180) * Math.PI / 180);
204
- const y2 = centerXY.cy + r * Math.sin((angle + 180) * Math.PI / 180);
205
- return this.createTag('line', {
206
- x1, y1, x2, y2, 'class': 'Tie',
207
- 'stroke': 'green', 'opacity': '0.8', 'stroke-width': '1.8px'
208
- });
209
- }
210
- createPairDot(x, y, pairColor, angle) {
211
- let centerXY = this.getCenterPoint(x, y), r = this.getRadius() + this.markGroupExtraClass.pairDotR;
212
- const cx = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
213
- const cy = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
214
- return [
215
- this.createTag('circle', {
216
- cx, cy, r: this.markGroupExtraClass.pairBackDotR, 'class': 'DotBack',
217
- 'stroke': '#fff'
218
- }),
219
- this.createTag('circle', {
220
- cx, cy, r: this.markGroupExtraClass.pairDotR, 'class': 'Dot',
221
- 'stroke': pairColor, 'stroke-width': '0.8px', 'fill': pairColor
222
- })
223
- ];
224
- }
225
- markTie(x, y, includeAnimate = false) {
226
- let line = this.createTieSvg(x, y);
227
- if (includeAnimate) {
228
- this.addAnimate(line);
229
- }
230
- this.svgGroupObj.appendChild(line);
231
- }
232
- markPair(x, y, pairColor, angle) {
233
- let centerXY = this.getCenterPoint(x, y), r = this.getRadius() + this.markGroupExtraClass.pairDotR;
234
- const cx = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
235
- const cy = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
236
- this.svgGroupObj.appendChild(this.createTag('circle', {
237
- cx, cy, r: this.markGroupExtraClass.pairBackDotR, 'class': 'DotBack',
238
- 'stroke': '#fff'
239
- }));
240
- this.svgGroupObj.appendChild(this.createTag('circle', {
241
- cx, cy, r: this.markGroupExtraClass.pairDotR, 'class': 'Dot',
242
- 'stroke': pairColor, 'stroke-width': '0.8px', 'fill': pairColor
243
- }));
244
- }
245
- markBankerPair(x, y, pairColor) {
246
- this.markPair(x, y, pairColor, 225);
247
- }
248
- markPlayerPair(x, y, pairColor) {
249
- this.markPair(x, y, pairColor, 45);
250
- }
251
- }
252
-
253
- const casinoExtrainfoBaccaratCss = ":host {\n display: block;\n}\n\n.BaccaratBoard {\n container-type: inline-size;\n min-height: 30px;\n width: 100%;\n}\n.BaccaratBoard svg {\n background: #fff;\n opacity: 0.99;\n height: 100%;\n}\n\n.LiveProps.BaccaratProps div.LiveIcons {\n margin-bottom: 0px;\n padding: 0px;\n width: 100%;\n}\n\nsvg circle {\n transition: stroke-dashoffset 0s ease 2s;\n}\n\ng.BoardRoundsGroup {\n stroke-width: 1.8px;\n}\n\n@container (max-width: 300px) {\n g.BoardRoundsGroup {\n stroke-width: 0.9px;\n }\n}\nsvg .Round.NewRound {\n opacity: 1;\n -webkit-animation-name: fadeInFromNone;\n animation-name: fadeInFromNone;\n -webkit-animation-duration: 1.5s;\n animation-duration: 1.5s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n}\n\n@-webkit-keyframes fadeInFromNone {\n 0% {\n display: none;\n opacity: 0;\n }\n 1% {\n display: block;\n opacity: 0;\n }\n 100% {\n display: block;\n opacity: 1;\n }\n}\n@-moz-keyframes fadeInFromNone {\n 0% {\n display: none;\n opacity: 0;\n }\n 1% {\n display: block;\n opacity: 0;\n }\n 100% {\n display: block;\n opacity: 1;\n }\n}\n@-o-keyframes fadeInFromNone {\n 0% {\n display: none;\n opacity: 0;\n }\n 1% {\n display: block;\n opacity: 0;\n }\n 30% {\n display: block;\n opacity: 1;\n }\n 60% {\n display: block;\n opacity: 0;\n }\n 100% {\n display: block;\n opacity: 1;\n }\n}\n@keyframes fadeInFromNone {\n 0% {\n display: none;\n opacity: 0;\n }\n 1% {\n display: block;\n opacity: 0;\n }\n 30% {\n display: block;\n opacity: 1;\n }\n 60% {\n display: block;\n opacity: 0;\n }\n 100% {\n display: block;\n opacity: 1;\n }\n}";
254
-
255
- const CasinoExtrainfoBaccarat$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
256
- constructor() {
257
- super();
258
- this.__registerHost();
259
- this.baccaratSvg = new BaccaratSvg();
260
- this.isBoardInited = false;
261
- this.filledCells = [];
262
- }
263
- gameDetailsHandler(newVal, oldVal) {
264
- if (newVal.isOpen && (!oldVal || !oldVal.isOpen)) {
265
- if (this.showRoundBoard) {
266
- setTimeout(() => {
267
- this.initBaccaratRoundsBoard();
268
- }, 100);
269
- }
270
- }
271
- }
272
- async onGameLoaded(gameInfo) {
273
- var _a;
274
- this.gameInfo = gameInfo;
275
- this.gameDetails = this.gameInfo.details;
276
- (_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(this.gameInfo);
277
- }
278
- /**
279
- * Called when received update from updater
280
- * @param details
281
- */
282
- async onGameDetailUpdated(details) {
283
- var _a;
284
- this.gameInfo.details = this.gameDetails = details;
285
- this.gameDetails = Object.assign({}, this.gameDetails);
286
- (_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameDetailUpdated(details);
287
- // init board when the svg board init finished
288
- setTimeout(() => {
289
- this.isBoardInited = true;
290
- }, 200);
291
- }
292
- async onBaccaratResultChanged(result) {
293
- if (!result || !this.baccaratRef || this.isResetingRoundBoard) {
294
- return;
295
- }
296
- // For Tie round to mark, latestRound
297
- let latestRound, resetRoundBoardCells = () => {
298
- console.log('Reset Baccarat Board.');
299
- this.filledCells = [];
300
- this.baccaratSvg.resetSvg();
301
- latestRound = null;
302
- };
303
- // Reset round board to avoid the reset(result==[]) update come earlier than last round,
304
- // Ignore if the result.length == 0 for temporary
305
- if (this.isBoardInited &&
306
- (result.length == 0 ||
307
- (result.length == 1 &&
308
- (result[0].winner == BaccaratWinner.TIE ||
309
- (result[0].location.column == 0 && result[0].location.row == 0))))) {
310
- this.isResetingRoundBoard = true;
311
- resetRoundBoardCells();
312
- setTimeout(() => {
313
- this.isResetingRoundBoard = false;
314
- }, 1000);
315
- }
316
- result.forEach((item, i) => {
317
- //Mark the Tie when Tie round is the first cell(0,0)
318
- if (item.winner == BaccaratWinner.TIE) {
319
- if (i == result.length - 1 &&
320
- (!latestRound ||
321
- (latestRound &&
322
- latestRound.location.column == 0 &&
323
- latestRound.location.row == 0))) {
324
- let firstTieCellKey = '0-0-T';
325
- if (this.filledCells.indexOf(firstTieCellKey) == -1) {
326
- this.baccaratSvg.markNewRound(0, 0, Object.assign(Object.assign({}, item), { pairColor: WINNER_COLOR }), this.isBoardInited);
327
- this.filledCells.push(firstTieCellKey);
328
- }
329
- }
330
- return;
331
- }
332
- //cellKey to mark if a round has been marked
333
- const cellKey = `${item.location.column}-${item.location.row}`;
334
- const tCellKey = `${cellKey}-T`;
335
- if (item.ties > 0 && this.filledCells.indexOf(tCellKey) == -1) {
336
- this.baccaratSvg.markNewRound(item.location.column, item.location.row, Object.assign(Object.assign({}, item), { winner: BaccaratWinner.TIE }), this.isBoardInited);
337
- this.filledCells.push(tCellKey);
338
- }
339
- latestRound = item;
340
- //If current cell has been filled,duplicated data
341
- if (this.filledCells.indexOf(cellKey) == -1) {
342
- this.baccaratSvg.markNewRound(item.location.column, item.location.row, Object.assign(Object.assign({}, item), { pairColor: WINNER_COLOR }), this.isBoardInited);
343
- this.filledCells.push(cellKey);
344
- }
345
- });
346
- return;
347
- }
348
- initBaccaratRoundsBoard() {
349
- var _a;
350
- this.baccaratSvg.createBaccaratBoard(this.baccaratRef);
351
- if (((_a = this.gameDetails.results) === null || _a === void 0 ? void 0 : _a.length) > 0) {
352
- this.onBaccaratResultChanged(this.gameDetails.results);
353
- }
354
- }
355
- render() {
356
- var _a;
357
- return (h(Host, null, h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language }, ((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.isOpen) && this.showRoundBoard && (h("div", { slot: "category-details", class: "LiveIcons", part: "LiveIcons" }, h("div", { id: "boardContainer", part: "BaccaratBoard", class: "BaccaratBoard", ref: (el) => (this.baccaratRef = el) }))))));
358
- }
359
- static get watchers() { return {
360
- "gameDetails": ["gameDetailsHandler"]
361
- }; }
362
- static get style() { return casinoExtrainfoBaccaratCss; }
363
- }, [0, "casino-extrainfo-baccarat", {
364
- "language": [1],
365
- "showRoundBoard": [4, "show-round-board"],
366
- "gameInfo": [32],
367
- "gameDetails": [32],
368
- "onGameLoaded": [64],
369
- "onGameDetailUpdated": [64],
370
- "onBaccaratResultChanged": [64]
371
- }]);
372
- function defineCustomElement$1() {
373
- if (typeof customElements === "undefined") {
374
- return;
375
- }
376
- const components = ["casino-extrainfo-baccarat", "casino-game-thumbnail-betlimit", "casino-game-thumbnail-extrainfo"];
377
- components.forEach(tagName => { switch (tagName) {
378
- case "casino-extrainfo-baccarat":
379
- if (!customElements.get(tagName)) {
380
- customElements.define(tagName, CasinoExtrainfoBaccarat$1);
381
- }
382
- break;
383
- case "casino-game-thumbnail-betlimit":
384
- if (!customElements.get(tagName)) {
385
- defineCustomElement$3();
386
- }
387
- break;
388
- case "casino-game-thumbnail-extrainfo":
389
- if (!customElements.get(tagName)) {
390
- defineCustomElement$2();
391
- }
392
- break;
393
- } });
394
- }
395
- defineCustomElement$1();
396
-
397
- const CasinoExtrainfoBaccarat = CasinoExtrainfoBaccarat$1;
398
- const defineCustomElement = defineCustomElement$1;
399
-
400
- export { CasinoExtrainfoBaccarat, defineCustomElement };
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface CasinoExtrainfoBlackjack extends Components.CasinoExtrainfoBlackjack, HTMLElement {}
4
- export const CasinoExtrainfoBlackjack: {
5
- prototype: CasinoExtrainfoBlackjack;
6
- new (): CasinoExtrainfoBlackjack;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,92 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { D as DEFAULT_BLACKJACK_TOTAL_SEATS } from './game-thumbnail.js';
3
- import { t as translate } from './locale.utils.js';
4
- import { d as defineCustomElement$3 } from './casino-game-thumbnail-betlimit2.js';
5
- import { d as defineCustomElement$2 } from './casino-game-thumbnail-extrainfo2.js';
6
-
7
- const SeatSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="13" height="14" viewBox="0 0 13 14">
8
- <path
9
- 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"/>
10
- <path
11
- 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"/>
12
- </svg>
13
- `;
14
-
15
- const casinoExtrainfoBlackjackCss = ":host{display:block}.OpenSeat,.ClosedSeat{display:inline-block;width:16px;height:16px;margin-right:4px}.OpenSeat svg,.ClosedSeat svg{width:100%;height:100%}.OpenSeat{animation:flip-closed-seat 2s both;-webkit-animation:flip-closed-seat 2s both;-webkit-backface-visibility:visible;backface-visibility:visible}.ClosedSeat{animation:flip-open 2s both;-webkit-animation:flip-open 2s both;-webkit-backface-visibility:visible;backface-visibility:visible}.OpenSeat svg{fill:transparent;stroke:var(--emfe-w-color-white, #FFFFFF)}.ClosedSeat svg{fill:var(--emfe-w-color-white, #FFFFFF)}.FullTable{display:flex;position:relative;z-index:10;height:20px;padding:1px 4px 1px 0;align-items:center;border-radius:3px;font-size:12px;white-space:normal;text-transform:uppercase;-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}.FullTable svg{width:100%;height:100%;fill:var(--emfe-w-color-white, #FFFFFF)}.FullTable.ClosedSeat{margin-right:-3px}";
16
-
17
- const CasinoExtrainfoBlackjack$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
18
- constructor() {
19
- super();
20
- this.__registerHost();
21
- }
22
- /**
23
- * Generate Jackpot live seats info
24
- * @param totalSeats
25
- * @param occupiedSeats
26
- */
27
- generateBlackJackSeats(totalSeats = DEFAULT_BLACKJACK_TOTAL_SEATS, occupiedSeats = []) {
28
- let seatsStatus = [];
29
- for (let i = 0; i < totalSeats; i++) {
30
- seatsStatus.push({
31
- seatNo: i,
32
- isClosed: occupiedSeats.indexOf((i + 1).toString()) > -1,
33
- });
34
- }
35
- this.isTableFull = totalSeats == occupiedSeats.length;
36
- return seatsStatus;
37
- }
38
- async onGameLoaded(gameInfo) {
39
- var _a, _b, _c;
40
- this.gameInfo = gameInfo;
41
- this.gameDetails = this.gameInfo.details;
42
- this.seatsStatus = this.generateBlackJackSeats((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.totalSeats, (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentOccupiedSeats);
43
- (_c = this.infoWrapperRef) === null || _c === void 0 ? void 0 : _c.onGameLoaded(gameInfo);
44
- }
45
- async onGameDetailUpdated(details) {
46
- var _a, _b;
47
- this.gameInfo.details = this.gameDetails = details;
48
- this.seatsStatus = this.generateBlackJackSeats((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.totalSeats, (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentOccupiedSeats);
49
- this.gameDetails = Object.assign({}, this.gameDetails);
50
- }
51
- render() {
52
- return (h(Host, null, h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language }, this.gameDetails && this.gameDetails.isOpen && (h("div", { slot: "category-details", class: "LiveIcons", part: "LiveIcons" }, this.isTableFull ? (h("span", { class: "FullTable", part: "FullTable" }, translate('full', this.language))) : (this.seatsStatus.map((seatStatus) => (h("span", { class: `${seatStatus.isClosed ? 'ClosedSeat' : 'OpenSeat'} svg-container`, id: `s${seatStatus.seatNo}`, part: `${seatStatus.isClosed ? 'ClosedSeat' : 'OpenSeat'} svg-container`, innerHTML: SeatSvg })))))))));
53
- }
54
- static get style() { return casinoExtrainfoBlackjackCss; }
55
- }, [0, "casino-extrainfo-blackjack", {
56
- "language": [1],
57
- "gameInfo": [32],
58
- "gameDetails": [32],
59
- "seatsStatus": [32],
60
- "isTableFull": [32],
61
- "onGameLoaded": [64],
62
- "onGameDetailUpdated": [64]
63
- }]);
64
- function defineCustomElement$1() {
65
- if (typeof customElements === "undefined") {
66
- return;
67
- }
68
- const components = ["casino-extrainfo-blackjack", "casino-game-thumbnail-betlimit", "casino-game-thumbnail-extrainfo"];
69
- components.forEach(tagName => { switch (tagName) {
70
- case "casino-extrainfo-blackjack":
71
- if (!customElements.get(tagName)) {
72
- customElements.define(tagName, CasinoExtrainfoBlackjack$1);
73
- }
74
- break;
75
- case "casino-game-thumbnail-betlimit":
76
- if (!customElements.get(tagName)) {
77
- defineCustomElement$3();
78
- }
79
- break;
80
- case "casino-game-thumbnail-extrainfo":
81
- if (!customElements.get(tagName)) {
82
- defineCustomElement$2();
83
- }
84
- break;
85
- } });
86
- }
87
- defineCustomElement$1();
88
-
89
- const CasinoExtrainfoBlackjack = CasinoExtrainfoBlackjack$1;
90
- const defineCustomElement = defineCustomElement$1;
91
-
92
- export { CasinoExtrainfoBlackjack, defineCustomElement };
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface CasinoExtrainfoRoulette extends Components.CasinoExtrainfoRoulette, HTMLElement {}
4
- export const CasinoExtrainfoRoulette: {
5
- prototype: CasinoExtrainfoRoulette;
6
- new (): CasinoExtrainfoRoulette;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;