padorixnpm 0.0.69 → 0.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
- import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, f, g as p, h as m, i as h, j as g, k as _, l as v, m as y, s as b, u as x, v as ee, w as S, x as C, y as w } from "./widget-api-2bTO9wMA.js";
2
- import T, { i as E, n as te, r as D, t as ne } from "./notification-ChYfFRqp.js";
1
+ import { A as e, C as t, D as n, E as r, M as i, O as a, S as o, T as s, _ as c, a as l, b as u, f as d, g as f, h as p, i as m, j as h, k as g, l as _, m as v, s as y, u as b, v as x, w as S, x as C, y as w } from "./widget-api-BfWB6m6w.js";
2
+ import T, { i as E, n as ee, r as D, t as te } from "./notification-ChYfFRqp.js";
3
3
  import { useDispatch as O, useSelector as k } from "react-redux";
4
4
  import A, { createElement as j, forwardRef as M, useState as N } from "react";
5
- import { Add as P, ArrowDown2 as F, ArrowForward as re, ArrowLeft2 as ie, Copy as ae, DocumentDownload as oe, EmojiHappy as se, Global as I, Minus as ce, Send as L, Star1 as le, Trash as ue } from "iconsax-reactjs";
6
- import { Fade as R, JackInTheBox as de, Slide as fe } from "react-awesome-reveal";
7
- import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
8
- import { MantineProvider as H, Modal as U, Popover as W } from "@mantine/core";
9
- import G from "dayjs";
10
- import { useDisclosure as pe } from "@mantine/hooks";
11
- import { useForm as K } from "@mantine/form";
5
+ import { Add as P, ArrowDown2 as F, ArrowForward as I, ArrowLeft2 as ne, Copy as re, DocumentDownload as ie, EmojiHappy as ae, Global as oe, Minus as L, Send as se, Star1 as R, Trash as ce } from "iconsax-reactjs";
6
+ import { Fade as z, JackInTheBox as le, Slide as ue } from "react-awesome-reveal";
7
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
8
+ import { MantineProvider as U, Modal as W, Popover as G } from "@mantine/core";
9
+ import K from "dayjs";
10
+ import { useDisclosure as de } from "@mantine/hooks";
11
+ import { useForm as fe } from "@mantine/form";
12
12
  //#region lib/chats/chatform/chat-text-input.tsx
13
- var q = 120, me = 2500, he = 1500, ge = M(({ setMessage: e, message: t, userType: n, onImagePasted: r, onSubmit: i, ...a }, o) => {
13
+ var pe = 120, q = 2500, J = 1500, me = M(({ setMessage: e, message: t, userType: n, onImagePasted: r, onSubmit: i, ...a }, o) => {
14
14
  let { sender: s } = k((e) => e.data), c = A.useRef(null), l = A.useRef(0), u = A.useRef(!1);
15
15
  A.useImperativeHandle(o, () => c.current), A.useLayoutEffect(() => {
16
16
  let e = c.current;
17
- e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, q)}px`, e.style.overflowY = e.scrollHeight > q ? "auto" : "hidden");
17
+ e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, pe)}px`, e.style.overflowY = e.scrollHeight > pe ? "auto" : "hidden");
18
18
  }, [t]);
19
19
  let d = (e) => {
20
20
  let t = e.clipboardData?.items;
@@ -43,8 +43,8 @@ var q = 120, me = 2500, he = 1500, ge = M(({ setMessage: e, message: t, userType
43
43
  return;
44
44
  }
45
45
  let i = Date.now();
46
- i - l.current > me && (l.current = i, u.current = !0, E.emit(D.is_typing, r));
47
- let a = window.setTimeout(() => p(r), he);
46
+ i - l.current > q && (l.current = i, u.current = !0, E.emit(D.is_typing, r));
47
+ let a = window.setTimeout(() => p(r), J);
48
48
  return () => {
49
49
  window.clearTimeout(a);
50
50
  };
@@ -78,9 +78,9 @@ var q = 120, me = 2500, he = 1500, ge = M(({ setMessage: e, message: t, userType
78
78
  userType: n
79
79
  });
80
80
  };
81
- return /* @__PURE__ */ B("div", {
81
+ return /* @__PURE__ */ V("div", {
82
82
  className: "padorix:w-full padorix:bg-slate-100 padorix:rounded-lg",
83
- children: /* @__PURE__ */ B("textarea", {
83
+ children: /* @__PURE__ */ V("textarea", {
84
84
  ref: c,
85
85
  ...a,
86
86
  spellCheck: !0,
@@ -97,27 +97,27 @@ var q = 120, me = 2500, he = 1500, ge = M(({ setMessage: e, message: t, userType
97
97
  rows: 1
98
98
  })
99
99
  });
100
- }), _e = {
100
+ }), he = {
101
101
  color: void 0,
102
102
  size: void 0,
103
103
  className: void 0,
104
104
  style: void 0,
105
105
  attr: void 0
106
- }, J = A.createContext && /*#__PURE__*/ A.createContext(_e), ve = [
106
+ }, ge = A.createContext && /*#__PURE__*/ A.createContext(he), _e = [
107
107
  "attr",
108
108
  "size",
109
109
  "title"
110
110
  ];
111
- function ye(e, t) {
111
+ function ve(e, t) {
112
112
  if (e == null) return {};
113
- var n, r, i = be(e, t);
113
+ var n, r, i = ye(e, t);
114
114
  if (Object.getOwnPropertySymbols) {
115
115
  var a = Object.getOwnPropertySymbols(e);
116
116
  for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
117
117
  }
118
118
  return i;
119
119
  }
120
- function be(e, t) {
120
+ function ye(e, t) {
121
121
  if (e == null) return {};
122
122
  var n = {};
123
123
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -135,7 +135,7 @@ function Y() {
135
135
  return e;
136
136
  }, Y.apply(null, arguments);
137
137
  }
138
- function xe(e, t) {
138
+ function be(e, t) {
139
139
  var n = Object.keys(e);
140
140
  if (Object.getOwnPropertySymbols) {
141
141
  var r = Object.getOwnPropertySymbols(e);
@@ -148,27 +148,27 @@ function xe(e, t) {
148
148
  function X(e) {
149
149
  for (var t = 1; t < arguments.length; t++) {
150
150
  var n = arguments[t] == null ? {} : arguments[t];
151
- t % 2 ? xe(Object(n), !0).forEach(function(t) {
152
- Se(e, t, n[t]);
153
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xe(Object(n)).forEach(function(t) {
151
+ t % 2 ? be(Object(n), !0).forEach(function(t) {
152
+ xe(e, t, n[t]);
153
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : be(Object(n)).forEach(function(t) {
154
154
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
155
155
  });
156
156
  }
157
157
  return e;
158
158
  }
159
- function Se(e, t, n) {
160
- return (t = Ce(t)) in e ? Object.defineProperty(e, t, {
159
+ function xe(e, t, n) {
160
+ return (t = Se(t)) in e ? Object.defineProperty(e, t, {
161
161
  value: n,
162
162
  enumerable: !0,
163
163
  configurable: !0,
164
164
  writable: !0
165
165
  }) : e[t] = n, e;
166
166
  }
167
- function Ce(e) {
168
- var t = we(e, "string");
167
+ function Se(e) {
168
+ var t = Ce(e, "string");
169
169
  return typeof t == "symbol" ? t : t + "";
170
170
  }
171
- function we(e, t) {
171
+ function Ce(e, t) {
172
172
  if (typeof e != "object" || !e) return e;
173
173
  var n = e[Symbol.toPrimitive];
174
174
  if (n !== void 0) {
@@ -178,15 +178,15 @@ function we(e, t) {
178
178
  }
179
179
  return (t === "string" ? String : Number)(e);
180
180
  }
181
- function Te(e) {
182
- return e && e.map((e, t) => /*#__PURE__*/ A.createElement(e.tag, X({ key: t }, e.attr), Te(e.child)));
181
+ function we(e) {
182
+ return e && e.map((e, t) => /*#__PURE__*/ A.createElement(e.tag, X({ key: t }, e.attr), we(e.child)));
183
183
  }
184
184
  function Z(e) {
185
- return (t) => /*#__PURE__*/ A.createElement(Ee, Y({ attr: X({}, e.attr) }, t), Te(e.child));
185
+ return (t) => /*#__PURE__*/ A.createElement(Te, Y({ attr: X({}, e.attr) }, t), we(e.child));
186
186
  }
187
- function Ee(e) {
187
+ function Te(e) {
188
188
  var t = (t) => {
189
- var { attr: n, size: r, title: i } = e, a = ye(e, ve), o = r || t.size || "1em", s;
189
+ var { attr: n, size: r, title: i } = e, a = ve(e, _e), o = r || t.size || "1em", s;
190
190
  return t.className && (s = t.className), e.className && (s = (s ? s + " " : "") + e.className), /*#__PURE__*/ A.createElement("svg", Y({
191
191
  stroke: "currentColor",
192
192
  fill: "currentColor",
@@ -199,7 +199,7 @@ function Ee(e) {
199
199
  xmlns: "http://www.w3.org/2000/svg"
200
200
  }), i && /*#__PURE__*/ A.createElement("title", null, i), e.children);
201
201
  };
202
- return J === void 0 ? t(_e) : /*#__PURE__*/ A.createElement(J.Consumer, null, (e) => t(e));
202
+ return ge === void 0 ? t(he) : /*#__PURE__*/ A.createElement(ge.Consumer, null, (e) => t(e));
203
203
  }
204
204
  //#endregion
205
205
  //#region node_modules/react-icons/fi/index.mjs
@@ -235,7 +235,7 @@ function Q(e) {
235
235
  }]
236
236
  })(e);
237
237
  }
238
- function De(e) {
238
+ function Ee(e) {
239
239
  return Z({
240
240
  tag: "svg",
241
241
  attr: {
@@ -258,7 +258,7 @@ function De(e) {
258
258
  }]
259
259
  })(e);
260
260
  }
261
- function Oe(e) {
261
+ function De(e) {
262
262
  return Z({
263
263
  tag: "svg",
264
264
  attr: {
@@ -293,7 +293,7 @@ function Oe(e) {
293
293
  ]
294
294
  })(e);
295
295
  }
296
- function ke(e) {
296
+ function Oe(e) {
297
297
  return Z({
298
298
  tag: "svg",
299
299
  attr: {
@@ -311,7 +311,7 @@ function ke(e) {
311
311
  }]
312
312
  })(e);
313
313
  }
314
- function Ae(e) {
314
+ function ke(e) {
315
315
  return Z({
316
316
  tag: "svg",
317
317
  attr: {
@@ -331,63 +331,182 @@ function Ae(e) {
331
331
  }
332
332
  //#endregion
333
333
  //#region lib/chats/chatmessages/chat-display-reply.tsx
334
- function je(t) {
335
- let n = O(), i = Array.isArray(t.data?.message) ? t.data.message.join(" ") : String(t.data?.message ?? "");
336
- function a() {
337
- n(r(void 0)), n(e(void 0));
334
+ function Ae(e) {
335
+ let t = O(), n = Array.isArray(e.data?.message) ? e.data.message.join(" ") : String(e.data?.message ?? "");
336
+ function r() {
337
+ t(s(void 0)), t(g(void 0));
338
338
  }
339
- if (t.data?.id) return /* @__PURE__ */ B("div", {
340
- className: t.styles.replyContainer,
341
- children: /* @__PURE__ */ B("div", {
339
+ if (e.data?.id) return /* @__PURE__ */ V("div", {
340
+ className: e.styles.replyContainer,
341
+ children: /* @__PURE__ */ V("div", {
342
342
  className: "padorix-fade-in padorix:bg-white padorix:w-[96%] padorix:mx-auto padorix:py-0.5",
343
- children: /* @__PURE__ */ B("div", { children: /* @__PURE__ */ B("div", {
343
+ children: /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V("div", {
344
344
  className: "padorix:px-2",
345
- children: /* @__PURE__ */ V("div", {
345
+ children: /* @__PURE__ */ H("div", {
346
346
  className: "padorix:bg-white padorix:rounded-tl-lg padorix:rounded-tr-lg padorix:border-t padorix:border-x padorix:border-gray-200 padorix:shadow-inner padorix:text-zinc-600 padorix:px-4 padorix:flex padorix:items-center padorix:justify-between",
347
- children: [/* @__PURE__ */ V("div", {
347
+ children: [/* @__PURE__ */ H("div", {
348
348
  className: "padorix:flex padorix:items-center padorix:py-2.5 padorix:text-sm",
349
- children: [/* @__PURE__ */ B(re, { className: "padorix:inline padorix:size-6 padorix:mr-3" }), i.length > 0 && /* @__PURE__ */ V("span", { children: [i.slice(0, 30), i.length > 30 ? "..." : ""] })]
350
- }), /* @__PURE__ */ V("div", {
349
+ children: [/* @__PURE__ */ V(I, { className: "padorix:inline padorix:size-6 padorix:mr-3" }), n.length > 0 && /* @__PURE__ */ H("span", { children: [n.slice(0, 30), n.length > 30 ? "..." : ""] })]
350
+ }), /* @__PURE__ */ H("div", {
351
351
  className: "padorix:flex padorix:items-center padorix:gap-3",
352
- children: [Number(t.data?.images?.length) > 0 && /* @__PURE__ */ V("div", {
352
+ children: [Number(e.data?.images?.length) > 0 && /* @__PURE__ */ H("div", {
353
353
  className: "padorix:flex padorix:gap-1 padorix:flex-row",
354
- children: [Array.isArray(t?.data?.images) && t?.data?.images?.slice(0, 2)?.map((e, t) => /* @__PURE__ */ B("img", {
354
+ children: [Array.isArray(e?.data?.images) && e?.data?.images?.slice(0, 2)?.map((e, t) => /* @__PURE__ */ V("img", {
355
355
  src: e,
356
356
  alt: "Padorix",
357
357
  className: "padorix:size-10 padorix:bg-slate-800 padorix:inline padorix:object-contain"
358
- }, t)), Number(t.data?.images?.length) > 2 && /* @__PURE__ */ V("div", {
358
+ }, t)), Number(e.data?.images?.length) > 2 && /* @__PURE__ */ H("div", {
359
359
  className: "padorix:flex padorix:items-center",
360
360
  children: [
361
361
  " ",
362
- /* @__PURE__ */ B(P, { className: "padorix:inline padorix:size-5" }),
362
+ /* @__PURE__ */ V(P, { className: "padorix:inline padorix:size-5" }),
363
363
  " ",
364
- Number(t.data?.images?.length) - 2,
364
+ Number(e.data?.images?.length) - 2,
365
365
  " "
366
366
  ]
367
367
  })]
368
- }), /* @__PURE__ */ B("div", {
369
- onClick: a,
368
+ }), /* @__PURE__ */ V("div", {
369
+ onClick: r,
370
370
  className: "padorix:cursor-pointer padorix:transition-all padorix:active:scale-95",
371
- children: /* @__PURE__ */ B(Q, { className: "padorix:inline padorix:size-6 padorix:mr-3" })
371
+ children: /* @__PURE__ */ V(Q, { className: "padorix:inline padorix:size-6 padorix:mr-3" })
372
372
  })]
373
373
  })]
374
374
  })
375
375
  }) })
376
- }, t.data.id)
376
+ }, e.data.id)
377
+ });
378
+ }
379
+ //#endregion
380
+ //#region lib/chats/chatform/emoji-picker.tsx
381
+ var je = [
382
+ {
383
+ name: "Smileys",
384
+ icon: "😀",
385
+ emojis: "😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😙 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🤫 🤔 🤐 🤨 😐 😑 😶 😏 😒 🙄 😬 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤧 🥵 🥶 😵 🤯 🤠 🥳 😎 🤓 🧐 😕 😟 🙁 😮 😯 😲 😳 🥺 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬"
386
+ },
387
+ {
388
+ name: "Gestures",
389
+ icon: "👍",
390
+ emojis: "👍 👎 👌 🤌 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐️ 🖖 👋 🤝 🙏 👏 🙌 👐 🤲 💪 ✍️ 💅 🤳 👀 👂 🧠 🫶"
391
+ },
392
+ {
393
+ name: "Hearts",
394
+ icon: "❤️",
395
+ emojis: "❤️ 🧡 💛 💚 💙 💜 🖤 🤍 🤎 💔 ❣️ 💕 💞 💓 💗 💖 💘 💝 💟 ❤️‍🔥 💯 💢 💥 💫 💦 💨"
396
+ },
397
+ {
398
+ name: "People",
399
+ icon: "🧑",
400
+ emojis: "👶 🧒 👦 👧 🧑 👨 👩 🧓 👴 👵 👮 🕵️ 💂 👷 🤴 👸 👳 🧕 🤵 👰 🤰 🤱 👼 🎅 🦸 🦹 🧙 🧚 🧛 🧜 🧝 🙋 🙆 🙅 🤷 🤦 💁 🙇 💃 🕺 👯 🧘 🏃 🚶"
401
+ },
402
+ {
403
+ name: "Nature",
404
+ icon: "🐶",
405
+ emojis: "🐶 🐱 🐭 🐹 🐰 🦊 🐻 🐼 🐨 🐯 🦁 🐮 🐷 🐸 🐵 🐔 🐧 🐦 🐤 🦆 🦅 🦉 🐺 🐴 🦄 🐝 🦋 🐌 🐞 🐢 🐍 🐙 🐠 🐬 🐳 🦈 🌵 🌲 🌳 🌴 🌱 🌿 🍀 🍁 🍂 🌸 🌹 🌺 🌻 🌼 🌷 ⭐ 🌟 ✨ ⚡ 🔥 🌈 ☀️ 🌤️ ☁️ 🌧️ ❄️ 🌊"
406
+ },
407
+ {
408
+ name: "Food",
409
+ icon: "🍔",
410
+ emojis: "🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🍒 🍑 🥭 🍍 🥥 🥝 🍅 🥑 🍆 🥔 🥕 🌽 🌶️ 🥒 🥬 🥦 🍞 🧀 🥚 🍳 🥞 🥓 🍗 🍖 🌭 🍔 🍟 🍕 🥪 🌮 🌯 🥗 🍝 🍜 🍲 🍛 🍣 🍱 🍤 🍚 🍰 🎂 🍦 🍩 🍪 🍫 🍬 🍭 ☕ 🍵 🥤 🧃 🍺 🍷 🥂"
411
+ },
412
+ {
413
+ name: "Activities",
414
+ icon: "⚽",
415
+ emojis: "⚽ 🏀 🏈 ⚾ 🎾 🏐 🏉 🎱 🏓 🏸 🥊 🥋 ⛳ 🎣 🎿 🏂 🏋️ 🚴 🏆 🥇 🥈 🥉 🏅 🎖️ 🎗️ 🎫 🎟️ 🎪 🎭 🎨 🎬 🎤 🎧 🎼 🎹 🥁 🎷 🎺 🎸 🎻 🎲 🎯 🎳 🎮 🧩 🎉 🎊 🎈 🎁"
416
+ },
417
+ {
418
+ name: "Travel",
419
+ icon: "✈️",
420
+ emojis: "🚗 🚕 🚙 🚌 🏎️ 🚓 🚑 🚒 🚚 🚜 🛵 🏍️ 🚲 🛴 🚨 🚆 🚇 🚊 ✈️ 🛫 🛬 🚀 🛸 🚁 ⛵ 🚤 🚢 ⚓ ⛽ 🗺️ 🏠 🏡 🏢 🏬 🏦 🏥 🏨 🏪 🏫 ⛪ 🕌 🗽 🗼 🏰 🌍 🌎 🌏 🏝️ 🏖️ ⛰️ 🌋"
421
+ },
422
+ {
423
+ name: "Objects",
424
+ icon: "💡",
425
+ emojis: "⌚ 📱 💻 ⌨️ 🖥️ 🖨️ 🖱️ 💾 💿 📷 📸 📹 🎥 📞 ☎️ 📺 📻 ⏰ ⏳ 🔋 🔌 💡 🔦 🕯️ 💸 💵 💳 💰 💎 🔧 🔨 🛠️ 🔩 ⚙️ 🔫 💊 💉 🧪 🔬 🔭 📦 📫 📬 ✉️ 📧 📝 📁 📂 📅 📆 📈 📉 📊 📋 📌 📍 📎 🔍 🔒 🔓 🔑 🛒 🎒"
426
+ },
427
+ {
428
+ name: "Symbols",
429
+ icon: "✅",
430
+ emojis: "✅ ☑️ ✔️ ❌ ❎ ➕ ➖ ➗ ✖️ ❓ ❔ ❗ ❕ ‼️ ⁉️ ⚠️ 🚫 ⛔ 🔞 ♻️ 🆗 🆕 🆓 🆒 🆘 🔝 🔜 ⏩ ⏪ ▶️ ⏸️ ⏹️ 🔁 🔄 ⬆️ ⬇️ ⬅️ ➡️ ↩️ ℹ️ 🔴 🟠 🟡 🟢 🔵 🟣 ⚫ ⚪ 🟥 🟩 🟦 💲 ©️ ®️ ™️ 🔔 🔕 💬 💭 🗯️"
431
+ }
432
+ ], Me = "padorix-recent-emojis", Ne = 24;
433
+ function Pe() {
434
+ try {
435
+ let e = JSON.parse(localStorage.getItem(Me) || "[]");
436
+ return Array.isArray(e) ? e.filter((e) => typeof e == "string").slice(0, Ne) : [];
437
+ } catch {
438
+ return [];
439
+ }
440
+ }
441
+ function Fe(e) {
442
+ let [t, n] = A.useState(Pe), [r, i] = A.useState(() => Pe().length > 0 ? "Recent" : je[0].name), a = A.useRef(null);
443
+ A.useEffect(() => {
444
+ let t = (t) => {
445
+ let n = t.composedPath();
446
+ a.current && n.includes(a.current) || e.toggleRef?.current && n.includes(e.toggleRef.current) || e.onClose();
447
+ }, n = (t) => {
448
+ t.key === "Escape" && e.onClose();
449
+ };
450
+ return document.addEventListener("pointerdown", t), document.addEventListener("keydown", n), () => {
451
+ document.removeEventListener("pointerdown", t), document.removeEventListener("keydown", n);
452
+ };
453
+ }, [e.onClose, e.toggleRef]);
454
+ function o(r) {
455
+ e.onSelect(r);
456
+ let i = [r, ...t.filter((e) => e !== r)].slice(0, Ne);
457
+ n(i);
458
+ try {
459
+ localStorage.setItem(Me, JSON.stringify(i));
460
+ } catch {}
461
+ }
462
+ let s = [...t.length > 0 ? [{
463
+ name: "Recent",
464
+ icon: "🕘"
465
+ }] : [], ...je], c = r === "Recent" ? t : je.find((e) => e.name === r)?.emojis.split(" ") ?? [];
466
+ return /* @__PURE__ */ H("div", {
467
+ ref: a,
468
+ role: "dialog",
469
+ "aria-label": "Emoji picker",
470
+ className: "padorix:w-[min(20rem,calc(100vw-2rem))] padorix:rounded-xl padorix:border padorix:border-gray-200 padorix:bg-white padorix:shadow-lg padorix:overflow-hidden",
471
+ children: [
472
+ /* @__PURE__ */ V("div", {
473
+ className: "padorix:flex padorix:gap-0.5 padorix:overflow-x-auto padorix-scrolls padorix:border-b padorix:border-gray-200 padorix:px-1 padorix:py-1",
474
+ children: s.map((e) => /* @__PURE__ */ V("button", {
475
+ type: "button",
476
+ title: e.name,
477
+ "aria-pressed": r === e.name,
478
+ onClick: () => i(e.name),
479
+ className: `padorix:shrink-0 padorix:size-8 padorix:rounded-md padorix:text-lg padorix:leading-none padorix:cursor-pointer ${r === e.name ? "padorix:bg-gray-100" : "padorix:opacity-60 padorix:hover:opacity-100"}`,
480
+ children: e.icon
481
+ }, e.name))
482
+ }),
483
+ /* @__PURE__ */ V("div", {
484
+ className: "padorix:px-2 padorix:pt-1.5 padorix:text-xs padorix:text-gray-500",
485
+ children: r
486
+ }),
487
+ /* @__PURE__ */ V("div", {
488
+ className: "padorix:grid padorix:grid-cols-8 padorix:gap-0.5 padorix:p-1.5 padorix:h-52 padorix:overflow-y-auto padorix-scrolls",
489
+ children: c.map((e, t) => /* @__PURE__ */ V("button", {
490
+ type: "button",
491
+ onClick: () => o(e),
492
+ className: "padorix:size-8 padorix:rounded-md padorix:text-xl padorix:leading-none padorix:cursor-pointer padorix:hover:bg-gray-100",
493
+ children: e
494
+ }, `${e}-${t}`))
495
+ })
496
+ ]
377
497
  });
378
498
  }
379
499
  //#endregion
380
500
  //#region lib/chats/chatform/chat-form.tsx
381
- var Me = A.lazy(() => import("emoji-picker-react"));
382
- function Ne(e) {
383
- let { sender: t, workspace: n, message: r } = k((e) => e.data), [i, a] = A.useState(!1), [o, s] = A.useState(!1);
384
- i && !o && s(!0);
385
- let [c, l] = A.useState(""), u = A.useRef(null), d = Number(e.previews?.length) < 1, f = Math.max(0, Number(n?.tier?.max_file_upload ?? 2)), p = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), m = n?.file_uploads_date === p ? Number(n?.file_uploads_used ?? 0) : 0, h = e.showFile && m + e.pendingFileCount < f;
501
+ function Ie(e) {
502
+ let { sender: t, workspace: n, message: r } = k((e) => e.data), [i, a] = A.useState(!1), o = A.useRef(null), s = A.useCallback(() => a(!1), []), [c, l] = A.useState(""), u = A.useRef(null), d = Number(e.previews?.length) < 1, f = Math.max(0, Number(n?.tier?.max_file_upload ?? 2)), p = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), m = n?.file_uploads_date === p ? Number(n?.file_uploads_used ?? 0) : 0, h = e.showFile && m + e.pendingFileCount < f;
386
503
  function g(e) {
387
- let t = u.current;
388
- if (!t) return;
389
- let n = t.selectionStart, r = t.selectionEnd, i = t.value;
390
- l(i.substring(0, n) + e + i.substring(r));
504
+ let t = u.current, n = t?.value ?? c, r = t && !(t.selectionStart === 0 && t.selectionEnd === 0 && n.length > 0), i = r ? t.selectionStart : n.length, a = r ? t.selectionEnd : n.length;
505
+ l(n.substring(0, i) + e + n.substring(a)), requestAnimationFrame(() => {
506
+ if (!t) return;
507
+ let n = i + e.length;
508
+ t.focus(), t.setSelectionRange(n, n);
509
+ });
391
510
  }
392
511
  function _() {
393
512
  if (d && !c || e.isSending) return;
@@ -405,29 +524,29 @@ function Ne(e) {
405
524
  };
406
525
  e.sendChat(r), l("");
407
526
  }
408
- return /* @__PURE__ */ V("div", {
409
- className: "relative overflow-x-hidden",
410
- children: [/* @__PURE__ */ B("div", {
411
- style: { visibility: i ? "visible" : "hidden" },
527
+ return /* @__PURE__ */ H("div", {
528
+ className: "padorix:relative",
529
+ children: [i && /* @__PURE__ */ V("div", {
412
530
  className: e.styles.emojiContainer,
413
- children: o && /* @__PURE__ */ B(A.Suspense, {
414
- fallback: null,
415
- children: /* @__PURE__ */ B(Me, { onEmojiClick: (e) => g(e.emoji) })
531
+ children: /* @__PURE__ */ V(Fe, {
532
+ onSelect: g,
533
+ onClose: s,
534
+ toggleRef: o
416
535
  })
417
- }), /* @__PURE__ */ V("div", {
536
+ }), /* @__PURE__ */ H("div", {
418
537
  className: e.styles.formContainer,
419
- children: [r?.id && /* @__PURE__ */ B(je, {
538
+ children: [r?.id && /* @__PURE__ */ V(Ae, {
420
539
  styles: e.styles,
421
540
  data: r
422
- }), /* @__PURE__ */ V("div", {
541
+ }), /* @__PURE__ */ H("div", {
423
542
  className: "padorix:flex padorix:items-center padorix:justify-center padorix:rounded-lg padorix:p-0.5 padorix:relative padorix:gap-1",
424
- children: [/* @__PURE__ */ V("div", {
543
+ children: [/* @__PURE__ */ H("div", {
425
544
  className: "padorix:flex padorix:items-center padorix:gap-1 padorix:bg-gray-100 padorix:w-full padorix:rounded-lg",
426
545
  children: [
427
- h && /* @__PURE__ */ V("label", {
546
+ h && /* @__PURE__ */ H("label", {
428
547
  title: "Attach images",
429
548
  className: "padorix:cursor-pointer padorix:px-1 padorix:text-[#99a1af]",
430
- children: [/* @__PURE__ */ B(P, {}), /* @__PURE__ */ B("input", {
549
+ children: [/* @__PURE__ */ V(P, {}), /* @__PURE__ */ V("input", {
431
550
  type: "file",
432
551
  accept: ".png,.jpg,.jpeg,.webp",
433
552
  hidden: !0,
@@ -435,18 +554,23 @@ function Ne(e) {
435
554
  multiple: !0
436
555
  })]
437
556
  }),
438
- /* @__PURE__ */ V("div", {
557
+ /* @__PURE__ */ H("div", {
558
+ ref: o,
559
+ role: "button",
560
+ "aria-label": "Insert emoji",
561
+ "aria-expanded": i,
439
562
  onClick: () => a((e) => !e),
563
+ style: i ? { color: String(n?.widget?.colorScheme || "#6c63ff") } : void 0,
440
564
  className: "padorix:text-[#99a1af] padorix:cursor-pointer padorix:px-1 padorix:transition-all",
441
565
  children: [
442
566
  " ",
443
- /* @__PURE__ */ B(se, {}),
567
+ /* @__PURE__ */ V(ae, {}),
444
568
  " "
445
569
  ]
446
570
  }),
447
- /* @__PURE__ */ B("div", {
571
+ /* @__PURE__ */ V("div", {
448
572
  className: "padorix:w-full",
449
- children: /* @__PURE__ */ B(ge, {
573
+ children: /* @__PURE__ */ V(me, {
450
574
  ref: u,
451
575
  message: c,
452
576
  setMessage: l,
@@ -455,14 +579,14 @@ function Ne(e) {
455
579
  })
456
580
  })
457
581
  ]
458
- }), /* @__PURE__ */ B("div", { children: /* @__PURE__ */ V("div", {
582
+ }), /* @__PURE__ */ V("div", { children: /* @__PURE__ */ H("div", {
459
583
  onClick: _,
460
584
  style: {
461
585
  background: d && !c || e.isSending ? "#9f9fa9" : String(n?.widget?.colorScheme),
462
586
  cursor: d && !c || e.isSending ? "not-allowed" : "pointer"
463
587
  },
464
588
  className: "padorix:-mt-1 padorix:size-10 padorix:text-white padorix:rounded-lg padorix:flex padorix:last:items-center padorix:justify-center",
465
- children: [" ", /* @__PURE__ */ B(L, { className: "padorix:size-6" })]
589
+ children: [" ", /* @__PURE__ */ V(se, { className: "padorix:size-6" })]
466
590
  }) })]
467
591
  })]
468
592
  })]
@@ -470,81 +594,81 @@ function Ne(e) {
470
594
  }
471
595
  //#endregion
472
596
  //#region lib/chats/chatform/chat-image-upload.tsx
473
- function Pe(e) {
474
- let { workspace: t } = k((e) => e.data), n = Math.max(0, Number(t?.tier?.max_file_upload ?? 2)), r = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), i = t?.file_uploads_date === r ? Number(t?.file_uploads_used ?? 0) : 0, [a, o] = A.useState({
475
- index: 0,
476
- image: e.previews?.[0]?.img
477
- });
478
- function s(t) {
597
+ function Le(e) {
598
+ let { workspace: t } = k((e) => e.data), n = Math.max(0, Number(t?.tier?.max_file_upload ?? 2)), r = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), i = t?.file_uploads_date === r ? Number(t?.file_uploads_used ?? 0) : 0, [a, o] = A.useState(e.previews?.[0]?.id), s = e.previews?.find((e) => e.id === a) ?? e.previews?.[0];
599
+ function c(t) {
479
600
  e.sendChat(t);
480
601
  }
481
- if (Number(e.previews?.length || 0) > 0) return /* @__PURE__ */ V("div", {
602
+ if (Number(e.previews?.length || 0) > 0) return /* @__PURE__ */ H("div", {
482
603
  className: e.styles.imageUploadContainer,
483
604
  children: [
484
- /* @__PURE__ */ V("div", {
485
- className: "padorix:h-[60dvh] padorix:border padorix:border-gray-300 padorix:py-3 padorix:md:h-[50dvh] padorix:md:relative padorix:bg-white",
486
- children: [/* @__PURE__ */ B("div", {
605
+ /* @__PURE__ */ H("div", {
606
+ className: `padorix:relative padorix:border padorix:border-gray-300 padorix:py-3 padorix:bg-white ${e.styles.imagePreviewBox}`,
607
+ children: [/* @__PURE__ */ V("div", {
487
608
  className: "padorix:py-0 padorix:px-2 padorix:pt-1.5 padorix:absolute padorix:top-0 padorix:right-0 padorix:w-full padorix:bg-white",
488
- children: /* @__PURE__ */ V("div", {
609
+ children: /* @__PURE__ */ H("div", {
489
610
  onClick: e.DiscardAllImages,
490
611
  className: "padorix:size-fit padorix:ml-auto padorix:text-red-600 padorix:cursor-pointer padorix:text-xl",
491
612
  children: [
492
613
  " ",
493
- /* @__PURE__ */ B(Q, {}),
614
+ /* @__PURE__ */ V(Q, {}),
494
615
  " "
495
616
  ]
496
617
  })
497
- }), /* @__PURE__ */ B("img", {
498
- src: a.image,
499
- loading: "lazy",
618
+ }), /* @__PURE__ */ V("img", {
619
+ src: s?.img,
500
620
  className: "padorix:size-full padorix:mx-auto padorix:object-contain"
501
621
  })]
502
622
  }),
503
- /* @__PURE__ */ V("div", {
504
- className: "padorix:flex padorix:items-center padorix:justify-center padorix:gap-1 padorix:max-w-[98%] padorix:mx-auto",
505
- children: [/* @__PURE__ */ B("div", {
623
+ /* @__PURE__ */ H("div", {
624
+ className: "padorix:shrink-0 padorix:flex padorix:items-center padorix:justify-center padorix:gap-1 padorix:max-w-[98%] padorix:mx-auto",
625
+ children: [/* @__PURE__ */ V("div", {
506
626
  className: "padorix:overflow-y-hidden padorix:overflow-x-auto",
507
- children: /* @__PURE__ */ B("div", {
627
+ children: /* @__PURE__ */ V("div", {
508
628
  className: "padorix:w-fit",
509
- children: /* @__PURE__ */ B("div", {
629
+ children: /* @__PURE__ */ V("div", {
510
630
  className: "padorix:flex padorix:items-center padorix:justify-center padorix:gap-1",
511
- children: e.previews?.map((n, r) => /* @__PURE__ */ V("div", {
512
- style: { border: `3.5px solid ${a.index === r ? String(t?.widget?.colorScheme) : "transparent"}` },
631
+ children: e.previews?.map((n, r) => /* @__PURE__ */ H("div", {
632
+ style: { border: `3.5px solid ${s?.id === n.id ? String(t?.widget?.colorScheme) : "transparent"}` },
513
633
  className: "padorix:relative padorix:size-14 padorix:border-2 padorix:rounded-lg",
514
- children: [/* @__PURE__ */ B("div", {
515
- onClick: () => e.DiscardSingleImage(r),
516
- className: "padorix:absolute padorix:top-0 padorix:left-0 padorix:w-full padorix:bg-slate-700 padorix:rounded-t-sm",
517
- children: /* @__PURE__ */ V("div", {
518
- className: "padorix:size-fit padorix:ml-auto padorix:cursor-pointer padorix:text-[#ef4444] padorix:text-sm",
519
- children: [
520
- " ",
521
- /* @__PURE__ */ B(Q, {}),
522
- " "
523
- ]
524
- })
525
- }), /* @__PURE__ */ B("img", {
526
- onClick: () => o({
527
- index: r,
528
- image: n?.img
634
+ children: [
635
+ /* @__PURE__ */ V("div", {
636
+ onClick: () => e.DiscardSingleImage(r),
637
+ className: "padorix:absolute padorix:top-0 padorix:left-0 padorix:w-full padorix:bg-slate-700 padorix:rounded-t-sm",
638
+ children: /* @__PURE__ */ H("div", {
639
+ className: "padorix:size-fit padorix:ml-auto padorix:cursor-pointer padorix:text-[#ef4444] padorix:text-sm",
640
+ children: [
641
+ " ",
642
+ /* @__PURE__ */ V(Q, {}),
643
+ " "
644
+ ]
645
+ })
529
646
  }),
530
- src: n?.img,
531
- loading: "lazy",
532
- className: "padorix:size-full padorix:cursor-pointer padorix:rounded-md padorix:object-cover"
533
- })]
534
- }, r))
647
+ /* @__PURE__ */ V("img", {
648
+ onClick: () => o(n.id),
649
+ src: n?.img,
650
+ className: "padorix:size-full padorix:cursor-pointer padorix:rounded-md padorix:object-cover"
651
+ }),
652
+ n.status === "uploading" && /* @__PURE__ */ V("div", {
653
+ title: "Uploading…",
654
+ className: "padorix:absolute padorix:inset-0 padorix:flex padorix:items-center padorix:justify-center padorix:bg-white/50 padorix:rounded-md padorix:pointer-events-none",
655
+ children: /* @__PURE__ */ V("div", { className: "padorix:size-5 padorix:rounded-full padorix:border-2 padorix:border-gray-300 padorix:border-t-gray-600 padorix:animate-spin" })
656
+ })
657
+ ]
658
+ }, n.id))
535
659
  })
536
660
  })
537
- }), i + e.pendingFileCount < n && /* @__PURE__ */ B("div", {
661
+ }), i + e.pendingFileCount < n && /* @__PURE__ */ V("div", {
538
662
  className: "",
539
- children: /* @__PURE__ */ B("div", {
663
+ children: /* @__PURE__ */ V("div", {
540
664
  style: {
541
665
  borderColor: `${t?.widget?.colorScheme}`,
542
666
  color: String(t?.widget?.colorScheme)
543
667
  },
544
668
  className: "padorix:size-12 padorix:border padorix:sticky padorix:left-0 padorix:cursor-pointer padorix:rounded-md padorix:flex padorix:items-center padorix:justify-center",
545
- children: /* @__PURE__ */ V("label", {
669
+ children: /* @__PURE__ */ H("label", {
546
670
  className: "padorix:cursor-pointer",
547
- children: [/* @__PURE__ */ B(P, {}), /* @__PURE__ */ B("input", {
671
+ children: [/* @__PURE__ */ V(P, {}), /* @__PURE__ */ V("input", {
548
672
  type: "file",
549
673
  accept: ".png,.jpg,.jpeg,.webp",
550
674
  hidden: !0,
@@ -555,21 +679,25 @@ function Pe(e) {
555
679
  })
556
680
  })]
557
681
  }),
558
- /* @__PURE__ */ B(Ne, {
559
- showFile: !1,
560
- pendingFileCount: e.pendingFileCount,
561
- sendChat: s,
562
- styles: e.styles,
563
- userType: e.userType,
564
- handleFile: e.handleFile,
565
- isSending: e.isSending
682
+ /* @__PURE__ */ V("div", {
683
+ className: "padorix:shrink-0",
684
+ children: /* @__PURE__ */ V(Ie, {
685
+ showFile: !1,
686
+ pendingFileCount: e.pendingFileCount,
687
+ sendChat: c,
688
+ styles: e.styles,
689
+ userType: e.userType,
690
+ handleFile: e.handleFile,
691
+ isSending: e.isSending,
692
+ previews: e.previews
693
+ })
566
694
  })
567
695
  ]
568
696
  });
569
697
  }
570
698
  //#endregion
571
699
  //#region lib/utils/use-chat-identity.ts
572
- function Fe(e) {
700
+ function Re(e) {
573
701
  let { sender: t, workspace: n, conversation: r } = k((e) => e.data), i = t?.workspaceId || n?.id || r?.workspaceId, a = t?.conversationId, o = t?.senderId, s = t?.userType || e, c = t?.fullName;
574
702
  return A.useMemo(() => !i || !a || !o ? null : {
575
703
  workspaceId: String(i),
@@ -587,80 +715,101 @@ function Fe(e) {
587
715
  }
588
716
  //#endregion
589
717
  //#region lib/chats/chatform/chat-form-component.tsx
590
- function Ie(e) {
591
- let [n, r] = A.useState([]), [i, o] = A.useState([]), [c, l] = A.useState(0), u = A.useRef(0), { sender: p, workspace: m } = k((e) => e.data), h = O(), g = Fe(e.userType), _ = Math.max(0, Number(m?.tier?.max_file_upload ?? 2)), v = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), y = m?.file_uploads_date === v ? Number(m?.file_uploads_used ?? 0) : 0;
592
- function b(t) {
593
- let i = {
594
- ...t,
595
- ...n.length > 0 ? { images: n } : { images: [] }
596
- };
597
- e.sendChat(i), o([]), r([]);
718
+ function ze(e) {
719
+ let [t, n] = A.useState([]), r = A.useRef([]), a = A.useRef(/* @__PURE__ */ new Map()), [s, c] = A.useState(!1), { sender: l, workspace: f } = k((e) => e.data), p = A.useRef(f);
720
+ p.current = f;
721
+ let m = O(), h = Re(e.userType), g = Math.max(0, Number(f?.tier?.max_file_upload ?? 2)), _ = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), v = f?.file_uploads_date === _ ? Number(f?.file_uploads_used ?? 0) : 0, y = t.filter((e) => e.status === "uploading").length, b = A.useCallback((e) => {
722
+ r.current = e(r.current), n(r.current);
723
+ }, []);
724
+ A.useEffect(() => () => r.current.forEach((e) => URL.revokeObjectURL(e.img)), []);
725
+ function x(e) {
726
+ !h || e.length === 0 || d.removeImages(h, e).catch((e) => console.log(e.message));
598
727
  }
599
- let x = async (e) => {
600
- let n = e.target, i = Array.from(n.files ?? []), c = Math.max(0, _ - y - u.current), f = i.slice(0, c);
601
- if (f.length === 0) {
602
- n.value = "";
603
- return;
604
- }
605
- u.current += f.length, l((e) => e + f.length);
606
- try {
607
- i.length > f.length && d(`You can attach up to ${_} images.`, "info");
608
- let e = await t(f);
609
- if (!Array.isArray(e) || e.length === 0) return;
610
- let n = await s(e, String(m?.id ?? "")), c = Array.isArray(n) ? n : n?.images;
611
- if (!Array.isArray(c)) return;
612
- o((t) => [...t, ...e]), r((e) => [...e, ...c]), n?.file_uploads_used !== void 0 && m && h(a({
613
- ...m,
614
- file_uploads_used: n.file_uploads_used,
615
- file_uploads_date: n.file_uploads_date
616
- }));
617
- } catch (e) {
618
- d(e.message?.toString() || "Image upload failed", "error");
619
- } finally {
620
- u.current = Math.max(0, u.current - f.length), l((e) => Math.max(0, e - f.length)), n.value = "";
621
- }
728
+ function S(e) {
729
+ let t = (async () => {
730
+ try {
731
+ let t = await o([e], String(p.current?.id ?? "")), n = (Array.isArray(t) ? t : t?.images)?.[0];
732
+ if (!n) throw Error("Upload returned no image URL");
733
+ let a = Array.isArray(t) ? null : t, s = p.current;
734
+ if (a?.file_uploads_used !== void 0 && s && m(i({
735
+ ...s,
736
+ file_uploads_used: a.file_uploads_used,
737
+ file_uploads_date: a.file_uploads_date
738
+ })), !r.current.some((t) => t.id === e.id)) return x([n]);
739
+ b((t) => t.map((t) => t.id === e.id ? {
740
+ ...t,
741
+ status: "uploaded",
742
+ url: n
743
+ } : t));
744
+ } catch (t) {
745
+ console.log(`Image upload failed: ${t.message}`), URL.revokeObjectURL(e.img), b((t) => t.filter((t) => t.id !== e.id));
746
+ } finally {
747
+ a.current.delete(e.id);
748
+ }
749
+ })();
750
+ a.current.set(e.id, t);
751
+ }
752
+ let C = (e) => {
753
+ let t = e.target, n = Array.from(t.files ?? []).filter((e) => e.type.startsWith("image/"));
754
+ t.value = "";
755
+ let i = r.current.filter((e) => e.status === "uploading").length, a = Math.max(0, g - v - i), o = n.slice(0, a);
756
+ if (n.length > o.length && u(`You can attach up to ${g} images.`, "info"), o.length === 0) return;
757
+ let s = o.map((e) => ({
758
+ id: crypto.randomUUID(),
759
+ file: e,
760
+ img: URL.createObjectURL(e),
761
+ status: "uploading"
762
+ }));
763
+ b((e) => [...e, ...s]), s.forEach(S);
622
764
  };
623
- function ee(e) {
624
- !g || e.length === 0 || f.removeImages(g, e).catch((e) => console.log(e.message));
765
+ async function w(t) {
766
+ a.current.size > 0 && (c(!0), await Promise.allSettled([...a.current.values()]), c(!1));
767
+ let n = r.current, i = n.map((e) => e.url).filter(Boolean);
768
+ i.length === 0 && !t.message || (e.sendChat({
769
+ ...t,
770
+ images: i
771
+ }), n.forEach((e) => URL.revokeObjectURL(e.img)), b(() => []));
625
772
  }
626
- function S(e) {
627
- let t = n.find((t, n) => n === e);
628
- r(n?.filter((t, n) => n !== e)), o(i?.filter((t, n) => n !== e)), t && ee([t]);
773
+ function T(e) {
774
+ let t = r.current[e];
775
+ t && (URL.revokeObjectURL(t.img), b((e) => e.filter((e) => e.id !== t.id)), t.url && x([t.url]));
629
776
  }
630
- function C() {
631
- o([]), r([]), ee(n);
777
+ function E() {
778
+ let e = r.current.map((e) => e.url).filter(Boolean);
779
+ r.current.forEach((e) => URL.revokeObjectURL(e.img)), b(() => []), x(e);
632
780
  }
633
- return /* @__PURE__ */ V("div", {
634
- className: "padorix:relative padorix:z-50",
635
- children: [i.length > 0 && /* @__PURE__ */ B(Pe, {
636
- previews: i,
637
- DiscardSingleImage: S,
638
- DiscardAllImages: C,
781
+ let ee = e.isSending || s;
782
+ return /* @__PURE__ */ H("div", {
783
+ className: e.styles.formRoot,
784
+ children: [t.length > 0 && /* @__PURE__ */ V(Le, {
785
+ previews: t,
786
+ DiscardSingleImage: T,
787
+ DiscardAllImages: E,
639
788
  styles: e.styles,
640
- sendChat: b,
789
+ sendChat: w,
641
790
  userType: e.userType,
642
- senderId: String(p?.senderId),
643
- handleFile: x,
644
- isSending: e.isSending,
645
- pendingFileCount: c
646
- }), /* @__PURE__ */ B(Ne, {
647
- sendChat: b,
648
- previews: i,
791
+ senderId: String(l?.senderId),
792
+ handleFile: C,
793
+ isSending: ee,
794
+ pendingFileCount: y
795
+ }), /* @__PURE__ */ V(Ie, {
796
+ sendChat: w,
797
+ previews: t,
649
798
  showFile: !0,
650
- pendingFileCount: c,
799
+ pendingFileCount: y,
651
800
  styles: e.styles,
652
801
  userType: e.userType,
653
- handleFile: x,
654
- isSending: e.isSending
802
+ handleFile: C,
803
+ isSending: ee
655
804
  })]
656
805
  });
657
806
  }
658
807
  //#endregion
659
808
  //#region lib/assets/images/wd__user.png
660
- var Le = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAADAFBMVEVMaXFUVFRVYH8AAABTU6lVYID///9UX4B7e39VYH+qt/9VYIBVX4BMV3nm6+xVYIDn6+xKXH9OWnu0u8dtrq5JVXfm6+xVYIBJVHZNWXrm6+zq7+9VYIChqbhXY4JUX4ChqrlVX4Hd4uVRYICvt8NVYYFXYoJWYIFzfJZVYYFVYIFVYIFVYIDs8fHK0Njt8vFVYIBTXn5KVnfn7e1UYIBVYIHIztZWYIHx9fRWYoKkrLtWYIFWYoNXYYJXX4FWYYFWYYJWYoJdZ4ZXYoJrdpHl6utVYIBVYH9rdZBWYYFVYIBWXX1UXnzn7OxUX4BVYIBbZoRWYYDh5ulVYYJWYYHu8/N+h57CydJ7hZ1VYYFeaYdWYYG/xtCpsL9aZIRaZYOLk6jw9PPl6etWYYLv8/fr9fC/zL+yusagqLjp7e6zucbX3eJPW3tRXH1gaoja4OSutMPGzNTk6Oqmrr1XV4dVX4Dn7O3n7O3n7O3m7Ozm6utVYH/o7O1WYYBUXn5WYYHm6+tVYH93gZq////a3+Tn6uywt8SOl6zl7O3T2N5oc49GUnbM0tllb4ypsL5dZ39ra4zV299RXH1VW35UYYDm6uuEjaNbZoXo6+/O1Nrq7/CZobO3vs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XSI0JPAP67q2HHo4Ju65OmkT1tC8nW+FejqrDWkCIBKx9/au0FsfzcMqvl+NYmTcm2x88P0/dXaFvByIxMF9pxmqvaFTdZ++f3AjitHbX/gAlHvchocP7Bt2+lR3uzfRYOBwJPY6xp4NhupAe/ep0LB9Bx7c0LuLxNrU93MYEr786rO//s3Q3nWq53RdvddrNHq99XWne051tRv+8a8DX33J/yh23A/MEJv4fzZ+fvDv33y9f++nXwxLS1v3xV/27v/6m38enLeBL3cTNony/n9GHU2UlcLeHAAAAABJRU5ErkJggg==";
661
810
  //#endregion
662
811
  //#region node_modules/react-icons/io5/index.mjs
663
- function Re(e) {
812
+ function Ve(e) {
664
813
  return Z({
665
814
  tag: "svg",
666
815
  attr: { viewBox: "0 0 512 512" },
@@ -697,7 +846,7 @@ function Re(e) {
697
846
  }
698
847
  //#endregion
699
848
  //#region node_modules/react-icons/vsc/index.mjs
700
- function ze(e) {
849
+ function He(e) {
701
850
  return Z({
702
851
  tag: "svg",
703
852
  attr: {
@@ -721,22 +870,22 @@ function ze(e) {
721
870
  }
722
871
  //#endregion
723
872
  //#region lib/chats/chatheader/chat-header.tsx
724
- function Be(e) {
725
- let [t, { open: r, close: i }] = pe(!1), { workspace: a, conversation: s, sender: c } = k((e) => e.data), u = v(a?.widget?.darkMode, !1), [p, m] = A.useState(!1), h = O(), g = Fe(e.userType), _ = e.userType === w.VISITOR, y = a?.widget?.notifications?.customerEndsConversation === l.true, x = A.useMemo(() => _ ? a?.widget?.department : s?.fullName, [a, s]), ee = A.useMemo(() => _ ? a?.logo : Le, [a]), S = A.useMemo(() => _ ? a?.name : G(s?.createdAt).format("DD dddd MMMM YYYY"), [
726
- _,
727
- a?.name,
873
+ function Ue(e) {
874
+ let [t, { open: i, close: a }] = de(!1), { workspace: o, conversation: s, sender: l } = k((e) => e.data), f = _(o?.widget?.darkMode, !1), [p, m] = A.useState(!1), h = O(), g = Re(e.userType), v = e.userType === w.VISITOR, b = o?.widget?.notifications?.customerEndsConversation === c.true, x = A.useMemo(() => v ? o?.widget?.department : s?.fullName, [o, s]), S = A.useMemo(() => v ? o?.logo : Be, [o]), C = A.useMemo(() => v ? o?.name : K(s?.createdAt).format("DD dddd MMMM YYYY"), [
875
+ v,
876
+ o?.name,
728
877
  s?.createdAt
729
878
  ]);
730
- function C() {
879
+ function T() {
731
880
  m(!1);
732
881
  }
733
- function T() {
734
- let t = G(), n = [
882
+ function E() {
883
+ let t = K(), n = [
735
884
  x || "Chat transcript",
736
885
  `Exported: ${t.format("YYYY-MM-DD HH:mm")}`,
737
886
  "",
738
887
  ...e.messages.length > 0 ? e.messages.map((e) => {
739
- let t = G(e.createdAt), n = e.senderName || e.senderType || "Unknown", r = e.deleted === l.true ? "[This message was deleted]" : Array.isArray(e.message) ? e.message.join("\n") : "", i = e.deleted === l.true ? [] : Array.isArray(e.images) ? e.images : [];
888
+ let t = K(e.createdAt), n = e.senderName || e.senderType || "Unknown", r = e.deleted === c.true ? "[This message was deleted]" : Array.isArray(e.message) ? e.message.join("\n") : "", i = e.deleted === c.true ? [] : Array.isArray(e.images) ? e.images : [];
740
889
  return [
741
890
  `[${t.isValid() ? t.format("YYYY-MM-DD HH:mm") : e.createdAt}] ${n} (${e.senderType})`,
742
891
  r,
@@ -744,144 +893,144 @@ function Be(e) {
744
893
  ].filter(Boolean).join("\n");
745
894
  }) : ["No messages in this chat."]
746
895
  ].join("\n\n"), r = URL.createObjectURL(new Blob([n], { type: "text/plain;charset=utf-8" })), i = document.createElement("a");
747
- i.href = r, i.download = `padorix-chat-${t.format("YYYY-MM-DD-HHmmss")}.txt`, document.body.appendChild(i), i.click(), i.remove(), window.setTimeout(() => URL.revokeObjectURL(r), 1e3), C();
896
+ i.href = r, i.download = `padorix-chat-${t.format("YYYY-MM-DD-HHmmss")}.txt`, document.body.appendChild(i), i.click(), i.remove(), window.setTimeout(() => URL.revokeObjectURL(r), 1e3), T();
748
897
  }
749
- function E() {
750
- h(n({
898
+ function ee() {
899
+ h(r({
751
900
  userType: String(e?.userType),
752
- senderId: String(c?.senderId),
901
+ senderId: String(l?.senderId),
753
902
  workspaceId: String(s?.workspaceId),
754
- conversationId: String(c?.conversationId),
755
- senderName: String(c?.fullName),
756
- isEndChat: l.true
903
+ conversationId: String(l?.conversationId),
904
+ senderName: String(l?.fullName),
905
+ isEndChat: c.true
757
906
  })), m(!1), e.toBottom();
758
907
  }
759
- function te() {
760
- m(!1), r();
761
- }
762
908
  function D() {
763
- i(), g && f.requestFeedback(g).then((e) => h(o(e))).catch((e) => d(e.message, "error")), e.toBottom();
909
+ m(!1), i();
764
910
  }
765
- return /* @__PURE__ */ B("div", {
911
+ function te() {
912
+ a(), g && d.requestFeedback(g).then((e) => h(n(e))).catch((e) => u(e.message, "error")), e.toBottom();
913
+ }
914
+ return /* @__PURE__ */ V("div", {
766
915
  className: e.styles.header,
767
- children: /* @__PURE__ */ V("div", {
916
+ children: /* @__PURE__ */ H("div", {
768
917
  className: "padorix:rounded-2xl",
769
- children: [/* @__PURE__ */ B(U, {
918
+ children: [/* @__PURE__ */ V(W, {
770
919
  withCloseButton: !1,
771
920
  opened: t,
772
- onClose: i,
921
+ onClose: a,
773
922
  centered: !0,
774
923
  styles: { body: { padding: 0 } },
775
- children: /* @__PURE__ */ B("div", {
776
- className: u ? "padorix-dark" : void 0,
777
- children: /* @__PURE__ */ V("div", {
924
+ children: /* @__PURE__ */ V("div", {
925
+ className: f ? "padorix-dark" : void 0,
926
+ children: /* @__PURE__ */ H("div", {
778
927
  className: "padorix:dark:bg-[#2a3549] padorix:p-4 padorix:dark:text-white",
779
- children: [/* @__PURE__ */ B("div", {
928
+ children: [/* @__PURE__ */ V("div", {
780
929
  className: "",
781
930
  children: "Confirm your action to stop chat session by requesting for feedback"
782
- }), /* @__PURE__ */ V("div", {
931
+ }), /* @__PURE__ */ H("div", {
783
932
  className: "padorix:border-t padorix:border-gray-200 padorix:dark:border-gray-600 padorix:pt-3 padorix:mt-3 padorix:flex padorix:items-center padorix:justify-end padorix:gap-3",
784
- children: [/* @__PURE__ */ B("button", {
785
- onClick: i,
933
+ children: [/* @__PURE__ */ V("button", {
934
+ onClick: a,
786
935
  className: "padorix:py-1 padorix:cursor-pointer padorix:px-3 padorix:border padorix:border-slate-300 padorix:bg-slate-200/70 padorix:rounded-md",
787
936
  children: "Cancel"
788
- }), /* @__PURE__ */ B("button", {
789
- onClick: D,
937
+ }), /* @__PURE__ */ V("button", {
938
+ onClick: te,
790
939
  className: "padorix:px-3 padorix:cursor-pointer padorix:py-1 padorix:rounded-md padorix:text-white",
791
- style: { background: String(a?.widget?.colorScheme) },
940
+ style: { background: String(o?.widget?.colorScheme) },
792
941
  children: "Proceed"
793
942
  })]
794
943
  })]
795
944
  })
796
945
  })
797
- }), /* @__PURE__ */ V("div", {
798
- style: { color: a?.widget?.textColor || void 0 },
946
+ }), /* @__PURE__ */ H("div", {
947
+ style: { color: o?.widget?.textColor || void 0 },
799
948
  className: "padorix:px-2 padorix:py-2.5 padorix:transition-all.5 padorix:text-xs padorix:border-b padorix:border-[#d1d5dc] padorix:dark:border-gray-600 padorix:flex padorix:items-center padorix:justify-between",
800
- children: [/* @__PURE__ */ V("div", {
949
+ children: [/* @__PURE__ */ H("div", {
801
950
  className: "padorix:flex padorix:items-center padorix:gap-1",
802
951
  children: [
803
- _ ? null : /* @__PURE__ */ B("div", {
952
+ v ? null : /* @__PURE__ */ V("div", {
804
953
  onClick: e.goBack,
805
954
  className: "padorix:cursor-pointer padorix:size-7 padorix:flex padorix:items-center padorix:justify-center padorix:rounded-full padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:active:scale-95 padorix:md:hidden",
806
- children: /* @__PURE__ */ B(ie, { className: "padorix:size-5" })
955
+ children: /* @__PURE__ */ V(ne, { className: "padorix:size-5" })
807
956
  }),
808
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("img", {
809
- src: ee,
957
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("img", {
958
+ src: S,
810
959
  loading: "lazy",
811
960
  className: "padorix:size-8 padorix:rounded-full"
812
961
  }) }),
813
- /* @__PURE__ */ V("div", {
962
+ /* @__PURE__ */ H("div", {
814
963
  className: "padorix:text-gray-600",
815
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
964
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
816
965
  className: "padorix:font-semibold",
817
966
  children: x
818
- }) }), /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
967
+ }) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
819
968
  className: "",
820
- children: S
969
+ children: C
821
970
  }) })]
822
971
  })
823
972
  ]
824
- }), /* @__PURE__ */ V("div", {
973
+ }), /* @__PURE__ */ H("div", {
825
974
  className: "padorix:flex padorix:items-center padorix:gap-3",
826
- children: [/* @__PURE__ */ B("div", {
975
+ children: [/* @__PURE__ */ V("div", {
827
976
  className: "padorix:flex padorix:items-center padorix:gap-1",
828
- children: /* @__PURE__ */ V(W, {
829
- position: _ ? "bottom-end" : "bottom",
977
+ children: /* @__PURE__ */ H(G, {
978
+ position: v ? "bottom-end" : "bottom",
830
979
  opened: p,
831
980
  onChange: m,
832
981
  withinPortal: !0,
833
- portalProps: { target: b() },
982
+ portalProps: { target: y() },
834
983
  zIndex: 2147483647,
835
- children: [/* @__PURE__ */ B(W.Target, { children: /* @__PURE__ */ B("div", {
984
+ children: [/* @__PURE__ */ V(G.Target, { children: /* @__PURE__ */ V("div", {
836
985
  onClick: () => m((e) => !e),
837
986
  className: "padorix:cursor-pointer padorix:transition-all padorix:size-fit padorix:text-xl",
838
- children: /* @__PURE__ */ B(Re, {})
839
- }) }), /* @__PURE__ */ B(W.Dropdown, {
840
- className: u ? "padorix-dark" : void 0,
987
+ children: /* @__PURE__ */ V(Ve, {})
988
+ }) }), /* @__PURE__ */ V(G.Dropdown, {
989
+ className: f ? "padorix-dark" : void 0,
841
990
  styles: { dropdown: {
842
991
  padding: 0,
843
992
  minWidth: "12rem",
844
993
  zIndex: 2147483647,
845
994
  border: 0,
846
- backgroundColor: u ? "#2a3549" : "#fff"
995
+ backgroundColor: f ? "#2a3549" : "#fff"
847
996
  } },
848
- children: /* @__PURE__ */ V("div", {
997
+ children: /* @__PURE__ */ H("div", {
849
998
  className: "padorix:text-xs padori:flex padorix:flex-col padorix:dark:bg-[#2a3549] padorix:dark:text-white",
850
999
  children: [
851
- !_ && /* @__PURE__ */ V("div", {
852
- onClick: T,
1000
+ !v && /* @__PURE__ */ H("div", {
1001
+ onClick: E,
853
1002
  className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:flex padorix:items-center",
854
- children: [/* @__PURE__ */ B(oe, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:mr-1" }), "Download Chat transcript"]
1003
+ children: [/* @__PURE__ */ V(ie, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:mr-1" }), "Download Chat transcript"]
855
1004
  }),
856
- /* @__PURE__ */ V("a", {
1005
+ /* @__PURE__ */ H("a", {
857
1006
  target: "_blank",
858
1007
  href: "https://app.farmsac.com/signup",
859
1008
  className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:hidden padorix:items-center",
860
- children: [/* @__PURE__ */ B(I, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "Add to your website"]
1009
+ children: [/* @__PURE__ */ V(oe, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "Add to your website"]
861
1010
  }),
862
- !_ && s?.status === l.true && /* @__PURE__ */ V("div", {
863
- onClick: te,
1011
+ !v && s?.status === c.true && /* @__PURE__ */ H("div", {
1012
+ onClick: D,
864
1013
  className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:flex padorix:items-center",
865
- children: [/* @__PURE__ */ B(ze, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "Request for Feedback"]
1014
+ children: [/* @__PURE__ */ V(He, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "Request for Feedback"]
866
1015
  }),
867
- s?.closed_at === null && (!_ || y) && /* @__PURE__ */ B("div", {
1016
+ s?.closed_at === null && (!v || b) && /* @__PURE__ */ V("div", {
868
1017
  className: "padorix:border-t padorix:border-[#d1d5dc] padorix:dark:border-gray-600 padorix:mt-1",
869
- children: /* @__PURE__ */ V("div", {
870
- onClick: E,
1018
+ children: /* @__PURE__ */ H("div", {
1019
+ onClick: ee,
871
1020
  className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:flex padorix:items-center",
872
- children: [/* @__PURE__ */ B(Q, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "End Chat Session"]
1021
+ children: [/* @__PURE__ */ V(Q, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "End Chat Session"]
873
1022
  })
874
1023
  })
875
1024
  ]
876
1025
  })
877
1026
  })]
878
1027
  })
879
- }), _ && /* @__PURE__ */ B("div", {
1028
+ }), v && /* @__PURE__ */ V("div", {
880
1029
  className: "padorix:size-8 padorix:ml-auto",
881
- children: /* @__PURE__ */ B("div", {
1030
+ children: /* @__PURE__ */ V("div", {
882
1031
  className: "padorix:bg-slate-100 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
883
1032
  onClick: e.close,
884
- children: /* @__PURE__ */ B(F, {})
1033
+ children: /* @__PURE__ */ V(F, {})
885
1034
  })
886
1035
  })]
887
1036
  })]
@@ -891,7 +1040,7 @@ function Be(e) {
891
1040
  }
892
1041
  //#endregion
893
1042
  //#region node_modules/react-icons/bs/index.mjs
894
- function Ve(e) {
1043
+ function We(e) {
895
1044
  return Z({
896
1045
  tag: "svg",
897
1046
  attr: {
@@ -905,7 +1054,7 @@ function Ve(e) {
905
1054
  }]
906
1055
  })(e);
907
1056
  }
908
- function He(e) {
1057
+ function Ge(e) {
909
1058
  return Z({
910
1059
  tag: "svg",
911
1060
  attr: {
@@ -919,7 +1068,7 @@ function He(e) {
919
1068
  }]
920
1069
  })(e);
921
1070
  }
922
- function Ue(e) {
1071
+ function Ke(e) {
923
1072
  return Z({
924
1073
  tag: "svg",
925
1074
  attr: {
@@ -933,7 +1082,7 @@ function Ue(e) {
933
1082
  }]
934
1083
  })(e);
935
1084
  }
936
- function We(e) {
1085
+ function qe(e) {
937
1086
  return Z({
938
1087
  tag: "svg",
939
1088
  attr: {
@@ -951,7 +1100,7 @@ function We(e) {
951
1100
  }]
952
1101
  })(e);
953
1102
  }
954
- function Ge(e) {
1103
+ function Je(e) {
955
1104
  return Z({
956
1105
  tag: "svg",
957
1106
  attr: {
@@ -967,11 +1116,11 @@ function Ge(e) {
967
1116
  }
968
1117
  //#endregion
969
1118
  //#region lib/chats/chatform/render-text.tsx
970
- function Ke(e) {
1119
+ function Ye(e) {
971
1120
  if (!e) return "";
972
1121
  let t = /(https?:\/\/[^\s]+)/g, n = /\*(.*?)\*/g;
973
1122
  return e.split(t).map((e, r) => {
974
- if (t.test(e)) return /* @__PURE__ */ B("a", {
1123
+ if (t.test(e)) return /* @__PURE__ */ V("a", {
975
1124
  href: e,
976
1125
  target: "_blank",
977
1126
  rel: "noopener noreferrer",
@@ -979,7 +1128,7 @@ function Ke(e) {
979
1128
  children: e
980
1129
  }, r);
981
1130
  let i = e.split(n);
982
- return e.match(n) ? i.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ B("strong", {
1131
+ return e.match(n) ? i.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ V("strong", {
983
1132
  className: "padorix:font-bold",
984
1133
  children: e
985
1134
  }, `b-${t}`) : e) : e;
@@ -987,58 +1136,58 @@ function Ke(e) {
987
1136
  }
988
1137
  //#endregion
989
1138
  //#region lib/chats/chatmessages/chat-message-cover.tsx
990
- function qe(e) {
1139
+ function Xe(e) {
991
1140
  let { workspace: t } = k((e) => e.data), n = "padorix:w-fit padorix:h-fit padorix:max-w-[91%] padorix:relative padorix:bottom-3 padorix:md:max-w-[80%]";
992
- if (e.isSender) return /* @__PURE__ */ B(R, {
993
- style: { background: e.data?.deleted === l.true ? "" : e.data?.message ? String(t?.widget?.colorScheme) : "" },
1141
+ if (e.isSender) return /* @__PURE__ */ V(z, {
1142
+ style: { background: e.data?.deleted === c.true ? "" : e.data?.message ? String(t?.widget?.colorScheme) : "" },
994
1143
  className: `
995
1144
  ${n} padorix:ml-auto
996
1145
  ${e.isLastInGroup ? "padorix:rounded-t-xl padorix:rounded-bl-xl" : "padorix:rounded-xl"}
997
- ${e.data?.deleted === l.true ? "" : e.data?.message ? "padorix:text-white" : "padorix:text-black!"}`,
1146
+ ${e.data?.deleted === c.true ? "" : e.data?.message ? "padorix:text-white" : "padorix:text-black!"}`,
998
1147
  children: e.children
999
1148
  });
1000
- if (!e.isSender) return /* @__PURE__ */ B(R, {
1149
+ if (!e.isSender) return /* @__PURE__ */ V(z, {
1001
1150
  className: `${n} padorix:mr-auto
1002
1151
  ${e.isLastInGroup ? "padorix:rounded-t-xl padorix:rounded-br-xl" : "padorix:rounded-xl"}
1003
- ${e.data?.deleted === l.true ? "" : e.data?.message ? "padorix:bg-[#f6f6f6] padorix:text-black" : "padorix:text-black!"}`,
1152
+ ${e.data?.deleted === c.true ? "" : e.data?.message ? "padorix:bg-[#f6f6f6] padorix:text-black" : "padorix:text-black!"}`,
1004
1153
  children: e.children
1005
1154
  });
1006
1155
  }
1007
1156
  //#endregion
1008
1157
  //#region lib/chats/chatmessages/chat-avatar.tsx
1009
- function Je(e) {
1010
- return /* @__PURE__ */ B(fe, {
1158
+ function Ze(e) {
1159
+ return /* @__PURE__ */ V(ue, {
1011
1160
  direction: "up",
1012
- children: /* @__PURE__ */ B("div", {
1161
+ children: /* @__PURE__ */ V("div", {
1013
1162
  className: "padorix:self-end padorix:mb-3 padorix:w-10",
1014
- children: e.isLastInGroup ? /* @__PURE__ */ B("div", {
1163
+ children: e.isLastInGroup ? /* @__PURE__ */ V("div", {
1015
1164
  className: "padorix:size-8",
1016
- children: /* @__PURE__ */ B("img", {
1165
+ children: /* @__PURE__ */ V("img", {
1017
1166
  src: e.img,
1018
1167
  alt: "Padorix",
1019
1168
  className: "padorix:size-8 padorix:border-2 padorix:rounded-full padorix:shadow-md padorix:border-white"
1020
1169
  })
1021
- }) : /* @__PURE__ */ B("div", { className: "padorix:size-10" })
1170
+ }) : /* @__PURE__ */ V("div", { className: "padorix:size-10" })
1022
1171
  })
1023
1172
  });
1024
1173
  }
1025
1174
  //#endregion
1026
1175
  //#region lib/chats/chatmessages/chat-delete-selector.tsx
1027
- function Ye(e) {
1176
+ function Qe(e) {
1028
1177
  let { workspace: t } = k((e) => e.data), n = e.messagesToDelete?.find((t) => t === e.data?.id);
1029
- return /* @__PURE__ */ B("div", {
1178
+ return /* @__PURE__ */ V("div", {
1030
1179
  style: { background: n ? String(t?.widget?.colorScheme) : "#e4e4e7" },
1031
1180
  onClick: () => e.handleDeleteAction(e.data?.id),
1032
1181
  className: "padorix:size-6 padorix:rounded-md padorix:border padorix:border-gray-300 padorix:text-base padorix:cursor-pointer padorix:transition-all padorix:mb-3 padorix:absolute padorix:top-0 padorix:z-10 padorix:active:scale-150",
1033
- children: /* @__PURE__ */ B("div", {
1182
+ children: /* @__PURE__ */ V("div", {
1034
1183
  className: "padorix:size-6 padorix:flex padorix:items-center padorix:justify-center",
1035
- children: B(n ? Ae : De, { className: "padorix:text-white" })
1184
+ children: V(n ? ke : Ee, { className: "padorix:text-white" })
1036
1185
  })
1037
1186
  });
1038
1187
  }
1039
1188
  //#endregion
1040
1189
  //#region lib/chats/chatmessages/chat-image-viewer.tsx
1041
- function Xe(e) {
1190
+ function $e(e) {
1042
1191
  let t = e.data?.images, n = [];
1043
1192
  if (Array.isArray(t)) n = t.filter((e) => typeof e == "string" && e.length > 0);
1044
1193
  else if (typeof t == "string") try {
@@ -1047,11 +1196,11 @@ function Xe(e) {
1047
1196
  } catch {
1048
1197
  n = t.length > 0 ? [t] : [];
1049
1198
  }
1050
- return /* @__PURE__ */ B("div", {
1199
+ return /* @__PURE__ */ V("div", {
1051
1200
  className: "padorix:min-w-0 padorix:max-w-full",
1052
- children: n.length > 0 && /* @__PURE__ */ B("div", {
1201
+ children: n.length > 0 && /* @__PURE__ */ V("div", {
1053
1202
  className: "padorix:flex padorix:min-w-0 padorix:max-w-full padorix:flex-col padorix:items-end padorix:gap-1",
1054
- children: n.map((e, t) => /* @__PURE__ */ B("img", {
1203
+ children: n.map((e, t) => /* @__PURE__ */ V("img", {
1055
1204
  src: e,
1056
1205
  alt: "Attachment",
1057
1206
  loading: "lazy",
@@ -1063,7 +1212,7 @@ function Xe(e) {
1063
1212
  }
1064
1213
  //#endregion
1065
1214
  //#region lib/chats/chatmessages/chat-reply.tsx
1066
- function Ze(e) {
1215
+ function et(e) {
1067
1216
  if (Array.isArray(e)) return e.filter((e) => typeof e == "string" && e.length > 0);
1068
1217
  if (typeof e == "string" && e.length > 0) try {
1069
1218
  let t = JSON.parse(e);
@@ -1073,17 +1222,17 @@ function Ze(e) {
1073
1222
  }
1074
1223
  return [];
1075
1224
  }
1076
- function Qe(e) {
1077
- let t = e.data?.replies?.[0], n = t?.id ? Ze(t?.repliedTo?.images) : [], r = Ze(t?.repliedTo?.message).join(" ");
1078
- if (t?.id) return /* @__PURE__ */ B("div", {
1225
+ function tt(e) {
1226
+ let t = e.data?.replies?.[0], n = t?.id ? et(t?.repliedTo?.images) : [], r = et(t?.repliedTo?.message).join(" ");
1227
+ if (t?.id) return /* @__PURE__ */ V("div", {
1079
1228
  className: "padorix:px-0.5 padorix:pt-0.5",
1080
- children: /* @__PURE__ */ V("div", {
1229
+ children: /* @__PURE__ */ H("div", {
1081
1230
  onClick: () => e.handleScrollToTargetMessage(String(t?.replyId)),
1082
1231
  className: `padorix:flex padorix:flex-row padorix:items-center padorix:gap-1 padorix:p-2 padorix:mb-1 padorix:text-xs padorix:rounded padorix:border-l-4 padorix:border-white padorix:cursor-pointer padorix:hover:brightness-95 padorix:transition-all ${e.isSender ? "padorix:bg-black/20 padorix:text-gray-200" : "padorix:bg-gray-200 padorix:text-gray-700"}`,
1083
- children: [/* @__PURE__ */ V("div", {
1232
+ children: [/* @__PURE__ */ H("div", {
1084
1233
  className: "padorix:w-full",
1085
1234
  children: [r.slice(0, 40), r.length > 40 ? "..." : ""]
1086
- }), n?.length > 0 && /* @__PURE__ */ B("div", { children: /* @__PURE__ */ B("img", {
1235
+ }), n?.length > 0 && /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V("img", {
1087
1236
  src: n[0],
1088
1237
  alt: "Padorix",
1089
1238
  className: "padorix:size-6"
@@ -1093,107 +1242,107 @@ function Qe(e) {
1093
1242
  }
1094
1243
  //#endregion
1095
1244
  //#region lib/chats/chatmessages/single-message-pop.tsx
1096
- function $e(t) {
1097
- let n = O(), { reply: i, conversation: a, workspace: o } = k((e) => e.data), s = v(o?.widget?.darkMode, !1);
1098
- function c(e) {
1099
- e.stopPropagation(), t.setOpens((e) => !e);
1245
+ function nt(e) {
1246
+ let t = O(), { reply: n, conversation: r, workspace: i } = k((e) => e.data), a = _(i?.widget?.darkMode, !1);
1247
+ function o(t) {
1248
+ t.stopPropagation(), e.setOpens((e) => !e);
1100
1249
  }
1101
- function u() {
1102
- n(r({
1103
- ...i,
1104
- messageId: t.data?.id
1105
- })), n(e(t.data)), t.handleClick();
1250
+ function l() {
1251
+ t(s({
1252
+ ...n,
1253
+ messageId: e.data?.id
1254
+ })), t(g(e.data)), e.handleClick();
1106
1255
  }
1107
- function d(e) {
1108
- t.handleStarMessage(t.data?.id, e), t.handleClick();
1256
+ function u(t) {
1257
+ e.handleStarMessage(e.data?.id, t), e.handleClick();
1109
1258
  }
1110
- function f() {
1111
- m(String(t.data?.message)), t.handleClick();
1259
+ function d() {
1260
+ p(String(e.data?.message)), e.handleClick();
1112
1261
  }
1113
- async function p() {
1114
- let e = Array.isArray(t.data.images) ? t.data.images : [];
1115
- for (let [t, n] of e.entries()) {
1116
- let e = (() => {
1262
+ async function f() {
1263
+ let t = Array.isArray(e.data.images) ? e.data.images : [];
1264
+ for (let [e, n] of t.entries()) {
1265
+ let t = (() => {
1117
1266
  try {
1118
- let e = new URL(n, window.location.href).pathname, r = decodeURIComponent(e.split("/").pop() || "");
1119
- return /\.[a-z0-9]+$/i.test(r) ? r : `image-${t + 1}.jpg`;
1267
+ let t = new URL(n, window.location.href).pathname, r = decodeURIComponent(t.split("/").pop() || "");
1268
+ return /\.[a-z0-9]+$/i.test(r) ? r : `image-${e + 1}.jpg`;
1120
1269
  } catch {
1121
- return `image-${t + 1}.jpg`;
1270
+ return `image-${e + 1}.jpg`;
1122
1271
  }
1123
1272
  })();
1124
1273
  try {
1125
- let t = await fetch(n);
1126
- if (!t.ok) throw Error("Unable to download image");
1127
- let r = URL.createObjectURL(await t.blob()), i = document.createElement("a");
1128
- i.href = r, i.download = e, document.body.appendChild(i), i.click(), i.remove(), window.setTimeout(() => URL.revokeObjectURL(r), 1e3);
1274
+ let e = await fetch(n);
1275
+ if (!e.ok) throw Error("Unable to download image");
1276
+ let r = URL.createObjectURL(await e.blob()), i = document.createElement("a");
1277
+ i.href = r, i.download = t, document.body.appendChild(i), i.click(), i.remove(), window.setTimeout(() => URL.revokeObjectURL(r), 1e3);
1129
1278
  } catch {
1130
1279
  let e = document.createElement("a");
1131
1280
  e.href = n, e.target = "_blank", e.rel = "noopener noreferrer", e.click();
1132
1281
  }
1133
1282
  }
1134
- t.handleClick();
1283
+ e.handleClick();
1135
1284
  }
1136
- let h = Array.isArray(t.data.images) && t.data.images.length > 0;
1137
- return /* @__PURE__ */ V(W, {
1138
- opened: t.opens,
1139
- onChange: t.setOpens,
1285
+ let m = Array.isArray(e.data.images) && e.data.images.length > 0;
1286
+ return /* @__PURE__ */ H(G, {
1287
+ opened: e.opens,
1288
+ onChange: e.setOpens,
1140
1289
  position: "top",
1141
1290
  withArrow: !0,
1142
1291
  withinPortal: !0,
1143
- portalProps: { target: b() },
1292
+ portalProps: { target: y() },
1144
1293
  zIndex: 2147483647,
1145
- children: [/* @__PURE__ */ B(W.Target, { children: /* @__PURE__ */ B("div", {
1146
- onClick: c,
1147
- className: `padorix:absolute padorix:top-0 padorix:cursor-pointer padorix:size-fit padorix:text-lg padorix:transition-all padorix:hover:scale-110 ${t.isSender, "padorix:-right-5"}`,
1148
- children: /* @__PURE__ */ B(Re, { style: { color: String(o?.widget?.colorScheme) } })
1149
- }) }), /* @__PURE__ */ B(W.Dropdown, {
1150
- className: s ? "padorix-dark" : void 0,
1294
+ children: [/* @__PURE__ */ V(G.Target, { children: /* @__PURE__ */ V("div", {
1295
+ onClick: o,
1296
+ className: `padorix:absolute padorix:top-0 padorix:cursor-pointer padorix:size-fit padorix:text-lg padorix:transition-all padorix:hover:scale-110 ${e.isSender, "padorix:-right-5"}`,
1297
+ children: /* @__PURE__ */ V(Ve, { style: { color: String(i?.widget?.colorScheme) } })
1298
+ }) }), /* @__PURE__ */ V(G.Dropdown, {
1299
+ className: a ? "padorix-dark" : void 0,
1151
1300
  styles: { dropdown: {
1152
1301
  padding: 0,
1153
1302
  minWidth: "10rem",
1154
1303
  zIndex: 2147483647,
1155
1304
  border: 0,
1156
- backgroundColor: s ? "#2a3549" : "#fff"
1305
+ backgroundColor: a ? "#2a3549" : "#fff"
1157
1306
  } },
1158
- children: /* @__PURE__ */ V("div", {
1307
+ children: /* @__PURE__ */ H("div", {
1159
1308
  className: "padorix:text-xs padorix:text-gray-800 padorix:dark:bg-[#2a3549] padorix:dark:text-white padorix:rounded-lg",
1160
1309
  children: [
1161
- a?.status === l.true && /* @__PURE__ */ V("div", {
1162
- onClick: u,
1310
+ r?.status === c.true && /* @__PURE__ */ H("div", {
1311
+ onClick: l,
1163
1312
  className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:rounded-tr-lg padorix:rounded-tl-lg padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
1164
- children: [/* @__PURE__ */ B(re, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Reply"]
1313
+ children: [/* @__PURE__ */ V(I, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Reply"]
1165
1314
  }),
1166
- t.isMessage && /* @__PURE__ */ V("div", {
1167
- onClick: f,
1315
+ e.isMessage && /* @__PURE__ */ H("div", {
1316
+ onClick: d,
1168
1317
  className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
1169
- children: [/* @__PURE__ */ B(ae, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Copy"]
1318
+ children: [/* @__PURE__ */ V(re, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Copy"]
1170
1319
  }),
1171
- h && /* @__PURE__ */ V("div", {
1172
- onClick: p,
1320
+ m && /* @__PURE__ */ H("div", {
1321
+ onClick: f,
1173
1322
  className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
1174
1323
  children: [
1175
- /* @__PURE__ */ B(Oe, { className: "padorix:inline padorix:size-4 padorix:mr-3" }),
1324
+ /* @__PURE__ */ V(De, { className: "padorix:inline padorix:size-4 padorix:mr-3" }),
1176
1325
  " Download image",
1177
- t.data.images.length > 1 ? "s" : ""
1326
+ e.data.images.length > 1 ? "s" : ""
1178
1327
  ]
1179
1328
  }),
1180
- a?.status === l.true && /* @__PURE__ */ V("div", {
1181
- onClick: () => d(t.data?.starred === l.true ? l.false : l.true),
1329
+ r?.status === c.true && /* @__PURE__ */ H("div", {
1330
+ onClick: () => u(e.data?.starred === c.true ? c.false : c.true),
1182
1331
  className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
1183
1332
  children: [
1184
- /* @__PURE__ */ B(le, { className: "padorix:inline padorix:size-4 padorix:mr-3" }),
1333
+ /* @__PURE__ */ V(R, { className: "padorix:inline padorix:size-4 padorix:mr-3" }),
1185
1334
  " ",
1186
- t.data?.starred === l.true ? "Unstar" : "Star",
1187
- t.data?.starred === l.true && /* @__PURE__ */ B(Ve, { className: "padorix:size-2 padorix:inline padorix:text-amber-400 padorix:ml-1" })
1335
+ e.data?.starred === c.true ? "Unstar" : "Star",
1336
+ e.data?.starred === c.true && /* @__PURE__ */ V(We, { className: "padorix:size-2 padorix:inline padorix:text-amber-400 padorix:ml-1" })
1188
1337
  ]
1189
1338
  }),
1190
- t.moreActions,
1191
- a?.status === l.true && t.isSender && t.canDeleteMessage && /* @__PURE__ */ B("div", {
1339
+ e.moreActions,
1340
+ r?.status === c.true && e.isSender && e.canDeleteMessage && /* @__PURE__ */ V("div", {
1192
1341
  className: "padorix:border-t padorix:border-gray-200 padorix:dark:border-gray-500",
1193
- children: /* @__PURE__ */ V("div", {
1194
- onClick: () => t.handleDeleteAction(t.data?.id),
1342
+ children: /* @__PURE__ */ H("div", {
1343
+ onClick: () => e.handleDeleteAction(e.data?.id),
1195
1344
  className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:rounded-br-lg padorix:rounded-bl-lg padorix:text-red-500 padorix:dark:text-red-400 padorix:hover:bg-red-50 padorix:hover:dark:bg-gray-600 padorix:transition-all",
1196
- children: [/* @__PURE__ */ B(ue, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Delete"]
1345
+ children: [/* @__PURE__ */ V(ce, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Delete"]
1197
1346
  })
1198
1347
  })
1199
1348
  ]
@@ -1203,8 +1352,8 @@ function $e(t) {
1203
1352
  }
1204
1353
  //#endregion
1205
1354
  //#region lib/chats/chatmessages/chat-single-message.tsx
1206
- function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage: r, messages: i, userType: a, moreActions: o }) {
1207
- let [s, c] = A.useState(!1), [u, d] = A.useState(!1), { workspace: f } = k((e) => e.data), p = String(e?.message ?? "").trim().length > 0, m = a === "VISITOR", h = f?.widget?.notifications?.customerDeletesMessage === l.true, g = !m || h, _ = m ? e?.senderType === "VISITOR" : e?.senderType !== "VISITOR", v = A.useMemo(() => {
1355
+ function rt({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage: r, messages: i, userType: a, moreActions: o }) {
1356
+ let [s, l] = A.useState(!1), [u, d] = A.useState(!1), { workspace: f } = k((e) => e.data), p = String(e?.message ?? "").trim().length > 0, m = a === "VISITOR", h = f?.widget?.notifications?.customerDeletesMessage === c.true, g = !m || h, _ = m ? e?.senderType === "VISITOR" : e?.senderType !== "VISITOR", v = A.useMemo(() => {
1208
1357
  if (!i?.length || !e?.id) return !1;
1209
1358
  let t = i.findIndex((t) => t.id === e.id);
1210
1359
  if (t === -1) return !1;
@@ -1217,7 +1366,7 @@ function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage:
1217
1366
  e.id,
1218
1367
  e.senderType
1219
1368
  ]), y = A.useCallback(() => {
1220
- c(!1);
1369
+ l(!1);
1221
1370
  }, []), b = A.useCallback((e) => {
1222
1371
  n(e), y();
1223
1372
  }, [n, y]), x = A.useCallback((t) => {
@@ -1249,7 +1398,7 @@ function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage:
1249
1398
  return () => {
1250
1399
  window.clearTimeout(e);
1251
1400
  };
1252
- }, [u]), /* @__PURE__ */ B(z, { children: /* @__PURE__ */ V("div", {
1401
+ }, [u]), /* @__PURE__ */ V(B, { children: /* @__PURE__ */ H("div", {
1253
1402
  id: `padorix-msg-${e.id}`,
1254
1403
  className: `
1255
1404
  padorix:flex
@@ -1264,22 +1413,22 @@ function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage:
1264
1413
  ${u ? "padorix:bg-gray-100/80 padorix:scale-[1.01]" : "padorix:bg-transparent"}
1265
1414
  `,
1266
1415
  children: [
1267
- !_ && /* @__PURE__ */ B(Je, {
1416
+ !_ && /* @__PURE__ */ V(Ze, {
1268
1417
  isLastInGroup: v,
1269
1418
  img: String(f?.logo ?? "")
1270
1419
  }),
1271
- g && t?.length > 0 && e?.deleted === l.false && /* @__PURE__ */ B(Ye, {
1420
+ g && t?.length > 0 && e?.deleted === c.false && /* @__PURE__ */ V(Qe, {
1272
1421
  data: e,
1273
1422
  handleDeleteAction: b,
1274
1423
  messagesToDelete: t
1275
1424
  }),
1276
- /* @__PURE__ */ B(qe, {
1425
+ /* @__PURE__ */ V(Xe, {
1277
1426
  isLastInGroup: v,
1278
1427
  isSender: _,
1279
1428
  data: e,
1280
- children: /* @__PURE__ */ V("div", {
1429
+ children: /* @__PURE__ */ H("div", {
1281
1430
  className: "padorix:w-full padorix:px-1",
1282
- children: [e?.deleted === l.false && /* @__PURE__ */ B($e, {
1431
+ children: [e?.deleted === c.false && /* @__PURE__ */ V(nt, {
1283
1432
  data: e,
1284
1433
  deleteAction: n,
1285
1434
  handleStarMessage: r,
@@ -1287,88 +1436,88 @@ function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage:
1287
1436
  isMessage: p,
1288
1437
  handleClick: y,
1289
1438
  handleDeleteAction: b,
1290
- setOpens: c,
1439
+ setOpens: l,
1291
1440
  opens: s,
1292
1441
  moreActions: o,
1293
1442
  canDeleteMessage: g
1294
- }), /* @__PURE__ */ B("div", {
1443
+ }), /* @__PURE__ */ V("div", {
1295
1444
  className: "padorix:p-1 padorix:whitespace-pre-wrap",
1296
- children: e?.deleted === l.true ? /* @__PURE__ */ V("div", {
1445
+ children: e?.deleted === c.true ? /* @__PURE__ */ H("div", {
1297
1446
  className: "padorix:italic padorix:px-3 padorix:py-2 padorix:rounded-lg padorix:bg-gray-200/60 padorix:text-gray-500 padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
1298
- children: [/* @__PURE__ */ B(Ge, {}), /* @__PURE__ */ B("span", { children: "This message was deleted" })]
1299
- }) : /* @__PURE__ */ V(z, { children: [
1300
- /* @__PURE__ */ B(Qe, {
1447
+ children: [/* @__PURE__ */ V(Je, {}), /* @__PURE__ */ V("span", { children: "This message was deleted" })]
1448
+ }) : /* @__PURE__ */ H(B, { children: [
1449
+ /* @__PURE__ */ V(tt, {
1301
1450
  data: e,
1302
1451
  isSender: _,
1303
1452
  handleScrollToTargetMessage: x
1304
1453
  }),
1305
- /* @__PURE__ */ B(Xe, { data: e }),
1306
- p && /* @__PURE__ */ B("div", {
1454
+ /* @__PURE__ */ V($e, { data: e }),
1455
+ p && /* @__PURE__ */ V("div", {
1307
1456
  className: "padorix:text-[0.8rem] padorix:whitespace-pre-wrap padorix:mt-2",
1308
- children: Ke(String(e.message))
1457
+ children: Ye(String(e.message))
1309
1458
  }),
1310
- /* @__PURE__ */ V("div", {
1459
+ /* @__PURE__ */ H("div", {
1311
1460
  className: "padorix:text-right padorix:text-[12px] padorix:mt-1 padorix:flex padorix:items-center padorix:justify-end padorix:gap-1 padorix:pl-2",
1312
1461
  children: [
1313
- !m && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B("span", {
1462
+ !m && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("span", {
1314
1463
  className: "padorix:text-[0.65rem]",
1315
1464
  children: e?.senderType
1316
- }), /* @__PURE__ */ B(ce, {})] }),
1317
- /* @__PURE__ */ B("span", {
1465
+ }), /* @__PURE__ */ V(L, {})] }),
1466
+ /* @__PURE__ */ V("span", {
1318
1467
  className: "padorix:text-[0.55rem]",
1319
- children: G(e?.createdAt).format("hh:mm A")
1468
+ children: K(e?.createdAt).format("hh:mm A")
1320
1469
  }),
1321
- e?.starred === l.true && /* @__PURE__ */ B(de, { children: /* @__PURE__ */ B(Ve, { className: "padorix:size-3 padorix:text-amber-400" }) }),
1322
- _ && /* @__PURE__ */ B(We, { className: "padorix:inline padorix:text-base padorix:size-3" })
1470
+ e?.starred === c.true && /* @__PURE__ */ V(le, { children: /* @__PURE__ */ V(We, { className: "padorix:size-3 padorix:text-amber-400" }) }),
1471
+ _ && /* @__PURE__ */ V(qe, { className: "padorix:inline padorix:text-base padorix:size-3" })
1323
1472
  ]
1324
1473
  })
1325
1474
  ] })
1326
1475
  })]
1327
1476
  })
1328
1477
  }),
1329
- m ? e?.deleted === l.false && _ && /* @__PURE__ */ B(Je, {
1478
+ m ? e?.deleted === c.false && _ && /* @__PURE__ */ V(Ze, {
1330
1479
  isLastInGroup: v,
1331
1480
  img: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAADAFBMVEVMaXFUVFRVYH8AAABTU6lVYID///9UX4B7e39VYH+qt/9VYIBVX4BMV3nm6+xVYIDn6+xKXH9OWnu0u8dtrq5JVXfm6+xVYIBJVHZNWXrm6+zq7+9VYIChqbhXY4JUX4ChqrlVX4Hd4uVRYICvt8NVYYFXYoJWYIFzfJZVYYFVYIFVYIFVYIDs8fHK0Njt8vFVYIBTXn5KVnfn7e1UYIBVYIHIztZWYIHx9fRWYoKkrLtWYIFWYoNXYYJXX4FWYYFWYYJWYoJdZ4ZXYoJrdpHl6utVYIBVYH9rdZBWYYFVYIBWXX1UXnzn7OxUX4BVYIBbZoRWYYDh5ulVYYJWYYHu8/N+h57CydJ7hZ1VYYFeaYdWYYG/xtCpsL9aZIRaZYOLk6jw9PPl6etWYYLv8/fr9fC/zL+yusagqLjp7e6zucbX3eJPW3tRXH1gaoja4OSutMPGzNTk6Oqmrr1XV4dVX4Dn7O3n7O3n7O3m7Ozm6utVYH/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CFxqO4Tp4cWH9go2j+2hGT03t6u9CEqwZDetfc9lJAQzcdmmIQNO1/uqR7COqQl9ry8c0M0r99HQgKad+j77rQoIaSlddf9fl6Ur38eAXppf6g70RAF+Yn/Of3Cw2hI/nshJDy4//uegLiYrDYEeupeOJgwVPfnILx0aEtXXSI0JPAP67q2HHo4Ju65OmkT1tC8nW+FejqrDWkCIBKx9/au0FsfzcMqvl+NYmTcm2x88P0/dXaFvByIxMF9pxmqvaFTdZ++f3AjitHbX/gAlHvchocP7Bt2+lR3uzfRYOBwJPY6xp4NhupAe/ep0LB9Bx7c0LuLxNrU93MYEr786rO//s3Q3nWq53RdvddrNHq99XWne051tRv+8a8DX33J/yh23A/MEJv4fzZ+fvDv33y9f++nXwxLS1v3xV/27v/6m38enLeBL3cTNony/n9GHU2UlcLeHAAAAABJRU5ErkJggg=="
1332
- }) : /* @__PURE__ */ B("div", { className: "padorix:size-7" })
1481
+ }) : /* @__PURE__ */ V("div", { className: "padorix:size-7" })
1333
1482
  ]
1334
1483
  }) });
1335
1484
  }
1336
1485
  //#endregion
1337
1486
  //#region lib/chats/newchat/chat-input.tsx
1338
- var $ = M(({ type: e = "text", formtype: t = "input", ...n }, r) => /* @__PURE__ */ B(R, { children: /* @__PURE__ */ V("div", {
1487
+ var $ = M(({ type: e = "text", formtype: t = "input", ...n }, r) => /* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
1339
1488
  className: "padorix:mb-4",
1340
1489
  children: [
1341
- /* @__PURE__ */ V("div", {
1490
+ /* @__PURE__ */ H("div", {
1342
1491
  className: "padorix:mb-1 padorix:ml-2 padorix:text-[0.8rem] padorix:font-medium",
1343
1492
  children: [
1344
1493
  n.content,
1345
1494
  " ",
1346
- /* @__PURE__ */ B("span", {
1495
+ /* @__PURE__ */ V("span", {
1347
1496
  className: "padorix:text-red-600",
1348
1497
  children: "*"
1349
1498
  }),
1350
1499
  " "
1351
1500
  ]
1352
1501
  }),
1353
- t === "input" && /* @__PURE__ */ B("input", {
1502
+ t === "input" && /* @__PURE__ */ V("input", {
1354
1503
  type: e,
1355
1504
  ...n,
1356
1505
  ref: r,
1357
1506
  placeholder: n.placeholder,
1358
1507
  className: `padorix:w-full padorix:bg-slate-100 padorix:rounded-md padorix:p-3 padorix:outline-none padorix:text-sm! padorix:max-md:text-base! padorix:border ${n.error ? "padorix:border-red-400" : "padorix:border-transparent"}`
1359
1508
  }),
1360
- t === "textarea" && /* @__PURE__ */ B("textarea", {
1509
+ t === "textarea" && /* @__PURE__ */ V("textarea", {
1361
1510
  ...n,
1362
1511
  ref: r,
1363
1512
  placeholder: "Leave a message",
1364
1513
  className: `padorix:w-full padorix:bg-slate-100 padorix-scrolls padorix:rounded-md padorix:p-3 padorix:outline-none padorix:resize-none padorix:text-sm! padorix:max-md:text-base! padorix:h-24 padorix:border ${n.error ? "padorix:border-red-400" : "padorix:border-transparent"}`
1365
1514
  }),
1366
- n.error && /* @__PURE__ */ B("div", {
1515
+ n.error && /* @__PURE__ */ V("div", {
1367
1516
  className: "padorix:text-red-400 padorix:text-xs",
1368
1517
  children: n.error
1369
1518
  })
1370
1519
  ]
1371
- }) })), tt = [
1520
+ }) })), it = [
1372
1521
  {
1373
1522
  index: 1,
1374
1523
  color: "padorix:text-red-600"
@@ -1390,31 +1539,31 @@ var $ = M(({ type: e = "text", formtype: t = "input", ...n }, r) => /* @__PURE__
1390
1539
  color: "padorix:text-green-400"
1391
1540
  }
1392
1541
  ];
1393
- function nt(e) {
1542
+ function at(e) {
1394
1543
  function t(t) {
1395
1544
  let n = t?.split("-")[1];
1396
1545
  if (e.value !== t) return e.setFieldValue?.(e.valueName || "", t), e.setFieldValue2?.(e.valueName2 || "", n);
1397
1546
  e.setFieldValue?.(e.valueName || "", ""), e.setFieldValue2?.(e.valueName2 || "", "");
1398
1547
  }
1399
- return /* @__PURE__ */ V("div", {
1548
+ return /* @__PURE__ */ H("div", {
1400
1549
  className: "padorix:mb-5",
1401
1550
  children: [
1402
- /* @__PURE__ */ B("div", {
1551
+ /* @__PURE__ */ V("div", {
1403
1552
  className: "",
1404
1553
  children: e.content
1405
1554
  }),
1406
- /* @__PURE__ */ B("div", {
1555
+ /* @__PURE__ */ V("div", {
1407
1556
  className: "padorix:flex padorix:items-center padorix:gap-3",
1408
- children: Object.values(y).map((n, r) => {
1409
- let i = Object.values(y).findIndex((t) => t?.split("-")[1] === e.value2) + 1, a = r + 1 <= i, o = tt.find((e) => e.index === i);
1410
- return /* @__PURE__ */ B("div", {
1557
+ children: Object.values(v).map((n, r) => {
1558
+ let i = Object.values(v).findIndex((t) => t?.split("-")[1] === e.value2) + 1, a = r + 1 <= i, o = it.find((e) => e.index === i);
1559
+ return /* @__PURE__ */ V("div", {
1411
1560
  onClick: () => e.tag === "write" ? t(n) : {},
1412
1561
  className: `${e.tag === "write" ? "padorix:cursor-pointer padorix:active:scale-125 padorix:transition-all padorix:hover:scale-110" : ""} padorix:text-3xl`,
1413
- children: /* @__PURE__ */ B(Ve, { className: a ? o?.color : "padorix:text-gray-400" })
1562
+ children: /* @__PURE__ */ V(We, { className: a ? o?.color : "padorix:text-gray-400" })
1414
1563
  }, r);
1415
1564
  })
1416
1565
  }),
1417
- /* @__PURE__ */ B("div", {
1566
+ /* @__PURE__ */ V("div", {
1418
1567
  className: "padorix:mt-2 padorix:text-sm padorix:italic padorix:text-gray-600",
1419
1568
  children: e.value?.split("-")[0]?.replace("_", " ")
1420
1569
  })
@@ -1423,8 +1572,8 @@ function nt(e) {
1423
1572
  }
1424
1573
  //#endregion
1425
1574
  //#region lib/chats/chatmessages/chat-feedback-form.tsx
1426
- function rt() {
1427
- let { sender: e, conversation: t, workspace: n } = k((e) => e.data), [r, i] = N(!1), a = O(), s = Fe(w.VISITOR), c = K({
1575
+ function ot() {
1576
+ let { sender: e, conversation: t, workspace: r } = k((e) => e.data), [i, a] = N(!1), o = O(), s = Re(w.VISITOR), c = fe({
1428
1577
  mode: "uncontrolled",
1429
1578
  initialValues: {
1430
1579
  workspaceId: t?.workspaceId,
@@ -1445,23 +1594,23 @@ function rt() {
1445
1594
  });
1446
1595
  async function l(e) {
1447
1596
  if (s) {
1448
- i(!0);
1597
+ a(!0);
1449
1598
  try {
1450
- a(o(await f.submitFeedback(s, {
1599
+ o(n(await d.submitFeedback(s, {
1451
1600
  comment: e.comment,
1452
1601
  satisfactory: e.satisfactory?.split("-")[0]?.replace("_", " "),
1453
1602
  rating: Number(e.rating)
1454
1603
  }))), c.reset();
1455
1604
  } catch (e) {
1456
- i(!1), d(e.message, "error");
1605
+ a(!1), u(e.message, "error");
1457
1606
  }
1458
1607
  }
1459
1608
  }
1460
- return r ? null : /* @__PURE__ */ V("form", {
1609
+ return i ? null : /* @__PURE__ */ H("form", {
1461
1610
  onSubmit: c.onSubmit(l),
1462
1611
  className: "padorix:w-[97%] padorix:mx-auto padorix:border padorix:border-gray-200 padorix:rounded-xl padorix:p-3",
1463
1612
  children: [
1464
- /* @__PURE__ */ B(nt, {
1613
+ /* @__PURE__ */ V(at, {
1465
1614
  content: "",
1466
1615
  value: c.values.satisfactory,
1467
1616
  value2: c.values.rating,
@@ -1478,10 +1627,10 @@ function rt() {
1478
1627
  ...c.getInputProps("comment"),
1479
1628
  key: c.key("comment")
1480
1629
  }),
1481
- /* @__PURE__ */ B("div", {
1630
+ /* @__PURE__ */ V("div", {
1482
1631
  className: "padorix:mt-5",
1483
- children: /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
1484
- style: { background: c.submitting ? "" : String(n?.widget?.colorScheme) },
1632
+ children: /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
1633
+ style: { background: c.submitting ? "" : String(r?.widget?.colorScheme) },
1485
1634
  className: `padorix:cursor-pointer ${c.submitting ? "padorix:bg-slate-500" : ""} padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
1486
1635
  children: "Submit your feedback"
1487
1636
  }) })
@@ -1491,47 +1640,47 @@ function rt() {
1491
1640
  }
1492
1641
  //#endregion
1493
1642
  //#region lib/chats/chatmessages/end-chat-confirmation.tsx
1494
- function it() {
1495
- let { chatToEnd: e, workspace: t } = k((e) => e.data), r = O(), [i, a] = A.useState(!1);
1643
+ function st() {
1644
+ let { chatToEnd: e, workspace: t } = k((e) => e.data), i = O(), [a, o] = A.useState(!1);
1496
1645
  function s() {
1497
- r(n(void 0));
1646
+ i(r(void 0));
1498
1647
  }
1499
1648
  async function c() {
1500
1649
  if (e) {
1501
- a(!0);
1650
+ o(!0);
1502
1651
  try {
1503
- r(o(await f.endChat({
1652
+ i(n(await d.endChat({
1504
1653
  workspaceId: e.workspaceId,
1505
1654
  conversationId: e.conversationId,
1506
1655
  senderId: e.senderId,
1507
1656
  userType: e.userType,
1508
1657
  senderName: e.senderName
1509
- }))), r(n(void 0));
1658
+ }))), i(r(void 0));
1510
1659
  } catch (e) {
1511
- d(e.message, "error");
1660
+ u(e.message, "error");
1512
1661
  } finally {
1513
- a(!1);
1662
+ o(!1);
1514
1663
  }
1515
1664
  }
1516
1665
  }
1517
- return /* @__PURE__ */ V("div", {
1666
+ return /* @__PURE__ */ H("div", {
1518
1667
  className: "padorix:w-[97%] padorix:mx-auto padorix:border padorix:border-gray-200 padorix:rounded-xl padorix:p-3",
1519
- children: [/* @__PURE__ */ B("div", {
1668
+ children: [/* @__PURE__ */ V("div", {
1520
1669
  className: "padorix:text-center padorix:text-slate-500",
1521
1670
  children: "Kindly confirm your request to end this chat session"
1522
- }), /* @__PURE__ */ B("div", {
1671
+ }), /* @__PURE__ */ V("div", {
1523
1672
  className: "padorix:border-t padorix:border-gray-200 padorix:mt-5",
1524
- children: /* @__PURE__ */ V("div", {
1673
+ children: /* @__PURE__ */ H("div", {
1525
1674
  className: "padorix:mt-2 padorix:size-fit padorix:ml-auto padorix:flex padorix:items-center padorix:gap-5",
1526
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
1675
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
1527
1676
  onClick: s,
1528
- className: `${i ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:border padorix:border-gray-200 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
1677
+ className: `${a ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:border padorix:border-gray-200 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
1529
1678
  children: "Cancel"
1530
- }) }), /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
1679
+ }) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
1531
1680
  onClick: c,
1532
- disabled: i,
1681
+ disabled: a,
1533
1682
  style: { background: String(t?.widget?.colorScheme) },
1534
- className: `${i ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
1683
+ className: `${a ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
1535
1684
  children: "End chat"
1536
1685
  }) })]
1537
1686
  })
@@ -1540,15 +1689,15 @@ function it() {
1540
1689
  }
1541
1690
  //#endregion
1542
1691
  //#region lib/chats/chatmessages/chat-messages.tsx
1543
- function at({ messagesToDelete: e, setMessagesToDelete: t, ...n }) {
1692
+ function ct({ messagesToDelete: e, setMessagesToDelete: t, ...n }) {
1544
1693
  let { conversation: r, chatToEnd: i, workspace: a } = k((e) => e.data), o = n.userType === "VISITOR";
1545
1694
  function s(n) {
1546
1695
  e.find((e) => e === n) ? t((e) => e.filter((e) => e !== n)) : t((e) => [...e, n]);
1547
1696
  }
1548
- return /* @__PURE__ */ V("div", {
1697
+ return /* @__PURE__ */ H("div", {
1549
1698
  className: "padorix:relative",
1550
1699
  children: [
1551
- n.messages.map((t) => /* @__PURE__ */ B(et, {
1700
+ n.messages.map((t) => /* @__PURE__ */ V(rt, {
1552
1701
  messagesToDelete: e,
1553
1702
  handleStarMessage: n.handleStarMessage,
1554
1703
  deleteAction: s,
@@ -1557,8 +1706,8 @@ function at({ messagesToDelete: e, setMessagesToDelete: t, ...n }) {
1557
1706
  messages: n.messages,
1558
1707
  userType: n.userType,
1559
1708
  moreActions: n.moreActions
1560
- }, t.id)),
1561
- n.isTyping && /* @__PURE__ */ B("div", {
1709
+ }, t.clientMessageId || t.id)),
1710
+ n.isTyping && /* @__PURE__ */ V("div", {
1562
1711
  role: "status",
1563
1712
  "aria-label": "Typing",
1564
1713
  style: n.isOwnTyping ? { backgroundColor: a?.widget?.colorScheme || "#6c63ff" } : void 0,
@@ -1567,19 +1716,19 @@ function at({ messagesToDelete: e, setMessagesToDelete: t, ...n }) {
1567
1716
  0,
1568
1717
  1,
1569
1718
  2
1570
- ].map((e) => /* @__PURE__ */ B("span", {
1719
+ ].map((e) => /* @__PURE__ */ V("span", {
1571
1720
  className: n.isOwnTyping ? "padorix:size-2 padorix:animate-bounce padorix:rounded-full padorix:bg-white" : "padorix:size-2 padorix:animate-bounce padorix:rounded-full padorix:bg-gray-500 padorix:dark:bg-gray-200",
1572
1721
  style: { animationDelay: `${e * 120}ms` }
1573
1722
  }, e))
1574
1723
  }),
1575
- o && r?.status === l.false && /* @__PURE__ */ B(rt, {}),
1576
- i?.isEndChat === l.true && /* @__PURE__ */ B(it, {})
1724
+ o && r?.status === c.false && /* @__PURE__ */ V(ot, {}),
1725
+ i?.isEndChat === c.true && /* @__PURE__ */ V(st, {})
1577
1726
  ]
1578
1727
  });
1579
1728
  }
1580
1729
  //#endregion
1581
1730
  //#region node_modules/react-icons/rx/index.mjs
1582
- function ot(e) {
1731
+ function lt(e) {
1583
1732
  return Z({
1584
1733
  tag: "svg",
1585
1734
  attr: {
@@ -1598,37 +1747,37 @@ function ot(e) {
1598
1747
  }
1599
1748
  //#endregion
1600
1749
  //#region lib/chats/chatmessages/chat-message-skeleton.tsx
1601
- function st(e) {
1602
- return /* @__PURE__ */ B(R, {
1750
+ function ut(e) {
1751
+ return /* @__PURE__ */ V(z, {
1603
1752
  style: { width: `${Math.floor(Math.random() * 100 + (e.index + 15))}%` },
1604
1753
  className: "padorix:w-fit padorix:h-fit padorix:max-w-[91%] padorix:relative padorix:bottom-3 padorix:md:max-w-[80%] padorix:mb-1.5 padorix:ml-auto padorix:rounded-t-xl padorix:rounded-bl-xl padorix:bg-gray-100 padorix:animate-pulse padorix:text-white",
1605
- children: /* @__PURE__ */ B("div", { className: "padorix:px-1 padorix:h-12" })
1754
+ children: /* @__PURE__ */ V("div", { className: "padorix:px-1 padorix:h-12" })
1606
1755
  });
1607
1756
  }
1608
1757
  //#endregion
1609
1758
  //#region lib/chats/chatScreen/chat-container.tsx
1610
- var ct = 3500;
1611
- function lt(e) {
1759
+ var dt = 3500;
1760
+ function ft(e) {
1612
1761
  return e ? Array.isArray(e) ? e.join("\n") : String(e) : "";
1613
1762
  }
1614
- function ut({ styles: t, userType: i, ...a }) {
1615
- let s = O(), c = A.useRef(null), u = A.useRef(null), [m, h] = A.useState(!1), [g, _] = A.useState([]), [v, y] = A.useState(!1), [b, x] = A.useState(!1), [S, C] = A.useState(null), T = A.useRef(null), j = A.useRef(null), [M, N] = A.useState([]), P = A.useRef(/* @__PURE__ */ new Set()), { sender: F, workspace: re, reply: ie, conversation: ae } = k((e) => e.data), oe = S !== null, se = !!(S?.senderId && S.senderId === F?.senderId), I = A.useMemo(() => i === w.VISITOR ? {
1616
- ...F,
1617
- workspaceId: re?.id,
1618
- userType: i
1619
- } : a.sender, [
1620
- i,
1621
- F,
1622
- re?.id,
1623
- a.sender
1624
- ]), ce = JSON.stringify([
1625
- I?.workspaceId,
1626
- I?.conversationId,
1627
- I?.senderId,
1628
- I?.userType ?? i,
1629
- I?.fullName
1630
- ]), L = A.useMemo(() => {
1631
- let [e, t, n, r, i] = JSON.parse(ce);
1763
+ function pt({ styles: e, userType: t, ...i }) {
1764
+ let a = O(), o = A.useRef(null), l = A.useRef(null), [p, m] = A.useState(!1), [h, _] = A.useState([]), [v, y] = A.useState(!1), [b, S] = A.useState(!1), [C, T] = A.useState(null), j = A.useRef(null), M = A.useRef(null), [N, P] = A.useState([]), F = A.useRef(/* @__PURE__ */ new Set()), { sender: I, workspace: ne, reply: re, conversation: ie } = k((e) => e.data), ae = C !== null, oe = !!(C?.senderId && C.senderId === I?.senderId), L = A.useMemo(() => t === w.VISITOR ? {
1765
+ ...I,
1766
+ workspaceId: ne?.id,
1767
+ userType: t
1768
+ } : i.sender, [
1769
+ t,
1770
+ I,
1771
+ ne?.id,
1772
+ i.sender
1773
+ ]), se = JSON.stringify([
1774
+ L?.workspaceId,
1775
+ L?.conversationId,
1776
+ L?.senderId,
1777
+ L?.userType ?? t,
1778
+ L?.fullName
1779
+ ]), R = A.useMemo(() => {
1780
+ let [e, t, n, r, i] = JSON.parse(se);
1632
1781
  return !e || !t || !n ? null : {
1633
1782
  workspaceId: String(e),
1634
1783
  conversationId: String(t),
@@ -1636,209 +1785,218 @@ function ut({ styles: t, userType: i, ...a }) {
1636
1785
  userType: String(r),
1637
1786
  senderName: i ? String(i) : void 0
1638
1787
  };
1639
- }, [ce]), le = String(I?.conversationId ?? ""), de = A.useRef(le);
1640
- de.current = le;
1641
- let z = A.useCallback((e) => e == null || e === "" ? !0 : String(e) === de.current, []);
1642
- function H() {
1643
- ee(c), u.current?.scrollIntoView({ behavior: "smooth" });
1788
+ }, [se]), le = String(L?.conversationId ?? ""), B = A.useRef(le);
1789
+ B.current = le;
1790
+ let U = A.useCallback((e) => e == null || e === "" ? !0 : String(e) === B.current, []);
1791
+ function W() {
1792
+ x(o), l.current?.scrollIntoView({ behavior: "smooth" });
1644
1793
  }
1645
- let U = A.useCallback((e) => {
1794
+ let G = (e, t) => e.clientMessageId || !t.clientMessageId ? e : {
1795
+ ...e,
1796
+ clientMessageId: t.clientMessageId
1797
+ }, K = A.useCallback((e) => {
1646
1798
  let t = e.message;
1647
- if (!t || !z(t.conversationId)) return;
1799
+ if (!t || !U(t.conversationId)) return;
1648
1800
  let n = t.clientMessageId;
1649
- n && P.current.delete(n), N((e) => {
1801
+ n && F.current.delete(n), P((e) => {
1650
1802
  let r = e.findIndex((e) => e.id === t.id);
1651
- if (r !== -1) return e.map((e, n) => n === r ? t : e);
1803
+ if (r !== -1) return e.map((e, n) => n === r ? G(t, e) : e);
1652
1804
  if (n) {
1653
1805
  let r = e.findIndex((e) => e.clientMessageId === n || e.id === n);
1654
- if (r !== -1) return e.map((e, n) => n === r ? t : e);
1806
+ if (r !== -1) return e.map((e, n) => n === r ? G(t, e) : e);
1655
1807
  }
1656
- let i = lt(t.message), a = e.findIndex((e) => {
1657
- let n = !!(e.id && e.id.length >= 32), r = String(e.senderId) === String(t.senderId), a = lt(e.message) === i;
1808
+ let i = ft(t.message), a = e.findIndex((e) => {
1809
+ let n = !!(e.id && e.id.length >= 32), r = String(e.senderId) === String(t.senderId), a = ft(e.message) === i;
1658
1810
  return n && r && a;
1659
1811
  });
1660
- return a === -1 ? [...e, t] : e.map((e, n) => n === a ? t : e);
1661
- }), x(!1), setTimeout(() => {
1662
- H();
1812
+ return a === -1 ? [...e, t] : e.map((e, n) => n === a ? G(t, e) : e);
1813
+ }), S(!1), setTimeout(() => {
1814
+ W();
1663
1815
  }, 300);
1664
- }, [z]), W = A.useCallback((e) => {
1665
- U(e);
1666
- }, [U]), G = A.useCallback((e) => {
1667
- if (!P.current.has(e)) return;
1668
- P.current.delete(e);
1816
+ }, [U]), de = A.useCallback((e) => {
1817
+ K(e);
1818
+ }, [K]), fe = A.useCallback((e) => {
1819
+ if (!F.current.has(e)) return;
1820
+ F.current.delete(e);
1669
1821
  let t = [e];
1670
- N((e) => e.filter((e) => !t.includes(e.id) && (!e.clientMessageId || !t.includes(e.clientMessageId)))), x(!1);
1822
+ P((e) => e.filter((e) => !t.includes(e.id) && (!e.clientMessageId || !t.includes(e.clientMessageId)))), S(!1);
1671
1823
  }, []);
1672
- function pe(t) {
1673
- let n = !!ie?.messageId, a = crypto.randomUUID(), o = {
1674
- ...t,
1675
- clientMessageId: a,
1676
- merchantId: re?.userId,
1824
+ function pe(e) {
1825
+ let n = !!re?.messageId, r = crypto.randomUUID(), i = {
1826
+ ...e,
1827
+ clientMessageId: r,
1828
+ merchantId: ne?.userId,
1677
1829
  ...n ? {
1678
1830
  isReply: !0,
1679
- messageId: ie?.messageId
1831
+ messageId: re?.messageId
1680
1832
  } : {},
1681
- message: t.message.trim()
1682
- }, c = (/* @__PURE__ */ new Date()).toISOString(), u = {
1683
- id: a,
1684
- clientMessageId: a,
1685
- conversationId: o.conversationId,
1686
- workspaceId: o.workspaceId,
1687
- senderName: F?.fullName ?? "",
1688
- senderType: i,
1689
- senderId: o.senderId,
1690
- message: [o.message],
1691
- images: o.images ?? [],
1692
- starred: l.false,
1693
- deleted: l.false,
1694
- createdAt: c,
1695
- updatedAt: c
1833
+ message: e.message.trim()
1834
+ }, o = (/* @__PURE__ */ new Date()).toISOString(), l = {
1835
+ id: r,
1836
+ clientMessageId: r,
1837
+ conversationId: i.conversationId,
1838
+ workspaceId: i.workspaceId,
1839
+ senderName: I?.fullName ?? "",
1840
+ senderType: t,
1841
+ senderId: i.senderId,
1842
+ message: [i.message],
1843
+ images: i.images ?? [],
1844
+ starred: c.false,
1845
+ deleted: c.false,
1846
+ createdAt: o,
1847
+ updatedAt: o
1696
1848
  };
1697
- P.current.add(a), N((e) => e.some((e) => e.id === a || e.clientMessageId && e.clientMessageId === a) ? e : [...e, u]), x(!0), L && f.sendMessage(L, o).then((e) => U({ message: e })).catch((e) => {
1698
- G(a), d(e.message || "Message not sent", "error");
1699
- }), s(r(void 0)), s(e(void 0)), setTimeout(() => {
1700
- H();
1849
+ F.current.add(r), P((e) => e.some((e) => e.id === r || e.clientMessageId && e.clientMessageId === r) ? e : [...e, l]), S(!0), R && d.sendMessage(R, i).then((e) => K({ message: e })).catch((e) => {
1850
+ fe(r), u(e.message || "Message not sent", "error");
1851
+ }), a(s(void 0)), a(g(void 0)), setTimeout(() => {
1852
+ W();
1701
1853
  }, 50);
1702
1854
  }
1703
- let K = A.useCallback((e) => {
1704
- N((t) => t.some((t) => t.id === e.messageId) ? t.map((t) => t.id === e.messageId ? {
1855
+ let q = A.useCallback((e) => {
1856
+ P((t) => t.some((t) => t.id === e.messageId) ? t.map((t) => t.id === e.messageId ? {
1705
1857
  ...t,
1706
1858
  starred: e.status
1707
1859
  } : t) : t);
1708
- }, []), q = A.useCallback((e) => {
1709
- z(e?.id) && (s(o(e)), setTimeout(() => {
1710
- H();
1860
+ }, []), J = A.useCallback((e) => {
1861
+ U(e?.id) && (a(n(e)), setTimeout(() => {
1862
+ W();
1711
1863
  }, 1e3));
1712
- }, [s, z]), me = A.useCallback((e) => {
1713
- z(e?.id) && (s(o(e)), s(n(void 0)), localStorage.removeItem(p), i === w.VISITOR && te(), a.closeModal());
1864
+ }, [a, U]), me = A.useCallback((e) => {
1865
+ U(e?.id) && (a(n(e)), a(r(void 0)), localStorage.removeItem(f), t === w.VISITOR && ee(), i.closeModal());
1714
1866
  }, [
1715
- s,
1716
1867
  a,
1717
- z,
1718
- i
1868
+ i,
1869
+ U,
1870
+ t
1719
1871
  ]), he = A.useCallback((e) => {
1720
- z(e?.conversation?.id) && (N(e.messages ?? []), new Set((e.messages ?? []).map((e) => e.clientMessageId).filter(Boolean)).forEach((e) => P.current.delete(e)), s(o(e.conversation)), setTimeout(() => {
1721
- H();
1872
+ U(e?.conversation?.id) && (P((t) => {
1873
+ let n = new Map(t.map((e) => [e.id, e]));
1874
+ return (e.messages ?? []).map((e) => {
1875
+ let t = n.get(e.id);
1876
+ return t ? G(e, t) : e;
1877
+ });
1878
+ }), new Set((e.messages ?? []).map((e) => e.clientMessageId).filter(Boolean)).forEach((e) => F.current.delete(e)), a(n(e.conversation)), setTimeout(() => {
1879
+ W();
1722
1880
  }, 1e3));
1723
- }, [s, z]);
1881
+ }, [a, U]);
1724
1882
  function ge(e, t) {
1725
- L && f.starMessage(L, e, t).then(K).catch((e) => d(e.message, "error"));
1883
+ R && d.starMessage(R, e, t).then(q).catch((e) => u(e.message, "error"));
1726
1884
  }
1727
1885
  function _e(e) {
1728
1886
  let t = [];
1729
1887
  e.forEach((e) => {
1730
- let n = M.find((t) => t.id === e);
1888
+ let n = N.find((t) => t.id === e);
1731
1889
  n && t.push(n.id);
1732
- }), !(!L || t.length === 0) && f.deleteMessages(L, t).then(J).catch((e) => d(e.message, "error"));
1890
+ }), !(!R || t.length === 0) && d.deleteMessages(R, t).then(ve).catch((e) => u(e.message, "error"));
1733
1891
  }
1734
- let J = A.useCallback((e) => {
1892
+ let ve = A.useCallback((e) => {
1735
1893
  if (!e || e.length === 0) return;
1736
1894
  let t = new Set(e);
1737
- N((e) => e.some((e) => t.has(e.id)) ? e.map((e) => t.has(e.id) ? {
1895
+ P((e) => e.some((e) => t.has(e.id)) ? e.map((e) => t.has(e.id) ? {
1738
1896
  ...e,
1739
- deleted: l.true
1897
+ deleted: c.true
1740
1898
  } : e) : e);
1741
- }, []), ve = A.useCallback((e) => {
1899
+ }, []), ye = A.useCallback((e) => {
1742
1900
  let t = typeof e == "object" && e ? e : {};
1743
- z(t.conversationId) && (T.current = t, C(t), j.current !== null && window.clearTimeout(j.current), j.current = window.setTimeout(() => {
1744
- T.current = null, C(null), j.current = null;
1745
- }, ct));
1746
- }, [z]), ye = A.useCallback((e) => {
1901
+ U(t.conversationId) && (j.current = t, T(t), M.current !== null && window.clearTimeout(M.current), M.current = window.setTimeout(() => {
1902
+ j.current = null, T(null), M.current = null;
1903
+ }, dt));
1904
+ }, [U]), Y = A.useCallback((e) => {
1747
1905
  let t = typeof e == "object" && e ? e : {};
1748
- z(t.conversationId) && (t.senderId && T.current?.senderId && t.senderId !== T.current.senderId || (j.current !== null && (window.clearTimeout(j.current), j.current = null), T.current = null, C(null)));
1749
- }, [z]);
1906
+ U(t.conversationId) && (t.senderId && j.current?.senderId && t.senderId !== j.current.senderId || (M.current !== null && (window.clearTimeout(M.current), M.current = null), j.current = null, T(null)));
1907
+ }, [U]);
1750
1908
  A.useEffect(() => {
1751
- j.current !== null && (window.clearTimeout(j.current), j.current = null), T.current = null, C(null);
1752
- }, [le]), A.useEffect(() => (E.on(D.is_typing, ve), E.on(D.not_typing, ye), () => {
1753
- E.off(D.is_typing, ve), E.off(D.not_typing, ye), j.current !== null && window.clearTimeout(j.current);
1754
- }), [ye, ve]), A.useEffect(() => {
1755
- oe && !m && u.current?.scrollIntoView({ behavior: "smooth" });
1756
- }, [m, oe]), A.useEffect(() => {
1757
- let e = c.current;
1909
+ M.current !== null && (window.clearTimeout(M.current), M.current = null), j.current = null, T(null);
1910
+ }, [le]), A.useEffect(() => (E.on(D.is_typing, ye), E.on(D.not_typing, Y), () => {
1911
+ E.off(D.is_typing, ye), E.off(D.not_typing, Y), M.current !== null && window.clearTimeout(M.current);
1912
+ }), [Y, ye]), A.useEffect(() => {
1913
+ ae && !p && l.current?.scrollIntoView({ behavior: "smooth" });
1914
+ }, [p, ae]), A.useEffect(() => {
1915
+ let e = o.current;
1758
1916
  if (!e) return;
1759
1917
  let t = () => {
1760
1918
  let { scrollTop: t, scrollHeight: n, clientHeight: r } = e;
1761
- n - t - r > 5 ? h(!0) : h(!1);
1919
+ n - t - r > 5 ? m(!0) : m(!1);
1762
1920
  };
1763
1921
  return e.addEventListener("scroll", t, { passive: !0 }), () => {
1764
1922
  e.removeEventListener("scroll", t);
1765
1923
  };
1766
1924
  }, []);
1767
1925
  function be() {
1768
- H(), setTimeout(() => H(), 100);
1926
+ W(), setTimeout(() => W(), 100);
1769
1927
  }
1770
- function Y() {
1928
+ function X() {
1771
1929
  _([]);
1772
1930
  }
1773
1931
  function xe() {
1774
- _e(g), setTimeout(() => {
1932
+ _e(h), setTimeout(() => {
1775
1933
  _([]);
1776
1934
  }, 100);
1777
1935
  }
1778
- A.useEffect(() => (E.on(D.delete_message, J), E.on(D.star_message, K), E.on(D.request_feedback, q), E.on(D.submit_feedback, q), E.on(D.end_chat_session, me), () => {
1779
- E.off(D.delete_message, J), E.off(D.star_message, K), E.off(D.request_feedback, q), E.off(D.submit_feedback, q), E.off(D.end_chat_session, me);
1936
+ A.useEffect(() => (E.on(D.delete_message, ve), E.on(D.star_message, q), E.on(D.request_feedback, J), E.on(D.submit_feedback, J), E.on(D.end_chat_session, me), () => {
1937
+ E.off(D.delete_message, ve), E.off(D.star_message, q), E.off(D.request_feedback, J), E.off(D.submit_feedback, J), E.off(D.end_chat_session, me);
1780
1938
  }), [
1781
- J,
1782
- K,
1939
+ ve,
1783
1940
  q,
1941
+ J,
1784
1942
  me
1785
- ]), A.useEffect(() => (E.on(D.send_message, U), E.on(D.update_send_message, W), () => {
1786
- E.off(D.update_send_message, W), E.off(D.send_message, U);
1787
- }), [U, W]), A.useEffect(() => {
1788
- if (!L) return;
1943
+ ]), A.useEffect(() => (E.on(D.send_message, K), E.on(D.update_send_message, de), () => {
1944
+ E.off(D.update_send_message, de), E.off(D.send_message, K);
1945
+ }), [K, de]), A.useEffect(() => {
1946
+ if (!R) return;
1789
1947
  let e = !1, t = () => {
1790
- f.history(L).then((t) => !e && he(t)).catch((e) => console.log(e.message));
1948
+ d.history(R).then((t) => !e && he(t)).catch((e) => console.log(e.message));
1791
1949
  }, n = () => {
1792
- E.emit(D.subscribe_conversation, L), t();
1950
+ E.emit(D.subscribe_conversation, R), t();
1793
1951
  };
1794
- return E.on(D.connected, n), E.connected ? n() : (t(), ne(L.userType !== w.VISITOR)), () => {
1952
+ return E.on(D.connected, n), E.connected ? n() : (t(), te(R.userType !== w.VISITOR)), () => {
1795
1953
  e = !0, E.off(D.connected, n);
1796
1954
  };
1797
- }, [L, he]);
1798
- let X = `calc(var(--padorix-vvh, 100dvh) * ${g.length > 0 || ae?.status === l.false ? .915 : .81})`;
1799
- return /* @__PURE__ */ V("div", {
1800
- className: t.container,
1955
+ }, [R, he]);
1956
+ let Se = `calc(var(--padorix-vvh, 100dvh) * ${h.length > 0 || ie?.status === c.false ? .915 : .81})`;
1957
+ return /* @__PURE__ */ H("div", {
1958
+ className: e.container,
1801
1959
  children: [
1802
- /* @__PURE__ */ B(Be, {
1803
- styles: t,
1804
- userType: i,
1805
- goBack: a.goBack,
1806
- close: a.closeModal,
1960
+ /* @__PURE__ */ V(Ue, {
1961
+ styles: e,
1962
+ userType: t,
1963
+ goBack: i.goBack,
1964
+ close: i.closeModal,
1807
1965
  toBottom: be,
1808
- messages: M
1966
+ messages: N
1809
1967
  }),
1810
- /* @__PURE__ */ V("div", {
1811
- ref: c,
1812
- style: { height: X },
1813
- className: `${t.chatContainerPadding}`,
1968
+ /* @__PURE__ */ H("div", {
1969
+ ref: o,
1970
+ style: { height: Se },
1971
+ className: `${e.chatContainerPadding}`,
1814
1972
  children: [
1815
- m && /* @__PURE__ */ B(fe, {
1973
+ p && /* @__PURE__ */ V(ue, {
1816
1974
  direction: "up",
1817
1975
  className: "\r\n padorix:fixed\r\n padorix:right-2\r\n padorix:bottom-36\r\n padorix:z-10\r\n padorix:cursor-pointer\r\n padorix:transition-all\r\n padorix:active:scale-125\r\n ",
1818
- children: /* @__PURE__ */ B("div", {
1976
+ children: /* @__PURE__ */ V("div", {
1819
1977
  className: "\r\n padorix:transition-all\r\n padorix:rounded-full\r\n padorix:size-8\r\n padorix:text-slate-500\r\n padorix:border\r\n padorix:border-gray-200\r\n padorix:flex\r\n padorix:items-center\r\n padorix:justify-center\r\n padorix:bg-white\r\n padorix:shadow-lg\r\n ",
1820
- onClick: H,
1821
- children: /* @__PURE__ */ B(ot, {})
1978
+ onClick: W,
1979
+ children: /* @__PURE__ */ V(lt, {})
1822
1980
  })
1823
1981
  }),
1824
- Number(M?.length) < 1 && /* @__PURE__ */ B("div", {
1982
+ Number(N?.length) < 1 && /* @__PURE__ */ V("div", {
1825
1983
  className: "padorix:relative padorix:p-4",
1826
- children: Array(8).fill(0).map((e, t) => /* @__PURE__ */ B(st, { index: t }, t))
1984
+ children: Array(8).fill(0).map((e, t) => /* @__PURE__ */ V(ut, { index: t }, t))
1827
1985
  }),
1828
- /* @__PURE__ */ B(at, {
1829
- messages: M,
1986
+ /* @__PURE__ */ V(ct, {
1987
+ messages: N,
1830
1988
  deleteMessagesAction: _e,
1831
1989
  handleStarMessage: ge,
1832
- styles: t,
1833
- userType: i,
1834
- messagesToDelete: g,
1990
+ styles: e,
1991
+ userType: t,
1992
+ messagesToDelete: h,
1835
1993
  setMessagesToDelete: _,
1836
- moreActions: a.moreActions,
1837
- isTyping: oe,
1838
- isOwnTyping: se
1994
+ moreActions: i.moreActions,
1995
+ isTyping: ae,
1996
+ isOwnTyping: oe
1839
1997
  }),
1840
- /* @__PURE__ */ B("div", {
1841
- ref: u,
1998
+ /* @__PURE__ */ V("div", {
1999
+ ref: l,
1842
2000
  style: {
1843
2001
  float: "left",
1844
2002
  clear: "both"
@@ -1846,58 +2004,58 @@ function ut({ styles: t, userType: i, ...a }) {
1846
2004
  })
1847
2005
  ]
1848
2006
  }),
1849
- v && g.length > 0 && /* @__PURE__ */ V("div", {
1850
- className: t.messagesContainer,
1851
- children: [/* @__PURE__ */ V("div", {
2007
+ v && h.length > 0 && /* @__PURE__ */ H("div", {
2008
+ className: e.messagesContainer,
2009
+ children: [/* @__PURE__ */ H("div", {
1852
2010
  className: "padorix:flex padorix:items-center padorix:text-sm padorix:italic padorix:text-gray-600",
1853
- children: [/* @__PURE__ */ B("div", {
1854
- onClick: Y,
2011
+ children: [/* @__PURE__ */ V("div", {
2012
+ onClick: X,
1855
2013
  className: "padorix:p-2 padorix:text-xl padorix:cursor-pointer padorix:transition-all",
1856
- children: /* @__PURE__ */ B(Q, {})
1857
- }), /* @__PURE__ */ V("div", {
2014
+ children: /* @__PURE__ */ V(Q, {})
2015
+ }), /* @__PURE__ */ H("div", {
1858
2016
  className: "padorix:space-x-0.5",
1859
2017
  children: [
1860
- /* @__PURE__ */ B("span", { children: "Confirm to delete" }),
2018
+ /* @__PURE__ */ V("span", { children: "Confirm to delete" }),
1861
2019
  " ",
1862
- /* @__PURE__ */ V("span", {
2020
+ /* @__PURE__ */ H("span", {
1863
2021
  className: "padorix:text-red-500",
1864
2022
  children: [
1865
- g.length,
2023
+ h.length,
1866
2024
  " message",
1867
- g.length === 1 ? "" : "s"
2025
+ h.length === 1 ? "" : "s"
1868
2026
  ]
1869
2027
  })
1870
2028
  ]
1871
2029
  })]
1872
- }), /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2030
+ }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
1873
2031
  onClick: xe,
1874
2032
  className: "padorix:cursor-pointer padorix:transition-all padorix:active:scale-125 padorix:text-red-500",
1875
- children: /* @__PURE__ */ B(ue, {})
2033
+ children: /* @__PURE__ */ V(ce, {})
1876
2034
  }) })]
1877
2035
  }),
1878
- !v && g.length > 0 && /* @__PURE__ */ V("div", {
1879
- className: t.messagesContainer,
1880
- children: [/* @__PURE__ */ V("div", {
2036
+ !v && h.length > 0 && /* @__PURE__ */ H("div", {
2037
+ className: e.messagesContainer,
2038
+ children: [/* @__PURE__ */ H("div", {
1881
2039
  className: "padorix:flex padorix:items-center padorix:text-sm padorix:italic padorix:text-gray-600",
1882
2040
  children: [
1883
- /* @__PURE__ */ B("div", {
1884
- onClick: Y,
2041
+ /* @__PURE__ */ V("div", {
2042
+ onClick: X,
1885
2043
  className: "padorix:p-2 padorix:text-xl padorix:cursor-pointer padorix:transition-all",
1886
- children: /* @__PURE__ */ B(Q, {})
2044
+ children: /* @__PURE__ */ V(Q, {})
1887
2045
  }),
1888
- g.length,
2046
+ h.length,
1889
2047
  " Selected"
1890
2048
  ]
1891
- }), /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2049
+ }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
1892
2050
  onClick: () => y(!0),
1893
2051
  className: "padorix:cursor-pointer padorix:transition-all padorix:active:scale-125",
1894
- children: /* @__PURE__ */ B(ue, {})
2052
+ children: /* @__PURE__ */ V(ce, {})
1895
2053
  }) })]
1896
2054
  }),
1897
- g.length < 1 && ae?.status === l.true && /* @__PURE__ */ B(Ie, {
2055
+ h.length < 1 && ie?.status === c.true && /* @__PURE__ */ V(ze, {
1898
2056
  sendChat: pe,
1899
- styles: t,
1900
- userType: i,
2057
+ styles: e,
2058
+ userType: t,
1901
2059
  isSending: b
1902
2060
  })
1903
2061
  ]
@@ -1905,192 +2063,192 @@ function ut({ styles: t, userType: i, ...a }) {
1905
2063
  }
1906
2064
  //#endregion
1907
2065
  //#region lib/assets/images/wave.png
1908
- var dt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA7VBMVEUAAADro1Lro1Lro1Lro1L/3Wfvr1bvrlbro1Lro1Lro1JCreJCreJCreJCreL/3Wf70mP91mT4x1/uqlX/3Wf/3Wf+2WbzuVrro1JCreJCreJCreJCreJCreJCreL/3Wfro1L/3WdCreJCreLro1L/3Wfsp1P6zmH/3WfwsldCreJCreL1wF3vsFfurVbvrlbuq1X/3Wf6z2L/3Wf70WP2xF7uq1VCreL/3WfxtVnro1JCreLzu1v/3Wfro1L1wF3ro1L1wF3/3Wf4yGD3xl//3Wfro1L/3Wf/3Wf0vFv5y2Dro1Lwsljro1Lytlk09oXuAAAAT3RSTlMAMGC/rxCf//+fEFC/gBCf/////8/////Pr99gIO9AYFCAn//fv//v3//PMCCPv69wr/8w7//vcFD/QI+/IID/70Bw3+/vII9A//9w74+/T+PN6AAAA5JJREFUeNrdlm13mjAUxzPbzqhIFRtQEFZ7LSt2T7VlzrpJ92A3tdv3/zgrIZdAgHLO9mZn91VI/P/zy829OZJ/P579kapxcHDYIIQcPW9S2moT0umIFa2rk/o47vWNAW2RoxPGTIsOCd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BUNwLraVpKVwxdQ2/dkfarvYks1xLLFMoDtnDZ3E12fufWi512fufWi512fufWi512fufWi51Z7EkguI5pJlIQ5AXia/9k=", pt = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
1909
- function mt(e) {
1910
- let { workspace: t, tags: n } = k((e) => e.data), r = O(), [i, a] = A.useState(!1), s = A.useMemo(() => C(e.workspaceId), [e.workspaceId]), [c, l] = A.useState(e.openOptions ? 2 : n.length > 0 ? 1 : 2), m = A.useRef(0), _ = K({
2066
+ var mt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA7VBMVEUAAADro1Lro1Lro1Lro1L/3Wfvr1bvrlbro1Lro1Lro1JCreJCreJCreJCreL/3Wf70mP91mT4x1/uqlX/3Wf/3Wf+2WbzuVrro1JCreJCreJCreJCreJCreJCreL/3Wfro1L/3WdCreJCreLro1L/3Wfsp1P6zmH/3WfwsldCreJCreL1wF3vsFfurVbvrlbuq1X/3Wf6z2L/3Wf70WP2xF7uq1VCreL/3WfxtVnro1JCreLzu1v/3Wfro1L1wF3ro1L1wF3/3Wf4yGD3xl//3Wfro1L/3Wf/3Wf0vFv5y2Dro1Lwsljro1Lytlk09oXuAAAAT3RSTlMAMGC/rxCf//+fEFC/gBCf/////8/////Pr99gIO9AYFCAn//fv//v3//PMCCPv69wr/8w7//vcFD/QI+/IID/70Bw3+/vII9A//9w74+/T+PN6AAAA5JJREFUeNrdlm13mjAUxzPbzqhIFRtQEFZ7LSt2T7VlzrpJ92A3tdv3/zgrIZdAgHLO9mZn91VI/P/zy829OZJ/P579kapxcHDYIIQcPW9S2moT0umIFa2rk/o47vWNAW2RoxPGTIsOCdFHtsOXxq7t1epfsMcwm/R0wuKwaAxzBto4XvQAnDqDE67r0+k541b+lHAHl5+jC1DHwJjY+SVDBO4g9rbBrsnDBRMIAQ44ApmBe1l3iFev37x9dyUQAjrPIYxdmCVGsyr99c08DOh7YTBXERbJ3g7Ak/A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space: r, tags: i } = k((e) => e.data), a = O(), [o, s] = A.useState(!1), c = A.useMemo(() => C(t.workspaceId), [t.workspaceId]), [p, h] = A.useState(t.openOptions ? 2 : i.length > 0 ? 1 : 2), g = A.useRef(0), _ = fe({
1911
2069
  mode: "uncontrolled",
1912
2070
  initialValues: {
1913
- tagId: n.find((t) => t.tag.trim().toLowerCase() === e.openOptions?.tag?.trim().toLowerCase())?.id ?? "",
1914
- fullName: e.openOptions?.name ?? "",
1915
- email: e.openOptions?.email ?? "",
1916
- message: e.openOptions?.message ?? ""
2071
+ tagId: i.find((e) => e.tag.trim().toLowerCase() === t.openOptions?.tag?.trim().toLowerCase())?.id ?? "",
2072
+ fullName: t.openOptions?.name ?? "",
2073
+ email: t.openOptions?.email ?? "",
2074
+ message: t.openOptions?.message ?? ""
1917
2075
  },
1918
2076
  validate: {
1919
- fullName: (e) => c === 2 && !e ? "Full name is required" : c === 2 && e.length <= 2 ? "Your name is expected to be more than 2 characters" : null,
1920
- email: (e) => c === 2 && !e ? "Email address is required" : c === 2 && !pt(e) ? "Please enter a valid email address" : null,
1921
- message: (e) => c === 4 && !e ? "Enquiry content is required" : null
2077
+ fullName: (e) => p === 2 && !e ? "Full name is required" : p === 2 && e.length <= 2 ? "Your name is expected to be more than 2 characters" : null,
2078
+ email: (e) => p === 2 && !e ? "Email address is required" : p === 2 && !gt(e) ? "Please enter a valid email address" : null,
2079
+ message: (e) => p === 4 && !e ? "Enquiry content is required" : null
1922
2080
  }
1923
2081
  });
1924
2082
  function v() {
1925
- if (n.length > 0) {
1926
- if (c === 1) return e.changeScreen(1);
1927
- l((e) => e - 1);
2083
+ if (i.length > 0) {
2084
+ if (p === 1) return t.changeScreen(1);
2085
+ h((e) => e - 1);
1928
2086
  }
1929
- if (n.length < 1) {
1930
- if (c === 2) return e.changeScreen(1);
1931
- l((e) => e - 1);
2087
+ if (i.length < 1) {
2088
+ if (p === 2) return t.changeScreen(1);
2089
+ h((e) => e - 1);
1932
2090
  }
1933
2091
  }
1934
2092
  function y(e) {
1935
- _.setFieldValue("tagId", e), l((e) => e + 1);
2093
+ _.setFieldValue("tagId", e), h((e) => e + 1);
1936
2094
  }
1937
- async function b(e) {
1938
- a(!0);
2095
+ async function b(t) {
2096
+ s(!0);
1939
2097
  try {
1940
- let t = await f.startConversation(e), n = {
1941
- conversationId: t.conversation.id,
1942
- senderId: t.senderId,
1943
- fullName: t.fullName,
1944
- tagId: e.tagId,
1945
- expiresAt: G().add(1, "day").endOf("day").toDate().toString()
2098
+ let r = await d.startConversation(t), i = {
2099
+ conversationId: r.conversation.id,
2100
+ senderId: r.senderId,
2101
+ fullName: r.fullName,
2102
+ tagId: t.tagId,
2103
+ expiresAt: K().add(1, "day").endOf("day").toDate().toString()
1946
2104
  };
1947
- localStorage.setItem(p, JSON.stringify(n)), r(o(t.conversation)), r(g(n));
2105
+ localStorage.setItem(f, JSON.stringify(i)), a(n(r.conversation)), a(e(i));
1948
2106
  } catch (e) {
1949
- d(e.message || "Unable to start the chat", "error"), window.dispatchEvent(new Event(h));
2107
+ u(e.message || "Unable to start the chat", "error"), window.dispatchEvent(new Event(m));
1950
2108
  } finally {
1951
- a(!1);
2109
+ s(!1);
1952
2110
  }
1953
2111
  }
1954
- async function x(t) {
1955
- if (c < 3) return l((e) => e + 1);
2112
+ async function x(e) {
2113
+ if (p < 3) return h((e) => e + 1);
1956
2114
  await b({
1957
- ...t,
1958
- workspaceId: e.workspaceId,
2115
+ ...e,
2116
+ workspaceId: t.workspaceId,
1959
2117
  userType: "VISITOR",
1960
- visitorId: s,
1961
- tag: e.openOptions?.tag
2118
+ visitorId: c,
2119
+ tag: t.openOptions?.tag
1962
2120
  });
1963
2121
  }
1964
2122
  return A.useEffect(() => {
1965
- if (!e.openRequestId) return;
1966
- let t = e.openOptions;
1967
- if (!t) {
1968
- l(1);
2123
+ if (!t.openRequestId) return;
2124
+ let e = t.openOptions;
2125
+ if (!e) {
2126
+ h(1);
1969
2127
  return;
1970
2128
  }
1971
- let r = n.find((e) => e.tag.trim().toLowerCase() === t.tag?.trim().toLowerCase())?.id ?? "";
2129
+ let n = i.find((t) => t.tag.trim().toLowerCase() === e.tag?.trim().toLowerCase())?.id ?? "";
1972
2130
  _.setValues({
1973
- tagId: r,
1974
- fullName: t.name ?? "",
1975
- email: t.email ?? "",
1976
- message: t.message ?? ""
1977
- }), l(2), !(e.autoSubmitRequestId !== e.openRequestId || m.current === e.openRequestId || !u(t)) && (m.current = e.openRequestId, b({
1978
- workspaceId: e.workspaceId,
2131
+ tagId: n,
2132
+ fullName: e.name ?? "",
2133
+ email: e.email ?? "",
2134
+ message: e.message ?? ""
2135
+ }), h(2), !(t.autoSubmitRequestId !== t.openRequestId || g.current === t.openRequestId || !l(e)) && (g.current = t.openRequestId, b({
2136
+ workspaceId: t.workspaceId,
1979
2137
  userType: "VISITOR",
1980
- visitorId: s,
1981
- fullName: t.name?.trim(),
1982
- email: t.email?.trim(),
1983
- message: t.message?.trim(),
1984
- tagId: r || void 0,
1985
- tag: t.tag
2138
+ visitorId: c,
2139
+ fullName: e.name?.trim(),
2140
+ email: e.email?.trim(),
2141
+ message: e.message?.trim(),
2142
+ tagId: n || void 0,
2143
+ tag: e.tag
1986
2144
  }));
1987
- }, [e.openRequestId]), /* @__PURE__ */ V("div", {
1988
- className: e.styles.container,
1989
- children: [/* @__PURE__ */ V("div", {
2145
+ }, [t.openRequestId]), /* @__PURE__ */ H("div", {
2146
+ className: t.styles.container,
2147
+ children: [/* @__PURE__ */ H("div", {
1990
2148
  style: {
1991
- background: String(t?.widget?.colorScheme),
1992
- color: t?.widget?.textColor || "#ffffff"
2149
+ background: String(r?.widget?.colorScheme),
2150
+ color: r?.widget?.textColor || "#ffffff"
1993
2151
  },
1994
2152
  className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-sm padorix:flex padorix:gap-2",
1995
- children: [/* @__PURE__ */ B(R, {
2153
+ children: [/* @__PURE__ */ V(z, {
1996
2154
  className: "",
1997
2155
  children: "Kindly drop your enquiry and we will get back to you immediately"
1998
- }), /* @__PURE__ */ B("div", {
2156
+ }), /* @__PURE__ */ V("div", {
1999
2157
  className: "padorix:size-8 padorix:ml-auto",
2000
- children: /* @__PURE__ */ B("div", {
2158
+ children: /* @__PURE__ */ V("div", {
2001
2159
  className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
2002
- onClick: e.close,
2003
- children: /* @__PURE__ */ B(F, {})
2160
+ onClick: t.close,
2161
+ children: /* @__PURE__ */ V(F, {})
2004
2162
  })
2005
2163
  })]
2006
- }), /* @__PURE__ */ V("div", {
2164
+ }), /* @__PURE__ */ H("div", {
2007
2165
  className: "padorix:p-4",
2008
2166
  children: [
2009
- /* @__PURE__ */ V("div", {
2167
+ /* @__PURE__ */ H("div", {
2010
2168
  className: "padorix:flex padorix:items-center padorix:gap-2",
2011
- children: [/* @__PURE__ */ B(R, {
2169
+ children: [/* @__PURE__ */ V(z, {
2012
2170
  className: "padorix:size-10",
2013
- children: /* @__PURE__ */ V("div", {
2171
+ children: /* @__PURE__ */ H("div", {
2014
2172
  className: "",
2015
2173
  children: [
2016
2174
  " ",
2017
- /* @__PURE__ */ B("img", {
2018
- src: t?.logo,
2019
- alt: t?.name,
2175
+ /* @__PURE__ */ V("img", {
2176
+ src: r?.logo,
2177
+ alt: r?.name,
2020
2178
  loading: "lazy",
2021
2179
  className: "padorix:size-10 padorix:object-contain"
2022
2180
  }),
2023
2181
  " "
2024
2182
  ]
2025
2183
  })
2026
- }), /* @__PURE__ */ B(R, {
2184
+ }), /* @__PURE__ */ V(z, {
2027
2185
  className: "padorix:text-right padorix:w-full",
2028
- children: /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("div", {
2186
+ children: /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("div", {
2029
2187
  className: "padorix:font-medium padorix:text-right",
2030
- children: t?.name
2031
- }), /* @__PURE__ */ B("div", {
2188
+ children: r?.name
2189
+ }), /* @__PURE__ */ V("div", {
2032
2190
  className: "padorix:text-sm padorix:text-right padorix:text-slate-500",
2033
- children: t?.widget?.department
2191
+ children: r?.widget?.department
2034
2192
  })] })
2035
2193
  })]
2036
2194
  }),
2037
- /* @__PURE__ */ V("form", {
2195
+ /* @__PURE__ */ H("form", {
2038
2196
  onSubmit: _.onSubmit(x),
2039
- children: [/* @__PURE__ */ B("div", {
2197
+ children: [/* @__PURE__ */ V("div", {
2040
2198
  className: "padorix:h-[35dvh] padorix:flex padorix:items-center padorix:justify-center",
2041
- children: /* @__PURE__ */ V("div", {
2199
+ children: /* @__PURE__ */ H("div", {
2042
2200
  className: "padorix:w-full",
2043
2201
  children: [
2044
- c === 1 && /* @__PURE__ */ V(z, { children: [
2045
- /* @__PURE__ */ B(ht, { current: 1 }),
2046
- /* @__PURE__ */ B("div", {
2202
+ p === 1 && /* @__PURE__ */ H(B, { children: [
2203
+ /* @__PURE__ */ V(vt, { current: 1 }),
2204
+ /* @__PURE__ */ V("div", {
2047
2205
  className: "padorix:font-bold padorix:mb-2",
2048
2206
  children: "What is your enquiry about?"
2049
2207
  }),
2050
- /* @__PURE__ */ B("div", {
2208
+ /* @__PURE__ */ V("div", {
2051
2209
  className: "padorix:flex padorix:flex-wrap padorix:items-center padorix:gap-2",
2052
- children: n?.map((e, n) => /* @__PURE__ */ B("div", {
2210
+ children: i?.map((e, t) => /* @__PURE__ */ V("div", {
2053
2211
  onClick: () => y(e.id),
2054
- style: { background: _.values.tagId === e.id ? String(t?.widget?.colorScheme) : "#f1f5f9" },
2212
+ style: { background: _.values.tagId === e.id ? String(r?.widget?.colorScheme) : "#f1f5f9" },
2055
2213
  className: `padorix:text-xs padorix:py-1.5 padorix:px-2 padorix:rounded-md ${_.values.tagId === e.id ? "padorix:text-white" : "padorix:bg-slate-100 padorix:border padorix:border-gray-200"} padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all`,
2056
2214
  children: e.tag
2057
- }, n))
2215
+ }, t))
2058
2216
  }),
2059
- _.errors.tagId ? /* @__PURE__ */ B("div", {
2217
+ _.errors.tagId ? /* @__PURE__ */ V("div", {
2060
2218
  className: "padorix:text-red-400 padorix:text-sm padorix:mt-2",
2061
2219
  children: _.errors.tagId?.toString()
2062
2220
  }) : ""
2063
2221
  ] }),
2064
- c === 2 && /* @__PURE__ */ V(z, { children: [
2065
- /* @__PURE__ */ B(ht, { current: 2 }),
2066
- /* @__PURE__ */ B(gt, {
2067
- screen: c,
2222
+ p === 2 && /* @__PURE__ */ H(B, { children: [
2223
+ /* @__PURE__ */ V(vt, { current: 2 }),
2224
+ /* @__PURE__ */ V(yt, {
2225
+ screen: p,
2068
2226
  tagId: _.values.tagId,
2069
- tags: n
2227
+ tags: i
2070
2228
  }),
2071
- /* @__PURE__ */ B($, {
2229
+ /* @__PURE__ */ V($, {
2072
2230
  content: "Full name",
2073
2231
  placeholder: "Enter your full name",
2074
2232
  error: _.errors.fullName?.toString() || "",
2075
2233
  ..._.getInputProps("fullName")
2076
2234
  }, _.key("fullName")),
2077
- /* @__PURE__ */ B($, {
2235
+ /* @__PURE__ */ V($, {
2078
2236
  content: "Email address",
2079
2237
  placeholder: "name@example.com",
2080
2238
  error: _.errors.email?.toString() || "",
2081
2239
  ..._.getInputProps("email")
2082
2240
  }, _.key("email"))
2083
2241
  ] }),
2084
- c === 3 && /* @__PURE__ */ V(z, { children: [
2085
- /* @__PURE__ */ B(ht, { current: 3 }),
2086
- /* @__PURE__ */ B(gt, {
2087
- screen: c,
2242
+ p === 3 && /* @__PURE__ */ H(B, { children: [
2243
+ /* @__PURE__ */ V(vt, { current: 3 }),
2244
+ /* @__PURE__ */ V(yt, {
2245
+ screen: p,
2088
2246
  tagId: _.values.tagId,
2089
- tags: n,
2247
+ tags: i,
2090
2248
  name: _.values.fullName,
2091
2249
  email: _.values.email
2092
2250
  }),
2093
- /* @__PURE__ */ B($, {
2251
+ /* @__PURE__ */ V($, {
2094
2252
  content: "Message",
2095
2253
  formtype: "textarea",
2096
2254
  error: _.errors.message?.toString() || "",
@@ -2099,27 +2257,27 @@ function mt(e) {
2099
2257
  ] })
2100
2258
  ]
2101
2259
  })
2102
- }), /* @__PURE__ */ V("div", {
2260
+ }), /* @__PURE__ */ H("div", {
2103
2261
  className: "padorix:mt-6 padorix:flex padorix:items-center padorix:gap-2",
2104
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
2262
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
2105
2263
  type: "button",
2106
2264
  onClick: v,
2107
2265
  className: "padorix:cursor-pointer padorix:border padorix:border-gray-300 padorix:bg-slate-100 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
2108
2266
  children: "Back"
2109
- }) }), /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
2110
- disabled: i,
2111
- style: { background: i ? "#62748e" : String(t?.widget?.colorScheme) },
2112
- className: `${i ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
2113
- children: c < 3 ? "Next" : "Start Chat"
2267
+ }) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
2268
+ disabled: o,
2269
+ style: { background: o ? "#62748e" : String(r?.widget?.colorScheme) },
2270
+ className: `${o ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
2271
+ children: p < 3 ? "Next" : "Start Chat"
2114
2272
  }) })]
2115
2273
  })]
2116
2274
  }),
2117
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ V("div", {
2275
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
2118
2276
  className: "padorix:mt-20 padorix:grayscale-100 padorix:text-sm padorix:flex padorix:items-center padorix:justify-center padorix:text-zinc-500 padorix:gap-2",
2119
2277
  children: [
2120
2278
  " ",
2121
- /* @__PURE__ */ B("img", {
2122
- src: ft,
2279
+ /* @__PURE__ */ V("img", {
2280
+ src: ht,
2123
2281
  alt: "padorix",
2124
2282
  loading: "lazy",
2125
2283
  className: "padorix:size-6 padorix:inline"
@@ -2131,13 +2289,13 @@ function mt(e) {
2131
2289
  })]
2132
2290
  });
2133
2291
  }
2134
- function ht(e) {
2292
+ function vt(e) {
2135
2293
  let { tags: t, workspace: n } = k((e) => e.data), r = t.length > 0 ? 3 : 2, i = t.length > 0 ? e.current : e.current - 1;
2136
- return /* @__PURE__ */ V("div", {
2294
+ return /* @__PURE__ */ H("div", {
2137
2295
  className: "padorix:text-right padorix:text-sm padorix:text-gray-500 padorix:italic padorix:font-semibold",
2138
2296
  children: [
2139
2297
  "Step ",
2140
- /* @__PURE__ */ B("span", {
2298
+ /* @__PURE__ */ V("span", {
2141
2299
  style: { color: String(n?.widget?.colorScheme) },
2142
2300
  children: i
2143
2301
  }),
@@ -2146,36 +2304,36 @@ function ht(e) {
2146
2304
  ]
2147
2305
  });
2148
2306
  }
2149
- function gt(e) {
2150
- return /* @__PURE__ */ V("div", {
2307
+ function yt(e) {
2308
+ return /* @__PURE__ */ H("div", {
2151
2309
  className: "padorix:my-2",
2152
- children: [e.tagId && e.screen > 1 && /* @__PURE__ */ V("div", {
2310
+ children: [e.tagId && e.screen > 1 && /* @__PURE__ */ H("div", {
2153
2311
  className: "padorix:text-xs",
2154
2312
  children: [
2155
2313
  " ",
2156
- /* @__PURE__ */ B("span", {
2314
+ /* @__PURE__ */ V("span", {
2157
2315
  className: "padorix:text-slate-500 padorix:mr-1",
2158
2316
  children: "Enquiry: "
2159
2317
  }),
2160
2318
  " ",
2161
2319
  e.tags?.find((t) => t.id === e.tagId)?.tag
2162
2320
  ]
2163
- }), e.screen > 2 && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ V("div", {
2321
+ }), e.screen > 2 && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("div", {
2164
2322
  className: "padorix:text-xs",
2165
2323
  children: [
2166
2324
  " ",
2167
- /* @__PURE__ */ B("span", {
2325
+ /* @__PURE__ */ V("span", {
2168
2326
  className: "padorix:text-slate-500 padorix:mr-3",
2169
2327
  children: "Name: "
2170
2328
  }),
2171
2329
  " ",
2172
2330
  e.name
2173
2331
  ]
2174
- }), /* @__PURE__ */ V("div", {
2332
+ }), /* @__PURE__ */ H("div", {
2175
2333
  className: "padorix:text-xs",
2176
2334
  children: [
2177
2335
  " ",
2178
- /* @__PURE__ */ B("span", {
2336
+ /* @__PURE__ */ V("span", {
2179
2337
  className: "padorix:text-slate-500 padorix:mr-4",
2180
2338
  children: "Email: "
2181
2339
  }),
@@ -2187,129 +2345,129 @@ function gt(e) {
2187
2345
  }
2188
2346
  //#endregion
2189
2347
  //#region lib/chats/chatScreen/not-available-banner.tsx
2190
- function _t() {
2191
- return /* @__PURE__ */ B("div", {
2348
+ function bt() {
2349
+ return /* @__PURE__ */ V("div", {
2192
2350
  className: "padorix:p-2 padorix:text-yellow-800 padorix:bg-yellow-100/50 padorix:border padorix:border-yellow-200 padorix:rounded-md padorix:text-center padorix:text-[0.75rem] padorix:whitespace-pre-line",
2193
2351
  children: "We're currently unavailable. Leave us a message \n and we'll get back to you via email."
2194
2352
  });
2195
2353
  }
2196
2354
  //#endregion
2197
2355
  //#region lib/chats/chatScreen/chat-faqs.tsx
2198
- function vt(e) {
2356
+ function xt(e) {
2199
2357
  let { faqs: t, workspace: n } = k((e) => e.data), [r, i] = A.useState(), a = e.isOpen ? "Talk to an agent" : "Send us a message";
2200
2358
  function o(e) {
2201
2359
  i(e);
2202
2360
  }
2203
- return r?.question ? /* @__PURE__ */ V(z, { children: [
2204
- /* @__PURE__ */ V("div", {
2361
+ return r?.question ? /* @__PURE__ */ H(B, { children: [
2362
+ /* @__PURE__ */ H("div", {
2205
2363
  style: { background: String(n?.widget?.colorScheme) },
2206
2364
  className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
2207
2365
  children: [
2208
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2366
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2209
2367
  className: "padorix:size-8",
2210
- children: /* @__PURE__ */ V("div", {
2368
+ children: /* @__PURE__ */ H("div", {
2211
2369
  style: { color: String(n?.widget?.colorScheme) },
2212
2370
  className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
2213
2371
  children: [
2214
2372
  " ",
2215
- /* @__PURE__ */ B(He, { className: "padorix:size-7" }),
2373
+ /* @__PURE__ */ V(Ge, { className: "padorix:size-7" }),
2216
2374
  " "
2217
2375
  ]
2218
2376
  })
2219
2377
  }) }),
2220
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2378
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2221
2379
  className: "",
2222
2380
  children: "Our Frequently asked questions"
2223
2381
  }) }),
2224
- /* @__PURE__ */ B("div", {
2382
+ /* @__PURE__ */ V("div", {
2225
2383
  className: "padorix:size-8 padorix:ml-auto",
2226
- children: /* @__PURE__ */ B("div", {
2384
+ children: /* @__PURE__ */ V("div", {
2227
2385
  className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
2228
2386
  onClick: e.close,
2229
- children: /* @__PURE__ */ B(F, {})
2387
+ children: /* @__PURE__ */ V(F, {})
2230
2388
  })
2231
2389
  })
2232
2390
  ]
2233
2391
  }),
2234
- /* @__PURE__ */ V("div", {
2392
+ /* @__PURE__ */ H("div", {
2235
2393
  className: "padorix:p-1.5 padorix:h-[70dvh] padorix-scrolls padorix:overflow-y-auto",
2236
2394
  children: [
2237
- !e.isOpen && /* @__PURE__ */ B(_t, {}),
2238
- /* @__PURE__ */ B("div", {
2395
+ !e.isOpen && /* @__PURE__ */ V(bt, {}),
2396
+ /* @__PURE__ */ V("div", {
2239
2397
  className: "padorix:font-bold padorix:text-xl padorix:mb-3",
2240
2398
  children: r.question
2241
2399
  }),
2242
- /* @__PURE__ */ B("div", {
2400
+ /* @__PURE__ */ V("div", {
2243
2401
  className: "padorix:whitespace-pre-line padorix:pl-2 padorix:text-gray-600 padorix:text-sm",
2244
2402
  children: r.answer
2245
2403
  })
2246
2404
  ]
2247
2405
  }),
2248
- /* @__PURE__ */ V("div", {
2406
+ /* @__PURE__ */ H("div", {
2249
2407
  className: "padorix:flex padorix:items-center padorix:justify-end padorix:p-2 padorix:gap-5",
2250
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
2408
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
2251
2409
  type: "button",
2252
2410
  onClick: () => o(void 0),
2253
2411
  className: "padorix:cursor-pointer padorix:border padorix:border-gray-300 padorix:bg-slate-100 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
2254
2412
  children: "Back"
2255
- }) }), /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
2413
+ }) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
2256
2414
  onClick: () => e.talkToTeam(!1),
2257
2415
  style: { background: String(n?.widget?.colorScheme) },
2258
2416
  className: "padorix:cursor-pointer padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
2259
2417
  children: a
2260
2418
  }) })]
2261
2419
  })
2262
- ] }) : /* @__PURE__ */ V(z, { children: [
2263
- /* @__PURE__ */ V("div", {
2420
+ ] }) : /* @__PURE__ */ H(B, { children: [
2421
+ /* @__PURE__ */ H("div", {
2264
2422
  style: { background: String(n?.widget?.colorScheme) },
2265
2423
  className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
2266
2424
  children: [
2267
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2425
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2268
2426
  className: "padorix:size-8",
2269
- children: /* @__PURE__ */ V("div", {
2427
+ children: /* @__PURE__ */ H("div", {
2270
2428
  style: { color: String(n?.widget?.colorScheme) },
2271
2429
  className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
2272
2430
  children: [
2273
2431
  " ",
2274
- /* @__PURE__ */ B(He, { className: "padorix:size-7" }),
2432
+ /* @__PURE__ */ V(Ge, { className: "padorix:size-7" }),
2275
2433
  " "
2276
2434
  ]
2277
2435
  })
2278
2436
  }) }),
2279
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2437
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2280
2438
  className: "",
2281
2439
  children: "Our Frequently asked questions"
2282
2440
  }) }),
2283
- /* @__PURE__ */ B("div", {
2441
+ /* @__PURE__ */ V("div", {
2284
2442
  className: "padorix:size-8 padorix:ml-auto",
2285
- children: /* @__PURE__ */ B("div", {
2443
+ children: /* @__PURE__ */ V("div", {
2286
2444
  className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
2287
2445
  onClick: e.close,
2288
- children: /* @__PURE__ */ B(F, {})
2446
+ children: /* @__PURE__ */ V(F, {})
2289
2447
  })
2290
2448
  })
2291
2449
  ]
2292
2450
  }),
2293
- /* @__PURE__ */ V("div", {
2451
+ /* @__PURE__ */ H("div", {
2294
2452
  className: "padorix:p-1.5 padorix:h-[70dvh] padorix-scrolls padorix:overflow-y-auto",
2295
- children: [!e.isOpen && /* @__PURE__ */ B(_t, {}), t.map((e, t) => /* @__PURE__ */ V("div", {
2453
+ children: [!e.isOpen && /* @__PURE__ */ V(bt, {}), t.map((e, t) => /* @__PURE__ */ H("div", {
2296
2454
  onClick: () => o(e),
2297
2455
  className: "padorix:p-2.5 padorix:flex padorix:items-center padorix:gap-2 padorix:transition-all padorix:cursor-pointer padorix:active:scale-95 padorix:border-b padorix:border-gray-200 padorix:last:border-0",
2298
- children: [/* @__PURE__ */ V("div", {
2456
+ children: [/* @__PURE__ */ H("div", {
2299
2457
  className: "padorix:w-full",
2300
- children: [/* @__PURE__ */ B("div", {
2458
+ children: [/* @__PURE__ */ V("div", {
2301
2459
  className: "padorix:font-semibold",
2302
2460
  children: e.question
2303
- }), /* @__PURE__ */ V("div", {
2461
+ }), /* @__PURE__ */ H("div", {
2304
2462
  className: "padorix:text-sm padorix:text-gray-500",
2305
2463
  children: [e.answer?.slice(0, 50), "..."]
2306
2464
  })]
2307
- }), /* @__PURE__ */ B(ke, {})]
2465
+ }), /* @__PURE__ */ V(Oe, {})]
2308
2466
  }, t))]
2309
2467
  }),
2310
- /* @__PURE__ */ B("div", {
2468
+ /* @__PURE__ */ V("div", {
2311
2469
  className: "padorix:size-fit padorix:ml-auto padorix:p-2",
2312
- children: /* @__PURE__ */ B("button", {
2470
+ children: /* @__PURE__ */ V("button", {
2313
2471
  onClick: () => e.talkToTeam(!1),
2314
2472
  style: { background: String(n?.widget?.colorScheme) },
2315
2473
  className: "padorix:cursor-pointer padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
@@ -2320,121 +2478,121 @@ function vt(e) {
2320
2478
  }
2321
2479
  //#endregion
2322
2480
  //#region lib/chats/chatScreen/unavailable-form.tsx
2323
- function yt(e) {
2324
- let { workspace: t } = k((e) => e.data), [n, r] = A.useState(!1), [i, a] = A.useState({
2481
+ function St(e) {
2482
+ let { workspace: n } = k((e) => e.data), [r, i] = A.useState(!1), [a, o] = A.useState({
2325
2483
  status: "success",
2326
2484
  message: ""
2327
- }), o = K({
2485
+ }), s = fe({
2328
2486
  mode: "uncontrolled",
2329
2487
  initialValues: {
2330
- workspaceId: t?.id ?? "",
2488
+ workspaceId: n?.id ?? "",
2331
2489
  name: "",
2332
2490
  email: "",
2333
2491
  message: ""
2334
2492
  },
2335
2493
  validate: {
2336
2494
  name: (e) => e ? e.length <= 2 ? "Your name is expected to be more than 2 characters" : null : "Full name is required",
2337
- email: (e) => e ? pt(e) ? null : "Please enter a valid email address" : "Email address is required",
2495
+ email: (e) => e ? gt(e) ? null : "Please enter a valid email address" : "Email address is required",
2338
2496
  message: (e) => e ? null : "Enquiry content is required"
2339
2497
  }
2340
2498
  });
2341
- async function s(e) {
2499
+ async function c(e) {
2342
2500
  try {
2343
- r(!0), a({
2501
+ i(!0), o({
2344
2502
  status: "success",
2345
- message: (await c({
2346
- endpoint: S.inquiries.inquiries,
2503
+ message: (await S({
2504
+ endpoint: t.inquiries.inquiries,
2347
2505
  method: "POST",
2348
2506
  data: e
2349
2507
  })).message
2350
2508
  });
2351
2509
  } catch {
2352
- a({
2510
+ o({
2353
2511
  status: "error",
2354
2512
  message: "There was an error sending your message."
2355
2513
  });
2356
2514
  } finally {
2357
- o.reset(), r(!1), setTimeout(() => a({
2515
+ s.reset(), i(!1), setTimeout(() => o({
2358
2516
  status: "success",
2359
2517
  message: ""
2360
2518
  }), 3e3);
2361
2519
  }
2362
2520
  }
2363
- return /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ V("div", {
2364
- style: { background: String(t?.widget?.colorScheme) },
2521
+ return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("div", {
2522
+ style: { background: String(n?.widget?.colorScheme) },
2365
2523
  className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
2366
2524
  children: [
2367
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2525
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2368
2526
  className: "padorix:size-8",
2369
- children: /* @__PURE__ */ V("div", {
2370
- style: { color: String(t?.widget?.colorScheme) },
2527
+ children: /* @__PURE__ */ H("div", {
2528
+ style: { color: String(n?.widget?.colorScheme) },
2371
2529
  className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
2372
2530
  children: [
2373
2531
  " ",
2374
- /* @__PURE__ */ B(Ue, { className: "padorix:size-5" }),
2532
+ /* @__PURE__ */ V(Ke, { className: "padorix:size-5" }),
2375
2533
  " "
2376
2534
  ]
2377
2535
  })
2378
2536
  }) }),
2379
- /* @__PURE__ */ V("div", {
2537
+ /* @__PURE__ */ H("div", {
2380
2538
  className: "",
2381
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2539
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2382
2540
  className: "",
2383
2541
  children: "Send us a message"
2384
- }) }), /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2542
+ }) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2385
2543
  className: "padorix:text-xs",
2386
2544
  children: "Leave us a message and we'll reply via email."
2387
2545
  }) })]
2388
2546
  }),
2389
- /* @__PURE__ */ B("div", {
2547
+ /* @__PURE__ */ V("div", {
2390
2548
  className: "padorix:size-8 padorix:ml-auto",
2391
- children: /* @__PURE__ */ B("div", {
2549
+ children: /* @__PURE__ */ V("div", {
2392
2550
  className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
2393
2551
  onClick: e.close,
2394
- children: /* @__PURE__ */ B(F, {})
2552
+ children: /* @__PURE__ */ V(F, {})
2395
2553
  })
2396
2554
  })
2397
2555
  ]
2398
- }), /* @__PURE__ */ B("div", {
2556
+ }), /* @__PURE__ */ V("div", {
2399
2557
  className: "padorix:p-1.5 padorix:h-[70dvh] padorix-scrolls padorix:overflow-y-auto",
2400
- children: /* @__PURE__ */ V("form", {
2401
- onSubmit: o.onSubmit(s),
2558
+ children: /* @__PURE__ */ H("form", {
2559
+ onSubmit: s.onSubmit(c),
2402
2560
  children: [
2403
- /* @__PURE__ */ B($, {
2561
+ /* @__PURE__ */ V($, {
2404
2562
  content: "Full name",
2405
2563
  placeholder: "Enter your full name",
2406
- error: o.errors.name?.toString() || "",
2407
- ...o.getInputProps("name")
2408
- }, o.key("name")),
2409
- /* @__PURE__ */ B($, {
2564
+ error: s.errors.name?.toString() || "",
2565
+ ...s.getInputProps("name")
2566
+ }, s.key("name")),
2567
+ /* @__PURE__ */ V($, {
2410
2568
  content: "Email address",
2411
2569
  placeholder: "name@example.com",
2412
- error: o.errors.email?.toString() || "",
2413
- ...o.getInputProps("email")
2414
- }, o.key("email")),
2415
- /* @__PURE__ */ B($, {
2570
+ error: s.errors.email?.toString() || "",
2571
+ ...s.getInputProps("email")
2572
+ }, s.key("email")),
2573
+ /* @__PURE__ */ V($, {
2416
2574
  content: "Message",
2417
2575
  formtype: "textarea",
2418
- error: o.errors.message?.toString() || "",
2419
- ...o.getInputProps("message")
2420
- }, o.key("message")),
2421
- i.message && /* @__PURE__ */ B("div", {
2422
- className: `padorix:mt-4 padorix:text-sm padorix:p-2 padorix:rounded-md ${i.status === "success" ? "padorix:bg-green-100 padorix:text-green-800" : "padorix:bg-red-100 padorix:text-red-800"}`,
2423
- children: i.message
2576
+ error: s.errors.message?.toString() || "",
2577
+ ...s.getInputProps("message")
2578
+ }, s.key("message")),
2579
+ a.message && /* @__PURE__ */ V("div", {
2580
+ className: `padorix:mt-4 padorix:text-sm padorix:p-2 padorix:rounded-md ${a.status === "success" ? "padorix:bg-green-100 padorix:text-green-800" : "padorix:bg-red-100 padorix:text-red-800"}`,
2581
+ children: a.message
2424
2582
  }),
2425
- /* @__PURE__ */ V("div", {
2583
+ /* @__PURE__ */ H("div", {
2426
2584
  className: "padorix:mt-6 padorix:flex padorix:items-center padorix:gap-2",
2427
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
2585
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
2428
2586
  type: "button",
2429
2587
  onClick: e.backAction,
2430
2588
  className: "padorix:cursor-pointer padorix:border padorix:border-gray-300 padorix:bg-slate-100 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
2431
2589
  children: "Back"
2432
- }) }), /* @__PURE__ */ B(R, {
2590
+ }) }), /* @__PURE__ */ V(z, {
2433
2591
  className: "padorix:w-full",
2434
- children: /* @__PURE__ */ B("button", {
2435
- disabled: n,
2436
- style: { background: n ? "#62748e" : String(t?.widget?.colorScheme) },
2437
- className: `${n ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:w-full padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
2592
+ children: /* @__PURE__ */ V("button", {
2593
+ disabled: r,
2594
+ style: { background: r ? "#62748e" : String(n?.widget?.colorScheme) },
2595
+ className: `${r ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:w-full padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
2438
2596
  children: "Submit message"
2439
2597
  })
2440
2598
  })]
@@ -2445,8 +2603,8 @@ function yt(e) {
2445
2603
  }
2446
2604
  //#endregion
2447
2605
  //#region lib/chats/chatScreen/chat-lobby.tsx
2448
- function bt(e) {
2449
- let { sender: t, faqs: n, faqsLoaded: r, workspace: i } = k((e) => e.data), a = JSON.parse(localStorage.getItem("pdx-sess") || "null"), [o, s] = A.useState(!0), [c, l] = A.useState(!1), u = v(i?.widget?.notifications?.showFaqBeforeConversation), d = x(i?.widget), f = !!(e.openOptions && Object.values(e.openOptions).some(Boolean));
2606
+ function Ct(e) {
2607
+ let { sender: t, faqs: n, faqsLoaded: r, workspace: i } = k((e) => e.data), a = JSON.parse(localStorage.getItem("pdx-sess") || "null"), [o, s] = A.useState(!0), [c, l] = A.useState(!1), u = _(i?.widget?.notifications?.showFaqBeforeConversation), d = b(i?.widget), f = !!(e.openOptions && Object.values(e.openOptions).some(Boolean));
2450
2608
  function p(e) {
2451
2609
  s(e), l(!d);
2452
2610
  }
@@ -2456,38 +2614,38 @@ function bt(e) {
2456
2614
  function h() {
2457
2615
  s(!0);
2458
2616
  }
2459
- if (t?.conversationId && a?.conversationId) return /* @__PURE__ */ B(ut, { ...e });
2460
- if (!f && o && u && !r) return /* @__PURE__ */ B("div", { className: e.styles.container });
2461
- if (!f && o && u && n.length > 0) return /* @__PURE__ */ B("div", {
2617
+ if (t?.conversationId && a?.conversationId) return /* @__PURE__ */ V(pt, { ...e });
2618
+ if (!f && o && u && !r) return /* @__PURE__ */ V("div", { className: e.styles.container });
2619
+ if (!f && o && u && n.length > 0) return /* @__PURE__ */ V("div", {
2462
2620
  className: e.styles.container,
2463
- children: /* @__PURE__ */ B(vt, {
2621
+ children: /* @__PURE__ */ V(xt, {
2464
2622
  talkToTeam: p,
2465
2623
  isOpen: d,
2466
2624
  ...e
2467
2625
  })
2468
2626
  });
2469
- if (c) return /* @__PURE__ */ B("div", {
2627
+ if (c) return /* @__PURE__ */ V("div", {
2470
2628
  className: e.styles.container,
2471
- children: /* @__PURE__ */ B(yt, {
2629
+ children: /* @__PURE__ */ V(St, {
2472
2630
  close: e.close,
2473
2631
  isOpen: d,
2474
2632
  backAction: m
2475
2633
  })
2476
2634
  });
2477
- if (!c) return /* @__PURE__ */ B(xt, {
2635
+ if (!c) return /* @__PURE__ */ V(wt, {
2478
2636
  openFaq: h,
2479
2637
  ...e
2480
2638
  });
2481
2639
  }
2482
- function xt({ openFaq: e, ...t }) {
2483
- let { workspace: n, faqs: r } = k((e) => e.data), [i, a] = A.useState(t.openOptions ? 2 : 1), o = x(n?.widget), s = v(n?.widget?.notifications?.showFaqBeforeConversation) && r.length > 0, c = A.useMemo(() => n?.logo, [n]);
2640
+ function wt({ openFaq: e, ...t }) {
2641
+ let { workspace: n, faqs: r } = k((e) => e.data), [i, a] = A.useState(t.openOptions ? 2 : 1), o = b(n?.widget), s = _(n?.widget?.notifications?.showFaqBeforeConversation) && r.length > 0, c = A.useMemo(() => n?.logo, [n]);
2484
2642
  A.useEffect(() => {
2485
2643
  a(t.openOptions ? 2 : 1);
2486
2644
  }, [t.openRequestId]);
2487
2645
  function l(e) {
2488
2646
  a(e);
2489
2647
  }
2490
- if (i === 2) return /* @__PURE__ */ B(mt, {
2648
+ if (i === 2) return /* @__PURE__ */ V(_t, {
2491
2649
  close: t.close,
2492
2650
  styles: t.styles,
2493
2651
  changeScreen: l,
@@ -2496,23 +2654,23 @@ function xt({ openFaq: e, ...t }) {
2496
2654
  openRequestId: t.openRequestId,
2497
2655
  autoSubmitRequestId: t.autoSubmitRequestId
2498
2656
  });
2499
- if (i === 1) return /* @__PURE__ */ V("div", {
2657
+ if (i === 1) return /* @__PURE__ */ H("div", {
2500
2658
  className: t.styles.container,
2501
- children: [/* @__PURE__ */ V("div", {
2659
+ children: [/* @__PURE__ */ H("div", {
2502
2660
  style: {
2503
2661
  background: String(n?.widget?.colorScheme),
2504
2662
  color: n?.widget?.textColor || "#ffffff"
2505
2663
  },
2506
2664
  className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
2507
2665
  children: [
2508
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2666
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2509
2667
  className: "padorix:size-8",
2510
- children: /* @__PURE__ */ V("div", {
2668
+ children: /* @__PURE__ */ H("div", {
2511
2669
  className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
2512
2670
  children: [
2513
2671
  " ",
2514
- /* @__PURE__ */ B("img", {
2515
- src: dt,
2672
+ /* @__PURE__ */ V("img", {
2673
+ src: mt,
2516
2674
  alt: n?.name,
2517
2675
  loading: "lazy",
2518
2676
  className: "padorix:size-6"
@@ -2521,29 +2679,29 @@ function xt({ openFaq: e, ...t }) {
2521
2679
  ]
2522
2680
  })
2523
2681
  }) }),
2524
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2682
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2525
2683
  className: "",
2526
2684
  children: n?.widget?.widgetMessage
2527
2685
  }) }),
2528
- /* @__PURE__ */ B("div", {
2686
+ /* @__PURE__ */ V("div", {
2529
2687
  className: "padorix:size-8 padorix:ml-auto",
2530
- children: /* @__PURE__ */ B("div", {
2688
+ children: /* @__PURE__ */ V("div", {
2531
2689
  className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
2532
2690
  onClick: t.close,
2533
- children: /* @__PURE__ */ B(F, {})
2691
+ children: /* @__PURE__ */ V(F, {})
2534
2692
  })
2535
2693
  })
2536
2694
  ]
2537
- }), /* @__PURE__ */ B("div", {
2695
+ }), /* @__PURE__ */ V("div", {
2538
2696
  className: "padorix:p-4 padorix:mt-5",
2539
- children: /* @__PURE__ */ V("div", {
2697
+ children: /* @__PURE__ */ H("div", {
2540
2698
  className: "padorix:flex padorix:flex-col padorix:items-center padorix:text-center padorix:h-full padorix:justify-center",
2541
2699
  children: [
2542
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ V("div", {
2700
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
2543
2701
  className: "padorix:mb-3",
2544
2702
  children: [
2545
2703
  " ",
2546
- /* @__PURE__ */ B("img", {
2704
+ /* @__PURE__ */ V("img", {
2547
2705
  src: c,
2548
2706
  alt: n?.name,
2549
2707
  loading: "lazy",
@@ -2552,33 +2710,33 @@ function xt({ openFaq: e, ...t }) {
2552
2710
  " "
2553
2711
  ]
2554
2712
  }) }),
2555
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2713
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2556
2714
  className: "padorix:font-semibold",
2557
2715
  children: n?.widget?.department
2558
2716
  }) }),
2559
- /* @__PURE__ */ V(R, { children: [/* @__PURE__ */ B("div", {
2717
+ /* @__PURE__ */ H(z, { children: [/* @__PURE__ */ V("div", {
2560
2718
  className: "padorix:mt-5",
2561
2719
  children: n?.widget?.welcomeMessage || "Ask us anything - we will get back to you here or by email."
2562
- }), !o && /* @__PURE__ */ B(_t, {})] }),
2563
- /* @__PURE__ */ V("div", {
2720
+ }), !o && /* @__PURE__ */ V(bt, {})] }),
2721
+ /* @__PURE__ */ H("div", {
2564
2722
  className: "padorix:mt-10",
2565
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("button", {
2723
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
2566
2724
  onClick: () => o && l(2),
2567
2725
  style: { background: String(n?.widget?.colorScheme) },
2568
2726
  disabled: !o,
2569
2727
  className: `padorix:text-white padorix:py-3 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:transition-all ${o ? "padorix:cursor-pointer padorix:hover:-translate-y-2 padorix:hover:shadow-md" : "padorix:cursor-not-allowed padorix:opacity-50"}`,
2570
2728
  children: "Start new conversation"
2571
- }) }), s && /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2729
+ }) }), s && /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2572
2730
  onClick: () => e?.(),
2573
2731
  className: "padorix:underline padorix:mt-5 padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
2574
2732
  children: "Frequently asked questions?"
2575
2733
  }) })]
2576
2734
  }),
2577
- v(n?.widget?.notifications?.displaySourceLogoOnWidget) && /* @__PURE__ */ B(R, { children: /* @__PURE__ */ V("div", {
2735
+ _(n?.widget?.notifications?.displaySourceLogoOnWidget) && /* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
2578
2736
  className: "padorix:mt-10 padorix:grayscale-100 padorix:text-sm padorix:flex padorix:items-center padorix:justify-center padorix:text-zinc-500 padorix:gap-2",
2579
2737
  children: [
2580
2738
  " ",
2581
- /* @__PURE__ */ B("img", {
2739
+ /* @__PURE__ */ V("img", {
2582
2740
  src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABPCAMAAAAjvDDpAAADAFBMVEVMaXEAQf8AVvsAVv8CVaoAV/0AVvwAVf8AAP8Af/8AVv4AVvwIf38AVvwAV/wAXuAA//8AP79jAAAAV/0AV/4AV/8AV/0AVv0EVe1vLQgOTcIRRaYEU+UAWP8AWP4OUMIYVtUAV/wQS74AAHYGU98RSrIAVvpUMgADWPcIUNgATOkqOT0AVv0NUcIAW/8AVfwXSZwQTLsAH1UAAP8IUNMAV/sJUNYCVvYFVu8dNXMIU98CWPcAWP8EVe8NTsgNR7wIUt4aSJ8OSrkSR6sDVvIEV/MPSLQDVfQFUeICVvQOTLoFVOkDVfIPT8UIUNoDVvIWSrcNTsQFVOsURZwIUd4JU9sEU+cFVOkEVewLUdMOTr4LT8wGU+MFVegAWP8FVeoFVOsQUL4GU+ICWPcIUt4DV/IDV/UIU98HUuMEV/ADVvQFVeoGT9QGUdwHUdsDVfADVvUFU+oFVeoIVOQDVfALUtcJT9MKTtIOUssDV/IQUsciN3AFVOoJUdUHU98MUNAEV+8EVe4DV/QKUdUPTLkFUuUGUNsSRaIIU98ZNXQFVeoDVfMDVe4RU8EHUuACVfMGVOUPUsgFVesFUuUGVucOUsoFVO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/22uNzJbZUJ1/9RZAYSM6U1LWb+otF7vEPqAImJAKH23df9c0dXpXqljg/ZbtLPDh0bhsz/GZBRjidHmcGybn+Fym45pCHdu3osbl3Ap4HmPDwcKbmQx8SFkZOrDGvH4AlmYJOp0tgrY7KqdDu7u6fFpqxrC4Wf1Xq9XiclDi5V90h924KDpTxkxNzhAxOyMI3frGH6O/OfjMgtPhj5YbNasUD4aWhPyXSxESOrbLoiAO73Waz63Qpam+4Pw2h8Mq3wnqYJ+hcBYfx1XbNf0J03yVPTdj2VMvoWd3vyCqGQfDtOBl1bwxw2E4sJOwiYJgIzcipd1r8rJIGTIhbBonnxXNiJqHL/aMeqsWECRcfOvBo31CIfOWHiVdbtGjRs+fU0zh+7nvdhCHu15OgaYsaTPu8071bwDuf/aQ9C5RzJcdwbdG7ItvWID6+Vljcvx7DzwqdMTQmuV4+BM1hpWQukv+Mwytm/z2Dg9FqQ0lOtCF10Mc/gCtD7of+Z0X0RRTanSbbXGWj8eGpt4N3m1Sb5F2EAwfxsdL0NhiiiwMhqDfDDPS6iDFJ7y6lyHvQ/oBdwb3yxHAse4poiQqd61IMJvvJL4J8LWyAb/Zi5Ivl1Oz1YNDCqLzgRgitXSSnpr+XDVoN7UKhy7ag2295kXTF4SgTajkI+6prkB2Ewt7ausfrA4Bth4Jdo1p4ZhlKE0NIRDxu5uBLd2kyeDuYUHdFmP7MwZhgrx/R9q8LLxy4cOHCK6NGHcpt5Lrzt6HXkhiCKDwEh/9u/wHzq1jxN2ehBgz8P+K/qzfIpxuSbGgAAAAASUVORK5CYII=",
2583
2741
  alt: "padorix",
2584
2742
  loading: "lazy",
@@ -2594,35 +2752,39 @@ function xt({ openFaq: e, ...t }) {
2594
2752
  }
2595
2753
  //#endregion
2596
2754
  //#region lib/chats/chatScreen/styles.ts
2597
- var St = "", Ct = {
2755
+ var Tt = "", Et = {
2598
2756
  visitor: {
2599
2757
  container: "padorix:z-50 padorix:fixed padorix:bottom-0 padorix:left-0 padorix:right-0 padorix:top-0 padorix:bg-[#fff] padorix:w-screen padorix:h-screen padorix:max-w-full padorix:pb-16 padorix:max-md:h-(--padorix-vvh,100dvh) padorix:max-md:translate-y-(--padorix-vvt,0px) padorix:md:top-auto padorix:md:left-auto padorix:md:bottom-5 padorix:md:right-2 padorix:md:h-[93dvh] padorix:md:w-[400px] padorix:md:max-w-[640px] padorix:md:rounded-xl padorix:md:border padorix:border-gray-200 padorix:md:shadow-lg padorix:overflow-y-hidden padorix:flex padorix:flex-col",
2600
2758
  backdrop: "padorix:hidden padorix:max-md:block padorix:fixed padorix:top-0 padorix:left-0 padorix:right-0 padorix:-bottom-[100lvh] padorix:z-49 padorix:bg-white padorix:touch-none",
2601
2759
  height: "80dvh",
2602
2760
  chatContainerPadding: "padorix:pt-3 padorix:flex-1 padorix:min-h-0 padorix:pb-10 padorix:overflow-y-auto padorix:overflow-x-hidden padorix-scrolls padorix:relative",
2603
2761
  header: "padorix:relative padorix:shrink-0 padorix:w-full padorix:bg-white padorix:z-10 padorix:border-x padorix:border-t padorix:border-gray-200 padorix:md:rounded-t-lg",
2604
- emojiContainer: "padorix:fixed padorix:bottom-18 padorix:ml-4 padorix:rounded-2xl padorix:h-[23.8rem] padorix:z-10 padorix:overflow-hidden padorix:right-auto padorix:bg-red-100 padorix:md:max-w-160 padorix:md:right-3",
2762
+ emojiContainer: "padorix:fixed padorix:bottom-20 padorix:left-4 padorix:z-30 padorix:md:left-auto padorix:md:right-6",
2605
2763
  formContainer: "padorix:border-t padorix:border-gray-200 padorix:fixed padorix:bg-white padorix:z-10 padorix:right-0 padorix:bottom-5 padorix:w-dvw padorix:max-w-full padorix:text-sm padorix:px-4 padorix:py-2 padorix:md:max-w-160 padorix:md:w-100 padorix:md:right-2 padorix:md:rounded-b-xl",
2606
2764
  imageUploadContainer: "padorix:fixed padorix:top-12 padorix:left-0 padorix:right-0 padorix:w-dvw padorix:h-full padorix:bg-white padorix:z-20 padorix:p-0 padorix:ml-auto padorix:space-y-3 padorix:md:top-21 padorix:md:right-2 padorix:md:w-100 padorix:md:max-w-160 padorix:md:h-[90dvh]",
2607
2765
  messagesContainer: "padorix:fixed padorix:bottom-5 padorix:right-0 padorix:w-full padorix:z-30 padorix:bg-white padorix:flex padorix:items-center padorix:justify-between padorix:px-3 padorix:py-4 padorix:md:right-2 padorix:md:w-100 padorix:md:max-w-160 padorix:border padorix:border-gray-200 padorix:rounded-b-xl",
2608
- replyContainer: "padorix:relative padorix:w-full padorix:mb-1"
2766
+ replyContainer: "padorix:relative padorix:w-full padorix:mb-1",
2767
+ formRoot: "padorix:relative padorix:z-50",
2768
+ imagePreviewBox: "padorix:h-[60dvh] padorix:md:h-[50dvh]"
2609
2769
  },
2610
2770
  nonVisitor: {
2611
2771
  container: "padorix:bg-[#fff] padorix:relative!",
2612
2772
  height: "",
2613
2773
  chatContainerPadding: "padorix:pt-5 padorix:pb-20 padorix:overflow-y-auto padorix:overflow-x-hidden padorix-scrolls padorix:relative",
2614
2774
  header: "padorix:sticky padorix:top-0 padorix:left-0 padorix:w-full padorix:bg-white padorix:z-10 padorix:border-x padorix:border-t padorix:border-gray-200",
2615
- emojiContainer: "padorix:absolute padorix:bottom-0 padorix:left-1 padorix:bg-white",
2616
- formContainer: `padorix:border-t padorix:bg-white padorix:z-10 padorix:relative padorix:border-gray-200 padorix:bottom-0 padorix:left-0 padorix:w-full ${St} padorix:ml-auto padorix:right-0 padorix:md:text-sm padorix:px-1.5 padorix:pt-1.5 padorix:pb-4`,
2617
- imageUploadContainer: `padorix:absolute padorix:top-0 padorix:left-0 padorix:size-full padorix:bg-white padorix:z-20 padorix:space-y-3 ${St} padorix:ml-auto padorix:right-0 padorix:h-[90dvh]`,
2775
+ emojiContainer: "padorix:absolute padorix:bottom-full padorix:left-1 padorix:mb-1 padorix:z-40",
2776
+ formContainer: `padorix:border-t padorix:bg-white padorix:z-10 padorix:relative padorix:border-gray-200 padorix:bottom-0 padorix:left-0 padorix:w-full ${Tt} padorix:ml-auto padorix:right-0 padorix:md:text-sm padorix:px-1.5 padorix:pt-1.5 padorix:pb-4`,
2777
+ imageUploadContainer: `padorix:absolute padorix:inset-0 padorix:bg-white padorix:z-30 padorix:flex padorix:flex-col padorix:gap-3 ${Tt}`,
2618
2778
  messagesContainer: "padorix:absolute padorix:border padorix:border-gray-200 padorix:bottom-0 padorix:right-0 padorix:w-full padorix:z-30 padorix:bg-white padorix:flex padorix:items-center padorix:justify-between padorix:px-3 padorix:py-4 padorix:md:right-2",
2619
- replyContainer: `padorix:relative padorix:w-full padorix:mb-1 ${St}`
2779
+ replyContainer: `padorix:relative padorix:w-full padorix:mb-1 ${Tt}`,
2780
+ formRoot: "",
2781
+ imagePreviewBox: "padorix:flex-1 padorix:min-h-0"
2620
2782
  }
2621
- }, wt = "data:image/svg+xml,%3csvg%20width='122'%20height='123'%20viewBox='0%200%20122%20123'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M56.6201%2019.9004H65.3779C85.9345%2019.9004%20102.6%2036.5645%20102.6%2057.1211V65.8789C102.6%2086.4355%2085.9346%20103.101%2065.3779%20103.101H56.6201C36.0636%20103.101%2019.3994%2086.4355%2019.3994%2065.8789V57.1211C19.3995%2036.5646%2036.0636%2019.9005%2056.6201%2019.9004Z'%20stroke='%23667085'%20stroke-width='6.4'/%3e%3c/g%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M40.6201%203.90039H81.3779C101.934%203.90039%20118.6%2020.5645%20118.6%2041.1211V81.8789C118.6%20102.436%20101.935%20119.101%2081.3779%20119.101H40.6201C20.0636%20119.101%203.39941%20102.435%203.39941%2081.8789V41.1211C3.39948%2020.5646%2020.0636%203.90048%2040.6201%203.90039Z'%20stroke='%23667085'%20stroke-width='6.4'/%3e%3c/g%3e%3cpath%20d='M51.6693%2070.8339L70.3359%2052.1673M53.0026%2040.1673V34.834M69.0026%2082.834V88.1673M39.6693%2053.5007H34.3359M82.3359%2069.5007H87.6693M42.1072%2042.6052L38.3359%2038.834M79.8981%2080.3958L83.6694%2084.1671M61.0027%2076.5854L55.3458%2082.2422C51.1803%2086.4078%2044.4265%2086.4078%2040.2609%2082.2422C36.0953%2078.0766%2036.0953%2071.3229%2040.2609%2067.1573L45.9178%2061.5004M76.0876%2061.5004L81.7445%2055.8436C85.9101%2051.678%2085.9101%2044.9242%2081.7445%2040.7586C77.5789%2036.593%2070.8251%2036.593%2066.6596%2040.7586L61.0027%2046.4155'%20stroke='%23667085'%20stroke-width='6.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", Tt = "data:image/svg+xml,%3csvg%20width='122'%20height='122'%20viewBox='0%200%20122%20122'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M56.6209%2019.4002H65.3787C85.9353%2019.4002%20102.6%2036.0643%20102.6%2056.6209V65.3787C102.6%2085.9353%2085.9353%20102.6%2065.3787%20102.6H56.6209C36.0643%20102.6%2019.4002%2085.9353%2019.4002%2065.3787V56.6209C19.4003%2036.0644%2036.0644%2019.4003%2056.6209%2019.4002Z'%20stroke='%23D12C2C'%20stroke-width='6.4'/%3e%3c/g%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M40.6209%203.40019H81.3787C101.935%203.40019%20118.6%2020.0643%20118.6%2040.6209V81.3787C118.6%20101.935%20101.935%20118.6%2081.3787%20118.6H40.6209C20.0643%20118.6%203.40019%20101.935%203.40019%2081.3787V40.6209C3.40026%2020.0644%2020.0644%203.40028%2040.6209%203.40019Z'%20stroke='%23FF7E7E'%20stroke-width='6.4'/%3e%3c/g%3e%3cpath%20d='M69%2053L53%2069M53%2053L69%2069M87.6667%2061C87.6667%2075.7276%2075.7276%2087.6667%2061%2087.6667C46.2724%2087.6667%2034.3333%2075.7276%2034.3333%2061C34.3333%2046.2724%2046.2724%2034.3333%2061%2034.3333C75.7276%2034.3333%2087.6667%2046.2724%2087.6667%2061Z'%20stroke='%23D12C2C'%20stroke-width='6.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2783
+ }, Dt = "data:image/svg+xml,%3csvg%20width='122'%20height='123'%20viewBox='0%200%20122%20123'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M56.6201%2019.9004H65.3779C85.9345%2019.9004%20102.6%2036.5645%20102.6%2057.1211V65.8789C102.6%2086.4355%2085.9346%20103.101%2065.3779%20103.101H56.6201C36.0636%20103.101%2019.3994%2086.4355%2019.3994%2065.8789V57.1211C19.3995%2036.5646%2036.0636%2019.9005%2056.6201%2019.9004Z'%20stroke='%23667085'%20stroke-width='6.4'/%3e%3c/g%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M40.6201%203.90039H81.3779C101.934%203.90039%20118.6%2020.5645%20118.6%2041.1211V81.8789C118.6%20102.436%20101.935%20119.101%2081.3779%20119.101H40.6201C20.0636%20119.101%203.39941%20102.435%203.39941%2081.8789V41.1211C3.39948%2020.5646%2020.0636%203.90048%2040.6201%203.90039Z'%20stroke='%23667085'%20stroke-width='6.4'/%3e%3c/g%3e%3cpath%20d='M51.6693%2070.8339L70.3359%2052.1673M53.0026%2040.1673V34.834M69.0026%2082.834V88.1673M39.6693%2053.5007H34.3359M82.3359%2069.5007H87.6693M42.1072%2042.6052L38.3359%2038.834M79.8981%2080.3958L83.6694%2084.1671M61.0027%2076.5854L55.3458%2082.2422C51.1803%2086.4078%2044.4265%2086.4078%2040.2609%2082.2422C36.0953%2078.0766%2036.0953%2071.3229%2040.2609%2067.1573L45.9178%2061.5004M76.0876%2061.5004L81.7445%2055.8436C85.9101%2051.678%2085.9101%2044.9242%2081.7445%2040.7586C77.5789%2036.593%2070.8251%2036.593%2066.6596%2040.7586L61.0027%2046.4155'%20stroke='%23667085'%20stroke-width='6.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", Ot = "data:image/svg+xml,%3csvg%20width='122'%20height='122'%20viewBox='0%200%20122%20122'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M56.6209%2019.4002H65.3787C85.9353%2019.4002%20102.6%2036.0643%20102.6%2056.6209V65.3787C102.6%2085.9353%2085.9353%20102.6%2065.3787%20102.6H56.6209C36.0643%20102.6%2019.4002%2085.9353%2019.4002%2065.3787V56.6209C19.4003%2036.0644%2036.0644%2019.4003%2056.6209%2019.4002Z'%20stroke='%23D12C2C'%20stroke-width='6.4'/%3e%3c/g%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M40.6209%203.40019H81.3787C101.935%203.40019%20118.6%2020.0643%20118.6%2040.6209V81.3787C118.6%20101.935%20101.935%20118.6%2081.3787%20118.6H40.6209C20.0643%20118.6%203.40019%20101.935%203.40019%2081.3787V40.6209C3.40026%2020.0644%2020.0644%203.40028%2040.6209%203.40019Z'%20stroke='%23FF7E7E'%20stroke-width='6.4'/%3e%3c/g%3e%3cpath%20d='M69%2053L53%2069M53%2053L69%2069M87.6667%2061C87.6667%2075.7276%2075.7276%2087.6667%2061%2087.6667C46.2724%2087.6667%2034.3333%2075.7276%2034.3333%2061C34.3333%2046.2724%2046.2724%2034.3333%2061%2034.3333C75.7276%2034.3333%2087.6667%2046.2724%2087.6667%2061Z'%20stroke='%23D12C2C'%20stroke-width='6.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
2622
2784
  //#endregion
2623
2785
  //#region lib/chats/online-check/online-check.tsx
2624
- function Et(e) {
2625
- let t = e.userType === w.VISITOR ? Ct.visitor : Ct.nonVisitor, n = e.userType === w.VISITOR, [r, i] = A.useState(navigator.onLine);
2786
+ function kt(e) {
2787
+ let t = e.userType === w.VISITOR ? Et.visitor : Et.nonVisitor, n = e.userType === w.VISITOR, [r, i] = A.useState(navigator.onLine);
2626
2788
  return A.useEffect(() => {
2627
2789
  let e = () => {
2628
2790
  i(!0);
@@ -2632,19 +2794,19 @@ function Et(e) {
2632
2794
  return window.addEventListener("online", e), window.addEventListener("offline", t), () => {
2633
2795
  window.removeEventListener("online", e), window.removeEventListener("offline", t);
2634
2796
  };
2635
- }, []), r ? e.children : /* @__PURE__ */ V("div", {
2797
+ }, []), r ? e.children : /* @__PURE__ */ H("div", {
2636
2798
  className: t.container,
2637
- children: [/* @__PURE__ */ V("div", {
2799
+ children: [/* @__PURE__ */ H("div", {
2638
2800
  className: "padorix:px-3 padorix:py-5 padorix:bg-[#6c63ff] padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
2639
2801
  children: [
2640
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2802
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2641
2803
  className: "padorix:size-8",
2642
- children: /* @__PURE__ */ V("div", {
2804
+ children: /* @__PURE__ */ H("div", {
2643
2805
  className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
2644
2806
  children: [
2645
2807
  " ",
2646
- /* @__PURE__ */ B("img", {
2647
- src: Tt,
2808
+ /* @__PURE__ */ V("img", {
2809
+ src: Ot,
2648
2810
  alt: "Padorix",
2649
2811
  loading: "lazy",
2650
2812
  className: "padorix:size-6"
@@ -2653,39 +2815,39 @@ function Et(e) {
2653
2815
  ]
2654
2816
  })
2655
2817
  }) }),
2656
- /* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("div", {
2818
+ /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
2657
2819
  className: "",
2658
2820
  children: "Internet connected lost, try reconnecting your device network to proceed"
2659
2821
  }) }),
2660
- n && /* @__PURE__ */ B("div", {
2822
+ n && /* @__PURE__ */ V("div", {
2661
2823
  className: "padorix:size-8 padorix:ml-auto",
2662
- children: /* @__PURE__ */ B("div", {
2824
+ children: /* @__PURE__ */ V("div", {
2663
2825
  className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
2664
2826
  onClick: e.close,
2665
- children: /* @__PURE__ */ B(F, {})
2827
+ children: /* @__PURE__ */ V(F, {})
2666
2828
  })
2667
2829
  })
2668
2830
  ]
2669
- }), /* @__PURE__ */ V("div", {
2831
+ }), /* @__PURE__ */ H("div", {
2670
2832
  className: "padorix:flex padorix:flex-col padorix:items-center padorix:justify-center padorix:h-full padorix:text-center",
2671
- children: [/* @__PURE__ */ B(R, { children: /* @__PURE__ */ B("img", {
2672
- src: wt,
2833
+ children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("img", {
2834
+ src: Dt,
2673
2835
  alt: "",
2674
2836
  className: ""
2675
- }) }), /* @__PURE__ */ V(R, { children: [
2676
- /* @__PURE__ */ B("div", {
2837
+ }) }), /* @__PURE__ */ H(z, { children: [
2838
+ /* @__PURE__ */ V("div", {
2677
2839
  className: "padorix:text-2xl padorix:font-bold padorix:mt-10 padorix:mb-3",
2678
2840
  children: "Oops!"
2679
2841
  }),
2680
- /* @__PURE__ */ B("div", {
2842
+ /* @__PURE__ */ V("div", {
2681
2843
  className: "padorix:text-base padorix:text-zinc-500",
2682
2844
  children: "Your internet is disconnected"
2683
2845
  }),
2684
- /* @__PURE__ */ V("div", {
2846
+ /* @__PURE__ */ H("div", {
2685
2847
  className: "padorix:text-zinc-500 padorix:text-sm",
2686
2848
  children: [
2687
2849
  "Do not worry your chat sessions are saved ",
2688
- /* @__PURE__ */ B("br", {}),
2850
+ /* @__PURE__ */ V("br", {}),
2689
2851
  " till you are back online"
2690
2852
  ]
2691
2853
  })
@@ -2695,57 +2857,57 @@ function Et(e) {
2695
2857
  }
2696
2858
  //#endregion
2697
2859
  //#region lib/chats/chatScreen/chat-conversation.tsx
2698
- function Dt(e) {
2699
- let t = e.userType === w.VISITOR, n = O(), { workspace: r } = k((e) => e.data);
2860
+ function At(t) {
2861
+ let n = t.userType === w.VISITOR, r = O(), { workspace: o } = k((e) => e.data);
2700
2862
  if (A.useEffect(() => {
2701
- if (!t) {
2702
- n(g(e.sender));
2863
+ if (!n) {
2864
+ r(e(t.sender));
2703
2865
  return;
2704
2866
  }
2705
2867
  try {
2706
- let e = JSON.parse(localStorage.getItem("pdx-sess") ?? "null"), t = e?.expiresAt ? G().isAfter(e?.expiresAt) : !0;
2707
- t && localStorage.removeItem(p), !t && e?.conversationId && n(g(e));
2868
+ let t = JSON.parse(localStorage.getItem("pdx-sess") ?? "null"), n = t?.expiresAt ? K().isAfter(t?.expiresAt) : !0;
2869
+ n && localStorage.removeItem(f), !n && t?.conversationId && r(e(t));
2708
2870
  } catch (e) {
2709
2871
  console.log(e);
2710
2872
  }
2711
2873
  }, [
2874
+ r,
2712
2875
  n,
2713
- t,
2714
- e.sender
2876
+ t.sender
2715
2877
  ]), A.useEffect(() => {
2716
- if (!e.workspaceId) return;
2717
- let t = !1;
2718
- return f.config(e.workspaceId, e.userType).then((e) => {
2719
- t || (n(a(e.workspace)), n(_(e.faqs)), n(i(e.tags)));
2878
+ if (!t.workspaceId) return;
2879
+ let e = !1;
2880
+ return d.config(t.workspaceId, t.userType).then((t) => {
2881
+ e || (r(i(t.workspace)), r(a(t.faqs)), r(h(t.tags)));
2720
2882
  }).catch((e) => console.log(e.message, "error data")), () => {
2721
- t = !0;
2883
+ e = !0;
2722
2884
  };
2723
2885
  }, [
2724
- n,
2725
- e.userType,
2726
- e.workspaceId
2886
+ r,
2887
+ t.userType,
2888
+ t.workspaceId
2727
2889
  ]), A.useEffect(() => {
2728
- if (t || !e.workspaceId) return;
2729
- let n = () => E.emit(D.subscribe_workspace, { workspaceId: e.workspaceId });
2730
- return E.on(D.connected, n), ne(!0), n(), () => {
2731
- E.off(D.connected, n);
2890
+ if (n || !t.workspaceId) return;
2891
+ let e = () => E.emit(D.subscribe_workspace, { workspaceId: t.workspaceId });
2892
+ return E.on(D.connected, e), te(!0), e(), () => {
2893
+ E.off(D.connected, e);
2732
2894
  };
2733
- }, [t, e.workspaceId]), r?.id) return e.children;
2895
+ }, [n, t.workspaceId]), o?.id) return t.children;
2734
2896
  }
2735
2897
  //#endregion
2736
2898
  //#region lib/chats/chatScreen/chat-panel.tsx
2737
- function Ot(e) {
2738
- return /* @__PURE__ */ V(H, { children: [/* @__PURE__ */ B("div", {
2899
+ function jt(e) {
2900
+ return /* @__PURE__ */ H(U, { children: [/* @__PURE__ */ V("div", {
2739
2901
  "aria-hidden": !0,
2740
- className: Ct.visitor.backdrop
2741
- }), /* @__PURE__ */ B(Et, {
2902
+ className: Et.visitor.backdrop
2903
+ }), /* @__PURE__ */ V(kt, {
2742
2904
  ...e,
2743
2905
  close: e.close,
2744
- children: /* @__PURE__ */ B(Dt, {
2906
+ children: /* @__PURE__ */ V(At, {
2745
2907
  ...e,
2746
- children: /* @__PURE__ */ B(bt, {
2908
+ children: /* @__PURE__ */ V(Ct, {
2747
2909
  close: e.close,
2748
- styles: Ct.visitor,
2910
+ styles: Et.visitor,
2749
2911
  workspaceId: e.workspaceId,
2750
2912
  moreActions: e.moreActions,
2751
2913
  userType: e.userType,
@@ -2759,13 +2921,13 @@ function Ot(e) {
2759
2921
  })
2760
2922
  })] });
2761
2923
  }
2762
- function kt(e) {
2763
- return /* @__PURE__ */ V(H, { children: [/* @__PURE__ */ B(T, {}), /* @__PURE__ */ B(Et, {
2924
+ function Mt(e) {
2925
+ return /* @__PURE__ */ H(U, { children: [/* @__PURE__ */ V(T, {}), /* @__PURE__ */ V(kt, {
2764
2926
  ...e,
2765
- children: /* @__PURE__ */ B(Dt, {
2927
+ children: /* @__PURE__ */ V(At, {
2766
2928
  ...e,
2767
- children: /* @__PURE__ */ B(ut, {
2768
- styles: Ct.nonVisitor,
2929
+ children: /* @__PURE__ */ V(pt, {
2930
+ styles: Et.nonVisitor,
2769
2931
  moreActions: e.moreActions,
2770
2932
  userType: e.userType,
2771
2933
  sender: e.sender,
@@ -2776,6 +2938,6 @@ function kt(e) {
2776
2938
  })] });
2777
2939
  }
2778
2940
  //#endregion
2779
- export { kt as AgentChatPanel, Ot as VisitorChatPanel };
2941
+ export { Mt as AgentChatPanel, jt as VisitorChatPanel };
2780
2942
 
2781
- //# sourceMappingURL=chat-panel-CXbOkOSq.js.map
2943
+ //# sourceMappingURL=chat-panel-DOV89YL7.js.map