@everymatrix/prize-engine-details 0.0.1
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.
- package/components/PrizeEngineChest-BAvn8Uqu.js +309 -0
- package/components/PrizeEngineChest-D12zcnCP.js +331 -0
- package/components/PrizeEngineChest-FLOj7JPm.cjs +1 -0
- package/components/PrizeEngineCoin-BDXUbncI.js +293 -0
- package/components/PrizeEngineCoin-DgcGFXeX.cjs +1 -0
- package/components/PrizeEngineCoin-gS7twrig.js +271 -0
- package/components/PrizeEngineDetails-CYqhfy7G.js +6554 -0
- package/components/PrizeEngineDetails-DyzVAIwm.cjs +23 -0
- package/components/PrizeEngineDetails-pGbveBNj.js +6608 -0
- package/components/PrizeEngineLuckywheel-BOxVxoQz.js +272 -0
- package/components/PrizeEngineLuckywheel-Br1pbq2l.js +272 -0
- package/components/PrizeEngineLuckywheel-CWbSlFgY.cjs +1 -0
- package/components/WheelSVG-5iGpp_LR.js +1441 -0
- package/components/WheelSVG-ByPQXLtR.js +1475 -0
- package/components/WheelSVG-_TPvVsPl.cjs +34 -0
- package/es2015/prize-engine-details.cjs +1 -0
- package/es2015/prize-engine-details.js +16 -0
- package/esnext/prize-engine-details.js +14 -0
- package/package.json +25 -0
- package/stencil/app-globals-0f993ce5-D-kw1sls.js +5 -0
- package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
- package/stencil/index-b2193545-9K-aI7zC.cjs +1 -0
- package/stencil/index-b2193545-DsMHU6jb.js +519 -0
- package/stencil/index-b2193545-R7ZoV-kY.js +503 -0
- package/stencil/ui-skeleton-BreIU6e5.cjs +1 -0
- package/stencil/ui-skeleton-W50o8tfg.js +11 -0
- package/stencil/ui-skeleton-ed169f8f-CVY4B-CP.js +155 -0
- package/stencil/ui-skeleton-ed169f8f-CpiCXJrP.cjs +55 -0
- package/stencil/ui-skeleton-ed169f8f-D3TjbVKy.js +155 -0
- package/stencil/ui-skeleton-xXZA3rYO.js +29 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { S as O, d as T, s as B, f as g, e as I, h as R, Q as M, R as z, T as J, j as G, k as L, m as P, t as Q, o as X, q as F, U as H, u as K, V as Y, W as Z, x as W, X as $, A as ee, B as te, C as ne, D as ie } from "./PrizeEngineDetails-pGbveBNj.js";
|
|
2
|
+
import { s as se, a as le, W as re, b as ae } from "./WheelSVG-ByPQXLtR.js";
|
|
3
|
+
function oe(i) {
|
|
4
|
+
I(i, "svelte-12d9sfg", '.PrizeLuckywheelContainer.svelte-12d9sfg{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;padding:20px;box-sizing:border-box;font-family:var(--emw--font-family-primary, "Ubuntu", sans-serif)}.PrizeLuckywheelContainer.Mobile.svelte-12d9sfg{padding:10px}.MainSection.svelte-12d9sfg{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;position:relative}.WheelWrapper.svelte-12d9sfg{flex-grow:1;display:flex;align-items:center;justify-content:center;min-height:0;width:100%}');
|
|
5
|
+
}
|
|
6
|
+
function E(i) {
|
|
7
|
+
let e, s, t, r, c = {
|
|
8
|
+
lang: (
|
|
9
|
+
/*lang*/
|
|
10
|
+
i[0]
|
|
11
|
+
),
|
|
12
|
+
contentdirection: (
|
|
13
|
+
/*contentdirection*/
|
|
14
|
+
i[1]
|
|
15
|
+
),
|
|
16
|
+
bonus: (
|
|
17
|
+
/*activeGame*/
|
|
18
|
+
i[4]
|
|
19
|
+
),
|
|
20
|
+
size: (
|
|
21
|
+
/*_internalSize*/
|
|
22
|
+
i[3]
|
|
23
|
+
),
|
|
24
|
+
radius: (
|
|
25
|
+
/*radius*/
|
|
26
|
+
i[7]
|
|
27
|
+
)
|
|
28
|
+
};
|
|
29
|
+
return t = new re({ props: c }), i[17](t), t.$on(
|
|
30
|
+
"spinning",
|
|
31
|
+
/*spinning_handler*/
|
|
32
|
+
i[18]
|
|
33
|
+
), t.$on(
|
|
34
|
+
"spinning-request",
|
|
35
|
+
/*spinning_request_handler*/
|
|
36
|
+
i[19]
|
|
37
|
+
), t.$on(
|
|
38
|
+
"success",
|
|
39
|
+
/*success_handler*/
|
|
40
|
+
i[20]
|
|
41
|
+
), {
|
|
42
|
+
c() {
|
|
43
|
+
e = L("div"), s = L("div"), Z(t.$$.fragment), P(s, "class", "WheelWrapper svelte-12d9sfg"), P(e, "class", "MainSection svelte-12d9sfg");
|
|
44
|
+
},
|
|
45
|
+
m(l, a) {
|
|
46
|
+
G(l, e, a), K(e, s), Y(t, s, null), r = !0;
|
|
47
|
+
},
|
|
48
|
+
p(l, a) {
|
|
49
|
+
const o = {};
|
|
50
|
+
a & /*lang*/
|
|
51
|
+
1 && (o.lang = /*lang*/
|
|
52
|
+
l[0]), a & /*contentdirection*/
|
|
53
|
+
2 && (o.contentdirection = /*contentdirection*/
|
|
54
|
+
l[1]), a & /*activeGame*/
|
|
55
|
+
16 && (o.bonus = /*activeGame*/
|
|
56
|
+
l[4]), a & /*_internalSize*/
|
|
57
|
+
8 && (o.size = /*_internalSize*/
|
|
58
|
+
l[3]), a & /*radius*/
|
|
59
|
+
128 && (o.radius = /*radius*/
|
|
60
|
+
l[7]), t.$set(o);
|
|
61
|
+
},
|
|
62
|
+
i(l) {
|
|
63
|
+
r || (z(t.$$.fragment, l), r = !0);
|
|
64
|
+
},
|
|
65
|
+
o(l) {
|
|
66
|
+
M(t.$$.fragment, l), r = !1;
|
|
67
|
+
},
|
|
68
|
+
d(l) {
|
|
69
|
+
l && R(e), i[17](null), H(t);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function ce(i) {
|
|
74
|
+
let e, s, t = (
|
|
75
|
+
/*activeGame*/
|
|
76
|
+
i[4] && E(i)
|
|
77
|
+
);
|
|
78
|
+
return {
|
|
79
|
+
c() {
|
|
80
|
+
e = L("div"), t && t.c(), P(e, "class", "PrizeLuckywheelContainer svelte-12d9sfg"), Q(
|
|
81
|
+
e,
|
|
82
|
+
"Mobile",
|
|
83
|
+
/*mobileView*/
|
|
84
|
+
i[8]
|
|
85
|
+
);
|
|
86
|
+
},
|
|
87
|
+
m(r, c) {
|
|
88
|
+
G(r, e, c), t && t.m(e, null), i[21](e), s = !0;
|
|
89
|
+
},
|
|
90
|
+
p(r, [c]) {
|
|
91
|
+
/*activeGame*/
|
|
92
|
+
r[4] ? t ? (t.p(r, c), c & /*activeGame*/
|
|
93
|
+
16 && z(t, 1)) : (t = E(r), t.c(), z(t, 1), t.m(e, null)) : t && ($(), M(t, 1, 1, () => {
|
|
94
|
+
t = null;
|
|
95
|
+
}), J());
|
|
96
|
+
},
|
|
97
|
+
i(r) {
|
|
98
|
+
s || (z(t), s = !0);
|
|
99
|
+
},
|
|
100
|
+
o(r) {
|
|
101
|
+
M(t), s = !1;
|
|
102
|
+
},
|
|
103
|
+
d(r) {
|
|
104
|
+
r && R(e), t && t.d(), i[21](null);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
let ue = null;
|
|
109
|
+
function fe(i, e, s) {
|
|
110
|
+
let t, r, c, { data: l = null } = e, { lang: a = "en" } = e, { clientstyling: o = "" } = e, { clientstylingurl: y = "" } = e, { translationurl: w = "" } = e, { mbsource: b = "" } = e, { size: S = 324 } = e, { mobilesize: _ = 240 } = e, { contentdirection: C = "anticlockwise" } = e, k = null, u;
|
|
111
|
+
const v = X(window.navigator.userAgent);
|
|
112
|
+
let f, m = !1;
|
|
113
|
+
se();
|
|
114
|
+
const j = () => {
|
|
115
|
+
fetch(w).then((d) => d.json()).then((d) => {
|
|
116
|
+
Object.keys(d).forEach((h) => {
|
|
117
|
+
ae(h, d[h]);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}, q = (n) => {
|
|
121
|
+
f && f.setDrawResult(n);
|
|
122
|
+
}, D = () => {
|
|
123
|
+
m || (s(6, m = !0), f && f.eventSpin());
|
|
124
|
+
};
|
|
125
|
+
F(() => {
|
|
126
|
+
const n = (d) => {
|
|
127
|
+
const { type: h, data: N } = d.data;
|
|
128
|
+
h === "PrizeGameResult" ? q(N) : h === "PrizeResultClose" ? (s(6, m = !1), f && f.closeMessage()) : h === "PrizeGameStartAnimation" && D();
|
|
129
|
+
};
|
|
130
|
+
return window.addEventListener("message", n), () => {
|
|
131
|
+
window.removeEventListener("message", n);
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
function x(n) {
|
|
135
|
+
W[n ? "unshift" : "push"](() => {
|
|
136
|
+
f = n, s(5, f);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const U = () => s(6, m = !0), p = () => window.postMessage({ type: "PrizeGameRequestDraw" }, "*"), A = () => window.postMessage({ type: "PrizeGameSpinEnd" }, "*");
|
|
140
|
+
function V(n) {
|
|
141
|
+
W[n ? "unshift" : "push"](() => {
|
|
142
|
+
u = n, s(2, u);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return i.$$set = (n) => {
|
|
146
|
+
"data" in n && s(9, l = n.data), "lang" in n && s(0, a = n.lang), "clientstyling" in n && s(10, o = n.clientstyling), "clientstylingurl" in n && s(11, y = n.clientstylingurl), "translationurl" in n && s(12, w = n.translationurl), "mbsource" in n && s(13, b = n.mbsource), "size" in n && s(14, S = n.size), "mobilesize" in n && s(15, _ = n.mobilesize), "contentdirection" in n && s(1, C = n.contentdirection);
|
|
147
|
+
}, i.$$.update = () => {
|
|
148
|
+
if (i.$$.dirty & /*data*/
|
|
149
|
+
512)
|
|
150
|
+
if (typeof l == "string")
|
|
151
|
+
try {
|
|
152
|
+
s(4, k = JSON.parse(l));
|
|
153
|
+
} catch (n) {
|
|
154
|
+
console.error("[Luckywheel] Parse failed", n);
|
|
155
|
+
}
|
|
156
|
+
else
|
|
157
|
+
s(4, k = l);
|
|
158
|
+
i.$$.dirty & /*lang*/
|
|
159
|
+
1 && a && le(a), i.$$.dirty & /*translationurl*/
|
|
160
|
+
4096 && w && j(), i.$$.dirty & /*clientstyling, rootContainer*/
|
|
161
|
+
1028 && o && u && ee(u, o), i.$$.dirty & /*clientstylingurl, rootContainer*/
|
|
162
|
+
2052 && y && u && te(u, y), i.$$.dirty & /*mbsource, rootContainer*/
|
|
163
|
+
8196 && b && u && ne(u, `${b}.Style`, ue), i.$$.dirty & /*mobilesize, size*/
|
|
164
|
+
49152 && s(16, t = v && _ ? _ : S), i.$$.dirty & /*_size*/
|
|
165
|
+
65536 && s(3, r = t / 0.6875), i.$$.dirty & /*_internalSize*/
|
|
166
|
+
8 && s(7, c = 0.62 * r / 2);
|
|
167
|
+
}, [
|
|
168
|
+
a,
|
|
169
|
+
C,
|
|
170
|
+
u,
|
|
171
|
+
r,
|
|
172
|
+
k,
|
|
173
|
+
f,
|
|
174
|
+
m,
|
|
175
|
+
c,
|
|
176
|
+
v,
|
|
177
|
+
l,
|
|
178
|
+
o,
|
|
179
|
+
y,
|
|
180
|
+
w,
|
|
181
|
+
b,
|
|
182
|
+
S,
|
|
183
|
+
_,
|
|
184
|
+
t,
|
|
185
|
+
x,
|
|
186
|
+
U,
|
|
187
|
+
p,
|
|
188
|
+
A,
|
|
189
|
+
V
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
class ge extends O {
|
|
193
|
+
constructor(e) {
|
|
194
|
+
super(), T(
|
|
195
|
+
this,
|
|
196
|
+
e,
|
|
197
|
+
fe,
|
|
198
|
+
ce,
|
|
199
|
+
B,
|
|
200
|
+
{
|
|
201
|
+
data: 9,
|
|
202
|
+
lang: 0,
|
|
203
|
+
clientstyling: 10,
|
|
204
|
+
clientstylingurl: 11,
|
|
205
|
+
translationurl: 12,
|
|
206
|
+
mbsource: 13,
|
|
207
|
+
size: 14,
|
|
208
|
+
mobilesize: 15,
|
|
209
|
+
contentdirection: 1
|
|
210
|
+
},
|
|
211
|
+
oe
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
get data() {
|
|
215
|
+
return this.$$.ctx[9];
|
|
216
|
+
}
|
|
217
|
+
set data(e) {
|
|
218
|
+
this.$$set({ data: e }), g();
|
|
219
|
+
}
|
|
220
|
+
get lang() {
|
|
221
|
+
return this.$$.ctx[0];
|
|
222
|
+
}
|
|
223
|
+
set lang(e) {
|
|
224
|
+
this.$$set({ lang: e }), g();
|
|
225
|
+
}
|
|
226
|
+
get clientstyling() {
|
|
227
|
+
return this.$$.ctx[10];
|
|
228
|
+
}
|
|
229
|
+
set clientstyling(e) {
|
|
230
|
+
this.$$set({ clientstyling: e }), g();
|
|
231
|
+
}
|
|
232
|
+
get clientstylingurl() {
|
|
233
|
+
return this.$$.ctx[11];
|
|
234
|
+
}
|
|
235
|
+
set clientstylingurl(e) {
|
|
236
|
+
this.$$set({ clientstylingurl: e }), g();
|
|
237
|
+
}
|
|
238
|
+
get translationurl() {
|
|
239
|
+
return this.$$.ctx[12];
|
|
240
|
+
}
|
|
241
|
+
set translationurl(e) {
|
|
242
|
+
this.$$set({ translationurl: e }), g();
|
|
243
|
+
}
|
|
244
|
+
get mbsource() {
|
|
245
|
+
return this.$$.ctx[13];
|
|
246
|
+
}
|
|
247
|
+
set mbsource(e) {
|
|
248
|
+
this.$$set({ mbsource: e }), g();
|
|
249
|
+
}
|
|
250
|
+
get size() {
|
|
251
|
+
return this.$$.ctx[14];
|
|
252
|
+
}
|
|
253
|
+
set size(e) {
|
|
254
|
+
this.$$set({ size: e }), g();
|
|
255
|
+
}
|
|
256
|
+
get mobilesize() {
|
|
257
|
+
return this.$$.ctx[15];
|
|
258
|
+
}
|
|
259
|
+
set mobilesize(e) {
|
|
260
|
+
this.$$set({ mobilesize: e }), g();
|
|
261
|
+
}
|
|
262
|
+
get contentdirection() {
|
|
263
|
+
return this.$$.ctx[1];
|
|
264
|
+
}
|
|
265
|
+
set contentdirection(e) {
|
|
266
|
+
this.$$set({ contentdirection: e }), g();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
customElements.define("prize-engine-luckywheel", ie(ge, { data: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {}, size: {}, mobilesize: {}, contentdirection: {} }, [], [], !0));
|
|
270
|
+
export {
|
|
271
|
+
ge as default
|
|
272
|
+
};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { S as O, d as T, s as B, f as g, g as I, j as R, Q as M, R as z, T as J, k as G, m as L, o as P, t as Q, p as X, r as F, U as H, v as K, V as Y, W as Z, y as W, X as $, B as ee, C as te, D as ne, e as ie } from "./PrizeEngineDetails-CYqhfy7G.js";
|
|
2
|
+
import { s as se, a as le, W as re, b as ae } from "./WheelSVG-5iGpp_LR.js";
|
|
3
|
+
function oe(i) {
|
|
4
|
+
I(i, "svelte-12d9sfg", '.PrizeLuckywheelContainer.svelte-12d9sfg{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;padding:20px;box-sizing:border-box;font-family:var(--emw--font-family-primary, "Ubuntu", sans-serif)}.PrizeLuckywheelContainer.Mobile.svelte-12d9sfg{padding:10px}.MainSection.svelte-12d9sfg{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;position:relative}.WheelWrapper.svelte-12d9sfg{flex-grow:1;display:flex;align-items:center;justify-content:center;min-height:0;width:100%}');
|
|
5
|
+
}
|
|
6
|
+
function E(i) {
|
|
7
|
+
let e, s, t, r, c = {
|
|
8
|
+
lang: (
|
|
9
|
+
/*lang*/
|
|
10
|
+
i[0]
|
|
11
|
+
),
|
|
12
|
+
contentdirection: (
|
|
13
|
+
/*contentdirection*/
|
|
14
|
+
i[1]
|
|
15
|
+
),
|
|
16
|
+
bonus: (
|
|
17
|
+
/*activeGame*/
|
|
18
|
+
i[4]
|
|
19
|
+
),
|
|
20
|
+
size: (
|
|
21
|
+
/*_internalSize*/
|
|
22
|
+
i[3]
|
|
23
|
+
),
|
|
24
|
+
radius: (
|
|
25
|
+
/*radius*/
|
|
26
|
+
i[7]
|
|
27
|
+
)
|
|
28
|
+
};
|
|
29
|
+
return t = new re({ props: c }), i[17](t), t.$on(
|
|
30
|
+
"spinning",
|
|
31
|
+
/*spinning_handler*/
|
|
32
|
+
i[18]
|
|
33
|
+
), t.$on(
|
|
34
|
+
"spinning-request",
|
|
35
|
+
/*spinning_request_handler*/
|
|
36
|
+
i[19]
|
|
37
|
+
), t.$on(
|
|
38
|
+
"success",
|
|
39
|
+
/*success_handler*/
|
|
40
|
+
i[20]
|
|
41
|
+
), {
|
|
42
|
+
c() {
|
|
43
|
+
e = L("div"), s = L("div"), Z(t.$$.fragment), P(s, "class", "WheelWrapper svelte-12d9sfg"), P(e, "class", "MainSection svelte-12d9sfg");
|
|
44
|
+
},
|
|
45
|
+
m(l, a) {
|
|
46
|
+
G(l, e, a), K(e, s), Y(t, s, null), r = !0;
|
|
47
|
+
},
|
|
48
|
+
p(l, a) {
|
|
49
|
+
const o = {};
|
|
50
|
+
a & /*lang*/
|
|
51
|
+
1 && (o.lang = /*lang*/
|
|
52
|
+
l[0]), a & /*contentdirection*/
|
|
53
|
+
2 && (o.contentdirection = /*contentdirection*/
|
|
54
|
+
l[1]), a & /*activeGame*/
|
|
55
|
+
16 && (o.bonus = /*activeGame*/
|
|
56
|
+
l[4]), a & /*_internalSize*/
|
|
57
|
+
8 && (o.size = /*_internalSize*/
|
|
58
|
+
l[3]), a & /*radius*/
|
|
59
|
+
128 && (o.radius = /*radius*/
|
|
60
|
+
l[7]), t.$set(o);
|
|
61
|
+
},
|
|
62
|
+
i(l) {
|
|
63
|
+
r || (z(t.$$.fragment, l), r = !0);
|
|
64
|
+
},
|
|
65
|
+
o(l) {
|
|
66
|
+
M(t.$$.fragment, l), r = !1;
|
|
67
|
+
},
|
|
68
|
+
d(l) {
|
|
69
|
+
l && R(e), i[17](null), H(t);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function ce(i) {
|
|
74
|
+
let e, s, t = (
|
|
75
|
+
/*activeGame*/
|
|
76
|
+
i[4] && E(i)
|
|
77
|
+
);
|
|
78
|
+
return {
|
|
79
|
+
c() {
|
|
80
|
+
e = L("div"), t && t.c(), P(e, "class", "PrizeLuckywheelContainer svelte-12d9sfg"), Q(
|
|
81
|
+
e,
|
|
82
|
+
"Mobile",
|
|
83
|
+
/*mobileView*/
|
|
84
|
+
i[8]
|
|
85
|
+
);
|
|
86
|
+
},
|
|
87
|
+
m(r, c) {
|
|
88
|
+
G(r, e, c), t && t.m(e, null), i[21](e), s = !0;
|
|
89
|
+
},
|
|
90
|
+
p(r, [c]) {
|
|
91
|
+
/*activeGame*/
|
|
92
|
+
r[4] ? t ? (t.p(r, c), c & /*activeGame*/
|
|
93
|
+
16 && z(t, 1)) : (t = E(r), t.c(), z(t, 1), t.m(e, null)) : t && ($(), M(t, 1, 1, () => {
|
|
94
|
+
t = null;
|
|
95
|
+
}), J());
|
|
96
|
+
},
|
|
97
|
+
i(r) {
|
|
98
|
+
s || (z(t), s = !0);
|
|
99
|
+
},
|
|
100
|
+
o(r) {
|
|
101
|
+
M(t), s = !1;
|
|
102
|
+
},
|
|
103
|
+
d(r) {
|
|
104
|
+
r && R(e), t && t.d(), i[21](null);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
let ue = null;
|
|
109
|
+
function fe(i, e, s) {
|
|
110
|
+
let t, r, c, { data: l = null } = e, { lang: a = "en" } = e, { clientstyling: o = "" } = e, { clientstylingurl: y = "" } = e, { translationurl: w = "" } = e, { mbsource: b = "" } = e, { size: S = 324 } = e, { mobilesize: _ = 240 } = e, { contentdirection: v = "anticlockwise" } = e, k = null, u;
|
|
111
|
+
const C = X(window.navigator.userAgent);
|
|
112
|
+
let f, m = !1;
|
|
113
|
+
se();
|
|
114
|
+
const j = () => {
|
|
115
|
+
fetch(w).then((d) => d.json()).then((d) => {
|
|
116
|
+
Object.keys(d).forEach((h) => {
|
|
117
|
+
ae(h, d[h]);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}, D = (n) => {
|
|
121
|
+
f && f.setDrawResult(n);
|
|
122
|
+
}, p = () => {
|
|
123
|
+
m || (s(6, m = !0), f && f.eventSpin());
|
|
124
|
+
};
|
|
125
|
+
F(() => {
|
|
126
|
+
const n = (d) => {
|
|
127
|
+
const { type: h, data: N } = d.data;
|
|
128
|
+
h === "PrizeGameResult" ? D(N) : h === "PrizeResultClose" ? (s(6, m = !1), f && f.closeMessage()) : h === "PrizeGameStartAnimation" && p();
|
|
129
|
+
};
|
|
130
|
+
return window.addEventListener("message", n), () => {
|
|
131
|
+
window.removeEventListener("message", n);
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
function q(n) {
|
|
135
|
+
W[n ? "unshift" : "push"](() => {
|
|
136
|
+
f = n, s(5, f);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const U = () => s(6, m = !0), x = () => window.postMessage({ type: "PrizeGameRequestDraw" }, "*"), V = () => window.postMessage({ type: "PrizeGameSpinEnd" }, "*");
|
|
140
|
+
function A(n) {
|
|
141
|
+
W[n ? "unshift" : "push"](() => {
|
|
142
|
+
u = n, s(2, u);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return i.$$set = (n) => {
|
|
146
|
+
"data" in n && s(9, l = n.data), "lang" in n && s(0, a = n.lang), "clientstyling" in n && s(10, o = n.clientstyling), "clientstylingurl" in n && s(11, y = n.clientstylingurl), "translationurl" in n && s(12, w = n.translationurl), "mbsource" in n && s(13, b = n.mbsource), "size" in n && s(14, S = n.size), "mobilesize" in n && s(15, _ = n.mobilesize), "contentdirection" in n && s(1, v = n.contentdirection);
|
|
147
|
+
}, i.$$.update = () => {
|
|
148
|
+
if (i.$$.dirty & /*data*/
|
|
149
|
+
512)
|
|
150
|
+
if (typeof l == "string")
|
|
151
|
+
try {
|
|
152
|
+
s(4, k = JSON.parse(l));
|
|
153
|
+
} catch (n) {
|
|
154
|
+
console.error("[Luckywheel] Parse failed", n);
|
|
155
|
+
}
|
|
156
|
+
else
|
|
157
|
+
s(4, k = l);
|
|
158
|
+
i.$$.dirty & /*lang*/
|
|
159
|
+
1 && a && le(a), i.$$.dirty & /*translationurl*/
|
|
160
|
+
4096 && w && j(), i.$$.dirty & /*clientstyling, rootContainer*/
|
|
161
|
+
1028 && o && u && ee(u, o), i.$$.dirty & /*clientstylingurl, rootContainer*/
|
|
162
|
+
2052 && y && u && te(u, y), i.$$.dirty & /*mbsource, rootContainer*/
|
|
163
|
+
8196 && b && u && ne(u, `${b}.Style`, ue), i.$$.dirty & /*mobilesize, size*/
|
|
164
|
+
49152 && s(16, t = C && _ ? _ : S), i.$$.dirty & /*_size*/
|
|
165
|
+
65536 && s(3, r = t / 0.6875), i.$$.dirty & /*_internalSize*/
|
|
166
|
+
8 && s(7, c = 0.62 * r / 2);
|
|
167
|
+
}, [
|
|
168
|
+
a,
|
|
169
|
+
v,
|
|
170
|
+
u,
|
|
171
|
+
r,
|
|
172
|
+
k,
|
|
173
|
+
f,
|
|
174
|
+
m,
|
|
175
|
+
c,
|
|
176
|
+
C,
|
|
177
|
+
l,
|
|
178
|
+
o,
|
|
179
|
+
y,
|
|
180
|
+
w,
|
|
181
|
+
b,
|
|
182
|
+
S,
|
|
183
|
+
_,
|
|
184
|
+
t,
|
|
185
|
+
q,
|
|
186
|
+
U,
|
|
187
|
+
x,
|
|
188
|
+
V,
|
|
189
|
+
A
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
class ge extends O {
|
|
193
|
+
constructor(e) {
|
|
194
|
+
super(), T(
|
|
195
|
+
this,
|
|
196
|
+
e,
|
|
197
|
+
fe,
|
|
198
|
+
ce,
|
|
199
|
+
B,
|
|
200
|
+
{
|
|
201
|
+
data: 9,
|
|
202
|
+
lang: 0,
|
|
203
|
+
clientstyling: 10,
|
|
204
|
+
clientstylingurl: 11,
|
|
205
|
+
translationurl: 12,
|
|
206
|
+
mbsource: 13,
|
|
207
|
+
size: 14,
|
|
208
|
+
mobilesize: 15,
|
|
209
|
+
contentdirection: 1
|
|
210
|
+
},
|
|
211
|
+
oe
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
get data() {
|
|
215
|
+
return this.$$.ctx[9];
|
|
216
|
+
}
|
|
217
|
+
set data(e) {
|
|
218
|
+
this.$$set({ data: e }), g();
|
|
219
|
+
}
|
|
220
|
+
get lang() {
|
|
221
|
+
return this.$$.ctx[0];
|
|
222
|
+
}
|
|
223
|
+
set lang(e) {
|
|
224
|
+
this.$$set({ lang: e }), g();
|
|
225
|
+
}
|
|
226
|
+
get clientstyling() {
|
|
227
|
+
return this.$$.ctx[10];
|
|
228
|
+
}
|
|
229
|
+
set clientstyling(e) {
|
|
230
|
+
this.$$set({ clientstyling: e }), g();
|
|
231
|
+
}
|
|
232
|
+
get clientstylingurl() {
|
|
233
|
+
return this.$$.ctx[11];
|
|
234
|
+
}
|
|
235
|
+
set clientstylingurl(e) {
|
|
236
|
+
this.$$set({ clientstylingurl: e }), g();
|
|
237
|
+
}
|
|
238
|
+
get translationurl() {
|
|
239
|
+
return this.$$.ctx[12];
|
|
240
|
+
}
|
|
241
|
+
set translationurl(e) {
|
|
242
|
+
this.$$set({ translationurl: e }), g();
|
|
243
|
+
}
|
|
244
|
+
get mbsource() {
|
|
245
|
+
return this.$$.ctx[13];
|
|
246
|
+
}
|
|
247
|
+
set mbsource(e) {
|
|
248
|
+
this.$$set({ mbsource: e }), g();
|
|
249
|
+
}
|
|
250
|
+
get size() {
|
|
251
|
+
return this.$$.ctx[14];
|
|
252
|
+
}
|
|
253
|
+
set size(e) {
|
|
254
|
+
this.$$set({ size: e }), g();
|
|
255
|
+
}
|
|
256
|
+
get mobilesize() {
|
|
257
|
+
return this.$$.ctx[15];
|
|
258
|
+
}
|
|
259
|
+
set mobilesize(e) {
|
|
260
|
+
this.$$set({ mobilesize: e }), g();
|
|
261
|
+
}
|
|
262
|
+
get contentdirection() {
|
|
263
|
+
return this.$$.ctx[1];
|
|
264
|
+
}
|
|
265
|
+
set contentdirection(e) {
|
|
266
|
+
this.$$set({ contentdirection: e }), g();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
customElements.define("prize-engine-luckywheel", ie(ge, { data: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {}, size: {}, mobilesize: {}, contentdirection: {} }, [], [], !0));
|
|
270
|
+
export {
|
|
271
|
+
ge as default
|
|
272
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./PrizeEngineDetails-DyzVAIwm.cjs"),z=require("./WheelSVG-_TPvVsPl.cjs");function O(s){e.append_styles(s,"svelte-12d9sfg",'.PrizeLuckywheelContainer.svelte-12d9sfg{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;padding:20px;box-sizing:border-box;font-family:var(--emw--font-family-primary, "Ubuntu", sans-serif)}.PrizeLuckywheelContainer.Mobile.svelte-12d9sfg{padding:10px}.MainSection.svelte-12d9sfg{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;position:relative}.WheelWrapper.svelte-12d9sfg{flex-grow:1;display:flex;align-items:center;justify-content:center;min-height:0;width:100%}')}function L(s){let t,l,n,o,a={lang:s[0],contentdirection:s[1],bonus:s[4],size:s[3],radius:s[7]};return n=new z.WheelSVG({props:a}),s[17](n),n.$on("spinning",s[18]),n.$on("spinning-request",s[19]),n.$on("success",s[20]),{c(){t=e.element("div"),l=e.element("div"),e.create_component(n.$$.fragment),e.attr(l,"class","WheelWrapper svelte-12d9sfg"),e.attr(t,"class","MainSection svelte-12d9sfg")},m(r,c){e.insert(r,t,c),e.append(t,l),e.mount_component(n,l,null),o=!0},p(r,c){const u={};c&1&&(u.lang=r[0]),c&2&&(u.contentdirection=r[1]),c&16&&(u.bonus=r[4]),c&8&&(u.size=r[3]),c&128&&(u.radius=r[7]),n.$set(u)},i(r){o||(e.transition_in(n.$$.fragment,r),o=!0)},o(r){e.transition_out(n.$$.fragment,r),o=!1},d(r){r&&e.detach(t),s[17](null),e.destroy_component(n)}}}function U(s){let t,l,n=s[4]&&L(s);return{c(){t=e.element("div"),n&&n.c(),e.attr(t,"class","PrizeLuckywheelContainer svelte-12d9sfg"),e.toggle_class(t,"Mobile",s[8])},m(o,a){e.insert(o,t,a),n&&n.m(t,null),s[21](t),l=!0},p(o,[a]){o[4]?n?(n.p(o,a),a&16&&e.transition_in(n,1)):(n=L(o),n.c(),e.transition_in(n,1),n.m(t,null)):n&&(e.group_outros(),e.transition_out(n,1,1,()=>{n=null}),e.check_outros())},i(o){l||(e.transition_in(n),l=!0)},o(o){e.transition_out(n),l=!1},d(o){o&&e.detach(t),n&&n.d(),s[21](null)}}}let V=null;function x(s,t,l){let n,o,a,{data:r=null}=t,{lang:c="en"}=t,{clientstyling:u=""}=t,{clientstylingurl:y=""}=t,{translationurl:_=""}=t,{mbsource:b=""}=t,{size:S=324}=t,{mobilesize:w=240}=t,{contentdirection:M="anticlockwise"}=t,k=null,f;const P=e.isMobile(window.navigator.userAgent);let g,m=!1;z.setLocaleWhenInit();const C=()=>{fetch(_).then(d=>d.json()).then(d=>{Object.keys(d).forEach(h=>{z.addNewMessages(h,d[h])})})},E=i=>{g&&g.setDrawResult(i)},G=()=>{m||(l(6,m=!0),g&&g.eventSpin())};e.onMount(()=>{const i=d=>{const{type:h,data:p}=d.data;h==="PrizeGameResult"?E(p):h==="PrizeResultClose"?(l(6,m=!1),g&&g.closeMessage()):h==="PrizeGameStartAnimation"&&G()};return window.addEventListener("message",i),()=>{window.removeEventListener("message",i)}});function W(i){e.binding_callbacks[i?"unshift":"push"](()=>{g=i,l(5,g)})}const q=()=>l(6,m=!0),R=()=>window.postMessage({type:"PrizeGameRequestDraw"},"*"),j=()=>window.postMessage({type:"PrizeGameSpinEnd"},"*");function D(i){e.binding_callbacks[i?"unshift":"push"](()=>{f=i,l(2,f)})}return s.$$set=i=>{"data"in i&&l(9,r=i.data),"lang"in i&&l(0,c=i.lang),"clientstyling"in i&&l(10,u=i.clientstyling),"clientstylingurl"in i&&l(11,y=i.clientstylingurl),"translationurl"in i&&l(12,_=i.translationurl),"mbsource"in i&&l(13,b=i.mbsource),"size"in i&&l(14,S=i.size),"mobilesize"in i&&l(15,w=i.mobilesize),"contentdirection"in i&&l(1,M=i.contentdirection)},s.$$.update=()=>{if(s.$$.dirty&512)if(typeof r=="string")try{l(4,k=JSON.parse(r))}catch(i){console.error("[Luckywheel] Parse failed",i)}else l(4,k=r);s.$$.dirty&1&&c&&z.setLocale(c),s.$$.dirty&4096&&_&&C(),s.$$.dirty&1028&&u&&f&&e.setClientStyling(f,u),s.$$.dirty&2052&&y&&f&&e.setClientStylingURL(f,y),s.$$.dirty&8196&&b&&f&&e.setStreamStyling(f,`${b}.Style`,V),s.$$.dirty&49152&&l(16,n=P&&w?w:S),s.$$.dirty&65536&&l(3,o=n/.6875),s.$$.dirty&8&&l(7,a=.62*o/2)},[c,M,f,o,k,g,m,a,P,r,u,y,_,b,S,w,n,W,q,R,j,D]}class v extends e.SvelteComponent{constructor(t){super(),e.init(this,t,x,U,e.safe_not_equal,{data:9,lang:0,clientstyling:10,clientstylingurl:11,translationurl:12,mbsource:13,size:14,mobilesize:15,contentdirection:1},O)}get data(){return this.$$.ctx[9]}set data(t){this.$$set({data:t}),e.flush()}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),e.flush()}get clientstyling(){return this.$$.ctx[10]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[11]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[12]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get mbsource(){return this.$$.ctx[13]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get size(){return this.$$.ctx[14]}set size(t){this.$$set({size:t}),e.flush()}get mobilesize(){return this.$$.ctx[15]}set mobilesize(t){this.$$set({mobilesize:t}),e.flush()}get contentdirection(){return this.$$.ctx[1]}set contentdirection(t){this.$$set({contentdirection:t}),e.flush()}}customElements.define("prize-engine-luckywheel",e.create_custom_element(v,{data:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},mbsource:{},size:{},mobilesize:{},contentdirection:{}},[],[],!0));exports.default=v;
|