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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/widget-chatbot.es.js +1290 -1218
  2. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import mn, { version as Bt, createContext as Te, useContext as ye, useState as D, useRef as z, useMemo as R, useEffect as Z, memo as O, Children as Ut, isValidElement as Wt, cloneElement as Vt, Fragment as gn, createElement as bn, useCallback as Gt } from "react";
2
- import Re from "axios";
3
- import le from "dayjs";
4
- import { version as zt, Modal as Bn, Typography as Y, Button as G, Form as oe, notification as Ce, Radio as Yt, Divider as Kt, Input as Be, Image as qt, Skeleton as de, Avatar as Qn, Upload as Zn, Tooltip as Se, Tag as Jt, Badge as Qt, Grid as ge, Empty as Xn, Popover as vn, Mentions as Un, Select as Wn, DatePicker as Zt, Result as Xt, Tabs as cn } from "antd";
5
- import { io as Pt } from "socket.io-client";
6
- import es from "react-markdown";
7
- import ns from "remark-gfm";
8
- import { Prism as ts } from "react-syntax-highlighter";
9
- import ss from "@ant-design/icons";
10
- import { Pie as rs } from "@ant-design/charts";
1
+ import mn, { version as Bt, createContext as Te, useContext as ye, useState as D, useRef as Y, useMemo as O, useEffect as X, memo as R, Children as Ut, isValidElement as Wt, cloneElement as Vt, Fragment as gn, createElement as bn, useCallback as Gt } from "react";
2
+ import Oe from "axios";
3
+ import ae from "dayjs";
4
+ import { version as zt, Modal as Bn, Typography as V, Button as z, Form as oe, notification as ie, Radio as Yt, Divider as Kt, Input as Be, Image as qt, Skeleton as ue, Avatar as Qn, Upload as Zn, Spin as Jt, Tooltip as Se, Tag as Qt, Badge as Zt, Grid as Ce, Empty as Xn, Popover as vn, Mentions as Un, Select as Wn, DatePicker as Xt, Result as Pt, Tabs as cn } from "antd";
5
+ import { io as es } from "socket.io-client";
6
+ import ns from "react-markdown";
7
+ import ts from "remark-gfm";
8
+ import { Prism as ss } from "react-syntax-highlighter";
9
+ import rs from "@ant-design/icons";
10
+ import { Pie as os } from "@ant-design/charts";
11
11
  import pe from "crypto-js";
12
- import { Picker as os } from "emoji-mart";
12
+ import { Picker as cs } from "emoji-mart";
13
13
  var Je = { exports: {} }, _e = {};
14
14
  /*
15
15
  object-assign
@@ -26,19 +26,19 @@ function Pn() {
26
26
  throw new TypeError("Object.assign cannot be called with null or undefined");
27
27
  return Object(c);
28
28
  }
29
- function i() {
29
+ function l() {
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 = {}, a = 0; a < 10; a++)
37
- o["_" + String.fromCharCode(a)] = a;
38
- var d = Object.getOwnPropertyNames(o).map(function(f) {
36
+ for (var o = {}, d = 0; d < 10; d++)
37
+ o["_" + String.fromCharCode(d)] = d;
38
+ var a = Object.getOwnPropertyNames(o).map(function(f) {
39
39
  return o[f];
40
40
  });
41
- if (d.join("") !== "0123456789")
41
+ if (a.join("") !== "0123456789")
42
42
  return !1;
43
43
  var u = {};
44
44
  return "abcdefghijklmnopqrst".split("").forEach(function(f) {
@@ -48,18 +48,18 @@ function Pn() {
48
48
  return !1;
49
49
  }
50
50
  }
51
- return ln = i() ? Object.assign : function(c, o) {
52
- for (var a, d = r(c), u, f = 1; f < arguments.length; f++) {
53
- a = Object(arguments[f]);
54
- for (var x in a)
55
- t.call(a, x) && (d[x] = a[x]);
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]);
56
56
  if (e) {
57
- u = e(a);
57
+ u = e(d);
58
58
  for (var g = 0; g < u.length; g++)
59
- s.call(a, u[g]) && (d[u[g]] = a[u[g]]);
59
+ s.call(d, u[g]) && (a[u[g]] = d[u[g]]);
60
60
  }
61
61
  }
62
- return d;
62
+ return a;
63
63
  }, ln;
64
64
  }
65
65
  /** @license React v17.0.2
@@ -71,7 +71,7 @@ function Pn() {
71
71
  * LICENSE file in the root directory of this source tree.
72
72
  */
73
73
  var Gn;
74
- function cs() {
74
+ function is() {
75
75
  if (Gn) return _e;
76
76
  Gn = 1, Pn();
77
77
  var e = mn, t = 60103;
@@ -79,13 +79,13 @@ function cs() {
79
79
  var s = Symbol.for;
80
80
  t = s("react.element"), _e.Fragment = s("react.fragment");
81
81
  }
82
- var r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, c = { key: !0, ref: !0, __self: !0, __source: !0 };
83
- function o(a, d, u) {
84
- var f, x = {}, g = null, b = null;
85
- u !== void 0 && (g = "" + u), d.key !== void 0 && (g = "" + d.key), d.ref !== void 0 && (b = d.ref);
86
- for (f in d) i.call(d, f) && !c.hasOwnProperty(f) && (x[f] = d[f]);
87
- if (a && a.defaultProps) for (f in d = a.defaultProps, d) x[f] === void 0 && (x[f] = d[f]);
88
- return { $$typeof: t, type: a, key: g, ref: b, props: x, _owner: r.current };
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) {
84
+ var f, x = {}, g = null, C = null;
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 };
89
89
  }
90
90
  return _e.jsx = o, _e.jsxs = o, _e;
91
91
  }
@@ -99,63 +99,63 @@ var an = {};
99
99
  * LICENSE file in the root directory of this source tree.
100
100
  */
101
101
  var zn;
102
- function is() {
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, i = 60106;
105
+ var t = mn, s = Pn(), r = 60103, l = 60106;
106
106
  e.Fragment = 60107;
107
- var c = 60108, o = 60114, a = 60109, d = 60110, u = 60112, f = 60113, x = 60120, g = 60115, b = 60116, y = 60121, w = 60122, A = 60117, p = 60129, E = 60131;
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;
108
108
  if (typeof Symbol == "function" && Symbol.for) {
109
- var h = Symbol.for;
110
- r = h("react.element"), i = h("react.portal"), e.Fragment = h("react.fragment"), c = h("react.strict_mode"), o = h("react.profiler"), a = h("react.provider"), d = h("react.context"), u = h("react.forward_ref"), f = h("react.suspense"), x = h("react.suspense_list"), g = h("react.memo"), b = h("react.lazy"), y = h("react.block"), w = h("react.server.block"), A = h("react.fundamental"), h("react.scope"), h("react.opaque.id"), p = h("react.debug_trace_mode"), h("react.offscreen"), E = h("react.legacy_hidden");
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");
111
111
  }
112
- var m = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
113
- function C(l) {
114
- if (l === null || typeof l != "object")
112
+ var b = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
113
+ function m(i) {
114
+ if (i === null || typeof i != "object")
115
115
  return null;
116
- var T = m && l[m] || l[v];
116
+ var T = b && i[b] || i[h];
117
117
  return typeof T == "function" ? T : null;
118
118
  }
119
119
  var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
120
- function S(l) {
120
+ function S(i) {
121
121
  {
122
- for (var T = arguments.length, k = new Array(T > 1 ? T - 1 : 0), N = 1; N < T; N++)
123
- k[N - 1] = arguments[N];
124
- I("error", l, k);
122
+ for (var T = arguments.length, A = new Array(T > 1 ? T - 1 : 0), N = 1; N < T; N++)
123
+ A[N - 1] = arguments[N];
124
+ I("error", i, A);
125
125
  }
126
126
  }
127
- function I(l, T, k) {
127
+ function I(i, T, A) {
128
128
  {
129
- var N = j.ReactDebugCurrentFrame, J = N.getStackAddendum();
130
- J !== "" && (T += "%s", k = k.concat([J]));
131
- var K = k.map(function(W) {
129
+ var N = j.ReactDebugCurrentFrame, Q = N.getStackAddendum();
130
+ Q !== "" && (T += "%s", A = A.concat([Q]));
131
+ var q = A.map(function(W) {
132
132
  return "" + W;
133
133
  });
134
- K.unshift("Warning: " + T), Function.prototype.apply.call(console[l], console, K);
134
+ q.unshift("Warning: " + T), Function.prototype.apply.call(console[i], console, q);
135
135
  }
136
136
  }
137
137
  var B = !1;
138
- function M(l) {
139
- return !!(typeof l == "string" || typeof l == "function" || l === e.Fragment || l === o || l === p || l === c || l === f || l === x || l === E || B || typeof l == "object" && l !== null && (l.$$typeof === b || l.$$typeof === g || l.$$typeof === a || l.$$typeof === d || l.$$typeof === u || l.$$typeof === A || l.$$typeof === y || l[0] === w));
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));
140
140
  }
141
- function L(l, T, k) {
141
+ function L(i, T, A) {
142
142
  var N = T.displayName || T.name || "";
143
- return l.displayName || (N !== "" ? k + "(" + N + ")" : k);
143
+ return i.displayName || (N !== "" ? A + "(" + N + ")" : A);
144
144
  }
145
- function F(l) {
146
- return l.displayName || "Context";
145
+ function F(i) {
146
+ return i.displayName || "Context";
147
147
  }
148
- function $(l) {
149
- if (l == null)
148
+ function $(i) {
149
+ if (i == null)
150
150
  return null;
151
- if (typeof l.tag == "number" && S("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof l == "function")
152
- return l.displayName || l.name || null;
153
- if (typeof l == "string")
154
- return l;
155
- switch (l) {
151
+ if (typeof i.tag == "number" && S("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof i == "function")
152
+ return i.displayName || i.name || null;
153
+ if (typeof i == "string")
154
+ return i;
155
+ switch (i) {
156
156
  case e.Fragment:
157
157
  return "Fragment";
158
- case i:
158
+ case l:
159
159
  return "Portal";
160
160
  case o:
161
161
  return "Profiler";
@@ -166,24 +166,24 @@ function is() {
166
166
  case x:
167
167
  return "SuspenseList";
168
168
  }
169
- if (typeof l == "object")
170
- switch (l.$$typeof) {
171
- case d:
172
- var T = l;
173
- return F(T) + ".Consumer";
169
+ if (typeof i == "object")
170
+ switch (i.$$typeof) {
174
171
  case a:
175
- var k = l;
176
- return F(k._context) + ".Provider";
172
+ var T = i;
173
+ return F(T) + ".Consumer";
174
+ case d:
175
+ var A = i;
176
+ return F(A._context) + ".Provider";
177
177
  case u:
178
- return L(l, l.render, "ForwardRef");
178
+ return L(i, i.render, "ForwardRef");
179
179
  case g:
180
- return $(l.type);
180
+ return $(i.type);
181
181
  case y:
182
- return $(l._render);
183
- case b: {
184
- var N = l, J = N._payload, K = N._init;
182
+ return $(i._render);
183
+ case C: {
184
+ var N = i, Q = N._payload, q = N._init;
185
185
  try {
186
- return $(K(J));
186
+ return $(q(Q));
187
187
  } catch {
188
188
  return null;
189
189
  }
@@ -191,28 +191,28 @@ function is() {
191
191
  }
192
192
  return null;
193
193
  }
194
- var H = 0, V, Q, X, se, ee, ae, ce;
194
+ var H = 0, G, Z, K, 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
- V = console.log, Q = console.info, X = console.warn, se = console.error, ee = console.group, ae = console.groupCollapsed, ce = console.groupEnd;
202
- var l = {
201
+ G = console.log, Z = console.info, K = console.warn, te = console.error, ee = console.group, de = console.groupCollapsed, ce = console.groupEnd;
202
+ var i = {
203
203
  configurable: !0,
204
204
  enumerable: !0,
205
205
  value: Ne,
206
206
  writable: !0
207
207
  };
208
208
  Object.defineProperties(console, {
209
- info: l,
210
- log: l,
211
- warn: l,
212
- error: l,
213
- group: l,
214
- groupCollapsed: l,
215
- groupEnd: l
209
+ info: i,
210
+ log: i,
211
+ warn: i,
212
+ error: i,
213
+ group: i,
214
+ groupCollapsed: i,
215
+ groupEnd: i
216
216
  });
217
217
  }
218
218
  H++;
@@ -221,31 +221,31 @@ function is() {
221
221
  function Ge() {
222
222
  {
223
223
  if (H--, H === 0) {
224
- var l = {
224
+ var i = {
225
225
  configurable: !0,
226
226
  enumerable: !0,
227
227
  writable: !0
228
228
  };
229
229
  Object.defineProperties(console, {
230
- log: s({}, l, {
231
- value: V
230
+ log: s({}, i, {
231
+ value: G
232
232
  }),
233
- info: s({}, l, {
234
- value: Q
233
+ info: s({}, i, {
234
+ value: Z
235
235
  }),
236
- warn: s({}, l, {
237
- value: X
236
+ warn: s({}, i, {
237
+ value: K
238
238
  }),
239
- error: s({}, l, {
240
- value: se
239
+ error: s({}, i, {
240
+ value: te
241
241
  }),
242
- group: s({}, l, {
242
+ group: s({}, i, {
243
243
  value: ee
244
244
  }),
245
- groupCollapsed: s({}, l, {
246
- value: ae
245
+ groupCollapsed: s({}, i, {
246
+ value: de
247
247
  }),
248
- groupEnd: s({}, l, {
248
+ groupEnd: s({}, i, {
249
249
  value: ce
250
250
  })
251
251
  });
@@ -254,17 +254,17 @@ function is() {
254
254
  }
255
255
  }
256
256
  var Me = j.ReactCurrentDispatcher, Fe;
257
- function ze(l, T, k) {
257
+ function ze(i, T, A) {
258
258
  {
259
259
  if (Fe === void 0)
260
260
  try {
261
261
  throw Error();
262
- } catch (J) {
263
- var N = J.stack.trim().match(/\n( *(at )?)/);
262
+ } catch (Q) {
263
+ var N = Q.stack.trim().match(/\n( *(at )?)/);
264
264
  Fe = N && N[1] || "";
265
265
  }
266
266
  return `
267
- ` + Fe + l;
267
+ ` + Fe + i;
268
268
  }
269
269
  }
270
270
  var nn = !1, Ye;
@@ -272,20 +272,20 @@ function is() {
272
272
  var Tt = typeof WeakMap == "function" ? WeakMap : Map;
273
273
  Ye = new Tt();
274
274
  }
275
- function _n(l, T) {
276
- if (!l || nn)
275
+ function _n(i, T) {
276
+ if (!i || nn)
277
277
  return "";
278
278
  {
279
- var k = Ye.get(l);
280
- if (k !== void 0)
281
- return k;
279
+ var A = Ye.get(i);
280
+ if (A !== void 0)
281
+ return A;
282
282
  }
283
283
  var N;
284
284
  nn = !0;
285
- var J = Error.prepareStackTrace;
285
+ var Q = Error.prepareStackTrace;
286
286
  Error.prepareStackTrace = void 0;
287
- var K;
288
- K = Me.current, Me.current = null, Ve();
287
+ var q;
288
+ q = Me.current, Me.current = null, Ve();
289
289
  try {
290
290
  if (T) {
291
291
  var W = function() {
@@ -298,83 +298,83 @@ function is() {
298
298
  }), typeof Reflect == "object" && Reflect.construct) {
299
299
  try {
300
300
  Reflect.construct(W, []);
301
- } catch (xe) {
302
- N = xe;
301
+ } catch (ge) {
302
+ N = ge;
303
303
  }
304
- Reflect.construct(l, [], W);
304
+ Reflect.construct(i, [], W);
305
305
  } else {
306
306
  try {
307
307
  W.call();
308
- } catch (xe) {
309
- N = xe;
308
+ } catch (ge) {
309
+ N = ge;
310
310
  }
311
- l.call(W.prototype);
311
+ i.call(W.prototype);
312
312
  }
313
313
  } else {
314
314
  try {
315
315
  throw Error();
316
- } catch (xe) {
317
- N = xe;
316
+ } catch (ge) {
317
+ N = ge;
318
318
  }
319
- l();
319
+ i();
320
320
  }
321
- } catch (xe) {
322
- if (xe && N && typeof xe.stack == "string") {
323
- for (var U = xe.stack.split(`
321
+ } catch (ge) {
322
+ if (ge && N && typeof ge.stack == "string") {
323
+ for (var U = ge.stack.split(`
324
324
  `), re = N.stack.split(`
325
- `), ne = U.length - 1, te = re.length - 1; ne >= 1 && te >= 0 && U[ne] !== re[te]; )
326
- te--;
327
- for (; ne >= 1 && te >= 0; ne--, te--)
328
- if (U[ne] !== re[te]) {
329
- if (ne !== 1 || te !== 1)
325
+ `), ne = U.length - 1, se = re.length - 1; ne >= 1 && se >= 0 && U[ne] !== re[se]; )
326
+ se--;
327
+ for (; ne >= 1 && se >= 0; ne--, se--)
328
+ if (U[ne] !== re[se]) {
329
+ if (ne !== 1 || se !== 1)
330
330
  do
331
- if (ne--, te--, te < 0 || U[ne] !== re[te]) {
332
- var fe = `
331
+ if (ne--, se--, se < 0 || U[ne] !== re[se]) {
332
+ var xe = `
333
333
  ` + U[ne].replace(" at new ", " at ");
334
- return typeof l == "function" && Ye.set(l, fe), fe;
334
+ return typeof i == "function" && Ye.set(i, xe), xe;
335
335
  }
336
- while (ne >= 1 && te >= 0);
336
+ while (ne >= 1 && se >= 0);
337
337
  break;
338
338
  }
339
339
  }
340
340
  } finally {
341
- nn = !1, Me.current = K, Ge(), Error.prepareStackTrace = J;
341
+ nn = !1, Me.current = q, Ge(), Error.prepareStackTrace = Q;
342
342
  }
343
- var we = l ? l.displayName || l.name : "", $n = we ? ze(we) : "";
344
- return typeof l == "function" && Ye.set(l, $n), $n;
343
+ var we = i ? i.displayName || i.name : "", $n = we ? ze(we) : "";
344
+ return typeof i == "function" && Ye.set(i, $n), $n;
345
345
  }
346
- function kn(l, T, k) {
347
- return _n(l, !1);
346
+ function kn(i, T, A) {
347
+ return _n(i, !1);
348
348
  }
349
- function yt(l) {
350
- var T = l.prototype;
349
+ function yt(i) {
350
+ var T = i.prototype;
351
351
  return !!(T && T.isReactComponent);
352
352
  }
353
- function Ke(l, T, k) {
354
- if (l == null)
353
+ function Ke(i, T, A) {
354
+ if (i == null)
355
355
  return "";
356
- if (typeof l == "function")
357
- return _n(l, yt(l));
358
- if (typeof l == "string")
359
- return ze(l);
360
- switch (l) {
356
+ if (typeof i == "function")
357
+ return _n(i, yt(i));
358
+ if (typeof i == "string")
359
+ return ze(i);
360
+ switch (i) {
361
361
  case f:
362
362
  return ze("Suspense");
363
363
  case x:
364
364
  return ze("SuspenseList");
365
365
  }
366
- if (typeof l == "object")
367
- switch (l.$$typeof) {
366
+ if (typeof i == "object")
367
+ switch (i.$$typeof) {
368
368
  case u:
369
- return kn(l.render);
369
+ return kn(i.render);
370
370
  case g:
371
- return Ke(l.type, T, k);
371
+ return Ke(i.type, T, A);
372
372
  case y:
373
- return kn(l._render);
374
- case b: {
375
- var N = l, J = N._payload, K = N._init;
373
+ return kn(i._render);
374
+ case C: {
375
+ var N = i, Q = N._payload, q = N._init;
376
376
  try {
377
- return Ke(K(J), T, k);
377
+ return Ke(q(Q), T, A);
378
378
  } catch {
379
379
  }
380
380
  }
@@ -382,29 +382,29 @@ function is() {
382
382
  return "";
383
383
  }
384
384
  var An = {}, Sn = j.ReactDebugCurrentFrame;
385
- function qe(l) {
386
- if (l) {
387
- var T = l._owner, k = Ke(l.type, l._source, T ? T.type : null);
388
- Sn.setExtraStackFrame(k);
385
+ function qe(i) {
386
+ if (i) {
387
+ var T = i._owner, A = Ke(i.type, i._source, T ? T.type : null);
388
+ Sn.setExtraStackFrame(A);
389
389
  } else
390
390
  Sn.setExtraStackFrame(null);
391
391
  }
392
- function jt(l, T, k, N, J) {
392
+ function jt(i, T, A, N, Q) {
393
393
  {
394
- var K = Function.call.bind(Object.prototype.hasOwnProperty);
395
- for (var W in l)
396
- if (K(l, W)) {
394
+ var q = Function.call.bind(Object.prototype.hasOwnProperty);
395
+ for (var W in i)
396
+ if (q(i, W)) {
397
397
  var U = void 0;
398
398
  try {
399
- if (typeof l[W] != "function") {
400
- var re = Error((N || "React class") + ": " + k + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[W] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
399
+ if (typeof i[W] != "function") {
400
+ var re = Error((N || "React class") + ": " + A + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[W] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
401
401
  throw re.name = "Invariant Violation", re;
402
402
  }
403
- U = l[W](T, W, N, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
403
+ U = i[W](T, W, N, A, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
404
404
  } catch (ne) {
405
405
  U = ne;
406
406
  }
407
- U && !(U instanceof Error) && (qe(J), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", k, W, typeof U), qe(null)), U instanceof Error && !(U.message in An) && (An[U.message] = !0, qe(J), S("Failed %s type: %s", k, U.message), qe(null));
407
+ U && !(U instanceof Error) && (qe(Q), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", A, W, typeof U), qe(null)), U instanceof Error && !(U.message in An) && (An[U.message] = !0, qe(Q), S("Failed %s type: %s", A, U.message), qe(null));
408
408
  }
409
409
  }
410
410
  }
@@ -413,59 +413,59 @@ function is() {
413
413
  ref: !0,
414
414
  __self: !0,
415
415
  __source: !0
416
- }, On, Rn;
417
- function pt(l) {
418
- if (tn.call(l, "ref")) {
419
- var T = Object.getOwnPropertyDescriptor(l, "ref").get;
416
+ }, Rn, On;
417
+ function pt(i) {
418
+ if (tn.call(i, "ref")) {
419
+ var T = Object.getOwnPropertyDescriptor(i, "ref").get;
420
420
  if (T && T.isReactWarning)
421
421
  return !1;
422
422
  }
423
- return l.ref !== void 0;
423
+ return i.ref !== void 0;
424
424
  }
425
- function _t(l) {
426
- if (tn.call(l, "key")) {
427
- var T = Object.getOwnPropertyDescriptor(l, "key").get;
425
+ function _t(i) {
426
+ if (tn.call(i, "key")) {
427
+ var T = Object.getOwnPropertyDescriptor(i, "key").get;
428
428
  if (T && T.isReactWarning)
429
429
  return !1;
430
430
  }
431
- return l.key !== void 0;
431
+ return i.key !== void 0;
432
432
  }
433
- function kt(l, T) {
434
- typeof l.ref == "string" && Ln.current;
433
+ function kt(i, T) {
434
+ typeof i.ref == "string" && Ln.current;
435
435
  }
436
- function At(l, T) {
436
+ function At(i, T) {
437
437
  {
438
- var k = function() {
439
- On || (On = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
438
+ var A = function() {
439
+ Rn || (Rn = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
440
440
  };
441
- k.isReactWarning = !0, Object.defineProperty(l, "key", {
442
- get: k,
441
+ A.isReactWarning = !0, Object.defineProperty(i, "key", {
442
+ get: A,
443
443
  configurable: !0
444
444
  });
445
445
  }
446
446
  }
447
- function St(l, T) {
447
+ function St(i, T) {
448
448
  {
449
- var k = function() {
450
- Rn || (Rn = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
449
+ var A = function() {
450
+ On || (On = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
451
451
  };
452
- k.isReactWarning = !0, Object.defineProperty(l, "ref", {
453
- get: k,
452
+ A.isReactWarning = !0, Object.defineProperty(i, "ref", {
453
+ get: A,
454
454
  configurable: !0
455
455
  });
456
456
  }
457
457
  }
458
- var Lt = function(l, T, k, N, J, K, W) {
458
+ var Lt = function(i, T, A, N, Q, q, W) {
459
459
  var U = {
460
460
  // This tag allows us to uniquely identify this as a React Element
461
461
  $$typeof: r,
462
462
  // Built-in properties that belong on the element
463
- type: l,
463
+ type: i,
464
464
  key: T,
465
- ref: k,
465
+ ref: A,
466
466
  props: W,
467
467
  // Record the component responsible for creating this element.
468
- _owner: K
468
+ _owner: q
469
469
  };
470
470
  return U._store = {}, Object.defineProperty(U._store, "validated", {
471
471
  configurable: !1,
@@ -481,172 +481,172 @@ function is() {
481
481
  configurable: !1,
482
482
  enumerable: !1,
483
483
  writable: !1,
484
- value: J
484
+ value: Q
485
485
  }), Object.freeze && (Object.freeze(U.props), Object.freeze(U)), U;
486
486
  };
487
- function Ot(l, T, k, N, J) {
487
+ function Rt(i, T, A, N, Q) {
488
488
  {
489
- var K, W = {}, U = null, re = null;
490
- k !== void 0 && (U = "" + k), _t(T) && (U = "" + T.key), pt(T) && (re = T.ref, kt(T, J));
491
- for (K in T)
492
- tn.call(T, K) && !wt.hasOwnProperty(K) && (W[K] = T[K]);
493
- if (l && l.defaultProps) {
494
- var ne = l.defaultProps;
495
- for (K in ne)
496
- W[K] === void 0 && (W[K] = ne[K]);
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]);
493
+ if (i && i.defaultProps) {
494
+ var ne = i.defaultProps;
495
+ for (q in ne)
496
+ W[q] === void 0 && (W[q] = ne[q]);
497
497
  }
498
498
  if (U || re) {
499
- var te = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
500
- U && At(W, te), re && St(W, te);
499
+ var se = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
500
+ U && At(W, se), re && St(W, se);
501
501
  }
502
- return Lt(l, U, re, J, N, Ln.current, W);
502
+ return Lt(i, U, re, Q, N, Ln.current, W);
503
503
  }
504
504
  }
505
505
  var sn = j.ReactCurrentOwner, Dn = j.ReactDebugCurrentFrame;
506
- function je(l) {
507
- if (l) {
508
- var T = l._owner, k = Ke(l.type, l._source, T ? T.type : null);
509
- Dn.setExtraStackFrame(k);
506
+ function je(i) {
507
+ if (i) {
508
+ var T = i._owner, A = Ke(i.type, i._source, T ? T.type : null);
509
+ Dn.setExtraStackFrame(A);
510
510
  } else
511
511
  Dn.setExtraStackFrame(null);
512
512
  }
513
513
  var rn;
514
514
  rn = !1;
515
- function on(l) {
516
- return typeof l == "object" && l !== null && l.$$typeof === r;
515
+ function on(i) {
516
+ return typeof i == "object" && i !== null && i.$$typeof === r;
517
517
  }
518
518
  function Nn() {
519
519
  {
520
520
  if (sn.current) {
521
- var l = $(sn.current.type);
522
- if (l)
521
+ var i = $(sn.current.type);
522
+ if (i)
523
523
  return `
524
524
 
525
- Check the render method of \`` + l + "`.";
525
+ Check the render method of \`` + i + "`.";
526
526
  }
527
527
  return "";
528
528
  }
529
529
  }
530
- function Rt(l) {
530
+ function Ot(i) {
531
531
  return "";
532
532
  }
533
533
  var Mn = {};
534
- function Dt(l) {
534
+ function Dt(i) {
535
535
  {
536
536
  var T = Nn();
537
537
  if (!T) {
538
- var k = typeof l == "string" ? l : l.displayName || l.name;
539
- k && (T = `
538
+ var A = typeof i == "string" ? i : i.displayName || i.name;
539
+ A && (T = `
540
540
 
541
- Check the top-level render call using <` + k + ">.");
541
+ Check the top-level render call using <` + A + ">.");
542
542
  }
543
543
  return T;
544
544
  }
545
545
  }
546
- function Fn(l, T) {
546
+ function Fn(i, T) {
547
547
  {
548
- if (!l._store || l._store.validated || l.key != null)
548
+ if (!i._store || i._store.validated || i.key != null)
549
549
  return;
550
- l._store.validated = !0;
551
- var k = Dt(T);
552
- if (Mn[k])
550
+ i._store.validated = !0;
551
+ var A = Dt(T);
552
+ if (Mn[A])
553
553
  return;
554
- Mn[k] = !0;
554
+ Mn[A] = !0;
555
555
  var N = "";
556
- l && l._owner && l._owner !== sn.current && (N = " It was passed a child from " + $(l._owner.type) + "."), je(l), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', k, N), je(null);
556
+ i && i._owner && i._owner !== sn.current && (N = " It was passed a child from " + $(i._owner.type) + "."), je(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', A, N), je(null);
557
557
  }
558
558
  }
559
- function Hn(l, T) {
559
+ function Hn(i, T) {
560
560
  {
561
- if (typeof l != "object")
561
+ if (typeof i != "object")
562
562
  return;
563
- if (Array.isArray(l))
564
- for (var k = 0; k < l.length; k++) {
565
- var N = l[k];
563
+ if (Array.isArray(i))
564
+ for (var A = 0; A < i.length; A++) {
565
+ var N = i[A];
566
566
  on(N) && Fn(N, T);
567
567
  }
568
- else if (on(l))
569
- l._store && (l._store.validated = !0);
570
- else if (l) {
571
- var J = C(l);
572
- if (typeof J == "function" && J !== l.entries)
573
- for (var K = J.call(l), W; !(W = K.next()).done; )
568
+ else if (on(i))
569
+ i._store && (i._store.validated = !0);
570
+ else if (i) {
571
+ var Q = m(i);
572
+ if (typeof Q == "function" && Q !== i.entries)
573
+ for (var q = Q.call(i), W; !(W = q.next()).done; )
574
574
  on(W.value) && Fn(W.value, T);
575
575
  }
576
576
  }
577
577
  }
578
- function Nt(l) {
578
+ function Nt(i) {
579
579
  {
580
- var T = l.type;
580
+ var T = i.type;
581
581
  if (T == null || typeof T == "string")
582
582
  return;
583
- var k;
583
+ var A;
584
584
  if (typeof T == "function")
585
- k = T.propTypes;
585
+ A = T.propTypes;
586
586
  else if (typeof T == "object" && (T.$$typeof === u || // Note: Memo only checks outer props here.
587
587
  // Inner props are checked in the reconciler.
588
588
  T.$$typeof === g))
589
- k = T.propTypes;
589
+ A = T.propTypes;
590
590
  else
591
591
  return;
592
- if (k) {
592
+ if (A) {
593
593
  var N = $(T);
594
- jt(k, l.props, "prop", N, l);
594
+ jt(A, i.props, "prop", N, i);
595
595
  } else if (T.PropTypes !== void 0 && !rn) {
596
596
  rn = !0;
597
- var J = $(T);
598
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", J || "Unknown");
597
+ var Q = $(T);
598
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Q || "Unknown");
599
599
  }
600
600
  typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
601
601
  }
602
602
  }
603
- function Mt(l) {
603
+ function Mt(i) {
604
604
  {
605
- for (var T = Object.keys(l.props), k = 0; k < T.length; k++) {
606
- var N = T[k];
605
+ for (var T = Object.keys(i.props), A = 0; A < T.length; A++) {
606
+ var N = T[A];
607
607
  if (N !== "children" && N !== "key") {
608
- je(l), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), je(null);
608
+ je(i), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), je(null);
609
609
  break;
610
610
  }
611
611
  }
612
- l.ref !== null && (je(l), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
612
+ i.ref !== null && (je(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
613
613
  }
614
614
  }
615
- function In(l, T, k, N, J, K) {
615
+ function In(i, T, A, N, Q, q) {
616
616
  {
617
- var W = M(l);
617
+ var W = M(i);
618
618
  if (!W) {
619
619
  var U = "";
620
- (l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (U += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
621
- var re = Rt();
620
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (U += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
621
+ var re = Ot();
622
622
  re ? U += re : U += Nn();
623
623
  var ne;
624
- l === null ? ne = "null" : Array.isArray(l) ? ne = "array" : l !== void 0 && l.$$typeof === r ? (ne = "<" + ($(l.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof l, 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 === 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);
625
625
  }
626
- var te = Ot(l, T, k, J, K);
627
- if (te == null)
628
- return te;
626
+ var se = Rt(i, T, A, Q, q);
627
+ if (se == null)
628
+ return se;
629
629
  if (W) {
630
- var fe = T.children;
631
- if (fe !== void 0)
630
+ var xe = T.children;
631
+ if (xe !== void 0)
632
632
  if (N)
633
- if (Array.isArray(fe)) {
634
- for (var we = 0; we < fe.length; we++)
635
- Hn(fe[we], l);
636
- Object.freeze && Object.freeze(fe);
633
+ if (Array.isArray(xe)) {
634
+ for (var we = 0; we < xe.length; we++)
635
+ Hn(xe[we], i);
636
+ Object.freeze && Object.freeze(xe);
637
637
  } else
638
638
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
639
639
  else
640
- Hn(fe, l);
640
+ Hn(xe, i);
641
641
  }
642
- return l === e.Fragment ? Mt(te) : Nt(te), te;
642
+ return i === e.Fragment ? Mt(se) : Nt(se), se;
643
643
  }
644
644
  }
645
- function Ft(l, T, k) {
646
- return In(l, T, k, !0);
645
+ function Ft(i, T, A) {
646
+ return In(i, T, A, !0);
647
647
  }
648
- function Ht(l, T, k) {
649
- return In(l, T, k, !1);
648
+ function Ht(i, T, A) {
649
+ return In(i, T, A, !1);
650
650
  }
651
651
  var It = Ht, $t = Ft;
652
652
  e.jsx = It, e.jsxs = $t;
@@ -654,11 +654,11 @@ Check the top-level render call using <` + k + ">.");
654
654
  }(an)), an;
655
655
  }
656
656
  var Yn;
657
- function ls() {
658
- return Yn || (Yn = 1, process.env.NODE_ENV === "production" ? Je.exports = cs() : Je.exports = is()), Je.exports;
657
+ function as() {
658
+ return Yn || (Yn = 1, process.env.NODE_ENV === "production" ? Je.exports = is() : Je.exports = ls()), Je.exports;
659
659
  }
660
- var n = ls();
661
- const as = "2.0.0-alpha.11", et = "chat_session", ds = "user_uttered", us = "bot_uttered", fs = "ehelp_bot_uttered", xs = "https://sfchatbot.dataon.com", gs = [
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 = [
662
662
  {
663
663
  label: "Didn’t address my question",
664
664
  value: "Didn’t address my question"
@@ -679,7 +679,7 @@ const as = "2.0.0-alpha.11", et = "chat_session", ds = "user_uttered", us = "bot
679
679
  label: "I’d like to explain further",
680
680
  value: "another"
681
681
  }
682
- ], Le = zt, Oe = Bt, Cs = as, ms = "https://sfchatbot.dataon.com/openai-service-dev/", Ze = "https://res.cloudinary.com/dcvolkyfb/image/upload/v1740135794/svg/bot_profile_hlnyop.png", hn = "YYYY-MM-DD", Xe = "HH:mm", Kn = "N/A", dn = [
682
+ ], Le = zt, Re = Bt, ms = ds, bs = "https://sfchatbot.dataon.com/openai-service-dev/", Ze = "https://res.cloudinary.com/dcvolkyfb/image/upload/v1740135794/svg/bot_profile_hlnyop.png", hn = "YYYY-MM-DD", Xe = "HH:mm", Kn = "N/A", dn = [
683
683
  // Raster (bitmap)
684
684
  ".jpg",
685
685
  ".jpeg",
@@ -701,35 +701,35 @@ const as = "2.0.0-alpha.11", et = "chat_session", ds = "user_uttered", us = "bot
701
701
  ".orf",
702
702
  ".psd",
703
703
  ".xcf"
704
- ], un = "w-widget-content-container", fn = "w-ticket-detail-content-container", bs = "w-wrapper-body", vs = "w-wrapper-body-helpdesk", He = "w-header", xn = {
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
- }, hs = "https://placehold.co/600x400?text=No+Image", Ie = 3, Es = "GoHRDev2025WorkPlazeDataOnDotCom", ke = "(Helpdesk Widget Chatbot)", Ts = (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", ke = "(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;
710
710
  } catch {
711
- return nt(xs);
711
+ return nt(gs);
712
712
  }
713
- }, ie = (e, t) => {
714
- var s, r, i;
715
- return ((s = Object.keys(e || {})) == null ? void 0 : s.length) > 0 ? (i = (r = Object == null ? void 0 : Object.prototype) == null ? void 0 : r.hasOwnProperty) == null ? void 0 : i.call(e, t) : !1;
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;
716
716
  }, Ae = (e) => {
717
717
  var s;
718
718
  const t = e == null ? void 0 : e.attachment;
719
719
  return {
720
720
  text: ((s = Object.keys(e || {})) == null ? void 0 : s.length) > 0 && (e == null ? void 0 : e.type) === "text",
721
- upload: ie(e, "attachment") && ie(t, "type") && (t == null ? void 0 : t.type) === "fileuploader",
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
- filedownload: ie(t, "type") && (t == null ? void 0 : t.type) === "filedownloader",
724
- chart: (t == null ? void 0 : t.type) === "charts" && ie(t, "chartType")
723
+ filedownload: le(t, "type") && (t == null ? void 0 : t.type) === "filedownloader",
724
+ chart: (t == null ? void 0 : t.type) === "charts" && le(t, "chartType")
725
725
  };
726
726
  }, tt = (e) => {
727
- var t, s, r, i;
727
+ var t, s, r, l;
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, "/"), a = decodeURIComponent(
730
- (i = (r = (s = window == null ? void 0 : window.atob(o)) == null ? void 0 : s.split("")) == null ? void 0 : r.map((d) => "%" + ("00" + d.charCodeAt(0).toString(16)).slice(-2))) == null ? void 0 : i.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, "/"), 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("")
731
731
  );
732
- return JSON == null ? void 0 : JSON.parse(a || "{}");
732
+ return JSON == null ? void 0 : JSON.parse(d || "{}");
733
733
  }
734
734
  return {};
735
735
  }, En = ({
@@ -737,10 +737,10 @@ const as = "2.0.0-alpha.11", et = "chat_session", ds = "user_uttered", us = "bot
737
737
  fileName: t = "",
738
738
  isOpenNewTab: s = !1
739
739
  }) => {
740
- var i;
740
+ var l;
741
741
  const r = document == null ? void 0 : document.createElement("a");
742
- r.href = e, r.download = t || e, s && (r.target = "_blank"), (i = document == null ? void 0 : document.body) == null || i.appendChild(r), r.click(), document.body.removeChild(r);
743
- }, ys = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
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);
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 = ({
@@ -750,49 +750,49 @@ const as = "2.0.0-alpha.11", et = "chat_session", ds = "user_uttered", us = "bot
750
750
  }) => (e == null ? void 0 : e.length) > 0 ? [
751
751
  ...new Map(
752
752
  e.map((r) => {
753
- var i;
753
+ var l;
754
754
  return [
755
- s ? (i = String(r[t])) == null ? void 0 : i.toLowerCase() : r[t],
755
+ s ? (l = String(r[t])) == null ? void 0 : l.toLowerCase() : r[t],
756
756
  r
757
757
  ];
758
758
  })
759
759
  ).values()
760
- ] : [], js = (e = []) => {
760
+ ] : [], ws = (e = []) => {
761
761
  const t = {}, s = [], r = [];
762
762
  e == null || e.forEach((c) => {
763
763
  var o;
764
- ie(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((a) => {
765
- r == null || r.push(a);
764
+ le(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((d) => {
765
+ r == null || r.push(d);
766
766
  }) : r == null || r.push(c);
767
767
  }), r == null || r.forEach((c, o) => {
768
- var d, u, f;
769
- const a = c == null ? void 0 : c.generated_id;
770
- a ? (t[a] || (t[a] = []), (u = t[a]) == null || u.push({
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({
771
771
  ...c,
772
772
  indexChat: o,
773
773
  ...!(c != null && c.timestamp) && {
774
- timestamp: (d = le()) == null ? void 0 : d.format("hh:mm A")
774
+ timestamp: (a = ae()) == null ? void 0 : a.format("hh:mm A")
775
775
  }
776
776
  }), s == null || s.push({
777
- keyItem: a ?? o,
777
+ keyItem: d ?? o,
778
778
  type: "text",
779
779
  sender: "response",
780
- ...a && {
781
- generated_id: a
780
+ ...d && {
781
+ generated_id: d
782
782
  },
783
- chats: t == null ? void 0 : t[a]
783
+ chats: t == null ? void 0 : t[d]
784
784
  })) : s == null || s.push({
785
785
  ...c,
786
786
  keyItem: o,
787
787
  ...!(c != null && c.timestamp) && {
788
- timestamp: (f = le()) == null ? void 0 : f.format("hh:mm A")
788
+ timestamp: (f = ae()) == null ? void 0 : f.format("hh:mm A")
789
789
  }
790
790
  });
791
791
  });
792
- const i = Tn({ ArrObj: s, key: "keyItem" });
793
- return i == null || i.forEach((c) => {
792
+ const l = Tn({ ArrObj: s, key: "keyItem" });
793
+ return l == null || l.forEach((c) => {
794
794
  c == null || delete c.keyItem;
795
- }), i;
795
+ }), l;
796
796
  }, Pe = (e = {}) => {
797
797
  const s = {
798
798
  ...st(),
@@ -802,7 +802,7 @@ const as = "2.0.0-alpha.11", et = "chat_session", ds = "user_uttered", us = "bot
802
802
  }, st = () => {
803
803
  const e = localStorage == null ? void 0 : localStorage.getItem(et);
804
804
  return JSON.parse(e || "{}");
805
- }, ws = (e = "") => {
805
+ }, ps = (e = "") => {
806
806
  var t;
807
807
  try {
808
808
  const s = new URL(e);
@@ -820,162 +820,162 @@ const me = (e = ".w-wrapper-body") => {
820
820
  behavior: "smooth"
821
821
  });
822
822
  }, 0);
823
- }, ps = (e) => {
823
+ }, _s = (e) => {
824
824
  const t = new Uint8Array(e);
825
825
  let s = "";
826
826
  for (let r = 0; r < t.byteLength; r++)
827
827
  s += String.fromCharCode(t[r]);
828
828
  return btoa(s);
829
- }, _s = async (e, t) => {
830
- var d;
831
- const s = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, r = new TextEncoder(), i = r == null ? void 0 : r.encode(s), c = r == null ? void 0 : r.encode(t);
829
+ }, ks = async (e, t) => {
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);
832
832
  if (c.length !== 32)
833
833
  throw new Error("Key length must be 32 bytes for AES-256");
834
- const o = await ((d = crypto == null ? void 0 : crypto.subtle) == null ? void 0 : d.importKey(
834
+ const o = await ((a = crypto == null ? void 0 : crypto.subtle) == null ? void 0 : a.importKey(
835
835
  "raw",
836
836
  c,
837
837
  { name: "AES-CBC" },
838
838
  !1,
839
839
  ["encrypt"]
840
- )), a = await crypto.subtle.encrypt(
840
+ )), d = await crypto.subtle.encrypt(
841
841
  { name: "AES-CBC", iv: new Uint8Array(16) },
842
842
  o,
843
- i
843
+ l
844
844
  );
845
- return ps(a);
845
+ return _s(d);
846
846
  }, Qe = (e) => {
847
- const t = {}, s = rt(e), r = s == null ? void 0 : s.map((i) => {
847
+ const t = {}, s = rt(e), r = s == null ? void 0 : s.map((l) => {
848
848
  var o;
849
- const c = i == null ? void 0 : i.CREATED_DATE;
849
+ const c = l == null ? void 0 : l.CREATED_DATE;
850
850
  return {
851
- ...i,
852
- DATE_KEY: (o = le(c)) == null ? void 0 : o.format("YYYY-MM-DD")
851
+ ...l,
852
+ DATE_KEY: (o = ae(c)) == null ? void 0 : o.format("YYYY-MM-DD")
853
853
  };
854
854
  });
855
- return r == null || r.forEach((i) => {
855
+ return r == null || r.forEach((l) => {
856
856
  var c;
857
- t[i == null ? void 0 : i.DATE_KEY] || (t[i == null ? void 0 : i.DATE_KEY] = []), (c = t[i == null ? void 0 : i.DATE_KEY]) == null || c.push(i);
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);
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) => le(t == null ? void 0 : t.CREATED_DATE) - le(s == null ? void 0 : s.CREATED_DATE)), ot = (e) => {
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) => {
863
863
  if (e && typeof e == "string") {
864
864
  const t = e == null ? void 0 : e.split("."), s = t[(t == null ? void 0 : t.length) - 1];
865
865
  return e == null ? void 0 : e.replaceAll(`.${s}`, `_avatar.${s}`);
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({}), q = () => ye(ct), ks = ({
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 = ({
869
869
  children: e,
870
870
  getStartedPayload: t,
871
871
  socketURL: s,
872
872
  socketPath: r,
873
- onPayslipFn: i,
873
+ onPayslipFn: l,
874
874
  title: c,
875
875
  subTitle: o,
876
- keyEncrypt: a,
877
- history: d,
876
+ keyEncrypt: d,
877
+ history: a,
878
878
  isSF: u
879
879
  }) => {
880
- const [f, x] = D(!1), [g, b] = D("va"), [y, w] = D(!1), [A, p] = D({}), [E, h] = D(!1), [m, v] = D(!1), C = z(!1), j = R(() => ({
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(() => ({
881
881
  getStartedPayload: t,
882
882
  socketURL: s,
883
883
  socketPath: r,
884
- onPayslipFn: i,
884
+ onPayslipFn: l,
885
885
  title: c,
886
886
  subTitle: o,
887
- keyEncrypt: a,
887
+ keyEncrypt: d,
888
888
  isSF: u
889
889
  }), [
890
890
  t,
891
891
  s,
892
892
  r,
893
- i,
893
+ l,
894
894
  c,
895
895
  o,
896
- a,
896
+ d,
897
897
  u
898
- ]), S = R(() => tt(A == null ? void 0 : A.access_token), [A == null ? void 0 : A.access_token]);
899
- return Z(() => {
900
- p(Ts(t));
901
- }, [t]), Z(() => {
898
+ ]), S = O(() => tt(_ == null ? void 0 : _.access_token), [_ == null ? void 0 : _.access_token]);
899
+ return X(() => {
900
+ p(ys(t));
901
+ }, [t]), X(() => {
902
902
  Pe({
903
- chatbot_version: Cs
903
+ chatbot_version: ms
904
904
  });
905
905
  }, []), /* @__PURE__ */ n.jsx(
906
906
  ct.Provider,
907
907
  {
908
908
  value: {
909
- objInitPayload: A,
909
+ objInitPayload: _,
910
910
  setOpenWidget: x,
911
911
  isOpenWidget: f,
912
912
  activeTab: g,
913
- setActiveTab: b,
913
+ setActiveTab: C,
914
914
  isExpand: y,
915
915
  setExpand: w,
916
916
  setObjInitPayload: p,
917
917
  parsedJWT: S,
918
918
  widgetProps: j,
919
- isFirstOpenWidget: E,
920
- setFirstOpenWidget: h,
921
- isFirstRenderHelpdesk: C,
922
- history: d,
923
- showReadyWSHD: m,
924
- setShowReadyWSHD: v
919
+ isFirstOpenWidget: v,
920
+ setFirstOpenWidget: E,
921
+ isFirstRenderHelpdesk: m,
922
+ history: a,
923
+ showReadyWSHD: b,
924
+ setShowReadyWSHD: h
925
925
  },
926
926
  children: e
927
927
  }
928
928
  );
929
- }, it = Te({}), As = () => ye(it), Ss = ({ children: e }) => {
930
- const { objInitPayload: t } = q(), [s, r] = D({}), i = () => {
929
+ }, it = Te({}), Ss = () => ye(it), Ls = ({ children: e }) => {
930
+ const { objInitPayload: t } = J(), [s, r] = D({}), l = () => {
931
931
  var o;
932
- (o = Re(
933
- `${(t == null ? void 0 : t.uriService) || ms}optional/translations`
934
- )) == null || o.then(({ data: a }) => {
935
- var d;
936
- if (a) {
937
- const u = Object.keys((d = Object.values(a)) == null ? void 0 : d[0]), f = {};
932
+ (o = Oe(
933
+ `${(t == null ? void 0 : t.uriService) || bs}optional/translations`
934
+ )) == null || o.then(({ data: d }) => {
935
+ var a;
936
+ if (d) {
937
+ const u = Object.keys((a = Object.values(d)) == null ? void 0 : a[0]), f = {};
938
938
  u == null || u.forEach((x) => {
939
939
  var g;
940
- (g = Object.keys(a)) == null || g.forEach((b) => {
940
+ (g = Object.keys(d)) == null || g.forEach((C) => {
941
941
  var y;
942
- f[x == null ? void 0 : x.toLowerCase()] = (y = a == null ? void 0 : a[b]) == null ? void 0 : y[x];
942
+ f[x == null ? void 0 : x.toLowerCase()] = (y = d == null ? void 0 : d[C]) == null ? void 0 : y[x];
943
943
  });
944
944
  }), r(f);
945
945
  }
946
946
  });
947
947
  }, c = () => {
948
948
  const o = window.indexedDB.open("language");
949
- o.onsuccess = (a) => {
949
+ o.onsuccess = (d) => {
950
950
  var u;
951
- const d = a.target.result;
951
+ const a = d.target.result;
952
952
  try {
953
- const x = d.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), g = x == null ? void 0 : x.get((u = t == null ? void 0 : t.lang) == null ? void 0 : u.toLowerCase());
953
+ 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
954
  g.onsuccess = () => {
955
955
  r(g == null ? void 0 : g.result);
956
956
  }, g.onerror = () => {
957
- i();
957
+ l();
958
958
  };
959
959
  } catch {
960
- i();
960
+ l();
961
961
  }
962
962
  }, o.onerror = () => {
963
- i();
963
+ l();
964
964
  };
965
965
  };
966
- return Z(() => {
966
+ return X(() => {
967
967
  c();
968
968
  }, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(it.Provider, { value: { langDatas: s }, children: e });
969
- }, lt = Te({}), ue = () => ye(lt), Ls = ({ children: e }) => {
969
+ }, lt = Te({}), fe = () => ye(lt), Rs = ({ children: e }) => {
970
970
  var M;
971
- const [t, s] = D([]), [r, i] = D(!1), [c, o] = D(!1), [a, d] = D({}), [u, f] = D(!1), [x, g] = D(!1), {
972
- objInitPayload: b,
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
+ objInitPayload: C,
973
973
  widgetProps: y,
974
974
  setOpenWidget: w,
975
- setFirstOpenWidget: A,
975
+ setFirstOpenWidget: _,
976
976
  isFirstRenderHelpdesk: p
977
- } = q(), E = z(null), h = z(""), m = z(""), v = (L) => {
978
- const F = ie(L, "text_feedback_link") && ie(L, "text");
977
+ } = J(), v = Y(null), E = Y(""), b = Y(""), h = (L) => {
978
+ const F = le(L, "text_feedback_link") && le(L, "text");
979
979
  s(($) => {
980
980
  const H = [
981
981
  ...$,
@@ -987,37 +987,37 @@ const me = (e = ".w-wrapper-body") => {
987
987
  sender: "response"
988
988
  }
989
989
  ];
990
- return js(H);
991
- }), i(!1), o(!1), me();
992
- }, C = () => {
990
+ return ws(H);
991
+ }), l(!1), o(!1), me();
992
+ }, m = () => {
993
993
  var L, F, $, H;
994
- (L = E == null ? void 0 : E.current) == null || L.emit("session_request", { session_id: null }), (F = E == null ? void 0 : E.current) == null || F.on("session_confirm", (V) => {
995
- h.current = V, Pe({
996
- session_id: V == null ? void 0 : V.session_id
994
+ (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) => {
995
+ E.current = G, Pe({
996
+ session_id: G == null ? void 0 : G.session_id
997
997
  });
998
- }), ($ = E == null ? void 0 : E.current) == null || $.on(us, v), (H = E == null ? void 0 : E.current) == null || H.on(fs, (V) => {
999
- const Q = JSON.parse(V || "{}");
1000
- ie(Q, "iswidget") && g(Q == null ? void 0 : Q.iswidget);
1001
- }), u || f(!0), A(!1);
998
+ }), ($ = v == null ? void 0 : v.current) == null || $.on(fs, h), (H = v == null ? void 0 : v.current) == null || H.on(xs, (G) => {
999
+ const Z = JSON.parse(G || "{}");
1000
+ le(Z, "iswidget") && g(Z == null ? void 0 : Z.iswidget);
1001
+ }), u || f(!0), _(!1);
1002
1002
  }, j = ({
1003
1003
  msg: L,
1004
1004
  additionalConfig: F = {},
1005
1005
  isShowLoadingResponse: $ = !0
1006
1006
  }) => {
1007
1007
  var H;
1008
- (H = E == null ? void 0 : E.current) == null || H.emit(ds, {
1008
+ (H = v == null ? void 0 : v.current) == null || H.emit(us, {
1009
1009
  customData: {
1010
- language: b == null ? void 0 : b.lang
1010
+ language: C == null ? void 0 : C.lang
1011
1011
  },
1012
1012
  message: L,
1013
- session_id: h == null ? void 0 : h.current,
1013
+ session_id: E == null ? void 0 : E.current,
1014
1014
  ...F
1015
- }), $ ? i(!0) : o(!0);
1015
+ }), $ ? l(!0) : o(!0);
1016
1016
  }, S = () => {
1017
1017
  var F, $;
1018
- E.current && ((F = E == null ? void 0 : E.current) == null || F.off(), ($ = E == null ? void 0 : E.current) == null || $.disconnect(), E.current = null), p.current = !1;
1019
- const L = Pt(
1020
- `${ws(y == null ? void 0 : y.socketURL)}://${nt(
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
+ const L = es(
1020
+ `${ps(y == null ? void 0 : y.socketURL)}://${nt(
1021
1021
  y == null ? void 0 : y.socketURL
1022
1022
  )}`,
1023
1023
  {
@@ -1027,7 +1027,7 @@ const me = (e = ".w-wrapper-body") => {
1027
1027
  reconnectionAttempts: 1
1028
1028
  }
1029
1029
  );
1030
- L.on("connect", C), L.on("connect_error", (H) => {
1030
+ L.on("connect", m), L.on("connect_error", (H) => {
1031
1031
  console.error("connect_error widget-chatbot : ", {
1032
1032
  err: H,
1033
1033
  socketURL: y == null ? void 0 : y.socketURL,
@@ -1038,18 +1038,18 @@ const me = (e = ".w-wrapper-body") => {
1038
1038
  socketURL: y == null ? void 0 : y.socketURL,
1039
1039
  socketPath: y == null ? void 0 : y.widgetProps
1040
1040
  }), f(!1);
1041
- }), E.current = L;
1041
+ }), v.current = L;
1042
1042
  }, I = () => {
1043
1043
  var L;
1044
- (!((L = E == null ? void 0 : E.current) != null && L.connected) || !u) && (S(), w(!1));
1044
+ (!((L = v == null ? void 0 : v.current) != null && L.connected) || !u) && (S(), w(!1));
1045
1045
  }, B = () => {
1046
1046
  f(!1);
1047
1047
  };
1048
- return Z(() => (w(!1), S(), window.addEventListener("online", I), window.addEventListener("offline", B), () => {
1048
+ return X(() => (w(!1), S(), window.addEventListener("online", I), window.addEventListener("offline", B), () => {
1049
1049
  var L, F;
1050
- E.current && ((L = E.current) == null || L.off("connect", C), (F = E.current) == null || F.disconnect(), E.current = null), window.removeEventListener("online", I), window.removeEventListener("offline", B);
1050
+ v.current && ((L = v.current) == null || L.off("connect", m), (F = v.current) == null || F.disconnect(), v.current = null), window.removeEventListener("online", I), window.removeEventListener("offline", B);
1051
1051
  }), [
1052
- JSON.stringify(b || {}),
1052
+ JSON.stringify(C || {}),
1053
1053
  y == null ? void 0 : y.socketURL,
1054
1054
  y == null ? void 0 : y.socketPath
1055
1055
  ]), /* @__PURE__ */ n.jsx(
@@ -1060,15 +1060,15 @@ const me = (e = ".w-wrapper-body") => {
1060
1060
  chats: t,
1061
1061
  onSendMsg: j,
1062
1062
  isWaitResponse: r,
1063
- socket: E == null ? void 0 : E.current,
1064
- sessionId: (M = h == null ? void 0 : h.current) == null ? void 0 : M.session_id,
1063
+ socket: v == null ? void 0 : v.current,
1064
+ sessionId: (M = E == null ? void 0 : E.current) == null ? void 0 : M.session_id,
1065
1065
  loadingRegenerate: c,
1066
- file: a,
1067
- setFile: d,
1066
+ file: d,
1067
+ setFile: a,
1068
1068
  connected: u,
1069
1069
  isHandshakeWidget: x,
1070
1070
  createSocket: S,
1071
- currRegenerateId: m
1071
+ currRegenerateId: b
1072
1072
  },
1073
1073
  children: e
1074
1074
  }
@@ -1354,13 +1354,13 @@ const me = (e = ".w-wrapper-body") => {
1354
1354
  boxShadow: "inset 5px 0 0 #f7d87c",
1355
1355
  zIndex: "0"
1356
1356
  }
1357
- }, Rs = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), _ = (e = "", t) => {
1357
+ }, Ds = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), k = (e = "", t) => {
1358
1358
  var o;
1359
- const { langDatas: s } = As(), r = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), i = Rs(String(e)), c = (s == null ? void 0 : s[i == null ? void 0 : i.toUpperCase()]) || t;
1360
- return ((o = Object.keys(s || {})) == null ? void 0 : o.length) > 0 ? r ? `WPUI_${i}` : c : t;
1361
- }, Ds = ({ isFeedback: e = !1, open: t, ...s }) => {
1362
- var i;
1363
- const r = R(() => e ? "w-modal-container-feedback" : "", [e]);
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]);
1364
1364
  return Le != null && Le.startsWith("5") ? /* @__PURE__ */ n.jsx(
1365
1365
  Bn,
1366
1366
  {
@@ -1389,12 +1389,12 @@ const me = (e = ".w-wrapper-body") => {
1389
1389
  getContainer: "#w-widget-content",
1390
1390
  width: 300,
1391
1391
  ...s,
1392
- ...Oe != null && Oe.startsWith("18") ? {
1392
+ ...Re != null && Re.startsWith("18") ? {
1393
1393
  open: t
1394
1394
  } : { visible: t },
1395
1395
  maskStyle: {
1396
1396
  backdropFilter: "blur(4x)",
1397
- ...((i = Object.keys((s == null ? void 0 : s.maskStyle) || {})) == null ? void 0 : i.length) > 0 && {
1397
+ ...((l = Object.keys((s == null ? void 0 : s.maskStyle) || {})) == null ? void 0 : l.length) > 0 && {
1398
1398
  ...s == null ? void 0 : s.maskStyle
1399
1399
  }
1400
1400
  },
@@ -1407,12 +1407,12 @@ const me = (e = ".w-wrapper-body") => {
1407
1407
  }
1408
1408
  )
1409
1409
  );
1410
- }, at = O(Ds), Jn = ({ props: e, isModal: t = !1 }) => {
1411
- const s = (r, i) => {
1410
+ }, at = R(Ns), Jn = ({ props: e, isModal: t = !1 }) => {
1411
+ const s = (r, l) => {
1412
1412
  var c;
1413
1413
  return (c = Ut) == null ? void 0 : c.map(r, (o) => {
1414
- var a, d, u;
1415
- return !Wt(o) || ((a = Object.keys((o == null ? void 0 : o.props) || {})) == null ? void 0 : a.length) === 0 ? o : Vt(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, {
1416
1416
  ...o == null ? void 0 : o.props,
1417
1417
  ...(o == null ? void 0 : o.type) === "thead" && {
1418
1418
  className: "ant-table-thead"
@@ -1427,13 +1427,13 @@ const me = (e = ".w-wrapper-body") => {
1427
1427
  }
1428
1428
  }
1429
1429
  },
1430
- ...o.type === "tr" && i === "tbody" && {
1430
+ ...o.type === "tr" && l === "tbody" && {
1431
1431
  className: "ant-table-row"
1432
1432
  },
1433
1433
  ...(o == null ? void 0 : o.type) === "tbody" && {
1434
1434
  className: "ant-table-tbody"
1435
1435
  },
1436
- children: (d = o == null ? void 0 : o.props) != null && d.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
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
1437
  });
1438
1438
  });
1439
1439
  };
@@ -1449,11 +1449,11 @@ const me = (e = ".w-wrapper-body") => {
1449
1449
  children: /* @__PURE__ */ n.jsx("table", { className: "wp-md-table", ...e, children: s(e == null ? void 0 : e.children, "") })
1450
1450
  }
1451
1451
  ) }) }) });
1452
- }, Ns = ({ children: e }) => {
1453
- const t = _(
1452
+ }, Ms = ({ children: e }) => {
1453
+ const t = k(
1454
1454
  "OpenDetailTable",
1455
1455
  "Open Detail Table"
1456
- ), s = _("TableDetail", "Tabel Detail"), [r, i] = D(!1), c = {
1456
+ ), s = k("TableDetail", "Tabel Detail"), [r, l] = D(!1), c = {
1457
1457
  table: ({ ...o }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1458
1458
  /* @__PURE__ */ n.jsx(Jn, { props: o }),
1459
1459
  /* @__PURE__ */ n.jsx(
@@ -1465,10 +1465,10 @@ const me = (e = ".w-wrapper-body") => {
1465
1465
  padding: "5px 0px 10px 0px"
1466
1466
  },
1467
1467
  children: /* @__PURE__ */ n.jsx(
1468
- G,
1468
+ z,
1469
1469
  {
1470
1470
  onClick: () => {
1471
- i(!0);
1471
+ l(!0);
1472
1472
  },
1473
1473
  children: t
1474
1474
  }
@@ -1484,28 +1484,28 @@ const me = (e = ".w-wrapper-body") => {
1484
1484
  width: 800,
1485
1485
  open: r,
1486
1486
  onCancel: () => {
1487
- i(!1);
1487
+ l(!1);
1488
1488
  },
1489
1489
  children: /* @__PURE__ */ n.jsx(Jn, { props: o, isModal: !0 })
1490
1490
  }
1491
1491
  )
1492
1492
  ] }),
1493
1493
  code: ({ ...o }) => {
1494
- const { children: a, className: d, ...u } = o, f = /language-(\w+)/.exec(d || "");
1494
+ const { children: d, className: a, ...u } = o, f = /language-(\w+)/.exec(a || "");
1495
1495
  return f ? /* @__PURE__ */ n.jsx(
1496
- ts,
1496
+ ss,
1497
1497
  {
1498
1498
  ...u,
1499
1499
  PreTag: "div",
1500
1500
  language: f[1],
1501
1501
  style: Os,
1502
- children: String(a).replace(/\n$/, "")
1502
+ children: String(d).replace(/\n$/, "")
1503
1503
  }
1504
- ) : /* @__PURE__ */ n.jsx(Y.Text, { code: !0, children: o == null ? void 0 : o.children });
1504
+ ) : /* @__PURE__ */ n.jsx(V.Text, { code: !0, children: o == null ? void 0 : o.children });
1505
1505
  }
1506
1506
  };
1507
- return /* @__PURE__ */ n.jsx(es, { remarkPlugins: [ns], components: c, children: e });
1508
- }, dt = O(Ns), Ms = () => /* @__PURE__ */ n.jsx(
1507
+ return /* @__PURE__ */ n.jsx(ns, { remarkPlugins: [ts], components: c, children: e });
1508
+ }, dt = R(Ms), Fs = () => /* @__PURE__ */ n.jsx(
1509
1509
  "svg",
1510
1510
  {
1511
1511
  width: "24",
@@ -1523,7 +1523,7 @@ const me = (e = ".w-wrapper-body") => {
1523
1523
  }
1524
1524
  )
1525
1525
  }
1526
- ), Fs = () => /* @__PURE__ */ n.jsx(
1526
+ ), Hs = () => /* @__PURE__ */ n.jsx(
1527
1527
  "svg",
1528
1528
  {
1529
1529
  width: "24",
@@ -1540,7 +1540,7 @@ const me = (e = ".w-wrapper-body") => {
1540
1540
  }
1541
1541
  )
1542
1542
  }
1543
- ), Hs = () => /* @__PURE__ */ n.jsxs(
1543
+ ), Is = () => /* @__PURE__ */ n.jsxs(
1544
1544
  "svg",
1545
1545
  {
1546
1546
  viewBox: "64 64 896 896",
@@ -1554,7 +1554,7 @@ const me = (e = ".w-wrapper-body") => {
1554
1554
  /* @__PURE__ */ n.jsx("path", { d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" })
1555
1555
  ]
1556
1556
  }
1557
- ), Is = () => /* @__PURE__ */ n.jsxs(
1557
+ ), $s = () => /* @__PURE__ */ n.jsxs(
1558
1558
  "svg",
1559
1559
  {
1560
1560
  viewBox: "-2.4 -2.4 28.80 28.80",
@@ -1581,7 +1581,7 @@ const me = (e = ".w-wrapper-body") => {
1581
1581
  ) })
1582
1582
  ]
1583
1583
  }
1584
- ), $s = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "sync", className: "anticon anticon-sync", children: /* @__PURE__ */ n.jsx(
1584
+ ), Bs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "sync", className: "anticon anticon-sync", children: /* @__PURE__ */ n.jsx(
1585
1585
  "svg",
1586
1586
  {
1587
1587
  viewBox: "64 64 896 896",
@@ -1592,7 +1592,7 @@ const me = (e = ".w-wrapper-body") => {
1592
1592
  "aria-hidden": "true",
1593
1593
  children: /* @__PURE__ */ n.jsx("path", { d: "M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z" })
1594
1594
  }
1595
- ) }), Bs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "left", className: "anticon anticon-left", children: /* @__PURE__ */ n.jsx(
1595
+ ) }), Us = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "left", className: "anticon anticon-left", children: /* @__PURE__ */ n.jsx(
1596
1596
  "svg",
1597
1597
  {
1598
1598
  viewBox: "64 64 896 896",
@@ -1603,7 +1603,7 @@ const me = (e = ".w-wrapper-body") => {
1603
1603
  "aria-hidden": "true",
1604
1604
  children: /* @__PURE__ */ n.jsx("path", { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" })
1605
1605
  }
1606
- ) }), Us = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "right", className: "anticon anticon-right", children: /* @__PURE__ */ n.jsx(
1606
+ ) }), Ws = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "right", className: "anticon anticon-right", children: /* @__PURE__ */ n.jsx(
1607
1607
  "svg",
1608
1608
  {
1609
1609
  viewBox: "64 64 896 896",
@@ -1614,7 +1614,7 @@ const me = (e = ".w-wrapper-body") => {
1614
1614
  "aria-hidden": "true",
1615
1615
  children: /* @__PURE__ */ n.jsx("path", { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" })
1616
1616
  }
1617
- ) }), Ws = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "like", className: "anticon anticon-like", children: /* @__PURE__ */ n.jsxs(
1617
+ ) }), Vs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "like", className: "anticon anticon-like", children: /* @__PURE__ */ n.jsxs(
1618
1618
  "svg",
1619
1619
  {
1620
1620
  viewBox: "64 64 896 896",
@@ -1641,7 +1641,7 @@ const me = (e = ".w-wrapper-body") => {
1641
1641
  )
1642
1642
  ]
1643
1643
  }
1644
- ) }), Vs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "dislike", className: "anticon anticon-dislike", children: /* @__PURE__ */ n.jsxs(
1644
+ ) }), Gs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "dislike", className: "anticon anticon-dislike", children: /* @__PURE__ */ n.jsxs(
1645
1645
  "svg",
1646
1646
  {
1647
1647
  viewBox: "64 64 896 896",
@@ -1668,7 +1668,7 @@ const me = (e = ".w-wrapper-body") => {
1668
1668
  )
1669
1669
  ]
1670
1670
  }
1671
- ) }), Gs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "delete", className: "anticon anticon-delete", children: /* @__PURE__ */ n.jsx(
1671
+ ) }), zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "delete", className: "anticon anticon-delete", children: /* @__PURE__ */ n.jsx(
1672
1672
  "svg",
1673
1673
  {
1674
1674
  viewBox: "64 64 896 896",
@@ -1679,7 +1679,7 @@ const me = (e = ".w-wrapper-body") => {
1679
1679
  "aria-hidden": "true",
1680
1680
  children: /* @__PURE__ */ n.jsx("path", { d: "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" })
1681
1681
  }
1682
- ) }), zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "close", className: "anticon anticon-close", children: /* @__PURE__ */ n.jsx(
1682
+ ) }), Ys = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "close", className: "anticon anticon-close", children: /* @__PURE__ */ n.jsx(
1683
1683
  "svg",
1684
1684
  {
1685
1685
  fillRule: "evenodd",
@@ -1692,7 +1692,7 @@ const me = (e = ".w-wrapper-body") => {
1692
1692
  "aria-hidden": "true",
1693
1693
  children: /* @__PURE__ */ n.jsx("path", { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" })
1694
1694
  }
1695
- ) }), Ys = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "upload", className: "anticon anticon-upload", children: /* @__PURE__ */ n.jsx(
1695
+ ) }), Ks = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "upload", className: "anticon anticon-upload", children: /* @__PURE__ */ n.jsx(
1696
1696
  "svg",
1697
1697
  {
1698
1698
  viewBox: "64 64 896 896",
@@ -1703,7 +1703,7 @@ const me = (e = ".w-wrapper-body") => {
1703
1703
  "aria-hidden": "true",
1704
1704
  children: /* @__PURE__ */ n.jsx("path", { d: "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" })
1705
1705
  }
1706
- ) }), Ks = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "filter", className: "anticon anticon-filter", children: /* @__PURE__ */ n.jsx(
1706
+ ) }), qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "filter", className: "anticon anticon-filter", children: /* @__PURE__ */ n.jsx(
1707
1707
  "svg",
1708
1708
  {
1709
1709
  viewBox: "64 64 896 896",
@@ -1714,7 +1714,7 @@ const me = (e = ".w-wrapper-body") => {
1714
1714
  "aria-hidden": "true",
1715
1715
  children: /* @__PURE__ */ n.jsx("path", { d: "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z" })
1716
1716
  }
1717
- ) }), qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "down", className: "anticon anticon-down", children: /* @__PURE__ */ n.jsx(
1717
+ ) }), Js = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "down", className: "anticon anticon-down", children: /* @__PURE__ */ n.jsx(
1718
1718
  "svg",
1719
1719
  {
1720
1720
  viewBox: "64 64 896 896",
@@ -1725,12 +1725,13 @@ const me = (e = ".w-wrapper-body") => {
1725
1725
  "aria-hidden": "true",
1726
1726
  children: /* @__PURE__ */ n.jsx("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" })
1727
1727
  }
1728
- ) }), Js = () => /* @__PURE__ */ n.jsx(
1728
+ ) }), Qs = ({ ...e }) => /* @__PURE__ */ n.jsx(
1729
1729
  "span",
1730
1730
  {
1731
1731
  role: "img",
1732
1732
  "aria-label": "paper-clip",
1733
1733
  className: "anticon anticon-paper-clip",
1734
+ ...e,
1734
1735
  children: /* @__PURE__ */ n.jsx(
1735
1736
  "svg",
1736
1737
  {
@@ -1744,7 +1745,7 @@ const me = (e = ".w-wrapper-body") => {
1744
1745
  }
1745
1746
  )
1746
1747
  }
1747
- ), Qs = () => /* @__PURE__ */ n.jsx(
1748
+ ), Zs = () => /* @__PURE__ */ n.jsx(
1748
1749
  "svg",
1749
1750
  {
1750
1751
  xmlns: "http://www.w3.org/2000/svg",
@@ -1760,7 +1761,7 @@ const me = (e = ".w-wrapper-body") => {
1760
1761
  }
1761
1762
  )
1762
1763
  }
1763
- ), Zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "smile", className: "anticon anticon-smile", children: /* @__PURE__ */ n.jsx(
1764
+ ), Xs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "smile", className: "anticon anticon-smile", children: /* @__PURE__ */ n.jsx(
1764
1765
  "svg",
1765
1766
  {
1766
1767
  viewBox: "64 64 896 896",
@@ -1771,7 +1772,7 @@ const me = (e = ".w-wrapper-body") => {
1771
1772
  "aria-hidden": "true",
1772
1773
  children: /* @__PURE__ */ n.jsx("path", { d: "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z" })
1773
1774
  }
1774
- ) }), Xs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "file", className: "anticon anticon-file", children: /* @__PURE__ */ n.jsx(
1775
+ ) }), Ps = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "file", className: "anticon anticon-file", children: /* @__PURE__ */ n.jsx(
1775
1776
  "svg",
1776
1777
  {
1777
1778
  viewBox: "64 64 896 896",
@@ -1782,7 +1783,7 @@ const me = (e = ".w-wrapper-body") => {
1782
1783
  "aria-hidden": "true",
1783
1784
  children: /* @__PURE__ */ n.jsx("path", { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" })
1784
1785
  }
1785
- ) }), Ps = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, className: "w-spin-animate", children: /* @__PURE__ */ n.jsx(
1786
+ ) }), er = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, className: "w-spin-animate", children: /* @__PURE__ */ n.jsx(
1786
1787
  "svg",
1787
1788
  {
1788
1789
  viewBox: "0 0 1024 1024",
@@ -1795,30 +1796,30 @@ const me = (e = ".w-wrapper-body") => {
1795
1796
  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" })
1796
1797
  }
1797
1798
  ) }), P = ({ type: e = "", chatProps: t, ...s }) => {
1798
- const r = R(() => ({
1799
- minimize: Ms,
1800
- expand: Fs,
1801
- send: Hs,
1802
- stop: Is,
1803
- sync: $s,
1804
- left: Bs,
1805
- right: Us,
1806
- like: () => /* @__PURE__ */ n.jsx(Ws, { ...t }),
1807
- dislike: () => /* @__PURE__ */ n.jsx(Vs, { ...t }),
1808
- delete: Gs,
1809
- close: zs,
1810
- upload: Ys,
1811
- filter: Ks,
1812
- down: qs,
1813
- "paper-clip": Js,
1814
- "chat-bubble": Qs,
1815
- smile: Zs,
1816
- file: Xs,
1817
- loading: () => /* @__PURE__ */ n.jsx(Ps, { ...s })
1799
+ const r = O(() => ({
1800
+ minimize: Fs,
1801
+ expand: Hs,
1802
+ send: Is,
1803
+ stop: $s,
1804
+ sync: Bs,
1805
+ left: Us,
1806
+ right: Ws,
1807
+ like: () => /* @__PURE__ */ n.jsx(Vs, { ...t }),
1808
+ dislike: () => /* @__PURE__ */ n.jsx(Gs, { ...t }),
1809
+ delete: zs,
1810
+ close: Ys,
1811
+ upload: Ks,
1812
+ filter: qs,
1813
+ down: Js,
1814
+ "paper-clip": () => /* @__PURE__ */ n.jsx(Qs, { ...s }),
1815
+ "chat-bubble": Zs,
1816
+ smile: Xs,
1817
+ file: Ps,
1818
+ loading: () => /* @__PURE__ */ n.jsx(er, { ...s })
1818
1819
  }), [e, t, s]);
1819
- return /* @__PURE__ */ n.jsx(ss, { component: r == null ? void 0 : r[e], ...s });
1820
- }, ut = Te({}), be = () => ye(ut), er = ({ children: e }) => {
1821
- const [t, s] = D("va"), r = R(() => t === "va", [t]);
1820
+ return /* @__PURE__ */ n.jsx(rs, { component: r == null ? void 0 : r[e], ...s });
1821
+ }, ut = Te({}), be = () => ye(ut), nr = ({ children: e }) => {
1822
+ const [t, s] = D("va"), r = O(() => t === "va", [t]);
1822
1823
  return /* @__PURE__ */ n.jsx(
1823
1824
  ut.Provider,
1824
1825
  {
@@ -1830,28 +1831,28 @@ const me = (e = ".w-wrapper-body") => {
1830
1831
  children: e
1831
1832
  }
1832
1833
  );
1833
- }, nr = ({ ...e }) => {
1834
- const t = _(
1834
+ }, tr = ({ ...e }) => {
1835
+ const t = k(
1835
1836
  "WeLoveToHearAboutYourExperienceWithTheSunfishChatbot",
1836
1837
  "We'd love to hear about your experience with the Sunfish chatbot"
1837
- ), s = _(
1838
+ ), s = k(
1838
1839
  "ShareAnyCommentsOrSuggestionsToHelpUsImprove",
1839
1840
  "Share any comments or suggestions to help us improve"
1840
- ), r = _("Submit", "Submit"), i = _(
1841
+ ), r = k("Submit", "Submit"), l = k(
1841
1842
  "ThankFeedback",
1842
1843
  "Thank You for your feedback"
1843
- ), c = _(
1844
+ ), c = k(
1844
1845
  "AdditionalFeedback",
1845
1846
  "Additional Feedback"
1846
- ), [o] = oe.useForm(), [a, d] = D(!1), [u, f] = D(""), { setChats: x } = ue(), { objInitPayload: g } = q(), { activeTab: b } = be(), y = R(() => {
1847
- var h;
1848
- const E = ie(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
1849
- return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((h = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : h.trim()) !== "" && E;
1850
- }, [e]), w = R(() => {
1851
- var h;
1852
- const E = ie(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
1853
- return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((h = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : h.trim()) !== "" && E;
1854
- }, [e]), A = R(() => {
1847
+ ), [o] = oe.useForm(), [d, a] = D(!1), [u, f] = D(""), { setChats: x } = fe(), { objInitPayload: g } = J(), { activeTab: C } = be(), y = O(() => {
1848
+ var E;
1849
+ const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
1850
+ 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;
1851
+ }, [e]), w = O(() => {
1852
+ var E;
1853
+ const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
1854
+ 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(() => {
1855
1856
  if (g != null && g.uriBackend)
1856
1857
  try {
1857
1858
  return new URL(g.uriBackend).origin;
@@ -1859,75 +1860,75 @@ const me = (e = ".w-wrapper-body") => {
1859
1860
  return "";
1860
1861
  }
1861
1862
  return "";
1862
- }, [g == null ? void 0 : g.uriBackend]), p = (E) => {
1863
+ }, [g == null ? void 0 : g.uriBackend]), p = (v) => {
1863
1864
  var M;
1864
- const h = E === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
1865
- access_token: m = "",
1866
- companycode: v = "",
1867
- companyid: C = "",
1865
+ const E = v === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
1866
+ access_token: b = "",
1867
+ companycode: h = "",
1868
+ companyid: m = "",
1868
1869
  uriBackend: j = "",
1869
1870
  uriBackendEnt: S = "",
1870
1871
  lang: I = ""
1871
1872
  } = g || {}, B = u === "another" ? o == null ? void 0 : o.getFieldValue("ADDITIONAL_FEEDBACK") : u;
1872
- (M = Re({
1873
+ (M = Oe({
1873
1874
  method: "POST",
1874
- url: h,
1875
+ url: E,
1875
1876
  data: {
1876
1877
  message_id: e == null ? void 0 : e.id,
1877
- response_type: E === "like" ? "up" : "down",
1878
- ...E === "dislike" && {
1878
+ response_type: v === "like" ? "up" : "down",
1879
+ ...v === "dislike" && {
1879
1880
  additional_feedback: B
1880
1881
  }
1881
1882
  },
1882
1883
  headers: {
1883
1884
  "Content-Type": "application/json",
1884
- Authorization: `Bearer ${m}`,
1885
- "company-code": `${v}`,
1886
- "company-id": `${C}`,
1885
+ Authorization: `Bearer ${b}`,
1886
+ "company-code": `${h}`,
1887
+ "company-id": `${m}`,
1887
1888
  uriBackend: `${j}`,
1888
1889
  uriBackendEnt: `${S}`,
1889
- "custom-origin": `${A}`,
1890
- "Acc-Name": `${v.toUpperCase()}`,
1890
+ "custom-origin": `${_}`,
1891
+ "Acc-Name": `${h.toUpperCase()}`,
1891
1892
  Language: `${I}`
1892
1893
  }
1893
1894
  })) == null || M.then((L) => {
1894
1895
  var F, $, H;
1895
- (L == null ? void 0 : L.status) === 200 && (a && d(!1), (F = Ce) == null || F.destroy(), ($ = Ce) == null || $.config({
1896
+ (L == null ? void 0 : L.status) === 200 && (d && a(!1), (F = ie) == null || F.destroy(), ($ = ie) == null || $.config({
1896
1897
  getContainer: () => document.querySelector(".w-widget-content-container"),
1897
1898
  top: 28,
1898
1899
  placement: "top",
1899
1900
  duration: 3
1900
- }), (H = Ce) == null || H.success({
1901
- message: i,
1901
+ }), (H = ie) == null || H.success({
1902
+ message: l,
1902
1903
  className: "w-notification-content"
1903
- }), x((V) => {
1904
- var Q;
1905
- return (Q = V == null ? void 0 : V.map((X) => {
1904
+ }), x((G) => {
1905
+ var Z;
1906
+ return (Z = G == null ? void 0 : G.map((K) => {
1906
1907
  var ee;
1907
- if (ie(X, "chats")) {
1908
- const ae = (ee = X == null ? void 0 : X.chats) == null ? void 0 : ee.map((ce) => (ce == null ? void 0 : ce.indexChat) === (e == null ? void 0 : e.indexChat) ? {
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) ? {
1909
1910
  ...ce,
1910
- feedback: E
1911
+ feedback: v
1911
1912
  } : ce);
1912
1913
  return {
1913
- ...X,
1914
- chats: ae
1914
+ ...K,
1915
+ chats: de
1915
1916
  };
1916
1917
  }
1917
- return (e == null ? void 0 : e.message_id) === (X == null ? void 0 : X.message_id) ? {
1918
- ...X,
1919
- feedback: E
1920
- } : X;
1921
- })) == null ? void 0 : Q.flat();
1918
+ return (e == null ? void 0 : e.message_id) === (K == null ? void 0 : K.message_id) ? {
1919
+ ...K,
1920
+ feedback: v
1921
+ } : K;
1922
+ })) == null ? void 0 : Z.flat();
1922
1923
  }));
1923
1924
  });
1924
1925
  };
1925
- return Z(() => {
1926
- var E;
1927
- (E = Ce) == null || E.destroy();
1928
- }, [b]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1926
+ return X(() => {
1927
+ var v;
1928
+ (v = ie) == null || v.destroy();
1929
+ }, [C]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1929
1930
  y && /* @__PURE__ */ n.jsx(
1930
- G,
1931
+ z,
1931
1932
  {
1932
1933
  icon: /* @__PURE__ */ n.jsx(P, { type: "like", chatProps: e }),
1933
1934
  onClick: () => {
@@ -1936,22 +1937,22 @@ const me = (e = ".w-wrapper-body") => {
1936
1937
  }
1937
1938
  ),
1938
1939
  w && /* @__PURE__ */ n.jsx(
1939
- G,
1940
+ z,
1940
1941
  {
1941
1942
  icon: /* @__PURE__ */ n.jsx(P, { type: "dislike", chatProps: e }),
1942
1943
  onClick: () => {
1943
- (e == null ? void 0 : e.feedback) !== "dislike" && d(!0);
1944
+ (e == null ? void 0 : e.feedback) !== "dislike" && a(!0);
1944
1945
  }
1945
1946
  }
1946
1947
  ),
1947
1948
  /* @__PURE__ */ n.jsxs(
1948
1949
  at,
1949
1950
  {
1950
- open: a,
1951
+ open: d,
1951
1952
  isFeedback: !0,
1952
1953
  okText: r,
1953
1954
  onCancel: () => {
1954
- d(!1);
1955
+ a(!1);
1955
1956
  },
1956
1957
  onOk: () => {
1957
1958
  p("dislike");
@@ -1966,12 +1967,12 @@ const me = (e = ".w-wrapper-body") => {
1966
1967
  Yt.Group,
1967
1968
  {
1968
1969
  className: "w-list-feedback-suggestion",
1969
- options: gs,
1970
+ options: Cs,
1970
1971
  optionType: "button",
1971
1972
  buttonStyle: "solid",
1972
- onChange: (E) => {
1973
- var h;
1974
- f((h = E == null ? void 0 : E.target) == null ? void 0 : h.value);
1973
+ onChange: (v) => {
1974
+ var E;
1975
+ f((E = v == null ? void 0 : v.target) == null ? void 0 : E.value);
1975
1976
  }
1976
1977
  }
1977
1978
  ),
@@ -1983,13 +1984,13 @@ const me = (e = ".w-wrapper-body") => {
1983
1984
  }
1984
1985
  )
1985
1986
  ] });
1986
- }, tr = O(nr), sr = ({
1987
+ }, sr = R(tr), rr = ({
1987
1988
  showFeedback: e = !0,
1988
1989
  showRegenerate: t = !0,
1989
1990
  position: s = "left",
1990
1991
  ...r
1991
1992
  }) => {
1992
- const i = ys(), { chats: c, onSendMsg: o, setChats: a, loadingRegenerate: d, currRegenerateId: u } = ue(), f = R(() => r == null ? void 0 : r.sender, [r]), x = R(() => c == null ? void 0 : c.filter((A) => (A == null ? void 0 : A.sender) === "client"), [c]), g = R(() => 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]), b = R(() => {
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(() => {
1993
1994
  switch (s) {
1994
1995
  case "left":
1995
1996
  return "flex-start";
@@ -1998,20 +1999,20 @@ const me = (e = ".w-wrapper-body") => {
1998
1999
  case "right":
1999
2000
  return "flex-end";
2000
2001
  }
2001
- }, [s]), y = R(() => e && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [r, e]), w = () => {
2002
- const A = 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];
2003
- a(
2004
- (E = []) => E == null ? void 0 : E.map((h, m) => m === (E == null ? void 0 : E.length) - 1 && (h == null ? void 0 : h.sender) === "response" ? {
2005
- ...h,
2006
- generated_id: (p == null ? void 0 : p.generated_id) ?? i
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(
2005
+ (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
+ ...E,
2007
+ generated_id: (p == null ? void 0 : p.generated_id) ?? l
2007
2008
  // adjust with response
2008
- } : h)
2009
- ), u.current = (p == null ? void 0 : p.generated_id) ?? i, o({
2010
- msg: A == null ? void 0 : A.text,
2009
+ } : E)
2010
+ ), u.current = (p == null ? void 0 : p.generated_id) ?? l, o({
2011
+ msg: _ == null ? void 0 : _.text,
2011
2012
  additionalConfig: {
2012
- generate_id: (p == null ? void 0 : p.generated_id) ?? i
2013
+ generate_id: (p == null ? void 0 : p.generated_id) ?? l
2013
2014
  },
2014
- isShowLoadingResponse: d
2015
+ isShowLoadingResponse: a
2015
2016
  }), me();
2016
2017
  };
2017
2018
  return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(
@@ -2020,35 +2021,35 @@ const me = (e = ".w-wrapper-body") => {
2020
2021
  style: {
2021
2022
  display: "flex",
2022
2023
  gap: 8,
2023
- justifyContent: b
2024
+ justifyContent: C
2024
2025
  },
2025
2026
  children: [
2026
2027
  g && /* @__PURE__ */ n.jsx(
2027
- G,
2028
+ z,
2028
2029
  {
2029
- loading: d,
2030
+ loading: a,
2030
2031
  icon: /* @__PURE__ */ n.jsx(P, { type: "sync" }),
2031
2032
  onClick: () => {
2032
2033
  w();
2033
2034
  }
2034
2035
  }
2035
2036
  ),
2036
- y && /* @__PURE__ */ n.jsx(tr, { ...r })
2037
+ y && /* @__PURE__ */ n.jsx(sr, { ...r })
2037
2038
  ]
2038
2039
  }
2039
2040
  ) });
2040
- }, Cn = O(sr), rr = ({ nameFallback: e = "", ...t }) => /* @__PURE__ */ n.jsx(
2041
+ }, Cn = R(rr), or = ({ nameFallback: e = "", ...t }) => /* @__PURE__ */ n.jsx(
2041
2042
  qt,
2042
2043
  {
2043
2044
  ...typeof (t == null ? void 0 : t.onError) != "function" && {
2044
2045
  fallback: jn(e)
2045
2046
  },
2046
- placeholder: /* @__PURE__ */ n.jsx(de.Image, { style: { width: "100%", height: "100%" } }),
2047
+ placeholder: /* @__PURE__ */ n.jsx(ue.Image, { style: { width: "100%", height: "100%" } }),
2047
2048
  loading: "lazy",
2048
2049
  ...t
2049
2050
  }
2050
- ), wn = O(rr), or = ({ nameFallback: e = "", ...t }) => {
2051
- const s = z(0);
2051
+ ), wn = R(or), cr = ({ nameFallback: e = "", ...t }) => {
2052
+ const s = Y(0);
2052
2053
  return /* @__PURE__ */ n.jsx(
2053
2054
  Qn,
2054
2055
  {
@@ -2066,35 +2067,35 @@ const me = (e = ".w-wrapper-body") => {
2066
2067
  )
2067
2068
  }
2068
2069
  );
2069
- }, Ee = O(or);
2070
+ }, Ee = R(cr);
2070
2071
  Ee.Group = Qn.Group;
2071
- const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", children: [
2072
+ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", children: [
2072
2073
  /* @__PURE__ */ n.jsx("div", {}),
2073
2074
  /* @__PURE__ */ n.jsx("div", {}),
2074
2075
  /* @__PURE__ */ n.jsx("div", {}),
2075
2076
  /* @__PURE__ */ n.jsx("div", {})
2076
- ] }), ft = O(cr), ir = () => {
2077
- const { widgetProps: e } = q();
2077
+ ] }), ft = R(ir), lr = () => {
2078
+ const { widgetProps: e } = J();
2078
2079
  return /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2079
2080
  /* @__PURE__ */ n.jsx(Ee, { src: Ze, nameFallback: e == null ? void 0 : e.title }),
2080
2081
  /* @__PURE__ */ n.jsx(ft, {})
2081
2082
  ] });
2082
- }, pn = O(ir), lr = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2083
+ }, pn = R(lr), ar = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2083
2084
  /* @__PURE__ */ n.jsx(Ee, { src: e, preview: !1, nameFallback: t }),
2084
- /* @__PURE__ */ n.jsx(Y.Text, { children: t })
2085
- ] }), Ue = O(lr), ar = ({ ...e }) => {
2085
+ /* @__PURE__ */ n.jsx(V.Text, { children: t })
2086
+ ] }), Ue = R(ar), dr = ({ ...e }) => {
2086
2087
  var f, x;
2087
- const [t, s] = D(1), { loadingRegenerate: r, currRegenerateId: i } = ue(), { isExpand: c, widgetProps: o } = q(), a = R(() => e == null ? void 0 : e.sender, [e]), d = R(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = R(() => {
2088
- const g = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1];
2089
- return (g == null ? void 0 : g.generated_id) === i.current;
2090
- }, [d, e, i.current]);
2091
- return Z(() => {
2092
- !r && (d == null ? void 0 : d.length) > 0 && (s(d == null ? void 0 : d.length), me());
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(() => {
2089
+ 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]);
2092
+ return X(() => {
2093
+ !r && (a == null ? void 0 : a.length) > 0 && (s(a == null ? void 0 : a.length), me());
2093
2094
  }, [r]), r && u ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2094
- a === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
2095
- /* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children: d == null ? void 0 : d.map((g, b) => {
2096
- var A;
2097
- const y = b === ((A = e == null ? void 0 : e.chats) == null ? void 0 : A.length) - 1, w = t === b + 1;
2095
+ d === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
2096
+ /* @__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;
2098
2099
  return /* @__PURE__ */ n.jsxs(
2099
2100
  "div",
2100
2101
  {
@@ -2114,10 +2115,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2114
2115
  children: /* @__PURE__ */ n.jsxs(
2115
2116
  "div",
2116
2117
  {
2117
- className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${a}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
2118
+ className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${d}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
2118
2119
  children: [
2119
2120
  /* @__PURE__ */ n.jsx(dt, { children: g == null ? void 0 : g.text }),
2120
- a === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
2121
+ d === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
2121
2122
  ]
2122
2123
  }
2123
2124
  )
@@ -2133,7 +2134,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2133
2134
  )
2134
2135
  ]
2135
2136
  },
2136
- b
2137
+ C
2137
2138
  );
2138
2139
  }) }),
2139
2140
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "center" }, children: [
@@ -2147,7 +2148,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2147
2148
  ),
2148
2149
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 4, alignItems: "center" }, children: [
2149
2150
  /* @__PURE__ */ n.jsx(
2150
- G,
2151
+ z,
2151
2152
  {
2152
2153
  size: "small",
2153
2154
  shape: "circle",
@@ -2158,13 +2159,13 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2158
2159
  }
2159
2160
  }
2160
2161
  ),
2161
- /* @__PURE__ */ n.jsxs(Y.Text, { children: [
2162
+ /* @__PURE__ */ n.jsxs(V.Text, { children: [
2162
2163
  t,
2163
2164
  " / ",
2164
2165
  (f = e == null ? void 0 : e.chats) == null ? void 0 : f.length
2165
2166
  ] }),
2166
2167
  /* @__PURE__ */ n.jsx(
2167
- G,
2168
+ z,
2168
2169
  {
2169
2170
  size: "small",
2170
2171
  shape: "circle",
@@ -2172,17 +2173,17 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2172
2173
  icon: /* @__PURE__ */ n.jsx(P, { type: "right" }),
2173
2174
  onClick: () => {
2174
2175
  var g;
2175
- t < ((g = e == null ? void 0 : e.chats) == null ? void 0 : g.length) && s((b) => b + 1);
2176
+ t < ((g = e == null ? void 0 : e.chats) == null ? void 0 : g.length) && s((C) => C + 1);
2176
2177
  }
2177
2178
  }
2178
2179
  )
2179
2180
  ] })
2180
2181
  ] })
2181
2182
  ] });
2182
- }, dr = O(ar), ur = ({ date: e, format: t, sender: s, ...r }) => {
2183
- var i, c;
2183
+ }, ur = R(dr), fr = ({ date: e, format: t, sender: s, ...r }) => {
2184
+ var l, c;
2184
2185
  return /* @__PURE__ */ n.jsx(
2185
- Y.Text,
2186
+ V.Text,
2186
2187
  {
2187
2188
  ...r,
2188
2189
  type: "secondary",
@@ -2192,32 +2193,32 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2192
2193
  ...s === "client" && {
2193
2194
  textAlign: "right"
2194
2195
  },
2195
- ...((i = Object.keys((r == null ? void 0 : r.style) || {})) == null ? void 0 : i.length) > 0 && {
2196
+ ...((l = Object.keys((r == null ? void 0 : r.style) || {})) == null ? void 0 : l.length) > 0 && {
2196
2197
  ...r == null ? void 0 : r.style
2197
2198
  }
2198
2199
  },
2199
- children: t ? (c = le(e)) == null ? void 0 : c.format(t) : e
2200
+ children: t ? (c = ae(e)) == null ? void 0 : c.format(t) : e
2200
2201
  }
2201
2202
  );
2202
- }, We = O(ur), fr = ({ ...e }) => {
2203
- var o;
2204
- const { loadingRegenerate: t, chats: s } = ue(), { widgetProps: r } = q(), i = R(() => (s == null ? void 0 : s.length) - 1 === (e == null ? void 0 : e.indexChat), [s]), c = R(() => e == null ? void 0 : e.sender, [e]);
2205
- return ((o = e == null ? void 0 : e.chats) == null ? void 0 : o.length) > 0 ? /* @__PURE__ */ n.jsx(dr, { ...e }) : t && i ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2206
- c === "response" && /* @__PURE__ */ n.jsx(Ue, { name: r == null ? void 0 : r.title, src: Ze }),
2207
- /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${c}`}`, children: [
2208
- /* @__PURE__ */ n.jsx(dt, { children: e == null ? void 0 : e.text }),
2209
- /* @__PURE__ */ n.jsx(We, { date: e == null ? void 0 : e.timestamp, sender: c })
2203
+ }, 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 }),
2208
+ /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
2209
+ /* @__PURE__ */ n.jsx(dt, { children: t == null ? void 0 : t.text }),
2210
+ /* @__PURE__ */ n.jsx(We, { date: t == null ? void 0 : t.timestamp, sender: o })
2210
2211
  ] }),
2211
- /* @__PURE__ */ n.jsx(Cn, { ...e })
2212
+ /* @__PURE__ */ n.jsx(Cn, { ...t })
2212
2213
  ] });
2213
- }, $e = O(fr), xr = () => {
2214
- const e = _(
2214
+ }, $e = R(xr), gr = () => {
2215
+ const e = k(
2215
2216
  "PleaseUploadFile",
2216
2217
  "Please upload specify file that needed to complete your request"
2217
- ), t = _("ClickToUpload", "Click to upload"), s = _(
2218
+ ), t = k("ClickToUpload", "Click to upload"), s = k(
2218
2219
  "ContinueWithoutUpload",
2219
2220
  "Continue without upload"
2220
- ), { onSendMsg: r, setFile: i } = ue(), c = () => {
2221
+ ), { onSendMsg: r, setFile: l } = fe(), c = () => {
2221
2222
  r({
2222
2223
  msg: "CANCEL UPLOAD"
2223
2224
  });
@@ -2232,7 +2233,14 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2232
2233
  marginBottom: 12
2233
2234
  },
2234
2235
  children: [
2235
- /* @__PURE__ */ n.jsx($e, { sender: "response", text: `${e}...` }),
2236
+ /* @__PURE__ */ n.jsx(
2237
+ $e,
2238
+ {
2239
+ sender: "response",
2240
+ text: `${e}...`,
2241
+ showResponseInfo: !1
2242
+ }
2243
+ ),
2236
2244
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
2237
2245
  /* @__PURE__ */ n.jsx(
2238
2246
  Zn,
@@ -2242,154 +2250,224 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2242
2250
  fileList: [],
2243
2251
  accept: ".doc, .jpg, .ods, .png, .txt, .docx, .pdf",
2244
2252
  onChange: (o) => {
2245
- i(o == null ? void 0 : o.file);
2253
+ l(o == null ? void 0 : o.file);
2246
2254
  },
2247
- children: /* @__PURE__ */ n.jsx(G, { icon: /* @__PURE__ */ n.jsx(P, { type: "upload" }), children: t })
2255
+ children: /* @__PURE__ */ n.jsx(z, { icon: /* @__PURE__ */ n.jsx(P, { type: "upload" }), children: t })
2248
2256
  }
2249
2257
  ),
2250
- /* @__PURE__ */ n.jsx(G, { type: "dashed", onClick: c, children: s })
2258
+ /* @__PURE__ */ n.jsx(z, { type: "dashed", onClick: c, children: s })
2251
2259
  ] })
2252
2260
  ]
2253
2261
  }
2254
2262
  );
2255
- }, gr = O(xr), Cr = () => {
2256
- const [e, t] = D(!1), [s, r] = D(!1), [i, c] = D(!1), [o, a] = D(3), [d, u] = D(!1), [f, x] = D(""), { widgetProps: g } = q(), { onSendMsg: b, chats: y } = ue(), { onSubmitPYPwd: w = () => {
2257
- }, onCheckPYAccess: A = () => {
2258
- } } = (g == null ? void 0 : g.onPayslipFn) || {}, p = _(
2263
+ }, 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(
2259
2267
  "ProvidePasswordPayslip",
2260
2268
  "Please provide your password account to access the download"
2261
- ), E = _("Cancel", "Cancel"), h = _("Submit", "Submit"), m = _("Password", "Password"), v = _("IsRequired", "Is Required"), C = _(
2269
+ ), v = k("Cancel", "Cancel"), E = k("Submit", "Submit"), b = k("Password", "Password"), h = k("IsRequired", "Is Required"), m = k(
2262
2270
  "PasswordPayslipValid",
2263
2271
  "Your password is valid. Please download the payslip file"
2264
- ), j = _(
2272
+ ), j = k(
2265
2273
  "AttemptPasswordExceeded",
2266
2274
  "Your attempt to enter the password exceeded the limit"
2267
- ), S = _(
2275
+ ), S = k(
2268
2276
  "VerifyAccessPayslip",
2269
2277
  "Please wait, verifying access to your payslip"
2270
- ), I = _(
2278
+ ), I = k(
2271
2279
  "WrongPwdPayslip",
2272
2280
  "The password you entered is incorrect. Please try again or contact support if you need assistance"
2273
- ), B = _(
2281
+ ), B = k(
2274
2282
  "SessionExpired",
2275
2283
  "Session expired. Please log in again to continue"
2276
2284
  ), [M] = oe.useForm(), L = () => {
2277
- var H, V, Q;
2278
- c(!0), u(!0), (Q = (V = (H = A()) == null ? void 0 : H.then((X) => {
2279
- var ee, ae;
2280
- const se = (ae = (ee = X == null ? void 0 : X.data) == null ? void 0 : ee.DATA) == null ? void 0 : ae.RESULT;
2281
- se && b({ msg: "Valid" }), t(se), x("");
2282
- })) == null ? void 0 : V.catch((X) => {
2283
- x(X == null ? void 0 : X.toString());
2284
- })) == null || Q.finally(() => {
2285
+ var H, G, Z;
2286
+ c(!0), u(!0), (Z = (G = (H = _()) == null ? void 0 : H.then((K) => {
2287
+ var ee, de;
2288
+ const te = (de = (ee = K == null ? void 0 : K.data) == null ? void 0 : ee.DATA) == null ? void 0 : de.RESULT;
2289
+ 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());
2292
+ })) == null || Z.finally(() => {
2285
2293
  r(!1), u(!1);
2286
2294
  });
2287
2295
  }, F = () => {
2288
- b({ msg: "cancel" }), c(!1);
2296
+ C({ msg: "cancel" }), c(!1);
2289
2297
  }, $ = () => {
2290
- var V;
2298
+ var G;
2291
2299
  const H = M == null ? void 0 : M.getFieldValue("pwd");
2292
- (V = M == null ? void 0 : M.validateFields()) == null || V.then(() => {
2293
- var Q, X;
2294
- r(!0), (X = (Q = w(H)) == null ? void 0 : Q.then(({ data: se }) => {
2300
+ (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 }) => {
2295
2303
  var ee;
2296
- (ee = se == null ? void 0 : se.DATA) != null && ee.ISVALID ? L() : (x(I), a(o - 1), r(!1));
2297
- })) == null || X.catch((se) => {
2298
- var ae, ce, Ne, Ve, Ge;
2299
- const ee = se == null ? void 0 : se.response;
2304
+ (ee = te == null ? void 0 : te.DATA) != null && ee.ISVALID ? L() : (x(I), d(o - 1), r(!1));
2305
+ })) == null || K.catch((te) => {
2306
+ var de, ce, Ne, Ve, Ge;
2307
+ const ee = te == null ? void 0 : te.response;
2300
2308
  if ((ee == null ? void 0 : ee.status) === 401) {
2301
- const Me = (ce = (ae = ee == null ? void 0 : ee.data) == null ? void 0 : ae.ERRORS) == null ? void 0 : ce.includes(
2309
+ const Me = (ce = (de = ee == null ? void 0 : ee.data) == null ? void 0 : de.ERRORS) == null ? void 0 : ce.includes(
2302
2310
  "ACCESS_TOKEN_EXPIRED"
2303
2311
  ), 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(
2304
2312
  "invalid password"
2305
2313
  );
2306
- Me && x(B), Fe && (x(I), a(o - 1), r(!1));
2314
+ Me && x(B), Fe && (x(I), d(o - 1), r(!1));
2307
2315
  } else
2308
- x(se == null ? void 0 : se.toString());
2316
+ console.log("err onSubmit: ", te == null ? void 0 : te.toString()), x(te == null ? void 0 : te.toString());
2309
2317
  r(!1);
2310
2318
  });
2311
2319
  });
2312
2320
  };
2313
- return Z(() => {
2314
- var V;
2321
+ return X(() => {
2322
+ var G;
2315
2323
  const H = y == null ? void 0 : y[(y == null ? void 0 : y.length) - 1];
2316
- ((V = H == null ? void 0 : H.attachment) == null ? void 0 : V.type) === "show_password_wp" && L();
2317
- }, []), i ? d ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: `${S}...` }) : o === 0 ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: j }) : f ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: f }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
2318
- /* @__PURE__ */ n.jsx(oe, { form: M, layout: "vertical", children: /* @__PURE__ */ n.jsx(
2319
- oe.Item,
2320
- {
2321
- name: "pwd",
2322
- label: e ? C : p,
2323
- rules: [
2324
- {
2325
- required: !0,
2326
- message: `${m} ${v}`
2327
- }
2328
- ],
2329
- children: /* @__PURE__ */ n.jsx(
2330
- Be.Password,
2331
- {
2332
- ...e && {
2333
- disabled: !0,
2334
- style: {
2335
- display: "none"
2336
- }
2337
- }
2338
- }
2339
- )
2340
- }
2341
- ) }),
2342
- !e && /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
2343
- /* @__PURE__ */ n.jsx(G, { disabled: s, onClick: F, children: E }),
2344
- /* @__PURE__ */ n.jsx(G, { type: "primary", onClick: $, loading: s, children: h })
2345
- ] })
2346
- ] }) : null;
2347
- }, mr = O(Cr), br = ({ ...e }) => {
2348
- const { objInitPayload: t } = q(), s = R(() => tt(t == null ? void 0 : t.access_token), [t]), r = () => {
2349
- var c, o;
2350
- const i = e == null ? void 0 : e.attachment;
2351
- (o = Re({
2324
+ ((G = H == null ? void 0 : H.attachment) == null ? void 0 : G.type) === "show_password_wp" && L();
2325
+ }, []), l ? a ? /* @__PURE__ */ n.jsx(
2326
+ $e,
2327
+ {
2328
+ sender: "response",
2329
+ text: `${S}...`,
2330
+ showResponseInfo: !1
2331
+ }
2332
+ ) : o === 0 ? /* @__PURE__ */ n.jsx(
2333
+ $e,
2334
+ {
2335
+ sender: "response",
2336
+ text: j,
2337
+ showResponseInfo: !1
2338
+ }
2339
+ ) : f ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: f, showResponseInfo: !1 }) : /* @__PURE__ */ n.jsx(
2340
+ "div",
2341
+ {
2342
+ style: { display: "flex", flexDirection: "column" },
2343
+ className: "w-bubble-chat",
2344
+ children: /* @__PURE__ */ n.jsxs(
2345
+ oe,
2346
+ {
2347
+ form: M,
2348
+ layout: "vertical",
2349
+ style: { display: "flex", flexDirection: "column", gap: 8 },
2350
+ children: [
2351
+ /* @__PURE__ */ n.jsx(V.Text, { children: e ? m : p }),
2352
+ !e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2353
+ /* @__PURE__ */ n.jsx(
2354
+ oe.Item,
2355
+ {
2356
+ name: "pwd",
2357
+ rules: [
2358
+ {
2359
+ required: !0,
2360
+ message: `${b} ${h}`
2361
+ }
2362
+ ],
2363
+ children: /* @__PURE__ */ n.jsx(Be.Password, {})
2364
+ }
2365
+ ),
2366
+ /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
2367
+ /* @__PURE__ */ n.jsx(z, { disabled: s, onClick: F, children: v }),
2368
+ /* @__PURE__ */ n.jsx(
2369
+ z,
2370
+ {
2371
+ type: "primary",
2372
+ onClick: $,
2373
+ loading: s,
2374
+ htmlType: "submit",
2375
+ children: E
2376
+ }
2377
+ )
2378
+ ] })
2379
+ ] })
2380
+ ]
2381
+ }
2382
+ )
2383
+ }
2384
+ ) : null;
2385
+ }, 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 = () => {
2388
+ var u, f, x, g;
2389
+ r(!0);
2390
+ const a = e == null ? void 0 : e.attachment;
2391
+ (g = (x = (f = Oe({
2352
2392
  method: "POST",
2353
- url: i == null ? void 0 : i.endpoint,
2354
- data: i == null ? void 0 : i.body,
2393
+ url: a == null ? void 0 : a.endpoint,
2394
+ data: a == null ? void 0 : a.body,
2355
2395
  headers: {
2356
2396
  Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
2357
- "Content-Type": i == null ? void 0 : i.headers["Content-Type"],
2397
+ "Content-Type": a == null ? void 0 : a.headers["Content-Type"],
2358
2398
  coid: t == null ? void 0 : t.companyid,
2359
2399
  "Company-Id": t == null ? void 0 : t.companyid,
2360
- "Acc-Name": (c = s == null ? void 0 : s.INSTANCE) == null ? void 0 : c.toLowerCase()
2400
+ "Acc-Name": (u = c == null ? void 0 : c.INSTANCE) == null ? void 0 : u.toLowerCase()
2361
2401
  },
2362
2402
  responseType: "blob"
2363
- })) == null || o.then((a) => {
2364
- var g;
2365
- const d = (g = i == null ? void 0 : i.body) == null ? void 0 : g.media, u = `${i == null ? void 0 : i.filename}.${d}`, f = new Blob([a == null ? void 0 : a.data]), x = URL == null ? void 0 : URL.createObjectURL(f);
2366
- En({ downloadURL: x, fileName: u }), URL.revokeObjectURL(x);
2403
+ })) == null ? void 0 : f.then((C) => {
2404
+ 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);
2407
+ })) == null ? void 0 : x.catch((C) => {
2408
+ var w, _, p;
2409
+ const y = C == null ? void 0 : C.message;
2410
+ (w = ie) == null || w.destroy(), (_ = ie) == null || _.config({
2411
+ getContainer: () => document.querySelector(".w-widget-content-container"),
2412
+ top: 28,
2413
+ placement: "top"
2414
+ }), (p = ie) == null || p.error({
2415
+ message: l,
2416
+ description: y,
2417
+ className: "w-notification-content",
2418
+ duration: 3
2419
+ });
2420
+ })) == null || g.finally(() => {
2421
+ r(!1);
2367
2422
  });
2368
2423
  };
2369
- return /* @__PURE__ */ n.jsx(G, { onClick: r, children: "Download file" });
2370
- }, vr = O(br), hr = ({ ...e }) => {
2371
- const t = z(), s = _("DownloadChart", "Download Chart"), r = R(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), i = R(() => {
2424
+ return /* @__PURE__ */ n.jsx(
2425
+ "div",
2426
+ {
2427
+ className: "w-bubble-chat w-response",
2428
+ onClick: o,
2429
+ 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 }),
2432
+ /* @__PURE__ */ n.jsx(
2433
+ z,
2434
+ {
2435
+ icon: /* @__PURE__ */ n.jsx(
2436
+ P,
2437
+ {
2438
+ type: "paper-clip",
2439
+ style: { color: "var(--primary-color, #395ebc)" }
2440
+ }
2441
+ ),
2442
+ style: { border: "none" }
2443
+ }
2444
+ )
2445
+ ] })
2446
+ }
2447
+ );
2448
+ }, 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(() => {
2372
2450
  var o;
2373
- return (o = r == null ? void 0 : r.data) == null ? void 0 : o.map((a, d) => {
2451
+ return (o = r == null ? void 0 : r.data) == null ? void 0 : o.map((d, a) => {
2374
2452
  var u, f;
2375
2453
  return {
2376
- label: (u = r == null ? void 0 : r.labels) == null ? void 0 : u[d],
2377
- value: a,
2378
- color: (f = r == null ? void 0 : r.colors) == null ? void 0 : f[d]
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]
2379
2457
  };
2380
2458
  });
2381
2459
  }, [r]), c = () => {
2382
- var a;
2383
- const o = (a = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : a.toDataURL();
2460
+ var d;
2461
+ const o = (d = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : d.toDataURL();
2384
2462
  En({ fileName: r == null ? void 0 : r.title, downloadURL: o });
2385
2463
  };
2386
2464
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2387
2465
  /* @__PURE__ */ n.jsx(
2388
- rs,
2466
+ os,
2389
2467
  {
2390
2468
  className: "chart_widget",
2391
2469
  ref: t,
2392
- data: i,
2470
+ data: l,
2393
2471
  angleField: "value",
2394
2472
  colorField: "label",
2395
2473
  label: {
@@ -2408,7 +2486,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2408
2486
  }
2409
2487
  ),
2410
2488
  /* @__PURE__ */ n.jsx("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ n.jsx(
2411
- G,
2489
+ z,
2412
2490
  {
2413
2491
  onClick: () => {
2414
2492
  c();
@@ -2417,84 +2495,84 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2417
2495
  }
2418
2496
  ) })
2419
2497
  ] });
2420
- }, Er = O(hr), Tr = ({ ...e }) => {
2421
- var t, s, r, i, c;
2498
+ }, Tr = R(Er), yr = ({ ...e }) => {
2499
+ var t, s, r, l, c;
2422
2500
  switch (!0) {
2423
2501
  case ((t = Ae(e)) == null ? void 0 : t.text):
2424
2502
  return /* @__PURE__ */ n.jsx($e, { ...e });
2425
2503
  case ((s = Ae(e)) == null ? void 0 : s.upload):
2426
- return /* @__PURE__ */ n.jsx(gr, { ...e });
2504
+ return /* @__PURE__ */ n.jsx(Cr, { ...e });
2427
2505
  case ((r = Ae(e)) == null ? void 0 : r.password):
2428
- return /* @__PURE__ */ n.jsx(mr, { ...e });
2429
- case ((i = Ae(e)) == null ? void 0 : i.filedownload):
2430
- return /* @__PURE__ */ n.jsx(vr, { ...e });
2506
+ return /* @__PURE__ */ n.jsx(br, { ...e });
2507
+ case ((l = Ae(e)) == null ? void 0 : l.filedownload):
2508
+ return /* @__PURE__ */ n.jsx(hr, { ...e });
2431
2509
  case ((c = Ae(e)) == null ? void 0 : c.chart):
2432
- return /* @__PURE__ */ n.jsx(Er, { ...e });
2510
+ return /* @__PURE__ */ n.jsx(Tr, { ...e });
2433
2511
  default:
2434
2512
  return null;
2435
2513
  }
2436
- }, yr = O(Tr), jr = () => {
2437
- const { isOpenWidget: e, widgetProps: t } = q(), { chats: s, isWaitResponse: r } = ue(), { activeTab: i } = be();
2438
- return Z(() => {
2514
+ }, jr = R(yr), wr = () => {
2515
+ const { isOpenWidget: e, widgetProps: t } = J(), { chats: s, isWaitResponse: r } = fe(), { activeTab: l } = be();
2516
+ return X(() => {
2439
2517
  me();
2440
- }, [i]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2518
+ }, [l]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2441
2519
  /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: s == null ? void 0 : s.map((c, o) => {
2442
- var d;
2443
- const a = (d = Ae(c)) == null ? void 0 : d.text;
2520
+ var a;
2521
+ const d = (a = Ae(c)) == null ? void 0 : a.text;
2444
2522
  return /* @__PURE__ */ n.jsxs(gn, { children: [
2445
- (c == null ? void 0 : c.sender) === "response" && !a && /* @__PURE__ */ n.jsx(
2523
+ (c == null ? void 0 : c.sender) === "response" && !d && /* @__PURE__ */ n.jsx(
2446
2524
  Ue,
2447
2525
  {
2448
2526
  name: t == null ? void 0 : t.title,
2449
2527
  src: Ze
2450
2528
  }
2451
2529
  ),
2452
- /* @__PURE__ */ n.jsx(yr, { indexChat: o, ...c })
2530
+ /* @__PURE__ */ n.jsx(jr, { indexChat: o, ...c })
2453
2531
  ] }, o);
2454
2532
  }) }),
2455
2533
  r && /* @__PURE__ */ n.jsx(pn, {})
2456
2534
  ] }) : null;
2457
- }, wr = O(jr), pr = () => {
2458
- var h;
2459
- const e = _(
2535
+ }, pr = R(wr), _r = () => {
2536
+ var E;
2537
+ const e = k(
2460
2538
  "ContinueWithoutUpload",
2461
2539
  "Continue without Upload"
2462
2540
  ), {
2463
2541
  onSendMsg: t,
2464
2542
  setChats: s,
2465
2543
  isWaitResponse: r,
2466
- loadingRegenerate: i,
2544
+ loadingRegenerate: l,
2467
2545
  file: c,
2468
2546
  setFile: o,
2469
- chats: a,
2470
- connected: d
2471
- } = ue(), { isActiveTabVA: u } = be(), f = R(() => {
2472
- var v;
2473
- const m = a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1];
2474
- return (m == null ? void 0 : m.sender) === "response" && ((v = m == null ? void 0 : m.attachment) == null ? void 0 : v.type) === "fileuploader";
2475
- }, [a]), x = z(), [g, b] = D(!1), [y, w] = D(!1), A = R(() => r || !y, [y, r]), p = () => {
2476
- var C, j, S, I;
2477
- const m = (S = (j = (C = x == null ? void 0 : x.current) == null ? void 0 : C.resizableTextArea) == null ? void 0 : j.textArea) == null ? void 0 : S.value;
2478
- if (!(m != null && m.trim()) || r) return;
2479
- w(!1), t({ msg: m }), b(!g);
2480
- const v = {
2481
- text: m,
2547
+ chats: d,
2548
+ connected: a
2549
+ } = fe(), { isActiveTabVA: u } = be(), f = O(() => {
2550
+ var h;
2551
+ const b = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1];
2552
+ 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 = () => {
2554
+ var m, j, S, I;
2555
+ 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;
2557
+ w(!1), t({ msg: b }), C(!g);
2558
+ const h = {
2559
+ text: b,
2482
2560
  sender: "client",
2483
2561
  type: "text",
2484
- timestamp: (I = le()) == null ? void 0 : I.format("hh:mm A")
2562
+ timestamp: (I = ae()) == null ? void 0 : I.format("hh:mm A")
2485
2563
  };
2486
- s((B) => [...B, v]), me();
2487
- }, E = () => {
2564
+ s((B) => [...B, h]), me();
2565
+ }, v = () => {
2488
2566
  t({ msg: "SKIP_WAITING_RESPONSE" });
2489
2567
  };
2490
- return Z(() => {
2491
- var m;
2492
- x != null && x.current && u && ((m = x == null ? void 0 : x.current) == null || m.focus());
2568
+ return X(() => {
2569
+ var b;
2570
+ x != null && x.current && u && ((b = x == null ? void 0 : x.current) == null || b.focus());
2493
2571
  }, [u]), f ? /* @__PURE__ */ n.jsxs("div", { className: "w-input-container", style: { alignItems: "center" }, children: [
2494
- /* @__PURE__ */ n.jsx(Y.Text, { children: c == null ? void 0 : c.name }),
2495
- ((h = Object == null ? void 0 : Object.keys(c || {})) == null ? void 0 : h.length) > 0 ? /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2572
+ /* @__PURE__ */ n.jsx(V.Text, { children: c == null ? void 0 : c.name }),
2573
+ ((E = Object == null ? void 0 : Object.keys(c || {})) == null ? void 0 : E.length) > 0 ? /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
2496
2574
  /* @__PURE__ */ n.jsx(
2497
- G,
2575
+ z,
2498
2576
  {
2499
2577
  danger: !0,
2500
2578
  icon: /* @__PURE__ */ n.jsx(P, { type: "delete" }),
@@ -2503,7 +2581,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2503
2581
  }
2504
2582
  ),
2505
2583
  /* @__PURE__ */ n.jsx(
2506
- G,
2584
+ z,
2507
2585
  {
2508
2586
  className: "w-send-btn",
2509
2587
  style: { backgroundColor: "var(--primary-color, #395ebc)" },
@@ -2513,7 +2591,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2513
2591
  }
2514
2592
  )
2515
2593
  ] }) : /* @__PURE__ */ n.jsx(Se, { title: e, children: /* @__PURE__ */ n.jsx(
2516
- G,
2594
+ z,
2517
2595
  {
2518
2596
  icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
2519
2597
  shape: "circle",
@@ -2529,35 +2607,35 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2529
2607
  Be.TextArea,
2530
2608
  {
2531
2609
  className: "w-input-widget",
2532
- disabled: !d,
2610
+ disabled: !a,
2533
2611
  ref: x,
2534
2612
  placeholder: "Type a message...",
2535
- onKeyDown: (m) => {
2536
- ((m == null ? void 0 : m.code) === "Enter" || (m == null ? void 0 : m.key) === "Enter") && !(m != null && m.shiftKey) && p();
2613
+ onKeyDown: (b) => {
2614
+ ((b == null ? void 0 : b.code) === "Enter" || (b == null ? void 0 : b.key) === "Enter") && !(b != null && b.shiftKey) && p();
2537
2615
  },
2538
- onChange: ({ target: { value: m } }) => {
2539
- const v = /\S/;
2616
+ onChange: ({ target: { value: b } }) => {
2617
+ const h = /\S/;
2540
2618
  Pe({
2541
- input_va_value: m
2542
- }), m && (v != null && v.test(m)) ? w(!0) : m != null && m.trim() || w(!1);
2619
+ input_va_value: b
2620
+ }), b && (h != null && h.test(b)) ? w(!0) : b != null && b.trim() || w(!1);
2543
2621
  }
2544
2622
  },
2545
2623
  g
2546
2624
  ),
2547
- r || i ? /* @__PURE__ */ n.jsx(
2548
- G,
2625
+ r || l ? /* @__PURE__ */ n.jsx(
2626
+ z,
2549
2627
  {
2550
2628
  style: { border: "none" },
2551
2629
  icon: /* @__PURE__ */ n.jsx(P, { type: "stop" }),
2552
2630
  shape: "circle",
2553
- onClick: E,
2631
+ onClick: v,
2554
2632
  size: "large"
2555
2633
  }
2556
2634
  ) : /* @__PURE__ */ n.jsx(
2557
- G,
2635
+ z,
2558
2636
  {
2559
- className: `w-send-btn ${A ? "w-send-btn-disabled" : ""}`,
2560
- disabled: A,
2637
+ className: `w-send-btn ${_ ? "w-send-btn-disabled" : ""}`,
2638
+ disabled: _,
2561
2639
  style: { backgroundColor: "var(--primary-color, #395ebc)" },
2562
2640
  icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
2563
2641
  shape: "circle",
@@ -2565,15 +2643,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2565
2643
  }
2566
2644
  )
2567
2645
  ] });
2568
- }, _r = O(pr), kr = ({ taskStatus: e }) => {
2569
- const t = _("InProgress", "In Progress"), s = _("New", "New"), r = _("Closed", "Closed"), i = _("Done", "Done"), c = _("HDCancelled", "Cancelled"), o = {
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 = {
2570
2648
  "In Progress": t,
2571
2649
  Open: s,
2572
2650
  New: s,
2573
2651
  Closed: r,
2574
- Fixed: i,
2652
+ Fixed: l,
2575
2653
  Cancelled: c
2576
- }, a = {
2654
+ }, d = {
2577
2655
  "In Progress": "#FFF2D6",
2578
2656
  Responded: "#FFF2D6",
2579
2657
  Open: "#e9e2f8",
@@ -2582,9 +2660,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2582
2660
  Fixed: "#bbfab7",
2583
2661
  Done: "#bbfab7",
2584
2662
  Cancelled: "#FFF2D6"
2585
- }, d = R(() => a[e] || a.Closed, [e]), u = R(() => o[e] || e, [e]);
2586
- return /* @__PURE__ */ n.jsx(Jt, { color: d, children: /* @__PURE__ */ n.jsx(
2587
- Y.Text,
2663
+ }, a = O(() => d[e] || d.Closed, [e]), u = O(() => o[e] || e, [e]);
2664
+ return /* @__PURE__ */ n.jsx(Qt, { color: a, children: /* @__PURE__ */ n.jsx(
2665
+ V.Text,
2588
2666
  {
2589
2667
  className: "primary-color-active",
2590
2668
  style: { width: "100%", textAlign: "center" },
@@ -2592,7 +2670,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2592
2670
  children: u
2593
2671
  }
2594
2672
  ) }, e);
2595
- }, xt = O(kr), Ar = ({ onClick: e, ...t }) => /* @__PURE__ */ n.jsxs(
2673
+ }, xt = R(Ar), Sr = ({ onClick: e, ...t }) => /* @__PURE__ */ n.jsxs(
2596
2674
  "div",
2597
2675
  {
2598
2676
  className: "w-ticket-card-container",
@@ -2601,7 +2679,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2601
2679
  },
2602
2680
  children: [
2603
2681
  /* @__PURE__ */ n.jsx(
2604
- Y.Text,
2682
+ V.Text,
2605
2683
  {
2606
2684
  strong: !0,
2607
2685
  style: {
@@ -2615,8 +2693,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2615
2693
  ),
2616
2694
  /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-content-container", children: [
2617
2695
  /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-cat-code", children: [
2618
- /* @__PURE__ */ n.jsx(Y.Text, { children: (t == null ? void 0 : t.TASK_CATEGORY) || Kn }),
2619
- /* @__PURE__ */ n.jsx(Y.Text, { children: (t == null ? void 0 : t.TASK_CODE) || Kn })
2696
+ /* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CATEGORY) || Kn }),
2697
+ /* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CODE) || Kn })
2620
2698
  ] }),
2621
2699
  /* @__PURE__ */ n.jsxs(
2622
2700
  "div",
@@ -2627,15 +2705,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2627
2705
  },
2628
2706
  children: [
2629
2707
  /* @__PURE__ */ n.jsx(xt, { taskStatus: t == null ? void 0 : t.TASK_STATUS }),
2630
- /* @__PURE__ */ n.jsx(Y.Text, { children: t == null ? void 0 : t.CREATED_DATE })
2708
+ /* @__PURE__ */ n.jsx(V.Text, { children: t == null ? void 0 : t.CREATED_DATE })
2631
2709
  ]
2632
2710
  }
2633
2711
  )
2634
2712
  ] })
2635
2713
  ]
2636
2714
  }
2637
- ), Sr = O(Ar), gt = () => {
2638
- const { objInitPayload: e, setObjInitPayload: t, parsedJWT: s } = q(), r = R(() => {
2715
+ ), Lr = R(Sr), gt = () => {
2716
+ const { objInitPayload: e, setObjInitPayload: t, parsedJWT: s } = J(), r = O(() => {
2639
2717
  var c;
2640
2718
  return {
2641
2719
  Authorization: `Bearer ${e == null ? void 0 : e.access_token}`,
@@ -2647,8 +2725,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2647
2725
  }, [e]);
2648
2726
  return async (c) => {
2649
2727
  var u, f, x;
2650
- const { onSuccess: o, onError: a, onFinally: d } = c ?? {};
2651
- (x = (f = (u = Re({
2728
+ const { onSuccess: o, onError: d, onFinally: a } = c ?? {};
2729
+ (x = (f = (u = Oe({
2652
2730
  url: e == null ? void 0 : e.uriBackend,
2653
2731
  params: {
2654
2732
  ofid: "sfsystem.RefreshToken",
@@ -2661,8 +2739,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2661
2739
  method: "POST"
2662
2740
  })) == null ? void 0 : u.then((g) => {
2663
2741
  var w;
2664
- const b = (w = g == null ? void 0 : g.data) == null ? void 0 : w.DATA, y = {
2665
- access_token: b == null ? void 0 : b.JWT_TOKEN,
2742
+ const C = (w = g == null ? void 0 : g.data) == null ? void 0 : w.DATA, y = {
2743
+ access_token: C == null ? void 0 : C.JWT_TOKEN,
2666
2744
  refresh_token: e == null ? void 0 : e.refresh_token,
2667
2745
  uagent: e == null ? void 0 : e.uagent,
2668
2746
  uriBackend: e == null ? void 0 : e.uriBackend,
@@ -2676,66 +2754,66 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2676
2754
  };
2677
2755
  t(y), typeof o == "function" && o(g);
2678
2756
  })) == null ? void 0 : f.catch((g) => {
2679
- typeof a == "function" && a(g);
2757
+ typeof d == "function" && d(g);
2680
2758
  })) == null || x.finally(() => {
2681
- typeof d == "function" && d();
2759
+ typeof a == "function" && a();
2682
2760
  });
2683
2761
  };
2684
2762
  }, en = () => {
2685
2763
  var o;
2686
- const e = z(new AbortController()), { objInitPayload: t, parsedJWT: s } = q(), r = gt(), i = {
2764
+ const e = Y(new AbortController()), { objInitPayload: t, parsedJWT: s } = J(), r = gt(), l = {
2687
2765
  Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
2688
2766
  coid: s == null ? void 0 : s.COID,
2689
2767
  "Acc-Name": (o = s == null ? void 0 : s.INSTANCE) == null ? void 0 : o.toLowerCase(),
2690
2768
  "Company-Id": t == null ? void 0 : t.companyid,
2691
2769
  Language: t == null ? void 0 : t.lang
2692
2770
  }, c = async ({
2693
- url: a,
2694
- endpoint: d,
2771
+ url: d,
2772
+ endpoint: a,
2695
2773
  method: u = "POST",
2696
2774
  headers: f,
2697
2775
  ...x
2698
2776
  }) => {
2699
- var w, A, p, E, h, m;
2777
+ var w, _, p, v, E, b;
2700
2778
  const g = {
2701
- url: a || `${t == null ? void 0 : t.uriBackendHRMGO}${d}`,
2779
+ url: d || `${t == null ? void 0 : t.uriBackendHRMGO}${a}`,
2702
2780
  ...e.current && {
2703
2781
  signal: (w = e == null ? void 0 : e.current) == null ? void 0 : w.signal
2704
2782
  },
2705
2783
  headers: {
2706
- ...i,
2784
+ ...l,
2707
2785
  ...f,
2708
2786
  "Company-Code": t == null ? void 0 : t.companycode
2709
2787
  },
2710
2788
  method: u,
2711
2789
  ...x
2712
- }, b = (A = Re) == null ? void 0 : A.create(g);
2713
- return (E = (p = b == null ? void 0 : b.interceptors) == null ? void 0 : p.request) == null || E.use(
2714
- (v) => (t != null && t.access_token && (v.headers.Authorization = `Bearer ${t == null ? void 0 : t.access_token}`), v),
2715
- (v) => {
2716
- Promise.reject(v);
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(
2792
+ (h) => (t != null && t.access_token && (h.headers.Authorization = `Bearer ${t == null ? void 0 : t.access_token}`), h),
2793
+ (h) => {
2794
+ Promise.reject(h);
2717
2795
  }
2718
- ), (m = (h = b == null ? void 0 : b.interceptors) == null ? void 0 : h.response) == null || m.use(
2719
- (v) => v,
2720
- async (v) => {
2796
+ ), (b = (E = C == null ? void 0 : C.interceptors) == null ? void 0 : E.response) == null || b.use(
2797
+ (h) => h,
2798
+ async (h) => {
2721
2799
  var j;
2722
- const C = v == null ? void 0 : v.config;
2723
- if (((j = v == null ? void 0 : v.response) == null ? void 0 : j.status) === 401) {
2800
+ const m = h == null ? void 0 : h.config;
2801
+ if (((j = h == null ? void 0 : h.response) == null ? void 0 : j.status) === 401) {
2724
2802
  const S = await r();
2725
- return C.headers.Authorization = `Bearer ${S}`, Re(C);
2803
+ return m.headers.Authorization = `Bearer ${S}`, Oe(m);
2726
2804
  }
2727
- return Promise == null ? void 0 : Promise.reject(v);
2805
+ return Promise == null ? void 0 : Promise.reject(h);
2728
2806
  }
2729
- ), await (b == null ? void 0 : b.request(g));
2807
+ ), await (C == null ? void 0 : C.request(g));
2730
2808
  };
2731
2809
  return c.abort = () => {
2732
- var a;
2733
- e != null && e.current && ((a = e == null ? void 0 : e.current) == null || a.abort(), e.current = new AbortController());
2734
- }, Z(() => () => c.abort(), []), c;
2735
- }, Ct = Te({}), ve = () => ye(Ct), Lr = ({ children: e }) => {
2736
- const t = en(), [s, r] = D([]), [i, c] = D(""), [o, a] = D(!1), [d, u] = D(!0), [f, x] = D(0), g = (b) => {
2737
- var y, w, A, p;
2738
- u(!0), (p = (A = t({
2810
+ var d;
2811
+ e != null && e.current && ((d = e == null ? void 0 : e.current) == null || d.abort(), e.current = new AbortController());
2812
+ }, X(() => () => c.abort(), []), c;
2813
+ }, 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({
2739
2817
  endpoint: "/helpdesk/myticket/ticket-list",
2740
2818
  method: "POST",
2741
2819
  data: {
@@ -2744,10 +2822,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2744
2822
  SEARCH: {
2745
2823
  MY_TICKET: !0,
2746
2824
  TASK_MODULE: "HD",
2747
- ...((y = Object.keys(b || {})) == null ? void 0 : y.length) > 0 && {
2748
- ...b,
2749
- ...(b == null ? void 0 : b.CREATED_DATE) && {
2750
- CREATED_DATE: (w = le(b == null ? void 0 : b.CREATED_DATE)) == null ? void 0 : w.format(hn)
2825
+ ...((y = Object.keys(C || {})) == null ? void 0 : y.length) > 0 && {
2826
+ ...C,
2827
+ ...(C == null ? void 0 : C.CREATED_DATE) && {
2828
+ CREATED_DATE: (w = ae(C == null ? void 0 : C.CREATED_DATE)) == null ? void 0 : w.format(hn)
2751
2829
  }
2752
2830
  }
2753
2831
  },
@@ -2756,26 +2834,26 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2756
2834
  ORDER: "DESC"
2757
2835
  }
2758
2836
  }
2759
- })) == null ? void 0 : A.then((E) => {
2760
- var h, m, v;
2761
- (h = E == null ? void 0 : E.data) != null && h.DATA && r((v = (m = E == null ? void 0 : E.data) == null ? void 0 : m.DATA) == null ? void 0 : v.LIST);
2837
+ })) == null ? void 0 : _.then((v) => {
2838
+ 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);
2762
2840
  })) == null || p.finally(() => {
2763
2841
  u(!1);
2764
2842
  });
2765
2843
  };
2766
- return Z(() => {
2844
+ return X(() => {
2767
2845
  g();
2768
2846
  }, []), /* @__PURE__ */ n.jsx(
2769
2847
  Ct.Provider,
2770
2848
  {
2771
2849
  value: {
2772
2850
  listTicket: s,
2773
- ticketId: i,
2851
+ ticketId: l,
2774
2852
  setTicketId: c,
2775
2853
  getListTicket: g,
2776
2854
  openFilter: o,
2777
- setOpenFilter: a,
2778
- loadingListTicket: d,
2855
+ setOpenFilter: d,
2856
+ loadingListTicket: a,
2779
2857
  countFilters: f,
2780
2858
  setCountFilters: x
2781
2859
  },
@@ -2783,73 +2861,73 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2783
2861
  }
2784
2862
  );
2785
2863
  }, Or = () => {
2786
- const e = _("SubjectSearch", "Subject Search"), t = _("AdvanceFilter", "Advance Filter"), s = z(null), { getListTicket: r, setOpenFilter: i, loadingListTicket: c, countFilters: o } = ve();
2864
+ const e = k("SubjectSearch", "Subject Search"), t = k("AdvanceFilter", "Advance Filter"), s = Y(null), { getListTicket: r, setOpenFilter: l, loadingListTicket: c, countFilters: o } = ve();
2787
2865
  return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, marginBottom: 12 }, children: [
2788
2866
  /* @__PURE__ */ n.jsx(
2789
2867
  Be,
2790
2868
  {
2791
2869
  placeholder: e,
2792
- onChange: ({ target: { value: a } }) => {
2870
+ onChange: ({ target: { value: d } }) => {
2793
2871
  clearTimeout(s == null ? void 0 : s.current), s.current = setTimeout(() => {
2794
2872
  r({
2795
- TASK_NAME: a
2873
+ TASK_NAME: d
2796
2874
  });
2797
2875
  }, 250);
2798
2876
  },
2799
2877
  allowClear: !0
2800
2878
  }
2801
2879
  ),
2802
- /* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(Qt, { count: o, children: /* @__PURE__ */ n.jsx(
2803
- G,
2880
+ /* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(Zt, { count: o, children: /* @__PURE__ */ n.jsx(
2881
+ z,
2804
2882
  {
2805
2883
  loading: c,
2806
2884
  icon: /* @__PURE__ */ n.jsx(P, { type: "filter" }),
2807
2885
  onClick: () => {
2808
- i(!0);
2886
+ l(!0);
2809
2887
  }
2810
2888
  }
2811
2889
  ) }) })
2812
2890
  ] }) });
2813
- }, Rr = O(Or), mt = Te({}), he = () => ye(mt), Dr = ({ children: e }) => {
2814
- const t = z(null), s = z(0), r = z(!1), i = z(null), [c, o] = D([]), [a, d] = D(0), [u, f] = D(!1), { objInitPayload: x, parsedJWT: g, isFirstRenderHelpdesk: b, setShowReadyWSHD: y } = q(), w = gt(), A = (m) => {
2815
- const v = new WebSocket(m);
2816
- v.onopen = () => {
2817
- r.current = !0, s.current = 0, d(0), y(!0);
2818
- }, v.onerror = (C) => {
2819
- y(!1), console.error(`${ke} - WebSocket error:`, C);
2820
- }, v.onclose = (C) => {
2891
+ }, 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) => {
2893
+ const h = new WebSocket(b);
2894
+ h.onopen = () => {
2895
+ r.current = !0, s.current = 0, a(0), y(!0);
2896
+ }, h.onerror = (m) => {
2897
+ y(!1), console.error(`${ke} - WebSocket error:`, m);
2898
+ }, h.onclose = (m) => {
2821
2899
  console.warn(
2822
2900
  `${ke} - WebSocket disconnected:`,
2823
- C
2824
- ), r.current = !1, y(!1), !(C != null && C.wasClean) && (s == null ? void 0 : s.current) < Ie && (s.current += 1, d((j) => j + 1), clearTimeout(i.current), i.current = setTimeout(p, 2e3));
2825
- }, v.onmessage = E(v), t.current = v;
2901
+ 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));
2903
+ }, h.onmessage = v(h), t.current = h;
2826
2904
  }, p = async () => {
2827
2905
  var L, F, $;
2828
2906
  if (((L = t.current) == null ? void 0 : L.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
2829
2907
  const {
2830
- access_token: m,
2831
- companyid: v = "",
2832
- companycode: C = "",
2908
+ access_token: b,
2909
+ companyid: h = "",
2910
+ companycode: m = "",
2833
2911
  lang: j = "",
2834
2912
  uriBackendHRMGO: S = ""
2835
2913
  } = x ?? {};
2836
- if (!m || !v || !C) {
2914
+ if (!b || !h || !m) {
2837
2915
  console.warn(
2838
2916
  `${ke} - Missing required WebSocket credentials.`
2839
2917
  );
2840
2918
  return;
2841
2919
  }
2842
- const I = `Bearer ${m}`, B = (F = `${S}/ws`) == null ? void 0 : F.replace("https://", "wss://"), M = {
2843
- COMPANY_ID: v.toString(),
2844
- COMPANY_CODE: C.toLowerCase(),
2920
+ const I = `Bearer ${b}`, B = (F = `${S}/ws`) == null ? void 0 : F.replace("https://", "wss://"), M = {
2921
+ COMPANY_ID: h.toString(),
2922
+ COMPANY_CODE: m.toLowerCase(),
2845
2923
  LANGUAGE: j,
2846
2924
  ACC_NAME: ($ = g == null ? void 0 : g.INSTANCE) == null ? void 0 : $.toLowerCase(),
2847
2925
  TOKEN: I
2848
2926
  };
2849
2927
  try {
2850
- const H = await _s(
2928
+ const H = await ks(
2851
2929
  M,
2852
- Es
2930
+ Ts
2853
2931
  );
2854
2932
  if (!H || r.current || (s == null ? void 0 : s.current) >= Ie) {
2855
2933
  console.warn(
@@ -2857,21 +2935,21 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2857
2935
  );
2858
2936
  return;
2859
2937
  }
2860
- t.current && t.current.close(), A(`${B}?t=${H}`);
2938
+ t.current && t.current.close(), _(`${B}?t=${H}`);
2861
2939
  } catch (H) {
2862
2940
  console.error(
2863
2941
  `${ke} - Failed to encrypt token:`,
2864
2942
  H
2865
2943
  );
2866
2944
  }
2867
- }, E = (m) => (v) => {
2868
- var C;
2945
+ }, v = (b) => (h) => {
2946
+ var m;
2869
2947
  try {
2870
- if ((v == null ? void 0 : v.data) === "PING")
2871
- m.send("PONG");
2948
+ if ((h == null ? void 0 : h.data) === "PING")
2949
+ b.send("PONG");
2872
2950
  else {
2873
- const { DATA: j, EVENT: S } = JSON.parse(v.data || "{}");
2874
- !b.current && S === "USER_ONLINE_NOTIF" && Array.isArray(j == null ? void 0 : j.EMPLOYEES) && (o((C = j == null ? void 0 : j.EMPLOYEES) == null ? void 0 : C.filter(Boolean)), b.current = !0), S === "TOKEN_EXPIRED" && w({
2951
+ const { DATA: j, EVENT: S } = JSON.parse(h.data || "{}");
2952
+ !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({
2875
2953
  onSuccess: () => {
2876
2954
  p();
2877
2955
  }
@@ -2880,31 +2958,31 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2880
2958
  } catch {
2881
2959
  console.error(
2882
2960
  `${ke} - Invalid WebSocket message:`,
2883
- v.data
2961
+ h.data
2884
2962
  );
2885
2963
  }
2886
- }, h = ({ event: m, data: v, module: C = "HELPDESK_CHAT" }) => {
2964
+ }, E = ({ event: b, data: h, module: m = "HELPDESK_CHAT" }) => {
2887
2965
  var j;
2888
2966
  (j = t == null ? void 0 : t.current) == null || j.send(
2889
2967
  JSON.stringify({
2890
- EVENT: m,
2891
- DATA: v,
2892
- MODULE: C
2968
+ EVENT: b,
2969
+ DATA: h,
2970
+ MODULE: m
2893
2971
  })
2894
2972
  );
2895
2973
  };
2896
- return Z(() => {
2897
- b.current || p();
2974
+ return X(() => {
2975
+ C.current || p();
2898
2976
  }, []), /* @__PURE__ */ n.jsx(
2899
2977
  mt.Provider,
2900
2978
  {
2901
2979
  value: {
2902
2980
  ws: t == null ? void 0 : t.current,
2903
- onSendMsg: h,
2981
+ onSendMsg: E,
2904
2982
  userOnline: c,
2905
2983
  connectWebSocket: p,
2906
- retryCountState: a,
2907
- setRetryCountState: d,
2984
+ retryCountState: d,
2985
+ setRetryCountState: a,
2908
2986
  retryCountRef: s,
2909
2987
  isGetResponse: u,
2910
2988
  setGetResponse: f
@@ -2912,13 +2990,13 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2912
2990
  children: e
2913
2991
  }
2914
2992
  );
2915
- }, Nr = () => {
2916
- var a;
2917
- const { widgetProps: e } = q(), { listTicket: t, setTicketId: s, loadingListTicket: r } = ve(), { onSendMsg: i, setGetResponse: c } = he(), { xs: o } = ge.useBreakpoint();
2993
+ }, 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();
2918
2996
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2919
- /* @__PURE__ */ n.jsx(Rr, {}),
2920
- r ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (a = Array.from({ length: 5 })) == null ? void 0 : a.map((d, u) => /* @__PURE__ */ n.jsx(
2921
- de.Input,
2997
+ /* @__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(
2999
+ ue.Input,
2922
3000
  {
2923
3001
  style: { height: 80, width: "100%", borderRadius: 8 }
2924
3002
  },
@@ -2930,18 +3008,18 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2930
3008
  ...(t == null ? void 0 : t.length) === 0 && {
2931
3009
  style: { justifyContent: "center" }
2932
3010
  },
2933
- children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((d, u) => /* @__PURE__ */ bn(
2934
- Sr,
3011
+ children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((a, u) => /* @__PURE__ */ bn(
3012
+ Lr,
2935
3013
  {
2936
- ...d,
3014
+ ...a,
2937
3015
  key: u,
2938
3016
  onClick: () => {
2939
- c(!0), i({
3017
+ c(!0), l({
2940
3018
  event: "JOIN_ROOM",
2941
3019
  data: {
2942
- TASK_ID: d == null ? void 0 : d.TASK_ID
3020
+ TASK_ID: a == null ? void 0 : a.TASK_ID
2943
3021
  }
2944
- }), s(d == null ? void 0 : d.TASK_ID);
3022
+ }), s(a == null ? void 0 : a.TASK_ID);
2945
3023
  }
2946
3024
  }
2947
3025
  )) : /* @__PURE__ */ n.jsx(
@@ -2959,19 +3037,19 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2959
3037
  }
2960
3038
  )
2961
3039
  ] });
2962
- }, Mr = O(Nr), Fr = ({ children: e, open: t, onClose: s, footer: r, styleContainer: i }) => {
3040
+ }, Fr = R(Mr), Hr = ({ children: e, open: t, onClose: s, footer: r, styleContainer: l }) => {
2963
3041
  var g;
2964
- const [c, o] = D(!1), a = z(), d = z(null), u = z(), f = R(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), x = (b) => {
2965
- b.code === "Escape" && !b.shiftKey && !b.altKey && !b.ctrlKey && b.key === "Escape" && (b.stopPropagation(), typeof s == "function" && s());
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());
2966
3044
  };
2967
- return Z(() => {
2968
- const b = u.current;
2969
- return b && (clearTimeout(d.current), d.current = setTimeout(() => {
2970
- b == null || b.focus();
2971
- }, 250), b == null || b.addEventListener("keydown", x)), t && o(!1), clearTimeout(a == null ? void 0 : a.current), a.current = setTimeout(() => {
3045
+ return X(() => {
3046
+ const C = u.current;
3047
+ return C && (clearTimeout(a.current), a.current = setTimeout(() => {
3048
+ 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(() => {
2972
3050
  t || o(!0);
2973
3051
  }, 300), () => {
2974
- b && (b == null || b.removeEventListener("keydown", x));
3052
+ C && (C == null || C.removeEventListener("keydown", x));
2975
3053
  };
2976
3054
  }, [t]), /* @__PURE__ */ n.jsxs(
2977
3055
  "div",
@@ -2982,8 +3060,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2982
3060
  style: {
2983
3061
  display: c ? "none" : "block",
2984
3062
  height: "100%",
2985
- ...((g = Object == null ? void 0 : Object.keys(i || {})) == null ? void 0 : g.length) > 0 && {
2986
- ...i
3063
+ ...((g = Object == null ? void 0 : Object.keys(l || {})) == null ? void 0 : g.length) > 0 && {
3064
+ ...l
2987
3065
  }
2988
3066
  },
2989
3067
  children: [
@@ -2992,19 +3070,19 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
2992
3070
  ]
2993
3071
  }
2994
3072
  );
2995
- }, bt = O(Fr), vt = Te({}), De = () => ye(vt), Hr = ({ children: e }) => {
2996
- const [t, s] = D([]), [r, i] = D({}), [c, o] = D(!0), [a, d] = D({}), u = z(!1), f = en(), { ticketId: x } = ve(), { ws: g, setGetResponse: b } = he(), { parsedJWT: y } = q(), w = R(() => {
3073
+ }, 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(() => {
2997
3075
  var S;
2998
- const m = (r == null ? void 0 : r.CREATED_BY) ?? {}, v = (r == null ? void 0 : r.ASSIGNEE) ?? {}, C = (r == null ? void 0 : r.OTHER_ASSIGNEE) ?? [], j = (S = [m, v, ...C].map((I) => ({
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) => ({
2999
3077
  ...I
3000
3078
  }))) == null ? void 0 : S.filter((I) => {
3001
3079
  var B;
3002
3080
  return ((B = Object.keys(I || {})) == null ? void 0 : B.length) > 0;
3003
3081
  });
3004
3082
  return Tn({ ArrObj: j, key: "EMP_ID" });
3005
- }, [r]), A = () => {
3006
- var m, v;
3007
- o(!0), (v = (m = f({
3083
+ }, [r]), _ = () => {
3084
+ var b, h;
3085
+ o(!0), (h = (b = f({
3008
3086
  endpoint: "/helpdesk/chat/list",
3009
3087
  method: "POST",
3010
3088
  data: {
@@ -3012,10 +3090,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3012
3090
  PAGE: 1,
3013
3091
  TASK_ID: x
3014
3092
  }
3015
- })) == null ? void 0 : m.then((C) => {
3093
+ })) == null ? void 0 : b.then((m) => {
3016
3094
  var j, S, I, B, M, L;
3017
- if (((I = (S = (j = C == null ? void 0 : C.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST) == null ? void 0 : I.length) > 0) {
3018
- const F = (L = (M = (B = C == null ? void 0 : C.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST) == null ? void 0 : L.map(($) => ({
3095
+ if (((I = (S = (j = m == null ? void 0 : m.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST) == null ? void 0 : I.length) > 0) {
3096
+ const F = (L = (M = (B = m == null ? void 0 : m.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST) == null ? void 0 : L.map(($) => ({
3019
3097
  ...$,
3020
3098
  ACTOR: {
3021
3099
  ...$ == null ? void 0 : $.ACTOR
@@ -3024,43 +3102,43 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3024
3102
  s(Qe(F));
3025
3103
  } else
3026
3104
  s({});
3027
- })) == null || v.finally(() => {
3105
+ })) == null || h.finally(() => {
3028
3106
  o(!1);
3029
3107
  });
3030
3108
  }, p = () => {
3031
- var m;
3032
- (m = f({
3109
+ var b;
3110
+ (b = f({
3033
3111
  endpoint: "/helpdesk/myticket/get",
3034
3112
  method: "POST",
3035
3113
  data: {
3036
3114
  TASK_ID: x
3037
3115
  }
3038
- })) == null || m.then((v) => {
3039
- var C, j, S;
3040
- if ((C = v == null ? void 0 : v.data) != null && C.DATA) {
3041
- const I = (S = (j = v == null ? void 0 : v.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST;
3042
- i(I);
3116
+ })) == null || b.then((h) => {
3117
+ var m, j, S;
3118
+ if ((m = h == null ? void 0 : h.data) != null && m.DATA) {
3119
+ const I = (S = (j = h == null ? void 0 : h.data) == null ? void 0 : j.DATA) == null ? void 0 : S.LIST;
3120
+ l(I);
3043
3121
  } else
3044
- i({});
3122
+ l({});
3045
3123
  });
3046
- }, E = (m) => {
3124
+ }, v = (b) => {
3047
3125
  var j;
3048
- const v = (j = m == null ? void 0 : m.ACTOR) == null ? void 0 : j.EMP_ID, C = y == null ? void 0 : y.EMP_ID;
3049
- b(!0), d((S) => ({
3126
+ const h = (j = b == null ? void 0 : b.ACTOR) == null ? void 0 : j.EMP_ID, m = y == null ? void 0 : y.EMP_ID;
3127
+ C(!0), a((S) => ({
3050
3128
  ...S,
3051
- [v]: !1
3129
+ [h]: !1
3052
3130
  })), u.current || s((S) => {
3053
- const I = yn(S), B = v == C ? "to" : "from", M = [...I, { ...m, CHAT_ALIGN: B }];
3131
+ const I = yn(S), B = h == m ? "to" : "from", M = [...I, { ...b, CHAT_ALIGN: B }];
3054
3132
  return Qe(M);
3055
3133
  }), u.current = !1;
3056
- }, h = (m) => {
3057
- if ((m == null ? void 0 : m.data) !== "PING") {
3058
- const v = JSON.parse((m == null ? void 0 : m.data) || "{}"), { DATA: C = {}, EVENT: j = "" } = v ?? {};
3059
- (j === "RECEIVE_MESSAGE" || j === "RECEIVE_ANOTHER_MESSAGE") && E(C);
3134
+ }, E = (b) => {
3135
+ if ((b == null ? void 0 : b.data) !== "PING") {
3136
+ const h = JSON.parse((b == null ? void 0 : b.data) || "{}"), { DATA: m = {}, EVENT: j = "" } = h ?? {};
3137
+ (j === "RECEIVE_MESSAGE" || j === "RECEIVE_ANOTHER_MESSAGE") && v(m);
3060
3138
  }
3061
3139
  };
3062
- return Z(() => (x && (A(), p()), g && x && (g == null || g.addEventListener("message", h)), () => {
3063
- g && x && (g == null || g.removeEventListener("message", h));
3140
+ return X(() => (x && (_(), p()), g && x && (g == null || g.addEventListener("message", E)), () => {
3141
+ g && x && (g == null || g.removeEventListener("message", E));
3064
3142
  }), [x]), /* @__PURE__ */ n.jsx(
3065
3143
  vt.Provider,
3066
3144
  {
@@ -3071,28 +3149,28 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3071
3149
  employees: w,
3072
3150
  isFromSelf: u,
3073
3151
  loadingChats: c,
3074
- objTypingOtherEmp: a,
3075
- setTypingOtherEmp: d
3152
+ objTypingOtherEmp: d,
3153
+ setTypingOtherEmp: a
3076
3154
  },
3077
3155
  children: e
3078
3156
  }
3079
3157
  );
3080
- }, Ir = ({ onClose: e }) => {
3081
- const { xs: t } = ge.useBreakpoint(), { employees: s, detailTicket: r, loadingChats: i } = De(), { userOnline: c } = he(), o = R(() => {
3082
- var d;
3083
- return (d = s == null ? void 0 : s.map((u) => u == null ? void 0 : u.FULL_NAME)) == null ? void 0 : d.join(", ");
3084
- }, [s]), a = R(() => t ? "click" : "hover", [t]);
3085
- return i ? /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
3086
- /* @__PURE__ */ n.jsx(de.Avatar, {}),
3158
+ }, $r = ({ onClose: e }) => {
3159
+ const { xs: t } = Ce.useBreakpoint(), { employees: s, detailTicket: r, loadingChats: l } = De(), { userOnline: c } = he(), o = O(() => {
3160
+ 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: [
3164
+ /* @__PURE__ */ n.jsx(ue.Avatar, {}),
3087
3165
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
3088
- /* @__PURE__ */ n.jsx(de.Input, {}),
3089
- /* @__PURE__ */ n.jsx(de.Input, { size: "small" })
3166
+ /* @__PURE__ */ n.jsx(ue.Input, {}),
3167
+ /* @__PURE__ */ n.jsx(ue.Input, { size: "small" })
3090
3168
  ] }),
3091
- /* @__PURE__ */ n.jsx(de.Input, {})
3169
+ /* @__PURE__ */ n.jsx(ue.Input, {})
3092
3170
  ] }) : /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
3093
3171
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
3094
3172
  /* @__PURE__ */ n.jsx(
3095
- G,
3173
+ z,
3096
3174
  {
3097
3175
  icon: /* @__PURE__ */ n.jsx(P, { type: "down" }),
3098
3176
  style: { border: "none" },
@@ -3105,15 +3183,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3105
3183
  Ee.Group,
3106
3184
  {
3107
3185
  maxCount: 2,
3108
- maxPopoverTrigger: a,
3186
+ maxPopoverTrigger: d,
3109
3187
  maxStyle: {
3110
3188
  color: "#f56a00",
3111
3189
  backgroundColor: "#fde3cf",
3112
3190
  cursor: "pointer"
3113
3191
  },
3114
- children: s == null ? void 0 : s.map((d, u) => {
3115
- const f = c == null ? void 0 : c.includes(d == null ? void 0 : d.EMP_ID);
3116
- return /* @__PURE__ */ n.jsx(Se, { title: d == null ? void 0 : d.FULL_NAME, trigger: a, children: /* @__PURE__ */ bn(
3192
+ children: s == null ? void 0 : s.map((a, u) => {
3193
+ 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(
3117
3195
  Ee,
3118
3196
  {
3119
3197
  ...f && {
@@ -3122,9 +3200,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3122
3200
  borderRadius: "50%"
3123
3201
  }
3124
3202
  },
3125
- src: d == null ? void 0 : d.PHOTO,
3203
+ src: a == null ? void 0 : a.PHOTO,
3126
3204
  key: u,
3127
- nameFallback: d == null ? void 0 : d.FULL_NAME
3205
+ nameFallback: a == null ? void 0 : a.FULL_NAME
3128
3206
  }
3129
3207
  ) }, u);
3130
3208
  })
@@ -3135,16 +3213,16 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3135
3213
  Se,
3136
3214
  {
3137
3215
  title: `${r == null ? void 0 : r.TASK_CODE} - ${r == null ? void 0 : r.SUBJECT}`,
3138
- trigger: a,
3139
- children: /* @__PURE__ */ n.jsxs(Y.Text, { className: "w-ticket-detail-header-text", children: [
3216
+ trigger: d,
3217
+ children: /* @__PURE__ */ n.jsxs(V.Text, { className: "w-ticket-detail-header-text", children: [
3140
3218
  r == null ? void 0 : r.TASK_CODE,
3141
3219
  " - ",
3142
3220
  r == null ? void 0 : r.SUBJECT
3143
3221
  ] })
3144
3222
  }
3145
3223
  ),
3146
- /* @__PURE__ */ n.jsx(Se, { title: o, trigger: a, children: /* @__PURE__ */ n.jsx(
3147
- Y.Text,
3224
+ /* @__PURE__ */ n.jsx(Se, { title: o, trigger: d, children: /* @__PURE__ */ n.jsx(
3225
+ V.Text,
3148
3226
  {
3149
3227
  type: "secondary",
3150
3228
  className: "w-ticket-detail-header-text",
@@ -3158,8 +3236,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3158
3236
  ] }),
3159
3237
  /* @__PURE__ */ n.jsx(xt, { taskStatus: r == null ? void 0 : r.STATUS })
3160
3238
  ] });
3161
- }, $r = O(Ir), Br = ({ ...e }) => {
3162
- const t = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
3239
+ }, Br = R($r), Ur = ({ ...e }) => {
3240
+ const t = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
3163
3241
  return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${t}`}`, children: [
3164
3242
  /* @__PURE__ */ n.jsx(
3165
3243
  "p",
@@ -3178,25 +3256,25 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3178
3256
  }
3179
3257
  )
3180
3258
  ] });
3181
- }, Ur = O(Br), Wr = ({ ...e }) => {
3182
- const t = _("Download", "Download"), s = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), r = R(() => {
3183
- var d;
3184
- const a = e == null ? void 0 : e.ATTACHMENT;
3185
- if (a)
3259
+ }, 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(() => {
3261
+ var a;
3262
+ const d = e == null ? void 0 : e.ATTACHMENT;
3263
+ if (d)
3186
3264
  try {
3187
- const u = new URL(a), f = (d = u == null ? void 0 : u.pathname) == null ? void 0 : d.split("/");
3265
+ const u = new URL(d), f = (a = u == null ? void 0 : u.pathname) == null ? void 0 : a.split("/");
3188
3266
  return f == null ? void 0 : f[(f == null ? void 0 : f.length) - 1];
3189
3267
  } catch {
3190
- return a;
3268
+ return d;
3191
3269
  }
3192
3270
  return "";
3193
- }, [e]), i = R(() => {
3271
+ }, [e]), l = O(() => {
3194
3272
  if (r != null && r.includes(".")) {
3195
- const a = r == null ? void 0 : r.split(".");
3196
- return `.${a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1]}`;
3273
+ const d = r == null ? void 0 : r.split(".");
3274
+ return `.${d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]}`;
3197
3275
  }
3198
3276
  return "";
3199
- }, [e, r]), c = R(() => dn == null ? void 0 : dn.includes(i), [e, i]), o = () => {
3277
+ }, [e, r]), c = O(() => dn == null ? void 0 : dn.includes(l), [e, l]), o = () => {
3200
3278
  En({
3201
3279
  downloadURL: e == null ? void 0 : e.ATTACHMENT,
3202
3280
  fileName: r,
@@ -3209,10 +3287,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3209
3287
  className: `w-bubble-chat ${`w-${s}`}`,
3210
3288
  style: { display: "flex", flexDirection: "column" },
3211
3289
  children: [
3212
- c ? /* @__PURE__ */ n.jsx(wn, { src: e == null ? void 0 : e.ATTACHMENT, fallback: hs }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
3290
+ 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: [
3213
3291
  /* @__PURE__ */ n.jsx(P, { type: "file" }),
3214
3292
  /* @__PURE__ */ n.jsx(
3215
- Y.Link,
3293
+ V.Link,
3216
3294
  {
3217
3295
  onClick: o,
3218
3296
  style: { display: "block", width: 160 },
@@ -3221,7 +3299,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3221
3299
  )
3222
3300
  ] }),
3223
3301
  c && /* @__PURE__ */ n.jsx(
3224
- G,
3302
+ z,
3225
3303
  {
3226
3304
  onClick: o,
3227
3305
  style: {
@@ -3246,8 +3324,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3246
3324
  ]
3247
3325
  }
3248
3326
  ) });
3249
- }, Vr = O(Wr), Gr = ({ ...e }) => {
3250
- const t = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
3327
+ }, Gr = R(Vr), zr = ({ ...e }) => {
3328
+ const t = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
3251
3329
  return /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-info-chat-container", children: [
3252
3330
  /* @__PURE__ */ n.jsx(
3253
3331
  We,
@@ -3257,47 +3335,47 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3257
3335
  sender: t
3258
3336
  }
3259
3337
  ),
3260
- /* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.MESSAGE })
3338
+ /* @__PURE__ */ n.jsx(V.Text, { children: e == null ? void 0 : e.MESSAGE })
3261
3339
  ] });
3262
- }, zr = O(Gr), ht = () => {
3263
- const { widgetProps: e } = q(), t = pe.enc.Hex.parse(
3340
+ }, Yr = R(zr), ht = () => {
3341
+ const { widgetProps: e } = J(), t = pe.enc.Hex.parse(
3264
3342
  pe.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
3265
3343
  ), s = {
3266
3344
  mode: pe.mode.ECB,
3267
3345
  padding: pe.pad.Pkcs7
3268
3346
  }, r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|GreatDayHR/i.test(
3269
3347
  navigator.userAgent
3270
- ), i = (o) => {
3348
+ ), l = (o) => {
3271
3349
  if (typeof o == "number" && (o = o.toString()), !o) return "";
3272
3350
  if (r) return window.encodeURIComponent(o);
3273
- const a = pe.enc.Utf8.parse(o), d = pe.AES.encrypt(
3274
- a,
3351
+ const d = pe.enc.Utf8.parse(o), a = pe.AES.encrypt(
3352
+ d,
3275
3353
  t,
3276
3354
  s
3277
3355
  ).toString();
3278
- return window.encodeURIComponent(`$${d}`);
3356
+ return window.encodeURIComponent(`$${a}`);
3279
3357
  };
3280
3358
  return {
3281
3359
  paramsEncrypt: (o) => {
3282
- const [a, d = null] = o.split("?"), u = a.split("/").map((f) => {
3360
+ const [d, a = null] = o.split("?"), u = d.split("/").map((f) => {
3283
3361
  const [, x = null] = f.split(":");
3284
- return x && (e != null && e.keyEncrypt) ? i(x) : f;
3362
+ return x && (e != null && e.keyEncrypt) ? l(x) : f;
3285
3363
  }).join("/");
3286
- return d ? `${u}?${d}` : u;
3364
+ return a ? `${u}?${a}` : u;
3287
3365
  },
3288
- encrypt: i
3366
+ encrypt: l
3289
3367
  };
3290
- }, Yr = ({ ...e }) => {
3291
- const t = _("ViewFAQ", "View FAQ"), s = _(
3368
+ }, Kr = ({ ...e }) => {
3369
+ const t = k("ViewFAQ", "View FAQ"), s = k(
3292
3370
  "FAQUnavailable",
3293
3371
  "FAQ unavailable"
3294
- ), r = _(
3372
+ ), r = k(
3295
3373
  "ThisFAQIsUnavailable",
3296
3374
  "This FAQ is unavailable"
3297
- ), { paramsEncrypt: i } = ht(), { history: c } = q(), o = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), a = R(() => e == null ? void 0 : e.FAQ_ID, [e]);
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]);
3298
3376
  return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
3299
3377
  /* @__PURE__ */ n.jsx(
3300
- Y.Text,
3378
+ V.Text,
3301
3379
  {
3302
3380
  style: {
3303
3381
  backgroundColor: "rgb(244, 245, 246)",
@@ -3307,21 +3385,21 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3307
3385
  marginBottom: 8,
3308
3386
  display: "block"
3309
3387
  },
3310
- children: a ? e == null ? void 0 : e.MESSAGE : s
3388
+ children: d ? e == null ? void 0 : e.MESSAGE : s
3311
3389
  }
3312
3390
  ),
3313
- a ? /* @__PURE__ */ n.jsx(
3314
- G,
3391
+ d ? /* @__PURE__ */ n.jsx(
3392
+ z,
3315
3393
  {
3316
3394
  block: !0,
3317
3395
  onClick: () => {
3318
3396
  typeof c < "u" && c.push(
3319
- i(`/standard/hrm.helpdesk.FAQ-detail/:${a}`)
3397
+ l(`/standard/hrm.helpdesk.FAQ-detail/:${d}`)
3320
3398
  );
3321
3399
  },
3322
3400
  children: t
3323
3401
  }
3324
- ) : /* @__PURE__ */ n.jsx(Y.Text, { children: r }),
3402
+ ) : /* @__PURE__ */ n.jsx(V.Text, { children: r }),
3325
3403
  /* @__PURE__ */ n.jsx(
3326
3404
  We,
3327
3405
  {
@@ -3331,42 +3409,42 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3331
3409
  }
3332
3410
  )
3333
3411
  ] });
3334
- }, Kr = O(Yr), qr = ({ ...e }) => {
3412
+ }, qr = R(Kr), Jr = ({ ...e }) => {
3335
3413
  switch (e == null ? void 0 : e.CHAT_TYPE) {
3336
3414
  case "info":
3337
- return /* @__PURE__ */ n.jsx(zr, { ...e });
3415
+ return /* @__PURE__ */ n.jsx(Yr, { ...e });
3338
3416
  case "faq":
3339
- return /* @__PURE__ */ n.jsx(Kr, { ...e });
3417
+ return /* @__PURE__ */ n.jsx(qr, { ...e });
3340
3418
  case "chat":
3341
- return e != null && e.ATTACHMENT ? /* @__PURE__ */ n.jsx(Vr, { ...e }) : /* @__PURE__ */ n.jsx(Ur, { ...e });
3419
+ return e != null && e.ATTACHMENT ? /* @__PURE__ */ n.jsx(Gr, { ...e }) : /* @__PURE__ */ n.jsx(Wr, { ...e });
3342
3420
  default:
3343
3421
  return null;
3344
3422
  }
3345
- }, Jr = O(qr), Qr = () => {
3423
+ }, Qr = R(Jr), Zr = () => {
3346
3424
  var y;
3347
- const [e, t] = D([]), s = _("And", "and"), r = _("IsTyping", "Is Typing"), i = _("People", "People"), { employees: c, setTypingOtherEmp: o, objTypingOtherEmp: a } = De(), { ws: d, setGetResponse: u } = he(), { parsedJWT: f } = q(), x = R(() => e == null ? void 0 : e.filter((w) => a == null ? void 0 : a[w == null ? void 0 : w.EMP_ID]), [a, e]), g = R(() => {
3348
- const w = x == null ? void 0 : x.map((A) => A == null ? void 0 : A.FULL_NAME);
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);
3349
3427
  if ((x == null ? void 0 : x.length) > 2) {
3350
- const A = w == null ? void 0 : w.filter((E, h) => h <= 1), p = w == null ? void 0 : w.filter((E, h) => h > 1);
3351
- return `${A == null ? void 0 : A.join(", ")}, ${s} ${p == null ? void 0 : p.length} ${i} ${r}`;
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}`;
3352
3430
  }
3353
3431
  return `${w == null ? void 0 : w.join(", ")} ${r}`;
3354
- }, [e, x]), b = (w) => {
3432
+ }, [e, x]), C = (w) => {
3355
3433
  if ((w == null ? void 0 : w.data) !== "PING") {
3356
- const A = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: p = {}, EVENT: E = "" } = A ?? {}, h = p == null ? void 0 : p.EMPLOYEE_ID, m = f == null ? void 0 : f.EMP_ID;
3357
- if (E === "TYPING") {
3358
- h === m ? u(!1) : o((j) => ({
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;
3435
+ if (v === "TYPING") {
3436
+ E === b ? u(!1) : o((j) => ({
3359
3437
  ...j,
3360
- [h]: p == null ? void 0 : p.IS_TYPING
3438
+ [E]: p == null ? void 0 : p.IS_TYPING
3361
3439
  }));
3362
- const v = c == null ? void 0 : c.find(
3440
+ const h = c == null ? void 0 : c.find(
3363
3441
  (j) => (j == null ? void 0 : j.EMP_ID) === (p == null ? void 0 : p.EMPLOYEE_ID)
3364
- ), C = {
3442
+ ), m = {
3365
3443
  ...p,
3366
- ...v
3444
+ ...h
3367
3445
  };
3368
3446
  t((j) => {
3369
- const S = [...j, C], I = Tn({
3447
+ const S = [...j, m], I = Tn({
3370
3448
  ArrObj: S,
3371
3449
  key: "EMPLOYEE_ID"
3372
3450
  });
@@ -3375,9 +3453,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3375
3453
  }
3376
3454
  }
3377
3455
  };
3378
- return Z(() => (d && (d == null || d.addEventListener("message", b)), () => {
3379
- d && (d == null || d.removeEventListener("message", b));
3380
- }), [c]), (y = Object.values(a || {})) != null && y.every((w) => w === !1) ? null : /* @__PURE__ */ n.jsxs(
3456
+ return X(() => (a && (a == null || a.addEventListener("message", C)), () => {
3457
+ a && (a == null || a.removeEventListener("message", C));
3458
+ }), [c]), (y = Object.values(d || {})) != null && y.every((w) => w === !1) ? null : /* @__PURE__ */ n.jsxs(
3381
3459
  "div",
3382
3460
  {
3383
3461
  style: {
@@ -3396,66 +3474,66 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3396
3474
  backgroundColor: "#fde3cf",
3397
3475
  cursor: "pointer"
3398
3476
  },
3399
- children: x == null ? void 0 : x.map((w, A) => /* @__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 }) }, A))
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 }) }, _))
3400
3478
  }
3401
3479
  ),
3402
- /* @__PURE__ */ n.jsx(Y.Text, { children: g }),
3480
+ /* @__PURE__ */ n.jsx(V.Text, { children: g }),
3403
3481
  (x == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsx(ft, {}) : null
3404
3482
  ]
3405
3483
  }
3406
3484
  );
3407
- }, Zr = O(Qr), Xr = () => {
3485
+ }, Xr = R(Zr), Pr = () => {
3408
3486
  var c;
3409
- const { chats: e } = De(), { widgetProps: t } = q(), { activeTab: s } = be(), r = z(), { xs: i } = ge.useBreakpoint();
3410
- return Z(() => {
3487
+ const { chats: e } = De(), { widgetProps: t } = J(), { activeTab: s } = be(), r = Y(), { xs: l } = Ce.useBreakpoint();
3488
+ return X(() => {
3411
3489
  clearTimeout(r.current), r.current = setTimeout(() => {
3412
3490
  me(".w-ticket-detail-content-container");
3413
3491
  }, 350);
3414
3492
  }, [s]), /* @__PURE__ */ n.jsxs(
3415
3493
  "div",
3416
3494
  {
3417
- className: `w-ticket-detail-content-container ${i ? t != null && t.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
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" : ""} `,
3418
3496
  children: [
3419
3497
  (c = Object.keys(e || {})) == null ? void 0 : c.map((o) => {
3420
- var d, u;
3421
- const a = e == null ? void 0 : e[o];
3498
+ var a, u;
3499
+ const d = e == null ? void 0 : e[o];
3422
3500
  return /* @__PURE__ */ n.jsxs(gn, { children: [
3423
- /* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (d = le(o)) == null ? void 0 : d.format("ddd, DD MMMM YYYY") }),
3424
- /* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(a)) == null ? void 0 : u.map((f, x) => {
3501
+ /* @__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) => {
3425
3503
  var y, w;
3426
- const g = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", b = f == null ? void 0 : f.CHAT_TYPE;
3504
+ const g = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", C = f == null ? void 0 : f.CHAT_TYPE;
3427
3505
  return /* @__PURE__ */ n.jsxs(gn, { children: [
3428
- g === "response" && b !== "info" && /* @__PURE__ */ n.jsx(
3506
+ g === "response" && C !== "info" && /* @__PURE__ */ n.jsx(
3429
3507
  Ue,
3430
3508
  {
3431
3509
  src: (y = f == null ? void 0 : f.ACTOR) == null ? void 0 : y.PHOTO,
3432
3510
  name: (w = f == null ? void 0 : f.ACTOR) == null ? void 0 : w.FULL_NAME
3433
3511
  }
3434
3512
  ),
3435
- /* @__PURE__ */ n.jsx(Jr, { ...f })
3513
+ /* @__PURE__ */ n.jsx(Qr, { ...f })
3436
3514
  ] }, x);
3437
3515
  }) })
3438
3516
  ] }, o);
3439
3517
  }),
3440
- /* @__PURE__ */ n.jsx(Zr, {})
3518
+ /* @__PURE__ */ n.jsx(Xr, {})
3441
3519
  ]
3442
3520
  }
3443
3521
  );
3444
- }, Pr = O(Xr), eo = () => {
3522
+ }, eo = R(Pr), no = () => {
3445
3523
  var c, o;
3446
- const { chats: e, loadingChats: t } = De(), { widgetProps: s } = q(), { xs: r } = ge.useBreakpoint(), i = R(() => {
3447
- var d;
3448
- const a = [fn];
3449
- return r && (s != null && s.isSF ? a == null || a.push(
3524
+ const { chats: e, loadingChats: t } = De(), { widgetProps: s } = J(), { xs: r } = Ce.useBreakpoint(), l = O(() => {
3525
+ var a;
3526
+ const d = [fn];
3527
+ return r && (s != null && s.isSF ? d == null || d.push(
3450
3528
  `${fn}-sf-mobile`
3451
- ) : a == null || a.push(`${fn}-mobile`)), (d = a == null ? void 0 : a.filter(Boolean)) == null ? void 0 : d.join(" ");
3529
+ ) : d == null || d.push(`${fn}-mobile`)), (a = d == null ? void 0 : d.filter(Boolean)) == null ? void 0 : a.join(" ");
3452
3530
  }, [r, s == null ? void 0 : s.isSF]);
3453
3531
  return t ? /* @__PURE__ */ n.jsx(
3454
3532
  "div",
3455
3533
  {
3456
- className: `${i} w-ticket-detail-loading-chats`,
3457
- children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((a, d) => {
3458
- const u = d % 2 === 0;
3534
+ className: `${l} w-ticket-detail-loading-chats`,
3535
+ children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((d, a) => {
3536
+ const u = a % 2 === 0;
3459
3537
  return /* @__PURE__ */ n.jsxs(
3460
3538
  "div",
3461
3539
  {
@@ -3467,7 +3545,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3467
3545
  }
3468
3546
  },
3469
3547
  children: [
3470
- /* @__PURE__ */ n.jsx("div", { style: { order: u ? 2 : 1 }, children: /* @__PURE__ */ n.jsx(de.Avatar, {}) }),
3548
+ /* @__PURE__ */ n.jsx("div", { style: { order: u ? 2 : 1 }, children: /* @__PURE__ */ n.jsx(ue.Avatar, {}) }),
3471
3549
  /* @__PURE__ */ n.jsxs(
3472
3550
  "div",
3473
3551
  {
@@ -3478,9 +3556,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3478
3556
  order: u ? 1 : 2
3479
3557
  },
3480
3558
  children: [
3481
- /* @__PURE__ */ n.jsx(de.Input, { style: { width: 120, borderRadius: 8 } }),
3559
+ /* @__PURE__ */ n.jsx(ue.Input, { style: { width: 120, borderRadius: 8 } }),
3482
3560
  /* @__PURE__ */ n.jsx(
3483
- de.Input,
3561
+ ue.Input,
3484
3562
  {
3485
3563
  style: { height: 50, width: "100%", borderRadius: 8 }
3486
3564
  }
@@ -3490,14 +3568,14 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3490
3568
  )
3491
3569
  ]
3492
3570
  },
3493
- d
3571
+ a
3494
3572
  );
3495
3573
  })
3496
3574
  }
3497
3575
  ) : ((o = Object.keys(e || {})) == null ? void 0 : o.length) === 0 ? /* @__PURE__ */ n.jsx(
3498
3576
  "div",
3499
3577
  {
3500
- className: i,
3578
+ className: l,
3501
3579
  style: {
3502
3580
  display: "flex",
3503
3581
  justifyContent: "center",
@@ -3505,9 +3583,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3505
3583
  },
3506
3584
  children: /* @__PURE__ */ n.jsx(Xn, {})
3507
3585
  }
3508
- ) : /* @__PURE__ */ n.jsx(Pr, {});
3509
- }, no = O(eo), to = ({ ...e }) => {
3510
- const t = z(0);
3586
+ ) : /* @__PURE__ */ n.jsx(eo, {});
3587
+ }, to = R(no), so = ({ ...e }) => {
3588
+ const t = Y(0);
3511
3589
  return /* @__PURE__ */ n.jsxs(
3512
3590
  "div",
3513
3591
  {
@@ -3522,7 +3600,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3522
3600
  nameFallback: e == null ? void 0 : e.FULL_NAME,
3523
3601
  src: e == null ? void 0 : e.PHOTO,
3524
3602
  width: 80,
3525
- placeholder: /* @__PURE__ */ n.jsx(de.Image, { style: { width: "100%", height: "100%" } }),
3603
+ placeholder: /* @__PURE__ */ n.jsx(ue.Image, { style: { width: "100%", height: "100%" } }),
3526
3604
  style: { borderRadius: 8 },
3527
3605
  preview: !1,
3528
3606
  loading: "lazy",
@@ -3532,25 +3610,25 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3532
3610
  }
3533
3611
  ),
3534
3612
  /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
3535
- /* @__PURE__ */ n.jsx(Y.Text, { strong: !0, style: { fontSize: 18 }, children: e == null ? void 0 : e.FULL_NAME }),
3536
- /* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.POSITION_NAME }, e == null ? void 0 : e.POSITION_NAME),
3537
- /* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.DEPT_NAME }),
3538
- /* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.WORKLOCATION })
3613
+ /* @__PURE__ */ n.jsx(V.Text, { strong: !0, style: { fontSize: 18 }, children: e == null ? void 0 : e.FULL_NAME }),
3614
+ /* @__PURE__ */ n.jsx(V.Text, { children: e == null ? void 0 : e.POSITION_NAME }, e == null ? void 0 : e.POSITION_NAME),
3615
+ /* @__PURE__ */ n.jsx(V.Text, { children: e == null ? void 0 : e.DEPT_NAME }),
3616
+ /* @__PURE__ */ n.jsx(V.Text, { children: e == null ? void 0 : e.WORKLOCATION })
3539
3617
  ] })
3540
3618
  ]
3541
3619
  }
3542
3620
  );
3543
- }, so = O(to), ro = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
3544
- var p, E;
3545
- const s = en(), [r, i] = D({}), c = z(null), o = _(
3621
+ }, ro = R(so), oo = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
3622
+ var p, v;
3623
+ const s = en(), [r, l] = D({}), c = Y(null), o = k(
3546
3624
  "ImageMustSmallerThan",
3547
3625
  "Image must smaller than"
3548
- ), a = _(
3626
+ ), d = k(
3549
3627
  "MaximumFileSizeExceeded",
3550
3628
  "Maximum file size exceeded"
3551
- ), { onSendMsg: d } = he(), { employees: u, setChats: f, isFromSelf: x } = De(), { ticketId: g } = ve(), { activeTab: b } = be(), y = () => {
3552
- var h;
3553
- (h = s({
3629
+ ), { onSendMsg: a } = he(), { employees: u, setChats: f, isFromSelf: x } = De(), { ticketId: g } = ve(), { activeTab: C } = be(), y = () => {
3630
+ var E;
3631
+ (E = s({
3554
3632
  endpoint: "/upload/get-upload-config",
3555
3633
  data: {
3556
3634
  LIMIT: 1,
@@ -3559,51 +3637,51 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3559
3637
  UPLOAD_CODE: "helpdesk"
3560
3638
  }
3561
3639
  }
3562
- })) == null || h.then((m) => {
3563
- var C, j;
3564
- const v = (j = (C = m == null ? void 0 : m.data) == null ? void 0 : C.DATA) == null ? void 0 : j.LIST;
3565
- (v == null ? void 0 : v.length) > 0 && i(v == null ? void 0 : v[0]);
3640
+ })) == null || E.then((b) => {
3641
+ var m, j;
3642
+ 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]);
3566
3644
  });
3567
- }, w = (h) => {
3568
- var C, j, S;
3569
- const m = h.size / 1024 / 1024, v = (r == null ? void 0 : r.MAXFILESIZE) / 1024;
3570
- return m > v && ((C = Ce) == null || C.destroy(), (j = Ce) == null || j.config({
3645
+ }, w = (E) => {
3646
+ var m, j, S;
3647
+ const b = E.size / 1024 / 1024, h = (r == null ? void 0 : r.MAXFILESIZE) / 1024;
3648
+ return b > h && ((m = ie) == null || m.destroy(), (j = ie) == null || j.config({
3571
3649
  getContainer: () => document.querySelector(".w-widget-content-container"),
3572
3650
  top: 28,
3573
3651
  placement: "top"
3574
- }), (S = Ce) == null || S.error({
3575
- message: a,
3576
- description: `${o} ${v == null ? void 0 : v.toFixed(
3652
+ }), (S = ie) == null || S.error({
3653
+ message: d,
3654
+ description: `${o} ${h == null ? void 0 : h.toFixed(
3577
3655
  1
3578
3656
  )} MB!`,
3579
3657
  className: "w-notification-content",
3580
3658
  duration: 3
3581
3659
  })), !1;
3582
- }, A = (h) => {
3583
- var v, C;
3660
+ }, _ = (E) => {
3661
+ var h, m;
3584
3662
  e(!0);
3585
- const m = new FormData();
3586
- m.append("UPLOAD_CODE", r == null ? void 0 : r.UPLOAD_CODE), m.append("UPLOAD_TYPE", r == null ? void 0 : r.UPLOAD_TYPE), m.append("FILE", h), (C = (v = s({
3663
+ 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({
3587
3665
  endpoint: "/upload/temp",
3588
- data: m,
3666
+ data: b,
3589
3667
  headers: {
3590
3668
  "Content-Type": "multipart/form-data"
3591
3669
  }
3592
- })) == null ? void 0 : v.then((j) => {
3670
+ })) == null ? void 0 : h.then((j) => {
3593
3671
  var S, I, B, M, L;
3594
3672
  if ((I = (S = j == null ? void 0 : j.data) == null ? void 0 : S.DATA) != null && I.LIST) {
3595
3673
  const F = (M = (B = j == null ? void 0 : j.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST, $ = {
3596
3674
  ATTACHMENT: F == null ? void 0 : F.VIEW_PATH,
3597
3675
  FAQ_ID: null,
3598
3676
  MESSAGE: "",
3599
- CREATED_DATE: (L = le()) == null ? void 0 : L.format(`${hn} HH:mm:ss`),
3677
+ CREATED_DATE: (L = ae()) == null ? void 0 : L.format(`${hn} HH:mm:ss`),
3600
3678
  CHAT_ALIGN: "to",
3601
3679
  CHAT_TYPE: "chat"
3602
3680
  };
3603
3681
  f((H) => {
3604
- const Q = [...yn(H), $];
3605
- return Qe(Q);
3606
- }), x.current = !0, d({
3682
+ const Z = [...yn(H), $];
3683
+ return Qe(Z);
3684
+ }), x.current = !0, a({
3607
3685
  event: "SEND_MESSAGE",
3608
3686
  data: {
3609
3687
  ATTACHMENT: F == null ? void 0 : F.TEMP_PATH,
@@ -3616,26 +3694,26 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3616
3694
  me(".w-ticket-detail-content-container");
3617
3695
  }, 350);
3618
3696
  }
3619
- })) == null || C.finally(() => {
3697
+ })) == null || m.finally(() => {
3620
3698
  e(!1);
3621
3699
  });
3622
3700
  };
3623
- return Z(() => {
3701
+ return X(() => {
3624
3702
  y();
3625
- }, []), Z(() => {
3626
- var h;
3627
- (h = Ce) == null || h.destroy();
3628
- }, [b]), /* @__PURE__ */ n.jsx(
3703
+ }, []), X(() => {
3704
+ var E;
3705
+ (E = ie) == null || E.destroy();
3706
+ }, [C]), /* @__PURE__ */ n.jsx(
3629
3707
  Zn,
3630
3708
  {
3631
3709
  beforeUpload: w,
3632
3710
  fileList: [],
3633
- accept: (E = (p = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : p.split(",")) == null ? void 0 : E.map((h) => `.${h}`),
3634
- onChange: (h) => {
3635
- A(h == null ? void 0 : h.file);
3711
+ accept: (v = (p = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : p.split(",")) == null ? void 0 : v.map((E) => `.${E}`),
3712
+ onChange: (E) => {
3713
+ _(E == null ? void 0 : E.file);
3636
3714
  },
3637
3715
  children: /* @__PURE__ */ n.jsx(
3638
- G,
3716
+ z,
3639
3717
  {
3640
3718
  loading: t,
3641
3719
  icon: /* @__PURE__ */ n.jsx(P, { type: "paper-clip" }),
@@ -3645,89 +3723,89 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3645
3723
  )
3646
3724
  }
3647
3725
  );
3648
- }, oo = O(ro), co = (e) => {
3726
+ }, co = R(oo), io = (e) => {
3649
3727
  var r;
3650
- const t = z(null), s = z(null);
3651
- return s != null && s.current && ((r = s.current) == null || r.update(e)), Z(() => {
3728
+ const t = Y(null), s = Y(null);
3729
+ return s != null && s.current && ((r = s.current) == null || r.update(e)), X(() => {
3652
3730
  var c;
3653
- const i = (c = window == null ? void 0 : window.customElements) == null ? void 0 : c.get("em-emoji-picker");
3654
- return s.current = new (i || os)({ ...e, ref: t }), () => {
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 }), () => {
3655
3733
  s.current = null;
3656
3734
  };
3657
3735
  }, []), mn.createElement("div", { ref: t });
3658
- }, io = ({ refInput: e }) => {
3659
- const { xs: t } = ge.useBreakpoint(), s = R(() => t ? "click" : "hover", [t]), r = () => {
3736
+ }, lo = ({ refInput: e }) => {
3737
+ const { xs: t } = Ce.useBreakpoint(), s = O(() => t ? "click" : "hover", [t]), r = () => {
3660
3738
  var g;
3661
3739
  const c = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea;
3662
3740
  if (!c)
3663
3741
  return !1;
3664
- const { selectionStart: o, selectionEnd: a, value: d } = c, u = d == null ? void 0 : d.substring(0, o), f = d == null ? void 0 : d.substring(o, a), x = d == null ? void 0 : d.substring(a);
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);
3665
3743
  return {
3666
3744
  before: u,
3667
3745
  selectedText: f,
3668
3746
  after: x,
3669
3747
  selectionStart: o,
3670
- selectionEnd: a,
3671
- text: d
3748
+ selectionEnd: d,
3749
+ text: a
3672
3750
  };
3673
- }, i = (c) => {
3751
+ }, l = (c) => {
3674
3752
  var x, g;
3675
3753
  (x = e == null ? void 0 : e.current) == null || x.focus();
3676
- const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, a = c == null ? void 0 : c.native;
3754
+ const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, d = c == null ? void 0 : c.native;
3677
3755
  if (!o) return;
3678
- const { before: d, after: u } = r(), f = `${d}${a}${u}`;
3679
- typeof document.execCommand == "function" ? document.execCommand("insertText", !1, a) : o.value = f;
3756
+ const { before: a, after: u } = r(), f = `${a}${d}${u}`;
3757
+ typeof document.execCommand == "function" ? document.execCommand("insertText", !1, d) : o.value = f;
3680
3758
  };
3681
3759
  return /* @__PURE__ */ n.jsx(
3682
3760
  vn,
3683
3761
  {
3684
3762
  trigger: s,
3685
3763
  content: /* @__PURE__ */ n.jsx(
3686
- co,
3764
+ io,
3687
3765
  {
3688
3766
  onEmojiSelect: (c) => {
3689
- i(c);
3767
+ l(c);
3690
3768
  },
3691
3769
  theme: "auto"
3692
3770
  }
3693
3771
  ),
3694
- children: /* @__PURE__ */ n.jsx(G, { icon: /* @__PURE__ */ n.jsx(P, { type: "smile" }), style: { border: "none" } })
3772
+ children: /* @__PURE__ */ n.jsx(z, { icon: /* @__PURE__ */ n.jsx(P, { type: "smile" }), style: { border: "none" } })
3695
3773
  }
3696
3774
  );
3697
- }, lo = O(io), ao = () => {
3698
- const [e, t] = D(0), [s, r] = D(!1), i = z(null), c = z(null), o = z(!1), a = z(null), { onSendMsg: d, setGetResponse: u, isGetResponse: f } = he(), { ticketId: x } = ve(), { isActiveTabVA: g } = be(), { employees: b, setChats: y, isFromSelf: w, detailTicket: A } = De(), p = R(() => s || !f, [s, f]), E = R(() => {
3699
- var C;
3700
- return ((C = A == null ? void 0 : A.STATUS) == null ? void 0 : C.toString().toLowerCase()) === "closed";
3701
- }, [A == null ? void 0 : A.STATUS]), h = R(() => b == null ? void 0 : b.map((C) => ({
3702
- ...C,
3775
+ }, 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(() => {
3777
+ 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) => ({
3780
+ ...m,
3703
3781
  label: /* @__PURE__ */ n.jsx(
3704
3782
  vn,
3705
3783
  {
3706
3784
  placement: "left",
3707
- content: /* @__PURE__ */ n.jsx(so, { ...C }),
3708
- children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src: C == null ? void 0 : C.PHOTO, name: C == null ? void 0 : C.FULL_NAME }) })
3785
+ content: /* @__PURE__ */ n.jsx(ro, { ...m }),
3786
+ children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src: m == null ? void 0 : m.PHOTO, name: m == null ? void 0 : m.FULL_NAME }) })
3709
3787
  }
3710
3788
  ),
3711
- value: C == null ? void 0 : C.FULL_NAME
3712
- })), [b]), m = () => {
3789
+ value: m == null ? void 0 : m.FULL_NAME
3790
+ })), [C]), b = () => {
3713
3791
  var S, I, B;
3714
3792
  u(!1);
3715
- const C = (I = (S = i == null ? void 0 : i.current) == null ? void 0 : S.textarea) == null ? void 0 : I.value;
3716
- d({
3793
+ const m = (I = (S = l == null ? void 0 : l.current) == null ? void 0 : S.textarea) == null ? void 0 : I.value;
3794
+ a({
3717
3795
  event: "SEND_MESSAGE",
3718
3796
  data: {
3719
3797
  ATTACHMENT: "",
3720
3798
  FAQ_ID: null,
3721
- MESSAGE: C,
3722
- EMPLOYEES: b == null ? void 0 : b.map((M) => M == null ? void 0 : M.EMP_ID),
3799
+ MESSAGE: m,
3800
+ EMPLOYEES: C == null ? void 0 : C.map((M) => M == null ? void 0 : M.EMP_ID),
3723
3801
  TASK_ID: x
3724
3802
  }
3725
3803
  });
3726
3804
  const j = {
3727
3805
  ATTACHMENT: "",
3728
3806
  FAQ_ID: null,
3729
- MESSAGE: C,
3730
- CREATED_DATE: (B = le()) == null ? void 0 : B.format(`${hn} HH:mm:ss`),
3807
+ MESSAGE: m,
3808
+ CREATED_DATE: (B = ae()) == null ? void 0 : B.format(`${hn} HH:mm:ss`),
3731
3809
  CHAT_ALIGN: "to",
3732
3810
  CHAT_TYPE: "chat"
3733
3811
  };
@@ -3735,15 +3813,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3735
3813
  const F = [...yn(M), j];
3736
3814
  return Qe(F);
3737
3815
  }), w.current = !0, me(".w-ticket-detail-content-container"), t((M) => M + 1);
3738
- }, v = () => {
3739
- window.clearTimeout(c.current), o.current || (o.current = !0, d({
3816
+ }, h = () => {
3817
+ window.clearTimeout(c.current), o.current || (o.current = !0, a({
3740
3818
  event: "TYPING",
3741
3819
  data: {
3742
3820
  TASK_ID: x,
3743
3821
  IS_TYPING: !0
3744
3822
  }
3745
3823
  })), c.current = setTimeout(() => {
3746
- d({
3824
+ a({
3747
3825
  event: "TYPING",
3748
3826
  data: {
3749
3827
  TASK_ID: x,
@@ -3752,12 +3830,12 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3752
3830
  }), o.current = !1;
3753
3831
  }, 250);
3754
3832
  };
3755
- return Z(() => {
3756
- i != null && i.current && !g && x && (clearTimeout(a.current), a.current = setTimeout(() => {
3757
- var C;
3758
- (C = i == null ? void 0 : i.current) == null || C.focus();
3833
+ return X(() => {
3834
+ l != null && l.current && !g && x && (clearTimeout(d.current), d.current = setTimeout(() => {
3835
+ var m;
3836
+ (m = l == null ? void 0 : l.current) == null || m.focus();
3759
3837
  }, 500));
3760
- }, [g, x]), E ? null : /* @__PURE__ */ n.jsxs(
3838
+ }, [g, x]), v ? null : /* @__PURE__ */ n.jsxs(
3761
3839
  "div",
3762
3840
  {
3763
3841
  className: "w-input-container",
@@ -3765,9 +3843,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3765
3843
  margin: 0
3766
3844
  },
3767
3845
  children: [
3768
- /* @__PURE__ */ n.jsx(lo, { refInput: i }),
3846
+ /* @__PURE__ */ n.jsx(ao, { refInput: l }),
3769
3847
  /* @__PURE__ */ n.jsx(
3770
- oo,
3848
+ co,
3771
3849
  {
3772
3850
  setLoadingUpload: r,
3773
3851
  isLoadingUpload: s
@@ -3779,26 +3857,26 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3779
3857
  autoSize: {
3780
3858
  maxRows: 3
3781
3859
  },
3782
- ref: i,
3860
+ ref: l,
3783
3861
  className: "w-input-helpdesk",
3784
3862
  placeholder: "Type a message...",
3785
3863
  onChange: () => {
3786
- v();
3864
+ h();
3787
3865
  },
3788
- onKeyDown: (C) => {
3789
- ((C == null ? void 0 : C.code) === "Enter" || (C == null ? void 0 : C.key) === "Enter") && !(C != null && C.shiftKey) && m();
3866
+ onKeyDown: (m) => {
3867
+ ((m == null ? void 0 : m.code) === "Enter" || (m == null ? void 0 : m.key) === "Enter") && !(m != null && m.shiftKey) && b();
3790
3868
  },
3791
- filterOption: (C, j) => {
3869
+ filterOption: (m, j) => {
3792
3870
  var B, M, L;
3793
- const S = (B = C == null ? void 0 : C.toString()) == null ? void 0 : B.toLowerCase(), I = (L = (M = j == null ? void 0 : j.FULL_NAME) == null ? void 0 : M.toString()) == null ? void 0 : L.toLowerCase();
3871
+ const S = (B = m == null ? void 0 : m.toString()) == null ? void 0 : B.toLowerCase(), I = (L = (M = j == null ? void 0 : j.FULL_NAME) == null ? void 0 : M.toString()) == null ? void 0 : L.toLowerCase();
3794
3872
  return I == null ? void 0 : I.includes(S);
3795
3873
  },
3796
- children: h == null ? void 0 : h.map((C, j) => /* @__PURE__ */ n.jsx(Un.Option, { ...C, children: C == null ? void 0 : C.label }, j))
3874
+ children: E == null ? void 0 : E.map((m, j) => /* @__PURE__ */ n.jsx(Un.Option, { ...m, children: m == null ? void 0 : m.label }, j))
3797
3875
  },
3798
3876
  e
3799
3877
  ),
3800
3878
  /* @__PURE__ */ n.jsx(
3801
- G,
3879
+ z,
3802
3880
  {
3803
3881
  loading: p,
3804
3882
  disabled: p,
@@ -3811,26 +3889,26 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3811
3889
  },
3812
3890
  icon: /* @__PURE__ */ n.jsx(P, { type: p ? "loading" : "send" }),
3813
3891
  shape: "circle",
3814
- onClick: m
3892
+ onClick: b
3815
3893
  }
3816
3894
  )
3817
3895
  ]
3818
3896
  }
3819
3897
  );
3820
- }, uo = O(ao), fo = ({ title: e, subTitle: t, onClose: s, open: r, styleWrapper: i }) => {
3898
+ }, fo = R(uo), xo = ({ title: e, subTitle: t, onClose: s, open: r, styleWrapper: l }) => {
3821
3899
  var c;
3822
3900
  return r ? /* @__PURE__ */ n.jsx(
3823
3901
  "div",
3824
3902
  {
3825
3903
  className: "w-banner-container",
3826
- ...((c = Object.keys(i || {})) == null ? void 0 : c.length) > 0 && {
3827
- style: i
3904
+ ...((c = Object.keys(l || {})) == null ? void 0 : c.length) > 0 && {
3905
+ style: l
3828
3906
  },
3829
3907
  children: /* @__PURE__ */ n.jsxs("div", { className: "w-banner-content", children: [
3830
- e && /* @__PURE__ */ n.jsx(Y.Text, { style: { fontSize: 16, fontWeight: 600 }, children: e }),
3908
+ e && /* @__PURE__ */ n.jsx(V.Text, { style: { fontSize: 16, fontWeight: 600 }, children: e }),
3831
3909
  t && /* @__PURE__ */ n.jsx("div", { className: "w-banner-subtitle", children: t }),
3832
3910
  typeof s == "function" && /* @__PURE__ */ n.jsx("div", { className: "w-banner-close-btn", children: /* @__PURE__ */ n.jsx(
3833
- G,
3911
+ z,
3834
3912
  {
3835
3913
  style: { border: "none", background: "transparent" },
3836
3914
  icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
@@ -3840,23 +3918,23 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3840
3918
  ] })
3841
3919
  }
3842
3920
  ) : null;
3843
- }, Et = O(fo), xo = () => {
3844
- const e = _(
3921
+ }, Et = R(xo), go = () => {
3922
+ const e = k(
3845
3923
  "ForMoreInformationOfThisTicket",
3846
3924
  "For more information of this ticket"
3847
- ), t = _("ClickHere", "Click here"), { ticketId: s } = ve(), { history: r } = q(), { encrypt: i } = ht();
3925
+ ), t = k("ClickHere", "Click here"), { ticketId: s } = ve(), { history: r } = J(), { encrypt: l } = ht();
3848
3926
  return /* @__PURE__ */ n.jsx(
3849
3927
  Et,
3850
3928
  {
3851
3929
  subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3852
- /* @__PURE__ */ n.jsx(Y.Text, { children: e }),
3930
+ /* @__PURE__ */ n.jsx(V.Text, { children: e }),
3853
3931
  /* @__PURE__ */ n.jsx(
3854
- Y.Link,
3932
+ V.Link,
3855
3933
  {
3856
3934
  strong: !0,
3857
3935
  className: "w-reconnect-manual",
3858
3936
  onClick: () => {
3859
- const c = i(s);
3937
+ const c = l(s);
3860
3938
  r.push(
3861
3939
  `/standard/hrm.helpdesk.my-ticket.ticket-details?id=${c}`
3862
3940
  );
@@ -3871,27 +3949,27 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3871
3949
  }
3872
3950
  }
3873
3951
  );
3874
- }, go = O(xo), Co = ({ onClose: e, visible: t }) => /* @__PURE__ */ n.jsx(bt, { open: t, onClose: e, children: /* @__PURE__ */ n.jsxs(Hr, { children: [
3875
- /* @__PURE__ */ n.jsx($r, { onClose: e }),
3876
- /* @__PURE__ */ n.jsx(go, {}),
3877
- /* @__PURE__ */ n.jsx(no, {}),
3878
- /* @__PURE__ */ n.jsx(uo, {})
3879
- ] }) }), mo = O(Co), bo = () => {
3880
- const e = _("AdvanceFilter", "Advance Filter"), t = _("Subject", "Subject"), s = _(
3952
+ }, Co = R(go), mo = ({ onClose: e, visible: t }) => /* @__PURE__ */ n.jsx(bt, { open: t, onClose: e, children: /* @__PURE__ */ n.jsxs(Ir, { children: [
3953
+ /* @__PURE__ */ n.jsx(Br, { onClose: e }),
3954
+ /* @__PURE__ */ n.jsx(Co, {}),
3955
+ /* @__PURE__ */ n.jsx(to, {}),
3956
+ /* @__PURE__ */ n.jsx(fo, {})
3957
+ ] }) }), bo = R(mo), vo = () => {
3958
+ const e = k("AdvanceFilter", "Advance Filter"), t = k("Subject", "Subject"), s = k(
3881
3959
  "TicketCategory",
3882
3960
  "Ticket Category"
3883
- ), r = _("TicketStatus", "Ticket Status"), i = _("CreatedDate", "Created Date"), c = _("New", "New"), o = _("Open", "Open"), a = _("Reopen", "Reopen"), d = _("InProgress", "In Progress"), u = _("Responded", "Responded"), f = _("Fixed", "Fixed"), x = _("Done", "Done"), g = _("Closed", "Closed"), b = _("HDCancelled", "Cancelled"), y = _("Clear", "Clear"), w = _("Filter", "Filter"), A = en(), [p] = oe.useForm(), { openFilter: E, setOpenFilter: h, getListTicket: m, setCountFilters: v } = ve(), [C, j] = D([]), S = R(() => {
3884
- const M = `${c}/${o}/${a}`, L = `${d}/${u}`, F = `${f}/${x}`;
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}`;
3885
3963
  return [
3886
3964
  { value: 3, label: M },
3887
3965
  { value: 1, label: L },
3888
3966
  { value: 4, label: F },
3889
3967
  { value: 6, label: g },
3890
- { value: 8, label: b }
3968
+ { value: 8, label: C }
3891
3969
  ];
3892
3970
  }, []), I = () => {
3893
3971
  var M;
3894
- (M = A({
3972
+ (M = _({
3895
3973
  endpoint: "/helpdesk/category/list",
3896
3974
  data: {
3897
3975
  LIMIT: 999999,
@@ -3902,11 +3980,11 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3902
3980
  })) == null || M.then((L) => {
3903
3981
  var F, $, H;
3904
3982
  if ((F = L == null ? void 0 : L.data) != null && F.DATA) {
3905
- const V = (H = ($ = L == null ? void 0 : L.data) == null ? void 0 : $.DATA) == null ? void 0 : H.LIST;
3983
+ const G = (H = ($ = L == null ? void 0 : L.data) == null ? void 0 : $.DATA) == null ? void 0 : H.LIST;
3906
3984
  j(
3907
- V == null ? void 0 : V.map((Q) => ({
3908
- label: Q == null ? void 0 : Q.CATEGORY_NAME,
3909
- value: Q == null ? void 0 : Q.CATEGORY_CODE
3985
+ G == null ? void 0 : G.map((Z) => ({
3986
+ label: Z == null ? void 0 : Z.CATEGORY_NAME,
3987
+ value: Z == null ? void 0 : Z.CATEGORY_CODE
3910
3988
  }))
3911
3989
  );
3912
3990
  }
@@ -3914,23 +3992,23 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3914
3992
  }, B = () => {
3915
3993
  var F, $;
3916
3994
  const M = p == null ? void 0 : p.getFieldsValue(!0);
3917
- m(M);
3995
+ b(M);
3918
3996
  const L = ($ = (F = Object.values(M || {})) == null ? void 0 : F.flat()) == null ? void 0 : $.filter(Boolean);
3919
- v(L == null ? void 0 : L.length);
3997
+ h(L == null ? void 0 : L.length);
3920
3998
  };
3921
- return Z(() => {
3999
+ return X(() => {
3922
4000
  I();
3923
4001
  }, []), /* @__PURE__ */ n.jsxs(
3924
4002
  bt,
3925
4003
  {
3926
4004
  styleContainer: { height: "calc(100% - 50px)" },
3927
- open: E,
4005
+ open: v,
3928
4006
  onClose: () => {
3929
- h(!1);
4007
+ E(!1);
3930
4008
  },
3931
4009
  footer: /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-list-advance-filter-footer", children: [
3932
4010
  /* @__PURE__ */ n.jsx(
3933
- G,
4011
+ z,
3934
4012
  {
3935
4013
  onClick: () => {
3936
4014
  p == null || p.resetFields(), B();
@@ -3940,11 +4018,11 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3940
4018
  "clear"
3941
4019
  ),
3942
4020
  /* @__PURE__ */ n.jsx(
3943
- G,
4021
+ z,
3944
4022
  {
3945
4023
  type: "primary",
3946
4024
  onClick: () => {
3947
- B(), h(!1);
4025
+ B(), E(!1);
3948
4026
  },
3949
4027
  children: w
3950
4028
  },
@@ -3952,29 +4030,29 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3952
4030
  )
3953
4031
  ] }),
3954
4032
  children: [
3955
- /* @__PURE__ */ n.jsx(Y.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
4033
+ /* @__PURE__ */ n.jsx(V.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
3956
4034
  /* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: p, layout: "vertical", children: [
3957
4035
  /* @__PURE__ */ n.jsx(oe.Item, { label: t, name: "TASK_NAME", children: /* @__PURE__ */ n.jsx(Be, { allowClear: !0 }) }),
3958
- /* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Wn, { options: C, mode: "multiple", allowClear: !0 }) }),
4036
+ /* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Wn, { options: m, mode: "multiple", allowClear: !0 }) }),
3959
4037
  /* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(Wn, { options: S, mode: "multiple", allowClear: !0 }) }),
3960
- /* @__PURE__ */ n.jsx(oe.Item, { label: i, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(Zt, { style: { width: "100%" }, allowClear: !0 }) })
4038
+ /* @__PURE__ */ n.jsx(oe.Item, { label: l, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(Xt, { style: { width: "100%" }, allowClear: !0 }) })
3961
4039
  ] }) })
3962
4040
  ]
3963
4041
  }
3964
4042
  );
3965
- }, vo = O(bo), ho = () => {
3966
- const e = _(
4043
+ }, ho = R(vo), Eo = () => {
4044
+ const e = k(
3967
4045
  "ReconnectManually",
3968
4046
  "Reconnect Manually"
3969
- ), t = _(
4047
+ ), t = k(
3970
4048
  "HelpdeskWebsocket",
3971
4049
  "Helpdesk Websocket"
3972
- ), s = _("NotConnected", "Not Connected"), r = _("Connecting", "Connecting"), {
3973
- connectWebSocket: i,
4050
+ ), s = k("NotConnected", "Not Connected"), r = k("Connecting", "Connecting"), {
4051
+ connectWebSocket: l,
3974
4052
  retryCountState: c,
3975
4053
  setRetryCountState: o,
3976
- retryCountRef: a
3977
- } = he(), d = R(() => c === Ie ? `${t} ${s}` : `${t} ${r}`, [c]);
4054
+ retryCountRef: d
4055
+ } = he(), a = O(() => c === Ie ? `${t} ${s}` : `${t} ${r}`, [c]);
3978
4056
  return /* @__PURE__ */ n.jsx(
3979
4057
  "div",
3980
4058
  {
@@ -3985,20 +4063,20 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
3985
4063
  height: "100%"
3986
4064
  },
3987
4065
  children: /* @__PURE__ */ n.jsx(
3988
- Xt,
4066
+ Pt,
3989
4067
  {
3990
4068
  ...c === Ie ? {
3991
4069
  status: "warning"
3992
4070
  } : {
3993
4071
  icon: null
3994
4072
  },
3995
- title: d,
4073
+ title: a,
3996
4074
  extra: c === Ie ? /* @__PURE__ */ n.jsx(
3997
- G,
4075
+ z,
3998
4076
  {
3999
4077
  type: "primary",
4000
4078
  onClick: () => {
4001
- a.current = 0, o(0), i();
4079
+ d.current = 0, o(0), l();
4002
4080
  },
4003
4081
  children: e
4004
4082
  },
@@ -4016,15 +4094,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4016
4094
  )
4017
4095
  }
4018
4096
  );
4019
- }, Eo = O(ho), To = () => {
4020
- const { setTicketId: e, ticketId: t, openFilter: s } = ve(), { onSendMsg: r, setGetResponse: i } = he(), { showReadyWSHD: c } = q();
4097
+ }, To = R(Eo), yo = () => {
4098
+ const { setTicketId: e, ticketId: t, openFilter: s } = ve(), { onSendMsg: r, setGetResponse: l } = he(), { showReadyWSHD: c } = J();
4021
4099
  return c ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4022
4100
  /* @__PURE__ */ n.jsx(
4023
- mo,
4101
+ bo,
4024
4102
  {
4025
4103
  visible: t,
4026
4104
  onClose: () => {
4027
- e(""), i(!1), r({
4105
+ e(""), l(!1), r({
4028
4106
  event: "LEAVE_ROOM",
4029
4107
  data: {
4030
4108
  TASK_ID: t
@@ -4033,22 +4111,22 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4033
4111
  }
4034
4112
  }
4035
4113
  ),
4036
- /* @__PURE__ */ n.jsx("div", { style: { display: !t && !s ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Mr, {}) }),
4037
- /* @__PURE__ */ n.jsx(vo, {})
4038
- ] }) : /* @__PURE__ */ n.jsx(Eo, {});
4039
- }, yo = O(To), jo = ({ children: e, usePopover: t, ...s }) => t ? /* @__PURE__ */ n.jsx(vn, { ...s, visible: s == null ? void 0 : s.open, children: e }) : e, wo = () => {
4040
- const e = _("NeedHelp", "Need Help"), t = _(
4114
+ /* @__PURE__ */ n.jsx("div", { style: { display: !t && !s ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Fr, {}) }),
4115
+ /* @__PURE__ */ n.jsx(ho, {})
4116
+ ] }) : /* @__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(
4041
4119
  "WidgetDisconnected",
4042
4120
  "Widget Disconnected"
4043
- ), [s, r] = D(!0), i = z(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: a, setFirstOpenWidget: d } = q(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = ue(), g = () => {
4121
+ ), [s, r] = D(!0), l = Y(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: d, setFirstOpenWidget: a } = J(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = fe(), g = () => {
4044
4122
  o(!0), u({ msg: c == null ? void 0 : c.getStartedPayload });
4045
4123
  };
4046
- return Z(() => {
4047
- r(!f), window.clearTimeout(i.current), i.current = setTimeout(() => {
4124
+ return X(() => {
4125
+ r(!f), window.clearTimeout(l.current), l.current = setTimeout(() => {
4048
4126
  r(!1);
4049
4127
  }, 3e3);
4050
4128
  }, [f]), /* @__PURE__ */ n.jsx(
4051
- jo,
4129
+ wo,
4052
4130
  {
4053
4131
  usePopover: s && x === "show",
4054
4132
  open: s && x === "show",
@@ -4059,12 +4137,12 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4059
4137
  {
4060
4138
  className: "w-launcher-container",
4061
4139
  onClick: () => {
4062
- a || (d(!0), g()), o(!0);
4140
+ d || (a(!0), g()), o(!0);
4063
4141
  },
4064
4142
  children: [
4065
4143
  /* @__PURE__ */ n.jsx(P, { type: "chat-bubble" }),
4066
4144
  /* @__PURE__ */ n.jsxs(
4067
- Y.Text,
4145
+ V.Text,
4068
4146
  {
4069
4147
  style: {
4070
4148
  fontWeight: 600,
@@ -4081,27 +4159,27 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4081
4159
  )
4082
4160
  }
4083
4161
  );
4084
- }, po = O(wo), _o = () => {
4085
- const e = _("NotConnected", "Not Connected"), t = _(
4162
+ }, _o = R(po), ko = () => {
4163
+ const e = k("NotConnected", "Not Connected"), t = k(
4086
4164
  "CannotAutoReconnect",
4087
4165
  "Cannot auto reconnect"
4088
- ), s = _(
4166
+ ), s = k(
4089
4167
  "ReconnectManually",
4090
4168
  "Reconnect Manually"
4091
- ), [r, i] = D(!1), { connected: c, createSocket: o } = ue(), { widgetProps: a } = q();
4092
- return Z(() => {
4093
- i(!c);
4169
+ ), [r, l] = D(!1), { connected: c, createSocket: o } = fe(), { widgetProps: d } = J();
4170
+ return X(() => {
4171
+ l(!c);
4094
4172
  }, [c]), /* @__PURE__ */ n.jsx(
4095
4173
  Et,
4096
4174
  {
4097
- title: `${a == null ? void 0 : a.title} ${e}`,
4175
+ title: `${d == null ? void 0 : d.title} ${e}`,
4098
4176
  subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4099
- /* @__PURE__ */ n.jsxs(Y.Text, { children: [
4177
+ /* @__PURE__ */ n.jsxs(V.Text, { children: [
4100
4178
  t,
4101
4179
  "?"
4102
4180
  ] }),
4103
4181
  /* @__PURE__ */ n.jsx(
4104
- Y.Link,
4182
+ V.Link,
4105
4183
  {
4106
4184
  strong: !0,
4107
4185
  className: "w-reconnect-manual",
@@ -4112,50 +4190,50 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4112
4190
  }
4113
4191
  )
4114
4192
  ] }),
4115
- onClose: () => i(!1),
4193
+ onClose: () => l(!1),
4116
4194
  open: !c && r
4117
4195
  }
4118
4196
  );
4119
- }, ko = O(
4120
- _o
4121
- ), Ao = () => {
4122
- const { xs: e } = ge.useBreakpoint(), [t, s] = D(!1), { isOpenWidget: r, widgetProps: i } = q(), { isActiveTabVA: c } = be(), o = z(null), a = R(() => {
4197
+ }, Ao = R(
4198
+ ko
4199
+ ), So = () => {
4200
+ const { xs: e } = Ce.useBreakpoint(), [t, s] = D(!1), { isOpenWidget: r, widgetProps: l } = J(), { isActiveTabVA: c } = be(), o = Y(null), d = O(() => {
4123
4201
  var f;
4124
4202
  const u = [un];
4125
- return e && (i != null && i.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(" ");
4126
- }, [e, i == null ? void 0 : i.isSF]), d = Gt(
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(
4127
4205
  (u) => {
4128
4206
  var x;
4129
4207
  const f = [u, xn == null ? void 0 : xn.FADE_IN];
4130
- return i != null && i.isSF && (f == null || f.push(`${u}-sf`)), e && (i != null && i.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(" ");
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(" ");
4131
4209
  },
4132
- [i == null ? void 0 : i.isSF, e]
4210
+ [l == null ? void 0 : l.isSF, e]
4133
4211
  );
4134
- return Z(() => {
4212
+ return X(() => {
4135
4213
  r && s(r), clearTimeout(o.current), o.current = setTimeout(() => {
4136
4214
  r || s(r);
4137
4215
  }, 250);
4138
- }, [r]), t ? /* @__PURE__ */ n.jsxs("div", { className: a, children: [
4216
+ }, [r]), t ? /* @__PURE__ */ n.jsxs("div", { className: d, children: [
4139
4217
  /* @__PURE__ */ n.jsxs("div", { style: { display: c ? "block" : "none" }, children: [
4140
- /* @__PURE__ */ n.jsx("div", { className: d(bs), children: /* @__PURE__ */ n.jsx(wr, {}) }),
4141
- /* @__PURE__ */ n.jsx(_r, {})
4218
+ /* @__PURE__ */ n.jsx("div", { className: a(vs), children: /* @__PURE__ */ n.jsx(pr, {}) }),
4219
+ /* @__PURE__ */ n.jsx(kr, {})
4142
4220
  ] }),
4143
- /* @__PURE__ */ n.jsx("div", { style: { display: c ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className: d(vs), children: /* @__PURE__ */ n.jsx(Dr, { children: /* @__PURE__ */ n.jsx(Lr, { children: /* @__PURE__ */ n.jsx(yo, {}) }) }) }) }),
4144
- /* @__PURE__ */ n.jsx(ko, {})
4145
- ] }) : /* @__PURE__ */ n.jsx(po, {});
4146
- }, So = O(Ao), Lo = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Oe != null && Oe.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...s }) => /* @__PURE__ */ bn(
4221
+ /* @__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
+ /* @__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(
4147
4225
  cn.TabPane,
4148
4226
  {
4149
4227
  ...s,
4150
4228
  key: s == null ? void 0 : s.key,
4151
4229
  tab: s == null ? void 0 : s.label
4152
4230
  }
4153
- )) }), Oo = O(Lo), Ro = () => {
4154
- const { isOpenWidget: e } = q(), { setActiveTab: t, activeTab: s } = be(), r = _(
4231
+ )) }), Oo = R(Ro), Do = () => {
4232
+ const { isOpenWidget: e } = J(), { setActiveTab: t, activeTab: s } = be(), r = k(
4155
4233
  "VirtualAssistant",
4156
4234
  "Virtual Assistant"
4157
- ), i = _("Helpdesk", "Helpdesk"), { xs: c } = ge.useBreakpoint();
4158
- return Z(() => {
4235
+ ), l = k("Helpdesk", "Helpdesk"), { xs: c } = Ce.useBreakpoint();
4236
+ return X(() => {
4159
4237
  const o = st();
4160
4238
  t((o == null ? void 0 : o.activeTab) ?? s);
4161
4239
  }, []), e ? /* @__PURE__ */ n.jsx(
@@ -4182,7 +4260,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4182
4260
  key: "va"
4183
4261
  },
4184
4262
  {
4185
- label: i,
4263
+ label: l,
4186
4264
  key: "helpdesk"
4187
4265
  }
4188
4266
  ]
@@ -4190,8 +4268,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4190
4268
  )
4191
4269
  }
4192
4270
  ) : null;
4193
- }, Do = O(Ro), No = () => {
4194
- const { isOpenWidget: e, setOpenWidget: t, setExpand: s, isExpand: r, widgetProps: i } = q(), { xs: c } = ge.useBreakpoint();
4271
+ }, No = R(Do), Mo = () => {
4272
+ const { isOpenWidget: e, setOpenWidget: t, setExpand: s, isExpand: r, widgetProps: l } = J(), { xs: c } = Ce.useBreakpoint();
4195
4273
  return e ? /* @__PURE__ */ n.jsxs(
4196
4274
  "div",
4197
4275
  {
@@ -4203,8 +4281,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4203
4281
  },
4204
4282
  children: [
4205
4283
  /* @__PURE__ */ n.jsxs("div", { className: `${He}-text`, children: [
4206
- /* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children: i == null ? void 0 : i.title }),
4207
- /* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children: i == null ? void 0 : i.subTitle })
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 })
4208
4286
  ] }),
4209
4287
  /* @__PURE__ */ n.jsxs("div", { className: `${He}-action`, children: [
4210
4288
  !c && /* @__PURE__ */ n.jsx(
@@ -4233,24 +4311,18 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4233
4311
  ]
4234
4312
  }
4235
4313
  ) : null;
4236
- }, Mo = O(No), Fo = () => {
4237
- const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: s, setOpenWidget: r } = q(), { xs: i } = ge.useBreakpoint(), c = R(() => {
4238
- var a;
4314
+ }, Fo = R(Mo), Ho = () => {
4315
+ const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: s, setOpenWidget: r } = J(), { xs: l } = Ce.useBreakpoint(), c = O(() => {
4316
+ var d;
4239
4317
  const o = [
4240
- i && t && "w-container-widget-mobile",
4318
+ l && t && "w-container-widget-mobile",
4241
4319
  s && (t ? "w-show-animate" : "w-close-animate"),
4242
4320
  "w-container-widget",
4243
4321
  e && "w-container-widget-expand"
4244
4322
  ];
4245
- return (a = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : a.join(" ");
4246
- }, [e, i, s, t]);
4247
- return console.log("arr ; ", {
4248
- classNameContainerWidget: c,
4249
- isExpand: e,
4250
- xs: i,
4251
- isFirstOpenWidget: s,
4252
- isOpenWidget: t
4253
- }), /* @__PURE__ */ n.jsxs(
4323
+ return (d = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : d.join(" ");
4324
+ }, [e, l, s, t]);
4325
+ return /* @__PURE__ */ n.jsxs(
4254
4326
  "div",
4255
4327
  {
4256
4328
  className: c,
@@ -4259,39 +4331,39 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
4259
4331
  },
4260
4332
  tabIndex: 0,
4261
4333
  children: [
4262
- /* @__PURE__ */ n.jsx(Mo, {}),
4263
- /* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(er, { children: [
4264
- /* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(So, {}) }),
4265
- /* @__PURE__ */ n.jsx(Do, {})
4334
+ /* @__PURE__ */ n.jsx(Fo, {}),
4335
+ /* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(nr, { children: [
4336
+ /* @__PURE__ */ n.jsx(Rs, { children: /* @__PURE__ */ n.jsx(Lo, {}) }),
4337
+ /* @__PURE__ */ n.jsx(No, {})
4266
4338
  ] }) })
4267
4339
  ]
4268
4340
  }
4269
4341
  );
4270
- }, Ho = O(Fo), Qo = ({
4342
+ }, Io = R(Ho), Zo = ({
4271
4343
  getStartedPayload: e,
4272
4344
  socketURL: t,
4273
4345
  socketPath: s,
4274
4346
  onPayslipFn: r,
4275
- title: i,
4347
+ title: l,
4276
4348
  subTitle: c,
4277
4349
  keyEncrypt: o,
4278
- history: a,
4279
- isSF: d = !1
4350
+ history: d,
4351
+ isSF: a = !1
4280
4352
  }) => /* @__PURE__ */ n.jsx(
4281
- ks,
4353
+ As,
4282
4354
  {
4283
4355
  getStartedPayload: e,
4284
4356
  socketURL: t,
4285
4357
  socketPath: s,
4286
4358
  onPayslipFn: r,
4287
- title: i,
4359
+ title: l,
4288
4360
  subTitle: c,
4289
4361
  keyEncrypt: o,
4290
- history: a,
4291
- isSF: d,
4292
- children: /* @__PURE__ */ n.jsx(Ss, { children: /* @__PURE__ */ n.jsx(Ho, {}) })
4362
+ history: d,
4363
+ isSF: a,
4364
+ children: /* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(Io, {}) })
4293
4365
  }
4294
4366
  );
4295
4367
  export {
4296
- Qo as default
4368
+ Zo as default
4297
4369
  };