@everymatrix/loyalty-shop 0.1.14 → 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,49 +1,49 @@
1
- import { y as Xe, c as be, p as ke, a as $e, b as h, s as et, d as ce, z as g, A as pe, N as me, C as A, m as t, E as l, B as tt, G as fe, S as nt, i as D, h as _, j as we, O as T, P as at, u as ge, H as st, I as ot, J as lt, K as rt, v as C, k as v, l as it, n as I, r as b, f as he, g as se, Q as ve, R as dt, t as ye, q as Z, o as j, T as ut, M as _e, L as ct, w as pt, $ as mt, U as ft, V as gt, W as ht } from "./LoyaltyPagination-B-q5gKJj.js";
2
- import { L as vt } from "./LoyaltyShopItem-C2xuJLoW.js";
1
+ import { y as He, c as pe, p as me, a as Ke, b as h, s as Fe, d as ae, z as f, A as oe, O as le, C as O, m as t, E as i, B as Je, G as ie, S as We, i as X, h as x, j as ge, P as R, Q as Ye, u as re, H as Ze, I as Ge, J as Qe, K as Xe, v as q, k as y, l as $e, n as E, r as b, R as de, T as et, t as ue, q as V, g as tt, o as z, w as nt, $ as st, U as at, N as ce, L as $, V as ot, W as lt, M as it, X as rt } from "./LoyaltyPagination-5mlynRsD.js";
2
+ import { L as dt } from "./LoyaltyShopItem-qD3S4Ug2.js";
3
3
  typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
4
4
  }, globalThis.customElements = { define() {
5
5
  }, get() {
6
6
  }, whenDefined() {
7
7
  } });
8
8
  if (typeof window < "u") {
9
- let k = function(n) {
10
- return function(...s) {
9
+ let _ = function(n) {
10
+ return function(...o) {
11
11
  try {
12
- return n.apply(this, s);
13
- } catch (o) {
14
- if (o instanceof DOMException && o.message.includes("has already been used with this registry") || o instanceof Error && o.message.includes("Cannot define multiple custom elements with the same tag name"))
12
+ return n.apply(this, o);
13
+ } catch (l) {
14
+ if (l instanceof DOMException && l.message.includes("has already been used with this registry") || l instanceof Error && l.message.includes("Cannot define multiple custom elements with the same tag name"))
15
15
  return !1;
16
- throw o;
16
+ throw l;
17
17
  }
18
18
  };
19
19
  };
20
- customElements.define = k(customElements.define), import("./LoyaltyPagination-B-q5gKJj.js").then((n) => n.X).then((n) => {
21
- const s = n.default || n;
22
- customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", s.element || s);
20
+ customElements.define = _(customElements.define), import("./LoyaltyPagination-5mlynRsD.js").then((n) => n.Y).then((n) => {
21
+ const o = n.default || n;
22
+ customElements.get("loyalty-pagination") || customElements.define("loyalty-pagination", o.element || o);
23
23
  }).catch((n) => {
24
24
  console.error("BOOT ERROR:", n);
25
25
  });
26
26
  }
27
27
  if (typeof window < "u") {
28
- let k = function(n) {
29
- return function(...s) {
28
+ let _ = function(n) {
29
+ return function(...o) {
30
30
  try {
31
- return n.apply(this, s);
32
- } catch (o) {
33
- if (o instanceof DOMException && o.message.includes("has already been used with this registry") || o instanceof Error && o.message.includes("Cannot define multiple custom elements with the same tag name"))
31
+ return n.apply(this, o);
32
+ } catch (l) {
33
+ if (l instanceof DOMException && l.message.includes("has already been used with this registry") || l instanceof Error && l.message.includes("Cannot define multiple custom elements with the same tag name"))
34
34
  return !1;
35
- throw o;
35
+ throw l;
36
36
  }
37
37
  };
38
38
  };
39
- customElements.define = k(customElements.define), import("./LoyaltyShopItem-C2xuJLoW.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);
39
+ customElements.define = _(customElements.define), import("./LoyaltyShopItem-qD3S4Ug2.js").then((n) => n.a).then((n) => {
40
+ const o = n.default || n;
41
+ customElements.get("loyalty-shop-item") || customElements.define("loyalty-shop-item", o.element || o);
42
42
  }).catch((n) => {
43
43
  console.error("BOOT ERROR:", n);
44
44
  });
45
45
  }
46
- const yt = {
46
+ const ut = {
47
47
  en: {
48
48
  loading: "Loading…",
49
49
  noContent: "There are no bonus items available for redemption.",
@@ -100,9 +100,9 @@ const yt = {
100
100
  buyNow: "Vásárlás",
101
101
  generalError: "Hiba történt. Kérjük, próbáld újra."
102
102
  }
103
- }, _t = "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 bt = C('<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>'), kt = C('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton svelte-1f1q033"></div>'), wt = C('<div class="loyalty-shop__unavailable svelte-1f1q033"> </div>'), xt = C('<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>'), Et = C('<div class="load-more-sentinel svelte-1f1q033" aria-hidden="true"></div>'), qt = C('<div class="loyalty-shop__grid svelte-1f1q033"></div> <!> <!>', 1), St = C('<div class="loyalty-shop svelte-1f1q033"><!></div>');
105
- const It = {
103
+ }, ct = "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 pt = q('<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>'), mt = q('<div class="loyalty-shop__grid loyalty-shop__grid--skeleton svelte-1f1q033"></div>'), gt = q('<div class="loyalty-shop__unavailable svelte-1f1q033"> </div>'), ft = q('<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>'), ht = q('<div class="load-more-sentinel svelte-1f1q033" aria-hidden="true"></div>'), yt = q('<div class="loyalty-shop__grid svelte-1f1q033"></div> <!> <!>', 1), vt = q('<div class="loyalty-shop svelte-1f1q033"><!></div>');
105
+ const bt = {
106
106
  hash: "svelte-1f1q033",
107
107
  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(
108
108
  90deg,
@@ -131,279 +131,247 @@ const It = {
131
131
  @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;}
132
132
  }`
133
133
  };
134
- function xe(k, n) {
135
- ke(n, !0), $e(k, It);
136
- const s = () => pt(mt, "$_", o), [o, M] = it(), u = h(n, "apiEndpoint", 7, ""), c = h(n, "userSession", 7, ""), y = h(n, "locale", 7, ""), r = h(n, "limitItem", 7, T), V = h(n, "translationUrl");
137
- et({ withLocale: y(), translations: {} });
138
- const qe = async () => {
134
+ function fe(_, n) {
135
+ me(n, !0), Ke(_, bt);
136
+ const o = () => nt(st, "$_", l), [l, L] = $e(), c = h(n, "apiEndpoint", 7, ""), p = h(n, "userSession", 7, ""), v = h(n, "locale", 7, ""), r = h(n, "limitItem", 7, R), P = h(n, "translationUrl");
137
+ Fe({ withLocale: v(), translations: {} });
138
+ const ye = async () => {
139
139
  try {
140
- const e = new URL(V(), window.location.href), a = await fetch(e.href);
141
- if (!a.ok)
140
+ const e = new URL(P(), window.location.href), s = await fetch(e.href);
141
+ if (!s.ok)
142
142
  throw new Error("Failed to fetch translations");
143
- const i = await a.json();
144
- Object.entries(i).forEach(([f, P]) => {
145
- ce(f, P);
143
+ const a = await s.json();
144
+ Object.entries(a).forEach(([d, I]) => {
145
+ ae(d, I);
146
146
  });
147
147
  } catch (e) {
148
148
  console.error("loyalty shop translation url err:", e);
149
149
  }
150
150
  };
151
- Object.entries(yt).forEach(([e, a]) => {
152
- ce(e, a);
151
+ Object.entries(ut).forEach(([e, s]) => {
152
+ ae(e, s);
153
153
  });
154
- let m = g(pe([])), O = g(void 0), H = g(0), E = g(0), R = g(pe(me)), G = g(!1), Y = g(!1), z = g(void 0), q = g(!1), K = g(void 0), F = 0;
155
- const Se = ge(() => typeof r() == "number" ? r() : parseInt(r(), T) || T), oe = () => {
156
- if (!u() || !c())
154
+ let g = f(oe([])), N = f(void 0), U = f(0), k = f(0), S = f(oe(le)), H = f(!1), K = f(!1), T = f(void 0), w = f(!1), B = f(void 0), A = 0;
155
+ const ve = re(() => typeof r() == "number" ? r() : parseInt(r(), R) || R), ee = () => {
156
+ if (!c() || !p())
157
157
  return;
158
- l(G, !0), l(Y, !1);
159
- const e = ++F, a = t(q) && t(E) > 0;
160
- at(
158
+ i(H, !0), i(K, !1);
159
+ const e = ++A, s = t(w) && t(k) > 0;
160
+ Ye(
161
161
  {
162
- apiEndpoint: u(),
163
- userSession: c(),
164
- locale: y()
162
+ apiEndpoint: c(),
163
+ userSession: p(),
164
+ locale: v()
165
165
  },
166
- t(E),
167
- t(R)
168
- ).then((i) => {
169
- if (e !== F)
166
+ t(k),
167
+ t(S)
168
+ ).then((a) => {
169
+ if (e !== A)
170
170
  return;
171
- const f = i.data ?? [];
172
- l(H, i.total ?? 0, !0), a ? l(m, [...t(m), ...f], !0) : l(m, f, !0);
173
- }).catch((i) => {
174
- e === F && (l(Y, !0), console.error("Failed to load shop rewards:", i));
171
+ const d = a.data ?? [];
172
+ i(U, a.total ?? 0, !0), s ? i(g, [...t(g), ...d], !0) : i(g, d, !0);
173
+ }).catch((a) => {
174
+ e === A && (i(K, !0), console.error("Failed to load shop rewards:", a));
175
175
  }).finally(() => {
176
- e === F && l(G, !1);
176
+ e === A && i(H, !1);
177
177
  });
178
178
  };
179
- A(() => {
180
- u(), c(), y(), t(E), t(R), oe();
181
- }), A(() => {
182
- const e = window.matchMedia("(max-width: 767px)"), a = (i) => {
183
- l(q, i.matches, !0);
179
+ O(() => {
180
+ c(), p(), v(), t(k), t(S), ee();
181
+ }), O(() => {
182
+ const e = window.matchMedia("(max-width: 767px)"), s = (a) => {
183
+ i(w, a.matches, !0);
184
184
  };
185
- return l(q, e.matches, !0), e.addEventListener("change", a), () => e.removeEventListener("change", a);
186
- }), A(() => {
187
- l(R, t(q) ? me : t(Se), !0);
188
- }), A(() => {
189
- if (!t(q) || !t(K)) return;
185
+ return i(w, e.matches, !0), e.addEventListener("change", s), () => e.removeEventListener("change", s);
186
+ }), O(() => {
187
+ i(S, t(w) ? le : t(ve), !0);
188
+ }), O(() => {
189
+ if (!t(w) || !t(B)) return;
190
190
  const e = new IntersectionObserver(
191
- (a) => {
192
- a.some((i) => i.isIntersecting) && t(m).length < t(H) && l(E, t(E) + t(R));
191
+ (s) => {
192
+ s.some((a) => a.isIntersecting) && t(g).length < t(U) && i(k, t(k) + t(S));
193
193
  },
194
194
  { rootMargin: "200px" }
195
195
  );
196
- return e.observe(t(K)), () => e.disconnect();
197
- }), tt(() => {
198
- V() && qe();
196
+ return e.observe(t(B)), () => e.disconnect();
197
+ }), Je(() => {
198
+ P() && ye();
199
199
  });
200
- const Ie = (e) => e.presentation?.assets?.[0] ?? _t, Q = (e) => e.displayName ?? e.presentation?.displayName ?? "", X = (e) => e.available === "true", Ce = (e) => {
201
- t(z) || !X(e) || ct(Q(e), e.id);
202
- }, Re = async (e) => {
203
- if (!(!u() || t(z))) {
204
- l(z, e, !0);
200
+ const be = (e) => e.presentation?.assets?.[0] ?? ct, F = (e) => e.displayName ?? e.presentation?.displayName ?? "", J = (e) => e.available === "true", _e = (e) => {
201
+ t(T) || !J(e) || it(F(e), e.id);
202
+ }, ke = async (e) => {
203
+ if (!(!c() || t(T))) {
204
+ i(T, e, !0);
205
205
  try {
206
- await st({ apiEndpoint: u(), userSession: c() }, e), ot(e), lt(), oe();
207
- } catch (a) {
208
- rt(e, a);
206
+ await Ze({ apiEndpoint: c(), userSession: p() }, e), Ge(e), Qe(), ee();
207
+ } catch (s) {
208
+ Xe(e, s);
209
209
  } finally {
210
- l(z, void 0);
210
+ i(T, void 0);
211
211
  }
212
212
  }
213
213
  };
214
- A(() => {
215
- const e = (a) => {
216
- const { type: i, id: f, source: P } = a.data ?? {};
217
- switch (i) {
218
- case fe.REDEEM_REWARD_CONFIRMED:
219
- f && t(m).some((w) => w.id === f) && Re(f);
214
+ O(() => {
215
+ const e = (s) => {
216
+ const { type: a, id: d, source: I } = s.data ?? {};
217
+ switch (a) {
218
+ case ie.REDEEM_REWARD_CONFIRMED:
219
+ d && t(g).some((D) => D.id === d) && ke(d);
220
220
  break;
221
- case fe.BACK_BUTTON_CLICKED:
222
- P === nt && l(O, void 0);
221
+ case ie.BACK_BUTTON_CLICKED:
222
+ I === We && i(N, void 0);
223
223
  break;
224
224
  }
225
225
  };
226
226
  return window.addEventListener("message", e), () => window.removeEventListener("message", e);
227
227
  });
228
- const Le = () => t(m).length ? s()("generalError") : s()("noContent"), Ne = (e) => {
229
- l(E, e, !0);
230
- }, Te = (e) => {
231
- ft(e.displayName || e.presentation.displayName, e.id);
232
- }, le = (e) => {
233
- l(O, e, !0), Te(e);
234
- }, Me = (e) => (a) => {
235
- (a.key === "Enter" || a.key === " ") && (a.preventDefault(), le(e));
228
+ const we = () => t(g).length ? o()("generalError") : o()("noContent"), xe = (e) => {
229
+ i(k, e, !0);
230
+ }, Ee = (e) => {
231
+ rt(e.displayName || e.presentation.displayName, e.id);
232
+ }, te = (e) => {
233
+ i(N, e, !0), Ee(e);
234
+ }, qe = (e) => (s) => {
235
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), te(e));
236
236
  };
237
- var Oe = {
237
+ var Se = {
238
238
  get apiEndpoint() {
239
- return u();
239
+ return c();
240
240
  },
241
241
  set apiEndpoint(e = "") {
242
- u(e), v();
242
+ c(e), y();
243
243
  },
244
244
  get userSession() {
245
- return c();
245
+ return p();
246
246
  },
247
247
  set userSession(e = "") {
248
- c(e), v();
248
+ p(e), y();
249
249
  },
250
250
  get locale() {
251
- return y();
251
+ return v();
252
252
  },
253
253
  set locale(e = "") {
254
- y(e), v();
254
+ v(e), y();
255
255
  },
256
256
  get limitItem() {
257
257
  return r();
258
258
  },
259
- set limitItem(e = T) {
260
- r(e), v();
259
+ set limitItem(e = R) {
260
+ r(e), y();
261
261
  },
262
262
  get translationUrl() {
263
- return V();
263
+ return P();
264
264
  },
265
265
  set translationUrl(e) {
266
- V(e), v();
266
+ P(e), y();
267
267
  }
268
- }, $ = St(), ze = I($);
268
+ }, W = vt(), Ie = E(W);
269
269
  {
270
- var Pe = (e) => {
271
- vt(e, {
270
+ var Ce = (e) => {
271
+ dt(e, {
272
272
  get itemId() {
273
- return t(O).id;
273
+ return t(N).id;
274
274
  },
275
275
  get elevateReward() {
276
- return t(O);
276
+ return t(N);
277
277
  },
278
278
  get apiEndpoint() {
279
- return u();
279
+ return c();
280
280
  },
281
281
  get userSession() {
282
- return c();
282
+ return p();
283
283
  },
284
284
  get locale() {
285
- return y();
285
+ return v();
286
286
  }
287
287
  });
288
- }, Ue = (e) => {
289
- var a = he(), i = se(a);
288
+ }, Re = (e) => {
289
+ var s = mt();
290
+ de(s, 21, () => Array(t(S)), et, (a, d, I, D) => {
291
+ var Y = pt();
292
+ x(a, Y);
293
+ }), b(s), x(e, s);
294
+ }, Le = (e) => {
295
+ var s = gt(), a = E(s, !0);
296
+ b(s), ue((d) => V(a, d), [() => we()]), x(e, s);
297
+ }, Ne = (e) => {
298
+ var s = yt(), a = tt(s);
299
+ de(a, 21, () => t(g), (m) => m.id, (m, u) => {
300
+ var C = ft();
301
+ let ne;
302
+ var M = E(C), Me = re(() => qe(t(u))), se = E(M);
303
+ b(M);
304
+ var Z = z(M, 2), Oe = E(Z, !0);
305
+ b(Z);
306
+ var G = z(Z, 2), ze = E(G);
307
+ b(G);
308
+ var j = z(G, 2), Pe = E(j, !0);
309
+ b(j), b(C), ue(
310
+ (Q, Ue, Be, Ae, De, je, Ve) => {
311
+ ne = at(C, 1, "loyalty-shop__item svelte-1f1q033", null, ne, Q), ce(se, "src", Ue), ce(se, "alt", Be), V(Oe, Ae), V(ze, `${t(u).points ?? ""}
312
+ ${De ?? ""}`), j.disabled = je, V(Pe, Ve);
313
+ },
314
+ [
315
+ () => ({
316
+ "loyalty-shop__item--unavailable": !J(t(u))
317
+ }),
318
+ () => be(t(u)),
319
+ () => F(t(u)),
320
+ () => F(t(u)),
321
+ () => o()("tokens"),
322
+ () => !J(t(u)) || t(T) === t(u).id,
323
+ () => o()("buyNow")
324
+ ]
325
+ ), $("click", M, () => te(t(u))), $("keydown", M, function(...Q) {
326
+ t(Me)?.apply(this, Q);
327
+ }), $("click", j, () => _e(t(u))), x(m, C);
328
+ }), b(a);
329
+ var d = z(a, 2);
290
330
  {
291
- var f = (w) => {
292
- var L = kt();
293
- ve(L, 21, () => Array(t(R)), dt, (ee, re, ie, S) => {
294
- var x = bt();
295
- _(ee, x);
296
- }), b(L), _(w, L);
297
- }, P = (w) => {
298
- var L = he(), ee = se(L);
299
- {
300
- var re = (S) => {
301
- var x = wt(), U = I(x, !0);
302
- b(x), ye((J) => Z(U, J), [Le]), _(S, x);
303
- }, ie = (S) => {
304
- var x = qt(), U = se(x);
305
- ve(U, 21, () => t(m), (p) => p.id, (p, d) => {
306
- var N = xt();
307
- let de;
308
- var B = I(N);
309
- B.__click = () => le(t(d));
310
- var Ve = ge(() => Me(t(d)));
311
- B.__keydown = function(...ae) {
312
- t(Ve)?.apply(this, ae);
313
- };
314
- var ue = I(B);
315
- b(B);
316
- var te = j(B, 2), He = I(te, !0);
317
- b(te);
318
- var ne = j(te, 2), Ke = I(ne);
319
- b(ne);
320
- var W = j(ne, 2);
321
- W.__click = () => Ce(t(d));
322
- var Fe = I(W, !0);
323
- b(W), b(N), ye(
324
- (ae, Je, We, Ze, Ge, Ye, Qe) => {
325
- de = ut(N, 1, "loyalty-shop__item svelte-1f1q033", null, de, ae), _e(ue, "src", Je), _e(ue, "alt", We), Z(He, Ze), Z(Ke, `${t(d).points ?? ""}
326
- ${Ge ?? ""}`), W.disabled = Ye, Z(Fe, Qe);
327
- },
328
- [
329
- () => ({
330
- "loyalty-shop__item--unavailable": !X(t(d))
331
- }),
332
- () => Ie(t(d)),
333
- () => Q(t(d)),
334
- () => Q(t(d)),
335
- () => s()("tokens"),
336
- () => !X(t(d)) || t(z) === t(d).id,
337
- () => s()("buyNow")
338
- ]
339
- ), _(p, N);
340
- }), b(U);
341
- var J = j(U, 2);
342
- {
343
- var Ae = (p) => {
344
- gt(p, {
345
- get offset() {
346
- return t(E);
347
- },
348
- get limit() {
349
- return t(R);
350
- },
351
- get total() {
352
- return t(H);
353
- },
354
- onPageChange: Ne,
355
- get locale() {
356
- return y();
357
- }
358
- });
359
- };
360
- D(J, (p) => {
361
- t(q) || p(Ae);
362
- });
363
- }
364
- var De = j(J, 2);
365
- {
366
- var je = (p) => {
367
- var d = Et();
368
- ht(d, (N) => l(K, N), () => t(K)), _(p, d);
369
- };
370
- D(De, (p) => {
371
- t(q) && t(m).length < t(H) && p(je);
372
- });
373
- }
374
- _(S, x);
375
- };
376
- D(
377
- ee,
378
- (S) => {
379
- !t(m).length || t(Y) ? S(re) : S(ie, !1);
380
- },
381
- !0
382
- );
383
- }
384
- _(w, L);
331
+ var I = (m) => {
332
+ ot(m, {
333
+ get offset() {
334
+ return t(k);
335
+ },
336
+ get limit() {
337
+ return t(S);
338
+ },
339
+ get total() {
340
+ return t(U);
341
+ },
342
+ onPageChange: xe,
343
+ get locale() {
344
+ return v();
345
+ }
346
+ });
385
347
  };
386
- D(
387
- i,
388
- (w) => {
389
- t(G) && t(m).length === 0 ? w(f) : w(P, !1);
390
- },
391
- !0
392
- );
348
+ X(d, (m) => {
349
+ t(w) || m(I);
350
+ });
351
+ }
352
+ var D = z(d, 2);
353
+ {
354
+ var Y = (m) => {
355
+ var u = ht();
356
+ lt(u, (C) => i(B, C), () => t(B)), x(m, u);
357
+ };
358
+ X(D, (m) => {
359
+ t(w) && t(g).length < t(U) && m(Y);
360
+ });
393
361
  }
394
- _(e, a);
362
+ x(e, s);
395
363
  };
396
- D(ze, (e) => {
397
- t(O) ? e(Pe) : e(Ue, !1);
364
+ X(Ie, (e) => {
365
+ t(N) ? e(Ce) : t(H) && t(g).length === 0 ? e(Re, 1) : !t(g).length || t(K) ? e(Le, 2) : e(Ne, -1);
398
366
  });
399
367
  }
400
- b($), _(k, $);
401
- var Be = we(Oe);
402
- return M(), Be;
368
+ b(W), x(_, W);
369
+ var Te = ge(Se);
370
+ return L(), Te;
403
371
  }
404
- Xe(["click", "keydown"]);
405
- be(
406
- xe,
372
+ He(["click", "keydown"]);
373
+ pe(
374
+ fe,
407
375
  {
408
376
  apiEndpoint: {},
409
377
  userSession: {},
@@ -413,63 +381,63 @@ be(
413
381
  },
414
382
  [],
415
383
  [],
416
- !0
384
+ { mode: "open" }
417
385
  );
418
- function Ee(k, n) {
419
- ke(n, !0);
420
- let s = h(n, "apiEndpoint", 7, ""), o = h(n, "userSession", 7, ""), M = h(n, "locale", 7, ""), u = h(n, "limitItem", 7, T), c = h(n, "translationUrl");
421
- var y = {
386
+ function he(_, n) {
387
+ me(n, !0);
388
+ let o = h(n, "apiEndpoint", 7, ""), l = h(n, "userSession", 7, ""), L = h(n, "locale", 7, ""), c = h(n, "limitItem", 7, R), p = h(n, "translationUrl");
389
+ var v = {
422
390
  get apiEndpoint() {
423
- return s();
391
+ return o();
424
392
  },
425
393
  set apiEndpoint(r = "") {
426
- s(r), v();
394
+ o(r), y();
427
395
  },
428
396
  get userSession() {
429
- return o();
397
+ return l();
430
398
  },
431
399
  set userSession(r = "") {
432
- o(r), v();
400
+ l(r), y();
433
401
  },
434
402
  get locale() {
435
- return M();
403
+ return L();
436
404
  },
437
405
  set locale(r = "") {
438
- M(r), v();
406
+ L(r), y();
439
407
  },
440
408
  get limitItem() {
441
- return u();
409
+ return c();
442
410
  },
443
- set limitItem(r = T) {
444
- u(r), v();
411
+ set limitItem(r = R) {
412
+ c(r), y();
445
413
  },
446
414
  get translationUrl() {
447
- return c();
415
+ return p();
448
416
  },
449
417
  set translationUrl(r) {
450
- c(r), v();
418
+ p(r), y();
451
419
  }
452
420
  };
453
- return xe(k, {
421
+ return fe(_, {
454
422
  get apiEndpoint() {
455
- return s();
423
+ return o();
456
424
  },
457
425
  get userSession() {
458
- return o();
426
+ return l();
459
427
  },
460
428
  get locale() {
461
- return M();
429
+ return L();
462
430
  },
463
431
  get limitItem() {
464
- return u();
432
+ return c();
465
433
  },
466
434
  get translationUrl() {
467
- return c();
435
+ return p();
468
436
  }
469
- }), we(y);
437
+ }), ge(v);
470
438
  }
471
- customElements.define("loyalty-shop", be(
472
- Ee,
439
+ customElements.define("loyalty-shop", pe(
440
+ he,
473
441
  {
474
442
  apiEndpoint: {},
475
443
  userSession: {},
@@ -478,14 +446,13 @@ customElements.define("loyalty-shop", be(
478
446
  translationUrl: {}
479
447
  },
480
448
  [],
481
- [],
482
- !1
449
+ []
483
450
  ));
484
- const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
451
+ const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
485
452
  __proto__: null,
486
- default: Ee
453
+ default: he
487
454
  }, Symbol.toStringTag, { value: "Module" }));
488
455
  export {
489
- xe as L,
490
- Lt as a
456
+ fe as L,
457
+ wt as a
491
458
  };