@everymatrix/loyalty-level 0.2.3 → 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/LoyaltyLevel-B4lImGDu.cjs +26 -0
- package/components/LoyaltyLevel-BzJws8-G.js +535 -0
- package/components/LoyaltyLevel-C5IRTxL3.cjs +26 -0
- package/components/LoyaltyLevel-uSDbSl-J.js +549 -0
- package/components/{LoyaltyPagination-ColtUQI0.cjs → LoyaltyPagination-CxnhtBhF.cjs} +8 -8
- package/components/{LoyaltyPagination-D5jySBqc.cjs → LoyaltyPagination-D5WM82CZ.cjs} +8 -8
- package/components/{LoyaltyPagination-DOkAJClF.js → LoyaltyPagination-DwqIqlFP.js} +10 -10
- package/components/{LoyaltyPagination-BTfwQ1fb.js → LoyaltyPagination-fzOoPxDh.js} +10 -10
- package/es2015/loyalty-level.cjs +1 -1
- package/es2015/loyalty-level.js +2 -2
- package/esnext/loyalty-level.cjs +1 -1
- package/esnext/loyalty-level.js +2 -2
- package/package.json +1 -1
- package/components/LoyaltyLevel-C-3ooKZJ.cjs +0 -26
- package/components/LoyaltyLevel-CQKEb26Q.js +0 -549
- package/components/LoyaltyLevel-DUgl3Md0.js +0 -535
- package/components/LoyaltyLevel-D_n2xBTx.cjs +0 -26
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
import { d as at, c as Oe, p as Te, a as nt, b as y, s as ot, e as Le, u as J, f as rt, g as st, h as it, i as R, j as we, M as ne, k as e, l as k, m as me, n as S, o as p, q as Ue, I as W, r as C, t as E, v as _, w as dt, x as M, y as x, z as g, A as ke, B as Se, C as ct, L as vt, D as yt, E as U, F, G as V, H as oe, J as _t, $ as ut, K as Me, N as re, O as Ee, P as pt, Q as Ie } from "./LoyaltyPagination-DwqIqlFP.js";
|
|
2
|
+
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
3
|
+
}, globalThis.customElements = { define() {
|
|
4
|
+
}, get() {
|
|
5
|
+
}, whenDefined() {
|
|
6
|
+
} });
|
|
7
|
+
if (typeof window != "undefined") {
|
|
8
|
+
let B = function(a) {
|
|
9
|
+
return function(...c) {
|
|
10
|
+
try {
|
|
11
|
+
return a.apply(this, c);
|
|
12
|
+
} catch (b) {
|
|
13
|
+
if (b instanceof DOMException && b.message.includes("has already been used with this registry") || b instanceof Error && b.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
14
|
+
return !1;
|
|
15
|
+
throw b;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
customElements.define = B(customElements.define), import("./LoyaltyPagination-DwqIqlFP.js").then((a) => a.R).then((a) => {
|
|
20
|
+
const c = a.default || a;
|
|
21
|
+
customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", c.element || c);
|
|
22
|
+
}).catch((a) => {
|
|
23
|
+
console.error("BOOT ERROR:", a);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const gt = {
|
|
27
|
+
en: {
|
|
28
|
+
startingLevel: "Starting Level: {points} points",
|
|
29
|
+
seeMore: "See More",
|
|
30
|
+
seeLess: "See Less",
|
|
31
|
+
current: "Current",
|
|
32
|
+
next: "Next"
|
|
33
|
+
},
|
|
34
|
+
tr: {
|
|
35
|
+
startingLevel: "Başlangıç Seviyesi: {points} puan",
|
|
36
|
+
seeMore: "Daha Fazla",
|
|
37
|
+
seeLess: "Daha Az",
|
|
38
|
+
current: "Mevcut",
|
|
39
|
+
next: "Sonraki"
|
|
40
|
+
},
|
|
41
|
+
da: {
|
|
42
|
+
startingLevel: "Startniveau: {points} point",
|
|
43
|
+
seeMore: "Se mere",
|
|
44
|
+
seeLess: "Se mindre",
|
|
45
|
+
current: "Nuværende",
|
|
46
|
+
next: "Næste"
|
|
47
|
+
},
|
|
48
|
+
de: {
|
|
49
|
+
startingLevel: "Startlevel: {points} Punkte",
|
|
50
|
+
seeMore: "Mehr anzeigen",
|
|
51
|
+
seeLess: "Weniger anzeigen",
|
|
52
|
+
current: "Aktuell",
|
|
53
|
+
next: "Nächste"
|
|
54
|
+
},
|
|
55
|
+
nl: {
|
|
56
|
+
startingLevel: "Startniveau: {points} punten",
|
|
57
|
+
seeMore: "Meer tonen",
|
|
58
|
+
seeLess: "Minder tonen",
|
|
59
|
+
current: "Huidig",
|
|
60
|
+
next: "Volgende"
|
|
61
|
+
},
|
|
62
|
+
fr: {
|
|
63
|
+
startingLevel: "Niveau de départ : {points} points",
|
|
64
|
+
seeMore: "Voir plus",
|
|
65
|
+
seeLess: "Voir moins",
|
|
66
|
+
current: "Actuel",
|
|
67
|
+
next: "Suivant"
|
|
68
|
+
},
|
|
69
|
+
hu: {
|
|
70
|
+
startingLevel: "Kezdő szint: {points} pont",
|
|
71
|
+
seeMore: "Több megjelenítése",
|
|
72
|
+
seeLess: "Kevesebb megjelenítése",
|
|
73
|
+
current: "Jelenlegi",
|
|
74
|
+
next: "Következő"
|
|
75
|
+
}
|
|
76
|
+
}, ze = "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";
|
|
77
|
+
var ft = E('<article class="loyalty-level__card loyalty-level__card--skeleton" aria-busy="true"><header class="loyalty-level__head"><span class="loyalty-level__skeleton loyalty-level__skeleton--badge"></span> <div class="loyalty-level__headings"><span class="loyalty-level__skeleton loyalty-level__skeleton--name"></span> <span class="loyalty-level__skeleton loyalty-level__skeleton--starting"></span></div></header> <span class="loyalty-level__skeleton loyalty-level__skeleton--action"></span></article>'), Ce = E('<span class="loyalty-level__tag"> </span>'), mt = E("<div></div>"), ht = E('<button class="loyalty-level__action" type="button"> </button>'), xt = E('<article><header class="loyalty-level__head"><img class="loyalty-level__badge"/> <div class="loyalty-level__headings"><span class="loyalty-level__name"> </span> <span class="loyalty-level__starting"> </span></div> <!></header> <!> <!></article>'), bt = E('<div class="loyalty-level__sentinel" aria-hidden="true"></div>'), Lt = E('<img class="loyalty-level__badge"/>'), wt = E('<div class="loyalty-level__benefits"></div>'), kt = E('<div class="loyalty-level__modal-overlay" role="presentation"><div class="loyalty-level__modal" role="dialog" aria-modal="true" tabindex="-1"><div class="loyalty-level__modal-close-wrapper"><button class="loyalty-level__modal-close" type="button" aria-label="close">×</button></div> <div class="loyalty-level__modal-content"><header class="loyalty-level__modal-head"><!> <div class="loyalty-level__headings"><span class="loyalty-level__name"> </span> <span class="loyalty-level__starting"> </span></div> <!></header> <!></div></div></div>'), St = E('<div class="loyalty-level"><div class="loyalty-level__grid"><!></div> <!> <!></div> <!>', 1);
|
|
78
|
+
const Mt = {
|
|
79
|
+
hash: "svelte-nbxilv",
|
|
80
|
+
code: `
|
|
81
|
+
@layer loyalty-level-component {.loyalty-level {width:100%;box-sizing:border-box;}.loyalty-level__grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(min(100%, 326px), 1fr));gap:12px;align-items:stretch;}.loyalty-level__card {display:flex;flex-direction:column;gap:16px;padding:16px;background-color:var(--app-container-bg-default, #022652);border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));border-radius:6px;box-sizing:border-box;max-height:242px;overflow:hidden;line-height:1.4;}.loyalty-level__card--expanded {max-height:none;overflow:visible;}.loyalty-level__head {display:flex;align-items:flex-start;gap:6px;}.loyalty-level__badge {width:40px;height:40px;flex-shrink:0;}.loyalty-level__headings {display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;}.loyalty-level__name {color:var(--text-default, #ffffff);font-size:14px;font-weight:500;text-transform:uppercase;line-height:1.4;}.loyalty-level__tag {flex-shrink:0;align-self:flex-start;padding:10px;border-radius:100px;background:var(--badges-element-default, rgba(255, 204, 0, 0.05));color:var(--text-brand, #ffcc00);font-size:12px;font-weight:500;}.loyalty-level__starting {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-level__benefits {color:var(--text-subtle, #dfe3e8);font-size:13px;line-height:1.5;flex:1 1 auto;min-height:0;overflow:hidden;}.loyalty-level__card--expanded .loyalty-level__benefits {flex:none;overflow:visible;}.loyalty-level__benefits ul {margin:0;padding-left:18px;list-style:disc;}.loyalty-level__benefits li {margin-bottom:6px;}.loyalty-level__action {margin-top:auto;width:100%;padding:8px 16px;border:1px solid var(--button-secondary-border-default, rgba(251, 251, 251, 0.05));border-radius:6px;background:var(--button-secondary-bg-default, rgba(251, 251, 251, 0.1));color:var(--button-secondary-text-default, #ffffff);font-size:12px;font-weight:400;cursor:pointer;}.loyalty-level__modal-overlay {position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;background-color:rgba(0, 0, 0, 0.7);backdrop-filter:blur(3px);}.loyalty-level__modal {position:relative;width:100%;max-width:40dvw;max-height:90dvh;padding:24px 16px;background-color:var(--app-container-bg-default, #022652);border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));border-radius:8px;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;}.loyalty-level__modal-content {padding:8px;display:flex;flex-direction:column;gap:16px;flex:1 1 auto;min-height:0;overflow:hidden;}.loyalty-level__modal-content .loyalty-level__benefits {flex:1 1 auto;min-height:0;overflow-y:auto;}.loyalty-level__modal-head {display:flex;align-items:flex-start;gap:12px;flex-shrink:0;}.loyalty-level__modal-close-wrapper {display:flex;justify-content:flex-end;flex-shrink:0;}.loyalty-level__modal-close {border:none;background:transparent;color:var(--icon-default, #b3becb);font-size:25px;line-height:1;cursor:pointer;}.loyalty-level__sentinel {width:100%;height:1px;}.loyalty-level__card--skeleton {pointer-events:none;justify-content:flex-start;height:180px;}.loyalty-level__skeleton {display:block;border-radius:4px;background:linear-gradient(
|
|
82
|
+
90deg,
|
|
83
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
84
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
85
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
86
|
+
);background-size:400% 100%;
|
|
87
|
+
animation: loyalty-level-shimmer 1.4s ease infinite;}.loyalty-level__skeleton--badge {width:40px;height:40px;flex-shrink:0;border-radius:6px;}.loyalty-level__skeleton--name {width:60%;height:16px;}.loyalty-level__skeleton--starting {width:40%;height:14px;}.loyalty-level__skeleton--action {margin-top:auto;width:100%;height:33px;border-radius:6px;}
|
|
88
|
+
|
|
89
|
+
@keyframes loyalty-level-shimmer {
|
|
90
|
+
0% {
|
|
91
|
+
background-position: 100% 50%;
|
|
92
|
+
}
|
|
93
|
+
100% {
|
|
94
|
+
background-position: 0 50%;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (prefers-reduced-motion: reduce) {.loyalty-level__skeleton {
|
|
99
|
+
animation: none;}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (max-width: 767px) {.loyalty-level__benefits {overflow-wrap:anywhere;word-break:break-word;}.loyalty-level__benefits--collapsed {max-height:calc(1.5em * 2);overflow:hidden;}.loyalty-level__benefits p {margin:0;}.loyalty-level__benefits ul,
|
|
103
|
+
.loyalty-level__benefits ol {margin:0;padding-left:18px;}.loyalty-level__benefits li {margin-bottom:6px;}.loyalty-level__benefits li:last-child {margin-bottom:0;}.loyalty-level__card--expanded {max-height:none;overflow:visible;}.loyalty-level__card--expanded .loyalty-level__benefits {flex:none;max-height:none;overflow:visible;}
|
|
104
|
+
}
|
|
105
|
+
}`
|
|
106
|
+
};
|
|
107
|
+
function Ne(B, a) {
|
|
108
|
+
Te(a, !0), nt(B, Mt);
|
|
109
|
+
const c = () => _t(ut, "$_", b), [b, G] = dt(), N = y(a, "apiEndpoint", 7, ""), D = y(a, "userSession", 7, ""), w = y(a, "locale", 7, ""), H = y(a, "onLevelLoaded", 7, (t) => {
|
|
110
|
+
}), Q = y(a, "onSeeMore", 7, (t) => {
|
|
111
|
+
}), s = y(a, "limitItem", 7, W), ee = y(a, "translationUrl");
|
|
112
|
+
ot({ withLocale: w(), translations: {} });
|
|
113
|
+
const He = () => {
|
|
114
|
+
let t = new URL(ee(), window.location.href);
|
|
115
|
+
fetch(t.href).then((l) => l.json()).then((l) => {
|
|
116
|
+
Object.keys(l).forEach((n) => {
|
|
117
|
+
Le(n, l[n]);
|
|
118
|
+
});
|
|
119
|
+
}).catch((l) => {
|
|
120
|
+
console.log("loyalty level translation url err:", l);
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
Object.entries(gt).forEach(([t, l]) => {
|
|
124
|
+
Le(t, l);
|
|
125
|
+
}), J(() => {
|
|
126
|
+
var t;
|
|
127
|
+
rt((t = w()) != null ? t : "en");
|
|
128
|
+
}), st(() => {
|
|
129
|
+
ee() && He();
|
|
130
|
+
});
|
|
131
|
+
const je = (t) => {
|
|
132
|
+
H()(t);
|
|
133
|
+
}, te = it(() => ({
|
|
134
|
+
apiEndpoint: N(),
|
|
135
|
+
userSession: D(),
|
|
136
|
+
locale: w(),
|
|
137
|
+
loadLevels: !0,
|
|
138
|
+
onLevelLoaded: je
|
|
139
|
+
})), se = C(() => {
|
|
140
|
+
var t;
|
|
141
|
+
return (t = te.playerElevateLevel) == null ? void 0 : t.id;
|
|
142
|
+
}), I = C(() => typeof s() == "number" ? s() : parseInt(s(), W) || W), j = C(() => {
|
|
143
|
+
var t;
|
|
144
|
+
return [...(t = te.levels) != null ? t : []].sort((l, n) => l.firstEntryPoints < n.firstEntryPoints ? -1 : 1);
|
|
145
|
+
}), K = (t) => {
|
|
146
|
+
var l, n, u;
|
|
147
|
+
return (u = (n = (l = t.presentation) == null ? void 0 : l.displayName) != null ? n : t.displayName) != null ? u : String(t.id);
|
|
148
|
+
};
|
|
149
|
+
let q = R(0), f = R(!1), X = R(we(ne)), le = R(void 0), Z = R(void 0), m = R(void 0), Y = R(we({}));
|
|
150
|
+
const Ae = C(() => Math.max(1, Math.ceil(e(j).length / e(I)))), Pe = C(() => e(f) ? e(j).slice(0, e(X)) : e(j).slice(e(q) * e(I), e(q) * e(I) + e(I))), Re = C(() => e(j).length > 0 && !!te.playerElevateLevel), he = C(() => te.loading && !e(Re)), Fe = C(() => e(f) ? ne : e(I)), ie = (t, l) => {
|
|
151
|
+
let n;
|
|
152
|
+
const u = () => {
|
|
153
|
+
if (!e(f)) {
|
|
154
|
+
e(Y)[l] = !1;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const z = window.getComputedStyle(t), h = parseFloat(z.maxHeight);
|
|
158
|
+
if (!Number.isFinite(h) || h <= 0) {
|
|
159
|
+
e(Y)[l] = !1;
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const A = 12;
|
|
163
|
+
e(Y)[l] = t.scrollHeight > h + A;
|
|
164
|
+
}, o = () => {
|
|
165
|
+
n !== void 0 && cancelAnimationFrame(n), n = requestAnimationFrame(u);
|
|
166
|
+
};
|
|
167
|
+
o();
|
|
168
|
+
const L = new ResizeObserver(o);
|
|
169
|
+
return L.observe(t), {
|
|
170
|
+
destroy() {
|
|
171
|
+
n !== void 0 && cancelAnimationFrame(n), L.disconnect(), delete e(Y)[l];
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
J(() => {
|
|
176
|
+
e(q) > e(Ae) - 1 && k(q, 0);
|
|
177
|
+
}), J(() => {
|
|
178
|
+
k(X, e(f) ? ne : e(I), !0);
|
|
179
|
+
}), J(() => {
|
|
180
|
+
if (!e(f) || !e(le))
|
|
181
|
+
return;
|
|
182
|
+
const t = new IntersectionObserver(
|
|
183
|
+
(l) => {
|
|
184
|
+
l.some((n) => n.isIntersecting) && k(X, Math.min(e(j).length, e(X) + ne), !0);
|
|
185
|
+
},
|
|
186
|
+
{ rootMargin: "200px" }
|
|
187
|
+
);
|
|
188
|
+
return t.observe(e(le)), () => t.disconnect();
|
|
189
|
+
});
|
|
190
|
+
const Ve = (t) => {
|
|
191
|
+
k(q, Math.floor(t / e(I)), !0);
|
|
192
|
+
};
|
|
193
|
+
J(() => {
|
|
194
|
+
const t = window.matchMedia("(max-width: 767px)"), l = (n) => {
|
|
195
|
+
k(f, n.matches, !0);
|
|
196
|
+
};
|
|
197
|
+
return k(f, t.matches, !0), t.addEventListener("change", l), () => t.removeEventListener("change", l);
|
|
198
|
+
});
|
|
199
|
+
const Be = (t) => {
|
|
200
|
+
if (Q()(t), !e(f)) {
|
|
201
|
+
Ie(K(t)), k(m, t, !0);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const l = e(Z) !== t.id;
|
|
205
|
+
l && Ie(K(t)), k(Z, l ? t.id : void 0, !0);
|
|
206
|
+
}, de = () => {
|
|
207
|
+
k(m, void 0);
|
|
208
|
+
}, Ke = (t) => {
|
|
209
|
+
t.target === t.currentTarget && de();
|
|
210
|
+
}, qe = (t) => {
|
|
211
|
+
t.key === "Escape" && de();
|
|
212
|
+
};
|
|
213
|
+
J(() => {
|
|
214
|
+
if (!e(m))
|
|
215
|
+
return;
|
|
216
|
+
const t = document.body.style.overflow;
|
|
217
|
+
return document.body.style.overflow = "hidden", () => {
|
|
218
|
+
document.body.style.overflow = t;
|
|
219
|
+
};
|
|
220
|
+
});
|
|
221
|
+
var Ze = {
|
|
222
|
+
get apiEndpoint() {
|
|
223
|
+
return N();
|
|
224
|
+
},
|
|
225
|
+
set apiEndpoint(t = "") {
|
|
226
|
+
N(t), _();
|
|
227
|
+
},
|
|
228
|
+
get userSession() {
|
|
229
|
+
return D();
|
|
230
|
+
},
|
|
231
|
+
set userSession(t = "") {
|
|
232
|
+
D(t), _();
|
|
233
|
+
},
|
|
234
|
+
get locale() {
|
|
235
|
+
return w();
|
|
236
|
+
},
|
|
237
|
+
set locale(t = "") {
|
|
238
|
+
w(t), _();
|
|
239
|
+
},
|
|
240
|
+
get onLevelLoaded() {
|
|
241
|
+
return H();
|
|
242
|
+
},
|
|
243
|
+
set onLevelLoaded(t = (l) => {
|
|
244
|
+
}) {
|
|
245
|
+
H(t), _();
|
|
246
|
+
},
|
|
247
|
+
get onSeeMore() {
|
|
248
|
+
return Q();
|
|
249
|
+
},
|
|
250
|
+
set onSeeMore(t = (l) => {
|
|
251
|
+
}) {
|
|
252
|
+
Q(t), _();
|
|
253
|
+
},
|
|
254
|
+
get limitItem() {
|
|
255
|
+
return s();
|
|
256
|
+
},
|
|
257
|
+
set limitItem(t = W) {
|
|
258
|
+
s(t), _();
|
|
259
|
+
},
|
|
260
|
+
get translationUrl() {
|
|
261
|
+
return ee();
|
|
262
|
+
},
|
|
263
|
+
set translationUrl(t) {
|
|
264
|
+
ee(t), _();
|
|
265
|
+
}
|
|
266
|
+
}, xe = St(), ce = me(xe), ve = M(ce), Je = M(ve);
|
|
267
|
+
{
|
|
268
|
+
var We = (t) => {
|
|
269
|
+
var l = ke(), n = me(l);
|
|
270
|
+
Se(n, 17, () => ({ length: e(Fe) }), ct, (u, o, L, z) => {
|
|
271
|
+
var h = ft();
|
|
272
|
+
p(u, h);
|
|
273
|
+
}), p(t, l);
|
|
274
|
+
}, Ge = (t) => {
|
|
275
|
+
var l = ke(), n = me(l);
|
|
276
|
+
Se(n, 17, () => e(Pe), (u) => u.id, (u, o) => {
|
|
277
|
+
var L = xt();
|
|
278
|
+
let z;
|
|
279
|
+
var h = M(L), A = M(h), P = g(A, 2), $ = M(P), ye = U($, !0), _e = g($, 2), ue = U(_e, !0);
|
|
280
|
+
x(P);
|
|
281
|
+
var pe = g(P, 2);
|
|
282
|
+
{
|
|
283
|
+
var ge = (d) => {
|
|
284
|
+
var i = Ce(), O = U(i, !0);
|
|
285
|
+
F((T) => V(O, T), [() => c()("current")]), p(d, i);
|
|
286
|
+
};
|
|
287
|
+
S(pe, (d) => {
|
|
288
|
+
e(o).id === e(se) && d(ge);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
x(h);
|
|
292
|
+
var ae = g(h, 2);
|
|
293
|
+
{
|
|
294
|
+
var fe = (d) => {
|
|
295
|
+
var i = mt();
|
|
296
|
+
let O;
|
|
297
|
+
Ee(i, () => e(o).presentation.description, !0), x(i), pt(i, (T, lt) => ie == null ? void 0 : ie(T, lt), () => e(o).id), F(() => O = Me(i, 1, "loyalty-level__benefits", null, O, {
|
|
298
|
+
"loyalty-level__benefits--collapsed": e(f) && e(Z) !== e(o).id
|
|
299
|
+
})), p(d, i);
|
|
300
|
+
};
|
|
301
|
+
S(ae, (d) => {
|
|
302
|
+
var i;
|
|
303
|
+
(i = e(o).presentation) != null && i.description && d(fe);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
var v = g(ae, 2);
|
|
307
|
+
{
|
|
308
|
+
var r = (d) => {
|
|
309
|
+
var i = ht(), O = U(i, !0);
|
|
310
|
+
F((T) => V(O, T), [
|
|
311
|
+
() => e(Z) === e(o).id ? c()("seeLess") : c()("seeMore")
|
|
312
|
+
]), oe("click", i, () => Be(e(o))), p(d, i);
|
|
313
|
+
};
|
|
314
|
+
S(v, (d) => {
|
|
315
|
+
(!e(f) || e(Y)[e(o).id] || e(Z) === e(o).id) && d(r);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
x(L), F(
|
|
319
|
+
(d, i, O) => {
|
|
320
|
+
var T;
|
|
321
|
+
z = Me(L, 1, "loyalty-level__card", null, z, {
|
|
322
|
+
"loyalty-level__card--current": e(o).id === e(se),
|
|
323
|
+
"loyalty-level__card--expanded": e(Z) === e(o).id
|
|
324
|
+
}), re(A, "src", ((T = e(o).presentation) == null ? void 0 : T.asset) || ze), re(A, "alt", d), V(ye, i), V(ue, O);
|
|
325
|
+
},
|
|
326
|
+
[
|
|
327
|
+
() => K(e(o)),
|
|
328
|
+
() => K(e(o)),
|
|
329
|
+
() => c()("startingLevel", {
|
|
330
|
+
values: { points: e(o).firstEntryPoints.toLocaleString() }
|
|
331
|
+
})
|
|
332
|
+
]
|
|
333
|
+
), p(u, L);
|
|
334
|
+
}), p(t, l);
|
|
335
|
+
};
|
|
336
|
+
S(Je, (t) => {
|
|
337
|
+
e(he) ? t(We) : t(Ge, -1);
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
x(ve);
|
|
341
|
+
var be = g(ve, 2);
|
|
342
|
+
{
|
|
343
|
+
var Qe = (t) => {
|
|
344
|
+
{
|
|
345
|
+
let l = C(() => e(q) * e(I));
|
|
346
|
+
vt(t, {
|
|
347
|
+
get offset() {
|
|
348
|
+
return e(l);
|
|
349
|
+
},
|
|
350
|
+
get limit() {
|
|
351
|
+
return e(I);
|
|
352
|
+
},
|
|
353
|
+
get total() {
|
|
354
|
+
return e(j).length;
|
|
355
|
+
},
|
|
356
|
+
onPageChange: Ve,
|
|
357
|
+
get locale() {
|
|
358
|
+
return w();
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
S(be, (t) => {
|
|
364
|
+
!e(he) && !e(f) && t(Qe);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
var Xe = g(be, 2);
|
|
368
|
+
{
|
|
369
|
+
var Ye = (t) => {
|
|
370
|
+
var l = bt();
|
|
371
|
+
yt(l, (n) => k(le, n), () => e(le)), p(t, l);
|
|
372
|
+
};
|
|
373
|
+
S(Xe, (t) => {
|
|
374
|
+
e(f) && e(X) < e(j).length && t(Ye);
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
x(ce);
|
|
378
|
+
var $e = g(ce, 2);
|
|
379
|
+
{
|
|
380
|
+
var et = (t) => {
|
|
381
|
+
var l = kt(), n = M(l), u = M(n), o = U(u), L = g(u, 2), z = M(L), h = M(z);
|
|
382
|
+
{
|
|
383
|
+
var A = (v) => {
|
|
384
|
+
var r = Lt();
|
|
385
|
+
F(
|
|
386
|
+
(d) => {
|
|
387
|
+
re(r, "src", e(m).presentation.asset || ze), re(r, "alt", d);
|
|
388
|
+
},
|
|
389
|
+
[() => K(e(m))]
|
|
390
|
+
), p(v, r);
|
|
391
|
+
};
|
|
392
|
+
S(h, (v) => {
|
|
393
|
+
var r;
|
|
394
|
+
(r = e(m).presentation) != null && r.asset && v(A);
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
var P = g(h, 2), $ = M(P), ye = U($, !0), _e = g($, 2), ue = U(_e, !0);
|
|
398
|
+
x(P);
|
|
399
|
+
var pe = g(P, 2);
|
|
400
|
+
{
|
|
401
|
+
var ge = (v) => {
|
|
402
|
+
var r = Ce(), d = U(r, !0);
|
|
403
|
+
F((i) => V(d, i), [() => c()("current")]), p(v, r);
|
|
404
|
+
};
|
|
405
|
+
S(pe, (v) => {
|
|
406
|
+
e(m).id === e(se) && v(ge);
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
x(z);
|
|
410
|
+
var ae = g(z, 2);
|
|
411
|
+
{
|
|
412
|
+
var fe = (v) => {
|
|
413
|
+
var r = wt();
|
|
414
|
+
Ee(r, () => e(m).presentation.description, !0), x(r), p(v, r);
|
|
415
|
+
};
|
|
416
|
+
S(ae, (v) => {
|
|
417
|
+
var r;
|
|
418
|
+
(r = e(m).presentation) != null && r.description && v(fe);
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
x(L), x(n), x(l), F(
|
|
422
|
+
(v, r) => {
|
|
423
|
+
V(ye, v), V(ue, r);
|
|
424
|
+
},
|
|
425
|
+
[
|
|
426
|
+
() => K(e(m)),
|
|
427
|
+
() => c()("startingLevel", {
|
|
428
|
+
values: { points: e(m).firstEntryPoints.toLocaleString() }
|
|
429
|
+
})
|
|
430
|
+
]
|
|
431
|
+
), oe("click", l, Ke), oe("keydown", l, qe), oe("click", o, de), p(t, l);
|
|
432
|
+
};
|
|
433
|
+
S($e, (t) => {
|
|
434
|
+
e(m) && t(et);
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
p(B, xe);
|
|
438
|
+
var tt = Ue(Ze);
|
|
439
|
+
return G(), tt;
|
|
440
|
+
}
|
|
441
|
+
at(["click", "keydown"]);
|
|
442
|
+
Oe(
|
|
443
|
+
Ne,
|
|
444
|
+
{
|
|
445
|
+
apiEndpoint: {},
|
|
446
|
+
userSession: {},
|
|
447
|
+
locale: {},
|
|
448
|
+
onLevelLoaded: {},
|
|
449
|
+
onSeeMore: {},
|
|
450
|
+
limitItem: {},
|
|
451
|
+
translationUrl: {}
|
|
452
|
+
},
|
|
453
|
+
[],
|
|
454
|
+
[],
|
|
455
|
+
{ mode: "open" }
|
|
456
|
+
);
|
|
457
|
+
function De(B, a) {
|
|
458
|
+
Te(a, !0);
|
|
459
|
+
let c = y(a, "apiEndpoint", 7, ""), b = y(a, "userSession", 7, ""), G = y(a, "locale", 7, ""), N = y(a, "onLevelLoaded"), D = y(a, "onSeeMore"), w = y(a, "limitItem", 7, W), H = y(a, "translationUrl");
|
|
460
|
+
var Q = {
|
|
461
|
+
get apiEndpoint() {
|
|
462
|
+
return c();
|
|
463
|
+
},
|
|
464
|
+
set apiEndpoint(s = "") {
|
|
465
|
+
c(s), _();
|
|
466
|
+
},
|
|
467
|
+
get userSession() {
|
|
468
|
+
return b();
|
|
469
|
+
},
|
|
470
|
+
set userSession(s = "") {
|
|
471
|
+
b(s), _();
|
|
472
|
+
},
|
|
473
|
+
get locale() {
|
|
474
|
+
return G();
|
|
475
|
+
},
|
|
476
|
+
set locale(s = "") {
|
|
477
|
+
G(s), _();
|
|
478
|
+
},
|
|
479
|
+
get onLevelLoaded() {
|
|
480
|
+
return N();
|
|
481
|
+
},
|
|
482
|
+
set onLevelLoaded(s) {
|
|
483
|
+
N(s), _();
|
|
484
|
+
},
|
|
485
|
+
get onSeeMore() {
|
|
486
|
+
return D();
|
|
487
|
+
},
|
|
488
|
+
set onSeeMore(s) {
|
|
489
|
+
D(s), _();
|
|
490
|
+
},
|
|
491
|
+
get limitItem() {
|
|
492
|
+
return w();
|
|
493
|
+
},
|
|
494
|
+
set limitItem(s = W) {
|
|
495
|
+
w(s), _();
|
|
496
|
+
},
|
|
497
|
+
get translationUrl() {
|
|
498
|
+
return H();
|
|
499
|
+
},
|
|
500
|
+
set translationUrl(s) {
|
|
501
|
+
H(s), _();
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
return Ne(B, {
|
|
505
|
+
get apiEndpoint() {
|
|
506
|
+
return c();
|
|
507
|
+
},
|
|
508
|
+
get userSession() {
|
|
509
|
+
return b();
|
|
510
|
+
},
|
|
511
|
+
get locale() {
|
|
512
|
+
return G();
|
|
513
|
+
},
|
|
514
|
+
get onLevelLoaded() {
|
|
515
|
+
return N();
|
|
516
|
+
},
|
|
517
|
+
get onSeeMore() {
|
|
518
|
+
return D();
|
|
519
|
+
},
|
|
520
|
+
get limitItem() {
|
|
521
|
+
return w();
|
|
522
|
+
},
|
|
523
|
+
get translationUrl() {
|
|
524
|
+
return H();
|
|
525
|
+
}
|
|
526
|
+
}), Ue(Q);
|
|
527
|
+
}
|
|
528
|
+
customElements.define("loyalty-level", Oe(
|
|
529
|
+
De,
|
|
530
|
+
{
|
|
531
|
+
apiEndpoint: {},
|
|
532
|
+
userSession: {},
|
|
533
|
+
locale: {},
|
|
534
|
+
onLevelLoaded: {},
|
|
535
|
+
onSeeMore: {},
|
|
536
|
+
limitItem: {},
|
|
537
|
+
translationUrl: {}
|
|
538
|
+
},
|
|
539
|
+
[],
|
|
540
|
+
[]
|
|
541
|
+
));
|
|
542
|
+
const It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
543
|
+
__proto__: null,
|
|
544
|
+
default: De
|
|
545
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
546
|
+
export {
|
|
547
|
+
Ne as L,
|
|
548
|
+
It as a
|
|
549
|
+
};
|