@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,452 @@
|
|
|
1
|
+
import { z as qe, c as me, p as ge, a as Fe, b as y, s as Ze, d as oe, A as h, B as se, P as ie, E as T, m as t, F as r, C as Je, H as re, S as We, i as G, h as w, j as he, Q as R, R as Ye, u as le, I as Ge, J as Qe, K as Xe, L as $e, w as x, k as f, l as et, n as de, r as j, T as ue, U as tt, o as M, t as ce, v as V, g as nt, q as O, x as at, $ as ot, V as st, O as pe, M as Q, W as it, X as rt, N as lt, Y as dt } from "./LoyaltyPagination-CyjgdUPo.js";
|
|
2
|
+
import { L as ut } from "./LoyaltyShopItem-BXrrNl9f.js";
|
|
3
|
+
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
4
|
+
}, globalThis.customElements = { define() {
|
|
5
|
+
}, get() {
|
|
6
|
+
}, whenDefined() {
|
|
7
|
+
} });
|
|
8
|
+
if (typeof window < "u") {
|
|
9
|
+
let _ = function(n) {
|
|
10
|
+
return function(...s) {
|
|
11
|
+
try {
|
|
12
|
+
return n.apply(this, s);
|
|
13
|
+
} catch (i) {
|
|
14
|
+
if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i instanceof Error && i.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
15
|
+
return !1;
|
|
16
|
+
throw i;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
customElements.define = _(customElements.define), import("./LoyaltyPagination-CyjgdUPo.js").then((n) => n.Z).then((n) => {
|
|
21
|
+
const s = n.default || n;
|
|
22
|
+
customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", s.element || s);
|
|
23
|
+
}).catch((n) => {
|
|
24
|
+
console.error("BOOT ERROR:", n);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (typeof window < "u") {
|
|
28
|
+
let _ = function(n) {
|
|
29
|
+
return function(...s) {
|
|
30
|
+
try {
|
|
31
|
+
return n.apply(this, s);
|
|
32
|
+
} catch (i) {
|
|
33
|
+
if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i instanceof Error && i.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
34
|
+
return !1;
|
|
35
|
+
throw i;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
customElements.define = _(customElements.define), import("./LoyaltyShopItem-BXrrNl9f.js").then((n) => n.a).then((n) => {
|
|
40
|
+
const s = n.default || n;
|
|
41
|
+
customElements.get("loyalty-shop-item") || customElements.define("loyalty-shop-item", s.element || s);
|
|
42
|
+
}).catch((n) => {
|
|
43
|
+
console.error("BOOT ERROR:", n);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
const ct = {
|
|
47
|
+
en: {
|
|
48
|
+
loading: "Loading…",
|
|
49
|
+
noContent: "There are no bonus items available for redemption.",
|
|
50
|
+
networkProblem: "Network problem. Please reload.",
|
|
51
|
+
tokens: "Tokens",
|
|
52
|
+
buyNow: "Buy Now",
|
|
53
|
+
generalError: "Something went wrong... Please try again."
|
|
54
|
+
},
|
|
55
|
+
tr: {
|
|
56
|
+
loading: "Yükleniyor…",
|
|
57
|
+
noContent: "Kullanılabilir bonus öğesi bulunmamaktadır.",
|
|
58
|
+
networkProblem: "Ağ sorunu. Lütfen yeniden yükleyin.",
|
|
59
|
+
tokens: "Tokens",
|
|
60
|
+
buyNow: "Satın Al",
|
|
61
|
+
generalError: "Bir sorun oluştu, lütfen tekrar deneyin."
|
|
62
|
+
},
|
|
63
|
+
da: {
|
|
64
|
+
loading: "Indlæser…",
|
|
65
|
+
noContent: "Der er ingen bonusgenstande tilgængelige til indløsning.",
|
|
66
|
+
networkProblem: "Netværksproblem. Genindlæs venligst siden.",
|
|
67
|
+
tokens: "Tokens",
|
|
68
|
+
buyNow: "Køb nu",
|
|
69
|
+
generalError: "Noget gik galt. Prøv venligst igen."
|
|
70
|
+
},
|
|
71
|
+
de: {
|
|
72
|
+
loading: "Wird geladen…",
|
|
73
|
+
noContent: "Es sind keine Bonusartikel zum Einlösen verfügbar.",
|
|
74
|
+
networkProblem: "Netzwerkproblem. Bitte lade die Seite neu.",
|
|
75
|
+
tokens: "Token",
|
|
76
|
+
buyNow: "Jetzt kaufen",
|
|
77
|
+
generalError: "Etwas ist schiefgelaufen. Bitte versuche es erneut."
|
|
78
|
+
},
|
|
79
|
+
nl: {
|
|
80
|
+
loading: "Laden…",
|
|
81
|
+
noContent: "Er zijn geen bonusitems beschikbaar om in te wisselen.",
|
|
82
|
+
networkProblem: "Netwerkprobleem. Laad de pagina opnieuw.",
|
|
83
|
+
tokens: "Tokens",
|
|
84
|
+
buyNow: "Nu kopen",
|
|
85
|
+
generalError: "Er is iets misgegaan. Probeer het opnieuw."
|
|
86
|
+
},
|
|
87
|
+
fr: {
|
|
88
|
+
loading: "Chargement…",
|
|
89
|
+
noContent: "Aucun bonus n'est disponible pour être échangé.",
|
|
90
|
+
networkProblem: "Problème de réseau. Veuillez recharger la page.",
|
|
91
|
+
tokens: "Jetons",
|
|
92
|
+
buyNow: "Acheter",
|
|
93
|
+
generalError: "Une erreur s'est produite. Veuillez réessayer."
|
|
94
|
+
},
|
|
95
|
+
hu: {
|
|
96
|
+
loading: "Betöltés…",
|
|
97
|
+
noContent: "Nincsenek beváltható bónuszok.",
|
|
98
|
+
networkProblem: "Hálózati probléma. Kérjük, töltsd újra az oldalt.",
|
|
99
|
+
tokens: "Tokenek",
|
|
100
|
+
buyNow: "Vásárlás",
|
|
101
|
+
generalError: "Hiba történt. Kérjük, próbáld újra."
|
|
102
|
+
}
|
|
103
|
+
}, pt = "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";
|
|
104
|
+
var mt = x('<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>'), gt = x('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton"></div>'), ht = x('<div class="loyalty-shop__unavailable"> </div>'), yt = x('<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>'), ft = x('<div class="load-more-sentinel" aria-hidden="true"></div>'), bt = x('<div class="loyalty-shop__grid"></div> <!> <!>', 1), _t = x('<div class="loyalty-shop"><!></div>');
|
|
105
|
+
const vt = {
|
|
106
|
+
hash: "svelte-1f1q033",
|
|
107
|
+
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(
|
|
108
|
+
90deg,
|
|
109
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
110
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
111
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
112
|
+
);background-size:200% 100%;
|
|
113
|
+
animation: shimmer 3s linear infinite;border-radius:6px;}.skeleton-line {height:14px;border-radius:6px;background:linear-gradient(
|
|
114
|
+
90deg,
|
|
115
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
116
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
117
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
118
|
+
);background-size:200% 100%;
|
|
119
|
+
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;}
|
|
120
|
+
|
|
121
|
+
@keyframes shimmer {
|
|
122
|
+
0% {
|
|
123
|
+
background-position: 200% 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
100% {
|
|
127
|
+
background-position: -200% 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@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;}
|
|
132
|
+
}`
|
|
133
|
+
};
|
|
134
|
+
function ye(_, n) {
|
|
135
|
+
ge(n, !0), Fe(_, vt);
|
|
136
|
+
const s = () => at(ot, "$_", i), [i, L] = et(), c = y(n, "apiEndpoint", 7, ""), p = y(n, "userSession", 7, ""), b = y(n, "locale", 7, ""), l = y(n, "limitItem", 7, R), z = y(n, "translationUrl");
|
|
137
|
+
Ze({ withLocale: b(), translations: {} });
|
|
138
|
+
const be = async () => {
|
|
139
|
+
try {
|
|
140
|
+
const e = new URL(z(), window.location.href), a = await fetch(e.href);
|
|
141
|
+
if (!a.ok)
|
|
142
|
+
throw new Error("Failed to fetch translations");
|
|
143
|
+
const o = await a.json();
|
|
144
|
+
Object.entries(o).forEach(([d, I]) => {
|
|
145
|
+
oe(d, I);
|
|
146
|
+
});
|
|
147
|
+
} catch (e) {
|
|
148
|
+
console.error("loyalty shop translation url err:", e);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
Object.entries(ct).forEach(([e, a]) => {
|
|
152
|
+
oe(e, a);
|
|
153
|
+
});
|
|
154
|
+
let g = h(se([])), E = h(void 0), P = h(0), v = h(0), S = h(se(ie)), H = h(!1), K = h(!1), N = h(void 0), k = h(!1), U = h(void 0), B = 0;
|
|
155
|
+
const _e = le(() => typeof l() == "number" ? l() : parseInt(l(), R) || R), X = () => {
|
|
156
|
+
if (!c() || !p())
|
|
157
|
+
return;
|
|
158
|
+
r(H, !0), r(K, !1);
|
|
159
|
+
const e = ++B, a = t(k) && t(v) > 0;
|
|
160
|
+
Ye(
|
|
161
|
+
{
|
|
162
|
+
apiEndpoint: c(),
|
|
163
|
+
userSession: p(),
|
|
164
|
+
locale: b()
|
|
165
|
+
},
|
|
166
|
+
t(v),
|
|
167
|
+
t(S)
|
|
168
|
+
).then((o) => {
|
|
169
|
+
if (e !== B)
|
|
170
|
+
return;
|
|
171
|
+
const d = o.data ?? [];
|
|
172
|
+
r(P, o.total ?? 0, !0), a ? r(g, [...t(g), ...d], !0) : r(g, d, !0);
|
|
173
|
+
}).catch((o) => {
|
|
174
|
+
e === B && (r(K, !0), console.error("Failed to load shop rewards:", o));
|
|
175
|
+
}).finally(() => {
|
|
176
|
+
e === B && r(H, !1);
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
T(() => {
|
|
180
|
+
c(), p(), b(), t(v), t(S), X();
|
|
181
|
+
}), T(() => {
|
|
182
|
+
const e = window.matchMedia("(max-width: 767px)"), a = (o) => {
|
|
183
|
+
r(k, o.matches, !0);
|
|
184
|
+
};
|
|
185
|
+
return r(k, e.matches, !0), e.addEventListener("change", a), () => e.removeEventListener("change", a);
|
|
186
|
+
}), T(() => {
|
|
187
|
+
r(S, t(k) ? ie : t(_e), !0);
|
|
188
|
+
}), T(() => {
|
|
189
|
+
if (!t(k) || !t(U)) return;
|
|
190
|
+
const e = new IntersectionObserver(
|
|
191
|
+
(a) => {
|
|
192
|
+
a.some((o) => o.isIntersecting) && t(g).length < t(P) && r(v, t(v) + t(S));
|
|
193
|
+
},
|
|
194
|
+
{ rootMargin: "200px" }
|
|
195
|
+
);
|
|
196
|
+
return e.observe(t(U)), () => e.disconnect();
|
|
197
|
+
}), Je(() => {
|
|
198
|
+
z() && be();
|
|
199
|
+
});
|
|
200
|
+
const ve = (e) => e.presentation?.assets?.[0] ?? pt, q = (e) => e.displayName ?? e.presentation?.displayName ?? "", F = (e) => e.available === "true", ke = (e) => {
|
|
201
|
+
t(N) || !F(e) || lt(q(e), e.id);
|
|
202
|
+
}, we = async (e) => {
|
|
203
|
+
if (!(!c() || t(N))) {
|
|
204
|
+
r(N, e, !0);
|
|
205
|
+
try {
|
|
206
|
+
await Ge({ apiEndpoint: c(), userSession: p() }, e), Qe(e), Xe(), X();
|
|
207
|
+
} catch (a) {
|
|
208
|
+
$e(e, a);
|
|
209
|
+
} finally {
|
|
210
|
+
r(N, void 0);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
T(() => {
|
|
215
|
+
const e = (a) => {
|
|
216
|
+
const { type: o, id: d, source: I } = a.data ?? {};
|
|
217
|
+
switch (o) {
|
|
218
|
+
case re.REDEEM_REWARD_CONFIRMED:
|
|
219
|
+
if (t(E))
|
|
220
|
+
break;
|
|
221
|
+
d && t(g).some((A) => A.id === d) && we(d);
|
|
222
|
+
break;
|
|
223
|
+
case re.BACK_BUTTON_CLICKED:
|
|
224
|
+
I === We && r(E, void 0);
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
229
|
+
});
|
|
230
|
+
const xe = () => t(g).length ? s()("generalError") : s()("noContent"), Ee = (e) => {
|
|
231
|
+
r(v, e, !0);
|
|
232
|
+
}, Se = (e) => {
|
|
233
|
+
dt(e.displayName || e.presentation.displayName, e.id);
|
|
234
|
+
}, $ = (e) => {
|
|
235
|
+
r(E, e, !0), Se(e);
|
|
236
|
+
}, Ie = (e) => (a) => {
|
|
237
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), $(e));
|
|
238
|
+
};
|
|
239
|
+
var Ce = {
|
|
240
|
+
get apiEndpoint() {
|
|
241
|
+
return c();
|
|
242
|
+
},
|
|
243
|
+
set apiEndpoint(e = "") {
|
|
244
|
+
c(e), f();
|
|
245
|
+
},
|
|
246
|
+
get userSession() {
|
|
247
|
+
return p();
|
|
248
|
+
},
|
|
249
|
+
set userSession(e = "") {
|
|
250
|
+
p(e), f();
|
|
251
|
+
},
|
|
252
|
+
get locale() {
|
|
253
|
+
return b();
|
|
254
|
+
},
|
|
255
|
+
set locale(e = "") {
|
|
256
|
+
b(e), f();
|
|
257
|
+
},
|
|
258
|
+
get limitItem() {
|
|
259
|
+
return l();
|
|
260
|
+
},
|
|
261
|
+
set limitItem(e = R) {
|
|
262
|
+
l(e), f();
|
|
263
|
+
},
|
|
264
|
+
get translationUrl() {
|
|
265
|
+
return z();
|
|
266
|
+
},
|
|
267
|
+
set translationUrl(e) {
|
|
268
|
+
z(e), f();
|
|
269
|
+
}
|
|
270
|
+
}, Z = _t(), Re = de(Z);
|
|
271
|
+
{
|
|
272
|
+
var Le = (e) => {
|
|
273
|
+
ut(e, {
|
|
274
|
+
get itemId() {
|
|
275
|
+
return t(E).id;
|
|
276
|
+
},
|
|
277
|
+
get elevateReward() {
|
|
278
|
+
return t(E);
|
|
279
|
+
},
|
|
280
|
+
get apiEndpoint() {
|
|
281
|
+
return c();
|
|
282
|
+
},
|
|
283
|
+
get userSession() {
|
|
284
|
+
return p();
|
|
285
|
+
},
|
|
286
|
+
get locale() {
|
|
287
|
+
return b();
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}, Ne = (e) => {
|
|
291
|
+
var a = gt();
|
|
292
|
+
ue(a, 21, () => Array(t(S)), tt, (o, d, I, A) => {
|
|
293
|
+
var J = mt();
|
|
294
|
+
w(o, J);
|
|
295
|
+
}), j(a), w(e, a);
|
|
296
|
+
}, Te = (e) => {
|
|
297
|
+
var a = ht(), o = M(a, !0);
|
|
298
|
+
ce((d) => V(o, d), [() => xe()]), w(e, a);
|
|
299
|
+
}, Me = (e) => {
|
|
300
|
+
var a = bt(), o = nt(a);
|
|
301
|
+
ue(o, 21, () => t(g), (m) => m.id, (m, u) => {
|
|
302
|
+
var C = yt();
|
|
303
|
+
let ee;
|
|
304
|
+
var D = de(C), ze = le(() => Ie(t(u))), te = M(D), ne = O(D, 2), Pe = M(ne, !0), ae = O(ne, 2), Ue = M(ae), W = O(ae, 2), Be = M(W, !0);
|
|
305
|
+
j(C), ce(
|
|
306
|
+
(Y, Ae, De, je, Ve, He, Ke) => {
|
|
307
|
+
ee = st(C, 1, "loyalty-shop__item", null, ee, { "loyalty-shop__item--unavailable": Y }), pe(te, "src", Ae), pe(te, "alt", De), V(Pe, je), V(Ue, `${t(u).points ?? ""}
|
|
308
|
+
${Ve ?? ""}`), W.disabled = He, V(Be, Ke);
|
|
309
|
+
},
|
|
310
|
+
[
|
|
311
|
+
() => !F(t(u)),
|
|
312
|
+
() => ve(t(u)),
|
|
313
|
+
() => q(t(u)),
|
|
314
|
+
() => q(t(u)),
|
|
315
|
+
() => s()("tokens"),
|
|
316
|
+
() => !F(t(u)) || t(N) === t(u).id,
|
|
317
|
+
() => s()("buyNow")
|
|
318
|
+
]
|
|
319
|
+
), Q("click", D, () => $(t(u))), Q("keydown", D, function(...Y) {
|
|
320
|
+
t(ze)?.apply(this, Y);
|
|
321
|
+
}), Q("click", W, () => ke(t(u))), w(m, C);
|
|
322
|
+
}), j(o);
|
|
323
|
+
var d = O(o, 2);
|
|
324
|
+
{
|
|
325
|
+
var I = (m) => {
|
|
326
|
+
it(m, {
|
|
327
|
+
get offset() {
|
|
328
|
+
return t(v);
|
|
329
|
+
},
|
|
330
|
+
get limit() {
|
|
331
|
+
return t(S);
|
|
332
|
+
},
|
|
333
|
+
get total() {
|
|
334
|
+
return t(P);
|
|
335
|
+
},
|
|
336
|
+
onPageChange: Ee,
|
|
337
|
+
get locale() {
|
|
338
|
+
return b();
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
G(d, (m) => {
|
|
343
|
+
t(k) || m(I);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
var A = O(d, 2);
|
|
347
|
+
{
|
|
348
|
+
var J = (m) => {
|
|
349
|
+
var u = ft();
|
|
350
|
+
rt(u, (C) => r(U, C), () => t(U)), w(m, u);
|
|
351
|
+
};
|
|
352
|
+
G(A, (m) => {
|
|
353
|
+
t(k) && t(g).length < t(P) && m(J);
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
w(e, a);
|
|
357
|
+
};
|
|
358
|
+
G(Re, (e) => {
|
|
359
|
+
t(E) ? e(Le) : t(H) && t(g).length === 0 ? e(Ne, 1) : !t(g).length || t(K) ? e(Te, 2) : e(Me, -1);
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
j(Z), w(_, Z);
|
|
363
|
+
var Oe = he(Ce);
|
|
364
|
+
return L(), Oe;
|
|
365
|
+
}
|
|
366
|
+
qe(["click", "keydown"]);
|
|
367
|
+
me(
|
|
368
|
+
ye,
|
|
369
|
+
{
|
|
370
|
+
apiEndpoint: {},
|
|
371
|
+
userSession: {},
|
|
372
|
+
locale: {},
|
|
373
|
+
limitItem: {},
|
|
374
|
+
translationUrl: {}
|
|
375
|
+
},
|
|
376
|
+
[],
|
|
377
|
+
[],
|
|
378
|
+
{ mode: "open" }
|
|
379
|
+
);
|
|
380
|
+
function fe(_, n) {
|
|
381
|
+
ge(n, !0);
|
|
382
|
+
let s = y(n, "apiEndpoint", 7, ""), i = y(n, "userSession", 7, ""), L = y(n, "locale", 7, ""), c = y(n, "limitItem", 7, R), p = y(n, "translationUrl");
|
|
383
|
+
var b = {
|
|
384
|
+
get apiEndpoint() {
|
|
385
|
+
return s();
|
|
386
|
+
},
|
|
387
|
+
set apiEndpoint(l = "") {
|
|
388
|
+
s(l), f();
|
|
389
|
+
},
|
|
390
|
+
get userSession() {
|
|
391
|
+
return i();
|
|
392
|
+
},
|
|
393
|
+
set userSession(l = "") {
|
|
394
|
+
i(l), f();
|
|
395
|
+
},
|
|
396
|
+
get locale() {
|
|
397
|
+
return L();
|
|
398
|
+
},
|
|
399
|
+
set locale(l = "") {
|
|
400
|
+
L(l), f();
|
|
401
|
+
},
|
|
402
|
+
get limitItem() {
|
|
403
|
+
return c();
|
|
404
|
+
},
|
|
405
|
+
set limitItem(l = R) {
|
|
406
|
+
c(l), f();
|
|
407
|
+
},
|
|
408
|
+
get translationUrl() {
|
|
409
|
+
return p();
|
|
410
|
+
},
|
|
411
|
+
set translationUrl(l) {
|
|
412
|
+
p(l), f();
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
return ye(_, {
|
|
416
|
+
get apiEndpoint() {
|
|
417
|
+
return s();
|
|
418
|
+
},
|
|
419
|
+
get userSession() {
|
|
420
|
+
return i();
|
|
421
|
+
},
|
|
422
|
+
get locale() {
|
|
423
|
+
return L();
|
|
424
|
+
},
|
|
425
|
+
get limitItem() {
|
|
426
|
+
return c();
|
|
427
|
+
},
|
|
428
|
+
get translationUrl() {
|
|
429
|
+
return p();
|
|
430
|
+
}
|
|
431
|
+
}), he(b);
|
|
432
|
+
}
|
|
433
|
+
customElements.define("loyalty-shop", me(
|
|
434
|
+
fe,
|
|
435
|
+
{
|
|
436
|
+
apiEndpoint: {},
|
|
437
|
+
userSession: {},
|
|
438
|
+
locale: {},
|
|
439
|
+
limitItem: {},
|
|
440
|
+
translationUrl: {}
|
|
441
|
+
},
|
|
442
|
+
[],
|
|
443
|
+
[]
|
|
444
|
+
));
|
|
445
|
+
const xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
446
|
+
__proto__: null,
|
|
447
|
+
default: fe
|
|
448
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
449
|
+
export {
|
|
450
|
+
ye as L,
|
|
451
|
+
xt as a
|
|
452
|
+
};
|