@aizu-chat/react 0.1.3 → 0.1.4

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.
package/dist/index.js CHANGED
@@ -114,63 +114,11 @@ function cn(...args) {
114
114
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(args));
115
115
  }
116
116
 
117
- // src/assets/icons/ai/index.tsx
118
- var import_jsx_runtime = require("react/jsx-runtime");
119
- var IconAI = (_a) => {
120
- var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
121
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
122
- "svg",
123
- __spreadProps(__spreadValues({
124
- width: "64",
125
- height: "64",
126
- viewBox: "0 0 64 64",
127
- fill: "none",
128
- xmlns: "http://www.w3.org/2000/svg",
129
- className: cn("w-8 h-8", className)
130
- }, props), {
131
- children: [
132
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "Icon AI" }),
133
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { filter: "url(#filter0_ii_48_32)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "32.0001", cy: "32", r: "32", fill: "url(#paint0_linear_48_32)" }) }),
134
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M34.2288 17.7789C33.9922 16.7384 33.0671 16 32 16C30.9329 16 30.0078 16.7384 29.7712 17.7789L28.5065 23.3405C27.9216 25.9129 25.9129 27.9216 23.3405 28.5065L17.7789 29.7712C16.7384 30.0078 16 30.9329 16 32C16 33.0671 16.7384 33.9922 17.7789 34.2288L23.3405 35.4935C25.9129 36.0784 27.9216 38.0871 28.5065 40.6595L29.7712 46.2211C30.0078 47.2616 30.9329 48 32 48C33.0671 48 33.9922 47.2616 34.2288 46.2211L35.4935 40.6595C36.0784 38.0871 38.0871 36.0784 40.6595 35.4935L46.2211 34.2288C47.2616 33.9922 48 33.0671 48 32C48 30.9329 47.2616 30.0078 46.2211 29.7712L40.6595 28.5065C38.0871 27.9216 36.0784 25.9129 35.4935 23.3405L34.2288 17.7789Z", fill: "url(#paint1_linear_48_32)" }),
135
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", { children: [
136
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: "filter0_ii_48_32", x: "0.00012207", y: "0", width: "63.9999", height: "64", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [
137
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
138
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
139
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
140
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feMorphology", { radius: "4", operator: "erode", in: "SourceAlpha", result: "effect1_innerShadow_48_32" }),
141
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
142
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "4" }),
143
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
144
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0" }),
145
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "shape", result: "effect1_innerShadow_48_32" }),
146
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
147
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", {}),
148
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "1" }),
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
150
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.3 0" }),
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feBlend", { mode: "normal", in2: "effect1_innerShadow_48_32", result: "effect2_innerShadow_48_32" })
152
- ] }),
153
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint0_linear_48_32", x1: "32.0001", y1: "-5.96047e-08", x2: "32.0001", y2: "64", gradientUnits: "userSpaceOnUse", children: [
154
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { stopColor: "#3D3D3D" }),
155
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "0.496312" }),
156
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "0.723156", stopColor: "#803500" }),
157
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "0.95", stopColor: "#FF6A00" })
158
- ] }),
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "paint1_linear_48_32", x1: "32", y1: "16", x2: "32", y2: "48", gradientUnits: "userSpaceOnUse", children: [
160
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { stopColor: "white" }),
161
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "1", stopColor: "#EBEBEB" })
162
- ] })
163
- ] })
164
- ]
165
- })
166
- );
167
- };
168
-
169
117
  // src/assets/icons/arrow-narrow-up/index.tsx
170
- var import_jsx_runtime2 = require("react/jsx-runtime");
118
+ var import_jsx_runtime = require("react/jsx-runtime");
171
119
  var IconArrowNarrowUp = (_a) => {
172
120
  var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
173
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
121
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
174
122
  "svg",
175
123
  __spreadProps(__spreadValues({
176
124
  width: "20",
@@ -181,8 +129,8 @@ var IconArrowNarrowUp = (_a) => {
181
129
  className
182
130
  }, props), {
183
131
  children: [
184
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("title", { children: "Arrow Narrow up" }),
185
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
132
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "Arrow Narrow up" }),
133
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
186
134
  "path",
187
135
  {
188
136
  d: "M10 16.6666V3.33331M10 3.33331L5 8.33331M10 3.33331L15 8.33331",
@@ -198,10 +146,10 @@ var IconArrowNarrowUp = (_a) => {
198
146
  };
199
147
 
200
148
  // src/assets/icons/chevron-left/index.tsx
201
- var import_jsx_runtime3 = require("react/jsx-runtime");
149
+ var import_jsx_runtime2 = require("react/jsx-runtime");
202
150
  var IconChevronLeft = (_a) => {
203
151
  var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
204
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
152
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
205
153
  "svg",
206
154
  __spreadProps(__spreadValues({
207
155
  width: "20",
@@ -212,8 +160,8 @@ var IconChevronLeft = (_a) => {
212
160
  className
213
161
  }, props), {
214
162
  children: [
215
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("title", { children: "Chevron Left" }),
216
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
163
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("title", { children: "Chevron Left" }),
164
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
217
165
  "path",
218
166
  {
219
167
  d: "M12.5 15L7.5 10L12.5 5",
@@ -229,10 +177,10 @@ var IconChevronLeft = (_a) => {
229
177
  };
230
178
 
231
179
  // src/assets/icons/expand/index.tsx
232
- var import_jsx_runtime4 = require("react/jsx-runtime");
180
+ var import_jsx_runtime3 = require("react/jsx-runtime");
233
181
  var IconExpand = (_a) => {
234
182
  var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
235
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
183
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
236
184
  "svg",
237
185
  __spreadProps(__spreadValues({
238
186
  width: "20",
@@ -243,8 +191,8 @@ var IconExpand = (_a) => {
243
191
  className: cn("text-[#3D3D3D]", className)
244
192
  }, props), {
245
193
  children: [
246
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("title", { children: "Icon Expand" }),
247
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
194
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("title", { children: "Icon Expand" }),
195
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
248
196
  "path",
249
197
  {
250
198
  d: "M11.6667 8.33333L17.5 2.5M17.5 2.5H12.5M17.5 2.5V7.5M8.33333 11.6667L2.5 17.5M2.5 17.5H7.5M2.5 17.5L2.5 12.5",
@@ -260,10 +208,10 @@ var IconExpand = (_a) => {
260
208
  };
261
209
 
262
210
  // src/assets/icons/image-plus/index.tsx
263
- var import_jsx_runtime5 = require("react/jsx-runtime");
211
+ var import_jsx_runtime4 = require("react/jsx-runtime");
264
212
  var IconImagePlus = (_a) => {
265
213
  var _b = _a, { className = "text-[#FFF8EC]" } = _b, props = __objRest(_b, ["className"]);
266
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
214
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
267
215
  "svg",
268
216
  __spreadProps(__spreadValues({
269
217
  width: "20",
@@ -274,8 +222,8 @@ var IconImagePlus = (_a) => {
274
222
  className
275
223
  }, props), {
276
224
  children: [
277
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("title", { children: "Icon Image Plus" }),
278
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
225
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("title", { children: "Icon Image Plus" }),
226
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
279
227
  "path",
280
228
  {
281
229
  d: "M10.4167 2.50002H6.5C5.09987 2.50002 4.3998 2.50002 3.86502 2.7725C3.39462 3.01219 3.01217 3.39464 2.77248 3.86504C2.5 4.39982 2.5 5.09989 2.5 6.50002V13.5C2.5 14.9002 2.5 15.6002 2.77248 16.135C3.01217 16.6054 3.39462 16.9879 3.86502 17.2275C4.3998 17.5 5.09987 17.5 6.5 17.5H14.1667C14.9416 17.5 15.3291 17.5 15.647 17.4148C16.5098 17.1837 17.1836 16.5098 17.4148 15.6471C17.5 15.3292 17.5 14.9417 17.5 14.1667M15.8333 6.66669V1.66669M13.3333 4.16669H18.3333M8.75 7.08335C8.75 8.00383 8.00381 8.75002 7.08333 8.75002C6.16286 8.75002 5.41667 8.00383 5.41667 7.08335C5.41667 6.16288 6.16286 5.41669 7.08333 5.41669C8.00381 5.41669 8.75 6.16288 8.75 7.08335ZM12.4917 9.93181L5.44262 16.3401C5.04614 16.7005 4.84789 16.8807 4.83036 17.0368C4.81516 17.1722 4.86704 17.3064 4.96932 17.3963C5.08732 17.5 5.35523 17.5 5.89107 17.5H13.7133C14.9126 17.5 15.5123 17.5 15.9833 17.2985C16.5745 17.0456 17.0456 16.5746 17.2985 15.9833C17.5 15.5123 17.5 14.9126 17.5 13.7133C17.5 13.3098 17.5 13.108 17.4559 12.9201C17.4004 12.684 17.2941 12.4628 17.1444 12.272C17.0252 12.1202 16.8677 11.9941 16.5526 11.7421L14.2215 9.87724C13.9062 9.62494 13.7485 9.4988 13.5748 9.45428C13.4218 9.41504 13.2607 9.42012 13.1104 9.46893C12.94 9.5243 12.7905 9.66014 12.4917 9.93181Z",
@@ -291,10 +239,10 @@ var IconImagePlus = (_a) => {
291
239
  };
292
240
 
293
241
  // src/assets/icons/minimize/index.tsx
294
- var import_jsx_runtime6 = require("react/jsx-runtime");
242
+ var import_jsx_runtime5 = require("react/jsx-runtime");
295
243
  var IconMinimize = (_a) => {
296
244
  var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
297
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
245
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
298
246
  "svg",
299
247
  __spreadProps(__spreadValues({
300
248
  width: "20",
@@ -305,8 +253,8 @@ var IconMinimize = (_a) => {
305
253
  className: cn("text-[#3D3D3D]", className)
306
254
  }, props), {
307
255
  children: [
308
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("title", { children: "Icon Minimize" }),
309
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
256
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("title", { children: "Icon Minimize" }),
257
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
310
258
  "path",
311
259
  {
312
260
  d: "M3.33333 11.6667H8.33333M8.33333 11.6667V16.6667M8.33333 11.6667L2.5 17.5M16.6667 8.33333H11.6667M11.6667 8.33333V3.33333M11.6667 8.33333L17.5 2.5",
@@ -322,10 +270,10 @@ var IconMinimize = (_a) => {
322
270
  };
323
271
 
324
272
  // src/assets/icons/x-close/index.tsx
325
- var import_jsx_runtime7 = require("react/jsx-runtime");
273
+ var import_jsx_runtime6 = require("react/jsx-runtime");
326
274
  var IconXClose = (_a) => {
327
275
  var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
328
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
276
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
329
277
  "svg",
330
278
  __spreadProps(__spreadValues({
331
279
  width: "20",
@@ -336,8 +284,8 @@ var IconXClose = (_a) => {
336
284
  className: cn("text-[#3D3D3D]", className)
337
285
  }, props), {
338
286
  children: [
339
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("title", { children: "Icon XClose" }),
340
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
287
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("title", { children: "Icon XClose" }),
288
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
341
289
  "path",
342
290
  {
343
291
  d: "M15 5L5 15M5 5L15 15",
@@ -548,7 +496,7 @@ Detail
548
496
  ];
549
497
 
550
498
  // src/constant/default.ts
551
- var defaultQuickMenuMessage = "\u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E23\u0E31\u0E1A \u{1F44B} ZIMCRAFT \u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E04\u0E38\u0E13\u0E2B\u0E32\u0E2D\u0E38\u0E1B\u0E01\u0E23\u0E13\u0E4C IT \u0E17\u0E35\u0E48\u0E15\u0E2D\u0E1A\u0E42\u0E08\u0E17\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14 \u0E44\u0E21\u0E48\u0E27\u0E48\u0E32\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E2D\u0E21\u0E1E\u0E34\u0E27\u0E40\u0E15\u0E2D\u0E23\u0E4C \u0E2D\u0E38\u0E1B\u0E01\u0E23\u0E13\u0E4C\u0E40\u0E2A\u0E23\u0E34\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E2D\u0E30\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21 \u0E16\u0E32\u0E21\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22\u0E04\u0E23\u0E31\u0E1A \u{1F60A}";
499
+ var defaultQuickMenuMessage = "\u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E48\u0E30 \u0E22\u0E34\u0E19\u0E14\u0E35\u0E15\u0E49\u0E2D\u0E19\u0E23\u0E31\u0E1A\u0E2A\u0E39\u0E48 ZIMCRAFT \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E04\u0E38\u0E13\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E01\u0E1C\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E14\u0E35\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14 \u0E43\u0E2B\u0E49 AI \u0E0A\u0E48\u0E27\u0E22\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2B\u0E21\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E21\u0E32\u0E30\u0E01\u0E31\u0E1A\u0E2A\u0E23\u0E35\u0E23\u0E30\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E2B\u0E21\u0E04\u0E23\u0E31\u0E1A? \u0E43\u0E0A\u0E49\u0E40\u0E27\u0E25\u0E32\u0E41\u0E04\u0E48 1 \u0E19\u0E32\u0E17\u0E35";
552
500
  var defaultBanner = "https://utech-dev.zimpligital.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcoupon-banner-th.edad52fd.webp&w=640&q=75";
553
501
  var defaultQuickMenus = [
554
502
  { id: "1", title: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32 \u{1F6CD}\uFE0F", value: "\u0E2A\u0E31\u0E48\u0E07\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32", mockResponse: "QUICK_MENU_SHOP" /* QUICK_MENU_SHOP */ },
@@ -885,7 +833,7 @@ var useAizuChat = (client) => {
885
833
  };
886
834
 
887
835
  // src/contexts/aizu-client-context.tsx
888
- var import_jsx_runtime8 = require("react/jsx-runtime");
836
+ var import_jsx_runtime7 = require("react/jsx-runtime");
889
837
  var AizuClientContext = (0, import_react3.createContext)(
890
838
  void 0
891
839
  );
@@ -918,7 +866,7 @@ var AizuClientProvider = ({
918
866
  cancelRequest
919
867
  ]
920
868
  );
921
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AizuClientContext.Provider, { value, children });
869
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AizuClientContext.Provider, { value, children });
922
870
  };
923
871
  var useAizuClient = () => {
924
872
  const context = (0, import_react3.useContext)(AizuClientContext);
@@ -970,7 +918,7 @@ var useOpenChat = () => {
970
918
 
971
919
  // src/contexts/chat-context.tsx
972
920
  var import_react5 = require("react");
973
- var import_jsx_runtime9 = require("react/jsx-runtime");
921
+ var import_jsx_runtime8 = require("react/jsx-runtime");
974
922
  var ChatContext = (0, import_react5.createContext)(void 0);
975
923
  var ChatProvider = ({ children }) => {
976
924
  const [messages, setMessages] = (0, import_react5.useState)([]);
@@ -1012,7 +960,7 @@ var ChatProvider = ({ children }) => {
1012
960
  }),
1013
961
  [messages, userMessages, latestMessage, isLoading, chatControls, addUserMessage, addBotMessage, clearMessages]
1014
962
  );
1015
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ChatContext.Provider, { value, children });
963
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChatContext.Provider, { value, children });
1016
964
  };
1017
965
  var useChatContext = () => {
1018
966
  const context = (0, import_react5.useContext)(ChatContext);
@@ -1024,26 +972,6 @@ var useChatContext = () => {
1024
972
 
1025
973
  // src/sdk/client.ts
1026
974
  var AizuClient = class {
1027
- /**
1028
- * Creates a new AizuClient instance
1029
- *
1030
- * @param config - Configuration options for the client
1031
- * @param config.hostUrl - The base URL of the Aizu API (e.g., 'https://api.aizu.chat')
1032
- * @param config.apiKey - Your API key for authentication
1033
- * @param config.timeout - Request timeout in milliseconds (default: 30000)
1034
- *
1035
- * @throws {Error} If hostUrl is not a non-empty string
1036
- * @throws {Error} If apiKey is not a non-empty string
1037
- *
1038
- * @example
1039
- * ```typescript
1040
- * const client = new AizuClient({
1041
- * hostUrl: 'https://api.aizu.chat',
1042
- * apiKey: 'sk_test_123456',
1043
- * timeout: 60000 // 60 seconds
1044
- * });
1045
- * ```
1046
- */
1047
975
  constructor(config) {
1048
976
  const { hostUrl, apiKey, timeout } = config;
1049
977
  if (typeof hostUrl !== "string" || hostUrl.trim().length === 0) {
@@ -1060,26 +988,6 @@ var AizuClient = class {
1060
988
  this.apiKey = apiKey;
1061
989
  this.timeout = timeout != null ? timeout : 3e4;
1062
990
  }
1063
- /**
1064
- * Internal method for making HTTP requests to the API
1065
- *
1066
- * Handles timeout management, abort signal combination, and error handling.
1067
- * Supports both user-initiated cancellation and automatic timeout.
1068
- *
1069
- * @template T - The expected response type
1070
- * @template TBody - The request body type
1071
- *
1072
- * @param path - API endpoint path (e.g., '/chat/query')
1073
- * @param options - Request options including body and signal
1074
- *
1075
- * @returns Promise resolving to the API response
1076
- *
1077
- * @throws {Error} "Request cancelled by user" - If the request is cancelled via AbortSignal
1078
- * @throws {Error} "Request timeout: The server took too long to respond" - If the request exceeds the timeout
1079
- * @throws {Error} "API Error: {status} {statusText}" - If the API returns an error status
1080
- *
1081
- * @private
1082
- */
1083
991
  request(_0) {
1084
992
  return __async(this, arguments, function* (path, options = {}) {
1085
993
  const url = `${this.hostUrl}${path}`;
@@ -1150,64 +1058,6 @@ var AizuClient = class {
1150
1058
  }
1151
1059
  });
1152
1060
  }
1153
- /**
1154
- * Sends a chat query to the Aizu API
1155
- *
1156
- * @param params - Chat request parameters
1157
- * @param params.query - The user's message/question (required, non-empty)
1158
- * @param params.conversationId - Optional conversation ID to continue an existing conversation
1159
- * @param options - Additional options
1160
- * @param options.signal - Optional AbortSignal to cancel the request
1161
- *
1162
- * @returns Promise resolving to the chat response from the API
1163
- *
1164
- * @throws {Error} "Query is required" - If query is empty or whitespace only
1165
- * @throws {Error} "Request cancelled by user" - If the request is cancelled
1166
- * @throws {Error} "Request timeout: The server took too long to respond" - If the request times out
1167
- * @throws {Error} "API Error: {status} {statusText}" - If the API returns an error
1168
- *
1169
- * @example
1170
- * ```typescript
1171
- * // Simple query
1172
- * const response = await client.chat({
1173
- * query: 'What is the weather today?'
1174
- * });
1175
- * console.log(response.answer);
1176
- * ```
1177
- *
1178
- * @example
1179
- * ```typescript
1180
- * // Continue conversation
1181
- * const response1 = await client.chat({
1182
- * query: 'What is the weather today?'
1183
- * });
1184
- *
1185
- * const response2 = await client.chat({
1186
- * query: 'And tomorrow?',
1187
- * conversationId: response1.conversationId
1188
- * });
1189
- * ```
1190
- *
1191
- * @example
1192
- * ```typescript
1193
- * // With cancellation support
1194
- * const controller = new AbortController();
1195
- *
1196
- * const promise = client.chat(
1197
- * { query: 'Long running query...' },
1198
- * { signal: controller.signal }
1199
- * );
1200
- *
1201
- * // Cancel after 5 seconds
1202
- * setTimeout(() => controller.abort(), 5000);
1203
- *
1204
- * try {
1205
- * const response = await promise;
1206
- * } catch (error) {
1207
- * console.error('Request was cancelled:', error);
1208
- * }
1209
- * ```
1210
- */
1211
1061
  chat(params, options) {
1212
1062
  return __async(this, null, function* () {
1213
1063
  if (!params.query.trim()) {
@@ -1416,10 +1266,10 @@ var useKeyboard = ({ userMessages, isLoading, onSend }) => {
1416
1266
  };
1417
1267
 
1418
1268
  // src/components/input-bar/index.tsx
1419
- var import_jsx_runtime10 = require("react/jsx-runtime");
1269
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1420
1270
  var ButtonSelectImage = (_a) => {
1421
1271
  var _b = _a, { onClick, className } = _b, props = __objRest(_b, ["onClick", "className"]);
1422
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1272
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1423
1273
  "button",
1424
1274
  __spreadProps(__spreadValues({
1425
1275
  type: "button",
@@ -1430,13 +1280,13 @@ var ButtonSelectImage = (_a) => {
1430
1280
  ),
1431
1281
  "aria-label": "Upload image"
1432
1282
  }, props), {
1433
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconImagePlus, {})
1283
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconImagePlus, {})
1434
1284
  })
1435
1285
  );
1436
1286
  };
1437
1287
  var InputTextArea = (_a) => {
1438
1288
  var _b = _a, { onMagicClick, placeholder, className } = _b, props = __objRest(_b, ["onMagicClick", "placeholder", "className"]);
1439
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-1 relative", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1289
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1 relative", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1440
1290
  "textarea",
1441
1291
  __spreadValues({
1442
1292
  placeholder,
@@ -1447,7 +1297,7 @@ var InputTextArea = (_a) => {
1447
1297
  };
1448
1298
  var ButtonConfirm = (_a) => {
1449
1299
  var _b = _a, { className, disabled } = _b, props = __objRest(_b, ["className", "disabled"]);
1450
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1300
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1451
1301
  "button",
1452
1302
  __spreadProps(__spreadValues({
1453
1303
  type: "submit",
@@ -1462,7 +1312,7 @@ var ButtonConfirm = (_a) => {
1462
1312
  "aria-label": "Send message",
1463
1313
  disabled
1464
1314
  }, props), {
1465
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconArrowNarrowUp, { className: "text-black" })
1315
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconArrowNarrowUp, { className: "text-black" })
1466
1316
  })
1467
1317
  );
1468
1318
  };
@@ -1473,7 +1323,7 @@ var ButtonCancel = () => {
1473
1323
  cancelRequest();
1474
1324
  setIsLoading(false);
1475
1325
  };
1476
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1326
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1477
1327
  "button",
1478
1328
  {
1479
1329
  type: "button",
@@ -1484,7 +1334,7 @@ var ButtonCancel = () => {
1484
1334
  "flex items-center justify-center",
1485
1335
  "cursor-pointer"
1486
1336
  ),
1487
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "bg-black w-4 h-4" })
1337
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-black w-4 h-4" })
1488
1338
  }
1489
1339
  );
1490
1340
  };
@@ -1507,15 +1357,15 @@ var InputBar = (_a) => {
1507
1357
  "className"
1508
1358
  ]);
1509
1359
  const { value, textareaRef, handleChange, handleSubmit, handleKeyDown } = useKeyboard({ userMessages, isLoading, onSend });
1510
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("section", __spreadProps(__spreadValues({ className: cn("bg-white p-4", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("form", { onSubmit: handleSubmit, className: "flex items-end gap-3", children: [
1511
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1360
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("section", __spreadProps(__spreadValues({ className: cn("bg-white p-4", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("form", { onSubmit: handleSubmit, className: "flex items-end gap-3", children: [
1361
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1512
1362
  "label",
1513
1363
  {
1514
1364
  htmlFor: "chat-input-text",
1515
1365
  className: "flex items-end rounded-3xl bg-gray-100 flex-1 p-2 focus-within:ring-2 focus-within:ring-orange-300",
1516
1366
  children: [
1517
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ButtonSelectImage, { onClick: onImageClick, className: "mr-3" }),
1518
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1367
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ButtonSelectImage, { onClick: onImageClick, className: "mr-3" }),
1368
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1519
1369
  InputTextArea,
1520
1370
  {
1521
1371
  ref: textareaRef,
@@ -1530,7 +1380,7 @@ var InputBar = (_a) => {
1530
1380
  ]
1531
1381
  }
1532
1382
  ),
1533
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ButtonCancel, {}) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ButtonConfirm, { disabled: isLoading })
1383
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ButtonCancel, {}) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ButtonConfirm, { disabled: isLoading })
1534
1384
  ] }) }));
1535
1385
  };
1536
1386
  InputBar.ButtonSelectImage = ButtonSelectImage;
@@ -1538,24 +1388,24 @@ InputBar.InputTextArea = InputTextArea;
1538
1388
  InputBar.ButtonConfirm = ButtonConfirm;
1539
1389
 
1540
1390
  // src/components/loading.tsx
1541
- var import_jsx_runtime11 = require("react/jsx-runtime");
1391
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1542
1392
  var Loading = ({ message }) => {
1543
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("section", { className: cn("flex flex-col justify-center items-center border border-orange-400 shadow shadow-orange-400 h-10 max-w-69.5 rounded-3xl", { "h-16": !!message }), children: [
1544
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex justify-center items-center gap-x-1 ", children: [
1545
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-300" }),
1546
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-600" }),
1547
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-900" })
1393
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: cn("flex flex-col justify-center items-center border border-orange-400 shadow shadow-orange-400 h-10 max-w-69.5 rounded-3xl", { "h-16": !!message }), children: [
1394
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-center items-center gap-x-1 ", children: [
1395
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-300" }),
1396
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-600" }),
1397
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "w-2 h-2 rounded-full bg-orange-400 animate-circle-keys animation-delay-900" })
1548
1398
  ] }),
1549
- message && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-center text-[12px] text-gray-500 mt-1", children: message })
1399
+ message && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-center text-[12px] text-gray-500 mt-1", children: message })
1550
1400
  ] });
1551
1401
  };
1552
1402
 
1553
1403
  // src/components/button.tsx
1554
1404
  var import_react8 = require("react");
1555
- var import_jsx_runtime12 = require("react/jsx-runtime");
1405
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1556
1406
  var ButtonInner = (props, ref) => {
1557
1407
  const _a = props, { children, className, onClick } = _a, rest = __objRest(_a, ["children", "className", "onClick"]);
1558
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1408
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1559
1409
  "button",
1560
1410
  __spreadProps(__spreadValues({
1561
1411
  ref,
@@ -1577,33 +1427,33 @@ var Button = (0, import_react8.memo)((0, import_react8.forwardRef)(ButtonInner))
1577
1427
  Button.displayName = "Button";
1578
1428
 
1579
1429
  // src/components/container.tsx
1580
- var import_jsx_runtime13 = require("react/jsx-runtime");
1430
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1581
1431
  var Container = (_a) => {
1582
1432
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
1583
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn("p-3 rounded-3xl border border-orange-300", className), children });
1433
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: cn("p-3 rounded-3xl border border-orange-300", className), children });
1584
1434
  };
1585
1435
 
1586
1436
  // src/components/product-preview-card/index.tsx
1587
- var import_jsx_runtime14 = require("react/jsx-runtime");
1437
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1588
1438
  var ProductPreviewCard = ({ product, className }) => {
1589
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("bg-white overflow-hidden rounded-2xl h-full p-3 lg:hover:shadow", className), children: [
1590
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductThumbnail, __spreadValues({}, product)),
1591
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductSuggest, __spreadValues({}, product)),
1592
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductTitle, __spreadValues({}, product)),
1593
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductDescription, __spreadValues({}, product)),
1594
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductPrice, __spreadValues({}, product)),
1595
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductBadges, {}),
1596
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductMenus, __spreadValues({}, product))
1439
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("bg-white overflow-hidden rounded-2xl h-full p-3 lg:hover:shadow", className), children: [
1440
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProductThumbnail, __spreadValues({}, product)),
1441
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProductSuggest, __spreadValues({}, product)),
1442
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProductTitle, __spreadValues({}, product)),
1443
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProductDescription, __spreadValues({}, product)),
1444
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProductPrice, __spreadValues({}, product)),
1445
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProductBadges, {}),
1446
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProductMenus, __spreadValues({}, product))
1597
1447
  ] });
1598
1448
  };
1599
1449
  var ProductThumbnail = (product) => {
1600
1450
  if (!product.thumbnail) {
1601
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "border aspect-square flex justify-center items-center", children: "No Image" });
1451
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "border aspect-square flex justify-center items-center", children: "No Image" });
1602
1452
  }
1603
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-full aspect-square flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: product.thumbnail, alt: product.title, className: "w-full" }) });
1453
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-full aspect-square flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: product.thumbnail, alt: product.title, className: "w-full" }) });
1604
1454
  };
1605
1455
  var ProductSuggest = (product) => {
1606
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1456
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1607
1457
  "div",
1608
1458
  {
1609
1459
  className: "text-[10px] text-[#FF6B00] font-bold bg-[#FFF0D3] max-w-max rounded-sm px-2\n py-px mb-2",
@@ -1615,7 +1465,7 @@ var ProductSuggest = (product) => {
1615
1465
  );
1616
1466
  };
1617
1467
  var ProductTitle = (product) => {
1618
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1468
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1619
1469
  "div",
1620
1470
  {
1621
1471
  className: "font-semibold line-clamp-2 mb-2 min-h-12",
@@ -1624,7 +1474,7 @@ var ProductTitle = (product) => {
1624
1474
  );
1625
1475
  };
1626
1476
  var ProductDescription = (product) => {
1627
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1477
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1628
1478
  "div",
1629
1479
  {
1630
1480
  className: "text-sm text-[#525252] line-clamp-2 mb-3",
@@ -1633,7 +1483,7 @@ var ProductDescription = (product) => {
1633
1483
  );
1634
1484
  };
1635
1485
  var ProductPrice = (product) => {
1636
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1486
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1637
1487
  "div",
1638
1488
  {
1639
1489
  className: "text-lg text-red-500 font-semibold mb-3",
@@ -1650,7 +1500,7 @@ var ProductBadges = () => {
1650
1500
  { id: "badge2", text: "\u0E2A\u0E48\u0E07\u0E1F\u0E23\u0E35" },
1651
1501
  { id: "badge3", text: "Cashback 500" }
1652
1502
  ];
1653
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "flex flex-wrap gap-1 mb-6", children: badges == null ? void 0 : badges.map((badge) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: "text-[10px] text-[#656565] font-bold bg-gray-200 px-2 py-px rounded-sm", children: badge.text }, badge.id)) });
1503
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "flex flex-wrap gap-1 mb-6", children: badges == null ? void 0 : badges.map((badge) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { className: "text-[10px] text-[#656565] font-bold bg-gray-200 px-2 py-px rounded-sm", children: badge.text }, badge.id)) });
1654
1504
  };
1655
1505
  var ProductMenus = (product) => {
1656
1506
  const menus = [
@@ -1658,37 +1508,40 @@ var ProductMenus = (product) => {
1658
1508
  { id: "product-menu2", text: "\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E25\u0E07\u0E43\u0E19\u0E23\u0E16\u0E40\u0E02\u0E47\u0E19 \u{1F6D2} " },
1659
1509
  { id: "product-menu3", text: "\u0E2A\u0E2D\u0E1A\u0E16\u0E32\u0E21\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21 \u{1F4AC}" }
1660
1510
  ];
1661
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "flex flex-col gap-y-3", children: menus == null ? void 0 : menus.map((menu) => {
1511
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "flex flex-col gap-y-3", children: menus == null ? void 0 : menus.map((menu) => {
1662
1512
  if (menu.text.includes("\u0E09\u0E31\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32")) {
1663
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: `/products/${product.handle}`, target: "_blank", rel: "noreferrer", className: "border border-orange-300 rounded-3xl px-3 py-2 text-orange-500 text-sm text-center block", children: menu.text }) }, menu.id);
1513
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: `/products/${product.handle}`, target: "_blank", rel: "noreferrer", className: "border border-orange-300 rounded-3xl px-3 py-2 text-orange-500 text-sm text-center block", children: menu.text }) }, menu.id);
1664
1514
  }
1665
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { className: cn("text-nowrap w-full", { "bg-orange-500 text-white/80": menu.text.includes("\u0E09\u0E31\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32") }), children: menu.text }) }, menu.id);
1515
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { className: cn("text-nowrap w-full", { "bg-orange-500 text-white/80": menu.text.includes("\u0E09\u0E31\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E0B\u0E37\u0E49\u0E2D\u0E2A\u0E34\u0E19\u0E04\u0E49\u0E32") }), children: menu.text }) }, menu.id);
1666
1516
  }) });
1667
1517
  };
1668
1518
 
1519
+ // src/assets/images/zImple-solotion-logo.svg
1520
+ var zImple_solotion_logo_default = 'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 143 143">%0A <!-- Generator: Adobe Illustrator 30.1.0, SVG Export Plug-In . SVG Version: 2.1.1 Build 136) -->%0A <defs>%0A <style>%0A .st0 {%0A fill: %23ef001d;%0A }%0A%0A .st1 {%0A fill: url(%23linear-gradient1);%0A }%0A%0A .st2 {%0A fill: url(%23linear-gradient);%0A }%0A </style>%0A <linearGradient id="linear-gradient" x1="-142.5" y1="180.1" x2="-96.4" y2="180.1" gradientTransform="translate(253.5 -51.1) rotate(30)" gradientUnits="userSpaceOnUse">%0A <stop offset="0" stop-color="%23f0562f"/>%0A <stop offset="0" stop-color="%23ef542e"/>%0A <stop offset=".5" stop-color="%23ef2625"/>%0A <stop offset=".8" stop-color="%23ef0a1f"/>%0A <stop offset="1" stop-color="%23ef001d"/>%0A </linearGradient>%0A <linearGradient id="linear-gradient1" x1="-56.8" y1="214.2" x2="-113.8" y2="214.2" xlink:href="%23linear-gradient"/>%0A </defs>%0A <path class="st0" d="M112.2,91.2c0-2.4-1.3-4.5-3.3-5.7l-14.8-8.5-13.2,7.6,11.5,6.6-20.9,12.1-20.9-12.1,58.3-33.7c2-1.2,3.3-3.4,3.3-5.7,0-2.4-1.3-4.5-3.3-5.7l-34.1-19.7c-2-1.2-4.6-1.2-6.6,0l-34.1,19.7c-2,1.2-3.3,3.4-3.3,5.7s1.3,4.5,3.3,5.7l14.8,8.5,13.2-7.6h0s-11.5-6.6-11.5-6.6l20.9-12.1,20.9,12.1-58.3,33.7c-2,1.2-3.3,3.4-3.3,5.7,0,2.4,1.3,4.5,3.3,5.7l34.1,19.7c2,1.2,4.6,1.2,6.6,0l34.1-19.7c2-1.2,3.3-3.4,3.3-5.7Z"/>%0A <path class="st2" d="M108.9,46.1l-34.1-19.7c-2-1.2-4.6-1.2-6.6,0l-34.1,19.7c-2,1.2-3.3,3.4-3.3,5.7s1.3,4.5,3.3,5.7l14.8,8.5,13.2-7.6h0s-11.5-6.6-11.5-6.6l20.9-12.1,20.9,12.1"/>%0A <path class="st1" d="M34.1,96.9l34.1,19.7c2,1.2,4.6,1.2,6.6,0l34.1-19.7c2-1.2,3.3-3.4,3.3-5.7s-1.3-4.5-3.3-5.7l-14.8-8.5-13.2,7.6h0s11.5,6.6,11.5,6.6l-20.9,12.1-20.9-12.1"/>%0A</svg>';
1521
+
1669
1522
  // src/components/message/index.tsx
1670
- var import_jsx_runtime15 = require("react/jsx-runtime");
1523
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1671
1524
  var MessageBubble = ({ message, handleClick, focus }) => {
1672
1525
  if (message.type === "USER_TEXT" /* USER_TEXT */) {
1673
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MessageText, { message: message.text, role: "user" /* USER */ });
1526
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MessageText, { message: message.text, role: "user" /* USER */ });
1674
1527
  }
1675
1528
  if (message.type === "BOT_TEXT" /* BOT_TEXT */) {
1676
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BotMessageWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MessageText, { message: message.text, role: "bot" /* BOT */, focus }) });
1529
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BotMessageWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MessageText, { message: message.text, role: "bot" /* BOT */, focus }) });
1677
1530
  }
1678
1531
  if (message.type === "BOT_TEXT_WITH_MENUS" /* BOT_TEXT_WITH_MENUS */ || message.type === "BOT_QUICK_MENUS" /* BOT_QUICK_MENUS */ || message.type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */ || message.type === "BOT_TEXT_WITH_MENUS_COL" /* BOT_TEXT_WITH_MENUS_COL */) {
1679
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BotMessageWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1532
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BotMessageWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1680
1533
  MessageWithMenus,
1681
1534
  {
1682
1535
  type: message.type,
1683
1536
  message: message.text || "",
1684
- menus: message.menus || [],
1537
+ menus: [],
1685
1538
  handleClick,
1686
1539
  focus
1687
1540
  }
1688
1541
  ) });
1689
1542
  }
1690
1543
  if (message.type === "BOT_TEXT_WITH_PRODUCTS" /* BOT_TEXT_WITH_PRODUCTS */) {
1691
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BotMessageWrapper, { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1544
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BotMessageWrapper, { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1692
1545
  MessageWithProducts,
1693
1546
  {
1694
1547
  type: message.type,
@@ -1699,10 +1552,10 @@ var MessageBubble = ({ message, handleClick, focus }) => {
1699
1552
  }
1700
1553
  ) });
1701
1554
  }
1702
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BotMessageWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MessageText, { message: message.text, role: "bot" /* BOT */, focus }) });
1555
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BotMessageWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MessageText, { message: message.text, role: "bot" /* BOT */, focus }) });
1703
1556
  };
1704
1557
  var MessageText = ({ role, message, focus, className }) => {
1705
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1558
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1706
1559
  Container,
1707
1560
  {
1708
1561
  className: cn(
@@ -1719,7 +1572,7 @@ var MessageText = ({ role, message, focus, className }) => {
1719
1572
  );
1720
1573
  };
1721
1574
  var MessageWithMenus = ({ type, message, menus, className, handleClick, focus }) => {
1722
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1575
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1723
1576
  Container,
1724
1577
  {
1725
1578
  className: cn(
@@ -1731,10 +1584,10 @@ var MessageWithMenus = ({ type, message, menus, className, handleClick, focus })
1731
1584
  className
1732
1585
  ),
1733
1586
  children: [
1734
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm mb-4", children: message }),
1735
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: cn("flex flex-wrap gap-x-1 gap-y-3", { "flex-col": type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */ }), children: menus == null ? void 0 : menus.map((menu) => {
1587
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm mb-4", children: message }),
1588
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: cn("flex flex-wrap gap-x-1 gap-y-3", { "flex-col": type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */ }), children: menus == null ? void 0 : menus.map((menu) => {
1736
1589
  if (menu == null ? void 0 : menu.phoneNumber) {
1737
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { className: "w-full ", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1590
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: "w-full ", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1738
1591
  "a",
1739
1592
  {
1740
1593
  href: `tel:+${menu == null ? void 0 : menu.phoneNumber}`,
@@ -1744,9 +1597,9 @@ var MessageWithMenus = ({ type, message, menus, className, handleClick, focus })
1744
1597
  ) }, menu.id);
1745
1598
  }
1746
1599
  if (menu == null ? void 0 : menu.url) {
1747
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { className: "w-full min-w-max", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: menu.url, target: "_blank", rel: "noreferrer", className: "border border-orange-300 rounded-3xl px-4 py-2 text-orange-500 text-sm text-center block", children: menu.title }) }, menu.id);
1600
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: "w-full min-w-max", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: menu.url, target: "_blank", rel: "noreferrer", className: "border border-orange-300 rounded-3xl px-4 py-2 text-orange-500 text-sm text-center block", children: menu.title }) }, menu.id);
1748
1601
  }
1749
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { className: cn("min-w-max ", { "min-w-full": type === "BOT_TEXT_WITH_MENUS_COL" /* BOT_TEXT_WITH_MENUS_COL */ }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1602
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: cn("min-w-max ", { "min-w-full": type === "BOT_TEXT_WITH_MENUS_COL" /* BOT_TEXT_WITH_MENUS_COL */ }), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1750
1603
  Button,
1751
1604
  {
1752
1605
  className: cn({ "w-full": type === "BOT_ERROR_WITH_MENUS" /* BOT_ERROR_WITH_MENUS */ || type === "BOT_TEXT_WITH_MENUS_COL" /* BOT_TEXT_WITH_MENUS_COL */ }),
@@ -1763,13 +1616,13 @@ var MessageWithMenus = ({ type, message, menus, className, handleClick, focus })
1763
1616
  };
1764
1617
  var MessageWithProducts = ({ message, className, products, focus, handleClick }) => {
1765
1618
  const { chatControls } = useChatContext();
1766
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("w-full", className), children: [
1767
- message && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MessageText, { message, role: "bot" /* BOT */, className: "mb-4", focus }),
1768
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "pl-4", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1619
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("w-full", className), children: [
1620
+ message && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MessageText, { message, role: "bot" /* BOT */, className: "mb-4", focus }),
1621
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "pl-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1769
1622
  "ul",
1770
1623
  {
1771
1624
  className: "flex gap-3 lg:gap-x-2 overflow-x-auto scrollbar-hide -mx-4 snap-x snap-mandatory",
1772
- children: products == null ? void 0 : products.map((product) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1625
+ children: products == null ? void 0 : products.map((product) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1773
1626
  "li",
1774
1627
  {
1775
1628
  className: cn(
@@ -1784,7 +1637,7 @@ var MessageWithProducts = ({ message, className, products, focus, handleClick })
1784
1637
  "lg:w-[calc(100%/4.6)] lg:max-w-[calc(100%/4.6)]": chatControls.isExpanded
1785
1638
  }
1786
1639
  ),
1787
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ProductPreviewCard, { product })
1640
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ProductPreviewCard, { product })
1788
1641
  },
1789
1642
  product.product_id
1790
1643
  ))
@@ -1792,19 +1645,19 @@ var MessageWithProducts = ({ message, className, products, focus, handleClick })
1792
1645
  ) })
1793
1646
  ] });
1794
1647
  };
1795
- var BotMessageWrapper = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("flex flex-col items-start w-full", className), children: [
1796
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconAI, { className: "mb-2" }),
1648
+ var BotMessageWrapper = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("flex flex-col items-start w-full", className), children: [
1649
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { className: "w-8 h-8 mb-2", src: zImple_solotion_logo_default, alt: "Zimple Solution Logo" }),
1797
1650
  children
1798
1651
  ] });
1799
1652
 
1800
1653
  // src/components/quick-menus.tsx
1801
- var import_jsx_runtime16 = require("react/jsx-runtime");
1654
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1802
1655
  var QuickMenus = ({ bannerSrc, message = "welcome message", menus, handleClick }) => {
1803
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "w-75.5 bg-white shadow rounded-3xl overflow-hidden", children: [
1804
- bannerSrc ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: bannerSrc, alt: "banner" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-75.5 h-29.5 border-b border-gray-200" }),
1805
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "p-3 flex flex-col gap-y-3", children: [
1806
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm ", children: message }),
1807
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "flex gap-3 flex-wrap", children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { onClick: () => {
1656
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "w-75.5 bg-white shadow rounded-3xl overflow-hidden", children: [
1657
+ bannerSrc ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { src: bannerSrc, alt: "banner" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-75.5 h-29.5 border-b border-gray-200" }),
1658
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "p-3 flex flex-col gap-y-3", children: [
1659
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm ", children: message }),
1660
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "flex gap-3 flex-wrap", children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { onClick: () => {
1808
1661
  handleClick(menu);
1809
1662
  }, children: menu.title }) }, menu.id)) })
1810
1663
  ] })
@@ -1812,19 +1665,19 @@ var QuickMenus = ({ bannerSrc, message = "welcome message", menus, handleClick }
1812
1665
  };
1813
1666
 
1814
1667
  // src/components/quick-menus-chip.tsx
1815
- var import_jsx_runtime17 = require("react/jsx-runtime");
1668
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1816
1669
  var QuickMenuChips = ({ menus, handleClick, className }) => {
1817
1670
  const { chatControls } = useChatContext();
1818
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "relative", children: [
1819
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "absolute lg:hidden right-0 top-0 bottom-0 w-8 bg-linear-to-l from-white to-transparent pointer-events-none z-10" }),
1820
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: cn(
1671
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative", children: [
1672
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "absolute lg:hidden right-0 top-0 bottom-0 w-8 bg-linear-to-l from-white to-transparent pointer-events-none z-10" }),
1673
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: cn(
1821
1674
  "flex gap-3 overflow-x-scroll scrollbar-hide pr-10",
1822
1675
  {
1823
1676
  "lg:flex-wrap lg:max-h-28": !chatControls.isExpanded,
1824
1677
  "h-14": chatControls.isExpanded
1825
1678
  },
1826
1679
  className
1827
- ), children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1680
+ ), children: menus == null ? void 0 : menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1828
1681
  Button,
1829
1682
  {
1830
1683
  onClick: () => {
@@ -1839,21 +1692,21 @@ var QuickMenuChips = ({ menus, handleClick, className }) => {
1839
1692
  var quick_menus_chip_default = QuickMenuChips;
1840
1693
 
1841
1694
  // src/components/aizu-chat.tsx
1842
- var import_jsx_runtime18 = require("react/jsx-runtime");
1695
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1843
1696
  var LOADING_TIMEOUT = 15e3;
1844
1697
  var AizuChat = ({ aizuClient }) => {
1845
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AizuClientProvider, { client: aizuClient, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChatProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
1846
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FloatingButton, {}),
1847
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ChatWindow, { children: [
1848
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChatHeader, {}),
1849
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChatBody, {}),
1850
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChatFooter, {})
1698
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AizuClientProvider, { client: aizuClient, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChatProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
1699
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FloatingButton, {}),
1700
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(ChatWindow, { children: [
1701
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChatHeader, {}),
1702
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChatBody, {}),
1703
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChatFooter, {})
1851
1704
  ] })
1852
1705
  ] }) }) });
1853
1706
  };
1854
1707
  var FloatingButton = () => {
1855
1708
  const { chatControls } = useChatContext();
1856
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1709
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1857
1710
  "button",
1858
1711
  {
1859
1712
  type: "button",
@@ -1865,14 +1718,14 @@ var FloatingButton = () => {
1865
1718
  }
1866
1719
  ),
1867
1720
  "aria-label": "Toggle chat",
1868
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconAI, { className: "w-full h-full" })
1721
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: zImple_solotion_logo_default, alt: "Zimple Solution Logo" })
1869
1722
  }
1870
1723
  );
1871
1724
  };
1872
1725
  var ChatWindow = ({ children }) => {
1873
1726
  const { chatControls } = useChatContext();
1874
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
1875
- chatControls.isExpanded && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1727
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1728
+ chatControls.isExpanded && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1876
1729
  "div",
1877
1730
  {
1878
1731
  className: "fixed inset-0 bg-black/50 z-9998 transition-opacity duration-300",
@@ -1881,7 +1734,7 @@ var ChatWindow = ({ children }) => {
1881
1734
  "aria-hidden": "true"
1882
1735
  }
1883
1736
  ),
1884
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1737
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1885
1738
  "div",
1886
1739
  {
1887
1740
  className: cn(
@@ -1905,42 +1758,42 @@ var ChatWindow = ({ children }) => {
1905
1758
  };
1906
1759
  var ChatHeader = () => {
1907
1760
  const { chatControls } = useChatContext();
1908
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "flex justify-between items-center bg-white py-3 px-4", children: [
1909
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1761
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "flex justify-between items-center bg-white py-3 px-4", children: [
1762
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1910
1763
  "button",
1911
1764
  {
1912
1765
  type: "button",
1913
1766
  onClick: chatControls.closeChat,
1914
1767
  className: "text-sm text-left cursor-pointer flex flex-1 lg:invisible",
1915
1768
  children: [
1916
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconChevronLeft, {}),
1917
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A" })
1769
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconChevronLeft, {}),
1770
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A" })
1918
1771
  ]
1919
1772
  }
1920
1773
  ),
1921
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-center flex-1 ", children: [
1922
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-nowrap", children: "ZIMCRAFT STORE" }),
1923
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-[10px] text-[#7C7C7C]", children: "Powered by Zimpligital" })
1774
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col items-center flex-1 ", children: [
1775
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-nowrap", children: "ZIMCRAFT STORE" }),
1776
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-[10px] text-[#7C7C7C]", children: "Powered by Zimpligital" })
1924
1777
  ] }),
1925
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex-1 flex items-center justify-end gap-2 invisible lg:visible", children: [
1926
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1778
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex-1 flex items-center justify-end gap-2 invisible lg:visible", children: [
1779
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1927
1780
  "button",
1928
1781
  {
1929
1782
  type: "button",
1930
1783
  "aria-label": "Expand chat",
1931
1784
  onClick: chatControls.toggleExpand,
1932
1785
  className: "text-sm p-2.5 cursor-pointer",
1933
- children: chatControls.isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconMinimize, { className: "hover:text-orange-500" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconExpand, { className: "hover:text-orange-500" })
1786
+ children: chatControls.isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconMinimize, { className: "hover:text-orange-500" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconExpand, { className: "hover:text-orange-500" })
1934
1787
  }
1935
1788
  ),
1936
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1789
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1937
1790
  "button",
1938
1791
  {
1939
1792
  type: "button",
1940
1793
  "aria-label": "Close chat",
1941
1794
  onClick: chatControls.closeChat,
1942
1795
  className: "text-sm p-2.5 cursor-pointer",
1943
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconXClose, { className: "hover:text-orange-500" })
1796
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconXClose, { className: "hover:text-orange-500" })
1944
1797
  }
1945
1798
  )
1946
1799
  ] })
@@ -1979,10 +1832,10 @@ var ChatBody = () => {
1979
1832
  if (timer) clearTimeout(timer);
1980
1833
  };
1981
1834
  }, [isLoading]);
1982
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("section", { className: "flex-1 overflow-y-auto relative scrollbar-hide", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: " p-4 flex flex-col gap-y-3 overflow-y-auto min-h-full", children: [
1983
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
1984
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconAI, { className: "mb-2" }),
1985
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1835
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("section", { className: "flex-1 overflow-y-auto relative scrollbar-hide", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: " p-4 flex flex-col gap-y-3 overflow-y-auto min-h-full", children: [
1836
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
1837
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { className: "w-8 h-8 mb-2", src: zImple_solotion_logo_default, alt: "Zimple Solution Logo" }),
1838
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1986
1839
  QuickMenus,
1987
1840
  {
1988
1841
  bannerSrc: defaultBanner,
@@ -1993,14 +1846,14 @@ var ChatBody = () => {
1993
1846
  )
1994
1847
  ] }),
1995
1848
  messagesDisplay == null ? void 0 : messagesDisplay.map((message, index) => {
1996
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-full flex flex-col items-start", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MessageBubble, { message, handleClick: handleClickMenu, focus: messagesDisplay.length - 1 === index }) }, message.id);
1849
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w-full flex flex-col items-start", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MessageBubble, { message, handleClick: handleClickMenu, focus: messagesDisplay.length - 1 === index }) }, message.id);
1997
1850
  }),
1998
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
1999
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconAI, { className: "mb-2" }),
2000
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loading, { message: loadingMessage })
1851
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
1852
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { className: "w-8 h-8 mb-2", src: zImple_solotion_logo_default, alt: "Zimple Solution Logo" }),
1853
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Loading, { message: loadingMessage })
2001
1854
  ] }),
2002
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { ref: messagesEndRef }),
2003
- displayWelcomeMessage && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mt-auto text-center text-sm text-gray-500", children: "\u0E04\u0E38\u0E13\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E2A\u0E19\u0E17\u0E19\u0E32\u0E01\u0E31\u0E1A ZIMCRAFT AI" })
1855
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { ref: messagesEndRef }),
1856
+ displayWelcomeMessage && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "mt-auto text-center text-sm text-gray-500", children: "\u0E04\u0E38\u0E13\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E2A\u0E19\u0E17\u0E19\u0E32\u0E01\u0E31\u0E1A ZIMCRAFT AI" })
2004
1857
  ] }) });
2005
1858
  };
2006
1859
  var ChatFooter = () => {
@@ -2014,11 +1867,11 @@ var ChatFooter = () => {
2014
1867
  isLoading,
2015
1868
  setIsLoading
2016
1869
  });
2017
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: cn(
1870
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: cn(
2018
1871
  "bg-white min:h-42.5 lg:h-auto",
2019
1872
  { "lg:h-auto": chatControls.isExpanded }
2020
1873
  ), children: [
2021
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1874
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2022
1875
  quick_menus_chip_default,
2023
1876
  {
2024
1877
  handleClick: handleClickMenu,
@@ -2026,7 +1879,7 @@ var ChatFooter = () => {
2026
1879
  className: "pl-4 pt-4 pb-2"
2027
1880
  }
2028
1881
  ),
2029
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1882
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2030
1883
  InputBar,
2031
1884
  {
2032
1885
  placeholder: "\u0E16\u0E32\u0E21\u0E04\u0E33\u0E16\u0E32\u0E21\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22...",
@@ -2042,9 +1895,9 @@ var ChatFooter = () => {
2042
1895
 
2043
1896
  // src/components/test-component.tsx
2044
1897
  var import_react10 = require("react");
2045
- var import_jsx_runtime19 = require("react/jsx-runtime");
1898
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2046
1899
  var TestComponent = ({ client }) => {
2047
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AizuClientProvider, { client, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TestComponentContent, {}) });
1900
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AizuClientProvider, { client, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TestComponentContent, {}) });
2048
1901
  };
2049
1902
  var TestComponentContent = () => {
2050
1903
  const {
@@ -2087,10 +1940,10 @@ var TestComponentContent = () => {
2087
1940
  setResponse("\u26A0\uFE0F Request cancelled by user");
2088
1941
  console.log("\u{1F6D1} Request cancelled");
2089
1942
  };
2090
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "border-2 border-blue-500 p-4 rounded space-y-4", children: [
2091
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-between items-center", children: [
2092
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "font-bold text-xl", children: "Test API Call" }),
2093
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1943
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "border-2 border-blue-500 p-4 rounded space-y-4", children: [
1944
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between items-center", children: [
1945
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "font-bold text-xl", children: "Test API Call" }),
1946
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2094
1947
  "button",
2095
1948
  {
2096
1949
  type: "button",
@@ -2101,18 +1954,18 @@ var TestComponentContent = () => {
2101
1954
  }
2102
1955
  )
2103
1956
  ] }),
2104
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "text-sm space-y-1", children: [
2105
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: threadId ? "text-green-600" : "text-gray-400", children: [
1957
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "text-sm space-y-1", children: [
1958
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: threadId ? "text-green-600" : "text-gray-400", children: [
2106
1959
  "\u{1F517} Thread ID: ",
2107
1960
  threadId || "(waiting for first message)"
2108
1961
  ] }),
2109
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: resourceId ? "text-green-600" : "text-gray-400", children: [
1962
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: resourceId ? "text-green-600" : "text-gray-400", children: [
2110
1963
  "\u{1F4E6} Resource ID: ",
2111
1964
  resourceId || "(waiting for first message)"
2112
1965
  ] })
2113
1966
  ] }),
2114
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-2", children: [
2115
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1967
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-2", children: [
1968
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2116
1969
  "input",
2117
1970
  {
2118
1971
  type: "text",
@@ -2124,7 +1977,7 @@ var TestComponentContent = () => {
2124
1977
  disabled: loading
2125
1978
  }
2126
1979
  ),
2127
- loading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1980
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2128
1981
  "button",
2129
1982
  {
2130
1983
  type: "button",
@@ -2132,7 +1985,7 @@ var TestComponentContent = () => {
2132
1985
  className: "bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600 min-w-[100px]",
2133
1986
  children: "\u23F9 Cancel"
2134
1987
  }
2135
- ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1988
+ ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2136
1989
  "button",
2137
1990
  {
2138
1991
  type: "button",
@@ -2143,13 +1996,13 @@ var TestComponentContent = () => {
2143
1996
  }
2144
1997
  )
2145
1998
  ] }),
2146
- response && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "p-3 bg-gray-100 rounded", children: [
2147
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { className: "text-gray-700", children: "Response:" }),
2148
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 whitespace-pre-wrap text-gray-900", children: response })
1999
+ response && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "p-3 bg-gray-100 rounded", children: [
2000
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { className: "text-gray-700", children: "Response:" }),
2001
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 whitespace-pre-wrap text-gray-900", children: response })
2149
2002
  ] }),
2150
- !threadId && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "text-xs text-gray-500 border-t pt-2 mt-2", children: [
2003
+ !threadId && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "text-xs text-gray-500 border-t pt-2 mt-2", children: [
2151
2004
  "\u{1F4A1} ",
2152
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "Tip:" }),
2005
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "Tip:" }),
2153
2006
  " Send your first message to start a conversation. The thread ID will be saved and persist across page refreshes."
2154
2007
  ] })
2155
2008
  ] });