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