@instockng/storefront-ui 1.0.112 → 1.0.113

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 (169) hide show
  1. package/dist/components/AssistantDrawer.d.ts.map +1 -1
  2. package/dist/index100.mjs +65 -26
  3. package/dist/index101.mjs +84 -6
  4. package/dist/index102.mjs +26 -72
  5. package/dist/index103.mjs +8 -3
  6. package/dist/index104.mjs +75 -2
  7. package/dist/index105.mjs +3 -82
  8. package/dist/index106.mjs +2 -54
  9. package/dist/index107.mjs +82 -5
  10. package/dist/index108.mjs +53 -4
  11. package/dist/index109.mjs +5 -178
  12. package/dist/index110.mjs +5 -53
  13. package/dist/index111.mjs +178 -68
  14. package/dist/index112.mjs +50 -34
  15. package/dist/index113.mjs +69 -43
  16. package/dist/index115.mjs +1 -1
  17. package/dist/index116.mjs +1 -1
  18. package/dist/index117.mjs +6 -6
  19. package/dist/index118.mjs +4 -4
  20. package/dist/index119.mjs +3 -3
  21. package/dist/index120.mjs +1 -1
  22. package/dist/index121.mjs +1 -1
  23. package/dist/index122.mjs +1 -1
  24. package/dist/index123.mjs +2 -2
  25. package/dist/index124.mjs +2 -2
  26. package/dist/index125.mjs +3 -3
  27. package/dist/index126.mjs +1 -1
  28. package/dist/index127.mjs +3 -3
  29. package/dist/index128.mjs +2 -2
  30. package/dist/index129.mjs +2 -2
  31. package/dist/index130.mjs +1 -1
  32. package/dist/index131.mjs +3 -3
  33. package/dist/index132.mjs +1 -1
  34. package/dist/index133.mjs +1 -1
  35. package/dist/index134.mjs +3 -3
  36. package/dist/index135.mjs +2 -2
  37. package/dist/index136.mjs +4 -4
  38. package/dist/index137.mjs +1 -1
  39. package/dist/index138.mjs +3 -3
  40. package/dist/index139.mjs +4 -4
  41. package/dist/index140.mjs +1 -1
  42. package/dist/index141.mjs +1 -1
  43. package/dist/index142.mjs +1 -1
  44. package/dist/index143.mjs +1 -1
  45. package/dist/index144.mjs +1 -1
  46. package/dist/index145.mjs +1 -1
  47. package/dist/index146.mjs +1 -1
  48. package/dist/index147.mjs +2 -2
  49. package/dist/index148.mjs +3 -3
  50. package/dist/index151.mjs +1 -1
  51. package/dist/index153.mjs +2 -21
  52. package/dist/index154.mjs +2 -56
  53. package/dist/index155.mjs +2 -29
  54. package/dist/index156.mjs +2 -7
  55. package/dist/index157.mjs +16 -50
  56. package/dist/index158.mjs +32 -6
  57. package/dist/index159.mjs +37 -11
  58. package/dist/index160.mjs +18 -7
  59. package/dist/index161.mjs +18 -28
  60. package/dist/index162.mjs +2 -2
  61. package/dist/index163.mjs +20 -70
  62. package/dist/index164.mjs +42 -163
  63. package/dist/index166.mjs +30 -2
  64. package/dist/index167.mjs +18 -2
  65. package/dist/index168.mjs +2 -2
  66. package/dist/index169.mjs +2 -18
  67. package/dist/index170.mjs +2 -32
  68. package/dist/index171.mjs +2 -38
  69. package/dist/index172.mjs +67 -13
  70. package/dist/index173.mjs +2 -18
  71. package/dist/index174.mjs +53 -2
  72. package/dist/index175.mjs +2 -20
  73. package/dist/index176.mjs +29 -39
  74. package/dist/index177.mjs +152 -2
  75. package/dist/index178.mjs +2 -30
  76. package/dist/index179.mjs +2 -18
  77. package/dist/index180.mjs +19 -2
  78. package/dist/index181.mjs +2 -2
  79. package/dist/index182.mjs +2 -2
  80. package/dist/index183.mjs +26 -2
  81. package/dist/index184.mjs +2 -72
  82. package/dist/index185.mjs +2 -2
  83. package/dist/index186.mjs +20 -49
  84. package/dist/index187.mjs +23 -2
  85. package/dist/index188.mjs +2 -36
  86. package/dist/index189.mjs +2 -152
  87. package/dist/index190.mjs +2 -2
  88. package/dist/index191.mjs +23 -2
  89. package/dist/index192.mjs +2 -19
  90. package/dist/index193.mjs +23 -2
  91. package/dist/index195.mjs +2 -26
  92. package/dist/index196.mjs +2 -2
  93. package/dist/index197.mjs +23 -2
  94. package/dist/index198.mjs +2 -24
  95. package/dist/index199.mjs +15 -15
  96. package/dist/index200.mjs +2 -2
  97. package/dist/index201.mjs +2 -2
  98. package/dist/index202.mjs +2 -2
  99. package/dist/index203.mjs +2 -23
  100. package/dist/index204.mjs +2 -2
  101. package/dist/index205.mjs +2 -23
  102. package/dist/index206.mjs +2 -2
  103. package/dist/index207.mjs +2 -2
  104. package/dist/index208.mjs +127 -2
  105. package/dist/index209.mjs +2 -23
  106. package/dist/index210.mjs +74 -2
  107. package/dist/index211.mjs +71 -20
  108. package/dist/index212.mjs +21 -2
  109. package/dist/index213.mjs +56 -2
  110. package/dist/index214.mjs +29 -2
  111. package/dist/index215.mjs +7 -2
  112. package/dist/index216.mjs +52 -2
  113. package/dist/index217.mjs +6 -2
  114. package/dist/index218.mjs +12 -2
  115. package/dist/index219.mjs +7 -2
  116. package/dist/index22.mjs +66 -60
  117. package/dist/index220.mjs +28 -127
  118. package/dist/index221.mjs +2 -2
  119. package/dist/index222.mjs +69 -73
  120. package/dist/index223.mjs +164 -71
  121. package/dist/index229.mjs +2 -2
  122. package/dist/index230.mjs +2 -108
  123. package/dist/index232.mjs +244 -2
  124. package/dist/index233.mjs +2 -2
  125. package/dist/index234.mjs +33 -2
  126. package/dist/index235.mjs +56 -28
  127. package/dist/index236.mjs +25 -2
  128. package/dist/index237.mjs +2 -244
  129. package/dist/index239.mjs +32 -28
  130. package/dist/index240.mjs +2 -65
  131. package/dist/index241.mjs +2 -25
  132. package/dist/index242.mjs +2 -2
  133. package/dist/index243.mjs +2 -2
  134. package/dist/index244.mjs +2 -2
  135. package/dist/index245.mjs +2 -2
  136. package/dist/index246.mjs +2 -2
  137. package/dist/index247.mjs +108 -2
  138. package/dist/index248.mjs +2 -2
  139. package/dist/index250.mjs +2 -2
  140. package/dist/index253.mjs +2 -31
  141. package/dist/index254.mjs +4 -11
  142. package/dist/index255.mjs +13 -4
  143. package/dist/index256.mjs +7 -4
  144. package/dist/index257.mjs +31 -2
  145. package/dist/index258.mjs +11 -4
  146. package/dist/index259.mjs +4 -13
  147. package/dist/index260.mjs +4 -7
  148. package/dist/index261.mjs +1 -1
  149. package/dist/index263.mjs +1 -1
  150. package/dist/index264.mjs +6 -6
  151. package/dist/index265.mjs +3 -3
  152. package/dist/index267.mjs +2 -2
  153. package/dist/index271.mjs +2 -2
  154. package/dist/index272.mjs +2 -2
  155. package/dist/index273.mjs +2 -2
  156. package/dist/index274.mjs +91 -2
  157. package/dist/index275.mjs +2 -91
  158. package/dist/index277.mjs +1 -1
  159. package/dist/index282.mjs +1 -1
  160. package/dist/index283.mjs +2 -2
  161. package/dist/index63.mjs +17 -17
  162. package/dist/index64.mjs +2 -2
  163. package/dist/index95.mjs +33 -231
  164. package/dist/index96.mjs +42 -5
  165. package/dist/index97.mjs +228 -127
  166. package/dist/index98.mjs +4 -66
  167. package/dist/index99.mjs +124 -77
  168. package/package.json +1 -1
  169. package/src/components/AssistantDrawer.tsx +21 -3
package/dist/index22.mjs CHANGED
@@ -1,12 +1,18 @@
1
1
  'use client';
2
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
3
3
  import { useState as m, useRef as b, useCallback as B, useEffect as v } from "react";
4
4
  import { createPortal as Z } from "react-dom";
5
5
  import { Sparkles as Q, X as ee, MessageCircle as te, Loader2 as re, Send as se } from "lucide-react";
6
6
  import { cn as k, formatCurrency as ne, WHATSAPP_HELP_LINK as ae } from "./index30.mjs";
7
7
  import { useHideBodyOverflow as oe } from "./index53.mjs";
8
- function fe({
9
- isOpen: c,
8
+ function le(a) {
9
+ return a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/\n/g, "<br />");
10
+ }
11
+ function ce(a) {
12
+ return a.replace(/\s*PRODUCTS:[\w\-,]*\s*/g, "").replace(/\s*CONTACT_SUPPORT\s*/gi, "");
13
+ }
14
+ function ge({
15
+ isOpen: a,
10
16
  onClose: x,
11
17
  apiUrl: P,
12
18
  brandSlug: R,
@@ -16,28 +22,28 @@ function fe({
16
22
  className: K,
17
23
  disablePortal: O = !1
18
24
  }) {
19
- const [u, d] = m([]), [w, S] = m(""), [f, L] = m(!1), [W, h] = m(null), [$, D] = m(!1), [V, _] = m(!1), H = b(null), J = b(null), A = b(!1), M = b([]);
20
- M.current = u, oe(c);
21
- const U = B((e, l) => {
25
+ const [u, d] = m([]), [w, S] = m(""), [f, L] = m(!1), [_, h] = m(null), [$, M] = m(!1), [V, W] = m(!1), D = b(null), H = b(null), A = b(!1), J = b([]);
26
+ J.current = u, oe(a);
27
+ const U = B((e, c) => {
22
28
  if (e === "token")
23
29
  d((s) => {
24
30
  const i = [...s], t = i[i.length - 1];
25
31
  if ((t == null ? void 0 : t.role) === "assistant") {
26
- const a = (t.content + l).replace(/\n?PRODUCTS:.*$/m, "").replace(/\n?CONTACT_SUPPORT\s*/gi, "");
27
- i[i.length - 1] = { ...t, content: a };
32
+ const n = t.content + c, o = ce(n);
33
+ i[i.length - 1] = { ...t, content: o };
28
34
  }
29
35
  return i;
30
36
  });
31
37
  else if (e === "done")
32
38
  try {
33
- const s = JSON.parse(l);
39
+ const s = JSON.parse(c);
34
40
  d((i) => {
35
- var a;
41
+ var o;
36
42
  const t = [...i], n = t[t.length - 1];
37
43
  return (n == null ? void 0 : n.role) === "assistant" && (t[t.length - 1] = {
38
44
  ...n,
39
45
  content: s.answer || n.content,
40
- products: ((a = s.products) == null ? void 0 : a.length) > 0 ? s.products : void 0,
46
+ products: ((o = s.products) == null ? void 0 : o.length) > 0 ? s.products : void 0,
41
47
  whatsapp: s.whatsapp || !1
42
48
  }), t;
43
49
  });
@@ -45,7 +51,7 @@ function fe({
45
51
  }
46
52
  else if (e === "error")
47
53
  try {
48
- const s = JSON.parse(l);
54
+ const s = JSON.parse(c);
49
55
  h(s.message || "An error occurred");
50
56
  } catch {
51
57
  h("An error occurred");
@@ -55,11 +61,11 @@ function fe({
55
61
  var i;
56
62
  if (!e.trim()) return;
57
63
  h(null);
58
- const l = { role: "user", content: e }, s = M.current.slice(-20).map((t) => ({
64
+ const c = { role: "user", content: e }, s = J.current.slice(-20).map((t) => ({
59
65
  role: t.role,
60
66
  content: t.content
61
67
  }));
62
- d((t) => [...t, l]), S(""), L(!0), d((t) => [...t, { role: "assistant", content: "" }]);
68
+ d((t) => [...t, c]), S(""), L(!0), d((t) => [...t, { role: "assistant", content: "" }]);
63
69
  try {
64
70
  const t = await fetch(`${P}/v1/assistant/ask`, {
65
71
  method: "POST",
@@ -72,38 +78,38 @@ function fe({
72
78
  })
73
79
  });
74
80
  if (!t.ok) {
75
- const p = await t.json().catch(() => ({}));
81
+ const g = await t.json().catch(() => ({}));
76
82
  throw new Error(
77
- ((i = p == null ? void 0 : p.error) == null ? void 0 : i.message) || `Request failed (${t.status})`
83
+ ((i = g == null ? void 0 : g.error) == null ? void 0 : i.message) || `Request failed (${t.status})`
78
84
  );
79
85
  }
80
86
  if (!t.body) throw new Error("No response body");
81
- const n = t.body.getReader(), a = new TextDecoder();
87
+ const n = t.body.getReader(), o = new TextDecoder();
82
88
  let E = "", T = "";
83
89
  for (; ; ) {
84
- const { done: p, value: G } = await n.read();
85
- if (p) break;
86
- E += a.decode(G, { stream: !0 });
90
+ const { done: g, value: G } = await n.read();
91
+ if (g) break;
92
+ E += o.decode(G, { stream: !0 });
87
93
  const z = E.split(`
88
94
  `);
89
95
  E = z.pop() || "";
90
- for (const g of z) {
91
- if (g.trim() === "") {
96
+ for (const p of z) {
97
+ if (p.trim() === "") {
92
98
  T = "";
93
99
  continue;
94
100
  }
95
- if (g.trimStart().startsWith("event:"))
96
- T = g.trimStart().slice(6).trim();
97
- else if (g.trimStart().startsWith("data:")) {
98
- const C = g.trimStart().slice(5), Y = C.startsWith(" ") ? C.slice(1) : C;
101
+ if (p.trimStart().startsWith("event:"))
102
+ T = p.trimStart().slice(6).trim();
103
+ else if (p.trimStart().startsWith("data:")) {
104
+ const C = p.trimStart().slice(5), Y = C.startsWith(" ") ? C.slice(1) : C;
99
105
  U(T || "token", Y);
100
106
  }
101
107
  }
102
108
  }
103
109
  } catch (t) {
104
110
  h(t.message || "Something went wrong"), d((n) => {
105
- const a = n[n.length - 1];
106
- return (a == null ? void 0 : a.role) === "assistant" && !a.content ? n.slice(0, -1) : n;
111
+ const o = n[n.length - 1];
112
+ return (o == null ? void 0 : o.role) === "assistant" && !o.content ? n.slice(0, -1) : n;
107
113
  });
108
114
  } finally {
109
115
  L(!1);
@@ -112,42 +118,42 @@ function fe({
112
118
  [P, R, j, U]
113
119
  );
114
120
  N.current = q, v(() => {
115
- if (c)
116
- _(!0), requestAnimationFrame(() => {
121
+ if (a)
122
+ W(!0), requestAnimationFrame(() => {
117
123
  requestAnimationFrame(() => {
118
- D(!0);
124
+ M(!0);
119
125
  });
120
126
  });
121
127
  else {
122
- D(!1);
128
+ M(!1);
123
129
  const e = setTimeout(() => {
124
- _(!1), d([]), S(""), h(null), A.current = !1;
130
+ W(!1), d([]), S(""), h(null), A.current = !1;
125
131
  }, 300);
126
132
  return () => clearTimeout(e);
127
133
  }
128
- }, [c]), v(() => {
129
- c && y && !A.current && (A.current = !0, y.trim() ? setTimeout(() => {
134
+ }, [a]), v(() => {
135
+ a && y && !A.current && (A.current = !0, y.trim() ? setTimeout(() => {
130
136
  var e;
131
137
  return (e = N.current) == null ? void 0 : e.call(N, y);
132
138
  }, 100) : setTimeout(() => {
133
139
  var e;
134
- return (e = J.current) == null ? void 0 : e.focus();
140
+ return (e = H.current) == null ? void 0 : e.focus();
135
141
  }, 350));
136
- }, [c, y]), v(() => {
142
+ }, [a, y]), v(() => {
137
143
  var e;
138
- (e = H.current) == null || e.scrollIntoView({ behavior: "smooth" });
144
+ (e = D.current) == null || e.scrollIntoView({ behavior: "smooth" });
139
145
  }, [u]), v(() => {
140
- const e = (l) => {
141
- l.key === "Escape" && c && x();
146
+ const e = (c) => {
147
+ c.key === "Escape" && a && x();
142
148
  };
143
- if (c)
149
+ if (a)
144
150
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
145
- }, [c, x]);
151
+ }, [a, x]);
146
152
  const X = (e) => {
147
153
  e.preventDefault(), w.trim() && q(w.trim());
148
154
  };
149
155
  if (!V) return null;
150
- const F = /* @__PURE__ */ o(
156
+ const F = /* @__PURE__ */ l(
151
157
  "div",
152
158
  {
153
159
  className: k(
@@ -162,7 +168,7 @@ function fe({
162
168
  onClick: x
163
169
  }
164
170
  ),
165
- /* @__PURE__ */ o(
171
+ /* @__PURE__ */ l(
166
172
  "div",
167
173
  {
168
174
  className: k(
@@ -176,8 +182,8 @@ function fe({
176
182
  K
177
183
  ),
178
184
  children: [
179
- /* @__PURE__ */ o("div", { className: "flex items-center justify-between border-b border-gray-200 px-4 py-3 flex-shrink-0", children: [
180
- /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
185
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between border-b border-gray-200 px-4 py-3 flex-shrink-0", children: [
186
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
181
187
  /* @__PURE__ */ r(Q, { className: "h-5 w-5 text-orange-500" }),
182
188
  /* @__PURE__ */ r("span", { className: "font-semibold text-gray-900", children: I }),
183
189
  /* @__PURE__ */ r("span", { className: "text-xs text-gray-400 bg-gray-100 rounded px-1.5 py-0.5", children: "beta" })
@@ -193,14 +199,14 @@ function fe({
193
199
  }
194
200
  )
195
201
  ] }),
196
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto p-4 space-y-4 min-h-0", children: [
202
+ /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto p-4 space-y-4 min-h-0", children: [
197
203
  u.length === 0 && !f && /* @__PURE__ */ r("div", { className: "text-center text-gray-400 text-sm py-8", children: "Ask me anything about our products!" }),
198
- u.map((e, l) => /* @__PURE__ */ r("div", { children: e.role === "user" ? /* @__PURE__ */ r("div", { className: "flex justify-end", children: /* @__PURE__ */ r("div", { className: "bg-gray-800 text-white rounded-2xl rounded-br-sm px-4 py-2 max-w-[80%] text-sm", children: e.content }) }) : /* @__PURE__ */ o("div", { className: "space-y-3", children: [
199
- /* @__PURE__ */ o("div", { className: "text-sm text-gray-800 leading-relaxed whitespace-pre-wrap", children: [
200
- e.content,
201
- f && l === u.length - 1 && /* @__PURE__ */ r("span", { className: "inline-block w-1.5 h-4 bg-gray-400 animate-pulse ml-0.5 align-text-bottom" })
204
+ u.map((e, c) => /* @__PURE__ */ r("div", { children: e.role === "user" ? /* @__PURE__ */ r("div", { className: "flex justify-end", children: /* @__PURE__ */ r("div", { className: "bg-gray-800 text-white rounded-2xl rounded-br-sm px-4 py-2 max-w-[80%] text-sm", children: e.content }) }) : /* @__PURE__ */ l("div", { className: "space-y-3", children: [
205
+ /* @__PURE__ */ l("div", { className: "text-sm text-gray-800 leading-relaxed", children: [
206
+ /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: le(e.content) } }),
207
+ f && c === u.length - 1 && /* @__PURE__ */ r("span", { className: "inline-block w-1.5 h-4 bg-gray-400 animate-pulse ml-0.5 align-text-bottom" })
202
208
  ] }),
203
- e.products && e.products.length > 0 && /* @__PURE__ */ r("div", { className: "space-y-2", children: e.products.map((s) => /* @__PURE__ */ o(
209
+ e.products && e.products.length > 0 && /* @__PURE__ */ r("div", { className: "space-y-2", children: e.products.map((s) => /* @__PURE__ */ l(
204
210
  "a",
205
211
  {
206
212
  href: `/product/${s.slug}`,
@@ -214,7 +220,7 @@ function fe({
214
220
  className: "h-16 w-16 rounded-lg object-cover flex-shrink-0"
215
221
  }
216
222
  ) : /* @__PURE__ */ r("div", { className: "h-16 w-16 rounded-lg bg-gray-100 flex-shrink-0" }),
217
- /* @__PURE__ */ o("div", { className: "min-w-0", children: [
223
+ /* @__PURE__ */ l("div", { className: "min-w-0", children: [
218
224
  /* @__PURE__ */ r("p", { className: "text-sm font-medium text-gray-900 line-clamp-2", children: s.name }),
219
225
  /* @__PURE__ */ r("p", { className: "text-sm font-semibold text-blue-600", children: ne(s.price) })
220
226
  ] })
@@ -222,7 +228,7 @@ function fe({
222
228
  },
223
229
  s.slug
224
230
  )) }),
225
- e.whatsapp && /* @__PURE__ */ o(
231
+ e.whatsapp && /* @__PURE__ */ l(
226
232
  "a",
227
233
  {
228
234
  href: ae,
@@ -235,15 +241,15 @@ function fe({
235
241
  ]
236
242
  }
237
243
  )
238
- ] }) }, l)),
239
- W && /* @__PURE__ */ r("div", { className: "rounded-lg bg-red-50 border border-red-200 p-3 text-sm text-red-700", children: W }),
240
- /* @__PURE__ */ r("div", { ref: H })
244
+ ] }) }, c)),
245
+ _ && /* @__PURE__ */ r("div", { className: "rounded-lg bg-red-50 border border-red-200 p-3 text-sm text-red-700", children: _ }),
246
+ /* @__PURE__ */ r("div", { ref: D })
241
247
  ] }),
242
- /* @__PURE__ */ r("div", { className: "border-t border-gray-200 p-3 flex-shrink-0", children: /* @__PURE__ */ o("form", { onSubmit: X, className: "flex items-center gap-2", children: [
248
+ /* @__PURE__ */ r("div", { className: "border-t border-gray-200 p-3 flex-shrink-0", children: /* @__PURE__ */ l("form", { onSubmit: X, className: "flex items-center gap-2", children: [
243
249
  /* @__PURE__ */ r(
244
250
  "input",
245
251
  {
246
- ref: J,
252
+ ref: H,
247
253
  type: "text",
248
254
  value: w,
249
255
  onChange: (e) => S(e.target.value),
@@ -280,5 +286,5 @@ function fe({
280
286
  return O ? F : Z(F, document.body);
281
287
  }
282
288
  export {
283
- fe as AssistantDrawer
289
+ ge as AssistantDrawer
284
290
  };
package/dist/index220.mjs CHANGED
@@ -1,130 +1,31 @@
1
1
  'use client';
2
- import { __module as b } from "./index257.mjs";
3
- import S from "./index258.mjs";
4
- var _;
5
- function $() {
6
- return _ ? b.exports : (_ = 1, (() => {
7
- var O = { 154: (t, m, n) => {
8
- var i = n(781), u = ["write", "end", "destroy"], f = ["resume", "pause"], l = ["data", "close"], c = Array.prototype.slice;
9
- t.exports = s;
10
- function r(o, a) {
11
- if (o.forEach)
12
- return o.forEach(a);
13
- for (var e = 0; e < o.length; e++)
14
- a(o[e], e);
15
- }
16
- function s(o, a) {
17
- var e = new i(), d = !1;
18
- return r(u, x), r(f, z), r(l, E), a.on("end", F), o.on("drain", function() {
19
- e.emit("drain");
20
- }), o.on("error", w), a.on("error", w), e.writable = o.writable, e.readable = a.readable, e;
21
- function x(p) {
22
- e[p] = h;
23
- function h() {
24
- return o[p].apply(o, arguments);
25
- }
26
- }
27
- function z(p) {
28
- e[p] = h;
29
- function h() {
30
- e.emit(p);
31
- var y = a[p];
32
- if (y)
33
- return y.apply(a, arguments);
34
- a.emit(p);
35
- }
36
- }
37
- function E(p) {
38
- a.on(p, h);
39
- function h() {
40
- var y = c.call(arguments);
41
- y.unshift(p), e.emit.apply(e, y);
42
- }
43
- }
44
- function F() {
45
- if (!d) {
46
- d = !0;
47
- var p = c.call(arguments);
48
- p.unshift("end"), e.emit.apply(e, p);
49
- }
50
- }
51
- function w(p) {
52
- e.emit("error", p);
53
- }
54
- }
55
- }, 349: (t, m, n) => {
56
- const i = n(147), u = n(781), f = n(796), l = n(154), c = n(530), r = (s) => Object.assign({ level: 9 }, s);
57
- t.exports = (s, o) => s ? c(f.gzip)(s, r(o)).then((a) => a.length).catch((a) => 0) : Promise.resolve(0), t.exports.sync = (s, o) => f.gzipSync(s, r(o)).length, t.exports.stream = (s) => {
58
- const o = new u.PassThrough(), a = new u.PassThrough(), e = l(o, a);
59
- let d = 0;
60
- const x = f.createGzip(r(s)).on("data", (z) => {
61
- d += z.length;
62
- }).on("error", () => {
63
- e.gzipSize = 0;
64
- }).on("end", () => {
65
- e.gzipSize = d, e.emit("gzip-size", d), a.end();
66
- });
67
- return o.pipe(x), o.pipe(a, { end: !1 }), e;
68
- }, t.exports.file = (s, o) => new Promise((a, e) => {
69
- const d = i.createReadStream(s);
70
- d.on("error", e);
71
- const x = d.pipe(t.exports.stream(o));
72
- x.on("error", e), x.on("gzip-size", a);
73
- }), t.exports.fileSync = (s, o) => t.exports.sync(i.readFileSync(s), o);
74
- }, 530: (t) => {
75
- const m = (n, i) => function(...u) {
76
- const f = i.promiseModule;
77
- return new f((l, c) => {
78
- i.multiArgs ? u.push((...r) => {
79
- i.errorFirst ? r[0] ? c(r) : (r.shift(), l(r)) : l(r);
80
- }) : i.errorFirst ? u.push((r, s) => {
81
- r ? c(r) : l(s);
82
- }) : u.push(l), n.apply(this, u);
83
- });
84
- };
85
- t.exports = (n, i) => {
86
- i = Object.assign({ exclude: [/.+(Sync|Stream)$/], errorFirst: !0, promiseModule: Promise }, i);
87
- const u = typeof n;
88
- if (!(n !== null && (u === "object" || u === "function")))
89
- throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${n === null ? "null" : u}\``);
90
- const f = (c) => {
91
- const r = (s) => typeof s == "string" ? c === s : s.test(c);
92
- return i.include ? i.include.some(r) : !i.exclude.some(r);
93
- };
94
- let l;
95
- u === "function" ? l = function(...c) {
96
- return i.excludeMain ? n(...c) : m(n, i).apply(this, c);
97
- } : l = Object.create(Object.getPrototypeOf(n));
98
- for (const c in n) {
99
- const r = n[c];
100
- l[c] = typeof r == "function" && f(c) ? m(r, i) : r;
101
- }
102
- return l;
103
- };
104
- }, 147: (t) => {
105
- t.exports = S;
106
- }, 781: (t) => {
107
- t.exports = S;
108
- }, 796: (t) => {
109
- t.exports = S;
110
- } }, v = {};
111
- function g(t) {
112
- var m = v[t];
113
- if (m !== void 0)
114
- return m.exports;
115
- var n = v[t] = { exports: {} }, i = !0;
116
- try {
117
- O[t](n, n.exports, g), i = !1;
118
- } finally {
119
- i && delete v[t];
120
- }
121
- return n.exports;
122
- }
123
- typeof g < "u" && (g.ab = __dirname + "/");
124
- var j = g(349);
125
- b.exports = j;
126
- })(), b.exports);
127
- }
2
+ import n from "./index97.mjs";
3
+ const a = n.toObjectSet([
4
+ "age",
5
+ "authorization",
6
+ "content-length",
7
+ "content-type",
8
+ "etag",
9
+ "expires",
10
+ "from",
11
+ "host",
12
+ "if-modified-since",
13
+ "if-unmodified-since",
14
+ "last-modified",
15
+ "location",
16
+ "max-forwards",
17
+ "proxy-authorization",
18
+ "referer",
19
+ "retry-after",
20
+ "user-agent"
21
+ ]), u = (s) => {
22
+ const t = {};
23
+ let e, r, i;
24
+ return s && s.split(`
25
+ `).forEach(function(o) {
26
+ i = o.indexOf(":"), e = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!e || t[e] && a[e]) && (e === "set-cookie" ? t[e] ? t[e].push(r) : t[e] = [r] : t[e] = t[e] ? t[e] + ", " + r : r);
27
+ }), t;
28
+ };
128
29
  export {
129
- $ as __require
30
+ u as default
130
31
  };
package/dist/index221.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var e = { exports: {} };
2
+ const t = null;
3
3
  export {
4
- e as __module
4
+ t as default
5
5
  };
package/dist/index222.mjs CHANGED
@@ -1,77 +1,73 @@
1
1
  'use client';
2
- import { __exports as e } from "./index251.mjs";
3
- /**
4
- * @license React
5
- * react-is.production.js
6
- *
7
- * Copyright (c) Meta Platforms, Inc. and affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
- var R;
13
- function d() {
14
- if (R) return e;
15
- R = 1;
16
- var l = Symbol.for("react.transitional.element"), T = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), s = Symbol.for("react.consumer"), i = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), a = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), C = Symbol.for("react.client.reference");
17
- function t(r) {
18
- if (typeof r == "object" && r !== null) {
19
- var m = r.$$typeof;
20
- switch (m) {
21
- case l:
22
- switch (r = r.type, r) {
23
- case n:
24
- case f:
25
- case o:
26
- case a:
27
- case E:
28
- return r;
29
- default:
30
- switch (r = r && r.$$typeof, r) {
31
- case i:
32
- case u:
33
- case _:
34
- case c:
35
- return r;
36
- case s:
37
- return r;
38
- default:
39
- return m;
40
- }
41
- }
42
- case T:
43
- return m;
44
- }
2
+ import H from "./index97.mjs";
3
+ import D from "./index261.mjs";
4
+ import L from "./index217.mjs";
5
+ import n from "./index108.mjs";
6
+ import y from "./index103.mjs";
7
+ import O from "./index262.mjs";
8
+ import U from "./index219.mjs";
9
+ import q from "./index111.mjs";
10
+ import { progressEventReducer as A } from "./index263.mjs";
11
+ import v from "./index264.mjs";
12
+ const N = typeof XMLHttpRequest < "u", Q = N && function(s) {
13
+ return new Promise(function(C, i) {
14
+ const t = v(s);
15
+ let E = t.data;
16
+ const T = q.from(t.headers).normalize();
17
+ let { responseType: d, onUploadProgress: R, onDownloadProgress: h } = t, l, g, w, u, f;
18
+ function x() {
19
+ u && u(), f && f(), t.cancelToken && t.cancelToken.unsubscribe(l), t.signal && t.signal.removeEventListener("abort", l);
45
20
  }
46
- }
47
- return e.ContextConsumer = s, e.ContextProvider = i, e.Element = l, e.ForwardRef = u, e.Fragment = n, e.Lazy = _, e.Memo = c, e.Portal = T, e.Profiler = f, e.StrictMode = o, e.Suspense = a, e.SuspenseList = E, e.isContextConsumer = function(r) {
48
- return t(r) === s;
49
- }, e.isContextProvider = function(r) {
50
- return t(r) === i;
51
- }, e.isElement = function(r) {
52
- return typeof r == "object" && r !== null && r.$$typeof === l;
53
- }, e.isForwardRef = function(r) {
54
- return t(r) === u;
55
- }, e.isFragment = function(r) {
56
- return t(r) === n;
57
- }, e.isLazy = function(r) {
58
- return t(r) === _;
59
- }, e.isMemo = function(r) {
60
- return t(r) === c;
61
- }, e.isPortal = function(r) {
62
- return t(r) === T;
63
- }, e.isProfiler = function(r) {
64
- return t(r) === f;
65
- }, e.isStrictMode = function(r) {
66
- return t(r) === o;
67
- }, e.isSuspense = function(r) {
68
- return t(r) === a;
69
- }, e.isSuspenseList = function(r) {
70
- return t(r) === E;
71
- }, e.isValidElementType = function(r) {
72
- return typeof r == "string" || typeof r == "function" || r === n || r === f || r === o || r === a || r === E || r === S || typeof r == "object" && r !== null && (r.$$typeof === _ || r.$$typeof === c || r.$$typeof === i || r.$$typeof === s || r.$$typeof === u || r.$$typeof === C || r.getModuleId !== void 0);
73
- }, e.typeOf = t, e;
74
- }
21
+ let e = new XMLHttpRequest();
22
+ e.open(t.method.toUpperCase(), t.url, !0), e.timeout = t.timeout;
23
+ function b() {
24
+ if (!e)
25
+ return;
26
+ const o = q.from(
27
+ "getAllResponseHeaders" in e && e.getAllResponseHeaders()
28
+ ), a = {
29
+ data: !d || d === "text" || d === "json" ? e.responseText : e.response,
30
+ status: e.status,
31
+ statusText: e.statusText,
32
+ headers: o,
33
+ config: s,
34
+ request: e
35
+ };
36
+ D(function(c) {
37
+ C(c), x();
38
+ }, function(c) {
39
+ i(c), x();
40
+ }, a), e = null;
41
+ }
42
+ "onloadend" in e ? e.onloadend = b : e.onreadystatechange = function() {
43
+ !e || e.readyState !== 4 || e.status === 0 && !(e.responseURL && e.responseURL.indexOf("file:") === 0) || setTimeout(b);
44
+ }, e.onabort = function() {
45
+ e && (i(new n("Request aborted", n.ECONNABORTED, s, e)), e = null);
46
+ }, e.onerror = function(r) {
47
+ const a = r && r.message ? r.message : "Network Error", p = new n(a, n.ERR_NETWORK, s, e);
48
+ p.event = r || null, i(p), e = null;
49
+ }, e.ontimeout = function() {
50
+ let r = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
51
+ const a = t.transitional || L;
52
+ t.timeoutErrorMessage && (r = t.timeoutErrorMessage), i(new n(
53
+ r,
54
+ a.clarifyTimeoutError ? n.ETIMEDOUT : n.ECONNABORTED,
55
+ s,
56
+ e
57
+ )), e = null;
58
+ }, E === void 0 && T.setContentType(null), "setRequestHeader" in e && H.forEach(T.toJSON(), function(r, a) {
59
+ e.setRequestHeader(a, r);
60
+ }), H.isUndefined(t.withCredentials) || (e.withCredentials = !!t.withCredentials), d && d !== "json" && (e.responseType = t.responseType), h && ([w, f] = A(h, !0), e.addEventListener("progress", w)), R && e.upload && ([g, u] = A(R), e.upload.addEventListener("progress", g), e.upload.addEventListener("loadend", u)), (t.cancelToken || t.signal) && (l = (o) => {
61
+ e && (i(!o || o.type ? new y(null, s, e) : o), e.abort(), e = null);
62
+ }, t.cancelToken && t.cancelToken.subscribe(l), t.signal && (t.signal.aborted ? l() : t.signal.addEventListener("abort", l)));
63
+ const m = O(t.url);
64
+ if (m && U.protocols.indexOf(m) === -1) {
65
+ i(new n("Unsupported protocol " + m + ":", n.ERR_BAD_REQUEST, s));
66
+ return;
67
+ }
68
+ e.send(E || null);
69
+ });
70
+ };
75
71
  export {
76
- d as __require
72
+ Q as default
77
73
  };