@billgangcom/theme-lib 1.68.0 → 1.69.2

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 (202) hide show
  1. package/dist/App.d.ts +2 -3
  2. package/dist/abstractions/IBlock.d.ts +1 -1
  3. package/dist/abstractions/PageContext.d.ts +73 -69
  4. package/dist/{builder/constants/api.d.ts → api/constants.d.ts} +2 -0
  5. package/dist/api/index.d.ts +1 -6
  6. package/dist/api/request.d.ts +8 -4
  7. package/dist/assets/storefront-icons/index.d.ts +10 -0
  8. package/dist/builder/api/index.d.ts +4 -0
  9. package/dist/builder/components/BlockColors/index.d.ts +1 -1
  10. package/dist/builder/components/BlockSettings/settings.d.ts +1 -1
  11. package/dist/builder/components/HeaderSaveButton/api/index.d.ts +1 -4
  12. package/dist/builder/components/HeaderSaveButton/utils/index.d.ts +1 -1
  13. package/dist/builder/components/HeaderSettingsPages/api/index.d.ts +1 -4
  14. package/dist/builder/components/ThemeSettingsColors/utils/getDuplicateColors.d.ts +1 -1
  15. package/dist/builder/constants/index.d.ts +0 -2
  16. package/dist/builder/constants/notification.d.ts +1 -0
  17. package/dist/builder/constants/theme-settings.d.ts +5 -0
  18. package/dist/builder/store/useGeneralStore.d.ts +3 -3
  19. package/dist/builder/store/useNotificationStore.d.ts +2 -2
  20. package/dist/builder/ui/ChooseImage/api/index.d.ts +2 -8
  21. package/dist/builder/ui/Notification/index.d.ts +11 -0
  22. package/dist/builder/ui/index.d.ts +0 -2
  23. package/dist/builder.cjs.js +133 -49
  24. package/dist/builder.es.js +18282 -2905
  25. package/dist/index-C4QNkEHy.js +15889 -0
  26. package/dist/index-DxsasI6U.cjs +80 -0
  27. package/dist/index.cjs.js +1 -1
  28. package/dist/index.es.js +8 -8
  29. package/dist/lib/createTicket.d.ts +1 -4
  30. package/dist/lib/generateDynamicStyles.d.ts +1 -1
  31. package/dist/lib/setupDynamicFonts.d.ts +1 -1
  32. package/dist/pages/balance/balance-modal.d.ts +7 -0
  33. package/dist/pages/balance/index.d.ts +1 -0
  34. package/dist/pages/balance/model.d.ts +6 -0
  35. package/dist/pages/charge/index.d.ts +1 -0
  36. package/dist/pages/checkout/index.d.ts +1 -0
  37. package/dist/pages/checkout/model.d.ts +1 -0
  38. package/dist/pages/dynamic-page/api/index.d.ts +1 -4
  39. package/dist/pages/error-page/api/index.d.ts +1 -4
  40. package/dist/pages/home/index.d.ts +1 -0
  41. package/dist/pages/home/model.d.ts +26 -0
  42. package/dist/pages/order/index.d.ts +1 -0
  43. package/dist/pages/order/model.d.ts +91 -0
  44. package/dist/pages/orders/index.d.ts +1 -0
  45. package/dist/pages/orders/model.d.ts +4 -0
  46. package/dist/pages/rewards/index.d.ts +1 -0
  47. package/dist/pages/rewards/model.d.ts +71 -0
  48. package/dist/pages/subscription/index.d.ts +1 -0
  49. package/dist/pages/subscription/model.d.ts +1 -0
  50. package/dist/pages/subscriptions/index.d.ts +1 -0
  51. package/dist/pages/subscriptions/model.d.ts +6 -0
  52. package/dist/pages/ticket/index.d.ts +1 -0
  53. package/dist/pages/ticket/model.d.ts +24 -0
  54. package/dist/pages/tickets/index.d.ts +1 -0
  55. package/dist/pages/tickets/model.d.ts +21 -0
  56. package/dist/pages/top-up-balance/index.d.ts +1 -0
  57. package/dist/storefront/api/auth.d.ts +20 -0
  58. package/dist/storefront/api/charge.d.ts +1 -0
  59. package/dist/storefront/api/coupon.d.ts +2 -0
  60. package/dist/storefront/api/customer.d.ts +6 -0
  61. package/dist/storefront/api/discord.d.ts +7 -0
  62. package/dist/storefront/api/fetchGatewaysDetail.d.ts +1 -0
  63. package/dist/storefront/api/fetchThemeAndSettings.d.ts +1 -0
  64. package/dist/storefront/api/fetchWithPages.d.ts +11 -0
  65. package/dist/storefront/api/index.d.ts +18 -0
  66. package/dist/storefront/api/order.d.ts +14 -0
  67. package/dist/storefront/api/postBalanceTopUp.d.ts +2 -0
  68. package/dist/storefront/api/postCashappLink.d.ts +3 -0
  69. package/dist/storefront/api/referral.d.ts +3 -0
  70. package/dist/storefront/api/reviews.d.ts +2 -0
  71. package/dist/storefront/api/signUpReferral.d.ts +2 -0
  72. package/dist/storefront/api/store.d.ts +6 -0
  73. package/dist/storefront/api/subscription.d.ts +22 -0
  74. package/dist/storefront/api/ticket.d.ts +7 -0
  75. package/dist/storefront/api/transactions.d.ts +5 -0
  76. package/dist/storefront/components/ActivePaymentMethod/index.d.ts +2 -0
  77. package/dist/storefront/components/ActiveSubscriptionProduct/index.d.ts +9 -0
  78. package/dist/storefront/components/Auth/index.d.ts +11 -0
  79. package/dist/storefront/components/Auth/otp-input.d.ts +7 -0
  80. package/dist/storefront/components/AuthModal/index.d.ts +6 -0
  81. package/dist/storefront/components/CancelSubscription/index.d.ts +8 -0
  82. package/dist/storefront/components/CashAppVerify/index.d.ts +7 -0
  83. package/dist/storefront/components/ChangePaymentMethod/index.d.ts +7 -0
  84. package/dist/storefront/components/ChangeSubscriptionPlan/index.d.ts +10 -0
  85. package/dist/storefront/components/ChargeBlocksRenderer/index.d.ts +6 -0
  86. package/dist/storefront/components/ChargeItems/index.d.ts +7 -0
  87. package/dist/storefront/components/ChargeStatusBlock/index.d.ts +10 -0
  88. package/dist/storefront/components/CheckoutFooter/index.d.ts +6 -0
  89. package/dist/storefront/components/CheckoutHeader/index.d.ts +7 -0
  90. package/dist/storefront/components/CheckoutItems/index.d.ts +18 -0
  91. package/dist/storefront/components/CheckoutOperational/index.d.ts +24 -0
  92. package/dist/storefront/components/CheckoutOrderMainData/index.d.ts +9 -0
  93. package/dist/storefront/components/CheckoutPrices/index.d.ts +12 -0
  94. package/dist/storefront/components/CheckoutProduct/index.d.ts +8 -0
  95. package/dist/storefront/components/CheckoutProduct/model.d.ts +1 -0
  96. package/dist/storefront/components/ChoosePlanUpgradeMethod/index.d.ts +9 -0
  97. package/dist/storefront/components/ConnectDiscord/index.d.ts +6 -0
  98. package/dist/storefront/components/ConnectDiscord/model.d.ts +22 -0
  99. package/dist/storefront/components/Coupon/index.d.ts +12 -0
  100. package/dist/storefront/components/CustomFields/index.d.ts +13 -0
  101. package/dist/storefront/components/CustomerDashboard/index.d.ts +2 -0
  102. package/dist/storefront/components/DeliveryItem/index.d.ts +7 -0
  103. package/dist/storefront/components/InsufficientBalance/index.d.ts +8 -0
  104. package/dist/storefront/components/LeaveAReview/index.d.ts +9 -0
  105. package/dist/storefront/components/NoItemsBlock/index.d.ts +7 -0
  106. package/dist/storefront/components/OpenDelivery/index.d.ts +8 -0
  107. package/dist/storefront/components/OrderStatusBlock/index.d.ts +9 -0
  108. package/dist/storefront/components/OrdersTable/index.d.ts +16 -0
  109. package/dist/storefront/components/PageLoading/index.d.ts +7 -0
  110. package/dist/storefront/components/PageTitle/index.d.ts +6 -0
  111. package/dist/storefront/components/Pagination/index.d.ts +15 -0
  112. package/dist/storefront/components/PayPalF&FNote/index.d.ts +8 -0
  113. package/dist/storefront/components/PaymentMethod/checkout-balance-payment-method.d.ts +13 -0
  114. package/dist/storefront/components/PaymentMethod/index.d.ts +15 -0
  115. package/dist/storefront/components/PaymentMethod/model.d.ts +16 -0
  116. package/dist/storefront/components/PaymentMethods/index.d.ts +18 -0
  117. package/dist/storefront/components/ProcessingPayment/index.d.ts +1 -0
  118. package/dist/storefront/components/ReferralBlock/index.d.ts +13 -0
  119. package/dist/storefront/components/ReferralBlock/mask.d.ts +1 -0
  120. package/dist/storefront/components/ReferralBlock/referral-modal.d.ts +7 -0
  121. package/dist/storefront/components/ReferralBlock/step-item.d.ts +8 -0
  122. package/dist/storefront/components/SecuredBySsl/index.d.ts +1 -0
  123. package/dist/storefront/components/Sidebar/card.d.ts +6 -0
  124. package/dist/storefront/components/Sidebar/index.d.ts +1 -0
  125. package/dist/storefront/components/Sidebar/nav-list.d.ts +2 -0
  126. package/dist/storefront/components/StatItem/index.d.ts +14 -0
  127. package/dist/storefront/components/StatusIndicator/index.d.ts +7 -0
  128. package/dist/storefront/components/SubmitReview/index.d.ts +7 -0
  129. package/dist/storefront/components/SubscriptionCoupon/index.d.ts +7 -0
  130. package/dist/storefront/components/SubscriptionExpiration/index.d.ts +6 -0
  131. package/dist/storefront/components/SubscriptionExpirationDate/index.d.ts +2 -0
  132. package/dist/storefront/components/SubscriptionProduct/index.d.ts +7 -0
  133. package/dist/storefront/components/SubscriptionProduct/model.d.ts +9 -0
  134. package/dist/storefront/components/SubscriptionStatusBadge/index.d.ts +5 -0
  135. package/dist/storefront/components/SubscriptionsTable/index.d.ts +11 -0
  136. package/dist/storefront/components/Table/index.d.ts +19 -0
  137. package/dist/storefront/components/TermsOfService/index.d.ts +1 -0
  138. package/dist/storefront/components/TicketRow/index.d.ts +5 -0
  139. package/dist/storefront/components/TrackPayment/index.d.ts +8 -0
  140. package/dist/storefront/components/index.d.ts +53 -0
  141. package/dist/storefront/constants/api.d.ts +3 -0
  142. package/dist/storefront/constants/index.d.ts +3 -0
  143. package/dist/storefront/constants/referralSteps.d.ts +6 -0
  144. package/dist/storefront/constants/routes.d.ts +8 -0
  145. package/dist/storefront/hooks/index.d.ts +2 -0
  146. package/dist/storefront/hooks/useCart.d.ts +186 -0
  147. package/dist/storefront/hooks/useCopy.d.ts +1 -0
  148. package/dist/storefront/index.d.ts +9 -0
  149. package/dist/storefront/models/balance.d.ts +46 -0
  150. package/dist/storefront/models/charge.d.ts +75 -0
  151. package/dist/storefront/models/checkout.d.ts +16 -0
  152. package/dist/storefront/models/coupon.d.ts +5 -0
  153. package/dist/storefront/models/discord.d.ts +22 -0
  154. package/dist/storefront/models/gateway.d.ts +8 -0
  155. package/dist/storefront/models/index.d.ts +15 -0
  156. package/dist/storefront/models/order.d.ts +131 -0
  157. package/dist/storefront/models/payment.d.ts +15 -0
  158. package/dist/storefront/models/post.d.ts +5 -0
  159. package/dist/storefront/models/price.d.ts +5 -0
  160. package/dist/storefront/models/referral.d.ts +12 -0
  161. package/dist/storefront/models/referralCode.d.ts +3 -0
  162. package/dist/{builder/constants/general.d.ts → storefront/models/shop.d.ts} +19 -6
  163. package/dist/storefront/models/subscription.d.ts +129 -0
  164. package/dist/storefront/models/transaction.d.ts +12 -0
  165. package/dist/storefront/store/index.d.ts +6 -0
  166. package/dist/storefront/store/useCartStore.d.ts +25 -0
  167. package/dist/storefront/store/useCustomerDashboardStore.d.ts +32 -0
  168. package/dist/storefront/store/useDiscordStore.d.ts +7 -0
  169. package/dist/storefront/store/usePaginationPagesStore.d.ts +6 -0
  170. package/dist/storefront/store/useStorefrontStore.d.ts +21 -0
  171. package/dist/storefront/store/useSubscriptionStore.d.ts +7 -0
  172. package/dist/storefront/ui/ActiveBadge/index.d.ts +5 -0
  173. package/dist/storefront/ui/InputRange/index.d.ts +9 -0
  174. package/dist/storefront/ui/ProgressBar/index.d.ts +8 -0
  175. package/dist/storefront/ui/Rating/index.d.ts +8 -0
  176. package/dist/storefront/ui/Timer/index.d.ts +6 -0
  177. package/dist/storefront/ui/index.d.ts +5 -0
  178. package/dist/storefront/utils/index.d.ts +16 -0
  179. package/dist/storefront/utils/recapcha.d.ts +12 -0
  180. package/dist/ui/Button/index.d.ts +1 -1
  181. package/dist/ui/CategorySettings/index.d.ts +1 -1
  182. package/dist/ui/GroupCardModal/index.d.ts +13 -0
  183. package/dist/ui/Input/index.d.ts +2 -0
  184. package/dist/ui/ItemsSettings/index.d.ts +1 -1
  185. package/dist/ui/ListingSelector/index.d.ts +1 -1
  186. package/dist/ui/Loader/index.d.ts +4 -0
  187. package/dist/ui/Modal/index.d.ts +9 -0
  188. package/dist/ui/Radio/index.d.ts +14 -0
  189. package/dist/ui/Select/index.d.ts +20 -0
  190. package/dist/ui/Select/utils/index.d.ts +2 -0
  191. package/dist/ui/index.d.ts +5 -0
  192. package/dist/ui.cjs.js +1 -1
  193. package/dist/ui.es.js +1277 -1281
  194. package/package.json +7 -3
  195. package/dist/api/fetchThemeAndSettings.d.ts +0 -4
  196. package/dist/index-BaU8m6yb.cjs +0 -194
  197. package/dist/index-zSoKRTpK.js +0 -34420
  198. /package/dist/{api → builder/api}/fetchAll.d.ts +0 -0
  199. /package/dist/{api → builder/api}/fetchData.d.ts +0 -0
  200. /package/dist/{api → builder/api}/fetchFontsData.d.ts +0 -0
  201. /package/dist/{api → builder/api}/fetchPagesData.d.ts +0 -0
  202. /package/dist/{api → storefront/api}/fetchGeneral.d.ts +0 -0
package/dist/ui.es.js CHANGED
@@ -1,20 +1,18 @@
1
- import { j as t, I as b, c as F, d as bt, u as lt, e as dt, P as ut, S as ot, R as kt, D as pt, f as ht, v as mt, B as ct, g as st, h as Ct, a as St, O as rt, i as et, k as _t, C as gt, l as V, m as Bt, n as Tt, o as ft, p as Mt, r as jt, t as G, L as At, w as xt, x as it, s as yt, y as z, z as Ot, M as Nt, A as $t, E as Et, F as qt, G as wt, H as Rt, J as Dt, K as zt, N as Lt } from "./index-zSoKRTpK.js";
2
- import { X as sa, U as na, W as ia, Q as aa, T as oa, V as ca } from "./index-zSoKRTpK.js";
3
- import f from "react";
4
- const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht = "_subtitle_kh9z8_23", Yt = "_alignmentContent_kh9z8_30", Wt = "_alignments_kh9z8_39", Gt = "_alignment_kh9z8_30", Xt = "_circle_kh9z8_64", Qt = "_paddings_kh9z8_71", Jt = "_padding_kh9z8_71", Kt = "_active_kh9z8_97", Zt = "_input_kh9z8_104", W = {
5
- wrapper: Ft,
6
- block: Ut,
7
- title: Vt,
8
- subtitle: Ht,
9
- alignmentContent: Yt,
10
- alignments: Wt,
11
- alignment: Gt,
12
- circle: Xt,
13
- paddings: Qt,
14
- padding: Jt,
15
- active: Kt,
16
- input: Zt
17
- }, te = [
1
+ import { j as t, I as v, c as F, b as Nt, u as ht, d as pt, P as mt, S as rt, R as kt, D as gt, e as ft, v as xt, B as lt, f as nt, a as wt, g as Pt, O as ut, h as Z, i as _t, C as jt, k as V, l as $t, m as qt, n as vt, o as Ot, p as yt, q as X, L as At, r as Ct, t as bt, w as at, s as it, x as D, y as Et, M as dt, z as ot, A as Dt, E as Mt, F as Rt, G as Bt, H as Lt } from "./index-C4QNkEHy.js";
2
+ import { X as Yn, U as Gn, N as Wn, W as Xn, K as Qn, Q as Jn, T as Kn, J as Zn, V as ti } from "./index-C4QNkEHy.js";
3
+ import m from "react";
4
+ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23", Ft = "_alignmentContent_kh9z8_30", Vt = "_alignments_kh9z8_39", Yt = "_alignment_kh9z8_30", Gt = "_circle_kh9z8_64", Wt = "_paddings_kh9z8_71", Xt = "_padding_kh9z8_71", Qt = "_active_kh9z8_97", G = {
5
+ block: zt,
6
+ title: Ht,
7
+ subtitle: Ut,
8
+ alignmentContent: Ft,
9
+ alignments: Vt,
10
+ alignment: Yt,
11
+ circle: Gt,
12
+ paddings: Wt,
13
+ padding: Xt,
14
+ active: Qt
15
+ }, Jt = [
18
16
  "topLeft",
19
17
  "top",
20
18
  "topRight",
@@ -24,17 +22,17 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
24
22
  "bottomLeft",
25
23
  "bottom",
26
24
  "bottomRight"
27
- ], ee = ["left", "top", "right", "bottom"], Di = (c) => {
25
+ ], Kt = ["left", "top", "right", "bottom"], Mn = (r) => {
28
26
  const {
29
27
  alignment: i,
30
28
  padding: a,
31
29
  setPadding: s,
32
30
  setAlignment: e,
33
- isAlignment: o = !0,
34
- isPadding: u = !0
35
- } = c;
36
- function p(d) {
37
- switch (d) {
31
+ isAlignment: c = !0,
32
+ isPadding: d = !0
33
+ } = r;
34
+ function u(o) {
35
+ switch (o) {
38
36
  case "left":
39
37
  case "topLeft":
40
38
  case "bottomLeft":
@@ -51,8 +49,8 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
51
49
  return "TextAlignCenter";
52
50
  }
53
51
  }
54
- function _(d) {
55
- switch (d) {
52
+ function g(o) {
53
+ switch (o) {
56
54
  case "left":
57
55
  return "AlignLeft";
58
56
  case "right":
@@ -63,40 +61,40 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
63
61
  return "AlignBottom";
64
62
  }
65
63
  }
66
- const [h, k] = f.useState(null), [y, n] = f.useState(null);
67
- return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
68
- /* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout (for Desktop version)" }),
69
- /* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
70
- o && /* @__PURE__ */ t.jsxs("div", { className: W.block, children: [
71
- /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
72
- /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: te.map((d) => /* @__PURE__ */ t.jsxs(
64
+ const [f, P] = m.useState(null), [j, n] = m.useState(null);
65
+ return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
66
+ /* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
67
+ /* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
68
+ c && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
69
+ /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Alignment" }),
70
+ /* @__PURE__ */ t.jsx("div", { className: G.alignments, children: Jt.map((o) => /* @__PURE__ */ t.jsxs(
73
71
  "div",
74
72
  {
75
73
  onClick: () => {
76
- e(d);
74
+ e(o);
77
75
  },
78
- className: W.alignment,
76
+ className: G.alignment,
79
77
  onMouseEnter: () => {
80
- k(d);
78
+ P(o);
81
79
  },
82
80
  onMouseLeave: () => {
83
- k(null);
81
+ P(null);
84
82
  },
85
83
  children: [
86
- d !== i && h !== d && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
87
- d !== i && h === d && /* @__PURE__ */ t.jsx(
88
- b,
84
+ o !== i && f !== o && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
85
+ o !== i && f === o && /* @__PURE__ */ t.jsx(
86
+ v,
89
87
  {
90
- name: p(h),
88
+ name: u(f),
91
89
  fill: "#c2c2c2",
92
90
  width: 22,
93
91
  height: 22
94
92
  }
95
93
  ),
96
- d === i && /* @__PURE__ */ t.jsx(
97
- b,
94
+ o === i && /* @__PURE__ */ t.jsx(
95
+ v,
98
96
  {
99
- name: p(i),
97
+ name: u(i),
100
98
  fill: "#FF3F19",
101
99
  width: 22,
102
100
  height: 22
@@ -104,40 +102,40 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
104
102
  )
105
103
  ]
106
104
  },
107
- d
105
+ o
108
106
  )) })
109
107
  ] }),
110
- u && /* @__PURE__ */ t.jsxs("div", { className: W.block, children: [
111
- /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Paddings" }),
112
- /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: ee.map((d) => /* @__PURE__ */ t.jsxs(
108
+ d && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
109
+ /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
110
+ /* @__PURE__ */ t.jsx("div", { className: G.paddings, children: Kt.map((o) => /* @__PURE__ */ t.jsxs(
113
111
  "label",
114
112
  {
115
- className: F(W.padding, {
116
- [W.active]: y === d
113
+ className: F(G.padding, {
114
+ [G.active]: j === o
117
115
  }),
118
116
  onFocus: () => {
119
- n(d);
117
+ n(o);
120
118
  },
121
119
  onBlur: () => {
122
120
  n(null);
123
121
  },
124
122
  children: [
125
123
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
126
- b,
124
+ v,
127
125
  {
128
- name: _(d),
126
+ name: g(o),
129
127
  width: 20,
130
128
  height: 20
131
129
  }
132
130
  ) }),
133
131
  /* @__PURE__ */ t.jsx(
134
- bt,
132
+ Nt,
135
133
  {
136
134
  type: "number",
137
- value: String(a[d]),
138
- onChange: (r) => s({
135
+ value: String(a[o]),
136
+ onChange: (p) => s({
139
137
  ...a,
140
- [d]: Math.min(Number(r), 999)
138
+ [o]: Math.min(Number(p), 999)
141
139
  }),
142
140
  max: 999,
143
141
  paddingless: !0,
@@ -146,111 +144,99 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
146
144
  )
147
145
  ]
148
146
  },
149
- d
147
+ o
150
148
  )) })
151
149
  ] })
152
150
  ] })
153
151
  ] });
154
- }, se = "_title_82zux_1", ne = "_subtitle_82zux_5", ie = "_header_82zux_12", ae = "_text_82zux_13", oe = "_productsBlock_82zux_14", ce = "_top_82zux_26", re = "_itemsBlock_82zux_35", le = "_typeTexts_82zux_41", de = "_block_82zux_48", ue = "_active_82zux_61", pe = "_products_82zux_14", he = "_product_82zux_14", me = "_button_82zux_80", _e = "_disabled_82zux_91", ge = "_image_82zux_95", fe = "_info_82zux_102", xe = "_name_82zux_114", je = "_buttons_82zux_118", ve = "_modal_82zux_125", be = "_link_82zux_145", ye = "_modalOptions_82zux_151", Ne = "_addButton_82zux_157", Ie = "_deleteButton_82zux_179", X = {
155
- title: se,
156
- subtitle: ne,
157
- header: ie,
158
- text: ae,
159
- productsBlock: oe,
160
- top: ce,
161
- itemsBlock: re,
162
- typeTexts: le,
163
- block: de,
164
- active: ue,
165
- products: pe,
166
- product: he,
167
- button: me,
168
- disabled: _e,
169
- image: ge,
170
- info: fe,
171
- name: xe,
172
- buttons: je,
173
- modal: ve,
174
- link: be,
175
- modalOptions: ye,
176
- addButton: Ne,
177
- deleteButton: Ie
152
+ }, Zt = "_title_82zux_1", te = "_subtitle_82zux_5", ee = "_productsBlock_82zux_14", se = "_top_82zux_26", ne = "_products_82zux_14", ie = "_product_82zux_14", ae = "_button_82zux_80", oe = "_disabled_82zux_91", ce = "_buttons_82zux_118", re = "_addButton_82zux_157", le = "_deleteButton_82zux_179", Q = {
153
+ title: Zt,
154
+ subtitle: te,
155
+ productsBlock: ee,
156
+ top: se,
157
+ products: ne,
158
+ product: ie,
159
+ button: ae,
160
+ disabled: oe,
161
+ buttons: ce,
162
+ addButton: re,
163
+ deleteButton: le
178
164
  };
179
- function ke({ id: c, children: i }) {
165
+ function de({ id: r, children: i }) {
180
166
  const {
181
167
  attributes: a,
182
168
  listeners: s,
183
169
  setNodeRef: e,
184
- transform: o,
185
- transition: u,
186
- isDragging: p
170
+ transform: c,
171
+ transition: d,
172
+ isDragging: u
187
173
  } = _t({
188
- id: c
189
- }), _ = {
190
- transform: gt.Transform.toString(o),
191
- transition: u
174
+ id: r
175
+ }), g = {
176
+ transform: jt.Transform.toString(c),
177
+ transition: d
192
178
  };
193
179
  return /* @__PURE__ */ t.jsx(
194
180
  "div",
195
181
  {
196
182
  ref: e,
197
- style: _,
198
- className: `${X.product} ${p ? X.dragging : ""}`,
183
+ style: g,
184
+ className: `${Q.product} ${u ? Q.dragging : ""}`,
199
185
  ...a,
200
186
  ...s,
201
187
  children: i
202
188
  }
203
189
  );
204
190
  }
205
- const zi = (c) => {
191
+ const Bn = (r) => {
206
192
  const {
207
193
  isActiveItems: i,
208
194
  setIsActiveItems: a,
209
195
  items: s,
210
196
  setItems: e,
211
- other: o,
212
- tags: u,
213
- title: p,
214
- subtitle: _,
215
- draggable: h = !1,
216
- withImage: k = !1,
217
- addable: y = !0,
197
+ other: c,
198
+ tags: d,
199
+ title: u,
200
+ subtitle: g,
201
+ draggable: f = !1,
202
+ withImage: P = !1,
203
+ addable: j = !0,
218
204
  itemsOptions: n,
219
- hasRangeSelector: d = !1,
220
- rangeSelectorOptions: r,
221
- limit: B,
222
- autoScrollInterval: g,
223
- deletable: T,
224
- aspectRatio: I,
205
+ hasRangeSelector: o = !1,
206
+ rangeSelectorOptions: p,
207
+ limit: q,
208
+ autoScrollInterval: x,
209
+ deletable: _,
210
+ aspectRatio: y,
225
211
  setAspectRatio: M
226
- } = c, x = lt(
227
- dt(ut, {
212
+ } = r, z = ht(
213
+ pt(mt, {
228
214
  activationConstraint: {
229
215
  distance: 5
230
216
  }
231
217
  })
232
- ), R = (m) => {
233
- const { active: j, over: S } = m;
234
- if (S && j.id !== S.id) {
235
- const P = s.findIndex((A) => A === j.id), $ = s.findIndex((A) => A === S.id);
236
- if (P !== -1 && $ !== -1) {
237
- const A = [...s], [v] = A.splice(P, 1);
238
- A.splice($, 0, v), e(A);
218
+ ), R = (h) => {
219
+ const { active: S, over: k } = h;
220
+ if (k && S.id !== k.id) {
221
+ const N = s.findIndex((O) => O === S.id), B = s.findIndex((O) => O === k.id);
222
+ if (N !== -1 && B !== -1) {
223
+ const O = [...s], [b] = O.splice(N, 1);
224
+ O.splice(B, 0, b), e(O);
239
225
  }
240
226
  }
241
227
  };
242
- function Q(m) {
243
- if (k)
244
- return m ? /* @__PURE__ */ t.jsx(
228
+ function I(h) {
229
+ if (P)
230
+ return h ? /* @__PURE__ */ t.jsx(
245
231
  "img",
246
232
  {
247
- src: `https://imagedelivery.net/${m[0]}/w=1000`,
233
+ src: `https://imagedelivery.net/${h[0]}/w=1000`,
248
234
  alt: "image",
249
235
  width: 16,
250
236
  height: 16
251
237
  }
252
238
  ) : /* @__PURE__ */ t.jsx(
253
- b,
239
+ v,
254
240
  {
255
241
  name: "Image",
256
242
  width: 16,
@@ -259,12 +245,12 @@ const zi = (c) => {
259
245
  }
260
246
  );
261
247
  }
262
- const U = (m, j = !1) => {
263
- const S = n.find(($) => $.id === m);
264
- if (!S) return;
265
- const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
266
- h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
267
- b,
248
+ const H = (h, S = !1) => {
249
+ const k = n.find((B) => B.id === h);
250
+ if (!k) return;
251
+ const N = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
252
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
253
+ v,
268
254
  {
269
255
  name: "DotsSixVertical",
270
256
  hoverable: !0,
@@ -273,80 +259,80 @@ const zi = (c) => {
273
259
  }
274
260
  ) }),
275
261
  /* @__PURE__ */ t.jsx(
276
- st,
262
+ nt,
277
263
  {
278
- onChange: ($) => {
279
- const A = [...s], v = n.find((l) => l.name === $);
280
- if (!v) return;
281
- const O = v.id, L = A.map((l) => l === m ? O : l);
282
- e([...L]);
264
+ onChange: (B) => {
265
+ const O = [...s], b = n.find((l) => l.name === B);
266
+ if (!b) return;
267
+ const A = b.id, U = O.map((l) => l === h ? A : l);
268
+ e([...U]);
283
269
  },
284
- value: S.name,
285
- options: n.filter(($) => !s.find((A) => A === $.id)).map(($) => $.name),
286
- leftAddonOptions: n.map(($) => ({
287
- value: $.name,
288
- addon: Q($.images)
270
+ value: k.name,
271
+ options: n.filter((B) => !s.find((O) => O === B.id)).map((B) => B.name),
272
+ leftAddonOptions: n.map((B) => ({
273
+ value: B.name,
274
+ addon: I(B.images)
289
275
  }))
290
276
  }
291
277
  ),
292
- j && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
293
- b,
278
+ S && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
279
+ v,
294
280
  {
295
281
  name: "Trash",
296
282
  hoverable: !0,
297
283
  width: 20,
298
284
  height: 20,
299
285
  fill: "#C12A2A",
300
- onClick: () => e(s.filter(($) => $ !== m))
286
+ onClick: () => e(s.filter((B) => B !== h))
301
287
  }
302
288
  ) }) })
303
289
  ] });
304
- return h ? /* @__PURE__ */ t.jsx(
305
- ke,
290
+ return f ? /* @__PURE__ */ t.jsx(
291
+ de,
306
292
  {
307
- id: m,
308
- children: P
293
+ id: h,
294
+ children: N
309
295
  },
310
- et()
296
+ Z()
311
297
  ) : /* @__PURE__ */ t.jsx(
312
298
  "div",
313
299
  {
314
- className: X.product,
315
- children: P
300
+ className: Q.product,
301
+ children: N
316
302
  },
317
- et()
303
+ Z()
318
304
  );
319
305
  };
320
- return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
321
- (p || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
322
- p && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: p }),
306
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
307
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
308
+ u && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: u }),
323
309
  i !== void 0 && /* @__PURE__ */ t.jsx(
324
- ot,
310
+ rt,
325
311
  {
326
312
  current: i,
327
- onChange: (m) => a == null ? void 0 : a(m)
313
+ onChange: (h) => a == null ? void 0 : a(h)
328
314
  }
329
315
  )
330
316
  ] }),
331
- d && r && /* @__PURE__ */ t.jsx(kt, { ...r }),
332
- /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
333
- _ && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: _ }),
334
- h ? /* @__PURE__ */ t.jsx(
335
- pt,
317
+ o && p && /* @__PURE__ */ t.jsx(kt, { ...p }),
318
+ /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
319
+ g && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: g }),
320
+ f ? /* @__PURE__ */ t.jsx(
321
+ gt,
336
322
  {
337
- sensors: x,
323
+ sensors: z,
338
324
  onDragEnd: R,
339
325
  children: /* @__PURE__ */ t.jsx(
340
- ht,
326
+ ft,
341
327
  {
342
328
  items: s,
343
- strategy: mt,
344
- children: s.map((m) => U(m, T))
329
+ strategy: xt,
330
+ children: s.map((h) => H(h, _))
345
331
  }
346
332
  )
347
333
  }
348
- ) : s.map((m) => U(m, T)),
349
- y && /* @__PURE__ */ t.jsx(
334
+ ) : s.map((h) => H(h, _)),
335
+ j && /* @__PURE__ */ t.jsx(
350
336
  "div",
351
337
  {
352
338
  style: {
@@ -356,33 +342,33 @@ const zi = (c) => {
356
342
  gap: 5
357
343
  },
358
344
  children: /* @__PURE__ */ t.jsx(
359
- ct,
345
+ lt,
360
346
  {
361
347
  withoutHover: !0,
362
- className: F(X.button, {
363
- [X.disabled]: !!(B && B <= s.length || s.length === n.length)
348
+ className: F(Q.button, {
349
+ [Q.disabled]: !!(q && q <= s.length || s.length === n.length)
364
350
  }),
365
351
  size: "s",
366
- disabled: !!(B && B <= s.length || s.length === n.length),
352
+ disabled: !!(q && q <= s.length || s.length === n.length),
367
353
  onClick: () => {
368
- const m = [...s];
369
- let j = null;
354
+ const h = [...s];
355
+ let S = null;
370
356
  if (n) {
371
- for (let S = 0; S < n.length; S++)
372
- if (!s.find((P) => P === n[S].id)) {
373
- j = n[S];
357
+ for (let k = 0; k < n.length; k++)
358
+ if (!s.find((N) => N === n[k].id)) {
359
+ S = n[k];
374
360
  break;
375
361
  }
376
362
  }
377
- m.push((j == null ? void 0 : j.id) || n[0].id), e(m);
363
+ h.push((S == null ? void 0 : S.id) || n[0].id), e(h);
378
364
  },
379
365
  style: {
380
366
  width: "fit-content"
381
367
  },
382
- children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
368
+ children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
383
369
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
384
370
  /* @__PURE__ */ t.jsx(
385
- b,
371
+ v,
386
372
  {
387
373
  name: "Plus",
388
374
  width: 16,
@@ -395,37 +381,37 @@ const zi = (c) => {
395
381
  }
396
382
  )
397
383
  ] }),
398
- I && M && /* @__PURE__ */ t.jsx(
399
- st,
384
+ y && M && /* @__PURE__ */ t.jsx(
385
+ nt,
400
386
  {
401
- value: I,
387
+ value: y,
402
388
  label: "Aspect Ratio",
403
- options: Object.keys(Ct),
404
- onChange: (m) => M(m),
405
- leftAddonOptions: St
389
+ options: Object.keys(Pt),
390
+ onChange: (h) => M(h),
391
+ leftAddonOptions: wt
406
392
  }
407
393
  ),
408
- u !== void 0 && /* @__PURE__ */ t.jsx(
409
- rt,
394
+ d !== void 0 && /* @__PURE__ */ t.jsx(
395
+ ut,
410
396
  {
411
397
  tagsTitle: "Tags",
412
- items: u
398
+ items: d
413
399
  }
414
400
  ),
415
- o !== void 0 && /* @__PURE__ */ t.jsx(
416
- rt,
401
+ c !== void 0 && /* @__PURE__ */ t.jsx(
402
+ ut,
417
403
  {
418
404
  otherTitle: "Other",
419
- items: o
405
+ items: c
420
406
  }
421
407
  ),
422
- g !== void 0 && /* @__PURE__ */ t.jsx(
423
- bt,
408
+ x !== void 0 && /* @__PURE__ */ t.jsx(
409
+ Nt,
424
410
  {
425
411
  label: "Auto scroll interval",
426
412
  type: "number",
427
- value: String(g.scrollInterval),
428
- onChange: (m) => g.setScrollInterval(Number(m)),
413
+ value: String(x.scrollInterval),
414
+ onChange: (h) => x.setScrollInterval(Number(h)),
429
415
  min: 0.1,
430
416
  max: 100,
431
417
  style: {
@@ -435,109 +421,96 @@ const zi = (c) => {
435
421
  }
436
422
  )
437
423
  ] });
438
- }, Ce = "_title_roi3a_1", Se = "_subtitle_roi3a_5", $e = "_header_roi3a_12", qe = "_text_roi3a_13", we = "_productsBlock_roi3a_14", Pe = "_top_roi3a_26", Be = "_itemsBlock_roi3a_35", Te = "_typeTexts_roi3a_41", Me = "_block_roi3a_48", Ae = "_active_roi3a_61", Oe = "_products_roi3a_14", Ee = "_product_roi3a_14", Re = "_button_roi3a_80", De = "_disabled_roi3a_91", ze = "_image_roi3a_95", Le = "_info_roi3a_102", Fe = "_name_roi3a_114", Ue = "_buttons_roi3a_118", Ve = "_modal_roi3a_125", He = "_link_roi3a_145", Ye = "_modalOptions_roi3a_151", We = "_addButton_roi3a_164", Ge = "_deleteButton_roi3a_179", Xe = "_closeIcon_roi3a_191", H = {
439
- title: Ce,
440
- subtitle: Se,
441
- header: $e,
442
- text: qe,
443
- productsBlock: we,
444
- top: Pe,
445
- itemsBlock: Be,
446
- typeTexts: Te,
447
- block: Me,
448
- active: Ae,
449
- products: Oe,
450
- product: Ee,
451
- button: Re,
452
- disabled: De,
453
- image: ze,
454
- info: Le,
455
- name: Fe,
456
- buttons: Ue,
457
- modal: Ve,
458
- link: He,
459
- modalOptions: Ye,
460
- addButton: We,
461
- deleteButton: Ge,
462
- closeIcon: Xe
424
+ }, ue = "_title_roi3a_1", he = "_subtitle_roi3a_5", pe = "_productsBlock_roi3a_14", me = "_top_roi3a_26", ge = "_products_roi3a_14", fe = "_product_roi3a_14", xe = "_button_roi3a_80", _e = "_disabled_roi3a_91", je = "_buttons_roi3a_118", ve = "_addButton_roi3a_164", be = "_deleteButton_roi3a_179", Y = {
425
+ title: ue,
426
+ subtitle: he,
427
+ productsBlock: pe,
428
+ top: me,
429
+ products: ge,
430
+ product: fe,
431
+ button: xe,
432
+ disabled: _e,
433
+ buttons: je,
434
+ addButton: ve,
435
+ deleteButton: be
463
436
  };
464
- function Qe({ product: c, children: i }) {
437
+ function ye({ product: r, children: i }) {
465
438
  const {
466
439
  attributes: a,
467
440
  listeners: s,
468
441
  setNodeRef: e,
469
- transform: o,
470
- transition: u,
471
- isDragging: p
442
+ transform: c,
443
+ transition: d,
444
+ isDragging: u
472
445
  } = _t({
473
- id: c.id
474
- }), _ = {
475
- transform: gt.Transform.toString(o),
476
- transition: u
446
+ id: r.id
447
+ }), g = {
448
+ transform: jt.Transform.toString(c),
449
+ transition: d
477
450
  };
478
451
  return /* @__PURE__ */ t.jsx(
479
452
  "div",
480
453
  {
481
454
  ref: e,
482
- style: _,
483
- className: `${H.product} ${p ? H.dragging : ""}`,
455
+ style: g,
456
+ className: `${Y.product} ${u ? Y.dragging : ""}`,
484
457
  ...a,
485
458
  ...s,
486
459
  children: i
487
460
  }
488
461
  );
489
462
  }
490
- const Li = (c) => {
463
+ const Tn = (r) => {
491
464
  const {
492
465
  isActiveItems: i,
493
466
  setIsActiveItems: a,
494
467
  items: s,
495
468
  setItems: e,
496
- title: o,
497
- subtitle: u,
498
- editable: p = !0,
499
- draggable: _ = !1,
500
- deletable: h = !0,
501
- addable: k = !0,
502
- itemsType: y,
469
+ title: c,
470
+ subtitle: d,
471
+ editable: u = !0,
472
+ draggable: g = !1,
473
+ deletable: f = !0,
474
+ addable: P = !0,
475
+ itemsType: j,
503
476
  itemsOptions: n,
504
- addableOptions: d = {},
505
- limit: r
506
- } = c, [B, g] = f.useState(null), [T, I] = f.useState(null), M = f.useRef(null), x = lt(
507
- dt(ut, {
477
+ addableOptions: o = {},
478
+ limit: p
479
+ } = r, [q, x] = m.useState(null), [_, y] = m.useState(null), M = m.useRef(null), z = ht(
480
+ pt(mt, {
508
481
  activationConstraint: {
509
482
  distance: 5
510
483
  }
511
484
  })
512
485
  );
513
- f.useEffect(() => {
514
- if (B) {
515
- const m = [...s].map((j) => j.id === B.id ? B : j);
516
- e(m);
486
+ m.useEffect(() => {
487
+ if (q) {
488
+ const h = [...s].map((S) => S.id === q.id ? q : S);
489
+ e(h);
517
490
  }
518
- }, [B]), f.useEffect(() => {
519
- M.current && T && (M.current.getBoundingClientRect().height, T.top);
520
- }, [M.current, T]);
521
- const R = (m, j) => {
522
- m.stopPropagation();
523
- const S = m.target.getBoundingClientRect();
524
- I({
525
- top: S.top + window.scrollY,
526
- left: S.left - 30
527
- }), g(j);
528
- }, Q = (m) => {
529
- const { active: j, over: S } = m;
530
- if (S && j.id !== S.id) {
531
- const P = s.findIndex((A) => A.id === j.id), $ = s.findIndex((A) => A.id === S.id);
532
- if (P !== -1 && $ !== -1) {
533
- const A = [...s], [v] = A.splice(P, 1);
534
- A.splice($, 0, v), e(A);
491
+ }, [q]), m.useEffect(() => {
492
+ M.current && _ && (M.current.getBoundingClientRect().height, _.top);
493
+ }, [M.current, _]);
494
+ const R = (h, S) => {
495
+ h.stopPropagation();
496
+ const k = h.target.getBoundingClientRect();
497
+ y({
498
+ top: k.top + window.scrollY,
499
+ left: k.left - 30
500
+ }), x(S);
501
+ }, I = (h) => {
502
+ const { active: S, over: k } = h;
503
+ if (k && S.id !== k.id) {
504
+ const N = s.findIndex((O) => O.id === S.id), B = s.findIndex((O) => O.id === k.id);
505
+ if (N !== -1 && B !== -1) {
506
+ const O = [...s], [b] = O.splice(N, 1);
507
+ O.splice(B, 0, b), e(O);
535
508
  }
536
509
  }
537
- }, U = (m, j) => {
538
- const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
539
- _ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
540
- b,
510
+ }, H = (h, S) => {
511
+ const k = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
512
+ g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
513
+ v,
541
514
  {
542
515
  name: "DotsSixVertical",
543
516
  hoverable: !0,
@@ -545,99 +518,99 @@ const Li = (c) => {
545
518
  height: 20
546
519
  }
547
520
  ) }),
548
- y === "select" && n && /* @__PURE__ */ t.jsx(
549
- st,
521
+ j === "select" && n && /* @__PURE__ */ t.jsx(
522
+ nt,
550
523
  {
551
- onChange: (P) => {
552
- const $ = [...s], A = n.find((O) => O.name === P);
553
- if (!A) return;
554
- const v = $.map((O) => O.id === m.id ? {
555
- ...A,
524
+ onChange: (N) => {
525
+ const B = [...s], O = n.find((A) => A.name === N);
526
+ if (!O) return;
527
+ const b = B.map((A) => A.id === h.id ? {
528
+ ...O,
556
529
  name: {
557
- "en-US": P
530
+ "en-US": N
558
531
  }
559
- } : O);
560
- g({
561
- ...m,
532
+ } : A);
533
+ x({
534
+ ...h,
562
535
  name: {
563
- "en-US": P
536
+ "en-US": N
564
537
  }
565
- }), e([...v]);
538
+ }), e([...b]);
566
539
  },
567
- value: m.name,
568
- options: n.filter((P) => !s.find(($) => $.name === P.name)).map((P) => P.name)
540
+ value: h.name,
541
+ options: n.filter((N) => !s.find((B) => B.name === N.name)).map((N) => N.name)
569
542
  }
570
543
  ),
571
- /* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
572
- p && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
573
- b,
544
+ /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
545
+ u && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
546
+ v,
574
547
  {
575
548
  name: "Sliders",
576
549
  hoverable: !0,
577
550
  width: 20,
578
551
  height: 20,
579
- onClick: (P) => R(P, m)
552
+ onClick: (N) => R(N, h)
580
553
  }
581
554
  ) }),
582
- h && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
583
- b,
555
+ f && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
556
+ v,
584
557
  {
585
558
  name: "Trash",
586
559
  hoverable: !0,
587
560
  width: 20,
588
561
  height: 20,
589
562
  fill: "#C12A2A",
590
- onClick: () => e(s.filter((P) => P.id !== m.id))
563
+ onClick: () => e(s.filter((N) => N.id !== h.id))
591
564
  }
592
565
  ) })
593
566
  ] })
594
567
  ] });
595
- return _ ? /* @__PURE__ */ t.jsx(
596
- Qe,
568
+ return g ? /* @__PURE__ */ t.jsx(
569
+ ye,
597
570
  {
598
- product: m,
599
- index: j,
600
- children: S
571
+ product: h,
572
+ index: S,
573
+ children: k
601
574
  },
602
- m.id
575
+ h.id
603
576
  ) : /* @__PURE__ */ t.jsx(
604
577
  "div",
605
578
  {
606
- className: H.product,
607
- children: S
579
+ className: Y.product,
580
+ children: k
608
581
  },
609
- m.id
582
+ h.id
610
583
  );
611
584
  };
612
- return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
613
- (o || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
614
- o && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: o }),
585
+ return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
586
+ (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
587
+ c && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: c }),
615
588
  i !== void 0 && /* @__PURE__ */ t.jsx(
616
- ot,
589
+ rt,
617
590
  {
618
591
  current: i,
619
- onChange: (m) => a == null ? void 0 : a(m)
592
+ onChange: (h) => a == null ? void 0 : a(h)
620
593
  }
621
594
  )
622
595
  ] }),
623
- /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
624
- u && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: u }),
625
- _ ? /* @__PURE__ */ t.jsx(
626
- pt,
596
+ /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
597
+ d && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: d }),
598
+ g ? /* @__PURE__ */ t.jsx(
599
+ gt,
627
600
  {
628
- sensors: x,
629
- onDragEnd: Q,
601
+ sensors: z,
602
+ onDragEnd: I,
630
603
  children: /* @__PURE__ */ t.jsx(
631
- ht,
604
+ ft,
632
605
  {
633
- items: s.map((m) => m.id),
634
- strategy: mt,
635
- children: s.map((m, j) => U(m, j))
606
+ items: s.map((h) => h.id),
607
+ strategy: xt,
608
+ children: s.map((h, S) => H(h, S))
636
609
  }
637
610
  )
638
611
  }
639
- ) : s.map((m, j) => U(m, j)),
640
- k && /* @__PURE__ */ t.jsx(
612
+ ) : s.map((h, S) => H(h, S)),
613
+ P && /* @__PURE__ */ t.jsx(
641
614
  "div",
642
615
  {
643
616
  style: {
@@ -646,37 +619,37 @@ const Li = (c) => {
646
619
  justifyContent: "center"
647
620
  },
648
621
  children: /* @__PURE__ */ t.jsx(
649
- ct,
622
+ lt,
650
623
  {
651
624
  withoutHover: !0,
652
- className: F(H.button, {
653
- [H.disabled]: !!(r && r <= s.length || s.length === (n == null ? void 0 : n.length))
625
+ className: F(Y.button, {
626
+ [Y.disabled]: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length))
654
627
  }),
655
628
  size: "s",
656
- disabled: !!(r && r <= s.length || s.length === (n == null ? void 0 : n.length)),
629
+ disabled: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length)),
657
630
  onClick: () => {
658
- const m = [...s];
659
- let j = null;
631
+ const h = [...s];
632
+ let S = null;
660
633
  if (n) {
661
- for (let S = 0; S < n.length; S++)
662
- if (!s.find((P) => P.id === n[S].id)) {
663
- j = n[S];
634
+ for (let k = 0; k < n.length; k++)
635
+ if (!s.find((N) => N.id === n[k].id)) {
636
+ S = n[k];
664
637
  break;
665
638
  }
666
639
  }
667
- y === "select" && n && m.push({
668
- name: j ? j.name : n[0].name,
669
- id: (j == null ? void 0 : j.id) || n[0].id,
670
- ...d
671
- }), e(m);
640
+ j === "select" && n && h.push({
641
+ name: S ? S.name : n[0].name,
642
+ id: (S == null ? void 0 : S.id) || n[0].id,
643
+ ...o
644
+ }), e(h);
672
645
  },
673
646
  style: {
674
647
  width: "fit-content"
675
648
  },
676
- children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
649
+ children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
677
650
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
678
651
  /* @__PURE__ */ t.jsx(
679
- b,
652
+ v,
680
653
  {
681
654
  name: "Plus",
682
655
  width: 16,
@@ -691,99 +664,99 @@ const Li = (c) => {
691
664
  ] })
692
665
  ] });
693
666
  };
694
- function Je(c) {
695
- const { product: i, children: a } = c, { attributes: s, listeners: e, setNodeRef: o, transform: u, transition: p, isDragging: _ } = _t({
667
+ function Ie(r) {
668
+ const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
696
669
  id: i.id
697
- }), h = {
698
- transform: gt.Transform.toString(u),
699
- transition: p
670
+ }), f = {
671
+ transform: jt.Transform.toString(d),
672
+ transition: u
700
673
  };
701
674
  return /* @__PURE__ */ t.jsx(
702
675
  "div",
703
676
  {
704
- ref: o,
705
- style: h,
706
- className: `${V.product} ${_ ? V.dragging : ""}`,
677
+ ref: c,
678
+ style: f,
679
+ className: `${V.product} ${g ? V.dragging : ""}`,
707
680
  ...s,
708
681
  ...e,
709
682
  children: a
710
683
  }
711
684
  );
712
685
  }
713
- const Fi = (c) => {
686
+ const $n = (r) => {
714
687
  const {
715
688
  isActiveItems: i,
716
689
  setIsActiveItems: a,
717
690
  items: s,
718
691
  setItems: e,
719
- other: o,
720
- title: u,
721
- subtitle: p,
722
- editable: _ = !0,
723
- draggable: h = !1,
724
- deletable: k = !0,
725
- addable: y = !0,
692
+ other: c,
693
+ title: d,
694
+ subtitle: u,
695
+ editable: g = !0,
696
+ draggable: f = !1,
697
+ deletable: P = !0,
698
+ addable: j = !0,
726
699
  itemsType: n,
727
- itemsPlaceholder: d = "",
728
- itemsOptions: r,
729
- hasRangeSelector: B = !1,
730
- rangeSelectorOptions: g,
731
- modalOptions: T,
732
- addableOptions: I = {},
700
+ itemsPlaceholder: o = "",
701
+ itemsOptions: p,
702
+ hasRangeSelector: q = !1,
703
+ rangeSelectorOptions: x,
704
+ modalOptions: _,
705
+ addableOptions: y = {},
733
706
  limit: M
734
- } = c, [x, R] = f.useState(null), [Q, U] = f.useState({
707
+ } = r, [z, R] = m.useState(null), [I, H] = m.useState({
735
708
  top: 0,
736
709
  left: 0
737
- }), [m, j] = f.useState(null), S = f.useRef(null), [P, $] = f.useState(!1), A = lt(
738
- dt(ut, {
710
+ }), [h, S] = m.useState(null), k = m.useRef(null), [N, B] = m.useState(!1), O = ht(
711
+ pt(mt, {
739
712
  activationConstraint: {
740
713
  distance: 5
741
714
  }
742
715
  })
743
716
  );
744
- f.useEffect(() => {
717
+ m.useEffect(() => {
745
718
  const l = () => {
746
- R(null), $(!1);
719
+ R(null), B(!1);
747
720
  };
748
- return document.body.addEventListener("click", l), R(null), $(!1), () => {
749
- R(null), $(!1), document.body.removeEventListener("click", l);
721
+ return document.body.addEventListener("click", l), R(null), B(!1), () => {
722
+ R(null), B(!1), document.body.removeEventListener("click", l);
750
723
  };
751
- }, []), f.useEffect(() => {
752
- if (x) {
753
- const l = [...s].map((w) => w.id === x.id ? x : w);
724
+ }, []), m.useEffect(() => {
725
+ if (z) {
726
+ const l = [...s].map(($) => $.id === z.id ? z : $);
754
727
  e(l);
755
728
  }
756
- }, [x]), f.useEffect(() => {
757
- if (S.current && m) {
758
- const l = S.current.getBoundingClientRect().height, w = window.innerHeight;
759
- let N = m.top;
760
- N + l > w + window.scrollY - 200 && (N = w + window.scrollY - l - 200), N < 0 && (N = 10), U({
761
- top: N,
762
- left: m.left
729
+ }, [z]), m.useEffect(() => {
730
+ if (k.current && h) {
731
+ const l = k.current.getBoundingClientRect().height, $ = window.innerHeight;
732
+ let C = h.top;
733
+ C + l > $ + window.scrollY - 200 && (C = $ + window.scrollY - l - 200), C < 0 && (C = 10), H({
734
+ top: C,
735
+ left: h.left
763
736
  });
764
737
  }
765
- }, [S.current, m]);
766
- const v = (l, w) => {
738
+ }, [k.current, h]);
739
+ const b = (l, $) => {
767
740
  l.stopPropagation();
768
- const N = l.target.getBoundingClientRect();
769
- j({
770
- top: N.top + window.scrollY,
771
- left: N.left - 30
772
- }), R(w), $(!0);
773
- }, O = (l) => {
774
- const { active: w, over: N } = l;
775
- if (N && w.id !== N.id) {
776
- const E = s.findIndex((D) => D.id === w.id), K = s.findIndex((D) => D.id === N.id);
777
- if (E !== -1 && K !== -1) {
778
- const D = [...s], [J] = D.splice(E, 1);
779
- D.splice(K, 0, J), e(D);
741
+ const C = l.target.getBoundingClientRect();
742
+ S({
743
+ top: C.top + window.scrollY,
744
+ left: C.left - 30
745
+ }), R($), B(!0);
746
+ }, A = (l) => {
747
+ const { active: $, over: C } = l;
748
+ if (C && $.id !== C.id) {
749
+ const E = s.findIndex((L) => L.id === $.id), tt = s.findIndex((L) => L.id === C.id);
750
+ if (E !== -1 && tt !== -1) {
751
+ const L = [...s], [K] = L.splice(E, 1);
752
+ L.splice(tt, 0, K), e(L);
780
753
  }
781
754
  }
782
- }, L = (l) => {
783
- var N;
784
- const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
785
- h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
786
- b,
755
+ }, U = (l) => {
756
+ var C;
757
+ const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
758
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
759
+ v,
787
760
  {
788
761
  name: "DotsSixVertical",
789
762
  hoverable: !0,
@@ -791,71 +764,71 @@ const Fi = (c) => {
791
764
  height: 20
792
765
  }
793
766
  ) }),
794
- n === "select" && r && /* @__PURE__ */ t.jsx(
795
- st,
767
+ n === "select" && p && /* @__PURE__ */ t.jsx(
768
+ nt,
796
769
  {
797
770
  onChange: (E) => {
798
- const D = [...s].map((J) => J.id === l.id ? {
771
+ const L = [...s].map((K) => K.id === l.id ? {
799
772
  ...l,
800
773
  name: {
801
774
  "en-US": E
802
775
  }
803
- } : J);
776
+ } : K);
804
777
  R({
805
778
  ...l,
806
779
  name: {
807
780
  "en-US": E
808
781
  }
809
- }), e([...D]);
782
+ }), e([...L]);
810
783
  },
811
784
  value: l.name["en-US"],
812
- options: r.filter(
813
- (E) => !s.find((K) => K.name["en-US"] === E)
785
+ options: p.filter(
786
+ (E) => !s.find((tt) => tt.name["en-US"] === E)
814
787
  )
815
788
  }
816
789
  ),
817
790
  n === "input" && /* @__PURE__ */ t.jsx(
818
- bt,
791
+ Nt,
819
792
  {
820
793
  onChange: (E) => {
821
- const D = [...s].map((J) => J.id === l.id ? {
794
+ const L = [...s].map((K) => K.id === l.id ? {
822
795
  ...l,
823
796
  name: {
824
797
  "en-US": E
825
798
  }
826
- } : J);
827
- e([...D]);
799
+ } : K);
800
+ e([...L]);
828
801
  },
829
802
  value: l.name["en-US"],
830
- placeholder: d
803
+ placeholder: o
831
804
  }
832
805
  ),
833
806
  n === "image" && /* @__PURE__ */ t.jsx(
834
- Tt,
807
+ qt,
835
808
  {
836
809
  onChange: (E) => {
837
- const D = [...s].map((J) => J.id === l.id ? {
810
+ const L = [...s].map((K) => K.id === l.id ? {
838
811
  ...l,
839
812
  images: E
840
- } : J);
841
- e([...D]);
813
+ } : K);
814
+ e([...L]);
842
815
  },
843
- activeImage: (N = s.find((E) => E.id === l.id)) == null ? void 0 : N.images[0]
816
+ activeImage: (C = s.find((E) => E.id === l.id)) == null ? void 0 : C.images[0]
844
817
  }
845
818
  ),
846
819
  /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
847
- _ && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
848
- b,
820
+ g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
821
+ v,
849
822
  {
850
823
  name: "Sliders",
851
824
  hoverable: !0,
852
825
  width: 20,
853
826
  height: 20,
854
- onClick: (E) => v(E, l)
827
+ onClick: (E) => b(E, l)
855
828
  }
856
829
  ) }),
857
- k && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
858
- b,
830
+ P && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
831
+ v,
859
832
  {
860
833
  name: "Trash",
861
834
  hoverable: !0,
@@ -867,63 +840,63 @@ const Fi = (c) => {
867
840
  ) })
868
841
  ] })
869
842
  ] });
870
- return h ? /* @__PURE__ */ t.jsx(
871
- Je,
843
+ return f ? /* @__PURE__ */ t.jsx(
844
+ Ie,
872
845
  {
873
846
  product: l,
874
- children: w
847
+ children: $
875
848
  },
876
849
  l.id
877
850
  ) : /* @__PURE__ */ t.jsx(
878
851
  "div",
879
852
  {
880
853
  className: V.product,
881
- children: w
854
+ children: $
882
855
  },
883
856
  l.id
884
857
  );
885
858
  };
886
859
  return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
887
- (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
888
- u && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: u }),
860
+ (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
861
+ d && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: d }),
889
862
  i !== void 0 && /* @__PURE__ */ t.jsx(
890
- ot,
863
+ rt,
891
864
  {
892
865
  current: i,
893
866
  onChange: (l) => a == null ? void 0 : a(l)
894
867
  }
895
868
  )
896
869
  ] }),
897
- x && _ && T && P && /* @__PURE__ */ t.jsx(
898
- Bt,
870
+ z && g && _ && N && /* @__PURE__ */ t.jsx(
871
+ $t,
899
872
  {
900
- ref: S,
901
- activeItem: x,
873
+ ref: k,
874
+ activeItem: z,
902
875
  setActiveItem: R,
903
- popupPosition: Q,
904
- modalOptions: T,
905
- setIsOpenModal: $
876
+ popupPosition: I,
877
+ modalOptions: _,
878
+ setIsOpenModal: B
906
879
  }
907
880
  ),
908
- B && g && /* @__PURE__ */ t.jsx(kt, { ...g }),
881
+ q && x && /* @__PURE__ */ t.jsx(kt, { ...x }),
909
882
  /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
910
- p && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: p }),
911
- h ? /* @__PURE__ */ t.jsx(
912
- pt,
883
+ u && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: u }),
884
+ f ? /* @__PURE__ */ t.jsx(
885
+ gt,
913
886
  {
914
- sensors: A,
915
- onDragEnd: O,
887
+ sensors: O,
888
+ onDragEnd: A,
916
889
  children: /* @__PURE__ */ t.jsx(
917
- ht,
890
+ ft,
918
891
  {
919
892
  items: s.map((l) => l.id),
920
- strategy: mt,
921
- children: s.map((l) => L(l))
893
+ strategy: xt,
894
+ children: s.map((l) => U(l))
922
895
  }
923
896
  )
924
897
  }
925
- ) : s.map((l) => L(l)),
926
- y && /* @__PURE__ */ t.jsx(
898
+ ) : s.map((l) => U(l)),
899
+ j && /* @__PURE__ */ t.jsx(
927
900
  "div",
928
901
  {
929
902
  style: {
@@ -932,7 +905,7 @@ const Fi = (c) => {
932
905
  justifyContent: "center"
933
906
  },
934
907
  children: /* @__PURE__ */ t.jsx(
935
- ct,
908
+ lt,
936
909
  {
937
910
  withoutHover: !0,
938
911
  className: F(V.button, {
@@ -942,35 +915,35 @@ const Fi = (c) => {
942
915
  disabled: !!(M && M <= s.length),
943
916
  onClick: () => {
944
917
  const l = [...s];
945
- let w = null;
946
- if (r) {
947
- for (let N = 0; N < r.length; N++)
948
- if (!s.find((E) => E.name["en-US"] === r[N])) {
949
- w = r[N];
918
+ let $ = null;
919
+ if (p) {
920
+ for (let C = 0; C < p.length; C++)
921
+ if (!s.find((E) => E.name["en-US"] === p[C])) {
922
+ $ = p[C];
950
923
  break;
951
924
  }
952
925
  }
953
- n === "select" && r ? l.push({
926
+ n === "select" && p ? l.push({
954
927
  name: {
955
- "en-US": w || r[0]
928
+ "en-US": $ || p[0]
956
929
  },
957
- id: et(),
958
- ...I,
930
+ id: Z(),
931
+ ...y,
959
932
  maxSymbols: 100
960
933
  // пример значения
961
934
  }) : n === "input" ? l.push({
962
935
  name: {
963
936
  "en-US": ""
964
937
  },
965
- id: et(),
966
- ...I,
938
+ id: Z(),
939
+ ...y,
967
940
  maxSymbols: 100
968
941
  }) : l.push({
969
942
  name: {
970
943
  "en-US": `Image ${s.length + 1}`
971
944
  },
972
- id: et(),
973
- ...I,
945
+ id: Z(),
946
+ ...y,
974
947
  maxSymbols: 100
975
948
  }), e(l);
976
949
  },
@@ -980,7 +953,7 @@ const Fi = (c) => {
980
953
  children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
981
954
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
982
955
  /* @__PURE__ */ t.jsx(
983
- b,
956
+ v,
984
957
  {
985
958
  name: "Plus",
986
959
  width: 16,
@@ -993,126 +966,111 @@ const Fi = (c) => {
993
966
  }
994
967
  )
995
968
  ] }),
996
- o !== void 0 && /* @__PURE__ */ t.jsx(
997
- rt,
969
+ c !== void 0 && /* @__PURE__ */ t.jsx(
970
+ ut,
998
971
  {
999
972
  otherTitle: "Other",
1000
- items: o
973
+ items: c
1001
974
  }
1002
975
  )
1003
976
  ] });
1004
- }, Ke = "_subtitle_jql1y_1", Ze = "_header_jql1y_8", ts = "_text_jql1y_9", es = "_productsBlock_jql1y_10", ss = "_buttonsBlock_jql1y_11", ns = "_top_jql1y_23", is = "_itemsBlock_jql1y_32", as = "_typeTexts_jql1y_38", os = "_block_jql1y_45", cs = "_active_jql1y_58", rs = "_products_jql1y_10", ls = "_product_jql1y_10", ds = "_button_jql1y_11", us = "_image_jql1y_88", ps = "_info_jql1y_95", hs = "_name_jql1y_107", ms = "_buttons_jql1y_11", _s = "_modal_jql1y_118", gs = "_other_jql1y_138", fs = "_options_jql1y_144", xs = "_addButton_jql1y_150", js = "_deleteButton_jql1y_165", Z = {
1005
- subtitle: Ke,
1006
- header: Ze,
1007
- text: ts,
1008
- productsBlock: es,
1009
- buttonsBlock: ss,
1010
- top: ns,
1011
- itemsBlock: is,
1012
- typeTexts: as,
1013
- block: os,
1014
- active: cs,
1015
- products: rs,
1016
- product: ls,
1017
- button: ds,
1018
- image: us,
1019
- info: ps,
1020
- name: hs,
1021
- buttons: ms,
1022
- modal: _s,
1023
- other: gs,
1024
- options: fs,
1025
- addButton: xs,
1026
- deleteButton: js
1027
- }, vs = (c) => {
1028
- const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: o = !0 } = c, { pages: u } = ft(), [p, _] = f.useState(null), [h, k] = f.useState({
977
+ }, Ne = "_subtitle_jql1y_1", Ce = "_products_jql1y_10", Se = "_product_jql1y_10", ke = "_button_jql1y_11", we = "_buttons_jql1y_11", Pe = "_addButton_jql1y_150", Me = "_deleteButton_jql1y_165", et = {
978
+ subtitle: Ne,
979
+ products: Ce,
980
+ product: Se,
981
+ button: ke,
982
+ buttons: we,
983
+ addButton: Pe,
984
+ deleteButton: Me
985
+ }, Be = (r) => {
986
+ const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = r, { pages: d } = vt(), [u, g] = m.useState(null), [f, P] = m.useState({
1029
987
  top: 0,
1030
988
  left: 0
1031
- }), [y, n] = f.useState(null), d = f.useRef(null);
1032
- f.useEffect(() => {
1033
- if (p) {
1034
- const g = [...i].map((T) => T.id === p.id ? p : T);
1035
- a(g);
989
+ }), [j, n] = m.useState(null), o = m.useRef(null);
990
+ m.useEffect(() => {
991
+ if (u) {
992
+ const x = [...i].map((_) => _.id === u.id ? u : _);
993
+ a(x);
1036
994
  }
1037
- }, [p]), f.useEffect(() => {
1038
- if (d.current && y) {
1039
- const g = d.current.getBoundingClientRect().height, T = window.innerHeight;
1040
- let I = y.top;
1041
- I + g > T + window.scrollY - 200 && (I = T + window.scrollY - g - 200), I < 0 && (I = 10), k({
1042
- top: I,
1043
- left: y.left
995
+ }, [u]), m.useEffect(() => {
996
+ if (o.current && j) {
997
+ const x = o.current.getBoundingClientRect().height, _ = window.innerHeight;
998
+ let y = j.top;
999
+ y + x > _ + window.scrollY - 200 && (y = _ + window.scrollY - x - 200), y < 0 && (y = 10), P({
1000
+ top: y,
1001
+ left: j.left
1044
1002
  });
1045
1003
  }
1046
- }, [d.current, y]);
1047
- const r = (g, T) => {
1048
- g.stopPropagation();
1049
- const I = g.target.getBoundingClientRect();
1004
+ }, [o.current, j]);
1005
+ const p = (x, _) => {
1006
+ x.stopPropagation();
1007
+ const y = x.target.getBoundingClientRect();
1050
1008
  n({
1051
- top: I.top + window.scrollY - 70,
1052
- left: I.left - (e ? 30 : 65)
1053
- }), _(T);
1054
- }, B = (g, T) => {
1055
- const I = [...i], M = {
1056
- ...g,
1009
+ top: y.top + window.scrollY - 70,
1010
+ left: y.left - (e ? 30 : 65)
1011
+ }), g(_);
1012
+ }, q = (x, _) => {
1013
+ const y = [...i], M = {
1014
+ ...x,
1057
1015
  id: Math.random().toString(36).substr(2, 9)
1058
1016
  // Генерируем новый уникальный ID
1059
1017
  };
1060
- I.splice(T + 1, 0, M), a(I);
1018
+ y.splice(_ + 1, 0, M), a(y);
1061
1019
  };
1062
- return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
1063
- /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
1064
- i.map((g, T) => /* @__PURE__ */ t.jsxs(
1020
+ return /* @__PURE__ */ t.jsxs("div", { className: et.products, children: [
1021
+ /* @__PURE__ */ t.jsx("h5", { className: et.subtitle, children: "Button Type" }),
1022
+ i.map((x, _) => /* @__PURE__ */ t.jsxs(
1065
1023
  "div",
1066
1024
  {
1067
- className: Z.product,
1025
+ className: et.product,
1068
1026
  children: [
1069
1027
  /* @__PURE__ */ t.jsx(
1070
- st,
1028
+ nt,
1071
1029
  {
1072
- onChange: (I) => {
1073
- const x = [...i].map((R) => R.id === g.id ? {
1074
- ...g,
1075
- type: I
1030
+ onChange: (y) => {
1031
+ const z = [...i].map((R) => R.id === x.id ? {
1032
+ ...x,
1033
+ type: y
1076
1034
  } : R);
1077
- a(x);
1035
+ a(z);
1078
1036
  },
1079
- value: g.type,
1037
+ value: x.type,
1080
1038
  options: ["Primary", "Secondary", "Tertiary"]
1081
1039
  }
1082
1040
  ),
1083
- /* @__PURE__ */ t.jsxs("div", { className: Z.buttons, children: [
1084
- /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1085
- b,
1041
+ /* @__PURE__ */ t.jsxs("div", { className: et.buttons, children: [
1042
+ /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1043
+ v,
1086
1044
  {
1087
1045
  name: "Copy",
1088
1046
  hoverable: !0,
1089
1047
  width: 20,
1090
1048
  height: 20,
1091
1049
  onClick: () => {
1092
- B(g, T);
1050
+ q(x, _);
1093
1051
  }
1094
1052
  }
1095
1053
  ) }),
1096
- /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1097
- b,
1054
+ /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1055
+ v,
1098
1056
  {
1099
1057
  name: "Sliders",
1100
1058
  hoverable: !0,
1101
1059
  width: 20,
1102
1060
  height: 20,
1103
- onClick: (I) => {
1104
- r(I, g);
1061
+ onClick: (y) => {
1062
+ p(y, x);
1105
1063
  }
1106
1064
  }
1107
1065
  ) }),
1108
- s && /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1109
- b,
1066
+ s && /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1067
+ v,
1110
1068
  {
1111
1069
  name: "Trash",
1112
1070
  hoverable: !0,
1113
1071
  onClick: () => {
1114
- const I = i.filter((M) => M.id !== g.id);
1115
- a(I);
1072
+ const y = i.filter((M) => M.id !== x.id);
1073
+ a(y);
1116
1074
  },
1117
1075
  width: 20,
1118
1076
  height: 20,
@@ -1122,16 +1080,16 @@ const Fi = (c) => {
1122
1080
  ] })
1123
1081
  ]
1124
1082
  },
1125
- g.id
1083
+ x.id
1126
1084
  )),
1127
- p && /* @__PURE__ */ t.jsx(
1128
- Mt,
1085
+ u && /* @__PURE__ */ t.jsx(
1086
+ Ot,
1129
1087
  {
1130
- ref: d,
1131
- activeButton: p,
1132
- setActiveButton: _,
1133
- popupPosition: h,
1134
- editableLink: o
1088
+ ref: o,
1089
+ activeButton: u,
1090
+ setActiveButton: g,
1091
+ popupPosition: f,
1092
+ editableLink: c
1135
1093
  }
1136
1094
  ),
1137
1095
  e && /* @__PURE__ */ t.jsx(
@@ -1143,42 +1101,42 @@ const Fi = (c) => {
1143
1101
  justifyContent: "center"
1144
1102
  },
1145
1103
  children: /* @__PURE__ */ t.jsx(
1146
- ct,
1104
+ lt,
1147
1105
  {
1148
1106
  withoutHover: !0,
1149
- className: Z.button,
1107
+ className: et.button,
1150
1108
  size: "s",
1151
1109
  onClick: () => {
1152
- const g = [...i];
1153
- o ? g.push({
1110
+ const x = [...i];
1111
+ c ? x.push({
1154
1112
  type: "Primary",
1155
- id: et(),
1113
+ id: Z(),
1156
1114
  typesText: [],
1157
1115
  text: {
1158
1116
  "en-US": "Button Name"
1159
1117
  },
1160
1118
  destination: "Go to Page",
1161
- page: u ? Object.values(u)[0].path : "/",
1119
+ page: d ? Object.values(d)[0].path : "/",
1162
1120
  openInNewTab: !1
1163
- }) : g.push({
1121
+ }) : x.push({
1164
1122
  type: "Primary",
1165
- id: et(),
1123
+ id: Z(),
1166
1124
  typesText: [],
1167
1125
  text: {
1168
1126
  "en-US": "Create Ticket"
1169
1127
  },
1170
1128
  destination: "Go to Page",
1171
- page: u ? Object.values(u)[0].path : "/",
1129
+ page: d ? Object.values(d)[0].path : "/",
1172
1130
  openInNewTab: !1
1173
- }), a(g);
1131
+ }), a(x);
1174
1132
  },
1175
1133
  style: {
1176
1134
  width: "fit-content"
1177
1135
  },
1178
- children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
1136
+ children: /* @__PURE__ */ t.jsxs("div", { className: et.addButton, children: [
1179
1137
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1180
1138
  /* @__PURE__ */ t.jsx(
1181
- b,
1139
+ v,
1182
1140
  {
1183
1141
  name: "Plus",
1184
1142
  width: 16,
@@ -1191,123 +1149,123 @@ const Fi = (c) => {
1191
1149
  }
1192
1150
  )
1193
1151
  ] });
1194
- }, Ui = (c) => {
1152
+ }, qn = (r) => {
1195
1153
  const {
1196
1154
  isActiveButtons: i,
1197
1155
  setIsActiveButtons: a,
1198
1156
  buttons: s,
1199
1157
  setButtons: e,
1200
- editableLink: o = !0,
1201
- addable: u = !0,
1202
- deletable: p = !0
1203
- } = c;
1204
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: jt.buttonsBlock, children: [
1205
- /* @__PURE__ */ t.jsxs("div", { className: jt.top, children: [
1206
- /* @__PURE__ */ t.jsx("h3", { className: jt.title, children: "Buttons" }),
1158
+ editableLink: c = !0,
1159
+ addable: d = !0,
1160
+ deletable: u = !0
1161
+ } = r;
1162
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: yt.buttonsBlock, children: [
1163
+ /* @__PURE__ */ t.jsxs("div", { className: yt.top, children: [
1164
+ /* @__PURE__ */ t.jsx("h3", { className: yt.title, children: "Buttons" }),
1207
1165
  /* @__PURE__ */ t.jsx(
1208
- ot,
1166
+ rt,
1209
1167
  {
1210
1168
  current: i,
1211
- onChange: (_) => a(_)
1169
+ onChange: (g) => a(g)
1212
1170
  }
1213
1171
  )
1214
1172
  ] }),
1215
1173
  i && /* @__PURE__ */ t.jsx(
1216
- vs,
1174
+ Be,
1217
1175
  {
1218
1176
  buttons: s,
1219
1177
  setButtons: e,
1220
- editableLink: o,
1221
- addable: u,
1222
- deletable: p
1178
+ editableLink: c,
1179
+ addable: d,
1180
+ deletable: u
1223
1181
  }
1224
1182
  )
1225
1183
  ] }) });
1226
1184
  };
1227
- function bs(c) {
1228
- const { product: i, children: a } = c, { attributes: s, listeners: e, setNodeRef: o, transform: u, transition: p, isDragging: _ } = _t({
1185
+ function Te(r) {
1186
+ const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
1229
1187
  id: String(i.listingId)
1230
- }), h = {
1231
- transform: gt.Transform.toString(u),
1232
- transition: p
1188
+ }), f = {
1189
+ transform: jt.Transform.toString(d),
1190
+ transition: u
1233
1191
  };
1234
1192
  return /* @__PURE__ */ t.jsx(
1235
1193
  "div",
1236
1194
  {
1237
- ref: o,
1238
- style: h,
1239
- className: `${G.product} ${_ ? G.dragging : ""}`,
1195
+ ref: c,
1196
+ style: f,
1197
+ className: `${X.product} ${g ? X.dragging : ""}`,
1240
1198
  ...s,
1241
1199
  ...e,
1242
1200
  children: a
1243
1201
  }
1244
1202
  );
1245
1203
  }
1246
- const Vi = (c) => {
1204
+ const On = (r) => {
1247
1205
  const {
1248
1206
  isActiveItems: i,
1249
1207
  setIsActiveItems: a,
1250
1208
  items: s,
1251
1209
  setItems: e,
1252
- other: o,
1253
- title: u,
1254
- subtitle: p,
1255
- editable: _ = !0,
1256
- draggable: h = !1,
1257
- withImage: k = !1,
1258
- deletable: y = !0,
1210
+ other: c,
1211
+ title: d,
1212
+ subtitle: u,
1213
+ editable: g = !0,
1214
+ draggable: f = !1,
1215
+ withImage: P = !1,
1216
+ deletable: j = !0,
1259
1217
  addable: n = !0,
1260
- itemsType: d,
1261
- itemsOptions: r,
1262
- limit: B,
1263
- aspectRatio: g,
1264
- setAspectRatio: T
1265
- } = c, [I, M] = f.useState(
1218
+ itemsType: o,
1219
+ itemsOptions: p,
1220
+ limit: q,
1221
+ aspectRatio: x,
1222
+ setAspectRatio: _
1223
+ } = r, [y, M] = m.useState(
1266
1224
  null
1267
- ), [x, R] = f.useState({
1225
+ ), [z, R] = m.useState({
1268
1226
  top: 0,
1269
1227
  left: 0
1270
- }), [Q, U] = f.useState(!1), m = lt(
1271
- dt(ut, {
1228
+ }), [I, H] = m.useState(!1), h = ht(
1229
+ pt(mt, {
1272
1230
  activationConstraint: {
1273
1231
  distance: 5
1274
1232
  }
1275
1233
  })
1276
1234
  );
1277
- f.useEffect(() => {
1278
- const v = () => {
1279
- M(null), U(!1);
1235
+ m.useEffect(() => {
1236
+ const b = () => {
1237
+ M(null), H(!1);
1280
1238
  };
1281
- return document.body.addEventListener("click", v), M(null), U(!1), () => {
1282
- M(null), U(!1), document.body.removeEventListener("click", v);
1239
+ return document.body.addEventListener("click", b), M(null), H(!1), () => {
1240
+ M(null), H(!1), document.body.removeEventListener("click", b);
1283
1241
  };
1284
- }, []), f.useEffect(() => {
1285
- if (I) {
1286
- const v = [...s].map((O) => O.listingId === I.listingId ? I : O);
1287
- e(v);
1242
+ }, []), m.useEffect(() => {
1243
+ if (y) {
1244
+ const b = [...s].map((A) => A.listingId === y.listingId ? y : A);
1245
+ e(b);
1288
1246
  }
1289
- }, [I]);
1290
- const j = (v, O) => {
1291
- v.stopPropagation();
1292
- const L = v.target.getBoundingClientRect(), l = 100, w = window.innerHeight;
1293
- let N = L.top + window.scrollY;
1294
- N + l > w && (N = w - l - 20), U(!0), R({
1295
- top: N - 80,
1296
- left: L.left - 30
1297
- }), M(O);
1247
+ }, [y]);
1248
+ const S = (b, A) => {
1249
+ b.stopPropagation();
1250
+ const U = b.target.getBoundingClientRect(), l = 100, $ = window.innerHeight;
1251
+ let C = U.top + window.scrollY;
1252
+ C + l > $ && (C = $ - l - 20), H(!0), R({
1253
+ top: C - 80,
1254
+ left: U.left - 30
1255
+ }), M(A);
1298
1256
  };
1299
- function S(v) {
1300
- if (k)
1301
- return v ? /* @__PURE__ */ t.jsx(
1257
+ function k(b) {
1258
+ if (P)
1259
+ return b ? /* @__PURE__ */ t.jsx(
1302
1260
  "img",
1303
1261
  {
1304
- src: `https://imagedelivery.net/${v}/w=1000`,
1262
+ src: `https://imagedelivery.net/${b}/w=1000`,
1305
1263
  alt: "image",
1306
1264
  width: 16,
1307
1265
  height: 16
1308
1266
  }
1309
1267
  ) : /* @__PURE__ */ t.jsx(
1310
- b,
1268
+ v,
1311
1269
  {
1312
1270
  name: "Image",
1313
1271
  width: 16,
@@ -1316,21 +1274,21 @@ const Vi = (c) => {
1316
1274
  }
1317
1275
  );
1318
1276
  }
1319
- const P = (v) => {
1320
- const { active: O, over: L } = v;
1321
- if (L && O.id !== L.id) {
1322
- const l = s.findIndex((N) => String(N.listingId) === O.id), w = s.findIndex((N) => String(N.listingId) === L.id);
1323
- if (l !== -1 && w !== -1) {
1324
- const N = [...s], [E] = N.splice(l, 1);
1325
- N.splice(w, 0, E), e(N);
1277
+ const N = (b) => {
1278
+ const { active: A, over: U } = b;
1279
+ if (U && A.id !== U.id) {
1280
+ const l = s.findIndex((C) => String(C.listingId) === A.id), $ = s.findIndex((C) => String(C.listingId) === U.id);
1281
+ if (l !== -1 && $ !== -1) {
1282
+ const C = [...s], [E] = C.splice(l, 1);
1283
+ C.splice($, 0, E), e(C);
1326
1284
  }
1327
1285
  }
1328
- }, $ = (v) => {
1329
- const O = r.find((l) => v.listingId === l.id);
1330
- if (!O) return null;
1331
- const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1332
- h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1333
- b,
1286
+ }, B = (b) => {
1287
+ const A = p.find((l) => b.listingId === l.id);
1288
+ if (!A) return null;
1289
+ const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1290
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1291
+ v,
1334
1292
  {
1335
1293
  name: "DotsSixVertical",
1336
1294
  hoverable: !0,
@@ -1338,110 +1296,110 @@ const Vi = (c) => {
1338
1296
  height: 20
1339
1297
  }
1340
1298
  ) }),
1341
- d === "select" && /* @__PURE__ */ t.jsx(
1342
- st,
1299
+ o === "select" && /* @__PURE__ */ t.jsx(
1300
+ nt,
1343
1301
  {
1344
1302
  onChange: (l) => {
1345
- const w = [...s], N = r.find((D) => D.productData.name === l);
1346
- if (!N) return;
1303
+ const $ = [...s], C = p.find((L) => L.productData.name === l);
1304
+ if (!C) return;
1347
1305
  const E = {
1348
- listingId: N.id,
1349
- image: N.productData.images.length > 0 ? N.productData.images[0].cfId : ""
1350
- }, K = w.map((D) => D.listingId === v.listingId ? E : D);
1351
- M(E), e([...K]);
1306
+ listingId: C.id,
1307
+ image: C.productData.images.length > 0 ? C.productData.images[0].cfId : ""
1308
+ }, tt = $.map((L) => L.listingId === b.listingId ? E : L);
1309
+ M(E), e([...tt]);
1352
1310
  },
1353
- value: O.productData.name,
1311
+ value: A.productData.name,
1354
1312
  options: [
1355
- ...r.filter((l) => !s.find((w) => w.listingId === l.id)).map((l) => l.productData.name)
1313
+ ...p.filter((l) => !s.find(($) => $.listingId === l.id)).map((l) => l.productData.name)
1356
1314
  ],
1357
- leftAddonOptions: r.map((l) => {
1358
- var w;
1315
+ leftAddonOptions: p.map((l) => {
1316
+ var $;
1359
1317
  return {
1360
1318
  value: l.productData.name,
1361
- addon: S(((w = l.productData.images[0]) == null ? void 0 : w.cfId) || "")
1319
+ addon: k((($ = l.productData.images[0]) == null ? void 0 : $.cfId) || "")
1362
1320
  };
1363
1321
  })
1364
1322
  }
1365
1323
  ),
1366
- /* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
1367
- _ && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1368
- b,
1324
+ /* @__PURE__ */ t.jsxs("div", { className: X.buttons, children: [
1325
+ g && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1326
+ v,
1369
1327
  {
1370
1328
  name: "Sliders",
1371
1329
  hoverable: !0,
1372
1330
  width: 20,
1373
1331
  height: 20,
1374
- onClick: (l) => j(l, v)
1332
+ onClick: (l) => S(l, b)
1375
1333
  }
1376
1334
  ) }),
1377
- y && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1378
- b,
1335
+ j && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1336
+ v,
1379
1337
  {
1380
1338
  name: "Trash",
1381
1339
  hoverable: !0,
1382
1340
  width: 20,
1383
1341
  height: 20,
1384
1342
  fill: "#C12A2A",
1385
- onClick: () => e(s.filter((l) => l !== v))
1343
+ onClick: () => e(s.filter((l) => l !== b))
1386
1344
  }
1387
1345
  ) })
1388
1346
  ] })
1389
1347
  ] });
1390
- return h ? /* @__PURE__ */ t.jsx(
1391
- bs,
1348
+ return f ? /* @__PURE__ */ t.jsx(
1349
+ Te,
1392
1350
  {
1393
- product: v,
1394
- children: L
1351
+ product: b,
1352
+ children: U
1395
1353
  },
1396
- v.listingId
1354
+ b.listingId
1397
1355
  ) : /* @__PURE__ */ t.jsx(
1398
1356
  "div",
1399
1357
  {
1400
- className: G.product,
1401
- children: L
1358
+ className: X.product,
1359
+ children: U
1402
1360
  },
1403
- v.listingId
1361
+ b.listingId
1404
1362
  );
1405
- }, A = f.useRef(null);
1406
- return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
1407
- (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
1408
- u && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: u }),
1363
+ }, O = m.useRef(null);
1364
+ return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
1365
+ (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
1366
+ d && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: d }),
1409
1367
  i !== void 0 && /* @__PURE__ */ t.jsx(
1410
- ot,
1368
+ rt,
1411
1369
  {
1412
1370
  current: i,
1413
- onChange: (v) => a == null ? void 0 : a(v)
1371
+ onChange: (b) => a == null ? void 0 : a(b)
1414
1372
  }
1415
1373
  )
1416
1374
  ] }),
1417
- Q && I && /* @__PURE__ */ t.jsx(
1375
+ I && y && /* @__PURE__ */ t.jsx(
1418
1376
  At,
1419
1377
  {
1420
- ref: A,
1421
- activeItem: I,
1378
+ ref: O,
1379
+ activeItem: y,
1422
1380
  setActiveItem: M,
1423
- setIsOpenModal: U,
1424
- popupPosition: x,
1425
- itemsOptions: r
1381
+ setIsOpenModal: H,
1382
+ popupPosition: z,
1383
+ itemsOptions: p
1426
1384
  }
1427
1385
  ),
1428
- i && /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
1429
- p && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: p }),
1430
- h ? /* @__PURE__ */ t.jsx(
1431
- pt,
1386
+ i && /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
1387
+ u && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: u }),
1388
+ f ? /* @__PURE__ */ t.jsx(
1389
+ gt,
1432
1390
  {
1433
- sensors: m,
1434
- onDragEnd: P,
1391
+ sensors: h,
1392
+ onDragEnd: N,
1435
1393
  children: /* @__PURE__ */ t.jsx(
1436
- ht,
1394
+ ft,
1437
1395
  {
1438
- items: s.map((v) => String(v.listingId)),
1439
- strategy: mt,
1440
- children: s.map((v) => $(v))
1396
+ items: s.map((b) => String(b.listingId)),
1397
+ strategy: xt,
1398
+ children: s.map((b) => B(b))
1441
1399
  }
1442
1400
  )
1443
1401
  }
1444
- ) : s.map((v) => $(v)),
1402
+ ) : s.map((b) => B(b)),
1445
1403
  n && /* @__PURE__ */ t.jsx(
1446
1404
  "div",
1447
1405
  {
@@ -1451,31 +1409,31 @@ const Vi = (c) => {
1451
1409
  justifyContent: "center"
1452
1410
  },
1453
1411
  children: /* @__PURE__ */ t.jsx(
1454
- ct,
1412
+ lt,
1455
1413
  {
1456
1414
  withoutHover: !0,
1457
- className: G.button,
1415
+ className: X.button,
1458
1416
  size: "s",
1459
1417
  onClick: () => {
1460
- const v = [...s];
1461
- for (let O = 0; O < r.length; O++)
1462
- if (!s.find((L) => L.listingId === r[O].id)) {
1463
- v.push({
1464
- listingId: r[O].id,
1465
- image: r[O].productData.images.length > 0 ? r[O].productData.images[0].cfId : ""
1418
+ const b = [...s];
1419
+ for (let A = 0; A < p.length; A++)
1420
+ if (!s.find((U) => U.listingId === p[A].id)) {
1421
+ b.push({
1422
+ listingId: p[A].id,
1423
+ image: p[A].productData.images.length > 0 ? p[A].productData.images[0].cfId : ""
1466
1424
  });
1467
1425
  break;
1468
1426
  }
1469
- e(v);
1427
+ e(b);
1470
1428
  },
1471
- disabled: s.length === (B || r.length),
1429
+ disabled: s.length === (q || p.length),
1472
1430
  style: {
1473
1431
  width: "fit-content"
1474
1432
  },
1475
- children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
1433
+ children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
1476
1434
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1477
1435
  /* @__PURE__ */ t.jsx(
1478
- b,
1436
+ v,
1479
1437
  {
1480
1438
  name: "Plus",
1481
1439
  width: 16,
@@ -1488,310 +1446,307 @@ const Vi = (c) => {
1488
1446
  }
1489
1447
  )
1490
1448
  ] }),
1491
- g && T && /* @__PURE__ */ t.jsx(
1492
- st,
1449
+ x && _ && /* @__PURE__ */ t.jsx(
1450
+ nt,
1493
1451
  {
1494
- value: g,
1495
- options: Object.keys(Ct),
1496
- onChange: (v) => T(v),
1497
- leftAddonOptions: St
1452
+ value: x,
1453
+ options: Object.keys(Pt),
1454
+ onChange: (b) => _(b),
1455
+ leftAddonOptions: wt
1498
1456
  }
1499
1457
  ),
1500
- i && o !== void 0 && /* @__PURE__ */ t.jsx(
1501
- rt,
1458
+ i && c !== void 0 && /* @__PURE__ */ t.jsx(
1459
+ ut,
1502
1460
  {
1503
1461
  otherTitle: "Other",
1504
- items: o
1462
+ items: c
1505
1463
  }
1506
1464
  )
1507
1465
  ] });
1508
- }, ys = "_options_1aiq8_1", Ns = "_price_1aiq8_18", Is = "_oldPrice_1aiq8_25", ks = "_newPrice_1aiq8_33", Cs = "_animate_1aiq8_40", Ss = "_appearAndBounce_1aiq8_1", $s = "_meta_1aiq8_58", qs = "_info_1aiq8_64", ws = "_infoRight_1aiq8_72", Ps = "_buttons_1aiq8_79", Bs = "_variants_1aiq8_86", Ts = "_variant_1aiq8_86", Ms = "_stock_1aiq8_104", As = "_variantInfo_1aiq8_111", Os = "_quantity_1aiq8_117", Es = "_count_1aiq8_124", Rs = "_focused_1aiq8_141", Ds = "_button_1aiq8_79", zs = "_activeVariant_1aiq8_167", Ls = "_chargeTypes_1aiq8_171", Fs = "_charge_1aiq8_171", Us = "_chargeActive_1aiq8_196", Vs = "_title_1aiq8_204", q = {
1509
- options: ys,
1510
- price: Ns,
1511
- oldPrice: Is,
1512
- newPrice: ks,
1513
- animate: Cs,
1514
- appearAndBounce: Ss,
1515
- meta: $s,
1516
- info: qs,
1517
- infoRight: ws,
1518
- buttons: Ps,
1519
- variants: Bs,
1520
- variant: Ts,
1521
- stock: Ms,
1522
- variantInfo: As,
1523
- quantity: Os,
1524
- count: Es,
1525
- focused: Rs,
1526
- button: Ds,
1527
- activeVariant: zs,
1528
- chargeTypes: Ls,
1529
- charge: Fs,
1530
- chargeActive: Us,
1531
- title: Vs
1466
+ }, $e = "_options_167h8_1", qe = "_price_167h8_18", Oe = "_oldPrice_167h8_25", Ae = "_newPrice_167h8_33", Ee = "_animate_167h8_40", De = "_meta_167h8_58", Re = "_info_167h8_64", Le = "_infoRight_167h8_73", ze = "_buttons_167h8_80", He = "_variants_167h8_87", Ue = "_variant_167h8_87", Fe = "_stock_167h8_105", Ve = "_variantInfo_167h8_112", Ye = "_quantity_167h8_119", Ge = "_button_167h8_80", We = "_activeVariant_167h8_165", Xe = "_chargeTypes_167h8_169", Qe = "_charge_167h8_169", Je = "_chargeActive_167h8_194", Ke = "_title_167h8_202", T = {
1467
+ options: $e,
1468
+ price: qe,
1469
+ oldPrice: Oe,
1470
+ newPrice: Ae,
1471
+ animate: Ee,
1472
+ meta: De,
1473
+ info: Re,
1474
+ infoRight: Le,
1475
+ buttons: ze,
1476
+ variants: He,
1477
+ variant: Ue,
1478
+ stock: Fe,
1479
+ variantInfo: Ve,
1480
+ quantity: Ye,
1481
+ button: Ge,
1482
+ activeVariant: We,
1483
+ chargeTypes: Xe,
1484
+ charge: Qe,
1485
+ chargeActive: Je,
1486
+ title: Ke
1532
1487
  };
1533
- var It = /* @__PURE__ */ ((c) => (c.ONE_TIME = "One-Time", c.RECURRING = "Subscribe & Save", c))(It || {});
1534
- const Hs = (c) => {
1535
- var I, M;
1536
- const { product: i, setIsOpen: a } = c, { variants: s } = i, [e, o] = f.useState(s[0]), [u, p] = f.useState(
1488
+ var St = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(St || {});
1489
+ const Ze = (r) => {
1490
+ var z, R;
1491
+ const { product: i, setIsOpen: a } = r, { variants: s } = i, [e, c] = m.useState(s[0]), [d, u] = m.useState(
1537
1492
  e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
1538
- ), _ = xt(), [h, k] = f.useState(1), { reset: y, addProductToCart: n } = it(), [d, r] = f.useState(!1);
1539
- f.useEffect(() => {
1540
- r(!0);
1541
- const x = setTimeout(() => r(!1), 600);
1542
- return () => clearTimeout(x);
1543
- }, [h]);
1544
- async function B() {
1545
- await n({
1493
+ ), { notifications: g, setNotifications: f } = Ct(), P = bt(), [j, n] = m.useState(1), { reset: o, addProductToCart: p } = at(), [q, x] = m.useState(!1);
1494
+ m.useEffect(() => {
1495
+ x(!0);
1496
+ const I = setTimeout(() => x(!1), 600);
1497
+ return () => clearTimeout(I);
1498
+ }, [j]);
1499
+ async function _() {
1500
+ await p({
1546
1501
  productId: i.id,
1547
1502
  productVariantId: e.id,
1548
- quantity: h
1549
- }), a == null || a(!1);
1503
+ quantity: j
1504
+ }), a == null || a(!1), f([
1505
+ ...g,
1506
+ {
1507
+ id: Z(),
1508
+ message: "Product added to cart",
1509
+ status: "success"
1510
+ }
1511
+ ]);
1550
1512
  }
1551
- function g() {
1552
- y(), B(), _("/checkout");
1513
+ function y() {
1514
+ o(), _(), P("/checkout");
1553
1515
  }
1554
- function T(x) {
1555
- if (x >= 864e5) {
1556
- const j = Math.floor(x / 864e5);
1557
- return `${j} ${j === 1 ? "day" : "days"}`;
1558
- } else if (x >= 36e5) {
1559
- const j = Math.floor(x / 36e5);
1560
- return `${j} ${j === 1 ? "hour" : "hours"}`;
1561
- } else if (x >= 6e4) {
1562
- const j = Math.floor(x / 6e4);
1563
- return `${j} ${j === 1 ? "minute" : "minutes"}`;
1516
+ function M(I) {
1517
+ if (I >= 864e5) {
1518
+ const N = Math.floor(I / 864e5);
1519
+ return `${N} ${N === 1 ? "day" : "days"}`;
1520
+ } else if (I >= 36e5) {
1521
+ const N = Math.floor(I / 36e5);
1522
+ return `${N} ${N === 1 ? "hour" : "hours"}`;
1523
+ } else if (I >= 6e4) {
1524
+ const N = Math.floor(I / 6e4);
1525
+ return `${N} ${N === 1 ? "minute" : "minutes"}`;
1564
1526
  } else {
1565
- const j = Math.floor(x / 1e3);
1566
- return `${j} ${j === 1 ? "second" : "seconds"}`;
1527
+ const N = Math.floor(I / 1e3);
1528
+ return `${N} ${N === 1 ? "second" : "seconds"}`;
1567
1529
  }
1568
1530
  }
1569
- return f.useEffect(() => {
1570
- e.quantity && e.quantity.available === 0 ? k(0) : k(1);
1571
- }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: q.options, children: [
1572
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: q.chargeTypes, children: e.chargeTypes.map((x) => /* @__PURE__ */ t.jsx(
1531
+ return m.useEffect(() => {
1532
+ e.quantity && e.quantity.available === 0 ? n(0) : n(1);
1533
+ }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
1534
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: T.chargeTypes, children: e.chargeTypes.map((I) => /* @__PURE__ */ t.jsx(
1573
1535
  "div",
1574
1536
  {
1575
- className: F(q.charge, {
1576
- [q.chargeActive]: u === x
1537
+ className: F(T.charge, {
1538
+ [T.chargeActive]: d === I
1577
1539
  }),
1578
- onClick: () => p(x),
1579
- children: It[x]
1540
+ onClick: () => u(I),
1541
+ children: St[I]
1580
1542
  },
1581
- x
1543
+ I
1582
1544
  )) }),
1583
- /* @__PURE__ */ t.jsx("div", { className: q.variants, children: s.map((x) => {
1584
- var R, Q;
1545
+ /* @__PURE__ */ t.jsx("div", { className: T.variants, children: s.map((I) => {
1546
+ var H, h;
1585
1547
  return /* @__PURE__ */ t.jsxs(
1586
1548
  "div",
1587
1549
  {
1588
- className: F(q.variant, {
1589
- [q.activeVariant]: e.id === x.id
1550
+ className: F(T.variant, {
1551
+ [T.activeVariant]: e.id === I.id
1590
1552
  }),
1591
- onClick: () => o(x),
1553
+ onClick: () => c(I),
1592
1554
  children: [
1593
- /* @__PURE__ */ t.jsxs("div", { className: q.variantInfo, children: [
1594
- /* @__PURE__ */ t.jsx("span", { className: q.title, children: yt(x.name) }),
1555
+ /* @__PURE__ */ t.jsxs("div", { className: T.variantInfo, children: [
1556
+ /* @__PURE__ */ t.jsx("span", { className: T.title, children: it(I.name) }),
1595
1557
  /* @__PURE__ */ t.jsxs("span", { children: [
1596
1558
  "$",
1597
- u === "ONE_TIME" ? x.price.amount : x.subscriptionSettings ? x.subscriptionSettings.price.amount : "Price Not Found"
1559
+ d === "ONE_TIME" ? I.price.amount : I.subscriptionSettings ? I.subscriptionSettings.price.amount : "Price Not Found"
1598
1560
  ] })
1599
1561
  ] }),
1600
- /* @__PURE__ */ t.jsx("div", { children: u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: q.stock, children: [
1601
- (R = x.quantity.restrictions) != null && R.max || x.quantity.available !== void 0 ? ((Q = x.quantity.restrictions) == null ? void 0 : Q.max) || x.quantity.available : "∞",
1562
+ /* @__PURE__ */ t.jsx("div", { children: d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: T.stock, children: [
1563
+ (H = I.quantity.restrictions) != null && H.max || I.quantity.available !== void 0 ? ((h = I.quantity.restrictions) == null ? void 0 : h.max) || I.quantity.available : "∞",
1602
1564
  " ",
1603
1565
  "in stock"
1604
1566
  ] }) })
1605
1567
  ]
1606
1568
  },
1607
- x.id
1569
+ I.id
1608
1570
  );
1609
1571
  }) }),
1610
- u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: q.quantity, children: [
1572
+ d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: T.quantity, children: [
1611
1573
  /* @__PURE__ */ t.jsx(
1612
- z,
1574
+ D,
1613
1575
  {
1614
1576
  type: "Secondary",
1615
1577
  onClick: () => {
1616
- h > 1 ? k((x) => x - 1) : k(1);
1578
+ j > 1 ? n((I) => I - 1) : n(1);
1617
1579
  },
1618
- className: q.button,
1619
- disabled: e.quantity.available && e.quantity.restrictions && h <= e.quantity.restrictions.min || e.quantity.available === 0,
1620
- children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
1580
+ className: T.button,
1581
+ disabled: e.quantity.available && e.quantity.restrictions && j <= e.quantity.restrictions.min || e.quantity.available === 0,
1582
+ children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
1621
1583
  }
1622
1584
  ),
1623
1585
  /* @__PURE__ */ t.jsx(
1624
- Ot,
1586
+ Et,
1625
1587
  {
1626
1588
  type: "number",
1627
- value: String(h),
1628
- onChange: (x) => k(Number(x)),
1629
- max: ((I = e.quantity.restrictions) == null ? void 0 : I.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1630
- min: ((M = e.quantity.restrictions) == null ? void 0 : M.min) || 0,
1589
+ value: String(j),
1590
+ onChange: (I) => n(Number(I)),
1591
+ max: ((z = e.quantity.restrictions) == null ? void 0 : z.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1592
+ min: ((R = e.quantity.restrictions) == null ? void 0 : R.min) || 0,
1631
1593
  centered: !0,
1632
- disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && h >= e.quantity.restrictions.max
1594
+ disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && j >= e.quantity.restrictions.max
1633
1595
  }
1634
1596
  ),
1635
1597
  /* @__PURE__ */ t.jsx(
1636
- z,
1598
+ D,
1637
1599
  {
1638
1600
  type: "Secondary",
1639
1601
  onClick: () => {
1640
- k((x) => x + 1);
1602
+ n((I) => I + 1);
1641
1603
  },
1642
- className: q.button,
1643
- disabled: !!(e.quantity.available && e.quantity.restrictions && h >= e.quantity.restrictions.max || e.quantity.available === 0),
1644
- children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
1604
+ className: T.button,
1605
+ disabled: !!(e.quantity.available && e.quantity.restrictions && j >= e.quantity.restrictions.max || e.quantity.available === 0),
1606
+ children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
1645
1607
  }
1646
1608
  )
1647
1609
  ] }),
1648
- /* @__PURE__ */ t.jsxs("div", { className: q.meta, children: [
1649
- /* @__PURE__ */ t.jsxs("div", { className: q.info, children: [
1610
+ /* @__PURE__ */ t.jsxs("div", { className: T.meta, children: [
1611
+ /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1650
1612
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1651
- /* @__PURE__ */ t.jsxs("div", { className: q.infoRight, children: [
1613
+ /* @__PURE__ */ t.jsxs("div", { className: T.infoRight, children: [
1652
1614
  /* @__PURE__ */ t.jsx(
1653
- b,
1615
+ v,
1654
1616
  {
1655
1617
  name: "Lightning",
1656
- fill: "#FF3F19",
1618
+ fill: "var(--text-action)",
1657
1619
  width: 20,
1658
1620
  height: 20
1659
1621
  }
1660
1622
  ),
1661
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : T(e.deliveryTime) })
1623
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : M(e.deliveryTime) })
1662
1624
  ] })
1663
1625
  ] }),
1664
- /* @__PURE__ */ t.jsxs("div", { className: q.info, children: [
1626
+ /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1665
1627
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1666
- /* @__PURE__ */ t.jsx("div", { className: q.infoRight, children: u === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: q.price, children: [
1667
- /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1628
+ /* @__PURE__ */ t.jsx("div", { className: T.infoRight, children: d === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1629
+ /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1668
1630
  "$ ",
1669
- (e.price.amount || 0) * h
1631
+ (e.price.amount || 0) * j
1670
1632
  ] }),
1671
- /* @__PURE__ */ t.jsxs("span", { className: q.oldPrice, children: [
1633
+ /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1672
1634
  "$ ",
1673
- (e.compareAtPrice.amount || 0) * h
1635
+ (e.compareAtPrice.amount || 0) * j
1674
1636
  ] })
1675
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1637
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1676
1638
  "$ ",
1677
- (e.price.amount || 0) * h
1678
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: q.price, children: [
1679
- /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1639
+ (e.price.amount || 0) * j
1640
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1641
+ /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1680
1642
  "$ ",
1681
1643
  e.subscriptionSettings.price.amount || 0
1682
1644
  ] }),
1683
- /* @__PURE__ */ t.jsxs("span", { className: q.oldPrice, children: [
1645
+ /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1684
1646
  "$ ",
1685
1647
  e.subscriptionSettings.compareAtPrice.amount || 0
1686
1648
  ] })
1687
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1649
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1688
1650
  "$ ",
1689
1651
  e.subscriptionSettings.price.amount || 0
1690
1652
  ] }) })
1691
1653
  ] })
1692
1654
  ] }),
1693
- /* @__PURE__ */ t.jsxs("div", { className: q.buttons, children: [
1655
+ /* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
1694
1656
  /* @__PURE__ */ t.jsx(
1695
- z,
1657
+ D,
1696
1658
  {
1697
1659
  type: "Primary",
1698
- onClick: () => g(),
1660
+ onClick: () => y(),
1699
1661
  disabled: e.quantity && e.quantity.available === 0,
1700
- children: u === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1662
+ children: d === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1701
1663
  }
1702
1664
  ),
1703
- u === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1704
- z,
1665
+ d === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1666
+ D,
1705
1667
  {
1706
1668
  type: "Secondary",
1707
- onClick: () => B(),
1669
+ onClick: () => _(),
1708
1670
  disabled: e.quantity && e.quantity.available === 0,
1709
1671
  children: "Add to Cart"
1710
1672
  }
1711
1673
  )
1712
1674
  ] })
1713
1675
  ] });
1714
- }, Ys = "_button_14q75_1", Ws = "_login_14q75_14", Gs = "_signUp_14q75_18", Xs = "_buttons_14q75_23", Qs = "_modal_14q75_32", Js = "_closing_14q75_64", Ks = "_info_14q75_113", Zs = "_top_14q75_120", tn = "_title_14q75_131", en = "_clear_14q75_138", sn = "_activeClear_14q75_145", nn = "_count_14q75_149", an = "_cart_14q75_164", on = "_empty_14q75_172", cn = "_product_14q75_198", rn = "_products_14q75_207", ln = "_image_14q75_215", dn = "_productInfo_14q75_230", un = "_content_14q75_237", pn = "_name_14q75_243", hn = "_price_14q75_249", mn = "_productButtons_14q75_255", _n = "_productButton_14q75_255", gn = "_productCount_14q75_272", fn = "_bottom_14q75_289", xn = "_subtotal_14q75_297", jn = "_block_14q75_305", vn = "_shoppingCount_14q75_312", bn = "_total_14q75_332", yn = "_link_14q75_338", Nn = "_userInfo_14q75_345", In = "_pagesMobileModal_14q75_356", kn = "_pagesMobileModalContent_14q75_370", Cn = "_pagesMobileModalHeader_14q75_376", Sn = "_pagesMobileModalFooter_14q75_386", C = {
1715
- button: Ys,
1716
- login: Ws,
1717
- signUp: Gs,
1718
- buttons: Xs,
1719
- modal: Qs,
1720
- "slide-in-fade": "_slide-in-fade_14q75_1",
1721
- "mobile-slide-in-fade": "_mobile-slide-in-fade_14q75_1",
1722
- closing: Js,
1723
- "mobile-slide-out-fade": "_mobile-slide-out-fade_14q75_1",
1724
- "slide-out-fade": "_slide-out-fade_14q75_1",
1725
- info: Ks,
1726
- top: Zs,
1727
- title: tn,
1728
- clear: en,
1729
- activeClear: sn,
1730
- count: nn,
1731
- cart: an,
1732
- empty: on,
1733
- product: cn,
1734
- products: rn,
1735
- image: ln,
1736
- productInfo: dn,
1737
- content: un,
1738
- name: pn,
1739
- price: hn,
1740
- productButtons: mn,
1741
- productButton: _n,
1742
- productCount: gn,
1743
- bottom: fn,
1744
- subtotal: xn,
1745
- block: jn,
1746
- shoppingCount: vn,
1747
- total: bn,
1748
- link: yn,
1749
- userInfo: Nn,
1750
- pagesMobileModal: In,
1751
- pagesMobileModalContent: kn,
1752
- pagesMobileModalHeader: Cn,
1753
- pagesMobileModalFooter: Sn
1754
- }, Hi = (c) => {
1755
- const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = c;
1756
- return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
1757
- i && /* @__PURE__ */ t.jsx($n, {}),
1758
- s && /* @__PURE__ */ t.jsx(Pt, { signUp: a })
1676
+ }, ts = "_buttons_qns27_23", es = "_modal_qns27_32", ss = "_closing_qns27_64", ns = "_info_qns27_113", is = "_top_qns27_120", as = "_title_qns27_131", os = "_clear_qns27_138", cs = "_activeClear_qns27_145", rs = "_count_qns27_149", ls = "_cart_qns27_164", ds = "_empty_qns27_172", us = "_product_qns27_198", hs = "_products_qns27_207", ps = "_image_qns27_215", ms = "_productInfo_qns27_231", gs = "_content_qns27_238", fs = "_name_qns27_244", xs = "_price_qns27_250", _s = "_productButtons_qns27_256", js = "_productButton_qns27_256", vs = "_productCount_qns27_273", bs = "_bottom_qns27_290", ys = "_subtotal_qns27_298", Is = "_block_qns27_306", Ns = "_shoppingCount_qns27_313", Cs = "_total_qns27_333", Ss = "_link_qns27_339", ks = "_userInfo_qns27_346", ws = "_pagesMobileModal_qns27_358", Ps = "_pagesMobileModalContent_qns27_372", Ms = "_pagesMobileModalHeader_qns27_378", Bs = "_pagesMobileModalFooter_qns27_388", w = {
1677
+ buttons: ts,
1678
+ modal: es,
1679
+ closing: ss,
1680
+ info: ns,
1681
+ top: is,
1682
+ title: as,
1683
+ clear: os,
1684
+ activeClear: cs,
1685
+ count: rs,
1686
+ cart: ls,
1687
+ empty: ds,
1688
+ product: us,
1689
+ products: hs,
1690
+ image: ps,
1691
+ productInfo: ms,
1692
+ content: gs,
1693
+ name: fs,
1694
+ price: xs,
1695
+ productButtons: _s,
1696
+ productButton: js,
1697
+ productCount: vs,
1698
+ bottom: bs,
1699
+ subtotal: ys,
1700
+ block: Is,
1701
+ shoppingCount: Ns,
1702
+ total: Cs,
1703
+ link: Ss,
1704
+ userInfo: ks,
1705
+ pagesMobileModal: ws,
1706
+ pagesMobileModalContent: Ps,
1707
+ pagesMobileModalHeader: Ms,
1708
+ pagesMobileModalFooter: Bs
1709
+ }, An = (r) => {
1710
+ const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = r;
1711
+ return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
1712
+ i && /* @__PURE__ */ t.jsx(Ts, {}),
1713
+ s && /* @__PURE__ */ t.jsx(Tt, { signUp: a })
1759
1714
  ] });
1760
- }, $n = () => {
1761
- const [c, i] = f.useState(!1), [a, s] = f.useState([]), { cart: e, products: o } = it();
1762
- function u(n) {
1715
+ }, Ts = () => {
1716
+ const [r, i] = m.useState(!1), [a, s] = m.useState([]), { cart: e, products: c } = at();
1717
+ function d(n) {
1763
1718
  if (n.variants.length > 0) {
1764
- for (let d = 0; d < e.parts.length; d++)
1765
- for (let r = 0; r < n.variants.length; r++)
1766
- if (n.variants[r] && e.parts[d].productVariantId === n.variants[r].id)
1767
- return e.parts[d].productVariantId;
1719
+ for (let o = 0; o < e.parts.length; o++)
1720
+ for (let p = 0; p < n.variants.length; p++)
1721
+ if (n.variants[p] && e.parts[o].productVariantId === n.variants[p].id)
1722
+ return e.parts[o].productVariantId;
1768
1723
  }
1769
1724
  return n.variants[0].id;
1770
1725
  }
1771
- function p(n) {
1772
- for (let d = 0; d < e.parts.length; d++)
1773
- for (let r = 0; r < n.variants.length; r++)
1774
- if (n.variants[r] && e.parts[d].productVariantId === n.variants[r].id)
1775
- return e.parts[d].quantity;
1726
+ function u(n) {
1727
+ for (let o = 0; o < e.parts.length; o++)
1728
+ for (let p = 0; p < n.variants.length; p++)
1729
+ if (n.variants[p] && e.parts[o].productVariantId === n.variants[p].id)
1730
+ return e.parts[o].quantity;
1776
1731
  }
1777
- f.useEffect(() => {
1732
+ m.useEffect(() => {
1778
1733
  (async () => {
1779
- const d = e.parts.map((g) => String(g.productId)), B = (o.filter((g) => d.includes(String(g.id))) || []).map((g) => ({
1780
- ...g,
1781
- activeVariantId: u(g),
1782
- quantity: p(g)
1734
+ const o = e.parts.map((x) => String(x.productId)), q = (c.filter((x) => o.includes(String(x.id))) || []).map((x) => ({
1735
+ ...x,
1736
+ activeVariantId: d(x),
1737
+ quantity: u(x)
1783
1738
  }));
1784
- s(B);
1739
+ s(q);
1785
1740
  })();
1786
1741
  }, [e.parts]);
1787
- function _(n) {
1788
- var d;
1789
- return !n || !(n != null && n.variants) ? !1 : (d = n.variants.find((r) => r.id === n.activeVariantId)) == null ? void 0 : d.subscriptionSettings;
1742
+ function g(n) {
1743
+ var o;
1744
+ return !n || !(n != null && n.variants) ? !1 : (o = n.variants.find((p) => p.id === n.activeVariantId)) == null ? void 0 : o.subscriptionSettings;
1790
1745
  }
1791
- const h = e.parts.length > 0 && a.length > 0 && !_(a[0]), [k, y] = f.useState(!1);
1746
+ const f = e.parts.length > 0 && a.length > 0 && !g(a[0]), [P, j] = m.useState(!1);
1792
1747
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1793
1748
  /* @__PURE__ */ t.jsxs(
1794
- z,
1749
+ D,
1795
1750
  {
1796
1751
  type: "Secondary",
1797
1752
  style: {
@@ -1799,54 +1754,53 @@ const Hs = (c) => {
1799
1754
  position: "relative"
1800
1755
  },
1801
1756
  onClick: (n) => {
1802
- n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), y(!0));
1757
+ n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), j(!0));
1803
1758
  },
1804
1759
  children: [
1805
1760
  /* @__PURE__ */ t.jsx(
1806
- b,
1761
+ v,
1807
1762
  {
1808
- name: "Handbag",
1809
- fill: "var(--text-primary)"
1763
+ name: "Handbag"
1810
1764
  }
1811
1765
  ),
1812
- h && /* @__PURE__ */ t.jsx("div", { className: C.shoppingCount, children: e.parts.length })
1766
+ f && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
1813
1767
  ]
1814
1768
  }
1815
1769
  ),
1816
- c && /* @__PURE__ */ t.jsx(
1817
- Nt,
1770
+ r && /* @__PURE__ */ t.jsx(
1771
+ dt,
1818
1772
  {
1819
1773
  close: () => {
1820
- y(!1), setTimeout(() => {
1774
+ j(!1), setTimeout(() => {
1821
1775
  i(!1);
1822
1776
  }, 300);
1823
1777
  },
1824
1778
  withAnimation: !1,
1825
1779
  children: /* @__PURE__ */ t.jsx(
1826
- qn,
1780
+ $s,
1827
1781
  {
1828
1782
  activeProducts: a,
1829
- isCartNotEmpty: h,
1830
- isOpen: k
1783
+ isCartNotEmpty: f,
1784
+ isOpen: P
1831
1785
  }
1832
1786
  )
1833
1787
  }
1834
1788
  )
1835
1789
  ] });
1836
- }, qn = (c) => {
1837
- const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = c, { cart: e, reset: o, getTotalAndDiscount: u, updateQuantityOfProduct: p } = it(), _ = xt();
1838
- function h(n) {
1839
- _(n);
1790
+ }, $s = (r) => {
1791
+ const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = r, { cart: e, reset: c, getTotalAndDiscount: d, updateQuantityOfProduct: u } = at(), g = bt();
1792
+ function f(n) {
1793
+ g(n);
1840
1794
  }
1841
- function k(n) {
1842
- n.quantity && p({
1795
+ function P(n) {
1796
+ n.quantity && u({
1843
1797
  productId: n.id,
1844
1798
  productVariantId: n.activeVariantId,
1845
1799
  quantity: n.quantity + 1
1846
1800
  });
1847
1801
  }
1848
- function y(n) {
1849
- n.quantity && p({
1802
+ function j(n) {
1803
+ n.quantity && u({
1850
1804
  productId: n.id,
1851
1805
  productVariantId: n.activeVariantId,
1852
1806
  quantity: n.quantity - 1
@@ -1855,35 +1809,35 @@ const Hs = (c) => {
1855
1809
  return /* @__PURE__ */ t.jsxs(
1856
1810
  "div",
1857
1811
  {
1858
- className: F(C.modal, {
1859
- [C.closing]: !s
1812
+ className: F(w.modal, {
1813
+ [w.closing]: !s
1860
1814
  }),
1861
1815
  onClick: (n) => n.stopPropagation(),
1862
1816
  children: [
1863
- /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
1864
- /* @__PURE__ */ t.jsxs("div", { className: C.info, children: [
1865
- /* @__PURE__ */ t.jsx("span", { className: C.title, children: "Cart" }),
1866
- a && /* @__PURE__ */ t.jsx("div", { className: C.count, children: e.parts.length })
1817
+ /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
1818
+ /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
1819
+ /* @__PURE__ */ t.jsx("span", { className: w.title, children: "Cart" }),
1820
+ a && /* @__PURE__ */ t.jsx("div", { className: w.count, children: e.parts.length })
1867
1821
  ] }),
1868
1822
  /* @__PURE__ */ t.jsx(
1869
1823
  "button",
1870
1824
  {
1871
- className: F(C.clear, {
1872
- [C.activeClear]: a
1825
+ className: F(w.clear, {
1826
+ [w.activeClear]: a
1873
1827
  }),
1874
1828
  disabled: !a,
1875
- onClick: o,
1829
+ onClick: c,
1876
1830
  children: "Clear all"
1877
1831
  }
1878
1832
  )
1879
1833
  ] }),
1880
- a ? /* @__PURE__ */ t.jsxs("div", { className: C.cart, children: [
1881
- /* @__PURE__ */ t.jsx("div", { className: C.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
1834
+ a ? /* @__PURE__ */ t.jsxs("div", { className: w.cart, children: [
1835
+ /* @__PURE__ */ t.jsx("div", { className: w.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
1882
1836
  "div",
1883
1837
  {
1884
- className: C.product,
1838
+ className: w.product,
1885
1839
  children: [
1886
- /* @__PURE__ */ t.jsxs("div", { className: C.productInfo, children: [
1840
+ /* @__PURE__ */ t.jsxs("div", { className: w.productInfo, children: [
1887
1841
  n.images.length > 0 ? /* @__PURE__ */ t.jsx(
1888
1842
  "img",
1889
1843
  {
@@ -1891,35 +1845,35 @@ const Hs = (c) => {
1891
1845
  alt: "image",
1892
1846
  width: "100%",
1893
1847
  height: "100%",
1894
- className: C.image
1848
+ className: w.image
1895
1849
  }
1896
- ) : /* @__PURE__ */ t.jsx("div", { className: C.image, children: /* @__PURE__ */ t.jsx(
1897
- b,
1850
+ ) : /* @__PURE__ */ t.jsx("div", { className: w.image, children: /* @__PURE__ */ t.jsx(
1851
+ v,
1898
1852
  {
1899
1853
  name: "Image",
1900
1854
  fill: "var(--text-secondary)"
1901
1855
  }
1902
1856
  ) }),
1903
- /* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
1904
- /* @__PURE__ */ t.jsx("div", { className: C.name, children: yt(n.name) }),
1905
- /* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
1857
+ /* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
1858
+ /* @__PURE__ */ t.jsx("div", { className: w.name, children: it(n.name) }),
1859
+ /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
1906
1860
  "$",
1907
- n.variants.find((d) => d.id === n.activeVariantId).price.amount * ((n == null ? void 0 : n.quantity) || 1)
1861
+ n.variants.find((o) => o.id === n.activeVariantId).price.amount * ((n == null ? void 0 : n.quantity) || 1)
1908
1862
  ] })
1909
1863
  ] })
1910
1864
  ] }),
1911
- /* @__PURE__ */ t.jsxs("div", { className: C.productButtons, children: [
1865
+ /* @__PURE__ */ t.jsxs("div", { className: w.productButtons, children: [
1912
1866
  /* @__PURE__ */ t.jsx(
1913
- z,
1867
+ D,
1914
1868
  {
1915
1869
  type: "Secondary",
1916
1870
  onClick: () => {
1917
- n.quantity !== 1 && y(n);
1871
+ n.quantity !== 1 && j(n);
1918
1872
  },
1919
- className: C.productButton,
1873
+ className: w.productButton,
1920
1874
  disabled: n.quantity === 1,
1921
1875
  children: /* @__PURE__ */ t.jsx(
1922
- b,
1876
+ v,
1923
1877
  {
1924
1878
  name: "Minus",
1925
1879
  fill: "#757575",
@@ -1929,16 +1883,16 @@ const Hs = (c) => {
1929
1883
  )
1930
1884
  }
1931
1885
  ),
1932
- /* @__PURE__ */ t.jsx("div", { className: C.productCount, children: n.quantity }),
1886
+ /* @__PURE__ */ t.jsx("div", { className: w.productCount, children: n.quantity }),
1933
1887
  /* @__PURE__ */ t.jsx(
1934
- z,
1888
+ D,
1935
1889
  {
1936
1890
  type: "Secondary",
1937
- onClick: () => k(n),
1938
- className: C.productButton,
1939
- disabled: n.quantity === n.variants.find((d) => d.id === n.activeVariantId).quantity.available,
1891
+ onClick: () => P(n),
1892
+ className: w.productButton,
1893
+ disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
1940
1894
  children: /* @__PURE__ */ t.jsx(
1941
- b,
1895
+ v,
1942
1896
  {
1943
1897
  name: "Plus",
1944
1898
  fill: "#757575",
@@ -1953,12 +1907,12 @@ const Hs = (c) => {
1953
1907
  },
1954
1908
  n.id
1955
1909
  )) }),
1956
- /* @__PURE__ */ t.jsxs("div", { className: C.bottom, children: [
1957
- /* @__PURE__ */ t.jsxs("div", { className: C.subtotal, children: [
1958
- /* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
1910
+ /* @__PURE__ */ t.jsxs("div", { className: w.bottom, children: [
1911
+ /* @__PURE__ */ t.jsxs("div", { className: w.subtotal, children: [
1912
+ /* @__PURE__ */ t.jsxs("div", { className: w.block, children: [
1959
1913
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1960
1914
  /* @__PURE__ */ t.jsx(
1961
- b,
1915
+ v,
1962
1916
  {
1963
1917
  name: "Info",
1964
1918
  width: 20,
@@ -1967,20 +1921,20 @@ const Hs = (c) => {
1967
1921
  }
1968
1922
  )
1969
1923
  ] }),
1970
- /* @__PURE__ */ t.jsxs("div", { className: C.total, children: [
1924
+ /* @__PURE__ */ t.jsxs("div", { className: w.total, children: [
1971
1925
  "$",
1972
- u().total
1926
+ d().total
1973
1927
  ] })
1974
1928
  ] }),
1975
- /* @__PURE__ */ t.jsx(z, { onClick: () => h("/checkout"), children: "Checkout" })
1929
+ /* @__PURE__ */ t.jsx(D, { onClick: () => f("/checkout"), children: "Checkout" })
1976
1930
  ] })
1977
- ] }) : /* @__PURE__ */ t.jsx(wn, {})
1931
+ ] }) : /* @__PURE__ */ t.jsx(qs, {})
1978
1932
  ]
1979
1933
  }
1980
1934
  );
1981
- }, wn = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
1935
+ }, qs = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
1982
1936
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1983
- b,
1937
+ v,
1984
1938
  {
1985
1939
  name: "Handbag",
1986
1940
  fill: "var(--text-secondary)"
@@ -1994,23 +1948,23 @@ const Hs = (c) => {
1994
1948
  "a",
1995
1949
  {
1996
1950
  href: "/products",
1997
- className: C.link,
1951
+ className: w.link,
1998
1952
  children: "view products"
1999
1953
  }
2000
1954
  )
2001
1955
  ] })
2002
- ] }), Pt = ({ signUp: c, close: i }) => {
2003
- const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: s } = a, e = xt();
2004
- function o(_) {
2005
- window.location.pathname.includes("/admin/builder") || e(_);
1956
+ ] }), Tt = ({ signUp: r, close: i }) => {
1957
+ const a = localStorage.getItem("token"), s = bt();
1958
+ function e(u) {
1959
+ window.location.pathname.includes("/admin/builder") || s(u);
2006
1960
  }
2007
- if (!s)
1961
+ if (!a)
2008
1962
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2009
1963
  /* @__PURE__ */ t.jsx(
2010
- z,
1964
+ D,
2011
1965
  {
2012
1966
  onClick: () => {
2013
- o("/customer-dash"), i == null || i();
1967
+ e("/customer-dash"), i == null || i();
2014
1968
  },
2015
1969
  type: "Secondary",
2016
1970
  style: {
@@ -2019,11 +1973,11 @@ const Hs = (c) => {
2019
1973
  children: "Login"
2020
1974
  }
2021
1975
  ),
2022
- c && /* @__PURE__ */ t.jsx(
2023
- z,
1976
+ r && /* @__PURE__ */ t.jsx(
1977
+ D,
2024
1978
  {
2025
1979
  onClick: () => {
2026
- o("/customer-dash"), i == null || i();
1980
+ e("/customer-dash"), i == null || i();
2027
1981
  },
2028
1982
  type: "Primary",
2029
1983
  style: {
@@ -2034,29 +1988,29 @@ const Hs = (c) => {
2034
1988
  }
2035
1989
  )
2036
1990
  ] });
2037
- const [u, p] = f.useState("test-email@gmail.com");
2038
- return f.useEffect(() => {
1991
+ const [c, d] = m.useState("test-email@gmail.com");
1992
+ return m.useEffect(() => {
2039
1993
  (async () => {
2040
- const h = Et(s);
2041
- p(h.email);
1994
+ const g = Dt(a);
1995
+ d(g.email);
2042
1996
  })();
2043
- }, [s]), /* @__PURE__ */ t.jsx(
1997
+ }, [a]), /* @__PURE__ */ t.jsx(
2044
1998
  "div",
2045
1999
  {
2046
- className: C.userInfo,
2000
+ className: w.userInfo,
2047
2001
  onClick: () => {
2048
- o("/customer-dash"), i == null || i();
2002
+ e("/customer-dash"), i == null || i();
2049
2003
  },
2050
- children: /* @__PURE__ */ t.jsx("div", { children: u || "test-email@gmail.com" })
2004
+ children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
2051
2005
  }
2052
2006
  );
2053
- }, Pn = ({
2054
- children: c,
2007
+ }, Os = ({
2008
+ children: r,
2055
2009
  logo: i,
2056
2010
  setIsOpen: a,
2057
2011
  signUp: s
2058
2012
  }) => {
2059
- const { setIsOpen: e } = $t(), o = () => {
2013
+ const { setIsOpen: e } = ot(), c = () => {
2060
2014
  e(!1), setTimeout(() => {
2061
2015
  a(!1), e(!0);
2062
2016
  }, 300);
@@ -2064,66 +2018,60 @@ const Hs = (c) => {
2064
2018
  return /* @__PURE__ */ t.jsxs(
2065
2019
  "div",
2066
2020
  {
2067
- className: C.pagesMobileModal,
2068
- onClick: (u) => u.stopPropagation(),
2021
+ className: w.pagesMobileModal,
2022
+ onClick: (d) => d.stopPropagation(),
2069
2023
  children: [
2070
- /* @__PURE__ */ t.jsxs("div", { className: C.pagesMobileModalHeader, children: [
2024
+ /* @__PURE__ */ t.jsxs("div", { className: w.pagesMobileModalHeader, children: [
2071
2025
  /* @__PURE__ */ t.jsx("div", { children: i }),
2072
2026
  /* @__PURE__ */ t.jsx(
2073
- z,
2027
+ D,
2074
2028
  {
2075
2029
  type: "Secondary",
2076
- onClick: o,
2077
- children: /* @__PURE__ */ t.jsx(
2078
- b,
2079
- {
2080
- name: "X",
2081
- fill: "var(--text-primary)"
2082
- }
2083
- )
2030
+ onClick: c,
2031
+ children: /* @__PURE__ */ t.jsx(v, { name: "X" })
2084
2032
  }
2085
2033
  )
2086
2034
  ] }),
2087
- /* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalContent, children: c }),
2088
- /* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2089
- Pt,
2035
+ /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: r }),
2036
+ /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2037
+ Tt,
2090
2038
  {
2091
2039
  signUp: s,
2092
- close: o
2040
+ close: c
2093
2041
  }
2094
2042
  ) })
2095
2043
  ]
2096
2044
  }
2097
2045
  );
2098
- }, Yi = ({
2099
- children: c,
2046
+ }, En = ({
2047
+ children: r,
2100
2048
  logo: i,
2101
2049
  signUp: a
2102
2050
  }) => {
2103
- const [s, e] = f.useState(!1);
2051
+ const [s, e] = m.useState(!1);
2104
2052
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2105
- /* @__PURE__ */ t.jsx(Bn, { setIsOpenModal: e }),
2053
+ /* @__PURE__ */ t.jsx(As, { setIsOpenModal: e }),
2106
2054
  s && /* @__PURE__ */ t.jsx(
2107
- Nt,
2055
+ dt,
2108
2056
  {
2109
2057
  close: () => e(!1),
2110
2058
  hasPadding: !1,
2111
2059
  children: /* @__PURE__ */ t.jsx(
2112
- Pn,
2060
+ Os,
2113
2061
  {
2114
2062
  logo: i,
2115
2063
  setIsOpen: e,
2116
2064
  signUp: a,
2117
- children: c
2065
+ children: r
2118
2066
  }
2119
2067
  )
2120
2068
  }
2121
2069
  )
2122
2070
  ] });
2123
- }, Bn = (c) => {
2124
- const { setIsOpenModal: i } = c;
2071
+ }, As = (r) => {
2072
+ const { setIsOpenModal: i } = r;
2125
2073
  return /* @__PURE__ */ t.jsx(
2126
- z,
2074
+ D,
2127
2075
  {
2128
2076
  type: "Secondary",
2129
2077
  style: {
@@ -2132,43 +2080,34 @@ const Hs = (c) => {
2132
2080
  onClick: (a) => {
2133
2081
  a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
2134
2082
  },
2135
- children: /* @__PURE__ */ t.jsx(
2136
- b,
2137
- {
2138
- name: "List",
2139
- fill: "var(--text-primary)"
2140
- }
2141
- )
2083
+ children: /* @__PURE__ */ t.jsx(v, { name: "List" })
2142
2084
  }
2143
2085
  );
2144
- }, Tn = "_share_10urc_1", Mn = "_modal_10urc_9", An = "_header_10urc_21", On = "_socials_10urc_31", En = "_social_10urc_31", Rn = "_copy_10urc_41", Dn = "_title_10urc_48", zn = "_copyWrapper_10urc_54", Ln = "_copyText_10urc_63", Fn = "_copyTextMobile_10urc_76", Un = "_copyTextMiniMobile_10urc_95", tt = {
2145
- share: Tn,
2146
- modal: Mn,
2147
- header: An,
2148
- socials: On,
2149
- social: En,
2150
- copy: Rn,
2151
- title: Dn,
2152
- copyWrapper: zn,
2153
- copyText: Ln,
2154
- copyTextMobile: Fn,
2155
- copyTextMiniMobile: Un
2156
- }, Wi = ({ title: c = "Copy Product Link" }) => {
2157
- const { isOpenModal: i, setIsOpenModal: a } = qt();
2086
+ }, Es = "_share_rlgln_1", Ds = "_modal_rlgln_8", Rs = "_header_rlgln_20", Ls = "_title_rlgln_46", zs = "_copyWrapper_rlgln_52", Hs = "_copyText_rlgln_61", Us = "_copyTextMobile_rlgln_74", Fs = "_copyTextMiniMobile_rlgln_93", st = {
2087
+ share: Es,
2088
+ modal: Ds,
2089
+ header: Rs,
2090
+ title: Ls,
2091
+ copyWrapper: zs,
2092
+ copyText: Hs,
2093
+ copyTextMobile: Us,
2094
+ copyTextMiniMobile: Fs
2095
+ }, Dn = ({ title: r = "Copy Product Link" }) => {
2096
+ const { isOpenModal: i, setIsOpenModal: a } = Mt();
2158
2097
  function s() {
2159
2098
  a(!0);
2160
2099
  }
2161
2100
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2162
2101
  /* @__PURE__ */ t.jsx(
2163
- z,
2102
+ D,
2164
2103
  {
2165
- className: tt.share,
2104
+ className: st.share,
2166
2105
  onClick: (e) => {
2167
2106
  e.stopPropagation(), s();
2168
2107
  },
2169
2108
  type: "Secondary",
2170
2109
  children: /* @__PURE__ */ t.jsx(
2171
- b,
2110
+ v,
2172
2111
  {
2173
2112
  name: "Share",
2174
2113
  fill: "#757575",
@@ -2177,105 +2116,111 @@ const Hs = (c) => {
2177
2116
  )
2178
2117
  }
2179
2118
  ),
2180
- i && /* @__PURE__ */ t.jsx(Nt, { close: a, children: /* @__PURE__ */ t.jsx(Vn, { title: c }) })
2119
+ i && /* @__PURE__ */ t.jsx(dt, { close: a, children: /* @__PURE__ */ t.jsx(Vs, { title: r }) })
2181
2120
  ] });
2182
- }, Vn = ({ title: c = "Copy Product Link" }) => {
2183
- const { setIsOpenModal: i } = qt(), { notification: a, setNotification: s } = wt(), { setIsOpen: e } = $t(), o = window.location.href;
2184
- function u() {
2185
- navigator.clipboard.writeText(o), s({
2186
- message: "Link copied to clipboard",
2187
- status: "success"
2188
- });
2121
+ }, Vs = ({ title: r = "Copy Product Link" }) => {
2122
+ const { setIsOpenModal: i } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = ot(), c = window.location.href;
2123
+ function d() {
2124
+ navigator.clipboard.writeText(c), s([
2125
+ ...a,
2126
+ {
2127
+ id: Z(),
2128
+ message: "Link copied to clipboard",
2129
+ status: "success"
2130
+ }
2131
+ ]);
2189
2132
  }
2190
- function p() {
2133
+ function u() {
2191
2134
  e(!1), setTimeout(() => {
2192
2135
  i(!1), e(!0);
2193
2136
  }, 300);
2194
2137
  }
2195
- function _(h, k) {
2196
- return h.length > k ? h.slice(0, k) + "..." : h;
2138
+ function g(f, P) {
2139
+ return f.length > P ? f.slice(0, P) + "..." : f;
2197
2140
  }
2198
2141
  return /* @__PURE__ */ t.jsxs(
2199
2142
  "div",
2200
2143
  {
2201
- className: tt.modal,
2202
- onClick: (h) => h.stopPropagation(),
2144
+ className: st.modal,
2145
+ onClick: (f) => f.stopPropagation(),
2203
2146
  children: [
2204
- /* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
2205
- /* @__PURE__ */ t.jsx("div", { className: tt.title, children: c }),
2147
+ /* @__PURE__ */ t.jsxs("div", { className: st.header, children: [
2148
+ /* @__PURE__ */ t.jsx("div", { className: st.title, children: r }),
2206
2149
  /* @__PURE__ */ t.jsx(
2207
- b,
2150
+ v,
2208
2151
  {
2209
2152
  name: "X",
2210
2153
  fill: "#757575",
2211
- onClick: p,
2154
+ onClick: u,
2212
2155
  hoverable: !0
2213
2156
  }
2214
2157
  )
2215
2158
  ] }),
2216
- /* @__PURE__ */ t.jsxs("div", { className: tt.copyWrapper, children: [
2159
+ /* @__PURE__ */ t.jsxs("div", { className: st.copyWrapper, children: [
2217
2160
  /* @__PURE__ */ t.jsxs(
2218
- z,
2161
+ D,
2219
2162
  {
2220
2163
  type: "Secondary",
2221
- onClick: u,
2164
+ onClick: d,
2222
2165
  style: {
2223
2166
  flex: 1
2224
2167
  },
2225
2168
  children: [
2226
- /* @__PURE__ */ t.jsx("div", { className: tt.copyText, children: _(o, 100) }),
2227
- /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMobile, children: _(o, 40) }),
2228
- /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMiniMobile, children: _(o, 20) })
2169
+ /* @__PURE__ */ t.jsx("div", { className: st.copyText, children: g(c, 100) }),
2170
+ /* @__PURE__ */ t.jsx("div", { className: st.copyTextMobile, children: g(c, 40) }),
2171
+ /* @__PURE__ */ t.jsx("div", { className: st.copyTextMiniMobile, children: g(c, 20) })
2229
2172
  ]
2230
2173
  }
2231
2174
  ),
2232
2175
  /* @__PURE__ */ t.jsx(
2233
- z,
2176
+ D,
2234
2177
  {
2235
2178
  type: "Secondary",
2236
- onClick: u,
2237
- children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2179
+ onClick: d,
2180
+ children: a.find(
2181
+ (f) => f.message === "Link copied to clipboard"
2182
+ ) ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
2238
2183
  }
2239
2184
  )
2240
2185
  ] })
2241
2186
  ]
2242
2187
  }
2243
2188
  );
2244
- }, Hn = "_accordion_1s1lq_1", Yn = "_header_1s1lq_9", Wn = "_icon_1s1lq_18", Gn = "_open_1s1lq_21", Xn = "_content_1s1lq_25", at = {
2245
- accordion: Hn,
2246
- header: Yn,
2247
- icon: Wn,
2248
- open: Gn,
2249
- content: Xn
2250
- }, Gi = ({ title: c, content: i, defaultOpen: a = !1 }) => {
2251
- const [s, e] = f.useState(a), [o, u] = f.useState(0), p = f.useRef(null), _ = () => {
2189
+ }, Ys = "_accordion_1s1lq_1", Gs = "_header_1s1lq_9", Ws = "_icon_1s1lq_18", Xs = "_open_1s1lq_21", Qs = "_content_1s1lq_25", ct = {
2190
+ accordion: Ys,
2191
+ header: Gs,
2192
+ icon: Ws,
2193
+ open: Xs,
2194
+ content: Qs
2195
+ }, Rn = ({ title: r, content: i, defaultOpen: a = !1 }) => {
2196
+ const [s, e] = m.useState(a), [c, d] = m.useState(0), u = m.useRef(null), g = () => {
2252
2197
  e(!s);
2253
2198
  };
2254
- return f.useEffect(() => {
2255
- p.current && u(s ? p.current.scrollHeight : 0);
2256
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: at.accordion, children: [
2199
+ return m.useEffect(() => {
2200
+ u.current && d(s ? u.current.scrollHeight : 0);
2201
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: ct.accordion, children: [
2257
2202
  /* @__PURE__ */ t.jsxs(
2258
2203
  "div",
2259
2204
  {
2260
- className: at.header,
2261
- onClick: _,
2205
+ className: ct.header,
2206
+ onClick: g,
2262
2207
  children: [
2263
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: c }),
2264
- /* @__PURE__ */ t.jsx("div", { className: F(at.icon, { [at.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2208
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
2209
+ /* @__PURE__ */ t.jsx("div", { className: F(ct.icon, { [ct.open]: s }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
2265
2210
  ]
2266
2211
  }
2267
2212
  ),
2268
2213
  /* @__PURE__ */ t.jsx(
2269
2214
  "div",
2270
2215
  {
2271
- ref: p,
2272
- className: at.content,
2273
- style: { height: `${o}px` },
2216
+ ref: u,
2217
+ className: ct.content,
2218
+ style: { height: `${c}px` },
2274
2219
  children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
2275
2220
  }
2276
2221
  )
2277
2222
  ] });
2278
- }, Xi = ({ children: c, path: i, className: a, target: s = "_self", id: e }) => {
2223
+ }, Js = ({ children: r, path: i, className: a, target: s = "_self", id: e }) => {
2279
2224
  if (window.location.pathname.includes("/admin/builder"))
2280
2225
  return /* @__PURE__ */ t.jsx(
2281
2226
  "div",
@@ -2284,45 +2229,44 @@ const Hs = (c) => {
2284
2229
  role: "link",
2285
2230
  style: { cursor: "pointer" },
2286
2231
  id: e,
2287
- children: c
2232
+ children: r
2288
2233
  }
2289
2234
  );
2290
- const o = xt(), u = /^https?:\/\//.test(i), p = (_) => {
2291
- u || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (_.preventDefault(), o(i));
2235
+ const c = bt(), d = /^https?:\/\//.test(i), u = (g) => {
2236
+ d || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (g.preventDefault(), c(i));
2292
2237
  };
2293
2238
  return /* @__PURE__ */ t.jsx(
2294
2239
  "div",
2295
2240
  {
2296
- onClick: p,
2241
+ onClick: u,
2297
2242
  className: a,
2298
2243
  role: "link",
2299
2244
  style: { cursor: "pointer" },
2300
2245
  id: e,
2301
- children: c
2246
+ children: r
2302
2247
  }
2303
2248
  );
2304
- }, Qn = "_buttonsBlock_1b2rb_1", Jn = "_slideUp_1b2rb_1", Kn = {
2305
- buttonsBlock: Qn,
2306
- slideUp: Jn
2307
- }, Qi = (c) => {
2308
- var h, k;
2309
- const { setIsOpen: i, setModalType: a, productId: s } = c, { cart: e } = it(), { pageContext: o } = ft(), u = (h = o == null ? void 0 : o.listings) == null ? void 0 : h.find((y) => y.id === s);
2310
- if (!u)
2249
+ }, Ks = "_buttonsBlock_1b2rb_1", Zs = {
2250
+ buttonsBlock: Ks
2251
+ }, Ln = (r) => {
2252
+ var f, P;
2253
+ const { setIsOpen: i, setModalType: a, productId: s } = r, { cart: e } = at(), { pageContext: c } = vt(), d = (f = c == null ? void 0 : c.listings) == null ? void 0 : f.find((j) => j.id === s);
2254
+ if (!d)
2311
2255
  return null;
2312
- const p = (k = o == null ? void 0 : o.products) == null ? void 0 : k.find(
2313
- (y) => y.uniquePath === u.productData.uniquePath
2256
+ const u = (P = c == null ? void 0 : c.products) == null ? void 0 : P.find(
2257
+ (j) => j.uniquePath === d.productData.uniquePath
2314
2258
  );
2315
- if (!p)
2259
+ if (!u)
2316
2260
  return null;
2317
- const _ = e.parts.find((y) => y.productId === p.id);
2261
+ const g = e.parts.find((j) => j.productId === u.id);
2318
2262
  return /* @__PURE__ */ t.jsxs(
2319
2263
  "div",
2320
2264
  {
2321
- className: Kn.buttonsBlock,
2322
- onClick: (y) => y.stopPropagation(),
2265
+ className: Zs.buttonsBlock,
2266
+ onClick: (j) => j.stopPropagation(),
2323
2267
  children: [
2324
2268
  /* @__PURE__ */ t.jsx(
2325
- z,
2269
+ D,
2326
2270
  {
2327
2271
  type: "Secondary",
2328
2272
  style: {
@@ -2331,11 +2275,11 @@ const Hs = (c) => {
2331
2275
  onClick: () => {
2332
2276
  a("Add To Cart"), i(!0);
2333
2277
  },
2334
- children: _ ? "Add More" : "Add To Cart"
2278
+ children: g ? "Add More" : "Add To Cart"
2335
2279
  }
2336
2280
  ),
2337
2281
  /* @__PURE__ */ t.jsx(
2338
- z,
2282
+ D,
2339
2283
  {
2340
2284
  type: "Primary",
2341
2285
  onClick: () => {
@@ -2347,15 +2291,15 @@ const Hs = (c) => {
2347
2291
  ]
2348
2292
  }
2349
2293
  );
2350
- }, Zn = "_wrapper_27wzz_1", ti = "_logo_27wzz_8", ei = "_info_27wzz_12", vt = {
2351
- wrapper: Zn,
2352
- logo: ti,
2353
- info: ei
2354
- }, Ji = ({ date: c }) => {
2294
+ }, tn = "_wrapper_27wzz_1", en = "_logo_27wzz_8", sn = "_info_27wzz_12", It = {
2295
+ wrapper: tn,
2296
+ logo: en,
2297
+ info: sn
2298
+ }, zn = ({ date: r }) => {
2355
2299
  const { general: i } = Rt();
2356
2300
  if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2357
2301
  function a(s) {
2358
- const e = new Date(s), o = {
2302
+ const e = new Date(s), c = {
2359
2303
  month: "short",
2360
2304
  day: "2-digit",
2361
2305
  year: "numeric",
@@ -2363,10 +2307,10 @@ const Hs = (c) => {
2363
2307
  minute: "2-digit",
2364
2308
  hour12: !1
2365
2309
  };
2366
- return e.toLocaleDateString("en-US", o);
2310
+ return e.toLocaleDateString("en-US", c);
2367
2311
  }
2368
- return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
2369
- /* @__PURE__ */ t.jsx("div", { className: vt.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2312
+ return /* @__PURE__ */ t.jsxs("div", { className: It.wrapper, children: [
2313
+ /* @__PURE__ */ t.jsx("div", { className: It.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2370
2314
  "img",
2371
2315
  {
2372
2316
  src: `https://imagedelivery.net/${i.info.logo.cfId}/w=500,h=500`,
@@ -2374,195 +2318,178 @@ const Hs = (c) => {
2374
2318
  style: { objectFit: "contain", width: "48px", height: "48px" }
2375
2319
  }
2376
2320
  ) : /* @__PURE__ */ t.jsx(
2377
- b,
2321
+ v,
2378
2322
  {
2379
2323
  name: "Image",
2380
2324
  width: 48,
2381
2325
  height: 48
2382
2326
  }
2383
2327
  ) }),
2384
- /* @__PURE__ */ t.jsxs("div", { className: vt.info, children: [
2328
+ /* @__PURE__ */ t.jsxs("div", { className: It.info, children: [
2385
2329
  /* @__PURE__ */ t.jsx("h3", { id: "h4", children: i.info.name }),
2386
- /* @__PURE__ */ t.jsx("p", { id: "p", children: a(c) })
2330
+ /* @__PURE__ */ t.jsx("p", { id: "p", children: a(r) })
2387
2331
  ] })
2388
2332
  ] });
2389
- }, si = "_options_puxd1_1", ni = "_price_puxd1_12", ii = "_oldPrice_puxd1_19", ai = "_newPrice_puxd1_27", oi = "_animate_puxd1_34", ci = "_appearAndBounce_puxd1_1", ri = "_meta_puxd1_52", li = "_info_puxd1_58", di = "_infoRight_puxd1_66", ui = "_buttons_puxd1_73", pi = "_variants_puxd1_80", hi = "_variant_puxd1_80", mi = "_stock_puxd1_98", _i = "_variantInfo_puxd1_105", gi = "_quantity_puxd1_111", fi = "_count_puxd1_118", xi = "_focused_puxd1_135", ji = "_button_puxd1_73", vi = "_activeVariant_puxd1_161", bi = "_chargeTypes_puxd1_165", yi = "_charge_puxd1_165", Ni = "_chargeActive_puxd1_190", Ii = "_title_puxd1_198", ki = "_modal_puxd1_204", Ci = "_header_puxd1_224", Si = "_productOptions_puxd1_232", $i = "_loading_puxd1_236", Y = {
2390
- options: si,
2391
- price: ni,
2392
- oldPrice: ii,
2393
- newPrice: ai,
2394
- animate: oi,
2395
- appearAndBounce: ci,
2396
- meta: ri,
2397
- info: li,
2398
- infoRight: di,
2399
- buttons: ui,
2400
- variants: pi,
2401
- variant: hi,
2402
- stock: mi,
2403
- variantInfo: _i,
2404
- quantity: gi,
2405
- count: fi,
2406
- focused: xi,
2407
- button: ji,
2408
- activeVariant: vi,
2409
- chargeTypes: bi,
2410
- charge: yi,
2411
- chargeActive: Ni,
2412
- title: Ii,
2413
- modal: ki,
2414
- header: Ci,
2415
- productOptions: Si,
2416
- loading: $i
2417
- }, Ki = (c) => {
2418
- var y;
2419
- const { pageContext: i } = ft(), a = (y = i == null ? void 0 : i.listings) == null ? void 0 : y.find((n) => n.id === c.productId), [s, e] = f.useState(!0), [o, u] = f.useState(null), p = (o == null ? void 0 : o.variants[0]) || null, [_, h] = f.useState(
2420
- p != null && p.chargeTypes && p.chargeTypes.length > 1 ? p.chargeTypes[0] : "ONE_TIME"
2421
- ), { addProducts: k } = it();
2422
- if (f.useEffect(() => {
2333
+ }, nn = "_variants_puxd1_80", an = "_variant_puxd1_80", on = "_stock_puxd1_98", cn = "_variantInfo_puxd1_105", rn = "_chargeTypes_puxd1_165", ln = "_charge_puxd1_165", dn = "_chargeActive_puxd1_190", un = "_title_puxd1_198", hn = "_modal_puxd1_204", pn = "_header_puxd1_224", mn = "_productOptions_puxd1_232", gn = "_loading_puxd1_236", J = {
2334
+ variants: nn,
2335
+ variant: an,
2336
+ stock: on,
2337
+ variantInfo: cn,
2338
+ chargeTypes: rn,
2339
+ charge: ln,
2340
+ chargeActive: dn,
2341
+ title: un,
2342
+ modal: hn,
2343
+ header: pn,
2344
+ productOptions: mn,
2345
+ loading: gn
2346
+ }, Hn = (r) => {
2347
+ var n;
2348
+ const { pageContext: i } = vt(), a = (n = i == null ? void 0 : i.listings) == null ? void 0 : n.find((o) => o.id === r.productId), [s, e] = m.useState(!0), [c, d] = m.useState(null), u = (c == null ? void 0 : c.variants[0]) || null, [g, f] = m.useState(
2349
+ u != null && u.chargeTypes && u.chargeTypes.length > 1 ? u.chargeTypes[0] : "ONE_TIME"
2350
+ ), { addProducts: P } = at(), { setIsOpen: j } = ot();
2351
+ return m.useEffect(() => {
2423
2352
  (async () => {
2424
2353
  e(!0);
2425
- const d = await zt(
2354
+ const p = await Lt(
2426
2355
  encodeURIComponent(
2427
2356
  `/product/${a.productData.uniquePath}`
2428
2357
  )
2429
2358
  );
2430
- k(d == null ? void 0 : d.data.products), u(d == null ? void 0 : d.data.products[0]), e(!1);
2359
+ P(p == null ? void 0 : p.data.products), d(p == null ? void 0 : p.data.products[0]), e(!1);
2431
2360
  })();
2432
- }, []), s)
2433
- return /* @__PURE__ */ t.jsx(
2434
- "div",
2435
- {
2436
- className: Y.modal,
2437
- onClick: (n) => n.stopPropagation(),
2438
- children: /* @__PURE__ */ t.jsx("div", { className: Y.loading, children: /* @__PURE__ */ t.jsx(Dt, {}) })
2439
- }
2440
- );
2441
- if (!o) {
2442
- c.setIsOpen(!1);
2443
- return;
2444
- }
2445
- if (!p) {
2446
- c.setIsOpen(!1);
2447
- return;
2448
- }
2449
- return /* @__PURE__ */ t.jsxs(
2361
+ }, []), m.useEffect(() => {
2362
+ j(!0);
2363
+ }, []), /* @__PURE__ */ t.jsx(dt, { close: r.setIsOpen, children: /* @__PURE__ */ t.jsxs(
2450
2364
  "div",
2451
2365
  {
2452
- className: Y.modal,
2453
- onClick: (n) => n.stopPropagation(),
2366
+ className: J.modal,
2367
+ onClick: (o) => o.stopPropagation(),
2454
2368
  children: [
2455
- c.type === "Add To Cart" && !s && /* @__PURE__ */ t.jsx(
2456
- qi,
2369
+ s && /* @__PURE__ */ t.jsx("div", { className: J.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
2370
+ r.type === "Add To Cart" && c && u && !s && /* @__PURE__ */ t.jsx(
2371
+ fn,
2457
2372
  {
2458
- variants: o.variants,
2459
- activeVariant: p,
2460
- activeChargeType: _,
2461
- setActiveChargeType: h,
2462
- productId: o.id,
2463
- setIsOpen: c.setIsOpen
2373
+ variants: c.variants,
2374
+ activeVariant: u,
2375
+ activeChargeType: g,
2376
+ setActiveChargeType: f,
2377
+ productId: c.id,
2378
+ setIsOpen: r.setIsOpen
2464
2379
  }
2465
2380
  ),
2466
- c.type === "Buy Now" && !s && /* @__PURE__ */ t.jsx(
2467
- wi,
2381
+ r.type === "Buy Now" && c && !s && /* @__PURE__ */ t.jsx(
2382
+ xn,
2468
2383
  {
2469
- product: o,
2470
- setIsOpen: c.setIsOpen
2384
+ product: c,
2385
+ setIsOpen: r.setIsOpen
2471
2386
  }
2472
2387
  )
2473
2388
  ]
2474
2389
  }
2475
- );
2476
- }, qi = (c) => {
2477
- const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: o, setIsOpen: u } = c, { cart: p, addProductToCart: _, addProducts: h, updateQuantityOfProduct: k } = it(), { setNotification: y } = wt(), { pageContext: n } = ft();
2478
- async function d(r) {
2479
- const B = p.parts.find(
2480
- (g) => g.productId === c.productId && g.productVariantId === r
2390
+ ) });
2391
+ }, fn = (r) => {
2392
+ const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: d } = r, { cart: u, addProductToCart: g, addProducts: f, updateQuantityOfProduct: P } = at(), { notifications: j, setNotifications: n } = Ct(), { pageContext: o } = vt(), { setIsOpen: p } = ot(), q = () => {
2393
+ p(!1), setTimeout(() => {
2394
+ d(!1);
2395
+ }, 300);
2396
+ };
2397
+ async function x(_) {
2398
+ const y = u.parts.find(
2399
+ (M) => M.productId === r.productId && M.productVariantId === _
2481
2400
  );
2482
- B ? k({
2483
- productId: o,
2484
- productVariantId: r,
2485
- quantity: B.quantity + 1
2486
- }) : (n != null && n.products && await h(n.products), await _({
2487
- productId: o,
2488
- productVariantId: r,
2401
+ y ? P({
2402
+ productId: c,
2403
+ productVariantId: _,
2404
+ quantity: y.quantity + 1
2405
+ }) : (o != null && o.products && await f(o.products), await g({
2406
+ productId: c,
2407
+ productVariantId: _,
2489
2408
  quantity: 1
2490
- })), y({
2491
- message: "Product added to cart",
2492
- status: "success"
2493
- });
2409
+ })), n([
2410
+ ...j,
2411
+ {
2412
+ id: Z(),
2413
+ message: "Product added to cart",
2414
+ status: "success"
2415
+ }
2416
+ ]);
2494
2417
  }
2495
2418
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2496
- /* @__PURE__ */ t.jsxs("div", { className: Y.header, children: [
2419
+ /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2497
2420
  /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
2498
2421
  /* @__PURE__ */ t.jsx(
2499
- b,
2422
+ v,
2500
2423
  {
2501
2424
  name: "X",
2502
2425
  width: 24,
2503
2426
  height: 24,
2504
2427
  fill: "var(--text-secondary)",
2505
2428
  hoverable: !0,
2506
- onClick: () => u(!1)
2429
+ onClick: q
2507
2430
  }
2508
2431
  )
2509
2432
  ] }),
2510
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: Y.chargeTypes, children: e.chargeTypes.map((r) => /* @__PURE__ */ t.jsx(
2433
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: J.chargeTypes, children: e.chargeTypes.map((_) => /* @__PURE__ */ t.jsx(
2511
2434
  "div",
2512
2435
  {
2513
- className: F(Y.charge, {
2514
- [Y.chargeActive]: a === r
2436
+ className: F(J.charge, {
2437
+ [J.chargeActive]: a === _
2515
2438
  }),
2516
- onClick: () => s(r),
2517
- children: It[r]
2439
+ onClick: () => s(_),
2440
+ children: St[_]
2518
2441
  },
2519
- r
2442
+ _
2520
2443
  )) }),
2521
- /* @__PURE__ */ t.jsx("div", { className: Y.variants, children: i.map((r) => {
2522
- var B, g;
2444
+ /* @__PURE__ */ t.jsx("div", { className: J.variants, children: i.map((_) => {
2445
+ var y, M;
2523
2446
  return /* @__PURE__ */ t.jsxs(
2524
2447
  "div",
2525
2448
  {
2526
- className: F(Y.variant),
2449
+ className: F(J.variant),
2527
2450
  onClick: () => {
2528
- d(r.id), u(!1);
2451
+ x(_.id), d(!1);
2529
2452
  },
2530
2453
  children: [
2531
- /* @__PURE__ */ t.jsxs("div", { className: Y.variantInfo, children: [
2532
- /* @__PURE__ */ t.jsx("span", { className: Y.title, children: r.name }),
2454
+ /* @__PURE__ */ t.jsxs("div", { className: J.variantInfo, children: [
2455
+ /* @__PURE__ */ t.jsx("span", { className: J.title, children: _.name }),
2533
2456
  /* @__PURE__ */ t.jsxs("span", { children: [
2534
2457
  "$",
2535
- a === "ONE_TIME" ? r.price.amount : r.subscriptionSettings ? r.subscriptionSettings.price.amount : "Price Not Found"
2458
+ a === "ONE_TIME" ? _.price.amount : _.subscriptionSettings ? _.subscriptionSettings.price.amount : "Price Not Found"
2536
2459
  ] })
2537
2460
  ] }),
2538
- /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: Y.stock, children: [
2539
- (B = r.quantity.restrictions) != null && B.max || r.quantity.available !== void 0 ? ((g = r.quantity.restrictions) == null ? void 0 : g.max) || r.quantity.available : "∞",
2461
+ /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: J.stock, children: [
2462
+ (y = _.quantity.restrictions) != null && y.max || _.quantity.available !== void 0 ? ((M = _.quantity.restrictions) == null ? void 0 : M.max) || _.quantity.available : "∞",
2540
2463
  " ",
2541
2464
  "in stock"
2542
2465
  ] }) })
2543
2466
  ]
2544
2467
  },
2545
- r.id
2468
+ _.id
2546
2469
  );
2547
2470
  }) })
2548
2471
  ] });
2549
- }, wi = (c) => {
2550
- const { product: i, setIsOpen: a } = c;
2472
+ }, xn = (r) => {
2473
+ const { product: i, setIsOpen: a } = r, { setIsOpen: s } = ot(), e = () => {
2474
+ s(!1), setTimeout(() => {
2475
+ a(!1);
2476
+ }, 300);
2477
+ };
2551
2478
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2552
- /* @__PURE__ */ t.jsxs("div", { className: Y.header, children: [
2479
+ /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2553
2480
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2554
2481
  "Buy ",
2555
- yt(i.name)
2482
+ it(i.name)
2556
2483
  ] }),
2557
2484
  /* @__PURE__ */ t.jsx(
2558
- b,
2485
+ v,
2559
2486
  {
2560
2487
  name: "X",
2561
2488
  width: 24,
2562
2489
  height: 24,
2563
2490
  fill: "var(--text-secondary)",
2564
2491
  hoverable: !0,
2565
- onClick: () => a(!1),
2492
+ onClick: e,
2566
2493
  style: {
2567
2494
  minWidth: 24,
2568
2495
  minHeight: 24
@@ -2570,105 +2497,174 @@ const Hs = (c) => {
2570
2497
  }
2571
2498
  )
2572
2499
  ] }),
2573
- /* @__PURE__ */ t.jsx("div", { className: Y.productOptions, children: /* @__PURE__ */ t.jsx(
2574
- Hs,
2500
+ /* @__PURE__ */ t.jsx("div", { className: J.productOptions, children: /* @__PURE__ */ t.jsx(
2501
+ Ze,
2575
2502
  {
2576
2503
  product: i,
2577
2504
  setIsOpen: a
2578
2505
  }
2579
2506
  ) })
2580
2507
  ] });
2581
- }, Pi = "_wrapper_1efqk_1", Bi = "_label_1efqk_10", Ti = "_contentBorder_1efqk_19", Mi = "_contentField_1efqk_23", Ai = "_textarea_1efqk_27", Oi = "_length_1efqk_42", nt = {
2582
- wrapper: Pi,
2583
- label: Bi,
2584
- contentBorder: Ti,
2585
- contentField: Mi,
2586
- textarea: Ai,
2587
- length: Oi
2588
- }, Zi = (c) => {
2589
- const {
2590
- onChange: i,
2591
- label: a,
2592
- value: s,
2593
- maxLength: e,
2594
- placeholder: o = "Type something...",
2595
- type: u = "text"
2596
- } = c, [p, _] = f.useState(s.length), { themeSettings: h } = Lt();
2597
- function k(y) {
2598
- return u === "number" ? y.replace(/[^\d\n]+/g, "") : y;
2508
+ }, _n = "_contentModal_2a136_1", jn = "_modalTop_2a136_13", vn = "_loading_2a136_19", bn = "_modalCards_2a136_27", yn = "_modalImage_2a136_32", In = "_card_2a136_37", Nn = "_cardInfo_2a136_48", Cn = "_cardButtons_2a136_55", Sn = "_title_2a136_61", kn = "_blockImage_2a136_68", W = {
2509
+ contentModal: _n,
2510
+ modalTop: jn,
2511
+ loading: vn,
2512
+ modalCards: bn,
2513
+ modalImage: yn,
2514
+ card: In,
2515
+ cardInfo: Nn,
2516
+ cardButtons: Cn,
2517
+ title: Sn,
2518
+ blockImage: kn
2519
+ }, Un = (r) => {
2520
+ const { setIsOpen: i, pageContext: a, groupData: s, setProductId: e, setIsProductModalOpen: c } = r, [d, u] = m.useState(null), [g, f] = m.useState(!0), { setIsOpen: P } = ot();
2521
+ m.useEffect(() => {
2522
+ var p;
2523
+ f(!0);
2524
+ const o = (p = a.listings) == null ? void 0 : p.filter(
2525
+ (q) => s.listingIdList.includes(q.id)
2526
+ );
2527
+ o && u([...o]), f(!1);
2528
+ }, [a]), m.useEffect(() => {
2529
+ P(!0);
2530
+ }, []);
2531
+ const j = () => {
2532
+ P(!1), setTimeout(() => {
2533
+ i(!1);
2534
+ }, 300);
2535
+ };
2536
+ function n(o) {
2537
+ return o.productData.compareAtPrice ? o.productData.compareAtPrice.amount : 0;
2599
2538
  }
2600
- return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
2601
- a && /* @__PURE__ */ t.jsx(
2602
- "label",
2603
- {
2604
- className: nt.label,
2605
- htmlFor: a,
2606
- children: a
2607
- }
2608
- ),
2609
- /* @__PURE__ */ t.jsx(
2610
- "textarea",
2611
- {
2612
- id: a,
2613
- value: s,
2614
- onChange: (y) => {
2615
- const n = k(y.target.value);
2616
- _(n.length), i(n);
2617
- },
2618
- placeholder: o,
2619
- className: F(nt.textarea, {
2620
- [nt.contentBorder]: h.inputs.border.active,
2621
- [nt.contentField]: h.inputs.field.active
2622
- }),
2623
- maxLength: e
2624
- }
2625
- ),
2626
- e && /* @__PURE__ */ t.jsxs("div", { className: nt.length, children: [
2627
- p,
2628
- "/",
2629
- e
2630
- ] })
2631
- ] });
2539
+ return /* @__PURE__ */ t.jsx(dt, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
2540
+ "div",
2541
+ {
2542
+ className: W.contentModal,
2543
+ onClick: (o) => o.stopPropagation(),
2544
+ children: [
2545
+ /* @__PURE__ */ t.jsxs("div", { className: W.modalTop, children: [
2546
+ /* @__PURE__ */ t.jsx(
2547
+ "span",
2548
+ {
2549
+ className: W.title,
2550
+ id: "h4",
2551
+ children: it(s.name)
2552
+ }
2553
+ ),
2554
+ /* @__PURE__ */ t.jsx(
2555
+ v,
2556
+ {
2557
+ name: "X",
2558
+ hoverable: !0,
2559
+ onClick: j
2560
+ }
2561
+ )
2562
+ ] }),
2563
+ !g && d && /* @__PURE__ */ t.jsx("div", { className: W.modalCards, children: d.map((o) => /* @__PURE__ */ t.jsxs(
2564
+ "div",
2565
+ {
2566
+ className: W.card,
2567
+ children: [
2568
+ /* @__PURE__ */ t.jsx("div", { children: o.productData.images[0] ? /* @__PURE__ */ t.jsx(
2569
+ "img",
2570
+ {
2571
+ src: `https://imagedelivery.net/${o.productData.images[0].cfId}/w=500`,
2572
+ alt: "",
2573
+ width: 64,
2574
+ height: 64,
2575
+ className: W.modalImage
2576
+ }
2577
+ ) : /* @__PURE__ */ t.jsx("div", { className: F(W.blockImage, W.modalImage), children: /* @__PURE__ */ t.jsx(v, { name: "Image" }) }) }),
2578
+ /* @__PURE__ */ t.jsxs("div", { className: W.cardInfo, children: [
2579
+ /* @__PURE__ */ t.jsxs(
2580
+ "span",
2581
+ {
2582
+ className: W.name,
2583
+ id: "h5",
2584
+ children: [
2585
+ it(o.productData.name),
2586
+ " $",
2587
+ o.productData.minPrice.amount,
2588
+ " ",
2589
+ "- $",
2590
+ n(o)
2591
+ ]
2592
+ }
2593
+ ),
2594
+ o.productData.shortDescription && /* @__PURE__ */ t.jsx(
2595
+ "span",
2596
+ {
2597
+ className: W.short,
2598
+ id: "md",
2599
+ children: it(o.productData.shortDescription)
2600
+ }
2601
+ ),
2602
+ /* @__PURE__ */ t.jsx("span", {})
2603
+ ] }),
2604
+ /* @__PURE__ */ t.jsxs("div", { className: W.cardButtons, children: [
2605
+ /* @__PURE__ */ t.jsx(
2606
+ D,
2607
+ {
2608
+ type: "Secondary",
2609
+ onClick: () => {
2610
+ e(o.id), i(!1), c(!0);
2611
+ },
2612
+ children: "Buy"
2613
+ }
2614
+ ),
2615
+ /* @__PURE__ */ t.jsx(Js, { path: `/product/${o.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(D, { type: "Primary", children: "View Details" }) })
2616
+ ] })
2617
+ ]
2618
+ },
2619
+ o.id
2620
+ )) }),
2621
+ g && /* @__PURE__ */ t.jsx("div", { className: W.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
2622
+ ]
2623
+ }
2624
+ ) });
2632
2625
  };
2633
2626
  export {
2634
- Gi as Accordion,
2635
- Bn as BurgerMenuButton,
2636
- z as Button,
2637
- vs as ButtonTypeSettings,
2638
- Ui as ButtonsSettings,
2639
- zi as CategorySettings,
2640
- It as ChargeTypes,
2641
- Tt as ChooseImage,
2642
- sa as ChooseImageModal,
2643
- wn as EmptyCart,
2644
- Fi as FormSettings,
2645
- Hi as HeaderButtons,
2646
- b as Icon,
2647
- bt as InputSettings,
2648
- Ot as InputUI,
2649
- na as ItemsSettings,
2650
- Di as LayoutSettings,
2651
- Xi as Link,
2652
- Vi as ListingSelector,
2653
- Dt as Loader,
2654
- Ji as MetaInfoPost,
2655
- Nt as Modal,
2656
- Yi as PagesMobileMenu,
2657
- Pn as PagesMobileModal,
2658
- Li as PagesSettings,
2659
- Qi as ProductCardButtons,
2660
- Ki as ProductCardModal,
2661
- Hs as ProductOptions,
2627
+ Rn as Accordion,
2628
+ As as BurgerMenuButton,
2629
+ D as Button,
2630
+ Be as ButtonTypeSettings,
2631
+ qn as ButtonsSettings,
2632
+ Bn as CategorySettings,
2633
+ St as ChargeTypes,
2634
+ qt as ChooseImage,
2635
+ Yn as ChooseImageModal,
2636
+ qs as EmptyCart,
2637
+ $n as FormSettings,
2638
+ Un as GroupCardModal,
2639
+ An as HeaderButtons,
2640
+ v as Icon,
2641
+ Nt as InputSettings,
2642
+ Et as InputUI,
2643
+ Gn as ItemsSettings,
2644
+ Mn as LayoutSettings,
2645
+ Js as Link,
2646
+ On as ListingSelector,
2647
+ Bt as Loader,
2648
+ zn as MetaInfoPost,
2649
+ dt as Modal,
2650
+ En as PagesMobileMenu,
2651
+ Os as PagesMobileModal,
2652
+ Tn as PagesSettings,
2653
+ Ln as ProductCardButtons,
2654
+ Hn as ProductCardModal,
2655
+ Ze as ProductOptions,
2656
+ Wn as RadioUI,
2662
2657
  kt as RangeSelector,
2663
- st as Select,
2664
- ia as SelectInfiniteList,
2665
- Wi as ShareLink,
2666
- $n as ShoppingButton,
2667
- qn as ShoppingModalCart,
2668
- ot as Switch,
2669
- aa as TextSettings,
2670
- oa as TextareaSettings,
2671
- Zi as TextareaUI,
2672
- ca as TypesText,
2673
- Pt as UserInfo
2658
+ nt as Select,
2659
+ Xn as SelectInfiniteList,
2660
+ Qn as SelectUI,
2661
+ Dn as ShareLink,
2662
+ Ts as ShoppingButton,
2663
+ $s as ShoppingModalCart,
2664
+ rt as Switch,
2665
+ Jn as TextSettings,
2666
+ Kn as TextareaSettings,
2667
+ Zn as TextareaUI,
2668
+ ti as TypesText,
2669
+ Tt as UserInfo
2674
2670
  };