vue-wiguet-chatweb 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/style.css +1 -1
- package/dist/vue-wiguet-chatweb.js +515 -517
- package/dist/vue-wiguet-chatweb.umd.cjs +5 -5
- package/package.json +1 -1
- package/src/components/Widget.vue +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
import { openBlock as L, createElementBlock as $, createElementVNode as g, getCurrentScope as
|
1
|
+
import { openBlock as L, createElementBlock as $, createElementVNode as g, getCurrentScope as Li, onScopeDispose as Fi, unref as js, computed as Ys, ref as z, watch as Tn, getCurrentInstance as Vi, onMounted as Js, defineComponent as En, onBeforeMount as Bi, Fragment as Hn, renderList as $i, normalizeClass as Me, createVNode as he, createCommentVNode as Ge, toDisplayString as Nt, pushScopeId as Ui, popScopeId as Pi, nextTick as zn, onUnmounted as Wi, withModifiers as Zn, withDirectives as Gs, withKeys as jn, vModelText as qi, createStaticVNode as Hi, createBlock as zi, vShow as Zi } from "vue";
|
2
2
|
let at;
|
3
3
|
const ji = new Uint8Array(16);
|
4
4
|
function Yi() {
|
@@ -12,12 +12,12 @@ for (let t = 0; t < 256; ++t)
|
|
12
12
|
function Ji(t, e = 0) {
|
13
13
|
return P[t[e + 0]] + P[t[e + 1]] + P[t[e + 2]] + P[t[e + 3]] + "-" + P[t[e + 4]] + P[t[e + 5]] + "-" + P[t[e + 6]] + P[t[e + 7]] + "-" + P[t[e + 8]] + P[t[e + 9]] + "-" + P[t[e + 10]] + P[t[e + 11]] + P[t[e + 12]] + P[t[e + 13]] + P[t[e + 14]] + P[t[e + 15]];
|
14
14
|
}
|
15
|
-
const Gi = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
15
|
+
const Gi = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Yn = {
|
16
16
|
randomUUID: Gi
|
17
17
|
};
|
18
18
|
function Ki(t, e, n) {
|
19
|
-
if (
|
20
|
-
return
|
19
|
+
if (Yn.randomUUID && !e && !t)
|
20
|
+
return Yn.randomUUID();
|
21
21
|
t = t || {};
|
22
22
|
const s = t.random || (t.rng || Yi)();
|
23
23
|
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Ji(s);
|
@@ -60,27 +60,27 @@ function uo(t, e) {
|
|
60
60
|
return L(), $("svg", oo, co);
|
61
61
|
}
|
62
62
|
const lo = /* @__PURE__ */ oe(io, [["render", uo]]);
|
63
|
-
function
|
63
|
+
function Ks(t, e) {
|
64
64
|
return function() {
|
65
65
|
return t.apply(e, arguments);
|
66
66
|
};
|
67
67
|
}
|
68
|
-
const { toString: fo } = Object.prototype, { getPrototypeOf:
|
68
|
+
const { toString: fo } = Object.prototype, { getPrototypeOf: On } = Object, It = /* @__PURE__ */ ((t) => (e) => {
|
69
69
|
const n = fo.call(e);
|
70
70
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
71
71
|
})(/* @__PURE__ */ Object.create(null)), fe = (t) => (t = t.toLowerCase(), (e) => It(e) === t), Dt = (t) => (e) => typeof e === t, { isArray: Fe } = Array, Xe = Dt("undefined");
|
72
72
|
function ho(t) {
|
73
73
|
return t !== null && !Xe(t) && t.constructor !== null && !Xe(t.constructor) && Q(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
74
74
|
}
|
75
|
-
const
|
75
|
+
const Xs = fe("ArrayBuffer");
|
76
76
|
function mo(t) {
|
77
77
|
let e;
|
78
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
78
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Xs(t.buffer), e;
|
79
79
|
}
|
80
|
-
const po = Dt("string"), Q = Dt("function"),
|
80
|
+
const po = Dt("string"), Q = Dt("function"), Qs = Dt("number"), Lt = (t) => t !== null && typeof t == "object", yo = (t) => t === !0 || t === !1, wt = (t) => {
|
81
81
|
if (It(t) !== "object")
|
82
82
|
return !1;
|
83
|
-
const e =
|
83
|
+
const e = On(t);
|
84
84
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
85
85
|
}, go = fe("Date"), wo = fe("File"), So = fe("Blob"), vo = fe("FileList"), ko = (t) => Lt(t) && Q(t.pipe), bo = (t) => {
|
86
86
|
let e;
|
@@ -101,7 +101,7 @@ function et(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
101
101
|
a = i[s], e.call(null, t[a], a, t);
|
102
102
|
}
|
103
103
|
}
|
104
|
-
function
|
104
|
+
function er(t, e) {
|
105
105
|
e = e.toLowerCase();
|
106
106
|
const n = Object.keys(t);
|
107
107
|
let s = n.length, r;
|
@@ -110,18 +110,18 @@ function tr(t, e) {
|
|
110
110
|
return r;
|
111
111
|
return null;
|
112
112
|
}
|
113
|
-
const
|
114
|
-
function
|
115
|
-
const { caseless: t } =
|
116
|
-
const i = t &&
|
117
|
-
wt(e[i]) && wt(s) ? e[i] =
|
113
|
+
const tr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, nr = (t) => !Xe(t) && t !== tr;
|
114
|
+
function an() {
|
115
|
+
const { caseless: t } = nr(this) && this || {}, e = {}, n = (s, r) => {
|
116
|
+
const i = t && er(e, r) || r;
|
117
|
+
wt(e[i]) && wt(s) ? e[i] = an(e[i], s) : wt(s) ? e[i] = an({}, s) : Fe(s) ? e[i] = s.slice() : e[i] = s;
|
118
118
|
};
|
119
119
|
for (let s = 0, r = arguments.length; s < r; s++)
|
120
120
|
arguments[s] && et(arguments[s], n);
|
121
121
|
return e;
|
122
122
|
}
|
123
123
|
const Oo = (t, e, n, { allOwnKeys: s } = {}) => (et(e, (r, i) => {
|
124
|
-
n && Q(r) ? t[i] =
|
124
|
+
n && Q(r) ? t[i] = Ks(r, n) : t[i] = r;
|
125
125
|
}, { allOwnKeys: s }), t), Co = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), xo = (t, e, n, s) => {
|
126
126
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
127
127
|
value: e.prototype
|
@@ -133,7 +133,7 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (et(e, (r, i) => {
|
|
133
133
|
do {
|
134
134
|
for (r = Object.getOwnPropertyNames(t), i = r.length; i-- > 0; )
|
135
135
|
o = r[i], (!s || s(o, t, e)) && !a[o] && (e[o] = t[o], a[o] = !0);
|
136
|
-
t = n !== !1 &&
|
136
|
+
t = n !== !1 && On(t);
|
137
137
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
138
138
|
return e;
|
139
139
|
}, _o = (t, e, n) => {
|
@@ -144,12 +144,12 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (et(e, (r, i) => {
|
|
144
144
|
if (!t) return null;
|
145
145
|
if (Fe(t)) return t;
|
146
146
|
let e = t.length;
|
147
|
-
if (!
|
147
|
+
if (!Qs(e)) return null;
|
148
148
|
const n = new Array(e);
|
149
149
|
for (; e-- > 0; )
|
150
150
|
n[e] = t[e];
|
151
151
|
return n;
|
152
|
-
}, Mo = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" &&
|
152
|
+
}, Mo = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && On(Uint8Array)), Ro = (t, e) => {
|
153
153
|
const s = (t && t[Symbol.iterator]).call(t);
|
154
154
|
let r;
|
155
155
|
for (; (r = s.next()) && !r.done; ) {
|
@@ -167,13 +167,13 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (et(e, (r, i) => {
|
|
167
167
|
function(n, s, r) {
|
168
168
|
return s.toUpperCase() + r;
|
169
169
|
}
|
170
|
-
),
|
170
|
+
), Jn = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Fo = fe("RegExp"), sr = (t, e) => {
|
171
171
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
172
172
|
et(n, (r, i) => {
|
173
173
|
e(r, i, t) !== !1 && (s[i] = r);
|
174
174
|
}), Object.defineProperties(t, s);
|
175
175
|
}, Vo = (t) => {
|
176
|
-
|
176
|
+
sr(t, (e, n) => {
|
177
177
|
if (Q(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
178
178
|
return !1;
|
179
179
|
const s = t[n];
|
@@ -195,11 +195,11 @@ const Oo = (t, e, n, { allOwnKeys: s } = {}) => (et(e, (r, i) => {
|
|
195
195
|
};
|
196
196
|
return Fe(t) ? s(t) : s(String(t).split(e)), n;
|
197
197
|
}, $o = () => {
|
198
|
-
}, Uo = (t, e) => (t = +t, Number.isFinite(t) ? t : e), Ht = "abcdefghijklmnopqrstuvwxyz",
|
199
|
-
DIGIT:
|
198
|
+
}, Uo = (t, e) => (t = +t, Number.isFinite(t) ? t : e), Ht = "abcdefghijklmnopqrstuvwxyz", Gn = "0123456789", rr = {
|
199
|
+
DIGIT: Gn,
|
200
200
|
ALPHA: Ht,
|
201
|
-
ALPHA_DIGIT: Ht + Ht.toUpperCase() +
|
202
|
-
}, Po = (t = 16, e =
|
201
|
+
ALPHA_DIGIT: Ht + Ht.toUpperCase() + Gn
|
202
|
+
}, Po = (t = 16, e = rr.ALPHA_DIGIT) => {
|
203
203
|
let n = "";
|
204
204
|
const { length: s } = e;
|
205
205
|
for (; t--; )
|
@@ -228,12 +228,12 @@ const qo = (t) => {
|
|
228
228
|
return n(t, 0);
|
229
229
|
}, Ho = fe("AsyncFunction"), zo = (t) => t && (Lt(t) || Q(t)) && Q(t.then) && Q(t.catch), f = {
|
230
230
|
isArray: Fe,
|
231
|
-
isArrayBuffer:
|
231
|
+
isArrayBuffer: Xs,
|
232
232
|
isBuffer: ho,
|
233
233
|
isFormData: bo,
|
234
234
|
isArrayBufferView: mo,
|
235
235
|
isString: po,
|
236
|
-
isNumber:
|
236
|
+
isNumber: Qs,
|
237
237
|
isBoolean: yo,
|
238
238
|
isObject: Lt,
|
239
239
|
isPlainObject: wt,
|
@@ -248,7 +248,7 @@ const qo = (t) => {
|
|
248
248
|
isTypedArray: Mo,
|
249
249
|
isFileList: vo,
|
250
250
|
forEach: et,
|
251
|
-
merge:
|
251
|
+
merge: an,
|
252
252
|
extend: Oo,
|
253
253
|
trim: Eo,
|
254
254
|
stripBOM: Co,
|
@@ -261,19 +261,19 @@ const qo = (t) => {
|
|
261
261
|
forEachEntry: Ro,
|
262
262
|
matchAll: Io,
|
263
263
|
isHTMLForm: Do,
|
264
|
-
hasOwnProperty:
|
265
|
-
hasOwnProp:
|
264
|
+
hasOwnProperty: Jn,
|
265
|
+
hasOwnProp: Jn,
|
266
266
|
// an alias to avoid ESLint no-prototype-builtins detection
|
267
|
-
reduceDescriptors:
|
267
|
+
reduceDescriptors: sr,
|
268
268
|
freezeMethods: Vo,
|
269
269
|
toObjectSet: Bo,
|
270
270
|
toCamelCase: Lo,
|
271
271
|
noop: $o,
|
272
272
|
toFiniteNumber: Uo,
|
273
|
-
findKey:
|
274
|
-
global:
|
275
|
-
isContextDefined:
|
276
|
-
ALPHABET:
|
273
|
+
findKey: er,
|
274
|
+
global: tr,
|
275
|
+
isContextDefined: nr,
|
276
|
+
ALPHABET: rr,
|
277
277
|
generateString: Po,
|
278
278
|
isSpecCompliantForm: Wo,
|
279
279
|
toJSONObject: qo,
|
@@ -304,7 +304,7 @@ f.inherits(C, Error, {
|
|
304
304
|
};
|
305
305
|
}
|
306
306
|
});
|
307
|
-
const
|
307
|
+
const ir = C.prototype, or = {};
|
308
308
|
[
|
309
309
|
"ERR_BAD_OPTION_VALUE",
|
310
310
|
"ERR_BAD_OPTION",
|
@@ -320,30 +320,30 @@ const or = C.prototype, ar = {};
|
|
320
320
|
"ERR_INVALID_URL"
|
321
321
|
// eslint-disable-next-line func-names
|
322
322
|
].forEach((t) => {
|
323
|
-
|
323
|
+
or[t] = { value: t };
|
324
324
|
});
|
325
|
-
Object.defineProperties(C,
|
326
|
-
Object.defineProperty(
|
325
|
+
Object.defineProperties(C, or);
|
326
|
+
Object.defineProperty(ir, "isAxiosError", { value: !0 });
|
327
327
|
C.from = (t, e, n, s, r, i) => {
|
328
|
-
const o = Object.create(
|
328
|
+
const o = Object.create(ir);
|
329
329
|
return f.toFlatObject(t, o, function(u) {
|
330
330
|
return u !== Error.prototype;
|
331
331
|
}, (a) => a !== "isAxiosError"), C.call(o, t.message, e, n, s, r), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
332
332
|
};
|
333
333
|
const Zo = null;
|
334
|
-
function
|
334
|
+
function cn(t) {
|
335
335
|
return f.isPlainObject(t) || f.isArray(t);
|
336
336
|
}
|
337
|
-
function
|
337
|
+
function ar(t) {
|
338
338
|
return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
339
339
|
}
|
340
|
-
function
|
340
|
+
function Kn(t, e, n) {
|
341
341
|
return t ? t.concat(e).map(function(r, i) {
|
342
|
-
return r =
|
342
|
+
return r = ar(r), !n && i ? "[" + r + "]" : r;
|
343
343
|
}).join(n ? "." : "") : e;
|
344
344
|
}
|
345
345
|
function jo(t) {
|
346
|
-
return f.isArray(t) && !t.some(
|
346
|
+
return f.isArray(t) && !t.some(cn);
|
347
347
|
}
|
348
348
|
const Yo = f.toFlatObject(f, {}, null, function(e) {
|
349
349
|
return /^is[A-Z]/.test(e);
|
@@ -375,20 +375,20 @@ function Ft(t, e, n) {
|
|
375
375
|
if (f.endsWith(w, "{}"))
|
376
376
|
w = s ? w : w.slice(0, -2), d = JSON.stringify(d);
|
377
377
|
else if (f.isArray(d) && jo(d) || (f.isFileList(d) || f.endsWith(w, "[]")) && (_ = f.toArray(d)))
|
378
|
-
return w =
|
378
|
+
return w = ar(w), _.forEach(function(W, qe) {
|
379
379
|
!(f.isUndefined(W) || W === null) && e.append(
|
380
380
|
// eslint-disable-next-line no-nested-ternary
|
381
|
-
o === !0 ?
|
381
|
+
o === !0 ? Kn([w], qe, i) : o === null ? w : w + "[]",
|
382
382
|
c(W)
|
383
383
|
);
|
384
384
|
}), !1;
|
385
385
|
}
|
386
|
-
return
|
386
|
+
return cn(d) ? !0 : (e.append(Kn(T, w, i), c(d)), !1);
|
387
387
|
}
|
388
388
|
const h = [], y = Object.assign(Yo, {
|
389
389
|
defaultVisitor: l,
|
390
390
|
convertValue: c,
|
391
|
-
isVisitable:
|
391
|
+
isVisitable: cn
|
392
392
|
});
|
393
393
|
function m(d, w) {
|
394
394
|
if (!f.isUndefined(d)) {
|
@@ -409,7 +409,7 @@ function Ft(t, e, n) {
|
|
409
409
|
throw new TypeError("data must be an object");
|
410
410
|
return m(t), e;
|
411
411
|
}
|
412
|
-
function
|
412
|
+
function Xn(t) {
|
413
413
|
const e = {
|
414
414
|
"!": "%21",
|
415
415
|
"'": "%27",
|
@@ -423,17 +423,17 @@ function es(t) {
|
|
423
423
|
return e[s];
|
424
424
|
});
|
425
425
|
}
|
426
|
-
function
|
426
|
+
function Cn(t, e) {
|
427
427
|
this._pairs = [], t && Ft(t, this, e);
|
428
428
|
}
|
429
|
-
const
|
430
|
-
|
429
|
+
const cr = Cn.prototype;
|
430
|
+
cr.append = function(e, n) {
|
431
431
|
this._pairs.push([e, n]);
|
432
432
|
};
|
433
|
-
|
433
|
+
cr.toString = function(e) {
|
434
434
|
const n = e ? function(s) {
|
435
|
-
return e.call(this, s,
|
436
|
-
} :
|
435
|
+
return e.call(this, s, Xn);
|
436
|
+
} : Xn;
|
437
437
|
return this._pairs.map(function(r) {
|
438
438
|
return n(r[0]) + "=" + n(r[1]);
|
439
439
|
}, "").join("&");
|
@@ -441,18 +441,18 @@ ur.toString = function(e) {
|
|
441
441
|
function Jo(t) {
|
442
442
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
443
443
|
}
|
444
|
-
function
|
444
|
+
function ur(t, e, n) {
|
445
445
|
if (!e)
|
446
446
|
return t;
|
447
447
|
const s = n && n.encode || Jo, r = n && n.serialize;
|
448
448
|
let i;
|
449
|
-
if (r ? i = r(e, n) : i = f.isURLSearchParams(e) ? e.toString() : new
|
449
|
+
if (r ? i = r(e, n) : i = f.isURLSearchParams(e) ? e.toString() : new Cn(e, n).toString(s), i) {
|
450
450
|
const o = t.indexOf("#");
|
451
451
|
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
452
452
|
}
|
453
453
|
return t;
|
454
454
|
}
|
455
|
-
class
|
455
|
+
class Qn {
|
456
456
|
constructor() {
|
457
457
|
this.handlers = [];
|
458
458
|
}
|
@@ -506,11 +506,11 @@ class ts {
|
|
506
506
|
});
|
507
507
|
}
|
508
508
|
}
|
509
|
-
const
|
509
|
+
const lr = {
|
510
510
|
silentJSONParsing: !0,
|
511
511
|
forcedJSONParsing: !0,
|
512
512
|
clarifyTimeoutError: !1
|
513
|
-
}, Go = typeof URLSearchParams < "u" ? URLSearchParams :
|
513
|
+
}, Go = typeof URLSearchParams < "u" ? URLSearchParams : Cn, Ko = typeof FormData < "u" ? FormData : null, Xo = typeof Blob < "u" ? Blob : null, Qo = (() => {
|
514
514
|
let t;
|
515
515
|
return typeof navigator < "u" && ((t = navigator.product) === "ReactNative" || t === "NativeScript" || t === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
516
516
|
})(), ea = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
@@ -544,7 +544,7 @@ function sa(t) {
|
|
544
544
|
i = n[s], e[i] = t[i];
|
545
545
|
return e;
|
546
546
|
}
|
547
|
-
function
|
547
|
+
function fr(t) {
|
548
548
|
function e(n, s, r, i) {
|
549
549
|
let o = n[i++];
|
550
550
|
const a = Number.isFinite(+o), u = i >= n.length;
|
@@ -572,12 +572,12 @@ function ia(t, e, n) {
|
|
572
572
|
return (n || JSON.stringify)(t);
|
573
573
|
}
|
574
574
|
const Ve = {
|
575
|
-
transitional:
|
575
|
+
transitional: lr,
|
576
576
|
adapter: ["xhr", "http"],
|
577
577
|
transformRequest: [function(e, n) {
|
578
578
|
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, i = f.isObject(e);
|
579
579
|
if (i && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
|
580
|
-
return r && r ? JSON.stringify(
|
580
|
+
return r && r ? JSON.stringify(fr(e)) : e;
|
581
581
|
if (f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e))
|
582
582
|
return e;
|
583
583
|
if (f.isArrayBufferView(e))
|
@@ -665,7 +665,7 @@ const oa = f.toObjectSet([
|
|
665
665
|
`).forEach(function(o) {
|
666
666
|
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || e[n] && oa[n]) && (n === "set-cookie" ? e[n] ? e[n].push(s) : e[n] = [s] : e[n] = e[n] ? e[n] + ", " + s : s);
|
667
667
|
}), e;
|
668
|
-
},
|
668
|
+
}, es = Symbol("internals");
|
669
669
|
function He(t) {
|
670
670
|
return t && String(t).trim().toLowerCase();
|
671
671
|
}
|
@@ -803,7 +803,7 @@ class ee {
|
|
803
803
|
return n.forEach((r) => s.set(r)), s;
|
804
804
|
}
|
805
805
|
static accessor(e) {
|
806
|
-
const s = (this[
|
806
|
+
const s = (this[es] = this[es] = {
|
807
807
|
accessors: {}
|
808
808
|
}).accessors, r = this.prototype;
|
809
809
|
function i(o) {
|
@@ -823,7 +823,7 @@ function Zt(t, e) {
|
|
823
823
|
i = a.call(n, i, r.normalize(), e ? e.status : void 0);
|
824
824
|
}), r.normalize(), i;
|
825
825
|
}
|
826
|
-
function
|
826
|
+
function hr(t) {
|
827
827
|
return !!(t && t.__CANCEL__);
|
828
828
|
}
|
829
829
|
function tt(t, e, n) {
|
@@ -879,7 +879,7 @@ function ma(t) {
|
|
879
879
|
function pa(t, e) {
|
880
880
|
return e ? t.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
881
881
|
}
|
882
|
-
function
|
882
|
+
function dr(t, e) {
|
883
883
|
return t && !ma(e) ? pa(t, e) : e;
|
884
884
|
}
|
885
885
|
const ya = ce.isStandardBrowserEnv ? (
|
@@ -934,7 +934,7 @@ function wa(t, e) {
|
|
934
934
|
return m ? Math.round(y * 1e3 / m) : void 0;
|
935
935
|
};
|
936
936
|
}
|
937
|
-
function
|
937
|
+
function ts(t, e) {
|
938
938
|
let n = 0;
|
939
939
|
const s = wa(50, 250);
|
940
940
|
return (r) => {
|
@@ -966,8 +966,8 @@ const Sa = typeof XMLHttpRequest < "u", va = Sa && function(t) {
|
|
966
966
|
const m = t.auth.username || "", d = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : "";
|
967
967
|
i.set("Authorization", "Basic " + btoa(m + ":" + d));
|
968
968
|
}
|
969
|
-
const l =
|
970
|
-
c.open(t.method.toUpperCase(),
|
969
|
+
const l = dr(t.baseURL, t.url);
|
970
|
+
c.open(t.method.toUpperCase(), ur(l, t.params, t.paramsSerializer), !0), c.timeout = t.timeout;
|
971
971
|
function h() {
|
972
972
|
if (!c)
|
973
973
|
return;
|
@@ -995,7 +995,7 @@ const Sa = typeof XMLHttpRequest < "u", va = Sa && function(t) {
|
|
995
995
|
s(new C("Network Error", C.ERR_NETWORK, t, c)), c = null;
|
996
996
|
}, c.ontimeout = function() {
|
997
997
|
let d = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
|
998
|
-
const w = t.transitional ||
|
998
|
+
const w = t.transitional || lr;
|
999
999
|
t.timeoutErrorMessage && (d = t.timeoutErrorMessage), s(new C(
|
1000
1000
|
d,
|
1001
1001
|
w.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
|
@@ -1008,7 +1008,7 @@ const Sa = typeof XMLHttpRequest < "u", va = Sa && function(t) {
|
|
1008
1008
|
}
|
1009
1009
|
r === void 0 && i.setContentType(null), "setRequestHeader" in c && f.forEach(i.toJSON(), function(d, w) {
|
1010
1010
|
c.setRequestHeader(w, d);
|
1011
|
-
}), f.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress",
|
1011
|
+
}), f.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress", ts(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", ts(t.onUploadProgress)), (t.cancelToken || t.signal) && (a = (m) => {
|
1012
1012
|
c && (s(!m || m.type ? new tt(null, t, c) : m), c.abort(), c = null);
|
1013
1013
|
}, t.cancelToken && t.cancelToken.subscribe(a), t.signal && (t.signal.aborted ? a() : t.signal.addEventListener("abort", a)));
|
1014
1014
|
const y = ga(l);
|
@@ -1055,7 +1055,7 @@ function jt(t) {
|
|
1055
1055
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
1056
1056
|
throw new tt(null, t);
|
1057
1057
|
}
|
1058
|
-
function
|
1058
|
+
function ns(t) {
|
1059
1059
|
return jt(t), t.headers = ee.from(t.headers), t.data = Zt.call(
|
1060
1060
|
t,
|
1061
1061
|
t.transformRequest
|
@@ -1066,14 +1066,14 @@ function rs(t) {
|
|
1066
1066
|
s
|
1067
1067
|
), s.headers = ee.from(s.headers), s;
|
1068
1068
|
}, function(s) {
|
1069
|
-
return
|
1069
|
+
return hr(s) || (jt(t), s && s.response && (s.response.data = Zt.call(
|
1070
1070
|
t,
|
1071
1071
|
t.transformResponse,
|
1072
1072
|
s.response
|
1073
1073
|
), s.response.headers = ee.from(s.response.headers))), Promise.reject(s);
|
1074
1074
|
});
|
1075
1075
|
}
|
1076
|
-
const
|
1076
|
+
const ss = (t) => t instanceof ee ? t.toJSON() : t;
|
1077
1077
|
function De(t, e) {
|
1078
1078
|
e = e || {};
|
1079
1079
|
const n = {};
|
@@ -1130,23 +1130,23 @@ function De(t, e) {
|
|
1130
1130
|
socketPath: o,
|
1131
1131
|
responseEncoding: o,
|
1132
1132
|
validateStatus: a,
|
1133
|
-
headers: (c, l) => r(
|
1133
|
+
headers: (c, l) => r(ss(c), ss(l), !0)
|
1134
1134
|
};
|
1135
1135
|
return f.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
1136
1136
|
const h = u[l] || r, y = h(t[l], e[l], l);
|
1137
1137
|
f.isUndefined(y) && h !== a || (n[l] = y);
|
1138
1138
|
}), n;
|
1139
1139
|
}
|
1140
|
-
const
|
1140
|
+
const mr = "1.4.0", xn = {};
|
1141
1141
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
1142
|
-
|
1142
|
+
xn[t] = function(s) {
|
1143
1143
|
return typeof s === t || "a" + (e < 1 ? "n " : " ") + t;
|
1144
1144
|
};
|
1145
1145
|
});
|
1146
|
-
const
|
1147
|
-
|
1146
|
+
const rs = {};
|
1147
|
+
xn.transitional = function(e, n, s) {
|
1148
1148
|
function r(i, o) {
|
1149
|
-
return "[Axios v" +
|
1149
|
+
return "[Axios v" + mr + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
1150
1150
|
}
|
1151
1151
|
return (i, o, a) => {
|
1152
1152
|
if (e === !1)
|
@@ -1154,7 +1154,7 @@ Nn.transitional = function(e, n, s) {
|
|
1154
1154
|
r(o, " has been removed" + (n ? " in " + n : "")),
|
1155
1155
|
C.ERR_DEPRECATED
|
1156
1156
|
);
|
1157
|
-
return n && !
|
1157
|
+
return n && !rs[o] && (rs[o] = !0, console.warn(
|
1158
1158
|
r(
|
1159
1159
|
o,
|
1160
1160
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
@@ -1179,15 +1179,15 @@ function ba(t, e, n) {
|
|
1179
1179
|
throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
|
1180
1180
|
}
|
1181
1181
|
}
|
1182
|
-
const
|
1182
|
+
const un = {
|
1183
1183
|
assertOptions: ba,
|
1184
|
-
validators:
|
1185
|
-
}, me =
|
1184
|
+
validators: xn
|
1185
|
+
}, me = un.validators;
|
1186
1186
|
class Te {
|
1187
1187
|
constructor(e) {
|
1188
1188
|
this.defaults = e, this.interceptors = {
|
1189
|
-
request: new
|
1190
|
-
response: new
|
1189
|
+
request: new Qn(),
|
1190
|
+
response: new Qn()
|
1191
1191
|
};
|
1192
1192
|
}
|
1193
1193
|
/**
|
@@ -1201,13 +1201,13 @@ class Te {
|
|
1201
1201
|
request(e, n) {
|
1202
1202
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = De(this.defaults, n);
|
1203
1203
|
const { transitional: s, paramsSerializer: r, headers: i } = n;
|
1204
|
-
s !== void 0 &&
|
1204
|
+
s !== void 0 && un.assertOptions(s, {
|
1205
1205
|
silentJSONParsing: me.transitional(me.boolean),
|
1206
1206
|
forcedJSONParsing: me.transitional(me.boolean),
|
1207
1207
|
clarifyTimeoutError: me.transitional(me.boolean)
|
1208
1208
|
}, !1), r != null && (f.isFunction(r) ? n.paramsSerializer = {
|
1209
1209
|
serialize: r
|
1210
|
-
} :
|
1210
|
+
} : un.assertOptions(r, {
|
1211
1211
|
encode: me.function,
|
1212
1212
|
serialize: me.function
|
1213
1213
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
@@ -1232,7 +1232,7 @@ class Te {
|
|
1232
1232
|
});
|
1233
1233
|
let l, h = 0, y;
|
1234
1234
|
if (!u) {
|
1235
|
-
const d = [
|
1235
|
+
const d = [ns.bind(this), void 0];
|
1236
1236
|
for (d.unshift.apply(d, a), d.push.apply(d, c), y = d.length, l = Promise.resolve(n); h < y; )
|
1237
1237
|
l = l.then(d[h++], d[h++]);
|
1238
1238
|
return l;
|
@@ -1249,7 +1249,7 @@ class Te {
|
|
1249
1249
|
}
|
1250
1250
|
}
|
1251
1251
|
try {
|
1252
|
-
l =
|
1252
|
+
l = ns.call(this, m);
|
1253
1253
|
} catch (d) {
|
1254
1254
|
return Promise.reject(d);
|
1255
1255
|
}
|
@@ -1259,8 +1259,8 @@ class Te {
|
|
1259
1259
|
}
|
1260
1260
|
getUri(e) {
|
1261
1261
|
e = De(this.defaults, e);
|
1262
|
-
const n =
|
1263
|
-
return
|
1262
|
+
const n = dr(e.baseURL, e.url);
|
1263
|
+
return ur(n, e.params, e.paramsSerializer);
|
1264
1264
|
}
|
1265
1265
|
}
|
1266
1266
|
f.forEach(["delete", "get", "head", "options"], function(e) {
|
@@ -1287,7 +1287,7 @@ f.forEach(["post", "put", "patch"], function(e) {
|
|
1287
1287
|
}
|
1288
1288
|
Te.prototype[e] = n(), Te.prototype[e + "Form"] = n(!0);
|
1289
1289
|
});
|
1290
|
-
class
|
1290
|
+
class Nn {
|
1291
1291
|
constructor(e) {
|
1292
1292
|
if (typeof e != "function")
|
1293
1293
|
throw new TypeError("executor must be a function.");
|
@@ -1347,7 +1347,7 @@ class _n {
|
|
1347
1347
|
static source() {
|
1348
1348
|
let e;
|
1349
1349
|
return {
|
1350
|
-
token: new
|
1350
|
+
token: new Nn(function(r) {
|
1351
1351
|
e = r;
|
1352
1352
|
}),
|
1353
1353
|
cancel: e
|
@@ -1362,7 +1362,7 @@ function Ta(t) {
|
|
1362
1362
|
function Ea(t) {
|
1363
1363
|
return f.isObject(t) && t.isAxiosError === !0;
|
1364
1364
|
}
|
1365
|
-
const
|
1365
|
+
const ln = {
|
1366
1366
|
Continue: 100,
|
1367
1367
|
SwitchingProtocols: 101,
|
1368
1368
|
Processing: 102,
|
@@ -1427,21 +1427,21 @@ const fn = {
|
|
1427
1427
|
NotExtended: 510,
|
1428
1428
|
NetworkAuthenticationRequired: 511
|
1429
1429
|
};
|
1430
|
-
Object.entries(
|
1431
|
-
|
1430
|
+
Object.entries(ln).forEach(([t, e]) => {
|
1431
|
+
ln[e] = t;
|
1432
1432
|
});
|
1433
|
-
function
|
1434
|
-
const e = new Te(t), n =
|
1433
|
+
function pr(t) {
|
1434
|
+
const e = new Te(t), n = Ks(Te.prototype.request, e);
|
1435
1435
|
return f.extend(n, Te.prototype, e, { allOwnKeys: !0 }), f.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(r) {
|
1436
|
-
return
|
1436
|
+
return pr(De(t, r));
|
1437
1437
|
}, n;
|
1438
1438
|
}
|
1439
|
-
const U =
|
1439
|
+
const U = pr(Ve);
|
1440
1440
|
U.Axios = Te;
|
1441
1441
|
U.CanceledError = tt;
|
1442
|
-
U.CancelToken =
|
1443
|
-
U.isCancel =
|
1444
|
-
U.VERSION =
|
1442
|
+
U.CancelToken = Nn;
|
1443
|
+
U.isCancel = hr;
|
1444
|
+
U.VERSION = mr;
|
1445
1445
|
U.toFormData = Ft;
|
1446
1446
|
U.AxiosError = C;
|
1447
1447
|
U.Cancel = U.CanceledError;
|
@@ -1452,8 +1452,8 @@ U.spread = Ta;
|
|
1452
1452
|
U.isAxiosError = Ea;
|
1453
1453
|
U.mergeConfig = De;
|
1454
1454
|
U.AxiosHeaders = ee;
|
1455
|
-
U.formToJSON = (t) =>
|
1456
|
-
U.HttpStatusCode =
|
1455
|
+
U.formToJSON = (t) => fr(f.isHTMLForm(t) ? new FormData(t) : t);
|
1456
|
+
U.HttpStatusCode = ln;
|
1457
1457
|
U.default = U;
|
1458
1458
|
const Vt = async function(t) {
|
1459
1459
|
const e = t, n = window.VITE_BACKEND_URL ? window.VITE_BACKEND_URL : "https://chatadmin-gw.dev.mp.gob.bo", s = {
|
@@ -1502,7 +1502,7 @@ async function Ca(t, e) {
|
|
1502
1502
|
}).catch((i) => (console.error(i), null));
|
1503
1503
|
return (r = s == null ? void 0 : s.response) == null ? void 0 : r.data;
|
1504
1504
|
}
|
1505
|
-
async function
|
1505
|
+
async function is(t) {
|
1506
1506
|
var s;
|
1507
1507
|
const n = await Vt({
|
1508
1508
|
url: "/v1/app-chats/web-chat",
|
@@ -1511,7 +1511,7 @@ async function as(t) {
|
|
1511
1511
|
}).catch((r) => (console.error(r), null));
|
1512
1512
|
return (s = n == null ? void 0 : n.response) == null ? void 0 : s.data;
|
1513
1513
|
}
|
1514
|
-
async function
|
1514
|
+
async function os(t, e) {
|
1515
1515
|
var i;
|
1516
1516
|
const n = {
|
1517
1517
|
esCliente: !0,
|
@@ -1526,10 +1526,10 @@ async function cs(t, e) {
|
|
1526
1526
|
return (i = r == null ? void 0 : r.response) == null ? void 0 : i.data;
|
1527
1527
|
}
|
1528
1528
|
function xa(t) {
|
1529
|
-
return
|
1529
|
+
return Li() ? (Fi(t), !0) : !1;
|
1530
1530
|
}
|
1531
|
-
function
|
1532
|
-
return typeof t == "function" ? t() :
|
1531
|
+
function yr(t) {
|
1532
|
+
return typeof t == "function" ? t() : js(t);
|
1533
1533
|
}
|
1534
1534
|
const Na = typeof window < "u" && typeof document < "u";
|
1535
1535
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
@@ -1537,19 +1537,19 @@ const _a = (t) => t != null, Yt = () => {
|
|
1537
1537
|
};
|
1538
1538
|
function Jt(t) {
|
1539
1539
|
var e;
|
1540
|
-
const n =
|
1540
|
+
const n = yr(t);
|
1541
1541
|
return (e = n == null ? void 0 : n.$el) != null ? e : n;
|
1542
1542
|
}
|
1543
1543
|
const Aa = Na ? window : void 0;
|
1544
1544
|
function Ma() {
|
1545
|
-
const t = z(!1), e =
|
1546
|
-
return e &&
|
1545
|
+
const t = z(!1), e = Vi();
|
1546
|
+
return e && Js(() => {
|
1547
1547
|
t.value = !0;
|
1548
1548
|
}, e), t;
|
1549
1549
|
}
|
1550
1550
|
function Ra(t) {
|
1551
1551
|
const e = Ma();
|
1552
|
-
return
|
1552
|
+
return Ys(() => (e.value, !!t()));
|
1553
1553
|
}
|
1554
1554
|
function Ia(t, e, n = {}) {
|
1555
1555
|
const {
|
@@ -1558,12 +1558,12 @@ function Ia(t, e, n = {}) {
|
|
1558
1558
|
threshold: i = 0.1,
|
1559
1559
|
window: o = Aa,
|
1560
1560
|
immediate: a = !0
|
1561
|
-
} = n, u = Ra(() => o && "IntersectionObserver" in o), c =
|
1562
|
-
const d =
|
1561
|
+
} = n, u = Ra(() => o && "IntersectionObserver" in o), c = Ys(() => {
|
1562
|
+
const d = yr(t);
|
1563
1563
|
return (Array.isArray(d) ? d : [d]).map(Jt).filter(_a);
|
1564
1564
|
});
|
1565
1565
|
let l = Yt;
|
1566
|
-
const h = z(a), y = u.value ?
|
1566
|
+
const h = z(a), y = u.value ? Tn(
|
1567
1567
|
() => [c.value, Jt(s), h.value],
|
1568
1568
|
([d, w]) => {
|
1569
1569
|
if (l(), !h.value || !d.length)
|
@@ -1615,7 +1615,7 @@ class Fa extends Ee {
|
|
1615
1615
|
}
|
1616
1616
|
class Ae extends Ee {
|
1617
1617
|
}
|
1618
|
-
class
|
1618
|
+
class gr extends Ee {
|
1619
1619
|
constructor(e) {
|
1620
1620
|
super(`Invalid unit ${e}`);
|
1621
1621
|
}
|
@@ -1631,7 +1631,7 @@ const p = "numeric", ie = "short", Y = "long", _t = {
|
|
1631
1631
|
year: p,
|
1632
1632
|
month: p,
|
1633
1633
|
day: p
|
1634
|
-
},
|
1634
|
+
}, wr = {
|
1635
1635
|
year: p,
|
1636
1636
|
month: ie,
|
1637
1637
|
day: p
|
@@ -1640,73 +1640,73 @@ const p = "numeric", ie = "short", Y = "long", _t = {
|
|
1640
1640
|
month: ie,
|
1641
1641
|
day: p,
|
1642
1642
|
weekday: ie
|
1643
|
-
},
|
1643
|
+
}, Sr = {
|
1644
1644
|
year: p,
|
1645
1645
|
month: Y,
|
1646
1646
|
day: p
|
1647
|
-
},
|
1647
|
+
}, vr = {
|
1648
1648
|
year: p,
|
1649
1649
|
month: Y,
|
1650
1650
|
day: p,
|
1651
1651
|
weekday: Y
|
1652
|
-
},
|
1652
|
+
}, kr = {
|
1653
1653
|
hour: p,
|
1654
1654
|
minute: p
|
1655
|
-
},
|
1655
|
+
}, br = {
|
1656
1656
|
hour: p,
|
1657
1657
|
minute: p,
|
1658
1658
|
second: p
|
1659
|
-
},
|
1659
|
+
}, Tr = {
|
1660
1660
|
hour: p,
|
1661
1661
|
minute: p,
|
1662
1662
|
second: p,
|
1663
1663
|
timeZoneName: ie
|
1664
|
-
},
|
1664
|
+
}, Er = {
|
1665
1665
|
hour: p,
|
1666
1666
|
minute: p,
|
1667
1667
|
second: p,
|
1668
1668
|
timeZoneName: Y
|
1669
|
-
},
|
1669
|
+
}, Or = {
|
1670
1670
|
hour: p,
|
1671
1671
|
minute: p,
|
1672
1672
|
hourCycle: "h23"
|
1673
|
-
},
|
1673
|
+
}, Cr = {
|
1674
1674
|
hour: p,
|
1675
1675
|
minute: p,
|
1676
1676
|
second: p,
|
1677
1677
|
hourCycle: "h23"
|
1678
|
-
},
|
1678
|
+
}, xr = {
|
1679
1679
|
hour: p,
|
1680
1680
|
minute: p,
|
1681
1681
|
second: p,
|
1682
1682
|
hourCycle: "h23",
|
1683
1683
|
timeZoneName: ie
|
1684
|
-
},
|
1684
|
+
}, Nr = {
|
1685
1685
|
hour: p,
|
1686
1686
|
minute: p,
|
1687
1687
|
second: p,
|
1688
1688
|
hourCycle: "h23",
|
1689
1689
|
timeZoneName: Y
|
1690
|
-
},
|
1690
|
+
}, _r = {
|
1691
1691
|
year: p,
|
1692
1692
|
month: p,
|
1693
1693
|
day: p,
|
1694
1694
|
hour: p,
|
1695
1695
|
minute: p
|
1696
|
-
},
|
1696
|
+
}, Ar = {
|
1697
1697
|
year: p,
|
1698
1698
|
month: p,
|
1699
1699
|
day: p,
|
1700
1700
|
hour: p,
|
1701
1701
|
minute: p,
|
1702
1702
|
second: p
|
1703
|
-
},
|
1703
|
+
}, Mr = {
|
1704
1704
|
year: p,
|
1705
1705
|
month: ie,
|
1706
1706
|
day: p,
|
1707
1707
|
hour: p,
|
1708
1708
|
minute: p
|
1709
|
-
},
|
1709
|
+
}, Rr = {
|
1710
1710
|
year: p,
|
1711
1711
|
month: ie,
|
1712
1712
|
day: p,
|
@@ -1720,14 +1720,14 @@ const p = "numeric", ie = "short", Y = "long", _t = {
|
|
1720
1720
|
weekday: ie,
|
1721
1721
|
hour: p,
|
1722
1722
|
minute: p
|
1723
|
-
},
|
1723
|
+
}, Ir = {
|
1724
1724
|
year: p,
|
1725
1725
|
month: Y,
|
1726
1726
|
day: p,
|
1727
1727
|
hour: p,
|
1728
1728
|
minute: p,
|
1729
1729
|
timeZoneName: ie
|
1730
|
-
},
|
1730
|
+
}, Dr = {
|
1731
1731
|
year: p,
|
1732
1732
|
month: Y,
|
1733
1733
|
day: p,
|
@@ -1735,7 +1735,7 @@ const p = "numeric", ie = "short", Y = "long", _t = {
|
|
1735
1735
|
minute: p,
|
1736
1736
|
second: p,
|
1737
1737
|
timeZoneName: ie
|
1738
|
-
},
|
1738
|
+
}, Lr = {
|
1739
1739
|
year: p,
|
1740
1740
|
month: Y,
|
1741
1741
|
day: p,
|
@@ -1743,7 +1743,7 @@ const p = "numeric", ie = "short", Y = "long", _t = {
|
|
1743
1743
|
hour: p,
|
1744
1744
|
minute: p,
|
1745
1745
|
timeZoneName: Y
|
1746
|
-
},
|
1746
|
+
}, Fr = {
|
1747
1747
|
year: p,
|
1748
1748
|
month: Y,
|
1749
1749
|
day: p,
|
@@ -1860,7 +1860,7 @@ class Bt extends nt {
|
|
1860
1860
|
}
|
1861
1861
|
/** @override **/
|
1862
1862
|
offsetName(e, { format: n, locale: s }) {
|
1863
|
-
return
|
1863
|
+
return zr(e, n, s);
|
1864
1864
|
}
|
1865
1865
|
/** @override **/
|
1866
1866
|
formatOffset(e, n) {
|
@@ -1996,7 +1996,7 @@ class de extends nt {
|
|
1996
1996
|
* @return {string}
|
1997
1997
|
*/
|
1998
1998
|
offsetName(e, { format: n, locale: s }) {
|
1999
|
-
return
|
1999
|
+
return zr(e, n, s, this.name);
|
2000
2000
|
}
|
2001
2001
|
/**
|
2002
2002
|
* Returns the offset's value as a string
|
@@ -2052,40 +2052,40 @@ class de extends nt {
|
|
2052
2052
|
return this.valid;
|
2053
2053
|
}
|
2054
2054
|
}
|
2055
|
-
let
|
2055
|
+
let as = {};
|
2056
2056
|
function qa(t, e = {}) {
|
2057
2057
|
const n = JSON.stringify([t, e]);
|
2058
|
-
let s =
|
2059
|
-
return s || (s = new Intl.ListFormat(t, e),
|
2058
|
+
let s = as[n];
|
2059
|
+
return s || (s = new Intl.ListFormat(t, e), as[n] = s), s;
|
2060
2060
|
}
|
2061
|
-
let
|
2062
|
-
function
|
2061
|
+
let fn = {};
|
2062
|
+
function hn(t, e = {}) {
|
2063
2063
|
const n = JSON.stringify([t, e]);
|
2064
|
-
let s =
|
2065
|
-
return s || (s = new Intl.DateTimeFormat(t, e),
|
2064
|
+
let s = fn[n];
|
2065
|
+
return s || (s = new Intl.DateTimeFormat(t, e), fn[n] = s), s;
|
2066
2066
|
}
|
2067
|
-
let
|
2067
|
+
let dn = {};
|
2068
2068
|
function Ha(t, e = {}) {
|
2069
2069
|
const n = JSON.stringify([t, e]);
|
2070
|
-
let s =
|
2071
|
-
return s || (s = new Intl.NumberFormat(t, e),
|
2070
|
+
let s = dn[n];
|
2071
|
+
return s || (s = new Intl.NumberFormat(t, e), dn[n] = s), s;
|
2072
2072
|
}
|
2073
|
-
let
|
2073
|
+
let mn = {};
|
2074
2074
|
function za(t, e = {}) {
|
2075
2075
|
const { base: n, ...s } = e, r = JSON.stringify([t, s]);
|
2076
|
-
let i =
|
2077
|
-
return i || (i = new Intl.RelativeTimeFormat(t, e),
|
2076
|
+
let i = mn[r];
|
2077
|
+
return i || (i = new Intl.RelativeTimeFormat(t, e), mn[r] = i), i;
|
2078
2078
|
}
|
2079
2079
|
let je = null;
|
2080
2080
|
function Za() {
|
2081
2081
|
return je || (je = new Intl.DateTimeFormat().resolvedOptions().locale, je);
|
2082
2082
|
}
|
2083
|
-
let
|
2083
|
+
let cs = {};
|
2084
2084
|
function ja(t) {
|
2085
|
-
let e =
|
2085
|
+
let e = cs[t];
|
2086
2086
|
if (!e) {
|
2087
2087
|
const n = new Intl.Locale(t);
|
2088
|
-
e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo,
|
2088
|
+
e = "getWeekInfo" in n ? n.getWeekInfo() : n.weekInfo, cs[t] = e;
|
2089
2089
|
}
|
2090
2090
|
return e;
|
2091
2091
|
}
|
@@ -2098,10 +2098,10 @@ function Ya(t) {
|
|
2098
2098
|
{
|
2099
2099
|
let s, r;
|
2100
2100
|
try {
|
2101
|
-
s =
|
2101
|
+
s = hn(t).resolvedOptions(), r = t;
|
2102
2102
|
} catch {
|
2103
2103
|
const u = t.substring(0, n);
|
2104
|
-
s =
|
2104
|
+
s = hn(u).resolvedOptions(), r = u;
|
2105
2105
|
}
|
2106
2106
|
const { numberingSystem: i, calendar: o } = s;
|
2107
2107
|
return [r, i, o];
|
@@ -2147,7 +2147,7 @@ class Qa {
|
|
2147
2147
|
const n = this.floor ? Math.floor(e) : e;
|
2148
2148
|
return this.inf.format(n);
|
2149
2149
|
} else {
|
2150
|
-
const n = this.floor ? Math.floor(e) :
|
2150
|
+
const n = this.floor ? Math.floor(e) : In(e, 3);
|
2151
2151
|
return D(n, this.padTo);
|
2152
2152
|
}
|
2153
2153
|
}
|
@@ -2163,7 +2163,7 @@ class ec {
|
|
2163
2163
|
e.offset !== 0 && de.create(a).valid ? (r = a, this.dt = e) : (r = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
2164
2164
|
} else e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, r = e.zone.name) : (r = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
2165
2165
|
const i = { ...this.opts };
|
2166
|
-
i.timeZone = i.timeZone || r, this.dtf =
|
2166
|
+
i.timeZone = i.timeZone || r, this.dtf = hn(n, i);
|
2167
2167
|
}
|
2168
2168
|
format() {
|
2169
2169
|
return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate());
|
@@ -2190,7 +2190,7 @@ class ec {
|
|
2190
2190
|
}
|
2191
2191
|
class tc {
|
2192
2192
|
constructor(e, n, s) {
|
2193
|
-
this.opts = { style: "long", ...s }, !n &&
|
2193
|
+
this.opts = { style: "long", ...s }, !n && qr() && (this.rtf = za(e, s));
|
2194
2194
|
}
|
2195
2195
|
format(e, n) {
|
2196
2196
|
return this.rtf ? this.rtf.format(e, n) : Ec(n, e, this.opts.numeric, this.opts.style !== "long");
|
@@ -2215,11 +2215,11 @@ class N {
|
|
2215
2215
|
);
|
2216
2216
|
}
|
2217
2217
|
static create(e, n, s, r, i = !1) {
|
2218
|
-
const o = e || I.defaultLocale, a = o || (i ? "en-US" : Za()), u = n || I.defaultNumberingSystem, c = s || I.defaultOutputCalendar, l =
|
2218
|
+
const o = e || I.defaultLocale, a = o || (i ? "en-US" : Za()), u = n || I.defaultNumberingSystem, c = s || I.defaultOutputCalendar, l = pn(r) || I.defaultWeekSettings;
|
2219
2219
|
return new N(a, u, c, l, o);
|
2220
2220
|
}
|
2221
2221
|
static resetCache() {
|
2222
|
-
je = null,
|
2222
|
+
je = null, fn = {}, dn = {}, mn = {};
|
2223
2223
|
}
|
2224
2224
|
static fromObject({ locale: e, numberingSystem: n, outputCalendar: s, weekSettings: r } = {}) {
|
2225
2225
|
return N.create(e, n, s, r);
|
@@ -2240,7 +2240,7 @@ class N {
|
|
2240
2240
|
e.locale || this.specifiedLocale,
|
2241
2241
|
e.numberingSystem || this.numberingSystem,
|
2242
2242
|
e.outputCalendar || this.outputCalendar,
|
2243
|
-
|
2243
|
+
pn(e.weekSettings) || this.weekSettings,
|
2244
2244
|
e.defaultToEN || !1
|
2245
2245
|
);
|
2246
2246
|
}
|
@@ -2251,13 +2251,13 @@ class N {
|
|
2251
2251
|
return this.clone({ ...e, defaultToEN: !1 });
|
2252
2252
|
}
|
2253
2253
|
months(e, n = !1) {
|
2254
|
-
return ut(this, e,
|
2254
|
+
return ut(this, e, Yr, () => {
|
2255
2255
|
const s = n ? { month: e, day: "numeric" } : { month: e }, r = n ? "format" : "standalone";
|
2256
2256
|
return this.monthsCache[r][e] || (this.monthsCache[r][e] = Ga((i) => this.extract(i, s, "month"))), this.monthsCache[r][e];
|
2257
2257
|
});
|
2258
2258
|
}
|
2259
2259
|
weekdays(e, n = !1) {
|
2260
|
-
return ut(this, e,
|
2260
|
+
return ut(this, e, Kr, () => {
|
2261
2261
|
const s = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, r = n ? "format" : "standalone";
|
2262
2262
|
return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = Ka(
|
2263
2263
|
(i) => this.extract(i, s, "weekday")
|
@@ -2268,7 +2268,7 @@ class N {
|
|
2268
2268
|
return ut(
|
2269
2269
|
this,
|
2270
2270
|
void 0,
|
2271
|
-
() =>
|
2271
|
+
() => Xr,
|
2272
2272
|
() => {
|
2273
2273
|
if (!this.meridiemCache) {
|
2274
2274
|
const e = { hour: "numeric", hourCycle: "h12" };
|
@@ -2281,7 +2281,7 @@ class N {
|
|
2281
2281
|
);
|
2282
2282
|
}
|
2283
2283
|
eras(e) {
|
2284
|
-
return ut(this, e,
|
2284
|
+
return ut(this, e, Qr, () => {
|
2285
2285
|
const n = { era: e };
|
2286
2286
|
return this.eraCache[e] || (this.eraCache[e] = [v.utc(-40, 1, 1), v.utc(2017, 1, 1)].map(
|
2287
2287
|
(s) => this.extract(s, n, "era")
|
@@ -2308,7 +2308,7 @@ class N {
|
|
2308
2308
|
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
|
2309
2309
|
}
|
2310
2310
|
getWeekSettings() {
|
2311
|
-
return this.weekSettings ? this.weekSettings :
|
2311
|
+
return this.weekSettings ? this.weekSettings : Hr() ? ja(this.locale) : nc;
|
2312
2312
|
}
|
2313
2313
|
getStartOfWeek() {
|
2314
2314
|
return this.getWeekSettings().firstDay;
|
@@ -2493,7 +2493,7 @@ function we(t, e) {
|
|
2493
2493
|
return n === "default" ? e : n === "local" || n === "system" ? Bt.instance : n === "utc" || n === "gmt" ? Z.utcInstance : Z.parseSpecifier(n) || de.create(t);
|
2494
2494
|
} else return Se(t) ? Z.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new sc(t);
|
2495
2495
|
}
|
2496
|
-
const
|
2496
|
+
const _n = {
|
2497
2497
|
arab: "[٠-٩]",
|
2498
2498
|
arabext: "[۰-۹]",
|
2499
2499
|
bali: "[᭐-᭙]",
|
@@ -2515,7 +2515,7 @@ const An = {
|
|
2515
2515
|
thai: "[๐-๙]",
|
2516
2516
|
tibt: "[༠-༩]",
|
2517
2517
|
latn: "\\d"
|
2518
|
-
},
|
2518
|
+
}, us = {
|
2519
2519
|
arab: [1632, 1641],
|
2520
2520
|
arabext: [1776, 1785],
|
2521
2521
|
bali: [6992, 7001],
|
@@ -2535,18 +2535,18 @@ const An = {
|
|
2535
2535
|
telu: [3174, 3183],
|
2536
2536
|
thai: [3664, 3673],
|
2537
2537
|
tibt: [3872, 3881]
|
2538
|
-
}, rc =
|
2538
|
+
}, rc = _n.hanidec.replace(/[\[|\]]/g, "").split("");
|
2539
2539
|
function ic(t) {
|
2540
2540
|
let e = parseInt(t, 10);
|
2541
2541
|
if (isNaN(e)) {
|
2542
2542
|
e = "";
|
2543
2543
|
for (let n = 0; n < t.length; n++) {
|
2544
2544
|
const s = t.charCodeAt(n);
|
2545
|
-
if (t[n].search(
|
2545
|
+
if (t[n].search(_n.hanidec) !== -1)
|
2546
2546
|
e += rc.indexOf(t[n]);
|
2547
2547
|
else
|
2548
|
-
for (const r in
|
2549
|
-
const [i, o] =
|
2548
|
+
for (const r in us) {
|
2549
|
+
const [i, o] = us[r];
|
2550
2550
|
s >= i && s <= o && (e += s - i);
|
2551
2551
|
}
|
2552
2552
|
}
|
@@ -2560,16 +2560,16 @@ function oc() {
|
|
2560
2560
|
}
|
2561
2561
|
function te({ numberingSystem: t }, e = "") {
|
2562
2562
|
const n = t || "latn";
|
2563
|
-
return Ne[n] || (Ne[n] = {}), Ne[n][e] || (Ne[n][e] = new RegExp(`${
|
2563
|
+
return Ne[n] || (Ne[n] = {}), Ne[n][e] || (Ne[n][e] = new RegExp(`${_n[n]}${e}`)), Ne[n][e];
|
2564
2564
|
}
|
2565
|
-
let
|
2565
|
+
let ls = () => Date.now(), fs = "system", hs = null, ds = null, ms = null, ps = 60, ys, gs = null;
|
2566
2566
|
class I {
|
2567
2567
|
/**
|
2568
2568
|
* Get the callback for returning the current timestamp.
|
2569
2569
|
* @type {function}
|
2570
2570
|
*/
|
2571
2571
|
static get now() {
|
2572
|
-
return
|
2572
|
+
return ls;
|
2573
2573
|
}
|
2574
2574
|
/**
|
2575
2575
|
* Set the callback for returning the current timestamp.
|
@@ -2579,7 +2579,7 @@ class I {
|
|
2579
2579
|
* @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
|
2580
2580
|
*/
|
2581
2581
|
static set now(e) {
|
2582
|
-
|
2582
|
+
ls = e;
|
2583
2583
|
}
|
2584
2584
|
/**
|
2585
2585
|
* Set the default time zone to create DateTimes in. Does not affect existing instances.
|
@@ -2587,7 +2587,7 @@ class I {
|
|
2587
2587
|
* @type {string}
|
2588
2588
|
*/
|
2589
2589
|
static set defaultZone(e) {
|
2590
|
-
|
2590
|
+
fs = e;
|
2591
2591
|
}
|
2592
2592
|
/**
|
2593
2593
|
* Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
|
@@ -2595,49 +2595,49 @@ class I {
|
|
2595
2595
|
* @type {Zone}
|
2596
2596
|
*/
|
2597
2597
|
static get defaultZone() {
|
2598
|
-
return we(
|
2598
|
+
return we(fs, Bt.instance);
|
2599
2599
|
}
|
2600
2600
|
/**
|
2601
2601
|
* Get the default locale to create DateTimes with. Does not affect existing instances.
|
2602
2602
|
* @type {string}
|
2603
2603
|
*/
|
2604
2604
|
static get defaultLocale() {
|
2605
|
-
return
|
2605
|
+
return hs;
|
2606
2606
|
}
|
2607
2607
|
/**
|
2608
2608
|
* Set the default locale to create DateTimes with. Does not affect existing instances.
|
2609
2609
|
* @type {string}
|
2610
2610
|
*/
|
2611
2611
|
static set defaultLocale(e) {
|
2612
|
-
|
2612
|
+
hs = e;
|
2613
2613
|
}
|
2614
2614
|
/**
|
2615
2615
|
* Get the default numbering system to create DateTimes with. Does not affect existing instances.
|
2616
2616
|
* @type {string}
|
2617
2617
|
*/
|
2618
2618
|
static get defaultNumberingSystem() {
|
2619
|
-
return
|
2619
|
+
return ds;
|
2620
2620
|
}
|
2621
2621
|
/**
|
2622
2622
|
* Set the default numbering system to create DateTimes with. Does not affect existing instances.
|
2623
2623
|
* @type {string}
|
2624
2624
|
*/
|
2625
2625
|
static set defaultNumberingSystem(e) {
|
2626
|
-
|
2626
|
+
ds = e;
|
2627
2627
|
}
|
2628
2628
|
/**
|
2629
2629
|
* Get the default output calendar to create DateTimes with. Does not affect existing instances.
|
2630
2630
|
* @type {string}
|
2631
2631
|
*/
|
2632
2632
|
static get defaultOutputCalendar() {
|
2633
|
-
return
|
2633
|
+
return ms;
|
2634
2634
|
}
|
2635
2635
|
/**
|
2636
2636
|
* Set the default output calendar to create DateTimes with. Does not affect existing instances.
|
2637
2637
|
* @type {string}
|
2638
2638
|
*/
|
2639
2639
|
static set defaultOutputCalendar(e) {
|
2640
|
-
|
2640
|
+
ms = e;
|
2641
2641
|
}
|
2642
2642
|
/**
|
2643
2643
|
* @typedef {Object} WeekSettings
|
@@ -2649,7 +2649,7 @@ class I {
|
|
2649
2649
|
* @return {WeekSettings|null}
|
2650
2650
|
*/
|
2651
2651
|
static get defaultWeekSettings() {
|
2652
|
-
return
|
2652
|
+
return gs;
|
2653
2653
|
}
|
2654
2654
|
/**
|
2655
2655
|
* Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
|
@@ -2659,14 +2659,14 @@ class I {
|
|
2659
2659
|
* @param {WeekSettings|null} weekSettings
|
2660
2660
|
*/
|
2661
2661
|
static set defaultWeekSettings(e) {
|
2662
|
-
|
2662
|
+
gs = pn(e);
|
2663
2663
|
}
|
2664
2664
|
/**
|
2665
2665
|
* Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
|
2666
2666
|
* @type {number}
|
2667
2667
|
*/
|
2668
2668
|
static get twoDigitCutoffYear() {
|
2669
|
-
return
|
2669
|
+
return ps;
|
2670
2670
|
}
|
2671
2671
|
/**
|
2672
2672
|
* Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
|
@@ -2678,21 +2678,21 @@ class I {
|
|
2678
2678
|
* @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
|
2679
2679
|
*/
|
2680
2680
|
static set twoDigitCutoffYear(e) {
|
2681
|
-
|
2681
|
+
ps = e % 100;
|
2682
2682
|
}
|
2683
2683
|
/**
|
2684
2684
|
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
2685
2685
|
* @type {boolean}
|
2686
2686
|
*/
|
2687
2687
|
static get throwOnInvalid() {
|
2688
|
-
return
|
2688
|
+
return ys;
|
2689
2689
|
}
|
2690
2690
|
/**
|
2691
2691
|
* Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
|
2692
2692
|
* @type {boolean}
|
2693
2693
|
*/
|
2694
2694
|
static set throwOnInvalid(e) {
|
2695
|
-
|
2695
|
+
ys = e;
|
2696
2696
|
}
|
2697
2697
|
/**
|
2698
2698
|
* Reset Luxon's global caches. Should only be necessary in testing scenarios.
|
@@ -2710,50 +2710,50 @@ class re {
|
|
2710
2710
|
return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
|
2711
2711
|
}
|
2712
2712
|
}
|
2713
|
-
const
|
2713
|
+
const Vr = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], Br = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
|
2714
2714
|
function K(t, e) {
|
2715
2715
|
return new re(
|
2716
2716
|
"unit out of range",
|
2717
2717
|
`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
|
2718
2718
|
);
|
2719
2719
|
}
|
2720
|
-
function
|
2720
|
+
function An(t, e, n) {
|
2721
2721
|
const s = new Date(Date.UTC(t, e - 1, n));
|
2722
2722
|
t < 100 && t >= 0 && s.setUTCFullYear(s.getUTCFullYear() - 1900);
|
2723
2723
|
const r = s.getUTCDay();
|
2724
2724
|
return r === 0 ? 7 : r;
|
2725
2725
|
}
|
2726
|
-
function
|
2727
|
-
return n + (st(t) ?
|
2726
|
+
function $r(t, e, n) {
|
2727
|
+
return n + (st(t) ? Br : Vr)[e - 1];
|
2728
2728
|
}
|
2729
|
-
function
|
2730
|
-
const n = st(t) ?
|
2729
|
+
function Ur(t, e) {
|
2730
|
+
const n = st(t) ? Br : Vr, s = n.findIndex((i) => i < e), r = e - n[s];
|
2731
2731
|
return { month: s + 1, day: r };
|
2732
2732
|
}
|
2733
|
-
function
|
2733
|
+
function Mn(t, e) {
|
2734
2734
|
return (t - e + 7) % 7 + 1;
|
2735
2735
|
}
|
2736
2736
|
function At(t, e = 4, n = 1) {
|
2737
|
-
const { year: s, month: r, day: i } = t, o =
|
2737
|
+
const { year: s, month: r, day: i } = t, o = $r(s, r, i), a = Mn(An(s, r, i), n);
|
2738
2738
|
let u = Math.floor((o - a + 14 - e) / 7), c;
|
2739
2739
|
return u < 1 ? (c = s - 1, u = Qe(c, e, n)) : u > Qe(s, e, n) ? (c = s + 1, u = 1) : c = s, { weekYear: c, weekNumber: u, weekday: a, ...Wt(t) };
|
2740
2740
|
}
|
2741
|
-
function
|
2742
|
-
const { weekYear: s, weekNumber: r, weekday: i } = t, o =
|
2741
|
+
function ws(t, e = 4, n = 1) {
|
2742
|
+
const { weekYear: s, weekNumber: r, weekday: i } = t, o = Mn(An(s, 1, e), n), a = Re(s);
|
2743
2743
|
let u = r * 7 + i - o - 7 + e, c;
|
2744
2744
|
u < 1 ? (c = s - 1, u += Re(c)) : u > a ? (c = s + 1, u -= Re(s)) : c = s;
|
2745
|
-
const { month: l, day: h } =
|
2745
|
+
const { month: l, day: h } = Ur(c, u);
|
2746
2746
|
return { year: c, month: l, day: h, ...Wt(t) };
|
2747
2747
|
}
|
2748
2748
|
function Xt(t) {
|
2749
|
-
const { year: e, month: n, day: s } = t, r =
|
2749
|
+
const { year: e, month: n, day: s } = t, r = $r(e, n, s);
|
2750
2750
|
return { year: e, ordinal: r, ...Wt(t) };
|
2751
2751
|
}
|
2752
|
-
function
|
2753
|
-
const { year: e, ordinal: n } = t, { month: s, day: r } =
|
2752
|
+
function Ss(t) {
|
2753
|
+
const { year: e, ordinal: n } = t, { month: s, day: r } = Ur(e, n);
|
2754
2754
|
return { year: e, month: s, day: r, ...Wt(t) };
|
2755
2755
|
}
|
2756
|
-
function
|
2756
|
+
function vs(t, e) {
|
2757
2757
|
if (!k(t.localWeekday) || !k(t.localWeekNumber) || !k(t.localWeekYear)) {
|
2758
2758
|
if (!k(t.weekday) || !k(t.weekNumber) || !k(t.weekYear))
|
2759
2759
|
throw new Ae(
|
@@ -2778,11 +2778,11 @@ function cc(t) {
|
|
2778
2778
|
const e = $t(t.year), n = X(t.ordinal, 1, Re(t.year));
|
2779
2779
|
return e ? n ? !1 : K("ordinal", t.ordinal) : K("year", t.year);
|
2780
2780
|
}
|
2781
|
-
function
|
2781
|
+
function Pr(t) {
|
2782
2782
|
const e = $t(t.year), n = X(t.month, 1, 12), s = X(t.day, 1, Mt(t.year, t.month));
|
2783
2783
|
return e ? n ? s ? !1 : K("day", t.day) : K("month", t.month) : K("year", t.year);
|
2784
2784
|
}
|
2785
|
-
function
|
2785
|
+
function Wr(t) {
|
2786
2786
|
const { hour: e, minute: n, second: s, millisecond: r } = t, i = X(e, 0, 23) || e === 24 && n === 0 && s === 0 && r === 0, o = X(n, 0, 59), a = X(s, 0, 59), u = X(r, 0, 999);
|
2787
2787
|
return i ? o ? a ? u ? !1 : K("millisecond", r) : K("second", s) : K("minute", n) : K("hour", e);
|
2788
2788
|
}
|
@@ -2801,14 +2801,14 @@ function uc(t) {
|
|
2801
2801
|
function lc(t) {
|
2802
2802
|
return Object.prototype.toString.call(t) === "[object Date]";
|
2803
2803
|
}
|
2804
|
-
function
|
2804
|
+
function qr() {
|
2805
2805
|
try {
|
2806
2806
|
return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
|
2807
2807
|
} catch {
|
2808
2808
|
return !1;
|
2809
2809
|
}
|
2810
2810
|
}
|
2811
|
-
function
|
2811
|
+
function Hr() {
|
2812
2812
|
try {
|
2813
2813
|
return typeof Intl < "u" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
|
2814
2814
|
} catch {
|
@@ -2818,7 +2818,7 @@ function zr() {
|
|
2818
2818
|
function fc(t) {
|
2819
2819
|
return Array.isArray(t) ? t : [t];
|
2820
2820
|
}
|
2821
|
-
function
|
2821
|
+
function ks(t, e, n) {
|
2822
2822
|
if (t.length !== 0)
|
2823
2823
|
return t.reduce((s, r) => {
|
2824
2824
|
const i = [e(r), r];
|
@@ -2831,7 +2831,7 @@ function hc(t, e) {
|
|
2831
2831
|
function Le(t, e) {
|
2832
2832
|
return Object.prototype.hasOwnProperty.call(t, e);
|
2833
2833
|
}
|
2834
|
-
function
|
2834
|
+
function pn(t) {
|
2835
2835
|
if (t == null)
|
2836
2836
|
return null;
|
2837
2837
|
if (typeof t != "object")
|
@@ -2863,13 +2863,13 @@ function ve(t) {
|
|
2863
2863
|
if (!(k(t) || t === null || t === ""))
|
2864
2864
|
return parseFloat(t);
|
2865
2865
|
}
|
2866
|
-
function
|
2866
|
+
function Rn(t) {
|
2867
2867
|
if (!(k(t) || t === null || t === "")) {
|
2868
2868
|
const e = parseFloat("0." + t) * 1e3;
|
2869
2869
|
return Math.floor(e);
|
2870
2870
|
}
|
2871
2871
|
}
|
2872
|
-
function
|
2872
|
+
function In(t, e, n = !1) {
|
2873
2873
|
const s = 10 ** e;
|
2874
2874
|
return (n ? Math.trunc : Math.round)(t * s) / s;
|
2875
2875
|
}
|
@@ -2895,17 +2895,17 @@ function Ut(t) {
|
|
2895
2895
|
);
|
2896
2896
|
return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e;
|
2897
2897
|
}
|
2898
|
-
function
|
2899
|
-
return -
|
2898
|
+
function bs(t, e, n) {
|
2899
|
+
return -Mn(An(t, 1, e), n) + e - 1;
|
2900
2900
|
}
|
2901
2901
|
function Qe(t, e = 4, n = 1) {
|
2902
|
-
const s =
|
2902
|
+
const s = bs(t, e, n), r = bs(t + 1, e, n);
|
2903
2903
|
return (Re(t) - s + r) / 7;
|
2904
2904
|
}
|
2905
|
-
function
|
2905
|
+
function yn(t) {
|
2906
2906
|
return t > 99 ? t : t > I.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
|
2907
2907
|
}
|
2908
|
-
function
|
2908
|
+
function zr(t, e, n, s = null) {
|
2909
2909
|
const r = new Date(t), i = {
|
2910
2910
|
hourCycle: "h23",
|
2911
2911
|
year: "numeric",
|
@@ -2924,7 +2924,7 @@ function Pt(t, e) {
|
|
2924
2924
|
const s = parseInt(e, 10) || 0, r = n < 0 || Object.is(n, -0) ? -s : s;
|
2925
2925
|
return n * 60 + r;
|
2926
2926
|
}
|
2927
|
-
function
|
2927
|
+
function Zr(t) {
|
2928
2928
|
const e = Number(t);
|
2929
2929
|
if (typeof t == "boolean" || t === "" || Number.isNaN(e))
|
2930
2930
|
throw new q(`Invalid unit value ${t}`);
|
@@ -2936,7 +2936,7 @@ function Rt(t, e) {
|
|
2936
2936
|
if (Le(t, s)) {
|
2937
2937
|
const r = t[s];
|
2938
2938
|
if (r == null) continue;
|
2939
|
-
n[e(s)] =
|
2939
|
+
n[e(s)] = Zr(r);
|
2940
2940
|
}
|
2941
2941
|
return n;
|
2942
2942
|
}
|
@@ -2969,7 +2969,7 @@ const mc = [
|
|
2969
2969
|
"October",
|
2970
2970
|
"November",
|
2971
2971
|
"December"
|
2972
|
-
],
|
2972
|
+
], jr = [
|
2973
2973
|
"Jan",
|
2974
2974
|
"Feb",
|
2975
2975
|
"Mar",
|
@@ -2983,12 +2983,12 @@ const mc = [
|
|
2983
2983
|
"Nov",
|
2984
2984
|
"Dec"
|
2985
2985
|
], pc = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
|
2986
|
-
function
|
2986
|
+
function Yr(t) {
|
2987
2987
|
switch (t) {
|
2988
2988
|
case "narrow":
|
2989
2989
|
return [...pc];
|
2990
2990
|
case "short":
|
2991
|
-
return [...
|
2991
|
+
return [...jr];
|
2992
2992
|
case "long":
|
2993
2993
|
return [...mc];
|
2994
2994
|
case "numeric":
|
@@ -2999,7 +2999,7 @@ function Jr(t) {
|
|
2999
2999
|
return null;
|
3000
3000
|
}
|
3001
3001
|
}
|
3002
|
-
const
|
3002
|
+
const Jr = [
|
3003
3003
|
"Monday",
|
3004
3004
|
"Tuesday",
|
3005
3005
|
"Wednesday",
|
@@ -3007,23 +3007,23 @@ const Gr = [
|
|
3007
3007
|
"Friday",
|
3008
3008
|
"Saturday",
|
3009
3009
|
"Sunday"
|
3010
|
-
],
|
3011
|
-
function
|
3010
|
+
], Gr = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], yc = ["M", "T", "W", "T", "F", "S", "S"];
|
3011
|
+
function Kr(t) {
|
3012
3012
|
switch (t) {
|
3013
3013
|
case "narrow":
|
3014
3014
|
return [...yc];
|
3015
3015
|
case "short":
|
3016
|
-
return [...Kr];
|
3017
|
-
case "long":
|
3018
3016
|
return [...Gr];
|
3017
|
+
case "long":
|
3018
|
+
return [...Jr];
|
3019
3019
|
case "numeric":
|
3020
3020
|
return ["1", "2", "3", "4", "5", "6", "7"];
|
3021
3021
|
default:
|
3022
3022
|
return null;
|
3023
3023
|
}
|
3024
3024
|
}
|
3025
|
-
const
|
3026
|
-
function
|
3025
|
+
const Xr = ["AM", "PM"], gc = ["Before Christ", "Anno Domini"], wc = ["BC", "AD"], Sc = ["B", "A"];
|
3026
|
+
function Qr(t) {
|
3027
3027
|
switch (t) {
|
3028
3028
|
case "narrow":
|
3029
3029
|
return [...Sc];
|
@@ -3036,16 +3036,16 @@ function ei(t) {
|
|
3036
3036
|
}
|
3037
3037
|
}
|
3038
3038
|
function vc(t) {
|
3039
|
-
return
|
3039
|
+
return Xr[t.hour < 12 ? 0 : 1];
|
3040
3040
|
}
|
3041
3041
|
function kc(t, e) {
|
3042
|
-
return
|
3042
|
+
return Kr(e)[t.weekday - 1];
|
3043
3043
|
}
|
3044
3044
|
function bc(t, e) {
|
3045
|
-
return
|
3045
|
+
return Yr(e)[t.month - 1];
|
3046
3046
|
}
|
3047
3047
|
function Tc(t, e) {
|
3048
|
-
return
|
3048
|
+
return Qr(e)[t.year < 0 ? 0 : 1];
|
3049
3049
|
}
|
3050
3050
|
function Ec(t, e, n = "always", s = !1) {
|
3051
3051
|
const r = {
|
@@ -3072,7 +3072,7 @@ function Ec(t, e, n = "always", s = !1) {
|
|
3072
3072
|
const o = Object.is(e, -0) || e < 0, a = Math.abs(e), u = a === 1, c = r[t], l = s ? u ? c[1] : c[2] || c[1] : u ? r[t][0] : t;
|
3073
3073
|
return o ? `${a} ${l} ago` : `in ${a} ${l}`;
|
3074
3074
|
}
|
3075
|
-
function
|
3075
|
+
function Ts(t, e) {
|
3076
3076
|
let n = "";
|
3077
3077
|
for (const s of t)
|
3078
3078
|
s.literal ? n += s.val : n += e(s.val);
|
@@ -3080,25 +3080,25 @@ function Os(t, e) {
|
|
3080
3080
|
}
|
3081
3081
|
const Oc = {
|
3082
3082
|
D: _t,
|
3083
|
-
DD:
|
3084
|
-
DDD:
|
3085
|
-
DDDD:
|
3086
|
-
t:
|
3087
|
-
tt:
|
3088
|
-
ttt:
|
3089
|
-
tttt:
|
3090
|
-
T:
|
3091
|
-
TT:
|
3092
|
-
TTT:
|
3093
|
-
TTTT:
|
3094
|
-
f:
|
3095
|
-
ff:
|
3096
|
-
fff:
|
3097
|
-
ffff:
|
3098
|
-
F:
|
3099
|
-
FF:
|
3100
|
-
FFF:
|
3101
|
-
FFFF:
|
3083
|
+
DD: wr,
|
3084
|
+
DDD: Sr,
|
3085
|
+
DDDD: vr,
|
3086
|
+
t: kr,
|
3087
|
+
tt: br,
|
3088
|
+
ttt: Tr,
|
3089
|
+
tttt: Er,
|
3090
|
+
T: Or,
|
3091
|
+
TT: Cr,
|
3092
|
+
TTT: xr,
|
3093
|
+
TTTT: Nr,
|
3094
|
+
f: _r,
|
3095
|
+
ff: Mr,
|
3096
|
+
fff: Ir,
|
3097
|
+
ffff: Lr,
|
3098
|
+
F: Ar,
|
3099
|
+
FF: Rr,
|
3100
|
+
FFF: Dr,
|
3101
|
+
FFFF: Fr
|
3102
3102
|
};
|
3103
3103
|
class H {
|
3104
3104
|
static create(e, n = {}) {
|
@@ -3277,7 +3277,7 @@ class H {
|
|
3277
3277
|
return l(m);
|
3278
3278
|
}
|
3279
3279
|
};
|
3280
|
-
return
|
3280
|
+
return Ts(H.parseFormat(n), y);
|
3281
3281
|
}
|
3282
3282
|
formatDurationFromString(e, n) {
|
3283
3283
|
const s = (u) => {
|
@@ -3308,10 +3308,10 @@ class H {
|
|
3308
3308
|
(u, { literal: c, val: l }) => c ? u : u.concat(l),
|
3309
3309
|
[]
|
3310
3310
|
), a = e.shiftTo(...o.map(s).filter((u) => u));
|
3311
|
-
return
|
3311
|
+
return Ts(i, r(a));
|
3312
3312
|
}
|
3313
3313
|
}
|
3314
|
-
const
|
3314
|
+
const ei = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
3315
3315
|
function Be(...t) {
|
3316
3316
|
const e = t.reduce((n, s) => n + s.source, "");
|
3317
3317
|
return RegExp(`^${e}$`);
|
@@ -3335,7 +3335,7 @@ function Ue(t, ...e) {
|
|
3335
3335
|
}
|
3336
3336
|
return [null, null];
|
3337
3337
|
}
|
3338
|
-
function
|
3338
|
+
function ti(...t) {
|
3339
3339
|
return (e, n) => {
|
3340
3340
|
const s = {};
|
3341
3341
|
let r;
|
@@ -3344,9 +3344,9 @@ function ni(...t) {
|
|
3344
3344
|
return [s, null, n + r];
|
3345
3345
|
};
|
3346
3346
|
}
|
3347
|
-
const
|
3348
|
-
`${
|
3349
|
-
), Ic = RegExp(`(?: ${
|
3347
|
+
const ni = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Cc = `(?:${ni.source}?(?:\\[(${ei.source})\\])?)?`, Dn = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, si = RegExp(`${Dn.source}${Cc}`), Ln = RegExp(`(?:T${si.source})?`), xc = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Nc = /(\d{4})-?W(\d\d)(?:-?(\d))?/, _c = /(\d{4})-?(\d{3})/, Ac = ti("weekYear", "weekNumber", "weekDay"), Mc = ti("year", "ordinal"), Rc = /(\d{4})-(\d\d)-(\d\d)/, ri = RegExp(
|
3348
|
+
`${Dn.source} ?(?:${ni.source}|(${ei.source}))?`
|
3349
|
+
), Ic = RegExp(`(?: ${ri.source})?`);
|
3350
3350
|
function Ie(t, e, n) {
|
3351
3351
|
const s = t[e];
|
3352
3352
|
return k(s) ? n : ge(s);
|
@@ -3363,7 +3363,7 @@ function Pe(t, e) {
|
|
3363
3363
|
hours: Ie(t, e, 0),
|
3364
3364
|
minutes: Ie(t, e + 1, 0),
|
3365
3365
|
seconds: Ie(t, e + 2, 0),
|
3366
|
-
milliseconds:
|
3366
|
+
milliseconds: Rn(t[e + 3])
|
3367
3367
|
}, null, e + 4];
|
3368
3368
|
}
|
3369
3369
|
function rt(t, e) {
|
@@ -3374,7 +3374,7 @@ function it(t, e) {
|
|
3374
3374
|
const n = t[e] ? de.create(t[e]) : null;
|
3375
3375
|
return [{}, n, e + 1];
|
3376
3376
|
}
|
3377
|
-
const Lc = RegExp(`^T?${
|
3377
|
+
const Lc = RegExp(`^T?${Dn.source}$`), Fc = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
3378
3378
|
function Vc(t) {
|
3379
3379
|
const [e, n, s, r, i, o, a, u, c] = t, l = e[0] === "-", h = u && u[0] === "-", y = (m, d = !1) => m !== void 0 && (d || m && l) ? -m : m;
|
3380
3380
|
return [
|
@@ -3386,7 +3386,7 @@ function Vc(t) {
|
|
3386
3386
|
hours: y(ve(o)),
|
3387
3387
|
minutes: y(ve(a)),
|
3388
3388
|
seconds: y(ve(u), u === "-0"),
|
3389
|
-
milliseconds: y(
|
3389
|
+
milliseconds: y(Rn(c), h)
|
3390
3390
|
}
|
3391
3391
|
];
|
3392
3392
|
}
|
@@ -3401,15 +3401,15 @@ const Bc = {
|
|
3401
3401
|
PDT: -7 * 60,
|
3402
3402
|
PST: -8 * 60
|
3403
3403
|
};
|
3404
|
-
function
|
3404
|
+
function Fn(t, e, n, s, r, i, o) {
|
3405
3405
|
const a = {
|
3406
|
-
year: e.length === 2 ?
|
3407
|
-
month:
|
3406
|
+
year: e.length === 2 ? yn(ge(e)) : ge(e),
|
3407
|
+
month: jr.indexOf(n) + 1,
|
3408
3408
|
day: ge(s),
|
3409
3409
|
hour: ge(r),
|
3410
3410
|
minute: ge(i)
|
3411
3411
|
};
|
3412
|
-
return o && (a.second = ge(o)), t && (a.weekday = t.length > 3 ?
|
3412
|
+
return o && (a.second = ge(o)), t && (a.weekday = t.length > 3 ? Jr.indexOf(t) + 1 : Gr.indexOf(t) + 1), a;
|
3413
3413
|
}
|
3414
3414
|
const $c = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
|
3415
3415
|
function Uc(t) {
|
@@ -3426,7 +3426,7 @@ function Uc(t) {
|
|
3426
3426
|
c,
|
3427
3427
|
l,
|
3428
3428
|
h
|
3429
|
-
] = t, y =
|
3429
|
+
] = t, y = Fn(e, r, s, n, i, o, a);
|
3430
3430
|
let m;
|
3431
3431
|
return u ? m = Bc[u] : c ? m = 0 : m = Pt(l, h), [y, new Z(m)];
|
3432
3432
|
}
|
@@ -3434,15 +3434,15 @@ function Pc(t) {
|
|
3434
3434
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
3435
3435
|
}
|
3436
3436
|
const Wc = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, qc = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, Hc = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
3437
|
-
function
|
3437
|
+
function Es(t) {
|
3438
3438
|
const [, e, n, s, r, i, o, a] = t;
|
3439
|
-
return [
|
3439
|
+
return [Fn(e, r, s, n, i, o, a), Z.utcInstance];
|
3440
3440
|
}
|
3441
3441
|
function zc(t) {
|
3442
3442
|
const [, e, n, s, r, i, o, a] = t;
|
3443
|
-
return [
|
3443
|
+
return [Fn(e, a, n, s, r, i, o), Z.utcInstance];
|
3444
3444
|
}
|
3445
|
-
const Zc = Be(xc,
|
3445
|
+
const Zc = Be(xc, Ln), jc = Be(Nc, Ln), Yc = Be(_c, Ln), Jc = Be(si), ii = $e(
|
3446
3446
|
Dc,
|
3447
3447
|
Pe,
|
3448
3448
|
rt,
|
@@ -3465,7 +3465,7 @@ const Zc = Be(xc, Fn), jc = Be(Nc, Fn), Yc = Be(_c, Fn), Jc = Be(ri), oi = $e(
|
|
3465
3465
|
function Qc(t) {
|
3466
3466
|
return Ue(
|
3467
3467
|
t,
|
3468
|
-
[Zc,
|
3468
|
+
[Zc, ii],
|
3469
3469
|
[jc, Gc],
|
3470
3470
|
[Yc, Kc],
|
3471
3471
|
[Jc, Xc]
|
@@ -3477,8 +3477,8 @@ function eu(t) {
|
|
3477
3477
|
function tu(t) {
|
3478
3478
|
return Ue(
|
3479
3479
|
t,
|
3480
|
-
[Wc,
|
3481
|
-
[qc,
|
3480
|
+
[Wc, Es],
|
3481
|
+
[qc, Es],
|
3482
3482
|
[Hc, zc]
|
3483
3483
|
);
|
3484
3484
|
}
|
@@ -3489,7 +3489,7 @@ const su = $e(Pe);
|
|
3489
3489
|
function ru(t) {
|
3490
3490
|
return Ue(t, [Lc, su]);
|
3491
3491
|
}
|
3492
|
-
const iu = Be(Rc, Ic), ou = Be(
|
3492
|
+
const iu = Be(Rc, Ic), ou = Be(ri), au = $e(
|
3493
3493
|
Pe,
|
3494
3494
|
rt,
|
3495
3495
|
it
|
@@ -3497,11 +3497,11 @@ const iu = Be(Rc, Ic), ou = Be(ii), au = $e(
|
|
3497
3497
|
function cu(t) {
|
3498
3498
|
return Ue(
|
3499
3499
|
t,
|
3500
|
-
[iu,
|
3500
|
+
[iu, ii],
|
3501
3501
|
[ou, au]
|
3502
3502
|
);
|
3503
3503
|
}
|
3504
|
-
const
|
3504
|
+
const Os = "Invalid Duration", oi = {
|
3505
3505
|
weeks: {
|
3506
3506
|
days: 7,
|
3507
3507
|
hours: 7 * 24,
|
@@ -3546,7 +3546,7 @@ const xs = "Invalid Duration", ai = {
|
|
3546
3546
|
seconds: 30 * 24 * 60 * 60,
|
3547
3547
|
milliseconds: 30 * 24 * 60 * 60 * 1e3
|
3548
3548
|
},
|
3549
|
-
...
|
3549
|
+
...oi
|
3550
3550
|
}, J = 146097 / 400, Oe = 146097 / 4800, lu = {
|
3551
3551
|
years: {
|
3552
3552
|
quarters: 4,
|
@@ -3575,7 +3575,7 @@ const xs = "Invalid Duration", ai = {
|
|
3575
3575
|
seconds: Oe * 24 * 60 * 60,
|
3576
3576
|
milliseconds: Oe * 24 * 60 * 60 * 1e3
|
3577
3577
|
},
|
3578
|
-
...
|
3578
|
+
...oi
|
3579
3579
|
}, be = [
|
3580
3580
|
"years",
|
3581
3581
|
"quarters",
|
@@ -3596,14 +3596,14 @@ function ye(t, e, n = !1) {
|
|
3596
3596
|
};
|
3597
3597
|
return new O(s);
|
3598
3598
|
}
|
3599
|
-
function
|
3599
|
+
function ai(t, e) {
|
3600
3600
|
let n = e.milliseconds ?? 0;
|
3601
3601
|
for (const s of fu.slice(1))
|
3602
3602
|
e[s] && (n += e[s] * t[s].milliseconds);
|
3603
3603
|
return n;
|
3604
3604
|
}
|
3605
|
-
function
|
3606
|
-
const n =
|
3605
|
+
function Cs(t, e) {
|
3606
|
+
const n = ai(t, e) < 0 ? -1 : 1;
|
3607
3607
|
be.reduceRight((s, r) => {
|
3608
3608
|
if (k(e[r]))
|
3609
3609
|
return s;
|
@@ -3778,7 +3778,7 @@ class O {
|
|
3778
3778
|
millisecond: "milliseconds",
|
3779
3779
|
milliseconds: "milliseconds"
|
3780
3780
|
}[e && e.toLowerCase()];
|
3781
|
-
if (!n) throw new
|
3781
|
+
if (!n) throw new gr(e);
|
3782
3782
|
return n;
|
3783
3783
|
}
|
3784
3784
|
/**
|
@@ -3831,7 +3831,7 @@ class O {
|
|
3831
3831
|
...n,
|
3832
3832
|
floor: n.round !== !1 && n.floor !== !1
|
3833
3833
|
};
|
3834
|
-
return this.isValid ? H.create(this.loc, s).formatDurationFromString(this, e) :
|
3834
|
+
return this.isValid ? H.create(this.loc, s).formatDurationFromString(this, e) : Os;
|
3835
3835
|
}
|
3836
3836
|
/**
|
3837
3837
|
* Returns a string representation of a Duration with all units included.
|
@@ -3848,7 +3848,7 @@ class O {
|
|
3848
3848
|
* ```
|
3849
3849
|
*/
|
3850
3850
|
toHuman(e = {}) {
|
3851
|
-
if (!this.isValid) return
|
3851
|
+
if (!this.isValid) return Os;
|
3852
3852
|
const n = be.map((s) => {
|
3853
3853
|
const r = this.values[s];
|
3854
3854
|
return k(r) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: s.slice(0, -1) }).format(r);
|
@@ -3876,7 +3876,7 @@ class O {
|
|
3876
3876
|
toISO() {
|
3877
3877
|
if (!this.isValid) return null;
|
3878
3878
|
let e = "P";
|
3879
|
-
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e +=
|
3879
|
+
return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += In(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
|
3880
3880
|
}
|
3881
3881
|
/**
|
3882
3882
|
* Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
|
@@ -3932,7 +3932,7 @@ class O {
|
|
3932
3932
|
* @return {number}
|
3933
3933
|
*/
|
3934
3934
|
toMillis() {
|
3935
|
-
return this.isValid ?
|
3935
|
+
return this.isValid ? ai(this.matrix, this.values) : NaN;
|
3936
3936
|
}
|
3937
3937
|
/**
|
3938
3938
|
* Returns an milliseconds value of this Duration. Alias of {@link toMillis}
|
@@ -3974,7 +3974,7 @@ class O {
|
|
3974
3974
|
if (!this.isValid) return this;
|
3975
3975
|
const n = {};
|
3976
3976
|
for (const s of Object.keys(this.values))
|
3977
|
-
n[s] =
|
3977
|
+
n[s] = Zr(e(this.values[s], s));
|
3978
3978
|
return ye(this, { values: n }, !0);
|
3979
3979
|
}
|
3980
3980
|
/**
|
@@ -4038,7 +4038,7 @@ class O {
|
|
4038
4038
|
normalize() {
|
4039
4039
|
if (!this.isValid) return this;
|
4040
4040
|
const e = this.toObject();
|
4041
|
-
return
|
4041
|
+
return Cs(this.matrix, e), ye(this, { values: e }, !0);
|
4042
4042
|
}
|
4043
4043
|
/**
|
4044
4044
|
* Rescale units to its largest representation
|
@@ -4074,7 +4074,7 @@ class O {
|
|
4074
4074
|
} else Se(r[o]) && (s[o] = r[o]);
|
4075
4075
|
for (const o in s)
|
4076
4076
|
s[o] !== 0 && (n[i] += o === i ? s[o] : s[o] / this.matrix[i][o]);
|
4077
|
-
return
|
4077
|
+
return Cs(this.matrix, n), ye(this, { values: n }, !0);
|
4078
4078
|
}
|
4079
4079
|
/**
|
4080
4080
|
* Shift this Duration to all available units.
|
@@ -4832,10 +4832,10 @@ class lt {
|
|
4832
4832
|
* @return {Object}
|
4833
4833
|
*/
|
4834
4834
|
static features() {
|
4835
|
-
return { relative:
|
4835
|
+
return { relative: qr(), localeWeek: Hr() };
|
4836
4836
|
}
|
4837
4837
|
}
|
4838
|
-
function
|
4838
|
+
function xs(t, e) {
|
4839
4839
|
const n = (r) => r.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), s = n(e) - n(t);
|
4840
4840
|
return Math.floor(O.fromMillis(s).as("days"));
|
4841
4841
|
}
|
@@ -4847,11 +4847,11 @@ function mu(t, e, n) {
|
|
4847
4847
|
[
|
4848
4848
|
"weeks",
|
4849
4849
|
(u, c) => {
|
4850
|
-
const l =
|
4850
|
+
const l = xs(u, c);
|
4851
4851
|
return (l - l % 7) / 7;
|
4852
4852
|
}
|
4853
4853
|
],
|
4854
|
-
["days",
|
4854
|
+
["days", xs]
|
4855
4855
|
], r = {}, i = t;
|
4856
4856
|
let o, a;
|
4857
4857
|
for (const [u, c] of s)
|
@@ -4871,20 +4871,20 @@ const yu = "missing Intl.DateTimeFormat.formatToParts support";
|
|
4871
4871
|
function x(t, e = (n) => n) {
|
4872
4872
|
return { regex: t, deser: ([n]) => e(ic(n)) };
|
4873
4873
|
}
|
4874
|
-
const gu = " ",
|
4874
|
+
const gu = " ", ci = `[ ${gu}]`, ui = new RegExp(ci, "g");
|
4875
4875
|
function wu(t) {
|
4876
|
-
return t.replace(/\./g, "\\.?").replace(
|
4876
|
+
return t.replace(/\./g, "\\.?").replace(ui, ci);
|
4877
4877
|
}
|
4878
|
-
function
|
4879
|
-
return t.replace(/\./g, "").replace(
|
4878
|
+
function Ns(t) {
|
4879
|
+
return t.replace(/\./g, "").replace(ui, " ").toLowerCase();
|
4880
4880
|
}
|
4881
4881
|
function ne(t, e) {
|
4882
4882
|
return t === null ? null : {
|
4883
4883
|
regex: RegExp(t.map(wu).join("|")),
|
4884
|
-
deser: ([n]) => t.findIndex((s) =>
|
4884
|
+
deser: ([n]) => t.findIndex((s) => Ns(n) === Ns(s)) + e
|
4885
4885
|
};
|
4886
4886
|
}
|
4887
|
-
function
|
4887
|
+
function _s(t, e) {
|
4888
4888
|
return { regex: t, deser: ([, n, s]) => Pt(n, s), groups: e };
|
4889
4889
|
}
|
4890
4890
|
function ft(t) {
|
@@ -4905,7 +4905,7 @@ function vu(t, e) {
|
|
4905
4905
|
case "y":
|
4906
4906
|
return x(c);
|
4907
4907
|
case "yy":
|
4908
|
-
return x(h,
|
4908
|
+
return x(h, yn);
|
4909
4909
|
case "yyyy":
|
4910
4910
|
return x(i);
|
4911
4911
|
case "yyyyy":
|
@@ -4971,7 +4971,7 @@ function vu(t, e) {
|
|
4971
4971
|
case "kkkk":
|
4972
4972
|
return x(i);
|
4973
4973
|
case "kk":
|
4974
|
-
return x(h,
|
4974
|
+
return x(h, yn);
|
4975
4975
|
case "W":
|
4976
4976
|
return x(a);
|
4977
4977
|
case "WW":
|
@@ -4989,9 +4989,9 @@ function vu(t, e) {
|
|
4989
4989
|
return ne(e.weekdays("long", !0), 1);
|
4990
4990
|
case "Z":
|
4991
4991
|
case "ZZ":
|
4992
|
-
return
|
4992
|
+
return _s(new RegExp(`([+-]${a.source})(?::(${s.source}))?`), 2);
|
4993
4993
|
case "ZZZ":
|
4994
|
-
return
|
4994
|
+
return _s(new RegExp(`([+-]${a.source})(${s.source})?`), 2);
|
4995
4995
|
case "z":
|
4996
4996
|
return ft(/[a-z_+-/]{1,256}?/i);
|
4997
4997
|
case " ":
|
@@ -5117,7 +5117,7 @@ function Ou(t) {
|
|
5117
5117
|
}
|
5118
5118
|
};
|
5119
5119
|
let n = null, s;
|
5120
|
-
return k(t.z) || (n = de.create(t.z)), k(t.Z) || (n || (n = new Z(t.Z)), s = t.Z), k(t.q) || (t.M = (t.q - 1) * 3 + 1), k(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), k(t.u) || (t.S =
|
5120
|
+
return k(t.z) || (n = de.create(t.z)), k(t.Z) || (n || (n = new Z(t.Z)), s = t.Z), k(t.q) || (t.M = (t.q - 1) * 3 + 1), k(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), k(t.u) || (t.S = Rn(t.u)), [Object.keys(t).reduce((i, o) => {
|
5121
5121
|
const a = e(o);
|
5122
5122
|
return a && (i[a] = t[o]), i;
|
5123
5123
|
}, {}), n, s];
|
@@ -5129,15 +5129,15 @@ function Cu() {
|
|
5129
5129
|
function xu(t, e) {
|
5130
5130
|
if (t.literal)
|
5131
5131
|
return t;
|
5132
|
-
const n = H.macroTokenToFormatOpts(t.val), s =
|
5132
|
+
const n = H.macroTokenToFormatOpts(t.val), s = di(n, e);
|
5133
5133
|
return s == null || s.includes(void 0) ? t : s;
|
5134
5134
|
}
|
5135
|
-
function
|
5135
|
+
function li(t, e) {
|
5136
5136
|
return Array.prototype.concat(...t.map((n) => xu(n, e)));
|
5137
5137
|
}
|
5138
|
-
class
|
5138
|
+
class fi {
|
5139
5139
|
constructor(e, n) {
|
5140
|
-
if (this.locale = e, this.format = n, this.tokens =
|
5140
|
+
if (this.locale = e, this.format = n, this.tokens = li(H.parseFormat(n), e), this.units = this.tokens.map((s) => vu(s, e)), this.disqualifyingUnit = this.units.find((s) => s.invalidReason), !this.disqualifyingUnit) {
|
5141
5141
|
const [s, r] = Tu(this.units);
|
5142
5142
|
this.regex = RegExp(s, "i"), this.handlers = r;
|
5143
5143
|
}
|
@@ -5169,20 +5169,20 @@ class hi {
|
|
5169
5169
|
return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
|
5170
5170
|
}
|
5171
5171
|
}
|
5172
|
-
function
|
5173
|
-
return new
|
5172
|
+
function hi(t, e, n) {
|
5173
|
+
return new fi(t, n).explainFromTokens(e);
|
5174
5174
|
}
|
5175
5175
|
function Nu(t, e, n) {
|
5176
|
-
const { result: s, zone: r, specificOffset: i, invalidReason: o } =
|
5176
|
+
const { result: s, zone: r, specificOffset: i, invalidReason: o } = hi(t, e, n);
|
5177
5177
|
return [s, r, i, o];
|
5178
5178
|
}
|
5179
|
-
function
|
5179
|
+
function di(t, e) {
|
5180
5180
|
if (!t)
|
5181
5181
|
return null;
|
5182
5182
|
const s = H.create(e, t).dtFormatter(Cu()), r = s.formatToParts(), i = s.resolvedOptions();
|
5183
5183
|
return r.map((o) => bu(o, t, i));
|
5184
5184
|
}
|
5185
|
-
const en = "Invalid DateTime",
|
5185
|
+
const en = "Invalid DateTime", As = 864e13;
|
5186
5186
|
function Ye(t) {
|
5187
5187
|
return new re("unsupported zone", `the zone "${t.name}" is not supported`);
|
5188
5188
|
}
|
@@ -5207,7 +5207,7 @@ function ke(t, e) {
|
|
5207
5207
|
};
|
5208
5208
|
return new v({ ...n, ...e, old: n });
|
5209
5209
|
}
|
5210
|
-
function
|
5210
|
+
function mi(t, e, n) {
|
5211
5211
|
let s = t - e * 60 * 1e3;
|
5212
5212
|
const r = n.offset(s);
|
5213
5213
|
if (e === r)
|
@@ -5230,9 +5230,9 @@ function ht(t, e) {
|
|
5230
5230
|
};
|
5231
5231
|
}
|
5232
5232
|
function bt(t, e, n) {
|
5233
|
-
return
|
5233
|
+
return mi(Ut(t), e, n);
|
5234
5234
|
}
|
5235
|
-
function
|
5235
|
+
function Ms(t, e) {
|
5236
5236
|
const n = t.o, s = t.c.year + Math.trunc(e.years), r = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, i = {
|
5237
5237
|
...t.c,
|
5238
5238
|
year: s,
|
@@ -5249,7 +5249,7 @@ function Is(t, e) {
|
|
5249
5249
|
seconds: e.seconds,
|
5250
5250
|
milliseconds: e.milliseconds
|
5251
5251
|
}).as("milliseconds"), a = Ut(i);
|
5252
|
-
let [u, c] =
|
5252
|
+
let [u, c] = mi(a, n, t.zone);
|
5253
5253
|
return o !== 0 && (u += o, c = t.zone.offset(u)), { ts: u, o: c };
|
5254
5254
|
}
|
5255
5255
|
function xe(t, e, n, s, r, i) {
|
@@ -5277,11 +5277,11 @@ function sn(t, e) {
|
|
5277
5277
|
let s = "";
|
5278
5278
|
return n && t.c.year >= 0 && (s += "+"), s += D(t.c.year, n ? 6 : 4), e ? (s += "-", s += D(t.c.month), s += "-", s += D(t.c.day)) : (s += D(t.c.month), s += D(t.c.day)), s;
|
5279
5279
|
}
|
5280
|
-
function
|
5280
|
+
function Rs(t, e, n, s, r, i) {
|
5281
5281
|
let o = D(t.c.hour);
|
5282
5282
|
return e ? (o += ":", o += D(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += ":")) : o += D(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += D(t.c.second), (t.c.millisecond !== 0 || !s) && (o += ".", o += D(t.c.millisecond, 3))), r && (t.isOffsetFixed && t.offset === 0 && !i ? o += "Z" : t.o < 0 ? (o += "-", o += D(Math.trunc(-t.o / 60)), o += ":", o += D(Math.trunc(-t.o % 60))) : (o += "+", o += D(Math.trunc(t.o / 60)), o += ":", o += D(Math.trunc(t.o % 60)))), i && (o += "[" + t.zone.ianaName + "]"), o;
|
5283
5283
|
}
|
5284
|
-
const
|
5284
|
+
const pi = {
|
5285
5285
|
month: 1,
|
5286
5286
|
day: 1,
|
5287
5287
|
hour: 0,
|
@@ -5301,7 +5301,7 @@ const yi = {
|
|
5301
5301
|
minute: 0,
|
5302
5302
|
second: 0,
|
5303
5303
|
millisecond: 0
|
5304
|
-
},
|
5304
|
+
}, yi = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Mu = [
|
5305
5305
|
"weekYear",
|
5306
5306
|
"weekNumber",
|
5307
5307
|
"weekday",
|
@@ -5337,10 +5337,10 @@ function Iu(t) {
|
|
5337
5337
|
weekyears: "weekYear",
|
5338
5338
|
ordinal: "ordinal"
|
5339
5339
|
}[t.toLowerCase()];
|
5340
|
-
if (!e) throw new
|
5340
|
+
if (!e) throw new gr(t);
|
5341
5341
|
return e;
|
5342
5342
|
}
|
5343
|
-
function
|
5343
|
+
function Is(t) {
|
5344
5344
|
switch (t.toLowerCase()) {
|
5345
5345
|
case "localweekday":
|
5346
5346
|
case "localweekdays":
|
@@ -5358,7 +5358,7 @@ function Ls(t) {
|
|
5358
5358
|
function Du(t) {
|
5359
5359
|
return Et[t] || (Tt === void 0 && (Tt = I.now()), Et[t] = t.offset(Tt)), Et[t];
|
5360
5360
|
}
|
5361
|
-
function
|
5361
|
+
function Ds(t, e) {
|
5362
5362
|
const n = we(e.zone, I.defaultZone);
|
5363
5363
|
if (!n.isValid)
|
5364
5364
|
return v.invalid(Ye(n));
|
@@ -5367,9 +5367,9 @@ function Fs(t, e) {
|
|
5367
5367
|
if (k(t.year))
|
5368
5368
|
r = I.now();
|
5369
5369
|
else {
|
5370
|
-
for (const u of
|
5371
|
-
k(t[u]) && (t[u] =
|
5372
|
-
const o =
|
5370
|
+
for (const u of yi)
|
5371
|
+
k(t[u]) && (t[u] = pi[u]);
|
5372
|
+
const o = Pr(t) || Wr(t);
|
5373
5373
|
if (o)
|
5374
5374
|
return v.invalid(o);
|
5375
5375
|
const a = Du(n);
|
@@ -5377,8 +5377,8 @@ function Fs(t, e) {
|
|
5377
5377
|
}
|
5378
5378
|
return new v({ ts: r, zone: n, loc: s, o: i });
|
5379
5379
|
}
|
5380
|
-
function
|
5381
|
-
const s = k(n.round) ? !0 : n.round, r = (o, a) => (o =
|
5380
|
+
function Ls(t, e, n) {
|
5381
|
+
const s = k(n.round) ? !0 : n.round, r = (o, a) => (o = In(o, s || n.calendary ? 0 : 2, !0), e.loc.clone(n).relFormatter(n).format(o, a)), i = (o) => n.calendary ? e.hasSame(t, o) ? 0 : e.startOf(o).diff(t.startOf(o), o).get(o) : e.diff(t, o).get(o);
|
5382
5382
|
if (n.unit)
|
5383
5383
|
return r(i(n.unit), n.unit);
|
5384
5384
|
for (const o of n.units) {
|
@@ -5388,7 +5388,7 @@ function Vs(t, e, n) {
|
|
5388
5388
|
}
|
5389
5389
|
return r(t > e ? -0 : 0, n.units[n.units.length - 1]);
|
5390
5390
|
}
|
5391
|
-
function
|
5391
|
+
function Fs(t) {
|
5392
5392
|
let e = {}, n;
|
5393
5393
|
return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
|
5394
5394
|
}
|
@@ -5444,8 +5444,8 @@ class v {
|
|
5444
5444
|
* @return {DateTime}
|
5445
5445
|
*/
|
5446
5446
|
static local() {
|
5447
|
-
const [e, n] =
|
5448
|
-
return
|
5447
|
+
const [e, n] = Fs(arguments), [s, r, i, o, a, u, c] = n;
|
5448
|
+
return Ds({ year: s, month: r, day: i, hour: o, minute: a, second: u, millisecond: c }, e);
|
5449
5449
|
}
|
5450
5450
|
/**
|
5451
5451
|
* Create a DateTime in UTC
|
@@ -5473,8 +5473,8 @@ class v {
|
|
5473
5473
|
* @return {DateTime}
|
5474
5474
|
*/
|
5475
5475
|
static utc() {
|
5476
|
-
const [e, n] =
|
5477
|
-
return e.zone = Z.utcInstance,
|
5476
|
+
const [e, n] = Fs(arguments), [s, r, i, o, a, u, c] = n;
|
5477
|
+
return e.zone = Z.utcInstance, Ds({ year: s, month: r, day: i, hour: o, minute: a, second: u, millisecond: c }, e);
|
5478
5478
|
}
|
5479
5479
|
/**
|
5480
5480
|
* Create a DateTime from a JavaScript Date object. Uses the default zone.
|
@@ -5507,7 +5507,7 @@ class v {
|
|
5507
5507
|
*/
|
5508
5508
|
static fromMillis(e, n = {}) {
|
5509
5509
|
if (Se(e))
|
5510
|
-
return e < -
|
5510
|
+
return e < -As || e > As ? v.invalid("Timestamp out of range") : new v({
|
5511
5511
|
ts: e,
|
5512
5512
|
zone: we(n.zone, I.defaultZone),
|
5513
5513
|
loc: N.fromObject(n)
|
@@ -5574,7 +5574,7 @@ class v {
|
|
5574
5574
|
const s = we(n.zone, I.defaultZone);
|
5575
5575
|
if (!s.isValid)
|
5576
5576
|
return v.invalid(Ye(s));
|
5577
|
-
const r = N.fromObject(n), i = Rt(e,
|
5577
|
+
const r = N.fromObject(n), i = Rt(e, Is), { minDaysInFirstWeek: o, startOfWeek: a } = vs(i, r), u = I.now(), c = k(n.specificOffset) ? s.offset(u) : n.specificOffset, l = !k(i.ordinal), h = !k(i.year), y = !k(i.month) || !k(i.day), m = h || y, d = i.weekYear || i.weekNumber;
|
5578
5578
|
if ((m || l) && d)
|
5579
5579
|
throw new Ae(
|
5580
5580
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -5583,16 +5583,16 @@ class v {
|
|
5583
5583
|
throw new Ae("Can't mix ordinal dates with month/day");
|
5584
5584
|
const w = d || i.weekday && !m;
|
5585
5585
|
let T, _, A = ht(u, c);
|
5586
|
-
w ? (T = Mu, _ = _u, A = At(A, o, a)) : l ? (T = Ru, _ = Au, A = Xt(A)) : (T =
|
5586
|
+
w ? (T = Mu, _ = _u, A = At(A, o, a)) : l ? (T = Ru, _ = Au, A = Xt(A)) : (T = yi, _ = pi);
|
5587
5587
|
let W = !1;
|
5588
5588
|
for (const B of T) {
|
5589
5589
|
const ae = i[B];
|
5590
5590
|
k(ae) ? W ? i[B] = _[B] : i[B] = A[B] : W = !0;
|
5591
5591
|
}
|
5592
|
-
const qe = w ? ac(i, o, a) : l ? cc(i) :
|
5592
|
+
const qe = w ? ac(i, o, a) : l ? cc(i) : Pr(i), S = qe || Wr(i);
|
5593
5593
|
if (S)
|
5594
5594
|
return v.invalid(S);
|
5595
|
-
const E = w ?
|
5595
|
+
const E = w ? ws(i, o, a) : l ? Ss(i) : i, [V, j] = bt(E, c, s), M = new v({
|
5596
5596
|
ts: V,
|
5597
5597
|
zone: s,
|
5598
5598
|
o: j,
|
@@ -5747,7 +5747,7 @@ class v {
|
|
5747
5747
|
* @returns {string}
|
5748
5748
|
*/
|
5749
5749
|
static parseFormatForOpts(e, n = {}) {
|
5750
|
-
const s =
|
5750
|
+
const s = di(e, N.fromObject(n));
|
5751
5751
|
return s ? s.map((r) => r ? r.val : null).join("") : null;
|
5752
5752
|
}
|
5753
5753
|
/**
|
@@ -5758,7 +5758,7 @@ class v {
|
|
5758
5758
|
* @returns {string}
|
5759
5759
|
*/
|
5760
5760
|
static expandFormat(e, n = {}) {
|
5761
|
-
return
|
5761
|
+
return li(H.parseFormat(e), N.fromObject(n)).map((r) => r.val).join("");
|
5762
5762
|
}
|
5763
5763
|
static resetCache() {
|
5764
5764
|
Tt = void 0, Et = {};
|
@@ -6205,7 +6205,7 @@ class v {
|
|
6205
6205
|
*/
|
6206
6206
|
set(e) {
|
6207
6207
|
if (!this.isValid) return this;
|
6208
|
-
const n = Rt(e,
|
6208
|
+
const n = Rt(e, Is), { minDaysInFirstWeek: s, startOfWeek: r } = vs(n, this.loc), i = !k(n.weekYear) || !k(n.weekNumber) || !k(n.weekday), o = !k(n.ordinal), a = !k(n.year), u = !k(n.month) || !k(n.day), c = a || u, l = n.weekYear || n.weekNumber;
|
6209
6209
|
if ((c || o) && l)
|
6210
6210
|
throw new Ae(
|
6211
6211
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -6213,11 +6213,11 @@ class v {
|
|
6213
6213
|
if (u && o)
|
6214
6214
|
throw new Ae("Can't mix ordinal dates with month/day");
|
6215
6215
|
let h;
|
6216
|
-
i ? h =
|
6216
|
+
i ? h = ws(
|
6217
6217
|
{ ...At(this.c, s, r), ...n },
|
6218
6218
|
s,
|
6219
6219
|
r
|
6220
|
-
) : k(n.ordinal) ? (h = { ...this.toObject(), ...n }, k(n.day) && (h.day = Math.min(Mt(h.year, h.month), h.day))) : h =
|
6220
|
+
) : k(n.ordinal) ? (h = { ...this.toObject(), ...n }, k(n.day) && (h.day = Math.min(Mt(h.year, h.month), h.day))) : h = Ss({ ...Xt(this.c), ...n });
|
6221
6221
|
const [y, m] = bt(h, this.o, this.zone);
|
6222
6222
|
return ke(this, { ts: y, o: m });
|
6223
6223
|
}
|
@@ -6237,7 +6237,7 @@ class v {
|
|
6237
6237
|
plus(e) {
|
6238
6238
|
if (!this.isValid) return this;
|
6239
6239
|
const n = O.fromDurationLike(e);
|
6240
|
-
return ke(this,
|
6240
|
+
return ke(this, Ms(this, n));
|
6241
6241
|
}
|
6242
6242
|
/**
|
6243
6243
|
* Subtract a period of time to this DateTime and return the resulting DateTime
|
@@ -6248,7 +6248,7 @@ class v {
|
|
6248
6248
|
minus(e) {
|
6249
6249
|
if (!this.isValid) return this;
|
6250
6250
|
const n = O.fromDurationLike(e).negate();
|
6251
|
-
return ke(this,
|
6251
|
+
return ke(this, Ms(this, n));
|
6252
6252
|
}
|
6253
6253
|
/**
|
6254
6254
|
* "Set" this DateTime to the beginning of a unit of time.
|
@@ -6388,7 +6388,7 @@ class v {
|
|
6388
6388
|
return null;
|
6389
6389
|
const o = e === "extended";
|
6390
6390
|
let a = sn(this, o);
|
6391
|
-
return a += "T", a +=
|
6391
|
+
return a += "T", a += Rs(this, o, n, s, r, i), a;
|
6392
6392
|
}
|
6393
6393
|
/**
|
6394
6394
|
* Returns an ISO 8601-compliant string representation of this DateTime's date component
|
@@ -6432,7 +6432,7 @@ class v {
|
|
6432
6432
|
extendedZone: i = !1,
|
6433
6433
|
format: o = "extended"
|
6434
6434
|
} = {}) {
|
6435
|
-
return this.isValid ? (r ? "T" : "") +
|
6435
|
+
return this.isValid ? (r ? "T" : "") + Rs(
|
6436
6436
|
this,
|
6437
6437
|
o === "extended",
|
6438
6438
|
n,
|
@@ -6664,7 +6664,7 @@ class v {
|
|
6664
6664
|
if (!this.isValid) return null;
|
6665
6665
|
const n = e.base || v.fromObject({}, { zone: this.zone }), s = e.padding ? this < n ? -e.padding : e.padding : 0;
|
6666
6666
|
let r = ["years", "months", "days", "hours", "minutes", "seconds"], i = e.unit;
|
6667
|
-
return Array.isArray(e.unit) && (r = e.unit, i = void 0),
|
6667
|
+
return Array.isArray(e.unit) && (r = e.unit, i = void 0), Ls(n, this.plus(s), {
|
6668
6668
|
...e,
|
6669
6669
|
numeric: "always",
|
6670
6670
|
units: r,
|
@@ -6685,7 +6685,7 @@ class v {
|
|
6685
6685
|
* @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
|
6686
6686
|
*/
|
6687
6687
|
toRelativeCalendar(e = {}) {
|
6688
|
-
return this.isValid ?
|
6688
|
+
return this.isValid ? Ls(e.base || v.fromObject({}, { zone: this.zone }), this, {
|
6689
6689
|
...e,
|
6690
6690
|
numeric: "auto",
|
6691
6691
|
units: ["years", "months", "days"],
|
@@ -6700,7 +6700,7 @@ class v {
|
|
6700
6700
|
static min(...e) {
|
6701
6701
|
if (!e.every(v.isDateTime))
|
6702
6702
|
throw new q("min requires all arguments be DateTimes");
|
6703
|
-
return
|
6703
|
+
return ks(e, (n) => n.valueOf(), Math.min);
|
6704
6704
|
}
|
6705
6705
|
/**
|
6706
6706
|
* Return the max of several date times
|
@@ -6710,7 +6710,7 @@ class v {
|
|
6710
6710
|
static max(...e) {
|
6711
6711
|
if (!e.every(v.isDateTime))
|
6712
6712
|
throw new q("max requires all arguments be DateTimes");
|
6713
|
-
return
|
6713
|
+
return ks(e, (n) => n.valueOf(), Math.max);
|
6714
6714
|
}
|
6715
6715
|
// MISC
|
6716
6716
|
/**
|
@@ -6726,7 +6726,7 @@ class v {
|
|
6726
6726
|
numberingSystem: i,
|
6727
6727
|
defaultToEN: !0
|
6728
6728
|
});
|
6729
|
-
return
|
6729
|
+
return hi(o, e, n);
|
6730
6730
|
}
|
6731
6731
|
/**
|
6732
6732
|
* @deprecated use fromFormatExplain instead
|
@@ -6752,7 +6752,7 @@ class v {
|
|
6752
6752
|
numberingSystem: r,
|
6753
6753
|
defaultToEN: !0
|
6754
6754
|
});
|
6755
|
-
return new
|
6755
|
+
return new fi(i, e);
|
6756
6756
|
}
|
6757
6757
|
/**
|
6758
6758
|
* Create a DateTime from an input string and format parser.
|
@@ -6801,7 +6801,7 @@ class v {
|
|
6801
6801
|
* @type {Object}
|
6802
6802
|
*/
|
6803
6803
|
static get DATE_MED() {
|
6804
|
-
return
|
6804
|
+
return wr;
|
6805
6805
|
}
|
6806
6806
|
/**
|
6807
6807
|
* {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
|
@@ -6815,98 +6815,98 @@ class v {
|
|
6815
6815
|
* @type {Object}
|
6816
6816
|
*/
|
6817
6817
|
static get DATE_FULL() {
|
6818
|
-
return
|
6818
|
+
return Sr;
|
6819
6819
|
}
|
6820
6820
|
/**
|
6821
6821
|
* {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
|
6822
6822
|
* @type {Object}
|
6823
6823
|
*/
|
6824
6824
|
static get DATE_HUGE() {
|
6825
|
-
return
|
6825
|
+
return vr;
|
6826
6826
|
}
|
6827
6827
|
/**
|
6828
6828
|
* {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
|
6829
6829
|
* @type {Object}
|
6830
6830
|
*/
|
6831
6831
|
static get TIME_SIMPLE() {
|
6832
|
-
return
|
6832
|
+
return kr;
|
6833
6833
|
}
|
6834
6834
|
/**
|
6835
6835
|
* {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
|
6836
6836
|
* @type {Object}
|
6837
6837
|
*/
|
6838
6838
|
static get TIME_WITH_SECONDS() {
|
6839
|
-
return
|
6839
|
+
return br;
|
6840
6840
|
}
|
6841
6841
|
/**
|
6842
6842
|
* {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
|
6843
6843
|
* @type {Object}
|
6844
6844
|
*/
|
6845
6845
|
static get TIME_WITH_SHORT_OFFSET() {
|
6846
|
-
return
|
6846
|
+
return Tr;
|
6847
6847
|
}
|
6848
6848
|
/**
|
6849
6849
|
* {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
6850
6850
|
* @type {Object}
|
6851
6851
|
*/
|
6852
6852
|
static get TIME_WITH_LONG_OFFSET() {
|
6853
|
-
return
|
6853
|
+
return Er;
|
6854
6854
|
}
|
6855
6855
|
/**
|
6856
6856
|
* {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
|
6857
6857
|
* @type {Object}
|
6858
6858
|
*/
|
6859
6859
|
static get TIME_24_SIMPLE() {
|
6860
|
-
return
|
6860
|
+
return Or;
|
6861
6861
|
}
|
6862
6862
|
/**
|
6863
6863
|
* {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
|
6864
6864
|
* @type {Object}
|
6865
6865
|
*/
|
6866
6866
|
static get TIME_24_WITH_SECONDS() {
|
6867
|
-
return
|
6867
|
+
return Cr;
|
6868
6868
|
}
|
6869
6869
|
/**
|
6870
6870
|
* {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
|
6871
6871
|
* @type {Object}
|
6872
6872
|
*/
|
6873
6873
|
static get TIME_24_WITH_SHORT_OFFSET() {
|
6874
|
-
return
|
6874
|
+
return xr;
|
6875
6875
|
}
|
6876
6876
|
/**
|
6877
6877
|
* {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
|
6878
6878
|
* @type {Object}
|
6879
6879
|
*/
|
6880
6880
|
static get TIME_24_WITH_LONG_OFFSET() {
|
6881
|
-
return
|
6881
|
+
return Nr;
|
6882
6882
|
}
|
6883
6883
|
/**
|
6884
6884
|
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
|
6885
6885
|
* @type {Object}
|
6886
6886
|
*/
|
6887
6887
|
static get DATETIME_SHORT() {
|
6888
|
-
return
|
6888
|
+
return _r;
|
6889
6889
|
}
|
6890
6890
|
/**
|
6891
6891
|
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
6892
6892
|
* @type {Object}
|
6893
6893
|
*/
|
6894
6894
|
static get DATETIME_SHORT_WITH_SECONDS() {
|
6895
|
-
return
|
6895
|
+
return Ar;
|
6896
6896
|
}
|
6897
6897
|
/**
|
6898
6898
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
|
6899
6899
|
* @type {Object}
|
6900
6900
|
*/
|
6901
6901
|
static get DATETIME_MED() {
|
6902
|
-
return
|
6902
|
+
return Mr;
|
6903
6903
|
}
|
6904
6904
|
/**
|
6905
6905
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
6906
6906
|
* @type {Object}
|
6907
6907
|
*/
|
6908
6908
|
static get DATETIME_MED_WITH_SECONDS() {
|
6909
|
-
return
|
6909
|
+
return Rr;
|
6910
6910
|
}
|
6911
6911
|
/**
|
6912
6912
|
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
|
@@ -6920,28 +6920,28 @@ class v {
|
|
6920
6920
|
* @type {Object}
|
6921
6921
|
*/
|
6922
6922
|
static get DATETIME_FULL() {
|
6923
|
-
return
|
6923
|
+
return Ir;
|
6924
6924
|
}
|
6925
6925
|
/**
|
6926
6926
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
|
6927
6927
|
* @type {Object}
|
6928
6928
|
*/
|
6929
6929
|
static get DATETIME_FULL_WITH_SECONDS() {
|
6930
|
-
return
|
6930
|
+
return Dr;
|
6931
6931
|
}
|
6932
6932
|
/**
|
6933
6933
|
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
6934
6934
|
* @type {Object}
|
6935
6935
|
*/
|
6936
6936
|
static get DATETIME_HUGE() {
|
6937
|
-
return
|
6937
|
+
return Lr;
|
6938
6938
|
}
|
6939
6939
|
/**
|
6940
6940
|
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
|
6941
6941
|
* @type {Object}
|
6942
6942
|
*/
|
6943
6943
|
static get DATETIME_HUGE_WITH_SECONDS() {
|
6944
|
-
return
|
6944
|
+
return Fr;
|
6945
6945
|
}
|
6946
6946
|
}
|
6947
6947
|
function ze(t) {
|
@@ -6976,7 +6976,7 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
6976
6976
|
}, Ju = {
|
6977
6977
|
key: 1,
|
6978
6978
|
class: "mr-5"
|
6979
|
-
}, Gu = /* @__PURE__ */
|
6979
|
+
}, Gu = /* @__PURE__ */ En({
|
6980
6980
|
__name: "MessageList",
|
6981
6981
|
props: {
|
6982
6982
|
messages: {
|
@@ -6996,9 +6996,9 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
6996
6996
|
a && e("loadMore");
|
6997
6997
|
}
|
6998
6998
|
);
|
6999
|
-
|
6999
|
+
Bi(() => {
|
7000
7000
|
n.canLoadMoreMessages || r();
|
7001
|
-
}),
|
7001
|
+
}), Tn(
|
7002
7002
|
() => n.canLoadMoreMessages,
|
7003
7003
|
(a) => {
|
7004
7004
|
if (a) {
|
@@ -7012,14 +7012,14 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
7012
7012
|
const u = /(https?:\/\/[^\s]+)/g;
|
7013
7013
|
return a.replace(u, (c) => `<a href="${c}" target="_blank">${c}</a>`);
|
7014
7014
|
}
|
7015
|
-
return (a, u) => (L(), $(
|
7015
|
+
return (a, u) => (L(), $(Hn, null, [
|
7016
7016
|
g("div", {
|
7017
7017
|
ref_key: "target",
|
7018
7018
|
ref: s,
|
7019
7019
|
class: "target"
|
7020
7020
|
}, null, 512),
|
7021
7021
|
g("div", Pu, [
|
7022
|
-
(L(!0), $(
|
7022
|
+
(L(!0), $(Hn, null, $i(n.messages, (c) => {
|
7023
7023
|
var l, h;
|
7024
7024
|
return L(), $("div", {
|
7025
7025
|
key: c.id,
|
@@ -7052,7 +7052,7 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
7052
7052
|
}, null, 8, Zu),
|
7053
7053
|
g("div", ju, [
|
7054
7054
|
(l = c.sender) != null && l.nombreCompleto ? (L(), $("span", Yu, Nt(c.esCliente ? (h = c.sender) == null ? void 0 : h.nombreCompleto : "ECOSISTEMA JL"), 1)) : (L(), $("span", Ju)),
|
7055
|
-
g("span", null, Nt(
|
7055
|
+
g("span", null, Nt(js(v).fromISO(c.createdAt).toFormat(
|
7056
7056
|
"dd-MM-yyyy HH:mm"
|
7057
7057
|
)), 1)
|
7058
7058
|
])
|
@@ -7065,14 +7065,14 @@ const Uu = /* @__PURE__ */ oe(Lu, [["render", $u]]), Pu = { class: "messages-con
|
|
7065
7065
|
])
|
7066
7066
|
], 64));
|
7067
7067
|
}
|
7068
|
-
}), Ku = /* @__PURE__ */ oe(Gu, [["__scopeId", "data-v-f24d4510"]]), Xu = {},
|
7068
|
+
}), Ku = /* @__PURE__ */ oe(Gu, [["__scopeId", "data-v-f24d4510"]]), Xu = {}, gi = (t) => (Ui("data-v-d9a6b2b7"), t = t(), Pi(), t), Qu = {
|
7069
7069
|
viewBox: "0 0 24 24",
|
7070
7070
|
xmlns: "http://www.w3.org/2000/svg",
|
7071
7071
|
style: { width: "28px", height: "28px" }
|
7072
|
-
}, el = /* @__PURE__ */
|
7072
|
+
}, el = /* @__PURE__ */ gi(() => /* @__PURE__ */ g("path", {
|
7073
7073
|
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
|
7074
7074
|
opacity: ".25"
|
7075
|
-
}, null, -1)), tl = /* @__PURE__ */
|
7075
|
+
}, null, -1)), tl = /* @__PURE__ */ gi(() => /* @__PURE__ */ g("path", {
|
7076
7076
|
d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",
|
7077
7077
|
class: "spinner_ajPY"
|
7078
7078
|
}, null, -1)), nl = [
|
@@ -7100,29 +7100,29 @@ const Ot = /* @__PURE__ */ Object.create(null);
|
|
7100
7100
|
Object.keys(le).forEach((t) => {
|
7101
7101
|
Ot[le[t]] = t;
|
7102
7102
|
});
|
7103
|
-
const
|
7103
|
+
const gn = { type: "error", data: "parser error" }, wi = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Si = typeof ArrayBuffer == "function", vi = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, Vn = ({ type: t, data: e }, n, s) => wi && e instanceof Blob ? n ? s(e) : Vs(e, s) : Si && (e instanceof ArrayBuffer || vi(e)) ? n ? s(e) : Vs(new Blob([e]), s) : s(le[t] + (e || "")), Vs = (t, e) => {
|
7104
7104
|
const n = new FileReader();
|
7105
7105
|
return n.onload = function() {
|
7106
7106
|
const s = n.result.split(",")[1];
|
7107
7107
|
e("b" + (s || ""));
|
7108
7108
|
}, n.readAsDataURL(t);
|
7109
7109
|
};
|
7110
|
-
function
|
7110
|
+
function Bs(t) {
|
7111
7111
|
return t instanceof Uint8Array ? t : t instanceof ArrayBuffer ? new Uint8Array(t) : new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
|
7112
7112
|
}
|
7113
7113
|
let rn;
|
7114
7114
|
function ol(t, e) {
|
7115
|
-
if (
|
7116
|
-
return t.data.arrayBuffer().then(
|
7117
|
-
if (
|
7118
|
-
return e(
|
7119
|
-
|
7115
|
+
if (wi && t.data instanceof Blob)
|
7116
|
+
return t.data.arrayBuffer().then(Bs).then(e);
|
7117
|
+
if (Si && (t.data instanceof ArrayBuffer || vi(t.data)))
|
7118
|
+
return e(Bs(t.data));
|
7119
|
+
Vn(t, !1, (n) => {
|
7120
7120
|
rn || (rn = new TextEncoder()), e(rn.encode(n));
|
7121
7121
|
});
|
7122
7122
|
}
|
7123
|
-
const
|
7124
|
-
for (let t = 0; t <
|
7125
|
-
Je[
|
7123
|
+
const $s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Je = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
7124
|
+
for (let t = 0; t < $s.length; t++)
|
7125
|
+
Je[$s.charCodeAt(t)] = t;
|
7126
7126
|
const al = (t) => {
|
7127
7127
|
let e = t.length * 0.75, n = t.length, s, r = 0, i, o, a, u;
|
7128
7128
|
t[t.length - 1] === "=" && (e--, t[t.length - 2] === "=" && e--);
|
@@ -7130,11 +7130,11 @@ const al = (t) => {
|
|
7130
7130
|
for (s = 0; s < n; s += 4)
|
7131
7131
|
i = Je[t.charCodeAt(s)], o = Je[t.charCodeAt(s + 1)], a = Je[t.charCodeAt(s + 2)], u = Je[t.charCodeAt(s + 3)], l[r++] = i << 2 | o >> 4, l[r++] = (o & 15) << 4 | a >> 2, l[r++] = (a & 3) << 6 | u & 63;
|
7132
7132
|
return c;
|
7133
|
-
}, cl = typeof ArrayBuffer == "function",
|
7133
|
+
}, cl = typeof ArrayBuffer == "function", Bn = (t, e) => {
|
7134
7134
|
if (typeof t != "string")
|
7135
7135
|
return {
|
7136
7136
|
type: "message",
|
7137
|
-
data:
|
7137
|
+
data: ki(t, e)
|
7138
7138
|
};
|
7139
7139
|
const n = t.charAt(0);
|
7140
7140
|
return n === "b" ? {
|
@@ -7145,14 +7145,14 @@ const al = (t) => {
|
|
7145
7145
|
data: t.substring(1)
|
7146
7146
|
} : {
|
7147
7147
|
type: Ot[n]
|
7148
|
-
} :
|
7148
|
+
} : gn;
|
7149
7149
|
}, ul = (t, e) => {
|
7150
7150
|
if (cl) {
|
7151
7151
|
const n = al(t);
|
7152
|
-
return
|
7152
|
+
return ki(n, e);
|
7153
7153
|
} else
|
7154
7154
|
return { base64: !0, data: t };
|
7155
|
-
},
|
7155
|
+
}, ki = (t, e) => {
|
7156
7156
|
switch (e) {
|
7157
7157
|
case "blob":
|
7158
7158
|
return t instanceof Blob ? t : new Blob([t]);
|
@@ -7160,18 +7160,18 @@ const al = (t) => {
|
|
7160
7160
|
default:
|
7161
7161
|
return t instanceof ArrayBuffer ? t : t.buffer;
|
7162
7162
|
}
|
7163
|
-
},
|
7163
|
+
}, bi = "", ll = (t, e) => {
|
7164
7164
|
const n = t.length, s = new Array(n);
|
7165
7165
|
let r = 0;
|
7166
7166
|
t.forEach((i, o) => {
|
7167
|
-
|
7168
|
-
s[o] = a, ++r === n && e(s.join(
|
7167
|
+
Vn(i, !1, (a) => {
|
7168
|
+
s[o] = a, ++r === n && e(s.join(bi));
|
7169
7169
|
});
|
7170
7170
|
});
|
7171
7171
|
}, fl = (t, e) => {
|
7172
|
-
const n = t.split(
|
7172
|
+
const n = t.split(bi), s = [];
|
7173
7173
|
for (let r = 0; r < n.length; r++) {
|
7174
|
-
const i =
|
7174
|
+
const i = Bn(n[r], e);
|
7175
7175
|
if (s.push(i), i.type === "error")
|
7176
7176
|
break;
|
7177
7177
|
}
|
@@ -7234,7 +7234,7 @@ function dl(t, e) {
|
|
7234
7234
|
break;
|
7235
7235
|
const u = pt(n, 8), c = new DataView(u.buffer, u.byteOffset, u.length), l = c.getUint32(0);
|
7236
7236
|
if (l > Math.pow(2, 21) - 1) {
|
7237
|
-
a.enqueue(
|
7237
|
+
a.enqueue(gn);
|
7238
7238
|
break;
|
7239
7239
|
}
|
7240
7240
|
r = l * Math.pow(2, 32) + c.getUint32(4), s = 3;
|
@@ -7242,17 +7242,17 @@ function dl(t, e) {
|
|
7242
7242
|
if (mt(n) < r)
|
7243
7243
|
break;
|
7244
7244
|
const u = pt(n, r);
|
7245
|
-
a.enqueue(
|
7245
|
+
a.enqueue(Bn(i ? u : on.decode(u), e)), s = 0;
|
7246
7246
|
}
|
7247
7247
|
if (r === 0 || r > t) {
|
7248
|
-
a.enqueue(
|
7248
|
+
a.enqueue(gn);
|
7249
7249
|
break;
|
7250
7250
|
}
|
7251
7251
|
}
|
7252
7252
|
}
|
7253
7253
|
});
|
7254
7254
|
}
|
7255
|
-
const
|
7255
|
+
const Ti = 4;
|
7256
7256
|
function F(t) {
|
7257
7257
|
if (t) return ml(t);
|
7258
7258
|
}
|
@@ -7303,7 +7303,7 @@ F.prototype.hasListeners = function(t) {
|
|
7303
7303
|
return !!this.listeners(t).length;
|
7304
7304
|
};
|
7305
7305
|
const G = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
|
7306
|
-
function
|
7306
|
+
function Ei(t, ...e) {
|
7307
7307
|
return e.reduce((n, s) => (t.hasOwnProperty(s) && (n[s] = t[s]), n), {});
|
7308
7308
|
}
|
7309
7309
|
const pl = G.setTimeout, yl = G.clearTimeout;
|
@@ -7339,7 +7339,7 @@ class bl extends Error {
|
|
7339
7339
|
super(e), this.description = n, this.context = s, this.type = "TransportError";
|
7340
7340
|
}
|
7341
7341
|
}
|
7342
|
-
class
|
7342
|
+
class $n extends F {
|
7343
7343
|
/**
|
7344
7344
|
* Transport abstract constructor.
|
7345
7345
|
*
|
@@ -7396,7 +7396,7 @@ class Un extends F {
|
|
7396
7396
|
* @protected
|
7397
7397
|
*/
|
7398
7398
|
onData(e) {
|
7399
|
-
const n =
|
7399
|
+
const n = Bn(e, this.socket.binaryType);
|
7400
7400
|
this.onPacket(n);
|
7401
7401
|
}
|
7402
7402
|
/**
|
@@ -7437,28 +7437,28 @@ class Un extends F {
|
|
7437
7437
|
return n.length ? "?" + n : "";
|
7438
7438
|
}
|
7439
7439
|
}
|
7440
|
-
const
|
7441
|
-
let
|
7442
|
-
function
|
7440
|
+
const Oi = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), wn = 64, Tl = {};
|
7441
|
+
let Us = 0, yt = 0, Ps;
|
7442
|
+
function Ws(t) {
|
7443
7443
|
let e = "";
|
7444
7444
|
do
|
7445
|
-
e =
|
7445
|
+
e = Oi[t % wn] + e, t = Math.floor(t / wn);
|
7446
7446
|
while (t > 0);
|
7447
7447
|
return e;
|
7448
7448
|
}
|
7449
|
-
function
|
7450
|
-
const t =
|
7451
|
-
return t !==
|
7449
|
+
function Ci() {
|
7450
|
+
const t = Ws(+/* @__PURE__ */ new Date());
|
7451
|
+
return t !== Ps ? (Us = 0, Ps = t) : t + "." + Ws(Us++);
|
7452
7452
|
}
|
7453
|
-
for (; yt <
|
7454
|
-
Tl[
|
7455
|
-
let
|
7453
|
+
for (; yt < wn; yt++)
|
7454
|
+
Tl[Oi[yt]] = yt;
|
7455
|
+
let xi = !1;
|
7456
7456
|
try {
|
7457
|
-
|
7457
|
+
xi = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
7458
7458
|
} catch {
|
7459
7459
|
}
|
7460
|
-
const El =
|
7461
|
-
function
|
7460
|
+
const El = xi;
|
7461
|
+
function Ni(t) {
|
7462
7462
|
const e = t.xdomain;
|
7463
7463
|
try {
|
7464
7464
|
if (typeof XMLHttpRequest < "u" && (!e || El))
|
@@ -7474,11 +7474,11 @@ function _i(t) {
|
|
7474
7474
|
function Ol() {
|
7475
7475
|
}
|
7476
7476
|
const Cl = function() {
|
7477
|
-
return new
|
7477
|
+
return new Ni({
|
7478
7478
|
xdomain: !1
|
7479
7479
|
}).responseType != null;
|
7480
7480
|
}();
|
7481
|
-
class xl extends
|
7481
|
+
class xl extends $n {
|
7482
7482
|
/**
|
7483
7483
|
* XHR Polling constructor.
|
7484
7484
|
*
|
@@ -7579,7 +7579,7 @@ class xl extends Un {
|
|
7579
7579
|
*/
|
7580
7580
|
uri() {
|
7581
7581
|
const e = this.opts.secure ? "https" : "http", n = this.query || {};
|
7582
|
-
return this.opts.timestampRequests !== !1 && (n[this.opts.timestampParam] =
|
7582
|
+
return this.opts.timestampRequests !== !1 && (n[this.opts.timestampParam] = Ci()), !this.supportsBinary && !n.sid && (n.b64 = 1), this.createUri(e, n);
|
7583
7583
|
}
|
7584
7584
|
/**
|
7585
7585
|
* Creates a request.
|
@@ -7635,9 +7635,9 @@ class ue extends F {
|
|
7635
7635
|
*/
|
7636
7636
|
create() {
|
7637
7637
|
var e;
|
7638
|
-
const n =
|
7638
|
+
const n = Ei(this.opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
|
7639
7639
|
n.xdomain = !!this.opts.xd;
|
7640
|
-
const s = this.xhr = new
|
7640
|
+
const s = this.xhr = new Ni(n);
|
7641
7641
|
try {
|
7642
7642
|
s.open(this.method, this.uri, !0);
|
7643
7643
|
try {
|
@@ -7716,18 +7716,18 @@ ue.requestsCount = 0;
|
|
7716
7716
|
ue.requests = {};
|
7717
7717
|
if (typeof document < "u") {
|
7718
7718
|
if (typeof attachEvent == "function")
|
7719
|
-
attachEvent("onunload",
|
7719
|
+
attachEvent("onunload", qs);
|
7720
7720
|
else if (typeof addEventListener == "function") {
|
7721
7721
|
const t = "onpagehide" in G ? "pagehide" : "unload";
|
7722
|
-
addEventListener(t,
|
7722
|
+
addEventListener(t, qs, !1);
|
7723
7723
|
}
|
7724
7724
|
}
|
7725
|
-
function
|
7725
|
+
function qs() {
|
7726
7726
|
for (let t in ue.requests)
|
7727
7727
|
ue.requests.hasOwnProperty(t) && ue.requests[t].abort();
|
7728
7728
|
}
|
7729
|
-
const
|
7730
|
-
class _l extends
|
7729
|
+
const Un = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, n) => n(e, 0), gt = G.WebSocket || G.MozWebSocket, Hs = !0, Nl = "arraybuffer", zs = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
7730
|
+
class _l extends $n {
|
7731
7731
|
/**
|
7732
7732
|
* WebSocket transport constructor.
|
7733
7733
|
*
|
@@ -7743,10 +7743,10 @@ class _l extends Un {
|
|
7743
7743
|
doOpen() {
|
7744
7744
|
if (!this.check())
|
7745
7745
|
return;
|
7746
|
-
const e = this.uri(), n = this.opts.protocols, s =
|
7746
|
+
const e = this.uri(), n = this.opts.protocols, s = zs ? {} : Ei(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
7747
7747
|
this.opts.extraHeaders && (s.headers = this.opts.extraHeaders);
|
7748
7748
|
try {
|
7749
|
-
this.ws =
|
7749
|
+
this.ws = Hs && !zs ? n ? new gt(e, n) : new gt(e) : new gt(e, n, s);
|
7750
7750
|
} catch (r) {
|
7751
7751
|
return this.emitReserved("error", r);
|
7752
7752
|
}
|
@@ -7769,13 +7769,13 @@ class _l extends Un {
|
|
7769
7769
|
this.writable = !1;
|
7770
7770
|
for (let n = 0; n < e.length; n++) {
|
7771
7771
|
const s = e[n], r = n === e.length - 1;
|
7772
|
-
|
7772
|
+
Vn(s, this.supportsBinary, (i) => {
|
7773
7773
|
const o = {};
|
7774
7774
|
try {
|
7775
|
-
|
7775
|
+
Hs && this.ws.send(i);
|
7776
7776
|
} catch {
|
7777
7777
|
}
|
7778
|
-
r &&
|
7778
|
+
r && Un(() => {
|
7779
7779
|
this.writable = !0, this.emitReserved("drain");
|
7780
7780
|
}, this.setTimeoutFn);
|
7781
7781
|
});
|
@@ -7791,7 +7791,7 @@ class _l extends Un {
|
|
7791
7791
|
*/
|
7792
7792
|
uri() {
|
7793
7793
|
const e = this.opts.secure ? "wss" : "ws", n = this.query || {};
|
7794
|
-
return this.opts.timestampRequests && (n[this.opts.timestampParam] =
|
7794
|
+
return this.opts.timestampRequests && (n[this.opts.timestampParam] = Ci()), this.supportsBinary || (n.b64 = 1), this.createUri(e, n);
|
7795
7795
|
}
|
7796
7796
|
/**
|
7797
7797
|
* Feature detection for WebSocket.
|
@@ -7803,7 +7803,7 @@ class _l extends Un {
|
|
7803
7803
|
return !!gt;
|
7804
7804
|
}
|
7805
7805
|
}
|
7806
|
-
class Al extends
|
7806
|
+
class Al extends $n {
|
7807
7807
|
get name() {
|
7808
7808
|
return "webtransport";
|
7809
7809
|
}
|
@@ -7833,7 +7833,7 @@ class Al extends Un {
|
|
7833
7833
|
for (let n = 0; n < e.length; n++) {
|
7834
7834
|
const s = e[n], r = n === e.length - 1;
|
7835
7835
|
this.writer.write(s).then(() => {
|
7836
|
-
r &&
|
7836
|
+
r && Un(() => {
|
7837
7837
|
this.writable = !0, this.emitReserved("drain");
|
7838
7838
|
}, this.setTimeoutFn);
|
7839
7839
|
});
|
@@ -7864,7 +7864,7 @@ const Ml = {
|
|
7864
7864
|
"query",
|
7865
7865
|
"anchor"
|
7866
7866
|
];
|
7867
|
-
function
|
7867
|
+
function Sn(t) {
|
7868
7868
|
const e = t, n = t.indexOf("["), s = t.indexOf("]");
|
7869
7869
|
n != -1 && s != -1 && (t = t.substring(0, n) + t.substring(n, s).replace(/:/g, ";") + t.substring(s, t.length));
|
7870
7870
|
let r = Rl.exec(t || ""), i = {}, o = 14;
|
@@ -7882,7 +7882,7 @@ function Ll(t, e) {
|
|
7882
7882
|
r && (n[r] = i);
|
7883
7883
|
}), n;
|
7884
7884
|
}
|
7885
|
-
let
|
7885
|
+
let _i = class _e extends F {
|
7886
7886
|
/**
|
7887
7887
|
* Socket constructor.
|
7888
7888
|
*
|
@@ -7890,7 +7890,7 @@ let Ai = class _e extends F {
|
|
7890
7890
|
* @param {Object} opts - options
|
7891
7891
|
*/
|
7892
7892
|
constructor(e, n = {}) {
|
7893
|
-
super(), this.binaryType = Nl, this.writeBuffer = [], e && typeof e == "object" && (n = e, e = null), e ? (e =
|
7893
|
+
super(), this.binaryType = Nl, this.writeBuffer = [], e && typeof e == "object" && (n = e, e = null), e ? (e = Sn(e), n.hostname = e.host, n.secure = e.protocol === "https" || e.protocol === "wss", n.port = e.port, e.query && (n.query = e.query)) : n.host && (n.hostname = Sn(n.host).host), qt(this, n), this.secure = n.secure != null ? n.secure : typeof location < "u" && location.protocol === "https:", n.hostname && !n.port && (n.port = this.secure ? "443" : "80"), this.hostname = n.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = n.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = n.transports || [
|
7894
7894
|
"polling",
|
7895
7895
|
"websocket",
|
7896
7896
|
"webtransport"
|
@@ -7925,7 +7925,7 @@ let Ai = class _e extends F {
|
|
7925
7925
|
*/
|
7926
7926
|
createTransport(e) {
|
7927
7927
|
const n = Object.assign({}, this.opts.query);
|
7928
|
-
n.EIO =
|
7928
|
+
n.EIO = Ti, n.transport = e, this.id && (n.sid = this.id);
|
7929
7929
|
const s = Object.assign({}, this.opts, {
|
7930
7930
|
query: n,
|
7931
7931
|
socket: this,
|
@@ -8187,15 +8187,15 @@ let Ai = class _e extends F {
|
|
8187
8187
|
return n;
|
8188
8188
|
}
|
8189
8189
|
};
|
8190
|
-
|
8190
|
+
_i.protocol = Ti;
|
8191
8191
|
function Fl(t, e = "", n) {
|
8192
8192
|
let s = t;
|
8193
|
-
n = n || typeof location < "u" && location, t == null && (t = n.protocol + "//" + n.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = n.protocol + t : t = n.host + t), /^(https?|wss?):\/\//.test(t) || (typeof n < "u" ? t = n.protocol + "//" + t : t = "https://" + t), s =
|
8193
|
+
n = n || typeof location < "u" && location, t == null && (t = n.protocol + "//" + n.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = n.protocol + t : t = n.host + t), /^(https?|wss?):\/\//.test(t) || (typeof n < "u" ? t = n.protocol + "//" + t : t = "https://" + t), s = Sn(t)), s.port || (/^(http|ws)$/.test(s.protocol) ? s.port = "80" : /^(http|ws)s$/.test(s.protocol) && (s.port = "443")), s.path = s.path || "/";
|
8194
8194
|
const i = s.host.indexOf(":") !== -1 ? "[" + s.host + "]" : s.host;
|
8195
8195
|
return s.id = s.protocol + "://" + i + ":" + s.port + e, s.href = s.protocol + "://" + i + (n && n.port === s.port ? "" : ":" + s.port), s;
|
8196
8196
|
}
|
8197
|
-
const Vl = typeof ArrayBuffer == "function", Bl = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t.buffer instanceof ArrayBuffer,
|
8198
|
-
function
|
8197
|
+
const Vl = typeof ArrayBuffer == "function", Bl = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t.buffer instanceof ArrayBuffer, Ai = Object.prototype.toString, $l = typeof Blob == "function" || typeof Blob < "u" && Ai.call(Blob) === "[object BlobConstructor]", Ul = typeof File == "function" || typeof File < "u" && Ai.call(File) === "[object FileConstructor]";
|
8198
|
+
function Pn(t) {
|
8199
8199
|
return Vl && (t instanceof ArrayBuffer || Bl(t)) || $l && t instanceof Blob || Ul && t instanceof File;
|
8200
8200
|
}
|
8201
8201
|
function Ct(t, e) {
|
@@ -8207,7 +8207,7 @@ function Ct(t, e) {
|
|
8207
8207
|
return !0;
|
8208
8208
|
return !1;
|
8209
8209
|
}
|
8210
|
-
if (
|
8210
|
+
if (Pn(t))
|
8211
8211
|
return !0;
|
8212
8212
|
if (t.toJSON && typeof t.toJSON == "function" && arguments.length === 1)
|
8213
8213
|
return Ct(t.toJSON(), !0);
|
@@ -8218,31 +8218,31 @@ function Ct(t, e) {
|
|
8218
8218
|
}
|
8219
8219
|
function Pl(t) {
|
8220
8220
|
const e = [], n = t.data, s = t;
|
8221
|
-
return s.data =
|
8221
|
+
return s.data = vn(n, e), s.attachments = e.length, { packet: s, buffers: e };
|
8222
8222
|
}
|
8223
|
-
function
|
8223
|
+
function vn(t, e) {
|
8224
8224
|
if (!t)
|
8225
8225
|
return t;
|
8226
|
-
if (
|
8226
|
+
if (Pn(t)) {
|
8227
8227
|
const n = { _placeholder: !0, num: e.length };
|
8228
8228
|
return e.push(t), n;
|
8229
8229
|
} else if (Array.isArray(t)) {
|
8230
8230
|
const n = new Array(t.length);
|
8231
8231
|
for (let s = 0; s < t.length; s++)
|
8232
|
-
n[s] =
|
8232
|
+
n[s] = vn(t[s], e);
|
8233
8233
|
return n;
|
8234
8234
|
} else if (typeof t == "object" && !(t instanceof Date)) {
|
8235
8235
|
const n = {};
|
8236
8236
|
for (const s in t)
|
8237
|
-
Object.prototype.hasOwnProperty.call(t, s) && (n[s] =
|
8237
|
+
Object.prototype.hasOwnProperty.call(t, s) && (n[s] = vn(t[s], e));
|
8238
8238
|
return n;
|
8239
8239
|
}
|
8240
8240
|
return t;
|
8241
8241
|
}
|
8242
8242
|
function Wl(t, e) {
|
8243
|
-
return t.data =
|
8243
|
+
return t.data = kn(t.data, e), delete t.attachments, t;
|
8244
8244
|
}
|
8245
|
-
function
|
8245
|
+
function kn(t, e) {
|
8246
8246
|
if (!t)
|
8247
8247
|
return t;
|
8248
8248
|
if (t && t._placeholder === !0) {
|
@@ -8251,10 +8251,10 @@ function bn(t, e) {
|
|
8251
8251
|
throw new Error("illegal attachments");
|
8252
8252
|
} else if (Array.isArray(t))
|
8253
8253
|
for (let n = 0; n < t.length; n++)
|
8254
|
-
t[n] =
|
8254
|
+
t[n] = kn(t[n], e);
|
8255
8255
|
else if (typeof t == "object")
|
8256
8256
|
for (const n in t)
|
8257
|
-
Object.prototype.hasOwnProperty.call(t, n) && (t[n] =
|
8257
|
+
Object.prototype.hasOwnProperty.call(t, n) && (t[n] = kn(t[n], e));
|
8258
8258
|
return t;
|
8259
8259
|
}
|
8260
8260
|
const ql = [
|
@@ -8310,10 +8310,10 @@ class zl {
|
|
8310
8310
|
return r.unshift(s), r;
|
8311
8311
|
}
|
8312
8312
|
}
|
8313
|
-
function
|
8313
|
+
function Zs(t) {
|
8314
8314
|
return Object.prototype.toString.call(t) === "[object Object]";
|
8315
8315
|
}
|
8316
|
-
class
|
8316
|
+
class Wn extends F {
|
8317
8317
|
/**
|
8318
8318
|
* Decoder constructor
|
8319
8319
|
*
|
@@ -8335,7 +8335,7 @@ class qn extends F {
|
|
8335
8335
|
n = this.decodeString(e);
|
8336
8336
|
const s = n.type === b.BINARY_EVENT;
|
8337
8337
|
s || n.type === b.BINARY_ACK ? (n.type = s ? b.EVENT : b.ACK, this.reconstructor = new Zl(n), n.attachments === 0 && super.emitReserved("decoded", n)) : super.emitReserved("decoded", n);
|
8338
|
-
} else if (
|
8338
|
+
} else if (Pn(e) || e.base64)
|
8339
8339
|
if (this.reconstructor)
|
8340
8340
|
n = this.reconstructor.takeBinaryData(e), n && (this.reconstructor = null, super.emitReserved("decoded", n));
|
8341
8341
|
else
|
@@ -8388,7 +8388,7 @@ class qn extends F {
|
|
8388
8388
|
}
|
8389
8389
|
if (e.charAt(++n)) {
|
8390
8390
|
const i = this.tryParse(e.substr(n));
|
8391
|
-
if (
|
8391
|
+
if (Wn.isPayloadValid(s.type, i))
|
8392
8392
|
s.data = i;
|
8393
8393
|
else
|
8394
8394
|
throw new Error("invalid payload");
|
@@ -8405,11 +8405,11 @@ class qn extends F {
|
|
8405
8405
|
static isPayloadValid(e, n) {
|
8406
8406
|
switch (e) {
|
8407
8407
|
case b.CONNECT:
|
8408
|
-
return
|
8408
|
+
return Zs(n);
|
8409
8409
|
case b.DISCONNECT:
|
8410
8410
|
return n === void 0;
|
8411
8411
|
case b.CONNECT_ERROR:
|
8412
|
-
return typeof n == "string" ||
|
8412
|
+
return typeof n == "string" || Zs(n);
|
8413
8413
|
case b.EVENT:
|
8414
8414
|
case b.BINARY_EVENT:
|
8415
8415
|
return Array.isArray(n) && (typeof n[0] == "number" || typeof n[0] == "string" && ql.indexOf(n[0]) === -1);
|
@@ -8453,7 +8453,7 @@ class Zl {
|
|
8453
8453
|
}
|
8454
8454
|
const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
8455
8455
|
__proto__: null,
|
8456
|
-
Decoder:
|
8456
|
+
Decoder: Wn,
|
8457
8457
|
Encoder: zl,
|
8458
8458
|
get PacketType() {
|
8459
8459
|
return b;
|
@@ -8474,7 +8474,7 @@ const Yl = Object.freeze({
|
|
8474
8474
|
newListener: 1,
|
8475
8475
|
removeListener: 1
|
8476
8476
|
});
|
8477
|
-
class
|
8477
|
+
class Mi extends F {
|
8478
8478
|
/**
|
8479
8479
|
* `Socket` constructor.
|
8480
8480
|
*/
|
@@ -9074,7 +9074,7 @@ We.prototype.setMax = function(t) {
|
|
9074
9074
|
We.prototype.setJitter = function(t) {
|
9075
9075
|
this.jitter = t;
|
9076
9076
|
};
|
9077
|
-
class
|
9077
|
+
class bn extends F {
|
9078
9078
|
constructor(e, n) {
|
9079
9079
|
var s;
|
9080
9080
|
super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (n = e, e = void 0), n = n || {}, n.path = n.path || "/socket.io", this.opts = n, qt(this, n), this.reconnection(n.reconnection !== !1), this.reconnectionAttempts(n.reconnectionAttempts || 1 / 0), this.reconnectionDelay(n.reconnectionDelay || 1e3), this.reconnectionDelayMax(n.reconnectionDelayMax || 5e3), this.randomizationFactor((s = n.randomizationFactor) !== null && s !== void 0 ? s : 0.5), this.backoff = new We({
|
@@ -9125,7 +9125,7 @@ class Tn extends F {
|
|
9125
9125
|
open(e) {
|
9126
9126
|
if (~this._readyState.indexOf("open"))
|
9127
9127
|
return this;
|
9128
|
-
this.engine = new
|
9128
|
+
this.engine = new _i(this.uri, this.opts);
|
9129
9129
|
const n = this.engine, s = this;
|
9130
9130
|
this._readyState = "opening", this.skipReconnect = !1;
|
9131
9131
|
const r = se(n, "open", function() {
|
@@ -9188,7 +9188,7 @@ class Tn extends F {
|
|
9188
9188
|
* @private
|
9189
9189
|
*/
|
9190
9190
|
ondecoded(e) {
|
9191
|
-
|
9191
|
+
Un(() => {
|
9192
9192
|
this.emitReserved("packet", e);
|
9193
9193
|
}, this.setTimeoutFn);
|
9194
9194
|
}
|
@@ -9208,7 +9208,7 @@ class Tn extends F {
|
|
9208
9208
|
*/
|
9209
9209
|
socket(e, n) {
|
9210
9210
|
let s = this.nsps[e];
|
9211
|
-
return s ? this._autoConnect && !s.active && s.connect() : (s = new
|
9211
|
+
return s ? this._autoConnect && !s.active && s.connect() : (s = new Mi(this, e, n), this.nsps[e] = s), s;
|
9212
9212
|
}
|
9213
9213
|
/**
|
9214
9214
|
* Called upon a socket close.
|
@@ -9305,22 +9305,22 @@ function xt(t, e) {
|
|
9305
9305
|
typeof t == "object" && (e = t, t = void 0), e = e || {};
|
9306
9306
|
const n = Fl(t, e.path || "/socket.io"), s = n.source, r = n.id, i = n.path, o = Ze[r] && i in Ze[r].nsps, a = e.forceNew || e["force new connection"] || e.multiplex === !1 || o;
|
9307
9307
|
let u;
|
9308
|
-
return a ? u = new
|
9308
|
+
return a ? u = new bn(s, e) : (Ze[r] || (Ze[r] = new bn(s, e)), u = Ze[r]), n.query && !e.query && (e.query = n.queryKey), u.socket(n.path, e);
|
9309
9309
|
}
|
9310
9310
|
Object.assign(xt, {
|
9311
|
-
Manager:
|
9312
|
-
Socket:
|
9311
|
+
Manager: bn,
|
9312
|
+
Socket: Mi,
|
9313
9313
|
io: xt,
|
9314
9314
|
connect: xt
|
9315
9315
|
});
|
9316
|
-
var
|
9316
|
+
var Ri = /* @__PURE__ */ ((t) => (t.WEBCHAT = "webchat", t.CENTRAL = "central", t.WHATSAPP = "whatsapp", t.TELEGRAM = "telegram", t.SMS = "sms", t))(Ri || {});
|
9317
9317
|
const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "title-chat" }, Xl = {
|
9318
9318
|
key: 0,
|
9319
9319
|
class: "loader"
|
9320
9320
|
}, Ql = { class: "w-full" }, ef = ["onSubmit"], tf = { class: "form-message" }, nf = { class: "jl-inputgroup-chat" }, sf = ["onKeyup"], rf = {
|
9321
9321
|
type: "submit",
|
9322
9322
|
class: "pointer btn-primary"
|
9323
|
-
}, of = 14, af = /* @__PURE__ */
|
9323
|
+
}, of = 14, af = /* @__PURE__ */ En({
|
9324
9324
|
__name: "Chat",
|
9325
9325
|
props: {
|
9326
9326
|
titlePrincipal: {
|
@@ -9347,11 +9347,11 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9347
9347
|
data: [],
|
9348
9348
|
canLoadMoreMessages: !1
|
9349
9349
|
}), o = z(""), a = z(!1), u = z(null);
|
9350
|
-
|
9350
|
+
Tn(
|
9351
9351
|
() => n.visible,
|
9352
9352
|
async (S) => {
|
9353
|
-
if (!S || (e("clear-new-messages"), d(), r.value > 0 &&
|
9354
|
-
const E = await
|
9353
|
+
if (!S || (e("clear-new-messages"), d(), r.value > 0 && os(o.value, n.tokenAuth), o.value)) return;
|
9354
|
+
const E = await is(n.tokenAuth);
|
9355
9355
|
E && (o.value = E.appChat.id);
|
9356
9356
|
}
|
9357
9357
|
);
|
@@ -9402,7 +9402,7 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9402
9402
|
}
|
9403
9403
|
}, V = i.value.data.push(E) - 1;
|
9404
9404
|
h(s.value, o.value).then((ae) => {
|
9405
|
-
var ot,
|
9405
|
+
var ot, qn;
|
9406
9406
|
if (!ae)
|
9407
9407
|
i.value.data[V].error = {
|
9408
9408
|
error: !0,
|
@@ -9415,12 +9415,12 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9415
9415
|
});
|
9416
9416
|
else {
|
9417
9417
|
i.value.data[V] = ae;
|
9418
|
-
const
|
9419
|
-
(
|
9418
|
+
const Ii = { ...ae, chatId: E.chatId };
|
9419
|
+
(qn = A.value) == null || qn.emit(
|
9420
9420
|
"sendMessage",
|
9421
|
-
{ roomId: (ot = W == null ? void 0 : W.value) == null ? void 0 : ot.appChat.id, message:
|
9422
|
-
(
|
9423
|
-
console.log("🚀 ~ socketService.value.emit ~ response:",
|
9421
|
+
{ roomId: (ot = W == null ? void 0 : W.value) == null ? void 0 : ot.appChat.id, message: Ii },
|
9422
|
+
(Di) => {
|
9423
|
+
console.log("🚀 ~ socketService.value.emit ~ response:", Di);
|
9424
9424
|
}
|
9425
9425
|
);
|
9426
9426
|
}
|
@@ -9467,11 +9467,11 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9467
9467
|
d();
|
9468
9468
|
});
|
9469
9469
|
}, d = () => {
|
9470
|
-
|
9470
|
+
zn(() => {
|
9471
9471
|
u.value && (u.value.scrollTop = u.value.scrollHeight);
|
9472
9472
|
});
|
9473
9473
|
}, w = (S) => {
|
9474
|
-
|
9474
|
+
zn(() => {
|
9475
9475
|
const E = u.value;
|
9476
9476
|
E && (E.scrollTop = E.scrollHeight - S);
|
9477
9477
|
});
|
@@ -9480,7 +9480,7 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9480
9480
|
T.value && (T.value.style.height = T.value.scrollHeight - of + "px", T.value.scrollHeight !== T.value.clientHeight && (T.value.style.height = T.value.scrollHeight + "px"));
|
9481
9481
|
}
|
9482
9482
|
const A = z(), W = z();
|
9483
|
-
function qe(S, E =
|
9483
|
+
function qe(S, E = Ri.WEBCHAT) {
|
9484
9484
|
var V, j;
|
9485
9485
|
if (!S) throw new Error("user chat is required");
|
9486
9486
|
A.value = xt(window.VITE_SOCKET_URI, {
|
@@ -9500,14 +9500,14 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9500
9500
|
console.log("Desconectado del servidor de sockets");
|
9501
9501
|
}), A.value.on("receiveMessage", (M) => {
|
9502
9502
|
var B, ae;
|
9503
|
-
console.log("Mensaje recibido:", M.message, S), M.message.sender.msPersonaId !== ((ae = (B = S == null ? void 0 : S.chat) == null ? void 0 : B.persona) == null ? void 0 : ae.msPersonaId) && (i.value.data.push(M.message),
|
9503
|
+
console.log("Mensaje recibido:", M.message, S), M.message.sender.msPersonaId !== ((ae = (B = S == null ? void 0 : S.chat) == null ? void 0 : B.persona) == null ? void 0 : ae.msPersonaId) && (i.value.data.push(M.message), os(M.message.appChatId, n.tokenAuth), d(), !n.visible && e("new-message"));
|
9504
9504
|
});
|
9505
9505
|
}
|
9506
|
-
return
|
9506
|
+
return Js(async () => {
|
9507
9507
|
if (o.value) return;
|
9508
|
-
const S = await
|
9508
|
+
const S = await is(n.tokenAuth);
|
9509
9509
|
S && (W.value = S, o.value = S.appChat.id, r.value = S.appChat.totalNoVistosCliente, qe(S), y(), e("not-viewed-total", S.appChat.totalNoVistosCliente));
|
9510
|
-
}),
|
9510
|
+
}), Wi(() => {
|
9511
9511
|
var S;
|
9512
9512
|
(S = A.value) == null || S.off();
|
9513
9513
|
}), (S, E) => (L(), $("div", Jl, [
|
@@ -9538,22 +9538,22 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9538
9538
|
g("div", Ql, [
|
9539
9539
|
g("form", {
|
9540
9540
|
class: "message-send",
|
9541
|
-
onSubmit:
|
9541
|
+
onSubmit: Zn(l, ["prevent"])
|
9542
9542
|
}, [
|
9543
9543
|
g("div", tf, [
|
9544
9544
|
g("div", nf, [
|
9545
|
-
|
9545
|
+
Gs(g("textarea", {
|
9546
9546
|
"onUpdate:modelValue": E[1] || (E[1] = (V) => s.value = V),
|
9547
9547
|
class: "jl2-input-chat",
|
9548
9548
|
required: "",
|
9549
9549
|
ref_key: "textAreaRef",
|
9550
9550
|
ref: T,
|
9551
9551
|
onInput: E[2] || (E[2] = () => _()),
|
9552
|
-
onKeydown: E[3] || (E[3] =
|
9552
|
+
onKeydown: E[3] || (E[3] = jn(Zn(() => {
|
9553
9553
|
}, ["prevent"]), ["enter"])),
|
9554
|
-
onKeyup:
|
9554
|
+
onKeyup: jn(c, ["enter"])
|
9555
9555
|
}, null, 40, sf), [
|
9556
|
-
[
|
9556
|
+
[qi, s.value]
|
9557
9557
|
]),
|
9558
9558
|
g("button", rf, [
|
9559
9559
|
he(lo, { style: { width: "20px", height: "20px" } })
|
@@ -9570,7 +9570,7 @@ const Jl = { class: "widget" }, Gl = { class: "header-widget" }, Kl = { class: "
|
|
9570
9570
|
viewBox: "0 0 87 87",
|
9571
9571
|
fill: "none",
|
9572
9572
|
xmlns: "http://www.w3.org/2000/svg"
|
9573
|
-
}, ff = /* @__PURE__ */
|
9573
|
+
}, ff = /* @__PURE__ */ Hi('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="#F28B0C" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="#F28B0C"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="#F28B0C"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="#F28B0C"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="#F28B0C"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>', 2), hf = [
|
9574
9574
|
ff
|
9575
9575
|
];
|
9576
9576
|
function df(t, e) {
|
@@ -9685,12 +9685,13 @@ function Mf(t, e) {
|
|
9685
9685
|
return L(), $("svg", Nf, Af);
|
9686
9686
|
}
|
9687
9687
|
const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
9688
|
+
key: 0,
|
9688
9689
|
id: "chat-circle",
|
9689
9690
|
class: "widget-container"
|
9690
9691
|
}, Df = {
|
9691
9692
|
key: 0,
|
9692
9693
|
class: "new-message-badge"
|
9693
|
-
}, Lf = { class: "chat-box" }, Ff = /* @__PURE__ */
|
9694
|
+
}, Lf = { class: "chat-box" }, Ff = /* @__PURE__ */ En({
|
9694
9695
|
__name: "Widget",
|
9695
9696
|
props: {
|
9696
9697
|
tokenAuth: { type: String, required: !0 },
|
@@ -9728,7 +9729,7 @@ const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
|
9728
9729
|
return (u, c) => (L(), $("div", {
|
9729
9730
|
class: Me(["widget-css-reset widget-container", t.isDarkMode ? "chat-dark-mode" : ""])
|
9730
9731
|
}, [
|
9731
|
-
|
9732
|
+
n.tokenAuth.length > 10 ? (L(), $("div", If, [
|
9732
9733
|
g("div", {
|
9733
9734
|
class: Me(["container-buttons-chat", { active: o.value }])
|
9734
9735
|
}, [
|
@@ -9762,18 +9763,15 @@ const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
|
9762
9763
|
], 2)
|
9763
9764
|
], 2),
|
9764
9765
|
i.value ? (L(), $("div", Df, Nt(i.value > 9 ? "9+" : i.value), 1)) : Ge("", !0),
|
9765
|
-
|
9766
|
-
key: 1,
|
9766
|
+
g("a", {
|
9767
9767
|
href: "javascript:;",
|
9768
9768
|
onClick: c[3] || (c[3] = (l) => n.tokenAuth.length > 10 && a())
|
9769
9769
|
}, [
|
9770
9770
|
he(mf)
|
9771
|
-
])
|
9772
|
-
],
|
9773
|
-
|
9774
|
-
|
9775
|
-
an(g("div", Lf, [
|
9776
|
-
t.tokenAuth ? (L(), Zi(cf, {
|
9771
|
+
])
|
9772
|
+
])) : Ge("", !0),
|
9773
|
+
Gs(g("div", Lf, [
|
9774
|
+
t.tokenAuth ? (L(), zi(cf, {
|
9777
9775
|
key: 0,
|
9778
9776
|
visible: r.value,
|
9779
9777
|
titlePrincipal: t.titlePrincipal,
|
@@ -9787,11 +9785,11 @@ const Rf = /* @__PURE__ */ oe(xf, [["render", Mf]]), If = {
|
|
9787
9785
|
onNotViewedTotal: c[8] || (c[8] = (l) => i.value = l)
|
9788
9786
|
}, null, 8, ["visible", "titlePrincipal", "tokenAuth", "user"])) : Ge("", !0)
|
9789
9787
|
], 512), [
|
9790
|
-
[
|
9788
|
+
[Zi, r.value]
|
9791
9789
|
])
|
9792
9790
|
], 2));
|
9793
9791
|
}
|
9794
|
-
}), Bf = /* @__PURE__ */ oe(Ff, [["__scopeId", "data-v-
|
9792
|
+
}), Bf = /* @__PURE__ */ oe(Ff, [["__scopeId", "data-v-d00de765"]]), $f = {
|
9795
9793
|
install(t, e) {
|
9796
9794
|
window.VITE_BACKEND_URL = e.VITE_BACKEND_URL, window.VITE_SOCKET_URI = e.VITE_SOCKET_URI, window.VITE_CELLPHONE_NUMBERS = e.VITE_CELLPHONE_NUMBERS;
|
9797
9795
|
}
|