widget-chatbot 1.0.5 → 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -77
- package/dist/index.d.ts +24 -35
- package/dist/widget-chatbot.css +1 -0
- package/dist/widget-chatbot.es.js +4291 -0
- package/package.json +51 -200
- package/LICENSE +0 -177
- package/dist/index.js +0 -1
|
@@ -0,0 +1,4291 @@
|
|
|
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";
|
|
11
|
+
import pe from "crypto-js";
|
|
12
|
+
import { Picker as os } from "emoji-mart";
|
|
13
|
+
var Je = { exports: {} }, _e = {};
|
|
14
|
+
/*
|
|
15
|
+
object-assign
|
|
16
|
+
(c) Sindre Sorhus
|
|
17
|
+
@license MIT
|
|
18
|
+
*/
|
|
19
|
+
var ln, Vn;
|
|
20
|
+
function Pn() {
|
|
21
|
+
if (Vn) return ln;
|
|
22
|
+
Vn = 1;
|
|
23
|
+
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
|
|
24
|
+
function r(c) {
|
|
25
|
+
if (c == null)
|
|
26
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
27
|
+
return Object(c);
|
|
28
|
+
}
|
|
29
|
+
function i() {
|
|
30
|
+
try {
|
|
31
|
+
if (!Object.assign)
|
|
32
|
+
return !1;
|
|
33
|
+
var c = new String("abc");
|
|
34
|
+
if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5")
|
|
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) {
|
|
39
|
+
return o[f];
|
|
40
|
+
});
|
|
41
|
+
if (d.join("") !== "0123456789")
|
|
42
|
+
return !1;
|
|
43
|
+
var u = {};
|
|
44
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(f) {
|
|
45
|
+
u[f] = f;
|
|
46
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
47
|
+
} catch {
|
|
48
|
+
return !1;
|
|
49
|
+
}
|
|
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]);
|
|
56
|
+
if (e) {
|
|
57
|
+
u = e(a);
|
|
58
|
+
for (var g = 0; g < u.length; g++)
|
|
59
|
+
s.call(a, u[g]) && (d[u[g]] = a[u[g]]);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return d;
|
|
63
|
+
}, ln;
|
|
64
|
+
}
|
|
65
|
+
/** @license React v17.0.2
|
|
66
|
+
* react-jsx-runtime.production.min.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/
|
|
73
|
+
var Gn;
|
|
74
|
+
function cs() {
|
|
75
|
+
if (Gn) return _e;
|
|
76
|
+
Gn = 1, Pn();
|
|
77
|
+
var e = mn, t = 60103;
|
|
78
|
+
if (_e.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
79
|
+
var s = Symbol.for;
|
|
80
|
+
t = s("react.element"), _e.Fragment = s("react.fragment");
|
|
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 };
|
|
89
|
+
}
|
|
90
|
+
return _e.jsx = o, _e.jsxs = o, _e;
|
|
91
|
+
}
|
|
92
|
+
var an = {};
|
|
93
|
+
/** @license React v17.0.2
|
|
94
|
+
* react-jsx-runtime.development.js
|
|
95
|
+
*
|
|
96
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the MIT license found in the
|
|
99
|
+
* LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/
|
|
101
|
+
var zn;
|
|
102
|
+
function is() {
|
|
103
|
+
return zn || (zn = 1, function(e) {
|
|
104
|
+
process.env.NODE_ENV !== "production" && function() {
|
|
105
|
+
var t = mn, s = Pn(), r = 60103, i = 60106;
|
|
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;
|
|
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");
|
|
111
|
+
}
|
|
112
|
+
var m = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
|
|
113
|
+
function C(l) {
|
|
114
|
+
if (l === null || typeof l != "object")
|
|
115
|
+
return null;
|
|
116
|
+
var T = m && l[m] || l[v];
|
|
117
|
+
return typeof T == "function" ? T : null;
|
|
118
|
+
}
|
|
119
|
+
var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
120
|
+
function S(l) {
|
|
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);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function I(l, T, k) {
|
|
128
|
+
{
|
|
129
|
+
var N = j.ReactDebugCurrentFrame, J = N.getStackAddendum();
|
|
130
|
+
J !== "" && (T += "%s", k = k.concat([J]));
|
|
131
|
+
var K = k.map(function(W) {
|
|
132
|
+
return "" + W;
|
|
133
|
+
});
|
|
134
|
+
K.unshift("Warning: " + T), Function.prototype.apply.call(console[l], console, K);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
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));
|
|
140
|
+
}
|
|
141
|
+
function L(l, T, k) {
|
|
142
|
+
var N = T.displayName || T.name || "";
|
|
143
|
+
return l.displayName || (N !== "" ? k + "(" + N + ")" : k);
|
|
144
|
+
}
|
|
145
|
+
function F(l) {
|
|
146
|
+
return l.displayName || "Context";
|
|
147
|
+
}
|
|
148
|
+
function $(l) {
|
|
149
|
+
if (l == null)
|
|
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) {
|
|
156
|
+
case e.Fragment:
|
|
157
|
+
return "Fragment";
|
|
158
|
+
case i:
|
|
159
|
+
return "Portal";
|
|
160
|
+
case o:
|
|
161
|
+
return "Profiler";
|
|
162
|
+
case c:
|
|
163
|
+
return "StrictMode";
|
|
164
|
+
case f:
|
|
165
|
+
return "Suspense";
|
|
166
|
+
case x:
|
|
167
|
+
return "SuspenseList";
|
|
168
|
+
}
|
|
169
|
+
if (typeof l == "object")
|
|
170
|
+
switch (l.$$typeof) {
|
|
171
|
+
case d:
|
|
172
|
+
var T = l;
|
|
173
|
+
return F(T) + ".Consumer";
|
|
174
|
+
case a:
|
|
175
|
+
var k = l;
|
|
176
|
+
return F(k._context) + ".Provider";
|
|
177
|
+
case u:
|
|
178
|
+
return L(l, l.render, "ForwardRef");
|
|
179
|
+
case g:
|
|
180
|
+
return $(l.type);
|
|
181
|
+
case y:
|
|
182
|
+
return $(l._render);
|
|
183
|
+
case b: {
|
|
184
|
+
var N = l, J = N._payload, K = N._init;
|
|
185
|
+
try {
|
|
186
|
+
return $(K(J));
|
|
187
|
+
} catch {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
var H = 0, V, Q, X, se, ee, ae, ce;
|
|
195
|
+
function Ne() {
|
|
196
|
+
}
|
|
197
|
+
Ne.__reactDisabledLog = !0;
|
|
198
|
+
function Ve() {
|
|
199
|
+
{
|
|
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 = {
|
|
203
|
+
configurable: !0,
|
|
204
|
+
enumerable: !0,
|
|
205
|
+
value: Ne,
|
|
206
|
+
writable: !0
|
|
207
|
+
};
|
|
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
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
H++;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function Ge() {
|
|
222
|
+
{
|
|
223
|
+
if (H--, H === 0) {
|
|
224
|
+
var l = {
|
|
225
|
+
configurable: !0,
|
|
226
|
+
enumerable: !0,
|
|
227
|
+
writable: !0
|
|
228
|
+
};
|
|
229
|
+
Object.defineProperties(console, {
|
|
230
|
+
log: s({}, l, {
|
|
231
|
+
value: V
|
|
232
|
+
}),
|
|
233
|
+
info: s({}, l, {
|
|
234
|
+
value: Q
|
|
235
|
+
}),
|
|
236
|
+
warn: s({}, l, {
|
|
237
|
+
value: X
|
|
238
|
+
}),
|
|
239
|
+
error: s({}, l, {
|
|
240
|
+
value: se
|
|
241
|
+
}),
|
|
242
|
+
group: s({}, l, {
|
|
243
|
+
value: ee
|
|
244
|
+
}),
|
|
245
|
+
groupCollapsed: s({}, l, {
|
|
246
|
+
value: ae
|
|
247
|
+
}),
|
|
248
|
+
groupEnd: s({}, l, {
|
|
249
|
+
value: ce
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
H < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
var Me = j.ReactCurrentDispatcher, Fe;
|
|
257
|
+
function ze(l, T, k) {
|
|
258
|
+
{
|
|
259
|
+
if (Fe === void 0)
|
|
260
|
+
try {
|
|
261
|
+
throw Error();
|
|
262
|
+
} catch (J) {
|
|
263
|
+
var N = J.stack.trim().match(/\n( *(at )?)/);
|
|
264
|
+
Fe = N && N[1] || "";
|
|
265
|
+
}
|
|
266
|
+
return `
|
|
267
|
+
` + Fe + l;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
var nn = !1, Ye;
|
|
271
|
+
{
|
|
272
|
+
var Tt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
273
|
+
Ye = new Tt();
|
|
274
|
+
}
|
|
275
|
+
function _n(l, T) {
|
|
276
|
+
if (!l || nn)
|
|
277
|
+
return "";
|
|
278
|
+
{
|
|
279
|
+
var k = Ye.get(l);
|
|
280
|
+
if (k !== void 0)
|
|
281
|
+
return k;
|
|
282
|
+
}
|
|
283
|
+
var N;
|
|
284
|
+
nn = !0;
|
|
285
|
+
var J = Error.prepareStackTrace;
|
|
286
|
+
Error.prepareStackTrace = void 0;
|
|
287
|
+
var K;
|
|
288
|
+
K = Me.current, Me.current = null, Ve();
|
|
289
|
+
try {
|
|
290
|
+
if (T) {
|
|
291
|
+
var W = function() {
|
|
292
|
+
throw Error();
|
|
293
|
+
};
|
|
294
|
+
if (Object.defineProperty(W.prototype, "props", {
|
|
295
|
+
set: function() {
|
|
296
|
+
throw Error();
|
|
297
|
+
}
|
|
298
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
299
|
+
try {
|
|
300
|
+
Reflect.construct(W, []);
|
|
301
|
+
} catch (xe) {
|
|
302
|
+
N = xe;
|
|
303
|
+
}
|
|
304
|
+
Reflect.construct(l, [], W);
|
|
305
|
+
} else {
|
|
306
|
+
try {
|
|
307
|
+
W.call();
|
|
308
|
+
} catch (xe) {
|
|
309
|
+
N = xe;
|
|
310
|
+
}
|
|
311
|
+
l.call(W.prototype);
|
|
312
|
+
}
|
|
313
|
+
} else {
|
|
314
|
+
try {
|
|
315
|
+
throw Error();
|
|
316
|
+
} catch (xe) {
|
|
317
|
+
N = xe;
|
|
318
|
+
}
|
|
319
|
+
l();
|
|
320
|
+
}
|
|
321
|
+
} catch (xe) {
|
|
322
|
+
if (xe && N && typeof xe.stack == "string") {
|
|
323
|
+
for (var U = xe.stack.split(`
|
|
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)
|
|
330
|
+
do
|
|
331
|
+
if (ne--, te--, te < 0 || U[ne] !== re[te]) {
|
|
332
|
+
var fe = `
|
|
333
|
+
` + U[ne].replace(" at new ", " at ");
|
|
334
|
+
return typeof l == "function" && Ye.set(l, fe), fe;
|
|
335
|
+
}
|
|
336
|
+
while (ne >= 1 && te >= 0);
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
} finally {
|
|
341
|
+
nn = !1, Me.current = K, Ge(), Error.prepareStackTrace = J;
|
|
342
|
+
}
|
|
343
|
+
var we = l ? l.displayName || l.name : "", $n = we ? ze(we) : "";
|
|
344
|
+
return typeof l == "function" && Ye.set(l, $n), $n;
|
|
345
|
+
}
|
|
346
|
+
function kn(l, T, k) {
|
|
347
|
+
return _n(l, !1);
|
|
348
|
+
}
|
|
349
|
+
function yt(l) {
|
|
350
|
+
var T = l.prototype;
|
|
351
|
+
return !!(T && T.isReactComponent);
|
|
352
|
+
}
|
|
353
|
+
function Ke(l, T, k) {
|
|
354
|
+
if (l == null)
|
|
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) {
|
|
361
|
+
case f:
|
|
362
|
+
return ze("Suspense");
|
|
363
|
+
case x:
|
|
364
|
+
return ze("SuspenseList");
|
|
365
|
+
}
|
|
366
|
+
if (typeof l == "object")
|
|
367
|
+
switch (l.$$typeof) {
|
|
368
|
+
case u:
|
|
369
|
+
return kn(l.render);
|
|
370
|
+
case g:
|
|
371
|
+
return Ke(l.type, T, k);
|
|
372
|
+
case y:
|
|
373
|
+
return kn(l._render);
|
|
374
|
+
case b: {
|
|
375
|
+
var N = l, J = N._payload, K = N._init;
|
|
376
|
+
try {
|
|
377
|
+
return Ke(K(J), T, k);
|
|
378
|
+
} catch {
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return "";
|
|
383
|
+
}
|
|
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);
|
|
389
|
+
} else
|
|
390
|
+
Sn.setExtraStackFrame(null);
|
|
391
|
+
}
|
|
392
|
+
function jt(l, T, k, N, J) {
|
|
393
|
+
{
|
|
394
|
+
var K = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
395
|
+
for (var W in l)
|
|
396
|
+
if (K(l, W)) {
|
|
397
|
+
var U = void 0;
|
|
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`.");
|
|
401
|
+
throw re.name = "Invariant Violation", re;
|
|
402
|
+
}
|
|
403
|
+
U = l[W](T, W, N, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
404
|
+
} catch (ne) {
|
|
405
|
+
U = ne;
|
|
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));
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
var Ln = j.ReactCurrentOwner, tn = Object.prototype.hasOwnProperty, wt = {
|
|
412
|
+
key: !0,
|
|
413
|
+
ref: !0,
|
|
414
|
+
__self: !0,
|
|
415
|
+
__source: !0
|
|
416
|
+
}, On, Rn;
|
|
417
|
+
function pt(l) {
|
|
418
|
+
if (tn.call(l, "ref")) {
|
|
419
|
+
var T = Object.getOwnPropertyDescriptor(l, "ref").get;
|
|
420
|
+
if (T && T.isReactWarning)
|
|
421
|
+
return !1;
|
|
422
|
+
}
|
|
423
|
+
return l.ref !== void 0;
|
|
424
|
+
}
|
|
425
|
+
function _t(l) {
|
|
426
|
+
if (tn.call(l, "key")) {
|
|
427
|
+
var T = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
428
|
+
if (T && T.isReactWarning)
|
|
429
|
+
return !1;
|
|
430
|
+
}
|
|
431
|
+
return l.key !== void 0;
|
|
432
|
+
}
|
|
433
|
+
function kt(l, T) {
|
|
434
|
+
typeof l.ref == "string" && Ln.current;
|
|
435
|
+
}
|
|
436
|
+
function At(l, T) {
|
|
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));
|
|
440
|
+
};
|
|
441
|
+
k.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
442
|
+
get: k,
|
|
443
|
+
configurable: !0
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function St(l, T) {
|
|
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));
|
|
451
|
+
};
|
|
452
|
+
k.isReactWarning = !0, Object.defineProperty(l, "ref", {
|
|
453
|
+
get: k,
|
|
454
|
+
configurable: !0
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
var Lt = function(l, T, k, N, J, K, W) {
|
|
459
|
+
var U = {
|
|
460
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
461
|
+
$$typeof: r,
|
|
462
|
+
// Built-in properties that belong on the element
|
|
463
|
+
type: l,
|
|
464
|
+
key: T,
|
|
465
|
+
ref: k,
|
|
466
|
+
props: W,
|
|
467
|
+
// Record the component responsible for creating this element.
|
|
468
|
+
_owner: K
|
|
469
|
+
};
|
|
470
|
+
return U._store = {}, Object.defineProperty(U._store, "validated", {
|
|
471
|
+
configurable: !1,
|
|
472
|
+
enumerable: !1,
|
|
473
|
+
writable: !0,
|
|
474
|
+
value: !1
|
|
475
|
+
}), Object.defineProperty(U, "_self", {
|
|
476
|
+
configurable: !1,
|
|
477
|
+
enumerable: !1,
|
|
478
|
+
writable: !1,
|
|
479
|
+
value: N
|
|
480
|
+
}), Object.defineProperty(U, "_source", {
|
|
481
|
+
configurable: !1,
|
|
482
|
+
enumerable: !1,
|
|
483
|
+
writable: !1,
|
|
484
|
+
value: J
|
|
485
|
+
}), Object.freeze && (Object.freeze(U.props), Object.freeze(U)), U;
|
|
486
|
+
};
|
|
487
|
+
function Ot(l, T, k, N, J) {
|
|
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]);
|
|
497
|
+
}
|
|
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);
|
|
501
|
+
}
|
|
502
|
+
return Lt(l, U, re, J, N, Ln.current, W);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
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);
|
|
510
|
+
} else
|
|
511
|
+
Dn.setExtraStackFrame(null);
|
|
512
|
+
}
|
|
513
|
+
var rn;
|
|
514
|
+
rn = !1;
|
|
515
|
+
function on(l) {
|
|
516
|
+
return typeof l == "object" && l !== null && l.$$typeof === r;
|
|
517
|
+
}
|
|
518
|
+
function Nn() {
|
|
519
|
+
{
|
|
520
|
+
if (sn.current) {
|
|
521
|
+
var l = $(sn.current.type);
|
|
522
|
+
if (l)
|
|
523
|
+
return `
|
|
524
|
+
|
|
525
|
+
Check the render method of \`` + l + "`.";
|
|
526
|
+
}
|
|
527
|
+
return "";
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
function Rt(l) {
|
|
531
|
+
return "";
|
|
532
|
+
}
|
|
533
|
+
var Mn = {};
|
|
534
|
+
function Dt(l) {
|
|
535
|
+
{
|
|
536
|
+
var T = Nn();
|
|
537
|
+
if (!T) {
|
|
538
|
+
var k = typeof l == "string" ? l : l.displayName || l.name;
|
|
539
|
+
k && (T = `
|
|
540
|
+
|
|
541
|
+
Check the top-level render call using <` + k + ">.");
|
|
542
|
+
}
|
|
543
|
+
return T;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
function Fn(l, T) {
|
|
547
|
+
{
|
|
548
|
+
if (!l._store || l._store.validated || l.key != null)
|
|
549
|
+
return;
|
|
550
|
+
l._store.validated = !0;
|
|
551
|
+
var k = Dt(T);
|
|
552
|
+
if (Mn[k])
|
|
553
|
+
return;
|
|
554
|
+
Mn[k] = !0;
|
|
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);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
function Hn(l, T) {
|
|
560
|
+
{
|
|
561
|
+
if (typeof l != "object")
|
|
562
|
+
return;
|
|
563
|
+
if (Array.isArray(l))
|
|
564
|
+
for (var k = 0; k < l.length; k++) {
|
|
565
|
+
var N = l[k];
|
|
566
|
+
on(N) && Fn(N, T);
|
|
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; )
|
|
574
|
+
on(W.value) && Fn(W.value, T);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
function Nt(l) {
|
|
579
|
+
{
|
|
580
|
+
var T = l.type;
|
|
581
|
+
if (T == null || typeof T == "string")
|
|
582
|
+
return;
|
|
583
|
+
var k;
|
|
584
|
+
if (typeof T == "function")
|
|
585
|
+
k = T.propTypes;
|
|
586
|
+
else if (typeof T == "object" && (T.$$typeof === u || // Note: Memo only checks outer props here.
|
|
587
|
+
// Inner props are checked in the reconciler.
|
|
588
|
+
T.$$typeof === g))
|
|
589
|
+
k = T.propTypes;
|
|
590
|
+
else
|
|
591
|
+
return;
|
|
592
|
+
if (k) {
|
|
593
|
+
var N = $(T);
|
|
594
|
+
jt(k, l.props, "prop", N, l);
|
|
595
|
+
} else if (T.PropTypes !== void 0 && !rn) {
|
|
596
|
+
rn = !0;
|
|
597
|
+
var J = $(T);
|
|
598
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", J || "Unknown");
|
|
599
|
+
}
|
|
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
|
+
}
|
|
602
|
+
}
|
|
603
|
+
function Mt(l) {
|
|
604
|
+
{
|
|
605
|
+
for (var T = Object.keys(l.props), k = 0; k < T.length; k++) {
|
|
606
|
+
var N = T[k];
|
|
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);
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
l.ref !== null && (je(l), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
function In(l, T, k, N, J, K) {
|
|
616
|
+
{
|
|
617
|
+
var W = M(l);
|
|
618
|
+
if (!W) {
|
|
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();
|
|
622
|
+
re ? U += re : U += Nn();
|
|
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);
|
|
625
|
+
}
|
|
626
|
+
var te = Ot(l, T, k, J, K);
|
|
627
|
+
if (te == null)
|
|
628
|
+
return te;
|
|
629
|
+
if (W) {
|
|
630
|
+
var fe = T.children;
|
|
631
|
+
if (fe !== void 0)
|
|
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);
|
|
637
|
+
} else
|
|
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
|
+
else
|
|
640
|
+
Hn(fe, l);
|
|
641
|
+
}
|
|
642
|
+
return l === e.Fragment ? Mt(te) : Nt(te), te;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
function Ft(l, T, k) {
|
|
646
|
+
return In(l, T, k, !0);
|
|
647
|
+
}
|
|
648
|
+
function Ht(l, T, k) {
|
|
649
|
+
return In(l, T, k, !1);
|
|
650
|
+
}
|
|
651
|
+
var It = Ht, $t = Ft;
|
|
652
|
+
e.jsx = It, e.jsxs = $t;
|
|
653
|
+
}();
|
|
654
|
+
}(an)), an;
|
|
655
|
+
}
|
|
656
|
+
var Yn;
|
|
657
|
+
function ls() {
|
|
658
|
+
return Yn || (Yn = 1, process.env.NODE_ENV === "production" ? Je.exports = cs() : Je.exports = is()), Je.exports;
|
|
659
|
+
}
|
|
660
|
+
var n = ls();
|
|
661
|
+
const as = "2.0.0-alpha.8", et = "chat_session", ds = "user_uttered", us = "bot_uttered", fs = "ehelp_bot_uttered", xs = "https://sfchatbot.dataon.com", gs = [
|
|
662
|
+
{
|
|
663
|
+
label: "Didn’t address my question",
|
|
664
|
+
value: "Didn’t address my question"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
label: "Inaccurate Answer",
|
|
668
|
+
value: "Inaccurate Answer"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
label: "The response unclear",
|
|
672
|
+
value: "The response unclear"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
label: "The information is incomplete",
|
|
676
|
+
value: "The information is incomplete"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
label: "I’d like to explain further",
|
|
680
|
+
value: "another"
|
|
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 = [
|
|
683
|
+
// Raster (bitmap)
|
|
684
|
+
".jpg",
|
|
685
|
+
".jpeg",
|
|
686
|
+
".png",
|
|
687
|
+
".gif",
|
|
688
|
+
".bmp",
|
|
689
|
+
".tiff",
|
|
690
|
+
".tif",
|
|
691
|
+
".webp",
|
|
692
|
+
".heif",
|
|
693
|
+
".heic",
|
|
694
|
+
".jp2",
|
|
695
|
+
".ico",
|
|
696
|
+
".dds",
|
|
697
|
+
".raw",
|
|
698
|
+
".cr2",
|
|
699
|
+
".nef",
|
|
700
|
+
".arw",
|
|
701
|
+
".orf",
|
|
702
|
+
".psd",
|
|
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 = {
|
|
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) => {
|
|
707
|
+
var t;
|
|
708
|
+
try {
|
|
709
|
+
return (t = new URL(e)) == null ? void 0 : t.host;
|
|
710
|
+
} catch {
|
|
711
|
+
return nt(xs);
|
|
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;
|
|
716
|
+
}, Ae = (e) => {
|
|
717
|
+
var s;
|
|
718
|
+
const t = e == null ? void 0 : e.attachment;
|
|
719
|
+
return {
|
|
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",
|
|
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")
|
|
725
|
+
};
|
|
726
|
+
}, tt = (e) => {
|
|
727
|
+
var t, s, r, i;
|
|
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("")
|
|
731
|
+
);
|
|
732
|
+
return JSON == null ? void 0 : JSON.parse(a || "{}");
|
|
733
|
+
}
|
|
734
|
+
return {};
|
|
735
|
+
}, En = ({
|
|
736
|
+
downloadURL: e = "",
|
|
737
|
+
fileName: t = "",
|
|
738
|
+
isOpenNewTab: s = !1
|
|
739
|
+
}) => {
|
|
740
|
+
var i;
|
|
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) {
|
|
744
|
+
const t = crypto.getRandomValues(new Uint8Array(1))[0] % 16;
|
|
745
|
+
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
746
|
+
}), Tn = ({
|
|
747
|
+
ArrObj: e,
|
|
748
|
+
key: t,
|
|
749
|
+
ignoreCaseSensitive: s = !1
|
|
750
|
+
}) => (e == null ? void 0 : e.length) > 0 ? [
|
|
751
|
+
...new Map(
|
|
752
|
+
e.map((r) => {
|
|
753
|
+
var i;
|
|
754
|
+
return [
|
|
755
|
+
s ? (i = String(r[t])) == null ? void 0 : i.toLowerCase() : r[t],
|
|
756
|
+
r
|
|
757
|
+
];
|
|
758
|
+
})
|
|
759
|
+
).values()
|
|
760
|
+
] : [], js = (e = []) => {
|
|
761
|
+
const t = {}, s = [], r = [];
|
|
762
|
+
e == null || e.forEach((c) => {
|
|
763
|
+
var o;
|
|
764
|
+
ie(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((a) => {
|
|
765
|
+
r == null || r.push(a);
|
|
766
|
+
}) : r == null || r.push(c);
|
|
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({
|
|
771
|
+
...c,
|
|
772
|
+
indexChat: o,
|
|
773
|
+
...!(c != null && c.timestamp) && {
|
|
774
|
+
timestamp: (d = le()) == null ? void 0 : d.format("hh:mm A")
|
|
775
|
+
}
|
|
776
|
+
}), s == null || s.push({
|
|
777
|
+
keyItem: a ?? o,
|
|
778
|
+
type: "text",
|
|
779
|
+
sender: "response",
|
|
780
|
+
...a && {
|
|
781
|
+
generated_id: a
|
|
782
|
+
},
|
|
783
|
+
chats: t == null ? void 0 : t[a]
|
|
784
|
+
})) : s == null || s.push({
|
|
785
|
+
...c,
|
|
786
|
+
keyItem: o,
|
|
787
|
+
...!(c != null && c.timestamp) && {
|
|
788
|
+
timestamp: (f = le()) == null ? void 0 : f.format("hh:mm A")
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
});
|
|
792
|
+
const i = Tn({ ArrObj: s, key: "keyItem" });
|
|
793
|
+
return i == null || i.forEach((c) => {
|
|
794
|
+
c == null || delete c.keyItem;
|
|
795
|
+
}), i;
|
|
796
|
+
}, Pe = (e = {}) => {
|
|
797
|
+
const s = {
|
|
798
|
+
...st(),
|
|
799
|
+
...e
|
|
800
|
+
};
|
|
801
|
+
localStorage == null || localStorage.setItem(et, JSON.stringify(s || {}));
|
|
802
|
+
}, st = () => {
|
|
803
|
+
const e = localStorage == null ? void 0 : localStorage.getItem(et);
|
|
804
|
+
return JSON.parse(e || "{}");
|
|
805
|
+
}, ws = (e = "") => {
|
|
806
|
+
var t;
|
|
807
|
+
try {
|
|
808
|
+
const s = new URL(e);
|
|
809
|
+
return (t = s == null ? void 0 : s.protocol) != null && t.includes("https") ? "wss" : "ws";
|
|
810
|
+
} catch {
|
|
811
|
+
return "wss";
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
let qn = null;
|
|
815
|
+
const me = (e = ".w-wrapper-body") => {
|
|
816
|
+
const t = document.querySelector(e);
|
|
817
|
+
clearTimeout(qn), qn = setTimeout(() => {
|
|
818
|
+
t && t.scrollTo({
|
|
819
|
+
top: t.scrollHeight,
|
|
820
|
+
behavior: "smooth"
|
|
821
|
+
});
|
|
822
|
+
}, 0);
|
|
823
|
+
}, ps = (e) => {
|
|
824
|
+
const t = new Uint8Array(e);
|
|
825
|
+
let s = "";
|
|
826
|
+
for (let r = 0; r < t.byteLength; r++)
|
|
827
|
+
s += String.fromCharCode(t[r]);
|
|
828
|
+
return btoa(s);
|
|
829
|
+
}, _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);
|
|
832
|
+
if (c.length !== 32)
|
|
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(
|
|
835
|
+
"raw",
|
|
836
|
+
c,
|
|
837
|
+
{ name: "AES-CBC" },
|
|
838
|
+
!1,
|
|
839
|
+
["encrypt"]
|
|
840
|
+
)), a = await crypto.subtle.encrypt(
|
|
841
|
+
{ name: "AES-CBC", iv: new Uint8Array(16) },
|
|
842
|
+
o,
|
|
843
|
+
i
|
|
844
|
+
);
|
|
845
|
+
return ps(a);
|
|
846
|
+
}, Qe = (e) => {
|
|
847
|
+
const t = {}, s = rt(e), r = s == null ? void 0 : s.map((i) => {
|
|
848
|
+
var o;
|
|
849
|
+
const c = i == null ? void 0 : i.CREATED_DATE;
|
|
850
|
+
return {
|
|
851
|
+
...i,
|
|
852
|
+
DATE_KEY: (o = le(c)) == null ? void 0 : o.format("YYYY-MM-DD")
|
|
853
|
+
};
|
|
854
|
+
});
|
|
855
|
+
return r == null || r.forEach((i) => {
|
|
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);
|
|
858
|
+
}), t;
|
|
859
|
+
}, yn = (e) => {
|
|
860
|
+
var t;
|
|
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) => {
|
|
863
|
+
if (e && typeof e == "string") {
|
|
864
|
+
const t = e == null ? void 0 : e.split("."), s = t[(t == null ? void 0 : t.length) - 1];
|
|
865
|
+
return e == null ? void 0 : e.replaceAll(`.${s}`, `_avatar.${s}`);
|
|
866
|
+
}
|
|
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 = ({
|
|
869
|
+
children: e,
|
|
870
|
+
getStartedPayload: t,
|
|
871
|
+
socketURL: s,
|
|
872
|
+
socketPath: r,
|
|
873
|
+
onPayslipFn: i,
|
|
874
|
+
title: c,
|
|
875
|
+
subTitle: o,
|
|
876
|
+
keyEncrypt: a,
|
|
877
|
+
history: d,
|
|
878
|
+
isSF: u
|
|
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(() => ({
|
|
881
|
+
getStartedPayload: t,
|
|
882
|
+
socketURL: s,
|
|
883
|
+
socketPath: r,
|
|
884
|
+
onPayslipFn: i,
|
|
885
|
+
title: c,
|
|
886
|
+
subTitle: o,
|
|
887
|
+
keyEncrypt: a,
|
|
888
|
+
isSF: u
|
|
889
|
+
}), [
|
|
890
|
+
t,
|
|
891
|
+
s,
|
|
892
|
+
r,
|
|
893
|
+
i,
|
|
894
|
+
c,
|
|
895
|
+
o,
|
|
896
|
+
a,
|
|
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(() => {
|
|
902
|
+
Pe({
|
|
903
|
+
chatbot_version: Cs
|
|
904
|
+
});
|
|
905
|
+
}, []), /* @__PURE__ */ n.jsx(
|
|
906
|
+
ct.Provider,
|
|
907
|
+
{
|
|
908
|
+
value: {
|
|
909
|
+
objInitPayload: A,
|
|
910
|
+
setOpenWidget: x,
|
|
911
|
+
isOpenWidget: f,
|
|
912
|
+
activeTab: g,
|
|
913
|
+
setActiveTab: b,
|
|
914
|
+
isExpand: y,
|
|
915
|
+
setExpand: w,
|
|
916
|
+
setObjInitPayload: p,
|
|
917
|
+
parsedJWT: S,
|
|
918
|
+
widgetProps: j,
|
|
919
|
+
isFirstOpenWidget: E,
|
|
920
|
+
setFirstOpenWidget: h,
|
|
921
|
+
isFirstRenderHelpdesk: C,
|
|
922
|
+
history: d,
|
|
923
|
+
showReadyWSHD: m,
|
|
924
|
+
setShowReadyWSHD: v
|
|
925
|
+
},
|
|
926
|
+
children: e
|
|
927
|
+
}
|
|
928
|
+
);
|
|
929
|
+
}, it = Te({}), As = () => ye(it), Ss = ({ children: e }) => {
|
|
930
|
+
const { objInitPayload: t } = q(), [s, r] = D({}), i = () => {
|
|
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 = {};
|
|
938
|
+
u == null || u.forEach((x) => {
|
|
939
|
+
var g;
|
|
940
|
+
(g = Object.keys(a)) == null || g.forEach((b) => {
|
|
941
|
+
var y;
|
|
942
|
+
f[x == null ? void 0 : x.toLowerCase()] = (y = a == null ? void 0 : a[b]) == null ? void 0 : y[x];
|
|
943
|
+
});
|
|
944
|
+
}), r(f);
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
}, c = () => {
|
|
948
|
+
const o = window.indexedDB.open("language");
|
|
949
|
+
o.onsuccess = (a) => {
|
|
950
|
+
var u;
|
|
951
|
+
const d = a.target.result;
|
|
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());
|
|
954
|
+
g.onsuccess = () => {
|
|
955
|
+
r(g == null ? void 0 : g.result);
|
|
956
|
+
}, g.onerror = () => {
|
|
957
|
+
i();
|
|
958
|
+
};
|
|
959
|
+
} catch {
|
|
960
|
+
i();
|
|
961
|
+
}
|
|
962
|
+
}, o.onerror = () => {
|
|
963
|
+
i();
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
return Z(() => {
|
|
967
|
+
c();
|
|
968
|
+
}, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(it.Provider, { value: { langDatas: s }, children: e });
|
|
969
|
+
}, lt = Te({}), ue = () => ye(lt), Ls = ({ children: e }) => {
|
|
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,
|
|
973
|
+
widgetProps: y,
|
|
974
|
+
setOpenWidget: w,
|
|
975
|
+
setFirstOpenWidget: A,
|
|
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");
|
|
979
|
+
s(($) => {
|
|
980
|
+
const H = [
|
|
981
|
+
...$,
|
|
982
|
+
{
|
|
983
|
+
...L,
|
|
984
|
+
...F && {
|
|
985
|
+
type: "text"
|
|
986
|
+
},
|
|
987
|
+
sender: "response"
|
|
988
|
+
}
|
|
989
|
+
];
|
|
990
|
+
return js(H);
|
|
991
|
+
}), i(!1), o(!1), me();
|
|
992
|
+
}, C = () => {
|
|
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
|
|
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);
|
|
1002
|
+
}, j = ({
|
|
1003
|
+
msg: L,
|
|
1004
|
+
additionalConfig: F = {},
|
|
1005
|
+
isShowLoadingResponse: $ = !0
|
|
1006
|
+
}) => {
|
|
1007
|
+
var H;
|
|
1008
|
+
(H = E == null ? void 0 : E.current) == null || H.emit(ds, {
|
|
1009
|
+
customData: {
|
|
1010
|
+
language: b == null ? void 0 : b.lang
|
|
1011
|
+
},
|
|
1012
|
+
message: L,
|
|
1013
|
+
session_id: h == null ? void 0 : h.current,
|
|
1014
|
+
...F
|
|
1015
|
+
}), $ ? i(!0) : o(!0);
|
|
1016
|
+
}, S = () => {
|
|
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(
|
|
1021
|
+
y == null ? void 0 : y.socketURL
|
|
1022
|
+
)}`,
|
|
1023
|
+
{
|
|
1024
|
+
path: y == null ? void 0 : y.socketPath,
|
|
1025
|
+
transports: ["websocket"],
|
|
1026
|
+
reconnection: !0,
|
|
1027
|
+
reconnectionAttempts: 1
|
|
1028
|
+
}
|
|
1029
|
+
);
|
|
1030
|
+
L.on("connect", C), L.on("connect_error", (H) => {
|
|
1031
|
+
console.error("connect_error widget-chatbot : ", {
|
|
1032
|
+
err: H,
|
|
1033
|
+
socketURL: y == null ? void 0 : y.socketURL,
|
|
1034
|
+
socketPath: y == null ? void 0 : y.widgetProps
|
|
1035
|
+
}), f(!1);
|
|
1036
|
+
}), L.io.on("reconnect", () => {
|
|
1037
|
+
console.error("reconnect widget-chatbot : ", {
|
|
1038
|
+
socketURL: y == null ? void 0 : y.socketURL,
|
|
1039
|
+
socketPath: y == null ? void 0 : y.widgetProps
|
|
1040
|
+
}), f(!1);
|
|
1041
|
+
}), E.current = L;
|
|
1042
|
+
}, I = () => {
|
|
1043
|
+
var L;
|
|
1044
|
+
(!((L = E == null ? void 0 : E.current) != null && L.connected) || !u) && (S(), w(!1));
|
|
1045
|
+
}, B = () => {
|
|
1046
|
+
f(!1);
|
|
1047
|
+
};
|
|
1048
|
+
return Z(() => (w(!1), S(), window.addEventListener("online", I), window.addEventListener("offline", B), () => {
|
|
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);
|
|
1051
|
+
}), [
|
|
1052
|
+
JSON.stringify(b || {}),
|
|
1053
|
+
y == null ? void 0 : y.socketURL,
|
|
1054
|
+
y == null ? void 0 : y.socketPath
|
|
1055
|
+
]), /* @__PURE__ */ n.jsx(
|
|
1056
|
+
lt.Provider,
|
|
1057
|
+
{
|
|
1058
|
+
value: {
|
|
1059
|
+
setChats: s,
|
|
1060
|
+
chats: t,
|
|
1061
|
+
onSendMsg: j,
|
|
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,
|
|
1065
|
+
loadingRegenerate: c,
|
|
1066
|
+
file: a,
|
|
1067
|
+
setFile: d,
|
|
1068
|
+
connected: u,
|
|
1069
|
+
isHandshakeWidget: x,
|
|
1070
|
+
createSocket: S,
|
|
1071
|
+
currRegenerateId: m
|
|
1072
|
+
},
|
|
1073
|
+
children: e
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
}, Os = {
|
|
1077
|
+
'pre[class*="language-"]': {
|
|
1078
|
+
color: "#d4d4d4",
|
|
1079
|
+
fontSize: "13px",
|
|
1080
|
+
textShadow: "none",
|
|
1081
|
+
fontFamily: 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',
|
|
1082
|
+
direction: "ltr",
|
|
1083
|
+
textAlign: "left",
|
|
1084
|
+
whiteSpace: "pre",
|
|
1085
|
+
wordSpacing: "normal",
|
|
1086
|
+
wordBreak: "normal",
|
|
1087
|
+
lineHeight: "1.5",
|
|
1088
|
+
MozTabSize: "4",
|
|
1089
|
+
OTabSize: "4",
|
|
1090
|
+
tabSize: "4",
|
|
1091
|
+
WebkitHyphens: "none",
|
|
1092
|
+
MozHyphens: "none",
|
|
1093
|
+
msHyphens: "none",
|
|
1094
|
+
hyphens: "none",
|
|
1095
|
+
padding: "1em",
|
|
1096
|
+
margin: ".5em 0",
|
|
1097
|
+
overflow: "auto",
|
|
1098
|
+
background: "#1e1e1e"
|
|
1099
|
+
},
|
|
1100
|
+
'code[class*="language-"]': {
|
|
1101
|
+
color: "#d4d4d4",
|
|
1102
|
+
fontSize: "13px",
|
|
1103
|
+
textShadow: "none",
|
|
1104
|
+
fontFamily: 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',
|
|
1105
|
+
direction: "ltr",
|
|
1106
|
+
textAlign: "left",
|
|
1107
|
+
whiteSpace: "pre",
|
|
1108
|
+
wordSpacing: "normal",
|
|
1109
|
+
wordBreak: "normal",
|
|
1110
|
+
lineHeight: "1.5",
|
|
1111
|
+
MozTabSize: "4",
|
|
1112
|
+
OTabSize: "4",
|
|
1113
|
+
tabSize: "4",
|
|
1114
|
+
WebkitHyphens: "none",
|
|
1115
|
+
MozHyphens: "none",
|
|
1116
|
+
msHyphens: "none",
|
|
1117
|
+
hyphens: "none"
|
|
1118
|
+
},
|
|
1119
|
+
'pre[class*="language-"]::selection': {
|
|
1120
|
+
textShadow: "none",
|
|
1121
|
+
background: "#264F78"
|
|
1122
|
+
},
|
|
1123
|
+
'code[class*="language-"]::selection': {
|
|
1124
|
+
textShadow: "none",
|
|
1125
|
+
background: "#264F78"
|
|
1126
|
+
},
|
|
1127
|
+
'pre[class*="language-"] *::selection': {
|
|
1128
|
+
textShadow: "none",
|
|
1129
|
+
background: "#264F78"
|
|
1130
|
+
},
|
|
1131
|
+
'code[class*="language-"] *::selection': {
|
|
1132
|
+
textShadow: "none",
|
|
1133
|
+
background: "#264F78"
|
|
1134
|
+
},
|
|
1135
|
+
':not(pre) > code[class*="language-"]': {
|
|
1136
|
+
padding: ".1em .3em",
|
|
1137
|
+
borderRadius: ".3em",
|
|
1138
|
+
color: "#db4c69",
|
|
1139
|
+
background: "#1e1e1e"
|
|
1140
|
+
},
|
|
1141
|
+
".namespace": {
|
|
1142
|
+
Opacity: ".7"
|
|
1143
|
+
},
|
|
1144
|
+
"doctype.doctype-tag": {
|
|
1145
|
+
color: "#569CD6"
|
|
1146
|
+
},
|
|
1147
|
+
"doctype.name": {
|
|
1148
|
+
color: "#9cdcfe"
|
|
1149
|
+
},
|
|
1150
|
+
comment: {
|
|
1151
|
+
color: "#6a9955"
|
|
1152
|
+
},
|
|
1153
|
+
prolog: {
|
|
1154
|
+
color: "#6a9955"
|
|
1155
|
+
},
|
|
1156
|
+
punctuation: {
|
|
1157
|
+
color: "#d4d4d4"
|
|
1158
|
+
},
|
|
1159
|
+
".language-html .language-css .token.punctuation": {
|
|
1160
|
+
color: "#d4d4d4"
|
|
1161
|
+
},
|
|
1162
|
+
".language-html .language-javascript .token.punctuation": {
|
|
1163
|
+
color: "#d4d4d4"
|
|
1164
|
+
},
|
|
1165
|
+
property: {
|
|
1166
|
+
color: "#9cdcfe"
|
|
1167
|
+
},
|
|
1168
|
+
tag: {
|
|
1169
|
+
color: "#569cd6"
|
|
1170
|
+
},
|
|
1171
|
+
boolean: {
|
|
1172
|
+
color: "#569cd6"
|
|
1173
|
+
},
|
|
1174
|
+
number: {
|
|
1175
|
+
color: "#b5cea8"
|
|
1176
|
+
},
|
|
1177
|
+
constant: {
|
|
1178
|
+
color: "#9cdcfe"
|
|
1179
|
+
},
|
|
1180
|
+
symbol: {
|
|
1181
|
+
color: "#b5cea8"
|
|
1182
|
+
},
|
|
1183
|
+
inserted: {
|
|
1184
|
+
color: "#b5cea8"
|
|
1185
|
+
},
|
|
1186
|
+
unit: {
|
|
1187
|
+
color: "#b5cea8"
|
|
1188
|
+
},
|
|
1189
|
+
selector: {
|
|
1190
|
+
color: "#d7ba7d"
|
|
1191
|
+
},
|
|
1192
|
+
"attr-name": {
|
|
1193
|
+
color: "#9cdcfe"
|
|
1194
|
+
},
|
|
1195
|
+
string: {
|
|
1196
|
+
color: "#ce9178"
|
|
1197
|
+
},
|
|
1198
|
+
char: {
|
|
1199
|
+
color: "#ce9178"
|
|
1200
|
+
},
|
|
1201
|
+
builtin: {
|
|
1202
|
+
color: "#ce9178"
|
|
1203
|
+
},
|
|
1204
|
+
deleted: {
|
|
1205
|
+
color: "#ce9178"
|
|
1206
|
+
},
|
|
1207
|
+
".language-css .token.string.url": {
|
|
1208
|
+
textDecoration: "underline"
|
|
1209
|
+
},
|
|
1210
|
+
operator: {
|
|
1211
|
+
color: "#d4d4d4"
|
|
1212
|
+
},
|
|
1213
|
+
entity: {
|
|
1214
|
+
color: "#569cd6"
|
|
1215
|
+
},
|
|
1216
|
+
"operator.arrow": {
|
|
1217
|
+
color: "#569CD6"
|
|
1218
|
+
},
|
|
1219
|
+
atrule: {
|
|
1220
|
+
color: "#ce9178"
|
|
1221
|
+
},
|
|
1222
|
+
"atrule.rule": {
|
|
1223
|
+
color: "#c586c0"
|
|
1224
|
+
},
|
|
1225
|
+
"atrule.url": {
|
|
1226
|
+
color: "#9cdcfe"
|
|
1227
|
+
},
|
|
1228
|
+
"atrule.url.function": {
|
|
1229
|
+
color: "#dcdcaa"
|
|
1230
|
+
},
|
|
1231
|
+
"atrule.url.punctuation": {
|
|
1232
|
+
color: "#d4d4d4"
|
|
1233
|
+
},
|
|
1234
|
+
keyword: {
|
|
1235
|
+
color: "#569CD6"
|
|
1236
|
+
},
|
|
1237
|
+
"keyword.module": {
|
|
1238
|
+
color: "#c586c0"
|
|
1239
|
+
},
|
|
1240
|
+
"keyword.control-flow": {
|
|
1241
|
+
color: "#c586c0"
|
|
1242
|
+
},
|
|
1243
|
+
function: {
|
|
1244
|
+
color: "#dcdcaa"
|
|
1245
|
+
},
|
|
1246
|
+
"function.maybe-class-name": {
|
|
1247
|
+
color: "#dcdcaa"
|
|
1248
|
+
},
|
|
1249
|
+
regex: {
|
|
1250
|
+
color: "#d16969"
|
|
1251
|
+
},
|
|
1252
|
+
important: {
|
|
1253
|
+
color: "#569cd6"
|
|
1254
|
+
},
|
|
1255
|
+
italic: {
|
|
1256
|
+
fontStyle: "italic"
|
|
1257
|
+
},
|
|
1258
|
+
"class-name": {
|
|
1259
|
+
color: "#4ec9b0"
|
|
1260
|
+
},
|
|
1261
|
+
"maybe-class-name": {
|
|
1262
|
+
color: "#4ec9b0"
|
|
1263
|
+
},
|
|
1264
|
+
console: {
|
|
1265
|
+
color: "#9cdcfe"
|
|
1266
|
+
},
|
|
1267
|
+
parameter: {
|
|
1268
|
+
color: "#9cdcfe"
|
|
1269
|
+
},
|
|
1270
|
+
interpolation: {
|
|
1271
|
+
color: "#9cdcfe"
|
|
1272
|
+
},
|
|
1273
|
+
"punctuation.interpolation-punctuation": {
|
|
1274
|
+
color: "#569cd6"
|
|
1275
|
+
},
|
|
1276
|
+
variable: {
|
|
1277
|
+
color: "#9cdcfe"
|
|
1278
|
+
},
|
|
1279
|
+
"imports.maybe-class-name": {
|
|
1280
|
+
color: "#9cdcfe"
|
|
1281
|
+
},
|
|
1282
|
+
"exports.maybe-class-name": {
|
|
1283
|
+
color: "#9cdcfe"
|
|
1284
|
+
},
|
|
1285
|
+
escape: {
|
|
1286
|
+
color: "#d7ba7d"
|
|
1287
|
+
},
|
|
1288
|
+
"tag.punctuation": {
|
|
1289
|
+
color: "#808080"
|
|
1290
|
+
},
|
|
1291
|
+
cdata: {
|
|
1292
|
+
color: "#808080"
|
|
1293
|
+
},
|
|
1294
|
+
"attr-value": {
|
|
1295
|
+
color: "#ce9178"
|
|
1296
|
+
},
|
|
1297
|
+
"attr-value.punctuation": {
|
|
1298
|
+
color: "#ce9178"
|
|
1299
|
+
},
|
|
1300
|
+
"attr-value.punctuation.attr-equals": {
|
|
1301
|
+
color: "#d4d4d4"
|
|
1302
|
+
},
|
|
1303
|
+
namespace: {
|
|
1304
|
+
color: "#4ec9b0"
|
|
1305
|
+
},
|
|
1306
|
+
'pre[class*="language-javascript"]': {
|
|
1307
|
+
color: "#9cdcfe"
|
|
1308
|
+
},
|
|
1309
|
+
'code[class*="language-javascript"]': {
|
|
1310
|
+
color: "#9cdcfe"
|
|
1311
|
+
},
|
|
1312
|
+
'pre[class*="language-jsx"]': {
|
|
1313
|
+
color: "#9cdcfe"
|
|
1314
|
+
},
|
|
1315
|
+
'code[class*="language-jsx"]': {
|
|
1316
|
+
color: "#9cdcfe"
|
|
1317
|
+
},
|
|
1318
|
+
'pre[class*="language-typescript"]': {
|
|
1319
|
+
color: "#9cdcfe"
|
|
1320
|
+
},
|
|
1321
|
+
'code[class*="language-typescript"]': {
|
|
1322
|
+
color: "#9cdcfe"
|
|
1323
|
+
},
|
|
1324
|
+
'pre[class*="language-tsx"]': {
|
|
1325
|
+
color: "#9cdcfe"
|
|
1326
|
+
},
|
|
1327
|
+
'code[class*="language-tsx"]': {
|
|
1328
|
+
color: "#9cdcfe"
|
|
1329
|
+
},
|
|
1330
|
+
'pre[class*="language-css"]': {
|
|
1331
|
+
color: "#ce9178"
|
|
1332
|
+
},
|
|
1333
|
+
'code[class*="language-css"]': {
|
|
1334
|
+
color: "#ce9178"
|
|
1335
|
+
},
|
|
1336
|
+
'pre[class*="language-html"]': {
|
|
1337
|
+
color: "#d4d4d4"
|
|
1338
|
+
},
|
|
1339
|
+
'code[class*="language-html"]': {
|
|
1340
|
+
color: "#d4d4d4"
|
|
1341
|
+
},
|
|
1342
|
+
".language-regex .token.anchor": {
|
|
1343
|
+
color: "#dcdcaa"
|
|
1344
|
+
},
|
|
1345
|
+
".language-html .token.punctuation": {
|
|
1346
|
+
color: "#808080"
|
|
1347
|
+
},
|
|
1348
|
+
'pre[class*="language-"] > code[class*="language-"]': {
|
|
1349
|
+
position: "relative",
|
|
1350
|
+
zIndex: "1"
|
|
1351
|
+
},
|
|
1352
|
+
".line-highlight.line-highlight": {
|
|
1353
|
+
background: "#f7ebc6",
|
|
1354
|
+
boxShadow: "inset 5px 0 0 #f7d87c",
|
|
1355
|
+
zIndex: "0"
|
|
1356
|
+
}
|
|
1357
|
+
}, Rs = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), _ = (e = "", t) => {
|
|
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]);
|
|
1364
|
+
return Le != null && Le.startsWith("5") ? /* @__PURE__ */ n.jsx(
|
|
1365
|
+
Bn,
|
|
1366
|
+
{
|
|
1367
|
+
rootClassName: r,
|
|
1368
|
+
...s,
|
|
1369
|
+
open: t,
|
|
1370
|
+
getContainer: "#w-widget-content",
|
|
1371
|
+
maskProps: {
|
|
1372
|
+
style: {
|
|
1373
|
+
backdropFilter: "blur(4px)"
|
|
1374
|
+
}
|
|
1375
|
+
},
|
|
1376
|
+
width: 300,
|
|
1377
|
+
style: {
|
|
1378
|
+
...Object.keys((s == null ? void 0 : s.style) || {}).length > 0 && {
|
|
1379
|
+
...s == null ? void 0 : s.style
|
|
1380
|
+
},
|
|
1381
|
+
top: 20
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
) : (
|
|
1385
|
+
// <div className={rootClassName}>
|
|
1386
|
+
/* @__PURE__ */ n.jsx(
|
|
1387
|
+
Bn,
|
|
1388
|
+
{
|
|
1389
|
+
getContainer: "#w-widget-content",
|
|
1390
|
+
width: 300,
|
|
1391
|
+
...s,
|
|
1392
|
+
...Oe != null && Oe.startsWith("18") ? {
|
|
1393
|
+
open: t
|
|
1394
|
+
} : { visible: t },
|
|
1395
|
+
maskStyle: {
|
|
1396
|
+
backdropFilter: "blur(4x)",
|
|
1397
|
+
...((i = Object.keys((s == null ? void 0 : s.maskStyle) || {})) == null ? void 0 : i.length) > 0 && {
|
|
1398
|
+
...s == null ? void 0 : s.maskStyle
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
style: {
|
|
1402
|
+
...Object.keys((s == null ? void 0 : s.style) || {}).length > 0 && {
|
|
1403
|
+
...s == null ? void 0 : s.style
|
|
1404
|
+
},
|
|
1405
|
+
top: 20
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
)
|
|
1409
|
+
);
|
|
1410
|
+
}, at = O(Ds), Jn = ({ props: e, isModal: t = !1 }) => {
|
|
1411
|
+
const s = (r, i) => {
|
|
1412
|
+
var c;
|
|
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, {
|
|
1416
|
+
...o == null ? void 0 : o.props,
|
|
1417
|
+
...(o == null ? void 0 : o.type) === "thead" && {
|
|
1418
|
+
className: "ant-table-thead"
|
|
1419
|
+
},
|
|
1420
|
+
...((o == null ? void 0 : o.type) === "th" || (o == null ? void 0 : o.type) === "td") && {
|
|
1421
|
+
className: "ant-table-cell",
|
|
1422
|
+
...(o == null ? void 0 : o.type) === "th" && {
|
|
1423
|
+
style: {
|
|
1424
|
+
background: "var(--primary-color, #395ebc)",
|
|
1425
|
+
color: "#ffffff",
|
|
1426
|
+
minWidth: 180
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
...o.type === "tr" && i === "tbody" && {
|
|
1431
|
+
className: "ant-table-row"
|
|
1432
|
+
},
|
|
1433
|
+
...(o == null ? void 0 : o.type) === "tbody" && {
|
|
1434
|
+
className: "ant-table-tbody"
|
|
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
|
|
1437
|
+
});
|
|
1438
|
+
});
|
|
1439
|
+
};
|
|
1440
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsx("div", { className: "ant-table", children: /* @__PURE__ */ n.jsx("div", { className: "ant-table-container", children: /* @__PURE__ */ n.jsx(
|
|
1441
|
+
"div",
|
|
1442
|
+
{
|
|
1443
|
+
className: "ant-table-content",
|
|
1444
|
+
style: {
|
|
1445
|
+
overflow: "scroll",
|
|
1446
|
+
maxWidth: t ? "100%" : 330,
|
|
1447
|
+
maxHeight: t ? "100%" : 360
|
|
1448
|
+
},
|
|
1449
|
+
children: /* @__PURE__ */ n.jsx("table", { className: "wp-md-table", ...e, children: s(e == null ? void 0 : e.children, "") })
|
|
1450
|
+
}
|
|
1451
|
+
) }) }) });
|
|
1452
|
+
}, Ns = ({ children: e }) => {
|
|
1453
|
+
const t = _(
|
|
1454
|
+
"OpenDetailTable",
|
|
1455
|
+
"Open Detail Table"
|
|
1456
|
+
), s = _("TableDetail", "Tabel Detail"), [r, i] = D(!1), c = {
|
|
1457
|
+
table: ({ ...o }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1458
|
+
/* @__PURE__ */ n.jsx(Jn, { props: o }),
|
|
1459
|
+
/* @__PURE__ */ n.jsx(
|
|
1460
|
+
"div",
|
|
1461
|
+
{
|
|
1462
|
+
style: {
|
|
1463
|
+
display: "flex",
|
|
1464
|
+
justifyContent: "center",
|
|
1465
|
+
padding: "5px 0px 10px 0px"
|
|
1466
|
+
},
|
|
1467
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1468
|
+
G,
|
|
1469
|
+
{
|
|
1470
|
+
onClick: () => {
|
|
1471
|
+
i(!0);
|
|
1472
|
+
},
|
|
1473
|
+
children: t
|
|
1474
|
+
}
|
|
1475
|
+
)
|
|
1476
|
+
}
|
|
1477
|
+
),
|
|
1478
|
+
/* @__PURE__ */ n.jsx(
|
|
1479
|
+
at,
|
|
1480
|
+
{
|
|
1481
|
+
getContainer: () => document.body,
|
|
1482
|
+
footer: null,
|
|
1483
|
+
title: s,
|
|
1484
|
+
width: 800,
|
|
1485
|
+
open: r,
|
|
1486
|
+
onCancel: () => {
|
|
1487
|
+
i(!1);
|
|
1488
|
+
},
|
|
1489
|
+
children: /* @__PURE__ */ n.jsx(Jn, { props: o, isModal: !0 })
|
|
1490
|
+
}
|
|
1491
|
+
)
|
|
1492
|
+
] }),
|
|
1493
|
+
code: ({ ...o }) => {
|
|
1494
|
+
const { children: a, className: d, ...u } = o, f = /language-(\w+)/.exec(d || "");
|
|
1495
|
+
return f ? /* @__PURE__ */ n.jsx(
|
|
1496
|
+
ts,
|
|
1497
|
+
{
|
|
1498
|
+
...u,
|
|
1499
|
+
PreTag: "div",
|
|
1500
|
+
language: f[1],
|
|
1501
|
+
style: Os,
|
|
1502
|
+
children: String(a).replace(/\n$/, "")
|
|
1503
|
+
}
|
|
1504
|
+
) : /* @__PURE__ */ n.jsx(Y.Text, { code: !0, children: o == null ? void 0 : o.children });
|
|
1505
|
+
}
|
|
1506
|
+
};
|
|
1507
|
+
return /* @__PURE__ */ n.jsx(es, { remarkPlugins: [ns], components: c, children: e });
|
|
1508
|
+
}, dt = O(Ns), Ms = () => /* @__PURE__ */ n.jsx(
|
|
1509
|
+
"svg",
|
|
1510
|
+
{
|
|
1511
|
+
width: "24",
|
|
1512
|
+
height: "24",
|
|
1513
|
+
viewBox: "0 0 24 24",
|
|
1514
|
+
fill: "none",
|
|
1515
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1516
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1517
|
+
"path",
|
|
1518
|
+
{
|
|
1519
|
+
fillRule: "evenodd",
|
|
1520
|
+
clipRule: "evenodd",
|
|
1521
|
+
d: "M5.25 4.5H18.75C19.5 4.5 19.5 5.44772 19.5 6V18C19.5 18.5523 19.5 19.5 18.75 19.5H5.25C4.5 19.5 4.5 18.5523 4.5 18V6C4.5 5.44772 4.5 4.5 5.25 4.5ZM3 6C3 4.34315 4.34315 3 6 3H18C19.6569 3 21 4.34315 21 6V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V6ZM17 17V15.75H7V17H17Z",
|
|
1522
|
+
fill: "white"
|
|
1523
|
+
}
|
|
1524
|
+
)
|
|
1525
|
+
}
|
|
1526
|
+
), Fs = () => /* @__PURE__ */ n.jsx(
|
|
1527
|
+
"svg",
|
|
1528
|
+
{
|
|
1529
|
+
width: "24",
|
|
1530
|
+
height: "24",
|
|
1531
|
+
viewBox: "0 0 24 24",
|
|
1532
|
+
fill: "none",
|
|
1533
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1534
|
+
style: { transform: "rotate(0deg)", transition: "300ms" },
|
|
1535
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1536
|
+
"path",
|
|
1537
|
+
{
|
|
1538
|
+
d: "M11.325 21H5.175C3.9735 21 3 20.0265 3 18.825V5.175C3 3.9735 3.9735 3 5.175 3H18.825C20.0265 3 21 3.9735 21 5.175V18.825C21 20.0265 20.0265 21 18.825 21H11.325ZM4.35 5.175V12H9.825C11.0265 12 12 12.9735 12 14.175V19.65H18.825C19.281 19.65 19.65 19.281 19.65 18.825V5.175C19.65 4.71975 19.281 4.35 18.825 4.35H5.175C4.71975 4.35 4.35 4.719 4.35 5.175V5.175ZM4.35 18.825C4.35 19.281 4.719 19.65 5.175 19.65H10.65V14.175C10.65 13.719 10.281 13.35 9.825 13.35H4.35V18.825ZM12.4882 11.5117C12.366 11.3895 12.2902 11.2207 12.2902 11.034C12.2902 10.8472 12.366 10.6785 12.4882 10.5562L15.9863 7.059H14.364C13.9913 7.059 13.689 6.75675 13.689 6.384C13.689 6.01125 13.9913 5.709 14.364 5.709H17.616C17.709 5.709 17.7975 5.7285 17.8785 5.763L17.874 5.7615C17.958 5.79675 18.0293 5.8455 18.09 5.90475C18.1508 5.9655 18.1995 6.03825 18.2333 6.11925L18.2347 6.12375C18.2677 6.1995 18.2872 6.28875 18.2872 6.38175V9.633C18.2872 10.0057 17.985 10.308 17.6122 10.308C17.2395 10.308 16.9373 10.0057 16.9373 9.633V8.0115L13.4393 11.5095C13.317 11.631 13.1483 11.7068 12.9623 11.7068C12.7778 11.7068 12.6105 11.6325 12.489 11.5125L12.4882 11.5117Z",
|
|
1539
|
+
fill: "white"
|
|
1540
|
+
}
|
|
1541
|
+
)
|
|
1542
|
+
}
|
|
1543
|
+
), Hs = () => /* @__PURE__ */ n.jsxs(
|
|
1544
|
+
"svg",
|
|
1545
|
+
{
|
|
1546
|
+
viewBox: "64 64 896 896",
|
|
1547
|
+
focusable: "false",
|
|
1548
|
+
width: "14",
|
|
1549
|
+
height: "14",
|
|
1550
|
+
"aria-hidden": "true",
|
|
1551
|
+
fill: "white",
|
|
1552
|
+
children: [
|
|
1553
|
+
/* @__PURE__ */ n.jsx("defs", { children: /* @__PURE__ */ n.jsx("style", {}) }),
|
|
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
|
+
]
|
|
1556
|
+
}
|
|
1557
|
+
), Is = () => /* @__PURE__ */ n.jsxs(
|
|
1558
|
+
"svg",
|
|
1559
|
+
{
|
|
1560
|
+
viewBox: "-2.4 -2.4 28.80 28.80",
|
|
1561
|
+
fill: "none",
|
|
1562
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1563
|
+
children: [
|
|
1564
|
+
/* @__PURE__ */ n.jsx("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
|
|
1565
|
+
/* @__PURE__ */ n.jsx(
|
|
1566
|
+
"g",
|
|
1567
|
+
{
|
|
1568
|
+
id: "SVGRepo_tracerCarrier",
|
|
1569
|
+
strokeLinecap: "round",
|
|
1570
|
+
strokeLinejoin: "round"
|
|
1571
|
+
}
|
|
1572
|
+
),
|
|
1573
|
+
/* @__PURE__ */ n.jsx("g", { id: "SVGRepo_iconCarrier", children: /* @__PURE__ */ n.jsx(
|
|
1574
|
+
"path",
|
|
1575
|
+
{
|
|
1576
|
+
fillRule: "evenodd",
|
|
1577
|
+
clipRule: "evenodd",
|
|
1578
|
+
d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM8.58579 8.58579C8 9.17157 8 10.1144 8 12C8 13.8856 8 14.8284 8.58579 15.4142C9.17157 16 10.1144 16 12 16C13.8856 16 14.8284 16 15.4142 15.4142C16 14.8284 16 13.8856 16 12C16 10.1144 16 9.17157 15.4142 8.58579C14.8284 8 13.8856 8 12 8C10.1144 8 9.17157 8 8.58579 8.58579Z",
|
|
1579
|
+
fill: "rgb(57, 94, 188)"
|
|
1580
|
+
}
|
|
1581
|
+
) })
|
|
1582
|
+
]
|
|
1583
|
+
}
|
|
1584
|
+
), $s = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "sync", className: "anticon anticon-sync", children: /* @__PURE__ */ n.jsx(
|
|
1585
|
+
"svg",
|
|
1586
|
+
{
|
|
1587
|
+
viewBox: "64 64 896 896",
|
|
1588
|
+
focusable: "false",
|
|
1589
|
+
width: "1em",
|
|
1590
|
+
height: "1em",
|
|
1591
|
+
fill: "currentColor",
|
|
1592
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1595
|
+
) }), Bs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "left", className: "anticon anticon-left", children: /* @__PURE__ */ n.jsx(
|
|
1596
|
+
"svg",
|
|
1597
|
+
{
|
|
1598
|
+
viewBox: "64 64 896 896",
|
|
1599
|
+
focusable: "false",
|
|
1600
|
+
width: "1em",
|
|
1601
|
+
height: "1em",
|
|
1602
|
+
fill: "currentColor",
|
|
1603
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1606
|
+
) }), Us = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "right", className: "anticon anticon-right", children: /* @__PURE__ */ n.jsx(
|
|
1607
|
+
"svg",
|
|
1608
|
+
{
|
|
1609
|
+
viewBox: "64 64 896 896",
|
|
1610
|
+
focusable: "false",
|
|
1611
|
+
width: "1em",
|
|
1612
|
+
height: "1em",
|
|
1613
|
+
fill: "currentColor",
|
|
1614
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1617
|
+
) }), Ws = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "like", className: "anticon anticon-like", children: /* @__PURE__ */ n.jsxs(
|
|
1618
|
+
"svg",
|
|
1619
|
+
{
|
|
1620
|
+
viewBox: "64 64 896 896",
|
|
1621
|
+
focusable: "false",
|
|
1622
|
+
"data-icon": "like",
|
|
1623
|
+
width: "1em",
|
|
1624
|
+
height: "1em",
|
|
1625
|
+
fill: "currentColor",
|
|
1626
|
+
"aria-hidden": "true",
|
|
1627
|
+
children: [
|
|
1628
|
+
/* @__PURE__ */ n.jsx(
|
|
1629
|
+
"path",
|
|
1630
|
+
{
|
|
1631
|
+
d: "M273 495.9v428l.3-428zm538.2-88.3H496.8l9.6-198.4c.6-11.9-4.7-23.1-14.6-30.5-6.1-4.5-13.6-6.8-21.1-6.7-19.6.1-36.9 13.4-42.2 32.3-37.1 134.4-64.9 235.2-83.5 302.5V852h399.4a56.85 56.85 0 0033.6-51.8c0-9.7-2.3-18.9-6.9-27.3l-13.9-25.4 21.9-19a56.76 56.76 0 0019.6-43c0-9.7-2.3-18.9-6.9-27.3l-13.9-25.4 21.9-19a56.76 56.76 0 0019.6-43c0-9.7-2.3-18.9-6.9-27.3l-14-25.5 21.9-19a56.76 56.76 0 0019.6-43c0-19.1-11-37.5-28.8-48.4z",
|
|
1632
|
+
fill: (e == null ? void 0 : e.feedback) === "like" ? "green" : "#fff"
|
|
1633
|
+
}
|
|
1634
|
+
),
|
|
1635
|
+
/* @__PURE__ */ n.jsx(
|
|
1636
|
+
"path",
|
|
1637
|
+
{
|
|
1638
|
+
d: "M112 528v364c0 17.7 14.3 32 32 32h65V496h-65c-17.7 0-32 14.3-32 32zm773.9 5.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.5-65.5-111a67.67 67.67 0 00-34.3-9.3H572.3l6-122.9c1.5-29.7-9-57.9-29.5-79.4a106.4 106.4 0 00-77.9-33.4c-52 0-98 35-111.8 85.1l-85.8 310.8-.3 428h472.1c9.3 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37zM820.4 499l-21.9 19 14 25.5a56.2 56.2 0 016.9 27.3c0 16.5-7.1 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.1 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H345V506.8c18.6-67.2 46.4-168 83.5-302.5a44.28 44.28 0 0142.2-32.3c7.5-.1 15 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.1 32.2-19.6 43z",
|
|
1639
|
+
fill: (e == null ? void 0 : e.feedback) === "like" ? "green" : "black"
|
|
1640
|
+
}
|
|
1641
|
+
)
|
|
1642
|
+
]
|
|
1643
|
+
}
|
|
1644
|
+
) }), Vs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "dislike", className: "anticon anticon-dislike", children: /* @__PURE__ */ n.jsxs(
|
|
1645
|
+
"svg",
|
|
1646
|
+
{
|
|
1647
|
+
viewBox: "64 64 896 896",
|
|
1648
|
+
focusable: "false",
|
|
1649
|
+
"data-icon": "dislike",
|
|
1650
|
+
width: "1em",
|
|
1651
|
+
height: "1em",
|
|
1652
|
+
fill: "currentColor",
|
|
1653
|
+
"aria-hidden": "true",
|
|
1654
|
+
children: [
|
|
1655
|
+
/* @__PURE__ */ n.jsx(
|
|
1656
|
+
"path",
|
|
1657
|
+
{
|
|
1658
|
+
d: "M273 100.1v428h.3l-.3-428zM820.4 525l-21.9-19 14-25.5a56.2 56.2 0 006.9-27.3c0-16.5-7.1-32.2-19.6-43l-21.9-19 13.9-25.4a56.2 56.2 0 006.9-27.3c0-16.5-7.1-32.2-19.6-43l-21.9-19 13.9-25.4a56.2 56.2 0 006.9-27.3c0-22.4-13.2-42.6-33.6-51.8H345v345.2c18.6 67.2 46.4 168 83.5 302.5a44.28 44.28 0 0042.2 32.3c7.5.1 15-2.2 21.1-6.7 9.9-7.4 15.2-18.6 14.6-30.5l-9.6-198.4h314.4C829 605.5 840 587.1 840 568c0-16.5-7.1-32.2-19.6-43z",
|
|
1659
|
+
fill: (e == null ? void 0 : e.feedback) === "dislike" ? "red" : "#fff"
|
|
1660
|
+
}
|
|
1661
|
+
),
|
|
1662
|
+
/* @__PURE__ */ n.jsx(
|
|
1663
|
+
"path",
|
|
1664
|
+
{
|
|
1665
|
+
d: "M112 132v364c0 17.7 14.3 32 32 32h65V100h-65c-17.7 0-32 14.3-32 32zm773.9 358.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4a66.1 66.1 0 00-26.5-5.4H273l.3 428 85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zm-74.7 126.1H496.8l9.6 198.4c.6 11.9-4.7 23.1-14.6 30.5-6.1 4.5-13.6 6.8-21.1 6.7a44.28 44.28 0 01-42.2-32.3c-37.1-134.4-64.9-235.2-83.5-302.5V172h399.4a56.85 56.85 0 0133.6 51.8c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-14 25.5 21.9 19a56.76 56.76 0 0119.6 43c0 19.1-11 37.5-28.8 48.4z",
|
|
1666
|
+
fill: (e == null ? void 0 : e.feedback) === "dislike" ? "red" : "black"
|
|
1667
|
+
}
|
|
1668
|
+
)
|
|
1669
|
+
]
|
|
1670
|
+
}
|
|
1671
|
+
) }), Gs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "delete", className: "anticon anticon-delete", children: /* @__PURE__ */ n.jsx(
|
|
1672
|
+
"svg",
|
|
1673
|
+
{
|
|
1674
|
+
viewBox: "64 64 896 896",
|
|
1675
|
+
focusable: "false",
|
|
1676
|
+
width: "1em",
|
|
1677
|
+
height: "1em",
|
|
1678
|
+
fill: "currentColor",
|
|
1679
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1682
|
+
) }), zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "close", className: "anticon anticon-close", children: /* @__PURE__ */ n.jsx(
|
|
1683
|
+
"svg",
|
|
1684
|
+
{
|
|
1685
|
+
fillRule: "evenodd",
|
|
1686
|
+
viewBox: "64 64 896 896",
|
|
1687
|
+
focusable: "false",
|
|
1688
|
+
"data-icon": "close",
|
|
1689
|
+
width: "1em",
|
|
1690
|
+
height: "1em",
|
|
1691
|
+
fill: "currentColor",
|
|
1692
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1695
|
+
) }), Ys = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "upload", className: "anticon anticon-upload", children: /* @__PURE__ */ n.jsx(
|
|
1696
|
+
"svg",
|
|
1697
|
+
{
|
|
1698
|
+
viewBox: "64 64 896 896",
|
|
1699
|
+
focusable: "false",
|
|
1700
|
+
width: "1em",
|
|
1701
|
+
height: "1em",
|
|
1702
|
+
fill: "currentColor",
|
|
1703
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1706
|
+
) }), Ks = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "filter", className: "anticon anticon-filter", children: /* @__PURE__ */ n.jsx(
|
|
1707
|
+
"svg",
|
|
1708
|
+
{
|
|
1709
|
+
viewBox: "64 64 896 896",
|
|
1710
|
+
focusable: "false",
|
|
1711
|
+
width: "1em",
|
|
1712
|
+
height: "1em",
|
|
1713
|
+
fill: "currentColor",
|
|
1714
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1717
|
+
) }), qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "down", className: "anticon anticon-down", children: /* @__PURE__ */ n.jsx(
|
|
1718
|
+
"svg",
|
|
1719
|
+
{
|
|
1720
|
+
viewBox: "64 64 896 896",
|
|
1721
|
+
focusable: "false",
|
|
1722
|
+
width: "1em",
|
|
1723
|
+
height: "1em",
|
|
1724
|
+
fill: "currentColor",
|
|
1725
|
+
"aria-hidden": "true",
|
|
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
|
+
}
|
|
1728
|
+
) }), Js = () => /* @__PURE__ */ n.jsx(
|
|
1729
|
+
"span",
|
|
1730
|
+
{
|
|
1731
|
+
role: "img",
|
|
1732
|
+
"aria-label": "paper-clip",
|
|
1733
|
+
className: "anticon anticon-paper-clip",
|
|
1734
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1735
|
+
"svg",
|
|
1736
|
+
{
|
|
1737
|
+
viewBox: "64 64 896 896",
|
|
1738
|
+
focusable: "false",
|
|
1739
|
+
width: "1em",
|
|
1740
|
+
height: "1em",
|
|
1741
|
+
fill: "currentColor",
|
|
1742
|
+
"aria-hidden": "true",
|
|
1743
|
+
children: /* @__PURE__ */ n.jsx("path", { d: "M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z" })
|
|
1744
|
+
}
|
|
1745
|
+
)
|
|
1746
|
+
}
|
|
1747
|
+
), Qs = () => /* @__PURE__ */ n.jsx(
|
|
1748
|
+
"svg",
|
|
1749
|
+
{
|
|
1750
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1751
|
+
width: "18",
|
|
1752
|
+
height: "18",
|
|
1753
|
+
viewBox: "0 0 32 32",
|
|
1754
|
+
fill: "none",
|
|
1755
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1756
|
+
"path",
|
|
1757
|
+
{
|
|
1758
|
+
d: "M13.083 1C10.9876 0.99919 8.92848 1.54638 7.10994 2.58726C5.2914 3.62814 3.7767 5.12652 2.71618 6.93367C1.65565 8.74083 1.08618 10.7939 1.06429 12.8892C1.0424 14.9844 1.56884 17.0489 2.59138 18.8778L1.12189 22.7262C0.999579 23.0461 0.968553 23.3937 1.03227 23.7303C1.096 24.0668 1.25196 24.379 1.48276 24.632C1.71356 24.885 2.01013 25.069 2.33938 25.1633C2.66863 25.2576 3.0176 25.2586 3.34738 25.1661L7.94438 23.8778C9.57274 24.6472 11.3532 25.0407 13.1542 25.0291C14.9551 25.0176 16.7304 24.6013 18.3488 23.8111C19.9671 23.0209 21.3871 21.8769 22.5038 20.4639C23.6204 19.0509 24.4051 17.4049 24.7998 15.6477C25.1944 13.8905 25.189 12.0671 24.7839 10.3122C24.3788 8.5574 23.5844 6.9161 22.4595 5.50971C21.3345 4.10332 19.9077 2.96783 18.2847 2.18722C16.6617 1.40662 14.8839 1.00088 13.083 1ZM13.0682 8.21066C12.4064 8.34005 11.6819 8.76888 11.1126 9.77442C11.0526 9.88001 10.9724 9.97275 10.8766 10.0474C10.7808 10.122 10.6713 10.177 10.5542 10.2092C10.4372 10.2415 10.3149 10.2504 10.1944 10.2354C10.0739 10.2204 9.95753 10.1819 9.85194 10.1219C9.74635 10.062 9.6536 9.98179 9.57899 9.88599C9.50439 9.79019 9.44938 9.68064 9.41711 9.56358C9.38484 9.44652 9.37594 9.32425 9.39093 9.20375C9.40591 9.08326 9.44448 8.96689 9.50444 8.8613C10.3196 7.42693 11.4785 6.63766 12.7133 6.39737C13.8622 6.18019 15.0505 6.41957 16.0256 7.06464C16.9203 7.65613 17.643 8.62285 17.6652 9.78181C17.6892 10.9925 16.9535 12.0849 15.5968 12.8871C14.6763 13.4306 14.3177 13.8003 14.1643 14.0461C14.0349 14.2531 14.0072 14.4417 14.0072 14.8631C14.0072 15.1082 13.9098 15.3433 13.7365 15.5166C13.5632 15.6899 13.3281 15.7873 13.083 15.7873C12.8379 15.7873 12.6028 15.6899 12.4295 15.5166C12.2561 15.3433 12.1588 15.1082 12.1588 14.8631C12.1588 14.3603 12.1846 13.7356 12.5968 13.0701C12.985 12.4472 13.6486 11.8927 14.6578 11.2957C15.6467 10.7097 15.826 10.1533 15.8205 9.82062C15.8131 9.438 15.558 8.97035 15.0072 8.60622C14.4369 8.22892 13.7426 8.08716 13.07 8.21066H13.0682ZM13.5432 20.4083C13.1755 20.4083 12.8229 20.2623 12.563 20.0023C12.303 19.7423 12.1569 19.3897 12.1569 19.022C12.1569 18.6544 12.303 18.3017 12.563 18.0418C12.8229 17.7818 13.1755 17.6357 13.5432 17.6357C13.9109 17.6357 14.2635 17.7818 14.5235 18.0418C14.7835 18.3017 14.9295 18.6544 14.9295 19.022C14.9295 19.3897 14.7835 19.7423 14.5235 20.0023C14.2635 20.2623 13.9109 20.4083 13.5432 20.4083ZM9.45084 26.3972C10.5776 27.7093 11.975 28.762 13.547 29.4831C15.119 30.2042 16.8285 30.5765 18.558 30.5746C20.3934 30.5746 22.1365 30.1624 23.6966 29.423L28.2917 30.7114C28.6215 30.8038 28.9705 30.8028 29.2997 30.7085C29.629 30.6142 29.9255 30.4303 30.1563 30.1772C30.3871 29.9242 30.5431 29.612 30.6068 29.2755C30.6705 28.939 30.6395 28.5914 30.5172 28.2715L29.0477 24.4231C30.05 22.6316 30.5751 20.6127 30.5726 18.5599C30.5726 14.974 29.0015 11.7541 26.508 9.5526C26.7814 10.6172 26.9272 11.7105 26.9424 12.8095C28.0662 14.4454 28.7242 16.4269 28.7242 18.5599C28.7242 20.5008 28.1808 22.314 27.2363 23.8575L26.9997 24.2456L28.7926 28.9314L23.5062 27.4526L23.1827 27.6153C21.7964 28.3251 20.2252 28.7262 18.558 28.7262C16.4617 28.7294 14.4162 28.0816 12.704 26.8722C11.6046 26.8435 10.5126 26.684 9.45084 26.3972Z",
|
|
1759
|
+
fill: "white"
|
|
1760
|
+
}
|
|
1761
|
+
)
|
|
1762
|
+
}
|
|
1763
|
+
), Zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "smile", className: "anticon anticon-smile", children: /* @__PURE__ */ n.jsx(
|
|
1764
|
+
"svg",
|
|
1765
|
+
{
|
|
1766
|
+
viewBox: "64 64 896 896",
|
|
1767
|
+
focusable: "false",
|
|
1768
|
+
width: "1em",
|
|
1769
|
+
height: "1em",
|
|
1770
|
+
fill: "currentColor",
|
|
1771
|
+
"aria-hidden": "true",
|
|
1772
|
+
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
|
+
) }), Xs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "file", className: "anticon anticon-file", children: /* @__PURE__ */ n.jsx(
|
|
1775
|
+
"svg",
|
|
1776
|
+
{
|
|
1777
|
+
viewBox: "64 64 896 896",
|
|
1778
|
+
focusable: "false",
|
|
1779
|
+
width: 24,
|
|
1780
|
+
height: 24,
|
|
1781
|
+
fill: "currentColor",
|
|
1782
|
+
"aria-hidden": "true",
|
|
1783
|
+
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
|
+
) }), Ps = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, className: "w-spin-animate", children: /* @__PURE__ */ n.jsx(
|
|
1786
|
+
"svg",
|
|
1787
|
+
{
|
|
1788
|
+
viewBox: "0 0 1024 1024",
|
|
1789
|
+
focusable: "false",
|
|
1790
|
+
"data-icon": "loading",
|
|
1791
|
+
width: 52,
|
|
1792
|
+
height: 52,
|
|
1793
|
+
fill: "currentColor",
|
|
1794
|
+
"aria-hidden": "true",
|
|
1795
|
+
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
|
+
) }), 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 })
|
|
1818
|
+
}), [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]);
|
|
1822
|
+
return /* @__PURE__ */ n.jsx(
|
|
1823
|
+
ut.Provider,
|
|
1824
|
+
{
|
|
1825
|
+
value: {
|
|
1826
|
+
activeTab: t,
|
|
1827
|
+
setActiveTab: s,
|
|
1828
|
+
isActiveTabVA: r
|
|
1829
|
+
},
|
|
1830
|
+
children: e
|
|
1831
|
+
}
|
|
1832
|
+
);
|
|
1833
|
+
}, nr = ({ ...e }) => {
|
|
1834
|
+
const t = _(
|
|
1835
|
+
"WeLoveToHearAboutYourExperienceWithTheSunfishChatbot",
|
|
1836
|
+
"We'd love to hear about your experience with the Sunfish chatbot"
|
|
1837
|
+
), s = _(
|
|
1838
|
+
"ShareAnyCommentsOrSuggestionsToHelpUsImprove",
|
|
1839
|
+
"Share any comments or suggestions to help us improve"
|
|
1840
|
+
), r = _("Submit", "Submit"), i = _(
|
|
1841
|
+
"ThankFeedback",
|
|
1842
|
+
"Thank You for your feedback"
|
|
1843
|
+
), c = _(
|
|
1844
|
+
"AdditionalFeedback",
|
|
1845
|
+
"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(() => {
|
|
1855
|
+
if (g != null && g.uriBackend)
|
|
1856
|
+
try {
|
|
1857
|
+
return new URL(g.uriBackend).origin;
|
|
1858
|
+
} catch {
|
|
1859
|
+
return "";
|
|
1860
|
+
}
|
|
1861
|
+
return "";
|
|
1862
|
+
}, [g == null ? void 0 : g.uriBackend]), p = (E) => {
|
|
1863
|
+
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 = "",
|
|
1868
|
+
uriBackend: j = "",
|
|
1869
|
+
uriBackendEnt: S = "",
|
|
1870
|
+
lang: I = ""
|
|
1871
|
+
} = g || {}, B = u === "another" ? o == null ? void 0 : o.getFieldValue("ADDITIONAL_FEEDBACK") : u;
|
|
1872
|
+
(M = Re({
|
|
1873
|
+
method: "POST",
|
|
1874
|
+
url: h,
|
|
1875
|
+
data: {
|
|
1876
|
+
message_id: e == null ? void 0 : e.id,
|
|
1877
|
+
response_type: E === "like" ? "up" : "down",
|
|
1878
|
+
...E === "dislike" && {
|
|
1879
|
+
additional_feedback: B
|
|
1880
|
+
}
|
|
1881
|
+
},
|
|
1882
|
+
headers: {
|
|
1883
|
+
"Content-Type": "application/json",
|
|
1884
|
+
Authorization: `Bearer ${m}`,
|
|
1885
|
+
"company-code": `${v}`,
|
|
1886
|
+
"company-id": `${C}`,
|
|
1887
|
+
uriBackend: `${j}`,
|
|
1888
|
+
uriBackendEnt: `${S}`,
|
|
1889
|
+
"custom-origin": `${A}`,
|
|
1890
|
+
"Acc-Name": `${v.toUpperCase()}`,
|
|
1891
|
+
Language: `${I}`
|
|
1892
|
+
}
|
|
1893
|
+
})) == null || M.then((L) => {
|
|
1894
|
+
var F, $, H;
|
|
1895
|
+
(L == null ? void 0 : L.status) === 200 && (a && d(!1), (F = Ce) == null || F.destroy(), ($ = Ce) == null || $.config({
|
|
1896
|
+
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
1897
|
+
top: 28,
|
|
1898
|
+
placement: "top",
|
|
1899
|
+
duration: 3
|
|
1900
|
+
}), (H = Ce) == null || H.success({
|
|
1901
|
+
message: i,
|
|
1902
|
+
className: "w-notification-content"
|
|
1903
|
+
}), x((V) => {
|
|
1904
|
+
var Q;
|
|
1905
|
+
return (Q = V == null ? void 0 : V.map((X) => {
|
|
1906
|
+
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) ? {
|
|
1909
|
+
...ce,
|
|
1910
|
+
feedback: E
|
|
1911
|
+
} : ce);
|
|
1912
|
+
return {
|
|
1913
|
+
...X,
|
|
1914
|
+
chats: ae
|
|
1915
|
+
};
|
|
1916
|
+
}
|
|
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();
|
|
1922
|
+
}));
|
|
1923
|
+
});
|
|
1924
|
+
};
|
|
1925
|
+
return Z(() => {
|
|
1926
|
+
var E;
|
|
1927
|
+
(E = Ce) == null || E.destroy();
|
|
1928
|
+
}, [b]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1929
|
+
y && /* @__PURE__ */ n.jsx(
|
|
1930
|
+
G,
|
|
1931
|
+
{
|
|
1932
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "like", chatProps: e }),
|
|
1933
|
+
onClick: () => {
|
|
1934
|
+
(e == null ? void 0 : e.feedback) !== "like" && p("like");
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
),
|
|
1938
|
+
w && /* @__PURE__ */ n.jsx(
|
|
1939
|
+
G,
|
|
1940
|
+
{
|
|
1941
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "dislike", chatProps: e }),
|
|
1942
|
+
onClick: () => {
|
|
1943
|
+
(e == null ? void 0 : e.feedback) !== "dislike" && d(!0);
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
),
|
|
1947
|
+
/* @__PURE__ */ n.jsxs(
|
|
1948
|
+
at,
|
|
1949
|
+
{
|
|
1950
|
+
open: a,
|
|
1951
|
+
isFeedback: !0,
|
|
1952
|
+
okText: r,
|
|
1953
|
+
onCancel: () => {
|
|
1954
|
+
d(!1);
|
|
1955
|
+
},
|
|
1956
|
+
onOk: () => {
|
|
1957
|
+
p("dislike");
|
|
1958
|
+
},
|
|
1959
|
+
children: [
|
|
1960
|
+
/* @__PURE__ */ n.jsx("p", { style: { textAlign: "center", fontWeight: 600, fontSize: 14 }, children: t }),
|
|
1961
|
+
/* @__PURE__ */ n.jsxs("p", { style: { textAlign: "center" }, children: [
|
|
1962
|
+
s,
|
|
1963
|
+
"!"
|
|
1964
|
+
] }),
|
|
1965
|
+
/* @__PURE__ */ n.jsx(
|
|
1966
|
+
Yt.Group,
|
|
1967
|
+
{
|
|
1968
|
+
className: "w-list-feedback-suggestion",
|
|
1969
|
+
options: gs,
|
|
1970
|
+
optionType: "button",
|
|
1971
|
+
buttonStyle: "solid",
|
|
1972
|
+
onChange: (E) => {
|
|
1973
|
+
var h;
|
|
1974
|
+
f((h = E == null ? void 0 : E.target) == null ? void 0 : h.value);
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
),
|
|
1978
|
+
u === "another" && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1979
|
+
/* @__PURE__ */ n.jsx(Kt, { children: c }),
|
|
1980
|
+
/* @__PURE__ */ n.jsx(oe, { form: o, layout: "vertical", children: /* @__PURE__ */ n.jsx(oe.Item, { name: "ADDITIONAL_FEEDBACK", children: /* @__PURE__ */ n.jsx(Be.TextArea, { rows: 3 }) }) })
|
|
1981
|
+
] })
|
|
1982
|
+
]
|
|
1983
|
+
}
|
|
1984
|
+
)
|
|
1985
|
+
] });
|
|
1986
|
+
}, tr = O(nr), sr = ({
|
|
1987
|
+
showFeedback: e = !0,
|
|
1988
|
+
showRegenerate: t = !0,
|
|
1989
|
+
position: s = "left",
|
|
1990
|
+
...r
|
|
1991
|
+
}) => {
|
|
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
|
+
switch (s) {
|
|
1994
|
+
case "left":
|
|
1995
|
+
return "flex-start";
|
|
1996
|
+
case "center":
|
|
1997
|
+
return "center";
|
|
1998
|
+
case "right":
|
|
1999
|
+
return "flex-end";
|
|
2000
|
+
}
|
|
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
|
|
2007
|
+
// 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,
|
|
2011
|
+
additionalConfig: {
|
|
2012
|
+
generate_id: (p == null ? void 0 : p.generated_id) ?? i
|
|
2013
|
+
},
|
|
2014
|
+
isShowLoadingResponse: d
|
|
2015
|
+
}), me();
|
|
2016
|
+
};
|
|
2017
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(
|
|
2018
|
+
"div",
|
|
2019
|
+
{
|
|
2020
|
+
style: {
|
|
2021
|
+
display: "flex",
|
|
2022
|
+
gap: 8,
|
|
2023
|
+
justifyContent: b
|
|
2024
|
+
},
|
|
2025
|
+
children: [
|
|
2026
|
+
g && /* @__PURE__ */ n.jsx(
|
|
2027
|
+
G,
|
|
2028
|
+
{
|
|
2029
|
+
loading: d,
|
|
2030
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "sync" }),
|
|
2031
|
+
onClick: () => {
|
|
2032
|
+
w();
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
),
|
|
2036
|
+
y && /* @__PURE__ */ n.jsx(tr, { ...r })
|
|
2037
|
+
]
|
|
2038
|
+
}
|
|
2039
|
+
) });
|
|
2040
|
+
}, Cn = O(sr), rr = ({ nameFallback: e = "", ...t }) => /* @__PURE__ */ n.jsx(
|
|
2041
|
+
qt,
|
|
2042
|
+
{
|
|
2043
|
+
...typeof (t == null ? void 0 : t.onError) != "function" && {
|
|
2044
|
+
fallback: jn(e)
|
|
2045
|
+
},
|
|
2046
|
+
placeholder: /* @__PURE__ */ n.jsx(de.Image, { style: { width: "100%", height: "100%" } }),
|
|
2047
|
+
loading: "lazy",
|
|
2048
|
+
...t
|
|
2049
|
+
}
|
|
2050
|
+
), wn = O(rr), or = ({ nameFallback: e = "", ...t }) => {
|
|
2051
|
+
const s = z(0);
|
|
2052
|
+
return /* @__PURE__ */ n.jsx(
|
|
2053
|
+
Qn,
|
|
2054
|
+
{
|
|
2055
|
+
...t,
|
|
2056
|
+
src: /* @__PURE__ */ n.jsx(
|
|
2057
|
+
wn,
|
|
2058
|
+
{
|
|
2059
|
+
src: t == null ? void 0 : t.src,
|
|
2060
|
+
nameFallback: e,
|
|
2061
|
+
...t,
|
|
2062
|
+
onError: (r) => {
|
|
2063
|
+
s.current += 1, (s == null ? void 0 : s.current) < 3 ? r.target.src = ot(t == null ? void 0 : t.src) : r.target.src = jn(e);
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
)
|
|
2067
|
+
}
|
|
2068
|
+
);
|
|
2069
|
+
}, Ee = O(or);
|
|
2070
|
+
Ee.Group = Qn.Group;
|
|
2071
|
+
const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", children: [
|
|
2072
|
+
/* @__PURE__ */ n.jsx("div", {}),
|
|
2073
|
+
/* @__PURE__ */ n.jsx("div", {}),
|
|
2074
|
+
/* @__PURE__ */ n.jsx("div", {}),
|
|
2075
|
+
/* @__PURE__ */ n.jsx("div", {})
|
|
2076
|
+
] }), ft = O(cr), ir = () => {
|
|
2077
|
+
const { widgetProps: e } = q();
|
|
2078
|
+
return /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2079
|
+
/* @__PURE__ */ n.jsx(Ee, { src: Ze, nameFallback: e == null ? void 0 : e.title }),
|
|
2080
|
+
/* @__PURE__ */ n.jsx(ft, {})
|
|
2081
|
+
] });
|
|
2082
|
+
}, pn = O(ir), lr = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2083
|
+
/* @__PURE__ */ n.jsx(Ee, { src: e, preview: !1, nameFallback: t }),
|
|
2084
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: t })
|
|
2085
|
+
] }), Ue = O(lr), ar = ({ ...e }) => {
|
|
2086
|
+
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());
|
|
2093
|
+
}, [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;
|
|
2098
|
+
return /* @__PURE__ */ n.jsxs(
|
|
2099
|
+
"div",
|
|
2100
|
+
{
|
|
2101
|
+
style: {
|
|
2102
|
+
display: w ? "flex" : "none",
|
|
2103
|
+
flexDirection: "column",
|
|
2104
|
+
gap: 8
|
|
2105
|
+
},
|
|
2106
|
+
className: "w-fade-in-animate",
|
|
2107
|
+
children: [
|
|
2108
|
+
/* @__PURE__ */ n.jsx(
|
|
2109
|
+
"div",
|
|
2110
|
+
{
|
|
2111
|
+
...y && {
|
|
2112
|
+
className: `w-regenerate-chat-last ${c ? "w-regenerate-chat-last-expand" : ""}`
|
|
2113
|
+
},
|
|
2114
|
+
children: /* @__PURE__ */ n.jsxs(
|
|
2115
|
+
"div",
|
|
2116
|
+
{
|
|
2117
|
+
className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${a}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
|
|
2118
|
+
children: [
|
|
2119
|
+
/* @__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
|
+
]
|
|
2122
|
+
}
|
|
2123
|
+
)
|
|
2124
|
+
}
|
|
2125
|
+
),
|
|
2126
|
+
/* @__PURE__ */ n.jsx(
|
|
2127
|
+
Cn,
|
|
2128
|
+
{
|
|
2129
|
+
showFeedback: !0,
|
|
2130
|
+
showRegenerate: !1,
|
|
2131
|
+
...g
|
|
2132
|
+
}
|
|
2133
|
+
)
|
|
2134
|
+
]
|
|
2135
|
+
},
|
|
2136
|
+
b
|
|
2137
|
+
);
|
|
2138
|
+
}) }),
|
|
2139
|
+
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "center" }, children: [
|
|
2140
|
+
/* @__PURE__ */ n.jsx(
|
|
2141
|
+
Cn,
|
|
2142
|
+
{
|
|
2143
|
+
showRegenerate: !0,
|
|
2144
|
+
showFeedback: !1,
|
|
2145
|
+
...e
|
|
2146
|
+
}
|
|
2147
|
+
),
|
|
2148
|
+
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 4, alignItems: "center" }, children: [
|
|
2149
|
+
/* @__PURE__ */ n.jsx(
|
|
2150
|
+
G,
|
|
2151
|
+
{
|
|
2152
|
+
size: "small",
|
|
2153
|
+
shape: "circle",
|
|
2154
|
+
disabled: t === 1,
|
|
2155
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "left" }),
|
|
2156
|
+
onClick: () => {
|
|
2157
|
+
t > 1 && s((g) => g - 1);
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
),
|
|
2161
|
+
/* @__PURE__ */ n.jsxs(Y.Text, { children: [
|
|
2162
|
+
t,
|
|
2163
|
+
" / ",
|
|
2164
|
+
(f = e == null ? void 0 : e.chats) == null ? void 0 : f.length
|
|
2165
|
+
] }),
|
|
2166
|
+
/* @__PURE__ */ n.jsx(
|
|
2167
|
+
G,
|
|
2168
|
+
{
|
|
2169
|
+
size: "small",
|
|
2170
|
+
shape: "circle",
|
|
2171
|
+
disabled: t === ((x = e == null ? void 0 : e.chats) == null ? void 0 : x.length),
|
|
2172
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "right" }),
|
|
2173
|
+
onClick: () => {
|
|
2174
|
+
var g;
|
|
2175
|
+
t < ((g = e == null ? void 0 : e.chats) == null ? void 0 : g.length) && s((b) => b + 1);
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
)
|
|
2179
|
+
] })
|
|
2180
|
+
] })
|
|
2181
|
+
] });
|
|
2182
|
+
}, dr = O(ar), ur = ({ date: e, format: t, sender: s, ...r }) => {
|
|
2183
|
+
var i, c;
|
|
2184
|
+
return /* @__PURE__ */ n.jsx(
|
|
2185
|
+
Y.Text,
|
|
2186
|
+
{
|
|
2187
|
+
...r,
|
|
2188
|
+
type: "secondary",
|
|
2189
|
+
style: {
|
|
2190
|
+
display: "block",
|
|
2191
|
+
fontSize: 12,
|
|
2192
|
+
...s === "client" && {
|
|
2193
|
+
textAlign: "right"
|
|
2194
|
+
},
|
|
2195
|
+
...((i = Object.keys((r == null ? void 0 : r.style) || {})) == null ? void 0 : i.length) > 0 && {
|
|
2196
|
+
...r == null ? void 0 : r.style
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2199
|
+
children: t ? (c = le(e)) == null ? void 0 : c.format(t) : e
|
|
2200
|
+
}
|
|
2201
|
+
);
|
|
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 })
|
|
2210
|
+
] }),
|
|
2211
|
+
/* @__PURE__ */ n.jsx(Cn, { ...e })
|
|
2212
|
+
] });
|
|
2213
|
+
}, $e = O(fr), xr = () => {
|
|
2214
|
+
const e = _(
|
|
2215
|
+
"PleaseUploadFile",
|
|
2216
|
+
"Please upload specify file that needed to complete your request"
|
|
2217
|
+
), t = _("ClickToUpload", "Click to upload"), s = _(
|
|
2218
|
+
"ContinueWithoutUpload",
|
|
2219
|
+
"Continue without upload"
|
|
2220
|
+
), { onSendMsg: r, setFile: i } = ue(), c = () => {
|
|
2221
|
+
r({
|
|
2222
|
+
msg: "CANCEL UPLOAD"
|
|
2223
|
+
});
|
|
2224
|
+
};
|
|
2225
|
+
return /* @__PURE__ */ n.jsxs(
|
|
2226
|
+
"div",
|
|
2227
|
+
{
|
|
2228
|
+
style: {
|
|
2229
|
+
display: "flex",
|
|
2230
|
+
flexDirection: "column",
|
|
2231
|
+
gap: 4,
|
|
2232
|
+
marginBottom: 12
|
|
2233
|
+
},
|
|
2234
|
+
children: [
|
|
2235
|
+
/* @__PURE__ */ n.jsx($e, { sender: "response", text: `${e}...` }),
|
|
2236
|
+
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
2237
|
+
/* @__PURE__ */ n.jsx(
|
|
2238
|
+
Zn,
|
|
2239
|
+
{
|
|
2240
|
+
className: "btn_upload",
|
|
2241
|
+
beforeUpload: () => !1,
|
|
2242
|
+
fileList: [],
|
|
2243
|
+
accept: ".doc, .jpg, .ods, .png, .txt, .docx, .pdf",
|
|
2244
|
+
onChange: (o) => {
|
|
2245
|
+
i(o == null ? void 0 : o.file);
|
|
2246
|
+
},
|
|
2247
|
+
children: /* @__PURE__ */ n.jsx(G, { icon: /* @__PURE__ */ n.jsx(P, { type: "upload" }), children: t })
|
|
2248
|
+
}
|
|
2249
|
+
),
|
|
2250
|
+
/* @__PURE__ */ n.jsx(G, { type: "dashed", onClick: c, children: s })
|
|
2251
|
+
] })
|
|
2252
|
+
]
|
|
2253
|
+
}
|
|
2254
|
+
);
|
|
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 = _(
|
|
2259
|
+
"ProvidePasswordPayslip",
|
|
2260
|
+
"Please provide your password account to access the download"
|
|
2261
|
+
), E = _("Cancel", "Cancel"), h = _("Submit", "Submit"), m = _("Password", "Password"), v = _("IsRequired", "Is Required"), C = _(
|
|
2262
|
+
"PasswordPayslipValid",
|
|
2263
|
+
"Your password is valid. Please download the payslip file"
|
|
2264
|
+
), j = _(
|
|
2265
|
+
"AttemptPasswordExceeded",
|
|
2266
|
+
"Your attempt to enter the password exceeded the limit"
|
|
2267
|
+
), S = _(
|
|
2268
|
+
"VerifyAccessPayslip",
|
|
2269
|
+
"Please wait, verifying access to your payslip"
|
|
2270
|
+
), I = _(
|
|
2271
|
+
"WrongPwdPayslip",
|
|
2272
|
+
"The password you entered is incorrect. Please try again or contact support if you need assistance"
|
|
2273
|
+
), B = _(
|
|
2274
|
+
"SessionExpired",
|
|
2275
|
+
"Session expired. Please log in again to continue"
|
|
2276
|
+
), [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
|
+
r(!1), u(!1);
|
|
2286
|
+
});
|
|
2287
|
+
}, F = () => {
|
|
2288
|
+
b({ msg: "cancel" }), c(!1);
|
|
2289
|
+
}, $ = () => {
|
|
2290
|
+
var V;
|
|
2291
|
+
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 }) => {
|
|
2295
|
+
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;
|
|
2300
|
+
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(
|
|
2302
|
+
"ACCESS_TOKEN_EXPIRED"
|
|
2303
|
+
), 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
|
+
"invalid password"
|
|
2305
|
+
);
|
|
2306
|
+
Me && x(B), Fe && (x(I), a(o - 1), r(!1));
|
|
2307
|
+
} else
|
|
2308
|
+
x(se == null ? void 0 : se.toString());
|
|
2309
|
+
r(!1);
|
|
2310
|
+
});
|
|
2311
|
+
});
|
|
2312
|
+
};
|
|
2313
|
+
return Z(() => {
|
|
2314
|
+
var V;
|
|
2315
|
+
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({
|
|
2352
|
+
method: "POST",
|
|
2353
|
+
url: i == null ? void 0 : i.endpoint,
|
|
2354
|
+
data: i == null ? void 0 : i.body,
|
|
2355
|
+
headers: {
|
|
2356
|
+
Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
|
|
2357
|
+
"Content-Type": i == null ? void 0 : i.headers["Content-Type"],
|
|
2358
|
+
coid: t == null ? void 0 : t.companyid,
|
|
2359
|
+
"Company-Id": t == null ? void 0 : t.companyid,
|
|
2360
|
+
"Acc-Name": (c = s == null ? void 0 : s.INSTANCE) == null ? void 0 : c.toLowerCase()
|
|
2361
|
+
},
|
|
2362
|
+
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);
|
|
2367
|
+
});
|
|
2368
|
+
};
|
|
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(() => {
|
|
2372
|
+
var o;
|
|
2373
|
+
return (o = r == null ? void 0 : r.data) == null ? void 0 : o.map((a, d) => {
|
|
2374
|
+
var u, f;
|
|
2375
|
+
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]
|
|
2379
|
+
};
|
|
2380
|
+
});
|
|
2381
|
+
}, [r]), c = () => {
|
|
2382
|
+
var a;
|
|
2383
|
+
const o = (a = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : a.toDataURL();
|
|
2384
|
+
En({ fileName: r == null ? void 0 : r.title, downloadURL: o });
|
|
2385
|
+
};
|
|
2386
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2387
|
+
/* @__PURE__ */ n.jsx(
|
|
2388
|
+
rs,
|
|
2389
|
+
{
|
|
2390
|
+
className: "chart_widget",
|
|
2391
|
+
ref: t,
|
|
2392
|
+
data: i,
|
|
2393
|
+
angleField: "value",
|
|
2394
|
+
colorField: "label",
|
|
2395
|
+
label: {
|
|
2396
|
+
text: "label",
|
|
2397
|
+
style: {
|
|
2398
|
+
fontWeight: "bold"
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
legend: {
|
|
2402
|
+
color: {
|
|
2403
|
+
title: !0,
|
|
2404
|
+
position: "bottom",
|
|
2405
|
+
rowPadding: 5
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
),
|
|
2410
|
+
/* @__PURE__ */ n.jsx("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ n.jsx(
|
|
2411
|
+
G,
|
|
2412
|
+
{
|
|
2413
|
+
onClick: () => {
|
|
2414
|
+
c();
|
|
2415
|
+
},
|
|
2416
|
+
children: s
|
|
2417
|
+
}
|
|
2418
|
+
) })
|
|
2419
|
+
] });
|
|
2420
|
+
}, Er = O(hr), Tr = ({ ...e }) => {
|
|
2421
|
+
var t, s, r, i, c;
|
|
2422
|
+
switch (!0) {
|
|
2423
|
+
case ((t = Ae(e)) == null ? void 0 : t.text):
|
|
2424
|
+
return /* @__PURE__ */ n.jsx($e, { ...e });
|
|
2425
|
+
case ((s = Ae(e)) == null ? void 0 : s.upload):
|
|
2426
|
+
return /* @__PURE__ */ n.jsx(gr, { ...e });
|
|
2427
|
+
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 });
|
|
2431
|
+
case ((c = Ae(e)) == null ? void 0 : c.chart):
|
|
2432
|
+
return /* @__PURE__ */ n.jsx(Er, { ...e });
|
|
2433
|
+
default:
|
|
2434
|
+
return null;
|
|
2435
|
+
}
|
|
2436
|
+
}, yr = O(Tr), jr = () => {
|
|
2437
|
+
const { isOpenWidget: e, widgetProps: t } = q(), { chats: s, isWaitResponse: r } = ue(), { activeTab: i } = be();
|
|
2438
|
+
return Z(() => {
|
|
2439
|
+
me();
|
|
2440
|
+
}, [i]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2441
|
+
/* @__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;
|
|
2444
|
+
return /* @__PURE__ */ n.jsxs(gn, { children: [
|
|
2445
|
+
(c == null ? void 0 : c.sender) === "response" && !a && /* @__PURE__ */ n.jsx(
|
|
2446
|
+
Ue,
|
|
2447
|
+
{
|
|
2448
|
+
name: t == null ? void 0 : t.title,
|
|
2449
|
+
src: Ze
|
|
2450
|
+
}
|
|
2451
|
+
),
|
|
2452
|
+
/* @__PURE__ */ n.jsx(yr, { indexChat: o, ...c })
|
|
2453
|
+
] }, o);
|
|
2454
|
+
}) }),
|
|
2455
|
+
r && /* @__PURE__ */ n.jsx(pn, {})
|
|
2456
|
+
] }) : null;
|
|
2457
|
+
}, wr = O(jr), pr = () => {
|
|
2458
|
+
var h;
|
|
2459
|
+
const e = _(
|
|
2460
|
+
"ContinueWithoutUpload",
|
|
2461
|
+
"Continue without Upload"
|
|
2462
|
+
), {
|
|
2463
|
+
onSendMsg: t,
|
|
2464
|
+
setChats: s,
|
|
2465
|
+
isWaitResponse: r,
|
|
2466
|
+
loadingRegenerate: i,
|
|
2467
|
+
file: c,
|
|
2468
|
+
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,
|
|
2482
|
+
sender: "client",
|
|
2483
|
+
type: "text",
|
|
2484
|
+
timestamp: (I = le()) == null ? void 0 : I.format("hh:mm A")
|
|
2485
|
+
};
|
|
2486
|
+
s((B) => [...B, v]), me();
|
|
2487
|
+
}, E = () => {
|
|
2488
|
+
t({ msg: "SKIP_WAITING_RESPONSE" });
|
|
2489
|
+
};
|
|
2490
|
+
return Z(() => {
|
|
2491
|
+
var m;
|
|
2492
|
+
x != null && x.current && u && ((m = x == null ? void 0 : x.current) == null || m.focus());
|
|
2493
|
+
}, [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: [
|
|
2496
|
+
/* @__PURE__ */ n.jsx(
|
|
2497
|
+
G,
|
|
2498
|
+
{
|
|
2499
|
+
danger: !0,
|
|
2500
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "delete" }),
|
|
2501
|
+
shape: "circle",
|
|
2502
|
+
onClick: () => o({})
|
|
2503
|
+
}
|
|
2504
|
+
),
|
|
2505
|
+
/* @__PURE__ */ n.jsx(
|
|
2506
|
+
G,
|
|
2507
|
+
{
|
|
2508
|
+
className: "w-send-btn",
|
|
2509
|
+
style: { backgroundColor: "var(--primary-color, #395ebc)" },
|
|
2510
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
|
|
2511
|
+
shape: "circle",
|
|
2512
|
+
onClick: p
|
|
2513
|
+
}
|
|
2514
|
+
)
|
|
2515
|
+
] }) : /* @__PURE__ */ n.jsx(Se, { title: e, children: /* @__PURE__ */ n.jsx(
|
|
2516
|
+
G,
|
|
2517
|
+
{
|
|
2518
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
|
|
2519
|
+
shape: "circle",
|
|
2520
|
+
onClick: () => {
|
|
2521
|
+
t({
|
|
2522
|
+
msg: "CANCEL UPLOAD"
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
) })
|
|
2527
|
+
] }) : /* @__PURE__ */ n.jsxs("div", { className: "w-input-container", children: [
|
|
2528
|
+
/* @__PURE__ */ n.jsx(
|
|
2529
|
+
Be.TextArea,
|
|
2530
|
+
{
|
|
2531
|
+
className: "w-input-widget",
|
|
2532
|
+
disabled: !d,
|
|
2533
|
+
ref: x,
|
|
2534
|
+
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();
|
|
2537
|
+
},
|
|
2538
|
+
onChange: ({ target: { value: m } }) => {
|
|
2539
|
+
const v = /\S/;
|
|
2540
|
+
Pe({
|
|
2541
|
+
input_va_value: m
|
|
2542
|
+
}), m && (v != null && v.test(m)) ? w(!0) : m != null && m.trim() || w(!1);
|
|
2543
|
+
}
|
|
2544
|
+
},
|
|
2545
|
+
g
|
|
2546
|
+
),
|
|
2547
|
+
r || i ? /* @__PURE__ */ n.jsx(
|
|
2548
|
+
G,
|
|
2549
|
+
{
|
|
2550
|
+
style: { border: "none" },
|
|
2551
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "stop" }),
|
|
2552
|
+
shape: "circle",
|
|
2553
|
+
onClick: E,
|
|
2554
|
+
size: "large"
|
|
2555
|
+
}
|
|
2556
|
+
) : /* @__PURE__ */ n.jsx(
|
|
2557
|
+
G,
|
|
2558
|
+
{
|
|
2559
|
+
className: `w-send-btn ${A ? "w-send-btn-disabled" : ""}`,
|
|
2560
|
+
disabled: A,
|
|
2561
|
+
style: { backgroundColor: "var(--primary-color, #395ebc)" },
|
|
2562
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
|
|
2563
|
+
shape: "circle",
|
|
2564
|
+
onClick: p
|
|
2565
|
+
}
|
|
2566
|
+
)
|
|
2567
|
+
] });
|
|
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 = {
|
|
2570
|
+
"In Progress": t,
|
|
2571
|
+
Open: s,
|
|
2572
|
+
New: s,
|
|
2573
|
+
Closed: r,
|
|
2574
|
+
Fixed: i,
|
|
2575
|
+
Cancelled: c
|
|
2576
|
+
}, a = {
|
|
2577
|
+
"In Progress": "#FFF2D6",
|
|
2578
|
+
Responded: "#FFF2D6",
|
|
2579
|
+
Open: "#e9e2f8",
|
|
2580
|
+
Reopen: "#e9e2f8",
|
|
2581
|
+
Closed: "#e1ebfd",
|
|
2582
|
+
Fixed: "#bbfab7",
|
|
2583
|
+
Done: "#bbfab7",
|
|
2584
|
+
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,
|
|
2588
|
+
{
|
|
2589
|
+
className: "primary-color-active",
|
|
2590
|
+
style: { width: "100%", textAlign: "center" },
|
|
2591
|
+
ellipsis: { tooltip: u },
|
|
2592
|
+
children: u
|
|
2593
|
+
}
|
|
2594
|
+
) }, e);
|
|
2595
|
+
}, xt = O(kr), Ar = ({ onClick: e, ...t }) => /* @__PURE__ */ n.jsxs(
|
|
2596
|
+
"div",
|
|
2597
|
+
{
|
|
2598
|
+
className: "w-ticket-card-container",
|
|
2599
|
+
...typeof e == "function" && {
|
|
2600
|
+
onClick: e
|
|
2601
|
+
},
|
|
2602
|
+
children: [
|
|
2603
|
+
/* @__PURE__ */ n.jsx(
|
|
2604
|
+
Y.Text,
|
|
2605
|
+
{
|
|
2606
|
+
strong: !0,
|
|
2607
|
+
style: {
|
|
2608
|
+
color: "var(--primary-color, #395ebc)",
|
|
2609
|
+
fontSize: 16,
|
|
2610
|
+
marginBottom: 10,
|
|
2611
|
+
display: "block"
|
|
2612
|
+
},
|
|
2613
|
+
children: t == null ? void 0 : t.TASK_NAME
|
|
2614
|
+
}
|
|
2615
|
+
),
|
|
2616
|
+
/* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-content-container", children: [
|
|
2617
|
+
/* @__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 })
|
|
2620
|
+
] }),
|
|
2621
|
+
/* @__PURE__ */ n.jsxs(
|
|
2622
|
+
"div",
|
|
2623
|
+
{
|
|
2624
|
+
className: "w-ticket-card-status-date",
|
|
2625
|
+
style: {
|
|
2626
|
+
alignItems: "flex-end"
|
|
2627
|
+
},
|
|
2628
|
+
children: [
|
|
2629
|
+
/* @__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 })
|
|
2631
|
+
]
|
|
2632
|
+
}
|
|
2633
|
+
)
|
|
2634
|
+
] })
|
|
2635
|
+
]
|
|
2636
|
+
}
|
|
2637
|
+
), Sr = O(Ar), gt = () => {
|
|
2638
|
+
const { objInitPayload: e, setObjInitPayload: t, parsedJWT: s } = q(), r = R(() => {
|
|
2639
|
+
var c;
|
|
2640
|
+
return {
|
|
2641
|
+
Authorization: `Bearer ${e == null ? void 0 : e.access_token}`,
|
|
2642
|
+
coid: s == null ? void 0 : s.COID,
|
|
2643
|
+
"Acc-Name": (c = s == null ? void 0 : s.INSTANCE) == null ? void 0 : c.toLowerCase(),
|
|
2644
|
+
"Company-Id": e == null ? void 0 : e.companyid,
|
|
2645
|
+
Language: e == null ? void 0 : e.lang
|
|
2646
|
+
};
|
|
2647
|
+
}, [e]);
|
|
2648
|
+
return async (c) => {
|
|
2649
|
+
var u, f, x;
|
|
2650
|
+
const { onSuccess: o, onError: a, onFinally: d } = c ?? {};
|
|
2651
|
+
(x = (f = (u = Re({
|
|
2652
|
+
url: e == null ? void 0 : e.uriBackend,
|
|
2653
|
+
params: {
|
|
2654
|
+
ofid: "sfsystem.RefreshToken",
|
|
2655
|
+
accname: e == null ? void 0 : e.companycode
|
|
2656
|
+
},
|
|
2657
|
+
data: {
|
|
2658
|
+
refreshtoken: (e == null ? void 0 : e.refresh_token) || "4D8C30EE29749D0F06B4F6E2527516B397C09D4DB148D42214E2941C7A86139D3CB512D925E1B098C6090A45E6BCC545723222FA3BABDC2A"
|
|
2659
|
+
},
|
|
2660
|
+
headers: r,
|
|
2661
|
+
method: "POST"
|
|
2662
|
+
})) == null ? void 0 : u.then((g) => {
|
|
2663
|
+
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,
|
|
2666
|
+
refresh_token: e == null ? void 0 : e.refresh_token,
|
|
2667
|
+
uagent: e == null ? void 0 : e.uagent,
|
|
2668
|
+
uriBackend: e == null ? void 0 : e.uriBackend,
|
|
2669
|
+
uriService: e == null ? void 0 : e.uriService,
|
|
2670
|
+
companyid: e == null ? void 0 : e.companyid,
|
|
2671
|
+
companycode: e == null ? void 0 : e.companycode,
|
|
2672
|
+
lang: e == null ? void 0 : e.lang,
|
|
2673
|
+
uriBackendEnt: e == null ? void 0 : e.uriBackendEnt,
|
|
2674
|
+
uriBackendHRMGO: e == null ? void 0 : e.uriBackendHRMGO,
|
|
2675
|
+
config: e == null ? void 0 : e.config
|
|
2676
|
+
};
|
|
2677
|
+
t(y), typeof o == "function" && o(g);
|
|
2678
|
+
})) == null ? void 0 : f.catch((g) => {
|
|
2679
|
+
typeof a == "function" && a(g);
|
|
2680
|
+
})) == null || x.finally(() => {
|
|
2681
|
+
typeof d == "function" && d();
|
|
2682
|
+
});
|
|
2683
|
+
};
|
|
2684
|
+
}, en = () => {
|
|
2685
|
+
var o;
|
|
2686
|
+
const e = z(new AbortController()), { objInitPayload: t, parsedJWT: s } = q(), r = gt(), i = {
|
|
2687
|
+
Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
|
|
2688
|
+
coid: s == null ? void 0 : s.COID,
|
|
2689
|
+
"Acc-Name": (o = s == null ? void 0 : s.INSTANCE) == null ? void 0 : o.toLowerCase(),
|
|
2690
|
+
"Company-Id": t == null ? void 0 : t.companyid,
|
|
2691
|
+
Language: t == null ? void 0 : t.lang
|
|
2692
|
+
}, c = async ({
|
|
2693
|
+
url: a,
|
|
2694
|
+
endpoint: d,
|
|
2695
|
+
method: u = "POST",
|
|
2696
|
+
headers: f,
|
|
2697
|
+
...x
|
|
2698
|
+
}) => {
|
|
2699
|
+
var w, A, p, E, h, m;
|
|
2700
|
+
const g = {
|
|
2701
|
+
url: a || `${t == null ? void 0 : t.uriBackendHRMGO}${d}`,
|
|
2702
|
+
...e.current && {
|
|
2703
|
+
signal: (w = e == null ? void 0 : e.current) == null ? void 0 : w.signal
|
|
2704
|
+
},
|
|
2705
|
+
headers: {
|
|
2706
|
+
...i,
|
|
2707
|
+
...f,
|
|
2708
|
+
"Company-Code": t == null ? void 0 : t.companycode
|
|
2709
|
+
},
|
|
2710
|
+
method: u,
|
|
2711
|
+
...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);
|
|
2717
|
+
}
|
|
2718
|
+
), (m = (h = b == null ? void 0 : b.interceptors) == null ? void 0 : h.response) == null || m.use(
|
|
2719
|
+
(v) => v,
|
|
2720
|
+
async (v) => {
|
|
2721
|
+
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) {
|
|
2724
|
+
const S = await r();
|
|
2725
|
+
return C.headers.Authorization = `Bearer ${S}`, Re(C);
|
|
2726
|
+
}
|
|
2727
|
+
return Promise == null ? void 0 : Promise.reject(v);
|
|
2728
|
+
}
|
|
2729
|
+
), await (b == null ? void 0 : b.request(g));
|
|
2730
|
+
};
|
|
2731
|
+
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({
|
|
2739
|
+
endpoint: "/helpdesk/myticket/ticket-list",
|
|
2740
|
+
method: "POST",
|
|
2741
|
+
data: {
|
|
2742
|
+
LIMIT: 20,
|
|
2743
|
+
PAGE: 1,
|
|
2744
|
+
SEARCH: {
|
|
2745
|
+
MY_TICKET: !0,
|
|
2746
|
+
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)
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
},
|
|
2754
|
+
SORT: {
|
|
2755
|
+
FIELD: "t.created_date",
|
|
2756
|
+
ORDER: "DESC"
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
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);
|
|
2762
|
+
})) == null || p.finally(() => {
|
|
2763
|
+
u(!1);
|
|
2764
|
+
});
|
|
2765
|
+
};
|
|
2766
|
+
return Z(() => {
|
|
2767
|
+
g();
|
|
2768
|
+
}, []), /* @__PURE__ */ n.jsx(
|
|
2769
|
+
Ct.Provider,
|
|
2770
|
+
{
|
|
2771
|
+
value: {
|
|
2772
|
+
listTicket: s,
|
|
2773
|
+
ticketId: i,
|
|
2774
|
+
setTicketId: c,
|
|
2775
|
+
getListTicket: g,
|
|
2776
|
+
openFilter: o,
|
|
2777
|
+
setOpenFilter: a,
|
|
2778
|
+
loadingListTicket: d,
|
|
2779
|
+
countFilters: f,
|
|
2780
|
+
setCountFilters: x
|
|
2781
|
+
},
|
|
2782
|
+
children: e
|
|
2783
|
+
}
|
|
2784
|
+
);
|
|
2785
|
+
}, Or = () => {
|
|
2786
|
+
const e = _("SubjectSearch", "Subject Search"), t = _("AdvanceFilter", "Advance Filter"), s = z(null), { getListTicket: r, setOpenFilter: i, loadingListTicket: c, countFilters: o } = ve();
|
|
2787
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, marginBottom: 12 }, children: [
|
|
2788
|
+
/* @__PURE__ */ n.jsx(
|
|
2789
|
+
Be,
|
|
2790
|
+
{
|
|
2791
|
+
placeholder: e,
|
|
2792
|
+
onChange: ({ target: { value: a } }) => {
|
|
2793
|
+
clearTimeout(s == null ? void 0 : s.current), s.current = setTimeout(() => {
|
|
2794
|
+
r({
|
|
2795
|
+
TASK_NAME: a
|
|
2796
|
+
});
|
|
2797
|
+
}, 250);
|
|
2798
|
+
},
|
|
2799
|
+
allowClear: !0
|
|
2800
|
+
}
|
|
2801
|
+
),
|
|
2802
|
+
/* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(Qt, { count: o, children: /* @__PURE__ */ n.jsx(
|
|
2803
|
+
G,
|
|
2804
|
+
{
|
|
2805
|
+
loading: c,
|
|
2806
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "filter" }),
|
|
2807
|
+
onClick: () => {
|
|
2808
|
+
i(!0);
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
) }) })
|
|
2812
|
+
] }) });
|
|
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) => {
|
|
2821
|
+
console.warn(
|
|
2822
|
+
`${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;
|
|
2826
|
+
}, p = async () => {
|
|
2827
|
+
var L, F, $;
|
|
2828
|
+
if (((L = t.current) == null ? void 0 : L.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
|
|
2829
|
+
const {
|
|
2830
|
+
access_token: m,
|
|
2831
|
+
companyid: v = "",
|
|
2832
|
+
companycode: C = "",
|
|
2833
|
+
lang: j = "",
|
|
2834
|
+
uriBackendHRMGO: S = ""
|
|
2835
|
+
} = x ?? {};
|
|
2836
|
+
if (!m || !v || !C) {
|
|
2837
|
+
console.warn(
|
|
2838
|
+
`${ke} - Missing required WebSocket credentials.`
|
|
2839
|
+
);
|
|
2840
|
+
return;
|
|
2841
|
+
}
|
|
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(),
|
|
2845
|
+
LANGUAGE: j,
|
|
2846
|
+
ACC_NAME: ($ = g == null ? void 0 : g.INSTANCE) == null ? void 0 : $.toLowerCase(),
|
|
2847
|
+
TOKEN: I
|
|
2848
|
+
};
|
|
2849
|
+
try {
|
|
2850
|
+
const H = await _s(
|
|
2851
|
+
M,
|
|
2852
|
+
Es
|
|
2853
|
+
);
|
|
2854
|
+
if (!H || r.current || (s == null ? void 0 : s.current) >= Ie) {
|
|
2855
|
+
console.warn(
|
|
2856
|
+
`${ke} - Skipping WebSocket connection attempt.`
|
|
2857
|
+
);
|
|
2858
|
+
return;
|
|
2859
|
+
}
|
|
2860
|
+
t.current && t.current.close(), A(`${B}?t=${H}`);
|
|
2861
|
+
} catch (H) {
|
|
2862
|
+
console.error(
|
|
2863
|
+
`${ke} - Failed to encrypt token:`,
|
|
2864
|
+
H
|
|
2865
|
+
);
|
|
2866
|
+
}
|
|
2867
|
+
}, E = (m) => (v) => {
|
|
2868
|
+
var C;
|
|
2869
|
+
try {
|
|
2870
|
+
if ((v == null ? void 0 : v.data) === "PING")
|
|
2871
|
+
m.send("PONG");
|
|
2872
|
+
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({
|
|
2875
|
+
onSuccess: () => {
|
|
2876
|
+
p();
|
|
2877
|
+
}
|
|
2878
|
+
});
|
|
2879
|
+
}
|
|
2880
|
+
} catch {
|
|
2881
|
+
console.error(
|
|
2882
|
+
`${ke} - Invalid WebSocket message:`,
|
|
2883
|
+
v.data
|
|
2884
|
+
);
|
|
2885
|
+
}
|
|
2886
|
+
}, h = ({ event: m, data: v, module: C = "HELPDESK_CHAT" }) => {
|
|
2887
|
+
var j;
|
|
2888
|
+
(j = t == null ? void 0 : t.current) == null || j.send(
|
|
2889
|
+
JSON.stringify({
|
|
2890
|
+
EVENT: m,
|
|
2891
|
+
DATA: v,
|
|
2892
|
+
MODULE: C
|
|
2893
|
+
})
|
|
2894
|
+
);
|
|
2895
|
+
};
|
|
2896
|
+
return Z(() => {
|
|
2897
|
+
b.current || p();
|
|
2898
|
+
}, []), /* @__PURE__ */ n.jsx(
|
|
2899
|
+
mt.Provider,
|
|
2900
|
+
{
|
|
2901
|
+
value: {
|
|
2902
|
+
ws: t == null ? void 0 : t.current,
|
|
2903
|
+
onSendMsg: h,
|
|
2904
|
+
userOnline: c,
|
|
2905
|
+
connectWebSocket: p,
|
|
2906
|
+
retryCountState: a,
|
|
2907
|
+
setRetryCountState: d,
|
|
2908
|
+
retryCountRef: s,
|
|
2909
|
+
isGetResponse: u,
|
|
2910
|
+
setGetResponse: f
|
|
2911
|
+
},
|
|
2912
|
+
children: e
|
|
2913
|
+
}
|
|
2914
|
+
);
|
|
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();
|
|
2918
|
+
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,
|
|
2922
|
+
{
|
|
2923
|
+
style: { height: 80, width: "100%", borderRadius: 8 }
|
|
2924
|
+
},
|
|
2925
|
+
u
|
|
2926
|
+
)) }) : /* @__PURE__ */ n.jsx(
|
|
2927
|
+
"div",
|
|
2928
|
+
{
|
|
2929
|
+
className: `w-list-ticket-container ${e != null && e.isSF ? "w-list-ticket-container-sf" : ""} ${o ? "w-list-ticket-container-mobile" : ""}`,
|
|
2930
|
+
...(t == null ? void 0 : t.length) === 0 && {
|
|
2931
|
+
style: { justifyContent: "center" }
|
|
2932
|
+
},
|
|
2933
|
+
children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((d, u) => /* @__PURE__ */ bn(
|
|
2934
|
+
Sr,
|
|
2935
|
+
{
|
|
2936
|
+
...d,
|
|
2937
|
+
key: u,
|
|
2938
|
+
onClick: () => {
|
|
2939
|
+
c(!0), i({
|
|
2940
|
+
event: "JOIN_ROOM",
|
|
2941
|
+
data: {
|
|
2942
|
+
TASK_ID: d == null ? void 0 : d.TASK_ID
|
|
2943
|
+
}
|
|
2944
|
+
}), s(d == null ? void 0 : d.TASK_ID);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
)) : /* @__PURE__ */ n.jsx(
|
|
2948
|
+
"div",
|
|
2949
|
+
{
|
|
2950
|
+
style: {
|
|
2951
|
+
display: "flex",
|
|
2952
|
+
justifyContent: "center",
|
|
2953
|
+
alignItems: "center",
|
|
2954
|
+
flex: 1
|
|
2955
|
+
},
|
|
2956
|
+
children: /* @__PURE__ */ n.jsx(Xn, {})
|
|
2957
|
+
}
|
|
2958
|
+
)
|
|
2959
|
+
}
|
|
2960
|
+
)
|
|
2961
|
+
] });
|
|
2962
|
+
}, Mr = O(Nr), Fr = ({ children: e, open: t, onClose: s, footer: r, styleContainer: i }) => {
|
|
2963
|
+
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());
|
|
2966
|
+
};
|
|
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(() => {
|
|
2972
|
+
t || o(!0);
|
|
2973
|
+
}, 300), () => {
|
|
2974
|
+
b && (b == null || b.removeEventListener("keydown", x));
|
|
2975
|
+
};
|
|
2976
|
+
}, [t]), /* @__PURE__ */ n.jsxs(
|
|
2977
|
+
"div",
|
|
2978
|
+
{
|
|
2979
|
+
className: `${f}`,
|
|
2980
|
+
tabIndex: 1,
|
|
2981
|
+
ref: u,
|
|
2982
|
+
style: {
|
|
2983
|
+
display: c ? "none" : "block",
|
|
2984
|
+
height: "100%",
|
|
2985
|
+
...((g = Object == null ? void 0 : Object.keys(i || {})) == null ? void 0 : g.length) > 0 && {
|
|
2986
|
+
...i
|
|
2987
|
+
}
|
|
2988
|
+
},
|
|
2989
|
+
children: [
|
|
2990
|
+
e,
|
|
2991
|
+
r && r
|
|
2992
|
+
]
|
|
2993
|
+
}
|
|
2994
|
+
);
|
|
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(() => {
|
|
2997
|
+
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) => ({
|
|
2999
|
+
...I
|
|
3000
|
+
}))) == null ? void 0 : S.filter((I) => {
|
|
3001
|
+
var B;
|
|
3002
|
+
return ((B = Object.keys(I || {})) == null ? void 0 : B.length) > 0;
|
|
3003
|
+
});
|
|
3004
|
+
return Tn({ ArrObj: j, key: "EMP_ID" });
|
|
3005
|
+
}, [r]), A = () => {
|
|
3006
|
+
var m, v;
|
|
3007
|
+
o(!0), (v = (m = f({
|
|
3008
|
+
endpoint: "/helpdesk/chat/list",
|
|
3009
|
+
method: "POST",
|
|
3010
|
+
data: {
|
|
3011
|
+
LIMIT: 10,
|
|
3012
|
+
PAGE: 1,
|
|
3013
|
+
TASK_ID: x
|
|
3014
|
+
}
|
|
3015
|
+
})) == null ? void 0 : m.then((C) => {
|
|
3016
|
+
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(($) => ({
|
|
3019
|
+
...$,
|
|
3020
|
+
ACTOR: {
|
|
3021
|
+
...$ == null ? void 0 : $.ACTOR
|
|
3022
|
+
}
|
|
3023
|
+
}));
|
|
3024
|
+
s(Qe(F));
|
|
3025
|
+
} else
|
|
3026
|
+
s({});
|
|
3027
|
+
})) == null || v.finally(() => {
|
|
3028
|
+
o(!1);
|
|
3029
|
+
});
|
|
3030
|
+
}, p = () => {
|
|
3031
|
+
var m;
|
|
3032
|
+
(m = f({
|
|
3033
|
+
endpoint: "/helpdesk/myticket/get",
|
|
3034
|
+
method: "POST",
|
|
3035
|
+
data: {
|
|
3036
|
+
TASK_ID: x
|
|
3037
|
+
}
|
|
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);
|
|
3043
|
+
} else
|
|
3044
|
+
i({});
|
|
3045
|
+
});
|
|
3046
|
+
}, E = (m) => {
|
|
3047
|
+
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) => ({
|
|
3050
|
+
...S,
|
|
3051
|
+
[v]: !1
|
|
3052
|
+
})), u.current || s((S) => {
|
|
3053
|
+
const I = yn(S), B = v == C ? "to" : "from", M = [...I, { ...m, CHAT_ALIGN: B }];
|
|
3054
|
+
return Qe(M);
|
|
3055
|
+
}), 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);
|
|
3060
|
+
}
|
|
3061
|
+
};
|
|
3062
|
+
return Z(() => (x && (A(), p()), g && x && (g == null || g.addEventListener("message", h)), () => {
|
|
3063
|
+
g && x && (g == null || g.removeEventListener("message", h));
|
|
3064
|
+
}), [x]), /* @__PURE__ */ n.jsx(
|
|
3065
|
+
vt.Provider,
|
|
3066
|
+
{
|
|
3067
|
+
value: {
|
|
3068
|
+
chats: t,
|
|
3069
|
+
setChats: s,
|
|
3070
|
+
detailTicket: r,
|
|
3071
|
+
employees: w,
|
|
3072
|
+
isFromSelf: u,
|
|
3073
|
+
loadingChats: c,
|
|
3074
|
+
objTypingOtherEmp: a,
|
|
3075
|
+
setTypingOtherEmp: d
|
|
3076
|
+
},
|
|
3077
|
+
children: e
|
|
3078
|
+
}
|
|
3079
|
+
);
|
|
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, {}),
|
|
3087
|
+
/* @__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" })
|
|
3090
|
+
] }),
|
|
3091
|
+
/* @__PURE__ */ n.jsx(de.Input, {})
|
|
3092
|
+
] }) : /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
|
|
3093
|
+
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
3094
|
+
/* @__PURE__ */ n.jsx(
|
|
3095
|
+
G,
|
|
3096
|
+
{
|
|
3097
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "down" }),
|
|
3098
|
+
style: { border: "none" },
|
|
3099
|
+
onClick: () => {
|
|
3100
|
+
e();
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
),
|
|
3104
|
+
/* @__PURE__ */ n.jsx(
|
|
3105
|
+
Ee.Group,
|
|
3106
|
+
{
|
|
3107
|
+
maxCount: 2,
|
|
3108
|
+
maxPopoverTrigger: a,
|
|
3109
|
+
maxStyle: {
|
|
3110
|
+
color: "#f56a00",
|
|
3111
|
+
backgroundColor: "#fde3cf",
|
|
3112
|
+
cursor: "pointer"
|
|
3113
|
+
},
|
|
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(
|
|
3117
|
+
Ee,
|
|
3118
|
+
{
|
|
3119
|
+
...f && {
|
|
3120
|
+
style: {
|
|
3121
|
+
border: "2px solid green",
|
|
3122
|
+
borderRadius: "50%"
|
|
3123
|
+
}
|
|
3124
|
+
},
|
|
3125
|
+
src: d == null ? void 0 : d.PHOTO,
|
|
3126
|
+
key: u,
|
|
3127
|
+
nameFallback: d == null ? void 0 : d.FULL_NAME
|
|
3128
|
+
}
|
|
3129
|
+
) }, u);
|
|
3130
|
+
})
|
|
3131
|
+
}
|
|
3132
|
+
),
|
|
3133
|
+
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", width: 150 }, children: [
|
|
3134
|
+
/* @__PURE__ */ n.jsx(
|
|
3135
|
+
Se,
|
|
3136
|
+
{
|
|
3137
|
+
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: [
|
|
3140
|
+
r == null ? void 0 : r.TASK_CODE,
|
|
3141
|
+
" - ",
|
|
3142
|
+
r == null ? void 0 : r.SUBJECT
|
|
3143
|
+
] })
|
|
3144
|
+
}
|
|
3145
|
+
),
|
|
3146
|
+
/* @__PURE__ */ n.jsx(Se, { title: o, trigger: a, children: /* @__PURE__ */ n.jsx(
|
|
3147
|
+
Y.Text,
|
|
3148
|
+
{
|
|
3149
|
+
type: "secondary",
|
|
3150
|
+
className: "w-ticket-detail-header-text",
|
|
3151
|
+
style: {
|
|
3152
|
+
fontSize: 12
|
|
3153
|
+
},
|
|
3154
|
+
children: o
|
|
3155
|
+
}
|
|
3156
|
+
) })
|
|
3157
|
+
] })
|
|
3158
|
+
] }),
|
|
3159
|
+
/* @__PURE__ */ n.jsx(xt, { taskStatus: r == null ? void 0 : r.STATUS })
|
|
3160
|
+
] });
|
|
3161
|
+
}, $r = O(Ir), Br = ({ ...e }) => {
|
|
3162
|
+
const t = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3163
|
+
return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${t}`}`, children: [
|
|
3164
|
+
/* @__PURE__ */ n.jsx(
|
|
3165
|
+
"p",
|
|
3166
|
+
{
|
|
3167
|
+
dangerouslySetInnerHTML: {
|
|
3168
|
+
__html: e == null ? void 0 : e.MESSAGE
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
),
|
|
3172
|
+
/* @__PURE__ */ n.jsx(
|
|
3173
|
+
We,
|
|
3174
|
+
{
|
|
3175
|
+
date: e == null ? void 0 : e.CREATED_DATE,
|
|
3176
|
+
format: Xe,
|
|
3177
|
+
sender: t
|
|
3178
|
+
}
|
|
3179
|
+
)
|
|
3180
|
+
] });
|
|
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)
|
|
3186
|
+
try {
|
|
3187
|
+
const u = new URL(a), f = (d = u == null ? void 0 : u.pathname) == null ? void 0 : d.split("/");
|
|
3188
|
+
return f == null ? void 0 : f[(f == null ? void 0 : f.length) - 1];
|
|
3189
|
+
} catch {
|
|
3190
|
+
return a;
|
|
3191
|
+
}
|
|
3192
|
+
return "";
|
|
3193
|
+
}, [e]), i = R(() => {
|
|
3194
|
+
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]}`;
|
|
3197
|
+
}
|
|
3198
|
+
return "";
|
|
3199
|
+
}, [e, r]), c = R(() => dn == null ? void 0 : dn.includes(i), [e, i]), o = () => {
|
|
3200
|
+
En({
|
|
3201
|
+
downloadURL: e == null ? void 0 : e.ATTACHMENT,
|
|
3202
|
+
fileName: r,
|
|
3203
|
+
isOpenNewTab: !0
|
|
3204
|
+
});
|
|
3205
|
+
};
|
|
3206
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(
|
|
3207
|
+
"div",
|
|
3208
|
+
{
|
|
3209
|
+
className: `w-bubble-chat ${`w-${s}`}`,
|
|
3210
|
+
style: { display: "flex", flexDirection: "column" },
|
|
3211
|
+
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: [
|
|
3213
|
+
/* @__PURE__ */ n.jsx(P, { type: "file" }),
|
|
3214
|
+
/* @__PURE__ */ n.jsx(
|
|
3215
|
+
Y.Link,
|
|
3216
|
+
{
|
|
3217
|
+
onClick: o,
|
|
3218
|
+
style: { display: "block", width: 160 },
|
|
3219
|
+
children: r
|
|
3220
|
+
}
|
|
3221
|
+
)
|
|
3222
|
+
] }),
|
|
3223
|
+
c && /* @__PURE__ */ n.jsx(
|
|
3224
|
+
G,
|
|
3225
|
+
{
|
|
3226
|
+
onClick: o,
|
|
3227
|
+
style: {
|
|
3228
|
+
display: "block",
|
|
3229
|
+
margin: "10px auto 0px"
|
|
3230
|
+
},
|
|
3231
|
+
children: t
|
|
3232
|
+
}
|
|
3233
|
+
),
|
|
3234
|
+
/* @__PURE__ */ n.jsx(
|
|
3235
|
+
We,
|
|
3236
|
+
{
|
|
3237
|
+
date: e == null ? void 0 : e.CREATED_DATE,
|
|
3238
|
+
format: Xe,
|
|
3239
|
+
...s === "client" && {
|
|
3240
|
+
style: {
|
|
3241
|
+
alignSelf: "flex-end"
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
)
|
|
3246
|
+
]
|
|
3247
|
+
}
|
|
3248
|
+
) });
|
|
3249
|
+
}, Vr = O(Wr), Gr = ({ ...e }) => {
|
|
3250
|
+
const t = R(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3251
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-info-chat-container", children: [
|
|
3252
|
+
/* @__PURE__ */ n.jsx(
|
|
3253
|
+
We,
|
|
3254
|
+
{
|
|
3255
|
+
date: e == null ? void 0 : e.CREATED_DATE,
|
|
3256
|
+
format: Xe,
|
|
3257
|
+
sender: t
|
|
3258
|
+
}
|
|
3259
|
+
),
|
|
3260
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: e == null ? void 0 : e.MESSAGE })
|
|
3261
|
+
] });
|
|
3262
|
+
}, zr = O(Gr), ht = () => {
|
|
3263
|
+
const { widgetProps: e } = q(), t = pe.enc.Hex.parse(
|
|
3264
|
+
pe.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
|
|
3265
|
+
), s = {
|
|
3266
|
+
mode: pe.mode.ECB,
|
|
3267
|
+
padding: pe.pad.Pkcs7
|
|
3268
|
+
}, r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|GreatDayHR/i.test(
|
|
3269
|
+
navigator.userAgent
|
|
3270
|
+
), i = (o) => {
|
|
3271
|
+
if (typeof o == "number" && (o = o.toString()), !o) return "";
|
|
3272
|
+
if (r) return window.encodeURIComponent(o);
|
|
3273
|
+
const a = pe.enc.Utf8.parse(o), d = pe.AES.encrypt(
|
|
3274
|
+
a,
|
|
3275
|
+
t,
|
|
3276
|
+
s
|
|
3277
|
+
).toString();
|
|
3278
|
+
return window.encodeURIComponent(`$${d}`);
|
|
3279
|
+
};
|
|
3280
|
+
return {
|
|
3281
|
+
paramsEncrypt: (o) => {
|
|
3282
|
+
const [a, d = null] = o.split("?"), u = a.split("/").map((f) => {
|
|
3283
|
+
const [, x = null] = f.split(":");
|
|
3284
|
+
return x && (e != null && e.keyEncrypt) ? i(x) : f;
|
|
3285
|
+
}).join("/");
|
|
3286
|
+
return d ? `${u}?${d}` : u;
|
|
3287
|
+
},
|
|
3288
|
+
encrypt: i
|
|
3289
|
+
};
|
|
3290
|
+
}, Yr = ({ ...e }) => {
|
|
3291
|
+
const t = _("ViewFAQ", "View FAQ"), s = _(
|
|
3292
|
+
"FAQUnavailable",
|
|
3293
|
+
"FAQ unavailable"
|
|
3294
|
+
), r = _(
|
|
3295
|
+
"ThisFAQIsUnavailable",
|
|
3296
|
+
"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]);
|
|
3298
|
+
return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
|
|
3299
|
+
/* @__PURE__ */ n.jsx(
|
|
3300
|
+
Y.Text,
|
|
3301
|
+
{
|
|
3302
|
+
style: {
|
|
3303
|
+
backgroundColor: "rgb(244, 245, 246)",
|
|
3304
|
+
padding: 8,
|
|
3305
|
+
borderRadius: 8,
|
|
3306
|
+
fontWeight: 600,
|
|
3307
|
+
marginBottom: 8,
|
|
3308
|
+
display: "block"
|
|
3309
|
+
},
|
|
3310
|
+
children: a ? e == null ? void 0 : e.MESSAGE : s
|
|
3311
|
+
}
|
|
3312
|
+
),
|
|
3313
|
+
a ? /* @__PURE__ */ n.jsx(
|
|
3314
|
+
G,
|
|
3315
|
+
{
|
|
3316
|
+
block: !0,
|
|
3317
|
+
onClick: () => {
|
|
3318
|
+
typeof c < "u" && c.push(
|
|
3319
|
+
i(`/standard/hrm.helpdesk.FAQ-detail/:${a}`)
|
|
3320
|
+
);
|
|
3321
|
+
},
|
|
3322
|
+
children: t
|
|
3323
|
+
}
|
|
3324
|
+
) : /* @__PURE__ */ n.jsx(Y.Text, { children: r }),
|
|
3325
|
+
/* @__PURE__ */ n.jsx(
|
|
3326
|
+
We,
|
|
3327
|
+
{
|
|
3328
|
+
date: e == null ? void 0 : e.CREATED_DATE,
|
|
3329
|
+
format: Xe,
|
|
3330
|
+
sender: o
|
|
3331
|
+
}
|
|
3332
|
+
)
|
|
3333
|
+
] });
|
|
3334
|
+
}, Kr = O(Yr), qr = ({ ...e }) => {
|
|
3335
|
+
switch (e == null ? void 0 : e.CHAT_TYPE) {
|
|
3336
|
+
case "info":
|
|
3337
|
+
return /* @__PURE__ */ n.jsx(zr, { ...e });
|
|
3338
|
+
case "faq":
|
|
3339
|
+
return /* @__PURE__ */ n.jsx(Kr, { ...e });
|
|
3340
|
+
case "chat":
|
|
3341
|
+
return e != null && e.ATTACHMENT ? /* @__PURE__ */ n.jsx(Vr, { ...e }) : /* @__PURE__ */ n.jsx(Ur, { ...e });
|
|
3342
|
+
default:
|
|
3343
|
+
return null;
|
|
3344
|
+
}
|
|
3345
|
+
}, Jr = O(qr), Qr = () => {
|
|
3346
|
+
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);
|
|
3349
|
+
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}`;
|
|
3352
|
+
}
|
|
3353
|
+
return `${w == null ? void 0 : w.join(", ")} ${r}`;
|
|
3354
|
+
}, [e, x]), b = (w) => {
|
|
3355
|
+
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) => ({
|
|
3359
|
+
...j,
|
|
3360
|
+
[h]: p == null ? void 0 : p.IS_TYPING
|
|
3361
|
+
}));
|
|
3362
|
+
const v = c == null ? void 0 : c.find(
|
|
3363
|
+
(j) => (j == null ? void 0 : j.EMP_ID) === (p == null ? void 0 : p.EMPLOYEE_ID)
|
|
3364
|
+
), C = {
|
|
3365
|
+
...p,
|
|
3366
|
+
...v
|
|
3367
|
+
};
|
|
3368
|
+
t((j) => {
|
|
3369
|
+
const S = [...j, C], I = Tn({
|
|
3370
|
+
ArrObj: S,
|
|
3371
|
+
key: "EMPLOYEE_ID"
|
|
3372
|
+
});
|
|
3373
|
+
return I == null ? void 0 : I.filter((B) => B == null ? void 0 : B.IS_TYPING);
|
|
3374
|
+
});
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
};
|
|
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(
|
|
3381
|
+
"div",
|
|
3382
|
+
{
|
|
3383
|
+
style: {
|
|
3384
|
+
display: "flex",
|
|
3385
|
+
gap: 8,
|
|
3386
|
+
alignItems: "center"
|
|
3387
|
+
},
|
|
3388
|
+
children: [
|
|
3389
|
+
/* @__PURE__ */ n.jsx(
|
|
3390
|
+
Ee.Group,
|
|
3391
|
+
{
|
|
3392
|
+
maxCount: 2,
|
|
3393
|
+
maxPopoverTrigger: "click",
|
|
3394
|
+
maxStyle: {
|
|
3395
|
+
color: "#f56a00",
|
|
3396
|
+
backgroundColor: "#fde3cf",
|
|
3397
|
+
cursor: "pointer"
|
|
3398
|
+
},
|
|
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))
|
|
3400
|
+
}
|
|
3401
|
+
),
|
|
3402
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: g }),
|
|
3403
|
+
(x == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsx(ft, {}) : null
|
|
3404
|
+
]
|
|
3405
|
+
}
|
|
3406
|
+
);
|
|
3407
|
+
}, Zr = O(Qr), Xr = () => {
|
|
3408
|
+
var c;
|
|
3409
|
+
const { chats: e } = De(), { widgetProps: t } = q(), { activeTab: s } = be(), r = z(), { xs: i } = ge.useBreakpoint();
|
|
3410
|
+
return Z(() => {
|
|
3411
|
+
clearTimeout(r.current), r.current = setTimeout(() => {
|
|
3412
|
+
me(".w-ticket-detail-content-container");
|
|
3413
|
+
}, 350);
|
|
3414
|
+
}, [s]), /* @__PURE__ */ n.jsxs(
|
|
3415
|
+
"div",
|
|
3416
|
+
{
|
|
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" : ""} `,
|
|
3418
|
+
children: [
|
|
3419
|
+
(c = Object.keys(e || {})) == null ? void 0 : c.map((o) => {
|
|
3420
|
+
var d, u;
|
|
3421
|
+
const a = e == null ? void 0 : e[o];
|
|
3422
|
+
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) => {
|
|
3425
|
+
var y, w;
|
|
3426
|
+
const g = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", b = f == null ? void 0 : f.CHAT_TYPE;
|
|
3427
|
+
return /* @__PURE__ */ n.jsxs(gn, { children: [
|
|
3428
|
+
g === "response" && b !== "info" && /* @__PURE__ */ n.jsx(
|
|
3429
|
+
Ue,
|
|
3430
|
+
{
|
|
3431
|
+
src: (y = f == null ? void 0 : f.ACTOR) == null ? void 0 : y.PHOTO,
|
|
3432
|
+
name: (w = f == null ? void 0 : f.ACTOR) == null ? void 0 : w.FULL_NAME
|
|
3433
|
+
}
|
|
3434
|
+
),
|
|
3435
|
+
/* @__PURE__ */ n.jsx(Jr, { ...f })
|
|
3436
|
+
] }, x);
|
|
3437
|
+
}) })
|
|
3438
|
+
] }, o);
|
|
3439
|
+
}),
|
|
3440
|
+
/* @__PURE__ */ n.jsx(Zr, {})
|
|
3441
|
+
]
|
|
3442
|
+
}
|
|
3443
|
+
);
|
|
3444
|
+
}, Pr = O(Xr), eo = () => {
|
|
3445
|
+
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(
|
|
3450
|
+
`${fn}-sf-mobile`
|
|
3451
|
+
) : a == null || a.push(`${fn}-mobile`)), (d = a == null ? void 0 : a.filter(Boolean)) == null ? void 0 : d.join(" ");
|
|
3452
|
+
}, [r, s == null ? void 0 : s.isSF]);
|
|
3453
|
+
return t ? /* @__PURE__ */ n.jsx(
|
|
3454
|
+
"div",
|
|
3455
|
+
{
|
|
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;
|
|
3459
|
+
return /* @__PURE__ */ n.jsxs(
|
|
3460
|
+
"div",
|
|
3461
|
+
{
|
|
3462
|
+
style: {
|
|
3463
|
+
display: "flex",
|
|
3464
|
+
gap: 8,
|
|
3465
|
+
...u && {
|
|
3466
|
+
alignSelf: "flex-end"
|
|
3467
|
+
}
|
|
3468
|
+
},
|
|
3469
|
+
children: [
|
|
3470
|
+
/* @__PURE__ */ n.jsx("div", { style: { order: u ? 2 : 1 }, children: /* @__PURE__ */ n.jsx(de.Avatar, {}) }),
|
|
3471
|
+
/* @__PURE__ */ n.jsxs(
|
|
3472
|
+
"div",
|
|
3473
|
+
{
|
|
3474
|
+
style: {
|
|
3475
|
+
display: "flex",
|
|
3476
|
+
flexDirection: "column",
|
|
3477
|
+
gap: 8,
|
|
3478
|
+
order: u ? 1 : 2
|
|
3479
|
+
},
|
|
3480
|
+
children: [
|
|
3481
|
+
/* @__PURE__ */ n.jsx(de.Input, { style: { width: 120, borderRadius: 8 } }),
|
|
3482
|
+
/* @__PURE__ */ n.jsx(
|
|
3483
|
+
de.Input,
|
|
3484
|
+
{
|
|
3485
|
+
style: { height: 50, width: "100%", borderRadius: 8 }
|
|
3486
|
+
}
|
|
3487
|
+
)
|
|
3488
|
+
]
|
|
3489
|
+
}
|
|
3490
|
+
)
|
|
3491
|
+
]
|
|
3492
|
+
},
|
|
3493
|
+
d
|
|
3494
|
+
);
|
|
3495
|
+
})
|
|
3496
|
+
}
|
|
3497
|
+
) : ((o = Object.keys(e || {})) == null ? void 0 : o.length) === 0 ? /* @__PURE__ */ n.jsx(
|
|
3498
|
+
"div",
|
|
3499
|
+
{
|
|
3500
|
+
className: i,
|
|
3501
|
+
style: {
|
|
3502
|
+
display: "flex",
|
|
3503
|
+
justifyContent: "center",
|
|
3504
|
+
alignItems: "center"
|
|
3505
|
+
},
|
|
3506
|
+
children: /* @__PURE__ */ n.jsx(Xn, {})
|
|
3507
|
+
}
|
|
3508
|
+
) : /* @__PURE__ */ n.jsx(Pr, {});
|
|
3509
|
+
}, no = O(eo), to = ({ ...e }) => {
|
|
3510
|
+
const t = z(0);
|
|
3511
|
+
return /* @__PURE__ */ n.jsxs(
|
|
3512
|
+
"div",
|
|
3513
|
+
{
|
|
3514
|
+
style: { display: "flex", gap: 8 },
|
|
3515
|
+
onClick: (s) => {
|
|
3516
|
+
s == null || s.stopPropagation();
|
|
3517
|
+
},
|
|
3518
|
+
children: [
|
|
3519
|
+
/* @__PURE__ */ n.jsx(
|
|
3520
|
+
wn,
|
|
3521
|
+
{
|
|
3522
|
+
nameFallback: e == null ? void 0 : e.FULL_NAME,
|
|
3523
|
+
src: e == null ? void 0 : e.PHOTO,
|
|
3524
|
+
width: 80,
|
|
3525
|
+
placeholder: /* @__PURE__ */ n.jsx(de.Image, { style: { width: "100%", height: "100%" } }),
|
|
3526
|
+
style: { borderRadius: 8 },
|
|
3527
|
+
preview: !1,
|
|
3528
|
+
loading: "lazy",
|
|
3529
|
+
onError: (s) => {
|
|
3530
|
+
t.current += 1, (t == null ? void 0 : t.current) < 3 ? s.target.src = ot(e == null ? void 0 : e.PHOTO) : s.target.src = jn(e == null ? void 0 : e.FULL_NAME);
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
),
|
|
3534
|
+
/* @__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 })
|
|
3539
|
+
] })
|
|
3540
|
+
]
|
|
3541
|
+
}
|
|
3542
|
+
);
|
|
3543
|
+
}, so = O(to), ro = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
|
|
3544
|
+
var p, E;
|
|
3545
|
+
const s = en(), [r, i] = D({}), c = z(null), o = _(
|
|
3546
|
+
"ImageMustSmallerThan",
|
|
3547
|
+
"Image must smaller than"
|
|
3548
|
+
), a = _(
|
|
3549
|
+
"MaximumFileSizeExceeded",
|
|
3550
|
+
"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({
|
|
3554
|
+
endpoint: "/upload/get-upload-config",
|
|
3555
|
+
data: {
|
|
3556
|
+
LIMIT: 1,
|
|
3557
|
+
PAGE: 1,
|
|
3558
|
+
SEARCH: {
|
|
3559
|
+
UPLOAD_CODE: "helpdesk"
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
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]);
|
|
3566
|
+
});
|
|
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({
|
|
3571
|
+
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
3572
|
+
top: 28,
|
|
3573
|
+
placement: "top"
|
|
3574
|
+
}), (S = Ce) == null || S.error({
|
|
3575
|
+
message: a,
|
|
3576
|
+
description: `${o} ${v == null ? void 0 : v.toFixed(
|
|
3577
|
+
1
|
|
3578
|
+
)} MB!`,
|
|
3579
|
+
className: "w-notification-content",
|
|
3580
|
+
duration: 3
|
|
3581
|
+
})), !1;
|
|
3582
|
+
}, A = (h) => {
|
|
3583
|
+
var v, C;
|
|
3584
|
+
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({
|
|
3587
|
+
endpoint: "/upload/temp",
|
|
3588
|
+
data: m,
|
|
3589
|
+
headers: {
|
|
3590
|
+
"Content-Type": "multipart/form-data"
|
|
3591
|
+
}
|
|
3592
|
+
})) == null ? void 0 : v.then((j) => {
|
|
3593
|
+
var S, I, B, M, L;
|
|
3594
|
+
if ((I = (S = j == null ? void 0 : j.data) == null ? void 0 : S.DATA) != null && I.LIST) {
|
|
3595
|
+
const F = (M = (B = j == null ? void 0 : j.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST, $ = {
|
|
3596
|
+
ATTACHMENT: F == null ? void 0 : F.VIEW_PATH,
|
|
3597
|
+
FAQ_ID: null,
|
|
3598
|
+
MESSAGE: "",
|
|
3599
|
+
CREATED_DATE: (L = le()) == null ? void 0 : L.format(`${hn} HH:mm:ss`),
|
|
3600
|
+
CHAT_ALIGN: "to",
|
|
3601
|
+
CHAT_TYPE: "chat"
|
|
3602
|
+
};
|
|
3603
|
+
f((H) => {
|
|
3604
|
+
const Q = [...yn(H), $];
|
|
3605
|
+
return Qe(Q);
|
|
3606
|
+
}), x.current = !0, d({
|
|
3607
|
+
event: "SEND_MESSAGE",
|
|
3608
|
+
data: {
|
|
3609
|
+
ATTACHMENT: F == null ? void 0 : F.TEMP_PATH,
|
|
3610
|
+
FAQ_ID: null,
|
|
3611
|
+
MESSAGE: "",
|
|
3612
|
+
EMPLOYEES: u == null ? void 0 : u.map((H) => H == null ? void 0 : H.EMP_ID),
|
|
3613
|
+
TASK_ID: g
|
|
3614
|
+
}
|
|
3615
|
+
}), clearTimeout(c.current), c.current = setTimeout(() => {
|
|
3616
|
+
me(".w-ticket-detail-content-container");
|
|
3617
|
+
}, 350);
|
|
3618
|
+
}
|
|
3619
|
+
})) == null || C.finally(() => {
|
|
3620
|
+
e(!1);
|
|
3621
|
+
});
|
|
3622
|
+
};
|
|
3623
|
+
return Z(() => {
|
|
3624
|
+
y();
|
|
3625
|
+
}, []), Z(() => {
|
|
3626
|
+
var h;
|
|
3627
|
+
(h = Ce) == null || h.destroy();
|
|
3628
|
+
}, [b]), /* @__PURE__ */ n.jsx(
|
|
3629
|
+
Zn,
|
|
3630
|
+
{
|
|
3631
|
+
beforeUpload: w,
|
|
3632
|
+
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);
|
|
3636
|
+
},
|
|
3637
|
+
children: /* @__PURE__ */ n.jsx(
|
|
3638
|
+
G,
|
|
3639
|
+
{
|
|
3640
|
+
loading: t,
|
|
3641
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "paper-clip" }),
|
|
3642
|
+
shape: "circle",
|
|
3643
|
+
style: { border: "none" }
|
|
3644
|
+
}
|
|
3645
|
+
)
|
|
3646
|
+
}
|
|
3647
|
+
);
|
|
3648
|
+
}, oo = O(ro), co = (e) => {
|
|
3649
|
+
var r;
|
|
3650
|
+
const t = z(null), s = z(null);
|
|
3651
|
+
return s != null && s.current && ((r = s.current) == null || r.update(e)), Z(() => {
|
|
3652
|
+
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 }), () => {
|
|
3655
|
+
s.current = null;
|
|
3656
|
+
};
|
|
3657
|
+
}, []), mn.createElement("div", { ref: t });
|
|
3658
|
+
}, io = ({ refInput: e }) => {
|
|
3659
|
+
const { xs: t } = ge.useBreakpoint(), s = R(() => t ? "click" : "hover", [t]), r = () => {
|
|
3660
|
+
var g;
|
|
3661
|
+
const c = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea;
|
|
3662
|
+
if (!c)
|
|
3663
|
+
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);
|
|
3665
|
+
return {
|
|
3666
|
+
before: u,
|
|
3667
|
+
selectedText: f,
|
|
3668
|
+
after: x,
|
|
3669
|
+
selectionStart: o,
|
|
3670
|
+
selectionEnd: a,
|
|
3671
|
+
text: d
|
|
3672
|
+
};
|
|
3673
|
+
}, i = (c) => {
|
|
3674
|
+
var x, g;
|
|
3675
|
+
(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;
|
|
3677
|
+
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;
|
|
3680
|
+
};
|
|
3681
|
+
return /* @__PURE__ */ n.jsx(
|
|
3682
|
+
vn,
|
|
3683
|
+
{
|
|
3684
|
+
trigger: s,
|
|
3685
|
+
content: /* @__PURE__ */ n.jsx(
|
|
3686
|
+
co,
|
|
3687
|
+
{
|
|
3688
|
+
onEmojiSelect: (c) => {
|
|
3689
|
+
i(c);
|
|
3690
|
+
},
|
|
3691
|
+
theme: "auto"
|
|
3692
|
+
}
|
|
3693
|
+
),
|
|
3694
|
+
children: /* @__PURE__ */ n.jsx(G, { icon: /* @__PURE__ */ n.jsx(P, { type: "smile" }), style: { border: "none" } })
|
|
3695
|
+
}
|
|
3696
|
+
);
|
|
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,
|
|
3703
|
+
label: /* @__PURE__ */ n.jsx(
|
|
3704
|
+
vn,
|
|
3705
|
+
{
|
|
3706
|
+
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 }) })
|
|
3709
|
+
}
|
|
3710
|
+
),
|
|
3711
|
+
value: C == null ? void 0 : C.FULL_NAME
|
|
3712
|
+
})), [b]), m = () => {
|
|
3713
|
+
var S, I, B;
|
|
3714
|
+
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({
|
|
3717
|
+
event: "SEND_MESSAGE",
|
|
3718
|
+
data: {
|
|
3719
|
+
ATTACHMENT: "",
|
|
3720
|
+
FAQ_ID: null,
|
|
3721
|
+
MESSAGE: C,
|
|
3722
|
+
EMPLOYEES: b == null ? void 0 : b.map((M) => M == null ? void 0 : M.EMP_ID),
|
|
3723
|
+
TASK_ID: x
|
|
3724
|
+
}
|
|
3725
|
+
});
|
|
3726
|
+
const j = {
|
|
3727
|
+
ATTACHMENT: "",
|
|
3728
|
+
FAQ_ID: null,
|
|
3729
|
+
MESSAGE: C,
|
|
3730
|
+
CREATED_DATE: (B = le()) == null ? void 0 : B.format(`${hn} HH:mm:ss`),
|
|
3731
|
+
CHAT_ALIGN: "to",
|
|
3732
|
+
CHAT_TYPE: "chat"
|
|
3733
|
+
};
|
|
3734
|
+
y((M) => {
|
|
3735
|
+
const F = [...yn(M), j];
|
|
3736
|
+
return Qe(F);
|
|
3737
|
+
}), 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({
|
|
3740
|
+
event: "TYPING",
|
|
3741
|
+
data: {
|
|
3742
|
+
TASK_ID: x,
|
|
3743
|
+
IS_TYPING: !0
|
|
3744
|
+
}
|
|
3745
|
+
})), c.current = setTimeout(() => {
|
|
3746
|
+
d({
|
|
3747
|
+
event: "TYPING",
|
|
3748
|
+
data: {
|
|
3749
|
+
TASK_ID: x,
|
|
3750
|
+
IS_TYPING: !1
|
|
3751
|
+
}
|
|
3752
|
+
}), o.current = !1;
|
|
3753
|
+
}, 250);
|
|
3754
|
+
};
|
|
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();
|
|
3759
|
+
}, 500));
|
|
3760
|
+
}, [g, x]), E ? null : /* @__PURE__ */ n.jsxs(
|
|
3761
|
+
"div",
|
|
3762
|
+
{
|
|
3763
|
+
className: "w-input-container",
|
|
3764
|
+
style: {
|
|
3765
|
+
margin: 0
|
|
3766
|
+
},
|
|
3767
|
+
children: [
|
|
3768
|
+
/* @__PURE__ */ n.jsx(lo, { refInput: i }),
|
|
3769
|
+
/* @__PURE__ */ n.jsx(
|
|
3770
|
+
oo,
|
|
3771
|
+
{
|
|
3772
|
+
setLoadingUpload: r,
|
|
3773
|
+
isLoadingUpload: s
|
|
3774
|
+
}
|
|
3775
|
+
),
|
|
3776
|
+
/* @__PURE__ */ n.jsx(
|
|
3777
|
+
Un,
|
|
3778
|
+
{
|
|
3779
|
+
autoSize: {
|
|
3780
|
+
maxRows: 3
|
|
3781
|
+
},
|
|
3782
|
+
ref: i,
|
|
3783
|
+
className: "w-input-helpdesk",
|
|
3784
|
+
placeholder: "Type a message...",
|
|
3785
|
+
onChange: () => {
|
|
3786
|
+
v();
|
|
3787
|
+
},
|
|
3788
|
+
onKeyDown: (C) => {
|
|
3789
|
+
((C == null ? void 0 : C.code) === "Enter" || (C == null ? void 0 : C.key) === "Enter") && !(C != null && C.shiftKey) && m();
|
|
3790
|
+
},
|
|
3791
|
+
filterOption: (C, j) => {
|
|
3792
|
+
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();
|
|
3794
|
+
return I == null ? void 0 : I.includes(S);
|
|
3795
|
+
},
|
|
3796
|
+
children: h == null ? void 0 : h.map((C, j) => /* @__PURE__ */ n.jsx(Un.Option, { ...C, children: C == null ? void 0 : C.label }, j))
|
|
3797
|
+
},
|
|
3798
|
+
e
|
|
3799
|
+
),
|
|
3800
|
+
/* @__PURE__ */ n.jsx(
|
|
3801
|
+
G,
|
|
3802
|
+
{
|
|
3803
|
+
loading: p,
|
|
3804
|
+
disabled: p,
|
|
3805
|
+
className: "w-send-btn",
|
|
3806
|
+
style: {
|
|
3807
|
+
backgroundColor: "var(--primary-color, #395ebc)",
|
|
3808
|
+
...p && {
|
|
3809
|
+
color: "white"
|
|
3810
|
+
}
|
|
3811
|
+
},
|
|
3812
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: p ? "loading" : "send" }),
|
|
3813
|
+
shape: "circle",
|
|
3814
|
+
onClick: m
|
|
3815
|
+
}
|
|
3816
|
+
)
|
|
3817
|
+
]
|
|
3818
|
+
}
|
|
3819
|
+
);
|
|
3820
|
+
}, uo = O(ao), fo = ({ title: e, subTitle: t, onClose: s, open: r, styleWrapper: i }) => {
|
|
3821
|
+
var c;
|
|
3822
|
+
return r ? /* @__PURE__ */ n.jsx(
|
|
3823
|
+
"div",
|
|
3824
|
+
{
|
|
3825
|
+
className: "w-banner-container",
|
|
3826
|
+
...((c = Object.keys(i || {})) == null ? void 0 : c.length) > 0 && {
|
|
3827
|
+
style: i
|
|
3828
|
+
},
|
|
3829
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: "w-banner-content", children: [
|
|
3830
|
+
e && /* @__PURE__ */ n.jsx(Y.Text, { style: { fontSize: 16, fontWeight: 600 }, children: e }),
|
|
3831
|
+
t && /* @__PURE__ */ n.jsx("div", { className: "w-banner-subtitle", children: t }),
|
|
3832
|
+
typeof s == "function" && /* @__PURE__ */ n.jsx("div", { className: "w-banner-close-btn", children: /* @__PURE__ */ n.jsx(
|
|
3833
|
+
G,
|
|
3834
|
+
{
|
|
3835
|
+
style: { border: "none", background: "transparent" },
|
|
3836
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
|
|
3837
|
+
onClick: () => s()
|
|
3838
|
+
}
|
|
3839
|
+
) })
|
|
3840
|
+
] })
|
|
3841
|
+
}
|
|
3842
|
+
) : null;
|
|
3843
|
+
}, Et = O(fo), xo = () => {
|
|
3844
|
+
const e = _(
|
|
3845
|
+
"ForMoreInformationOfThisTicket",
|
|
3846
|
+
"For more information of this ticket"
|
|
3847
|
+
), t = _("ClickHere", "Click here"), { ticketId: s } = ve(), { history: r } = q(), { encrypt: i } = ht();
|
|
3848
|
+
return /* @__PURE__ */ n.jsx(
|
|
3849
|
+
Et,
|
|
3850
|
+
{
|
|
3851
|
+
subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3852
|
+
/* @__PURE__ */ n.jsx(Y.Text, { children: e }),
|
|
3853
|
+
/* @__PURE__ */ n.jsx(
|
|
3854
|
+
Y.Link,
|
|
3855
|
+
{
|
|
3856
|
+
strong: !0,
|
|
3857
|
+
className: "w-reconnect-manual",
|
|
3858
|
+
onClick: () => {
|
|
3859
|
+
const c = i(s);
|
|
3860
|
+
r.push(
|
|
3861
|
+
`/standard/hrm.helpdesk.my-ticket.ticket-details?id=${c}`
|
|
3862
|
+
);
|
|
3863
|
+
},
|
|
3864
|
+
children: t
|
|
3865
|
+
}
|
|
3866
|
+
)
|
|
3867
|
+
] }),
|
|
3868
|
+
open: !0,
|
|
3869
|
+
styleWrapper: {
|
|
3870
|
+
position: "sticky"
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
);
|
|
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 = _(
|
|
3881
|
+
"TicketCategory",
|
|
3882
|
+
"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}`;
|
|
3885
|
+
return [
|
|
3886
|
+
{ value: 3, label: M },
|
|
3887
|
+
{ value: 1, label: L },
|
|
3888
|
+
{ value: 4, label: F },
|
|
3889
|
+
{ value: 6, label: g },
|
|
3890
|
+
{ value: 8, label: b }
|
|
3891
|
+
];
|
|
3892
|
+
}, []), I = () => {
|
|
3893
|
+
var M;
|
|
3894
|
+
(M = A({
|
|
3895
|
+
endpoint: "/helpdesk/category/list",
|
|
3896
|
+
data: {
|
|
3897
|
+
LIMIT: 999999,
|
|
3898
|
+
PAGE: 1,
|
|
3899
|
+
SELECTOR: "*",
|
|
3900
|
+
SORT: { FIELD: "ORDER_NO", ORDER: "ASC" }
|
|
3901
|
+
}
|
|
3902
|
+
})) == null || M.then((L) => {
|
|
3903
|
+
var F, $, H;
|
|
3904
|
+
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;
|
|
3906
|
+
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
|
|
3910
|
+
}))
|
|
3911
|
+
);
|
|
3912
|
+
}
|
|
3913
|
+
});
|
|
3914
|
+
}, B = () => {
|
|
3915
|
+
var F, $;
|
|
3916
|
+
const M = p == null ? void 0 : p.getFieldsValue(!0);
|
|
3917
|
+
m(M);
|
|
3918
|
+
const L = ($ = (F = Object.values(M || {})) == null ? void 0 : F.flat()) == null ? void 0 : $.filter(Boolean);
|
|
3919
|
+
v(L == null ? void 0 : L.length);
|
|
3920
|
+
};
|
|
3921
|
+
return Z(() => {
|
|
3922
|
+
I();
|
|
3923
|
+
}, []), /* @__PURE__ */ n.jsxs(
|
|
3924
|
+
bt,
|
|
3925
|
+
{
|
|
3926
|
+
styleContainer: { height: "calc(100% - 50px)" },
|
|
3927
|
+
open: E,
|
|
3928
|
+
onClose: () => {
|
|
3929
|
+
h(!1);
|
|
3930
|
+
},
|
|
3931
|
+
footer: /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-list-advance-filter-footer", children: [
|
|
3932
|
+
/* @__PURE__ */ n.jsx(
|
|
3933
|
+
G,
|
|
3934
|
+
{
|
|
3935
|
+
onClick: () => {
|
|
3936
|
+
p == null || p.resetFields(), B();
|
|
3937
|
+
},
|
|
3938
|
+
children: y
|
|
3939
|
+
},
|
|
3940
|
+
"clear"
|
|
3941
|
+
),
|
|
3942
|
+
/* @__PURE__ */ n.jsx(
|
|
3943
|
+
G,
|
|
3944
|
+
{
|
|
3945
|
+
type: "primary",
|
|
3946
|
+
onClick: () => {
|
|
3947
|
+
B(), h(!1);
|
|
3948
|
+
},
|
|
3949
|
+
children: w
|
|
3950
|
+
},
|
|
3951
|
+
"filter"
|
|
3952
|
+
)
|
|
3953
|
+
] }),
|
|
3954
|
+
children: [
|
|
3955
|
+
/* @__PURE__ */ n.jsx(Y.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
|
|
3956
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: p, layout: "vertical", children: [
|
|
3957
|
+
/* @__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 }) }),
|
|
3959
|
+
/* @__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 }) })
|
|
3961
|
+
] }) })
|
|
3962
|
+
]
|
|
3963
|
+
}
|
|
3964
|
+
);
|
|
3965
|
+
}, vo = O(bo), ho = () => {
|
|
3966
|
+
const e = _(
|
|
3967
|
+
"ReconnectManually",
|
|
3968
|
+
"Reconnect Manually"
|
|
3969
|
+
), t = _(
|
|
3970
|
+
"HelpdeskWebsocket",
|
|
3971
|
+
"Helpdesk Websocket"
|
|
3972
|
+
), s = _("NotConnected", "Not Connected"), r = _("Connecting", "Connecting"), {
|
|
3973
|
+
connectWebSocket: i,
|
|
3974
|
+
retryCountState: c,
|
|
3975
|
+
setRetryCountState: o,
|
|
3976
|
+
retryCountRef: a
|
|
3977
|
+
} = he(), d = R(() => c === Ie ? `${t} ${s}` : `${t} ${r}`, [c]);
|
|
3978
|
+
return /* @__PURE__ */ n.jsx(
|
|
3979
|
+
"div",
|
|
3980
|
+
{
|
|
3981
|
+
style: {
|
|
3982
|
+
display: "flex",
|
|
3983
|
+
justifyContent: "center",
|
|
3984
|
+
alignItems: "center",
|
|
3985
|
+
height: "100%"
|
|
3986
|
+
},
|
|
3987
|
+
children: /* @__PURE__ */ n.jsx(
|
|
3988
|
+
Xt,
|
|
3989
|
+
{
|
|
3990
|
+
...c === Ie ? {
|
|
3991
|
+
status: "warning"
|
|
3992
|
+
} : {
|
|
3993
|
+
icon: null
|
|
3994
|
+
},
|
|
3995
|
+
title: d,
|
|
3996
|
+
extra: c === Ie ? /* @__PURE__ */ n.jsx(
|
|
3997
|
+
G,
|
|
3998
|
+
{
|
|
3999
|
+
type: "primary",
|
|
4000
|
+
onClick: () => {
|
|
4001
|
+
a.current = 0, o(0), i();
|
|
4002
|
+
},
|
|
4003
|
+
children: e
|
|
4004
|
+
},
|
|
4005
|
+
"reconnect"
|
|
4006
|
+
) : /* @__PURE__ */ n.jsx(
|
|
4007
|
+
P,
|
|
4008
|
+
{
|
|
4009
|
+
type: "loading",
|
|
4010
|
+
style: {
|
|
4011
|
+
paddingTop: 8
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
4014
|
+
)
|
|
4015
|
+
}
|
|
4016
|
+
)
|
|
4017
|
+
}
|
|
4018
|
+
);
|
|
4019
|
+
}, Eo = O(ho), To = () => {
|
|
4020
|
+
const { setTicketId: e, ticketId: t, openFilter: s } = ve(), { onSendMsg: r, setGetResponse: i } = he(), { showReadyWSHD: c } = q();
|
|
4021
|
+
return c ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4022
|
+
/* @__PURE__ */ n.jsx(
|
|
4023
|
+
mo,
|
|
4024
|
+
{
|
|
4025
|
+
visible: t,
|
|
4026
|
+
onClose: () => {
|
|
4027
|
+
e(""), i(!1), r({
|
|
4028
|
+
event: "LEAVE_ROOM",
|
|
4029
|
+
data: {
|
|
4030
|
+
TASK_ID: t
|
|
4031
|
+
}
|
|
4032
|
+
});
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
),
|
|
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 = _(
|
|
4041
|
+
"WidgetDisconnected",
|
|
4042
|
+
"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 = () => {
|
|
4044
|
+
o(!0), u({ msg: c == null ? void 0 : c.getStartedPayload });
|
|
4045
|
+
};
|
|
4046
|
+
return Z(() => {
|
|
4047
|
+
r(!f), window.clearTimeout(i.current), i.current = setTimeout(() => {
|
|
4048
|
+
r(!1);
|
|
4049
|
+
}, 3e3);
|
|
4050
|
+
}, [f]), /* @__PURE__ */ n.jsx(
|
|
4051
|
+
jo,
|
|
4052
|
+
{
|
|
4053
|
+
usePopover: s && x === "show",
|
|
4054
|
+
open: s && x === "show",
|
|
4055
|
+
content: t,
|
|
4056
|
+
placement: "right",
|
|
4057
|
+
children: /* @__PURE__ */ n.jsxs(
|
|
4058
|
+
"div",
|
|
4059
|
+
{
|
|
4060
|
+
className: "w-launcher-container",
|
|
4061
|
+
onClick: () => {
|
|
4062
|
+
a || (d(!0), g()), o(!0);
|
|
4063
|
+
},
|
|
4064
|
+
children: [
|
|
4065
|
+
/* @__PURE__ */ n.jsx(P, { type: "chat-bubble" }),
|
|
4066
|
+
/* @__PURE__ */ n.jsxs(
|
|
4067
|
+
Y.Text,
|
|
4068
|
+
{
|
|
4069
|
+
style: {
|
|
4070
|
+
fontWeight: 600,
|
|
4071
|
+
color: "#fff"
|
|
4072
|
+
},
|
|
4073
|
+
children: [
|
|
4074
|
+
e,
|
|
4075
|
+
"?"
|
|
4076
|
+
]
|
|
4077
|
+
}
|
|
4078
|
+
)
|
|
4079
|
+
]
|
|
4080
|
+
}
|
|
4081
|
+
)
|
|
4082
|
+
}
|
|
4083
|
+
);
|
|
4084
|
+
}, po = O(wo), _o = () => {
|
|
4085
|
+
const e = _("NotConnected", "Not Connected"), t = _(
|
|
4086
|
+
"CannotAutoReconnect",
|
|
4087
|
+
"Cannot auto reconnect"
|
|
4088
|
+
), s = _(
|
|
4089
|
+
"ReconnectManually",
|
|
4090
|
+
"Reconnect Manually"
|
|
4091
|
+
), [r, i] = D(!1), { connected: c, createSocket: o } = ue(), { widgetProps: a } = q();
|
|
4092
|
+
return Z(() => {
|
|
4093
|
+
i(!c);
|
|
4094
|
+
}, [c]), /* @__PURE__ */ n.jsx(
|
|
4095
|
+
Et,
|
|
4096
|
+
{
|
|
4097
|
+
title: `${a == null ? void 0 : a.title} ${e}`,
|
|
4098
|
+
subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4099
|
+
/* @__PURE__ */ n.jsxs(Y.Text, { children: [
|
|
4100
|
+
t,
|
|
4101
|
+
"?"
|
|
4102
|
+
] }),
|
|
4103
|
+
/* @__PURE__ */ n.jsx(
|
|
4104
|
+
Y.Link,
|
|
4105
|
+
{
|
|
4106
|
+
strong: !0,
|
|
4107
|
+
className: "w-reconnect-manual",
|
|
4108
|
+
onClick: () => {
|
|
4109
|
+
o();
|
|
4110
|
+
},
|
|
4111
|
+
children: s
|
|
4112
|
+
}
|
|
4113
|
+
)
|
|
4114
|
+
] }),
|
|
4115
|
+
onClose: () => i(!1),
|
|
4116
|
+
open: !c && r
|
|
4117
|
+
}
|
|
4118
|
+
);
|
|
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(() => {
|
|
4123
|
+
var f;
|
|
4124
|
+
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(
|
|
4127
|
+
(u) => {
|
|
4128
|
+
var x;
|
|
4129
|
+
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(" ");
|
|
4131
|
+
},
|
|
4132
|
+
[i == null ? void 0 : i.isSF, e]
|
|
4133
|
+
);
|
|
4134
|
+
return Z(() => {
|
|
4135
|
+
r && s(r), clearTimeout(o.current), o.current = setTimeout(() => {
|
|
4136
|
+
r || s(r);
|
|
4137
|
+
}, 250);
|
|
4138
|
+
}, [r]), t ? /* @__PURE__ */ n.jsxs("div", { className: a, children: [
|
|
4139
|
+
/* @__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, {})
|
|
4142
|
+
] }),
|
|
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(
|
|
4147
|
+
cn.TabPane,
|
|
4148
|
+
{
|
|
4149
|
+
...s,
|
|
4150
|
+
key: s == null ? void 0 : s.key,
|
|
4151
|
+
tab: s == null ? void 0 : s.label
|
|
4152
|
+
}
|
|
4153
|
+
)) }), Oo = O(Lo), Ro = () => {
|
|
4154
|
+
const { isOpenWidget: e } = q(), { setActiveTab: t, activeTab: s } = be(), r = _(
|
|
4155
|
+
"VirtualAssistant",
|
|
4156
|
+
"Virtual Assistant"
|
|
4157
|
+
), i = _("Helpdesk", "Helpdesk"), { xs: c } = ge.useBreakpoint();
|
|
4158
|
+
return Z(() => {
|
|
4159
|
+
const o = st();
|
|
4160
|
+
t((o == null ? void 0 : o.activeTab) ?? s);
|
|
4161
|
+
}, []), e ? /* @__PURE__ */ n.jsx(
|
|
4162
|
+
"div",
|
|
4163
|
+
{
|
|
4164
|
+
className: "w-widget-tab-footer-container",
|
|
4165
|
+
...c && {
|
|
4166
|
+
style: {
|
|
4167
|
+
borderRadius: 0
|
|
4168
|
+
}
|
|
4169
|
+
},
|
|
4170
|
+
children: /* @__PURE__ */ n.jsx(
|
|
4171
|
+
Oo,
|
|
4172
|
+
{
|
|
4173
|
+
activeKey: s,
|
|
4174
|
+
onChange: (o) => {
|
|
4175
|
+
t(o), Pe({
|
|
4176
|
+
activeTab: o
|
|
4177
|
+
});
|
|
4178
|
+
},
|
|
4179
|
+
items: [
|
|
4180
|
+
{
|
|
4181
|
+
label: r,
|
|
4182
|
+
key: "va"
|
|
4183
|
+
},
|
|
4184
|
+
{
|
|
4185
|
+
label: i,
|
|
4186
|
+
key: "helpdesk"
|
|
4187
|
+
}
|
|
4188
|
+
]
|
|
4189
|
+
}
|
|
4190
|
+
)
|
|
4191
|
+
}
|
|
4192
|
+
) : null;
|
|
4193
|
+
}, Do = O(Ro), No = () => {
|
|
4194
|
+
const { isOpenWidget: e, setOpenWidget: t, setExpand: s, isExpand: r, widgetProps: i } = q(), { xs: c } = ge.useBreakpoint();
|
|
4195
|
+
return e ? /* @__PURE__ */ n.jsxs(
|
|
4196
|
+
"div",
|
|
4197
|
+
{
|
|
4198
|
+
className: `${He}-container`,
|
|
4199
|
+
...c && {
|
|
4200
|
+
style: {
|
|
4201
|
+
borderRadius: 0
|
|
4202
|
+
}
|
|
4203
|
+
},
|
|
4204
|
+
children: [
|
|
4205
|
+
/* @__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 })
|
|
4208
|
+
] }),
|
|
4209
|
+
/* @__PURE__ */ n.jsxs("div", { className: `${He}-action`, children: [
|
|
4210
|
+
!c && /* @__PURE__ */ n.jsx(
|
|
4211
|
+
P,
|
|
4212
|
+
{
|
|
4213
|
+
type: "expand",
|
|
4214
|
+
style: {
|
|
4215
|
+
transform: r ? "rotate(180deg)" : "rotate(0deg)",
|
|
4216
|
+
transition: "all 300ms"
|
|
4217
|
+
},
|
|
4218
|
+
onClick: () => {
|
|
4219
|
+
s((o) => !o);
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
),
|
|
4223
|
+
/* @__PURE__ */ n.jsx(
|
|
4224
|
+
P,
|
|
4225
|
+
{
|
|
4226
|
+
type: "minimize",
|
|
4227
|
+
onClick: () => {
|
|
4228
|
+
t(!1);
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
)
|
|
4232
|
+
] })
|
|
4233
|
+
]
|
|
4234
|
+
}
|
|
4235
|
+
) : 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;
|
|
4239
|
+
const o = [
|
|
4240
|
+
i && "w-container-widget-mobile",
|
|
4241
|
+
s && (t ? "w-show-animate" : "w-close-animate"),
|
|
4242
|
+
"w-container-widget",
|
|
4243
|
+
e && "w-container-widget-expand"
|
|
4244
|
+
];
|
|
4245
|
+
return (a = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : a.join(" ");
|
|
4246
|
+
}, [e, i, s, t]);
|
|
4247
|
+
return /* @__PURE__ */ n.jsxs(
|
|
4248
|
+
"div",
|
|
4249
|
+
{
|
|
4250
|
+
className: c,
|
|
4251
|
+
onKeyDown: (o) => {
|
|
4252
|
+
(o == null ? void 0 : o.code) === "Escape" && !(o != null && o.shiftKey) && !(o != null && o.altKey) && !(o != null && o.ctrlKey) && (o == null ? void 0 : o.key) === "Escape" && r(!1);
|
|
4253
|
+
},
|
|
4254
|
+
tabIndex: 0,
|
|
4255
|
+
children: [
|
|
4256
|
+
/* @__PURE__ */ n.jsx(Mo, {}),
|
|
4257
|
+
/* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(er, { children: [
|
|
4258
|
+
/* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(So, {}) }),
|
|
4259
|
+
/* @__PURE__ */ n.jsx(Do, {})
|
|
4260
|
+
] }) })
|
|
4261
|
+
]
|
|
4262
|
+
}
|
|
4263
|
+
);
|
|
4264
|
+
}, Ho = O(Fo), Qo = ({
|
|
4265
|
+
getStartedPayload: e,
|
|
4266
|
+
socketURL: t,
|
|
4267
|
+
socketPath: s,
|
|
4268
|
+
onPayslipFn: r,
|
|
4269
|
+
title: i,
|
|
4270
|
+
subTitle: c,
|
|
4271
|
+
keyEncrypt: o,
|
|
4272
|
+
history: a,
|
|
4273
|
+
isSF: d = !1
|
|
4274
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
4275
|
+
ks,
|
|
4276
|
+
{
|
|
4277
|
+
getStartedPayload: e,
|
|
4278
|
+
socketURL: t,
|
|
4279
|
+
socketPath: s,
|
|
4280
|
+
onPayslipFn: r,
|
|
4281
|
+
title: i,
|
|
4282
|
+
subTitle: c,
|
|
4283
|
+
keyEncrypt: o,
|
|
4284
|
+
history: a,
|
|
4285
|
+
isSF: d,
|
|
4286
|
+
children: /* @__PURE__ */ n.jsx(Ss, { children: /* @__PURE__ */ n.jsx(Ho, {}) })
|
|
4287
|
+
}
|
|
4288
|
+
);
|
|
4289
|
+
export {
|
|
4290
|
+
Qo as default
|
|
4291
|
+
};
|