@lanaco/lnc-react-ui 4.0.133 → 4.0.135

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.
@@ -1,17 +1,17 @@
1
- import { jsx as t, jsxs as g, Fragment as Ce } from "react/jsx-runtime";
2
- import { forwardRef as M, useRef as Te, useEffect as J, Fragment as ke, createElement as Ne, useState as U, Suspense as De, memo as Ie, useMemo as Pe } from "react";
1
+ import { jsx as n, jsxs as g, Fragment as Te } from "react/jsx-runtime";
2
+ import { forwardRef as z, useRef as ke, useEffect as K, Fragment as Ne, createElement as De, useState as U, Suspense as Ie, memo as Pe, useMemo as Me } from "react";
3
3
  import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { a as O, k as q, o as de } from "./utils-BPdU4_1q.js";
5
- import { M as z } from "./consts-BuFChS64.js";
4
+ import { a as O, k as J, l as ze, o as de } from "./utils-BPdU4_1q.js";
5
+ import { M as L } from "./consts-BuFChS64.js";
6
6
  import { m as ge } from "./motion-Ckekul_K.js";
7
7
  import { P as a } from "./index-CblbdqjE.js";
8
8
  import me from "./Icon.js";
9
9
  import { D as ae } from "./ShopAvatar-4-fCYGEc.js";
10
- import Me from "./Badge.js";
11
- import { u as K } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
10
+ import Le from "./Badge.js";
11
+ import { u as Q } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
12
12
  import oe from "./IconButton.js";
13
13
  import { u as he } from "./useDetectMobile-Bkvj0VMa.js";
14
- const ze = f.div`
14
+ const Ue = f.div`
15
15
  cursor: pointer;
16
16
  display: flex;
17
17
  gap: 1rem;
@@ -19,14 +19,14 @@ const ze = f.div`
19
19
  border-radius: 20px;
20
20
  border: 1px solid var(--gray-95008, #14161a14);
21
21
 
22
- @media (max-width: ${z + "px"}) {
22
+ @media (max-width: ${L + "px"}) {
23
23
  flex-direction: column;
24
24
  padding: 0;
25
25
  gap: 0;
26
26
  border: none;
27
27
  border-radius: 0;
28
28
  }
29
- `, Le = f.div`
29
+ `, Oe = f.div`
30
30
  border-radius: ${(e) => O(e.theme, "edged")};
31
31
  height: 13.75rem;
32
32
  width: 13.75rem;
@@ -50,12 +50,12 @@ const ze = f.div`
50
50
  }
51
51
  }
52
52
 
53
- @media (max-width: ${z + "px"}) {
53
+ @media (max-width: ${L + "px"}) {
54
54
  width: 100%;
55
55
  max-width: 100dvh;
56
56
  height: 23.438rem;
57
57
  }
58
- `, Ue = f.div`
58
+ `, Ee = f.div`
59
59
  flex: 1;
60
60
  display: flex;
61
61
  flex-direction: column;
@@ -127,7 +127,7 @@ const ze = f.div`
127
127
  background-color: transparent;
128
128
  }
129
129
 
130
- @media (max-width: ${z + "px"}) {
130
+ @media (max-width: ${L + "px"}) {
131
131
  padding: 1.25rem;
132
132
 
133
133
  & .campaign-title {
@@ -141,13 +141,13 @@ const ze = f.div`
141
141
  gap: 0.25rem;
142
142
  }
143
143
  }
144
- `, ie = (e = !1, n = !1, o = !1) => `
144
+ `, ie = (e = !1, t = !1, o = !1) => `
145
145
  display: flex;
146
- ${n ? "flex-wrap: wrap;" : ""}
147
- ${n ? "" : "flex-wrap: nowrap;"}
146
+ ${t ? "flex-wrap: wrap;" : ""}
147
+ ${t ? "" : "flex-wrap: nowrap;"}
148
148
  ${e ? "align-items: center;" : ""}
149
149
  ${o ? "justify-content: center;" : ""}
150
- `, Oe = f(ge.div)`
150
+ `, je = f(ge.div)`
151
151
  text-decoration: none;
152
152
  ${(e) => e.hasPermission === !0 && "cursor: pointer"};
153
153
 
@@ -218,13 +218,13 @@ const ze = f.div`
218
218
  cursor: pointer;
219
219
  background-color: var(--gray-95080, #14161acc);
220
220
  }
221
- `, Ee = f.div`
221
+ `, Re = f.div`
222
222
  position: absolute;
223
223
  top: 0.5rem;
224
224
  ${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
225
225
  display: flex;
226
226
  gap: 0.25rem;
227
- `, je = f.div`
227
+ `, Be = f.div`
228
228
  border-radius: ${(e) => O(e.theme, e.borderRadius || "slight")};
229
229
  background-color: ${(e) => e == null ? void 0 : e.color};
230
230
  color: white;
@@ -240,62 +240,63 @@ const ze = f.div`
240
240
  & i {
241
241
  font-size: 0.813rem;
242
242
  }
243
- `, Re = M(({ src: e, ...n }, o) => {
244
- const i = Te();
245
- return J(() => {
246
- var d;
247
- const m = (c) => {
248
- c.target.src = ae, c.onerror = null;
243
+ `, Fe = z(({ src: e, ...t }, o) => {
244
+ const i = ke();
245
+ return K(() => {
246
+ var c;
247
+ const m = (d) => {
248
+ d.target.src = ae, d.onerror = null;
249
249
  };
250
- return (d = i == null ? void 0 : i.current) == null || d.addEventListener("error", m), () => {
251
- var c;
252
- (c = i == null ? void 0 : i.current) == null || c.removeEventListener("error", m);
250
+ return (c = i == null ? void 0 : i.current) == null || c.addEventListener("error", m), () => {
251
+ var d;
252
+ (d = i == null ? void 0 : i.current) == null || d.removeEventListener("error", m);
253
253
  };
254
- }, []), /* @__PURE__ */ t(ke, { ref: o, children: q(e) ? /* @__PURE__ */ t("img", { ref: i, src: e, ...n }) : /* @__PURE__ */ t("img", { src: ae, ...n }) });
254
+ }, []), /* @__PURE__ */ n(Ne, { ref: o, children: J(e) ? /* @__PURE__ */ n("img", { ref: i, src: e, ...t }) : /* @__PURE__ */ n("img", { src: ae, ...t }) });
255
255
  }), ue = (e) => {
256
256
  const {
257
- uuid: n,
257
+ uuid: t,
258
258
  hasPermission: o = !0,
259
259
  isUser: i,
260
260
  image: m,
261
+ imageComponent: c,
261
262
  name: d,
262
- notifications: c = 0,
263
- color: l = "primary",
264
- size: h = "large",
265
- style: u,
266
- disabled: C,
263
+ notifications: l = 0,
264
+ color: h = "primary",
265
+ size: u = "large",
266
+ style: N,
267
+ disabled: $,
267
268
  onClick: b = () => {
268
269
  },
269
- isActive: T,
270
- className: $,
271
- shopCategory: _,
270
+ isActive: _,
271
+ className: C,
272
+ shopCategory: y,
272
273
  // new
273
- themeData: x
274
- } = e, y = {
275
- theme: K(),
276
- color: l,
277
- size: h,
278
- style: u,
279
- disabled: C
274
+ themeData: v
275
+ } = e, D = {
276
+ theme: Q(),
277
+ color: h,
278
+ size: u,
279
+ style: N,
280
+ disabled: $
280
281
  };
281
- return /* @__PURE__ */ Ne(
282
- Oe,
282
+ return /* @__PURE__ */ De(
283
+ je,
283
284
  {
284
- onClick: (N) => {
285
- N.stopPropagation(), o === !0 && (b == null || b());
285
+ onClick: (T) => {
286
+ T.stopPropagation(), o === !0 && (b == null || b());
286
287
  },
287
- ...y,
288
+ ...D,
288
289
  key: d,
289
- className: `profile-item ${$}`,
290
+ className: `profile-item ${C}`,
290
291
  hasPermission: o,
291
- isActive: T,
292
- themeColor: (x == null ? void 0 : x.code) || "transparent"
292
+ isActive: _,
293
+ themeColor: (v == null ? void 0 : v.code) || "transparent"
293
294
  },
294
- /* @__PURE__ */ t("div", { className: "logo-wrapper", children: m }),
295
+ /* @__PURE__ */ n("div", { className: "logo-wrapper", children: ze(c) ? c : m }),
295
296
  /* @__PURE__ */ g("div", { children: [
296
- /* @__PURE__ */ t("div", { className: "name", children: d }),
297
- !i && /* @__PURE__ */ t("div", { className: "description", children: _ }),
298
- c > 0 && /* @__PURE__ */ t("div", { className: "notifications-number", children: /* @__PURE__ */ t(Me, { className: "badge", color: "danger", size: "small", children: c > 99 ? "99+" : c }) })
297
+ /* @__PURE__ */ n("div", { className: "name", children: d }),
298
+ !i && /* @__PURE__ */ n("div", { className: "description", children: y }),
299
+ l > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(Le, { className: "badge", color: "danger", size: "small", children: l > 99 ? "99+" : l }) })
299
300
  ] })
300
301
  );
301
302
  };
@@ -321,162 +322,164 @@ ue.propTypes = {
321
322
  onSelect: a.func,
322
323
  hasPermission: a.bool
323
324
  };
324
- const se = (e, n) => {
325
- if (!e || !n) return null;
326
- const o = e.getTime() - n.getTime(), i = 24 * 60 * 60 * 1e3;
325
+ const se = (e, t) => {
326
+ if (!e || !t) return null;
327
+ const o = e.getTime() - t.getTime(), i = 24 * 60 * 60 * 1e3;
327
328
  return o >= 0 ? Math.ceil(o / i) : Math.floor(o / i);
328
329
  }, le = (e) => {
329
330
  if (e !== void 0) {
330
- const n = new Date(e), o = n.getFullYear(), i = n.getMonth() + 1;
331
- return `${String(n.getDate()).padStart(2)}. ${i}. ${o}.`;
331
+ const t = new Date(e), o = t.getFullYear(), i = t.getMonth() + 1;
332
+ return `${String(t.getDate()).padStart(2)}. ${i}. ${o}.`;
332
333
  }
333
- }, fe = M((e, n) => {
334
- var ne;
335
- const o = K(), {
334
+ }, fe = z((e, t) => {
335
+ var te;
336
+ const o = Q(), {
336
337
  // uuid,
337
338
  shopUuid: i,
338
339
  title: m = "",
339
340
  // description,
340
341
  // badges,
341
- coverPhoto: d,
342
- onSelect: c,
342
+ coverPhoto: c,
343
+ onSelect: d,
343
344
  // status,
344
345
  startDate: l,
345
346
  endDate: h,
346
347
  salesPackages: u,
347
- shopName: C,
348
- shopCategory: b,
349
- shopImage: T,
350
- className: $,
351
- onSelectCard: _ = () => {
348
+ shopName: N,
349
+ shopCategory: $,
350
+ shopImage: b,
351
+ shopImageComponent: _,
352
+ className: C,
353
+ onSelectCard: y = () => {
352
354
  },
353
- onSelectShop: x = () => {
355
+ onSelectShop: v = () => {
354
356
  },
355
- upcoming: k = !1,
356
- upcomingCampaignText: y,
357
- campaignSingleText: N,
358
- salesCampaignTypes: w = [],
359
- startsInPrefixTextPlural: I,
360
- startsinSuffixTextPlural: E,
361
- startsInPrefixTextSingular: j,
362
- startsinSuffixTextSingular: R,
363
- endsInPrefixTextPlural: s,
364
- endsinSuffixTextPlural: p,
365
- endsInPrefixTextSingular: B,
366
- endsinSuffixTextSingular: Q,
367
- themeData: F,
368
- numberOfListings: L,
369
- numberOfListingsTextSingular: W,
370
- numberOfListingsTextPlural: r,
371
- ...Y
372
- } = e, ee = l ? new Date(l) <= /* @__PURE__ */ new Date() : !1, we = se(
357
+ upcoming: S = !1,
358
+ upcomingCampaignText: D,
359
+ campaignSingleText: T,
360
+ salesCampaignTypes: x = [],
361
+ startsInPrefixTextPlural: E,
362
+ startsinSuffixTextPlural: j,
363
+ startsInPrefixTextSingular: R,
364
+ startsinSuffixTextSingular: s,
365
+ endsInPrefixTextPlural: p,
366
+ endsinSuffixTextPlural: H,
367
+ endsInPrefixTextSingular: G,
368
+ endsinSuffixTextSingular: B,
369
+ themeData: Y,
370
+ numberOfListings: P,
371
+ numberOfListingsTextSingular: r,
372
+ numberOfListingsTextPlural: Z,
373
+ ...we
374
+ } = e, ee = l ? new Date(l) <= /* @__PURE__ */ new Date() : !1, ve = se(
373
375
  l ? new Date(l) : null,
374
376
  /* @__PURE__ */ new Date()
375
- ), A = se(
377
+ ), F = se(
376
378
  h ? new Date(h) : null,
377
379
  /* @__PURE__ */ new Date()
378
- ), ve = A !== null && A <= 2 && A > 0, re = h ? new Date(h).getTime() : null, be = Date.now(), Z = re !== null ? re - be : null, V = Z !== null && Z > 0 && Z < 24 * 60 * 60 * 1e3, te = (S, H, v, P, D) => v === 1 ? `${S} ${v} ${P}` : `${H} ${v} ${D}`, ye = () => {
380
+ ), be = F !== null && F <= 2 && F > 0, re = h ? new Date(h).getTime() : null, ye = Date.now(), q = re !== null ? re - ye : null, W = q !== null && q > 0 && q < 24 * 60 * 60 * 1e3, ne = (k, V, w, M, I) => w === 1 ? `${k} ${w} ${M}` : `${V} ${w} ${I}`, $e = () => {
379
381
  if (!h) return null;
380
- const S = $e, v = new Date(h).getTime() - S.getTime();
381
- if (v <= 0) return null;
382
- const P = Math.floor(v / (1e3 * 60 * 60)), D = Math.floor(v % (1e3 * 60 * 60) / (1e3 * 60)), Se = Math.floor(v % (1e3 * 60) / 1e3);
383
- return { hours: P, minutes: D, seconds: Se };
384
- }, [$e, _e] = U(/* @__PURE__ */ new Date());
385
- J(() => {
386
- if (!V) return;
387
- const S = setInterval(() => {
388
- _e(/* @__PURE__ */ new Date());
382
+ const k = _e, w = new Date(h).getTime() - k.getTime();
383
+ if (w <= 0) return null;
384
+ const M = Math.floor(w / (1e3 * 60 * 60)), I = Math.floor(w % (1e3 * 60 * 60) / (1e3 * 60)), Se = Math.floor(w % (1e3 * 60) / 1e3);
385
+ return { hours: M, minutes: I, seconds: Se };
386
+ }, [_e, Ce] = U(/* @__PURE__ */ new Date());
387
+ K(() => {
388
+ if (!W) return;
389
+ const k = setInterval(() => {
390
+ Ce(/* @__PURE__ */ new Date());
389
391
  }, 1e3);
390
- return () => clearInterval(S);
391
- }, [V]);
392
- const X = V ? ye() : null;
392
+ return () => clearInterval(k);
393
+ }, [W]);
394
+ const A = W ? $e() : null;
393
395
  return /* @__PURE__ */ g(
394
- ze,
396
+ Ue,
395
397
  {
396
- ref: n,
398
+ ref: t,
397
399
  theme: o,
398
- className: $,
399
- onClick: _,
400
- ...Y,
400
+ className: C,
401
+ onClick: y,
402
+ ...we,
401
403
  children: [
402
- /* @__PURE__ */ g(Le, { theme: o, onClick: () => c == null ? void 0 : c(), children: [
403
- /* @__PURE__ */ t("img", { src: d }),
404
- /* @__PURE__ */ t(Ee, { children: u == null ? void 0 : u.map((S, H) => {
405
- var v, P;
406
- return /* @__PURE__ */ t(
407
- je,
404
+ /* @__PURE__ */ g(Oe, { theme: o, onClick: () => d == null ? void 0 : d(), children: [
405
+ /* @__PURE__ */ n("img", { src: c }),
406
+ /* @__PURE__ */ n(Re, { children: u == null ? void 0 : u.map((k, V) => {
407
+ var w, M;
408
+ return /* @__PURE__ */ n(
409
+ Be,
408
410
  {
409
- color: (v = w == null ? void 0 : w.find((D) => D.value === S)) == null ? void 0 : v.color,
411
+ color: (w = x == null ? void 0 : x.find((I) => I.value === k)) == null ? void 0 : w.color,
410
412
  theme: o,
411
- children: /* @__PURE__ */ t(
413
+ children: /* @__PURE__ */ n(
412
414
  me,
413
415
  {
414
- icon: (P = w == null ? void 0 : w.find((D) => D.value === S)) == null ? void 0 : P.icon
416
+ icon: (M = x == null ? void 0 : x.find((I) => I.value === k)) == null ? void 0 : M.icon
415
417
  }
416
418
  )
417
419
  },
418
- `package__${H}`
420
+ `package__${V}`
419
421
  );
420
422
  }) })
421
423
  ] }),
422
- /* @__PURE__ */ g(Ue, { theme: o, children: [
423
- /* @__PURE__ */ t("div", { className: "text-block-wrapper", children: /* @__PURE__ */ g("div", { className: "title-block-wrapper", children: [
424
- /* @__PURE__ */ t("div", { className: "campaign-title", children: (ne = k ? y : N) == null ? void 0 : ne.toUpperCase() }),
425
- /* @__PURE__ */ t("div", { className: "campaign-title-text", children: m }),
424
+ /* @__PURE__ */ g(Ee, { theme: o, children: [
425
+ /* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ g("div", { className: "title-block-wrapper", children: [
426
+ /* @__PURE__ */ n("div", { className: "campaign-title", children: (te = S ? D : T) == null ? void 0 : te.toUpperCase() }),
427
+ /* @__PURE__ */ n("div", { className: "campaign-title-text", children: m }),
426
428
  h && l && /* @__PURE__ */ g("div", { children: [
427
429
  le(l),
428
430
  " - ",
429
431
  le(h)
430
432
  ] }),
431
433
  /* @__PURE__ */ g("div", { className: "timestamp-text", children: [
432
- L > 0 && /* @__PURE__ */ g("span", { className: "listings-text", children: [
433
- L,
434
+ P > 0 && /* @__PURE__ */ g("span", { className: "listings-text", children: [
435
+ P,
434
436
  " ",
435
- L === 1 ? W : r,
437
+ P === 1 ? r : Z,
436
438
  " ",
437
439
  "∙",
438
440
  " "
439
441
  ] }),
440
- /* @__PURE__ */ t(
442
+ /* @__PURE__ */ n(
441
443
  "span",
442
444
  {
443
- className: `duration-text ${ve ? "urgent" : ""} ${ee ? "" : "starts-in"}`,
444
- children: V && X ? /* @__PURE__ */ g("div", { className: "countdown-timer", children: [
445
- B,
445
+ className: `duration-text ${be ? "urgent" : ""} ${ee ? "" : "starts-in"}`,
446
+ children: W && A ? /* @__PURE__ */ g("div", { className: "countdown-timer", children: [
447
+ G,
446
448
  " ",
447
- X.hours.toString().padStart(2, "0"),
449
+ A.hours.toString().padStart(2, "0"),
448
450
  ":",
449
- X.minutes.toString().padStart(2, "0"),
451
+ A.minutes.toString().padStart(2, "0"),
450
452
  ":",
451
- X.seconds.toString().padStart(2, "0")
452
- ] }) : ee ? te(
453
+ A.seconds.toString().padStart(2, "0")
454
+ ] }) : ee ? ne(
455
+ G,
456
+ p,
457
+ F,
453
458
  B,
454
- s,
455
- A,
456
- Q,
457
- p
458
- ) : te(
459
- j,
460
- I,
461
- we,
459
+ H
460
+ ) : ne(
462
461
  R,
463
- E
462
+ E,
463
+ ve,
464
+ s,
465
+ j
464
466
  )
465
467
  }
466
468
  )
467
469
  ] })
468
470
  ] }) }),
469
- /* @__PURE__ */ t(
471
+ /* @__PURE__ */ n(
470
472
  ue,
471
473
  {
472
474
  hasPermission: !0,
473
- image: /* @__PURE__ */ t(Re, { src: T }),
474
- themeData: F,
475
+ image: /* @__PURE__ */ n(Fe, { src: b }),
476
+ imageComponent: _,
477
+ themeData: Y,
475
478
  isActive: !0,
476
479
  isUser: !1,
477
- name: C,
478
- shopCategory: b,
479
- onClick: () => x(i)
480
+ name: N,
481
+ shopCategory: $,
482
+ onClick: () => v(i)
480
483
  }
481
484
  )
482
485
  ] })
@@ -521,7 +524,7 @@ f.div`
521
524
  }
522
525
  }
523
526
 
524
- @media (max-width: ${z + "px"}) {
527
+ @media (max-width: ${L + "px"}) {
525
528
  & .campaign-item {
526
529
  min-width: 100%;
527
530
  width: 100%;
@@ -529,13 +532,13 @@ f.div`
529
532
  }
530
533
  }
531
534
  `;
532
- const G = f.div`
535
+ const X = f.div`
533
536
  width: ${(e) => e.width || "100%"};
534
537
  height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
535
538
  background-color: var(--gray-200, #dddfe4);
536
539
 
537
540
  ${de("-90deg")}
538
- `, Be = f.div`
541
+ `, We = f.div`
539
542
  display: flex;
540
543
  flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
541
544
  gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
@@ -551,7 +554,7 @@ const G = f.div`
551
554
  flex-shrink: 0;
552
555
 
553
556
  ${de()}
554
- `, Fe = f.div`
557
+ `, Ae = f.div`
555
558
  background: var(--white, #fff);
556
559
  border-radius: ${(e) => O(e.theme, "edged")};
557
560
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
@@ -580,59 +583,59 @@ const G = f.div`
580
583
  gap: 0.5rem;
581
584
  }
582
585
 
583
- @media (max-width: ${z + "px"}) {
586
+ @media (max-width: ${L + "px"}) {
584
587
  flex-direction: column;
585
588
 
586
589
  & .campaign__user {
587
590
  margin-top: 1rem;
588
591
  }
589
592
  }
590
- `, We = f.div`
593
+ `, Ve = f.div`
591
594
  display: flex;
592
595
  gap: 1.5rem;
593
- `, Ae = M(({}, e) => {
594
- const n = K();
595
- return /* @__PURE__ */ g(Fe, { ref: e, theme: n, children: [
596
- /* @__PURE__ */ t("div", { className: "campaign__left-section", children: /* @__PURE__ */ t(
596
+ `, Xe = z(({}, e) => {
597
+ const t = Q();
598
+ return /* @__PURE__ */ g(Ae, { ref: e, theme: t, children: [
599
+ /* @__PURE__ */ n("div", { className: "campaign__left-section", children: /* @__PURE__ */ n(
597
600
  ce,
598
601
  {
599
- theme: n,
602
+ theme: t,
600
603
  width: "15rem",
601
604
  height: "15rem",
602
605
  borderRadius: "edged"
603
606
  }
604
607
  ) }),
605
608
  /* @__PURE__ */ g("div", { className: "campaign__right-section", children: [
606
- /* @__PURE__ */ g(Be, { theme: n, children: [
607
- /* @__PURE__ */ t(G, { heightCoeff: 0.75, theme: n, width: "35%" }),
608
- /* @__PURE__ */ t(G, { heightCoeff: 1.25, theme: n }),
609
- /* @__PURE__ */ t(G, { heightCoeff: 3, theme: n })
609
+ /* @__PURE__ */ g(We, { theme: t, children: [
610
+ /* @__PURE__ */ n(X, { heightCoeff: 0.75, theme: t, width: "35%" }),
611
+ /* @__PURE__ */ n(X, { heightCoeff: 1.25, theme: t }),
612
+ /* @__PURE__ */ n(X, { heightCoeff: 3, theme: t })
610
613
  ] }),
611
614
  /* @__PURE__ */ g("div", { className: "campaign__user", children: [
612
- /* @__PURE__ */ t(
615
+ /* @__PURE__ */ n(
613
616
  ce,
614
617
  {
615
- theme: n,
618
+ theme: t,
616
619
  width: "2.5rem",
617
620
  height: "2.5rem",
618
621
  borderRadius: "curved"
619
622
  }
620
623
  ),
621
- /* @__PURE__ */ t(G, { theme: n, width: "75%" })
624
+ /* @__PURE__ */ n(X, { theme: t, width: "75%" })
622
625
  ] })
623
626
  ] })
624
627
  ] });
625
- }), Ve = ({ itemsCount: e = 5, keyPrefix: n }) => /* @__PURE__ */ t(We, { children: Array.from({ length: e }, (o, i) => /* @__PURE__ */ t(
626
- Ae,
628
+ }), He = ({ itemsCount: e = 5, keyPrefix: t }) => /* @__PURE__ */ n(Ve, { children: Array.from({ length: e }, (o, i) => /* @__PURE__ */ n(
629
+ Xe,
627
630
  {},
628
- `${n}-skeleton-campaign-card-${i}`
629
- )) }), Xe = ({
631
+ `${t}-skeleton-campaign-card-${i}`
632
+ )) }), Ge = ({
630
633
  children: e,
631
- fallbackComponent: n = /* @__PURE__ */ t(Ce, {}),
634
+ fallbackComponent: t = /* @__PURE__ */ n(Te, {}),
632
635
  isLoading: o = !1,
633
636
  itemsCount: i = 5,
634
637
  keyPrefix: m
635
- }) => /* @__PURE__ */ t(De, { fallback: n, children: o === !0 ? /* @__PURE__ */ t(Ve, { itemsCount: i, keyPrefix: m }) : e }), He = f.div`
638
+ }) => /* @__PURE__ */ n(Ie, { fallback: t, children: o === !0 ? /* @__PURE__ */ n(He, { itemsCount: i, keyPrefix: m }) : e }), Ye = f.div`
636
639
  margin: 0 auto;
637
640
  display: flex;
638
641
  flex-direction: column;
@@ -673,56 +676,56 @@ const G = f.div`
673
676
  top: 0;
674
677
  right: 0;
675
678
  }
676
- `, Ge = f(ge.div)`
679
+ `, Ze = f(ge.div)`
677
680
  display: grid;
678
681
  grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumns}, 1fr);
679
682
  gap: 1.5rem;
680
683
  width: 100%;
681
684
 
682
- @media (max-width: ${z + "px"}) {
685
+ @media (max-width: ${L + "px"}) {
683
686
  grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumnsForMobile}, 1fr);
684
687
  }
685
- `, pe = M(
688
+ `, pe = z(
686
689
  ({
687
690
  icon: e,
688
- title: n,
691
+ title: t,
689
692
  numOfSlides: o = 2,
690
693
  numOfSlidesForMobile: i = 1,
691
694
  showNavigation: m = !0,
692
- children: d
693
- }, c) => {
694
- const [l, h] = U(0), [u, C] = U(1), [b, T] = U(null), [$, _] = U(null), x = he(), k = 50, y = (d == null ? void 0 : d.length) ?? 1;
695
- J(() => {
695
+ children: c
696
+ }, d) => {
697
+ const [l, h] = U(0), [u, N] = U(1), [$, b] = U(null), [_, C] = U(null), y = he(), v = 50, S = (c == null ? void 0 : c.length) ?? 1;
698
+ K(() => {
696
699
  const s = () => {
697
- C(x ? i : o);
700
+ N(y ? i : o);
698
701
  };
699
702
  return window.addEventListener("resize", s), s(), () => window.removeEventListener("resize", s);
700
703
  }, []);
701
- const N = d == null ? void 0 : d.slice(l, l + u), w = (s) => {
704
+ const D = c == null ? void 0 : c.slice(l, l + u), T = (s) => {
702
705
  var p;
703
- (p = s == null ? void 0 : s.target) == null || p.blur(), l + u < y && h(l + u);
704
- }, I = (s) => {
706
+ (p = s == null ? void 0 : s.target) == null || p.blur(), l + u < S && h(l + u);
707
+ }, x = (s) => {
705
708
  var p;
706
709
  (p = s == null ? void 0 : s.target) == null || p.blur(), l - u >= 0 && h(l - u);
707
710
  };
708
711
  return /* @__PURE__ */ g(
709
- He,
712
+ Ye,
710
713
  {
711
- ref: c,
712
- ...x ? { onTouchStart: (s) => {
714
+ ref: d,
715
+ ...y ? { onTouchStart: (s) => {
713
716
  var p;
714
- _(null), T((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
717
+ C(null), b((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
715
718
  }, onTouchMove: (s) => {
716
719
  var p;
717
- _((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
720
+ C((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
718
721
  }, onTouchEnd: () => {
719
- if (!b || !$) return;
720
- const s = b - $;
721
- s > k && w(), s < -k && I();
722
+ if (!$ || !_) return;
723
+ const s = $ - _;
724
+ s > v && T(), s < -v && x();
722
725
  } } : {},
723
726
  children: [
724
- /* @__PURE__ */ t("div", { className: "scrollable-section__header", children: /* @__PURE__ */ g("div", { className: "scrollable-section__title", children: [
725
- q(e) && /* @__PURE__ */ t(
727
+ /* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ g("div", { className: "scrollable-section__title", children: [
728
+ J(e) && /* @__PURE__ */ n(
726
729
  me,
727
730
  {
728
731
  icon: e,
@@ -731,10 +734,10 @@ const G = f.div`
731
734
  className: "title__icon"
732
735
  }
733
736
  ),
734
- q(n) && /* @__PURE__ */ t("div", { className: "title__text", children: n })
737
+ J(t) && /* @__PURE__ */ n("div", { className: "title__text", children: t })
735
738
  ] }) }),
736
- /* @__PURE__ */ t(
737
- Ge,
739
+ /* @__PURE__ */ n(
740
+ Ze,
738
741
  {
739
742
  numOfColumns: o,
740
743
  numOfColumnsForMobile: i,
@@ -746,12 +749,12 @@ const G = f.div`
746
749
  x: 10,
747
750
  opacity: 0
748
751
  },
749
- children: N
752
+ children: D
750
753
  },
751
754
  `scrollable-section__content-${l}`
752
755
  ),
753
- m && y > u && !x && /* @__PURE__ */ g("div", { className: "scrollable-section__navigation", children: [
754
- /* @__PURE__ */ t(
756
+ m && S > u && !y && /* @__PURE__ */ g("div", { className: "scrollable-section__navigation", children: [
757
+ /* @__PURE__ */ n(
755
758
  oe,
756
759
  {
757
760
  icon: "angle-left",
@@ -760,10 +763,10 @@ const G = f.div`
760
763
  color: "neutral",
761
764
  className: "navigation__arrow",
762
765
  disabled: l === 0,
763
- onClick: I
766
+ onClick: x
764
767
  }
765
768
  ),
766
- /* @__PURE__ */ t(
769
+ /* @__PURE__ */ n(
767
770
  oe,
768
771
  {
769
772
  icon: "angle-right",
@@ -771,8 +774,8 @@ const G = f.div`
771
774
  btnType: "tinted",
772
775
  color: "neutral",
773
776
  className: "navigation__arrow",
774
- disabled: l + u >= y,
775
- onClick: w
777
+ disabled: l + u >= S,
778
+ onClick: T
776
779
  }
777
780
  )
778
781
  ] })
@@ -788,7 +791,7 @@ pe.propTypes = {
788
791
  numOfSlidesForMobile: a.number,
789
792
  showNavigation: a.bool
790
793
  };
791
- const Ye = f.div`
794
+ const qe = f.div`
792
795
  display: flex;
793
796
  flex: 1;
794
797
  width: 100%;
@@ -805,21 +808,21 @@ const Ye = f.div`
805
808
  border-radius: 1.25rem;
806
809
  object-fit: cover;
807
810
  }
808
- `, xe = M(
811
+ `, xe = z(
809
812
  ({
810
813
  sectionName: e,
811
- imageUrl: n,
814
+ imageUrl: t,
812
815
  maxHeight: o = "16.25rem",
813
816
  className: i = "",
814
817
  handleClick: m = () => {
815
818
  }
816
- }) => /* @__PURE__ */ t(
817
- Ye,
819
+ }) => /* @__PURE__ */ n(
820
+ qe,
818
821
  {
819
822
  maxHeight: o,
820
823
  onClick: m,
821
824
  className: `itemless-banner ${i}`,
822
- children: /* @__PURE__ */ t("img", { src: n, alt: `itemless-banner__${e}` })
825
+ children: /* @__PURE__ */ n("img", { src: t, alt: `itemless-banner__${e}` })
823
826
  }
824
827
  )
825
828
  );
@@ -830,43 +833,43 @@ xe.propTypes = {
830
833
  className: a.string,
831
834
  handleClick: a.func
832
835
  };
833
- const Ze = Ie(fe), cr = M(
836
+ const Je = Pe(fe), gr = z(
834
837
  ({
835
838
  sellerType: e = "Shop",
836
- items: n = [],
839
+ items: t = [],
837
840
  title: o,
838
841
  icon: i,
839
842
  isLoading: m,
840
- onSelectCard: d = () => {
843
+ onSelectCard: c = () => {
841
844
  },
842
- onSelectShop: c = () => {
845
+ onSelectShop: d = () => {
843
846
  },
844
847
  getImage: l = () => {
845
848
  },
846
849
  campaignSingleText: h,
847
850
  upcomingCampaignText: u,
848
- salesCampaignTypes: C = [],
849
- startsInPrefixTextPlural: b,
850
- startsinSuffixTextPlural: T,
851
- startsInPrefixTextSingular: $,
852
- startsinSuffixTextSingular: _,
853
- endsInPrefixTextPlural: x,
854
- endsinSuffixTextPlural: k,
855
- endsInPrefixTextSingular: y,
856
- endsinSuffixTextSingular: N,
857
- numOfSlides: w = 2,
858
- numOfSlidesForMobile: I = 1,
851
+ salesCampaignTypes: N = [],
852
+ startsInPrefixTextPlural: $,
853
+ startsinSuffixTextPlural: b,
854
+ startsInPrefixTextSingular: _,
855
+ startsinSuffixTextSingular: C,
856
+ endsInPrefixTextPlural: y,
857
+ endsinSuffixTextPlural: v,
858
+ endsInPrefixTextSingular: S,
859
+ endsinSuffixTextSingular: D,
860
+ numOfSlides: T = 2,
861
+ numOfSlidesForMobile: x = 1,
859
862
  showNavigation: E = !0,
860
863
  numberOfListingsTextSingular: j,
861
864
  numberOfListingsTextPlural: R,
862
865
  itemlessImageUrl: s,
863
866
  itemlessLink: p,
864
- handleItemlessLink: B = () => {
867
+ handleItemlessLink: H = () => {
865
868
  }
866
- }, Q) => {
867
- const F = he(), L = Pe(() => {
868
- let W = n == null ? void 0 : n.map((r, Y) => /* @__PURE__ */ t(
869
- Ze,
869
+ }, G) => {
870
+ const B = he(), Y = Me(() => {
871
+ let P = t == null ? void 0 : t.map((r, Z) => /* @__PURE__ */ n(
872
+ Je,
870
873
  {
871
874
  className: "campaign-item",
872
875
  coverPhoto: l(
@@ -878,60 +881,61 @@ const Ze = Ie(fe), cr = M(
878
881
  salesPackages: r == null ? void 0 : r.salesPackages,
879
882
  sellerType: e,
880
883
  shopImage: r == null ? void 0 : r.profileImage,
884
+ shopImageComponent: r == null ? void 0 : r.profileImageComponent,
881
885
  shopName: r == null ? void 0 : r.shopName,
882
886
  shopUuid: r == null ? void 0 : r.shopUuid,
883
887
  shopCategory: r == null ? void 0 : r.shopCategory,
884
888
  startDate: r == null ? void 0 : r.startDate,
885
889
  title: r == null ? void 0 : r.name,
886
890
  uuid: r == null ? void 0 : r.campaignUuid,
887
- onSelectCard: () => d(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
888
- onSelectShop: () => c(r == null ? void 0 : r.shopUuid),
891
+ onSelectCard: () => c(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
892
+ onSelectShop: () => d(r == null ? void 0 : r.shopUuid),
889
893
  campaignSingleText: h,
890
894
  upcomingCampaignText: u,
891
895
  upcoming: r == null ? void 0 : r.upcoming,
892
- salesCampaignTypes: C,
893
- startsInPrefixTextPlural: b,
894
- startsinSuffixTextPlural: T,
895
- startsInPrefixTextSingular: $,
896
- startsinSuffixTextSingular: _,
897
- endsInPrefixTextPlural: x,
898
- endsinSuffixTextPlural: k,
899
- endsInPrefixTextSingular: y,
900
- endsinSuffixTextSingular: N,
896
+ salesCampaignTypes: N,
897
+ startsInPrefixTextPlural: $,
898
+ startsinSuffixTextPlural: b,
899
+ startsInPrefixTextSingular: _,
900
+ startsinSuffixTextSingular: C,
901
+ endsInPrefixTextPlural: y,
902
+ endsinSuffixTextPlural: v,
903
+ endsInPrefixTextSingular: S,
904
+ endsinSuffixTextSingular: D,
901
905
  themeData: r == null ? void 0 : r.themeData,
902
906
  numberOfListings: r == null ? void 0 : r.numberOfListings,
903
907
  numberOfListingsTextSingular: j,
904
908
  numberOfListingsTextPlural: R
905
909
  },
906
- `campaign__item__${Y}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
910
+ `campaign__item__${Z}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
907
911
  ));
908
- return (n == null ? void 0 : n.length) < 2 && !F ? [
909
- ...W,
910
- /* @__PURE__ */ t(
912
+ return (t == null ? void 0 : t.length) < 2 && !B ? [
913
+ ...P,
914
+ /* @__PURE__ */ n(
911
915
  xe,
912
916
  {
913
917
  imageUrl: s,
914
918
  className: "campaign-item",
915
- handleClick: B
919
+ handleClick: H
916
920
  }
917
921
  )
918
- ] : W;
919
- }, [n]);
920
- return /* @__PURE__ */ t(
921
- Xe,
922
+ ] : P;
923
+ }, [t]);
924
+ return /* @__PURE__ */ n(
925
+ Ge,
922
926
  {
923
927
  isLoading: m,
924
- itemsCount: F ? 1 : 2,
928
+ itemsCount: B ? 1 : 2,
925
929
  keyPrefix: "sales-camp",
926
- children: /* @__PURE__ */ t(
930
+ children: /* @__PURE__ */ n(
927
931
  pe,
928
932
  {
929
933
  icon: i,
930
934
  title: o,
931
- numOfSlides: w,
932
- numOfSlidesForMobile: I,
935
+ numOfSlides: T,
936
+ numOfSlidesForMobile: x,
933
937
  showNavigation: E,
934
- children: L
938
+ children: Y
935
939
  }
936
940
  )
937
941
  }
@@ -939,5 +943,5 @@ const Ze = Ie(fe), cr = M(
939
943
  }
940
944
  );
941
945
  export {
942
- cr as default
946
+ gr as default
943
947
  };