@everymatrix/casino-header-controller 1.43.4 → 1.45.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,1233 +0,0 @@
1
- <svelte:options tag={null} />
2
-
3
- <script lang="ts">
4
- import { onMount } from "svelte";
5
- import { isMobile, getDevice } from 'rvhelper';
6
- import { _, addNewMessages, setLocale, setupI18n } from './i18n';
7
- import { TRANSLATIONS } from './translations';
8
-
9
- import '@everymatrix/casino-slider';
10
- import '@everymatrix/casino-hamburger-menu';
11
- import '@everymatrix/player-account-balance-modal';
12
- import '@everymatrix/player-deposit';
13
-
14
- import everymatrixLogo from './images/everymatrix-logo-white.png';
15
-
16
- export let session:string = '';
17
- export let userid:string = '';
18
- export let endpoint:string = '';
19
- export let cmsendpoint:string = '';
20
- export let cmsenv:string = 'stage';
21
- export let lang:string = 'en';
22
- export let languageslist:string = 'en, ro';
23
- export let activecategory:string = '';
24
- export let translationurl:string = '';
25
- export let customlocaleidentifier:string = '';
26
- export let gmversion:string = '';
27
- export let countryflagheader:string = 'false';
28
- export let displaybalanceoption:string = 'All';
29
- export let countryflaghamburger:string = 'false';
30
- export let hasdefaultamount:string = '';
31
- export let playercurrency: string ='';
32
-
33
- //short cashier
34
- export let shortcashierenabled:string = '';
35
- export let producttype:string = '';
36
- export let successurl:string = '';
37
- export let failurl:string = '';
38
- export let cancelurl:string = '';
39
- export let sportsurl:string = '';
40
- export let casinourl:string = '';
41
- export let contacturl:string = '';
42
- export let homeurl:string = '';
43
- export let depositurl:string = '';
44
-
45
- export let actionevent:string = '';
46
-
47
- export let userroles:string = '';
48
- export let showsubgroups:string = 'false';
49
- export let clientstyling:string = '';
50
- export let clientstylingurl:string = '';
51
-
52
- export let currencyseparator:string = '';
53
- export let currencydecimal:string = '';
54
- export let currencyprecision:string = '';
55
-
56
-
57
- let primaryActiveIndex:string;
58
- let secondaryActiveIndex:string;
59
- let identity:string = "HeaderMenu";
60
- let customStylingContainer:HTMLElement;
61
-
62
- setupI18n({ withLocale: 'en', translations: {}});
63
-
64
- const setTranslationUrl = ():void => {
65
- let url:string = translationurl;
66
-
67
- fetch(url).then((res:any) => res.json())
68
- .then((res) => {
69
- Object.keys(res).forEach((item:any):void => {
70
- addNewMessages(item, res[item]);
71
- });
72
- }).catch((err:any) => {
73
- console.log(err);
74
- });
75
- }
76
-
77
- Object.keys(TRANSLATIONS).forEach((item:any) => {
78
- addNewMessages(item, TRANSLATIONS[item]);
79
- });
80
-
81
- const genericIcon:string = `<svg version="1.1" fill="#fff" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width: 30px; color: #fff;" x="0px" y="0px"
82
- viewBox="0 0 384.971 384.971" style="enable-background:new 0 0 384.971 384.971;" xml:space="preserve">
83
- <path style="color: var(--emfe-w-color-white, #FFFFFF)" d="M180.455,360.91H24.061V24.061h156.394c6.641,0,12.03-5.39,12.03-12.03s-5.39-12.03-12.03-12.03H12.03
84
- C5.39,0.001,0,5.39,0,12.031V372.94c0,6.641,5.39,12.03,12.03,12.03h168.424c6.641,0,12.03-5.39,12.03-12.03
85
- C192.485,366.299,187.095,360.91,180.455,360.91z"/>
86
- <path style="color: var(--emfe-w-color-white, #FFFFFF)" d="M381.481,184.088l-83.009-84.2c-4.704-4.752-12.319-4.74-17.011,0c-4.704,4.74-4.704,12.439,0,17.179l62.558,63.46H96.279
87
- c-6.641,0-12.03,5.438-12.03,12.151c0,6.713,5.39,12.151,12.03,12.151h247.74l-62.558,63.46c-4.704,4.752-4.704,12.439,0,17.179
88
- c4.704,4.752,12.319,4.752,17.011,0l82.997-84.2C386.113,196.588,386.161,188.756,381.481,184.088z"/>
89
- </svg>`;
90
-
91
- let mainMenuArray:Array<any> = [];
92
- let secondaryMenuArray:Array<any> = [];
93
- let selectedLanguage:string = '';
94
- let hamburgerURL:URL;
95
- let headerURL:URL;
96
- let logoURL:URL;
97
- let isLoading:boolean = true;
98
- let logoFromCms:boolean = false;
99
-
100
- let isOptionsListVisible:boolean = false;
101
- let mobileView:boolean = false;
102
- let userAgent:string = window.navigator.userAgent;
103
- let isLoggedIn:boolean = false;
104
- let playerID:string = '';
105
- let sessionID:string = '';
106
- let loginActive:boolean = true;
107
- let language:string = '';
108
- let languagesArray:Array<string> = [];
109
- let hamburgerMenuActive:boolean = false;
110
- let logoPath:string = '';
111
- let shortCashierActivated:boolean = false;
112
-
113
- const menuAction = (data: any) => {
114
- switch (data) {
115
- case 'login':
116
- loginActive = true;
117
- window.postMessage({type: 'OpenLoginRegisterModal', transition: 'Login' }, window.location.href);
118
-
119
- //Analytics event
120
- if (typeof gtag == 'function'){
121
- gtag('event', 'OpenLoginModal', {
122
- 'context': 'HeaderController'
123
- });
124
- }
125
- break;
126
-
127
- case 'register':
128
- loginActive = false;
129
- window.postMessage({type: 'OpenLoginRegisterModal', transition: 'Register'}, window.location.href);
130
-
131
- //Analytics event
132
- if (typeof gtag == 'function'){
133
- gtag('event', 'OpenRegisterModal', {
134
- 'context': 'HeaderController'
135
- });
136
- }
137
- break;
138
-
139
- case 'lobby':
140
- window.postMessage({type: 'GoToHomepage'}, window.location.href);
141
- break;
142
-
143
- case 'myaccount':
144
- window.postMessage({type: 'PlayerAccountMenuActive', isMobile: isMobile(userAgent)}, window.location.href);
145
- break;
146
-
147
- case 'deposit':
148
- if (isShortCashierEnabled) {
149
- shortCashierActivated = true;
150
- window.postMessage({ type: 'DisableScroll' }, window.location.href);
151
- } else {
152
- window.postMessage({type: 'GoToDeposit'}, window.location.href);
153
- }
154
-
155
- //Analytics event
156
- if (typeof gtag == 'function'){
157
- gtag('event', 'GoToDeposit', {
158
- 'context': 'HeaderController'
159
- });
160
- }
161
- break;
162
-
163
- case 'language':
164
- window.postMessage({type: 'LanguageChanged', selectedLanguage}, window.location.href);
165
- break;
166
- }
167
- }
168
-
169
- const toggleMenu = () => {
170
- hamburgerMenuActive = true;
171
- window.postMessage({type: 'OpenHamburgerMenuModal'}, window.location.href);
172
- }
173
-
174
- const messageHandler = (e: any) => {
175
- if (e.data) {
176
- switch (e.data.type) {
177
- case 'UserSessionID':
178
- playerID = e.data.userid;
179
- sessionID = e.data.session;
180
- isLoggedIn = true;
181
- break;
182
-
183
- case 'CloseHamburgerMenu':
184
- window.postMessage({ type: 'EnableScroll'}, window.location.href);
185
- if (e.data.showhamburger) {
186
- hamburgerMenuActive = false;
187
- }
188
- break;
189
-
190
- case 'LogoutSuccessfull':
191
- isLoggedIn = false;
192
- break;
193
-
194
- case 'LanguageChanged':
195
- createCMSUrls();
196
- getHeaderMenusData(headerURL);
197
- break;
198
-
199
- case 'OpenShortCashier':
200
- menuAction('deposit');
201
- break;
202
-
203
- case 'CloseShortCashier':
204
- closeShortCashier();
205
- break;
206
-
207
- case 'RequestHeaderHeight':
208
- window.postMessage({ type: 'HeaderHeight', headerHeight: customStylingContainer.clientHeight }, window.location.href);
209
- break;
210
- }
211
- }
212
- }
213
-
214
- const setSession = () => {
215
- isLoggedIn = true;
216
- sessionID = session;
217
- }
218
-
219
- const closeShortCashier = (event?) => {
220
- shortCashierActivated = false;
221
- window.postMessage({ type: 'EnableScroll' }, window.location.href);
222
- event?.stopPropagation();
223
- }
224
-
225
- const createCMSUrls = () => {
226
- headerURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/menu`)
227
- hamburgerURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/hamburger-menu`);
228
- logoURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/op-options/style`);
229
-
230
- let device = getDevice(userAgent)
231
-
232
- headerURL.searchParams.append('env', cmsenv);
233
- headerURL.searchParams.append('language', selectedLanguage.toLowerCase());
234
- //headerURL.searchParams.append('platform', 'dk');
235
- headerURL.searchParams.append('userRoles', userroles);
236
-
237
- if (device) {
238
- if (device === 'PC'){
239
- hamburgerURL.searchParams.append('device', 'dk');
240
- headerURL.searchParams.append('device', 'dk');
241
- } else if (device === 'iPad' || device === 'iPhone') {
242
- hamburgerURL.searchParams.append('device', 'mtWeb'); // replace with ios when we will have a native ios up for this
243
- headerURL.searchParams.append('device', 'mtWeb'); // replace with ios when we will have a native ios up for this
244
- } else {
245
- hamburgerURL.searchParams.append('device', 'mtWeb');
246
- headerURL.searchParams.append('device', 'mtWeb');
247
- }
248
- }
249
- hamburgerURL.searchParams.append('env', cmsenv);
250
- hamburgerURL.searchParams.append('language', selectedLanguage.toLowerCase());
251
- //hamburgerURL.searchParams.append('platform', 'dk');
252
- hamburgerURL.searchParams.append('userRoles', userroles);
253
-
254
- }
255
-
256
- const setActiveLanguage = ():void => {
257
- setLocale(lang);
258
- }
259
-
260
- const initialLoad = ():void => {
261
- languagesArray = languageslist.replace(/ /g,'').split(',');
262
- languagesArray = languagesArray.map((language:string) => language.toUpperCase());
263
-
264
- selectedLanguage = lang.toUpperCase();
265
- createCMSUrls();
266
-
267
- getLogo(logoURL);
268
- // getHeaderMenusData need to execute after the initialLoad receives the current lang value
269
- setTimeout(() => {
270
- getHeaderMenusData(headerURL);
271
- })
272
- }
273
-
274
- const initializeMenu = ():void => {
275
- primaryActiveIndex = setActiveIndex(activecategory, mainMenuArray);
276
- secondaryActiveIndex = setActiveIndex(activecategory, secondaryMenuArray);
277
- }
278
-
279
- const setActiveIndex = (activecategory, menuList) => {
280
- let result = menuList.find(item => {
281
- if (activecategory.indexOf('/sport') > -1) {
282
- return item.path.indexOf(activecategory) > -1;
283
- } else {
284
- if (item.path.includes(activecategory)) {
285
- return true;
286
- }
287
- }
288
- });
289
-
290
- if (!result) {
291
- result = menuList.find(item => {
292
- return item.path.split('/').indexOf(activecategory.split('/')[1]) > -1;
293
- });
294
- }
295
-
296
- if (result) {
297
- return result.id;
298
- } else {
299
- return -1;
300
- }
301
- }
302
-
303
- const sendSliderData = ():void => {
304
- window.postMessage({ type: 'SliderData', identity, data: mainMenuArray }, window.location.href);
305
- }
306
-
307
- const getHeaderMenusData = (url:any):Promise<any> => {
308
- isLoading = true;
309
-
310
- return new Promise((resolve, reject) => {
311
- fetch(url)
312
- .then((res: any) => res.json())
313
- .then((data: any) => {
314
- mainMenuArray = data.desktop.primary;
315
- secondaryMenuArray = data.desktop.secondary;
316
- isLoading = false;
317
-
318
- resolve(data);
319
- }, (err: any) => {
320
- isLoading = false;
321
- console.error(err);
322
- reject(err);
323
- });
324
- });
325
- }
326
-
327
- const getLogo = (url:any):Promise<any> => {
328
- logoFromCms = false;
329
-
330
- return new Promise((resolve, reject) => {
331
- fetch(url)
332
- .then((res: any) => res.json())
333
- .then((data: any) => {
334
- if (data.logoUrl.length > 0 && (data.logoUrl != "null" || data.logoUrl != "false")) {
335
- logoPath = data.logoUrl;
336
- logoFromCms = true;
337
- } else {
338
- logoFromCms = false;
339
- }
340
- resolve(data);
341
- }, (err: any) => {
342
- logoFromCms = false;
343
- console.error(err);
344
- reject(err);
345
- });
346
- });
347
- }
348
-
349
- const navigationTrigger = (itemData:any) => {
350
- window.postMessage({ type: 'NavigateTo', itemId: itemData.id, item: itemData, path: itemData.path, externalLink: itemData.externalLink || false, target: itemData.attrs?.target || null }, window.location.href);
351
- }
352
-
353
- const selectLanguage = (operatorLanguage:string): void => {
354
- selectedLanguage = operatorLanguage;
355
- isOptionsListVisible = false;
356
- menuAction('language');
357
- }
358
-
359
- const toggleLanguageDropdown = (): void => {
360
- isOptionsListVisible = !isOptionsListVisible;
361
- }
362
-
363
- const determineFlag = (selectedLanguage: string): string => {
364
- if (customlocaleidentifier) {
365
- selectedLanguage =
366
- customlocaleidentifier.includes(selectedLanguage.toLowerCase()) ?
367
- customlocaleidentifier.slice(-2) :
368
- selectedLanguage;
369
- }
370
-
371
- return selectedLanguage == 'EN' ? 'US' : selectedLanguage.toUpperCase();
372
- }
373
-
374
- const setClientStyling = ():void => {
375
- let sheet = document.createElement('style');
376
- sheet.innerHTML = clientstyling;
377
- customStylingContainer.appendChild(sheet);
378
- }
379
-
380
- const setClientStylingURL = ():void => {
381
- let url:URL = new URL(clientstylingurl);
382
- let cssFile:HTMLElement = document.createElement('style');
383
-
384
- fetch(url.href)
385
- .then((res:any) => res.text())
386
- .then((data:any) => {
387
- cssFile.innerHTML = data
388
-
389
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
390
- });
391
- }
392
-
393
- onMount(async () => {
394
- window.addEventListener('message', messageHandler, false);
395
-
396
- if (isMobile(userAgent)) {
397
- mobileView = true;
398
- }
399
-
400
- return () => {
401
- window.removeEventListener('message', messageHandler);
402
- }
403
- });
404
-
405
- $: activecategory && !isLoading && initializeMenu();
406
- $: session && setSession();
407
- $: isShortCashierEnabled = shortcashierenabled.toLocaleLowerCase() === 'true';
408
- $: lang && setActiveLanguage();
409
- $: cmsendpoint && lang && languageslist && userroles && initialLoad();
410
- $: translationurl && setTranslationUrl();
411
- $: clientstyling && customStylingContainer && setClientStyling();
412
- $: clientstylingurl && customStylingContainer && setClientStylingURL();
413
- </script>
414
-
415
- <svelte:head>
416
- <script type="module" src="https://unpkg.com/@everymatrix/user-deposit-withdrawal"></script>
417
- </svelte:head>
418
-
419
- {#if isLoggedIn}
420
- {#if mobileView}
421
- <header class="HeaderWrapper HeaderMobileWrapper" bind:this={customStylingContainer}>
422
- <div class="HeaderContainer">
423
- <div class="HeaderMobileMainNav">
424
- {#if !hamburgerMenuActive}
425
- <svg on:click={()=>toggleMenu()} xmlns="http://www.w3.org/2000/svg" width="22" height="16"
426
- viewBox="0 0 22 16">
427
- <defs>
428
- <style>.a {
429
- fill: var(--emfe-w-color-white, #FFFFFF);
430
- }
431
- </style>
432
- </defs>
433
- <g transform="translate(-14 -13)">
434
- <rect class="a" width="18" height="2" transform="translate(14 13)"/>
435
- <rect class="a" width="22" height="2" transform="translate(14 20)"/>
436
- <rect class="a" width="22" height="2" transform="translate(14 27)"/>
437
- </g>
438
- </svg>
439
- {/if}
440
- </div>
441
- <div class="HeaderBranding" on:click={()=>menuAction('lobby')}>
442
- {#if logoFromCms}
443
- <img src={logoPath} alt="Logo">
444
- {:else}
445
- <img src={everymatrixLogo} alt="Logo">
446
- {/if}
447
- </div>
448
-
449
- <div class="HeaderTopActions" part="HeaderTopActions">
450
- <div class="HeaderItemsMenu PrimaryMenu" part="HeaderItemsMenu PrimaryMenu">
451
- <player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl} {customlocaleidentifier} {gmversion} {displaybalanceoption} {currencyseparator} {currencydecimal} {currencyprecision} />
452
- <div>
453
- <div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('deposit')}</div>
454
- {#if shortCashierActivated}
455
- <div class="ShortCashierWindow" on:click={(event) => closeShortCashier(event)}></div>
456
- <div class="ShortCashierContainerWrapperMobile">
457
- <div class="ShortCashierContainerMobile">
458
- <div class="ClosePopUpButtonShortCashier" on:click={(event) => closeShortCashier(event)}>
459
- <svg width="20" height="20" xmlns="http://www.w3.org/2000/svg">
460
- <line x1="2" y1="2" x2="18" y2="18" stroke="black" stroke-width="2"/>
461
- <line x1="18" y1="2" x2="2" y2="18" stroke="black" stroke-width="2"/>
462
- </svg>
463
- </div>
464
- {#if gmversion === 'gmcore'}
465
- <player-deposit
466
- {endpoint}
467
- {session}
468
- playerid={userid}
469
- {lang}
470
- {hasdefaultamount}
471
- {playercurrency}
472
- {shortcashierenabled}
473
- {clientstyling}
474
- {clientstylingurl}
475
- ></player-deposit>
476
- {:else}
477
- <user-deposit-withdrawal
478
- {endpoint}
479
- type="deposit"
480
- channel="Mobile"
481
- language={lang}
482
- is-short-cashier={shortcashierenabled}
483
- product-type={producttype}
484
- user-id={userid}
485
- {session}
486
- success-url={'https://' + window.location.hostname + '/' + lang + successurl}
487
- cancel-url={'https://' + window.location.hostname + '/' + lang + cancelurl}
488
- fail-url={'https://' + window.location.hostname + '/' + lang + failurl}
489
- sports-url={'https://' + window.location.hostname + '/' + lang + sportsurl}
490
- casino-url={'https://' + window.location.hostname + '/' + lang + casinourl}
491
- contact-url={'https://' + window.location.hostname + '/' + lang + contacturl}
492
- home-url={'https://' + window.location.hostname + '/' + lang + homeurl}
493
- deposit-url={'https://' + window.location.hostname + '/' + lang + depositurl}
494
- client-styling={clientstyling}
495
- client-styling-url={clientstylingurl}
496
- ></user-deposit-withdrawal>
497
- {/if}
498
- </div>
499
- </div>
500
- {/if}
501
- </div>
502
- <div class="Item ItemAccount" part="Item ItemAccount" on:click={() => menuAction('myaccount')}>
503
- <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429">
504
- <defs>
505
- <style>.a {
506
- fill: var(--emfe-w-color-white, #FFFFFF);
507
- }
508
- </style>
509
- </defs>
510
- <g transform="translate(-8 -4)">
511
- <path class="a"
512
- d="M15.5,4a3.75,3.75,0,1,0,3.75,3.75A3.761,3.761,0,0,0,15.5,4Zm0,1.429A2.321,2.321,0,1,1,13.179,7.75,2.311,2.311,0,0,1,15.5,5.429Zm0,6.429A7.7,7.7,0,0,0,8,19.714a.714.714,0,0,0,.714.714H22.286A.714.714,0,0,0,23,19.714,7.7,7.7,0,0,0,15.5,11.857Zm0,1.429A6.18,6.18,0,0,1,21.5,19H9.5A6.18,6.18,0,0,1,15.5,13.286Z"
513
- transform="translate(0 0)"/>
514
- </g>
515
- </svg>
516
- </div>
517
- </div>
518
- </div>
519
- </div>
520
- </header>
521
- {:else}
522
- <header class="HeaderWrapper" bind:this={customStylingContainer}>
523
- <div class="HeaderContainer">
524
- <div class="HeaderBranding" on:click={()=>menuAction('lobby')}>
525
- {#if logoFromCms}
526
- <img src={logoPath} alt="Logo">
527
- {:else}
528
- <img src={everymatrixLogo} alt="Logo">
529
- {/if}
530
- </div>
531
-
532
- <nav class="HeaderMainNav">
533
- {#if !isLoading}
534
- <casino-slider
535
- class="HeaderItemsMenu"
536
- part="HeaderItemsMenu"
537
- {identity}
538
- use:sendSliderData
539
- isprimarymenu=true
540
- {actionevent}
541
- activeindex={primaryActiveIndex}
542
- {endpoint}
543
- {lang}
544
- location="headerMain"
545
- {showsubgroups}
546
- {clientstyling}
547
- {clientstylingurl}
548
- />
549
- {/if}
550
- </nav>
551
- <div class="HeaderTopActions">
552
- <div class="HeaderItemsMenu PrimaryMenu">
553
- <player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl} {customlocaleidentifier} {gmversion} {displaybalanceoption} {currencyseparator} {currencydecimal} {currencyprecision}/>
554
- <div>
555
- <div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('deposit')}</div>
556
- {#if shortCashierActivated}
557
- <div class="ShortCashierWindow" on:click={(event) => closeShortCashier(event)}></div>
558
- <div class="ShortCashierContainerWrapper">
559
- <div class="ShortCashierContainer">
560
- <div class="ClosePopUpButtonShortCashier" on:click={(event) => closeShortCashier(event)}>
561
- <svg width="20" height="20" xmlns="http://www.w3.org/2000/svg">
562
- <line x1="2" y1="2" x2="18" y2="18" stroke="black" stroke-width="2"/>
563
- <line x1="18" y1="2" x2="2" y2="18" stroke="black" stroke-width="2"/>
564
- </svg>
565
- </div>
566
- {#if gmversion === 'gmcore'}
567
- <player-deposit
568
- {endpoint}
569
- {session}
570
- playerid={userid}
571
- {lang}
572
- {hasdefaultamount}
573
- {playercurrency}
574
- {shortcashierenabled}
575
- {clientstyling}
576
- {clientstylingurl}
577
- ></player-deposit>
578
- {:else}
579
- <user-deposit-withdrawal
580
- {endpoint}
581
- type="deposit"
582
- channel="Desktop"
583
- language={lang}
584
- is-short-cashier={shortcashierenabled}
585
- product-type={producttype}
586
- user-id={userid}
587
- {session}
588
- success-url={'https://' + window.location.hostname + '/' + lang + successurl}
589
- cancel-url={'https://' + window.location.hostname + '/' + lang + cancelurl}
590
- fail-url={'https://' + window.location.hostname + '/' + lang + failurl}
591
- sports-url={'https://' + window.location.hostname + '/' + lang + sportsurl}
592
- casino-url={'https://' + window.location.hostname + '/' + lang + casinourl}
593
- contact-url={'https://' + window.location.hostname + '/' + lang + contacturl}
594
- home-url={'https://' + window.location.hostname + '/' + lang + homeurl}
595
- deposit-url={'https://' + window.location.hostname + '/' + lang + depositurl}
596
- client-styling={clientstyling}
597
- client-styling-url={clientstylingurl}
598
- ></user-deposit-withdrawal>
599
- {/if}
600
- </div>
601
- </div>
602
- {/if}
603
- </div>
604
- <div class="Item ItemAccount" part="Item ItemAccount" on:click={() => menuAction('myaccount')}>
605
- <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429">
606
- <defs>
607
- <style>.a {
608
- fill: var(--emfe-w-color-white, #FFFFFF);
609
- }
610
- </style>
611
- </defs>
612
- <g transform="translate(-8 -4)">
613
- <path class="a"
614
- d="M15.5,4a3.75,3.75,0,1,0,3.75,3.75A3.761,3.761,0,0,0,15.5,4Zm0,1.429A2.321,2.321,0,1,1,13.179,7.75,2.311,2.311,0,0,1,15.5,5.429Zm0,6.429A7.7,7.7,0,0,0,8,19.714a.714.714,0,0,0,.714.714H22.286A.714.714,0,0,0,23,19.714,7.7,7.7,0,0,0,15.5,11.857Zm0,1.429A6.18,6.18,0,0,1,21.5,19H9.5A6.18,6.18,0,0,1,15.5,13.286Z"
615
- transform="translate(0 0)"/>
616
- </g>
617
- </svg>
618
- </div>
619
- {#if (languagesArray.length > 1) }
620
- {#if countryflagheader !== 'true'}
621
- <select bind:value={selectedLanguage} class="Item ItemLanguage NoFlag" on:change={()=>menuAction('language')}>
622
- {#each languagesArray as operatorLanguage}
623
- <option value={operatorLanguage} selected>{operatorLanguage.slice(-2)}</option>
624
- {/each}
625
- </select>
626
- {:else}
627
- <div class="LanguageDropdown">
628
- <!-- svelte-ignore a11y-click-events-have-key-events -->
629
- <div class="SelectedOption Item ItemLanguage" on:click={() => toggleLanguageDropdown()}>
630
- <span class="FlagIcon">
631
- <img src={`http://purecatamphetamine.github.io/country-flag-icons/3x2/${determineFlag(selectedLanguage.slice(-2))}.svg`}/>
632
- </span>
633
- <span class="LanguageName">{selectedLanguage.slice(-2)}</span>
634
- <span class="TriangleInactive {isOptionsListVisible ? 'TriangleActive' : ''}">
635
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="6.835" viewBox="0 0 14 6.835">
636
- <path id="arrow" d="M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z" transform="translate(-274.511 -441.088)" fill="#d1d1d1"/>
637
- </svg>
638
- </span>
639
- </div>
640
- {#if isOptionsListVisible}
641
- <div class="OptionList">
642
- {#each languagesArray as operatorLanguage}
643
- <div class="LanguageOption" on:click={() => selectLanguage(operatorLanguage)}>
644
- <span class="FlagIcon">
645
- <img src={`http://purecatamphetamine.github.io/country-flag-icons/3x2/${determineFlag(operatorLanguage.slice(-2))}.svg`}/>
646
- </span>
647
- <span class="LanguageName">{operatorLanguage.slice(-2)}</span>
648
- </div>
649
- {/each}
650
- </div>
651
- {/if}
652
- </div>
653
- {/if}
654
- {/if}
655
- </div>
656
- </div>
657
- </div>
658
- <nav class="HeaderSecondaryNav">
659
- <ul class="HeaderItemsMenuSecondary">
660
- {#each secondaryMenuArray as secondaryItem}
661
- <li class="ItemSecondary {secondaryActiveIndex?.toString().indexOf('$') > -1 ? (secondaryActiveIndex?.split("$").pop() == secondaryItem.id.split("$").pop() ? 'active': '') : (secondaryActiveIndex == secondaryItem.id ? 'active': '')}" part="ItemSecondary">
662
- <button on:click={() => navigationTrigger(secondaryItem)}>{secondaryItem.label}</button>
663
- </li>
664
- {/each}
665
- </ul>
666
- </nav>
667
- </header>
668
- {/if}
669
- {:else}
670
- {#if mobileView}
671
- <header class="HeaderWrapper HeaderMobileWrapper" bind:this={customStylingContainer}>
672
- <div class="HeaderContainer">
673
- <div class="HeaderMobileMainNav">
674
- <svg on:click={()=>toggleMenu()} xmlns="http://www.w3.org/2000/svg" width="22" height="16"
675
- viewBox="0 0 22 16">
676
- <defs>
677
- <style>.a {
678
- fill: var(--emfe-w-color-white, #FFFFFF);
679
- }
680
- </style>
681
- </defs>
682
- <g transform="translate(-14 -13)">
683
- <rect class="a" width="18" height="2" transform="translate(14 13)"/>
684
- <rect class="a" width="22" height="2" transform="translate(14 20)"/>
685
- <rect class="a" width="22" height="2" transform="translate(14 27)"/>
686
- </g>
687
- </svg>
688
- </div>
689
- <div class="HeaderBranding" on:click={()=>menuAction('lobby')}>
690
- {#if logoFromCms}
691
- <img src={logoPath} alt="Logo">
692
- {:else}
693
- <img src={everymatrixLogo} alt="Logo">
694
- {/if}
695
- </div>
696
-
697
- <div class="HeaderTopActions">
698
- <div class="HeaderItemsMenu">
699
- <div class="Item ItemLogin" on:click={()=>menuAction('login')}>{$_('login')}</div>
700
- <div class="Item ItemRegister" on:click={()=>menuAction('register')}>{$_('register')}</div>
701
- </div>
702
- </div>
703
- </div>
704
- </header>
705
- {:else}
706
- <header class="HeaderWrapper" bind:this={customStylingContainer}>
707
- <div class="HeaderContainer">
708
- <div class="HeaderBranding" on:click={()=>menuAction('lobby')}>
709
- {#if logoFromCms}
710
- <img src={logoPath} alt="Logo">
711
- {:else}
712
- <img src={everymatrixLogo} alt="Logo">
713
- {/if}
714
- </div>
715
-
716
- <nav class="HeaderMainNav">
717
- {#if !isLoading}
718
- <casino-slider
719
- class="HeaderItemsMenu"
720
- part="HeaderItemsMenu"
721
- {identity}
722
- use:sendSliderData
723
- isprimarymenu=true
724
- {actionevent}
725
- activeindex={primaryActiveIndex}
726
- location="headerMain"
727
- {endpoint}
728
- {lang}
729
- {clientstyling}
730
- {clientstylingurl}
731
- />
732
- {/if}
733
- </nav>
734
- <div class="HeaderTopActions">
735
- <div class="HeaderItemsMenu">
736
- <div class="Item ItemLogin" tabindex="0" on:click={()=>menuAction('login')}>{$_('login')}</div>
737
- <div class="Item ItemRegister" tabindex="0" on:click={()=>menuAction('register')}>{$_('register')}</div>
738
- {#if (languagesArray.length > 1) }
739
- {#if countryflagheader !== 'true'}
740
- <select bind:value={selectedLanguage} class="Item ItemLanguage NoFlag" on:change={()=>menuAction('language')}>
741
- {#each languagesArray as operatorLanguage}
742
- <option value={operatorLanguage}>{operatorLanguage.slice(-2)}</option>
743
- {/each}
744
- </select>
745
- {:else}
746
- <div class="LanguageDropdown">
747
- <div class="SelectedOption Item ItemLanguage" on:click={() => toggleLanguageDropdown()}>
748
- <span class="FlagIcon">
749
- <img src={`http://purecatamphetamine.github.io/country-flag-icons/3x2/${determineFlag(selectedLanguage.slice(-2))}.svg`}/>
750
- </span>
751
- <span class="LanguageName">{selectedLanguage.slice(-2)}</span>
752
- <span class="TriangleInactive {isOptionsListVisible ? 'TriangleActive' : ''}">
753
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="6.835" viewBox="0 0 14 6.835">
754
- <path id="arrow" d="M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z" transform="translate(-274.511 -441.088)" fill="#d1d1d1"/>
755
- </svg>
756
- </span>
757
- </div>
758
- {#if isOptionsListVisible}
759
- <div class="OptionList">
760
- {#each languagesArray as operatorLanguage}
761
- <div class="LanguageOption" on:click={() => selectLanguage(operatorLanguage)}>
762
- <span class="FlagIcon">
763
- <img src={`http://purecatamphetamine.github.io/country-flag-icons/3x2/${determineFlag(operatorLanguage.slice(-2))}.svg`}/>
764
- </span>
765
- <span class="LanguageName">{operatorLanguage.slice(-2)}</span>
766
- </div>
767
- {/each}
768
- </div>
769
- {/if}
770
- </div>
771
- {/if}
772
- {/if}
773
- </div>
774
- </div>
775
- </div>
776
- <nav class="HeaderSecondaryNav">
777
- <ul class="HeaderItemsMenuSecondary">
778
- {#each secondaryMenuArray as secondaryItem}
779
- <li class="ItemSecondary {secondaryActiveIndex?.toString().indexOf('$') > -1 ? (secondaryActiveIndex?.split("$").pop() == secondaryItem.id.split("$").pop() ? 'active': '') : (secondaryActiveIndex == secondaryItem.id ? 'active': '')}" part="ItemSecondary">
780
- <button on:click={() => navigationTrigger(secondaryItem)}>{secondaryItem.label}</button>
781
- </li>
782
- {/each}
783
- </ul>
784
- </nav>
785
- </header>
786
- {/if}
787
- {/if}
788
-
789
- <casino-hamburger-menu menuitemsurl={hamburgerURL} {activecategory} {lang} {countryflaghamburger} {customlocaleidentifier} {languageslist} {clientstyling} {clientstylingurl}></casino-hamburger-menu>
790
-
791
- <style lang="scss">
792
-
793
- *,
794
- *::before,
795
- *::after {
796
- font-family: inherit
797
- }
798
-
799
- :host {
800
- font-family: inherit;
801
- }
802
-
803
- @keyframes ModalBounce {
804
- 0% {
805
- opacity: 0;
806
- transform: translateY(20px);
807
- }
808
- 50% {
809
- transform: translateY(-6px);
810
- opacity: 0.8;
811
- }
812
- 100% {
813
- transform: translateY(0);
814
- opacity: 1;
815
- }
816
- }
817
-
818
-
819
- input,
820
- textarea,
821
- button {font-family: inherit}
822
-
823
-
824
- .HeaderSlider {
825
- width: 100%;
826
- height: 400px;
827
- }
828
-
829
- .LanguageDropdown {
830
- margin-right: 16px;
831
- position: relative;
832
- display: inline-block;
833
- }
834
-
835
- .ClosePopUpButtonShortCashier{
836
- margin-left: auto;
837
- cursor: pointer;
838
- svg {
839
- position: absolute;
840
- top: 10px;
841
- right: 10px;
842
- }
843
- }
844
-
845
- .ShortCashierWindow{
846
- background-color: rgba(0, 0, 0, 0.7);
847
- position: fixed;
848
- top: 0;
849
- bottom: 0;
850
- left: 0;
851
- right: 0;
852
- z-index: 16;
853
- }
854
-
855
- .ShortCashierContainerWrapper{
856
- position: relative;
857
- animation: ModalBounce .5s forwards;
858
- z-index: 17;
859
- right: 60%;
860
- }
861
- .ShortCashierContainer{
862
- background-color: var(--emfe-w-color-white, #FFFFFF);
863
- position: absolute;
864
- width: 360px;
865
- top: 16px;
866
- transform: translateX(-60%);
867
- box-shadow: 0px 30px 30px var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
868
- border-radius: 5px;
869
- z-index: 17;
870
- box-shadow: 0px 5px 20px 0px #191919;
871
- &:before {
872
- content: "";
873
- background: var(--emfe-w-color-white, #FFFFFF);
874
- clip-path: polygon(50% 0, 0% 100%, 100% 100%);
875
- position: absolute;
876
- top: -8px;
877
- left: 84%;
878
- width: 25px;
879
- height: 10px;
880
- transform: translateX(-50%);
881
- z-index: 1;
882
- }
883
- }
884
-
885
- .ShortCashierContainerWrapperMobile{
886
- position: relative;
887
- animation: ModalBounce .5s forwards;
888
- right: 110%;
889
- z-index: 17;
890
- }
891
- .ShortCashierContainerMobile {
892
- background-color: var(--emfe-w-color-white, #FFFFFF);
893
- position: absolute;
894
- width: 80vw;
895
- top: 14px;
896
- left: 50%;
897
- transform: translateX(-60%);
898
- box-shadow: 0px 30px 30px var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
899
- border-radius: 5px;
900
- z-index: 17;
901
- box-shadow: 0px 5px 20px 0px #191919;
902
- &:before {
903
- content: "";
904
- background: var(--emfe-w-color-white, #FFFFFF);
905
- clip-path: polygon(50% 0, 0% 100%, 100% 100%);
906
- position: absolute;
907
- top: -8px;
908
- left: 84%;
909
- width: 25px;
910
- height: 10px;
911
- transform: translateX(-50%);
912
- z-index: 1;
913
- }
914
- }
915
-
916
- .SelectedOption,
917
- .OptionList {
918
- border: 1px solid var(--emfe-w-header-color-primary);
919
- padding: 8px;
920
- cursor: pointer;
921
- width: 76px;
922
- border-radius: 4px;
923
- }
924
-
925
- .SelectedOption {
926
- display: flex;
927
- align-items: center;
928
- }
929
-
930
- .FlagIcon img {
931
- width: 20px;
932
- height: 14px;
933
- margin-right: 8px;
934
- border-radius: 2px;
935
- }
936
-
937
- .OptionList {
938
- position: absolute;
939
- z-index: 1;
940
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
941
- background: var(--emfe-w-header-color-secondary-menu-bg, var(--emfe-w-color-background-secondary, #050518));
942
- max-height: 150px;
943
- overflow-y: auto;
944
- }
945
-
946
- .LanguageOption {
947
- display: flex;
948
- align-items: center;
949
- padding: 4px;
950
- }
951
-
952
- .TriangleInactive {
953
- display: block;
954
- color: currentColor;
955
- margin: 0 0 0 10px;
956
- transition: all .5s;
957
-
958
- svg{
959
- margin: 2px 0px;
960
- }
961
- }
962
-
963
- .TriangleActive {
964
- transform: rotate(180deg);
965
- position: relative;
966
-
967
- svg{
968
- margin: 2px 0px;
969
- }
970
- }
971
-
972
- .LanguageOption:hover {
973
- background-color: var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
974
- border-radius: 2px;
975
- }
976
- .HeaderWrapper {
977
- background: var(--emfe-w-header-color-menu-bg, var(--emfe-w-color-background-secondary, #050518));
978
- }
979
-
980
- .HeaderContainer {
981
- max-width: 1300px;
982
- display: flex;
983
- flex-direction: row;
984
- align-items: center;
985
- height: 84px;
986
- margin: 0 auto;
987
- }
988
-
989
- .HeaderMobileMainNav {
990
- display: flex;
991
- align-items: center;
992
- }
993
-
994
- .HeaderBranding {
995
- width: 140px;
996
- margin-right: 15px;
997
- cursor: pointer;
998
- img {
999
- width: 100%;
1000
- }
1001
- @media only screen and (max-width: 360px) {
1002
- margin-right: 0;
1003
- }
1004
- }
1005
-
1006
- .HeaderMainNav {
1007
- text-align: left;
1008
- }
1009
-
1010
- .HeaderTopActions {
1011
- text-align: right;
1012
- margin-left: auto;
1013
- }
1014
-
1015
- .HeaderSecondaryNav {
1016
- flex-direction: row;
1017
- width: 100%;
1018
- background: var(--emfe-w-header-color-secondary-menu-bg, var(--emfe-w-color-background-secondary, #050518));
1019
- border-top: 1px solid var(--emfe-w-color-gray-300, #58586B);
1020
- }
1021
-
1022
- .HeaderItemsMenu {
1023
- gap: 8px;
1024
- display: flex;
1025
- align-content: flex-start;
1026
- list-style: none;
1027
- text-transform: uppercase;
1028
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1029
- font-size: 16px;
1030
- align-items: center;
1031
-
1032
- .Item:hover {
1033
- .HeaderSecondaryNav {
1034
- display: block;
1035
- }
1036
- }
1037
-
1038
- .Item {
1039
- gap: 2px;
1040
- padding: 0 12px;
1041
- display: flex;
1042
- align-items: center;
1043
- }
1044
-
1045
- &.PrimaryMenu {
1046
- gap: 10px;
1047
- }
1048
- }
1049
-
1050
- .Item a {
1051
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1052
- text-decoration: none;
1053
- border-top: 1px solid transparent;
1054
- }
1055
-
1056
- .Item a:hover {
1057
- color: var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
1058
- border-top: 1px solid var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
1059
- padding-top: 5px;
1060
- }
1061
-
1062
- .ItemLogin {
1063
- border-radius: 5px;
1064
- background: transparent;
1065
- font-size: 14px;
1066
- font-weight: 600;
1067
- border: solid 1px var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1068
- height: 44px;
1069
- text-align: center;
1070
- line-height: 44px;
1071
- margin-right: 10px;
1072
- cursor: pointer;
1073
- }
1074
-
1075
- .ItemRegister, .ItemDeposit {
1076
- border-radius: 5px;
1077
- background: var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
1078
- font-size: 14px;
1079
- height: 44px;
1080
- text-align: center;
1081
- line-height: 44px;
1082
- cursor: pointer;
1083
- }
1084
-
1085
- .ItemDeposit {
1086
- background: var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
1087
- }
1088
-
1089
- .ItemLanguage {
1090
- height: 44px;
1091
- width: 74px;
1092
- text-align: center;
1093
- line-height: 44px;
1094
- background: transparent;
1095
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1096
- border: none;
1097
- cursor: pointer;
1098
- outline: none;
1099
- -webkit-appearance: none;
1100
- -moz-appearance: none;
1101
- appearance: none;
1102
-
1103
- option {
1104
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1105
- }
1106
- }
1107
-
1108
- .ItemLanguage.NoFlag{
1109
- background: url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='%23FFFFFF' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat var(--emfe-w-header-color-menu-bg, var(--emfe-w-color-background-secondary, #050518));
1110
- background-position: calc(100% - 0.75rem) center;
1111
- width: 90px;
1112
- margin-right: 6px;
1113
- }
1114
-
1115
- .ItemBalance {
1116
- background: transparent;
1117
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1118
- border: 0;
1119
- }
1120
-
1121
- .ItemAccount {
1122
- cursor: pointer;
1123
-
1124
- svg {
1125
- width: 20px;
1126
- height: 20px;
1127
- }
1128
- }
1129
-
1130
- .HeaderItemsMenuSecondary {
1131
- display: flex;
1132
- flex-direction: row;
1133
- align-content: flex-start;
1134
- align-items: center;
1135
- height: 60px;
1136
- list-style: none;
1137
- text-transform: uppercase;
1138
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1139
- font-size: 14px;
1140
- max-width: 1280px;
1141
- margin: 0 auto;
1142
- overflow-y: hidden;
1143
- overflow-x: auto;
1144
- padding: 0;
1145
- }
1146
-
1147
- .HeaderItemsMenuSecondary .ItemSecondary {
1148
- width: auto;
1149
- height: 100%;
1150
- display: flex;
1151
- justify-content: center;
1152
- padding: 0 15px;
1153
- font-weight: 600;
1154
- transition-duration: 0.15s;
1155
-
1156
- button {
1157
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1158
- text-decoration: none;
1159
- border: none;
1160
- background: none;
1161
- font-size: 14px;
1162
- font-weight: 600;
1163
- text-transform: uppercase;
1164
- cursor: pointer;
1165
- &:hover {
1166
- color: var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
1167
- }
1168
-
1169
- &:focus {
1170
- color: var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
1171
- }
1172
-
1173
- &:visited {
1174
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1175
- }
1176
-
1177
- &:focus-visible {
1178
- color: var(--emfe-w-header-typography, var(--emfe-w-color-white, #FFFFFF));
1179
- outline: none;
1180
- }
1181
- }
1182
- &.active {
1183
- background: var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
1184
- }
1185
- }
1186
-
1187
- .HeaderSliderMobile {
1188
- background-position: bottom;
1189
- }
1190
-
1191
- .HeaderMobileWrapper {
1192
- .HeaderContainer {
1193
- height: 55px;
1194
- padding: 0 15px;
1195
- gap: 10px;
1196
- @media only screen and (max-width: 360px) {
1197
- padding: 0 5px;
1198
- }
1199
- }
1200
-
1201
- .HeaderBranding {
1202
- width: 110px;
1203
- display: flex;
1204
- align-items: center;
1205
- }
1206
-
1207
- .HeaderItemsMenu {
1208
- .Item {
1209
- padding: 0 10px;
1210
- display: block;
1211
- width: unset;
1212
- }
1213
-
1214
- .ItemBalance {
1215
- font-size: 12px;
1216
- }
1217
-
1218
- .ItemAccount {
1219
- padding: 0;
1220
- }
1221
- }
1222
-
1223
- .ItemRegister, .ItemDeposit, .ItemLogin {
1224
- height: 30px;
1225
- line-height: 30px;
1226
- font-size: 12px;
1227
- }
1228
-
1229
- .ItemLogin {
1230
- margin-right: 10px;
1231
- }
1232
- }
1233
- </style>