@everymatrix/loyalty-shop 0.2.4 → 0.2.5
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/{LoyaltyPagination-B8amLojn.cjs → LoyaltyPagination-B7JqsoUi.cjs} +8 -8
- package/components/{LoyaltyPagination-B2XwqERr.cjs → LoyaltyPagination-BRav_RW5.cjs} +8 -8
- package/components/{LoyaltyPagination-DOu-qNFO.js → LoyaltyPagination-Cw2snZwZ.js} +10 -10
- package/components/{LoyaltyPagination-BqHc2i2H.js → LoyaltyPagination-CyjgdUPo.js} +10 -10
- package/components/LoyaltyPointsCard-CFk3DpjI.js +249 -0
- package/components/LoyaltyPointsCard-DTOQlcMH.js +242 -0
- package/components/LoyaltyPointsCard-Xb627em8.cjs +18 -0
- package/components/LoyaltyPointsCard-njx77PMq.cjs +18 -0
- package/components/LoyaltyShop-8d3N_F-0.cjs +27 -0
- package/components/LoyaltyShop-BKubFlFr.js +478 -0
- package/components/LoyaltyShop-D_Oyu_cp.cjs +27 -0
- package/components/LoyaltyShop-Dfybp9ut.js +452 -0
- package/components/{LoyaltyShopItem-DL7R43c_.js → LoyaltyShopItem-BXrrNl9f.js} +72 -72
- package/components/LoyaltyShopItem-CGOptttz.cjs +5 -0
- package/components/{LoyaltyShopItem-bzNnPlQa.js → LoyaltyShopItem-CqY63kaT.js} +103 -103
- package/components/LoyaltyShopItem-DEz9OVzD.cjs +5 -0
- package/es2015/loyalty-shop.cjs +1 -1
- package/es2015/loyalty-shop.js +2 -2
- package/esnext/loyalty-shop.cjs +1 -1
- package/esnext/loyalty-shop.js +2 -2
- package/package.json +1 -1
- package/components/LoyaltyPointsCard-BjF9SVWO.js +0 -249
- package/components/LoyaltyPointsCard-C2Xj_0zZ.cjs +0 -18
- package/components/LoyaltyPointsCard-DKq6yH_i.js +0 -242
- package/components/LoyaltyPointsCard-DO9GoE9Q.cjs +0 -18
- package/components/LoyaltyShop-CBH93UYT.js +0 -452
- package/components/LoyaltyShop-CCeVtHJ7.cjs +0 -27
- package/components/LoyaltyShop-CnX4zXMd.cjs +0 -27
- package/components/LoyaltyShop-aSar2Vkc.js +0 -478
- package/components/LoyaltyShopItem-BvxV4bEm.cjs +0 -5
- package/components/LoyaltyShopItem-CYoPPSZj.cjs +0 -5
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { c as O, p as P, a as ae, b as s, s as ne, d as oe, e as se, f as ie, g as le, i as z, h as f, j as C, D as T, k as i, l as re, m as o, u as k, n as E, o as S, q as A, r as F, t as M, v as R, w, x as de, $ as pe, y as ce } from "./LoyaltyPagination-Cw2snZwZ.js";
|
|
2
|
+
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
3
|
+
}, globalThis.customElements = { define() {
|
|
4
|
+
}, get() {
|
|
5
|
+
}, whenDefined() {
|
|
6
|
+
} });
|
|
7
|
+
const ue = {
|
|
8
|
+
en: {
|
|
9
|
+
tokens: "Tokens",
|
|
10
|
+
tokenBalance: "Token Balance",
|
|
11
|
+
requestRakeback: "Request Rakeback",
|
|
12
|
+
pointsToExpire: "{points} Tokens to expire on {date}"
|
|
13
|
+
},
|
|
14
|
+
tr: {
|
|
15
|
+
tokens: "Tokens",
|
|
16
|
+
tokenBalance: "Token Bakiyesi",
|
|
17
|
+
requestRakeback: "Rakeback Talebi",
|
|
18
|
+
pointsToExpire: "{date} tarihinde {points} Tokens sona erecek"
|
|
19
|
+
},
|
|
20
|
+
da: {
|
|
21
|
+
tokens: "Tokens",
|
|
22
|
+
tokenBalance: "Tokenbalance",
|
|
23
|
+
requestRakeback: "Anmod om Rakeback",
|
|
24
|
+
pointsToExpire: "{points} Tokens udløber den {date}"
|
|
25
|
+
},
|
|
26
|
+
de: {
|
|
27
|
+
tokens: "Token",
|
|
28
|
+
tokenBalance: "Token-Guthaben",
|
|
29
|
+
requestRakeback: "Rakeback anfordern",
|
|
30
|
+
pointsToExpire: "{points} Token verfallen am {date}"
|
|
31
|
+
},
|
|
32
|
+
nl: {
|
|
33
|
+
tokens: "Tokens",
|
|
34
|
+
tokenBalance: "Tokensaldo",
|
|
35
|
+
requestRakeback: "Rakeback aanvragen",
|
|
36
|
+
pointsToExpire: "{points} Tokens verlopen op {date}"
|
|
37
|
+
},
|
|
38
|
+
fr: {
|
|
39
|
+
tokens: "Jetons",
|
|
40
|
+
tokenBalance: "Solde de jetons",
|
|
41
|
+
requestRakeback: "Demander un Rakeback",
|
|
42
|
+
pointsToExpire: "{points} jetons expirent le {date}"
|
|
43
|
+
},
|
|
44
|
+
hu: {
|
|
45
|
+
tokens: "Tokenek",
|
|
46
|
+
tokenBalance: "Token egyenleg",
|
|
47
|
+
requestRakeback: "Rakeback igénylése",
|
|
48
|
+
pointsToExpire: "{points} token lejár ekkor: {date}"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var ke = w('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description"></span></div></div></div>'), ye = w('<span class="loyalty-points__expiry"> </span>'), ve = w('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__amount"> </span> <span class="loyalty-points__description"> </span> <!></div></div></div>');
|
|
52
|
+
const _e = {
|
|
53
|
+
hash: "svelte-1hsy08w",
|
|
54
|
+
code: `.loyalty-points {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton {display:block;border-radius:6px;background:linear-gradient(
|
|
55
|
+
90deg,
|
|
56
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
57
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
58
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
59
|
+
);background-size:200% 100%;
|
|
60
|
+
animation: shimmer 3s linear infinite;}.loyalty-points__skeleton--amount {width:120px;height:22px;}.loyalty-points__skeleton--description {width:90px;height:20px;}
|
|
61
|
+
|
|
62
|
+
@keyframes shimmer {
|
|
63
|
+
0% {
|
|
64
|
+
background-position: 200% 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
100% {
|
|
68
|
+
background-position: -200% 0;
|
|
69
|
+
}
|
|
70
|
+
}`
|
|
71
|
+
};
|
|
72
|
+
function N(_, a) {
|
|
73
|
+
P(a, !0), ae(_, _e);
|
|
74
|
+
const l = () => de(pe, "$_", y), [y, v] = re(), r = s(a, "apiEndpoint", 7, ""), d = s(a, "userSession", 7, ""), c = s(a, "locale", 7, ""), n = s(a, "dateFormat", 7, T), L = s(a, "onLevelLoaded", 7, (e) => {
|
|
75
|
+
});
|
|
76
|
+
ne({ withLocale: c(), translations: {} }), Object.entries(ue).forEach(([e, t]) => {
|
|
77
|
+
oe(e, t);
|
|
78
|
+
});
|
|
79
|
+
const D = se(() => ({
|
|
80
|
+
apiEndpoint: r(),
|
|
81
|
+
userSession: d(),
|
|
82
|
+
locale: c(),
|
|
83
|
+
loadLevels: !1,
|
|
84
|
+
onLevelLoaded: L()
|
|
85
|
+
})), h = k(() => D.spendableWalletTotal), I = k(() => {
|
|
86
|
+
var e, t;
|
|
87
|
+
return (t = (e = o(h)) == null ? void 0 : e.points) != null ? t : 0;
|
|
88
|
+
}), W = k(() => o(I).toLocaleString()), G = k(() => D.loading && o(h) === void 0), g = k(() => {
|
|
89
|
+
var e, t;
|
|
90
|
+
return [...(t = (e = o(h)) == null ? void 0 : e.aboutToExpire) != null ? t : []].filter((u) => u.points > 0).sort((u, b) => new Date(u.expireTime).getTime() - new Date(b.expireTime).getTime())[0];
|
|
91
|
+
}), J = k(() => o(g) ? ce(o(g).expireTime, n()) : "");
|
|
92
|
+
var K = {
|
|
93
|
+
get apiEndpoint() {
|
|
94
|
+
return r();
|
|
95
|
+
},
|
|
96
|
+
set apiEndpoint(e = "") {
|
|
97
|
+
r(e), i();
|
|
98
|
+
},
|
|
99
|
+
get userSession() {
|
|
100
|
+
return d();
|
|
101
|
+
},
|
|
102
|
+
set userSession(e = "") {
|
|
103
|
+
d(e), i();
|
|
104
|
+
},
|
|
105
|
+
get locale() {
|
|
106
|
+
return c();
|
|
107
|
+
},
|
|
108
|
+
set locale(e = "") {
|
|
109
|
+
c(e), i();
|
|
110
|
+
},
|
|
111
|
+
get dateFormat() {
|
|
112
|
+
return n();
|
|
113
|
+
},
|
|
114
|
+
set dateFormat(e = T) {
|
|
115
|
+
n(e), i();
|
|
116
|
+
},
|
|
117
|
+
get onLevelLoaded() {
|
|
118
|
+
return L();
|
|
119
|
+
},
|
|
120
|
+
set onLevelLoaded(e = (t) => {
|
|
121
|
+
}) {
|
|
122
|
+
L(e), i();
|
|
123
|
+
}
|
|
124
|
+
}, B = ie(), Q = le(B);
|
|
125
|
+
{
|
|
126
|
+
var U = (e) => {
|
|
127
|
+
var t = ke();
|
|
128
|
+
f(e, t);
|
|
129
|
+
}, V = (e) => {
|
|
130
|
+
var t = ve(), u = E(t), b = E(u), q = E(b), Y = S(q), j = A(q, 2), Z = S(j, !0), $ = A(j, 2);
|
|
131
|
+
{
|
|
132
|
+
var ee = (p) => {
|
|
133
|
+
var m = ye(), x = S(m, !0);
|
|
134
|
+
M((te) => R(x, te), [
|
|
135
|
+
() => l()("pointsToExpire", {
|
|
136
|
+
values: {
|
|
137
|
+
points: o(g).points.toLocaleString(),
|
|
138
|
+
date: o(J)
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
]), f(p, m);
|
|
142
|
+
};
|
|
143
|
+
z($, (p) => {
|
|
144
|
+
o(g) && p(ee);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
F(b), F(u), F(t), M(
|
|
148
|
+
(p, m) => {
|
|
149
|
+
var x;
|
|
150
|
+
R(Y, `${(x = o(W)) != null ? x : ""}
|
|
151
|
+
${p != null ? p : ""}`), R(Z, m);
|
|
152
|
+
},
|
|
153
|
+
[() => l()("tokens"), () => l()("tokenBalance")]
|
|
154
|
+
), f(e, t);
|
|
155
|
+
};
|
|
156
|
+
z(Q, (e) => {
|
|
157
|
+
o(G) ? e(U) : e(V, -1);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
f(_, B);
|
|
161
|
+
var X = C(K);
|
|
162
|
+
return v(), X;
|
|
163
|
+
}
|
|
164
|
+
O(
|
|
165
|
+
N,
|
|
166
|
+
{
|
|
167
|
+
apiEndpoint: {},
|
|
168
|
+
userSession: {},
|
|
169
|
+
locale: {},
|
|
170
|
+
dateFormat: {},
|
|
171
|
+
onLevelLoaded: {}
|
|
172
|
+
},
|
|
173
|
+
[],
|
|
174
|
+
[],
|
|
175
|
+
{ mode: "open" }
|
|
176
|
+
);
|
|
177
|
+
function H(_, a) {
|
|
178
|
+
P(a, !0);
|
|
179
|
+
let l = s(a, "apiEndpoint", 7, ""), y = s(a, "userSession", 7, ""), v = s(a, "locale", 7, ""), r = s(a, "dateFormat", 7, T), d = s(a, "onLevelLoaded");
|
|
180
|
+
var c = {
|
|
181
|
+
get apiEndpoint() {
|
|
182
|
+
return l();
|
|
183
|
+
},
|
|
184
|
+
set apiEndpoint(n = "") {
|
|
185
|
+
l(n), i();
|
|
186
|
+
},
|
|
187
|
+
get userSession() {
|
|
188
|
+
return y();
|
|
189
|
+
},
|
|
190
|
+
set userSession(n = "") {
|
|
191
|
+
y(n), i();
|
|
192
|
+
},
|
|
193
|
+
get locale() {
|
|
194
|
+
return v();
|
|
195
|
+
},
|
|
196
|
+
set locale(n = "") {
|
|
197
|
+
v(n), i();
|
|
198
|
+
},
|
|
199
|
+
get dateFormat() {
|
|
200
|
+
return r();
|
|
201
|
+
},
|
|
202
|
+
set dateFormat(n = T) {
|
|
203
|
+
r(n), i();
|
|
204
|
+
},
|
|
205
|
+
get onLevelLoaded() {
|
|
206
|
+
return d();
|
|
207
|
+
},
|
|
208
|
+
set onLevelLoaded(n) {
|
|
209
|
+
d(n), i();
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
return N(_, {
|
|
213
|
+
get apiEndpoint() {
|
|
214
|
+
return l();
|
|
215
|
+
},
|
|
216
|
+
get userSession() {
|
|
217
|
+
return y();
|
|
218
|
+
},
|
|
219
|
+
get locale() {
|
|
220
|
+
return v();
|
|
221
|
+
},
|
|
222
|
+
get dateFormat() {
|
|
223
|
+
return r();
|
|
224
|
+
},
|
|
225
|
+
get onLevelLoaded() {
|
|
226
|
+
return d();
|
|
227
|
+
}
|
|
228
|
+
}), C(c);
|
|
229
|
+
}
|
|
230
|
+
customElements.define("loyalty-points-card", O(
|
|
231
|
+
H,
|
|
232
|
+
{
|
|
233
|
+
apiEndpoint: {},
|
|
234
|
+
userSession: {},
|
|
235
|
+
locale: {},
|
|
236
|
+
dateFormat: {},
|
|
237
|
+
onLevelLoaded: {}
|
|
238
|
+
},
|
|
239
|
+
[],
|
|
240
|
+
[]
|
|
241
|
+
));
|
|
242
|
+
const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
243
|
+
__proto__: null,
|
|
244
|
+
default: H
|
|
245
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
246
|
+
export {
|
|
247
|
+
N as L,
|
|
248
|
+
be as a
|
|
249
|
+
};
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { c as M, p as O, a as ae, b as s, s as ne, d as oe, e as se, f as ie, g as le, i as j, h as b, j as P, D as m, k as i, l as re, m as n, u as c, n as T, o as L, q as z, r as h, t as A, v as E, w as S, x as de, $ as pe, y as ce } from "./LoyaltyPagination-CyjgdUPo.js";
|
|
2
|
+
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
|
+
}, globalThis.customElements = { define() {
|
|
4
|
+
}, get() {
|
|
5
|
+
}, whenDefined() {
|
|
6
|
+
} });
|
|
7
|
+
const ue = {
|
|
8
|
+
en: {
|
|
9
|
+
tokens: "Tokens",
|
|
10
|
+
tokenBalance: "Token Balance",
|
|
11
|
+
requestRakeback: "Request Rakeback",
|
|
12
|
+
pointsToExpire: "{points} Tokens to expire on {date}"
|
|
13
|
+
},
|
|
14
|
+
tr: {
|
|
15
|
+
tokens: "Tokens",
|
|
16
|
+
tokenBalance: "Token Bakiyesi",
|
|
17
|
+
requestRakeback: "Rakeback Talebi",
|
|
18
|
+
pointsToExpire: "{date} tarihinde {points} Tokens sona erecek"
|
|
19
|
+
},
|
|
20
|
+
da: {
|
|
21
|
+
tokens: "Tokens",
|
|
22
|
+
tokenBalance: "Tokenbalance",
|
|
23
|
+
requestRakeback: "Anmod om Rakeback",
|
|
24
|
+
pointsToExpire: "{points} Tokens udløber den {date}"
|
|
25
|
+
},
|
|
26
|
+
de: {
|
|
27
|
+
tokens: "Token",
|
|
28
|
+
tokenBalance: "Token-Guthaben",
|
|
29
|
+
requestRakeback: "Rakeback anfordern",
|
|
30
|
+
pointsToExpire: "{points} Token verfallen am {date}"
|
|
31
|
+
},
|
|
32
|
+
nl: {
|
|
33
|
+
tokens: "Tokens",
|
|
34
|
+
tokenBalance: "Tokensaldo",
|
|
35
|
+
requestRakeback: "Rakeback aanvragen",
|
|
36
|
+
pointsToExpire: "{points} Tokens verlopen op {date}"
|
|
37
|
+
},
|
|
38
|
+
fr: {
|
|
39
|
+
tokens: "Jetons",
|
|
40
|
+
tokenBalance: "Solde de jetons",
|
|
41
|
+
requestRakeback: "Demander un Rakeback",
|
|
42
|
+
pointsToExpire: "{points} jetons expirent le {date}"
|
|
43
|
+
},
|
|
44
|
+
hu: {
|
|
45
|
+
tokens: "Tokenek",
|
|
46
|
+
tokenBalance: "Token egyenleg",
|
|
47
|
+
requestRakeback: "Rakeback igénylése",
|
|
48
|
+
pointsToExpire: "{points} token lejár ekkor: {date}"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var ke = S('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description"></span></div></div></div>'), ye = S('<span class="loyalty-points__expiry"> </span>'), ve = S('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__amount"> </span> <span class="loyalty-points__description"> </span> <!></div></div></div>');
|
|
52
|
+
const _e = {
|
|
53
|
+
hash: "svelte-1hsy08w",
|
|
54
|
+
code: `.loyalty-points {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton {display:block;border-radius:6px;background:linear-gradient(
|
|
55
|
+
90deg,
|
|
56
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
57
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
58
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
59
|
+
);background-size:200% 100%;
|
|
60
|
+
animation: shimmer 3s linear infinite;}.loyalty-points__skeleton--amount {width:120px;height:22px;}.loyalty-points__skeleton--description {width:90px;height:20px;}
|
|
61
|
+
|
|
62
|
+
@keyframes shimmer {
|
|
63
|
+
0% {
|
|
64
|
+
background-position: 200% 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
100% {
|
|
68
|
+
background-position: -200% 0;
|
|
69
|
+
}
|
|
70
|
+
}`
|
|
71
|
+
};
|
|
72
|
+
function C(v, t) {
|
|
73
|
+
O(t, !0), ae(v, _e);
|
|
74
|
+
const l = () => de(pe, "$_", u), [u, k] = re(), r = s(t, "apiEndpoint", 7, ""), d = s(t, "userSession", 7, ""), p = s(t, "locale", 7, ""), a = s(t, "dateFormat", 7, m), x = s(t, "onLevelLoaded", 7, (e) => {
|
|
75
|
+
});
|
|
76
|
+
ne({ withLocale: p(), translations: {} }), Object.entries(ue).forEach(([e, o]) => {
|
|
77
|
+
oe(e, o);
|
|
78
|
+
});
|
|
79
|
+
const F = se(() => ({
|
|
80
|
+
apiEndpoint: r(),
|
|
81
|
+
userSession: d(),
|
|
82
|
+
locale: p(),
|
|
83
|
+
loadLevels: !1,
|
|
84
|
+
onLevelLoaded: x()
|
|
85
|
+
})), f = c(() => F.spendableWalletTotal), H = c(() => n(f)?.points ?? 0), I = c(() => n(H).toLocaleString()), W = c(() => F.loading && n(f) === void 0), _ = c(() => [...n(f)?.aboutToExpire ?? []].filter((e) => e.points > 0).sort((e, o) => new Date(e.expireTime).getTime() - new Date(o.expireTime).getTime())[0]), G = c(() => n(_) ? ce(n(_).expireTime, a()) : "");
|
|
86
|
+
var J = {
|
|
87
|
+
get apiEndpoint() {
|
|
88
|
+
return r();
|
|
89
|
+
},
|
|
90
|
+
set apiEndpoint(e = "") {
|
|
91
|
+
r(e), i();
|
|
92
|
+
},
|
|
93
|
+
get userSession() {
|
|
94
|
+
return d();
|
|
95
|
+
},
|
|
96
|
+
set userSession(e = "") {
|
|
97
|
+
d(e), i();
|
|
98
|
+
},
|
|
99
|
+
get locale() {
|
|
100
|
+
return p();
|
|
101
|
+
},
|
|
102
|
+
set locale(e = "") {
|
|
103
|
+
p(e), i();
|
|
104
|
+
},
|
|
105
|
+
get dateFormat() {
|
|
106
|
+
return a();
|
|
107
|
+
},
|
|
108
|
+
set dateFormat(e = m) {
|
|
109
|
+
a(e), i();
|
|
110
|
+
},
|
|
111
|
+
get onLevelLoaded() {
|
|
112
|
+
return x();
|
|
113
|
+
},
|
|
114
|
+
set onLevelLoaded(e = (o) => {
|
|
115
|
+
}) {
|
|
116
|
+
x(e), i();
|
|
117
|
+
}
|
|
118
|
+
}, R = ie(), K = le(R);
|
|
119
|
+
{
|
|
120
|
+
var Q = (e) => {
|
|
121
|
+
var o = ke();
|
|
122
|
+
b(e, o);
|
|
123
|
+
}, U = (e) => {
|
|
124
|
+
var o = ve(), w = T(o), D = T(w), B = T(D), X = L(B), q = z(B, 2), Y = L(q, !0), Z = z(q, 2);
|
|
125
|
+
{
|
|
126
|
+
var $ = (y) => {
|
|
127
|
+
var g = ye(), ee = L(g, !0);
|
|
128
|
+
A((te) => E(ee, te), [
|
|
129
|
+
() => l()("pointsToExpire", {
|
|
130
|
+
values: {
|
|
131
|
+
points: n(_).points.toLocaleString(),
|
|
132
|
+
date: n(G)
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
]), b(y, g);
|
|
136
|
+
};
|
|
137
|
+
j(Z, (y) => {
|
|
138
|
+
n(_) && y($);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
h(D), h(w), h(o), A(
|
|
142
|
+
(y, g) => {
|
|
143
|
+
E(X, `${n(I) ?? ""}
|
|
144
|
+
${y ?? ""}`), E(Y, g);
|
|
145
|
+
},
|
|
146
|
+
[() => l()("tokens"), () => l()("tokenBalance")]
|
|
147
|
+
), b(e, o);
|
|
148
|
+
};
|
|
149
|
+
j(K, (e) => {
|
|
150
|
+
n(W) ? e(Q) : e(U, -1);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
b(v, R);
|
|
154
|
+
var V = P(J);
|
|
155
|
+
return k(), V;
|
|
156
|
+
}
|
|
157
|
+
M(
|
|
158
|
+
C,
|
|
159
|
+
{
|
|
160
|
+
apiEndpoint: {},
|
|
161
|
+
userSession: {},
|
|
162
|
+
locale: {},
|
|
163
|
+
dateFormat: {},
|
|
164
|
+
onLevelLoaded: {}
|
|
165
|
+
},
|
|
166
|
+
[],
|
|
167
|
+
[],
|
|
168
|
+
{ mode: "open" }
|
|
169
|
+
);
|
|
170
|
+
function N(v, t) {
|
|
171
|
+
O(t, !0);
|
|
172
|
+
let l = s(t, "apiEndpoint", 7, ""), u = s(t, "userSession", 7, ""), k = s(t, "locale", 7, ""), r = s(t, "dateFormat", 7, m), d = s(t, "onLevelLoaded");
|
|
173
|
+
var p = {
|
|
174
|
+
get apiEndpoint() {
|
|
175
|
+
return l();
|
|
176
|
+
},
|
|
177
|
+
set apiEndpoint(a = "") {
|
|
178
|
+
l(a), i();
|
|
179
|
+
},
|
|
180
|
+
get userSession() {
|
|
181
|
+
return u();
|
|
182
|
+
},
|
|
183
|
+
set userSession(a = "") {
|
|
184
|
+
u(a), i();
|
|
185
|
+
},
|
|
186
|
+
get locale() {
|
|
187
|
+
return k();
|
|
188
|
+
},
|
|
189
|
+
set locale(a = "") {
|
|
190
|
+
k(a), i();
|
|
191
|
+
},
|
|
192
|
+
get dateFormat() {
|
|
193
|
+
return r();
|
|
194
|
+
},
|
|
195
|
+
set dateFormat(a = m) {
|
|
196
|
+
r(a), i();
|
|
197
|
+
},
|
|
198
|
+
get onLevelLoaded() {
|
|
199
|
+
return d();
|
|
200
|
+
},
|
|
201
|
+
set onLevelLoaded(a) {
|
|
202
|
+
d(a), i();
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
return C(v, {
|
|
206
|
+
get apiEndpoint() {
|
|
207
|
+
return l();
|
|
208
|
+
},
|
|
209
|
+
get userSession() {
|
|
210
|
+
return u();
|
|
211
|
+
},
|
|
212
|
+
get locale() {
|
|
213
|
+
return k();
|
|
214
|
+
},
|
|
215
|
+
get dateFormat() {
|
|
216
|
+
return r();
|
|
217
|
+
},
|
|
218
|
+
get onLevelLoaded() {
|
|
219
|
+
return d();
|
|
220
|
+
}
|
|
221
|
+
}), P(p);
|
|
222
|
+
}
|
|
223
|
+
customElements.define("loyalty-points-card", M(
|
|
224
|
+
N,
|
|
225
|
+
{
|
|
226
|
+
apiEndpoint: {},
|
|
227
|
+
userSession: {},
|
|
228
|
+
locale: {},
|
|
229
|
+
dateFormat: {},
|
|
230
|
+
onLevelLoaded: {}
|
|
231
|
+
},
|
|
232
|
+
[],
|
|
233
|
+
[]
|
|
234
|
+
));
|
|
235
|
+
const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
236
|
+
__proto__: null,
|
|
237
|
+
default: N
|
|
238
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
239
|
+
export {
|
|
240
|
+
C as L,
|
|
241
|
+
be as a
|
|
242
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-B7JqsoUi.cjs"),N={en:{tokens:"Tokens",tokenBalance:"Token Balance",requestRakeback:"Request Rakeback",pointsToExpire:"{points} Tokens to expire on {date}"},tr:{tokens:"Tokens",tokenBalance:"Token Bakiyesi",requestRakeback:"Rakeback Talebi",pointsToExpire:"{date} tarihinde {points} Tokens sona erecek"},da:{tokens:"Tokens",tokenBalance:"Tokenbalance",requestRakeback:"Anmod om Rakeback",pointsToExpire:"{points} Tokens udløber den {date}"},de:{tokens:"Token",tokenBalance:"Token-Guthaben",requestRakeback:"Rakeback anfordern",pointsToExpire:"{points} Token verfallen am {date}"},nl:{tokens:"Tokens",tokenBalance:"Tokensaldo",requestRakeback:"Rakeback aanvragen",pointsToExpire:"{points} Tokens verlopen op {date}"},fr:{tokens:"Jetons",tokenBalance:"Solde de jetons",requestRakeback:"Demander un Rakeback",pointsToExpire:"{points} jetons expirent le {date}"},hu:{tokens:"Tokenek",tokenBalance:"Token egyenleg",requestRakeback:"Rakeback igénylése",pointsToExpire:"{points} token lejár ekkor: {date}"}};var H=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description"></span></div></div></div>'),I=e.from_html('<span class="loyalty-points__expiry"> </span>'),W=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__amount"> </span> <span class="loyalty-points__description"> </span> <!></div></div></div>');const G={hash:"svelte-1hsy08w",code:`.loyalty-points {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton {display:block;border-radius:6px;background:linear-gradient(
|
|
2
|
+
90deg,
|
|
3
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
5
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
6
|
+
);background-size:200% 100%;
|
|
7
|
+
animation: shimmer 3s linear infinite;}.loyalty-points__skeleton--amount {width:120px;height:22px;}.loyalty-points__skeleton--description {width:90px;height:20px;}
|
|
8
|
+
|
|
9
|
+
@keyframes shimmer {
|
|
10
|
+
0% {
|
|
11
|
+
background-position: 200% 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
100% {
|
|
15
|
+
background-position: -200% 0;
|
|
16
|
+
}
|
|
17
|
+
}`};function v(u,n){e.push(n,!0),e.append_styles(u,G);const s=()=>e.store_get(e.$format,"$_",d),[d,p]=e.setup_stores(),i=e.prop(n,"apiEndpoint",7,""),l=e.prop(n,"userSession",7,""),r=e.prop(n,"locale",7,""),o=e.prop(n,"dateFormat",7,e.DATE_FORMATS),k=e.prop(n,"onLevelLoaded",7,t=>{});e.setupI18n({withLocale:r(),translations:{}}),Object.entries(N).forEach(([t,a])=>{e.addNewMessages(t,a)});const b=e.createElevateData(()=>({apiEndpoint:i(),userSession:l(),locale:r(),loadLevels:!1,onLevelLoaded:k()})),g=e.user_derived(()=>b.spendableWalletTotal),E=e.user_derived(()=>e.get(g)?.points??0),S=e.user_derived(()=>e.get(E).toLocaleString()),F=e.user_derived(()=>b.loading&&e.get(g)===void 0),_=e.user_derived(()=>[...e.get(g)?.aboutToExpire??[]].filter(t=>t.points>0).sort((t,a)=>new Date(t.expireTime).getTime()-new Date(a.expireTime).getTime())[0]),R=e.user_derived(()=>e.get(_)?e.formatDate(e.get(_).expireTime,o()):"");var w={get apiEndpoint(){return i()},set apiEndpoint(t=""){i(t),e.flushSync()},get userSession(){return l()},set userSession(t=""){l(t),e.flushSync()},get locale(){return r()},set locale(t=""){r(t),e.flushSync()},get dateFormat(){return o()},set dateFormat(t=e.DATE_FORMATS){o(t),e.flushSync()},get onLevelLoaded(){return k()},set onLevelLoaded(t=a=>{}){k(t),e.flushSync()}},m=e.comment(),D=e.first_child(m);{var A=t=>{var a=H();e.append(t,a)},B=t=>{var a=W(),f=e.child(a),x=e.child(f),T=e.child(x),M=e.only_child(T),h=e.sibling(T,2),O=e.only_child(h,!0),P=e.sibling(h,2);{var j=c=>{var y=I(),z=e.only_child(y,!0);e.template_effect(C=>e.set_text(z,C),[()=>s()("pointsToExpire",{values:{points:e.get(_).points.toLocaleString(),date:e.get(R)}})]),e.append(c,y)};e.if_block(P,c=>{e.get(_)&&c(j)})}e.reset(x),e.reset(f),e.reset(a),e.template_effect((c,y)=>{e.set_text(M,`${e.get(S)??""}
|
|
18
|
+
${c??""}`),e.set_text(O,y)},[()=>s()("tokens"),()=>s()("tokenBalance")]),e.append(t,a)};e.if_block(D,t=>{e.get(F)?t(A):t(B,-1)})}e.append(u,m);var q=e.pop(w);return p(),q}e.create_custom_element(v,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[],{mode:"open"});function L(u,n){e.push(n,!0);let s=e.prop(n,"apiEndpoint",7,""),d=e.prop(n,"userSession",7,""),p=e.prop(n,"locale",7,""),i=e.prop(n,"dateFormat",7,e.DATE_FORMATS),l=e.prop(n,"onLevelLoaded");var r={get apiEndpoint(){return s()},set apiEndpoint(o=""){s(o),e.flushSync()},get userSession(){return d()},set userSession(o=""){d(o),e.flushSync()},get locale(){return p()},set locale(o=""){p(o),e.flushSync()},get dateFormat(){return i()},set dateFormat(o=e.DATE_FORMATS){i(o),e.flushSync()},get onLevelLoaded(){return l()},set onLevelLoaded(o){l(o),e.flushSync()}};return v(u,{get apiEndpoint(){return s()},get userSession(){return d()},get locale(){return p()},get dateFormat(){return i()},get onLevelLoaded(){return l()}}),e.pop(r)}customElements.define("loyalty-points-card",e.create_custom_element(L,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[]));const J=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"}));exports.LoyaltyPointsCard=v;exports.LoyaltyPointsCard_ce=J;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-BRav_RW5.cjs"),N={en:{tokens:"Tokens",tokenBalance:"Token Balance",requestRakeback:"Request Rakeback",pointsToExpire:"{points} Tokens to expire on {date}"},tr:{tokens:"Tokens",tokenBalance:"Token Bakiyesi",requestRakeback:"Rakeback Talebi",pointsToExpire:"{date} tarihinde {points} Tokens sona erecek"},da:{tokens:"Tokens",tokenBalance:"Tokenbalance",requestRakeback:"Anmod om Rakeback",pointsToExpire:"{points} Tokens udløber den {date}"},de:{tokens:"Token",tokenBalance:"Token-Guthaben",requestRakeback:"Rakeback anfordern",pointsToExpire:"{points} Token verfallen am {date}"},nl:{tokens:"Tokens",tokenBalance:"Tokensaldo",requestRakeback:"Rakeback aanvragen",pointsToExpire:"{points} Tokens verlopen op {date}"},fr:{tokens:"Jetons",tokenBalance:"Solde de jetons",requestRakeback:"Demander un Rakeback",pointsToExpire:"{points} jetons expirent le {date}"},hu:{tokens:"Tokenek",tokenBalance:"Token egyenleg",requestRakeback:"Rakeback igénylése",pointsToExpire:"{points} token lejár ekkor: {date}"}};var H=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description"></span></div></div></div>'),I=e.from_html('<span class="loyalty-points__expiry"> </span>'),W=e.from_html('<div class="loyalty-points"><div class="loyalty-points__content"><div class="loyalty-points__value"><span class="loyalty-points__amount"> </span> <span class="loyalty-points__description"> </span> <!></div></div></div>');const G={hash:"svelte-1hsy08w",code:`.loyalty-points {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton {display:block;border-radius:6px;background:linear-gradient(
|
|
2
|
+
90deg,
|
|
3
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
5
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
6
|
+
);background-size:200% 100%;
|
|
7
|
+
animation: shimmer 3s linear infinite;}.loyalty-points__skeleton--amount {width:120px;height:22px;}.loyalty-points__skeleton--description {width:90px;height:20px;}
|
|
8
|
+
|
|
9
|
+
@keyframes shimmer {
|
|
10
|
+
0% {
|
|
11
|
+
background-position: 200% 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
100% {
|
|
15
|
+
background-position: -200% 0;
|
|
16
|
+
}
|
|
17
|
+
}`};function f(_,o){e.push(o,!0),e.append_styles(_,G);const s=()=>e.store_get(e.$format,"$_",c),[c,u]=e.setup_stores(),i=e.prop(o,"apiEndpoint",7,""),l=e.prop(o,"userSession",7,""),d=e.prop(o,"locale",7,""),a=e.prop(o,"dateFormat",7,e.DATE_FORMATS),b=e.prop(o,"onLevelLoaded",7,t=>{});e.setupI18n({withLocale:d(),translations:{}}),Object.entries(N).forEach(([t,n])=>{e.addNewMessages(t,n)});const x=e.createElevateData(()=>({apiEndpoint:i(),userSession:l(),locale:d(),loadLevels:!1,onLevelLoaded:b()})),m=e.user_derived(()=>x.spendableWalletTotal),S=e.user_derived(()=>{var t,n;return(n=(t=e.get(m))==null?void 0:t.points)!=null?n:0}),F=e.user_derived(()=>e.get(S).toLocaleString()),R=e.user_derived(()=>x.loading&&e.get(m)===void 0),y=e.user_derived(()=>{var t,n;return[...(n=(t=e.get(m))==null?void 0:t.aboutToExpire)!=null?n:[]].filter(p=>p.points>0).sort((p,k)=>new Date(p.expireTime).getTime()-new Date(k.expireTime).getTime())[0]}),w=e.user_derived(()=>e.get(y)?e.formatDate(e.get(y).expireTime,a()):"");var D={get apiEndpoint(){return i()},set apiEndpoint(t=""){i(t),e.flushSync()},get userSession(){return l()},set userSession(t=""){l(t),e.flushSync()},get locale(){return d()},set locale(t=""){d(t),e.flushSync()},get dateFormat(){return a()},set dateFormat(t=e.DATE_FORMATS){a(t),e.flushSync()},get onLevelLoaded(){return b()},set onLevelLoaded(t=n=>{}){b(t),e.flushSync()}},T=e.comment(),A=e.first_child(T);{var B=t=>{var n=H();e.append(t,n)},q=t=>{var n=W(),p=e.child(n),k=e.child(p),h=e.child(k),O=e.only_child(h),L=e.sibling(h,2),P=e.only_child(L,!0),j=e.sibling(L,2);{var z=r=>{var g=I(),v=e.only_child(g,!0);e.template_effect(C=>e.set_text(v,C),[()=>s()("pointsToExpire",{values:{points:e.get(y).points.toLocaleString(),date:e.get(w)}})]),e.append(r,g)};e.if_block(j,r=>{e.get(y)&&r(z)})}e.reset(k),e.reset(p),e.reset(n),e.template_effect((r,g)=>{var v;e.set_text(O,`${(v=e.get(F))!=null?v:""}
|
|
18
|
+
${r!=null?r:""}`),e.set_text(P,g)},[()=>s()("tokens"),()=>s()("tokenBalance")]),e.append(t,n)};e.if_block(A,t=>{e.get(R)?t(B):t(q,-1)})}e.append(_,T);var M=e.pop(D);return u(),M}e.create_custom_element(f,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[],{mode:"open"});function E(_,o){e.push(o,!0);let s=e.prop(o,"apiEndpoint",7,""),c=e.prop(o,"userSession",7,""),u=e.prop(o,"locale",7,""),i=e.prop(o,"dateFormat",7,e.DATE_FORMATS),l=e.prop(o,"onLevelLoaded");var d={get apiEndpoint(){return s()},set apiEndpoint(a=""){s(a),e.flushSync()},get userSession(){return c()},set userSession(a=""){c(a),e.flushSync()},get locale(){return u()},set locale(a=""){u(a),e.flushSync()},get dateFormat(){return i()},set dateFormat(a=e.DATE_FORMATS){i(a),e.flushSync()},get onLevelLoaded(){return l()},set onLevelLoaded(a){l(a),e.flushSync()}};return f(_,{get apiEndpoint(){return s()},get userSession(){return c()},get locale(){return u()},get dateFormat(){return i()},get onLevelLoaded(){return l()}}),e.pop(d)}customElements.define("loyalty-points-card",e.create_custom_element(E,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[]));const J=Object.freeze(Object.defineProperty({__proto__:null,default:E},Symbol.toStringTag,{value:"Module"}));exports.LoyaltyPointsCard=f;exports.LoyaltyPointsCard_ce=J;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-B7JqsoUi.cjs"),_e=require("./LoyaltyShopItem-CGOptttz.cjs");if(typeof window<"u"){let h=function(n){return function(...i){try{return n.apply(this,i)}catch(r){if(r instanceof DOMException&&r.message.includes("has already been used with this registry")||r instanceof Error&&r.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw r}}};customElements.define=h(customElements.define),Promise.resolve().then(()=>require("./LoyaltyPagination-B7JqsoUi.cjs")).then(n=>n.LoyaltyPagination_ce).then(n=>{const i=n.default||n;customElements.get("loyalty-pagination")||customElements.define("loyalty-pagination",i.element||i)}).catch(n=>{console.error("BOOT ERROR:",n)})}if(typeof window<"u"){let h=function(n){return function(...i){try{return n.apply(this,i)}catch(r){if(r instanceof DOMException&&r.message.includes("has already been used with this registry")||r instanceof Error&&r.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw r}}};customElements.define=h(customElements.define),Promise.resolve().then(()=>require("./LoyaltyShopItem-CGOptttz.cjs")).then(n=>n.LoyaltyShopItem_ce).then(n=>{const i=n.default||n;customElements.get("loyalty-shop-item")||customElements.define("loyalty-shop-item",i.element||i)}).catch(n=>{console.error("BOOT ERROR:",n)})}const be={en:{loading:"Loading…",noContent:"There are no bonus items available for redemption.",networkProblem:"Network problem. Please reload.",tokens:"Tokens",buyNow:"Buy Now",generalError:"Something went wrong... Please try again."},tr:{loading:"Yükleniyor…",noContent:"Kullanılabilir bonus öğesi bulunmamaktadır.",networkProblem:"Ağ sorunu. Lütfen yeniden yükleyin.",tokens:"Tokens",buyNow:"Satın Al",generalError:"Bir sorun oluştu, lütfen tekrar deneyin."},da:{loading:"Indlæser…",noContent:"Der er ingen bonusgenstande tilgængelige til indløsning.",networkProblem:"Netværksproblem. Genindlæs venligst siden.",tokens:"Tokens",buyNow:"Køb nu",generalError:"Noget gik galt. Prøv venligst igen."},de:{loading:"Wird geladen…",noContent:"Es sind keine Bonusartikel zum Einlösen verfügbar.",networkProblem:"Netzwerkproblem. Bitte lade die Seite neu.",tokens:"Token",buyNow:"Jetzt kaufen",generalError:"Etwas ist schiefgelaufen. Bitte versuche es erneut."},nl:{loading:"Laden…",noContent:"Er zijn geen bonusitems beschikbaar om in te wisselen.",networkProblem:"Netwerkprobleem. Laad de pagina opnieuw.",tokens:"Tokens",buyNow:"Nu kopen",generalError:"Er is iets misgegaan. Probeer het opnieuw."},fr:{loading:"Chargement…",noContent:"Aucun bonus n'est disponible pour être échangé.",networkProblem:"Problème de réseau. Veuillez recharger la page.",tokens:"Jetons",buyNow:"Acheter",generalError:"Une erreur s'est produite. Veuillez réessayer."},hu:{loading:"Betöltés…",noContent:"Nincsenek beváltható bónuszok.",networkProblem:"Hálózati probléma. Kérjük, töltsd újra az oldalt.",tokens:"Tokenek",buyNow:"Vásárlás",generalError:"Hiba történt. Kérjük, próbáld újra."}},ve="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='800px'%20height='800px'%20viewBox='0%200%20120%20120'%20fill='none'%3e%3crect%20width='120'%20height='120'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M33.2503%2038.4816C33.2603%2037.0472%2034.4199%2035.8864%2035.8543%2035.875H83.1463C84.5848%2035.875%2085.7503%2037.0431%2085.7503%2038.4816V80.5184C85.7403%2081.9528%2084.5807%2083.1136%2083.1463%2083.125H35.8543C34.4158%2083.1236%2033.2503%2081.957%2033.2503%2080.5184V38.4816ZM80.5006%2041.1251H38.5006V77.8751L62.8921%2053.4783C63.9172%2052.4536%2065.5788%2052.4536%2066.6039%2053.4783L80.5006%2067.4013V41.1251ZM43.75%2051.6249C43.75%2054.5244%2046.1005%2056.8749%2049%2056.8749C51.8995%2056.8749%2054.25%2054.5244%2054.25%2051.6249C54.25%2048.7254%2051.8995%2046.3749%2049%2046.3749C46.1005%2046.3749%2043.75%2048.7254%2043.75%2051.6249Z'%20fill='%23687787'/%3e%3c/svg%3e";var ke=e.from_html('<div class="loyalty-shop__item loyalty-shop__item--skeleton"><div class="loyalty-shop__item-image skeleton-box"></div> <div class="loyalty-shop__item-title skeleton-line"></div> <div class="loyalty-shop__item-points skeleton-line skeleton-line--short"></div> <div class="loyalty-shop__item-button-skeleton skeleton-box"></div></div>'),Ee=e.from_html('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton"></div>'),we=e.from_html('<div class="loyalty-shop__unavailable"> </div>'),xe=e.from_html('<div><div role="button" tabindex="0" class="loyalty-shop__item-image-container"><img class="loyalty-shop__item-image"/></div> <span class="loyalty-shop__item-title"> </span> <span class="loyalty-shop__item-points"> </span> <button class="loyalty-shop__item-button" type="button"> </button></div>'),Se=e.from_html('<div class="load-more-sentinel" aria-hidden="true"></div>'),Ie=e.from_html('<div class="loyalty-shop__grid"></div> <!> <!>',1),Le=e.from_html('<div class="loyalty-shop"><!></div>');const Te={hash:"svelte-1f1q033",code:`.loyalty-shop {padding:16px;border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));background-color:var(--app-container-bg-default, #022652);width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;}.loyalty-shop__unavailable {color:var(--text-subtle, #dfe3e8);font-size:14px;padding:24px 0;text-align:center;}.loyalty-shop__grid {display:grid;gap:16px;grid-template-columns:repeat(2, 1fr);margin:0;}.loyalty-shop__item {display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:10px;border:1px solid var(--border-default, rgba(251, 251, 251, 0.15));background-color:var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1));}.loyalty-shop__item--unavailable {opacity:1;}.loyalty-shop__item-image {width:100%;height:82px;border-radius:6px;}.loyalty-shop__item-title {color:var(--text-default, #ffffff);font-size:12px;font-weight:400;}.loyalty-shop__item-points {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-shop__item-button {margin-top:auto;width:100%;height:37px;padding:8px 16px;border:none;border-radius:6px;background:var(--button-primary-bg-default, #ffcc00);color:var(--button-primary-text-default, #261d00);font-size:12px;font-weight:400;cursor:pointer;}.loyalty-shop__item-button:disabled {opacity:0.4;cursor:default;}.loyalty-shop-container {display:flex;flex-direction:column;gap:12px;}.skeleton-box {background:linear-gradient(
|
|
2
|
+
90deg,
|
|
3
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
5
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
6
|
+
);background-size:200% 100%;
|
|
7
|
+
animation: shimmer 3s linear infinite;border-radius:6px;}.skeleton-line {height:14px;border-radius:6px;background:linear-gradient(
|
|
8
|
+
90deg,
|
|
9
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
10
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
11
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
12
|
+
);background-size:200% 100%;
|
|
13
|
+
animation: shimmer 3s linear infinite;}.skeleton-line--short {width:40%;}.loyalty-shop__item--skeleton {display:flex;flex-direction:column;}.loyalty-shop__item--skeleton .loyalty-shop__item-image {width:100%;height:82px;border-radius:6px;}.loyalty-shop__item--skeleton .loyalty-shop__item-title {width:90%;}.loyalty-shop__item--skeleton .loyalty-shop__item-points {width:40%;}.loyalty-shop__item-button-skeleton {margin-top:auto;width:100%;height:40px;border-radius:6px;}.loyalty-shop__item-image-container {cursor:pointer;}
|
|
14
|
+
|
|
15
|
+
@keyframes shimmer {
|
|
16
|
+
0% {
|
|
17
|
+
background-position: 200% 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
100% {
|
|
21
|
+
background-position: -200% 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (min-width: 768px) {.loyalty-shop__grid {grid-template-columns:repeat(4, 1fr);justify-content:start;margin:0;}.loyalty-shop__item {width:100%;height:100%;box-sizing:border-box;}.loyalty-shop__item-image {height:200px;}.loyalty-shop__item--skeleton .loyalty-shop__item-image {height:200px;}
|
|
26
|
+
}`};function z(h,n){e.push(n,!0),e.append_styles(h,Te);const i=()=>e.store_get(e.$format,"$_",r),[r,E]=e.setup_stores(),p=e.prop(n,"apiEndpoint",7,""),c=e.prop(n,"userSession",7,""),m=e.prop(n,"locale",7,""),s=e.prop(n,"limitItem",7,e.ITEMS_LIMIT_DEFAULT),x=e.prop(n,"translationUrl");e.setupI18n({withLocale:m(),translations:{}});const Y=async()=>{try{const t=new URL(x(),window.location.href),o=await fetch(t.href);if(!o.ok)throw new Error("Failed to fetch translations");const a=await o.json();Object.entries(a).forEach(([l,v])=>{e.addNewMessages(l,v)})}catch(t){console.error("loyalty shop translation url err:",t)}};Object.entries(be).forEach(([t,o])=>{e.addNewMessages(t,o)});let u=e.state(e.proxy([])),_=e.state(void 0),S=e.state(0),y=e.state(0),b=e.state(e.proxy(e.MOBILE_LOAD_ITEMS)),C=e.state(!1),R=e.state(!1),w=e.state(void 0),f=e.state(!1),I=e.state(void 0),L=0;const Z=e.user_derived(()=>typeof s()=="number"?s():parseInt(s(),e.ITEMS_LIMIT_DEFAULT)||e.ITEMS_LIMIT_DEFAULT),B=()=>{if(!p()||!c())return;e.set(C,!0),e.set(R,!1);const t=++L,o=e.get(f)&&e.get(y)>0;e.fetchShopRewards({apiEndpoint:p(),userSession:c(),locale:m()},e.get(y),e.get(b)).then(a=>{if(t!==L)return;const l=a.data??[];e.set(S,a.total??0,!0),o?e.set(u,[...e.get(u),...l],!0):e.set(u,l,!0)}).catch(a=>{t===L&&(e.set(R,!0),console.error("Failed to load shop rewards:",a))}).finally(()=>{t===L&&e.set(C,!1)})};e.user_effect(()=>{p(),c(),m(),e.get(y),e.get(b),B()}),e.user_effect(()=>{const t=window.matchMedia("(max-width: 767px)"),o=a=>{e.set(f,a.matches,!0)};return e.set(f,t.matches,!0),t.addEventListener("change",o),()=>t.removeEventListener("change",o)}),e.user_effect(()=>{e.set(b,e.get(f)?e.MOBILE_LOAD_ITEMS:e.get(Z),!0)}),e.user_effect(()=>{if(!e.get(f)||!e.get(I))return;const t=new IntersectionObserver(o=>{o.some(a=>a.isIntersecting)&&e.get(u).length<e.get(S)&&e.set(y,e.get(y)+e.get(b))},{rootMargin:"200px"});return t.observe(e.get(I)),()=>t.disconnect()}),e.user_pre_effect(()=>{x()&&Y()});const J=t=>t.presentation?.assets?.[0]??ve,N=t=>t.displayName??t.presentation?.displayName??"",O=t=>t.available==="true",W=t=>{e.get(w)||!O(t)||e.sendRedeemRewardRequested(N(t),t.id)},G=async t=>{if(!(!p()||e.get(w))){e.set(w,t,!0);try{await e.redeemReward({apiEndpoint:p(),userSession:c()},t),e.sendRedeemRewardSuccess(t),e.dispatchRedeemRewardButton(),B()}catch(o){e.sendRedeemRewardFailed(t,o)}finally{e.set(w,void 0)}}};e.user_effect(()=>{const t=o=>{const{type:a,id:l,source:v}=o.data??{};switch(a){case e.EVENT_TYPES.REDEEM_REWARD_CONFIRMED:if(e.get(_))break;l&&e.get(u).some(T=>T.id===l)&&G(l);break;case e.EVENT_TYPES.BACK_BUTTON_CLICKED:v===e.SOURCE&&e.set(_,void 0);break}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const Q=()=>e.get(u).length?i()("generalError"):i()("noContent"),X=t=>{e.set(y,t,!0)},$=t=>{e.sendRewardItemClicked(t.displayName||t.presentation.displayName,t.id)},j=t=>{e.set(_,t,!0),$(t)},ee=t=>o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),j(t))};var te={get apiEndpoint(){return p()},set apiEndpoint(t=""){p(t),e.flushSync()},get userSession(){return c()},set userSession(t=""){c(t),e.flushSync()},get locale(){return m()},set locale(t=""){m(t),e.flushSync()},get limitItem(){return s()},set limitItem(t=e.ITEMS_LIMIT_DEFAULT){s(t),e.flushSync()},get translationUrl(){return x()},set translationUrl(t){x(t),e.flushSync()}},P=Le(),ne=e.child(P);{var oe=t=>{_e.LoyaltyShopItem(t,{get itemId(){return e.get(_).id},get elevateReward(){return e.get(_)},get apiEndpoint(){return p()},get userSession(){return c()},get locale(){return m()}})},ae=t=>{var o=Ee();e.each(o,21,()=>Array(e.get(b)),e.index,(a,l,v,T)=>{var U=ke();e.append(a,U)}),e.reset(o),e.append(t,o)},ie=t=>{var o=we(),a=e.only_child(o,!0);e.template_effect(l=>e.set_text(a,l),[()=>Q()]),e.append(t,o)},re=t=>{var o=Ie(),a=e.first_child(o);e.each(a,21,()=>e.get(u),g=>g.id,(g,d)=>{var k=xe();let F;var M=e.child(k),le=e.user_derived(()=>ee(e.get(d))),q=e.only_child(M),V=e.sibling(M,2),de=e.only_child(V,!0),H=e.sibling(V,2),pe=e.only_child(H),D=e.sibling(H,2),ce=e.only_child(D,!0);e.reset(k),e.template_effect((A,ge,ue,me,he,ye,fe)=>{F=e.set_class(k,1,"loyalty-shop__item",null,F,{"loyalty-shop__item--unavailable":A}),e.set_attribute(q,"src",ge),e.set_attribute(q,"alt",ue),e.set_text(de,me),e.set_text(pe,`${e.get(d).points??""}
|
|
27
|
+
${he??""}`),D.disabled=ye,e.set_text(ce,fe)},[()=>!O(e.get(d)),()=>J(e.get(d)),()=>N(e.get(d)),()=>N(e.get(d)),()=>i()("tokens"),()=>!O(e.get(d))||e.get(w)===e.get(d).id,()=>i()("buyNow")]),e.delegated("click",M,()=>j(e.get(d))),e.delegated("keydown",M,function(...A){e.get(le)?.apply(this,A)}),e.delegated("click",D,()=>W(e.get(d))),e.append(g,k)}),e.reset(a);var l=e.sibling(a,2);{var v=g=>{e.LoyaltyPagination(g,{get offset(){return e.get(y)},get limit(){return e.get(b)},get total(){return e.get(S)},onPageChange:X,get locale(){return m()}})};e.if_block(l,g=>{e.get(f)||g(v)})}var T=e.sibling(l,2);{var U=g=>{var d=Se();e.bind_this(d,k=>e.set(I,k),()=>e.get(I)),e.append(g,d)};e.if_block(T,g=>{e.get(f)&&e.get(u).length<e.get(S)&&g(U)})}e.append(t,o)};e.if_block(ne,t=>{e.get(_)?t(oe):e.get(C)&&e.get(u).length===0?t(ae,1):!e.get(u).length||e.get(R)?t(ie,2):t(re,-1)})}e.reset(P),e.append(h,P);var se=e.pop(te);return E(),se}e.delegate(["click","keydown"]);e.create_custom_element(z,{apiEndpoint:{},userSession:{},locale:{},limitItem:{},translationUrl:{}},[],[],{mode:"open"});function K(h,n){e.push(n,!0);let i=e.prop(n,"apiEndpoint",7,""),r=e.prop(n,"userSession",7,""),E=e.prop(n,"locale",7,""),p=e.prop(n,"limitItem",7,e.ITEMS_LIMIT_DEFAULT),c=e.prop(n,"translationUrl");var m={get apiEndpoint(){return i()},set apiEndpoint(s=""){i(s),e.flushSync()},get userSession(){return r()},set userSession(s=""){r(s),e.flushSync()},get locale(){return E()},set locale(s=""){E(s),e.flushSync()},get limitItem(){return p()},set limitItem(s=e.ITEMS_LIMIT_DEFAULT){p(s),e.flushSync()},get translationUrl(){return c()},set translationUrl(s){c(s),e.flushSync()}};return z(h,{get apiEndpoint(){return i()},get userSession(){return r()},get locale(){return E()},get limitItem(){return p()},get translationUrl(){return c()}}),e.pop(m)}customElements.define("loyalty-shop",e.create_custom_element(K,{apiEndpoint:{},userSession:{},locale:{},limitItem:{},translationUrl:{}},[],[]));const Me=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"}));exports.LoyaltyShop=z;exports.LoyaltyShop_ce=Me;
|