@jctrans-materials/shared 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.d.ts +8 -2
- package/dist/index.cjs.js +6 -6
- package/dist/index.esm.js +477 -471
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
1
|
+
import Ut from "mitt";
|
|
2
|
+
function et(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const n =
|
|
7
|
+
const { toString: Dt } = Object.prototype, { getPrototypeOf: Ne } = Object, { iterator: le, toStringTag: tt } = Symbol, de = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const n = Dt.call(t);
|
|
9
9
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => de(t) === e), fe = (e) => (t) => typeof t === e, { isArray: V } = Array, J = fe("undefined");
|
|
11
11
|
function Q(e) {
|
|
12
12
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
14
|
+
const nt = P("ArrayBuffer");
|
|
15
|
+
function vt(e) {
|
|
16
16
|
let t;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && nt(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
19
|
+
const zt = fe("string"), O = fe("function"), rt = fe("number"), Y = (e) => e !== null && typeof e == "object", qt = (e) => e === !0 || e === !1, oe = (e) => {
|
|
20
|
+
if (de(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
|
-
const t =
|
|
23
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
24
|
-
},
|
|
22
|
+
const t = Ne(e);
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(le in e);
|
|
24
|
+
}, jt = (e) => {
|
|
25
25
|
if (!Y(e) || Q(e))
|
|
26
26
|
return !1;
|
|
27
27
|
try {
|
|
@@ -29,11 +29,11 @@ const vt = de("string"), O = de("function"), nt = de("number"), Y = (e) => e !==
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, $t = P("Date"), Mt = P("File"), Ht = P("Blob"), Jt = P("FileList"), Vt = (e) => Y(e) && O(e.pipe), Wt = (e) => {
|
|
33
33
|
let t;
|
|
34
|
-
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t =
|
|
34
|
+
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = de(e)) === "formdata" || // detect form-data instance
|
|
35
35
|
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
36
|
-
},
|
|
36
|
+
}, Kt = P("URLSearchParams"), [Xt, Gt, Qt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), Zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Z(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
38
38
|
if (e === null || typeof e > "u")
|
|
39
39
|
return;
|
|
@@ -50,7 +50,7 @@ function Z(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
50
50
|
c = o[r], t.call(null, e[c], c, e);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function st(e, t) {
|
|
54
54
|
if (Q(e))
|
|
55
55
|
return null;
|
|
56
56
|
t = t.toLowerCase();
|
|
@@ -61,71 +61,71 @@ function rt(e, t) {
|
|
|
61
61
|
return s;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
65
|
-
function
|
|
66
|
-
const { caseless: e, skipUndefined: t } =
|
|
67
|
-
const i = e &&
|
|
68
|
-
oe(n[i]) && oe(s) ? n[i] =
|
|
64
|
+
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (e) => !J(e) && e !== q;
|
|
65
|
+
function Ce() {
|
|
66
|
+
const { caseless: e, skipUndefined: t } = ot(this) && this || {}, n = {}, r = (s, o) => {
|
|
67
|
+
const i = e && st(n, o) || o;
|
|
68
|
+
oe(n[i]) && oe(s) ? n[i] = Ce(n[i], s) : oe(s) ? n[i] = Ce({}, s) : V(s) ? n[i] = s.slice() : (!t || !J(s)) && (n[i] = s);
|
|
69
69
|
};
|
|
70
70
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
71
71
|
arguments[s] && Z(arguments[s], r);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
n && O(s) ? e[o] =
|
|
76
|
-
}, { allOwnKeys: r }), e),
|
|
74
|
+
const en = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
|
|
75
|
+
n && O(s) ? e[o] = et(s, n) : e[o] = s;
|
|
76
|
+
}, { allOwnKeys: r }), e), tn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), nn = (e, t, n, r) => {
|
|
77
77
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
78
78
|
value: t.prototype
|
|
79
79
|
}), n && Object.assign(e.prototype, n);
|
|
80
|
-
},
|
|
80
|
+
}, rn = (e, t, n, r) => {
|
|
81
81
|
let s, o, i;
|
|
82
82
|
const c = {};
|
|
83
83
|
if (t = t || {}, e == null) return t;
|
|
84
84
|
do {
|
|
85
85
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
86
86
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
87
|
-
e = n !== !1 &&
|
|
87
|
+
e = n !== !1 && Ne(e);
|
|
88
88
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
89
89
|
return t;
|
|
90
|
-
},
|
|
90
|
+
}, sn = (e, t, n) => {
|
|
91
91
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
92
92
|
const r = e.indexOf(t, n);
|
|
93
93
|
return r !== -1 && r === n;
|
|
94
|
-
},
|
|
94
|
+
}, on = (e) => {
|
|
95
95
|
if (!e) return null;
|
|
96
96
|
if (V(e)) return e;
|
|
97
97
|
let t = e.length;
|
|
98
|
-
if (!
|
|
98
|
+
if (!rt(t)) return null;
|
|
99
99
|
const n = new Array(t);
|
|
100
100
|
for (; t-- > 0; )
|
|
101
101
|
n[t] = e[t];
|
|
102
102
|
return n;
|
|
103
|
-
},
|
|
104
|
-
const r = (e && e[
|
|
103
|
+
}, an = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ne(Uint8Array)), cn = (e, t) => {
|
|
104
|
+
const r = (e && e[le]).call(e);
|
|
105
105
|
let s;
|
|
106
106
|
for (; (s = r.next()) && !s.done; ) {
|
|
107
107
|
const o = s.value;
|
|
108
108
|
t.call(e, o[0], o[1]);
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, un = (e, t) => {
|
|
111
111
|
let n;
|
|
112
112
|
const r = [];
|
|
113
113
|
for (; (n = e.exec(t)) !== null; )
|
|
114
114
|
r.push(n);
|
|
115
115
|
return r;
|
|
116
|
-
},
|
|
116
|
+
}, ln = P("HTMLFormElement"), dn = (e) => e.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
118
|
function(n, r, s) {
|
|
119
119
|
return r.toUpperCase() + s;
|
|
120
120
|
}
|
|
121
|
-
),
|
|
121
|
+
), ve = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), fn = P("RegExp"), it = (e, t) => {
|
|
122
122
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
123
123
|
Z(n, (s, o) => {
|
|
124
124
|
let i;
|
|
125
125
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
126
126
|
}), Object.defineProperties(e, r);
|
|
127
|
-
},
|
|
128
|
-
|
|
127
|
+
}, pn = (e) => {
|
|
128
|
+
it(e, (t, n) => {
|
|
129
129
|
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
130
|
return !1;
|
|
131
131
|
const r = e[n];
|
|
@@ -139,7 +139,7 @@ const Zt = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, hn = (e, t) => {
|
|
143
143
|
const n = {}, r = (s) => {
|
|
144
144
|
s.forEach((o) => {
|
|
145
145
|
n[o] = !0;
|
|
@@ -147,11 +147,11 @@ const Zt = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
|
|
|
147
147
|
};
|
|
148
148
|
return V(e) ? r(e) : r(String(e).split(t)), n;
|
|
149
149
|
}, yn = () => {
|
|
150
|
-
},
|
|
151
|
-
function
|
|
152
|
-
return !!(e && O(e.append) && e[
|
|
150
|
+
}, mn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
151
|
+
function wn(e) {
|
|
152
|
+
return !!(e && O(e.append) && e[tt] === "FormData" && e[le]);
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const gn = (e) => {
|
|
155
155
|
const t = new Array(10), n = (r, s) => {
|
|
156
156
|
if (Y(r)) {
|
|
157
157
|
if (t.indexOf(r) >= 0)
|
|
@@ -170,72 +170,72 @@ const wn = (e) => {
|
|
|
170
170
|
return r;
|
|
171
171
|
};
|
|
172
172
|
return n(e, 0);
|
|
173
|
-
},
|
|
173
|
+
}, bn = P("AsyncFunction"), En = (e) => e && (Y(e) || O(e)) && O(e.then) && O(e.catch), at = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
|
|
174
174
|
s === q && o === n && r.length && r.shift()();
|
|
175
175
|
}, !1), (s) => {
|
|
176
176
|
r.push(s), q.postMessage(n, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
O(q.postMessage)
|
|
180
|
-
),
|
|
180
|
+
), Sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || at, Cn = (e) => e != null && O(e[le]), a = {
|
|
181
181
|
isArray: V,
|
|
182
|
-
isArrayBuffer:
|
|
182
|
+
isArrayBuffer: nt,
|
|
183
183
|
isBuffer: Q,
|
|
184
|
-
isFormData:
|
|
185
|
-
isArrayBufferView:
|
|
186
|
-
isString:
|
|
187
|
-
isNumber:
|
|
188
|
-
isBoolean:
|
|
184
|
+
isFormData: Wt,
|
|
185
|
+
isArrayBufferView: vt,
|
|
186
|
+
isString: zt,
|
|
187
|
+
isNumber: rt,
|
|
188
|
+
isBoolean: qt,
|
|
189
189
|
isObject: Y,
|
|
190
190
|
isPlainObject: oe,
|
|
191
|
-
isEmptyObject:
|
|
192
|
-
isReadableStream:
|
|
193
|
-
isRequest:
|
|
194
|
-
isResponse:
|
|
195
|
-
isHeaders:
|
|
191
|
+
isEmptyObject: jt,
|
|
192
|
+
isReadableStream: Xt,
|
|
193
|
+
isRequest: Gt,
|
|
194
|
+
isResponse: Qt,
|
|
195
|
+
isHeaders: Yt,
|
|
196
196
|
isUndefined: J,
|
|
197
|
-
isDate:
|
|
198
|
-
isFile:
|
|
199
|
-
isBlob:
|
|
200
|
-
isRegExp:
|
|
197
|
+
isDate: $t,
|
|
198
|
+
isFile: Mt,
|
|
199
|
+
isBlob: Ht,
|
|
200
|
+
isRegExp: fn,
|
|
201
201
|
isFunction: O,
|
|
202
|
-
isStream:
|
|
203
|
-
isURLSearchParams:
|
|
204
|
-
isTypedArray:
|
|
205
|
-
isFileList:
|
|
202
|
+
isStream: Vt,
|
|
203
|
+
isURLSearchParams: Kt,
|
|
204
|
+
isTypedArray: an,
|
|
205
|
+
isFileList: Jt,
|
|
206
206
|
forEach: Z,
|
|
207
|
-
merge:
|
|
208
|
-
extend:
|
|
209
|
-
trim:
|
|
210
|
-
stripBOM:
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
213
|
-
kindOf:
|
|
214
|
-
kindOfTest:
|
|
215
|
-
endsWith:
|
|
216
|
-
toArray:
|
|
217
|
-
forEachEntry:
|
|
218
|
-
matchAll:
|
|
219
|
-
isHTMLForm:
|
|
220
|
-
hasOwnProperty:
|
|
221
|
-
hasOwnProp:
|
|
207
|
+
merge: Ce,
|
|
208
|
+
extend: en,
|
|
209
|
+
trim: Zt,
|
|
210
|
+
stripBOM: tn,
|
|
211
|
+
inherits: nn,
|
|
212
|
+
toFlatObject: rn,
|
|
213
|
+
kindOf: de,
|
|
214
|
+
kindOfTest: P,
|
|
215
|
+
endsWith: sn,
|
|
216
|
+
toArray: on,
|
|
217
|
+
forEachEntry: cn,
|
|
218
|
+
matchAll: un,
|
|
219
|
+
isHTMLForm: ln,
|
|
220
|
+
hasOwnProperty: ve,
|
|
221
|
+
hasOwnProp: ve,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
224
|
-
freezeMethods:
|
|
225
|
-
toObjectSet:
|
|
226
|
-
toCamelCase:
|
|
223
|
+
reduceDescriptors: it,
|
|
224
|
+
freezeMethods: pn,
|
|
225
|
+
toObjectSet: hn,
|
|
226
|
+
toCamelCase: dn,
|
|
227
227
|
noop: yn,
|
|
228
|
-
toFiniteNumber:
|
|
229
|
-
findKey:
|
|
228
|
+
toFiniteNumber: mn,
|
|
229
|
+
findKey: st,
|
|
230
230
|
global: q,
|
|
231
|
-
isContextDefined:
|
|
232
|
-
isSpecCompliantForm:
|
|
233
|
-
toJSONObject:
|
|
234
|
-
isAsyncFn:
|
|
235
|
-
isThenable:
|
|
236
|
-
setImmediate:
|
|
237
|
-
asap:
|
|
238
|
-
isIterable:
|
|
231
|
+
isContextDefined: ot,
|
|
232
|
+
isSpecCompliantForm: wn,
|
|
233
|
+
toJSONObject: gn,
|
|
234
|
+
isAsyncFn: bn,
|
|
235
|
+
isThenable: En,
|
|
236
|
+
setImmediate: at,
|
|
237
|
+
asap: Sn,
|
|
238
|
+
isIterable: Cn
|
|
239
239
|
};
|
|
240
240
|
function m(e, t, n, r, s) {
|
|
241
241
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -261,7 +261,7 @@ a.inherits(m, Error, {
|
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
const
|
|
264
|
+
const ct = m.prototype, ut = {};
|
|
265
265
|
[
|
|
266
266
|
"ERR_BAD_OPTION_VALUE",
|
|
267
267
|
"ERR_BAD_OPTION",
|
|
@@ -277,45 +277,45 @@ const at = m.prototype, ct = {};
|
|
|
277
277
|
"ERR_INVALID_URL"
|
|
278
278
|
// eslint-disable-next-line func-names
|
|
279
279
|
].forEach((e) => {
|
|
280
|
-
|
|
280
|
+
ut[e] = { value: e };
|
|
281
281
|
});
|
|
282
|
-
Object.defineProperties(m,
|
|
283
|
-
Object.defineProperty(
|
|
282
|
+
Object.defineProperties(m, ut);
|
|
283
|
+
Object.defineProperty(ct, "isAxiosError", { value: !0 });
|
|
284
284
|
m.from = (e, t, n, r, s, o) => {
|
|
285
|
-
const i = Object.create(
|
|
285
|
+
const i = Object.create(ct);
|
|
286
286
|
a.toFlatObject(e, i, function(l) {
|
|
287
287
|
return l !== Error.prototype;
|
|
288
288
|
}, (u) => u !== "isAxiosError");
|
|
289
289
|
const c = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
|
|
290
290
|
return m.call(i, c, f, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
|
|
291
291
|
};
|
|
292
|
-
const
|
|
293
|
-
function
|
|
292
|
+
const An = null;
|
|
293
|
+
function Ae(e) {
|
|
294
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function lt(e) {
|
|
297
297
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function ze(e, t, n) {
|
|
300
300
|
return e ? e.concat(t).map(function(s, o) {
|
|
301
|
-
return s =
|
|
301
|
+
return s = lt(s), !n && o ? "[" + s + "]" : s;
|
|
302
302
|
}).join(n ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
return a.isArray(e) && !e.some(
|
|
304
|
+
function Rn(e) {
|
|
305
|
+
return a.isArray(e) && !e.some(Ae);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const On = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
|
-
function
|
|
310
|
+
function pe(e, t, n) {
|
|
311
311
|
if (!a.isObject(e))
|
|
312
312
|
throw new TypeError("target must be an object");
|
|
313
313
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
314
314
|
metaTokens: !0,
|
|
315
315
|
dots: !1,
|
|
316
316
|
indexes: !1
|
|
317
|
-
}, !1, function(
|
|
318
|
-
return !a.isUndefined(y
|
|
317
|
+
}, !1, function(y, h) {
|
|
318
|
+
return !a.isUndefined(h[y]);
|
|
319
319
|
});
|
|
320
320
|
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
321
321
|
if (!a.isFunction(s))
|
|
@@ -330,39 +330,39 @@ function fe(e, t, n) {
|
|
|
330
330
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
331
331
|
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
332
332
|
}
|
|
333
|
-
function l(d,
|
|
333
|
+
function l(d, y, h) {
|
|
334
334
|
let b = d;
|
|
335
|
-
if (d && !
|
|
336
|
-
if (a.endsWith(
|
|
337
|
-
|
|
338
|
-
else if (a.isArray(d) &&
|
|
339
|
-
return
|
|
335
|
+
if (d && !h && typeof d == "object") {
|
|
336
|
+
if (a.endsWith(y, "{}"))
|
|
337
|
+
y = r ? y : y.slice(0, -2), d = JSON.stringify(d);
|
|
338
|
+
else if (a.isArray(d) && Rn(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (b = a.toArray(d)))
|
|
339
|
+
return y = lt(y), b.forEach(function(E, R) {
|
|
340
340
|
!(a.isUndefined(E) || E === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
i === !0 ?
|
|
342
|
+
i === !0 ? ze([y], R, o) : i === null ? y : y + "[]",
|
|
343
343
|
u(E)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return
|
|
347
|
+
return Ae(d) ? !0 : (t.append(ze(h, y, o), u(d)), !1);
|
|
348
348
|
}
|
|
349
|
-
const p = [], w = Object.assign(
|
|
349
|
+
const p = [], w = Object.assign(On, {
|
|
350
350
|
defaultVisitor: l,
|
|
351
351
|
convertValue: u,
|
|
352
|
-
isVisitable:
|
|
352
|
+
isVisitable: Ae
|
|
353
353
|
});
|
|
354
|
-
function S(d,
|
|
354
|
+
function S(d, y) {
|
|
355
355
|
if (!a.isUndefined(d)) {
|
|
356
356
|
if (p.indexOf(d) !== -1)
|
|
357
|
-
throw Error("Circular reference detected in " +
|
|
357
|
+
throw Error("Circular reference detected in " + y.join("."));
|
|
358
358
|
p.push(d), a.forEach(d, function(b, T) {
|
|
359
359
|
(!(a.isUndefined(b) || b === null) && s.call(
|
|
360
360
|
t,
|
|
361
361
|
b,
|
|
362
362
|
a.isString(T) ? T.trim() : T,
|
|
363
|
-
|
|
363
|
+
y,
|
|
364
364
|
w
|
|
365
|
-
)) === !0 && S(b,
|
|
365
|
+
)) === !0 && S(b, y ? y.concat(T) : [T]);
|
|
366
366
|
}), p.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
@@ -370,7 +370,7 @@ function fe(e, t, n) {
|
|
|
370
370
|
throw new TypeError("data must be an object");
|
|
371
371
|
return S(e), t;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function qe(e) {
|
|
374
374
|
const t = {
|
|
375
375
|
"!": "%21",
|
|
376
376
|
"'": "%27",
|
|
@@ -384,40 +384,40 @@ function ze(e) {
|
|
|
384
384
|
return t[r];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
this._pairs = [], e &&
|
|
387
|
+
function xe(e, t) {
|
|
388
|
+
this._pairs = [], e && pe(e, this, t);
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const dt = xe.prototype;
|
|
391
|
+
dt.append = function(t, n) {
|
|
392
392
|
this._pairs.push([t, n]);
|
|
393
393
|
};
|
|
394
|
-
|
|
394
|
+
dt.toString = function(t) {
|
|
395
395
|
const n = t ? function(r) {
|
|
396
|
-
return t.call(this, r,
|
|
397
|
-
} :
|
|
396
|
+
return t.call(this, r, qe);
|
|
397
|
+
} : qe;
|
|
398
398
|
return this._pairs.map(function(s) {
|
|
399
399
|
return n(s[0]) + "=" + n(s[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function In(e) {
|
|
403
403
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function ft(e, t, n) {
|
|
406
406
|
if (!t)
|
|
407
407
|
return e;
|
|
408
|
-
const r = n && n.encode ||
|
|
408
|
+
const r = n && n.encode || In;
|
|
409
409
|
a.isFunction(n) && (n = {
|
|
410
410
|
serialize: n
|
|
411
411
|
});
|
|
412
412
|
const s = n && n.serialize;
|
|
413
413
|
let o;
|
|
414
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
414
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(r), o) {
|
|
415
415
|
const i = e.indexOf("#");
|
|
416
416
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
417
417
|
}
|
|
418
418
|
return e;
|
|
419
419
|
}
|
|
420
|
-
class
|
|
420
|
+
class je {
|
|
421
421
|
constructor() {
|
|
422
422
|
this.handlers = [];
|
|
423
423
|
}
|
|
@@ -471,42 +471,42 @@ class qe {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const pt = {
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
478
|
+
}, Tn = typeof URLSearchParams < "u" ? URLSearchParams : xe, Nn = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, Pn = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
481
|
+
URLSearchParams: Tn,
|
|
482
|
+
FormData: Nn,
|
|
483
|
+
Blob: xn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, Pe = typeof window < "u" && typeof document < "u", Re = typeof navigator == "object" && navigator || void 0, Bn = Pe && (!Re || ["ReactNative", "NativeScript", "NS"].indexOf(Re.product) < 0), Ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Fn = Pe && window.location.href || "http://localhost", _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
489
|
+
hasBrowserEnv: Pe,
|
|
490
490
|
hasStandardBrowserEnv: Bn,
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
492
|
-
navigator:
|
|
493
|
-
origin:
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: Ln,
|
|
492
|
+
navigator: Re,
|
|
493
|
+
origin: Fn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), C = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
495
|
+
..._n,
|
|
496
|
+
...Pn
|
|
497
497
|
};
|
|
498
|
-
function
|
|
499
|
-
return
|
|
498
|
+
function kn(e, t) {
|
|
499
|
+
return pe(e, new C.classes.URLSearchParams(), {
|
|
500
500
|
visitor: function(n, r, s, o) {
|
|
501
501
|
return C.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Un(e) {
|
|
507
507
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Dn(e) {
|
|
510
510
|
const t = {}, n = Object.keys(e);
|
|
511
511
|
let r;
|
|
512
512
|
const s = n.length;
|
|
@@ -515,22 +515,22 @@ function Un(e) {
|
|
|
515
515
|
o = n[r], t[o] = e[o];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function ht(e) {
|
|
519
519
|
function t(n, r, s, o) {
|
|
520
520
|
let i = n[o++];
|
|
521
521
|
if (i === "__proto__") return !0;
|
|
522
522
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
523
|
-
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
523
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Dn(s[i])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
526
|
const n = {};
|
|
527
527
|
return a.forEachEntry(e, (r, s) => {
|
|
528
|
-
t(
|
|
528
|
+
t(Un(r), s, n, 0);
|
|
529
529
|
}), n;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function vn(e, t, n) {
|
|
534
534
|
if (a.isString(e))
|
|
535
535
|
try {
|
|
536
536
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -541,12 +541,12 @@ function Dn(e, t, n) {
|
|
|
541
541
|
return (n || JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
543
|
const ee = {
|
|
544
|
-
transitional:
|
|
544
|
+
transitional: pt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(t, n) {
|
|
547
547
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
548
548
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
549
|
-
return s ? JSON.stringify(
|
|
549
|
+
return s ? JSON.stringify(ht(t)) : t;
|
|
550
550
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
551
551
|
return t;
|
|
552
552
|
if (a.isArrayBufferView(t))
|
|
@@ -556,17 +556,17 @@ const ee = {
|
|
|
556
556
|
let c;
|
|
557
557
|
if (o) {
|
|
558
558
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
559
|
+
return kn(t, this.formSerializer).toString();
|
|
560
560
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const f = this.env && this.env.FormData;
|
|
562
|
-
return
|
|
562
|
+
return pe(
|
|
563
563
|
c ? { "files[]": t } : t,
|
|
564
564
|
f && new f(),
|
|
565
565
|
this.formSerializer
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
569
|
+
return o || s ? (n.setContentType("application/json", !1), vn(t)) : t;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(t) {
|
|
572
572
|
const n = this.transitional || ee.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -609,7 +609,7 @@ const ee = {
|
|
|
609
609
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
610
|
ee.headers[e] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const zn = a.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,29 +627,29 @@ const vn = a.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), qn = (e) => {
|
|
631
631
|
const t = {};
|
|
632
632
|
let n, r, s;
|
|
633
633
|
return e && e.split(`
|
|
634
634
|
`).forEach(function(i) {
|
|
635
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
635
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && zn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
636
636
|
}), t;
|
|
637
|
-
},
|
|
637
|
+
}, $e = /* @__PURE__ */ Symbol("internals");
|
|
638
638
|
function X(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
641
|
function ie(e) {
|
|
642
642
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ie) : String(e);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function jn(e) {
|
|
645
645
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
646
|
let r;
|
|
647
647
|
for (; r = n.exec(e); )
|
|
648
648
|
t[r[1]] = r[2];
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
652
|
-
function
|
|
651
|
+
const $n = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
+
function ge(e, t, n, r, s) {
|
|
653
653
|
if (a.isFunction(r))
|
|
654
654
|
return r.call(this, t, n);
|
|
655
655
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -659,10 +659,10 @@ function we(e, t, n, r, s) {
|
|
|
659
659
|
return r.test(t);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Mn(e) {
|
|
663
663
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Hn(e, t) {
|
|
666
666
|
const n = a.toCamelCase(" " + t);
|
|
667
667
|
["get", "set", "has"].forEach((r) => {
|
|
668
668
|
Object.defineProperty(e, r + n, {
|
|
@@ -689,8 +689,8 @@ let I = class {
|
|
|
689
689
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
690
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
691
|
i(t, n);
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) &&
|
|
693
|
-
i(
|
|
692
|
+
else if (a.isString(t) && (t = t.trim()) && !$n(t))
|
|
693
|
+
i(qn(t), n);
|
|
694
694
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
695
|
let c = {}, f, u;
|
|
696
696
|
for (const l of t) {
|
|
@@ -711,7 +711,7 @@ let I = class {
|
|
|
711
711
|
if (!n)
|
|
712
712
|
return s;
|
|
713
713
|
if (n === !0)
|
|
714
|
-
return
|
|
714
|
+
return jn(s);
|
|
715
715
|
if (a.isFunction(n))
|
|
716
716
|
return n.call(this, s, r);
|
|
717
717
|
if (a.isRegExp(n))
|
|
@@ -723,7 +723,7 @@ let I = class {
|
|
|
723
723
|
has(t, n) {
|
|
724
724
|
if (t = X(t), t) {
|
|
725
725
|
const r = a.findKey(this, t);
|
|
726
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
726
|
+
return !!(r && this[r] !== void 0 && (!n || ge(this, this[r], r, n)));
|
|
727
727
|
}
|
|
728
728
|
return !1;
|
|
729
729
|
}
|
|
@@ -733,7 +733,7 @@ let I = class {
|
|
|
733
733
|
function o(i) {
|
|
734
734
|
if (i = X(i), i) {
|
|
735
735
|
const c = a.findKey(r, i);
|
|
736
|
-
c && (!n ||
|
|
736
|
+
c && (!n || ge(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -743,7 +743,7 @@ let I = class {
|
|
|
743
743
|
let r = n.length, s = !1;
|
|
744
744
|
for (; r--; ) {
|
|
745
745
|
const o = n[r];
|
|
746
|
-
(!t ||
|
|
746
|
+
(!t || ge(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
747
747
|
}
|
|
748
748
|
return s;
|
|
749
749
|
}
|
|
@@ -755,7 +755,7 @@ let I = class {
|
|
|
755
755
|
n[i] = ie(s), delete n[o];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = t ?
|
|
758
|
+
const c = t ? Mn(o) : String(o).trim();
|
|
759
759
|
c !== o && delete n[o], n[c] = ie(s), r[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
@@ -789,12 +789,12 @@ let I = class {
|
|
|
789
789
|
return n.forEach((s) => r.set(s)), r;
|
|
790
790
|
}
|
|
791
791
|
static accessor(t) {
|
|
792
|
-
const r = (this[
|
|
792
|
+
const r = (this[$e] = this[$e] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, s = this.prototype;
|
|
795
795
|
function o(i) {
|
|
796
796
|
const c = X(i);
|
|
797
|
-
r[c] || (
|
|
797
|
+
r[c] || (Hn(s, i), r[c] = !0);
|
|
798
798
|
}
|
|
799
799
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
800
800
|
}
|
|
@@ -810,7 +810,7 @@ a.reduceDescriptors(I.prototype, ({ value: e }, t) => {
|
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
812
|
a.freezeMethods(I);
|
|
813
|
-
function
|
|
813
|
+
function be(e, t) {
|
|
814
814
|
const n = this || ee, r = t || n, s = I.from(r.headers);
|
|
815
815
|
let o = r.data;
|
|
816
816
|
return a.forEach(e, function(c) {
|
|
@@ -826,7 +826,7 @@ function W(e, t, n) {
|
|
|
826
826
|
a.inherits(W, m, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function
|
|
829
|
+
function mt(e, t, n) {
|
|
830
830
|
const r = n.config.validateStatus;
|
|
831
831
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
832
832
|
"Request failed with status code " + n.status,
|
|
@@ -836,11 +836,11 @@ function ht(e, t, n) {
|
|
|
836
836
|
n
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Jn(e) {
|
|
840
840
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
841
|
return t && t[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Vn(e, t) {
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const n = new Array(e), r = new Array(e);
|
|
846
846
|
let s = 0, o = 0, i;
|
|
@@ -856,7 +856,7 @@ function Jn(e, t) {
|
|
|
856
856
|
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function Wn(e, t) {
|
|
860
860
|
let n = 0, r = 1e3 / t, s, o;
|
|
861
861
|
const i = (u, l = Date.now()) => {
|
|
862
862
|
n = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
@@ -870,8 +870,8 @@ function Vn(e, t) {
|
|
|
870
870
|
}
|
|
871
871
|
const ce = (e, t, n = 3) => {
|
|
872
872
|
let r = 0;
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
873
|
+
const s = Vn(50, 250);
|
|
874
|
+
return Wn((o) => {
|
|
875
875
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
876
876
|
r = i;
|
|
877
877
|
const p = {
|
|
@@ -887,17 +887,17 @@ const ce = (e, t, n = 3) => {
|
|
|
887
887
|
};
|
|
888
888
|
e(p);
|
|
889
889
|
}, n);
|
|
890
|
-
},
|
|
890
|
+
}, Me = (e, t) => {
|
|
891
891
|
const n = e != null;
|
|
892
892
|
return [(r) => t[0]({
|
|
893
893
|
lengthComputable: n,
|
|
894
894
|
total: e,
|
|
895
895
|
loaded: r
|
|
896
896
|
}), t[1]];
|
|
897
|
-
},
|
|
897
|
+
}, He = (e) => (...t) => a.asap(() => e(...t)), Kn = C.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, C.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
898
898
|
new URL(C.origin),
|
|
899
899
|
C.navigator && /(msie|trident)/i.test(C.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, Xn = C.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
903
|
write(e, t, n, r, s, o, i) {
|
|
@@ -926,17 +926,17 @@ const ce = (e, t, n = 3) => {
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
);
|
|
929
|
-
function
|
|
929
|
+
function Gn(e) {
|
|
930
930
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function Qn(e, t) {
|
|
933
933
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
let r = !
|
|
937
|
-
return e && (r || n == !1) ?
|
|
935
|
+
function wt(e, t, n) {
|
|
936
|
+
let r = !Gn(t);
|
|
937
|
+
return e && (r || n == !1) ? Qn(e, t) : t;
|
|
938
938
|
}
|
|
939
|
-
const
|
|
939
|
+
const Je = (e) => e instanceof I ? { ...e } : e;
|
|
940
940
|
function $(e, t) {
|
|
941
941
|
t = t || {};
|
|
942
942
|
const n = {};
|
|
@@ -994,17 +994,17 @@ function $(e, t) {
|
|
|
994
994
|
socketPath: i,
|
|
995
995
|
responseEncoding: i,
|
|
996
996
|
validateStatus: c,
|
|
997
|
-
headers: (u, l, p) => s(
|
|
997
|
+
headers: (u, l, p) => s(Je(u), Je(l), p, !0)
|
|
998
998
|
};
|
|
999
999
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
1000
1000
|
const p = f[l] || s, w = p(e[l], t[l], l);
|
|
1001
1001
|
a.isUndefined(w) && p !== c || (n[l] = w);
|
|
1002
1002
|
}), n;
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1004
|
+
const gt = (e) => {
|
|
1005
1005
|
const t = $({}, e);
|
|
1006
1006
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1007
|
-
if (t.headers = i = I.from(i), t.url =
|
|
1007
|
+
if (t.headers = i = I.from(i), t.url = ft(wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1008
1008
|
"Authorization",
|
|
1009
1009
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1010
1010
|
), a.isFormData(n)) {
|
|
@@ -1017,70 +1017,70 @@ const wt = (e) => {
|
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
|
-
if (C.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1021
|
-
const f = s && o &&
|
|
1020
|
+
if (C.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Kn(t.url))) {
|
|
1021
|
+
const f = s && o && Xn.read(o);
|
|
1022
1022
|
f && i.set(s, f);
|
|
1023
1023
|
}
|
|
1024
1024
|
return t;
|
|
1025
|
-
},
|
|
1025
|
+
}, Yn = typeof XMLHttpRequest < "u", Zn = Yn && function(e) {
|
|
1026
1026
|
return new Promise(function(n, r) {
|
|
1027
|
-
const s =
|
|
1027
|
+
const s = gt(e);
|
|
1028
1028
|
let o = s.data;
|
|
1029
1029
|
const i = I.from(s.headers).normalize();
|
|
1030
1030
|
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, p, w, S, d;
|
|
1031
|
-
function
|
|
1031
|
+
function y() {
|
|
1032
1032
|
S && S(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1033
1033
|
}
|
|
1034
|
-
let
|
|
1035
|
-
|
|
1034
|
+
let h = new XMLHttpRequest();
|
|
1035
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1036
1036
|
function b() {
|
|
1037
|
-
if (!
|
|
1037
|
+
if (!h)
|
|
1038
1038
|
return;
|
|
1039
1039
|
const E = I.from(
|
|
1040
|
-
"getAllResponseHeaders" in
|
|
1040
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1041
1041
|
), x = {
|
|
1042
|
-
data: !c || c === "text" || c === "json" ?
|
|
1043
|
-
status:
|
|
1044
|
-
statusText:
|
|
1042
|
+
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1043
|
+
status: h.status,
|
|
1044
|
+
statusText: h.statusText,
|
|
1045
1045
|
headers: E,
|
|
1046
1046
|
config: e,
|
|
1047
|
-
request:
|
|
1047
|
+
request: h
|
|
1048
1048
|
};
|
|
1049
|
-
|
|
1050
|
-
n(N),
|
|
1049
|
+
mt(function(N) {
|
|
1050
|
+
n(N), y();
|
|
1051
1051
|
}, function(N) {
|
|
1052
|
-
r(N),
|
|
1053
|
-
}, x),
|
|
1052
|
+
r(N), y();
|
|
1053
|
+
}, x), h = null;
|
|
1054
1054
|
}
|
|
1055
|
-
"onloadend" in
|
|
1056
|
-
!
|
|
1057
|
-
},
|
|
1058
|
-
|
|
1059
|
-
},
|
|
1060
|
-
const x = R && R.message ? R.message : "Network Error", v = new m(x, m.ERR_NETWORK, e,
|
|
1061
|
-
v.event = R || null, r(v),
|
|
1062
|
-
},
|
|
1055
|
+
"onloadend" in h ? h.onloadend = b : h.onreadystatechange = function() {
|
|
1056
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
1057
|
+
}, h.onabort = function() {
|
|
1058
|
+
h && (r(new m("Request aborted", m.ECONNABORTED, e, h)), h = null);
|
|
1059
|
+
}, h.onerror = function(R) {
|
|
1060
|
+
const x = R && R.message ? R.message : "Network Error", v = new m(x, m.ERR_NETWORK, e, h);
|
|
1061
|
+
v.event = R || null, r(v), h = null;
|
|
1062
|
+
}, h.ontimeout = function() {
|
|
1063
1063
|
let R = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1064
|
-
const x = s.transitional ||
|
|
1064
|
+
const x = s.transitional || pt;
|
|
1065
1065
|
s.timeoutErrorMessage && (R = s.timeoutErrorMessage), r(new m(
|
|
1066
1066
|
R,
|
|
1067
1067
|
x.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1068
1068
|
e,
|
|
1069
|
-
|
|
1070
|
-
)),
|
|
1071
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1072
|
-
|
|
1073
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1074
|
-
|
|
1069
|
+
h
|
|
1070
|
+
)), h = null;
|
|
1071
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(R, x) {
|
|
1072
|
+
h.setRequestHeader(x, R);
|
|
1073
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([w, d] = ce(u, !0), h.addEventListener("progress", w)), f && h.upload && ([p, S] = ce(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (E) => {
|
|
1074
|
+
h && (r(!E || E.type ? new W(null, e, h) : E), h.abort(), h = null);
|
|
1075
1075
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1076
|
-
const T =
|
|
1076
|
+
const T = Jn(s.url);
|
|
1077
1077
|
if (T && C.protocols.indexOf(T) === -1) {
|
|
1078
1078
|
r(new m("Unsupported protocol " + T + ":", m.ERR_BAD_REQUEST, e));
|
|
1079
1079
|
return;
|
|
1080
1080
|
}
|
|
1081
|
-
|
|
1081
|
+
h.send(o || null);
|
|
1082
1082
|
});
|
|
1083
|
-
},
|
|
1083
|
+
}, er = (e, t) => {
|
|
1084
1084
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1085
1085
|
if (t || n) {
|
|
1086
1086
|
let r = new AbortController(), s;
|
|
@@ -1103,7 +1103,7 @@ const wt = (e) => {
|
|
|
1103
1103
|
const { signal: f } = r;
|
|
1104
1104
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1105
1105
|
}
|
|
1106
|
-
},
|
|
1106
|
+
}, tr = function* (e, t) {
|
|
1107
1107
|
let n = e.byteLength;
|
|
1108
1108
|
if (n < t) {
|
|
1109
1109
|
yield e;
|
|
@@ -1112,10 +1112,10 @@ const wt = (e) => {
|
|
|
1112
1112
|
let r = 0, s;
|
|
1113
1113
|
for (; r < n; )
|
|
1114
1114
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1115
|
-
},
|
|
1116
|
-
for await (const n of
|
|
1117
|
-
yield*
|
|
1118
|
-
},
|
|
1115
|
+
}, nr = async function* (e, t) {
|
|
1116
|
+
for await (const n of rr(e))
|
|
1117
|
+
yield* tr(n, t);
|
|
1118
|
+
}, rr = async function* (e) {
|
|
1119
1119
|
if (e[Symbol.asyncIterator]) {
|
|
1120
1120
|
yield* e;
|
|
1121
1121
|
return;
|
|
@@ -1131,8 +1131,8 @@ const wt = (e) => {
|
|
|
1131
1131
|
} finally {
|
|
1132
1132
|
await t.cancel();
|
|
1133
1133
|
}
|
|
1134
|
-
},
|
|
1135
|
-
const s =
|
|
1134
|
+
}, Ve = (e, t, n, r) => {
|
|
1135
|
+
const s = nr(e, t);
|
|
1136
1136
|
let o = 0, i, c = (f) => {
|
|
1137
1137
|
i || (i = !0, r && r(f));
|
|
1138
1138
|
};
|
|
@@ -1160,44 +1160,44 @@ const wt = (e) => {
|
|
|
1160
1160
|
}, {
|
|
1161
1161
|
highWaterMark: 2
|
|
1162
1162
|
});
|
|
1163
|
-
},
|
|
1163
|
+
}, We = 64 * 1024, { isFunction: se } = a, sr = (({ Request: e, Response: t }) => ({
|
|
1164
1164
|
Request: e,
|
|
1165
1165
|
Response: t
|
|
1166
1166
|
}))(a.global), {
|
|
1167
|
-
ReadableStream:
|
|
1168
|
-
TextEncoder:
|
|
1169
|
-
} = a.global,
|
|
1167
|
+
ReadableStream: Ke,
|
|
1168
|
+
TextEncoder: Xe
|
|
1169
|
+
} = a.global, Ge = (e, ...t) => {
|
|
1170
1170
|
try {
|
|
1171
1171
|
return !!e(...t);
|
|
1172
1172
|
} catch {
|
|
1173
1173
|
return !1;
|
|
1174
1174
|
}
|
|
1175
|
-
},
|
|
1175
|
+
}, or = (e) => {
|
|
1176
1176
|
e = a.merge.call({
|
|
1177
1177
|
skipUndefined: !0
|
|
1178
|
-
},
|
|
1178
|
+
}, sr, e);
|
|
1179
1179
|
const { fetch: t, Request: n, Response: r } = e, s = t ? se(t) : typeof fetch == "function", o = se(n), i = se(r);
|
|
1180
1180
|
if (!s)
|
|
1181
1181
|
return !1;
|
|
1182
|
-
const c = s && se(
|
|
1182
|
+
const c = s && se(Ke), f = s && (typeof Xe == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new Xe()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), u = o && c && Ge(() => {
|
|
1183
1183
|
let d = !1;
|
|
1184
|
-
const
|
|
1185
|
-
body: new
|
|
1184
|
+
const y = new n(C.origin, {
|
|
1185
|
+
body: new Ke(),
|
|
1186
1186
|
method: "POST",
|
|
1187
1187
|
get duplex() {
|
|
1188
1188
|
return d = !0, "half";
|
|
1189
1189
|
}
|
|
1190
1190
|
}).headers.has("Content-Type");
|
|
1191
|
-
return d && !
|
|
1192
|
-
}), l = i && c &&
|
|
1191
|
+
return d && !y;
|
|
1192
|
+
}), l = i && c && Ge(() => a.isReadableStream(new r("").body)), p = {
|
|
1193
1193
|
stream: l && ((d) => d.body)
|
|
1194
1194
|
};
|
|
1195
1195
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1196
|
-
!p[d] && (p[d] = (
|
|
1197
|
-
let b =
|
|
1196
|
+
!p[d] && (p[d] = (y, h) => {
|
|
1197
|
+
let b = y && y[d];
|
|
1198
1198
|
if (b)
|
|
1199
|
-
return b.call(
|
|
1200
|
-
throw new m(`Response type '${d}' is not supported`, m.ERR_NOT_SUPPORT,
|
|
1199
|
+
return b.call(y);
|
|
1200
|
+
throw new m(`Response type '${d}' is not supported`, m.ERR_NOT_SUPPORT, h);
|
|
1201
1201
|
});
|
|
1202
1202
|
});
|
|
1203
1203
|
const w = async (d) => {
|
|
@@ -1214,14 +1214,14 @@ const wt = (e) => {
|
|
|
1214
1214
|
return d.byteLength;
|
|
1215
1215
|
if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
|
|
1216
1216
|
return (await f(d)).byteLength;
|
|
1217
|
-
}, S = async (d,
|
|
1218
|
-
const
|
|
1219
|
-
return
|
|
1217
|
+
}, S = async (d, y) => {
|
|
1218
|
+
const h = a.toFiniteNumber(d.getContentLength());
|
|
1219
|
+
return h ?? w(y);
|
|
1220
1220
|
};
|
|
1221
1221
|
return async (d) => {
|
|
1222
1222
|
let {
|
|
1223
|
-
url:
|
|
1224
|
-
method:
|
|
1223
|
+
url: y,
|
|
1224
|
+
method: h,
|
|
1225
1225
|
data: b,
|
|
1226
1226
|
signal: T,
|
|
1227
1227
|
cancelToken: E,
|
|
@@ -1229,65 +1229,65 @@ const wt = (e) => {
|
|
|
1229
1229
|
onDownloadProgress: x,
|
|
1230
1230
|
onUploadProgress: v,
|
|
1231
1231
|
responseType: N,
|
|
1232
|
-
headers:
|
|
1232
|
+
headers: me,
|
|
1233
1233
|
withCredentials: te = "same-origin",
|
|
1234
|
-
fetchOptions:
|
|
1235
|
-
} =
|
|
1234
|
+
fetchOptions: Le
|
|
1235
|
+
} = gt(d), Fe = t || fetch;
|
|
1236
1236
|
N = N ? (N + "").toLowerCase() : "text";
|
|
1237
|
-
let ne =
|
|
1237
|
+
let ne = er([T, E && E.toAbortSignal()], R), K = null;
|
|
1238
1238
|
const z = ne && ne.unsubscribe && (() => {
|
|
1239
1239
|
ne.unsubscribe();
|
|
1240
1240
|
});
|
|
1241
|
-
let
|
|
1241
|
+
let _e;
|
|
1242
1242
|
try {
|
|
1243
|
-
if (v && u &&
|
|
1244
|
-
let D = new n(
|
|
1243
|
+
if (v && u && h !== "get" && h !== "head" && (_e = await S(me, b)) !== 0) {
|
|
1244
|
+
let D = new n(y, {
|
|
1245
1245
|
method: "POST",
|
|
1246
1246
|
body: b,
|
|
1247
1247
|
duplex: "half"
|
|
1248
1248
|
}), M;
|
|
1249
|
-
if (a.isFormData(b) && (M = D.headers.get("content-type")) &&
|
|
1250
|
-
const [
|
|
1251
|
-
|
|
1252
|
-
ce(
|
|
1249
|
+
if (a.isFormData(b) && (M = D.headers.get("content-type")) && me.setContentType(M), D.body) {
|
|
1250
|
+
const [we, re] = Me(
|
|
1251
|
+
_e,
|
|
1252
|
+
ce(He(v))
|
|
1253
1253
|
);
|
|
1254
|
-
b =
|
|
1254
|
+
b = Ve(D.body, We, we, re);
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
1257
|
a.isString(te) || (te = te ? "include" : "omit");
|
|
1258
|
-
const
|
|
1259
|
-
...
|
|
1258
|
+
const B = o && "credentials" in n.prototype, ke = {
|
|
1259
|
+
...Le,
|
|
1260
1260
|
signal: ne,
|
|
1261
|
-
method:
|
|
1262
|
-
headers:
|
|
1261
|
+
method: h.toUpperCase(),
|
|
1262
|
+
headers: me.normalize().toJSON(),
|
|
1263
1263
|
body: b,
|
|
1264
1264
|
duplex: "half",
|
|
1265
|
-
credentials:
|
|
1265
|
+
credentials: B ? te : void 0
|
|
1266
1266
|
};
|
|
1267
|
-
K = o && new n(
|
|
1268
|
-
let U = await (o ?
|
|
1269
|
-
const
|
|
1270
|
-
if (l && (x ||
|
|
1267
|
+
K = o && new n(y, ke);
|
|
1268
|
+
let U = await (o ? Fe(K, Le) : Fe(y, ke));
|
|
1269
|
+
const Ue = l && (N === "stream" || N === "response");
|
|
1270
|
+
if (l && (x || Ue && z)) {
|
|
1271
1271
|
const D = {};
|
|
1272
|
-
["status", "statusText", "headers"].forEach((
|
|
1273
|
-
D[
|
|
1272
|
+
["status", "statusText", "headers"].forEach((De) => {
|
|
1273
|
+
D[De] = U[De];
|
|
1274
1274
|
});
|
|
1275
|
-
const M = a.toFiniteNumber(U.headers.get("content-length")), [
|
|
1275
|
+
const M = a.toFiniteNumber(U.headers.get("content-length")), [we, re] = x && Me(
|
|
1276
1276
|
M,
|
|
1277
|
-
ce(
|
|
1277
|
+
ce(He(x), !0)
|
|
1278
1278
|
) || [];
|
|
1279
1279
|
U = new r(
|
|
1280
|
-
|
|
1280
|
+
Ve(U.body, We, we, () => {
|
|
1281
1281
|
re && re(), z && z();
|
|
1282
1282
|
}),
|
|
1283
1283
|
D
|
|
1284
1284
|
);
|
|
1285
1285
|
}
|
|
1286
1286
|
N = N || "text";
|
|
1287
|
-
let
|
|
1288
|
-
return !
|
|
1289
|
-
|
|
1290
|
-
data:
|
|
1287
|
+
let kt = await p[a.findKey(p, N) || "text"](U, d);
|
|
1288
|
+
return !Ue && z && z(), await new Promise((D, M) => {
|
|
1289
|
+
mt(D, M, {
|
|
1290
|
+
data: kt,
|
|
1291
1291
|
headers: I.from(U.headers),
|
|
1292
1292
|
status: U.status,
|
|
1293
1293
|
statusText: U.statusText,
|
|
@@ -1295,33 +1295,33 @@ const wt = (e) => {
|
|
|
1295
1295
|
request: K
|
|
1296
1296
|
});
|
|
1297
1297
|
});
|
|
1298
|
-
} catch (
|
|
1299
|
-
throw z && z(),
|
|
1298
|
+
} catch (B) {
|
|
1299
|
+
throw z && z(), B && B.name === "TypeError" && /Load failed|fetch/i.test(B.message) ? Object.assign(
|
|
1300
1300
|
new m("Network Error", m.ERR_NETWORK, d, K),
|
|
1301
1301
|
{
|
|
1302
|
-
cause:
|
|
1302
|
+
cause: B.cause || B
|
|
1303
1303
|
}
|
|
1304
|
-
) : m.from(
|
|
1304
|
+
) : m.from(B, B && B.code, d, K);
|
|
1305
1305
|
}
|
|
1306
1306
|
};
|
|
1307
|
-
},
|
|
1307
|
+
}, ir = /* @__PURE__ */ new Map(), bt = (e) => {
|
|
1308
1308
|
let t = e && e.env || {};
|
|
1309
1309
|
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1310
1310
|
r,
|
|
1311
1311
|
s,
|
|
1312
1312
|
n
|
|
1313
1313
|
];
|
|
1314
|
-
let i = o.length, c = i, f, u, l =
|
|
1314
|
+
let i = o.length, c = i, f, u, l = ir;
|
|
1315
1315
|
for (; c--; )
|
|
1316
|
-
f = o[c], u = l.get(f), u === void 0 && l.set(f, u = c ? /* @__PURE__ */ new Map() :
|
|
1316
|
+
f = o[c], u = l.get(f), u === void 0 && l.set(f, u = c ? /* @__PURE__ */ new Map() : or(t)), l = u;
|
|
1317
1317
|
return u;
|
|
1318
1318
|
};
|
|
1319
|
-
|
|
1319
|
+
bt();
|
|
1320
1320
|
const Be = {
|
|
1321
|
-
http:
|
|
1322
|
-
xhr:
|
|
1321
|
+
http: An,
|
|
1322
|
+
xhr: Zn,
|
|
1323
1323
|
fetch: {
|
|
1324
|
-
get:
|
|
1324
|
+
get: bt
|
|
1325
1325
|
}
|
|
1326
1326
|
};
|
|
1327
1327
|
a.forEach(Be, (e, t) => {
|
|
@@ -1333,8 +1333,8 @@ a.forEach(Be, (e, t) => {
|
|
|
1333
1333
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
|
-
const
|
|
1337
|
-
function
|
|
1336
|
+
const Qe = (e) => `- ${e}`, ar = (e) => a.isFunction(e) || e === null || e === !1;
|
|
1337
|
+
function cr(e, t) {
|
|
1338
1338
|
e = a.isArray(e) ? e : [e];
|
|
1339
1339
|
const { length: n } = e;
|
|
1340
1340
|
let r, s;
|
|
@@ -1342,7 +1342,7 @@ function ar(e, t) {
|
|
|
1342
1342
|
for (let i = 0; i < n; i++) {
|
|
1343
1343
|
r = e[i];
|
|
1344
1344
|
let c;
|
|
1345
|
-
if (s = r, !
|
|
1345
|
+
if (s = r, !ar(r) && (s = Be[(c = String(r)).toLowerCase()], s === void 0))
|
|
1346
1346
|
throw new m(`Unknown adapter '${c}'`);
|
|
1347
1347
|
if (s && (a.isFunction(s) || (s = s.get(t))))
|
|
1348
1348
|
break;
|
|
@@ -1353,8 +1353,8 @@ function ar(e, t) {
|
|
|
1353
1353
|
([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1354
1354
|
);
|
|
1355
1355
|
let c = n ? i.length > 1 ? `since :
|
|
1356
|
-
` + i.map(
|
|
1357
|
-
`) : " " +
|
|
1356
|
+
` + i.map(Qe).join(`
|
|
1357
|
+
`) : " " + Qe(i[0]) : "as no adapter specified";
|
|
1358
1358
|
throw new m(
|
|
1359
1359
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1360
1360
|
"ERR_NOT_SUPPORT"
|
|
@@ -1362,50 +1362,50 @@ function ar(e, t) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
return s;
|
|
1364
1364
|
}
|
|
1365
|
-
const
|
|
1365
|
+
const Et = {
|
|
1366
1366
|
/**
|
|
1367
1367
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1368
1368
|
* @type {Function}
|
|
1369
1369
|
*/
|
|
1370
|
-
getAdapter:
|
|
1370
|
+
getAdapter: cr,
|
|
1371
1371
|
/**
|
|
1372
1372
|
* Exposes all known adapters
|
|
1373
1373
|
* @type {Object<string, Function|Object>}
|
|
1374
1374
|
*/
|
|
1375
1375
|
adapters: Be
|
|
1376
1376
|
};
|
|
1377
|
-
function
|
|
1377
|
+
function Ee(e) {
|
|
1378
1378
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1379
1379
|
throw new W(null, e);
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return
|
|
1381
|
+
function Ye(e) {
|
|
1382
|
+
return Ee(e), e.headers = I.from(e.headers), e.data = be.call(
|
|
1383
1383
|
e,
|
|
1384
1384
|
e.transformRequest
|
|
1385
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1386
|
-
return
|
|
1385
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(e.adapter || ee.adapter, e)(e).then(function(r) {
|
|
1386
|
+
return Ee(e), r.data = be.call(
|
|
1387
1387
|
e,
|
|
1388
1388
|
e.transformResponse,
|
|
1389
1389
|
r
|
|
1390
1390
|
), r.headers = I.from(r.headers), r;
|
|
1391
1391
|
}, function(r) {
|
|
1392
|
-
return yt(r) || (
|
|
1392
|
+
return yt(r) || (Ee(e), r && r.response && (r.response.data = be.call(
|
|
1393
1393
|
e,
|
|
1394
1394
|
e.transformResponse,
|
|
1395
1395
|
r.response
|
|
1396
1396
|
), r.response.headers = I.from(r.response.headers))), Promise.reject(r);
|
|
1397
1397
|
});
|
|
1398
1398
|
}
|
|
1399
|
-
const
|
|
1399
|
+
const St = "1.13.2", he = {};
|
|
1400
1400
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1401
|
-
|
|
1401
|
+
he[e] = function(r) {
|
|
1402
1402
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1403
1403
|
};
|
|
1404
1404
|
});
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1405
|
+
const Ze = {};
|
|
1406
|
+
he.transitional = function(t, n, r) {
|
|
1407
1407
|
function s(o, i) {
|
|
1408
|
-
return "[Axios v" +
|
|
1408
|
+
return "[Axios v" + St + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1409
1409
|
}
|
|
1410
1410
|
return (o, i, c) => {
|
|
1411
1411
|
if (t === !1)
|
|
@@ -1413,7 +1413,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1413
1413
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1414
1414
|
m.ERR_DEPRECATED
|
|
1415
1415
|
);
|
|
1416
|
-
return n && !
|
|
1416
|
+
return n && !Ze[i] && (Ze[i] = !0, console.warn(
|
|
1417
1417
|
s(
|
|
1418
1418
|
i,
|
|
1419
1419
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1421,10 +1421,10 @@ pe.transitional = function(t, n, r) {
|
|
|
1421
1421
|
)), t ? t(o, i, c) : !0;
|
|
1422
1422
|
};
|
|
1423
1423
|
};
|
|
1424
|
-
|
|
1424
|
+
he.spelling = function(t) {
|
|
1425
1425
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1426
1426
|
};
|
|
1427
|
-
function
|
|
1427
|
+
function ur(e, t, n) {
|
|
1428
1428
|
if (typeof e != "object")
|
|
1429
1429
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1430
1430
|
const r = Object.keys(e);
|
|
@@ -1442,14 +1442,14 @@ function cr(e, t, n) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
const ae = {
|
|
1445
|
-
assertOptions:
|
|
1446
|
-
validators:
|
|
1445
|
+
assertOptions: ur,
|
|
1446
|
+
validators: he
|
|
1447
1447
|
}, L = ae.validators;
|
|
1448
1448
|
let j = class {
|
|
1449
1449
|
constructor(t) {
|
|
1450
1450
|
this.defaults = t || {}, this.interceptors = {
|
|
1451
|
-
request: new
|
|
1452
|
-
response: new
|
|
1451
|
+
request: new je(),
|
|
1452
|
+
response: new je()
|
|
1453
1453
|
};
|
|
1454
1454
|
}
|
|
1455
1455
|
/**
|
|
@@ -1505,16 +1505,16 @@ let j = class {
|
|
|
1505
1505
|
), n.headers = I.concat(i, o);
|
|
1506
1506
|
const c = [];
|
|
1507
1507
|
let f = !0;
|
|
1508
|
-
this.interceptors.request.forEach(function(
|
|
1509
|
-
typeof
|
|
1508
|
+
this.interceptors.request.forEach(function(y) {
|
|
1509
|
+
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1510
1510
|
});
|
|
1511
1511
|
const u = [];
|
|
1512
|
-
this.interceptors.response.forEach(function(
|
|
1513
|
-
u.push(
|
|
1512
|
+
this.interceptors.response.forEach(function(y) {
|
|
1513
|
+
u.push(y.fulfilled, y.rejected);
|
|
1514
1514
|
});
|
|
1515
1515
|
let l, p = 0, w;
|
|
1516
1516
|
if (!f) {
|
|
1517
|
-
const d = [
|
|
1517
|
+
const d = [Ye.bind(this), void 0];
|
|
1518
1518
|
for (d.unshift(...c), d.push(...u), w = d.length, l = Promise.resolve(n); p < w; )
|
|
1519
1519
|
l = l.then(d[p++], d[p++]);
|
|
1520
1520
|
return l;
|
|
@@ -1522,16 +1522,16 @@ let j = class {
|
|
|
1522
1522
|
w = c.length;
|
|
1523
1523
|
let S = n;
|
|
1524
1524
|
for (; p < w; ) {
|
|
1525
|
-
const d = c[p++],
|
|
1525
|
+
const d = c[p++], y = c[p++];
|
|
1526
1526
|
try {
|
|
1527
1527
|
S = d(S);
|
|
1528
|
-
} catch (
|
|
1529
|
-
|
|
1528
|
+
} catch (h) {
|
|
1529
|
+
y.call(this, h);
|
|
1530
1530
|
break;
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
1533
|
try {
|
|
1534
|
-
l =
|
|
1534
|
+
l = Ye.call(this, S);
|
|
1535
1535
|
} catch (d) {
|
|
1536
1536
|
return Promise.reject(d);
|
|
1537
1537
|
}
|
|
@@ -1541,8 +1541,8 @@ let j = class {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
getUri(t) {
|
|
1543
1543
|
t = $(this.defaults, t);
|
|
1544
|
-
const n =
|
|
1545
|
-
return
|
|
1544
|
+
const n = wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1545
|
+
return ft(n, t.params, t.paramsSerializer);
|
|
1546
1546
|
}
|
|
1547
1547
|
};
|
|
1548
1548
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1569,7 +1569,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
|
|
1571
1571
|
});
|
|
1572
|
-
let
|
|
1572
|
+
let lr = class Ct {
|
|
1573
1573
|
constructor(t) {
|
|
1574
1574
|
if (typeof t != "function")
|
|
1575
1575
|
throw new TypeError("executor must be a function.");
|
|
@@ -1635,22 +1635,22 @@ let ur = class St {
|
|
|
1635
1635
|
static source() {
|
|
1636
1636
|
let t;
|
|
1637
1637
|
return {
|
|
1638
|
-
token: new
|
|
1638
|
+
token: new Ct(function(s) {
|
|
1639
1639
|
t = s;
|
|
1640
1640
|
}),
|
|
1641
1641
|
cancel: t
|
|
1642
1642
|
};
|
|
1643
1643
|
}
|
|
1644
1644
|
};
|
|
1645
|
-
function
|
|
1645
|
+
function dr(e) {
|
|
1646
1646
|
return function(n) {
|
|
1647
1647
|
return e.apply(null, n);
|
|
1648
1648
|
};
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function fr(e) {
|
|
1651
1651
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1652
1652
|
}
|
|
1653
|
-
const
|
|
1653
|
+
const Oe = {
|
|
1654
1654
|
Continue: 100,
|
|
1655
1655
|
SwitchingProtocols: 101,
|
|
1656
1656
|
Processing: 102,
|
|
@@ -1721,63 +1721,63 @@ const Ae = {
|
|
|
1721
1721
|
SslHandshakeFailed: 525,
|
|
1722
1722
|
InvalidSslCertificate: 526
|
|
1723
1723
|
};
|
|
1724
|
-
Object.entries(
|
|
1725
|
-
|
|
1724
|
+
Object.entries(Oe).forEach(([e, t]) => {
|
|
1725
|
+
Oe[t] = e;
|
|
1726
1726
|
});
|
|
1727
|
-
function
|
|
1728
|
-
const t = new j(e), n =
|
|
1727
|
+
function At(e) {
|
|
1728
|
+
const t = new j(e), n = et(j.prototype.request, t);
|
|
1729
1729
|
return a.extend(n, j.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1730
|
-
return
|
|
1730
|
+
return At($(e, s));
|
|
1731
1731
|
}, n;
|
|
1732
1732
|
}
|
|
1733
|
-
const g =
|
|
1733
|
+
const g = At(ee);
|
|
1734
1734
|
g.Axios = j;
|
|
1735
1735
|
g.CanceledError = W;
|
|
1736
|
-
g.CancelToken =
|
|
1736
|
+
g.CancelToken = lr;
|
|
1737
1737
|
g.isCancel = yt;
|
|
1738
|
-
g.VERSION =
|
|
1739
|
-
g.toFormData =
|
|
1738
|
+
g.VERSION = St;
|
|
1739
|
+
g.toFormData = pe;
|
|
1740
1740
|
g.AxiosError = m;
|
|
1741
1741
|
g.Cancel = g.CanceledError;
|
|
1742
1742
|
g.all = function(t) {
|
|
1743
1743
|
return Promise.all(t);
|
|
1744
1744
|
};
|
|
1745
|
-
g.spread =
|
|
1746
|
-
g.isAxiosError =
|
|
1745
|
+
g.spread = dr;
|
|
1746
|
+
g.isAxiosError = fr;
|
|
1747
1747
|
g.mergeConfig = $;
|
|
1748
1748
|
g.AxiosHeaders = I;
|
|
1749
|
-
g.formToJSON = (e) =>
|
|
1750
|
-
g.getAdapter =
|
|
1751
|
-
g.HttpStatusCode =
|
|
1749
|
+
g.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1750
|
+
g.getAdapter = Et.getAdapter;
|
|
1751
|
+
g.HttpStatusCode = Oe;
|
|
1752
1752
|
g.default = g;
|
|
1753
1753
|
const {
|
|
1754
|
-
Axios:
|
|
1755
|
-
AxiosError:
|
|
1754
|
+
Axios: xr,
|
|
1755
|
+
AxiosError: Pr,
|
|
1756
1756
|
CanceledError: Br,
|
|
1757
|
-
isCancel:
|
|
1758
|
-
CancelToken:
|
|
1759
|
-
VERSION:
|
|
1760
|
-
all:
|
|
1761
|
-
Cancel:
|
|
1762
|
-
isAxiosError:
|
|
1763
|
-
spread:
|
|
1764
|
-
toFormData:
|
|
1765
|
-
AxiosHeaders:
|
|
1766
|
-
HttpStatusCode:
|
|
1767
|
-
formToJSON:
|
|
1768
|
-
getAdapter:
|
|
1769
|
-
mergeConfig:
|
|
1770
|
-
} = g,
|
|
1757
|
+
isCancel: Lr,
|
|
1758
|
+
CancelToken: Fr,
|
|
1759
|
+
VERSION: _r,
|
|
1760
|
+
all: kr,
|
|
1761
|
+
Cancel: Ur,
|
|
1762
|
+
isAxiosError: Dr,
|
|
1763
|
+
spread: vr,
|
|
1764
|
+
toFormData: zr,
|
|
1765
|
+
AxiosHeaders: qr,
|
|
1766
|
+
HttpStatusCode: jr,
|
|
1767
|
+
formToJSON: $r,
|
|
1768
|
+
getAdapter: Mr,
|
|
1769
|
+
mergeConfig: Hr
|
|
1770
|
+
} = g, Ie = g.create({
|
|
1771
1771
|
timeout: 15e3
|
|
1772
1772
|
// withCredentials: true,
|
|
1773
1773
|
});
|
|
1774
|
-
|
|
1774
|
+
Ie.interceptors.response.use(
|
|
1775
1775
|
(e) => e,
|
|
1776
1776
|
(e) => Promise.reject(e)
|
|
1777
1777
|
);
|
|
1778
|
-
const
|
|
1778
|
+
const Rt = {
|
|
1779
1779
|
async get(e, t) {
|
|
1780
|
-
const n = await
|
|
1780
|
+
const n = await Ie.get(e, {
|
|
1781
1781
|
params: t?.params,
|
|
1782
1782
|
headers: t?.headers
|
|
1783
1783
|
});
|
|
@@ -1788,7 +1788,7 @@ const At = {
|
|
|
1788
1788
|
};
|
|
1789
1789
|
},
|
|
1790
1790
|
async post(e, t, n) {
|
|
1791
|
-
const r = await
|
|
1791
|
+
const r = await Ie.post(e, t, {
|
|
1792
1792
|
params: n?.params,
|
|
1793
1793
|
headers: n?.headers
|
|
1794
1794
|
});
|
|
@@ -1799,7 +1799,7 @@ const At = {
|
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
1801
|
};
|
|
1802
|
-
function
|
|
1802
|
+
function pr(e) {
|
|
1803
1803
|
return {
|
|
1804
1804
|
async get(t, n) {
|
|
1805
1805
|
const r = n?.params ? "?" + new URLSearchParams(n.params).toString() : "", s = await e(t + r, {
|
|
@@ -1827,20 +1827,23 @@ function fr(e) {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
};
|
|
1829
1829
|
}
|
|
1830
|
-
let G =
|
|
1831
|
-
function
|
|
1832
|
-
return e === "fetch" ? G =
|
|
1830
|
+
let G = Rt;
|
|
1831
|
+
function Jr(e, t) {
|
|
1832
|
+
return e === "fetch" ? G = pr(t?.fetch ?? fetch) : G = Rt, G;
|
|
1833
1833
|
}
|
|
1834
|
-
const
|
|
1834
|
+
const Ot = {
|
|
1835
1835
|
get: (...e) => G.get(...e),
|
|
1836
1836
|
post: (...e) => G.post(...e)
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
}
|
|
1837
|
+
}, ue = {
|
|
1838
|
+
prefixPath: "https://cloudapi-sit2.jctrans.net.cn",
|
|
1839
|
+
searchPath: "/system/dms/fr/aggr/getLocationOptions"
|
|
1840
|
+
}, hr = {
|
|
1841
|
+
get basePath() {
|
|
1842
|
+
return ue.prefixPath + ue.searchPath;
|
|
1843
|
+
}
|
|
1844
|
+
}, Vr = (e) => {
|
|
1845
|
+
e && (e.prefixPath !== void 0 && (ue.prefixPath = e.prefixPath), e.searchPath !== void 0 && (ue.searchPath = e.searchPath));
|
|
1846
|
+
}, It = () => hr, Tt = () => {
|
|
1844
1847
|
try {
|
|
1845
1848
|
const n = globalThis.useCookie;
|
|
1846
1849
|
if (typeof n == "function") {
|
|
@@ -1860,14 +1863,14 @@ const Jr = (e) => {
|
|
|
1860
1863
|
t = "";
|
|
1861
1864
|
}
|
|
1862
1865
|
return /jc-language=en-US/i.test(t) || /jc-language=en/i.test(t);
|
|
1863
|
-
},
|
|
1866
|
+
}, yr = () => It().basePath, mr = {
|
|
1864
1867
|
Continent: "continentId",
|
|
1865
1868
|
Country: "countryId",
|
|
1866
1869
|
City: "cityId",
|
|
1867
1870
|
Province: "provinceId",
|
|
1868
1871
|
Seaport: "seaportId",
|
|
1869
1872
|
Airport: "airportId"
|
|
1870
|
-
},
|
|
1873
|
+
}, wr = [
|
|
1871
1874
|
"City",
|
|
1872
1875
|
"Seaport",
|
|
1873
1876
|
"Airport",
|
|
@@ -1877,11 +1880,11 @@ const Jr = (e) => {
|
|
|
1877
1880
|
function H(e, t) {
|
|
1878
1881
|
return e === "allCityByCountryId" ? Array.isArray(t) ? String(t[0]) : String(t) : Array.isArray(t) ? JSON.stringify(t) : JSON.stringify([Number(t)]);
|
|
1879
1882
|
}
|
|
1880
|
-
function
|
|
1883
|
+
function gr(e) {
|
|
1881
1884
|
const t = [];
|
|
1882
1885
|
if (e.ids)
|
|
1883
1886
|
for (const n of e.ids) {
|
|
1884
|
-
const r =
|
|
1887
|
+
const r = mr[n.type];
|
|
1885
1888
|
t.push({
|
|
1886
1889
|
name: r,
|
|
1887
1890
|
val: H(r, n.ids)
|
|
@@ -1904,9 +1907,9 @@ function k(e) {
|
|
|
1904
1907
|
size: e.size ?? 10,
|
|
1905
1908
|
level: e.level,
|
|
1906
1909
|
searchContent: e.keyword ?? void 0,
|
|
1907
|
-
displayInfo: e.displayInfo ??
|
|
1910
|
+
displayInfo: e.displayInfo ?? wr,
|
|
1908
1911
|
sort: e.sort
|
|
1909
|
-
}, n =
|
|
1912
|
+
}, n = gr({
|
|
1910
1913
|
ids: e.ids,
|
|
1911
1914
|
scope: e.scope
|
|
1912
1915
|
});
|
|
@@ -1914,8 +1917,8 @@ function k(e) {
|
|
|
1914
1917
|
t[r] === void 0 && delete t[r];
|
|
1915
1918
|
}), t;
|
|
1916
1919
|
}
|
|
1917
|
-
function
|
|
1918
|
-
const r =
|
|
1920
|
+
function br(e, t, n) {
|
|
1921
|
+
const r = Tt(), s = (u, l) => {
|
|
1919
1922
|
if (!u) return "";
|
|
1920
1923
|
const p = u.nameCn ?? u[`${l.toLowerCase()}NameCn`] ?? u.name, w = u.nameEn ?? u[`${l.toLowerCase()}NameEn`];
|
|
1921
1924
|
return r ? w || p || "" : p || w || "";
|
|
@@ -1940,7 +1943,7 @@ function F(e = [], t = []) {
|
|
|
1940
1943
|
if (!o || !t.includes(i)) return;
|
|
1941
1944
|
const f = o.id ?? o[i.toLowerCase() + "Id"] ?? null;
|
|
1942
1945
|
if (f == null) return;
|
|
1943
|
-
const u = o.nameCn ?? o[`${i.toLowerCase()}NameCn`] ?? o.name ?? void 0, l = o.nameEn ?? o[`${i.toLowerCase()}NameEn`] ?? void 0, p =
|
|
1946
|
+
const u = o.nameCn ?? o[`${i.toLowerCase()}NameCn`] ?? o.name ?? void 0, l = o.nameEn ?? o[`${i.toLowerCase()}NameEn`] ?? void 0, p = br(o, i, c) || u || l || "";
|
|
1944
1947
|
n.push({
|
|
1945
1948
|
id: f,
|
|
1946
1949
|
type: i,
|
|
@@ -1984,7 +1987,7 @@ function F(e = [], t = []) {
|
|
|
1984
1987
|
});
|
|
1985
1988
|
}
|
|
1986
1989
|
async function _(e) {
|
|
1987
|
-
return (await
|
|
1990
|
+
return (await Ot.post(yr(), e)).data;
|
|
1988
1991
|
}
|
|
1989
1992
|
async function ye(e) {
|
|
1990
1993
|
const t = k({
|
|
@@ -2006,7 +2009,7 @@ async function ye(e) {
|
|
|
2006
2009
|
records: r
|
|
2007
2010
|
};
|
|
2008
2011
|
}
|
|
2009
|
-
async function
|
|
2012
|
+
async function Nt(e) {
|
|
2010
2013
|
if (!e.keyword?.trim())
|
|
2011
2014
|
throw new Error("searchByName: keyword 不能为空");
|
|
2012
2015
|
const t = e.types && e.types.length > 0 ? e.types : ["Continent", "Country", "City", "Province", "Seaport", "Airport"];
|
|
@@ -2019,7 +2022,7 @@ async function Tt(e) {
|
|
|
2019
2022
|
sort: e.sort
|
|
2020
2023
|
});
|
|
2021
2024
|
}
|
|
2022
|
-
async function
|
|
2025
|
+
async function Er(e, t) {
|
|
2023
2026
|
const n = Array.isArray(t) ? t : [t], r = [e], s = k({
|
|
2024
2027
|
displayInfo: r,
|
|
2025
2028
|
ids: [{ type: e, ids: n }]
|
|
@@ -2029,10 +2032,10 @@ async function gr(e, t) {
|
|
|
2029
2032
|
r
|
|
2030
2033
|
).filter((c) => c.type === e);
|
|
2031
2034
|
}
|
|
2032
|
-
async function Vr(e, t) {
|
|
2033
|
-
return (await gr(e, [t]))[0] ?? null;
|
|
2034
|
-
}
|
|
2035
2035
|
async function Wr(e, t) {
|
|
2036
|
+
return (await Er(e, [t]))[0] ?? null;
|
|
2037
|
+
}
|
|
2038
|
+
async function Kr(e, t) {
|
|
2036
2039
|
const n = ["City"], r = k({
|
|
2037
2040
|
displayInfo: n,
|
|
2038
2041
|
page: t?.page ?? 1,
|
|
@@ -2049,7 +2052,7 @@ async function Wr(e, t) {
|
|
|
2049
2052
|
records: F(s.records || [], n)
|
|
2050
2053
|
};
|
|
2051
2054
|
}
|
|
2052
|
-
async function
|
|
2055
|
+
async function Xr(e, t, n) {
|
|
2053
2056
|
if (!t || t.length === 0)
|
|
2054
2057
|
throw new Error("childTypes 必须至少包含一个:Seaport | Airport");
|
|
2055
2058
|
const r = t, s = k({
|
|
@@ -2068,29 +2071,29 @@ async function Kr(e, t, n) {
|
|
|
2068
2071
|
records: F(o.records || [], r)
|
|
2069
2072
|
};
|
|
2070
2073
|
}
|
|
2071
|
-
function
|
|
2072
|
-
return
|
|
2074
|
+
function Gr(e, t) {
|
|
2075
|
+
return Nt({
|
|
2073
2076
|
keyword: e,
|
|
2074
2077
|
types: ["Country"],
|
|
2075
2078
|
page: t?.page,
|
|
2076
2079
|
size: t?.size
|
|
2077
2080
|
});
|
|
2078
2081
|
}
|
|
2079
|
-
function
|
|
2082
|
+
function Qr(e, t) {
|
|
2080
2083
|
return t?.countryId ? ye({
|
|
2081
2084
|
keyword: e,
|
|
2082
2085
|
displayInfo: ["City"],
|
|
2083
2086
|
scope: { countryId: t.countryId },
|
|
2084
2087
|
page: t.page,
|
|
2085
2088
|
size: t.size
|
|
2086
|
-
}) :
|
|
2089
|
+
}) : Nt({
|
|
2087
2090
|
keyword: e,
|
|
2088
2091
|
types: ["City"],
|
|
2089
2092
|
page: t?.page,
|
|
2090
2093
|
size: t?.size
|
|
2091
2094
|
});
|
|
2092
2095
|
}
|
|
2093
|
-
function
|
|
2096
|
+
function Yr(e, t) {
|
|
2094
2097
|
return ye({
|
|
2095
2098
|
keyword: e,
|
|
2096
2099
|
displayInfo: ["Seaport"],
|
|
@@ -2099,7 +2102,7 @@ function Qr(e, t) {
|
|
|
2099
2102
|
size: t?.size
|
|
2100
2103
|
});
|
|
2101
2104
|
}
|
|
2102
|
-
function
|
|
2105
|
+
function Zr(e, t) {
|
|
2103
2106
|
return ye({
|
|
2104
2107
|
keyword: e,
|
|
2105
2108
|
displayInfo: ["Airport"],
|
|
@@ -2108,7 +2111,7 @@ function Yr(e, t) {
|
|
|
2108
2111
|
size: t?.size
|
|
2109
2112
|
});
|
|
2110
2113
|
}
|
|
2111
|
-
async function
|
|
2114
|
+
async function es(e = {}) {
|
|
2112
2115
|
const t = ["Continent"], n = await _({
|
|
2113
2116
|
current: e.page ?? 1,
|
|
2114
2117
|
size: e.size ?? 10,
|
|
@@ -2120,7 +2123,7 @@ async function Zr(e = {}) {
|
|
|
2120
2123
|
records: F(n.records || [], t)
|
|
2121
2124
|
};
|
|
2122
2125
|
}
|
|
2123
|
-
async function
|
|
2126
|
+
async function ts(e = {}) {
|
|
2124
2127
|
const t = ["Country"], n = k({
|
|
2125
2128
|
displayInfo: t,
|
|
2126
2129
|
page: e.page ?? 1,
|
|
@@ -2132,7 +2135,7 @@ async function es(e = {}) {
|
|
|
2132
2135
|
records: F(r.records || [], t)
|
|
2133
2136
|
};
|
|
2134
2137
|
}
|
|
2135
|
-
async function
|
|
2138
|
+
async function ns(e = {}) {
|
|
2136
2139
|
const t = ["City"], n = k({
|
|
2137
2140
|
displayInfo: t,
|
|
2138
2141
|
page: e.page ?? 1,
|
|
@@ -2145,7 +2148,7 @@ async function ts(e = {}) {
|
|
|
2145
2148
|
records: F(r.records || [], t)
|
|
2146
2149
|
};
|
|
2147
2150
|
}
|
|
2148
|
-
async function
|
|
2151
|
+
async function rs(e = {}) {
|
|
2149
2152
|
const t = ["Province"], n = k({
|
|
2150
2153
|
displayInfo: t,
|
|
2151
2154
|
page: e.page ?? 1,
|
|
@@ -2158,7 +2161,7 @@ async function ns(e = {}) {
|
|
|
2158
2161
|
records: F(r.records || [], t)
|
|
2159
2162
|
};
|
|
2160
2163
|
}
|
|
2161
|
-
async function
|
|
2164
|
+
async function ss(e = {}) {
|
|
2162
2165
|
const t = ["Seaport"], n = k({
|
|
2163
2166
|
displayInfo: t,
|
|
2164
2167
|
page: e.page ?? 1,
|
|
@@ -2171,7 +2174,7 @@ async function rs(e = {}) {
|
|
|
2171
2174
|
records: F(r.records || [], t)
|
|
2172
2175
|
};
|
|
2173
2176
|
}
|
|
2174
|
-
async function
|
|
2177
|
+
async function os(e = {}) {
|
|
2175
2178
|
const t = ["Airport"], n = k({
|
|
2176
2179
|
displayInfo: t,
|
|
2177
2180
|
page: e.page ?? 1,
|
|
@@ -2184,8 +2187,8 @@ async function ss(e = {}) {
|
|
|
2184
2187
|
records: F(r.records || [], t)
|
|
2185
2188
|
};
|
|
2186
2189
|
}
|
|
2187
|
-
const
|
|
2188
|
-
function
|
|
2190
|
+
const Sr = "2.0", Cr = () => It().basePath;
|
|
2191
|
+
function xt(e) {
|
|
2189
2192
|
let t = e.type;
|
|
2190
2193
|
return t === "Country" && e.region && !e.country ? {
|
|
2191
2194
|
target: e.region,
|
|
@@ -2195,8 +2198,8 @@ function Nt(e) {
|
|
|
2195
2198
|
finalType: t
|
|
2196
2199
|
};
|
|
2197
2200
|
}
|
|
2198
|
-
function
|
|
2199
|
-
const
|
|
2201
|
+
function Se(e, t) {
|
|
2202
|
+
const { target: n, finalType: r } = xt(e), s = (u) => {
|
|
2200
2203
|
if (!u) return "";
|
|
2201
2204
|
const l = u.nameCn || u.displayNameCn || u.name || "", p = u.nameEn || u.displayNameEn || u.nameEnShow || "";
|
|
2202
2205
|
return t ? p || l : l || p;
|
|
@@ -2207,16 +2210,18 @@ function Sr(e) {
|
|
|
2207
2210
|
}
|
|
2208
2211
|
return ["City", "Province"].includes(r) && c ? `${o} (${c})` : o;
|
|
2209
2212
|
}
|
|
2210
|
-
function
|
|
2213
|
+
function Ar(e = []) {
|
|
2211
2214
|
return e.map((t) => {
|
|
2212
|
-
const { target: n, finalType: r } =
|
|
2215
|
+
const { target: n, finalType: r } = xt(t);
|
|
2213
2216
|
return {
|
|
2214
2217
|
// 优先取嵌套对象里的 ID
|
|
2215
2218
|
id: n.id ?? t.id,
|
|
2216
2219
|
type: r,
|
|
2217
2220
|
nameCn: n.nameCn || n.name,
|
|
2218
2221
|
nameEn: n.nameEn || n.nameEnShow,
|
|
2219
|
-
display:
|
|
2222
|
+
display: Se(t, Tt()),
|
|
2223
|
+
displayEn: Se(t, !0),
|
|
2224
|
+
displayCn: Se(t, !1),
|
|
2220
2225
|
// continent: rec.continent,
|
|
2221
2226
|
// 统一输出时,将 region 映射到 country 字段或保留原样,取决于业务需求
|
|
2222
2227
|
// country: rec.country || rec.region,
|
|
@@ -2233,13 +2238,13 @@ async function A(e) {
|
|
|
2233
2238
|
size: 10,
|
|
2234
2239
|
// 默认每页 10 条
|
|
2235
2240
|
...e
|
|
2236
|
-
}, r = (await
|
|
2241
|
+
}, r = (await Ot.post(Cr(), t)).data.data || {};
|
|
2237
2242
|
return {
|
|
2238
2243
|
...r,
|
|
2239
|
-
records:
|
|
2244
|
+
records: Ar(r.records || [])
|
|
2240
2245
|
};
|
|
2241
2246
|
}
|
|
2242
|
-
const
|
|
2247
|
+
const Pt = {
|
|
2243
2248
|
searchByName: (e) => A({
|
|
2244
2249
|
searchContent: e.keyword,
|
|
2245
2250
|
searchMode: e.searchMode,
|
|
@@ -2255,7 +2260,7 @@ const xt = {
|
|
|
2255
2260
|
displayInfo: ["Country"]
|
|
2256
2261
|
}),
|
|
2257
2262
|
getByIds: (e) => A({ countryIds: e, displayInfo: ["Country"] })
|
|
2258
|
-
},
|
|
2263
|
+
}, Te = {
|
|
2259
2264
|
searchByName: (e) => A({
|
|
2260
2265
|
searchContent: e.keyword,
|
|
2261
2266
|
countryIds: e.countryId ? [e.countryId] : void 0,
|
|
@@ -2264,7 +2269,7 @@ const xt = {
|
|
|
2264
2269
|
}),
|
|
2265
2270
|
getByIds: (e) => A({ cityIds: e, displayInfo: ["City"] }),
|
|
2266
2271
|
getCitiesByCountry: (e, t) => A({ countryIds: [e], displayInfo: ["City"], ...t })
|
|
2267
|
-
},
|
|
2272
|
+
}, Lt = {
|
|
2268
2273
|
searchByName: (e) => A({
|
|
2269
2274
|
searchContent: e.keyword,
|
|
2270
2275
|
cityIds: e.cityId ? [e.cityId] : void 0,
|
|
@@ -2273,7 +2278,7 @@ const xt = {
|
|
|
2273
2278
|
displayInfo: ["Seaport"]
|
|
2274
2279
|
}),
|
|
2275
2280
|
getByIds: (e) => A({ seaportIds: e, displayInfo: ["Seaport"] })
|
|
2276
|
-
},
|
|
2281
|
+
}, Ft = {
|
|
2277
2282
|
searchByName: (e) => A({
|
|
2278
2283
|
searchContent: e.keyword,
|
|
2279
2284
|
countryIds: e.countryId ? [e.countryId] : void 0,
|
|
@@ -2281,76 +2286,77 @@ const xt = {
|
|
|
2281
2286
|
displayInfo: ["Airport"]
|
|
2282
2287
|
}),
|
|
2283
2288
|
getByIds: (e) => A({ airportIds: e, displayInfo: ["Airport"] })
|
|
2284
|
-
},
|
|
2289
|
+
}, _t = {
|
|
2285
2290
|
getByIds: (e) => A({ wharfIds: e, displayInfo: ["Wharf"] })
|
|
2286
|
-
},
|
|
2291
|
+
}, Rr = (e) => A({
|
|
2287
2292
|
searchContent: e.keyword,
|
|
2288
2293
|
...e
|
|
2289
2294
|
// displayInfo: params.displayInfo,
|
|
2290
2295
|
// current: params.current,
|
|
2291
2296
|
// size: params.size,
|
|
2292
|
-
}),
|
|
2297
|
+
}), Or = (e, t) => {
|
|
2293
2298
|
const n = Array.isArray(e) ? e : [e];
|
|
2294
2299
|
switch (t) {
|
|
2295
2300
|
case "Country":
|
|
2296
|
-
return
|
|
2301
|
+
return Pt.getByIds(n);
|
|
2297
2302
|
case "Region":
|
|
2298
2303
|
return Bt.getByIds(n);
|
|
2299
2304
|
case "City":
|
|
2300
|
-
return
|
|
2305
|
+
return Te.getByIds(n);
|
|
2301
2306
|
case "Seaport":
|
|
2302
|
-
return Pt.getByIds(n);
|
|
2303
|
-
case "Airport":
|
|
2304
2307
|
return Lt.getByIds(n);
|
|
2305
|
-
case "
|
|
2308
|
+
case "Airport":
|
|
2306
2309
|
return Ft.getByIds(n);
|
|
2310
|
+
case "Wharf":
|
|
2311
|
+
return _t.getByIds(n);
|
|
2307
2312
|
default:
|
|
2308
2313
|
return A({
|
|
2309
2314
|
[`${t.toLowerCase()}Ids`]: n,
|
|
2310
2315
|
displayInfo: [t]
|
|
2311
2316
|
});
|
|
2312
2317
|
}
|
|
2313
|
-
},
|
|
2314
|
-
SEARCH_VERSION:
|
|
2315
|
-
searchByName:
|
|
2316
|
-
searchByIdWithType:
|
|
2317
|
-
country:
|
|
2318
|
+
}, is = {
|
|
2319
|
+
SEARCH_VERSION: Sr,
|
|
2320
|
+
searchByName: Rr,
|
|
2321
|
+
searchByIdWithType: Or,
|
|
2322
|
+
country: Pt,
|
|
2318
2323
|
region: Bt,
|
|
2319
|
-
city:
|
|
2320
|
-
seaport:
|
|
2321
|
-
airport:
|
|
2322
|
-
wharf:
|
|
2324
|
+
city: Te,
|
|
2325
|
+
seaport: Lt,
|
|
2326
|
+
airport: Ft,
|
|
2327
|
+
wharf: _t,
|
|
2323
2328
|
/** 获取某个国家下的所有城市 */
|
|
2324
|
-
getCitiesByCountry:
|
|
2329
|
+
getCitiesByCountry: Te.getCitiesByCountry,
|
|
2325
2330
|
/** 获取某个城市下的子实体(港口、机场、码头等) */
|
|
2326
2331
|
getChildrenByCity: (e, t, n) => A({ cityIds: [e], displayInfo: t, ...n })
|
|
2327
|
-
},
|
|
2332
|
+
}, as = {
|
|
2328
2333
|
Open: "GLOBAL_MODAL_OPEN",
|
|
2329
2334
|
Close: "GLOBAL_MODAL_CLOSE",
|
|
2330
2335
|
Submit: "GLOBAL_MODAL_SUBMIT"
|
|
2331
|
-
},
|
|
2336
|
+
}, cs = Ut();
|
|
2332
2337
|
export {
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
es as
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
rs as
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2338
|
+
as as MODAL_ACTION,
|
|
2339
|
+
Jr as createRequest,
|
|
2340
|
+
hr as currentConfig,
|
|
2341
|
+
cs as emitter,
|
|
2342
|
+
os as getAirport,
|
|
2343
|
+
Wr as getById,
|
|
2344
|
+
Er as getByIds,
|
|
2345
|
+
Xr as getChildrenByCity,
|
|
2346
|
+
Kr as getCitiesByCountry,
|
|
2347
|
+
ns as getCity,
|
|
2348
|
+
es as getContinent,
|
|
2349
|
+
ts as getCountry,
|
|
2350
|
+
Tt as getIsEn,
|
|
2351
|
+
rs as getProvince,
|
|
2352
|
+
ss as getSeaport,
|
|
2353
|
+
It as getSharedConfig,
|
|
2354
|
+
Vr as initSharedConfig,
|
|
2355
|
+
is as locationSearchV2,
|
|
2350
2356
|
ye as search,
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2357
|
+
Zr as searchAirportByName,
|
|
2358
|
+
Nt as searchByName,
|
|
2359
|
+
Qr as searchCityByName,
|
|
2360
|
+
Gr as searchCountryByName,
|
|
2361
|
+
Yr as searchSeaportByName
|
|
2356
2362
|
};
|