vbss-translator 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vbss-translator.js +1449 -2077
- package/dist/vbss-translator.umd.cjs +9 -38
- package/package.json +3 -3
package/dist/vbss-translator.js
CHANGED
|
@@ -1,664 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @license React
|
|
8
|
-
* react-jsx-runtime.production.min.js
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
var Ut;
|
|
16
|
-
function an() {
|
|
17
|
-
if (Ut) return Se;
|
|
18
|
-
Ut = 1;
|
|
19
|
-
var t = ar, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
20
|
-
function i(l, f, d) {
|
|
21
|
-
var u, h = {}, _ = null, k = null;
|
|
22
|
-
d !== void 0 && (_ = "" + d), f.key !== void 0 && (_ = "" + f.key), f.ref !== void 0 && (k = f.ref);
|
|
23
|
-
for (u in f) n.call(f, u) && !a.hasOwnProperty(u) && (h[u] = f[u]);
|
|
24
|
-
if (l && l.defaultProps) for (u in f = l.defaultProps, f) h[u] === void 0 && (h[u] = f[u]);
|
|
25
|
-
return { $$typeof: e, type: l, key: _, ref: k, props: h, _owner: s.current };
|
|
26
|
-
}
|
|
27
|
-
return Se.Fragment = r, Se.jsx = i, Se.jsxs = i, Se;
|
|
28
|
-
}
|
|
29
|
-
var Ae = {};
|
|
30
|
-
/**
|
|
31
|
-
* @license React
|
|
32
|
-
* react-jsx-runtime.development.js
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the MIT license found in the
|
|
37
|
-
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/
|
|
39
|
-
var It;
|
|
40
|
-
function ln() {
|
|
41
|
-
return It || (It = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
42
|
-
var t = ar, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), l = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), m = Symbol.iterator, y = "@@iterator";
|
|
43
|
-
function g(o) {
|
|
44
|
-
if (o === null || typeof o != "object")
|
|
45
|
-
return null;
|
|
46
|
-
var p = m && o[m] || o[y];
|
|
47
|
-
return typeof p == "function" ? p : null;
|
|
48
|
-
}
|
|
49
|
-
var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
50
|
-
function L(o) {
|
|
51
|
-
{
|
|
52
|
-
for (var p = arguments.length, E = new Array(p > 1 ? p - 1 : 0), v = 1; v < p; v++)
|
|
53
|
-
E[v - 1] = arguments[v];
|
|
54
|
-
D("error", o, E);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function D(o, p, E) {
|
|
58
|
-
{
|
|
59
|
-
var v = A.ReactDebugCurrentFrame, P = v.getStackAddendum();
|
|
60
|
-
P !== "" && (p += "%s", E = E.concat([P]));
|
|
61
|
-
var F = E.map(function(S) {
|
|
62
|
-
return String(S);
|
|
63
|
-
});
|
|
64
|
-
F.unshift("Warning: " + p), Function.prototype.apply.call(console[o], console, F);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
var C = !1, $ = !1, se = !1, q = !1, W = !1, Z;
|
|
68
|
-
Z = Symbol.for("react.module.reference");
|
|
69
|
-
function fe(o) {
|
|
70
|
-
return !!(typeof o == "string" || typeof o == "function" || o === n || o === a || W || o === s || o === d || o === u || q || o === k || C || $ || se || typeof o == "object" && o !== null && (o.$$typeof === _ || o.$$typeof === h || o.$$typeof === i || o.$$typeof === l || o.$$typeof === f || // This needs to include all possible module reference object
|
|
71
|
-
// types supported by any Flight configuration anywhere since
|
|
72
|
-
// we don't know which Flight build this will end up being used
|
|
73
|
-
// with.
|
|
74
|
-
o.$$typeof === Z || o.getModuleId !== void 0));
|
|
75
|
-
}
|
|
76
|
-
function le(o, p, E) {
|
|
77
|
-
var v = o.displayName;
|
|
78
|
-
if (v)
|
|
79
|
-
return v;
|
|
80
|
-
var P = p.displayName || p.name || "";
|
|
81
|
-
return P !== "" ? E + "(" + P + ")" : E;
|
|
82
|
-
}
|
|
83
|
-
function ie(o) {
|
|
84
|
-
return o.displayName || "Context";
|
|
85
|
-
}
|
|
86
|
-
function H(o) {
|
|
87
|
-
if (o == null)
|
|
88
|
-
return null;
|
|
89
|
-
if (typeof o.tag == "number" && L("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
90
|
-
return o.displayName || o.name || null;
|
|
91
|
-
if (typeof o == "string")
|
|
92
|
-
return o;
|
|
93
|
-
switch (o) {
|
|
94
|
-
case n:
|
|
95
|
-
return "Fragment";
|
|
96
|
-
case r:
|
|
97
|
-
return "Portal";
|
|
98
|
-
case a:
|
|
99
|
-
return "Profiler";
|
|
100
|
-
case s:
|
|
101
|
-
return "StrictMode";
|
|
102
|
-
case d:
|
|
103
|
-
return "Suspense";
|
|
104
|
-
case u:
|
|
105
|
-
return "SuspenseList";
|
|
106
|
-
}
|
|
107
|
-
if (typeof o == "object")
|
|
108
|
-
switch (o.$$typeof) {
|
|
109
|
-
case l:
|
|
110
|
-
var p = o;
|
|
111
|
-
return ie(p) + ".Consumer";
|
|
112
|
-
case i:
|
|
113
|
-
var E = o;
|
|
114
|
-
return ie(E._context) + ".Provider";
|
|
115
|
-
case f:
|
|
116
|
-
return le(o, o.render, "ForwardRef");
|
|
117
|
-
case h:
|
|
118
|
-
var v = o.displayName || null;
|
|
119
|
-
return v !== null ? v : H(o.type) || "Memo";
|
|
120
|
-
case _: {
|
|
121
|
-
var P = o, F = P._payload, S = P._init;
|
|
122
|
-
try {
|
|
123
|
-
return H(S(F));
|
|
124
|
-
} catch {
|
|
125
|
-
return null;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
var K = Object.assign, b = 0, R, x, T, N, oe, U, M;
|
|
132
|
-
function J() {
|
|
133
|
-
}
|
|
134
|
-
J.__reactDisabledLog = !0;
|
|
135
|
-
function ue() {
|
|
136
|
-
{
|
|
137
|
-
if (b === 0) {
|
|
138
|
-
R = console.log, x = console.info, T = console.warn, N = console.error, oe = console.group, U = console.groupCollapsed, M = console.groupEnd;
|
|
139
|
-
var o = {
|
|
140
|
-
configurable: !0,
|
|
141
|
-
enumerable: !0,
|
|
142
|
-
value: J,
|
|
143
|
-
writable: !0
|
|
144
|
-
};
|
|
145
|
-
Object.defineProperties(console, {
|
|
146
|
-
info: o,
|
|
147
|
-
log: o,
|
|
148
|
-
warn: o,
|
|
149
|
-
error: o,
|
|
150
|
-
group: o,
|
|
151
|
-
groupCollapsed: o,
|
|
152
|
-
groupEnd: o
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
b++;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function de() {
|
|
159
|
-
{
|
|
160
|
-
if (b--, b === 0) {
|
|
161
|
-
var o = {
|
|
162
|
-
configurable: !0,
|
|
163
|
-
enumerable: !0,
|
|
164
|
-
writable: !0
|
|
165
|
-
};
|
|
166
|
-
Object.defineProperties(console, {
|
|
167
|
-
log: K({}, o, {
|
|
168
|
-
value: R
|
|
169
|
-
}),
|
|
170
|
-
info: K({}, o, {
|
|
171
|
-
value: x
|
|
172
|
-
}),
|
|
173
|
-
warn: K({}, o, {
|
|
174
|
-
value: T
|
|
175
|
-
}),
|
|
176
|
-
error: K({}, o, {
|
|
177
|
-
value: N
|
|
178
|
-
}),
|
|
179
|
-
group: K({}, o, {
|
|
180
|
-
value: oe
|
|
181
|
-
}),
|
|
182
|
-
groupCollapsed: K({}, o, {
|
|
183
|
-
value: U
|
|
184
|
-
}),
|
|
185
|
-
groupEnd: K({}, o, {
|
|
186
|
-
value: M
|
|
187
|
-
})
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
b < 0 && L("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
var je = A.ReactCurrentDispatcher, xe;
|
|
194
|
-
function be(o, p, E) {
|
|
195
|
-
{
|
|
196
|
-
if (xe === void 0)
|
|
197
|
-
try {
|
|
198
|
-
throw Error();
|
|
199
|
-
} catch (P) {
|
|
200
|
-
var v = P.stack.trim().match(/\n( *(at )?)/);
|
|
201
|
-
xe = v && v[1] || "";
|
|
202
|
-
}
|
|
203
|
-
return `
|
|
204
|
-
` + xe + o;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
var ee = !1, he;
|
|
208
|
-
{
|
|
209
|
-
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
210
|
-
he = new Ue();
|
|
211
|
-
}
|
|
212
|
-
function Ee(o, p) {
|
|
213
|
-
if (!o || ee)
|
|
214
|
-
return "";
|
|
215
|
-
{
|
|
216
|
-
var E = he.get(o);
|
|
217
|
-
if (E !== void 0)
|
|
218
|
-
return E;
|
|
219
|
-
}
|
|
220
|
-
var v;
|
|
221
|
-
ee = !0;
|
|
222
|
-
var P = Error.prepareStackTrace;
|
|
223
|
-
Error.prepareStackTrace = void 0;
|
|
224
|
-
var F;
|
|
225
|
-
F = je.current, je.current = null, ue();
|
|
226
|
-
try {
|
|
227
|
-
if (p) {
|
|
228
|
-
var S = function() {
|
|
229
|
-
throw Error();
|
|
230
|
-
};
|
|
231
|
-
if (Object.defineProperty(S.prototype, "props", {
|
|
232
|
-
set: function() {
|
|
233
|
-
throw Error();
|
|
234
|
-
}
|
|
235
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
236
|
-
try {
|
|
237
|
-
Reflect.construct(S, []);
|
|
238
|
-
} catch (Y) {
|
|
239
|
-
v = Y;
|
|
240
|
-
}
|
|
241
|
-
Reflect.construct(o, [], S);
|
|
242
|
-
} else {
|
|
243
|
-
try {
|
|
244
|
-
S.call();
|
|
245
|
-
} catch (Y) {
|
|
246
|
-
v = Y;
|
|
247
|
-
}
|
|
248
|
-
o.call(S.prototype);
|
|
249
|
-
}
|
|
250
|
-
} else {
|
|
251
|
-
try {
|
|
252
|
-
throw Error();
|
|
253
|
-
} catch (Y) {
|
|
254
|
-
v = Y;
|
|
255
|
-
}
|
|
256
|
-
o();
|
|
257
|
-
}
|
|
258
|
-
} catch (Y) {
|
|
259
|
-
if (Y && v && typeof Y.stack == "string") {
|
|
260
|
-
for (var O = Y.stack.split(`
|
|
261
|
-
`), z = v.stack.split(`
|
|
262
|
-
`), I = O.length - 1, B = z.length - 1; I >= 1 && B >= 0 && O[I] !== z[B]; )
|
|
263
|
-
B--;
|
|
264
|
-
for (; I >= 1 && B >= 0; I--, B--)
|
|
265
|
-
if (O[I] !== z[B]) {
|
|
266
|
-
if (I !== 1 || B !== 1)
|
|
267
|
-
do
|
|
268
|
-
if (I--, B--, B < 0 || O[I] !== z[B]) {
|
|
269
|
-
var re = `
|
|
270
|
-
` + O[I].replace(" at new ", " at ");
|
|
271
|
-
return o.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", o.displayName)), typeof o == "function" && he.set(o, re), re;
|
|
272
|
-
}
|
|
273
|
-
while (I >= 1 && B >= 0);
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
} finally {
|
|
278
|
-
ee = !1, je.current = F, de(), Error.prepareStackTrace = P;
|
|
279
|
-
}
|
|
280
|
-
var Re = o ? o.displayName || o.name : "", pe = Re ? be(Re) : "";
|
|
281
|
-
return typeof o == "function" && he.set(o, pe), pe;
|
|
282
|
-
}
|
|
283
|
-
function rt(o, p, E) {
|
|
284
|
-
return Ee(o, !1);
|
|
285
|
-
}
|
|
286
|
-
function kr(o) {
|
|
287
|
-
var p = o.prototype;
|
|
288
|
-
return !!(p && p.isReactComponent);
|
|
289
|
-
}
|
|
290
|
-
function Ie(o, p, E) {
|
|
291
|
-
if (o == null)
|
|
292
|
-
return "";
|
|
293
|
-
if (typeof o == "function")
|
|
294
|
-
return Ee(o, kr(o));
|
|
295
|
-
if (typeof o == "string")
|
|
296
|
-
return be(o);
|
|
297
|
-
switch (o) {
|
|
298
|
-
case d:
|
|
299
|
-
return be("Suspense");
|
|
300
|
-
case u:
|
|
301
|
-
return be("SuspenseList");
|
|
302
|
-
}
|
|
303
|
-
if (typeof o == "object")
|
|
304
|
-
switch (o.$$typeof) {
|
|
305
|
-
case f:
|
|
306
|
-
return rt(o.render);
|
|
307
|
-
case h:
|
|
308
|
-
return Ie(o.type, p, E);
|
|
309
|
-
case _: {
|
|
310
|
-
var v = o, P = v._payload, F = v._init;
|
|
311
|
-
try {
|
|
312
|
-
return Ie(F(P), p, E);
|
|
313
|
-
} catch {
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
return "";
|
|
318
|
-
}
|
|
319
|
-
var Oe = Object.prototype.hasOwnProperty, vt = {}, _t = A.ReactDebugCurrentFrame;
|
|
320
|
-
function Me(o) {
|
|
321
|
-
if (o) {
|
|
322
|
-
var p = o._owner, E = Ie(o.type, o._source, p ? p.type : null);
|
|
323
|
-
_t.setExtraStackFrame(E);
|
|
324
|
-
} else
|
|
325
|
-
_t.setExtraStackFrame(null);
|
|
326
|
-
}
|
|
327
|
-
function Lr(o, p, E, v, P) {
|
|
328
|
-
{
|
|
329
|
-
var F = Function.call.bind(Oe);
|
|
330
|
-
for (var S in o)
|
|
331
|
-
if (F(o, S)) {
|
|
332
|
-
var O = void 0;
|
|
333
|
-
try {
|
|
334
|
-
if (typeof o[S] != "function") {
|
|
335
|
-
var z = Error((v || "React class") + ": " + E + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
336
|
-
throw z.name = "Invariant Violation", z;
|
|
337
|
-
}
|
|
338
|
-
O = o[S](p, S, v, E, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
339
|
-
} catch (I) {
|
|
340
|
-
O = I;
|
|
341
|
-
}
|
|
342
|
-
O && !(O instanceof Error) && (Me(P), L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", E, S, typeof O), Me(null)), O instanceof Error && !(O.message in vt) && (vt[O.message] = !0, Me(P), L("Failed %s type: %s", E, O.message), Me(null));
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
var Dr = Array.isArray;
|
|
347
|
-
function nt(o) {
|
|
348
|
-
return Dr(o);
|
|
349
|
-
}
|
|
350
|
-
function Fr(o) {
|
|
351
|
-
{
|
|
352
|
-
var p = typeof Symbol == "function" && Symbol.toStringTag, E = p && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
353
|
-
return E;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
function Nr(o) {
|
|
357
|
-
try {
|
|
358
|
-
return xt(o), !1;
|
|
359
|
-
} catch {
|
|
360
|
-
return !0;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
function xt(o) {
|
|
364
|
-
return "" + o;
|
|
365
|
-
}
|
|
366
|
-
function Ot(o) {
|
|
367
|
-
if (Nr(o))
|
|
368
|
-
return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Fr(o)), xt(o);
|
|
369
|
-
}
|
|
370
|
-
var St = A.ReactCurrentOwner, jr = {
|
|
371
|
-
key: !0,
|
|
372
|
-
ref: !0,
|
|
373
|
-
__self: !0,
|
|
374
|
-
__source: !0
|
|
375
|
-
}, At, Ct;
|
|
376
|
-
function Ur(o) {
|
|
377
|
-
if (Oe.call(o, "ref")) {
|
|
378
|
-
var p = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
379
|
-
if (p && p.isReactWarning)
|
|
380
|
-
return !1;
|
|
381
|
-
}
|
|
382
|
-
return o.ref !== void 0;
|
|
383
|
-
}
|
|
384
|
-
function Ir(o) {
|
|
385
|
-
if (Oe.call(o, "key")) {
|
|
386
|
-
var p = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
387
|
-
if (p && p.isReactWarning)
|
|
388
|
-
return !1;
|
|
389
|
-
}
|
|
390
|
-
return o.key !== void 0;
|
|
391
|
-
}
|
|
392
|
-
function Mr(o, p) {
|
|
393
|
-
typeof o.ref == "string" && St.current;
|
|
394
|
-
}
|
|
395
|
-
function Br(o, p) {
|
|
396
|
-
{
|
|
397
|
-
var E = function() {
|
|
398
|
-
At || (At = !0, L("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
|
399
|
-
};
|
|
400
|
-
E.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
401
|
-
get: E,
|
|
402
|
-
configurable: !0
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
function $r(o, p) {
|
|
407
|
-
{
|
|
408
|
-
var E = function() {
|
|
409
|
-
Ct || (Ct = !0, L("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
|
410
|
-
};
|
|
411
|
-
E.isReactWarning = !0, Object.defineProperty(o, "ref", {
|
|
412
|
-
get: E,
|
|
413
|
-
configurable: !0
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
var qr = function(o, p, E, v, P, F, S) {
|
|
418
|
-
var O = {
|
|
419
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
420
|
-
$$typeof: e,
|
|
421
|
-
// Built-in properties that belong on the element
|
|
422
|
-
type: o,
|
|
423
|
-
key: p,
|
|
424
|
-
ref: E,
|
|
425
|
-
props: S,
|
|
426
|
-
// Record the component responsible for creating this element.
|
|
427
|
-
_owner: F
|
|
428
|
-
};
|
|
429
|
-
return O._store = {}, Object.defineProperty(O._store, "validated", {
|
|
430
|
-
configurable: !1,
|
|
431
|
-
enumerable: !1,
|
|
432
|
-
writable: !0,
|
|
433
|
-
value: !1
|
|
434
|
-
}), Object.defineProperty(O, "_self", {
|
|
435
|
-
configurable: !1,
|
|
436
|
-
enumerable: !1,
|
|
437
|
-
writable: !1,
|
|
438
|
-
value: v
|
|
439
|
-
}), Object.defineProperty(O, "_source", {
|
|
440
|
-
configurable: !1,
|
|
441
|
-
enumerable: !1,
|
|
442
|
-
writable: !1,
|
|
443
|
-
value: P
|
|
444
|
-
}), Object.freeze && (Object.freeze(O.props), Object.freeze(O)), O;
|
|
445
|
-
};
|
|
446
|
-
function Hr(o, p, E, v, P) {
|
|
447
|
-
{
|
|
448
|
-
var F, S = {}, O = null, z = null;
|
|
449
|
-
E !== void 0 && (Ot(E), O = "" + E), Ir(p) && (Ot(p.key), O = "" + p.key), Ur(p) && (z = p.ref, Mr(p, P));
|
|
450
|
-
for (F in p)
|
|
451
|
-
Oe.call(p, F) && !jr.hasOwnProperty(F) && (S[F] = p[F]);
|
|
452
|
-
if (o && o.defaultProps) {
|
|
453
|
-
var I = o.defaultProps;
|
|
454
|
-
for (F in I)
|
|
455
|
-
S[F] === void 0 && (S[F] = I[F]);
|
|
456
|
-
}
|
|
457
|
-
if (O || z) {
|
|
458
|
-
var B = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
459
|
-
O && Br(S, B), z && $r(S, B);
|
|
460
|
-
}
|
|
461
|
-
return qr(o, O, z, P, v, St.current, S);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
var st = A.ReactCurrentOwner, Pt = A.ReactDebugCurrentFrame;
|
|
465
|
-
function we(o) {
|
|
466
|
-
if (o) {
|
|
467
|
-
var p = o._owner, E = Ie(o.type, o._source, p ? p.type : null);
|
|
468
|
-
Pt.setExtraStackFrame(E);
|
|
469
|
-
} else
|
|
470
|
-
Pt.setExtraStackFrame(null);
|
|
471
|
-
}
|
|
472
|
-
var ot;
|
|
473
|
-
ot = !1;
|
|
474
|
-
function at(o) {
|
|
475
|
-
return typeof o == "object" && o !== null && o.$$typeof === e;
|
|
476
|
-
}
|
|
477
|
-
function kt() {
|
|
478
|
-
{
|
|
479
|
-
if (st.current) {
|
|
480
|
-
var o = H(st.current.type);
|
|
481
|
-
if (o)
|
|
482
|
-
return `
|
|
483
|
-
|
|
484
|
-
Check the render method of \`` + o + "`.";
|
|
485
|
-
}
|
|
486
|
-
return "";
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
function Kr(o) {
|
|
490
|
-
return "";
|
|
491
|
-
}
|
|
492
|
-
var Lt = {};
|
|
493
|
-
function Vr(o) {
|
|
494
|
-
{
|
|
495
|
-
var p = kt();
|
|
496
|
-
if (!p) {
|
|
497
|
-
var E = typeof o == "string" ? o : o.displayName || o.name;
|
|
498
|
-
E && (p = `
|
|
499
|
-
|
|
500
|
-
Check the top-level render call using <` + E + ">.");
|
|
501
|
-
}
|
|
502
|
-
return p;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
function Dt(o, p) {
|
|
506
|
-
{
|
|
507
|
-
if (!o._store || o._store.validated || o.key != null)
|
|
508
|
-
return;
|
|
509
|
-
o._store.validated = !0;
|
|
510
|
-
var E = Vr(p);
|
|
511
|
-
if (Lt[E])
|
|
512
|
-
return;
|
|
513
|
-
Lt[E] = !0;
|
|
514
|
-
var v = "";
|
|
515
|
-
o && o._owner && o._owner !== st.current && (v = " It was passed a child from " + H(o._owner.type) + "."), we(o), L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, v), we(null);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
function Ft(o, p) {
|
|
519
|
-
{
|
|
520
|
-
if (typeof o != "object")
|
|
521
|
-
return;
|
|
522
|
-
if (nt(o))
|
|
523
|
-
for (var E = 0; E < o.length; E++) {
|
|
524
|
-
var v = o[E];
|
|
525
|
-
at(v) && Dt(v, p);
|
|
526
|
-
}
|
|
527
|
-
else if (at(o))
|
|
528
|
-
o._store && (o._store.validated = !0);
|
|
529
|
-
else if (o) {
|
|
530
|
-
var P = g(o);
|
|
531
|
-
if (typeof P == "function" && P !== o.entries)
|
|
532
|
-
for (var F = P.call(o), S; !(S = F.next()).done; )
|
|
533
|
-
at(S.value) && Dt(S.value, p);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
function Wr(o) {
|
|
538
|
-
{
|
|
539
|
-
var p = o.type;
|
|
540
|
-
if (p == null || typeof p == "string")
|
|
541
|
-
return;
|
|
542
|
-
var E;
|
|
543
|
-
if (typeof p == "function")
|
|
544
|
-
E = p.propTypes;
|
|
545
|
-
else if (typeof p == "object" && (p.$$typeof === f || // Note: Memo only checks outer props here.
|
|
546
|
-
// Inner props are checked in the reconciler.
|
|
547
|
-
p.$$typeof === h))
|
|
548
|
-
E = p.propTypes;
|
|
549
|
-
else
|
|
550
|
-
return;
|
|
551
|
-
if (E) {
|
|
552
|
-
var v = H(p);
|
|
553
|
-
Lr(E, o.props, "prop", v, o);
|
|
554
|
-
} else if (p.PropTypes !== void 0 && !ot) {
|
|
555
|
-
ot = !0;
|
|
556
|
-
var P = H(p);
|
|
557
|
-
L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
|
|
558
|
-
}
|
|
559
|
-
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
function zr(o) {
|
|
563
|
-
{
|
|
564
|
-
for (var p = Object.keys(o.props), E = 0; E < p.length; E++) {
|
|
565
|
-
var v = p[E];
|
|
566
|
-
if (v !== "children" && v !== "key") {
|
|
567
|
-
we(o), L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), we(null);
|
|
568
|
-
break;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
o.ref !== null && (we(o), L("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
var Nt = {};
|
|
575
|
-
function jt(o, p, E, v, P, F) {
|
|
576
|
-
{
|
|
577
|
-
var S = fe(o);
|
|
578
|
-
if (!S) {
|
|
579
|
-
var O = "";
|
|
580
|
-
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (O += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
581
|
-
var z = Kr();
|
|
582
|
-
z ? O += z : O += kt();
|
|
583
|
-
var I;
|
|
584
|
-
o === null ? I = "null" : nt(o) ? I = "array" : o !== void 0 && o.$$typeof === e ? (I = "<" + (H(o.type) || "Unknown") + " />", O = " Did you accidentally export a JSX literal instead of a component?") : I = typeof o, L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, O);
|
|
585
|
-
}
|
|
586
|
-
var B = Hr(o, p, E, P, F);
|
|
587
|
-
if (B == null)
|
|
588
|
-
return B;
|
|
589
|
-
if (S) {
|
|
590
|
-
var re = p.children;
|
|
591
|
-
if (re !== void 0)
|
|
592
|
-
if (v)
|
|
593
|
-
if (nt(re)) {
|
|
594
|
-
for (var Re = 0; Re < re.length; Re++)
|
|
595
|
-
Ft(re[Re], o);
|
|
596
|
-
Object.freeze && Object.freeze(re);
|
|
597
|
-
} else
|
|
598
|
-
L("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
599
|
-
else
|
|
600
|
-
Ft(re, o);
|
|
601
|
-
}
|
|
602
|
-
if (Oe.call(p, "key")) {
|
|
603
|
-
var pe = H(o), Y = Object.keys(p).filter(function(Zr) {
|
|
604
|
-
return Zr !== "key";
|
|
605
|
-
}), it = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
606
|
-
if (!Nt[pe + it]) {
|
|
607
|
-
var Qr = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
|
|
608
|
-
L(`A props object containing a "key" prop is being spread into JSX:
|
|
609
|
-
let props = %s;
|
|
610
|
-
<%s {...props} />
|
|
611
|
-
React keys must be passed directly to JSX without using spread:
|
|
612
|
-
let props = %s;
|
|
613
|
-
<%s key={someKey} {...props} />`, it, pe, Qr, pe), Nt[pe + it] = !0;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
return o === n ? zr(B) : Wr(B), B;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
function Jr(o, p, E) {
|
|
620
|
-
return jt(o, p, E, !0);
|
|
621
|
-
}
|
|
622
|
-
function Yr(o, p, E) {
|
|
623
|
-
return jt(o, p, E, !1);
|
|
624
|
-
}
|
|
625
|
-
var Gr = Yr, Xr = Jr;
|
|
626
|
-
Ae.Fragment = n, Ae.jsx = Gr, Ae.jsxs = Xr;
|
|
627
|
-
})()), Ae;
|
|
628
|
-
}
|
|
629
|
-
var Mt;
|
|
630
|
-
function cn() {
|
|
631
|
-
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? qe.exports = an() : qe.exports = ln()), qe.exports;
|
|
632
|
-
}
|
|
633
|
-
var un = cn();
|
|
634
|
-
const ir = rn(
|
|
1
|
+
var Mt = Object.defineProperty;
|
|
2
|
+
var It = (t, e, n) => e in t ? Mt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var B = (t, e, n) => It(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as Ht } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as qt, useContext as Kt, useMemo as z, useState as he, useEffect as Pe, useCallback as pe, useRef as $t, startTransition as Vt } from "react";
|
|
6
|
+
const ft = qt(
|
|
635
7
|
null
|
|
636
|
-
),
|
|
637
|
-
const t =
|
|
8
|
+
), zt = () => {
|
|
9
|
+
const t = Kt(ft);
|
|
638
10
|
if (!t)
|
|
639
11
|
throw new Error(
|
|
640
12
|
"useTranslatorContext must be used within a TranslatorProvider"
|
|
641
13
|
);
|
|
642
14
|
return t;
|
|
643
15
|
};
|
|
644
|
-
class
|
|
645
|
-
constructor(
|
|
646
|
-
super(
|
|
647
|
-
|
|
16
|
+
class ze extends Error {
|
|
17
|
+
constructor(n) {
|
|
18
|
+
super(n);
|
|
19
|
+
B(this, "code", "timeout");
|
|
648
20
|
this.name = "ExternalTranslationTimeoutError";
|
|
649
21
|
}
|
|
650
22
|
}
|
|
651
|
-
const
|
|
652
|
-
const e = Object.entries(t).sort(([
|
|
23
|
+
const Jt = "auto", ge = (t) => typeof t == "number" && Number.isFinite(t) && t > 0, Wt = (t) => {
|
|
24
|
+
const e = Object.entries(t).sort(([n], [r]) => n === r ? 0 : n < r ? -1 : 1);
|
|
653
25
|
return Object.fromEntries(e);
|
|
654
26
|
};
|
|
655
|
-
class
|
|
27
|
+
class Gt {
|
|
656
28
|
constructor(e) {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
29
|
+
B(this, "provider");
|
|
30
|
+
B(this, "config");
|
|
31
|
+
B(this, "cache");
|
|
32
|
+
B(this, "logger");
|
|
33
|
+
B(this, "inFlight", /* @__PURE__ */ new Map());
|
|
662
34
|
this.provider = e.provider, this.config = e.config, this.cache = e.cache, this.logger = e.logger;
|
|
663
35
|
}
|
|
664
36
|
isEnabled() {
|
|
@@ -672,46 +44,46 @@ class pn {
|
|
|
672
44
|
});
|
|
673
45
|
return;
|
|
674
46
|
}
|
|
675
|
-
const
|
|
676
|
-
if (!await this.shouldTranslate(
|
|
47
|
+
const n = this.normalizeRequest(e);
|
|
48
|
+
if (!await this.shouldTranslate(n.externalRequest)) {
|
|
677
49
|
this.debug("external_translation_skipped", {
|
|
678
|
-
key:
|
|
679
|
-
targetLanguage:
|
|
50
|
+
key: n.externalRequest.key,
|
|
51
|
+
targetLanguage: n.externalRequest.targetLanguage
|
|
680
52
|
});
|
|
681
53
|
return;
|
|
682
54
|
}
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
55
|
+
const r = this.readFromCache(n.cacheKey);
|
|
56
|
+
if (r)
|
|
685
57
|
return this.debug("external_translation_cache_hit", {
|
|
686
|
-
key:
|
|
687
|
-
cacheKey:
|
|
688
|
-
}),
|
|
689
|
-
const s = this.inFlight.get(
|
|
58
|
+
key: n.externalRequest.key,
|
|
59
|
+
cacheKey: n.cacheKey
|
|
60
|
+
}), r;
|
|
61
|
+
const s = this.inFlight.get(n.cacheKey);
|
|
690
62
|
if (s)
|
|
691
63
|
return this.debug("external_translation_deduped", {
|
|
692
|
-
key:
|
|
693
|
-
cacheKey:
|
|
64
|
+
key: n.externalRequest.key,
|
|
65
|
+
cacheKey: n.cacheKey
|
|
694
66
|
}), s;
|
|
695
|
-
const
|
|
696
|
-
return this.inFlight.set(
|
|
67
|
+
const o = this.executeTranslation(n);
|
|
68
|
+
return this.inFlight.set(n.cacheKey, o), o;
|
|
697
69
|
}
|
|
698
70
|
normalizeRequest(e) {
|
|
699
|
-
const
|
|
71
|
+
const n = e.sourceLanguage ?? Jt, r = {
|
|
700
72
|
text: e.text,
|
|
701
|
-
sourceLanguage:
|
|
73
|
+
sourceLanguage: n,
|
|
702
74
|
targetLanguage: e.targetLanguage,
|
|
703
75
|
glossary: e.glossary
|
|
704
|
-
}, s = this.createCacheKey(
|
|
76
|
+
}, s = this.createCacheKey(r), o = ge(e.timeoutMs) ? e.timeoutMs : this.config.timeoutMs;
|
|
705
77
|
return {
|
|
706
78
|
externalRequest: {
|
|
707
79
|
key: e.key,
|
|
708
80
|
text: e.text,
|
|
709
81
|
targetLanguage: e.targetLanguage,
|
|
710
|
-
sourceLanguage:
|
|
82
|
+
sourceLanguage: n
|
|
711
83
|
},
|
|
712
|
-
translateRequest:
|
|
84
|
+
translateRequest: r,
|
|
713
85
|
cacheKey: s,
|
|
714
|
-
timeoutMs:
|
|
86
|
+
timeoutMs: o,
|
|
715
87
|
signal: e.signal
|
|
716
88
|
};
|
|
717
89
|
}
|
|
@@ -720,11 +92,11 @@ class pn {
|
|
|
720
92
|
return !0;
|
|
721
93
|
try {
|
|
722
94
|
return this.config.shouldTranslate(e);
|
|
723
|
-
} catch (
|
|
95
|
+
} catch (n) {
|
|
724
96
|
return this.warn("external_translation_should_translate_error", {
|
|
725
97
|
key: e.key,
|
|
726
98
|
language: e.targetLanguage,
|
|
727
|
-
error:
|
|
99
|
+
error: n
|
|
728
100
|
}), !0;
|
|
729
101
|
}
|
|
730
102
|
}
|
|
@@ -741,92 +113,92 @@ class pn {
|
|
|
741
113
|
key: e.externalRequest.key,
|
|
742
114
|
cacheKey: e.cacheKey
|
|
743
115
|
});
|
|
744
|
-
const
|
|
116
|
+
const n = await this.translateWithTimeout(
|
|
745
117
|
e.translateRequest,
|
|
746
118
|
e.timeoutMs,
|
|
747
119
|
e.signal
|
|
748
120
|
);
|
|
749
|
-
return this.writeToCache(e.cacheKey,
|
|
121
|
+
return this.writeToCache(e.cacheKey, n), this.notifyTranslationComplete(n), this.debug("external_translation_succeeded", {
|
|
750
122
|
key: e.externalRequest.key,
|
|
751
123
|
cacheKey: e.cacheKey
|
|
752
|
-
}),
|
|
753
|
-
} catch (
|
|
754
|
-
const
|
|
755
|
-
this.handleTranslationError(e,
|
|
124
|
+
}), n;
|
|
125
|
+
} catch (n) {
|
|
126
|
+
const r = this.normalizeError(n);
|
|
127
|
+
this.handleTranslationError(e, r);
|
|
756
128
|
return;
|
|
757
129
|
} finally {
|
|
758
130
|
this.inFlight.delete(e.cacheKey);
|
|
759
131
|
}
|
|
760
132
|
}
|
|
761
133
|
async invokeExternalTranslationHook(e) {
|
|
762
|
-
const
|
|
763
|
-
if (!
|
|
134
|
+
const n = this.config.onExternalTranslation;
|
|
135
|
+
if (!n)
|
|
764
136
|
return !0;
|
|
765
137
|
try {
|
|
766
|
-
const
|
|
767
|
-
return typeof
|
|
768
|
-
} catch (
|
|
138
|
+
const r = await n(e);
|
|
139
|
+
return typeof r == "boolean" ? r : !0;
|
|
140
|
+
} catch (r) {
|
|
769
141
|
return this.warn("external_translation_hook_error", {
|
|
770
142
|
key: e.key,
|
|
771
143
|
language: e.targetLanguage,
|
|
772
|
-
error:
|
|
144
|
+
error: r
|
|
773
145
|
}), !0;
|
|
774
146
|
}
|
|
775
147
|
}
|
|
776
|
-
async translateWithTimeout(e,
|
|
148
|
+
async translateWithTimeout(e, n, r) {
|
|
777
149
|
if (!(typeof AbortController == "function"))
|
|
778
150
|
return this.provider.translate(e, {
|
|
779
|
-
timeoutMs:
|
|
780
|
-
signal:
|
|
151
|
+
timeoutMs: ge(n) ? n : void 0,
|
|
152
|
+
signal: r
|
|
781
153
|
});
|
|
782
|
-
const
|
|
154
|
+
const o = new AbortController();
|
|
783
155
|
let i = !1, l;
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
},
|
|
787
|
-
const f =
|
|
788
|
-
i = !0,
|
|
789
|
-
},
|
|
156
|
+
r && (r.aborted ? o.abort() : (l = () => {
|
|
157
|
+
o.abort();
|
|
158
|
+
}, r.addEventListener("abort", l, { once: !0 })));
|
|
159
|
+
const f = ge(n) && n ? setTimeout(() => {
|
|
160
|
+
i = !0, o.abort();
|
|
161
|
+
}, n) : void 0;
|
|
790
162
|
try {
|
|
791
163
|
return await this.provider.translate(e, {
|
|
792
|
-
timeoutMs:
|
|
793
|
-
signal:
|
|
164
|
+
timeoutMs: ge(n) ? n : void 0,
|
|
165
|
+
signal: o.signal
|
|
794
166
|
});
|
|
795
|
-
} catch (
|
|
796
|
-
throw i ? new
|
|
797
|
-
`External translation timed out after ${
|
|
798
|
-
) : (
|
|
167
|
+
} catch (u) {
|
|
168
|
+
throw i ? new ze(
|
|
169
|
+
`External translation timed out after ${n}ms`
|
|
170
|
+
) : (o.signal.aborted && !i, u);
|
|
799
171
|
} finally {
|
|
800
|
-
f && clearTimeout(f), l &&
|
|
172
|
+
f && clearTimeout(f), l && r && r.removeEventListener("abort", l);
|
|
801
173
|
}
|
|
802
174
|
}
|
|
803
175
|
readFromCache(e) {
|
|
804
|
-
var r;
|
|
805
|
-
return (r = this.cache) == null ? void 0 : r.get(e);
|
|
806
|
-
}
|
|
807
|
-
writeToCache(e, r) {
|
|
808
176
|
var n;
|
|
809
|
-
(n = this.cache) == null
|
|
177
|
+
return (n = this.cache) == null ? void 0 : n.get(e);
|
|
810
178
|
}
|
|
811
|
-
|
|
812
|
-
|
|
179
|
+
writeToCache(e, n) {
|
|
180
|
+
var r;
|
|
181
|
+
(r = this.cache) == null || r.set(e, n);
|
|
182
|
+
}
|
|
183
|
+
handleTranslationError(e, n) {
|
|
184
|
+
const r = {
|
|
813
185
|
key: e.externalRequest.key,
|
|
814
186
|
language: e.externalRequest.targetLanguage,
|
|
815
187
|
originalText: e.externalRequest.text,
|
|
816
|
-
error:
|
|
188
|
+
error: n
|
|
817
189
|
};
|
|
818
|
-
this.notifyTranslationError(
|
|
190
|
+
this.notifyTranslationError(r), this.warn("external_fallback_failed", {
|
|
819
191
|
provider: this.provider.type,
|
|
820
|
-
key:
|
|
821
|
-
language:
|
|
822
|
-
errorCode:
|
|
823
|
-
retryable:
|
|
824
|
-
message:
|
|
825
|
-
details:
|
|
192
|
+
key: r.key,
|
|
193
|
+
language: r.language,
|
|
194
|
+
errorCode: n.code,
|
|
195
|
+
retryable: n.retryable,
|
|
196
|
+
message: n.message,
|
|
197
|
+
details: n.details
|
|
826
198
|
});
|
|
827
199
|
}
|
|
828
200
|
normalizeError(e) {
|
|
829
|
-
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof
|
|
201
|
+
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof ze ? {
|
|
830
202
|
code: "timeout",
|
|
831
203
|
message: e.message,
|
|
832
204
|
retryable: !0,
|
|
@@ -850,74 +222,74 @@ class pn {
|
|
|
850
222
|
this.hashText(e.text, e.glossary)
|
|
851
223
|
].join("|");
|
|
852
224
|
}
|
|
853
|
-
hashText(e,
|
|
854
|
-
let
|
|
855
|
-
const s =
|
|
856
|
-
for (let
|
|
857
|
-
|
|
858
|
-
return (
|
|
225
|
+
hashText(e, n) {
|
|
226
|
+
let r = 2166136261;
|
|
227
|
+
const s = n && Object.keys(n).length > 0 ? `${e}|${JSON.stringify(Wt(n))}` : e;
|
|
228
|
+
for (let o = 0; o < s.length; o += 1)
|
|
229
|
+
r ^= s.charCodeAt(o), r += (r << 1) + (r << 4) + (r << 7) + (r << 8) + (r << 24);
|
|
230
|
+
return (r >>> 0).toString(16);
|
|
859
231
|
}
|
|
860
|
-
warn(e,
|
|
861
|
-
const
|
|
232
|
+
warn(e, n) {
|
|
233
|
+
const r = {
|
|
862
234
|
scope: "translator",
|
|
863
235
|
event: e,
|
|
864
|
-
...
|
|
236
|
+
...n
|
|
865
237
|
};
|
|
866
238
|
if (this.logger) {
|
|
867
|
-
this.logger.warn(e,
|
|
239
|
+
this.logger.warn(e, r);
|
|
868
240
|
return;
|
|
869
241
|
}
|
|
870
|
-
console.warn("[vbss-translator]",
|
|
242
|
+
console.warn("[vbss-translator]", r);
|
|
871
243
|
}
|
|
872
|
-
debug(e,
|
|
244
|
+
debug(e, n) {
|
|
873
245
|
var s;
|
|
874
246
|
if (!this.config.debug)
|
|
875
247
|
return;
|
|
876
|
-
const
|
|
248
|
+
const r = {
|
|
877
249
|
scope: "translator",
|
|
878
250
|
event: e,
|
|
879
|
-
...
|
|
251
|
+
...n
|
|
880
252
|
};
|
|
881
253
|
if ((s = this.logger) != null && s.debug) {
|
|
882
|
-
this.logger.debug(e,
|
|
254
|
+
this.logger.debug(e, r);
|
|
883
255
|
return;
|
|
884
256
|
}
|
|
885
|
-
console.debug("[vbss-translator]",
|
|
257
|
+
console.debug("[vbss-translator]", r);
|
|
886
258
|
}
|
|
887
259
|
notifyTranslationComplete(e) {
|
|
888
|
-
const
|
|
889
|
-
if (
|
|
260
|
+
const n = this.config.onTranslationComplete;
|
|
261
|
+
if (n)
|
|
890
262
|
try {
|
|
891
|
-
|
|
892
|
-
} catch (
|
|
263
|
+
n(e);
|
|
264
|
+
} catch (r) {
|
|
893
265
|
this.warn("external_translation_complete_callback_error", {
|
|
894
266
|
provider: this.provider.type,
|
|
895
|
-
error:
|
|
267
|
+
error: r
|
|
896
268
|
});
|
|
897
269
|
}
|
|
898
270
|
}
|
|
899
271
|
notifyTranslationError(e) {
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
272
|
+
const n = this.config.onTranslationError;
|
|
273
|
+
if (n)
|
|
902
274
|
try {
|
|
903
|
-
|
|
904
|
-
} catch (
|
|
275
|
+
n(e);
|
|
276
|
+
} catch (r) {
|
|
905
277
|
this.warn("external_translation_error_callback_error", {
|
|
906
278
|
provider: this.provider.type,
|
|
907
279
|
key: e.key,
|
|
908
280
|
language: e.language,
|
|
909
|
-
error:
|
|
281
|
+
error: r
|
|
910
282
|
});
|
|
911
283
|
}
|
|
912
284
|
}
|
|
913
285
|
}
|
|
914
|
-
const
|
|
915
|
-
class
|
|
286
|
+
const Le = () => Date.now(), me = (t) => typeof t == "number" && Number.isFinite(t) && t > 0;
|
|
287
|
+
class Xt {
|
|
916
288
|
constructor(e) {
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
289
|
+
B(this, "store", /* @__PURE__ */ new Map());
|
|
290
|
+
B(this, "enabled");
|
|
291
|
+
B(this, "ttlMs");
|
|
292
|
+
B(this, "maxEntries");
|
|
921
293
|
this.enabled = e.enabled, this.ttlMs = Math.max(0, e.ttlMs), this.maxEntries = e.maxEntries;
|
|
922
294
|
}
|
|
923
295
|
isEnabled() {
|
|
@@ -938,23 +310,23 @@ class gn {
|
|
|
938
310
|
get(e) {
|
|
939
311
|
if (!this.enabled)
|
|
940
312
|
return;
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
943
|
-
if (this.isExpired(
|
|
313
|
+
const n = this.store.get(e);
|
|
314
|
+
if (n) {
|
|
315
|
+
if (this.isExpired(n)) {
|
|
944
316
|
this.store.delete(e);
|
|
945
317
|
return;
|
|
946
318
|
}
|
|
947
|
-
return
|
|
319
|
+
return n.value;
|
|
948
320
|
}
|
|
949
321
|
}
|
|
950
|
-
set(e,
|
|
322
|
+
set(e, n, r) {
|
|
951
323
|
if (!this.enabled)
|
|
952
324
|
return;
|
|
953
|
-
const s =
|
|
325
|
+
const s = me(r) ? r : this.ttlMs, o = me(s) ? Le() + s : void 0;
|
|
954
326
|
this.store.set(e, {
|
|
955
|
-
value:
|
|
956
|
-
expiresAt:
|
|
957
|
-
insertedAt:
|
|
327
|
+
value: n,
|
|
328
|
+
expiresAt: o,
|
|
329
|
+
insertedAt: Le()
|
|
958
330
|
}), this.enforceMaxEntries();
|
|
959
331
|
}
|
|
960
332
|
delete(e) {
|
|
@@ -963,324 +335,324 @@ class gn {
|
|
|
963
335
|
has(e) {
|
|
964
336
|
if (!this.enabled)
|
|
965
337
|
return !1;
|
|
966
|
-
const
|
|
967
|
-
return
|
|
338
|
+
const n = this.store.get(e);
|
|
339
|
+
return n ? this.isExpired(n) ? (this.store.delete(e), !1) : !0 : !1;
|
|
968
340
|
}
|
|
969
341
|
entries() {
|
|
970
342
|
const e = [];
|
|
971
|
-
for (const [
|
|
972
|
-
if (this.isExpired(
|
|
973
|
-
this.store.delete(
|
|
343
|
+
for (const [n, r] of this.store.entries()) {
|
|
344
|
+
if (this.isExpired(r)) {
|
|
345
|
+
this.store.delete(n);
|
|
974
346
|
continue;
|
|
975
347
|
}
|
|
976
348
|
e.push({
|
|
977
|
-
key:
|
|
978
|
-
result:
|
|
979
|
-
expiresAt:
|
|
349
|
+
key: n,
|
|
350
|
+
result: r.value,
|
|
351
|
+
expiresAt: r.expiresAt
|
|
980
352
|
});
|
|
981
353
|
}
|
|
982
354
|
return e;
|
|
983
355
|
}
|
|
984
356
|
prune() {
|
|
985
|
-
for (const [e,
|
|
986
|
-
this.isExpired(
|
|
357
|
+
for (const [e, n] of this.store.entries())
|
|
358
|
+
this.isExpired(n) && this.store.delete(e);
|
|
987
359
|
}
|
|
988
360
|
enforceMaxEntries() {
|
|
989
|
-
if (!
|
|
361
|
+
if (!me(this.maxEntries))
|
|
990
362
|
return;
|
|
991
363
|
const e = this.maxEntries;
|
|
992
364
|
for (; this.store.size > e; ) {
|
|
993
|
-
const
|
|
994
|
-
if (!
|
|
365
|
+
const n = this.findOldestKey();
|
|
366
|
+
if (!n)
|
|
995
367
|
break;
|
|
996
|
-
this.store.delete(
|
|
368
|
+
this.store.delete(n);
|
|
997
369
|
}
|
|
998
370
|
}
|
|
999
371
|
findOldestKey() {
|
|
1000
|
-
let e,
|
|
1001
|
-
for (const [
|
|
1002
|
-
s.insertedAt <
|
|
372
|
+
let e, n = Number.POSITIVE_INFINITY;
|
|
373
|
+
for (const [r, s] of this.store.entries())
|
|
374
|
+
s.insertedAt < n && (e = r, n = s.insertedAt);
|
|
1003
375
|
return e;
|
|
1004
376
|
}
|
|
1005
377
|
isExpired(e) {
|
|
1006
|
-
return
|
|
378
|
+
return me(e.expiresAt) ? e.expiresAt <= Le() : !1;
|
|
1007
379
|
}
|
|
1008
380
|
}
|
|
1009
|
-
function
|
|
381
|
+
function ht(t, e) {
|
|
1010
382
|
return function() {
|
|
1011
383
|
return t.apply(e, arguments);
|
|
1012
384
|
};
|
|
1013
385
|
}
|
|
1014
|
-
const { toString:
|
|
1015
|
-
const
|
|
1016
|
-
return t[
|
|
1017
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
1018
|
-
function
|
|
1019
|
-
return t !== null && !
|
|
386
|
+
const { toString: Qt } = Object.prototype, { getPrototypeOf: Te } = Object, { iterator: xe, toStringTag: pt } = Symbol, Oe = /* @__PURE__ */ ((t) => (e) => {
|
|
387
|
+
const n = Qt.call(e);
|
|
388
|
+
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
389
|
+
})(/* @__PURE__ */ Object.create(null)), H = (t) => (t = t.toLowerCase(), (e) => Oe(e) === t), Se = (t) => (e) => typeof e === t, { isArray: re } = Array, ne = Se("undefined");
|
|
390
|
+
function le(t) {
|
|
391
|
+
return t !== null && !ne(t) && t.constructor !== null && !ne(t.constructor) && D(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
1020
392
|
}
|
|
1021
|
-
const
|
|
1022
|
-
function
|
|
393
|
+
const gt = H("ArrayBuffer");
|
|
394
|
+
function Yt(t) {
|
|
1023
395
|
let e;
|
|
1024
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
396
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && gt(t.buffer), e;
|
|
1025
397
|
}
|
|
1026
|
-
const
|
|
1027
|
-
if (
|
|
398
|
+
const Zt = Se("string"), D = Se("function"), mt = Se("number"), ce = (t) => t !== null && typeof t == "object", en = (t) => t === !0 || t === !1, be = (t) => {
|
|
399
|
+
if (Oe(t) !== "object")
|
|
1028
400
|
return !1;
|
|
1029
|
-
const e =
|
|
1030
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
1031
|
-
},
|
|
1032
|
-
if (!
|
|
401
|
+
const e = Te(t);
|
|
402
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(pt in t) && !(xe in t);
|
|
403
|
+
}, tn = (t) => {
|
|
404
|
+
if (!ce(t) || le(t))
|
|
1033
405
|
return !1;
|
|
1034
406
|
try {
|
|
1035
407
|
return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
|
|
1036
408
|
} catch {
|
|
1037
409
|
return !1;
|
|
1038
410
|
}
|
|
1039
|
-
},
|
|
1040
|
-
function
|
|
411
|
+
}, nn = H("Date"), rn = H("File"), sn = (t) => !!(t && typeof t.uri < "u"), on = (t) => t && typeof t.getParts < "u", an = H("Blob"), ln = H("FileList"), cn = (t) => ce(t) && D(t.pipe);
|
|
412
|
+
function un() {
|
|
1041
413
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
1042
414
|
}
|
|
1043
|
-
const
|
|
415
|
+
const Je = un(), We = typeof Je.FormData < "u" ? Je.FormData : void 0, dn = (t) => {
|
|
1044
416
|
if (!t) return !1;
|
|
1045
|
-
if (
|
|
1046
|
-
const e =
|
|
1047
|
-
if (!e || e === Object.prototype || !
|
|
1048
|
-
const
|
|
1049
|
-
return
|
|
1050
|
-
|
|
1051
|
-
},
|
|
417
|
+
if (We && t instanceof We) return !0;
|
|
418
|
+
const e = Te(t);
|
|
419
|
+
if (!e || e === Object.prototype || !D(t.append)) return !1;
|
|
420
|
+
const n = Oe(t);
|
|
421
|
+
return n === "formdata" || // detect form-data instance
|
|
422
|
+
n === "object" && D(t.toString) && t.toString() === "[object FormData]";
|
|
423
|
+
}, fn = H("URLSearchParams"), [hn, pn, gn, mn] = [
|
|
1052
424
|
"ReadableStream",
|
|
1053
425
|
"Request",
|
|
1054
426
|
"Response",
|
|
1055
427
|
"Headers"
|
|
1056
|
-
].map(
|
|
1057
|
-
function
|
|
428
|
+
].map(H), yn = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
429
|
+
function ue(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
1058
430
|
if (t === null || typeof t > "u")
|
|
1059
431
|
return;
|
|
1060
|
-
let
|
|
1061
|
-
if (typeof t != "object" && (t = [t]),
|
|
1062
|
-
for (
|
|
1063
|
-
e.call(null, t[
|
|
432
|
+
let r, s;
|
|
433
|
+
if (typeof t != "object" && (t = [t]), re(t))
|
|
434
|
+
for (r = 0, s = t.length; r < s; r++)
|
|
435
|
+
e.call(null, t[r], r, t);
|
|
1064
436
|
else {
|
|
1065
|
-
if (
|
|
437
|
+
if (le(t))
|
|
1066
438
|
return;
|
|
1067
|
-
const
|
|
439
|
+
const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
|
|
1068
440
|
let l;
|
|
1069
|
-
for (
|
|
1070
|
-
l =
|
|
441
|
+
for (r = 0; r < i; r++)
|
|
442
|
+
l = o[r], e.call(null, t[l], l, t);
|
|
1071
443
|
}
|
|
1072
444
|
}
|
|
1073
|
-
function
|
|
1074
|
-
if (
|
|
445
|
+
function yt(t, e) {
|
|
446
|
+
if (le(t))
|
|
1075
447
|
return null;
|
|
1076
448
|
e = e.toLowerCase();
|
|
1077
|
-
const
|
|
1078
|
-
let
|
|
1079
|
-
for (;
|
|
1080
|
-
if (s = r
|
|
449
|
+
const n = Object.keys(t);
|
|
450
|
+
let r = n.length, s;
|
|
451
|
+
for (; r-- > 0; )
|
|
452
|
+
if (s = n[r], e === s.toLowerCase())
|
|
1081
453
|
return s;
|
|
1082
454
|
return null;
|
|
1083
455
|
}
|
|
1084
|
-
const
|
|
1085
|
-
function
|
|
1086
|
-
const { caseless: t, skipUndefined: e } =
|
|
1087
|
-
if (
|
|
456
|
+
const Q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, bt = (t) => !ne(t) && t !== Q;
|
|
457
|
+
function Ue() {
|
|
458
|
+
const { caseless: t, skipUndefined: e } = bt(this) && this || {}, n = {}, r = (s, o) => {
|
|
459
|
+
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
1088
460
|
return;
|
|
1089
|
-
const i = t &&
|
|
1090
|
-
|
|
461
|
+
const i = t && yt(n, o) || o;
|
|
462
|
+
be(n[i]) && be(s) ? n[i] = Ue(n[i], s) : be(s) ? n[i] = Ue({}, s) : re(s) ? n[i] = s.slice() : (!e || !ne(s)) && (n[i] = s);
|
|
1091
463
|
};
|
|
1092
|
-
for (let s = 0,
|
|
1093
|
-
arguments[s] &&
|
|
1094
|
-
return
|
|
464
|
+
for (let s = 0, o = arguments.length; s < o; s++)
|
|
465
|
+
arguments[s] && ue(arguments[s], r);
|
|
466
|
+
return n;
|
|
1095
467
|
}
|
|
1096
|
-
const
|
|
468
|
+
const bn = (t, e, n, { allOwnKeys: r } = {}) => (ue(
|
|
1097
469
|
e,
|
|
1098
|
-
(s,
|
|
1099
|
-
|
|
1100
|
-
value:
|
|
470
|
+
(s, o) => {
|
|
471
|
+
n && D(s) ? Object.defineProperty(t, o, {
|
|
472
|
+
value: ht(s, n),
|
|
1101
473
|
writable: !0,
|
|
1102
474
|
enumerable: !0,
|
|
1103
475
|
configurable: !0
|
|
1104
|
-
}) : Object.defineProperty(t,
|
|
476
|
+
}) : Object.defineProperty(t, o, {
|
|
1105
477
|
value: s,
|
|
1106
478
|
writable: !0,
|
|
1107
479
|
enumerable: !0,
|
|
1108
480
|
configurable: !0
|
|
1109
481
|
});
|
|
1110
482
|
},
|
|
1111
|
-
{ allOwnKeys:
|
|
1112
|
-
), t),
|
|
1113
|
-
t.prototype = Object.create(e.prototype,
|
|
483
|
+
{ allOwnKeys: r }
|
|
484
|
+
), t), En = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), wn = (t, e, n, r) => {
|
|
485
|
+
t.prototype = Object.create(e.prototype, r), Object.defineProperty(t.prototype, "constructor", {
|
|
1114
486
|
value: t,
|
|
1115
487
|
writable: !0,
|
|
1116
488
|
enumerable: !1,
|
|
1117
489
|
configurable: !0
|
|
1118
490
|
}), Object.defineProperty(t, "super", {
|
|
1119
491
|
value: e.prototype
|
|
1120
|
-
}),
|
|
1121
|
-
},
|
|
1122
|
-
let s,
|
|
492
|
+
}), n && Object.assign(t.prototype, n);
|
|
493
|
+
}, Rn = (t, e, n, r) => {
|
|
494
|
+
let s, o, i;
|
|
1123
495
|
const l = {};
|
|
1124
496
|
if (e = e || {}, t == null) return e;
|
|
1125
497
|
do {
|
|
1126
|
-
for (s = Object.getOwnPropertyNames(t),
|
|
1127
|
-
i = s[
|
|
1128
|
-
t =
|
|
1129
|
-
} while (t && (!
|
|
498
|
+
for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
|
|
499
|
+
i = s[o], (!r || r(i, t, e)) && !l[i] && (e[i] = t[i], l[i] = !0);
|
|
500
|
+
t = n !== !1 && Te(t);
|
|
501
|
+
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
1130
502
|
return e;
|
|
1131
|
-
},
|
|
1132
|
-
t = String(t), (
|
|
1133
|
-
const
|
|
1134
|
-
return
|
|
1135
|
-
},
|
|
503
|
+
}, Tn = (t, e, n) => {
|
|
504
|
+
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
505
|
+
const r = t.indexOf(e, n);
|
|
506
|
+
return r !== -1 && r === n;
|
|
507
|
+
}, xn = (t) => {
|
|
1136
508
|
if (!t) return null;
|
|
1137
|
-
if (
|
|
509
|
+
if (re(t)) return t;
|
|
1138
510
|
let e = t.length;
|
|
1139
|
-
if (!
|
|
1140
|
-
const
|
|
511
|
+
if (!mt(e)) return null;
|
|
512
|
+
const n = new Array(e);
|
|
1141
513
|
for (; e-- > 0; )
|
|
1142
|
-
|
|
1143
|
-
return
|
|
1144
|
-
},
|
|
1145
|
-
const
|
|
514
|
+
n[e] = t[e];
|
|
515
|
+
return n;
|
|
516
|
+
}, On = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Te(Uint8Array)), Sn = (t, e) => {
|
|
517
|
+
const r = (t && t[xe]).call(t);
|
|
1146
518
|
let s;
|
|
1147
|
-
for (; (s =
|
|
1148
|
-
const
|
|
1149
|
-
e.call(t,
|
|
519
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
520
|
+
const o = s.value;
|
|
521
|
+
e.call(t, o[0], o[1]);
|
|
1150
522
|
}
|
|
1151
|
-
},
|
|
1152
|
-
let
|
|
1153
|
-
const
|
|
1154
|
-
for (; (
|
|
1155
|
-
|
|
1156
|
-
return
|
|
1157
|
-
},
|
|
1158
|
-
return
|
|
1159
|
-
}),
|
|
1160
|
-
const
|
|
1161
|
-
|
|
523
|
+
}, _n = (t, e) => {
|
|
524
|
+
let n;
|
|
525
|
+
const r = [];
|
|
526
|
+
for (; (n = t.exec(e)) !== null; )
|
|
527
|
+
r.push(n);
|
|
528
|
+
return r;
|
|
529
|
+
}, An = H("HTMLFormElement"), Cn = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
|
|
530
|
+
return r.toUpperCase() + s;
|
|
531
|
+
}), Ge = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Pn = H("RegExp"), Et = (t, e) => {
|
|
532
|
+
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
533
|
+
ue(n, (s, o) => {
|
|
1162
534
|
let i;
|
|
1163
|
-
(i = e(s,
|
|
1164
|
-
}), Object.defineProperties(t,
|
|
1165
|
-
},
|
|
1166
|
-
|
|
1167
|
-
if (
|
|
535
|
+
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
|
|
536
|
+
}), Object.defineProperties(t, r);
|
|
537
|
+
}, Ln = (t) => {
|
|
538
|
+
Et(t, (e, n) => {
|
|
539
|
+
if (D(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1168
540
|
return !1;
|
|
1169
|
-
const
|
|
1170
|
-
if (
|
|
541
|
+
const r = t[n];
|
|
542
|
+
if (D(r)) {
|
|
1171
543
|
if (e.enumerable = !1, "writable" in e) {
|
|
1172
544
|
e.writable = !1;
|
|
1173
545
|
return;
|
|
1174
546
|
}
|
|
1175
547
|
e.set || (e.set = () => {
|
|
1176
|
-
throw Error("Can not rewrite read-only method '" +
|
|
548
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
1177
549
|
});
|
|
1178
550
|
}
|
|
1179
551
|
});
|
|
1180
|
-
},
|
|
1181
|
-
const
|
|
1182
|
-
s.forEach((
|
|
1183
|
-
|
|
552
|
+
}, kn = (t, e) => {
|
|
553
|
+
const n = {}, r = (s) => {
|
|
554
|
+
s.forEach((o) => {
|
|
555
|
+
n[o] = !0;
|
|
1184
556
|
});
|
|
1185
557
|
};
|
|
1186
|
-
return
|
|
1187
|
-
},
|
|
1188
|
-
},
|
|
1189
|
-
function
|
|
1190
|
-
return !!(t &&
|
|
558
|
+
return re(t) ? r(t) : r(String(t).split(e)), n;
|
|
559
|
+
}, Nn = () => {
|
|
560
|
+
}, vn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
561
|
+
function Dn(t) {
|
|
562
|
+
return !!(t && D(t.append) && t[pt] === "FormData" && t[xe]);
|
|
1191
563
|
}
|
|
1192
|
-
const
|
|
1193
|
-
const e = new Array(10),
|
|
1194
|
-
if (
|
|
1195
|
-
if (e.indexOf(
|
|
564
|
+
const Fn = (t) => {
|
|
565
|
+
const e = new Array(10), n = (r, s) => {
|
|
566
|
+
if (ce(r)) {
|
|
567
|
+
if (e.indexOf(r) >= 0)
|
|
1196
568
|
return;
|
|
1197
|
-
if (
|
|
1198
|
-
return
|
|
1199
|
-
if (!("toJSON" in
|
|
1200
|
-
e[s] =
|
|
1201
|
-
const
|
|
1202
|
-
return
|
|
1203
|
-
const f =
|
|
1204
|
-
!
|
|
1205
|
-
}), e[s] = void 0,
|
|
569
|
+
if (le(r))
|
|
570
|
+
return r;
|
|
571
|
+
if (!("toJSON" in r)) {
|
|
572
|
+
e[s] = r;
|
|
573
|
+
const o = re(r) ? [] : {};
|
|
574
|
+
return ue(r, (i, l) => {
|
|
575
|
+
const f = n(i, s + 1);
|
|
576
|
+
!ne(f) && (o[l] = f);
|
|
577
|
+
}), e[s] = void 0, o;
|
|
1206
578
|
}
|
|
1207
579
|
}
|
|
1208
|
-
return
|
|
580
|
+
return r;
|
|
1209
581
|
};
|
|
1210
|
-
return
|
|
1211
|
-
},
|
|
582
|
+
return n(t, 0);
|
|
583
|
+
}, Un = H("AsyncFunction"), Bn = (t) => t && (ce(t) || D(t)) && D(t.then) && D(t.catch), wt = ((t, e) => t ? setImmediate : e ? ((n, r) => (Q.addEventListener(
|
|
1212
584
|
"message",
|
|
1213
|
-
({ source: s, data:
|
|
1214
|
-
s ===
|
|
585
|
+
({ source: s, data: o }) => {
|
|
586
|
+
s === Q && o === n && r.length && r.shift()();
|
|
1215
587
|
},
|
|
1216
588
|
!1
|
|
1217
589
|
), (s) => {
|
|
1218
|
-
|
|
1219
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
1220
|
-
isArray:
|
|
1221
|
-
isArrayBuffer:
|
|
1222
|
-
isBuffer:
|
|
1223
|
-
isFormData:
|
|
1224
|
-
isArrayBufferView:
|
|
1225
|
-
isString:
|
|
1226
|
-
isNumber:
|
|
1227
|
-
isBoolean:
|
|
1228
|
-
isObject:
|
|
1229
|
-
isPlainObject:
|
|
1230
|
-
isEmptyObject:
|
|
1231
|
-
isReadableStream:
|
|
1232
|
-
isRequest:
|
|
1233
|
-
isResponse:
|
|
1234
|
-
isHeaders:
|
|
1235
|
-
isUndefined:
|
|
1236
|
-
isDate:
|
|
1237
|
-
isFile:
|
|
1238
|
-
isReactNativeBlob:
|
|
1239
|
-
isReactNative:
|
|
1240
|
-
isBlob:
|
|
1241
|
-
isRegExp:
|
|
1242
|
-
isFunction:
|
|
1243
|
-
isStream:
|
|
1244
|
-
isURLSearchParams:
|
|
1245
|
-
isTypedArray:
|
|
1246
|
-
isFileList:
|
|
1247
|
-
forEach:
|
|
1248
|
-
merge:
|
|
1249
|
-
extend:
|
|
1250
|
-
trim:
|
|
1251
|
-
stripBOM:
|
|
1252
|
-
inherits:
|
|
1253
|
-
toFlatObject:
|
|
1254
|
-
kindOf:
|
|
1255
|
-
kindOfTest:
|
|
1256
|
-
endsWith:
|
|
1257
|
-
toArray:
|
|
1258
|
-
forEachEntry:
|
|
1259
|
-
matchAll:
|
|
1260
|
-
isHTMLForm:
|
|
1261
|
-
hasOwnProperty:
|
|
1262
|
-
hasOwnProp:
|
|
590
|
+
r.push(s), Q.postMessage(n, "*");
|
|
591
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", D(Q.postMessage)), jn = typeof queueMicrotask < "u" ? queueMicrotask.bind(Q) : typeof process < "u" && process.nextTick || wt, Mn = (t) => t != null && D(t[xe]), a = {
|
|
592
|
+
isArray: re,
|
|
593
|
+
isArrayBuffer: gt,
|
|
594
|
+
isBuffer: le,
|
|
595
|
+
isFormData: dn,
|
|
596
|
+
isArrayBufferView: Yt,
|
|
597
|
+
isString: Zt,
|
|
598
|
+
isNumber: mt,
|
|
599
|
+
isBoolean: en,
|
|
600
|
+
isObject: ce,
|
|
601
|
+
isPlainObject: be,
|
|
602
|
+
isEmptyObject: tn,
|
|
603
|
+
isReadableStream: hn,
|
|
604
|
+
isRequest: pn,
|
|
605
|
+
isResponse: gn,
|
|
606
|
+
isHeaders: mn,
|
|
607
|
+
isUndefined: ne,
|
|
608
|
+
isDate: nn,
|
|
609
|
+
isFile: rn,
|
|
610
|
+
isReactNativeBlob: sn,
|
|
611
|
+
isReactNative: on,
|
|
612
|
+
isBlob: an,
|
|
613
|
+
isRegExp: Pn,
|
|
614
|
+
isFunction: D,
|
|
615
|
+
isStream: cn,
|
|
616
|
+
isURLSearchParams: fn,
|
|
617
|
+
isTypedArray: On,
|
|
618
|
+
isFileList: ln,
|
|
619
|
+
forEach: ue,
|
|
620
|
+
merge: Ue,
|
|
621
|
+
extend: bn,
|
|
622
|
+
trim: yn,
|
|
623
|
+
stripBOM: En,
|
|
624
|
+
inherits: wn,
|
|
625
|
+
toFlatObject: Rn,
|
|
626
|
+
kindOf: Oe,
|
|
627
|
+
kindOfTest: H,
|
|
628
|
+
endsWith: Tn,
|
|
629
|
+
toArray: xn,
|
|
630
|
+
forEachEntry: Sn,
|
|
631
|
+
matchAll: _n,
|
|
632
|
+
isHTMLForm: An,
|
|
633
|
+
hasOwnProperty: Ge,
|
|
634
|
+
hasOwnProp: Ge,
|
|
1263
635
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1264
|
-
reduceDescriptors:
|
|
1265
|
-
freezeMethods:
|
|
1266
|
-
toObjectSet:
|
|
1267
|
-
toCamelCase:
|
|
1268
|
-
noop:
|
|
1269
|
-
toFiniteNumber:
|
|
1270
|
-
findKey:
|
|
1271
|
-
global:
|
|
1272
|
-
isContextDefined:
|
|
1273
|
-
isSpecCompliantForm:
|
|
1274
|
-
toJSONObject:
|
|
1275
|
-
isAsyncFn:
|
|
1276
|
-
isThenable:
|
|
1277
|
-
setImmediate:
|
|
1278
|
-
asap:
|
|
1279
|
-
isIterable:
|
|
636
|
+
reduceDescriptors: Et,
|
|
637
|
+
freezeMethods: Ln,
|
|
638
|
+
toObjectSet: kn,
|
|
639
|
+
toCamelCase: Cn,
|
|
640
|
+
noop: Nn,
|
|
641
|
+
toFiniteNumber: vn,
|
|
642
|
+
findKey: yt,
|
|
643
|
+
global: Q,
|
|
644
|
+
isContextDefined: bt,
|
|
645
|
+
isSpecCompliantForm: Dn,
|
|
646
|
+
toJSONObject: Fn,
|
|
647
|
+
isAsyncFn: Un,
|
|
648
|
+
isThenable: Bn,
|
|
649
|
+
setImmediate: wt,
|
|
650
|
+
asap: jn,
|
|
651
|
+
isIterable: Mn
|
|
1280
652
|
};
|
|
1281
|
-
let
|
|
1282
|
-
static from(e,
|
|
1283
|
-
const l = new
|
|
653
|
+
let y = class Rt extends Error {
|
|
654
|
+
static from(e, n, r, s, o, i) {
|
|
655
|
+
const l = new Rt(e.message, n || e.code, r, s, o);
|
|
1284
656
|
return l.cause = e, l.name = e.name, e.status != null && l.status == null && (l.status = e.status), i && Object.assign(l, i), l;
|
|
1285
657
|
}
|
|
1286
658
|
/**
|
|
@@ -1294,13 +666,13 @@ let w = class mr extends Error {
|
|
|
1294
666
|
*
|
|
1295
667
|
* @returns {Error} The created error.
|
|
1296
668
|
*/
|
|
1297
|
-
constructor(e,
|
|
669
|
+
constructor(e, n, r, s, o) {
|
|
1298
670
|
super(e), Object.defineProperty(this, "message", {
|
|
1299
671
|
value: e,
|
|
1300
672
|
enumerable: !0,
|
|
1301
673
|
writable: !0,
|
|
1302
674
|
configurable: !0
|
|
1303
|
-
}), this.name = "AxiosError", this.isAxiosError = !0,
|
|
675
|
+
}), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status);
|
|
1304
676
|
}
|
|
1305
677
|
toJSON() {
|
|
1306
678
|
return {
|
|
@@ -1316,113 +688,113 @@ let w = class mr extends Error {
|
|
|
1316
688
|
columnNumber: this.columnNumber,
|
|
1317
689
|
stack: this.stack,
|
|
1318
690
|
// Axios
|
|
1319
|
-
config:
|
|
691
|
+
config: a.toJSONObject(this.config),
|
|
1320
692
|
code: this.code,
|
|
1321
693
|
status: this.status
|
|
1322
694
|
};
|
|
1323
695
|
}
|
|
1324
696
|
};
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
const
|
|
1339
|
-
function
|
|
1340
|
-
return
|
|
697
|
+
y.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
698
|
+
y.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
699
|
+
y.ECONNABORTED = "ECONNABORTED";
|
|
700
|
+
y.ETIMEDOUT = "ETIMEDOUT";
|
|
701
|
+
y.ERR_NETWORK = "ERR_NETWORK";
|
|
702
|
+
y.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
703
|
+
y.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
704
|
+
y.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
705
|
+
y.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
706
|
+
y.ERR_CANCELED = "ERR_CANCELED";
|
|
707
|
+
y.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
708
|
+
y.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
709
|
+
y.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
710
|
+
const In = null;
|
|
711
|
+
function Be(t) {
|
|
712
|
+
return a.isPlainObject(t) || a.isArray(t);
|
|
1341
713
|
}
|
|
1342
|
-
function
|
|
1343
|
-
return
|
|
714
|
+
function Tt(t) {
|
|
715
|
+
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
1344
716
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return t ? t.concat(e).map(function(s,
|
|
1347
|
-
return s =
|
|
1348
|
-
}).join(
|
|
717
|
+
function ke(t, e, n) {
|
|
718
|
+
return t ? t.concat(e).map(function(s, o) {
|
|
719
|
+
return s = Tt(s), !n && o ? "[" + s + "]" : s;
|
|
720
|
+
}).join(n ? "." : "") : e;
|
|
1349
721
|
}
|
|
1350
|
-
function
|
|
1351
|
-
return
|
|
722
|
+
function Hn(t) {
|
|
723
|
+
return a.isArray(t) && !t.some(Be);
|
|
1352
724
|
}
|
|
1353
|
-
const
|
|
725
|
+
const qn = a.toFlatObject(a, {}, null, function(e) {
|
|
1354
726
|
return /^is[A-Z]/.test(e);
|
|
1355
727
|
});
|
|
1356
|
-
function
|
|
1357
|
-
if (!
|
|
728
|
+
function _e(t, e, n) {
|
|
729
|
+
if (!a.isObject(t))
|
|
1358
730
|
throw new TypeError("target must be an object");
|
|
1359
|
-
e = e || new FormData(),
|
|
1360
|
-
|
|
731
|
+
e = e || new FormData(), n = a.toFlatObject(
|
|
732
|
+
n,
|
|
1361
733
|
{
|
|
1362
734
|
metaTokens: !0,
|
|
1363
735
|
dots: !1,
|
|
1364
736
|
indexes: !1
|
|
1365
737
|
},
|
|
1366
738
|
!1,
|
|
1367
|
-
function(
|
|
1368
|
-
return !
|
|
739
|
+
function(h, x) {
|
|
740
|
+
return !a.isUndefined(x[h]);
|
|
1369
741
|
}
|
|
1370
742
|
);
|
|
1371
|
-
const
|
|
1372
|
-
if (!
|
|
743
|
+
const r = n.metaTokens, s = n.visitor || d, o = n.dots, i = n.indexes, l = n.Blob || typeof Blob < "u" && Blob, f = n.maxDepth === void 0 ? 100 : n.maxDepth, u = l && a.isSpecCompliantForm(e);
|
|
744
|
+
if (!a.isFunction(s))
|
|
1373
745
|
throw new TypeError("visitor must be a function");
|
|
1374
|
-
function
|
|
1375
|
-
if (
|
|
1376
|
-
if (
|
|
1377
|
-
return
|
|
1378
|
-
if (
|
|
1379
|
-
return
|
|
1380
|
-
if (!
|
|
1381
|
-
throw new
|
|
1382
|
-
return
|
|
1383
|
-
}
|
|
1384
|
-
function
|
|
1385
|
-
let
|
|
1386
|
-
if (
|
|
1387
|
-
return e.append(
|
|
1388
|
-
if (
|
|
1389
|
-
if (
|
|
1390
|
-
|
|
1391
|
-
else if (
|
|
1392
|
-
return
|
|
1393
|
-
!(
|
|
746
|
+
function c(g) {
|
|
747
|
+
if (g === null) return "";
|
|
748
|
+
if (a.isDate(g))
|
|
749
|
+
return g.toISOString();
|
|
750
|
+
if (a.isBoolean(g))
|
|
751
|
+
return g.toString();
|
|
752
|
+
if (!u && a.isBlob(g))
|
|
753
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
754
|
+
return a.isArrayBuffer(g) || a.isTypedArray(g) ? u && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
755
|
+
}
|
|
756
|
+
function d(g, h, x) {
|
|
757
|
+
let j = g;
|
|
758
|
+
if (a.isReactNative(e) && a.isReactNativeBlob(g))
|
|
759
|
+
return e.append(ke(x, h, o), c(g)), !1;
|
|
760
|
+
if (g && !x && typeof g == "object") {
|
|
761
|
+
if (a.endsWith(h, "{}"))
|
|
762
|
+
h = r ? h : h.slice(0, -2), g = JSON.stringify(g);
|
|
763
|
+
else if (a.isArray(g) && Hn(g) || (a.isFileList(g) || a.endsWith(h, "[]")) && (j = a.toArray(g)))
|
|
764
|
+
return h = Tt(h), j.forEach(function(T, L) {
|
|
765
|
+
!(a.isUndefined(T) || T === null) && e.append(
|
|
1394
766
|
// eslint-disable-next-line no-nested-ternary
|
|
1395
|
-
i === !0 ?
|
|
1396
|
-
|
|
767
|
+
i === !0 ? ke([h], L, o) : i === null ? h : h + "[]",
|
|
768
|
+
c(T)
|
|
1397
769
|
);
|
|
1398
770
|
}), !1;
|
|
1399
771
|
}
|
|
1400
|
-
return
|
|
772
|
+
return Be(g) ? !0 : (e.append(ke(x, h, o), c(g)), !1);
|
|
1401
773
|
}
|
|
1402
|
-
const
|
|
1403
|
-
defaultVisitor:
|
|
1404
|
-
convertValue:
|
|
1405
|
-
isVisitable:
|
|
774
|
+
const R = [], S = Object.assign(qn, {
|
|
775
|
+
defaultVisitor: d,
|
|
776
|
+
convertValue: c,
|
|
777
|
+
isVisitable: Be
|
|
1406
778
|
});
|
|
1407
|
-
function
|
|
1408
|
-
if (!
|
|
1409
|
-
if (
|
|
1410
|
-
throw new
|
|
1411
|
-
"Object is too deeply nested (" +
|
|
1412
|
-
|
|
779
|
+
function p(g, h, x = 0) {
|
|
780
|
+
if (!a.isUndefined(g)) {
|
|
781
|
+
if (x > f)
|
|
782
|
+
throw new y(
|
|
783
|
+
"Object is too deeply nested (" + x + " levels). Max depth: " + f,
|
|
784
|
+
y.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
1413
785
|
);
|
|
1414
|
-
if (
|
|
1415
|
-
throw Error("Circular reference detected in " +
|
|
1416
|
-
|
|
1417
|
-
(!(
|
|
1418
|
-
}),
|
|
786
|
+
if (R.indexOf(g) !== -1)
|
|
787
|
+
throw Error("Circular reference detected in " + h.join("."));
|
|
788
|
+
R.push(g), a.forEach(g, function(O, T) {
|
|
789
|
+
(!(a.isUndefined(O) || O === null) && s.call(e, O, a.isString(T) ? T.trim() : T, h, S)) === !0 && p(O, h ? h.concat(T) : [T], x + 1);
|
|
790
|
+
}), R.pop();
|
|
1419
791
|
}
|
|
1420
792
|
}
|
|
1421
|
-
if (!
|
|
793
|
+
if (!a.isObject(t))
|
|
1422
794
|
throw new TypeError("data must be an object");
|
|
1423
|
-
return
|
|
795
|
+
return p(t), e;
|
|
1424
796
|
}
|
|
1425
|
-
function
|
|
797
|
+
function Xe(t) {
|
|
1426
798
|
const e = {
|
|
1427
799
|
"!": "%21",
|
|
1428
800
|
"'": "%27",
|
|
@@ -1431,42 +803,42 @@ function Kt(t) {
|
|
|
1431
803
|
"~": "%7E",
|
|
1432
804
|
"%20": "+"
|
|
1433
805
|
};
|
|
1434
|
-
return encodeURIComponent(t).replace(/[!'()~]|%20/g, function(
|
|
1435
|
-
return e[
|
|
806
|
+
return encodeURIComponent(t).replace(/[!'()~]|%20/g, function(r) {
|
|
807
|
+
return e[r];
|
|
1436
808
|
});
|
|
1437
809
|
}
|
|
1438
|
-
function
|
|
1439
|
-
this._pairs = [], t &&
|
|
810
|
+
function Ie(t, e) {
|
|
811
|
+
this._pairs = [], t && _e(t, this, e);
|
|
1440
812
|
}
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1443
|
-
this._pairs.push([e,
|
|
813
|
+
const xt = Ie.prototype;
|
|
814
|
+
xt.append = function(e, n) {
|
|
815
|
+
this._pairs.push([e, n]);
|
|
1444
816
|
};
|
|
1445
|
-
|
|
1446
|
-
const
|
|
1447
|
-
return e.call(this,
|
|
1448
|
-
} :
|
|
817
|
+
xt.toString = function(e) {
|
|
818
|
+
const n = e ? function(r) {
|
|
819
|
+
return e.call(this, r, Xe);
|
|
820
|
+
} : Xe;
|
|
1449
821
|
return this._pairs.map(function(s) {
|
|
1450
|
-
return
|
|
822
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
1451
823
|
}, "").join("&");
|
|
1452
824
|
};
|
|
1453
|
-
function
|
|
825
|
+
function Kn(t) {
|
|
1454
826
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1455
827
|
}
|
|
1456
|
-
function
|
|
828
|
+
function Ot(t, e, n) {
|
|
1457
829
|
if (!e)
|
|
1458
830
|
return t;
|
|
1459
|
-
const
|
|
1460
|
-
serialize:
|
|
1461
|
-
} :
|
|
831
|
+
const r = n && n.encode || Kn, s = a.isFunction(n) ? {
|
|
832
|
+
serialize: n
|
|
833
|
+
} : n, o = s && s.serialize;
|
|
1462
834
|
let i;
|
|
1463
|
-
if (
|
|
835
|
+
if (o ? i = o(e, s) : i = a.isURLSearchParams(e) ? e.toString() : new Ie(e, s).toString(r), i) {
|
|
1464
836
|
const l = t.indexOf("#");
|
|
1465
837
|
l !== -1 && (t = t.slice(0, l)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
1466
838
|
}
|
|
1467
839
|
return t;
|
|
1468
840
|
}
|
|
1469
|
-
class
|
|
841
|
+
class Qe {
|
|
1470
842
|
constructor() {
|
|
1471
843
|
this.handlers = [];
|
|
1472
844
|
}
|
|
@@ -1479,12 +851,12 @@ class Vt {
|
|
|
1479
851
|
*
|
|
1480
852
|
* @return {Number} An ID used to remove interceptor later
|
|
1481
853
|
*/
|
|
1482
|
-
use(e,
|
|
854
|
+
use(e, n, r) {
|
|
1483
855
|
return this.handlers.push({
|
|
1484
856
|
fulfilled: e,
|
|
1485
|
-
rejected:
|
|
1486
|
-
synchronous:
|
|
1487
|
-
runWhen:
|
|
857
|
+
rejected: n,
|
|
858
|
+
synchronous: r ? r.synchronous : !1,
|
|
859
|
+
runWhen: r ? r.runWhen : null
|
|
1488
860
|
}), this.handlers.length - 1;
|
|
1489
861
|
}
|
|
1490
862
|
/**
|
|
@@ -1516,125 +888,125 @@ class Vt {
|
|
|
1516
888
|
* @returns {void}
|
|
1517
889
|
*/
|
|
1518
890
|
forEach(e) {
|
|
1519
|
-
|
|
1520
|
-
|
|
891
|
+
a.forEach(this.handlers, function(r) {
|
|
892
|
+
r !== null && e(r);
|
|
1521
893
|
});
|
|
1522
894
|
}
|
|
1523
895
|
}
|
|
1524
|
-
const
|
|
896
|
+
const He = {
|
|
1525
897
|
silentJSONParsing: !0,
|
|
1526
898
|
forcedJSONParsing: !0,
|
|
1527
899
|
clarifyTimeoutError: !1,
|
|
1528
900
|
legacyInterceptorReqResOrdering: !0
|
|
1529
|
-
},
|
|
901
|
+
}, $n = typeof URLSearchParams < "u" ? URLSearchParams : Ie, Vn = typeof FormData < "u" ? FormData : null, zn = typeof Blob < "u" ? Blob : null, Jn = {
|
|
1530
902
|
isBrowser: !0,
|
|
1531
903
|
classes: {
|
|
1532
|
-
URLSearchParams:
|
|
1533
|
-
FormData:
|
|
1534
|
-
Blob:
|
|
904
|
+
URLSearchParams: $n,
|
|
905
|
+
FormData: Vn,
|
|
906
|
+
Blob: zn
|
|
1535
907
|
},
|
|
1536
908
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1537
|
-
},
|
|
1538
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
909
|
+
}, qe = typeof window < "u" && typeof document < "u", je = typeof navigator == "object" && navigator || void 0, Wn = qe && (!je || ["ReactNative", "NativeScript", "NS"].indexOf(je.product) < 0), Gn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
910
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xn = qe && window.location.href || "http://localhost", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1539
911
|
__proto__: null,
|
|
1540
|
-
hasBrowserEnv:
|
|
1541
|
-
hasStandardBrowserEnv:
|
|
1542
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1543
|
-
navigator:
|
|
1544
|
-
origin:
|
|
1545
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1546
|
-
...
|
|
1547
|
-
...
|
|
912
|
+
hasBrowserEnv: qe,
|
|
913
|
+
hasStandardBrowserEnv: Wn,
|
|
914
|
+
hasStandardBrowserWebWorkerEnv: Gn,
|
|
915
|
+
navigator: je,
|
|
916
|
+
origin: Xn
|
|
917
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
918
|
+
...Qn,
|
|
919
|
+
...Jn
|
|
1548
920
|
};
|
|
1549
|
-
function
|
|
1550
|
-
return
|
|
1551
|
-
visitor: function(
|
|
1552
|
-
return
|
|
921
|
+
function Yn(t, e) {
|
|
922
|
+
return _e(t, new k.classes.URLSearchParams(), {
|
|
923
|
+
visitor: function(n, r, s, o) {
|
|
924
|
+
return k.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1553
925
|
},
|
|
1554
926
|
...e
|
|
1555
927
|
});
|
|
1556
928
|
}
|
|
1557
|
-
function
|
|
1558
|
-
return
|
|
929
|
+
function Zn(t) {
|
|
930
|
+
return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1559
931
|
}
|
|
1560
|
-
function
|
|
1561
|
-
const e = {},
|
|
1562
|
-
let
|
|
1563
|
-
const s =
|
|
1564
|
-
let
|
|
1565
|
-
for (
|
|
1566
|
-
|
|
932
|
+
function er(t) {
|
|
933
|
+
const e = {}, n = Object.keys(t);
|
|
934
|
+
let r;
|
|
935
|
+
const s = n.length;
|
|
936
|
+
let o;
|
|
937
|
+
for (r = 0; r < s; r++)
|
|
938
|
+
o = n[r], e[o] = t[o];
|
|
1567
939
|
return e;
|
|
1568
940
|
}
|
|
1569
|
-
function
|
|
1570
|
-
function e(
|
|
1571
|
-
let i =
|
|
941
|
+
function St(t) {
|
|
942
|
+
function e(n, r, s, o) {
|
|
943
|
+
let i = n[o++];
|
|
1572
944
|
if (i === "__proto__") return !0;
|
|
1573
|
-
const l = Number.isFinite(+i), f =
|
|
1574
|
-
return i = !i &&
|
|
945
|
+
const l = Number.isFinite(+i), f = o >= n.length;
|
|
946
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = a.isArray(s[i]) ? s[i].concat(r) : [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = er(s[i])), !l);
|
|
1575
947
|
}
|
|
1576
|
-
if (
|
|
1577
|
-
const
|
|
1578
|
-
return
|
|
1579
|
-
e(
|
|
1580
|
-
}),
|
|
948
|
+
if (a.isFormData(t) && a.isFunction(t.entries)) {
|
|
949
|
+
const n = {};
|
|
950
|
+
return a.forEachEntry(t, (r, s) => {
|
|
951
|
+
e(Zn(r), s, n, 0);
|
|
952
|
+
}), n;
|
|
1581
953
|
}
|
|
1582
954
|
return null;
|
|
1583
955
|
}
|
|
1584
|
-
const
|
|
1585
|
-
function
|
|
1586
|
-
if (
|
|
956
|
+
const te = (t, e) => t != null && a.hasOwnProp(t, e) ? t[e] : void 0;
|
|
957
|
+
function tr(t, e, n) {
|
|
958
|
+
if (a.isString(t))
|
|
1587
959
|
try {
|
|
1588
|
-
return (e || JSON.parse)(t),
|
|
1589
|
-
} catch (
|
|
1590
|
-
if (
|
|
1591
|
-
throw
|
|
960
|
+
return (e || JSON.parse)(t), a.trim(t);
|
|
961
|
+
} catch (r) {
|
|
962
|
+
if (r.name !== "SyntaxError")
|
|
963
|
+
throw r;
|
|
1592
964
|
}
|
|
1593
|
-
return (
|
|
965
|
+
return (n || JSON.stringify)(t);
|
|
1594
966
|
}
|
|
1595
|
-
const
|
|
1596
|
-
transitional:
|
|
967
|
+
const de = {
|
|
968
|
+
transitional: He,
|
|
1597
969
|
adapter: ["xhr", "http", "fetch"],
|
|
1598
970
|
transformRequest: [
|
|
1599
|
-
function(e,
|
|
1600
|
-
const
|
|
1601
|
-
if (
|
|
1602
|
-
return s ? JSON.stringify(
|
|
1603
|
-
if (
|
|
971
|
+
function(e, n) {
|
|
972
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(e);
|
|
973
|
+
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
974
|
+
return s ? JSON.stringify(St(e)) : e;
|
|
975
|
+
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
1604
976
|
return e;
|
|
1605
|
-
if (
|
|
977
|
+
if (a.isArrayBufferView(e))
|
|
1606
978
|
return e.buffer;
|
|
1607
|
-
if (
|
|
1608
|
-
return
|
|
979
|
+
if (a.isURLSearchParams(e))
|
|
980
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
1609
981
|
let l;
|
|
1610
|
-
if (
|
|
1611
|
-
const f =
|
|
1612
|
-
if (
|
|
1613
|
-
return
|
|
1614
|
-
if ((l =
|
|
1615
|
-
const
|
|
1616
|
-
return
|
|
982
|
+
if (o) {
|
|
983
|
+
const f = te(this, "formSerializer");
|
|
984
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
985
|
+
return Yn(e, f).toString();
|
|
986
|
+
if ((l = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
987
|
+
const u = te(this, "env"), c = u && u.FormData;
|
|
988
|
+
return _e(
|
|
1617
989
|
l ? { "files[]": e } : e,
|
|
1618
|
-
|
|
990
|
+
c && new c(),
|
|
1619
991
|
f
|
|
1620
992
|
);
|
|
1621
993
|
}
|
|
1622
994
|
}
|
|
1623
|
-
return
|
|
995
|
+
return o || s ? (n.setContentType("application/json", !1), tr(e)) : e;
|
|
1624
996
|
}
|
|
1625
997
|
],
|
|
1626
998
|
transformResponse: [
|
|
1627
999
|
function(e) {
|
|
1628
|
-
const
|
|
1629
|
-
if (
|
|
1000
|
+
const n = te(this, "transitional") || de.transitional, r = n && n.forcedJSONParsing, s = te(this, "responseType"), o = s === "json";
|
|
1001
|
+
if (a.isResponse(e) || a.isReadableStream(e))
|
|
1630
1002
|
return e;
|
|
1631
|
-
if (e &&
|
|
1632
|
-
const l = !(
|
|
1003
|
+
if (e && a.isString(e) && (r && !s || o)) {
|
|
1004
|
+
const l = !(n && n.silentJSONParsing) && o;
|
|
1633
1005
|
try {
|
|
1634
|
-
return JSON.parse(e,
|
|
1006
|
+
return JSON.parse(e, te(this, "parseReviver"));
|
|
1635
1007
|
} catch (f) {
|
|
1636
1008
|
if (l)
|
|
1637
|
-
throw f.name === "SyntaxError" ?
|
|
1009
|
+
throw f.name === "SyntaxError" ? y.from(f, y.ERR_BAD_RESPONSE, this, null, te(this, "response")) : f;
|
|
1638
1010
|
}
|
|
1639
1011
|
}
|
|
1640
1012
|
return e;
|
|
@@ -1650,8 +1022,8 @@ const Fe = {
|
|
|
1650
1022
|
maxContentLength: -1,
|
|
1651
1023
|
maxBodyLength: -1,
|
|
1652
1024
|
env: {
|
|
1653
|
-
FormData:
|
|
1654
|
-
Blob:
|
|
1025
|
+
FormData: k.classes.FormData,
|
|
1026
|
+
Blob: k.classes.Blob
|
|
1655
1027
|
},
|
|
1656
1028
|
validateStatus: function(e) {
|
|
1657
1029
|
return e >= 200 && e < 300;
|
|
@@ -1663,10 +1035,10 @@ const Fe = {
|
|
|
1663
1035
|
}
|
|
1664
1036
|
}
|
|
1665
1037
|
};
|
|
1666
|
-
|
|
1667
|
-
|
|
1038
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1039
|
+
de.headers[t] = {};
|
|
1668
1040
|
});
|
|
1669
|
-
const
|
|
1041
|
+
const nr = a.toObjectSet([
|
|
1670
1042
|
"age",
|
|
1671
1043
|
"authorization",
|
|
1672
1044
|
"content-length",
|
|
@@ -1684,171 +1056,171 @@ const ws = c.toObjectSet([
|
|
|
1684
1056
|
"referer",
|
|
1685
1057
|
"retry-after",
|
|
1686
1058
|
"user-agent"
|
|
1687
|
-
]),
|
|
1059
|
+
]), rr = (t) => {
|
|
1688
1060
|
const e = {};
|
|
1689
|
-
let
|
|
1061
|
+
let n, r, s;
|
|
1690
1062
|
return t && t.split(`
|
|
1691
1063
|
`).forEach(function(i) {
|
|
1692
|
-
s = i.indexOf(":"),
|
|
1064
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && nr[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
1693
1065
|
}), e;
|
|
1694
|
-
},
|
|
1695
|
-
function
|
|
1696
|
-
let e = 0,
|
|
1697
|
-
for (; e <
|
|
1698
|
-
const
|
|
1699
|
-
if (
|
|
1066
|
+
}, Ye = Symbol("internals"), sr = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
1067
|
+
function or(t) {
|
|
1068
|
+
let e = 0, n = t.length;
|
|
1069
|
+
for (; e < n; ) {
|
|
1070
|
+
const r = t.charCodeAt(e);
|
|
1071
|
+
if (r !== 9 && r !== 32)
|
|
1700
1072
|
break;
|
|
1701
1073
|
e += 1;
|
|
1702
1074
|
}
|
|
1703
|
-
for (;
|
|
1704
|
-
const
|
|
1705
|
-
if (
|
|
1075
|
+
for (; n > e; ) {
|
|
1076
|
+
const r = t.charCodeAt(n - 1);
|
|
1077
|
+
if (r !== 9 && r !== 32)
|
|
1706
1078
|
break;
|
|
1707
|
-
|
|
1079
|
+
n -= 1;
|
|
1708
1080
|
}
|
|
1709
|
-
return e === 0 &&
|
|
1081
|
+
return e === 0 && n === t.length ? t : t.slice(e, n);
|
|
1710
1082
|
}
|
|
1711
|
-
function
|
|
1083
|
+
function ie(t) {
|
|
1712
1084
|
return t && String(t).trim().toLowerCase();
|
|
1713
1085
|
}
|
|
1714
|
-
function
|
|
1715
|
-
return
|
|
1086
|
+
function ir(t) {
|
|
1087
|
+
return or(t.replace(sr, ""));
|
|
1716
1088
|
}
|
|
1717
|
-
function
|
|
1718
|
-
return t === !1 || t == null ? t :
|
|
1089
|
+
function Ee(t) {
|
|
1090
|
+
return t === !1 || t == null ? t : a.isArray(t) ? t.map(Ee) : ir(String(t));
|
|
1719
1091
|
}
|
|
1720
|
-
function
|
|
1721
|
-
const e = /* @__PURE__ */ Object.create(null),
|
|
1722
|
-
let
|
|
1723
|
-
for (;
|
|
1724
|
-
e[
|
|
1092
|
+
function ar(t) {
|
|
1093
|
+
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1094
|
+
let r;
|
|
1095
|
+
for (; r = n.exec(t); )
|
|
1096
|
+
e[r[1]] = r[2];
|
|
1725
1097
|
return e;
|
|
1726
1098
|
}
|
|
1727
|
-
const
|
|
1728
|
-
function
|
|
1729
|
-
if (
|
|
1730
|
-
return
|
|
1731
|
-
if (s && (e =
|
|
1732
|
-
if (
|
|
1733
|
-
return e.indexOf(
|
|
1734
|
-
if (
|
|
1735
|
-
return
|
|
1099
|
+
const lr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1100
|
+
function Ne(t, e, n, r, s) {
|
|
1101
|
+
if (a.isFunction(r))
|
|
1102
|
+
return r.call(this, e, n);
|
|
1103
|
+
if (s && (e = n), !!a.isString(e)) {
|
|
1104
|
+
if (a.isString(r))
|
|
1105
|
+
return e.indexOf(r) !== -1;
|
|
1106
|
+
if (a.isRegExp(r))
|
|
1107
|
+
return r.test(e);
|
|
1736
1108
|
}
|
|
1737
1109
|
}
|
|
1738
|
-
function
|
|
1739
|
-
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e,
|
|
1110
|
+
function cr(t) {
|
|
1111
|
+
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
1740
1112
|
}
|
|
1741
|
-
function
|
|
1742
|
-
const
|
|
1743
|
-
["get", "set", "has"].forEach((
|
|
1744
|
-
Object.defineProperty(t,
|
|
1745
|
-
value: function(s,
|
|
1746
|
-
return this[
|
|
1113
|
+
function ur(t, e) {
|
|
1114
|
+
const n = a.toCamelCase(" " + e);
|
|
1115
|
+
["get", "set", "has"].forEach((r) => {
|
|
1116
|
+
Object.defineProperty(t, r + n, {
|
|
1117
|
+
value: function(s, o, i) {
|
|
1118
|
+
return this[r].call(this, e, s, o, i);
|
|
1747
1119
|
},
|
|
1748
1120
|
configurable: !0
|
|
1749
1121
|
});
|
|
1750
1122
|
});
|
|
1751
1123
|
}
|
|
1752
|
-
let
|
|
1124
|
+
let F = class {
|
|
1753
1125
|
constructor(e) {
|
|
1754
1126
|
e && this.set(e);
|
|
1755
1127
|
}
|
|
1756
|
-
set(e,
|
|
1128
|
+
set(e, n, r) {
|
|
1757
1129
|
const s = this;
|
|
1758
|
-
function
|
|
1759
|
-
const
|
|
1760
|
-
if (!
|
|
1130
|
+
function o(l, f, u) {
|
|
1131
|
+
const c = ie(f);
|
|
1132
|
+
if (!c)
|
|
1761
1133
|
throw new Error("header name must be a non-empty string");
|
|
1762
|
-
const
|
|
1763
|
-
(!
|
|
1764
|
-
}
|
|
1765
|
-
const i = (l, f) =>
|
|
1766
|
-
if (
|
|
1767
|
-
i(e,
|
|
1768
|
-
else if (
|
|
1769
|
-
i(
|
|
1770
|
-
else if (
|
|
1771
|
-
let l = {}, f,
|
|
1772
|
-
for (const
|
|
1773
|
-
if (!
|
|
1134
|
+
const d = a.findKey(s, c);
|
|
1135
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = Ee(l));
|
|
1136
|
+
}
|
|
1137
|
+
const i = (l, f) => a.forEach(l, (u, c) => o(u, c, f));
|
|
1138
|
+
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
1139
|
+
i(e, n);
|
|
1140
|
+
else if (a.isString(e) && (e = e.trim()) && !lr(e))
|
|
1141
|
+
i(rr(e), n);
|
|
1142
|
+
else if (a.isObject(e) && a.isIterable(e)) {
|
|
1143
|
+
let l = {}, f, u;
|
|
1144
|
+
for (const c of e) {
|
|
1145
|
+
if (!a.isArray(c))
|
|
1774
1146
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1775
|
-
l[
|
|
1147
|
+
l[u = c[0]] = (f = l[u]) ? a.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
|
|
1776
1148
|
}
|
|
1777
|
-
i(l,
|
|
1149
|
+
i(l, n);
|
|
1778
1150
|
} else
|
|
1779
|
-
e != null &&
|
|
1151
|
+
e != null && o(n, e, r);
|
|
1780
1152
|
return this;
|
|
1781
1153
|
}
|
|
1782
|
-
get(e,
|
|
1783
|
-
if (e =
|
|
1784
|
-
const
|
|
1785
|
-
if (
|
|
1786
|
-
const s = this[
|
|
1787
|
-
if (!
|
|
1154
|
+
get(e, n) {
|
|
1155
|
+
if (e = ie(e), e) {
|
|
1156
|
+
const r = a.findKey(this, e);
|
|
1157
|
+
if (r) {
|
|
1158
|
+
const s = this[r];
|
|
1159
|
+
if (!n)
|
|
1788
1160
|
return s;
|
|
1789
|
-
if (
|
|
1790
|
-
return
|
|
1791
|
-
if (
|
|
1792
|
-
return
|
|
1793
|
-
if (
|
|
1794
|
-
return
|
|
1161
|
+
if (n === !0)
|
|
1162
|
+
return ar(s);
|
|
1163
|
+
if (a.isFunction(n))
|
|
1164
|
+
return n.call(this, s, r);
|
|
1165
|
+
if (a.isRegExp(n))
|
|
1166
|
+
return n.exec(s);
|
|
1795
1167
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1796
1168
|
}
|
|
1797
1169
|
}
|
|
1798
1170
|
}
|
|
1799
|
-
has(e,
|
|
1800
|
-
if (e =
|
|
1801
|
-
const
|
|
1802
|
-
return !!(
|
|
1171
|
+
has(e, n) {
|
|
1172
|
+
if (e = ie(e), e) {
|
|
1173
|
+
const r = a.findKey(this, e);
|
|
1174
|
+
return !!(r && this[r] !== void 0 && (!n || Ne(this, this[r], r, n)));
|
|
1803
1175
|
}
|
|
1804
1176
|
return !1;
|
|
1805
1177
|
}
|
|
1806
|
-
delete(e,
|
|
1807
|
-
const
|
|
1178
|
+
delete(e, n) {
|
|
1179
|
+
const r = this;
|
|
1808
1180
|
let s = !1;
|
|
1809
|
-
function
|
|
1810
|
-
if (i =
|
|
1811
|
-
const l =
|
|
1812
|
-
l && (!
|
|
1181
|
+
function o(i) {
|
|
1182
|
+
if (i = ie(i), i) {
|
|
1183
|
+
const l = a.findKey(r, i);
|
|
1184
|
+
l && (!n || Ne(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
1813
1185
|
}
|
|
1814
1186
|
}
|
|
1815
|
-
return
|
|
1187
|
+
return a.isArray(e) ? e.forEach(o) : o(e), s;
|
|
1816
1188
|
}
|
|
1817
1189
|
clear(e) {
|
|
1818
|
-
const
|
|
1819
|
-
let
|
|
1820
|
-
for (;
|
|
1821
|
-
const
|
|
1822
|
-
(!e ||
|
|
1190
|
+
const n = Object.keys(this);
|
|
1191
|
+
let r = n.length, s = !1;
|
|
1192
|
+
for (; r--; ) {
|
|
1193
|
+
const o = n[r];
|
|
1194
|
+
(!e || Ne(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
1823
1195
|
}
|
|
1824
1196
|
return s;
|
|
1825
1197
|
}
|
|
1826
1198
|
normalize(e) {
|
|
1827
|
-
const
|
|
1828
|
-
return
|
|
1829
|
-
const i =
|
|
1199
|
+
const n = this, r = {};
|
|
1200
|
+
return a.forEach(this, (s, o) => {
|
|
1201
|
+
const i = a.findKey(r, o);
|
|
1830
1202
|
if (i) {
|
|
1831
|
-
|
|
1203
|
+
n[i] = Ee(s), delete n[o];
|
|
1832
1204
|
return;
|
|
1833
1205
|
}
|
|
1834
|
-
const l = e ?
|
|
1835
|
-
l !==
|
|
1206
|
+
const l = e ? cr(o) : String(o).trim();
|
|
1207
|
+
l !== o && delete n[o], n[l] = Ee(s), r[l] = !0;
|
|
1836
1208
|
}), this;
|
|
1837
1209
|
}
|
|
1838
1210
|
concat(...e) {
|
|
1839
1211
|
return this.constructor.concat(this, ...e);
|
|
1840
1212
|
}
|
|
1841
1213
|
toJSON(e) {
|
|
1842
|
-
const
|
|
1843
|
-
return
|
|
1844
|
-
|
|
1845
|
-
}),
|
|
1214
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1215
|
+
return a.forEach(this, (r, s) => {
|
|
1216
|
+
r != null && r !== !1 && (n[s] = e && a.isArray(r) ? r.join(", ") : r);
|
|
1217
|
+
}), n;
|
|
1846
1218
|
}
|
|
1847
1219
|
[Symbol.iterator]() {
|
|
1848
1220
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1849
1221
|
}
|
|
1850
1222
|
toString() {
|
|
1851
|
-
return Object.entries(this.toJSON()).map(([e,
|
|
1223
|
+
return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
|
|
1852
1224
|
`);
|
|
1853
1225
|
}
|
|
1854
1226
|
getSetCookie() {
|
|
@@ -1860,22 +1232,22 @@ let Q = class {
|
|
|
1860
1232
|
static from(e) {
|
|
1861
1233
|
return e instanceof this ? e : new this(e);
|
|
1862
1234
|
}
|
|
1863
|
-
static concat(e, ...
|
|
1864
|
-
const
|
|
1865
|
-
return
|
|
1235
|
+
static concat(e, ...n) {
|
|
1236
|
+
const r = new this(e);
|
|
1237
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1866
1238
|
}
|
|
1867
1239
|
static accessor(e) {
|
|
1868
|
-
const
|
|
1240
|
+
const r = (this[Ye] = this[Ye] = {
|
|
1869
1241
|
accessors: {}
|
|
1870
1242
|
}).accessors, s = this.prototype;
|
|
1871
|
-
function
|
|
1872
|
-
const l =
|
|
1873
|
-
|
|
1243
|
+
function o(i) {
|
|
1244
|
+
const l = ie(i);
|
|
1245
|
+
r[l] || (ur(s, i), r[l] = !0);
|
|
1874
1246
|
}
|
|
1875
|
-
return
|
|
1247
|
+
return a.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1876
1248
|
}
|
|
1877
1249
|
};
|
|
1878
|
-
|
|
1250
|
+
F.accessor([
|
|
1879
1251
|
"Content-Type",
|
|
1880
1252
|
"Content-Length",
|
|
1881
1253
|
"Accept",
|
|
@@ -1883,27 +1255,27 @@ Q.accessor([
|
|
|
1883
1255
|
"User-Agent",
|
|
1884
1256
|
"Authorization"
|
|
1885
1257
|
]);
|
|
1886
|
-
|
|
1887
|
-
let
|
|
1258
|
+
a.reduceDescriptors(F.prototype, ({ value: t }, e) => {
|
|
1259
|
+
let n = e[0].toUpperCase() + e.slice(1);
|
|
1888
1260
|
return {
|
|
1889
1261
|
get: () => t,
|
|
1890
|
-
set(
|
|
1891
|
-
this[
|
|
1262
|
+
set(r) {
|
|
1263
|
+
this[n] = r;
|
|
1892
1264
|
}
|
|
1893
1265
|
};
|
|
1894
1266
|
});
|
|
1895
|
-
|
|
1896
|
-
function
|
|
1897
|
-
const
|
|
1898
|
-
let
|
|
1899
|
-
return
|
|
1900
|
-
|
|
1901
|
-
}), s.normalize(),
|
|
1267
|
+
a.freezeMethods(F);
|
|
1268
|
+
function ve(t, e) {
|
|
1269
|
+
const n = this || de, r = e || n, s = F.from(r.headers);
|
|
1270
|
+
let o = r.data;
|
|
1271
|
+
return a.forEach(t, function(l) {
|
|
1272
|
+
o = l.call(n, o, s.normalize(), e ? e.status : void 0);
|
|
1273
|
+
}), s.normalize(), o;
|
|
1902
1274
|
}
|
|
1903
|
-
function
|
|
1275
|
+
function _t(t) {
|
|
1904
1276
|
return !!(t && t.__CANCEL__);
|
|
1905
1277
|
}
|
|
1906
|
-
let
|
|
1278
|
+
let fe = class extends y {
|
|
1907
1279
|
/**
|
|
1908
1280
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1909
1281
|
*
|
|
@@ -1913,93 +1285,93 @@ let Ne = class extends w {
|
|
|
1913
1285
|
*
|
|
1914
1286
|
* @returns {CanceledError} The created error.
|
|
1915
1287
|
*/
|
|
1916
|
-
constructor(e,
|
|
1917
|
-
super(e ?? "canceled",
|
|
1288
|
+
constructor(e, n, r) {
|
|
1289
|
+
super(e ?? "canceled", y.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1918
1290
|
}
|
|
1919
1291
|
};
|
|
1920
|
-
function
|
|
1921
|
-
const
|
|
1922
|
-
!
|
|
1923
|
-
new
|
|
1924
|
-
"Request failed with status code " +
|
|
1925
|
-
[
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1292
|
+
function At(t, e, n) {
|
|
1293
|
+
const r = n.config.validateStatus;
|
|
1294
|
+
!n.status || !r || r(n.status) ? t(n) : e(
|
|
1295
|
+
new y(
|
|
1296
|
+
"Request failed with status code " + n.status,
|
|
1297
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1298
|
+
n.config,
|
|
1299
|
+
n.request,
|
|
1300
|
+
n
|
|
1929
1301
|
)
|
|
1930
1302
|
);
|
|
1931
1303
|
}
|
|
1932
|
-
function
|
|
1304
|
+
function dr(t) {
|
|
1933
1305
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1934
1306
|
return e && e[1] || "";
|
|
1935
1307
|
}
|
|
1936
|
-
function
|
|
1308
|
+
function fr(t, e) {
|
|
1937
1309
|
t = t || 10;
|
|
1938
|
-
const
|
|
1939
|
-
let s = 0,
|
|
1310
|
+
const n = new Array(t), r = new Array(t);
|
|
1311
|
+
let s = 0, o = 0, i;
|
|
1940
1312
|
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
1941
|
-
const
|
|
1942
|
-
i || (i =
|
|
1943
|
-
let
|
|
1944
|
-
for (;
|
|
1945
|
-
|
|
1946
|
-
if (s = (s + 1) % t, s ===
|
|
1313
|
+
const u = Date.now(), c = r[o];
|
|
1314
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
1315
|
+
let d = o, R = 0;
|
|
1316
|
+
for (; d !== s; )
|
|
1317
|
+
R += n[d++], d = d % t;
|
|
1318
|
+
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
|
|
1947
1319
|
return;
|
|
1948
|
-
const
|
|
1949
|
-
return
|
|
1320
|
+
const S = c && u - c;
|
|
1321
|
+
return S ? Math.round(R * 1e3 / S) : void 0;
|
|
1950
1322
|
};
|
|
1951
1323
|
}
|
|
1952
|
-
function
|
|
1953
|
-
let
|
|
1954
|
-
const i = (
|
|
1955
|
-
|
|
1324
|
+
function hr(t, e) {
|
|
1325
|
+
let n = 0, r = 1e3 / e, s, o;
|
|
1326
|
+
const i = (u, c = Date.now()) => {
|
|
1327
|
+
n = c, s = null, o && (clearTimeout(o), o = null), t(...u);
|
|
1956
1328
|
};
|
|
1957
|
-
return [(...
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
},
|
|
1329
|
+
return [(...u) => {
|
|
1330
|
+
const c = Date.now(), d = c - n;
|
|
1331
|
+
d >= r ? i(u, c) : (s = u, o || (o = setTimeout(() => {
|
|
1332
|
+
o = null, i(s);
|
|
1333
|
+
}, r - d)));
|
|
1962
1334
|
}, () => s && i(s)];
|
|
1963
1335
|
}
|
|
1964
|
-
const
|
|
1965
|
-
let
|
|
1966
|
-
const s =
|
|
1967
|
-
return
|
|
1968
|
-
const i =
|
|
1969
|
-
|
|
1970
|
-
const
|
|
1336
|
+
const Re = (t, e, n = 3) => {
|
|
1337
|
+
let r = 0;
|
|
1338
|
+
const s = fr(50, 250);
|
|
1339
|
+
return hr((o) => {
|
|
1340
|
+
const i = o.loaded, l = o.lengthComputable ? o.total : void 0, f = l != null ? Math.min(i, l) : i, u = Math.max(0, f - r), c = s(u);
|
|
1341
|
+
r = Math.max(r, f);
|
|
1342
|
+
const d = {
|
|
1971
1343
|
loaded: f,
|
|
1972
1344
|
total: l,
|
|
1973
1345
|
progress: l ? f / l : void 0,
|
|
1974
|
-
bytes:
|
|
1975
|
-
rate:
|
|
1976
|
-
estimated:
|
|
1977
|
-
event:
|
|
1346
|
+
bytes: u,
|
|
1347
|
+
rate: c || void 0,
|
|
1348
|
+
estimated: c && l ? (l - f) / c : void 0,
|
|
1349
|
+
event: o,
|
|
1978
1350
|
lengthComputable: l != null,
|
|
1979
1351
|
[e ? "download" : "upload"]: !0
|
|
1980
1352
|
};
|
|
1981
|
-
t(
|
|
1982
|
-
},
|
|
1983
|
-
},
|
|
1984
|
-
const
|
|
1353
|
+
t(d);
|
|
1354
|
+
}, n);
|
|
1355
|
+
}, Ze = (t, e) => {
|
|
1356
|
+
const n = t != null;
|
|
1985
1357
|
return [
|
|
1986
|
-
(
|
|
1987
|
-
lengthComputable:
|
|
1358
|
+
(r) => e[0]({
|
|
1359
|
+
lengthComputable: n,
|
|
1988
1360
|
total: t,
|
|
1989
|
-
loaded:
|
|
1361
|
+
loaded: r
|
|
1990
1362
|
}),
|
|
1991
1363
|
e[1]
|
|
1992
1364
|
];
|
|
1993
|
-
},
|
|
1994
|
-
new URL(
|
|
1995
|
-
|
|
1996
|
-
) : () => !0,
|
|
1365
|
+
}, et = (t) => (...e) => a.asap(() => t(...e)), pr = k.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, k.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
1366
|
+
new URL(k.origin),
|
|
1367
|
+
k.navigator && /(msie|trident)/i.test(k.navigator.userAgent)
|
|
1368
|
+
) : () => !0, gr = k.hasStandardBrowserEnv ? (
|
|
1997
1369
|
// Standard browser envs support document.cookie
|
|
1998
1370
|
{
|
|
1999
|
-
write(t, e,
|
|
1371
|
+
write(t, e, n, r, s, o, i) {
|
|
2000
1372
|
if (typeof document > "u") return;
|
|
2001
1373
|
const l = [`${t}=${encodeURIComponent(e)}`];
|
|
2002
|
-
|
|
1374
|
+
a.isNumber(n) && l.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && l.push(`path=${r}`), a.isString(s) && l.push(`domain=${s}`), o === !0 && l.push("secure"), a.isString(i) && l.push(`SameSite=${i}`), document.cookie = l.join("; ");
|
|
2003
1375
|
},
|
|
2004
1376
|
read(t) {
|
|
2005
1377
|
if (typeof document > "u") return null;
|
|
@@ -2022,55 +1394,55 @@ const Ye = (t, e, r = 3) => {
|
|
|
2022
1394
|
}
|
|
2023
1395
|
}
|
|
2024
1396
|
);
|
|
2025
|
-
function
|
|
1397
|
+
function mr(t) {
|
|
2026
1398
|
return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
2027
1399
|
}
|
|
2028
|
-
function
|
|
1400
|
+
function yr(t, e) {
|
|
2029
1401
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
2030
1402
|
}
|
|
2031
|
-
function
|
|
2032
|
-
let
|
|
2033
|
-
return t && (
|
|
1403
|
+
function Ct(t, e, n) {
|
|
1404
|
+
let r = !mr(e);
|
|
1405
|
+
return t && (r || n === !1) ? yr(t, e) : e;
|
|
2034
1406
|
}
|
|
2035
|
-
const
|
|
2036
|
-
function
|
|
1407
|
+
const tt = (t) => t instanceof F ? { ...t } : t;
|
|
1408
|
+
function Z(t, e) {
|
|
2037
1409
|
e = e || {};
|
|
2038
|
-
const
|
|
2039
|
-
Object.defineProperty(
|
|
1410
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1411
|
+
Object.defineProperty(n, "hasOwnProperty", {
|
|
2040
1412
|
value: Object.prototype.hasOwnProperty,
|
|
2041
1413
|
enumerable: !1,
|
|
2042
1414
|
writable: !0,
|
|
2043
1415
|
configurable: !0
|
|
2044
1416
|
});
|
|
2045
|
-
function
|
|
2046
|
-
return
|
|
2047
|
-
}
|
|
2048
|
-
function s(
|
|
2049
|
-
if (
|
|
2050
|
-
if (!
|
|
2051
|
-
return
|
|
2052
|
-
} else return
|
|
2053
|
-
}
|
|
2054
|
-
function
|
|
2055
|
-
if (!
|
|
2056
|
-
return
|
|
2057
|
-
}
|
|
2058
|
-
function i(
|
|
2059
|
-
if (
|
|
2060
|
-
if (!
|
|
2061
|
-
return
|
|
2062
|
-
} else return
|
|
2063
|
-
}
|
|
2064
|
-
function l(
|
|
2065
|
-
if (
|
|
2066
|
-
return
|
|
2067
|
-
if (
|
|
2068
|
-
return
|
|
1417
|
+
function r(u, c, d, R) {
|
|
1418
|
+
return a.isPlainObject(u) && a.isPlainObject(c) ? a.merge.call({ caseless: R }, u, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
|
|
1419
|
+
}
|
|
1420
|
+
function s(u, c, d, R) {
|
|
1421
|
+
if (a.isUndefined(c)) {
|
|
1422
|
+
if (!a.isUndefined(u))
|
|
1423
|
+
return r(void 0, u, d, R);
|
|
1424
|
+
} else return r(u, c, d, R);
|
|
1425
|
+
}
|
|
1426
|
+
function o(u, c) {
|
|
1427
|
+
if (!a.isUndefined(c))
|
|
1428
|
+
return r(void 0, c);
|
|
1429
|
+
}
|
|
1430
|
+
function i(u, c) {
|
|
1431
|
+
if (a.isUndefined(c)) {
|
|
1432
|
+
if (!a.isUndefined(u))
|
|
1433
|
+
return r(void 0, u);
|
|
1434
|
+
} else return r(void 0, c);
|
|
1435
|
+
}
|
|
1436
|
+
function l(u, c, d) {
|
|
1437
|
+
if (a.hasOwnProp(e, d))
|
|
1438
|
+
return r(u, c);
|
|
1439
|
+
if (a.hasOwnProp(t, d))
|
|
1440
|
+
return r(void 0, u);
|
|
2069
1441
|
}
|
|
2070
1442
|
const f = {
|
|
2071
|
-
url:
|
|
2072
|
-
method:
|
|
2073
|
-
data:
|
|
1443
|
+
url: o,
|
|
1444
|
+
method: o,
|
|
1445
|
+
data: o,
|
|
2074
1446
|
baseURL: i,
|
|
2075
1447
|
transformRequest: i,
|
|
2076
1448
|
transformResponse: i,
|
|
@@ -2097,22 +1469,22 @@ function ye(t, e) {
|
|
|
2097
1469
|
allowedSocketPaths: i,
|
|
2098
1470
|
responseEncoding: i,
|
|
2099
1471
|
validateStatus: l,
|
|
2100
|
-
headers: (
|
|
1472
|
+
headers: (u, c, d) => s(tt(u), tt(c), d, !0)
|
|
2101
1473
|
};
|
|
2102
|
-
return
|
|
2103
|
-
if (
|
|
2104
|
-
const
|
|
2105
|
-
|
|
2106
|
-
}),
|
|
1474
|
+
return a.forEach(Object.keys({ ...t, ...e }), function(c) {
|
|
1475
|
+
if (c === "__proto__" || c === "constructor" || c === "prototype") return;
|
|
1476
|
+
const d = a.hasOwnProp(f, c) ? f[c] : s, R = a.hasOwnProp(t, c) ? t[c] : void 0, S = a.hasOwnProp(e, c) ? e[c] : void 0, p = d(R, S, c);
|
|
1477
|
+
a.isUndefined(p) && d !== l || (n[c] = p);
|
|
1478
|
+
}), n;
|
|
2107
1479
|
}
|
|
2108
|
-
const
|
|
2109
|
-
const e =
|
|
2110
|
-
let s =
|
|
2111
|
-
const
|
|
2112
|
-
let l =
|
|
2113
|
-
const f =
|
|
2114
|
-
if (e.headers = l =
|
|
2115
|
-
|
|
1480
|
+
const Pt = (t) => {
|
|
1481
|
+
const e = Z({}, t), n = (R) => a.hasOwnProp(e, R) ? e[R] : void 0, r = n("data");
|
|
1482
|
+
let s = n("withXSRFToken");
|
|
1483
|
+
const o = n("xsrfHeaderName"), i = n("xsrfCookieName");
|
|
1484
|
+
let l = n("headers");
|
|
1485
|
+
const f = n("auth"), u = n("baseURL"), c = n("allowAbsoluteUrls"), d = n("url");
|
|
1486
|
+
if (e.headers = l = F.from(l), e.url = Ot(
|
|
1487
|
+
Ct(u, d, c),
|
|
2116
1488
|
t.params,
|
|
2117
1489
|
t.paramsSerializer
|
|
2118
1490
|
), f && l.set(
|
|
@@ -2120,129 +1492,129 @@ const _r = (t) => {
|
|
|
2120
1492
|
"Basic " + btoa(
|
|
2121
1493
|
(f.username || "") + ":" + (f.password ? unescape(encodeURIComponent(f.password)) : "")
|
|
2122
1494
|
)
|
|
2123
|
-
),
|
|
2124
|
-
if (
|
|
1495
|
+
), a.isFormData(r)) {
|
|
1496
|
+
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
2125
1497
|
l.setContentType(void 0);
|
|
2126
|
-
else if (
|
|
2127
|
-
const
|
|
2128
|
-
Object.entries(
|
|
2129
|
-
|
|
1498
|
+
else if (a.isFunction(r.getHeaders)) {
|
|
1499
|
+
const R = r.getHeaders(), S = ["content-type", "content-length"];
|
|
1500
|
+
Object.entries(R).forEach(([p, g]) => {
|
|
1501
|
+
S.includes(p.toLowerCase()) && l.set(p, g);
|
|
2130
1502
|
});
|
|
2131
1503
|
}
|
|
2132
1504
|
}
|
|
2133
|
-
if (
|
|
2134
|
-
const
|
|
2135
|
-
|
|
1505
|
+
if (k.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(e)), s === !0 || s == null && pr(e.url))) {
|
|
1506
|
+
const S = o && i && gr.read(i);
|
|
1507
|
+
S && l.set(o, S);
|
|
2136
1508
|
}
|
|
2137
1509
|
return e;
|
|
2138
|
-
},
|
|
2139
|
-
return new Promise(function(
|
|
2140
|
-
const s =
|
|
2141
|
-
let
|
|
2142
|
-
const i =
|
|
2143
|
-
let { responseType: l, onUploadProgress: f, onDownloadProgress:
|
|
2144
|
-
function
|
|
2145
|
-
|
|
2146
|
-
}
|
|
2147
|
-
let
|
|
2148
|
-
|
|
2149
|
-
function
|
|
2150
|
-
if (!
|
|
1510
|
+
}, br = typeof XMLHttpRequest < "u", Er = br && function(t) {
|
|
1511
|
+
return new Promise(function(n, r) {
|
|
1512
|
+
const s = Pt(t);
|
|
1513
|
+
let o = s.data;
|
|
1514
|
+
const i = F.from(s.headers).normalize();
|
|
1515
|
+
let { responseType: l, onUploadProgress: f, onDownloadProgress: u } = s, c, d, R, S, p;
|
|
1516
|
+
function g() {
|
|
1517
|
+
S && S(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(c), s.signal && s.signal.removeEventListener("abort", c);
|
|
1518
|
+
}
|
|
1519
|
+
let h = new XMLHttpRequest();
|
|
1520
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1521
|
+
function x() {
|
|
1522
|
+
if (!h)
|
|
2151
1523
|
return;
|
|
2152
|
-
const
|
|
2153
|
-
"getAllResponseHeaders" in
|
|
2154
|
-
),
|
|
2155
|
-
data: !l || l === "text" || l === "json" ?
|
|
2156
|
-
status:
|
|
2157
|
-
statusText:
|
|
2158
|
-
headers:
|
|
1524
|
+
const O = F.from(
|
|
1525
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1526
|
+
), L = {
|
|
1527
|
+
data: !l || l === "text" || l === "json" ? h.responseText : h.response,
|
|
1528
|
+
status: h.status,
|
|
1529
|
+
statusText: h.statusText,
|
|
1530
|
+
headers: O,
|
|
2159
1531
|
config: t,
|
|
2160
|
-
request:
|
|
1532
|
+
request: h
|
|
2161
1533
|
};
|
|
2162
|
-
|
|
2163
|
-
function(
|
|
2164
|
-
|
|
1534
|
+
At(
|
|
1535
|
+
function(N) {
|
|
1536
|
+
n(N), g();
|
|
2165
1537
|
},
|
|
2166
|
-
function(
|
|
2167
|
-
|
|
1538
|
+
function(N) {
|
|
1539
|
+
r(N), g();
|
|
2168
1540
|
},
|
|
2169
|
-
|
|
2170
|
-
),
|
|
2171
|
-
}
|
|
2172
|
-
"onloadend" in
|
|
2173
|
-
!
|
|
2174
|
-
},
|
|
2175
|
-
|
|
2176
|
-
},
|
|
2177
|
-
const
|
|
2178
|
-
|
|
2179
|
-
},
|
|
2180
|
-
let
|
|
2181
|
-
const
|
|
2182
|
-
s.timeoutErrorMessage && (
|
|
2183
|
-
new
|
|
2184
|
-
|
|
2185
|
-
|
|
1541
|
+
L
|
|
1542
|
+
), h = null;
|
|
1543
|
+
}
|
|
1544
|
+
"onloadend" in h ? h.onloadend = x : h.onreadystatechange = function() {
|
|
1545
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(x);
|
|
1546
|
+
}, h.onabort = function() {
|
|
1547
|
+
h && (r(new y("Request aborted", y.ECONNABORTED, t, h)), h = null);
|
|
1548
|
+
}, h.onerror = function(T) {
|
|
1549
|
+
const L = T && T.message ? T.message : "Network Error", K = new y(L, y.ERR_NETWORK, t, h);
|
|
1550
|
+
K.event = T || null, r(K), h = null;
|
|
1551
|
+
}, h.ontimeout = function() {
|
|
1552
|
+
let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1553
|
+
const L = s.transitional || He;
|
|
1554
|
+
s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(
|
|
1555
|
+
new y(
|
|
1556
|
+
T,
|
|
1557
|
+
L.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
2186
1558
|
t,
|
|
2187
|
-
|
|
1559
|
+
h
|
|
2188
1560
|
)
|
|
2189
|
-
),
|
|
2190
|
-
},
|
|
2191
|
-
|
|
2192
|
-
}),
|
|
2193
|
-
|
|
2194
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
2195
|
-
const
|
|
2196
|
-
if (
|
|
2197
|
-
|
|
2198
|
-
new
|
|
2199
|
-
"Unsupported protocol " +
|
|
2200
|
-
|
|
1561
|
+
), h = null;
|
|
1562
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(T, L) {
|
|
1563
|
+
h.setRequestHeader(L, T);
|
|
1564
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), l && l !== "json" && (h.responseType = s.responseType), u && ([R, p] = Re(u, !0), h.addEventListener("progress", R)), f && h.upload && ([d, S] = Re(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (c = (O) => {
|
|
1565
|
+
h && (r(!O || O.type ? new fe(null, t, h) : O), h.abort(), h = null);
|
|
1566
|
+
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
|
|
1567
|
+
const j = dr(s.url);
|
|
1568
|
+
if (j && k.protocols.indexOf(j) === -1) {
|
|
1569
|
+
r(
|
|
1570
|
+
new y(
|
|
1571
|
+
"Unsupported protocol " + j + ":",
|
|
1572
|
+
y.ERR_BAD_REQUEST,
|
|
2201
1573
|
t
|
|
2202
1574
|
)
|
|
2203
1575
|
);
|
|
2204
1576
|
return;
|
|
2205
1577
|
}
|
|
2206
|
-
|
|
1578
|
+
h.send(o || null);
|
|
2207
1579
|
});
|
|
2208
|
-
},
|
|
2209
|
-
const { length:
|
|
2210
|
-
if (e ||
|
|
2211
|
-
let
|
|
2212
|
-
const
|
|
1580
|
+
}, wr = (t, e) => {
|
|
1581
|
+
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1582
|
+
if (e || n) {
|
|
1583
|
+
let r = new AbortController(), s;
|
|
1584
|
+
const o = function(u) {
|
|
2213
1585
|
if (!s) {
|
|
2214
1586
|
s = !0, l();
|
|
2215
|
-
const
|
|
2216
|
-
|
|
2217
|
-
|
|
1587
|
+
const c = u instanceof Error ? u : this.reason;
|
|
1588
|
+
r.abort(
|
|
1589
|
+
c instanceof y ? c : new fe(c instanceof Error ? c.message : c)
|
|
2218
1590
|
);
|
|
2219
1591
|
}
|
|
2220
1592
|
};
|
|
2221
1593
|
let i = e && setTimeout(() => {
|
|
2222
|
-
i = null,
|
|
1594
|
+
i = null, o(new y(`timeout of ${e}ms exceeded`, y.ETIMEDOUT));
|
|
2223
1595
|
}, e);
|
|
2224
1596
|
const l = () => {
|
|
2225
|
-
t && (i && clearTimeout(i), i = null, t.forEach((
|
|
2226
|
-
|
|
1597
|
+
t && (i && clearTimeout(i), i = null, t.forEach((u) => {
|
|
1598
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
2227
1599
|
}), t = null);
|
|
2228
1600
|
};
|
|
2229
|
-
t.forEach((
|
|
2230
|
-
const { signal: f } =
|
|
2231
|
-
return f.unsubscribe = () =>
|
|
1601
|
+
t.forEach((u) => u.addEventListener("abort", o));
|
|
1602
|
+
const { signal: f } = r;
|
|
1603
|
+
return f.unsubscribe = () => a.asap(l), f;
|
|
2232
1604
|
}
|
|
2233
|
-
},
|
|
2234
|
-
let
|
|
2235
|
-
if (
|
|
1605
|
+
}, Rr = function* (t, e) {
|
|
1606
|
+
let n = t.byteLength;
|
|
1607
|
+
if (n < e) {
|
|
2236
1608
|
yield t;
|
|
2237
1609
|
return;
|
|
2238
1610
|
}
|
|
2239
|
-
let
|
|
2240
|
-
for (;
|
|
2241
|
-
s =
|
|
2242
|
-
},
|
|
2243
|
-
for await (const
|
|
2244
|
-
yield*
|
|
2245
|
-
},
|
|
1611
|
+
let r = 0, s;
|
|
1612
|
+
for (; r < n; )
|
|
1613
|
+
s = r + e, yield t.slice(r, s), r = s;
|
|
1614
|
+
}, Tr = async function* (t, e) {
|
|
1615
|
+
for await (const n of xr(t))
|
|
1616
|
+
yield* Rr(n, e);
|
|
1617
|
+
}, xr = async function* (t) {
|
|
2246
1618
|
if (t[Symbol.asyncIterator]) {
|
|
2247
1619
|
yield* t;
|
|
2248
1620
|
return;
|
|
@@ -2250,36 +1622,36 @@ const _r = (t) => {
|
|
|
2250
1622
|
const e = t.getReader();
|
|
2251
1623
|
try {
|
|
2252
1624
|
for (; ; ) {
|
|
2253
|
-
const { done:
|
|
2254
|
-
if (
|
|
1625
|
+
const { done: n, value: r } = await e.read();
|
|
1626
|
+
if (n)
|
|
2255
1627
|
break;
|
|
2256
|
-
yield
|
|
1628
|
+
yield r;
|
|
2257
1629
|
}
|
|
2258
1630
|
} finally {
|
|
2259
1631
|
await e.cancel();
|
|
2260
1632
|
}
|
|
2261
|
-
},
|
|
2262
|
-
const s =
|
|
2263
|
-
let
|
|
2264
|
-
i || (i = !0,
|
|
1633
|
+
}, nt = (t, e, n, r) => {
|
|
1634
|
+
const s = Tr(t, e);
|
|
1635
|
+
let o = 0, i, l = (f) => {
|
|
1636
|
+
i || (i = !0, r && r(f));
|
|
2265
1637
|
};
|
|
2266
1638
|
return new ReadableStream(
|
|
2267
1639
|
{
|
|
2268
1640
|
async pull(f) {
|
|
2269
1641
|
try {
|
|
2270
|
-
const { done:
|
|
2271
|
-
if (
|
|
1642
|
+
const { done: u, value: c } = await s.next();
|
|
1643
|
+
if (u) {
|
|
2272
1644
|
l(), f.close();
|
|
2273
1645
|
return;
|
|
2274
1646
|
}
|
|
2275
|
-
let
|
|
2276
|
-
if (
|
|
2277
|
-
let
|
|
2278
|
-
|
|
1647
|
+
let d = c.byteLength;
|
|
1648
|
+
if (n) {
|
|
1649
|
+
let R = o += d;
|
|
1650
|
+
n(R);
|
|
2279
1651
|
}
|
|
2280
|
-
f.enqueue(new Uint8Array(
|
|
2281
|
-
} catch (
|
|
2282
|
-
throw l(
|
|
1652
|
+
f.enqueue(new Uint8Array(c));
|
|
1653
|
+
} catch (u) {
|
|
1654
|
+
throw l(u), u;
|
|
2283
1655
|
}
|
|
2284
1656
|
},
|
|
2285
1657
|
cancel(f) {
|
|
@@ -2290,189 +1662,189 @@ const _r = (t) => {
|
|
|
2290
1662
|
highWaterMark: 2
|
|
2291
1663
|
}
|
|
2292
1664
|
);
|
|
2293
|
-
},
|
|
1665
|
+
}, rt = 64 * 1024, { isFunction: ye } = a, Or = (({ Request: t, Response: e }) => ({
|
|
2294
1666
|
Request: t,
|
|
2295
1667
|
Response: e
|
|
2296
|
-
}))(
|
|
1668
|
+
}))(a.global), { ReadableStream: st, TextEncoder: ot } = a.global, it = (t, ...e) => {
|
|
2297
1669
|
try {
|
|
2298
1670
|
return !!t(...e);
|
|
2299
1671
|
} catch {
|
|
2300
1672
|
return !1;
|
|
2301
1673
|
}
|
|
2302
|
-
},
|
|
2303
|
-
t =
|
|
1674
|
+
}, Sr = (t) => {
|
|
1675
|
+
t = a.merge.call(
|
|
2304
1676
|
{
|
|
2305
1677
|
skipUndefined: !0
|
|
2306
1678
|
},
|
|
2307
|
-
|
|
1679
|
+
Or,
|
|
2308
1680
|
t
|
|
2309
1681
|
);
|
|
2310
|
-
const { fetch: e, Request:
|
|
1682
|
+
const { fetch: e, Request: n, Response: r } = t, s = e ? ye(e) : typeof fetch == "function", o = ye(n), i = ye(r);
|
|
2311
1683
|
if (!s)
|
|
2312
1684
|
return !1;
|
|
2313
|
-
const l = s &&
|
|
2314
|
-
let
|
|
2315
|
-
const
|
|
2316
|
-
body: new
|
|
1685
|
+
const l = s && ye(st), f = s && (typeof ot == "function" ? /* @__PURE__ */ ((p) => (g) => p.encode(g))(new ot()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), u = o && l && it(() => {
|
|
1686
|
+
let p = !1;
|
|
1687
|
+
const g = new n(k.origin, {
|
|
1688
|
+
body: new st(),
|
|
2317
1689
|
method: "POST",
|
|
2318
1690
|
get duplex() {
|
|
2319
|
-
return
|
|
1691
|
+
return p = !0, "half";
|
|
2320
1692
|
}
|
|
2321
|
-
}),
|
|
2322
|
-
return
|
|
2323
|
-
}),
|
|
2324
|
-
stream:
|
|
1693
|
+
}), h = g.headers.has("Content-Type");
|
|
1694
|
+
return g.body != null && g.body.cancel(), p && !h;
|
|
1695
|
+
}), c = i && l && it(() => a.isReadableStream(new r("").body)), d = {
|
|
1696
|
+
stream: c && ((p) => p.body)
|
|
2325
1697
|
};
|
|
2326
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
2327
|
-
!
|
|
2328
|
-
let
|
|
2329
|
-
if (
|
|
2330
|
-
return
|
|
2331
|
-
throw new
|
|
2332
|
-
`Response type '${
|
|
2333
|
-
|
|
2334
|
-
|
|
1698
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1699
|
+
!d[p] && (d[p] = (g, h) => {
|
|
1700
|
+
let x = g && g[p];
|
|
1701
|
+
if (x)
|
|
1702
|
+
return x.call(g);
|
|
1703
|
+
throw new y(
|
|
1704
|
+
`Response type '${p}' is not supported`,
|
|
1705
|
+
y.ERR_NOT_SUPPORT,
|
|
1706
|
+
h
|
|
2335
1707
|
);
|
|
2336
1708
|
});
|
|
2337
1709
|
});
|
|
2338
|
-
const
|
|
2339
|
-
if (
|
|
1710
|
+
const R = async (p) => {
|
|
1711
|
+
if (p == null)
|
|
2340
1712
|
return 0;
|
|
2341
|
-
if (
|
|
2342
|
-
return
|
|
2343
|
-
if (
|
|
2344
|
-
return (await new
|
|
1713
|
+
if (a.isBlob(p))
|
|
1714
|
+
return p.size;
|
|
1715
|
+
if (a.isSpecCompliantForm(p))
|
|
1716
|
+
return (await new n(k.origin, {
|
|
2345
1717
|
method: "POST",
|
|
2346
|
-
body:
|
|
1718
|
+
body: p
|
|
2347
1719
|
}).arrayBuffer()).byteLength;
|
|
2348
|
-
if (
|
|
2349
|
-
return
|
|
2350
|
-
if (
|
|
2351
|
-
return (await f(
|
|
2352
|
-
},
|
|
2353
|
-
const
|
|
2354
|
-
return
|
|
1720
|
+
if (a.isArrayBufferView(p) || a.isArrayBuffer(p))
|
|
1721
|
+
return p.byteLength;
|
|
1722
|
+
if (a.isURLSearchParams(p) && (p = p + ""), a.isString(p))
|
|
1723
|
+
return (await f(p)).byteLength;
|
|
1724
|
+
}, S = async (p, g) => {
|
|
1725
|
+
const h = a.toFiniteNumber(p.getContentLength());
|
|
1726
|
+
return h ?? R(g);
|
|
2355
1727
|
};
|
|
2356
|
-
return async (
|
|
1728
|
+
return async (p) => {
|
|
2357
1729
|
let {
|
|
2358
|
-
url:
|
|
2359
|
-
method:
|
|
2360
|
-
data:
|
|
2361
|
-
signal:
|
|
2362
|
-
cancelToken:
|
|
2363
|
-
timeout:
|
|
2364
|
-
onDownloadProgress:
|
|
2365
|
-
onUploadProgress:
|
|
2366
|
-
responseType:
|
|
2367
|
-
headers:
|
|
2368
|
-
withCredentials:
|
|
2369
|
-
fetchOptions:
|
|
2370
|
-
} =
|
|
2371
|
-
|
|
2372
|
-
let
|
|
2373
|
-
[
|
|
2374
|
-
|
|
2375
|
-
),
|
|
2376
|
-
const
|
|
2377
|
-
|
|
1730
|
+
url: g,
|
|
1731
|
+
method: h,
|
|
1732
|
+
data: x,
|
|
1733
|
+
signal: j,
|
|
1734
|
+
cancelToken: O,
|
|
1735
|
+
timeout: T,
|
|
1736
|
+
onDownloadProgress: L,
|
|
1737
|
+
onUploadProgress: K,
|
|
1738
|
+
responseType: N,
|
|
1739
|
+
headers: U,
|
|
1740
|
+
withCredentials: q = "same-origin",
|
|
1741
|
+
fetchOptions: se
|
|
1742
|
+
} = Pt(p), G = e || fetch;
|
|
1743
|
+
N = N ? (N + "").toLowerCase() : "text";
|
|
1744
|
+
let X = wr(
|
|
1745
|
+
[j, O && O.toAbortSignal()],
|
|
1746
|
+
T
|
|
1747
|
+
), J = null;
|
|
1748
|
+
const $ = X && X.unsubscribe && (() => {
|
|
1749
|
+
X.unsubscribe();
|
|
2378
1750
|
});
|
|
2379
|
-
let
|
|
1751
|
+
let m;
|
|
2380
1752
|
try {
|
|
2381
|
-
if (
|
|
2382
|
-
let
|
|
1753
|
+
if (K && u && h !== "get" && h !== "head" && (m = await S(U, x)) !== 0) {
|
|
1754
|
+
let C = new n(g, {
|
|
2383
1755
|
method: "POST",
|
|
2384
|
-
body:
|
|
1756
|
+
body: x,
|
|
2385
1757
|
duplex: "half"
|
|
2386
|
-
}),
|
|
2387
|
-
if (
|
|
2388
|
-
const [
|
|
2389
|
-
|
|
2390
|
-
|
|
1758
|
+
}), P;
|
|
1759
|
+
if (a.isFormData(x) && (P = C.headers.get("content-type")) && U.setContentType(P), C.body) {
|
|
1760
|
+
const [I, ee] = Ze(
|
|
1761
|
+
m,
|
|
1762
|
+
Re(et(K))
|
|
2391
1763
|
);
|
|
2392
|
-
|
|
1764
|
+
x = nt(C.body, rt, I, ee);
|
|
2393
1765
|
}
|
|
2394
1766
|
}
|
|
2395
|
-
|
|
2396
|
-
const
|
|
2397
|
-
if (
|
|
2398
|
-
const
|
|
2399
|
-
|
|
1767
|
+
a.isString(q) || (q = q ? "include" : "omit");
|
|
1768
|
+
const b = o && "credentials" in n.prototype;
|
|
1769
|
+
if (a.isFormData(x)) {
|
|
1770
|
+
const C = U.getContentType();
|
|
1771
|
+
C && /^multipart\/form-data/i.test(C) && !/boundary=/i.test(C) && U.delete("content-type");
|
|
2400
1772
|
}
|
|
2401
|
-
const
|
|
2402
|
-
...
|
|
2403
|
-
signal:
|
|
2404
|
-
method:
|
|
2405
|
-
headers:
|
|
2406
|
-
body:
|
|
1773
|
+
const w = {
|
|
1774
|
+
...se,
|
|
1775
|
+
signal: X,
|
|
1776
|
+
method: h.toUpperCase(),
|
|
1777
|
+
headers: U.normalize().toJSON(),
|
|
1778
|
+
body: x,
|
|
2407
1779
|
duplex: "half",
|
|
2408
|
-
credentials:
|
|
1780
|
+
credentials: b ? q : void 0
|
|
2409
1781
|
};
|
|
2410
|
-
|
|
2411
|
-
let
|
|
2412
|
-
const
|
|
2413
|
-
if (
|
|
2414
|
-
const
|
|
2415
|
-
["status", "statusText", "headers"].forEach((
|
|
2416
|
-
|
|
1782
|
+
J = o && new n(g, w);
|
|
1783
|
+
let E = await (o ? G(J, se) : G(g, w));
|
|
1784
|
+
const A = c && (N === "stream" || N === "response");
|
|
1785
|
+
if (c && (L || A && $)) {
|
|
1786
|
+
const C = {};
|
|
1787
|
+
["status", "statusText", "headers"].forEach((oe) => {
|
|
1788
|
+
C[oe] = E[oe];
|
|
2417
1789
|
});
|
|
2418
|
-
const
|
|
2419
|
-
|
|
2420
|
-
|
|
1790
|
+
const P = a.toFiniteNumber(E.headers.get("content-length")), [I, ee] = L && Ze(
|
|
1791
|
+
P,
|
|
1792
|
+
Re(et(L), !0)
|
|
2421
1793
|
) || [];
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
1794
|
+
E = new r(
|
|
1795
|
+
nt(E.body, rt, I, () => {
|
|
1796
|
+
ee && ee(), $ && $();
|
|
2425
1797
|
}),
|
|
2426
|
-
|
|
1798
|
+
C
|
|
2427
1799
|
);
|
|
2428
1800
|
}
|
|
2429
|
-
|
|
2430
|
-
let
|
|
2431
|
-
|
|
2432
|
-
|
|
1801
|
+
N = N || "text";
|
|
1802
|
+
let W = await d[a.findKey(d, N) || "text"](
|
|
1803
|
+
E,
|
|
1804
|
+
p
|
|
2433
1805
|
);
|
|
2434
|
-
return !
|
|
2435
|
-
|
|
2436
|
-
data:
|
|
2437
|
-
headers:
|
|
2438
|
-
status:
|
|
2439
|
-
statusText:
|
|
2440
|
-
config:
|
|
2441
|
-
request:
|
|
1806
|
+
return !A && $ && $(), await new Promise((C, P) => {
|
|
1807
|
+
At(C, P, {
|
|
1808
|
+
data: W,
|
|
1809
|
+
headers: F.from(E.headers),
|
|
1810
|
+
status: E.status,
|
|
1811
|
+
statusText: E.statusText,
|
|
1812
|
+
config: p,
|
|
1813
|
+
request: J
|
|
2442
1814
|
});
|
|
2443
1815
|
});
|
|
2444
|
-
} catch (
|
|
2445
|
-
throw
|
|
2446
|
-
new
|
|
1816
|
+
} catch (b) {
|
|
1817
|
+
throw $ && $(), b && b.name === "TypeError" && /Load failed|fetch/i.test(b.message) ? Object.assign(
|
|
1818
|
+
new y(
|
|
2447
1819
|
"Network Error",
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
1820
|
+
y.ERR_NETWORK,
|
|
1821
|
+
p,
|
|
1822
|
+
J,
|
|
1823
|
+
b && b.response
|
|
2452
1824
|
),
|
|
2453
1825
|
{
|
|
2454
|
-
cause:
|
|
1826
|
+
cause: b.cause || b
|
|
2455
1827
|
}
|
|
2456
|
-
) :
|
|
1828
|
+
) : y.from(b, b && b.code, p, J, b && b.response);
|
|
2457
1829
|
}
|
|
2458
1830
|
};
|
|
2459
|
-
},
|
|
1831
|
+
}, _r = /* @__PURE__ */ new Map(), Lt = (t) => {
|
|
2460
1832
|
let e = t && t.env || {};
|
|
2461
|
-
const { fetch:
|
|
2462
|
-
let i =
|
|
1833
|
+
const { fetch: n, Request: r, Response: s } = e, o = [r, s, n];
|
|
1834
|
+
let i = o.length, l = i, f, u, c = _r;
|
|
2463
1835
|
for (; l--; )
|
|
2464
|
-
f =
|
|
2465
|
-
return
|
|
1836
|
+
f = o[l], u = c.get(f), u === void 0 && c.set(f, u = l ? /* @__PURE__ */ new Map() : Sr(e)), c = u;
|
|
1837
|
+
return u;
|
|
2466
1838
|
};
|
|
2467
|
-
|
|
2468
|
-
const
|
|
2469
|
-
http:
|
|
2470
|
-
xhr:
|
|
1839
|
+
Lt();
|
|
1840
|
+
const Ke = {
|
|
1841
|
+
http: In,
|
|
1842
|
+
xhr: Er,
|
|
2471
1843
|
fetch: {
|
|
2472
|
-
get:
|
|
1844
|
+
get: Lt
|
|
2473
1845
|
}
|
|
2474
1846
|
};
|
|
2475
|
-
|
|
1847
|
+
a.forEach(Ke, (t, e) => {
|
|
2476
1848
|
if (t) {
|
|
2477
1849
|
try {
|
|
2478
1850
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -2481,122 +1853,122 @@ c.forEach(Tt, (t, e) => {
|
|
|
2481
1853
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
2482
1854
|
}
|
|
2483
1855
|
});
|
|
2484
|
-
const
|
|
2485
|
-
function
|
|
2486
|
-
t =
|
|
2487
|
-
const { length:
|
|
2488
|
-
let
|
|
2489
|
-
const
|
|
2490
|
-
for (let i = 0; i <
|
|
2491
|
-
|
|
1856
|
+
const at = (t) => `- ${t}`, Ar = (t) => a.isFunction(t) || t === null || t === !1;
|
|
1857
|
+
function Cr(t, e) {
|
|
1858
|
+
t = a.isArray(t) ? t : [t];
|
|
1859
|
+
const { length: n } = t;
|
|
1860
|
+
let r, s;
|
|
1861
|
+
const o = {};
|
|
1862
|
+
for (let i = 0; i < n; i++) {
|
|
1863
|
+
r = t[i];
|
|
2492
1864
|
let l;
|
|
2493
|
-
if (s =
|
|
2494
|
-
throw new
|
|
2495
|
-
if (s && (
|
|
1865
|
+
if (s = r, !Ar(r) && (s = Ke[(l = String(r)).toLowerCase()], s === void 0))
|
|
1866
|
+
throw new y(`Unknown adapter '${l}'`);
|
|
1867
|
+
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
2496
1868
|
break;
|
|
2497
|
-
|
|
1869
|
+
o[l || "#" + i] = s;
|
|
2498
1870
|
}
|
|
2499
1871
|
if (!s) {
|
|
2500
|
-
const i = Object.entries(
|
|
2501
|
-
([f,
|
|
1872
|
+
const i = Object.entries(o).map(
|
|
1873
|
+
([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2502
1874
|
);
|
|
2503
|
-
let l =
|
|
2504
|
-
` + i.map(
|
|
2505
|
-
`) : " " +
|
|
2506
|
-
throw new
|
|
1875
|
+
let l = n ? i.length > 1 ? `since :
|
|
1876
|
+
` + i.map(at).join(`
|
|
1877
|
+
`) : " " + at(i[0]) : "as no adapter specified";
|
|
1878
|
+
throw new y(
|
|
2507
1879
|
"There is no suitable adapter to dispatch the request " + l,
|
|
2508
1880
|
"ERR_NOT_SUPPORT"
|
|
2509
1881
|
);
|
|
2510
1882
|
}
|
|
2511
1883
|
return s;
|
|
2512
1884
|
}
|
|
2513
|
-
const
|
|
1885
|
+
const kt = {
|
|
2514
1886
|
/**
|
|
2515
1887
|
* Resolve an adapter from a list of adapter names or functions.
|
|
2516
1888
|
* @type {Function}
|
|
2517
1889
|
*/
|
|
2518
|
-
getAdapter:
|
|
1890
|
+
getAdapter: Cr,
|
|
2519
1891
|
/**
|
|
2520
1892
|
* Exposes all known adapters
|
|
2521
1893
|
* @type {Object<string, Function|Object>}
|
|
2522
1894
|
*/
|
|
2523
|
-
adapters:
|
|
1895
|
+
adapters: Ke
|
|
2524
1896
|
};
|
|
2525
|
-
function
|
|
1897
|
+
function De(t) {
|
|
2526
1898
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
2527
|
-
throw new
|
|
1899
|
+
throw new fe(null, t);
|
|
2528
1900
|
}
|
|
2529
|
-
function
|
|
2530
|
-
return
|
|
2531
|
-
function(
|
|
2532
|
-
return
|
|
1901
|
+
function lt(t) {
|
|
1902
|
+
return De(t), t.headers = F.from(t.headers), t.data = ve.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), kt.getAdapter(t.adapter || de.adapter, t)(t).then(
|
|
1903
|
+
function(r) {
|
|
1904
|
+
return De(t), r.data = ve.call(t, t.transformResponse, r), r.headers = F.from(r.headers), r;
|
|
2533
1905
|
},
|
|
2534
|
-
function(
|
|
2535
|
-
return
|
|
1906
|
+
function(r) {
|
|
1907
|
+
return _t(r) || (De(t), r && r.response && (r.response.data = ve.call(
|
|
2536
1908
|
t,
|
|
2537
1909
|
t.transformResponse,
|
|
2538
|
-
|
|
2539
|
-
),
|
|
1910
|
+
r.response
|
|
1911
|
+
), r.response.headers = F.from(r.response.headers))), Promise.reject(r);
|
|
2540
1912
|
}
|
|
2541
1913
|
);
|
|
2542
1914
|
}
|
|
2543
|
-
const
|
|
1915
|
+
const Nt = "1.15.2", Ae = {};
|
|
2544
1916
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2545
|
-
|
|
2546
|
-
return typeof
|
|
1917
|
+
Ae[t] = function(r) {
|
|
1918
|
+
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2547
1919
|
};
|
|
2548
1920
|
});
|
|
2549
|
-
const
|
|
2550
|
-
|
|
2551
|
-
function s(
|
|
2552
|
-
return "[Axios v" +
|
|
1921
|
+
const ct = {};
|
|
1922
|
+
Ae.transitional = function(e, n, r) {
|
|
1923
|
+
function s(o, i) {
|
|
1924
|
+
return "[Axios v" + Nt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
2553
1925
|
}
|
|
2554
|
-
return (
|
|
1926
|
+
return (o, i, l) => {
|
|
2555
1927
|
if (e === !1)
|
|
2556
|
-
throw new
|
|
2557
|
-
s(i, " has been removed" + (
|
|
2558
|
-
|
|
1928
|
+
throw new y(
|
|
1929
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1930
|
+
y.ERR_DEPRECATED
|
|
2559
1931
|
);
|
|
2560
|
-
return
|
|
1932
|
+
return n && !ct[i] && (ct[i] = !0, console.warn(
|
|
2561
1933
|
s(
|
|
2562
1934
|
i,
|
|
2563
|
-
" has been deprecated since v" +
|
|
1935
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2564
1936
|
)
|
|
2565
|
-
)), e ? e(
|
|
1937
|
+
)), e ? e(o, i, l) : !0;
|
|
2566
1938
|
};
|
|
2567
1939
|
};
|
|
2568
|
-
|
|
2569
|
-
return (
|
|
1940
|
+
Ae.spelling = function(e) {
|
|
1941
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
2570
1942
|
};
|
|
2571
|
-
function
|
|
1943
|
+
function Pr(t, e, n) {
|
|
2572
1944
|
if (typeof t != "object")
|
|
2573
|
-
throw new
|
|
2574
|
-
const
|
|
2575
|
-
let s =
|
|
1945
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1946
|
+
const r = Object.keys(t);
|
|
1947
|
+
let s = r.length;
|
|
2576
1948
|
for (; s-- > 0; ) {
|
|
2577
|
-
const
|
|
1949
|
+
const o = r[s], i = Object.prototype.hasOwnProperty.call(e, o) ? e[o] : void 0;
|
|
2578
1950
|
if (i) {
|
|
2579
|
-
const l = t[
|
|
1951
|
+
const l = t[o], f = l === void 0 || i(l, o, t);
|
|
2580
1952
|
if (f !== !0)
|
|
2581
|
-
throw new
|
|
2582
|
-
"option " +
|
|
2583
|
-
|
|
1953
|
+
throw new y(
|
|
1954
|
+
"option " + o + " must be " + f,
|
|
1955
|
+
y.ERR_BAD_OPTION_VALUE
|
|
2584
1956
|
);
|
|
2585
1957
|
continue;
|
|
2586
1958
|
}
|
|
2587
|
-
if (
|
|
2588
|
-
throw new
|
|
1959
|
+
if (n !== !0)
|
|
1960
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
2589
1961
|
}
|
|
2590
1962
|
}
|
|
2591
|
-
const
|
|
2592
|
-
assertOptions:
|
|
2593
|
-
validators:
|
|
2594
|
-
},
|
|
2595
|
-
let
|
|
1963
|
+
const we = {
|
|
1964
|
+
assertOptions: Pr,
|
|
1965
|
+
validators: Ae
|
|
1966
|
+
}, M = we.validators;
|
|
1967
|
+
let Y = class {
|
|
2596
1968
|
constructor(e) {
|
|
2597
1969
|
this.defaults = e || {}, this.interceptors = {
|
|
2598
|
-
request: new
|
|
2599
|
-
response: new
|
|
1970
|
+
request: new Qe(),
|
|
1971
|
+
response: new Qe()
|
|
2600
1972
|
};
|
|
2601
1973
|
}
|
|
2602
1974
|
/**
|
|
@@ -2607,14 +1979,14 @@ let me = class {
|
|
|
2607
1979
|
*
|
|
2608
1980
|
* @returns {Promise} The Promise to be fulfilled
|
|
2609
1981
|
*/
|
|
2610
|
-
async request(e,
|
|
1982
|
+
async request(e, n) {
|
|
2611
1983
|
try {
|
|
2612
|
-
return await this._request(e,
|
|
2613
|
-
} catch (
|
|
2614
|
-
if (
|
|
1984
|
+
return await this._request(e, n);
|
|
1985
|
+
} catch (r) {
|
|
1986
|
+
if (r instanceof Error) {
|
|
2615
1987
|
let s = {};
|
|
2616
1988
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2617
|
-
const
|
|
1989
|
+
const o = (() => {
|
|
2618
1990
|
if (!s.stack)
|
|
2619
1991
|
return "";
|
|
2620
1992
|
const i = s.stack.indexOf(`
|
|
@@ -2622,153 +1994,153 @@ let me = class {
|
|
|
2622
1994
|
return i === -1 ? "" : s.stack.slice(i + 1);
|
|
2623
1995
|
})();
|
|
2624
1996
|
try {
|
|
2625
|
-
if (!
|
|
2626
|
-
|
|
2627
|
-
else if (
|
|
2628
|
-
const i =
|
|
2629
|
-
`), l = i === -1 ? -1 :
|
|
2630
|
-
`, i + 1), f = l === -1 ? "" :
|
|
2631
|
-
String(
|
|
2632
|
-
` +
|
|
1997
|
+
if (!r.stack)
|
|
1998
|
+
r.stack = o;
|
|
1999
|
+
else if (o) {
|
|
2000
|
+
const i = o.indexOf(`
|
|
2001
|
+
`), l = i === -1 ? -1 : o.indexOf(`
|
|
2002
|
+
`, i + 1), f = l === -1 ? "" : o.slice(l + 1);
|
|
2003
|
+
String(r.stack).endsWith(f) || (r.stack += `
|
|
2004
|
+
` + o);
|
|
2633
2005
|
}
|
|
2634
2006
|
} catch {
|
|
2635
2007
|
}
|
|
2636
2008
|
}
|
|
2637
|
-
throw
|
|
2009
|
+
throw r;
|
|
2638
2010
|
}
|
|
2639
2011
|
}
|
|
2640
|
-
_request(e,
|
|
2641
|
-
typeof e == "string" ? (
|
|
2642
|
-
const { transitional:
|
|
2643
|
-
|
|
2644
|
-
|
|
2012
|
+
_request(e, n) {
|
|
2013
|
+
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = Z(this.defaults, n);
|
|
2014
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
2015
|
+
r !== void 0 && we.assertOptions(
|
|
2016
|
+
r,
|
|
2645
2017
|
{
|
|
2646
|
-
silentJSONParsing:
|
|
2647
|
-
forcedJSONParsing:
|
|
2648
|
-
clarifyTimeoutError:
|
|
2649
|
-
legacyInterceptorReqResOrdering:
|
|
2018
|
+
silentJSONParsing: M.transitional(M.boolean),
|
|
2019
|
+
forcedJSONParsing: M.transitional(M.boolean),
|
|
2020
|
+
clarifyTimeoutError: M.transitional(M.boolean),
|
|
2021
|
+
legacyInterceptorReqResOrdering: M.transitional(M.boolean)
|
|
2650
2022
|
},
|
|
2651
2023
|
!1
|
|
2652
|
-
), s != null && (
|
|
2024
|
+
), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
2653
2025
|
serialize: s
|
|
2654
|
-
} :
|
|
2026
|
+
} : we.assertOptions(
|
|
2655
2027
|
s,
|
|
2656
2028
|
{
|
|
2657
|
-
encode:
|
|
2658
|
-
serialize:
|
|
2029
|
+
encode: M.function,
|
|
2030
|
+
serialize: M.function
|
|
2659
2031
|
},
|
|
2660
2032
|
!0
|
|
2661
|
-
)),
|
|
2662
|
-
|
|
2033
|
+
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), we.assertOptions(
|
|
2034
|
+
n,
|
|
2663
2035
|
{
|
|
2664
|
-
baseUrl:
|
|
2665
|
-
withXsrfToken:
|
|
2036
|
+
baseUrl: M.spelling("baseURL"),
|
|
2037
|
+
withXsrfToken: M.spelling("withXSRFToken")
|
|
2666
2038
|
},
|
|
2667
2039
|
!0
|
|
2668
|
-
),
|
|
2669
|
-
let i =
|
|
2670
|
-
|
|
2671
|
-
delete
|
|
2672
|
-
}),
|
|
2040
|
+
), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2041
|
+
let i = o && a.merge(o.common, o[n.method]);
|
|
2042
|
+
o && a.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (p) => {
|
|
2043
|
+
delete o[p];
|
|
2044
|
+
}), n.headers = F.concat(i, o);
|
|
2673
2045
|
const l = [];
|
|
2674
2046
|
let f = !0;
|
|
2675
|
-
this.interceptors.request.forEach(function(
|
|
2676
|
-
if (typeof
|
|
2047
|
+
this.interceptors.request.forEach(function(g) {
|
|
2048
|
+
if (typeof g.runWhen == "function" && g.runWhen(n) === !1)
|
|
2677
2049
|
return;
|
|
2678
|
-
f = f &&
|
|
2679
|
-
const
|
|
2680
|
-
|
|
2050
|
+
f = f && g.synchronous;
|
|
2051
|
+
const h = n.transitional || He;
|
|
2052
|
+
h && h.legacyInterceptorReqResOrdering ? l.unshift(g.fulfilled, g.rejected) : l.push(g.fulfilled, g.rejected);
|
|
2681
2053
|
});
|
|
2682
|
-
const
|
|
2683
|
-
this.interceptors.response.forEach(function(
|
|
2684
|
-
|
|
2054
|
+
const u = [];
|
|
2055
|
+
this.interceptors.response.forEach(function(g) {
|
|
2056
|
+
u.push(g.fulfilled, g.rejected);
|
|
2685
2057
|
});
|
|
2686
|
-
let
|
|
2058
|
+
let c, d = 0, R;
|
|
2687
2059
|
if (!f) {
|
|
2688
|
-
const
|
|
2689
|
-
for (
|
|
2690
|
-
|
|
2691
|
-
return
|
|
2692
|
-
}
|
|
2693
|
-
|
|
2694
|
-
let
|
|
2695
|
-
for (;
|
|
2696
|
-
const
|
|
2060
|
+
const p = [lt.bind(this), void 0];
|
|
2061
|
+
for (p.unshift(...l), p.push(...u), R = p.length, c = Promise.resolve(n); d < R; )
|
|
2062
|
+
c = c.then(p[d++], p[d++]);
|
|
2063
|
+
return c;
|
|
2064
|
+
}
|
|
2065
|
+
R = l.length;
|
|
2066
|
+
let S = n;
|
|
2067
|
+
for (; d < R; ) {
|
|
2068
|
+
const p = l[d++], g = l[d++];
|
|
2697
2069
|
try {
|
|
2698
|
-
|
|
2699
|
-
} catch (
|
|
2700
|
-
|
|
2070
|
+
S = p(S);
|
|
2071
|
+
} catch (h) {
|
|
2072
|
+
g.call(this, h);
|
|
2701
2073
|
break;
|
|
2702
2074
|
}
|
|
2703
2075
|
}
|
|
2704
2076
|
try {
|
|
2705
|
-
|
|
2706
|
-
} catch (
|
|
2707
|
-
return Promise.reject(
|
|
2077
|
+
c = lt.call(this, S);
|
|
2078
|
+
} catch (p) {
|
|
2079
|
+
return Promise.reject(p);
|
|
2708
2080
|
}
|
|
2709
|
-
for (
|
|
2710
|
-
|
|
2711
|
-
return
|
|
2081
|
+
for (d = 0, R = u.length; d < R; )
|
|
2082
|
+
c = c.then(u[d++], u[d++]);
|
|
2083
|
+
return c;
|
|
2712
2084
|
}
|
|
2713
2085
|
getUri(e) {
|
|
2714
|
-
e =
|
|
2715
|
-
const
|
|
2716
|
-
return
|
|
2086
|
+
e = Z(this.defaults, e);
|
|
2087
|
+
const n = Ct(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
2088
|
+
return Ot(n, e.params, e.paramsSerializer);
|
|
2717
2089
|
}
|
|
2718
2090
|
};
|
|
2719
|
-
|
|
2720
|
-
|
|
2091
|
+
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2092
|
+
Y.prototype[e] = function(n, r) {
|
|
2721
2093
|
return this.request(
|
|
2722
|
-
|
|
2094
|
+
Z(r || {}, {
|
|
2723
2095
|
method: e,
|
|
2724
|
-
url:
|
|
2725
|
-
data: (
|
|
2096
|
+
url: n,
|
|
2097
|
+
data: (r || {}).data
|
|
2726
2098
|
})
|
|
2727
2099
|
);
|
|
2728
2100
|
};
|
|
2729
2101
|
});
|
|
2730
|
-
|
|
2731
|
-
function r
|
|
2732
|
-
return function(
|
|
2102
|
+
a.forEach(["post", "put", "patch"], function(e) {
|
|
2103
|
+
function n(r) {
|
|
2104
|
+
return function(o, i, l) {
|
|
2733
2105
|
return this.request(
|
|
2734
|
-
|
|
2106
|
+
Z(l || {}, {
|
|
2735
2107
|
method: e,
|
|
2736
|
-
headers:
|
|
2108
|
+
headers: r ? {
|
|
2737
2109
|
"Content-Type": "multipart/form-data"
|
|
2738
2110
|
} : {},
|
|
2739
|
-
url:
|
|
2111
|
+
url: o,
|
|
2740
2112
|
data: i
|
|
2741
2113
|
})
|
|
2742
2114
|
);
|
|
2743
2115
|
};
|
|
2744
2116
|
}
|
|
2745
|
-
|
|
2117
|
+
Y.prototype[e] = n(), Y.prototype[e + "Form"] = n(!0);
|
|
2746
2118
|
});
|
|
2747
|
-
let
|
|
2119
|
+
let Lr = class vt {
|
|
2748
2120
|
constructor(e) {
|
|
2749
2121
|
if (typeof e != "function")
|
|
2750
2122
|
throw new TypeError("executor must be a function.");
|
|
2751
|
-
let
|
|
2752
|
-
this.promise = new Promise(function(
|
|
2753
|
-
|
|
2123
|
+
let n;
|
|
2124
|
+
this.promise = new Promise(function(o) {
|
|
2125
|
+
n = o;
|
|
2754
2126
|
});
|
|
2755
|
-
const
|
|
2127
|
+
const r = this;
|
|
2756
2128
|
this.promise.then((s) => {
|
|
2757
|
-
if (!
|
|
2758
|
-
let
|
|
2759
|
-
for (;
|
|
2760
|
-
|
|
2761
|
-
|
|
2129
|
+
if (!r._listeners) return;
|
|
2130
|
+
let o = r._listeners.length;
|
|
2131
|
+
for (; o-- > 0; )
|
|
2132
|
+
r._listeners[o](s);
|
|
2133
|
+
r._listeners = null;
|
|
2762
2134
|
}), this.promise.then = (s) => {
|
|
2763
|
-
let
|
|
2135
|
+
let o;
|
|
2764
2136
|
const i = new Promise((l) => {
|
|
2765
|
-
|
|
2137
|
+
r.subscribe(l), o = l;
|
|
2766
2138
|
}).then(s);
|
|
2767
2139
|
return i.cancel = function() {
|
|
2768
|
-
|
|
2140
|
+
r.unsubscribe(o);
|
|
2769
2141
|
}, i;
|
|
2770
|
-
}, e(function(
|
|
2771
|
-
|
|
2142
|
+
}, e(function(o, i, l) {
|
|
2143
|
+
r.reason || (r.reason = new fe(o, i, l), n(r.reason));
|
|
2772
2144
|
});
|
|
2773
2145
|
}
|
|
2774
2146
|
/**
|
|
@@ -2794,14 +2166,14 @@ let Js = class Ar {
|
|
|
2794
2166
|
unsubscribe(e) {
|
|
2795
2167
|
if (!this._listeners)
|
|
2796
2168
|
return;
|
|
2797
|
-
const
|
|
2798
|
-
|
|
2169
|
+
const n = this._listeners.indexOf(e);
|
|
2170
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2799
2171
|
}
|
|
2800
2172
|
toAbortSignal() {
|
|
2801
|
-
const e = new AbortController(),
|
|
2802
|
-
e.abort(
|
|
2173
|
+
const e = new AbortController(), n = (r) => {
|
|
2174
|
+
e.abort(r);
|
|
2803
2175
|
};
|
|
2804
|
-
return this.subscribe(
|
|
2176
|
+
return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
|
|
2805
2177
|
}
|
|
2806
2178
|
/**
|
|
2807
2179
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -2810,22 +2182,22 @@ let Js = class Ar {
|
|
|
2810
2182
|
static source() {
|
|
2811
2183
|
let e;
|
|
2812
2184
|
return {
|
|
2813
|
-
token: new
|
|
2185
|
+
token: new vt(function(s) {
|
|
2814
2186
|
e = s;
|
|
2815
2187
|
}),
|
|
2816
2188
|
cancel: e
|
|
2817
2189
|
};
|
|
2818
2190
|
}
|
|
2819
2191
|
};
|
|
2820
|
-
function
|
|
2821
|
-
return function(
|
|
2822
|
-
return t.apply(null,
|
|
2192
|
+
function kr(t) {
|
|
2193
|
+
return function(n) {
|
|
2194
|
+
return t.apply(null, n);
|
|
2823
2195
|
};
|
|
2824
2196
|
}
|
|
2825
|
-
function
|
|
2826
|
-
return
|
|
2197
|
+
function Nr(t) {
|
|
2198
|
+
return a.isObject(t) && t.isAxiosError === !0;
|
|
2827
2199
|
}
|
|
2828
|
-
const
|
|
2200
|
+
const Me = {
|
|
2829
2201
|
Continue: 100,
|
|
2830
2202
|
SwitchingProtocols: 101,
|
|
2831
2203
|
Processing: 102,
|
|
@@ -2896,59 +2268,59 @@ const bt = {
|
|
|
2896
2268
|
SslHandshakeFailed: 525,
|
|
2897
2269
|
InvalidSslCertificate: 526
|
|
2898
2270
|
};
|
|
2899
|
-
Object.entries(
|
|
2900
|
-
|
|
2271
|
+
Object.entries(Me).forEach(([t, e]) => {
|
|
2272
|
+
Me[e] = t;
|
|
2901
2273
|
});
|
|
2902
|
-
function
|
|
2903
|
-
const e = new
|
|
2904
|
-
return
|
|
2905
|
-
return
|
|
2906
|
-
},
|
|
2274
|
+
function Dt(t) {
|
|
2275
|
+
const e = new Y(t), n = ht(Y.prototype.request, e);
|
|
2276
|
+
return a.extend(n, Y.prototype, e, { allOwnKeys: !0 }), a.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2277
|
+
return Dt(Z(t, s));
|
|
2278
|
+
}, n;
|
|
2907
2279
|
}
|
|
2908
|
-
const
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2280
|
+
const _ = Dt(de);
|
|
2281
|
+
_.Axios = Y;
|
|
2282
|
+
_.CanceledError = fe;
|
|
2283
|
+
_.CancelToken = Lr;
|
|
2284
|
+
_.isCancel = _t;
|
|
2285
|
+
_.VERSION = Nt;
|
|
2286
|
+
_.toFormData = _e;
|
|
2287
|
+
_.AxiosError = y;
|
|
2288
|
+
_.Cancel = _.CanceledError;
|
|
2289
|
+
_.all = function(e) {
|
|
2918
2290
|
return Promise.all(e);
|
|
2919
2291
|
};
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2292
|
+
_.spread = kr;
|
|
2293
|
+
_.isAxiosError = Nr;
|
|
2294
|
+
_.mergeConfig = Z;
|
|
2295
|
+
_.AxiosHeaders = F;
|
|
2296
|
+
_.formToJSON = (t) => St(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
2297
|
+
_.getAdapter = kt.getAdapter;
|
|
2298
|
+
_.HttpStatusCode = Me;
|
|
2299
|
+
_.default = _;
|
|
2928
2300
|
const {
|
|
2929
|
-
Axios:
|
|
2930
|
-
AxiosError:
|
|
2931
|
-
CanceledError:
|
|
2932
|
-
isCancel:
|
|
2933
|
-
CancelToken:
|
|
2934
|
-
VERSION:
|
|
2935
|
-
all:
|
|
2936
|
-
Cancel:
|
|
2937
|
-
isAxiosError:
|
|
2938
|
-
spread:
|
|
2939
|
-
toFormData:
|
|
2940
|
-
AxiosHeaders:
|
|
2941
|
-
HttpStatusCode:
|
|
2942
|
-
formToJSON:
|
|
2943
|
-
getAdapter:
|
|
2944
|
-
mergeConfig:
|
|
2945
|
-
} =
|
|
2946
|
-
class
|
|
2301
|
+
Axios: os,
|
|
2302
|
+
AxiosError: is,
|
|
2303
|
+
CanceledError: as,
|
|
2304
|
+
isCancel: ls,
|
|
2305
|
+
CancelToken: cs,
|
|
2306
|
+
VERSION: us,
|
|
2307
|
+
all: ds,
|
|
2308
|
+
Cancel: fs,
|
|
2309
|
+
isAxiosError: hs,
|
|
2310
|
+
spread: ps,
|
|
2311
|
+
toFormData: gs,
|
|
2312
|
+
AxiosHeaders: ms,
|
|
2313
|
+
HttpStatusCode: ys,
|
|
2314
|
+
formToJSON: bs,
|
|
2315
|
+
getAdapter: Es,
|
|
2316
|
+
mergeConfig: ws
|
|
2317
|
+
} = _, ut = "https://translation.googleapis.com/language/translate/v2", vr = /* @__PURE__ */ new Set([408, 425, 429, 500, 502, 503, 504]), Dr = (t) => !!t, Fr = (t) => _.isAxiosError(t);
|
|
2318
|
+
class Ur {
|
|
2947
2319
|
constructor(e) {
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
this.config = e, this.axios =
|
|
2951
|
-
baseURL: e.endpoint ??
|
|
2320
|
+
B(this, "type", "google");
|
|
2321
|
+
B(this, "axios");
|
|
2322
|
+
this.config = e, this.axios = _.create({
|
|
2323
|
+
baseURL: e.endpoint ?? ut,
|
|
2952
2324
|
headers: {
|
|
2953
2325
|
"Content-Type": "application/json",
|
|
2954
2326
|
...e.headers
|
|
@@ -2956,48 +2328,48 @@ class eo {
|
|
|
2956
2328
|
});
|
|
2957
2329
|
}
|
|
2958
2330
|
isAvailable() {
|
|
2959
|
-
return this.config.apiKey ||
|
|
2331
|
+
return this.config.apiKey || Dr(this.config.headers) ? { available: !0 } : {
|
|
2960
2332
|
available: !0
|
|
2961
2333
|
};
|
|
2962
2334
|
}
|
|
2963
|
-
async translate(e,
|
|
2964
|
-
var f,
|
|
2965
|
-
const
|
|
2335
|
+
async translate(e, n) {
|
|
2336
|
+
var f, u, c;
|
|
2337
|
+
const r = {
|
|
2966
2338
|
q: e.text,
|
|
2967
2339
|
target: e.targetLanguage,
|
|
2968
2340
|
format: "text"
|
|
2969
2341
|
};
|
|
2970
|
-
e.sourceLanguage && e.sourceLanguage !== "auto" && (
|
|
2342
|
+
e.sourceLanguage && e.sourceLanguage !== "auto" && (r.source = e.sourceLanguage), e.glossary && Object.keys(e.glossary).length > 0 && (r.glossaryConfig = {
|
|
2971
2343
|
glossaryData: {
|
|
2972
2344
|
languagePair: {
|
|
2973
2345
|
sourceLanguageCode: e.sourceLanguage ?? "auto",
|
|
2974
2346
|
targetLanguageCode: e.targetLanguage
|
|
2975
2347
|
},
|
|
2976
|
-
terms: Object.entries(e.glossary).map(([
|
|
2977
|
-
sourceText:
|
|
2978
|
-
targetText:
|
|
2348
|
+
terms: Object.entries(e.glossary).map(([d, R]) => ({
|
|
2349
|
+
sourceText: d,
|
|
2350
|
+
targetText: R
|
|
2979
2351
|
}))
|
|
2980
2352
|
}
|
|
2981
2353
|
});
|
|
2982
2354
|
const s = {
|
|
2983
2355
|
...this.config.headers,
|
|
2984
|
-
...
|
|
2985
|
-
}, i = (
|
|
2356
|
+
...n == null ? void 0 : n.headers
|
|
2357
|
+
}, i = (c = (u = (f = (await this.axios.post(
|
|
2986
2358
|
"",
|
|
2987
|
-
|
|
2359
|
+
r,
|
|
2988
2360
|
{
|
|
2989
2361
|
headers: s,
|
|
2990
2362
|
params: this.createQueryParams(),
|
|
2991
|
-
timeout:
|
|
2992
|
-
signal:
|
|
2363
|
+
timeout: n == null ? void 0 : n.timeoutMs,
|
|
2364
|
+
signal: n == null ? void 0 : n.signal
|
|
2993
2365
|
}
|
|
2994
|
-
)).data) == null ? void 0 : f.data) == null ? void 0 :
|
|
2366
|
+
)).data) == null ? void 0 : f.data) == null ? void 0 : u.translations) == null ? void 0 : c[0];
|
|
2995
2367
|
if (!(i != null && i.translatedText))
|
|
2996
2368
|
throw new Error(
|
|
2997
2369
|
"Google Translate response did not include translatedText"
|
|
2998
2370
|
);
|
|
2999
2371
|
const l = {
|
|
3000
|
-
endpoint: this.config.endpoint ??
|
|
2372
|
+
endpoint: this.config.endpoint ?? ut
|
|
3001
2373
|
};
|
|
3002
2374
|
return i.model && (l.model = i.model), this.config.projectId && (l.projectId = this.config.projectId), this.config.region && (l.region = this.config.region), {
|
|
3003
2375
|
translatedText: i.translatedText,
|
|
@@ -3006,13 +2378,13 @@ class eo {
|
|
|
3006
2378
|
};
|
|
3007
2379
|
}
|
|
3008
2380
|
normalizeError(e) {
|
|
3009
|
-
var
|
|
3010
|
-
if (
|
|
3011
|
-
const l = (
|
|
2381
|
+
var n, r, s, o, i;
|
|
2382
|
+
if (Fr(e)) {
|
|
2383
|
+
const l = (n = e.response) == null ? void 0 : n.status, f = ((r = e.response) == null ? void 0 : r.data) ?? {}, u = ((s = f.error) == null ? void 0 : s.message) ?? e.message ?? "Google Translate request failed";
|
|
3012
2384
|
return {
|
|
3013
|
-
code: String(((
|
|
3014
|
-
message:
|
|
3015
|
-
retryable: l ?
|
|
2385
|
+
code: String(((o = f.error) == null ? void 0 : o.code) ?? l ?? "E_GOOGLE"),
|
|
2386
|
+
message: u,
|
|
2387
|
+
retryable: l ? vr.has(l) : !1,
|
|
3016
2388
|
details: {
|
|
3017
2389
|
status: l,
|
|
3018
2390
|
data: f,
|
|
@@ -3039,7 +2411,7 @@ class eo {
|
|
|
3039
2411
|
};
|
|
3040
2412
|
}
|
|
3041
2413
|
}
|
|
3042
|
-
const
|
|
2414
|
+
const Fe = (t) => {
|
|
3043
2415
|
if (!t)
|
|
3044
2416
|
throw new Error("Provider instance is null or undefined");
|
|
3045
2417
|
if (!t.type)
|
|
@@ -3050,338 +2422,338 @@ const pt = (t) => {
|
|
|
3050
2422
|
throw new Error("Provider 'isAvailable' must be a function");
|
|
3051
2423
|
if (t.normalizeError && typeof t.normalizeError != "function")
|
|
3052
2424
|
throw new Error("Provider 'normalizeError' must be a function");
|
|
3053
|
-
},
|
|
2425
|
+
}, Br = (t) => {
|
|
3054
2426
|
if (t.id === "google") {
|
|
3055
|
-
const e = new
|
|
3056
|
-
return
|
|
2427
|
+
const e = new Ur(t);
|
|
2428
|
+
return Fe(e), e;
|
|
3057
2429
|
}
|
|
3058
2430
|
if (t.implementation)
|
|
3059
|
-
return
|
|
2431
|
+
return Fe(t.implementation), t.implementation;
|
|
3060
2432
|
if (t.factory) {
|
|
3061
2433
|
const e = t.factory();
|
|
3062
|
-
return
|
|
2434
|
+
return Fe(e), e;
|
|
3063
2435
|
}
|
|
3064
2436
|
throw new Error(
|
|
3065
2437
|
"Custom provider configuration must include either 'implementation' or 'factory'"
|
|
3066
2438
|
);
|
|
3067
|
-
},
|
|
3068
|
-
var
|
|
3069
|
-
return ((
|
|
3070
|
-
},
|
|
2439
|
+
}, jr = "translator", Mr = 5e3, dt = 3e4, Ir = "::", Hr = (t) => {
|
|
2440
|
+
var n, r;
|
|
2441
|
+
return ((r = (n = navigator == null ? void 0 : navigator.language) == null ? void 0 : n.split("-")) == null ? void 0 : r[0]) || t;
|
|
2442
|
+
}, qr = (t) => localStorage.getItem(t), Kr = (t, e) => {
|
|
3071
2443
|
localStorage.setItem(t, e);
|
|
3072
|
-
},
|
|
3073
|
-
scope:
|
|
2444
|
+
}, $r = (t) => t ? t instanceof Set ? new Set(t) : new Set(t) : /* @__PURE__ */ new Set(), Ft = (t, e) => ({
|
|
2445
|
+
scope: jr,
|
|
3074
2446
|
event: t,
|
|
3075
2447
|
...e
|
|
3076
|
-
}),
|
|
3077
|
-
console.warn("[vbss-translator]",
|
|
3078
|
-
},
|
|
3079
|
-
console.debug("[vbss-translator]",
|
|
3080
|
-
},
|
|
2448
|
+
}), ae = (t, e) => {
|
|
2449
|
+
console.warn("[vbss-translator]", Ft(t, e));
|
|
2450
|
+
}, v = (t, e) => {
|
|
2451
|
+
console.debug("[vbss-translator]", Ft(t, e));
|
|
2452
|
+
}, Vr = () => ({
|
|
3081
2453
|
warn: (t, e) => {
|
|
3082
|
-
|
|
2454
|
+
ae(t, e ?? {});
|
|
3083
2455
|
},
|
|
3084
2456
|
debug: (t, e) => {
|
|
3085
|
-
|
|
2457
|
+
v(t, e ?? {});
|
|
3086
2458
|
}
|
|
3087
|
-
}),
|
|
2459
|
+
}), zr = (t) => {
|
|
3088
2460
|
const {
|
|
3089
2461
|
provider: e,
|
|
3090
|
-
cache:
|
|
3091
|
-
alwaysExternalKeys:
|
|
2462
|
+
cache: n,
|
|
2463
|
+
alwaysExternalKeys: r,
|
|
3092
2464
|
enabled: s,
|
|
3093
|
-
timeoutMs:
|
|
2465
|
+
timeoutMs: o,
|
|
3094
2466
|
debug: i,
|
|
3095
2467
|
...l
|
|
3096
2468
|
} = t ?? {};
|
|
3097
2469
|
return {
|
|
3098
2470
|
enabled: s ?? !1,
|
|
3099
|
-
timeoutMs:
|
|
2471
|
+
timeoutMs: o ?? Mr,
|
|
3100
2472
|
debug: i ?? !1,
|
|
3101
2473
|
provider: {
|
|
3102
|
-
...
|
|
2474
|
+
...Jr,
|
|
3103
2475
|
...e
|
|
3104
2476
|
},
|
|
3105
2477
|
cache: {
|
|
3106
|
-
...
|
|
3107
|
-
...
|
|
2478
|
+
...Wr,
|
|
2479
|
+
...n
|
|
3108
2480
|
},
|
|
3109
|
-
alwaysExternalKeys:
|
|
2481
|
+
alwaysExternalKeys: $r(r),
|
|
3110
2482
|
...l
|
|
3111
2483
|
};
|
|
3112
|
-
},
|
|
2484
|
+
}, Jr = {
|
|
3113
2485
|
id: "google"
|
|
3114
|
-
},
|
|
2486
|
+
}, Wr = {
|
|
3115
2487
|
enabled: !1,
|
|
3116
2488
|
ttlMs: 36e5
|
|
3117
|
-
},
|
|
3118
|
-
const
|
|
2489
|
+
}, Gr = (t, e) => `${t}${Ir}${e}`, Xr = (t) => t ? new Map(t) : /* @__PURE__ */ new Map(), Qr = (t, e) => {
|
|
2490
|
+
const n = t.toLocaleLowerCase();
|
|
3119
2491
|
return e.find(
|
|
3120
|
-
(
|
|
3121
|
-
(s) => s.toLocaleLowerCase() ===
|
|
2492
|
+
(r) => Object.values(r).some(
|
|
2493
|
+
(s) => s.toLocaleLowerCase() === n
|
|
3122
2494
|
)
|
|
3123
2495
|
);
|
|
3124
|
-
},
|
|
2496
|
+
}, Rs = ({
|
|
3125
2497
|
children: t,
|
|
3126
2498
|
translations: e,
|
|
3127
|
-
defaultLanguage:
|
|
3128
|
-
persist:
|
|
2499
|
+
defaultLanguage: n = "en",
|
|
2500
|
+
persist: r = !1,
|
|
3129
2501
|
persistKey: s = "language",
|
|
3130
|
-
autoDetectLanguage:
|
|
2502
|
+
autoDetectLanguage: o = !1,
|
|
3131
2503
|
externalTranslation: i
|
|
3132
2504
|
}) => {
|
|
3133
|
-
const l =
|
|
3134
|
-
() =>
|
|
2505
|
+
const l = z(
|
|
2506
|
+
() => zr(i),
|
|
3135
2507
|
[i]
|
|
3136
|
-
), [f,
|
|
2508
|
+
), [f, u] = he(
|
|
3137
2509
|
() => new Set(l.alwaysExternalKeys)
|
|
3138
2510
|
);
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
const
|
|
3142
|
-
return
|
|
2511
|
+
Pe(() => {
|
|
2512
|
+
u((m) => {
|
|
2513
|
+
const b = new Set(l.alwaysExternalKeys);
|
|
2514
|
+
return m.forEach((w) => b.add(w)), b;
|
|
3143
2515
|
});
|
|
3144
2516
|
}, [l]);
|
|
3145
|
-
const
|
|
3146
|
-
|
|
3147
|
-
if (
|
|
3148
|
-
return
|
|
3149
|
-
const
|
|
3150
|
-
return
|
|
2517
|
+
const c = pe((m) => {
|
|
2518
|
+
u((b) => {
|
|
2519
|
+
if (b.has(m))
|
|
2520
|
+
return b;
|
|
2521
|
+
const w = new Set(b);
|
|
2522
|
+
return w.add(m), w;
|
|
3151
2523
|
});
|
|
3152
|
-
}, []),
|
|
2524
|
+
}, []), d = z(
|
|
3153
2525
|
() => ({
|
|
3154
2526
|
...l,
|
|
3155
2527
|
alwaysExternalKeys: f
|
|
3156
2528
|
}),
|
|
3157
2529
|
[l, f]
|
|
3158
|
-
),
|
|
3159
|
-
|
|
2530
|
+
), R = r ? qr(s) : null, S = o ? Hr(n) : null, [p, g] = he(
|
|
2531
|
+
R ?? S ?? n
|
|
3160
2532
|
);
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
}, [
|
|
3164
|
-
const
|
|
2533
|
+
Pe(() => {
|
|
2534
|
+
r && Kr(s, p);
|
|
2535
|
+
}, [p, r, s]);
|
|
2536
|
+
const h = z(
|
|
3165
2537
|
() => Object.keys(e[0] || {}),
|
|
3166
2538
|
[e]
|
|
3167
|
-
),
|
|
3168
|
-
() => new
|
|
3169
|
-
[
|
|
3170
|
-
),
|
|
3171
|
-
let
|
|
2539
|
+
), x = z(() => Vr(), []), j = z(
|
|
2540
|
+
() => new Xt(d.cache),
|
|
2541
|
+
[d.cache]
|
|
2542
|
+
), O = z(() => {
|
|
2543
|
+
let m;
|
|
3172
2544
|
try {
|
|
3173
|
-
if (
|
|
3174
|
-
providerType:
|
|
3175
|
-
providerId:
|
|
2545
|
+
if (m = Br(d.provider), d.debug && v("TranslatorProvider_provider_created", {
|
|
2546
|
+
providerType: m.type,
|
|
2547
|
+
providerId: d.provider.id,
|
|
3176
2548
|
timestamp: Date.now()
|
|
3177
|
-
}),
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3180
|
-
providerType:
|
|
3181
|
-
providerId:
|
|
2549
|
+
}), m.isAvailable) {
|
|
2550
|
+
const b = m.isAvailable();
|
|
2551
|
+
b.available ? d.debug && v("TranslatorProvider_provider_available", {
|
|
2552
|
+
providerType: m.type,
|
|
2553
|
+
providerId: d.provider.id,
|
|
3182
2554
|
timestamp: Date.now()
|
|
3183
|
-
}) :
|
|
3184
|
-
providerType:
|
|
3185
|
-
providerId:
|
|
3186
|
-
reason:
|
|
2555
|
+
}) : ae("TranslatorProvider_provider_unavailable", {
|
|
2556
|
+
providerType: m.type,
|
|
2557
|
+
providerId: d.provider.id,
|
|
2558
|
+
reason: b.reason,
|
|
3187
2559
|
timestamp: Date.now()
|
|
3188
2560
|
});
|
|
3189
2561
|
}
|
|
3190
|
-
} catch (
|
|
3191
|
-
throw
|
|
3192
|
-
providerId:
|
|
3193
|
-
error:
|
|
2562
|
+
} catch (b) {
|
|
2563
|
+
throw ae("TranslatorProvider_provider_creation_failed", {
|
|
2564
|
+
providerId: d.provider.id,
|
|
2565
|
+
error: b instanceof Error ? b.message : "Unknown error",
|
|
3194
2566
|
timestamp: Date.now()
|
|
3195
|
-
}),
|
|
2567
|
+
}), b;
|
|
3196
2568
|
}
|
|
3197
|
-
return new
|
|
3198
|
-
provider:
|
|
3199
|
-
config:
|
|
3200
|
-
cache:
|
|
3201
|
-
logger:
|
|
2569
|
+
return new Gt({
|
|
2570
|
+
provider: m,
|
|
2571
|
+
config: d,
|
|
2572
|
+
cache: d.cache.enabled ? j : void 0,
|
|
2573
|
+
logger: x
|
|
3202
2574
|
});
|
|
3203
|
-
}, [
|
|
2575
|
+
}, [d, x, j]), [T, L] = he(
|
|
3204
2576
|
() => /* @__PURE__ */ new Map()
|
|
3205
|
-
), [
|
|
3206
|
-
|
|
2577
|
+
), [K, N] = he(0), U = $t(!0);
|
|
2578
|
+
Pe(() => (d.debug && v("TranslatorProvider_mounted", {
|
|
3207
2579
|
timestamp: Date.now()
|
|
3208
|
-
}),
|
|
3209
|
-
|
|
2580
|
+
}), U.current = !0, () => {
|
|
2581
|
+
d.debug && v("TranslatorProvider_unmounting", {
|
|
3210
2582
|
timestamp: Date.now()
|
|
3211
|
-
}),
|
|
3212
|
-
}), [
|
|
3213
|
-
const
|
|
3214
|
-
(
|
|
3215
|
-
var
|
|
3216
|
-
|
|
3217
|
-
targetLanguage:
|
|
3218
|
-
key:
|
|
3219
|
-
status:
|
|
3220
|
-
value:
|
|
3221
|
-
isMounted:
|
|
2583
|
+
}), U.current = !1;
|
|
2584
|
+
}), [d]);
|
|
2585
|
+
const q = pe(
|
|
2586
|
+
(m, b, w) => {
|
|
2587
|
+
var W;
|
|
2588
|
+
d.debug && w && v("setExternalStateEntry_called", {
|
|
2589
|
+
targetLanguage: m,
|
|
2590
|
+
key: b,
|
|
2591
|
+
status: w.status,
|
|
2592
|
+
value: w.value,
|
|
2593
|
+
isMounted: U.current
|
|
3222
2594
|
});
|
|
3223
|
-
const
|
|
3224
|
-
|
|
3225
|
-
const
|
|
3226
|
-
return
|
|
3227
|
-
}), (
|
|
3228
|
-
targetLanguage:
|
|
3229
|
-
key:
|
|
3230
|
-
}),
|
|
2595
|
+
const E = () => {
|
|
2596
|
+
L((C) => {
|
|
2597
|
+
const P = new Map(C), I = Xr(P.get(m));
|
|
2598
|
+
return w ? (I.set(b, w), P.set(m, I)) : (I.delete(b), I.size > 0 ? P.set(m, I) : P.delete(m)), P;
|
|
2599
|
+
}), (w == null ? void 0 : w.status) === "resolved" && (d.debug && v("forceUpdate_triggered", {
|
|
2600
|
+
targetLanguage: m,
|
|
2601
|
+
key: b
|
|
2602
|
+
}), N((C) => C + 1));
|
|
3231
2603
|
};
|
|
3232
|
-
typeof process < "u" && ((
|
|
3233
|
-
|
|
2604
|
+
typeof process < "u" && ((W = process.env) == null ? void 0 : W.NODE_ENV) === "test" ? E() : Vt(() => {
|
|
2605
|
+
E();
|
|
3234
2606
|
});
|
|
3235
2607
|
},
|
|
3236
|
-
[
|
|
3237
|
-
),
|
|
3238
|
-
(
|
|
3239
|
-
var
|
|
3240
|
-
|
|
2608
|
+
[d, N]
|
|
2609
|
+
), se = pe(
|
|
2610
|
+
(m) => {
|
|
2611
|
+
var b;
|
|
2612
|
+
O.isEnabled() && (q(m.targetLanguage, m.key, {
|
|
3241
2613
|
status: "pending",
|
|
3242
|
-
value:
|
|
3243
|
-
}),
|
|
3244
|
-
key:
|
|
3245
|
-
text:
|
|
3246
|
-
targetLanguage:
|
|
3247
|
-
sourceLanguage:
|
|
3248
|
-
signal: (
|
|
3249
|
-
}).then((
|
|
3250
|
-
if (
|
|
3251
|
-
key:
|
|
3252
|
-
targetLanguage:
|
|
3253
|
-
isMounted:
|
|
3254
|
-
hasResult: !!
|
|
3255
|
-
hasTranslatedText: !!(
|
|
3256
|
-
translatedText:
|
|
3257
|
-
}),
|
|
3258
|
-
|
|
3259
|
-
key:
|
|
3260
|
-
targetLanguage:
|
|
3261
|
-
isMounted:
|
|
3262
|
-
translatedText:
|
|
3263
|
-
}),
|
|
2614
|
+
value: m.displayValue
|
|
2615
|
+
}), O.translate({
|
|
2616
|
+
key: m.key,
|
|
2617
|
+
text: m.originalText,
|
|
2618
|
+
targetLanguage: m.targetLanguage,
|
|
2619
|
+
sourceLanguage: m.sourceLanguage,
|
|
2620
|
+
signal: (b = m.options) == null ? void 0 : b.signal
|
|
2621
|
+
}).then((w) => {
|
|
2622
|
+
if (d.debug && v("translation_promise_resolved", {
|
|
2623
|
+
key: m.key,
|
|
2624
|
+
targetLanguage: m.targetLanguage,
|
|
2625
|
+
isMounted: U.current,
|
|
2626
|
+
hasResult: !!w,
|
|
2627
|
+
hasTranslatedText: !!(w && w.translatedText),
|
|
2628
|
+
translatedText: w == null ? void 0 : w.translatedText
|
|
2629
|
+
}), w && w.translatedText) {
|
|
2630
|
+
d.debug && v("translation_applying_resolved", {
|
|
2631
|
+
key: m.key,
|
|
2632
|
+
targetLanguage: m.targetLanguage,
|
|
2633
|
+
isMounted: U.current,
|
|
2634
|
+
translatedText: w.translatedText
|
|
2635
|
+
}), q(m.targetLanguage, m.key, {
|
|
3264
2636
|
status: "resolved",
|
|
3265
|
-
value:
|
|
2637
|
+
value: w.translatedText
|
|
3266
2638
|
});
|
|
3267
2639
|
return;
|
|
3268
2640
|
}
|
|
3269
|
-
|
|
3270
|
-
key:
|
|
3271
|
-
result:
|
|
3272
|
-
}),
|
|
2641
|
+
d.debug && v("translation_invalid_result", {
|
|
2642
|
+
key: m.key,
|
|
2643
|
+
result: w
|
|
2644
|
+
}), q(m.targetLanguage, m.key, {
|
|
3273
2645
|
status: "error",
|
|
3274
|
-
value:
|
|
3275
|
-
retryAt: Date.now() +
|
|
2646
|
+
value: m.displayValue,
|
|
2647
|
+
retryAt: Date.now() + dt
|
|
3276
2648
|
});
|
|
3277
|
-
}).catch((
|
|
3278
|
-
|
|
3279
|
-
key:
|
|
3280
|
-
targetLanguage:
|
|
3281
|
-
isMounted:
|
|
3282
|
-
error: (
|
|
3283
|
-
}),
|
|
3284
|
-
key:
|
|
3285
|
-
language:
|
|
3286
|
-
error:
|
|
3287
|
-
isMounted:
|
|
3288
|
-
}),
|
|
2649
|
+
}).catch((w) => {
|
|
2650
|
+
d.debug && v("translation_promise_rejected", {
|
|
2651
|
+
key: m.key,
|
|
2652
|
+
targetLanguage: m.targetLanguage,
|
|
2653
|
+
isMounted: U.current,
|
|
2654
|
+
error: (w == null ? void 0 : w.message) || String(w)
|
|
2655
|
+
}), ae("external_translation_unexpected_rejection", {
|
|
2656
|
+
key: m.key,
|
|
2657
|
+
language: m.targetLanguage,
|
|
2658
|
+
error: w,
|
|
2659
|
+
isMounted: U.current
|
|
2660
|
+
}), q(m.targetLanguage, m.key, {
|
|
3289
2661
|
status: "error",
|
|
3290
|
-
value:
|
|
3291
|
-
error:
|
|
3292
|
-
retryAt: Date.now() +
|
|
2662
|
+
value: m.displayValue,
|
|
2663
|
+
error: w,
|
|
2664
|
+
retryAt: Date.now() + dt
|
|
3293
2665
|
});
|
|
3294
2666
|
}));
|
|
3295
2667
|
},
|
|
3296
|
-
[
|
|
3297
|
-
),
|
|
3298
|
-
const
|
|
3299
|
-
return
|
|
3300
|
-
|
|
3301
|
-
|
|
2668
|
+
[d, q, O]
|
|
2669
|
+
), G = z(() => {
|
|
2670
|
+
const m = {};
|
|
2671
|
+
return T.forEach((b, w) => {
|
|
2672
|
+
b.forEach((E, A) => {
|
|
2673
|
+
m[Gr(A, w)] = E.status === "pending";
|
|
3302
2674
|
});
|
|
3303
|
-
}),
|
|
3304
|
-
recordSize: Object.keys(
|
|
3305
|
-
record: { ...
|
|
3306
|
-
}),
|
|
3307
|
-
}, [
|
|
3308
|
-
() => Object.values(
|
|
3309
|
-
[
|
|
3310
|
-
),
|
|
3311
|
-
(
|
|
3312
|
-
var
|
|
3313
|
-
const
|
|
3314
|
-
if (
|
|
3315
|
-
text:
|
|
3316
|
-
language:
|
|
3317
|
-
hasStateForLanguage: !!
|
|
3318
|
-
existingStateStatus:
|
|
3319
|
-
existingStateValue:
|
|
3320
|
-
preferExternal:
|
|
3321
|
-
}), (
|
|
3322
|
-
return
|
|
3323
|
-
text:
|
|
3324
|
-
value:
|
|
3325
|
-
}),
|
|
3326
|
-
const
|
|
3327
|
-
if (
|
|
3328
|
-
key:
|
|
3329
|
-
language:
|
|
3330
|
-
}), !(
|
|
3331
|
-
return (
|
|
3332
|
-
const
|
|
3333
|
-
if (!
|
|
3334
|
-
const
|
|
3335
|
-
|
|
3336
|
-
key:
|
|
3337
|
-
targetLanguage:
|
|
3338
|
-
originalText:
|
|
3339
|
-
displayValue: (
|
|
3340
|
-
sourceLanguage:
|
|
3341
|
-
options:
|
|
2675
|
+
}), d.debug && v("isTranslatingRecord_recalculated", {
|
|
2676
|
+
recordSize: Object.keys(m).length,
|
|
2677
|
+
record: { ...m }
|
|
2678
|
+
}), m;
|
|
2679
|
+
}, [T, d]), X = z(
|
|
2680
|
+
() => Object.values(G).some(Boolean),
|
|
2681
|
+
[G]
|
|
2682
|
+
), J = pe(
|
|
2683
|
+
(m, b = {}) => {
|
|
2684
|
+
var $e;
|
|
2685
|
+
const w = T.get(p), E = w == null ? void 0 : w.get(m);
|
|
2686
|
+
if (d.debug && b.preferExternal && v("t_called", {
|
|
2687
|
+
text: m,
|
|
2688
|
+
language: p,
|
|
2689
|
+
hasStateForLanguage: !!w,
|
|
2690
|
+
existingStateStatus: E == null ? void 0 : E.status,
|
|
2691
|
+
existingStateValue: E == null ? void 0 : E.value,
|
|
2692
|
+
preferExternal: b.preferExternal
|
|
2693
|
+
}), (E == null ? void 0 : E.status) === "resolved" && E.value)
|
|
2694
|
+
return d.debug && v("t_returning_resolved", {
|
|
2695
|
+
text: m,
|
|
2696
|
+
value: E.value
|
|
2697
|
+
}), E.value;
|
|
2698
|
+
const A = Qr(m, e), W = A == null ? void 0 : A[p], C = A ? Object.values(A).find((Ve) => !!Ve) : void 0, P = b.fallbackValue ?? (E == null ? void 0 : E.value) ?? W ?? C ?? m, I = b.preferExternal === !0 || d.alwaysExternalKeys.has(m), ee = O.isEnabled(), oe = typeof W == "string";
|
|
2699
|
+
if (oe || ae("missing_translation", {
|
|
2700
|
+
key: m,
|
|
2701
|
+
language: p
|
|
2702
|
+
}), !(ee && (I || !oe)))
|
|
2703
|
+
return (E == null ? void 0 : E.status) === "pending" && E.value ? E.value : W ?? P;
|
|
2704
|
+
const Ut = Date.now(), Bt = (E == null ? void 0 : E.status) === "error" && (!E.retryAt || E.retryAt <= Ut);
|
|
2705
|
+
if (!E || Bt) {
|
|
2706
|
+
const Ce = b.sourceLanguage ?? (A && A[n] ? n : void 0), jt = (Ce && (A == null ? void 0 : A[Ce])) ?? (A == null ? void 0 : A[n]) ?? m;
|
|
2707
|
+
se({
|
|
2708
|
+
key: m,
|
|
2709
|
+
targetLanguage: p,
|
|
2710
|
+
originalText: jt,
|
|
2711
|
+
displayValue: (E == null ? void 0 : E.value) ?? P,
|
|
2712
|
+
sourceLanguage: Ce,
|
|
2713
|
+
options: b
|
|
3342
2714
|
});
|
|
3343
2715
|
}
|
|
3344
|
-
const
|
|
3345
|
-
return (
|
|
2716
|
+
const V = (($e = T.get(p)) == null ? void 0 : $e.get(m)) ?? E;
|
|
2717
|
+
return (V == null ? void 0 : V.status) === "resolved" && V.value ? V.value : (V == null ? void 0 : V.status) === "pending" ? V.value ?? P : P;
|
|
3346
2718
|
},
|
|
3347
2719
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3348
2720
|
[
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
2721
|
+
n,
|
|
2722
|
+
d.alwaysExternalKeys,
|
|
2723
|
+
T,
|
|
2724
|
+
p,
|
|
2725
|
+
se,
|
|
2726
|
+
O,
|
|
3355
2727
|
e
|
|
3356
2728
|
]
|
|
3357
|
-
),
|
|
2729
|
+
), $ = z(
|
|
3358
2730
|
() => ({
|
|
3359
|
-
t:
|
|
3360
|
-
language:
|
|
3361
|
-
languages:
|
|
3362
|
-
setLanguage:
|
|
3363
|
-
isTranslating:
|
|
3364
|
-
isTranslatingAny:
|
|
3365
|
-
registerExternalKey:
|
|
3366
|
-
externalConfig:
|
|
2731
|
+
t: J,
|
|
2732
|
+
language: p,
|
|
2733
|
+
languages: h,
|
|
2734
|
+
setLanguage: g,
|
|
2735
|
+
isTranslating: G,
|
|
2736
|
+
isTranslatingAny: X,
|
|
2737
|
+
registerExternalKey: c,
|
|
2738
|
+
externalConfig: d
|
|
3367
2739
|
}),
|
|
3368
2740
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3369
2741
|
[
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
g,
|
|
3373
|
-
y,
|
|
3374
|
-
le,
|
|
3375
|
-
ie,
|
|
3376
|
-
u,
|
|
2742
|
+
J,
|
|
2743
|
+
p,
|
|
3377
2744
|
h,
|
|
3378
|
-
|
|
2745
|
+
g,
|
|
2746
|
+
G,
|
|
2747
|
+
X,
|
|
2748
|
+
c,
|
|
2749
|
+
d,
|
|
2750
|
+
K
|
|
3379
2751
|
]
|
|
3380
2752
|
);
|
|
3381
|
-
return /* @__PURE__ */
|
|
3382
|
-
},
|
|
2753
|
+
return /* @__PURE__ */ Ht(ft.Provider, { value: $, children: t });
|
|
2754
|
+
}, Ts = () => zt();
|
|
3383
2755
|
export {
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
2756
|
+
Rs as TranslatorProvider,
|
|
2757
|
+
Br as createTranslationProvider,
|
|
2758
|
+
Ts as useTranslator
|
|
3387
2759
|
};
|