@everymatrix/mini-games-hub 0.1.14 → 0.1.15

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 (270) hide show
  1. package/components/BackButton-BMWvZ9Lb.js +39 -0
  2. package/components/BackButton-BNp3jVLa.js +39 -0
  3. package/components/BackButton-Bi1zFTns.js +38 -0
  4. package/components/BackButton-BvRNh4nJ.js +39 -0
  5. package/components/BackButton-C2-HXI2m.cjs +1 -0
  6. package/components/BackButton-C_v3b0Ky.cjs +1 -0
  7. package/components/BackButton-D5gfQ3NI.cjs +1 -0
  8. package/components/BackButton-DOW_OP-H.cjs +1 -0
  9. package/components/BackButton-DznJk3U4.js +38 -0
  10. package/components/BackButton-gIVGAf6v.js +38 -0
  11. package/components/BackButton-s0YqvufR.cjs +1 -0
  12. package/components/CoinFlip-5qt33VpA.js +399 -0
  13. package/components/CoinFlip-9-7FNYAn.js +364 -0
  14. package/components/CoinFlip-B0Q-xZDI.cjs +1 -0
  15. package/components/CoinFlip-BWNJK7aS.js +402 -0
  16. package/components/CoinFlip-BaNNMAYb.cjs +1 -0
  17. package/components/CoinFlip-BgRZmhbg.js +367 -0
  18. package/components/CoinFlip-COwy7cq1.cjs +1 -0
  19. package/components/CoinFlip-CSel9VZR.js +398 -0
  20. package/components/CoinFlip-CfHvSwpV.cjs +1 -0
  21. package/components/CoinFlip-ClRh6gz2.js +363 -0
  22. package/components/CoinFlip-D7Bwnl8W.cjs +1 -0
  23. package/components/CoinFlip-D8OLaQiA.js +367 -0
  24. package/components/CoinFlip-Dg2ZA_B2.cjs +1 -0
  25. package/components/CoinFlip-DoASIhfX.cjs +1 -0
  26. package/components/CoinFlip-pvtcTO4f.cjs +1 -0
  27. package/components/CoinFlip-vrZpkrnS.js +402 -0
  28. package/components/CoinRoyale-4Oe-x5-J.cjs +734 -0
  29. package/components/CoinRoyale-9nHMXODj.js +1017 -0
  30. package/components/CoinRoyale-B3bu5S4n.cjs +734 -0
  31. package/components/CoinRoyale-B4dKiGgG.cjs +736 -0
  32. package/components/CoinRoyale-BNxFDqe1.js +999 -0
  33. package/components/CoinRoyale-BwNvG3QI.js +1009 -0
  34. package/components/CoinRoyale-Bza84vCL.cjs +738 -0
  35. package/components/CoinRoyale-C-x6uDgh.js +989 -0
  36. package/components/CoinRoyale-CAI2JCvG.js +1020 -0
  37. package/components/CoinRoyale-CGHKZ-kc.js +997 -0
  38. package/components/CoinRoyale-CbqmmMPg.cjs +736 -0
  39. package/components/CoinRoyale-ChWsctqo.cjs +759 -0
  40. package/components/CoinRoyale-Cw8ImDP5.js +1040 -0
  41. package/components/CoinRoyale-CxIBSKFK.js +1017 -0
  42. package/components/CoinRoyale-D-rF6BV4.js +1019 -0
  43. package/components/CoinRoyale-DH-tQHtT.cjs +736 -0
  44. package/components/CoinRoyale-DmcgvBwG.js +997 -0
  45. package/components/CoinRoyale-d2utu3E3.cjs +759 -0
  46. package/components/CoinRoyale-xAkf1dm_.cjs +738 -0
  47. package/components/DrawResult-BHZeM1oX.cjs +1 -0
  48. package/components/DrawResult-BVtwLs-z.js +373 -0
  49. package/components/DrawResult-CG5KTjF7.cjs +1 -0
  50. package/components/DrawResult-COyPm6Cv.cjs +1 -0
  51. package/components/DrawResult-CbLPtjvZ.js +343 -0
  52. package/components/DrawResult-Cul15bW0.cjs +1 -0
  53. package/components/DrawResult-DMRODSxk.cjs +1 -0
  54. package/components/DrawResult-DTJJfQkP.js +373 -0
  55. package/components/DrawResult-DdL4fFZM.js +343 -0
  56. package/components/DrawResult-DxG4CaKK.cjs +1 -0
  57. package/components/DrawResult-SyzKXHgd.js +343 -0
  58. package/components/DrawResult-ZEAa0flC.js +373 -0
  59. package/components/GameCard-8k9KvRun.cjs +3 -0
  60. package/components/GameCard-A3k7RxF5.js +63 -0
  61. package/components/GameCard-B2td6J8K.js +62 -0
  62. package/components/{GameCard-BIn8BJ4U.cjs → GameCard-Bku9nP58.cjs} +3 -3
  63. package/components/GameCard-CBGi9i6m.cjs +3 -0
  64. package/components/GameCard-CHZmVd6n.cjs +3 -0
  65. package/components/GameCard-Cj4zAE8_.js +59 -0
  66. package/components/GameCard-CrKoQU1B.js +59 -0
  67. package/components/GameCard-DFVjSdtd.cjs +3 -0
  68. package/components/GameCard-DHetS96-.js +66 -0
  69. package/components/GameCard-DcWpuwMl.cjs +3 -0
  70. package/components/GameCard-jIcB63Tt.js +62 -0
  71. package/components/GameHistory-9Mf_u0La.js +231 -0
  72. package/components/GameHistory-BktmYuDa.js +231 -0
  73. package/components/GameHistory-CGAhNQKk.js +231 -0
  74. package/components/GameHistory-ChYjWDsa.cjs +12 -0
  75. package/components/GameHistory-CmiIChL-.cjs +12 -0
  76. package/components/GameHistory-CrrlOaAg.js +231 -0
  77. package/components/GameHistory-DVsHn3lx.cjs +12 -0
  78. package/components/GameHistory-_jU0BiqI.js +231 -0
  79. package/components/GameHistory-aQf3vf9u.cjs +12 -0
  80. package/components/GameHistory-lyXo0tYb.cjs +12 -0
  81. package/components/GameHistory-uzrT81kU.js +231 -0
  82. package/components/GameHistory-v6cI-TIF.cjs +12 -0
  83. package/components/GamePlaceholder-4oI8uJ-1.cjs +1 -0
  84. package/components/GamePlaceholder-Bp4nTJeL.js +84 -0
  85. package/components/GamePlaceholder-COiYGwNi.cjs +15 -0
  86. package/components/GamePlaceholder-CfJ4hx9w.js +70 -0
  87. package/components/GamePlaceholder-D9JEXsAk.js +84 -0
  88. package/components/GamePlaceholder-DGnB06iW.js +71 -0
  89. package/components/GamePlaceholder-DS5evGU6.js +85 -0
  90. package/components/GamePlaceholder-DmiU1G7G.cjs +15 -0
  91. package/components/GamePlaceholder-Dwo_YAUQ.cjs +1 -0
  92. package/components/GamePlaceholder-Uni3xW09.cjs +15 -0
  93. package/components/GamePlaceholder-fVPk29f9.cjs +15 -0
  94. package/components/GamePlaceholder-vUYYV2Ps.js +85 -0
  95. package/components/GameRules-41OkRwZu.js +115 -0
  96. package/components/GameRules-BwLJBo6z.cjs +3 -0
  97. package/components/GameRules-CRiycUU8.js +115 -0
  98. package/components/GameRules-CTKyBDZO.cjs +3 -0
  99. package/components/GameRules-CV9sxZYz.js +126 -0
  100. package/components/GameRules-CuuoMoqN.cjs +3 -0
  101. package/components/GameRules-Cy7jwBok.js +126 -0
  102. package/components/GameRules-DUD8OKC0.js +115 -0
  103. package/components/GameRules-Dkl0qVzr.js +126 -0
  104. package/components/GameRules-DpGqZdSj.cjs +3 -0
  105. package/components/GameRules-DrBYjWA6.cjs +3 -0
  106. package/components/GameRules-DrZ6w0LM.cjs +3 -0
  107. package/components/MiniGamesHub-BWPRLpyq.cjs +16 -0
  108. package/components/MiniGamesHub-BXcQ_faH.js +1022 -0
  109. package/components/MiniGamesHub-BjME_rom.cjs +16 -0
  110. package/components/{MiniGamesHub-D3n-AyD7.js → MiniGamesHub-Bn-xvO1e.js} +419 -743
  111. package/components/MiniGamesHub-BpjzFxHO.cjs +16 -0
  112. package/components/MiniGamesHub-BtC6TmtK.cjs +16 -0
  113. package/components/MiniGamesHub-C-9Nf-x7.js +1029 -0
  114. package/components/MiniGamesHub-C0ESIt9P.cjs +16 -0
  115. package/components/MiniGamesHub-CfIFEVOU.js +1022 -0
  116. package/components/MiniGamesHub-Cj_6ebsL.cjs +16 -0
  117. package/components/MiniGamesHub-CktxKKTj.cjs +16 -0
  118. package/components/MiniGamesHub-CrPltGGl.js +1042 -0
  119. package/components/MiniGamesHub-D2Eet3pe.js +1048 -0
  120. package/components/{MiniGamesHub-BYJ7lK90.js → MiniGamesHub-DCCeYwnc.js} +416 -760
  121. package/components/MiniGamesHub-DuyWceLB.cjs +16 -0
  122. package/components/MiniGamesHub-Dz8Ltp98.js +1048 -0
  123. package/components/MiniGamesHub-_uRBhzYg.js +1029 -0
  124. package/components/MiniGamesHub-kIXoGqbZ.cjs +16 -0
  125. package/components/MiniGamesHub-v8PPHifq.js +1072 -0
  126. package/components/MysteryChest-B4h9tqVR.js +1301 -0
  127. package/components/MysteryChest-BJCFkn02.cjs +737 -0
  128. package/components/MysteryChest-BXPAdruk.js +1290 -0
  129. package/components/MysteryChest-BuB9PD57.js +1240 -0
  130. package/components/MysteryChest-C40hwiCW.cjs +745 -0
  131. package/components/MysteryChest-CKPELFiF.cjs +737 -0
  132. package/components/MysteryChest-CRJtPhlo.cjs +743 -0
  133. package/components/MysteryChest-CScyc3Jw.cjs +745 -0
  134. package/components/MysteryChest-CheF_Rh5.cjs +739 -0
  135. package/components/MysteryChest-CrL8IXga.js +1309 -0
  136. package/components/MysteryChest-CrXzepqD.js +1296 -0
  137. package/components/MysteryChest-D6eks4QE.js +1254 -0
  138. package/components/MysteryChest-DJuhkpSa.cjs +743 -0
  139. package/components/MysteryChest-DOTlHt7A.js +1248 -0
  140. package/components/MysteryChest-DfggF659.js +1262 -0
  141. package/components/MysteryChest-Di-dVQnd.cjs +745 -0
  142. package/components/MysteryChest-DnstXEZJ.js +1298 -0
  143. package/components/MysteryChest-IcRh-Dcp.js +1247 -0
  144. package/components/MysteryChest-dyhqTxMg.cjs +739 -0
  145. package/components/WheelOfFortune--1feiOUD.js +950 -0
  146. package/components/WheelOfFortune-B0g1znMo.cjs +627 -0
  147. package/components/{WheelOfFortune--4nTtnMR.cjs → WheelOfFortune-BC0wwnC-.cjs} +6 -6
  148. package/components/{WheelOfFortune-BjNsD2ND.js → WheelOfFortune-BYxOqBjA.js} +148 -159
  149. package/components/WheelOfFortune-BgUB1tnc.js +942 -0
  150. package/components/WheelOfFortune-Bh2XAbs4.cjs +619 -0
  151. package/components/WheelOfFortune-BwmCnHru.js +926 -0
  152. package/components/WheelOfFortune-CHgHhi9q.cjs +619 -0
  153. package/components/WheelOfFortune-CRgnumXh.cjs +627 -0
  154. package/components/WheelOfFortune-CZ2cERqz.cjs +619 -0
  155. package/components/WheelOfFortune-CpYsfi8D.js +934 -0
  156. package/components/WheelOfFortune-Cy64rFDw.js +942 -0
  157. package/components/WheelOfFortune-DZ7fGpS9.cjs +619 -0
  158. package/components/WheelOfFortune-DZg0i79U.js +949 -0
  159. package/components/{WheelOfFortune-DkVQIxzg.js → WheelOfFortune-DawF7WTd.js} +178 -214
  160. package/components/WheelOfFortune-DjdKhLGF.cjs +617 -0
  161. package/components/WheelOfFortune-M5VMIsnw.cjs +619 -0
  162. package/components/WheelOfFortune-kXjxp6t7.js +926 -0
  163. package/components/WheelOfFortune-pBG33-QJ.js +933 -0
  164. package/components/WheelOfFortuneWheel-7PqVvd_8.cjs +3 -0
  165. package/components/WheelOfFortuneWheel-B4fe-idJ.cjs +3 -0
  166. package/components/WheelOfFortuneWheel-BABzaEBd.js +1812 -0
  167. package/components/WheelOfFortuneWheel-BQFaJ7ZB.cjs +3 -0
  168. package/components/WheelOfFortuneWheel-BYEHNHdI.js +1807 -0
  169. package/components/WheelOfFortuneWheel-BoZ9evN7.cjs +3 -0
  170. package/components/WheelOfFortuneWheel-BuBjvGRI.cjs +3 -0
  171. package/components/{WheelOfFortuneWheel-BAR98ByP.js → WheelOfFortuneWheel-CQCLWOFi.js} +310 -302
  172. package/components/WheelOfFortuneWheel-CsOjhUcv.cjs +3 -0
  173. package/components/WheelOfFortuneWheel-DUE4gyGP.js +1741 -0
  174. package/components/{WheelOfFortuneWheel-DxFn6jjg.js → WheelOfFortuneWheel-DXhwrWpD.js} +548 -539
  175. package/components/WheelOfFortuneWheel-DgVQP4GA.js +1735 -0
  176. package/components/bg-scene-Bz42V1FW.cjs +1 -0
  177. package/components/bg-scene-DpHgKCHj.js +4 -0
  178. package/components/coin-heads-BuJOLpyg.cjs +1 -0
  179. package/components/coin-heads-loqcEtH2.js +4 -0
  180. package/components/coin-tails-20vJmhwv.cjs +1 -0
  181. package/components/coin-tails-BTbsTwkz.js +4 -0
  182. package/components/confetti-CIk02Iw8.cjs +1 -0
  183. package/components/confetti-QNsE8ssC.js +14 -0
  184. package/components/constants-BDMySuIA.cjs +1 -0
  185. package/components/constants-DNSPUges.cjs +1 -0
  186. package/components/{constants-BYsDpbRv.js → constants-DdcZGwlM.js} +28 -19
  187. package/components/constants-DgCBmV7S.js +29 -0
  188. package/components/constants-Ds7J0meH.cjs +1 -0
  189. package/components/constants-Q_kcdbM6.js +29 -0
  190. package/components/countdown-2m_26DZf.js +157 -0
  191. package/components/countdown-BhZfvy-p.cjs +1 -0
  192. package/components/countdown-Bp3yWidJ.cjs +1 -0
  193. package/components/countdown-CH5h-cVr.js +146 -0
  194. package/components/countdown-CnUPVFlE.cjs +1 -0
  195. package/components/countdown-DmWNNDzv.js +168 -0
  196. package/components/countdown-YmZm4DrD.js +146 -0
  197. package/components/countdown-o9wqo7P7.cjs +1 -0
  198. package/components/key-CFhvp9Ju.cjs +1 -0
  199. package/components/key-D1g9LqMU.js +4 -0
  200. package/components/mystery-chest-bg-CGT-JTBW.js +4 -0
  201. package/components/mystery-chest-bg-vrQMNafs.cjs +1 -0
  202. package/components/mystery-chest-empty-CSY7-Vbl.cjs +1 -0
  203. package/components/mystery-chest-empty-D7bbrCHH.js +4 -0
  204. package/components/mystery-chest-locked-CIxpYU3v.js +4 -0
  205. package/components/mystery-chest-locked-DiyrvNm3.cjs +1 -0
  206. package/components/mystery-chest-win-D1NYItcd.js +4 -0
  207. package/components/mystery-chest-win-OxXZtQQd.cjs +1 -0
  208. package/components/remaining-times-Dexper1E.js +52 -0
  209. package/components/remaining-times-DiYnfuZB.js +23 -0
  210. package/components/remaining-times-Eqo69UfM.cjs +1 -0
  211. package/components/remaining-times-Gt6ytHaa.cjs +1 -0
  212. package/components/sparkles-B2kHtb3R.js +14 -0
  213. package/components/sparkles-BBLT1jhq.js +14 -0
  214. package/components/sparkles-BIl7-lvq.cjs +1 -0
  215. package/components/sparkles-BRrL2C0i.cjs +1 -0
  216. package/components/sparkles-BXFe6GK6.js +18 -0
  217. package/components/sparkles-C2rT-gN_.cjs +1 -0
  218. package/components/sparkles-Cfa1xTlQ.js +14 -0
  219. package/components/sparkles-Cot5wZXx.cjs +1 -0
  220. package/components/sparkles-D1RTsqBU.js +18 -0
  221. package/components/sparkles-DKbGLSaY.cjs +1 -0
  222. package/components/sparkles-DmL-n8od.cjs +1 -0
  223. package/components/sparkles-WqrZ-iXs.js +18 -0
  224. package/components/spin-controller-3wmy9F5-.cjs +1 -0
  225. package/components/{spin-controller-CIshWmlA.cjs → spin-controller-BF6ymCY4.cjs} +1 -1
  226. package/components/spin-controller-Bc8nQATS.cjs +1 -0
  227. package/components/{spin-controller-BuBkKrNR.js → spin-controller-BcBfHUn9.js} +7 -7
  228. package/components/{spin-controller-REPdRwaB.js → spin-controller-CC3QZvWl.js} +8 -8
  229. package/components/spin-controller-CEIahkSh.cjs +1 -0
  230. package/components/spin-controller-CUb1rpPl.js +177 -0
  231. package/components/spin-controller-CVXfvzb7.cjs +1 -0
  232. package/components/spin-controller-DBglqs7W.js +175 -0
  233. package/components/spin-controller-Db-fwR9V.cjs +1 -0
  234. package/components/spin-controller-DkSQ07IL.js +177 -0
  235. package/components/spin-controller-Dxxx3-ya.js +175 -0
  236. package/components/utils-8EFTHKcu.cjs +3 -0
  237. package/components/utils-AGVOgUGK.cjs +3 -0
  238. package/components/{utils-C7uxZXaZ.js → utils-B3aNdyMX.js} +968 -958
  239. package/components/utils-BJHloM10.js +6055 -0
  240. package/components/utils-C1uNHR_J.cjs +3 -0
  241. package/components/{utils-d-JrZBJu.js → utils-DEov6Qk_.js} +902 -892
  242. package/components/utils-DQ220WK3.js +6016 -0
  243. package/components/utils-DwrHy7a0.js +6007 -0
  244. package/components/utils-Dwz-wUFC.cjs +3 -0
  245. package/components/utils-Rda5erjI.cjs +3 -0
  246. package/components/utils-fG_nzyoc.cjs +3 -0
  247. package/components/utils-qUyu-MNU.js +6064 -0
  248. package/es2015/mini-games-hub.cjs +1 -1
  249. package/es2015/mini-games-hub.js +1 -1
  250. package/esnext/mini-games-hub.cjs +1 -0
  251. package/esnext/mini-games-hub.js +1 -1
  252. package/package.json +12 -13
  253. package/components/GameCard-D3knomma.js +0 -56
  254. package/components/GameCard-Ds0FcnPp.js +0 -56
  255. package/components/MiniGamesHub-zNncMSFn.cjs +0 -94
  256. package/components/WheelOfFortuneDrawResults-1lzyxrks.cjs +0 -1
  257. package/components/WheelOfFortuneDrawResults-DQweghnp.js +0 -301
  258. package/components/WheelOfFortuneDrawResults-dOeQDVub.js +0 -276
  259. package/components/WheelOfFortuneHistory-CQZ9QtVt.js +0 -232
  260. package/components/WheelOfFortuneHistory-DZNPM57t.cjs +0 -13
  261. package/components/WheelOfFortuneHistory-DygZEtcR.js +0 -232
  262. package/components/WheelOfFortuneRules-D3N1c8PX.js +0 -117
  263. package/components/WheelOfFortuneRules-DuiCet95.js +0 -128
  264. package/components/WheelOfFortuneRules-VAMAiK0m.cjs +0 -5
  265. package/components/WheelOfFortuneWheel-hSjxThyU.cjs +0 -3
  266. package/components/constants-DM6Vdc6Z.cjs +0 -1
  267. package/components/sparkles-BnriHiyw.cjs +0 -1
  268. package/components/sparkles-CSfeD2Zu.js +0 -25
  269. package/components/sparkles-CTrQ372y.js +0 -29
  270. package/components/utils-DQIHJIDu.cjs +0 -3
@@ -0,0 +1,363 @@
1
+ import { d as pt, c as mt, p as P, o as gt, n as oe, i as le, l as we, s as V, h as S, m as J, b as F, f as X, v as yt } from "./WheelOfFortuneWheel-CQCLWOFi.js";
2
+ import { D as ht, aM as k, az as wt, S as Ne, ar as f, b6 as bt, Z as t, aN as Ue, aS as u, aT as o, ae as $, I as Tt, aO as xt, aP as Et, aY as Mt, aU as St, aV as Rt, aD as C, aQ as At, aW as l, b0 as It } from "./utils-DQ220WK3.js";
3
+ import { E as be, R as Pt, T as Ct, k as Ft, j as kt, l as Te, m as Dt, n as Ve, o as $e, q as Lt } from "./constants-DdcZGwlM.js";
4
+ import { c as Xe } from "./coin-heads-loqcEtH2.js";
5
+ import { c as Yt } from "./coin-tails-BTbsTwkz.js";
6
+ var Ot = X('<div><span class="coin-royale__chev">︿</span> <span class="coin-royale__hint-text"> </span> <span class="coin-royale__chev coin-royale__chev--down">﹀</span></div> <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M9 11V5.5a1.5 1.5 0 0 1 3 0V11h.5V7.5a1.5 1.5 0 0 1 3 0V11h.5V9a1.5 1.5 0 0 1 3 0v6.5c0 3-2 5.5-5.5 5.5H12c-2 0-3.2-.8-4.2-2.3l-2.4-3.6a1.5 1.5 0 0 1 2.3-1.9L9 15.5V11Z"></path></svg>', 1), zt = X('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-countdown"> </p></div>'), Ht = X('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-body"> </p> <button class="coin-royale__badge-close" type="button"> </button></div>'), Nt = X('<span class="coin-royale__flips-loader"></span>'), Ut = X('<p class="coin-royale__flips"> <span class="coin-royale__flips-count"><img class="coin-royale__flips-icon" alt="" aria-hidden="true"/> <!></span></p>'), Vt = X('<div class="coin-royale__play"><div class="coin-royale__stage"><div role="button"><div class="coin-royale__coin-shadow"></div> <div class="coin-royale__coin"><div class="coin-royale__coin-drop-shadow" aria-hidden="true"></div> <div class="coin-royale__coin-edge" aria-hidden="true"></div> <div class="coin-royale__face coin-royale__face--front"><img alt="" draggable="false"/></div> <div class="coin-royale__face coin-royale__face--back"><img alt="" draggable="false"/></div></div> <!></div> <!></div></div> <!> <button class="coin-royale__cta" type="button"> </button>', 1);
7
+ function $t(Ge, h) {
8
+ ht(h, !0);
9
+ const w = () => xt(Et, "$_", Ze), [Ze, je] = At();
10
+ let R = P(h, "program", 7, null), K = P(h, "endpoint", 7, null), Q = P(h, "session", 7, null), y = P(h, "isAvailable", 7, !1), ce = P(h, "spinResults", 15, null), p = P(h, "spinActive", 15, !1), ee = P(h, "remainingTimesLoading", 7, !1), de = P(h, "onFlip", 7, () => {
11
+ }), G = k(wt({}));
12
+ Ne(() => {
13
+ if (!y() && R()) {
14
+ const e = () => f(G, bt(R()?.next?.startTime), !0);
15
+ e();
16
+ const a = setInterval(e, 1e3);
17
+ return () => clearInterval(a);
18
+ }
19
+ });
20
+ let D = k(!1), ue;
21
+ const qe = () => {
22
+ clearTimeout(ue), ue = setTimeout(() => f(D, !1), 400);
23
+ };
24
+ let Z = k(!1), A = k(void 0), i = k(void 0), L = k(void 0), I = k(void 0);
25
+ const ve = Mt(() => y() && !p() && !t(Z) && !ee());
26
+ let Y = 0, O = !1, j = !1, _e = 0, q = 0, fe = 0, v = null, te = null, xe, z = !1;
27
+ const H = (e, a = 1, n = 0) => {
28
+ t(i) && (t(i).style.transform = `translateY(${n}px) rotateX(${e}deg) scale(${a})`);
29
+ };
30
+ Ne(() => {
31
+ if (!t(A) || !t(i) || !t(L)) return;
32
+ Ee(), H(Y);
33
+ const e = new ResizeObserver(() => Ee());
34
+ return e.observe(t(A)), () => e.disconnect();
35
+ });
36
+ const Ee = () => {
37
+ if (!t(A) || !t(i) || !t(L)) return;
38
+ const e = t(A).clientWidth;
39
+ if (!e) return;
40
+ const a = e / 2 * Pt, n = Math.max(14, e * Ct), r = 2 * a * Math.tan(Math.PI / be) + 0.6;
41
+ t(i).style.setProperty("--half-t", `${(n / 2).toFixed(2)}px`), t(L).replaceChildren();
42
+ for (let s = 0; s < be; s++) {
43
+ const d = document.createElement("div");
44
+ d.className = `coin-royale__edge-seg coin-royale__edge-seg--${s % 2 === 0 ? "a" : "b"}`, d.style.width = `${r.toFixed(2)}px`, d.style.height = `${n.toFixed(2)}px`, d.style.transform = `translate(-50%,-50%) rotateZ(${s * 360 / be}deg) translateY(${(-a).toFixed(2)}px) rotateX(90deg)`, t(L).appendChild(d);
45
+ }
46
+ }, Me = (e) => {
47
+ Y = e, v?.cancel(), v = null, H(e, 1), t(i) && (t(i).style.animation = ""), t(I) && (t(I).style.opacity = "", t(I).style.width = "");
48
+ }, We = (e, a) => new Promise((n) => {
49
+ if (!t(i)) return n();
50
+ v?.cancel(), v = t(i).animate(e, { fill: "forwards", ...a }), v.onfinish = () => n(), v.oncancel = () => n();
51
+ }), Be = async (e, a) => {
52
+ const n = new Headers({ "Content-Type": "application/json" });
53
+ Q() && n.append("X-SessionId", Q());
54
+ const r = await fetch(new URL(`${K()}/v1/wof/draw/${R()?.id}`), {
55
+ method: "PUT",
56
+ headers: n,
57
+ cache: "no-store",
58
+ body: JSON.stringify({ action: 1, guid: e }),
59
+ signal: a
60
+ });
61
+ if (!r.ok) throw new Error(`draw request failed: ${r.status}`);
62
+ return r.json();
63
+ }, ae = async (e) => {
64
+ if (!t(ve) || !t(i) || !t(A) || !K()) return;
65
+ de()();
66
+ const a = typeof e == "number" ? e : Y;
67
+ p(!0), f(D, !0), f(Z, !1), v?.cancel();
68
+ const n = -(t(A).clientHeight * Ft);
69
+ t(I) && (t(I).style.opacity = "0.3", t(I).style.width = "34%");
70
+ const r = () => new Promise((x, E) => requestAnimationFrame((ge) => z ? E(new Error("destroyed")) : x(ge)));
71
+ let s = !1, d = !1, _;
72
+ const g = St(), c = new AbortController();
73
+ te = c;
74
+ const b = Promise.race([
75
+ Be(g, c.signal),
76
+ new Promise((x, E) => {
77
+ _ = setTimeout(
78
+ () => {
79
+ d = !0, c.abort(), E(new Error("draw timed out"));
80
+ },
81
+ kt
82
+ );
83
+ })
84
+ ]);
85
+ b.then(() => s = !0, () => s = !0);
86
+ let T = a;
87
+ try {
88
+ let x = await r();
89
+ const E = x;
90
+ for (; !s || x - E < Te; ) {
91
+ const M = await r(), N = Math.min(M - x, 50) / 1e3;
92
+ x = M;
93
+ const W = M - E, U = Math.min(W / Dt, 1);
94
+ T += Ve * U * U * (3 - 2 * U) * N;
95
+ const B = Math.min(W / Te, 1), re = 1 - (1 - B) ** 3, He = B >= 1 ? Math.sin((W - Te) / 380) * 0.015 : 0;
96
+ H(T, 1 + $e * (re + He), n * (re + He));
97
+ }
98
+ const ge = await b;
99
+ clearTimeout(_);
100
+ const ie = Rt(ge, "draw");
101
+ if (ie.success !== !0) throw new Error("draw failed");
102
+ const ut = {
103
+ ...ie,
104
+ guid: g,
105
+ lotteryProgramID: ie.lotteryProgramID ?? R()?.id
106
+ }, vt = ie.type === "noprize" ? 180 : 0, Oe = 360, ye = Oe + (vt - ((T + Oe) % 360 + 360) % 360 + 360) % 360, _t = T + ye, ze = 2 * ye / Ve * 1e3, ft = T, he = await r();
107
+ for (let M = he; M - he < ze; M = await r()) {
108
+ const N = (M - he) / ze, W = 1 - (1 - N) ** 2, U = Math.min(N / 0.78, 1), B = 1 - U * U, re = N > 0.78 ? Math.sin((N - 0.78) / 0.22 * Math.PI) * 5 : 0;
109
+ H(ft + ye * W, 1 + $e * B, n * B + re);
110
+ }
111
+ if (Me(_t), await new Promise((M) => xe = setTimeout(M, 550)), z) return;
112
+ ce(ut), p(!1);
113
+ } catch (x) {
114
+ if (clearTimeout(_), z) return;
115
+ console.log(x);
116
+ const E = T + ((a - T) % 360 + 360) % 360;
117
+ if (t(i) && await We(
118
+ [
119
+ { transform: t(i).style.transform },
120
+ { transform: `translateY(0px) rotateX(${E}deg) scale(1)` }
121
+ ],
122
+ { duration: 420, easing: "cubic-bezier(.55,0,.75,.4)" }
123
+ ), z) return;
124
+ Me(E), d && f(Z, !0), p(!1);
125
+ } finally {
126
+ te === c && (te = null), z || qe();
127
+ }
128
+ }, Je = () => {
129
+ f(Z, !1), p(!1);
130
+ }, Se = (e) => {
131
+ t(i) && (v?.cancel(), v = t(i).animate(
132
+ [
133
+ { transform: `translateY(0px) rotateX(${e}deg) scale(1)` },
134
+ {
135
+ transform: `translateY(0px) rotateX(${Y}deg) scale(1)`
136
+ }
137
+ ],
138
+ {
139
+ duration: 320,
140
+ easing: "cubic-bezier(.22,.61,.32,1)",
141
+ fill: "forwards"
142
+ }
143
+ ), v.onfinish = () => {
144
+ v?.cancel(), v = null, H(Y, 1), t(i) && (t(i).style.animation = ""), f(D, !1);
145
+ });
146
+ }, Ke = (e) => {
147
+ t(ve) && (O = !0, j = !1, _e = e.clientY, fe = 0, q = Y, v?.cancel(), t(i) && (t(i).style.animation = "none"), f(D, !0));
148
+ }, Re = (e) => {
149
+ if (!O || p()) return;
150
+ const a = _e - e.clientY;
151
+ fe = a, Math.abs(a) > 4 && (j = !0), H(q + a * 1.1, 1 + Math.min(Math.abs(a) / 400, 0.12));
152
+ }, Ae = (e) => {
153
+ if (!O) return;
154
+ O = !1;
155
+ const a = _e - e.clientY;
156
+ if (Math.abs(a) > Lt) {
157
+ ae(q + a * 1.1);
158
+ return;
159
+ }
160
+ Se(q + a * 1.1);
161
+ }, Ie = () => {
162
+ O && (O = !1, j = !1, Se(q + fe * 1.1));
163
+ }, Qe = () => {
164
+ if (j) {
165
+ j = !1;
166
+ return;
167
+ }
168
+ ae();
169
+ };
170
+ gt(() => (window.addEventListener("pointermove", Re), window.addEventListener("pointerup", Ae), window.addEventListener("pointercancel", Ie), () => {
171
+ z = !0, te?.abort(), clearTimeout(xe), clearTimeout(ue), window.removeEventListener("pointermove", Re), window.removeEventListener("pointerup", Ae), window.removeEventListener("pointercancel", Ie), v?.cancel();
172
+ }));
173
+ var et = {
174
+ get program() {
175
+ return R();
176
+ },
177
+ set program(e = null) {
178
+ R(e), C();
179
+ },
180
+ get endpoint() {
181
+ return K();
182
+ },
183
+ set endpoint(e = null) {
184
+ K(e), C();
185
+ },
186
+ get session() {
187
+ return Q();
188
+ },
189
+ set session(e = null) {
190
+ Q(e), C();
191
+ },
192
+ get isAvailable() {
193
+ return y();
194
+ },
195
+ set isAvailable(e = !1) {
196
+ y(e), C();
197
+ },
198
+ get spinResults() {
199
+ return ce();
200
+ },
201
+ set spinResults(e = null) {
202
+ ce(e), C();
203
+ },
204
+ get spinActive() {
205
+ return p();
206
+ },
207
+ set spinActive(e = !1) {
208
+ p(e), C();
209
+ },
210
+ get remainingTimesLoading() {
211
+ return ee();
212
+ },
213
+ set remainingTimesLoading(e = !1) {
214
+ ee(e), C();
215
+ },
216
+ get onFlip() {
217
+ return de();
218
+ },
219
+ set onFlip(e = () => {
220
+ }) {
221
+ de(e), C();
222
+ }
223
+ }, Pe = Vt(), pe = Ue(Pe), Ce = o(pe), m = o(Ce);
224
+ let Fe;
225
+ var ke = o(m);
226
+ oe(ke, (e) => f(I, e), () => t(I));
227
+ var ne = u(ke, 2), De = u(o(ne), 2);
228
+ oe(De, (e) => f(L, e), () => t(L));
229
+ var me = u(De, 2), tt = o(me);
230
+ l(me);
231
+ var Le = u(me, 2), at = o(Le);
232
+ l(Le), l(ne), oe(ne, (e) => f(i, e), () => t(i));
233
+ var nt = u(ne, 2);
234
+ {
235
+ var st = (e) => {
236
+ var a = Ot(), n = Ue(a);
237
+ let r;
238
+ var s = u(o(n), 2), d = o(s, !0);
239
+ l(s), It(2), l(n);
240
+ var _ = u(n, 2);
241
+ let g;
242
+ $(
243
+ (c) => {
244
+ r = we(n, 1, "coin-royale__drag-hint", null, r, {
245
+ "coin-royale__drag-hint--hidden": t(D) || p()
246
+ }), S(d, c), g = we(_, 0, "coin-royale__finger-cue", null, g, {
247
+ "coin-royale__finger-cue--hidden": t(D) || p()
248
+ });
249
+ },
250
+ [() => w()("dragToFlip")]
251
+ ), F(e, a);
252
+ };
253
+ le(nt, (e) => {
254
+ y() && e(st);
255
+ });
256
+ }
257
+ l(m), oe(m, (e) => f(A, e), () => t(A));
258
+ var it = u(m, 2);
259
+ {
260
+ var rt = (e) => {
261
+ var a = zt(), n = o(a), r = o(n, !0);
262
+ l(n);
263
+ var s = u(n, 2), d = o(s, !0);
264
+ l(s), l(a), $(
265
+ (_, g) => {
266
+ S(r, _), S(d, g);
267
+ },
268
+ [
269
+ () => w()("nextAvailable"),
270
+ () => w()("countdown", {
271
+ values: {
272
+ days: t(G).days,
273
+ hours: t(G).hours,
274
+ minutes: t(G).minutes,
275
+ seconds: t(G).seconds
276
+ }
277
+ })
278
+ ]
279
+ ), F(e, a);
280
+ }, ot = (e) => {
281
+ var a = Ht(), n = o(a), r = o(n, !0);
282
+ l(n);
283
+ var s = u(n, 2), d = o(s, !0);
284
+ l(s);
285
+ var _ = u(s, 2), g = o(_, !0);
286
+ l(_), l(a), $(
287
+ (c, b, T) => {
288
+ S(r, c), S(d, b), S(g, T);
289
+ },
290
+ [
291
+ () => w()("timeoutTitle"),
292
+ () => w()("timeoutDescription"),
293
+ () => w()("close")
294
+ ]
295
+ ), J("click", _, Je), F(e, a);
296
+ };
297
+ le(it, (e) => {
298
+ y() ? t(Z) && e(ot, 1) : e(rt);
299
+ });
300
+ }
301
+ l(Ce), l(pe);
302
+ var Ye = u(pe, 2);
303
+ {
304
+ var lt = (e) => {
305
+ var a = Ut(), n = o(a), r = u(n), s = o(r), d = u(s, 2);
306
+ {
307
+ var _ = (c) => {
308
+ var b = Nt();
309
+ F(c, b);
310
+ }, g = (c) => {
311
+ var b = yt();
312
+ $(() => S(b, R()?.current?.remainingTimes ?? R()?.remainingTimes)), F(c, b);
313
+ };
314
+ le(d, (c) => {
315
+ ee() ? c(_) : c(g, -1);
316
+ });
317
+ }
318
+ l(r), l(a), $(
319
+ (c) => {
320
+ S(n, `${c ?? ""} `), V(s, "src", Xe);
321
+ },
322
+ [() => w()("remainingFlips")]
323
+ ), F(e, a);
324
+ };
325
+ le(Ye, (e) => {
326
+ y() && e(lt);
327
+ });
328
+ }
329
+ var se = u(Ye, 2), ct = o(se, !0);
330
+ l(se), $(
331
+ (e, a) => {
332
+ Fe = we(m, 1, "coin-royale__flip-zone", null, Fe, {
333
+ "coin-royale__flip-zone--disabled": !y(),
334
+ "coin-royale__flip-zone--settling": p()
335
+ }), V(m, "tabindex", y() ? 0 : -1), V(m, "aria-label", e), V(m, "aria-disabled", !t(ve)), V(tt, "src", Xe), V(at, "src", Yt), se.disabled = !y(), S(ct, a);
336
+ },
337
+ [() => w()("flipCoin"), () => w()("flipCoin")]
338
+ ), J("pointerdown", m, Ke), J("click", m, Qe), J("keydown", m, (e) => {
339
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ae());
340
+ }), J("click", se, () => ae()), F(Ge, Pe);
341
+ var dt = Tt(et);
342
+ return je(), dt;
343
+ }
344
+ pt(["pointerdown", "click", "keydown"]);
345
+ mt(
346
+ $t,
347
+ {
348
+ program: {},
349
+ endpoint: {},
350
+ session: {},
351
+ isAvailable: {},
352
+ spinResults: {},
353
+ spinActive: {},
354
+ remainingTimesLoading: {},
355
+ onFlip: {}
356
+ },
357
+ [],
358
+ [],
359
+ { mode: "open" }
360
+ );
361
+ export {
362
+ $t as C
363
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./WheelOfFortuneWheel-CsOjhUcv.cjs"),e=require("./utils-Dwz-wUFC.cjs"),d=require("./constants-BDMySuIA.cjs"),Se=require("./coin-heads-BuJOLpyg.cjs"),Be=require("./coin-tails-20vJmhwv.cjs");var Je=n.from_html('<div><span class="coin-royale__chev">︿</span> <span class="coin-royale__hint-text"> </span> <span class="coin-royale__chev coin-royale__chev--down">﹀</span></div> <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M9 11V5.5a1.5 1.5 0 0 1 3 0V11h.5V7.5a1.5 1.5 0 0 1 3 0V11h.5V9a1.5 1.5 0 0 1 3 0v6.5c0 3-2 5.5-5.5 5.5H12c-2 0-3.2-.8-4.2-2.3l-2.4-3.6a1.5 1.5 0 0 1 2.3-1.9L9 15.5V11Z"></path></svg>',1),Ke=n.from_html('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-countdown"> </p></div>'),Qe=n.from_html('<div class="coin-royale__badge"><p class="coin-royale__badge-title"> </p> <p class="coin-royale__badge-body"> </p> <button class="coin-royale__badge-close" type="button"> </button></div>'),et=n.from_html('<span class="coin-royale__flips-loader"></span>'),tt=n.from_html('<p class="coin-royale__flips"> <span class="coin-royale__flips-count"><img class="coin-royale__flips-icon" alt="" aria-hidden="true"/> <!></span></p>'),nt=n.from_html('<div class="coin-royale__play"><div class="coin-royale__stage"><div role="button"><div class="coin-royale__coin-shadow"></div> <div class="coin-royale__coin"><div class="coin-royale__coin-drop-shadow" aria-hidden="true"></div> <div class="coin-royale__coin-edge" aria-hidden="true"></div> <div class="coin-royale__face coin-royale__face--front"><img alt="" draggable="false"/></div> <div class="coin-royale__face coin-royale__face--back"><img alt="" draggable="false"/></div></div> <!></div> <!></div></div> <!> <button class="coin-royale__cta" type="button"> </button>',1);function Te(Me,m){e.push(m,!0);const h=()=>e.store_get(e.$format,"$_",Ie),[Ie,Ae]=e.setup_stores();let S=n.prop(m,"program",7,null),G=n.prop(m,"endpoint",7,null),U=n.prop(m,"session",7,null),v=n.prop(m,"isAvailable",7,!1),B=n.prop(m,"spinResults",15,null),u=n.prop(m,"spinActive",15,!1),q=n.prop(m,"remainingTimesLoading",7,!1),J=n.prop(m,"onFlip",7,()=>{}),L=e.state(e.proxy({}));e.user_effect(()=>{if(!v()&&S()){const t=()=>e.set(L,e.getTimeRemaining(S()?.next?.startTime),!0);t();const i=setInterval(t,1e3);return()=>clearInterval(i)}});let I=e.state(!1),K;const Re=()=>{clearTimeout(K),K=setTimeout(()=>e.set(I,!1),400)};let N=e.state(!1),T=e.state(void 0),r=e.state(void 0),A=e.state(void 0),M=e.state(void 0);const Q=e.user_derived(()=>v()&&!u()&&!e.get(N)&&!q());let R=0,F=!1,Y=!1,ee=0,H=0,te=0,_=null,$=null,oe,P=!1;const C=(t,i=1,s=0)=>{e.get(r)&&(e.get(r).style.transform=`translateY(${s}px) rotateX(${t}deg) scale(${i})`)};e.user_effect(()=>{if(!e.get(T)||!e.get(r)||!e.get(A))return;le(),C(R);const t=new ResizeObserver(()=>le());return t.observe(e.get(T)),()=>t.disconnect()});const le=()=>{if(!e.get(T)||!e.get(r)||!e.get(A))return;const t=e.get(T).clientWidth;if(!t)return;const i=t/2*d.RIM_FACTOR,s=Math.max(14,t*d.THICKNESS_FACTOR),o=2*i*Math.tan(Math.PI/d.EDGE_SEGMENTS)+.6;e.get(r).style.setProperty("--half-t",`${(s/2).toFixed(2)}px`),e.get(A).replaceChildren();for(let a=0;a<d.EDGE_SEGMENTS;a++){const c=document.createElement("div");c.className=`coin-royale__edge-seg coin-royale__edge-seg--${a%2===0?"a":"b"}`,c.style.width=`${o.toFixed(2)}px`,c.style.height=`${s.toFixed(2)}px`,c.style.transform=`translate(-50%,-50%) rotateZ(${a*360/d.EDGE_SEGMENTS}deg) translateY(${(-i).toFixed(2)}px) rotateX(90deg)`,e.get(A).appendChild(c)}},ce=t=>{R=t,_?.cancel(),_=null,C(t,1),e.get(r)&&(e.get(r).style.animation=""),e.get(M)&&(e.get(M).style.opacity="",e.get(M).style.width="")},Fe=(t,i)=>new Promise(s=>{if(!e.get(r))return s();_?.cancel(),_=e.get(r).animate(t,{fill:"forwards",...i}),_.onfinish=()=>s(),_.oncancel=()=>s()}),Pe=async(t,i)=>{const s=new Headers({"Content-Type":"application/json"});U()&&s.append("X-SessionId",U());const o=await fetch(new URL(`${G()}/v1/wof/draw/${S()?.id}`),{method:"PUT",headers:s,cache:"no-store",body:JSON.stringify({action:1,guid:t}),signal:i});if(!o.ok)throw new Error(`draw request failed: ${o.status}`);return o.json()},V=async t=>{if(!e.get(Q)||!e.get(r)||!e.get(T)||!G())return;J()();const i=typeof t=="number"?t:R;u(!0),e.set(I,!0),e.set(N,!1),_?.cancel();const s=-(e.get(T).clientHeight*d.RISE_FACTOR);e.get(M)&&(e.get(M).style.opacity="0.3",e.get(M).style.width="34%");const o=()=>new Promise((w,E)=>requestAnimationFrame(se=>P?E(new Error("destroyed")):w(se)));let a=!1,c=!1,g;const p=e.generateUUID(),l=new AbortController;$=l;const y=Promise.race([Pe(p,l.signal),new Promise((w,E)=>{g=setTimeout(()=>{c=!0,l.abort(),E(new Error("draw timed out"))},d.SPIN_TIMEOUT_MS)})]);y.then(()=>a=!0,()=>a=!0);let b=i;try{let w=await o();const E=w;for(;!a||w-E<d.RISE_MS;){const x=await o(),k=Math.min(x-w,50)/1e3;w=x;const O=x-E,D=Math.min(O/d.SPIN_UP_MS,1);b+=d.SPIN_SPEED*D*D*(3-2*D)*k;const z=Math.min(O/d.RISE_MS,1),j=1-(1-z)**3,xe=z>=1?Math.sin((O-d.RISE_MS)/380)*.015:0;C(b,1+d.SCALE_GAIN*(j+xe),s*(j+xe))}const se=await y;clearTimeout(g);const Z=e.normalizeDrawResult(se,"draw");if(Z.success!==!0)throw new Error("draw failed");const Xe={...Z,guid:p,lotteryProgramID:Z.lotteryProgramID??S()?.id},We=Z.type==="noprize"?180:0,we=360,ae=we+(We-((b+we)%360+360)%360+360)%360,Ze=b+ae,Ee=2*ae/d.SPIN_SPEED*1e3,je=b,re=await o();for(let x=re;x-re<Ee;x=await o()){const k=(x-re)/Ee,O=1-(1-k)**2,D=Math.min(k/.78,1),z=1-D*D,j=k>.78?Math.sin((k-.78)/.22*Math.PI)*5:0;C(je+ae*O,1+d.SCALE_GAIN*z,s*z+j)}if(ce(Ze),await new Promise(x=>oe=setTimeout(x,550)),P)return;B(Xe),u(!1)}catch(w){if(clearTimeout(g),P)return;console.log(w);const E=b+((i-b)%360+360)%360;if(e.get(r)&&await Fe([{transform:e.get(r).style.transform},{transform:`translateY(0px) rotateX(${E}deg) scale(1)`}],{duration:420,easing:"cubic-bezier(.55,0,.75,.4)"}),P)return;ce(E),c&&e.set(N,!0),u(!1)}finally{$===l&&($=null),P||Re()}},Ce=()=>{e.set(N,!1),u(!1)},de=t=>{e.get(r)&&(_?.cancel(),_=e.get(r).animate([{transform:`translateY(0px) rotateX(${t}deg) scale(1)`},{transform:`translateY(0px) rotateX(${R}deg) scale(1)`}],{duration:320,easing:"cubic-bezier(.22,.61,.32,1)",fill:"forwards"}),_.onfinish=()=>{_?.cancel(),_=null,C(R,1),e.get(r)&&(e.get(r).style.animation=""),e.set(I,!1)})},ke=t=>{e.get(Q)&&(F=!0,Y=!1,ee=t.clientY,te=0,H=R,_?.cancel(),e.get(r)&&(e.get(r).style.animation="none"),e.set(I,!0))},_e=t=>{if(!F||u())return;const i=ee-t.clientY;te=i,Math.abs(i)>4&&(Y=!0),C(H+i*1.1,1+Math.min(Math.abs(i)/400,.12))},ge=t=>{if(!F)return;F=!1;const i=ee-t.clientY;if(Math.abs(i)>d.DRAG_THRESHOLD){V(H+i*1.1);return}de(H+i*1.1)},ue=()=>{F&&(F=!1,Y=!1,de(H+te*1.1))},De=()=>{if(Y){Y=!1;return}V()};n.onMount(()=>(window.addEventListener("pointermove",_e),window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ue),()=>{P=!0,$?.abort(),clearTimeout(oe),clearTimeout(K),window.removeEventListener("pointermove",_e),window.removeEventListener("pointerup",ge),window.removeEventListener("pointercancel",ue),_?.cancel()}));var Le={get program(){return S()},set program(t=null){S(t),e.flushSync()},get endpoint(){return G()},set endpoint(t=null){G(t),e.flushSync()},get session(){return U()},set session(t=null){U(t),e.flushSync()},get isAvailable(){return v()},set isAvailable(t=!1){v(t),e.flushSync()},get spinResults(){return B()},set spinResults(t=null){B(t),e.flushSync()},get spinActive(){return u()},set spinActive(t=!1){u(t),e.flushSync()},get remainingTimesLoading(){return q()},set remainingTimesLoading(t=!1){q(t),e.flushSync()},get onFlip(){return J()},set onFlip(t=()=>{}){J(t),e.flushSync()}},fe=nt(),ne=e.first_child(fe),pe=e.child(ne),f=e.child(pe);let ve;var me=e.child(f);n.bind_this(me,t=>e.set(M,t),()=>e.get(M));var X=e.sibling(me,2),he=e.sibling(e.child(X),2);n.bind_this(he,t=>e.set(A,t),()=>e.get(A));var ie=e.sibling(he,2),Ne=e.child(ie);e.reset(ie);var ye=e.sibling(ie,2),Ye=e.child(ye);e.reset(ye),e.reset(X),n.bind_this(X,t=>e.set(r,t),()=>e.get(r));var He=e.sibling(X,2);{var Oe=t=>{var i=Je(),s=e.first_child(i);let o;var a=e.sibling(e.child(s),2),c=e.child(a,!0);e.reset(a),e.next(2),e.reset(s);var g=e.sibling(s,2);let p;e.template_effect(l=>{o=n.set_class(s,1,"coin-royale__drag-hint",null,o,{"coin-royale__drag-hint--hidden":e.get(I)||u()}),n.set_text(c,l),p=n.set_class(g,0,"coin-royale__finger-cue",null,p,{"coin-royale__finger-cue--hidden":e.get(I)||u()})},[()=>h()("dragToFlip")]),n.append(t,i)};n.if_block(He,t=>{v()&&t(Oe)})}e.reset(f),n.bind_this(f,t=>e.set(T,t),()=>e.get(T));var ze=e.sibling(f,2);{var Ge=t=>{var i=Ke(),s=e.child(i),o=e.child(s,!0);e.reset(s);var a=e.sibling(s,2),c=e.child(a,!0);e.reset(a),e.reset(i),e.template_effect((g,p)=>{n.set_text(o,g),n.set_text(c,p)},[()=>h()("nextAvailable"),()=>h()("countdown",{values:{days:e.get(L).days,hours:e.get(L).hours,minutes:e.get(L).minutes,seconds:e.get(L).seconds}})]),n.append(t,i)},Ue=t=>{var i=Qe(),s=e.child(i),o=e.child(s,!0);e.reset(s);var a=e.sibling(s,2),c=e.child(a,!0);e.reset(a);var g=e.sibling(a,2),p=e.child(g,!0);e.reset(g),e.reset(i),e.template_effect((l,y,b)=>{n.set_text(o,l),n.set_text(c,y),n.set_text(p,b)},[()=>h()("timeoutTitle"),()=>h()("timeoutDescription"),()=>h()("close")]),n.delegated("click",g,Ce),n.append(t,i)};n.if_block(ze,t=>{v()?e.get(N)&&t(Ue,1):t(Ge)})}e.reset(pe),e.reset(ne);var be=e.sibling(ne,2);{var qe=t=>{var i=tt(),s=e.child(i),o=e.sibling(s),a=e.child(o),c=e.sibling(a,2);{var g=l=>{var y=et();n.append(l,y)},p=l=>{var y=n.text();e.template_effect(()=>n.set_text(y,S()?.current?.remainingTimes??S()?.remainingTimes)),n.append(l,y)};n.if_block(c,l=>{q()?l(g):l(p,-1)})}e.reset(o),e.reset(i),e.template_effect(l=>{n.set_text(s,`${l??""} `),n.set_attribute(a,"src",Se.coinHeads)},[()=>h()("remainingFlips")]),n.append(t,i)};n.if_block(be,t=>{v()&&t(qe)})}var W=e.sibling(be,2),$e=e.child(W,!0);e.reset(W),e.template_effect((t,i)=>{ve=n.set_class(f,1,"coin-royale__flip-zone",null,ve,{"coin-royale__flip-zone--disabled":!v(),"coin-royale__flip-zone--settling":u()}),n.set_attribute(f,"tabindex",v()?0:-1),n.set_attribute(f,"aria-label",t),n.set_attribute(f,"aria-disabled",!e.get(Q)),n.set_attribute(Ne,"src",Se.coinHeads),n.set_attribute(Ye,"src",Be.coinTails),W.disabled=!v(),n.set_text($e,i)},[()=>h()("flipCoin"),()=>h()("flipCoin")]),n.delegated("pointerdown",f,ke),n.delegated("click",f,De),n.delegated("keydown",f,t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),V())}),n.delegated("click",W,()=>V()),n.append(Me,fe);var Ve=e.pop(Le);return Ae(),Ve}n.delegate(["pointerdown","click","keydown"]);n.create_custom_element(Te,{program:{},endpoint:{},session:{},isAvailable:{},spinResults:{},spinActive:{},remainingTimesLoading:{},onFlip:{}},[],[],{mode:"open"});exports.CoinFlip=Te;