tybotflow-widget 0.2.6 → 0.2.8

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.es.js CHANGED
@@ -1582,7 +1582,7 @@ Error generating stack: ` + s.message + `
1582
1582
  );
1583
1583
  }
1584
1584
  function pe(r, i, s, c, g, b, T, k) {
1585
- r.name = "", T != null && typeof T != "function" && typeof T != "symbol" && typeof T != "boolean" ? r.type = T : r.removeAttribute("type"), i != null ? T === "number" ? (i === 0 && r.value === "" || r.value != i) && (r.value = "" + sn(i)) : r.value !== "" + sn(i) && (r.value = "" + sn(i)) : T !== "submit" && T !== "reset" || r.removeAttribute("value"), i != null ? Ce(r, T, sn(i)) : s != null ? Ce(r, T, sn(s)) : c != null && r.removeAttribute("value"), g == null && b != null && (r.defaultChecked = !!b), g != null && (r.checked = g && typeof g != "function" && typeof g != "symbol"), k != null && typeof k != "function" && typeof k != "symbol" && typeof k != "boolean" ? r.name = "" + sn(k) : r.removeAttribute("name");
1585
+ r.name = "", T != null && typeof T != "function" && typeof T != "symbol" && typeof T != "boolean" ? r.type = T : r.removeAttribute("type"), i != null ? T === "number" ? (i === 0 && r.value === "" || r.value != i) && (r.value = "" + sn(i)) : r.value !== "" + sn(i) && (r.value = "" + sn(i)) : T !== "submit" && T !== "reset" || r.removeAttribute("value"), i != null ? Ne(r, T, sn(i)) : s != null ? Ne(r, T, sn(s)) : c != null && r.removeAttribute("value"), g == null && b != null && (r.defaultChecked = !!b), g != null && (r.checked = g && typeof g != "function" && typeof g != "symbol"), k != null && typeof k != "function" && typeof k != "symbol" && typeof k != "boolean" ? r.name = "" + sn(k) : r.removeAttribute("name");
1586
1586
  }
1587
1587
  function Ae(r, i, s, c, g, b, T, k) {
1588
1588
  if (b != null && typeof b != "function" && typeof b != "symbol" && typeof b != "boolean" && (r.type = b), i != null || s != null) {
@@ -1592,7 +1592,7 @@ Error generating stack: ` + s.message + `
1592
1592
  }
1593
1593
  c = c ?? g, c = typeof c != "function" && typeof c != "symbol" && !!c, r.checked = k ? r.checked : !!c, r.defaultChecked = !!c, T != null && typeof T != "function" && typeof T != "symbol" && typeof T != "boolean" && (r.name = T);
1594
1594
  }
1595
- function Ce(r, i, s) {
1595
+ function Ne(r, i, s) {
1596
1596
  i === "number" && ni(r.ownerDocument) === r || r.defaultValue === "" + s || (r.defaultValue = "" + s);
1597
1597
  }
1598
1598
  function We(r, i, s, c) {
@@ -4204,72 +4204,72 @@ Error generating stack: ` + s.message + `
4204
4204
  return null;
4205
4205
  }
4206
4206
  function Oe(_, G, W, le) {
4207
- for (var ve = null, je = null, we = G, Ne = G = 0, qt = null; we !== null && Ne < W.length; Ne++) {
4208
- we.index > Ne ? (qt = we, we = null) : qt = we.sibling;
4207
+ for (var ve = null, je = null, we = G, Ce = G = 0, qt = null; we !== null && Ce < W.length; Ce++) {
4208
+ we.index > Ce ? (qt = we, we = null) : qt = we.sibling;
4209
4209
  var Je = Z(
4210
4210
  _,
4211
4211
  we,
4212
- W[Ne],
4212
+ W[Ce],
4213
4213
  le
4214
4214
  );
4215
4215
  if (Je === null) {
4216
4216
  we === null && (we = qt);
4217
4217
  break;
4218
4218
  }
4219
- r && we && Je.alternate === null && i(_, we), G = b(Je, G, Ne), je === null ? ve = Je : je.sibling = Je, je = Je, we = qt;
4219
+ r && we && Je.alternate === null && i(_, we), G = b(Je, G, Ce), je === null ? ve = Je : je.sibling = Je, je = Je, we = qt;
4220
4220
  }
4221
- if (Ne === W.length)
4222
- return s(_, we), $e && xa(_, Ne), ve;
4221
+ if (Ce === W.length)
4222
+ return s(_, we), $e && xa(_, Ce), ve;
4223
4223
  if (we === null) {
4224
- for (; Ne < W.length; Ne++)
4225
- we = ce(_, W[Ne], le), we !== null && (G = b(
4224
+ for (; Ce < W.length; Ce++)
4225
+ we = ce(_, W[Ce], le), we !== null && (G = b(
4226
4226
  we,
4227
4227
  G,
4228
- Ne
4228
+ Ce
4229
4229
  ), je === null ? ve = we : je.sibling = we, je = we);
4230
- return $e && xa(_, Ne), ve;
4230
+ return $e && xa(_, Ce), ve;
4231
4231
  }
4232
- for (we = c(we); Ne < W.length; Ne++)
4232
+ for (we = c(we); Ce < W.length; Ce++)
4233
4233
  qt = J(
4234
4234
  we,
4235
4235
  _,
4236
- Ne,
4237
- W[Ne],
4236
+ Ce,
4237
+ W[Ce],
4238
4238
  le
4239
4239
  ), qt !== null && (r && qt.alternate !== null && we.delete(
4240
- qt.key === null ? Ne : qt.key
4240
+ qt.key === null ? Ce : qt.key
4241
4241
  ), G = b(
4242
4242
  qt,
4243
4243
  G,
4244
- Ne
4244
+ Ce
4245
4245
  ), je === null ? ve = qt : je.sibling = qt, je = qt);
4246
4246
  return r && we.forEach(function(oa) {
4247
4247
  return i(_, oa);
4248
- }), $e && xa(_, Ne), ve;
4248
+ }), $e && xa(_, Ce), ve;
4249
4249
  }
4250
4250
  function xe(_, G, W, le) {
4251
4251
  if (W == null) throw Error(a(151));
4252
- for (var ve = null, je = null, we = G, Ne = G = 0, qt = null, Je = W.next(); we !== null && !Je.done; Ne++, Je = W.next()) {
4253
- we.index > Ne ? (qt = we, we = null) : qt = we.sibling;
4252
+ for (var ve = null, je = null, we = G, Ce = G = 0, qt = null, Je = W.next(); we !== null && !Je.done; Ce++, Je = W.next()) {
4253
+ we.index > Ce ? (qt = we, we = null) : qt = we.sibling;
4254
4254
  var oa = Z(_, we, Je.value, le);
4255
4255
  if (oa === null) {
4256
4256
  we === null && (we = qt);
4257
4257
  break;
4258
4258
  }
4259
- r && we && oa.alternate === null && i(_, we), G = b(oa, G, Ne), je === null ? ve = oa : je.sibling = oa, je = oa, we = qt;
4259
+ r && we && oa.alternate === null && i(_, we), G = b(oa, G, Ce), je === null ? ve = oa : je.sibling = oa, je = oa, we = qt;
4260
4260
  }
4261
4261
  if (Je.done)
4262
- return s(_, we), $e && xa(_, Ne), ve;
4262
+ return s(_, we), $e && xa(_, Ce), ve;
4263
4263
  if (we === null) {
4264
- for (; !Je.done; Ne++, Je = W.next())
4265
- Je = ce(_, Je.value, le), Je !== null && (G = b(Je, G, Ne), je === null ? ve = Je : je.sibling = Je, je = Je);
4266
- return $e && xa(_, Ne), ve;
4264
+ for (; !Je.done; Ce++, Je = W.next())
4265
+ Je = ce(_, Je.value, le), Je !== null && (G = b(Je, G, Ce), je === null ? ve = Je : je.sibling = Je, je = Je);
4266
+ return $e && xa(_, Ce), ve;
4267
4267
  }
4268
- for (we = c(we); !Je.done; Ne++, Je = W.next())
4269
- Je = J(we, _, Ne, Je.value, le), Je !== null && (r && Je.alternate !== null && we.delete(Je.key === null ? Ne : Je.key), G = b(Je, G, Ne), je === null ? ve = Je : je.sibling = Je, je = Je);
4268
+ for (we = c(we); !Je.done; Ce++, Je = W.next())
4269
+ Je = J(we, _, Ce, Je.value, le), Je !== null && (r && Je.alternate !== null && we.delete(Je.key === null ? Ce : Je.key), G = b(Je, G, Ce), je === null ? ve = Je : je.sibling = Je, je = Je);
4270
4270
  return r && we.forEach(function(QL) {
4271
4271
  return i(_, QL);
4272
- }), $e && xa(_, Ne), ve;
4272
+ }), $e && xa(_, Ce), ve;
4273
4273
  }
4274
4274
  function st(_, G, W, le) {
4275
4275
  if (typeof W == "object" && W !== null && W.type === v && W.key === null && (W = W.props.children), typeof W == "object" && W !== null) {
@@ -8220,7 +8220,7 @@ Error generating stack: ` + s.message + `
8220
8220
  );
8221
8221
  break e;
8222
8222
  }
8223
- je && je(r, Z, X), r === "focusout" && X && Z.type === "number" && X.memoizedProps.value != null && Ce(Z, "number", Z.value);
8223
+ je && je(r, Z, X), r === "focusout" && X && Z.type === "number" && X.memoizedProps.value != null && Ne(Z, "number", Z.value);
8224
8224
  }
8225
8225
  switch (je = X ? er(X) : window, r) {
8226
8226
  case "focusin":
@@ -8248,26 +8248,26 @@ Error generating stack: ` + s.message + `
8248
8248
  e: {
8249
8249
  switch (r) {
8250
8250
  case "compositionstart":
8251
- var Ne = "onCompositionStart";
8251
+ var Ce = "onCompositionStart";
8252
8252
  break e;
8253
8253
  case "compositionend":
8254
- Ne = "onCompositionEnd";
8254
+ Ce = "onCompositionEnd";
8255
8255
  break e;
8256
8256
  case "compositionupdate":
8257
- Ne = "onCompositionUpdate";
8257
+ Ce = "onCompositionUpdate";
8258
8258
  break e;
8259
8259
  }
8260
- Ne = void 0;
8260
+ Ce = void 0;
8261
8261
  }
8262
8262
  else
8263
- ii ? ZE(r, s) && (Ne = "onCompositionEnd") : r === "keydown" && s.keyCode === 229 && (Ne = "onCompositionStart");
8264
- Ne && (XE && s.locale !== "ko" && (ii || Ne !== "onCompositionStart" ? Ne === "onCompositionEnd" && ii && (we = GE()) : (zr = ie, ec = "value" in zr ? zr.value : zr.textContent, ii = !0)), je = Rl(X, Ne), 0 < je.length && (Ne = new YE(
8265
- Ne,
8263
+ ii ? ZE(r, s) && (Ce = "onCompositionEnd") : r === "keydown" && s.keyCode === 229 && (Ce = "onCompositionStart");
8264
+ Ce && (XE && s.locale !== "ko" && (ii || Ce !== "onCompositionStart" ? Ce === "onCompositionEnd" && ii && (we = GE()) : (zr = ie, ec = "value" in zr ? zr.value : zr.textContent, ii = !0)), je = Rl(X, Ce), 0 < je.length && (Ce = new YE(
8265
+ Ce,
8266
8266
  r,
8267
8267
  null,
8268
8268
  s,
8269
8269
  ie
8270
- ), ce.push({ event: Ne, listeners: je }), we ? Ne.data = we : (we = JE(s), we !== null && (Ne.data = we)))), (we = wD ? AD(r, s) : TD(r, s)) && (Ne = Rl(X, "onBeforeInput"), 0 < Ne.length && (je = new YE(
8270
+ ), ce.push({ event: Ce, listeners: je }), we ? Ce.data = we : (we = JE(s), we !== null && (Ce.data = we)))), (we = wD ? AD(r, s) : TD(r, s)) && (Ce = Rl(X, "onBeforeInput"), 0 < Ce.length && (je = new YE(
8271
8271
  "onBeforeInput",
8272
8272
  "beforeinput",
8273
8273
  null,
@@ -8275,7 +8275,7 @@ Error generating stack: ` + s.message + `
8275
8275
  ie
8276
8276
  ), ce.push({
8277
8277
  event: je,
8278
- listeners: Ne
8278
+ listeners: Ce
8279
8279
  }), je.data = we)), hL(
8280
8280
  ce,
8281
8281
  r,
@@ -48015,9 +48015,9 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48015
48015
  const h = u?.mainColor || "#59168b", m = u?.secondaryColor || "#6366f1", y = u?.thirdColor || "#0f172b", E = u?.headerFirstColor || "#6e11b0", v = u?.headerSecondColor || "#372aac", w = u?.inputBackgroundColor || "#1f2937", A = u?.inputTextColor || "#fff", R = u?.roundness || 24, C = u?.chatRoundness || 16, N = (u?.minPanelWidth || 434) > window.innerWidth ? window.innerWidth : u?.minPanelWidth || 434, F = (u?.maxPanelWidth || window.innerWidth) > window.innerWidth ? window.innerWidth : u?.maxPanelWidth || window.innerWidth, O = u?.chatMaxWidth || 88, x = u?.toggleBtnBorderTopLeftRadius || 12, M = u?.toggleBtnBorderTopRightRadius || 0, U = u?.toggleBtnBorderBottomLeftRadius || 12, z = u?.toggleBtnBorderBottomRightRadius || 0, B = u?.menuBackgroundColor || "#1f2937", H = u?.menuTextColor || "#e5e7eb", V = u?.menuHoverBackgroundColor || "#374151", Q = u?.agentChatResponseColor || "#e5e7eb", te = u?.agentChatResponseBgColor || "#1f2937", re = u?.agentIconBgColor || "#59168b", q = u?.agentIconColor || "#fff", K = u?.userChatMessagesColor || "#fff", Y = u?.userChatMessagesBgColor || "#7a1ebe", oe = u?.userIconBgColor || "#7a1ebe", S = u?.userIconColor || "#fff", j = u?.ButtonColor || "#fff", $ = u?.ButtonsBgColor || "#59168b", I = u?.fontSize || 13, se = u?.toggleBtnPosition || "bottom-right", de = (() => {
48016
48016
  const D = u?.firstMessageKeyword;
48017
48017
  if (Array.isArray(D)) {
48018
- const ue = window.location.origin, pe = D.find((Ce) => Ce.url && Ce.url.includes(ue));
48018
+ const ue = window.location.origin, pe = D.find((Ne) => Ne.url && Ne.url.includes(ue));
48019
48019
  if (pe) return pe.message;
48020
- const Ae = D.find((Ce) => !Ce.url || Ce.url === "");
48020
+ const Ae = D.find((Ne) => !Ne.url || Ne.url === "");
48021
48021
  return Ae ? Ae.message : D[0]?.message || "hi";
48022
48022
  }
48023
48023
  return D || "hi";
@@ -48028,8 +48028,8 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48028
48028
  const D = (pe) => {
48029
48029
  if (!Ke.current) return;
48030
48030
  const Ae = lt.current - pe.clientX;
48031
- let Ce = ht.current + Ae;
48032
- Ce = Math.max(N, Math.min(F, Ce)), Te(Ce);
48031
+ let Ne = ht.current + Ae;
48032
+ Ne = Math.max(N, Math.min(F, Ne)), Te(Ne);
48033
48033
  }, ue = () => {
48034
48034
  Ke.current && (Ke.current = !1, document.body.style.cursor = "");
48035
48035
  };
@@ -48078,11 +48078,11 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48078
48078
  if (!D || !(() => {
48079
48079
  if (!D.urls || D.urls.length === 0)
48080
48080
  return !0;
48081
- const Ae = window.location.origin, Ce = window.location.href;
48081
+ const Ae = window.location.origin, Ne = window.location.href;
48082
48082
  return D.urls.some((We) => {
48083
48083
  if (!We || We.trim() === "") return !0;
48084
48084
  try {
48085
- return Ae.includes(We) || Ce.includes(We) || We.includes(Ae);
48085
+ return Ae.includes(We) || Ne.includes(We) || We.includes(Ae);
48086
48086
  } catch {
48087
48087
  return console.warn("Invalid URL in widgetLoadBehavior:", We), !1;
48088
48088
  }
@@ -48096,8 +48096,8 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48096
48096
  }, D.value * 1e3);
48097
48097
  else if (D.behavior === "after scroll") {
48098
48098
  const Ae = () => {
48099
- const Ce = window.pageYOffset || document.documentElement.scrollTop, We = document.documentElement.scrollHeight - document.documentElement.clientHeight;
48100
- Ce / We * 100 >= D.value && (Me(!0), window.removeEventListener("scroll", Ae));
48099
+ const Ne = window.pageYOffset || document.documentElement.scrollTop, We = document.documentElement.scrollHeight - document.documentElement.clientHeight;
48100
+ Ne / We * 100 >= D.value && (Me(!0), window.removeEventListener("scroll", Ae));
48101
48101
  };
48102
48102
  return window.addEventListener("scroll", Ae), () => {
48103
48103
  window.removeEventListener("scroll", Ae);
@@ -48167,7 +48167,7 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48167
48167
  alert(`File ${Ae.name} is too large. Maximum size is 10MB.`);
48168
48168
  return;
48169
48169
  }
48170
- const Ce = {
48170
+ const Ne = {
48171
48171
  id: Date.now().toString() + Math.random().toString(36).substring(2, 9),
48172
48172
  file: Ae,
48173
48173
  type: Mr(Ae),
@@ -48175,7 +48175,7 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48175
48175
  name: Ae.name,
48176
48176
  size: Ae.size
48177
48177
  };
48178
- pe.push(Ce);
48178
+ pe.push(Ne);
48179
48179
  }), Ie((Ae) => [...Ae, ...pe]), ue && ue.current && (ue.current.value = "");
48180
48180
  }, []), ks = ge.useCallback(
48181
48181
  (D) => {
@@ -48208,24 +48208,24 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48208
48208
  attachments: [...Be],
48209
48209
  timestamp: /* @__PURE__ */ new Date()
48210
48210
  };
48211
- if (nt((Ce) => [...Ce, Ae]), Fe(""), Ie([]), ut(!0), e?.bot)
48211
+ if (nt((Ne) => [...Ne, Ae]), Fe(""), Ie([]), ut(!0), e?.bot)
48212
48212
  try {
48213
48213
  try {
48214
- const Ce = await va(D, e?.bot.botId, Be, ue || void 0);
48214
+ const Ne = await va(D, e?.bot.botId, Be, ue || void 0);
48215
48215
  nt((We) => [
48216
48216
  ...We,
48217
48217
  {
48218
48218
  id: Date.now().toString() + Math.random().toString(36).substring(2, 9),
48219
48219
  sender: "agent",
48220
- content: Ce,
48220
+ content: Ne,
48221
48221
  timestamp: /* @__PURE__ */ new Date(),
48222
48222
  seen: an.current,
48223
- nMessage: typeof Ce == "string" ? 1 : Ce.length
48223
+ nMessage: typeof Ne == "string" ? 1 : Ne.length
48224
48224
  }
48225
48225
  ]);
48226
48226
  } catch {
48227
- nt((Ce) => [
48228
- ...Ce,
48227
+ nt((Ne) => [
48228
+ ...Ne,
48229
48229
  {
48230
48230
  id: Date.now().toString() + Math.random().toString(36).substring(2, 9),
48231
48231
  sender: "agent",
@@ -48236,12 +48236,12 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48236
48236
  }
48237
48237
  ]);
48238
48238
  }
48239
- } catch (Ce) {
48240
- console.error("Error parsing selectedBotInfo:", Ce);
48239
+ } catch (Ne) {
48240
+ console.error("Error parsing selectedBotInfo:", Ne);
48241
48241
  }
48242
48242
  else
48243
- nt((Ce) => [
48244
- ...Ce,
48243
+ nt((Ne) => [
48244
+ ...Ne,
48245
48245
  {
48246
48246
  id: Date.now().toString() + Math.random().toString(36).substring(2, 9),
48247
48247
  sender: "agent",
@@ -48387,7 +48387,7 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48387
48387
  p: ({ children: D }) => {
48388
48388
  let ue;
48389
48389
  return typeof D == "string" && Br(D) || typeof D == "object" && !Array.isArray(D) && D?.props?.children && Kt(D?.props?.children) || typeof D == "object" && Array.isArray(D) && D.some((pe) => Br(pe)) ? ue = "rtl" : ue = "ltr", /* @__PURE__ */ L.jsx("div", { className: "leading-relaxed", dir: typeof D == "string" || !Array.isArray(D) ? ue : "", children: Array.isArray(D) ? D.map(
48390
- (pe, Ae) => typeof pe == "string" && !new RegExp("^(?:\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F|\\s)+$", "u").test(pe) ? /* @__PURE__ */ L.jsx("span", { dir: Br(pe) ? "rtl" : "ltr", children: /* @__PURE__ */ L.jsx(
48390
+ (pe, Ae) => typeof pe == "string" && !new RegExp("^(?:\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F|\\s)+$", "u").test(pe) ? /* @__PURE__ */ L.jsx("p", { dir: Br(pe) ? "rtl" : "ltr", children: /* @__PURE__ */ L.jsx(
48391
48391
  jt,
48392
48392
  {
48393
48393
  sequence: [
@@ -48464,8 +48464,8 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48464
48464
  }
48465
48465
  ) : D }),
48466
48466
  code({ node: D, className: ue, children: pe, ...Ae }) {
48467
- const Ce = /language-(\w+)/.exec(ue || "");
48468
- return Ce ? /* @__PURE__ */ L.jsx(GI, { ...Ae, PreTag: "div", children: String(pe).replace(/\n$/, ""), language: Ce[1], style: fW, customStyle: { scrollbarWidth: "thin" } }) : /* @__PURE__ */ L.jsx("code", { className: "px-1 rounded font-mono inline", style: { backgroundColor: w, color: Q }, ...Ae, children: typeof pe == "string" ? /* @__PURE__ */ L.jsx(
48467
+ const Ne = /language-(\w+)/.exec(ue || "");
48468
+ return Ne ? /* @__PURE__ */ L.jsx(GI, { ...Ae, PreTag: "div", children: String(pe).replace(/\n$/, ""), language: Ne[1], style: fW, customStyle: { scrollbarWidth: "thin" } }) : /* @__PURE__ */ L.jsx("code", { className: "px-1 rounded font-mono inline", style: { backgroundColor: w, color: Q }, ...Ae, children: typeof pe == "string" ? /* @__PURE__ */ L.jsx(
48469
48469
  jt,
48470
48470
  {
48471
48471
  sequence: [
@@ -48639,26 +48639,26 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48639
48639
  pe.image && /* @__PURE__ */ L.jsx("img", { src: pe.image, alt: pe.title, className: "h-32 w-full object-cover rounded-md mb-2" }),
48640
48640
  /* @__PURE__ */ L.jsx("h3", { className: "text-sm font-bold", title: pe.title, children: pe.title }),
48641
48641
  /* @__PURE__ */ L.jsx("p", { className: "text-xs text-gray-300 mb-2 line-clamp-2", title: pe.subtitle, children: pe.subtitle }),
48642
- pe.actions?.map((Ce, We) => {
48643
- const ln = typeof Ce.payload == "string" ? Ce.payload : JSON.stringify(Ce.payload), Gn = typeof Ce.payload == "string" ? Ce.payload : D.title;
48642
+ pe.actions?.map((Ne, We) => {
48643
+ const ln = typeof Ne.payload == "string" ? Ne.payload : JSON.stringify(Ne.payload), Gn = Ne.title;
48644
48644
  return /* @__PURE__ */ L.jsx(
48645
48645
  "button",
48646
48646
  {
48647
48647
  className: "mb-1 mr-1 px-4 py-1 hover:scale-105 transition-all duration-100",
48648
48648
  onClick: () => {
48649
- Ce.action === "Open URL" ? window.open(Ce.url, "_blank") : Ce.title === "scan" ? fetch(pe.image).then((nr) => nr.blob()).then((nr) => {
48649
+ Ne.action === "Open URL" ? window.open(Ne.url, "_blank") : Ne.title === "scan" ? fetch(pe.image).then((nr) => nr.blob()).then((nr) => {
48650
48650
  const Ls = URL.createObjectURL(nr), Pr = document.createElement("a");
48651
48651
  Pr.href = Ls, Pr.download = "qrcode.png", document.body.appendChild(Pr), Pr.click(), document.body.removeChild(Pr), URL.revokeObjectURL(Ls);
48652
48652
  }).catch(() => {
48653
48653
  alert("Failed to download image.");
48654
- }) : (Ce.action, tr(Gn, ln));
48654
+ }) : (Ne.action, tr(Gn, ln));
48655
48655
  },
48656
48656
  style: {
48657
48657
  background: $,
48658
48658
  borderRadius: `${C}px`,
48659
48659
  color: j
48660
48660
  },
48661
- children: Ce.title
48661
+ children: Ne.title
48662
48662
  },
48663
48663
  We
48664
48664
  );
@@ -48672,11 +48672,11 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48672
48672
  D.image && /* @__PURE__ */ L.jsx("img", { src: D.image, alt: D.title, className: "h-32 w-full object-cover rounded-md mb-2" }),
48673
48673
  /* @__PURE__ */ L.jsx("h3", { className: "font-bold", children: D.title }),
48674
48674
  D.actions?.map((pe, Ae) => {
48675
- let Ce;
48675
+ let Ne;
48676
48676
  try {
48677
- Ce = typeof pe.payload == "string" ? JSON.parse(pe.payload) : pe.payload;
48677
+ Ne = typeof pe.payload == "string" ? JSON.parse(pe.payload) : pe.payload;
48678
48678
  } catch {
48679
- Ce = { productName: D.title };
48679
+ Ne = { productName: D.title };
48680
48680
  }
48681
48681
  return /* @__PURE__ */ L.jsx(
48682
48682
  "button",
@@ -48688,7 +48688,7 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48688
48688
  Gn.href = ln, Gn.download = "qrcode.png", document.body.appendChild(Gn), Gn.click(), document.body.removeChild(Gn), URL.revokeObjectURL(ln);
48689
48689
  }).catch(() => {
48690
48690
  alert("Failed to download image.");
48691
- }) : tr(Ce.productName || D.title);
48691
+ }) : tr(Ne.productName || D.title);
48692
48692
  },
48693
48693
  style: {
48694
48694
  background: $,
@@ -48755,6 +48755,10 @@ const Y1 = "https://api.tybotflow.com/api/v1", W1 = "https://api.tybotflow.com/a
48755
48755
  }, ti = `linear-gradient(to bottom right, ${y}, ${h}, ${y})`, Ji = `linear-gradient(to right, ${h}, ${m})`, ni = `linear-gradient(to right, ${E}, ${v})`;
48756
48756
  return f || !u ? null : /* @__PURE__ */ L.jsxs(L.Fragment, { children: [
48757
48757
  /* @__PURE__ */ L.jsx("style", { children: `
48758
+ #message-input::placeholder {
48759
+ color: ${A}
48760
+ }
48761
+
48758
48762
  @keyframes slideInFromRight {
48759
48763
  from {
48760
48764
  transform: translateX(100%);