lulichat 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +1 -0
  2. package/dist/components/ChatIcon.d.ts +5 -0
  3. package/dist/components/ChatInterface.d.ts +9 -0
  4. package/dist/components/ChatWidget.d.ts +7 -0
  5. package/dist/components/ChatWidget.test.d.ts +1 -0
  6. package/dist/components/ContactForm.d.ts +11 -0
  7. package/dist/components/LuliChat.d.ts +3 -0
  8. package/dist/components/LuliChat.test.d.ts +1 -0
  9. package/dist/components/ui/Button.d.ts +8 -0
  10. package/dist/components/ui/Form.d.ts +33 -0
  11. package/dist/components/ui/Icons.d.ts +10 -0
  12. package/dist/components/ui/Input.d.ts +9 -0
  13. package/dist/constants.d.ts +32 -0
  14. package/dist/hooks/useSocket.d.ts +4 -0
  15. package/dist/index.d.ts +4 -0
  16. package/dist/lib/socket.d.ts +17 -0
  17. package/dist/lulichat-support.es.js +200 -202
  18. package/dist/lulichat-support.umd.js +10 -10
  19. package/dist/main.d.ts +1 -0
  20. package/dist/types/index.d.ts +85 -0
  21. package/dist/utils/api.d.ts +15 -0
  22. package/dist/utils/index.d.ts +2 -0
  23. package/package.json +12 -5
  24. package/src/components/ChatIcon.tsx +0 -27
  25. package/src/components/ChatInterface.tsx +0 -211
  26. package/src/components/ChatWidget.tsx +0 -198
  27. package/src/components/ContactForm.tsx +0 -155
  28. package/src/components/LuliChat.tsx +0 -48
  29. package/src/components/ui/Button.tsx +0 -44
  30. package/src/components/ui/Form.tsx +0 -174
  31. package/src/components/ui/Icons.tsx +0 -443
  32. package/src/components/ui/Input.tsx +0 -31
  33. package/src/constants.ts +0 -32
  34. package/src/hooks/useSocket.ts +0 -45
  35. package/src/index.css +0 -383
  36. package/src/index.ts +0 -5
  37. package/src/lib/socket.ts +0 -96
  38. package/src/main.tsx +0 -15
  39. package/src/types/index.ts +0 -93
  40. package/src/utils/api.ts +0 -59
  41. package/src/utils/index.ts +0 -5
  42. package/src/vite-env.d.ts +0 -1
@@ -1,7 +1,7 @@
1
1
  var kt = Object.defineProperty;
2
2
  var Ct = (n, s, l) => s in n ? kt(n, s, { enumerable: !0, configurable: !0, writable: !0, value: l }) : n[s] = l;
3
- var A = (n, s, l) => Ct(n, typeof s != "symbol" ? s + "" : s, l);
4
- import S, { useRef as U, useCallback as $e, useImperativeHandle as Et, useState as F, useEffect as ce } from "react";
3
+ var F = (n, s, l) => Ct(n, typeof s != "symbol" ? s + "" : s, l);
4
+ import S, { useRef as U, useCallback as $e, useImperativeHandle as Et, useState as P, useEffect as ce } from "react";
5
5
  import Rt, { clsx as St } from "clsx";
6
6
  var ue = { exports: {} }, J = {};
7
7
  /**
@@ -17,11 +17,11 @@ var Me;
17
17
  function _t() {
18
18
  if (Me) return J;
19
19
  Me = 1;
20
- var n = S, s = Symbol.for("react.element"), l = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, v = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
20
+ var n = S, s = Symbol.for("react.element"), l = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, v = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
21
21
  function y(b, u, h) {
22
22
  var p, E = {}, R = null, T = null;
23
23
  h !== void 0 && (R = "" + h), u.key !== void 0 && (R = "" + u.key), u.ref !== void 0 && (T = u.ref);
24
- for (p in u) i.call(u, p) && !f.hasOwnProperty(p) && (E[p] = u[p]);
24
+ for (p in u) i.call(u, p) && !d.hasOwnProperty(p) && (E[p] = u[p]);
25
25
  if (b && b.defaultProps) for (p in u = b.defaultProps, u) E[p] === void 0 && (E[p] = u[p]);
26
26
  return { $$typeof: s, type: b, key: R, ref: T, props: E, _owner: v.current };
27
27
  }
@@ -40,11 +40,11 @@ var K = {};
40
40
  var Ie;
41
41
  function Nt() {
42
42
  return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
43
- var n = S, s = Symbol.for("react.element"), l = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), b = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), D = Symbol.iterator, M = "@@iterator";
43
+ var n = S, s = Symbol.for("react.element"), l = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), b = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), A = Symbol.iterator, M = "@@iterator";
44
44
  function j(e) {
45
45
  if (e === null || typeof e != "object")
46
46
  return null;
47
- var r = D && e[D] || e[M];
47
+ var r = A && e[A] || e[M];
48
48
  return typeof r == "function" ? r : null;
49
49
  }
50
50
  var O = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -65,14 +65,14 @@ function Nt() {
65
65
  x.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, x);
66
66
  }
67
67
  }
68
- var $ = !1, Ye = !1, Ue = !1, qe = !1, He = !1, de;
69
- de = Symbol.for("react.module.reference");
68
+ var $ = !1, Ye = !1, Ue = !1, qe = !1, He = !1, fe;
69
+ fe = Symbol.for("react.module.reference");
70
70
  function Je(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === f || He || e === v || e === h || e === p || qe || e === T || $ || Ye || Ue || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === E || e.$$typeof === y || e.$$typeof === b || e.$$typeof === u || // This needs to include all possible module reference object
71
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === d || He || e === v || e === h || e === p || qe || e === T || $ || Ye || Ue || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === E || e.$$typeof === y || e.$$typeof === b || e.$$typeof === u || // This needs to include all possible module reference object
72
72
  // types supported by any Flight configuration anywhere since
73
73
  // we don't know which Flight build this will end up being used
74
74
  // with.
75
- e.$$typeof === de || e.getModuleId !== void 0));
75
+ e.$$typeof === fe || e.getModuleId !== void 0));
76
76
  }
77
77
  function Ke(e, r, a) {
78
78
  var c = e.displayName;
@@ -81,7 +81,7 @@ function Nt() {
81
81
  var g = r.displayName || r.name || "";
82
82
  return g !== "" ? a + "(" + g + ")" : a;
83
83
  }
84
- function fe(e) {
84
+ function de(e) {
85
85
  return e.displayName || "Context";
86
86
  }
87
87
  function I(e) {
@@ -96,7 +96,7 @@ function Nt() {
96
96
  return "Fragment";
97
97
  case l:
98
98
  return "Portal";
99
- case f:
99
+ case d:
100
100
  return "Profiler";
101
101
  case v:
102
102
  return "StrictMode";
@@ -109,10 +109,10 @@ function Nt() {
109
109
  switch (e.$$typeof) {
110
110
  case b:
111
111
  var r = e;
112
- return fe(r) + ".Consumer";
112
+ return de(r) + ".Consumer";
113
113
  case y:
114
114
  var a = e;
115
- return fe(a._context) + ".Provider";
115
+ return de(a._context) + ".Provider";
116
116
  case u:
117
117
  return Ke(e, e.render, "ForwardRef");
118
118
  case E:
@@ -129,7 +129,7 @@ function Nt() {
129
129
  }
130
130
  return null;
131
131
  }
132
- var z = Object.assign, q = 0, he, me, ve, pe, ge, xe, ye;
132
+ var L = Object.assign, q = 0, he, me, ve, pe, ge, xe, ye;
133
133
  function be() {
134
134
  }
135
135
  be.__reactDisabledLog = !0;
@@ -165,25 +165,25 @@ function Nt() {
165
165
  writable: !0
166
166
  };
167
167
  Object.defineProperties(console, {
168
- log: z({}, e, {
168
+ log: L({}, e, {
169
169
  value: he
170
170
  }),
171
- info: z({}, e, {
171
+ info: L({}, e, {
172
172
  value: me
173
173
  }),
174
- warn: z({}, e, {
174
+ warn: L({}, e, {
175
175
  value: ve
176
176
  }),
177
- error: z({}, e, {
177
+ error: L({}, e, {
178
178
  value: pe
179
179
  }),
180
- group: z({}, e, {
180
+ group: L({}, e, {
181
181
  value: ge
182
182
  }),
183
- groupCollapsed: z({}, e, {
183
+ groupCollapsed: L({}, e, {
184
184
  value: xe
185
185
  }),
186
- groupEnd: z({}, e, {
186
+ groupEnd: L({}, e, {
187
187
  value: ye
188
188
  })
189
189
  });
@@ -258,18 +258,18 @@ function Nt() {
258
258
  }
259
259
  } catch (N) {
260
260
  if (N && c && typeof N.stack == "string") {
261
- for (var d = N.stack.split(`
261
+ for (var f = N.stack.split(`
262
262
  `), _ = c.stack.split(`
263
- `), k = d.length - 1, C = _.length - 1; k >= 1 && C >= 0 && d[k] !== _[C]; )
263
+ `), k = f.length - 1, C = _.length - 1; k >= 1 && C >= 0 && f[k] !== _[C]; )
264
264
  C--;
265
265
  for (; k >= 1 && C >= 0; k--, C--)
266
- if (d[k] !== _[C]) {
266
+ if (f[k] !== _[C]) {
267
267
  if (k !== 1 || C !== 1)
268
268
  do
269
- if (k--, C--, C < 0 || d[k] !== _[C]) {
270
- var P = `
271
- ` + d[k].replace(" at new ", " at ");
272
- return e.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, P), P;
269
+ if (k--, C--, C < 0 || f[k] !== _[C]) {
270
+ var D = `
271
+ ` + f[k].replace(" at new ", " at ");
272
+ return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, D), D;
273
273
  }
274
274
  while (k >= 1 && C >= 0);
275
275
  break;
@@ -278,8 +278,8 @@ function Nt() {
278
278
  } finally {
279
279
  ne = !1, te.current = x, Ze(), Error.prepareStackTrace = g;
280
280
  }
281
- var B = e ? e.displayName || e.name : "", V = B ? G(B) : "";
282
- return typeof e == "function" && Z.set(e, V), V;
281
+ var B = e ? e.displayName || e.name : "", W = B ? G(B) : "";
282
+ return typeof e == "function" && Z.set(e, W), W;
283
283
  }
284
284
  function Qe(e, r, a) {
285
285
  return je(e, !1);
@@ -330,17 +330,17 @@ function Nt() {
330
330
  var x = Function.call.bind(H);
331
331
  for (var m in e)
332
332
  if (x(e, m)) {
333
- var d = void 0;
333
+ var f = void 0;
334
334
  try {
335
335
  if (typeof e[m] != "function") {
336
336
  var _ = Error((c || "React class") + ": " + a + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
337
  throw _.name = "Invariant Violation", _;
338
338
  }
339
- d = e[m](r, m, c, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
339
+ f = e[m](r, m, c, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
340
  } catch (k) {
341
- d = k;
341
+ f = k;
342
342
  }
343
- d && !(d instanceof Error) && (Q(g), o("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", a, m, typeof d), Q(null)), d instanceof Error && !(d.message in we) && (we[d.message] = !0, Q(g), o("Failed %s type: %s", a, d.message), Q(null));
343
+ f && !(f instanceof Error) && (Q(g), o("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", a, m, typeof f), Q(null)), f instanceof Error && !(f.message in we) && (we[f.message] = !0, Q(g), o("Failed %s type: %s", a, f.message), Q(null));
344
344
  }
345
345
  }
346
346
  }
@@ -415,8 +415,8 @@ function Nt() {
415
415
  });
416
416
  }
417
417
  }
418
- var dt = function(e, r, a, c, g, x, m) {
419
- var d = {
418
+ var ft = function(e, r, a, c, g, x, m) {
419
+ var f = {
420
420
  // This tag allows us to uniquely identify this as a React Element
421
421
  $$typeof: s,
422
422
  // Built-in properties that belong on the element
@@ -427,27 +427,27 @@ function Nt() {
427
427
  // Record the component responsible for creating this element.
428
428
  _owner: x
429
429
  };
430
- return d._store = {}, Object.defineProperty(d._store, "validated", {
430
+ return f._store = {}, Object.defineProperty(f._store, "validated", {
431
431
  configurable: !1,
432
432
  enumerable: !1,
433
433
  writable: !0,
434
434
  value: !1
435
- }), Object.defineProperty(d, "_self", {
435
+ }), Object.defineProperty(f, "_self", {
436
436
  configurable: !1,
437
437
  enumerable: !1,
438
438
  writable: !1,
439
439
  value: c
440
- }), Object.defineProperty(d, "_source", {
440
+ }), Object.defineProperty(f, "_source", {
441
441
  configurable: !1,
442
442
  enumerable: !1,
443
443
  writable: !1,
444
444
  value: g
445
- }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
445
+ }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
446
446
  };
447
- function ft(e, r, a, c, g) {
447
+ function dt(e, r, a, c, g) {
448
448
  {
449
- var x, m = {}, d = null, _ = null;
450
- a !== void 0 && (Ee(a), d = "" + a), it(r) && (Ee(r.key), d = "" + r.key), ot(r) && (_ = r.ref, lt(r, g));
449
+ var x, m = {}, f = null, _ = null;
450
+ a !== void 0 && (Ee(a), f = "" + a), it(r) && (Ee(r.key), f = "" + r.key), ot(r) && (_ = r.ref, lt(r, g));
451
451
  for (x in r)
452
452
  H.call(r, x) && !st.hasOwnProperty(x) && (m[x] = r[x]);
453
453
  if (e && e.defaultProps) {
@@ -455,15 +455,15 @@ function Nt() {
455
455
  for (x in k)
456
456
  m[x] === void 0 && (m[x] = k[x]);
457
457
  }
458
- if (d || _) {
458
+ if (f || _) {
459
459
  var C = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
460
- d && ct(m, C), _ && ut(m, C);
460
+ f && ct(m, C), _ && ut(m, C);
461
461
  }
462
- return dt(e, d, _, g, c, Re.current, m);
462
+ return ft(e, f, _, g, c, Re.current, m);
463
463
  }
464
464
  }
465
465
  var se = O.ReactCurrentOwner, Ne = O.ReactDebugCurrentFrame;
466
- function L(e) {
466
+ function V(e) {
467
467
  if (e) {
468
468
  var r = e._owner, a = X(e.type, e._source, r ? r.type : null);
469
469
  Ne.setExtraStackFrame(a);
@@ -503,7 +503,7 @@ Check the top-level render call using <` + a + ">.");
503
503
  return r;
504
504
  }
505
505
  }
506
- function Pe(e, r) {
506
+ function De(e, r) {
507
507
  {
508
508
  if (!e._store || e._store.validated || e.key != null)
509
509
  return;
@@ -513,17 +513,17 @@ Check the top-level render call using <` + a + ">.");
513
513
  return;
514
514
  Oe[a] = !0;
515
515
  var c = "";
516
- e && e._owner && e._owner !== se.current && (c = " It was passed a child from " + I(e._owner.type) + "."), L(e), o('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, c), L(null);
516
+ e && e._owner && e._owner !== se.current && (c = " It was passed a child from " + I(e._owner.type) + "."), V(e), o('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, c), V(null);
517
517
  }
518
518
  }
519
- function Fe(e, r) {
519
+ function Pe(e, r) {
520
520
  {
521
521
  if (typeof e != "object")
522
522
  return;
523
523
  if (ae(e))
524
524
  for (var a = 0; a < e.length; a++) {
525
525
  var c = e[a];
526
- ie(c) && Pe(c, r);
526
+ ie(c) && De(c, r);
527
527
  }
528
528
  else if (ie(e))
529
529
  e._store && (e._store.validated = !0);
@@ -531,7 +531,7 @@ Check the top-level render call using <` + a + ">.");
531
531
  var g = j(e);
532
532
  if (typeof g == "function" && g !== e.entries)
533
533
  for (var x = g.call(e), m; !(m = x.next()).done; )
534
- ie(m.value) && Pe(m.value, r);
534
+ ie(m.value) && De(m.value, r);
535
535
  }
536
536
  }
537
537
  }
@@ -565,63 +565,63 @@ Check the top-level render call using <` + a + ">.");
565
565
  for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
566
566
  var c = r[a];
567
567
  if (c !== "children" && c !== "key") {
568
- L(e), o("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), L(null);
568
+ V(e), o("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), V(null);
569
569
  break;
570
570
  }
571
571
  }
572
- e.ref !== null && (L(e), o("Invalid attribute `ref` supplied to `React.Fragment`."), L(null));
572
+ e.ref !== null && (V(e), o("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
573
573
  }
574
574
  }
575
- var Ae = {};
576
- function De(e, r, a, c, g, x) {
575
+ var Fe = {};
576
+ function Ae(e, r, a, c, g, x) {
577
577
  {
578
578
  var m = Je(e);
579
579
  if (!m) {
580
- var d = "";
581
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
580
+ var f = "";
581
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
582
582
  var _ = ht();
583
- _ ? d += _ : d += Te();
583
+ _ ? f += _ : f += Te();
584
584
  var k;
585
- e === null ? k = "null" : ae(e) ? k = "array" : e !== void 0 && e.$$typeof === s ? (k = "<" + (I(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : k = typeof e, o("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, d);
585
+ e === null ? k = "null" : ae(e) ? k = "array" : e !== void 0 && e.$$typeof === s ? (k = "<" + (I(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : k = typeof e, o("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, f);
586
586
  }
587
- var C = ft(e, r, a, g, x);
587
+ var C = dt(e, r, a, g, x);
588
588
  if (C == null)
589
589
  return C;
590
590
  if (m) {
591
- var P = r.children;
592
- if (P !== void 0)
591
+ var D = r.children;
592
+ if (D !== void 0)
593
593
  if (c)
594
- if (ae(P)) {
595
- for (var B = 0; B < P.length; B++)
596
- Fe(P[B], e);
597
- Object.freeze && Object.freeze(P);
594
+ if (ae(D)) {
595
+ for (var B = 0; B < D.length; B++)
596
+ Pe(D[B], e);
597
+ Object.freeze && Object.freeze(D);
598
598
  } else
599
599
  o("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
600
600
  else
601
- Fe(P, e);
601
+ Pe(D, e);
602
602
  }
603
603
  if (H.call(r, "key")) {
604
- var V = I(e), N = Object.keys(r).filter(function(wt) {
604
+ var W = I(e), N = Object.keys(r).filter(function(wt) {
605
605
  return wt !== "key";
606
606
  }), le = N.length > 0 ? "{key: someKey, " + N.join(": ..., ") + ": ...}" : "{key: someKey}";
607
- if (!Ae[V + le]) {
607
+ if (!Fe[W + le]) {
608
608
  var jt = N.length > 0 ? "{" + N.join(": ..., ") + ": ...}" : "{}";
609
609
  o(`A props object containing a "key" prop is being spread into JSX:
610
610
  let props = %s;
611
611
  <%s {...props} />
612
612
  React keys must be passed directly to JSX without using spread:
613
613
  let props = %s;
614
- <%s key={someKey} {...props} />`, le, V, jt, V), Ae[V + le] = !0;
614
+ <%s key={someKey} {...props} />`, le, W, jt, W), Fe[W + le] = !0;
615
615
  }
616
616
  }
617
617
  return e === i ? pt(C) : vt(C), C;
618
618
  }
619
619
  }
620
620
  function gt(e, r, a) {
621
- return De(e, r, a, !0);
621
+ return Ae(e, r, a, !0);
622
622
  }
623
623
  function xt(e, r, a) {
624
- return De(e, r, a, !1);
624
+ return Ae(e, r, a, !1);
625
625
  }
626
626
  var yt = xt, bt = gt;
627
627
  K.Fragment = i, K.jsx = yt, K.jsxs = bt;
@@ -631,8 +631,8 @@ process.env.NODE_ENV === "production" ? ue.exports = _t() : ue.exports = Nt();
631
631
  var t = ue.exports;
632
632
  class Tt {
633
633
  constructor(s) {
634
- A(this, "config");
635
- A(this, "baseUrl");
634
+ F(this, "config");
635
+ F(this, "baseUrl");
636
636
  this.config = s, this.baseUrl = s.baseUrl || "http://localhost:8000";
637
637
  }
638
638
  async getCompanyInfo() {
@@ -671,7 +671,7 @@ class Tt {
671
671
  return this.submitContactInfo();
672
672
  }
673
673
  }
674
- function ze(...n) {
674
+ function Le(...n) {
675
675
  return St(n);
676
676
  }
677
677
  const ee = S.forwardRef(
@@ -681,36 +681,36 @@ const ee = S.forwardRef(
681
681
  ...n,
682
682
  autoComplete: n.autoComplete || n.name || "off",
683
683
  ref: s,
684
- className: ze("lulichat-input", n.className)
684
+ className: Le("lulichat-input", n.className)
685
685
  }
686
686
  )
687
687
  );
688
688
  S.forwardRef(
689
689
  (n, s) => /* @__PURE__ */ t.jsx("input", { className: "", ...n, ref: s })
690
690
  );
691
- const Ve = S.createContext(
691
+ const We = S.createContext(
692
692
  void 0
693
693
  ), Y = S.forwardRef(
694
694
  ({ children: n, onValuesChange: s, initialValues: l, ...i }, v) => {
695
- const f = U(l || {}), y = U(null), b = $e(
695
+ const d = U(l || {}), y = U(null), b = $e(
696
696
  (h, p) => {
697
- f.current[h] = p, s && s({ ...f.current });
697
+ d.current[h] = p, s && s({ ...d.current });
698
698
  },
699
699
  [s]
700
700
  ), u = {
701
- getValues: () => f.current,
701
+ getValues: () => d.current,
702
702
  getFieldValue: (h) => {
703
703
  var p;
704
- return (p = f.current) == null ? void 0 : p[h];
704
+ return (p = d.current) == null ? void 0 : p[h];
705
705
  },
706
706
  elementRef: () => y.current,
707
707
  setFieldValue: b
708
708
  };
709
- return Et(v, () => u), /* @__PURE__ */ t.jsx(Ve.Provider, { value: u, children: /* @__PURE__ */ t.jsx("form", { ...i, ref: y, onSubmit: i.onSubmit, children: n }) });
709
+ return Et(v, () => u), /* @__PURE__ */ t.jsx(We.Provider, { value: u, children: /* @__PURE__ */ t.jsx("form", { ...i, ref: y, onSubmit: i.onSubmit, children: n }) });
710
710
  }
711
711
  ), Ot = S.forwardRef(
712
712
  ({ name: n, children: s, ...l }, i) => {
713
- const v = S.useContext(Ve), f = function(u) {
713
+ const v = S.useContext(We), d = function(u) {
714
714
  var h, p;
715
715
  v && n && v.setFieldValue(n, u.target.value), (p = (h = this.props).onChange) == null || p.call(h, u);
716
716
  }, y = S.Children.map(s, (u) => {
@@ -720,26 +720,26 @@ const Ve = S.createContext(
720
720
  ...h.props,
721
721
  name: n,
722
722
  value: (v == null ? void 0 : v.getFieldValue(n)) ?? "",
723
- onChange: f.bind(h),
723
+ onChange: d.bind(h),
724
724
  required: l.required
725
725
  });
726
726
  }
727
727
  return u;
728
728
  }), b = Object.create(l);
729
729
  return delete b.required, delete b.label, /* @__PURE__ */ t.jsxs("div", { className: "lulichat-form-item", ref: i, ...b, children: [
730
- l.label && /* @__PURE__ */ t.jsx(We, { htmlFor: n, required: l.required, children: l.label }),
730
+ l.label && /* @__PURE__ */ t.jsx(ze, { htmlFor: n, required: l.required, children: l.label }),
731
731
  y,
732
732
  l.error && /* @__PURE__ */ t.jsx("p", { className: "error", children: l.error })
733
733
  ] });
734
734
  }
735
- ), We = S.forwardRef(
735
+ ), ze = S.forwardRef(
736
736
  (n, s) => {
737
737
  const l = n.required, i = n.children;
738
738
  return /* @__PURE__ */ t.jsxs(
739
739
  "label",
740
740
  {
741
741
  ...n,
742
- className: ze("lulichat-form-label", n.className),
742
+ className: Le("lulichat-form-label", n.className),
743
743
  ref: s,
744
744
  children: [
745
745
  i,
@@ -748,27 +748,27 @@ const Ve = S.createContext(
748
748
  }
749
749
  );
750
750
  }
751
- ), Pt = (n) => {
751
+ ), Dt = (n) => {
752
752
  const s = U(n || {}), l = U(null), i = $e(
753
- (f, y) => {
754
- s.current[f] = y;
753
+ (d, y) => {
754
+ s.current[d] = y;
755
755
  },
756
756
  []
757
757
  );
758
758
  return [{
759
759
  getValues: () => s.current,
760
- getFieldValue: (f) => {
760
+ getFieldValue: (d) => {
761
761
  var y;
762
- return (y = s.current) == null ? void 0 : y[f];
762
+ return (y = s.current) == null ? void 0 : y[d];
763
763
  },
764
764
  elementRef: () => l.current,
765
765
  setFieldValue: i
766
766
  }];
767
767
  };
768
768
  Y.Item = Ot;
769
- Y.Label = We;
770
- Y.useForm = Pt;
771
- const Ft = (n) => /* @__PURE__ */ t.jsx(
769
+ Y.Label = ze;
770
+ Y.useForm = Dt;
771
+ const Pt = (n) => /* @__PURE__ */ t.jsx(
772
772
  "svg",
773
773
  {
774
774
  xmlns: "http://www.w3.org/2000/svg",
@@ -781,11 +781,11 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
781
781
  {
782
782
  fill: "none",
783
783
  stroke: "currentColor",
784
- "stroke-dasharray": "10",
785
- "stroke-dashoffset": "10",
786
- "stroke-linecap": "round",
787
- "stroke-linejoin": "round",
788
- "stroke-width": "2",
784
+ strokeDasharray: "10",
785
+ strokeDashoffset: "10",
786
+ strokeLinecap: "round",
787
+ strokeLinejoin: "round",
788
+ strokeWidth: "2",
789
789
  d: "M12 15l-5 -5M12 15l5 -5",
790
790
  children: /* @__PURE__ */ t.jsx(
791
791
  "animate",
@@ -799,7 +799,7 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
799
799
  }
800
800
  )
801
801
  }
802
- ), At = (n) => /* @__PURE__ */ t.jsxs(
802
+ ), Ft = (n) => /* @__PURE__ */ t.jsxs(
803
803
  "svg",
804
804
  {
805
805
  xmlns: "http://www.w3.org/2000/svg",
@@ -813,17 +813,17 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
813
813
  {
814
814
  fill: "none",
815
815
  stroke: "#fff",
816
- "stroke-linecap": "round",
817
- "stroke-linejoin": "round",
818
- "stroke-width": "2",
816
+ strokeLinecap: "round",
817
+ strokeLinejoin: "round",
818
+ strokeWidth: "2",
819
819
  children: [
820
820
  /* @__PURE__ */ t.jsxs(
821
821
  "path",
822
822
  {
823
823
  fill: "#fff",
824
- "fill-opacity": "0",
825
- "stroke-dasharray": "64",
826
- "stroke-dashoffset": "64",
824
+ fillOpacity: "0",
825
+ strokeDasharray: "64",
826
+ strokeDashoffset: "64",
827
827
  d: "M13.5 3l5.5 5.5v11.5c0 0.55 -0.45 1 -1 1h-12c-0.55 0 -1 -0.45 -1 -1v-16c0 -0.55 0.45 -1 1 -1Z",
828
828
  children: [
829
829
  /* @__PURE__ */ t.jsx(
@@ -854,8 +854,8 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
854
854
  "path",
855
855
  {
856
856
  stroke: "#000",
857
- "stroke-dasharray": "12",
858
- "stroke-dashoffset": "12",
857
+ strokeDasharray: "12",
858
+ strokeDashoffset: "12",
859
859
  d: "M7 13h10",
860
860
  children: /* @__PURE__ */ t.jsx(
861
861
  "animate",
@@ -873,8 +873,8 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
873
873
  "path",
874
874
  {
875
875
  stroke: "#000",
876
- "stroke-dasharray": "8",
877
- "stroke-dashoffset": "8",
876
+ strokeDasharray: "8",
877
+ strokeDashoffset: "8",
878
878
  d: "M7 17h7",
879
879
  children: /* @__PURE__ */ t.jsx(
880
880
  "animate",
@@ -902,7 +902,7 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
902
902
  )
903
903
  ]
904
904
  }
905
- ), Dt = (n) => /* @__PURE__ */ t.jsx(
905
+ ), At = (n) => /* @__PURE__ */ t.jsx(
906
906
  "svg",
907
907
  {
908
908
  xmlns: "http://www.w3.org/2000/svg",
@@ -947,11 +947,11 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
947
947
  {
948
948
  fill: "none",
949
949
  stroke: "currentColor",
950
- "stroke-dasharray": "28",
951
- "stroke-dashoffset": "28",
952
- "stroke-linecap": "round",
953
- "stroke-linejoin": "round",
954
- "stroke-width": "2",
950
+ strokeDasharray: "28",
951
+ strokeDashoffset: "28",
952
+ strokeLinecap: "round",
953
+ strokeLinejoin: "round",
954
+ strokeWidth: "2",
955
955
  children: [
956
956
  /* @__PURE__ */ t.jsx("path", { d: "M4 21v-1c0 -3.31 2.69 -6 6 -6h4c3.31 0 6 2.69 6 6v1", children: /* @__PURE__ */ t.jsx(
957
957
  "animate",
@@ -976,7 +976,7 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
976
976
  }
977
977
  )
978
978
  }
979
- ), Le = () => /* @__PURE__ */ t.jsx(
979
+ ), Ve = () => /* @__PURE__ */ t.jsx(
980
980
  "svg",
981
981
  {
982
982
  xmlns: "http://www.w3.org/2000/svg",
@@ -988,9 +988,9 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
988
988
  {
989
989
  fill: "none",
990
990
  stroke: "currentColor",
991
- "stroke-linecap": "round",
992
- "stroke-linejoin": "round",
993
- "stroke-width": "2",
991
+ strokeLinecap: "round",
992
+ strokeLinejoin: "round",
993
+ strokeWidth: "2",
994
994
  d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11zm7.318-19.539l-10.94 10.939"
995
995
  }
996
996
  )
@@ -1008,15 +1008,15 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1008
1008
  {
1009
1009
  fill: "none",
1010
1010
  stroke: "currentColor",
1011
- "stroke-linecap": "round",
1012
- "stroke-linejoin": "round",
1013
- "stroke-width": "2",
1011
+ strokeLinecap: "round",
1012
+ strokeLinejoin: "round",
1013
+ strokeWidth: "2",
1014
1014
  children: [
1015
1015
  /* @__PURE__ */ t.jsxs(
1016
1016
  "path",
1017
1017
  {
1018
- "stroke-dasharray": "16",
1019
- "stroke-dashoffset": "16",
1018
+ strokeDasharray: "16",
1019
+ strokeDashoffset: "16",
1020
1020
  d: "M12 3c4.97 0 9 4.03 9 9",
1021
1021
  children: [
1022
1022
  /* @__PURE__ */ t.jsx(
@@ -1044,9 +1044,9 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1044
1044
  /* @__PURE__ */ t.jsx(
1045
1045
  "path",
1046
1046
  {
1047
- "stroke-dasharray": "64",
1048
- "stroke-dashoffset": "64",
1049
- "stroke-opacity": "0.3",
1047
+ strokeDasharray: "64",
1048
+ strokeDashoffset: "64",
1049
+ strokeOpacity: "0.3",
1050
1050
  d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z",
1051
1051
  children: /* @__PURE__ */ t.jsx(
1052
1052
  "animate",
@@ -1077,7 +1077,7 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1077
1077
  "path",
1078
1078
  {
1079
1079
  fill: "#fff",
1080
- "fill-opacity": "0",
1080
+ fillOpacity: "0",
1081
1081
  d: "M5 15.5c1 1 2.5 2 4 2.5c-0.71 -0.24 -1.43 -0.59 -2.09 -1c-0.72 -0.45 -1.39 -0.98 -1.91 -1.5Z",
1082
1082
  children: [
1083
1083
  /* @__PURE__ */ t.jsx(
@@ -1099,17 +1099,17 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1099
1099
  {
1100
1100
  fill: "none",
1101
1101
  stroke: "#fff",
1102
- "stroke-linecap": "round",
1103
- "stroke-linejoin": "round",
1104
- "stroke-width": "2",
1102
+ strokeLinecap: "round",
1103
+ strokeLinejoin: "round",
1104
+ strokeWidth: "2",
1105
1105
  children: [
1106
1106
  /* @__PURE__ */ t.jsxs(
1107
1107
  "path",
1108
1108
  {
1109
1109
  fill: "transparent",
1110
- "fill-opacity": "0",
1111
- "stroke-dasharray": "56",
1112
- "stroke-dashoffset": "56",
1110
+ fillOpacity: "0",
1111
+ strokeDasharray: "56",
1112
+ strokeDashoffset: "56",
1113
1113
  d: "M7 16.82c-2.41 -1.25 -4 -3.39 -4 -5.82c0 -3.87 4.03 -7 9 -7c4.97 0 9 3.13 9 7c0 3.87 -4.03 7 -9 7c-1.85 0 -3.57 -0.43 -5 -1.18Z",
1114
1114
  children: [
1115
1115
  /* @__PURE__ */ t.jsx(
@@ -1138,8 +1138,8 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1138
1138
  "path",
1139
1139
  {
1140
1140
  stroke: "currentColor",
1141
- "stroke-dasharray": "2",
1142
- "stroke-dashoffset": "2",
1141
+ strokeDasharray: "2",
1142
+ strokeDashoffset: "2",
1143
1143
  d: "M8 11h0.01",
1144
1144
  children: /* @__PURE__ */ t.jsx(
1145
1145
  "animate",
@@ -1157,8 +1157,8 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1157
1157
  "path",
1158
1158
  {
1159
1159
  stroke: "currentColor",
1160
- "stroke-dasharray": "2",
1161
- "stroke-dashoffset": "2",
1160
+ strokeDasharray: "2",
1161
+ strokeDashoffset: "2",
1162
1162
  d: "M12 11h0.01",
1163
1163
  children: /* @__PURE__ */ t.jsx(
1164
1164
  "animate",
@@ -1176,8 +1176,8 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1176
1176
  "path",
1177
1177
  {
1178
1178
  stroke: "currentColor",
1179
- "stroke-dasharray": "2",
1180
- "stroke-dashoffset": "2",
1179
+ strokeDasharray: "2",
1180
+ strokeDashoffset: "2",
1181
1181
  d: "M16 11h0.01",
1182
1182
  children: /* @__PURE__ */ t.jsx(
1183
1183
  "animate",
@@ -1206,14 +1206,14 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1206
1206
  )
1207
1207
  ]
1208
1208
  }
1209
- ), W = S.forwardRef(
1209
+ ), z = S.forwardRef(
1210
1210
  ({
1211
1211
  className: n,
1212
1212
  variant: s = "outline",
1213
1213
  size: l = "md",
1214
1214
  shape: i = "rounded",
1215
1215
  ...v
1216
- }, f) => /* @__PURE__ */ t.jsx(
1216
+ }, d) => /* @__PURE__ */ t.jsx(
1217
1217
  "button",
1218
1218
  {
1219
1219
  className: Rt(
@@ -1223,31 +1223,31 @@ const Ft = (n) => /* @__PURE__ */ t.jsx(
1223
1223
  `lulichat-btn-${i}`,
1224
1224
  n
1225
1225
  ),
1226
- ref: f,
1226
+ ref: d,
1227
1227
  ...v
1228
1228
  }
1229
1229
  )
1230
1230
  );
1231
- W.displayName = "Button";
1232
- const zt = ({
1231
+ z.displayName = "Button";
1232
+ const Lt = ({
1233
1233
  companyName: n,
1234
1234
  onSubmit: s,
1235
1235
  onSkip: l,
1236
1236
  allowAnonymous: i,
1237
1237
  isLoading: v
1238
1238
  }) => {
1239
- const [f, y] = S.useState(!1), [b, u] = F({
1239
+ const [d, y] = S.useState(!1), [b, u] = P({
1240
1240
  name: "",
1241
1241
  email: "",
1242
1242
  phone: "",
1243
1243
  company: ""
1244
- }), [h, p] = F({}), [E, R] = S.useState({
1244
+ }), [h, p] = P({}), [E, R] = S.useState({
1245
1245
  email: "",
1246
1246
  name: ""
1247
1247
  }), T = () => {
1248
1248
  const j = {};
1249
1249
  return b.name.trim() || (j.name = "Name is required"), b.email.trim() ? /\S+@\S+\.\S+/.test(b.email) || (j.email = "Email is invalid") : j.email = "Email is required", p(j), Object.keys(j).length === 0;
1250
- }, D = (j) => {
1250
+ }, A = (j) => {
1251
1251
  j.preventDefault(), T() && s(b);
1252
1252
  }, M = (j, O) => {
1253
1253
  u((o) => ({ ...o, [j]: O })), h[j] && p((o) => ({ ...o, [j]: void 0 }));
@@ -1256,7 +1256,7 @@ const zt = ({
1256
1256
  Y,
1257
1257
  {
1258
1258
  autoComplete: "off",
1259
- onSubmit: D,
1259
+ onSubmit: A,
1260
1260
  onValuesChange: R,
1261
1261
  className: "lulichat-contact-form",
1262
1262
  children: [
@@ -1272,7 +1272,7 @@ const zt = ({
1272
1272
  },
1273
1273
  children: [
1274
1274
  /* @__PURE__ */ t.jsx(
1275
- Dt,
1275
+ At,
1276
1276
  {
1277
1277
  style: { display: "block" },
1278
1278
  color: "#DEDEDE6A",
@@ -1293,7 +1293,7 @@ const zt = ({
1293
1293
  "p",
1294
1294
  {
1295
1295
  role: "button",
1296
- onClickCapture: () => y(!f),
1296
+ onClickCapture: () => y(!d),
1297
1297
  style: {
1298
1298
  textDecoration: "underline",
1299
1299
  lineHeight: "1rem",
@@ -1303,7 +1303,7 @@ const zt = ({
1303
1303
  "Please provide your details for a better support experience",
1304
1304
  " ",
1305
1305
  /* @__PURE__ */ t.jsx(
1306
- Ft,
1306
+ Pt,
1307
1307
  {
1308
1308
  style: {
1309
1309
  display: "inline-block",
@@ -1317,7 +1317,7 @@ const zt = ({
1317
1317
  }
1318
1318
  )
1319
1319
  ] }),
1320
- /* @__PURE__ */ t.jsxs("div", { className: `lulichat-form-group${f ? " open" : ""}`, children: [
1320
+ /* @__PURE__ */ t.jsxs("div", { className: `lulichat-form-group${d ? " open" : ""}`, children: [
1321
1321
  /* @__PURE__ */ t.jsx(Y.Item, { error: h.name, label: "Name (Optional)", name: "name", children: /* @__PURE__ */ t.jsx(
1322
1322
  ee,
1323
1323
  {
@@ -1341,7 +1341,7 @@ const zt = ({
1341
1341
  }
1342
1342
  ) }),
1343
1343
  /* @__PURE__ */ t.jsx(
1344
- W,
1344
+ z,
1345
1345
  {
1346
1346
  type: "submit",
1347
1347
  disabled: v || !E.email,
@@ -1358,15 +1358,15 @@ const zt = ({
1358
1358
  }
1359
1359
  );
1360
1360
  };
1361
- class Vt {
1361
+ class Wt {
1362
1362
  constructor(s, l, i = "wss://ws.lulichat.com") {
1363
- A(this, "socket", null);
1364
- A(this, "token");
1365
- A(this, "sessionId");
1366
- A(this, "onMessageCallback");
1367
- A(this, "onStatusCallback");
1368
- A(this, "reconnectAttempts", 0);
1369
- A(this, "maxReconnectAttempts", 5);
1363
+ F(this, "socket", null);
1364
+ F(this, "token");
1365
+ F(this, "sessionId");
1366
+ F(this, "onMessageCallback");
1367
+ F(this, "onStatusCallback");
1368
+ F(this, "reconnectAttempts", 0);
1369
+ F(this, "maxReconnectAttempts", 5);
1370
1370
  this.token = s, this.sessionId = l, this.connect(i);
1371
1371
  }
1372
1372
  connect(s) {
@@ -1380,10 +1380,10 @@ class Vt {
1380
1380
  }, this.socket.onmessage = (i) => {
1381
1381
  var v;
1382
1382
  try {
1383
- const f = JSON.parse(i.data);
1384
- (v = this.onMessageCallback) == null || v.call(this, f);
1385
- } catch (f) {
1386
- console.error("Failed to parse message:", f);
1383
+ const d = JSON.parse(i.data);
1384
+ (v = this.onMessageCallback) == null || v.call(this, d);
1385
+ } catch (d) {
1386
+ console.error("Failed to parse message:", d);
1387
1387
  }
1388
1388
  }, this.socket.onclose = () => {
1389
1389
  var i;
@@ -1422,13 +1422,13 @@ class Vt {
1422
1422
  this.socket && (this.socket.close(), this.socket = null);
1423
1423
  }
1424
1424
  }
1425
- const Wt = ({
1425
+ const zt = ({
1426
1426
  session: n,
1427
1427
  companyInfo: s,
1428
1428
  onClose: l
1429
1429
  }) => {
1430
- const [i, v] = F([]), [f, y] = F(""), [b, u] = F(!1), [h, p] = F("disconnected"), E = U(null), R = U(null);
1431
- ce(() => (R.current = new Vt(n.token, n.id), R.current.onMessage((w) => {
1430
+ const [i, v] = P([]), [d, y] = P(""), [b, u] = P(!1), [h, p] = P("disconnected"), E = U(null), R = U(null);
1431
+ ce(() => (R.current = new Wt(n.token, n.id), R.current.onMessage((w) => {
1432
1432
  v(($) => [...$, w]), u(!1);
1433
1433
  }), R.current.onStatus((w) => {
1434
1434
  p(w);
@@ -1446,18 +1446,18 @@ const Wt = ({
1446
1446
  const T = () => {
1447
1447
  var o;
1448
1448
  (o = E.current) == null || o.scrollIntoView({ behavior: "smooth" });
1449
- }, D = () => {
1449
+ }, A = () => {
1450
1450
  var w;
1451
- if (!f.trim() || h !== "connected") return;
1451
+ if (!d.trim() || h !== "connected") return;
1452
1452
  const o = {
1453
1453
  id: Date.now().toString(),
1454
- content: f,
1454
+ content: d,
1455
1455
  timestamp: /* @__PURE__ */ new Date(),
1456
1456
  sender: "user"
1457
1457
  };
1458
- v(($) => [...$, o]), (w = R.current) == null || w.sendMessage(f), y(""), u(!0);
1458
+ v(($) => [...$, o]), (w = R.current) == null || w.sendMessage(d), y(""), u(!0);
1459
1459
  }, M = (o) => {
1460
- o.key === "Enter" && !o.shiftKey && (o.preventDefault(), D());
1460
+ o.key === "Enter" && !o.shiftKey && (o.preventDefault(), A());
1461
1461
  }, j = (o) => new Intl.DateTimeFormat("en-US", {
1462
1462
  hour: "2-digit",
1463
1463
  minute: "2-digit"
@@ -1479,7 +1479,7 @@ const Wt = ({
1479
1479
  /* @__PURE__ */ t.jsx("span", { className: "font-medium", children: s.name })
1480
1480
  ] }),
1481
1481
  /* @__PURE__ */ t.jsx(
1482
- W,
1482
+ z,
1483
1483
  {
1484
1484
  variant: "ghost",
1485
1485
  size: "sm",
@@ -1537,7 +1537,7 @@ const Wt = ({
1537
1537
  /* @__PURE__ */ t.jsx(
1538
1538
  "input",
1539
1539
  {
1540
- value: f,
1540
+ value: d,
1541
1541
  onChange: (o) => y(o.target.value),
1542
1542
  onKeyPress: M,
1543
1543
  placeholder: "Type your message...",
@@ -1546,26 +1546,26 @@ const Wt = ({
1546
1546
  }
1547
1547
  ),
1548
1548
  /* @__PURE__ */ t.jsx(
1549
- W,
1549
+ z,
1550
1550
  {
1551
- onClick: D,
1552
- disabled: !f.trim() || h !== "connected",
1551
+ onClick: A,
1552
+ disabled: !d.trim() || h !== "connected",
1553
1553
  size: "icon",
1554
- children: /* @__PURE__ */ t.jsx(Le, { className: "w-4 h-4" })
1554
+ children: /* @__PURE__ */ t.jsx(Ve, { className: "w-4 h-4" })
1555
1555
  }
1556
1556
  )
1557
1557
  ] }),
1558
1558
  h !== "connected" && /* @__PURE__ */ t.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: h === "error" ? "Connection error. Retrying..." : "Connecting..." })
1559
1559
  ] })
1560
1560
  ] });
1561
- }, Lt = ({ config: n }) => {
1562
- const [s, l] = F("contact-form"), [i, v] = F(
1561
+ }, Vt = ({ config: n }) => {
1562
+ const [s, l] = P("contact-form"), [i, v] = P(
1563
1563
  null
1564
- ), [f, y] = F(null), [b, u] = F(!1), [h, p] = F(null), [E, R] = S.useState(!1), T = new Tt(n);
1564
+ ), [d, y] = P(null), [b, u] = P(!1), [h, p] = P(null), [E, R] = S.useState(!1), T = new Tt(n);
1565
1565
  ce(() => {
1566
- D();
1566
+ A();
1567
1567
  }, [n]);
1568
- const D = async () => {
1568
+ const A = async () => {
1569
1569
  try {
1570
1570
  const o = await T.getCompanyInfo();
1571
1571
  v(o.data);
@@ -1610,7 +1610,7 @@ const Wt = ({
1610
1610
  /* @__PURE__ */ t.jsx("button", { onClick: () => p(null), className: "mt-2", children: "Retry" })
1611
1611
  ] }),
1612
1612
  /* @__PURE__ */ t.jsx(
1613
- zt,
1613
+ Lt,
1614
1614
  {
1615
1615
  companyName: i == null ? void 0 : i.name,
1616
1616
  onSubmit: M,
@@ -1664,24 +1664,24 @@ const Wt = ({
1664
1664
  }
1665
1665
  ),
1666
1666
  /* @__PURE__ */ t.jsxs("div", { className: "lulichat-btn-group", children: [
1667
- /* @__PURE__ */ t.jsx(W, { style: { color: "#00000080" }, size: "icon", children: /* @__PURE__ */ t.jsx(At, { height: 24 }) }),
1668
- /* @__PURE__ */ t.jsx(W, { style: { color: "#00000080" }, size: "icon", children: /* @__PURE__ */ t.jsx(Le, {}) })
1667
+ /* @__PURE__ */ t.jsx(z, { style: { color: "#00000080" }, size: "icon", children: /* @__PURE__ */ t.jsx(Ft, { height: 24 }) }),
1668
+ /* @__PURE__ */ t.jsx(z, { style: { color: "#00000080" }, size: "icon", children: /* @__PURE__ */ t.jsx(Ve, {}) })
1669
1669
  ] })
1670
1670
  ]
1671
1671
  }
1672
1672
  )
1673
1673
  ] }),
1674
- s === "chat" && f && i && /* @__PURE__ */ t.jsx(
1675
- Wt,
1674
+ s === "chat" && d && i && /* @__PURE__ */ t.jsx(
1675
+ zt,
1676
1676
  {
1677
- session: f,
1677
+ session: d,
1678
1678
  companyInfo: i,
1679
1679
  onClose: O
1680
1680
  }
1681
1681
  )
1682
1682
  ] }),
1683
1683
  /* @__PURE__ */ t.jsx(
1684
- W,
1684
+ z,
1685
1685
  {
1686
1686
  onClick: () => R(!E),
1687
1687
  className: "",
@@ -1706,7 +1706,7 @@ const Wt = ({
1706
1706
  position: l = "bottom-right",
1707
1707
  primaryColor: i = "#007bff",
1708
1708
  companyName: v = "Support",
1709
- welcomeMessage: f = "Hello! How can we help you today?",
1709
+ welcomeMessage: d = "Hello! How can we help you today?",
1710
1710
  requireContactInfo: y = !0,
1711
1711
  allowAnonymous: b = !0
1712
1712
  }) => {
@@ -1716,14 +1716,12 @@ const Wt = ({
1716
1716
  position: l,
1717
1717
  primaryColor: i,
1718
1718
  companyName: v,
1719
- welcomeMessage: f,
1719
+ welcomeMessage: d,
1720
1720
  requireContactInfo: y,
1721
1721
  allowAnonymous: b
1722
1722
  };
1723
- return n ? /* @__PURE__ */ t.jsx(Lt, { config: u }) : (console.error("LuliChat: API key is required"), null);
1723
+ return n ? /* @__PURE__ */ t.jsx(Vt, { config: u }) : (console.error("LuliChat: API key is required"), null);
1724
1724
  };
1725
1725
  export {
1726
- Vt as ChatSocket,
1727
- qt as LuliChat,
1728
- Tt as LuliChatAPI
1726
+ qt as default
1729
1727
  };