@everymatrix/casino-page-nd 1.77.5 → 1.77.7

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 (136) hide show
  1. package/components/{CasinoCalendar-DYLVhtW-.js → CasinoCalendar-BDBAlpOq.js} +2 -2
  2. package/components/{CasinoCalendar-CCAwhtBt.js → CasinoCalendar-D6jmsZcK.js} +2 -2
  3. package/components/{CasinoCalendar-DGE4j4zu.cjs → CasinoCalendar-lrNBAs15.cjs} +1 -1
  4. package/components/{CasinoCalendarDailyDetails-wpUMBkOO.cjs → CasinoCalendarDailyDetails-6lb-wVha.cjs} +1 -1
  5. package/components/{CasinoCalendarDailyDetails-DRcIScHe.js → CasinoCalendarDailyDetails-BBhFF2WM.js} +2 -2
  6. package/components/{CasinoCalendarDailyDetails-DIUpad6c.js → CasinoCalendarDailyDetails-D__yXWgj.js} +2 -2
  7. package/components/{CasinoCalendarDailyItem-CiQzqA52.js → CasinoCalendarDailyItem-D-kfWsiH.js} +2 -2
  8. package/components/{CasinoCalendarDailyItem-D8F2frZb.cjs → CasinoCalendarDailyItem-DvaPzfgS.cjs} +1 -1
  9. package/components/{CasinoCalendarDailyItem-NLjE5GF9.js → CasinoCalendarDailyItem-ql_ihisO.js} +2 -2
  10. package/components/{CasinoCollectionsProviders-CuOrtQzj.cjs → CasinoCollectionsProviders-BFeSctQw.cjs} +1 -1
  11. package/components/{CasinoCollectionsProviders-YW2-uRzZ.js → CasinoCollectionsProviders-Bab1uPWy.js} +1 -1
  12. package/components/{CasinoCollectionsProviders-ClZkWf5Z.js → CasinoCollectionsProviders-DwrD7vd-.js} +1 -1
  13. package/components/{CasinoFavoritesSectionNd-CjYeem_e.js → CasinoFavoritesSectionNd-CdwEnzJZ.js} +2 -2
  14. package/components/{CasinoFavoritesSectionNd-CAWBrQc_.cjs → CasinoFavoritesSectionNd-CeAGZTra.cjs} +1 -1
  15. package/components/{CasinoFavoritesSectionNd-Ct_f4Jki.js → CasinoFavoritesSectionNd-D2mS2udu.js} +2 -2
  16. package/components/{CasinoFilter-Cr4glniJ.cjs → CasinoFilter-BXW3sehT.cjs} +1 -1
  17. package/components/{CasinoFilter-Bo3TdoaX.js → CasinoFilter-BlAj36MS.js} +1 -1
  18. package/components/{CasinoFilter-D_yW5PlW.js → CasinoFilter-Yz-iNPE_.js} +1 -1
  19. package/components/{CasinoGameThumbnailNd-CYNBtn7j.cjs → CasinoGameThumbnailNd-BAo1UKJV.cjs} +1 -1
  20. package/components/{CasinoGameThumbnailNd-Cv029OfD.js → CasinoGameThumbnailNd-CTSgL622.js} +2 -2
  21. package/components/{CasinoGameThumbnailNd-g9ou3sw_.js → CasinoGameThumbnailNd-Eq4TBfUx.js} +2 -2
  22. package/components/{CasinoGamesCategorySectionNd-CAn4Ecz4.js → CasinoGamesCategorySectionNd-BkwNf7Ie.js} +5 -5
  23. package/components/{CasinoGamesCategorySectionNd-DHm9cDJj.js → CasinoGamesCategorySectionNd-CAu_HICy.js} +5 -5
  24. package/components/{CasinoGamesCategorySectionNd-j1l2VX7q.cjs → CasinoGamesCategorySectionNd-D5biWT8q.cjs} +1 -1
  25. package/components/{CasinoJackpotBanner-DwIpkmzr.js → CasinoJackpotBanner-CKYOMpfu.js} +2 -2
  26. package/components/{CasinoJackpotBanner-EBw-EtsK.cjs → CasinoJackpotBanner-D80xW-Mk.cjs} +1 -1
  27. package/components/{CasinoJackpotBanner-DYhiJaNA.js → CasinoJackpotBanner-LfeqW0MZ.js} +2 -2
  28. package/components/{CasinoLastPlayedSectionNd-B2RSFJjd.cjs → CasinoLastPlayedSectionNd-CBg0CTuZ.cjs} +1 -1
  29. package/components/{CasinoLastPlayedSectionNd-D42ogn9t.js → CasinoLastPlayedSectionNd-DQd4u6Ws.js} +2 -2
  30. package/components/{CasinoLastPlayedSectionNd-Vhkkc7I4.js → CasinoLastPlayedSectionNd-TYJKDp-v.js} +2 -2
  31. package/components/{CasinoMostPlayedSectionNd-BT5jfPpk.js → CasinoMostPlayedSectionNd-7P294fn0.js} +2 -2
  32. package/components/{CasinoMostPlayedSectionNd-DFdpxzZ1.js → CasinoMostPlayedSectionNd-Bj6PXsxR.js} +2 -2
  33. package/components/{CasinoMostPlayedSectionNd-CToSf0Sr.cjs → CasinoMostPlayedSectionNd-DjSy01-O.cjs} +1 -1
  34. package/components/{CasinoMyGamesNd-4ZtCXVu-.js → CasinoMyGamesNd-C9c0AkAW.js} +4 -4
  35. package/components/{CasinoMyGamesNd-Da3qtKMm.cjs → CasinoMyGamesNd-CItS5u2W.cjs} +1 -1
  36. package/components/{CasinoMyGamesNd-DJ0-Zbkh.js → CasinoMyGamesNd-DoJHMCBO.js} +4 -4
  37. package/components/{CasinoPageNd-DbQWwtfX.cjs → CasinoPageNd-BTefiNYK.cjs} +1 -1
  38. package/components/{CasinoPageNd-DEBqN_jK.js → CasinoPageNd-BemVSt5X.js} +11 -11
  39. package/components/{CasinoPageNd-CkcXDzk7.js → CasinoPageNd-BzrF3kYM.js} +11 -11
  40. package/components/{CasinoRandomGame-CzpjUn3x.js → CasinoRandomGame-CMSYhF_-.js} +1 -1
  41. package/components/{CasinoRandomGame-wYmzje9u.js → CasinoRandomGame-DIrzPIbu.js} +1 -1
  42. package/components/{CasinoRandomGame-UdXXycft.cjs → CasinoRandomGame-DpBr3bha.cjs} +1 -1
  43. package/components/{CasinoSearchNd-DedlNtWh.js → CasinoSearchNd-BPqPfey5.js} +3 -3
  44. package/components/{CasinoSearchNd-BKFkZrKZ.js → CasinoSearchNd-D-dzQh4R.js} +3 -3
  45. package/components/{CasinoSearchNd-BL7_QRmx.cjs → CasinoSearchNd-DyiDlSpR.cjs} +1 -1
  46. package/components/{CasinoSort-CDn4VxUk.js → CasinoSort-BN-JK1pj.js} +1 -1
  47. package/components/{CasinoSort-NJzenKP8.cjs → CasinoSort-DgMFkpPM.cjs} +1 -1
  48. package/components/{CasinoSort-Cehdm4Cm.js → CasinoSort-h2RisOUg.js} +1 -1
  49. package/components/{CasinoWinners-H0nWE_Qn.js → CasinoWinners-Bgo2Rs_n.js} +2 -2
  50. package/components/{CasinoWinners-b_1VWnj4.js → CasinoWinners-BvVbL9Vu.js} +2 -2
  51. package/components/{CasinoWinners-DiN0im-f.cjs → CasinoWinners-CSSuv3e-.cjs} +1 -1
  52. package/components/{GeneralAnimationLoading-D6ffp_TH.js → GeneralAnimationLoading-BW_2bLk1.js} +1 -1
  53. package/components/{GeneralAnimationLoading-Cr0HPeRs.js → GeneralAnimationLoading-DN41fbSR.js} +1 -1
  54. package/components/{GeneralAnimationLoading-Cfcv7UAg.cjs → GeneralAnimationLoading-Nh1_6F46.cjs} +1 -1
  55. package/es2015/casino-page-nd.cjs +1 -1
  56. package/es2015/casino-page-nd.js +1 -1
  57. package/esnext/casino-page-nd.js +1 -1
  58. package/lazy/{casino-calendar-Cb4Zdg3u.cjs → casino-calendar-Bl77-gFq.cjs} +1 -1
  59. package/lazy/{casino-calendar-Dr_AZSGB.js → casino-calendar-DgndEC1h.js} +1 -1
  60. package/lazy/{casino-calendar-daily-details-zifx6_iS.cjs → casino-calendar-daily-details-CnI64th8.cjs} +1 -1
  61. package/lazy/{casino-calendar-daily-details-C53XYyqp.js → casino-calendar-daily-details-NIrPMAx9.js} +1 -1
  62. package/lazy/{casino-calendar-daily-details-s-luglQY.js → casino-calendar-daily-details-RfH6TQ30.js} +1 -1
  63. package/lazy/{casino-calendar-daily-item-BVLvWZfF.js → casino-calendar-daily-item-BDCZrR-6.js} +1 -1
  64. package/lazy/{casino-calendar-daily-item-lmNWLkSh.js → casino-calendar-daily-item-DE9raRau.js} +1 -1
  65. package/lazy/{casino-calendar-daily-item-Bl20cwaJ.cjs → casino-calendar-daily-item-DFHlMY8X.cjs} +1 -1
  66. package/lazy/{casino-calendar-6neds2oy.js → casino-calendar-lJPTDQ1j.js} +1 -1
  67. package/lazy/{casino-collections-providers-WCc5YLEx.cjs → casino-collections-providers-34hCFtJ2.cjs} +1 -1
  68. package/lazy/{casino-collections-providers-CZQFi5vk.js → casino-collections-providers-DL7r04tn.js} +1 -1
  69. package/lazy/{casino-collections-providers-BILnf_UY.js → casino-collections-providers-DNM_Iyu6.js} +1 -1
  70. package/lazy/{casino-favorites-section-nd-CZ-zzDox.js → casino-favorites-section-nd-Dst1OGJj.js} +1 -1
  71. package/lazy/{casino-favorites-section-nd-BLZdSr15.js → casino-favorites-section-nd-dxjmtKKO.js} +1 -1
  72. package/lazy/{casino-favorites-section-nd-Dw-PusaS.cjs → casino-favorites-section-nd-i0uIOVGD.cjs} +1 -1
  73. package/lazy/{casino-filter-C-pmSjXr.js → casino-filter-Bs8WowUn.js} +1 -1
  74. package/lazy/{casino-filter-C2uu2OCM.cjs → casino-filter-CF2ZCQqb.cjs} +1 -1
  75. package/lazy/{casino-filter-Cj7_L9pL.js → casino-filter-z-FXMfx_.js} +1 -1
  76. package/lazy/{casino-game-thumbnail-nd-CwWp4s-T.js → casino-game-thumbnail-nd-Cmz17Gw1.js} +1 -1
  77. package/lazy/{casino-game-thumbnail-nd-Bfq5MHXu.cjs → casino-game-thumbnail-nd-MnzWkvM8.cjs} +1 -1
  78. package/lazy/{casino-game-thumbnail-nd-DOPQRFvD.js → casino-game-thumbnail-nd-jxJuT9i4.js} +1 -1
  79. package/lazy/{casino-games-category-section-nd-DSMqYaGz.js → casino-games-category-section-nd-BnFZJMB1.js} +1 -1
  80. package/lazy/{casino-games-category-section-nd-DWQClofk.js → casino-games-category-section-nd-CSKvlTtk.js} +1 -1
  81. package/lazy/{casino-games-category-section-nd-D6bEuvm5.cjs → casino-games-category-section-nd-DOnMFImu.cjs} +1 -1
  82. package/lazy/{casino-jackpot-banner-DehKtGHo.js → casino-jackpot-banner-B4viw7Nz.js} +1 -1
  83. package/lazy/{casino-jackpot-banner-DEzAKuNz.cjs → casino-jackpot-banner-D9ZIYrUW.cjs} +1 -1
  84. package/lazy/{casino-jackpot-banner-DV01Njxa.js → casino-jackpot-banner-DE-QFzom.js} +1 -1
  85. package/lazy/{casino-last-played-section-nd-DelAIRC0.js → casino-last-played-section-nd-BCV-c2ss.js} +1 -1
  86. package/lazy/{casino-last-played-section-nd-5wBhiaI9.cjs → casino-last-played-section-nd-CtRYZ71v.cjs} +1 -1
  87. package/lazy/{casino-last-played-section-nd-DjIQl88y.js → casino-last-played-section-nd-DS3PNGJE.js} +1 -1
  88. package/lazy/{casino-most-played-section-nd-DvH4BV0h.js → casino-most-played-section-nd-C947V460.js} +1 -1
  89. package/lazy/{casino-most-played-section-nd-CIYfLdSP.js → casino-most-played-section-nd-CN4-DEYf.js} +1 -1
  90. package/lazy/{casino-most-played-section-nd-BhEgwb0a.cjs → casino-most-played-section-nd-weFBbO8x.cjs} +1 -1
  91. package/lazy/{casino-my-games-nd-DNP31Ydi.js → casino-my-games-nd-BerMgLYs.js} +1 -1
  92. package/lazy/{casino-my-games-nd-DjKhKRFX.js → casino-my-games-nd-CE38OsFg.js} +1 -1
  93. package/lazy/{casino-my-games-nd-JngcaX75.cjs → casino-my-games-nd-DRxtJXue.cjs} +1 -1
  94. package/lazy/{casino-play-random-game--i81UNg_.js → casino-play-random-game-B0jqtwb8.js} +1 -1
  95. package/lazy/{casino-play-random-game-DdMyXzTm.js → casino-play-random-game-BLjUToOl.js} +1 -1
  96. package/lazy/{casino-play-random-game-Co-Rjcnv.cjs → casino-play-random-game-Cka6VtRY.cjs} +1 -1
  97. package/lazy/{casino-random-game-w7BF0cdQ.js → casino-random-game-Ciau0Mvd.js} +1 -1
  98. package/lazy/{casino-random-game-Cx_s3XrC.cjs → casino-random-game-CpQ6i7dG.cjs} +1 -1
  99. package/lazy/{casino-random-game-CrCiwriJ.js → casino-random-game-D_e0851H.js} +1 -1
  100. package/lazy/{casino-search-nd-C9BJPr43.js → casino-search-nd-BMooCpw9.js} +1 -1
  101. package/lazy/{casino-search-nd-B_ffUyl7.cjs → casino-search-nd-BiwLSkgL.cjs} +1 -1
  102. package/lazy/{casino-search-nd-CwQvpchn.js → casino-search-nd-ZzfGGH-J.js} +1 -1
  103. package/lazy/{casino-sort-CAbAJiMw.js → casino-sort-DCeDZhYp.js} +1 -1
  104. package/lazy/{casino-sort-C8jnh3qL.cjs → casino-sort-DPeKcRAy.cjs} +1 -1
  105. package/lazy/{casino-sort-DvKa_qwq.js → casino-sort-_0OBcn9p.js} +1 -1
  106. package/lazy/{casino-winners-C7YkitCv.cjs → casino-winners-Bgv_HVaE.cjs} +1 -1
  107. package/lazy/{casino-winners-B_gD0IFb.js → casino-winners-RoKqyNPS.js} +1 -1
  108. package/lazy/{casino-winners-SrWXp94E.js → casino-winners-sG6URrVE.js} +1 -1
  109. package/lazy/{general-animation-loading-BaCSgc29.cjs → general-animation-loading-CVbVP9X6.cjs} +1 -1
  110. package/lazy/{general-animation-loading-B8m3Kuyi.js → general-animation-loading-ChH2HRhq.js} +1 -1
  111. package/lazy/{general-animation-loading-Dp2OSO62.js → general-animation-loading-DOzPVdH_.js} +1 -1
  112. package/lazy/ui-image-Co06JuWa.cjs +1 -0
  113. package/lazy/ui-image-CwC1nmDQ.js +559 -0
  114. package/lazy/ui-image-DfAu-p11.js +543 -0
  115. package/package.json +1 -1
  116. package/stencil/{casino-play-random-game-B5hVksxr.cjs → casino-play-random-game-7w8tLfw3.cjs} +1 -1
  117. package/stencil/{casino-play-random-game-CLaJThDY.js → casino-play-random-game-RZvtsB6j.js} +2 -2
  118. package/stencil/{casino-play-random-game-__TIlMF6.js → casino-play-random-game-lMSukf76.js} +2 -2
  119. package/stencil/{casino-play-random-game_3-jap_cJQa.js → casino-play-random-game_3-BGi492Zx.js} +31 -46
  120. package/stencil/{casino-play-random-game_3-Ys8LRBD3.js → casino-play-random-game_3-DeMIDfdZ.js} +31 -46
  121. package/stencil/{casino-play-random-game_3-CSEG011u.cjs → casino-play-random-game_3-qgVlR9ud.cjs} +3 -3
  122. package/stencil/ui-image-8975d115-C4aRPj4L.js +71 -0
  123. package/stencil/ui-image-8975d115-CsGWHOum.cjs +1 -0
  124. package/stencil/ui-image-8975d115-DA_xNMMW.js +71 -0
  125. package/stencil/{ui-image-DFezoHJb.js → ui-image-Bc9Okpqm.js} +1 -1
  126. package/stencil/{ui-image-BrNSiahR.js → ui-image-BucplX2u.js} +1 -1
  127. package/stencil/{ui-image-eIUrNbW3.cjs → ui-image-YhLF4F-p.cjs} +1 -1
  128. package/stencil/{ui-image_2-v1kguPBp.js → ui-image_2-CU7-9W4b.js} +2 -2
  129. package/stencil/{ui-image_2-BcIdXuZn.cjs → ui-image_2-DUlGtGaX.cjs} +1 -1
  130. package/stencil/{ui-image_2-DEzpm8ng.js → ui-image_2-DmmjcHqK.js} +2 -2
  131. package/lazy/ui-image-BAx5XP4T.js +0 -554
  132. package/lazy/ui-image-q7RKTAnB.js +0 -538
  133. package/lazy/ui-image-xAOmP7KP.cjs +0 -1
  134. package/stencil/ui-image-2ff23cd5-B9-b3FKW.js +0 -86
  135. package/stencil/ui-image-2ff23cd5-BvSV3FQg.cjs +0 -1
  136. package/stencil/ui-image-2ff23cd5-a8pPlqaE.js +0 -86
@@ -1,8 +1,8 @@
1
- import { r as d, c as f, h as t, g, H as l } from "../lazy/casino-play-random-game--i81UNg_.js";
2
- const w = () => {
1
+ import { r as d, c as w, h as t, g, H as l } from "../lazy/casino-play-random-game-B0jqtwb8.js";
2
+ const f = () => {
3
3
  let e = window.navigator.userAgent;
4
4
  return e.toLowerCase().match(/android/i) ? "Android" : e.toLowerCase().match(/iphone/i) ? "iPhone" : e.toLowerCase().match(/ipad|ipod/i) ? "iPad" : "PC";
5
- }, y = "en", s = {
5
+ }, y = "en", r = {
6
6
  en: {
7
7
  error: "Error",
8
8
  randomGameLoading: "Loading ...",
@@ -48,14 +48,14 @@ const w = () => {
48
48
  }, m = (e) => new Promise((n) => {
49
49
  fetch(e).then((i) => i.json()).then((i) => {
50
50
  Object.keys(i).forEach((a) => {
51
- s[a] || (s[a] = {});
52
- for (let r in i[a])
53
- s[a][r] = i[a][r];
51
+ r[a] || (r[a] = {});
52
+ for (let s in i[a])
53
+ r[a][s] = i[a][s];
54
54
  }), n(!0);
55
55
  });
56
56
  }), o = (e, n) => {
57
57
  const i = n;
58
- return s[i !== void 0 && i in s ? i : y][e];
58
+ return r[i !== void 0 && i in r ? i : y][e];
59
59
  };
60
60
  function h(e, n) {
61
61
  if (e) {
@@ -66,8 +66,8 @@ function h(e, n) {
66
66
  function c(e, n) {
67
67
  const i = new URL(n);
68
68
  fetch(i.href).then((a) => a.text()).then((a) => {
69
- const r = document.createElement("style");
70
- r.innerHTML = a, e && e.appendChild(r);
69
+ const s = document.createElement("style");
70
+ s.innerHTML = a, e && e.appendChild(s);
71
71
  }).catch((a) => {
72
72
  console.error("There was an error while trying to load client styling from URL", a);
73
73
  });
@@ -75,8 +75,8 @@ function c(e, n) {
75
75
  function b(e, n, i) {
76
76
  if (window.emMessageBus) {
77
77
  const a = document.createElement("style");
78
- window.emMessageBus.subscribe(n, (r) => {
79
- a.innerHTML = r, e && e.appendChild(a);
78
+ window.emMessageBus.subscribe(n, (s) => {
79
+ a.innerHTML = s, e && e.appendChild(a);
80
80
  });
81
81
  }
82
82
  }
@@ -457,9 +457,9 @@ const x = `:host {
457
457
  width: 70px;
458
458
  height: 85px;
459
459
  }
460
- }`, v = x, k = class {
460
+ }`, k = x, v = class {
461
461
  constructor(e) {
462
- d(this, e), this.dataLoaded = f(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
462
+ d(this, e), this.dataLoaded = w(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
463
463
  let i = n.length, a;
464
464
  for (; i !== 0; )
465
465
  a = Math.floor(Math.random() * i), i--, [n[i], n[a]] = [n[a], n[i]];
@@ -504,7 +504,7 @@ const x = `:host {
504
504
  }
505
505
  fetchGameList() {
506
506
  let e = new URL(`${this.endpoint}/v1/casino/games`);
507
- return e.searchParams.append("platform", w()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
507
+ return e.searchParams.append("platform", f()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
508
508
  this.isLoading = !0, fetch(e.href).then((a) => a.json()).then((a) => {
509
509
  this.gamesToShow = this.setUpGames(a?.items), n(!0);
510
510
  }).catch((a) => {
@@ -536,12 +536,12 @@ const x = `:host {
536
536
  }
537
537
  animateGames() {
538
538
  this.iconVisibility = this.iconVisibleOnAnim === "true", this.animationStarted = !0, this.animationDone = !1, this.animation && this.animation.cancel(), this.selectedGameEl && (this.selectedGameEl.classList.remove("TheRandomGame"), this.selectedGame = null, this.selectedGameIndex = null), this.selectRandomGame();
539
- const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, r = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
539
+ const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, s = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
540
540
  i / 2 - // Additional half card width to center to the selected game
541
541
  a / 2, u = [
542
542
  { transform: "translateX(0px)", scale: 1 },
543
543
  { scale: 0.75 },
544
- { transform: `translateX(-${r}px)`, scale: 1 }
544
+ { transform: `translateX(-${s}px)`, scale: 1 }
545
545
  ], p = {
546
546
  duration: 3e3,
547
547
  easing: "cubic-bezier(0.5, 0, 0.5, 1.2)",
@@ -586,22 +586,24 @@ const x = `:host {
586
586
  };
587
587
  }
588
588
  };
589
- k.style = v;
590
- const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, S = class {
589
+ v.style = k;
590
+ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, C = class {
591
591
  constructor(e) {
592
- d(this, e), this.hasStarted = !1, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
592
+ d(this, e), this.hasStarted = !1, this._onLoad = () => {
593
+ this.imgLoaded = !0;
594
+ }, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
593
595
  }
594
596
  onSrcChange() {
595
597
  this.loading !== "eager" && (this.imgLoaded = !1, this.hasStarted = !1, (typeof window > "u" || !("IntersectionObserver" in window)) && this.beginLoad());
596
598
  }
597
599
  onLoadingChange(e, n) {
598
- e !== n && (this.cleanupObserver(), this.detachImgHandlers(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
600
+ e !== n && (this.cleanupObserver(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
599
601
  }
600
602
  componentDidLoad() {
601
603
  this.loading !== "eager" && this.setupObserver();
602
604
  }
603
605
  disconnectedCallback() {
604
- this.cleanupObserver(), this.detachImgHandlers();
606
+ this.cleanupObserver(), this.imgEl && (this.imgEl.src = "");
605
607
  }
606
608
  canUseIO() {
607
609
  return typeof window < "u" && "IntersectionObserver" in window;
@@ -626,25 +628,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
626
628
  var e;
627
629
  (e = this.io) === null || e === void 0 || e.disconnect(), this.io = void 0;
628
630
  }
629
- wireOnceHandlers() {
630
- this.imgEl && (this.detachImgHandlers(), this._onLoad = () => {
631
- var e;
632
- this.currentSrc && (!((e = this.imgEl) === null || e === void 0) && e.currentSrc) && !this.imgEl.currentSrc.includes(this.currentSrc) || (this.imgLoaded = !0);
633
- }, this._onError = () => {
634
- console.error("Load image failed:", this.src);
635
- }, this.imgEl.addEventListener("load", this._onLoad, { once: !0 }), this.imgEl.addEventListener("error", this._onError, { once: !0 }));
636
- }
637
- detachImgHandlers() {
638
- this.imgEl && (this._onLoad && this.imgEl.removeEventListener("load", this._onLoad), this._onError && this.imgEl.removeEventListener("error", this._onError), this._onLoad = void 0, this._onError = void 0);
639
- }
640
631
  beginLoad() {
641
- if (!this.hasStarted && this.imgEl && this.src) {
642
- if (this.hasStarted = !0, this.wireOnceHandlers(), this.imgEl.complete && this.imgEl.naturalWidth > 0) {
643
- this.imgLoaded = !0;
644
- return;
645
- }
646
- this.currentSrc = this.src, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
647
- }
632
+ this.hasStarted || this.imgEl && this.src && (this.hasStarted = !0, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0));
648
633
  }
649
634
  get showSkeleton() {
650
635
  return this.loading !== "eager" && !this.imgLoaded;
@@ -653,7 +638,7 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
653
638
  return t(l, { class: "HostContainer" }, t("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" }));
654
639
  }
655
640
  renderLazy() {
656
- return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
641
+ return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, onLoad: this._onLoad, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
657
642
  }
658
643
  render() {
659
644
  return this.loading === "eager" ? this.renderEager() : this.renderLazy();
@@ -668,8 +653,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
668
653
  };
669
654
  }
670
655
  };
671
- S.style = R;
672
- const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = C, E = class {
656
+ C.style = R;
657
+ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = S, V = class {
673
658
  constructor(e) {
674
659
  d(this, e), this.stylingValue = {
675
660
  width: this.handleStylingProps(this.width),
@@ -819,9 +804,9 @@ const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
819
804
  };
820
805
  }
821
806
  };
822
- E.style = L;
807
+ V.style = L;
823
808
  export {
824
- k as casino_play_random_game,
825
- S as ui_image,
826
- E as ui_skeleton
809
+ v as casino_play_random_game,
810
+ C as ui_image,
811
+ V as ui_skeleton
827
812
  };
@@ -1,8 +1,8 @@
1
- import { r as d, c as f, h as t, g, H as l } from "../lazy/casino-play-random-game-DdMyXzTm.js";
2
- const w = () => {
1
+ import { r as d, c as w, h as t, g, H as l } from "../lazy/casino-play-random-game-BLjUToOl.js";
2
+ const f = () => {
3
3
  let e = window.navigator.userAgent;
4
4
  return e.toLowerCase().match(/android/i) ? "Android" : e.toLowerCase().match(/iphone/i) ? "iPhone" : e.toLowerCase().match(/ipad|ipod/i) ? "iPad" : "PC";
5
- }, y = "en", s = {
5
+ }, y = "en", r = {
6
6
  en: {
7
7
  error: "Error",
8
8
  randomGameLoading: "Loading ...",
@@ -48,14 +48,14 @@ const w = () => {
48
48
  }, m = (e) => new Promise((n) => {
49
49
  fetch(e).then((i) => i.json()).then((i) => {
50
50
  Object.keys(i).forEach((a) => {
51
- s[a] || (s[a] = {});
52
- for (let r in i[a])
53
- s[a][r] = i[a][r];
51
+ r[a] || (r[a] = {});
52
+ for (let s in i[a])
53
+ r[a][s] = i[a][s];
54
54
  }), n(!0);
55
55
  });
56
56
  }), o = (e, n) => {
57
57
  const i = n;
58
- return s[i !== void 0 && i in s ? i : y][e];
58
+ return r[i !== void 0 && i in r ? i : y][e];
59
59
  };
60
60
  function h(e, n) {
61
61
  if (e) {
@@ -66,8 +66,8 @@ function h(e, n) {
66
66
  function c(e, n) {
67
67
  const i = new URL(n);
68
68
  fetch(i.href).then((a) => a.text()).then((a) => {
69
- const r = document.createElement("style");
70
- r.innerHTML = a, e && e.appendChild(r);
69
+ const s = document.createElement("style");
70
+ s.innerHTML = a, e && e.appendChild(s);
71
71
  }).catch((a) => {
72
72
  console.error("There was an error while trying to load client styling from URL", a);
73
73
  });
@@ -75,8 +75,8 @@ function c(e, n) {
75
75
  function b(e, n, i) {
76
76
  if (window.emMessageBus) {
77
77
  const a = document.createElement("style");
78
- window.emMessageBus.subscribe(n, (r) => {
79
- a.innerHTML = r, e && e.appendChild(a);
78
+ window.emMessageBus.subscribe(n, (s) => {
79
+ a.innerHTML = s, e && e.appendChild(a);
80
80
  });
81
81
  }
82
82
  }
@@ -457,9 +457,9 @@ const x = `:host {
457
457
  width: 70px;
458
458
  height: 85px;
459
459
  }
460
- }`, v = x, k = class {
460
+ }`, k = x, v = class {
461
461
  constructor(e) {
462
- d(this, e), this.dataLoaded = f(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
462
+ d(this, e), this.dataLoaded = w(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
463
463
  let i = n.length, a;
464
464
  for (; i !== 0; )
465
465
  a = Math.floor(Math.random() * i), i--, [n[i], n[a]] = [n[a], n[i]];
@@ -504,7 +504,7 @@ const x = `:host {
504
504
  }
505
505
  fetchGameList() {
506
506
  let e = new URL(`${this.endpoint}/v1/casino/games`);
507
- return e.searchParams.append("platform", w()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
507
+ return e.searchParams.append("platform", f()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
508
508
  this.isLoading = !0, fetch(e.href).then((a) => a.json()).then((a) => {
509
509
  this.gamesToShow = this.setUpGames(a == null ? void 0 : a.items), n(!0);
510
510
  }).catch((a) => {
@@ -536,12 +536,12 @@ const x = `:host {
536
536
  }
537
537
  animateGames() {
538
538
  this.iconVisibility = this.iconVisibleOnAnim === "true", this.animationStarted = !0, this.animationDone = !1, this.animation && this.animation.cancel(), this.selectedGameEl && (this.selectedGameEl.classList.remove("TheRandomGame"), this.selectedGame = null, this.selectedGameIndex = null), this.selectRandomGame();
539
- const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, r = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
539
+ const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, s = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
540
540
  i / 2 - // Additional half card width to center to the selected game
541
541
  a / 2, u = [
542
542
  { transform: "translateX(0px)", scale: 1 },
543
543
  { scale: 0.75 },
544
- { transform: `translateX(-${r}px)`, scale: 1 }
544
+ { transform: `translateX(-${s}px)`, scale: 1 }
545
545
  ], p = {
546
546
  duration: 3e3,
547
547
  easing: "cubic-bezier(0.5, 0, 0.5, 1.2)",
@@ -586,22 +586,24 @@ const x = `:host {
586
586
  };
587
587
  }
588
588
  };
589
- k.style = v;
590
- const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, S = class {
589
+ v.style = k;
590
+ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, C = class {
591
591
  constructor(e) {
592
- d(this, e), this.hasStarted = !1, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
592
+ d(this, e), this.hasStarted = !1, this._onLoad = () => {
593
+ this.imgLoaded = !0;
594
+ }, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
593
595
  }
594
596
  onSrcChange() {
595
597
  this.loading !== "eager" && (this.imgLoaded = !1, this.hasStarted = !1, (typeof window == "undefined" || !("IntersectionObserver" in window)) && this.beginLoad());
596
598
  }
597
599
  onLoadingChange(e, n) {
598
- e !== n && (this.cleanupObserver(), this.detachImgHandlers(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
600
+ e !== n && (this.cleanupObserver(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
599
601
  }
600
602
  componentDidLoad() {
601
603
  this.loading !== "eager" && this.setupObserver();
602
604
  }
603
605
  disconnectedCallback() {
604
- this.cleanupObserver(), this.detachImgHandlers();
606
+ this.cleanupObserver(), this.imgEl && (this.imgEl.src = "");
605
607
  }
606
608
  canUseIO() {
607
609
  return typeof window != "undefined" && "IntersectionObserver" in window;
@@ -626,25 +628,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
626
628
  var e;
627
629
  (e = this.io) === null || e === void 0 || e.disconnect(), this.io = void 0;
628
630
  }
629
- wireOnceHandlers() {
630
- this.imgEl && (this.detachImgHandlers(), this._onLoad = () => {
631
- var e;
632
- this.currentSrc && (!((e = this.imgEl) === null || e === void 0) && e.currentSrc) && !this.imgEl.currentSrc.includes(this.currentSrc) || (this.imgLoaded = !0);
633
- }, this._onError = () => {
634
- console.error("Load image failed:", this.src);
635
- }, this.imgEl.addEventListener("load", this._onLoad, { once: !0 }), this.imgEl.addEventListener("error", this._onError, { once: !0 }));
636
- }
637
- detachImgHandlers() {
638
- this.imgEl && (this._onLoad && this.imgEl.removeEventListener("load", this._onLoad), this._onError && this.imgEl.removeEventListener("error", this._onError), this._onLoad = void 0, this._onError = void 0);
639
- }
640
631
  beginLoad() {
641
- if (!this.hasStarted && this.imgEl && this.src) {
642
- if (this.hasStarted = !0, this.wireOnceHandlers(), this.imgEl.complete && this.imgEl.naturalWidth > 0) {
643
- this.imgLoaded = !0;
644
- return;
645
- }
646
- this.currentSrc = this.src, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
647
- }
632
+ this.hasStarted || this.imgEl && this.src && (this.hasStarted = !0, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0));
648
633
  }
649
634
  get showSkeleton() {
650
635
  return this.loading !== "eager" && !this.imgLoaded;
@@ -653,7 +638,7 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
653
638
  return t(l, { class: "HostContainer" }, t("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" }));
654
639
  }
655
640
  renderLazy() {
656
- return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
641
+ return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, onLoad: this._onLoad, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
657
642
  }
658
643
  render() {
659
644
  return this.loading === "eager" ? this.renderEager() : this.renderLazy();
@@ -668,8 +653,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
668
653
  };
669
654
  }
670
655
  };
671
- S.style = R;
672
- const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = C, E = class {
656
+ C.style = R;
657
+ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = S, V = class {
673
658
  constructor(e) {
674
659
  d(this, e), this.stylingValue = {
675
660
  width: this.handleStylingProps(this.width),
@@ -819,9 +804,9 @@ const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
819
804
  };
820
805
  }
821
806
  };
822
- E.style = L;
807
+ V.style = L;
823
808
  export {
824
- k as casino_play_random_game,
825
- S as ui_image,
826
- E as ui_skeleton
809
+ v as casino_play_random_game,
810
+ C as ui_image,
811
+ V as ui_skeleton
827
812
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../lazy/casino-play-random-game-Co-Rjcnv.cjs"),f=()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"},w="en",s={en:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},ro:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},fr:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},hr:{error:"Greška",randomGameLoading:"Učitavanje ...",playRandomGame:"Igraj nasumičnu igru",playNowRandomGame:"Igraj sada",spinRandomGame:"Zavrti"},hu:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},tr:{error:"Hata",randomGameLoading:"Yükleniyor...",playRandomGame:"Rastgele Bir Oyun Oyna",playNowRandomGame:"Şimdi Oyna",spinRandomGame:"DEĞİŞTİR"}},l=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(a=>{s[a]||(s[a]={});for(let r in i[a])s[a][r]=i[a][r]}),t(!0)})}),o=(e,t)=>{const i=t;return s[i!==void 0&&i in s?i:w][e]};function d(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function h(e,t){const i=new URL(t);fetch(i.href).then(a=>a.text()).then(a=>{const r=document.createElement("style");r.innerHTML=a,e&&e.appendChild(r)}).catch(a=>{console.error("There was an error while trying to load client styling from URL",a)})}function y(e,t,i){if(window.emMessageBus){const a=document.createElement("style");window.emMessageBus.subscribe(t,r=>{a.innerHTML=r,e&&e.appendChild(a)})}}const b=`:host {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../lazy/casino-play-random-game-Cka6VtRY.cjs"),w=()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"},f="en",r={en:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},ro:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},fr:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},hr:{error:"Greška",randomGameLoading:"Učitavanje ...",playRandomGame:"Igraj nasumičnu igru",playNowRandomGame:"Igraj sada",spinRandomGame:"Zavrti"},hu:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},tr:{error:"Hata",randomGameLoading:"Yükleniyor...",playRandomGame:"Rastgele Bir Oyun Oyna",playNowRandomGame:"Şimdi Oyna",spinRandomGame:"DEĞİŞTİR"}},l=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(a=>{r[a]||(r[a]={});for(let s in i[a])r[a][s]=i[a][s]}),t(!0)})}),o=(e,t)=>{const i=t;return r[i!==void 0&&i in r?i:f][e]};function d(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function m(e,t){const i=new URL(t);fetch(i.href).then(a=>a.text()).then(a=>{const s=document.createElement("style");s.innerHTML=a,e&&e.appendChild(s)}).catch(a=>{console.error("There was an error while trying to load client styling from URL",a)})}function y(e,t,i){if(window.emMessageBus){const a=document.createElement("style");window.emMessageBus.subscribe(t,s=>{a.innerHTML=s,e&&e.appendChild(a)})}}const b=`:host {
2
2
  display: block;
3
3
  font-family: inherit;
4
4
  -webkit-transform: translate3d(0, 0, 0);
@@ -375,7 +375,7 @@
375
375
  width: 70px;
376
376
  height: 85px;
377
377
  }
378
- }`,x=b,m=class{constructor(e){n.registerInstance(this,e),this.dataLoaded=n.createEvent(this,"data-loaded"),this.animation=null,this.selectedGameIndex=null,this.selectedGameEl=null,this.iconVisibility=null,this.shuffle=t=>{let i=t.length,a;for(;i!==0;)a=Math.floor(Math.random()*i),i--,[t[i],t[a]]=[t[a],t[i]];return t},this.endpoint=void 0,this.datasource=void 0,this.language="en",this.specificCategory="",this.iconVisible="",this.iconVisibleOnAnim="",this.launchByGameCard="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.hasErrors=!1,this.isLoading=!0,this.gamesToShow=void 0,this.selectedGame=null,this.animationDone=!1,this.animationStarted=!1,this.imageLoadingType="lazy",this.detectDistance="200px"}watchEndpoint(e,t){e&&e!=t&&this.endpoint&&this.fetchGameList()}handleNewTranslations(){this.isLoading=!0,l(this.translationUrl).then(()=>{this.isLoading=!1})}handleIsIconVisible(){this.iconVisibility=this.iconVisible==="true"}handleClientStylingChange(e,t){e!=t&&d(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.handleIsIconVisible()}componentWillLoad(){if(this.translationUrl.length>2&&l(this.translationUrl),this.endpoint&&this.language&&this.datasource)return this.fetchGameList()}componentDidLoad(){"IntersectionObserver"in window&&(this.io=new IntersectionObserver(e=>{e.forEach(t=>{var i;t.isIntersecting&&(this.imageLoadingType="eager",(i=this.io)===null||i===void 0||i.unobserve(t.target))})},{root:null,rootMargin:this.detectDistance}),this.io.observe(this.host)),window.emMessageBus!=null?y(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchGameList(){let e=new URL(`${this.endpoint}/v1/casino/games`);return e.searchParams.append("platform",f()),e.searchParams.append("datasource",this.datasource),e.searchParams.append("fields","gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"),e.searchParams.append("expand","vendor"),e.searchParams.append("pagination","offset=0,limit=423"),e.searchParams.append("language",this.language),this.specificCategory&&e.searchParams.append("filter",`categories(id=${this.specificCategory})`),new Promise((t,i)=>{this.isLoading=!0,fetch(e.href).then(a=>a.json()).then(a=>{this.gamesToShow=this.setUpGames(a==null?void 0:a.items),t(!0)}).catch(a=>{console.error(a),this.hasErrors=!0,i(a)}).finally(()=>{this.isLoading=!1,this.dataLoaded.emit({target:this.host})})})}setUpGames(e){const t=this.shuffle(e).slice(0,40);return t.concat(t)}selectRandomGame(){const e=this.gamesToShow.length/2;this.selectedGameIndex=Math.floor(Math.random()*(e-3)),this.selectedGameIndex+=e,this.selectedGameEl=this.gameContainer.children[this.selectedGameIndex]}playRandomGame(){this.animateGames(),typeof gtag=="function"&&gtag("event","PlayRandomGame",{context:"CasinoPlayRandomGame"})}respin(){this.animateGames(),typeof gtag=="function"&&gtag("event","RespinRandomGame",{context:"CasinoPlayRandomGame"})}animateGames(){this.iconVisibility=this.iconVisibleOnAnim==="true",this.animationStarted=!0,this.animationDone=!1,this.animation&&this.animation.cancel(),this.selectedGameEl&&(this.selectedGameEl.classList.remove("TheRandomGame"),this.selectedGame=null,this.selectedGameIndex=null),this.selectRandomGame();const e=window.getComputedStyle(this.gameContainer).getPropertyValue("gap"),t=parseInt(e,10),i=this.selectedGameEl.offsetWidth,a=this.gameContainer.offsetWidth,r=(i+t)*this.selectedGameIndex+i/2-a/2,u=[{transform:"translateX(0px)",scale:1},{scale:.75},{transform:`translateX(-${r}px)`,scale:1}],p={duration:3e3,easing:"cubic-bezier(0.5, 0, 0.5, 1.2)",fill:"forwards"};this.animation=this.gameContainer.animate(u,p),this.animation.onfinish=()=>{this.animationDone=!0,this.selectedGameEl.classList.add("TheRandomGame"),this.selectedGame=this.gamesToShow[this.selectedGameIndex]}}playGame(){this.selectedGame&&(window.postMessage({type:"PlayRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGame",{context:"CasinoPlayRandomGame"}))}showGameInfo(){window.postMessage({type:"InfoRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGameInfo",{context:"CasinoPlayRandomGame"})}renderGameDetails(){return n.h("div",{class:"RandomButtonsWrapper"},n.h("div",{class:"RandomGameDetails"},n.h("span",{class:"RandomGameTitle"},this.selectedGame.name),n.h("span",{class:"RandomGameInfo",onClick:()=>this.showGameInfo()},"i")),n.h("div",{class:"RandomButtons"},n.h("button",{class:"RandomButton On",onClick:()=>this.respin()},o("spinRandomGame",this.language)),!this.launchByGameCard&&n.h("button",{class:"RandomButton On",onClick:()=>this.playGame()},o("playNowRandomGame",this.language))))}renderSkeleton(){const e=Array.from({length:5},(t,i)=>n.h("div",{class:"RandomGameCard",key:i},n.h("ui-skeleton",{structure:"rectangle",width:"300px",height:"420px",borderRadius:"10px",animation:!0})));return n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer"},e))}render(){return n.h("div",{key:"29fe3535d63177e6d1f30a757bf17b70d89ce386",ref:e=>this.stylingContainer=e},this.hasErrors?n.h("div",{class:"RandomGameError"},n.h("div",{class:"Title"},o("error",this.language))):this.isLoading?this.renderSkeleton():n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer",ref:e=>this.gameContainer=e},this.gamesToShow&&this.gamesToShow.map((e,t)=>n.h("div",{class:"RandomGameCard",key:t,onClick:this.launchByGameCard==="true"?()=>this.playGame():void 0},n.h("div",{class:"RandomGameVendor"},e.vendor.name),n.h("ui-image",{class:"RandomGameImage",src:e.thumbnail,alt:e.name,title:e.name,loading:this.imageLoadingType}),this.selectedGame&&this.selectedGameIndex===t&&this.renderGameDetails()))),n.h("div",{class:`ButtonWrapper ${this.animationDone?"HideAnimation":""}`},n.h("div",{class:"ButtonContainer"},this.iconVisibility&&n.h("div",{class:`ButtonIcon ${this.animationStarted?"Flip":""}`},n.h("div",{class:"QustionMark"},"?"),n.h("div",{class:"HexagonMarkShadow"}),n.h("div",{class:"HexagonMark"})),!this.animationStarted&&n.h("div",{class:`RandomButton ${this.animationStarted?"HideAnimation":""}`,onClick:()=>this.playRandomGame()},o("playRandomGame",this.language))))))}get host(){return n.getElement(this)}static get watchers(){return{endpoint:["watchEndpoint"],datasource:["watchEndpoint"],language:["watchEndpoint"],translationUrl:["handleNewTranslations"],iconVisible:["handleIsIconVisible"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};m.style=x;const v=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",k=v,c=class{constructor(e){n.registerInstance(this,e),this.hasStarted=!1,this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){this.loading!=="eager"&&(this.imgLoaded=!1,this.hasStarted=!1,(typeof window=="undefined"||!("IntersectionObserver"in window))&&this.beginLoad())}onLoadingChange(e,t){e!==t&&(this.cleanupObserver(),this.detachImgHandlers(),e==="eager"?(this.imgEl&&this.src&&(this.imgEl.src=this.src),this.hasStarted=!0):(this.imgLoaded=!1,this.hasStarted=!1,this.setupObserver()))}componentDidLoad(){this.loading!=="eager"&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.detachImgHandlers()}canUseIO(){return typeof window!="undefined"&&"IntersectionObserver"in window}setupObserver(){if(this.loading!=="eager"){if(!this.canUseIO()){this.beginLoad();return}this.io=new IntersectionObserver(e=>{var t;for(const i of e)if(i.isIntersecting){this.beginLoad(),(t=this.io)===null||t===void 0||t.unobserve(i.target),this.cleanupObserver();break}},{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)}}cleanupObserver(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.io=void 0}wireOnceHandlers(){this.imgEl&&(this.detachImgHandlers(),this._onLoad=()=>{var e;this.currentSrc&&(!((e=this.imgEl)===null||e===void 0)&&e.currentSrc)&&!this.imgEl.currentSrc.includes(this.currentSrc)||(this.imgLoaded=!0)},this._onError=()=>{console.error("Load image failed:",this.src)},this.imgEl.addEventListener("load",this._onLoad,{once:!0}),this.imgEl.addEventListener("error",this._onError,{once:!0}))}detachImgHandlers(){this.imgEl&&(this._onLoad&&this.imgEl.removeEventListener("load",this._onLoad),this._onError&&this.imgEl.removeEventListener("error",this._onError),this._onLoad=void 0,this._onError=void 0)}beginLoad(){if(!this.hasStarted&&this.imgEl&&this.src){if(this.hasStarted=!0,this.wireOnceHandlers(),this.imgEl.complete&&this.imgEl.naturalWidth>0){this.imgLoaded=!0;return}this.currentSrc=this.src,this.imgEl.src=this.src,this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0)}}get showSkeleton(){return this.loading!=="eager"&&!this.imgLoaded}renderEager(){return n.h(n.Host,{class:"HostContainer"},n.h("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return n.h(n.Host,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&n.h("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),n.h("img",{ref:e=>this.imgEl=e,src:void 0,decoding:"async",style:this.styles,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return this.loading==="eager"?this.renderEager():this.renderLazy()}get el(){return n.getElement(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};c.style=k;const G=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",R=G,g=class{constructor(e){n.registerInstance(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return e===0?0:`${e}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset";default:return"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return n.h("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return n.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((e,t)=>n.h("div",{key:t,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`
378
+ }`,x=b,h=class{constructor(e){n.registerInstance(this,e),this.dataLoaded=n.createEvent(this,"data-loaded"),this.animation=null,this.selectedGameIndex=null,this.selectedGameEl=null,this.iconVisibility=null,this.shuffle=t=>{let i=t.length,a;for(;i!==0;)a=Math.floor(Math.random()*i),i--,[t[i],t[a]]=[t[a],t[i]];return t},this.endpoint=void 0,this.datasource=void 0,this.language="en",this.specificCategory="",this.iconVisible="",this.iconVisibleOnAnim="",this.launchByGameCard="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.hasErrors=!1,this.isLoading=!0,this.gamesToShow=void 0,this.selectedGame=null,this.animationDone=!1,this.animationStarted=!1,this.imageLoadingType="lazy",this.detectDistance="200px"}watchEndpoint(e,t){e&&e!=t&&this.endpoint&&this.fetchGameList()}handleNewTranslations(){this.isLoading=!0,l(this.translationUrl).then(()=>{this.isLoading=!1})}handleIsIconVisible(){this.iconVisibility=this.iconVisible==="true"}handleClientStylingChange(e,t){e!=t&&d(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&m(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.handleIsIconVisible()}componentWillLoad(){if(this.translationUrl.length>2&&l(this.translationUrl),this.endpoint&&this.language&&this.datasource)return this.fetchGameList()}componentDidLoad(){"IntersectionObserver"in window&&(this.io=new IntersectionObserver(e=>{e.forEach(t=>{var i;t.isIntersecting&&(this.imageLoadingType="eager",(i=this.io)===null||i===void 0||i.unobserve(t.target))})},{root:null,rootMargin:this.detectDistance}),this.io.observe(this.host)),window.emMessageBus!=null?y(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&m(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchGameList(){let e=new URL(`${this.endpoint}/v1/casino/games`);return e.searchParams.append("platform",w()),e.searchParams.append("datasource",this.datasource),e.searchParams.append("fields","gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"),e.searchParams.append("expand","vendor"),e.searchParams.append("pagination","offset=0,limit=423"),e.searchParams.append("language",this.language),this.specificCategory&&e.searchParams.append("filter",`categories(id=${this.specificCategory})`),new Promise((t,i)=>{this.isLoading=!0,fetch(e.href).then(a=>a.json()).then(a=>{this.gamesToShow=this.setUpGames(a==null?void 0:a.items),t(!0)}).catch(a=>{console.error(a),this.hasErrors=!0,i(a)}).finally(()=>{this.isLoading=!1,this.dataLoaded.emit({target:this.host})})})}setUpGames(e){const t=this.shuffle(e).slice(0,40);return t.concat(t)}selectRandomGame(){const e=this.gamesToShow.length/2;this.selectedGameIndex=Math.floor(Math.random()*(e-3)),this.selectedGameIndex+=e,this.selectedGameEl=this.gameContainer.children[this.selectedGameIndex]}playRandomGame(){this.animateGames(),typeof gtag=="function"&&gtag("event","PlayRandomGame",{context:"CasinoPlayRandomGame"})}respin(){this.animateGames(),typeof gtag=="function"&&gtag("event","RespinRandomGame",{context:"CasinoPlayRandomGame"})}animateGames(){this.iconVisibility=this.iconVisibleOnAnim==="true",this.animationStarted=!0,this.animationDone=!1,this.animation&&this.animation.cancel(),this.selectedGameEl&&(this.selectedGameEl.classList.remove("TheRandomGame"),this.selectedGame=null,this.selectedGameIndex=null),this.selectRandomGame();const e=window.getComputedStyle(this.gameContainer).getPropertyValue("gap"),t=parseInt(e,10),i=this.selectedGameEl.offsetWidth,a=this.gameContainer.offsetWidth,s=(i+t)*this.selectedGameIndex+i/2-a/2,u=[{transform:"translateX(0px)",scale:1},{scale:.75},{transform:`translateX(-${s}px)`,scale:1}],p={duration:3e3,easing:"cubic-bezier(0.5, 0, 0.5, 1.2)",fill:"forwards"};this.animation=this.gameContainer.animate(u,p),this.animation.onfinish=()=>{this.animationDone=!0,this.selectedGameEl.classList.add("TheRandomGame"),this.selectedGame=this.gamesToShow[this.selectedGameIndex]}}playGame(){this.selectedGame&&(window.postMessage({type:"PlayRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGame",{context:"CasinoPlayRandomGame"}))}showGameInfo(){window.postMessage({type:"InfoRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGameInfo",{context:"CasinoPlayRandomGame"})}renderGameDetails(){return n.h("div",{class:"RandomButtonsWrapper"},n.h("div",{class:"RandomGameDetails"},n.h("span",{class:"RandomGameTitle"},this.selectedGame.name),n.h("span",{class:"RandomGameInfo",onClick:()=>this.showGameInfo()},"i")),n.h("div",{class:"RandomButtons"},n.h("button",{class:"RandomButton On",onClick:()=>this.respin()},o("spinRandomGame",this.language)),!this.launchByGameCard&&n.h("button",{class:"RandomButton On",onClick:()=>this.playGame()},o("playNowRandomGame",this.language))))}renderSkeleton(){const e=Array.from({length:5},(t,i)=>n.h("div",{class:"RandomGameCard",key:i},n.h("ui-skeleton",{structure:"rectangle",width:"300px",height:"420px",borderRadius:"10px",animation:!0})));return n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer"},e))}render(){return n.h("div",{key:"29fe3535d63177e6d1f30a757bf17b70d89ce386",ref:e=>this.stylingContainer=e},this.hasErrors?n.h("div",{class:"RandomGameError"},n.h("div",{class:"Title"},o("error",this.language))):this.isLoading?this.renderSkeleton():n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer",ref:e=>this.gameContainer=e},this.gamesToShow&&this.gamesToShow.map((e,t)=>n.h("div",{class:"RandomGameCard",key:t,onClick:this.launchByGameCard==="true"?()=>this.playGame():void 0},n.h("div",{class:"RandomGameVendor"},e.vendor.name),n.h("ui-image",{class:"RandomGameImage",src:e.thumbnail,alt:e.name,title:e.name,loading:this.imageLoadingType}),this.selectedGame&&this.selectedGameIndex===t&&this.renderGameDetails()))),n.h("div",{class:`ButtonWrapper ${this.animationDone?"HideAnimation":""}`},n.h("div",{class:"ButtonContainer"},this.iconVisibility&&n.h("div",{class:`ButtonIcon ${this.animationStarted?"Flip":""}`},n.h("div",{class:"QustionMark"},"?"),n.h("div",{class:"HexagonMarkShadow"}),n.h("div",{class:"HexagonMark"})),!this.animationStarted&&n.h("div",{class:`RandomButton ${this.animationStarted?"HideAnimation":""}`,onClick:()=>this.playRandomGame()},o("playRandomGame",this.language))))))}get host(){return n.getElement(this)}static get watchers(){return{endpoint:["watchEndpoint"],datasource:["watchEndpoint"],language:["watchEndpoint"],translationUrl:["handleNewTranslations"],iconVisible:["handleIsIconVisible"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};h.style=x;const k=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",v=k,c=class{constructor(e){n.registerInstance(this,e),this.hasStarted=!1,this._onLoad=()=>{this.imgLoaded=!0},this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){this.loading!=="eager"&&(this.imgLoaded=!1,this.hasStarted=!1,(typeof window=="undefined"||!("IntersectionObserver"in window))&&this.beginLoad())}onLoadingChange(e,t){e!==t&&(this.cleanupObserver(),e==="eager"?(this.imgEl&&this.src&&(this.imgEl.src=this.src),this.hasStarted=!0):(this.imgLoaded=!1,this.hasStarted=!1,this.setupObserver()))}componentDidLoad(){this.loading!=="eager"&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.imgEl&&(this.imgEl.src="")}canUseIO(){return typeof window!="undefined"&&"IntersectionObserver"in window}setupObserver(){if(this.loading!=="eager"){if(!this.canUseIO()){this.beginLoad();return}this.io=new IntersectionObserver(e=>{var t;for(const i of e)if(i.isIntersecting){this.beginLoad(),(t=this.io)===null||t===void 0||t.unobserve(i.target),this.cleanupObserver();break}},{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)}}cleanupObserver(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.io=void 0}beginLoad(){this.hasStarted||this.imgEl&&this.src&&(this.hasStarted=!0,this.imgEl.src=this.src,this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0))}get showSkeleton(){return this.loading!=="eager"&&!this.imgLoaded}renderEager(){return n.h(n.Host,{class:"HostContainer"},n.h("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return n.h(n.Host,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&n.h("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),n.h("img",{ref:e=>this.imgEl=e,src:void 0,decoding:"async",style:this.styles,onLoad:this._onLoad,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return this.loading==="eager"?this.renderEager():this.renderLazy()}get el(){return n.getElement(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};c.style=v;const G=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",R=G,g=class{constructor(e){n.registerInstance(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return e===0?0:`${e}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset";default:return"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return n.h("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return n.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((e,t)=>n.h("div",{key:t,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`
379
379
  :host {
380
380
  --emw-skeleton-logo-width: ${this.stylingValue.width};
381
381
  --emw-skeleton-logo-height: ${this.stylingValue.height};
@@ -429,4 +429,4 @@
429
429
  :host {
430
430
  --emw-skeleton-circle-size: ${this.stylingValue.size};
431
431
  }
432
- `;break;default:e=""}return n.h(n.Host,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},n.h("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};g.style=R;exports.casino_play_random_game=m;exports.ui_image=c;exports.ui_skeleton=g;
432
+ `;break;default:e=""}return n.h(n.Host,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},n.h("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};g.style=R;exports.casino_play_random_game=h;exports.ui_image=c;exports.ui_skeleton=g;
@@ -0,0 +1,71 @@
1
+ import { r as n, h as t, H as r, g as a } from "../lazy/ui-image-CwC1nmDQ.js";
2
+ const h = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", o = h, d = class {
3
+ constructor(i) {
4
+ n(this, i), this.hasStarted = !1, this._onLoad = () => {
5
+ this.imgLoaded = !0;
6
+ }, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
7
+ }
8
+ onSrcChange() {
9
+ this.loading !== "eager" && (this.imgLoaded = !1, this.hasStarted = !1, (typeof window == "undefined" || !("IntersectionObserver" in window)) && this.beginLoad());
10
+ }
11
+ onLoadingChange(i, e) {
12
+ i !== e && (this.cleanupObserver(), i === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
13
+ }
14
+ componentDidLoad() {
15
+ this.loading !== "eager" && this.setupObserver();
16
+ }
17
+ disconnectedCallback() {
18
+ this.cleanupObserver(), this.imgEl && (this.imgEl.src = "");
19
+ }
20
+ canUseIO() {
21
+ return typeof window != "undefined" && "IntersectionObserver" in window;
22
+ }
23
+ setupObserver() {
24
+ if (this.loading !== "eager") {
25
+ if (!this.canUseIO()) {
26
+ this.beginLoad();
27
+ return;
28
+ }
29
+ this.io = new IntersectionObserver((i) => {
30
+ var e;
31
+ for (const s of i)
32
+ if (s.isIntersecting) {
33
+ this.beginLoad(), (e = this.io) === null || e === void 0 || e.unobserve(s.target), this.cleanupObserver();
34
+ break;
35
+ }
36
+ }, { root: null, rootMargin: this.detectDistance, threshold: 0 }), this.io.observe(this.el);
37
+ }
38
+ }
39
+ cleanupObserver() {
40
+ var i;
41
+ (i = this.io) === null || i === void 0 || i.disconnect(), this.io = void 0;
42
+ }
43
+ beginLoad() {
44
+ this.hasStarted || this.imgEl && this.src && (this.hasStarted = !0, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0));
45
+ }
46
+ get showSkeleton() {
47
+ return this.loading !== "eager" && !this.imgLoaded;
48
+ }
49
+ renderEager() {
50
+ return t(r, { class: "HostContainer" }, t("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" }));
51
+ }
52
+ renderLazy() {
53
+ return t(r, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (i) => this.imgEl = i, src: void 0, decoding: "async", style: this.styles, onLoad: this._onLoad, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
54
+ }
55
+ render() {
56
+ return this.loading === "eager" ? this.renderEager() : this.renderLazy();
57
+ }
58
+ get el() {
59
+ return a(this);
60
+ }
61
+ static get watchers() {
62
+ return {
63
+ src: ["onSrcChange"],
64
+ loading: ["onLoadingChange"]
65
+ };
66
+ }
67
+ };
68
+ d.style = o;
69
+ export {
70
+ d as U
71
+ };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("../lazy/ui-image-Co06JuWa.cjs"),n=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",a=n,r=class{constructor(e){i.registerInstance(this,e),this.hasStarted=!1,this._onLoad=()=>{this.imgLoaded=!0},this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){this.loading!=="eager"&&(this.imgLoaded=!1,this.hasStarted=!1,(typeof window=="undefined"||!("IntersectionObserver"in window))&&this.beginLoad())}onLoadingChange(e,t){e!==t&&(this.cleanupObserver(),e==="eager"?(this.imgEl&&this.src&&(this.imgEl.src=this.src),this.hasStarted=!0):(this.imgLoaded=!1,this.hasStarted=!1,this.setupObserver()))}componentDidLoad(){this.loading!=="eager"&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.imgEl&&(this.imgEl.src="")}canUseIO(){return typeof window!="undefined"&&"IntersectionObserver"in window}setupObserver(){if(this.loading!=="eager"){if(!this.canUseIO()){this.beginLoad();return}this.io=new IntersectionObserver(e=>{var t;for(const s of e)if(s.isIntersecting){this.beginLoad(),(t=this.io)===null||t===void 0||t.unobserve(s.target),this.cleanupObserver();break}},{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)}}cleanupObserver(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.io=void 0}beginLoad(){this.hasStarted||this.imgEl&&this.src&&(this.hasStarted=!0,this.imgEl.src=this.src,this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0))}get showSkeleton(){return this.loading!=="eager"&&!this.imgLoaded}renderEager(){return i.h(i.Host,{class:"HostContainer"},i.h("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return i.h(i.Host,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&i.h("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),i.h("img",{ref:e=>this.imgEl=e,src:void 0,decoding:"async",style:this.styles,onLoad:this._onLoad,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return this.loading==="eager"?this.renderEager():this.renderLazy()}get el(){return i.getElement(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};r.style=a;exports.UiImage=r;
@@ -0,0 +1,71 @@
1
+ import { r as n, h as t, H as r, g as a } from "../lazy/ui-image-DfAu-p11.js";
2
+ const h = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", o = h, d = class {
3
+ constructor(i) {
4
+ n(this, i), this.hasStarted = !1, this._onLoad = () => {
5
+ this.imgLoaded = !0;
6
+ }, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
7
+ }
8
+ onSrcChange() {
9
+ this.loading !== "eager" && (this.imgLoaded = !1, this.hasStarted = !1, (typeof window > "u" || !("IntersectionObserver" in window)) && this.beginLoad());
10
+ }
11
+ onLoadingChange(i, e) {
12
+ i !== e && (this.cleanupObserver(), i === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
13
+ }
14
+ componentDidLoad() {
15
+ this.loading !== "eager" && this.setupObserver();
16
+ }
17
+ disconnectedCallback() {
18
+ this.cleanupObserver(), this.imgEl && (this.imgEl.src = "");
19
+ }
20
+ canUseIO() {
21
+ return typeof window < "u" && "IntersectionObserver" in window;
22
+ }
23
+ setupObserver() {
24
+ if (this.loading !== "eager") {
25
+ if (!this.canUseIO()) {
26
+ this.beginLoad();
27
+ return;
28
+ }
29
+ this.io = new IntersectionObserver((i) => {
30
+ var e;
31
+ for (const s of i)
32
+ if (s.isIntersecting) {
33
+ this.beginLoad(), (e = this.io) === null || e === void 0 || e.unobserve(s.target), this.cleanupObserver();
34
+ break;
35
+ }
36
+ }, { root: null, rootMargin: this.detectDistance, threshold: 0 }), this.io.observe(this.el);
37
+ }
38
+ }
39
+ cleanupObserver() {
40
+ var i;
41
+ (i = this.io) === null || i === void 0 || i.disconnect(), this.io = void 0;
42
+ }
43
+ beginLoad() {
44
+ this.hasStarted || this.imgEl && this.src && (this.hasStarted = !0, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0));
45
+ }
46
+ get showSkeleton() {
47
+ return this.loading !== "eager" && !this.imgLoaded;
48
+ }
49
+ renderEager() {
50
+ return t(r, { class: "HostContainer" }, t("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" }));
51
+ }
52
+ renderLazy() {
53
+ return t(r, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (i) => this.imgEl = i, src: void 0, decoding: "async", style: this.styles, onLoad: this._onLoad, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
54
+ }
55
+ render() {
56
+ return this.loading === "eager" ? this.renderEager() : this.renderLazy();
57
+ }
58
+ get el() {
59
+ return a(this);
60
+ }
61
+ static get watchers() {
62
+ return {
63
+ src: ["onSrcChange"],
64
+ loading: ["onLoadingChange"]
65
+ };
66
+ }
67
+ };
68
+ d.style = o;
69
+ export {
70
+ d as U
71
+ };