@yuku123/z-project-frontend-component 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/z-project-frontend-component.es.js +3419 -0
- package/dist/z-project-frontend-component.umd.js +51 -0
- package/package.json +44 -0
- package/src/index.js +4 -0
- package/src/pages/ProjectApp.jsx +18 -0
- package/src/pages/ProjectCreate.jsx +197 -0
- package/src/pages/ProjectDetail.jsx +208 -0
- package/src/pages/ProjectList.jsx +122 -0
- package/src/services/api.js +76 -0
- package/src/utils/request.js +5 -0
|
@@ -0,0 +1,3419 @@
|
|
|
1
|
+
import dt, { useState as H, useEffect as ke, useRef as Nr } from "react";
|
|
2
|
+
import { useNavigate as pt, useSearchParams as vr, useParams as kr, Routes as Dr, Route as Be, Navigate as Ir } from "react-router-dom";
|
|
3
|
+
import { Layout as Qt, Alert as ht, Space as J, Button as W, Typography as G, Select as Je, Input as ne, Card as Re, Tabs as Lr, Table as Zt, message as K, Tag as he, Popconfirm as er, Form as pe, Radio as et, Spin as at, Statistic as tt, Empty as Ur } from "antd";
|
|
4
|
+
import { BugOutlined as Fr, ReloadOutlined as tr, FileTextOutlined as At, CheckCircleOutlined as mt, PlusOutlined as Br, ApiOutlined as yt, SaveOutlined as qr, ArrowLeftOutlined as rr, SendOutlined as zr, RobotOutlined as $r, UserOutlined as Hr } from "@ant-design/icons";
|
|
5
|
+
import "@ant-design/pro-components";
|
|
6
|
+
var qe = { exports: {} }, Ce = {};
|
|
7
|
+
/**
|
|
8
|
+
* @license React
|
|
9
|
+
* react-jsx-runtime.production.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
var jt;
|
|
17
|
+
function Mr() {
|
|
18
|
+
if (jt) return Ce;
|
|
19
|
+
jt = 1;
|
|
20
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
21
|
+
function r(n, s, o) {
|
|
22
|
+
var a = null;
|
|
23
|
+
if (o !== void 0 && (a = "" + o), s.key !== void 0 && (a = "" + s.key), "key" in s) {
|
|
24
|
+
o = {};
|
|
25
|
+
for (var c in s)
|
|
26
|
+
c !== "key" && (o[c] = s[c]);
|
|
27
|
+
} else o = s;
|
|
28
|
+
return s = o.ref, {
|
|
29
|
+
$$typeof: e,
|
|
30
|
+
type: n,
|
|
31
|
+
key: a,
|
|
32
|
+
ref: s !== void 0 ? s : null,
|
|
33
|
+
props: o
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return Ce.Fragment = t, Ce.jsx = r, Ce.jsxs = r, Ce;
|
|
37
|
+
}
|
|
38
|
+
var Pe = {};
|
|
39
|
+
/**
|
|
40
|
+
* @license React
|
|
41
|
+
* react-jsx-runtime.development.js
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/
|
|
48
|
+
var Ct;
|
|
49
|
+
function Vr() {
|
|
50
|
+
return Ct || (Ct = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
51
|
+
function e(i) {
|
|
52
|
+
if (i == null) return null;
|
|
53
|
+
if (typeof i == "function")
|
|
54
|
+
return i.$$typeof === X ? null : i.displayName || i.name || null;
|
|
55
|
+
if (typeof i == "string") return i;
|
|
56
|
+
switch (i) {
|
|
57
|
+
case b:
|
|
58
|
+
return "Fragment";
|
|
59
|
+
case S:
|
|
60
|
+
return "Profiler";
|
|
61
|
+
case h:
|
|
62
|
+
return "StrictMode";
|
|
63
|
+
case v:
|
|
64
|
+
return "Suspense";
|
|
65
|
+
case k:
|
|
66
|
+
return "SuspenseList";
|
|
67
|
+
case Y:
|
|
68
|
+
return "Activity";
|
|
69
|
+
}
|
|
70
|
+
if (typeof i == "object")
|
|
71
|
+
switch (typeof i.tag == "number" && console.error(
|
|
72
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
73
|
+
), i.$$typeof) {
|
|
74
|
+
case x:
|
|
75
|
+
return "Portal";
|
|
76
|
+
case g:
|
|
77
|
+
return i.displayName || "Context";
|
|
78
|
+
case O:
|
|
79
|
+
return (i._context.displayName || "Context") + ".Consumer";
|
|
80
|
+
case N:
|
|
81
|
+
var y = i.render;
|
|
82
|
+
return i = i.displayName, i || (i = y.displayName || y.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
|
|
83
|
+
case B:
|
|
84
|
+
return y = i.displayName || null, y !== null ? y : e(i.type) || "Memo";
|
|
85
|
+
case q:
|
|
86
|
+
y = i._payload, i = i._init;
|
|
87
|
+
try {
|
|
88
|
+
return e(i(y));
|
|
89
|
+
} catch {
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
function t(i) {
|
|
95
|
+
return "" + i;
|
|
96
|
+
}
|
|
97
|
+
function r(i) {
|
|
98
|
+
try {
|
|
99
|
+
t(i);
|
|
100
|
+
var y = !1;
|
|
101
|
+
} catch {
|
|
102
|
+
y = !0;
|
|
103
|
+
}
|
|
104
|
+
if (y) {
|
|
105
|
+
y = console;
|
|
106
|
+
var T = y.error, A = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
|
107
|
+
return T.call(
|
|
108
|
+
y,
|
|
109
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
|
+
A
|
|
111
|
+
), t(i);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function n(i) {
|
|
115
|
+
if (i === b) return "<>";
|
|
116
|
+
if (typeof i == "object" && i !== null && i.$$typeof === q)
|
|
117
|
+
return "<...>";
|
|
118
|
+
try {
|
|
119
|
+
var y = e(i);
|
|
120
|
+
return y ? "<" + y + ">" : "<...>";
|
|
121
|
+
} catch {
|
|
122
|
+
return "<...>";
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function s() {
|
|
126
|
+
var i = Q.A;
|
|
127
|
+
return i === null ? null : i.getOwner();
|
|
128
|
+
}
|
|
129
|
+
function o() {
|
|
130
|
+
return Error("react-stack-top-frame");
|
|
131
|
+
}
|
|
132
|
+
function a(i) {
|
|
133
|
+
if (ue.call(i, "key")) {
|
|
134
|
+
var y = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
135
|
+
if (y && y.isReactWarning) return !1;
|
|
136
|
+
}
|
|
137
|
+
return i.key !== void 0;
|
|
138
|
+
}
|
|
139
|
+
function c(i, y) {
|
|
140
|
+
function T() {
|
|
141
|
+
te || (te = !0, console.error(
|
|
142
|
+
"%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)",
|
|
143
|
+
y
|
|
144
|
+
));
|
|
145
|
+
}
|
|
146
|
+
T.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
147
|
+
get: T,
|
|
148
|
+
configurable: !0
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function f() {
|
|
152
|
+
var i = e(this.type);
|
|
153
|
+
return ae[i] || (ae[i] = !0, console.error(
|
|
154
|
+
"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."
|
|
155
|
+
)), i = this.props.ref, i !== void 0 ? i : null;
|
|
156
|
+
}
|
|
157
|
+
function m(i, y, T, A, re, P) {
|
|
158
|
+
var _ = T.ref;
|
|
159
|
+
return i = {
|
|
160
|
+
$$typeof: j,
|
|
161
|
+
type: i,
|
|
162
|
+
key: y,
|
|
163
|
+
props: T,
|
|
164
|
+
_owner: A
|
|
165
|
+
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(i, "ref", {
|
|
166
|
+
enumerable: !1,
|
|
167
|
+
get: f
|
|
168
|
+
}) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
169
|
+
configurable: !1,
|
|
170
|
+
enumerable: !1,
|
|
171
|
+
writable: !0,
|
|
172
|
+
value: 0
|
|
173
|
+
}), Object.defineProperty(i, "_debugInfo", {
|
|
174
|
+
configurable: !1,
|
|
175
|
+
enumerable: !1,
|
|
176
|
+
writable: !0,
|
|
177
|
+
value: null
|
|
178
|
+
}), Object.defineProperty(i, "_debugStack", {
|
|
179
|
+
configurable: !1,
|
|
180
|
+
enumerable: !1,
|
|
181
|
+
writable: !0,
|
|
182
|
+
value: re
|
|
183
|
+
}), Object.defineProperty(i, "_debugTask", {
|
|
184
|
+
configurable: !1,
|
|
185
|
+
enumerable: !1,
|
|
186
|
+
writable: !0,
|
|
187
|
+
value: P
|
|
188
|
+
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
189
|
+
}
|
|
190
|
+
function u(i, y, T, A, re, P) {
|
|
191
|
+
var _ = y.children;
|
|
192
|
+
if (_ !== void 0)
|
|
193
|
+
if (A)
|
|
194
|
+
if (z(_)) {
|
|
195
|
+
for (A = 0; A < _.length; A++)
|
|
196
|
+
d(_[A]);
|
|
197
|
+
Object.freeze && Object.freeze(_);
|
|
198
|
+
} else
|
|
199
|
+
console.error(
|
|
200
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
|
+
);
|
|
202
|
+
else d(_);
|
|
203
|
+
if (ue.call(y, "key")) {
|
|
204
|
+
_ = e(i);
|
|
205
|
+
var I = Object.keys(y).filter(function(Ae) {
|
|
206
|
+
return Ae !== "key";
|
|
207
|
+
});
|
|
208
|
+
A = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", $[_ + A] || (I = 0 < I.length ? "{" + I.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
210
|
+
let props = %s;
|
|
211
|
+
<%s {...props} />
|
|
212
|
+
React keys must be passed directly to JSX without using spread:
|
|
213
|
+
let props = %s;
|
|
214
|
+
<%s key={someKey} {...props} />`,
|
|
215
|
+
A,
|
|
216
|
+
_,
|
|
217
|
+
I,
|
|
218
|
+
_
|
|
219
|
+
), $[_ + A] = !0);
|
|
220
|
+
}
|
|
221
|
+
if (_ = null, T !== void 0 && (r(T), _ = "" + T), a(y) && (r(y.key), _ = "" + y.key), "key" in y) {
|
|
222
|
+
T = {};
|
|
223
|
+
for (var oe in y)
|
|
224
|
+
oe !== "key" && (T[oe] = y[oe]);
|
|
225
|
+
} else T = y;
|
|
226
|
+
return _ && c(
|
|
227
|
+
T,
|
|
228
|
+
typeof i == "function" ? i.displayName || i.name || "Unknown" : i
|
|
229
|
+
), m(
|
|
230
|
+
i,
|
|
231
|
+
_,
|
|
232
|
+
T,
|
|
233
|
+
s(),
|
|
234
|
+
re,
|
|
235
|
+
P
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
function d(i) {
|
|
239
|
+
R(i) ? i._store && (i._store.validated = 1) : typeof i == "object" && i !== null && i.$$typeof === q && (i._payload.status === "fulfilled" ? R(i._payload.value) && i._payload.value._store && (i._payload.value._store.validated = 1) : i._store && (i._store.validated = 1));
|
|
240
|
+
}
|
|
241
|
+
function R(i) {
|
|
242
|
+
return typeof i == "object" && i !== null && i.$$typeof === j;
|
|
243
|
+
}
|
|
244
|
+
var w = dt, j = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), O = Symbol.for("react.consumer"), g = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), Q = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ue = Object.prototype.hasOwnProperty, z = Array.isArray, Z = console.createTask ? console.createTask : function() {
|
|
245
|
+
return null;
|
|
246
|
+
};
|
|
247
|
+
w = {
|
|
248
|
+
react_stack_bottom_frame: function(i) {
|
|
249
|
+
return i();
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
var te, ae = {}, me = w.react_stack_bottom_frame.bind(
|
|
253
|
+
w,
|
|
254
|
+
o
|
|
255
|
+
)(), fe = Z(n(o)), $ = {};
|
|
256
|
+
Pe.Fragment = b, Pe.jsx = function(i, y, T) {
|
|
257
|
+
var A = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
258
|
+
return u(
|
|
259
|
+
i,
|
|
260
|
+
y,
|
|
261
|
+
T,
|
|
262
|
+
!1,
|
|
263
|
+
A ? Error("react-stack-top-frame") : me,
|
|
264
|
+
A ? Z(n(i)) : fe
|
|
265
|
+
);
|
|
266
|
+
}, Pe.jsxs = function(i, y, T) {
|
|
267
|
+
var A = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
268
|
+
return u(
|
|
269
|
+
i,
|
|
270
|
+
y,
|
|
271
|
+
T,
|
|
272
|
+
!0,
|
|
273
|
+
A ? Error("react-stack-top-frame") : me,
|
|
274
|
+
A ? Z(n(i)) : fe
|
|
275
|
+
);
|
|
276
|
+
};
|
|
277
|
+
})()), Pe;
|
|
278
|
+
}
|
|
279
|
+
var Pt;
|
|
280
|
+
function Jr() {
|
|
281
|
+
return Pt || (Pt = 1, process.env.NODE_ENV === "production" ? qe.exports = Mr() : qe.exports = Vr()), qe.exports;
|
|
282
|
+
}
|
|
283
|
+
var p = Jr();
|
|
284
|
+
function nr(e, t) {
|
|
285
|
+
return function() {
|
|
286
|
+
return e.apply(t, arguments);
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
const { toString: Wr } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: Ie, toStringTag: sr } = Symbol, We = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), De = (e, t) => {
|
|
290
|
+
let r = e;
|
|
291
|
+
const n = [];
|
|
292
|
+
for (; r != null && r !== Object.prototype; ) {
|
|
293
|
+
if (n.indexOf(r) !== -1)
|
|
294
|
+
return !1;
|
|
295
|
+
if (n.push(r), We(r, t))
|
|
296
|
+
return !0;
|
|
297
|
+
r = Se(r);
|
|
298
|
+
}
|
|
299
|
+
return !1;
|
|
300
|
+
}, Kr = (e, t) => e != null && De(e, t) ? e[t] : void 0, bt = /* @__PURE__ */ ((e) => (t) => {
|
|
301
|
+
const r = Wr.call(t);
|
|
302
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
303
|
+
})(/* @__PURE__ */ Object.create(null)), se = (e) => (e = e.toLowerCase(), (t) => bt(t) === e), Ye = (e) => (t) => typeof t === e, { isArray: Ee } = Array, Oe = Ye("undefined");
|
|
304
|
+
function Te(e) {
|
|
305
|
+
return e !== null && !Oe(e) && e.constructor !== null && !Oe(e.constructor) && M(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
306
|
+
}
|
|
307
|
+
const or = se("ArrayBuffer");
|
|
308
|
+
function Gr(e) {
|
|
309
|
+
let t;
|
|
310
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && or(e.buffer), t;
|
|
311
|
+
}
|
|
312
|
+
const Yr = Ye("string"), M = Ye("function"), ir = Ye("number"), _e = (e) => e !== null && typeof e == "object", Xr = (e) => e === !0 || e === !1, He = (e) => {
|
|
313
|
+
if (!_e(e))
|
|
314
|
+
return !1;
|
|
315
|
+
const t = Se(e);
|
|
316
|
+
return (t === null || t === Object.prototype || Se(t) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
317
|
+
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
318
|
+
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
319
|
+
!De(e, sr) && !De(e, Ie);
|
|
320
|
+
}, Qr = (e) => {
|
|
321
|
+
if (!_e(e) || Te(e))
|
|
322
|
+
return !1;
|
|
323
|
+
try {
|
|
324
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
325
|
+
} catch {
|
|
326
|
+
return !1;
|
|
327
|
+
}
|
|
328
|
+
}, Zr = se("Date"), en = se("File"), tn = (e) => !!(e && typeof e.uri < "u"), rn = (e) => e && typeof e.getParts < "u", nn = se("Blob"), sn = se("FileList"), on = (e) => _e(e) && M(e.pipe);
|
|
329
|
+
function an() {
|
|
330
|
+
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
331
|
+
}
|
|
332
|
+
const Nt = an(), vt = typeof Nt.FormData < "u" ? Nt.FormData : void 0, ln = (e) => {
|
|
333
|
+
if (!e) return !1;
|
|
334
|
+
if (vt && e instanceof vt) return !0;
|
|
335
|
+
const t = Se(e);
|
|
336
|
+
if (!t || t === Object.prototype || !M(e.append)) return !1;
|
|
337
|
+
const r = bt(e);
|
|
338
|
+
return r === "formdata" || // detect form-data instance
|
|
339
|
+
r === "object" && M(e.toString) && e.toString() === "[object FormData]";
|
|
340
|
+
}, cn = se("URLSearchParams"), [un, fn, dn, pn] = [
|
|
341
|
+
"ReadableStream",
|
|
342
|
+
"Request",
|
|
343
|
+
"Response",
|
|
344
|
+
"Headers"
|
|
345
|
+
].map(se), hn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
346
|
+
function Le(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
347
|
+
if (e === null || typeof e > "u")
|
|
348
|
+
return;
|
|
349
|
+
let n, s;
|
|
350
|
+
if (typeof e != "object" && (e = [e]), Ee(e))
|
|
351
|
+
for (n = 0, s = e.length; n < s; n++)
|
|
352
|
+
t.call(null, e[n], n, e);
|
|
353
|
+
else {
|
|
354
|
+
if (Te(e))
|
|
355
|
+
return;
|
|
356
|
+
const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), a = o.length;
|
|
357
|
+
let c;
|
|
358
|
+
for (n = 0; n < a; n++)
|
|
359
|
+
c = o[n], t.call(null, e[c], c, e);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function ar(e, t) {
|
|
363
|
+
if (Te(e))
|
|
364
|
+
return null;
|
|
365
|
+
t = t.toLowerCase();
|
|
366
|
+
const r = Object.keys(e);
|
|
367
|
+
let n = r.length, s;
|
|
368
|
+
for (; n-- > 0; )
|
|
369
|
+
if (s = r[n], t === s.toLowerCase())
|
|
370
|
+
return s;
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
const be = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, lr = (e) => !Oe(e) && e !== be;
|
|
374
|
+
function lt(...e) {
|
|
375
|
+
const { caseless: t, skipUndefined: r } = lr(this) && this || {}, n = {}, s = (o, a) => {
|
|
376
|
+
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
377
|
+
return;
|
|
378
|
+
const c = t && typeof a == "string" && ar(n, a) || a, f = We(n, c) ? n[c] : void 0;
|
|
379
|
+
He(f) && He(o) ? n[c] = lt(f, o) : He(o) ? n[c] = lt({}, o) : Ee(o) ? n[c] = o.slice() : (!r || !Oe(o)) && (n[c] = o);
|
|
380
|
+
};
|
|
381
|
+
for (let o = 0, a = e.length; o < a; o++) {
|
|
382
|
+
const c = e[o];
|
|
383
|
+
if (!c || Te(c) || (Le(c, s), typeof c != "object" || Ee(c)))
|
|
384
|
+
continue;
|
|
385
|
+
const f = Object.getOwnPropertySymbols(c);
|
|
386
|
+
for (let m = 0; m < f.length; m++) {
|
|
387
|
+
const u = f[m];
|
|
388
|
+
_n.call(c, u) && s(c[u], u);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return n;
|
|
392
|
+
}
|
|
393
|
+
const mn = (e, t, r, { allOwnKeys: n } = {}) => (Le(
|
|
394
|
+
t,
|
|
395
|
+
(s, o) => {
|
|
396
|
+
r && M(s) ? Object.defineProperty(e, o, {
|
|
397
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
398
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
399
|
+
__proto__: null,
|
|
400
|
+
value: nr(s, r),
|
|
401
|
+
writable: !0,
|
|
402
|
+
enumerable: !0,
|
|
403
|
+
configurable: !0
|
|
404
|
+
}) : Object.defineProperty(e, o, {
|
|
405
|
+
__proto__: null,
|
|
406
|
+
value: s,
|
|
407
|
+
writable: !0,
|
|
408
|
+
enumerable: !0,
|
|
409
|
+
configurable: !0
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
{ allOwnKeys: n }
|
|
413
|
+
), e), yn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), bn = (e, t, r, n) => {
|
|
414
|
+
e.prototype = Object.create(t.prototype, n), Object.defineProperty(e.prototype, "constructor", {
|
|
415
|
+
__proto__: null,
|
|
416
|
+
value: e,
|
|
417
|
+
writable: !0,
|
|
418
|
+
enumerable: !1,
|
|
419
|
+
configurable: !0
|
|
420
|
+
}), Object.defineProperty(e, "super", {
|
|
421
|
+
__proto__: null,
|
|
422
|
+
value: t.prototype
|
|
423
|
+
}), r && Object.assign(e.prototype, r);
|
|
424
|
+
}, gn = (e, t, r, n) => {
|
|
425
|
+
let s, o, a;
|
|
426
|
+
const c = {};
|
|
427
|
+
if (t = t || {}, e == null) return t;
|
|
428
|
+
do {
|
|
429
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
430
|
+
a = s[o], (!n || n(a, e, t)) && !c[a] && (t[a] = e[a], c[a] = !0);
|
|
431
|
+
e = r !== !1 && Se(e);
|
|
432
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
433
|
+
return t;
|
|
434
|
+
}, En = (e, t, r) => {
|
|
435
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
436
|
+
const n = e.indexOf(t, r);
|
|
437
|
+
return n !== -1 && n === r;
|
|
438
|
+
}, xn = (e) => {
|
|
439
|
+
if (!e) return null;
|
|
440
|
+
if (Ee(e)) return e;
|
|
441
|
+
let t = e.length;
|
|
442
|
+
if (!ir(t)) return null;
|
|
443
|
+
const r = new Array(t);
|
|
444
|
+
for (; t-- > 0; )
|
|
445
|
+
r[t] = e[t];
|
|
446
|
+
return r;
|
|
447
|
+
}, wn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Se(Uint8Array)), Rn = (e, t) => {
|
|
448
|
+
const n = (e && e[Ie]).call(e);
|
|
449
|
+
let s;
|
|
450
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
451
|
+
const o = s.value;
|
|
452
|
+
t.call(e, o[0], o[1]);
|
|
453
|
+
}
|
|
454
|
+
}, Sn = (e, t) => {
|
|
455
|
+
let r;
|
|
456
|
+
const n = [];
|
|
457
|
+
for (; (r = e.exec(t)) !== null; )
|
|
458
|
+
n.push(r);
|
|
459
|
+
return n;
|
|
460
|
+
}, On = se("HTMLFormElement"), Tn = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
|
|
461
|
+
return n.toUpperCase() + s;
|
|
462
|
+
}), { propertyIsEnumerable: _n } = Object.prototype, An = se("RegExp"), cr = (e, t) => {
|
|
463
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
464
|
+
Le(r, (s, o) => {
|
|
465
|
+
let a;
|
|
466
|
+
(a = t(s, o, e)) !== !1 && (n[o] = a || s);
|
|
467
|
+
}), Object.defineProperties(e, n);
|
|
468
|
+
}, jn = (e) => {
|
|
469
|
+
cr(e, (t, r) => {
|
|
470
|
+
if (M(e) && ["arguments", "caller", "callee"].includes(r))
|
|
471
|
+
return !1;
|
|
472
|
+
const n = e[r];
|
|
473
|
+
if (M(n)) {
|
|
474
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
475
|
+
t.writable = !1;
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
t.set || (t.set = () => {
|
|
479
|
+
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
}, Cn = (e, t) => {
|
|
484
|
+
const r = {}, n = (s) => {
|
|
485
|
+
s.forEach((o) => {
|
|
486
|
+
r[o] = !0;
|
|
487
|
+
});
|
|
488
|
+
};
|
|
489
|
+
return Ee(e) ? n(e) : n(String(e).split(t)), r;
|
|
490
|
+
}, Pn = () => {
|
|
491
|
+
}, Nn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
492
|
+
function vn(e) {
|
|
493
|
+
return !!(e && M(e.append) && e[sr] === "FormData" && e[Ie]);
|
|
494
|
+
}
|
|
495
|
+
const kn = (e) => {
|
|
496
|
+
const t = /* @__PURE__ */ new WeakSet(), r = (n) => {
|
|
497
|
+
if (_e(n)) {
|
|
498
|
+
if (t.has(n))
|
|
499
|
+
return;
|
|
500
|
+
if (Te(n))
|
|
501
|
+
return n;
|
|
502
|
+
if (!("toJSON" in n)) {
|
|
503
|
+
t.add(n);
|
|
504
|
+
const s = Ee(n) ? [] : {};
|
|
505
|
+
return Le(n, (o, a) => {
|
|
506
|
+
const c = r(o);
|
|
507
|
+
!Oe(c) && (s[a] = c);
|
|
508
|
+
}), t.delete(n), s;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return n;
|
|
512
|
+
};
|
|
513
|
+
return r(e);
|
|
514
|
+
}, Dn = se("AsyncFunction"), In = (e) => e && (_e(e) || M(e)) && M(e.then) && M(e.catch), ur = ((e, t) => e ? setImmediate : t ? ((r, n) => (be.addEventListener(
|
|
515
|
+
"message",
|
|
516
|
+
({ source: s, data: o }) => {
|
|
517
|
+
s === be && o === r && n.length && n.shift()();
|
|
518
|
+
},
|
|
519
|
+
!1
|
|
520
|
+
), (s) => {
|
|
521
|
+
n.push(s), be.postMessage(r, "*");
|
|
522
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", M(be.postMessage)), Ln = typeof queueMicrotask < "u" ? queueMicrotask.bind(be) : typeof process < "u" && process.nextTick || ur, fr = (e) => e != null && M(e[Ie]), Un = (e) => e != null && De(e, Ie) && fr(e), l = {
|
|
523
|
+
isArray: Ee,
|
|
524
|
+
isArrayBuffer: or,
|
|
525
|
+
isBuffer: Te,
|
|
526
|
+
isFormData: ln,
|
|
527
|
+
isArrayBufferView: Gr,
|
|
528
|
+
isString: Yr,
|
|
529
|
+
isNumber: ir,
|
|
530
|
+
isBoolean: Xr,
|
|
531
|
+
isObject: _e,
|
|
532
|
+
isPlainObject: He,
|
|
533
|
+
isEmptyObject: Qr,
|
|
534
|
+
isReadableStream: un,
|
|
535
|
+
isRequest: fn,
|
|
536
|
+
isResponse: dn,
|
|
537
|
+
isHeaders: pn,
|
|
538
|
+
isUndefined: Oe,
|
|
539
|
+
isDate: Zr,
|
|
540
|
+
isFile: en,
|
|
541
|
+
isReactNativeBlob: tn,
|
|
542
|
+
isReactNative: rn,
|
|
543
|
+
isBlob: nn,
|
|
544
|
+
isRegExp: An,
|
|
545
|
+
isFunction: M,
|
|
546
|
+
isStream: on,
|
|
547
|
+
isURLSearchParams: cn,
|
|
548
|
+
isTypedArray: wn,
|
|
549
|
+
isFileList: sn,
|
|
550
|
+
forEach: Le,
|
|
551
|
+
merge: lt,
|
|
552
|
+
extend: mn,
|
|
553
|
+
trim: hn,
|
|
554
|
+
stripBOM: yn,
|
|
555
|
+
inherits: bn,
|
|
556
|
+
toFlatObject: gn,
|
|
557
|
+
kindOf: bt,
|
|
558
|
+
kindOfTest: se,
|
|
559
|
+
endsWith: En,
|
|
560
|
+
toArray: xn,
|
|
561
|
+
forEachEntry: Rn,
|
|
562
|
+
matchAll: Sn,
|
|
563
|
+
isHTMLForm: On,
|
|
564
|
+
hasOwnProperty: We,
|
|
565
|
+
hasOwnProp: We,
|
|
566
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
567
|
+
hasOwnInPrototypeChain: De,
|
|
568
|
+
getSafeProp: Kr,
|
|
569
|
+
reduceDescriptors: cr,
|
|
570
|
+
freezeMethods: jn,
|
|
571
|
+
toObjectSet: Cn,
|
|
572
|
+
toCamelCase: Tn,
|
|
573
|
+
noop: Pn,
|
|
574
|
+
toFiniteNumber: Nn,
|
|
575
|
+
findKey: ar,
|
|
576
|
+
global: be,
|
|
577
|
+
isContextDefined: lr,
|
|
578
|
+
isSpecCompliantForm: vn,
|
|
579
|
+
toJSONObject: kn,
|
|
580
|
+
isAsyncFn: Dn,
|
|
581
|
+
isThenable: In,
|
|
582
|
+
setImmediate: ur,
|
|
583
|
+
asap: Ln,
|
|
584
|
+
isIterable: fr,
|
|
585
|
+
isSafeIterable: Un
|
|
586
|
+
}, Fn = l.toObjectSet([
|
|
587
|
+
"age",
|
|
588
|
+
"authorization",
|
|
589
|
+
"content-length",
|
|
590
|
+
"content-type",
|
|
591
|
+
"etag",
|
|
592
|
+
"expires",
|
|
593
|
+
"from",
|
|
594
|
+
"host",
|
|
595
|
+
"if-modified-since",
|
|
596
|
+
"if-unmodified-since",
|
|
597
|
+
"last-modified",
|
|
598
|
+
"location",
|
|
599
|
+
"max-forwards",
|
|
600
|
+
"proxy-authorization",
|
|
601
|
+
"referer",
|
|
602
|
+
"retry-after",
|
|
603
|
+
"user-agent"
|
|
604
|
+
]), Bn = (e) => {
|
|
605
|
+
const t = {};
|
|
606
|
+
let r, n, s;
|
|
607
|
+
return e && e.split(`
|
|
608
|
+
`).forEach(function(a) {
|
|
609
|
+
s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] && Fn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
610
|
+
}), t;
|
|
611
|
+
};
|
|
612
|
+
function qn(e) {
|
|
613
|
+
let t = 0, r = e.length;
|
|
614
|
+
for (; t < r; ) {
|
|
615
|
+
const n = e.charCodeAt(t);
|
|
616
|
+
if (n !== 9 && n !== 32)
|
|
617
|
+
break;
|
|
618
|
+
t += 1;
|
|
619
|
+
}
|
|
620
|
+
for (; r > t; ) {
|
|
621
|
+
const n = e.charCodeAt(r - 1);
|
|
622
|
+
if (n !== 9 && n !== 32)
|
|
623
|
+
break;
|
|
624
|
+
r -= 1;
|
|
625
|
+
}
|
|
626
|
+
return t === 0 && r === e.length ? e : e.slice(t, r);
|
|
627
|
+
}
|
|
628
|
+
const zn = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), $n = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
629
|
+
function gt(e, t) {
|
|
630
|
+
return l.isArray(e) ? e.map((r) => gt(r, t)) : qn(String(e).replace(t, ""));
|
|
631
|
+
}
|
|
632
|
+
const Hn = (e) => gt(e, zn), Mn = (e) => gt(e, $n);
|
|
633
|
+
function dr(e) {
|
|
634
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
635
|
+
return l.forEach(e.toJSON(), (r, n) => {
|
|
636
|
+
t[n] = Mn(r);
|
|
637
|
+
}), t;
|
|
638
|
+
}
|
|
639
|
+
const kt = Symbol("internals");
|
|
640
|
+
function Ne(e) {
|
|
641
|
+
return e && String(e).trim().toLowerCase();
|
|
642
|
+
}
|
|
643
|
+
function Me(e) {
|
|
644
|
+
return e === !1 || e == null ? e : l.isArray(e) ? e.map(Me) : Hn(String(e));
|
|
645
|
+
}
|
|
646
|
+
function Vn(e) {
|
|
647
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
648
|
+
let n;
|
|
649
|
+
for (; n = r.exec(e); )
|
|
650
|
+
t[n[1]] = n[2];
|
|
651
|
+
return t;
|
|
652
|
+
}
|
|
653
|
+
const Jn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
654
|
+
function rt(e, t, r, n, s) {
|
|
655
|
+
if (l.isFunction(n))
|
|
656
|
+
return n.call(this, t, r);
|
|
657
|
+
if (s && (t = r), !!l.isString(t)) {
|
|
658
|
+
if (l.isString(n))
|
|
659
|
+
return t.indexOf(n) !== -1;
|
|
660
|
+
if (l.isRegExp(n))
|
|
661
|
+
return n.test(t);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
function Wn(e) {
|
|
665
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
666
|
+
}
|
|
667
|
+
function Kn(e, t) {
|
|
668
|
+
const r = l.toCamelCase(" " + t);
|
|
669
|
+
["get", "set", "has"].forEach((n) => {
|
|
670
|
+
Object.defineProperty(e, n + r, {
|
|
671
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
672
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
673
|
+
__proto__: null,
|
|
674
|
+
value: function(s, o, a) {
|
|
675
|
+
return this[n].call(this, t, s, o, a);
|
|
676
|
+
},
|
|
677
|
+
configurable: !0
|
|
678
|
+
});
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
let F = class {
|
|
682
|
+
constructor(t) {
|
|
683
|
+
t && this.set(t);
|
|
684
|
+
}
|
|
685
|
+
set(t, r, n) {
|
|
686
|
+
const s = this;
|
|
687
|
+
function o(c, f, m) {
|
|
688
|
+
const u = Ne(f);
|
|
689
|
+
if (!u)
|
|
690
|
+
return;
|
|
691
|
+
const d = l.findKey(s, u);
|
|
692
|
+
(!d || s[d] === void 0 || m === !0 || m === void 0 && s[d] !== !1) && (s[d || f] = Me(c));
|
|
693
|
+
}
|
|
694
|
+
const a = (c, f) => l.forEach(c, (m, u) => o(m, u, f));
|
|
695
|
+
if (l.isPlainObject(t) || t instanceof this.constructor)
|
|
696
|
+
a(t, r);
|
|
697
|
+
else if (l.isString(t) && (t = t.trim()) && !Jn(t))
|
|
698
|
+
a(Bn(t), r);
|
|
699
|
+
else if (l.isObject(t) && l.isSafeIterable(t)) {
|
|
700
|
+
let c = /* @__PURE__ */ Object.create(null), f, m;
|
|
701
|
+
for (const u of t) {
|
|
702
|
+
if (!l.isArray(u))
|
|
703
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
704
|
+
m = u[0], l.hasOwnProp(c, m) ? (f = c[m], c[m] = l.isArray(f) ? [...f, u[1]] : [f, u[1]]) : c[m] = u[1];
|
|
705
|
+
}
|
|
706
|
+
a(c, r);
|
|
707
|
+
} else
|
|
708
|
+
t != null && o(r, t, n);
|
|
709
|
+
return this;
|
|
710
|
+
}
|
|
711
|
+
get(t, r) {
|
|
712
|
+
if (t = Ne(t), t) {
|
|
713
|
+
const n = l.findKey(this, t);
|
|
714
|
+
if (n) {
|
|
715
|
+
const s = this[n];
|
|
716
|
+
if (!r)
|
|
717
|
+
return s;
|
|
718
|
+
if (r === !0)
|
|
719
|
+
return Vn(s);
|
|
720
|
+
if (l.isFunction(r))
|
|
721
|
+
return r.call(this, s, n);
|
|
722
|
+
if (l.isRegExp(r))
|
|
723
|
+
return r.exec(s);
|
|
724
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
has(t, r) {
|
|
729
|
+
if (t = Ne(t), t) {
|
|
730
|
+
const n = l.findKey(this, t);
|
|
731
|
+
return !!(n && this[n] !== void 0 && (!r || rt(this, this[n], n, r)));
|
|
732
|
+
}
|
|
733
|
+
return !1;
|
|
734
|
+
}
|
|
735
|
+
delete(t, r) {
|
|
736
|
+
const n = this;
|
|
737
|
+
let s = !1;
|
|
738
|
+
function o(a) {
|
|
739
|
+
if (a = Ne(a), a) {
|
|
740
|
+
const c = l.findKey(n, a);
|
|
741
|
+
c && (!r || rt(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
return l.isArray(t) ? t.forEach(o) : o(t), s;
|
|
745
|
+
}
|
|
746
|
+
clear(t) {
|
|
747
|
+
const r = Object.keys(this);
|
|
748
|
+
let n = r.length, s = !1;
|
|
749
|
+
for (; n--; ) {
|
|
750
|
+
const o = r[n];
|
|
751
|
+
(!t || rt(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
752
|
+
}
|
|
753
|
+
return s;
|
|
754
|
+
}
|
|
755
|
+
normalize(t) {
|
|
756
|
+
const r = this, n = {};
|
|
757
|
+
return l.forEach(this, (s, o) => {
|
|
758
|
+
const a = l.findKey(n, o);
|
|
759
|
+
if (a) {
|
|
760
|
+
r[a] = Me(s), delete r[o];
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
const c = t ? Wn(o) : String(o).trim();
|
|
764
|
+
c !== o && delete r[o], r[c] = Me(s), n[c] = !0;
|
|
765
|
+
}), this;
|
|
766
|
+
}
|
|
767
|
+
concat(...t) {
|
|
768
|
+
return this.constructor.concat(this, ...t);
|
|
769
|
+
}
|
|
770
|
+
toJSON(t) {
|
|
771
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
772
|
+
return l.forEach(this, (n, s) => {
|
|
773
|
+
n != null && n !== !1 && (r[s] = t && l.isArray(n) ? n.join(", ") : n);
|
|
774
|
+
}), r;
|
|
775
|
+
}
|
|
776
|
+
[Symbol.iterator]() {
|
|
777
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
778
|
+
}
|
|
779
|
+
toString() {
|
|
780
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
781
|
+
`);
|
|
782
|
+
}
|
|
783
|
+
getSetCookie() {
|
|
784
|
+
return this.get("set-cookie") || [];
|
|
785
|
+
}
|
|
786
|
+
get [Symbol.toStringTag]() {
|
|
787
|
+
return "AxiosHeaders";
|
|
788
|
+
}
|
|
789
|
+
static from(t) {
|
|
790
|
+
return t instanceof this ? t : new this(t);
|
|
791
|
+
}
|
|
792
|
+
static concat(t, ...r) {
|
|
793
|
+
const n = new this(t);
|
|
794
|
+
return r.forEach((s) => n.set(s)), n;
|
|
795
|
+
}
|
|
796
|
+
static accessor(t) {
|
|
797
|
+
const n = (this[kt] = this[kt] = {
|
|
798
|
+
accessors: {}
|
|
799
|
+
}).accessors, s = this.prototype;
|
|
800
|
+
function o(a) {
|
|
801
|
+
const c = Ne(a);
|
|
802
|
+
n[c] || (Kn(s, a), n[c] = !0);
|
|
803
|
+
}
|
|
804
|
+
return l.isArray(t) ? t.forEach(o) : o(t), this;
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
F.accessor([
|
|
808
|
+
"Content-Type",
|
|
809
|
+
"Content-Length",
|
|
810
|
+
"Accept",
|
|
811
|
+
"Accept-Encoding",
|
|
812
|
+
"User-Agent",
|
|
813
|
+
"Authorization"
|
|
814
|
+
]);
|
|
815
|
+
l.reduceDescriptors(F.prototype, ({ value: e }, t) => {
|
|
816
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
817
|
+
return {
|
|
818
|
+
get: () => e,
|
|
819
|
+
set(n) {
|
|
820
|
+
this[r] = n;
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
});
|
|
824
|
+
l.freezeMethods(F);
|
|
825
|
+
const Gn = "[REDACTED ****]";
|
|
826
|
+
function Yn(e) {
|
|
827
|
+
if (l.hasOwnProp(e, "toJSON"))
|
|
828
|
+
return !0;
|
|
829
|
+
let t = Object.getPrototypeOf(e);
|
|
830
|
+
for (; t && t !== Object.prototype; ) {
|
|
831
|
+
if (l.hasOwnProp(t, "toJSON"))
|
|
832
|
+
return !0;
|
|
833
|
+
t = Object.getPrototypeOf(t);
|
|
834
|
+
}
|
|
835
|
+
return !1;
|
|
836
|
+
}
|
|
837
|
+
function Xn(e, t) {
|
|
838
|
+
const r = new Set(t.map((o) => String(o).toLowerCase())), n = [], s = (o) => {
|
|
839
|
+
if (o === null || typeof o != "object" || l.isBuffer(o)) return o;
|
|
840
|
+
if (n.indexOf(o) !== -1) return;
|
|
841
|
+
o instanceof F && (o = o.toJSON()), n.push(o);
|
|
842
|
+
let a;
|
|
843
|
+
if (l.isArray(o))
|
|
844
|
+
a = [], o.forEach((c, f) => {
|
|
845
|
+
const m = s(c);
|
|
846
|
+
l.isUndefined(m) || (a[f] = m);
|
|
847
|
+
});
|
|
848
|
+
else {
|
|
849
|
+
if (!l.isPlainObject(o) && Yn(o))
|
|
850
|
+
return n.pop(), o;
|
|
851
|
+
a = /* @__PURE__ */ Object.create(null);
|
|
852
|
+
for (const [c, f] of Object.entries(o)) {
|
|
853
|
+
const m = r.has(c.toLowerCase()) ? Gn : s(f);
|
|
854
|
+
l.isUndefined(m) || (a[c] = m);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
return n.pop(), a;
|
|
858
|
+
};
|
|
859
|
+
return s(e);
|
|
860
|
+
}
|
|
861
|
+
let E = class pr extends Error {
|
|
862
|
+
static from(t, r, n, s, o, a) {
|
|
863
|
+
const c = new pr(t.message, r || t.code, n, s, o);
|
|
864
|
+
return c.cause = t, c.name = t.name, t.status != null && c.status == null && (c.status = t.status), a && Object.assign(c, a), c;
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
868
|
+
*
|
|
869
|
+
* @param {string} message The error message.
|
|
870
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
871
|
+
* @param {Object} [config] The config.
|
|
872
|
+
* @param {Object} [request] The request.
|
|
873
|
+
* @param {Object} [response] The response.
|
|
874
|
+
*
|
|
875
|
+
* @returns {Error} The created error.
|
|
876
|
+
*/
|
|
877
|
+
constructor(t, r, n, s, o) {
|
|
878
|
+
super(t), Object.defineProperty(this, "message", {
|
|
879
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
880
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
881
|
+
__proto__: null,
|
|
882
|
+
value: t,
|
|
883
|
+
enumerable: !0,
|
|
884
|
+
writable: !0,
|
|
885
|
+
configurable: !0
|
|
886
|
+
}), this.name = "AxiosError", this.isAxiosError = !0, r && (this.code = r), n && (this.config = n), s && (this.request = s), o && (this.response = o, this.status = o.status);
|
|
887
|
+
}
|
|
888
|
+
toJSON() {
|
|
889
|
+
const t = this.config, r = t && l.hasOwnProp(t, "redact") ? t.redact : void 0, n = l.isArray(r) && r.length > 0 ? Xn(t, r) : l.toJSONObject(t);
|
|
890
|
+
return {
|
|
891
|
+
// Standard
|
|
892
|
+
message: this.message,
|
|
893
|
+
name: this.name,
|
|
894
|
+
// Microsoft
|
|
895
|
+
description: this.description,
|
|
896
|
+
number: this.number,
|
|
897
|
+
// Mozilla
|
|
898
|
+
fileName: this.fileName,
|
|
899
|
+
lineNumber: this.lineNumber,
|
|
900
|
+
columnNumber: this.columnNumber,
|
|
901
|
+
stack: this.stack,
|
|
902
|
+
// Axios
|
|
903
|
+
config: n,
|
|
904
|
+
code: this.code,
|
|
905
|
+
status: this.status
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
E.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
910
|
+
E.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
911
|
+
E.ECONNABORTED = "ECONNABORTED";
|
|
912
|
+
E.ETIMEDOUT = "ETIMEDOUT";
|
|
913
|
+
E.ECONNREFUSED = "ECONNREFUSED";
|
|
914
|
+
E.ERR_NETWORK = "ERR_NETWORK";
|
|
915
|
+
E.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
916
|
+
E.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
917
|
+
E.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
918
|
+
E.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
919
|
+
E.ERR_CANCELED = "ERR_CANCELED";
|
|
920
|
+
E.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
921
|
+
E.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
922
|
+
E.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
923
|
+
const Qn = null, hr = 100;
|
|
924
|
+
function ct(e) {
|
|
925
|
+
return l.isPlainObject(e) || l.isArray(e);
|
|
926
|
+
}
|
|
927
|
+
function mr(e) {
|
|
928
|
+
return l.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
929
|
+
}
|
|
930
|
+
function nt(e, t, r) {
|
|
931
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
932
|
+
return s = mr(s), !r && o ? "[" + s + "]" : s;
|
|
933
|
+
}).join(r ? "." : "") : t;
|
|
934
|
+
}
|
|
935
|
+
function Zn(e) {
|
|
936
|
+
return l.isArray(e) && !e.some(ct);
|
|
937
|
+
}
|
|
938
|
+
const es = l.toFlatObject(l, {}, null, function(t) {
|
|
939
|
+
return /^is[A-Z]/.test(t);
|
|
940
|
+
});
|
|
941
|
+
function Xe(e, t, r) {
|
|
942
|
+
if (!l.isObject(e))
|
|
943
|
+
throw new TypeError("target must be an object");
|
|
944
|
+
t = t || new FormData(), r = l.toFlatObject(
|
|
945
|
+
r,
|
|
946
|
+
{
|
|
947
|
+
metaTokens: !0,
|
|
948
|
+
dots: !1,
|
|
949
|
+
indexes: !1
|
|
950
|
+
},
|
|
951
|
+
!1,
|
|
952
|
+
function(S, O) {
|
|
953
|
+
return !l.isUndefined(O[S]);
|
|
954
|
+
}
|
|
955
|
+
);
|
|
956
|
+
const n = r.metaTokens, s = r.visitor || j, o = r.dots, a = r.indexes, c = r.Blob || typeof Blob < "u" && Blob, f = r.maxDepth === void 0 ? hr : r.maxDepth, m = c && l.isSpecCompliantForm(t), u = [];
|
|
957
|
+
if (!l.isFunction(s))
|
|
958
|
+
throw new TypeError("visitor must be a function");
|
|
959
|
+
function d(h) {
|
|
960
|
+
if (h === null) return "";
|
|
961
|
+
if (l.isDate(h))
|
|
962
|
+
return h.toISOString();
|
|
963
|
+
if (l.isBoolean(h))
|
|
964
|
+
return h.toString();
|
|
965
|
+
if (!m && l.isBlob(h))
|
|
966
|
+
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
967
|
+
return l.isArrayBuffer(h) || l.isTypedArray(h) ? m && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
968
|
+
}
|
|
969
|
+
function R(h) {
|
|
970
|
+
if (h > f)
|
|
971
|
+
throw new E(
|
|
972
|
+
"Object is too deeply nested (" + h + " levels). Max depth: " + f,
|
|
973
|
+
E.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
function w(h, S) {
|
|
977
|
+
if (f === 1 / 0)
|
|
978
|
+
return JSON.stringify(h);
|
|
979
|
+
const O = [];
|
|
980
|
+
return JSON.stringify(h, function(N, v) {
|
|
981
|
+
if (!l.isObject(v))
|
|
982
|
+
return v;
|
|
983
|
+
for (; O.length && O[O.length - 1] !== this; )
|
|
984
|
+
O.pop();
|
|
985
|
+
return O.push(v), R(S + O.length - 1), v;
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
function j(h, S, O) {
|
|
989
|
+
let g = h;
|
|
990
|
+
if (l.isReactNative(t) && l.isReactNativeBlob(h))
|
|
991
|
+
return t.append(nt(O, S, o), d(h)), !1;
|
|
992
|
+
if (h && !O && typeof h == "object") {
|
|
993
|
+
if (l.endsWith(S, "{}"))
|
|
994
|
+
S = n ? S : S.slice(0, -2), h = w(h, 1);
|
|
995
|
+
else if (l.isArray(h) && Zn(h) || (l.isFileList(h) || l.endsWith(S, "[]")) && (g = l.toArray(h)))
|
|
996
|
+
return S = mr(S), g.forEach(function(v, k) {
|
|
997
|
+
!(l.isUndefined(v) || v === null) && t.append(
|
|
998
|
+
// eslint-disable-next-line no-nested-ternary
|
|
999
|
+
a === !0 ? nt([S], k, o) : a === null ? S : S + "[]",
|
|
1000
|
+
d(v)
|
|
1001
|
+
);
|
|
1002
|
+
}), !1;
|
|
1003
|
+
}
|
|
1004
|
+
return ct(h) ? !0 : (t.append(nt(O, S, o), d(h)), !1);
|
|
1005
|
+
}
|
|
1006
|
+
const x = Object.assign(es, {
|
|
1007
|
+
defaultVisitor: j,
|
|
1008
|
+
convertValue: d,
|
|
1009
|
+
isVisitable: ct
|
|
1010
|
+
});
|
|
1011
|
+
function b(h, S, O = 0) {
|
|
1012
|
+
if (!l.isUndefined(h)) {
|
|
1013
|
+
if (R(O), u.indexOf(h) !== -1)
|
|
1014
|
+
throw new Error("Circular reference detected in " + S.join("."));
|
|
1015
|
+
u.push(h), l.forEach(h, function(N, v) {
|
|
1016
|
+
(!(l.isUndefined(N) || N === null) && s.call(t, N, l.isString(v) ? v.trim() : v, S, x)) === !0 && b(N, S ? S.concat(v) : [v], O + 1);
|
|
1017
|
+
}), u.pop();
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
if (!l.isObject(e))
|
|
1021
|
+
throw new TypeError("data must be an object");
|
|
1022
|
+
return b(e), t;
|
|
1023
|
+
}
|
|
1024
|
+
function Dt(e) {
|
|
1025
|
+
const t = {
|
|
1026
|
+
"!": "%21",
|
|
1027
|
+
"'": "%27",
|
|
1028
|
+
"(": "%28",
|
|
1029
|
+
")": "%29",
|
|
1030
|
+
"~": "%7E",
|
|
1031
|
+
"%20": "+"
|
|
1032
|
+
};
|
|
1033
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(n) {
|
|
1034
|
+
return t[n];
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
function Et(e, t) {
|
|
1038
|
+
this._pairs = [], e && Xe(e, this, t);
|
|
1039
|
+
}
|
|
1040
|
+
const yr = Et.prototype;
|
|
1041
|
+
yr.append = function(t, r) {
|
|
1042
|
+
this._pairs.push([t, r]);
|
|
1043
|
+
};
|
|
1044
|
+
yr.toString = function(t) {
|
|
1045
|
+
const r = t ? function(n) {
|
|
1046
|
+
return t.call(this, n, Dt);
|
|
1047
|
+
} : Dt;
|
|
1048
|
+
return this._pairs.map(function(s) {
|
|
1049
|
+
return r(s[0]) + "=" + r(s[1]);
|
|
1050
|
+
}, "").join("&");
|
|
1051
|
+
};
|
|
1052
|
+
function ts(e) {
|
|
1053
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1054
|
+
}
|
|
1055
|
+
function br(e, t, r) {
|
|
1056
|
+
if (!t)
|
|
1057
|
+
return e;
|
|
1058
|
+
const n = l.isFunction(r) ? {
|
|
1059
|
+
serialize: r
|
|
1060
|
+
} : r, s = l.getSafeProp(n, "encode") || ts, o = l.getSafeProp(n, "serialize");
|
|
1061
|
+
let a;
|
|
1062
|
+
if (o ? a = o(t, n) : a = l.isURLSearchParams(t) ? t.toString() : new Et(t, n).toString(s), a) {
|
|
1063
|
+
const c = e.indexOf("#");
|
|
1064
|
+
c !== -1 && (e = e.slice(0, c)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
|
|
1065
|
+
}
|
|
1066
|
+
return e;
|
|
1067
|
+
}
|
|
1068
|
+
class It {
|
|
1069
|
+
constructor() {
|
|
1070
|
+
this.handlers = [];
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Add a new interceptor to the stack
|
|
1074
|
+
*
|
|
1075
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
1076
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
1077
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
1078
|
+
*
|
|
1079
|
+
* @return {Number} An ID used to remove interceptor later
|
|
1080
|
+
*/
|
|
1081
|
+
use(t, r, n) {
|
|
1082
|
+
return this.handlers.push({
|
|
1083
|
+
fulfilled: t,
|
|
1084
|
+
rejected: r,
|
|
1085
|
+
synchronous: n ? n.synchronous : !1,
|
|
1086
|
+
runWhen: n ? n.runWhen : null
|
|
1087
|
+
}), this.handlers.length - 1;
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Remove an interceptor from the stack
|
|
1091
|
+
*
|
|
1092
|
+
* @param {Number} id The ID that was returned by `use`
|
|
1093
|
+
*
|
|
1094
|
+
* @returns {void}
|
|
1095
|
+
*/
|
|
1096
|
+
eject(t) {
|
|
1097
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Clear all interceptors from the stack
|
|
1101
|
+
*
|
|
1102
|
+
* @returns {void}
|
|
1103
|
+
*/
|
|
1104
|
+
clear() {
|
|
1105
|
+
this.handlers && (this.handlers = []);
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Iterate over all the registered interceptors
|
|
1109
|
+
*
|
|
1110
|
+
* This method is particularly useful for skipping over any
|
|
1111
|
+
* interceptors that may have become `null` calling `eject`.
|
|
1112
|
+
*
|
|
1113
|
+
* @param {Function} fn The function to call for each interceptor
|
|
1114
|
+
*
|
|
1115
|
+
* @returns {void}
|
|
1116
|
+
*/
|
|
1117
|
+
forEach(t) {
|
|
1118
|
+
l.forEach(this.handlers, function(n) {
|
|
1119
|
+
n !== null && t(n);
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
const xt = {
|
|
1124
|
+
silentJSONParsing: !0,
|
|
1125
|
+
forcedJSONParsing: !0,
|
|
1126
|
+
clarifyTimeoutError: !1,
|
|
1127
|
+
legacyInterceptorReqResOrdering: !0,
|
|
1128
|
+
advertiseZstdAcceptEncoding: !1,
|
|
1129
|
+
validateStatusUndefinedResolves: !0
|
|
1130
|
+
}, rs = typeof URLSearchParams < "u" ? URLSearchParams : Et, ns = typeof FormData < "u" ? FormData : null, ss = typeof Blob < "u" ? Blob : null, os = {
|
|
1131
|
+
isBrowser: !0,
|
|
1132
|
+
classes: {
|
|
1133
|
+
URLSearchParams: rs,
|
|
1134
|
+
FormData: ns,
|
|
1135
|
+
Blob: ss
|
|
1136
|
+
},
|
|
1137
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1138
|
+
}, wt = typeof window < "u" && typeof document < "u", ut = typeof navigator == "object" && navigator || void 0, is = wt && (!ut || ["ReactNative", "NativeScript", "NS"].indexOf(ut.product) < 0), as = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1139
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ls = wt && window.location.href || "http://localhost", cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1140
|
+
__proto__: null,
|
|
1141
|
+
hasBrowserEnv: wt,
|
|
1142
|
+
hasStandardBrowserEnv: is,
|
|
1143
|
+
hasStandardBrowserWebWorkerEnv: as,
|
|
1144
|
+
navigator: ut,
|
|
1145
|
+
origin: ls
|
|
1146
|
+
}, Symbol.toStringTag, { value: "Module" })), L = {
|
|
1147
|
+
...cs,
|
|
1148
|
+
...os
|
|
1149
|
+
};
|
|
1150
|
+
function us(e, t) {
|
|
1151
|
+
return Xe(e, new L.classes.URLSearchParams(), {
|
|
1152
|
+
visitor: function(r, n, s, o) {
|
|
1153
|
+
return L.isNode && l.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1154
|
+
},
|
|
1155
|
+
...t
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
const Lt = hr;
|
|
1159
|
+
function gr(e) {
|
|
1160
|
+
if (e > Lt)
|
|
1161
|
+
throw new E(
|
|
1162
|
+
"FormData field is too deeply nested (" + e + " levels). Max depth: " + Lt,
|
|
1163
|
+
E.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
1164
|
+
);
|
|
1165
|
+
}
|
|
1166
|
+
function fs(e) {
|
|
1167
|
+
const t = [], r = /\w+|\[(\w*)]/g;
|
|
1168
|
+
let n;
|
|
1169
|
+
for (; (n = r.exec(e)) !== null; )
|
|
1170
|
+
gr(t.length), t.push(n[0] === "[]" ? "" : n[1] || n[0]);
|
|
1171
|
+
return t;
|
|
1172
|
+
}
|
|
1173
|
+
function ds(e) {
|
|
1174
|
+
const t = {}, r = Object.keys(e);
|
|
1175
|
+
let n;
|
|
1176
|
+
const s = r.length;
|
|
1177
|
+
let o;
|
|
1178
|
+
for (n = 0; n < s; n++)
|
|
1179
|
+
o = r[n], t[o] = e[o];
|
|
1180
|
+
return t;
|
|
1181
|
+
}
|
|
1182
|
+
function Er(e) {
|
|
1183
|
+
function t(r, n, s, o) {
|
|
1184
|
+
gr(o);
|
|
1185
|
+
let a = r[o++];
|
|
1186
|
+
if (a === "__proto__") return !0;
|
|
1187
|
+
const c = Number.isFinite(+a), f = o >= r.length;
|
|
1188
|
+
return a = !a && l.isArray(s) ? s.length : a, f ? (l.hasOwnProp(s, a) ? s[a] = l.isArray(s[a]) ? s[a].concat(n) : [s[a], n] : s[a] = n, !c) : ((!l.hasOwnProp(s, a) || !l.isObject(s[a])) && (s[a] = []), t(r, n, s[a], o) && l.isArray(s[a]) && (s[a] = ds(s[a])), !c);
|
|
1189
|
+
}
|
|
1190
|
+
if (l.isFormData(e) && l.isFunction(e.entries)) {
|
|
1191
|
+
const r = {};
|
|
1192
|
+
return l.forEachEntry(e, (n, s) => {
|
|
1193
|
+
t(fs(n), s, r, 0);
|
|
1194
|
+
}), r;
|
|
1195
|
+
}
|
|
1196
|
+
return null;
|
|
1197
|
+
}
|
|
1198
|
+
const we = (e, t) => e != null && l.hasOwnProp(e, t) ? e[t] : void 0;
|
|
1199
|
+
function ps(e, t, r) {
|
|
1200
|
+
if (l.isString(e))
|
|
1201
|
+
try {
|
|
1202
|
+
return (t || JSON.parse)(e), l.trim(e);
|
|
1203
|
+
} catch (n) {
|
|
1204
|
+
if (n.name !== "SyntaxError")
|
|
1205
|
+
throw n;
|
|
1206
|
+
}
|
|
1207
|
+
return (r || JSON.stringify)(e);
|
|
1208
|
+
}
|
|
1209
|
+
const Ue = {
|
|
1210
|
+
transitional: xt,
|
|
1211
|
+
adapter: ["xhr", "http", "fetch"],
|
|
1212
|
+
transformRequest: [
|
|
1213
|
+
function(t, r) {
|
|
1214
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = l.isObject(t);
|
|
1215
|
+
if (o && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t))
|
|
1216
|
+
return s ? JSON.stringify(Er(t)) : t;
|
|
1217
|
+
if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t))
|
|
1218
|
+
return t;
|
|
1219
|
+
if (l.isArrayBufferView(t))
|
|
1220
|
+
return t.buffer;
|
|
1221
|
+
if (l.isURLSearchParams(t))
|
|
1222
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1223
|
+
let c;
|
|
1224
|
+
if (o) {
|
|
1225
|
+
const f = we(this, "formSerializer");
|
|
1226
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1227
|
+
return us(t, f).toString();
|
|
1228
|
+
if ((c = l.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
1229
|
+
const m = we(this, "env"), u = m && m.FormData;
|
|
1230
|
+
return Xe(
|
|
1231
|
+
c ? { "files[]": t } : t,
|
|
1232
|
+
u && new u(),
|
|
1233
|
+
f
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
return o || s ? (r.setContentType("application/json", !1), ps(t)) : t;
|
|
1238
|
+
}
|
|
1239
|
+
],
|
|
1240
|
+
transformResponse: [
|
|
1241
|
+
function(t) {
|
|
1242
|
+
const r = we(this, "transitional") || Ue.transitional, n = r && r.forcedJSONParsing, s = we(this, "responseType"), o = s === "json";
|
|
1243
|
+
if (l.isResponse(t) || l.isReadableStream(t))
|
|
1244
|
+
return t;
|
|
1245
|
+
if (t && l.isString(t) && (n && !s || o)) {
|
|
1246
|
+
const c = !(r && r.silentJSONParsing) && o;
|
|
1247
|
+
try {
|
|
1248
|
+
return JSON.parse(t, we(this, "parseReviver"));
|
|
1249
|
+
} catch (f) {
|
|
1250
|
+
if (c)
|
|
1251
|
+
throw f.name === "SyntaxError" ? E.from(f, E.ERR_BAD_RESPONSE, this, null, we(this, "response")) : f;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
return t;
|
|
1255
|
+
}
|
|
1256
|
+
],
|
|
1257
|
+
/**
|
|
1258
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1259
|
+
* timeout is not created.
|
|
1260
|
+
*/
|
|
1261
|
+
timeout: 0,
|
|
1262
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
1263
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1264
|
+
maxContentLength: -1,
|
|
1265
|
+
maxBodyLength: -1,
|
|
1266
|
+
env: {
|
|
1267
|
+
FormData: L.classes.FormData,
|
|
1268
|
+
Blob: L.classes.Blob
|
|
1269
|
+
},
|
|
1270
|
+
validateStatus: function(t) {
|
|
1271
|
+
return t >= 200 && t < 300;
|
|
1272
|
+
},
|
|
1273
|
+
headers: {
|
|
1274
|
+
common: {
|
|
1275
|
+
Accept: "application/json, text/plain, */*",
|
|
1276
|
+
"Content-Type": void 0
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
};
|
|
1280
|
+
l.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (e) => {
|
|
1281
|
+
Ue.headers[e] = {};
|
|
1282
|
+
});
|
|
1283
|
+
function st(e, t) {
|
|
1284
|
+
const r = this || Ue, n = t || r, s = F.from(n.headers);
|
|
1285
|
+
let o = n.data;
|
|
1286
|
+
return l.forEach(e, function(c) {
|
|
1287
|
+
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
1288
|
+
}), s.normalize(), o;
|
|
1289
|
+
}
|
|
1290
|
+
function xr(e) {
|
|
1291
|
+
return !!(e && e.__CANCEL__);
|
|
1292
|
+
}
|
|
1293
|
+
let Fe = class extends E {
|
|
1294
|
+
/**
|
|
1295
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1296
|
+
*
|
|
1297
|
+
* @param {string=} message The message.
|
|
1298
|
+
* @param {Object=} config The config.
|
|
1299
|
+
* @param {Object=} request The request.
|
|
1300
|
+
*
|
|
1301
|
+
* @returns {CanceledError} The created error.
|
|
1302
|
+
*/
|
|
1303
|
+
constructor(t, r, n) {
|
|
1304
|
+
super(t ?? "canceled", E.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1305
|
+
}
|
|
1306
|
+
};
|
|
1307
|
+
function wr(e, t, r) {
|
|
1308
|
+
const n = r.config.validateStatus;
|
|
1309
|
+
!r.status || !n || n(r.status) ? e(r) : t(new E(
|
|
1310
|
+
"Request failed with status code " + r.status,
|
|
1311
|
+
r.status >= 400 && r.status < 500 ? E.ERR_BAD_REQUEST : E.ERR_BAD_RESPONSE,
|
|
1312
|
+
r.config,
|
|
1313
|
+
r.request,
|
|
1314
|
+
r
|
|
1315
|
+
));
|
|
1316
|
+
}
|
|
1317
|
+
function hs(e) {
|
|
1318
|
+
const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
|
|
1319
|
+
return t && t[1] || "";
|
|
1320
|
+
}
|
|
1321
|
+
function ms(e, t) {
|
|
1322
|
+
e = e || 10;
|
|
1323
|
+
const r = new Array(e), n = new Array(e);
|
|
1324
|
+
let s = 0, o = 0, a;
|
|
1325
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
1326
|
+
const m = Date.now(), u = n[o];
|
|
1327
|
+
a || (a = m), r[s] = f, n[s] = m;
|
|
1328
|
+
let d = o, R = 0;
|
|
1329
|
+
for (; d !== s; )
|
|
1330
|
+
R += r[d++], d = d % e;
|
|
1331
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), m - a < t)
|
|
1332
|
+
return;
|
|
1333
|
+
const w = u && m - u;
|
|
1334
|
+
return w ? Math.round(R * 1e3 / w) : void 0;
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
function ys(e, t) {
|
|
1338
|
+
let r = 0, n = 1e3 / t, s, o;
|
|
1339
|
+
const a = (m, u = Date.now()) => {
|
|
1340
|
+
r = u, s = null, o && (clearTimeout(o), o = null), e(...m);
|
|
1341
|
+
};
|
|
1342
|
+
return [(...m) => {
|
|
1343
|
+
const u = Date.now(), d = u - r;
|
|
1344
|
+
d >= n ? a(m, u) : (s = m, o || (o = setTimeout(() => {
|
|
1345
|
+
o = null, a(s);
|
|
1346
|
+
}, n - d)));
|
|
1347
|
+
}, () => s && a(s)];
|
|
1348
|
+
}
|
|
1349
|
+
const Ke = (e, t, r = 3) => {
|
|
1350
|
+
let n = 0;
|
|
1351
|
+
const s = ms(50, 250);
|
|
1352
|
+
return ys((o) => {
|
|
1353
|
+
if (!o || typeof o.loaded != "number")
|
|
1354
|
+
return;
|
|
1355
|
+
const a = o.loaded, c = o.lengthComputable ? o.total : void 0, f = c != null ? Math.min(a, c) : a, m = Math.max(0, f - n), u = s(m);
|
|
1356
|
+
n = Math.max(n, f);
|
|
1357
|
+
const d = {
|
|
1358
|
+
loaded: f,
|
|
1359
|
+
total: c,
|
|
1360
|
+
progress: c ? f / c : void 0,
|
|
1361
|
+
bytes: m,
|
|
1362
|
+
rate: u || void 0,
|
|
1363
|
+
estimated: u && c ? (c - f) / u : void 0,
|
|
1364
|
+
event: o,
|
|
1365
|
+
lengthComputable: c != null,
|
|
1366
|
+
[t ? "download" : "upload"]: !0
|
|
1367
|
+
};
|
|
1368
|
+
e(d);
|
|
1369
|
+
}, r);
|
|
1370
|
+
}, Ut = (e, t) => {
|
|
1371
|
+
const r = e != null;
|
|
1372
|
+
return [
|
|
1373
|
+
(n) => t[0]({
|
|
1374
|
+
lengthComputable: r,
|
|
1375
|
+
total: e,
|
|
1376
|
+
loaded: n
|
|
1377
|
+
}),
|
|
1378
|
+
t[1]
|
|
1379
|
+
];
|
|
1380
|
+
}, Ft = (e) => (...t) => l.asap(() => e(...t)), bs = L.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, L.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
1381
|
+
new URL(L.origin),
|
|
1382
|
+
L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
|
|
1383
|
+
) : () => !0, gs = L.hasStandardBrowserEnv ? (
|
|
1384
|
+
// Standard browser envs support document.cookie
|
|
1385
|
+
{
|
|
1386
|
+
write(e, t, r, n, s, o, a) {
|
|
1387
|
+
if (typeof document > "u") return;
|
|
1388
|
+
const c = [`${e}=${encodeURIComponent(t)}`];
|
|
1389
|
+
l.isNumber(r) && c.push(`expires=${new Date(r).toUTCString()}`), l.isString(n) && c.push(`path=${n}`), l.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), l.isString(a) && c.push(`SameSite=${a}`), document.cookie = c.join("; ");
|
|
1390
|
+
},
|
|
1391
|
+
read(e) {
|
|
1392
|
+
if (typeof document > "u") return null;
|
|
1393
|
+
const t = document.cookie.split(";");
|
|
1394
|
+
for (let r = 0; r < t.length; r++) {
|
|
1395
|
+
const n = t[r].replace(/^\s+/, ""), s = n.indexOf("=");
|
|
1396
|
+
if (s !== -1 && n.slice(0, s) === e)
|
|
1397
|
+
return decodeURIComponent(n.slice(s + 1));
|
|
1398
|
+
}
|
|
1399
|
+
return null;
|
|
1400
|
+
},
|
|
1401
|
+
remove(e) {
|
|
1402
|
+
this.write(e, "", Date.now() - 864e5, "/");
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
) : (
|
|
1406
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1407
|
+
{
|
|
1408
|
+
write() {
|
|
1409
|
+
},
|
|
1410
|
+
read() {
|
|
1411
|
+
return null;
|
|
1412
|
+
},
|
|
1413
|
+
remove() {
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
);
|
|
1417
|
+
function Es(e) {
|
|
1418
|
+
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1419
|
+
}
|
|
1420
|
+
function xs(e, t) {
|
|
1421
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1422
|
+
}
|
|
1423
|
+
const ws = /^https?:(?!\/\/)/i, Rs = /[\t\n\r]/g;
|
|
1424
|
+
function Ss(e) {
|
|
1425
|
+
let t = 0;
|
|
1426
|
+
for (; t < e.length && e.charCodeAt(t) <= 32; )
|
|
1427
|
+
t++;
|
|
1428
|
+
return e.slice(t);
|
|
1429
|
+
}
|
|
1430
|
+
function Os(e) {
|
|
1431
|
+
return Ss(e).replace(Rs, "");
|
|
1432
|
+
}
|
|
1433
|
+
function Bt(e, t) {
|
|
1434
|
+
if (typeof e == "string" && ws.test(Os(e)))
|
|
1435
|
+
throw new E(
|
|
1436
|
+
'Invalid URL: missing "//" after protocol',
|
|
1437
|
+
E.ERR_INVALID_URL,
|
|
1438
|
+
t
|
|
1439
|
+
);
|
|
1440
|
+
}
|
|
1441
|
+
function Rr(e, t, r, n) {
|
|
1442
|
+
Bt(t, n);
|
|
1443
|
+
let s = !Es(t);
|
|
1444
|
+
return e && (s || r === !1) ? (Bt(e, n), xs(e, t)) : t;
|
|
1445
|
+
}
|
|
1446
|
+
const qt = (e) => e instanceof F ? { ...e } : e;
|
|
1447
|
+
function xe(e, t) {
|
|
1448
|
+
t = t || {};
|
|
1449
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
1450
|
+
Object.defineProperty(r, "hasOwnProperty", {
|
|
1451
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
1452
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
1453
|
+
__proto__: null,
|
|
1454
|
+
value: Object.prototype.hasOwnProperty,
|
|
1455
|
+
enumerable: !1,
|
|
1456
|
+
writable: !0,
|
|
1457
|
+
configurable: !0
|
|
1458
|
+
});
|
|
1459
|
+
function n(u, d, R, w) {
|
|
1460
|
+
return l.isPlainObject(u) && l.isPlainObject(d) ? l.merge.call({ caseless: w }, u, d) : l.isPlainObject(d) ? l.merge({}, d) : l.isArray(d) ? d.slice() : d;
|
|
1461
|
+
}
|
|
1462
|
+
function s(u, d, R, w) {
|
|
1463
|
+
if (l.isUndefined(d)) {
|
|
1464
|
+
if (!l.isUndefined(u))
|
|
1465
|
+
return n(void 0, u, R, w);
|
|
1466
|
+
} else return n(u, d, R, w);
|
|
1467
|
+
}
|
|
1468
|
+
function o(u, d) {
|
|
1469
|
+
if (!l.isUndefined(d))
|
|
1470
|
+
return n(void 0, d);
|
|
1471
|
+
}
|
|
1472
|
+
function a(u, d) {
|
|
1473
|
+
if (l.isUndefined(d)) {
|
|
1474
|
+
if (!l.isUndefined(u))
|
|
1475
|
+
return n(void 0, u);
|
|
1476
|
+
} else return n(void 0, d);
|
|
1477
|
+
}
|
|
1478
|
+
function c(u) {
|
|
1479
|
+
const d = l.hasOwnProp(t, "transitional") ? t.transitional : void 0;
|
|
1480
|
+
if (!l.isUndefined(d))
|
|
1481
|
+
if (l.isPlainObject(d)) {
|
|
1482
|
+
if (l.hasOwnProp(d, u))
|
|
1483
|
+
return d[u];
|
|
1484
|
+
} else
|
|
1485
|
+
return;
|
|
1486
|
+
const R = l.hasOwnProp(e, "transitional") ? e.transitional : void 0;
|
|
1487
|
+
if (l.isPlainObject(R) && l.hasOwnProp(R, u))
|
|
1488
|
+
return R[u];
|
|
1489
|
+
}
|
|
1490
|
+
function f(u, d, R) {
|
|
1491
|
+
if (l.hasOwnProp(t, R))
|
|
1492
|
+
return n(u, d);
|
|
1493
|
+
if (l.hasOwnProp(e, R))
|
|
1494
|
+
return n(void 0, u);
|
|
1495
|
+
}
|
|
1496
|
+
const m = {
|
|
1497
|
+
url: o,
|
|
1498
|
+
method: o,
|
|
1499
|
+
data: o,
|
|
1500
|
+
baseURL: a,
|
|
1501
|
+
transformRequest: a,
|
|
1502
|
+
transformResponse: a,
|
|
1503
|
+
paramsSerializer: a,
|
|
1504
|
+
timeout: a,
|
|
1505
|
+
timeoutMessage: a,
|
|
1506
|
+
withCredentials: a,
|
|
1507
|
+
withXSRFToken: a,
|
|
1508
|
+
adapter: a,
|
|
1509
|
+
responseType: a,
|
|
1510
|
+
xsrfCookieName: a,
|
|
1511
|
+
xsrfHeaderName: a,
|
|
1512
|
+
onUploadProgress: a,
|
|
1513
|
+
onDownloadProgress: a,
|
|
1514
|
+
decompress: a,
|
|
1515
|
+
maxContentLength: a,
|
|
1516
|
+
maxBodyLength: a,
|
|
1517
|
+
beforeRedirect: a,
|
|
1518
|
+
transport: a,
|
|
1519
|
+
httpAgent: a,
|
|
1520
|
+
httpsAgent: a,
|
|
1521
|
+
cancelToken: a,
|
|
1522
|
+
socketPath: a,
|
|
1523
|
+
allowedSocketPaths: a,
|
|
1524
|
+
responseEncoding: a,
|
|
1525
|
+
validateStatus: f,
|
|
1526
|
+
headers: (u, d, R) => s(qt(u), qt(d), R, !0)
|
|
1527
|
+
};
|
|
1528
|
+
return l.forEach(Object.keys({ ...e, ...t }), function(d) {
|
|
1529
|
+
if (d === "__proto__" || d === "constructor" || d === "prototype") return;
|
|
1530
|
+
const R = l.hasOwnProp(m, d) ? m[d] : s, w = l.hasOwnProp(e, d) ? e[d] : void 0, j = l.hasOwnProp(t, d) ? t[d] : void 0, x = R(w, j, d);
|
|
1531
|
+
l.isUndefined(x) && R !== f || (r[d] = x);
|
|
1532
|
+
}), l.hasOwnProp(t, "validateStatus") && l.isUndefined(t.validateStatus) && c("validateStatusUndefinedResolves") === !1 && (l.hasOwnProp(e, "validateStatus") ? r.validateStatus = n(void 0, e.validateStatus) : delete r.validateStatus), r;
|
|
1533
|
+
}
|
|
1534
|
+
const Ts = ["content-type", "content-length"];
|
|
1535
|
+
function _s(e, t, r) {
|
|
1536
|
+
if (r !== "content-only") {
|
|
1537
|
+
e.set(t);
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
Object.entries(t).forEach(([n, s]) => {
|
|
1541
|
+
Ts.includes(n.toLowerCase()) && e.set(n, s);
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
const As = (e) => encodeURIComponent(e).replace(
|
|
1545
|
+
/%([0-9A-F]{2})/gi,
|
|
1546
|
+
(t, r) => String.fromCharCode(parseInt(r, 16))
|
|
1547
|
+
);
|
|
1548
|
+
function Sr(e) {
|
|
1549
|
+
const t = xe({}, e), r = (R) => l.hasOwnProp(t, R) ? t[R] : void 0, n = r("data");
|
|
1550
|
+
let s = r("withXSRFToken");
|
|
1551
|
+
const o = r("xsrfHeaderName"), a = r("xsrfCookieName");
|
|
1552
|
+
let c = r("headers");
|
|
1553
|
+
const f = r("auth"), m = r("baseURL"), u = r("allowAbsoluteUrls"), d = r("url");
|
|
1554
|
+
if (t.headers = c = F.from(c), t.url = br(
|
|
1555
|
+
Rr(m, d, u, t),
|
|
1556
|
+
r("params"),
|
|
1557
|
+
r("paramsSerializer")
|
|
1558
|
+
), f) {
|
|
1559
|
+
const R = l.getSafeProp(f, "username") || "", w = l.getSafeProp(f, "password") || "";
|
|
1560
|
+
c.set(
|
|
1561
|
+
"Authorization",
|
|
1562
|
+
"Basic " + btoa(R + ":" + (w ? As(w) : ""))
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
if (l.isFormData(n) && (L.hasStandardBrowserEnv || L.hasStandardBrowserWebWorkerEnv || l.isReactNative(n) ? c.setContentType(void 0) : l.isFunction(n.getHeaders) && _s(c, n.getHeaders(), r("formDataHeaderPolicy"))), L.hasStandardBrowserEnv && (l.isFunction(s) && (s = s(t)), s === !0 || s == null && bs(t.url))) {
|
|
1566
|
+
const w = o && a && gs.read(a);
|
|
1567
|
+
w && c.set(o, w);
|
|
1568
|
+
}
|
|
1569
|
+
return t;
|
|
1570
|
+
}
|
|
1571
|
+
const js = typeof XMLHttpRequest < "u", Cs = js && function(e) {
|
|
1572
|
+
return new Promise(function(r, n) {
|
|
1573
|
+
const s = Sr(e);
|
|
1574
|
+
let o = s.data;
|
|
1575
|
+
const a = F.from(s.headers).normalize();
|
|
1576
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: m } = s, u, d, R, w, j;
|
|
1577
|
+
function x() {
|
|
1578
|
+
w && w(), j && j(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1579
|
+
}
|
|
1580
|
+
let b = new XMLHttpRequest();
|
|
1581
|
+
b.open(s.method.toUpperCase(), s.url, !0), b.timeout = s.timeout;
|
|
1582
|
+
function h() {
|
|
1583
|
+
if (!b)
|
|
1584
|
+
return;
|
|
1585
|
+
const O = F.from(
|
|
1586
|
+
"getAllResponseHeaders" in b && b.getAllResponseHeaders()
|
|
1587
|
+
), N = {
|
|
1588
|
+
data: !c || c === "text" || c === "json" ? b.responseText : b.response,
|
|
1589
|
+
status: b.status,
|
|
1590
|
+
statusText: b.statusText,
|
|
1591
|
+
headers: O,
|
|
1592
|
+
config: e,
|
|
1593
|
+
request: b
|
|
1594
|
+
};
|
|
1595
|
+
wr(
|
|
1596
|
+
function(k) {
|
|
1597
|
+
r(k), x();
|
|
1598
|
+
},
|
|
1599
|
+
function(k) {
|
|
1600
|
+
n(k), x();
|
|
1601
|
+
},
|
|
1602
|
+
N
|
|
1603
|
+
), b = null;
|
|
1604
|
+
}
|
|
1605
|
+
"onloadend" in b ? b.onloadend = h : b.onreadystatechange = function() {
|
|
1606
|
+
!b || b.readyState !== 4 || b.status === 0 && !(b.responseURL && b.responseURL.startsWith("file:")) || setTimeout(h);
|
|
1607
|
+
}, b.onabort = function() {
|
|
1608
|
+
b && (n(new E("Request aborted", E.ECONNABORTED, e, b)), x(), b = null);
|
|
1609
|
+
}, b.onerror = function(g) {
|
|
1610
|
+
const N = g && g.message ? g.message : "Network Error", v = new E(N, E.ERR_NETWORK, e, b);
|
|
1611
|
+
v.event = g || null, n(v), x(), b = null;
|
|
1612
|
+
}, b.ontimeout = function() {
|
|
1613
|
+
let g = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1614
|
+
const N = s.transitional || xt;
|
|
1615
|
+
s.timeoutErrorMessage && (g = s.timeoutErrorMessage), n(
|
|
1616
|
+
new E(
|
|
1617
|
+
g,
|
|
1618
|
+
N.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1619
|
+
e,
|
|
1620
|
+
b
|
|
1621
|
+
)
|
|
1622
|
+
), x(), b = null;
|
|
1623
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in b && l.forEach(dr(a), function(g, N) {
|
|
1624
|
+
b.setRequestHeader(N, g);
|
|
1625
|
+
}), l.isUndefined(s.withCredentials) || (b.withCredentials = !!s.withCredentials), c && c !== "json" && (b.responseType = s.responseType), m && ([R, j] = Ke(m, !0), b.addEventListener("progress", R)), f && b.upload && ([d, w] = Ke(f), b.upload.addEventListener("progress", d), b.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (u = (O) => {
|
|
1626
|
+
b && (n(!O || O.type ? new Fe(null, e, b) : O), b.abort(), x(), b = null);
|
|
1627
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1628
|
+
const S = hs(s.url);
|
|
1629
|
+
if (S && !L.protocols.includes(S)) {
|
|
1630
|
+
n(
|
|
1631
|
+
new E(
|
|
1632
|
+
"Unsupported protocol " + S + ":",
|
|
1633
|
+
E.ERR_BAD_REQUEST,
|
|
1634
|
+
e
|
|
1635
|
+
)
|
|
1636
|
+
);
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
b.send(o || null);
|
|
1640
|
+
});
|
|
1641
|
+
}, Ps = (e, t) => {
|
|
1642
|
+
if (e = e ? e.filter(Boolean) : [], !t && !e.length)
|
|
1643
|
+
return;
|
|
1644
|
+
const r = new AbortController();
|
|
1645
|
+
let n = !1;
|
|
1646
|
+
const s = function(f) {
|
|
1647
|
+
if (!n) {
|
|
1648
|
+
n = !0, a();
|
|
1649
|
+
const m = f instanceof Error ? f : this.reason;
|
|
1650
|
+
r.abort(
|
|
1651
|
+
m instanceof E ? m : new Fe(m instanceof Error ? m.message : m)
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1654
|
+
};
|
|
1655
|
+
let o = t && setTimeout(() => {
|
|
1656
|
+
o = null, s(new E(`timeout of ${t}ms exceeded`, E.ETIMEDOUT));
|
|
1657
|
+
}, t);
|
|
1658
|
+
const a = () => {
|
|
1659
|
+
e && (o && clearTimeout(o), o = null, e.forEach((f) => {
|
|
1660
|
+
f.unsubscribe ? f.unsubscribe(s) : f.removeEventListener("abort", s);
|
|
1661
|
+
}), e = null);
|
|
1662
|
+
};
|
|
1663
|
+
e.forEach((f) => f.addEventListener("abort", s));
|
|
1664
|
+
const { signal: c } = r;
|
|
1665
|
+
return c.unsubscribe = () => l.asap(a), c;
|
|
1666
|
+
}, Ns = function* (e, t) {
|
|
1667
|
+
let r = e.byteLength;
|
|
1668
|
+
if (r < t) {
|
|
1669
|
+
yield e;
|
|
1670
|
+
return;
|
|
1671
|
+
}
|
|
1672
|
+
let n = 0, s;
|
|
1673
|
+
for (; n < r; )
|
|
1674
|
+
s = n + t, yield e.slice(n, s), n = s;
|
|
1675
|
+
}, vs = async function* (e, t) {
|
|
1676
|
+
for await (const r of ks(e))
|
|
1677
|
+
yield* Ns(r, t);
|
|
1678
|
+
}, ks = async function* (e) {
|
|
1679
|
+
if (e[Symbol.asyncIterator]) {
|
|
1680
|
+
yield* e;
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1683
|
+
const t = e.getReader();
|
|
1684
|
+
try {
|
|
1685
|
+
for (; ; ) {
|
|
1686
|
+
const { done: r, value: n } = await t.read();
|
|
1687
|
+
if (r)
|
|
1688
|
+
break;
|
|
1689
|
+
yield n;
|
|
1690
|
+
}
|
|
1691
|
+
} finally {
|
|
1692
|
+
await t.cancel();
|
|
1693
|
+
}
|
|
1694
|
+
}, zt = (e, t, r, n) => {
|
|
1695
|
+
const s = vs(e, t);
|
|
1696
|
+
let o = 0, a, c = (f) => {
|
|
1697
|
+
a || (a = !0, n && n(f));
|
|
1698
|
+
};
|
|
1699
|
+
return new ReadableStream(
|
|
1700
|
+
{
|
|
1701
|
+
async pull(f) {
|
|
1702
|
+
try {
|
|
1703
|
+
const { done: m, value: u } = await s.next();
|
|
1704
|
+
if (m) {
|
|
1705
|
+
c(), f.close();
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
let d = u.byteLength;
|
|
1709
|
+
if (r) {
|
|
1710
|
+
let R = o += d;
|
|
1711
|
+
r(R);
|
|
1712
|
+
}
|
|
1713
|
+
f.enqueue(new Uint8Array(u));
|
|
1714
|
+
} catch (m) {
|
|
1715
|
+
throw c(m), m;
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1718
|
+
cancel(f) {
|
|
1719
|
+
return c(f), s.return();
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
highWaterMark: 2
|
|
1724
|
+
}
|
|
1725
|
+
);
|
|
1726
|
+
}, Ge = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, Ds = (e, t, r) => t + 2 < r && Ge(e.charCodeAt(t + 1)) && Ge(e.charCodeAt(t + 2));
|
|
1727
|
+
function Is(e) {
|
|
1728
|
+
if (!e || typeof e != "string" || !e.startsWith("data:")) return 0;
|
|
1729
|
+
const t = e.indexOf(",");
|
|
1730
|
+
if (t < 0) return 0;
|
|
1731
|
+
const r = e.slice(5, t), n = e.slice(t + 1);
|
|
1732
|
+
if (/;base64/i.test(r)) {
|
|
1733
|
+
let a = n.length;
|
|
1734
|
+
const c = n.length;
|
|
1735
|
+
for (let w = 0; w < c; w++)
|
|
1736
|
+
if (n.charCodeAt(w) === 37 && w + 2 < c) {
|
|
1737
|
+
const j = n.charCodeAt(w + 1), x = n.charCodeAt(w + 2);
|
|
1738
|
+
Ge(j) && Ge(x) && (a -= 2, w += 2);
|
|
1739
|
+
}
|
|
1740
|
+
let f = 0, m = c - 1;
|
|
1741
|
+
const u = (w) => w >= 2 && n.charCodeAt(w - 2) === 37 && // '%'
|
|
1742
|
+
n.charCodeAt(w - 1) === 51 && // '3'
|
|
1743
|
+
(n.charCodeAt(w) === 68 || n.charCodeAt(w) === 100);
|
|
1744
|
+
m >= 0 && (n.charCodeAt(m) === 61 ? (f++, m--) : u(m) && (f++, m -= 3)), f === 1 && m >= 0 && (n.charCodeAt(m) === 61 || u(m)) && f++;
|
|
1745
|
+
const R = Math.floor(a / 4) * 3 - (f || 0);
|
|
1746
|
+
return R > 0 ? R : 0;
|
|
1747
|
+
}
|
|
1748
|
+
let o = 0;
|
|
1749
|
+
for (let a = 0, c = n.length; a < c; a++) {
|
|
1750
|
+
const f = n.charCodeAt(a);
|
|
1751
|
+
if (f === 37 && Ds(n, a, c))
|
|
1752
|
+
o += 1, a += 2;
|
|
1753
|
+
else if (f < 128)
|
|
1754
|
+
o += 1;
|
|
1755
|
+
else if (f < 2048)
|
|
1756
|
+
o += 2;
|
|
1757
|
+
else if (f >= 55296 && f <= 56319 && a + 1 < c) {
|
|
1758
|
+
const m = n.charCodeAt(a + 1);
|
|
1759
|
+
m >= 56320 && m <= 57343 ? (o += 4, a++) : o += 3;
|
|
1760
|
+
} else
|
|
1761
|
+
o += 3;
|
|
1762
|
+
}
|
|
1763
|
+
return o;
|
|
1764
|
+
}
|
|
1765
|
+
const Rt = "1.18.0", $t = 64 * 1024, { isFunction: ze } = l, Ls = (e) => encodeURIComponent(e).replace(
|
|
1766
|
+
/%([0-9A-F]{2})/gi,
|
|
1767
|
+
(t, r) => String.fromCharCode(parseInt(r, 16))
|
|
1768
|
+
), Ht = (e) => {
|
|
1769
|
+
if (!l.isString(e))
|
|
1770
|
+
return e;
|
|
1771
|
+
try {
|
|
1772
|
+
return decodeURIComponent(e);
|
|
1773
|
+
} catch {
|
|
1774
|
+
return e;
|
|
1775
|
+
}
|
|
1776
|
+
}, Mt = (e, ...t) => {
|
|
1777
|
+
try {
|
|
1778
|
+
return !!e(...t);
|
|
1779
|
+
} catch {
|
|
1780
|
+
return !1;
|
|
1781
|
+
}
|
|
1782
|
+
}, Us = (e) => {
|
|
1783
|
+
const t = e.indexOf("://");
|
|
1784
|
+
let r = e;
|
|
1785
|
+
return t !== -1 && (r = r.slice(t + 3)), r.includes("@") || r.includes(":");
|
|
1786
|
+
}, Fs = (e) => {
|
|
1787
|
+
const t = l.global !== void 0 && l.global !== null ? l.global : globalThis, { ReadableStream: r, TextEncoder: n } = t;
|
|
1788
|
+
e = l.merge.call(
|
|
1789
|
+
{
|
|
1790
|
+
skipUndefined: !0
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
Request: t.Request,
|
|
1794
|
+
Response: t.Response
|
|
1795
|
+
},
|
|
1796
|
+
e
|
|
1797
|
+
);
|
|
1798
|
+
const { fetch: s, Request: o, Response: a } = e, c = s ? ze(s) : typeof fetch == "function", f = ze(o), m = ze(a);
|
|
1799
|
+
if (!c)
|
|
1800
|
+
return !1;
|
|
1801
|
+
const u = c && ze(r), d = c && (typeof n == "function" ? /* @__PURE__ */ ((h) => (S) => h.encode(S))(new n()) : async (h) => new Uint8Array(await new o(h).arrayBuffer())), R = f && u && Mt(() => {
|
|
1802
|
+
let h = !1;
|
|
1803
|
+
const S = new o(L.origin, {
|
|
1804
|
+
body: new r(),
|
|
1805
|
+
method: "POST",
|
|
1806
|
+
get duplex() {
|
|
1807
|
+
return h = !0, "half";
|
|
1808
|
+
}
|
|
1809
|
+
}), O = S.headers.has("Content-Type");
|
|
1810
|
+
return S.body != null && S.body.cancel(), h && !O;
|
|
1811
|
+
}), w = m && u && Mt(() => l.isReadableStream(new a("").body)), j = {
|
|
1812
|
+
stream: w && ((h) => h.body)
|
|
1813
|
+
};
|
|
1814
|
+
c && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((h) => {
|
|
1815
|
+
!j[h] && (j[h] = (S, O) => {
|
|
1816
|
+
let g = S && S[h];
|
|
1817
|
+
if (g)
|
|
1818
|
+
return g.call(S);
|
|
1819
|
+
throw new E(
|
|
1820
|
+
`Response type '${h}' is not supported`,
|
|
1821
|
+
E.ERR_NOT_SUPPORT,
|
|
1822
|
+
O
|
|
1823
|
+
);
|
|
1824
|
+
});
|
|
1825
|
+
});
|
|
1826
|
+
const x = async (h) => {
|
|
1827
|
+
if (h == null)
|
|
1828
|
+
return 0;
|
|
1829
|
+
if (l.isBlob(h))
|
|
1830
|
+
return h.size;
|
|
1831
|
+
if (l.isSpecCompliantForm(h))
|
|
1832
|
+
return (await new o(L.origin, {
|
|
1833
|
+
method: "POST",
|
|
1834
|
+
body: h
|
|
1835
|
+
}).arrayBuffer()).byteLength;
|
|
1836
|
+
if (l.isArrayBufferView(h) || l.isArrayBuffer(h))
|
|
1837
|
+
return h.byteLength;
|
|
1838
|
+
if (l.isURLSearchParams(h) && (h = h + ""), l.isString(h))
|
|
1839
|
+
return (await d(h)).byteLength;
|
|
1840
|
+
}, b = async (h, S) => {
|
|
1841
|
+
const O = l.toFiniteNumber(h.getContentLength());
|
|
1842
|
+
return O ?? x(S);
|
|
1843
|
+
};
|
|
1844
|
+
return async (h) => {
|
|
1845
|
+
let {
|
|
1846
|
+
url: S,
|
|
1847
|
+
method: O,
|
|
1848
|
+
data: g,
|
|
1849
|
+
signal: N,
|
|
1850
|
+
cancelToken: v,
|
|
1851
|
+
timeout: k,
|
|
1852
|
+
onDownloadProgress: B,
|
|
1853
|
+
onUploadProgress: q,
|
|
1854
|
+
responseType: Y,
|
|
1855
|
+
headers: X,
|
|
1856
|
+
withCredentials: Q = "same-origin",
|
|
1857
|
+
fetchOptions: ue,
|
|
1858
|
+
maxContentLength: z,
|
|
1859
|
+
maxBodyLength: Z
|
|
1860
|
+
} = Sr(h);
|
|
1861
|
+
const te = l.isNumber(z) && z > -1, ae = l.isNumber(Z) && Z > -1, me = (P) => l.hasOwnProp(h, P) ? h[P] : void 0;
|
|
1862
|
+
let fe = s || fetch;
|
|
1863
|
+
Y = Y ? (Y + "").toLowerCase() : "text";
|
|
1864
|
+
let $ = Ps(
|
|
1865
|
+
[N, v && v.toAbortSignal()],
|
|
1866
|
+
k
|
|
1867
|
+
), i = null;
|
|
1868
|
+
const y = $ && $.unsubscribe && (() => {
|
|
1869
|
+
$.unsubscribe();
|
|
1870
|
+
});
|
|
1871
|
+
let T, A = null;
|
|
1872
|
+
const re = () => new E(
|
|
1873
|
+
"Request body larger than maxBodyLength limit",
|
|
1874
|
+
E.ERR_BAD_REQUEST,
|
|
1875
|
+
h,
|
|
1876
|
+
i
|
|
1877
|
+
);
|
|
1878
|
+
try {
|
|
1879
|
+
let P;
|
|
1880
|
+
const _ = me("auth");
|
|
1881
|
+
if (_) {
|
|
1882
|
+
const C = l.getSafeProp(_, "username") || "", V = l.getSafeProp(_, "password") || "";
|
|
1883
|
+
P = {
|
|
1884
|
+
username: C,
|
|
1885
|
+
password: V
|
|
1886
|
+
};
|
|
1887
|
+
}
|
|
1888
|
+
if (Us(S)) {
|
|
1889
|
+
const C = new URL(S, L.origin);
|
|
1890
|
+
if (!P && (C.username || C.password)) {
|
|
1891
|
+
const V = Ht(C.username), de = Ht(C.password);
|
|
1892
|
+
P = {
|
|
1893
|
+
username: V,
|
|
1894
|
+
password: de
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
(C.username || C.password) && (C.username = "", C.password = "", S = C.href);
|
|
1898
|
+
}
|
|
1899
|
+
if (P && (X.delete("authorization"), X.set(
|
|
1900
|
+
"Authorization",
|
|
1901
|
+
"Basic " + btoa(Ls((P.username || "") + ":" + (P.password || "")))
|
|
1902
|
+
)), te && typeof S == "string" && S.startsWith("data:") && Is(S) > z)
|
|
1903
|
+
throw new E(
|
|
1904
|
+
"maxContentLength size of " + z + " exceeded",
|
|
1905
|
+
E.ERR_BAD_RESPONSE,
|
|
1906
|
+
h,
|
|
1907
|
+
i
|
|
1908
|
+
);
|
|
1909
|
+
if (ae && O !== "get" && O !== "head") {
|
|
1910
|
+
const C = await x(g);
|
|
1911
|
+
if (typeof C == "number" && isFinite(C) && (T = C, C > Z))
|
|
1912
|
+
throw re();
|
|
1913
|
+
}
|
|
1914
|
+
const I = ae && (l.isReadableStream(g) || l.isStream(g)), oe = (C, V, de) => zt(
|
|
1915
|
+
C,
|
|
1916
|
+
$t,
|
|
1917
|
+
(ye) => {
|
|
1918
|
+
if (ae && ye > Z)
|
|
1919
|
+
throw A = re();
|
|
1920
|
+
V && V(ye);
|
|
1921
|
+
},
|
|
1922
|
+
de
|
|
1923
|
+
);
|
|
1924
|
+
if (R && O !== "get" && O !== "head" && (q || I)) {
|
|
1925
|
+
if (T = T ?? await b(X, g), T !== 0 || I) {
|
|
1926
|
+
let C = new o(S, {
|
|
1927
|
+
method: "POST",
|
|
1928
|
+
body: g,
|
|
1929
|
+
duplex: "half"
|
|
1930
|
+
}), V;
|
|
1931
|
+
if (l.isFormData(g) && (V = C.headers.get("content-type")) && X.setContentType(V), C.body) {
|
|
1932
|
+
const [de, ye] = q && Ut(
|
|
1933
|
+
T,
|
|
1934
|
+
Ke(Ft(q))
|
|
1935
|
+
) || [];
|
|
1936
|
+
g = oe(C.body, de, ye);
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
} else if (I && !f && u && O !== "get" && O !== "head")
|
|
1940
|
+
g = oe(g);
|
|
1941
|
+
else if (I && f && !R && O !== "get" && O !== "head")
|
|
1942
|
+
throw new E(
|
|
1943
|
+
"Stream request bodies are not supported by the current fetch implementation",
|
|
1944
|
+
E.ERR_NOT_SUPPORT,
|
|
1945
|
+
h,
|
|
1946
|
+
i
|
|
1947
|
+
);
|
|
1948
|
+
l.isString(Q) || (Q = Q ? "include" : "omit");
|
|
1949
|
+
const Ae = f && "credentials" in o.prototype;
|
|
1950
|
+
if (l.isFormData(g)) {
|
|
1951
|
+
const C = X.getContentType();
|
|
1952
|
+
C && /^multipart\/form-data/i.test(C) && !/boundary=/i.test(C) && X.delete("content-type");
|
|
1953
|
+
}
|
|
1954
|
+
X.set("User-Agent", "axios/" + Rt, !1);
|
|
1955
|
+
const Ot = {
|
|
1956
|
+
...ue,
|
|
1957
|
+
signal: $,
|
|
1958
|
+
method: O.toUpperCase(),
|
|
1959
|
+
headers: dr(X.normalize()),
|
|
1960
|
+
body: g,
|
|
1961
|
+
duplex: "half",
|
|
1962
|
+
credentials: Ae ? Q : void 0
|
|
1963
|
+
};
|
|
1964
|
+
i = f && new o(S, Ot);
|
|
1965
|
+
let le = await (f ? fe(i, ue) : fe(S, Ot));
|
|
1966
|
+
const Tt = F.from(le.headers);
|
|
1967
|
+
if (te) {
|
|
1968
|
+
const C = l.toFiniteNumber(Tt.getContentLength());
|
|
1969
|
+
if (C != null && C > z)
|
|
1970
|
+
throw new E(
|
|
1971
|
+
"maxContentLength size of " + z + " exceeded",
|
|
1972
|
+
E.ERR_BAD_RESPONSE,
|
|
1973
|
+
h,
|
|
1974
|
+
i
|
|
1975
|
+
);
|
|
1976
|
+
}
|
|
1977
|
+
const Ze = w && (Y === "stream" || Y === "response");
|
|
1978
|
+
if (w && le.body && (B || te || Ze && y)) {
|
|
1979
|
+
const C = {};
|
|
1980
|
+
["status", "statusText", "headers"].forEach((je) => {
|
|
1981
|
+
C[je] = le[je];
|
|
1982
|
+
});
|
|
1983
|
+
const V = l.toFiniteNumber(Tt.getContentLength()), [de, ye] = B && Ut(
|
|
1984
|
+
V,
|
|
1985
|
+
Ke(Ft(B), !0)
|
|
1986
|
+
) || [];
|
|
1987
|
+
let _t = 0;
|
|
1988
|
+
const Pr = (je) => {
|
|
1989
|
+
if (te && (_t = je, _t > z))
|
|
1990
|
+
throw new E(
|
|
1991
|
+
"maxContentLength size of " + z + " exceeded",
|
|
1992
|
+
E.ERR_BAD_RESPONSE,
|
|
1993
|
+
h,
|
|
1994
|
+
i
|
|
1995
|
+
);
|
|
1996
|
+
de && de(je);
|
|
1997
|
+
};
|
|
1998
|
+
le = new a(
|
|
1999
|
+
zt(le.body, $t, Pr, () => {
|
|
2000
|
+
ye && ye(), y && y();
|
|
2001
|
+
}),
|
|
2002
|
+
C
|
|
2003
|
+
);
|
|
2004
|
+
}
|
|
2005
|
+
Y = Y || "text";
|
|
2006
|
+
let ce = await j[l.findKey(j, Y) || "text"](
|
|
2007
|
+
le,
|
|
2008
|
+
h
|
|
2009
|
+
);
|
|
2010
|
+
if (te && !w && !Ze) {
|
|
2011
|
+
let C;
|
|
2012
|
+
if (ce != null && (typeof ce.byteLength == "number" ? C = ce.byteLength : typeof ce.size == "number" ? C = ce.size : typeof ce == "string" && (C = typeof n == "function" ? new n().encode(ce).byteLength : ce.length)), typeof C == "number" && C > z)
|
|
2013
|
+
throw new E(
|
|
2014
|
+
"maxContentLength size of " + z + " exceeded",
|
|
2015
|
+
E.ERR_BAD_RESPONSE,
|
|
2016
|
+
h,
|
|
2017
|
+
i
|
|
2018
|
+
);
|
|
2019
|
+
}
|
|
2020
|
+
return !Ze && y && y(), await new Promise((C, V) => {
|
|
2021
|
+
wr(C, V, {
|
|
2022
|
+
data: ce,
|
|
2023
|
+
headers: F.from(le.headers),
|
|
2024
|
+
status: le.status,
|
|
2025
|
+
statusText: le.statusText,
|
|
2026
|
+
config: h,
|
|
2027
|
+
request: i
|
|
2028
|
+
});
|
|
2029
|
+
});
|
|
2030
|
+
} catch (P) {
|
|
2031
|
+
if (y && y(), $ && $.aborted && $.reason instanceof E) {
|
|
2032
|
+
const _ = $.reason;
|
|
2033
|
+
throw _.config = h, i && (_.request = i), P !== _ && (_.cause = P), _;
|
|
2034
|
+
}
|
|
2035
|
+
throw A ? (i && !A.request && (A.request = i), A) : P instanceof E ? (i && !P.request && (P.request = i), P) : P && P.name === "TypeError" && /Load failed|fetch/i.test(P.message) ? Object.assign(
|
|
2036
|
+
new E(
|
|
2037
|
+
"Network Error",
|
|
2038
|
+
E.ERR_NETWORK,
|
|
2039
|
+
h,
|
|
2040
|
+
i,
|
|
2041
|
+
P && P.response
|
|
2042
|
+
),
|
|
2043
|
+
{
|
|
2044
|
+
cause: P.cause || P
|
|
2045
|
+
}
|
|
2046
|
+
) : E.from(P, P && P.code, h, i, P && P.response);
|
|
2047
|
+
}
|
|
2048
|
+
};
|
|
2049
|
+
}, Bs = /* @__PURE__ */ new Map(), Or = (e) => {
|
|
2050
|
+
let t = e && e.env || {};
|
|
2051
|
+
const { fetch: r, Request: n, Response: s } = t, o = [n, s, r];
|
|
2052
|
+
let a = o.length, c = a, f, m, u = Bs;
|
|
2053
|
+
for (; c--; )
|
|
2054
|
+
f = o[c], m = u.get(f), m === void 0 && u.set(f, m = c ? /* @__PURE__ */ new Map() : Fs(t)), u = m;
|
|
2055
|
+
return m;
|
|
2056
|
+
};
|
|
2057
|
+
Or();
|
|
2058
|
+
const St = {
|
|
2059
|
+
http: Qn,
|
|
2060
|
+
xhr: Cs,
|
|
2061
|
+
fetch: {
|
|
2062
|
+
get: Or
|
|
2063
|
+
}
|
|
2064
|
+
};
|
|
2065
|
+
l.forEach(St, (e, t) => {
|
|
2066
|
+
if (e) {
|
|
2067
|
+
try {
|
|
2068
|
+
Object.defineProperty(e, "name", { __proto__: null, value: t });
|
|
2069
|
+
} catch {
|
|
2070
|
+
}
|
|
2071
|
+
Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
|
|
2072
|
+
}
|
|
2073
|
+
});
|
|
2074
|
+
const Vt = (e) => `- ${e}`, qs = (e) => l.isFunction(e) || e === null || e === !1;
|
|
2075
|
+
function zs(e, t) {
|
|
2076
|
+
e = l.isArray(e) ? e : [e];
|
|
2077
|
+
const { length: r } = e;
|
|
2078
|
+
let n, s;
|
|
2079
|
+
const o = {};
|
|
2080
|
+
for (let a = 0; a < r; a++) {
|
|
2081
|
+
n = e[a];
|
|
2082
|
+
let c;
|
|
2083
|
+
if (s = n, !qs(n) && (s = St[(c = String(n)).toLowerCase()], s === void 0))
|
|
2084
|
+
throw new E(`Unknown adapter '${c}'`);
|
|
2085
|
+
if (s && (l.isFunction(s) || (s = s.get(t))))
|
|
2086
|
+
break;
|
|
2087
|
+
o[c || "#" + a] = s;
|
|
2088
|
+
}
|
|
2089
|
+
if (!s) {
|
|
2090
|
+
const a = Object.entries(o).map(
|
|
2091
|
+
([f, m]) => `adapter ${f} ` + (m === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2092
|
+
);
|
|
2093
|
+
let c = r ? a.length > 1 ? `since :
|
|
2094
|
+
` + a.map(Vt).join(`
|
|
2095
|
+
`) : " " + Vt(a[0]) : "as no adapter specified";
|
|
2096
|
+
throw new E(
|
|
2097
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
2098
|
+
"ERR_NOT_SUPPORT"
|
|
2099
|
+
);
|
|
2100
|
+
}
|
|
2101
|
+
return s;
|
|
2102
|
+
}
|
|
2103
|
+
const Tr = {
|
|
2104
|
+
/**
|
|
2105
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
2106
|
+
* @type {Function}
|
|
2107
|
+
*/
|
|
2108
|
+
getAdapter: zs,
|
|
2109
|
+
/**
|
|
2110
|
+
* Exposes all known adapters
|
|
2111
|
+
* @type {Object<string, Function|Object>}
|
|
2112
|
+
*/
|
|
2113
|
+
adapters: St
|
|
2114
|
+
};
|
|
2115
|
+
function ot(e) {
|
|
2116
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2117
|
+
throw new Fe(null, e);
|
|
2118
|
+
}
|
|
2119
|
+
function Jt(e) {
|
|
2120
|
+
return ot(e), e.headers = F.from(e.headers), e.data = st.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tr.getAdapter(e.adapter || Ue.adapter, e)(e).then(
|
|
2121
|
+
function(n) {
|
|
2122
|
+
ot(e), e.response = n;
|
|
2123
|
+
try {
|
|
2124
|
+
n.data = st.call(e, e.transformResponse, n);
|
|
2125
|
+
} finally {
|
|
2126
|
+
delete e.response;
|
|
2127
|
+
}
|
|
2128
|
+
return n.headers = F.from(n.headers), n;
|
|
2129
|
+
},
|
|
2130
|
+
function(n) {
|
|
2131
|
+
if (!xr(n) && (ot(e), n && n.response)) {
|
|
2132
|
+
e.response = n.response;
|
|
2133
|
+
try {
|
|
2134
|
+
n.response.data = st.call(
|
|
2135
|
+
e,
|
|
2136
|
+
e.transformResponse,
|
|
2137
|
+
n.response
|
|
2138
|
+
);
|
|
2139
|
+
} finally {
|
|
2140
|
+
delete e.response;
|
|
2141
|
+
}
|
|
2142
|
+
n.response.headers = F.from(n.response.headers);
|
|
2143
|
+
}
|
|
2144
|
+
return Promise.reject(n);
|
|
2145
|
+
}
|
|
2146
|
+
);
|
|
2147
|
+
}
|
|
2148
|
+
const Qe = {};
|
|
2149
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2150
|
+
Qe[e] = function(n) {
|
|
2151
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2152
|
+
};
|
|
2153
|
+
});
|
|
2154
|
+
const Wt = {};
|
|
2155
|
+
Qe.transitional = function(t, r, n) {
|
|
2156
|
+
function s(o, a) {
|
|
2157
|
+
return "[Axios v" + Rt + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
|
|
2158
|
+
}
|
|
2159
|
+
return (o, a, c) => {
|
|
2160
|
+
if (t === !1)
|
|
2161
|
+
throw new E(
|
|
2162
|
+
s(a, " has been removed" + (r ? " in " + r : "")),
|
|
2163
|
+
E.ERR_DEPRECATED
|
|
2164
|
+
);
|
|
2165
|
+
return r && !Wt[a] && (Wt[a] = !0, console.warn(
|
|
2166
|
+
s(
|
|
2167
|
+
a,
|
|
2168
|
+
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
2169
|
+
)
|
|
2170
|
+
)), t ? t(o, a, c) : !0;
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
Qe.spelling = function(t) {
|
|
2174
|
+
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
2175
|
+
};
|
|
2176
|
+
function $s(e, t, r) {
|
|
2177
|
+
if (typeof e != "object")
|
|
2178
|
+
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
2179
|
+
const n = Object.keys(e);
|
|
2180
|
+
let s = n.length;
|
|
2181
|
+
for (; s-- > 0; ) {
|
|
2182
|
+
const o = n[s], a = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
|
|
2183
|
+
if (a) {
|
|
2184
|
+
const c = e[o], f = c === void 0 || a(c, o, e);
|
|
2185
|
+
if (f !== !0)
|
|
2186
|
+
throw new E(
|
|
2187
|
+
"option " + o + " must be " + f,
|
|
2188
|
+
E.ERR_BAD_OPTION_VALUE
|
|
2189
|
+
);
|
|
2190
|
+
continue;
|
|
2191
|
+
}
|
|
2192
|
+
if (r !== !0)
|
|
2193
|
+
throw new E("Unknown option " + o, E.ERR_BAD_OPTION);
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
const Ve = {
|
|
2197
|
+
assertOptions: $s,
|
|
2198
|
+
validators: Qe
|
|
2199
|
+
}, U = Ve.validators;
|
|
2200
|
+
let ge = class {
|
|
2201
|
+
constructor(t) {
|
|
2202
|
+
this.defaults = t || {}, this.interceptors = {
|
|
2203
|
+
request: new It(),
|
|
2204
|
+
response: new It()
|
|
2205
|
+
};
|
|
2206
|
+
}
|
|
2207
|
+
/**
|
|
2208
|
+
* Dispatch a request
|
|
2209
|
+
*
|
|
2210
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
2211
|
+
* @param {?Object} config
|
|
2212
|
+
*
|
|
2213
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
2214
|
+
*/
|
|
2215
|
+
async request(t, r) {
|
|
2216
|
+
try {
|
|
2217
|
+
return await this._request(t, r);
|
|
2218
|
+
} catch (n) {
|
|
2219
|
+
if (n instanceof Error) {
|
|
2220
|
+
let s = {};
|
|
2221
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2222
|
+
const o = (() => {
|
|
2223
|
+
if (!s.stack)
|
|
2224
|
+
return "";
|
|
2225
|
+
const a = s.stack.indexOf(`
|
|
2226
|
+
`);
|
|
2227
|
+
return a === -1 ? "" : s.stack.slice(a + 1);
|
|
2228
|
+
})();
|
|
2229
|
+
try {
|
|
2230
|
+
if (!n.stack)
|
|
2231
|
+
n.stack = o;
|
|
2232
|
+
else if (o) {
|
|
2233
|
+
const a = o.indexOf(`
|
|
2234
|
+
`), c = a === -1 ? -1 : o.indexOf(`
|
|
2235
|
+
`, a + 1), f = c === -1 ? "" : o.slice(c + 1);
|
|
2236
|
+
String(n.stack).endsWith(f) || (n.stack += `
|
|
2237
|
+
` + o);
|
|
2238
|
+
}
|
|
2239
|
+
} catch {
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
throw n;
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
_request(t, r) {
|
|
2246
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = xe(this.defaults, r);
|
|
2247
|
+
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
2248
|
+
n !== void 0 && Ve.assertOptions(
|
|
2249
|
+
n,
|
|
2250
|
+
{
|
|
2251
|
+
silentJSONParsing: U.transitional(U.boolean),
|
|
2252
|
+
forcedJSONParsing: U.transitional(U.boolean),
|
|
2253
|
+
clarifyTimeoutError: U.transitional(U.boolean),
|
|
2254
|
+
legacyInterceptorReqResOrdering: U.transitional(U.boolean),
|
|
2255
|
+
advertiseZstdAcceptEncoding: U.transitional(U.boolean),
|
|
2256
|
+
validateStatusUndefinedResolves: U.transitional(U.boolean)
|
|
2257
|
+
},
|
|
2258
|
+
!1
|
|
2259
|
+
), s != null && (l.isFunction(s) ? r.paramsSerializer = {
|
|
2260
|
+
serialize: s
|
|
2261
|
+
} : Ve.assertOptions(
|
|
2262
|
+
s,
|
|
2263
|
+
{
|
|
2264
|
+
encode: U.function,
|
|
2265
|
+
serialize: U.function
|
|
2266
|
+
},
|
|
2267
|
+
!0
|
|
2268
|
+
)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Ve.assertOptions(
|
|
2269
|
+
r,
|
|
2270
|
+
{
|
|
2271
|
+
baseUrl: U.spelling("baseURL"),
|
|
2272
|
+
withXsrfToken: U.spelling("withXSRFToken")
|
|
2273
|
+
},
|
|
2274
|
+
!0
|
|
2275
|
+
), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
2276
|
+
let a = o && l.merge(o.common, o[r.method]);
|
|
2277
|
+
o && l.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (j) => {
|
|
2278
|
+
delete o[j];
|
|
2279
|
+
}), r.headers = F.concat(a, o);
|
|
2280
|
+
const c = [];
|
|
2281
|
+
let f = !0;
|
|
2282
|
+
this.interceptors.request.forEach(function(x) {
|
|
2283
|
+
if (typeof x.runWhen == "function" && x.runWhen(r) === !1)
|
|
2284
|
+
return;
|
|
2285
|
+
f = f && x.synchronous;
|
|
2286
|
+
const b = r.transitional || xt;
|
|
2287
|
+
b && b.legacyInterceptorReqResOrdering ? c.unshift(x.fulfilled, x.rejected) : c.push(x.fulfilled, x.rejected);
|
|
2288
|
+
});
|
|
2289
|
+
const m = [];
|
|
2290
|
+
this.interceptors.response.forEach(function(x) {
|
|
2291
|
+
m.push(x.fulfilled, x.rejected);
|
|
2292
|
+
});
|
|
2293
|
+
let u, d = 0, R;
|
|
2294
|
+
if (!f) {
|
|
2295
|
+
const j = [Jt.bind(this), void 0];
|
|
2296
|
+
for (j.unshift(...c), j.push(...m), R = j.length, u = Promise.resolve(r); d < R; )
|
|
2297
|
+
u = u.then(j[d++], j[d++]);
|
|
2298
|
+
return u;
|
|
2299
|
+
}
|
|
2300
|
+
R = c.length;
|
|
2301
|
+
let w = r;
|
|
2302
|
+
for (; d < R; ) {
|
|
2303
|
+
const j = c[d++], x = c[d++];
|
|
2304
|
+
try {
|
|
2305
|
+
w = j(w);
|
|
2306
|
+
} catch (b) {
|
|
2307
|
+
x.call(this, b);
|
|
2308
|
+
break;
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
try {
|
|
2312
|
+
u = Jt.call(this, w);
|
|
2313
|
+
} catch (j) {
|
|
2314
|
+
return Promise.reject(j);
|
|
2315
|
+
}
|
|
2316
|
+
for (d = 0, R = m.length; d < R; )
|
|
2317
|
+
u = u.then(m[d++], m[d++]);
|
|
2318
|
+
return u;
|
|
2319
|
+
}
|
|
2320
|
+
getUri(t) {
|
|
2321
|
+
t = xe(this.defaults, t);
|
|
2322
|
+
const r = Rr(t.baseURL, t.url, t.allowAbsoluteUrls, t);
|
|
2323
|
+
return br(r, t.params, t.paramsSerializer);
|
|
2324
|
+
}
|
|
2325
|
+
};
|
|
2326
|
+
l.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2327
|
+
ge.prototype[t] = function(r, n) {
|
|
2328
|
+
return this.request(
|
|
2329
|
+
xe(n || {}, {
|
|
2330
|
+
method: t,
|
|
2331
|
+
url: r,
|
|
2332
|
+
data: n && l.hasOwnProp(n, "data") ? n.data : void 0
|
|
2333
|
+
})
|
|
2334
|
+
);
|
|
2335
|
+
};
|
|
2336
|
+
});
|
|
2337
|
+
l.forEach(["post", "put", "patch", "query"], function(t) {
|
|
2338
|
+
function r(n) {
|
|
2339
|
+
return function(o, a, c) {
|
|
2340
|
+
return this.request(
|
|
2341
|
+
xe(c || {}, {
|
|
2342
|
+
method: t,
|
|
2343
|
+
headers: n ? {
|
|
2344
|
+
"Content-Type": "multipart/form-data"
|
|
2345
|
+
} : {},
|
|
2346
|
+
url: o,
|
|
2347
|
+
data: a
|
|
2348
|
+
})
|
|
2349
|
+
);
|
|
2350
|
+
};
|
|
2351
|
+
}
|
|
2352
|
+
ge.prototype[t] = r(), t !== "query" && (ge.prototype[t + "Form"] = r(!0));
|
|
2353
|
+
});
|
|
2354
|
+
let Hs = class _r {
|
|
2355
|
+
constructor(t) {
|
|
2356
|
+
if (typeof t != "function")
|
|
2357
|
+
throw new TypeError("executor must be a function.");
|
|
2358
|
+
let r;
|
|
2359
|
+
this.promise = new Promise(function(o) {
|
|
2360
|
+
r = o;
|
|
2361
|
+
});
|
|
2362
|
+
const n = this;
|
|
2363
|
+
this.promise.then((s) => {
|
|
2364
|
+
if (!n._listeners) return;
|
|
2365
|
+
let o = n._listeners.length;
|
|
2366
|
+
for (; o-- > 0; )
|
|
2367
|
+
n._listeners[o](s);
|
|
2368
|
+
n._listeners = null;
|
|
2369
|
+
}), this.promise.then = (s) => {
|
|
2370
|
+
let o;
|
|
2371
|
+
const a = new Promise((c) => {
|
|
2372
|
+
n.subscribe(c), o = c;
|
|
2373
|
+
}).then(s);
|
|
2374
|
+
return a.cancel = function() {
|
|
2375
|
+
n.unsubscribe(o);
|
|
2376
|
+
}, a;
|
|
2377
|
+
}, t(function(o, a, c) {
|
|
2378
|
+
n.reason || (n.reason = new Fe(o, a, c), r(n.reason));
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
/**
|
|
2382
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
2383
|
+
*/
|
|
2384
|
+
throwIfRequested() {
|
|
2385
|
+
if (this.reason)
|
|
2386
|
+
throw this.reason;
|
|
2387
|
+
}
|
|
2388
|
+
/**
|
|
2389
|
+
* Subscribe to the cancel signal
|
|
2390
|
+
*/
|
|
2391
|
+
subscribe(t) {
|
|
2392
|
+
if (this.reason) {
|
|
2393
|
+
t(this.reason);
|
|
2394
|
+
return;
|
|
2395
|
+
}
|
|
2396
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
2397
|
+
}
|
|
2398
|
+
/**
|
|
2399
|
+
* Unsubscribe from the cancel signal
|
|
2400
|
+
*/
|
|
2401
|
+
unsubscribe(t) {
|
|
2402
|
+
if (!this._listeners)
|
|
2403
|
+
return;
|
|
2404
|
+
const r = this._listeners.indexOf(t);
|
|
2405
|
+
r !== -1 && this._listeners.splice(r, 1);
|
|
2406
|
+
}
|
|
2407
|
+
toAbortSignal() {
|
|
2408
|
+
const t = new AbortController(), r = (n) => {
|
|
2409
|
+
t.abort(n);
|
|
2410
|
+
};
|
|
2411
|
+
return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
|
|
2412
|
+
}
|
|
2413
|
+
/**
|
|
2414
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2415
|
+
* cancels the `CancelToken`.
|
|
2416
|
+
*/
|
|
2417
|
+
static source() {
|
|
2418
|
+
let t;
|
|
2419
|
+
return {
|
|
2420
|
+
token: new _r(function(s) {
|
|
2421
|
+
t = s;
|
|
2422
|
+
}),
|
|
2423
|
+
cancel: t
|
|
2424
|
+
};
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2427
|
+
function Ms(e) {
|
|
2428
|
+
return function(r) {
|
|
2429
|
+
return e.apply(null, r);
|
|
2430
|
+
};
|
|
2431
|
+
}
|
|
2432
|
+
function Vs(e) {
|
|
2433
|
+
return l.isObject(e) && e.isAxiosError === !0;
|
|
2434
|
+
}
|
|
2435
|
+
const ft = {
|
|
2436
|
+
Continue: 100,
|
|
2437
|
+
SwitchingProtocols: 101,
|
|
2438
|
+
Processing: 102,
|
|
2439
|
+
EarlyHints: 103,
|
|
2440
|
+
Ok: 200,
|
|
2441
|
+
Created: 201,
|
|
2442
|
+
Accepted: 202,
|
|
2443
|
+
NonAuthoritativeInformation: 203,
|
|
2444
|
+
NoContent: 204,
|
|
2445
|
+
ResetContent: 205,
|
|
2446
|
+
PartialContent: 206,
|
|
2447
|
+
MultiStatus: 207,
|
|
2448
|
+
AlreadyReported: 208,
|
|
2449
|
+
ImUsed: 226,
|
|
2450
|
+
MultipleChoices: 300,
|
|
2451
|
+
MovedPermanently: 301,
|
|
2452
|
+
Found: 302,
|
|
2453
|
+
SeeOther: 303,
|
|
2454
|
+
NotModified: 304,
|
|
2455
|
+
UseProxy: 305,
|
|
2456
|
+
Unused: 306,
|
|
2457
|
+
TemporaryRedirect: 307,
|
|
2458
|
+
PermanentRedirect: 308,
|
|
2459
|
+
BadRequest: 400,
|
|
2460
|
+
Unauthorized: 401,
|
|
2461
|
+
PaymentRequired: 402,
|
|
2462
|
+
Forbidden: 403,
|
|
2463
|
+
NotFound: 404,
|
|
2464
|
+
MethodNotAllowed: 405,
|
|
2465
|
+
NotAcceptable: 406,
|
|
2466
|
+
ProxyAuthenticationRequired: 407,
|
|
2467
|
+
RequestTimeout: 408,
|
|
2468
|
+
Conflict: 409,
|
|
2469
|
+
Gone: 410,
|
|
2470
|
+
LengthRequired: 411,
|
|
2471
|
+
PreconditionFailed: 412,
|
|
2472
|
+
PayloadTooLarge: 413,
|
|
2473
|
+
UriTooLong: 414,
|
|
2474
|
+
UnsupportedMediaType: 415,
|
|
2475
|
+
RangeNotSatisfiable: 416,
|
|
2476
|
+
ExpectationFailed: 417,
|
|
2477
|
+
ImATeapot: 418,
|
|
2478
|
+
MisdirectedRequest: 421,
|
|
2479
|
+
UnprocessableEntity: 422,
|
|
2480
|
+
Locked: 423,
|
|
2481
|
+
FailedDependency: 424,
|
|
2482
|
+
TooEarly: 425,
|
|
2483
|
+
UpgradeRequired: 426,
|
|
2484
|
+
PreconditionRequired: 428,
|
|
2485
|
+
TooManyRequests: 429,
|
|
2486
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
2487
|
+
UnavailableForLegalReasons: 451,
|
|
2488
|
+
InternalServerError: 500,
|
|
2489
|
+
NotImplemented: 501,
|
|
2490
|
+
BadGateway: 502,
|
|
2491
|
+
ServiceUnavailable: 503,
|
|
2492
|
+
GatewayTimeout: 504,
|
|
2493
|
+
HttpVersionNotSupported: 505,
|
|
2494
|
+
VariantAlsoNegotiates: 506,
|
|
2495
|
+
InsufficientStorage: 507,
|
|
2496
|
+
LoopDetected: 508,
|
|
2497
|
+
NotExtended: 510,
|
|
2498
|
+
NetworkAuthenticationRequired: 511,
|
|
2499
|
+
WebServerIsDown: 521,
|
|
2500
|
+
ConnectionTimedOut: 522,
|
|
2501
|
+
OriginIsUnreachable: 523,
|
|
2502
|
+
TimeoutOccurred: 524,
|
|
2503
|
+
SslHandshakeFailed: 525,
|
|
2504
|
+
InvalidSslCertificate: 526
|
|
2505
|
+
};
|
|
2506
|
+
Object.entries(ft).forEach(([e, t]) => {
|
|
2507
|
+
ft[t] = e;
|
|
2508
|
+
});
|
|
2509
|
+
function Ar(e) {
|
|
2510
|
+
const t = new ge(e), r = nr(ge.prototype.request, t);
|
|
2511
|
+
return l.extend(r, ge.prototype, t, { allOwnKeys: !0 }), l.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2512
|
+
return Ar(xe(e, s));
|
|
2513
|
+
}, r;
|
|
2514
|
+
}
|
|
2515
|
+
const D = Ar(Ue);
|
|
2516
|
+
D.Axios = ge;
|
|
2517
|
+
D.CanceledError = Fe;
|
|
2518
|
+
D.CancelToken = Hs;
|
|
2519
|
+
D.isCancel = xr;
|
|
2520
|
+
D.VERSION = Rt;
|
|
2521
|
+
D.toFormData = Xe;
|
|
2522
|
+
D.AxiosError = E;
|
|
2523
|
+
D.Cancel = D.CanceledError;
|
|
2524
|
+
D.all = function(t) {
|
|
2525
|
+
return Promise.all(t);
|
|
2526
|
+
};
|
|
2527
|
+
D.spread = Ms;
|
|
2528
|
+
D.isAxiosError = Vs;
|
|
2529
|
+
D.mergeConfig = xe;
|
|
2530
|
+
D.AxiosHeaders = F;
|
|
2531
|
+
D.formToJSON = (e) => Er(l.isHTMLForm(e) ? new FormData(e) : e);
|
|
2532
|
+
D.getAdapter = Tr.getAdapter;
|
|
2533
|
+
D.HttpStatusCode = ft;
|
|
2534
|
+
D.default = D;
|
|
2535
|
+
const {
|
|
2536
|
+
Axios: go,
|
|
2537
|
+
AxiosError: Eo,
|
|
2538
|
+
CanceledError: xo,
|
|
2539
|
+
isCancel: wo,
|
|
2540
|
+
CancelToken: Ro,
|
|
2541
|
+
VERSION: So,
|
|
2542
|
+
all: Oo,
|
|
2543
|
+
Cancel: To,
|
|
2544
|
+
isAxiosError: _o,
|
|
2545
|
+
spread: Ao,
|
|
2546
|
+
toFormData: jo,
|
|
2547
|
+
AxiosHeaders: Co,
|
|
2548
|
+
HttpStatusCode: Po,
|
|
2549
|
+
formToJSON: No,
|
|
2550
|
+
getAdapter: vo,
|
|
2551
|
+
mergeConfig: ko,
|
|
2552
|
+
create: Do
|
|
2553
|
+
} = D;
|
|
2554
|
+
var Js = Object.defineProperty, Ws = (e, t, r) => t in e ? Js(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ks = (e, t, r) => Ws(e, t + "", r), it = { exports: {} }, ve = {};
|
|
2555
|
+
/**
|
|
2556
|
+
* @license React
|
|
2557
|
+
* react-jsx-runtime.production.js
|
|
2558
|
+
*
|
|
2559
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2560
|
+
*
|
|
2561
|
+
* This source code is licensed under the MIT license found in the
|
|
2562
|
+
* LICENSE file in the root directory of this source tree.
|
|
2563
|
+
*/
|
|
2564
|
+
var Kt;
|
|
2565
|
+
function Gs() {
|
|
2566
|
+
if (Kt) return ve;
|
|
2567
|
+
Kt = 1;
|
|
2568
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
2569
|
+
function r(n, s, o) {
|
|
2570
|
+
var a = null;
|
|
2571
|
+
if (o !== void 0 && (a = "" + o), s.key !== void 0 && (a = "" + s.key), "key" in s) {
|
|
2572
|
+
o = {};
|
|
2573
|
+
for (var c in s)
|
|
2574
|
+
c !== "key" && (o[c] = s[c]);
|
|
2575
|
+
} else o = s;
|
|
2576
|
+
return s = o.ref, {
|
|
2577
|
+
$$typeof: e,
|
|
2578
|
+
type: n,
|
|
2579
|
+
key: a,
|
|
2580
|
+
ref: s !== void 0 ? s : null,
|
|
2581
|
+
props: o
|
|
2582
|
+
};
|
|
2583
|
+
}
|
|
2584
|
+
return ve.Fragment = t, ve.jsx = r, ve.jsxs = r, ve;
|
|
2585
|
+
}
|
|
2586
|
+
var $e = {};
|
|
2587
|
+
/**
|
|
2588
|
+
* @license React
|
|
2589
|
+
* react-jsx-runtime.development.js
|
|
2590
|
+
*
|
|
2591
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2592
|
+
*
|
|
2593
|
+
* This source code is licensed under the MIT license found in the
|
|
2594
|
+
* LICENSE file in the root directory of this source tree.
|
|
2595
|
+
*/
|
|
2596
|
+
var Gt;
|
|
2597
|
+
function Ys() {
|
|
2598
|
+
return Gt || (Gt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2599
|
+
function e(i) {
|
|
2600
|
+
if (i == null) return null;
|
|
2601
|
+
if (typeof i == "function")
|
|
2602
|
+
return i.$$typeof === X ? null : i.displayName || i.name || null;
|
|
2603
|
+
if (typeof i == "string") return i;
|
|
2604
|
+
switch (i) {
|
|
2605
|
+
case b:
|
|
2606
|
+
return "Fragment";
|
|
2607
|
+
case S:
|
|
2608
|
+
return "Profiler";
|
|
2609
|
+
case h:
|
|
2610
|
+
return "StrictMode";
|
|
2611
|
+
case v:
|
|
2612
|
+
return "Suspense";
|
|
2613
|
+
case k:
|
|
2614
|
+
return "SuspenseList";
|
|
2615
|
+
case Y:
|
|
2616
|
+
return "Activity";
|
|
2617
|
+
}
|
|
2618
|
+
if (typeof i == "object")
|
|
2619
|
+
switch (typeof i.tag == "number" && console.error(
|
|
2620
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
2621
|
+
), i.$$typeof) {
|
|
2622
|
+
case x:
|
|
2623
|
+
return "Portal";
|
|
2624
|
+
case g:
|
|
2625
|
+
return i.displayName || "Context";
|
|
2626
|
+
case O:
|
|
2627
|
+
return (i._context.displayName || "Context") + ".Consumer";
|
|
2628
|
+
case N:
|
|
2629
|
+
var y = i.render;
|
|
2630
|
+
return i = i.displayName, i || (i = y.displayName || y.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
|
|
2631
|
+
case B:
|
|
2632
|
+
return y = i.displayName || null, y !== null ? y : e(i.type) || "Memo";
|
|
2633
|
+
case q:
|
|
2634
|
+
y = i._payload, i = i._init;
|
|
2635
|
+
try {
|
|
2636
|
+
return e(i(y));
|
|
2637
|
+
} catch {
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
return null;
|
|
2641
|
+
}
|
|
2642
|
+
function t(i) {
|
|
2643
|
+
return "" + i;
|
|
2644
|
+
}
|
|
2645
|
+
function r(i) {
|
|
2646
|
+
try {
|
|
2647
|
+
t(i);
|
|
2648
|
+
var y = !1;
|
|
2649
|
+
} catch {
|
|
2650
|
+
y = !0;
|
|
2651
|
+
}
|
|
2652
|
+
if (y) {
|
|
2653
|
+
y = console;
|
|
2654
|
+
var T = y.error, A = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
|
2655
|
+
return T.call(
|
|
2656
|
+
y,
|
|
2657
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
2658
|
+
A
|
|
2659
|
+
), t(i);
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
function n(i) {
|
|
2663
|
+
if (i === b) return "<>";
|
|
2664
|
+
if (typeof i == "object" && i !== null && i.$$typeof === q)
|
|
2665
|
+
return "<...>";
|
|
2666
|
+
try {
|
|
2667
|
+
var y = e(i);
|
|
2668
|
+
return y ? "<" + y + ">" : "<...>";
|
|
2669
|
+
} catch {
|
|
2670
|
+
return "<...>";
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
function s() {
|
|
2674
|
+
var i = Q.A;
|
|
2675
|
+
return i === null ? null : i.getOwner();
|
|
2676
|
+
}
|
|
2677
|
+
function o() {
|
|
2678
|
+
return Error("react-stack-top-frame");
|
|
2679
|
+
}
|
|
2680
|
+
function a(i) {
|
|
2681
|
+
if (ue.call(i, "key")) {
|
|
2682
|
+
var y = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
2683
|
+
if (y && y.isReactWarning) return !1;
|
|
2684
|
+
}
|
|
2685
|
+
return i.key !== void 0;
|
|
2686
|
+
}
|
|
2687
|
+
function c(i, y) {
|
|
2688
|
+
function T() {
|
|
2689
|
+
te || (te = !0, console.error(
|
|
2690
|
+
"%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)",
|
|
2691
|
+
y
|
|
2692
|
+
));
|
|
2693
|
+
}
|
|
2694
|
+
T.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
2695
|
+
get: T,
|
|
2696
|
+
configurable: !0
|
|
2697
|
+
});
|
|
2698
|
+
}
|
|
2699
|
+
function f() {
|
|
2700
|
+
var i = e(this.type);
|
|
2701
|
+
return ae[i] || (ae[i] = !0, console.error(
|
|
2702
|
+
"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."
|
|
2703
|
+
)), i = this.props.ref, i !== void 0 ? i : null;
|
|
2704
|
+
}
|
|
2705
|
+
function m(i, y, T, A, re, P) {
|
|
2706
|
+
var _ = T.ref;
|
|
2707
|
+
return i = {
|
|
2708
|
+
$$typeof: j,
|
|
2709
|
+
type: i,
|
|
2710
|
+
key: y,
|
|
2711
|
+
props: T,
|
|
2712
|
+
_owner: A
|
|
2713
|
+
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(i, "ref", {
|
|
2714
|
+
enumerable: !1,
|
|
2715
|
+
get: f
|
|
2716
|
+
}) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
2717
|
+
configurable: !1,
|
|
2718
|
+
enumerable: !1,
|
|
2719
|
+
writable: !0,
|
|
2720
|
+
value: 0
|
|
2721
|
+
}), Object.defineProperty(i, "_debugInfo", {
|
|
2722
|
+
configurable: !1,
|
|
2723
|
+
enumerable: !1,
|
|
2724
|
+
writable: !0,
|
|
2725
|
+
value: null
|
|
2726
|
+
}), Object.defineProperty(i, "_debugStack", {
|
|
2727
|
+
configurable: !1,
|
|
2728
|
+
enumerable: !1,
|
|
2729
|
+
writable: !0,
|
|
2730
|
+
value: re
|
|
2731
|
+
}), Object.defineProperty(i, "_debugTask", {
|
|
2732
|
+
configurable: !1,
|
|
2733
|
+
enumerable: !1,
|
|
2734
|
+
writable: !0,
|
|
2735
|
+
value: P
|
|
2736
|
+
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
2737
|
+
}
|
|
2738
|
+
function u(i, y, T, A, re, P) {
|
|
2739
|
+
var _ = y.children;
|
|
2740
|
+
if (_ !== void 0)
|
|
2741
|
+
if (A)
|
|
2742
|
+
if (z(_)) {
|
|
2743
|
+
for (A = 0; A < _.length; A++)
|
|
2744
|
+
d(_[A]);
|
|
2745
|
+
Object.freeze && Object.freeze(_);
|
|
2746
|
+
} else
|
|
2747
|
+
console.error(
|
|
2748
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2749
|
+
);
|
|
2750
|
+
else d(_);
|
|
2751
|
+
if (ue.call(y, "key")) {
|
|
2752
|
+
_ = e(i);
|
|
2753
|
+
var I = Object.keys(y).filter(function(Ae) {
|
|
2754
|
+
return Ae !== "key";
|
|
2755
|
+
});
|
|
2756
|
+
A = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", $[_ + A] || (I = 0 < I.length ? "{" + I.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2757
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
2758
|
+
let props = %s;
|
|
2759
|
+
<%s {...props} />
|
|
2760
|
+
React keys must be passed directly to JSX without using spread:
|
|
2761
|
+
let props = %s;
|
|
2762
|
+
<%s key={someKey} {...props} />`,
|
|
2763
|
+
A,
|
|
2764
|
+
_,
|
|
2765
|
+
I,
|
|
2766
|
+
_
|
|
2767
|
+
), $[_ + A] = !0);
|
|
2768
|
+
}
|
|
2769
|
+
if (_ = null, T !== void 0 && (r(T), _ = "" + T), a(y) && (r(y.key), _ = "" + y.key), "key" in y) {
|
|
2770
|
+
T = {};
|
|
2771
|
+
for (var oe in y)
|
|
2772
|
+
oe !== "key" && (T[oe] = y[oe]);
|
|
2773
|
+
} else T = y;
|
|
2774
|
+
return _ && c(
|
|
2775
|
+
T,
|
|
2776
|
+
typeof i == "function" ? i.displayName || i.name || "Unknown" : i
|
|
2777
|
+
), m(
|
|
2778
|
+
i,
|
|
2779
|
+
_,
|
|
2780
|
+
T,
|
|
2781
|
+
s(),
|
|
2782
|
+
re,
|
|
2783
|
+
P
|
|
2784
|
+
);
|
|
2785
|
+
}
|
|
2786
|
+
function d(i) {
|
|
2787
|
+
R(i) ? i._store && (i._store.validated = 1) : typeof i == "object" && i !== null && i.$$typeof === q && (i._payload.status === "fulfilled" ? R(i._payload.value) && i._payload.value._store && (i._payload.value._store.validated = 1) : i._store && (i._store.validated = 1));
|
|
2788
|
+
}
|
|
2789
|
+
function R(i) {
|
|
2790
|
+
return typeof i == "object" && i !== null && i.$$typeof === j;
|
|
2791
|
+
}
|
|
2792
|
+
var w = dt, j = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), O = Symbol.for("react.consumer"), g = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), Q = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ue = Object.prototype.hasOwnProperty, z = Array.isArray, Z = console.createTask ? console.createTask : function() {
|
|
2793
|
+
return null;
|
|
2794
|
+
};
|
|
2795
|
+
w = {
|
|
2796
|
+
react_stack_bottom_frame: function(i) {
|
|
2797
|
+
return i();
|
|
2798
|
+
}
|
|
2799
|
+
};
|
|
2800
|
+
var te, ae = {}, me = w.react_stack_bottom_frame.bind(
|
|
2801
|
+
w,
|
|
2802
|
+
o
|
|
2803
|
+
)(), fe = Z(n(o)), $ = {};
|
|
2804
|
+
$e.Fragment = b, $e.jsx = function(i, y, T) {
|
|
2805
|
+
var A = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
2806
|
+
return u(
|
|
2807
|
+
i,
|
|
2808
|
+
y,
|
|
2809
|
+
T,
|
|
2810
|
+
!1,
|
|
2811
|
+
A ? Error("react-stack-top-frame") : me,
|
|
2812
|
+
A ? Z(n(i)) : fe
|
|
2813
|
+
);
|
|
2814
|
+
}, $e.jsxs = function(i, y, T) {
|
|
2815
|
+
var A = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
2816
|
+
return u(
|
|
2817
|
+
i,
|
|
2818
|
+
y,
|
|
2819
|
+
T,
|
|
2820
|
+
!0,
|
|
2821
|
+
A ? Error("react-stack-top-frame") : me,
|
|
2822
|
+
A ? Z(n(i)) : fe
|
|
2823
|
+
);
|
|
2824
|
+
};
|
|
2825
|
+
})()), $e;
|
|
2826
|
+
}
|
|
2827
|
+
var Yt;
|
|
2828
|
+
function Xs() {
|
|
2829
|
+
return Yt || (Yt = 1, process.env.NODE_ENV === "production" ? it.exports = Gs() : it.exports = Ys()), it.exports;
|
|
2830
|
+
}
|
|
2831
|
+
var ee = Xs();
|
|
2832
|
+
const { Header: Io, Sider: Lo, Content: Uo } = Qt;
|
|
2833
|
+
function Qs(e) {
|
|
2834
|
+
if (e && typeof e == "object" && "code" in e && "data" in e) {
|
|
2835
|
+
const t = e;
|
|
2836
|
+
return t.code !== 200 ? Promise.reject(new Error(t.message || "请求失败")) : t.data;
|
|
2837
|
+
}
|
|
2838
|
+
return e;
|
|
2839
|
+
}
|
|
2840
|
+
function Zs(e, t = {}) {
|
|
2841
|
+
const {
|
|
2842
|
+
tokenKey: r = "token",
|
|
2843
|
+
userInfoKey: n = "userInfo",
|
|
2844
|
+
unauthorizedRedirect: s = "/login"
|
|
2845
|
+
} = t;
|
|
2846
|
+
e.interceptors.request.use((o) => {
|
|
2847
|
+
const a = localStorage.getItem(r);
|
|
2848
|
+
return a && (o.headers.Authorization = `Bearer ${a}`), o;
|
|
2849
|
+
}), e.interceptors.response.use(
|
|
2850
|
+
(o) => Qs(o.data),
|
|
2851
|
+
(o) => {
|
|
2852
|
+
var a, c, f;
|
|
2853
|
+
return ((a = o.response) == null ? void 0 : a.status) === 401 ? (localStorage.removeItem(r), localStorage.removeItem(n), window.location.href = s) : ((c = o.response) == null ? void 0 : c.status) === 403 ? console.error("没有权限访问该资源") : ((f = o.response) == null ? void 0 : f.status) === 500 && console.error("服务器内部错误"), Promise.reject(o);
|
|
2854
|
+
}
|
|
2855
|
+
);
|
|
2856
|
+
}
|
|
2857
|
+
function jr(e = {}) {
|
|
2858
|
+
const t = D.create({
|
|
2859
|
+
baseURL: e.baseURL ?? "/api",
|
|
2860
|
+
timeout: e.timeout ?? 1e4
|
|
2861
|
+
});
|
|
2862
|
+
return Zs(t, {
|
|
2863
|
+
tokenKey: e.tokenKey,
|
|
2864
|
+
userInfoKey: e.userInfoKey,
|
|
2865
|
+
unauthorizedRedirect: e.unauthorizedRedirect
|
|
2866
|
+
}), t;
|
|
2867
|
+
}
|
|
2868
|
+
const ie = jr();
|
|
2869
|
+
jr();
|
|
2870
|
+
class Fo extends dt.Component {
|
|
2871
|
+
constructor(t) {
|
|
2872
|
+
super(t), Ks(this, "handleReset", () => {
|
|
2873
|
+
this.setState({ hasError: !1, error: null, errorInfo: null }), typeof this.props.onReset == "function" && this.props.onReset();
|
|
2874
|
+
}), this.state = { hasError: !1, error: null, errorInfo: null };
|
|
2875
|
+
}
|
|
2876
|
+
static getDerivedStateFromError(t) {
|
|
2877
|
+
return { hasError: !0, error: t };
|
|
2878
|
+
}
|
|
2879
|
+
componentDidCatch(t, r) {
|
|
2880
|
+
console.error("[ErrorBoundary] caught error:", t, r), this.setState({ errorInfo: r });
|
|
2881
|
+
}
|
|
2882
|
+
render() {
|
|
2883
|
+
if (!this.state.hasError)
|
|
2884
|
+
return this.props.children;
|
|
2885
|
+
const { fallbackTitle: t = "组件加载失败", fallbackDescription: r, showReload: n = !0 } = this.props, s = this.state.error && (this.state.error.message || String(this.state.error)) || "未知错误";
|
|
2886
|
+
return /* @__PURE__ */ ee.jsxs(
|
|
2887
|
+
"div",
|
|
2888
|
+
{
|
|
2889
|
+
style: {
|
|
2890
|
+
padding: 24,
|
|
2891
|
+
background: "#fff2f0",
|
|
2892
|
+
border: "1px solid #ffccc7",
|
|
2893
|
+
borderRadius: 8,
|
|
2894
|
+
minHeight: 200
|
|
2895
|
+
},
|
|
2896
|
+
children: [
|
|
2897
|
+
/* @__PURE__ */ ee.jsx(
|
|
2898
|
+
ht,
|
|
2899
|
+
{
|
|
2900
|
+
type: "error",
|
|
2901
|
+
showIcon: !0,
|
|
2902
|
+
icon: /* @__PURE__ */ ee.jsx(Fr, {}),
|
|
2903
|
+
message: t,
|
|
2904
|
+
description: /* @__PURE__ */ ee.jsxs("div", { children: [
|
|
2905
|
+
/* @__PURE__ */ ee.jsx("div", { style: { marginBottom: 8 }, children: r || "当前组件发生了异常,已被错误边界捕获。其他功能仍可正常使用。" }),
|
|
2906
|
+
/* @__PURE__ */ ee.jsx(
|
|
2907
|
+
"div",
|
|
2908
|
+
{
|
|
2909
|
+
style: {
|
|
2910
|
+
fontFamily: "Menlo, Monaco, Consolas, monospace",
|
|
2911
|
+
fontSize: 12,
|
|
2912
|
+
color: "#cf1322",
|
|
2913
|
+
background: "#fff",
|
|
2914
|
+
padding: 8,
|
|
2915
|
+
borderRadius: 4,
|
|
2916
|
+
border: "1px solid #ffccc7",
|
|
2917
|
+
wordBreak: "break-word",
|
|
2918
|
+
whiteSpace: "pre-wrap"
|
|
2919
|
+
},
|
|
2920
|
+
children: s
|
|
2921
|
+
}
|
|
2922
|
+
)
|
|
2923
|
+
] })
|
|
2924
|
+
}
|
|
2925
|
+
),
|
|
2926
|
+
n && /* @__PURE__ */ ee.jsx(J, { style: { marginTop: 16 }, children: /* @__PURE__ */ ee.jsx(W, { icon: /* @__PURE__ */ ee.jsx(tr, {}), onClick: this.handleReset, children: "重试" }) })
|
|
2927
|
+
]
|
|
2928
|
+
}
|
|
2929
|
+
);
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
const { Title: Bo, Text: qo, Paragraph: zo } = G;
|
|
2933
|
+
let eo = "/api";
|
|
2934
|
+
function Cr() {
|
|
2935
|
+
return D.create({ baseURL: eo, timeout: 15e3 });
|
|
2936
|
+
}
|
|
2937
|
+
const to = Cr();
|
|
2938
|
+
Cr();
|
|
2939
|
+
to.interceptors.request.use((e) => {
|
|
2940
|
+
const t = localStorage.getItem("token");
|
|
2941
|
+
return t && (e.headers.Authorization = `Bearer ${t}`), e;
|
|
2942
|
+
});
|
|
2943
|
+
const { Header: $o, Sider: Ho, Content: Mo } = Qt, { Text: Vo } = G, { Title: Jo, Text: Wo } = G, { Option: Ko } = Je, { TextArea: Go } = ne, ro = [
|
|
2944
|
+
{ type: "STRING", label: "字符串", icon: /* @__PURE__ */ ee.jsx(At, {}), color: "#1677ff", desc: "短文本 (默认 VARCHAR 255)" },
|
|
2945
|
+
{ type: "TEXT", label: "长文本", icon: /* @__PURE__ */ ee.jsx(At, {}), color: "#13c2c2", desc: "TEXT 类型, 无长度限制" },
|
|
2946
|
+
{ type: "INT", label: "整数", icon: "#", color: "#722ed1", desc: "INT 整数" },
|
|
2947
|
+
{ type: "LONG", label: "长整数", icon: "#", color: "#722ed1", desc: "BIGINT 长整数" },
|
|
2948
|
+
{ type: "DECIMAL", label: "小数", icon: "0.00", color: "#eb2f96", desc: "DECIMAL 精确小数" },
|
|
2949
|
+
{ type: "BOOLEAN", label: "布尔", icon: /* @__PURE__ */ ee.jsx(mt, {}), color: "#52c41a", desc: "TINYINT(1) 是/否" },
|
|
2950
|
+
{ type: "DATE", label: "日期", icon: "📅", color: "#fa8c16", desc: "DATE yyyy-MM-dd" },
|
|
2951
|
+
{ type: "DATETIME", label: "日期时间", icon: "🕐", color: "#fa8c16", desc: "DATETIME yyyy-MM-dd HH:mm:ss" },
|
|
2952
|
+
{ type: "JSON", label: "JSON", icon: "{}", color: "#2f54eb", desc: "JSON 字符串" },
|
|
2953
|
+
{ type: "REF", label: "引用", icon: "🔗", color: "#8c8c8c", desc: "外键引用 BIGINT" }
|
|
2954
|
+
];
|
|
2955
|
+
Object.fromEntries(ro.map((e) => [e.type, e]));
|
|
2956
|
+
const { Option: Yo } = Je;
|
|
2957
|
+
ne.TextArea, ne.TextArea;
|
|
2958
|
+
const { Text: Xo, Paragraph: Qo } = G, { TextArea: Zo } = ne, { TextArea: ei } = ne, { Text: ti, Paragraph: ri } = G, { TextArea: ni } = ne, { Text: si, Paragraph: oi } = G, { Text: ii } = G, { Text: ai } = G, { TextArea: li } = ne, { Text: ci, Paragraph: ui } = G, { Text: fi } = G, { Text: di } = G, { Text: pi } = G, { Text: hi } = G;
|
|
2959
|
+
common;
|
|
2960
|
+
const no = {
|
|
2961
|
+
OPEN: { color: "blue", text: "待开始" },
|
|
2962
|
+
IN_PROGRESS: { color: "green", text: "进行中" },
|
|
2963
|
+
COMPLETED: { color: "default", text: "已完成" },
|
|
2964
|
+
ARCHIVED: { color: "default", text: "已归档" }
|
|
2965
|
+
};
|
|
2966
|
+
function so() {
|
|
2967
|
+
const e = pt(), [t, r] = H("mine"), [n, s] = H([]), [o, a] = H(!1), c = async () => {
|
|
2968
|
+
a(!0);
|
|
2969
|
+
try {
|
|
2970
|
+
const u = t === "mine" ? "/project/list/mine?limit=100" : `/project/list/by-status?status=${t}&limit=100`, d = await ie.get(u), R = (d == null ? void 0 : d.data) ?? d ?? [];
|
|
2971
|
+
s(Array.isArray(R) ? R : []);
|
|
2972
|
+
} catch (u) {
|
|
2973
|
+
K.error("加载项目失败: " + ((u == null ? void 0 : u.message) || ""));
|
|
2974
|
+
} finally {
|
|
2975
|
+
a(!1);
|
|
2976
|
+
}
|
|
2977
|
+
};
|
|
2978
|
+
ke(() => {
|
|
2979
|
+
c();
|
|
2980
|
+
}, [t]);
|
|
2981
|
+
const f = async (u) => {
|
|
2982
|
+
try {
|
|
2983
|
+
const d = await ie.post(`/project/${u}/status?status=COMPLETED`);
|
|
2984
|
+
d && d.success !== !1 && (K.success("已标记完成"), c());
|
|
2985
|
+
} catch (d) {
|
|
2986
|
+
K.error("操作失败: " + ((d == null ? void 0 : d.message) || ""));
|
|
2987
|
+
}
|
|
2988
|
+
}, m = [
|
|
2989
|
+
{ title: "ID", dataIndex: "id", width: 60 },
|
|
2990
|
+
{ title: "名称", dataIndex: "name", render: (u, d) => /* @__PURE__ */ p.jsxs(J, { orientation: "vertical", size: 0, children: [
|
|
2991
|
+
/* @__PURE__ */ p.jsx("a", { onClick: () => e(`/project/${d.id}`), style: { fontWeight: 500 }, children: u }),
|
|
2992
|
+
d.description && /* @__PURE__ */ p.jsx("span", { style: { color: "#999", fontSize: 12 }, children: d.description })
|
|
2993
|
+
] }) },
|
|
2994
|
+
{ title: "来源", dataIndex: "sourceType", width: 100, render: (u) => /* @__PURE__ */ p.jsx(he, { children: u }) },
|
|
2995
|
+
{
|
|
2996
|
+
title: "订阅",
|
|
2997
|
+
dataIndex: "sourceSubscriptionId",
|
|
2998
|
+
width: 80,
|
|
2999
|
+
render: (u) => u ? `#${u}` : /* @__PURE__ */ p.jsx("span", { style: { color: "#ccc" }, children: "-" })
|
|
3000
|
+
},
|
|
3001
|
+
{ title: "状态", dataIndex: "status", width: 100, render: (u) => {
|
|
3002
|
+
const d = no[u] || { color: "default", text: u };
|
|
3003
|
+
return /* @__PURE__ */ p.jsx(he, { color: d.color, children: d.text });
|
|
3004
|
+
} },
|
|
3005
|
+
{ title: "消息数", dataIndex: "messageCount", width: 80 },
|
|
3006
|
+
{ title: "上下文", width: 130, render: (u, d) => /* @__PURE__ */ p.jsx(J, { size: 4, children: /* @__PURE__ */ p.jsxs(he, { color: "blue", children: [
|
|
3007
|
+
d.contextSize || 0,
|
|
3008
|
+
"B"
|
|
3009
|
+
] }) }) },
|
|
3010
|
+
{
|
|
3011
|
+
title: "最近活动",
|
|
3012
|
+
dataIndex: "lastMessageAt",
|
|
3013
|
+
width: 150,
|
|
3014
|
+
render: (u) => u ? new Date(u).toLocaleString() : /* @__PURE__ */ p.jsx("span", { style: { color: "#ccc" }, children: "-" })
|
|
3015
|
+
},
|
|
3016
|
+
{ title: "操作", width: 160, render: (u, d) => /* @__PURE__ */ p.jsxs(J, { size: 4, children: [
|
|
3017
|
+
/* @__PURE__ */ p.jsx(W, { type: "link", size: "small", onClick: () => e(`/project/${d.id}`), children: "对话" }),
|
|
3018
|
+
d.status !== "COMPLETED" && d.status !== "ARCHIVED" && /* @__PURE__ */ p.jsx(er, { title: "标记为已完成?", onConfirm: () => f(d.id), children: /* @__PURE__ */ p.jsx(W, { type: "link", size: "small", icon: /* @__PURE__ */ p.jsx(mt, {}), children: "完成" }) })
|
|
3019
|
+
] }) }
|
|
3020
|
+
];
|
|
3021
|
+
return /* @__PURE__ */ p.jsx("div", { style: { padding: 24 }, children: /* @__PURE__ */ p.jsxs(
|
|
3022
|
+
Re,
|
|
3023
|
+
{
|
|
3024
|
+
title: /* @__PURE__ */ p.jsxs(J, { children: [
|
|
3025
|
+
/* @__PURE__ */ p.jsx(yt, {}),
|
|
3026
|
+
"项目中心 (CEO 立项 + Agent 对话)"
|
|
3027
|
+
] }),
|
|
3028
|
+
extra: /* @__PURE__ */ p.jsxs(J, { children: [
|
|
3029
|
+
/* @__PURE__ */ p.jsx(W, { icon: /* @__PURE__ */ p.jsx(tr, {}), onClick: c, children: "刷新" }),
|
|
3030
|
+
/* @__PURE__ */ p.jsx(
|
|
3031
|
+
W,
|
|
3032
|
+
{
|
|
3033
|
+
type: "primary",
|
|
3034
|
+
icon: /* @__PURE__ */ p.jsx(Br, {}),
|
|
3035
|
+
onClick: () => e("/project/new"),
|
|
3036
|
+
children: "新建项目"
|
|
3037
|
+
}
|
|
3038
|
+
)
|
|
3039
|
+
] }),
|
|
3040
|
+
children: [
|
|
3041
|
+
/* @__PURE__ */ p.jsx(
|
|
3042
|
+
Lr,
|
|
3043
|
+
{
|
|
3044
|
+
activeKey: t,
|
|
3045
|
+
onChange: r,
|
|
3046
|
+
items: [
|
|
3047
|
+
{ key: "mine", label: "我的进行中" },
|
|
3048
|
+
{ key: "OPEN", label: "待开始" },
|
|
3049
|
+
{ key: "IN_PROGRESS", label: "进行中" },
|
|
3050
|
+
{ key: "COMPLETED", label: "已完成" }
|
|
3051
|
+
]
|
|
3052
|
+
}
|
|
3053
|
+
),
|
|
3054
|
+
/* @__PURE__ */ p.jsx(
|
|
3055
|
+
Zt,
|
|
3056
|
+
{
|
|
3057
|
+
rowKey: "id",
|
|
3058
|
+
columns: m,
|
|
3059
|
+
dataSource: n,
|
|
3060
|
+
loading: o,
|
|
3061
|
+
size: "middle",
|
|
3062
|
+
pagination: { pageSize: 20 }
|
|
3063
|
+
}
|
|
3064
|
+
)
|
|
3065
|
+
]
|
|
3066
|
+
}
|
|
3067
|
+
) });
|
|
3068
|
+
}
|
|
3069
|
+
const oo = [
|
|
3070
|
+
{ value: "general", label: "通用助手" },
|
|
3071
|
+
{ value: "analyst", label: "分析师" },
|
|
3072
|
+
{ value: "writer", label: "写手" },
|
|
3073
|
+
{ value: "pm", label: "产品经理" },
|
|
3074
|
+
{ value: "ops", label: "运营" }
|
|
3075
|
+
];
|
|
3076
|
+
function io() {
|
|
3077
|
+
const e = pt(), [t] = vr(), [r] = pe.useForm(), [n, s] = H(!1), [o, a] = H("from-subscribe"), [c, f] = H([]), [m, u] = H([]), [d, R] = H(!1), [w, j] = H([]), [x, b] = H(null);
|
|
3078
|
+
ke(() => {
|
|
3079
|
+
const g = t.get("subscriptionId"), N = t.get("itemIds");
|
|
3080
|
+
g && (b(Number(g)), r.setFieldValue("sourceSubscriptionId", Number(g)), S(g)), N && j(N.split(",").map(Number).filter(Boolean));
|
|
3081
|
+
}, [t]), ke(() => {
|
|
3082
|
+
h();
|
|
3083
|
+
}, []);
|
|
3084
|
+
const h = async () => {
|
|
3085
|
+
try {
|
|
3086
|
+
const g = await ie.get("/subscribe/subscription/list"), N = (g == null ? void 0 : g.data) ?? g ?? [];
|
|
3087
|
+
f(Array.isArray(N) ? N.filter((v) => v.status === "VERIFIED") : []);
|
|
3088
|
+
} catch {
|
|
3089
|
+
}
|
|
3090
|
+
}, S = async (g) => {
|
|
3091
|
+
R(!0);
|
|
3092
|
+
try {
|
|
3093
|
+
const N = await ie.get(`/subscribe/run/list?subscriptionId=${g}&limit=1`), v = (N == null ? void 0 : N.data) ?? N ?? [];
|
|
3094
|
+
if (v.length === 0) {
|
|
3095
|
+
u([]);
|
|
3096
|
+
return;
|
|
3097
|
+
}
|
|
3098
|
+
const k = v[0], B = await ie.get(`/subscribe/run/${k.id}/items?limit=100`), q = (B == null ? void 0 : B.data) ?? B ?? [];
|
|
3099
|
+
u(Array.isArray(q) ? q : []);
|
|
3100
|
+
} catch {
|
|
3101
|
+
K.error("加载抽取项失败");
|
|
3102
|
+
} finally {
|
|
3103
|
+
R(!1);
|
|
3104
|
+
}
|
|
3105
|
+
}, O = async () => {
|
|
3106
|
+
try {
|
|
3107
|
+
const g = await r.validateFields();
|
|
3108
|
+
if (o === "from-subscribe" && w.length === 0) {
|
|
3109
|
+
K.warning("请至少选 1 个 item");
|
|
3110
|
+
return;
|
|
3111
|
+
}
|
|
3112
|
+
s(!0);
|
|
3113
|
+
const N = {
|
|
3114
|
+
...g,
|
|
3115
|
+
sourceItemIds: o === "from-subscribe" ? w.map(String) : null
|
|
3116
|
+
}, v = o === "from-subscribe" ? "/project/create-from-items" : "/project/create-manual", k = await ie.post(v, N);
|
|
3117
|
+
if (k && k.success !== !1) {
|
|
3118
|
+
const B = k.data ?? k;
|
|
3119
|
+
K.success("立项成功"), e(`/project/${B.id}`);
|
|
3120
|
+
} else
|
|
3121
|
+
K.error((k == null ? void 0 : k.message) || "立项失败");
|
|
3122
|
+
} catch (g) {
|
|
3123
|
+
g != null && g.errorFields || K.error("立项失败: " + ((g == null ? void 0 : g.message) || ""));
|
|
3124
|
+
} finally {
|
|
3125
|
+
s(!1);
|
|
3126
|
+
}
|
|
3127
|
+
};
|
|
3128
|
+
return /* @__PURE__ */ p.jsx("div", { style: { padding: 24 }, children: /* @__PURE__ */ p.jsx(
|
|
3129
|
+
Re,
|
|
3130
|
+
{
|
|
3131
|
+
title: /* @__PURE__ */ p.jsxs(J, { children: [
|
|
3132
|
+
/* @__PURE__ */ p.jsx(W, { type: "text", icon: /* @__PURE__ */ p.jsx(rr, {}), onClick: () => e("/project/list") }),
|
|
3133
|
+
/* @__PURE__ */ p.jsx(yt, {}),
|
|
3134
|
+
"新建项目 (立项)"
|
|
3135
|
+
] }),
|
|
3136
|
+
extra: /* @__PURE__ */ p.jsxs(J, { children: [
|
|
3137
|
+
/* @__PURE__ */ p.jsx(W, { onClick: () => e("/project/list"), children: "取消" }),
|
|
3138
|
+
/* @__PURE__ */ p.jsx(W, { type: "primary", icon: /* @__PURE__ */ p.jsx(qr, {}), loading: n, onClick: O, children: "立项" })
|
|
3139
|
+
] }),
|
|
3140
|
+
children: /* @__PURE__ */ p.jsxs(pe, { form: r, layout: "vertical", initialValues: { agentRole: "general" }, children: [
|
|
3141
|
+
/* @__PURE__ */ p.jsx(pe.Item, { label: "来源", children: /* @__PURE__ */ p.jsxs(et.Group, { value: o, onChange: (g) => a(g.target.value), children: [
|
|
3142
|
+
/* @__PURE__ */ p.jsx(et.Button, { value: "from-subscribe", children: "从订阅线索立项 (主路径)" }),
|
|
3143
|
+
/* @__PURE__ */ p.jsx(et.Button, { value: "manual", children: "手动立项 (无源数据)" })
|
|
3144
|
+
] }) }),
|
|
3145
|
+
/* @__PURE__ */ p.jsx(pe.Item, { label: "项目名称", name: "name", rules: [{ required: !0, message: "请输入名称" }], children: /* @__PURE__ */ p.jsx(ne, { placeholder: "例如: 跟进 GitHub 高优 Issue" }) }),
|
|
3146
|
+
/* @__PURE__ */ p.jsx(pe.Item, { label: "项目描述", name: "description", children: /* @__PURE__ */ p.jsx(ne.TextArea, { rows: 2, placeholder: "(可选) 这个项目要解决什么?" }) }),
|
|
3147
|
+
o === "from-subscribe" && /* @__PURE__ */ p.jsxs(Re, { type: "inner", title: "源数据", style: { marginBottom: 16 }, children: [
|
|
3148
|
+
/* @__PURE__ */ p.jsx(
|
|
3149
|
+
pe.Item,
|
|
3150
|
+
{
|
|
3151
|
+
label: "选择订阅",
|
|
3152
|
+
name: "sourceSubscriptionId",
|
|
3153
|
+
rules: [{ required: !0, message: "请选订阅" }],
|
|
3154
|
+
children: /* @__PURE__ */ p.jsx(
|
|
3155
|
+
Je,
|
|
3156
|
+
{
|
|
3157
|
+
placeholder: "选择订阅 (拉取最近一次 run 的 items)",
|
|
3158
|
+
options: c.map((g) => ({ value: g.id, label: `#${g.id} ${g.name}` })),
|
|
3159
|
+
onChange: (g) => {
|
|
3160
|
+
b(g), S(g), j([]);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
)
|
|
3164
|
+
}
|
|
3165
|
+
),
|
|
3166
|
+
x && /* @__PURE__ */ p.jsxs(at, { spinning: d, children: [
|
|
3167
|
+
/* @__PURE__ */ p.jsxs("div", { style: { marginBottom: 8 }, children: [
|
|
3168
|
+
/* @__PURE__ */ p.jsxs(he, { color: "blue", children: [
|
|
3169
|
+
"已选 ",
|
|
3170
|
+
w.length,
|
|
3171
|
+
" / ",
|
|
3172
|
+
m.length
|
|
3173
|
+
] }),
|
|
3174
|
+
/* @__PURE__ */ p.jsx(W, { size: "small", onClick: () => j(m.map((g) => g.id)), children: "全选" }),
|
|
3175
|
+
/* @__PURE__ */ p.jsx(W, { size: "small", onClick: () => j([]), style: { marginLeft: 4 }, children: "清空" })
|
|
3176
|
+
] }),
|
|
3177
|
+
/* @__PURE__ */ p.jsx(
|
|
3178
|
+
Zt,
|
|
3179
|
+
{
|
|
3180
|
+
rowKey: "id",
|
|
3181
|
+
size: "small",
|
|
3182
|
+
dataSource: m,
|
|
3183
|
+
pagination: { pageSize: 10 },
|
|
3184
|
+
rowSelection: {
|
|
3185
|
+
selectedRowKeys: w,
|
|
3186
|
+
onChange: j
|
|
3187
|
+
},
|
|
3188
|
+
columns: [
|
|
3189
|
+
{ title: "id", dataIndex: "dedupKey", width: 160, ellipsis: !0 },
|
|
3190
|
+
{
|
|
3191
|
+
title: "title",
|
|
3192
|
+
dataIndex: "normalized",
|
|
3193
|
+
render: (g) => {
|
|
3194
|
+
try {
|
|
3195
|
+
return JSON.parse(g).title || "(无)";
|
|
3196
|
+
} catch {
|
|
3197
|
+
return g;
|
|
3198
|
+
}
|
|
3199
|
+
}
|
|
3200
|
+
},
|
|
3201
|
+
{
|
|
3202
|
+
title: "fetched",
|
|
3203
|
+
dataIndex: "fetchedAt",
|
|
3204
|
+
width: 150,
|
|
3205
|
+
render: (g) => g ? new Date(g).toLocaleString() : "-"
|
|
3206
|
+
}
|
|
3207
|
+
]
|
|
3208
|
+
}
|
|
3209
|
+
)
|
|
3210
|
+
] })
|
|
3211
|
+
] }),
|
|
3212
|
+
/* @__PURE__ */ p.jsxs(Re, { type: "inner", title: "Agent 配置", style: { marginBottom: 16 }, children: [
|
|
3213
|
+
/* @__PURE__ */ p.jsx(pe.Item, { label: "Agent 角色", name: "agentRole", extra: "决定 system prompt 的语气 / 视角", children: /* @__PURE__ */ p.jsx(Je, { options: oo }) }),
|
|
3214
|
+
/* @__PURE__ */ p.jsx(
|
|
3215
|
+
pe.Item,
|
|
3216
|
+
{
|
|
3217
|
+
label: "模型 (可选)",
|
|
3218
|
+
name: "modelCode",
|
|
3219
|
+
extra: "留空走默认 (智能中心 LLM 凭证里第一个 enabled)",
|
|
3220
|
+
children: /* @__PURE__ */ p.jsx(ne, { placeholder: "例如: gpt-4 / deepseek-chat" })
|
|
3221
|
+
}
|
|
3222
|
+
)
|
|
3223
|
+
] }),
|
|
3224
|
+
/* @__PURE__ */ p.jsx(
|
|
3225
|
+
ht,
|
|
3226
|
+
{
|
|
3227
|
+
type: "info",
|
|
3228
|
+
showIcon: !0,
|
|
3229
|
+
message: "立项后源数据会被快照 (context_snapshot), 后续订阅更新不会影响项目上下文."
|
|
3230
|
+
}
|
|
3231
|
+
)
|
|
3232
|
+
] })
|
|
3233
|
+
}
|
|
3234
|
+
) });
|
|
3235
|
+
}
|
|
3236
|
+
const Xt = {
|
|
3237
|
+
USER: { color: "blue", icon: /* @__PURE__ */ p.jsx(Hr, {}), label: "CEO" },
|
|
3238
|
+
ASSISTANT: { color: "purple", icon: /* @__PURE__ */ p.jsx($r, {}), label: "Agent" },
|
|
3239
|
+
SYSTEM: { color: "default", icon: null, label: "系统" }
|
|
3240
|
+
}, ao = {
|
|
3241
|
+
OPEN: { color: "blue", text: "待开始" },
|
|
3242
|
+
IN_PROGRESS: { color: "green", text: "进行中" },
|
|
3243
|
+
COMPLETED: { color: "default", text: "已完成" },
|
|
3244
|
+
ARCHIVED: { color: "default", text: "已归档" }
|
|
3245
|
+
};
|
|
3246
|
+
function lo() {
|
|
3247
|
+
const { id: e } = kr(), t = pt(), [r, n] = H(null), [s, o] = H([]), [a, c] = H(""), [f, m] = H(!1), u = Nr(null);
|
|
3248
|
+
ke(() => {
|
|
3249
|
+
e && d();
|
|
3250
|
+
}, [e]), ke(() => {
|
|
3251
|
+
u.current && (u.current.scrollTop = u.current.scrollHeight);
|
|
3252
|
+
}, [s]);
|
|
3253
|
+
const d = async () => {
|
|
3254
|
+
try {
|
|
3255
|
+
const [x, b] = await Promise.all([
|
|
3256
|
+
ie.get(`/project/${e}`),
|
|
3257
|
+
ie.get(`/project/${e}/messages`)
|
|
3258
|
+
]);
|
|
3259
|
+
n((x == null ? void 0 : x.data) ?? x), o(Array.isArray((b == null ? void 0 : b.data) ?? b) ? (b == null ? void 0 : b.data) ?? b : []);
|
|
3260
|
+
} catch {
|
|
3261
|
+
K.error("加载项目失败");
|
|
3262
|
+
}
|
|
3263
|
+
}, R = async () => {
|
|
3264
|
+
if (!a.trim()) return;
|
|
3265
|
+
const x = a.trim();
|
|
3266
|
+
c(""), m(!0);
|
|
3267
|
+
const b = { seq: -1, role: "USER", content: x, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
3268
|
+
o((h) => [...h, b]);
|
|
3269
|
+
try {
|
|
3270
|
+
const h = await ie.post(`/project/${e}/chat`, { message: x });
|
|
3271
|
+
if (h && h.success !== !1) {
|
|
3272
|
+
const O = (h.data ?? h).message;
|
|
3273
|
+
o((g) => [...g.filter((v) => v.seq !== -1), ...O ? [O] : []]), setTimeout(d, 100);
|
|
3274
|
+
} else
|
|
3275
|
+
K.error((h == null ? void 0 : h.message) || "发送失败");
|
|
3276
|
+
} catch (h) {
|
|
3277
|
+
K.error("发送失败: " + ((h == null ? void 0 : h.message) || ""));
|
|
3278
|
+
} finally {
|
|
3279
|
+
m(!1);
|
|
3280
|
+
}
|
|
3281
|
+
}, w = async () => {
|
|
3282
|
+
try {
|
|
3283
|
+
const x = await ie.post(`/project/${e}/status?status=COMPLETED`);
|
|
3284
|
+
x && x.success !== !1 && (K.success("已标记完成"), d());
|
|
3285
|
+
} catch {
|
|
3286
|
+
K.error("操作失败");
|
|
3287
|
+
}
|
|
3288
|
+
};
|
|
3289
|
+
if (!r) return /* @__PURE__ */ p.jsx("div", { style: { padding: 24 }, children: /* @__PURE__ */ p.jsx(at, {}) });
|
|
3290
|
+
const j = ao[r.status] || { color: "default", text: r.status };
|
|
3291
|
+
return /* @__PURE__ */ p.jsxs("div", { style: { padding: 24, height: "calc(100vh - 64px)", display: "flex", flexDirection: "column", gap: 16 }, children: [
|
|
3292
|
+
/* @__PURE__ */ p.jsxs(
|
|
3293
|
+
Re,
|
|
3294
|
+
{
|
|
3295
|
+
title: /* @__PURE__ */ p.jsxs(J, { children: [
|
|
3296
|
+
/* @__PURE__ */ p.jsx(W, { type: "text", icon: /* @__PURE__ */ p.jsx(rr, {}), onClick: () => t("/project/list") }),
|
|
3297
|
+
/* @__PURE__ */ p.jsx(yt, {}),
|
|
3298
|
+
/* @__PURE__ */ p.jsx("span", { style: { fontWeight: 500 }, children: r.name }),
|
|
3299
|
+
/* @__PURE__ */ p.jsx(he, { color: j.color, children: j.text })
|
|
3300
|
+
] }),
|
|
3301
|
+
extra: /* @__PURE__ */ p.jsxs(J, { children: [
|
|
3302
|
+
r.contextSize > 0 && /* @__PURE__ */ p.jsxs(he, { color: "blue", children: [
|
|
3303
|
+
"上下文 ",
|
|
3304
|
+
r.contextSize,
|
|
3305
|
+
" B"
|
|
3306
|
+
] }),
|
|
3307
|
+
/* @__PURE__ */ p.jsx(he, { children: r.agentRole }),
|
|
3308
|
+
r.modelCode && /* @__PURE__ */ p.jsx(he, { color: "purple", children: r.modelCode }),
|
|
3309
|
+
r.status !== "COMPLETED" && r.status !== "ARCHIVED" && /* @__PURE__ */ p.jsx(er, { title: "标记完成?", onConfirm: w, children: /* @__PURE__ */ p.jsx(W, { icon: /* @__PURE__ */ p.jsx(mt, {}), children: "标记完成" }) })
|
|
3310
|
+
] }),
|
|
3311
|
+
children: [
|
|
3312
|
+
r.description && /* @__PURE__ */ p.jsx("div", { style: { color: "#666", marginBottom: 8 }, children: r.description }),
|
|
3313
|
+
/* @__PURE__ */ p.jsxs(J, { size: "large", children: [
|
|
3314
|
+
/* @__PURE__ */ p.jsx(tt, { title: "消息数", value: r.messageCount || 0 }),
|
|
3315
|
+
r.sourceSubscriptionId && /* @__PURE__ */ p.jsx(tt, { title: "来源订阅", value: `#${r.sourceSubscriptionId}` }),
|
|
3316
|
+
/* @__PURE__ */ p.jsx(tt, { title: "立项", value: r.createdAt ? new Date(r.createdAt).toLocaleString() : "-" })
|
|
3317
|
+
] })
|
|
3318
|
+
]
|
|
3319
|
+
}
|
|
3320
|
+
),
|
|
3321
|
+
/* @__PURE__ */ p.jsxs(
|
|
3322
|
+
Re,
|
|
3323
|
+
{
|
|
3324
|
+
style: { flex: 1, display: "flex", flexDirection: "column" },
|
|
3325
|
+
bodyStyle: { flex: 1, display: "flex", flexDirection: "column", padding: 0 },
|
|
3326
|
+
children: [
|
|
3327
|
+
/* @__PURE__ */ p.jsx("div", { ref: u, style: { flex: 1, overflow: "auto", padding: 16, background: "#fafafa" }, children: s.length === 0 ? /* @__PURE__ */ p.jsx(Ur, { description: "还没有消息, 跟 Agent 说点什么?" }) : /* @__PURE__ */ p.jsxs(J, { orientation: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
3328
|
+
s.map((x) => {
|
|
3329
|
+
const b = Xt[x.role] || Xt.SYSTEM, h = x.role === "USER";
|
|
3330
|
+
return /* @__PURE__ */ p.jsx("div", { style: {
|
|
3331
|
+
display: "flex",
|
|
3332
|
+
justifyContent: h ? "flex-end" : "flex-start"
|
|
3333
|
+
}, children: /* @__PURE__ */ p.jsxs("div", { style: {
|
|
3334
|
+
maxWidth: "70%",
|
|
3335
|
+
background: h ? "#1677ff" : "#fff",
|
|
3336
|
+
color: h ? "#fff" : "#000",
|
|
3337
|
+
border: h ? "none" : "1px solid #e8e8e8",
|
|
3338
|
+
borderRadius: 8,
|
|
3339
|
+
padding: "10px 14px",
|
|
3340
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.04)"
|
|
3341
|
+
}, children: [
|
|
3342
|
+
/* @__PURE__ */ p.jsx("div", { style: { fontSize: 12, opacity: 0.7, marginBottom: 4 }, children: /* @__PURE__ */ p.jsxs(J, { size: 4, children: [
|
|
3343
|
+
b.icon,
|
|
3344
|
+
b.label,
|
|
3345
|
+
x.seq > 0 && /* @__PURE__ */ p.jsxs("span", { children: [
|
|
3346
|
+
"#",
|
|
3347
|
+
x.seq
|
|
3348
|
+
] }),
|
|
3349
|
+
x.latencyMs > 0 && /* @__PURE__ */ p.jsxs("span", { children: [
|
|
3350
|
+
"· ",
|
|
3351
|
+
x.latencyMs,
|
|
3352
|
+
"ms"
|
|
3353
|
+
] }),
|
|
3354
|
+
x.modelCode && /* @__PURE__ */ p.jsxs("span", { children: [
|
|
3355
|
+
"· ",
|
|
3356
|
+
x.modelCode
|
|
3357
|
+
] })
|
|
3358
|
+
] }) }),
|
|
3359
|
+
/* @__PURE__ */ p.jsx("div", { style: { whiteSpace: "pre-wrap", wordBreak: "break-word" }, children: x.content })
|
|
3360
|
+
] }) }, x.id || x.seq);
|
|
3361
|
+
}),
|
|
3362
|
+
f && /* @__PURE__ */ p.jsx("div", { style: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ p.jsxs("div", { style: { background: "#fff", border: "1px solid #e8e8e8", borderRadius: 8, padding: "10px 14px" }, children: [
|
|
3363
|
+
/* @__PURE__ */ p.jsx(at, { size: "small" }),
|
|
3364
|
+
" 思考中..."
|
|
3365
|
+
] }) })
|
|
3366
|
+
] }) }),
|
|
3367
|
+
r.status === "COMPLETED" || r.status === "ARCHIVED" ? /* @__PURE__ */ p.jsx(
|
|
3368
|
+
ht,
|
|
3369
|
+
{
|
|
3370
|
+
style: { margin: 12, marginBottom: 0 },
|
|
3371
|
+
type: "info",
|
|
3372
|
+
message: "项目已完成 / 归档, 不再接受新消息",
|
|
3373
|
+
showIcon: !0
|
|
3374
|
+
}
|
|
3375
|
+
) : /* @__PURE__ */ p.jsxs("div", { style: { borderTop: "1px solid #f0f0f0", padding: 12, display: "flex", gap: 8 }, children: [
|
|
3376
|
+
/* @__PURE__ */ p.jsx(
|
|
3377
|
+
ne.TextArea,
|
|
3378
|
+
{
|
|
3379
|
+
value: a,
|
|
3380
|
+
onChange: (x) => c(x.target.value),
|
|
3381
|
+
onPressEnter: (x) => {
|
|
3382
|
+
x.shiftKey || (x.preventDefault(), R());
|
|
3383
|
+
},
|
|
3384
|
+
placeholder: "输入消息, Enter 发送 (Shift+Enter 换行)",
|
|
3385
|
+
autoSize: { minRows: 1, maxRows: 6 },
|
|
3386
|
+
disabled: f
|
|
3387
|
+
}
|
|
3388
|
+
),
|
|
3389
|
+
/* @__PURE__ */ p.jsx(
|
|
3390
|
+
W,
|
|
3391
|
+
{
|
|
3392
|
+
type: "primary",
|
|
3393
|
+
icon: /* @__PURE__ */ p.jsx(zr, {}),
|
|
3394
|
+
loading: f,
|
|
3395
|
+
onClick: R,
|
|
3396
|
+
disabled: !a.trim(),
|
|
3397
|
+
children: "发送"
|
|
3398
|
+
}
|
|
3399
|
+
)
|
|
3400
|
+
] })
|
|
3401
|
+
]
|
|
3402
|
+
}
|
|
3403
|
+
)
|
|
3404
|
+
] });
|
|
3405
|
+
}
|
|
3406
|
+
function mi() {
|
|
3407
|
+
return /* @__PURE__ */ p.jsxs(Dr, { children: [
|
|
3408
|
+
/* @__PURE__ */ p.jsx(Be, { index: !0, element: /* @__PURE__ */ p.jsx(Ir, { to: "list", replace: !0 }) }),
|
|
3409
|
+
/* @__PURE__ */ p.jsx(Be, { path: "list", element: /* @__PURE__ */ p.jsx(so, {}) }),
|
|
3410
|
+
/* @__PURE__ */ p.jsx(Be, { path: "new", element: /* @__PURE__ */ p.jsx(io, {}) }),
|
|
3411
|
+
/* @__PURE__ */ p.jsx(Be, { path: ":id", element: /* @__PURE__ */ p.jsx(lo, {}) })
|
|
3412
|
+
] });
|
|
3413
|
+
}
|
|
3414
|
+
export {
|
|
3415
|
+
mi as ProjectApp,
|
|
3416
|
+
io as ProjectCreate,
|
|
3417
|
+
lo as ProjectDetail,
|
|
3418
|
+
so as ProjectList
|
|
3419
|
+
};
|