widget-chatbot 2.0.0-alpha.13 → 2.0.0-alpha.14

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.
@@ -8,9 +8,9 @@ import ts from "remark-gfm";
8
8
  import { Prism as ss } from "react-syntax-highlighter";
9
9
  import rs from "@ant-design/icons";
10
10
  import { Pie as os } from "@ant-design/charts";
11
- import pe from "crypto-js";
11
+ import _e from "crypto-js";
12
12
  import { Picker as cs } from "emoji-mart";
13
- var Je = { exports: {} }, _e = {};
13
+ var Je = { exports: {} }, ke = {};
14
14
  /*
15
15
  object-assign
16
16
  (c) Sindre Sorhus
@@ -20,21 +20,21 @@ var ln, Vn;
20
20
  function Pn() {
21
21
  if (Vn) return ln;
22
22
  Vn = 1;
23
- var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
24
- function r(c) {
23
+ var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
24
+ function s(c) {
25
25
  if (c == null)
26
26
  throw new TypeError("Object.assign cannot be called with null or undefined");
27
27
  return Object(c);
28
28
  }
29
- function l() {
29
+ function d() {
30
30
  try {
31
31
  if (!Object.assign)
32
32
  return !1;
33
33
  var c = new String("abc");
34
34
  if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5")
35
35
  return !1;
36
- for (var o = {}, d = 0; d < 10; d++)
37
- o["_" + String.fromCharCode(d)] = d;
36
+ for (var o = {}, l = 0; l < 10; l++)
37
+ o["_" + String.fromCharCode(l)] = l;
38
38
  var a = Object.getOwnPropertyNames(o).map(function(f) {
39
39
  return o[f];
40
40
  });
@@ -48,15 +48,15 @@ function Pn() {
48
48
  return !1;
49
49
  }
50
50
  }
51
- return ln = l() ? Object.assign : function(c, o) {
52
- for (var d, a = r(c), u, f = 1; f < arguments.length; f++) {
53
- d = Object(arguments[f]);
54
- for (var x in d)
55
- t.call(d, x) && (a[x] = d[x]);
51
+ return ln = d() ? Object.assign : function(c, o) {
52
+ for (var l, a = s(c), u, f = 1; f < arguments.length; f++) {
53
+ l = Object(arguments[f]);
54
+ for (var x in l)
55
+ t.call(l, x) && (a[x] = l[x]);
56
56
  if (e) {
57
- u = e(d);
57
+ u = e(l);
58
58
  for (var g = 0; g < u.length; g++)
59
- s.call(d, u[g]) && (a[u[g]] = d[u[g]]);
59
+ r.call(l, u[g]) && (a[u[g]] = l[u[g]]);
60
60
  }
61
61
  }
62
62
  return a;
@@ -72,22 +72,22 @@ function Pn() {
72
72
  */
73
73
  var Gn;
74
74
  function is() {
75
- if (Gn) return _e;
75
+ if (Gn) return ke;
76
76
  Gn = 1, Pn();
77
77
  var e = mn, t = 60103;
78
- if (_e.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
79
- var s = Symbol.for;
80
- t = s("react.element"), _e.Fragment = s("react.fragment");
78
+ if (ke.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
79
+ var r = Symbol.for;
80
+ t = r("react.element"), ke.Fragment = r("react.fragment");
81
81
  }
82
- var r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = Object.prototype.hasOwnProperty, c = { key: !0, ref: !0, __self: !0, __source: !0 };
83
- function o(d, a, u) {
82
+ var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = Object.prototype.hasOwnProperty, c = { key: !0, ref: !0, __self: !0, __source: !0 };
83
+ function o(l, a, u) {
84
84
  var f, x = {}, g = null, C = null;
85
85
  u !== void 0 && (g = "" + u), a.key !== void 0 && (g = "" + a.key), a.ref !== void 0 && (C = a.ref);
86
- for (f in a) l.call(a, f) && !c.hasOwnProperty(f) && (x[f] = a[f]);
87
- if (d && d.defaultProps) for (f in a = d.defaultProps, a) x[f] === void 0 && (x[f] = a[f]);
88
- return { $$typeof: t, type: d, key: g, ref: C, props: x, _owner: r.current };
86
+ for (f in a) d.call(a, f) && !c.hasOwnProperty(f) && (x[f] = a[f]);
87
+ if (l && l.defaultProps) for (f in a = l.defaultProps, a) x[f] === void 0 && (x[f] = a[f]);
88
+ return { $$typeof: t, type: l, key: g, ref: C, props: x, _owner: s.current };
89
89
  }
90
- return _e.jsx = o, _e.jsxs = o, _e;
90
+ return ke.jsx = o, ke.jsxs = o, ke;
91
91
  }
92
92
  var an = {};
93
93
  /** @license React v17.0.2
@@ -102,12 +102,12 @@ var zn;
102
102
  function ls() {
103
103
  return zn || (zn = 1, function(e) {
104
104
  process.env.NODE_ENV !== "production" && function() {
105
- var t = mn, s = Pn(), r = 60103, l = 60106;
105
+ var t = mn, r = Pn(), s = 60103, d = 60106;
106
106
  e.Fragment = 60107;
107
- var c = 60108, o = 60114, d = 60109, a = 60110, u = 60112, f = 60113, x = 60120, g = 60115, C = 60116, y = 60121, w = 60122, _ = 60117, p = 60129, v = 60131;
107
+ var c = 60108, o = 60114, l = 60109, a = 60110, u = 60112, f = 60113, x = 60120, g = 60115, C = 60116, y = 60121, w = 60122, k = 60117, _ = 60129, v = 60131;
108
108
  if (typeof Symbol == "function" && Symbol.for) {
109
109
  var E = Symbol.for;
110
- r = E("react.element"), l = E("react.portal"), e.Fragment = E("react.fragment"), c = E("react.strict_mode"), o = E("react.profiler"), d = E("react.provider"), a = E("react.context"), u = E("react.forward_ref"), f = E("react.suspense"), x = E("react.suspense_list"), g = E("react.memo"), C = E("react.lazy"), y = E("react.block"), w = E("react.server.block"), _ = E("react.fundamental"), E("react.scope"), E("react.opaque.id"), p = E("react.debug_trace_mode"), E("react.offscreen"), v = E("react.legacy_hidden");
110
+ s = E("react.element"), d = E("react.portal"), e.Fragment = E("react.fragment"), c = E("react.strict_mode"), o = E("react.profiler"), l = E("react.provider"), a = E("react.context"), u = E("react.forward_ref"), f = E("react.suspense"), x = E("react.suspense_list"), g = E("react.memo"), C = E("react.lazy"), y = E("react.block"), w = E("react.server.block"), k = E("react.fundamental"), E("react.scope"), E("react.opaque.id"), _ = E("react.debug_trace_mode"), E("react.offscreen"), v = E("react.legacy_hidden");
111
111
  }
112
112
  var b = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
113
113
  function m(i) {
@@ -128,15 +128,15 @@ function ls() {
128
128
  {
129
129
  var N = j.ReactDebugCurrentFrame, Q = N.getStackAddendum();
130
130
  Q !== "" && (T += "%s", A = A.concat([Q]));
131
- var q = A.map(function(W) {
131
+ var J = A.map(function(W) {
132
132
  return "" + W;
133
133
  });
134
- q.unshift("Warning: " + T), Function.prototype.apply.call(console[i], console, q);
134
+ J.unshift("Warning: " + T), Function.prototype.apply.call(console[i], console, J);
135
135
  }
136
136
  }
137
137
  var B = !1;
138
138
  function M(i) {
139
- return !!(typeof i == "string" || typeof i == "function" || i === e.Fragment || i === o || i === p || i === c || i === f || i === x || i === v || B || typeof i == "object" && i !== null && (i.$$typeof === C || i.$$typeof === g || i.$$typeof === d || i.$$typeof === a || i.$$typeof === u || i.$$typeof === _ || i.$$typeof === y || i[0] === w));
139
+ return !!(typeof i == "string" || typeof i == "function" || i === e.Fragment || i === o || i === _ || i === c || i === f || i === x || i === v || B || typeof i == "object" && i !== null && (i.$$typeof === C || i.$$typeof === g || i.$$typeof === l || i.$$typeof === a || i.$$typeof === u || i.$$typeof === k || i.$$typeof === y || i[0] === w));
140
140
  }
141
141
  function L(i, T, A) {
142
142
  var N = T.displayName || T.name || "";
@@ -155,7 +155,7 @@ function ls() {
155
155
  switch (i) {
156
156
  case e.Fragment:
157
157
  return "Fragment";
158
- case l:
158
+ case d:
159
159
  return "Portal";
160
160
  case o:
161
161
  return "Profiler";
@@ -171,7 +171,7 @@ function ls() {
171
171
  case a:
172
172
  var T = i;
173
173
  return F(T) + ".Consumer";
174
- case d:
174
+ case l:
175
175
  var A = i;
176
176
  return F(A._context) + ".Provider";
177
177
  case u:
@@ -181,9 +181,9 @@ function ls() {
181
181
  case y:
182
182
  return $(i._render);
183
183
  case C: {
184
- var N = i, Q = N._payload, q = N._init;
184
+ var N = i, Q = N._payload, J = N._init;
185
185
  try {
186
- return $(q(Q));
186
+ return $(J(Q));
187
187
  } catch {
188
188
  return null;
189
189
  }
@@ -191,14 +191,14 @@ function ls() {
191
191
  }
192
192
  return null;
193
193
  }
194
- var H = 0, G, Z, K, te, ee, de, ce;
194
+ var H = 0, G, Z, q, te, ee, de, ce;
195
195
  function Ne() {
196
196
  }
197
197
  Ne.__reactDisabledLog = !0;
198
198
  function Ve() {
199
199
  {
200
200
  if (H === 0) {
201
- G = console.log, Z = console.info, K = console.warn, te = console.error, ee = console.group, de = console.groupCollapsed, ce = console.groupEnd;
201
+ G = console.log, Z = console.info, q = console.warn, te = console.error, ee = console.group, de = console.groupCollapsed, ce = console.groupEnd;
202
202
  var i = {
203
203
  configurable: !0,
204
204
  enumerable: !0,
@@ -227,25 +227,25 @@ function ls() {
227
227
  writable: !0
228
228
  };
229
229
  Object.defineProperties(console, {
230
- log: s({}, i, {
230
+ log: r({}, i, {
231
231
  value: G
232
232
  }),
233
- info: s({}, i, {
233
+ info: r({}, i, {
234
234
  value: Z
235
235
  }),
236
- warn: s({}, i, {
237
- value: K
236
+ warn: r({}, i, {
237
+ value: q
238
238
  }),
239
- error: s({}, i, {
239
+ error: r({}, i, {
240
240
  value: te
241
241
  }),
242
- group: s({}, i, {
242
+ group: r({}, i, {
243
243
  value: ee
244
244
  }),
245
- groupCollapsed: s({}, i, {
245
+ groupCollapsed: r({}, i, {
246
246
  value: de
247
247
  }),
248
- groupEnd: s({}, i, {
248
+ groupEnd: r({}, i, {
249
249
  value: ce
250
250
  })
251
251
  });
@@ -272,7 +272,7 @@ function ls() {
272
272
  var Tt = typeof WeakMap == "function" ? WeakMap : Map;
273
273
  Ye = new Tt();
274
274
  }
275
- function _n(i, T) {
275
+ function kn(i, T) {
276
276
  if (!i || nn)
277
277
  return "";
278
278
  {
@@ -284,8 +284,8 @@ function ls() {
284
284
  nn = !0;
285
285
  var Q = Error.prepareStackTrace;
286
286
  Error.prepareStackTrace = void 0;
287
- var q;
288
- q = Me.current, Me.current = null, Ve();
287
+ var J;
288
+ J = Me.current, Me.current = null, Ve();
289
289
  try {
290
290
  if (T) {
291
291
  var W = function() {
@@ -338,13 +338,13 @@ function ls() {
338
338
  }
339
339
  }
340
340
  } finally {
341
- nn = !1, Me.current = q, Ge(), Error.prepareStackTrace = Q;
341
+ nn = !1, Me.current = J, Ge(), Error.prepareStackTrace = Q;
342
342
  }
343
343
  var we = i ? i.displayName || i.name : "", $n = we ? ze(we) : "";
344
344
  return typeof i == "function" && Ye.set(i, $n), $n;
345
345
  }
346
- function kn(i, T, A) {
347
- return _n(i, !1);
346
+ function pn(i, T, A) {
347
+ return kn(i, !1);
348
348
  }
349
349
  function yt(i) {
350
350
  var T = i.prototype;
@@ -354,7 +354,7 @@ function ls() {
354
354
  if (i == null)
355
355
  return "";
356
356
  if (typeof i == "function")
357
- return _n(i, yt(i));
357
+ return kn(i, yt(i));
358
358
  if (typeof i == "string")
359
359
  return ze(i);
360
360
  switch (i) {
@@ -366,15 +366,15 @@ function ls() {
366
366
  if (typeof i == "object")
367
367
  switch (i.$$typeof) {
368
368
  case u:
369
- return kn(i.render);
369
+ return pn(i.render);
370
370
  case g:
371
371
  return Ke(i.type, T, A);
372
372
  case y:
373
- return kn(i._render);
373
+ return pn(i._render);
374
374
  case C: {
375
- var N = i, Q = N._payload, q = N._init;
375
+ var N = i, Q = N._payload, J = N._init;
376
376
  try {
377
- return Ke(q(Q), T, A);
377
+ return Ke(J(Q), T, A);
378
378
  } catch {
379
379
  }
380
380
  }
@@ -391,9 +391,9 @@ function ls() {
391
391
  }
392
392
  function jt(i, T, A, N, Q) {
393
393
  {
394
- var q = Function.call.bind(Object.prototype.hasOwnProperty);
394
+ var J = Function.call.bind(Object.prototype.hasOwnProperty);
395
395
  for (var W in i)
396
- if (q(i, W)) {
396
+ if (J(i, W)) {
397
397
  var U = void 0;
398
398
  try {
399
399
  if (typeof i[W] != "function") {
@@ -414,7 +414,7 @@ function ls() {
414
414
  __self: !0,
415
415
  __source: !0
416
416
  }, Rn, On;
417
- function pt(i) {
417
+ function _t(i) {
418
418
  if (tn.call(i, "ref")) {
419
419
  var T = Object.getOwnPropertyDescriptor(i, "ref").get;
420
420
  if (T && T.isReactWarning)
@@ -422,7 +422,7 @@ function ls() {
422
422
  }
423
423
  return i.ref !== void 0;
424
424
  }
425
- function _t(i) {
425
+ function kt(i) {
426
426
  if (tn.call(i, "key")) {
427
427
  var T = Object.getOwnPropertyDescriptor(i, "key").get;
428
428
  if (T && T.isReactWarning)
@@ -430,7 +430,7 @@ function ls() {
430
430
  }
431
431
  return i.key !== void 0;
432
432
  }
433
- function kt(i, T) {
433
+ function pt(i, T) {
434
434
  typeof i.ref == "string" && Ln.current;
435
435
  }
436
436
  function At(i, T) {
@@ -455,17 +455,17 @@ function ls() {
455
455
  });
456
456
  }
457
457
  }
458
- var Lt = function(i, T, A, N, Q, q, W) {
458
+ var Lt = function(i, T, A, N, Q, J, W) {
459
459
  var U = {
460
460
  // This tag allows us to uniquely identify this as a React Element
461
- $$typeof: r,
461
+ $$typeof: s,
462
462
  // Built-in properties that belong on the element
463
463
  type: i,
464
464
  key: T,
465
465
  ref: A,
466
466
  props: W,
467
467
  // Record the component responsible for creating this element.
468
- _owner: q
468
+ _owner: J
469
469
  };
470
470
  return U._store = {}, Object.defineProperty(U._store, "validated", {
471
471
  configurable: !1,
@@ -486,14 +486,14 @@ function ls() {
486
486
  };
487
487
  function Rt(i, T, A, N, Q) {
488
488
  {
489
- var q, W = {}, U = null, re = null;
490
- A !== void 0 && (U = "" + A), _t(T) && (U = "" + T.key), pt(T) && (re = T.ref, kt(T, Q));
491
- for (q in T)
492
- tn.call(T, q) && !wt.hasOwnProperty(q) && (W[q] = T[q]);
489
+ var J, W = {}, U = null, re = null;
490
+ A !== void 0 && (U = "" + A), kt(T) && (U = "" + T.key), _t(T) && (re = T.ref, pt(T, Q));
491
+ for (J in T)
492
+ tn.call(T, J) && !wt.hasOwnProperty(J) && (W[J] = T[J]);
493
493
  if (i && i.defaultProps) {
494
494
  var ne = i.defaultProps;
495
- for (q in ne)
496
- W[q] === void 0 && (W[q] = ne[q]);
495
+ for (J in ne)
496
+ W[J] === void 0 && (W[J] = ne[J]);
497
497
  }
498
498
  if (U || re) {
499
499
  var se = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
@@ -513,7 +513,7 @@ function ls() {
513
513
  var rn;
514
514
  rn = !1;
515
515
  function on(i) {
516
- return typeof i == "object" && i !== null && i.$$typeof === r;
516
+ return typeof i == "object" && i !== null && i.$$typeof === s;
517
517
  }
518
518
  function Nn() {
519
519
  {
@@ -570,7 +570,7 @@ Check the top-level render call using <` + A + ">.");
570
570
  else if (i) {
571
571
  var Q = m(i);
572
572
  if (typeof Q == "function" && Q !== i.entries)
573
- for (var q = Q.call(i), W; !(W = q.next()).done; )
573
+ for (var J = Q.call(i), W; !(W = J.next()).done; )
574
574
  on(W.value) && Fn(W.value, T);
575
575
  }
576
576
  }
@@ -612,7 +612,7 @@ Check the top-level render call using <` + A + ">.");
612
612
  i.ref !== null && (je(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
613
613
  }
614
614
  }
615
- function In(i, T, A, N, Q, q) {
615
+ function In(i, T, A, N, Q, J) {
616
616
  {
617
617
  var W = M(i);
618
618
  if (!W) {
@@ -621,9 +621,9 @@ Check the top-level render call using <` + A + ">.");
621
621
  var re = Ot();
622
622
  re ? U += re : U += Nn();
623
623
  var ne;
624
- i === null ? ne = "null" : Array.isArray(i) ? ne = "array" : i !== void 0 && i.$$typeof === r ? (ne = "<" + ($(i.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, U);
624
+ i === null ? ne = "null" : Array.isArray(i) ? ne = "array" : i !== void 0 && i.$$typeof === s ? (ne = "<" + ($(i.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, U);
625
625
  }
626
- var se = Rt(i, T, A, Q, q);
626
+ var se = Rt(i, T, A, Q, J);
627
627
  if (se == null)
628
628
  return se;
629
629
  if (W) {
@@ -658,7 +658,7 @@ function as() {
658
658
  return Yn || (Yn = 1, process.env.NODE_ENV === "production" ? Je.exports = is() : Je.exports = ls()), Je.exports;
659
659
  }
660
660
  var n = as();
661
- const ds = "2.0.0-alpha.12", et = "chat_session", us = "user_uttered", fs = "bot_uttered", xs = "ehelp_bot_uttered", gs = "https://sfchatbot.dataon.com", Cs = [
661
+ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot_uttered", xs = "ehelp_bot_uttered", gs = "https://sfchatbot.dataon.com", Cs = [
662
662
  {
663
663
  label: "Didn’t address my question",
664
664
  value: "Didn’t address my question"
@@ -703,7 +703,7 @@ const ds = "2.0.0-alpha.12", et = "chat_session", us = "user_uttered", fs = "bot
703
703
  ".xcf"
704
704
  ], un = "w-widget-content-container", fn = "w-ticket-detail-content-container", vs = "w-wrapper-body", hs = "w-wrapper-body-helpdesk", He = "w-header", xn = {
705
705
  FADE_IN: "w-fade-in-animate"
706
- }, Es = "https://placehold.co/600x400?text=No+Image", Ie = 3, Ts = "GoHRDev2025WorkPlazeDataOnDotCom", ke = "(Helpdesk Widget Chatbot)", ys = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), nt = (e) => {
706
+ }, Es = "https://placehold.co/600x400?text=No+Image", Ie = 3, Ts = "GoHRDev2025WorkPlazeDataOnDotCom", pe = "(Helpdesk Widget Chatbot)", ys = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), nt = (e) => {
707
707
  var t;
708
708
  try {
709
709
  return (t = new URL(e)) == null ? void 0 : t.host;
@@ -711,77 +711,77 @@ const ds = "2.0.0-alpha.12", et = "chat_session", us = "user_uttered", fs = "bot
711
711
  return nt(gs);
712
712
  }
713
713
  }, le = (e, t) => {
714
- var s, r, l;
715
- return ((s = Object.keys(e || {})) == null ? void 0 : s.length) > 0 ? (l = (r = Object == null ? void 0 : Object.prototype) == null ? void 0 : r.hasOwnProperty) == null ? void 0 : l.call(e, t) : !1;
714
+ var r, s, d;
715
+ return ((r = Object.keys(e || {})) == null ? void 0 : r.length) > 0 ? (d = (s = Object == null ? void 0 : Object.prototype) == null ? void 0 : s.hasOwnProperty) == null ? void 0 : d.call(e, t) : !1;
716
716
  }, Ae = (e) => {
717
- var s;
717
+ var r;
718
718
  const t = e == null ? void 0 : e.attachment;
719
719
  return {
720
- text: ((s = Object.keys(e || {})) == null ? void 0 : s.length) > 0 && (e == null ? void 0 : e.type) === "text",
720
+ text: ((r = Object.keys(e || {})) == null ? void 0 : r.length) > 0 && (e == null ? void 0 : e.type) === "text",
721
721
  upload: le(e, "attachment") && le(t, "type") && (t == null ? void 0 : t.type) === "fileuploader",
722
722
  password: (t == null ? void 0 : t.type) === "show_password_wp",
723
723
  filedownload: le(t, "type") && (t == null ? void 0 : t.type) === "filedownloader",
724
724
  chart: (t == null ? void 0 : t.type) === "charts" && le(t, "chartType")
725
725
  };
726
726
  }, tt = (e) => {
727
- var t, s, r, l;
727
+ var t, r, s, d;
728
728
  if (e) {
729
- const c = e == null ? void 0 : e.split(".")[1], o = (t = c == null ? void 0 : c.replace(/-/g, "+")) == null ? void 0 : t.replace(/_/g, "/"), d = decodeURIComponent(
730
- (l = (r = (s = window == null ? void 0 : window.atob(o)) == null ? void 0 : s.split("")) == null ? void 0 : r.map((a) => "%" + ("00" + a.charCodeAt(0).toString(16)).slice(-2))) == null ? void 0 : l.join("")
729
+ const c = e == null ? void 0 : e.split(".")[1], o = (t = c == null ? void 0 : c.replace(/-/g, "+")) == null ? void 0 : t.replace(/_/g, "/"), l = decodeURIComponent(
730
+ (d = (s = (r = window == null ? void 0 : window.atob(o)) == null ? void 0 : r.split("")) == null ? void 0 : s.map((a) => "%" + ("00" + a.charCodeAt(0).toString(16)).slice(-2))) == null ? void 0 : d.join("")
731
731
  );
732
- return JSON == null ? void 0 : JSON.parse(d || "{}");
732
+ return JSON == null ? void 0 : JSON.parse(l || "{}");
733
733
  }
734
734
  return {};
735
735
  }, En = ({
736
736
  downloadURL: e = "",
737
737
  fileName: t = "",
738
- isOpenNewTab: s = !1
738
+ isOpenNewTab: r = !1
739
739
  }) => {
740
- var l;
741
- const r = document == null ? void 0 : document.createElement("a");
742
- r.href = e, r.download = t || e, s && (r.target = "_blank"), (l = document == null ? void 0 : document.body) == null || l.appendChild(r), r.click(), document.body.removeChild(r);
740
+ var d;
741
+ const s = document == null ? void 0 : document.createElement("a");
742
+ s.href = e, s.download = t || e, r && (s.target = "_blank"), (d = document == null ? void 0 : document.body) == null || d.appendChild(s), s.click(), document.body.removeChild(s);
743
743
  }, js = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
744
744
  const t = crypto.getRandomValues(new Uint8Array(1))[0] % 16;
745
745
  return (e === "x" ? t : t & 3 | 8).toString(16);
746
746
  }), Tn = ({
747
747
  ArrObj: e,
748
748
  key: t,
749
- ignoreCaseSensitive: s = !1
749
+ ignoreCaseSensitive: r = !1
750
750
  }) => (e == null ? void 0 : e.length) > 0 ? [
751
751
  ...new Map(
752
- e.map((r) => {
753
- var l;
752
+ e.map((s) => {
753
+ var d;
754
754
  return [
755
- s ? (l = String(r[t])) == null ? void 0 : l.toLowerCase() : r[t],
756
- r
755
+ r ? (d = String(s[t])) == null ? void 0 : d.toLowerCase() : s[t],
756
+ s
757
757
  ];
758
758
  })
759
759
  ).values()
760
760
  ] : [], ws = (e = []) => {
761
- const t = {}, s = [], r = [];
761
+ const t = {}, r = [], s = [];
762
762
  e == null || e.forEach((c) => {
763
763
  var o;
764
- le(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((d) => {
765
- r == null || r.push(d);
766
- }) : r == null || r.push(c);
767
- }), r == null || r.forEach((c, o) => {
764
+ le(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((l) => {
765
+ s == null || s.push(l);
766
+ }) : s == null || s.push(c);
767
+ }), s == null || s.forEach((c, o) => {
768
768
  var a, u, f;
769
- const d = c == null ? void 0 : c.generated_id;
770
- d ? (t[d] || (t[d] = []), (u = t[d]) == null || u.push({
769
+ const l = c == null ? void 0 : c.generated_id;
770
+ l ? (t[l] || (t[l] = []), (u = t[l]) == null || u.push({
771
771
  ...c,
772
772
  indexChat: o,
773
773
  ...!(c != null && c.timestamp) && {
774
774
  timestamp: (a = ae()) == null ? void 0 : a.format("hh:mm A")
775
775
  }
776
- }), s == null || s.push({
777
- keyItem: d ?? o,
776
+ }), r == null || r.push({
777
+ keyItem: l ?? o,
778
778
  type: "text",
779
779
  sender: "response",
780
- ...d && {
781
- generated_id: d
780
+ ...l && {
781
+ generated_id: l
782
782
  },
783
- chats: t == null ? void 0 : t[d]
784
- })) : s == null || s.push({
783
+ chats: t == null ? void 0 : t[l]
784
+ })) : r == null || r.push({
785
785
  ...c,
786
786
  keyItem: o,
787
787
  ...!(c != null && c.timestamp) && {
@@ -789,24 +789,24 @@ const ds = "2.0.0-alpha.12", et = "chat_session", us = "user_uttered", fs = "bot
789
789
  }
790
790
  });
791
791
  });
792
- const l = Tn({ ArrObj: s, key: "keyItem" });
793
- return l == null || l.forEach((c) => {
792
+ const d = Tn({ ArrObj: r, key: "keyItem" });
793
+ return d == null || d.forEach((c) => {
794
794
  c == null || delete c.keyItem;
795
- }), l;
795
+ }), d;
796
796
  }, Pe = (e = {}) => {
797
- const s = {
797
+ const r = {
798
798
  ...st(),
799
799
  ...e
800
800
  };
801
- localStorage == null || localStorage.setItem(et, JSON.stringify(s || {}));
801
+ localStorage == null || localStorage.setItem(et, JSON.stringify(r || {}));
802
802
  }, st = () => {
803
803
  const e = localStorage == null ? void 0 : localStorage.getItem(et);
804
804
  return JSON.parse(e || "{}");
805
- }, ps = (e = "") => {
805
+ }, _s = (e = "") => {
806
806
  var t;
807
807
  try {
808
- const s = new URL(e);
809
- return (t = s == null ? void 0 : s.protocol) != null && t.includes("https") ? "wss" : "ws";
808
+ const r = new URL(e);
809
+ return (t = r == null ? void 0 : r.protocol) != null && t.includes("https") ? "wss" : "ws";
810
810
  } catch {
811
811
  return "wss";
812
812
  }
@@ -820,15 +820,15 @@ const me = (e = ".w-wrapper-body") => {
820
820
  behavior: "smooth"
821
821
  });
822
822
  }, 0);
823
- }, _s = (e) => {
823
+ }, ks = (e) => {
824
824
  const t = new Uint8Array(e);
825
- let s = "";
826
- for (let r = 0; r < t.byteLength; r++)
827
- s += String.fromCharCode(t[r]);
828
- return btoa(s);
829
- }, ks = async (e, t) => {
825
+ let r = "";
826
+ for (let s = 0; s < t.byteLength; s++)
827
+ r += String.fromCharCode(t[s]);
828
+ return btoa(r);
829
+ }, ps = async (e, t) => {
830
830
  var a;
831
- const s = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, r = new TextEncoder(), l = r == null ? void 0 : r.encode(s), c = r == null ? void 0 : r.encode(t);
831
+ const r = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, s = new TextEncoder(), d = s == null ? void 0 : s.encode(r), c = s == null ? void 0 : s.encode(t);
832
832
  if (c.length !== 32)
833
833
  throw new Error("Key length must be 32 bytes for AES-256");
834
834
  const o = await ((a = crypto == null ? void 0 : crypto.subtle) == null ? void 0 : a.importKey(
@@ -837,67 +837,69 @@ const me = (e = ".w-wrapper-body") => {
837
837
  { name: "AES-CBC" },
838
838
  !1,
839
839
  ["encrypt"]
840
- )), d = await crypto.subtle.encrypt(
840
+ )), l = await crypto.subtle.encrypt(
841
841
  { name: "AES-CBC", iv: new Uint8Array(16) },
842
842
  o,
843
- l
843
+ d
844
844
  );
845
- return _s(d);
845
+ return ks(l);
846
846
  }, Qe = (e) => {
847
- const t = {}, s = rt(e), r = s == null ? void 0 : s.map((l) => {
847
+ const t = {}, r = rt(e), s = r == null ? void 0 : r.map((d) => {
848
848
  var o;
849
- const c = l == null ? void 0 : l.CREATED_DATE;
849
+ const c = d == null ? void 0 : d.CREATED_DATE;
850
850
  return {
851
- ...l,
851
+ ...d,
852
852
  DATE_KEY: (o = ae(c)) == null ? void 0 : o.format("YYYY-MM-DD")
853
853
  };
854
854
  });
855
- return r == null || r.forEach((l) => {
855
+ return s == null || s.forEach((d) => {
856
856
  var c;
857
- t[l == null ? void 0 : l.DATE_KEY] || (t[l == null ? void 0 : l.DATE_KEY] = []), (c = t[l == null ? void 0 : l.DATE_KEY]) == null || c.push(l);
857
+ t[d == null ? void 0 : d.DATE_KEY] || (t[d == null ? void 0 : d.DATE_KEY] = []), (c = t[d == null ? void 0 : d.DATE_KEY]) == null || c.push(d);
858
858
  }), t;
859
859
  }, yn = (e) => {
860
860
  var t;
861
861
  return (t = Object.values(e || {})) == null ? void 0 : t.flat();
862
- }, rt = (e) => e == null ? void 0 : e.sort((t, s) => ae(t == null ? void 0 : t.CREATED_DATE) - ae(s == null ? void 0 : s.CREATED_DATE)), ot = (e) => {
862
+ }, rt = (e) => e == null ? void 0 : e.sort((t, r) => ae(t == null ? void 0 : t.CREATED_DATE) - ae(r == null ? void 0 : r.CREATED_DATE)), ot = (e) => {
863
863
  if (e && typeof e == "string") {
864
- const t = e == null ? void 0 : e.split("."), s = t[(t == null ? void 0 : t.length) - 1];
865
- return e == null ? void 0 : e.replaceAll(`.${s}`, `_avatar.${s}`);
864
+ const t = e == null ? void 0 : e.split("."), r = t[(t == null ? void 0 : t.length) - 1];
865
+ return e == null ? void 0 : e.replaceAll(`.${r}`, `_avatar.${r}`);
866
866
  }
867
867
  return e;
868
- }, jn = (e) => `https://ui-avatars.com/api/?background=e5e5e5&color=000${e && typeof e == "string" ? `&name=${e.replaceAll(" ", "+")}` : ""}`, ct = Te({}), J = () => ye(ct), As = ({
868
+ }, jn = (e) => `https://ui-avatars.com/api/?background=e5e5e5&color=000${e && typeof e == "string" ? `&name=${e.replaceAll(" ", "+")}` : ""}`, ct = Te({}), K = () => ye(ct), As = ({
869
869
  children: e,
870
870
  getStartedPayload: t,
871
- socketURL: s,
872
- socketPath: r,
873
- onPayslipFn: l,
871
+ socketURL: r,
872
+ socketPath: s,
873
+ onPayslipFn: d,
874
874
  title: c,
875
875
  subTitle: o,
876
- keyEncrypt: d,
876
+ keyEncrypt: l,
877
877
  history: a,
878
878
  isSF: u
879
879
  }) => {
880
- const [f, x] = D(!1), [g, C] = D("va"), [y, w] = D(!1), [_, p] = D({}), [v, E] = D(!1), [b, h] = D(!1), m = Y(!1), j = O(() => ({
880
+ const [f, x] = D(!1), [g, C] = D("va"), [y, w] = D(!1), [k, _] = D({}), [v, E] = D(!1), [b, h] = D(!1), m = Y(!1), j = O(() => ({
881
881
  getStartedPayload: t,
882
- socketURL: s,
883
- socketPath: r,
884
- onPayslipFn: l,
882
+ socketURL: r,
883
+ socketPath: s,
884
+ onPayslipFn: d,
885
885
  title: c,
886
886
  subTitle: o,
887
- keyEncrypt: d,
887
+ keyEncrypt: l,
888
+ history: a,
888
889
  isSF: u
889
890
  }), [
890
891
  t,
891
- s,
892
892
  r,
893
- l,
893
+ s,
894
+ d,
894
895
  c,
895
896
  o,
896
- d,
897
+ l,
898
+ a,
897
899
  u
898
- ]), S = O(() => tt(_ == null ? void 0 : _.access_token), [_ == null ? void 0 : _.access_token]);
900
+ ]), S = O(() => tt(k == null ? void 0 : k.access_token), [k == null ? void 0 : k.access_token]);
899
901
  return X(() => {
900
- p(ys(t));
902
+ _(ys(t));
901
903
  }, [t]), X(() => {
902
904
  Pe({
903
905
  chatbot_version: ms
@@ -906,20 +908,19 @@ const me = (e = ".w-wrapper-body") => {
906
908
  ct.Provider,
907
909
  {
908
910
  value: {
909
- objInitPayload: _,
911
+ objInitPayload: k,
910
912
  setOpenWidget: x,
911
913
  isOpenWidget: f,
912
914
  activeTab: g,
913
915
  setActiveTab: C,
914
916
  isExpand: y,
915
917
  setExpand: w,
916
- setObjInitPayload: p,
918
+ setObjInitPayload: _,
917
919
  parsedJWT: S,
918
920
  widgetProps: j,
919
921
  isFirstOpenWidget: v,
920
922
  setFirstOpenWidget: E,
921
923
  isFirstRenderHelpdesk: m,
922
- history: a,
923
924
  showReadyWSHD: b,
924
925
  setShowReadyWSHD: h
925
926
  },
@@ -927,56 +928,56 @@ const me = (e = ".w-wrapper-body") => {
927
928
  }
928
929
  );
929
930
  }, it = Te({}), Ss = () => ye(it), Ls = ({ children: e }) => {
930
- const { objInitPayload: t } = J(), [s, r] = D({}), l = () => {
931
+ const { objInitPayload: t } = K(), [r, s] = D({}), d = () => {
931
932
  var o;
932
933
  (o = Oe(
933
934
  `${(t == null ? void 0 : t.uriService) || bs}optional/translations`
934
- )) == null || o.then(({ data: d }) => {
935
+ )) == null || o.then(({ data: l }) => {
935
936
  var a;
936
- if (d) {
937
- const u = Object.keys((a = Object.values(d)) == null ? void 0 : a[0]), f = {};
937
+ if (l) {
938
+ const u = Object.keys((a = Object.values(l)) == null ? void 0 : a[0]), f = {};
938
939
  u == null || u.forEach((x) => {
939
940
  var g;
940
- (g = Object.keys(d)) == null || g.forEach((C) => {
941
+ (g = Object.keys(l)) == null || g.forEach((C) => {
941
942
  var y;
942
- f[x == null ? void 0 : x.toLowerCase()] = (y = d == null ? void 0 : d[C]) == null ? void 0 : y[x];
943
+ f[x == null ? void 0 : x.toLowerCase()] = (y = l == null ? void 0 : l[C]) == null ? void 0 : y[x];
943
944
  });
944
- }), r(f);
945
+ }), s(f);
945
946
  }
946
947
  });
947
948
  }, c = () => {
948
949
  const o = window.indexedDB.open("language");
949
- o.onsuccess = (d) => {
950
+ o.onsuccess = (l) => {
950
951
  var u;
951
- const a = d.target.result;
952
+ const a = l.target.result;
952
953
  try {
953
954
  const x = a.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), g = x == null ? void 0 : x.get((u = t == null ? void 0 : t.lang) == null ? void 0 : u.toLowerCase());
954
955
  g.onsuccess = () => {
955
- r(g == null ? void 0 : g.result);
956
+ s(g == null ? void 0 : g.result);
956
957
  }, g.onerror = () => {
957
- l();
958
+ d();
958
959
  };
959
960
  } catch {
960
- l();
961
+ d();
961
962
  }
962
963
  }, o.onerror = () => {
963
- l();
964
+ d();
964
965
  };
965
966
  };
966
967
  return X(() => {
967
968
  c();
968
- }, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(it.Provider, { value: { langDatas: s }, children: e });
969
+ }, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(it.Provider, { value: { langDatas: r }, children: e });
969
970
  }, lt = Te({}), fe = () => ye(lt), Rs = ({ children: e }) => {
970
971
  var M;
971
- const [t, s] = D([]), [r, l] = D(!1), [c, o] = D(!1), [d, a] = D({}), [u, f] = D(!1), [x, g] = D(!1), {
972
+ const [t, r] = D([]), [s, d] = D(!1), [c, o] = D(!1), [l, a] = D({}), [u, f] = D(!1), [x, g] = D(!1), {
972
973
  objInitPayload: C,
973
974
  widgetProps: y,
974
975
  setOpenWidget: w,
975
- setFirstOpenWidget: _,
976
- isFirstRenderHelpdesk: p
977
- } = J(), v = Y(null), E = Y(""), b = Y(""), h = (L) => {
976
+ setFirstOpenWidget: k,
977
+ isFirstRenderHelpdesk: _
978
+ } = K(), v = Y(null), E = Y(""), b = Y(""), h = (L) => {
978
979
  const F = le(L, "text_feedback_link") && le(L, "text");
979
- s(($) => {
980
+ r(($) => {
980
981
  const H = [
981
982
  ...$,
982
983
  {
@@ -988,7 +989,7 @@ const me = (e = ".w-wrapper-body") => {
988
989
  }
989
990
  ];
990
991
  return ws(H);
991
- }), l(!1), o(!1), me();
992
+ }), d(!1), o(!1), me();
992
993
  }, m = () => {
993
994
  var L, F, $, H;
994
995
  (L = v == null ? void 0 : v.current) == null || L.emit("session_request", { session_id: null }), (F = v == null ? void 0 : v.current) == null || F.on("session_confirm", (G) => {
@@ -998,7 +999,7 @@ const me = (e = ".w-wrapper-body") => {
998
999
  }), ($ = v == null ? void 0 : v.current) == null || $.on(fs, h), (H = v == null ? void 0 : v.current) == null || H.on(xs, (G) => {
999
1000
  const Z = JSON.parse(G || "{}");
1000
1001
  le(Z, "iswidget") && g(Z == null ? void 0 : Z.iswidget);
1001
- }), u || f(!0), _(!1);
1002
+ }), u || f(!0), k(!1);
1002
1003
  }, j = ({
1003
1004
  msg: L,
1004
1005
  additionalConfig: F = {},
@@ -1012,12 +1013,12 @@ const me = (e = ".w-wrapper-body") => {
1012
1013
  message: L,
1013
1014
  session_id: E == null ? void 0 : E.current,
1014
1015
  ...F
1015
- }), $ ? l(!0) : o(!0);
1016
+ }), $ ? d(!0) : o(!0);
1016
1017
  }, S = () => {
1017
1018
  var F, $;
1018
- v.current && ((F = v == null ? void 0 : v.current) == null || F.off(), ($ = v == null ? void 0 : v.current) == null || $.disconnect(), v.current = null), p.current = !1;
1019
+ v.current && ((F = v == null ? void 0 : v.current) == null || F.off(), ($ = v == null ? void 0 : v.current) == null || $.disconnect(), v.current = null), _.current = !1;
1019
1020
  const L = es(
1020
- `${ps(y == null ? void 0 : y.socketURL)}://${nt(
1021
+ `${_s(y == null ? void 0 : y.socketURL)}://${nt(
1021
1022
  y == null ? void 0 : y.socketURL
1022
1023
  )}`,
1023
1024
  {
@@ -1056,14 +1057,14 @@ const me = (e = ".w-wrapper-body") => {
1056
1057
  lt.Provider,
1057
1058
  {
1058
1059
  value: {
1059
- setChats: s,
1060
+ setChats: r,
1060
1061
  chats: t,
1061
1062
  onSendMsg: j,
1062
- isWaitResponse: r,
1063
+ isWaitResponse: s,
1063
1064
  socket: v == null ? void 0 : v.current,
1064
1065
  sessionId: (M = E == null ? void 0 : E.current) == null ? void 0 : M.session_id,
1065
1066
  loadingRegenerate: c,
1066
- file: d,
1067
+ file: l,
1067
1068
  setFile: a,
1068
1069
  connected: u,
1069
1070
  isHandshakeWidget: x,
@@ -1354,18 +1355,18 @@ const me = (e = ".w-wrapper-body") => {
1354
1355
  boxShadow: "inset 5px 0 0 #f7d87c",
1355
1356
  zIndex: "0"
1356
1357
  }
1357
- }, Ds = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), k = (e = "", t) => {
1358
+ }, Ds = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), p = (e = "", t) => {
1358
1359
  var o;
1359
- const { langDatas: s } = Ss(), r = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), l = Ds(String(e)), c = (s == null ? void 0 : s[l == null ? void 0 : l.toUpperCase()]) || t;
1360
- return ((o = Object.keys(s || {})) == null ? void 0 : o.length) > 0 ? r ? `WPUI_${l}` : c : t;
1361
- }, Ns = ({ isFeedback: e = !1, open: t, ...s }) => {
1362
- var l;
1363
- const r = O(() => e ? "w-modal-container-feedback" : "", [e]);
1360
+ const { langDatas: r } = Ss(), s = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), d = Ds(String(e)), c = (r == null ? void 0 : r[d == null ? void 0 : d.toUpperCase()]) || t;
1361
+ return ((o = Object.keys(r || {})) == null ? void 0 : o.length) > 0 ? s ? `WPUI_${d}` : c : t;
1362
+ }, Ns = ({ isFeedback: e = !1, open: t, ...r }) => {
1363
+ var d;
1364
+ const s = O(() => e ? "w-modal-container-feedback" : "", [e]);
1364
1365
  return Le != null && Le.startsWith("5") ? /* @__PURE__ */ n.jsx(
1365
1366
  Bn,
1366
1367
  {
1367
- rootClassName: r,
1368
- ...s,
1368
+ rootClassName: s,
1369
+ ...r,
1369
1370
  open: t,
1370
1371
  getContainer: "#w-widget-content",
1371
1372
  maskProps: {
@@ -1375,8 +1376,8 @@ const me = (e = ".w-wrapper-body") => {
1375
1376
  },
1376
1377
  width: 300,
1377
1378
  style: {
1378
- ...Object.keys((s == null ? void 0 : s.style) || {}).length > 0 && {
1379
- ...s == null ? void 0 : s.style
1379
+ ...Object.keys((r == null ? void 0 : r.style) || {}).length > 0 && {
1380
+ ...r == null ? void 0 : r.style
1380
1381
  },
1381
1382
  top: 20
1382
1383
  }
@@ -1388,19 +1389,19 @@ const me = (e = ".w-wrapper-body") => {
1388
1389
  {
1389
1390
  getContainer: "#w-widget-content",
1390
1391
  width: 300,
1391
- ...s,
1392
+ ...r,
1392
1393
  ...Re != null && Re.startsWith("18") ? {
1393
1394
  open: t
1394
1395
  } : { visible: t },
1395
1396
  maskStyle: {
1396
1397
  backdropFilter: "blur(4x)",
1397
- ...((l = Object.keys((s == null ? void 0 : s.maskStyle) || {})) == null ? void 0 : l.length) > 0 && {
1398
- ...s == null ? void 0 : s.maskStyle
1398
+ ...((d = Object.keys((r == null ? void 0 : r.maskStyle) || {})) == null ? void 0 : d.length) > 0 && {
1399
+ ...r == null ? void 0 : r.maskStyle
1399
1400
  }
1400
1401
  },
1401
1402
  style: {
1402
- ...Object.keys((s == null ? void 0 : s.style) || {}).length > 0 && {
1403
- ...s == null ? void 0 : s.style
1403
+ ...Object.keys((r == null ? void 0 : r.style) || {}).length > 0 && {
1404
+ ...r == null ? void 0 : r.style
1404
1405
  },
1405
1406
  top: 20
1406
1407
  }
@@ -1408,11 +1409,11 @@ const me = (e = ".w-wrapper-body") => {
1408
1409
  )
1409
1410
  );
1410
1411
  }, at = R(Ns), Jn = ({ props: e, isModal: t = !1 }) => {
1411
- const s = (r, l) => {
1412
+ const r = (s, d) => {
1412
1413
  var c;
1413
- return (c = Ut) == null ? void 0 : c.map(r, (o) => {
1414
- var d, a, u;
1415
- return !Wt(o) || ((d = Object.keys((o == null ? void 0 : o.props) || {})) == null ? void 0 : d.length) === 0 ? o : Vt(o, {
1414
+ return (c = Ut) == null ? void 0 : c.map(s, (o) => {
1415
+ var l, a, u;
1416
+ return !Wt(o) || ((l = Object.keys((o == null ? void 0 : o.props) || {})) == null ? void 0 : l.length) === 0 ? o : Vt(o, {
1416
1417
  ...o == null ? void 0 : o.props,
1417
1418
  ...(o == null ? void 0 : o.type) === "thead" && {
1418
1419
  className: "ant-table-thead"
@@ -1427,13 +1428,13 @@ const me = (e = ".w-wrapper-body") => {
1427
1428
  }
1428
1429
  }
1429
1430
  },
1430
- ...o.type === "tr" && l === "tbody" && {
1431
+ ...o.type === "tr" && d === "tbody" && {
1431
1432
  className: "ant-table-row"
1432
1433
  },
1433
1434
  ...(o == null ? void 0 : o.type) === "tbody" && {
1434
1435
  className: "ant-table-tbody"
1435
1436
  },
1436
- children: (a = o == null ? void 0 : o.props) != null && a.children ? s((u = o == null ? void 0 : o.props) == null ? void 0 : u.children, o == null ? void 0 : o.type) : o == null ? void 0 : o.props
1437
+ children: (a = o == null ? void 0 : o.props) != null && a.children ? r((u = o == null ? void 0 : o.props) == null ? void 0 : u.children, o == null ? void 0 : o.type) : o == null ? void 0 : o.props
1437
1438
  });
1438
1439
  });
1439
1440
  };
@@ -1446,16 +1447,16 @@ const me = (e = ".w-wrapper-body") => {
1446
1447
  maxWidth: t ? "100%" : 330,
1447
1448
  maxHeight: t ? "100%" : 360
1448
1449
  },
1449
- children: /* @__PURE__ */ n.jsx("table", { className: "wp-md-table", ...e, children: s(e == null ? void 0 : e.children, "") })
1450
+ children: /* @__PURE__ */ n.jsx("table", { className: "wp-md-table", ...e, children: r(e == null ? void 0 : e.children, "") })
1450
1451
  }
1451
1452
  ) }) }) });
1452
1453
  }, Ms = ({ children: e }) => {
1453
- const t = k(
1454
+ const t = p(
1454
1455
  "OpenDetailTable",
1455
1456
  "Open Detail Table"
1456
- ), s = k("TableDetail", "Tabel Detail"), [r, l] = D(!1), c = {
1457
- table: ({ ...o }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1458
- /* @__PURE__ */ n.jsx(Jn, { props: o }),
1457
+ ), r = p("TableDetail", "Tabel Detail"), { widgetProps: s } = K(), [d, c] = D(!1), o = {
1458
+ table: ({ ...l }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1459
+ /* @__PURE__ */ n.jsx(Jn, { props: l }),
1459
1460
  /* @__PURE__ */ n.jsx(
1460
1461
  "div",
1461
1462
  {
@@ -1468,7 +1469,7 @@ const me = (e = ".w-wrapper-body") => {
1468
1469
  z,
1469
1470
  {
1470
1471
  onClick: () => {
1471
- l(!0);
1472
+ c(!0);
1472
1473
  },
1473
1474
  children: t
1474
1475
  }
@@ -1480,31 +1481,47 @@ const me = (e = ".w-wrapper-body") => {
1480
1481
  {
1481
1482
  getContainer: () => document.body,
1482
1483
  footer: null,
1483
- title: s,
1484
+ title: r,
1484
1485
  width: 800,
1485
- open: r,
1486
+ open: d,
1486
1487
  onCancel: () => {
1487
- l(!1);
1488
+ c(!1);
1488
1489
  },
1489
- children: /* @__PURE__ */ n.jsx(Jn, { props: o, isModal: !0 })
1490
+ children: /* @__PURE__ */ n.jsx(Jn, { props: l, isModal: !0 })
1490
1491
  }
1491
1492
  )
1492
1493
  ] }),
1493
- code: ({ ...o }) => {
1494
- const { children: d, className: a, ...u } = o, f = /language-(\w+)/.exec(a || "");
1495
- return f ? /* @__PURE__ */ n.jsx(
1494
+ code: ({ ...l }) => {
1495
+ const { children: a, className: u, ...f } = l, x = /language-(\w+)/.exec(u || "");
1496
+ return x ? /* @__PURE__ */ n.jsx(
1496
1497
  ss,
1497
1498
  {
1498
- ...u,
1499
+ ...f,
1499
1500
  PreTag: "div",
1500
- language: f[1],
1501
+ language: x[1],
1501
1502
  style: Os,
1502
- children: String(d).replace(/\n$/, "")
1503
+ children: String(a).replace(/\n$/, "")
1503
1504
  }
1504
- ) : /* @__PURE__ */ n.jsx(V.Text, { code: !0, children: o == null ? void 0 : o.children });
1505
+ ) : /* @__PURE__ */ n.jsx(V.Text, { code: !0, children: l == null ? void 0 : l.children });
1506
+ },
1507
+ a: ({ ...l }) => {
1508
+ var x;
1509
+ const a = l == null ? void 0 : l.href, u = (x = l == null ? void 0 : l.children) == null ? void 0 : x[0];
1510
+ return URL.parse(a) && new URL(a) ? /* @__PURE__ */ n.jsx("a", { ...l }) : /* @__PURE__ */ n.jsx(
1511
+ "span",
1512
+ {
1513
+ ...l,
1514
+ className: "w-link-path",
1515
+ onClick: (g) => {
1516
+ var C, y;
1517
+ g == null || g.stopPropagation(), a && ((C = Object.keys((s == null ? void 0 : s.history) || {})) == null ? void 0 : C.length) > 0 && ((y = s == null ? void 0 : s.history) == null || y.push(a));
1518
+ },
1519
+ children: u
1520
+ }
1521
+ );
1505
1522
  }
1506
1523
  };
1507
- return /* @__PURE__ */ n.jsx(ns, { remarkPlugins: [ts], components: c, children: e });
1524
+ return /* @__PURE__ */ n.jsx(ns, { remarkPlugins: [ts], components: o, children: e });
1508
1525
  }, dt = R(Ms), Fs = () => /* @__PURE__ */ n.jsx(
1509
1526
  "svg",
1510
1527
  {
@@ -1795,8 +1812,8 @@ const me = (e = ".w-wrapper-body") => {
1795
1812
  "aria-hidden": "true",
1796
1813
  children: /* @__PURE__ */ n.jsx("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" })
1797
1814
  }
1798
- ) }), P = ({ type: e = "", chatProps: t, ...s }) => {
1799
- const r = O(() => ({
1815
+ ) }), P = ({ type: e = "", chatProps: t, ...r }) => {
1816
+ const s = O(() => ({
1800
1817
  minimize: Fs,
1801
1818
  expand: Hs,
1802
1819
  send: Is,
@@ -1811,40 +1828,40 @@ const me = (e = ".w-wrapper-body") => {
1811
1828
  upload: Ks,
1812
1829
  filter: qs,
1813
1830
  down: Js,
1814
- "paper-clip": () => /* @__PURE__ */ n.jsx(Qs, { ...s }),
1831
+ "paper-clip": () => /* @__PURE__ */ n.jsx(Qs, { ...r }),
1815
1832
  "chat-bubble": Zs,
1816
1833
  smile: Xs,
1817
1834
  file: Ps,
1818
- loading: () => /* @__PURE__ */ n.jsx(er, { ...s })
1819
- }), [e, t, s]);
1820
- return /* @__PURE__ */ n.jsx(rs, { component: r == null ? void 0 : r[e], ...s });
1835
+ loading: () => /* @__PURE__ */ n.jsx(er, { ...r })
1836
+ }), [e, t, r]);
1837
+ return /* @__PURE__ */ n.jsx(rs, { component: s == null ? void 0 : s[e], ...r });
1821
1838
  }, ut = Te({}), be = () => ye(ut), nr = ({ children: e }) => {
1822
- const [t, s] = D("va"), r = O(() => t === "va", [t]);
1839
+ const [t, r] = D("va"), s = O(() => t === "va", [t]);
1823
1840
  return /* @__PURE__ */ n.jsx(
1824
1841
  ut.Provider,
1825
1842
  {
1826
1843
  value: {
1827
1844
  activeTab: t,
1828
- setActiveTab: s,
1829
- isActiveTabVA: r
1845
+ setActiveTab: r,
1846
+ isActiveTabVA: s
1830
1847
  },
1831
1848
  children: e
1832
1849
  }
1833
1850
  );
1834
1851
  }, tr = ({ ...e }) => {
1835
- const t = k(
1852
+ const t = p(
1836
1853
  "WeLoveToHearAboutYourExperienceWithTheSunfishChatbot",
1837
1854
  "We'd love to hear about your experience with the Sunfish chatbot"
1838
- ), s = k(
1855
+ ), r = p(
1839
1856
  "ShareAnyCommentsOrSuggestionsToHelpUsImprove",
1840
1857
  "Share any comments or suggestions to help us improve"
1841
- ), r = k("Submit", "Submit"), l = k(
1858
+ ), s = p("Submit", "Submit"), d = p(
1842
1859
  "ThankFeedback",
1843
1860
  "Thank You for your feedback"
1844
- ), c = k(
1861
+ ), c = p(
1845
1862
  "AdditionalFeedback",
1846
1863
  "Additional Feedback"
1847
- ), [o] = oe.useForm(), [d, a] = D(!1), [u, f] = D(""), { setChats: x } = fe(), { objInitPayload: g } = J(), { activeTab: C } = be(), y = O(() => {
1864
+ ), [o] = oe.useForm(), [l, a] = D(!1), [u, f] = D(""), { setChats: x } = fe(), { objInitPayload: g } = K(), { activeTab: C } = be(), y = O(() => {
1848
1865
  var E;
1849
1866
  const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
1850
1867
  return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((E = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : E.trim()) !== "" && v;
@@ -1852,7 +1869,7 @@ const me = (e = ".w-wrapper-body") => {
1852
1869
  var E;
1853
1870
  const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
1854
1871
  return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((E = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : E.trim()) !== "" && v;
1855
- }, [e]), _ = O(() => {
1872
+ }, [e]), k = O(() => {
1856
1873
  if (g != null && g.uriBackend)
1857
1874
  try {
1858
1875
  return new URL(g.uriBackend).origin;
@@ -1860,7 +1877,7 @@ const me = (e = ".w-wrapper-body") => {
1860
1877
  return "";
1861
1878
  }
1862
1879
  return "";
1863
- }, [g == null ? void 0 : g.uriBackend]), p = (v) => {
1880
+ }, [g == null ? void 0 : g.uriBackend]), _ = (v) => {
1864
1881
  var M;
1865
1882
  const E = v === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
1866
1883
  access_token: b = "",
@@ -1887,38 +1904,38 @@ const me = (e = ".w-wrapper-body") => {
1887
1904
  "company-id": `${m}`,
1888
1905
  uriBackend: `${j}`,
1889
1906
  uriBackendEnt: `${S}`,
1890
- "custom-origin": `${_}`,
1907
+ "custom-origin": `${k}`,
1891
1908
  "Acc-Name": `${h.toUpperCase()}`,
1892
1909
  Language: `${I}`
1893
1910
  }
1894
1911
  })) == null || M.then((L) => {
1895
1912
  var F, $, H;
1896
- (L == null ? void 0 : L.status) === 200 && (d && a(!1), (F = ie) == null || F.destroy(), ($ = ie) == null || $.config({
1913
+ (L == null ? void 0 : L.status) === 200 && (l && a(!1), (F = ie) == null || F.destroy(), ($ = ie) == null || $.config({
1897
1914
  getContainer: () => document.querySelector(".w-widget-content-container"),
1898
1915
  top: 28,
1899
1916
  placement: "top",
1900
1917
  duration: 3
1901
1918
  }), (H = ie) == null || H.success({
1902
- message: l,
1919
+ message: d,
1903
1920
  className: "w-notification-content"
1904
1921
  }), x((G) => {
1905
1922
  var Z;
1906
- return (Z = G == null ? void 0 : G.map((K) => {
1923
+ return (Z = G == null ? void 0 : G.map((q) => {
1907
1924
  var ee;
1908
- if (le(K, "chats")) {
1909
- const de = (ee = K == null ? void 0 : K.chats) == null ? void 0 : ee.map((ce) => (ce == null ? void 0 : ce.indexChat) === (e == null ? void 0 : e.indexChat) ? {
1925
+ if (le(q, "chats")) {
1926
+ const de = (ee = q == null ? void 0 : q.chats) == null ? void 0 : ee.map((ce) => (ce == null ? void 0 : ce.indexChat) === (e == null ? void 0 : e.indexChat) ? {
1910
1927
  ...ce,
1911
1928
  feedback: v
1912
1929
  } : ce);
1913
1930
  return {
1914
- ...K,
1931
+ ...q,
1915
1932
  chats: de
1916
1933
  };
1917
1934
  }
1918
- return (e == null ? void 0 : e.message_id) === (K == null ? void 0 : K.message_id) ? {
1919
- ...K,
1935
+ return (e == null ? void 0 : e.message_id) === (q == null ? void 0 : q.message_id) ? {
1936
+ ...q,
1920
1937
  feedback: v
1921
- } : K;
1938
+ } : q;
1922
1939
  })) == null ? void 0 : Z.flat();
1923
1940
  }));
1924
1941
  });
@@ -1932,7 +1949,7 @@ const me = (e = ".w-wrapper-body") => {
1932
1949
  {
1933
1950
  icon: /* @__PURE__ */ n.jsx(P, { type: "like", chatProps: e }),
1934
1951
  onClick: () => {
1935
- (e == null ? void 0 : e.feedback) !== "like" && p("like");
1952
+ (e == null ? void 0 : e.feedback) !== "like" && _("like");
1936
1953
  }
1937
1954
  }
1938
1955
  ),
@@ -1948,19 +1965,19 @@ const me = (e = ".w-wrapper-body") => {
1948
1965
  /* @__PURE__ */ n.jsxs(
1949
1966
  at,
1950
1967
  {
1951
- open: d,
1968
+ open: l,
1952
1969
  isFeedback: !0,
1953
- okText: r,
1970
+ okText: s,
1954
1971
  onCancel: () => {
1955
1972
  a(!1);
1956
1973
  },
1957
1974
  onOk: () => {
1958
- p("dislike");
1975
+ _("dislike");
1959
1976
  },
1960
1977
  children: [
1961
1978
  /* @__PURE__ */ n.jsx("p", { style: { textAlign: "center", fontWeight: 600, fontSize: 14 }, children: t }),
1962
1979
  /* @__PURE__ */ n.jsxs("p", { style: { textAlign: "center" }, children: [
1963
- s,
1980
+ r,
1964
1981
  "!"
1965
1982
  ] }),
1966
1983
  /* @__PURE__ */ n.jsx(
@@ -1987,11 +2004,11 @@ const me = (e = ".w-wrapper-body") => {
1987
2004
  }, sr = R(tr), rr = ({
1988
2005
  showFeedback: e = !0,
1989
2006
  showRegenerate: t = !0,
1990
- position: s = "left",
1991
- ...r
2007
+ position: r = "left",
2008
+ ...s
1992
2009
  }) => {
1993
- const l = js(), { chats: c, onSendMsg: o, setChats: d, loadingRegenerate: a, currRegenerateId: u } = fe(), f = O(() => r == null ? void 0 : r.sender, [r]), x = O(() => c == null ? void 0 : c.filter((_) => (_ == null ? void 0 : _.sender) === "client"), [c]), g = O(() => t && f === "response" && (x == null ? void 0 : x.length) > 0 && (r == null ? void 0 : r.indexChat) === (c == null ? void 0 : c.length) - 1, [f, x, c, r == null ? void 0 : r.indexChat, t]), C = O(() => {
1994
- switch (s) {
2010
+ const d = js(), { chats: c, onSendMsg: o, setChats: l, loadingRegenerate: a, currRegenerateId: u } = fe(), f = O(() => s == null ? void 0 : s.sender, [s]), x = O(() => c == null ? void 0 : c.filter((k) => (k == null ? void 0 : k.sender) === "client"), [c]), g = O(() => t && f === "response" && (x == null ? void 0 : x.length) > 0 && (s == null ? void 0 : s.indexChat) === (c == null ? void 0 : c.length) - 1, [f, x, c, s == null ? void 0 : s.indexChat, t]), C = O(() => {
2011
+ switch (r) {
1995
2012
  case "left":
1996
2013
  return "flex-start";
1997
2014
  case "center":
@@ -1999,18 +2016,18 @@ const me = (e = ".w-wrapper-body") => {
1999
2016
  case "right":
2000
2017
  return "flex-end";
2001
2018
  }
2002
- }, [s]), y = O(() => e && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [r, e]), w = () => {
2003
- const _ = x == null ? void 0 : x[(x == null ? void 0 : x.length) - 1], p = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
2004
- d(
2019
+ }, [r]), y = O(() => e && (s == null ? void 0 : s.text_FeedbackIcons) === "hidup", [s, e]), w = () => {
2020
+ const k = x == null ? void 0 : x[(x == null ? void 0 : x.length) - 1], _ = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
2021
+ l(
2005
2022
  (v = []) => v == null ? void 0 : v.map((E, b) => b === (v == null ? void 0 : v.length) - 1 && (E == null ? void 0 : E.sender) === "response" ? {
2006
2023
  ...E,
2007
- generated_id: (p == null ? void 0 : p.generated_id) ?? l
2024
+ generated_id: (_ == null ? void 0 : _.generated_id) ?? d
2008
2025
  // adjust with response
2009
2026
  } : E)
2010
- ), u.current = (p == null ? void 0 : p.generated_id) ?? l, o({
2011
- msg: _ == null ? void 0 : _.text,
2027
+ ), u.current = (_ == null ? void 0 : _.generated_id) ?? d, o({
2028
+ msg: k == null ? void 0 : k.text,
2012
2029
  additionalConfig: {
2013
- generate_id: (p == null ? void 0 : p.generated_id) ?? l
2030
+ generate_id: (_ == null ? void 0 : _.generated_id) ?? d
2014
2031
  },
2015
2032
  isShowLoadingResponse: a
2016
2033
  }), me();
@@ -2034,7 +2051,7 @@ const me = (e = ".w-wrapper-body") => {
2034
2051
  }
2035
2052
  }
2036
2053
  ),
2037
- y && /* @__PURE__ */ n.jsx(sr, { ...r })
2054
+ y && /* @__PURE__ */ n.jsx(sr, { ...s })
2038
2055
  ]
2039
2056
  }
2040
2057
  ) });
@@ -2049,7 +2066,7 @@ const me = (e = ".w-wrapper-body") => {
2049
2066
  ...t
2050
2067
  }
2051
2068
  ), wn = R(or), cr = ({ nameFallback: e = "", ...t }) => {
2052
- const s = Y(0);
2069
+ const r = Y(0);
2053
2070
  return /* @__PURE__ */ n.jsx(
2054
2071
  Qn,
2055
2072
  {
@@ -2060,8 +2077,8 @@ const me = (e = ".w-wrapper-body") => {
2060
2077
  src: t == null ? void 0 : t.src,
2061
2078
  nameFallback: e,
2062
2079
  ...t,
2063
- onError: (r) => {
2064
- s.current += 1, (s == null ? void 0 : s.current) < 3 ? r.target.src = ot(t == null ? void 0 : t.src) : r.target.src = jn(e);
2080
+ onError: (s) => {
2081
+ r.current += 1, (r == null ? void 0 : r.current) < 3 ? s.target.src = ot(t == null ? void 0 : t.src) : s.target.src = jn(e);
2065
2082
  }
2066
2083
  }
2067
2084
  )
@@ -2075,27 +2092,27 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2075
2092
  /* @__PURE__ */ n.jsx("div", {}),
2076
2093
  /* @__PURE__ */ n.jsx("div", {})
2077
2094
  ] }), ft = R(ir), lr = () => {
2078
- const { widgetProps: e } = J();
2095
+ const { widgetProps: e } = K();
2079
2096
  return /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2080
2097
  /* @__PURE__ */ n.jsx(Ee, { src: Ze, nameFallback: e == null ? void 0 : e.title }),
2081
2098
  /* @__PURE__ */ n.jsx(ft, {})
2082
2099
  ] });
2083
- }, pn = R(lr), ar = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2100
+ }, _n = R(lr), ar = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2084
2101
  /* @__PURE__ */ n.jsx(Ee, { src: e, preview: !1, nameFallback: t }),
2085
2102
  /* @__PURE__ */ n.jsx(V.Text, { children: t })
2086
2103
  ] }), Ue = R(ar), dr = ({ ...e }) => {
2087
2104
  var f, x;
2088
- const [t, s] = D(1), { loadingRegenerate: r, currRegenerateId: l } = fe(), { isExpand: c, widgetProps: o } = J(), d = O(() => e == null ? void 0 : e.sender, [e]), a = O(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = O(() => {
2105
+ const [t, r] = D(1), { loadingRegenerate: s, currRegenerateId: d } = fe(), { isExpand: c, widgetProps: o } = K(), l = O(() => e == null ? void 0 : e.sender, [e]), a = O(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = O(() => {
2089
2106
  const g = a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1];
2090
- return (g == null ? void 0 : g.generated_id) === l.current;
2091
- }, [a, e, l.current]);
2107
+ return (g == null ? void 0 : g.generated_id) === d.current;
2108
+ }, [a, e, d.current]);
2092
2109
  return X(() => {
2093
- !r && (a == null ? void 0 : a.length) > 0 && (s(a == null ? void 0 : a.length), me());
2094
- }, [r]), r && u ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2095
- d === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
2110
+ !s && (a == null ? void 0 : a.length) > 0 && (r(a == null ? void 0 : a.length), me());
2111
+ }, [s]), s && u ? /* @__PURE__ */ n.jsx(_n, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2112
+ l === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
2096
2113
  /* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children: a == null ? void 0 : a.map((g, C) => {
2097
- var _;
2098
- const y = C === ((_ = e == null ? void 0 : e.chats) == null ? void 0 : _.length) - 1, w = t === C + 1;
2114
+ var k;
2115
+ const y = C === ((k = e == null ? void 0 : e.chats) == null ? void 0 : k.length) - 1, w = t === C + 1;
2099
2116
  return /* @__PURE__ */ n.jsxs(
2100
2117
  "div",
2101
2118
  {
@@ -2115,10 +2132,10 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2115
2132
  children: /* @__PURE__ */ n.jsxs(
2116
2133
  "div",
2117
2134
  {
2118
- className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${d}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
2135
+ className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${l}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
2119
2136
  children: [
2120
2137
  /* @__PURE__ */ n.jsx(dt, { children: g == null ? void 0 : g.text }),
2121
- d === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
2138
+ l === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
2122
2139
  ]
2123
2140
  }
2124
2141
  )
@@ -2155,7 +2172,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2155
2172
  disabled: t === 1,
2156
2173
  icon: /* @__PURE__ */ n.jsx(P, { type: "left" }),
2157
2174
  onClick: () => {
2158
- t > 1 && s((g) => g - 1);
2175
+ t > 1 && r((g) => g - 1);
2159
2176
  }
2160
2177
  }
2161
2178
  ),
@@ -2173,38 +2190,38 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2173
2190
  icon: /* @__PURE__ */ n.jsx(P, { type: "right" }),
2174
2191
  onClick: () => {
2175
2192
  var g;
2176
- t < ((g = e == null ? void 0 : e.chats) == null ? void 0 : g.length) && s((C) => C + 1);
2193
+ t < ((g = e == null ? void 0 : e.chats) == null ? void 0 : g.length) && r((C) => C + 1);
2177
2194
  }
2178
2195
  }
2179
2196
  )
2180
2197
  ] })
2181
2198
  ] })
2182
2199
  ] });
2183
- }, ur = R(dr), fr = ({ date: e, format: t, sender: s, ...r }) => {
2184
- var l, c;
2200
+ }, ur = R(dr), fr = ({ date: e, format: t, sender: r, ...s }) => {
2201
+ var d, c;
2185
2202
  return /* @__PURE__ */ n.jsx(
2186
2203
  V.Text,
2187
2204
  {
2188
- ...r,
2205
+ ...s,
2189
2206
  type: "secondary",
2190
2207
  style: {
2191
2208
  display: "block",
2192
2209
  fontSize: 12,
2193
- ...s === "client" && {
2210
+ ...r === "client" && {
2194
2211
  textAlign: "right"
2195
2212
  },
2196
- ...((l = Object.keys((r == null ? void 0 : r.style) || {})) == null ? void 0 : l.length) > 0 && {
2197
- ...r == null ? void 0 : r.style
2213
+ ...((d = Object.keys((s == null ? void 0 : s.style) || {})) == null ? void 0 : d.length) > 0 && {
2214
+ ...s == null ? void 0 : s.style
2198
2215
  }
2199
2216
  },
2200
2217
  children: t ? (c = ae(e)) == null ? void 0 : c.format(t) : e
2201
2218
  }
2202
2219
  );
2203
2220
  }, We = R(fr), xr = ({ showResponseInfo: e = !0, ...t }) => {
2204
- var d;
2205
- const { loadingRegenerate: s, chats: r } = fe(), { widgetProps: l } = J(), c = O(() => (r == null ? void 0 : r.length) - 1 === (t == null ? void 0 : t.indexChat), [r]), o = O(() => t == null ? void 0 : t.sender, [t]);
2206
- return ((d = t == null ? void 0 : t.chats) == null ? void 0 : d.length) > 0 ? /* @__PURE__ */ n.jsx(ur, { ...t }) : s && c ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2207
- o === "response" && e && /* @__PURE__ */ n.jsx(Ue, { name: l == null ? void 0 : l.title, src: Ze }),
2221
+ var l;
2222
+ const { loadingRegenerate: r, chats: s } = fe(), { widgetProps: d } = K(), c = O(() => (s == null ? void 0 : s.length) - 1 === (t == null ? void 0 : t.indexChat), [s]), o = O(() => t == null ? void 0 : t.sender, [t]);
2223
+ return ((l = t == null ? void 0 : t.chats) == null ? void 0 : l.length) > 0 ? /* @__PURE__ */ n.jsx(ur, { ...t }) : r && c ? /* @__PURE__ */ n.jsx(_n, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2224
+ o === "response" && e && /* @__PURE__ */ n.jsx(Ue, { name: d == null ? void 0 : d.title, src: Ze }),
2208
2225
  /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
2209
2226
  /* @__PURE__ */ n.jsx(dt, { children: t == null ? void 0 : t.text }),
2210
2227
  /* @__PURE__ */ n.jsx(We, { date: t == null ? void 0 : t.timestamp, sender: o })
@@ -2212,14 +2229,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2212
2229
  /* @__PURE__ */ n.jsx(Cn, { ...t })
2213
2230
  ] });
2214
2231
  }, $e = R(xr), gr = () => {
2215
- const e = k(
2232
+ const e = p(
2216
2233
  "PleaseUploadFile",
2217
2234
  "Please upload specify file that needed to complete your request"
2218
- ), t = k("ClickToUpload", "Click to upload"), s = k(
2235
+ ), t = p("ClickToUpload", "Click to upload"), r = p(
2219
2236
  "ContinueWithoutUpload",
2220
2237
  "Continue without upload"
2221
- ), { onSendMsg: r, setFile: l } = fe(), c = () => {
2222
- r({
2238
+ ), { onSendMsg: s, setFile: d } = fe(), c = () => {
2239
+ s({
2223
2240
  msg: "CANCEL UPLOAD"
2224
2241
  });
2225
2242
  };
@@ -2250,47 +2267,47 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2250
2267
  fileList: [],
2251
2268
  accept: ".doc, .jpg, .ods, .png, .txt, .docx, .pdf",
2252
2269
  onChange: (o) => {
2253
- l(o == null ? void 0 : o.file);
2270
+ d(o == null ? void 0 : o.file);
2254
2271
  },
2255
2272
  children: /* @__PURE__ */ n.jsx(z, { icon: /* @__PURE__ */ n.jsx(P, { type: "upload" }), children: t })
2256
2273
  }
2257
2274
  ),
2258
- /* @__PURE__ */ n.jsx(z, { type: "dashed", onClick: c, children: s })
2275
+ /* @__PURE__ */ n.jsx(z, { type: "dashed", onClick: c, children: r })
2259
2276
  ] })
2260
2277
  ]
2261
2278
  }
2262
2279
  );
2263
2280
  }, Cr = R(gr), mr = () => {
2264
- const [e, t] = D(!1), [s, r] = D(!1), [l, c] = D(!1), [o, d] = D(3), [a, u] = D(!1), [f, x] = D(""), { widgetProps: g } = J(), { onSendMsg: C, chats: y } = fe(), { onSubmitPYPwd: w = () => {
2265
- }, onCheckPYAccess: _ = () => {
2266
- } } = (g == null ? void 0 : g.onPayslipFn) || {}, p = k(
2281
+ const [e, t] = D(!1), [r, s] = D(!1), [d, c] = D(!1), [o, l] = D(3), [a, u] = D(!1), [f, x] = D(""), { widgetProps: g } = K(), { onSendMsg: C, chats: y } = fe(), { onSubmitPYPwd: w = () => {
2282
+ }, onCheckPYAccess: k = () => {
2283
+ } } = (g == null ? void 0 : g.onPayslipFn) || {}, _ = p(
2267
2284
  "ProvidePasswordPayslip",
2268
2285
  "Please provide your password account to access the download"
2269
- ), v = k("Cancel", "Cancel"), E = k("Submit", "Submit"), b = k("Password", "Password"), h = k("IsRequired", "Is Required"), m = k(
2270
- "PasswordPayslipValid",
2271
- "Your password is valid. Please download the payslip file"
2272
- ), j = k(
2286
+ ), v = p("Cancel", "Cancel"), E = p("Submit", "Submit"), b = p("Password", "Password"), h = p("IsRequired", "Is Required"), m = p(
2287
+ "PrepareTheFiles",
2288
+ "Prepare the files"
2289
+ ), j = p(
2273
2290
  "AttemptPasswordExceeded",
2274
2291
  "Your attempt to enter the password exceeded the limit"
2275
- ), S = k(
2292
+ ), S = p(
2276
2293
  "VerifyAccessPayslip",
2277
2294
  "Please wait, verifying access to your payslip"
2278
- ), I = k(
2295
+ ), I = p(
2279
2296
  "WrongPwdPayslip",
2280
2297
  "The password you entered is incorrect. Please try again or contact support if you need assistance"
2281
- ), B = k(
2298
+ ), B = p(
2282
2299
  "SessionExpired",
2283
2300
  "Session expired. Please log in again to continue"
2284
2301
  ), [M] = oe.useForm(), L = () => {
2285
2302
  var H, G, Z;
2286
- c(!0), u(!0), (Z = (G = (H = _()) == null ? void 0 : H.then((K) => {
2303
+ c(!0), u(!0), (Z = (G = (H = k()) == null ? void 0 : H.then((q) => {
2287
2304
  var ee, de;
2288
- const te = (de = (ee = K == null ? void 0 : K.data) == null ? void 0 : ee.DATA) == null ? void 0 : de.RESULT;
2305
+ const te = (de = (ee = q == null ? void 0 : q.data) == null ? void 0 : ee.DATA) == null ? void 0 : de.RESULT;
2289
2306
  te && C({ msg: "Valid" }), t(te), x("");
2290
- })) == null ? void 0 : G.catch((K) => {
2291
- console.log("err: ", K == null ? void 0 : K.toString()), x(K == null ? void 0 : K.toString());
2307
+ })) == null ? void 0 : G.catch((q) => {
2308
+ console.log("err: ", q == null ? void 0 : q.toString()), x(q == null ? void 0 : q.toString());
2292
2309
  })) == null || Z.finally(() => {
2293
- r(!1), u(!1);
2310
+ s(!1), u(!1);
2294
2311
  });
2295
2312
  }, F = () => {
2296
2313
  C({ msg: "cancel" }), c(!1);
@@ -2298,11 +2315,11 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2298
2315
  var G;
2299
2316
  const H = M == null ? void 0 : M.getFieldValue("pwd");
2300
2317
  (G = M == null ? void 0 : M.validateFields()) == null || G.then(() => {
2301
- var Z, K;
2302
- r(!0), (K = (Z = w(H)) == null ? void 0 : Z.then(({ data: te }) => {
2318
+ var Z, q;
2319
+ s(!0), (q = (Z = w(H)) == null ? void 0 : Z.then(({ data: te }) => {
2303
2320
  var ee;
2304
- (ee = te == null ? void 0 : te.DATA) != null && ee.ISVALID ? L() : (x(I), d(o - 1), r(!1));
2305
- })) == null || K.catch((te) => {
2321
+ (ee = te == null ? void 0 : te.DATA) != null && ee.ISVALID ? L() : (x(I), l(o - 1), s(!1));
2322
+ })) == null || q.catch((te) => {
2306
2323
  var de, ce, Ne, Ve, Ge;
2307
2324
  const ee = te == null ? void 0 : te.response;
2308
2325
  if ((ee == null ? void 0 : ee.status) === 401) {
@@ -2311,10 +2328,10 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2311
2328
  ), Fe = (Ge = (Ve = (Ne = ee == null ? void 0 : ee.data) == null ? void 0 : Ne.MESSAGE) == null ? void 0 : Ve.toLowerCase()) == null ? void 0 : Ge.includes(
2312
2329
  "invalid password"
2313
2330
  );
2314
- Me && x(B), Fe && (x(I), d(o - 1), r(!1));
2331
+ Me && x(B), Fe && (x(I), l(o - 1), s(!1));
2315
2332
  } else
2316
2333
  console.log("err onSubmit: ", te == null ? void 0 : te.toString()), x(te == null ? void 0 : te.toString());
2317
- r(!1);
2334
+ s(!1);
2318
2335
  });
2319
2336
  });
2320
2337
  };
@@ -2322,7 +2339,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2322
2339
  var G;
2323
2340
  const H = y == null ? void 0 : y[(y == null ? void 0 : y.length) - 1];
2324
2341
  ((G = H == null ? void 0 : H.attachment) == null ? void 0 : G.type) === "show_password_wp" && L();
2325
- }, []), l ? a ? /* @__PURE__ */ n.jsx(
2342
+ }, []), d ? a ? /* @__PURE__ */ n.jsx(
2326
2343
  $e,
2327
2344
  {
2328
2345
  sender: "response",
@@ -2348,7 +2365,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2348
2365
  layout: "vertical",
2349
2366
  style: { display: "flex", flexDirection: "column", gap: 8 },
2350
2367
  children: [
2351
- /* @__PURE__ */ n.jsx(V.Text, { children: e ? m : p }),
2368
+ /* @__PURE__ */ n.jsx(V.Text, { children: e ? `${m}...` : _ }),
2352
2369
  !e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2353
2370
  /* @__PURE__ */ n.jsx(
2354
2371
  oe.Item,
@@ -2364,13 +2381,13 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2364
2381
  }
2365
2382
  ),
2366
2383
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
2367
- /* @__PURE__ */ n.jsx(z, { disabled: s, onClick: F, children: v }),
2384
+ /* @__PURE__ */ n.jsx(z, { disabled: r, onClick: F, children: v }),
2368
2385
  /* @__PURE__ */ n.jsx(
2369
2386
  z,
2370
2387
  {
2371
2388
  type: "primary",
2372
2389
  onClick: $,
2373
- loading: s,
2390
+ loading: r,
2374
2391
  htmlType: "submit",
2375
2392
  children: E
2376
2393
  }
@@ -2383,10 +2400,10 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2383
2400
  }
2384
2401
  ) : null;
2385
2402
  }, br = R(mr), vr = ({ ...e }) => {
2386
- var d;
2387
- const { objInitPayload: t } = J(), [s, r] = D(!1), l = k("Error", "Error"), c = O(() => tt(t == null ? void 0 : t.access_token), [t]), o = () => {
2403
+ var l;
2404
+ const { objInitPayload: t } = K(), [r, s] = D(!1), d = p("Error", "Error"), c = O(() => tt(t == null ? void 0 : t.access_token), [t]), o = () => {
2388
2405
  var u, f, x, g;
2389
- r(!0);
2406
+ s(!0);
2390
2407
  const a = e == null ? void 0 : e.attachment;
2391
2408
  (g = (x = (f = Oe({
2392
2409
  method: "POST",
@@ -2402,23 +2419,23 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2402
2419
  responseType: "blob"
2403
2420
  })) == null ? void 0 : f.then((C) => {
2404
2421
  var v;
2405
- const y = (v = a == null ? void 0 : a.body) == null ? void 0 : v.media, w = `${a == null ? void 0 : a.filename}.${y}`, _ = new Blob([C == null ? void 0 : C.data]), p = URL == null ? void 0 : URL.createObjectURL(_);
2406
- En({ downloadURL: p, fileName: w }), URL.revokeObjectURL(p);
2422
+ const y = (v = a == null ? void 0 : a.body) == null ? void 0 : v.media, w = `${a == null ? void 0 : a.filename}.${y}`, k = new Blob([C == null ? void 0 : C.data]), _ = URL == null ? void 0 : URL.createObjectURL(k);
2423
+ En({ downloadURL: _, fileName: w }), URL.revokeObjectURL(_);
2407
2424
  })) == null ? void 0 : x.catch((C) => {
2408
- var w, _, p;
2425
+ var w, k, _;
2409
2426
  const y = C == null ? void 0 : C.message;
2410
- (w = ie) == null || w.destroy(), (_ = ie) == null || _.config({
2427
+ (w = ie) == null || w.destroy(), (k = ie) == null || k.config({
2411
2428
  getContainer: () => document.querySelector(".w-widget-content-container"),
2412
2429
  top: 28,
2413
2430
  placement: "top"
2414
- }), (p = ie) == null || p.error({
2415
- message: l,
2431
+ }), (_ = ie) == null || _.error({
2432
+ message: d,
2416
2433
  description: y,
2417
2434
  className: "w-notification-content",
2418
2435
  duration: 3
2419
2436
  });
2420
2437
  })) == null || g.finally(() => {
2421
- r(!1);
2438
+ s(!1);
2422
2439
  });
2423
2440
  };
2424
2441
  return /* @__PURE__ */ n.jsx(
@@ -2427,8 +2444,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2427
2444
  className: "w-bubble-chat w-response",
2428
2445
  onClick: o,
2429
2446
  style: { cursor: "pointer" },
2430
- children: /* @__PURE__ */ n.jsxs(Jt, { spinning: s, children: [
2431
- /* @__PURE__ */ n.jsx(V.Link, { children: (d = e == null ? void 0 : e.attachment) == null ? void 0 : d.filename }),
2447
+ children: /* @__PURE__ */ n.jsxs(Jt, { spinning: r, children: [
2448
+ /* @__PURE__ */ n.jsx(V.Link, { children: (l = e == null ? void 0 : e.attachment) == null ? void 0 : l.filename }),
2432
2449
  /* @__PURE__ */ n.jsx(
2433
2450
  z,
2434
2451
  {
@@ -2446,20 +2463,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2446
2463
  }
2447
2464
  );
2448
2465
  }, hr = R(vr), Er = ({ ...e }) => {
2449
- const t = Y(), s = k("DownloadChart", "Download Chart"), r = O(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), l = O(() => {
2466
+ const t = Y(), r = p("DownloadChart", "Download Chart"), s = O(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), d = O(() => {
2450
2467
  var o;
2451
- return (o = r == null ? void 0 : r.data) == null ? void 0 : o.map((d, a) => {
2468
+ return (o = s == null ? void 0 : s.data) == null ? void 0 : o.map((l, a) => {
2452
2469
  var u, f;
2453
2470
  return {
2454
- label: (u = r == null ? void 0 : r.labels) == null ? void 0 : u[a],
2455
- value: d,
2456
- color: (f = r == null ? void 0 : r.colors) == null ? void 0 : f[a]
2471
+ label: (u = s == null ? void 0 : s.labels) == null ? void 0 : u[a],
2472
+ value: l,
2473
+ color: (f = s == null ? void 0 : s.colors) == null ? void 0 : f[a]
2457
2474
  };
2458
2475
  });
2459
- }, [r]), c = () => {
2460
- var d;
2461
- const o = (d = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : d.toDataURL();
2462
- En({ fileName: r == null ? void 0 : r.title, downloadURL: o });
2476
+ }, [s]), c = () => {
2477
+ var l;
2478
+ const o = (l = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : l.toDataURL();
2479
+ En({ fileName: s == null ? void 0 : s.title, downloadURL: o });
2463
2480
  };
2464
2481
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2465
2482
  /* @__PURE__ */ n.jsx(
@@ -2467,7 +2484,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2467
2484
  {
2468
2485
  className: "chart_widget",
2469
2486
  ref: t,
2470
- data: l,
2487
+ data: d,
2471
2488
  angleField: "value",
2472
2489
  colorField: "label",
2473
2490
  label: {
@@ -2491,20 +2508,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2491
2508
  onClick: () => {
2492
2509
  c();
2493
2510
  },
2494
- children: s
2511
+ children: r
2495
2512
  }
2496
2513
  ) })
2497
2514
  ] });
2498
2515
  }, Tr = R(Er), yr = ({ ...e }) => {
2499
- var t, s, r, l, c;
2516
+ var t, r, s, d, c;
2500
2517
  switch (!0) {
2501
2518
  case ((t = Ae(e)) == null ? void 0 : t.text):
2502
2519
  return /* @__PURE__ */ n.jsx($e, { ...e });
2503
- case ((s = Ae(e)) == null ? void 0 : s.upload):
2520
+ case ((r = Ae(e)) == null ? void 0 : r.upload):
2504
2521
  return /* @__PURE__ */ n.jsx(Cr, { ...e });
2505
- case ((r = Ae(e)) == null ? void 0 : r.password):
2522
+ case ((s = Ae(e)) == null ? void 0 : s.password):
2506
2523
  return /* @__PURE__ */ n.jsx(br, { ...e });
2507
- case ((l = Ae(e)) == null ? void 0 : l.filedownload):
2524
+ case ((d = Ae(e)) == null ? void 0 : d.filedownload):
2508
2525
  return /* @__PURE__ */ n.jsx(hr, { ...e });
2509
2526
  case ((c = Ae(e)) == null ? void 0 : c.chart):
2510
2527
  return /* @__PURE__ */ n.jsx(Tr, { ...e });
@@ -2512,15 +2529,15 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2512
2529
  return null;
2513
2530
  }
2514
2531
  }, jr = R(yr), wr = () => {
2515
- const { isOpenWidget: e, widgetProps: t } = J(), { chats: s, isWaitResponse: r } = fe(), { activeTab: l } = be();
2532
+ const { isOpenWidget: e, widgetProps: t } = K(), { chats: r, isWaitResponse: s } = fe(), { activeTab: d } = be();
2516
2533
  return X(() => {
2517
2534
  me();
2518
- }, [l]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2519
- /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: s == null ? void 0 : s.map((c, o) => {
2535
+ }, [d]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2536
+ /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: r == null ? void 0 : r.map((c, o) => {
2520
2537
  var a;
2521
- const d = (a = Ae(c)) == null ? void 0 : a.text;
2538
+ const l = (a = Ae(c)) == null ? void 0 : a.text;
2522
2539
  return /* @__PURE__ */ n.jsxs(gn, { children: [
2523
- (c == null ? void 0 : c.sender) === "response" && !d && /* @__PURE__ */ n.jsx(
2540
+ (c == null ? void 0 : c.sender) === "response" && !l && /* @__PURE__ */ n.jsx(
2524
2541
  Ue,
2525
2542
  {
2526
2543
  name: t == null ? void 0 : t.title,
@@ -2530,30 +2547,30 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2530
2547
  /* @__PURE__ */ n.jsx(jr, { indexChat: o, ...c })
2531
2548
  ] }, o);
2532
2549
  }) }),
2533
- r && /* @__PURE__ */ n.jsx(pn, {})
2550
+ s && /* @__PURE__ */ n.jsx(_n, {})
2534
2551
  ] }) : null;
2535
- }, pr = R(wr), _r = () => {
2552
+ }, _r = R(wr), kr = () => {
2536
2553
  var E;
2537
- const e = k(
2554
+ const e = p(
2538
2555
  "ContinueWithoutUpload",
2539
2556
  "Continue without Upload"
2540
2557
  ), {
2541
2558
  onSendMsg: t,
2542
- setChats: s,
2543
- isWaitResponse: r,
2544
- loadingRegenerate: l,
2559
+ setChats: r,
2560
+ isWaitResponse: s,
2561
+ loadingRegenerate: d,
2545
2562
  file: c,
2546
2563
  setFile: o,
2547
- chats: d,
2564
+ chats: l,
2548
2565
  connected: a
2549
2566
  } = fe(), { isActiveTabVA: u } = be(), f = O(() => {
2550
2567
  var h;
2551
- const b = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1];
2568
+ const b = l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1];
2552
2569
  return (b == null ? void 0 : b.sender) === "response" && ((h = b == null ? void 0 : b.attachment) == null ? void 0 : h.type) === "fileuploader";
2553
- }, [d]), x = Y(), [g, C] = D(!1), [y, w] = D(!1), _ = O(() => r || !y, [y, r]), p = () => {
2570
+ }, [l]), x = Y(), [g, C] = D(!1), [y, w] = D(!1), k = O(() => s || !y, [y, s]), _ = () => {
2554
2571
  var m, j, S, I;
2555
2572
  const b = (S = (j = (m = x == null ? void 0 : x.current) == null ? void 0 : m.resizableTextArea) == null ? void 0 : j.textArea) == null ? void 0 : S.value;
2556
- if (!(b != null && b.trim()) || r) return;
2573
+ if (!(b != null && b.trim()) || s) return;
2557
2574
  w(!1), t({ msg: b }), C(!g);
2558
2575
  const h = {
2559
2576
  text: b,
@@ -2561,7 +2578,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2561
2578
  type: "text",
2562
2579
  timestamp: (I = ae()) == null ? void 0 : I.format("hh:mm A")
2563
2580
  };
2564
- s((B) => [...B, h]), me();
2581
+ r((B) => [...B, h]), me();
2565
2582
  }, v = () => {
2566
2583
  t({ msg: "SKIP_WAITING_RESPONSE" });
2567
2584
  };
@@ -2587,7 +2604,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2587
2604
  style: { backgroundColor: "var(--primary-color, #395ebc)" },
2588
2605
  icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
2589
2606
  shape: "circle",
2590
- onClick: p
2607
+ onClick: _
2591
2608
  }
2592
2609
  )
2593
2610
  ] }) : /* @__PURE__ */ n.jsx(Se, { title: e, children: /* @__PURE__ */ n.jsx(
@@ -2611,7 +2628,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2611
2628
  ref: x,
2612
2629
  placeholder: "Type a message...",
2613
2630
  onKeyDown: (b) => {
2614
- ((b == null ? void 0 : b.code) === "Enter" || (b == null ? void 0 : b.key) === "Enter") && !(b != null && b.shiftKey) && p();
2631
+ ((b == null ? void 0 : b.code) === "Enter" || (b == null ? void 0 : b.key) === "Enter") && !(b != null && b.shiftKey) && _();
2615
2632
  },
2616
2633
  onChange: ({ target: { value: b } }) => {
2617
2634
  const h = /\S/;
@@ -2622,7 +2639,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2622
2639
  },
2623
2640
  g
2624
2641
  ),
2625
- r || l ? /* @__PURE__ */ n.jsx(
2642
+ s || d ? /* @__PURE__ */ n.jsx(
2626
2643
  z,
2627
2644
  {
2628
2645
  style: { border: "none" },
@@ -2634,24 +2651,24 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2634
2651
  ) : /* @__PURE__ */ n.jsx(
2635
2652
  z,
2636
2653
  {
2637
- className: `w-send-btn ${_ ? "w-send-btn-disabled" : ""}`,
2638
- disabled: _,
2654
+ className: `w-send-btn ${k ? "w-send-btn-disabled" : ""}`,
2655
+ disabled: k,
2639
2656
  style: { backgroundColor: "var(--primary-color, #395ebc)" },
2640
2657
  icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
2641
2658
  shape: "circle",
2642
- onClick: p
2659
+ onClick: _
2643
2660
  }
2644
2661
  )
2645
2662
  ] });
2646
- }, kr = R(_r), Ar = ({ taskStatus: e }) => {
2647
- const t = k("InProgress", "In Progress"), s = k("New", "New"), r = k("Closed", "Closed"), l = k("Done", "Done"), c = k("HDCancelled", "Cancelled"), o = {
2663
+ }, pr = R(kr), Ar = ({ taskStatus: e }) => {
2664
+ const t = p("InProgress", "In Progress"), r = p("New", "New"), s = p("Closed", "Closed"), d = p("Done", "Done"), c = p("HDCancelled", "Cancelled"), o = {
2648
2665
  "In Progress": t,
2649
- Open: s,
2650
- New: s,
2651
- Closed: r,
2652
- Fixed: l,
2666
+ Open: r,
2667
+ New: r,
2668
+ Closed: s,
2669
+ Fixed: d,
2653
2670
  Cancelled: c
2654
- }, d = {
2671
+ }, l = {
2655
2672
  "In Progress": "#FFF2D6",
2656
2673
  Responded: "#FFF2D6",
2657
2674
  Open: "#e9e2f8",
@@ -2660,7 +2677,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2660
2677
  Fixed: "#bbfab7",
2661
2678
  Done: "#bbfab7",
2662
2679
  Cancelled: "#FFF2D6"
2663
- }, a = O(() => d[e] || d.Closed, [e]), u = O(() => o[e] || e, [e]);
2680
+ }, a = O(() => l[e] || l.Closed, [e]), u = O(() => o[e] || e, [e]);
2664
2681
  return /* @__PURE__ */ n.jsx(Qt, { color: a, children: /* @__PURE__ */ n.jsx(
2665
2682
  V.Text,
2666
2683
  {
@@ -2713,19 +2730,19 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2713
2730
  ]
2714
2731
  }
2715
2732
  ), Lr = R(Sr), gt = () => {
2716
- const { objInitPayload: e, setObjInitPayload: t, parsedJWT: s } = J(), r = O(() => {
2733
+ const { objInitPayload: e, setObjInitPayload: t, parsedJWT: r } = K(), s = O(() => {
2717
2734
  var c;
2718
2735
  return {
2719
2736
  Authorization: `Bearer ${e == null ? void 0 : e.access_token}`,
2720
- coid: s == null ? void 0 : s.COID,
2721
- "Acc-Name": (c = s == null ? void 0 : s.INSTANCE) == null ? void 0 : c.toLowerCase(),
2737
+ coid: r == null ? void 0 : r.COID,
2738
+ "Acc-Name": (c = r == null ? void 0 : r.INSTANCE) == null ? void 0 : c.toLowerCase(),
2722
2739
  "Company-Id": e == null ? void 0 : e.companyid,
2723
2740
  Language: e == null ? void 0 : e.lang
2724
2741
  };
2725
2742
  }, [e]);
2726
2743
  return async (c) => {
2727
2744
  var u, f, x;
2728
- const { onSuccess: o, onError: d, onFinally: a } = c ?? {};
2745
+ const { onSuccess: o, onError: l, onFinally: a } = c ?? {};
2729
2746
  (x = (f = (u = Oe({
2730
2747
  url: e == null ? void 0 : e.uriBackend,
2731
2748
  params: {
@@ -2735,7 +2752,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2735
2752
  data: {
2736
2753
  refreshtoken: (e == null ? void 0 : e.refresh_token) || "4D8C30EE29749D0F06B4F6E2527516B397C09D4DB148D42214E2941C7A86139D3CB512D925E1B098C6090A45E6BCC545723222FA3BABDC2A"
2737
2754
  },
2738
- headers: r,
2755
+ headers: s,
2739
2756
  method: "POST"
2740
2757
  })) == null ? void 0 : u.then((g) => {
2741
2758
  var w;
@@ -2754,41 +2771,41 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2754
2771
  };
2755
2772
  t(y), typeof o == "function" && o(g);
2756
2773
  })) == null ? void 0 : f.catch((g) => {
2757
- typeof d == "function" && d(g);
2774
+ typeof l == "function" && l(g);
2758
2775
  })) == null || x.finally(() => {
2759
2776
  typeof a == "function" && a();
2760
2777
  });
2761
2778
  };
2762
2779
  }, en = () => {
2763
2780
  var o;
2764
- const e = Y(new AbortController()), { objInitPayload: t, parsedJWT: s } = J(), r = gt(), l = {
2781
+ const e = Y(new AbortController()), { objInitPayload: t, parsedJWT: r } = K(), s = gt(), d = {
2765
2782
  Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
2766
- coid: s == null ? void 0 : s.COID,
2767
- "Acc-Name": (o = s == null ? void 0 : s.INSTANCE) == null ? void 0 : o.toLowerCase(),
2783
+ coid: r == null ? void 0 : r.COID,
2784
+ "Acc-Name": (o = r == null ? void 0 : r.INSTANCE) == null ? void 0 : o.toLowerCase(),
2768
2785
  "Company-Id": t == null ? void 0 : t.companyid,
2769
2786
  Language: t == null ? void 0 : t.lang
2770
2787
  }, c = async ({
2771
- url: d,
2788
+ url: l,
2772
2789
  endpoint: a,
2773
2790
  method: u = "POST",
2774
2791
  headers: f,
2775
2792
  ...x
2776
2793
  }) => {
2777
- var w, _, p, v, E, b;
2794
+ var w, k, _, v, E, b;
2778
2795
  const g = {
2779
- url: d || `${t == null ? void 0 : t.uriBackendHRMGO}${a}`,
2796
+ url: l || `${t == null ? void 0 : t.uriBackendHRMGO}${a}`,
2780
2797
  ...e.current && {
2781
2798
  signal: (w = e == null ? void 0 : e.current) == null ? void 0 : w.signal
2782
2799
  },
2783
2800
  headers: {
2784
- ...l,
2801
+ ...d,
2785
2802
  ...f,
2786
2803
  "Company-Code": t == null ? void 0 : t.companycode
2787
2804
  },
2788
2805
  method: u,
2789
2806
  ...x
2790
- }, C = (_ = Oe) == null ? void 0 : _.create(g);
2791
- return (v = (p = C == null ? void 0 : C.interceptors) == null ? void 0 : p.request) == null || v.use(
2807
+ }, C = (k = Oe) == null ? void 0 : k.create(g);
2808
+ return (v = (_ = C == null ? void 0 : C.interceptors) == null ? void 0 : _.request) == null || v.use(
2792
2809
  (h) => (t != null && t.access_token && (h.headers.Authorization = `Bearer ${t == null ? void 0 : t.access_token}`), h),
2793
2810
  (h) => {
2794
2811
  Promise.reject(h);
@@ -2799,7 +2816,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2799
2816
  var j;
2800
2817
  const m = h == null ? void 0 : h.config;
2801
2818
  if (((j = h == null ? void 0 : h.response) == null ? void 0 : j.status) === 401) {
2802
- const S = await r();
2819
+ const S = await s();
2803
2820
  return m.headers.Authorization = `Bearer ${S}`, Oe(m);
2804
2821
  }
2805
2822
  return Promise == null ? void 0 : Promise.reject(h);
@@ -2807,13 +2824,13 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2807
2824
  ), await (C == null ? void 0 : C.request(g));
2808
2825
  };
2809
2826
  return c.abort = () => {
2810
- var d;
2811
- e != null && e.current && ((d = e == null ? void 0 : e.current) == null || d.abort(), e.current = new AbortController());
2827
+ var l;
2828
+ e != null && e.current && ((l = e == null ? void 0 : e.current) == null || l.abort(), e.current = new AbortController());
2812
2829
  }, X(() => () => c.abort(), []), c;
2813
2830
  }, Ct = Te({}), ve = () => ye(Ct), Rr = ({ children: e }) => {
2814
- const t = en(), [s, r] = D([]), [l, c] = D(""), [o, d] = D(!1), [a, u] = D(!0), [f, x] = D(0), g = (C) => {
2815
- var y, w, _, p;
2816
- u(!0), (p = (_ = t({
2831
+ const t = en(), [r, s] = D([]), [d, c] = D(""), [o, l] = D(!1), [a, u] = D(!0), [f, x] = D(0), g = (C) => {
2832
+ var y, w, k, _;
2833
+ u(!0), (_ = (k = t({
2817
2834
  endpoint: "/helpdesk/myticket/ticket-list",
2818
2835
  method: "POST",
2819
2836
  data: {
@@ -2834,10 +2851,10 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2834
2851
  ORDER: "DESC"
2835
2852
  }
2836
2853
  }
2837
- })) == null ? void 0 : _.then((v) => {
2854
+ })) == null ? void 0 : k.then((v) => {
2838
2855
  var E, b, h;
2839
- (E = v == null ? void 0 : v.data) != null && E.DATA && r((h = (b = v == null ? void 0 : v.data) == null ? void 0 : b.DATA) == null ? void 0 : h.LIST);
2840
- })) == null || p.finally(() => {
2856
+ (E = v == null ? void 0 : v.data) != null && E.DATA && s((h = (b = v == null ? void 0 : v.data) == null ? void 0 : b.DATA) == null ? void 0 : h.LIST);
2857
+ })) == null || _.finally(() => {
2841
2858
  u(!1);
2842
2859
  });
2843
2860
  };
@@ -2847,12 +2864,12 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2847
2864
  Ct.Provider,
2848
2865
  {
2849
2866
  value: {
2850
- listTicket: s,
2851
- ticketId: l,
2867
+ listTicket: r,
2868
+ ticketId: d,
2852
2869
  setTicketId: c,
2853
2870
  getListTicket: g,
2854
2871
  openFilter: o,
2855
- setOpenFilter: d,
2872
+ setOpenFilter: l,
2856
2873
  loadingListTicket: a,
2857
2874
  countFilters: f,
2858
2875
  setCountFilters: x
@@ -2861,16 +2878,16 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2861
2878
  }
2862
2879
  );
2863
2880
  }, Or = () => {
2864
- const e = k("SubjectSearch", "Subject Search"), t = k("AdvanceFilter", "Advance Filter"), s = Y(null), { getListTicket: r, setOpenFilter: l, loadingListTicket: c, countFilters: o } = ve();
2881
+ const e = p("SubjectSearch", "Subject Search"), t = p("AdvanceFilter", "Advance Filter"), r = Y(null), { getListTicket: s, setOpenFilter: d, loadingListTicket: c, countFilters: o } = ve();
2865
2882
  return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, marginBottom: 12 }, children: [
2866
2883
  /* @__PURE__ */ n.jsx(
2867
2884
  Be,
2868
2885
  {
2869
2886
  placeholder: e,
2870
- onChange: ({ target: { value: d } }) => {
2871
- clearTimeout(s == null ? void 0 : s.current), s.current = setTimeout(() => {
2872
- r({
2873
- TASK_NAME: d
2887
+ onChange: ({ target: { value: l } }) => {
2888
+ clearTimeout(r == null ? void 0 : r.current), r.current = setTimeout(() => {
2889
+ s({
2890
+ TASK_NAME: l
2874
2891
  });
2875
2892
  }, 250);
2876
2893
  },
@@ -2883,25 +2900,25 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2883
2900
  loading: c,
2884
2901
  icon: /* @__PURE__ */ n.jsx(P, { type: "filter" }),
2885
2902
  onClick: () => {
2886
- l(!0);
2903
+ d(!0);
2887
2904
  }
2888
2905
  }
2889
2906
  ) }) })
2890
2907
  ] }) });
2891
2908
  }, Dr = R(Or), mt = Te({}), he = () => ye(mt), Nr = ({ children: e }) => {
2892
- const t = Y(null), s = Y(0), r = Y(!1), l = Y(null), [c, o] = D([]), [d, a] = D(0), [u, f] = D(!1), { objInitPayload: x, parsedJWT: g, isFirstRenderHelpdesk: C, setShowReadyWSHD: y } = J(), w = gt(), _ = (b) => {
2909
+ const t = Y(null), r = Y(0), s = Y(!1), d = Y(null), [c, o] = D([]), [l, a] = D(0), [u, f] = D(!1), { objInitPayload: x, parsedJWT: g, isFirstRenderHelpdesk: C, setShowReadyWSHD: y } = K(), w = gt(), k = (b) => {
2893
2910
  const h = new WebSocket(b);
2894
2911
  h.onopen = () => {
2895
- r.current = !0, s.current = 0, a(0), y(!0);
2912
+ s.current = !0, r.current = 0, a(0), y(!0);
2896
2913
  }, h.onerror = (m) => {
2897
- y(!1), console.error(`${ke} - WebSocket error:`, m);
2914
+ y(!1), console.error(`${pe} - WebSocket error:`, m);
2898
2915
  }, h.onclose = (m) => {
2899
2916
  console.warn(
2900
- `${ke} - WebSocket disconnected:`,
2917
+ `${pe} - WebSocket disconnected:`,
2901
2918
  m
2902
- ), r.current = !1, y(!1), !(m != null && m.wasClean) && (s == null ? void 0 : s.current) < Ie && (s.current += 1, a((j) => j + 1), clearTimeout(l.current), l.current = setTimeout(p, 2e3));
2919
+ ), s.current = !1, y(!1), !(m != null && m.wasClean) && (r == null ? void 0 : r.current) < Ie && (r.current += 1, a((j) => j + 1), clearTimeout(d.current), d.current = setTimeout(_, 2e3));
2903
2920
  }, h.onmessage = v(h), t.current = h;
2904
- }, p = async () => {
2921
+ }, _ = async () => {
2905
2922
  var L, F, $;
2906
2923
  if (((L = t.current) == null ? void 0 : L.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
2907
2924
  const {
@@ -2913,7 +2930,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2913
2930
  } = x ?? {};
2914
2931
  if (!b || !h || !m) {
2915
2932
  console.warn(
2916
- `${ke} - Missing required WebSocket credentials.`
2933
+ `${pe} - Missing required WebSocket credentials.`
2917
2934
  );
2918
2935
  return;
2919
2936
  }
@@ -2925,20 +2942,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2925
2942
  TOKEN: I
2926
2943
  };
2927
2944
  try {
2928
- const H = await ks(
2945
+ const H = await ps(
2929
2946
  M,
2930
2947
  Ts
2931
2948
  );
2932
- if (!H || r.current || (s == null ? void 0 : s.current) >= Ie) {
2949
+ if (!H || s.current || (r == null ? void 0 : r.current) >= Ie) {
2933
2950
  console.warn(
2934
- `${ke} - Skipping WebSocket connection attempt.`
2951
+ `${pe} - Skipping WebSocket connection attempt.`
2935
2952
  );
2936
2953
  return;
2937
2954
  }
2938
- t.current && t.current.close(), _(`${B}?t=${H}`);
2955
+ t.current && t.current.close(), k(`${B}?t=${H}`);
2939
2956
  } catch (H) {
2940
2957
  console.error(
2941
- `${ke} - Failed to encrypt token:`,
2958
+ `${pe} - Failed to encrypt token:`,
2942
2959
  H
2943
2960
  );
2944
2961
  }
@@ -2951,13 +2968,13 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2951
2968
  const { DATA: j, EVENT: S } = JSON.parse(h.data || "{}");
2952
2969
  !C.current && S === "USER_ONLINE_NOTIF" && Array.isArray(j == null ? void 0 : j.EMPLOYEES) && (o((m = j == null ? void 0 : j.EMPLOYEES) == null ? void 0 : m.filter(Boolean)), C.current = !0), S === "TOKEN_EXPIRED" && w({
2953
2970
  onSuccess: () => {
2954
- p();
2971
+ _();
2955
2972
  }
2956
2973
  });
2957
2974
  }
2958
2975
  } catch {
2959
2976
  console.error(
2960
- `${ke} - Invalid WebSocket message:`,
2977
+ `${pe} - Invalid WebSocket message:`,
2961
2978
  h.data
2962
2979
  );
2963
2980
  }
@@ -2972,7 +2989,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2972
2989
  );
2973
2990
  };
2974
2991
  return X(() => {
2975
- C.current || p();
2992
+ C.current || _();
2976
2993
  }, []), /* @__PURE__ */ n.jsx(
2977
2994
  mt.Provider,
2978
2995
  {
@@ -2980,10 +2997,10 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2980
2997
  ws: t == null ? void 0 : t.current,
2981
2998
  onSendMsg: E,
2982
2999
  userOnline: c,
2983
- connectWebSocket: p,
2984
- retryCountState: d,
3000
+ connectWebSocket: _,
3001
+ retryCountState: l,
2985
3002
  setRetryCountState: a,
2986
- retryCountRef: s,
3003
+ retryCountRef: r,
2987
3004
  isGetResponse: u,
2988
3005
  setGetResponse: f
2989
3006
  },
@@ -2991,11 +3008,11 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2991
3008
  }
2992
3009
  );
2993
3010
  }, Mr = () => {
2994
- var d;
2995
- const { widgetProps: e } = J(), { listTicket: t, setTicketId: s, loadingListTicket: r } = ve(), { onSendMsg: l, setGetResponse: c } = he(), { xs: o } = Ce.useBreakpoint();
3011
+ var l;
3012
+ const { widgetProps: e } = K(), { listTicket: t, setTicketId: r, loadingListTicket: s } = ve(), { onSendMsg: d, setGetResponse: c } = he(), { xs: o } = Ce.useBreakpoint();
2996
3013
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2997
3014
  /* @__PURE__ */ n.jsx(Dr, {}),
2998
- r ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (d = Array.from({ length: 5 })) == null ? void 0 : d.map((a, u) => /* @__PURE__ */ n.jsx(
3015
+ s ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (l = Array.from({ length: 5 })) == null ? void 0 : l.map((a, u) => /* @__PURE__ */ n.jsx(
2999
3016
  ue.Input,
3000
3017
  {
3001
3018
  style: { height: 80, width: "100%", borderRadius: 8 }
@@ -3014,12 +3031,12 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3014
3031
  ...a,
3015
3032
  key: u,
3016
3033
  onClick: () => {
3017
- c(!0), l({
3034
+ c(!0), d({
3018
3035
  event: "JOIN_ROOM",
3019
3036
  data: {
3020
3037
  TASK_ID: a == null ? void 0 : a.TASK_ID
3021
3038
  }
3022
- }), s(a == null ? void 0 : a.TASK_ID);
3039
+ }), r(a == null ? void 0 : a.TASK_ID);
3023
3040
  }
3024
3041
  }
3025
3042
  )) : /* @__PURE__ */ n.jsx(
@@ -3037,16 +3054,16 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3037
3054
  }
3038
3055
  )
3039
3056
  ] });
3040
- }, Fr = R(Mr), Hr = ({ children: e, open: t, onClose: s, footer: r, styleContainer: l }) => {
3057
+ }, Fr = R(Mr), Hr = ({ children: e, open: t, onClose: r, footer: s, styleContainer: d }) => {
3041
3058
  var g;
3042
- const [c, o] = D(!1), d = Y(), a = Y(null), u = Y(), f = O(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), x = (C) => {
3043
- C.code === "Escape" && !C.shiftKey && !C.altKey && !C.ctrlKey && C.key === "Escape" && (C.stopPropagation(), typeof s == "function" && s());
3059
+ const [c, o] = D(!1), l = Y(), a = Y(null), u = Y(), f = O(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), x = (C) => {
3060
+ C.code === "Escape" && !C.shiftKey && !C.altKey && !C.ctrlKey && C.key === "Escape" && (C.stopPropagation(), typeof r == "function" && r());
3044
3061
  };
3045
3062
  return X(() => {
3046
3063
  const C = u.current;
3047
3064
  return C && (clearTimeout(a.current), a.current = setTimeout(() => {
3048
3065
  C == null || C.focus();
3049
- }, 250), C == null || C.addEventListener("keydown", x)), t && o(!1), clearTimeout(d == null ? void 0 : d.current), d.current = setTimeout(() => {
3066
+ }, 250), C == null || C.addEventListener("keydown", x)), t && o(!1), clearTimeout(l == null ? void 0 : l.current), l.current = setTimeout(() => {
3050
3067
  t || o(!0);
3051
3068
  }, 300), () => {
3052
3069
  C && (C == null || C.removeEventListener("keydown", x));
@@ -3060,27 +3077,27 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3060
3077
  style: {
3061
3078
  display: c ? "none" : "block",
3062
3079
  height: "100%",
3063
- ...((g = Object == null ? void 0 : Object.keys(l || {})) == null ? void 0 : g.length) > 0 && {
3064
- ...l
3080
+ ...((g = Object == null ? void 0 : Object.keys(d || {})) == null ? void 0 : g.length) > 0 && {
3081
+ ...d
3065
3082
  }
3066
3083
  },
3067
3084
  children: [
3068
3085
  e,
3069
- r && r
3086
+ s && s
3070
3087
  ]
3071
3088
  }
3072
3089
  );
3073
3090
  }, bt = R(Hr), vt = Te({}), De = () => ye(vt), Ir = ({ children: e }) => {
3074
- const [t, s] = D([]), [r, l] = D({}), [c, o] = D(!0), [d, a] = D({}), u = Y(!1), f = en(), { ticketId: x } = ve(), { ws: g, setGetResponse: C } = he(), { parsedJWT: y } = J(), w = O(() => {
3091
+ const [t, r] = D([]), [s, d] = D({}), [c, o] = D(!0), [l, a] = D({}), u = Y(!1), f = en(), { ticketId: x } = ve(), { ws: g, setGetResponse: C } = he(), { parsedJWT: y } = K(), w = O(() => {
3075
3092
  var S;
3076
- const b = (r == null ? void 0 : r.CREATED_BY) ?? {}, h = (r == null ? void 0 : r.ASSIGNEE) ?? {}, m = (r == null ? void 0 : r.OTHER_ASSIGNEE) ?? [], j = (S = [b, h, ...m].map((I) => ({
3093
+ const b = (s == null ? void 0 : s.CREATED_BY) ?? {}, h = (s == null ? void 0 : s.ASSIGNEE) ?? {}, m = (s == null ? void 0 : s.OTHER_ASSIGNEE) ?? [], j = (S = [b, h, ...m].map((I) => ({
3077
3094
  ...I
3078
3095
  }))) == null ? void 0 : S.filter((I) => {
3079
3096
  var B;
3080
3097
  return ((B = Object.keys(I || {})) == null ? void 0 : B.length) > 0;
3081
3098
  });
3082
3099
  return Tn({ ArrObj: j, key: "EMP_ID" });
3083
- }, [r]), _ = () => {
3100
+ }, [s]), k = () => {
3084
3101
  var b, h;
3085
3102
  o(!0), (h = (b = f({
3086
3103
  endpoint: "/helpdesk/chat/list",
@@ -3099,13 +3116,13 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3099
3116
  ...$ == null ? void 0 : $.ACTOR
3100
3117
  }
3101
3118
  }));
3102
- s(Qe(F));
3119
+ r(Qe(F));
3103
3120
  } else
3104
- s({});
3121
+ r({});
3105
3122
  })) == null || h.finally(() => {
3106
3123
  o(!1);
3107
3124
  });
3108
- }, p = () => {
3125
+ }, _ = () => {
3109
3126
  var b;
3110
3127
  (b = f({
3111
3128
  endpoint: "/helpdesk/myticket/get",
@@ -3117,9 +3134,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3117
3134
  var m, j, S;
3118
3135
  if ((m = h == null ? void 0 : h.data) != null && m.DATA) {
3119
3136
  const I = (S = (j = h == null ? void 0 : h.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST;
3120
- l(I);
3137
+ d(I);
3121
3138
  } else
3122
- l({});
3139
+ d({});
3123
3140
  });
3124
3141
  }, v = (b) => {
3125
3142
  var j;
@@ -3127,7 +3144,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3127
3144
  C(!0), a((S) => ({
3128
3145
  ...S,
3129
3146
  [h]: !1
3130
- })), u.current || s((S) => {
3147
+ })), u.current || r((S) => {
3131
3148
  const I = yn(S), B = h == m ? "to" : "from", M = [...I, { ...b, CHAT_ALIGN: B }];
3132
3149
  return Qe(M);
3133
3150
  }), u.current = !1;
@@ -3137,30 +3154,30 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3137
3154
  (j === "RECEIVE_MESSAGE" || j === "RECEIVE_ANOTHER_MESSAGE") && v(m);
3138
3155
  }
3139
3156
  };
3140
- return X(() => (x && (_(), p()), g && x && (g == null || g.addEventListener("message", E)), () => {
3157
+ return X(() => (x && (k(), _()), g && x && (g == null || g.addEventListener("message", E)), () => {
3141
3158
  g && x && (g == null || g.removeEventListener("message", E));
3142
3159
  }), [x]), /* @__PURE__ */ n.jsx(
3143
3160
  vt.Provider,
3144
3161
  {
3145
3162
  value: {
3146
3163
  chats: t,
3147
- setChats: s,
3148
- detailTicket: r,
3164
+ setChats: r,
3165
+ detailTicket: s,
3149
3166
  employees: w,
3150
3167
  isFromSelf: u,
3151
3168
  loadingChats: c,
3152
- objTypingOtherEmp: d,
3169
+ objTypingOtherEmp: l,
3153
3170
  setTypingOtherEmp: a
3154
3171
  },
3155
3172
  children: e
3156
3173
  }
3157
3174
  );
3158
3175
  }, $r = ({ onClose: e }) => {
3159
- const { xs: t } = Ce.useBreakpoint(), { employees: s, detailTicket: r, loadingChats: l } = De(), { userOnline: c } = he(), o = O(() => {
3176
+ const { xs: t } = Ce.useBreakpoint(), { employees: r, detailTicket: s, loadingChats: d } = De(), { userOnline: c } = he(), o = O(() => {
3160
3177
  var a;
3161
- return (a = s == null ? void 0 : s.map((u) => u == null ? void 0 : u.FULL_NAME)) == null ? void 0 : a.join(", ");
3162
- }, [s]), d = O(() => t ? "click" : "hover", [t]);
3163
- return l ? /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
3178
+ return (a = r == null ? void 0 : r.map((u) => u == null ? void 0 : u.FULL_NAME)) == null ? void 0 : a.join(", ");
3179
+ }, [r]), l = O(() => t ? "click" : "hover", [t]);
3180
+ return d ? /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
3164
3181
  /* @__PURE__ */ n.jsx(ue.Avatar, {}),
3165
3182
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
3166
3183
  /* @__PURE__ */ n.jsx(ue.Input, {}),
@@ -3183,15 +3200,15 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3183
3200
  Ee.Group,
3184
3201
  {
3185
3202
  maxCount: 2,
3186
- maxPopoverTrigger: d,
3203
+ maxPopoverTrigger: l,
3187
3204
  maxStyle: {
3188
3205
  color: "#f56a00",
3189
3206
  backgroundColor: "#fde3cf",
3190
3207
  cursor: "pointer"
3191
3208
  },
3192
- children: s == null ? void 0 : s.map((a, u) => {
3209
+ children: r == null ? void 0 : r.map((a, u) => {
3193
3210
  const f = c == null ? void 0 : c.includes(a == null ? void 0 : a.EMP_ID);
3194
- return /* @__PURE__ */ n.jsx(Se, { title: a == null ? void 0 : a.FULL_NAME, trigger: d, children: /* @__PURE__ */ bn(
3211
+ return /* @__PURE__ */ n.jsx(Se, { title: a == null ? void 0 : a.FULL_NAME, trigger: l, children: /* @__PURE__ */ bn(
3195
3212
  Ee,
3196
3213
  {
3197
3214
  ...f && {
@@ -3212,16 +3229,16 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3212
3229
  /* @__PURE__ */ n.jsx(
3213
3230
  Se,
3214
3231
  {
3215
- title: `${r == null ? void 0 : r.TASK_CODE} - ${r == null ? void 0 : r.SUBJECT}`,
3216
- trigger: d,
3232
+ title: `${s == null ? void 0 : s.TASK_CODE} - ${s == null ? void 0 : s.SUBJECT}`,
3233
+ trigger: l,
3217
3234
  children: /* @__PURE__ */ n.jsxs(V.Text, { className: "w-ticket-detail-header-text", children: [
3218
- r == null ? void 0 : r.TASK_CODE,
3235
+ s == null ? void 0 : s.TASK_CODE,
3219
3236
  " - ",
3220
- r == null ? void 0 : r.SUBJECT
3237
+ s == null ? void 0 : s.SUBJECT
3221
3238
  ] })
3222
3239
  }
3223
3240
  ),
3224
- /* @__PURE__ */ n.jsx(Se, { title: o, trigger: d, children: /* @__PURE__ */ n.jsx(
3241
+ /* @__PURE__ */ n.jsx(Se, { title: o, trigger: l, children: /* @__PURE__ */ n.jsx(
3225
3242
  V.Text,
3226
3243
  {
3227
3244
  type: "secondary",
@@ -3234,7 +3251,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3234
3251
  ) })
3235
3252
  ] })
3236
3253
  ] }),
3237
- /* @__PURE__ */ n.jsx(xt, { taskStatus: r == null ? void 0 : r.STATUS })
3254
+ /* @__PURE__ */ n.jsx(xt, { taskStatus: s == null ? void 0 : s.STATUS })
3238
3255
  ] });
3239
3256
  }, Br = R($r), Ur = ({ ...e }) => {
3240
3257
  const t = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
@@ -3257,34 +3274,34 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3257
3274
  )
3258
3275
  ] });
3259
3276
  }, Wr = R(Ur), Vr = ({ ...e }) => {
3260
- const t = k("Download", "Download"), s = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), r = O(() => {
3277
+ const t = p("Download", "Download"), r = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), s = O(() => {
3261
3278
  var a;
3262
- const d = e == null ? void 0 : e.ATTACHMENT;
3263
- if (d)
3279
+ const l = e == null ? void 0 : e.ATTACHMENT;
3280
+ if (l)
3264
3281
  try {
3265
- const u = new URL(d), f = (a = u == null ? void 0 : u.pathname) == null ? void 0 : a.split("/");
3282
+ const u = new URL(l), f = (a = u == null ? void 0 : u.pathname) == null ? void 0 : a.split("/");
3266
3283
  return f == null ? void 0 : f[(f == null ? void 0 : f.length) - 1];
3267
3284
  } catch {
3268
- return d;
3285
+ return l;
3269
3286
  }
3270
3287
  return "";
3271
- }, [e]), l = O(() => {
3272
- if (r != null && r.includes(".")) {
3273
- const d = r == null ? void 0 : r.split(".");
3274
- return `.${d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]}`;
3288
+ }, [e]), d = O(() => {
3289
+ if (s != null && s.includes(".")) {
3290
+ const l = s == null ? void 0 : s.split(".");
3291
+ return `.${l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1]}`;
3275
3292
  }
3276
3293
  return "";
3277
- }, [e, r]), c = O(() => dn == null ? void 0 : dn.includes(l), [e, l]), o = () => {
3294
+ }, [e, s]), c = O(() => dn == null ? void 0 : dn.includes(d), [e, d]), o = () => {
3278
3295
  En({
3279
3296
  downloadURL: e == null ? void 0 : e.ATTACHMENT,
3280
- fileName: r,
3297
+ fileName: s,
3281
3298
  isOpenNewTab: !0
3282
3299
  });
3283
3300
  };
3284
3301
  return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(
3285
3302
  "div",
3286
3303
  {
3287
- className: `w-bubble-chat ${`w-${s}`}`,
3304
+ className: `w-bubble-chat ${`w-${r}`}`,
3288
3305
  style: { display: "flex", flexDirection: "column" },
3289
3306
  children: [
3290
3307
  c ? /* @__PURE__ */ n.jsx(wn, { src: e == null ? void 0 : e.ATTACHMENT, fallback: Es }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
@@ -3294,7 +3311,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3294
3311
  {
3295
3312
  onClick: o,
3296
3313
  style: { display: "block", width: 160 },
3297
- children: r
3314
+ children: s
3298
3315
  }
3299
3316
  )
3300
3317
  ] }),
@@ -3314,7 +3331,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3314
3331
  {
3315
3332
  date: e == null ? void 0 : e.CREATED_DATE,
3316
3333
  format: Xe,
3317
- ...s === "client" && {
3334
+ ...r === "client" && {
3318
3335
  style: {
3319
3336
  alignSelf: "flex-end"
3320
3337
  }
@@ -3338,41 +3355,41 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3338
3355
  /* @__PURE__ */ n.jsx(V.Text, { children: e == null ? void 0 : e.MESSAGE })
3339
3356
  ] });
3340
3357
  }, Yr = R(zr), ht = () => {
3341
- const { widgetProps: e } = J(), t = pe.enc.Hex.parse(
3342
- pe.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
3343
- ), s = {
3344
- mode: pe.mode.ECB,
3345
- padding: pe.pad.Pkcs7
3346
- }, r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|GreatDayHR/i.test(
3358
+ const { widgetProps: e } = K(), t = _e.enc.Hex.parse(
3359
+ _e.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
3360
+ ), r = {
3361
+ mode: _e.mode.ECB,
3362
+ padding: _e.pad.Pkcs7
3363
+ }, s = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|GreatDayHR/i.test(
3347
3364
  navigator.userAgent
3348
- ), l = (o) => {
3365
+ ), d = (o) => {
3349
3366
  if (typeof o == "number" && (o = o.toString()), !o) return "";
3350
- if (r) return window.encodeURIComponent(o);
3351
- const d = pe.enc.Utf8.parse(o), a = pe.AES.encrypt(
3352
- d,
3367
+ if (s) return window.encodeURIComponent(o);
3368
+ const l = _e.enc.Utf8.parse(o), a = _e.AES.encrypt(
3369
+ l,
3353
3370
  t,
3354
- s
3371
+ r
3355
3372
  ).toString();
3356
3373
  return window.encodeURIComponent(`$${a}`);
3357
3374
  };
3358
3375
  return {
3359
3376
  paramsEncrypt: (o) => {
3360
- const [d, a = null] = o.split("?"), u = d.split("/").map((f) => {
3377
+ const [l, a = null] = o.split("?"), u = l.split("/").map((f) => {
3361
3378
  const [, x = null] = f.split(":");
3362
- return x && (e != null && e.keyEncrypt) ? l(x) : f;
3379
+ return x && (e != null && e.keyEncrypt) ? d(x) : f;
3363
3380
  }).join("/");
3364
3381
  return a ? `${u}?${a}` : u;
3365
3382
  },
3366
- encrypt: l
3383
+ encrypt: d
3367
3384
  };
3368
3385
  }, Kr = ({ ...e }) => {
3369
- const t = k("ViewFAQ", "View FAQ"), s = k(
3386
+ const t = p("ViewFAQ", "View FAQ"), r = p(
3370
3387
  "FAQUnavailable",
3371
3388
  "FAQ unavailable"
3372
- ), r = k(
3389
+ ), s = p(
3373
3390
  "ThisFAQIsUnavailable",
3374
3391
  "This FAQ is unavailable"
3375
- ), { paramsEncrypt: l } = ht(), { history: c } = J(), o = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), d = O(() => e == null ? void 0 : e.FAQ_ID, [e]);
3392
+ ), { paramsEncrypt: d } = ht(), { widgetProps: c } = K(), o = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), l = O(() => e == null ? void 0 : e.FAQ_ID, [e]);
3376
3393
  return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
3377
3394
  /* @__PURE__ */ n.jsx(
3378
3395
  V.Text,
@@ -3385,21 +3402,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3385
3402
  marginBottom: 8,
3386
3403
  display: "block"
3387
3404
  },
3388
- children: d ? e == null ? void 0 : e.MESSAGE : s
3405
+ children: l ? e == null ? void 0 : e.MESSAGE : r
3389
3406
  }
3390
3407
  ),
3391
- d ? /* @__PURE__ */ n.jsx(
3408
+ l ? /* @__PURE__ */ n.jsx(
3392
3409
  z,
3393
3410
  {
3394
3411
  block: !0,
3395
3412
  onClick: () => {
3396
- typeof c < "u" && c.push(
3397
- l(`/standard/hrm.helpdesk.FAQ-detail/:${d}`)
3398
- );
3413
+ var a;
3414
+ typeof (c == null ? void 0 : c.history) < "u" && ((a = c == null ? void 0 : c.history) == null || a.push(
3415
+ d(`/standard/hrm.helpdesk.FAQ-detail/:${l}`)
3416
+ ));
3399
3417
  },
3400
3418
  children: t
3401
3419
  }
3402
- ) : /* @__PURE__ */ n.jsx(V.Text, { children: r }),
3420
+ ) : /* @__PURE__ */ n.jsx(V.Text, { children: s }),
3403
3421
  /* @__PURE__ */ n.jsx(
3404
3422
  We,
3405
3423
  {
@@ -3422,25 +3440,25 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3422
3440
  }
3423
3441
  }, Qr = R(Jr), Zr = () => {
3424
3442
  var y;
3425
- const [e, t] = D([]), s = k("And", "and"), r = k("IsTyping", "Is Typing"), l = k("People", "People"), { employees: c, setTypingOtherEmp: o, objTypingOtherEmp: d } = De(), { ws: a, setGetResponse: u } = he(), { parsedJWT: f } = J(), x = O(() => e == null ? void 0 : e.filter((w) => d == null ? void 0 : d[w == null ? void 0 : w.EMP_ID]), [d, e]), g = O(() => {
3426
- const w = x == null ? void 0 : x.map((_) => _ == null ? void 0 : _.FULL_NAME);
3443
+ const [e, t] = D([]), r = p("And", "and"), s = p("IsTyping", "Is Typing"), d = p("People", "People"), { employees: c, setTypingOtherEmp: o, objTypingOtherEmp: l } = De(), { ws: a, setGetResponse: u } = he(), { parsedJWT: f } = K(), x = O(() => e == null ? void 0 : e.filter((w) => l == null ? void 0 : l[w == null ? void 0 : w.EMP_ID]), [l, e]), g = O(() => {
3444
+ const w = x == null ? void 0 : x.map((k) => k == null ? void 0 : k.FULL_NAME);
3427
3445
  if ((x == null ? void 0 : x.length) > 2) {
3428
- const _ = w == null ? void 0 : w.filter((v, E) => E <= 1), p = w == null ? void 0 : w.filter((v, E) => E > 1);
3429
- return `${_ == null ? void 0 : _.join(", ")}, ${s} ${p == null ? void 0 : p.length} ${l} ${r}`;
3446
+ const k = w == null ? void 0 : w.filter((v, E) => E <= 1), _ = w == null ? void 0 : w.filter((v, E) => E > 1);
3447
+ return `${k == null ? void 0 : k.join(", ")}, ${r} ${_ == null ? void 0 : _.length} ${d} ${s}`;
3430
3448
  }
3431
- return `${w == null ? void 0 : w.join(", ")} ${r}`;
3449
+ return `${w == null ? void 0 : w.join(", ")} ${s}`;
3432
3450
  }, [e, x]), C = (w) => {
3433
3451
  if ((w == null ? void 0 : w.data) !== "PING") {
3434
- const _ = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: p = {}, EVENT: v = "" } = _ ?? {}, E = p == null ? void 0 : p.EMPLOYEE_ID, b = f == null ? void 0 : f.EMP_ID;
3452
+ const k = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: _ = {}, EVENT: v = "" } = k ?? {}, E = _ == null ? void 0 : _.EMPLOYEE_ID, b = f == null ? void 0 : f.EMP_ID;
3435
3453
  if (v === "TYPING") {
3436
3454
  E === b ? u(!1) : o((j) => ({
3437
3455
  ...j,
3438
- [E]: p == null ? void 0 : p.IS_TYPING
3456
+ [E]: _ == null ? void 0 : _.IS_TYPING
3439
3457
  }));
3440
3458
  const h = c == null ? void 0 : c.find(
3441
- (j) => (j == null ? void 0 : j.EMP_ID) === (p == null ? void 0 : p.EMPLOYEE_ID)
3459
+ (j) => (j == null ? void 0 : j.EMP_ID) === (_ == null ? void 0 : _.EMPLOYEE_ID)
3442
3460
  ), m = {
3443
- ...p,
3461
+ ..._,
3444
3462
  ...h
3445
3463
  };
3446
3464
  t((j) => {
@@ -3455,7 +3473,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3455
3473
  };
3456
3474
  return X(() => (a && (a == null || a.addEventListener("message", C)), () => {
3457
3475
  a && (a == null || a.removeEventListener("message", C));
3458
- }), [c]), (y = Object.values(d || {})) != null && y.every((w) => w === !1) ? null : /* @__PURE__ */ n.jsxs(
3476
+ }), [c]), (y = Object.values(l || {})) != null && y.every((w) => w === !1) ? null : /* @__PURE__ */ n.jsxs(
3459
3477
  "div",
3460
3478
  {
3461
3479
  style: {
@@ -3474,7 +3492,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3474
3492
  backgroundColor: "#fde3cf",
3475
3493
  cursor: "pointer"
3476
3494
  },
3477
- children: x == null ? void 0 : x.map((w, _) => /* @__PURE__ */ n.jsx(Se, { title: w == null ? void 0 : w.FULL_NAME, children: /* @__PURE__ */ n.jsx(Ee, { src: w == null ? void 0 : w.PHOTO, nameFallback: w == null ? void 0 : w.FULL_NAME }) }, _))
3495
+ children: x == null ? void 0 : x.map((w, k) => /* @__PURE__ */ n.jsx(Se, { title: w == null ? void 0 : w.FULL_NAME, children: /* @__PURE__ */ n.jsx(Ee, { src: w == null ? void 0 : w.PHOTO, nameFallback: w == null ? void 0 : w.FULL_NAME }) }, k))
3478
3496
  }
3479
3497
  ),
3480
3498
  /* @__PURE__ */ n.jsx(V.Text, { children: g }),
@@ -3484,22 +3502,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3484
3502
  );
3485
3503
  }, Xr = R(Zr), Pr = () => {
3486
3504
  var c;
3487
- const { chats: e } = De(), { widgetProps: t } = J(), { activeTab: s } = be(), r = Y(), { xs: l } = Ce.useBreakpoint();
3505
+ const { chats: e } = De(), { widgetProps: t } = K(), { activeTab: r } = be(), s = Y(), { xs: d } = Ce.useBreakpoint();
3488
3506
  return X(() => {
3489
- clearTimeout(r.current), r.current = setTimeout(() => {
3507
+ clearTimeout(s.current), s.current = setTimeout(() => {
3490
3508
  me(".w-ticket-detail-content-container");
3491
3509
  }, 350);
3492
- }, [s]), /* @__PURE__ */ n.jsxs(
3510
+ }, [r]), /* @__PURE__ */ n.jsxs(
3493
3511
  "div",
3494
3512
  {
3495
- className: `w-ticket-detail-content-container ${l ? t != null && t.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
3513
+ className: `w-ticket-detail-content-container ${d ? t != null && t.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
3496
3514
  children: [
3497
3515
  (c = Object.keys(e || {})) == null ? void 0 : c.map((o) => {
3498
3516
  var a, u;
3499
- const d = e == null ? void 0 : e[o];
3517
+ const l = e == null ? void 0 : e[o];
3500
3518
  return /* @__PURE__ */ n.jsxs(gn, { children: [
3501
3519
  /* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (a = ae(o)) == null ? void 0 : a.format("ddd, DD MMMM YYYY") }),
3502
- /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(d)) == null ? void 0 : u.map((f, x) => {
3520
+ /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(l)) == null ? void 0 : u.map((f, x) => {
3503
3521
  var y, w;
3504
3522
  const g = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", C = f == null ? void 0 : f.CHAT_TYPE;
3505
3523
  return /* @__PURE__ */ n.jsxs(gn, { children: [
@@ -3521,18 +3539,18 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3521
3539
  );
3522
3540
  }, eo = R(Pr), no = () => {
3523
3541
  var c, o;
3524
- const { chats: e, loadingChats: t } = De(), { widgetProps: s } = J(), { xs: r } = Ce.useBreakpoint(), l = O(() => {
3542
+ const { chats: e, loadingChats: t } = De(), { widgetProps: r } = K(), { xs: s } = Ce.useBreakpoint(), d = O(() => {
3525
3543
  var a;
3526
- const d = [fn];
3527
- return r && (s != null && s.isSF ? d == null || d.push(
3544
+ const l = [fn];
3545
+ return s && (r != null && r.isSF ? l == null || l.push(
3528
3546
  `${fn}-sf-mobile`
3529
- ) : d == null || d.push(`${fn}-mobile`)), (a = d == null ? void 0 : d.filter(Boolean)) == null ? void 0 : a.join(" ");
3530
- }, [r, s == null ? void 0 : s.isSF]);
3547
+ ) : l == null || l.push(`${fn}-mobile`)), (a = l == null ? void 0 : l.filter(Boolean)) == null ? void 0 : a.join(" ");
3548
+ }, [s, r == null ? void 0 : r.isSF]);
3531
3549
  return t ? /* @__PURE__ */ n.jsx(
3532
3550
  "div",
3533
3551
  {
3534
- className: `${l} w-ticket-detail-loading-chats`,
3535
- children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((d, a) => {
3552
+ className: `${d} w-ticket-detail-loading-chats`,
3553
+ children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((l, a) => {
3536
3554
  const u = a % 2 === 0;
3537
3555
  return /* @__PURE__ */ n.jsxs(
3538
3556
  "div",
@@ -3575,7 +3593,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3575
3593
  ) : ((o = Object.keys(e || {})) == null ? void 0 : o.length) === 0 ? /* @__PURE__ */ n.jsx(
3576
3594
  "div",
3577
3595
  {
3578
- className: l,
3596
+ className: d,
3579
3597
  style: {
3580
3598
  display: "flex",
3581
3599
  justifyContent: "center",
@@ -3590,8 +3608,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3590
3608
  "div",
3591
3609
  {
3592
3610
  style: { display: "flex", gap: 8 },
3593
- onClick: (s) => {
3594
- s == null || s.stopPropagation();
3611
+ onClick: (r) => {
3612
+ r == null || r.stopPropagation();
3595
3613
  },
3596
3614
  children: [
3597
3615
  /* @__PURE__ */ n.jsx(
@@ -3604,8 +3622,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3604
3622
  style: { borderRadius: 8 },
3605
3623
  preview: !1,
3606
3624
  loading: "lazy",
3607
- onError: (s) => {
3608
- t.current += 1, (t == null ? void 0 : t.current) < 3 ? s.target.src = ot(e == null ? void 0 : e.PHOTO) : s.target.src = jn(e == null ? void 0 : e.FULL_NAME);
3625
+ onError: (r) => {
3626
+ t.current += 1, (t == null ? void 0 : t.current) < 3 ? r.target.src = ot(e == null ? void 0 : e.PHOTO) : r.target.src = jn(e == null ? void 0 : e.FULL_NAME);
3609
3627
  }
3610
3628
  }
3611
3629
  ),
@@ -3619,16 +3637,16 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3619
3637
  }
3620
3638
  );
3621
3639
  }, ro = R(so), oo = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
3622
- var p, v;
3623
- const s = en(), [r, l] = D({}), c = Y(null), o = k(
3640
+ var _, v;
3641
+ const r = en(), [s, d] = D({}), c = Y(null), o = p(
3624
3642
  "ImageMustSmallerThan",
3625
3643
  "Image must smaller than"
3626
- ), d = k(
3644
+ ), l = p(
3627
3645
  "MaximumFileSizeExceeded",
3628
3646
  "Maximum file size exceeded"
3629
3647
  ), { onSendMsg: a } = he(), { employees: u, setChats: f, isFromSelf: x } = De(), { ticketId: g } = ve(), { activeTab: C } = be(), y = () => {
3630
3648
  var E;
3631
- (E = s({
3649
+ (E = r({
3632
3650
  endpoint: "/upload/get-upload-config",
3633
3651
  data: {
3634
3652
  LIMIT: 1,
@@ -3640,28 +3658,28 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3640
3658
  })) == null || E.then((b) => {
3641
3659
  var m, j;
3642
3660
  const h = (j = (m = b == null ? void 0 : b.data) == null ? void 0 : m.DATA) == null ? void 0 : j.LIST;
3643
- (h == null ? void 0 : h.length) > 0 && l(h == null ? void 0 : h[0]);
3661
+ (h == null ? void 0 : h.length) > 0 && d(h == null ? void 0 : h[0]);
3644
3662
  });
3645
3663
  }, w = (E) => {
3646
3664
  var m, j, S;
3647
- const b = E.size / 1024 / 1024, h = (r == null ? void 0 : r.MAXFILESIZE) / 1024;
3665
+ const b = E.size / 1024 / 1024, h = (s == null ? void 0 : s.MAXFILESIZE) / 1024;
3648
3666
  return b > h && ((m = ie) == null || m.destroy(), (j = ie) == null || j.config({
3649
3667
  getContainer: () => document.querySelector(".w-widget-content-container"),
3650
3668
  top: 28,
3651
3669
  placement: "top"
3652
3670
  }), (S = ie) == null || S.error({
3653
- message: d,
3671
+ message: l,
3654
3672
  description: `${o} ${h == null ? void 0 : h.toFixed(
3655
3673
  1
3656
3674
  )} MB!`,
3657
3675
  className: "w-notification-content",
3658
3676
  duration: 3
3659
3677
  })), !1;
3660
- }, _ = (E) => {
3678
+ }, k = (E) => {
3661
3679
  var h, m;
3662
3680
  e(!0);
3663
3681
  const b = new FormData();
3664
- b.append("UPLOAD_CODE", r == null ? void 0 : r.UPLOAD_CODE), b.append("UPLOAD_TYPE", r == null ? void 0 : r.UPLOAD_TYPE), b.append("FILE", E), (m = (h = s({
3682
+ b.append("UPLOAD_CODE", s == null ? void 0 : s.UPLOAD_CODE), b.append("UPLOAD_TYPE", s == null ? void 0 : s.UPLOAD_TYPE), b.append("FILE", E), (m = (h = r({
3665
3683
  endpoint: "/upload/temp",
3666
3684
  data: b,
3667
3685
  headers: {
@@ -3708,9 +3726,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3708
3726
  {
3709
3727
  beforeUpload: w,
3710
3728
  fileList: [],
3711
- accept: (v = (p = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : p.split(",")) == null ? void 0 : v.map((E) => `.${E}`),
3729
+ accept: (v = (_ = s == null ? void 0 : s.EXT_LIST) == null ? void 0 : _.split(",")) == null ? void 0 : v.map((E) => `.${E}`),
3712
3730
  onChange: (E) => {
3713
- _(E == null ? void 0 : E.file);
3731
+ k(E == null ? void 0 : E.file);
3714
3732
  },
3715
3733
  children: /* @__PURE__ */ n.jsx(
3716
3734
  z,
@@ -3724,47 +3742,47 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3724
3742
  }
3725
3743
  );
3726
3744
  }, co = R(oo), io = (e) => {
3727
- var r;
3728
- const t = Y(null), s = Y(null);
3729
- return s != null && s.current && ((r = s.current) == null || r.update(e)), X(() => {
3745
+ var s;
3746
+ const t = Y(null), r = Y(null);
3747
+ return r != null && r.current && ((s = r.current) == null || s.update(e)), X(() => {
3730
3748
  var c;
3731
- const l = (c = window == null ? void 0 : window.customElements) == null ? void 0 : c.get("em-emoji-picker");
3732
- return s.current = new (l || cs)({ ...e, ref: t }), () => {
3733
- s.current = null;
3749
+ const d = (c = window == null ? void 0 : window.customElements) == null ? void 0 : c.get("em-emoji-picker");
3750
+ return r.current = new (d || cs)({ ...e, ref: t }), () => {
3751
+ r.current = null;
3734
3752
  };
3735
3753
  }, []), mn.createElement("div", { ref: t });
3736
3754
  }, lo = ({ refInput: e }) => {
3737
- const { xs: t } = Ce.useBreakpoint(), s = O(() => t ? "click" : "hover", [t]), r = () => {
3755
+ const { xs: t } = Ce.useBreakpoint(), r = O(() => t ? "click" : "hover", [t]), s = () => {
3738
3756
  var g;
3739
3757
  const c = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea;
3740
3758
  if (!c)
3741
3759
  return !1;
3742
- const { selectionStart: o, selectionEnd: d, value: a } = c, u = a == null ? void 0 : a.substring(0, o), f = a == null ? void 0 : a.substring(o, d), x = a == null ? void 0 : a.substring(d);
3760
+ const { selectionStart: o, selectionEnd: l, value: a } = c, u = a == null ? void 0 : a.substring(0, o), f = a == null ? void 0 : a.substring(o, l), x = a == null ? void 0 : a.substring(l);
3743
3761
  return {
3744
3762
  before: u,
3745
3763
  selectedText: f,
3746
3764
  after: x,
3747
3765
  selectionStart: o,
3748
- selectionEnd: d,
3766
+ selectionEnd: l,
3749
3767
  text: a
3750
3768
  };
3751
- }, l = (c) => {
3769
+ }, d = (c) => {
3752
3770
  var x, g;
3753
3771
  (x = e == null ? void 0 : e.current) == null || x.focus();
3754
- const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, d = c == null ? void 0 : c.native;
3772
+ const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, l = c == null ? void 0 : c.native;
3755
3773
  if (!o) return;
3756
- const { before: a, after: u } = r(), f = `${a}${d}${u}`;
3757
- typeof document.execCommand == "function" ? document.execCommand("insertText", !1, d) : o.value = f;
3774
+ const { before: a, after: u } = s(), f = `${a}${l}${u}`;
3775
+ typeof document.execCommand == "function" ? document.execCommand("insertText", !1, l) : o.value = f;
3758
3776
  };
3759
3777
  return /* @__PURE__ */ n.jsx(
3760
3778
  vn,
3761
3779
  {
3762
- trigger: s,
3780
+ trigger: r,
3763
3781
  content: /* @__PURE__ */ n.jsx(
3764
3782
  io,
3765
3783
  {
3766
3784
  onEmojiSelect: (c) => {
3767
- l(c);
3785
+ d(c);
3768
3786
  },
3769
3787
  theme: "auto"
3770
3788
  }
@@ -3773,10 +3791,10 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3773
3791
  }
3774
3792
  );
3775
3793
  }, ao = R(lo), uo = () => {
3776
- const [e, t] = D(0), [s, r] = D(!1), l = Y(null), c = Y(null), o = Y(!1), d = Y(null), { onSendMsg: a, setGetResponse: u, isGetResponse: f } = he(), { ticketId: x } = ve(), { isActiveTabVA: g } = be(), { employees: C, setChats: y, isFromSelf: w, detailTicket: _ } = De(), p = O(() => s || !f, [s, f]), v = O(() => {
3794
+ const [e, t] = D(0), [r, s] = D(!1), d = Y(null), c = Y(null), o = Y(!1), l = Y(null), { onSendMsg: a, setGetResponse: u, isGetResponse: f } = he(), { ticketId: x } = ve(), { isActiveTabVA: g } = be(), { employees: C, setChats: y, isFromSelf: w, detailTicket: k } = De(), _ = O(() => r || !f, [r, f]), v = O(() => {
3777
3795
  var m;
3778
- return ((m = _ == null ? void 0 : _.STATUS) == null ? void 0 : m.toString().toLowerCase()) === "closed";
3779
- }, [_ == null ? void 0 : _.STATUS]), E = O(() => C == null ? void 0 : C.map((m) => ({
3796
+ return ((m = k == null ? void 0 : k.STATUS) == null ? void 0 : m.toString().toLowerCase()) === "closed";
3797
+ }, [k == null ? void 0 : k.STATUS]), E = O(() => C == null ? void 0 : C.map((m) => ({
3780
3798
  ...m,
3781
3799
  label: /* @__PURE__ */ n.jsx(
3782
3800
  vn,
@@ -3790,7 +3808,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3790
3808
  })), [C]), b = () => {
3791
3809
  var S, I, B;
3792
3810
  u(!1);
3793
- const m = (I = (S = l == null ? void 0 : l.current) == null ? void 0 : S.textarea) == null ? void 0 : I.value;
3811
+ const m = (I = (S = d == null ? void 0 : d.current) == null ? void 0 : S.textarea) == null ? void 0 : I.value;
3794
3812
  a({
3795
3813
  event: "SEND_MESSAGE",
3796
3814
  data: {
@@ -3831,9 +3849,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3831
3849
  }, 250);
3832
3850
  };
3833
3851
  return X(() => {
3834
- l != null && l.current && !g && x && (clearTimeout(d.current), d.current = setTimeout(() => {
3852
+ d != null && d.current && !g && x && (clearTimeout(l.current), l.current = setTimeout(() => {
3835
3853
  var m;
3836
- (m = l == null ? void 0 : l.current) == null || m.focus();
3854
+ (m = d == null ? void 0 : d.current) == null || m.focus();
3837
3855
  }, 500));
3838
3856
  }, [g, x]), v ? null : /* @__PURE__ */ n.jsxs(
3839
3857
  "div",
@@ -3843,12 +3861,12 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3843
3861
  margin: 0
3844
3862
  },
3845
3863
  children: [
3846
- /* @__PURE__ */ n.jsx(ao, { refInput: l }),
3864
+ /* @__PURE__ */ n.jsx(ao, { refInput: d }),
3847
3865
  /* @__PURE__ */ n.jsx(
3848
3866
  co,
3849
3867
  {
3850
- setLoadingUpload: r,
3851
- isLoadingUpload: s
3868
+ setLoadingUpload: s,
3869
+ isLoadingUpload: r
3852
3870
  }
3853
3871
  ),
3854
3872
  /* @__PURE__ */ n.jsx(
@@ -3857,7 +3875,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3857
3875
  autoSize: {
3858
3876
  maxRows: 3
3859
3877
  },
3860
- ref: l,
3878
+ ref: d,
3861
3879
  className: "w-input-helpdesk",
3862
3880
  placeholder: "Type a message...",
3863
3881
  onChange: () => {
@@ -3878,16 +3896,16 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3878
3896
  /* @__PURE__ */ n.jsx(
3879
3897
  z,
3880
3898
  {
3881
- loading: p,
3882
- disabled: p,
3899
+ loading: _,
3900
+ disabled: _,
3883
3901
  className: "w-send-btn",
3884
3902
  style: {
3885
3903
  backgroundColor: "var(--primary-color, #395ebc)",
3886
- ...p && {
3904
+ ..._ && {
3887
3905
  color: "white"
3888
3906
  }
3889
3907
  },
3890
- icon: /* @__PURE__ */ n.jsx(P, { type: p ? "loading" : "send" }),
3908
+ icon: /* @__PURE__ */ n.jsx(P, { type: _ ? "loading" : "send" }),
3891
3909
  shape: "circle",
3892
3910
  onClick: b
3893
3911
  }
@@ -3895,34 +3913,34 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3895
3913
  ]
3896
3914
  }
3897
3915
  );
3898
- }, fo = R(uo), xo = ({ title: e, subTitle: t, onClose: s, open: r, styleWrapper: l }) => {
3916
+ }, fo = R(uo), xo = ({ title: e, subTitle: t, onClose: r, open: s, styleWrapper: d }) => {
3899
3917
  var c;
3900
- return r ? /* @__PURE__ */ n.jsx(
3918
+ return s ? /* @__PURE__ */ n.jsx(
3901
3919
  "div",
3902
3920
  {
3903
3921
  className: "w-banner-container",
3904
- ...((c = Object.keys(l || {})) == null ? void 0 : c.length) > 0 && {
3905
- style: l
3922
+ ...((c = Object.keys(d || {})) == null ? void 0 : c.length) > 0 && {
3923
+ style: d
3906
3924
  },
3907
3925
  children: /* @__PURE__ */ n.jsxs("div", { className: "w-banner-content", children: [
3908
3926
  e && /* @__PURE__ */ n.jsx(V.Text, { style: { fontSize: 16, fontWeight: 600 }, children: e }),
3909
3927
  t && /* @__PURE__ */ n.jsx("div", { className: "w-banner-subtitle", children: t }),
3910
- typeof s == "function" && /* @__PURE__ */ n.jsx("div", { className: "w-banner-close-btn", children: /* @__PURE__ */ n.jsx(
3928
+ typeof r == "function" && /* @__PURE__ */ n.jsx("div", { className: "w-banner-close-btn", children: /* @__PURE__ */ n.jsx(
3911
3929
  z,
3912
3930
  {
3913
3931
  style: { border: "none", background: "transparent" },
3914
3932
  icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
3915
- onClick: () => s()
3933
+ onClick: () => r()
3916
3934
  }
3917
3935
  ) })
3918
3936
  ] })
3919
3937
  }
3920
3938
  ) : null;
3921
3939
  }, Et = R(xo), go = () => {
3922
- const e = k(
3940
+ const e = p(
3923
3941
  "ForMoreInformationOfThisTicket",
3924
3942
  "For more information of this ticket"
3925
- ), t = k("ClickHere", "Click here"), { ticketId: s } = ve(), { history: r } = J(), { encrypt: l } = ht();
3943
+ ), t = p("ClickHere", "Click here"), { ticketId: r } = ve(), { widgetProps: s } = K(), { encrypt: d } = ht();
3926
3944
  return /* @__PURE__ */ n.jsx(
3927
3945
  Et,
3928
3946
  {
@@ -3934,10 +3952,10 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3934
3952
  strong: !0,
3935
3953
  className: "w-reconnect-manual",
3936
3954
  onClick: () => {
3937
- const c = l(s);
3938
- r.push(
3955
+ const c = d(r);
3956
+ s != null && s.history && (s == null || s.history.push(
3939
3957
  `/standard/hrm.helpdesk.my-ticket.ticket-details?id=${c}`
3940
- );
3958
+ ));
3941
3959
  },
3942
3960
  children: t
3943
3961
  }
@@ -3955,11 +3973,11 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3955
3973
  /* @__PURE__ */ n.jsx(to, {}),
3956
3974
  /* @__PURE__ */ n.jsx(fo, {})
3957
3975
  ] }) }), bo = R(mo), vo = () => {
3958
- const e = k("AdvanceFilter", "Advance Filter"), t = k("Subject", "Subject"), s = k(
3976
+ const e = p("AdvanceFilter", "Advance Filter"), t = p("Subject", "Subject"), r = p(
3959
3977
  "TicketCategory",
3960
3978
  "Ticket Category"
3961
- ), r = k("TicketStatus", "Ticket Status"), l = k("CreatedDate", "Created Date"), c = k("New", "New"), o = k("Open", "Open"), d = k("Reopen", "Reopen"), a = k("InProgress", "In Progress"), u = k("Responded", "Responded"), f = k("Fixed", "Fixed"), x = k("Done", "Done"), g = k("Closed", "Closed"), C = k("HDCancelled", "Cancelled"), y = k("Clear", "Clear"), w = k("Filter", "Filter"), _ = en(), [p] = oe.useForm(), { openFilter: v, setOpenFilter: E, getListTicket: b, setCountFilters: h } = ve(), [m, j] = D([]), S = O(() => {
3962
- const M = `${c}/${o}/${d}`, L = `${a}/${u}`, F = `${f}/${x}`;
3979
+ ), s = p("TicketStatus", "Ticket Status"), d = p("CreatedDate", "Created Date"), c = p("New", "New"), o = p("Open", "Open"), l = p("Reopen", "Reopen"), a = p("InProgress", "In Progress"), u = p("Responded", "Responded"), f = p("Fixed", "Fixed"), x = p("Done", "Done"), g = p("Closed", "Closed"), C = p("HDCancelled", "Cancelled"), y = p("Clear", "Clear"), w = p("Filter", "Filter"), k = en(), [_] = oe.useForm(), { openFilter: v, setOpenFilter: E, getListTicket: b, setCountFilters: h } = ve(), [m, j] = D([]), S = O(() => {
3980
+ const M = `${c}/${o}/${l}`, L = `${a}/${u}`, F = `${f}/${x}`;
3963
3981
  return [
3964
3982
  { value: 3, label: M },
3965
3983
  { value: 1, label: L },
@@ -3969,7 +3987,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3969
3987
  ];
3970
3988
  }, []), I = () => {
3971
3989
  var M;
3972
- (M = _({
3990
+ (M = k({
3973
3991
  endpoint: "/helpdesk/category/list",
3974
3992
  data: {
3975
3993
  LIMIT: 999999,
@@ -3991,7 +4009,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3991
4009
  });
3992
4010
  }, B = () => {
3993
4011
  var F, $;
3994
- const M = p == null ? void 0 : p.getFieldsValue(!0);
4012
+ const M = _ == null ? void 0 : _.getFieldsValue(!0);
3995
4013
  b(M);
3996
4014
  const L = ($ = (F = Object.values(M || {})) == null ? void 0 : F.flat()) == null ? void 0 : $.filter(Boolean);
3997
4015
  h(L == null ? void 0 : L.length);
@@ -4011,7 +4029,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4011
4029
  z,
4012
4030
  {
4013
4031
  onClick: () => {
4014
- p == null || p.resetFields(), B();
4032
+ _ == null || _.resetFields(), B();
4015
4033
  },
4016
4034
  children: y
4017
4035
  },
@@ -4031,28 +4049,28 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4031
4049
  ] }),
4032
4050
  children: [
4033
4051
  /* @__PURE__ */ n.jsx(V.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
4034
- /* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: p, layout: "vertical", children: [
4052
+ /* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: _, layout: "vertical", children: [
4035
4053
  /* @__PURE__ */ n.jsx(oe.Item, { label: t, name: "TASK_NAME", children: /* @__PURE__ */ n.jsx(Be, { allowClear: !0 }) }),
4036
- /* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Wn, { options: m, mode: "multiple", allowClear: !0 }) }),
4037
- /* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(Wn, { options: S, mode: "multiple", allowClear: !0 }) }),
4038
- /* @__PURE__ */ n.jsx(oe.Item, { label: l, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(Xt, { style: { width: "100%" }, allowClear: !0 }) })
4054
+ /* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Wn, { options: m, mode: "multiple", allowClear: !0 }) }),
4055
+ /* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(Wn, { options: S, mode: "multiple", allowClear: !0 }) }),
4056
+ /* @__PURE__ */ n.jsx(oe.Item, { label: d, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(Xt, { style: { width: "100%" }, allowClear: !0 }) })
4039
4057
  ] }) })
4040
4058
  ]
4041
4059
  }
4042
4060
  );
4043
4061
  }, ho = R(vo), Eo = () => {
4044
- const e = k(
4062
+ const e = p(
4045
4063
  "ReconnectManually",
4046
4064
  "Reconnect Manually"
4047
- ), t = k(
4065
+ ), t = p(
4048
4066
  "HelpdeskWebsocket",
4049
4067
  "Helpdesk Websocket"
4050
- ), s = k("NotConnected", "Not Connected"), r = k("Connecting", "Connecting"), {
4051
- connectWebSocket: l,
4068
+ ), r = p("NotConnected", "Not Connected"), s = p("Connecting", "Connecting"), {
4069
+ connectWebSocket: d,
4052
4070
  retryCountState: c,
4053
4071
  setRetryCountState: o,
4054
- retryCountRef: d
4055
- } = he(), a = O(() => c === Ie ? `${t} ${s}` : `${t} ${r}`, [c]);
4072
+ retryCountRef: l
4073
+ } = he(), a = O(() => c === Ie ? `${t} ${r}` : `${t} ${s}`, [c]);
4056
4074
  return /* @__PURE__ */ n.jsx(
4057
4075
  "div",
4058
4076
  {
@@ -4076,7 +4094,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4076
4094
  {
4077
4095
  type: "primary",
4078
4096
  onClick: () => {
4079
- d.current = 0, o(0), l();
4097
+ l.current = 0, o(0), d();
4080
4098
  },
4081
4099
  children: e
4082
4100
  },
@@ -4095,14 +4113,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4095
4113
  }
4096
4114
  );
4097
4115
  }, To = R(Eo), yo = () => {
4098
- const { setTicketId: e, ticketId: t, openFilter: s } = ve(), { onSendMsg: r, setGetResponse: l } = he(), { showReadyWSHD: c } = J();
4116
+ const { setTicketId: e, ticketId: t, openFilter: r } = ve(), { onSendMsg: s, setGetResponse: d } = he(), { showReadyWSHD: c } = K();
4099
4117
  return c ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4100
4118
  /* @__PURE__ */ n.jsx(
4101
4119
  bo,
4102
4120
  {
4103
4121
  visible: t,
4104
4122
  onClose: () => {
4105
- e(""), l(!1), r({
4123
+ e(""), d(!1), s({
4106
4124
  event: "LEAVE_ROOM",
4107
4125
  data: {
4108
4126
  TASK_ID: t
@@ -4111,25 +4129,25 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4111
4129
  }
4112
4130
  }
4113
4131
  ),
4114
- /* @__PURE__ */ n.jsx("div", { style: { display: !t && !s ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Fr, {}) }),
4132
+ /* @__PURE__ */ n.jsx("div", { style: { display: !t && !r ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Fr, {}) }),
4115
4133
  /* @__PURE__ */ n.jsx(ho, {})
4116
4134
  ] }) : /* @__PURE__ */ n.jsx(To, {});
4117
- }, jo = R(yo), wo = ({ children: e, usePopover: t, ...s }) => t ? /* @__PURE__ */ n.jsx(vn, { ...s, visible: s == null ? void 0 : s.open, children: e }) : e, po = () => {
4118
- const e = k("NeedHelp", "Need Help"), t = k(
4135
+ }, jo = R(yo), wo = ({ children: e, usePopover: t, ...r }) => t ? /* @__PURE__ */ n.jsx(vn, { ...r, visible: r == null ? void 0 : r.open, children: e }) : e, _o = () => {
4136
+ const e = p("NeedHelp", "Need Help"), t = p(
4119
4137
  "WidgetDisconnected",
4120
4138
  "Widget Disconnected"
4121
- ), [s, r] = D(!0), l = Y(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: d, setFirstOpenWidget: a } = J(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = fe(), g = () => {
4139
+ ), [r, s] = D(!0), d = Y(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: l, setFirstOpenWidget: a } = K(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = fe(), g = () => {
4122
4140
  o(!0), u({ msg: c == null ? void 0 : c.getStartedPayload });
4123
4141
  };
4124
4142
  return X(() => {
4125
- r(!f), window.clearTimeout(l.current), l.current = setTimeout(() => {
4126
- r(!1);
4143
+ s(!f), window.clearTimeout(d.current), d.current = setTimeout(() => {
4144
+ s(!1);
4127
4145
  }, 3e3);
4128
4146
  }, [f]), /* @__PURE__ */ n.jsx(
4129
4147
  wo,
4130
4148
  {
4131
- usePopover: s && x === "show",
4132
- open: s && x === "show",
4149
+ usePopover: r && x === "show",
4150
+ open: r && x === "show",
4133
4151
  content: t,
4134
4152
  placement: "right",
4135
4153
  children: /* @__PURE__ */ n.jsxs(
@@ -4137,7 +4155,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4137
4155
  {
4138
4156
  className: "w-launcher-container",
4139
4157
  onClick: () => {
4140
- d || (a(!0), g()), o(!0);
4158
+ l || (a(!0), g()), o(!0);
4141
4159
  },
4142
4160
  children: [
4143
4161
  /* @__PURE__ */ n.jsx(P, { type: "chat-bubble" }),
@@ -4159,20 +4177,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4159
4177
  )
4160
4178
  }
4161
4179
  );
4162
- }, _o = R(po), ko = () => {
4163
- const e = k("NotConnected", "Not Connected"), t = k(
4180
+ }, ko = R(_o), po = () => {
4181
+ const e = p("NotConnected", "Not Connected"), t = p(
4164
4182
  "CannotAutoReconnect",
4165
4183
  "Cannot auto reconnect"
4166
- ), s = k(
4184
+ ), r = p(
4167
4185
  "ReconnectManually",
4168
4186
  "Reconnect Manually"
4169
- ), [r, l] = D(!1), { connected: c, createSocket: o } = fe(), { widgetProps: d } = J();
4187
+ ), [s, d] = D(!1), { connected: c, createSocket: o } = fe(), { widgetProps: l } = K();
4170
4188
  return X(() => {
4171
- l(!c);
4189
+ d(!c);
4172
4190
  }, [c]), /* @__PURE__ */ n.jsx(
4173
4191
  Et,
4174
4192
  {
4175
- title: `${d == null ? void 0 : d.title} ${e}`,
4193
+ title: `${l == null ? void 0 : l.title} ${e}`,
4176
4194
  subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4177
4195
  /* @__PURE__ */ n.jsxs(V.Text, { children: [
4178
4196
  t,
@@ -4186,56 +4204,56 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4186
4204
  onClick: () => {
4187
4205
  o();
4188
4206
  },
4189
- children: s
4207
+ children: r
4190
4208
  }
4191
4209
  )
4192
4210
  ] }),
4193
- onClose: () => l(!1),
4194
- open: !c && r
4211
+ onClose: () => d(!1),
4212
+ open: !c && s
4195
4213
  }
4196
4214
  );
4197
4215
  }, Ao = R(
4198
- ko
4216
+ po
4199
4217
  ), So = () => {
4200
- const { xs: e } = Ce.useBreakpoint(), [t, s] = D(!1), { isOpenWidget: r, widgetProps: l } = J(), { isActiveTabVA: c } = be(), o = Y(null), d = O(() => {
4218
+ const { xs: e } = Ce.useBreakpoint(), [t, r] = D(!1), { isOpenWidget: s, widgetProps: d } = K(), { isActiveTabVA: c } = be(), o = Y(null), l = O(() => {
4201
4219
  var f;
4202
4220
  const u = [un];
4203
- return e && (l != null && l.isSF ? u == null || u.push(`${un}-sf-mobile`) : u == null || u.push(`${un}-mobile`)), (f = u == null ? void 0 : u.filter(Boolean)) == null ? void 0 : f.join(" ");
4204
- }, [e, l == null ? void 0 : l.isSF]), a = Gt(
4221
+ return e && (d != null && d.isSF ? u == null || u.push(`${un}-sf-mobile`) : u == null || u.push(`${un}-mobile`)), (f = u == null ? void 0 : u.filter(Boolean)) == null ? void 0 : f.join(" ");
4222
+ }, [e, d == null ? void 0 : d.isSF]), a = Gt(
4205
4223
  (u) => {
4206
4224
  var x;
4207
4225
  const f = [u, xn == null ? void 0 : xn.FADE_IN];
4208
- return l != null && l.isSF && (f == null || f.push(`${u}-sf`)), e && (l != null && l.isSF ? f == null || f.push(`${u}-sf-mobile`) : f == null || f.push(`${u}-mobile`)), (x = f == null ? void 0 : f.filter(Boolean)) == null ? void 0 : x.join(" ");
4226
+ return d != null && d.isSF && (f == null || f.push(`${u}-sf`)), e && (d != null && d.isSF ? f == null || f.push(`${u}-sf-mobile`) : f == null || f.push(`${u}-mobile`)), (x = f == null ? void 0 : f.filter(Boolean)) == null ? void 0 : x.join(" ");
4209
4227
  },
4210
- [l == null ? void 0 : l.isSF, e]
4228
+ [d == null ? void 0 : d.isSF, e]
4211
4229
  );
4212
4230
  return X(() => {
4213
- r && s(r), clearTimeout(o.current), o.current = setTimeout(() => {
4214
- r || s(r);
4231
+ s && r(s), clearTimeout(o.current), o.current = setTimeout(() => {
4232
+ s || r(s);
4215
4233
  }, 250);
4216
- }, [r]), t ? /* @__PURE__ */ n.jsxs("div", { className: d, children: [
4234
+ }, [s]), t ? /* @__PURE__ */ n.jsxs("div", { className: l, children: [
4217
4235
  /* @__PURE__ */ n.jsxs("div", { style: { display: c ? "block" : "none" }, children: [
4218
- /* @__PURE__ */ n.jsx("div", { className: a(vs), children: /* @__PURE__ */ n.jsx(pr, {}) }),
4219
- /* @__PURE__ */ n.jsx(kr, {})
4236
+ /* @__PURE__ */ n.jsx("div", { className: a(vs), children: /* @__PURE__ */ n.jsx(_r, {}) }),
4237
+ /* @__PURE__ */ n.jsx(pr, {})
4220
4238
  ] }),
4221
4239
  /* @__PURE__ */ n.jsx("div", { style: { display: c ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className: a(hs), children: /* @__PURE__ */ n.jsx(Nr, { children: /* @__PURE__ */ n.jsx(Rr, { children: /* @__PURE__ */ n.jsx(jo, {}) }) }) }) }),
4222
4240
  /* @__PURE__ */ n.jsx(Ao, {})
4223
- ] }) : /* @__PURE__ */ n.jsx(_o, {});
4224
- }, Lo = R(So), Ro = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Re != null && Re.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...s }) => /* @__PURE__ */ bn(
4241
+ ] }) : /* @__PURE__ */ n.jsx(ko, {});
4242
+ }, Lo = R(So), Ro = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Re != null && Re.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...r }) => /* @__PURE__ */ bn(
4225
4243
  cn.TabPane,
4226
4244
  {
4227
- ...s,
4228
- key: s == null ? void 0 : s.key,
4229
- tab: s == null ? void 0 : s.label
4245
+ ...r,
4246
+ key: r == null ? void 0 : r.key,
4247
+ tab: r == null ? void 0 : r.label
4230
4248
  }
4231
4249
  )) }), Oo = R(Ro), Do = () => {
4232
- const { isOpenWidget: e } = J(), { setActiveTab: t, activeTab: s } = be(), r = k(
4250
+ const { isOpenWidget: e } = K(), { setActiveTab: t, activeTab: r } = be(), s = p(
4233
4251
  "VirtualAssistant",
4234
4252
  "Virtual Assistant"
4235
- ), l = k("Helpdesk", "Helpdesk"), { xs: c } = Ce.useBreakpoint();
4253
+ ), d = p("Helpdesk", "Helpdesk"), { xs: c } = Ce.useBreakpoint();
4236
4254
  return X(() => {
4237
4255
  const o = st();
4238
- t((o == null ? void 0 : o.activeTab) ?? s);
4256
+ t((o == null ? void 0 : o.activeTab) ?? r);
4239
4257
  }, []), e ? /* @__PURE__ */ n.jsx(
4240
4258
  "div",
4241
4259
  {
@@ -4248,7 +4266,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4248
4266
  children: /* @__PURE__ */ n.jsx(
4249
4267
  Oo,
4250
4268
  {
4251
- activeKey: s,
4269
+ activeKey: r,
4252
4270
  onChange: (o) => {
4253
4271
  t(o), Pe({
4254
4272
  activeTab: o
@@ -4256,11 +4274,11 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4256
4274
  },
4257
4275
  items: [
4258
4276
  {
4259
- label: r,
4277
+ label: s,
4260
4278
  key: "va"
4261
4279
  },
4262
4280
  {
4263
- label: l,
4281
+ label: d,
4264
4282
  key: "helpdesk"
4265
4283
  }
4266
4284
  ]
@@ -4269,7 +4287,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4269
4287
  }
4270
4288
  ) : null;
4271
4289
  }, No = R(Do), Mo = () => {
4272
- const { isOpenWidget: e, setOpenWidget: t, setExpand: s, isExpand: r, widgetProps: l } = J(), { xs: c } = Ce.useBreakpoint();
4290
+ const { isOpenWidget: e, setOpenWidget: t, setExpand: r, isExpand: s, widgetProps: d } = K(), { xs: c } = Ce.useBreakpoint();
4273
4291
  return e ? /* @__PURE__ */ n.jsxs(
4274
4292
  "div",
4275
4293
  {
@@ -4281,8 +4299,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4281
4299
  },
4282
4300
  children: [
4283
4301
  /* @__PURE__ */ n.jsxs("div", { className: `${He}-text`, children: [
4284
- /* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children: l == null ? void 0 : l.title }),
4285
- /* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children: l == null ? void 0 : l.subTitle })
4302
+ /* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children: d == null ? void 0 : d.title }),
4303
+ /* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children: d == null ? void 0 : d.subTitle })
4286
4304
  ] }),
4287
4305
  /* @__PURE__ */ n.jsxs("div", { className: `${He}-action`, children: [
4288
4306
  !c && /* @__PURE__ */ n.jsx(
@@ -4290,11 +4308,11 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4290
4308
  {
4291
4309
  type: "expand",
4292
4310
  style: {
4293
- transform: r ? "rotate(180deg)" : "rotate(0deg)",
4311
+ transform: s ? "rotate(180deg)" : "rotate(0deg)",
4294
4312
  transition: "all 300ms"
4295
4313
  },
4296
4314
  onClick: () => {
4297
- s((o) => !o);
4315
+ r((o) => !o);
4298
4316
  }
4299
4317
  }
4300
4318
  ),
@@ -4312,22 +4330,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4312
4330
  }
4313
4331
  ) : null;
4314
4332
  }, Fo = R(Mo), Ho = () => {
4315
- const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: s, setOpenWidget: r } = J(), { xs: l } = Ce.useBreakpoint(), c = O(() => {
4316
- var d;
4333
+ const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: r, setOpenWidget: s } = K(), { xs: d } = Ce.useBreakpoint(), c = O(() => {
4334
+ var l;
4317
4335
  const o = [
4318
- l && t && "w-container-widget-mobile",
4319
- s && (t ? "w-show-animate" : "w-close-animate"),
4336
+ d && t && "w-container-widget-mobile",
4337
+ r && (t ? "w-show-animate" : "w-close-animate"),
4320
4338
  "w-container-widget",
4321
4339
  e && "w-container-widget-expand"
4322
4340
  ];
4323
- return (d = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : d.join(" ");
4324
- }, [e, l, s, t]);
4341
+ return (l = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : l.join(" ");
4342
+ }, [e, d, r, t]);
4325
4343
  return /* @__PURE__ */ n.jsxs(
4326
4344
  "div",
4327
4345
  {
4328
4346
  className: c,
4329
4347
  onKeyDown: (o) => {
4330
- (o == null ? void 0 : o.code) === "Escape" && !(o != null && o.shiftKey) && !(o != null && o.altKey) && !(o != null && o.ctrlKey) && (o == null ? void 0 : o.key) === "Escape" && r(!1);
4348
+ (o == null ? void 0 : o.code) === "Escape" && !(o != null && o.shiftKey) && !(o != null && o.altKey) && !(o != null && o.ctrlKey) && (o == null ? void 0 : o.key) === "Escape" && s(!1);
4331
4349
  },
4332
4350
  tabIndex: 0,
4333
4351
  children: [
@@ -4342,24 +4360,24 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4342
4360
  }, Io = R(Ho), Zo = ({
4343
4361
  getStartedPayload: e,
4344
4362
  socketURL: t,
4345
- socketPath: s,
4346
- onPayslipFn: r,
4347
- title: l,
4363
+ socketPath: r,
4364
+ onPayslipFn: s,
4365
+ title: d,
4348
4366
  subTitle: c,
4349
4367
  keyEncrypt: o,
4350
- history: d,
4368
+ history: l,
4351
4369
  isSF: a = !1
4352
4370
  }) => /* @__PURE__ */ n.jsx(
4353
4371
  As,
4354
4372
  {
4355
4373
  getStartedPayload: e,
4356
4374
  socketURL: t,
4357
- socketPath: s,
4358
- onPayslipFn: r,
4359
- title: l,
4375
+ socketPath: r,
4376
+ onPayslipFn: s,
4377
+ title: d,
4360
4378
  subTitle: c,
4361
4379
  keyEncrypt: o,
4362
- history: d,
4380
+ history: l,
4363
4381
  isSF: a,
4364
4382
  children: /* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(Io, {}) })
4365
4383
  }