@connorpham/live-chat-widget 17.0.6 → 17.0.8
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/debug.log +7 -0
- package/dist/cellcast-bot-widget.es.js +948 -955
- package/dist/cellcast-bot-widget.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var i0 = Object.defineProperty;
|
|
2
2
|
var o0 = (u, D, f) => D in u ? i0(u, D, { enumerable: !0, configurable: !0, writable: !0, value: f }) : u[D] = f;
|
|
3
3
|
var lD = (u, D, f) => o0(u, typeof D != "symbol" ? D + "" : D, f);
|
|
4
|
-
import af, { createContext as qu, useRef as
|
|
4
|
+
import af, { createContext as qu, useRef as gu, useEffect as Z, useContext as Hu, useState as U, useCallback as Mu, useMemo as d0 } from "react";
|
|
5
5
|
var dD = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
6
|
function sf(u) {
|
|
7
7
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
8
8
|
}
|
|
9
|
-
var HD = { exports: {} },
|
|
9
|
+
var HD = { exports: {} }, fD = {};
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
@@ -68,12 +68,12 @@ function Jf() {
|
|
|
68
68
|
*/
|
|
69
69
|
var Of;
|
|
70
70
|
function C0() {
|
|
71
|
-
if (Of) return
|
|
71
|
+
if (Of) return fD;
|
|
72
72
|
Of = 1, Jf();
|
|
73
73
|
var u = af, D = 60103;
|
|
74
|
-
if (
|
|
74
|
+
if (fD.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
75
75
|
var f = Symbol.for;
|
|
76
|
-
D = f("react.element"),
|
|
76
|
+
D = f("react.element"), fD.Fragment = f("react.fragment");
|
|
77
77
|
}
|
|
78
78
|
var e = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, t = Object.prototype.hasOwnProperty, n = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
79
79
|
function r(s, F, d) {
|
|
@@ -83,7 +83,7 @@ function C0() {
|
|
|
83
83
|
if (s && s.defaultProps) for (o in F = s.defaultProps, F) c[o] === void 0 && (c[o] = F[o]);
|
|
84
84
|
return { $$typeof: D, type: s, key: l, ref: j, props: c, _owner: e.current };
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return fD.jsx = r, fD.jsxs = r, fD;
|
|
87
87
|
}
|
|
88
88
|
var ID = {}, Rf;
|
|
89
89
|
function c0() {
|
|
@@ -100,10 +100,10 @@ function c0() {
|
|
|
100
100
|
D.NODE_ENV !== "production" && function() {
|
|
101
101
|
var f = af, e = Jf(), t = 60103, n = 60106;
|
|
102
102
|
u.Fragment = 60107;
|
|
103
|
-
var r = 60108, s = 60114, F = 60109, d = 60110, o = 60112, c = 60113, l = 60120, j = 60115,
|
|
103
|
+
var r = 60108, s = 60114, F = 60109, d = 60110, o = 60112, c = 60113, l = 60120, j = 60115, v = 60116, C = 60121, y = 60122, x = 60117, g = 60129, T = 60131;
|
|
104
104
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
105
105
|
var _ = Symbol.for;
|
|
106
|
-
t = _("react.element"), n = _("react.portal"), u.Fragment = _("react.fragment"), r = _("react.strict_mode"), s = _("react.profiler"), F = _("react.provider"), d = _("react.context"), o = _("react.forward_ref"), c = _("react.suspense"), l = _("react.suspense_list"), j = _("react.memo"),
|
|
106
|
+
t = _("react.element"), n = _("react.portal"), u.Fragment = _("react.fragment"), r = _("react.strict_mode"), s = _("react.profiler"), F = _("react.provider"), d = _("react.context"), o = _("react.forward_ref"), c = _("react.suspense"), l = _("react.suspense_list"), j = _("react.memo"), v = _("react.lazy"), C = _("react.block"), y = _("react.server.block"), x = _("react.fundamental"), _("react.scope"), _("react.opaque.id"), g = _("react.debug_trace_mode"), _("react.offscreen"), T = _("react.legacy_hidden");
|
|
107
107
|
}
|
|
108
108
|
var B = typeof Symbol == "function" && Symbol.iterator, I = "@@iterator";
|
|
109
109
|
function P(i) {
|
|
@@ -113,16 +113,16 @@ function c0() {
|
|
|
113
113
|
return typeof b == "function" ? b : null;
|
|
114
114
|
}
|
|
115
115
|
var q = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
116
|
-
function
|
|
116
|
+
function m(i) {
|
|
117
117
|
{
|
|
118
|
-
for (var b = arguments.length, w = new Array(b > 1 ? b - 1 : 0),
|
|
119
|
-
w[
|
|
118
|
+
for (var b = arguments.length, w = new Array(b > 1 ? b - 1 : 0), $ = 1; $ < b; $++)
|
|
119
|
+
w[$ - 1] = arguments[$];
|
|
120
120
|
O("error", i, w);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
function O(i, b, w) {
|
|
124
124
|
{
|
|
125
|
-
var
|
|
125
|
+
var $ = q.ReactDebugCurrentFrame, G = $.getStackAddendum();
|
|
126
126
|
G !== "" && (b += "%s", w = w.concat([G]));
|
|
127
127
|
var K = w.map(function(Y) {
|
|
128
128
|
return "" + Y;
|
|
@@ -130,13 +130,13 @@ function c0() {
|
|
|
130
130
|
K.unshift("Warning: " + b), Function.prototype.apply.call(console[i], console, K);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var L = !1;
|
|
134
134
|
function hu(i) {
|
|
135
|
-
return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i ===
|
|
135
|
+
return !!(typeof i == "string" || typeof i == "function" || i === u.Fragment || i === s || i === g || i === r || i === c || i === l || i === T || L || typeof i == "object" && i !== null && (i.$$typeof === v || i.$$typeof === j || i.$$typeof === F || i.$$typeof === d || i.$$typeof === o || i.$$typeof === x || i.$$typeof === C || i[0] === y));
|
|
136
136
|
}
|
|
137
137
|
function fu(i, b, w) {
|
|
138
|
-
var
|
|
139
|
-
return i.displayName || (
|
|
138
|
+
var $ = b.displayName || b.name || "";
|
|
139
|
+
return i.displayName || ($ !== "" ? w + "(" + $ + ")" : w);
|
|
140
140
|
}
|
|
141
141
|
function k(i) {
|
|
142
142
|
return i.displayName || "Context";
|
|
@@ -144,7 +144,7 @@ function c0() {
|
|
|
144
144
|
function E(i) {
|
|
145
145
|
if (i == null)
|
|
146
146
|
return null;
|
|
147
|
-
if (typeof i.tag == "number" &&
|
|
147
|
+
if (typeof i.tag == "number" && m("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof i == "function")
|
|
148
148
|
return i.displayName || i.name || null;
|
|
149
149
|
if (typeof i == "string")
|
|
150
150
|
return i;
|
|
@@ -176,8 +176,8 @@ function c0() {
|
|
|
176
176
|
return E(i.type);
|
|
177
177
|
case C:
|
|
178
178
|
return E(i._render);
|
|
179
|
-
case
|
|
180
|
-
var
|
|
179
|
+
case v: {
|
|
180
|
+
var $ = i, G = $._payload, K = $._init;
|
|
181
181
|
try {
|
|
182
182
|
return E(K(G));
|
|
183
183
|
} catch {
|
|
@@ -246,42 +246,42 @@ function c0() {
|
|
|
246
246
|
})
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
h < 0 &&
|
|
249
|
+
h < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
var
|
|
252
|
+
var Cu = q.ReactCurrentDispatcher, _u;
|
|
253
253
|
function Bu(i, b, w) {
|
|
254
254
|
{
|
|
255
255
|
if (_u === void 0)
|
|
256
256
|
try {
|
|
257
257
|
throw Error();
|
|
258
258
|
} catch (G) {
|
|
259
|
-
var
|
|
260
|
-
_u =
|
|
259
|
+
var $ = G.stack.trim().match(/\n( *(at )?)/);
|
|
260
|
+
_u = $ && $[1] || "";
|
|
261
261
|
}
|
|
262
262
|
return `
|
|
263
263
|
` + _u + i;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
var ru = !1,
|
|
266
|
+
var ru = !1, ou;
|
|
267
267
|
{
|
|
268
268
|
var Pu = typeof WeakMap == "function" ? WeakMap : Map;
|
|
269
|
-
|
|
269
|
+
ou = new Pu();
|
|
270
270
|
}
|
|
271
271
|
function Iu(i, b) {
|
|
272
272
|
if (!i || ru)
|
|
273
273
|
return "";
|
|
274
274
|
{
|
|
275
|
-
var w =
|
|
275
|
+
var w = ou.get(i);
|
|
276
276
|
if (w !== void 0)
|
|
277
277
|
return w;
|
|
278
278
|
}
|
|
279
|
-
var
|
|
279
|
+
var $;
|
|
280
280
|
ru = !0;
|
|
281
281
|
var G = Error.prepareStackTrace;
|
|
282
282
|
Error.prepareStackTrace = void 0;
|
|
283
283
|
var K;
|
|
284
|
-
K =
|
|
284
|
+
K = Cu.current, Cu.current = null, Q();
|
|
285
285
|
try {
|
|
286
286
|
if (b) {
|
|
287
287
|
var Y = function() {
|
|
@@ -294,50 +294,50 @@ function c0() {
|
|
|
294
294
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
295
295
|
try {
|
|
296
296
|
Reflect.construct(Y, []);
|
|
297
|
-
} catch (
|
|
298
|
-
|
|
297
|
+
} catch (Lu) {
|
|
298
|
+
$ = Lu;
|
|
299
299
|
}
|
|
300
300
|
Reflect.construct(i, [], Y);
|
|
301
301
|
} else {
|
|
302
302
|
try {
|
|
303
303
|
Y.call();
|
|
304
|
-
} catch (
|
|
305
|
-
|
|
304
|
+
} catch (Lu) {
|
|
305
|
+
$ = Lu;
|
|
306
306
|
}
|
|
307
307
|
i.call(Y.prototype);
|
|
308
308
|
}
|
|
309
309
|
} else {
|
|
310
310
|
try {
|
|
311
311
|
throw Error();
|
|
312
|
-
} catch (
|
|
313
|
-
|
|
312
|
+
} catch (Lu) {
|
|
313
|
+
$ = Lu;
|
|
314
314
|
}
|
|
315
315
|
i();
|
|
316
316
|
}
|
|
317
|
-
} catch (
|
|
318
|
-
if (
|
|
319
|
-
for (var H =
|
|
320
|
-
`), bu =
|
|
321
|
-
`), nu = H.length - 1,
|
|
322
|
-
|
|
323
|
-
for (; nu >= 1 &&
|
|
324
|
-
if (H[nu] !== bu[
|
|
325
|
-
if (nu !== 1 ||
|
|
317
|
+
} catch (Lu) {
|
|
318
|
+
if (Lu && $ && typeof Lu.stack == "string") {
|
|
319
|
+
for (var H = Lu.stack.split(`
|
|
320
|
+
`), bu = $.stack.split(`
|
|
321
|
+
`), nu = H.length - 1, au = bu.length - 1; nu >= 1 && au >= 0 && H[nu] !== bu[au]; )
|
|
322
|
+
au--;
|
|
323
|
+
for (; nu >= 1 && au >= 0; nu--, au--)
|
|
324
|
+
if (H[nu] !== bu[au]) {
|
|
325
|
+
if (nu !== 1 || au !== 1)
|
|
326
326
|
do
|
|
327
|
-
if (nu--,
|
|
328
|
-
var
|
|
327
|
+
if (nu--, au--, au < 0 || H[nu] !== bu[au]) {
|
|
328
|
+
var $u = `
|
|
329
329
|
` + H[nu].replace(" at new ", " at ");
|
|
330
|
-
return typeof i == "function" &&
|
|
330
|
+
return typeof i == "function" && ou.set(i, $u), $u;
|
|
331
331
|
}
|
|
332
|
-
while (nu >= 1 &&
|
|
332
|
+
while (nu >= 1 && au >= 0);
|
|
333
333
|
break;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
} finally {
|
|
337
|
-
ru = !1,
|
|
337
|
+
ru = !1, Cu.current = K, tu(), Error.prepareStackTrace = G;
|
|
338
338
|
}
|
|
339
|
-
var
|
|
340
|
-
return typeof i == "function" &&
|
|
339
|
+
var DD = i ? i.displayName || i.name : "", Tf = DD ? Bu(DD) : "";
|
|
340
|
+
return typeof i == "function" && ou.set(i, Tf), Tf;
|
|
341
341
|
}
|
|
342
342
|
function S(i, b, w) {
|
|
343
343
|
return Iu(i, !1);
|
|
@@ -346,7 +346,7 @@ function c0() {
|
|
|
346
346
|
var b = i.prototype;
|
|
347
347
|
return !!(b && b.isReactComponent);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function cu(i, b, w) {
|
|
350
350
|
if (i == null)
|
|
351
351
|
return "";
|
|
352
352
|
if (typeof i == "function")
|
|
@@ -364,28 +364,28 @@ function c0() {
|
|
|
364
364
|
case o:
|
|
365
365
|
return S(i.render);
|
|
366
366
|
case j:
|
|
367
|
-
return
|
|
367
|
+
return cu(i.type, b, w);
|
|
368
368
|
case C:
|
|
369
369
|
return S(i._render);
|
|
370
|
-
case
|
|
371
|
-
var
|
|
370
|
+
case v: {
|
|
371
|
+
var $ = i, G = $._payload, K = $._init;
|
|
372
372
|
try {
|
|
373
|
-
return
|
|
373
|
+
return cu(K(G), b, w);
|
|
374
374
|
} catch {
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
return "";
|
|
379
379
|
}
|
|
380
|
-
var lu = {},
|
|
380
|
+
var lu = {}, mu = q.ReactDebugCurrentFrame;
|
|
381
381
|
function Uu(i) {
|
|
382
382
|
if (i) {
|
|
383
|
-
var b = i._owner, w =
|
|
384
|
-
|
|
383
|
+
var b = i._owner, w = cu(i.type, i._source, b ? b.type : null);
|
|
384
|
+
mu.setExtraStackFrame(w);
|
|
385
385
|
} else
|
|
386
|
-
|
|
386
|
+
mu.setExtraStackFrame(null);
|
|
387
387
|
}
|
|
388
|
-
function Y1(i, b, w,
|
|
388
|
+
function Y1(i, b, w, $, G) {
|
|
389
389
|
{
|
|
390
390
|
var K = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
391
391
|
for (var Y in i)
|
|
@@ -393,14 +393,14 @@ function c0() {
|
|
|
393
393
|
var H = void 0;
|
|
394
394
|
try {
|
|
395
395
|
if (typeof i[Y] != "function") {
|
|
396
|
-
var bu = Error((
|
|
396
|
+
var bu = Error(($ || "React class") + ": " + w + " type `" + Y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[Y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
397
397
|
throw bu.name = "Invariant Violation", bu;
|
|
398
398
|
}
|
|
399
|
-
H = i[Y](b, Y,
|
|
399
|
+
H = i[Y](b, Y, $, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
400
400
|
} catch (nu) {
|
|
401
401
|
H = nu;
|
|
402
402
|
}
|
|
403
|
-
H && !(H instanceof Error) && (Uu(G),
|
|
403
|
+
H && !(H instanceof Error) && (Uu(G), m("%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).", $ || "React class", w, Y, typeof H), Uu(null)), H instanceof Error && !(H.message in lu) && (lu[H.message] = !0, Uu(G), m("Failed %s type: %s", w, H.message), Uu(null));
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
}
|
|
@@ -432,7 +432,7 @@ function c0() {
|
|
|
432
432
|
function Z1(i, b) {
|
|
433
433
|
{
|
|
434
434
|
var w = function() {
|
|
435
|
-
yf || (yf = !0,
|
|
435
|
+
yf || (yf = !0, m("%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)", b));
|
|
436
436
|
};
|
|
437
437
|
w.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
438
438
|
get: w,
|
|
@@ -443,7 +443,7 @@ function c0() {
|
|
|
443
443
|
function Q1(i, b) {
|
|
444
444
|
{
|
|
445
445
|
var w = function() {
|
|
446
|
-
vf || (vf = !0,
|
|
446
|
+
vf || (vf = !0, m("%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)", b));
|
|
447
447
|
};
|
|
448
448
|
w.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
|
449
449
|
get: w,
|
|
@@ -451,7 +451,7 @@ function c0() {
|
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
var u0 = function(i, b, w,
|
|
454
|
+
var u0 = function(i, b, w, $, G, K, Y) {
|
|
455
455
|
var H = {
|
|
456
456
|
// This tag allows us to uniquely identify this as a React Element
|
|
457
457
|
$$typeof: t,
|
|
@@ -472,7 +472,7 @@ function c0() {
|
|
|
472
472
|
configurable: !1,
|
|
473
473
|
enumerable: !1,
|
|
474
474
|
writable: !1,
|
|
475
|
-
value:
|
|
475
|
+
value: $
|
|
476
476
|
}), Object.defineProperty(H, "_source", {
|
|
477
477
|
configurable: !1,
|
|
478
478
|
enumerable: !1,
|
|
@@ -480,7 +480,7 @@ function c0() {
|
|
|
480
480
|
value: G
|
|
481
481
|
}), Object.freeze && (Object.freeze(H.props), Object.freeze(H)), H;
|
|
482
482
|
};
|
|
483
|
-
function D0(i, b, w,
|
|
483
|
+
function D0(i, b, w, $, G) {
|
|
484
484
|
{
|
|
485
485
|
var K, Y = {}, H = null, bu = null;
|
|
486
486
|
w !== void 0 && (H = "" + w), G1(b) && (H = "" + b.key), J1(b) && (bu = b.ref, X1(b, G));
|
|
@@ -492,16 +492,16 @@ function c0() {
|
|
|
492
492
|
Y[K] === void 0 && (Y[K] = nu[K]);
|
|
493
493
|
}
|
|
494
494
|
if (H || bu) {
|
|
495
|
-
var
|
|
496
|
-
H && Z1(Y,
|
|
495
|
+
var au = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
|
496
|
+
H && Z1(Y, au), bu && Q1(Y, au);
|
|
497
497
|
}
|
|
498
|
-
return u0(i, H, bu, G,
|
|
498
|
+
return u0(i, H, bu, G, $, _f.current, Y);
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
var ND = q.ReactCurrentOwner, wf = q.ReactDebugCurrentFrame;
|
|
502
|
-
function
|
|
502
|
+
function uD(i) {
|
|
503
503
|
if (i) {
|
|
504
|
-
var b = i._owner, w =
|
|
504
|
+
var b = i._owner, w = cu(i.type, i._source, b ? b.type : null);
|
|
505
505
|
wf.setExtraStackFrame(w);
|
|
506
506
|
} else
|
|
507
507
|
wf.setExtraStackFrame(null);
|
|
@@ -548,8 +548,8 @@ Check the top-level render call using <` + w + ">.");
|
|
|
548
548
|
if (xf[w])
|
|
549
549
|
return;
|
|
550
550
|
xf[w] = !0;
|
|
551
|
-
var
|
|
552
|
-
i && i._owner && i._owner !== ND.current && (
|
|
551
|
+
var $ = "";
|
|
552
|
+
i && i._owner && i._owner !== ND.current && ($ = " It was passed a child from " + E(i._owner.type) + "."), uD(i), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, $), uD(null);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
function jf(i, b) {
|
|
@@ -558,8 +558,8 @@ Check the top-level render call using <` + w + ">.");
|
|
|
558
558
|
return;
|
|
559
559
|
if (Array.isArray(i))
|
|
560
560
|
for (var w = 0; w < i.length; w++) {
|
|
561
|
-
var
|
|
562
|
-
RD(
|
|
561
|
+
var $ = i[w];
|
|
562
|
+
RD($) && kf($, b);
|
|
563
563
|
}
|
|
564
564
|
else if (RD(i))
|
|
565
565
|
i._store && (i._store.validated = !0);
|
|
@@ -586,29 +586,29 @@ Check the top-level render call using <` + w + ">.");
|
|
|
586
586
|
else
|
|
587
587
|
return;
|
|
588
588
|
if (w) {
|
|
589
|
-
var
|
|
590
|
-
Y1(w, i.props, "prop",
|
|
589
|
+
var $ = E(b);
|
|
590
|
+
Y1(w, i.props, "prop", $, i);
|
|
591
591
|
} else if (b.PropTypes !== void 0 && !OD) {
|
|
592
592
|
OD = !0;
|
|
593
593
|
var G = E(b);
|
|
594
|
-
|
|
594
|
+
m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", G || "Unknown");
|
|
595
595
|
}
|
|
596
|
-
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved &&
|
|
596
|
+
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
function n0(i) {
|
|
600
600
|
{
|
|
601
601
|
for (var b = Object.keys(i.props), w = 0; w < b.length; w++) {
|
|
602
|
-
var
|
|
603
|
-
if (
|
|
604
|
-
|
|
602
|
+
var $ = b[w];
|
|
603
|
+
if ($ !== "children" && $ !== "key") {
|
|
604
|
+
uD(i), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), uD(null);
|
|
605
605
|
break;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
i.ref !== null && (
|
|
608
|
+
i.ref !== null && (uD(i), m("Invalid attribute `ref` supplied to `React.Fragment`."), uD(null));
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
function Sf(i, b, w,
|
|
611
|
+
function Sf(i, b, w, $, G, K) {
|
|
612
612
|
{
|
|
613
613
|
var Y = hu(i);
|
|
614
614
|
if (!Y) {
|
|
@@ -617,25 +617,25 @@ Check the top-level render call using <` + w + ">.");
|
|
|
617
617
|
var bu = f0();
|
|
618
618
|
bu ? H += bu : H += Af();
|
|
619
619
|
var nu;
|
|
620
|
-
i === null ? nu = "null" : Array.isArray(i) ? nu = "array" : i !== void 0 && i.$$typeof === t ? (nu = "<" + (E(i.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : nu = typeof i,
|
|
620
|
+
i === null ? nu = "null" : Array.isArray(i) ? nu = "array" : i !== void 0 && i.$$typeof === t ? (nu = "<" + (E(i.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : nu = typeof i, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", nu, H);
|
|
621
621
|
}
|
|
622
|
-
var
|
|
623
|
-
if (
|
|
624
|
-
return
|
|
622
|
+
var au = D0(i, b, w, G, K);
|
|
623
|
+
if (au == null)
|
|
624
|
+
return au;
|
|
625
625
|
if (Y) {
|
|
626
|
-
var
|
|
627
|
-
if (
|
|
628
|
-
if (
|
|
629
|
-
if (Array.isArray(
|
|
630
|
-
for (var
|
|
631
|
-
jf(
|
|
632
|
-
Object.freeze && Object.freeze(
|
|
626
|
+
var $u = b.children;
|
|
627
|
+
if ($u !== void 0)
|
|
628
|
+
if ($)
|
|
629
|
+
if (Array.isArray($u)) {
|
|
630
|
+
for (var DD = 0; DD < $u.length; DD++)
|
|
631
|
+
jf($u[DD], i);
|
|
632
|
+
Object.freeze && Object.freeze($u);
|
|
633
633
|
} else
|
|
634
|
-
|
|
634
|
+
m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
635
635
|
else
|
|
636
|
-
jf(
|
|
636
|
+
jf($u, i);
|
|
637
637
|
}
|
|
638
|
-
return i === u.Fragment ? n0(
|
|
638
|
+
return i === u.Fragment ? n0(au) : t0(au), au;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
function r0(i, b, w) {
|
|
@@ -656,9 +656,9 @@ const Gf = qu(void 0), Xf = ({
|
|
|
656
656
|
children: u,
|
|
657
657
|
channelName: D
|
|
658
658
|
}) => {
|
|
659
|
-
const f =
|
|
659
|
+
const f = gu(
|
|
660
660
|
new BroadcastChannel(D)
|
|
661
|
-
), e =
|
|
661
|
+
), e = gu({});
|
|
662
662
|
Z(() => {
|
|
663
663
|
const r = ({ data: s }) => {
|
|
664
664
|
e.current[s.event].forEach((F) => F(s));
|
|
@@ -699,7 +699,7 @@ const Gf = qu(void 0), Xf = ({
|
|
|
699
699
|
D(...u);
|
|
700
700
|
}, [D, ...u]);
|
|
701
701
|
};
|
|
702
|
-
var WD = /* @__PURE__ */ ((u) => (u.message = "message", u.delivery = "delivery", u.read = "read", u.typing = "typing", u.follow = "follow", u.echo = "echo", u.unknown = "", u))(WD || {}), uu = /* @__PURE__ */ ((u) => (u.sent = "sent", u.received = "received", u))(uu || {}), Zf = /* @__PURE__ */ ((u) => (u.text = "text", u.location = "location", u))(Zf || {}), Au = /* @__PURE__ */ ((u) => (u.text = "text", u.quick_reply = "quick_reply", u.postback = "postback", u.location = "location", u.file = "file", u.notify = "notify", u))(Au || {}), YD = /* @__PURE__ */ ((u) => (u.text = "text", u.buttons = "buttons", u.quick_replies = "quick_replies", u.file = "file", u.list = "list", u.carousel = "carousel", u))(YD || {}), iD = /* @__PURE__ */ ((u) => (u[u.sent = 0] = "sent", u[u.sending = 1] = "sending", u[u.uploading = 2] = "uploading", u))(iD || {}),
|
|
702
|
+
var WD = /* @__PURE__ */ ((u) => (u.message = "message", u.delivery = "delivery", u.read = "read", u.typing = "typing", u.follow = "follow", u.echo = "echo", u.unknown = "", u))(WD || {}), uu = /* @__PURE__ */ ((u) => (u.sent = "sent", u.received = "received", u))(uu || {}), Zf = /* @__PURE__ */ ((u) => (u.text = "text", u.location = "location", u))(Zf || {}), Au = /* @__PURE__ */ ((u) => (u.text = "text", u.quick_reply = "quick_reply", u.postback = "postback", u.location = "location", u.file = "file", u.notify = "notify", u))(Au || {}), YD = /* @__PURE__ */ ((u) => (u.text = "text", u.buttons = "buttons", u.quick_replies = "quick_replies", u.file = "file", u.list = "list", u.carousel = "carousel", u))(YD || {}), iD = /* @__PURE__ */ ((u) => (u[u.sent = 0] = "sent", u[u.sending = 1] = "sending", u[u.uploading = 2] = "uploading", u))(iD || {}), eD = /* @__PURE__ */ ((u) => (u[u.disconnected = 0] = "disconnected", u[u.wantToConnect = 1] = "wantToConnect", u[u.tryingToConnect = 2] = "tryingToConnect", u[u.connected = 3] = "connected", u))(eD || {}), aD = {};
|
|
703
703
|
const Qf = {
|
|
704
704
|
apiUrl: aD.REACT_APP_WIDGET_API_URL || "http://localhost:4000",
|
|
705
705
|
channel: aD.REACT_APP_WIDGET_CHANNEL || "console-channel",
|
|
@@ -708,7 +708,7 @@ const Qf = {
|
|
|
708
708
|
// 20 MB in bytes
|
|
709
709
|
ownerId: aD.REACT_APP_WIDGET_OWNER_ID || "68342cec1e3cef0065f1b563"
|
|
710
710
|
}, u1 = qu(Qf), D1 = ({ children: u, ...D }) => {
|
|
711
|
-
const f =
|
|
711
|
+
const f = gu({
|
|
712
712
|
...Qf,
|
|
713
713
|
...D
|
|
714
714
|
});
|
|
@@ -730,6 +730,9 @@ const Qf = {
|
|
|
730
730
|
connection_lost: "Connection Lost",
|
|
731
731
|
back: "Back"
|
|
732
732
|
}, B0 = {
|
|
733
|
+
help_prompt: "We’re here if you need help",
|
|
734
|
+
dismiss: "Dismiss"
|
|
735
|
+
}, m0 = {
|
|
733
736
|
get_started: "Start Chat",
|
|
734
737
|
file_message: {
|
|
735
738
|
browser_audio_unsupport: "Browser does not support the audio element.",
|
|
@@ -741,19 +744,20 @@ const Qf = {
|
|
|
741
744
|
}, g0 = {
|
|
742
745
|
user_subscription: b0,
|
|
743
746
|
settings: p0,
|
|
744
|
-
|
|
745
|
-
|
|
747
|
+
launcher: B0,
|
|
748
|
+
messages: m0
|
|
749
|
+
}, _0 = {
|
|
746
750
|
get_started: "Commencer",
|
|
747
751
|
first_name: "Prénom",
|
|
748
752
|
last_name: "Nom",
|
|
749
753
|
phone: "Numéro de Téléphone",
|
|
750
754
|
email: "Adresse Email"
|
|
751
|
-
},
|
|
755
|
+
}, y0 = {
|
|
752
756
|
greeting: "Bienvenue !",
|
|
753
757
|
placeholder: "Écrivez quelque chose...",
|
|
754
758
|
connection_lost: "Connexion perdue",
|
|
755
759
|
back: "Retour"
|
|
756
|
-
},
|
|
760
|
+
}, v0 = {
|
|
757
761
|
get_started: "Démarrer",
|
|
758
762
|
file_message: {
|
|
759
763
|
browser_audio_unsupport: "Le navigateur ne prend pas en charge l'élément audio.",
|
|
@@ -762,11 +766,11 @@ const Qf = {
|
|
|
762
766
|
unsupported_file_type: "Ce type de fichier n'est pas pris en charge.",
|
|
763
767
|
unsupported_file_size: "Cette taille de fichier n'est pas prise en charge."
|
|
764
768
|
}
|
|
765
|
-
},
|
|
766
|
-
user_subscription:
|
|
767
|
-
settings:
|
|
768
|
-
messages:
|
|
769
|
-
}, Pf = { en: g0, fr:
|
|
769
|
+
}, w0 = {
|
|
770
|
+
user_subscription: _0,
|
|
771
|
+
settings: y0,
|
|
772
|
+
messages: v0
|
|
773
|
+
}, Pf = { en: g0, fr: w0 }, f1 = qu(
|
|
770
774
|
void 0
|
|
771
775
|
), e1 = ({
|
|
772
776
|
children: u
|
|
@@ -781,36 +785,36 @@ const Qf = {
|
|
|
781
785
|
children: u
|
|
782
786
|
}
|
|
783
787
|
);
|
|
784
|
-
},
|
|
788
|
+
}, A0 = () => {
|
|
785
789
|
const u = Hu(f1);
|
|
786
790
|
if (!u)
|
|
787
791
|
throw new Error(
|
|
788
792
|
"useTranslationContext must be used within a TranslationProvider"
|
|
789
793
|
);
|
|
790
794
|
return u;
|
|
791
|
-
},
|
|
795
|
+
}, x0 = (u, D) => D.split(".").reduce((f, e) => {
|
|
792
796
|
if (typeof f == "object" && f !== null)
|
|
793
797
|
return f[e];
|
|
794
798
|
}, u), zu = () => {
|
|
795
|
-
const { translations: u, language: D } =
|
|
799
|
+
const { translations: u, language: D } = A0();
|
|
796
800
|
return { t: Mu(
|
|
797
|
-
(e, t = {}) => (
|
|
801
|
+
(e, t = {}) => (x0(u[D], e) || e).replace(
|
|
798
802
|
/{(\w+)}/g,
|
|
799
803
|
(r, s) => t[s] || `{${s}}`
|
|
800
804
|
),
|
|
801
805
|
[D, u]
|
|
802
806
|
) };
|
|
803
807
|
};
|
|
804
|
-
function
|
|
808
|
+
function k0(u, D) {
|
|
805
809
|
if (typeof D > "u")
|
|
806
810
|
throw new Error("Value cannot be undefined");
|
|
807
811
|
return sessionStorage.setItem(u, JSON.stringify(D)), !0;
|
|
808
812
|
}
|
|
809
|
-
function
|
|
813
|
+
function j0(u) {
|
|
810
814
|
const D = sessionStorage.getItem(u);
|
|
811
815
|
return D === null ? null : JSON.parse(D);
|
|
812
816
|
}
|
|
813
|
-
const If = { setItem:
|
|
817
|
+
const If = { setItem: k0, getItem: j0 }, Tu = /* @__PURE__ */ Object.create(null);
|
|
814
818
|
Tu.open = "0";
|
|
815
819
|
Tu.close = "1";
|
|
816
820
|
Tu.ping = "2";
|
|
@@ -822,37 +826,37 @@ const pD = /* @__PURE__ */ Object.create(null);
|
|
|
822
826
|
Object.keys(Tu).forEach((u) => {
|
|
823
827
|
pD[Tu[u]] = u;
|
|
824
828
|
});
|
|
825
|
-
const KD = { type: "error", data: "parser error" }, t1 = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", n1 = typeof ArrayBuffer == "function", r1 = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u && u.buffer instanceof ArrayBuffer, Ff = ({ type: u, data: D }, f, e) => t1 && D instanceof Blob ? f ? e(D) :
|
|
829
|
+
const KD = { type: "error", data: "parser error" }, t1 = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", n1 = typeof ArrayBuffer == "function", r1 = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u && u.buffer instanceof ArrayBuffer, Ff = ({ type: u, data: D }, f, e) => t1 && D instanceof Blob ? f ? e(D) : $f(D, e) : n1 && (D instanceof ArrayBuffer || r1(D)) ? f ? e(D) : $f(new Blob([D]), e) : e(Tu[u] + (D || "")), $f = (u, D) => {
|
|
826
830
|
const f = new FileReader();
|
|
827
831
|
return f.onload = function() {
|
|
828
832
|
const e = f.result.split(",")[1];
|
|
829
833
|
D("b" + (e || ""));
|
|
830
834
|
}, f.readAsDataURL(u);
|
|
831
835
|
};
|
|
832
|
-
function
|
|
836
|
+
function Lf(u) {
|
|
833
837
|
return u instanceof Uint8Array ? u : u instanceof ArrayBuffer ? new Uint8Array(u) : new Uint8Array(u.buffer, u.byteOffset, u.byteLength);
|
|
834
838
|
}
|
|
835
|
-
let
|
|
836
|
-
function
|
|
839
|
+
let $D;
|
|
840
|
+
function S0(u, D) {
|
|
837
841
|
if (t1 && u.data instanceof Blob)
|
|
838
|
-
return u.data.arrayBuffer().then(
|
|
842
|
+
return u.data.arrayBuffer().then(Lf).then(D);
|
|
839
843
|
if (n1 && (u.data instanceof ArrayBuffer || r1(u.data)))
|
|
840
|
-
return D(
|
|
844
|
+
return D(Lf(u.data));
|
|
841
845
|
Ff(u, !1, (f) => {
|
|
842
|
-
|
|
846
|
+
$D || ($D = new TextEncoder()), D($D.encode(f));
|
|
843
847
|
});
|
|
844
848
|
}
|
|
845
849
|
const Mf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", FD = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
846
850
|
for (let u = 0; u < Mf.length; u++)
|
|
847
851
|
FD[Mf.charCodeAt(u)] = u;
|
|
848
|
-
const
|
|
852
|
+
const T0 = (u) => {
|
|
849
853
|
let D = u.length * 0.75, f = u.length, e, t = 0, n, r, s, F;
|
|
850
854
|
u[u.length - 1] === "=" && (D--, u[u.length - 2] === "=" && D--);
|
|
851
855
|
const d = new ArrayBuffer(D), o = new Uint8Array(d);
|
|
852
856
|
for (e = 0; e < f; e += 4)
|
|
853
857
|
n = FD[u.charCodeAt(e)], r = FD[u.charCodeAt(e + 1)], s = FD[u.charCodeAt(e + 2)], F = FD[u.charCodeAt(e + 3)], o[t++] = n << 2 | r >> 4, o[t++] = (r & 15) << 4 | s >> 2, o[t++] = (s & 3) << 6 | F & 63;
|
|
854
858
|
return d;
|
|
855
|
-
},
|
|
859
|
+
}, N0 = typeof ArrayBuffer == "function", of = (u, D) => {
|
|
856
860
|
if (typeof u != "string")
|
|
857
861
|
return {
|
|
858
862
|
type: "message",
|
|
@@ -861,16 +865,16 @@ const S0 = (u) => {
|
|
|
861
865
|
const f = u.charAt(0);
|
|
862
866
|
return f === "b" ? {
|
|
863
867
|
type: "message",
|
|
864
|
-
data:
|
|
868
|
+
data: O0(u.substring(1), D)
|
|
865
869
|
} : pD[f] ? u.length > 1 ? {
|
|
866
870
|
type: pD[f],
|
|
867
871
|
data: u.substring(1)
|
|
868
872
|
} : {
|
|
869
873
|
type: pD[f]
|
|
870
874
|
} : KD;
|
|
871
|
-
},
|
|
872
|
-
if (
|
|
873
|
-
const f =
|
|
875
|
+
}, O0 = (u, D) => {
|
|
876
|
+
if (N0) {
|
|
877
|
+
const f = T0(u);
|
|
874
878
|
return a1(f, D);
|
|
875
879
|
} else
|
|
876
880
|
return { base64: !0, data: u };
|
|
@@ -882,7 +886,7 @@ const S0 = (u) => {
|
|
|
882
886
|
default:
|
|
883
887
|
return u instanceof ArrayBuffer ? u : u.buffer;
|
|
884
888
|
}
|
|
885
|
-
}, s1 = "",
|
|
889
|
+
}, s1 = "", R0 = (u, D) => {
|
|
886
890
|
const f = u.length, e = new Array(f);
|
|
887
891
|
let t = 0;
|
|
888
892
|
u.forEach((n, r) => {
|
|
@@ -890,7 +894,7 @@ const S0 = (u) => {
|
|
|
890
894
|
e[r] = s, ++t === f && D(e.join(s1));
|
|
891
895
|
});
|
|
892
896
|
});
|
|
893
|
-
},
|
|
897
|
+
}, P0 = (u, D) => {
|
|
894
898
|
const f = u.split(s1), e = [];
|
|
895
899
|
for (let t = 0; t < f.length; t++) {
|
|
896
900
|
const n = of(f[t], D);
|
|
@@ -899,10 +903,10 @@ const S0 = (u) => {
|
|
|
899
903
|
}
|
|
900
904
|
return e;
|
|
901
905
|
};
|
|
902
|
-
function
|
|
906
|
+
function I0() {
|
|
903
907
|
return new TransformStream({
|
|
904
908
|
transform(u, D) {
|
|
905
|
-
|
|
909
|
+
S0(u, (f) => {
|
|
906
910
|
const e = f.length;
|
|
907
911
|
let t;
|
|
908
912
|
if (e < 126)
|
|
@@ -921,7 +925,7 @@ function P0() {
|
|
|
921
925
|
}
|
|
922
926
|
});
|
|
923
927
|
}
|
|
924
|
-
let
|
|
928
|
+
let LD;
|
|
925
929
|
function ED(u) {
|
|
926
930
|
return u.reduce((D, f) => D + f.length, 0);
|
|
927
931
|
}
|
|
@@ -934,8 +938,8 @@ function hD(u, D) {
|
|
|
934
938
|
f[t] = u[0][e++], e === u[0].length && (u.shift(), e = 0);
|
|
935
939
|
return u.length && e < u[0].length && (u[0] = u[0].slice(e)), f;
|
|
936
940
|
}
|
|
937
|
-
function
|
|
938
|
-
|
|
941
|
+
function $0(u, D) {
|
|
942
|
+
LD || (LD = new TextDecoder());
|
|
939
943
|
const f = [];
|
|
940
944
|
let e = 0, t = -1, n = !1;
|
|
941
945
|
return new TransformStream({
|
|
@@ -964,7 +968,7 @@ function I0(u, D) {
|
|
|
964
968
|
if (ED(f) < t)
|
|
965
969
|
break;
|
|
966
970
|
const F = hD(f, t);
|
|
967
|
-
s.enqueue(of(n ? F :
|
|
971
|
+
s.enqueue(of(n ? F : LD.decode(F), D)), e = 0;
|
|
968
972
|
}
|
|
969
973
|
if (t === 0 || t > u) {
|
|
970
974
|
s.enqueue(KD);
|
|
@@ -975,24 +979,24 @@ function I0(u, D) {
|
|
|
975
979
|
});
|
|
976
980
|
}
|
|
977
981
|
const F1 = 4;
|
|
978
|
-
function
|
|
982
|
+
function su(u) {
|
|
979
983
|
if (u) return L0(u);
|
|
980
984
|
}
|
|
981
985
|
function L0(u) {
|
|
982
|
-
for (var D in
|
|
983
|
-
u[D] =
|
|
986
|
+
for (var D in su.prototype)
|
|
987
|
+
u[D] = su.prototype[D];
|
|
984
988
|
return u;
|
|
985
989
|
}
|
|
986
|
-
|
|
990
|
+
su.prototype.on = su.prototype.addEventListener = function(u, D) {
|
|
987
991
|
return this._callbacks = this._callbacks || {}, (this._callbacks["$" + u] = this._callbacks["$" + u] || []).push(D), this;
|
|
988
992
|
};
|
|
989
|
-
|
|
993
|
+
su.prototype.once = function(u, D) {
|
|
990
994
|
function f() {
|
|
991
995
|
this.off(u, f), D.apply(this, arguments);
|
|
992
996
|
}
|
|
993
997
|
return f.fn = D, this.on(u, f), this;
|
|
994
998
|
};
|
|
995
|
-
|
|
999
|
+
su.prototype.off = su.prototype.removeListener = su.prototype.removeAllListeners = su.prototype.removeEventListener = function(u, D) {
|
|
996
1000
|
if (this._callbacks = this._callbacks || {}, arguments.length == 0)
|
|
997
1001
|
return this._callbacks = {}, this;
|
|
998
1002
|
var f = this._callbacks["$" + u];
|
|
@@ -1006,7 +1010,7 @@ Fu.prototype.off = Fu.prototype.removeListener = Fu.prototype.removeAllListeners
|
|
|
1006
1010
|
}
|
|
1007
1011
|
return f.length === 0 && delete this._callbacks["$" + u], this;
|
|
1008
1012
|
};
|
|
1009
|
-
|
|
1013
|
+
su.prototype.emit = function(u) {
|
|
1010
1014
|
this._callbacks = this._callbacks || {};
|
|
1011
1015
|
for (var D = new Array(arguments.length - 1), f = this._callbacks["$" + u], e = 1; e < arguments.length; e++)
|
|
1012
1016
|
D[e - 1] = arguments[e];
|
|
@@ -1017,26 +1021,26 @@ Fu.prototype.emit = function(u) {
|
|
|
1017
1021
|
}
|
|
1018
1022
|
return this;
|
|
1019
1023
|
};
|
|
1020
|
-
|
|
1021
|
-
|
|
1024
|
+
su.prototype.emitReserved = su.prototype.emit;
|
|
1025
|
+
su.prototype.listeners = function(u) {
|
|
1022
1026
|
return this._callbacks = this._callbacks || {}, this._callbacks["$" + u] || [];
|
|
1023
1027
|
};
|
|
1024
|
-
|
|
1028
|
+
su.prototype.hasListeners = function(u) {
|
|
1025
1029
|
return !!this.listeners(u).length;
|
|
1026
1030
|
};
|
|
1027
|
-
const AD = typeof Promise == "function" && typeof Promise.resolve == "function" ? (D) => Promise.resolve().then(D) : (D, f) => f(D, 0), vu = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(),
|
|
1031
|
+
const AD = typeof Promise == "function" && typeof Promise.resolve == "function" ? (D) => Promise.resolve().then(D) : (D, f) => f(D, 0), vu = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), M0 = "arraybuffer";
|
|
1028
1032
|
function i1(u, ...D) {
|
|
1029
1033
|
return D.reduce((f, e) => (u.hasOwnProperty(e) && (f[e] = u[e]), f), {});
|
|
1030
1034
|
}
|
|
1031
|
-
const
|
|
1035
|
+
const q0 = vu.setTimeout, z0 = vu.clearTimeout;
|
|
1032
1036
|
function xD(u, D) {
|
|
1033
|
-
D.useNativeTimers ? (u.setTimeoutFn =
|
|
1034
|
-
}
|
|
1035
|
-
const z0 = 1.33;
|
|
1036
|
-
function U0(u) {
|
|
1037
|
-
return typeof u == "string" ? V0(u) : Math.ceil((u.byteLength || u.size) * z0);
|
|
1037
|
+
D.useNativeTimers ? (u.setTimeoutFn = q0.bind(vu), u.clearTimeoutFn = z0.bind(vu)) : (u.setTimeoutFn = vu.setTimeout.bind(vu), u.clearTimeoutFn = vu.clearTimeout.bind(vu));
|
|
1038
1038
|
}
|
|
1039
|
+
const U0 = 1.33;
|
|
1039
1040
|
function V0(u) {
|
|
1041
|
+
return typeof u == "string" ? H0(u) : Math.ceil((u.byteLength || u.size) * U0);
|
|
1042
|
+
}
|
|
1043
|
+
function H0(u) {
|
|
1040
1044
|
let D = 0, f = 0;
|
|
1041
1045
|
for (let e = 0, t = u.length; e < t; e++)
|
|
1042
1046
|
D = u.charCodeAt(e), D < 128 ? f += 1 : D < 2048 ? f += 2 : D < 55296 || D >= 57344 ? f += 3 : (e++, f += 4);
|
|
@@ -1045,13 +1049,13 @@ function V0(u) {
|
|
|
1045
1049
|
function o1() {
|
|
1046
1050
|
return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
|
|
1047
1051
|
}
|
|
1048
|
-
function
|
|
1052
|
+
function W0(u) {
|
|
1049
1053
|
let D = "";
|
|
1050
1054
|
for (let f in u)
|
|
1051
1055
|
u.hasOwnProperty(f) && (D.length && (D += "&"), D += encodeURIComponent(f) + "=" + encodeURIComponent(u[f]));
|
|
1052
1056
|
return D;
|
|
1053
1057
|
}
|
|
1054
|
-
function
|
|
1058
|
+
function Y0(u) {
|
|
1055
1059
|
let D = {}, f = u.split("&");
|
|
1056
1060
|
for (let e = 0, t = f.length; e < t; e++) {
|
|
1057
1061
|
let n = f[e].split("=");
|
|
@@ -1059,12 +1063,12 @@ function W0(u) {
|
|
|
1059
1063
|
}
|
|
1060
1064
|
return D;
|
|
1061
1065
|
}
|
|
1062
|
-
class
|
|
1066
|
+
class K0 extends Error {
|
|
1063
1067
|
constructor(D, f, e) {
|
|
1064
1068
|
super(D), this.description = f, this.context = e, this.type = "TransportError";
|
|
1065
1069
|
}
|
|
1066
1070
|
}
|
|
1067
|
-
class df extends
|
|
1071
|
+
class df extends su {
|
|
1068
1072
|
/**
|
|
1069
1073
|
* Transport abstract constructor.
|
|
1070
1074
|
*
|
|
@@ -1084,7 +1088,7 @@ class df extends Fu {
|
|
|
1084
1088
|
* @protected
|
|
1085
1089
|
*/
|
|
1086
1090
|
onError(D, f, e) {
|
|
1087
|
-
return super.emitReserved("error", new
|
|
1091
|
+
return super.emitReserved("error", new K0(D, f, e)), this;
|
|
1088
1092
|
}
|
|
1089
1093
|
/**
|
|
1090
1094
|
* Opens the transport.
|
|
@@ -1158,11 +1162,11 @@ class df extends Fu {
|
|
|
1158
1162
|
return this.opts.port && (this.opts.secure && +(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
|
|
1159
1163
|
}
|
|
1160
1164
|
_query(D) {
|
|
1161
|
-
const f =
|
|
1165
|
+
const f = W0(D);
|
|
1162
1166
|
return f.length ? "?" + f : "";
|
|
1163
1167
|
}
|
|
1164
1168
|
}
|
|
1165
|
-
class
|
|
1169
|
+
class J0 extends df {
|
|
1166
1170
|
constructor() {
|
|
1167
1171
|
super(...arguments), this._polling = !1;
|
|
1168
1172
|
}
|
|
@@ -1218,7 +1222,7 @@ class K0 extends df {
|
|
|
1218
1222
|
return this.onClose({ description: "transport closed by the server" }), !1;
|
|
1219
1223
|
this.onPacket(e);
|
|
1220
1224
|
};
|
|
1221
|
-
|
|
1225
|
+
P0(D, this.socket.binaryType).forEach(f), this.readyState !== "closed" && (this._polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this._poll());
|
|
1222
1226
|
}
|
|
1223
1227
|
/**
|
|
1224
1228
|
* For polling, send a close packet.
|
|
@@ -1238,7 +1242,7 @@ class K0 extends df {
|
|
|
1238
1242
|
* @protected
|
|
1239
1243
|
*/
|
|
1240
1244
|
write(D) {
|
|
1241
|
-
this.writable = !1,
|
|
1245
|
+
this.writable = !1, R0(D, (f) => {
|
|
1242
1246
|
this.doWrite(f, () => {
|
|
1243
1247
|
this.writable = !0, this.emitReserved("drain");
|
|
1244
1248
|
});
|
|
@@ -1259,10 +1263,10 @@ try {
|
|
|
1259
1263
|
d1 = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
1260
1264
|
} catch {
|
|
1261
1265
|
}
|
|
1262
|
-
const
|
|
1263
|
-
function
|
|
1266
|
+
const G0 = d1;
|
|
1267
|
+
function X0() {
|
|
1264
1268
|
}
|
|
1265
|
-
class
|
|
1269
|
+
class Z0 extends J0 {
|
|
1266
1270
|
/**
|
|
1267
1271
|
* XHR Polling constructor.
|
|
1268
1272
|
*
|
|
@@ -1304,7 +1308,7 @@ class X0 extends K0 {
|
|
|
1304
1308
|
}), this.pollXhr = D;
|
|
1305
1309
|
}
|
|
1306
1310
|
}
|
|
1307
|
-
class ju extends
|
|
1311
|
+
class ju extends su {
|
|
1308
1312
|
/**
|
|
1309
1313
|
* Request constructor
|
|
1310
1314
|
*
|
|
@@ -1375,7 +1379,7 @@ class ju extends Fu {
|
|
|
1375
1379
|
*/
|
|
1376
1380
|
_cleanup(D) {
|
|
1377
1381
|
if (!(typeof this._xhr > "u" || this._xhr === null)) {
|
|
1378
|
-
if (this._xhr.onreadystatechange =
|
|
1382
|
+
if (this._xhr.onreadystatechange = X0, D)
|
|
1379
1383
|
try {
|
|
1380
1384
|
this._xhr.abort();
|
|
1381
1385
|
} catch {
|
|
@@ -1415,17 +1419,17 @@ function qf() {
|
|
|
1415
1419
|
for (let u in ju.requests)
|
|
1416
1420
|
ju.requests.hasOwnProperty(u) && ju.requests[u].abort();
|
|
1417
1421
|
}
|
|
1418
|
-
const
|
|
1422
|
+
const Q0 = function() {
|
|
1419
1423
|
const u = C1({
|
|
1420
1424
|
xdomain: !1
|
|
1421
1425
|
});
|
|
1422
1426
|
return u && u.responseType !== null;
|
|
1423
1427
|
}();
|
|
1424
|
-
class
|
|
1428
|
+
class ue extends Z0 {
|
|
1425
1429
|
constructor(D) {
|
|
1426
1430
|
super(D);
|
|
1427
1431
|
const f = D && D.forceBase64;
|
|
1428
|
-
this.supportsBinary =
|
|
1432
|
+
this.supportsBinary = Q0 && !f;
|
|
1429
1433
|
}
|
|
1430
1434
|
request(D = {}) {
|
|
1431
1435
|
return Object.assign(D, { xd: this.xd }, this.opts), new ju(C1, this.uri(), D);
|
|
@@ -1434,7 +1438,7 @@ class Q0 extends X0 {
|
|
|
1434
1438
|
function C1(u) {
|
|
1435
1439
|
const D = u.xdomain;
|
|
1436
1440
|
try {
|
|
1437
|
-
if (typeof XMLHttpRequest < "u" && (!D ||
|
|
1441
|
+
if (typeof XMLHttpRequest < "u" && (!D || G0))
|
|
1438
1442
|
return new XMLHttpRequest();
|
|
1439
1443
|
} catch {
|
|
1440
1444
|
}
|
|
@@ -1445,7 +1449,7 @@ function C1(u) {
|
|
|
1445
1449
|
}
|
|
1446
1450
|
}
|
|
1447
1451
|
const c1 = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
1448
|
-
class
|
|
1452
|
+
class De extends df {
|
|
1449
1453
|
get name() {
|
|
1450
1454
|
return "websocket";
|
|
1451
1455
|
}
|
|
@@ -1502,7 +1506,7 @@ class ue extends df {
|
|
|
1502
1506
|
}
|
|
1503
1507
|
}
|
|
1504
1508
|
const MD = vu.WebSocket || vu.MozWebSocket;
|
|
1505
|
-
class
|
|
1509
|
+
class fe extends De {
|
|
1506
1510
|
createSocket(D, f, e) {
|
|
1507
1511
|
return c1 ? new MD(D, f, e) : f ? new MD(D, f) : new MD(D);
|
|
1508
1512
|
}
|
|
@@ -1510,7 +1514,7 @@ class De extends ue {
|
|
|
1510
1514
|
this.ws.send(f);
|
|
1511
1515
|
}
|
|
1512
1516
|
}
|
|
1513
|
-
class
|
|
1517
|
+
class ee extends df {
|
|
1514
1518
|
get name() {
|
|
1515
1519
|
return "webtransport";
|
|
1516
1520
|
}
|
|
@@ -1526,7 +1530,7 @@ class fe extends df {
|
|
|
1526
1530
|
this.onError("webtransport error", D);
|
|
1527
1531
|
}), this._transport.ready.then(() => {
|
|
1528
1532
|
this._transport.createBidirectionalStream().then((D) => {
|
|
1529
|
-
const f =
|
|
1533
|
+
const f = $0(Number.MAX_SAFE_INTEGER, this.socket.binaryType), e = D.readable.pipeThrough(f).getReader(), t = I0();
|
|
1530
1534
|
t.readable.pipeTo(D.writable), this._writer = t.writable.getWriter();
|
|
1531
1535
|
const n = () => {
|
|
1532
1536
|
e.read().then(({ done: s, value: F }) => {
|
|
@@ -1556,11 +1560,11 @@ class fe extends df {
|
|
|
1556
1560
|
(D = this._transport) === null || D === void 0 || D.close();
|
|
1557
1561
|
}
|
|
1558
1562
|
}
|
|
1559
|
-
const
|
|
1560
|
-
websocket:
|
|
1561
|
-
webtransport:
|
|
1562
|
-
polling:
|
|
1563
|
-
},
|
|
1563
|
+
const te = {
|
|
1564
|
+
websocket: fe,
|
|
1565
|
+
webtransport: ee,
|
|
1566
|
+
polling: ue
|
|
1567
|
+
}, ne = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, re = [
|
|
1564
1568
|
"source",
|
|
1565
1569
|
"protocol",
|
|
1566
1570
|
"authority",
|
|
@@ -1581,16 +1585,16 @@ function JD(u) {
|
|
|
1581
1585
|
throw "URI too long";
|
|
1582
1586
|
const D = u, f = u.indexOf("["), e = u.indexOf("]");
|
|
1583
1587
|
f != -1 && e != -1 && (u = u.substring(0, f) + u.substring(f, e).replace(/:/g, ";") + u.substring(e, u.length));
|
|
1584
|
-
let t =
|
|
1588
|
+
let t = ne.exec(u || ""), n = {}, r = 14;
|
|
1585
1589
|
for (; r--; )
|
|
1586
|
-
n[
|
|
1587
|
-
return f != -1 && e != -1 && (n.source = D, n.host = n.host.substring(1, n.host.length - 1).replace(/;/g, ":"), n.authority = n.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), n.ipv6uri = !0), n.pathNames =
|
|
1590
|
+
n[re[r]] = t[r] || "";
|
|
1591
|
+
return f != -1 && e != -1 && (n.source = D, n.host = n.host.substring(1, n.host.length - 1).replace(/;/g, ":"), n.authority = n.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), n.ipv6uri = !0), n.pathNames = ae(n, n.path), n.queryKey = se(n, n.query), n;
|
|
1588
1592
|
}
|
|
1589
|
-
function
|
|
1593
|
+
function ae(u, D) {
|
|
1590
1594
|
const f = /\/{2,9}/g, e = D.replace(f, "/").split("/");
|
|
1591
1595
|
return (D.slice(0, 1) == "/" || D.length === 0) && e.splice(0, 1), D.slice(-1) == "/" && e.splice(e.length - 1, 1), e;
|
|
1592
1596
|
}
|
|
1593
|
-
function
|
|
1597
|
+
function se(u, D) {
|
|
1594
1598
|
const f = {};
|
|
1595
1599
|
return D.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(e, t, n) {
|
|
1596
1600
|
t && (f[t] = n);
|
|
@@ -1600,7 +1604,7 @@ const GD = typeof addEventListener == "function" && typeof removeEventListener =
|
|
|
1600
1604
|
GD && addEventListener("offline", () => {
|
|
1601
1605
|
BD.forEach((u) => u());
|
|
1602
1606
|
}, !1);
|
|
1603
|
-
class Vu extends
|
|
1607
|
+
class Vu extends su {
|
|
1604
1608
|
/**
|
|
1605
1609
|
* Socket constructor.
|
|
1606
1610
|
*
|
|
@@ -1608,7 +1612,7 @@ class Vu extends Fu {
|
|
|
1608
1612
|
* @param {Object} opts - options
|
|
1609
1613
|
*/
|
|
1610
1614
|
constructor(D, f) {
|
|
1611
|
-
if (super(), this.binaryType =
|
|
1615
|
+
if (super(), this.binaryType = M0, this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = 1 / 0, D && typeof D == "object" && (f = D, D = null), D) {
|
|
1612
1616
|
const e = JD(D);
|
|
1613
1617
|
f.hostname = e.host, f.secure = e.protocol === "https" || e.protocol === "wss", f.port = e.port, e.query && (f.query = e.query);
|
|
1614
1618
|
} else f.host && (f.hostname = JD(f.host).host);
|
|
@@ -1629,7 +1633,7 @@ class Vu extends Fu {
|
|
|
1629
1633
|
},
|
|
1630
1634
|
transportOptions: {},
|
|
1631
1635
|
closeOnBeforeunload: !1
|
|
1632
|
-
}, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query =
|
|
1636
|
+
}, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = Y0(this.opts.query)), GD && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
|
|
1633
1637
|
this.transport && (this.transport.removeAllListeners(), this.transport.close());
|
|
1634
1638
|
}, addEventListener("beforeunload", this._beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this._offlineEventListener = () => {
|
|
1635
1639
|
this._onClose("transport close", {
|
|
@@ -1764,7 +1768,7 @@ class Vu extends Fu {
|
|
|
1764
1768
|
let f = 1;
|
|
1765
1769
|
for (let e = 0; e < this.writeBuffer.length; e++) {
|
|
1766
1770
|
const t = this.writeBuffer[e].data;
|
|
1767
|
-
if (t && (f +=
|
|
1771
|
+
if (t && (f += V0(t)), e > 0 && f > this._maxPayload)
|
|
1768
1772
|
return this.writeBuffer.slice(0, e);
|
|
1769
1773
|
f += 2;
|
|
1770
1774
|
}
|
|
@@ -1871,7 +1875,7 @@ class Vu extends Fu {
|
|
|
1871
1875
|
}
|
|
1872
1876
|
}
|
|
1873
1877
|
Vu.protocol = F1;
|
|
1874
|
-
class
|
|
1878
|
+
class Fe extends Vu {
|
|
1875
1879
|
constructor() {
|
|
1876
1880
|
super(...arguments), this._upgrades = [];
|
|
1877
1881
|
}
|
|
@@ -1943,41 +1947,41 @@ class se extends Vu {
|
|
|
1943
1947
|
return f;
|
|
1944
1948
|
}
|
|
1945
1949
|
}
|
|
1946
|
-
let
|
|
1950
|
+
let ie = class extends Fe {
|
|
1947
1951
|
constructor(D, f = {}) {
|
|
1948
1952
|
const e = typeof D == "object" ? D : f;
|
|
1949
|
-
(!e.transports || e.transports && typeof e.transports[0] == "string") && (e.transports = (e.transports || ["polling", "websocket", "webtransport"]).map((t) =>
|
|
1953
|
+
(!e.transports || e.transports && typeof e.transports[0] == "string") && (e.transports = (e.transports || ["polling", "websocket", "webtransport"]).map((t) => te[t]).filter((t) => !!t)), super(D, e);
|
|
1950
1954
|
}
|
|
1951
1955
|
};
|
|
1952
|
-
function
|
|
1956
|
+
function oe(u, D = "", f) {
|
|
1953
1957
|
let e = u;
|
|
1954
1958
|
f = f || typeof location < "u" && location, u == null && (u = f.protocol + "//" + f.host), typeof u == "string" && (u.charAt(0) === "/" && (u.charAt(1) === "/" ? u = f.protocol + u : u = f.host + u), /^(https?|wss?):\/\//.test(u) || (typeof f < "u" ? u = f.protocol + "//" + u : u = "https://" + u), e = JD(u)), e.port || (/^(http|ws)$/.test(e.protocol) ? e.port = "80" : /^(http|ws)s$/.test(e.protocol) && (e.port = "443")), e.path = e.path || "/";
|
|
1955
1959
|
const n = e.host.indexOf(":") !== -1 ? "[" + e.host + "]" : e.host;
|
|
1956
1960
|
return e.id = e.protocol + "://" + n + ":" + e.port + D, e.href = e.protocol + "://" + n + (f && f.port === e.port ? "" : ":" + e.port), e;
|
|
1957
1961
|
}
|
|
1958
|
-
const
|
|
1962
|
+
const de = typeof ArrayBuffer == "function", Ce = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u.buffer instanceof ArrayBuffer, l1 = Object.prototype.toString, ce = typeof Blob == "function" || typeof Blob < "u" && l1.call(Blob) === "[object BlobConstructor]", le = typeof File == "function" || typeof File < "u" && l1.call(File) === "[object FileConstructor]";
|
|
1959
1963
|
function Cf(u) {
|
|
1960
|
-
return
|
|
1964
|
+
return de && (u instanceof ArrayBuffer || Ce(u)) || ce && u instanceof Blob || le && u instanceof File;
|
|
1961
1965
|
}
|
|
1962
|
-
function
|
|
1966
|
+
function mD(u, D) {
|
|
1963
1967
|
if (!u || typeof u != "object")
|
|
1964
1968
|
return !1;
|
|
1965
1969
|
if (Array.isArray(u)) {
|
|
1966
1970
|
for (let f = 0, e = u.length; f < e; f++)
|
|
1967
|
-
if (
|
|
1971
|
+
if (mD(u[f]))
|
|
1968
1972
|
return !0;
|
|
1969
1973
|
return !1;
|
|
1970
1974
|
}
|
|
1971
1975
|
if (Cf(u))
|
|
1972
1976
|
return !0;
|
|
1973
1977
|
if (u.toJSON && typeof u.toJSON == "function" && arguments.length === 1)
|
|
1974
|
-
return
|
|
1978
|
+
return mD(u.toJSON(), !0);
|
|
1975
1979
|
for (const f in u)
|
|
1976
|
-
if (Object.prototype.hasOwnProperty.call(u, f) &&
|
|
1980
|
+
if (Object.prototype.hasOwnProperty.call(u, f) && mD(u[f]))
|
|
1977
1981
|
return !0;
|
|
1978
1982
|
return !1;
|
|
1979
1983
|
}
|
|
1980
|
-
function
|
|
1984
|
+
function Ee(u) {
|
|
1981
1985
|
const D = [], f = u.data, e = u;
|
|
1982
1986
|
return e.data = XD(f, D), e.attachments = D.length, { packet: e, buffers: D };
|
|
1983
1987
|
}
|
|
@@ -2000,7 +2004,7 @@ function XD(u, D) {
|
|
|
2000
2004
|
}
|
|
2001
2005
|
return u;
|
|
2002
2006
|
}
|
|
2003
|
-
function
|
|
2007
|
+
function he(u, D) {
|
|
2004
2008
|
return u.data = ZD(u.data, D), delete u.attachments, u;
|
|
2005
2009
|
}
|
|
2006
2010
|
function ZD(u, D) {
|
|
@@ -2018,7 +2022,7 @@ function ZD(u, D) {
|
|
|
2018
2022
|
Object.prototype.hasOwnProperty.call(u, f) && (u[f] = ZD(u[f], D));
|
|
2019
2023
|
return u;
|
|
2020
2024
|
}
|
|
2021
|
-
const
|
|
2025
|
+
const be = [
|
|
2022
2026
|
"connect",
|
|
2023
2027
|
"connect_error",
|
|
2024
2028
|
"disconnect",
|
|
@@ -2026,12 +2030,12 @@ const he = [
|
|
|
2026
2030
|
"newListener",
|
|
2027
2031
|
"removeListener"
|
|
2028
2032
|
// used by the Node.js EventEmitter
|
|
2029
|
-
],
|
|
2033
|
+
], pe = 5;
|
|
2030
2034
|
var W;
|
|
2031
2035
|
(function(u) {
|
|
2032
2036
|
u[u.CONNECT = 0] = "CONNECT", u[u.DISCONNECT = 1] = "DISCONNECT", u[u.EVENT = 2] = "EVENT", u[u.ACK = 3] = "ACK", u[u.CONNECT_ERROR = 4] = "CONNECT_ERROR", u[u.BINARY_EVENT = 5] = "BINARY_EVENT", u[u.BINARY_ACK = 6] = "BINARY_ACK";
|
|
2033
2037
|
})(W || (W = {}));
|
|
2034
|
-
class
|
|
2038
|
+
class Be {
|
|
2035
2039
|
/**
|
|
2036
2040
|
* Encoder constructor
|
|
2037
2041
|
*
|
|
@@ -2047,7 +2051,7 @@ class pe {
|
|
|
2047
2051
|
* @param {Object} obj - packet object
|
|
2048
2052
|
*/
|
|
2049
2053
|
encode(D) {
|
|
2050
|
-
return (D.type === W.EVENT || D.type === W.ACK) &&
|
|
2054
|
+
return (D.type === W.EVENT || D.type === W.ACK) && mD(D) ? this.encodeAsBinary({
|
|
2051
2055
|
type: D.type === W.EVENT ? W.BINARY_EVENT : W.BINARY_ACK,
|
|
2052
2056
|
nsp: D.nsp,
|
|
2053
2057
|
data: D.data,
|
|
@@ -2067,14 +2071,14 @@ class pe {
|
|
|
2067
2071
|
* a list of buffers.
|
|
2068
2072
|
*/
|
|
2069
2073
|
encodeAsBinary(D) {
|
|
2070
|
-
const f =
|
|
2074
|
+
const f = Ee(D), e = this.encodeAsString(f.packet), t = f.buffers;
|
|
2071
2075
|
return t.unshift(e), t;
|
|
2072
2076
|
}
|
|
2073
2077
|
}
|
|
2074
2078
|
function zf(u) {
|
|
2075
2079
|
return Object.prototype.toString.call(u) === "[object Object]";
|
|
2076
2080
|
}
|
|
2077
|
-
class cf extends
|
|
2081
|
+
class cf extends su {
|
|
2078
2082
|
/**
|
|
2079
2083
|
* Decoder constructor
|
|
2080
2084
|
*
|
|
@@ -2095,7 +2099,7 @@ class cf extends Fu {
|
|
|
2095
2099
|
throw new Error("got plaintext data when reconstructing a packet");
|
|
2096
2100
|
f = this.decodeString(D);
|
|
2097
2101
|
const e = f.type === W.BINARY_EVENT;
|
|
2098
|
-
e || f.type === W.BINARY_ACK ? (f.type = e ? W.EVENT : W.ACK, this.reconstructor = new
|
|
2102
|
+
e || f.type === W.BINARY_ACK ? (f.type = e ? W.EVENT : W.ACK, this.reconstructor = new me(f), f.attachments === 0 && super.emitReserved("decoded", f)) : super.emitReserved("decoded", f);
|
|
2099
2103
|
} else if (Cf(D) || D.base64)
|
|
2100
2104
|
if (this.reconstructor)
|
|
2101
2105
|
f = this.reconstructor.takeBinaryData(D), f && (this.reconstructor = null, super.emitReserved("decoded", f));
|
|
@@ -2173,7 +2177,7 @@ class cf extends Fu {
|
|
|
2173
2177
|
return typeof f == "string" || zf(f);
|
|
2174
2178
|
case W.EVENT:
|
|
2175
2179
|
case W.BINARY_EVENT:
|
|
2176
|
-
return Array.isArray(f) && (typeof f[0] == "number" || typeof f[0] == "string" &&
|
|
2180
|
+
return Array.isArray(f) && (typeof f[0] == "number" || typeof f[0] == "string" && be.indexOf(f[0]) === -1);
|
|
2177
2181
|
case W.ACK:
|
|
2178
2182
|
case W.BINARY_ACK:
|
|
2179
2183
|
return Array.isArray(f);
|
|
@@ -2186,7 +2190,7 @@ class cf extends Fu {
|
|
|
2186
2190
|
this.reconstructor && (this.reconstructor.finishedReconstruction(), this.reconstructor = null);
|
|
2187
2191
|
}
|
|
2188
2192
|
}
|
|
2189
|
-
class
|
|
2193
|
+
class me {
|
|
2190
2194
|
constructor(D) {
|
|
2191
2195
|
this.packet = D, this.buffers = [], this.reconPack = D;
|
|
2192
2196
|
}
|
|
@@ -2200,7 +2204,7 @@ class Be {
|
|
|
2200
2204
|
*/
|
|
2201
2205
|
takeBinaryData(D) {
|
|
2202
2206
|
if (this.buffers.push(D), this.buffers.length === this.reconPack.attachments) {
|
|
2203
|
-
const f =
|
|
2207
|
+
const f = he(this.reconPack, this.buffers);
|
|
2204
2208
|
return this.finishedReconstruction(), f;
|
|
2205
2209
|
}
|
|
2206
2210
|
return null;
|
|
@@ -2215,18 +2219,18 @@ class Be {
|
|
|
2215
2219
|
const ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2216
2220
|
__proto__: null,
|
|
2217
2221
|
Decoder: cf,
|
|
2218
|
-
Encoder:
|
|
2222
|
+
Encoder: Be,
|
|
2219
2223
|
get PacketType() {
|
|
2220
2224
|
return W;
|
|
2221
2225
|
},
|
|
2222
|
-
protocol:
|
|
2226
|
+
protocol: pe
|
|
2223
2227
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2224
2228
|
function ku(u, D, f) {
|
|
2225
2229
|
return u.on(D, f), function() {
|
|
2226
2230
|
u.off(D, f);
|
|
2227
2231
|
};
|
|
2228
2232
|
}
|
|
2229
|
-
const
|
|
2233
|
+
const _e = Object.freeze({
|
|
2230
2234
|
connect: 1,
|
|
2231
2235
|
connect_error: 1,
|
|
2232
2236
|
disconnect: 1,
|
|
@@ -2235,7 +2239,7 @@ const me = Object.freeze({
|
|
|
2235
2239
|
newListener: 1,
|
|
2236
2240
|
removeListener: 1
|
|
2237
2241
|
});
|
|
2238
|
-
class E1 extends
|
|
2242
|
+
class E1 extends su {
|
|
2239
2243
|
/**
|
|
2240
2244
|
* `Socket` constructor.
|
|
2241
2245
|
*/
|
|
@@ -2351,7 +2355,7 @@ class E1 extends Fu {
|
|
|
2351
2355
|
*/
|
|
2352
2356
|
emit(D, ...f) {
|
|
2353
2357
|
var e, t, n;
|
|
2354
|
-
if (
|
|
2358
|
+
if (_e.hasOwnProperty(D))
|
|
2355
2359
|
throw new Error('"' + D.toString() + '" is a reserved event name');
|
|
2356
2360
|
if (f.unshift(D), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
|
|
2357
2361
|
return this._addToQueue(f), this;
|
|
@@ -2850,7 +2854,7 @@ nD.prototype.setMax = function(u) {
|
|
|
2850
2854
|
nD.prototype.setJitter = function(u) {
|
|
2851
2855
|
this.jitter = u;
|
|
2852
2856
|
};
|
|
2853
|
-
class QD extends
|
|
2857
|
+
class QD extends su {
|
|
2854
2858
|
constructor(D, f) {
|
|
2855
2859
|
var e;
|
|
2856
2860
|
super(), this.nsps = {}, this.subs = [], D && typeof D == "object" && (f = D, D = void 0), f = f || {}, f.path = f.path || "/socket.io", this.opts = f, xD(this, f), this.reconnection(f.reconnection !== !1), this.reconnectionAttempts(f.reconnectionAttempts || 1 / 0), this.reconnectionDelay(f.reconnectionDelay || 1e3), this.reconnectionDelayMax(f.reconnectionDelayMax || 5e3), this.randomizationFactor((e = f.randomizationFactor) !== null && e !== void 0 ? e : 0.5), this.backoff = new nD({
|
|
@@ -2901,7 +2905,7 @@ class QD extends Fu {
|
|
|
2901
2905
|
open(D) {
|
|
2902
2906
|
if (~this._readyState.indexOf("open"))
|
|
2903
2907
|
return this;
|
|
2904
|
-
this.engine = new
|
|
2908
|
+
this.engine = new ie(this.uri, this.opts);
|
|
2905
2909
|
const f = this.engine, e = this;
|
|
2906
2910
|
this._readyState = "opening", this.skipReconnect = !1;
|
|
2907
2911
|
const t = ku(f, "open", function() {
|
|
@@ -3089,31 +3093,31 @@ class QD extends Fu {
|
|
|
3089
3093
|
}
|
|
3090
3094
|
}
|
|
3091
3095
|
const sD = {};
|
|
3092
|
-
function
|
|
3096
|
+
function gD(u, D) {
|
|
3093
3097
|
typeof u == "object" && (D = u, u = void 0), D = D || {};
|
|
3094
|
-
const f =
|
|
3098
|
+
const f = oe(u, D.path || "/socket.io"), e = f.source, t = f.id, n = f.path, r = sD[t] && n in sD[t].nsps, s = D.forceNew || D["force new connection"] || D.multiplex === !1 || r;
|
|
3095
3099
|
let F;
|
|
3096
3100
|
return s ? F = new QD(e, D) : (sD[t] || (sD[t] = new QD(e, D)), F = sD[t]), f.query && !D.query && (D.query = f.queryKey), F.socket(f.path, D);
|
|
3097
3101
|
}
|
|
3098
|
-
Object.assign(
|
|
3102
|
+
Object.assign(gD, {
|
|
3099
3103
|
Manager: QD,
|
|
3100
3104
|
Socket: E1,
|
|
3101
|
-
io:
|
|
3102
|
-
connect:
|
|
3105
|
+
io: gD,
|
|
3106
|
+
connect: gD
|
|
3103
3107
|
});
|
|
3104
|
-
const
|
|
3105
|
-
function
|
|
3108
|
+
const ye = () => typeof location > "u" ? "unknown-host" : location.host, lf = (u, D = ye()) => `${u}-${D}`;
|
|
3109
|
+
function ve(u, D, f) {
|
|
3106
3110
|
if (typeof D > "u") throw new Error("Value cannot be undefined");
|
|
3107
3111
|
return localStorage.setItem(lf(u, f), JSON.stringify(D)), !0;
|
|
3108
3112
|
}
|
|
3109
|
-
function
|
|
3113
|
+
function we(u, D) {
|
|
3110
3114
|
const f = localStorage.getItem(lf(u, D));
|
|
3111
3115
|
return f === null ? null : JSON.parse(f);
|
|
3112
3116
|
}
|
|
3113
|
-
function
|
|
3117
|
+
function Ae(u, D) {
|
|
3114
3118
|
localStorage.removeItem(lf(u, D));
|
|
3115
3119
|
}
|
|
3116
|
-
const X = { setItem:
|
|
3120
|
+
const X = { setItem: ve, getItem: we, removeItem: Ae }, wD = class wD {
|
|
3117
3121
|
constructor(D, f, e) {
|
|
3118
3122
|
lD(this, "socket");
|
|
3119
3123
|
lD(this, "config");
|
|
@@ -3123,7 +3127,7 @@ const X = { setItem: ye, getItem: ve, removeItem: we }, wD = class wD {
|
|
|
3123
3127
|
autoConnect: !1
|
|
3124
3128
|
};
|
|
3125
3129
|
const t = new URL(D);
|
|
3126
|
-
this.socket =
|
|
3130
|
+
this.socket = gD(t.origin, this.config), this.init(e);
|
|
3127
3131
|
}
|
|
3128
3132
|
get io() {
|
|
3129
3133
|
return this.socket.io;
|
|
@@ -3248,7 +3252,7 @@ lD(wD, "defaultConfig", {
|
|
|
3248
3252
|
withCredentials: !0
|
|
3249
3253
|
});
|
|
3250
3254
|
let uf = wD, qD;
|
|
3251
|
-
const
|
|
3255
|
+
const xe = (u, D) => {
|
|
3252
3256
|
var e;
|
|
3253
3257
|
const f = (e = X.getItem("profileLiveChat")) == null ? void 0 : e.id;
|
|
3254
3258
|
return qD || (qD = new uf(
|
|
@@ -3265,8 +3269,8 @@ const Ae = (u, D) => {
|
|
|
3265
3269
|
}, h1 = qu({
|
|
3266
3270
|
socket: {}
|
|
3267
3271
|
}), b1 = (u) => {
|
|
3268
|
-
const D = Wu(), f =
|
|
3269
|
-
|
|
3272
|
+
const D = Wu(), f = gu(
|
|
3273
|
+
xe(D, {
|
|
3270
3274
|
onConnect: () => {
|
|
3271
3275
|
console.info(
|
|
3272
3276
|
"Hexabot Live Chat : Successfully established WS Connection!"
|
|
@@ -3281,11 +3285,11 @@ const Ae = (u, D) => {
|
|
|
3281
3285
|
})
|
|
3282
3286
|
);
|
|
3283
3287
|
return /* @__PURE__ */ a.jsx(h1.Provider, { value: { socket: f.current }, children: u.children });
|
|
3284
|
-
},
|
|
3285
|
-
const { socket: f } =
|
|
3288
|
+
}, tD = () => Hu(h1), Df = (u, D) => {
|
|
3289
|
+
const { socket: f } = tD();
|
|
3286
3290
|
Z(() => (f.on(u, D), () => f.off(u, D)), [u, D, f]);
|
|
3287
|
-
},
|
|
3288
|
-
const { socket: u } =
|
|
3291
|
+
}, ke = () => {
|
|
3292
|
+
const { socket: u } = tD();
|
|
3289
3293
|
Z(() => (u.connect(), () => {
|
|
3290
3294
|
u.disconnect();
|
|
3291
3295
|
}), []);
|
|
@@ -3348,7 +3352,7 @@ const Ae = (u, D) => {
|
|
|
3348
3352
|
offline_mode: r.offline_mode
|
|
3349
3353
|
});
|
|
3350
3354
|
}), /* @__PURE__ */ a.jsx(p1.Provider, { value: e, children: u });
|
|
3351
|
-
}, pu = () => Hu(p1),
|
|
3355
|
+
}, pu = () => Hu(p1), m1 = qu(void 0), g1 = ({
|
|
3352
3356
|
onOpen: u,
|
|
3353
3357
|
onClose: D,
|
|
3354
3358
|
onScrollToTop: f,
|
|
@@ -3360,28 +3364,28 @@ const Ae = (u, D) => {
|
|
|
3360
3364
|
isOpen: s,
|
|
3361
3365
|
screen: d,
|
|
3362
3366
|
scroll: c,
|
|
3363
|
-
setSyncState: (
|
|
3364
|
-
r(
|
|
3367
|
+
setSyncState: (g) => {
|
|
3368
|
+
r(g);
|
|
3365
3369
|
},
|
|
3366
|
-
setIsOpen: (
|
|
3367
|
-
F(
|
|
3370
|
+
setIsOpen: (g) => {
|
|
3371
|
+
F(g), n && (g ? u && u() : D && D());
|
|
3368
3372
|
},
|
|
3369
|
-
setScreen: (
|
|
3373
|
+
setScreen: (g) => {
|
|
3370
3374
|
o(
|
|
3371
|
-
["prechat", "postchat", "webview"].includes(
|
|
3375
|
+
["prechat", "postchat", "webview"].includes(g) ? g : "chat"
|
|
3372
3376
|
);
|
|
3373
3377
|
},
|
|
3374
|
-
setScroll: (
|
|
3375
|
-
l(
|
|
3378
|
+
setScroll: (g) => {
|
|
3379
|
+
l(g), f && n && g === 0 && f();
|
|
3376
3380
|
}
|
|
3377
3381
|
};
|
|
3378
|
-
return /* @__PURE__ */ a.jsx(
|
|
3382
|
+
return /* @__PURE__ */ a.jsx(m1.Provider, { value: x, children: t });
|
|
3379
3383
|
}, Nu = () => {
|
|
3380
|
-
const u = Hu(
|
|
3384
|
+
const u = Hu(m1);
|
|
3381
3385
|
if (u === void 0)
|
|
3382
3386
|
throw new Error("useWidget must be used within a WidgetProvider");
|
|
3383
3387
|
return u;
|
|
3384
|
-
},
|
|
3388
|
+
}, je = (u) => new Intl.DateTimeFormat("en-GB", {
|
|
3385
3389
|
hour: "2-digit",
|
|
3386
3390
|
minute: "2-digit",
|
|
3387
3391
|
hour12: !1,
|
|
@@ -3390,7 +3394,7 @@ const Ae = (u, D) => {
|
|
|
3390
3394
|
const D = u || {};
|
|
3391
3395
|
if (!D || D.status !== "active") return !1;
|
|
3392
3396
|
if (D.start_time && D.end_time && D.time_zone) {
|
|
3393
|
-
const f =
|
|
3397
|
+
const f = je(D.time_zone);
|
|
3394
3398
|
return !(f >= D.start_time && f <= D.end_time);
|
|
3395
3399
|
}
|
|
3396
3400
|
return !0;
|
|
@@ -3449,11 +3453,11 @@ const Ae = (u, D) => {
|
|
|
3449
3453
|
setIsOfflineMode: () => {
|
|
3450
3454
|
}
|
|
3451
3455
|
}, _1 = qu(yu), y1 = ({ wantToConnect: u, defaultConnectionState: D = 0, children: f }) => {
|
|
3452
|
-
const e = Wu(), t = pu(), { screen: n, setScreen: r } = Nu(), { setScroll: s, syncState: F, isOpen: d } = Nu(), o =
|
|
3456
|
+
const e = Wu(), t = pu(), { screen: n, setScreen: r } = Nu(), { setScroll: s, syncState: F, isOpen: d } = Nu(), o = tD(), [c, l] = U(
|
|
3453
3457
|
yu.participants
|
|
3454
|
-
), [j,
|
|
3458
|
+
), [j, v] = U(
|
|
3455
3459
|
D
|
|
3456
|
-
), [C,
|
|
3460
|
+
), [C, y] = U([]), [x, g] = U(
|
|
3457
3461
|
yu.newMessagesCount
|
|
3458
3462
|
), [T, _] = U(
|
|
3459
3463
|
yu.showTypingIndicator
|
|
@@ -3461,13 +3465,13 @@ const Ae = (u, D) => {
|
|
|
3461
3465
|
yu.suggestions
|
|
3462
3466
|
), [P, q] = U(
|
|
3463
3467
|
yu.newIOMessage
|
|
3464
|
-
), [
|
|
3468
|
+
), [m, O] = U(yu.message), [L, hu] = U(yu.outgoingMessageState), [fu, k] = U(yu.payload), [E, h] = U(yu.file), [A, p] = U(yu.webviewUrl), [R, N] = U(
|
|
3465
3469
|
yu.isContactFormActive
|
|
3466
3470
|
), [M, V] = U(
|
|
3467
3471
|
yu.isOfflineMode
|
|
3468
|
-
), { send: J } =
|
|
3469
|
-
|
|
3470
|
-
}, tu = t.offline_mode,
|
|
3472
|
+
), { send: J } = du(), { t: z } = zu(), Q = (S) => {
|
|
3473
|
+
v(S), S === eD.wantToConnect && u && u(), S === eD.connected && t.alwaysScrollToBottom && s(101);
|
|
3474
|
+
}, tu = t.offline_mode, Cu = kD(tu), _u = (S) => {
|
|
3471
3475
|
if (q(S), X.setItem(
|
|
3472
3476
|
"isOffline",
|
|
3473
3477
|
(S == null ? void 0 : S.isOffline) || !1
|
|
@@ -3476,8 +3480,8 @@ const Ae = (u, D) => {
|
|
|
3476
3480
|
(S == null ? void 0 : S.submitedFormLateTime) || null
|
|
3477
3481
|
), S && "type" in S && S.type === "typing")
|
|
3478
3482
|
return T === !0;
|
|
3479
|
-
_(!1), S && "mid" in S && !C.find((Du) => S.mid === Du.mid) && ("author" in S && (S.direction = S.author === "chatbot" ? uu.received : uu.sent, S.read = !0, S.delivery = !0),
|
|
3480
|
-
...Du.filter((
|
|
3483
|
+
_(!1), S && "mid" in S && !C.find((Du) => S.mid === Du.mid) && ("author" in S && (S.direction = S.author === "chatbot" ? uu.received : uu.sent, S.read = !0, S.delivery = !0), y((Du) => [
|
|
3484
|
+
...Du.filter((cu) => cu.mid !== S.mid),
|
|
3481
3485
|
S
|
|
3482
3486
|
]), s(0), "direction" in S && S.direction === uu.received && !S.isOffline && V(!1)), S && "data" in S && "quick_replies" in S.data ? I(
|
|
3483
3487
|
(S.data.quick_replies || []).map(
|
|
@@ -3487,53 +3491,46 @@ const Ae = (u, D) => {
|
|
|
3487
3491
|
payload: Du.payload
|
|
3488
3492
|
})
|
|
3489
3493
|
)
|
|
3490
|
-
) : I([]), d ||
|
|
3491
|
-
}, { socket: Bu } =
|
|
3494
|
+
) : I([]), d || g((Du) => Du + 1), t.alwaysScrollToBottom && s(101), hu(iD.sent);
|
|
3495
|
+
}, { socket: Bu } = tD(), ru = async ({
|
|
3492
3496
|
data: S
|
|
3493
3497
|
}) => {
|
|
3494
|
-
var
|
|
3498
|
+
var Du;
|
|
3495
3499
|
hu(
|
|
3496
3500
|
S.type === "file" ? iD.uploading : iD.sending
|
|
3497
|
-
), O("")
|
|
3498
|
-
const Du = await o.socket.post(
|
|
3501
|
+
), O(""), await o.socket.post(
|
|
3499
3502
|
`/webhook/${e.channel}/`,
|
|
3500
3503
|
{
|
|
3501
3504
|
data: {
|
|
3502
3505
|
...S,
|
|
3503
|
-
author: (S == null ? void 0 : S.author) ?? ((
|
|
3506
|
+
author: (S == null ? void 0 : S.author) ?? ((Du = c[1]) == null ? void 0 : Du.id)
|
|
3504
3507
|
}
|
|
3505
3508
|
}
|
|
3506
3509
|
);
|
|
3507
|
-
|
|
3508
|
-
"🚀 ~ ChatProvider.tsx:351 ~ handleSend ~ sentMessage:",
|
|
3509
|
-
Du
|
|
3510
|
-
), console.log(
|
|
3511
|
-
"=== CALLING handleNewIOMessage from handleSend (API Response) ==="
|
|
3512
|
-
);
|
|
3513
|
-
}, du = Mu(
|
|
3510
|
+
}, ou = Mu(
|
|
3514
3511
|
async (S, Du) => {
|
|
3515
3512
|
try {
|
|
3516
|
-
|
|
3517
|
-
const
|
|
3513
|
+
v(2);
|
|
3514
|
+
const cu = new URLSearchParams();
|
|
3518
3515
|
Object.entries({
|
|
3519
3516
|
...S && Du ? { first_name: S, last_name: Du } : {},
|
|
3520
3517
|
_refresh: Date.now().toString()
|
|
3521
3518
|
// Force fresh data
|
|
3522
|
-
}).forEach(([
|
|
3523
|
-
typeof Uu == "string" && Uu.trim() &&
|
|
3524
|
-
}),
|
|
3525
|
-
const { body: lu } = await Bu.get(`/webhook/${e.channel}/?${
|
|
3526
|
-
|
|
3519
|
+
}).forEach(([mu, Uu]) => {
|
|
3520
|
+
typeof Uu == "string" && Uu.trim() && cu.append(mu, Uu);
|
|
3521
|
+
}), cu.append("owner_id", e.ownerId);
|
|
3522
|
+
const { body: lu } = await Bu.get(`/webhook/${e.channel}/?${cu.toString()}`);
|
|
3523
|
+
X.setItem("profileLiveChat", lu.profile), X.setItem("isOffline", Cu || !1), X.setItem(
|
|
3527
3524
|
"submitedFormLateTime",
|
|
3528
3525
|
lu.profile.submitedFormLateTime || null
|
|
3529
|
-
),
|
|
3530
|
-
lu.messages.map((
|
|
3531
|
-
...
|
|
3532
|
-
direction:
|
|
3533
|
-
read:
|
|
3534
|
-
delivery:
|
|
3535
|
-
isOffline:
|
|
3536
|
-
submitedFormLateTime:
|
|
3526
|
+
), y(
|
|
3527
|
+
lu.messages.map((mu) => ({
|
|
3528
|
+
...mu,
|
|
3529
|
+
direction: mu.author === lu.profile.foreignId || mu.author === lu.profile.id ? uu.sent : uu.received,
|
|
3530
|
+
read: mu.direction === uu.sent || mu.read,
|
|
3531
|
+
delivery: mu.direction === uu.sent || mu.delivery,
|
|
3532
|
+
isOffline: mu.isOffline || lu.profile.isOffline,
|
|
3533
|
+
submitedFormLateTime: mu.submitedFormLateTime || lu.profile.submitedFormLateTime
|
|
3537
3534
|
}))
|
|
3538
3535
|
), l([
|
|
3539
3536
|
c[0],
|
|
@@ -3553,50 +3550,47 @@ const Ae = (u, D) => {
|
|
|
3553
3550
|
},
|
|
3554
3551
|
author: lu.profile.foreignId
|
|
3555
3552
|
}
|
|
3556
|
-
}),
|
|
3557
|
-
} catch (
|
|
3558
|
-
console.error("Unable to subscribe user",
|
|
3553
|
+
}), v(3), r("chat");
|
|
3554
|
+
} catch (cu) {
|
|
3555
|
+
console.error("Unable to subscribe user", cu), r("prechat"), v(0);
|
|
3559
3556
|
}
|
|
3560
3557
|
},
|
|
3561
3558
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3562
3559
|
[
|
|
3563
3560
|
c,
|
|
3564
|
-
y,
|
|
3565
3561
|
v,
|
|
3562
|
+
y,
|
|
3566
3563
|
l,
|
|
3567
3564
|
r,
|
|
3568
3565
|
o
|
|
3569
3566
|
]
|
|
3570
3567
|
);
|
|
3571
3568
|
Df(WD.message, (S) => {
|
|
3572
|
-
|
|
3573
|
-
"=== CALLING handleNewIOMessage from useSubscribe (Socket Realtime) ==="
|
|
3574
|
-
), _u(S);
|
|
3569
|
+
_u(S);
|
|
3575
3570
|
}), Df(WD.typing, _);
|
|
3576
3571
|
const Pu = (S) => {
|
|
3577
3572
|
S ? (p(S), r("webview")) : r("chat");
|
|
3578
3573
|
};
|
|
3579
3574
|
Z(() => {
|
|
3580
|
-
F && d &&
|
|
3575
|
+
F && d && g(0);
|
|
3581
3576
|
}, [F, d]), Z(() => {
|
|
3582
|
-
if (d && j ===
|
|
3583
|
-
console.log("🔄 Widget opened - fetching fresh data");
|
|
3577
|
+
if (d && j === eD.connected) {
|
|
3584
3578
|
const S = X.getItem("profileLiveChat");
|
|
3585
3579
|
if (S) {
|
|
3586
3580
|
const Du = S;
|
|
3587
|
-
|
|
3581
|
+
ou(Du.firstName, Du.lastName);
|
|
3588
3582
|
}
|
|
3589
|
-
!S && !
|
|
3583
|
+
!S && !Cu && r("prechat");
|
|
3590
3584
|
}
|
|
3591
3585
|
}, [d]), h0("logout", () => {
|
|
3592
3586
|
o.socket.disconnect();
|
|
3593
3587
|
}), Z(() => {
|
|
3594
|
-
n === "chat" && j ===
|
|
3588
|
+
n === "chat" && j === eD.connected && ou();
|
|
3595
3589
|
const S = () => {
|
|
3596
3590
|
const Du = X.getItem("profileLiveChat");
|
|
3597
3591
|
if (Du) {
|
|
3598
|
-
const
|
|
3599
|
-
|
|
3592
|
+
const cu = Du;
|
|
3593
|
+
ou(cu.firstName, cu.lastName);
|
|
3600
3594
|
}
|
|
3601
3595
|
};
|
|
3602
3596
|
return o.socket.io.on("reconnect", S), () => {
|
|
@@ -3609,17 +3603,17 @@ const Ae = (u, D) => {
|
|
|
3609
3603
|
const Iu = {
|
|
3610
3604
|
participants: c,
|
|
3611
3605
|
setParticipants: l,
|
|
3612
|
-
outgoingMessageState:
|
|
3606
|
+
outgoingMessageState: L,
|
|
3613
3607
|
setOutgoingMessageState: hu,
|
|
3614
3608
|
connectionState: j,
|
|
3615
3609
|
setConnectionState: Q,
|
|
3616
3610
|
messages: C.sort((S, Du) => {
|
|
3617
|
-
const
|
|
3618
|
-
return +new Date(
|
|
3611
|
+
const cu = Date.parse(S.createdAt), lu = Date.parse(Du.createdAt);
|
|
3612
|
+
return +new Date(cu) - +new Date(lu);
|
|
3619
3613
|
}),
|
|
3620
|
-
setMessages:
|
|
3614
|
+
setMessages: y,
|
|
3621
3615
|
newMessagesCount: x,
|
|
3622
|
-
setNewMessagesCount:
|
|
3616
|
+
setNewMessagesCount: g,
|
|
3623
3617
|
newIOMessage: P,
|
|
3624
3618
|
setNewIOMessage: q,
|
|
3625
3619
|
send: ru,
|
|
@@ -3633,16 +3627,16 @@ const Ae = (u, D) => {
|
|
|
3633
3627
|
setPayload: k,
|
|
3634
3628
|
file: E,
|
|
3635
3629
|
setFile: h,
|
|
3636
|
-
message:
|
|
3630
|
+
message: m,
|
|
3637
3631
|
setMessage: O,
|
|
3638
|
-
handleSubscription:
|
|
3632
|
+
handleSubscription: ou,
|
|
3639
3633
|
isContactFormActive: R,
|
|
3640
3634
|
setIsContactFormActive: N,
|
|
3641
3635
|
isOfflineMode: M,
|
|
3642
3636
|
setIsOfflineMode: V
|
|
3643
3637
|
};
|
|
3644
3638
|
return /* @__PURE__ */ a.jsx(_1.Provider, { value: Iu, children: f });
|
|
3645
|
-
},
|
|
3639
|
+
}, du = () => {
|
|
3646
3640
|
const u = Hu(_1);
|
|
3647
3641
|
if (!u)
|
|
3648
3642
|
throw new Error("useChat must be used within a ChatContext");
|
|
@@ -3893,21 +3887,21 @@ const Ae = (u, D) => {
|
|
|
3893
3887
|
text: "#9C9C9C"
|
|
3894
3888
|
}
|
|
3895
3889
|
}
|
|
3896
|
-
},
|
|
3890
|
+
}, Se = (u) => {
|
|
3897
3891
|
const D = u.replace("#", ""), f = parseInt(D.substring(0, 2), 16), e = parseInt(D.substring(2, 4), 16), t = parseInt(D.substring(4, 6), 16);
|
|
3898
3892
|
return (0.299 * f + 0.587 * e + 0.114 * t) / 255 > 0.5 ? "#000000" : "#FFFFFF";
|
|
3899
|
-
},
|
|
3893
|
+
}, Te = (u) => /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(u), Ne = (u) => {
|
|
3900
3894
|
const D = u.replace("#", "");
|
|
3901
3895
|
return {
|
|
3902
3896
|
r: parseInt(D.substring(0, 2), 16),
|
|
3903
3897
|
g: parseInt(D.substring(2, 4), 16),
|
|
3904
3898
|
b: parseInt(D.substring(4, 6), 16)
|
|
3905
3899
|
};
|
|
3906
|
-
},
|
|
3907
|
-
const D =
|
|
3908
|
-
if (!
|
|
3900
|
+
}, Oe = (u) => (u.startsWith("#") || (u = "#" + u), u.length === 4 ? "#" + u[1] + u[1] + u[2] + u[2] + u[3] + u[3] : u), ff = (u) => {
|
|
3901
|
+
const D = Oe(u);
|
|
3902
|
+
if (!Te(D))
|
|
3909
3903
|
return console.warn(`Invalid color: ${u}, using default blue theme`), ff("#0074D9");
|
|
3910
|
-
const f =
|
|
3904
|
+
const f = Se(D), e = Ne(D), t = Math.min(255, Math.floor(e.r + (255 - e.r) * 0.9)), n = Math.min(255, Math.floor(e.g + (255 - e.g) * 0.9)), r = Math.min(255, Math.floor(e.b + (255 - e.b) * 0.9)), s = `#${t.toString(16).padStart(2, "0")}${n.toString(16).padStart(2, "0")}${r.toString(16).padStart(2, "0")}`, F = Math.max(0, Math.floor(e.r * 0.8)), d = Math.max(0, Math.floor(e.g * 0.8)), o = Math.max(0, Math.floor(e.b * 0.8));
|
|
3911
3905
|
return `${F.toString(16).padStart(2, "0")}${d.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}`, {
|
|
3912
3906
|
header: {
|
|
3913
3907
|
bg: D,
|
|
@@ -3951,13 +3945,13 @@ const Ae = (u, D) => {
|
|
|
3951
3945
|
teal: "#1BA089",
|
|
3952
3946
|
dark: "#000000",
|
|
3953
3947
|
purple: "#7950F2"
|
|
3954
|
-
},
|
|
3948
|
+
}, Re = (u) => Uf[u] ? ff(Uf[u]) : ff(u), Pe = () => ({
|
|
3955
3949
|
bg: "#f6f8f9",
|
|
3956
3950
|
// Light gray background
|
|
3957
3951
|
text: "#000"
|
|
3958
3952
|
// Black text
|
|
3959
|
-
}),
|
|
3960
|
-
colors:
|
|
3953
|
+
}), Ie = yD.orange, v1 = qu({
|
|
3954
|
+
colors: Ie
|
|
3961
3955
|
}), w1 = ({
|
|
3962
3956
|
children: u
|
|
3963
3957
|
}) => {
|
|
@@ -3967,16 +3961,16 @@ const Ae = (u, D) => {
|
|
|
3967
3961
|
return yD[e];
|
|
3968
3962
|
try {
|
|
3969
3963
|
return {
|
|
3970
|
-
...
|
|
3964
|
+
...Re(e),
|
|
3971
3965
|
// Keep received message colors fixed (admin chat)
|
|
3972
|
-
received:
|
|
3966
|
+
received: Pe()
|
|
3973
3967
|
};
|
|
3974
3968
|
} catch {
|
|
3975
3969
|
return console.warn(`Failed to generate theme for color: ${e}, using orange fallback`), yD.orange;
|
|
3976
3970
|
}
|
|
3977
3971
|
};
|
|
3978
3972
|
return /* @__PURE__ */ a.jsx(v1.Provider, { value: { colors: f() }, children: u });
|
|
3979
|
-
},
|
|
3973
|
+
}, iu = () => {
|
|
3980
3974
|
const u = Hu(v1);
|
|
3981
3975
|
if (!u)
|
|
3982
3976
|
throw new Error("useColors must be used within a ColorProvider");
|
|
@@ -4009,10 +4003,10 @@ const Ae = (u, D) => {
|
|
|
4009
4003
|
)
|
|
4010
4004
|
]
|
|
4011
4005
|
}
|
|
4012
|
-
),
|
|
4006
|
+
), $e = ({
|
|
4013
4007
|
onSendNoticeToStaff: u
|
|
4014
4008
|
}) => {
|
|
4015
|
-
const [D, f] = U(!1), e =
|
|
4009
|
+
const [D, f] = U(!1), e = gu(null), { send: t } = du(), n = async (r) => {
|
|
4016
4010
|
r.preventDefault(), r.stopPropagation();
|
|
4017
4011
|
try {
|
|
4018
4012
|
const s = X.getItem("profileLiveChat");
|
|
@@ -4060,7 +4054,7 @@ const Ae = (u, D) => {
|
|
|
4060
4054
|
) })
|
|
4061
4055
|
] });
|
|
4062
4056
|
}, Le = ({ children: u }) => {
|
|
4063
|
-
const D = pu(), { colors: f } =
|
|
4057
|
+
const D = pu(), { colors: f } = iu(), e = Nu();
|
|
4064
4058
|
return /* @__PURE__ */ a.jsxs(
|
|
4065
4059
|
"div",
|
|
4066
4060
|
{
|
|
@@ -4091,7 +4085,7 @@ const Ae = (u, D) => {
|
|
|
4091
4085
|
] }),
|
|
4092
4086
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-header--actions", children: [
|
|
4093
4087
|
/* @__PURE__ */ a.jsx(
|
|
4094
|
-
|
|
4088
|
+
$e,
|
|
4095
4089
|
{
|
|
4096
4090
|
onChatWithStaff: () => {
|
|
4097
4091
|
console.log("Chat with staff requested");
|
|
@@ -4113,7 +4107,7 @@ const Ae = (u, D) => {
|
|
|
4113
4107
|
]
|
|
4114
4108
|
}
|
|
4115
4109
|
);
|
|
4116
|
-
},
|
|
4110
|
+
}, Me = ({
|
|
4117
4111
|
width: u = "100",
|
|
4118
4112
|
height: D = "100",
|
|
4119
4113
|
x: f = "0",
|
|
@@ -4138,7 +4132,7 @@ const Ae = (u, D) => {
|
|
|
4138
4132
|
/* @__PURE__ */ a.jsx("path", { d: "M349.926 17.756c141.317 87.019 164.005 282.465 47.152 399.321-74.64 74.638-183.463 93.269-274.888 57.282 97.36 59.953 228.457 49.147 314.888-37.282 131.453-131.456 82.523-352.533-87.152-419.321z" })
|
|
4139
4133
|
]
|
|
4140
4134
|
}
|
|
4141
|
-
),
|
|
4135
|
+
), qe = ({ size: u = 50, color: D = "#000", ...f }) => /* @__PURE__ */ a.jsxs(
|
|
4142
4136
|
"svg",
|
|
4143
4137
|
{
|
|
4144
4138
|
width: u,
|
|
@@ -4198,8 +4192,8 @@ const Ae = (u, D) => {
|
|
|
4198
4192
|
] })
|
|
4199
4193
|
]
|
|
4200
4194
|
}
|
|
4201
|
-
),
|
|
4202
|
-
const { t: u } = zu(), { connectionState: D, setConnectionState: f } =
|
|
4195
|
+
), ze = () => {
|
|
4196
|
+
const { t: u } = zu(), { connectionState: D, setConnectionState: f } = du(), { colors: e } = iu(), t = () => {
|
|
4203
4197
|
D === 0 && f(1);
|
|
4204
4198
|
}, n = D > 0;
|
|
4205
4199
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -4207,8 +4201,8 @@ const Ae = (u, D) => {
|
|
|
4207
4201
|
{
|
|
4208
4202
|
className: "sc-chat--disconnected-icon-wrapper",
|
|
4209
4203
|
style: { backgroundColor: e.messageList.bg },
|
|
4210
|
-
children: n ? /* @__PURE__ */ a.jsx(
|
|
4211
|
-
/* @__PURE__ */ a.jsx(
|
|
4204
|
+
children: n ? /* @__PURE__ */ a.jsx(qe, { className: "loading-image" }) : /* @__PURE__ */ a.jsxs("div", { className: "sc-chat--disconnected-icon", children: [
|
|
4205
|
+
/* @__PURE__ */ a.jsx(Me, {}),
|
|
4212
4206
|
/* @__PURE__ */ a.jsx(
|
|
4213
4207
|
"h3",
|
|
4214
4208
|
{
|
|
@@ -4239,7 +4233,7 @@ var x1 = { exports: {} };
|
|
|
4239
4233
|
(function(f, e) {
|
|
4240
4234
|
u.exports = e();
|
|
4241
4235
|
})(dD, function() {
|
|
4242
|
-
var f = 1e3, e = 6e4, t = 36e5, n = "millisecond", r = "second", s = "minute", F = "hour", d = "day", o = "week", c = "month", l = "quarter", j = "year",
|
|
4236
|
+
var f = 1e3, e = 6e4, t = 36e5, n = "millisecond", r = "second", s = "minute", F = "hour", d = "day", o = "week", c = "month", l = "quarter", j = "year", v = "date", C = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, x = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) {
|
|
4243
4237
|
var E = ["th", "st", "nd", "rd"], h = k % 100;
|
|
4244
4238
|
return "[" + k + (E[(h - 20) % 10] || E[h] || E[0]) + "]";
|
|
4245
4239
|
} }, T = function(k, E, h) {
|
|
@@ -4255,14 +4249,14 @@ var x1 = { exports: {} };
|
|
|
4255
4249
|
}, a: function(k) {
|
|
4256
4250
|
return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
|
|
4257
4251
|
}, p: function(k) {
|
|
4258
|
-
return { M: c, y: j, w: o, d, D:
|
|
4252
|
+
return { M: c, y: j, w: o, d, D: v, h: F, m: s, s: r, ms: n, Q: l }[k] || String(k || "").toLowerCase().replace(/s$/, "");
|
|
4259
4253
|
}, u: function(k) {
|
|
4260
4254
|
return k === void 0;
|
|
4261
4255
|
} }, B = "en", I = {};
|
|
4262
|
-
I[B] =
|
|
4256
|
+
I[B] = g;
|
|
4263
4257
|
var P = "$isDayjsObject", q = function(k) {
|
|
4264
4258
|
return k instanceof hu || !(!k || !k[P]);
|
|
4265
|
-
},
|
|
4259
|
+
}, m = function k(E, h, A) {
|
|
4266
4260
|
var p;
|
|
4267
4261
|
if (!E) return B;
|
|
4268
4262
|
if (typeof E == "string") {
|
|
@@ -4279,23 +4273,23 @@ var x1 = { exports: {} };
|
|
|
4279
4273
|
if (q(k)) return k.clone();
|
|
4280
4274
|
var h = typeof E == "object" ? E : {};
|
|
4281
4275
|
return h.date = k, h.args = arguments, new hu(h);
|
|
4282
|
-
},
|
|
4283
|
-
|
|
4276
|
+
}, L = _;
|
|
4277
|
+
L.l = m, L.i = q, L.w = function(k, E) {
|
|
4284
4278
|
return O(k, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
|
|
4285
4279
|
};
|
|
4286
4280
|
var hu = function() {
|
|
4287
4281
|
function k(h) {
|
|
4288
|
-
this.$L =
|
|
4282
|
+
this.$L = m(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[P] = !0;
|
|
4289
4283
|
}
|
|
4290
4284
|
var E = k.prototype;
|
|
4291
4285
|
return E.parse = function(h) {
|
|
4292
4286
|
this.$d = function(A) {
|
|
4293
4287
|
var p = A.date, R = A.utc;
|
|
4294
4288
|
if (p === null) return /* @__PURE__ */ new Date(NaN);
|
|
4295
|
-
if (
|
|
4289
|
+
if (L.u(p)) return /* @__PURE__ */ new Date();
|
|
4296
4290
|
if (p instanceof Date) return new Date(p);
|
|
4297
4291
|
if (typeof p == "string" && !/Z$/i.test(p)) {
|
|
4298
|
-
var N = p.match(
|
|
4292
|
+
var N = p.match(y);
|
|
4299
4293
|
if (N) {
|
|
4300
4294
|
var M = N[2] - 1 || 0, V = (N[7] || "0").substring(0, 3);
|
|
4301
4295
|
return R ? new Date(Date.UTC(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V)) : new Date(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V);
|
|
@@ -4307,7 +4301,7 @@ var x1 = { exports: {} };
|
|
|
4307
4301
|
var h = this.$d;
|
|
4308
4302
|
this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
|
|
4309
4303
|
}, E.$utils = function() {
|
|
4310
|
-
return
|
|
4304
|
+
return L;
|
|
4311
4305
|
}, E.isValid = function() {
|
|
4312
4306
|
return this.$d.toString() !== C;
|
|
4313
4307
|
}, E.isSame = function(h, A) {
|
|
@@ -4318,17 +4312,17 @@ var x1 = { exports: {} };
|
|
|
4318
4312
|
}, E.isBefore = function(h, A) {
|
|
4319
4313
|
return this.endOf(A) < O(h);
|
|
4320
4314
|
}, E.$g = function(h, A, p) {
|
|
4321
|
-
return
|
|
4315
|
+
return L.u(h) ? this[A] : this.set(p, h);
|
|
4322
4316
|
}, E.unix = function() {
|
|
4323
4317
|
return Math.floor(this.valueOf() / 1e3);
|
|
4324
4318
|
}, E.valueOf = function() {
|
|
4325
4319
|
return this.$d.getTime();
|
|
4326
4320
|
}, E.startOf = function(h, A) {
|
|
4327
|
-
var p = this, R =
|
|
4328
|
-
var
|
|
4329
|
-
return R ?
|
|
4321
|
+
var p = this, R = !!L.u(A) || A, N = L.p(h), M = function(Bu, ru) {
|
|
4322
|
+
var ou = L.w(p.$u ? Date.UTC(p.$y, ru, Bu) : new Date(p.$y, ru, Bu), p);
|
|
4323
|
+
return R ? ou : ou.endOf(d);
|
|
4330
4324
|
}, V = function(Bu, ru) {
|
|
4331
|
-
return
|
|
4325
|
+
return L.w(p.toDate()[Bu].apply(p.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ru)), p);
|
|
4332
4326
|
}, J = this.$W, z = this.$M, Q = this.$D, tu = "set" + (this.$u ? "UTC" : "");
|
|
4333
4327
|
switch (N) {
|
|
4334
4328
|
case j:
|
|
@@ -4336,10 +4330,10 @@ var x1 = { exports: {} };
|
|
|
4336
4330
|
case c:
|
|
4337
4331
|
return R ? M(1, z) : M(0, z + 1);
|
|
4338
4332
|
case o:
|
|
4339
|
-
var
|
|
4333
|
+
var Cu = this.$locale().weekStart || 0, _u = (J < Cu ? J + 7 : J) - Cu;
|
|
4340
4334
|
return M(R ? Q - _u : Q + (6 - _u), z);
|
|
4341
4335
|
case d:
|
|
4342
|
-
case
|
|
4336
|
+
case v:
|
|
4343
4337
|
return V(tu + "Hours", 0);
|
|
4344
4338
|
case F:
|
|
4345
4339
|
return V(tu + "Minutes", 1);
|
|
@@ -4353,73 +4347,73 @@ var x1 = { exports: {} };
|
|
|
4353
4347
|
}, E.endOf = function(h) {
|
|
4354
4348
|
return this.startOf(h, !1);
|
|
4355
4349
|
}, E.$set = function(h, A) {
|
|
4356
|
-
var p, R =
|
|
4350
|
+
var p, R = L.p(h), N = "set" + (this.$u ? "UTC" : ""), M = (p = {}, p[d] = N + "Date", p[v] = N + "Date", p[c] = N + "Month", p[j] = N + "FullYear", p[F] = N + "Hours", p[s] = N + "Minutes", p[r] = N + "Seconds", p[n] = N + "Milliseconds", p)[R], V = R === d ? this.$D + (A - this.$W) : A;
|
|
4357
4351
|
if (R === c || R === j) {
|
|
4358
|
-
var J = this.clone().set(
|
|
4359
|
-
J.$d[M](V), J.init(), this.$d = J.set(
|
|
4352
|
+
var J = this.clone().set(v, 1);
|
|
4353
|
+
J.$d[M](V), J.init(), this.$d = J.set(v, Math.min(this.$D, J.daysInMonth())).$d;
|
|
4360
4354
|
} else M && this.$d[M](V);
|
|
4361
4355
|
return this.init(), this;
|
|
4362
4356
|
}, E.set = function(h, A) {
|
|
4363
4357
|
return this.clone().$set(h, A);
|
|
4364
4358
|
}, E.get = function(h) {
|
|
4365
|
-
return this[
|
|
4359
|
+
return this[L.p(h)]();
|
|
4366
4360
|
}, E.add = function(h, A) {
|
|
4367
4361
|
var p, R = this;
|
|
4368
4362
|
h = Number(h);
|
|
4369
|
-
var N =
|
|
4363
|
+
var N = L.p(A), M = function(z) {
|
|
4370
4364
|
var Q = O(R);
|
|
4371
|
-
return
|
|
4365
|
+
return L.w(Q.date(Q.date() + Math.round(z * h)), R);
|
|
4372
4366
|
};
|
|
4373
4367
|
if (N === c) return this.set(c, this.$M + h);
|
|
4374
4368
|
if (N === j) return this.set(j, this.$y + h);
|
|
4375
4369
|
if (N === d) return M(1);
|
|
4376
4370
|
if (N === o) return M(7);
|
|
4377
4371
|
var V = (p = {}, p[s] = e, p[F] = t, p[r] = f, p)[N] || 1, J = this.$d.getTime() + h * V;
|
|
4378
|
-
return
|
|
4372
|
+
return L.w(J, this);
|
|
4379
4373
|
}, E.subtract = function(h, A) {
|
|
4380
4374
|
return this.add(-1 * h, A);
|
|
4381
4375
|
}, E.format = function(h) {
|
|
4382
4376
|
var A = this, p = this.$locale();
|
|
4383
4377
|
if (!this.isValid()) return p.invalidDate || C;
|
|
4384
|
-
var R = h || "YYYY-MM-DDTHH:mm:ssZ", N =
|
|
4385
|
-
return ru && (ru[
|
|
4378
|
+
var R = h || "YYYY-MM-DDTHH:mm:ssZ", N = L.z(this), M = this.$H, V = this.$m, J = this.$M, z = p.weekdays, Q = p.months, tu = p.meridiem, Cu = function(ru, ou, Pu, Iu) {
|
|
4379
|
+
return ru && (ru[ou] || ru(A, R)) || Pu[ou].slice(0, Iu);
|
|
4386
4380
|
}, _u = function(ru) {
|
|
4387
|
-
return
|
|
4388
|
-
}, Bu = tu || function(ru,
|
|
4381
|
+
return L.s(M % 12 || 12, ru, "0");
|
|
4382
|
+
}, Bu = tu || function(ru, ou, Pu) {
|
|
4389
4383
|
var Iu = ru < 12 ? "AM" : "PM";
|
|
4390
4384
|
return Pu ? Iu.toLowerCase() : Iu;
|
|
4391
4385
|
};
|
|
4392
|
-
return R.replace(x, function(ru,
|
|
4393
|
-
return
|
|
4386
|
+
return R.replace(x, function(ru, ou) {
|
|
4387
|
+
return ou || function(Pu) {
|
|
4394
4388
|
switch (Pu) {
|
|
4395
4389
|
case "YY":
|
|
4396
4390
|
return String(A.$y).slice(-2);
|
|
4397
4391
|
case "YYYY":
|
|
4398
|
-
return
|
|
4392
|
+
return L.s(A.$y, 4, "0");
|
|
4399
4393
|
case "M":
|
|
4400
4394
|
return J + 1;
|
|
4401
4395
|
case "MM":
|
|
4402
|
-
return
|
|
4396
|
+
return L.s(J + 1, 2, "0");
|
|
4403
4397
|
case "MMM":
|
|
4404
|
-
return
|
|
4398
|
+
return Cu(p.monthsShort, J, Q, 3);
|
|
4405
4399
|
case "MMMM":
|
|
4406
|
-
return
|
|
4400
|
+
return Cu(Q, J);
|
|
4407
4401
|
case "D":
|
|
4408
4402
|
return A.$D;
|
|
4409
4403
|
case "DD":
|
|
4410
|
-
return
|
|
4404
|
+
return L.s(A.$D, 2, "0");
|
|
4411
4405
|
case "d":
|
|
4412
4406
|
return String(A.$W);
|
|
4413
4407
|
case "dd":
|
|
4414
|
-
return
|
|
4408
|
+
return Cu(p.weekdaysMin, A.$W, z, 2);
|
|
4415
4409
|
case "ddd":
|
|
4416
|
-
return
|
|
4410
|
+
return Cu(p.weekdaysShort, A.$W, z, 3);
|
|
4417
4411
|
case "dddd":
|
|
4418
4412
|
return z[A.$W];
|
|
4419
4413
|
case "H":
|
|
4420
4414
|
return String(M);
|
|
4421
4415
|
case "HH":
|
|
4422
|
-
return
|
|
4416
|
+
return L.s(M, 2, "0");
|
|
4423
4417
|
case "h":
|
|
4424
4418
|
return _u(1);
|
|
4425
4419
|
case "hh":
|
|
@@ -4431,13 +4425,13 @@ var x1 = { exports: {} };
|
|
|
4431
4425
|
case "m":
|
|
4432
4426
|
return String(V);
|
|
4433
4427
|
case "mm":
|
|
4434
|
-
return
|
|
4428
|
+
return L.s(V, 2, "0");
|
|
4435
4429
|
case "s":
|
|
4436
4430
|
return String(A.$s);
|
|
4437
4431
|
case "ss":
|
|
4438
|
-
return
|
|
4432
|
+
return L.s(A.$s, 2, "0");
|
|
4439
4433
|
case "SSS":
|
|
4440
|
-
return
|
|
4434
|
+
return L.s(A.$ms, 3, "0");
|
|
4441
4435
|
case "Z":
|
|
4442
4436
|
return N;
|
|
4443
4437
|
}
|
|
@@ -4447,8 +4441,8 @@ var x1 = { exports: {} };
|
|
|
4447
4441
|
}, E.utcOffset = function() {
|
|
4448
4442
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
4449
4443
|
}, E.diff = function(h, A, p) {
|
|
4450
|
-
var R, N = this, M =
|
|
4451
|
-
return
|
|
4444
|
+
var R, N = this, M = L.p(A), V = O(h), J = (V.utcOffset() - this.utcOffset()) * e, z = this - V, Q = function() {
|
|
4445
|
+
return L.m(N, V);
|
|
4452
4446
|
};
|
|
4453
4447
|
switch (M) {
|
|
4454
4448
|
case j:
|
|
@@ -4478,17 +4472,17 @@ var x1 = { exports: {} };
|
|
|
4478
4472
|
default:
|
|
4479
4473
|
R = z;
|
|
4480
4474
|
}
|
|
4481
|
-
return p ? R :
|
|
4475
|
+
return p ? R : L.a(R);
|
|
4482
4476
|
}, E.daysInMonth = function() {
|
|
4483
4477
|
return this.endOf(c).$D;
|
|
4484
4478
|
}, E.$locale = function() {
|
|
4485
4479
|
return I[this.$L];
|
|
4486
4480
|
}, E.locale = function(h, A) {
|
|
4487
4481
|
if (!h) return this.$L;
|
|
4488
|
-
var p = this.clone(), R =
|
|
4482
|
+
var p = this.clone(), R = m(h, A, !0);
|
|
4489
4483
|
return R && (p.$L = R), p;
|
|
4490
4484
|
}, E.clone = function() {
|
|
4491
|
-
return
|
|
4485
|
+
return L.w(this.$d, this);
|
|
4492
4486
|
}, E.toDate = function() {
|
|
4493
4487
|
return new Date(this.valueOf());
|
|
4494
4488
|
}, E.toJSON = function() {
|
|
@@ -4499,20 +4493,20 @@ var x1 = { exports: {} };
|
|
|
4499
4493
|
return this.$d.toUTCString();
|
|
4500
4494
|
}, k;
|
|
4501
4495
|
}(), fu = hu.prototype;
|
|
4502
|
-
return O.prototype = fu, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", d], ["$M", c], ["$y", j], ["$D",
|
|
4496
|
+
return O.prototype = fu, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", d], ["$M", c], ["$y", j], ["$D", v]].forEach(function(k) {
|
|
4503
4497
|
fu[k[1]] = function(E) {
|
|
4504
4498
|
return this.$g(E, k[0], k[1]);
|
|
4505
4499
|
};
|
|
4506
4500
|
}), O.extend = function(k, E) {
|
|
4507
4501
|
return k.$i || (k(E, hu, O), k.$i = !0), O;
|
|
4508
|
-
}, O.locale =
|
|
4502
|
+
}, O.locale = m, O.isDayjs = q, O.unix = function(k) {
|
|
4509
4503
|
return O(1e3 * k);
|
|
4510
4504
|
}, O.en = I[B], O.Ls = I, O.p = {}, O;
|
|
4511
4505
|
});
|
|
4512
4506
|
})(x1);
|
|
4513
4507
|
var k1 = x1.exports;
|
|
4514
4508
|
const j1 = /* @__PURE__ */ sf(k1);
|
|
4515
|
-
var
|
|
4509
|
+
var Ue = { exports: {} };
|
|
4516
4510
|
(function(u, D) {
|
|
4517
4511
|
(function(f, e) {
|
|
4518
4512
|
u.exports = e();
|
|
@@ -4522,8 +4516,8 @@ var ze = { exports: {} };
|
|
|
4522
4516
|
return "[" + f + (e[(t - 20) % 10] || e[t] || e[0]) + "]";
|
|
4523
4517
|
} };
|
|
4524
4518
|
});
|
|
4525
|
-
})(
|
|
4526
|
-
var
|
|
4519
|
+
})(Ue);
|
|
4520
|
+
var Ve = { exports: {} };
|
|
4527
4521
|
(function(u, D) {
|
|
4528
4522
|
(function(f, e) {
|
|
4529
4523
|
u.exports = e(k1);
|
|
@@ -4536,7 +4530,7 @@ var Ue = { exports: {} };
|
|
|
4536
4530
|
} };
|
|
4537
4531
|
return t.default.locale(n, null, !0), n;
|
|
4538
4532
|
});
|
|
4539
|
-
})(
|
|
4533
|
+
})(Ve);
|
|
4540
4534
|
var S1 = { exports: {} };
|
|
4541
4535
|
(function(u, D) {
|
|
4542
4536
|
(function(f, e) {
|
|
@@ -4549,19 +4543,19 @@ var S1 = { exports: {} };
|
|
|
4549
4543
|
return n.fromToBase(d, o, c, l);
|
|
4550
4544
|
}
|
|
4551
4545
|
t.en.relativeTime = r, n.fromToBase = function(d, o, c, l, j) {
|
|
4552
|
-
for (var
|
|
4553
|
-
var B =
|
|
4554
|
-
B.d && (
|
|
4555
|
-
var I = (f.rounding || Math.round)(Math.abs(
|
|
4556
|
-
if (
|
|
4557
|
-
I <= 1 && _ > 0 && (B =
|
|
4546
|
+
for (var v, C, y, x = c.$locale().relativeTime || r, g = f.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], T = g.length, _ = 0; _ < T; _ += 1) {
|
|
4547
|
+
var B = g[_];
|
|
4548
|
+
B.d && (v = l ? t(d).diff(c, B.d, !0) : c.diff(d, B.d, !0));
|
|
4549
|
+
var I = (f.rounding || Math.round)(Math.abs(v));
|
|
4550
|
+
if (y = v > 0, I <= B.r || !B.r) {
|
|
4551
|
+
I <= 1 && _ > 0 && (B = g[_ - 1]);
|
|
4558
4552
|
var P = x[B.l];
|
|
4559
|
-
j && (I = j("" + I)), C = typeof P == "string" ? P.replace("%d", I) : P(I, o, B.l,
|
|
4553
|
+
j && (I = j("" + I)), C = typeof P == "string" ? P.replace("%d", I) : P(I, o, B.l, y);
|
|
4560
4554
|
break;
|
|
4561
4555
|
}
|
|
4562
4556
|
}
|
|
4563
4557
|
if (o) return C;
|
|
4564
|
-
var q =
|
|
4558
|
+
var q = y ? x.future : x.past;
|
|
4565
4559
|
return typeof q == "function" ? q(C) : q.replace("%s", C);
|
|
4566
4560
|
}, n.to = function(d, o) {
|
|
4567
4561
|
return s(d, o, this, !0);
|
|
@@ -4579,8 +4573,8 @@ var S1 = { exports: {} };
|
|
|
4579
4573
|
};
|
|
4580
4574
|
});
|
|
4581
4575
|
})(S1);
|
|
4582
|
-
var
|
|
4583
|
-
const
|
|
4576
|
+
var He = S1.exports;
|
|
4577
|
+
const We = /* @__PURE__ */ sf(He), T1 = ({
|
|
4584
4578
|
width: u = "18",
|
|
4585
4579
|
height: D = "18",
|
|
4586
4580
|
...f
|
|
@@ -4646,7 +4640,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4646
4640
|
] })
|
|
4647
4641
|
}
|
|
4648
4642
|
), vD = ({ message: u }) => {
|
|
4649
|
-
const { setPayload: D, send: f, setWebviewUrl: e } =
|
|
4643
|
+
const { setPayload: D, send: f, setWebviewUrl: e } = du(), t = pu(), { colors: n } = iu(), r = (s, F) => {
|
|
4650
4644
|
F.type === "web_url" && F.url ? F.messenger_extensions ? e(F.url) : window.open(F.url, "_blank") : F.type === "postback" && (D({ text: F.title, payload: F.payload }), f({
|
|
4651
4645
|
event: s,
|
|
4652
4646
|
source: "post-back",
|
|
@@ -4675,10 +4669,10 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4675
4669
|
},
|
|
4676
4670
|
F
|
|
4677
4671
|
)) });
|
|
4678
|
-
},
|
|
4679
|
-
let D =
|
|
4680
|
-
return D =
|
|
4681
|
-
},
|
|
4672
|
+
}, Ye = (u, D = 100) => u.length > D ? u.substr(0, D) + "..." : u, Ke = (u) => u.replace(/\n/g, "<br />"), Je = (u) => {
|
|
4673
|
+
let D = Ye(u, 50);
|
|
4674
|
+
return D = Ke(u), D;
|
|
4675
|
+
}, Ge = ({ message: u }) => /* @__PURE__ */ a.jsx("div", { className: "sc-message--carousel-element-wrapper", children: /* @__PURE__ */ a.jsxs("div", { className: "sc-message--carousel-element", children: [
|
|
4682
4676
|
u.image_url && /* @__PURE__ */ a.jsx(
|
|
4683
4677
|
"div",
|
|
4684
4678
|
{
|
|
@@ -4692,7 +4686,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4692
4686
|
"p",
|
|
4693
4687
|
{
|
|
4694
4688
|
dangerouslySetInnerHTML: {
|
|
4695
|
-
__html:
|
|
4689
|
+
__html: Je(u.subtitle)
|
|
4696
4690
|
}
|
|
4697
4691
|
}
|
|
4698
4692
|
)
|
|
@@ -4703,10 +4697,10 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4703
4697
|
message: { data: { buttons: u.buttons } }
|
|
4704
4698
|
}
|
|
4705
4699
|
)
|
|
4706
|
-
] }) }),
|
|
4700
|
+
] }) }), Xe = ({
|
|
4707
4701
|
messageCarousel: u
|
|
4708
4702
|
}) => {
|
|
4709
|
-
const { colors: D } =
|
|
4703
|
+
const { colors: D } = iu(), [f, e] = U(0), t = u.data.elements, n = () => {
|
|
4710
4704
|
e(
|
|
4711
4705
|
(d) => (d + t.length - 1) % t.length
|
|
4712
4706
|
);
|
|
@@ -4727,7 +4721,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4727
4721
|
{
|
|
4728
4722
|
className: "sc-message--carousel-inner",
|
|
4729
4723
|
style: { transform: `translateX(-${f * 100}%)` },
|
|
4730
|
-
children: t.map((d, o) => /* @__PURE__ */ a.jsx(
|
|
4724
|
+
children: t.map((d, o) => /* @__PURE__ */ a.jsx(Ge, { message: d, idx: o }, o))
|
|
4731
4725
|
}
|
|
4732
4726
|
),
|
|
4733
4727
|
F && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -4751,15 +4745,15 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4751
4745
|
]
|
|
4752
4746
|
}
|
|
4753
4747
|
);
|
|
4754
|
-
},
|
|
4748
|
+
}, Ze = ({
|
|
4755
4749
|
viewBox: u = "0 0 512 512",
|
|
4756
4750
|
...D
|
|
4757
4751
|
}) => /* @__PURE__ */ a.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: /* @__PURE__ */ a.jsxs("g", { "data-name": "1", children: [
|
|
4758
4752
|
/* @__PURE__ */ a.jsx("path", { d: "M378.83 450H150a50.17 50.17 0 01-50.11-50.11V98.11A50.17 50.17 0 01150 48h150.1a15 15 0 0110.61 4.39l113.84 113.88a15 15 0 014.39 10.61v223A50.17 50.17 0 01378.83 450zM150 78a20.13 20.13 0 00-20.11 20.11v301.78A20.13 20.13 0 00150 420h228.83a20.13 20.13 0 0020.11-20.11v-216.8L293.85 78z" }),
|
|
4759
4753
|
/* @__PURE__ */ a.jsx("path", { d: "M413.94 191.88h-78.77a50.17 50.17 0 01-50.11-50.11V63a15 15 0 0130 0v78.77a20.13 20.13 0 0020.11 20.11h78.77a15 15 0 010 30zM264.4 375a15 15 0 01-10.61-4.4l-54.45-54.44a15 15 0 1121.21-21.22l43.85 43.84 43.84-43.84a15 15 0 1121.21 21.22L275 370.55a15 15 0 01-10.6 4.45z" }),
|
|
4760
4754
|
/* @__PURE__ */ a.jsx("path", { d: "M264.4 365a15 15 0 01-15-15V231a15 15 0 0130 0v119a15 15 0 01-15 15z" })
|
|
4761
|
-
] }) }),
|
|
4762
|
-
const { t: D } = zu(), { colors: f } =
|
|
4755
|
+
] }) }), Qe = ({ message: u }) => {
|
|
4756
|
+
const { t: D } = zu(), { colors: f } = iu(), e = f[u.direction || uu.received];
|
|
4763
4757
|
if (!("type" in u.data))
|
|
4764
4758
|
throw new Error("Unable to detect type for file message");
|
|
4765
4759
|
if (u.data && u.data.type !== "image" && u.data.type !== "audio" && u.data.type !== "video" && u.data.type !== "file")
|
|
@@ -4798,7 +4792,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4798
4792
|
rel: "noopener noreferrer",
|
|
4799
4793
|
download: !0,
|
|
4800
4794
|
children: [
|
|
4801
|
-
/* @__PURE__ */ a.jsx(
|
|
4795
|
+
/* @__PURE__ */ a.jsx(Ze, {}),
|
|
4802
4796
|
D("messages.file_message.download")
|
|
4803
4797
|
]
|
|
4804
4798
|
}
|
|
@@ -4808,9 +4802,9 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4808
4802
|
]
|
|
4809
4803
|
}
|
|
4810
4804
|
);
|
|
4811
|
-
},
|
|
4805
|
+
}, u3 = ({ message: u }) => {
|
|
4812
4806
|
var d;
|
|
4813
|
-
const { colors: D } =
|
|
4807
|
+
const { colors: D } = iu(), f = Nu(), [e, t] = U(!1), n = gu(null);
|
|
4814
4808
|
if (Z(() => {
|
|
4815
4809
|
const o = new IntersectionObserver((c) => {
|
|
4816
4810
|
!e && c[0].intersectionRatio > 0 && t(!0);
|
|
@@ -4846,8 +4840,8 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4846
4840
|
)
|
|
4847
4841
|
}
|
|
4848
4842
|
);
|
|
4849
|
-
},
|
|
4850
|
-
const { colors: D } =
|
|
4843
|
+
}, D3 = ({ messageList: u }) => {
|
|
4844
|
+
const { colors: D } = iu(), f = (r) => {
|
|
4851
4845
|
let s = e(r, 50);
|
|
4852
4846
|
return s = t(r), s;
|
|
4853
4847
|
}, e = (r, s = 100) => r.length > s ? r.substr(0, s) + "..." : r, t = (r) => r.replace(/\n/g, "<br />");
|
|
@@ -4934,16 +4928,16 @@ function CD(u, D) {
|
|
|
4934
4928
|
}
|
|
4935
4929
|
u.prototype = D === null ? Object.create(D) : (f.prototype = D.prototype, new f());
|
|
4936
4930
|
}
|
|
4937
|
-
var
|
|
4938
|
-
return
|
|
4931
|
+
var Fu = function() {
|
|
4932
|
+
return Fu = Object.assign || function(D) {
|
|
4939
4933
|
for (var f, e = 1, t = arguments.length; e < t; e++) {
|
|
4940
4934
|
f = arguments[e];
|
|
4941
4935
|
for (var n in f) Object.prototype.hasOwnProperty.call(f, n) && (D[n] = f[n]);
|
|
4942
4936
|
}
|
|
4943
4937
|
return D;
|
|
4944
|
-
},
|
|
4938
|
+
}, Fu.apply(this, arguments);
|
|
4945
4939
|
};
|
|
4946
|
-
function
|
|
4940
|
+
function f3(u, D) {
|
|
4947
4941
|
var f = typeof Symbol == "function" && u[Symbol.iterator];
|
|
4948
4942
|
if (!f) return u;
|
|
4949
4943
|
var e = f.call(u), t, n = [], r;
|
|
@@ -4960,16 +4954,16 @@ function D3(u, D) {
|
|
|
4960
4954
|
}
|
|
4961
4955
|
return n;
|
|
4962
4956
|
}
|
|
4963
|
-
function
|
|
4957
|
+
function e3(u, D, f) {
|
|
4964
4958
|
if (f || arguments.length === 2) for (var e = 0, t = D.length, n; e < t; e++)
|
|
4965
4959
|
(n || !(e in D)) && (n || (n = Array.prototype.slice.call(D, 0, e)), n[e] = D[e]);
|
|
4966
4960
|
return u.concat(n || Array.prototype.slice.call(D));
|
|
4967
4961
|
}
|
|
4968
|
-
var
|
|
4962
|
+
var t3 = "4.1.5", n3 = Object.prototype.hasOwnProperty;
|
|
4969
4963
|
function wu(u) {
|
|
4970
4964
|
return typeof u == "boolean";
|
|
4971
4965
|
}
|
|
4972
|
-
function
|
|
4966
|
+
function r3(u, D, f) {
|
|
4973
4967
|
var e;
|
|
4974
4968
|
return u.length > D && (f == null ? (f = "…", e = 3) : e = f.length, u = u.substring(0, D - e) + f), u;
|
|
4975
4969
|
}
|
|
@@ -4977,7 +4971,7 @@ function Ku(u, D) {
|
|
|
4977
4971
|
for (var f = u.length - 1; f >= 0; f--)
|
|
4978
4972
|
D(u[f]) === !0 && u.splice(f, 1);
|
|
4979
4973
|
}
|
|
4980
|
-
function
|
|
4974
|
+
function Gu(u) {
|
|
4981
4975
|
throw new Error("Unhandled case for value: '".concat(u, "'"));
|
|
4982
4976
|
}
|
|
4983
4977
|
var bD = /\s+/, N1 = (
|
|
@@ -5029,16 +5023,16 @@ var bD = /\s+/, N1 = (
|
|
|
5029
5023
|
}, u.prototype.buildAttrsStr = function() {
|
|
5030
5024
|
var D = this.getAttrs(), f = [];
|
|
5031
5025
|
for (var e in D)
|
|
5032
|
-
|
|
5026
|
+
n3.call(D, e) && f.push(e + '="' + D[e] + '"');
|
|
5033
5027
|
return f.join(" ");
|
|
5034
5028
|
}, u;
|
|
5035
5029
|
}()
|
|
5036
5030
|
);
|
|
5037
|
-
function
|
|
5031
|
+
function a3(u, D, f) {
|
|
5038
5032
|
var e, t;
|
|
5039
5033
|
if (f == null ? (f = "…", t = 3, e = 8) : (t = f.length, e = f.length), u.length <= D)
|
|
5040
5034
|
return u;
|
|
5041
|
-
var n = D - t, r =
|
|
5035
|
+
var n = D - t, r = s3(u);
|
|
5042
5036
|
if (r.query) {
|
|
5043
5037
|
var s = r.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);
|
|
5044
5038
|
s && (r.query = r.query.substr(0, s[1].length), u = Vf(r));
|
|
@@ -5074,10 +5068,10 @@ function r3(u, D, f) {
|
|
|
5074
5068
|
}
|
|
5075
5069
|
if (F.length <= D)
|
|
5076
5070
|
return F;
|
|
5077
|
-
var
|
|
5078
|
-
return n > 0 && (
|
|
5071
|
+
var v = "";
|
|
5072
|
+
return n > 0 && (v = F.substr(-1 * Math.floor(n / 2))), (F.substr(0, Math.ceil(n / 2)) + f + v).substr(0, n + e);
|
|
5079
5073
|
}
|
|
5080
|
-
function
|
|
5074
|
+
function s3(u) {
|
|
5081
5075
|
var D = {}, f = u, e = f.match(/^([a-z]+):\/\//i);
|
|
5082
5076
|
return e && (D.scheme = e[1], f = f.slice(e[0].length)), e = f.match(/^(.*?)(?=(\?|#|\/|$))/i), e && (D.host = e[1], f = f.slice(e[0].length)), e = f.match(/^\/(.*?)(?=(\?|#|$))/i), e && (D.path = e[1], f = f.slice(e[0].length)), e = f.match(/^\?(.*?)(?=(#|$))/i), e && (D.query = e[1], f = f.slice(e[0].length)), e = f.match(/^#(.*?)$/i), e && (D.fragment = e[1]), D;
|
|
5083
5077
|
}
|
|
@@ -5089,7 +5083,7 @@ function zD(u, D, f) {
|
|
|
5089
5083
|
var e = D / 2, t = Math.ceil(e), n = -1 * Math.floor(e), r = "";
|
|
5090
5084
|
return n < 0 && (r = u.substr(n)), u.substr(0, t) + f + r;
|
|
5091
5085
|
}
|
|
5092
|
-
function
|
|
5086
|
+
function F3(u, D, f) {
|
|
5093
5087
|
if (u.length <= D)
|
|
5094
5088
|
return u;
|
|
5095
5089
|
var e, t;
|
|
@@ -5097,10 +5091,10 @@ function s3(u, D, f) {
|
|
|
5097
5091
|
var n = D - t, r = "";
|
|
5098
5092
|
return n > 0 && (r = u.substr(-1 * Math.floor(n / 2))), (u.substr(0, Math.ceil(n / 2)) + f + r).substr(0, n + e);
|
|
5099
5093
|
}
|
|
5100
|
-
function
|
|
5101
|
-
return
|
|
5094
|
+
function i3(u, D, f) {
|
|
5095
|
+
return r3(u, D, f);
|
|
5102
5096
|
}
|
|
5103
|
-
var
|
|
5097
|
+
var o3 = (
|
|
5104
5098
|
/** @class */
|
|
5105
5099
|
function() {
|
|
5106
5100
|
function u(D) {
|
|
@@ -5133,7 +5127,7 @@ var i3 = (
|
|
|
5133
5127
|
if (!f.length)
|
|
5134
5128
|
return D;
|
|
5135
5129
|
var e = f.length, t = f.location;
|
|
5136
|
-
return t === "smart" ?
|
|
5130
|
+
return t === "smart" ? a3(D, e) : t === "middle" ? F3(D, e) : i3(D, e);
|
|
5137
5131
|
}, u;
|
|
5138
5132
|
}()
|
|
5139
5133
|
), cD = (
|
|
@@ -5155,7 +5149,7 @@ var i3 = (
|
|
|
5155
5149
|
}, u;
|
|
5156
5150
|
}()
|
|
5157
5151
|
);
|
|
5158
|
-
function
|
|
5152
|
+
function d3(u) {
|
|
5159
5153
|
return u >= 0 && u <= 31 || u == 127;
|
|
5160
5154
|
}
|
|
5161
5155
|
function rD(u) {
|
|
@@ -5167,73 +5161,73 @@ function Eu(u) {
|
|
|
5167
5161
|
function hf(u) {
|
|
5168
5162
|
return u == 34 || u == 39;
|
|
5169
5163
|
}
|
|
5170
|
-
function
|
|
5164
|
+
function Xu(u) {
|
|
5171
5165
|
return u < 8232 ? u < 160 ? u >= 9 && u <= 13 || u == 32 : u < 5760 ? u == 160 : u == 5760 || u >= 8192 && u <= 8202 : u < 8287 ? u >= 8232 && u <= 8233 || u == 8239 : u < 12288 ? u == 8287 : u == 12288 || u == 65279;
|
|
5172
5166
|
}
|
|
5173
|
-
function
|
|
5167
|
+
function Zu(u) {
|
|
5174
5168
|
return u < 4800 ? u < 2949 ? u < 2451 ? u < 1425 ? u < 768 ? u < 192 ? u < 169 ? u < 65 ? u >= 48 && u <= 57 : u >= 65 && u <= 90 || u >= 97 && u <= 122 : u < 181 ? u >= 169 && u <= 170 || u == 174 : u == 181 || u == 186 : u < 710 ? u < 216 ? u >= 192 && u <= 214 : u >= 216 && u <= 246 || u >= 248 && u <= 705 : u < 748 ? u >= 710 && u <= 721 || u >= 736 && u <= 740 : u == 748 || u == 750 : u < 910 ? u < 895 ? u < 886 ? u >= 768 && u <= 884 : u >= 886 && u <= 887 || u >= 890 && u <= 893 : u < 904 ? u == 895 || u == 902 : u >= 904 && u <= 906 || u == 908 : u < 1155 ? u < 931 ? u >= 910 && u <= 929 : u >= 931 && u <= 1013 || u >= 1015 && u <= 1153 : u < 1369 ? u >= 1155 && u <= 1327 || u >= 1329 && u <= 1366 : u == 1369 || u >= 1377 && u <= 1415 : u < 1808 ? u < 1552 ? u < 1476 ? u < 1471 ? u >= 1425 && u <= 1469 : u == 1471 || u >= 1473 && u <= 1474 : u < 1488 ? u >= 1476 && u <= 1477 || u == 1479 : u >= 1488 && u <= 1514 || u >= 1520 && u <= 1522 : u < 1749 ? u < 1568 ? u >= 1552 && u <= 1562 : u >= 1568 && u <= 1641 || u >= 1646 && u <= 1747 : u < 1770 ? u >= 1749 && u <= 1756 || u >= 1759 && u <= 1768 : u >= 1770 && u <= 1788 || u == 1791 : u < 2230 ? u < 2042 ? u < 1869 ? u >= 1808 && u <= 1866 : u >= 1869 && u <= 1969 || u >= 1984 && u <= 2037 : u < 2112 ? u == 2042 || u >= 2048 && u <= 2093 : u >= 2112 && u <= 2139 || u >= 2208 && u <= 2228 : u < 2406 ? u < 2260 ? u >= 2230 && u <= 2237 : u >= 2260 && u <= 2273 || u >= 2275 && u <= 2403 : u < 2437 ? u >= 2406 && u <= 2415 || u >= 2417 && u <= 2435 : u >= 2437 && u <= 2444 || u >= 2447 && u <= 2448 : u < 2693 ? u < 2579 ? u < 2519 ? u < 2486 ? u < 2474 ? u >= 2451 && u <= 2472 : u >= 2474 && u <= 2480 || u == 2482 : u < 2503 ? u >= 2486 && u <= 2489 || u >= 2492 && u <= 2500 : u >= 2503 && u <= 2504 || u >= 2507 && u <= 2510 : u < 2534 ? u < 2524 ? u == 2519 : u >= 2524 && u <= 2525 || u >= 2527 && u <= 2531 : u < 2565 ? u >= 2534 && u <= 2545 || u >= 2561 && u <= 2563 : u >= 2565 && u <= 2570 || u >= 2575 && u <= 2576 : u < 2631 ? u < 2613 ? u < 2602 ? u >= 2579 && u <= 2600 : u >= 2602 && u <= 2608 || u >= 2610 && u <= 2611 : u < 2620 ? u >= 2613 && u <= 2614 || u >= 2616 && u <= 2617 : u == 2620 || u >= 2622 && u <= 2626 : u < 2649 ? u < 2635 ? u >= 2631 && u <= 2632 : u >= 2635 && u <= 2637 || u == 2641 : u < 2662 ? u >= 2649 && u <= 2652 || u == 2654 : u >= 2662 && u <= 2677 || u >= 2689 && u <= 2691 : u < 2821 ? u < 2759 ? u < 2730 ? u < 2703 ? u >= 2693 && u <= 2701 : u >= 2703 && u <= 2705 || u >= 2707 && u <= 2728 : u < 2741 ? u >= 2730 && u <= 2736 || u >= 2738 && u <= 2739 : u >= 2741 && u <= 2745 || u >= 2748 && u <= 2757 : u < 2784 ? u < 2763 ? u >= 2759 && u <= 2761 : u >= 2763 && u <= 2765 || u == 2768 : u < 2809 ? u >= 2784 && u <= 2787 || u >= 2790 && u <= 2799 : u == 2809 || u >= 2817 && u <= 2819 : u < 2887 ? u < 2858 ? u < 2831 ? u >= 2821 && u <= 2828 : u >= 2831 && u <= 2832 || u >= 2835 && u <= 2856 : u < 2869 ? u >= 2858 && u <= 2864 || u >= 2866 && u <= 2867 : u >= 2869 && u <= 2873 || u >= 2876 && u <= 2884 : u < 2911 ? u < 2902 ? u >= 2887 && u <= 2888 || u >= 2891 && u <= 2893 : u >= 2902 && u <= 2903 || u >= 2908 && u <= 2909 : u < 2929 ? u >= 2911 && u <= 2915 || u >= 2918 && u <= 2927 : u == 2929 || u >= 2946 && u <= 2947 : u < 3517 ? u < 3205 ? u < 3046 ? u < 2984 ? u < 2969 ? u < 2958 ? u >= 2949 && u <= 2954 : u >= 2958 && u <= 2960 || u >= 2962 && u <= 2965 : u < 2974 ? u >= 2969 && u <= 2970 || u == 2972 : u >= 2974 && u <= 2975 || u >= 2979 && u <= 2980 : u < 3014 ? u < 2990 ? u >= 2984 && u <= 2986 : u >= 2990 && u <= 3001 || u >= 3006 && u <= 3010 : u < 3024 ? u >= 3014 && u <= 3016 || u >= 3018 && u <= 3021 : u == 3024 || u == 3031 : u < 3142 ? u < 3086 ? u < 3072 ? u >= 3046 && u <= 3055 : u >= 3072 && u <= 3075 || u >= 3077 && u <= 3084 : u < 3114 ? u >= 3086 && u <= 3088 || u >= 3090 && u <= 3112 : u >= 3114 && u <= 3129 || u >= 3133 && u <= 3140 : u < 3160 ? u < 3146 ? u >= 3142 && u <= 3144 : u >= 3146 && u <= 3149 || u >= 3157 && u <= 3158 : u < 3174 ? u >= 3160 && u <= 3162 || u >= 3168 && u <= 3171 : u >= 3174 && u <= 3183 || u >= 3200 && u <= 3203 : u < 3333 ? u < 3274 ? u < 3242 ? u < 3214 ? u >= 3205 && u <= 3212 : u >= 3214 && u <= 3216 || u >= 3218 && u <= 3240 : u < 3260 ? u >= 3242 && u <= 3251 || u >= 3253 && u <= 3257 : u >= 3260 && u <= 3268 || u >= 3270 && u <= 3272 : u < 3296 ? u < 3285 ? u >= 3274 && u <= 3277 : u >= 3285 && u <= 3286 || u == 3294 : u < 3313 ? u >= 3296 && u <= 3299 || u >= 3302 && u <= 3311 : u >= 3313 && u <= 3314 || u >= 3329 && u <= 3331 : u < 3423 ? u < 3389 ? u < 3342 ? u >= 3333 && u <= 3340 : u >= 3342 && u <= 3344 || u >= 3346 && u <= 3386 : u < 3402 ? u >= 3389 && u <= 3396 || u >= 3398 && u <= 3400 : u >= 3402 && u <= 3406 || u >= 3412 && u <= 3415 : u < 3458 ? u < 3430 ? u >= 3423 && u <= 3427 : u >= 3430 && u <= 3439 || u >= 3450 && u <= 3455 : u < 3482 ? u >= 3458 && u <= 3459 || u >= 3461 && u <= 3478 : u >= 3482 && u <= 3505 || u >= 3507 && u <= 3515 : u < 3804 ? u < 3722 ? u < 3570 ? u < 3535 ? u < 3520 ? u == 3517 : u >= 3520 && u <= 3526 || u == 3530 : u < 3544 ? u >= 3535 && u <= 3540 || u == 3542 : u >= 3544 && u <= 3551 || u >= 3558 && u <= 3567 : u < 3664 ? u < 3585 ? u >= 3570 && u <= 3571 : u >= 3585 && u <= 3642 || u >= 3648 && u <= 3662 : u < 3716 ? u >= 3664 && u <= 3673 || u >= 3713 && u <= 3714 : u == 3716 || u >= 3719 && u <= 3720 : u < 3754 ? u < 3737 ? u < 3725 ? u == 3722 : u == 3725 || u >= 3732 && u <= 3735 : u < 3749 ? u >= 3737 && u <= 3743 || u >= 3745 && u <= 3747 : u == 3749 || u == 3751 : u < 3776 ? u < 3757 ? u >= 3754 && u <= 3755 : u >= 3757 && u <= 3769 || u >= 3771 && u <= 3773 : u < 3784 ? u >= 3776 && u <= 3780 || u == 3782 : u >= 3784 && u <= 3789 || u >= 3792 && u <= 3801 : u < 4176 ? u < 3902 ? u < 3872 ? u < 3840 ? u >= 3804 && u <= 3807 : u == 3840 || u >= 3864 && u <= 3865 : u < 3895 ? u >= 3872 && u <= 3881 || u == 3893 : u == 3895 || u == 3897 : u < 3974 ? u < 3913 ? u >= 3902 && u <= 3911 : u >= 3913 && u <= 3948 || u >= 3953 && u <= 3972 : u < 4038 ? u >= 3974 && u <= 3991 || u >= 3993 && u <= 4028 : u == 4038 || u >= 4096 && u <= 4169 : u < 4688 ? u < 4301 ? u < 4256 ? u >= 4176 && u <= 4253 : u >= 4256 && u <= 4293 || u == 4295 : u < 4348 ? u == 4301 || u >= 4304 && u <= 4346 : u >= 4348 && u <= 4680 || u >= 4682 && u <= 4685 : u < 4746 ? u < 4698 ? u >= 4688 && u <= 4694 || u == 4696 : u >= 4698 && u <= 4701 || u >= 4704 && u <= 4744 : u < 4786 ? u >= 4746 && u <= 4749 || u >= 4752 && u <= 4784 : u >= 4786 && u <= 4789 || u >= 4792 && u <= 4798 : u < 11035 ? u < 7416 ? u < 6176 ? u < 5873 ? u < 4992 ? u < 4824 ? u < 4802 ? u == 4800 : u >= 4802 && u <= 4805 || u >= 4808 && u <= 4822 : u < 4888 ? u >= 4824 && u <= 4880 || u >= 4882 && u <= 4885 : u >= 4888 && u <= 4954 || u >= 4957 && u <= 4959 : u < 5121 ? u < 5024 ? u >= 4992 && u <= 5007 : u >= 5024 && u <= 5109 || u >= 5112 && u <= 5117 : u < 5761 ? u >= 5121 && u <= 5740 || u >= 5743 && u <= 5759 : u >= 5761 && u <= 5786 || u >= 5792 && u <= 5866 : u < 6002 ? u < 5920 ? u < 5888 ? u >= 5873 && u <= 5880 : u >= 5888 && u <= 5900 || u >= 5902 && u <= 5908 : u < 5984 ? u >= 5920 && u <= 5940 || u >= 5952 && u <= 5971 : u >= 5984 && u <= 5996 || u >= 5998 && u <= 6e3 : u < 6108 ? u < 6016 ? u >= 6002 && u <= 6003 : u >= 6016 && u <= 6099 || u == 6103 : u < 6155 ? u >= 6108 && u <= 6109 || u >= 6112 && u <= 6121 : u >= 6155 && u <= 6157 || u >= 6160 && u <= 6169 : u < 6783 ? u < 6512 ? u < 6400 ? u < 6272 ? u >= 6176 && u <= 6263 : u >= 6272 && u <= 6314 || u >= 6320 && u <= 6389 : u < 6448 ? u >= 6400 && u <= 6430 || u >= 6432 && u <= 6443 : u >= 6448 && u <= 6459 || u >= 6470 && u <= 6509 : u < 6608 ? u < 6528 ? u >= 6512 && u <= 6516 : u >= 6528 && u <= 6571 || u >= 6576 && u <= 6601 : u < 6688 ? u >= 6608 && u <= 6617 || u >= 6656 && u <= 6683 : u >= 6688 && u <= 6750 || u >= 6752 && u <= 6780 : u < 7040 ? u < 6832 ? u < 6800 ? u >= 6783 && u <= 6793 : u >= 6800 && u <= 6809 || u == 6823 : u < 6992 ? u >= 6832 && u <= 6846 || u >= 6912 && u <= 6987 : u >= 6992 && u <= 7001 || u >= 7019 && u <= 7027 : u < 7245 ? u < 7168 ? u >= 7040 && u <= 7155 : u >= 7168 && u <= 7223 || u >= 7232 && u <= 7241 : u < 7376 ? u >= 7245 && u <= 7293 || u >= 7296 && u <= 7304 : u >= 7376 && u <= 7378 || u >= 7380 && u <= 7414 : u < 8450 ? u < 8130 ? u < 8025 ? u < 7960 ? u < 7424 ? u >= 7416 && u <= 7417 : u >= 7424 && u <= 7669 || u >= 7675 && u <= 7957 : u < 8008 ? u >= 7960 && u <= 7965 || u >= 7968 && u <= 8005 : u >= 8008 && u <= 8013 || u >= 8016 && u <= 8023 : u < 8031 ? u < 8027 ? u == 8025 : u == 8027 || u == 8029 : u < 8118 ? u >= 8031 && u <= 8061 || u >= 8064 && u <= 8116 : u >= 8118 && u <= 8124 || u == 8126 : u < 8205 ? u < 8150 ? u < 8134 ? u >= 8130 && u <= 8132 : u >= 8134 && u <= 8140 || u >= 8144 && u <= 8147 : u < 8178 ? u >= 8150 && u <= 8155 || u >= 8160 && u <= 8172 : u >= 8178 && u <= 8180 || u >= 8182 && u <= 8188 : u < 8305 ? u < 8252 ? u == 8205 : u == 8252 || u == 8265 : u < 8336 ? u == 8305 || u == 8319 : u >= 8336 && u <= 8348 || u >= 8400 && u <= 8432 : u < 8579 ? u < 8486 ? u < 8469 ? u < 8455 ? u == 8450 : u == 8455 || u >= 8458 && u <= 8467 : u < 8482 ? u == 8469 || u >= 8473 && u <= 8477 : u == 8482 || u == 8484 : u < 8495 ? u < 8488 ? u == 8486 : u == 8488 || u >= 8490 && u <= 8493 : u < 8517 ? u >= 8495 && u <= 8505 || u >= 8508 && u <= 8511 : u >= 8517 && u <= 8521 || u == 8526 : u < 9410 ? u < 9e3 ? u < 8592 ? u >= 8579 && u <= 8580 : u >= 8592 && u <= 8703 || u >= 8986 && u <= 8987 : u < 9193 ? u == 9e3 || u == 9167 : u >= 9193 && u <= 9203 || u >= 9208 && u <= 9210 : u < 9723 ? u < 9654 ? u == 9410 || u >= 9642 && u <= 9643 : u == 9654 || u == 9664 : u < 10548 ? u >= 9723 && u <= 9726 || u >= 9728 && u <= 10175 : u >= 10548 && u <= 10549 || u >= 11013 && u <= 11015 : u < 43259 ? u < 12445 ? u < 11688 ? u < 11520 ? u < 11264 ? u < 11088 ? u >= 11035 && u <= 11036 : u == 11088 || u == 11093 : u < 11360 ? u >= 11264 && u <= 11310 || u >= 11312 && u <= 11358 : u >= 11360 && u <= 11492 || u >= 11499 && u <= 11507 : u < 11568 ? u < 11559 ? u >= 11520 && u <= 11557 : u == 11559 || u == 11565 : u < 11647 ? u >= 11568 && u <= 11623 || u == 11631 : u >= 11647 && u <= 11670 || u >= 11680 && u <= 11686 : u < 11744 ? u < 11712 ? u < 11696 ? u >= 11688 && u <= 11694 : u >= 11696 && u <= 11702 || u >= 11704 && u <= 11710 : u < 11728 ? u >= 11712 && u <= 11718 || u >= 11720 && u <= 11726 : u >= 11728 && u <= 11734 || u >= 11736 && u <= 11742 : u < 12330 ? u < 11823 ? u >= 11744 && u <= 11775 : u == 11823 || u >= 12293 && u <= 12294 : u < 12353 ? u >= 12330 && u <= 12341 || u >= 12347 && u <= 12349 : u >= 12353 && u <= 12438 || u >= 12441 && u <= 12442 : u < 42512 ? u < 12951 ? u < 12549 ? u < 12449 ? u >= 12445 && u <= 12447 : u >= 12449 && u <= 12538 || u >= 12540 && u <= 12543 : u < 12704 ? u >= 12549 && u <= 12589 || u >= 12593 && u <= 12686 : u >= 12704 && u <= 12730 || u >= 12784 && u <= 12799 : u < 19968 ? u < 12953 ? u == 12951 : u == 12953 || u >= 13312 && u <= 19893 : u < 42192 ? u >= 19968 && u <= 40917 || u >= 40960 && u <= 42124 : u >= 42192 && u <= 42237 || u >= 42240 && u <= 42508 : u < 42891 ? u < 42623 ? u < 42560 ? u >= 42512 && u <= 42539 : u >= 42560 && u <= 42610 || u >= 42612 && u <= 42621 : u < 42775 ? u >= 42623 && u <= 42725 || u >= 42736 && u <= 42737 : u >= 42775 && u <= 42783 || u >= 42786 && u <= 42888 : u < 43072 ? u < 42928 ? u >= 42891 && u <= 42926 : u >= 42928 && u <= 42935 || u >= 42999 && u <= 43047 : u < 43216 ? u >= 43072 && u <= 43123 || u >= 43136 && u <= 43205 : u >= 43216 && u <= 43225 || u >= 43232 && u <= 43255 : u < 55243 ? u < 43744 ? u < 43488 ? u < 43312 ? u < 43261 ? u == 43259 : u == 43261 || u >= 43264 && u <= 43309 : u < 43392 ? u >= 43312 && u <= 43347 || u >= 43360 && u <= 43388 : u >= 43392 && u <= 43456 || u >= 43471 && u <= 43481 : u < 43600 ? u < 43520 ? u >= 43488 && u <= 43518 : u >= 43520 && u <= 43574 || u >= 43584 && u <= 43597 : u < 43642 ? u >= 43600 && u <= 43609 || u >= 43616 && u <= 43638 : u >= 43642 && u <= 43714 || u >= 43739 && u <= 43741 : u < 43824 ? u < 43785 ? u < 43762 ? u >= 43744 && u <= 43759 : u >= 43762 && u <= 43766 || u >= 43777 && u <= 43782 : u < 43808 ? u >= 43785 && u <= 43790 || u >= 43793 && u <= 43798 : u >= 43808 && u <= 43814 || u >= 43816 && u <= 43822 : u < 44012 ? u < 43868 ? u >= 43824 && u <= 43866 : u >= 43868 && u <= 43877 || u >= 43888 && u <= 44010 : u < 44032 ? u >= 44012 && u <= 44013 || u >= 44016 && u <= 44025 : u >= 44032 && u <= 55203 || u >= 55216 && u <= 55238 : u < 64848 ? u < 64298 ? u < 64112 ? u < 55296 ? u >= 55243 && u <= 55291 : u >= 55296 && u <= 57343 || u >= 63744 && u <= 64109 : u < 64275 ? u >= 64112 && u <= 64217 || u >= 64256 && u <= 64262 : u >= 64275 && u <= 64279 || u >= 64285 && u <= 64296 : u < 64320 ? u < 64312 ? u >= 64298 && u <= 64310 : u >= 64312 && u <= 64316 || u == 64318 : u < 64326 ? u >= 64320 && u <= 64321 || u >= 64323 && u <= 64324 : u >= 64326 && u <= 64433 || u >= 64467 && u <= 64829 : u < 65296 ? u < 65024 ? u < 64914 ? u >= 64848 && u <= 64911 : u >= 64914 && u <= 64967 || u >= 65008 && u <= 65019 : u < 65136 ? u >= 65024 && u <= 65039 || u >= 65056 && u <= 65071 : u >= 65136 && u <= 65140 || u >= 65142 && u <= 65276 : u < 65474 ? u < 65345 ? u >= 65296 && u <= 65305 || u >= 65313 && u <= 65338 : u >= 65345 && u <= 65370 || u >= 65382 && u <= 65470 : u < 65490 ? u >= 65474 && u <= 65479 || u >= 65482 && u <= 65487 : u >= 65490 && u <= 65495 || u >= 65498 && u <= 65500;
|
|
5175
5169
|
}
|
|
5176
|
-
function
|
|
5170
|
+
function C3(u) {
|
|
5177
5171
|
return u < 47 ? u < 42 ? u == 33 || u >= 35 && u <= 39 : u >= 42 && u <= 43 || u == 45 : u < 63 ? u == 47 || u == 61 : u < 94 ? u == 63 : u >= 94 && u <= 96 || u >= 123 && u <= 126;
|
|
5178
5172
|
}
|
|
5179
|
-
function
|
|
5173
|
+
function c3(u) {
|
|
5180
5174
|
return u < 91 ? u < 47 ? u >= 35 && u <= 43 || u == 45 : u < 61 ? u == 47 : u == 61 || u == 64 : u < 95 ? u == 91 || u == 93 : u < 123 ? u == 95 : u >= 123 && u <= 126 || u == 10003;
|
|
5181
5175
|
}
|
|
5182
5176
|
function O1(u) {
|
|
5183
5177
|
return u < 58 ? u < 44 ? u == 33 : u == 44 || u == 46 : u < 63 ? u >= 58 && u <= 59 : u == 63 || u == 94;
|
|
5184
5178
|
}
|
|
5185
|
-
function
|
|
5179
|
+
function l3(u) {
|
|
5186
5180
|
return u < 91 ? u == 40 : u == 91 || u == 123;
|
|
5187
5181
|
}
|
|
5188
5182
|
function Hf(u) {
|
|
5189
5183
|
return u < 93 ? u == 41 : u == 93 || u == 125;
|
|
5190
5184
|
}
|
|
5191
|
-
var l3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, R1 = /https?:\/\//i, E3 = new RegExp("^" + R1.source, "i"), h3 = /^(javascript|vbscript):/i, b3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, p3 = /^(?:\/\/)?([^/#?:]+)/, oD = rD;
|
|
5185
|
+
var E3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, R1 = /https?:\/\//i, h3 = new RegExp("^" + R1.source, "i"), b3 = /^(javascript|vbscript):/i, p3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, B3 = /^(?:\/\/)?([^/#?:]+)/, oD = rD;
|
|
5192
5186
|
function P1(u) {
|
|
5193
5187
|
return rD(u) || Eu(u) || u === 43 || // '+'
|
|
5194
5188
|
u === 45 || // '-'
|
|
5195
5189
|
u === 46;
|
|
5196
5190
|
}
|
|
5197
|
-
var Yu =
|
|
5191
|
+
var Yu = Zu;
|
|
5198
5192
|
function bf(u) {
|
|
5199
5193
|
return u === 95 || Yu(u);
|
|
5200
5194
|
}
|
|
5201
5195
|
function I1(u) {
|
|
5202
|
-
return
|
|
5196
|
+
return Zu(u) || c3(u) || O1(u);
|
|
5203
5197
|
}
|
|
5204
5198
|
function pf(u) {
|
|
5205
5199
|
return u === 47 || // '/'
|
|
5206
5200
|
u === 63 || // '?'
|
|
5207
5201
|
u === 35;
|
|
5208
5202
|
}
|
|
5209
|
-
function
|
|
5210
|
-
return
|
|
5203
|
+
function $1(u) {
|
|
5204
|
+
return E3.test(u.toLowerCase());
|
|
5211
5205
|
}
|
|
5212
|
-
function
|
|
5213
|
-
if (
|
|
5206
|
+
function m3(u) {
|
|
5207
|
+
if (b3.test(u))
|
|
5214
5208
|
return !1;
|
|
5215
|
-
var D = u.match(
|
|
5209
|
+
var D = u.match(p3);
|
|
5216
5210
|
if (!D)
|
|
5217
5211
|
return !1;
|
|
5218
5212
|
var f = !!D[1], e = D[2];
|
|
5219
5213
|
return f ? !0 : !(e.indexOf(".") === -1 || !/[A-Za-z]/.test(e));
|
|
5220
5214
|
}
|
|
5221
5215
|
function g3(u) {
|
|
5222
|
-
var D = u.match(
|
|
5216
|
+
var D = u.match(B3);
|
|
5223
5217
|
if (!D)
|
|
5224
5218
|
return !1;
|
|
5225
5219
|
var f = D[0], e = f.split(".");
|
|
5226
5220
|
if (e.length < 2)
|
|
5227
5221
|
return !1;
|
|
5228
5222
|
var t = e[e.length - 1];
|
|
5229
|
-
return
|
|
5223
|
+
return !!$1(t);
|
|
5230
5224
|
}
|
|
5231
|
-
var
|
|
5232
|
-
function
|
|
5233
|
-
var D = u.split(
|
|
5234
|
-
return
|
|
5225
|
+
var _3 = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, y3 = /[:/?#]/;
|
|
5226
|
+
function v3(u) {
|
|
5227
|
+
var D = u.split(y3, 1)[0];
|
|
5228
|
+
return _3.test(D);
|
|
5235
5229
|
}
|
|
5236
|
-
var
|
|
5230
|
+
var w3 = /^(https?:\/\/)?(?:www\.)?/i, A3 = /^\/\//, x3 = (
|
|
5237
5231
|
/** @class */
|
|
5238
5232
|
function(u) {
|
|
5239
5233
|
CD(D, u);
|
|
@@ -5256,23 +5250,23 @@ var v3 = /^(https?:\/\/)?(?:www\.)?/i, w3 = /^\/\//, A3 = (
|
|
|
5256
5250
|
return f.replace(/&/g, "&");
|
|
5257
5251
|
}, D.prototype.getAnchorText = function() {
|
|
5258
5252
|
var f = this.getMatchedText();
|
|
5259
|
-
return this.protocolRelativeMatch && (f =
|
|
5253
|
+
return this.protocolRelativeMatch && (f = S3(f)), this.stripPrefix.scheme && (f = k3(f)), this.stripPrefix.www && (f = j3(f)), this.stripTrailingSlash && (f = T3(f)), this.decodePercentEncoding && (f = N3(f)), f;
|
|
5260
5254
|
}, D;
|
|
5261
5255
|
}(cD)
|
|
5262
5256
|
);
|
|
5263
|
-
function x3(u) {
|
|
5264
|
-
return u.replace(E3, "");
|
|
5265
|
-
}
|
|
5266
5257
|
function k3(u) {
|
|
5267
|
-
return u.
|
|
5258
|
+
return u.replace(h3, "");
|
|
5268
5259
|
}
|
|
5269
5260
|
function j3(u) {
|
|
5270
|
-
return u.replace(w3, "");
|
|
5261
|
+
return u.includes("www.") ? u.replace(w3, "$1") : u;
|
|
5271
5262
|
}
|
|
5272
5263
|
function S3(u) {
|
|
5273
|
-
return u.
|
|
5264
|
+
return u.replace(A3, "");
|
|
5274
5265
|
}
|
|
5275
5266
|
function T3(u) {
|
|
5267
|
+
return u.charAt(u.length - 1) === "/" && (u = u.slice(0, -1)), u;
|
|
5268
|
+
}
|
|
5269
|
+
function N3(u) {
|
|
5276
5270
|
var D = u.replace(/%(?:22|26|27|3C|3E)/gi, function(f) {
|
|
5277
5271
|
return f === "%22" ? """ : f === "%26" ? "&" : f === "%27" ? "'" : f === "%3C" || f === "%3c" ? "<" : ">";
|
|
5278
5272
|
});
|
|
@@ -5283,15 +5277,15 @@ function T3(u) {
|
|
|
5283
5277
|
}
|
|
5284
5278
|
return D;
|
|
5285
5279
|
}
|
|
5286
|
-
var
|
|
5280
|
+
var O3 = /^mailto:/i, L1 = Zu;
|
|
5287
5281
|
function Bf(u) {
|
|
5288
|
-
return
|
|
5282
|
+
return L1(u) || C3(u);
|
|
5289
5283
|
}
|
|
5290
|
-
function
|
|
5284
|
+
function R3(u) {
|
|
5291
5285
|
var D = u.split(".").pop();
|
|
5292
|
-
return
|
|
5286
|
+
return $1(D);
|
|
5293
5287
|
}
|
|
5294
|
-
var
|
|
5288
|
+
var P3 = (
|
|
5295
5289
|
/** @class */
|
|
5296
5290
|
function(u) {
|
|
5297
5291
|
CD(D, u);
|
|
@@ -5311,12 +5305,12 @@ var R3 = (
|
|
|
5311
5305
|
}(cD)
|
|
5312
5306
|
);
|
|
5313
5307
|
function M1(u) {
|
|
5314
|
-
return u === 95 ||
|
|
5308
|
+
return u === 95 || Zu(u);
|
|
5315
5309
|
}
|
|
5316
|
-
function
|
|
5310
|
+
function I3(u) {
|
|
5317
5311
|
return u.length <= 140;
|
|
5318
5312
|
}
|
|
5319
|
-
var
|
|
5313
|
+
var $3 = [
|
|
5320
5314
|
"twitter",
|
|
5321
5315
|
"facebook",
|
|
5322
5316
|
"instagram",
|
|
@@ -5350,7 +5344,7 @@ var I3 = [
|
|
|
5350
5344
|
case "youtube":
|
|
5351
5345
|
return "https://youtube.com/hashtag/" + e;
|
|
5352
5346
|
default:
|
|
5353
|
-
|
|
5347
|
+
Gu(f);
|
|
5354
5348
|
}
|
|
5355
5349
|
}, D.prototype.getAnchorText = function() {
|
|
5356
5350
|
return "#" + this.hashtag;
|
|
@@ -5359,7 +5353,7 @@ var I3 = [
|
|
|
5359
5353
|
return e && f.push(e), f;
|
|
5360
5354
|
}, D;
|
|
5361
5355
|
}(cD)
|
|
5362
|
-
),
|
|
5356
|
+
), M3 = {
|
|
5363
5357
|
twitter: /^@\w{1,15}$/,
|
|
5364
5358
|
instagram: /^@[_\w]{1,30}$/,
|
|
5365
5359
|
soundcloud: /^@[-a-z0-9_]{3,25}$/,
|
|
@@ -5377,17 +5371,17 @@ function q1(u) {
|
|
|
5377
5371
|
u === 95 || // '_'
|
|
5378
5372
|
rD(u) || Eu(u);
|
|
5379
5373
|
}
|
|
5380
|
-
function
|
|
5381
|
-
var f =
|
|
5374
|
+
function q3(u, D) {
|
|
5375
|
+
var f = M3[D];
|
|
5382
5376
|
return f.test(u);
|
|
5383
5377
|
}
|
|
5384
|
-
var
|
|
5378
|
+
var z3 = [
|
|
5385
5379
|
"twitter",
|
|
5386
5380
|
"instagram",
|
|
5387
5381
|
"soundcloud",
|
|
5388
5382
|
"tiktok",
|
|
5389
5383
|
"youtube"
|
|
5390
|
-
],
|
|
5384
|
+
], U3 = (
|
|
5391
5385
|
/** @class */
|
|
5392
5386
|
function(u) {
|
|
5393
5387
|
CD(D, u);
|
|
@@ -5414,7 +5408,7 @@ var q3 = [
|
|
|
5414
5408
|
case "youtube":
|
|
5415
5409
|
return "https://youtube.com/@" + this.mention;
|
|
5416
5410
|
default:
|
|
5417
|
-
|
|
5411
|
+
Gu(this.serviceName);
|
|
5418
5412
|
}
|
|
5419
5413
|
}, D.prototype.getAnchorText = function() {
|
|
5420
5414
|
return "@" + this.mention;
|
|
@@ -5423,21 +5417,21 @@ var q3 = [
|
|
|
5423
5417
|
return e && f.push(e), f;
|
|
5424
5418
|
}, D;
|
|
5425
5419
|
}(cD)
|
|
5426
|
-
),
|
|
5420
|
+
), V3 = /[-. ()]/, H3 = /(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/, W3 = /(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/, Y3 = new RegExp("^".concat(H3.source, "|").concat(W3.source, "$"));
|
|
5427
5421
|
function z1(u) {
|
|
5428
5422
|
return u === 45 || // '-'
|
|
5429
5423
|
u === 46 || // '.'
|
|
5430
5424
|
u === 32;
|
|
5431
5425
|
}
|
|
5432
|
-
function
|
|
5426
|
+
function mf(u) {
|
|
5433
5427
|
return u === 44 || // ','
|
|
5434
5428
|
u === 59;
|
|
5435
5429
|
}
|
|
5436
|
-
function
|
|
5437
|
-
var D = u.charAt(0) === "+" ||
|
|
5438
|
-
return D &&
|
|
5430
|
+
function K3(u) {
|
|
5431
|
+
var D = u.charAt(0) === "+" || V3.test(u);
|
|
5432
|
+
return D && Y3.test(u);
|
|
5439
5433
|
}
|
|
5440
|
-
var
|
|
5434
|
+
var J3 = (
|
|
5441
5435
|
/** @class */
|
|
5442
5436
|
function(u) {
|
|
5443
5437
|
CD(D, u);
|
|
@@ -5457,7 +5451,7 @@ var K3 = (
|
|
|
5457
5451
|
return this.matchedText;
|
|
5458
5452
|
}, D;
|
|
5459
5453
|
}(cD)
|
|
5460
|
-
),
|
|
5454
|
+
), G3 = (
|
|
5461
5455
|
/** @class */
|
|
5462
5456
|
function() {
|
|
5463
5457
|
function u(D, f) {
|
|
@@ -5480,8 +5474,8 @@ var K3 = (
|
|
|
5480
5474
|
}, u;
|
|
5481
5475
|
}()
|
|
5482
5476
|
);
|
|
5483
|
-
function
|
|
5484
|
-
for (var f = new
|
|
5477
|
+
function X3(u, D) {
|
|
5478
|
+
for (var f = new G3(u, D); f.charIdx < f.text.length; f.charIdx++) {
|
|
5485
5479
|
var e = u.charAt(f.charIdx), t = u.charCodeAt(f.charIdx);
|
|
5486
5480
|
if (f.stateMachines.length === 0)
|
|
5487
5481
|
jD(f, e, t);
|
|
@@ -5490,133 +5484,133 @@ function G3(u, D) {
|
|
|
5490
5484
|
var r = f.stateMachines[n];
|
|
5491
5485
|
switch (r.state) {
|
|
5492
5486
|
case 11:
|
|
5493
|
-
|
|
5487
|
+
e2(f, r, t);
|
|
5494
5488
|
break;
|
|
5495
5489
|
case 12:
|
|
5496
|
-
|
|
5490
|
+
t2(f, r, t);
|
|
5497
5491
|
break;
|
|
5498
5492
|
case 0:
|
|
5499
|
-
|
|
5493
|
+
Z3(f, r, t);
|
|
5500
5494
|
break;
|
|
5501
5495
|
case 1:
|
|
5502
|
-
|
|
5496
|
+
Q3(f, r, t);
|
|
5503
5497
|
break;
|
|
5504
5498
|
case 2:
|
|
5505
|
-
|
|
5499
|
+
u2(f, r, t);
|
|
5506
5500
|
break;
|
|
5507
5501
|
case 3:
|
|
5508
|
-
|
|
5502
|
+
D2(f, r, t);
|
|
5509
5503
|
break;
|
|
5510
5504
|
case 4:
|
|
5511
|
-
|
|
5505
|
+
f2(f, r, e, t);
|
|
5512
5506
|
break;
|
|
5513
5507
|
case 5:
|
|
5514
|
-
|
|
5508
|
+
n2(f, r, t);
|
|
5515
5509
|
break;
|
|
5516
5510
|
case 6:
|
|
5517
|
-
|
|
5511
|
+
r2(f, r, e, t);
|
|
5518
5512
|
break;
|
|
5519
5513
|
case 7:
|
|
5520
|
-
|
|
5514
|
+
a2(f, r, e, t);
|
|
5521
5515
|
break;
|
|
5522
5516
|
case 13:
|
|
5523
|
-
|
|
5517
|
+
s2(f, r, t);
|
|
5524
5518
|
break;
|
|
5525
5519
|
case 14:
|
|
5526
|
-
|
|
5520
|
+
F2(f, r, t);
|
|
5527
5521
|
break;
|
|
5528
5522
|
case 8:
|
|
5529
|
-
|
|
5523
|
+
i2(f, r, t);
|
|
5530
5524
|
break;
|
|
5531
5525
|
case 9:
|
|
5532
|
-
|
|
5526
|
+
o2(f, r, t);
|
|
5533
5527
|
break;
|
|
5534
5528
|
case 10:
|
|
5535
|
-
|
|
5529
|
+
d2(f, r, t);
|
|
5536
5530
|
break;
|
|
5537
5531
|
case 15:
|
|
5538
|
-
|
|
5532
|
+
C2(f, r, e, t);
|
|
5539
5533
|
break;
|
|
5540
5534
|
case 16:
|
|
5541
|
-
|
|
5535
|
+
c2(f, r, e, t);
|
|
5542
5536
|
break;
|
|
5543
5537
|
case 17:
|
|
5544
|
-
|
|
5538
|
+
l2(f, r, e, t);
|
|
5545
5539
|
break;
|
|
5546
5540
|
case 18:
|
|
5547
|
-
|
|
5541
|
+
E2(f, r, e, t);
|
|
5548
5542
|
break;
|
|
5549
5543
|
case 19:
|
|
5550
|
-
|
|
5544
|
+
h2(f, r, e, t);
|
|
5551
5545
|
break;
|
|
5552
5546
|
case 20:
|
|
5553
|
-
|
|
5547
|
+
b2(f, r, t);
|
|
5554
5548
|
break;
|
|
5555
5549
|
case 21:
|
|
5556
|
-
|
|
5550
|
+
p2(f, r, t);
|
|
5557
5551
|
break;
|
|
5558
5552
|
case 22:
|
|
5559
|
-
|
|
5553
|
+
Qu(f, r, t);
|
|
5560
5554
|
break;
|
|
5561
5555
|
case 23:
|
|
5562
|
-
|
|
5556
|
+
B2(f, r, t);
|
|
5563
5557
|
break;
|
|
5564
5558
|
case 24:
|
|
5565
|
-
|
|
5559
|
+
m2(f, r, t);
|
|
5566
5560
|
break;
|
|
5567
5561
|
case 25:
|
|
5568
5562
|
g2(f, r, t);
|
|
5569
5563
|
break;
|
|
5570
5564
|
case 26:
|
|
5571
|
-
|
|
5565
|
+
_2(f, r, t);
|
|
5572
5566
|
break;
|
|
5573
5567
|
case 27:
|
|
5574
|
-
|
|
5568
|
+
y2(f, r, t);
|
|
5575
5569
|
break;
|
|
5576
5570
|
case 28:
|
|
5577
|
-
|
|
5571
|
+
v2(f, r, t);
|
|
5578
5572
|
break;
|
|
5579
5573
|
case 29:
|
|
5580
|
-
|
|
5574
|
+
w2(f, r, t);
|
|
5581
5575
|
break;
|
|
5582
5576
|
case 30:
|
|
5583
|
-
|
|
5577
|
+
A2(f, r, t);
|
|
5584
5578
|
break;
|
|
5585
5579
|
case 31:
|
|
5586
|
-
|
|
5580
|
+
x2(f, r, t);
|
|
5587
5581
|
break;
|
|
5588
5582
|
case 32:
|
|
5589
|
-
|
|
5583
|
+
j2(f, r, e, t);
|
|
5590
5584
|
break;
|
|
5591
5585
|
case 33:
|
|
5592
|
-
|
|
5586
|
+
S2(f, r, t);
|
|
5593
5587
|
break;
|
|
5594
5588
|
case 34:
|
|
5595
|
-
|
|
5589
|
+
T2(f, r, t);
|
|
5596
5590
|
break;
|
|
5597
5591
|
case 35:
|
|
5598
|
-
|
|
5592
|
+
N2(f, r, t);
|
|
5599
5593
|
break;
|
|
5600
5594
|
case 36:
|
|
5601
|
-
|
|
5595
|
+
O2(f, r, e, t);
|
|
5602
5596
|
break;
|
|
5603
5597
|
case 37:
|
|
5604
|
-
|
|
5598
|
+
k2(f, r, e, t);
|
|
5605
5599
|
break;
|
|
5606
5600
|
case 38:
|
|
5607
|
-
|
|
5601
|
+
R2(f, r, e, t);
|
|
5608
5602
|
break;
|
|
5609
5603
|
case 39:
|
|
5610
|
-
|
|
5604
|
+
P2(f, r, e, t);
|
|
5611
5605
|
break;
|
|
5612
5606
|
case 40:
|
|
5613
|
-
|
|
5607
|
+
I2(f, r, t);
|
|
5614
5608
|
break;
|
|
5615
5609
|
case 41:
|
|
5616
|
-
|
|
5610
|
+
$2(f, r, t);
|
|
5617
5611
|
break;
|
|
5618
5612
|
default:
|
|
5619
|
-
|
|
5613
|
+
Gu(r.state);
|
|
5620
5614
|
}
|
|
5621
5615
|
}
|
|
5622
5616
|
if (!f.hasSchemeUrlMachine() && f.charIdx > 0 && oD(t)) {
|
|
@@ -5638,13 +5632,13 @@ function G3(u, D) {
|
|
|
5638
5632
|
function jD(u, D, f) {
|
|
5639
5633
|
var e = u.charIdx;
|
|
5640
5634
|
if (f === 35)
|
|
5641
|
-
u.addMachine(
|
|
5635
|
+
u.addMachine(U2(
|
|
5642
5636
|
e,
|
|
5643
5637
|
28
|
|
5644
5638
|
/* State.HashtagHashChar */
|
|
5645
5639
|
));
|
|
5646
5640
|
else if (f === 64)
|
|
5647
|
-
u.addMachine(
|
|
5641
|
+
u.addMachine(V2(
|
|
5648
5642
|
e,
|
|
5649
5643
|
30
|
|
5650
5644
|
/* State.MentionAtChar */
|
|
@@ -5672,29 +5666,29 @@ function jD(u, D, f) {
|
|
|
5672
5666
|
e,
|
|
5673
5667
|
38
|
|
5674
5668
|
/* State.PhoneNumberDigit */
|
|
5675
|
-
)), u.addMachine(
|
|
5669
|
+
)), u.addMachine(q2(
|
|
5676
5670
|
e,
|
|
5677
5671
|
13
|
|
5678
5672
|
/* State.IpV4Digit */
|
|
5679
|
-
))),
|
|
5673
|
+
))), L1(f)) {
|
|
5680
5674
|
var t = D.toLowerCase() === "m" ? 15 : 22;
|
|
5681
|
-
u.addMachine(
|
|
5675
|
+
u.addMachine(z2(e, t));
|
|
5682
5676
|
}
|
|
5683
5677
|
oD(f) && u.addMachine(SD(
|
|
5684
5678
|
e,
|
|
5685
5679
|
0
|
|
5686
5680
|
/* State.SchemeChar */
|
|
5687
|
-
)),
|
|
5681
|
+
)), Zu(f) && u.addMachine(tf(
|
|
5688
5682
|
e,
|
|
5689
5683
|
5
|
|
5690
5684
|
/* State.DomainLabelChar */
|
|
5691
5685
|
));
|
|
5692
5686
|
}
|
|
5693
5687
|
}
|
|
5694
|
-
function
|
|
5688
|
+
function Z3(u, D, f) {
|
|
5695
5689
|
f === 58 ? D.state = 2 : f === 45 ? D.state = 1 : P1(f) || u.removeMachine(D);
|
|
5696
5690
|
}
|
|
5697
|
-
function
|
|
5691
|
+
function Q3(u, D, f) {
|
|
5698
5692
|
var e = u.charIdx;
|
|
5699
5693
|
f === 45 || (f === 47 ? (u.removeMachine(D), u.addMachine(tf(
|
|
5700
5694
|
e,
|
|
@@ -5702,7 +5696,7 @@ function Z3(u, D, f) {
|
|
|
5702
5696
|
/* State.ProtocolRelativeSlash1 */
|
|
5703
5697
|
))) : P1(f) ? D.state = 0 : u.removeMachine(D));
|
|
5704
5698
|
}
|
|
5705
|
-
function
|
|
5699
|
+
function u2(u, D, f) {
|
|
5706
5700
|
var e = u.charIdx;
|
|
5707
5701
|
f === 47 ? D.state = 3 : f === 46 ? u.removeMachine(D) : Yu(f) ? (D.state = 5, oD(f) && u.addMachine(SD(
|
|
5708
5702
|
e,
|
|
@@ -5710,141 +5704,141 @@ function Q3(u, D, f) {
|
|
|
5710
5704
|
/* State.SchemeChar */
|
|
5711
5705
|
))) : u.removeMachine(D);
|
|
5712
5706
|
}
|
|
5713
|
-
function
|
|
5707
|
+
function D2(u, D, f) {
|
|
5714
5708
|
f === 47 ? D.state = 4 : I1(f) ? (D.state = 10, D.acceptStateReached = !0) : eu(u, D);
|
|
5715
5709
|
}
|
|
5716
|
-
function
|
|
5710
|
+
function f2(u, D, f, e) {
|
|
5717
5711
|
e === 47 ? (D.state = 10, D.acceptStateReached = !0) : Yu(e) ? (D.state = 5, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5718
5712
|
}
|
|
5719
|
-
function
|
|
5713
|
+
function e2(u, D, f) {
|
|
5720
5714
|
f === 47 ? D.state = 12 : u.removeMachine(D);
|
|
5721
5715
|
}
|
|
5722
|
-
function
|
|
5716
|
+
function t2(u, D, f) {
|
|
5723
5717
|
Yu(f) ? D.state = 5 : u.removeMachine(D);
|
|
5724
5718
|
}
|
|
5725
|
-
function
|
|
5719
|
+
function n2(u, D, f) {
|
|
5726
5720
|
f === 46 ? D.state = 7 : f === 45 ? D.state = 6 : f === 58 ? D.state = 8 : pf(f) ? D.state = 10 : bf(f) || eu(u, D);
|
|
5727
5721
|
}
|
|
5728
|
-
function
|
|
5722
|
+
function r2(u, D, f, e) {
|
|
5729
5723
|
e === 45 || (e === 46 ? eu(u, D) : Yu(e) ? D.state = 5 : eu(u, D));
|
|
5730
5724
|
}
|
|
5731
|
-
function
|
|
5725
|
+
function a2(u, D, f, e) {
|
|
5732
5726
|
e === 46 ? eu(u, D) : Yu(e) ? (D.state = 5, D.acceptStateReached = !0) : eu(u, D);
|
|
5733
5727
|
}
|
|
5734
|
-
function a2(u, D, f) {
|
|
5735
|
-
f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : Eu(f) || (pf(f) ? D.state = 10 : Qu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5736
|
-
}
|
|
5737
5728
|
function s2(u, D, f) {
|
|
5738
|
-
|
|
5729
|
+
f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : Eu(f) || (pf(f) ? D.state = 10 : Zu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5739
5730
|
}
|
|
5740
5731
|
function F2(u, D, f) {
|
|
5741
|
-
Eu(f) ? D.state =
|
|
5732
|
+
Eu(f) ? (D.octetsEncountered++, D.octetsEncountered === 4 && (D.acceptStateReached = !0), D.state = 13) : eu(u, D);
|
|
5742
5733
|
}
|
|
5743
5734
|
function i2(u, D, f) {
|
|
5744
|
-
Eu(f)
|
|
5735
|
+
Eu(f) ? D.state = 9 : eu(u, D);
|
|
5745
5736
|
}
|
|
5746
5737
|
function o2(u, D, f) {
|
|
5747
|
-
|
|
5738
|
+
Eu(f) || (pf(f) ? D.state = 10 : eu(u, D));
|
|
5748
5739
|
}
|
|
5749
|
-
function d2(u, D, f
|
|
5750
|
-
f
|
|
5740
|
+
function d2(u, D, f) {
|
|
5741
|
+
I1(f) || eu(u, D);
|
|
5751
5742
|
}
|
|
5752
5743
|
function C2(u, D, f, e) {
|
|
5753
|
-
f.toLowerCase() === "
|
|
5744
|
+
f.toLowerCase() === "a" ? D.state = 16 : Qu(u, D, e);
|
|
5754
5745
|
}
|
|
5755
5746
|
function c2(u, D, f, e) {
|
|
5756
|
-
f.toLowerCase() === "
|
|
5747
|
+
f.toLowerCase() === "i" ? D.state = 17 : Qu(u, D, e);
|
|
5757
5748
|
}
|
|
5758
5749
|
function l2(u, D, f, e) {
|
|
5759
|
-
f.toLowerCase() === "
|
|
5750
|
+
f.toLowerCase() === "l" ? D.state = 18 : Qu(u, D, e);
|
|
5760
5751
|
}
|
|
5761
5752
|
function E2(u, D, f, e) {
|
|
5762
|
-
f.toLowerCase() === "
|
|
5753
|
+
f.toLowerCase() === "t" ? D.state = 19 : Qu(u, D, e);
|
|
5763
5754
|
}
|
|
5764
|
-
function h2(u, D, f) {
|
|
5765
|
-
f ===
|
|
5755
|
+
function h2(u, D, f, e) {
|
|
5756
|
+
f.toLowerCase() === "o" ? D.state = 20 : Qu(u, D, e);
|
|
5766
5757
|
}
|
|
5767
5758
|
function b2(u, D, f) {
|
|
5759
|
+
f === 58 ? D.state = 21 : Qu(u, D, f);
|
|
5760
|
+
}
|
|
5761
|
+
function p2(u, D, f) {
|
|
5768
5762
|
Bf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5769
5763
|
}
|
|
5770
|
-
function
|
|
5764
|
+
function Qu(u, D, f) {
|
|
5771
5765
|
f === 46 ? D.state = 23 : f === 64 ? D.state = 24 : Bf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5772
5766
|
}
|
|
5773
|
-
function
|
|
5767
|
+
function B2(u, D, f) {
|
|
5774
5768
|
f === 46 || f === 64 ? u.removeMachine(D) : Bf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5775
5769
|
}
|
|
5776
|
-
function
|
|
5770
|
+
function m2(u, D, f) {
|
|
5777
5771
|
Yu(f) ? D.state = 25 : u.removeMachine(D);
|
|
5778
5772
|
}
|
|
5779
5773
|
function g2(u, D, f) {
|
|
5780
5774
|
f === 46 ? D.state = 27 : f === 45 ? D.state = 26 : bf(f) || eu(u, D);
|
|
5781
5775
|
}
|
|
5782
|
-
function
|
|
5776
|
+
function _2(u, D, f) {
|
|
5783
5777
|
f === 45 || f === 46 ? eu(u, D) : bf(f) ? D.state = 25 : eu(u, D);
|
|
5784
5778
|
}
|
|
5785
|
-
function
|
|
5779
|
+
function y2(u, D, f) {
|
|
5786
5780
|
f === 46 || f === 45 ? eu(u, D) : Yu(f) ? (D.state = 25, D.acceptStateReached = !0) : eu(u, D);
|
|
5787
5781
|
}
|
|
5788
|
-
function
|
|
5782
|
+
function v2(u, D, f) {
|
|
5789
5783
|
M1(f) ? (D.state = 29, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5790
5784
|
}
|
|
5791
|
-
function
|
|
5785
|
+
function w2(u, D, f) {
|
|
5792
5786
|
M1(f) || eu(u, D);
|
|
5793
5787
|
}
|
|
5794
|
-
function
|
|
5788
|
+
function A2(u, D, f) {
|
|
5795
5789
|
q1(f) ? (D.state = 31, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5796
5790
|
}
|
|
5797
|
-
function
|
|
5798
|
-
q1(f) || (
|
|
5791
|
+
function x2(u, D, f) {
|
|
5792
|
+
q1(f) || (Zu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5799
5793
|
}
|
|
5800
|
-
function
|
|
5794
|
+
function k2(u, D, f, e) {
|
|
5801
5795
|
Eu(e) ? D.state = 38 : (u.removeMachine(D), jD(u, f, e));
|
|
5802
5796
|
}
|
|
5803
|
-
function
|
|
5797
|
+
function j2(u, D, f, e) {
|
|
5804
5798
|
Eu(e) ? D.state = 33 : u.removeMachine(D), jD(u, f, e);
|
|
5805
5799
|
}
|
|
5806
|
-
function
|
|
5800
|
+
function S2(u, D, f) {
|
|
5807
5801
|
Eu(f) ? D.state = 34 : u.removeMachine(D);
|
|
5808
5802
|
}
|
|
5809
|
-
function
|
|
5803
|
+
function T2(u, D, f) {
|
|
5810
5804
|
Eu(f) ? D.state = 35 : u.removeMachine(D);
|
|
5811
5805
|
}
|
|
5812
|
-
function
|
|
5806
|
+
function N2(u, D, f) {
|
|
5813
5807
|
f === 41 ? D.state = 36 : u.removeMachine(D);
|
|
5814
5808
|
}
|
|
5815
|
-
function
|
|
5809
|
+
function O2(u, D, f, e) {
|
|
5816
5810
|
Eu(e) ? D.state = 38 : z1(e) ? D.state = 39 : u.removeMachine(D);
|
|
5817
5811
|
}
|
|
5818
|
-
function
|
|
5812
|
+
function R2(u, D, f, e) {
|
|
5819
5813
|
var t = u.charIdx;
|
|
5820
|
-
D.acceptStateReached = !0,
|
|
5814
|
+
D.acceptStateReached = !0, mf(e) ? D.state = 40 : e === 35 ? D.state = 41 : Eu(e) || (e === 40 ? D.state = 32 : z1(e) ? D.state = 39 : (eu(u, D), oD(e) && u.addMachine(SD(
|
|
5821
5815
|
t,
|
|
5822
5816
|
0
|
|
5823
5817
|
/* State.SchemeChar */
|
|
5824
5818
|
))));
|
|
5825
5819
|
}
|
|
5826
|
-
function
|
|
5820
|
+
function P2(u, D, f, e) {
|
|
5827
5821
|
Eu(e) ? D.state = 38 : e === 40 ? D.state = 32 : (eu(u, D), jD(u, f, e));
|
|
5828
5822
|
}
|
|
5829
|
-
function P2(u, D, f) {
|
|
5830
|
-
gf(f) || (f === 35 ? D.state = 41 : Eu(f) ? D.state = 38 : eu(u, D));
|
|
5831
|
-
}
|
|
5832
5823
|
function I2(u, D, f) {
|
|
5833
|
-
|
|
5824
|
+
mf(f) || (f === 35 ? D.state = 41 : Eu(f) ? D.state = 38 : eu(u, D));
|
|
5825
|
+
}
|
|
5826
|
+
function $2(u, D, f) {
|
|
5827
|
+
mf(f) ? D.state = 40 : Eu(f) ? u.removeMachine(D) : eu(u, D);
|
|
5834
5828
|
}
|
|
5835
5829
|
function eu(u, D) {
|
|
5836
5830
|
var f = u.matches, e = u.text, t = u.charIdx, n = u.tagBuilder, r = u.stripPrefix, s = u.stripTrailingSlash, F = u.decodePercentEncoding, d = u.hashtagServiceName, o = u.mentionServiceName;
|
|
5837
5831
|
if (u.removeMachine(D), !!D.acceptStateReached) {
|
|
5838
5832
|
var c = D.startIdx, l = e.slice(D.startIdx, t);
|
|
5839
|
-
switch (l =
|
|
5833
|
+
switch (l = M2(l), D.type) {
|
|
5840
5834
|
case 0: {
|
|
5841
5835
|
var j = e.charCodeAt(D.startIdx - 1);
|
|
5842
5836
|
if (j === 64)
|
|
5843
5837
|
return;
|
|
5844
5838
|
switch (D.matchType) {
|
|
5845
5839
|
case 0: {
|
|
5846
|
-
var
|
|
5847
|
-
if (
|
|
5840
|
+
var v = R1.exec(l);
|
|
5841
|
+
if (v && (c = c + v.index, l = l.slice(v.index)), !m3(l))
|
|
5848
5842
|
return;
|
|
5849
5843
|
break;
|
|
5850
5844
|
}
|
|
@@ -5854,14 +5848,14 @@ function eu(u, D) {
|
|
|
5854
5848
|
break;
|
|
5855
5849
|
}
|
|
5856
5850
|
case 2: {
|
|
5857
|
-
if (!
|
|
5851
|
+
if (!v3(l))
|
|
5858
5852
|
return;
|
|
5859
5853
|
break;
|
|
5860
5854
|
}
|
|
5861
5855
|
default:
|
|
5862
|
-
|
|
5856
|
+
Gu(D);
|
|
5863
5857
|
}
|
|
5864
|
-
f.push(new
|
|
5858
|
+
f.push(new x3({
|
|
5865
5859
|
tagBuilder: n,
|
|
5866
5860
|
matchedText: l,
|
|
5867
5861
|
offset: c,
|
|
@@ -5877,16 +5871,16 @@ function eu(u, D) {
|
|
|
5877
5871
|
break;
|
|
5878
5872
|
}
|
|
5879
5873
|
case 1: {
|
|
5880
|
-
|
|
5874
|
+
R3(l) && f.push(new P3({
|
|
5881
5875
|
tagBuilder: n,
|
|
5882
5876
|
matchedText: l,
|
|
5883
5877
|
offset: c,
|
|
5884
|
-
email: l.replace(
|
|
5878
|
+
email: l.replace(O3, "")
|
|
5885
5879
|
}));
|
|
5886
5880
|
break;
|
|
5887
5881
|
}
|
|
5888
5882
|
case 2: {
|
|
5889
|
-
|
|
5883
|
+
I3(l) && f.push(new L3({
|
|
5890
5884
|
tagBuilder: n,
|
|
5891
5885
|
matchedText: l,
|
|
5892
5886
|
offset: c,
|
|
@@ -5896,7 +5890,7 @@ function eu(u, D) {
|
|
|
5896
5890
|
break;
|
|
5897
5891
|
}
|
|
5898
5892
|
case 3: {
|
|
5899
|
-
|
|
5893
|
+
q3(l, o) && f.push(new U3({
|
|
5900
5894
|
tagBuilder: n,
|
|
5901
5895
|
matchedText: l,
|
|
5902
5896
|
offset: c,
|
|
@@ -5907,9 +5901,9 @@ function eu(u, D) {
|
|
|
5907
5901
|
break;
|
|
5908
5902
|
}
|
|
5909
5903
|
case 4: {
|
|
5910
|
-
if (l = l.replace(/ +$/g, ""),
|
|
5904
|
+
if (l = l.replace(/ +$/g, ""), K3(l)) {
|
|
5911
5905
|
var C = l.replace(/[^0-9,;#]/g, "");
|
|
5912
|
-
f.push(new
|
|
5906
|
+
f.push(new J3({
|
|
5913
5907
|
tagBuilder: n,
|
|
5914
5908
|
matchedText: l,
|
|
5915
5909
|
offset: c,
|
|
@@ -5920,7 +5914,7 @@ function eu(u, D) {
|
|
|
5920
5914
|
break;
|
|
5921
5915
|
}
|
|
5922
5916
|
default:
|
|
5923
|
-
|
|
5917
|
+
Gu(D);
|
|
5924
5918
|
}
|
|
5925
5919
|
}
|
|
5926
5920
|
}
|
|
@@ -5933,7 +5927,7 @@ function L2(u) {
|
|
|
5933
5927
|
case 2:
|
|
5934
5928
|
return "ipV4";
|
|
5935
5929
|
default:
|
|
5936
|
-
|
|
5930
|
+
Gu(u);
|
|
5937
5931
|
}
|
|
5938
5932
|
}
|
|
5939
5933
|
var Wf = {
|
|
@@ -5941,14 +5935,14 @@ var Wf = {
|
|
|
5941
5935
|
"}": "{",
|
|
5942
5936
|
"]": "["
|
|
5943
5937
|
};
|
|
5944
|
-
function
|
|
5938
|
+
function M2(u) {
|
|
5945
5939
|
for (var D = {
|
|
5946
5940
|
"(": 0,
|
|
5947
5941
|
"{": 0,
|
|
5948
5942
|
"[": 0
|
|
5949
5943
|
}, f = 0; f < u.length; f++) {
|
|
5950
5944
|
var e = u.charAt(f), t = u.charCodeAt(f);
|
|
5951
|
-
|
|
5945
|
+
l3(t) ? D[e]++ : Hf(t) && D[Wf[e]]--;
|
|
5952
5946
|
}
|
|
5953
5947
|
for (var n = u.length - 1; n >= 0; ) {
|
|
5954
5948
|
var e = u.charAt(n), t = u.charCodeAt(n);
|
|
@@ -5983,7 +5977,7 @@ function tf(u, D) {
|
|
|
5983
5977
|
matchType: 1
|
|
5984
5978
|
};
|
|
5985
5979
|
}
|
|
5986
|
-
function
|
|
5980
|
+
function q2(u, D) {
|
|
5987
5981
|
return {
|
|
5988
5982
|
type: 0,
|
|
5989
5983
|
startIdx: u,
|
|
@@ -5994,7 +5988,7 @@ function M2(u, D) {
|
|
|
5994
5988
|
// starts at 1 because we create this machine when encountering the first octet
|
|
5995
5989
|
};
|
|
5996
5990
|
}
|
|
5997
|
-
function
|
|
5991
|
+
function z2(u, D) {
|
|
5998
5992
|
return {
|
|
5999
5993
|
type: 1,
|
|
6000
5994
|
startIdx: u,
|
|
@@ -6002,7 +5996,7 @@ function q2(u, D) {
|
|
|
6002
5996
|
acceptStateReached: !1
|
|
6003
5997
|
};
|
|
6004
5998
|
}
|
|
6005
|
-
function
|
|
5999
|
+
function U2(u, D) {
|
|
6006
6000
|
return {
|
|
6007
6001
|
type: 2,
|
|
6008
6002
|
startIdx: u,
|
|
@@ -6010,7 +6004,7 @@ function z2(u, D) {
|
|
|
6010
6004
|
acceptStateReached: !1
|
|
6011
6005
|
};
|
|
6012
6006
|
}
|
|
6013
|
-
function
|
|
6007
|
+
function V2(u, D) {
|
|
6014
6008
|
return {
|
|
6015
6009
|
type: 3,
|
|
6016
6010
|
startIdx: u,
|
|
@@ -6037,155 +6031,155 @@ var Su = (
|
|
|
6037
6031
|
}
|
|
6038
6032
|
return u;
|
|
6039
6033
|
}()
|
|
6040
|
-
),
|
|
6034
|
+
), gf = new Su(), H2 = (
|
|
6041
6035
|
/** @class */
|
|
6042
6036
|
/* @__PURE__ */ function() {
|
|
6043
6037
|
function u(D, f) {
|
|
6044
|
-
this.charIdx = 0, this.state = 0, this.currentDataIdx = 0, this.currentTag =
|
|
6038
|
+
this.charIdx = 0, this.state = 0, this.currentDataIdx = 0, this.currentTag = gf, this.html = D, this.callbacks = f;
|
|
6045
6039
|
}
|
|
6046
6040
|
return u;
|
|
6047
6041
|
}()
|
|
6048
6042
|
);
|
|
6049
|
-
function
|
|
6050
|
-
for (var f = new
|
|
6043
|
+
function W2(u, D) {
|
|
6044
|
+
for (var f = new H2(u, D), e = u.length; f.charIdx < e; ) {
|
|
6051
6045
|
var t = u.charAt(f.charIdx), n = u.charCodeAt(f.charIdx);
|
|
6052
6046
|
switch (f.state) {
|
|
6053
6047
|
case 0:
|
|
6054
|
-
|
|
6048
|
+
Y2(f, t);
|
|
6055
6049
|
break;
|
|
6056
6050
|
case 1:
|
|
6057
|
-
|
|
6051
|
+
K2(f, t, n);
|
|
6058
6052
|
break;
|
|
6059
6053
|
case 2:
|
|
6060
|
-
|
|
6054
|
+
G2(f, t, n);
|
|
6061
6055
|
break;
|
|
6062
6056
|
case 3:
|
|
6063
|
-
|
|
6057
|
+
J2(f, t, n);
|
|
6064
6058
|
break;
|
|
6065
6059
|
case 4:
|
|
6066
|
-
|
|
6060
|
+
X2(f, t, n);
|
|
6067
6061
|
break;
|
|
6068
6062
|
case 5:
|
|
6069
|
-
|
|
6063
|
+
Z2(f, t, n);
|
|
6070
6064
|
break;
|
|
6071
6065
|
case 6:
|
|
6072
|
-
|
|
6066
|
+
Q2(f, t, n);
|
|
6073
6067
|
break;
|
|
6074
6068
|
case 7:
|
|
6075
|
-
|
|
6069
|
+
ut(f, t, n);
|
|
6076
6070
|
break;
|
|
6077
6071
|
case 8:
|
|
6078
|
-
|
|
6072
|
+
Dt(f, t);
|
|
6079
6073
|
break;
|
|
6080
6074
|
case 9:
|
|
6081
|
-
|
|
6075
|
+
ft(f, t);
|
|
6082
6076
|
break;
|
|
6083
6077
|
case 10:
|
|
6084
|
-
|
|
6078
|
+
et(f, t, n);
|
|
6085
6079
|
break;
|
|
6086
6080
|
case 11:
|
|
6087
|
-
|
|
6081
|
+
tt(f, t, n);
|
|
6088
6082
|
break;
|
|
6089
6083
|
case 12:
|
|
6090
|
-
|
|
6084
|
+
nt(f, t);
|
|
6091
6085
|
break;
|
|
6092
6086
|
case 13:
|
|
6093
|
-
|
|
6087
|
+
rt(f);
|
|
6094
6088
|
break;
|
|
6095
6089
|
case 14:
|
|
6096
|
-
|
|
6090
|
+
at(f, t);
|
|
6097
6091
|
break;
|
|
6098
6092
|
case 15:
|
|
6099
|
-
|
|
6093
|
+
st(f, t);
|
|
6100
6094
|
break;
|
|
6101
6095
|
case 16:
|
|
6102
|
-
|
|
6096
|
+
Ft(f, t);
|
|
6103
6097
|
break;
|
|
6104
6098
|
case 17:
|
|
6105
|
-
|
|
6099
|
+
it(f, t);
|
|
6106
6100
|
break;
|
|
6107
6101
|
case 18:
|
|
6108
|
-
|
|
6102
|
+
ot(f, t);
|
|
6109
6103
|
break;
|
|
6110
6104
|
case 19:
|
|
6111
|
-
|
|
6105
|
+
dt(f, t);
|
|
6112
6106
|
break;
|
|
6113
6107
|
case 20:
|
|
6114
|
-
|
|
6108
|
+
Ct(f, t);
|
|
6115
6109
|
break;
|
|
6116
6110
|
default:
|
|
6117
|
-
|
|
6111
|
+
Gu(f.state);
|
|
6118
6112
|
}
|
|
6119
6113
|
f.charIdx++;
|
|
6120
6114
|
}
|
|
6121
|
-
f.currentDataIdx < f.charIdx &&
|
|
6115
|
+
f.currentDataIdx < f.charIdx && ct(f);
|
|
6122
6116
|
}
|
|
6123
|
-
function
|
|
6117
|
+
function Y2(u, D) {
|
|
6124
6118
|
D === "<" && Ou(u);
|
|
6125
6119
|
}
|
|
6126
|
-
function Y2(u, D, f) {
|
|
6127
|
-
D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(iu(iu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(iu(iu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = mf);
|
|
6128
|
-
}
|
|
6129
6120
|
function K2(u, D, f) {
|
|
6130
|
-
|
|
6121
|
+
D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = gf);
|
|
6131
6122
|
}
|
|
6132
6123
|
function J2(u, D, f) {
|
|
6133
|
-
D === "
|
|
6124
|
+
Xu(f) ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: VD(u) })), u.state = 4) : D === "<" ? Ou(u) : D === "/" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: VD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { name: VD(u) })), Ru(u)) : !rD(f) && !Eu(f) && D !== ":" && xu(u);
|
|
6134
6125
|
}
|
|
6135
6126
|
function G2(u, D, f) {
|
|
6136
|
-
|
|
6127
|
+
D === ">" ? xu(u) : rD(f) ? u.state = 3 : xu(u);
|
|
6137
6128
|
}
|
|
6138
6129
|
function X2(u, D, f) {
|
|
6139
|
-
|
|
6130
|
+
Xu(f) || (D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : D === "=" || hf(f) || d3(f) ? xu(u) : u.state = 5);
|
|
6140
6131
|
}
|
|
6141
6132
|
function Z2(u, D, f) {
|
|
6142
|
-
|
|
6133
|
+
Xu(f) ? u.state = 6 : D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : hf(f) && xu(u);
|
|
6143
6134
|
}
|
|
6144
6135
|
function Q2(u, D, f) {
|
|
6145
|
-
|
|
6136
|
+
Xu(f) || (D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : hf(f) ? xu(u) : u.state = 5);
|
|
6146
6137
|
}
|
|
6147
|
-
function ut(u, D) {
|
|
6148
|
-
D === '"'
|
|
6138
|
+
function ut(u, D, f) {
|
|
6139
|
+
Xu(f) || (D === '"' ? u.state = 8 : D === "'" ? u.state = 9 : /[>=`]/.test(D) ? xu(u) : D === "<" ? Ou(u) : u.state = 10);
|
|
6149
6140
|
}
|
|
6150
6141
|
function Dt(u, D) {
|
|
6151
|
-
D === "'
|
|
6142
|
+
D === '"' && (u.state = 11);
|
|
6152
6143
|
}
|
|
6153
|
-
function ft(u, D
|
|
6154
|
-
|
|
6144
|
+
function ft(u, D) {
|
|
6145
|
+
D === "'" && (u.state = 11);
|
|
6155
6146
|
}
|
|
6156
6147
|
function et(u, D, f) {
|
|
6157
|
-
|
|
6148
|
+
Xu(f) ? u.state = 4 : D === ">" ? Ru(u) : D === "<" && Ou(u);
|
|
6149
|
+
}
|
|
6150
|
+
function tt(u, D, f) {
|
|
6151
|
+
Xu(f) ? u.state = 4 : D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : (u.state = 4, lt(u));
|
|
6158
6152
|
}
|
|
6159
|
-
function
|
|
6160
|
-
D === ">" ? (u.currentTag = new Su(
|
|
6153
|
+
function nt(u, D) {
|
|
6154
|
+
D === ">" ? (u.currentTag = new Su(Fu(Fu({}, u.currentTag), { isClosing: !0 })), Ru(u)) : xu(u);
|
|
6161
6155
|
}
|
|
6162
|
-
function
|
|
6156
|
+
function rt(u) {
|
|
6163
6157
|
var D = u.html, f = u.charIdx;
|
|
6164
|
-
D.slice(f, f + 2) === "--" ? (u.charIdx++, u.currentTag = new Su(
|
|
6158
|
+
D.slice(f, f + 2) === "--" ? (u.charIdx++, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { type: "comment" })), u.state = 14) : D.slice(f, f + 7).toUpperCase() === "DOCTYPE" ? (u.charIdx += 6, u.currentTag = new Su(Fu(Fu({}, u.currentTag), { type: "doctype" })), u.state = 20) : xu(u);
|
|
6165
6159
|
}
|
|
6166
|
-
function
|
|
6160
|
+
function at(u, D) {
|
|
6167
6161
|
D === "-" ? u.state = 15 : D === ">" ? xu(u) : u.state = 16;
|
|
6168
6162
|
}
|
|
6169
|
-
function
|
|
6163
|
+
function st(u, D) {
|
|
6170
6164
|
D === "-" ? u.state = 18 : D === ">" ? xu(u) : u.state = 16;
|
|
6171
6165
|
}
|
|
6172
|
-
function
|
|
6166
|
+
function Ft(u, D) {
|
|
6173
6167
|
D === "-" && (u.state = 17);
|
|
6174
6168
|
}
|
|
6175
|
-
function
|
|
6169
|
+
function it(u, D) {
|
|
6176
6170
|
D === "-" ? u.state = 18 : u.state = 16;
|
|
6177
6171
|
}
|
|
6178
|
-
function
|
|
6172
|
+
function ot(u, D) {
|
|
6179
6173
|
D === ">" ? Ru(u) : D === "!" ? u.state = 19 : D === "-" || (u.state = 16);
|
|
6180
6174
|
}
|
|
6181
|
-
function
|
|
6175
|
+
function dt(u, D) {
|
|
6182
6176
|
D === "-" ? u.state = 17 : D === ">" ? Ru(u) : u.state = 16;
|
|
6183
6177
|
}
|
|
6184
|
-
function
|
|
6178
|
+
function Ct(u, D) {
|
|
6185
6179
|
D === ">" ? Ru(u) : D === "<" && Ou(u);
|
|
6186
6180
|
}
|
|
6187
6181
|
function xu(u) {
|
|
6188
|
-
u.state = 0, u.currentTag =
|
|
6182
|
+
u.state = 0, u.currentTag = gf;
|
|
6189
6183
|
}
|
|
6190
6184
|
function Ou(u) {
|
|
6191
6185
|
u.state = 1, u.currentTag = new Su({ idx: u.charIdx });
|
|
@@ -6196,7 +6190,7 @@ function Ru(u) {
|
|
|
6196
6190
|
var f = u.currentTag;
|
|
6197
6191
|
f.type === "comment" ? u.callbacks.onComment(f.idx) : f.type === "doctype" ? u.callbacks.onDoctype(f.idx) : (f.isOpening && u.callbacks.onOpenTag(f.name, f.idx), f.isClosing && u.callbacks.onCloseTag(f.name, f.idx)), xu(u), u.currentDataIdx = u.charIdx + 1;
|
|
6198
6192
|
}
|
|
6199
|
-
function
|
|
6193
|
+
function ct(u) {
|
|
6200
6194
|
var D = u.html.slice(u.currentDataIdx, u.charIdx);
|
|
6201
6195
|
u.callbacks.onText(D, u.currentDataIdx), u.currentDataIdx = u.charIdx + 1;
|
|
6202
6196
|
}
|
|
@@ -6204,10 +6198,10 @@ function VD(u) {
|
|
|
6204
6198
|
var D = u.currentTag.idx + (u.currentTag.isClosing ? 2 : 1);
|
|
6205
6199
|
return u.html.slice(D, u.charIdx).toLowerCase();
|
|
6206
6200
|
}
|
|
6207
|
-
function
|
|
6201
|
+
function lt(u) {
|
|
6208
6202
|
u.charIdx--;
|
|
6209
6203
|
}
|
|
6210
|
-
var
|
|
6204
|
+
var Et = (
|
|
6211
6205
|
/** @class */
|
|
6212
6206
|
function() {
|
|
6213
6207
|
function u(D) {
|
|
@@ -6217,14 +6211,14 @@ var lt = (
|
|
|
6217
6211
|
}, this.stripTrailingSlash = !0, this.decodePercentEncoding = !0, this.truncate = {
|
|
6218
6212
|
length: 0,
|
|
6219
6213
|
location: "end"
|
|
6220
|
-
}, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.tagBuilder = null, this.urls =
|
|
6214
|
+
}, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.tagBuilder = null, this.urls = ht(D.urls), this.email = wu(D.email) ? D.email : this.email, this.phone = wu(D.phone) ? D.phone : this.phone, this.hashtag = D.hashtag || this.hashtag, this.mention = D.mention || this.mention, this.newWindow = wu(D.newWindow) ? D.newWindow : this.newWindow, this.stripPrefix = bt(D.stripPrefix), this.stripTrailingSlash = wu(D.stripTrailingSlash) ? D.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = wu(D.decodePercentEncoding) ? D.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = D.sanitizeHtml || !1;
|
|
6221
6215
|
var f = this.mention;
|
|
6222
|
-
if (f !== !1 &&
|
|
6216
|
+
if (f !== !1 && z3.indexOf(f) === -1)
|
|
6223
6217
|
throw new Error("invalid `mention` cfg '".concat(f, "' - see docs"));
|
|
6224
6218
|
var e = this.hashtag;
|
|
6225
|
-
if (e !== !1 &&
|
|
6219
|
+
if (e !== !1 && $3.indexOf(e) === -1)
|
|
6226
6220
|
throw new Error("invalid `hashtag` cfg '".concat(e, "' - see docs"));
|
|
6227
|
-
this.truncate =
|
|
6221
|
+
this.truncate = pt(D.truncate), this.className = D.className || this.className, this.replaceFn = D.replaceFn || this.replaceFn, this.context = D.context || this;
|
|
6228
6222
|
}
|
|
6229
6223
|
return u.link = function(D, f) {
|
|
6230
6224
|
var e = new u(f);
|
|
@@ -6234,7 +6228,7 @@ var lt = (
|
|
|
6234
6228
|
return e.parse(D);
|
|
6235
6229
|
}, u.prototype.parse = function(D) {
|
|
6236
6230
|
var f = this, e = ["a", "style", "script"], t = 0, n = [];
|
|
6237
|
-
return
|
|
6231
|
+
return W2(D, {
|
|
6238
6232
|
onOpenTag: function(r) {
|
|
6239
6233
|
e.indexOf(r) >= 0 && t++;
|
|
6240
6234
|
},
|
|
@@ -6244,7 +6238,7 @@ var lt = (
|
|
|
6244
6238
|
d.forEach(function(c, l) {
|
|
6245
6239
|
if (l % 2 === 0) {
|
|
6246
6240
|
var j = f.parseText(c, o);
|
|
6247
|
-
n.push.apply(n,
|
|
6241
|
+
n.push.apply(n, e3([], f3(j), !1));
|
|
6248
6242
|
}
|
|
6249
6243
|
o += c.length;
|
|
6250
6244
|
});
|
|
@@ -6261,7 +6255,7 @@ var lt = (
|
|
|
6261
6255
|
// no need to process doctype nodes
|
|
6262
6256
|
}), n = this.compactMatches(n), n = this.removeUnwantedMatches(n), n;
|
|
6263
6257
|
}, u.prototype.compactMatches = function(D) {
|
|
6264
|
-
D.sort(
|
|
6258
|
+
D.sort(Bt);
|
|
6265
6259
|
for (var f = 0; f < D.length - 1; ) {
|
|
6266
6260
|
var e = D[f], t = e.getOffset(), n = e.getMatchedText().length;
|
|
6267
6261
|
if (f + 1 < D.length && D[f + 1].getOffset() === t) {
|
|
@@ -6290,7 +6284,7 @@ var lt = (
|
|
|
6290
6284
|
}), D;
|
|
6291
6285
|
}, u.prototype.parseText = function(D, f) {
|
|
6292
6286
|
f = f || 0;
|
|
6293
|
-
for (var e =
|
|
6287
|
+
for (var e = X3(D, {
|
|
6294
6288
|
tagBuilder: this.getTagBuilder(),
|
|
6295
6289
|
stripPrefix: this.stripPrefix,
|
|
6296
6290
|
stripTrailingSlash: this.stripTrailingSlash,
|
|
@@ -6321,31 +6315,31 @@ var lt = (
|
|
|
6321
6315
|
return e.toAnchorString();
|
|
6322
6316
|
}, u.prototype.getTagBuilder = function() {
|
|
6323
6317
|
var D = this.tagBuilder;
|
|
6324
|
-
return D || (D = this.tagBuilder = new
|
|
6318
|
+
return D || (D = this.tagBuilder = new o3({
|
|
6325
6319
|
newWindow: this.newWindow,
|
|
6326
6320
|
truncate: this.truncate,
|
|
6327
6321
|
className: this.className
|
|
6328
6322
|
})), D;
|
|
6329
|
-
}, u.version =
|
|
6323
|
+
}, u.version = t3, u;
|
|
6330
6324
|
}()
|
|
6331
6325
|
);
|
|
6332
|
-
function
|
|
6326
|
+
function ht(u) {
|
|
6333
6327
|
return u == null && (u = !0), wu(u) ? { schemeMatches: u, tldMatches: u, ipV4Matches: u } : {
|
|
6334
6328
|
schemeMatches: wu(u.schemeMatches) ? u.schemeMatches : !0,
|
|
6335
6329
|
tldMatches: wu(u.tldMatches) ? u.tldMatches : !0,
|
|
6336
6330
|
ipV4Matches: wu(u.ipV4Matches) ? u.ipV4Matches : !0
|
|
6337
6331
|
};
|
|
6338
6332
|
}
|
|
6339
|
-
function
|
|
6333
|
+
function bt(u) {
|
|
6340
6334
|
return u == null && (u = !0), wu(u) ? { scheme: u, www: u } : {
|
|
6341
6335
|
scheme: wu(u.scheme) ? u.scheme : !0,
|
|
6342
6336
|
www: wu(u.www) ? u.www : !0
|
|
6343
6337
|
};
|
|
6344
6338
|
}
|
|
6345
|
-
function
|
|
6346
|
-
return typeof u == "number" ? { length: u, location: "end" } :
|
|
6339
|
+
function pt(u) {
|
|
6340
|
+
return typeof u == "number" ? { length: u, location: "end" } : Fu({ length: Number.POSITIVE_INFINITY, location: "end" }, u);
|
|
6347
6341
|
}
|
|
6348
|
-
function
|
|
6342
|
+
function Bt(u, D) {
|
|
6349
6343
|
return u.getOffset() - D.getOffset();
|
|
6350
6344
|
}
|
|
6351
6345
|
const Ju = [
|
|
@@ -6354,7 +6348,7 @@ const Ju = [
|
|
|
6354
6348
|
{ name: "New Zealand", countryCode: "+64", code: "NZ", flag: "🇳🇿" },
|
|
6355
6349
|
{ name: "United Kingdom", countryCode: "+44", code: "UK", flag: "🇬🇧" },
|
|
6356
6350
|
{ name: "Indonesia", countryCode: "+62", code: "ID", flag: "🇮🇩" }
|
|
6357
|
-
],
|
|
6351
|
+
], mt = {
|
|
6358
6352
|
AU: /^(?:\+?(61))? ?(?:\((?=.*\))\))?(0?[4])\)? ?(\d\d(?:[- ](?=\d{3})|(?!\d\d[- ]?\d[- ]))\d\d[- ]?\d[- ]?\d{3})$/gm,
|
|
6359
6353
|
US: /^(\+?1\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
6360
6354
|
UK: /^(\+?44\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
@@ -6366,16 +6360,16 @@ const Ju = [
|
|
|
6366
6360
|
NZ: "+64",
|
|
6367
6361
|
UK: "+44",
|
|
6368
6362
|
ID: "+62"
|
|
6369
|
-
},
|
|
6370
|
-
function
|
|
6363
|
+
}, _t = (u) => u.toUpperCase(), yt = (u) => u.replace(/\s+/g, "").replace(/[^0-9+]/g, "");
|
|
6364
|
+
function vt(u, D) {
|
|
6371
6365
|
const f = gt[u];
|
|
6372
6366
|
return D.startsWith(f) ? { cleanNumber: D.slice(f.length), countryCode: f } : { cleanNumber: D, countryCode: f };
|
|
6373
6367
|
}
|
|
6374
|
-
function
|
|
6375
|
-
const f =
|
|
6368
|
+
function wt(u, D) {
|
|
6369
|
+
const f = mt[u];
|
|
6376
6370
|
return new RegExp(f.source, "mi").test(D);
|
|
6377
6371
|
}
|
|
6378
|
-
function
|
|
6372
|
+
function At({
|
|
6379
6373
|
number: u,
|
|
6380
6374
|
region: D,
|
|
6381
6375
|
validateDuplicate: f,
|
|
@@ -6387,19 +6381,19 @@ function wt({
|
|
|
6387
6381
|
cleanNumber: "",
|
|
6388
6382
|
errorMessage: "",
|
|
6389
6383
|
isValid: !1
|
|
6390
|
-
}, n =
|
|
6384
|
+
}, n = _t(D);
|
|
6391
6385
|
if (!u)
|
|
6392
6386
|
return t.errorMessage = "Number is empty", t;
|
|
6393
6387
|
const r = u.trim();
|
|
6394
|
-
let s =
|
|
6388
|
+
let s = yt(u);
|
|
6395
6389
|
s = s.startsWith("0") ? s.slice(1) : s;
|
|
6396
|
-
const { cleanNumber: F, countryCode: d } =
|
|
6390
|
+
const { cleanNumber: F, countryCode: d } = vt(
|
|
6397
6391
|
n,
|
|
6398
6392
|
s
|
|
6399
6393
|
);
|
|
6400
6394
|
s = F, t.fullNumber = `${d}${s}`, t.cleanNumber = s;
|
|
6401
6395
|
try {
|
|
6402
|
-
if (!
|
|
6396
|
+
if (!wt(n, r)) throw new Error("Please enter a valid phone number");
|
|
6403
6397
|
t.isValid = !0;
|
|
6404
6398
|
} catch (o) {
|
|
6405
6399
|
t.errorMessage = o.message, t.isValid = !1;
|
|
@@ -6412,31 +6406,31 @@ const U1 = ({
|
|
|
6412
6406
|
} = {}) => {
|
|
6413
6407
|
const [f, e] = U(
|
|
6414
6408
|
u || {}
|
|
6415
|
-
), [t, n] = U({}), [r, s] = U({}), F = (C,
|
|
6409
|
+
), [t, n] = U({}), [r, s] = U({}), F = (C, y) => {
|
|
6416
6410
|
let x = "";
|
|
6417
6411
|
if (C.isRequired)
|
|
6418
|
-
if (typeof
|
|
6419
|
-
const
|
|
6420
|
-
if (!
|
|
6412
|
+
if (typeof y == "string") {
|
|
6413
|
+
const g = y.trim();
|
|
6414
|
+
if (!g) return `${C.label} is required`;
|
|
6421
6415
|
if (C.key.toLowerCase().includes("phone") || C.label.toLowerCase().includes("phone")) {
|
|
6422
|
-
const T =
|
|
6416
|
+
const T = g.replace(/\s+/g, ""), _ = Ju.find((I) => T.startsWith(I.countryCode)), B = T.replace(/^\+?\d+/, "");
|
|
6423
6417
|
if (_ && B.length === 0)
|
|
6424
6418
|
return "";
|
|
6425
6419
|
}
|
|
6426
|
-
} else typeof
|
|
6420
|
+
} else typeof y == "boolean" ? y !== !0 && (x = `${C.label} is required`) : y || (x = `${C.label} is required`);
|
|
6427
6421
|
if (x && t[C.key])
|
|
6428
|
-
return
|
|
6422
|
+
return x;
|
|
6429
6423
|
if (C.key.toLowerCase().includes("email") || C.label.toLowerCase().includes("email")) {
|
|
6430
|
-
const
|
|
6431
|
-
|
|
6424
|
+
const g = String(y || "").trim();
|
|
6425
|
+
g && (/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(g) || (x = "Please enter a valid email address"));
|
|
6432
6426
|
}
|
|
6433
6427
|
if (C.key.toLowerCase().includes("phone") || C.label.toLowerCase().includes("phone")) {
|
|
6434
|
-
const
|
|
6428
|
+
const g = String(y || ""), T = g.replace(/[^0-9+]/g, ""), _ = Ju.find((P) => T.startsWith(P.countryCode)), B = (_ == null ? void 0 : _.code) || "AU", I = _ ? T.substring(_.countryCode.length) : T;
|
|
6435
6429
|
if (!C.isRequired && _ && I === "")
|
|
6436
6430
|
return "";
|
|
6437
|
-
if (
|
|
6438
|
-
const P =
|
|
6439
|
-
number:
|
|
6431
|
+
if (g) {
|
|
6432
|
+
const P = At({
|
|
6433
|
+
number: g,
|
|
6440
6434
|
region: B,
|
|
6441
6435
|
validateDuplicate: !1,
|
|
6442
6436
|
contacts: /* @__PURE__ */ new Map()
|
|
@@ -6456,44 +6450,44 @@ const U1 = ({
|
|
|
6456
6450
|
}
|
|
6457
6451
|
}, [D]);
|
|
6458
6452
|
const d = Mu(
|
|
6459
|
-
(C,
|
|
6453
|
+
(C, y) => {
|
|
6460
6454
|
e((x) => ({
|
|
6461
6455
|
...x,
|
|
6462
|
-
[C]:
|
|
6456
|
+
[C]: y
|
|
6463
6457
|
})), s((x) => ({ ...x, [C]: "" }));
|
|
6464
6458
|
},
|
|
6465
6459
|
[]
|
|
6466
6460
|
), o = Mu(
|
|
6467
6461
|
(C) => {
|
|
6468
|
-
n((
|
|
6469
|
-
const
|
|
6470
|
-
s((
|
|
6462
|
+
n((g) => ({ ...g, [C.key]: !0 }));
|
|
6463
|
+
const y = f[C.key], x = F(C, y);
|
|
6464
|
+
s((g) => ({ ...g, [C.key]: x }));
|
|
6471
6465
|
},
|
|
6472
6466
|
[f]
|
|
6473
6467
|
), c = (C) => {
|
|
6474
|
-
const
|
|
6468
|
+
const y = {
|
|
6475
6469
|
email: "email",
|
|
6476
6470
|
phone: "tel",
|
|
6477
6471
|
date: "date",
|
|
6478
6472
|
password: "password"
|
|
6479
|
-
}, x = Object.keys(
|
|
6480
|
-
(
|
|
6473
|
+
}, x = Object.keys(y).find(
|
|
6474
|
+
(g) => C.toLowerCase().includes(g)
|
|
6481
6475
|
);
|
|
6482
|
-
return x ?
|
|
6476
|
+
return x ? y[x] : "text";
|
|
6483
6477
|
}, l = Mu(
|
|
6484
6478
|
(C) => {
|
|
6485
6479
|
var T;
|
|
6486
6480
|
if (!C.isDisplay) return null;
|
|
6487
|
-
const
|
|
6481
|
+
const y = f[C.key], x = c(C.key), g = !!r[C.key] && t[C.key];
|
|
6488
6482
|
if (C.key.includes("language") || C.key.includes("country"))
|
|
6489
6483
|
return /* @__PURE__ */ a.jsx(
|
|
6490
6484
|
"select",
|
|
6491
6485
|
{
|
|
6492
|
-
className: `user-subscription-form-input${
|
|
6493
|
-
value:
|
|
6486
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6487
|
+
value: y || "",
|
|
6494
6488
|
onChange: (_) => d(C.key, _.target.value),
|
|
6495
6489
|
onBlur: () => o(C),
|
|
6496
|
-
"aria-invalid":
|
|
6490
|
+
"aria-invalid": g,
|
|
6497
6491
|
style: C.color ? { borderColor: C.color } : void 0,
|
|
6498
6492
|
children: /* @__PURE__ */ a.jsxs("option", { value: "", children: [
|
|
6499
6493
|
"Select ",
|
|
@@ -6509,24 +6503,24 @@ const U1 = ({
|
|
|
6509
6503
|
{
|
|
6510
6504
|
type: "checkbox",
|
|
6511
6505
|
id: C.key,
|
|
6512
|
-
checked:
|
|
6506
|
+
checked: y || !1,
|
|
6513
6507
|
onChange: (_) => d(C.key, _.target.checked),
|
|
6514
|
-
"aria-invalid":
|
|
6508
|
+
"aria-invalid": g
|
|
6515
6509
|
}
|
|
6516
6510
|
),
|
|
6517
6511
|
/* @__PURE__ */ a.jsx("label", { htmlFor: C.key, children: C.label })
|
|
6518
6512
|
] }, C.key);
|
|
6519
6513
|
if (C.key.toLowerCase().includes("phone")) {
|
|
6520
|
-
const _ =
|
|
6521
|
-
const O =
|
|
6514
|
+
const _ = y || "", B = ((T = Ju.find((m) => _.startsWith(m.countryCode))) == null ? void 0 : T.countryCode) || "+61", I = _.replace(/^\+?\d+\s?/, "").trim(), P = (m) => {
|
|
6515
|
+
const O = m.replace(/[^0-9\s]/g, "").trim();
|
|
6522
6516
|
d(
|
|
6523
6517
|
C.key,
|
|
6524
6518
|
O ? `${B} ${O}` : `${B} `
|
|
6525
6519
|
);
|
|
6526
|
-
}, q = (
|
|
6520
|
+
}, q = (m) => {
|
|
6527
6521
|
d(
|
|
6528
6522
|
C.key,
|
|
6529
|
-
I ? `${
|
|
6523
|
+
I ? `${m} ${I}` : `${m} `
|
|
6530
6524
|
);
|
|
6531
6525
|
};
|
|
6532
6526
|
return /* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form-field", children: [
|
|
@@ -6543,23 +6537,23 @@ const U1 = ({
|
|
|
6543
6537
|
/* @__PURE__ */ a.jsxs(
|
|
6544
6538
|
"select",
|
|
6545
6539
|
{
|
|
6546
|
-
className: `user-subscription-form-input${
|
|
6540
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6547
6541
|
style: {
|
|
6548
6542
|
maxWidth: "100px"
|
|
6549
6543
|
},
|
|
6550
6544
|
value: B,
|
|
6551
|
-
onChange: (
|
|
6545
|
+
onChange: (m) => q(m.target.value),
|
|
6552
6546
|
onBlur: () => o(C),
|
|
6553
|
-
"aria-invalid": !!
|
|
6547
|
+
"aria-invalid": !!g,
|
|
6554
6548
|
children: [
|
|
6555
6549
|
/* @__PURE__ */ a.jsx("option", { value: "", children: "+Code" }),
|
|
6556
|
-
Ju.map((
|
|
6550
|
+
Ju.map((m) => /* @__PURE__ */ a.jsx(
|
|
6557
6551
|
"option",
|
|
6558
6552
|
{
|
|
6559
|
-
value:
|
|
6560
|
-
children: `${
|
|
6553
|
+
value: m.countryCode,
|
|
6554
|
+
children: `${m.flag} ${m.countryCode}`
|
|
6561
6555
|
},
|
|
6562
|
-
|
|
6556
|
+
m.code
|
|
6563
6557
|
))
|
|
6564
6558
|
]
|
|
6565
6559
|
}
|
|
@@ -6567,13 +6561,13 @@ const U1 = ({
|
|
|
6567
6561
|
/* @__PURE__ */ a.jsx(
|
|
6568
6562
|
"input",
|
|
6569
6563
|
{
|
|
6570
|
-
className: `user-subscription-form-input${
|
|
6564
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6571
6565
|
type: "tel",
|
|
6572
6566
|
value: I,
|
|
6573
|
-
onChange: (
|
|
6567
|
+
onChange: (m) => P(m.target.value),
|
|
6574
6568
|
onBlur: () => o(C),
|
|
6575
6569
|
placeholder: C.label,
|
|
6576
|
-
"aria-invalid": !!
|
|
6570
|
+
"aria-invalid": !!g,
|
|
6577
6571
|
style: {
|
|
6578
6572
|
...C.color ? { borderColor: C.color } : {},
|
|
6579
6573
|
flex: 1
|
|
@@ -6583,24 +6577,24 @@ const U1 = ({
|
|
|
6583
6577
|
]
|
|
6584
6578
|
}
|
|
6585
6579
|
),
|
|
6586
|
-
|
|
6580
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
|
|
6587
6581
|
] }, C.key);
|
|
6588
6582
|
}
|
|
6589
6583
|
return /* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form-field", children: [
|
|
6590
6584
|
/* @__PURE__ */ a.jsx(
|
|
6591
6585
|
"input",
|
|
6592
6586
|
{
|
|
6593
|
-
className: `user-subscription-form-input${
|
|
6587
|
+
className: `user-subscription-form-input${g ? " error" : ""}`,
|
|
6594
6588
|
type: x,
|
|
6595
|
-
value:
|
|
6589
|
+
value: y || "",
|
|
6596
6590
|
onChange: (_) => d(C.key, _.target.value),
|
|
6597
6591
|
onBlur: () => o(C),
|
|
6598
6592
|
placeholder: C.label,
|
|
6599
|
-
"aria-invalid":
|
|
6593
|
+
"aria-invalid": g,
|
|
6600
6594
|
style: C.color ? { borderColor: C.color } : void 0
|
|
6601
6595
|
}
|
|
6602
6596
|
),
|
|
6603
|
-
|
|
6597
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "user-subscription-error", children: r[C.key] })
|
|
6604
6598
|
] }, C.key);
|
|
6605
6599
|
},
|
|
6606
6600
|
[r, t, f, d, o]
|
|
@@ -6608,18 +6602,18 @@ const U1 = ({
|
|
|
6608
6602
|
(C) => {
|
|
6609
6603
|
var T;
|
|
6610
6604
|
if (!C.isDisplay) return null;
|
|
6611
|
-
const
|
|
6605
|
+
const y = f[C.key], x = c(C.key), g = !!r[C.key] && t[C.key];
|
|
6612
6606
|
if (C.key.toLowerCase().includes("phone")) {
|
|
6613
|
-
const _ =
|
|
6614
|
-
const O =
|
|
6607
|
+
const _ = y || "", B = ((T = Ju.find((m) => _.startsWith(m.countryCode))) == null ? void 0 : T.countryCode) || "+61", I = _.replace(/^\+?\d+\s?/, "").trim(), P = (m) => {
|
|
6608
|
+
const O = m.replace(/[^0-9\s]/g, "").trim();
|
|
6615
6609
|
d(
|
|
6616
6610
|
C.key,
|
|
6617
6611
|
O ? `${B} ${O}` : `${B} `
|
|
6618
6612
|
);
|
|
6619
|
-
}, q = (
|
|
6613
|
+
}, q = (m) => {
|
|
6620
6614
|
d(
|
|
6621
6615
|
C.key,
|
|
6622
|
-
I ? `${
|
|
6616
|
+
I ? `${m} ${I}` : `${m} `
|
|
6623
6617
|
);
|
|
6624
6618
|
};
|
|
6625
6619
|
return /* @__PURE__ */ a.jsxs("div", { className: "sc-message--contact-form-field", children: [
|
|
@@ -6642,18 +6636,18 @@ const U1 = ({
|
|
|
6642
6636
|
className: "sc-message--contact-form-input",
|
|
6643
6637
|
style: { maxWidth: "100px" },
|
|
6644
6638
|
value: B,
|
|
6645
|
-
onChange: (
|
|
6639
|
+
onChange: (m) => q(m.target.value),
|
|
6646
6640
|
onBlur: () => o(C),
|
|
6647
|
-
"aria-invalid":
|
|
6641
|
+
"aria-invalid": g,
|
|
6648
6642
|
children: [
|
|
6649
6643
|
/* @__PURE__ */ a.jsx("option", { value: "", children: "+Code" }),
|
|
6650
|
-
Ju.map((
|
|
6644
|
+
Ju.map((m) => /* @__PURE__ */ a.jsx(
|
|
6651
6645
|
"option",
|
|
6652
6646
|
{
|
|
6653
|
-
value:
|
|
6654
|
-
children: `${
|
|
6647
|
+
value: m.countryCode,
|
|
6648
|
+
children: `${m.flag} ${m.countryCode}`
|
|
6655
6649
|
},
|
|
6656
|
-
|
|
6650
|
+
m.code
|
|
6657
6651
|
))
|
|
6658
6652
|
]
|
|
6659
6653
|
}
|
|
@@ -6664,22 +6658,22 @@ const U1 = ({
|
|
|
6664
6658
|
id: `contact-${C.key}`,
|
|
6665
6659
|
type: "tel",
|
|
6666
6660
|
value: I,
|
|
6667
|
-
onChange: (
|
|
6661
|
+
onChange: (m) => P(m.target.value),
|
|
6668
6662
|
onBlur: () => o(C),
|
|
6669
6663
|
placeholder: "",
|
|
6670
|
-
className: `sc-message--contact-form-input ${
|
|
6671
|
-
"aria-invalid":
|
|
6664
|
+
className: `sc-message--contact-form-input ${g ? "error" : ""}`,
|
|
6665
|
+
"aria-invalid": g,
|
|
6672
6666
|
style: {
|
|
6673
6667
|
...C.color ? { borderColor: C.color } : {},
|
|
6674
6668
|
flex: 1,
|
|
6675
|
-
...
|
|
6669
|
+
...g ? { borderColor: "#ff4444" } : {}
|
|
6676
6670
|
}
|
|
6677
6671
|
}
|
|
6678
6672
|
)
|
|
6679
6673
|
]
|
|
6680
6674
|
}
|
|
6681
6675
|
),
|
|
6682
|
-
|
|
6676
|
+
g && /* @__PURE__ */ a.jsx(
|
|
6683
6677
|
"div",
|
|
6684
6678
|
{
|
|
6685
6679
|
style: {
|
|
@@ -6706,19 +6700,19 @@ const U1 = ({
|
|
|
6706
6700
|
{
|
|
6707
6701
|
id: `contact-${C.key}`,
|
|
6708
6702
|
type: x,
|
|
6709
|
-
value:
|
|
6703
|
+
value: y || "",
|
|
6710
6704
|
onChange: (_) => d(C.key, _.target.value),
|
|
6711
6705
|
onBlur: () => o(C),
|
|
6712
6706
|
placeholder: "",
|
|
6713
|
-
className: `sc-message--contact-form-input ${
|
|
6714
|
-
"aria-invalid":
|
|
6707
|
+
className: `sc-message--contact-form-input ${g ? "error" : ""}`,
|
|
6708
|
+
"aria-invalid": g,
|
|
6715
6709
|
style: {
|
|
6716
6710
|
...C.color ? { borderColor: C.color } : {},
|
|
6717
|
-
...
|
|
6711
|
+
...g ? { borderColor: "#ff4444" } : {}
|
|
6718
6712
|
}
|
|
6719
6713
|
}
|
|
6720
6714
|
),
|
|
6721
|
-
|
|
6715
|
+
g && /* @__PURE__ */ a.jsx(
|
|
6722
6716
|
"div",
|
|
6723
6717
|
{
|
|
6724
6718
|
style: {
|
|
@@ -6739,12 +6733,12 @@ const U1 = ({
|
|
|
6739
6733
|
d,
|
|
6740
6734
|
o
|
|
6741
6735
|
]
|
|
6742
|
-
),
|
|
6743
|
-
const
|
|
6736
|
+
), v = Mu((C) => {
|
|
6737
|
+
const y = {};
|
|
6744
6738
|
return C.filter((x) => x.isDisplay).forEach((x) => {
|
|
6745
|
-
const
|
|
6746
|
-
|
|
6747
|
-
}), s((x) => ({ ...x, ...
|
|
6739
|
+
const g = f[x.key];
|
|
6740
|
+
y[x.key] = F(x, g);
|
|
6741
|
+
}), s((x) => ({ ...x, ...y })), C.filter((x) => x.isDisplay && x.isRequired).every((x) => y[x.key] === "");
|
|
6748
6742
|
}, [f, F]);
|
|
6749
6743
|
return {
|
|
6750
6744
|
formData: f,
|
|
@@ -6757,10 +6751,10 @@ const U1 = ({
|
|
|
6757
6751
|
renderContactFormField: j,
|
|
6758
6752
|
getInputType: c,
|
|
6759
6753
|
errors: r,
|
|
6760
|
-
validateAll:
|
|
6754
|
+
validateAll: v
|
|
6761
6755
|
};
|
|
6762
6756
|
};
|
|
6763
|
-
function
|
|
6757
|
+
function xt(u) {
|
|
6764
6758
|
const D = {};
|
|
6765
6759
|
return Object.entries(u).forEach(([f, e]) => {
|
|
6766
6760
|
if (e) {
|
|
@@ -6773,34 +6767,34 @@ function At(u) {
|
|
|
6773
6767
|
}
|
|
6774
6768
|
}), D;
|
|
6775
6769
|
}
|
|
6776
|
-
const
|
|
6770
|
+
const kt = ({
|
|
6777
6771
|
onSubmit: u,
|
|
6778
6772
|
onFormStateChange: D
|
|
6779
6773
|
}) => {
|
|
6780
|
-
const { colors: f } =
|
|
6774
|
+
const { colors: f } = iu(), e = Wu(), t = pu(), { socket: n } = tD(), { setScreen: r } = Nu();
|
|
6781
6775
|
zu();
|
|
6782
|
-
const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } =
|
|
6776
|
+
const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } = du(), { formData: j, renderContactFormField: v, errors: C, validateAll: y } = U1({
|
|
6783
6777
|
initialData: {},
|
|
6784
6778
|
loadFromDataUserSubs: !0
|
|
6785
|
-
}), [x,
|
|
6779
|
+
}), [x, g] = U(!1), [T, _] = U(!1);
|
|
6786
6780
|
Z(() => {
|
|
6787
6781
|
D && !T && D(!0), D && T && D(!1);
|
|
6788
6782
|
}, [T]);
|
|
6789
6783
|
const B = async (P) => {
|
|
6790
|
-
var
|
|
6791
|
-
if (P.preventDefault(), !!
|
|
6792
|
-
|
|
6784
|
+
var m;
|
|
6785
|
+
if (P.preventDefault(), !!y(t.formSettings)) {
|
|
6786
|
+
g(!0);
|
|
6793
6787
|
try {
|
|
6794
6788
|
const O = {};
|
|
6795
6789
|
t.formSettings.forEach((E) => {
|
|
6796
6790
|
var h;
|
|
6797
6791
|
E.isDisplay && j[E.key] !== void 0 && (O[E.key] = ((h = j[E.key]) == null ? void 0 : h.toString().trim()) || "");
|
|
6798
6792
|
});
|
|
6799
|
-
const
|
|
6793
|
+
const L = xt(O);
|
|
6800
6794
|
if (!X.getItem("profileLiveChat"))
|
|
6801
6795
|
try {
|
|
6802
6796
|
const E = new URLSearchParams();
|
|
6803
|
-
Object.entries(
|
|
6797
|
+
Object.entries(L).forEach(([M, V]) => {
|
|
6804
6798
|
typeof V == "string" && V && E.append(M, V);
|
|
6805
6799
|
}), E.append("owner_id", e.ownerId), E.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString());
|
|
6806
6800
|
const { body: h } = await n.get(`/webhook/${e.channel}/?${E.toString()}`), { messages: A, profile: p } = h;
|
|
@@ -6819,12 +6813,12 @@ const xt = ({
|
|
|
6819
6813
|
}
|
|
6820
6814
|
]), l(3), r("chat"), _(!0);
|
|
6821
6815
|
const N = {
|
|
6822
|
-
text: Object.entries(
|
|
6816
|
+
text: Object.entries(L).map(
|
|
6823
6817
|
([M, V]) => `${M.charAt(0).toUpperCase() + M.slice(1)}: ${V}`
|
|
6824
6818
|
).join(`
|
|
6825
6819
|
`),
|
|
6826
6820
|
contactInfo: {
|
|
6827
|
-
|
|
6821
|
+
...L,
|
|
6828
6822
|
owner_id: e.ownerId
|
|
6829
6823
|
},
|
|
6830
6824
|
contactLateTime: /* @__PURE__ */ new Date()
|
|
@@ -6843,12 +6837,12 @@ const xt = ({
|
|
|
6843
6837
|
console.error("Error in subscription flow:", E);
|
|
6844
6838
|
}
|
|
6845
6839
|
const k = {
|
|
6846
|
-
text: Object.entries(
|
|
6840
|
+
text: Object.entries(L).map(
|
|
6847
6841
|
([E, h]) => `${E.charAt(0).toUpperCase() + E.slice(1)}: ${h}`
|
|
6848
6842
|
).join(`
|
|
6849
6843
|
`),
|
|
6850
6844
|
contactInfo: {
|
|
6851
|
-
|
|
6845
|
+
...L,
|
|
6852
6846
|
owner_id: e.ownerId
|
|
6853
6847
|
},
|
|
6854
6848
|
contactLateTime: /* @__PURE__ */ new Date()
|
|
@@ -6859,13 +6853,13 @@ const xt = ({
|
|
|
6859
6853
|
data: {
|
|
6860
6854
|
type: Au.text,
|
|
6861
6855
|
data: k,
|
|
6862
|
-
author: (
|
|
6856
|
+
author: (m = d[1]) == null ? void 0 : m.id
|
|
6863
6857
|
}
|
|
6864
6858
|
}), _(!0), s(!0), u && u(O.name, O.phone);
|
|
6865
6859
|
} catch (O) {
|
|
6866
6860
|
console.error("Error sending contact form to webhook:", O);
|
|
6867
6861
|
} finally {
|
|
6868
|
-
|
|
6862
|
+
g(!1);
|
|
6869
6863
|
}
|
|
6870
6864
|
}
|
|
6871
6865
|
}, I = f[uu.received];
|
|
@@ -6878,7 +6872,7 @@ const xt = ({
|
|
|
6878
6872
|
backgroundColor: I.bg
|
|
6879
6873
|
},
|
|
6880
6874
|
children: /* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-content", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: B, className: "sc-message--contact-form-form", noValidate: !0, children: [
|
|
6881
|
-
t.formSettings.sort((P, q) => P.order - q.order).map(
|
|
6875
|
+
t.formSettings.sort((P, q) => P.order - q.order).map(v),
|
|
6882
6876
|
/* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-authorization", children: /* @__PURE__ */ a.jsx(
|
|
6883
6877
|
"a",
|
|
6884
6878
|
{
|
|
@@ -6906,18 +6900,18 @@ const xt = ({
|
|
|
6906
6900
|
] }) })
|
|
6907
6901
|
}
|
|
6908
6902
|
);
|
|
6909
|
-
},
|
|
6903
|
+
}, jt = ({
|
|
6910
6904
|
message: u,
|
|
6911
6905
|
onFormSubmitted: D
|
|
6912
6906
|
}) => {
|
|
6913
|
-
const { colors: f } =
|
|
6907
|
+
const { colors: f } = iu(), { setIsContactFormActive: e } = du(), t = gu(null);
|
|
6914
6908
|
Z(() => {
|
|
6915
6909
|
n();
|
|
6916
6910
|
}, [u]);
|
|
6917
6911
|
const n = () => {
|
|
6918
6912
|
if (u.direction === uu.received && t.current) {
|
|
6919
6913
|
const F = t.current.innerText;
|
|
6920
|
-
let d =
|
|
6914
|
+
let d = Et.link(F, {
|
|
6921
6915
|
className: "chatLink",
|
|
6922
6916
|
truncate: { length: 50, location: "smart" }
|
|
6923
6917
|
});
|
|
@@ -6928,7 +6922,7 @@ const xt = ({
|
|
|
6928
6922
|
throw new Error("Unable to find text.");
|
|
6929
6923
|
const r = f[u.direction || uu.received];
|
|
6930
6924
|
return "isShowForm" in u.data && u.data.isShowForm ? /* @__PURE__ */ a.jsx(
|
|
6931
|
-
|
|
6925
|
+
kt,
|
|
6932
6926
|
{
|
|
6933
6927
|
onFormStateChange: (F) => {
|
|
6934
6928
|
e(F), !F && D && D(!0);
|
|
@@ -6966,8 +6960,8 @@ const xt = ({
|
|
|
6966
6960
|
...r,
|
|
6967
6961
|
children: /* @__PURE__ */ a.jsx("path", { d: "M20 6L9 17l-5-5" })
|
|
6968
6962
|
}
|
|
6969
|
-
),
|
|
6970
|
-
const { colors: D } =
|
|
6963
|
+
), St = ({ message: u }) => {
|
|
6964
|
+
const { colors: D } = iu();
|
|
6971
6965
|
if (!("delivery" in u && "read" in u))
|
|
6972
6966
|
throw new Error("Unable to find delivery/read attributes");
|
|
6973
6967
|
return /* @__PURE__ */ a.jsxs("div", { className: "sc--status", style: { color: D.messageStatus.bg }, children: [
|
|
@@ -6998,9 +6992,9 @@ const xt = ({
|
|
|
6998
6992
|
)
|
|
6999
6993
|
] });
|
|
7000
6994
|
};
|
|
7001
|
-
j1.extend(
|
|
7002
|
-
const
|
|
7003
|
-
const { participants: f } =
|
|
6995
|
+
j1.extend(We);
|
|
6996
|
+
const Tt = ({ message: u, Avatar: D }) => {
|
|
6997
|
+
const { participants: f } = du(), { colors: e } = iu(), [t, n] = U(!1), [r, s] = U(!1), F = pu(), d = u.data && "text" in u.data && "isShowForm" in u.data && u.data.isShowForm, o = f.find(
|
|
7004
6998
|
(j) => j.id === u.author
|
|
7005
6999
|
) || {
|
|
7006
7000
|
name: "Anon"
|
|
@@ -7029,19 +7023,19 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7029
7023
|
),
|
|
7030
7024
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-message--wrapper", onClick: c, children: [
|
|
7031
7025
|
u.data && "text" in u.data && /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
|
|
7032
|
-
|
|
7026
|
+
jt,
|
|
7033
7027
|
{
|
|
7034
7028
|
message: u,
|
|
7035
7029
|
onFormSubmitted: s
|
|
7036
7030
|
}
|
|
7037
7031
|
) }),
|
|
7038
|
-
u.type === "file" && /* @__PURE__ */ a.jsx(
|
|
7039
|
-
u.type === "location" && /* @__PURE__ */ a.jsx(
|
|
7040
|
-
u.type === "list" && /* @__PURE__ */ a.jsx(
|
|
7041
|
-
u.type === "carousel" && /* @__PURE__ */ a.jsx(
|
|
7032
|
+
u.type === "file" && /* @__PURE__ */ a.jsx(Qe, { message: u }),
|
|
7033
|
+
u.type === "location" && /* @__PURE__ */ a.jsx(u3, { message: u }),
|
|
7034
|
+
u.type === "list" && /* @__PURE__ */ a.jsx(D3, { messageList: u }),
|
|
7035
|
+
u.type === "carousel" && /* @__PURE__ */ a.jsx(Xe, { messageCarousel: u }),
|
|
7042
7036
|
u.type === "buttons" && /* @__PURE__ */ a.jsx(vD, { message: u }),
|
|
7043
7037
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-message--meta", children: [
|
|
7044
|
-
u.direction === "sent" && /* @__PURE__ */ a.jsx(
|
|
7038
|
+
u.direction === "sent" && /* @__PURE__ */ a.jsx(St, { message: u }),
|
|
7045
7039
|
/* @__PURE__ */ a.jsx(
|
|
7046
7040
|
"div",
|
|
7047
7041
|
{
|
|
@@ -7053,8 +7047,8 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7053
7047
|
] })
|
|
7054
7048
|
] })
|
|
7055
7049
|
] }) });
|
|
7056
|
-
},
|
|
7057
|
-
const { colors: u } =
|
|
7050
|
+
}, Nt = () => {
|
|
7051
|
+
const { colors: u } = iu();
|
|
7058
7052
|
return /* @__PURE__ */ a.jsxs(
|
|
7059
7053
|
"div",
|
|
7060
7054
|
{
|
|
@@ -7070,18 +7064,18 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7070
7064
|
]
|
|
7071
7065
|
}
|
|
7072
7066
|
);
|
|
7073
|
-
},
|
|
7067
|
+
}, Ot = ({
|
|
7074
7068
|
Avatar: u,
|
|
7075
7069
|
phone: D
|
|
7076
7070
|
}) => {
|
|
7077
|
-
const f = X.getItem("profileLiveChat"), { colors: e } =
|
|
7071
|
+
const f = X.getItem("profileLiveChat"), { colors: e } = iu(), t = e[uu.received];
|
|
7078
7072
|
pu();
|
|
7079
|
-
const { participants: n } =
|
|
7073
|
+
const { participants: n } = du(), r = n.find(
|
|
7080
7074
|
(o) => o.id === "chatbot"
|
|
7081
7075
|
) || {
|
|
7082
7076
|
name: "Bot"
|
|
7083
7077
|
}, s = (f == null ? void 0 : f.mobile) || "", d = `${(f == null ? void 0 : f.countryCode) || "+61"} ${s}`;
|
|
7084
|
-
return
|
|
7078
|
+
return /* @__PURE__ */ a.jsx("div", { className: `sc-message ${uu.received}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${uu.received}`, children: [
|
|
7085
7079
|
/* @__PURE__ */ a.jsx(
|
|
7086
7080
|
"div",
|
|
7087
7081
|
{
|
|
@@ -7118,29 +7112,29 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7118
7112
|
}
|
|
7119
7113
|
) })
|
|
7120
7114
|
] }) });
|
|
7121
|
-
},
|
|
7122
|
-
const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } =
|
|
7115
|
+
}, Rt = ({ Avatar: u }) => {
|
|
7116
|
+
const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = du(), F = pu(), { colors: d } = iu(), { formSettings: o } = pu(), [c, l] = U(""), j = F.offline_mode, v = kD(j), C = (T) => {
|
|
7123
7117
|
if (!("text" in T.data)) return !1;
|
|
7124
|
-
const _ = T.data.text || "", B = (
|
|
7125
|
-
`).map((
|
|
7126
|
-
I.map((
|
|
7118
|
+
const _ = T.data.text || "", B = (m) => m.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), I = _.split(`
|
|
7119
|
+
`).map((m) => m.trim()), P = new Set(
|
|
7120
|
+
I.map((m) => m.split(":")[0] || "").map((m) => B(m))
|
|
7127
7121
|
), q = o == null ? void 0 : o.filter(
|
|
7128
|
-
(
|
|
7122
|
+
(m) => m.isDisplay && m.isRequired
|
|
7129
7123
|
);
|
|
7130
7124
|
return q == null ? void 0 : q.every(
|
|
7131
|
-
(
|
|
7125
|
+
(m) => P.has(B(m.label)) || P.has(B(m.key))
|
|
7132
7126
|
);
|
|
7133
|
-
},
|
|
7127
|
+
}, y = gu(null), [x, g] = U();
|
|
7134
7128
|
return Z(() => {
|
|
7135
7129
|
const T = (_) => {
|
|
7136
|
-
if (
|
|
7130
|
+
if (y.current) {
|
|
7137
7131
|
const B = Math.round(
|
|
7138
|
-
100 *
|
|
7132
|
+
100 * y.current.scrollTop / (y.current.scrollHeight || 1)
|
|
7139
7133
|
);
|
|
7140
7134
|
(Math.abs(B - _) > 1 || _ === 100) && requestAnimationFrame(() => {
|
|
7141
|
-
|
|
7135
|
+
y.current && y.current.scrollTo({
|
|
7142
7136
|
top: Math.round(
|
|
7143
|
-
_ *
|
|
7137
|
+
_ * y.current.scrollHeight / 100
|
|
7144
7138
|
),
|
|
7145
7139
|
behavior: "instant",
|
|
7146
7140
|
left: 0
|
|
@@ -7161,7 +7155,7 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7161
7155
|
const I = X.getItem("submitedFormLateTime") || B.submitedFormLateTime, P = t.some(
|
|
7162
7156
|
(q) => q.data && "isShowForm" in q.data && q.data.isShowForm
|
|
7163
7157
|
);
|
|
7164
|
-
if (
|
|
7158
|
+
if (v && !I && !P) {
|
|
7165
7159
|
const q = {
|
|
7166
7160
|
mid: `show-text-${Date.now()}`,
|
|
7167
7161
|
author: "system",
|
|
@@ -7178,7 +7172,7 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7178
7172
|
handover: !1,
|
|
7179
7173
|
isOffline: !0,
|
|
7180
7174
|
submitedFormLateTime: null
|
|
7181
|
-
},
|
|
7175
|
+
}, m = {
|
|
7182
7176
|
mid: `show-form-${Date.now()}`,
|
|
7183
7177
|
author: "user",
|
|
7184
7178
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -7195,7 +7189,7 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7195
7189
|
isOffline: !0,
|
|
7196
7190
|
submitedFormLateTime: null
|
|
7197
7191
|
};
|
|
7198
|
-
B.id ? s([...t]) : s([...t, q,
|
|
7192
|
+
B.id ? s([...t]) : s([...t, q, m]);
|
|
7199
7193
|
}
|
|
7200
7194
|
};
|
|
7201
7195
|
T();
|
|
@@ -7205,23 +7199,23 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7205
7199
|
return window.addEventListener("storage", _), () => {
|
|
7206
7200
|
window.removeEventListener("storage", _);
|
|
7207
7201
|
};
|
|
7208
|
-
}, [
|
|
7202
|
+
}, [v]), Z(() => {
|
|
7209
7203
|
r(t[t.length - 1]);
|
|
7210
7204
|
}, []), Z(() => {
|
|
7211
7205
|
const T = t[t.length - 1];
|
|
7212
|
-
(x == null ? void 0 : x.mid) !== (T == null ? void 0 : T.mid) && (
|
|
7206
|
+
(x == null ? void 0 : x.mid) !== (T == null ? void 0 : T.mid) && (g(T), f(100));
|
|
7213
7207
|
}, [t]), /* @__PURE__ */ a.jsxs(
|
|
7214
7208
|
"div",
|
|
7215
7209
|
{
|
|
7216
7210
|
className: "sc-message-list",
|
|
7217
|
-
ref:
|
|
7211
|
+
ref: y,
|
|
7218
7212
|
style: { backgroundColor: d.messageList.bg },
|
|
7219
7213
|
children: [
|
|
7220
7214
|
t.map((T) => /* @__PURE__ */ a.jsxs(af.Fragment, { children: [
|
|
7221
|
-
/* @__PURE__ */ a.jsx(
|
|
7222
|
-
C(T) &&
|
|
7215
|
+
/* @__PURE__ */ a.jsx(Tt, { message: T, Avatar: u }),
|
|
7216
|
+
C(T) && v && /* @__PURE__ */ a.jsx(Ot, { phone: c })
|
|
7223
7217
|
] }, T.mid)),
|
|
7224
|
-
n && /* @__PURE__ */ a.jsx(
|
|
7218
|
+
n && /* @__PURE__ */ a.jsx(Nt, {})
|
|
7225
7219
|
]
|
|
7226
7220
|
}
|
|
7227
7221
|
);
|
|
@@ -7246,12 +7240,12 @@ var nf = { exports: {} };
|
|
|
7246
7240
|
}, t.prototype.replace_emoticons_with_colons = function(n) {
|
|
7247
7241
|
var r = this;
|
|
7248
7242
|
r.init_emoticons();
|
|
7249
|
-
var s = 0, F = [], d = n.replace(r.rx_emoticons, function(l, j,
|
|
7250
|
-
var
|
|
7243
|
+
var s = 0, F = [], d = n.replace(r.rx_emoticons, function(l, j, v, C) {
|
|
7244
|
+
var y = s;
|
|
7251
7245
|
s = C + l.length;
|
|
7252
|
-
var x =
|
|
7253
|
-
if ((x ||
|
|
7254
|
-
var T = n.substring(
|
|
7246
|
+
var x = v.indexOf("(") !== -1, g = v.indexOf(")") !== -1;
|
|
7247
|
+
if ((x || g) && F.indexOf(v) == -1 && F.push(v), g && !x) {
|
|
7248
|
+
var T = n.substring(y, C);
|
|
7255
7249
|
if (T.indexOf("(") !== -1 && T.indexOf(")") === -1) return l;
|
|
7256
7250
|
}
|
|
7257
7251
|
if (l === `
|
|
@@ -7259,14 +7253,14 @@ var nf = { exports: {} };
|
|
|
7259
7253
|
var _ = n.substring(0, C);
|
|
7260
7254
|
if (/\n?(6\)|7\))/.test(_)) return l;
|
|
7261
7255
|
}
|
|
7262
|
-
var B = r.data[r.map.emoticons[
|
|
7256
|
+
var B = r.data[r.map.emoticons[v]][3][0];
|
|
7263
7257
|
return B ? j + ":" + B + ":" : l;
|
|
7264
7258
|
});
|
|
7265
7259
|
if (F.length) {
|
|
7266
7260
|
var o = F.map(r.escape_rx), c = new RegExp("(\\(.+)(" + o.join("|") + ")(.+\\))", "g");
|
|
7267
|
-
d = d.replace(c, function(l, j,
|
|
7268
|
-
var
|
|
7269
|
-
return
|
|
7261
|
+
d = d.replace(c, function(l, j, v, C) {
|
|
7262
|
+
var y = r.data[r.map.emoticons[v]][3][0];
|
|
7263
|
+
return y ? j + ":" + y + ":" + C : l;
|
|
7270
7264
|
});
|
|
7271
7265
|
}
|
|
7272
7266
|
return d;
|
|
@@ -7328,17 +7322,17 @@ var nf = { exports: {} };
|
|
|
7328
7322
|
if (typeof F == "object" && (c = o.replacement(F.idx, F.actual, F.wrapper, void 0, !0), l = F.idx), s = s || "", o.colons_mode) return ":" + o.data[n][3][0] + ":" + c;
|
|
7329
7323
|
var j = r ? s + r + s : o.data[n][8] || s + o.data[n][3][0] + s;
|
|
7330
7324
|
if (o.text_mode) return j + c;
|
|
7331
|
-
var
|
|
7325
|
+
var v = o.find_image(n, l);
|
|
7332
7326
|
if (o.init_env(), o.replace_mode == "softbank" && o.allow_native && o.data[n][1]) return o.format_native(o.data[n][1] + c, !d);
|
|
7333
7327
|
if (o.replace_mode == "google" && o.allow_native && o.data[n][2]) return o.format_native(o.data[n][2] + c, !d);
|
|
7334
|
-
if (
|
|
7335
|
-
var C = o.include_title ? ' title="' + (r || o.data[n][3][0]) + '"' : "",
|
|
7336
|
-
if (o.data[n][7] && (
|
|
7337
|
-
if (o.use_sheet &&
|
|
7338
|
-
var x = 100 *
|
|
7339
|
-
return '<span class="emoji-outer emoji-sizer"><span class="emoji-inner" style="' + _ + '"' + C + ' data-codepoints="' +
|
|
7340
|
-
} else return o.use_css_imgs ? '<span class="emoji emoji-' + n + '"' + C + ' data-codepoints="' +
|
|
7341
|
-
return '<img src="' +
|
|
7328
|
+
if (v.is_var && (c = ""), o.replace_mode == "unified" && o.allow_native) return o.format_native(v.unified + c, !d);
|
|
7329
|
+
var C = o.include_title ? ' title="' + (r || o.data[n][3][0]) + '"' : "", y = o.include_text ? s + (r || o.data[n][3][0]) + s : "";
|
|
7330
|
+
if (o.data[n][7] && (v.path = o.data[n][7], v.px = null, v.py = null, v.is_var = !1), v.is_var && o.include_text && F && F.actual && F.wrapper && (y += F.wrapper + F.actual + F.wrapper), o.replace_mode == "css")
|
|
7331
|
+
if (o.use_sheet && v.px != null && v.py != null) {
|
|
7332
|
+
var x = 100 * v.px / (o.sheet_size - 1), g = 100 * v.py / (o.sheet_size - 1), T = 100 * o.sheet_size, _ = "background: url(" + v.sheet + ");background-position:" + x + "% " + g + "%;background-size:" + T + "% " + T + "%";
|
|
7333
|
+
return '<span class="emoji-outer emoji-sizer"><span class="emoji-inner" style="' + _ + '"' + C + ' data-codepoints="' + v.full_idx + '">' + y + "</span></span>" + c;
|
|
7334
|
+
} else return o.use_css_imgs ? '<span class="emoji emoji-' + n + '"' + C + ' data-codepoints="' + v.full_idx + '">' + y + "</span>" + c : '<span class="emoji emoji-sizer" style="background-image:url(' + v.path + ')"' + C + ' data-codepoints="' + v.full_idx + '">' + y + "</span>" + c;
|
|
7335
|
+
return '<img src="' + v.path + '" class="emoji" data-codepoints="' + v.full_idx + '" ' + C + "/>" + c;
|
|
7342
7336
|
}, t.prototype.format_native = function(n, r) {
|
|
7343
7337
|
var s = this;
|
|
7344
7338
|
return s.wrap_native && r ? '<span class="emoji-native">' + n + "</span>" : n;
|
|
@@ -9816,8 +9810,8 @@ var nf = { exports: {} };
|
|
|
9816
9810
|
return this || (typeof window < "u" ? window : dD);
|
|
9817
9811
|
}());
|
|
9818
9812
|
})(nf, nf.exports);
|
|
9819
|
-
var
|
|
9820
|
-
const
|
|
9813
|
+
var Pt = nf.exports;
|
|
9814
|
+
const It = /* @__PURE__ */ sf(Pt), $t = [
|
|
9821
9815
|
{
|
|
9822
9816
|
name: "People",
|
|
9823
9817
|
emojis: [
|
|
@@ -10472,7 +10466,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10472
10466
|
]
|
|
10473
10467
|
}
|
|
10474
10468
|
], Lt = ({ onBlur: u, onSelect: D }) => {
|
|
10475
|
-
const f =
|
|
10469
|
+
const f = gu(new It()), e = gu(null);
|
|
10476
10470
|
Z(() => {
|
|
10477
10471
|
const n = e.current;
|
|
10478
10472
|
n && (n.style.opacity = "0", window.requestAnimationFrame(() => {
|
|
@@ -10482,7 +10476,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10482
10476
|
const t = (n, r) => {
|
|
10483
10477
|
D(n, r), e.current && e.current.blur();
|
|
10484
10478
|
};
|
|
10485
|
-
return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children:
|
|
10479
|
+
return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children: $t.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "sc-emoji-picker--category", children: [
|
|
10486
10480
|
/* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--category-title", children: n.name }),
|
|
10487
10481
|
n.emojis.map((r) => /* @__PURE__ */ a.jsx(
|
|
10488
10482
|
"span",
|
|
@@ -10494,7 +10488,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10494
10488
|
r
|
|
10495
10489
|
))
|
|
10496
10490
|
] }, n.name)) }) });
|
|
10497
|
-
},
|
|
10491
|
+
}, Mt = ({
|
|
10498
10492
|
x: u = "0",
|
|
10499
10493
|
y: D = "0",
|
|
10500
10494
|
className: f = "sc-user-input--emoji-icon",
|
|
@@ -10517,8 +10511,8 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10517
10511
|
/* @__PURE__ */ a.jsx("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-2.5c2.33 0 4.32-1.45 5.12-3.5h-1.67c-.69 1.19-1.97 2-3.45 2s-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5" })
|
|
10518
10512
|
]
|
|
10519
10513
|
}
|
|
10520
|
-
),
|
|
10521
|
-
const [f, e] = U(!1), t =
|
|
10514
|
+
), qt = ({ inputRef: u, onInput: D }) => {
|
|
10515
|
+
const [f, e] = U(!1), t = gu(null), n = () => {
|
|
10522
10516
|
e(!f);
|
|
10523
10517
|
}, r = (d) => {
|
|
10524
10518
|
(!d.relatedTarget || d.relatedTarget !== t.current) && n();
|
|
@@ -10543,11 +10537,11 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10543
10537
|
id: "sc-emoji-button",
|
|
10544
10538
|
className: "sc-user-input--emoji-icon-wrapper",
|
|
10545
10539
|
ref: t,
|
|
10546
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10540
|
+
children: /* @__PURE__ */ a.jsx(Mt, {})
|
|
10547
10541
|
}
|
|
10548
10542
|
)
|
|
10549
10543
|
] });
|
|
10550
|
-
},
|
|
10544
|
+
}, zt = {
|
|
10551
10545
|
images: ["image/jpeg", "image/png", "image/webp", "image/bmp"],
|
|
10552
10546
|
videos: [
|
|
10553
10547
|
"video/mp4",
|
|
@@ -10613,13 +10607,13 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10613
10607
|
" "
|
|
10614
10608
|
]
|
|
10615
10609
|
}
|
|
10616
|
-
),
|
|
10617
|
-
const { setFile: u } =
|
|
10610
|
+
), Ut = () => {
|
|
10611
|
+
const { setFile: u } = du(), D = (t) => {
|
|
10618
10612
|
t.target.value = "";
|
|
10619
10613
|
}, f = (t) => {
|
|
10620
10614
|
t.target.files && t.target.files[0] && u && u(t.target.files[0]);
|
|
10621
10615
|
}, e = d0(
|
|
10622
|
-
() => Object.values(
|
|
10616
|
+
() => Object.values(zt).flat().join(","),
|
|
10623
10617
|
[]
|
|
10624
10618
|
);
|
|
10625
10619
|
return /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--file-wrapper", children: /* @__PURE__ */ a.jsxs("button", { className: "sc-user-input--file-icon-wrapper", type: "button", children: [
|
|
@@ -10635,7 +10629,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10635
10629
|
}
|
|
10636
10630
|
)
|
|
10637
10631
|
] }) });
|
|
10638
|
-
},
|
|
10632
|
+
}, Vt = ({
|
|
10639
10633
|
x: u = "0",
|
|
10640
10634
|
y: D = "0",
|
|
10641
10635
|
className: f = "sc-user-input--location-icon",
|
|
@@ -10654,8 +10648,8 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10654
10648
|
...n,
|
|
10655
10649
|
children: /* @__PURE__ */ a.jsx("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5" })
|
|
10656
10650
|
}
|
|
10657
|
-
),
|
|
10658
|
-
const { setPayload: u, send: D } =
|
|
10651
|
+
), Ht = () => {
|
|
10652
|
+
const { setPayload: u, send: D } = du(), f = pu(), e = (t) => {
|
|
10659
10653
|
navigator.geolocation ? navigator.geolocation.getCurrentPosition(
|
|
10660
10654
|
(n) => {
|
|
10661
10655
|
u({
|
|
@@ -10688,13 +10682,13 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10688
10682
|
onClick: e,
|
|
10689
10683
|
type: "button",
|
|
10690
10684
|
className: "sc-user-input--location-icon-wrapper",
|
|
10691
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10685
|
+
children: /* @__PURE__ */ a.jsx(Vt, {})
|
|
10692
10686
|
}
|
|
10693
10687
|
) });
|
|
10694
10688
|
};
|
|
10695
10689
|
var rf = /* @__PURE__ */ ((u) => (u.web_url = "web_url", u.postback = "postback", u.nested = "nested", u))(rf || {});
|
|
10696
|
-
const
|
|
10697
|
-
const { colors: f } =
|
|
10690
|
+
const Wt = ({ item: u, onPostback: D }) => {
|
|
10691
|
+
const { colors: f } = iu(), e = () => {
|
|
10698
10692
|
switch (u.type) {
|
|
10699
10693
|
case "web_url":
|
|
10700
10694
|
window.open(u.url, "_blank");
|
|
@@ -10714,12 +10708,12 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10714
10708
|
children: /* @__PURE__ */ a.jsx("span", { className: "sc-menu-item-text", children: u.title })
|
|
10715
10709
|
}
|
|
10716
10710
|
) });
|
|
10717
|
-
},
|
|
10718
|
-
const u = pu(), { send: D, setPayload: f } =
|
|
10711
|
+
}, Yt = () => {
|
|
10712
|
+
const u = pu(), { send: D, setPayload: f } = du(), [e, t] = U({
|
|
10719
10713
|
title: "Menu",
|
|
10720
10714
|
type: rf.nested,
|
|
10721
10715
|
call_to_actions: (u == null ? void 0 : u.menu) || []
|
|
10722
|
-
}), n =
|
|
10716
|
+
}), n = gu(null);
|
|
10723
10717
|
Z(() => {
|
|
10724
10718
|
t({
|
|
10725
10719
|
title: "Menu",
|
|
@@ -10751,7 +10745,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10751
10745
|
ref: n,
|
|
10752
10746
|
className: "sc-menu-elements-carousel sc-menu-always-visible",
|
|
10753
10747
|
children: e.call_to_actions && /* @__PURE__ */ a.jsx(a.Fragment, { children: e.call_to_actions.map((F, d) => /* @__PURE__ */ a.jsx("div", { className: "sc-menu-carousel-card", children: /* @__PURE__ */ a.jsx(
|
|
10754
|
-
|
|
10748
|
+
Wt,
|
|
10755
10749
|
{
|
|
10756
10750
|
item: F,
|
|
10757
10751
|
parent: e,
|
|
@@ -10761,13 +10755,13 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10761
10755
|
) }, d)) })
|
|
10762
10756
|
}
|
|
10763
10757
|
) });
|
|
10764
|
-
},
|
|
10758
|
+
}, Kt = ({
|
|
10765
10759
|
viewBox: u = "0 0 48 48",
|
|
10766
10760
|
...D
|
|
10767
10761
|
}) => /* @__PURE__ */ a.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: [
|
|
10768
10762
|
/* @__PURE__ */ a.jsx("path", { d: "M4.02 42L46 24 4.02 6 4 20l30 4-30 4z" }),
|
|
10769
10763
|
/* @__PURE__ */ a.jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
|
|
10770
|
-
] }),
|
|
10764
|
+
] }), Jt = (u) => {
|
|
10771
10765
|
const { onClick: D, ...f } = u;
|
|
10772
10766
|
return /* @__PURE__ */ a.jsx(
|
|
10773
10767
|
"button",
|
|
@@ -10775,11 +10769,11 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10775
10769
|
onClick: D,
|
|
10776
10770
|
...f,
|
|
10777
10771
|
className: "sc-user-input--button-icon-wrapper",
|
|
10778
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10772
|
+
children: /* @__PURE__ */ a.jsx(Kt, {})
|
|
10779
10773
|
}
|
|
10780
10774
|
);
|
|
10781
|
-
},
|
|
10782
|
-
const { setPayload: u, send: D, suggestions: f } =
|
|
10775
|
+
}, Gt = () => {
|
|
10776
|
+
const { setPayload: u, send: D, suggestions: f } = du(), e = pu(), { colors: t } = iu(), n = (r, s) => {
|
|
10783
10777
|
u(s), D({
|
|
10784
10778
|
event: r,
|
|
10785
10779
|
source: "quick-reply",
|
|
@@ -10806,9 +10800,9 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10806
10800
|
))
|
|
10807
10801
|
}
|
|
10808
10802
|
);
|
|
10809
|
-
},
|
|
10803
|
+
}, Xt = () => {
|
|
10810
10804
|
var J;
|
|
10811
|
-
const { maxUploadSize: u } = Wu(), { t: D } = zu(), { colors: f } =
|
|
10805
|
+
const { maxUploadSize: u } = Wu(), { t: D } = zu(), { colors: f } = iu(), {
|
|
10812
10806
|
suggestions: e,
|
|
10813
10807
|
message: t,
|
|
10814
10808
|
setMessage: n,
|
|
@@ -10819,19 +10813,19 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10819
10813
|
isContactFormActive: o,
|
|
10820
10814
|
isOfflineMode: c,
|
|
10821
10815
|
messages: l
|
|
10822
|
-
} =
|
|
10816
|
+
} = du(), {
|
|
10823
10817
|
menu: j,
|
|
10824
|
-
focusOnOpen:
|
|
10818
|
+
focusOnOpen: v,
|
|
10825
10819
|
autoFlush: C,
|
|
10826
|
-
allowedUploadTypes:
|
|
10820
|
+
allowedUploadTypes: y,
|
|
10827
10821
|
showEmoji: x,
|
|
10828
|
-
showLocation:
|
|
10822
|
+
showLocation: g,
|
|
10829
10823
|
showFile: T,
|
|
10830
10824
|
placeholder: _
|
|
10831
|
-
} = pu(), B =
|
|
10825
|
+
} = pu(), B = gu(null), [I, P] = U(null), [q, m] = U(!1), [O, L] = U(!1), [hu, fu] = U(!1);
|
|
10832
10826
|
Z(() => {
|
|
10833
|
-
|
|
10834
|
-
}, [t,
|
|
10827
|
+
v && p();
|
|
10828
|
+
}, [t, v]), Z(() => {
|
|
10835
10829
|
t === "" && B.current && (B.current.innerHTML = "", B.current.innerText = "");
|
|
10836
10830
|
}, [t]), Z(() => {
|
|
10837
10831
|
P(null);
|
|
@@ -10852,7 +10846,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10852
10846
|
return;
|
|
10853
10847
|
}
|
|
10854
10848
|
if (t) {
|
|
10855
|
-
|
|
10849
|
+
L(!0);
|
|
10856
10850
|
const tu = t;
|
|
10857
10851
|
F({
|
|
10858
10852
|
event: z,
|
|
@@ -10865,9 +10859,9 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10865
10859
|
fu(!0), B.current ? (B.current.innerHTML = "", B.current.innerText = "", B.current.textContent = "", B.current.innerHTML = " ", setTimeout(() => {
|
|
10866
10860
|
B.current && (B.current.innerHTML = ""), fu(!1);
|
|
10867
10861
|
}, 1)) : fu(!1);
|
|
10868
|
-
}, 10)) : console.log("autoFlush is false, keeping message"), setTimeout(() =>
|
|
10862
|
+
}, 10)) : console.log("autoFlush is false, keeping message"), setTimeout(() => L(!1), 1e3);
|
|
10869
10863
|
}
|
|
10870
|
-
r && (P(null),
|
|
10864
|
+
r && (P(null), y.includes(r.type) || !1 ? r.size > u ? P(D("messages.file_message.unsupported_file_size")) : (F({
|
|
10871
10865
|
event: z,
|
|
10872
10866
|
source: Q,
|
|
10873
10867
|
data: {
|
|
@@ -10887,9 +10881,9 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10887
10881
|
(z = B.current) == null || z.focus();
|
|
10888
10882
|
}, R = d === iD.uploading, N = X.getItem("profileLiveChat") || {}, M = X.getItem("isOffline") || (N == null ? void 0 : N.isOffline), V = ((J = N == null ? void 0 : N.channel) == null ? void 0 : J.name) === "console-channel";
|
|
10889
10883
|
return (M || !(N != null && N.id)) && !V ? null : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10890
|
-
j.length > 0 && /* @__PURE__ */ a.jsx(
|
|
10884
|
+
j.length > 0 && /* @__PURE__ */ a.jsx(Yt, {}),
|
|
10891
10885
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-user-input-wrapper", children: [
|
|
10892
|
-
e.length > 0 && /* @__PURE__ */ a.jsx(
|
|
10886
|
+
e.length > 0 && /* @__PURE__ */ a.jsx(Gt, {}),
|
|
10893
10887
|
(r || R) && /* @__PURE__ */ a.jsxs(
|
|
10894
10888
|
"div",
|
|
10895
10889
|
{
|
|
@@ -10928,14 +10922,14 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10928
10922
|
{
|
|
10929
10923
|
role: "textbox",
|
|
10930
10924
|
tabIndex: 0,
|
|
10931
|
-
onFocus: () =>
|
|
10932
|
-
onBlur: () =>
|
|
10925
|
+
onFocus: () => m(!0),
|
|
10926
|
+
onBlur: () => m(!1),
|
|
10933
10927
|
onKeyDown: A,
|
|
10934
10928
|
onInput: E,
|
|
10935
10929
|
onPaste: async (z) => {
|
|
10936
|
-
var
|
|
10930
|
+
var Cu;
|
|
10937
10931
|
z.preventDefault();
|
|
10938
|
-
const Q = await navigator.clipboard.readText(), tu = (
|
|
10932
|
+
const Q = await navigator.clipboard.readText(), tu = (Cu = window.getSelection()) == null ? void 0 : Cu.getRangeAt(0);
|
|
10939
10933
|
if (tu && Q) {
|
|
10940
10934
|
const _u = document.createTextNode(Q);
|
|
10941
10935
|
tu.deleteContents(), tu.insertNode(_u), tu.collapse(!1);
|
|
@@ -10953,11 +10947,11 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10953
10947
|
}
|
|
10954
10948
|
),
|
|
10955
10949
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-user-input--buttons", children: [
|
|
10956
|
-
x && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10957
|
-
|
|
10958
|
-
T && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10950
|
+
x && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(qt, { inputRef: B, onInput: E }) }),
|
|
10951
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Ht, {}) }),
|
|
10952
|
+
T && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Ut, {}) }),
|
|
10959
10953
|
/* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10960
|
-
|
|
10954
|
+
Jt,
|
|
10961
10955
|
{
|
|
10962
10956
|
disabled: !t,
|
|
10963
10957
|
onClick: (z) => h(z)
|
|
@@ -10969,7 +10963,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10969
10963
|
)
|
|
10970
10964
|
] })
|
|
10971
10965
|
] });
|
|
10972
|
-
},
|
|
10966
|
+
}, Zt = ({
|
|
10973
10967
|
width: u = "24",
|
|
10974
10968
|
height: D = "24",
|
|
10975
10969
|
fill: f = "none",
|
|
@@ -10994,8 +10988,8 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10994
10988
|
...F,
|
|
10995
10989
|
children: /* @__PURE__ */ a.jsx("path", { stroke: "#fff", strokeOpacity: "1", d: "M15 18L9 12 15 6" })
|
|
10996
10990
|
}
|
|
10997
|
-
),
|
|
10998
|
-
const { t: u } = zu(), { colors: D } =
|
|
10991
|
+
), Qt = () => {
|
|
10992
|
+
const { t: u } = zu(), { colors: D } = iu(), { setWebviewUrl: f, webviewUrl: e } = du(), [t, n] = U(!1);
|
|
10999
10993
|
Z(() => {
|
|
11000
10994
|
n(!0);
|
|
11001
10995
|
}, []);
|
|
@@ -11010,27 +11004,27 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11010
11004
|
className: "sc-webview--footer",
|
|
11011
11005
|
style: { background: D.header.bg, color: D.header.text },
|
|
11012
11006
|
children: /* @__PURE__ */ a.jsxs("h3", { className: "sc-webview--button", onClick: r, children: [
|
|
11013
|
-
/* @__PURE__ */ a.jsx(
|
|
11007
|
+
/* @__PURE__ */ a.jsx(Zt, { width: "16px", height: "16px" }),
|
|
11014
11008
|
u("settings.back")
|
|
11015
11009
|
] })
|
|
11016
11010
|
}
|
|
11017
11011
|
)
|
|
11018
11012
|
] });
|
|
11019
|
-
},
|
|
11013
|
+
}, u8 = ({
|
|
11020
11014
|
CustomHeader: u,
|
|
11021
11015
|
CustomAvatar: D,
|
|
11022
11016
|
PreChat: f,
|
|
11023
11017
|
PostChat: e
|
|
11024
11018
|
}) => {
|
|
11025
|
-
const { connectionState: t } =
|
|
11019
|
+
const { connectionState: t } = du(), { screen: n, isOpen: r } = Nu();
|
|
11026
11020
|
return /* @__PURE__ */ a.jsxs("div", { className: `sc-chat-window ${r ? "opened" : "closed"}`, children: [
|
|
11027
11021
|
/* @__PURE__ */ a.jsx(Le, { children: u && /* @__PURE__ */ a.jsx(u, {}) }),
|
|
11028
11022
|
n === "prechat" && f && /* @__PURE__ */ a.jsx(f, {}),
|
|
11029
|
-
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(
|
|
11030
|
-
n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(
|
|
11023
|
+
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Rt, { Avatar: D }),
|
|
11024
|
+
n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(ze, {}),
|
|
11031
11025
|
n === "postchat" && e && /* @__PURE__ */ a.jsx(e, {}),
|
|
11032
|
-
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(
|
|
11033
|
-
n === "webview" && /* @__PURE__ */ a.jsx(
|
|
11026
|
+
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Xt, {}),
|
|
11027
|
+
n === "webview" && /* @__PURE__ */ a.jsx(Qt, {})
|
|
11034
11028
|
] });
|
|
11035
11029
|
}, H1 = ({
|
|
11036
11030
|
CustomLauncher: u,
|
|
@@ -11039,50 +11033,54 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11039
11033
|
PreChat: e,
|
|
11040
11034
|
PostChat: t
|
|
11041
11035
|
}) => {
|
|
11042
|
-
zu()
|
|
11043
|
-
|
|
11044
|
-
|
|
11036
|
+
const { t: n } = zu(), r = Wu(), s = du(), F = Nu(), { setScreen: d } = Nu(), o = pu(), c = o.offline_mode, l = kD(c), j = (y) => {
|
|
11037
|
+
y.preventDefault(), F.setIsOpen(!F.isOpen);
|
|
11038
|
+
}, v = (y) => {
|
|
11039
|
+
y.preventDefault(), y.stopPropagation(), F.setIsOpen(!0);
|
|
11045
11040
|
};
|
|
11046
|
-
return
|
|
11041
|
+
return ke(), new URLSearchParams().append("owner_id", r.ownerId), Z(() => {
|
|
11047
11042
|
if (!l && !X.getItem("profileLiveChat")) {
|
|
11048
11043
|
d("prechat");
|
|
11049
11044
|
return;
|
|
11050
11045
|
}
|
|
11051
11046
|
try {
|
|
11052
|
-
|
|
11053
|
-
} catch (
|
|
11054
|
-
console.error("Offline init failed",
|
|
11047
|
+
s.setConnectionState(2), l && (d("chat"), s.setConnectionState(3));
|
|
11048
|
+
} catch (y) {
|
|
11049
|
+
console.error("Offline init failed", y), d("prechat");
|
|
11055
11050
|
}
|
|
11056
11051
|
}, []), /* @__PURE__ */ a.jsxs("div", { children: [
|
|
11057
|
-
/* @__PURE__ */ a.
|
|
11052
|
+
/* @__PURE__ */ a.jsxs(
|
|
11058
11053
|
"div",
|
|
11059
11054
|
{
|
|
11060
|
-
className: `sc-launcher-wrapper ${
|
|
11055
|
+
className: `sc-launcher-wrapper ${F.isOpen ? "opened" : ""}`,
|
|
11061
11056
|
onClick: j,
|
|
11062
|
-
children:
|
|
11063
|
-
"div",
|
|
11064
|
-
{
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11057
|
+
children: [
|
|
11058
|
+
/* @__PURE__ */ a.jsx("div", { className: "sc-help-prompt", onClick: v, role: "button", children: !F.isOpen && /* @__PURE__ */ a.jsx("div", { className: "sc-help-prompt__text", children: n("launcher.help_prompt") }) }),
|
|
11059
|
+
u ? /* @__PURE__ */ a.jsx(u, { widget: F }) : /* @__PURE__ */ a.jsxs(
|
|
11060
|
+
"div",
|
|
11061
|
+
{
|
|
11062
|
+
className: "sc-launcher",
|
|
11063
|
+
style: {
|
|
11064
|
+
backgroundColor: o.color
|
|
11065
|
+
},
|
|
11066
|
+
children: [
|
|
11067
|
+
s.newMessagesCount > 0 && !F.isOpen && /* @__PURE__ */ a.jsx("div", { className: "sc-new-messages-count", children: s.newMessagesCount }),
|
|
11068
|
+
F.isOpen ? /* @__PURE__ */ a.jsx(
|
|
11069
|
+
Ef,
|
|
11070
|
+
{
|
|
11071
|
+
className: "sc-closed-icon",
|
|
11072
|
+
width: "32px",
|
|
11073
|
+
height: "32px"
|
|
11074
|
+
}
|
|
11075
|
+
) : /* @__PURE__ */ a.jsx(A1, { className: "sc-open-icon" })
|
|
11076
|
+
]
|
|
11077
|
+
}
|
|
11078
|
+
)
|
|
11079
|
+
]
|
|
11082
11080
|
}
|
|
11083
11081
|
),
|
|
11084
|
-
|
|
11085
|
-
|
|
11082
|
+
F.isOpen && /* @__PURE__ */ a.jsx(
|
|
11083
|
+
u8,
|
|
11086
11084
|
{
|
|
11087
11085
|
CustomHeader: D,
|
|
11088
11086
|
CustomAvatar: f,
|
|
@@ -11094,23 +11092,18 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11094
11092
|
}, W1 = ({
|
|
11095
11093
|
onFormDataSubmit: u
|
|
11096
11094
|
}) => {
|
|
11097
|
-
const D = Wu(), { t: f } = zu(), { colors: e } =
|
|
11095
|
+
const D = Wu(), { t: f } = zu(), { colors: e } = iu(), { socket: t } = tD(), n = pu(), { setScreen: r } = Nu(), {
|
|
11098
11096
|
send: s,
|
|
11099
11097
|
setMessages: F,
|
|
11100
11098
|
setConnectionState: d,
|
|
11101
11099
|
participants: o,
|
|
11102
11100
|
setParticipants: c
|
|
11103
|
-
} =
|
|
11101
|
+
} = du(), { formData: l, setFormData: j, renderFormField: v, errors: C, validateAll: y } = U1({
|
|
11104
11102
|
loadFromDataUserSubs: !1,
|
|
11105
11103
|
initialData: {}
|
|
11106
|
-
}), x = n.offline_mode,
|
|
11107
|
-
console.log(
|
|
11108
|
-
"🚀 ~ UserSubscription.tsx:72 ~ UserSubscription ~ isOffline:",
|
|
11109
|
-
m
|
|
11110
|
-
);
|
|
11111
|
-
const T = mu(!1), _ = Mu(
|
|
11104
|
+
}), x = n.offline_mode, g = kD(x), T = gu(!1), _ = Mu(
|
|
11112
11105
|
async (B) => {
|
|
11113
|
-
if (B == null || B.preventDefault(), B == null || B.stopPropagation(), !(!X.getItem("profileLiveChat") && !
|
|
11106
|
+
if (B == null || B.preventDefault(), B == null || B.stopPropagation(), !(!X.getItem("profileLiveChat") && !y(n.formSettings))) {
|
|
11114
11107
|
Object.keys(l).length > 0 && X.setItem("dataUserSubs", l);
|
|
11115
11108
|
try {
|
|
11116
11109
|
d(2);
|
|
@@ -11118,14 +11111,14 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11118
11111
|
Object.entries(l).forEach(([fu, k]) => {
|
|
11119
11112
|
typeof k == "string" && k.trim() && P.append(fu, k);
|
|
11120
11113
|
}), P.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString()), P.append("owner_id", D.ownerId);
|
|
11121
|
-
const { body: q } = await t.get(`/webhook/${D.channel}/?${P.toString()}`), { messages:
|
|
11122
|
-
|
|
11114
|
+
const { body: q } = await t.get(`/webhook/${D.channel}/?${P.toString()}`), { messages: m, profile: O } = q;
|
|
11115
|
+
X.setItem("profileLiveChat", O), X.setItem("isOffline", g || !1), X.setItem(
|
|
11123
11116
|
"submitedFormLateTime",
|
|
11124
11117
|
(O == null ? void 0 : O.submitedFormLateTime) || null
|
|
11125
|
-
),
|
|
11118
|
+
), m.forEach((fu) => {
|
|
11126
11119
|
const k = fu.author === O.foreignId || fu.author === O.id ? uu.sent : uu.received;
|
|
11127
11120
|
fu.direction = k, fu.direction === uu.sent && (fu.read = !0, fu.delivery = !1);
|
|
11128
|
-
}), F(
|
|
11121
|
+
}), F(m), c([
|
|
11129
11122
|
o[0],
|
|
11130
11123
|
{
|
|
11131
11124
|
id: O.foreignId,
|
|
@@ -11133,14 +11126,14 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11133
11126
|
name: `${O.firstName} ${O.firstName}`
|
|
11134
11127
|
}
|
|
11135
11128
|
]), d(3), r("chat");
|
|
11136
|
-
const
|
|
11129
|
+
const L = Object.entries(l).map(
|
|
11137
11130
|
([fu, k]) => `${fu.charAt(0).toUpperCase() + fu.slice(1)}: ${k}`
|
|
11138
11131
|
).join(`
|
|
11139
11132
|
`);
|
|
11140
|
-
if (
|
|
11133
|
+
if (!L || L.trim().length === 0)
|
|
11141
11134
|
return;
|
|
11142
11135
|
const hu = {
|
|
11143
|
-
text:
|
|
11136
|
+
text: L,
|
|
11144
11137
|
contactInfo: {
|
|
11145
11138
|
...l,
|
|
11146
11139
|
owner_id: D.ownerId
|
|
@@ -11179,15 +11172,15 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11179
11172
|
const B = X.getItem("profileLiveChat");
|
|
11180
11173
|
if (B) {
|
|
11181
11174
|
const I = B, P = {};
|
|
11182
|
-
Object.entries(I).forEach(([q,
|
|
11183
|
-
|
|
11175
|
+
Object.entries(I).forEach(([q, m]) => {
|
|
11176
|
+
m && (P[q] = m);
|
|
11184
11177
|
}), j(P), _();
|
|
11185
11178
|
}
|
|
11186
11179
|
}
|
|
11187
|
-
}, [_, r,
|
|
11180
|
+
}, [_, r, g]), /* @__PURE__ */ a.jsx("div", { className: "user-subscription-wrapper", children: /* @__PURE__ */ a.jsxs("form", { className: "user-subscription", onSubmit: _, noValidate: !0, children: [
|
|
11188
11181
|
/* @__PURE__ */ a.jsx("div", { className: "user-subscription-title", children: n == null ? void 0 : n.greetingMessage }),
|
|
11189
11182
|
/* @__PURE__ */ a.jsxs("div", { className: "user-subscription-form", children: [
|
|
11190
|
-
/* @__PURE__ */ a.jsx("div", { className: "user-subscription-inputs", children: n.formSettings.sort((B, I) => B.order - I.order).map(
|
|
11183
|
+
/* @__PURE__ */ a.jsx("div", { className: "user-subscription-inputs", children: n.formSettings.sort((B, I) => B.order - I.order).map(v) }),
|
|
11191
11184
|
/* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-authorization", children: /* @__PURE__ */ a.jsx(
|
|
11192
11185
|
"a",
|
|
11193
11186
|
{
|
|
@@ -11213,7 +11206,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11213
11206
|
) })
|
|
11214
11207
|
] })
|
|
11215
11208
|
] }) });
|
|
11216
|
-
},
|
|
11209
|
+
}, D8 = qu({}), f8 = ({
|
|
11217
11210
|
children: u
|
|
11218
11211
|
}) => {
|
|
11219
11212
|
const D = Wu(), [f, e] = U(!1), t = async () => {
|
|
@@ -11227,20 +11220,20 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11227
11220
|
};
|
|
11228
11221
|
return Z(() => {
|
|
11229
11222
|
f || t();
|
|
11230
|
-
}, []), f ? /* @__PURE__ */ a.jsx(
|
|
11223
|
+
}, []), f ? /* @__PURE__ */ a.jsx(D8.Provider, { value: {}, children: u }) : null;
|
|
11231
11224
|
};
|
|
11232
|
-
function
|
|
11233
|
-
return /* @__PURE__ */ a.jsx(D1, { ...u, children: /* @__PURE__ */ a.jsx(e1, { children: /* @__PURE__ */ a.jsx(
|
|
11225
|
+
function r8(u) {
|
|
11226
|
+
return /* @__PURE__ */ a.jsx(D1, { ...u, children: /* @__PURE__ */ a.jsx(e1, { children: /* @__PURE__ */ a.jsx(f8, { children: /* @__PURE__ */ a.jsx(b1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(g1, { children: /* @__PURE__ */ a.jsx(Xf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(y1, { children: /* @__PURE__ */ a.jsx(H1, { PreChat: W1 }) }) }) }) }) }) }) }) }) });
|
|
11234
11227
|
}
|
|
11235
|
-
function
|
|
11228
|
+
function a8({
|
|
11236
11229
|
CustomHeader: u,
|
|
11237
11230
|
CustomAvatar: D,
|
|
11238
11231
|
config: f
|
|
11239
11232
|
}) {
|
|
11240
|
-
return /* @__PURE__ */ a.jsx(D1, { ...f, children: /* @__PURE__ */ a.jsx(e1, { children: /* @__PURE__ */ a.jsx(b1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(Xf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(
|
|
11233
|
+
return /* @__PURE__ */ a.jsx(D1, { ...f, children: /* @__PURE__ */ a.jsx(e1, { children: /* @__PURE__ */ a.jsx(b1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(Xf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(g1, { defaultScreen: "chat", children: /* @__PURE__ */ a.jsx(
|
|
11241
11234
|
y1,
|
|
11242
11235
|
{
|
|
11243
|
-
defaultConnectionState:
|
|
11236
|
+
defaultConnectionState: eD.connected,
|
|
11244
11237
|
children: /* @__PURE__ */ a.jsx(
|
|
11245
11238
|
H1,
|
|
11246
11239
|
{
|
|
@@ -11253,7 +11246,7 @@ function r8({
|
|
|
11253
11246
|
) }) }) }) }) }) }) });
|
|
11254
11247
|
}
|
|
11255
11248
|
export {
|
|
11256
|
-
|
|
11249
|
+
r8 as ChatWidget,
|
|
11257
11250
|
X as LocalStorageScoped,
|
|
11258
|
-
|
|
11251
|
+
a8 as UiChatWidget
|
|
11259
11252
|
};
|