myquizbot-react 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -3
- package/dist/myquizbot-react.es.js +1509 -1214
- package/dist/myquizbot-react.umd.js +7 -7
- package/package.json +5 -1
- package/dist/react.css +0 -1
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
6
|
-
|
|
1
|
+
import Ct, { useState as V, useEffect as le, useRef as be } from "react";
|
|
2
|
+
var he = { exports: {} }, ie = {};
|
|
3
|
+
var Be;
|
|
4
|
+
function jt() {
|
|
5
|
+
if (Be) return ie;
|
|
6
|
+
Be = 1;
|
|
7
7
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
|
-
function r
|
|
9
|
-
var
|
|
10
|
-
if (
|
|
11
|
-
|
|
8
|
+
function n(r, s, o) {
|
|
9
|
+
var i = null;
|
|
10
|
+
if (o !== void 0 && (i = "" + o), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
11
|
+
o = {};
|
|
12
12
|
for (var c in s)
|
|
13
|
-
c !== "key" && (
|
|
14
|
-
} else
|
|
15
|
-
return s =
|
|
13
|
+
c !== "key" && (o[c] = s[c]);
|
|
14
|
+
} else o = s;
|
|
15
|
+
return s = o.ref, {
|
|
16
16
|
$$typeof: e,
|
|
17
|
-
type:
|
|
18
|
-
key:
|
|
17
|
+
type: r,
|
|
18
|
+
key: i,
|
|
19
19
|
ref: s !== void 0 ? s : null,
|
|
20
|
-
props:
|
|
20
|
+
props: o
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return ie.Fragment = t, ie.jsx = n, ie.jsxs = n, ie;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
25
|
+
var ae = {};
|
|
26
26
|
var qe;
|
|
27
|
-
function
|
|
27
|
+
function vt() {
|
|
28
28
|
return qe || (qe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
29
|
function e(l) {
|
|
30
30
|
if (l == null) return null;
|
|
31
31
|
if (typeof l == "function")
|
|
32
|
-
return l.$$typeof ===
|
|
32
|
+
return l.$$typeof === B ? null : l.displayName || l.name || null;
|
|
33
33
|
if (typeof l == "string") return l;
|
|
34
34
|
switch (l) {
|
|
35
|
-
case
|
|
35
|
+
case h:
|
|
36
36
|
return "Fragment";
|
|
37
|
-
case j:
|
|
38
|
-
return "Profiler";
|
|
39
37
|
case R:
|
|
38
|
+
return "Profiler";
|
|
39
|
+
case j:
|
|
40
40
|
return "StrictMode";
|
|
41
|
-
case
|
|
41
|
+
case N:
|
|
42
42
|
return "Suspense";
|
|
43
|
-
case
|
|
43
|
+
case F:
|
|
44
44
|
return "SuspenseList";
|
|
45
|
-
case
|
|
45
|
+
case W:
|
|
46
46
|
return "Activity";
|
|
47
47
|
}
|
|
48
48
|
if (typeof l == "object")
|
|
49
49
|
switch (typeof l.tag == "number" && console.error(
|
|
50
50
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
51
|
), l.$$typeof) {
|
|
52
|
-
case
|
|
52
|
+
case g:
|
|
53
53
|
return "Portal";
|
|
54
|
-
case
|
|
54
|
+
case T:
|
|
55
55
|
return l.displayName || "Context";
|
|
56
|
-
case
|
|
56
|
+
case A:
|
|
57
57
|
return (l._context.displayName || "Context") + ".Consumer";
|
|
58
58
|
case _:
|
|
59
|
-
var
|
|
60
|
-
return l = l.displayName, l || (l =
|
|
61
|
-
case
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
|
|
59
|
+
var x = l.render;
|
|
60
|
+
return l = l.displayName, l || (l = x.displayName || x.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
61
|
+
case K:
|
|
62
|
+
return x = l.displayName || null, x !== null ? x : e(l.type) || "Memo";
|
|
63
|
+
case z:
|
|
64
|
+
x = l._payload, l = l._init;
|
|
65
65
|
try {
|
|
66
|
-
return e(l(
|
|
66
|
+
return e(l(x));
|
|
67
67
|
} catch {
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -72,75 +72,75 @@ function jt() {
|
|
|
72
72
|
function t(l) {
|
|
73
73
|
return "" + l;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function n(l) {
|
|
76
76
|
try {
|
|
77
77
|
t(l);
|
|
78
|
-
var
|
|
78
|
+
var x = !1;
|
|
79
79
|
} catch {
|
|
80
|
-
|
|
80
|
+
x = !0;
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
var
|
|
85
|
-
return
|
|
86
|
-
|
|
82
|
+
if (x) {
|
|
83
|
+
x = console;
|
|
84
|
+
var k = x.error, D = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
85
|
+
return k.call(
|
|
86
|
+
x,
|
|
87
87
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
|
-
|
|
88
|
+
D
|
|
89
89
|
), t(l);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
if (l ===
|
|
94
|
-
if (typeof l == "object" && l !== null && l.$$typeof ===
|
|
92
|
+
function r(l) {
|
|
93
|
+
if (l === h) return "<>";
|
|
94
|
+
if (typeof l == "object" && l !== null && l.$$typeof === z)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
|
-
var
|
|
98
|
-
return
|
|
97
|
+
var x = e(l);
|
|
98
|
+
return x ? "<" + x + ">" : "<...>";
|
|
99
99
|
} catch {
|
|
100
100
|
return "<...>";
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function s() {
|
|
104
|
-
var l =
|
|
104
|
+
var l = U.A;
|
|
105
105
|
return l === null ? null : l.getOwner();
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function o() {
|
|
108
108
|
return Error("react-stack-top-frame");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
var
|
|
113
|
-
if (
|
|
110
|
+
function i(l) {
|
|
111
|
+
if (L.call(l, "key")) {
|
|
112
|
+
var x = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
113
|
+
if (x && x.isReactWarning) return !1;
|
|
114
114
|
}
|
|
115
115
|
return l.key !== void 0;
|
|
116
116
|
}
|
|
117
|
-
function c(l,
|
|
118
|
-
function
|
|
119
|
-
|
|
117
|
+
function c(l, x) {
|
|
118
|
+
function k() {
|
|
119
|
+
y || (y = !0, console.error(
|
|
120
120
|
"%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://react.dev/link/special-props)",
|
|
121
|
-
|
|
121
|
+
x
|
|
122
122
|
));
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
get:
|
|
124
|
+
k.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
125
|
+
get: k,
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
function p() {
|
|
130
130
|
var l = e(this.type);
|
|
131
|
-
return
|
|
131
|
+
return O[l] || (O[l] = !0, console.error(
|
|
132
132
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
133
133
|
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
var
|
|
135
|
+
function d(l, x, k, D, G, Oe) {
|
|
136
|
+
var $ = k.ref;
|
|
137
137
|
return l = {
|
|
138
|
-
$$typeof:
|
|
138
|
+
$$typeof: f,
|
|
139
139
|
type: l,
|
|
140
|
-
key:
|
|
141
|
-
props:
|
|
142
|
-
_owner:
|
|
143
|
-
}, (
|
|
140
|
+
key: x,
|
|
141
|
+
props: k,
|
|
142
|
+
_owner: D
|
|
143
|
+
}, ($ !== void 0 ? $ : null) !== null ? Object.defineProperty(l, "ref", {
|
|
144
144
|
enumerable: !1,
|
|
145
145
|
get: p
|
|
146
146
|
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
@@ -157,7 +157,7 @@ function jt() {
|
|
|
157
157
|
configurable: !1,
|
|
158
158
|
enumerable: !1,
|
|
159
159
|
writable: !0,
|
|
160
|
-
value:
|
|
160
|
+
value: G
|
|
161
161
|
}), Object.defineProperty(l, "_debugTask", {
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
@@ -165,342 +165,342 @@ function jt() {
|
|
|
165
165
|
value: Oe
|
|
166
166
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
167
167
|
}
|
|
168
|
-
function u(l,
|
|
169
|
-
var
|
|
170
|
-
if (
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
for (
|
|
174
|
-
|
|
175
|
-
Object.freeze && Object.freeze(
|
|
168
|
+
function u(l, x, k, D, G, Oe) {
|
|
169
|
+
var $ = x.children;
|
|
170
|
+
if ($ !== void 0)
|
|
171
|
+
if (D)
|
|
172
|
+
if (P($)) {
|
|
173
|
+
for (D = 0; D < $.length; D++)
|
|
174
|
+
m($[D]);
|
|
175
|
+
Object.freeze && Object.freeze($);
|
|
176
176
|
} else
|
|
177
177
|
console.error(
|
|
178
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
179
|
);
|
|
180
|
-
else
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
var
|
|
180
|
+
else m($);
|
|
181
|
+
if (L.call(x, "key")) {
|
|
182
|
+
$ = e(l);
|
|
183
|
+
var ne = Object.keys(x).filter(function(_t) {
|
|
184
184
|
return _t !== "key";
|
|
185
185
|
});
|
|
186
|
-
|
|
186
|
+
D = 0 < ne.length ? "{key: someKey, " + ne.join(": ..., ") + ": ...}" : "{key: someKey}", X[$ + D] || (ne = 0 < ne.length ? "{" + ne.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
187
|
`A props object containing a "key" prop is being spread into JSX:
|
|
188
188
|
let props = %s;
|
|
189
189
|
<%s {...props} />
|
|
190
190
|
React keys must be passed directly to JSX without using spread:
|
|
191
191
|
let props = %s;
|
|
192
192
|
<%s key={someKey} {...props} />`,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
),
|
|
193
|
+
D,
|
|
194
|
+
$,
|
|
195
|
+
ne,
|
|
196
|
+
$
|
|
197
|
+
), X[$ + D] = !0);
|
|
198
198
|
}
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
for (var
|
|
202
|
-
|
|
203
|
-
} else
|
|
204
|
-
return
|
|
205
|
-
|
|
199
|
+
if ($ = null, k !== void 0 && (n(k), $ = "" + k), i(x) && (n(x.key), $ = "" + x.key), "key" in x) {
|
|
200
|
+
k = {};
|
|
201
|
+
for (var Ne in x)
|
|
202
|
+
Ne !== "key" && (k[Ne] = x[Ne]);
|
|
203
|
+
} else k = x;
|
|
204
|
+
return $ && c(
|
|
205
|
+
k,
|
|
206
206
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
207
|
-
),
|
|
207
|
+
), d(
|
|
208
208
|
l,
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
$,
|
|
210
|
+
k,
|
|
211
211
|
s(),
|
|
212
|
-
|
|
212
|
+
G,
|
|
213
213
|
Oe
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
E(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof ===
|
|
216
|
+
function m(l) {
|
|
217
|
+
E(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === z && (l._payload.status === "fulfilled" ? E(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
218
218
|
}
|
|
219
219
|
function E(l) {
|
|
220
|
-
return typeof l == "object" && l !== null && l.$$typeof ===
|
|
220
|
+
return typeof l == "object" && l !== null && l.$$typeof === f;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var C = Ct, f = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), j = /* @__PURE__ */ Symbol.for("react.strict_mode"), R = /* @__PURE__ */ Symbol.for("react.profiler"), A = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), N = /* @__PURE__ */ Symbol.for("react.suspense"), F = /* @__PURE__ */ Symbol.for("react.suspense_list"), K = /* @__PURE__ */ Symbol.for("react.memo"), z = /* @__PURE__ */ Symbol.for("react.lazy"), W = /* @__PURE__ */ Symbol.for("react.activity"), B = /* @__PURE__ */ Symbol.for("react.client.reference"), U = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, P = Array.isArray, b = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
|
-
|
|
225
|
+
C = {
|
|
226
226
|
react_stack_bottom_frame: function(l) {
|
|
227
227
|
return l();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
)(),
|
|
234
|
-
|
|
235
|
-
var
|
|
230
|
+
var y, O = {}, v = C.react_stack_bottom_frame.bind(
|
|
231
|
+
C,
|
|
232
|
+
o
|
|
233
|
+
)(), q = b(r(o)), X = {};
|
|
234
|
+
ae.Fragment = h, ae.jsx = function(l, x, k) {
|
|
235
|
+
var D = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
236
236
|
return u(
|
|
237
237
|
l,
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
x,
|
|
239
|
+
k,
|
|
240
240
|
!1,
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
D ? Error("react-stack-top-frame") : v,
|
|
242
|
+
D ? b(r(l)) : q
|
|
243
243
|
);
|
|
244
|
-
},
|
|
245
|
-
var
|
|
244
|
+
}, ae.jsxs = function(l, x, k) {
|
|
245
|
+
var D = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
246
246
|
return u(
|
|
247
247
|
l,
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
x,
|
|
249
|
+
k,
|
|
250
250
|
!0,
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
D ? Error("react-stack-top-frame") : v,
|
|
252
|
+
D ? b(r(l)) : q
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
|
-
})()),
|
|
255
|
+
})()), ae;
|
|
256
256
|
}
|
|
257
|
-
var
|
|
258
|
-
function
|
|
259
|
-
return
|
|
257
|
+
var $e;
|
|
258
|
+
function Pt() {
|
|
259
|
+
return $e || ($e = 1, process.env.NODE_ENV === "production" ? he.exports = jt() : he.exports = vt()), he.exports;
|
|
260
260
|
}
|
|
261
|
-
var
|
|
262
|
-
function
|
|
261
|
+
var w = Pt();
|
|
262
|
+
function st(e, t) {
|
|
263
263
|
return function() {
|
|
264
264
|
return e.apply(t, arguments);
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
const { toString:
|
|
268
|
-
const
|
|
269
|
-
return e[
|
|
270
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
271
|
-
function
|
|
272
|
-
return e !== null && !
|
|
267
|
+
const { toString: kt } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: Ee, toStringTag: ot } = Symbol, Se = /* @__PURE__ */ ((e) => (t) => {
|
|
268
|
+
const n = kt.call(t);
|
|
269
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
270
|
+
})(/* @__PURE__ */ Object.create(null)), Y = (e) => (e = e.toLowerCase(), (t) => Se(t) === e), Re = (e) => (t) => typeof t === e, { isArray: se } = Array, re = Re("undefined");
|
|
271
|
+
function ue(e) {
|
|
272
|
+
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && H(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
273
273
|
}
|
|
274
|
-
const
|
|
275
|
-
function
|
|
274
|
+
const it = Y("ArrayBuffer");
|
|
275
|
+
function Ft(e) {
|
|
276
276
|
let t;
|
|
277
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
277
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && it(e.buffer), t;
|
|
278
278
|
}
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
279
|
+
const Dt = Re("string"), H = Re("function"), at = Re("number"), de = (e) => e !== null && typeof e == "object", Ut = (e) => e === !0 || e === !1, ye = (e) => {
|
|
280
|
+
if (Se(e) !== "object")
|
|
281
281
|
return !1;
|
|
282
|
-
const t =
|
|
283
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
284
|
-
},
|
|
285
|
-
if (!
|
|
282
|
+
const t = De(e);
|
|
283
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ot in e) && !(Ee in e);
|
|
284
|
+
}, Lt = (e) => {
|
|
285
|
+
if (!de(e) || ue(e))
|
|
286
286
|
return !1;
|
|
287
287
|
try {
|
|
288
288
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
289
289
|
} catch {
|
|
290
290
|
return !1;
|
|
291
291
|
}
|
|
292
|
-
},
|
|
292
|
+
}, It = Y("Date"), Bt = Y("File"), qt = Y("Blob"), $t = Y("FileList"), Mt = (e) => de(e) && H(e.pipe), zt = (e) => {
|
|
293
293
|
let t;
|
|
294
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
295
|
-
t === "object" &&
|
|
296
|
-
}, Ht =
|
|
297
|
-
function
|
|
294
|
+
return e && (typeof FormData == "function" && e instanceof FormData || H(e.append) && ((t = Se(e)) === "formdata" || // detect form-data instance
|
|
295
|
+
t === "object" && H(e.toString) && e.toString() === "[object FormData]"));
|
|
296
|
+
}, Ht = Y("URLSearchParams"), [Jt, Wt, Vt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(Y), Kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
297
|
+
function fe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
298
298
|
if (e === null || typeof e > "u")
|
|
299
299
|
return;
|
|
300
|
-
let
|
|
301
|
-
if (typeof e != "object" && (e = [e]),
|
|
302
|
-
for (
|
|
303
|
-
t.call(null, e[
|
|
300
|
+
let r, s;
|
|
301
|
+
if (typeof e != "object" && (e = [e]), se(e))
|
|
302
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
303
|
+
t.call(null, e[r], r, e);
|
|
304
304
|
else {
|
|
305
|
-
if (
|
|
305
|
+
if (ue(e))
|
|
306
306
|
return;
|
|
307
|
-
const
|
|
307
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
308
308
|
let c;
|
|
309
|
-
for (
|
|
310
|
-
c =
|
|
309
|
+
for (r = 0; r < i; r++)
|
|
310
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
if (
|
|
313
|
+
function ct(e, t) {
|
|
314
|
+
if (ue(e))
|
|
315
315
|
return null;
|
|
316
316
|
t = t.toLowerCase();
|
|
317
|
-
const
|
|
318
|
-
let
|
|
319
|
-
for (;
|
|
320
|
-
if (s = r
|
|
317
|
+
const n = Object.keys(e);
|
|
318
|
+
let r = n.length, s;
|
|
319
|
+
for (; r-- > 0; )
|
|
320
|
+
if (s = n[r], t === s.toLowerCase())
|
|
321
321
|
return s;
|
|
322
322
|
return null;
|
|
323
323
|
}
|
|
324
|
-
const
|
|
325
|
-
function
|
|
326
|
-
const { caseless: e, skipUndefined: t } =
|
|
327
|
-
const
|
|
328
|
-
|
|
324
|
+
const Z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, lt = (e) => !re(e) && e !== Z;
|
|
325
|
+
function ve() {
|
|
326
|
+
const { caseless: e, skipUndefined: t } = lt(this) && this || {}, n = {}, r = (s, o) => {
|
|
327
|
+
const i = e && ct(n, o) || o;
|
|
328
|
+
ye(n[i]) && ye(s) ? n[i] = ve(n[i], s) : ye(s) ? n[i] = ve({}, s) : se(s) ? n[i] = s.slice() : (!t || !re(s)) && (n[i] = s);
|
|
329
329
|
};
|
|
330
|
-
for (let s = 0,
|
|
331
|
-
arguments[s] &&
|
|
332
|
-
return
|
|
330
|
+
for (let s = 0, o = arguments.length; s < o; s++)
|
|
331
|
+
arguments[s] && fe(arguments[s], r);
|
|
332
|
+
return n;
|
|
333
333
|
}
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
}, { allOwnKeys:
|
|
337
|
-
e.prototype = Object.create(t.prototype,
|
|
334
|
+
const Qt = (e, t, n, { allOwnKeys: r } = {}) => (fe(t, (s, o) => {
|
|
335
|
+
n && H(s) ? e[o] = st(s, n) : e[o] = s;
|
|
336
|
+
}, { allOwnKeys: r }), e), Xt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Gt = (e, t, n, r) => {
|
|
337
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
338
338
|
value: t.prototype
|
|
339
|
-
}),
|
|
340
|
-
}, Zt = (e, t,
|
|
341
|
-
let s,
|
|
339
|
+
}), n && Object.assign(e.prototype, n);
|
|
340
|
+
}, Zt = (e, t, n, r) => {
|
|
341
|
+
let s, o, i;
|
|
342
342
|
const c = {};
|
|
343
343
|
if (t = t || {}, e == null) return t;
|
|
344
344
|
do {
|
|
345
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
346
|
-
|
|
347
|
-
e =
|
|
348
|
-
} while (e && (!
|
|
345
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
346
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
347
|
+
e = n !== !1 && De(e);
|
|
348
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
349
349
|
return t;
|
|
350
|
-
},
|
|
351
|
-
e = String(e), (
|
|
352
|
-
const
|
|
353
|
-
return
|
|
354
|
-
},
|
|
350
|
+
}, en = (e, t, n) => {
|
|
351
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
352
|
+
const r = e.indexOf(t, n);
|
|
353
|
+
return r !== -1 && r === n;
|
|
354
|
+
}, tn = (e) => {
|
|
355
355
|
if (!e) return null;
|
|
356
|
-
if (
|
|
356
|
+
if (se(e)) return e;
|
|
357
357
|
let t = e.length;
|
|
358
|
-
if (!
|
|
359
|
-
const
|
|
358
|
+
if (!at(t)) return null;
|
|
359
|
+
const n = new Array(t);
|
|
360
360
|
for (; t-- > 0; )
|
|
361
|
-
|
|
362
|
-
return
|
|
363
|
-
},
|
|
364
|
-
const
|
|
361
|
+
n[t] = e[t];
|
|
362
|
+
return n;
|
|
363
|
+
}, nn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), rn = (e, t) => {
|
|
364
|
+
const r = (e && e[Ee]).call(e);
|
|
365
365
|
let s;
|
|
366
|
-
for (; (s =
|
|
367
|
-
const
|
|
368
|
-
t.call(e,
|
|
366
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
367
|
+
const o = s.value;
|
|
368
|
+
t.call(e, o[0], o[1]);
|
|
369
369
|
}
|
|
370
|
-
},
|
|
371
|
-
let
|
|
372
|
-
const
|
|
373
|
-
for (; (
|
|
374
|
-
|
|
375
|
-
return
|
|
376
|
-
},
|
|
370
|
+
}, sn = (e, t) => {
|
|
371
|
+
let n;
|
|
372
|
+
const r = [];
|
|
373
|
+
for (; (n = e.exec(t)) !== null; )
|
|
374
|
+
r.push(n);
|
|
375
|
+
return r;
|
|
376
|
+
}, on = Y("HTMLFormElement"), an = (e) => e.toLowerCase().replace(
|
|
377
377
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
378
|
-
function(
|
|
379
|
-
return
|
|
380
|
-
}
|
|
381
|
-
),
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
let
|
|
385
|
-
(
|
|
386
|
-
}), Object.defineProperties(e,
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
if (
|
|
378
|
+
function(n, r, s) {
|
|
379
|
+
return r.toUpperCase() + s;
|
|
380
|
+
}
|
|
381
|
+
), Me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), cn = Y("RegExp"), ut = (e, t) => {
|
|
382
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
383
|
+
fe(n, (s, o) => {
|
|
384
|
+
let i;
|
|
385
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
386
|
+
}), Object.defineProperties(e, r);
|
|
387
|
+
}, ln = (e) => {
|
|
388
|
+
ut(e, (t, n) => {
|
|
389
|
+
if (H(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
390
390
|
return !1;
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
391
|
+
const r = e[n];
|
|
392
|
+
if (H(r)) {
|
|
393
393
|
if (t.enumerable = !1, "writable" in t) {
|
|
394
394
|
t.writable = !1;
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
397
|
t.set || (t.set = () => {
|
|
398
|
-
throw Error("Can not rewrite read-only method '" +
|
|
398
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
});
|
|
402
|
-
},
|
|
403
|
-
const
|
|
404
|
-
s.forEach((
|
|
405
|
-
|
|
402
|
+
}, un = (e, t) => {
|
|
403
|
+
const n = {}, r = (s) => {
|
|
404
|
+
s.forEach((o) => {
|
|
405
|
+
n[o] = !0;
|
|
406
406
|
});
|
|
407
407
|
};
|
|
408
|
-
return
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
|
-
function
|
|
412
|
-
return !!(e &&
|
|
408
|
+
return se(e) ? r(e) : r(String(e).split(t)), n;
|
|
409
|
+
}, dn = () => {
|
|
410
|
+
}, fn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
411
|
+
function pn(e) {
|
|
412
|
+
return !!(e && H(e.append) && e[ot] === "FormData" && e[Ee]);
|
|
413
413
|
}
|
|
414
|
-
const
|
|
415
|
-
const t = new Array(10),
|
|
416
|
-
if (
|
|
417
|
-
if (t.indexOf(
|
|
414
|
+
const hn = (e) => {
|
|
415
|
+
const t = new Array(10), n = (r, s) => {
|
|
416
|
+
if (de(r)) {
|
|
417
|
+
if (t.indexOf(r) >= 0)
|
|
418
418
|
return;
|
|
419
|
-
if (
|
|
420
|
-
return
|
|
421
|
-
if (!("toJSON" in
|
|
422
|
-
t[s] =
|
|
423
|
-
const
|
|
424
|
-
return
|
|
425
|
-
const p =
|
|
426
|
-
!
|
|
427
|
-
}), t[s] = void 0,
|
|
419
|
+
if (ue(r))
|
|
420
|
+
return r;
|
|
421
|
+
if (!("toJSON" in r)) {
|
|
422
|
+
t[s] = r;
|
|
423
|
+
const o = se(r) ? [] : {};
|
|
424
|
+
return fe(r, (i, c) => {
|
|
425
|
+
const p = n(i, s + 1);
|
|
426
|
+
!re(p) && (o[c] = p);
|
|
427
|
+
}), t[s] = void 0, o;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return r;
|
|
431
431
|
};
|
|
432
|
-
return
|
|
433
|
-
},
|
|
434
|
-
s ===
|
|
432
|
+
return n(e, 0);
|
|
433
|
+
}, mn = Y("AsyncFunction"), bn = (e) => e && (de(e) || H(e)) && H(e.then) && H(e.catch), dt = ((e, t) => e ? setImmediate : t ? ((n, r) => (Z.addEventListener("message", ({ source: s, data: o }) => {
|
|
434
|
+
s === Z && o === n && r.length && r.shift()();
|
|
435
435
|
}, !1), (s) => {
|
|
436
|
-
|
|
437
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
436
|
+
r.push(s), Z.postMessage(n, "*");
|
|
437
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
438
438
|
typeof setImmediate == "function",
|
|
439
|
-
|
|
440
|
-
),
|
|
441
|
-
isArray:
|
|
442
|
-
isArrayBuffer:
|
|
443
|
-
isBuffer:
|
|
444
|
-
isFormData:
|
|
445
|
-
isArrayBufferView:
|
|
446
|
-
isString:
|
|
447
|
-
isNumber:
|
|
448
|
-
isBoolean:
|
|
449
|
-
isObject:
|
|
450
|
-
isPlainObject:
|
|
451
|
-
isEmptyObject:
|
|
439
|
+
H(Z.postMessage)
|
|
440
|
+
), yn = typeof queueMicrotask < "u" ? queueMicrotask.bind(Z) : typeof process < "u" && process.nextTick || dt, gn = (e) => e != null && H(e[Ee]), a = {
|
|
441
|
+
isArray: se,
|
|
442
|
+
isArrayBuffer: it,
|
|
443
|
+
isBuffer: ue,
|
|
444
|
+
isFormData: zt,
|
|
445
|
+
isArrayBufferView: Ft,
|
|
446
|
+
isString: Dt,
|
|
447
|
+
isNumber: at,
|
|
448
|
+
isBoolean: Ut,
|
|
449
|
+
isObject: de,
|
|
450
|
+
isPlainObject: ye,
|
|
451
|
+
isEmptyObject: Lt,
|
|
452
452
|
isReadableStream: Jt,
|
|
453
453
|
isRequest: Wt,
|
|
454
454
|
isResponse: Vt,
|
|
455
455
|
isHeaders: Yt,
|
|
456
|
-
isUndefined:
|
|
457
|
-
isDate:
|
|
456
|
+
isUndefined: re,
|
|
457
|
+
isDate: It,
|
|
458
458
|
isFile: Bt,
|
|
459
|
-
isBlob:
|
|
460
|
-
isRegExp:
|
|
461
|
-
isFunction:
|
|
462
|
-
isStream:
|
|
459
|
+
isBlob: qt,
|
|
460
|
+
isRegExp: cn,
|
|
461
|
+
isFunction: H,
|
|
462
|
+
isStream: Mt,
|
|
463
463
|
isURLSearchParams: Ht,
|
|
464
|
-
isTypedArray:
|
|
464
|
+
isTypedArray: nn,
|
|
465
465
|
isFileList: $t,
|
|
466
|
-
forEach:
|
|
467
|
-
merge:
|
|
468
|
-
extend:
|
|
466
|
+
forEach: fe,
|
|
467
|
+
merge: ve,
|
|
468
|
+
extend: Qt,
|
|
469
469
|
trim: Kt,
|
|
470
|
-
stripBOM:
|
|
470
|
+
stripBOM: Xt,
|
|
471
471
|
inherits: Gt,
|
|
472
472
|
toFlatObject: Zt,
|
|
473
|
-
kindOf:
|
|
474
|
-
kindOfTest:
|
|
475
|
-
endsWith:
|
|
476
|
-
toArray:
|
|
477
|
-
forEachEntry:
|
|
478
|
-
matchAll:
|
|
479
|
-
isHTMLForm:
|
|
480
|
-
hasOwnProperty:
|
|
481
|
-
hasOwnProp:
|
|
473
|
+
kindOf: Se,
|
|
474
|
+
kindOfTest: Y,
|
|
475
|
+
endsWith: en,
|
|
476
|
+
toArray: tn,
|
|
477
|
+
forEachEntry: rn,
|
|
478
|
+
matchAll: sn,
|
|
479
|
+
isHTMLForm: on,
|
|
480
|
+
hasOwnProperty: Me,
|
|
481
|
+
hasOwnProp: Me,
|
|
482
482
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
483
|
-
reduceDescriptors:
|
|
484
|
-
freezeMethods:
|
|
485
|
-
toObjectSet:
|
|
486
|
-
toCamelCase:
|
|
487
|
-
noop:
|
|
488
|
-
toFiniteNumber:
|
|
489
|
-
findKey:
|
|
490
|
-
global:
|
|
491
|
-
isContextDefined:
|
|
492
|
-
isSpecCompliantForm:
|
|
493
|
-
toJSONObject:
|
|
494
|
-
isAsyncFn:
|
|
495
|
-
isThenable:
|
|
496
|
-
setImmediate:
|
|
497
|
-
asap:
|
|
498
|
-
isIterable:
|
|
483
|
+
reduceDescriptors: ut,
|
|
484
|
+
freezeMethods: ln,
|
|
485
|
+
toObjectSet: un,
|
|
486
|
+
toCamelCase: an,
|
|
487
|
+
noop: dn,
|
|
488
|
+
toFiniteNumber: fn,
|
|
489
|
+
findKey: ct,
|
|
490
|
+
global: Z,
|
|
491
|
+
isContextDefined: lt,
|
|
492
|
+
isSpecCompliantForm: pn,
|
|
493
|
+
toJSONObject: hn,
|
|
494
|
+
isAsyncFn: mn,
|
|
495
|
+
isThenable: bn,
|
|
496
|
+
setImmediate: dt,
|
|
497
|
+
asap: yn,
|
|
498
|
+
isIterable: gn
|
|
499
499
|
};
|
|
500
|
-
function
|
|
501
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t),
|
|
500
|
+
function S(e, t, n, r, s) {
|
|
501
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
502
502
|
}
|
|
503
|
-
a.inherits(
|
|
503
|
+
a.inherits(S, Error, {
|
|
504
504
|
toJSON: function() {
|
|
505
505
|
return {
|
|
506
506
|
// Standard
|
|
@@ -521,7 +521,7 @@ a.inherits(y, Error, {
|
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
});
|
|
524
|
-
const ft =
|
|
524
|
+
const ft = S.prototype, pt = {};
|
|
525
525
|
[
|
|
526
526
|
"ERR_BAD_OPTION_VALUE",
|
|
527
527
|
"ERR_BAD_OPTION",
|
|
@@ -537,100 +537,100 @@ const ft = y.prototype, dt = {};
|
|
|
537
537
|
"ERR_INVALID_URL"
|
|
538
538
|
// eslint-disable-next-line func-names
|
|
539
539
|
].forEach((e) => {
|
|
540
|
-
|
|
540
|
+
pt[e] = { value: e };
|
|
541
541
|
});
|
|
542
|
-
Object.defineProperties(
|
|
542
|
+
Object.defineProperties(S, pt);
|
|
543
543
|
Object.defineProperty(ft, "isAxiosError", { value: !0 });
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
a.toFlatObject(e,
|
|
544
|
+
S.from = (e, t, n, r, s, o) => {
|
|
545
|
+
const i = Object.create(ft);
|
|
546
|
+
a.toFlatObject(e, i, function(u) {
|
|
547
547
|
return u !== Error.prototype;
|
|
548
|
-
}, (
|
|
548
|
+
}, (d) => d !== "isAxiosError");
|
|
549
549
|
const c = e && e.message ? e.message : "Error", p = t == null && e ? e.code : t;
|
|
550
|
-
return
|
|
550
|
+
return S.call(i, c, p, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
|
|
551
551
|
};
|
|
552
|
-
const
|
|
552
|
+
const wn = null;
|
|
553
553
|
function Pe(e) {
|
|
554
554
|
return a.isPlainObject(e) || a.isArray(e);
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function ht(e) {
|
|
557
557
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
560
|
-
return e ? e.concat(t).map(function(s,
|
|
561
|
-
return s =
|
|
562
|
-
}).join(
|
|
559
|
+
function ze(e, t, n) {
|
|
560
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
561
|
+
return s = ht(s), !n && o ? "[" + s + "]" : s;
|
|
562
|
+
}).join(n ? "." : "") : t;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function xn(e) {
|
|
565
565
|
return a.isArray(e) && !e.some(Pe);
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const En = a.toFlatObject(a, {}, null, function(t) {
|
|
568
568
|
return /^is[A-Z]/.test(t);
|
|
569
569
|
});
|
|
570
|
-
function
|
|
570
|
+
function Te(e, t, n) {
|
|
571
571
|
if (!a.isObject(e))
|
|
572
572
|
throw new TypeError("target must be an object");
|
|
573
|
-
t = t || new FormData(),
|
|
573
|
+
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
574
574
|
metaTokens: !0,
|
|
575
575
|
dots: !1,
|
|
576
576
|
indexes: !1
|
|
577
|
-
}, !1, function(
|
|
578
|
-
return !a.isUndefined(
|
|
577
|
+
}, !1, function(g, h) {
|
|
578
|
+
return !a.isUndefined(h[g]);
|
|
579
579
|
});
|
|
580
|
-
const
|
|
580
|
+
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
581
581
|
if (!a.isFunction(s))
|
|
582
582
|
throw new TypeError("visitor must be a function");
|
|
583
|
-
function f
|
|
584
|
-
if (
|
|
585
|
-
if (a.isDate(
|
|
586
|
-
return
|
|
587
|
-
if (a.isBoolean(
|
|
588
|
-
return
|
|
589
|
-
if (!p && a.isBlob(
|
|
590
|
-
throw new
|
|
591
|
-
return a.isArrayBuffer(
|
|
592
|
-
}
|
|
593
|
-
function u(
|
|
594
|
-
let
|
|
595
|
-
if (
|
|
596
|
-
if (a.endsWith(
|
|
597
|
-
|
|
598
|
-
else if (a.isArray(
|
|
599
|
-
return
|
|
600
|
-
!(a.isUndefined(
|
|
583
|
+
function d(f) {
|
|
584
|
+
if (f === null) return "";
|
|
585
|
+
if (a.isDate(f))
|
|
586
|
+
return f.toISOString();
|
|
587
|
+
if (a.isBoolean(f))
|
|
588
|
+
return f.toString();
|
|
589
|
+
if (!p && a.isBlob(f))
|
|
590
|
+
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
591
|
+
return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
592
|
+
}
|
|
593
|
+
function u(f, g, h) {
|
|
594
|
+
let j = f;
|
|
595
|
+
if (f && !h && typeof f == "object") {
|
|
596
|
+
if (a.endsWith(g, "{}"))
|
|
597
|
+
g = r ? g : g.slice(0, -2), f = JSON.stringify(f);
|
|
598
|
+
else if (a.isArray(f) && xn(f) || (a.isFileList(f) || a.endsWith(g, "[]")) && (j = a.toArray(f)))
|
|
599
|
+
return g = ht(g), j.forEach(function(A, T) {
|
|
600
|
+
!(a.isUndefined(A) || A === null) && t.append(
|
|
601
601
|
// eslint-disable-next-line no-nested-ternary
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
i === !0 ? ze([g], T, o) : i === null ? g : g + "[]",
|
|
603
|
+
d(A)
|
|
604
604
|
);
|
|
605
605
|
}), !1;
|
|
606
606
|
}
|
|
607
|
-
return Pe(
|
|
607
|
+
return Pe(f) ? !0 : (t.append(ze(h, g, o), d(f)), !1);
|
|
608
608
|
}
|
|
609
|
-
const
|
|
609
|
+
const m = [], E = Object.assign(En, {
|
|
610
610
|
defaultVisitor: u,
|
|
611
|
-
convertValue:
|
|
611
|
+
convertValue: d,
|
|
612
612
|
isVisitable: Pe
|
|
613
613
|
});
|
|
614
|
-
function
|
|
615
|
-
if (!a.isUndefined(
|
|
616
|
-
if (
|
|
617
|
-
throw Error("Circular reference detected in " +
|
|
618
|
-
|
|
619
|
-
(!(a.isUndefined(
|
|
614
|
+
function C(f, g) {
|
|
615
|
+
if (!a.isUndefined(f)) {
|
|
616
|
+
if (m.indexOf(f) !== -1)
|
|
617
|
+
throw Error("Circular reference detected in " + g.join("."));
|
|
618
|
+
m.push(f), a.forEach(f, function(j, R) {
|
|
619
|
+
(!(a.isUndefined(j) || j === null) && s.call(
|
|
620
620
|
t,
|
|
621
|
-
|
|
622
|
-
a.isString(
|
|
623
|
-
|
|
621
|
+
j,
|
|
622
|
+
a.isString(R) ? R.trim() : R,
|
|
623
|
+
g,
|
|
624
624
|
E
|
|
625
|
-
)) === !0 &&
|
|
626
|
-
}),
|
|
625
|
+
)) === !0 && C(j, g ? g.concat(R) : [R]);
|
|
626
|
+
}), m.pop();
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
if (!a.isObject(e))
|
|
630
630
|
throw new TypeError("data must be an object");
|
|
631
|
-
return
|
|
631
|
+
return C(e), t;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function He(e) {
|
|
634
634
|
const t = {
|
|
635
635
|
"!": "%21",
|
|
636
636
|
"'": "%27",
|
|
@@ -640,44 +640,44 @@ function Ie(e) {
|
|
|
640
640
|
"%20": "+",
|
|
641
641
|
"%00": "\0"
|
|
642
642
|
};
|
|
643
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
644
|
-
return t[
|
|
643
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
644
|
+
return t[r];
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
this._pairs = [], e &&
|
|
647
|
+
function Ue(e, t) {
|
|
648
|
+
this._pairs = [], e && Te(e, this, t);
|
|
649
649
|
}
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
this._pairs.push([t,
|
|
650
|
+
const mt = Ue.prototype;
|
|
651
|
+
mt.append = function(t, n) {
|
|
652
|
+
this._pairs.push([t, n]);
|
|
653
653
|
};
|
|
654
|
-
|
|
655
|
-
const
|
|
656
|
-
return t.call(this,
|
|
657
|
-
} :
|
|
654
|
+
mt.toString = function(t) {
|
|
655
|
+
const n = t ? function(r) {
|
|
656
|
+
return t.call(this, r, He);
|
|
657
|
+
} : He;
|
|
658
658
|
return this._pairs.map(function(s) {
|
|
659
|
-
return
|
|
659
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
660
660
|
}, "").join("&");
|
|
661
661
|
};
|
|
662
|
-
function
|
|
662
|
+
function Sn(e) {
|
|
663
663
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function bt(e, t, n) {
|
|
666
666
|
if (!t)
|
|
667
667
|
return e;
|
|
668
|
-
const
|
|
669
|
-
a.isFunction(
|
|
670
|
-
serialize:
|
|
668
|
+
const r = n && n.encode || Sn;
|
|
669
|
+
a.isFunction(n) && (n = {
|
|
670
|
+
serialize: n
|
|
671
671
|
});
|
|
672
|
-
const s =
|
|
673
|
-
let
|
|
674
|
-
if (s ?
|
|
675
|
-
const
|
|
676
|
-
|
|
672
|
+
const s = n && n.serialize;
|
|
673
|
+
let o;
|
|
674
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Ue(t, n).toString(r), o) {
|
|
675
|
+
const i = e.indexOf("#");
|
|
676
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
677
677
|
}
|
|
678
678
|
return e;
|
|
679
679
|
}
|
|
680
|
-
class
|
|
680
|
+
class Je {
|
|
681
681
|
constructor() {
|
|
682
682
|
this.handlers = [];
|
|
683
683
|
}
|
|
@@ -689,12 +689,12 @@ class Me {
|
|
|
689
689
|
*
|
|
690
690
|
* @return {Number} An ID used to remove interceptor later
|
|
691
691
|
*/
|
|
692
|
-
use(t,
|
|
692
|
+
use(t, n, r) {
|
|
693
693
|
return this.handlers.push({
|
|
694
694
|
fulfilled: t,
|
|
695
|
-
rejected:
|
|
696
|
-
synchronous:
|
|
697
|
-
runWhen:
|
|
695
|
+
rejected: n,
|
|
696
|
+
synchronous: r ? r.synchronous : !1,
|
|
697
|
+
runWhen: r ? r.runWhen : null
|
|
698
698
|
}), this.handlers.length - 1;
|
|
699
699
|
}
|
|
700
700
|
/**
|
|
@@ -726,119 +726,119 @@ class Me {
|
|
|
726
726
|
* @returns {void}
|
|
727
727
|
*/
|
|
728
728
|
forEach(t) {
|
|
729
|
-
a.forEach(this.handlers, function(
|
|
730
|
-
|
|
729
|
+
a.forEach(this.handlers, function(r) {
|
|
730
|
+
r !== null && t(r);
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
|
-
const
|
|
734
|
+
const yt = {
|
|
735
735
|
silentJSONParsing: !0,
|
|
736
736
|
forcedJSONParsing: !0,
|
|
737
737
|
clarifyTimeoutError: !1
|
|
738
|
-
},
|
|
738
|
+
}, Rn = typeof URLSearchParams < "u" ? URLSearchParams : Ue, Tn = typeof FormData < "u" ? FormData : null, An = typeof Blob < "u" ? Blob : null, On = {
|
|
739
739
|
isBrowser: !0,
|
|
740
740
|
classes: {
|
|
741
|
-
URLSearchParams:
|
|
742
|
-
FormData:
|
|
743
|
-
Blob:
|
|
741
|
+
URLSearchParams: Rn,
|
|
742
|
+
FormData: Tn,
|
|
743
|
+
Blob: An
|
|
744
744
|
},
|
|
745
745
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
746
|
-
},
|
|
747
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
746
|
+
}, Le = typeof window < "u" && typeof document < "u", ke = typeof navigator == "object" && navigator || void 0, Nn = Le && (!ke || ["ReactNative", "NativeScript", "NS"].indexOf(ke.product) < 0), _n = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
747
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cn = Le && window.location.href || "http://localhost", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
748
748
|
__proto__: null,
|
|
749
|
-
hasBrowserEnv:
|
|
750
|
-
hasStandardBrowserEnv:
|
|
751
|
-
hasStandardBrowserWebWorkerEnv:
|
|
752
|
-
navigator:
|
|
753
|
-
origin:
|
|
754
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
755
|
-
...
|
|
756
|
-
...
|
|
749
|
+
hasBrowserEnv: Le,
|
|
750
|
+
hasStandardBrowserEnv: Nn,
|
|
751
|
+
hasStandardBrowserWebWorkerEnv: _n,
|
|
752
|
+
navigator: ke,
|
|
753
|
+
origin: Cn
|
|
754
|
+
}, Symbol.toStringTag, { value: "Module" })), M = {
|
|
755
|
+
...jn,
|
|
756
|
+
...On
|
|
757
757
|
};
|
|
758
|
-
function
|
|
759
|
-
return
|
|
760
|
-
visitor: function(
|
|
761
|
-
return
|
|
758
|
+
function vn(e, t) {
|
|
759
|
+
return Te(e, new M.classes.URLSearchParams(), {
|
|
760
|
+
visitor: function(n, r, s, o) {
|
|
761
|
+
return M.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
762
762
|
},
|
|
763
763
|
...t
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function Pn(e) {
|
|
767
767
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
const t = {},
|
|
771
|
-
let
|
|
772
|
-
const s =
|
|
773
|
-
let
|
|
774
|
-
for (
|
|
775
|
-
|
|
769
|
+
function kn(e) {
|
|
770
|
+
const t = {}, n = Object.keys(e);
|
|
771
|
+
let r;
|
|
772
|
+
const s = n.length;
|
|
773
|
+
let o;
|
|
774
|
+
for (r = 0; r < s; r++)
|
|
775
|
+
o = n[r], t[o] = e[o];
|
|
776
776
|
return t;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
function t(
|
|
780
|
-
let
|
|
781
|
-
if (
|
|
782
|
-
const c = Number.isFinite(+
|
|
783
|
-
return
|
|
778
|
+
function gt(e) {
|
|
779
|
+
function t(n, r, s, o) {
|
|
780
|
+
let i = n[o++];
|
|
781
|
+
if (i === "__proto__") return !0;
|
|
782
|
+
const c = Number.isFinite(+i), p = o >= n.length;
|
|
783
|
+
return i = !i && a.isArray(s) ? s.length : i, p ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = kn(s[i])), !c);
|
|
784
784
|
}
|
|
785
785
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
786
|
-
const
|
|
787
|
-
return a.forEachEntry(e, (
|
|
788
|
-
t(
|
|
789
|
-
}),
|
|
786
|
+
const n = {};
|
|
787
|
+
return a.forEachEntry(e, (r, s) => {
|
|
788
|
+
t(Pn(r), s, n, 0);
|
|
789
|
+
}), n;
|
|
790
790
|
}
|
|
791
791
|
return null;
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function Fn(e, t, n) {
|
|
794
794
|
if (a.isString(e))
|
|
795
795
|
try {
|
|
796
796
|
return (t || JSON.parse)(e), a.trim(e);
|
|
797
|
-
} catch (
|
|
798
|
-
if (
|
|
799
|
-
throw
|
|
797
|
+
} catch (r) {
|
|
798
|
+
if (r.name !== "SyntaxError")
|
|
799
|
+
throw r;
|
|
800
800
|
}
|
|
801
|
-
return (
|
|
801
|
+
return (n || JSON.stringify)(e);
|
|
802
802
|
}
|
|
803
|
-
const
|
|
804
|
-
transitional:
|
|
803
|
+
const pe = {
|
|
804
|
+
transitional: yt,
|
|
805
805
|
adapter: ["xhr", "http", "fetch"],
|
|
806
|
-
transformRequest: [function(t,
|
|
807
|
-
const
|
|
808
|
-
if (
|
|
809
|
-
return s ? JSON.stringify(
|
|
806
|
+
transformRequest: [function(t, n) {
|
|
807
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
808
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
809
|
+
return s ? JSON.stringify(gt(t)) : t;
|
|
810
810
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
811
811
|
return t;
|
|
812
812
|
if (a.isArrayBufferView(t))
|
|
813
813
|
return t.buffer;
|
|
814
814
|
if (a.isURLSearchParams(t))
|
|
815
|
-
return
|
|
815
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
816
816
|
let c;
|
|
817
|
-
if (
|
|
818
|
-
if (
|
|
819
|
-
return
|
|
820
|
-
if ((c = a.isFileList(t)) ||
|
|
817
|
+
if (o) {
|
|
818
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
819
|
+
return vn(t, this.formSerializer).toString();
|
|
820
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
821
821
|
const p = this.env && this.env.FormData;
|
|
822
|
-
return
|
|
822
|
+
return Te(
|
|
823
823
|
c ? { "files[]": t } : t,
|
|
824
824
|
p && new p(),
|
|
825
825
|
this.formSerializer
|
|
826
826
|
);
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
|
-
return
|
|
829
|
+
return o || s ? (n.setContentType("application/json", !1), Fn(t)) : t;
|
|
830
830
|
}],
|
|
831
831
|
transformResponse: [function(t) {
|
|
832
|
-
const
|
|
832
|
+
const n = this.transitional || pe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
833
833
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
834
834
|
return t;
|
|
835
|
-
if (t && a.isString(t) && (
|
|
836
|
-
const
|
|
835
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
836
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
837
837
|
try {
|
|
838
838
|
return JSON.parse(t, this.parseReviver);
|
|
839
839
|
} catch (c) {
|
|
840
|
-
if (
|
|
841
|
-
throw c.name === "SyntaxError" ?
|
|
840
|
+
if (i)
|
|
841
|
+
throw c.name === "SyntaxError" ? S.from(c, S.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
return t;
|
|
@@ -853,8 +853,8 @@ const fe = {
|
|
|
853
853
|
maxContentLength: -1,
|
|
854
854
|
maxBodyLength: -1,
|
|
855
855
|
env: {
|
|
856
|
-
FormData:
|
|
857
|
-
Blob:
|
|
856
|
+
FormData: M.classes.FormData,
|
|
857
|
+
Blob: M.classes.Blob
|
|
858
858
|
},
|
|
859
859
|
validateStatus: function(t) {
|
|
860
860
|
return t >= 200 && t < 300;
|
|
@@ -867,9 +867,9 @@ const fe = {
|
|
|
867
867
|
}
|
|
868
868
|
};
|
|
869
869
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
870
|
-
|
|
870
|
+
pe.headers[e] = {};
|
|
871
871
|
});
|
|
872
|
-
const
|
|
872
|
+
const Dn = a.toObjectSet([
|
|
873
873
|
"age",
|
|
874
874
|
"authorization",
|
|
875
875
|
"content-length",
|
|
@@ -887,152 +887,152 @@ const vr = a.toObjectSet([
|
|
|
887
887
|
"referer",
|
|
888
888
|
"retry-after",
|
|
889
889
|
"user-agent"
|
|
890
|
-
]),
|
|
890
|
+
]), Un = (e) => {
|
|
891
891
|
const t = {};
|
|
892
|
-
let
|
|
892
|
+
let n, r, s;
|
|
893
893
|
return e && e.split(`
|
|
894
|
-
`).forEach(function(
|
|
895
|
-
s =
|
|
894
|
+
`).forEach(function(i) {
|
|
895
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Dn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
896
896
|
}), t;
|
|
897
|
-
},
|
|
898
|
-
function
|
|
897
|
+
}, We = /* @__PURE__ */ Symbol("internals");
|
|
898
|
+
function ce(e) {
|
|
899
899
|
return e && String(e).trim().toLowerCase();
|
|
900
900
|
}
|
|
901
|
-
function
|
|
902
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
901
|
+
function ge(e) {
|
|
902
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ge) : String(e);
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
906
|
-
let
|
|
907
|
-
for (;
|
|
908
|
-
t[
|
|
904
|
+
function Ln(e) {
|
|
905
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
906
|
+
let r;
|
|
907
|
+
for (; r = n.exec(e); )
|
|
908
|
+
t[r[1]] = r[2];
|
|
909
909
|
return t;
|
|
910
910
|
}
|
|
911
|
-
const
|
|
912
|
-
function
|
|
913
|
-
if (a.isFunction(
|
|
914
|
-
return
|
|
915
|
-
if (s && (t =
|
|
916
|
-
if (a.isString(
|
|
917
|
-
return t.indexOf(
|
|
918
|
-
if (a.isRegExp(
|
|
919
|
-
return
|
|
911
|
+
const In = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
912
|
+
function _e(e, t, n, r, s) {
|
|
913
|
+
if (a.isFunction(r))
|
|
914
|
+
return r.call(this, t, n);
|
|
915
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
916
|
+
if (a.isString(r))
|
|
917
|
+
return t.indexOf(r) !== -1;
|
|
918
|
+
if (a.isRegExp(r))
|
|
919
|
+
return r.test(t);
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
922
|
+
function Bn(e) {
|
|
923
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
const
|
|
927
|
-
["get", "set", "has"].forEach((
|
|
928
|
-
Object.defineProperty(e,
|
|
929
|
-
value: function(s,
|
|
930
|
-
return this[
|
|
925
|
+
function qn(e, t) {
|
|
926
|
+
const n = a.toCamelCase(" " + t);
|
|
927
|
+
["get", "set", "has"].forEach((r) => {
|
|
928
|
+
Object.defineProperty(e, r + n, {
|
|
929
|
+
value: function(s, o, i) {
|
|
930
|
+
return this[r].call(this, t, s, o, i);
|
|
931
931
|
},
|
|
932
932
|
configurable: !0
|
|
933
933
|
});
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
|
-
let
|
|
936
|
+
let J = class {
|
|
937
937
|
constructor(t) {
|
|
938
938
|
t && this.set(t);
|
|
939
939
|
}
|
|
940
|
-
set(t,
|
|
940
|
+
set(t, n, r) {
|
|
941
941
|
const s = this;
|
|
942
|
-
function
|
|
943
|
-
const u =
|
|
942
|
+
function o(c, p, d) {
|
|
943
|
+
const u = ce(p);
|
|
944
944
|
if (!u)
|
|
945
945
|
throw new Error("header name must be a non-empty string");
|
|
946
|
-
const
|
|
947
|
-
(!
|
|
946
|
+
const m = a.findKey(s, u);
|
|
947
|
+
(!m || s[m] === void 0 || d === !0 || d === void 0 && s[m] !== !1) && (s[m || p] = ge(c));
|
|
948
948
|
}
|
|
949
|
-
const
|
|
949
|
+
const i = (c, p) => a.forEach(c, (d, u) => o(d, u, p));
|
|
950
950
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
951
|
-
|
|
952
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
953
|
-
|
|
951
|
+
i(t, n);
|
|
952
|
+
else if (a.isString(t) && (t = t.trim()) && !In(t))
|
|
953
|
+
i(Un(t), n);
|
|
954
954
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
955
|
-
let c = {}, p,
|
|
955
|
+
let c = {}, p, d;
|
|
956
956
|
for (const u of t) {
|
|
957
957
|
if (!a.isArray(u))
|
|
958
958
|
throw TypeError("Object iterator must return a key-value pair");
|
|
959
|
-
c[
|
|
959
|
+
c[d = u[0]] = (p = c[d]) ? a.isArray(p) ? [...p, u[1]] : [p, u[1]] : u[1];
|
|
960
960
|
}
|
|
961
|
-
|
|
961
|
+
i(c, n);
|
|
962
962
|
} else
|
|
963
|
-
t != null &&
|
|
963
|
+
t != null && o(n, t, r);
|
|
964
964
|
return this;
|
|
965
965
|
}
|
|
966
|
-
get(t,
|
|
967
|
-
if (t =
|
|
968
|
-
const
|
|
969
|
-
if (
|
|
970
|
-
const s = this[
|
|
971
|
-
if (!
|
|
966
|
+
get(t, n) {
|
|
967
|
+
if (t = ce(t), t) {
|
|
968
|
+
const r = a.findKey(this, t);
|
|
969
|
+
if (r) {
|
|
970
|
+
const s = this[r];
|
|
971
|
+
if (!n)
|
|
972
972
|
return s;
|
|
973
|
-
if (
|
|
974
|
-
return
|
|
975
|
-
if (a.isFunction(
|
|
976
|
-
return
|
|
977
|
-
if (a.isRegExp(
|
|
978
|
-
return
|
|
973
|
+
if (n === !0)
|
|
974
|
+
return Ln(s);
|
|
975
|
+
if (a.isFunction(n))
|
|
976
|
+
return n.call(this, s, r);
|
|
977
|
+
if (a.isRegExp(n))
|
|
978
|
+
return n.exec(s);
|
|
979
979
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
|
-
has(t,
|
|
984
|
-
if (t =
|
|
985
|
-
const
|
|
986
|
-
return !!(
|
|
983
|
+
has(t, n) {
|
|
984
|
+
if (t = ce(t), t) {
|
|
985
|
+
const r = a.findKey(this, t);
|
|
986
|
+
return !!(r && this[r] !== void 0 && (!n || _e(this, this[r], r, n)));
|
|
987
987
|
}
|
|
988
988
|
return !1;
|
|
989
989
|
}
|
|
990
|
-
delete(t,
|
|
991
|
-
const
|
|
990
|
+
delete(t, n) {
|
|
991
|
+
const r = this;
|
|
992
992
|
let s = !1;
|
|
993
|
-
function i
|
|
994
|
-
if (
|
|
995
|
-
const c = a.findKey(
|
|
996
|
-
c && (!
|
|
993
|
+
function o(i) {
|
|
994
|
+
if (i = ce(i), i) {
|
|
995
|
+
const c = a.findKey(r, i);
|
|
996
|
+
c && (!n || _e(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
|
-
return a.isArray(t) ? t.forEach(
|
|
999
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
1000
1000
|
}
|
|
1001
1001
|
clear(t) {
|
|
1002
|
-
const
|
|
1003
|
-
let
|
|
1004
|
-
for (;
|
|
1005
|
-
const
|
|
1006
|
-
(!t ||
|
|
1002
|
+
const n = Object.keys(this);
|
|
1003
|
+
let r = n.length, s = !1;
|
|
1004
|
+
for (; r--; ) {
|
|
1005
|
+
const o = n[r];
|
|
1006
|
+
(!t || _e(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1007
1007
|
}
|
|
1008
1008
|
return s;
|
|
1009
1009
|
}
|
|
1010
1010
|
normalize(t) {
|
|
1011
|
-
const
|
|
1012
|
-
return a.forEach(this, (s,
|
|
1013
|
-
const
|
|
1014
|
-
if (
|
|
1015
|
-
|
|
1011
|
+
const n = this, r = {};
|
|
1012
|
+
return a.forEach(this, (s, o) => {
|
|
1013
|
+
const i = a.findKey(r, o);
|
|
1014
|
+
if (i) {
|
|
1015
|
+
n[i] = ge(s), delete n[o];
|
|
1016
1016
|
return;
|
|
1017
1017
|
}
|
|
1018
|
-
const c = t ?
|
|
1019
|
-
c !==
|
|
1018
|
+
const c = t ? Bn(o) : String(o).trim();
|
|
1019
|
+
c !== o && delete n[o], n[c] = ge(s), r[c] = !0;
|
|
1020
1020
|
}), this;
|
|
1021
1021
|
}
|
|
1022
1022
|
concat(...t) {
|
|
1023
1023
|
return this.constructor.concat(this, ...t);
|
|
1024
1024
|
}
|
|
1025
1025
|
toJSON(t) {
|
|
1026
|
-
const
|
|
1027
|
-
return a.forEach(this, (
|
|
1028
|
-
|
|
1029
|
-
}),
|
|
1026
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1027
|
+
return a.forEach(this, (r, s) => {
|
|
1028
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
1029
|
+
}), n;
|
|
1030
1030
|
}
|
|
1031
1031
|
[Symbol.iterator]() {
|
|
1032
1032
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1033
1033
|
}
|
|
1034
1034
|
toString() {
|
|
1035
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
1035
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
1036
1036
|
`);
|
|
1037
1037
|
}
|
|
1038
1038
|
getSetCookie() {
|
|
@@ -1044,126 +1044,126 @@ let L = class {
|
|
|
1044
1044
|
static from(t) {
|
|
1045
1045
|
return t instanceof this ? t : new this(t);
|
|
1046
1046
|
}
|
|
1047
|
-
static concat(t, ...
|
|
1048
|
-
const
|
|
1049
|
-
return
|
|
1047
|
+
static concat(t, ...n) {
|
|
1048
|
+
const r = new this(t);
|
|
1049
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1050
1050
|
}
|
|
1051
1051
|
static accessor(t) {
|
|
1052
|
-
const
|
|
1052
|
+
const r = (this[We] = this[We] = {
|
|
1053
1053
|
accessors: {}
|
|
1054
1054
|
}).accessors, s = this.prototype;
|
|
1055
|
-
function i
|
|
1056
|
-
const c =
|
|
1057
|
-
|
|
1055
|
+
function o(i) {
|
|
1056
|
+
const c = ce(i);
|
|
1057
|
+
r[c] || (qn(s, i), r[c] = !0);
|
|
1058
1058
|
}
|
|
1059
|
-
return a.isArray(t) ? t.forEach(
|
|
1059
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1060
1060
|
}
|
|
1061
1061
|
};
|
|
1062
|
-
|
|
1063
|
-
a.reduceDescriptors(
|
|
1064
|
-
let
|
|
1062
|
+
J.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1063
|
+
a.reduceDescriptors(J.prototype, ({ value: e }, t) => {
|
|
1064
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1065
1065
|
return {
|
|
1066
1066
|
get: () => e,
|
|
1067
|
-
set(
|
|
1068
|
-
this[
|
|
1067
|
+
set(r) {
|
|
1068
|
+
this[n] = r;
|
|
1069
1069
|
}
|
|
1070
1070
|
};
|
|
1071
1071
|
});
|
|
1072
|
-
a.freezeMethods(
|
|
1073
|
-
function
|
|
1074
|
-
const
|
|
1075
|
-
let
|
|
1072
|
+
a.freezeMethods(J);
|
|
1073
|
+
function Ce(e, t) {
|
|
1074
|
+
const n = this || pe, r = t || n, s = J.from(r.headers);
|
|
1075
|
+
let o = r.data;
|
|
1076
1076
|
return a.forEach(e, function(c) {
|
|
1077
|
-
|
|
1078
|
-
}), s.normalize(),
|
|
1077
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
1078
|
+
}), s.normalize(), o;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function wt(e) {
|
|
1081
1081
|
return !!(e && e.__CANCEL__);
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
|
|
1083
|
+
function oe(e, t, n) {
|
|
1084
|
+
S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1085
1085
|
}
|
|
1086
|
-
a.inherits(
|
|
1086
|
+
a.inherits(oe, S, {
|
|
1087
1087
|
__CANCEL__: !0
|
|
1088
1088
|
});
|
|
1089
|
-
function
|
|
1090
|
-
const
|
|
1091
|
-
!
|
|
1092
|
-
"Request failed with status code " +
|
|
1093
|
-
[
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1089
|
+
function xt(e, t, n) {
|
|
1090
|
+
const r = n.config.validateStatus;
|
|
1091
|
+
!n.status || !r || r(n.status) ? e(n) : t(new S(
|
|
1092
|
+
"Request failed with status code " + n.status,
|
|
1093
|
+
[S.ERR_BAD_REQUEST, S.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1094
|
+
n.config,
|
|
1095
|
+
n.request,
|
|
1096
|
+
n
|
|
1097
1097
|
));
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function $n(e) {
|
|
1100
1100
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1101
1101
|
return t && t[1] || "";
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function Mn(e, t) {
|
|
1104
1104
|
e = e || 10;
|
|
1105
|
-
const
|
|
1106
|
-
let s = 0,
|
|
1105
|
+
const n = new Array(e), r = new Array(e);
|
|
1106
|
+
let s = 0, o = 0, i;
|
|
1107
1107
|
return t = t !== void 0 ? t : 1e3, function(p) {
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1110
|
-
let
|
|
1111
|
-
for (;
|
|
1112
|
-
E +=
|
|
1113
|
-
if (s = (s + 1) % e, s ===
|
|
1108
|
+
const d = Date.now(), u = r[o];
|
|
1109
|
+
i || (i = d), n[s] = p, r[s] = d;
|
|
1110
|
+
let m = o, E = 0;
|
|
1111
|
+
for (; m !== s; )
|
|
1112
|
+
E += n[m++], m = m % e;
|
|
1113
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), d - i < t)
|
|
1114
1114
|
return;
|
|
1115
|
-
const
|
|
1116
|
-
return
|
|
1115
|
+
const C = u && d - u;
|
|
1116
|
+
return C ? Math.round(E * 1e3 / C) : void 0;
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
let
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1119
|
+
function zn(e, t) {
|
|
1120
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
1121
|
+
const i = (d, u = Date.now()) => {
|
|
1122
|
+
n = u, s = null, o && (clearTimeout(o), o = null), e(...d);
|
|
1123
1123
|
};
|
|
1124
|
-
return [(...
|
|
1125
|
-
const u = Date.now(),
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
},
|
|
1129
|
-
}, () => s &&
|
|
1124
|
+
return [(...d) => {
|
|
1125
|
+
const u = Date.now(), m = u - n;
|
|
1126
|
+
m >= r ? i(d, u) : (s = d, o || (o = setTimeout(() => {
|
|
1127
|
+
o = null, i(s);
|
|
1128
|
+
}, r - m)));
|
|
1129
|
+
}, () => s && i(s)];
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1132
|
-
let
|
|
1133
|
-
const s =
|
|
1134
|
-
return
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
const
|
|
1138
|
-
loaded:
|
|
1131
|
+
const xe = (e, t, n = 3) => {
|
|
1132
|
+
let r = 0;
|
|
1133
|
+
const s = Mn(50, 250);
|
|
1134
|
+
return zn((o) => {
|
|
1135
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, p = i - r, d = s(p), u = i <= c;
|
|
1136
|
+
r = i;
|
|
1137
|
+
const m = {
|
|
1138
|
+
loaded: i,
|
|
1139
1139
|
total: c,
|
|
1140
|
-
progress: c ?
|
|
1140
|
+
progress: c ? i / c : void 0,
|
|
1141
1141
|
bytes: p,
|
|
1142
|
-
rate:
|
|
1143
|
-
estimated:
|
|
1144
|
-
event:
|
|
1142
|
+
rate: d || void 0,
|
|
1143
|
+
estimated: d && c && u ? (c - i) / d : void 0,
|
|
1144
|
+
event: o,
|
|
1145
1145
|
lengthComputable: c != null,
|
|
1146
1146
|
[t ? "download" : "upload"]: !0
|
|
1147
1147
|
};
|
|
1148
|
-
e(
|
|
1149
|
-
},
|
|
1150
|
-
},
|
|
1151
|
-
const
|
|
1152
|
-
return [(
|
|
1153
|
-
lengthComputable:
|
|
1148
|
+
e(m);
|
|
1149
|
+
}, n);
|
|
1150
|
+
}, Ve = (e, t) => {
|
|
1151
|
+
const n = e != null;
|
|
1152
|
+
return [(r) => t[0]({
|
|
1153
|
+
lengthComputable: n,
|
|
1154
1154
|
total: e,
|
|
1155
|
-
loaded:
|
|
1155
|
+
loaded: r
|
|
1156
1156
|
}), t[1]];
|
|
1157
|
-
},
|
|
1158
|
-
new URL(
|
|
1159
|
-
|
|
1160
|
-
) : () => !0,
|
|
1157
|
+
}, Ye = (e) => (...t) => a.asap(() => e(...t)), Hn = M.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, M.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1158
|
+
new URL(M.origin),
|
|
1159
|
+
M.navigator && /(msie|trident)/i.test(M.navigator.userAgent)
|
|
1160
|
+
) : () => !0, Jn = M.hasStandardBrowserEnv ? (
|
|
1161
1161
|
// Standard browser envs support document.cookie
|
|
1162
1162
|
{
|
|
1163
|
-
write(e, t,
|
|
1163
|
+
write(e, t, n, r, s, o, i) {
|
|
1164
1164
|
if (typeof document > "u") return;
|
|
1165
1165
|
const c = [`${e}=${encodeURIComponent(t)}`];
|
|
1166
|
-
a.isNumber(
|
|
1166
|
+
a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), a.isString(i) && c.push(`SameSite=${i}`), document.cookie = c.join("; ");
|
|
1167
1167
|
},
|
|
1168
1168
|
read(e) {
|
|
1169
1169
|
if (typeof document > "u") return null;
|
|
@@ -1186,196 +1186,196 @@ const ye = (e, t, r = 3) => {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
);
|
|
1189
|
-
function
|
|
1189
|
+
function Wn(e) {
|
|
1190
1190
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function Vn(e, t) {
|
|
1193
1193
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1196
|
-
let
|
|
1197
|
-
return e && (
|
|
1195
|
+
function Et(e, t, n) {
|
|
1196
|
+
let r = !Wn(t);
|
|
1197
|
+
return e && (r || n == !1) ? Vn(e, t) : t;
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1200
|
-
function
|
|
1199
|
+
const Ke = (e) => e instanceof J ? { ...e } : e;
|
|
1200
|
+
function te(e, t) {
|
|
1201
1201
|
t = t || {};
|
|
1202
|
-
const
|
|
1203
|
-
function
|
|
1204
|
-
return a.isPlainObject(
|
|
1202
|
+
const n = {};
|
|
1203
|
+
function r(d, u, m, E) {
|
|
1204
|
+
return a.isPlainObject(d) && a.isPlainObject(u) ? a.merge.call({ caseless: E }, d, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1205
1205
|
}
|
|
1206
|
-
function s(
|
|
1206
|
+
function s(d, u, m, E) {
|
|
1207
1207
|
if (a.isUndefined(u)) {
|
|
1208
|
-
if (!a.isUndefined(
|
|
1209
|
-
return
|
|
1210
|
-
} else return
|
|
1208
|
+
if (!a.isUndefined(d))
|
|
1209
|
+
return r(void 0, d, m, E);
|
|
1210
|
+
} else return r(d, u, m, E);
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function o(d, u) {
|
|
1213
1213
|
if (!a.isUndefined(u))
|
|
1214
|
-
return
|
|
1214
|
+
return r(void 0, u);
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function i(d, u) {
|
|
1217
1217
|
if (a.isUndefined(u)) {
|
|
1218
|
-
if (!a.isUndefined(
|
|
1219
|
-
return
|
|
1220
|
-
} else return
|
|
1218
|
+
if (!a.isUndefined(d))
|
|
1219
|
+
return r(void 0, d);
|
|
1220
|
+
} else return r(void 0, u);
|
|
1221
1221
|
}
|
|
1222
|
-
function c(
|
|
1223
|
-
if (
|
|
1224
|
-
return
|
|
1225
|
-
if (
|
|
1226
|
-
return
|
|
1222
|
+
function c(d, u, m) {
|
|
1223
|
+
if (m in t)
|
|
1224
|
+
return r(d, u);
|
|
1225
|
+
if (m in e)
|
|
1226
|
+
return r(void 0, d);
|
|
1227
1227
|
}
|
|
1228
1228
|
const p = {
|
|
1229
|
-
url:
|
|
1230
|
-
method:
|
|
1231
|
-
data:
|
|
1232
|
-
baseURL:
|
|
1233
|
-
transformRequest:
|
|
1234
|
-
transformResponse:
|
|
1235
|
-
paramsSerializer:
|
|
1236
|
-
timeout:
|
|
1237
|
-
timeoutMessage:
|
|
1238
|
-
withCredentials:
|
|
1239
|
-
withXSRFToken:
|
|
1240
|
-
adapter:
|
|
1241
|
-
responseType:
|
|
1242
|
-
xsrfCookieName:
|
|
1243
|
-
xsrfHeaderName:
|
|
1244
|
-
onUploadProgress:
|
|
1245
|
-
onDownloadProgress:
|
|
1246
|
-
decompress:
|
|
1247
|
-
maxContentLength:
|
|
1248
|
-
maxBodyLength:
|
|
1249
|
-
beforeRedirect:
|
|
1250
|
-
transport:
|
|
1251
|
-
httpAgent:
|
|
1252
|
-
httpsAgent:
|
|
1253
|
-
cancelToken:
|
|
1254
|
-
socketPath:
|
|
1255
|
-
responseEncoding:
|
|
1229
|
+
url: o,
|
|
1230
|
+
method: o,
|
|
1231
|
+
data: o,
|
|
1232
|
+
baseURL: i,
|
|
1233
|
+
transformRequest: i,
|
|
1234
|
+
transformResponse: i,
|
|
1235
|
+
paramsSerializer: i,
|
|
1236
|
+
timeout: i,
|
|
1237
|
+
timeoutMessage: i,
|
|
1238
|
+
withCredentials: i,
|
|
1239
|
+
withXSRFToken: i,
|
|
1240
|
+
adapter: i,
|
|
1241
|
+
responseType: i,
|
|
1242
|
+
xsrfCookieName: i,
|
|
1243
|
+
xsrfHeaderName: i,
|
|
1244
|
+
onUploadProgress: i,
|
|
1245
|
+
onDownloadProgress: i,
|
|
1246
|
+
decompress: i,
|
|
1247
|
+
maxContentLength: i,
|
|
1248
|
+
maxBodyLength: i,
|
|
1249
|
+
beforeRedirect: i,
|
|
1250
|
+
transport: i,
|
|
1251
|
+
httpAgent: i,
|
|
1252
|
+
httpsAgent: i,
|
|
1253
|
+
cancelToken: i,
|
|
1254
|
+
socketPath: i,
|
|
1255
|
+
responseEncoding: i,
|
|
1256
1256
|
validateStatus: c,
|
|
1257
|
-
headers: (
|
|
1257
|
+
headers: (d, u, m) => s(Ke(d), Ke(u), m, !0)
|
|
1258
1258
|
};
|
|
1259
1259
|
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1260
|
-
const
|
|
1261
|
-
a.isUndefined(E) &&
|
|
1262
|
-
}),
|
|
1260
|
+
const m = p[u] || s, E = m(e[u], t[u], u);
|
|
1261
|
+
a.isUndefined(E) && m !== c || (n[u] = E);
|
|
1262
|
+
}), n;
|
|
1263
1263
|
}
|
|
1264
|
-
const
|
|
1265
|
-
const t =
|
|
1266
|
-
let { data:
|
|
1267
|
-
if (t.headers =
|
|
1264
|
+
const St = (e) => {
|
|
1265
|
+
const t = te({}, e);
|
|
1266
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1267
|
+
if (t.headers = i = J.from(i), t.url = bt(Et(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1268
1268
|
"Authorization",
|
|
1269
1269
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1270
|
-
), a.isFormData(
|
|
1271
|
-
if (
|
|
1272
|
-
|
|
1273
|
-
else if (a.isFunction(
|
|
1274
|
-
const p =
|
|
1275
|
-
Object.entries(p).forEach(([u,
|
|
1276
|
-
|
|
1270
|
+
), a.isFormData(n)) {
|
|
1271
|
+
if (M.hasStandardBrowserEnv || M.hasStandardBrowserWebWorkerEnv)
|
|
1272
|
+
i.setContentType(void 0);
|
|
1273
|
+
else if (a.isFunction(n.getHeaders)) {
|
|
1274
|
+
const p = n.getHeaders(), d = ["content-type", "content-length"];
|
|
1275
|
+
Object.entries(p).forEach(([u, m]) => {
|
|
1276
|
+
d.includes(u.toLowerCase()) && i.set(u, m);
|
|
1277
1277
|
});
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
|
-
if (
|
|
1281
|
-
const p = s &&
|
|
1282
|
-
p &&
|
|
1280
|
+
if (M.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Hn(t.url))) {
|
|
1281
|
+
const p = s && o && Jn.read(o);
|
|
1282
|
+
p && i.set(s, p);
|
|
1283
1283
|
}
|
|
1284
1284
|
return t;
|
|
1285
|
-
},
|
|
1286
|
-
return new Promise(function(
|
|
1287
|
-
const s =
|
|
1288
|
-
let
|
|
1289
|
-
const
|
|
1290
|
-
let { responseType: c, onUploadProgress: p, onDownloadProgress:
|
|
1291
|
-
function
|
|
1292
|
-
|
|
1285
|
+
}, Yn = typeof XMLHttpRequest < "u", Kn = Yn && function(e) {
|
|
1286
|
+
return new Promise(function(n, r) {
|
|
1287
|
+
const s = St(e);
|
|
1288
|
+
let o = s.data;
|
|
1289
|
+
const i = J.from(s.headers).normalize();
|
|
1290
|
+
let { responseType: c, onUploadProgress: p, onDownloadProgress: d } = s, u, m, E, C, f;
|
|
1291
|
+
function g() {
|
|
1292
|
+
C && C(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1293
1293
|
}
|
|
1294
|
-
let
|
|
1295
|
-
|
|
1296
|
-
function
|
|
1297
|
-
if (!
|
|
1294
|
+
let h = new XMLHttpRequest();
|
|
1295
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1296
|
+
function j() {
|
|
1297
|
+
if (!h)
|
|
1298
1298
|
return;
|
|
1299
|
-
const
|
|
1300
|
-
"getAllResponseHeaders" in
|
|
1299
|
+
const A = J.from(
|
|
1300
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1301
1301
|
), _ = {
|
|
1302
|
-
data: !c || c === "text" || c === "json" ?
|
|
1303
|
-
status:
|
|
1304
|
-
statusText:
|
|
1305
|
-
headers:
|
|
1302
|
+
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1303
|
+
status: h.status,
|
|
1304
|
+
statusText: h.statusText,
|
|
1305
|
+
headers: A,
|
|
1306
1306
|
config: e,
|
|
1307
|
-
request:
|
|
1307
|
+
request: h
|
|
1308
1308
|
};
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
}, function(
|
|
1312
|
-
|
|
1313
|
-
}, _),
|
|
1309
|
+
xt(function(F) {
|
|
1310
|
+
n(F), g();
|
|
1311
|
+
}, function(F) {
|
|
1312
|
+
r(F), g();
|
|
1313
|
+
}, _), h = null;
|
|
1314
1314
|
}
|
|
1315
|
-
"onloadend" in
|
|
1316
|
-
!
|
|
1317
|
-
},
|
|
1318
|
-
|
|
1319
|
-
},
|
|
1320
|
-
const _ =
|
|
1321
|
-
|
|
1322
|
-
},
|
|
1323
|
-
let
|
|
1324
|
-
const _ = s.transitional ||
|
|
1325
|
-
s.timeoutErrorMessage && (
|
|
1326
|
-
|
|
1327
|
-
_.clarifyTimeoutError ?
|
|
1315
|
+
"onloadend" in h ? h.onloadend = j : h.onreadystatechange = function() {
|
|
1316
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(j);
|
|
1317
|
+
}, h.onabort = function() {
|
|
1318
|
+
h && (r(new S("Request aborted", S.ECONNABORTED, e, h)), h = null);
|
|
1319
|
+
}, h.onerror = function(T) {
|
|
1320
|
+
const _ = T && T.message ? T.message : "Network Error", N = new S(_, S.ERR_NETWORK, e, h);
|
|
1321
|
+
N.event = T || null, r(N), h = null;
|
|
1322
|
+
}, h.ontimeout = function() {
|
|
1323
|
+
let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1324
|
+
const _ = s.transitional || yt;
|
|
1325
|
+
s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(new S(
|
|
1326
|
+
T,
|
|
1327
|
+
_.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1328
1328
|
e,
|
|
1329
|
-
|
|
1330
|
-
)),
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1333
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1334
|
-
|
|
1329
|
+
h
|
|
1330
|
+
)), h = null;
|
|
1331
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(T, _) {
|
|
1332
|
+
h.setRequestHeader(_, T);
|
|
1333
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), d && ([E, f] = xe(d, !0), h.addEventListener("progress", E)), p && h.upload && ([m, C] = xe(p), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", C)), (s.cancelToken || s.signal) && (u = (A) => {
|
|
1334
|
+
h && (r(!A || A.type ? new oe(null, e, h) : A), h.abort(), h = null);
|
|
1335
1335
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1336
|
-
const
|
|
1337
|
-
if (
|
|
1338
|
-
|
|
1336
|
+
const R = $n(s.url);
|
|
1337
|
+
if (R && M.protocols.indexOf(R) === -1) {
|
|
1338
|
+
r(new S("Unsupported protocol " + R + ":", S.ERR_BAD_REQUEST, e));
|
|
1339
1339
|
return;
|
|
1340
1340
|
}
|
|
1341
|
-
|
|
1341
|
+
h.send(o || null);
|
|
1342
1342
|
});
|
|
1343
|
-
},
|
|
1344
|
-
const { length:
|
|
1345
|
-
if (t ||
|
|
1346
|
-
let
|
|
1347
|
-
const
|
|
1343
|
+
}, Qn = (e, t) => {
|
|
1344
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1345
|
+
if (t || n) {
|
|
1346
|
+
let r = new AbortController(), s;
|
|
1347
|
+
const o = function(d) {
|
|
1348
1348
|
if (!s) {
|
|
1349
1349
|
s = !0, c();
|
|
1350
|
-
const u =
|
|
1351
|
-
|
|
1350
|
+
const u = d instanceof Error ? d : this.reason;
|
|
1351
|
+
r.abort(u instanceof S ? u : new oe(u instanceof Error ? u.message : u));
|
|
1352
1352
|
}
|
|
1353
1353
|
};
|
|
1354
|
-
let
|
|
1355
|
-
|
|
1354
|
+
let i = t && setTimeout(() => {
|
|
1355
|
+
i = null, o(new S(`timeout ${t} of ms exceeded`, S.ETIMEDOUT));
|
|
1356
1356
|
}, t);
|
|
1357
1357
|
const c = () => {
|
|
1358
|
-
e && (
|
|
1359
|
-
|
|
1358
|
+
e && (i && clearTimeout(i), i = null, e.forEach((d) => {
|
|
1359
|
+
d.unsubscribe ? d.unsubscribe(o) : d.removeEventListener("abort", o);
|
|
1360
1360
|
}), e = null);
|
|
1361
1361
|
};
|
|
1362
|
-
e.forEach((
|
|
1363
|
-
const { signal: p } =
|
|
1362
|
+
e.forEach((d) => d.addEventListener("abort", o));
|
|
1363
|
+
const { signal: p } = r;
|
|
1364
1364
|
return p.unsubscribe = () => a.asap(c), p;
|
|
1365
1365
|
}
|
|
1366
|
-
},
|
|
1367
|
-
let
|
|
1368
|
-
if (
|
|
1366
|
+
}, Xn = function* (e, t) {
|
|
1367
|
+
let n = e.byteLength;
|
|
1368
|
+
if (n < t) {
|
|
1369
1369
|
yield e;
|
|
1370
1370
|
return;
|
|
1371
1371
|
}
|
|
1372
|
-
let
|
|
1373
|
-
for (;
|
|
1374
|
-
s =
|
|
1375
|
-
},
|
|
1376
|
-
for await (const
|
|
1377
|
-
yield*
|
|
1378
|
-
},
|
|
1372
|
+
let r = 0, s;
|
|
1373
|
+
for (; r < n; )
|
|
1374
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1375
|
+
}, Gn = async function* (e, t) {
|
|
1376
|
+
for await (const n of Zn(e))
|
|
1377
|
+
yield* Xn(n, t);
|
|
1378
|
+
}, Zn = async function* (e) {
|
|
1379
1379
|
if (e[Symbol.asyncIterator]) {
|
|
1380
1380
|
yield* e;
|
|
1381
1381
|
return;
|
|
@@ -1383,35 +1383,35 @@ const Rt = (e) => {
|
|
|
1383
1383
|
const t = e.getReader();
|
|
1384
1384
|
try {
|
|
1385
1385
|
for (; ; ) {
|
|
1386
|
-
const { done:
|
|
1387
|
-
if (
|
|
1386
|
+
const { done: n, value: r } = await t.read();
|
|
1387
|
+
if (n)
|
|
1388
1388
|
break;
|
|
1389
|
-
yield
|
|
1389
|
+
yield r;
|
|
1390
1390
|
}
|
|
1391
1391
|
} finally {
|
|
1392
1392
|
await t.cancel();
|
|
1393
1393
|
}
|
|
1394
|
-
},
|
|
1395
|
-
const s =
|
|
1396
|
-
let
|
|
1397
|
-
|
|
1394
|
+
}, Qe = (e, t, n, r) => {
|
|
1395
|
+
const s = Gn(e, t);
|
|
1396
|
+
let o = 0, i, c = (p) => {
|
|
1397
|
+
i || (i = !0, r && r(p));
|
|
1398
1398
|
};
|
|
1399
1399
|
return new ReadableStream({
|
|
1400
1400
|
async pull(p) {
|
|
1401
1401
|
try {
|
|
1402
|
-
const { done:
|
|
1403
|
-
if (
|
|
1402
|
+
const { done: d, value: u } = await s.next();
|
|
1403
|
+
if (d) {
|
|
1404
1404
|
c(), p.close();
|
|
1405
1405
|
return;
|
|
1406
1406
|
}
|
|
1407
|
-
let
|
|
1408
|
-
if (
|
|
1409
|
-
let E =
|
|
1410
|
-
|
|
1407
|
+
let m = u.byteLength;
|
|
1408
|
+
if (n) {
|
|
1409
|
+
let E = o += m;
|
|
1410
|
+
n(E);
|
|
1411
1411
|
}
|
|
1412
1412
|
p.enqueue(new Uint8Array(u));
|
|
1413
|
-
} catch (
|
|
1414
|
-
throw c(
|
|
1413
|
+
} catch (d) {
|
|
1414
|
+
throw c(d), d;
|
|
1415
1415
|
}
|
|
1416
1416
|
},
|
|
1417
1417
|
cancel(p) {
|
|
@@ -1420,171 +1420,171 @@ const Rt = (e) => {
|
|
|
1420
1420
|
}, {
|
|
1421
1421
|
highWaterMark: 2
|
|
1422
1422
|
});
|
|
1423
|
-
},
|
|
1423
|
+
}, Xe = 64 * 1024, { isFunction: me } = a, er = (({ Request: e, Response: t }) => ({
|
|
1424
1424
|
Request: e,
|
|
1425
1425
|
Response: t
|
|
1426
1426
|
}))(a.global), {
|
|
1427
|
-
ReadableStream:
|
|
1428
|
-
TextEncoder:
|
|
1429
|
-
} = a.global,
|
|
1427
|
+
ReadableStream: Ge,
|
|
1428
|
+
TextEncoder: Ze
|
|
1429
|
+
} = a.global, et = (e, ...t) => {
|
|
1430
1430
|
try {
|
|
1431
1431
|
return !!e(...t);
|
|
1432
1432
|
} catch {
|
|
1433
1433
|
return !1;
|
|
1434
1434
|
}
|
|
1435
|
-
},
|
|
1435
|
+
}, tr = (e) => {
|
|
1436
1436
|
e = a.merge.call({
|
|
1437
1437
|
skipUndefined: !0
|
|
1438
|
-
},
|
|
1439
|
-
const { fetch: t, Request:
|
|
1438
|
+
}, er, e);
|
|
1439
|
+
const { fetch: t, Request: n, Response: r } = e, s = t ? me(t) : typeof fetch == "function", o = me(n), i = me(r);
|
|
1440
1440
|
if (!s)
|
|
1441
1441
|
return !1;
|
|
1442
|
-
const c = s &&
|
|
1443
|
-
let
|
|
1444
|
-
const
|
|
1445
|
-
body: new
|
|
1442
|
+
const c = s && me(Ge), p = s && (typeof Ze == "function" ? /* @__PURE__ */ ((f) => (g) => f.encode(g))(new Ze()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), d = o && c && et(() => {
|
|
1443
|
+
let f = !1;
|
|
1444
|
+
const g = new n(M.origin, {
|
|
1445
|
+
body: new Ge(),
|
|
1446
1446
|
method: "POST",
|
|
1447
1447
|
get duplex() {
|
|
1448
|
-
return
|
|
1448
|
+
return f = !0, "half";
|
|
1449
1449
|
}
|
|
1450
1450
|
}).headers.has("Content-Type");
|
|
1451
|
-
return
|
|
1452
|
-
}), u =
|
|
1453
|
-
stream: u && ((
|
|
1451
|
+
return f && !g;
|
|
1452
|
+
}), u = i && c && et(() => a.isReadableStream(new r("").body)), m = {
|
|
1453
|
+
stream: u && ((f) => f.body)
|
|
1454
1454
|
};
|
|
1455
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1456
|
-
!
|
|
1457
|
-
let
|
|
1458
|
-
if (
|
|
1459
|
-
return
|
|
1460
|
-
throw new
|
|
1455
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1456
|
+
!m[f] && (m[f] = (g, h) => {
|
|
1457
|
+
let j = g && g[f];
|
|
1458
|
+
if (j)
|
|
1459
|
+
return j.call(g);
|
|
1460
|
+
throw new S(`Response type '${f}' is not supported`, S.ERR_NOT_SUPPORT, h);
|
|
1461
1461
|
});
|
|
1462
1462
|
});
|
|
1463
|
-
const E = async (
|
|
1464
|
-
if (
|
|
1463
|
+
const E = async (f) => {
|
|
1464
|
+
if (f == null)
|
|
1465
1465
|
return 0;
|
|
1466
|
-
if (a.isBlob(
|
|
1467
|
-
return
|
|
1468
|
-
if (a.isSpecCompliantForm(
|
|
1469
|
-
return (await new
|
|
1466
|
+
if (a.isBlob(f))
|
|
1467
|
+
return f.size;
|
|
1468
|
+
if (a.isSpecCompliantForm(f))
|
|
1469
|
+
return (await new n(M.origin, {
|
|
1470
1470
|
method: "POST",
|
|
1471
|
-
body:
|
|
1471
|
+
body: f
|
|
1472
1472
|
}).arrayBuffer()).byteLength;
|
|
1473
|
-
if (a.isArrayBufferView(
|
|
1474
|
-
return
|
|
1475
|
-
if (a.isURLSearchParams(
|
|
1476
|
-
return (await p(
|
|
1477
|
-
},
|
|
1478
|
-
const
|
|
1479
|
-
return
|
|
1473
|
+
if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
|
|
1474
|
+
return f.byteLength;
|
|
1475
|
+
if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
|
|
1476
|
+
return (await p(f)).byteLength;
|
|
1477
|
+
}, C = async (f, g) => {
|
|
1478
|
+
const h = a.toFiniteNumber(f.getContentLength());
|
|
1479
|
+
return h ?? E(g);
|
|
1480
1480
|
};
|
|
1481
|
-
return async (
|
|
1481
|
+
return async (f) => {
|
|
1482
1482
|
let {
|
|
1483
|
-
url:
|
|
1484
|
-
method:
|
|
1485
|
-
data:
|
|
1486
|
-
signal:
|
|
1487
|
-
cancelToken:
|
|
1488
|
-
timeout:
|
|
1483
|
+
url: g,
|
|
1484
|
+
method: h,
|
|
1485
|
+
data: j,
|
|
1486
|
+
signal: R,
|
|
1487
|
+
cancelToken: A,
|
|
1488
|
+
timeout: T,
|
|
1489
1489
|
onDownloadProgress: _,
|
|
1490
|
-
onUploadProgress:
|
|
1491
|
-
responseType:
|
|
1492
|
-
headers:
|
|
1493
|
-
withCredentials:
|
|
1494
|
-
fetchOptions:
|
|
1495
|
-
} =
|
|
1496
|
-
|
|
1497
|
-
let
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1490
|
+
onUploadProgress: N,
|
|
1491
|
+
responseType: F,
|
|
1492
|
+
headers: K,
|
|
1493
|
+
withCredentials: z = "same-origin",
|
|
1494
|
+
fetchOptions: W
|
|
1495
|
+
} = St(f), B = t || fetch;
|
|
1496
|
+
F = F ? (F + "").toLowerCase() : "text";
|
|
1497
|
+
let U = Qn([R, A && A.toAbortSignal()], T), L = null;
|
|
1498
|
+
const P = U && U.unsubscribe && (() => {
|
|
1499
|
+
U.unsubscribe();
|
|
1500
1500
|
});
|
|
1501
|
-
let
|
|
1501
|
+
let b;
|
|
1502
1502
|
try {
|
|
1503
|
-
if (
|
|
1504
|
-
let l = new
|
|
1503
|
+
if (N && d && h !== "get" && h !== "head" && (b = await C(K, j)) !== 0) {
|
|
1504
|
+
let l = new n(g, {
|
|
1505
1505
|
method: "POST",
|
|
1506
|
-
body:
|
|
1506
|
+
body: j,
|
|
1507
1507
|
duplex: "half"
|
|
1508
|
-
}),
|
|
1509
|
-
if (a.isFormData(
|
|
1510
|
-
const [
|
|
1511
|
-
|
|
1512
|
-
|
|
1508
|
+
}), x;
|
|
1509
|
+
if (a.isFormData(j) && (x = l.headers.get("content-type")) && K.setContentType(x), l.body) {
|
|
1510
|
+
const [k, D] = Ve(
|
|
1511
|
+
b,
|
|
1512
|
+
xe(Ye(N))
|
|
1513
1513
|
);
|
|
1514
|
-
|
|
1514
|
+
j = Qe(l.body, Xe, k, D);
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
|
-
a.isString(
|
|
1518
|
-
const
|
|
1519
|
-
...
|
|
1520
|
-
signal:
|
|
1521
|
-
method:
|
|
1522
|
-
headers:
|
|
1523
|
-
body:
|
|
1517
|
+
a.isString(z) || (z = z ? "include" : "omit");
|
|
1518
|
+
const y = o && "credentials" in n.prototype, O = {
|
|
1519
|
+
...W,
|
|
1520
|
+
signal: U,
|
|
1521
|
+
method: h.toUpperCase(),
|
|
1522
|
+
headers: K.normalize().toJSON(),
|
|
1523
|
+
body: j,
|
|
1524
1524
|
duplex: "half",
|
|
1525
|
-
credentials:
|
|
1525
|
+
credentials: y ? z : void 0
|
|
1526
1526
|
};
|
|
1527
|
-
|
|
1528
|
-
let
|
|
1529
|
-
const
|
|
1530
|
-
if (u && (_ ||
|
|
1527
|
+
L = o && new n(g, O);
|
|
1528
|
+
let v = await (o ? B(L, W) : B(g, O));
|
|
1529
|
+
const q = u && (F === "stream" || F === "response");
|
|
1530
|
+
if (u && (_ || q && P)) {
|
|
1531
1531
|
const l = {};
|
|
1532
|
-
["status", "statusText", "headers"].forEach((
|
|
1533
|
-
l[
|
|
1532
|
+
["status", "statusText", "headers"].forEach((G) => {
|
|
1533
|
+
l[G] = v[G];
|
|
1534
1534
|
});
|
|
1535
|
-
const
|
|
1536
|
-
|
|
1537
|
-
|
|
1535
|
+
const x = a.toFiniteNumber(v.headers.get("content-length")), [k, D] = _ && Ve(
|
|
1536
|
+
x,
|
|
1537
|
+
xe(Ye(_), !0)
|
|
1538
1538
|
) || [];
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1539
|
+
v = new r(
|
|
1540
|
+
Qe(v.body, Xe, k, () => {
|
|
1541
|
+
D && D(), P && P();
|
|
1542
1542
|
}),
|
|
1543
1543
|
l
|
|
1544
1544
|
);
|
|
1545
1545
|
}
|
|
1546
|
-
|
|
1547
|
-
let
|
|
1548
|
-
return !
|
|
1549
|
-
|
|
1550
|
-
data:
|
|
1551
|
-
headers:
|
|
1552
|
-
status:
|
|
1553
|
-
statusText:
|
|
1554
|
-
config:
|
|
1555
|
-
request:
|
|
1546
|
+
F = F || "text";
|
|
1547
|
+
let X = await m[a.findKey(m, F) || "text"](v, f);
|
|
1548
|
+
return !q && P && P(), await new Promise((l, x) => {
|
|
1549
|
+
xt(l, x, {
|
|
1550
|
+
data: X,
|
|
1551
|
+
headers: J.from(v.headers),
|
|
1552
|
+
status: v.status,
|
|
1553
|
+
statusText: v.statusText,
|
|
1554
|
+
config: f,
|
|
1555
|
+
request: L
|
|
1556
1556
|
});
|
|
1557
1557
|
});
|
|
1558
|
-
} catch (
|
|
1559
|
-
throw
|
|
1560
|
-
new
|
|
1558
|
+
} catch (y) {
|
|
1559
|
+
throw P && P(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign(
|
|
1560
|
+
new S("Network Error", S.ERR_NETWORK, f, L),
|
|
1561
1561
|
{
|
|
1562
|
-
cause:
|
|
1562
|
+
cause: y.cause || y
|
|
1563
1563
|
}
|
|
1564
|
-
) :
|
|
1564
|
+
) : S.from(y, y && y.code, f, L);
|
|
1565
1565
|
}
|
|
1566
1566
|
};
|
|
1567
|
-
},
|
|
1567
|
+
}, nr = /* @__PURE__ */ new Map(), Rt = (e) => {
|
|
1568
1568
|
let t = e && e.env || {};
|
|
1569
|
-
const { fetch:
|
|
1570
|
-
|
|
1569
|
+
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1570
|
+
r,
|
|
1571
1571
|
s,
|
|
1572
|
-
|
|
1572
|
+
n
|
|
1573
1573
|
];
|
|
1574
|
-
let
|
|
1574
|
+
let i = o.length, c = i, p, d, u = nr;
|
|
1575
1575
|
for (; c--; )
|
|
1576
|
-
p =
|
|
1577
|
-
return
|
|
1576
|
+
p = o[c], d = u.get(p), d === void 0 && u.set(p, d = c ? /* @__PURE__ */ new Map() : tr(t)), u = d;
|
|
1577
|
+
return d;
|
|
1578
1578
|
};
|
|
1579
|
-
|
|
1580
|
-
const
|
|
1581
|
-
http:
|
|
1582
|
-
xhr:
|
|
1579
|
+
Rt();
|
|
1580
|
+
const Ie = {
|
|
1581
|
+
http: wn,
|
|
1582
|
+
xhr: Kn,
|
|
1583
1583
|
fetch: {
|
|
1584
|
-
get:
|
|
1584
|
+
get: Rt
|
|
1585
1585
|
}
|
|
1586
1586
|
};
|
|
1587
|
-
a.forEach(
|
|
1587
|
+
a.forEach(Ie, (e, t) => {
|
|
1588
1588
|
if (e) {
|
|
1589
1589
|
try {
|
|
1590
1590
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1593,29 +1593,29 @@ a.forEach(Le, (e, t) => {
|
|
|
1593
1593
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1594
1594
|
}
|
|
1595
1595
|
});
|
|
1596
|
-
const
|
|
1597
|
-
function
|
|
1596
|
+
const tt = (e) => `- ${e}`, rr = (e) => a.isFunction(e) || e === null || e === !1;
|
|
1597
|
+
function sr(e, t) {
|
|
1598
1598
|
e = a.isArray(e) ? e : [e];
|
|
1599
|
-
const { length:
|
|
1600
|
-
let
|
|
1601
|
-
const
|
|
1602
|
-
for (let
|
|
1603
|
-
|
|
1599
|
+
const { length: n } = e;
|
|
1600
|
+
let r, s;
|
|
1601
|
+
const o = {};
|
|
1602
|
+
for (let i = 0; i < n; i++) {
|
|
1603
|
+
r = e[i];
|
|
1604
1604
|
let c;
|
|
1605
|
-
if (s =
|
|
1606
|
-
throw new
|
|
1605
|
+
if (s = r, !rr(r) && (s = Ie[(c = String(r)).toLowerCase()], s === void 0))
|
|
1606
|
+
throw new S(`Unknown adapter '${c}'`);
|
|
1607
1607
|
if (s && (a.isFunction(s) || (s = s.get(t))))
|
|
1608
1608
|
break;
|
|
1609
|
-
|
|
1609
|
+
o[c || "#" + i] = s;
|
|
1610
1610
|
}
|
|
1611
1611
|
if (!s) {
|
|
1612
|
-
const
|
|
1613
|
-
([p,
|
|
1612
|
+
const i = Object.entries(o).map(
|
|
1613
|
+
([p, d]) => `adapter ${p} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1614
1614
|
);
|
|
1615
|
-
let c =
|
|
1616
|
-
` +
|
|
1617
|
-
`) : " " +
|
|
1618
|
-
throw new
|
|
1615
|
+
let c = n ? i.length > 1 ? `since :
|
|
1616
|
+
` + i.map(tt).join(`
|
|
1617
|
+
`) : " " + tt(i[0]) : "as no adapter specified";
|
|
1618
|
+
throw new S(
|
|
1619
1619
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1620
1620
|
"ERR_NOT_SUPPORT"
|
|
1621
1621
|
);
|
|
@@ -1627,89 +1627,89 @@ const Tt = {
|
|
|
1627
1627
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1628
1628
|
* @type {Function}
|
|
1629
1629
|
*/
|
|
1630
|
-
getAdapter:
|
|
1630
|
+
getAdapter: sr,
|
|
1631
1631
|
/**
|
|
1632
1632
|
* Exposes all known adapters
|
|
1633
1633
|
* @type {Object<string, Function|Object>}
|
|
1634
1634
|
*/
|
|
1635
|
-
adapters:
|
|
1635
|
+
adapters: Ie
|
|
1636
1636
|
};
|
|
1637
|
-
function
|
|
1637
|
+
function je(e) {
|
|
1638
1638
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1639
|
-
throw new
|
|
1639
|
+
throw new oe(null, e);
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1642
|
-
return
|
|
1641
|
+
function nt(e) {
|
|
1642
|
+
return je(e), e.headers = J.from(e.headers), e.data = Ce.call(
|
|
1643
1643
|
e,
|
|
1644
1644
|
e.transformRequest
|
|
1645
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tt.getAdapter(e.adapter ||
|
|
1646
|
-
return
|
|
1645
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tt.getAdapter(e.adapter || pe.adapter, e)(e).then(function(r) {
|
|
1646
|
+
return je(e), r.data = Ce.call(
|
|
1647
1647
|
e,
|
|
1648
1648
|
e.transformResponse,
|
|
1649
|
-
|
|
1650
|
-
),
|
|
1651
|
-
}, function(
|
|
1652
|
-
return
|
|
1649
|
+
r
|
|
1650
|
+
), r.headers = J.from(r.headers), r;
|
|
1651
|
+
}, function(r) {
|
|
1652
|
+
return wt(r) || (je(e), r && r.response && (r.response.data = Ce.call(
|
|
1653
1653
|
e,
|
|
1654
1654
|
e.transformResponse,
|
|
1655
|
-
|
|
1656
|
-
),
|
|
1655
|
+
r.response
|
|
1656
|
+
), r.response.headers = J.from(r.response.headers))), Promise.reject(r);
|
|
1657
1657
|
});
|
|
1658
1658
|
}
|
|
1659
|
-
const
|
|
1659
|
+
const At = "1.13.2", Ae = {};
|
|
1660
1660
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1661
|
-
|
|
1662
|
-
return typeof
|
|
1661
|
+
Ae[e] = function(r) {
|
|
1662
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1663
1663
|
};
|
|
1664
1664
|
});
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1667
|
-
function s(
|
|
1668
|
-
return "[Axios v" +
|
|
1665
|
+
const rt = {};
|
|
1666
|
+
Ae.transitional = function(t, n, r) {
|
|
1667
|
+
function s(o, i) {
|
|
1668
|
+
return "[Axios v" + At + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1669
1669
|
}
|
|
1670
|
-
return (
|
|
1670
|
+
return (o, i, c) => {
|
|
1671
1671
|
if (t === !1)
|
|
1672
|
-
throw new
|
|
1673
|
-
s(
|
|
1674
|
-
|
|
1672
|
+
throw new S(
|
|
1673
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1674
|
+
S.ERR_DEPRECATED
|
|
1675
1675
|
);
|
|
1676
|
-
return
|
|
1676
|
+
return n && !rt[i] && (rt[i] = !0, console.warn(
|
|
1677
1677
|
s(
|
|
1678
|
-
|
|
1679
|
-
" has been deprecated since v" +
|
|
1678
|
+
i,
|
|
1679
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1680
1680
|
)
|
|
1681
|
-
)), t ? t(
|
|
1681
|
+
)), t ? t(o, i, c) : !0;
|
|
1682
1682
|
};
|
|
1683
1683
|
};
|
|
1684
|
-
|
|
1685
|
-
return (
|
|
1684
|
+
Ae.spelling = function(t) {
|
|
1685
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1686
1686
|
};
|
|
1687
|
-
function
|
|
1687
|
+
function or(e, t, n) {
|
|
1688
1688
|
if (typeof e != "object")
|
|
1689
|
-
throw new
|
|
1690
|
-
const
|
|
1691
|
-
let s =
|
|
1689
|
+
throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
|
|
1690
|
+
const r = Object.keys(e);
|
|
1691
|
+
let s = r.length;
|
|
1692
1692
|
for (; s-- > 0; ) {
|
|
1693
|
-
const
|
|
1694
|
-
if (
|
|
1695
|
-
const c = e[
|
|
1693
|
+
const o = r[s], i = t[o];
|
|
1694
|
+
if (i) {
|
|
1695
|
+
const c = e[o], p = c === void 0 || i(c, o, e);
|
|
1696
1696
|
if (p !== !0)
|
|
1697
|
-
throw new
|
|
1697
|
+
throw new S("option " + o + " must be " + p, S.ERR_BAD_OPTION_VALUE);
|
|
1698
1698
|
continue;
|
|
1699
1699
|
}
|
|
1700
|
-
if (
|
|
1701
|
-
throw new
|
|
1700
|
+
if (n !== !0)
|
|
1701
|
+
throw new S("Unknown option " + o, S.ERR_BAD_OPTION);
|
|
1702
1702
|
}
|
|
1703
1703
|
}
|
|
1704
1704
|
const we = {
|
|
1705
|
-
assertOptions:
|
|
1706
|
-
validators:
|
|
1707
|
-
},
|
|
1708
|
-
let
|
|
1705
|
+
assertOptions: or,
|
|
1706
|
+
validators: Ae
|
|
1707
|
+
}, Q = we.validators;
|
|
1708
|
+
let ee = class {
|
|
1709
1709
|
constructor(t) {
|
|
1710
1710
|
this.defaults = t || {}, this.interceptors = {
|
|
1711
|
-
request: new
|
|
1712
|
-
response: new
|
|
1711
|
+
request: new Je(),
|
|
1712
|
+
response: new Je()
|
|
1713
1713
|
};
|
|
1714
1714
|
}
|
|
1715
1715
|
/**
|
|
@@ -1720,140 +1720,140 @@ let X = class {
|
|
|
1720
1720
|
*
|
|
1721
1721
|
* @returns {Promise} The Promise to be fulfilled
|
|
1722
1722
|
*/
|
|
1723
|
-
async request(t,
|
|
1723
|
+
async request(t, n) {
|
|
1724
1724
|
try {
|
|
1725
|
-
return await this._request(t,
|
|
1726
|
-
} catch (
|
|
1727
|
-
if (
|
|
1725
|
+
return await this._request(t, n);
|
|
1726
|
+
} catch (r) {
|
|
1727
|
+
if (r instanceof Error) {
|
|
1728
1728
|
let s = {};
|
|
1729
1729
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1730
|
-
const
|
|
1730
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1731
1731
|
try {
|
|
1732
|
-
|
|
1733
|
-
` +
|
|
1732
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1733
|
+
` + o) : r.stack = o;
|
|
1734
1734
|
} catch {
|
|
1735
1735
|
}
|
|
1736
1736
|
}
|
|
1737
|
-
throw
|
|
1737
|
+
throw r;
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
|
-
_request(t,
|
|
1741
|
-
typeof t == "string" ? (
|
|
1742
|
-
const { transitional:
|
|
1743
|
-
|
|
1744
|
-
silentJSONParsing:
|
|
1745
|
-
forcedJSONParsing:
|
|
1746
|
-
clarifyTimeoutError:
|
|
1747
|
-
}, !1), s != null && (a.isFunction(s) ?
|
|
1740
|
+
_request(t, n) {
|
|
1741
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = te(this.defaults, n);
|
|
1742
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1743
|
+
r !== void 0 && we.assertOptions(r, {
|
|
1744
|
+
silentJSONParsing: Q.transitional(Q.boolean),
|
|
1745
|
+
forcedJSONParsing: Q.transitional(Q.boolean),
|
|
1746
|
+
clarifyTimeoutError: Q.transitional(Q.boolean)
|
|
1747
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1748
1748
|
serialize: s
|
|
1749
1749
|
} : we.assertOptions(s, {
|
|
1750
|
-
encode:
|
|
1751
|
-
serialize:
|
|
1752
|
-
}, !0)),
|
|
1753
|
-
baseUrl:
|
|
1754
|
-
withXsrfToken:
|
|
1755
|
-
}, !0),
|
|
1756
|
-
let
|
|
1757
|
-
|
|
1758
|
-
|
|
1750
|
+
encode: Q.function,
|
|
1751
|
+
serialize: Q.function
|
|
1752
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), we.assertOptions(n, {
|
|
1753
|
+
baseUrl: Q.spelling("baseURL"),
|
|
1754
|
+
withXsrfToken: Q.spelling("withXSRFToken")
|
|
1755
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1756
|
+
let i = o && a.merge(
|
|
1757
|
+
o.common,
|
|
1758
|
+
o[n.method]
|
|
1759
1759
|
);
|
|
1760
|
-
|
|
1760
|
+
o && a.forEach(
|
|
1761
1761
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1762
|
-
(
|
|
1763
|
-
delete
|
|
1762
|
+
(f) => {
|
|
1763
|
+
delete o[f];
|
|
1764
1764
|
}
|
|
1765
|
-
),
|
|
1765
|
+
), n.headers = J.concat(i, o);
|
|
1766
1766
|
const c = [];
|
|
1767
1767
|
let p = !0;
|
|
1768
|
-
this.interceptors.request.forEach(function(
|
|
1769
|
-
typeof
|
|
1768
|
+
this.interceptors.request.forEach(function(g) {
|
|
1769
|
+
typeof g.runWhen == "function" && g.runWhen(n) === !1 || (p = p && g.synchronous, c.unshift(g.fulfilled, g.rejected));
|
|
1770
1770
|
});
|
|
1771
|
-
const
|
|
1772
|
-
this.interceptors.response.forEach(function(
|
|
1773
|
-
|
|
1771
|
+
const d = [];
|
|
1772
|
+
this.interceptors.response.forEach(function(g) {
|
|
1773
|
+
d.push(g.fulfilled, g.rejected);
|
|
1774
1774
|
});
|
|
1775
|
-
let u,
|
|
1775
|
+
let u, m = 0, E;
|
|
1776
1776
|
if (!p) {
|
|
1777
|
-
const
|
|
1778
|
-
for (
|
|
1779
|
-
u = u.then(
|
|
1777
|
+
const f = [nt.bind(this), void 0];
|
|
1778
|
+
for (f.unshift(...c), f.push(...d), E = f.length, u = Promise.resolve(n); m < E; )
|
|
1779
|
+
u = u.then(f[m++], f[m++]);
|
|
1780
1780
|
return u;
|
|
1781
1781
|
}
|
|
1782
1782
|
E = c.length;
|
|
1783
|
-
let
|
|
1784
|
-
for (;
|
|
1785
|
-
const
|
|
1783
|
+
let C = n;
|
|
1784
|
+
for (; m < E; ) {
|
|
1785
|
+
const f = c[m++], g = c[m++];
|
|
1786
1786
|
try {
|
|
1787
|
-
|
|
1788
|
-
} catch (
|
|
1789
|
-
|
|
1787
|
+
C = f(C);
|
|
1788
|
+
} catch (h) {
|
|
1789
|
+
g.call(this, h);
|
|
1790
1790
|
break;
|
|
1791
1791
|
}
|
|
1792
1792
|
}
|
|
1793
1793
|
try {
|
|
1794
|
-
u =
|
|
1795
|
-
} catch (
|
|
1796
|
-
return Promise.reject(
|
|
1794
|
+
u = nt.call(this, C);
|
|
1795
|
+
} catch (f) {
|
|
1796
|
+
return Promise.reject(f);
|
|
1797
1797
|
}
|
|
1798
|
-
for (
|
|
1799
|
-
u = u.then(
|
|
1798
|
+
for (m = 0, E = d.length; m < E; )
|
|
1799
|
+
u = u.then(d[m++], d[m++]);
|
|
1800
1800
|
return u;
|
|
1801
1801
|
}
|
|
1802
1802
|
getUri(t) {
|
|
1803
|
-
t =
|
|
1804
|
-
const
|
|
1805
|
-
return
|
|
1803
|
+
t = te(this.defaults, t);
|
|
1804
|
+
const n = Et(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1805
|
+
return bt(n, t.params, t.paramsSerializer);
|
|
1806
1806
|
}
|
|
1807
1807
|
};
|
|
1808
1808
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1809
|
-
|
|
1810
|
-
return this.request(
|
|
1809
|
+
ee.prototype[t] = function(n, r) {
|
|
1810
|
+
return this.request(te(r || {}, {
|
|
1811
1811
|
method: t,
|
|
1812
|
-
url:
|
|
1813
|
-
data: (
|
|
1812
|
+
url: n,
|
|
1813
|
+
data: (r || {}).data
|
|
1814
1814
|
}));
|
|
1815
1815
|
};
|
|
1816
1816
|
});
|
|
1817
1817
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1818
|
-
function r
|
|
1819
|
-
return function(
|
|
1820
|
-
return this.request(
|
|
1818
|
+
function n(r) {
|
|
1819
|
+
return function(o, i, c) {
|
|
1820
|
+
return this.request(te(c || {}, {
|
|
1821
1821
|
method: t,
|
|
1822
|
-
headers:
|
|
1822
|
+
headers: r ? {
|
|
1823
1823
|
"Content-Type": "multipart/form-data"
|
|
1824
1824
|
} : {},
|
|
1825
|
-
url:
|
|
1826
|
-
data:
|
|
1825
|
+
url: o,
|
|
1826
|
+
data: i
|
|
1827
1827
|
}));
|
|
1828
1828
|
};
|
|
1829
1829
|
}
|
|
1830
|
-
|
|
1830
|
+
ee.prototype[t] = n(), ee.prototype[t + "Form"] = n(!0);
|
|
1831
1831
|
});
|
|
1832
|
-
let
|
|
1832
|
+
let ir = class Ot {
|
|
1833
1833
|
constructor(t) {
|
|
1834
1834
|
if (typeof t != "function")
|
|
1835
1835
|
throw new TypeError("executor must be a function.");
|
|
1836
|
-
let
|
|
1837
|
-
this.promise = new Promise(function(
|
|
1838
|
-
|
|
1836
|
+
let n;
|
|
1837
|
+
this.promise = new Promise(function(o) {
|
|
1838
|
+
n = o;
|
|
1839
1839
|
});
|
|
1840
|
-
const
|
|
1840
|
+
const r = this;
|
|
1841
1841
|
this.promise.then((s) => {
|
|
1842
|
-
if (!
|
|
1843
|
-
let
|
|
1844
|
-
for (;
|
|
1845
|
-
|
|
1846
|
-
|
|
1842
|
+
if (!r._listeners) return;
|
|
1843
|
+
let o = r._listeners.length;
|
|
1844
|
+
for (; o-- > 0; )
|
|
1845
|
+
r._listeners[o](s);
|
|
1846
|
+
r._listeners = null;
|
|
1847
1847
|
}), this.promise.then = (s) => {
|
|
1848
|
-
let
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1848
|
+
let o;
|
|
1849
|
+
const i = new Promise((c) => {
|
|
1850
|
+
r.subscribe(c), o = c;
|
|
1851
1851
|
}).then(s);
|
|
1852
|
-
return
|
|
1853
|
-
|
|
1854
|
-
},
|
|
1855
|
-
}, t(function(
|
|
1856
|
-
|
|
1852
|
+
return i.cancel = function() {
|
|
1853
|
+
r.unsubscribe(o);
|
|
1854
|
+
}, i;
|
|
1855
|
+
}, t(function(o, i, c) {
|
|
1856
|
+
r.reason || (r.reason = new oe(o, i, c), n(r.reason));
|
|
1857
1857
|
});
|
|
1858
1858
|
}
|
|
1859
1859
|
/**
|
|
@@ -1879,14 +1879,14 @@ let on = class At {
|
|
|
1879
1879
|
unsubscribe(t) {
|
|
1880
1880
|
if (!this._listeners)
|
|
1881
1881
|
return;
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1882
|
+
const n = this._listeners.indexOf(t);
|
|
1883
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1884
1884
|
}
|
|
1885
1885
|
toAbortSignal() {
|
|
1886
|
-
const t = new AbortController(),
|
|
1887
|
-
t.abort(
|
|
1886
|
+
const t = new AbortController(), n = (r) => {
|
|
1887
|
+
t.abort(r);
|
|
1888
1888
|
};
|
|
1889
|
-
return this.subscribe(
|
|
1889
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1890
1890
|
}
|
|
1891
1891
|
/**
|
|
1892
1892
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1895,22 +1895,22 @@ let on = class At {
|
|
|
1895
1895
|
static source() {
|
|
1896
1896
|
let t;
|
|
1897
1897
|
return {
|
|
1898
|
-
token: new
|
|
1898
|
+
token: new Ot(function(s) {
|
|
1899
1899
|
t = s;
|
|
1900
1900
|
}),
|
|
1901
1901
|
cancel: t
|
|
1902
1902
|
};
|
|
1903
1903
|
}
|
|
1904
1904
|
};
|
|
1905
|
-
function
|
|
1906
|
-
return function(
|
|
1907
|
-
return e.apply(null,
|
|
1905
|
+
function ar(e) {
|
|
1906
|
+
return function(n) {
|
|
1907
|
+
return e.apply(null, n);
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function cr(e) {
|
|
1911
1911
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1912
1912
|
}
|
|
1913
|
-
const
|
|
1913
|
+
const Fe = {
|
|
1914
1914
|
Continue: 100,
|
|
1915
1915
|
SwitchingProtocols: 101,
|
|
1916
1916
|
Processing: 102,
|
|
@@ -1981,273 +1981,568 @@ const ke = {
|
|
|
1981
1981
|
SslHandshakeFailed: 525,
|
|
1982
1982
|
InvalidSslCertificate: 526
|
|
1983
1983
|
};
|
|
1984
|
-
Object.entries(
|
|
1985
|
-
|
|
1984
|
+
Object.entries(Fe).forEach(([e, t]) => {
|
|
1985
|
+
Fe[t] = e;
|
|
1986
1986
|
});
|
|
1987
|
-
function
|
|
1988
|
-
const t = new
|
|
1989
|
-
return a.extend(
|
|
1990
|
-
return
|
|
1991
|
-
},
|
|
1987
|
+
function Nt(e) {
|
|
1988
|
+
const t = new ee(e), n = st(ee.prototype.request, t);
|
|
1989
|
+
return a.extend(n, ee.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1990
|
+
return Nt(te(e, s));
|
|
1991
|
+
}, n;
|
|
1992
1992
|
}
|
|
1993
|
-
const
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
1993
|
+
const I = Nt(pe);
|
|
1994
|
+
I.Axios = ee;
|
|
1995
|
+
I.CanceledError = oe;
|
|
1996
|
+
I.CancelToken = ir;
|
|
1997
|
+
I.isCancel = wt;
|
|
1998
|
+
I.VERSION = At;
|
|
1999
|
+
I.toFormData = Te;
|
|
2000
|
+
I.AxiosError = S;
|
|
2001
|
+
I.Cancel = I.CanceledError;
|
|
2002
|
+
I.all = function(t) {
|
|
2003
2003
|
return Promise.all(t);
|
|
2004
2004
|
};
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2005
|
+
I.spread = ar;
|
|
2006
|
+
I.isAxiosError = cr;
|
|
2007
|
+
I.mergeConfig = te;
|
|
2008
|
+
I.AxiosHeaders = J;
|
|
2009
|
+
I.formToJSON = (e) => gt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2010
|
+
I.getAdapter = Tt.getAdapter;
|
|
2011
|
+
I.HttpStatusCode = Fe;
|
|
2012
|
+
I.default = I;
|
|
2013
2013
|
const {
|
|
2014
|
-
Axios:
|
|
2015
|
-
AxiosError:
|
|
2016
|
-
CanceledError:
|
|
2017
|
-
isCancel:
|
|
2018
|
-
CancelToken:
|
|
2019
|
-
VERSION:
|
|
2020
|
-
all:
|
|
2021
|
-
Cancel:
|
|
2022
|
-
isAxiosError:
|
|
2023
|
-
spread:
|
|
2024
|
-
toFormData:
|
|
2025
|
-
AxiosHeaders:
|
|
2026
|
-
HttpStatusCode:
|
|
2027
|
-
formToJSON:
|
|
2028
|
-
getAdapter:
|
|
2029
|
-
mergeConfig:
|
|
2030
|
-
} =
|
|
2031
|
-
class
|
|
2014
|
+
Axios: mr,
|
|
2015
|
+
AxiosError: br,
|
|
2016
|
+
CanceledError: yr,
|
|
2017
|
+
isCancel: gr,
|
|
2018
|
+
CancelToken: wr,
|
|
2019
|
+
VERSION: xr,
|
|
2020
|
+
all: Er,
|
|
2021
|
+
Cancel: Sr,
|
|
2022
|
+
isAxiosError: Rr,
|
|
2023
|
+
spread: Tr,
|
|
2024
|
+
toFormData: Ar,
|
|
2025
|
+
AxiosHeaders: Or,
|
|
2026
|
+
HttpStatusCode: Nr,
|
|
2027
|
+
formToJSON: _r,
|
|
2028
|
+
getAdapter: Cr,
|
|
2029
|
+
mergeConfig: jr
|
|
2030
|
+
} = I;
|
|
2031
|
+
class lr {
|
|
2032
2032
|
client;
|
|
2033
|
-
constructor(t) {
|
|
2034
|
-
this.client =
|
|
2035
|
-
baseURL: t || void 0 || "http://localhost:
|
|
2033
|
+
constructor(t, n) {
|
|
2034
|
+
this.client = I.create({
|
|
2035
|
+
baseURL: t || void 0 || "http://localhost:8080",
|
|
2036
2036
|
headers: {
|
|
2037
2037
|
"Content-Type": "application/json"
|
|
2038
2038
|
}
|
|
2039
|
-
});
|
|
2039
|
+
}), n && this.setApiKey(n);
|
|
2040
2040
|
}
|
|
2041
2041
|
setApiKey(t) {
|
|
2042
2042
|
this.client.defaults.headers.common.Authorization = `Bearer ${t}`;
|
|
2043
2043
|
}
|
|
2044
|
+
/**
|
|
2045
|
+
* Fetches a specific quiz by ID
|
|
2046
|
+
* Currently uses GET /core/quiz and filters client-side
|
|
2047
|
+
* TODO: Backend should add GET /core/quiz/:id endpoint for better performance
|
|
2048
|
+
*/
|
|
2044
2049
|
async getQuiz(t) {
|
|
2045
2050
|
try {
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
throw O.isAxiosError(s) ? new Error(`Failed to submit answer: ${s.response?.data?.message || s.message}`) : s;
|
|
2051
|
+
const r = (await this.client.get("/core/quiz")).data, s = Array.isArray(r) ? r.find((o) => o.id === t) : null;
|
|
2052
|
+
if (!s)
|
|
2053
|
+
throw new Error(`Quiz with ID "${t}" not found`);
|
|
2054
|
+
return {
|
|
2055
|
+
id: s.id,
|
|
2056
|
+
name: s.name,
|
|
2057
|
+
renderMode: s.renderMode || "steps",
|
|
2058
|
+
nodes: s.nodes || [],
|
|
2059
|
+
edges: s.edges || []
|
|
2060
|
+
};
|
|
2061
|
+
} catch (n) {
|
|
2062
|
+
throw I.isAxiosError(n) ? n.response?.status === 401 ? new Error("Invalid API key. Please check your authentication credentials.") : new Error(`Failed to fetch quiz: ${n.response?.data?.message || n.message}`) : n;
|
|
2059
2063
|
}
|
|
2060
2064
|
}
|
|
2065
|
+
/**
|
|
2066
|
+
* Creates a quiz session
|
|
2067
|
+
* Note: This is a client-side session for now
|
|
2068
|
+
* TODO: Backend should implement POST /core/quiz/session endpoint
|
|
2069
|
+
*/
|
|
2061
2070
|
async createSession(t) {
|
|
2071
|
+
const n = `session_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, r = {
|
|
2072
|
+
sessionId: n,
|
|
2073
|
+
quizId: t,
|
|
2074
|
+
startedAt: Date.now(),
|
|
2075
|
+
answers: {}
|
|
2076
|
+
};
|
|
2077
|
+
return localStorage.setItem(`quiz_session_${n}`, JSON.stringify(r)), { sessionId: n };
|
|
2078
|
+
}
|
|
2079
|
+
/**
|
|
2080
|
+
* Submits an answer for a question
|
|
2081
|
+
* Note: Currently stores answers in localStorage
|
|
2082
|
+
* TODO: Backend should implement POST /core/quiz/session/:id/answer endpoint
|
|
2083
|
+
*/
|
|
2084
|
+
async submitAnswer(t, n, r) {
|
|
2062
2085
|
try {
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2086
|
+
const s = `quiz_session_${t}`, o = localStorage.getItem(s);
|
|
2087
|
+
if (!o)
|
|
2088
|
+
throw new Error("Session not found");
|
|
2089
|
+
const i = JSON.parse(o);
|
|
2090
|
+
i.answers[n] = r, localStorage.setItem(s, JSON.stringify(i));
|
|
2091
|
+
} catch (s) {
|
|
2092
|
+
console.error("Failed to submit answer:", s);
|
|
2066
2093
|
}
|
|
2067
2094
|
}
|
|
2095
|
+
/**
|
|
2096
|
+
* Completes a quiz session
|
|
2097
|
+
* Note: Currently just marks session as completed in localStorage
|
|
2098
|
+
* TODO: Backend should implement POST /core/quiz/session/:id/complete endpoint
|
|
2099
|
+
*/
|
|
2068
2100
|
async completeSession(t) {
|
|
2069
2101
|
try {
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2102
|
+
const n = `quiz_session_${t}`, r = localStorage.getItem(n);
|
|
2103
|
+
if (!r)
|
|
2104
|
+
throw new Error("Session not found");
|
|
2105
|
+
const s = JSON.parse(r);
|
|
2106
|
+
s.completedAt = Date.now(), s.status = "completed", localStorage.setItem(n, JSON.stringify(s));
|
|
2107
|
+
} catch (n) {
|
|
2108
|
+
console.error("Failed to complete session:", n);
|
|
2073
2109
|
}
|
|
2074
2110
|
}
|
|
2075
2111
|
}
|
|
2076
|
-
const
|
|
2077
|
-
const [s,
|
|
2078
|
-
|
|
2079
|
-
|
|
2112
|
+
const ur = ({ nodes: e, onAnswer: t, onProgress: n, onComplete: r }) => {
|
|
2113
|
+
const [s, o] = V(0), [i, c] = V({}), [p, d] = V({});
|
|
2114
|
+
le(() => {
|
|
2115
|
+
n({
|
|
2080
2116
|
currentStep: s + 1,
|
|
2081
2117
|
totalSteps: e.length,
|
|
2082
2118
|
percentage: (s + 1) / e.length * 100
|
|
2083
|
-
});
|
|
2084
|
-
}, [s, e.length,
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
};
|
|
2090
|
-
c(T), t({
|
|
2091
|
-
questionId: E.id,
|
|
2092
|
-
answer: h,
|
|
2119
|
+
}), d({});
|
|
2120
|
+
}, [s, e.length, n]);
|
|
2121
|
+
const u = (R, A, T = !0) => {
|
|
2122
|
+
c((_) => ({ ..._, [A]: R })), t({
|
|
2123
|
+
questionId: A,
|
|
2124
|
+
answer: R,
|
|
2093
2125
|
timestamp: Date.now()
|
|
2094
|
-
}),
|
|
2126
|
+
}), T && C();
|
|
2127
|
+
}, m = (R, A) => {
|
|
2128
|
+
d((T) => ({ ...T, [A]: R }));
|
|
2129
|
+
}, E = (R) => {
|
|
2130
|
+
(R.data.children || []).forEach((T) => {
|
|
2131
|
+
const _ = p[T.id];
|
|
2132
|
+
_ !== void 0 && t({
|
|
2133
|
+
questionId: T.id,
|
|
2134
|
+
answer: _,
|
|
2135
|
+
timestamp: Date.now()
|
|
2136
|
+
});
|
|
2137
|
+
}), c((T) => ({ ...T, ...p })), C();
|
|
2138
|
+
}, C = () => {
|
|
2139
|
+
s < e.length - 1 ? o(s + 1) : r();
|
|
2095
2140
|
}, f = () => {
|
|
2096
|
-
s > 0 &&
|
|
2141
|
+
s > 0 && o(s - 1);
|
|
2142
|
+
}, g = (R, A = !1) => {
|
|
2143
|
+
const T = R.data?.type || R.type, _ = R.id;
|
|
2144
|
+
return /* @__PURE__ */ w.jsxs("div", { className: `mb-6 ${A ? "pl-4 border-l-2 border-gray-100" : ""}`, children: [
|
|
2145
|
+
/* @__PURE__ */ w.jsxs("div", { className: "mb-4", children: [
|
|
2146
|
+
/* @__PURE__ */ w.jsx("h3", { className: "text-xl font-semibold text-gray-800 mb-2 leading-tight", children: R.data.label }),
|
|
2147
|
+
R.data.content && /* @__PURE__ */ w.jsx("p", { className: "text-gray-500 mb-6 leading-relaxed", children: R.data.content })
|
|
2148
|
+
] }),
|
|
2149
|
+
/* @__PURE__ */ w.jsxs("div", { className: "flex flex-col gap-3 mb-6", children: [
|
|
2150
|
+
(T === "multiple-choice" || T === "multipleChoice") && /* @__PURE__ */ w.jsx("div", { className: "grid grid-cols-1 gap-3", children: R.data.options?.map((N, F) => /* @__PURE__ */ w.jsx(
|
|
2151
|
+
"button",
|
|
2152
|
+
{
|
|
2153
|
+
className: `p-4 bg-gray-50 border-2 border-gray-200 rounded-lg text-left text-gray-800 cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-indigo-500 hover:-translate-y-0.5 hover:shadow-md ${A && p[_] === (N.value || N) ? "border-indigo-500 bg-indigo-50" : ""}`,
|
|
2154
|
+
onClick: () => A ? m(N.value || N, _) : u(N.value || N, _),
|
|
2155
|
+
children: N.label || N
|
|
2156
|
+
},
|
|
2157
|
+
F
|
|
2158
|
+
)) }),
|
|
2159
|
+
(T === "input-text" || T === "input-email" || T === "input-phone" || T === "text") && /* @__PURE__ */ w.jsxs("div", { className: "flex flex-col md:flex-row gap-3", children: [
|
|
2160
|
+
/* @__PURE__ */ w.jsx(
|
|
2161
|
+
"input",
|
|
2162
|
+
{
|
|
2163
|
+
className: "flex-1 p-4 border-2 border-gray-200 rounded-lg text-base transition-colors duration-200 focus:outline-none focus:border-indigo-500",
|
|
2164
|
+
type: T === "input-email" ? "email" : "text",
|
|
2165
|
+
placeholder: R.data.placeholder || "Type your answer...",
|
|
2166
|
+
value: A ? p[_] || "" : void 0,
|
|
2167
|
+
onChange: (N) => A && m(N.target.value, _),
|
|
2168
|
+
onKeyPress: (N) => {
|
|
2169
|
+
!A && N.key === "Enter" && u(N.target.value, _);
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
),
|
|
2173
|
+
!A && /* @__PURE__ */ w.jsx(
|
|
2174
|
+
"button",
|
|
2175
|
+
{
|
|
2176
|
+
className: "px-8 py-4 bg-gradient-to-r from-indigo-500 to-purple-600 text-white border-none rounded-lg text-base font-semibold cursor-pointer transition-transform duration-200 hover:-translate-y-0.5 hover:shadow-lg",
|
|
2177
|
+
onClick: (N) => {
|
|
2178
|
+
const F = N.currentTarget.previousElementSibling;
|
|
2179
|
+
u(F.value, _);
|
|
2180
|
+
},
|
|
2181
|
+
children: "Submit"
|
|
2182
|
+
}
|
|
2183
|
+
)
|
|
2184
|
+
] })
|
|
2185
|
+
] })
|
|
2186
|
+
] }, _);
|
|
2097
2187
|
};
|
|
2098
2188
|
if (e.length === 0)
|
|
2099
|
-
return /* @__PURE__ */
|
|
2100
|
-
const
|
|
2101
|
-
return /* @__PURE__ */
|
|
2102
|
-
/* @__PURE__ */
|
|
2189
|
+
return /* @__PURE__ */ w.jsx("div", { className: "text-center py-16 px-4 text-gray-500 text-lg", children: "No questions available" });
|
|
2190
|
+
const h = e[s], j = h.type;
|
|
2191
|
+
return /* @__PURE__ */ w.jsxs("div", { className: "max-w-[800px] mx-auto p-5 font-sans md:p-3", children: [
|
|
2192
|
+
/* @__PURE__ */ w.jsx("div", { className: "w-full h-2 bg-gray-200 rounded-full overflow-hidden mb-8", children: /* @__PURE__ */ w.jsx(
|
|
2103
2193
|
"div",
|
|
2104
2194
|
{
|
|
2105
|
-
className: "
|
|
2195
|
+
className: "h-full bg-gradient-to-r from-indigo-500 to-purple-600 transition-[width] duration-300 ease-out",
|
|
2106
2196
|
style: { width: `${(s + 1) / e.length * 100}%` }
|
|
2107
2197
|
}
|
|
2108
2198
|
) }),
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
/* @__PURE__ */
|
|
2111
|
-
"
|
|
2199
|
+
/* @__PURE__ */ w.jsxs("div", { className: "bg-white rounded-xl p-10 shadow-md md:p-6", children: [
|
|
2200
|
+
/* @__PURE__ */ w.jsx("div", { className: "mb-5", children: /* @__PURE__ */ w.jsxs("span", { className: "text-sm text-indigo-500 font-semibold uppercase tracking-wide", children: [
|
|
2201
|
+
"Step ",
|
|
2112
2202
|
s + 1,
|
|
2113
2203
|
" of ",
|
|
2114
2204
|
e.length
|
|
2115
2205
|
] }) }),
|
|
2116
|
-
/* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
/* @__PURE__ */ g.jsxs("div", { className: "quiz-steps-options", children: [
|
|
2121
|
-
u.type === "multipleChoice" && u.data.options?.map((h, E) => /* @__PURE__ */ g.jsx(
|
|
2206
|
+
j === "group" ? /* @__PURE__ */ w.jsxs("div", { className: "quiz-steps-group", children: [
|
|
2207
|
+
/* @__PURE__ */ w.jsx("h2", { className: "text-2xl text-gray-800 mb-3 leading-tight font-semibold", children: h.data.label }),
|
|
2208
|
+
/* @__PURE__ */ w.jsx("div", { className: "mt-6 space-y-4", children: h.data.children?.map((R) => g(R, !0)) }),
|
|
2209
|
+
/* @__PURE__ */ w.jsx("div", { className: "mt-8 flex justify-end", children: /* @__PURE__ */ w.jsx(
|
|
2122
2210
|
"button",
|
|
2123
2211
|
{
|
|
2124
|
-
className: "
|
|
2125
|
-
onClick: () =>
|
|
2126
|
-
children:
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2212
|
+
className: "px-8 py-3 bg-gradient-to-r from-indigo-500 to-purple-600 text-white rounded-lg font-semibold hover:opacity-90 transition-opacity",
|
|
2213
|
+
onClick: () => E(h),
|
|
2214
|
+
children: "Continue"
|
|
2215
|
+
}
|
|
2216
|
+
) })
|
|
2217
|
+
] }) : (
|
|
2218
|
+
// Render single node
|
|
2219
|
+
g(h)
|
|
2220
|
+
),
|
|
2221
|
+
/* @__PURE__ */ w.jsx("div", { className: "flex justify-start mt-6", children: s > 0 && /* @__PURE__ */ w.jsx(
|
|
2222
|
+
"button",
|
|
2223
|
+
{
|
|
2224
|
+
className: "px-6 py-3 bg-transparent text-indigo-500 border-2 border-indigo-500 rounded-lg text-sm font-semibold cursor-pointer transition-all duration-200 hover:bg-indigo-500 hover:text-white",
|
|
2225
|
+
onClick: f,
|
|
2226
|
+
children: "Previous"
|
|
2227
|
+
}
|
|
2228
|
+
) })
|
|
2229
|
+
] })
|
|
2230
|
+
] });
|
|
2231
|
+
}, dr = ({ nodes: e, edges: t, onAnswer: n, onComplete: r, theme: s }) => {
|
|
2232
|
+
const [o, i] = V([]), [c, p] = V(null), [d, u] = V([]), [m, E] = V(null), [C, f] = V(!1), g = be(null), h = be(!1), j = be(r);
|
|
2233
|
+
le(() => {
|
|
2234
|
+
j.current = r;
|
|
2235
|
+
}, [r]);
|
|
2236
|
+
const R = () => {
|
|
2237
|
+
g.current && (g.current.scrollTop = g.current.scrollHeight);
|
|
2238
|
+
};
|
|
2239
|
+
le(() => {
|
|
2240
|
+
R();
|
|
2241
|
+
}, [o, C, m]), le(() => {
|
|
2242
|
+
if (h.current || e.length === 0) return;
|
|
2243
|
+
const b = new Set(t.map((O) => O.target)), y = e.find((O) => !b.has(O.id)) || e[0];
|
|
2244
|
+
y && (h.current = !0, A(y.id));
|
|
2245
|
+
}, [e, t]);
|
|
2246
|
+
const A = (b) => {
|
|
2247
|
+
const y = e.find((O) => O.id === b);
|
|
2248
|
+
if (!y) {
|
|
2249
|
+
console.error(`Node ${b} not found`);
|
|
2250
|
+
return;
|
|
2251
|
+
}
|
|
2252
|
+
if (y.type === "group") {
|
|
2253
|
+
const O = y.data?.children || y.data || [], v = Array.isArray(O) ? O : Array.isArray(y.data) ? y.data : [];
|
|
2254
|
+
if (v.length > 0) {
|
|
2255
|
+
const q = [...d, {
|
|
2256
|
+
groupId: y.id,
|
|
2257
|
+
children: v,
|
|
2258
|
+
currentIndex: 0
|
|
2259
|
+
}];
|
|
2260
|
+
u(q), T(v[0]);
|
|
2261
|
+
} else
|
|
2262
|
+
F(y.id);
|
|
2263
|
+
} else
|
|
2264
|
+
p(y.id), _(y);
|
|
2265
|
+
}, T = (b) => {
|
|
2266
|
+
_(b);
|
|
2267
|
+
}, _ = (b) => {
|
|
2268
|
+
E(b), f(!0);
|
|
2269
|
+
const y = W(b), O = Math.min(1e3, 500 + (y.content?.length || 0) * 20);
|
|
2270
|
+
setTimeout(() => {
|
|
2271
|
+
f(!1);
|
|
2272
|
+
const v = y.content || y.label;
|
|
2273
|
+
v && U("bot", v), B(b) && setTimeout(() => {
|
|
2274
|
+
N(null, b);
|
|
2275
|
+
}, 1500);
|
|
2276
|
+
}, O);
|
|
2277
|
+
}, N = (b, y, O) => {
|
|
2278
|
+
const v = y.id || c || "unknown";
|
|
2279
|
+
if (b !== null && n({
|
|
2280
|
+
questionId: v,
|
|
2281
|
+
answer: b,
|
|
2282
|
+
timestamp: Date.now()
|
|
2283
|
+
}), d.length > 0) {
|
|
2284
|
+
const q = d[d.length - 1];
|
|
2285
|
+
if (q.currentIndex < q.children.length - 1) {
|
|
2286
|
+
const X = q.currentIndex + 1, l = { ...q, currentIndex: X };
|
|
2287
|
+
u([...d.slice(0, -1), l]), T(q.children[X]);
|
|
2288
|
+
} else {
|
|
2289
|
+
const X = q.groupId;
|
|
2290
|
+
u(d.slice(0, -1)), F(X, O);
|
|
2291
|
+
}
|
|
2292
|
+
} else {
|
|
2293
|
+
const q = y.id;
|
|
2294
|
+
F(q, O);
|
|
2295
|
+
}
|
|
2296
|
+
}, F = (b, y) => {
|
|
2297
|
+
const O = t.find(
|
|
2298
|
+
(v) => v.source === b && (!y || v.sourceHandle === y)
|
|
2299
|
+
);
|
|
2300
|
+
O ? A(O.target) : K();
|
|
2301
|
+
}, K = async () => {
|
|
2302
|
+
f(!0), E(null), setTimeout(() => {
|
|
2303
|
+
f(!1), U("bot", "Obrigado! Suas respostas foram enviadas com sucesso."), setTimeout(() => {
|
|
2304
|
+
j.current && j.current();
|
|
2305
|
+
}, 2e3);
|
|
2306
|
+
}, 1e3);
|
|
2307
|
+
}, z = (b, y, O) => {
|
|
2308
|
+
if (!m) return;
|
|
2309
|
+
U("user", y || b);
|
|
2310
|
+
const v = m;
|
|
2311
|
+
E(null), N(b, v, O);
|
|
2312
|
+
}, W = (b) => {
|
|
2313
|
+
const y = b.data || b;
|
|
2314
|
+
return {
|
|
2315
|
+
id: b.id,
|
|
2316
|
+
label: y.label || b.label,
|
|
2317
|
+
content: y.content || b.content,
|
|
2318
|
+
type: y.type || b.type,
|
|
2319
|
+
placeholder: y.placeholder || b.placeholder,
|
|
2320
|
+
options: y.options || b.options
|
|
2321
|
+
};
|
|
2322
|
+
}, B = (b) => {
|
|
2323
|
+
const y = W(b), O = (y.type || "").toLowerCase();
|
|
2324
|
+
return O === "text" || O === "base" || O === "description" || O === "base" && !y.type || O === "message";
|
|
2325
|
+
}, U = (b, y) => {
|
|
2326
|
+
i((O) => [...O, {
|
|
2327
|
+
id: Date.now().toString(),
|
|
2328
|
+
type: b,
|
|
2329
|
+
content: y,
|
|
2330
|
+
timestamp: Date.now()
|
|
2331
|
+
}]);
|
|
2332
|
+
}, L = m ? W(m) : null, P = L?.type;
|
|
2333
|
+
return /* @__PURE__ */ w.jsxs(
|
|
2334
|
+
"div",
|
|
2335
|
+
{
|
|
2336
|
+
className: "flex flex-col h-full rounded-xl overflow-hidden font-[Inter,sans-serif] relative",
|
|
2337
|
+
style: { backgroundColor: s?.backgroundColor || "#f5f7fa" },
|
|
2338
|
+
children: [
|
|
2339
|
+
/* @__PURE__ */ w.jsxs("div", { ref: g, className: "flex-1 overflow-y-auto p-5 flex flex-col gap-4", children: [
|
|
2340
|
+
o.map((b) => /* @__PURE__ */ w.jsxs("div", { className: `flex flex-col max-w-[80%] animate-[fadeIn_0.3s_ease] ${b.type === "bot" ? "self-start" : "self-end items-end"}`, children: [
|
|
2341
|
+
/* @__PURE__ */ w.jsx(
|
|
2342
|
+
"div",
|
|
2343
|
+
{
|
|
2344
|
+
className: `p-3 px-4 rounded-2xl text-[15px] leading-relaxed shadow-sm ${b.type === "bot" ? "bg-white text-[#1a1a1a] rounded-tl-sm" : "text-white rounded-tr-sm"}`,
|
|
2345
|
+
style: b.type === "user" ? { backgroundColor: s?.primaryColor || "#007aff" } : {},
|
|
2346
|
+
children: b.content
|
|
2138
2347
|
}
|
|
2348
|
+
),
|
|
2349
|
+
/* @__PURE__ */ w.jsx("span", { className: `text-[11px] text-[#999] mt-1 ${b.type === "bot" ? "ml-1" : "mr-1"}`, children: new Date(b.timestamp).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) })
|
|
2350
|
+
] }, b.id)),
|
|
2351
|
+
C && /* @__PURE__ */ w.jsx("div", { className: "flex flex-col max-w-[80%] animate-[fadeIn_0.3s_ease] self-start", children: /* @__PURE__ */ w.jsxs("div", { className: "flex gap-1 p-3 px-4 bg-white rounded-2xl rounded-tl-sm w-fit", children: [
|
|
2352
|
+
/* @__PURE__ */ w.jsx("span", { className: "w-1.5 h-1.5 bg-[#ccc] rounded-full animate-bounce animate-bounce-delay-1" }),
|
|
2353
|
+
/* @__PURE__ */ w.jsx("span", { className: "w-1.5 h-1.5 bg-[#ccc] rounded-full animate-bounce animate-bounce-delay-2" }),
|
|
2354
|
+
/* @__PURE__ */ w.jsx("span", { className: "w-1.5 h-1.5 bg-[#ccc] rounded-full animate-bounce" })
|
|
2355
|
+
] }) })
|
|
2356
|
+
] }),
|
|
2357
|
+
!C && m && !B(m) && /* @__PURE__ */ w.jsxs("div", { className: "p-4 bg-white border-t border-[#eee]", children: [
|
|
2358
|
+
(P === "multiple-choice" || P === "multipleChoice") && /* @__PURE__ */ w.jsx("div", { className: "flex flex-wrap gap-2 justify-center", children: L?.options?.map((b) => /* @__PURE__ */ w.jsx(
|
|
2359
|
+
"button",
|
|
2360
|
+
{
|
|
2361
|
+
onClick: () => z(b.value || b.label, b.label, b.id),
|
|
2362
|
+
className: "px-5 py-2.5 bg-white border rounded-full cursor-pointer font-medium transition-all duration-200 hover:text-white",
|
|
2363
|
+
style: {
|
|
2364
|
+
borderColor: s?.primaryColor || "#007aff",
|
|
2365
|
+
color: s?.primaryColor || "#007aff"
|
|
2366
|
+
// Dynamic hover is tricky in inline styles, usually would use CSS var or state,
|
|
2367
|
+
// but for simplicity we can use standard styles or accept that hover might need more complex handling.
|
|
2368
|
+
// For now, let's keep it simple or use a class that uses a CSS variable if possible.
|
|
2369
|
+
// Alternatively, we can skip hover color change for custom themes or implement it with onMouseEnter/Leave if critical.
|
|
2370
|
+
// Let's stick to base style first.
|
|
2371
|
+
},
|
|
2372
|
+
onMouseEnter: (y) => {
|
|
2373
|
+
y.currentTarget.style.backgroundColor = s?.primaryColor || "#007aff", y.currentTarget.style.color = "white";
|
|
2374
|
+
},
|
|
2375
|
+
onMouseLeave: (y) => {
|
|
2376
|
+
y.currentTarget.style.backgroundColor = "white", y.currentTarget.style.color = s?.primaryColor || "#007aff";
|
|
2377
|
+
},
|
|
2378
|
+
children: b.label || b.value || b
|
|
2379
|
+
},
|
|
2380
|
+
b.id || b.label
|
|
2381
|
+
)) }),
|
|
2382
|
+
(P === "input-text" || P === "input-email" || P === "input-phone" || P === "text-input" || P === "text") && /* @__PURE__ */ w.jsx("div", { className: "w-full", children: /* @__PURE__ */ w.jsxs(
|
|
2383
|
+
"form",
|
|
2384
|
+
{
|
|
2385
|
+
className: "flex gap-2.5",
|
|
2386
|
+
onSubmit: (b) => {
|
|
2387
|
+
b.preventDefault();
|
|
2388
|
+
const y = b.currentTarget.elements[0];
|
|
2389
|
+
y.value.trim() && (z(y.value), y.value = "");
|
|
2390
|
+
},
|
|
2391
|
+
children: [
|
|
2392
|
+
/* @__PURE__ */ w.jsx(
|
|
2393
|
+
"input",
|
|
2394
|
+
{
|
|
2395
|
+
type: P === "input-email" ? "email" : "text",
|
|
2396
|
+
placeholder: L?.placeholder || "Type your answer...",
|
|
2397
|
+
autoFocus: !0,
|
|
2398
|
+
className: "flex-1 p-3 border border-[#ddd] rounded-3xl outline-none text-[15px] focus:border-[var(--primary-color)]",
|
|
2399
|
+
style: { "--primary-color": s?.primaryColor || "#007aff" }
|
|
2400
|
+
}
|
|
2401
|
+
),
|
|
2402
|
+
/* @__PURE__ */ w.jsx(
|
|
2403
|
+
"button",
|
|
2404
|
+
{
|
|
2405
|
+
type: "submit",
|
|
2406
|
+
className: "px-6 text-white border-none rounded-3xl font-semibold cursor-pointer",
|
|
2407
|
+
style: { backgroundColor: s?.primaryColor || "#007aff" },
|
|
2408
|
+
children: "Enviar"
|
|
2409
|
+
}
|
|
2410
|
+
)
|
|
2411
|
+
]
|
|
2139
2412
|
}
|
|
2140
|
-
)
|
|
2141
|
-
/* @__PURE__ */ g.jsx("button", { onClick: (h) => {
|
|
2142
|
-
const E = h.currentTarget.previousElementSibling;
|
|
2143
|
-
p(E.value);
|
|
2144
|
-
}, children: "Submit" })
|
|
2413
|
+
) })
|
|
2145
2414
|
] })
|
|
2146
|
-
]
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
}, Pn = ({
|
|
2415
|
+
]
|
|
2416
|
+
}
|
|
2417
|
+
);
|
|
2418
|
+
}, vr = ({
|
|
2151
2419
|
quizId: e,
|
|
2152
2420
|
apiKey: t,
|
|
2153
|
-
mode:
|
|
2154
|
-
baseUrl:
|
|
2421
|
+
mode: n = "steps",
|
|
2422
|
+
baseUrl: r,
|
|
2155
2423
|
onStart: s,
|
|
2156
|
-
onAnswer:
|
|
2157
|
-
onProgress:
|
|
2424
|
+
onAnswer: o,
|
|
2425
|
+
onProgress: i,
|
|
2158
2426
|
onComplete: c,
|
|
2159
2427
|
onError: p,
|
|
2160
|
-
className:
|
|
2161
|
-
style: u
|
|
2428
|
+
className: d,
|
|
2429
|
+
style: u,
|
|
2430
|
+
theme: m
|
|
2162
2431
|
}) => {
|
|
2163
|
-
const [
|
|
2164
|
-
|
|
2165
|
-
|
|
2432
|
+
const [E, C] = V(null), [f, g] = V(!0), [h, j] = V(null), [R, A] = V(null), [T, _] = V({}), N = be(null);
|
|
2433
|
+
le(() => {
|
|
2434
|
+
N.current = new lr(r, t), (async () => {
|
|
2166
2435
|
try {
|
|
2167
|
-
|
|
2168
|
-
const
|
|
2169
|
-
|
|
2170
|
-
const
|
|
2171
|
-
if (
|
|
2172
|
-
const
|
|
2436
|
+
g(!0), j(null);
|
|
2437
|
+
const U = await N.current.getQuiz(e);
|
|
2438
|
+
C(U);
|
|
2439
|
+
const L = await N.current.createSession(e);
|
|
2440
|
+
if (A(L.sessionId), s) {
|
|
2441
|
+
const P = {
|
|
2173
2442
|
quizId: e,
|
|
2174
2443
|
timestamp: Date.now()
|
|
2175
2444
|
};
|
|
2176
|
-
s(
|
|
2445
|
+
s(P);
|
|
2177
2446
|
}
|
|
2178
|
-
|
|
2179
|
-
} catch (
|
|
2180
|
-
const
|
|
2181
|
-
if (
|
|
2182
|
-
const
|
|
2183
|
-
error:
|
|
2184
|
-
message:
|
|
2447
|
+
g(!1);
|
|
2448
|
+
} catch (U) {
|
|
2449
|
+
const L = U instanceof Error ? U.message : "Failed to load quiz";
|
|
2450
|
+
if (j(L), g(!1), p) {
|
|
2451
|
+
const P = {
|
|
2452
|
+
error: U instanceof Error ? U : new Error(L),
|
|
2453
|
+
message: L,
|
|
2185
2454
|
timestamp: Date.now()
|
|
2186
2455
|
};
|
|
2187
|
-
p(
|
|
2456
|
+
p(P);
|
|
2188
2457
|
}
|
|
2189
2458
|
}
|
|
2190
2459
|
})();
|
|
2191
|
-
}, [e, t,
|
|
2192
|
-
const
|
|
2193
|
-
const
|
|
2194
|
-
...
|
|
2195
|
-
[
|
|
2460
|
+
}, [e, t, r, s, p]);
|
|
2461
|
+
const F = async (B) => {
|
|
2462
|
+
const U = {
|
|
2463
|
+
...T,
|
|
2464
|
+
[B.questionId]: B.answer
|
|
2196
2465
|
};
|
|
2197
|
-
if (
|
|
2466
|
+
if (_(U), o && o(B), R && N.current)
|
|
2198
2467
|
try {
|
|
2199
|
-
await
|
|
2200
|
-
} catch (
|
|
2201
|
-
console.error("Failed to submit answer:",
|
|
2468
|
+
await N.current.submitAnswer(R, B.questionId, B.answer);
|
|
2469
|
+
} catch (L) {
|
|
2470
|
+
console.error("Failed to submit answer:", L);
|
|
2202
2471
|
}
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
if (R && _.current)
|
|
2472
|
+
}, K = (B) => {
|
|
2473
|
+
i && i(B);
|
|
2474
|
+
}, z = async () => {
|
|
2475
|
+
if (R && N.current)
|
|
2208
2476
|
try {
|
|
2209
|
-
await
|
|
2210
|
-
} catch (
|
|
2211
|
-
console.error("Failed to complete session:",
|
|
2477
|
+
await N.current.completeSession(R);
|
|
2478
|
+
} catch (B) {
|
|
2479
|
+
console.error("Failed to complete session:", B);
|
|
2212
2480
|
}
|
|
2213
2481
|
if (c) {
|
|
2214
|
-
const
|
|
2482
|
+
const B = (P, b) => {
|
|
2483
|
+
for (const y of P) {
|
|
2484
|
+
const O = y.data || y;
|
|
2485
|
+
if (y.id === b)
|
|
2486
|
+
return O.label || O.content || "Unknown Question";
|
|
2487
|
+
const v = O.children || (Array.isArray(O) ? O : []);
|
|
2488
|
+
if (v.length > 0) {
|
|
2489
|
+
const q = B(v, b);
|
|
2490
|
+
if (q !== "Unknown Question") return q;
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
return "Unknown Question";
|
|
2494
|
+
}, U = Object.entries(T).map(([P, b]) => ({
|
|
2495
|
+
question: B(E?.nodes || [], P),
|
|
2496
|
+
answer: b
|
|
2497
|
+
})), L = {
|
|
2215
2498
|
quizId: e,
|
|
2216
|
-
answers:
|
|
2499
|
+
answers: T,
|
|
2500
|
+
result: U,
|
|
2217
2501
|
timestamp: Date.now(),
|
|
2218
2502
|
sessionId: R || void 0
|
|
2219
2503
|
};
|
|
2220
|
-
c(
|
|
2504
|
+
c(L);
|
|
2221
2505
|
}
|
|
2222
2506
|
};
|
|
2223
|
-
if (
|
|
2224
|
-
return /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2507
|
+
if (f)
|
|
2508
|
+
return /* @__PURE__ */ w.jsxs("div", { className: `flex flex-col items-center justify-center py-16 px-5 text-center ${d || ""}`, style: u, children: [
|
|
2509
|
+
/* @__PURE__ */ w.jsx("div", { className: "w-12 h-12 border-4 border-gray-200 border-t-indigo-500 rounded-full animate-spin mb-5" }),
|
|
2510
|
+
/* @__PURE__ */ w.jsx("p", { className: "text-gray-500", children: "Loading quiz..." })
|
|
2227
2511
|
] });
|
|
2228
|
-
if (
|
|
2229
|
-
return /* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */
|
|
2231
|
-
/* @__PURE__ */
|
|
2232
|
-
/* @__PURE__ */
|
|
2512
|
+
if (h)
|
|
2513
|
+
return /* @__PURE__ */ w.jsxs("div", { className: `flex flex-col items-center justify-center py-16 px-5 text-center ${d || ""}`, style: u, children: [
|
|
2514
|
+
/* @__PURE__ */ w.jsx("div", { className: "text-5xl mb-4", children: "⚠️" }),
|
|
2515
|
+
/* @__PURE__ */ w.jsx("h3", { className: "text-red-600 text-2xl mb-3", children: "Failed to Load Quiz" }),
|
|
2516
|
+
/* @__PURE__ */ w.jsx("p", { className: "text-gray-500 mx-auto max-w-[500px]", children: h })
|
|
2233
2517
|
] });
|
|
2234
|
-
if (!
|
|
2518
|
+
if (!E)
|
|
2235
2519
|
return null;
|
|
2236
|
-
const
|
|
2237
|
-
return /* @__PURE__ */
|
|
2238
|
-
|
|
2239
|
-
|
|
2520
|
+
const W = n || E.renderMode || "steps";
|
|
2521
|
+
return /* @__PURE__ */ w.jsxs("div", { className: `w-full min-h-[400px] ${d || ""}`, style: u, children: [
|
|
2522
|
+
W === "steps" && /* @__PURE__ */ w.jsx(
|
|
2523
|
+
ur,
|
|
2524
|
+
{
|
|
2525
|
+
nodes: E.nodes,
|
|
2526
|
+
onAnswer: F,
|
|
2527
|
+
onProgress: K,
|
|
2528
|
+
onComplete: z
|
|
2529
|
+
}
|
|
2530
|
+
),
|
|
2531
|
+
W === "chat" && /* @__PURE__ */ w.jsx(
|
|
2532
|
+
dr,
|
|
2240
2533
|
{
|
|
2241
|
-
nodes:
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2534
|
+
nodes: E.nodes,
|
|
2535
|
+
edges: E.edges,
|
|
2536
|
+
onAnswer: F,
|
|
2537
|
+
onProgress: K,
|
|
2538
|
+
onComplete: z,
|
|
2539
|
+
theme: m
|
|
2245
2540
|
}
|
|
2246
2541
|
),
|
|
2247
|
-
|
|
2248
|
-
|
|
2542
|
+
W === "single" && /* @__PURE__ */ w.jsx("div", { className: "p-10 text-center text-gray-500", children: /* @__PURE__ */ w.jsx("p", { children: "Single mode not yet implemented" }) }),
|
|
2543
|
+
W === "flow" && /* @__PURE__ */ w.jsx("div", { className: "p-10 text-center text-gray-500", children: /* @__PURE__ */ w.jsx("p", { children: "Flow mode not yet implemented" }) })
|
|
2249
2544
|
] });
|
|
2250
2545
|
};
|
|
2251
2546
|
export {
|
|
2252
|
-
|
|
2547
|
+
vr as Quiz
|
|
2253
2548
|
};
|