@everymatrix/mini-games-hub 0.1.6 → 0.1.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 (157) hide show
  1. package/components/{GameCard-8XBwX5mB.js → GameCard-DTz2IEhm.js} +27 -29
  2. package/components/GameCard-Dfgtrwdb.cjs +3 -0
  3. package/components/{GameCard-SP2WkMe4.js → GameCard-sNqb2_mR.js} +27 -29
  4. package/components/{MiniGamesHub-CMCQVVj-.cjs → MiniGamesHub-3XlqpfV_.cjs} +5 -5
  5. package/components/{MiniGamesHub-DXDzq6kn.js → MiniGamesHub-DTPiOtNT.js} +272 -273
  6. package/components/{MiniGamesHub-CZqhbkAH.js → MiniGamesHub-iX9t9vSW.js} +258 -259
  7. package/components/{WheelOfFortune-5qXt_Tgq.js → WheelOfFortune-BKUcclpm.js} +173 -159
  8. package/components/{WheelOfFortune-C175eyqQ.js → WheelOfFortune-CbvJZO8-.js} +159 -165
  9. package/components/{WheelOfFortune-DfEViFbR.cjs → WheelOfFortune-DgAgnR_Q.cjs} +8 -6
  10. package/components/WheelOfFortuneDrawResults-AskDnOA6.cjs +1 -0
  11. package/components/WheelOfFortuneDrawResults-C9BcE4Kr.js +262 -0
  12. package/components/WheelOfFortuneDrawResults-DnQPGIPX.js +237 -0
  13. package/components/WheelOfFortuneHistory-BA977Hfx.js +230 -0
  14. package/components/WheelOfFortuneHistory-CT-5jtfe.js +230 -0
  15. package/components/WheelOfFortuneHistory-uP606zLS.cjs +13 -0
  16. package/components/{WheelOfFortuneRules-DWgbOzlP.js → WheelOfFortuneRules-C16Md0m_.js} +64 -64
  17. package/components/WheelOfFortuneRules-DQcA-d8i.js +128 -0
  18. package/components/WheelOfFortuneRules-zVRcNYIv.cjs +5 -0
  19. package/components/WheelOfFortuneWheel-6j7QTrsf.cjs +3 -0
  20. package/components/WheelOfFortuneWheel-BvI-fAML.js +1980 -0
  21. package/components/WheelOfFortuneWheel-CCmzx2yj.js +1910 -0
  22. package/components/utils-B53aGsNG.js +6095 -0
  23. package/components/utils-C0oX5v1l.js +6141 -0
  24. package/components/utils-Du65tqU5.cjs +3 -0
  25. package/es2015/mini-games-hub.cjs +1 -1
  26. package/es2015/mini-games-hub.js +1 -1
  27. package/esnext/mini-games-hub.js +1 -1
  28. package/package.json +3 -1
  29. package/components/GameCard-B2Vf_Okb.cjs +0 -3
  30. package/components/GameCard-B2dUYs8D.cjs +0 -3
  31. package/components/GameCard-Bx4TWFNT.js +0 -58
  32. package/components/GameCard-CKlgiS66.cjs +0 -3
  33. package/components/GameCard-DX4XDT2r.js +0 -58
  34. package/components/GameCard-DXX0iD0Z.js +0 -58
  35. package/components/GameCard-Dfi3jlxs.js +0 -58
  36. package/components/GameCard-FmSc9xvG.js +0 -58
  37. package/components/GameCard-M2W5m0Zm.js +0 -58
  38. package/components/GameCard-_o5MuNe0.cjs +0 -3
  39. package/components/GameCard-lPup4pYJ.js +0 -58
  40. package/components/GameCard-m8ao3BnH.js +0 -58
  41. package/components/GameCard-txJxZVfs.cjs +0 -3
  42. package/components/MiniGamesHub-BBCzOhms.js +0 -1269
  43. package/components/MiniGamesHub-BEAlx3WE.js +0 -1350
  44. package/components/MiniGamesHub-BaAiz62L.cjs +0 -94
  45. package/components/MiniGamesHub-BbJIrcsb.cjs +0 -28
  46. package/components/MiniGamesHub-C6Nsfrqn.js +0 -1369
  47. package/components/MiniGamesHub-CLinNS2-.js +0 -1288
  48. package/components/MiniGamesHub-CrRIFbj_.js +0 -1350
  49. package/components/MiniGamesHub-DKkDXC81.cjs +0 -94
  50. package/components/MiniGamesHub-DXmod0OW.cjs +0 -94
  51. package/components/MiniGamesHub-DZHG1XwH.js +0 -1357
  52. package/components/MiniGamesHub-Db8-msnK.js +0 -1338
  53. package/components/MiniGamesHub-DxW3lK75.js +0 -1369
  54. package/components/WheelOfFortune-0yZoHYHH.js +0 -852
  55. package/components/WheelOfFortune-B-sa8npV.cjs +0 -572
  56. package/components/WheelOfFortune-B7NMoATV.js +0 -862
  57. package/components/WheelOfFortune-BxbFigrE.cjs +0 -588
  58. package/components/WheelOfFortune-CdsgfPZg.js +0 -829
  59. package/components/WheelOfFortune-Cfe5KhF-.cjs +0 -588
  60. package/components/WheelOfFortune-Cm-9CaHf.cjs +0 -570
  61. package/components/WheelOfFortune-DDfYKRzu.js +0 -862
  62. package/components/WheelOfFortune-DpMvjI6_.js +0 -811
  63. package/components/WheelOfFortune-Dtoep2n2.js +0 -852
  64. package/components/WheelOfFortune-cD7JyRL5.js +0 -820
  65. package/components/WheelOfFortune-u__JAdi_.js +0 -820
  66. package/components/WheelOfFortuneDrawResults-3S77J9M5.js +0 -292
  67. package/components/WheelOfFortuneDrawResults-B2L6I4Po.cjs +0 -1
  68. package/components/WheelOfFortuneDrawResults-B6RkAQ_i.cjs +0 -1
  69. package/components/WheelOfFortuneDrawResults-BRgQ0mTi.js +0 -261
  70. package/components/WheelOfFortuneDrawResults-BZAetM0L.js +0 -238
  71. package/components/WheelOfFortuneDrawResults-BmOTEhGD.js +0 -317
  72. package/components/WheelOfFortuneDrawResults-C0J_0fRE.cjs +0 -1
  73. package/components/WheelOfFortuneDrawResults-CKkYMVLn.js +0 -317
  74. package/components/WheelOfFortuneDrawResults-CRTL9AxF.cjs +0 -1
  75. package/components/WheelOfFortuneDrawResults-CvyqGbQG.js +0 -292
  76. package/components/WheelOfFortuneDrawResults-DIO74xIg.js +0 -317
  77. package/components/WheelOfFortuneDrawResults-D_QT2RDK.cjs +0 -1
  78. package/components/WheelOfFortuneDrawResults-WD4ZaXdI.js +0 -261
  79. package/components/WheelOfFortuneDrawResults-XiJyW5cc.js +0 -238
  80. package/components/WheelOfFortuneDrawResults-tMY81TeU.js +0 -292
  81. package/components/WheelOfFortuneHistory-3lEfr9Yn.cjs +0 -13
  82. package/components/WheelOfFortuneHistory-BE1mGyJn.js +0 -233
  83. package/components/WheelOfFortuneHistory-BagUH_Pn.js +0 -233
  84. package/components/WheelOfFortuneHistory-BpfmGEE1.js +0 -233
  85. package/components/WheelOfFortuneHistory-C1VQ9CfR.cjs +0 -13
  86. package/components/WheelOfFortuneHistory-C_EX6Ecx.js +0 -233
  87. package/components/WheelOfFortuneHistory-CdbwXfZf.js +0 -233
  88. package/components/WheelOfFortuneHistory-CgWvWb5r.js +0 -233
  89. package/components/WheelOfFortuneHistory-CldOJOup.js +0 -233
  90. package/components/WheelOfFortuneHistory-CpY9Bvl5.js +0 -233
  91. package/components/WheelOfFortuneHistory-D9EVcaH2.js +0 -233
  92. package/components/WheelOfFortuneHistory-DQ7yysUE.cjs +0 -13
  93. package/components/WheelOfFortuneHistory-DoYx_EbF.js +0 -233
  94. package/components/WheelOfFortuneHistory-mbWa96d6.cjs +0 -13
  95. package/components/WheelOfFortuneHistory-tcBNosXj.cjs +0 -13
  96. package/components/WheelOfFortuneRules-3Pnc2tv_.cjs +0 -5
  97. package/components/WheelOfFortuneRules-BI3iP5jZ.js +0 -117
  98. package/components/WheelOfFortuneRules-ByuqEg7o.js +0 -128
  99. package/components/WheelOfFortuneRules-C9cNreB6.cjs +0 -5
  100. package/components/WheelOfFortuneRules-CD5FcLZh.js +0 -117
  101. package/components/WheelOfFortuneRules-CS1AnNsi.cjs +0 -5
  102. package/components/WheelOfFortuneRules-DAM5aq_8.js +0 -128
  103. package/components/WheelOfFortuneRules-DEln64Ys.js +0 -117
  104. package/components/WheelOfFortuneRules-DTZ61azL.js +0 -128
  105. package/components/WheelOfFortuneRules-DUjXad1Z.cjs +0 -5
  106. package/components/WheelOfFortuneRules-Dp6015wP.cjs +0 -5
  107. package/components/WheelOfFortuneRules-ICYWgDZn.js +0 -128
  108. package/components/WheelOfFortuneRules-Sa4GsYQ7.js +0 -117
  109. package/components/WheelOfFortuneRules-ssp6aAUp.js +0 -128
  110. package/components/WheelOfFortuneWheel-76dShj7s.cjs +0 -1
  111. package/components/WheelOfFortuneWheel-B-3ALU8u.js +0 -632
  112. package/components/WheelOfFortuneWheel-B0P_kjVI.js +0 -599
  113. package/components/WheelOfFortuneWheel-C2yIQKzY.js +0 -598
  114. package/components/WheelOfFortuneWheel-C6o9ZPV4.js +0 -598
  115. package/components/WheelOfFortuneWheel-CeSTBBTb.js +0 -640
  116. package/components/WheelOfFortuneWheel-D-wKWbJO.cjs +0 -1
  117. package/components/WheelOfFortuneWheel-Dn6de3eN.js +0 -674
  118. package/components/WheelOfFortuneWheel-JKN_P3ES.cjs +0 -1
  119. package/components/WheelOfFortuneWheel-LXdY_AV0.js +0 -633
  120. package/components/WheelOfFortuneWheel-R5JZFn6S.js +0 -643
  121. package/components/WheelOfFortuneWheel-j83OpEdj.cjs +0 -1
  122. package/components/WheelOfFortuneWheel-jv0TkAX_.js +0 -632
  123. package/components/WheelOfFortuneWheel-le2uV09t.js +0 -609
  124. package/components/WheelOfFortuneWheel-rP-wIp2j.cjs +0 -1
  125. package/components/bonus-BcSq5fV_.cjs +0 -1
  126. package/components/bonus-BroDvSJR.js +0 -4
  127. package/components/coin-DetgSMGn.js +0 -4
  128. package/components/coin-dEAbLQma.cjs +0 -1
  129. package/components/constants-B5BwgkMh.cjs +0 -1
  130. package/components/constants-syi43uVY.js +0 -29
  131. package/components/loyalty-Bf3uaVFP.js +0 -4
  132. package/components/loyalty-XDJlZgzx.cjs +0 -1
  133. package/components/noprize-BJ-U8c5U.cjs +0 -1
  134. package/components/noprize-DQHyTDC0.js +0 -4
  135. package/components/role-Bxkn_4_S.cjs +0 -1
  136. package/components/role-CNEtykLr.js +0 -4
  137. package/components/sparkles-Br3hNIM6.js +0 -25
  138. package/components/sparkles-CsUJD5iK.js +0 -29
  139. package/components/sparkles-DMNeGYKa.cjs +0 -1
  140. package/components/spin-controller-BfbakdA_.js +0 -160
  141. package/components/spin-controller-Do0l1eeX.cjs +0 -1
  142. package/components/spin-controller-Y0nB76qX.js +0 -162
  143. package/components/ticket-DP0fQfPa.cjs +0 -1
  144. package/components/ticket-DcOVRE_N.js +0 -4
  145. package/components/tournament-8UbfkV5I.cjs +0 -1
  146. package/components/tournament-BtKf5Btm.js +0 -4
  147. package/components/utils-BCvapeyS.cjs +0 -5
  148. package/components/utils-CCuzS-TL.js +0 -6831
  149. package/components/utils-CG5ADU6a.cjs +0 -5
  150. package/components/utils-COXr0j7Z.js +0 -6803
  151. package/components/utils-CbMHM9Bv.js +0 -6831
  152. package/components/utils-ClIENp93.js +0 -6906
  153. package/components/utils-Cun_uLlb.js +0 -6890
  154. package/components/utils-D6FQ3_dW.cjs +0 -5
  155. package/components/utils-De4h5fhB.js +0 -6918
  156. package/components/utils-DrFJq1GB.js +0 -6819
  157. package/components/utils-DrO0OQK_.js +0 -6918
@@ -1,238 +0,0 @@
1
- import "./WheelOfFortuneWheel-le2uV09t.js";
2
- import { d as zt, e as xt, p as St, h as X, u as Tt, j as i, n as At, m as B, w as y, x as Mt, y as Pt, z as jt, s as Q, G as j, C as V, A as Ft, E as a, D as s, K as e, k as f, Y as it, t as L, v as n, l as T, r as G, U as Z, I as Lt, q as Et, L as $ } from "./utils-DrFJq1GB.js";
3
- import { E as nt } from "./error-DJgbe-Bh.js";
4
- import { b as Wt } from "./bonus-BroDvSJR.js";
5
- import { n as Bt } from "./noprize-DQHyTDC0.js";
6
- import { t as Gt } from "./tournament-BtKf5Btm.js";
7
- import { r as It } from "./role-CNEtykLr.js";
8
- import { l as Nt } from "./loyalty-Bf3uaVFP.js";
9
- import { t as Ot } from "./ticket-DcOVRE_N.js";
10
- import { c as Ut } from "./coin-DetgSMGn.js";
11
- import { a as Jt } from "./sparkles-Br3hNIM6.js";
12
- var Yt = j('<div class="ConfirmModalContent"><p class="ConfirmModalTitle"> </p> <p class="ConfirmModalBody"><!></p> <div class="ConfirmModalActions"><button class="PrimaryCta"> </button> <button class="SecondaryCta"> </button></div></div>'), qt = j('<img alt="DrawResult"/> <p class="DrawResultCopy"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), Ht = j('<img alt="Lose"/> <p class="DrawResultCopy"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), Kt = j('<img alt="DrawResult"/> <h2 class="DrawResultTitle"> </h2> <p class="DrawResultCopy"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), Xt = j('<img alt="DrawResult"/> <h2 class="DrawResultTitle"> </h2> <p class="DrawResultCopy"><!></p> <div class="DrawResultActions"><button class="PrimaryCta"> </button> <button class="SecondaryCta"> </button></div>', 1), Qt = j('<img alt="Error"/> <p class="DrawResultCopy"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), Vt = j('<div class="DrawResultPanel"><div class="DrawResultConfettiLayer"></div> <!> <div class="DrawResultStack"><!></div></div>');
13
- function Zt(lt, I) {
14
- St(I, !0);
15
- const r = () => Pt(jt, "$_", ct), [ct, vt] = Ft(), k = X(I, "result", 7), J = X(I, "endpoint", 7), N = X(I, "session", 7), ut = $(() => k()?.success !== !0), tt = $(() => k()?.type), dt = $(() => i(tt) === "noprize"), _t = {
16
- bonus: r()("prizeBonus"),
17
- role: r()("prizeRole"),
18
- tournament: r()("prizeTournament"),
19
- ticket: r()("prizeTicket"),
20
- loyalty: r()("prizeLoyalty"),
21
- challenge: r()("prizeChallenge")
22
- }, Y = { loyalty: Nt, role: It, ticket: Ot, bonus: Wt, noprize: Bt, tournament: Gt };
23
- let O = Q(void 0), g = Q("initial"), h = Q(!1);
24
- Tt(() => {
25
- i(O) && i(g) === "claimSuccess" && Jt(i(O));
26
- });
27
- const at = (t) => {
28
- const o = new URL(`${J()}/v1/wof/draw/${k().lotteryProgramID}`), l = new Headers();
29
- N() && l.append("X-SessionId", N()), l.append("Content-Type", "application/json");
30
- const d = { action: t, guid: k().guid };
31
- return fetch(o, { method: "PUT", headers: l, body: JSON.stringify(d) }).then((C) => C.json());
32
- }, et = async () => {
33
- f(h, !0);
34
- try {
35
- const t = await at(0), o = Lt(t, "draw"), l = o?.state === "fulfilled" && o?.completed, d = o?.state === "drawn" && !o?.completed;
36
- l ? f(g, "claimSuccess") : d ? f(g, "claimFailed") : f(g, "claimFailed");
37
- } catch (t) {
38
- console.log(t), f(g, "claimFailed");
39
- } finally {
40
- f(h, !1);
41
- }
42
- }, pt = async () => {
43
- f(h, !0), f(g, "initial");
44
- try {
45
- await at(2), window.postMessage({ type: "BackToWheel" }, window.location.href);
46
- } catch (t) {
47
- console.log(t);
48
- } finally {
49
- f(h, !1);
50
- }
51
- }, mt = () => {
52
- window.postMessage({ type: "BackToWheel" }, window.location.href);
53
- }, q = () => {
54
- window.postMessage({ type: "SpinAgain" }, window.location.href);
55
- };
56
- var ft = {
57
- get result() {
58
- return k();
59
- },
60
- set result(t) {
61
- k(t), V();
62
- },
63
- get endpoint() {
64
- return J();
65
- },
66
- set endpoint(t) {
67
- J(t), V();
68
- },
69
- get session() {
70
- return N();
71
- },
72
- set session(t) {
73
- N(t), V();
74
- }
75
- }, H = Vt(), rt = a(H);
76
- At(rt, (t) => f(O, t), () => i(O));
77
- var st = s(rt, 2);
78
- {
79
- var gt = (t) => {
80
- var o = Yt(), l = a(o), d = a(l, !0);
81
- e(l);
82
- var C = s(l, 2), _ = a(C);
83
- it(_, () => r()("rejectWarningText")), e(C);
84
- var v = s(C, 2), c = a(v);
85
- c.__click = et;
86
- var R = a(c, !0);
87
- e(c);
88
- var w = s(c, 2);
89
- w.__click = pt;
90
- var p = a(w, !0);
91
- e(w), e(v), e(o), L(
92
- (m, z, D) => {
93
- n(d, m), c.disabled = i(h), n(R, z), w.disabled = i(h), n(p, D);
94
- },
95
- [
96
- () => r()("areYouSure"),
97
- () => r()("keepPrize"),
98
- () => r()("rejectPrize")
99
- ]
100
- ), y(t, o);
101
- };
102
- B(st, (t) => {
103
- i(g) === "rejectModal" && t(gt);
104
- });
105
- }
106
- var ot = s(st, 2), wt = a(ot);
107
- {
108
- var bt = (t) => {
109
- var o = qt(), l = T(o), d = s(l, 2), C = a(d, !0);
110
- e(d);
111
- var _ = s(d, 2), v = a(_);
112
- v.__click = mt;
113
- var c = a(v, !0);
114
- e(v), e(_), L(
115
- (R, w) => {
116
- G(l, "src", Y[k().type] ?? Ut), n(C, R), n(c, w);
117
- },
118
- [() => r()("prizeAssigned"), () => r()("backToGame")]
119
- ), y(t, o);
120
- }, yt = (t) => {
121
- var o = Z(), l = T(o);
122
- {
123
- var d = (_) => {
124
- var v = Ht(), c = T(v);
125
- Et(c, 1, "", null, {}, { Lose: !0 });
126
- var R = s(c, 2), w = a(R, !0);
127
- e(R);
128
- var p = s(R, 2), m = a(p);
129
- m.__click = q;
130
- var z = a(m, !0);
131
- e(m), e(p), L(
132
- (D, E) => {
133
- G(c, "src", nt), n(w, D), n(z, E);
134
- },
135
- [() => r()("drawFailed"), () => r()("backToGame")]
136
- ), y(_, v);
137
- }, C = (_) => {
138
- var v = Z(), c = T(v);
139
- {
140
- var R = (p) => {
141
- var m = Kt(), z = T(m), D = s(z, 2), E = a(D, !0);
142
- e(D);
143
- var b = s(D, 2), A = a(b, !0);
144
- e(b);
145
- var x = s(b, 2), u = a(x);
146
- u.__click = q;
147
- var W = a(u, !0);
148
- e(u), e(x), L(
149
- (S, M, F) => {
150
- G(z, "src", Y.noprize), n(E, S), n(A, M), u.disabled = i(h), n(W, F);
151
- },
152
- [
153
- () => r()("noPrizeTitle"),
154
- () => r()("noPrize"),
155
- () => r()("spinAgain")
156
- ]
157
- ), y(p, m);
158
- }, w = (p) => {
159
- var m = Z(), z = T(m);
160
- {
161
- var D = (b) => {
162
- var A = Xt(), x = T(A), u = s(x, 2), W = a(u, !0);
163
- e(u);
164
- var S = s(u, 2), M = a(S);
165
- it(M, () => r()("success", { values: { prize: _t[i(tt)] } })), e(S);
166
- var F = s(S, 2), P = a(F);
167
- P.__click = et;
168
- var K = a(P, !0);
169
- e(P);
170
- var U = s(P, 2);
171
- U.__click = () => f(g, "rejectModal");
172
- var Ct = a(U, !0);
173
- e(U), e(F), L(
174
- (Rt, Dt, kt) => {
175
- G(x, "src", Y[k().type]), n(W, Rt), P.disabled = i(h), n(K, Dt), U.disabled = i(h), n(Ct, kt);
176
- },
177
- [
178
- () => r()("congratulations"),
179
- () => r()("claimReward"),
180
- () => r()("reject")
181
- ]
182
- ), y(b, A);
183
- }, E = (b) => {
184
- var A = Qt(), x = T(A), u = s(x, 2), W = a(u, !0);
185
- e(u);
186
- var S = s(u, 2), M = a(S);
187
- M.__click = q;
188
- var F = a(M, !0);
189
- e(M), e(S), L(
190
- (P, K) => {
191
- G(x, "src", nt), n(W, P), n(F, K);
192
- },
193
- [() => r()("errorJSON"), () => r()("backToGame")]
194
- ), y(b, A);
195
- };
196
- B(
197
- z,
198
- (b) => {
199
- i(ut) ? b(E, !1) : b(D);
200
- },
201
- !0
202
- );
203
- }
204
- y(p, m);
205
- };
206
- B(
207
- c,
208
- (p) => {
209
- i(dt) ? p(R) : p(w, !1);
210
- },
211
- !0
212
- );
213
- }
214
- y(_, v);
215
- };
216
- B(
217
- l,
218
- (_) => {
219
- i(g) === "claimFailed" ? _(d) : _(C, !1);
220
- },
221
- !0
222
- );
223
- }
224
- y(t, o);
225
- };
226
- B(wt, (t) => {
227
- i(g) === "claimSuccess" ? t(bt) : t(yt, !1);
228
- });
229
- }
230
- e(ot), e(H), y(lt, H);
231
- var ht = Mt(ft);
232
- return vt(), ht;
233
- }
234
- zt(["click"]);
235
- xt(Zt, { result: {}, endpoint: {}, session: {} }, [], [], !0);
236
- export {
237
- Zt as W
238
- };
@@ -1,292 +0,0 @@
1
- import "./WheelOfFortuneWheel-CeSTBBTb.js";
2
- import { d as Ta, e as Aa, p as ja, h as Q, u as Ma, j as s, n as Pa, m as F, w as p, x as Fa, y as Ba, z as Ea, s as V, G as S, C as Z, A as Wa, E as a, D as n, K as t, k as R, X as ca, t as G, v as i, Y as X, l as B, T as aa, I as Ga, M as ta, o as La, F as Ia, r as $a } from "./utils-CCuzS-TL.js";
3
- import { E as Na } from "./error-DJgbe-Bh.js";
4
- import { a as Oa } from "./sparkles-BzZDomk7.js";
5
- var Ja = S('<span class="ButtonSpinner"></span>'), Ka = S('<span class="ButtonSpinner"></span>'), Ua = S('<div class="ConfirmModalContent"><p class="ConfirmModalTitle"> </p> <p class="ConfirmModalBody"><!></p> <div class="ConfirmModalActions"><button class="PrimaryCta"><span> </span> <!></button> <button class="SecondaryCta"><span> </span> <!></button></div></div>'), Xa = S('<h2 class="DrawResultTitle"> </h2> <p class="DrawResultDescription"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), Ya = S('<h2 class="DrawResultTitle"> </h2> <p class="DrawResultDescription"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), Ha = S('<h2 class="DrawResultTitle"> </h2> <p class="DrawResultDescription"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), qa = S('<span class="DrawResultSparkle" aria-hidden="true">✦</span>'), Qa = S('<span class="ButtonSpinner"></span>'), Va = S('<h2 class="DrawResultTitle"> <!></h2> <p class="DrawResultDescription"><!></p> <div class="DrawResultActions"><button class="PrimaryCta"><span> </span> <!></button> <button class="SecondaryCta"> </button></div>', 1), Za = S('<img alt="Error" class="DrawResultErrorImage"/> <p class="DrawResultDescription DrawResultDescription--error"> </p> <div class="DrawResultActions"><button class="SecondaryCta"> </button></div>', 1), at = S('<div class="DrawResultPanel"><div class="DrawResultConfettiLayer"></div> <!> <div class="DrawResultStack"><!></div></div>');
6
- function tt(va, $) {
7
- ja($, !0);
8
- const r = () => Ba(Ea, "$_", da), [da, ua] = Wa(), L = Q($, "result", 7), Y = Q($, "endpoint", 7), N = Q($, "session", 7), pa = ta(() => L()?.success !== !0), ea = ta(() => L()?.type), _a = ta(() => s(ea) === "noprize"), ma = {
9
- bonus: r()("prizeBonus"),
10
- role: r()("prizeRole"),
11
- tournament: r()("prizeTournament"),
12
- ticket: r()("prizeTicket"),
13
- loyalty: r()("prizeLoyalty"),
14
- challenge: r()("prizeChallenge")
15
- }, fa = [
16
- { t: "-0.7em", l: "5%", s: "0.45em", d: "680ms" },
17
- { t: "-0.5em", l: "22%", s: "0.28em", d: "760ms" },
18
- { t: "-0.9em", l: "40%", s: "0.38em", d: "820ms" },
19
- { t: "-0.6em", l: "58%", s: "0.3em", d: "740ms" },
20
- { t: "-0.8em", l: "76%", s: "0.42em", d: "900ms" },
21
- { t: "-0.4em", l: "92%", s: "0.25em", d: "860ms" },
22
- { t: "0.1em", l: "14%", s: "0.22em", d: "800ms" },
23
- { t: "0em", l: "72%", s: "0.2em", d: "950ms" }
24
- ];
25
- let O = V(void 0), x = V("initial"), l = V(null);
26
- Ma(() => {
27
- s(O) && s(x) === "claimSuccess" && Oa(s(O));
28
- });
29
- const sa = (e) => {
30
- const o = new URL(`${Y()}/v1/wof/draw/${L().lotteryProgramID}`), c = new Headers();
31
- N() && c.append("X-SessionId", N()), c.append("Content-Type", "application/json");
32
- const j = { action: e, guid: L().guid };
33
- return fetch(o, { method: "PUT", headers: c, body: JSON.stringify(j) }).then((b) => b.json());
34
- }, ra = async () => {
35
- R(l, "claim");
36
- try {
37
- const e = await sa(0), o = Ga(e, "draw"), c = o?.state === "fulfilled" && o?.completed, j = o?.state === "drawn" && !o?.completed;
38
- c ? R(x, "claimSuccess") : j ? R(x, "claimFailed") : R(x, "claimFailed");
39
- } catch (e) {
40
- console.log(e), R(x, "claimFailed");
41
- } finally {
42
- R(l, null);
43
- }
44
- }, wa = async () => {
45
- R(l, "reject"), R(x, "initial");
46
- try {
47
- await sa(2), window.postMessage({ type: "BackToWheel" }, window.location.href);
48
- } catch (e) {
49
- console.log(e);
50
- } finally {
51
- R(l, null);
52
- }
53
- }, ha = () => {
54
- window.postMessage({ type: "BackToWheel" }, window.location.href);
55
- }, H = () => {
56
- window.postMessage({ type: "SpinAgain" }, window.location.href);
57
- };
58
- var ya = {
59
- get result() {
60
- return L();
61
- },
62
- set result(e) {
63
- L(e), Z();
64
- },
65
- get endpoint() {
66
- return Y();
67
- },
68
- set endpoint(e) {
69
- Y(e), Z();
70
- },
71
- get session() {
72
- return N();
73
- },
74
- set session(e) {
75
- N(e), Z();
76
- }
77
- }, q = at(), na = a(q);
78
- Pa(na, (e) => R(O, e), () => s(O));
79
- var ia = n(na, 2);
80
- {
81
- var ba = (e) => {
82
- var o = Ua(), c = a(o), j = a(c, !0);
83
- t(c);
84
- var b = n(c, 2), k = a(b);
85
- ca(k, () => r()("rejectWarningText")), t(b);
86
- var g = n(b, 2), v = a(g);
87
- v.__click = ra;
88
- var z = a(v);
89
- let C;
90
- var f = a(z, !0);
91
- t(z);
92
- var w = n(z, 2);
93
- {
94
- var D = (d) => {
95
- var u = Ja();
96
- p(d, u);
97
- };
98
- F(w, (d) => {
99
- s(l) === "claim" && d(D);
100
- });
101
- }
102
- t(v);
103
- var T = n(v, 2);
104
- T.__click = wa;
105
- var h = a(T);
106
- let _;
107
- var y = a(h, !0);
108
- t(h);
109
- var m = n(h, 2);
110
- {
111
- var A = (d) => {
112
- var u = Ka();
113
- p(d, u);
114
- };
115
- F(m, (d) => {
116
- s(l) === "reject" && d(A);
117
- });
118
- }
119
- t(T), t(g), t(o), G(
120
- (d, u, M) => {
121
- i(j, d), v.disabled = !!s(l), C = X(z, "", C, { opacity: s(l) === "claim" ? 0 : 1 }), i(f, u), T.disabled = !!s(l), _ = X(h, "", _, { opacity: s(l) === "reject" ? 0 : 1 }), i(y, M);
122
- },
123
- [
124
- () => r()("areYouSure"),
125
- () => r()("keepPrize"),
126
- () => r()("rejectPrize")
127
- ]
128
- ), p(e, o);
129
- };
130
- F(ia, (e) => {
131
- s(x) === "rejectModal" && e(ba);
132
- });
133
- }
134
- var oa = n(ia, 2), ga = a(oa);
135
- {
136
- var Da = (e) => {
137
- var o = Xa(), c = B(o), j = a(c, !0);
138
- t(c);
139
- var b = n(c, 2), k = a(b, !0);
140
- t(b);
141
- var g = n(b, 2), v = a(g);
142
- v.__click = ha;
143
- var z = a(v, !0);
144
- t(v), t(g), G(
145
- (C, f, w) => {
146
- i(j, C), i(k, f), i(z, w);
147
- },
148
- [
149
- () => r()("prizeAssignedTitle"),
150
- () => r()("prizeAssigned"),
151
- () => r()("backToGame")
152
- ]
153
- ), p(e, o);
154
- }, Ra = (e) => {
155
- var o = aa(), c = B(o);
156
- {
157
- var j = (k) => {
158
- var g = Ya(), v = B(g), z = a(v, !0);
159
- t(v);
160
- var C = n(v, 2), f = a(C, !0);
161
- t(C);
162
- var w = n(C, 2), D = a(w);
163
- D.__click = H;
164
- var T = a(D, !0);
165
- t(D), t(w), G(
166
- (h, _, y) => {
167
- i(z, h), i(f, _), i(T, y);
168
- },
169
- [
170
- () => r()("drawFailedTitle"),
171
- () => r()("drawFailed"),
172
- () => r()("backToGame")
173
- ]
174
- ), p(k, g);
175
- }, b = (k) => {
176
- var g = aa(), v = B(g);
177
- {
178
- var z = (f) => {
179
- var w = Ha(), D = B(w), T = a(D, !0);
180
- t(D);
181
- var h = n(D, 2), _ = a(h, !0);
182
- t(h);
183
- var y = n(h, 2), m = a(y);
184
- m.__click = H;
185
- var A = a(m, !0);
186
- t(m), t(y), G(
187
- (d, u, M) => {
188
- i(T, d), i(_, u), m.disabled = !!s(l), i(A, M);
189
- },
190
- [
191
- () => r()("noPrizeTitle"),
192
- () => r()("noPrize"),
193
- () => r()("spinAgain")
194
- ]
195
- ), p(f, w);
196
- }, C = (f) => {
197
- var w = aa(), D = B(w);
198
- {
199
- var T = (_) => {
200
- var y = Va(), m = B(y), A = a(m), d = n(A);
201
- La(d, 17, () => fa, Ia, (W, P) => {
202
- var U = qa();
203
- G(() => X(U, `top:${s(P).t ?? ""};left:${s(P).l ?? ""};font-size:${s(P).s ?? ""};animation-delay:${s(P).d ?? ""}`)), p(W, U);
204
- }), t(m);
205
- var u = n(m, 2), M = a(u);
206
- ca(M, () => r()("success", { values: { prize: ma[s(ea)] } })), t(u);
207
- var J = n(u, 2), E = a(J);
208
- E.__click = ra;
209
- var I = a(E);
210
- let la;
211
- var xa = a(I, !0);
212
- t(I);
213
- var ka = n(I, 2);
214
- {
215
- var za = (W) => {
216
- var P = Qa();
217
- p(W, P);
218
- };
219
- F(ka, (W) => {
220
- s(l) === "claim" && W(za);
221
- });
222
- }
223
- t(E);
224
- var K = n(E, 2);
225
- K.__click = () => R(x, "rejectModal");
226
- var Ca = a(K, !0);
227
- t(K), t(J), G(
228
- (W, P, U) => {
229
- i(A, `${W ?? ""} `), E.disabled = !!s(l), la = X(I, "", la, { opacity: s(l) === "claim" ? 0 : 1 }), i(xa, P), K.disabled = !!s(l), i(Ca, U);
230
- },
231
- [
232
- () => r()("congratulations"),
233
- () => r()("claimReward"),
234
- () => r()("reject")
235
- ]
236
- ), p(_, y);
237
- }, h = (_) => {
238
- var y = Za(), m = B(y), A = n(m, 2), d = a(A, !0);
239
- t(A);
240
- var u = n(A, 2), M = a(u);
241
- M.__click = H;
242
- var J = a(M, !0);
243
- t(M), t(u), G(
244
- (E, I) => {
245
- $a(m, "src", Na), i(d, E), i(J, I);
246
- },
247
- [() => r()("errorJSON"), () => r()("backToGame")]
248
- ), p(_, y);
249
- };
250
- F(
251
- D,
252
- (_) => {
253
- s(pa) ? _(h, !1) : _(T);
254
- },
255
- !0
256
- );
257
- }
258
- p(f, w);
259
- };
260
- F(
261
- v,
262
- (f) => {
263
- s(_a) ? f(z) : f(C, !1);
264
- },
265
- !0
266
- );
267
- }
268
- p(k, g);
269
- };
270
- F(
271
- c,
272
- (k) => {
273
- s(x) === "claimFailed" ? k(j) : k(b, !1);
274
- },
275
- !0
276
- );
277
- }
278
- p(e, o);
279
- };
280
- F(ga, (e) => {
281
- s(x) === "claimSuccess" ? e(Da) : e(Ra, !1);
282
- });
283
- }
284
- t(oa), t(q), p(va, q);
285
- var Sa = Fa(ya);
286
- return ua(), Sa;
287
- }
288
- Ta(["click"]);
289
- Aa(tt, { result: {}, endpoint: {}, session: {} }, [], [], !0);
290
- export {
291
- tt as W
292
- };
@@ -1,13 +0,0 @@
1
- "use strict";require("./WheelOfFortuneWheel-JKN_P3ES.cjs");const e=require("./utils-D6FQ3_dW.cjs");var he=e.from_html('<div class="LuckyWheelHistoryItem SkeletonRow svelte-k1ejn7"></div>'),_e=e.from_html('<div class="LuckyWheelHistoryHeader HistoryGrid svelte-k1ejn7"><p class="svelte-k1ejn7">#</p> <p class="svelte-k1ejn7"> </p> <p class="svelte-k1ejn7"> </p> <p class="svelte-k1ejn7"> </p> <p class="svelte-k1ejn7"> </p></div> <!>',1),ue=e.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-k1ejn7"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-k1ejn7"></path></svg>'),xe=e.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-k1ejn7"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-k1ejn7"></path></svg>'),me=e.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-k1ejn7"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3977 2.60225C10.6174 2.82192 10.6174 3.17808 10.3977 3.39775L4.89775 8.89775C4.67808 9.11742 4.32192 9.11742 4.10225 8.89775L1.60225 6.39775C1.38258 6.17808 1.38258 5.82192 1.60225 5.60225C1.82192 5.38258 2.17808 5.38258 2.39775 5.60225L4.5 7.7045L9.60225 2.60225C9.82192 2.38258 10.1781 2.38258 10.3977 2.60225Z" fill="#29CF00" class="svelte-k1ejn7"></path></svg>'),ke=e.from_svg('<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="svelte-k1ejn7"><path d="M6.73367 6.0952L9.82534 3.0327C9.92639 2.92941 9.98768 2.79371 9.99835 2.6496C10.009 2.50549 9.96841 2.36225 9.88367 2.2452C9.83646 2.1749 9.77377 2.11636 9.70041 2.07407C9.62705 2.03178 9.54498 2.00686 9.46049 2.00123C9.376 1.99559 9.29135 2.0094 9.21302 2.04158C9.1347 2.07376 9.06479 2.12346 9.00867 2.18686L5.91701 5.27853L2.82534 2.18686C2.76922 2.12346 2.69931 2.07376 2.62099 2.04158C2.54266 2.0094 2.45801 1.99559 2.37352 2.00123C2.28903 2.00686 2.20696 2.03178 2.1336 2.07407C2.06024 2.11636 1.99755 2.1749 1.95034 2.2452C1.8656 2.36225 1.82498 2.50549 1.83566 2.6496C1.84633 2.79371 1.90762 2.92941 2.00867 3.0327L5.10034 6.0952L2.00867 9.1577C1.90762 9.26099 1.84633 9.39668 1.83566 9.54079C1.82498 9.6849 1.8656 9.82814 1.95034 9.9452C1.99755 10.0155 2.06024 10.074 2.1336 10.1163C2.20696 10.1586 2.28903 10.1835 2.37352 10.1892C2.45801 10.1948 2.54266 10.181 2.62099 10.1488C2.69931 10.1166 2.76922 10.0669 2.82534 10.0035L5.91701 6.91186L9.00867 10.0035C9.06479 10.0669 9.1347 10.1166 9.21302 10.1488C9.29135 10.181 9.376 10.1948 9.46049 10.1892C9.54498 10.1835 9.62705 10.1586 9.70041 10.1163C9.77377 10.074 9.83646 10.0155 9.88367 9.9452C9.96841 9.82814 10.009 9.6849 9.99835 9.54079C9.98768 9.39668 9.92639 9.26099 9.82534 9.1577L6.73367 6.0952Z" fill="#EB0000" class="svelte-k1ejn7"></path></svg>'),be=e.from_html('<div class="LuckyWheelHistoryItem HistoryGrid svelte-k1ejn7"><p class="svelte-k1ejn7"> </p> <p class="svelte-k1ejn7"> </p> <div class="DateTimeCell svelte-k1ejn7"><span class="svelte-k1ejn7"> </span> <span class="svelte-k1ejn7"> </span></div> <div class="HistoryIcon svelte-k1ejn7"><!></div> <div class="HistoryIcon svelte-k1ejn7"><!></div></div>'),ye=e.from_html('<span class="PaginationEllipsis svelte-k1ejn7">&hellip;</span>'),je=e.from_html("<button> </button>"),Ce=e.from_html('<div class="LuckyWheelPagination svelte-k1ejn7"><button class="PaginationButton PaginationNav svelte-k1ejn7">&#8249;</button> <div class="PaginationPages svelte-k1ejn7"></div> <button class="PaginationButton PaginationNav svelte-k1ejn7">&#8250;</button></div>'),we=e.from_html('<div class="LuckyWheelHistoryHeader HistoryGrid svelte-k1ejn7"><p class="svelte-k1ejn7">#</p> <p class="svelte-k1ejn7"> </p> <p class="svelte-k1ejn7"> </p> <p class="svelte-k1ejn7"> </p> <p class="svelte-k1ejn7"> </p></div> <!> <!>',1),Le=e.from_html('<h2 class="NoHistory svelte-k1ejn7"> </h2>'),Pe=e.from_html('<div class="HistoryList svelte-k1ejn7"><!></div>');const He={hash:"svelte-k1ejn7",code:`.svelte-k1ejn7,
2
- .svelte-k1ejn7::before,
3
- .svelte-k1ejn7::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.HistoryList.svelte-k1ejn7 {display:flex;flex-direction:column;gap:6px;width:90%;margin:auto;}.HistoryGrid.svelte-k1ejn7 {display:grid;grid-template-columns:28px 1fr 1fr 44px 60px;align-items:center;gap:8px;}.DateTimeCell.svelte-k1ejn7 {display:flex;flex-direction:column;gap:2px;}.DateTimeCell.svelte-k1ejn7 span:where(.svelte-k1ejn7):last-child {opacity:0.6;font-size:10px;}.LuckyWheelHistoryItem.svelte-k1ejn7 {width:100%;border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:8px 12px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);font-size:12px;}.LuckyWheelHistoryHeader.svelte-k1ejn7 {width:100%;padding:6px 12px;color:var(--color-text-default, #ffffff);opacity:0.6;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}.HistoryIcon.svelte-k1ejn7 {display:flex;align-items:center;justify-content:center;}.NoHistory.svelte-k1ejn7 {width:100%;font-size:14px;font-weight:400;margin-top:12px;}.LuckyWheelPagination.svelte-k1ejn7 {display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;}.PaginationPages.svelte-k1ejn7 {display:flex;align-items:center;gap:4px;}.PaginationEllipsis.svelte-k1ejn7 {color:var(--color-text-default, #ffffff);padding:0 2px;user-select:none;opacity:0.6;font-size:14px;line-height:32px;}.PaginationButton.svelte-k1ejn7 {border:1px solid var(--color-border-subtle, rgba(251, 251, 251, 0.0509803922));border-radius:6px;padding:6px 10px;background-color:var(--color-overlay-neutral-1, rgba(251, 251, 251, 0.1019607843));color:var(--color-text-default, #ffffff);cursor:pointer;transition:background-color 0.15s ease;font-size:13px;line-height:1;}.PaginationButton.svelte-k1ejn7:hover:not(:disabled) {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));}.PaginationButton.svelte-k1ejn7:disabled {opacity:0.4;cursor:not-allowed;}.PaginationPage.svelte-k1ejn7 {min-width:32px;text-align:center;padding:6px 8px;}.PaginationNav.svelte-k1ejn7 {min-width:32px;text-align:center;font-size:16px;padding:4px 8px;flex-shrink:0;}.PaginationPage.Active.svelte-k1ejn7 {background-color:var(--color-overlay-neutral-2, rgba(251, 251, 251, 0.2));border-color:var(--color-text-default, #ffffff);font-weight:600;}
4
-
5
- @keyframes svelte-k1ejn7-skeleton-pulse {
6
- 0%, 100% {
7
- opacity: 0.3;
8
- }
9
- 50% {
10
- opacity: 0.6;
11
- }
12
- }.SkeletonRow.svelte-k1ejn7 {pointer-events:none;
13
- animation: svelte-k1ejn7-skeleton-pulse 1.4s ease-in-out infinite;height:40px;}`};function K(X,I){e.push(I,!0),e.append_styles(X,He);const s=()=>e.store_get(e.$format,"$_",Q),[Q,V]=e.setup_stores(),F=e.prop(I,"programId",7),G=e.prop(I,"endpoint",7),W=e.prop(I,"session",7);let A=e.state(!0),d=e.state(e.proxy([])),Y=e.state(!1);const w=10;let o=e.state(1);const E=e.user_derived(()=>e.get(d)&&e.get(d).length>0?Math.ceil(e.get(d).length/w):1),$=e.user_derived(()=>e.get(d)&&e.get(d).length>0?e.get(d).slice((e.get(o)-1)*w,e.get(o)*w):[]),ee={bonus:s()("prizeBonus"),role:s()("prizeRole"),tournament:s()("prizeTournament"),ticket:s()("prizeTicket"),loyalty:s()("prizeLoyalty"),challenge:s()("prizeChallenge")},te=e.user_derived(()=>{const t=e.get(E);if(t<=5)return Array.from({length:t},(r,p)=>p+1);const n=[],v=e.get(o);n.push(1),v>3&&n.push("...");const a=Math.max(2,v-1),m=Math.min(t-1,v+1);for(let r=a;r<=m;r++)n.push(r);return v<t-2&&n.push("..."),t>1&&n.push(t),n}),N=t=>{t<1||t>e.get(E)||e.set(o,t,!0)},se=()=>{e.set(A,!0);const t=new URL(`${G()}/v1/wof/outcome/${F()}`),n=new Headers;W()&&n.append("X-SessionId",W()),fetch(t,{method:"GET",headers:n,cache:"no-store"}).then(a=>a.json()).then(a=>{e.set(d,a==null?void 0:a.items.map(m=>e.normalizeDrawResult(m,"history")),!0),e.set(o,1)}).catch(a=>{console.log(a),e.set(Y,!0)}).finally(()=>e.set(A,!1))};e.onMount(()=>{se()});var ne={get programId(){return F()},set programId(t){F(t),e.flushSync()},get endpoint(){return G()},set endpoint(t){G(t),e.flushSync()},get session(){return W()},set session(t){W(t),e.flushSync()}},Z=Pe(),ae=e.child(Z);{var re=t=>{var n=_e(),v=e.first_child(n),a=e.sibling(e.child(v),2),m=e.child(a,!0);e.reset(a);var r=e.sibling(a,2),p=e.child(r,!0);e.reset(r);var g=e.sibling(r,2),k=e.child(g,!0);e.reset(g);var M=e.sibling(g,2),L=e.child(M,!0);e.reset(M),e.reset(v);var q=e.sibling(v,2);e.each(q,17,()=>Array(w),e.index,(b,T,P,S)=>{var R=he();e.append(b,R)}),e.template_effect((b,T,P,S)=>{e.set_text(m,b),e.set_text(p,T),e.set_text(k,P),e.set_text(L,S)},[()=>s()("name"),()=>s()("date"),()=>s()("spin"),()=>s()("assigned")]),e.append(t,n)},ie=t=>{var n=e.comment(),v=e.first_child(n);{var a=r=>{var p=we(),g=e.first_child(p),k=e.sibling(e.child(g),2),M=e.child(k,!0);e.reset(k);var L=e.sibling(k,2),q=e.child(L,!0);e.reset(L);var b=e.sibling(L,2),T=e.child(b,!0);e.reset(b);var P=e.sibling(b,2),S=e.child(P,!0);e.reset(P),e.reset(g);var R=e.sibling(g,2);e.each(R,17,()=>e.get($),e.index,(y,l,x)=>{var f=be(),j=e.child(f),H=e.child(j);e.reset(j);var c=e.sibling(j,2),D=e.child(c,!0);e.reset(c);var z=e.sibling(c,2),B=e.child(z),O=e.child(B,!0);e.reset(B);var h=e.sibling(B,2),_=e.child(h,!0);e.reset(h),e.reset(z);var C=e.sibling(z,2),U=e.child(C);{var pe=i=>{var u=ue();e.append(i,u)},ce=i=>{var u=xe();e.append(i,u)};e.if_block(U,i=>{e.get(l).state==="drawn"||e.get(l).state==="fulfilled"?i(pe):i(ce,!1)})}e.reset(C);var J=e.sibling(C,2),de=e.child(J);{var ge=i=>{var u=me();e.append(i,u)},fe=i=>{var u=ke();e.append(i,u)};e.if_block(de,i=>{e.get(l).completed&&e.get(l).state==="fulfilled"?i(ge):i(fe,!1)})}e.reset(J),e.reset(f),e.template_effect((i,u)=>{e.set_text(H,`${(e.get(o)-1)*w+x+1}.`),e.set_text(D,ee[e.get(l).type]||"-"),e.set_text(O,i),e.set_text(_,u)},[()=>e.formatDateTimeForHistory(e.get(l).time).date,()=>e.formatDateTimeForHistory(e.get(l).time).time]),e.append(y,f)});var oe=e.sibling(R,2);{var ve=y=>{var l=Ce(),x=e.child(l);x.__click=()=>N(e.get(o)-1);var f=e.sibling(x,2);e.each(f,21,()=>e.get(te),e.index,(H,c)=>{var D=e.comment(),z=e.first_child(D);{var B=h=>{var _=ye();e.append(h,_)},O=h=>{var _=je();let C;_.__click=()=>N(e.get(c));var U=e.child(_,!0);e.reset(_),e.template_effect(()=>{C=e.set_class(_,1,"PaginationButton PaginationPage svelte-k1ejn7",null,C,{Active:e.get(o)===e.get(c)}),e.set_text(U,e.get(c))}),e.append(h,_)};e.if_block(z,h=>{e.get(c)==="..."?h(B):h(O,!1)})}e.append(H,D)}),e.reset(f);var j=e.sibling(f,2);j.__click=()=>N(e.get(o)+1),e.reset(l),e.template_effect((H,c)=>{x.disabled=e.get(o)===1,e.set_attribute(x,"aria-label",H),j.disabled=e.get(o)===e.get(E),e.set_attribute(j,"aria-label",c)},[()=>s()("previous"),()=>s()("next")]),e.append(y,l)};e.if_block(oe,y=>{e.get(E)>1&&y(ve)})}e.template_effect((y,l,x,f)=>{e.set_text(M,y),e.set_text(q,l),e.set_text(T,x),e.set_text(S,f)},[()=>s()("name"),()=>s()("date"),()=>s()("spin"),()=>s()("assigned")]),e.append(r,p)},m=r=>{var p=Le(),g=e.child(p,!0);e.reset(p),e.template_effect(k=>e.set_text(g,k),[()=>s()("noHistory")]),e.append(r,p)};e.if_block(v,r=>{e.get(d)&&e.get(d).length>0?r(a):r(m,!1)})}e.append(t,n)};e.if_block(ae,t=>{e.get(A)?t(re):t(ie,!1)})}e.reset(Z),e.append(X,Z);var le=e.pop(ne);return V(),le}e.delegate(["click"]);e.create_custom_element(K,{programId:{},endpoint:{},session:{}},[],[],!0);exports.WheelOfFortuneHistory=K;