@everymatrix/loyalty-shop 0.1.13 → 0.1.15

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.
Files changed (26) hide show
  1. package/components/{LoyaltyPagination-B-q5gKJj.js → LoyaltyPagination-5mlynRsD.js} +2789 -2366
  2. package/components/LoyaltyPagination-D7TGgpOl.cjs +16 -0
  3. package/components/LoyaltyPagination-DoaWx3gW.cjs +16 -0
  4. package/components/LoyaltyPagination-WMbwps-Y.js +7183 -0
  5. package/components/{LoyaltyPointsCard-BhdXzF1P.cjs → LoyaltyPointsCard-BthOcyvZ.cjs} +3 -3
  6. package/components/{LoyaltyPointsCard-Dh-TnTTL.cjs → LoyaltyPointsCard-Ctxmn0pn.cjs} +3 -3
  7. package/components/{LoyaltyPointsCard-DRKV1-dq.js → LoyaltyPointsCard-DnyOr6RH.js} +4 -5
  8. package/components/{LoyaltyPointsCard-yCHI1R_t.js → LoyaltyPointsCard-JV_Vm052.js} +4 -5
  9. package/components/LoyaltyShop-BvDigxmH.cjs +27 -0
  10. package/components/{LoyaltyShop-CtNpYAKa.js → LoyaltyShop-CewjK7_m.js} +227 -260
  11. package/components/LoyaltyShop-D78F7HNs.cjs +27 -0
  12. package/components/{LoyaltyShop-DoIx97J9.js → LoyaltyShop-DORwVB2x.js} +223 -256
  13. package/components/{LoyaltyShopItem-bXQ_G5NK.js → LoyaltyShopItem-B5HPzm1z.js} +27 -30
  14. package/components/{LoyaltyShopItem-D_oViqJP.cjs → LoyaltyShopItem-BDOJ0nlu.cjs} +3 -3
  15. package/components/{LoyaltyShopItem-BRiUNphq.cjs → LoyaltyShopItem-DETZUW3x.cjs} +3 -3
  16. package/components/{LoyaltyShopItem-C2xuJLoW.js → LoyaltyShopItem-qD3S4Ug2.js} +26 -29
  17. package/es2015/loyalty-shop.cjs +1 -1
  18. package/es2015/loyalty-shop.js +2 -2
  19. package/esnext/loyalty-shop.cjs +1 -1
  20. package/esnext/loyalty-shop.js +2 -2
  21. package/package.json +1 -1
  22. package/components/LoyaltyPagination-Boz7CVJt.cjs +0 -16
  23. package/components/LoyaltyPagination-CEvN3M3n.cjs +0 -16
  24. package/components/LoyaltyPagination-Z_igiBkY.js +0 -6754
  25. package/components/LoyaltyShop-BsZThRDe.cjs +0 -27
  26. package/components/LoyaltyShop-Cx8CxsMn.cjs +0 -27
@@ -1,31 +1,31 @@
1
- var le = (h, n, s) => new Promise((r, x) => {
2
- var u = (o) => {
1
+ var ee = (f, s, o) => new Promise((r, w) => {
2
+ var u = (l) => {
3
3
  try {
4
- p(s.next(o));
5
- } catch (E) {
6
- x(E);
4
+ p(o.next(l));
5
+ } catch (x) {
6
+ w(x);
7
7
  }
8
- }, c = (o) => {
8
+ }, c = (l) => {
9
9
  try {
10
- p(s.throw(o));
11
- } catch (E) {
12
- x(E);
10
+ p(o.throw(l));
11
+ } catch (x) {
12
+ w(x);
13
13
  }
14
- }, p = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(u, c);
15
- p((s = s.apply(h, n)).next());
14
+ }, p = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(u, c);
15
+ p((o = o.apply(f, s)).next());
16
16
  });
17
- import { y as et, c as Ee, p as qe, a as tt, b as _, s as nt, d as ge, z as y, A as he, N as ve, C as D, m as t, E as i, B as at, G as ye, S as st, i as j, h as k, j as Se, O as z, P as ot, u as _e, H as lt, I as rt, J as it, K as dt, v as T, k as b, l as ut, n as N, r as w, f as be, g as re, Q as ke, R as ct, t as we, q as G, o as V, T as pt, M as xe, L as mt, w as ft, $ as gt, U as ht, V as vt, W as yt } from "./LoyaltyPagination-Z_igiBkY.js";
18
- import { L as _t } from "./LoyaltyShopItem-bXQ_G5NK.js";
17
+ import { y as Fe, c as he, p as ye, a as Je, b as v, s as We, d as re, z as y, A as de, O as ue, C as U, m as t, E as d, B as Ye, G as ce, S as Ze, i as te, h as I, j as ve, P as T, Q as Ge, u as pe, H as Qe, I as Xe, J as $e, K as et, v as R, k as b, l as tt, n as C, r as k, R as me, T as nt, t as ge, q as K, g as st, o as B, w as at, $ as ot, U as lt, N as fe, L as ne, V as it, W as rt, M as dt, X as ut } from "./LoyaltyPagination-WMbwps-Y.js";
18
+ import { L as ct } from "./LoyaltyShopItem-B5HPzm1z.js";
19
19
  typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
20
20
  }, globalThis.customElements = { define() {
21
21
  }, get() {
22
22
  }, whenDefined() {
23
23
  } });
24
24
  if (typeof window != "undefined") {
25
- let h = function(n) {
26
- return function(...s) {
25
+ let f = function(s) {
26
+ return function(...o) {
27
27
  try {
28
- return n.apply(this, s);
28
+ return s.apply(this, o);
29
29
  } catch (r) {
30
30
  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"))
31
31
  return !1;
@@ -33,18 +33,18 @@ if (typeof window != "undefined") {
33
33
  }
34
34
  };
35
35
  };
36
- customElements.define = h(customElements.define), import("./LoyaltyPagination-Z_igiBkY.js").then((n) => n.X).then((n) => {
37
- const s = n.default || n;
38
- customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", s.element || s);
39
- }).catch((n) => {
40
- console.error("BOOT ERROR:", n);
36
+ customElements.define = f(customElements.define), import("./LoyaltyPagination-WMbwps-Y.js").then((s) => s.Y).then((s) => {
37
+ const o = s.default || s;
38
+ customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", o.element || o);
39
+ }).catch((s) => {
40
+ console.error("BOOT ERROR:", s);
41
41
  });
42
42
  }
43
43
  if (typeof window != "undefined") {
44
- let h = function(n) {
45
- return function(...s) {
44
+ let f = function(s) {
45
+ return function(...o) {
46
46
  try {
47
- return n.apply(this, s);
47
+ return s.apply(this, o);
48
48
  } catch (r) {
49
49
  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"))
50
50
  return !1;
@@ -52,14 +52,14 @@ if (typeof window != "undefined") {
52
52
  }
53
53
  };
54
54
  };
55
- customElements.define = h(customElements.define), import("./LoyaltyShopItem-bXQ_G5NK.js").then((n) => n.a).then((n) => {
56
- const s = n.default || n;
57
- customElements.get("loyalty-shop-item") || customElements.define("loyalty-shop-item", s.element || s);
58
- }).catch((n) => {
59
- console.error("BOOT ERROR:", n);
55
+ customElements.define = f(customElements.define), import("./LoyaltyShopItem-B5HPzm1z.js").then((s) => s.a).then((s) => {
56
+ const o = s.default || s;
57
+ customElements.get("loyalty-shop-item") || customElements.define("loyalty-shop-item", o.element || o);
58
+ }).catch((s) => {
59
+ console.error("BOOT ERROR:", s);
60
60
  });
61
61
  }
62
- const bt = {
62
+ const pt = {
63
63
  en: {
64
64
  loading: "Loading…",
65
65
  noContent: "There are no bonus items available for redemption.",
@@ -116,9 +116,9 @@ const bt = {
116
116
  buyNow: "Vásárlás",
117
117
  generalError: "Hiba történt. Kérjük, próbáld újra."
118
118
  }
119
- }, kt = "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";
120
- var wt = T('<div class="loyalty-shop__item loyalty-shop__item--skeleton svelte-1f1q033"><div class="loyalty-shop__item-image skeleton-box svelte-1f1q033"></div> <div class="loyalty-shop__item-title skeleton-line svelte-1f1q033"></div> <div class="loyalty-shop__item-points skeleton-line skeleton-line--short svelte-1f1q033"></div> <div class="loyalty-shop__item-button-skeleton skeleton-box svelte-1f1q033"></div></div>'), xt = T('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton svelte-1f1q033"></div>'), Et = T('<div class="loyalty-shop__unavailable svelte-1f1q033"> </div>'), qt = T('<div><div role="button" tabindex="0" class="loyalty-shop__item-image-container svelte-1f1q033"><img class="loyalty-shop__item-image svelte-1f1q033"/></div> <span class="loyalty-shop__item-title svelte-1f1q033"> </span> <span class="loyalty-shop__item-points svelte-1f1q033"> </span> <button class="loyalty-shop__item-button svelte-1f1q033" type="button"> </button></div>'), St = T('<div class="load-more-sentinel svelte-1f1q033" aria-hidden="true"></div>'), It = T('<div class="loyalty-shop__grid svelte-1f1q033"></div> <!> <!>', 1), Ct = T('<div class="loyalty-shop svelte-1f1q033"><!></div>');
121
- const Rt = {
119
+ }, mt = "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";
120
+ var gt = R('<div class="loyalty-shop__item loyalty-shop__item--skeleton svelte-1f1q033"><div class="loyalty-shop__item-image skeleton-box svelte-1f1q033"></div> <div class="loyalty-shop__item-title skeleton-line svelte-1f1q033"></div> <div class="loyalty-shop__item-points skeleton-line skeleton-line--short svelte-1f1q033"></div> <div class="loyalty-shop__item-button-skeleton skeleton-box svelte-1f1q033"></div></div>'), ft = R('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton svelte-1f1q033"></div>'), ht = R('<div class="loyalty-shop__unavailable svelte-1f1q033"> </div>'), yt = R('<div><div role="button" tabindex="0" class="loyalty-shop__item-image-container svelte-1f1q033"><img class="loyalty-shop__item-image svelte-1f1q033"/></div> <span class="loyalty-shop__item-title svelte-1f1q033"> </span> <span class="loyalty-shop__item-points svelte-1f1q033"> </span> <button class="loyalty-shop__item-button svelte-1f1q033" type="button"> </button></div>'), vt = R('<div class="load-more-sentinel svelte-1f1q033" aria-hidden="true"></div>'), bt = R('<div class="loyalty-shop__grid svelte-1f1q033"></div> <!> <!>', 1), _t = R('<div class="loyalty-shop svelte-1f1q033"><!></div>');
121
+ const kt = {
122
122
  hash: "svelte-1f1q033",
123
123
  code: `.loyalty-shop.svelte-1f1q033 {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.svelte-1f1q033 {color:var(--text-subtle, #dfe3e8);font-size:14px;padding:24px 0;text-align:center;}.loyalty-shop__grid.svelte-1f1q033 {display:grid;gap:16px;grid-template-columns:repeat(2, 1fr);margin:0;}.loyalty-shop__item.svelte-1f1q033 {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.svelte-1f1q033 {opacity:1;}.loyalty-shop__item-image.svelte-1f1q033 {width:100%;height:82px;border-radius:6px;}.loyalty-shop__item-title.svelte-1f1q033 {color:var(--text-default, #ffffff);font-size:12px;font-weight:400;}.loyalty-shop__item-points.svelte-1f1q033 {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-shop__item-button.svelte-1f1q033 {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.svelte-1f1q033:disabled {opacity:0.4;cursor:default;}.skeleton-box.svelte-1f1q033 {background:linear-gradient(
124
124
  90deg,
@@ -147,118 +147,118 @@ const Rt = {
147
147
  @media (min-width: 768px) {.loyalty-shop__grid.svelte-1f1q033 {grid-template-columns:repeat(4, 1fr);justify-content:start;margin:0;}.loyalty-shop__item.svelte-1f1q033 {width:100%;height:100%;box-sizing:border-box;}.loyalty-shop__item-image.svelte-1f1q033 {height:200px;}.loyalty-shop__item--skeleton.svelte-1f1q033 .loyalty-shop__item-image:where(.svelte-1f1q033) {height:200px;}
148
148
  }`
149
149
  };
150
- function Ie(h, n) {
151
- qe(n, !0), tt(h, Rt);
152
- const s = () => ft(gt, "$_", r), [r, x] = ut(), u = _(n, "apiEndpoint", 7, ""), c = _(n, "userSession", 7, ""), p = _(n, "locale", 7, ""), o = _(n, "limitItem", 7, z), E = _(n, "translationUrl");
153
- nt({ withLocale: p(), translations: {} });
154
- const Re = () => le(this, null, function* () {
150
+ function be(f, s) {
151
+ ye(s, !0), Je(f, kt);
152
+ const o = () => at(ot, "$_", r), [r, w] = tt(), u = v(s, "apiEndpoint", 7, ""), c = v(s, "userSession", 7, ""), p = v(s, "locale", 7, ""), l = v(s, "limitItem", 7, T), x = v(s, "translationUrl");
153
+ We({ withLocale: p(), translations: {} });
154
+ const ke = () => ee(this, null, function* () {
155
155
  try {
156
- const e = new URL(E(), window.location.href), a = yield fetch(e.href);
157
- if (!a.ok)
156
+ const e = new URL(x(), window.location.href), n = yield fetch(e.href);
157
+ if (!n.ok)
158
158
  throw new Error("Failed to fetch translations");
159
- const l = yield a.json();
160
- Object.entries(l).forEach(([d, q]) => {
161
- ge(d, q);
159
+ const a = yield n.json();
160
+ Object.entries(a).forEach(([i, _]) => {
161
+ re(i, _);
162
162
  });
163
163
  } catch (e) {
164
164
  console.error("loyalty shop translation url err:", e);
165
165
  }
166
166
  });
167
- Object.entries(bt).forEach(([e, a]) => {
168
- ge(e, a);
167
+ Object.entries(pt).forEach(([e, n]) => {
168
+ re(e, n);
169
169
  });
170
- let v = y(he([])), P = y(void 0), H = y(0), C = y(0), M = y(he(ve)), Y = y(!1), Q = y(!1), U = y(void 0), R = y(!1), K = y(void 0), F = 0;
171
- const Le = _e(() => typeof o() == "number" ? o() : parseInt(o(), z) || z), ie = () => {
170
+ let h = y(de([])), M = y(void 0), A = y(0), q = y(0), L = y(de(ue)), F = y(!1), J = y(!1), O = y(void 0), S = y(!1), D = y(void 0), j = 0;
171
+ const we = pe(() => typeof l() == "number" ? l() : parseInt(l(), T) || T), se = () => {
172
172
  if (!u() || !c())
173
173
  return;
174
- i(Y, !0), i(Q, !1);
175
- const e = ++F, a = t(R) && t(C) > 0;
176
- ot(
174
+ d(F, !0), d(J, !1);
175
+ const e = ++j, n = t(S) && t(q) > 0;
176
+ Ge(
177
177
  {
178
178
  apiEndpoint: u(),
179
179
  userSession: c(),
180
180
  locale: p()
181
181
  },
182
- t(C),
183
- t(M)
184
- ).then((l) => {
185
- var q, f;
186
- if (e !== F)
182
+ t(q),
183
+ t(L)
184
+ ).then((a) => {
185
+ var _, E;
186
+ if (e !== j)
187
187
  return;
188
- const d = (q = l.data) != null ? q : [];
189
- i(H, (f = l.total) != null ? f : 0, !0), a ? i(v, [...t(v), ...d], !0) : i(v, d, !0);
190
- }).catch((l) => {
191
- e === F && (i(Q, !0), console.error("Failed to load shop rewards:", l));
188
+ const i = (_ = a.data) != null ? _ : [];
189
+ d(A, (E = a.total) != null ? E : 0, !0), n ? d(h, [...t(h), ...i], !0) : d(h, i, !0);
190
+ }).catch((a) => {
191
+ e === j && (d(J, !0), console.error("Failed to load shop rewards:", a));
192
192
  }).finally(() => {
193
- e === F && i(Y, !1);
193
+ e === j && d(F, !1);
194
194
  });
195
195
  };
196
- D(() => {
197
- u(), c(), p(), t(C), t(M), ie();
198
- }), D(() => {
199
- const e = window.matchMedia("(max-width: 767px)"), a = (l) => {
200
- i(R, l.matches, !0);
196
+ U(() => {
197
+ u(), c(), p(), t(q), t(L), se();
198
+ }), U(() => {
199
+ const e = window.matchMedia("(max-width: 767px)"), n = (a) => {
200
+ d(S, a.matches, !0);
201
201
  };
202
- return i(R, e.matches, !0), e.addEventListener("change", a), () => e.removeEventListener("change", a);
203
- }), D(() => {
204
- i(M, t(R) ? ve : t(Le), !0);
205
- }), D(() => {
206
- if (!t(R) || !t(K)) return;
202
+ return d(S, e.matches, !0), e.addEventListener("change", n), () => e.removeEventListener("change", n);
203
+ }), U(() => {
204
+ d(L, t(S) ? ue : t(we), !0);
205
+ }), U(() => {
206
+ if (!t(S) || !t(D)) return;
207
207
  const e = new IntersectionObserver(
208
- (a) => {
209
- a.some((l) => l.isIntersecting) && t(v).length < t(H) && i(C, t(C) + t(M));
208
+ (n) => {
209
+ n.some((a) => a.isIntersecting) && t(h).length < t(A) && d(q, t(q) + t(L));
210
210
  },
211
211
  { rootMargin: "200px" }
212
212
  );
213
- return e.observe(t(K)), () => e.disconnect();
214
- }), at(() => {
215
- E() && Re();
213
+ return e.observe(t(D)), () => e.disconnect();
214
+ }), Ye(() => {
215
+ x() && ke();
216
216
  });
217
- const Ne = (e) => {
218
- var a, l, d;
219
- return (d = (l = (a = e.presentation) == null ? void 0 : a.assets) == null ? void 0 : l[0]) != null ? d : kt;
220
- }, X = (e) => {
221
- var a, l, d;
222
- return (d = (l = e.displayName) != null ? l : (a = e.presentation) == null ? void 0 : a.displayName) != null ? d : "";
223
- }, $ = (e) => e.available === "true", Te = (e) => {
224
- t(U) || !$(e) || mt(X(e), e.id);
225
- }, Me = (e) => le(this, null, function* () {
226
- if (!(!u() || t(U))) {
227
- i(U, e, !0);
217
+ const xe = (e) => {
218
+ var n, a, i;
219
+ return (i = (a = (n = e.presentation) == null ? void 0 : n.assets) == null ? void 0 : a[0]) != null ? i : mt;
220
+ }, W = (e) => {
221
+ var n, a, i;
222
+ return (i = (a = e.displayName) != null ? a : (n = e.presentation) == null ? void 0 : n.displayName) != null ? i : "";
223
+ }, Y = (e) => e.available === "true", Ee = (e) => {
224
+ t(O) || !Y(e) || dt(W(e), e.id);
225
+ }, qe = (e) => ee(this, null, function* () {
226
+ if (!(!u() || t(O))) {
227
+ d(O, e, !0);
228
228
  try {
229
- yield lt({ apiEndpoint: u(), userSession: c() }, e), rt(e), it(), ie();
230
- } catch (a) {
231
- dt(e, a);
229
+ yield Qe({ apiEndpoint: u(), userSession: c() }, e), Xe(e), $e(), se();
230
+ } catch (n) {
231
+ et(e, n);
232
232
  } finally {
233
- i(U, void 0);
233
+ d(O, void 0);
234
234
  }
235
235
  }
236
236
  });
237
- D(() => {
238
- const e = (a) => {
239
- var f;
240
- const { type: l, id: d, source: q } = (f = a.data) != null ? f : {};
241
- switch (l) {
242
- case ye.REDEEM_REWARD_CONFIRMED:
243
- d && t(v).some((S) => S.id === d) && Me(d);
237
+ U(() => {
238
+ const e = (n) => {
239
+ var E;
240
+ const { type: a, id: i, source: _ } = (E = n.data) != null ? E : {};
241
+ switch (a) {
242
+ case ce.REDEEM_REWARD_CONFIRMED:
243
+ i && t(h).some((z) => z.id === i) && qe(i);
244
244
  break;
245
- case ye.BACK_BUTTON_CLICKED:
246
- q === st && i(P, void 0);
245
+ case ce.BACK_BUTTON_CLICKED:
246
+ _ === Ze && d(M, void 0);
247
247
  break;
248
248
  }
249
249
  };
250
250
  return window.addEventListener("message", e), () => window.removeEventListener("message", e);
251
251
  });
252
- const Oe = () => t(v).length ? s()("generalError") : s()("noContent"), ze = (e) => {
253
- i(C, e, !0);
254
- }, Pe = (e) => {
255
- ht(e.displayName || e.presentation.displayName, e.id);
256
- }, de = (e) => {
257
- i(P, e, !0), Pe(e);
258
- }, Ue = (e) => (a) => {
259
- (a.key === "Enter" || a.key === " ") && (a.preventDefault(), de(e));
252
+ const Se = () => t(h).length ? o()("generalError") : o()("noContent"), Ie = (e) => {
253
+ d(q, e, !0);
254
+ }, Ce = (e) => {
255
+ ut(e.displayName || e.presentation.displayName, e.id);
256
+ }, ae = (e) => {
257
+ d(M, e, !0), Ce(e);
258
+ }, Re = (e) => (n) => {
259
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), ae(e));
260
260
  };
261
- var Be = {
261
+ var Le = {
262
262
  get apiEndpoint() {
263
263
  return u();
264
264
  },
@@ -278,26 +278,26 @@ function Ie(h, n) {
278
278
  p(e), b();
279
279
  },
280
280
  get limitItem() {
281
- return o();
281
+ return l();
282
282
  },
283
- set limitItem(e = z) {
284
- o(e), b();
283
+ set limitItem(e = T) {
284
+ l(e), b();
285
285
  },
286
286
  get translationUrl() {
287
- return E();
287
+ return x();
288
288
  },
289
289
  set translationUrl(e) {
290
- E(e), b();
290
+ x(e), b();
291
291
  }
292
- }, ee = Ct(), Ae = N(ee);
292
+ }, Z = _t(), Ne = C(Z);
293
293
  {
294
- var De = (e) => {
295
- _t(e, {
294
+ var Te = (e) => {
295
+ ct(e, {
296
296
  get itemId() {
297
- return t(P).id;
297
+ return t(M).id;
298
298
  },
299
299
  get elevateReward() {
300
- return t(P);
300
+ return t(M);
301
301
  },
302
302
  get apiEndpoint() {
303
303
  return u();
@@ -309,127 +309,95 @@ function Ie(h, n) {
309
309
  return p();
310
310
  }
311
311
  });
312
- }, je = (e) => {
313
- var a = be(), l = re(a);
312
+ }, Me = (e) => {
313
+ var n = ft();
314
+ me(n, 21, () => Array(t(L)), nt, (a, i, _, E) => {
315
+ var z = gt();
316
+ I(a, z);
317
+ }), k(n), I(e, n);
318
+ }, Oe = (e) => {
319
+ var n = ht(), a = C(n, !0);
320
+ k(n), ge((i) => K(a, i), [() => Se()]), I(e, n);
321
+ }, ze = (e) => {
322
+ var n = bt(), a = st(n);
323
+ me(a, 21, () => t(h), (g) => g.id, (g, m) => {
324
+ var N = yt();
325
+ let oe;
326
+ var P = C(N), Ue = pe(() => Re(t(m))), le = C(P);
327
+ k(P);
328
+ var G = B(P, 2), Be = C(G, !0);
329
+ k(G);
330
+ var Q = B(G, 2), Ae = C(Q);
331
+ k(Q);
332
+ var V = B(Q, 2), De = C(V, !0);
333
+ k(V), k(N), ge(
334
+ (X, H, je, Ve, $, He, Ke) => {
335
+ var ie;
336
+ oe = lt(N, 1, "loyalty-shop__item svelte-1f1q033", null, oe, X), fe(le, "src", H), fe(le, "alt", je), K(Be, Ve), K(Ae, `${(ie = t(m).points) != null ? ie : ""}
337
+ ${$ != null ? $ : ""}`), V.disabled = He, K(De, Ke);
338
+ },
339
+ [
340
+ () => ({
341
+ "loyalty-shop__item--unavailable": !Y(t(m))
342
+ }),
343
+ () => xe(t(m)),
344
+ () => W(t(m)),
345
+ () => W(t(m)),
346
+ () => o()("tokens"),
347
+ () => !Y(t(m)) || t(O) === t(m).id,
348
+ () => o()("buyNow")
349
+ ]
350
+ ), ne("click", P, () => ae(t(m))), ne("keydown", P, function(...X) {
351
+ var H;
352
+ (H = t(Ue)) == null || H.apply(this, X);
353
+ }), ne("click", V, () => Ee(t(m))), I(g, N);
354
+ }), k(a);
355
+ var i = B(a, 2);
314
356
  {
315
- var d = (f) => {
316
- var S = xt();
317
- ke(S, 21, () => Array(t(M)), ct, (te, ue, ce, L) => {
318
- var I = wt();
319
- k(te, I);
320
- }), w(S), k(f, S);
321
- }, q = (f) => {
322
- var S = be(), te = re(S);
323
- {
324
- var ue = (L) => {
325
- var I = Et(), B = N(I, !0);
326
- w(I), we((J) => G(B, J), [Oe]), k(L, I);
327
- }, ce = (L) => {
328
- var I = It(), B = re(I);
329
- ke(B, 21, () => t(v), (g) => g.id, (g, m) => {
330
- var O = qt();
331
- let pe;
332
- var A = N(O);
333
- A.__click = () => de(t(m));
334
- var Je = _e(() => Ue(t(m)));
335
- A.__keydown = function(...se) {
336
- var Z;
337
- (Z = t(Je)) == null || Z.apply(this, se);
338
- };
339
- var me = N(A);
340
- w(A);
341
- var ne = V(A, 2), We = N(ne, !0);
342
- w(ne);
343
- var ae = V(ne, 2), Ze = N(ae);
344
- w(ae);
345
- var W = V(ae, 2);
346
- W.__click = () => Te(t(m));
347
- var Ge = N(W, !0);
348
- w(W), w(O), we(
349
- (se, Z, Ye, Qe, oe, Xe, $e) => {
350
- var fe;
351
- pe = pt(O, 1, "loyalty-shop__item svelte-1f1q033", null, pe, se), xe(me, "src", Z), xe(me, "alt", Ye), G(We, Qe), G(Ze, `${(fe = t(m).points) != null ? fe : ""}
352
- ${oe != null ? oe : ""}`), W.disabled = Xe, G(Ge, $e);
353
- },
354
- [
355
- () => ({
356
- "loyalty-shop__item--unavailable": !$(t(m))
357
- }),
358
- () => Ne(t(m)),
359
- () => X(t(m)),
360
- () => X(t(m)),
361
- () => s()("tokens"),
362
- () => !$(t(m)) || t(U) === t(m).id,
363
- () => s()("buyNow")
364
- ]
365
- ), k(g, O);
366
- }), w(B);
367
- var J = V(B, 2);
368
- {
369
- var He = (g) => {
370
- vt(g, {
371
- get offset() {
372
- return t(C);
373
- },
374
- get limit() {
375
- return t(M);
376
- },
377
- get total() {
378
- return t(H);
379
- },
380
- onPageChange: ze,
381
- get locale() {
382
- return p();
383
- }
384
- });
385
- };
386
- j(J, (g) => {
387
- t(R) || g(He);
388
- });
389
- }
390
- var Ke = V(J, 2);
391
- {
392
- var Fe = (g) => {
393
- var m = St();
394
- yt(m, (O) => i(K, O), () => t(K)), k(g, m);
395
- };
396
- j(Ke, (g) => {
397
- t(R) && t(v).length < t(H) && g(Fe);
398
- });
399
- }
400
- k(L, I);
401
- };
402
- j(
403
- te,
404
- (L) => {
405
- !t(v).length || t(Q) ? L(ue) : L(ce, !1);
406
- },
407
- !0
408
- );
409
- }
410
- k(f, S);
357
+ var _ = (g) => {
358
+ it(g, {
359
+ get offset() {
360
+ return t(q);
361
+ },
362
+ get limit() {
363
+ return t(L);
364
+ },
365
+ get total() {
366
+ return t(A);
367
+ },
368
+ onPageChange: Ie,
369
+ get locale() {
370
+ return p();
371
+ }
372
+ });
411
373
  };
412
- j(
413
- l,
414
- (f) => {
415
- t(Y) && t(v).length === 0 ? f(d) : f(q, !1);
416
- },
417
- !0
418
- );
374
+ te(i, (g) => {
375
+ t(S) || g(_);
376
+ });
377
+ }
378
+ var E = B(i, 2);
379
+ {
380
+ var z = (g) => {
381
+ var m = vt();
382
+ rt(m, (N) => d(D, N), () => t(D)), I(g, m);
383
+ };
384
+ te(E, (g) => {
385
+ t(S) && t(h).length < t(A) && g(z);
386
+ });
419
387
  }
420
- k(e, a);
388
+ I(e, n);
421
389
  };
422
- j(Ae, (e) => {
423
- t(P) ? e(De) : e(je, !1);
390
+ te(Ne, (e) => {
391
+ t(M) ? e(Te) : t(F) && t(h).length === 0 ? e(Me, 1) : !t(h).length || t(J) ? e(Oe, 2) : e(ze, -1);
424
392
  });
425
393
  }
426
- w(ee), k(h, ee);
427
- var Ve = Se(Be);
428
- return x(), Ve;
394
+ k(Z), I(f, Z);
395
+ var Pe = ve(Le);
396
+ return w(), Pe;
429
397
  }
430
- et(["click", "keydown"]);
431
- Ee(
432
- Ie,
398
+ Fe(["click", "keydown"]);
399
+ he(
400
+ be,
433
401
  {
434
402
  apiEndpoint: {},
435
403
  userSession: {},
@@ -439,52 +407,52 @@ Ee(
439
407
  },
440
408
  [],
441
409
  [],
442
- !0
410
+ { mode: "open" }
443
411
  );
444
- function Ce(h, n) {
445
- qe(n, !0);
446
- let s = _(n, "apiEndpoint", 7, ""), r = _(n, "userSession", 7, ""), x = _(n, "locale", 7, ""), u = _(n, "limitItem", 7, z), c = _(n, "translationUrl");
412
+ function _e(f, s) {
413
+ ye(s, !0);
414
+ let o = v(s, "apiEndpoint", 7, ""), r = v(s, "userSession", 7, ""), w = v(s, "locale", 7, ""), u = v(s, "limitItem", 7, T), c = v(s, "translationUrl");
447
415
  var p = {
448
416
  get apiEndpoint() {
449
- return s();
417
+ return o();
450
418
  },
451
- set apiEndpoint(o = "") {
452
- s(o), b();
419
+ set apiEndpoint(l = "") {
420
+ o(l), b();
453
421
  },
454
422
  get userSession() {
455
423
  return r();
456
424
  },
457
- set userSession(o = "") {
458
- r(o), b();
425
+ set userSession(l = "") {
426
+ r(l), b();
459
427
  },
460
428
  get locale() {
461
- return x();
429
+ return w();
462
430
  },
463
- set locale(o = "") {
464
- x(o), b();
431
+ set locale(l = "") {
432
+ w(l), b();
465
433
  },
466
434
  get limitItem() {
467
435
  return u();
468
436
  },
469
- set limitItem(o = z) {
470
- u(o), b();
437
+ set limitItem(l = T) {
438
+ u(l), b();
471
439
  },
472
440
  get translationUrl() {
473
441
  return c();
474
442
  },
475
- set translationUrl(o) {
476
- c(o), b();
443
+ set translationUrl(l) {
444
+ c(l), b();
477
445
  }
478
446
  };
479
- return Ie(h, {
447
+ return be(f, {
480
448
  get apiEndpoint() {
481
- return s();
449
+ return o();
482
450
  },
483
451
  get userSession() {
484
452
  return r();
485
453
  },
486
454
  get locale() {
487
- return x();
455
+ return w();
488
456
  },
489
457
  get limitItem() {
490
458
  return u();
@@ -492,10 +460,10 @@ function Ce(h, n) {
492
460
  get translationUrl() {
493
461
  return c();
494
462
  }
495
- }), Se(p);
463
+ }), ve(p);
496
464
  }
497
- customElements.define("loyalty-shop", Ee(
498
- Ce,
465
+ customElements.define("loyalty-shop", he(
466
+ _e,
499
467
  {
500
468
  apiEndpoint: {},
501
469
  userSession: {},
@@ -504,14 +472,13 @@ customElements.define("loyalty-shop", Ee(
504
472
  translationUrl: {}
505
473
  },
506
474
  [],
507
- [],
508
- !1
475
+ []
509
476
  ));
510
- const Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
477
+ const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
511
478
  __proto__: null,
512
- default: Ce
479
+ default: _e
513
480
  }, Symbol.toStringTag, { value: "Module" }));
514
481
  export {
515
- Ie as L,
516
- Mt as a
482
+ be as L,
483
+ qt as a
517
484
  };