@everymatrix/casino-mystery-chest-modal 0.1.0

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.
@@ -0,0 +1,540 @@
1
+ var ut = Object.defineProperty, ft = Object.defineProperties;
2
+ var $t = Object.getOwnPropertyDescriptors;
3
+ var Z = Object.getOwnPropertySymbols;
4
+ var ht = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
5
+ var q = (e, t, n) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, tt = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ ht.call(t, n) && q(e, n, t[n]);
8
+ if (Z)
9
+ for (var n of Z(t))
10
+ _t.call(t, n) && q(e, n, t[n]);
11
+ return e;
12
+ }, et = (e, t) => ft(e, $t(t));
13
+ var $ = (e, t, n) => (q(e, typeof t != "symbol" ? t + "" : t, n), n);
14
+ var nt = (e, t, n) => new Promise((i, s) => {
15
+ var o = (a) => {
16
+ try {
17
+ c(n.next(a));
18
+ } catch (l) {
19
+ s(l);
20
+ }
21
+ }, r = (a) => {
22
+ try {
23
+ c(n.throw(a));
24
+ } catch (l) {
25
+ s(l);
26
+ }
27
+ }, c = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(o, r);
28
+ c((n = n.apply(e, t)).next());
29
+ });
30
+ function A() {
31
+ }
32
+ function lt(e) {
33
+ return e();
34
+ }
35
+ function it() {
36
+ return /* @__PURE__ */ Object.create(null);
37
+ }
38
+ function V(e) {
39
+ e.forEach(lt);
40
+ }
41
+ function ct(e) {
42
+ return typeof e == "function";
43
+ }
44
+ function gt(e, t) {
45
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
+ }
47
+ let F;
48
+ function ot(e, t) {
49
+ return e === t ? !0 : (F || (F = document.createElement("a")), F.href = t, e === F.href);
50
+ }
51
+ function mt(e) {
52
+ return Object.keys(e).length === 0;
53
+ }
54
+ function d(e, t) {
55
+ e.appendChild(t);
56
+ }
57
+ function pt(e, t, n) {
58
+ const i = bt(e);
59
+ if (!i.getElementById(t)) {
60
+ const s = h("style");
61
+ s.id = t, s.textContent = n, wt(i, s);
62
+ }
63
+ }
64
+ function bt(e) {
65
+ if (!e)
66
+ return document;
67
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
68
+ return t && /** @type {ShadowRoot} */
69
+ t.host ? (
70
+ /** @type {ShadowRoot} */
71
+ t
72
+ ) : e.ownerDocument;
73
+ }
74
+ function wt(e, t) {
75
+ return d(
76
+ /** @type {Document} */
77
+ e.head || e,
78
+ t
79
+ ), t.sheet;
80
+ }
81
+ function at(e, t, n) {
82
+ e.insertBefore(t, n || null);
83
+ }
84
+ function U(e) {
85
+ e.parentNode && e.parentNode.removeChild(e);
86
+ }
87
+ function h(e) {
88
+ return document.createElement(e);
89
+ }
90
+ function E(e) {
91
+ return document.createTextNode(e);
92
+ }
93
+ function w() {
94
+ return E(" ");
95
+ }
96
+ function xt(e, t, n, i) {
97
+ return e.addEventListener(t, n, i), () => e.removeEventListener(t, n, i);
98
+ }
99
+ function u(e, t, n) {
100
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
101
+ }
102
+ function yt(e) {
103
+ return Array.from(e.childNodes);
104
+ }
105
+ function L(e, t) {
106
+ t = "" + t, e.data !== t && (e.data = /** @type {string} */
107
+ t);
108
+ }
109
+ function vt(e) {
110
+ const t = {};
111
+ return e.childNodes.forEach(
112
+ /** @param {Element} node */
113
+ (n) => {
114
+ t[n.slot || "default"] = !0;
115
+ }
116
+ ), t;
117
+ }
118
+ let X;
119
+ function z(e) {
120
+ X = e;
121
+ }
122
+ const y = [], st = [];
123
+ let v = [];
124
+ const rt = [], Ct = /* @__PURE__ */ Promise.resolve();
125
+ let T = !1;
126
+ function kt() {
127
+ T || (T = !0, Ct.then(S));
128
+ }
129
+ function J(e) {
130
+ v.push(e);
131
+ }
132
+ const H = /* @__PURE__ */ new Set();
133
+ let x = 0;
134
+ function S() {
135
+ if (x !== 0)
136
+ return;
137
+ const e = X;
138
+ do {
139
+ try {
140
+ for (; x < y.length; ) {
141
+ const t = y[x];
142
+ x++, z(t), Et(t.$$);
143
+ }
144
+ } catch (t) {
145
+ throw y.length = 0, x = 0, t;
146
+ }
147
+ for (z(null), y.length = 0, x = 0; st.length; )
148
+ st.pop()();
149
+ for (let t = 0; t < v.length; t += 1) {
150
+ const n = v[t];
151
+ H.has(n) || (H.add(n), n());
152
+ }
153
+ v.length = 0;
154
+ } while (y.length);
155
+ for (; rt.length; )
156
+ rt.pop()();
157
+ T = !1, H.clear(), z(e);
158
+ }
159
+ function Et(e) {
160
+ if (e.fragment !== null) {
161
+ e.update(), V(e.before_update);
162
+ const t = e.dirty;
163
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(J);
164
+ }
165
+ }
166
+ function zt(e) {
167
+ const t = [], n = [];
168
+ v.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : n.push(i)), n.forEach((i) => i()), v = t;
169
+ }
170
+ const At = /* @__PURE__ */ new Set();
171
+ function Ot(e, t) {
172
+ e && e.i && (At.delete(e), e.i(t));
173
+ }
174
+ function jt(e, t, n) {
175
+ const { fragment: i, after_update: s } = e.$$;
176
+ i && i.m(t, n), J(() => {
177
+ const o = e.$$.on_mount.map(lt).filter(ct);
178
+ e.$$.on_destroy ? e.$$.on_destroy.push(...o) : V(o), e.$$.on_mount = [];
179
+ }), s.forEach(J);
180
+ }
181
+ function Nt(e, t) {
182
+ const n = e.$$;
183
+ n.fragment !== null && (zt(n.after_update), V(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
184
+ }
185
+ function Ft(e, t) {
186
+ e.$$.dirty[0] === -1 && (y.push(e), kt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
187
+ }
188
+ function Lt(e, t, n, i, s, o, r = null, c = [-1]) {
189
+ const a = X;
190
+ z(e);
191
+ const l = e.$$ = {
192
+ fragment: null,
193
+ ctx: [],
194
+ // state
195
+ props: o,
196
+ update: A,
197
+ not_equal: s,
198
+ bound: it(),
199
+ // lifecycle
200
+ on_mount: [],
201
+ on_destroy: [],
202
+ on_disconnect: [],
203
+ before_update: [],
204
+ after_update: [],
205
+ context: new Map(t.context || (a ? a.$$.context : [])),
206
+ // everything else
207
+ callbacks: it(),
208
+ dirty: c,
209
+ skip_bound: !1,
210
+ root: t.target || a.$$.root
211
+ };
212
+ r && r(l.root);
213
+ let m = !1;
214
+ if (l.ctx = n ? n(e, t.props || {}, (f, C, ..._) => {
215
+ const b = _.length ? _[0] : C;
216
+ return l.ctx && s(l.ctx[f], l.ctx[f] = b) && (!l.skip_bound && l.bound[f] && l.bound[f](b), m && Ft(e, f)), C;
217
+ }) : [], l.update(), m = !0, V(l.before_update), l.fragment = i ? i(l.ctx) : !1, t.target) {
218
+ if (t.hydrate) {
219
+ const f = yt(t.target);
220
+ l.fragment && l.fragment.l(f), f.forEach(U);
221
+ } else
222
+ l.fragment && l.fragment.c();
223
+ t.intro && Ot(e.$$.fragment), jt(e, t.target, t.anchor), S();
224
+ }
225
+ z(a);
226
+ }
227
+ let dt;
228
+ typeof HTMLElement == "function" && (dt = class extends HTMLElement {
229
+ constructor(t, n, i) {
230
+ super();
231
+ /** The Svelte component constructor */
232
+ $(this, "$$ctor");
233
+ /** Slots */
234
+ $(this, "$$s");
235
+ /** The Svelte component instance */
236
+ $(this, "$$c");
237
+ /** Whether or not the custom element is connected */
238
+ $(this, "$$cn", !1);
239
+ /** Component props data */
240
+ $(this, "$$d", {});
241
+ /** `true` if currently in the process of reflecting component props back to attributes */
242
+ $(this, "$$r", !1);
243
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
244
+ $(this, "$$p_d", {});
245
+ /** @type {Record<string, Function[]>} Event listeners */
246
+ $(this, "$$l", {});
247
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
248
+ $(this, "$$l_u", /* @__PURE__ */ new Map());
249
+ this.$$ctor = t, this.$$s = n, i && this.attachShadow({ mode: "open" });
250
+ }
251
+ addEventListener(t, n, i) {
252
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
253
+ const s = this.$$c.$on(t, n);
254
+ this.$$l_u.set(n, s);
255
+ }
256
+ super.addEventListener(t, n, i);
257
+ }
258
+ removeEventListener(t, n, i) {
259
+ if (super.removeEventListener(t, n, i), this.$$c) {
260
+ const s = this.$$l_u.get(n);
261
+ s && (s(), this.$$l_u.delete(n));
262
+ }
263
+ }
264
+ connectedCallback() {
265
+ return nt(this, null, function* () {
266
+ if (this.$$cn = !0, !this.$$c) {
267
+ let t = function(o) {
268
+ return () => {
269
+ let r;
270
+ return {
271
+ c: function() {
272
+ r = h("slot"), o !== "default" && u(r, "name", o);
273
+ },
274
+ /**
275
+ * @param {HTMLElement} target
276
+ * @param {HTMLElement} [anchor]
277
+ */
278
+ m: function(l, m) {
279
+ at(l, r, m);
280
+ },
281
+ d: function(l) {
282
+ l && U(r);
283
+ }
284
+ };
285
+ };
286
+ };
287
+ if (yield Promise.resolve(), !this.$$cn || this.$$c)
288
+ return;
289
+ const n = {}, i = vt(this);
290
+ for (const o of this.$$s)
291
+ o in i && (n[o] = [t(o)]);
292
+ for (const o of this.attributes) {
293
+ const r = this.$$g_p(o.name);
294
+ r in this.$$d || (this.$$d[r] = B(r, o.value, this.$$p_d, "toProp"));
295
+ }
296
+ for (const o in this.$$p_d)
297
+ !(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
298
+ this.$$c = new this.$$ctor({
299
+ target: this.shadowRoot || this,
300
+ props: et(tt({}, this.$$d), {
301
+ $$slots: n,
302
+ $$scope: {
303
+ ctx: []
304
+ }
305
+ })
306
+ });
307
+ const s = () => {
308
+ this.$$r = !0;
309
+ for (const o in this.$$p_d)
310
+ if (this.$$d[o] = this.$$c.$$.ctx[this.$$c.$$.props[o]], this.$$p_d[o].reflect) {
311
+ const r = B(
312
+ o,
313
+ this.$$d[o],
314
+ this.$$p_d,
315
+ "toAttribute"
316
+ );
317
+ r == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, r);
318
+ }
319
+ this.$$r = !1;
320
+ };
321
+ this.$$c.$$.after_update.push(s), s();
322
+ for (const o in this.$$l)
323
+ for (const r of this.$$l[o]) {
324
+ const c = this.$$c.$on(o, r);
325
+ this.$$l_u.set(r, c);
326
+ }
327
+ this.$$l = {};
328
+ }
329
+ });
330
+ }
331
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
332
+ // and setting attributes through setAttribute etc, this is helpful
333
+ attributeChangedCallback(t, n, i) {
334
+ var s;
335
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = B(t, i, this.$$p_d, "toProp"), (s = this.$$c) == null || s.$set({ [t]: this.$$d[t] }));
336
+ }
337
+ disconnectedCallback() {
338
+ this.$$cn = !1, Promise.resolve().then(() => {
339
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
340
+ });
341
+ }
342
+ $$g_p(t) {
343
+ return Object.keys(this.$$p_d).find(
344
+ (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
345
+ ) || t;
346
+ }
347
+ });
348
+ function B(e, t, n, i) {
349
+ var o;
350
+ const s = (o = n[e]) == null ? void 0 : o.type;
351
+ if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !n[e])
352
+ return t;
353
+ if (i === "toAttribute")
354
+ switch (s) {
355
+ case "Object":
356
+ case "Array":
357
+ return t == null ? null : JSON.stringify(t);
358
+ case "Boolean":
359
+ return t ? "" : null;
360
+ case "Number":
361
+ return t == null ? null : t;
362
+ default:
363
+ return t;
364
+ }
365
+ else
366
+ switch (s) {
367
+ case "Object":
368
+ case "Array":
369
+ return t && JSON.parse(t);
370
+ case "Boolean":
371
+ return t;
372
+ case "Number":
373
+ return t != null ? +t : t;
374
+ default:
375
+ return t;
376
+ }
377
+ }
378
+ function Bt(e, t, n, i, s, o) {
379
+ let r = class extends dt {
380
+ constructor() {
381
+ super(e, n, s), this.$$p_d = t;
382
+ }
383
+ static get observedAttributes() {
384
+ return Object.keys(t).map(
385
+ (c) => (t[c].attribute || c).toLowerCase()
386
+ );
387
+ }
388
+ };
389
+ return Object.keys(t).forEach((c) => {
390
+ Object.defineProperty(r.prototype, c, {
391
+ get() {
392
+ return this.$$c && c in this.$$c ? this.$$c[c] : this.$$d[c];
393
+ },
394
+ set(a) {
395
+ var l;
396
+ a = B(c, a, t), this.$$d[c] = a, (l = this.$$c) == null || l.$set({ [c]: a });
397
+ }
398
+ });
399
+ }), i.forEach((c) => {
400
+ Object.defineProperty(r.prototype, c, {
401
+ get() {
402
+ var a;
403
+ return (a = this.$$c) == null ? void 0 : a[c];
404
+ }
405
+ });
406
+ }), e.element = /** @type {any} */
407
+ r, r;
408
+ }
409
+ class St {
410
+ constructor() {
411
+ /**
412
+ * ### PRIVATE API
413
+ *
414
+ * Do not use, may change at any time
415
+ *
416
+ * @type {any}
417
+ */
418
+ $(this, "$$");
419
+ /**
420
+ * ### PRIVATE API
421
+ *
422
+ * Do not use, may change at any time
423
+ *
424
+ * @type {any}
425
+ */
426
+ $(this, "$$set");
427
+ }
428
+ /** @returns {void} */
429
+ $destroy() {
430
+ Nt(this, 1), this.$destroy = A;
431
+ }
432
+ /**
433
+ * @template {Extract<keyof Events, string>} K
434
+ * @param {K} type
435
+ * @param {((e: Events[K]) => void) | null | undefined} callback
436
+ * @returns {() => void}
437
+ */
438
+ $on(t, n) {
439
+ if (!ct(n))
440
+ return A;
441
+ const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
442
+ return i.push(n), () => {
443
+ const s = i.indexOf(n);
444
+ s !== -1 && i.splice(s, 1);
445
+ };
446
+ }
447
+ /**
448
+ * @param {Partial<Props>} props
449
+ * @returns {void}
450
+ */
451
+ $set(t) {
452
+ this.$$set && !mt(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
453
+ }
454
+ }
455
+ const Vt = "4";
456
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Vt);
457
+ const Mt = (e) => window.postMessage(e, window.location.href);
458
+ function Pt(e) {
459
+ pt(e, "svelte-wie2mq", ".dialog{position:fixed;left:50%;transform:translateX(-50%);z-index:300;background:var(--emw--color-gray-transparency-30, rgba(13, 27, 29, 0.9215686275));bottom:0;width:60%;height:90%;border-top-left-radius:72px;border-top-right-radius:72px;box-sizing:border-box;padding:40px 80px;align-content:center}.dialog__content{display:flex;flex-direction:column;align-items:center;gap:40px;text-align:center}.dialog__content__icon-container{position:relative}.dialog__content__icon{position:relative;width:127px;height:127px}.dialog__content__coin-glare{width:105px;height:105px;border-radius:40px;background:linear-gradient(317.36deg, #91CAFF 3.8%, #F3FFC2 100%);filter:blur(30px);position:absolute;z-index:0;top:50%;left:50%;right:0;transform:translate(-50%, -50%)}.dialog__content__title{margin:0;color:var(--emw--color-primary, #D3FFED);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--size-medium-2x-minus, 40px);line-height:46px}.dialog__content__message{margin:0;color:var(--emw--color-primary-variant, #A9CCBE);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-large, 20px);line-height:28px;max-width:295px}.dialog__content__btn{margin-top:60px;transition:300ms;cursor:pointer;width:280px;height:60px;top:32px;left:103px;padding:10px;border-radius:54px;border:none;background:linear-gradient(90deg, var(--emw--button-border-color, #75FFE9) 0%, var(--emw--button-border-color-secondary, #B2FF6D) 100%);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);line-height:18px;letter-spacing:0px;color:var(--emw--color-background-secondary, #0C1A1C);opacity:0;-webkit-animation:fadeIn 500ms ease 1s forwards;animation:fadeIn 500ms ease 1s forwards}.mobile{width:100%;height:100%;border-top-left-radius:28px;border-top-right-radius:28px;padding:20px 28px}.mobile .dialog__content{gap:22px}.mobile .dialog__content__icon{width:initial;height:initial}.mobile .dialog__content__coin-glare{height:65px;width:65px}.mobile .dialog__content__title{font-size:var(--emw--font-size-2x-large, 32px);line-height:36px}.mobile .dialog__content__message{font-size:var(--emw--font-size-medium, 16px);line-height:24px;max-width:240px}.mobile .dialog__content__btn{margin-top:78px;width:220px;font-size:var(--emw--font-size-medium, 16px);height:48px}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}");
460
+ }
461
+ function Dt(e) {
462
+ let t, n, i, s, o, r, c, a, l, m = (
463
+ /*dialogContent*/
464
+ e[0].title + ""
465
+ ), f, C, _, b = (
466
+ /*dialogContent*/
467
+ e[0].message + ""
468
+ ), M, G, K, Q, P, O = (
469
+ /*dialogContent*/
470
+ e[0].bold + ""
471
+ ), D, W, k, j = (
472
+ /*dialogContent*/
473
+ e[0].btn + ""
474
+ ), I, N, R, Y;
475
+ return {
476
+ c() {
477
+ t = h("div"), n = h("div"), i = h("div"), s = h("div"), o = w(), r = h("img"), a = w(), l = h("h2"), f = E(m), C = w(), _ = h("p"), M = E(b), G = w(), K = h("br"), Q = w(), P = h("b"), D = E(O), W = w(), k = h("button"), I = E(j), u(s, "class", "dialog__content__coin-glare"), u(r, "class", "dialog__content__icon"), ot(r.src, c = /*dialogContent*/
478
+ e[0].img) || u(r, "src", c), u(r, "alt", ""), u(i, "class", "dialog__content__icon-container"), u(l, "class", "dialog__content__title"), u(_, "class", "dialog__content__message"), u(k, "class", "dialog__content__btn"), u(n, "class", "dialog__content"), u(t, "class", N = "dialog " + /*mobileView*/
479
+ (e[1] ? "mobile" : ""));
480
+ },
481
+ m(g, p) {
482
+ at(g, t, p), d(t, n), d(n, i), d(i, s), d(i, o), d(i, r), d(n, a), d(n, l), d(l, f), d(n, C), d(n, _), d(_, M), d(_, G), d(_, K), d(_, Q), d(_, P), d(P, D), d(n, W), d(n, k), d(k, I), R || (Y = xt(
483
+ k,
484
+ "click",
485
+ /*hideDialog*/
486
+ e[2]
487
+ ), R = !0);
488
+ },
489
+ p(g, [p]) {
490
+ p & /*dialogContent*/
491
+ 1 && !ot(r.src, c = /*dialogContent*/
492
+ g[0].img) && u(r, "src", c), p & /*dialogContent*/
493
+ 1 && m !== (m = /*dialogContent*/
494
+ g[0].title + "") && L(f, m), p & /*dialogContent*/
495
+ 1 && b !== (b = /*dialogContent*/
496
+ g[0].message + "") && L(M, b), p & /*dialogContent*/
497
+ 1 && O !== (O = /*dialogContent*/
498
+ g[0].bold + "") && L(D, O), p & /*dialogContent*/
499
+ 1 && j !== (j = /*dialogContent*/
500
+ g[0].btn + "") && L(I, j), p & /*mobileView*/
501
+ 2 && N !== (N = "dialog " + /*mobileView*/
502
+ (g[1] ? "mobile" : "")) && u(t, "class", N);
503
+ },
504
+ i: A,
505
+ o: A,
506
+ d(g) {
507
+ g && U(t), R = !1, Y();
508
+ }
509
+ };
510
+ }
511
+ function It(e, t, n) {
512
+ let { dialogContent: i } = t, { mobileView: s = !1 } = t;
513
+ const o = () => {
514
+ Mt({ type: "HideDialog" });
515
+ };
516
+ return e.$$set = (r) => {
517
+ "dialogContent" in r && n(0, i = r.dialogContent), "mobileView" in r && n(1, s = r.mobileView);
518
+ }, [i, s, o];
519
+ }
520
+ class Rt extends St {
521
+ constructor(t) {
522
+ super(), Lt(this, t, It, Dt, gt, { dialogContent: 0, mobileView: 1 }, Pt);
523
+ }
524
+ get dialogContent() {
525
+ return this.$$.ctx[0];
526
+ }
527
+ set dialogContent(t) {
528
+ this.$$set({ dialogContent: t }), S();
529
+ }
530
+ get mobileView() {
531
+ return this.$$.ctx[1];
532
+ }
533
+ set mobileView(t) {
534
+ this.$$set({ mobileView: t }), S();
535
+ }
536
+ }
537
+ Bt(Rt, { dialogContent: {}, mobileView: { type: "Boolean" } }, [], [], !0);
538
+ export {
539
+ Rt as default
540
+ };
@@ -0,0 +1 @@
1
+ "use strict";var ft=Object.defineProperty,$t=Object.defineProperties;var ht=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var _t=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable;var T=(e,t,n)=>t in e?ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tt=(e,t)=>{for(var n in t||(t={}))_t.call(t,n)&&T(e,n,t[n]);if(Z)for(var n of Z(t))gt.call(t,n)&&T(e,n,t[n]);return e},et=(e,t)=>$t(e,ht(t));var $=(e,t,n)=>(T(e,typeof t!="symbol"?t+"":t,n),n);var nt=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{c(n.next(a))}catch(l){s(l)}},r=a=>{try{c(n.throw(a))}catch(l){s(l)}},c=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);c((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function O(){}function lt(e){return e()}function it(){return Object.create(null)}function M(e){e.forEach(lt)}function ct(e){return typeof e=="function"}function mt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let F;function ot(e,t){return e===t?!0:(F||(F=document.createElement("a")),F.href=t,e===F.href)}function pt(e){return Object.keys(e).length===0}function d(e,t){e.appendChild(t)}function bt(e,t,n){const i=wt(e);if(!i.getElementById(t)){const s=h("style");s.id=t,s.textContent=n,xt(i,s)}}function wt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function xt(e,t){return d(e.head||e,t),t.sheet}function at(e,t,n){e.insertBefore(t,n||null)}function U(e){e.parentNode&&e.parentNode.removeChild(e)}function h(e){return document.createElement(e)}function E(e){return document.createTextNode(e)}function w(){return E(" ")}function yt(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function u(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function vt(e){return Array.from(e.childNodes)}function L(e,t){t=""+t,e.data!==t&&(e.data=t)}function Ct(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let X;function z(e){X=e}const y=[],st=[];let v=[];const rt=[],kt=Promise.resolve();let H=!1;function Et(){H||(H=!0,kt.then(B))}function J(e){v.push(e)}const q=new Set;let x=0;function B(){if(x!==0)return;const e=X;do{try{for(;x<y.length;){const t=y[x];x++,z(t),zt(t.$$)}}catch(t){throw y.length=0,x=0,t}for(z(null),y.length=0,x=0;st.length;)st.pop()();for(let t=0;t<v.length;t+=1){const n=v[t];q.has(n)||(q.add(n),n())}v.length=0}while(y.length);for(;rt.length;)rt.pop()();H=!1,q.clear(),z(e)}function zt(e){if(e.fragment!==null){e.update(),M(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(J)}}function Ot(e){const t=[],n=[];v.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),v=t}const jt=new Set;function At(e,t){e&&e.i&&(jt.delete(e),e.i(t))}function Nt(e,t,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,n),J(()=>{const o=e.$$.on_mount.map(lt).filter(ct);e.$$.on_destroy?e.$$.on_destroy.push(...o):M(o),e.$$.on_mount=[]}),s.forEach(J)}function Ft(e,t){const n=e.$$;n.fragment!==null&&(Ot(n.after_update),M(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Lt(e,t){e.$$.dirty[0]===-1&&(y.push(e),Et(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function St(e,t,n,i,s,o,r=null,c=[-1]){const a=X;z(e);const l=e.$$={fragment:null,ctx:[],props:o,update:O,not_equal:s,bound:it(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:it(),dirty:c,skip_bound:!1,root:t.target||a.$$.root};r&&r(l.root);let m=!1;if(l.ctx=n?n(e,t.props||{},(f,C,..._)=>{const b=_.length?_[0]:C;return l.ctx&&s(l.ctx[f],l.ctx[f]=b)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](b),m&&Lt(e,f)),C}):[],l.update(),m=!0,M(l.before_update),l.fragment=i?i(l.ctx):!1,t.target){if(t.hydrate){const f=vt(t.target);l.fragment&&l.fragment.l(f),f.forEach(U)}else l.fragment&&l.fragment.c();t.intro&&At(e.$$.fragment),Nt(e,t.target,t.anchor),B()}z(a)}let dt;typeof HTMLElement=="function"&&(dt=class extends HTMLElement{constructor(t,n,i){super();$(this,"$$ctor");$(this,"$$s");$(this,"$$c");$(this,"$$cn",!1);$(this,"$$d",{});$(this,"$$r",!1);$(this,"$$p_d",{});$(this,"$$l",{});$(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const s=this.$$c.$on(t,n);this.$$l_u.set(n,s)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const s=this.$$l_u.get(n);s&&(s(),this.$$l_u.delete(n))}}connectedCallback(){return nt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let r;return{c:function(){r=h("slot"),o!=="default"&&u(r,"name",o)},m:function(l,m){at(l,r,m)},d:function(l){l&&U(r)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Ct(this);for(const o of this.$$s)o in i&&(n[o]=[t(o)]);for(const o of this.attributes){const r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=S(r,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:et(tt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const r=S(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const r of this.$$l[o]){const c=this.$$c.$on(o,r);this.$$l_u.set(r,c)}this.$$l={}}})}attributeChangedCallback(t,n,i){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=S(t,i,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function S(e,t,n,i){var o;const s=(o=n[e])==null?void 0:o.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Bt(e,t,n,i,s,o){let r=class extends dt{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(c=>(t[c].attribute||c).toLowerCase())}};return Object.keys(t).forEach(c=>{Object.defineProperty(r.prototype,c,{get(){return this.$$c&&c in this.$$c?this.$$c[c]:this.$$d[c]},set(a){var l;a=S(c,a,t),this.$$d[c]=a,(l=this.$$c)==null||l.$set({[c]:a})}})}),i.forEach(c=>{Object.defineProperty(r.prototype,c,{get(){var a;return(a=this.$$c)==null?void 0:a[c]}})}),e.element=r,r}class Mt{constructor(){$(this,"$$");$(this,"$$set")}$destroy(){Ft(this,1),this.$destroy=O}$on(t,n){if(!ct(n))return O;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!pt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Pt="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Pt);const Vt=e=>window.postMessage(e,window.location.href);function Dt(e){bt(e,"svelte-wie2mq",".dialog{position:fixed;left:50%;transform:translateX(-50%);z-index:300;background:var(--emw--color-gray-transparency-30, rgba(13, 27, 29, 0.9215686275));bottom:0;width:60%;height:90%;border-top-left-radius:72px;border-top-right-radius:72px;box-sizing:border-box;padding:40px 80px;align-content:center}.dialog__content{display:flex;flex-direction:column;align-items:center;gap:40px;text-align:center}.dialog__content__icon-container{position:relative}.dialog__content__icon{position:relative;width:127px;height:127px}.dialog__content__coin-glare{width:105px;height:105px;border-radius:40px;background:linear-gradient(317.36deg, #91CAFF 3.8%, #F3FFC2 100%);filter:blur(30px);position:absolute;z-index:0;top:50%;left:50%;right:0;transform:translate(-50%, -50%)}.dialog__content__title{margin:0;color:var(--emw--color-primary, #D3FFED);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--size-medium-2x-minus, 40px);line-height:46px}.dialog__content__message{margin:0;color:var(--emw--color-primary-variant, #A9CCBE);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-large, 20px);line-height:28px;max-width:295px}.dialog__content__btn{margin-top:60px;transition:300ms;cursor:pointer;width:280px;height:60px;top:32px;left:103px;padding:10px;border-radius:54px;border:none;background:linear-gradient(90deg, var(--emw--button-border-color, #75FFE9) 0%, var(--emw--button-border-color-secondary, #B2FF6D) 100%);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);line-height:18px;letter-spacing:0px;color:var(--emw--color-background-secondary, #0C1A1C);opacity:0;-webkit-animation:fadeIn 500ms ease 1s forwards;animation:fadeIn 500ms ease 1s forwards}.mobile{width:100%;height:100%;border-top-left-radius:28px;border-top-right-radius:28px;padding:20px 28px}.mobile .dialog__content{gap:22px}.mobile .dialog__content__icon{width:initial;height:initial}.mobile .dialog__content__coin-glare{height:65px;width:65px}.mobile .dialog__content__title{font-size:var(--emw--font-size-2x-large, 32px);line-height:36px}.mobile .dialog__content__message{font-size:var(--emw--font-size-medium, 16px);line-height:24px;max-width:240px}.mobile .dialog__content__btn{margin-top:78px;width:220px;font-size:var(--emw--font-size-medium, 16px);height:48px}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}")}function It(e){let t,n,i,s,o,r,c,a,l,m=e[0].title+"",f,C,_,b=e[0].message+"",P,G,K,Q,V,j=e[0].bold+"",D,W,k,A=e[0].btn+"",I,N,R,Y;return{c(){t=h("div"),n=h("div"),i=h("div"),s=h("div"),o=w(),r=h("img"),a=w(),l=h("h2"),f=E(m),C=w(),_=h("p"),P=E(b),G=w(),K=h("br"),Q=w(),V=h("b"),D=E(j),W=w(),k=h("button"),I=E(A),u(s,"class","dialog__content__coin-glare"),u(r,"class","dialog__content__icon"),ot(r.src,c=e[0].img)||u(r,"src",c),u(r,"alt",""),u(i,"class","dialog__content__icon-container"),u(l,"class","dialog__content__title"),u(_,"class","dialog__content__message"),u(k,"class","dialog__content__btn"),u(n,"class","dialog__content"),u(t,"class",N="dialog "+(e[1]?"mobile":""))},m(g,p){at(g,t,p),d(t,n),d(n,i),d(i,s),d(i,o),d(i,r),d(n,a),d(n,l),d(l,f),d(n,C),d(n,_),d(_,P),d(_,G),d(_,K),d(_,Q),d(_,V),d(V,D),d(n,W),d(n,k),d(k,I),R||(Y=yt(k,"click",e[2]),R=!0)},p(g,[p]){p&1&&!ot(r.src,c=g[0].img)&&u(r,"src",c),p&1&&m!==(m=g[0].title+"")&&L(f,m),p&1&&b!==(b=g[0].message+"")&&L(P,b),p&1&&j!==(j=g[0].bold+"")&&L(D,j),p&1&&A!==(A=g[0].btn+"")&&L(I,A),p&2&&N!==(N="dialog "+(g[1]?"mobile":""))&&u(t,"class",N)},i:O,o:O,d(g){g&&U(t),R=!1,Y()}}}function Rt(e,t,n){let{dialogContent:i}=t,{mobileView:s=!1}=t;const o=()=>{Vt({type:"HideDialog"})};return e.$$set=r=>{"dialogContent"in r&&n(0,i=r.dialogContent),"mobileView"in r&&n(1,s=r.mobileView)},[i,s,o]}class ut extends Mt{constructor(t){super(),St(this,t,Rt,It,mt,{dialogContent:0,mobileView:1},Dt)}get dialogContent(){return this.$$.ctx[0]}set dialogContent(t){this.$$set({dialogContent:t}),B()}get mobileView(){return this.$$.ctx[1]}set mobileView(t){this.$$set({mobileView:t}),B()}}Bt(ut,{dialogContent:{},mobileView:{type:"Boolean"}},[],[],!0);exports.default=ut;
@@ -0,0 +1 @@
1
+ "use strict";if(typeof window!="undefined"){let s=function(t){return function(...n){try{return t.apply(this,n)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("../components/CasinoMysteryChestModal-nxm9RCXt.cjs")).then(({default:t})=>{!customElements.get("casino-mystery-chest-modal")&&customElements.define("casino-mystery-chest-modal",t.element)})}
@@ -0,0 +1,16 @@
1
+ if (typeof window != "undefined") {
2
+ let n = function(t) {
3
+ return function(...s) {
4
+ try {
5
+ return t.apply(this, s);
6
+ } catch (e) {
7
+ if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
+ return !1;
9
+ throw e;
10
+ }
11
+ };
12
+ };
13
+ customElements.define = n(customElements.define), import("../components/CasinoMysteryChestModal-DNjHXiKx.js").then(({ default: t }) => {
14
+ !customElements.get("casino-mystery-chest-modal") && customElements.define("casino-mystery-chest-modal", t.element);
15
+ });
16
+ }
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@everymatrix/casino-mystery-chest-modal",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "es2015/casino-mystery-chest-modal.cjs",
6
+ "module": "es2015/casino-mystery-chest-modal.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./es2015/casino-mystery-chest-modal.js",
10
+ "require": "./es2015/casino-mystery-chest-modal.cjs"
11
+ },
12
+ "./es2015/casino-mystery-chest-modal.cjs": "./es2015/casino-mystery-chest-modal.cjs",
13
+ "./esnext/casino-mystery-chest-modal.cjs": "./esnext/casino-mystery-chest-modal.cjs"
14
+ },
15
+ "files": [
16
+ "components/",
17
+ "es2015/",
18
+ "stencil",
19
+ "angular",
20
+ "esnext/"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ }
25
+ }